diff --git a/.gitignore b/.gitignore index 52cccf6d4c..dc1fc79f22 100644 --- a/.gitignore +++ b/.gitignore @@ -57,11 +57,11 @@ CTest*.cmake *.opensdf *.unsuccessfulbuild ipch/ -[Oo]bj/ -[Bb]in -[Dd]ebug*/ -[Rr]elease*/ Ankh.NoLoad #Temp files *.temp +/Resinsight_Host.includes +/Resinsight_Host.files +/Resinsight_Host.creator +/Resinsight_Host.config diff --git a/ApplicationCode/Adm/LicenseInformation.txt b/ApplicationCode/Adm/LicenseInformation.txt index 69a1d1bdea..b7a312a144 100644 --- a/ApplicationCode/Adm/LicenseInformation.txt +++ b/ApplicationCode/Adm/LicenseInformation.txt @@ -322,3 +322,46 @@ exceptions: CRAVA is a software package for seismic inversion and conditioning of geological reservoir models. CRAVA is copyrighted by the Norwegian Computing Center and Statoil and licensed under GPLv3+. + +=============================================================================== + Notice for opm-flowdiagnostics and opm-flowdiagnostics-applications libraries +=============================================================================== + + Copyright 2016, 2017 Statoil ASA. + + This file is part of the Open Porous Media Project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . + +=============================================================================== + Notice for the NightCharts code +=============================================================================== + + NightCharts + Copyright (C) 2010 by Alexander A. Avdonin, Artem N. Ivanov / ITGears Co. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Please contact gordos.kund@gmail.com with any questions on this license. diff --git a/ApplicationCode/Application/RiaApplication.cpp b/ApplicationCode/Application/RiaApplication.cpp index f7adafaa1a..15e26fd1a6 100644 --- a/ApplicationCode/Application/RiaApplication.cpp +++ b/ApplicationCode/Application/RiaApplication.cpp @@ -23,6 +23,7 @@ #include "RiaBaseDefs.h" #include "RiaImageCompareReporter.h" #include "RiaImageFileCompare.h" +#include "RiaLogging.h" #include "RiaPreferences.h" #include "RiaProjectModifier.h" #include "RiaSocketServer.h" @@ -47,6 +48,8 @@ #include "RimEclipseView.h" #include "RimEclipseWellCollection.h" #include "RimFaultCollection.h" +#include "RimFlowCharacteristicsPlot.h" +#include "RimFlowPlotCollection.h" #include "RimFormationNamesCollection.h" #include "RimGeoMechCase.h" #include "RimGeoMechCellColors.h" @@ -64,8 +67,10 @@ #include "RimSummaryCurveFilter.h" #include "RimSummaryPlot.h" #include "RimSummaryPlotCollection.h" +#include "RimTreeViewStateSerializer.h" #include "RimViewLinker.h" #include "RimViewLinkerCollection.h" +#include "RimWellAllocationPlot.h" #include "RimWellLogPlot.h" #include "RimWellLogPlotCollection.h" #include "RimWellPath.h" @@ -79,6 +84,8 @@ #include "RiuSummaryQwtPlot.h" #include "RiuViewer.h" #include "RiuWellLogPlot.h" +#include "RiuWellAllocationPlot.h" +#include "RiuFlowCharacteristicsPlot.h" #include "RicImportSummaryCaseFeature.h" #include "RicSnapshotViewToClipboardFeature.h" @@ -92,10 +99,12 @@ #include "cafPdmFieldCvfColor.h" #include "cafPdmFieldCvfMat4d.h" #include "cafPdmSettings.h" +#include "cafPdmUiModelChangeDetector.h" #include "cafPdmUiTreeView.h" #include "cafProgressInfo.h" #include "cafUiProcess.h" #include "cafUtils.h" + #include "cvfProgramOptions.h" #include "cvfqtUtils.h" @@ -107,6 +116,7 @@ #include #include #include +#include #include "gtest/gtest.h" @@ -114,6 +124,7 @@ #include #endif + namespace caf { template<> @@ -132,7 +143,7 @@ namespace RegTestNames const QString generatedFolderName = "RegTestGeneratedImages"; const QString diffFolderName = "RegTestDiffImages"; const QString baseFolderName = "RegTestBaseImages"; - const QString testProjectName = "RegressionTest.rip"; + const QString testProjectName = "RegressionTest"; const QString testFolderFilter = "TestCase*"; const QString imageCompareExeName = "compare"; const QString reportFileName = "ResInsightRegressionTestReport.html"; @@ -332,10 +343,16 @@ bool RiaApplication::loadProject(const QString& projectFileName, ProjectLoadActi closeProject(); + RiaLogging::info(QString("Starting to open project file : '%1'").arg(projectFileName)); + // Open the project file and read the serialized data. // Will initialize itself. - if (!QFile::exists(projectFileName)) return false; + if (!caf::Utils::fileExists(projectFileName)) + { + RiaLogging::info(QString("File does not exist : '%1'").arg(projectFileName)); + return false; + } m_project->fileName = projectFileName; m_project->readFile(); @@ -536,6 +553,8 @@ bool RiaApplication::loadProject(const QString& projectFileName, ProjectLoadActi // Execute command objects, and release the mutex when the queue is empty executeCommandObjects(); + RiaLogging::info(QString("Completed open of project file : '%1'").arg(projectFileName)); + return true; } @@ -554,6 +573,7 @@ void RiaApplication::loadAndUpdatePlotData() { RimWellLogPlotCollection* wlpColl = nullptr; RimSummaryPlotCollection* spColl = nullptr; + RimFlowPlotCollection* flowColl = nullptr; if (m_project->mainPlotCollection() && m_project->mainPlotCollection()->wellLogPlotCollection()) { @@ -563,9 +583,15 @@ void RiaApplication::loadAndUpdatePlotData() { spColl = m_project->mainPlotCollection()->summaryPlotCollection(); } + if (m_project->mainPlotCollection() && m_project->mainPlotCollection()->flowPlotCollection()) + { + flowColl = m_project->mainPlotCollection()->flowPlotCollection(); + } + size_t plotCount = 0; plotCount += wlpColl ? wlpColl->wellLogPlots().size() : 0; - plotCount += spColl ? spColl->m_summaryPlots().size() : 0; + plotCount += spColl ? spColl->summaryPlots().size() : 0; + plotCount += flowColl ? flowColl->plotCount() : 0; caf::ProgressInfo plotProgress(plotCount, "Loading Plot Data"); if (wlpColl) @@ -579,12 +605,60 @@ void RiaApplication::loadAndUpdatePlotData() if (spColl) { - for (size_t wlpIdx = 0; wlpIdx < spColl->m_summaryPlots().size(); ++wlpIdx) + for (size_t wlpIdx = 0; wlpIdx < spColl->summaryPlots().size(); ++wlpIdx) { - spColl->m_summaryPlots[wlpIdx]->loadDataAndUpdate(); + spColl->summaryPlots[wlpIdx]->loadDataAndUpdate(); plotProgress.incrementProgress(); } } + + if (flowColl) + { + plotProgress.setNextProgressIncrement(flowColl->plotCount()); + flowColl->loadDataAndUpdate(); + plotProgress.incrementProgress(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaApplication::storeTreeViewState() +{ + { + if (mainPlotWindow() && mainPlotWindow()->projectTreeView()) + { + caf::PdmUiTreeView* projectTreeView = mainPlotWindow()->projectTreeView(); + + QString treeViewState; + RimTreeViewStateSerializer::storeTreeViewStateToString(projectTreeView->treeView(), treeViewState); + + QModelIndex mi = projectTreeView->treeView()->currentIndex(); + + QString encodedModelIndexString; + RimTreeViewStateSerializer::encodeStringFromModelIndex(mi, encodedModelIndexString); + + project()->plotWindowTreeViewState = treeViewState; + project()->plotWindowCurrentModelIndexPath = encodedModelIndexString; + } + } + + { + caf::PdmUiTreeView* projectTreeView = RiuMainWindow::instance()->projectTreeView(); + if (projectTreeView) + { + QString treeViewState; + RimTreeViewStateSerializer::storeTreeViewStateToString(projectTreeView->treeView(), treeViewState); + + QModelIndex mi = projectTreeView->treeView()->currentIndex(); + + QString encodedModelIndexString; + RimTreeViewStateSerializer::encodeStringFromModelIndex(mi, encodedModelIndexString); + + project()->mainWindowTreeViewState = treeViewState; + project()->mainWindowCurrentModelIndexPath = encodedModelIndexString; + } + } } //-------------------------------------------------------------------------------------------------- @@ -640,7 +714,7 @@ bool RiaApplication::saveProject() { CVF_ASSERT(m_project.notNull()); - if (!QFile::exists(m_project->fileName())) + if (!caf::Utils::fileExists(m_project->fileName())) { return saveProjectPromptForFileName(); } @@ -687,6 +761,55 @@ bool RiaApplication::saveProjectPromptForFileName() return bSaveOk; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RiaApplication::hasValidProjectFileExtension(const QString& fileName) +{ + if (fileName.contains(".rsp", Qt::CaseInsensitive) || fileName.contains(".rip", Qt::CaseInsensitive)) + { + return true; + } + + return false; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RiaApplication::askUserToSaveModifiedProject() +{ + if (caf::PdmUiModelChangeDetector::instance()->isModelChanged()) + { + QMessageBox msgBox; + msgBox.setIcon(QMessageBox::Question); + + QString questionText; + questionText = QString("The current project is modified.\n\nDo you want to save the changes?"); + + msgBox.setText(questionText); + msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel); + + int ret = msgBox.exec(); + if (ret == QMessageBox::Cancel) + { + return false; + } + else if (ret == QMessageBox::Yes) + { + if (!saveProject()) + { + return false; + } + } + else + { + caf::PdmUiModelChangeDetector::instance()->reset(); + } + } + + return true; +} //-------------------------------------------------------------------------------------------------- /// @@ -695,6 +818,8 @@ bool RiaApplication::saveProjectAs(const QString& fileName) { m_project->fileName = fileName; + storeTreeViewState(); + if (!m_project->writeFile()) { QMessageBox::warning(NULL, "Error when saving project file", QString("Not possible to save project file. Make sure you have sufficient access rights.\n\nProject file location : %1").arg(fileName)); @@ -707,10 +832,11 @@ bool RiaApplication::saveProjectAs(const QString& fileName) m_recentFileActionProvider->addFileName(fileName); + caf::PdmUiModelChangeDetector::instance()->reset(); + return true; } - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -793,16 +919,19 @@ QString RiaApplication::createAbsolutePathFromProjectRelativePath(QString projec return projectRelativePath; } + QString absolutePath; if (m_project && !m_project->fileName().isEmpty()) { - QString absoluteProjectPath = QFileInfo(m_project->fileName()).absolutePath(); - QDir projectDir(absoluteProjectPath); - return projectDir.absoluteFilePath(projectRelativePath); + absolutePath = QFileInfo(m_project->fileName()).absolutePath(); } else { - return projectRelativePath; + absolutePath = this->lastUsedDialogDirectory("BINARY_GRID"); } + + QDir projectDir(absolutePath); + + return projectDir.absoluteFilePath(projectRelativePath); } @@ -811,7 +940,7 @@ QString RiaApplication::createAbsolutePathFromProjectRelativePath(QString projec //-------------------------------------------------------------------------------------------------- bool RiaApplication::openEclipseCaseFromFile(const QString& fileName) { - if (!QFile::exists(fileName)) return false; + if (!caf::Utils::fileExists(fileName)) return false; QFileInfo gridFileName(fileName); QString caseName = gridFileName.completeBaseName(); @@ -984,7 +1113,7 @@ bool RiaApplication::openInputEclipseCaseFromFileNames(const QStringList& fileNa //-------------------------------------------------------------------------------------------------- bool RiaApplication::openOdbCaseFromFile(const QString& fileName) { - if (!QFile::exists(fileName)) return false; + if (!caf::Utils::fileExists(fileName)) return false; QFileInfo gridFileName(fileName); QString caseName = gridFileName.completeBaseName(); @@ -1087,41 +1216,28 @@ RimView* RiaApplication::activeReservoirView() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiaApplication::setActiveReservoirView(RimView* rv) -{ - m_activeReservoirView = rv; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiaApplication::setActiveWellLogPlot(RimWellLogPlot* wlp) +RimViewWindow* RiaApplication::activePlotWindow() const { - m_activeWellLogPlot = wlp; -} + RimViewWindow* viewWindow = nullptr; -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RimWellLogPlot* RiaApplication::activeWellLogPlot() -{ - return m_activeWellLogPlot; -} + if ( m_mainPlotWindow ) + { + QList subwindows = m_mainPlotWindow->subWindowList(QMdiArea::StackingOrder); + if ( subwindows.size() > 0 ) + { + viewWindow = RiuInterfaceToViewWindow::viewWindowFromWidget(subwindows.back()->widget()); + } + } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiaApplication::setActiveSummaryPlot(RimSummaryPlot* sp) -{ - m_activeSummaryPlot = sp; + return viewWindow; } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimSummaryPlot* RiaApplication::activeSummaryPlot() +void RiaApplication::setActiveReservoirView(RimView* rv) { - return m_activeSummaryPlot; + m_activeReservoirView = rv; } //-------------------------------------------------------------------------------------------------- @@ -1283,7 +1399,8 @@ bool RiaApplication::parseArguments() std::vector gridFiles = readFileListFromTextFile(gridListFile); runMultiCaseSnapshots(projectFileName, gridFiles, "multiCaseSnapshots"); - closeProject(); + closeAllWindows(); + processEvents(); return false; } @@ -1362,14 +1479,14 @@ bool RiaApplication::parseArguments() foreach (QString caseName, caseNames) { QString caseFileNameWithExt = caseName + ".EGRID"; - if (QFile::exists(caseFileNameWithExt)) + if (!caf::Utils::fileExists(caseFileNameWithExt)) { openEclipseCaseFromFile(caseFileNameWithExt); } else { caseFileNameWithExt = caseName + ".GRID"; - if (QFile::exists(caseFileNameWithExt)) + if (!caf::Utils::fileExists(caseFileNameWithExt)) { openEclipseCaseFromFile(caseFileNameWithExt); } @@ -1436,7 +1553,8 @@ bool RiaApplication::parseArguments() } } - closeProject(); + closeAllWindows(); + processEvents(); } // Returning false will exit the application @@ -1555,6 +1673,16 @@ RiuMainPlotWindow* RiaApplication::mainPlotWindow() return m_mainPlotWindow; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuMainWindowBase* RiaApplication::mainWindowByID(int mainWindowID) +{ + if (mainWindowID == 0) return RiuMainWindow::instance(); + else if (mainWindowID == 1) return m_mainPlotWindow; + else return nullptr; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -1562,36 +1690,44 @@ RimViewWindow* RiaApplication::activeViewWindow() { RimViewWindow* viewWindow = NULL; - QWidget* topLevelWidget = RiaApplication::activeWindow(); + QWidget* mainWindowWidget = RiaApplication::activeWindow(); - if (dynamic_cast(topLevelWidget)) + if (dynamic_cast(mainWindowWidget)) { viewWindow = RiaApplication::instance()->activeReservoirView(); } - - if (dynamic_cast(topLevelWidget)) + else if (dynamic_cast(mainWindowWidget)) { - RiuMainPlotWindow* mainPlotWindow = dynamic_cast(topLevelWidget); + RiuMainPlotWindow* mainPlotWindow = dynamic_cast(mainWindowWidget); + QList subwindows = mainPlotWindow->subWindowList(QMdiArea::StackingOrder); if (subwindows.size() > 0) { - RiuSummaryQwtPlot* summaryQwtPlot = dynamic_cast(subwindows.back()->widget()); - if (summaryQwtPlot) - { - viewWindow = summaryQwtPlot->ownerPlotDefinition(); - } - - RiuWellLogPlot* wellLogPlot = dynamic_cast(subwindows.back()->widget()); - if (wellLogPlot) - { - viewWindow = wellLogPlot->ownerPlotDefinition(); - } + viewWindow = RiuInterfaceToViewWindow::viewWindowFromWidget(subwindows.back()->widget()); } } return viewWindow; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RiaApplication::isMain3dWindowVisible() const +{ + return RiuMainWindow::instance()->isVisible(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RiaApplication::isMainPlotWindowVisible() const +{ + if (!m_mainPlotWindow) return false; + + return m_mainPlotWindow->isVisible(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -1889,6 +2025,7 @@ void RiaApplication::applyPreferences() if (RiuMainWindow::instance() && RiuMainWindow::instance()->projectTreeView()) { RiuMainWindow::instance()->projectTreeView()->enableAppendOfClassNameToUiItemText(m_preferences->appendClassNameToUiText()); + if (mainPlotWindow()) mainPlotWindow()->projectTreeView()->enableAppendOfClassNameToUiItemText(m_preferences->appendClassNameToUiText()); } caf::FixedAtlasFont::FontSize fontSizeType = caf::FixedAtlasFont::POINT_SIZE_16; @@ -1998,11 +2135,11 @@ void RiaApplication::setLastUsedDialogDirectory(const QString& dialogName, const //-------------------------------------------------------------------------------------------------- bool RiaApplication::openFile(const QString& fileName) { - if (!QFile::exists(fileName)) return false; + if (!caf::Utils::fileExists(fileName)) return false; bool loadingSucceded = false; - if (fileName.contains(".rsp", Qt::CaseInsensitive) || fileName.contains(".rip", Qt::CaseInsensitive)) + if (RiaApplication::hasValidProjectFileExtension(fileName)) { loadingSucceded = loadProject(fileName); } @@ -2037,6 +2174,11 @@ bool RiaApplication::openFile(const QString& fileName) } } + if (loadingSucceded && !RiaApplication::hasValidProjectFileExtension(fileName)) + { + caf::PdmUiModelChangeDetector::instance()->setModelChanged(); + } + return loadingSucceded; } @@ -2086,7 +2228,7 @@ void RiaApplication::saveSnapshotForAllViews(const QString& snapshotFolderName) viewer->repaint(); QString fileName = cas->caseUserDescription() + "-" + riv->name(); - fileName.replace(" ", "_"); + fileName = caf::Utils::makeValidFileBasename(fileName); QString absoluteFileName = caf::Utils::constructFullFileName(absSnapshotPath, fileName, ".png"); @@ -2137,6 +2279,18 @@ void removeDirectoryWithContent(QDir dirToDelete ) dirToDelete.rmdir("."); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void logInfoTextWithTimeInSeconds(const QTime& time, const QString& msg) +{ + double timeRunning = time.elapsed() / 1000.0; + + QString timeText = QString("(%1 s) ").arg(timeRunning, 0, 'f', 1); + + RiaLogging::info(timeText + msg); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -2193,6 +2347,11 @@ void RiaApplication::runRegressionTest(const QString& testRootPath) } } + QTime timeStamp; + timeStamp.start(); + + logInfoTextWithTimeInSeconds(timeStamp, "Starting regression tests\n"); + for (int dirIdx = 0; dirIdx < folderList.size(); ++dirIdx) { QDir testCaseFolder(folderList[dirIdx].filePath()); @@ -2214,47 +2373,103 @@ void RiaApplication::runRegressionTest(const QString& testRootPath) for (int dirIdx = 0; dirIdx < folderList.size(); ++dirIdx) { QDir testCaseFolder(folderList[dirIdx].filePath()); - if (testCaseFolder.exists(regTestProjectName)) + + QString projectFileName; + + if (testCaseFolder.exists(regTestProjectName + ".rip")) { - loadProject(testCaseFolder.filePath(regTestProjectName)); - - // Wait until all command objects have completed - while (!m_commandQueueLock.tryLock()) - { - processEvents(); - } - m_commandQueueLock.unlock(); - - regressionTestConfigureProject(); - - QString fullPathGeneratedFolder = testCaseFolder.absoluteFilePath(generatedFolderName); - saveSnapshotForAllViews(fullPathGeneratedFolder); - - QDir baseDir(testCaseFolder.filePath(baseFolderName)); - QDir genDir(testCaseFolder.filePath(generatedFolderName)); - QDir diffDir(testCaseFolder.filePath(diffFolderName)); - if (!diffDir.exists()) testCaseFolder.mkdir(diffFolderName); - baseDir.setFilter(QDir::Files); - QStringList baseImageFileNames = baseDir.entryList(); - - for (int fIdx = 0; fIdx < baseImageFileNames.size(); ++fIdx) - { - QString fileName = baseImageFileNames[fIdx]; - RiaImageFileCompare imgComparator(RegTestNames::imageCompareExeName); - bool ok = imgComparator.runComparison(genDir.filePath(fileName), baseDir.filePath(fileName), diffDir.filePath(fileName)); - if (!ok) - { + projectFileName = regTestProjectName + ".rip"; + } + + if (testCaseFolder.exists(regTestProjectName + ".rsp")) + { + projectFileName = regTestProjectName + ".rsp"; + } + + if (!projectFileName.isEmpty()) + { + logInfoTextWithTimeInSeconds(timeStamp, "Initializing test :" + testCaseFolder.absolutePath()); + + loadProject(testCaseFolder.filePath(projectFileName)); + + // Wait until all command objects have completed + while (!m_commandQueueLock.tryLock()) + { + processEvents(); + } + m_commandQueueLock.unlock(); + + regressionTestConfigureProject(); + + resizeMaximizedPlotWindows(); + + QString fullPathGeneratedFolder = testCaseFolder.absoluteFilePath(generatedFolderName); + saveSnapshotForAllViews(fullPathGeneratedFolder); + + RicSnapshotAllPlotsToFileFeature::exportSnapshotOfAllPlotsIntoFolder(fullPathGeneratedFolder); + + QDir baseDir(testCaseFolder.filePath(baseFolderName)); + QDir genDir(testCaseFolder.filePath(generatedFolderName)); + QDir diffDir(testCaseFolder.filePath(diffFolderName)); + if (!diffDir.exists()) testCaseFolder.mkdir(diffFolderName); + baseDir.setFilter(QDir::Files); + QStringList baseImageFileNames = baseDir.entryList(); + + for (int fIdx = 0; fIdx < baseImageFileNames.size(); ++fIdx) + { + QString fileName = baseImageFileNames[fIdx]; + RiaImageFileCompare imgComparator(RegTestNames::imageCompareExeName); + bool ok = imgComparator.runComparison(genDir.filePath(fileName), baseDir.filePath(fileName), diffDir.filePath(fileName)); + if (!ok) + { qDebug() << "Error comparing :" << imgComparator.errorMessage() << "\n" << imgComparator.errorDetails(); - } - } + } + } - closeProject(); + closeProject(); + + logInfoTextWithTimeInSeconds(timeStamp, "Completed test :" + testCaseFolder.absolutePath()); } } + RiaLogging::info("\n"); + logInfoTextWithTimeInSeconds(timeStamp, "Completed regression tests"); + m_runningRegressionTests = false; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaApplication::resizeMaximizedPlotWindows() +{ + std::vector viewWindows; + m_project->mainPlotCollection()->descendantsIncludingThisOfType(viewWindows); + + for (auto viewWindow : viewWindows) + { + if (viewWindow->isMdiWindow()) + { + RimMdiWindowGeometry wndGeo = viewWindow->mdiWindowGeometry(); + if (wndGeo.isMaximized) + { + QWidget* viewWidget = viewWindow->viewWidget(); + + if (viewWidget) + { + QMdiSubWindow* mdiWindow = m_mainPlotWindow->findMdiSubWindow(viewWidget); + if (mdiWindow) + { + mdiWindow->showNormal(); + + viewWidget->resize(RiaApplication::regressionDefaultImageSize()); + } + } + } + } + } +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -2347,7 +2562,7 @@ bool RiaApplication::addEclipseCases(const QStringList& fileNames) bool identicalGrid = RigGridManager::isGridDimensionsEqual(mainCaseGridDimensions, caseGridDimensions); if (identicalGrid) { - if (rimResultReservoir->openAndReadActiveCellData(mainResultCase->reservoirData())) + if (rimResultReservoir->openAndReadActiveCellData(mainResultCase->eclipseCaseData())) { RimOilField* oilField = m_project->activeOilField(); if (oilField && oilField->analysisModels()) @@ -2649,7 +2864,6 @@ void RiaApplication::executeRegressionTests(const QString& regressionTestPath) } } - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -2684,8 +2898,16 @@ void RiaApplication::regressionTestConfigureProject() } // This size is set to match the regression test reference images - riv->viewer()->setFixedSize(1000, 745); + riv->viewer()->setFixedSize(RiaApplication::regressionDefaultImageSize()); } } } } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QSize RiaApplication::regressionDefaultImageSize() +{ + return QSize(1000, 745); +} diff --git a/ApplicationCode/Application/RiaApplication.h b/ApplicationCode/Application/RiaApplication.h index 0cfd04432e..8e158e3ebc 100644 --- a/ApplicationCode/Application/RiaApplication.h +++ b/ApplicationCode/Application/RiaApplication.h @@ -43,7 +43,7 @@ class RiaPreferences; class RiaProjectModifier; class RiaSocketServer; -class RigCaseData; +class RigEclipseCaseData; class RimCommandObject; class RimEclipseCase; @@ -53,7 +53,9 @@ class RimSummaryPlot; class RimView; class RimViewWindow; class RimWellLogPlot; +class RimWellAllocationPlot; +class RiuMainWindowBase; class RiuMainPlotWindow; class RiuRecentFileActionProvider; @@ -94,11 +96,7 @@ class RiaApplication : public QApplication RimView* activeReservoirView(); const RimView* activeReservoirView() const; - void setActiveWellLogPlot(RimWellLogPlot*); - RimWellLogPlot* activeWellLogPlot(); - - void setActiveSummaryPlot(RimSummaryPlot*); - RimSummaryPlot* activeSummaryPlot(); + RimViewWindow* activePlotWindow() const; void scheduleDisplayModelUpdateAndRedraw(RimView* resViewToUpdate); @@ -128,15 +126,17 @@ class RiaApplication : public QApplication bool saveProject(); bool saveProjectAs(const QString& fileName); bool saveProjectPromptForFileName(); + static bool hasValidProjectFileExtension(const QString& fileName); + + bool askUserToSaveModifiedProject(); void closeProject(); + void addWellPathsToModel(QList wellPathFilePaths); void addWellLogsToModel(const QList& wellLogFilePaths); void saveSnapshotForAllViews(const QString& snapshotFolderName); void runMultiCaseSnapshots(const QString& templateProjectFileName, std::vector gridFileNames, const QString& snapshotFolderName); void runRegressionTest(const QString& testRootPath); - void updateRegressionTest(const QString& testRootPath ); - void regressionTestConfigureProject(); void processNonGuiEvents(); @@ -181,9 +181,13 @@ class RiaApplication : public QApplication RiuMainPlotWindow* getOrCreateAndShowMainPlotWindow(); RiuMainPlotWindow* mainPlotWindow(); + RiuMainWindowBase* mainWindowByID(int mainWindowID); static RimViewWindow* activeViewWindow(); + bool isMain3dWindowVisible() const; + bool isMainPlotWindowVisible() const; + bool tryCloseMainWindow(); bool tryClosePlotWindow(); @@ -209,16 +213,26 @@ class RiaApplication : public QApplication void deleteMainPlotWindow(); void loadAndUpdatePlotData(); + + void storeTreeViewState(); + + void resizeMaximizedPlotWindows(); + void updateRegressionTest(const QString& testRootPath); + void regressionTestConfigureProject(); + static QSize regressionDefaultImageSize(); private slots: void slotWorkerProcessFinished(int exitCode, QProcess::ExitStatus exitStatus); - void slotUpdateScheduledDisplayModels(); + // Friend classes required to have access to slotUpdateScheduledDisplayModels + // As snapshots are produced fast in sequence, the feature must have access to force redraw + // of scheduled redraws + friend class RimView; + friend class RicExportMultipleSnapshotsFeature; + private: caf::PdmPointer m_activeReservoirView; - caf::PdmPointer m_activeWellLogPlot; - caf::PdmPointer m_activeSummaryPlot; caf::PdmPointer m_project; diff --git a/ApplicationCode/Application/RiaColorTables.cpp b/ApplicationCode/Application/RiaColorTables.cpp new file mode 100644 index 0000000000..3452a01150 --- /dev/null +++ b/ApplicationCode/Application/RiaColorTables.cpp @@ -0,0 +1,431 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RiaColorTables.h" + +#include + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const caf::ColorTable& RiaColorTables::normalPaletteColors() +{ + static std::vector colors { + cvf::Color3ub( 0, 0, 255), + cvf::Color3ub( 0, 127, 255), + cvf::Color3ub( 0, 255, 255), + cvf::Color3ub( 0, 255, 0), + cvf::Color3ub(255, 255, 0), + cvf::Color3ub(255, 127, 0), + cvf::Color3ub(255, 0, 0) + }; + + static caf::ColorTable colorTable = caf::ColorTable(colors); + + return colorTable; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const caf::ColorTable& RiaColorTables::normalPaletteOppositeOrderingColors() +{ + static std::vector colors{ + cvf::Color3ub(255, 0, 0), + cvf::Color3ub(255, 127, 0), + cvf::Color3ub(255, 255, 0), + cvf::Color3ub( 0, 255, 0), + cvf::Color3ub( 0, 255, 255), + cvf::Color3ub( 0, 127, 255), + cvf::Color3ub( 0, 0, 255) + }; + + static caf::ColorTable colorTable = caf::ColorTable(colors); + + return colorTable; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const caf::ColorTable& RiaColorTables::blackWhitePaletteColors() +{ + static std::vector colors{ + cvf::Color3ub::BLACK, + cvf::Color3ub::WHITE + }; + + static caf::ColorTable colorTable = caf::ColorTable(colors); + + return colorTable; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const caf::ColorTable& RiaColorTables::whiteBlackPaletteColors() +{ + static std::vector colors{ + cvf::Color3ub::WHITE, + cvf::Color3ub::BLACK + }; + + static caf::ColorTable colorTable = caf::ColorTable(colors); + + return colorTable; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const caf::ColorTable& RiaColorTables::pinkWhitePaletteColors() +{ + static std::vector colors{ + cvf::Color3ub::DEEP_PINK, + cvf::Color3ub::WHITE + }; + + static caf::ColorTable colorTable = caf::ColorTable(colors); + + return colorTable; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const caf::ColorTable& RiaColorTables::whitePinkPaletteColors() +{ + static std::vector colors{ + cvf::Color3ub::WHITE, + cvf::Color3ub::DEEP_PINK + }; + + static caf::ColorTable colorTable = caf::ColorTable(colors); + + return colorTable; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const caf::ColorTable& RiaColorTables::blueWhiteRedPaletteColors() +{ + static std::vector colors{ + cvf::Color3ub::BLUE, + cvf::Color3ub::WHITE, + cvf::Color3ub::RED + }; + + static caf::ColorTable colorTable = caf::ColorTable(colors); + + return colorTable; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const caf::ColorTable& RiaColorTables::redWhiteBluePaletteColors() +{ + static std::vector colors{ + cvf::Color3ub::RED, + cvf::Color3ub::WHITE, + cvf::Color3ub::BLUE + }; + + static caf::ColorTable colorTable = caf::ColorTable(colors); + + return colorTable; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const caf::ColorTable& RiaColorTables::categoryPaletteColors() +{ + // Based on http://stackoverflow.com/questions/470690/how-to-automatically-generate-n-distinct-colors + // and Kelly Colors and sorted by hue + // See also http://www.w3schools.com/colors/ for palettes etc. + + static std::vector colors{ + cvf::Color3ub(128, 62, 117), // hwb(310, 24%, 50%) strong_purple + cvf::Color3ub(212, 28, 132), // hwb(326, 11%, 17%) strong_purplish_red + cvf::Color3ub(246, 118, 142), // hwb(349, 46%, 4%) strong_purplish_pink + cvf::Color3ub(193, 0, 32), // hwb(350, 0%, 24%) vivid_red + cvf::Color3ub(127, 24, 13), // hwb( 6, 5%, 50%) strong_reddish_brown + cvf::Color3ub(241, 58, 19), // hwb( 11, 7%, 5%) vivid_reddish_orange + cvf::Color3ub(255, 122, 92), // hwb( 11, 36%, 0%) strong_yellowish_pink + cvf::Color3ub(129, 112, 102), // hwb( 22, 40%, 49%) medium_gray + cvf::Color3ub(255, 104, 0), // hwb( 24, 0%, 0%) vivid_orange + cvf::Color3ub( 89, 51, 21), // hwb( 26, 8%, 65%) deep_yellowish_brown + cvf::Color3ub(255, 142, 0), // hwb( 33, 0%, 0%) vivid_orange_yellow + cvf::Color3ub(206, 162, 98), // hwb( 36, 38%, 19%) grayish_yellow + cvf::Color3ub(244, 200, 0), // hwb( 49, 0%, 4%) vivid_greenish_yellow + cvf::Color3ub(147, 170, 0), // hwb( 68, 0%, 33%) vivid_yellowish_green + cvf::Color3ub( 59, 84, 23), // hwb( 85, 9%, 67%) dark_olive_green + cvf::Color3ub( 0, 125, 52), // hwb(145, 0%, 51%) vivid_green + cvf::Color3ub( 54, 125, 123), // hwb(178, 21%, 51%) vivid_blueish_green + cvf::Color3ub( 0, 83, 138), // hwb(204, 0%, 46%) strong_blue + cvf::Color3ub(166, 189, 215), // hwb(212, 65%, 16%) very_light_blue + cvf::Color3ub( 46, 76, 224) // hwb(230, 18%, 12%) medium_blue + }; + + static caf::ColorTable colorTable = caf::ColorTable(colors); + + return colorTable; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const caf::ColorTable& RiaColorTables::angularPaletteColors() +{ + static std::vector colors{ + cvf::Color3ub(255, 0, 255), + cvf::Color3ub(0, 0, 255), + cvf::Color3ub(0, 127, 255), + cvf::Color3ub(0, 255, 255), + cvf::Color3ub(0, 255, 0), + cvf::Color3ub(255, 255, 0), + cvf::Color3ub(255, 127, 0), + cvf::Color3ub(255, 0, 0), + cvf::Color3ub(255, 0, 255) + }; + + static caf::ColorTable colorTable = caf::ColorTable(colors); + + return colorTable; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const caf::ColorTable& RiaColorTables::faultsPaletteColors() +{ + static std::vector colors{ + cvf::Color3ub(101, 132, 96), // Dark green + cvf::Color3ub(255, 131, 140), // Old pink + cvf::Color3ub(210, 176, 112), // Light Brown + cvf::Color3ub(140, 171, 238), // Light gray blue + cvf::Color3ub(255, 205, 131), // Peach + cvf::Color3ub(220, 212, 166), // Dark off white + cvf::Color3ub(130, 255, 120), // Light green + cvf::Color3ub(166, 220, 215), // Light gray torquise + cvf::Color3ub(168, 220, 166), // Light gray green + cvf::Color3ub(255, 64, 236) // Magneta + }; + + static caf::ColorTable colorTable = caf::ColorTable(colors); + + return colorTable; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const caf::ColorTable& RiaColorTables::wellsPaletteColors() +{ + return categoryPaletteColors(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const caf::ColorTable& RiaColorTables::summaryCurveDefaultPaletteColors() +{ + static std::vector colors{ + cvf::Color3ub( 0, 112, 136), // Dark Green-Blue + cvf::Color3ub(202, 0, 0), // Red + cvf::Color3ub( 78, 204, 0), // Clear Green + cvf::Color3ub(236, 118, 0), // Orange + cvf::Color3ub( 0, 0, 0), // Black + cvf::Color3ub( 56, 56, 255), // Vivid Blue + cvf::Color3ub(248, 0, 170), // Magenta + cvf::Color3ub(169, 2, 240), // Purple + cvf::Color3ub( 0, 221, 221), // Turquoise + cvf::Color3ub(201, 168, 206), // Light Violet + cvf::Color3ub( 0, 205, 68), // Bluish Green + cvf::Color3ub(236, 188, 0), // Mid Yellow + cvf::Color3ub( 51, 204, 255), // Bluer Turquoise + cvf::Color3ub(164, 193, 0), // Mid Yellowish Green + cvf::Color3ub( 0, 143, 239) // Dark Light Blue + }; + + static caf::ColorTable colorTable = caf::ColorTable(colors); + + return colorTable; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const caf::ColorTable& RiaColorTables::summaryCurveRedPaletteColors() +{ + static std::vector colors{ + cvf::Color3ub(202, 0, 0), // Off Red + cvf::Color3ub(255, 51, 51), // Bright Red + cvf::Color3ub(255, 102, 102) // Light Red + }; + + static caf::ColorTable colorTable = caf::ColorTable(colors); + + return colorTable; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const caf::ColorTable& RiaColorTables::summaryCurveGreenPaletteColors() +{ + static std::vector colors{ + cvf::Color3ub( 78, 204, 0), // Clear Green + cvf::Color3ub(164, 193, 0), // Mid Yellowish Green + cvf::Color3ub( 0, 205, 68) // Bluish Green + }; + + static caf::ColorTable colorTable = caf::ColorTable(colors); + + return colorTable; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const caf::ColorTable& RiaColorTables::summaryCurveBluePaletteColors() +{ + static std::vector colors{ + cvf::Color3ub( 56, 56, 255), // Vivid Blue + cvf::Color3ub( 0, 143, 239), // Dark Light Blue + cvf::Color3ub(153, 153, 255) // Off Light Blue + }; + + static caf::ColorTable colorTable = caf::ColorTable(colors); + + return colorTable; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const caf::ColorTable& RiaColorTables::summaryCurveBrownPaletteColors() +{ + static std::vector colors{ + cvf::Color3ub(186, 101, 44), + cvf::Color3ub( 99, 53, 23), // Highway Brown + cvf::Color3ub(103, 56, 24), // Dark Brown + }; + + static caf::ColorTable colorTable = caf::ColorTable(colors); + + return colorTable; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const caf::ColorTable& RiaColorTables::summaryCurveNoneRedGreenBlueBrownPaletteColors() +{ + static std::vector colors{ + cvf::Color3ub(236, 118, 0), // Orange + cvf::Color3ub( 0, 0, 0), // Black + cvf::Color3ub(248, 0, 170), // Magenta + cvf::Color3ub(236, 188, 0), // Mid Yellow + cvf::Color3ub(169, 2, 240), // Purple + cvf::Color3ub( 0, 221, 221), // Turquoise + cvf::Color3ub(201, 168, 206) // Light Violet + }; + + static caf::ColorTable colorTable = caf::ColorTable(colors); + + return colorTable; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const caf::ColorTable& RiaColorTables::wellLogPlotPaletteColors() +{ + static std::vector colors{ + caf::ColorTable::fromQColor(Qt::GlobalColor(Qt::black)), + caf::ColorTable::fromQColor(Qt::GlobalColor(Qt::darkBlue)), + caf::ColorTable::fromQColor(Qt::GlobalColor(Qt::darkRed)), + caf::ColorTable::fromQColor(Qt::GlobalColor(Qt::darkGreen)), + caf::ColorTable::fromQColor(Qt::GlobalColor(Qt::darkYellow)), + caf::ColorTable::fromQColor(Qt::GlobalColor(Qt::darkMagenta)), + caf::ColorTable::fromQColor(Qt::GlobalColor(Qt::darkCyan)), + caf::ColorTable::fromQColor(Qt::GlobalColor(Qt::darkGray)), + caf::ColorTable::fromQColor(Qt::GlobalColor(Qt::blue)), + caf::ColorTable::fromQColor(Qt::GlobalColor(Qt::red)), + caf::ColorTable::fromQColor(Qt::GlobalColor(Qt::green)), + caf::ColorTable::fromQColor(Qt::GlobalColor(Qt::yellow)), + caf::ColorTable::fromQColor(Qt::GlobalColor(Qt::magenta)), + caf::ColorTable::fromQColor(Qt::GlobalColor(Qt::cyan)), + caf::ColorTable::fromQColor(Qt::GlobalColor(Qt::gray)) + }; + + static caf::ColorTable colorTable = caf::ColorTable(colors); + + return colorTable; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const caf::ColorTable& RiaColorTables::selectionPaletteColors() +{ + static std::vector colors{ + caf::ColorTable::fromQColor(Qt::GlobalColor(Qt::magenta)), + caf::ColorTable::fromQColor(Qt::GlobalColor(Qt::cyan)), + caf::ColorTable::fromQColor(Qt::GlobalColor(Qt::blue)), + caf::ColorTable::fromQColor(Qt::GlobalColor(Qt::red)), + caf::ColorTable::fromQColor(Qt::GlobalColor(Qt::green)), + caf::ColorTable::fromQColor(Qt::GlobalColor(Qt::yellow)), + caf::ColorTable::fromQColor(Qt::GlobalColor(Qt::gray)) + }; + + static caf::ColorTable colorTable = caf::ColorTable(colors); + + return colorTable; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const caf::ColorTable& RiaColorTables::timestepsPaletteColors() +{ + static std::vector colors{ + cvf::Color3ub( 56, 56, 255), // Vivid Blue + cvf::Color3ub( 0, 143, 239), // Dark Light Blue + cvf::Color3ub( 0, 112, 136), // Dark Green-Blue + cvf::Color3ub( 51, 204, 255), // Bluer Turquoise + cvf::Color3ub( 0, 221, 221), // Turquoise + cvf::Color3ub( 0, 205, 68), // Bluish Green + cvf::Color3ub( 78, 204, 0), // Clear Green + cvf::Color3ub(164, 193, 0), // Mid Yellowish Green + cvf::Color3ub(236, 188, 0), // Mid Yellow + cvf::Color3ub(236, 118, 0), // Orange + cvf::Color3ub(202, 0, 0), // Red + cvf::Color3ub(248, 0, 170), // Magenta + cvf::Color3ub(201, 168, 206), // Light Violet + cvf::Color3ub(169, 2, 240), // Purple + }; + + static caf::ColorTable colorTable = caf::ColorTable(colors); + + return colorTable; +} diff --git a/ApplicationCode/Application/RiaColorTables.h b/ApplicationCode/Application/RiaColorTables.h new file mode 100644 index 0000000000..b40c3f95a1 --- /dev/null +++ b/ApplicationCode/Application/RiaColorTables.h @@ -0,0 +1,53 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafColorTable.h" + + +//================================================================================================== +/// +/// +//================================================================================================== +class RiaColorTables +{ +public: + static const caf::ColorTable& normalPaletteColors(); + static const caf::ColorTable& normalPaletteOppositeOrderingColors(); + static const caf::ColorTable& blackWhitePaletteColors(); + static const caf::ColorTable& whiteBlackPaletteColors(); + static const caf::ColorTable& pinkWhitePaletteColors(); + static const caf::ColorTable& whitePinkPaletteColors(); + static const caf::ColorTable& blueWhiteRedPaletteColors(); + static const caf::ColorTable& redWhiteBluePaletteColors(); + static const caf::ColorTable& categoryPaletteColors(); + static const caf::ColorTable& angularPaletteColors(); + static const caf::ColorTable& faultsPaletteColors(); + static const caf::ColorTable& wellsPaletteColors(); + static const caf::ColorTable& summaryCurveDefaultPaletteColors(); + static const caf::ColorTable& summaryCurveRedPaletteColors(); + static const caf::ColorTable& summaryCurveGreenPaletteColors(); + static const caf::ColorTable& summaryCurveBluePaletteColors(); + static const caf::ColorTable& summaryCurveBrownPaletteColors(); + static const caf::ColorTable& summaryCurveNoneRedGreenBlueBrownPaletteColors(); + static const caf::ColorTable& wellLogPlotPaletteColors(); + static const caf::ColorTable& selectionPaletteColors(); + static const caf::ColorTable& timestepsPaletteColors(); + +}; diff --git a/ApplicationCode/Application/RiaImageFileCompare.h b/ApplicationCode/Application/RiaImageFileCompare.h index 2ccbb357f0..e9f79054c1 100644 --- a/ApplicationCode/Application/RiaImageFileCompare.h +++ b/ApplicationCode/Application/RiaImageFileCompare.h @@ -36,7 +36,7 @@ class RiaImageFileCompare }; public: - RiaImageFileCompare(QString compareExecutable); + explicit RiaImageFileCompare(QString compareExecutable); ~RiaImageFileCompare(); bool runComparison(QString imgFileName, QString refFileName, QString diffFileName); diff --git a/ApplicationCode/Application/RiaLogging.cpp b/ApplicationCode/Application/RiaLogging.cpp new file mode 100644 index 0000000000..ed0f5a6f06 --- /dev/null +++ b/ApplicationCode/Application/RiaLogging.cpp @@ -0,0 +1,252 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RiaLogging.h" + +#include + +#ifdef WIN32 +#pragma warning (push) +#pragma warning (disable: 4668) +#include +#pragma warning (pop) +#else +#include +#include +#endif + +#include "QString" + + + + +//================================================================================================== +// +// +// +//================================================================================================== +class RiaDefaultConsoleLogger : public RiaLogger +{ +public: + RiaDefaultConsoleLogger(); + + virtual int level() const override; + virtual void setLevel(int logLevel) override; + virtual void error( const char* message) override; + virtual void warning(const char* message) override; + virtual void info( const char* message) override; + virtual void debug( const char* message) override; + +private: + static void writeMessageToConsole(const char* prefix, const char* message); + static void writeToConsole(const std::string& str); + +private: + int m_logLevel; +}; + + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiaDefaultConsoleLogger::RiaDefaultConsoleLogger() + : m_logLevel(RI_LL_WARNING) +{ +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +int RiaDefaultConsoleLogger::level() const +{ + return m_logLevel; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaDefaultConsoleLogger::setLevel(int logLevel) +{ + m_logLevel = logLevel; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaDefaultConsoleLogger::error(const char* message) +{ + writeMessageToConsole("ERROR: ", message); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaDefaultConsoleLogger::warning(const char* message) +{ + writeMessageToConsole("warn: ", message); +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaDefaultConsoleLogger::info(const char* message) +{ + writeMessageToConsole("info: ", message); +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaDefaultConsoleLogger::debug(const char* message) +{ + writeMessageToConsole("debug: ", message); +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaDefaultConsoleLogger::writeMessageToConsole(const char* prefix, const char* message) +{ + std::ostringstream oss; + +// VF_ASSERT(prefix); + oss << prefix; + + if (message) + { + oss << message << std::endl; + } + else + { + oss << "" << std::endl; + } + + writeToConsole(oss.str()); +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaDefaultConsoleLogger::writeToConsole(const std::string& str) +{ +#ifdef WIN32 + AllocConsole(); + HANDLE hStdOutputHandle = GetStdHandle(STD_OUTPUT_HANDLE); + if (hStdOutputHandle) + { + DWORD stringLength = static_cast(str.length()); + + unsigned long iDum = 0; + WriteConsoleA(hStdOutputHandle, str.c_str(), stringLength, &iDum, NULL); + } +#else + fputs(str.c_str(), stderr); +#endif +} + +//================================================================================================== +// +// +// +//================================================================================================== + +RiaLogger* RiaLogging::sm_logger = new RiaDefaultConsoleLogger; + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiaLogger* RiaLogging::loggerInstance() +{ + return sm_logger; +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaLogging::setLoggerInstance(RiaLogger* loggerInstance) +{ + // Only delete if we're currently using our own default impl + if (dynamic_cast(sm_logger)) + { + delete sm_logger; + } + +// VF_ASSERT(loggerInstance); + sm_logger = loggerInstance; +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaLogging::deleteLoggerInstance() +{ + delete sm_logger; + sm_logger = NULL; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaLogging::error(const QString& message) +{ + if (sm_logger && sm_logger->level() >= RI_LL_ERROR) + { + sm_logger->error(message.toLatin1().constData()); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaLogging::warning(const QString& message) +{ + if (sm_logger && sm_logger->level() >= RI_LL_WARNING) + { + sm_logger->warning(message.toLatin1().constData()); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaLogging::info(const QString& message) +{ + if (sm_logger && sm_logger->level() >= RI_LL_INFO) + { + sm_logger->info(message.toLatin1().constData()); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaLogging::debug(const QString& message) +{ + if (sm_logger && sm_logger->level() >= RI_LL_DEBUG) + { + sm_logger->debug(message.toLatin1().constData()); + } +} + diff --git a/ApplicationCode/Application/RiaLogging.h b/ApplicationCode/Application/RiaLogging.h new file mode 100644 index 0000000000..3a9ce668e3 --- /dev/null +++ b/ApplicationCode/Application/RiaLogging.h @@ -0,0 +1,74 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +class QString; + +enum RILogLevel +{ + RI_LL_ERROR = 1, + RI_LL_WARNING = 2, + RI_LL_INFO = 3, + RI_LL_DEBUG = 4 +}; + + + +//================================================================================================== +// +// Logger interface for the application +// +//================================================================================================== +class RiaLogger +{ +public: + virtual ~RiaLogger() {} + + virtual int level() const = 0; + virtual void setLevel(int logLevel) = 0; + + virtual void error( const char* message) = 0; + virtual void warning(const char* message) = 0; + virtual void info( const char* message) = 0; + virtual void debug( const char* message) = 0; +}; + + + +//================================================================================================== +// +// +// +//================================================================================================== +class RiaLogging +{ +public: + static RiaLogger* loggerInstance(); + static void setLoggerInstance(RiaLogger* loggerInstance); + static void deleteLoggerInstance(); + + static void error( const QString& message); + static void warning(const QString& message); + static void info( const QString& message); + static void debug( const QString& message); + +private: + static RiaLogger* sm_logger; +}; + diff --git a/ApplicationCode/Application/RiaPreferences.cpp b/ApplicationCode/Application/RiaPreferences.cpp index 15eea4ff20..6816ab4cae 100644 --- a/ApplicationCode/Application/RiaPreferences.cpp +++ b/ApplicationCode/Application/RiaPreferences.cpp @@ -33,7 +33,7 @@ CAF_PDM_SOURCE_INIT(RiaPreferences, "RiaPreferences"); //-------------------------------------------------------------------------------------------------- RiaPreferences::RiaPreferences(void) { - CAF_PDM_InitField(&navigationPolicy, "navigationPolicy", caf::AppEnum(RiaApplication::NAVIGATION_POLICY_CEETRON), "Navigation mode", "", "", ""); + CAF_PDM_InitField(&navigationPolicy, "navigationPolicy", caf::AppEnum(RiaApplication::NAVIGATION_POLICY_CEETRON), "Navigation Mode", "", "", ""); CAF_PDM_InitFieldNoDefault(&scriptDirectories, "scriptDirectory", "Shared Script Folder(s)", "", "", ""); scriptDirectories.uiCapability()->setUiEditorTypeName(caf::PdmUiFilePathEditor::uiEditorTypeName()); @@ -41,27 +41,27 @@ RiaPreferences::RiaPreferences(void) CAF_PDM_InitField(&scriptEditorExecutable, "scriptEditorExecutable", QString("kate"), "Script Editor", "", "", ""); scriptEditorExecutable.uiCapability()->setUiEditorTypeName(caf::PdmUiFilePathEditor::uiEditorTypeName()); - CAF_PDM_InitField(&octaveExecutable, "octaveExecutable", QString("octave"), "Octave executable location", "", "", ""); + CAF_PDM_InitField(&octaveExecutable, "octaveExecutable", QString("octave"), "Octave Executable Location", "", "", ""); octaveExecutable.uiCapability()->setUiEditorTypeName(caf::PdmUiFilePathEditor::uiEditorTypeName()); octaveExecutable.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::TOP); - CAF_PDM_InitField(&octaveShowHeaderInfoWhenExecutingScripts, "octaveShowHeaderInfoWhenExecutingScripts", false, "Show text header when executing scripts", "", "", ""); + CAF_PDM_InitField(&octaveShowHeaderInfoWhenExecutingScripts, "octaveShowHeaderInfoWhenExecutingScripts", false, "Show Text Header When Executing Scripts", "", "", ""); octaveShowHeaderInfoWhenExecutingScripts.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN); - CAF_PDM_InitField(&ssihubAddress, "ssihubAddress", QString("http://"), "ssihub Address", "", "", ""); + CAF_PDM_InitField(&ssihubAddress, "ssihubAddress", QString("http://"), "SSIHUB Address", "", "", ""); ssihubAddress.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::TOP); CAF_PDM_InitField(&defaultGridLines, "defaultGridLines", true, "Gridlines", "", "", ""); - CAF_PDM_InitField(&defaultGridLineColors, "defaultGridLineColors", cvf::Color3f(0.92f, 0.92f, 0.92f), "Mesh color", "", "", ""); - CAF_PDM_InitField(&defaultFaultGridLineColors, "defaultFaultGridLineColors", cvf::Color3f(0.08f, 0.08f, 0.08f), "Mesh color along faults", "", "", ""); - CAF_PDM_InitField(&defaultWellLabelColor, "defaultWellLableColor", cvf::Color3f(0.92f, 0.92f, 0.92f), "Well label color", "", "The default well label color in new views", ""); + CAF_PDM_InitField(&defaultGridLineColors, "defaultGridLineColors", cvf::Color3f(0.92f, 0.92f, 0.92f), "Mesh Color", "", "", ""); + CAF_PDM_InitField(&defaultFaultGridLineColors, "defaultFaultGridLineColors", cvf::Color3f(0.08f, 0.08f, 0.08f), "Mesh Color Along Faults", "", "", ""); + CAF_PDM_InitField(&defaultWellLabelColor, "defaultWellLableColor", cvf::Color3f(0.92f, 0.92f, 0.92f), "Well Label Color", "", "The default well label color in new views", ""); - CAF_PDM_InitField(&defaultViewerBackgroundColor, "defaultViewerBackgroundColor", cvf::Color3f(0.69f, 0.77f, 0.87f), "Viewer background", "", "The viewer background color for new views", ""); + CAF_PDM_InitField(&defaultViewerBackgroundColor, "defaultViewerBackgroundColor", cvf::Color3f(0.69f, 0.77f, 0.87f), "Viewer Background", "", "The viewer background color for new views", ""); - CAF_PDM_InitField(&defaultScaleFactorZ, "defaultScaleFactorZ", 5, "Default Z scale factor", "", "", ""); - CAF_PDM_InitField(&fontSizeInScene, "fontSizeInScene", QString("8"), "Font size", "", "", ""); + CAF_PDM_InitField(&defaultScaleFactorZ, "defaultScaleFactorZ", 5, "Default Z Scale Factor", "", "", ""); + CAF_PDM_InitField(&fontSizeInScene, "fontSizeInScene", QString("8"), "Font Size", "", "", ""); - CAF_PDM_InitField(&showLasCurveWithoutTvdWarning, "showLasCurveWithoutTvdWarning", true, "Show LAS curve without TVD warning", "", "", ""); + CAF_PDM_InitField(&showLasCurveWithoutTvdWarning, "showLasCurveWithoutTvdWarning", true, "Show LAS Curve Without TVD Warning", "", "", ""); showLasCurveWithoutTvdWarning.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN); CAF_PDM_InitField(&useShaders, "useShaders", true, "Use Shaders", "", "", ""); @@ -77,21 +77,22 @@ RiaPreferences::RiaPreferences(void) CAF_PDM_InitFieldNoDefault(&lastUsedProjectFileName,"lastUsedProjectFileName", "Last Used Project File", "", "", ""); lastUsedProjectFileName.uiCapability()->setUiHidden(true); - CAF_PDM_InitField(&autocomputeDepthRelatedProperties, "autocomputeDepth", true, "Compute DEPTH related properties", "", "DEPTH, DX, DY, DZ, TOP, BOTTOM", ""); + CAF_PDM_InitField(&autocomputeDepthRelatedProperties, "autocomputeDepth", true, "Compute DEPTH Related Properties", "", "DEPTH, DX, DY, DZ, TOP, BOTTOM", ""); autocomputeDepthRelatedProperties.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN); - CAF_PDM_InitField(&loadAndShowSoil, "loadAndShowSoil", true, "Load and show SOIL", "", "", ""); + CAF_PDM_InitField(&loadAndShowSoil, "loadAndShowSoil", true, "Load and Show SOIL", "", "", ""); loadAndShowSoil.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN); - CAF_PDM_InitFieldNoDefault(&readerSettings, "readerSettings", "Reader settings", "", "", ""); + CAF_PDM_InitFieldNoDefault(&readerSettings, "readerSettings", "Reader Settings", "", "", ""); readerSettings = new RifReaderSettings; - CAF_PDM_InitField(&autoCreatePlotsOnImport, "AutoCreatePlotsOnImport", true, "Create Summary Plots When Importing Eclipse Case", "", "", ""); + CAF_PDM_InitField(&autoCreatePlotsOnImport, "AutoCreatePlotsOnImport", true, "Automatically Create Summary Plots On Import", "", "", ""); autoCreatePlotsOnImport.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN); CAF_PDM_InitField(&defaultCurveFilter, "DefaultCurveFilter", QString("F*PT"), "Default Vector Selection Filter", "", "", ""); m_tabNames << "General"; + m_tabNames << "Eclipse"; m_tabNames << "Octave"; m_tabNames << "Summary"; } @@ -113,7 +114,7 @@ void RiaPreferences::defineEditorAttribute(const caf::PdmFieldHandle* field, QSt if (field == &scriptDirectories) { - caf::PdmUiFilePathEditorAttribute* myAttr = static_cast(attribute); + caf::PdmUiFilePathEditorAttribute* myAttr = dynamic_cast(attribute); if (myAttr) { myAttr->m_selectDirectory = true; @@ -129,7 +130,7 @@ void RiaPreferences::defineEditorAttribute(const caf::PdmFieldHandle* field, QSt field == &showLasCurveWithoutTvdWarning || field == &autoCreatePlotsOnImport) { - caf::PdmUiCheckBoxEditorAttribute* myAttr = static_cast(attribute); + caf::PdmUiCheckBoxEditorAttribute* myAttr = dynamic_cast(attribute); if (myAttr) { myAttr->m_useNativeCheckBoxLabel = true; @@ -144,38 +145,36 @@ void RiaPreferences::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& { if (uiConfigName == m_tabNames[0]) { - caf::PdmUiGroup* defaultSettingsGroup = uiOrdering.addNewGroup("Default settings"); + caf::PdmUiGroup* defaultSettingsGroup = uiOrdering.addNewGroup("Default Settings"); defaultSettingsGroup->add(&defaultViewerBackgroundColor); defaultSettingsGroup->add(&defaultGridLines); defaultSettingsGroup->add(&defaultGridLineColors); defaultSettingsGroup->add(&defaultFaultGridLineColors); defaultSettingsGroup->add(&defaultWellLabelColor); defaultSettingsGroup->add(&fontSizeInScene); + defaultSettingsGroup->add(&defaultScaleFactorZ); - caf::PdmUiGroup* viewsGroup = uiOrdering.addNewGroup("3D views"); + caf::PdmUiGroup* viewsGroup = uiOrdering.addNewGroup("3D Views"); viewsGroup->add(&navigationPolicy); viewsGroup->add(&useShaders); viewsGroup->add(&showHud); - caf::PdmUiGroup* newCaseBehaviourGroup = uiOrdering.addNewGroup("Behavior when loading new case"); - newCaseBehaviourGroup->add(&defaultScaleFactorZ); - newCaseBehaviourGroup->add(&autocomputeDepthRelatedProperties); - newCaseBehaviourGroup->add(&loadAndShowSoil); - newCaseBehaviourGroup->add(&showLasCurveWithoutTvdWarning); - - std::vector readerSettingsFields; - readerSettings->fields(readerSettingsFields); - for (size_t i = 0; i < readerSettingsFields.size(); i++) - { - newCaseBehaviourGroup->add(readerSettingsFields[i]); - } - caf::PdmUiGroup* ssihubGroup = uiOrdering.addNewGroup("SSIHUB"); - ssihubGroup->add(&ssihubAddress); + caf::PdmUiGroup* otherGroup = uiOrdering.addNewGroup("Other"); + otherGroup->add(&ssihubAddress); + otherGroup->add(&showLasCurveWithoutTvdWarning); uiOrdering.add(&appendClassNameToUiText); } else if (uiConfigName == m_tabNames[1]) + { + caf::PdmUiGroup* newCaseBehaviourGroup = uiOrdering.addNewGroup("Behavior When Loading Data"); + newCaseBehaviourGroup->add(&autocomputeDepthRelatedProperties); + newCaseBehaviourGroup->add(&loadAndShowSoil); + + readerSettings->defineUiOrdering(uiConfigName, *newCaseBehaviourGroup); + } + else if (uiConfigName == m_tabNames[2]) { caf::PdmUiGroup* octaveGroup = uiOrdering.addNewGroup("Octave"); octaveGroup->add(&octaveExecutable); @@ -185,13 +184,13 @@ void RiaPreferences::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& scriptGroup->add(&scriptDirectories); scriptGroup->add(&scriptEditorExecutable); } - else if (uiConfigName == m_tabNames[2]) + else if (uiConfigName == m_tabNames[3]) { uiOrdering.add(&autoCreatePlotsOnImport); uiOrdering.add(&defaultCurveFilter); } - uiOrdering.setForgetRemainingFields(true); + uiOrdering.skipRemainingFields(true); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/Application/RiaRegressionTest.cpp b/ApplicationCode/Application/RiaRegressionTest.cpp index f05e1f28e6..ce54c33d17 100644 --- a/ApplicationCode/Application/RiaRegressionTest.cpp +++ b/ApplicationCode/Application/RiaRegressionTest.cpp @@ -51,7 +51,7 @@ void RiaRegressionTest::defineEditorAttribute(const caf::PdmFieldHandle* field, { if (field == &applicationWorkingFolder || field == ®ressionTestFolder) { - caf::PdmUiFilePathEditorAttribute* myAttr = static_cast(attribute); + caf::PdmUiFilePathEditorAttribute* myAttr = dynamic_cast(attribute); if (myAttr) { myAttr->m_selectDirectory = true; diff --git a/ApplicationCode/CMakeLists.txt b/ApplicationCode/CMakeLists.txt index 1269c7b3af..c1ec89d9a5 100644 --- a/ApplicationCode/CMakeLists.txt +++ b/ApplicationCode/CMakeLists.txt @@ -29,10 +29,10 @@ include_directories( ${ResInsight_SOURCE_DIR}/ThirdParty/Qwt/src ${ERT_INCLUDE_DIRS} - ${Boost_INCLUDE_DIRS} - ${ResInsight_SOURCE_DIR}/ThirdParty/custom-opm-common/opm-common/ - ${custom-opm-parser_SOURCE_DIR}/opm-parser/ + ${boost-Subset_SOURCE_DIR} ${custom-opm-flowdiagnostics_SOURCE_DIR}/opm-flowdiagnostics/ + ${custom-opm-flowdiag-app_SOURCE_DIR}/opm-flowdiagnostics-applications/ + ${custom-opm-flowdiag-app_SOURCE_DIR}/opmCore ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/Adm @@ -45,8 +45,11 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/ModelVisualization/GridBox ${CMAKE_CURRENT_SOURCE_DIR}/ModelVisualization/Intersections ${CMAKE_CURRENT_SOURCE_DIR}/UserInterface + ${CMAKE_CURRENT_SOURCE_DIR}/ProjectDataModel ${CMAKE_CURRENT_SOURCE_DIR}/ProjectDataModel/Summary + ${CMAKE_CURRENT_SOURCE_DIR}/ProjectDataModel/Flow + ${CMAKE_CURRENT_SOURCE_DIR}/ResultStatisticsCache ${CMAKE_CURRENT_SOURCE_DIR}/ReservoirDataModel ${CMAKE_CURRENT_SOURCE_DIR}/WellPathImportSsihub @@ -74,6 +77,9 @@ set( APPLICATION_FILES Application/RiaImageCompareReporter.cpp Application/RiaProjectModifier.cpp Application/RiaRegressionTest.cpp + Application/RiaColorTables.cpp + Application/RiaLogging.h + Application/RiaLogging.cpp ) set( SOCKET_INTERFACE_FILES @@ -100,6 +106,7 @@ list( APPEND REFERENCED_CMAKE_FILES ProjectDataModel/CMakeLists_files.cmake ProjectDataModel/Summary/CMakeLists_files.cmake + ProjectDataModel/Flow/CMakeLists_files.cmake GeoMech/GeoMechVisualization/CMakeLists_files.cmake @@ -113,6 +120,8 @@ list( APPEND REFERENCED_CMAKE_FILES Commands/ApplicationCommands/CMakeLists_files.cmake Commands/CrossSectionCommands/CMakeLists_files.cmake Commands/EclipseCommands/CMakeLists_files.cmake + Commands/EclipseCommands/EclipseWell/CMakeLists_files.cmake + Commands/FlowCommands/CMakeLists_files.cmake Commands/IntersectionBoxCommands/CMakeLists_files.cmake Commands/OctaveScriptCommands/CMakeLists_files.cmake Commands/OperationsUsingObjReferences/CMakeLists_files.cmake @@ -267,23 +276,8 @@ endif () # Set up libraries and dependent projects to link with ############################################################################# -if (MSVC) - set (RI_BOOST_LIBRARIES - debug ${Boost_SYSTEM_LIBRARY_DEBUG} - optimized ${Boost_SYSTEM_LIBRARY_RELEASE} - debug ${Boost_FILESYSTEM_LIBRARY_DEBUG} - optimized ${Boost_FILESYSTEM_LIBRARY_RELEASE} - debug ${Boost_REGEX_LIBRARY_DEBUG} - optimized ${Boost_REGEX_LIBRARY_RELEASE} - ) -else() - set (RI_BOOST_LIBRARIES ${Boost_LIBRARIES}) -endif() - - set( LINK_LIBRARIES - custom-opm-parser - custom-opm-flowdiagnostics + ${OPM_LIBRARIES} WellPathImportSsihub @@ -295,15 +289,12 @@ set( LINK_LIBRARIES ${ERT_LIBRARIES} - NRLib + ${THIRD_PARTY_LIBRARIES} ${OPENGL_LIBRARIES} ${QT_LIBRARIES} - - ${RI_BOOST_LIBRARIES} - - Qwt ) + set( EXTERNAL_LINK_LIBRARIES ${ERT_LIBRARY_LIST} ) # According to ivarun this is needed on OpenSuse, and Fedora. See: https://github.com/OPM/ResInsight/pull/7 @@ -332,9 +323,6 @@ if(RESINSIGHT_ENABLE_COTIRE) # multiple QRC files are not supported set_source_files_properties (qrc_cafAnimControl.cxx PROPERTIES COTIRE_EXCLUDED TRUE) - - # TODO: Revisit why opm-parser is not working - set_source_files_properties (UnitTests/opm-parser-Test.cpp PROPERTIES COTIRE_EXCLUDED TRUE) # variables at global file scope set_source_files_properties (ModelVisualization/Intersections/RivIntersectionGeometryGenerator.cpp PROPERTIES COTIRE_EXCLUDED TRUE) @@ -347,13 +335,9 @@ if(RESINSIGHT_ENABLE_COTIRE) # using namespace cvf set_source_files_properties (GeoMech/GeoMechVisualization/RivFemPartGeometryGenerator.cpp PROPERTIES COTIRE_EXCLUDED TRUE) set_source_files_properties (UnitTests/cvfGeometryTools-Test.cpp PROPERTIES COTIRE_EXCLUDED TRUE) - set_source_files_properties (UnitTests/opm-parser-Performance-Test.cpp PROPERTIES COTIRE_EXCLUDED TRUE) # opm parser - set_source_files_properties (FileInterface/RifReaderOpmParserInput.cpp PROPERTIES COTIRE_EXCLUDED TRUE) set_source_files_properties (ProjectDataModel/RimProject.cpp PROPERTIES COTIRE_EXCLUDED TRUE) - set_source_files_properties (UnitTests/opm-parser-Performance-Test.cpp PROPERTIES COTIRE_EXCLUDED TRUE) - set_source_files_properties (UnitTests/opm-Test.cpp PROPERTIES COTIRE_EXCLUDED TRUE) set_target_properties(ResInsight PROPERTIES COTIRE_ENABLE_PRECOMPILED_HEADER FALSE) @@ -452,21 +436,11 @@ if (RESINSIGHT_PRIVATE_INSTALL) set_target_properties (ResInsight PROPERTIES INSTALL_RPATH "${RESINSIGHT_INSTALL_RPATH}") - # Find Qt libraries and sym links - file (GLOB RESINSIGHT_FILES - ${QT_LIBRARY_DIR}/libQtCore.so* - ${QT_LIBRARY_DIR}/libQtGui.so* - ${QT_LIBRARY_DIR}/libQtOpenGL.so* - ${QT_LIBRARY_DIR}/libQtNetwork.so* - ${QT_LIBRARY_DIR}/libQtScript.so* - ${QT_LIBRARY_DIR}/libQtScriptTools.so* - ) - endif() if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") # put a .exe.local file in the target directory to pick up DLLs from there - install (CODE "exec_program (${CMAKE_COMMAND} ARGS -E touch \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}${RESINSIGHT_FINAL_NAME}/ResInsight${CMAKE_EXECUTABLE_SUFFIX}.local)") + install (CODE "exec_program (\"${CMAKE_COMMAND}\" ARGS -E touch \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}ResInsight${CMAKE_EXECUTABLE_SUFFIX}.local)") set (RESINSIGHT_FILES ${QT_BINARY_DIR}/QtCore4.dll @@ -485,19 +459,19 @@ if (RESINSIGHT_PRIVATE_INSTALL) set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP ON) set(CMAKE_INSTALL_OPENMP_LIBRARIES ON) include(InstallRequiredSystemLibraries) - install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION ${RESINSIGHT_FINAL_NAME}) + install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION ${RESINSIGHT_INSTALL_FOLDER}) endif() set (RESINSIGHT_FILES ${RESINSIGHT_FILES} ${RESINSIGHT_LICENSE_FILES}) - install(TARGETS ResInsight DESTINATION ${RESINSIGHT_FINAL_NAME}) + install(TARGETS ResInsight DESTINATION ${RESINSIGHT_INSTALL_FOLDER}) - install(FILES ${RESINSIGHT_FILES} DESTINATION ${RESINSIGHT_FINAL_NAME} ) + install(FILES ${RESINSIGHT_FILES} DESTINATION ${RESINSIGHT_INSTALL_FOLDER} ) if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") - install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resinsight DESTINATION ${RESINSIGHT_FINAL_NAME} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE ) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resinsight DESTINATION ${RESINSIGHT_INSTALL_FOLDER} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE ) endif() else (RESINSIGHT_PRIVATE_INSTALL) diff --git a/ApplicationCode/Commands/ApplicationCommands/CMakeLists_files.cmake b/ApplicationCode/Commands/ApplicationCommands/CMakeLists_files.cmake index c93e9cf97b..858000503d 100644 --- a/ApplicationCode/Commands/ApplicationCommands/CMakeLists_files.cmake +++ b/ApplicationCode/Commands/ApplicationCommands/CMakeLists_files.cmake @@ -17,6 +17,7 @@ ${CEE_CURRENT_LIST_DIR}RicExitApplicationFeature.h ${CEE_CURRENT_LIST_DIR}RicCloseProjectFeature.h ${CEE_CURRENT_LIST_DIR}RicHelpFeatures.h ${CEE_CURRENT_LIST_DIR}RicEditPreferencesFeature.h +${CEE_CURRENT_LIST_DIR}RicShowPlotDataFeature.h ) set (SOURCE_GROUP_SOURCE_FILES @@ -32,6 +33,7 @@ ${CEE_CURRENT_LIST_DIR}RicExitApplicationFeature.cpp ${CEE_CURRENT_LIST_DIR}RicCloseProjectFeature.cpp ${CEE_CURRENT_LIST_DIR}RicHelpFeatures.cpp ${CEE_CURRENT_LIST_DIR}RicEditPreferencesFeature.cpp +${CEE_CURRENT_LIST_DIR}RicShowPlotDataFeature.cpp ) list(APPEND CODE_HEADER_FILES @@ -42,10 +44,10 @@ list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES} ) -#set (QT_MOC_HEADERS -#${QT_MOC_HEADERS} -#${CEE_CURRENT_LIST_DIR}RicBoxManipulatorEventHandler.h -#) +set (QT_MOC_HEADERS +${QT_MOC_HEADERS} +${CEE_CURRENT_LIST_DIR}RicShowPlotDataFeature.h +) source_group( "CommandFeature\\Application" FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} ${CEE_CURRENT_LIST_DIR}CMakeLists_files.cmake ) diff --git a/ApplicationCode/Commands/ApplicationCommands/RicCloseProjectFeature.cpp b/ApplicationCode/Commands/ApplicationCommands/RicCloseProjectFeature.cpp index be166c4449..30c1fd1612 100644 --- a/ApplicationCode/Commands/ApplicationCommands/RicCloseProjectFeature.cpp +++ b/ApplicationCode/Commands/ApplicationCommands/RicCloseProjectFeature.cpp @@ -37,8 +37,12 @@ bool RicCloseProjectFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicCloseProjectFeature::onActionTriggered(bool isChecked) { + this->disableModelChangeContribution(); + RiaApplication* app = RiaApplication::instance(); + if (!app->askUserToSaveModifiedProject()) return; + app->closeProject(); } diff --git a/ApplicationCode/Commands/ApplicationCommands/RicEditPreferencesFeature.cpp b/ApplicationCode/Commands/ApplicationCommands/RicEditPreferencesFeature.cpp index 7fecdbba4e..28e668088b 100644 --- a/ApplicationCode/Commands/ApplicationCommands/RicEditPreferencesFeature.cpp +++ b/ApplicationCode/Commands/ApplicationCommands/RicEditPreferencesFeature.cpp @@ -42,6 +42,8 @@ bool RicEditPreferencesFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicEditPreferencesFeature::onActionTriggered(bool isChecked) { + this->disableModelChangeContribution(); + RiaApplication* app = RiaApplication::instance(); QStringList tabNames = app->preferences()->tabNames(); diff --git a/ApplicationCode/Commands/ApplicationCommands/RicExitApplicationFeature.cpp b/ApplicationCode/Commands/ApplicationCommands/RicExitApplicationFeature.cpp index 9c206256f0..24aaa0dd11 100644 --- a/ApplicationCode/Commands/ApplicationCommands/RicExitApplicationFeature.cpp +++ b/ApplicationCode/Commands/ApplicationCommands/RicExitApplicationFeature.cpp @@ -37,7 +37,11 @@ bool RicExitApplicationFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicExitApplicationFeature::onActionTriggered(bool isChecked) { + this->disableModelChangeContribution(); + RiaApplication* app = RiaApplication::instance(); + if (!app->askUserToSaveModifiedProject()) return; + app->closeAllWindows(); } @@ -47,4 +51,5 @@ void RicExitApplicationFeature::onActionTriggered(bool isChecked) void RicExitApplicationFeature::setupActionLook(QAction* actionToSetup) { actionToSetup->setText("E&xit"); + actionToSetup->setShortcuts(QKeySequence::Quit); } diff --git a/ApplicationCode/Commands/ApplicationCommands/RicHelpFeatures.cpp b/ApplicationCode/Commands/ApplicationCommands/RicHelpFeatures.cpp index 80dc2d4713..e97a449ac0 100644 --- a/ApplicationCode/Commands/ApplicationCommands/RicHelpFeatures.cpp +++ b/ApplicationCode/Commands/ApplicationCommands/RicHelpFeatures.cpp @@ -48,6 +48,8 @@ bool RicHelpAboutFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicHelpAboutFeature::onActionTriggered(bool isChecked) { + this->disableModelChangeContribution(); + caf::AboutDialog dlg(NULL); dlg.setApplicationName(RI_APPLICATION_NAME); @@ -100,6 +102,8 @@ bool RicHelpCommandLineFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicHelpCommandLineFeature::onActionTriggered(bool isChecked) { + this->disableModelChangeContribution(); + RiaApplication* app = RiaApplication::instance(); QString text = app->commandLineParameterHelp(); app->showFormattedTextInMessageBox(text); @@ -131,6 +135,8 @@ bool RicHelpOpenUsersGuideFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicHelpOpenUsersGuideFeature::onActionTriggered(bool isChecked) { + this->disableModelChangeContribution(); + QString usersGuideUrl = "http://resinsight.org/docs/home"; if (!QDesktopServices::openUrl(usersGuideUrl)) diff --git a/ApplicationCode/Commands/ApplicationCommands/RicLaunchUnitTestsFeature.cpp b/ApplicationCode/Commands/ApplicationCommands/RicLaunchUnitTestsFeature.cpp index 1a3079390b..e7123bc7f1 100644 --- a/ApplicationCode/Commands/ApplicationCommands/RicLaunchUnitTestsFeature.cpp +++ b/ApplicationCode/Commands/ApplicationCommands/RicLaunchUnitTestsFeature.cpp @@ -39,6 +39,8 @@ bool RicLaunchUnitTestsFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicLaunchUnitTestsFeature::onActionTriggered(bool isChecked) { + this->disableModelChangeContribution(); + RiaApplication::instance()->launchUnitTestsWithConsole(); } diff --git a/ApplicationCode/Commands/ApplicationCommands/RicOpenLastUsedFileFeature.cpp b/ApplicationCode/Commands/ApplicationCommands/RicOpenLastUsedFileFeature.cpp index 2bc4e7662f..70c7580d35 100644 --- a/ApplicationCode/Commands/ApplicationCommands/RicOpenLastUsedFileFeature.cpp +++ b/ApplicationCode/Commands/ApplicationCommands/RicOpenLastUsedFileFeature.cpp @@ -41,6 +41,9 @@ bool RicOpenLastUsedFileFeature::isCommandEnabled() void RicOpenLastUsedFileFeature::onActionTriggered(bool isChecked) { RiaApplication* app = RiaApplication::instance(); + + if (!app->askUserToSaveModifiedProject()) return; + QString fileName = app->preferences()->lastUsedProjectFileName; if (app->loadProject(fileName)) diff --git a/ApplicationCode/Commands/ApplicationCommands/RicOpenProjectFeature.cpp b/ApplicationCode/Commands/ApplicationCommands/RicOpenProjectFeature.cpp index bd13d777c9..64f5da34df 100644 --- a/ApplicationCode/Commands/ApplicationCommands/RicOpenProjectFeature.cpp +++ b/ApplicationCode/Commands/ApplicationCommands/RicOpenProjectFeature.cpp @@ -42,6 +42,9 @@ bool RicOpenProjectFeature::isCommandEnabled() void RicOpenProjectFeature::onActionTriggered(bool isChecked) { RiaApplication* app = RiaApplication::instance(); + + if (!app->askUserToSaveModifiedProject()) return; + QString defaultDir = app->lastUsedDialogDirectory("BINARY_GRID"); QString fileName = QFileDialog::getOpenFileName(NULL, "Open ResInsight Project", defaultDir, "ResInsight project (*.rsp *.rip);;All files(*.*)"); @@ -63,4 +66,5 @@ void RicOpenProjectFeature::setupActionLook(QAction* actionToSetup) { actionToSetup->setText("Open Project"); actionToSetup->setIcon(QIcon(":/openFolder24x24.png")); + actionToSetup->setShortcuts(QKeySequence::Open); } diff --git a/ApplicationCode/Commands/ApplicationCommands/RicSaveProjectAsFeature.cpp b/ApplicationCode/Commands/ApplicationCommands/RicSaveProjectAsFeature.cpp index e06e998393..a8616fb13e 100644 --- a/ApplicationCode/Commands/ApplicationCommands/RicSaveProjectAsFeature.cpp +++ b/ApplicationCode/Commands/ApplicationCommands/RicSaveProjectAsFeature.cpp @@ -40,9 +40,9 @@ bool RicSaveProjectAsFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicSaveProjectAsFeature::onActionTriggered(bool isChecked) { - RiaApplication* app = RiaApplication::instance(); + this->disableModelChangeContribution(); - RicSaveProjectFeature::storeTreeViewState(); + RiaApplication* app = RiaApplication::instance(); app->saveProjectPromptForFileName(); } @@ -54,4 +54,5 @@ void RicSaveProjectAsFeature::setupActionLook(QAction* actionToSetup) { actionToSetup->setText("Save Project &As"); actionToSetup->setIcon(QIcon(":/Save.png")); + actionToSetup->setShortcuts(QKeySequence::SaveAs); } diff --git a/ApplicationCode/Commands/ApplicationCommands/RicSaveProjectFeature.cpp b/ApplicationCode/Commands/ApplicationCommands/RicSaveProjectFeature.cpp index 76be1bab22..8a5c33c660 100644 --- a/ApplicationCode/Commands/ApplicationCommands/RicSaveProjectFeature.cpp +++ b/ApplicationCode/Commands/ApplicationCommands/RicSaveProjectFeature.cpp @@ -20,16 +20,7 @@ #include "RiaApplication.h" -#include "RimTreeViewStateSerializer.h" -#include "RimProject.h" - -#include "RiuMainWindow.h" -#include "RiuMainPlotWindow.h" - -#include "cafPdmUiTreeView.h" - #include -#include CAF_CMD_SOURCE_INIT(RicSaveProjectFeature, "RicSaveProjectFeature"); @@ -46,9 +37,9 @@ bool RicSaveProjectFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicSaveProjectFeature::onActionTriggered(bool isChecked) { - RiaApplication* app = RiaApplication::instance(); + this->disableModelChangeContribution(); - RicSaveProjectFeature::storeTreeViewState(); + RiaApplication* app = RiaApplication::instance(); app->saveProject(); } @@ -60,47 +51,7 @@ void RicSaveProjectFeature::setupActionLook(QAction* actionToSetup) { actionToSetup->setText("&Save Project"); actionToSetup->setIcon(QIcon(":/Save.png")); + actionToSetup->setShortcuts(QKeySequence::Save); } //-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RicSaveProjectFeature::storeTreeViewState() -{ - { - RiaApplication* app = RiaApplication::instance(); - if (app->mainPlotWindow() && app->mainPlotWindow()->projectTreeView()) - { - caf::PdmUiTreeView* projectTreeView = app->mainPlotWindow()->projectTreeView(); - - QString treeViewState; - RimTreeViewStateSerializer::storeTreeViewStateToString(projectTreeView->treeView(), treeViewState); - - QModelIndex mi = projectTreeView->treeView()->currentIndex(); - - QString encodedModelIndexString; - RimTreeViewStateSerializer::encodeStringFromModelIndex(mi, encodedModelIndexString); - - RiaApplication::instance()->project()->plotWindowTreeViewState = treeViewState; - RiaApplication::instance()->project()->plotWindowCurrentModelIndexPath = encodedModelIndexString; - } - } - - { - caf::PdmUiTreeView* projectTreeView = RiuMainWindow::instance()->projectTreeView(); - if (projectTreeView) - { - QString treeViewState; - RimTreeViewStateSerializer::storeTreeViewStateToString(projectTreeView->treeView(), treeViewState); - - QModelIndex mi = projectTreeView->treeView()->currentIndex(); - - QString encodedModelIndexString; - RimTreeViewStateSerializer::encodeStringFromModelIndex(mi, encodedModelIndexString); - - RiaApplication::instance()->project()->mainWindowTreeViewState = treeViewState; - RiaApplication::instance()->project()->mainWindowCurrentModelIndexPath = encodedModelIndexString; - } - } -} - diff --git a/ApplicationCode/Commands/ApplicationCommands/RicSaveProjectFeature.h b/ApplicationCode/Commands/ApplicationCommands/RicSaveProjectFeature.h index 61db41ebc2..f6f2aa73dd 100644 --- a/ApplicationCode/Commands/ApplicationCommands/RicSaveProjectFeature.h +++ b/ApplicationCode/Commands/ApplicationCommands/RicSaveProjectFeature.h @@ -28,9 +28,6 @@ class RicSaveProjectFeature : public caf::CmdFeature { CAF_CMD_HEADER_INIT; -public: - static void storeTreeViewState(); - protected: // Overrides virtual bool isCommandEnabled() override; diff --git a/ApplicationCode/Commands/ApplicationCommands/RicShowMainWindowFeature.cpp b/ApplicationCode/Commands/ApplicationCommands/RicShowMainWindowFeature.cpp index 960264631e..83b065e603 100644 --- a/ApplicationCode/Commands/ApplicationCommands/RicShowMainWindowFeature.cpp +++ b/ApplicationCode/Commands/ApplicationCommands/RicShowMainWindowFeature.cpp @@ -39,6 +39,8 @@ bool RicShowMainWindowFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicShowMainWindowFeature::onActionTriggered(bool isChecked) { + this->disableModelChangeContribution(); + RiuMainWindow* mainWnd = RiuMainWindow::instance(); if (mainWnd->isMinimized()) diff --git a/ApplicationCode/Commands/ApplicationCommands/RicShowPlotDataFeature.cpp b/ApplicationCode/Commands/ApplicationCommands/RicShowPlotDataFeature.cpp new file mode 100644 index 0000000000..da5bffebb5 --- /dev/null +++ b/ApplicationCode/Commands/ApplicationCommands/RicShowPlotDataFeature.cpp @@ -0,0 +1,264 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicShowPlotDataFeature.h" + +#include "RiaApplication.h" + +#include "RimSummaryPlot.h" +#include "RimWellLogPlot.h" + +#include "RiuMainPlotWindow.h" + +#include "cafSelectionManager.h" + +#include +#include +#include +#include + + +CAF_CMD_SOURCE_INIT(RicShowPlotDataFeature, "RicShowPlotDataFeature"); + +//-------------------------------------------------------------------------------------------------- +/// +/// +/// RiuQPlainTextEdit +/// +/// +//-------------------------------------------------------------------------------------------------- +void RiuQPlainTextEdit::keyPressEvent(QKeyEvent *e) +{ + if ( e->key() == Qt::Key_C && e->modifiers() == Qt::ControlModifier ) + { + slotCopyContentToClipboard(); + e->setAccepted(true); + } + else + { + QPlainTextEdit::keyPressEvent(e); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuQPlainTextEdit::slotCopyContentToClipboard() +{ + QTextCursor cursor(this->textCursor()); + + QString textForClipboard; + + QString selText = cursor.selectedText(); + if (!selText.isEmpty()) + { + QTextDocument doc; + doc.setPlainText(selText); + + textForClipboard = doc.toPlainText(); + } + + if (textForClipboard.isEmpty()) + { + textForClipboard = this->toPlainText(); + } + + if (!textForClipboard.isEmpty()) + { + QClipboard* clipboard = QApplication::clipboard(); + if (clipboard) + { + clipboard->setText(textForClipboard); + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuQPlainTextEdit::slotSelectAll() +{ + this->selectAll(); +} + +//-------------------------------------------------------------------------------------------------- +/// +/// +/// RicTextWidget +/// +/// +//-------------------------------------------------------------------------------------------------- +RicTextWidget::RicTextWidget(QWidget* parent) + : QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint) +{ + m_textEdit = new RiuQPlainTextEdit(this); + m_textEdit->setReadOnly(true); + m_textEdit->setLineWrapMode(QPlainTextEdit::NoWrap); + + QFont font("Courier", 8); + m_textEdit->setFont(font); + + m_textEdit->setContextMenuPolicy(Qt::NoContextMenu); + + QVBoxLayout* layout = new QVBoxLayout(); + layout->addWidget(m_textEdit); + setLayout(layout); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicTextWidget::setText(const QString& text) +{ + m_textEdit->setPlainText(text); +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicTextWidget::contextMenuEvent(QContextMenuEvent* event) +{ + QMenu menu; + + { + QAction* actionToSetup = new QAction(this); + + actionToSetup->setText("Copy"); + actionToSetup->setIcon(QIcon(":/Copy.png")); + actionToSetup->setShortcuts(QKeySequence::Copy); + + connect(actionToSetup, SIGNAL(triggered()), m_textEdit, SLOT(slotCopyContentToClipboard())); + + menu.addAction(actionToSetup); + } + + { + QAction* actionToSetup = new QAction(this); + + actionToSetup->setText("Select All"); + actionToSetup->setShortcuts(QKeySequence::SelectAll); + + connect(actionToSetup, SIGNAL(triggered()), m_textEdit, SLOT(slotSelectAll())); + + menu.addAction(actionToSetup); + } + + menu.exec(event->globalPos()); +} + + + +//-------------------------------------------------------------------------------------------------- +/// +/// +/// RicShowPlotDataFeature +/// +/// +//-------------------------------------------------------------------------------------------------- +bool RicShowPlotDataFeature::isCommandEnabled() +{ + std::vector selectedSummaryPlots; + caf::SelectionManager::instance()->objectsByType(&selectedSummaryPlots); + if (selectedSummaryPlots.size() > 0) return true; + + std::vector wellLogPlots; + caf::SelectionManager::instance()->objectsByType(&wellLogPlots); + if (wellLogPlots.size() > 0) return true; + + return false; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicShowPlotDataFeature::onActionTriggered(bool isChecked) +{ + this->disableModelChangeContribution(); + + std::vector selectedSummaryPlots; + caf::SelectionManager::instance()->objectsByType(&selectedSummaryPlots); + + std::vector wellLogPlots; + caf::SelectionManager::instance()->objectsByType(&wellLogPlots); + + if (selectedSummaryPlots.size() == 0 && wellLogPlots.size() == 0) + { + CVF_ASSERT(false); + + return; + } + + RiuMainPlotWindow* plotwindow = RiaApplication::instance()->mainPlotWindow(); + CVF_ASSERT(plotwindow); + + for (RimSummaryPlot* summaryPlot : selectedSummaryPlots) + { + QString title = summaryPlot->description(); + QString text = summaryPlot->asciiDataForPlotExport(); + + RicShowPlotDataFeature::showTextWindow(title, text); + } + + for (RimWellLogPlot* wellLogPlot : wellLogPlots) + { + QString title = wellLogPlot->description(); + QString text = wellLogPlot->asciiDataForPlotExport(); + + RicShowPlotDataFeature::showTextWindow(title, text); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicShowPlotDataFeature::setupActionLook(QAction* actionToSetup) +{ + actionToSetup->setText("Show Plot Data"); + actionToSetup->setIcon(QIcon(":/PlotWindow24x24.png")); +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicShowPlotDataFeature::showTextWindow(const QString& title, const QString& text) +{ + RiuMainPlotWindow* plotwindow = RiaApplication::instance()->mainPlotWindow(); + CVF_ASSERT(plotwindow); + + RicTextWidget* textWiget = new RicTextWidget(plotwindow); + textWiget->setMinimumSize(400, 600); + + textWiget->setWindowTitle(title); + textWiget->setText(text); + + textWiget->show(); + + plotwindow->addToTemporaryWidgets(textWiget); +} + + + + + + + + + + diff --git a/ApplicationCode/Commands/ApplicationCommands/RicShowPlotDataFeature.h b/ApplicationCode/Commands/ApplicationCommands/RicShowPlotDataFeature.h new file mode 100644 index 0000000000..a3b06014bc --- /dev/null +++ b/ApplicationCode/Commands/ApplicationCommands/RicShowPlotDataFeature.h @@ -0,0 +1,80 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafCmdFeature.h" + +#include +#include + + +class RiuQPlainTextEdit : public QPlainTextEdit +{ + Q_OBJECT +public: + explicit RiuQPlainTextEdit(QWidget *parent = 0) : QPlainTextEdit(parent) {} + +protected: + virtual void keyPressEvent(QKeyEvent *e) override; + +private slots: + void slotCopyContentToClipboard(); + void slotSelectAll(); + +}; + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +class RicTextWidget : public QDialog +{ + Q_OBJECT + +public: + explicit RicTextWidget(QWidget* parent = 0); + + void setText(const QString& text); + +private: + RiuQPlainTextEdit* m_textEdit; +protected: + virtual void contextMenuEvent(QContextMenuEvent *) override; + +}; + + +//================================================================================================== +/// +//================================================================================================== +class RicShowPlotDataFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + +protected: + // Overrides + virtual bool isCommandEnabled(); + virtual void onActionTriggered( bool isChecked ); + virtual void setupActionLook( QAction* actionToSetup ); + +public: + static void showTextWindow(const QString& title, const QString& text); +}; + + diff --git a/ApplicationCode/Commands/ApplicationCommands/RicShowPlotWindowFeature.cpp b/ApplicationCode/Commands/ApplicationCommands/RicShowPlotWindowFeature.cpp index dfaf8d4f49..62085d6b09 100644 --- a/ApplicationCode/Commands/ApplicationCommands/RicShowPlotWindowFeature.cpp +++ b/ApplicationCode/Commands/ApplicationCommands/RicShowPlotWindowFeature.cpp @@ -37,6 +37,8 @@ bool RicShowPlotWindowFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicShowPlotWindowFeature::onActionTriggered(bool isChecked) { + this->disableModelChangeContribution(); + RiaApplication::instance()->getOrCreateAndShowMainPlotWindow(); } diff --git a/ApplicationCode/Commands/ApplicationCommands/RicTileWindowsFeature.cpp b/ApplicationCode/Commands/ApplicationCommands/RicTileWindowsFeature.cpp index d46689ecaf..2160d83258 100644 --- a/ApplicationCode/Commands/ApplicationCommands/RicTileWindowsFeature.cpp +++ b/ApplicationCode/Commands/ApplicationCommands/RicTileWindowsFeature.cpp @@ -47,6 +47,8 @@ bool RicTileWindowsFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicTileWindowsFeature::onActionTriggered(bool isChecked) { + this->disableModelChangeContribution(); + RiuMainWindow* mainWindow = RiuMainWindow::instance(); if (mainWindow) { diff --git a/ApplicationCode/Commands/CMakeLists_files.cmake b/ApplicationCode/Commands/CMakeLists_files.cmake index 8ce105d653..806e5bc397 100644 --- a/ApplicationCode/Commands/CMakeLists_files.cmake +++ b/ApplicationCode/Commands/CMakeLists_files.cmake @@ -35,13 +35,18 @@ ${CEE_CURRENT_LIST_DIR}RicImportGeoMechCaseFeature.h ${CEE_CURRENT_LIST_DIR}RicImportSummaryCaseFeature.h ${CEE_CURRENT_LIST_DIR}RicExportFaultsFeature.h +${CEE_CURRENT_LIST_DIR}RicExportMultipleSnapshotsFeature.h + # General delete of any object in a child array field ${CEE_CURRENT_LIST_DIR}RicDeleteItemExec.h ${CEE_CURRENT_LIST_DIR}RicDeleteItemExecData.h ${CEE_CURRENT_LIST_DIR}RicDeleteItemFeature.h +${CEE_CURRENT_LIST_DIR}RicDeleteSubItemsFeature.h ${CEE_CURRENT_LIST_DIR}RicCommandFeature.h + +${CEE_CURRENT_LIST_DIR}RicReloadCaseFeature.h ) set (SOURCE_GROUP_SOURCE_FILES @@ -72,11 +77,16 @@ ${CEE_CURRENT_LIST_DIR}RicImportGeoMechCaseFeature.cpp ${CEE_CURRENT_LIST_DIR}RicImportSummaryCaseFeature.cpp ${CEE_CURRENT_LIST_DIR}RicExportFaultsFeature.cpp +${CEE_CURRENT_LIST_DIR}RicExportMultipleSnapshotsFeature.cpp # General delete of any object in a child array field ${CEE_CURRENT_LIST_DIR}RicDeleteItemExec.cpp ${CEE_CURRENT_LIST_DIR}RicDeleteItemExecData.cpp ${CEE_CURRENT_LIST_DIR}RicDeleteItemFeature.cpp + +${CEE_CURRENT_LIST_DIR}RicDeleteSubItemsFeature.cpp + +${CEE_CURRENT_LIST_DIR}RicReloadCaseFeature.cpp ) list(APPEND CODE_HEADER_FILES diff --git a/ApplicationCode/Commands/CrossSectionCommands/RicAppendIntersectionFeature.h b/ApplicationCode/Commands/CrossSectionCommands/RicAppendIntersectionFeature.h index 58fa795d27..ccadce2511 100644 --- a/ApplicationCode/Commands/CrossSectionCommands/RicAppendIntersectionFeature.h +++ b/ApplicationCode/Commands/CrossSectionCommands/RicAppendIntersectionFeature.h @@ -32,7 +32,7 @@ class RimIntersectionCollection; class RicAppendIntersectionFeatureCmd : public caf::CmdExecuteCommand { public: - RicAppendIntersectionFeatureCmd(RimIntersectionCollection* intersectionCollection); + explicit RicAppendIntersectionFeatureCmd(RimIntersectionCollection* intersectionCollection); virtual ~RicAppendIntersectionFeatureCmd(); virtual QString name(); diff --git a/ApplicationCode/Commands/CrossSectionCommands/RicNewPolylineIntersectionFeature.h b/ApplicationCode/Commands/CrossSectionCommands/RicNewPolylineIntersectionFeature.h index 0381ff5f1e..b32ee3d997 100644 --- a/ApplicationCode/Commands/CrossSectionCommands/RicNewPolylineIntersectionFeature.h +++ b/ApplicationCode/Commands/CrossSectionCommands/RicNewPolylineIntersectionFeature.h @@ -37,7 +37,7 @@ class RimIntersectionCollection; class RicNewPolylineIntersectionFeatureCmd : public caf::CmdExecuteCommand { public: - RicNewPolylineIntersectionFeatureCmd(RimIntersectionCollection* intersectionCollection); + explicit RicNewPolylineIntersectionFeatureCmd(RimIntersectionCollection* intersectionCollection); virtual ~RicNewPolylineIntersectionFeatureCmd(); virtual QString name(); diff --git a/ApplicationCode/Commands/CrossSectionCommands/RicNewSimWellIntersectionFeature.cpp b/ApplicationCode/Commands/CrossSectionCommands/RicNewSimWellIntersectionFeature.cpp index e273ae30e2..67e792d0c9 100644 --- a/ApplicationCode/Commands/CrossSectionCommands/RicNewSimWellIntersectionFeature.cpp +++ b/ApplicationCode/Commands/CrossSectionCommands/RicNewSimWellIntersectionFeature.cpp @@ -75,7 +75,7 @@ void RicNewSimWellIntersectionFeature::setupActionLook(QAction* actionToSetup) RicNewSimWellIntersectionCmd::RicNewSimWellIntersectionCmd(RimIntersectionCollection* intersectionCollection, RimEclipseWell* simWell) : CmdExecuteCommand(NULL), m_intersectionCollection(intersectionCollection), - m_wellPath(simWell) + m_simWell(simWell) { } @@ -100,12 +100,12 @@ QString RicNewSimWellIntersectionCmd::name() void RicNewSimWellIntersectionCmd::redo() { CVF_ASSERT(m_intersectionCollection); - CVF_ASSERT(m_wellPath); + CVF_ASSERT(m_simWell); RimIntersection* intersection = new RimIntersection(); - intersection->name = m_wellPath->name; + intersection->name = m_simWell->name; intersection->type = RimIntersection::CS_SIMULATION_WELL; - intersection->simulationWell = m_wellPath; + intersection->simulationWell = m_simWell; m_intersectionCollection->appendIntersection(intersection); } diff --git a/ApplicationCode/Commands/CrossSectionCommands/RicNewSimWellIntersectionFeature.h b/ApplicationCode/Commands/CrossSectionCommands/RicNewSimWellIntersectionFeature.h index e3b0ed1be2..b5dbf8377a 100644 --- a/ApplicationCode/Commands/CrossSectionCommands/RicNewSimWellIntersectionFeature.h +++ b/ApplicationCode/Commands/CrossSectionCommands/RicNewSimWellIntersectionFeature.h @@ -42,7 +42,7 @@ class RicNewSimWellIntersectionCmd : public caf::CmdExecuteCommand private: caf::PdmPointer m_intersectionCollection; - caf::PdmPointer m_wellPath; + caf::PdmPointer m_simWell; }; diff --git a/ApplicationCode/Commands/EclipseCommands/CMakeLists_files.cmake b/ApplicationCode/Commands/EclipseCommands/CMakeLists_files.cmake index 767483654c..920f7417c1 100644 --- a/ApplicationCode/Commands/EclipseCommands/CMakeLists_files.cmake +++ b/ApplicationCode/Commands/EclipseCommands/CMakeLists_files.cmake @@ -6,7 +6,6 @@ endif() set (SOURCE_GROUP_HEADER_FILES ${CEE_CURRENT_LIST_DIR}RicAddEclipseInputPropertyFeature.h -${CEE_CURRENT_LIST_DIR}RicAddOpmInputPropertyFeature.h ${CEE_CURRENT_LIST_DIR}RicComputeStatisticsFeature.h ${CEE_CURRENT_LIST_DIR}RicCreateGridCaseGroupFeature.h ${CEE_CURRENT_LIST_DIR}RicEclipseCaseNewGroupExec.h @@ -18,16 +17,15 @@ ${CEE_CURRENT_LIST_DIR}RicEclipsePropertyFilterNewExec.h ${CEE_CURRENT_LIST_DIR}RicEclipsePropertyFilterNewFeature.h ${CEE_CURRENT_LIST_DIR}RicImportEclipseCaseFeature.h ${CEE_CURRENT_LIST_DIR}RicImportInputEclipseCaseFeature.h -${CEE_CURRENT_LIST_DIR}RicImportInputEclipseCaseOpmFeature.h ${CEE_CURRENT_LIST_DIR}RicNewStatisticsCaseFeature.h ${CEE_CURRENT_LIST_DIR}RicSaveEclipseInputPropertyFeature.h ${CEE_CURRENT_LIST_DIR}RicSaveEclipseResultAsInputPropertyExec.h ${CEE_CURRENT_LIST_DIR}RicSaveEclipseResultAsInputPropertyFeature.h +${CEE_CURRENT_LIST_DIR}RicApplyPropertyFilterAsCellResultFeature.h ) set (SOURCE_GROUP_SOURCE_FILES ${CEE_CURRENT_LIST_DIR}RicAddEclipseInputPropertyFeature.cpp -${CEE_CURRENT_LIST_DIR}RicAddOpmInputPropertyFeature.cpp ${CEE_CURRENT_LIST_DIR}RicComputeStatisticsFeature.cpp ${CEE_CURRENT_LIST_DIR}RicCreateGridCaseGroupFeature.cpp ${CEE_CURRENT_LIST_DIR}RicEclipseCaseNewGroupExec.cpp @@ -39,11 +37,11 @@ ${CEE_CURRENT_LIST_DIR}RicEclipsePropertyFilterNewExec.cpp ${CEE_CURRENT_LIST_DIR}RicEclipsePropertyFilterNewFeature.cpp ${CEE_CURRENT_LIST_DIR}RicImportEclipseCaseFeature.cpp ${CEE_CURRENT_LIST_DIR}RicImportInputEclipseCaseFeature.cpp -${CEE_CURRENT_LIST_DIR}RicImportInputEclipseCaseOpmFeature.cpp ${CEE_CURRENT_LIST_DIR}RicNewStatisticsCaseFeature.cpp ${CEE_CURRENT_LIST_DIR}RicSaveEclipseInputPropertyFeature.cpp ${CEE_CURRENT_LIST_DIR}RicSaveEclipseResultAsInputPropertyExec.cpp ${CEE_CURRENT_LIST_DIR}RicSaveEclipseResultAsInputPropertyFeature.cpp +${CEE_CURRENT_LIST_DIR}RicApplyPropertyFilterAsCellResultFeature.cpp ) list(APPEND CODE_HEADER_FILES diff --git a/ApplicationCode/Commands/EclipseCommands/EclipseWell/CMakeLists_files.cmake b/ApplicationCode/Commands/EclipseCommands/EclipseWell/CMakeLists_files.cmake new file mode 100644 index 0000000000..27f3295bad --- /dev/null +++ b/ApplicationCode/Commands/EclipseCommands/EclipseWell/CMakeLists_files.cmake @@ -0,0 +1,25 @@ + +# Use this workaround until we're on 2.8.3 on all platforms and can use CMAKE_CURRENT_LIST_DIR directly +if (${CMAKE_VERSION} VERSION_GREATER "2.8.2") + set(CEE_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_DIR}/) +endif() + +set (SOURCE_GROUP_HEADER_FILES +${CEE_CURRENT_LIST_DIR}RicEclipseWellFeatureImpl.h +${CEE_CURRENT_LIST_DIR}RicEclipseWellShowFeatures.h +) + +set (SOURCE_GROUP_SOURCE_FILES +${CEE_CURRENT_LIST_DIR}RicEclipseWellFeatureImpl.cpp +${CEE_CURRENT_LIST_DIR}RicEclipseWellShowFeatures.cpp +) + +list(APPEND CODE_HEADER_FILES +${SOURCE_GROUP_HEADER_FILES} +) + +list(APPEND CODE_SOURCE_FILES +${SOURCE_GROUP_SOURCE_FILES} +) + +source_group( "CommandFeature\\Eclipse\\Well" FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} ${CEE_CURRENT_LIST_DIR}CMakeLists_files.cmake ) diff --git a/ApplicationCode/Commands/EclipseCommands/EclipseWell/RicEclipseWellFeatureImpl.cpp b/ApplicationCode/Commands/EclipseCommands/EclipseWell/RicEclipseWellFeatureImpl.cpp new file mode 100644 index 0000000000..24caf44c5c --- /dev/null +++ b/ApplicationCode/Commands/EclipseCommands/EclipseWell/RicEclipseWellFeatureImpl.cpp @@ -0,0 +1,71 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicEclipseWellFeatureImpl.h" + +#include "RimEclipseWell.h" +#include "RimEclipseWellCollection.h" + +#include "cafSelectionManager.h" + +#include + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicEclipseWellFeatureImpl::isAnyWellSelected() +{ + std::vector selection = selectedWells(); + if (selection.size() > 0) + { + return true; + } + + return false; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RicEclipseWellFeatureImpl::selectedWells() +{ + std::vector selection; + caf::SelectionManager::instance()->objectsByType(&selection); + + return selection; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimEclipseWellCollection* RicEclipseWellFeatureImpl::wellCollectionFromSelection() +{ + std::vector selection = selectedWells(); + if (selection.size() > 0) + { + RimEclipseWell* firstWell = selection[0]; + + RimEclipseWellCollection* wellCollection = nullptr; + firstWell->firstAncestorOrThisOfType(wellCollection); + + return wellCollection; + } + + return nullptr; +} + diff --git a/ApplicationCode/Commands/EclipseCommands/EclipseWell/RicEclipseWellFeatureImpl.h b/ApplicationCode/Commands/EclipseCommands/EclipseWell/RicEclipseWellFeatureImpl.h new file mode 100644 index 0000000000..3986e77bf5 --- /dev/null +++ b/ApplicationCode/Commands/EclipseCommands/EclipseWell/RicEclipseWellFeatureImpl.h @@ -0,0 +1,35 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include + +class RimEclipseWell; +class RimEclipseWellCollection; + +//================================================================================================== +/// +//================================================================================================== +class RicEclipseWellFeatureImpl +{ +public: + static bool isAnyWellSelected(); + static std::vector selectedWells(); + static RimEclipseWellCollection* wellCollectionFromSelection(); +}; diff --git a/ApplicationCode/Commands/EclipseCommands/EclipseWell/RicEclipseWellShowFeatures.cpp b/ApplicationCode/Commands/EclipseCommands/EclipseWell/RicEclipseWellShowFeatures.cpp new file mode 100644 index 0000000000..d4daa955a9 --- /dev/null +++ b/ApplicationCode/Commands/EclipseCommands/EclipseWell/RicEclipseWellShowFeatures.cpp @@ -0,0 +1,352 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicEclipseWellShowFeatures.h" + +#include "RicEclipseWellFeatureImpl.h" + +#include "RimEclipseWell.h" +#include "RimEclipseWellCollection.h" + +#include + + + +CAF_CMD_SOURCE_INIT(RicEclipseWellShowLabelFeature, "RicEclipseWellShowLabelFeature"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicEclipseWellShowLabelFeature::onActionTriggered(bool isChecked) +{ + std::vector selection = RicEclipseWellFeatureImpl::selectedWells(); + for (RimEclipseWell* w : selection) + { + w->showWellLabel.setValueWithFieldChanged(isChecked); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicEclipseWellShowLabelFeature::setupActionLook(QAction* actionToSetup) +{ + actionToSetup->setText("Show Well Label"); + actionToSetup->setCheckable(true); + actionToSetup->setChecked(isCommandChecked()); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicEclipseWellShowLabelFeature::isCommandEnabled() +{ + return RicEclipseWellFeatureImpl::isAnyWellSelected(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicEclipseWellShowLabelFeature::isCommandChecked() +{ + std::vector selection = RicEclipseWellFeatureImpl::selectedWells(); + if (selection.size() > 0) + { + RimEclipseWell* well = selection[0]; + + return well->showWellLabel(); + } + + return false; +} + + + + + + + + +CAF_CMD_SOURCE_INIT(RicEclipseWellShowHeadFeature, "RicEclipseWellShowHeadFeature"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicEclipseWellShowHeadFeature::onActionTriggered(bool isChecked) +{ + std::vector selection = RicEclipseWellFeatureImpl::selectedWells(); + for (RimEclipseWell* w : selection) + { + w->showWellHead.setValueWithFieldChanged(isChecked); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicEclipseWellShowHeadFeature::setupActionLook(QAction* actionToSetup) +{ + actionToSetup->setText("Show Well Head"); + actionToSetup->setCheckable(true); + actionToSetup->setChecked(isCommandChecked()); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicEclipseWellShowHeadFeature::isCommandEnabled() +{ + return RicEclipseWellFeatureImpl::isAnyWellSelected(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicEclipseWellShowHeadFeature::isCommandChecked() +{ + std::vector selection = RicEclipseWellFeatureImpl::selectedWells(); + if (selection.size() > 0) + { + RimEclipseWell* well = selection[0]; + + return well->showWellHead(); + } + + return false; +} + + + + + + + + + +CAF_CMD_SOURCE_INIT(RicEclipseWellShowPipeFeature, "RicEclipseWellShowPipeFeature"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicEclipseWellShowPipeFeature::onActionTriggered(bool isChecked) +{ + std::vector selection = RicEclipseWellFeatureImpl::selectedWells(); + for (RimEclipseWell* w : selection) + { + w->showWellPipe.setValueWithFieldChanged(isChecked); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicEclipseWellShowPipeFeature::setupActionLook(QAction* actionToSetup) +{ + actionToSetup->setText("Show Well Pipes"); + actionToSetup->setCheckable(true); + actionToSetup->setChecked(isCommandChecked()); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicEclipseWellShowPipeFeature::isCommandEnabled() +{ + return RicEclipseWellFeatureImpl::isAnyWellSelected(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicEclipseWellShowPipeFeature::isCommandChecked() +{ + std::vector selection = RicEclipseWellFeatureImpl::selectedWells(); + if (selection.size() > 0) + { + RimEclipseWell* well = selection[0]; + + return well->showWellPipe(); + } + + return false; +} + + + + + + + + +CAF_CMD_SOURCE_INIT(RicEclipseWellShowSpheresFeature, "RicEclipseWellShowSpheresFeature"); + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicEclipseWellShowSpheresFeature::onActionTriggered(bool isChecked) +{ + std::vector selection = RicEclipseWellFeatureImpl::selectedWells(); + for (RimEclipseWell* w : selection) + { + w->showWellSpheres.setValueWithFieldChanged(isChecked); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicEclipseWellShowSpheresFeature::setupActionLook(QAction* actionToSetup) +{ + actionToSetup->setText("Show Well Spheres"); + actionToSetup->setCheckable(true); + actionToSetup->setChecked(isCommandChecked()); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicEclipseWellShowSpheresFeature::isCommandEnabled() +{ + return RicEclipseWellFeatureImpl::isAnyWellSelected(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicEclipseWellShowSpheresFeature::isCommandChecked() +{ + std::vector selection = RicEclipseWellFeatureImpl::selectedWells(); + if (selection.size() > 0) + { + RimEclipseWell* well = selection[0]; + + return well->showWellSpheres(); + } + + return false; +} + + + + + + + + +CAF_CMD_SOURCE_INIT(RicEclipseWellShowWellCellsFeature, "RicEclipseWellShowWellCellsFeature"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicEclipseWellShowWellCellsFeature::onActionTriggered(bool isChecked) +{ + std::vector selection = RicEclipseWellFeatureImpl::selectedWells(); + for (RimEclipseWell* w : selection) + { + w->showWellCells.setValueWithFieldChanged(isChecked); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicEclipseWellShowWellCellsFeature::setupActionLook(QAction* actionToSetup) +{ + actionToSetup->setText("Show Well Cells"); + actionToSetup->setCheckable(true); + actionToSetup->setChecked(isCommandChecked()); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicEclipseWellShowWellCellsFeature::isCommandEnabled() +{ + return RicEclipseWellFeatureImpl::isAnyWellSelected(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicEclipseWellShowWellCellsFeature::isCommandChecked() +{ + std::vector selection = RicEclipseWellFeatureImpl::selectedWells(); + if (selection.size() > 0) + { + RimEclipseWell* well = selection[0]; + + return well->showWellCells(); + } + + return false; +} + + + + + + + +CAF_CMD_SOURCE_INIT(RicEclipseWellShowWellCellFenceFeature, "RicEclipseWellShowWellCellFenceFeature"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicEclipseWellShowWellCellFenceFeature::onActionTriggered(bool isChecked) +{ + std::vector selection = RicEclipseWellFeatureImpl::selectedWells(); + for (RimEclipseWell* w : selection) + { + w->showWellCellFence.setValueWithFieldChanged(isChecked); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicEclipseWellShowWellCellFenceFeature::setupActionLook(QAction* actionToSetup) +{ + actionToSetup->setText("Show Well Cell Fence"); + actionToSetup->setCheckable(true); + actionToSetup->setChecked(isCommandChecked()); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicEclipseWellShowWellCellFenceFeature::isCommandEnabled() +{ + return RicEclipseWellFeatureImpl::isAnyWellSelected(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicEclipseWellShowWellCellFenceFeature::isCommandChecked() +{ + std::vector selection = RicEclipseWellFeatureImpl::selectedWells(); + if (selection.size() > 0) + { + RimEclipseWell* well = selection[0]; + + return well->showWellCellFence(); + } + + return false; +} diff --git a/ApplicationCode/Commands/EclipseCommands/EclipseWell/RicEclipseWellShowFeatures.h b/ApplicationCode/Commands/EclipseCommands/EclipseWell/RicEclipseWellShowFeatures.h new file mode 100644 index 0000000000..2b794d3256 --- /dev/null +++ b/ApplicationCode/Commands/EclipseCommands/EclipseWell/RicEclipseWellShowFeatures.h @@ -0,0 +1,107 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafCmdFeature.h" + + +//================================================================================================== +/// +//================================================================================================== +class RicEclipseWellShowLabelFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + +protected: + virtual void onActionTriggered(bool isChecked) override; + virtual void setupActionLook(QAction* actionToSetup) override; + virtual bool isCommandEnabled() override; + virtual bool isCommandChecked() override; +}; + +//================================================================================================== +/// +//================================================================================================== +class RicEclipseWellShowHeadFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + +protected: + virtual void onActionTriggered(bool isChecked) override; + virtual void setupActionLook(QAction* actionToSetup) override; + virtual bool isCommandEnabled() override; + virtual bool isCommandChecked() override; +}; + +//================================================================================================== +/// +//================================================================================================== +class RicEclipseWellShowPipeFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + +protected: + virtual void onActionTriggered(bool isChecked) override; + virtual void setupActionLook(QAction* actionToSetup) override; + virtual bool isCommandEnabled() override; + virtual bool isCommandChecked() override; +}; + +//================================================================================================== +/// +//================================================================================================== +class RicEclipseWellShowSpheresFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + +protected: + virtual void onActionTriggered(bool isChecked) override; + virtual void setupActionLook(QAction* actionToSetup) override; + virtual bool isCommandEnabled() override; + virtual bool isCommandChecked() override; +}; + +//================================================================================================== +/// +//================================================================================================== +class RicEclipseWellShowWellCellsFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + +protected: + virtual void onActionTriggered(bool isChecked) override; + virtual void setupActionLook(QAction* actionToSetup) override; + virtual bool isCommandEnabled() override; + virtual bool isCommandChecked() override; +}; + +//================================================================================================== +/// +//================================================================================================== +class RicEclipseWellShowWellCellFenceFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + +protected: + virtual void onActionTriggered(bool isChecked) override; + virtual void setupActionLook(QAction* actionToSetup) override; + virtual bool isCommandEnabled() override; + virtual bool isCommandChecked() override; +}; + diff --git a/ApplicationCode/Commands/EclipseCommands/RicAddEclipseInputPropertyFeature.cpp b/ApplicationCode/Commands/EclipseCommands/RicAddEclipseInputPropertyFeature.cpp index dd87823d9f..de61fc1a35 100644 --- a/ApplicationCode/Commands/EclipseCommands/RicAddEclipseInputPropertyFeature.cpp +++ b/ApplicationCode/Commands/EclipseCommands/RicAddEclipseInputPropertyFeature.cpp @@ -21,7 +21,6 @@ #include "RimEclipseInputPropertyCollection.h" #include "RimEclipseInputCase.h" -#include "RimEclipseInputCaseOpm.h" #include "RiaApplication.h" #include "RiuMainWindow.h" @@ -40,18 +39,6 @@ CAF_CMD_SOURCE_INIT(RicAddEclipseInputPropertyFeature, "RicAddEclipseInputProper //-------------------------------------------------------------------------------------------------- bool RicAddEclipseInputPropertyFeature::isCommandEnabled() { - RimEclipseInputPropertyCollection* inputProp = selectedInputPropertyCollection(); - if (inputProp) - { - RimEclipseInputCaseOpm* inputCaseOpm = NULL; - - inputProp->firstAncestorOrThisOfType(inputCaseOpm); - if (inputCaseOpm) - { - return false; - } - } - return selectedInputPropertyCollection() != NULL; } diff --git a/ApplicationCode/Commands/EclipseCommands/RicAddOpmInputPropertyFeature.cpp b/ApplicationCode/Commands/EclipseCommands/RicAddOpmInputPropertyFeature.cpp deleted file mode 100644 index 2d2cd2a4da..0000000000 --- a/ApplicationCode/Commands/EclipseCommands/RicAddOpmInputPropertyFeature.cpp +++ /dev/null @@ -1,115 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#include "RicAddOpmInputPropertyFeature.h" - -#include "RiaApplication.h" -#include "RimEclipseInputCaseOpm.h" -#include "RimEclipseInputPropertyCollection.h" -#include "RiuMainWindow.h" - -#include "cafSelectionManager.h" - -#include -#include -#include -#include - -CAF_CMD_SOURCE_INIT(RicAddOpmInputPropertyFeature, "RicAddOpmInputPropertyFeature"); - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicAddOpmInputPropertyFeature::isCommandEnabled() -{ - RimEclipseInputPropertyCollection* inputProp = selectedInputPropertyCollection(); - if (inputProp) - { - RimEclipseInputCaseOpm* inputCaseOpm = NULL; - - inputProp->firstAncestorOrThisOfType(inputCaseOpm); - if (inputCaseOpm) - { - return true; - } - } - - return false; -} - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RicAddOpmInputPropertyFeature::onActionTriggered(bool isChecked) -{ - RiaApplication* app = RiaApplication::instance(); - QString defaultDir = app->lastUsedDialogDirectory("INPUT_FILES"); - QStringList fileNames = QFileDialog::getOpenFileNames(NULL, "Select Eclipse Input Property Files", defaultDir, "All Files (*.* *)"); - - if (fileNames.isEmpty()) return; - - // Remember the directory to next time - defaultDir = QFileInfo(fileNames.last()).absolutePath(); - app->setLastUsedDialogDirectory("INPUT_FILES", defaultDir); - - RimEclipseInputPropertyCollection* inputPropertyCollection = selectedInputPropertyCollection(); - if (inputPropertyCollection) - { - addEclipseInputProperty(fileNames, inputPropertyCollection); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RicAddOpmInputPropertyFeature::setupActionLook(QAction* actionToSetup) -{ - actionToSetup->setText("Add Input Property"); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RimEclipseInputPropertyCollection* RicAddOpmInputPropertyFeature::selectedInputPropertyCollection() const -{ - std::vector selection; - caf::SelectionManager::instance()->objectsByType(&selection); - - return selection.size() > 0 ? selection[0] : NULL; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RicAddOpmInputPropertyFeature::addEclipseInputProperty(const QStringList& fileNames, RimEclipseInputPropertyCollection* inputPropertyCollection) -{ - CVF_ASSERT(inputPropertyCollection); - - RimEclipseInputCaseOpm* inputCaseOpm = NULL; - - inputPropertyCollection->firstAncestorOrThisOfType(inputCaseOpm); - if (inputCaseOpm) - { - inputCaseOpm->appendPropertiesFromStandaloneFiles(fileNames); - } - - inputPropertyCollection->updateConnectedEditors(); -} - - diff --git a/ApplicationCode/Commands/EclipseCommands/RicAddOpmInputPropertyFeature.h b/ApplicationCode/Commands/EclipseCommands/RicAddOpmInputPropertyFeature.h deleted file mode 100644 index e5ca7facf8..0000000000 --- a/ApplicationCode/Commands/EclipseCommands/RicAddOpmInputPropertyFeature.h +++ /dev/null @@ -1,45 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2015- Statoil ASA -// Copyright (C) 2015- Ceetron Solutions 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#pragma once - -#include "cafCmdFeature.h" - -class RimEclipseInputPropertyCollection; -class QStringList; - -//================================================================================================== -/// -//================================================================================================== -class RicAddOpmInputPropertyFeature : public caf::CmdFeature -{ - CAF_CMD_HEADER_INIT; - -protected: - // Overrides - virtual bool isCommandEnabled(); - virtual void onActionTriggered( bool isChecked ); - virtual void setupActionLook( QAction* actionToSetup ); - -private: - RimEclipseInputPropertyCollection* selectedInputPropertyCollection() const; - static void addEclipseInputProperty(const QStringList& fileNames, RimEclipseInputPropertyCollection* inputPropertyCollection); -}; - - diff --git a/ApplicationCode/Commands/EclipseCommands/RicApplyPropertyFilterAsCellResultFeature.cpp b/ApplicationCode/Commands/EclipseCommands/RicApplyPropertyFilterAsCellResultFeature.cpp new file mode 100644 index 0000000000..a9ab8dff7c --- /dev/null +++ b/ApplicationCode/Commands/EclipseCommands/RicApplyPropertyFilterAsCellResultFeature.cpp @@ -0,0 +1,121 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicApplyPropertyFilterAsCellResultFeature.h" + +#include "RimEclipseCellColors.h" +#include "RimEclipsePropertyFilter.h" +#include "RimEclipseView.h" + +#include "RimGeoMechPropertyFilter.h" +#include "RimGeoMechResultDefinition.h" +#include "RimGeoMechView.h" + +#include "cafSelectionManager.h" + +#include + +CAF_CMD_SOURCE_INIT(RicApplyPropertyFilterAsCellResultFeature, "RicApplyPropertyFilterAsCellResultFeature"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicApplyPropertyFilterAsCellResultFeature::isCommandEnabled() +{ + { + std::vector objects; + caf::SelectionManager::instance()->objectsByType(&objects); + + if (objects.size() == 1) + { + return true; + } + } + + { + std::vector objects; + caf::SelectionManager::instance()->objectsByType(&objects); + + if (objects.size() == 1) + { + return true; + } + } + + return false; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicApplyPropertyFilterAsCellResultFeature::onActionTriggered(bool isChecked) +{ + { + std::vector objects; + caf::SelectionManager::instance()->objectsByType(&objects); + + if (objects.size() == 1) + { + RimEclipsePropertyFilter* propertyFilter = objects[0]; + if (!propertyFilter) return; + + RimEclipseView* rimEclipseView = nullptr; + propertyFilter->firstAncestorOrThisOfType(rimEclipseView); + if (!rimEclipseView) return; + + rimEclipseView->cellResult()->simpleCopy(propertyFilter->resultDefinition()); + rimEclipseView->cellResult()->updateConnectedEditors(); + + rimEclipseView->scheduleCreateDisplayModelAndRedraw(); + + return; + } + } + + { + std::vector objects; + caf::SelectionManager::instance()->objectsByType(&objects); + + if (objects.size() == 1) + { + RimGeoMechPropertyFilter* propertyFilter = objects[0]; + if (!propertyFilter) return; + + RimGeoMechView* geoMechView = nullptr; + propertyFilter->firstAncestorOrThisOfType(geoMechView); + if (!geoMechView) return; + + geoMechView->cellResultResultDefinition()->setResultAddress(propertyFilter->resultDefinition()->resultAddress()); + geoMechView->cellResultResultDefinition()->updateConnectedEditors(); + + geoMechView->scheduleCreateDisplayModelAndRedraw(); + + return; + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicApplyPropertyFilterAsCellResultFeature::setupActionLook(QAction* actionToSetup) +{ + actionToSetup->setText("Apply As Cell Result"); + actionToSetup->setIcon(QIcon(":/CellResult.png")); +} + diff --git a/ApplicationCode/Commands/EclipseCommands/RicApplyPropertyFilterAsCellResultFeature.h b/ApplicationCode/Commands/EclipseCommands/RicApplyPropertyFilterAsCellResultFeature.h new file mode 100644 index 0000000000..bfbe11beea --- /dev/null +++ b/ApplicationCode/Commands/EclipseCommands/RicApplyPropertyFilterAsCellResultFeature.h @@ -0,0 +1,36 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafCmdFeature.h" + + +//================================================================================================== +/// +//================================================================================================== +class RicApplyPropertyFilterAsCellResultFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + +protected: + virtual bool isCommandEnabled() override; + virtual void onActionTriggered(bool isChecked) override; + virtual void setupActionLook(QAction* actionToSetup) override; +}; + diff --git a/ApplicationCode/Commands/EclipseCommands/RicCreateGridCaseGroupFeature.cpp b/ApplicationCode/Commands/EclipseCommands/RicCreateGridCaseGroupFeature.cpp index 6da72f89c2..c5f69fe3de 100644 --- a/ApplicationCode/Commands/EclipseCommands/RicCreateGridCaseGroupFeature.cpp +++ b/ApplicationCode/Commands/EclipseCommands/RicCreateGridCaseGroupFeature.cpp @@ -34,10 +34,7 @@ CAF_CMD_SOURCE_INIT(RicCreateGridCaseGroupFeature, "RicCreateGridCaseGroupFeatur //-------------------------------------------------------------------------------------------------- bool RicCreateGridCaseGroupFeature::isCommandEnabled() { - std::vector selection; - caf::SelectionManager::instance()->objectsByType(&selection); - - return selection.size() > 0; + return true; } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/Commands/EclipseCommands/RicEclipsePropertyFilterFeatureImpl.cpp b/ApplicationCode/Commands/EclipseCommands/RicEclipsePropertyFilterFeatureImpl.cpp index b63ede27be..193f16204c 100644 --- a/ApplicationCode/Commands/EclipseCommands/RicEclipsePropertyFilterFeatureImpl.cpp +++ b/ApplicationCode/Commands/EclipseCommands/RicEclipsePropertyFilterFeatureImpl.cpp @@ -63,6 +63,7 @@ void RicEclipsePropertyFilterFeatureImpl::addPropertyFilter(RimEclipsePropertyFi setDefaults(propertyFilter); propertyFilterCollection->reservoirView()->scheduleGeometryRegen(PROPERTY_FILTERED); + propertyFilterCollection->reservoirView()->scheduleCreateDisplayModelAndRedraw(); propertyFilterCollection->updateConnectedEditors(); RiuMainWindow::instance()->selectAsCurrentItem(propertyFilter); @@ -79,6 +80,7 @@ void RicEclipsePropertyFilterFeatureImpl::insertPropertyFilter(RimEclipsePropert setDefaults(propertyFilter); propertyFilterCollection->reservoirView()->scheduleGeometryRegen(PROPERTY_FILTERED); + propertyFilterCollection->reservoirView()->scheduleCreateDisplayModelAndRedraw(); propertyFilterCollection->updateConnectedEditors(); RiuMainWindow::instance()->selectAsCurrentItem(propertyFilter); @@ -110,18 +112,17 @@ void RicEclipsePropertyFilterFeatureImpl::setDefaults(RimEclipsePropertyFilter* { CVF_ASSERT(propertyFilter); - RimEclipsePropertyFilterCollection* propertyFilterCollection = propertyFilter->parentContainer(); - CVF_ASSERT(propertyFilterCollection); + RimEclipsePropertyFilterCollection* propertyFilterCollection = nullptr; + propertyFilter->firstAncestorOrThisOfTypeAsserted(propertyFilterCollection); - RimEclipseView* reservoirView = propertyFilterCollection->reservoirView(); - CVF_ASSERT(reservoirView); + RimEclipseView* reservoirView = nullptr; + propertyFilter->firstAncestorOrThisOfTypeAsserted(reservoirView); propertyFilter->resultDefinition->setEclipseCase(reservoirView->eclipseCase()); - propertyFilter->resultDefinition->setResultVariable(reservoirView->cellResult->resultVariable()); - propertyFilter->resultDefinition->setPorosityModel(reservoirView->cellResult->porosityModel()); - propertyFilter->resultDefinition->setResultType(reservoirView->cellResult->resultType()); + propertyFilter->resultDefinition->simpleCopy(reservoirView->cellResult); + propertyFilter->resultDefinition->loadResult(); propertyFilter->setToDefaultValues(); propertyFilter->updateFilterName(); - propertyFilter->m_categorySelection = true; + propertyFilter->m_useCategorySelection = true; } diff --git a/ApplicationCode/Commands/EclipseCommands/RicEclipsePropertyFilterInsertExec.cpp b/ApplicationCode/Commands/EclipseCommands/RicEclipsePropertyFilterInsertExec.cpp index 0eb7f9c956..d15e954280 100644 --- a/ApplicationCode/Commands/EclipseCommands/RicEclipsePropertyFilterInsertExec.cpp +++ b/ApplicationCode/Commands/EclipseCommands/RicEclipsePropertyFilterInsertExec.cpp @@ -57,8 +57,8 @@ QString RicEclipsePropertyFilterInsertExec::name() //-------------------------------------------------------------------------------------------------- void RicEclipsePropertyFilterInsertExec::redo() { - RimEclipsePropertyFilterCollection* propertyFilterCollection = m_propertyFilter->parentContainer(); - CVF_ASSERT(propertyFilterCollection); + RimEclipsePropertyFilterCollection* propertyFilterCollection = nullptr; + m_propertyFilter->firstAncestorOrThisOfTypeAsserted(propertyFilterCollection); size_t index = propertyFilterCollection->propertyFilters.index(m_propertyFilter); CVF_ASSERT(index < propertyFilterCollection->propertyFilters.size()); diff --git a/ApplicationCode/Commands/EclipseCommands/RicEclipsePropertyFilterInsertExec.h b/ApplicationCode/Commands/EclipseCommands/RicEclipsePropertyFilterInsertExec.h index 727a30d8fc..f996fb5240 100644 --- a/ApplicationCode/Commands/EclipseCommands/RicEclipsePropertyFilterInsertExec.h +++ b/ApplicationCode/Commands/EclipseCommands/RicEclipsePropertyFilterInsertExec.h @@ -30,7 +30,7 @@ class RimEclipsePropertyFilter; class RicEclipsePropertyFilterInsertExec : public caf::CmdExecuteCommand { public: - RicEclipsePropertyFilterInsertExec(RimEclipsePropertyFilter* propertyFilter); + explicit RicEclipsePropertyFilterInsertExec(RimEclipsePropertyFilter* propertyFilter); virtual ~RicEclipsePropertyFilterInsertExec(); virtual QString name(); diff --git a/ApplicationCode/Commands/EclipseCommands/RicEclipsePropertyFilterNewExec.h b/ApplicationCode/Commands/EclipseCommands/RicEclipsePropertyFilterNewExec.h index f890ce57e6..f20f8d0481 100644 --- a/ApplicationCode/Commands/EclipseCommands/RicEclipsePropertyFilterNewExec.h +++ b/ApplicationCode/Commands/EclipseCommands/RicEclipsePropertyFilterNewExec.h @@ -30,7 +30,7 @@ class RimEclipsePropertyFilterCollection; class RicEclipsePropertyFilterNewExec : public caf::CmdExecuteCommand { public: - RicEclipsePropertyFilterNewExec(RimEclipsePropertyFilterCollection* propertyFilterCollection); + explicit RicEclipsePropertyFilterNewExec(RimEclipsePropertyFilterCollection* propertyFilterCollection); virtual ~RicEclipsePropertyFilterNewExec(); virtual QString name(); diff --git a/ApplicationCode/Commands/EclipseCommands/RicImportInputEclipseCaseOpmFeature.cpp b/ApplicationCode/Commands/EclipseCommands/RicImportInputEclipseCaseOpmFeature.cpp deleted file mode 100644 index 22406bab93..0000000000 --- a/ApplicationCode/Commands/EclipseCommands/RicImportInputEclipseCaseOpmFeature.cpp +++ /dev/null @@ -1,100 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#include "RicImportInputEclipseCaseOpmFeature.h" - -#include "RiaApplication.h" - -#include "RimDefines.h" -#include "RimEclipseCaseCollection.h" -#include "RimEclipseCellColors.h" -#include "RimEclipseInputCaseOpm.h" -#include "RimEclipseView.h" -#include "RimOilField.h" -#include "RimProject.h" - -#include "RiuMainWindow.h" - -#include "cafSelectionManager.h" - -#include -#include - -CAF_CMD_SOURCE_INIT(RicImportInputEclipseCaseOpmFeature, "RicImportInputEclipseCaseOpmFeature"); - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicImportInputEclipseCaseOpmFeature::isCommandEnabled() -{ - return true; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RicImportInputEclipseCaseOpmFeature::onActionTriggered(bool isChecked) -{ - RiaApplication* app = RiaApplication::instance(); - QString defaultDir = app->lastUsedDialogDirectory("INPUT_FILES"); - QString fileName = QFileDialog::getOpenFileName(RiuMainWindow::instance(), "Import Eclipse Input file", defaultDir, "Eclipse Input Files (*.GRDECL);;All Files (*.*)"); - - if (fileName.isEmpty()) return; - - // Remember the path to next time - app->setLastUsedDialogDirectory("INPUT_FILES", QFileInfo(fileName).absolutePath()); - - RimProject* proj = app->project(); - RimEclipseCaseCollection* analysisModels = proj->activeOilField() ? proj->activeOilField()->analysisModels() : NULL; - if (analysisModels) - { - // This code originates from RiaApplication::openInputEclipseCaseFromFileNames - - RimEclipseInputCaseOpm* rimInputReservoir = new RimEclipseInputCaseOpm(); - proj->assignCaseIdToCase(rimInputReservoir); - - rimInputReservoir->importNewEclipseGridAndProperties(fileName); - - analysisModels->cases.push_back(rimInputReservoir); - - RimEclipseView* riv = rimInputReservoir->createAndAddReservoirView(); - - riv->cellResult()->setResultType(RimDefines::INPUT_PROPERTY); - riv->hasUserRequestedAnimation = true; - - riv->loadDataAndUpdate(); - - if (!riv->cellResult()->hasResult()) - { - riv->cellResult()->setResultVariable(RimDefines::undefinedResultName()); - } - - analysisModels->updateConnectedEditors(); - - RiuMainWindow::instance()->selectAsCurrentItem(riv->cellResult()); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RicImportInputEclipseCaseOpmFeature::setupActionLook(QAction* actionToSetup) -{ - actionToSetup->setIcon(QIcon(":/EclipseInput48x48.png")); - actionToSetup->setText("Import Input Eclipse Case (opm-parser) - BETA"); -} diff --git a/ApplicationCode/Commands/EclipseCommands/RicImportInputEclipseCaseOpmFeature.h b/ApplicationCode/Commands/EclipseCommands/RicImportInputEclipseCaseOpmFeature.h deleted file mode 100644 index 6df4d3fd15..0000000000 --- a/ApplicationCode/Commands/EclipseCommands/RicImportInputEclipseCaseOpmFeature.h +++ /dev/null @@ -1,39 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#pragma once - -#include "cafCmdFeature.h" - -#include - -//================================================================================================== -/// -//================================================================================================== -class RicImportInputEclipseCaseOpmFeature : public caf::CmdFeature -{ - CAF_CMD_HEADER_INIT; - -protected: - // Overrides - virtual bool isCommandEnabled(); - virtual void onActionTriggered( bool isChecked ); - virtual void setupActionLook( QAction* actionToSetup ); -}; - - diff --git a/ApplicationCode/Commands/EclipseCommands/RicSaveEclipseInputPropertyFeature.cpp b/ApplicationCode/Commands/EclipseCommands/RicSaveEclipseInputPropertyFeature.cpp index b027dddf4d..ac8a2ec421 100644 --- a/ApplicationCode/Commands/EclipseCommands/RicSaveEclipseInputPropertyFeature.cpp +++ b/ApplicationCode/Commands/EclipseCommands/RicSaveEclipseInputPropertyFeature.cpp @@ -51,6 +51,8 @@ bool RicSaveEclipseInputPropertyFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicSaveEclipseInputPropertyFeature::onActionTriggered(bool isChecked) { + this->disableModelChangeContribution(); + RimEclipseInputProperty* inputProperty = selectedInputProperty(); if (!inputProperty) return; @@ -99,7 +101,7 @@ void RicSaveEclipseInputPropertyFeature::onActionTriggered(bool isChecked) caf::PdmUiPropertyViewDialog propertyDialog(RiuMainWindow::instance(), &exportSettings, "Export Eclipse Property to Text File", ""); if (propertyDialog.exec() == QDialog::Accepted) { - bool isOk = RifEclipseInputFileTools::writePropertyToTextFile(exportSettings.fileName, inputReservoir->reservoirData(), 0, inputProperty->resultName, exportSettings.eclipseKeyword); + bool isOk = RifEclipseInputFileTools::writePropertyToTextFile(exportSettings.fileName, inputReservoir->eclipseCaseData(), 0, inputProperty->resultName, exportSettings.eclipseKeyword); if (isOk) { inputProperty->fileName = exportSettings.fileName; @@ -116,7 +118,7 @@ void RicSaveEclipseInputPropertyFeature::onActionTriggered(bool isChecked) //-------------------------------------------------------------------------------------------------- void RicSaveEclipseInputPropertyFeature::setupActionLook(QAction* actionToSetup) { - actionToSetup->setText("Save Property To File"); + actionToSetup->setText("Export Property To File"); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/Commands/EclipseCommands/RicSaveEclipseResultAsInputPropertyExec.cpp b/ApplicationCode/Commands/EclipseCommands/RicSaveEclipseResultAsInputPropertyExec.cpp index 49f274112a..b28c89474f 100644 --- a/ApplicationCode/Commands/EclipseCommands/RicSaveEclipseResultAsInputPropertyExec.cpp +++ b/ApplicationCode/Commands/EclipseCommands/RicSaveEclipseResultAsInputPropertyExec.cpp @@ -24,7 +24,6 @@ #include "RimEclipseView.h" #include "RimEclipseCase.h" -#include "RigCaseData.h" #include "RigCaseCellResultsData.h" #include "RifEclipseInputFileTools.h" @@ -37,6 +36,7 @@ #include #include +#include "cafUtils.h" //-------------------------------------------------------------------------------------------------- /// @@ -60,7 +60,7 @@ RicSaveEclipseResultAsInputPropertyExec::~RicSaveEclipseResultAsInputPropertyExe //-------------------------------------------------------------------------------------------------- QString RicSaveEclipseResultAsInputPropertyExec::name() { - return "Save Property To File"; + return "Export Property To File"; } //-------------------------------------------------------------------------------------------------- @@ -72,7 +72,7 @@ void RicSaveEclipseResultAsInputPropertyExec::redo() if (!m_cellColors->reservoirView()) return; if (!m_cellColors->reservoirView()->eclipseCase()) return; - if (!m_cellColors->reservoirView()->eclipseCase()->reservoirData()) return; + if (!m_cellColors->reservoirView()->eclipseCase()->eclipseCaseData()) return; RimBinaryExportSettings exportSettings; exportSettings.eclipseKeyword = m_cellColors->resultVariable(); @@ -84,18 +84,18 @@ void RicSaveEclipseResultAsInputPropertyExec::redo() projectFolder = m_cellColors->reservoirView()->eclipseCase()->locationOnDisc(); } - QString outputFileName = projectFolder + "/" + m_cellColors->resultVariable(); + QString outputFileName = projectFolder + "/" + caf::Utils::makeValidFileBasename( m_cellColors->resultVariableUiShortName()); exportSettings.fileName = outputFileName; } caf::PdmUiPropertyViewDialog propertyDialog(RiuMainWindow::instance(), &exportSettings, "Export Binary Eclipse Data to Text File", ""); + if (propertyDialog.exec() == QDialog::Accepted) { size_t timeStep = m_cellColors->reservoirView()->currentTimeStep(); - RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(m_cellColors->porosityModel()); - bool isOk = RifEclipseInputFileTools::writeBinaryResultToTextFile(exportSettings.fileName, m_cellColors->reservoirView()->eclipseCase()->reservoirData(), porosityModel, timeStep, m_cellColors->resultVariable(), exportSettings.eclipseKeyword, exportSettings.undefinedValue); + bool isOk = RifEclipseInputFileTools::writeBinaryResultToTextFile(exportSettings.fileName, m_cellColors->reservoirView()->eclipseCase()->eclipseCaseData(), timeStep, m_cellColors, exportSettings.eclipseKeyword, exportSettings.undefinedValue); if (!isOk) { QMessageBox::critical(NULL, "File export", "Failed to exported current result to " + exportSettings.fileName); diff --git a/ApplicationCode/Commands/EclipseCommands/RicSaveEclipseResultAsInputPropertyExec.h b/ApplicationCode/Commands/EclipseCommands/RicSaveEclipseResultAsInputPropertyExec.h index bfba44995b..6a949fc021 100644 --- a/ApplicationCode/Commands/EclipseCommands/RicSaveEclipseResultAsInputPropertyExec.h +++ b/ApplicationCode/Commands/EclipseCommands/RicSaveEclipseResultAsInputPropertyExec.h @@ -30,7 +30,7 @@ class RimEclipseCellColors; class RicSaveEclipseResultAsInputPropertyExec : public caf::CmdExecuteCommand { public: - RicSaveEclipseResultAsInputPropertyExec(RimEclipseCellColors* cellColors); + explicit RicSaveEclipseResultAsInputPropertyExec(RimEclipseCellColors* cellColors); virtual ~RicSaveEclipseResultAsInputPropertyExec(); virtual QString name(); diff --git a/ApplicationCode/Commands/EclipseCommands/RicSaveEclipseResultAsInputPropertyFeature.cpp b/ApplicationCode/Commands/EclipseCommands/RicSaveEclipseResultAsInputPropertyFeature.cpp index 683bd05075..52d4f4a443 100644 --- a/ApplicationCode/Commands/EclipseCommands/RicSaveEclipseResultAsInputPropertyFeature.cpp +++ b/ApplicationCode/Commands/EclipseCommands/RicSaveEclipseResultAsInputPropertyFeature.cpp @@ -47,6 +47,8 @@ bool RicSaveEclipseResultAsInputPropertyFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicSaveEclipseResultAsInputPropertyFeature::onActionTriggered(bool isChecked) { + this->disableModelChangeContribution(); + std::vector selection; caf::SelectionManager::instance()->objectsByType(&selection); if (selection.size() == 1) @@ -61,7 +63,7 @@ void RicSaveEclipseResultAsInputPropertyFeature::onActionTriggered(bool isChecke //-------------------------------------------------------------------------------------------------- void RicSaveEclipseResultAsInputPropertyFeature::setupActionLook(QAction* actionToSetup) { - actionToSetup->setText("Save Property To File"); + actionToSetup->setText("Export Property To File"); } diff --git a/ApplicationCode/Commands/FlowCommands/CMakeLists_files.cmake b/ApplicationCode/Commands/FlowCommands/CMakeLists_files.cmake new file mode 100644 index 0000000000..267d09bca3 --- /dev/null +++ b/ApplicationCode/Commands/FlowCommands/CMakeLists_files.cmake @@ -0,0 +1,39 @@ + +# Use this workaround until we're on 2.8.3 on all platforms and can use CMAKE_CURRENT_LIST_DIR directly +if (${CMAKE_VERSION} VERSION_GREATER "2.8.2") + set(CEE_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_DIR}/) +endif() + +set (SOURCE_GROUP_HEADER_FILES +${CEE_CURRENT_LIST_DIR}RicShowWellAllocationPlotFeature.h +${CEE_CURRENT_LIST_DIR}RicShowFlowCharacteristicsPlotFeature.h +${CEE_CURRENT_LIST_DIR}RicAddStoredWellAllocationPlotFeature.h +${CEE_CURRENT_LIST_DIR}RicShowContributingWellsFromPlotFeature.h +${CEE_CURRENT_LIST_DIR}RicShowContributingWellsFeature.h +${CEE_CURRENT_LIST_DIR}RicShowContributingWellsFeatureImpl.h +${CEE_CURRENT_LIST_DIR}RicPlotProductionRateFeature.h +${CEE_CURRENT_LIST_DIR}RicSelectViewUI.h +${CEE_CURRENT_LIST_DIR}RicShowTotalAllocationDataFeature.h +) + +set (SOURCE_GROUP_SOURCE_FILES +${CEE_CURRENT_LIST_DIR}RicShowWellAllocationPlotFeature.cpp +${CEE_CURRENT_LIST_DIR}RicShowFlowCharacteristicsPlotFeature.cpp +${CEE_CURRENT_LIST_DIR}RicAddStoredWellAllocationPlotFeature.cpp +${CEE_CURRENT_LIST_DIR}RicShowContributingWellsFromPlotFeature.cpp +${CEE_CURRENT_LIST_DIR}RicShowContributingWellsFeature.cpp +${CEE_CURRENT_LIST_DIR}RicShowContributingWellsFeatureImpl.cpp +${CEE_CURRENT_LIST_DIR}RicPlotProductionRateFeature.cpp +${CEE_CURRENT_LIST_DIR}RicSelectViewUI.cpp +${CEE_CURRENT_LIST_DIR}RicShowTotalAllocationDataFeature.cpp +) + +list(APPEND CODE_HEADER_FILES +${SOURCE_GROUP_HEADER_FILES} +) + +list(APPEND CODE_SOURCE_FILES +${SOURCE_GROUP_SOURCE_FILES} +) + +source_group( "CommandFeature\\FlowDiagnostics" FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} ${CEE_CURRENT_LIST_DIR}CMakeLists_files.cmake ) diff --git a/ApplicationCode/Commands/FlowCommands/RicAddStoredWellAllocationPlotFeature.cpp b/ApplicationCode/Commands/FlowCommands/RicAddStoredWellAllocationPlotFeature.cpp new file mode 100644 index 0000000000..d65d102229 --- /dev/null +++ b/ApplicationCode/Commands/FlowCommands/RicAddStoredWellAllocationPlotFeature.cpp @@ -0,0 +1,99 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicAddStoredWellAllocationPlotFeature.h" + +#include "RiaApplication.h" + +#include "RimFlowPlotCollection.h" +#include "RimMainPlotCollection.h" +#include "RimProject.h" +#include "RimWellAllocationPlot.h" + +#include "RiuMainPlotWindow.h" + +#include "cafSelectionManager.h" + +#include "cvfAssert.h" + +#include + +CAF_CMD_SOURCE_INIT(RicAddStoredWellAllocationPlotFeature, "RicAddStoredWellAllocationPlotFeature"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicAddStoredWellAllocationPlotFeature::isCommandEnabled() +{ + if (RiaApplication::instance()->project()) + { + RimFlowPlotCollection* flowPlotColl = RiaApplication::instance()->project()->mainPlotCollection->flowPlotCollection(); + if (flowPlotColl) + { + RimWellAllocationPlot* wellAllocationPlot = dynamic_cast(caf::SelectionManager::instance()->selectedItem()); + + if (flowPlotColl->defaultWellAllocPlot() == wellAllocationPlot) + { + return true; + } + } + } + + return false; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicAddStoredWellAllocationPlotFeature::onActionTriggered(bool isChecked) +{ + if (RiaApplication::instance()->project()) + { + RimFlowPlotCollection* flowPlotColl = RiaApplication::instance()->project()->mainPlotCollection->flowPlotCollection(); + if (flowPlotColl) + { + RimWellAllocationPlot* sourceObject = dynamic_cast(caf::SelectionManager::instance()->selectedItem()); + + RimWellAllocationPlot* wellAllocationPlot = dynamic_cast(sourceObject->copyByXmlSerialization(caf::PdmDefaultObjectFactory::instance())); + CVF_ASSERT(wellAllocationPlot); + + flowPlotColl->addWellAllocPlotToStoredPlots(wellAllocationPlot); + wellAllocationPlot->resolveReferencesRecursively(); + + wellAllocationPlot->loadDataAndUpdate(); + + flowPlotColl->updateConnectedEditors(); + + RiuMainPlotWindow* mainPlotWindow = RiaApplication::instance()->mainPlotWindow(); + if (mainPlotWindow) + { + mainPlotWindow->selectAsCurrentItem(wellAllocationPlot); + mainPlotWindow->setExpanded(wellAllocationPlot, true); + } + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicAddStoredWellAllocationPlotFeature::setupActionLook(QAction* actionToSetup) +{ + //actionToSetup->setIcon(QIcon(":/new_icon16x16.png")); + actionToSetup->setText("Add Stored Well Allocation Plot"); +} diff --git a/ApplicationCode/Commands/FlowCommands/RicAddStoredWellAllocationPlotFeature.h b/ApplicationCode/Commands/FlowCommands/RicAddStoredWellAllocationPlotFeature.h new file mode 100644 index 0000000000..651e2eaa17 --- /dev/null +++ b/ApplicationCode/Commands/FlowCommands/RicAddStoredWellAllocationPlotFeature.h @@ -0,0 +1,38 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafCmdFeature.h" + + +//================================================================================================== +/// +//================================================================================================== +class RicAddStoredWellAllocationPlotFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + +protected: + // Overrides + virtual bool isCommandEnabled() override; + virtual void onActionTriggered( bool isChecked ) override; + virtual void setupActionLook( QAction* actionToSetup ) override; +}; + + diff --git a/ApplicationCode/Commands/FlowCommands/RicPlotProductionRateFeature.cpp b/ApplicationCode/Commands/FlowCommands/RicPlotProductionRateFeature.cpp new file mode 100644 index 0000000000..9098e6f4e3 --- /dev/null +++ b/ApplicationCode/Commands/FlowCommands/RicPlotProductionRateFeature.cpp @@ -0,0 +1,307 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicPlotProductionRateFeature.h" + +#include "RiaApplication.h" +#include "RiaPreferences.h" + +#include "RifEclipseSummaryAddress.h" +#include "RifReaderEclipseSummary.h" + +#include "RigSingleWellResultsData.h" +#include "RigSummaryCaseData.h" + +#include "RimEclipseResultCase.h" +#include "RimEclipseWell.h" +#include "RimGridSummaryCase.h" +#include "RimMainPlotCollection.h" +#include "RimOilField.h" +#include "RimProject.h" +#include "RimSummaryCaseCollection.h" +#include "RimSummaryCurve.h" +#include "RimSummaryCurveAppearanceCalculator.h" +#include "RimSummaryPlot.h" +#include "RimSummaryPlotCollection.h" +#include "RimView.h" + +#include "RiuMainPlotWindow.h" +#include "RiuMainWindow.h" + +#include "cafSelectionManager.h" + +#include + +CAF_CMD_SOURCE_INIT(RicPlotProductionRateFeature, "RicPlotProductionRateFeature"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicPlotProductionRateFeature::isCommandEnabled() +{ + std::vector collection; + caf::SelectionManager::instance()->objectsByType(&collection); + + for (RimEclipseWell* well : collection) + { + RimGridSummaryCase* gridSummaryCase = RicPlotProductionRateFeature::gridSummaryCaseForWell(well); + if (gridSummaryCase) + { + return true; + } + } + + return false; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicPlotProductionRateFeature::onActionTriggered(bool isChecked) +{ + RimProject* project = RiaApplication::instance()->project(); + CAF_ASSERT(project); + + RimSummaryCaseCollection* sumCaseColl = project->activeOilField() ? project->activeOilField()->summaryCaseCollection() : nullptr; + if (!sumCaseColl) return; + + RimMainPlotCollection* mainPlotColl = project->mainPlotCollection(); + CAF_ASSERT(mainPlotColl); + + RimSummaryPlotCollection* summaryPlotColl = mainPlotColl->summaryPlotCollection(); + CAF_ASSERT(summaryPlotColl); + + std::vector collection; + caf::SelectionManager::instance()->objectsByType(&collection); + + RimSummaryPlot* summaryPlotToSelect = nullptr; + + for (RimEclipseWell* well : collection) + { + RimGridSummaryCase* gridSummaryCase = RicPlotProductionRateFeature::gridSummaryCaseForWell(well); + if (!gridSummaryCase) continue; + + QString description = "Well Production Rates : "; + + if (isInjector(well)) + { + description = "Well Injection Rates : "; + } + + RimSummaryPlot* plot = new RimSummaryPlot(); + summaryPlotColl->summaryPlots().push_back(plot); + + description += well->name(); + plot->setDescription(description); + + if (isInjector(well)) + { + // Left Axis + + RimDefines::PlotAxis plotAxis = RimDefines::PLOT_AXIS_LEFT; + + { + // Note : The parameter "WOIR" is probably never-existing, but we check for existence before creating curve + // Oil + QString parameterName = "WOIR"; + RicPlotProductionRateFeature::addSummaryCurve(plot, well, gridSummaryCase, parameterName, + plotAxis, RimSummaryCurveAppearanceCalculator::cycledGreenColor(0)); + } + + { + // Water + QString parameterName = "WWIR"; + RicPlotProductionRateFeature::addSummaryCurve(plot, well, gridSummaryCase, parameterName, + plotAxis, RimSummaryCurveAppearanceCalculator::cycledBlueColor(0)); + } + + { + // Gas + QString parameterName = "WGIR"; + RicPlotProductionRateFeature::addSummaryCurve(plot, well, gridSummaryCase, parameterName, + plotAxis, RimSummaryCurveAppearanceCalculator::cycledRedColor(0)); + } + } + else + { + // Left Axis + + RimDefines::PlotAxis plotAxis = RimDefines::PLOT_AXIS_LEFT; + + { + // Oil + QString parameterName = "WOPR"; + RicPlotProductionRateFeature::addSummaryCurve(plot, well, gridSummaryCase, parameterName, + plotAxis, RimSummaryCurveAppearanceCalculator::cycledGreenColor(0)); + } + + { + // Water + QString parameterName = "WWPR"; + RicPlotProductionRateFeature::addSummaryCurve(plot, well, gridSummaryCase, parameterName, + plotAxis, RimSummaryCurveAppearanceCalculator::cycledBlueColor(0)); + } + + { + // Gas + QString parameterName = "WGPR"; + RicPlotProductionRateFeature::addSummaryCurve(plot, well, gridSummaryCase, parameterName, + plotAxis, RimSummaryCurveAppearanceCalculator::cycledRedColor(0)); + } + } + + + // Right Axis + + { + RimDefines::PlotAxis plotAxis = RimDefines::PLOT_AXIS_RIGHT; + + { + QString parameterName = "WTHP"; + RicPlotProductionRateFeature::addSummaryCurve(plot, well, gridSummaryCase, parameterName, + plotAxis, RimSummaryCurveAppearanceCalculator::cycledNoneRGBBrColor(0)); + } + + { + QString parameterName = "WBHP"; + RicPlotProductionRateFeature::addSummaryCurve(plot, well, gridSummaryCase, parameterName, + plotAxis, RimSummaryCurveAppearanceCalculator::cycledNoneRGBBrColor(1)); + } + } + + summaryPlotColl->updateConnectedEditors(); + plot->loadDataAndUpdate(); + + summaryPlotToSelect = plot; + } + + if (summaryPlotToSelect) + { + RiuMainPlotWindow* mainPlotWindow = RiaApplication::instance()->getOrCreateAndShowMainPlotWindow(); + if (mainPlotWindow) + { + mainPlotWindow->selectAsCurrentItem(summaryPlotToSelect); + mainPlotWindow->setExpanded(summaryPlotToSelect, true); + + mainPlotWindow->tileWindows(); + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicPlotProductionRateFeature::setupActionLook(QAction* actionToSetup) +{ + //actionToSetup->setIcon(QIcon(":/WellAllocPlot16x16.png")); + actionToSetup->setText("Plot Production Rates"); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimGridSummaryCase* RicPlotProductionRateFeature::gridSummaryCaseForWell(RimEclipseWell* well) +{ + RimProject* project = RiaApplication::instance()->project(); + if (!project) return nullptr; + + RimSummaryCaseCollection* sumCaseColl = project->activeOilField() ? project->activeOilField()->summaryCaseCollection() : nullptr; + if (!sumCaseColl) return nullptr; + + RimEclipseResultCase* eclCase = nullptr; + well->firstAncestorOrThisOfType(eclCase); + if (eclCase) + { + RimGridSummaryCase* gridSummaryCase = dynamic_cast(sumCaseColl->findSummaryCaseFromEclipseResultCase(eclCase)); + if (gridSummaryCase) + { + return gridSummaryCase; + } + } + + return nullptr; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicPlotProductionRateFeature::isInjector(RimEclipseWell* well) +{ + RigSingleWellResultsData* wRes = well->wellResults(); + if (wRes) + { + RimView* rimView = nullptr; + well->firstAncestorOrThisOfTypeAsserted(rimView); + + int currentTimeStep = rimView->currentTimeStep(); + + if (wRes->hasWellResult(currentTimeStep)) + { + const RigWellResultFrame& wrf = wRes->wellResultFrame(currentTimeStep); + + if ( wrf.m_productionType == RigWellResultFrame::OIL_INJECTOR + || wrf.m_productionType == RigWellResultFrame::GAS_INJECTOR + || wrf.m_productionType == RigWellResultFrame::WATER_INJECTOR) + { + return true; + } + } + } + + return false; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimSummaryCurve* RicPlotProductionRateFeature::addSummaryCurve( RimSummaryPlot* plot, const RimEclipseWell* well, + RimGridSummaryCase* gridSummaryCase, const QString& vectorName, + RimDefines::PlotAxis plotAxis, const cvf::Color3f& color) +{ + CVF_ASSERT(plot); + CVF_ASSERT(gridSummaryCase); + CVF_ASSERT(well); + + RifEclipseSummaryAddress addr(RifEclipseSummaryAddress::SUMMARY_WELL, + vectorName.toStdString(), + -1, + -1, + "", + well->name().toStdString(), + -1, + "", + -1, + -1, + -1); + + if (!gridSummaryCase->caseData()->summaryReader()->hasAddress(addr)) + { + return nullptr; + } + + RimSummaryCurve* newCurve = new RimSummaryCurve(); + plot->addCurve(newCurve); + + newCurve->setSummaryCase(gridSummaryCase); + newCurve->setSummaryAddress(addr); + newCurve->setColor(color); + newCurve->setYAxis(plotAxis); + + return newCurve; +} + diff --git a/ApplicationCode/Commands/FlowCommands/RicPlotProductionRateFeature.h b/ApplicationCode/Commands/FlowCommands/RicPlotProductionRateFeature.h new file mode 100644 index 0000000000..592d8780fb --- /dev/null +++ b/ApplicationCode/Commands/FlowCommands/RicPlotProductionRateFeature.h @@ -0,0 +1,52 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafCmdFeature.h" + +#include "RimFlowDiagSolution.h" +#include "RimDefines.h" + +class RimGridSummaryCase; +class RimEclipseWell; +class RimSummaryPlot; +class RimSummaryCurve; + +//================================================================================================== +/// +//================================================================================================== +class RicPlotProductionRateFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + +protected: + // Overrides + virtual bool isCommandEnabled() override; + virtual void onActionTriggered( bool isChecked ) override; + virtual void setupActionLook( QAction* actionToSetup ) override; + +private: + static RimGridSummaryCase* gridSummaryCaseForWell(RimEclipseWell* well); + static bool isInjector(RimEclipseWell* well); + static RimSummaryCurve* addSummaryCurve(RimSummaryPlot* plot, const RimEclipseWell* well, + RimGridSummaryCase* gridSummaryCase, const QString& vectorName, + RimDefines::PlotAxis plotAxis, const cvf::Color3f& color); +}; + + diff --git a/ApplicationCode/Commands/FlowCommands/RicSelectViewUI.cpp b/ApplicationCode/Commands/FlowCommands/RicSelectViewUI.cpp new file mode 100644 index 0000000000..158439567a --- /dev/null +++ b/ApplicationCode/Commands/FlowCommands/RicSelectViewUI.cpp @@ -0,0 +1,131 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicSelectViewUI.h" + +#include "RimEclipseResultCase.h" +#include "RimEclipseView.h" + + +CAF_PDM_SOURCE_INIT(RicSelectViewUI, "RicSelectViewUI"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RicSelectViewUI::RicSelectViewUI() +{ + CAF_PDM_InitObject("RicSelectViewUI", "", "", ""); + + CAF_PDM_InitFieldNoDefault(&m_selectedView, "MasterView", "Select view", "", "", ""); + CAF_PDM_InitField(&m_createNewView, "CreateNewView", false, "Create New View", "", "", ""); + CAF_PDM_InitField(&m_newViewName, "NewViewName", QString("ShowContributingWells"), "New View Name", "", "", ""); + + m_currentView = nullptr; + m_currentCase = nullptr; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicSelectViewUI::setView(RimEclipseView* currentView) +{ + m_currentView = currentView; + + m_currentView->firstAncestorOrThisOfTypeAsserted(m_currentCase); + + m_selectedView = m_currentView; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicSelectViewUI::setCase(RimEclipseResultCase* currentCase) +{ + m_currentCase = currentCase; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimEclipseView* RicSelectViewUI::selectedView() const +{ + return m_selectedView(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicSelectViewUI::createNewView() const +{ + return m_createNewView; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RicSelectViewUI::newViewName() const +{ + return m_newViewName; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QList RicSelectViewUI::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) +{ + QList options; + + if (fieldNeedingOptions == &m_selectedView) + { + if (m_currentCase) + { + for (RimView* v : m_currentCase->views()) + { + QIcon icon = v->uiCapability()->uiIcon(); + QString displayName = v->name; + + options.push_back(caf::PdmOptionItemInfo(displayName, v, false, icon)); + } + } + } + + return options; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicSelectViewUI::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) +{ + if (m_currentCase && m_currentCase->views().size() == 0) + { + m_createNewView = true; + } + + if (m_createNewView) + { + m_newViewName.uiCapability()->setUiReadOnly(false); + m_selectedView.uiCapability()->setUiReadOnly(true); + } + else + { + m_newViewName.uiCapability()->setUiReadOnly(true); + m_selectedView.uiCapability()->setUiReadOnly(false); + } +} + diff --git a/ApplicationCode/Commands/FlowCommands/RicSelectViewUI.h b/ApplicationCode/Commands/FlowCommands/RicSelectViewUI.h new file mode 100644 index 0000000000..f3ecfa2355 --- /dev/null +++ b/ApplicationCode/Commands/FlowCommands/RicSelectViewUI.h @@ -0,0 +1,58 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafPdmField.h" +#include "cafPdmObject.h" +#include "cafPdmPtrField.h" + +class RimEclipseView; +class RimEclipseResultCase; + +//================================================================================================== +/// +//================================================================================================== +class RicSelectViewUI : public caf::PdmObject +{ + CAF_PDM_HEADER_INIT; + +public: + RicSelectViewUI(); + + void setView(RimEclipseView* currentView); + void setCase(RimEclipseResultCase* currentCase); + + RimEclipseView* selectedView() const; + bool createNewView() const; + QString newViewName() const; + + virtual QList calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override; + +protected: + virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override; + +private: + caf::PdmPtrField m_selectedView; + caf::PdmField m_createNewView; + caf::PdmField m_newViewName; + + RimEclipseView* m_currentView; + RimEclipseResultCase* m_currentCase; +}; + diff --git a/ApplicationCode/Commands/FlowCommands/RicShowContributingWellsFeature.cpp b/ApplicationCode/Commands/FlowCommands/RicShowContributingWellsFeature.cpp new file mode 100644 index 0000000000..43c8ef5f8a --- /dev/null +++ b/ApplicationCode/Commands/FlowCommands/RicShowContributingWellsFeature.cpp @@ -0,0 +1,111 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicShowContributingWellsFeature.h" + +#include "RicShowContributingWellsFeatureImpl.h" + +#include "RimEclipseCellColors.h" +#include "RimEclipseResultCase.h" +#include "RimEclipseView.h" +#include "RimEclipseWell.h" +#include "RimViewManipulator.h" + +#include "RiuMainWindow.h" + +#include "cafCmdFeatureManager.h" +#include "cafSelectionManager.h" + +#include + +CAF_CMD_SOURCE_INIT(RicShowContributingWellsFeature, "RicShowContributingWellsFeature"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicShowContributingWellsFeature::isCommandEnabled() +{ + std::vector collection; + caf::SelectionManager::instance()->objectsByType(&collection); + if (collection.size() == 1) + { + RimEclipseWell* well = collection[0]; + RimEclipseView* eclipseView = nullptr; + well->firstAncestorOrThisOfType(eclipseView); + + if (eclipseView) + { + RimFlowDiagSolution* flowDiagSolution = eclipseView->cellResult()->flowDiagSolution(); + if (!flowDiagSolution) + { + RimEclipseResultCase* eclipseResultCase = nullptr; + well->firstAncestorOrThisOfTypeAsserted(eclipseResultCase); + + if (eclipseResultCase) + { + flowDiagSolution = eclipseResultCase->defaultFlowDiagSolution(); + } + } + + if (flowDiagSolution) + { + return true; + } + } + } + + return false; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicShowContributingWellsFeature::onActionTriggered(bool isChecked) +{ + std::vector collection; + caf::SelectionManager::instance()->objectsByType(&collection); + + CAF_ASSERT(collection.size() == 1); + + RimEclipseWell* well = collection[0]; + RimEclipseView* eclipseView = nullptr; + well->firstAncestorOrThisOfTypeAsserted(eclipseView); + + RimEclipseResultCase* eclipseResultCase = nullptr; + well->firstAncestorOrThisOfTypeAsserted(eclipseResultCase); + + RimEclipseView* modifiedView = RicShowContributingWellsFeatureImpl::maniuplateSelectedView(eclipseResultCase, well->name(), eclipseView->currentTimeStep()); + if (modifiedView) + { + modifiedView->createDisplayModelAndRedraw(); + + std::vector viewsToUpdate; + viewsToUpdate.push_back(modifiedView); + + RimViewManipulator::applySourceViewCameraOnDestinationViews(eclipseView, viewsToUpdate); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicShowContributingWellsFeature::setupActionLook(QAction* actionToSetup) +{ + actionToSetup->setIcon(QIcon(":/new_icon16x16.png")); + actionToSetup->setText("Show Contributing Wells"); +} diff --git a/ApplicationCode/Commands/FlowCommands/RicShowContributingWellsFeature.h b/ApplicationCode/Commands/FlowCommands/RicShowContributingWellsFeature.h new file mode 100644 index 0000000000..ab99fa476e --- /dev/null +++ b/ApplicationCode/Commands/FlowCommands/RicShowContributingWellsFeature.h @@ -0,0 +1,37 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafCmdFeature.h" + +//================================================================================================== +/// +//================================================================================================== +class RicShowContributingWellsFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + +protected: + // Overrides + virtual bool isCommandEnabled() override; + virtual void onActionTriggered( bool isChecked ) override; + virtual void setupActionLook( QAction* actionToSetup ) override; +}; + + diff --git a/ApplicationCode/Commands/FlowCommands/RicShowContributingWellsFeatureImpl.cpp b/ApplicationCode/Commands/FlowCommands/RicShowContributingWellsFeatureImpl.cpp new file mode 100644 index 0000000000..d01a566506 --- /dev/null +++ b/ApplicationCode/Commands/FlowCommands/RicShowContributingWellsFeatureImpl.cpp @@ -0,0 +1,280 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicShowContributingWellsFeatureImpl.h" + +#include "RiaApplication.h" + +#include "RicSelectViewUI.h" + +#include "RigFlowDiagResultAddress.h" +#include "RigSingleWellResultsData.h" + +#include "RimEclipseCellColors.h" +#include "RimEclipsePropertyFilter.h" +#include "RimEclipsePropertyFilterCollection.h" +#include "RimEclipseResultCase.h" +#include "RimEclipseView.h" +#include "RimEclipseWell.h" +#include "RimEclipseWellCollection.h" +#include "RimFaultCollection.h" +#include "RimFlowDiagSolution.h" +#include "RimProject.h" +#include "RimViewManipulator.h" + +#include "RiuMainWindow.h" + +#include "cafCmdFeature.h" +#include "cafCmdFeatureManager.h" +#include "cafPdmUiPropertyViewDialog.h" + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimEclipseView* RicShowContributingWellsFeatureImpl::maniuplateSelectedView(RimEclipseResultCase* eclipseResultCase, QString wellName, int timeStep) +{ + const QString lastUsedViewKey("lastUsedViewKey"); + + RimEclipseView* defaultSelectedView = nullptr; + { + QString lastUsedViewRef = RiaApplication::instance()->cacheDataObject(lastUsedViewKey).toString(); + RimEclipseView* lastUsedView = dynamic_cast(caf::PdmReferenceHelper::objectFromReference(RiaApplication::instance()->project(), lastUsedViewRef)); + if (lastUsedView) + { + RimEclipseResultCase* lastUsedViewResultCase = nullptr; + lastUsedView->firstAncestorOrThisOfTypeAsserted(lastUsedViewResultCase); + + if (lastUsedViewResultCase == eclipseResultCase) + { + defaultSelectedView = lastUsedView; + } + } + + if (!defaultSelectedView) + { + RimEclipseView* activeView = dynamic_cast(RiaApplication::instance()->activeReservoirView()); + if (activeView) + { + RimEclipseResultCase* activeViewResultCase = nullptr; + activeView->firstAncestorOrThisOfTypeAsserted(activeViewResultCase); + + if (activeViewResultCase == eclipseResultCase) + { + defaultSelectedView = activeView; + } + else + { + if (eclipseResultCase->views().size() > 0) + { + defaultSelectedView = dynamic_cast(eclipseResultCase->views()[0]); + } + } + } + } + } + + RicSelectViewUI featureUi; + if (defaultSelectedView) + { + featureUi.setView(defaultSelectedView); + } + else + { + featureUi.setCase(eclipseResultCase); + } + + caf::PdmUiPropertyViewDialog propertyDialog(NULL, &featureUi, "Show Contributing Wells in View", ""); + propertyDialog.resize(QSize(400, 200)); + + if (propertyDialog.exec() != QDialog::Accepted) return nullptr; + + RimEclipseView* viewToManipulate = nullptr; + if (featureUi.createNewView()) + { + RimEclipseView* createdView = eclipseResultCase->createAndAddReservoirView(); + createdView->name = featureUi.newViewName(); + + // Must be run before buildViewItems, as wells are created in this function + createdView->loadDataAndUpdate(); + eclipseResultCase->updateConnectedEditors(); + + viewToManipulate = createdView; + } + else + { + viewToManipulate = featureUi.selectedView(); + } + + CVF_ASSERT(viewToManipulate); + + + RicShowContributingWellsFeatureImpl::modifyViewToShowContributingWells(viewToManipulate, wellName, timeStep); + + auto* feature = caf::CmdFeatureManager::instance()->getCommandFeature("RicShowMainWindowFeature"); + feature->actionTriggered(false); + + RiuMainWindow::instance()->setExpanded(viewToManipulate, true); + RiuMainWindow::instance()->selectAsCurrentItem(viewToManipulate); + + QString refFromProjectToView = caf::PdmReferenceHelper::referenceFromRootToObject(RiaApplication::instance()->project(), viewToManipulate); + RiaApplication::instance()->setCacheDataObject(lastUsedViewKey, refFromProjectToView); + + return viewToManipulate; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicShowContributingWellsFeatureImpl::modifyViewToShowContributingWells(RimEclipseView* viewToModify, const QString& wellName, int timeStep) +{ + CVF_ASSERT(viewToModify); + + RimEclipseWell* selectedWell = nullptr; + + for (RimEclipseWell* w : viewToModify->wellCollection()->wells()) + { + if (w->name() == wellName) + { + selectedWell = w; + } + } + + CVF_ASSERT(selectedWell); + + RimEclipseResultCase* eclipseResultCase = nullptr; + selectedWell->firstAncestorOrThisOfTypeAsserted(eclipseResultCase); + + // Use the active flow diag solutions, or the first one as default + RimFlowDiagSolution* flowDiagSolution = viewToModify->cellResult()->flowDiagSolution(); + if (!flowDiagSolution) + { + flowDiagSolution = eclipseResultCase->defaultFlowDiagSolution(); + } + + //assert(flowDiagSolution); + CVF_ASSERT(flowDiagSolution); + + RimFlowDiagSolution::TracerStatusType tracerStatus = flowDiagSolution->tracerStatusInTimeStep(selectedWell->name(), timeStep); + if (!(tracerStatus == RimFlowDiagSolution::INJECTOR || tracerStatus == RimFlowDiagSolution::PRODUCER)) + { + return; + } + + viewToModify->setCurrentTimeStep(timeStep); + viewToModify->cellResult()->setResultType(RimDefines::FLOW_DIAGNOSTICS); + viewToModify->cellResult()->setResultVariable("MaxFractionTracer"); + viewToModify->cellResult()->setFlowSolution(flowDiagSolution); + + switch (tracerStatus) + { + case RimFlowDiagSolution::PRODUCER: + viewToModify->cellResult()->setFlowDiagTracerSelectionType(RimEclipseResultDefinition::FLOW_TR_INJECTORS); + break; + case RimFlowDiagSolution::INJECTOR: + viewToModify->cellResult()->setFlowDiagTracerSelectionType(RimEclipseResultDefinition::FLOW_TR_PRODUCERS); + break; + + default: + CVF_ASSERT(false); + break; + } + + viewToModify->cellResult()->loadDataAndUpdate(); + viewToModify->cellResult()->updateConnectedEditors(); + + std::vector tracerNames = findContributingTracerNames(flowDiagSolution, selectedWell->wellResults(), timeStep); + + for (RimEclipseWell* w : viewToModify->wellCollection()->wells()) + { + if (std::find(tracerNames.begin(), tracerNames.end(), w->name()) != tracerNames.end() + || selectedWell->name() == w->name()) + { + w->showWell = true; + } + else + { + w->showWell = false; + } + } + + // Disable all existing property filters, and + // create a new property filter based on TOF for current well + + RimEclipsePropertyFilterCollection* propertyFilterCollection = viewToModify->eclipsePropertyFilterCollection(); + + for (RimEclipsePropertyFilter* f : propertyFilterCollection->propertyFilters()) + { + f->isActive = false; + } + + RimEclipsePropertyFilter* propertyFilter = new RimEclipsePropertyFilter(); + propertyFilterCollection->propertyFilters().push_back(propertyFilter); + + propertyFilter->resultDefinition()->setEclipseCase(viewToModify->eclipseCase()); + propertyFilter->resultDefinition()->setTofAndSelectTracer(selectedWell->name()); + propertyFilter->resultDefinition()->loadDataAndUpdate(); + + propertyFilterCollection->updateConnectedEditors(); + + RiuMainWindow::instance()->setExpanded(propertyFilterCollection, true); + + viewToModify->faultCollection()->showFaultCollection = false; + viewToModify->faultCollection()->updateConnectedEditors(); + + viewToModify->updateCurrentTimeStepAndRedraw(); + viewToModify->scheduleCreateDisplayModelAndRedraw(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RicShowContributingWellsFeatureImpl::findContributingTracerNames( + const RimFlowDiagSolution* flowDiagSolution, + const RigSingleWellResultsData* wellResults, + int timeStep) +{ + std::vector tracerCellFractionValues; + + if (flowDiagSolution && wellResults->hasWellResult(timeStep)) + { + RimFlowDiagSolution::TracerStatusType requestedTracerType = RimFlowDiagSolution::UNDEFINED; + + const RigWellResultFrame::WellProductionType prodType = wellResults->wellProductionType(timeStep); + if ( prodType == RigWellResultFrame::PRODUCER + || prodType == RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE) + { + requestedTracerType = RimFlowDiagSolution::INJECTOR; + } + else + { + requestedTracerType = RimFlowDiagSolution::PRODUCER; + } + + std::vector tracerNames = flowDiagSolution->tracerNames(); + for (const QString& tracerName : tracerNames) + { + if (flowDiagSolution->tracerStatusInTimeStep(tracerName, timeStep) == requestedTracerType) + { + tracerCellFractionValues.push_back(tracerName); + } + } + } + + return tracerCellFractionValues; +} + diff --git a/ApplicationCode/Commands/FlowCommands/RicShowContributingWellsFeatureImpl.h b/ApplicationCode/Commands/FlowCommands/RicShowContributingWellsFeatureImpl.h new file mode 100644 index 0000000000..a5ce2afc60 --- /dev/null +++ b/ApplicationCode/Commands/FlowCommands/RicShowContributingWellsFeatureImpl.h @@ -0,0 +1,48 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include + +#include + +class RigSingleWellResultsData; +class RimEclipseResultCase; +class RimEclipseView; +class RimEclipseWell; +class RimFlowDiagSolution; + +//================================================================================================== +/// +//================================================================================================== +class RicShowContributingWellsFeatureImpl +{ +public: + static RimEclipseView* maniuplateSelectedView(RimEclipseResultCase* wellAllocationResultCase, QString wellName, int timeStep); + +private: + static void modifyViewToShowContributingWells(RimEclipseView* viewToModify, const QString& wellName, int timeStep); + + static std::vector findContributingTracerNames( + const RimFlowDiagSolution* flowDiagSolution, + const RigSingleWellResultsData* wellResults, + int timeStep); +}; + + diff --git a/ApplicationCode/Commands/FlowCommands/RicShowContributingWellsFromPlotFeature.cpp b/ApplicationCode/Commands/FlowCommands/RicShowContributingWellsFromPlotFeature.cpp new file mode 100644 index 0000000000..40f4e73c58 --- /dev/null +++ b/ApplicationCode/Commands/FlowCommands/RicShowContributingWellsFromPlotFeature.cpp @@ -0,0 +1,69 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicShowContributingWellsFromPlotFeature.h" + +#include "RiaApplication.h" + +#include "RicShowContributingWellsFeatureImpl.h" + +#include "RimEclipseResultCase.h" +#include "RimFlowDiagSolution.h" +#include "RimWellAllocationPlot.h" + +#include + +CAF_CMD_SOURCE_INIT(RicShowContributingWellsFromPlotFeature, "RicShowContributingWellsFromPlotFeature"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicShowContributingWellsFromPlotFeature::isCommandEnabled() +{ + RimWellAllocationPlot* wellAllocationPlot = dynamic_cast(RiaApplication::instance()->activePlotWindow()); + + if (wellAllocationPlot) return true; + + return false; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicShowContributingWellsFromPlotFeature::onActionTriggered(bool isChecked) +{ + RimWellAllocationPlot* wellAllocationPlot = dynamic_cast(RiaApplication::instance()->activePlotWindow()); + + if (!wellAllocationPlot) return; + + int timeStep = wellAllocationPlot->timeStep(); + QString wellName = wellAllocationPlot->wellName(); + + RimEclipseResultCase* wellAllocationResultCase = wellAllocationPlot->rimCase(); + + RicShowContributingWellsFeatureImpl::maniuplateSelectedView(wellAllocationResultCase, wellName, timeStep); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicShowContributingWellsFromPlotFeature::setupActionLook(QAction* actionToSetup) +{ + //actionToSetup->setIcon(QIcon(":/new_icon16x16.png")); + actionToSetup->setText("Show Contributing Wells"); +} diff --git a/ApplicationCode/Commands/FlowCommands/RicShowContributingWellsFromPlotFeature.h b/ApplicationCode/Commands/FlowCommands/RicShowContributingWellsFromPlotFeature.h new file mode 100644 index 0000000000..bc4af31852 --- /dev/null +++ b/ApplicationCode/Commands/FlowCommands/RicShowContributingWellsFromPlotFeature.h @@ -0,0 +1,38 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafCmdFeature.h" + + +//================================================================================================== +/// +//================================================================================================== +class RicShowContributingWellsFromPlotFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + +protected: + // Overrides + virtual bool isCommandEnabled() override; + virtual void onActionTriggered( bool isChecked ) override; + virtual void setupActionLook( QAction* actionToSetup ) override; +}; + + diff --git a/ApplicationCode/Commands/FlowCommands/RicShowFlowCharacteristicsPlotFeature.cpp b/ApplicationCode/Commands/FlowCommands/RicShowFlowCharacteristicsPlotFeature.cpp new file mode 100644 index 0000000000..9177768572 --- /dev/null +++ b/ApplicationCode/Commands/FlowCommands/RicShowFlowCharacteristicsPlotFeature.cpp @@ -0,0 +1,110 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicShowFlowCharacteristicsPlotFeature.h" + +#include "RiaApplication.h" + +#include "RimEclipseResultCase.h" +#include "RimEclipseView.h" +#include "RimFlowCharacteristicsPlot.h" +#include "RigFlowDiagResults.h" +#include "RimFlowDiagSolution.h" +#include "RimFlowPlotCollection.h" +#include "RimMainPlotCollection.h" +#include "RimProject.h" +#include "RimView.h" + +#include "RiuMainPlotWindow.h" + +#include + +CAF_CMD_SOURCE_INIT(RicShowFlowCharacteristicsPlotFeature, "RicShowFlowCharacteristicsPlotFeature"); + +RimEclipseResultCase* activeEclipseResultCase() +{ + RimView * activeView = RiaApplication::instance()->activeReservoirView(); + + auto eclView = dynamic_cast(activeView); + + if (!eclView) return nullptr; + + auto eclCase = dynamic_cast(eclView->ownerCase()); + + return eclCase; + +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicShowFlowCharacteristicsPlotFeature::isCommandEnabled() +{ + RimEclipseResultCase* eclCase = activeEclipseResultCase(); + + if (!eclCase) return false; + + if (!eclCase->defaultFlowDiagSolution()) return false; + + return true; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicShowFlowCharacteristicsPlotFeature::onActionTriggered(bool isChecked) +{ + RimEclipseResultCase* eclCase = activeEclipseResultCase(); + + if (eclCase && eclCase->defaultFlowDiagSolution()) + { + // Make sure flow results for the the active timestep is calculated, to avoid an empty plot + { + RimView * activeView = RiaApplication::instance()->activeReservoirView(); + if (activeView && eclCase->defaultFlowDiagSolution()->flowDiagResults()) + { + // Trigger calculation + eclCase->defaultFlowDiagSolution()->flowDiagResults()->maxAbsPairFlux(activeView->currentTimeStep()); + } + } + + if (RiaApplication::instance()->project()) + { + RimFlowPlotCollection* flowPlotColl = RiaApplication::instance()->project()->mainPlotCollection->flowPlotCollection(); + if (flowPlotColl) + { + RiuMainPlotWindow* plotwindow = RiaApplication::instance()->getOrCreateAndShowMainPlotWindow(); + + flowPlotColl->defaultFlowCharacteristicsPlot()->setFromFlowSolution(eclCase->defaultFlowDiagSolution()); + flowPlotColl->defaultFlowCharacteristicsPlot()->updateConnectedEditors(); + + // Make sure the summary plot window is created and visible + plotwindow->selectAsCurrentItem(flowPlotColl->defaultFlowCharacteristicsPlot()); + } + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicShowFlowCharacteristicsPlotFeature::setupActionLook(QAction* actionToSetup) +{ + actionToSetup->setIcon(QIcon(":/WellAllocPlot16x16.png")); + actionToSetup->setText("Plot Flow Characteristics"); +} diff --git a/ApplicationCode/Commands/FlowCommands/RicShowFlowCharacteristicsPlotFeature.h b/ApplicationCode/Commands/FlowCommands/RicShowFlowCharacteristicsPlotFeature.h new file mode 100644 index 0000000000..b9846b507a --- /dev/null +++ b/ApplicationCode/Commands/FlowCommands/RicShowFlowCharacteristicsPlotFeature.h @@ -0,0 +1,40 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafCmdFeature.h" + +class RimEclipseWell; + + +//================================================================================================== +/// +//================================================================================================== +class RicShowFlowCharacteristicsPlotFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + +protected: + // Overrides + virtual bool isCommandEnabled() override; + virtual void onActionTriggered( bool isChecked ) override; + virtual void setupActionLook( QAction* actionToSetup ) override; +}; + + diff --git a/ApplicationCode/Commands/FlowCommands/RicShowTotalAllocationDataFeature.cpp b/ApplicationCode/Commands/FlowCommands/RicShowTotalAllocationDataFeature.cpp new file mode 100644 index 0000000000..37a77bb1a0 --- /dev/null +++ b/ApplicationCode/Commands/FlowCommands/RicShowTotalAllocationDataFeature.cpp @@ -0,0 +1,107 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicShowTotalAllocationDataFeature.h" + +#include "ApplicationCommands/RicShowPlotDataFeature.h" + +#include "RimTotalWellAllocationPlot.h" +#include "RimWellAllocationPlot.h" + +#include "cafSelectionManager.h" +#include "cvfAssert.h" + +#include + +#include + +CAF_CMD_SOURCE_INIT(RicShowTotalAllocationDataFeature, "RicShowTotalAllocationDataFeature"); + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicShowTotalAllocationDataFeature::isCommandEnabled() +{ + std::set wellAllocPlots = RicShowTotalAllocationDataFeature::selectedWellAllocationPlots(); + + if (wellAllocPlots.size() > 0) + { + return true; + } + + return false; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicShowTotalAllocationDataFeature::onActionTriggered(bool isChecked) +{ + this->disableModelChangeContribution(); + + std::set wellAllocPlots = RicShowTotalAllocationDataFeature::selectedWellAllocationPlots(); + CVF_ASSERT(wellAllocPlots.size() > 0); + + for (auto wellAllocPlot : wellAllocPlots) + { + QString txt = wellAllocPlot->description(); + txt += "\n"; + txt += "\n"; + txt += wellAllocPlot->totalWellFlowPlot()->totalAllocationAsText(); + + QString title = "Total Allocation (" + wellAllocPlot->wellName() + ")"; + + RicShowPlotDataFeature::showTextWindow(title, txt); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicShowTotalAllocationDataFeature::setupActionLook(QAction* actionToSetup) +{ + actionToSetup->setText("Show Total Allocation Data"); + //actionToSetup->setIcon(QIcon(":/PlotWindow24x24.png")); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::set RicShowTotalAllocationDataFeature::selectedWellAllocationPlots() +{ + std::set wellAllocPlots; + + std::vector objects; + caf::SelectionManager::instance()->objectsByType(&objects); + for (auto obj : objects) + { + CVF_ASSERT(obj); + + RimWellAllocationPlot* parentPlot = nullptr; + obj->firstAncestorOrThisOfType(parentPlot); + + if (parentPlot) + { + wellAllocPlots.insert(parentPlot); + } + } + + return wellAllocPlots; +} + diff --git a/ApplicationCode/Commands/FlowCommands/RicShowTotalAllocationDataFeature.h b/ApplicationCode/Commands/FlowCommands/RicShowTotalAllocationDataFeature.h new file mode 100644 index 0000000000..6ac89e7e1b --- /dev/null +++ b/ApplicationCode/Commands/FlowCommands/RicShowTotalAllocationDataFeature.h @@ -0,0 +1,42 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafCmdFeature.h" + +#include + +class RimWellAllocationPlot; + +//================================================================================================== +/// +//================================================================================================== +class RicShowTotalAllocationDataFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + +protected: + // Overrides + virtual bool isCommandEnabled() override; + virtual void onActionTriggered(bool isChecked) override; + virtual void setupActionLook(QAction* actionToSetup) override; + +private: + static std::set selectedWellAllocationPlots(); +}; diff --git a/ApplicationCode/Commands/FlowCommands/RicShowWellAllocationPlotFeature.cpp b/ApplicationCode/Commands/FlowCommands/RicShowWellAllocationPlotFeature.cpp new file mode 100644 index 0000000000..51291eeb82 --- /dev/null +++ b/ApplicationCode/Commands/FlowCommands/RicShowWellAllocationPlotFeature.cpp @@ -0,0 +1,90 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicShowWellAllocationPlotFeature.h" + +#include "RiaApplication.h" + +#include "RimEclipseResultCase.h" +#include "RimEclipseWell.h" +#include "RimFlowPlotCollection.h" +#include "RimMainPlotCollection.h" +#include "RimProject.h" +#include "RimView.h" +#include "RimWellAllocationPlot.h" + +#include "RiuMainPlotWindow.h" + +#include "cafSelectionManager.h" + +#include + +CAF_CMD_SOURCE_INIT(RicShowWellAllocationPlotFeature, "RicShowWellAllocationPlotFeature"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicShowWellAllocationPlotFeature::isCommandEnabled() +{ + std::vector collection; + caf::SelectionManager::instance()->objectsByType(&collection); + + if (collection.size() > 0) + { + return true; + } + + return false; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicShowWellAllocationPlotFeature::onActionTriggered(bool isChecked) +{ + std::vector collection; + caf::SelectionManager::instance()->objectsByType(&collection); + + if (collection.size() > 0) + { + RimEclipseWell* eclWell = collection[0]; + + if (RiaApplication::instance()->project()) + { + RimFlowPlotCollection* flowPlotColl = RiaApplication::instance()->project()->mainPlotCollection->flowPlotCollection(); + if (flowPlotColl) + { + flowPlotColl->defaultWellAllocPlot()->setFromSimulationWell(eclWell); + flowPlotColl->defaultWellAllocPlot()->updateConnectedEditors(); + + // Make sure the summary plot window is created and visible + RiuMainPlotWindow* plotwindow = RiaApplication::instance()->getOrCreateAndShowMainPlotWindow(); + plotwindow->selectAsCurrentItem(flowPlotColl->defaultWellAllocPlot()); + } + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicShowWellAllocationPlotFeature::setupActionLook(QAction* actionToSetup) +{ + actionToSetup->setIcon(QIcon(":/WellAllocPlot16x16.png")); + actionToSetup->setText("Plot Well Allocation"); +} diff --git a/ApplicationCode/Commands/FlowCommands/RicShowWellAllocationPlotFeature.h b/ApplicationCode/Commands/FlowCommands/RicShowWellAllocationPlotFeature.h new file mode 100644 index 0000000000..7d804b8640 --- /dev/null +++ b/ApplicationCode/Commands/FlowCommands/RicShowWellAllocationPlotFeature.h @@ -0,0 +1,40 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafCmdFeature.h" + +class RimEclipseWell; + + +//================================================================================================== +/// +//================================================================================================== +class RicShowWellAllocationPlotFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + +protected: + // Overrides + virtual bool isCommandEnabled() override; + virtual void onActionTriggered( bool isChecked ) override; + virtual void setupActionLook( QAction* actionToSetup ) override; +}; + + diff --git a/ApplicationCode/Commands/IntersectionBoxCommands/RicBoxManipulatorEventHandler.h b/ApplicationCode/Commands/IntersectionBoxCommands/RicBoxManipulatorEventHandler.h index 3c8b41a2ac..e2ddb19a46 100644 --- a/ApplicationCode/Commands/IntersectionBoxCommands/RicBoxManipulatorEventHandler.h +++ b/ApplicationCode/Commands/IntersectionBoxCommands/RicBoxManipulatorEventHandler.h @@ -33,7 +33,7 @@ class RicBoxManipulatorEventHandler : public QObject Q_OBJECT public: - RicBoxManipulatorEventHandler(caf::Viewer* viewer); + explicit RicBoxManipulatorEventHandler(caf::Viewer* viewer); ~RicBoxManipulatorEventHandler(); void setOrigin(const cvf::Vec3d& origin); diff --git a/ApplicationCode/Commands/OctaveScriptCommands/RicExecuteScriptFeature.cpp b/ApplicationCode/Commands/OctaveScriptCommands/RicExecuteScriptFeature.cpp index 823c81c140..a0658ec706 100644 --- a/ApplicationCode/Commands/OctaveScriptCommands/RicExecuteScriptFeature.cpp +++ b/ApplicationCode/Commands/OctaveScriptCommands/RicExecuteScriptFeature.cpp @@ -23,6 +23,7 @@ #include "RimCalcScript.h" #include "RiaApplication.h" +#include "RiuMainWindow.h" #include "cafSelectionManager.h" #include "cvfAssert.h" @@ -49,6 +50,9 @@ void RicExecuteScriptFeature::onActionTriggered(bool isChecked) std::vector selection = RicScriptFeatureImpl::selectedScripts(); CVF_ASSERT(selection.size() > 0); + RiuMainWindow* mainWindow = RiuMainWindow::instance(); + mainWindow->showProcessMonitorDockPanel(); + RimCalcScript* calcScript = selection[0]; RiaApplication* app = RiaApplication::instance(); diff --git a/ApplicationCode/Commands/OctaveScriptCommands/RicExecuteScriptForCasesFeature.cpp b/ApplicationCode/Commands/OctaveScriptCommands/RicExecuteScriptForCasesFeature.cpp index d2f2be5204..f9a35557ca 100644 --- a/ApplicationCode/Commands/OctaveScriptCommands/RicExecuteScriptForCasesFeature.cpp +++ b/ApplicationCode/Commands/OctaveScriptCommands/RicExecuteScriptForCasesFeature.cpp @@ -21,6 +21,7 @@ #include "RimCase.h" #include "RiaApplication.h" +#include "RiuMainWindow.h" #include "cafSelectionManager.h" @@ -74,6 +75,9 @@ void RicExecuteScriptForCasesFeature::slotExecuteScriptForSelectedCases() QString scriptAbsolutePath = action->data().toString(); + RiuMainWindow* mainWindow = RiuMainWindow::instance(); + mainWindow->showProcessMonitorDockPanel(); + RiaApplication* app = RiaApplication::instance(); QString octavePath = app->octavePath(); if (!octavePath.isEmpty()) diff --git a/ApplicationCode/Commands/OctaveScriptCommands/RicNewScriptFeature.cpp b/ApplicationCode/Commands/OctaveScriptCommands/RicNewScriptFeature.cpp index dd011f9825..5febff7db3 100644 --- a/ApplicationCode/Commands/OctaveScriptCommands/RicNewScriptFeature.cpp +++ b/ApplicationCode/Commands/OctaveScriptCommands/RicNewScriptFeature.cpp @@ -29,6 +29,8 @@ #include "RiuMainWindow.h" +#include "cafUtils.h" + #include #include #include @@ -76,7 +78,7 @@ void RicNewScriptFeature::onActionTriggered(bool isChecked) fullPathFilenameNewScript = fullPathNewScript + "/untitled.m"; int num= 1; - while (QFileInfo(fullPathFilenameNewScript).exists()) + while (caf::Utils::fileExists(fullPathFilenameNewScript)) { fullPathFilenameNewScript = fullPathNewScript + "/untitled" + QString::number(num) + ".m"; num++; diff --git a/ApplicationCode/Commands/OperationsUsingObjReferences/RicCopyReferencesToClipboardFeature.cpp b/ApplicationCode/Commands/OperationsUsingObjReferences/RicCopyReferencesToClipboardFeature.cpp index 1ded41458c..ac8ff487fd 100644 --- a/ApplicationCode/Commands/OperationsUsingObjReferences/RicCopyReferencesToClipboardFeature.cpp +++ b/ApplicationCode/Commands/OperationsUsingObjReferences/RicCopyReferencesToClipboardFeature.cpp @@ -19,8 +19,17 @@ #include "RicCopyReferencesToClipboardFeature.h" +#include "RimEclipseCase.h" +#include "RimEclipseView.h" +#include "RimGeoMechView.h" #include "RimMimeData.h" +#include "RimSummaryCurveFilter.h" +#include "RimSummaryPlot.h" +#include "RimWellAllocationPlot.h" +#include "RimWellLogPlot.h" +#include "RimWellLogTrack.h" +#include "cafPdmObject.h" #include "cafPdmUiItem.h" #include "cafSelectionManager.h" @@ -40,7 +49,7 @@ CAF_CMD_SOURCE_INIT(RicCopyReferencesToClipboardFeature, "RicCopyReferencesToCli //-------------------------------------------------------------------------------------------------- bool RicCopyReferencesToClipboardFeature::isCommandEnabled() { - return true; + return isAnyCopyableObjectSelected(); } //-------------------------------------------------------------------------------------------------- @@ -48,8 +57,24 @@ bool RicCopyReferencesToClipboardFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicCopyReferencesToClipboardFeature::onActionTriggered(bool isChecked) { + this->disableModelChangeContribution(); + + if (!isAnyCopyableObjectSelected()) return; + std::vector referenceList; - SelectionManager::instance()->selectionAsReferences(referenceList); + + std::vector selectedFormationNamesCollObjs; + caf::SelectionManager::instance()->objectsByType(&selectedFormationNamesCollObjs); + + for (PdmObject* pdmObject : selectedFormationNamesCollObjs) + { + if (RicCopyReferencesToClipboardFeature::isCopyOfObjectSupported(pdmObject)) + { + QString itemRef = PdmReferenceHelper::referenceFromRootToObject(SelectionManager::instance()->pdmRootObject(), pdmObject); + + referenceList.push_back(itemRef); + } + } MimeDataWithReferences* myObject = new MimeDataWithReferences; myObject->setReferences(referenceList); @@ -71,4 +96,70 @@ void RicCopyReferencesToClipboardFeature::setupActionLook(QAction* actionToSetup actionToSetup->setShortcuts(QKeySequence::Copy); } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicCopyReferencesToClipboardFeature::isAnyCopyableObjectSelected() +{ + std::vector selectedFormationNamesCollObjs; + caf::SelectionManager::instance()->objectsByType(&selectedFormationNamesCollObjs); + + for (PdmObject* pdmObject : selectedFormationNamesCollObjs) + { + if (RicCopyReferencesToClipboardFeature::isCopyOfObjectSupported(pdmObject)) + { + return true; + } + } + + return false; +} + + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicCopyReferencesToClipboardFeature::isCopyOfObjectSupported(PdmObject* pdmObject) +{ + RimWellAllocationPlot* wellAllocPlot = nullptr; + pdmObject->firstAncestorOrThisOfType(wellAllocPlot); + + if (dynamic_cast(pdmObject)) + { + return true; + } + else if (dynamic_cast(pdmObject)) + { + return true; + } + else if (dynamic_cast(pdmObject)) + { + return true; + } + else if (dynamic_cast(pdmObject)) + { + return true; + } + else if (dynamic_cast(pdmObject)) + { + return true; + } + else if (dynamic_cast(pdmObject)) + { + return true; + } + else if (dynamic_cast(pdmObject)) + { + if (!wellAllocPlot) return true; + } + else if (dynamic_cast(pdmObject)) + { + if (!wellAllocPlot) return true; + } + + return false; +} + } // end namespace caf diff --git a/ApplicationCode/Commands/OperationsUsingObjReferences/RicCopyReferencesToClipboardFeature.h b/ApplicationCode/Commands/OperationsUsingObjReferences/RicCopyReferencesToClipboardFeature.h index 61b7ac77ab..477eba8a15 100644 --- a/ApplicationCode/Commands/OperationsUsingObjReferences/RicCopyReferencesToClipboardFeature.h +++ b/ApplicationCode/Commands/OperationsUsingObjReferences/RicCopyReferencesToClipboardFeature.h @@ -25,6 +25,8 @@ namespace caf { +class PdmObject; + //================================================================================================== /// //================================================================================================== @@ -37,6 +39,10 @@ class RicCopyReferencesToClipboardFeature : public CmdFeature virtual bool isCommandEnabled(); virtual void onActionTriggered( bool isChecked ); virtual void setupActionLook( QAction* actionToSetup ); + +private: + static bool isAnyCopyableObjectSelected(); + static bool isCopyOfObjectSupported(PdmObject* pdmObject); }; diff --git a/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteEclipseCasesFeature.cpp b/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteEclipseCasesFeature.cpp index be7352935b..1ef1447676 100644 --- a/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteEclipseCasesFeature.cpp +++ b/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteEclipseCasesFeature.cpp @@ -28,6 +28,7 @@ #include "RimCaseCollection.h" #include "RimEclipseCaseCollection.h" #include "RimEclipseResultCase.h" +#include "RimEclipseView.h" #include "RimIdenticalGridCaseGroup.h" #include "RimMimeData.h" #include "RimOilField.h" @@ -116,7 +117,8 @@ void RicPasteEclipseCasesFeature::addCasesToGridCaseGroup(PdmObjectGroup& object RimEclipseResultCase* eclCase = dynamic_cast(objectGroup.objects[i]); if (eclCase) { - RimEclipseResultCase* eclCaseCopy = dynamic_cast(eclCase->copyByXmlSerialization(PdmDefaultObjectFactory::instance())); + RimEclipseResultCase* eclCaseCopy = new RimEclipseResultCase(); + eclCaseCopy->setCaseInfo(eclCase->caseUserDescription(), eclCase->gridFileName()); resultCases.push_back(eclCaseCopy); } } @@ -178,7 +180,7 @@ void RicPasteEclipseCasesFeature::addCasesToGridCaseGroup(PdmObjectGroup& object continue; } - if (!rimResultReservoir->openAndReadActiveCellData(mainResultCase->reservoirData())) + if (!rimResultReservoir->openAndReadActiveCellData(mainResultCase->eclipseCaseData())) { CVF_ASSERT(false); } diff --git a/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteEclipseViewsFeature.cpp b/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteEclipseViewsFeature.cpp index c1fdefbe7a..97fb22d65a 100644 --- a/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteEclipseViewsFeature.cpp +++ b/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteEclipseViewsFeature.cpp @@ -21,6 +21,8 @@ #include "RiaApplication.h" +#include "RiuMainWindow.h" + #include "RicPasteFeatureImpl.h" #include "RimEclipseCase.h" @@ -83,6 +85,8 @@ void RicPasteEclipseViewsFeature::onActionTriggered(bool isChecked) std::vector > eclipseViews; objectGroup.objectsByType(&eclipseViews); + RimEclipseView* lastViewCopy = nullptr; + // Add cases to case group for (size_t i = 0; i < eclipseViews.size(); i++) { @@ -97,16 +101,18 @@ void RicPasteEclipseViewsFeature::onActionTriggered(bool isChecked) // Resolve references after reservoir view has been inserted into Rim structures // Intersections referencing a well path/ simulation well requires this - // TODO: initAfterReadRecursively can probably be removed - rimReservoirView->initAfterReadRecursively(); rimReservoirView->resolveReferencesRecursively(); + rimReservoirView->initAfterReadRecursively(); rimReservoirView->loadDataAndUpdate(); caf::PdmDocument::updateUiIconStateRecursively(rimReservoirView); eclipseCase->updateConnectedEditors(); + lastViewCopy = rimReservoirView; } + + if (lastViewCopy) RiuMainWindow::instance()->selectAsCurrentItem(lastViewCopy); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteFeatureImpl.cpp b/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteFeatureImpl.cpp index 48e392d255..440372f9de 100644 --- a/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteFeatureImpl.cpp +++ b/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteFeatureImpl.cpp @@ -23,6 +23,7 @@ #include "RimCaseCollection.h" #include "RimEclipseCase.h" +#include "RimEclipseView.h" #include "RimGeoMechCase.h" #include "RimGeoMechView.h" #include "RimIdenticalGridCaseGroup.h" diff --git a/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteGeoMechViewsFeature.cpp b/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteGeoMechViewsFeature.cpp index b804d6d3c9..b5c6505452 100644 --- a/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteGeoMechViewsFeature.cpp +++ b/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteGeoMechViewsFeature.cpp @@ -21,6 +21,8 @@ #include "RicPasteFeatureImpl.h" +#include "RiuMainWindow.h" + #include "RimGeoMechView.h" #include "RimGeoMechCase.h" @@ -77,6 +79,8 @@ void RicPasteGeoMechViewsFeature::onActionTriggered(bool isChecked) std::vector > geomViews; objectGroup.objectsByType(&geomViews); + RimGeoMechView* lastViewCopy = nullptr; + // Add cases to case group for (size_t i = 0; i < geomViews.size(); i++) { @@ -89,15 +93,19 @@ void RicPasteGeoMechViewsFeature::onActionTriggered(bool isChecked) // Resolve references after reservoir view has been inserted into Rim structures // Intersections referencing a well path requires this - rimReservoirView->initAfterReadRecursively(); rimReservoirView->resolveReferencesRecursively(); + rimReservoirView->initAfterReadRecursively(); caf::PdmDocument::updateUiIconStateRecursively(rimReservoirView); rimReservoirView->loadDataAndUpdate(); geomCase->updateConnectedEditors(); + + lastViewCopy = rimReservoirView; } + + if (lastViewCopy) RiuMainWindow::instance()->selectAsCurrentItem(lastViewCopy); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/Commands/RicCloseCaseFeature.cpp b/ApplicationCode/Commands/RicCloseCaseFeature.cpp index a239d440b5..aca46ec016 100644 --- a/ApplicationCode/Commands/RicCloseCaseFeature.cpp +++ b/ApplicationCode/Commands/RicCloseCaseFeature.cpp @@ -158,6 +158,26 @@ void RicCloseCaseFeature::deleteEclipseCase(RimEclipseCase* eclipseCase) } else { + RimIdenticalGridCaseGroup* caseGroup = caseCollection->parentCaseGroup(); + if (caseGroup) + { + // When deleting the last source case for statistics, remove any views on statistics cases. + // This is done because the views do not work well + if (caseGroup->caseCollection()->reservoirs.size() == 1) + { + std::vector children; + caseGroup->statisticsCaseCollection()->reservoirs.childObjects(&children); + + for (size_t i = children.size(); i-- > 0;) + { + caf::PdmObjectHandle* obj = children[i]; + delete obj; + caseGroup->statisticsCaseCollection()->reservoirs.erase(i); + } + + caseGroup->statisticsCaseCollection()->uiCapability()->updateConnectedEditors(); + } + } removeCaseFromAllGroups(eclipseCase); } } diff --git a/ApplicationCode/Commands/RicDeleteItemExec.h b/ApplicationCode/Commands/RicDeleteItemExec.h index c58817b347..e733702f45 100644 --- a/ApplicationCode/Commands/RicDeleteItemExec.h +++ b/ApplicationCode/Commands/RicDeleteItemExec.h @@ -33,7 +33,7 @@ class RicDeleteItemExecData; class RicDeleteItemExec : public CmdExecuteCommand { public: - RicDeleteItemExec(NotificationCenter* notificationCenter); + explicit RicDeleteItemExec(NotificationCenter* notificationCenter); RicDeleteItemExecData* commandData(); diff --git a/ApplicationCode/Commands/RicDeleteItemFeature.cpp b/ApplicationCode/Commands/RicDeleteItemFeature.cpp index 3a936a2e85..78a495e348 100644 --- a/ApplicationCode/Commands/RicDeleteItemFeature.cpp +++ b/ApplicationCode/Commands/RicDeleteItemFeature.cpp @@ -21,6 +21,25 @@ #include "RicDeleteItemExec.h" #include "RicDeleteItemExecData.h" +#include "RimCellRangeFilter.h" +#include "RimEclipseInputProperty.h" +#include "RimEclipsePropertyFilter.h" +#include "RimEclipseView.h" +#include "RimFormationNames.h" +#include "RimFormationNamesCollection.h" +#include "RimGeoMechPropertyFilter.h" +#include "RimGeoMechView.h" +#include "RimGridTimeHistoryCurve.h" +#include "RimIdenticalGridCaseGroup.h" +#include "RimIntersection.h" +#include "RimIntersectionBox.h" +#include "RimSummaryCurve.h" +#include "RimSummaryCurveFilter.h" +#include "RimSummaryPlot.h" +#include "RimViewController.h" +#include "RimWellAllocationPlot.h" +#include "RimWellFlowRateCurve.h" +#include "RimWellLogCurve.h" #include "RimWellLogPlot.h" #include "RimWellLogTrack.h" @@ -32,22 +51,6 @@ #include "cafSelectionManager.h" #include -#include "RimGeoMechView.h" -#include "RimEclipseView.h" -#include "RimIdenticalGridCaseGroup.h" -#include "RimEclipseInputProperty.h" -#include "RimCellRangeFilter.h" -#include "RimEclipsePropertyFilter.h" -#include "RimGeoMechPropertyFilter.h" -#include "RimViewController.h" -#include "RimWellLogCurve.h" -#include "RimSummaryCurve.h" -#include "RimSummaryCurveFilter.h" -#include "RimIntersection.h" -#include "RimIntersectionBox.h" -#include "RimFormationNames.h" -#include "RimFormationNamesCollection.h" -#include "RimSummaryPlot.h" namespace caf { @@ -55,6 +58,22 @@ namespace caf bool isDeletable(PdmUiItem * uiItem) { + // Enable delete of well allocation plots + if (dynamic_cast(uiItem)) return true; + + // Disable delete of all sub objects of a well allocation plot + caf::PdmObjectHandle* destinationObject = dynamic_cast(uiItem); + if (destinationObject) + { + RimWellAllocationPlot* wellAllocationPlot = nullptr; + destinationObject->firstAncestorOrThisOfType(wellAllocationPlot); + + if (wellAllocationPlot) + { + return false; + } + } + if (dynamic_cast(uiItem)) return true; if (dynamic_cast(uiItem)) return true; if (dynamic_cast(uiItem)) return true; @@ -67,6 +86,7 @@ bool isDeletable(PdmUiItem * uiItem) if (dynamic_cast(uiItem)) return true; if (dynamic_cast(uiItem)) return true; if (dynamic_cast(uiItem)) return true; + if (dynamic_cast(uiItem)) return true; if (dynamic_cast(uiItem)) return true; if (dynamic_cast(uiItem)) return true; if (dynamic_cast(uiItem)) return true; diff --git a/ApplicationCode/Commands/RicDeleteSubItemsFeature.cpp b/ApplicationCode/Commands/RicDeleteSubItemsFeature.cpp new file mode 100644 index 0000000000..e7d81966a6 --- /dev/null +++ b/ApplicationCode/Commands/RicDeleteSubItemsFeature.cpp @@ -0,0 +1,112 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicDeleteSubItemsFeature.h" + +#include "RimSummaryPlotCollection.h" +#include "RimWellPathCollection.h" + +#include "cafPdmUiItem.h" +#include "cafSelectionManager.h" + +#include + + +CAF_CMD_SOURCE_INIT(RicDeleteSubItemsFeature, "RicDeleteSubItemsFeature"); + + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicDeleteSubItemsFeature::isCommandEnabled() +{ + std::vector items; + caf::SelectionManager::instance()->selectedItems(items); + + if (items.empty()) return false; + + for (auto* item : items) + { + if (!RicDeleteSubItemsFeature::hasDeletableSubItems(item)) return false; + } + + return true; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicDeleteSubItemsFeature::onActionTriggered(bool isChecked) +{ + std::vector items; + caf::SelectionManager::instance()->selectedItems(items); + + CVF_ASSERT(items.size() > 0); + + for (auto item : items) + { + if (!RicDeleteSubItemsFeature::hasDeletableSubItems(item)) continue; + + RimSummaryPlotCollection* summaryPlotColl = dynamic_cast(item); + if (summaryPlotColl) + { + summaryPlotColl->summaryPlots.deleteAllChildObjects(); + + summaryPlotColl->updateConnectedEditors(); + } + + RimWellPathCollection* wellPathColl = dynamic_cast(item); + if (wellPathColl) + { + wellPathColl->deleteAllWellPaths(); + + wellPathColl->updateConnectedEditors(); + wellPathColl->scheduleGeometryRegenAndRedrawViews(); + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicDeleteSubItemsFeature::setupActionLook(QAction* actionToSetup) +{ + actionToSetup->setText("Delete Sub Items"); + actionToSetup->setIcon(QIcon(":/Erase.png")); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicDeleteSubItemsFeature::hasDeletableSubItems(caf::PdmUiItem* uiItem) +{ + RimSummaryPlotCollection* summaryPlotColl = dynamic_cast(uiItem); + if (summaryPlotColl && summaryPlotColl->summaryPlots().size() > 0) + { + return true; + } + + RimWellPathCollection* wellPathColl = dynamic_cast(uiItem); + if (wellPathColl && wellPathColl->wellPaths().size() > 0) + { + return true; + } + + return false; +} diff --git a/ApplicationCode/Commands/RicDeleteSubItemsFeature.h b/ApplicationCode/Commands/RicDeleteSubItemsFeature.h new file mode 100644 index 0000000000..72c80b7583 --- /dev/null +++ b/ApplicationCode/Commands/RicDeleteSubItemsFeature.h @@ -0,0 +1,43 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafCmdFeature.h" + +namespace caf { + class PdmUiItem; +} + +//================================================================================================== +/// +//================================================================================================== +class RicDeleteSubItemsFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; +protected: + + // Overrides + virtual bool isCommandEnabled(); + virtual void onActionTriggered( bool isChecked ); + virtual void setupActionLook( QAction* actionToSetup ); + +private: + static bool hasDeletableSubItems(caf::PdmUiItem* uiItem); +}; + diff --git a/ApplicationCode/Commands/RicExportFaultsFeature.cpp b/ApplicationCode/Commands/RicExportFaultsFeature.cpp index 293567a759..431ed0f0e2 100644 --- a/ApplicationCode/Commands/RicExportFaultsFeature.cpp +++ b/ApplicationCode/Commands/RicExportFaultsFeature.cpp @@ -20,16 +20,21 @@ #include "RicExportFaultsFeature.h" #include "RiaApplication.h" -#include "cafSelectionManager.h" + +#include "RigEclipseCaseData.h" +#include "RigFault.h" +#include "RigMainGrid.h" + +#include "RimDefines.h" +#include "RimEclipseCase.h" #include "RimFault.h" +#include "cafSelectionManager.h" +#include "cafUtils.h" + #include #include -#include "RimEclipseCase.h" -#include "RigFault.h" -#include "RigMainGrid.h" -#include "RigCaseData.h" -#include "QMessageBox" +#include CAF_CMD_SOURCE_INIT(RicExportFaultsFeature, "RicExportFaultsFeature"); @@ -52,6 +57,8 @@ bool RicExportFaultsFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicExportFaultsFeature::onActionTriggered(bool isChecked) { + this->disableModelChangeContribution(); + std::vector selectedFaults; caf::SelectionManager::instance()->objectsByType(&selectedFaults); @@ -65,6 +72,11 @@ void RicExportFaultsFeature::onActionTriggered(bool isChecked) QString selectedDir = QFileDialog::getExistingDirectory(NULL, tr("Select Directory"), defaultDir); + if (selectedDir.isNull()) { + // Stop if folder selection was cancelled. + return; + } + for (RimFault* rimFault : selectedFaults) { RimEclipseCase* eclCase = nullptr; @@ -79,11 +91,11 @@ void RicExportFaultsFeature::onActionTriggered(bool isChecked) if ( faultName == RimDefines::undefinedGridFaultWithInactiveName() ) faultName = "UNDEF_IA"; QString baseFilename = "Fault_" + faultName + "_" + caseName; - baseFilename.replace(" ", "_"); + baseFilename = caf::Utils::makeValidFileBasename(baseFilename); QString completeFilename = selectedDir + "/" + baseFilename + ".grdecl"; - RicExportFaultsFeature::saveFault(completeFilename, eclCase->reservoirData()->mainGrid(), rimFault->faultGeometry()->faultFaces(), faultName); + RicExportFaultsFeature::saveFault(completeFilename, eclCase->eclipseCaseData()->mainGrid(), rimFault->faultGeometry()->faultFaces(), faultName); } @@ -101,6 +113,75 @@ void RicExportFaultsFeature::setupActionLook(QAction* actionToSetup) actionToSetup->setIcon(QIcon(":/Save.png")); } +//-------------------------------------------------------------------------------------------------- +/// Order FaultCellAndFace by i, j, face then k. +//-------------------------------------------------------------------------------------------------- +bool RicExportFaultsFeature::faultOrdering(FaultCellAndFace first, FaultCellAndFace second) + { + size_t i1, i2, j1, j2, k1, k2; + cvf::StructGridInterface::FaceType f1, f2; + std::tie(i1, j1, k1, f1) = first; + std::tie(i2, j2, k2, f2) = second; + if (i1 == i2) + { + if (j1 == j2) + { + if (f1 == f2) + { + return k1 < k2; + } + else + { + return f1 < f2; + } + } + else + { + return j1 < j2; + } + } + else + { + return i1 < i2; + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RicExportFaultsFeature::faceText(cvf::StructGridInterface::FaceType faceType) +{ + switch (faceType) + { + case cvf::StructGridInterface::POS_I: return QString(" I"); + case cvf::StructGridInterface::NEG_I: return QString("-I"); + case cvf::StructGridInterface::POS_J: return QString(" J"); + case cvf::StructGridInterface::NEG_J: return QString("-J"); + case cvf::StructGridInterface::POS_K: return QString(" K"); + case cvf::StructGridInterface::NEG_K: return QString("-K"); + default: CVF_ASSERT(false); + } + return ""; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicExportFaultsFeature::writeLine(QTextStream & stream, QString faultName, size_t i, size_t j, size_t startK, size_t endK, cvf::StructGridInterface::FaceType faceType) +{ + // Convert indices to eclipse format + i++; + j++; + startK++; + endK++; + + stream << "'" << faultName << "'" << " " << i << " " << i + << " " << j << " " << j + << " " << startK << " " << endK + << " " << RicExportFaultsFeature::faceText(faceType) << " / "; + stream << endl; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -121,33 +202,55 @@ void RicExportFaultsFeature::saveFault(QString completeFilename, const RigMainGr stream << "-- Name I1 I2 J1 J2 K1 K2 Face ( I/J/K )" << endl; // 'NAME' 1 1 1 1 1 2 J / - - for (const RigFault::FaultFace& fface: faultFaces) - { - size_t i1, j1, k1, i2, j2, k2; + + std::vector faultCellAndFaces; - bool ok = mainGrid->ijkFromCellIndex(fface.m_nativeReservoirCellIndex, &i1, &j1, &k1); + for (const RigFault::FaultFace& faultCellAndFace : faultFaces) + { + size_t i, j, k; + bool ok = mainGrid->ijkFromCellIndex(faultCellAndFace.m_nativeReservoirCellIndex, &i, &j, &k); if (!ok) continue; - ok = mainGrid->ijkFromCellIndex(fface.m_oppositeReservoirCellIndex, &i2, &j2, &k2); - QString faceText; - switch (fface.m_nativeFace) + faultCellAndFaces.push_back(std::make_tuple(i, j, k, faultCellAndFace.m_nativeFace)); + } + + // Sort order: i, j, face then k. + std::sort(faultCellAndFaces.begin(), faultCellAndFaces.end(), RicExportFaultsFeature::faultOrdering); + + size_t lastI = std::numeric_limits::max(); + size_t lastJ = std::numeric_limits::max(); + size_t lastK = std::numeric_limits::max(); + size_t startK = std::numeric_limits::max(); + cvf::StructGridInterface::FaceType lastFaceType = cvf::StructGridInterface::FaceType::NO_FACE; + + for (const FaultCellAndFace &faultCellAndFace : faultCellAndFaces) + { + size_t i, j, k; + cvf::StructGridInterface::FaceType faceType; + std::tie(i, j, k, faceType) = faultCellAndFace; + + if (i != lastI || j != lastJ || lastFaceType != faceType || k != lastK+1) { - case cvf::StructGridInterface::POS_I: faceText = " I"; break; - case cvf::StructGridInterface::NEG_I: faceText = "-I"; break; - case cvf::StructGridInterface::POS_J: faceText = " J"; break; - case cvf::StructGridInterface::NEG_J: faceText = "-J"; break; - case cvf::StructGridInterface::POS_K: faceText = " K"; break; - case cvf::StructGridInterface::NEG_K: faceText = "-K"; break; + // No fault should have no face + if (lastFaceType != cvf::StructGridInterface::FaceType::NO_FACE) + { + RicExportFaultsFeature::writeLine(stream, faultName, lastI, lastJ, startK, lastK, lastFaceType); + } + lastI = i; + lastJ = j; + lastK = k; + lastFaceType = faceType; + startK = k; + } + else + { + lastK = k; } - - stream << "'" << faultName << "'" << " " << i1 << " " << i2 - << " " << j1 << " " << j2 - << " " << k1 << " " << k2 - << " " << faceText << " / "; - stream << endl ; } - + // No fault should have no face + if (lastFaceType != cvf::StructGridInterface::FaceType::NO_FACE) + { + RicExportFaultsFeature::writeLine(stream, faultName, lastI, lastJ, startK, lastK, lastFaceType); + } stream << "/" << endl; - -} \ No newline at end of file +} diff --git a/ApplicationCode/Commands/RicExportFaultsFeature.h b/ApplicationCode/Commands/RicExportFaultsFeature.h index 33f9e5f78b..5633e1b4f1 100644 --- a/ApplicationCode/Commands/RicExportFaultsFeature.h +++ b/ApplicationCode/Commands/RicExportFaultsFeature.h @@ -26,6 +26,8 @@ class RigMainGrid; +typedef std::tuple FaultCellAndFace; + //================================================================================================== /// //================================================================================================== @@ -41,5 +43,8 @@ class RicExportFaultsFeature : public caf::CmdFeature private: static void saveFault(QString completeFilename, const RigMainGrid* mainGrid, const std::vector& faultFaces, QString faultName); + static bool faultOrdering(FaultCellAndFace first, FaultCellAndFace second); + static QString faceText(cvf::StructGridInterface::FaceType faceType); + static void writeLine(QTextStream &stream, QString faultName, size_t i, size_t j, size_t startK, size_t endK, cvf::StructGridInterface::FaceType faceType); }; diff --git a/ApplicationCode/Commands/RicExportMultipleSnapshotsFeature.cpp b/ApplicationCode/Commands/RicExportMultipleSnapshotsFeature.cpp new file mode 100644 index 0000000000..5d8c09df3a --- /dev/null +++ b/ApplicationCode/Commands/RicExportMultipleSnapshotsFeature.cpp @@ -0,0 +1,325 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicExportMultipleSnapshotsFeature.h" + +#include "RiaApplication.h" + +#include "RicSnapshotViewToClipboardFeature.h" + +#include "RigFemResultPosEnum.h" + +#include "RimCase.h" +#include "RimCellRangeFilter.h" +#include "RimCellRangeFilterCollection.h" +#include "RimEclipseCase.h" +#include "RimEclipseCellColors.h" +#include "RimEclipseView.h" +#include "RimGeoMechCase.h" +#include "RimGeoMechCellColors.h" +#include "RimGeoMechResultDefinition.h" +#include "RimGeoMechView.h" +#include "RimMultiSnapshotDefinition.h" +#include "RimProject.h" +#include "RimView.h" + +#include "RiuExportMultipleSnapshotsWidget.h" +#include "RiuViewer.h" + +#include "cafCmdExecCommandManager.h" +#include "cafFrameAnimationControl.h" +#include "cafUtils.h" + +#include +#include +#include + + +CAF_CMD_SOURCE_INIT(RicExportMultipleSnapshotsFeature, "RicExportMultipleSnapshotsFeature"); + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicExportMultipleSnapshotsFeature::isCommandEnabled() +{ + RimProject* proj = RiaApplication::instance()->project(); + + return proj; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicExportMultipleSnapshotsFeature::onActionTriggered(bool isChecked) +{ + this->disableModelChangeContribution(); + + RimProject* proj = RiaApplication::instance()->project(); + + if (proj) + { + // Enable the command system to be able to assign a value to multiple fields at the same time + caf::CmdExecCommandSystemActivator activator; + + RiuExportMultipleSnapshotsWidget dlg(nullptr, proj); + + RimView* activeView = RiaApplication::instance()->activeReservoirView(); + if (activeView && proj->multiSnapshotDefinitions.size() == 0) + { + dlg.addSnapshotItemFromActiveView(); + dlg.addEmptySnapshotItems(4); + } + + dlg.exec(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicExportMultipleSnapshotsFeature::setupActionLook(QAction* actionToSetup) +{ + actionToSetup->setText("Advanced Snapshot Export ..."); + actionToSetup->setIcon(QIcon(":/SnapShotSaveViews.png")); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicExportMultipleSnapshotsFeature::exportMultipleSnapshots(const QString& folder, RimProject* project) +{ + if (!project) return; + + QDir snapshotPath(folder); + if (!snapshotPath.exists()) + { + if (!snapshotPath.mkpath(".")) return; + } + + for (RimMultiSnapshotDefinition* msd : project->multiSnapshotDefinitions()) + { + if (!msd->isActive()) continue; + + RimView* sourceView = msd->view(); + if (!sourceView) continue; + if (!sourceView->viewer()) continue; + + int initialFramIndex = sourceView->viewer()->currentFrameIndex(); + + //exportViewVariations(sourceView, msd, folder); + + for (RimCase* rimCase : msd->additionalCases()) + { + RimEclipseCase* eclCase = dynamic_cast(rimCase); + RimEclipseView* sourceEclipseView = dynamic_cast(sourceView); + if (eclCase && sourceEclipseView) + { + RimEclipseView* copyOfEclipseView = eclCase->createCopyAndAddView(sourceEclipseView); + CVF_ASSERT(copyOfEclipseView); + + copyOfEclipseView->loadDataAndUpdate(); + + exportViewVariations(copyOfEclipseView, msd, folder); + + eclCase->reservoirViews().removeChildObject(copyOfEclipseView); + + delete copyOfEclipseView; + } + + RimGeoMechCase* geomCase = dynamic_cast(rimCase); + RimGeoMechView* sourceGeoMechView = dynamic_cast(sourceView); + if (geomCase && sourceGeoMechView) + { + RimGeoMechView* copyOfGeoMechView = dynamic_cast(sourceGeoMechView->xmlCapability()->copyByXmlSerialization(caf::PdmDefaultObjectFactory::instance())); + CVF_ASSERT(copyOfGeoMechView); + + geomCase->geoMechViews().push_back(copyOfGeoMechView); + + copyOfGeoMechView->setGeoMechCase(geomCase); + + // Resolve references after reservoir view has been inserted into Rim structures + copyOfGeoMechView->resolveReferencesRecursively(); + copyOfGeoMechView->initAfterReadRecursively(); + + copyOfGeoMechView->loadDataAndUpdate(); + + exportViewVariations(copyOfGeoMechView, msd, folder); + + geomCase->geoMechViews().removeChildObject(copyOfGeoMechView); + + delete copyOfGeoMechView; + } + } + + // Set view back to initial state + sourceView->viewer()->setCurrentFrame(initialFramIndex); + sourceView->viewer()->animationControl()->setCurrentFrameOnly(initialFramIndex); + + sourceView->scheduleCreateDisplayModelAndRedraw(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicExportMultipleSnapshotsFeature::exportViewVariations(RimView* rimView, RimMultiSnapshotDefinition* msd, const QString& folder) +{ + if (msd->selectedEclipseResults().size() > 0) + { + RimEclipseCase* eclCase = dynamic_cast(rimView->ownerCase()); + + RimEclipseView* copyOfView = eclCase->createCopyAndAddView(dynamic_cast(rimView)); + + copyOfView->cellResult()->setResultType(msd->eclipseResultType()); + + for (QString s : msd->selectedEclipseResults()) + { + copyOfView->cellResult()->setResultVariable(s); + + copyOfView->loadDataAndUpdate(); + + exportViewVariationsToFolder(copyOfView, msd, folder); + } + + eclCase->reservoirViews().removeChildObject(copyOfView); + + delete copyOfView; + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicExportMultipleSnapshotsFeature::exportViewVariationsToFolder(RimView* rimView, RimMultiSnapshotDefinition* msd, const QString& folder) +{ + RimCase* rimCase = rimView->ownerCase(); + CVF_ASSERT(rimCase); + + RiuViewer* viewer = rimView->viewer(); + QStringList timeSteps = rimCase->timeStepStrings(); + + QString resName = resultName(rimView); + QString viewCaseResultString = rimCase->caseUserDescription() + "_" + rimView->name() + "_" + resName; + viewCaseResultString = caf::Utils::makeValidFileBasename(viewCaseResultString); + + for (int i = msd->timeStepStart(); i <= msd->timeStepEnd(); i++) + { + QString timeStepIndexString = QString("%1").arg(i, 2, 10, QLatin1Char('0')); + + QString timeStepString = timeStepIndexString + "_" + timeSteps[i].replace(".", "-"); + + if (viewer) + { + // Force update of scheduled display models modifying the time step + // This is required due to visualization structures updated by the update functions, + // and this is not triggered by changing time step only + RiaApplication::instance()->slotUpdateScheduledDisplayModels(); + + viewer->setCurrentFrame(i); + viewer->animationControl()->setCurrentFrameOnly(i); + } + + if (msd->sliceDirection == RimMultiSnapshotDefinition::NO_RANGEFILTER) + { + QString fileName = viewCaseResultString + "_" + timeStepString; + QString absoluteFileName = caf::Utils::constructFullFileName(folder, fileName, ".png"); + absoluteFileName.replace(" ", "_"); + + RicSnapshotViewToFileFeature::saveSnapshotAs(absoluteFileName, rimView); + } + else + { + RimCellRangeFilter* rangeFilter = new RimCellRangeFilter; + rimView->rangeFilterCollection()->rangeFilters.push_back(rangeFilter); + + bool rangeFilterInitState = rimView->rangeFilterCollection()->isActive(); + rimView->rangeFilterCollection()->isActive = true; + + for (int i = msd->startSliceIndex(); i <= msd->endSliceIndex(); i++) + { + QString rangeFilterString = msd->sliceDirection().text() + "-" + QString::number(i); + QString fileName = viewCaseResultString + "_" + timeStepString + "_" + rangeFilterString; + + rangeFilter->setDefaultValues(); + if (msd->sliceDirection == RimMultiSnapshotDefinition::RANGEFILTER_I) + { + rangeFilter->cellCountI = 1; + rangeFilter->startIndexI = i; + } + else if (msd->sliceDirection == RimMultiSnapshotDefinition::RANGEFILTER_J) + { + rangeFilter->cellCountJ = 1; + rangeFilter->startIndexJ = i; + } + else if (msd->sliceDirection == RimMultiSnapshotDefinition::RANGEFILTER_K) + { + rangeFilter->cellCountK = 1; + rangeFilter->startIndexK = i; + } + + rimView->rangeFilterCollection()->updateDisplayModeNotifyManagedViews(rangeFilter); + + QString absoluteFileName = caf::Utils::constructFullFileName(folder, fileName, ".png"); + absoluteFileName.replace(" ", "_"); + + RicSnapshotViewToFileFeature::saveSnapshotAs(absoluteFileName, rimView); + } + + rimView->rangeFilterCollection()->rangeFilters.removeChildObject(rangeFilter); + delete rangeFilter; + + rimView->rangeFilterCollection()->isActive = rangeFilterInitState; + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RicExportMultipleSnapshotsFeature::resultName(RimView* rimView) +{ + if (dynamic_cast(rimView)) + { + RimEclipseView* eclView = dynamic_cast(rimView); + + return caf::Utils::makeValidFileBasename(eclView->cellResult()->resultVariableUiShortName()); + } + else if (dynamic_cast(rimView)) + { + RimGeoMechView* geoMechView = dynamic_cast(rimView); + + RimGeoMechCellColors* cellResult = geoMechView->cellResult(); + + if (cellResult) + { + QString title = caf::AppEnum(cellResult->resultPositionType()).uiText() + "_" + + cellResult->resultFieldUiName(); + + if (!cellResult->resultComponentUiName().isEmpty()) + { + title += "_" + cellResult->resultComponentUiName(); + } + + return title; + } + } + + return ""; +} + diff --git a/ApplicationCode/Commands/RicExportMultipleSnapshotsFeature.h b/ApplicationCode/Commands/RicExportMultipleSnapshotsFeature.h new file mode 100644 index 0000000000..8073afbe0d --- /dev/null +++ b/ApplicationCode/Commands/RicExportMultipleSnapshotsFeature.h @@ -0,0 +1,48 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafCmdFeature.h" + +class RimMultiSnapshotDefinition; +class RimProject; +class RimView; + +//================================================================================================== +/// +//================================================================================================== +class RicExportMultipleSnapshotsFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + +protected: + virtual bool isCommandEnabled() override; + virtual void onActionTriggered( bool isChecked ) override; + virtual void setupActionLook(QAction* actionToSetup) override; + +public: + static void exportMultipleSnapshots(const QString& folder, RimProject* project); + + static void exportViewVariations(RimView* rimView, RimMultiSnapshotDefinition* msd, const QString& folder); + +private: + static void exportViewVariationsToFolder(RimView* rimView, RimMultiSnapshotDefinition* msd, const QString& folder); + static QString resultName(RimView* rimView); +}; + diff --git a/ApplicationCode/Commands/RicExportToLasFileFeature.cpp b/ApplicationCode/Commands/RicExportToLasFileFeature.cpp index 4c9cb68ca7..2ea0a32da8 100644 --- a/ApplicationCode/Commands/RicExportToLasFileFeature.cpp +++ b/ApplicationCode/Commands/RicExportToLasFileFeature.cpp @@ -19,9 +19,14 @@ #include "RicExportToLasFileFeature.h" -#include "RiaApplication.h" #include "RicExportToLasFileResampleUi.h" +#include "WellLogCommands/RicWellLogPlotCurveFeatureImpl.h" + +#include "RiaApplication.h" + #include "RigLasFileExporter.h" +#include "RigWellLogCurveData.h" + #include "RimWellLogCurve.h" #include "cafPdmUiPropertyViewDialog.h" @@ -39,7 +44,9 @@ CAF_CMD_SOURCE_INIT(RicExportToLasFileFeature, "RicExportToLasFileFeature"); //-------------------------------------------------------------------------------------------------- bool RicExportToLasFileFeature::isCommandEnabled() { - return selectedWellLogCurves().size() > 0; + if (RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot()) return false; + + return RicWellLogPlotCurveFeatureImpl::selectedWellLogCurves().size() > 0; } //-------------------------------------------------------------------------------------------------- @@ -47,7 +54,11 @@ bool RicExportToLasFileFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicExportToLasFileFeature::onActionTriggered(bool isChecked) { - std::vector curves = selectedWellLogCurves(); + this->disableModelChangeContribution(); + + if (RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot()) return; + + std::vector curves = RicWellLogPlotCurveFeatureImpl::selectedWellLogCurves(); if (curves.size() == 0) return; RiaApplication* app = RiaApplication::instance(); @@ -103,39 +114,3 @@ void RicExportToLasFileFeature::setupActionLook(QAction* actionToSetup) actionToSetup->setText("Export To LAS Files..."); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -std::vector RicExportToLasFileFeature::selectedWellLogCurves() const -{ - std::set curveSet; - - { - std::vector selectedItems; - caf::SelectionManager::instance()->selectedItems(selectedItems); - - for (auto selectedItem : selectedItems) - { - caf::PdmObjectHandle* objHandle = dynamic_cast(selectedItem); - if (objHandle) - { - std::vector childCurves; - objHandle->descendantsIncludingThisOfType(childCurves); - - for (auto curve : childCurves) - { - curveSet.insert(curve); - } - } - } - } - - std::vector allCurves; - for (auto curve : curveSet) - { - allCurves.push_back(curve); - } - - return allCurves; -} - diff --git a/ApplicationCode/Commands/RicExportToLasFileFeature.h b/ApplicationCode/Commands/RicExportToLasFileFeature.h index a3d5526e53..ebb1362d00 100644 --- a/ApplicationCode/Commands/RicExportToLasFileFeature.h +++ b/ApplicationCode/Commands/RicExportToLasFileFeature.h @@ -37,8 +37,5 @@ class RicExportToLasFileFeature : public caf::CmdFeature virtual bool isCommandEnabled(); virtual void onActionTriggered( bool isChecked ); virtual void setupActionLook( QAction* actionToSetup ); - -private: - std::vector selectedWellLogCurves() const; }; diff --git a/ApplicationCode/Commands/RicExportToLasFileResampleUi.cpp b/ApplicationCode/Commands/RicExportToLasFileResampleUi.cpp index 3f45167a4d..43125dc085 100644 --- a/ApplicationCode/Commands/RicExportToLasFileResampleUi.cpp +++ b/ApplicationCode/Commands/RicExportToLasFileResampleUi.cpp @@ -121,7 +121,7 @@ void RicExportToLasFileResampleUi::defineEditorAttribute(const caf::PdmFieldHand { if (field == &exportFolder) { - caf::PdmUiFilePathEditorAttribute* myAttr = static_cast(attribute); + caf::PdmUiFilePathEditorAttribute* myAttr = dynamic_cast(attribute); if (myAttr) { myAttr->m_selectDirectory = true; @@ -130,7 +130,7 @@ void RicExportToLasFileResampleUi::defineEditorAttribute(const caf::PdmFieldHand if (field == &exportTvdrkb || field == &activateResample) { - caf::PdmUiCheckBoxEditorAttribute* myAttr = static_cast(attribute); + caf::PdmUiCheckBoxEditorAttribute* myAttr = dynamic_cast(attribute); if (myAttr) { myAttr->m_useNativeCheckBoxLabel = true; diff --git a/ApplicationCode/Commands/RicGeoMechPropertyFilterInsertExec.h b/ApplicationCode/Commands/RicGeoMechPropertyFilterInsertExec.h index 4127c1cf03..9eb488cafe 100644 --- a/ApplicationCode/Commands/RicGeoMechPropertyFilterInsertExec.h +++ b/ApplicationCode/Commands/RicGeoMechPropertyFilterInsertExec.h @@ -30,7 +30,7 @@ class RimGeoMechPropertyFilter; class RicGeoMechPropertyFilterInsertExec : public caf::CmdExecuteCommand { public: - RicGeoMechPropertyFilterInsertExec(RimGeoMechPropertyFilter* propertyFilter); + explicit RicGeoMechPropertyFilterInsertExec(RimGeoMechPropertyFilter* propertyFilter); virtual ~RicGeoMechPropertyFilterInsertExec(); virtual QString name(); diff --git a/ApplicationCode/Commands/RicGeoMechPropertyFilterNewExec.h b/ApplicationCode/Commands/RicGeoMechPropertyFilterNewExec.h index da2cebfd95..32d77f2d51 100644 --- a/ApplicationCode/Commands/RicGeoMechPropertyFilterNewExec.h +++ b/ApplicationCode/Commands/RicGeoMechPropertyFilterNewExec.h @@ -30,7 +30,7 @@ class RimGeoMechPropertyFilterCollection; class RicGeoMechPropertyFilterNewExec : public caf::CmdExecuteCommand { public: - RicGeoMechPropertyFilterNewExec(RimGeoMechPropertyFilterCollection* propertyFilterCollection); + explicit RicGeoMechPropertyFilterNewExec(RimGeoMechPropertyFilterCollection* propertyFilterCollection); virtual ~RicGeoMechPropertyFilterNewExec(); virtual QString name(); diff --git a/ApplicationCode/Commands/RicImportSummaryCaseFeature.cpp b/ApplicationCode/Commands/RicImportSummaryCaseFeature.cpp index da00e9c3e4..66ed83b6e5 100644 --- a/ApplicationCode/Commands/RicImportSummaryCaseFeature.cpp +++ b/ApplicationCode/Commands/RicImportSummaryCaseFeature.cpp @@ -19,6 +19,7 @@ #include "RicImportSummaryCaseFeature.h" #include "RiaApplication.h" +#include "RiaPreferences.h" #include "RimGridSummaryCase.h" #include "RimMainPlotCollection.h" @@ -102,10 +103,14 @@ bool RicImportSummaryCaseFeature::createAndAddSummaryCaseFromFile(const QString& RimSummaryCase* newSumCase = sumCaseColl->createAndAddSummaryCaseFromFileName(fileName); newSumCase->loadCase(); - RimMainPlotCollection* mainPlotColl = proj->mainPlotCollection(); - RimSummaryPlotCollection* summaryPlotColl = mainPlotColl->summaryPlotCollection(); - RicNewSummaryPlotFeature::createNewSummaryPlot(summaryPlotColl, newSumCase); + if (app->preferences()->autoCreatePlotsOnImport()) + { + RimMainPlotCollection* mainPlotColl = proj->mainPlotCollection(); + RimSummaryPlotCollection* summaryPlotColl = mainPlotColl->summaryPlotCollection(); + + RicNewSummaryPlotFeature::createNewSummaryPlot(summaryPlotColl, newSumCase); + } sumCaseColl->updateConnectedEditors(); app->addToRecentFiles(fileName); diff --git a/ApplicationCode/Commands/RicNewViewFeature.cpp b/ApplicationCode/Commands/RicNewViewFeature.cpp index 967efa7d1b..c4b6dd5a71 100644 --- a/ApplicationCode/Commands/RicNewViewFeature.cpp +++ b/ApplicationCode/Commands/RicNewViewFeature.cpp @@ -26,6 +26,7 @@ #include "RimView.h" #include "RiuMainWindow.h" +#include "RiaLogging.h" #include "cafSelectionManager.h" @@ -36,9 +37,9 @@ CAF_CMD_SOURCE_INIT(RicNewViewFeature, "RicNewViewFeature"); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RicNewViewFeature::addReservoirView() +void RicNewViewFeature::addReservoirView(RimEclipseCase* eclipseCase, RimGeoMechCase* geomCase) { - RimView* newView = createReservoirView(); + RimView* newView = createReservoirView(eclipseCase, geomCase); if (newView) { @@ -62,7 +63,18 @@ bool RicNewViewFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicNewViewFeature::onActionTriggered(bool isChecked) { - addReservoirView(); + // Establish type of selected object + RimEclipseCase* eclipseCase = selectedEclipseCase(); + RimGeoMechCase* geomCase = selectedGeoMechCase(); + RimGeoMechView* geoMechView = selectedGeoMechView(); + RimEclipseView* reservoirView = selectedEclipseView(); + + + // Find case to insert into + if (geoMechView) geomCase = geoMechView->geoMechCase(); + if (reservoirView) eclipseCase = reservoirView->eclipseCase(); + + addReservoirView(eclipseCase, geomCase); } //-------------------------------------------------------------------------------------------------- @@ -77,18 +89,8 @@ void RicNewViewFeature::setupActionLook(QAction* actionToSetup) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimView* RicNewViewFeature::createReservoirView() +RimView* RicNewViewFeature::createReservoirView(RimEclipseCase* eclipseCase, RimGeoMechCase* geomCase) { - // Establish type of selected object - RimEclipseCase* eclipseCase = selectedEclipseCase(); - RimGeoMechCase* geomCase = selectedGeoMechCase(); - RimGeoMechView* geoMechView = selectedGeoMechView(); - RimEclipseView* reservoirView = selectedEclipseView(); - - // Find case to insert into - if (geoMechView) geomCase = geoMechView->geoMechCase(); - if (reservoirView) eclipseCase = reservoirView->eclipseCase(); - RimView* insertedView = NULL; if (eclipseCase) diff --git a/ApplicationCode/Commands/RicNewViewFeature.h b/ApplicationCode/Commands/RicNewViewFeature.h index d4f14aba1b..a8153086fe 100644 --- a/ApplicationCode/Commands/RicNewViewFeature.h +++ b/ApplicationCode/Commands/RicNewViewFeature.h @@ -35,7 +35,7 @@ class RicNewViewFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; public: - static void addReservoirView(); + static void addReservoirView(RimEclipseCase* eclipseCase, RimGeoMechCase* geomCase); protected: // Overrides @@ -44,7 +44,7 @@ class RicNewViewFeature : public caf::CmdFeature virtual void setupActionLook( QAction* actionToSetup ); private: - static RimView* createReservoirView(); + static RimView* createReservoirView(RimEclipseCase* eclipseCase, RimGeoMechCase* geomCase); static RimEclipseCase* selectedEclipseCase(); static RimGeoMechCase* selectedGeoMechCase(); diff --git a/ApplicationCode/Commands/RicReloadCaseFeature.cpp b/ApplicationCode/Commands/RicReloadCaseFeature.cpp new file mode 100644 index 0000000000..7519b4c719 --- /dev/null +++ b/ApplicationCode/Commands/RicReloadCaseFeature.cpp @@ -0,0 +1,69 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2015- Statoil ASA +// Copyright (C) 2015- Ceetron Solutions 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicReloadCaseFeature.h" + +#include "RimEclipseCase.h" + +#include "cafPdmObject.h" +#include "cafSelectionManager.h" + +#include + +CAF_CMD_SOURCE_INIT(RicReloadCaseFeature, "RicReloadCaseFeature"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicReloadCaseFeature::isCommandEnabled() +{ + std::vector selectedFormationNamesCollObjs; + caf::SelectionManager::instance()->objectsByType(&selectedFormationNamesCollObjs); + for (caf::PdmObject* pdmObject : selectedFormationNamesCollObjs) { + if (dynamic_cast(pdmObject)) + { + return true; + } + } + + return false; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicReloadCaseFeature::onActionTriggered(bool isChecked) +{ + std::vector selectedEclipseCases; + caf::SelectionManager::instance()->objectsByType(&selectedEclipseCases); + + for (RimEclipseCase* selectedCase : selectedEclipseCases) + { + selectedCase->reloadDataAndUpdate(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicReloadCaseFeature::setupActionLook(QAction* actionToSetup) +{ + actionToSetup->setText("Reload"); + actionToSetup->setIcon(QIcon(":/Refresh-32.png")); +} diff --git a/ApplicationCode/Commands/RicReloadCaseFeature.h b/ApplicationCode/Commands/RicReloadCaseFeature.h new file mode 100644 index 0000000000..95bf4b7752 --- /dev/null +++ b/ApplicationCode/Commands/RicReloadCaseFeature.h @@ -0,0 +1,32 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2015- Statoil ASA +// Copyright (C) 2015- Ceetron Solutions 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafCmdFeature.h" + +class RicReloadCaseFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + +protected: + virtual bool isCommandEnabled(); + virtual void onActionTriggered(bool isChecked); + virtual void setupActionLook(QAction* actionToSetup); +}; diff --git a/ApplicationCode/Commands/RicSnapshotViewToClipboardFeature.cpp b/ApplicationCode/Commands/RicSnapshotViewToClipboardFeature.cpp index 6db549a04c..05b198be5f 100644 --- a/ApplicationCode/Commands/RicSnapshotViewToClipboardFeature.cpp +++ b/ApplicationCode/Commands/RicSnapshotViewToClipboardFeature.cpp @@ -19,13 +19,12 @@ #include "RicSnapshotViewToClipboardFeature.h" #include "RiaApplication.h" +#include "RiaLogging.h" +#include "RimMainPlotCollection.h" #include "RimProject.h" -#include "RimSummaryPlot.h" #include "RimViewWindow.h" -#include "RimWellLogPlot.h" #include "RiuMainPlotWindow.h" -#include "RiuWellLogPlot.h" #include "cafUtils.h" @@ -35,6 +34,7 @@ #include #include #include +#include CAF_CMD_SOURCE_INIT(RicSnapshotViewToClipboardFeature, "RicSnapshotViewToClipboardFeature"); @@ -52,6 +52,8 @@ bool RicSnapshotViewToClipboardFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicSnapshotViewToClipboardFeature::onActionTriggered(bool isChecked) { + this->disableModelChangeContribution(); + RimViewWindow* viewWindow = RiaApplication::activeViewWindow(); if (viewWindow) @@ -94,11 +96,11 @@ void RicSnapshotViewToFileFeature::saveSnapshotAs(const QString& fileName, RimVi { if (image.save(fileName)) { - qDebug() << "Saved snapshot image to " << fileName; + qDebug() << "Exported snapshot image to " << fileName; } else { - qDebug() << "Error when trying to save snapshot image to " << fileName; + qDebug() << "Error when trying to export snapshot image to " << fileName; } } } @@ -120,6 +122,17 @@ void RicSnapshotViewToFileFeature::onActionTriggered(bool isChecked) RiaApplication* app = RiaApplication::instance(); RimProject* proj = app->project(); + // Get active view window before displaying the file selection dialog + // If this is done after the file save dialog is displayed (and closed) + // app->activeViewWindow() returns NULL on Linux + RimViewWindow* viewWindow = app->activeViewWindow(); + if (!viewWindow) + { + RiaLogging::error("No view window is available, nothing to do"); + + return; + } + QString startPath; if (!proj->fileName().isEmpty()) { @@ -133,7 +146,7 @@ void RicSnapshotViewToFileFeature::onActionTriggered(bool isChecked) startPath += "/image.png"; - QString fileName = QFileDialog::getSaveFileName(NULL, tr("Save File"), startPath, tr("Image files (*.bmp *.png * *.jpg)")); + QString fileName = QFileDialog::getSaveFileName(NULL, tr("Export to File"), startPath, tr("Image files (*.bmp *.png * *.jpg)")); if (fileName.isEmpty()) { return; @@ -142,7 +155,6 @@ void RicSnapshotViewToFileFeature::onActionTriggered(bool isChecked) // Remember the directory to next time app->setLastUsedDialogDirectory("IMAGE_SNAPSHOT", QFileInfo(fileName).absolutePath()); - RimViewWindow* viewWindow = app->activeViewWindow(); RicSnapshotViewToFileFeature::saveSnapshotAs(fileName, viewWindow); } @@ -178,6 +190,22 @@ void RicSnapshotAllPlotsToFileFeature::saveAllPlots() // Save images in snapshot catalog relative to project directory QString snapshotFolderName = app->createAbsolutePathFromProjectRelativePath("snapshots"); + exportSnapshotOfAllPlotsIntoFolder(snapshotFolderName); + + QString text = QString("Exported snapshots to folder : \n%1").arg(snapshotFolderName); + QMessageBox::information(nullptr, "Export Snapshots To Folder", text); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicSnapshotAllPlotsToFileFeature::exportSnapshotOfAllPlotsIntoFolder(QString snapshotFolderName) +{ + RiaApplication* app = RiaApplication::instance(); + + RimProject* proj = app->project(); + if (!proj) return; + QDir snapshotPath(snapshotFolderName); if (!snapshotPath.exists()) { @@ -186,39 +214,29 @@ void RicSnapshotAllPlotsToFileFeature::saveAllPlots() const QString absSnapshotPath = snapshotPath.absolutePath(); - // Well log plots + std::vector viewWindows; + proj->mainPlotCollection()->descendantsIncludingThisOfType(viewWindows); + + for (auto viewWindow : viewWindows) { - std::vector wellLogPlots; - proj->descendantsIncludingThisOfType(wellLogPlots); - for (RimWellLogPlot* wellLogPlot : wellLogPlots) + if (viewWindow->isMdiWindow() && viewWindow->viewWidget()) { - if (wellLogPlot && wellLogPlot->viewWidget()) + QString fileName; + if ( viewWindow->userDescriptionField()) { - QString fileName = wellLogPlot->description(); - fileName.replace(" ", "_"); - - QString absoluteFileName = caf::Utils::constructFullFileName(absSnapshotPath, fileName, ".png"); - - RicSnapshotViewToFileFeature::saveSnapshotAs(absoluteFileName, wellLogPlot); + fileName = viewWindow->userDescriptionField()->uiCapability()->uiValue().toString(); } - } - } - - // Summary plots - { - std::vector summaryPlots; - proj->descendantsIncludingThisOfType(summaryPlots); - for (RimSummaryPlot* summaryPlot : summaryPlots) - { - if (summaryPlot && summaryPlot->viewWidget()) + else { - QString fileName = summaryPlot->description(); - fileName.replace(" ", "_"); + fileName = viewWindow->uiCapability()->uiName(); + } - QString absoluteFileName = caf::Utils::constructFullFileName(absSnapshotPath, fileName, ".png"); + fileName = caf::Utils::makeValidFileBasename(fileName); - RicSnapshotViewToFileFeature::saveSnapshotAs(absoluteFileName, summaryPlot); - } + QString absoluteFileName = caf::Utils::constructFullFileName(absSnapshotPath, fileName, ".png"); + absoluteFileName.replace(" ", "_"); + + RicSnapshotViewToFileFeature::saveSnapshotAs(absoluteFileName, viewWindow); } } } @@ -260,6 +278,6 @@ void RicSnapshotAllPlotsToFileFeature::onActionTriggered(bool isChecked) void RicSnapshotAllPlotsToFileFeature::setupActionLook(QAction* actionToSetup) { actionToSetup->setText("Snapshot All Plots To File"); - actionToSetup->setIcon(QIcon(":/SnapShotSave.png")); + actionToSetup->setIcon(QIcon(":/SnapShotSaveViews.png")); } diff --git a/ApplicationCode/Commands/RicSnapshotViewToClipboardFeature.h b/ApplicationCode/Commands/RicSnapshotViewToClipboardFeature.h index 2112d4e19f..ede5e606fc 100644 --- a/ApplicationCode/Commands/RicSnapshotViewToClipboardFeature.h +++ b/ApplicationCode/Commands/RicSnapshotViewToClipboardFeature.h @@ -66,6 +66,8 @@ class RicSnapshotAllPlotsToFileFeature : public caf::CmdFeature public: static void saveAllPlots(); + static void exportSnapshotOfAllPlotsIntoFolder(QString snapshotFolderName); + protected: // Overrides virtual bool isCommandEnabled() override; diff --git a/ApplicationCode/Commands/SummaryPlotCommands/CMakeLists_files.cmake b/ApplicationCode/Commands/SummaryPlotCommands/CMakeLists_files.cmake index cae84a338b..cee17de51a 100644 --- a/ApplicationCode/Commands/SummaryPlotCommands/CMakeLists_files.cmake +++ b/ApplicationCode/Commands/SummaryPlotCommands/CMakeLists_files.cmake @@ -13,6 +13,10 @@ ${CEE_CURRENT_LIST_DIR}RicViewZoomAllFeature.h ${CEE_CURRENT_LIST_DIR}RicSummaryCurveSwitchAxisFeature.h ${CEE_CURRENT_LIST_DIR}RicPasteSummaryPlotFeature.h ${CEE_CURRENT_LIST_DIR}RicPasteSummaryCurveFeature.h +${CEE_CURRENT_LIST_DIR}RicAsciiExportSummaryPlotFeature.h +${CEE_CURRENT_LIST_DIR}RicNewGridTimeHistoryCurveFeature.h +${CEE_CURRENT_LIST_DIR}RicSelectSummaryPlotUI.h +${CEE_CURRENT_LIST_DIR}RicPasteTimeHistoryCurveFeature.h ) set (SOURCE_GROUP_SOURCE_FILES @@ -23,6 +27,10 @@ ${CEE_CURRENT_LIST_DIR}RicViewZoomAllFeature.cpp ${CEE_CURRENT_LIST_DIR}RicSummaryCurveSwitchAxisFeature.cpp ${CEE_CURRENT_LIST_DIR}RicPasteSummaryPlotFeature.cpp ${CEE_CURRENT_LIST_DIR}RicPasteSummaryCurveFeature.cpp +${CEE_CURRENT_LIST_DIR}RicAsciiExportSummaryPlotFeature.cpp +${CEE_CURRENT_LIST_DIR}RicNewGridTimeHistoryCurveFeature.cpp +${CEE_CURRENT_LIST_DIR}RicSelectSummaryPlotUI.cpp +${CEE_CURRENT_LIST_DIR}RicPasteTimeHistoryCurveFeature.cpp ) list(APPEND CODE_HEADER_FILES diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicAsciiExportSummaryPlotFeature.cpp b/ApplicationCode/Commands/SummaryPlotCommands/RicAsciiExportSummaryPlotFeature.cpp new file mode 100644 index 0000000000..f441dfc4d7 --- /dev/null +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicAsciiExportSummaryPlotFeature.cpp @@ -0,0 +1,141 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicAsciiExportSummaryPlotFeature.h" + +#include "RiaApplication.h" +#include "RiaLogging.h" + +#include "RimSummaryPlot.h" + +#include "RiuMainWindow.h" + +#include "cafPdmUiPropertyViewDialog.h" +#include "cafProgressInfo.h" +#include "cafSelectionManager.h" +#include "cafUtils.h" + +#include "cvfAssert.h" + +#include +#include +#include +#include +#include + + + + +CAF_CMD_SOURCE_INIT(RicAsciiExportSummaryPlotFeature, "RicAsciiExportSummaryPlotFeature"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicAsciiExportSummaryPlotFeature::isCommandEnabled() +{ + return true; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicAsciiExportSummaryPlotFeature::onActionTriggered(bool isChecked) +{ + this->disableModelChangeContribution(); + + RiaApplication* app = RiaApplication::instance(); + QString projectFolder = app->currentProjectPath(); + + RimProject* project = RiaApplication::instance()->project(); + CVF_ASSERT(project); + + std::vector selectedSummaryPlots; + caf::SelectionManager::instance()->objectsByType(&selectedSummaryPlots); + QString defaultDir = RiaApplication::instance()->lastUsedDialogDirectoryWithFallback("PLOT_ASCIIEXPORT_DIR", projectFolder); + + caf::ProgressInfo pi(selectedSummaryPlots.size(), QString("Exporting plot data to ASCII")); + size_t progress = 0; + + if (selectedSummaryPlots.size() == 1) + { + RimSummaryPlot* summaryPlot = selectedSummaryPlots.at(0); + QString defaultFileName = defaultDir + "/" + caf::Utils::makeValidFileBasename((summaryPlot->description())) + ".ascii"; + QString fileName = QFileDialog::getSaveFileName(nullptr, "Select File for Summary Plot Export", defaultFileName, "Text File(*.ascii);;All files(*.*)"); + if (fileName.isEmpty()) return; + RicAsciiExportSummaryPlotFeature::exportAsciiForSummaryPlot(fileName, summaryPlot); + + progress++; + pi.setProgress(progress); + } + else if (selectedSummaryPlots.size() > 1) + { + std::vector fileNames; + for (RimSummaryPlot* summaryPlot : selectedSummaryPlots) + { + QString fileName = caf::Utils::makeValidFileBasename(summaryPlot->description()) + ".ascii"; + fileNames.push_back(fileName); + } + + QString saveDir; + bool writeFiles = caf::Utils::getSaveDirectoryAndCheckOverwriteFiles(defaultDir, fileNames, &saveDir); + if (!writeFiles) return; + + RiaLogging::info(QString("Writing to directory %1").arg(saveDir)); + for (RimSummaryPlot* summaryPlot : selectedSummaryPlots) + { + QString fileName = saveDir + "/" + caf::Utils::makeValidFileBasename(summaryPlot->description()) + ".ascii"; + RicAsciiExportSummaryPlotFeature::exportAsciiForSummaryPlot(fileName, summaryPlot); + progress++; + pi.setProgress(progress); + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicAsciiExportSummaryPlotFeature::setupActionLook(QAction* actionToSetup) +{ + actionToSetup->setText("Export Plot Data to Text File"); + actionToSetup->setIcon(QIcon(":/Save.png")); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicAsciiExportSummaryPlotFeature::exportAsciiForSummaryPlot(const QString& fileName, const RimSummaryPlot* summaryPlot) +{ + QFile file(fileName); + if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) + { + return false; + } + + RiaLogging::info(QString("Writing values for summary plot(s) to file: %1").arg(fileName)); + + QTextStream out(&file); + + out << summaryPlot->description(); + out << summaryPlot->asciiDataForPlotExport(); + out << "\n\n"; + + RiaLogging::info(QString("Competed writing values for summary plot(s) to file %1").arg(fileName)); + + return true; +} + diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicAsciiExportSummaryPlotFeature.h b/ApplicationCode/Commands/SummaryPlotCommands/RicAsciiExportSummaryPlotFeature.h new file mode 100644 index 0000000000..b603b23777 --- /dev/null +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicAsciiExportSummaryPlotFeature.h @@ -0,0 +1,39 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafCmdFeature.h" + +class RimSummaryPlot; + +//================================================================================================== +/// +//================================================================================================== +class RicAsciiExportSummaryPlotFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + +protected: + virtual bool isCommandEnabled() override; + virtual void onActionTriggered( bool isChecked ) override; + virtual void setupActionLook(QAction* actionToSetup) override; + +private: + static bool exportAsciiForSummaryPlot(const QString& fileName, const RimSummaryPlot* selectedSummaryPlots); +}; diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicNewGridTimeHistoryCurveFeature.cpp b/ApplicationCode/Commands/SummaryPlotCommands/RicNewGridTimeHistoryCurveFeature.cpp new file mode 100644 index 0000000000..f588f5a4d6 --- /dev/null +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicNewGridTimeHistoryCurveFeature.cpp @@ -0,0 +1,260 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicNewGridTimeHistoryCurveFeature.h" + +#include "RiaApplication.h" + +#include "RicNewSummaryCurveFeature.h" +#include "RicSelectSummaryPlotUI.h" +#include "WellLogCommands/RicWellLogPlotCurveFeatureImpl.h" + +#include "RimEclipseCellColors.h" +#include "RimEclipseResultDefinition.h" +#include "RimEclipseView.h" +#include "RimGeoMechResultDefinition.h" +#include "RimGeoMechView.h" +#include "RimGridTimeHistoryCurve.h" +#include "RimMainPlotCollection.h" +#include "RimProject.h" +#include "RimSummaryCaseCollection.h" +#include "RimSummaryPlot.h" +#include "RimSummaryPlotCollection.h" + +#include "RiuMainPlotWindow.h" +#include "RiuSelectionManager.h" + +#include "cafPdmReferenceHelper.h" +#include "cafPdmUiPropertyViewDialog.h" + +#include "cvfAssert.h" +#include "cvfColor3.h" + +#include + + +CAF_CMD_SOURCE_INIT(RicNewGridTimeHistoryCurveFeature, "RicNewGridTimeHistoryCurveFeature"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicNewGridTimeHistoryCurveFeature::createCurveFromSelectionItem(const RiuSelectionItem* selectionItem, RimSummaryPlot* plot) +{ + CVF_ASSERT(selectionItem); + CVF_ASSERT(plot); + + RimGridTimeHistoryCurve* newCurve = new RimGridTimeHistoryCurve(); + newCurve->setFromSelectionItem(selectionItem); + newCurve->setLineThickness(2); + + cvf::Color3f curveColor = RicWellLogPlotCurveFeatureImpl::curveColorFromTable(plot->curveCount()); + newCurve->setColor(curveColor); + + plot->addGridTimeHistoryCurve(newCurve); + + newCurve->loadDataAndUpdate(); + + plot->updateConnectedEditors(); + + RiaApplication::instance()->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem(newCurve); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimSummaryPlot* RicNewGridTimeHistoryCurveFeature::userSelectedSummaryPlot() +{ + const QString lastUsedSummaryPlotKey("lastUsedSummaryPlotKey"); + + RimProject* project = RiaApplication::instance()->project(); + CVF_ASSERT(project); + + RimMainPlotCollection* mainPlotColl = project->mainPlotCollection(); + CVF_ASSERT(mainPlotColl); + + RimSummaryPlotCollection* summaryPlotColl = mainPlotColl->summaryPlotCollection(); + CVF_ASSERT(summaryPlotColl); + + RimSummaryPlot* defaultSelectedPlot = nullptr; + { + QString lastUsedPlotRef = RiaApplication::instance()->cacheDataObject(lastUsedSummaryPlotKey).toString(); + RimSummaryPlot* lastUsedPlot = dynamic_cast(caf::PdmReferenceHelper::objectFromReference(RiaApplication::instance()->project(), lastUsedPlotRef)); + if (lastUsedPlot) + { + defaultSelectedPlot = lastUsedPlot; + } + + if (!defaultSelectedPlot) + { + defaultSelectedPlot = dynamic_cast( RiaApplication::instance()->activePlotWindow() ); + } + + if (!defaultSelectedPlot && summaryPlotColl->summaryPlots().size() > 0) + { + defaultSelectedPlot = summaryPlotColl->summaryPlots()[0]; + } + } + + RicSelectSummaryPlotUI featureUi; + if (defaultSelectedPlot) + { + featureUi.setDefaultSummaryPlot(defaultSelectedPlot); + } + + QString newPlotName = RicNewGridTimeHistoryCurveFeature::suggestedNewPlotName(); + featureUi.setSuggestedPlotName(newPlotName); + + caf::PdmUiPropertyViewDialog propertyDialog(NULL, &featureUi, "Select Destination Plot", ""); + propertyDialog.resize(QSize(400, 200)); + + if (propertyDialog.exec() != QDialog::Accepted) return nullptr; + + RimSummaryPlot* summaryPlot = nullptr; + if (featureUi.isCreateNewPlotChecked()) + { + RimSummaryPlot* plot = new RimSummaryPlot(); + summaryPlotColl->summaryPlots().push_back(plot); + + plot->setDescription(featureUi.newPlotName()); + + summaryPlotColl->updateConnectedEditors(); + + plot->loadDataAndUpdate(); + + summaryPlot = plot; + } + else + { + summaryPlot = featureUi.selectedSummaryPlot(); + } + + QString refFromProjectToView = caf::PdmReferenceHelper::referenceFromRootToObject(RiaApplication::instance()->project(), summaryPlot); + RiaApplication::instance()->setCacheDataObject(lastUsedSummaryPlotKey, refFromProjectToView); + + return summaryPlot; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RicNewGridTimeHistoryCurveFeature::suggestedNewPlotName() +{ + + QString resultName; + { + RimView* activeView = RiaApplication::instance()->activeReservoirView(); + RimEclipseView* eclView = dynamic_cast(activeView); + if (eclView) + { + RimEclipseResultDefinition* resDef = eclView->cellResult(); + resultName = resDef->resultVariableUiShortName(); + } + + RimGeoMechView* geoView = dynamic_cast(activeView); + if (geoView) + { + // NOTE: See also RimGeoMechProertyFilter for generation of result name + + RimGeoMechResultDefinition* resultDefinition = geoView->cellResultResultDefinition(); + + RigFemResultAddress resultAddress = resultDefinition->resultAddress(); + + if (resultAddress.resultPosType == RIG_FORMATION_NAMES) + { + resultName = resultDefinition->resultFieldName(); + } + else + { + QString posName; + + switch (resultAddress.resultPosType) + { + case RIG_NODAL: posName = "N"; break; + case RIG_ELEMENT_NODAL: posName = "EN"; break; + case RIG_INTEGRATION_POINT: posName = "IP"; break; + } + + QString fieldUiName = resultDefinition->resultFieldUiName(); + QString compoUiName = resultDefinition->resultComponentUiName(); + + resultName = posName + ", " + fieldUiName + ", " + compoUiName; + } + } + } + + QString plotName = "New Plot Name"; + if (!resultName.isEmpty()) + { + plotName = QString("Cell Result - %1").arg(resultName); + } + + return plotName; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicNewGridTimeHistoryCurveFeature::isCommandEnabled() +{ + std::vector items; + RiuSelectionManager::instance()->selectedItems(items); + + if (items.size() > 0) + { + const RiuEclipseSelectionItem* eclSelectionItem = dynamic_cast(items[0]); + if (eclSelectionItem) + { + if (eclSelectionItem->m_view->cellResult()->resultType() == RimDefines::FLOW_DIAGNOSTICS) + { + return false; + } + } + + return true; + } + + return false; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicNewGridTimeHistoryCurveFeature::onActionTriggered(bool isChecked) +{ + RimSummaryPlot* summaryPlot = RicNewGridTimeHistoryCurveFeature::userSelectedSummaryPlot(); + if (!summaryPlot) return; + + std::vector items; + RiuSelectionManager::instance()->selectedItems(items); + CVF_ASSERT(items.size() > 0); + + for (auto item : items) + { + RicNewGridTimeHistoryCurveFeature::createCurveFromSelectionItem(item, summaryPlot); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicNewGridTimeHistoryCurveFeature::setupActionLook(QAction* actionToSetup) +{ + actionToSetup->setText("Plot Time History for Selected Cells"); + actionToSetup->setIcon(QIcon(":/SummaryCurve16x16.png")); +} + diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicNewGridTimeHistoryCurveFeature.h b/ApplicationCode/Commands/SummaryPlotCommands/RicNewGridTimeHistoryCurveFeature.h new file mode 100644 index 0000000000..e165e3a6ee --- /dev/null +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicNewGridTimeHistoryCurveFeature.h @@ -0,0 +1,43 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafCmdFeature.h" + +class RiuSelectionItem; +class RimSummaryPlot; + +//================================================================================================== +/// +//================================================================================================== +class RicNewGridTimeHistoryCurveFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + +protected: + // Overrides + virtual bool isCommandEnabled() override; + virtual void onActionTriggered( bool isChecked ) override; + virtual void setupActionLook( QAction* actionToSetup ) override; + +private: + static void createCurveFromSelectionItem(const RiuSelectionItem* selectionItem, RimSummaryPlot* plot); + static RimSummaryPlot* userSelectedSummaryPlot(); + static QString suggestedNewPlotName(); +}; diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicNewSummaryCurveFeature.cpp b/ApplicationCode/Commands/SummaryPlotCommands/RicNewSummaryCurveFeature.cpp index 778129da2c..8f3c30ff21 100644 --- a/ApplicationCode/Commands/SummaryPlotCommands/RicNewSummaryCurveFeature.cpp +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicNewSummaryCurveFeature.cpp @@ -67,17 +67,19 @@ void RicNewSummaryCurveFeature::onActionTriggered(bool isChecked) if (plot) { RimSummaryCurve* newCurve = new RimSummaryCurve(); - plot->addCurve(newCurve); - - cvf::Color3f curveColor = RicWellLogPlotCurveFeatureImpl::curveColorFromTable(); + cvf::Color3f curveColor = RicWellLogPlotCurveFeatureImpl::curveColorFromTable(plot->curveCount()); newCurve->setColor(curveColor); + plot->addCurve(newCurve); + RimSummaryCase* defaultCase = nullptr; if (project->activeOilField()->summaryCaseCollection()->summaryCaseCount() > 0) { defaultCase = project->activeOilField()->summaryCaseCollection()->summaryCase(0); newCurve->setSummaryCase(defaultCase); - newCurve->setVariable("FOPT"); + + newCurve->setSummaryAddress(RifEclipseSummaryAddress::fieldVarAddress("FOPT")); + newCurve->loadDataAndUpdate(); } diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicNewSummaryPlotFeature.cpp b/ApplicationCode/Commands/SummaryPlotCommands/RicNewSummaryPlotFeature.cpp index 59e5de32e1..9bee510e0e 100644 --- a/ApplicationCode/Commands/SummaryPlotCommands/RicNewSummaryPlotFeature.cpp +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicNewSummaryPlotFeature.cpp @@ -96,9 +96,9 @@ void RicNewSummaryPlotFeature::setupActionLook(QAction* actionToSetup) void RicNewSummaryPlotFeature::createNewSummaryPlot(RimSummaryPlotCollection* summaryPlotColl, RimSummaryCase* summaryCase) { RimSummaryPlot* plot = new RimSummaryPlot(); - summaryPlotColl->m_summaryPlots().push_back(plot); + summaryPlotColl->summaryPlots().push_back(plot); - plot->setDescription(QString("Summary Plot %1").arg(summaryPlotColl->m_summaryPlots.size())); + plot->setDescription(QString("Summary Plot %1").arg(summaryPlotColl->summaryPlots.size())); RimSummaryCurveFilter* newCurveFilter = new RimSummaryCurveFilter(); diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicPasteSummaryPlotFeature.cpp b/ApplicationCode/Commands/SummaryPlotCommands/RicPasteSummaryPlotFeature.cpp index db42edd5cf..62a519e28f 100644 --- a/ApplicationCode/Commands/SummaryPlotCommands/RicPasteSummaryPlotFeature.cpp +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicPasteSummaryPlotFeature.cpp @@ -74,7 +74,7 @@ void RicPasteSummaryPlotFeature::onActionTriggered(bool isChecked) RimSummaryPlot* newSummaryPlot = dynamic_cast(sourceObjects[i]->xmlCapability()->copyByXmlSerialization(caf::PdmDefaultObjectFactory::instance())); CVF_ASSERT(newSummaryPlot); - plotColl->m_summaryPlots.push_back(newSummaryPlot); + plotColl->summaryPlots.push_back(newSummaryPlot); // Resolve references after object has been inserted into the data model newSummaryPlot->resolveReferencesRecursively(); diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicPasteTimeHistoryCurveFeature.cpp b/ApplicationCode/Commands/SummaryPlotCommands/RicPasteTimeHistoryCurveFeature.cpp new file mode 100644 index 0000000000..115d0bec94 --- /dev/null +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicPasteTimeHistoryCurveFeature.cpp @@ -0,0 +1,123 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicPasteTimeHistoryCurveFeature.h" + +#include "OperationsUsingObjReferences/RicPasteFeatureImpl.h" + + +#include "cafPdmDefaultObjectFactory.h" +#include "cafPdmDocument.h" +#include "cafPdmObjectGroup.h" +#include "cafSelectionManager.h" + +#include "cvfAssert.h" + +#include +#include "RimSummaryPlot.h" +#include "RimGridTimeHistoryCurve.h" + + +CAF_CMD_SOURCE_INIT(RicPasteTimeHistoryCurveFeature, "RicPasteTimeHistoryCurveFeature"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicPasteTimeHistoryCurveFeature::isCommandEnabled() +{ + caf::PdmObjectHandle* destinationObject = dynamic_cast(caf::SelectionManager::instance()->selectedItem()); + + if (!destinationObject) + { + return false; + } + + RimSummaryPlot* summaryPlot = nullptr; + destinationObject->firstAncestorOrThisOfType(summaryPlot); + if (!summaryPlot) + { + return false; + } + + return RicPasteTimeHistoryCurveFeature::timeHistoryCurves().size() > 0; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicPasteTimeHistoryCurveFeature::onActionTriggered(bool isChecked) +{ + caf::PdmObjectHandle* destinationObject = dynamic_cast(caf::SelectionManager::instance()->selectedItem()); + CVF_ASSERT(destinationObject); + + RimSummaryPlot* summaryPlot = nullptr; + destinationObject->firstAncestorOrThisOfType(summaryPlot); + if (!summaryPlot) + { + return; + } + + std::vector > sourceObjects = RicPasteTimeHistoryCurveFeature::timeHistoryCurves(); + + for (size_t i = 0; i < sourceObjects.size(); i++) + { + RimGridTimeHistoryCurve* newObject = dynamic_cast(sourceObjects[i]->xmlCapability()->copyByXmlSerialization(caf::PdmDefaultObjectFactory::instance())); + CVF_ASSERT(newObject); + + summaryPlot->addGridTimeHistoryCurve(newObject); + + // Resolve references after object has been inserted into the project data model + newObject->resolveReferencesRecursively(); + + // If source curve is part of a curve filter, resolve of references to the summary case does not + // work when pasting the new curve into a plot. Must set summary case manually. + //newObject->setSummaryCase(sourceObjects[i]->summaryCase()); + + newObject->initAfterReadRecursively(); + + newObject->loadDataAndUpdate(); + newObject->updateConnectedEditors(); + + summaryPlot->updateConnectedEditors(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicPasteTimeHistoryCurveFeature::setupActionLook(QAction* actionToSetup) +{ + actionToSetup->setText("Paste Time History Curve"); + + RicPasteFeatureImpl::setIconAndShortcuts(actionToSetup); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector > RicPasteTimeHistoryCurveFeature::timeHistoryCurves() +{ + caf::PdmObjectGroup objectGroup; + RicPasteFeatureImpl::findObjectsFromClipboardRefs(&objectGroup); + + std::vector > typedObjects; + objectGroup.objectsByType(&typedObjects); + + return typedObjects; +} + diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicPasteTimeHistoryCurveFeature.h b/ApplicationCode/Commands/SummaryPlotCommands/RicPasteTimeHistoryCurveFeature.h new file mode 100644 index 0000000000..b02c490b00 --- /dev/null +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicPasteTimeHistoryCurveFeature.h @@ -0,0 +1,45 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafCmdFeature.h" +#include "cafPdmPointer.h" + +#include + +class RimGridTimeHistoryCurve; + +//================================================================================================== +/// +//================================================================================================== +class RicPasteTimeHistoryCurveFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + +protected: + // Overrides + virtual bool isCommandEnabled() override; + virtual void onActionTriggered( bool isChecked ) override; + virtual void setupActionLook(QAction* actionToSetup) override; + +private: + static std::vector > timeHistoryCurves(); +}; + + diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicSelectSummaryPlotUI.cpp b/ApplicationCode/Commands/SummaryPlotCommands/RicSelectSummaryPlotUI.cpp new file mode 100644 index 0000000000..c363739c65 --- /dev/null +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicSelectSummaryPlotUI.cpp @@ -0,0 +1,147 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicSelectSummaryPlotUI.h" + +#include "RiaApplication.h" + +#include "RimEclipseResultCase.h" +#include "RimEclipseView.h" +#include "RimMainPlotCollection.h" +#include "RimProject.h" +#include "RimSummaryPlot.h" +#include "RimSummaryPlotCollection.h" + + +CAF_PDM_SOURCE_INIT(RicSelectSummaryPlotUI, "RicSelectSummaryPlotUI"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RicSelectSummaryPlotUI::RicSelectSummaryPlotUI() +{ + CAF_PDM_InitObject("RicSelectSummaryPlotUI", "", "", ""); + + CAF_PDM_InitFieldNoDefault(&m_selectedSummaryPlot, "SelectedSummaryPlot", "Select Plot", "", "", ""); + CAF_PDM_InitField(&m_createNewPlot, "CreateNewPlot", false, "Create New Plot", "", "", ""); + CAF_PDM_InitField(&m_newSummaryPlotName, "NewViewName", QString("Cell Results"), "New Plot Name", "", "", ""); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicSelectSummaryPlotUI::setDefaultSummaryPlot(RimSummaryPlot* summaryPlot) +{ + m_selectedSummaryPlot = summaryPlot; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicSelectSummaryPlotUI::setSuggestedPlotName(const QString& name) +{ + m_newSummaryPlotName = name; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimSummaryPlot* RicSelectSummaryPlotUI::selectedSummaryPlot() const +{ + return m_selectedSummaryPlot(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicSelectSummaryPlotUI::isCreateNewPlotChecked() const +{ + return m_createNewPlot; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RicSelectSummaryPlotUI::newPlotName() const +{ + return m_newSummaryPlotName; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QList RicSelectSummaryPlotUI::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) +{ + QList options; + + if (fieldNeedingOptions == &m_selectedSummaryPlot) + { + for (RimSummaryPlot* plot : RicSelectSummaryPlotUI::summaryPlots()) + { + QIcon icon = plot->uiCapability()->uiIcon(); + QString displayName = plot->description(); + + options.push_back(caf::PdmOptionItemInfo(displayName, plot, false, icon)); + } + } + + return options; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicSelectSummaryPlotUI::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) +{ + if (RicSelectSummaryPlotUI::summaryPlots().size() == 0) + { + m_createNewPlot = true; + } + + if (m_createNewPlot) + { + m_newSummaryPlotName.uiCapability()->setUiReadOnly(false); + m_selectedSummaryPlot.uiCapability()->setUiReadOnly(true); + } + else + { + m_newSummaryPlotName.uiCapability()->setUiReadOnly(true); + m_selectedSummaryPlot.uiCapability()->setUiReadOnly(false); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RicSelectSummaryPlotUI::summaryPlots() +{ + RimProject* project = RiaApplication::instance()->project(); + CVF_ASSERT(project); + + RimMainPlotCollection* mainPlotColl = project->mainPlotCollection(); + CVF_ASSERT(mainPlotColl); + + RimSummaryPlotCollection* summaryPlotColl = mainPlotColl->summaryPlotCollection(); + CVF_ASSERT(summaryPlotColl); + + std::vector sumPlots; + summaryPlotColl->descendantsIncludingThisOfType(sumPlots); + + return sumPlots; +} + diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicSelectSummaryPlotUI.h b/ApplicationCode/Commands/SummaryPlotCommands/RicSelectSummaryPlotUI.h new file mode 100644 index 0000000000..fea570fc7a --- /dev/null +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicSelectSummaryPlotUI.h @@ -0,0 +1,57 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafPdmField.h" +#include "cafPdmObject.h" +#include "cafPdmPtrField.h" + +class RimSummaryPlot; + +//================================================================================================== +/// +//================================================================================================== +class RicSelectSummaryPlotUI : public caf::PdmObject +{ + CAF_PDM_HEADER_INIT; + +public: + RicSelectSummaryPlotUI(); + + void setDefaultSummaryPlot(RimSummaryPlot* summaryPlot); + void setSuggestedPlotName(const QString& name); + + RimSummaryPlot* selectedSummaryPlot() const; + bool isCreateNewPlotChecked() const; + QString newPlotName() const; + + virtual QList calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override; + +protected: + virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override; + +private: + static std::vector summaryPlots(); + +private: + caf::PdmPtrField m_selectedSummaryPlot; + caf::PdmField m_createNewPlot; + caf::PdmField m_newSummaryPlotName; +}; + diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveSwitchAxisFeature.cpp b/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveSwitchAxisFeature.cpp index 568535c0cb..500e1fe7a3 100644 --- a/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveSwitchAxisFeature.cpp +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveSwitchAxisFeature.cpp @@ -18,6 +18,7 @@ #include "RicSummaryCurveSwitchAxisFeature.h" +#include "RimGridTimeHistoryCurve.h" #include "RimSummaryCurve.h" #include "RimSummaryCurveFilter.h" #include "RimSummaryPlot.h" @@ -36,10 +37,14 @@ bool RicSummaryCurveSwitchAxisFeature::isCommandEnabled() { std::set selectedCurveFilters; std::set selectedSoloCurves; + std::vector gridTimeHistoryCurves; RicSummaryCurveSwitchAxisFeature::extractSelectedCurveFiltersAndSoloCurves(&selectedCurveFilters, - &selectedSoloCurves); - return (selectedCurveFilters.size() || selectedSoloCurves.size()); + &selectedSoloCurves, + &gridTimeHistoryCurves); + return ( selectedCurveFilters.size() + || selectedSoloCurves.size() + || gridTimeHistoryCurves.size()); } //-------------------------------------------------------------------------------------------------- @@ -49,9 +54,11 @@ void RicSummaryCurveSwitchAxisFeature::onActionTriggered(bool isChecked) { std::set selectedCurveFilters; std::set selectedSoloCurves; + std::vector gridTimeHistoryCurves; RicSummaryCurveSwitchAxisFeature::extractSelectedCurveFiltersAndSoloCurves(&selectedCurveFilters, - &selectedSoloCurves); + &selectedSoloCurves, + &gridTimeHistoryCurves); for (RimSummaryCurveFilter* summaryCurveFilter: selectedCurveFilters) { @@ -89,6 +96,26 @@ void RicSummaryCurveSwitchAxisFeature::onActionTriggered(bool isChecked) summaryCurve->firstAncestorOrThisOfType(plot); if ( plot ) plot->updateAxes(); } + + for (RimGridTimeHistoryCurve* timeHistoryCurve : gridTimeHistoryCurves) + { + RimDefines::PlotAxis plotAxis = timeHistoryCurve->yAxis(); + + if (plotAxis == RimDefines::PLOT_AXIS_LEFT) + { + timeHistoryCurve->setYAxis(RimDefines::PLOT_AXIS_RIGHT); + } + else + { + timeHistoryCurve->setYAxis(RimDefines::PLOT_AXIS_LEFT); + } + + timeHistoryCurve->updateConnectedEditors(); + + RimSummaryPlot* plot = nullptr; + timeHistoryCurve->firstAncestorOrThisOfType(plot); + if (plot) plot->updateAxes(); + } } //-------------------------------------------------------------------------------------------------- @@ -100,19 +127,24 @@ void RicSummaryCurveSwitchAxisFeature::setupActionLook(QAction* actionToSetup) } //-------------------------------------------------------------------------------------------------- -/// Solo curves means selected curves that does not have a selected curvefilter as parent +/// Solo curves means selected curves that does not have a selected curve filter as parent //-------------------------------------------------------------------------------------------------- void RicSummaryCurveSwitchAxisFeature::extractSelectedCurveFiltersAndSoloCurves(std::set* selectedCurveFilters, - std::set* selectedSoloCurves) + std::set* selectedSoloCurves, + std::vector* gridTimeHistoryCurves) { - selectedSoloCurves->clear(); { std::vector selection; caf::SelectionManager::instance()->objectsByType(&selection); - for (RimSummaryCurve* curve: selection) + for (RimSummaryCurve* curve : selection) { - selectedSoloCurves->insert(curve); + RimSummaryCurveFilter* parentCurveFilter = nullptr; + curve->firstAncestorOrThisOfType(parentCurveFilter); + if (!parentCurveFilter) + { + selectedSoloCurves->insert(curve); + } } } @@ -120,30 +152,12 @@ void RicSummaryCurveSwitchAxisFeature::extractSelectedCurveFiltersAndSoloCurves( { std::vector selection; caf::SelectionManager::instance()->objectsByType(&selection); - for ( RimSummaryCurveFilter* curveFilter: selection ) + for (RimSummaryCurveFilter* curveFilter : selection) { selectedCurveFilters->insert(curveFilter); } } - std::vector curvesToRemove; - - for (RimSummaryCurve* curve: (*selectedSoloCurves)) - { - RimSummaryCurveFilter* parentCurveFilter; - curve->firstAncestorOrThisOfType(parentCurveFilter); - if (parentCurveFilter) - { - if (selectedCurveFilters->count(parentCurveFilter) > 0 ) - { - curvesToRemove.push_back(curve); - } - } - } - - for (RimSummaryCurve* curve: curvesToRemove) - { - selectedSoloCurves->erase(curve); - } - -} \ No newline at end of file + // Read out all time history curves directly from selection manager + caf::SelectionManager::instance()->objectsByType(gridTimeHistoryCurves); +} diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveSwitchAxisFeature.h b/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveSwitchAxisFeature.h index c48fee37ab..54465dbdfc 100644 --- a/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveSwitchAxisFeature.h +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveSwitchAxisFeature.h @@ -24,7 +24,7 @@ class RimSummaryCurve; class RimSummaryCurveFilter; - +class RimGridTimeHistoryCurve; //================================================================================================== @@ -41,5 +41,6 @@ class RicSummaryCurveSwitchAxisFeature : public caf::CmdFeature private: static void extractSelectedCurveFiltersAndSoloCurves(std::set* selectedCurveFilters, - std::set* selectedSoloCurves); + std::set* selectedSoloCurves, + std::vector* gridTimeHistoryCurves); }; diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicViewZoomAllFeature.cpp b/ApplicationCode/Commands/SummaryPlotCommands/RicViewZoomAllFeature.cpp index 33952169e2..72aa5f52f6 100644 --- a/ApplicationCode/Commands/SummaryPlotCommands/RicViewZoomAllFeature.cpp +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicViewZoomAllFeature.cpp @@ -23,16 +23,20 @@ #include "RimSummaryPlot.h" #include "RimView.h" #include "RimViewWindow.h" +#include "RimWellAllocationPlot.h" #include "RimWellLogPlot.h" #include "RiuMainPlotWindow.h" #include "RiuMainWindow.h" #include "RiuSummaryQwtPlot.h" +#include "RiuWellAllocationPlot.h" #include "RiuWellLogPlot.h" #include #include #include +#include "RiuFlowCharacteristicsPlot.h" +#include "RimFlowCharacteristicsPlot.h" CAF_CMD_SOURCE_INIT(RicViewZoomAllFeature, "RicViewZoomAllFeature"); @@ -49,6 +53,8 @@ bool RicViewZoomAllFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicViewZoomAllFeature::onActionTriggered(bool isChecked) { + this->disableModelChangeContribution(); + QWidget* topLevelWidget = RiaApplication::activeWindow(); if (dynamic_cast(topLevelWidget)) @@ -62,21 +68,11 @@ void RicViewZoomAllFeature::onActionTriggered(bool isChecked) QList subwindows = mainPlotWindow->subWindowList(QMdiArea::StackingOrder); if (subwindows.size() > 0) { - RiuSummaryQwtPlot* summaryQwtPlot = dynamic_cast(subwindows.back()->widget()); - if (summaryQwtPlot) - { - RimViewWindow* viewWindow = summaryQwtPlot->ownerPlotDefinition(); - - viewWindow->zoomAll(); - summaryQwtPlot->replot(); - } + RimViewWindow* viewWindow = RiuInterfaceToViewWindow::viewWindowFromWidget(subwindows.back()->widget()); - RiuWellLogPlot* wellLogPlot = dynamic_cast(subwindows.back()->widget()); - if (wellLogPlot) + if (viewWindow) { - RimViewWindow* viewWindow = wellLogPlot->ownerPlotDefinition(); viewWindow->zoomAll(); - wellLogPlot->update(); } } } diff --git a/ApplicationCode/Commands/ViewLink/RicLinkVisibleViewsFeatureUi.cpp b/ApplicationCode/Commands/ViewLink/RicLinkVisibleViewsFeatureUi.cpp index 37f7470602..048e55811f 100644 --- a/ApplicationCode/Commands/ViewLink/RicLinkVisibleViewsFeatureUi.cpp +++ b/ApplicationCode/Commands/ViewLink/RicLinkVisibleViewsFeatureUi.cpp @@ -75,14 +75,14 @@ RimView* RicLinkVisibleViewsFeatureUi::masterView() //-------------------------------------------------------------------------------------------------- QList RicLinkVisibleViewsFeatureUi::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) { - QList optionList; + QList options; if (fieldNeedingOptions == &m_masterView) { - for (size_t i = 0; i < m_allViews.size(); i++) + for (RimView* v : m_allViews) { - RimCase* rimCase = NULL; - m_allViews[i]->firstAncestorOrThisOfType(rimCase); + RimCase* rimCase = nullptr; + v->firstAncestorOrThisOfType(rimCase); QIcon icon; if (rimCase) @@ -90,13 +90,9 @@ QList RicLinkVisibleViewsFeatureUi::calculateValueOption icon = rimCase->uiCapability()->uiIcon(); } - - optionList.push_back(caf::PdmOptionItemInfo(RimViewLinker::displayNameForView(m_allViews[i]), - QVariant::fromValue(caf::PdmPointer(m_allViews[i])), - false, - icon)); + options.push_back(caf::PdmOptionItemInfo(RimViewLinker::displayNameForView(v), v, false, icon)); } } - return optionList; + return options; } diff --git a/ApplicationCode/Commands/ViewLink/RicShowAllLinkedViewsFeature.cpp b/ApplicationCode/Commands/ViewLink/RicShowAllLinkedViewsFeature.cpp index 2d41cc7e29..cfd8678b77 100644 --- a/ApplicationCode/Commands/ViewLink/RicShowAllLinkedViewsFeature.cpp +++ b/ApplicationCode/Commands/ViewLink/RicShowAllLinkedViewsFeature.cpp @@ -63,8 +63,7 @@ void RicShowAllLinkedViewsFeature::onActionTriggered(bool isChecked) for (size_t j = 0; j < views.size(); j++) { - views[j]->showWindow.setValueWithFieldChanged(true); - views[j]->uiCapability()->updateUiIconFromToggleField(); + views[j]->forceShowWindowOn(); } } } diff --git a/ApplicationCode/Commands/WellLogCommands/CMakeLists_files.cmake b/ApplicationCode/Commands/WellLogCommands/CMakeLists_files.cmake index 16c6d03451..b97443fe3e 100644 --- a/ApplicationCode/Commands/WellLogCommands/CMakeLists_files.cmake +++ b/ApplicationCode/Commands/WellLogCommands/CMakeLists_files.cmake @@ -18,6 +18,9 @@ ${CEE_CURRENT_LIST_DIR}RicWellLogPlotTrackFeatureImpl.h ${CEE_CURRENT_LIST_DIR}RicPasteWellLogCurveFeature.h ${CEE_CURRENT_LIST_DIR}RicPasteWellLogTrackFeature.h ${CEE_CURRENT_LIST_DIR}RicPasteWellLogPlotFeature.h +${CEE_CURRENT_LIST_DIR}RicChangeDataSourceFeature.h +${CEE_CURRENT_LIST_DIR}RicChangeDataSourceFeatureUi.h +${CEE_CURRENT_LIST_DIR}RicAsciiExportWellLogPlotFeature.h ) set (SOURCE_GROUP_SOURCE_FILES @@ -34,6 +37,9 @@ ${CEE_CURRENT_LIST_DIR}RicWellLogPlotTrackFeatureImpl.cpp ${CEE_CURRENT_LIST_DIR}RicPasteWellLogCurveFeature.cpp ${CEE_CURRENT_LIST_DIR}RicPasteWellLogTrackFeature.cpp ${CEE_CURRENT_LIST_DIR}RicPasteWellLogPlotFeature.cpp +${CEE_CURRENT_LIST_DIR}RicChangeDataSourceFeature.cpp +${CEE_CURRENT_LIST_DIR}RicChangeDataSourceFeatureUi.cpp +${CEE_CURRENT_LIST_DIR}RicAsciiExportWellLogPlotFeature.cpp ) list(APPEND CODE_HEADER_FILES diff --git a/ApplicationCode/Commands/WellLogCommands/RicAddWellLogToPlotFeature.cpp b/ApplicationCode/Commands/WellLogCommands/RicAddWellLogToPlotFeature.cpp index 52ea3a84e1..45bb637df2 100644 --- a/ApplicationCode/Commands/WellLogCommands/RicAddWellLogToPlotFeature.cpp +++ b/ApplicationCode/Commands/WellLogCommands/RicAddWellLogToPlotFeature.cpp @@ -85,6 +85,9 @@ void RicAddWellLogToPlotFeature::onActionTriggered(bool isChecked) if (wellLogFile) { RimWellLogFileCurve* curve = new RimWellLogFileCurve; + cvf::Color3f curveColor = RicWellLogPlotCurveFeatureImpl::curveColorFromTable(plotTrack->curveCount()); + curve->setColor(curveColor); + plotTrack->addCurve(curve); RigWellLogFile* wellLogDataFile = wellLogFile->wellLogFile(); @@ -96,8 +99,6 @@ void RicAddWellLogToPlotFeature::onActionTriggered(bool isChecked) plot->setDepthUnit(wellLogDataFile->depthUnit()); } - cvf::Color3f curveColor = RicWellLogPlotCurveFeatureImpl::curveColorFromTable(); - curve->setColor(curveColor); curve->setWellPath(wellPath); curve->setWellLogChannelName(wellLog->name()); diff --git a/ApplicationCode/Commands/WellLogCommands/RicAsciiExportWellLogPlotFeature.cpp b/ApplicationCode/Commands/WellLogCommands/RicAsciiExportWellLogPlotFeature.cpp new file mode 100644 index 0000000000..f4f8c37791 --- /dev/null +++ b/ApplicationCode/Commands/WellLogCommands/RicAsciiExportWellLogPlotFeature.cpp @@ -0,0 +1,142 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicAsciiExportWellLogPlotFeature.h" + +#include "RiaApplication.h" +#include "RiaLogging.h" + +#include "RimWellLogPlot.h" + +#include "RiuMainWindow.h" + +#include "cafPdmUiPropertyViewDialog.h" +#include "cafProgressInfo.h" +#include "cafSelectionManager.h" +#include "cafUtils.h" +#include "cvfAssert.h" + +#include +#include +#include +#include +#include + + + +CAF_CMD_SOURCE_INIT(RicAsciiExportWellLogPlotFeature, "RicAsciiExportWellLogPlotFeature"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicAsciiExportWellLogPlotFeature::isCommandEnabled() +{ + return true; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicAsciiExportWellLogPlotFeature::onActionTriggered(bool isChecked) +{ + this->disableModelChangeContribution(); + + RiaApplication* app = RiaApplication::instance(); + QString projectFolder = app->currentProjectPath(); + + RimProject* project = RiaApplication::instance()->project(); + CVF_ASSERT(project); + + std::vector selectedWellLogPlots; + caf::SelectionManager::instance()->objectsByType(&selectedWellLogPlots); + QString defaultDir = RiaApplication::instance()->lastUsedDialogDirectoryWithFallback("PLOT_ASCIIEXPORT_DIR", projectFolder); + + caf::ProgressInfo pi(selectedWellLogPlots.size(), QString("Exporting plot data to ASCII")); + size_t progress = 0; + + if (selectedWellLogPlots.size() == 1) + { + RimWellLogPlot* wellLogPlot = selectedWellLogPlots.at(0); + QString defaultFileName = defaultDir + "/" + caf::Utils::makeValidFileBasename((wellLogPlot->description())) + ".ascii"; + QString fileName = QFileDialog::getSaveFileName(nullptr, "Select File for Plot Data Export", defaultFileName, "Text File(*.ascii);;All files(*.*)"); + if (fileName.isEmpty()) return; + RicAsciiExportWellLogPlotFeature::exportAsciiForWellLogPlot(fileName, wellLogPlot); + + progress++; + pi.setProgress(progress); + } + else if (selectedWellLogPlots.size() > 1) + { + std::vector fileNames; + for (RimWellLogPlot* wellLogPlot : selectedWellLogPlots) + { + QString fileName = caf::Utils::makeValidFileBasename(wellLogPlot->description()) + ".ascii"; + fileNames.push_back(fileName); + } + + QString saveDir; + bool writeFiles = caf::Utils::getSaveDirectoryAndCheckOverwriteFiles(defaultDir, fileNames, &saveDir); + if (!writeFiles) return; + + RiaLogging::info(QString("Writing to directory %!").arg(saveDir)); + for (RimWellLogPlot* wellLogPlot : selectedWellLogPlots) + { + QString fileName = saveDir + "/" + caf::Utils::makeValidFileBasename(wellLogPlot->description()) + ".ascii"; + RicAsciiExportWellLogPlotFeature::exportAsciiForWellLogPlot(fileName, wellLogPlot); + + progress++; + pi.setProgress(progress); + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicAsciiExportWellLogPlotFeature::setupActionLook(QAction* actionToSetup) +{ + actionToSetup->setText("Export Plot Data to Text File"); + actionToSetup->setIcon(QIcon(":/Save.png")); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicAsciiExportWellLogPlotFeature::exportAsciiForWellLogPlot(const QString& fileName, const RimWellLogPlot* wellLogPlot) +{ + QFile file(fileName); + if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) + { + return false; + } + + RiaLogging::info(QString("Writing values for plot(s) to file: %1").arg(fileName)); + + QTextStream out(&file); + + out << wellLogPlot->description(); + out << "\n"; + out << wellLogPlot->asciiDataForPlotExport(); + out << "\n\n"; + + RiaLogging::info(QString("Competed writing values for plot(s) to file %1").arg(fileName)); + + return true; +} + + diff --git a/ApplicationCode/Commands/WellLogCommands/RicAsciiExportWellLogPlotFeature.h b/ApplicationCode/Commands/WellLogCommands/RicAsciiExportWellLogPlotFeature.h new file mode 100644 index 0000000000..baaad8db8b --- /dev/null +++ b/ApplicationCode/Commands/WellLogCommands/RicAsciiExportWellLogPlotFeature.h @@ -0,0 +1,39 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafCmdFeature.h" + +class RimWellLogPlot; + +//================================================================================================== +/// +//================================================================================================== +class RicAsciiExportWellLogPlotFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + +protected: + virtual bool isCommandEnabled() override; + virtual void onActionTriggered( bool isChecked ) override; + virtual void setupActionLook(QAction* actionToSetup) override; + +private: + static bool exportAsciiForWellLogPlot(const QString& fileName, const RimWellLogPlot* wellLogPlot); +}; diff --git a/ApplicationCode/Commands/WellLogCommands/RicChangeDataSourceFeature.cpp b/ApplicationCode/Commands/WellLogCommands/RicChangeDataSourceFeature.cpp new file mode 100644 index 0000000000..b9e66f686e --- /dev/null +++ b/ApplicationCode/Commands/WellLogCommands/RicChangeDataSourceFeature.cpp @@ -0,0 +1,102 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicChangeDataSourceFeature.h" + +#include "RicChangeDataSourceFeatureUi.h" +#include "RicWellLogPlotCurveFeatureImpl.h" + +#include "RimCase.h" +#include "RimWellLogCurve.h" +#include "RimWellLogExtractionCurve.h" +#include "RimWellPath.h" + +#include "cafPdmUiPropertyViewDialog.h" + +#include + +CAF_CMD_SOURCE_INIT(RicChangeDataSourceFeature, "RicChangeDataSourceFeature"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicChangeDataSourceFeature::isCommandEnabled() +{ + if (RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot()) return false; + + std::vector extrCurves = extractionCurves(); + + return extrCurves.size() > 0; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicChangeDataSourceFeature::onActionTriggered(bool isChecked) +{ + if (RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot()) return; + + std::vector extrCurves = extractionCurves(); + if (extrCurves.size() == 0) return; + + RicChangeDataSourceFeatureUi featureUi; + featureUi.wellPathToApply = extrCurves[0]->wellPath(); + featureUi.caseToApply = extrCurves[0]->rimCase(); + + caf::PdmUiPropertyViewDialog propertyDialog(nullptr, &featureUi, "Change Data Source for Selected Curves", ""); + propertyDialog.resize(QSize(500, 200)); + if (propertyDialog.exec() == QDialog::Accepted) + { + for (RimWellLogExtractionCurve* extractionCurve : extrCurves) + { + extractionCurve->setWellPath(featureUi.wellPathToApply); + extractionCurve->setCase(featureUi.caseToApply); + + extractionCurve->loadDataAndUpdate(); + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicChangeDataSourceFeature::setupActionLook(QAction* actionToSetup) +{ + actionToSetup->setText("Change Data Source"); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RicChangeDataSourceFeature::extractionCurves() +{ + std::vector extrCurves; + + std::vector curves = RicWellLogPlotCurveFeatureImpl::selectedWellLogCurves(); + + for (RimWellLogCurve* c : curves) + { + if (dynamic_cast(c)) + { + extrCurves.push_back(dynamic_cast(c)); + } + } + + return extrCurves; +} + diff --git a/ApplicationCode/Commands/WellLogCommands/RicChangeDataSourceFeature.h b/ApplicationCode/Commands/WellLogCommands/RicChangeDataSourceFeature.h new file mode 100644 index 0000000000..83cff04e9a --- /dev/null +++ b/ApplicationCode/Commands/WellLogCommands/RicChangeDataSourceFeature.h @@ -0,0 +1,41 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafCmdFeature.h" + +#include + +class RimWellLogExtractionCurve; + +//================================================================================================== +/// +//================================================================================================== +class RicChangeDataSourceFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + +protected: + virtual bool isCommandEnabled() override; + virtual void onActionTriggered( bool isChecked ) override; + virtual void setupActionLook(QAction* actionToSetup) override; + +private: + static std::vector extractionCurves(); +}; diff --git a/ApplicationCode/Commands/WellLogCommands/RicChangeDataSourceFeatureUi.cpp b/ApplicationCode/Commands/WellLogCommands/RicChangeDataSourceFeatureUi.cpp new file mode 100644 index 0000000000..0b2c1de315 --- /dev/null +++ b/ApplicationCode/Commands/WellLogCommands/RicChangeDataSourceFeatureUi.cpp @@ -0,0 +1,72 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicChangeDataSourceFeatureUi.h" + +#include "RimCase.h" +#include "RimOilField.h" +#include "RimProject.h" +#include "RimTools.h" +#include "RimWellPath.h" +#include "RimWellPathCollection.h" + +#include "RiaApplication.h" + +CAF_PDM_SOURCE_INIT(RicChangeDataSourceFeatureUi, "ChangeDataSourceFeatureUi"); + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RicChangeDataSourceFeatureUi::RicChangeDataSourceFeatureUi() +{ + CAF_PDM_InitObject("Change Data Source", "", "", ""); + + CAF_PDM_InitFieldNoDefault(&wellPathToApply, "CurveWellPath", "Well Path", "", "", ""); + CAF_PDM_InitFieldNoDefault(&caseToApply, "CurveCase", "Case", "", "", ""); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QList RicChangeDataSourceFeatureUi::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) +{ + QList options; + + if (fieldNeedingOptions == &caseToApply) + { + RimTools::caseOptionItems(&options); + } + else if (fieldNeedingOptions == &wellPathToApply) + { + RimTools::wellPathOptionItems(&options); + } + + return options; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicChangeDataSourceFeatureUi::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) +{ + caf::PdmUiGroup* group = uiOrdering.addNewGroup("Apply the following for all selected curves"); + + group->add(&caseToApply); + group->add(&wellPathToApply); +} diff --git a/ApplicationCode/Commands/WellLogCommands/RicChangeDataSourceFeatureUi.h b/ApplicationCode/Commands/WellLogCommands/RicChangeDataSourceFeatureUi.h new file mode 100644 index 0000000000..f97ec5c768 --- /dev/null +++ b/ApplicationCode/Commands/WellLogCommands/RicChangeDataSourceFeatureUi.h @@ -0,0 +1,46 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafPdmObject.h" +#include "cafPdmPtrField.h" +#include "cafPdmUiOrdering.h" + +class RimCase; +class RimWellPath; + + +//================================================================================================== +/// +//================================================================================================== +class RicChangeDataSourceFeatureUi : public caf::PdmObject +{ + CAF_PDM_HEADER_INIT; + +public: + RicChangeDataSourceFeatureUi(); + + caf::PdmPtrField caseToApply; + caf::PdmPtrField wellPathToApply; + +protected: + virtual QList calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override; + + virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override; +}; diff --git a/ApplicationCode/Commands/WellLogCommands/RicDeleteWellLogPlotTrackFeature.cpp b/ApplicationCode/Commands/WellLogCommands/RicDeleteWellLogPlotTrackFeature.cpp index 69eda4887d..abb87fbefa 100644 --- a/ApplicationCode/Commands/WellLogCommands/RicDeleteWellLogPlotTrackFeature.cpp +++ b/ApplicationCode/Commands/WellLogCommands/RicDeleteWellLogPlotTrackFeature.cpp @@ -19,6 +19,8 @@ #include "RicDeleteWellLogPlotTrackFeature.h" +#include "RicWellLogPlotCurveFeatureImpl.h" + #include "RimWellLogTrack.h" #include "RimWellLogPlot.h" @@ -34,6 +36,8 @@ CAF_CMD_SOURCE_INIT(RicDeleteWellLogPlotTrackFeature, "RicDeleteWellLogPlotTrack //-------------------------------------------------------------------------------------------------- bool RicDeleteWellLogPlotTrackFeature::isCommandEnabled() { + if (RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot()) return false; + std::vector selection; caf::SelectionManager::instance()->objectsByType(&selection); @@ -41,7 +45,7 @@ bool RicDeleteWellLogPlotTrackFeature::isCommandEnabled() { RimWellLogPlot* wellLogPlot = NULL; selection[0]->firstAncestorOrThisOfType(wellLogPlot); - if (wellLogPlot->trackCount() > 1) + if (wellLogPlot && wellLogPlot->trackCount() > 1) { return true; } @@ -55,6 +59,8 @@ bool RicDeleteWellLogPlotTrackFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicDeleteWellLogPlotTrackFeature::onActionTriggered(bool isChecked) { + if (RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot()) return; + std::vector selection; caf::SelectionManager::instance()->objectsByType(&selection); diff --git a/ApplicationCode/Commands/WellLogCommands/RicNewWellLogCurveExtractionFeature.cpp b/ApplicationCode/Commands/WellLogCommands/RicNewWellLogCurveExtractionFeature.cpp index 29313041d0..1ad9176a8f 100644 --- a/ApplicationCode/Commands/WellLogCommands/RicNewWellLogCurveExtractionFeature.cpp +++ b/ApplicationCode/Commands/WellLogCommands/RicNewWellLogCurveExtractionFeature.cpp @@ -22,6 +22,10 @@ #include "RicWellLogPlotCurveFeatureImpl.h" #include "RicNewWellLogPlotFeatureImpl.h" +#include "RiaApplication.h" + +#include "RigWellLogCurveData.h" + #include "RimProject.h" #include "RimView.h" #include "RimWellLogExtractionCurve.h" @@ -29,15 +33,16 @@ #include "RimWellLogTrack.h" #include "RimWellPath.h" #include "RimWellPathCollection.h" -#include "RiuMainPlotWindow.h" -#include "RiaApplication.h" +#include "RiuMainPlotWindow.h" #include "cafSelectionManager.h" #include #include +#include "RimEclipseWell.h" +#include "RiuSelectionManager.h" CAF_CMD_SOURCE_INIT(RicNewWellLogCurveExtractionFeature, "RicNewWellLogCurveExtractionFeature"); @@ -47,7 +52,9 @@ CAF_CMD_SOURCE_INIT(RicNewWellLogCurveExtractionFeature, "RicNewWellLogCurveExtr //-------------------------------------------------------------------------------------------------- bool RicNewWellLogCurveExtractionFeature::isCommandEnabled() { - return (selectedWellLogPlotTrack() != NULL || selectedWellPath() != NULL) && caseAvailable(); + if (RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot()) return false; + int branchIndex; + return (selectedWellLogPlotTrack() != nullptr || selectedWellPath() != nullptr || selectedSimulationWell(&branchIndex) != nullptr) && caseAvailable(); } //-------------------------------------------------------------------------------------------------- @@ -55,18 +62,22 @@ bool RicNewWellLogCurveExtractionFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicNewWellLogCurveExtractionFeature::onActionTriggered(bool isChecked) { + if (RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot()) return; + RimWellLogTrack* wellLogPlotTrack = selectedWellLogPlotTrack(); if (wellLogPlotTrack) { - addCurve(wellLogPlotTrack, NULL, NULL); + addCurve(wellLogPlotTrack, NULL, NULL, nullptr, -1); } else { RimWellPath* wellPath = selectedWellPath(); - if (wellPath) + int branchIndex = -1; + RimEclipseWell* simWell = selectedSimulationWell(&branchIndex); + if (wellPath || simWell) { RimWellLogTrack* wellLogPlotTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack(); - RimWellLogExtractionCurve* plotCurve = addCurve(wellLogPlotTrack, RiaApplication::instance()->activeReservoirView(), wellPath); + RimWellLogExtractionCurve* plotCurve = addCurve(wellLogPlotTrack, RiaApplication::instance()->activeReservoirView(), wellPath, simWell, branchIndex); plotCurve->loadDataAndUpdate(); @@ -111,6 +122,27 @@ RimWellPath* RicNewWellLogCurveExtractionFeature::selectedWellPath() const return selection.size() > 0 ? selection[0] : NULL; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimEclipseWell* RicNewWellLogCurveExtractionFeature::selectedSimulationWell(int * branchIndex) const +{ + RiuSelectionItem* selItem = RiuSelectionManager::instance()->selectedItem(RiuSelectionManager::RUI_TEMPORARY); + RiuSimWellSelectionItem* simWellSelItem = dynamic_cast(selItem); + if (simWellSelItem) + { + (*branchIndex) = static_cast(simWellSelItem->m_branchIndex); + return simWellSelItem->m_simWell; + } + else + { + std::vector selection; + caf::SelectionManager::instance()->objectsByType(&selection); + (*branchIndex) = 0; + return selection.size() > 0 ? selection[0] : NULL; + } +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -125,15 +157,18 @@ bool RicNewWellLogCurveExtractionFeature::caseAvailable() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimWellLogExtractionCurve* RicNewWellLogCurveExtractionFeature::addCurve(RimWellLogTrack* plotTrack, RimView* view, RimWellPath* wellPath) +RimWellLogExtractionCurve* RicNewWellLogCurveExtractionFeature::addCurve(RimWellLogTrack* plotTrack, RimView* view, RimWellPath* wellPath, const RimEclipseWell* simWell, int branchIndex) { CVF_ASSERT(plotTrack); RimWellLogExtractionCurve* curve = new RimWellLogExtractionCurve(); - cvf::Color3f curveColor = RicWellLogPlotCurveFeatureImpl::curveColorFromTable(); + cvf::Color3f curveColor = RicWellLogPlotCurveFeatureImpl::curveColorFromTable(plotTrack->curveCount()); curve->setColor(curveColor); - curve->setWellPath(wellPath); + if (wellPath) curve->setWellPath(wellPath); + if (simWell) curve->setFromSimulationWellName(simWell->name(), branchIndex); + curve->setPropertiesFromView(view); + plotTrack->addCurve(curve); plotTrack->updateConnectedEditors(); diff --git a/ApplicationCode/Commands/WellLogCommands/RicNewWellLogCurveExtractionFeature.h b/ApplicationCode/Commands/WellLogCommands/RicNewWellLogCurveExtractionFeature.h index 97d33a9b70..223d3ba079 100644 --- a/ApplicationCode/Commands/WellLogCommands/RicNewWellLogCurveExtractionFeature.h +++ b/ApplicationCode/Commands/WellLogCommands/RicNewWellLogCurveExtractionFeature.h @@ -21,10 +21,11 @@ #include "cafCmdFeature.h" +class RimEclipseWell; +class RimView; class RimWellLogExtractionCurve; class RimWellLogTrack; class RimWellPath; -class RimView; //================================================================================================== /// @@ -34,7 +35,7 @@ class RicNewWellLogCurveExtractionFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; public: - static RimWellLogExtractionCurve* addCurve(RimWellLogTrack* plotTrack, RimView* view, RimWellPath* wellPath); + static RimWellLogExtractionCurve* addCurve(RimWellLogTrack* plotTrack, RimView* view, RimWellPath* wellPath, const RimEclipseWell* simWell, int branchIndex); protected: @@ -46,5 +47,6 @@ class RicNewWellLogCurveExtractionFeature : public caf::CmdFeature private: RimWellLogTrack* selectedWellLogPlotTrack() const; RimWellPath* selectedWellPath() const; + RimEclipseWell* selectedSimulationWell(int * branchIndex) const; bool caseAvailable() const; }; diff --git a/ApplicationCode/Commands/WellLogCommands/RicNewWellLogFileCurveFeature.cpp b/ApplicationCode/Commands/WellLogCommands/RicNewWellLogFileCurveFeature.cpp index d9600de73d..25129baba4 100644 --- a/ApplicationCode/Commands/WellLogCommands/RicNewWellLogFileCurveFeature.cpp +++ b/ApplicationCode/Commands/WellLogCommands/RicNewWellLogFileCurveFeature.cpp @@ -145,11 +145,12 @@ RimWellLogFileCurve* RicNewWellLogFileCurveFeature::addCurve(RimWellLogTrack* pl CVF_ASSERT(plotTrack); RimWellLogFileCurve* curve = new RimWellLogFileCurve(); - plotTrack->addCurve(curve); - cvf::Color3f curveColor = RicWellLogPlotCurveFeatureImpl::curveColorFromTable(); + cvf::Color3f curveColor = RicWellLogPlotCurveFeatureImpl::curveColorFromTable(plotTrack->curveCount()); curve->setColor(curveColor); + plotTrack->addCurve(curve); + plotTrack->updateConnectedEditors(); RiuMainPlotWindow* plotwindow = RiaApplication::instance()->getOrCreateAndShowMainPlotWindow(); diff --git a/ApplicationCode/Commands/WellLogCommands/RicNewWellLogPlotFeature.cpp b/ApplicationCode/Commands/WellLogCommands/RicNewWellLogPlotFeature.cpp index a743d82381..55cef779f9 100644 --- a/ApplicationCode/Commands/WellLogCommands/RicNewWellLogPlotFeature.cpp +++ b/ApplicationCode/Commands/WellLogCommands/RicNewWellLogPlotFeature.cpp @@ -51,7 +51,7 @@ bool RicNewWellLogPlotFeature::isCommandEnabled() void RicNewWellLogPlotFeature::onActionTriggered(bool isChecked) { RimWellLogTrack* plotTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack(); - RicNewWellLogCurveExtractionFeature::addCurve(plotTrack, NULL, NULL); + RicNewWellLogCurveExtractionFeature::addCurve(plotTrack, NULL, NULL, nullptr, -1); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/Commands/WellLogCommands/RicNewWellLogPlotFeatureImpl.cpp b/ApplicationCode/Commands/WellLogCommands/RicNewWellLogPlotFeatureImpl.cpp index 812cd4e4ae..c568d2a5ab 100644 --- a/ApplicationCode/Commands/WellLogCommands/RicNewWellLogPlotFeatureImpl.cpp +++ b/ApplicationCode/Commands/WellLogCommands/RicNewWellLogPlotFeatureImpl.cpp @@ -39,10 +39,11 @@ RimWellLogPlot* RicNewWellLogPlotFeatureImpl::createWellLogPlot() CVF_ASSERT(wellLogPlotColl); RimWellLogPlot* plot = new RimWellLogPlot(); + plot->setAsPlotMdiWindow(); wellLogPlotColl->wellLogPlots().push_back(plot); // Make sure the summary plot window is created and visible - RiuMainPlotWindow* plotwindow = RiaApplication::instance()->getOrCreateAndShowMainPlotWindow(); + RiaApplication::instance()->getOrCreateAndShowMainPlotWindow(); plot->setDescription(QString("Well Log Plot %1").arg(wellLogPlotCollection()->wellLogPlots.size())); diff --git a/ApplicationCode/Commands/WellLogCommands/RicNewWellLogPlotTrackFeature.cpp b/ApplicationCode/Commands/WellLogCommands/RicNewWellLogPlotTrackFeature.cpp index 9305391788..a487cf97de 100644 --- a/ApplicationCode/Commands/WellLogCommands/RicNewWellLogPlotTrackFeature.cpp +++ b/ApplicationCode/Commands/WellLogCommands/RicNewWellLogPlotTrackFeature.cpp @@ -19,11 +19,12 @@ #include "RicNewWellLogPlotTrackFeature.h" +#include "RicNewWellLogCurveExtractionFeature.h" +#include "RicWellLogPlotCurveFeatureImpl.h" + #include "RimWellLogPlot.h" #include "RimWellLogTrack.h" -#include "RicNewWellLogCurveExtractionFeature.h" - #include "cafSelectionManager.h" #include @@ -36,6 +37,8 @@ CAF_CMD_SOURCE_INIT(RicNewWellLogPlotTrackFeature, "RicNewWellLogPlotTrackFeatur //-------------------------------------------------------------------------------------------------- bool RicNewWellLogPlotTrackFeature::isCommandEnabled() { + if (RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot()) return false; + return selectedWellLogPlot() != NULL; } @@ -44,6 +47,8 @@ bool RicNewWellLogPlotTrackFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicNewWellLogPlotTrackFeature::onActionTriggered(bool isChecked) { + if (RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot()) return; + RimWellLogPlot* wellLogPlot = selectedWellLogPlot(); if (wellLogPlot) { @@ -52,7 +57,7 @@ void RicNewWellLogPlotTrackFeature::onActionTriggered(bool isChecked) plotTrack->setDescription(QString("Track %1").arg(wellLogPlot->trackCount())); wellLogPlot->updateConnectedEditors(); - RicNewWellLogCurveExtractionFeature::addCurve(plotTrack, NULL, NULL); + RicNewWellLogCurveExtractionFeature::addCurve(plotTrack, NULL, NULL, nullptr, -1); } } diff --git a/ApplicationCode/Commands/WellLogCommands/RicPasteWellLogCurveFeature.cpp b/ApplicationCode/Commands/WellLogCommands/RicPasteWellLogCurveFeature.cpp index 407d005c55..48bf741fbd 100644 --- a/ApplicationCode/Commands/WellLogCommands/RicPasteWellLogCurveFeature.cpp +++ b/ApplicationCode/Commands/WellLogCommands/RicPasteWellLogCurveFeature.cpp @@ -17,6 +17,7 @@ ///////////////////////////////////////////////////////////////////////////////// #include "RicPasteWellLogCurveFeature.h" +#include "RicWellLogPlotCurveFeatureImpl.h" #include "OperationsUsingObjReferences/RicPasteFeatureImpl.h" @@ -41,6 +42,8 @@ CAF_CMD_SOURCE_INIT(RicPasteWellLogCurveFeature, "RicPasteWellLogCurveFeature"); //-------------------------------------------------------------------------------------------------- bool RicPasteWellLogCurveFeature::isCommandEnabled() { + if (RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot()) return false; + caf::PdmObjectHandle* destinationObject = dynamic_cast(caf::SelectionManager::instance()->selectedItem()); RimWellLogTrack* wellLogTrack = nullptr; @@ -58,6 +61,8 @@ bool RicPasteWellLogCurveFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicPasteWellLogCurveFeature::onActionTriggered(bool isChecked) { + if (RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot()) return; + caf::PdmObjectHandle* destinationObject = dynamic_cast(caf::SelectionManager::instance()->selectedItem()); RimWellLogTrack* wellLogTrack = nullptr; diff --git a/ApplicationCode/Commands/WellLogCommands/RicPasteWellLogTrackFeature.cpp b/ApplicationCode/Commands/WellLogCommands/RicPasteWellLogTrackFeature.cpp index 5fca1fa762..d4181a2780 100644 --- a/ApplicationCode/Commands/WellLogCommands/RicPasteWellLogTrackFeature.cpp +++ b/ApplicationCode/Commands/WellLogCommands/RicPasteWellLogTrackFeature.cpp @@ -19,6 +19,7 @@ #include "RicPasteWellLogTrackFeature.h" #include "OperationsUsingObjReferences/RicPasteFeatureImpl.h" +#include "RicWellLogPlotCurveFeatureImpl.h" #include "RimWellLogPlot.h" #include "RimWellLogTrack.h" @@ -39,6 +40,8 @@ CAF_CMD_SOURCE_INIT(RicPasteWellLogTrackFeature, "RicPasteWellLogTrackFeature"); //-------------------------------------------------------------------------------------------------- bool RicPasteWellLogTrackFeature::isCommandEnabled() { + if (RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot()) return false; + caf::PdmObjectHandle* destinationObject = dynamic_cast(caf::SelectionManager::instance()->selectedItem()); RimWellLogPlot* wellLogPlot = nullptr; @@ -56,6 +59,8 @@ bool RicPasteWellLogTrackFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicPasteWellLogTrackFeature::onActionTriggered(bool isChecked) { + if (RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot()) return; + caf::PdmObjectHandle* destinationObject = dynamic_cast(caf::SelectionManager::instance()->selectedItem()); RimWellLogPlot* wellLogPlot = nullptr; @@ -77,6 +82,8 @@ void RicPasteWellLogTrackFeature::onActionTriggered(bool isChecked) wellLogPlot->addTrack(newObject); + newObject->setDescription(QString("Track %1").arg(wellLogPlot->trackCount())); + // Resolve references after object has been inserted into the project data model newObject->resolveReferencesRecursively(); newObject->initAfterReadRecursively(); diff --git a/ApplicationCode/Commands/WellLogCommands/RicWellLogPlotCurveFeatureImpl.cpp b/ApplicationCode/Commands/WellLogCommands/RicWellLogPlotCurveFeatureImpl.cpp index ae5c4325c7..24f8438028 100644 --- a/ApplicationCode/Commands/WellLogCommands/RicWellLogPlotCurveFeatureImpl.cpp +++ b/ApplicationCode/Commands/WellLogCommands/RicWellLogPlotCurveFeatureImpl.cpp @@ -19,36 +19,70 @@ #include "RicWellLogPlotCurveFeatureImpl.h" +#include "RiaColorTables.h" + +#include "RimWellAllocationPlot.h" +#include "RimWellLogCurve.h" + +#include "cafSelectionManager.h" + #include -static const int RI_LOGPLOT_CURVECOLORSCOUNT = 15; -static const int RI_LOGPLOT_CURVECOLORS[] = -{ - Qt::black, - Qt::darkBlue, - Qt::darkRed, - Qt::darkGreen, - Qt::darkYellow, - Qt::darkMagenta, - Qt::darkCyan, - Qt::darkGray, - Qt::blue, - Qt::red, - Qt::green, - Qt::yellow, - Qt::magenta, - Qt::cyan, - Qt::gray -}; //-------------------------------------------------------------------------------------------------- /// Pick default curve color from an index based palette //-------------------------------------------------------------------------------------------------- -cvf::Color3f RicWellLogPlotCurveFeatureImpl::curveColorFromTable() +cvf::Color3f RicWellLogPlotCurveFeatureImpl::curveColorFromTable(size_t index) { - static int colorIndex = 0; - QColor color = QColor(Qt::GlobalColor(RI_LOGPLOT_CURVECOLORS[colorIndex % RI_LOGPLOT_CURVECOLORSCOUNT])); - ++colorIndex; - cvf::Color3f cvfColor(color.redF(), color.greenF(), color.blueF()); - return cvfColor; + return RiaColorTables::wellLogPlotPaletteColors().cycledColor3f(index); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RicWellLogPlotCurveFeatureImpl::selectedWellLogCurves() +{ + std::set curveSet; + + { + std::vector selectedItems; + caf::SelectionManager::instance()->selectedItems(selectedItems); + + for (caf::PdmUiItem* selectedItem : selectedItems) + { + caf::PdmObjectHandle* objHandle = dynamic_cast(selectedItem); + if (objHandle) + { + std::vector childCurves; + objHandle->descendantsIncludingThisOfType(childCurves); + + for (RimWellLogCurve* curve : childCurves) + { + curveSet.insert(curve); + } + } + } + } + + std::vector allCurves; + for (RimWellLogCurve* curve : curveSet) + { + allCurves.push_back(curve); + } + + return allCurves; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimWellAllocationPlot* RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot() +{ + caf::PdmObjectHandle* destinationObject = dynamic_cast(caf::SelectionManager::instance()->selectedItem()); + if (!destinationObject) return nullptr; + + RimWellAllocationPlot* wellAllocationPlot = nullptr; + destinationObject->firstAncestorOrThisOfType(wellAllocationPlot); + + return wellAllocationPlot; } diff --git a/ApplicationCode/Commands/WellLogCommands/RicWellLogPlotCurveFeatureImpl.h b/ApplicationCode/Commands/WellLogCommands/RicWellLogPlotCurveFeatureImpl.h index 5e508d0208..4d45ddb5c9 100644 --- a/ApplicationCode/Commands/WellLogCommands/RicWellLogPlotCurveFeatureImpl.h +++ b/ApplicationCode/Commands/WellLogCommands/RicWellLogPlotCurveFeatureImpl.h @@ -21,12 +21,16 @@ #include "cafPdmFieldCvfColor.h" +class RimWellLogCurve; +class RimWellAllocationPlot; + //================================================================================================== /// //================================================================================================== class RicWellLogPlotCurveFeatureImpl { - public: - static cvf::Color3f curveColorFromTable(); + static cvf::Color3f curveColorFromTable(size_t index); + static std::vector selectedWellLogCurves(); + static RimWellAllocationPlot* parentWellAllocationPlot(); }; diff --git a/ApplicationCode/Commands/WellPathCommands/CMakeLists_files.cmake b/ApplicationCode/Commands/WellPathCommands/CMakeLists_files.cmake index 0deea938f8..b249623bc5 100644 --- a/ApplicationCode/Commands/WellPathCommands/CMakeLists_files.cmake +++ b/ApplicationCode/Commands/WellPathCommands/CMakeLists_files.cmake @@ -6,7 +6,6 @@ endif() set (SOURCE_GROUP_HEADER_FILES ${CEE_CURRENT_LIST_DIR}RicWellPathDeleteFeature.h -${CEE_CURRENT_LIST_DIR}RicWellPathsDeleteAllFeature.h ${CEE_CURRENT_LIST_DIR}RicWellPathsImportFileFeature.h ${CEE_CURRENT_LIST_DIR}RicWellPathsImportSsihubFeature.h ${CEE_CURRENT_LIST_DIR}RicWellPathViewerEventHandler.h @@ -14,7 +13,6 @@ ${CEE_CURRENT_LIST_DIR}RicWellPathViewerEventHandler.h set (SOURCE_GROUP_SOURCE_FILES ${CEE_CURRENT_LIST_DIR}RicWellPathDeleteFeature.cpp -${CEE_CURRENT_LIST_DIR}RicWellPathsDeleteAllFeature.cpp ${CEE_CURRENT_LIST_DIR}RicWellPathsImportFileFeature.cpp ${CEE_CURRENT_LIST_DIR}RicWellPathsImportSsihubFeature.cpp ${CEE_CURRENT_LIST_DIR}RicWellPathViewerEventHandler.cpp diff --git a/ApplicationCode/Commands/WellPathCommands/RicWellPathDeleteFeature.cpp b/ApplicationCode/Commands/WellPathCommands/RicWellPathDeleteFeature.cpp index 42a1636946..9ee57e1033 100644 --- a/ApplicationCode/Commands/WellPathCommands/RicWellPathDeleteFeature.cpp +++ b/ApplicationCode/Commands/WellPathCommands/RicWellPathDeleteFeature.cpp @@ -29,6 +29,7 @@ namespace caf { + CAF_CMD_SOURCE_INIT(RicWellPathDeleteFeature, "RicWellPathDeleteFeature"); @@ -40,7 +41,7 @@ bool RicWellPathDeleteFeature::isCommandEnabled() std::vector objects; caf::SelectionManager::instance()->objectsByType(&objects); - if (objects.size() == 1) + if (objects.size() > 0) { return true; } @@ -58,13 +59,17 @@ void RicWellPathDeleteFeature::onActionTriggered(bool isChecked) if (objects.size() == 0) return; - RimWellPath* wellPath = objects[0]; + RimWellPath* firstWellPath = objects[0]; - RimWellPathCollection* wellPathCollection = NULL; - wellPath->firstAncestorOrThisOfType(wellPathCollection); + RimWellPathCollection* wellPathCollection = nullptr; + firstWellPath->firstAncestorOrThisOfType(wellPathCollection); + if (!wellPathCollection) return; - wellPathCollection->removeWellPath(wellPath);; - delete wellPath; + for (RimWellPath* wellPath : objects) + { + wellPathCollection->removeWellPath(wellPath);; + delete wellPath; + } wellPathCollection->uiCapability()->updateConnectedEditors(); wellPathCollection->scheduleGeometryRegenAndRedrawViews(); @@ -75,7 +80,7 @@ void RicWellPathDeleteFeature::onActionTriggered(bool isChecked) //-------------------------------------------------------------------------------------------------- void RicWellPathDeleteFeature::setupActionLook(QAction* actionToSetup) { - actionToSetup->setText("Delete Well Path"); + actionToSetup->setText("Delete Well Path(s)"); actionToSetup->setIcon(QIcon(":/Erase.png")); } diff --git a/ApplicationCode/Commands/WellPathCommands/RicWellPathViewerEventHandler.cpp b/ApplicationCode/Commands/WellPathCommands/RicWellPathViewerEventHandler.cpp index 8201802b0e..6777903eae 100644 --- a/ApplicationCode/Commands/WellPathCommands/RicWellPathViewerEventHandler.cpp +++ b/ApplicationCode/Commands/WellPathCommands/RicWellPathViewerEventHandler.cpp @@ -21,7 +21,6 @@ #include "RiaApplication.h" -#include "RimCase.h" #include "RimView.h" #include "RimWellPath.h" @@ -57,8 +56,6 @@ bool RicWellPathViewerEventHandler::handleEvent(cvf::Object* eventObject) const RivWellPathSourceInfo* wellPathSourceInfo = dynamic_cast(uiEvent->firstHitPart->sourceInfo()); if (wellPathSourceInfo) { - cvf::Vec3d displayModelOffset = cvf::Vec3d::ZERO; - RimView* rimView = RiaApplication::instance()->activeReservoirView(); if (!rimView) return false; diff --git a/ApplicationCode/Commands/WellPathCommands/RicWellPathsDeleteAllFeature.cpp b/ApplicationCode/Commands/WellPathCommands/RicWellPathsDeleteAllFeature.cpp deleted file mode 100644 index 0d22d4a594..0000000000 --- a/ApplicationCode/Commands/WellPathCommands/RicWellPathsDeleteAllFeature.cpp +++ /dev/null @@ -1,75 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2015- Statoil ASA -// Copyright (C) 2015- Ceetron Solutions 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#include "RicWellPathsDeleteAllFeature.h" - -#include "RimWellPathCollection.h" - -#include "cafSelectionManager.h" - -#include - -namespace caf -{ - -CAF_CMD_SOURCE_INIT(RicWellPathsDeleteAllFeature, "RicWellPathsDeleteAllFeature"); - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicWellPathsDeleteAllFeature::isCommandEnabled() -{ - std::vector objects; - caf::SelectionManager::instance()->objectsByType(&objects); - - if (objects.size() == 1) - { - return true; - } - - return false; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RicWellPathsDeleteAllFeature::onActionTriggered(bool isChecked) -{ - std::vector objects; - caf::SelectionManager::instance()->objectsByType(&objects); - - RimWellPathCollection* wellPathCollection = objects[0]; - - wellPathCollection->deleteAllWellPaths(); - - wellPathCollection->uiCapability()->updateConnectedEditors(); - wellPathCollection->scheduleGeometryRegenAndRedrawViews(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RicWellPathsDeleteAllFeature::setupActionLook(QAction* actionToSetup) -{ - actionToSetup->setText("Delete All Well Paths"); - actionToSetup->setIcon(QIcon(":/Erase.png")); -} - -} // end namespace caf diff --git a/ApplicationCode/Commands/WellPathCommands/RicWellPathsDeleteAllFeature.h b/ApplicationCode/Commands/WellPathCommands/RicWellPathsDeleteAllFeature.h deleted file mode 100644 index 3c316ce976..0000000000 --- a/ApplicationCode/Commands/WellPathCommands/RicWellPathsDeleteAllFeature.h +++ /dev/null @@ -1,43 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2015- Statoil ASA -// Copyright (C) 2015- Ceetron Solutions 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#pragma once - -#include "cafCmdFeature.h" - -namespace caf -{ - -//================================================================================================== -/// -//================================================================================================== -class RicWellPathsDeleteAllFeature : public CmdFeature -{ - CAF_CMD_HEADER_INIT; -protected: - - // Overrides - virtual bool isCommandEnabled(); - virtual void onActionTriggered( bool isChecked ); - virtual void setupActionLook( QAction* actionToSetup ); -}; - - - -} // end namespace caf diff --git a/ApplicationCode/Commands/WellPathCommands/RicWellPathsImportSsihubFeature.cpp b/ApplicationCode/Commands/WellPathCommands/RicWellPathsImportSsihubFeature.cpp index 68163fa9a7..e4be65a2b6 100644 --- a/ApplicationCode/Commands/WellPathCommands/RicWellPathsImportSsihubFeature.cpp +++ b/ApplicationCode/Commands/WellPathCommands/RicWellPathsImportSsihubFeature.cpp @@ -27,6 +27,8 @@ #include "RiuMainWindow.h" #include "RiuWellImportWizard.h" +#include "cafUtils.h" + #include #include #include @@ -47,7 +49,7 @@ bool RicWellPathsImportSsihubFeature::isCommandEnabled() return false; } - if (!QFile::exists(app->project()->fileName())) + if (!caf::Utils::fileExists(app->project()->fileName())) { return false; } @@ -66,7 +68,7 @@ void RicWellPathsImportSsihubFeature::onActionTriggered(bool isChecked) return; } - if (!QFile::exists(app->project()->fileName())) + if (!caf::Utils::fileExists(app->project()->fileName())) { return; } @@ -80,7 +82,7 @@ void RicWellPathsImportSsihubFeature::onActionTriggered(bool isChecked) // Keep a copy of the import settings, and restore if cancel is pressed in the import wizard - QString copyOfOriginalObject = xmlObj(app->project()->wellPathImport())->writeObjectToXmlString(); + QString copyOfOriginalObject = app->project()->wellPathImport()->writeObjectToXmlString(); RiuWellImportWizard wellImportwizard(app->preferences()->ssihubAddress, wellPathsFolderPath, app->project()->wellPathImport(), RiuMainWindow::instance()); @@ -111,7 +113,7 @@ void RicWellPathsImportSsihubFeature::onActionTriggered(bool isChecked) } else { - xmlObj(app->project()->wellPathImport())->readObjectFromXmlString(copyOfOriginalObject, caf::PdmDefaultObjectFactory::instance()); + app->project()->wellPathImport()->readObjectFromXmlString(copyOfOriginalObject, caf::PdmDefaultObjectFactory::instance()); } } diff --git a/ApplicationCode/FileInterface/CMakeLists_files.cmake b/ApplicationCode/FileInterface/CMakeLists_files.cmake index f4620e1bfb..b1dcb8274c 100644 --- a/ApplicationCode/FileInterface/CMakeLists_files.cmake +++ b/ApplicationCode/FileInterface/CMakeLists_files.cmake @@ -19,7 +19,6 @@ ${CEE_CURRENT_LIST_DIR}RifReaderInterface.h ${CEE_CURRENT_LIST_DIR}RifReaderMockModel.h ${CEE_CURRENT_LIST_DIR}RifReaderSettings.h ${CEE_CURRENT_LIST_DIR}RifEclipseSummaryAddress.h -${CEE_CURRENT_LIST_DIR}RifReaderOpmParserInput.h ) set (SOURCE_GROUP_SOURCE_FILES @@ -37,7 +36,6 @@ ${CEE_CURRENT_LIST_DIR}RifReaderInterface.cpp ${CEE_CURRENT_LIST_DIR}RifReaderMockModel.cpp ${CEE_CURRENT_LIST_DIR}RifReaderSettings.cpp ${CEE_CURRENT_LIST_DIR}RifEclipseSummaryAddress.cpp -${CEE_CURRENT_LIST_DIR}RifReaderOpmParserInput.cpp ) list(APPEND CODE_HEADER_FILES diff --git a/ApplicationCode/FileInterface/RifEclipseInputFileTools.cpp b/ApplicationCode/FileInterface/RifEclipseInputFileTools.cpp index 223952d74d..da057819d2 100644 --- a/ApplicationCode/FileInterface/RifEclipseInputFileTools.cpp +++ b/ApplicationCode/FileInterface/RifEclipseInputFileTools.cpp @@ -21,8 +21,11 @@ #include "RifEclipseInputFileTools.h" #include "RifReaderEclipseOutput.h" + +#include "RigActiveCellInfo.h" #include "RigCaseCellResultsData.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" +#include "RigMainGrid.h" #include "RigResultAccessorFactory.h" #include "cafProgressInfo.h" @@ -70,7 +73,7 @@ RifEclipseInputFileTools::~RifEclipseInputFileTools() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RifEclipseInputFileTools::openGridFile(const QString& fileName, RigCaseData* eclipseCase, bool readFaultData) +bool RifEclipseInputFileTools::openGridFile(const QString& fileName, RigEclipseCaseData* eclipseCase, bool readFaultData) { CVF_ASSERT(eclipseCase); @@ -118,22 +121,22 @@ bool RifEclipseInputFileTools::openGridFile(const QString& fileName, RigCaseData bool allKwReadOk = true; fseek(gridFilePointer, specgridPos, SEEK_SET); - allKwReadOk = allKwReadOk && NULL != (specGridKw = ecl_kw_fscanf_alloc_current_grdecl__(gridFilePointer, false , ECL_INT_TYPE)); + allKwReadOk = allKwReadOk && NULL != (specGridKw = ecl_kw_fscanf_alloc_current_grdecl__(gridFilePointer, false , ecl_type_create_from_type(ECL_INT_TYPE))); progress.setProgress(1); fseek(gridFilePointer, zcornPos, SEEK_SET); - allKwReadOk = allKwReadOk && NULL != (zCornKw = ecl_kw_fscanf_alloc_current_grdecl__(gridFilePointer, false , ECL_FLOAT_TYPE)); + allKwReadOk = allKwReadOk && NULL != (zCornKw = ecl_kw_fscanf_alloc_current_grdecl__(gridFilePointer, false , ecl_type_create_from_type(ECL_FLOAT_TYPE))); progress.setProgress(2); fseek(gridFilePointer, coordPos, SEEK_SET); - allKwReadOk = allKwReadOk && NULL != (coordKw = ecl_kw_fscanf_alloc_current_grdecl__(gridFilePointer, false , ECL_FLOAT_TYPE)); + allKwReadOk = allKwReadOk && NULL != (coordKw = ecl_kw_fscanf_alloc_current_grdecl__(gridFilePointer, false , ecl_type_create_from_type(ECL_FLOAT_TYPE))); progress.setProgress(3); // If ACTNUM is not defined, this pointer will be NULL, which is a valid condition if (actnumPos >= 0) { fseek(gridFilePointer, actnumPos, SEEK_SET); - allKwReadOk = allKwReadOk && NULL != (actNumKw = ecl_kw_fscanf_alloc_current_grdecl__(gridFilePointer, false , ECL_INT_TYPE)); + allKwReadOk = allKwReadOk && NULL != (actNumKw = ecl_kw_fscanf_alloc_current_grdecl__(gridFilePointer, false , ecl_type_create_from_type(ECL_INT_TYPE))); progress.setProgress(4); } @@ -141,7 +144,7 @@ bool RifEclipseInputFileTools::openGridFile(const QString& fileName, RigCaseData if (mapaxesPos >= 0) { fseek(gridFilePointer, mapaxesPos, SEEK_SET); - mapAxesKw = ecl_kw_fscanf_alloc_current_grdecl__( gridFilePointer, false , ECL_FLOAT_TYPE); + mapAxesKw = ecl_kw_fscanf_alloc_current_grdecl__( gridFilePointer, false , ecl_type_create_from_type(ECL_FLOAT_TYPE)); } if (!allKwReadOk) @@ -199,7 +202,7 @@ bool RifEclipseInputFileTools::openGridFile(const QString& fileName, RigCaseData //-------------------------------------------------------------------------------------------------- /// Read known properties from the input file //-------------------------------------------------------------------------------------------------- -std::map RifEclipseInputFileTools::readProperties(const QString& fileName, RigCaseData* caseData) +std::map RifEclipseInputFileTools::readProperties(const QString& fileName, RigEclipseCaseData* caseData) { CVF_ASSERT(caseData); @@ -225,7 +228,7 @@ std::map RifEclipseInputFileTools::readProperties(const QStrin fseek(gridFilePointer, fileKeywords[i].filePos, SEEK_SET); - ecl_kw_type* eclipseKeywordData = ecl_kw_fscanf_alloc_current_grdecl__(gridFilePointer, false, ECL_FLOAT_TYPE); + ecl_kw_type* eclipseKeywordData = ecl_kw_fscanf_alloc_current_grdecl__(gridFilePointer, false, ecl_type_create_from_type(ECL_FLOAT_TYPE)); if (eclipseKeywordData) { QString newResultName = caseData->results(RifReaderInterface::MATRIX_RESULTS)->makeResultNameUnique(fileKeywords[i].keyword); @@ -249,7 +252,7 @@ std::map RifEclipseInputFileTools::readProperties(const QStrin /// Reads the property data requested into the \a reservoir, overwriting any previous /// properties with the same name. //-------------------------------------------------------------------------------------------------- -bool RifEclipseInputFileTools::readProperty(const QString& fileName, RigCaseData* caseData, const QString& eclipseKeyWord, const QString& resultName) +bool RifEclipseInputFileTools::readProperty(const QString& fileName, RigEclipseCaseData* caseData, const QString& eclipseKeyWord, const QString& resultName) { CVF_ASSERT(caseData); @@ -258,7 +261,7 @@ bool RifEclipseInputFileTools::readProperty(const QString& fileName, RigCaseData FILE* filePointer = util_fopen(fileName.toLatin1().data(), "r"); if (!filePointer) return false; - ecl_kw_type* eclipseKeywordData = ecl_kw_fscanf_alloc_grdecl_dynamic__(filePointer, eclipseKeyWord.toLatin1().data(), false, ECL_FLOAT_TYPE); + ecl_kw_type* eclipseKeywordData = ecl_kw_fscanf_alloc_grdecl_dynamic__(filePointer, eclipseKeyWord.toLatin1().data(), false, ecl_type_create_from_type(ECL_FLOAT_TYPE)); bool isOk = false; if (eclipseKeywordData) { @@ -275,14 +278,14 @@ bool RifEclipseInputFileTools::readProperty(const QString& fileName, RigCaseData //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RifEclipseInputFileTools::readDataFromKeyword(ecl_kw_type* eclipseKeywordData, RigCaseData* caseData, const QString& resultName) +bool RifEclipseInputFileTools::readDataFromKeyword(ecl_kw_type* eclipseKeywordData, RigEclipseCaseData* caseData, const QString& resultName) { CVF_ASSERT(caseData); CVF_ASSERT(eclipseKeywordData); bool mathingItemCount = false; { - int itemCount = ecl_kw_get_size(eclipseKeywordData); + size_t itemCount = static_cast(ecl_kw_get_size(eclipseKeywordData)); if (itemCount == caseData->mainGrid()->cellCount()) { mathingItemCount = true; @@ -359,13 +362,12 @@ void RifEclipseInputFileTools::parseAndReadPathAliasKeyword(const QString &fileN data.open(QFile::ReadOnly); QString line; - qint64 lineLength = -1; bool foundPathsKeyword = false; do { - lineLength = data.readLine(buf, sizeof(buf)); + qint64 lineLength = data.readLine(buf, sizeof(buf)); if (lineLength > 0) { line = QString::fromAscii(buf); @@ -440,7 +442,7 @@ const std::vector& RifEclipseInputFileTools::invalidPropertyDataKeyword //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RifEclipseInputFileTools::writePropertyToTextFile(const QString& fileName, RigCaseData* eclipseCase, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord) +bool RifEclipseInputFileTools::writePropertyToTextFile(const QString& fileName, RigEclipseCaseData* eclipseCase, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord) { CVF_ASSERT(eclipseCase); @@ -472,12 +474,17 @@ bool RifEclipseInputFileTools::writePropertyToTextFile(const QString& fileName, /// Create and write a result vector with values for all cells. /// undefinedValue is used for cells with no result //-------------------------------------------------------------------------------------------------- -bool RifEclipseInputFileTools::writeBinaryResultToTextFile(const QString& fileName, RigCaseData* eclipseCase, RifReaderInterface::PorosityModelResultType porosityModel, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord, const double undefinedValue) +bool RifEclipseInputFileTools::writeBinaryResultToTextFile(const QString& fileName, + RigEclipseCaseData* eclipseCase, + size_t timeStep, + RimEclipseResultDefinition* resultDefinition, + const QString& eclipseKeyWord, + const double undefinedValue) { CVF_ASSERT(eclipseCase); - size_t resultIndex = eclipseCase->results(porosityModel)->findScalarResultIndex(resultName); - if (resultIndex == cvf::UNDEFINED_SIZE_T) + cvf::ref resultAccessor = RigResultAccessorFactory::createFromResultDefinition(eclipseCase, eclipseCase->mainGrid()->gridIndex(), timeStep, resultDefinition); + if (resultAccessor.isNull()) { return false; } @@ -488,12 +495,6 @@ bool RifEclipseInputFileTools::writeBinaryResultToTextFile(const QString& fileNa return false; } - cvf::ref resultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, eclipseCase->mainGrid()->gridIndex(), porosityModel, timeStep, resultName); - if (resultAccessor.isNull()) - { - return false; - } - std::vector resultData; size_t i, j, k; for (k = 0; k < eclipseCase->mainGrid()->cellCountK(); k++) @@ -641,7 +642,7 @@ void RifEclipseInputFileTools::parseAndReadFaults(const QString& fileName, cvf:: //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RifEclipseInputFileTools::readFaultsInGridSection(const QString& fileName, cvf::Collection* faults, std::vector* filenamesWithFaults) +void RifEclipseInputFileTools::readFaultsInGridSection(const QString& fileName, cvf::Collection* faults, std::vector* filenamesWithFaults, const QString& faultIncludeFileAbsolutePathPrefix) { QFile data(fileName); if (!data.open(QFile::ReadOnly)) @@ -661,7 +662,7 @@ void RifEclipseInputFileTools::readFaultsInGridSection(const QString& fileName, std::vector< std::pair > pathAliasDefinitions; parseAndReadPathAliasKeyword(fileName, &pathAliasDefinitions); - readFaultsAndParseIncludeStatementsRecursively(data, gridPos, pathAliasDefinitions, faults, filenamesWithFaults, &isEditKeywordDetected); + readFaultsAndParseIncludeStatementsRecursively(data, gridPos, pathAliasDefinitions, faults, filenamesWithFaults, &isEditKeywordDetected, faultIncludeFileAbsolutePathPrefix); } @@ -714,7 +715,7 @@ qint64 RifEclipseInputFileTools::findKeyword(const QString& keyword, QFile& file //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -size_t RifEclipseInputFileTools::findOrCreateResult(const QString& newResultName, RigCaseData* reservoir) +size_t RifEclipseInputFileTools::findOrCreateResult(const QString& newResultName, RigEclipseCaseData* reservoir) { size_t resultIndex = reservoir->results(RifReaderInterface::MATRIX_RESULTS)->findScalarResultIndex(newResultName); if (resultIndex == cvf::UNDEFINED_SIZE_T) @@ -750,7 +751,8 @@ bool RifEclipseInputFileTools::readFaultsAndParseIncludeStatementsRecursively( const std::vector< std::pair >& pathAliasDefinitions, cvf::Collection* faults, std::vector* filenamesWithFaults, - bool* isEditKeywordDetected) + bool* isEditKeywordDetected, + const QString& faultIncludeFileAbsolutePathPrefix) { QString line; @@ -811,6 +813,14 @@ bool RifEclipseInputFileTools::readFaultsAndParseIncludeStatementsRecursively( includeFilename.replace(textToReplace, entry.second); } +#ifdef WIN32 + if (includeFilename.startsWith('/')) + { + // Absolute UNIX path, prefix on Windows + includeFilename = faultIncludeFileAbsolutePathPrefix + includeFilename; + } +#endif + QFileInfo fi(currentFileFolder, includeFilename); if (fi.exists()) { @@ -820,7 +830,7 @@ bool RifEclipseInputFileTools::readFaultsAndParseIncludeStatementsRecursively( { //qDebug() << "Found include statement, and start parsing of\n " << absoluteFilename; - if (!readFaultsAndParseIncludeStatementsRecursively(includeFile, 0, pathAliasDefinitions, faults, filenamesWithFaults, isEditKeywordDetected)) + if (!readFaultsAndParseIncludeStatementsRecursively(includeFile, 0, pathAliasDefinitions, faults, filenamesWithFaults, isEditKeywordDetected, faultIncludeFileAbsolutePathPrefix)) { qDebug() << "Error when parsing include file : " << absoluteFilename; } diff --git a/ApplicationCode/FileInterface/RifEclipseInputFileTools.h b/ApplicationCode/FileInterface/RifEclipseInputFileTools.h index 87de0bc5a1..f1172c08b6 100644 --- a/ApplicationCode/FileInterface/RifEclipseInputFileTools.h +++ b/ApplicationCode/FileInterface/RifEclipseInputFileTools.h @@ -22,7 +22,7 @@ #include "cvfBase.h" #include "cvfObject.h" -#include "cvfLibCore.h" +#include "cvfCollection.h" #include "RifReaderInterface.h" #include "RigFault.h" @@ -34,8 +34,9 @@ #include -class RigCaseData; +class RigEclipseCaseData; class QFile; +class RimEclipseResultDefinition; //-------------------------------------------------------------------------------------------------- @@ -59,13 +60,13 @@ class RifEclipseInputFileTools : public cvf::Object RifEclipseInputFileTools(); virtual ~RifEclipseInputFileTools(); - static bool openGridFile(const QString& fileName, RigCaseData* eclipseCase, bool readFaultData); + static bool openGridFile(const QString& fileName, RigEclipseCaseData* eclipseCase, bool readFaultData); // Returns map of assigned resultName and Eclipse Keyword. - static std::map readProperties(const QString& fileName, RigCaseData* eclipseCase); - static bool readProperty (const QString& fileName, RigCaseData* eclipseCase, const QString& eclipseKeyWord, const QString& resultName ); + static std::map readProperties(const QString& fileName, RigEclipseCaseData* eclipseCase); + static bool readProperty (const QString& fileName, RigEclipseCaseData* eclipseCase, const QString& eclipseKeyWord, const QString& resultName ); - static void readFaultsInGridSection(const QString& fileName, cvf::Collection* faults, std::vector* filenamesWithFaults); + static void readFaultsInGridSection(const QString& fileName, cvf::Collection* faults, std::vector* filenamesWithFaults, const QString& faultIncludeFileAbsolutePathPrefix); static void readFaults(const QString& fileName, const std::vector< RifKeywordAndFilePos >& fileKeywords, cvf::Collection* faults); static void parseAndReadFaults(const QString& fileName, cvf::Collection* faults); @@ -75,27 +76,28 @@ class RifEclipseInputFileTools : public cvf::Object static void parseAndReadPathAliasKeyword(const QString &fileName, std::vector< std::pair >* pathAliasDefinitions); - static bool writePropertyToTextFile(const QString& fileName, RigCaseData* eclipseCase, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord); - static bool writeBinaryResultToTextFile(const QString& fileName, RigCaseData* eclipseCase, RifReaderInterface::PorosityModelResultType porosityModel, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord, const double undefinedValue); + static bool writePropertyToTextFile(const QString& fileName, RigEclipseCaseData* eclipseCase, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord); + static bool writeBinaryResultToTextFile(const QString& fileName, RigEclipseCaseData* eclipseCase, size_t timeStep, RimEclipseResultDefinition* resultdefinition, const QString& eclipseKeyWord, const double undefinedValue); static bool readFaultsAndParseIncludeStatementsRecursively( QFile& file, qint64 startPos, const std::vector< std::pair >& pathAliasDefinitions, cvf::Collection* faults, std::vector* filenamesWithFaults, - bool* isEditKeywordDetected); + bool* isEditKeywordDetected, + const QString& faultIncludeFileAbsolutePathPrefix); static cvf::StructGridInterface::FaceEnum faceEnumFromText(const QString& faceString); private: - static bool readDataFromKeyword(ecl_kw_type* eclipseKeywordData, RigCaseData* caseData, const QString& resultName); + static bool readDataFromKeyword(ecl_kw_type* eclipseKeywordData, RigEclipseCaseData* caseData, const QString& resultName); static void writeDataToTextFile(QFile* file, const QString& eclipseKeyWord, const std::vector& resultData); static void findGridKeywordPositions(const std::vector< RifKeywordAndFilePos >& keywords, qint64* coordPos, qint64* zcornPos, qint64* specgridPos, qint64* actnumPos, qint64* mapaxesPos); static size_t findFaultByName(const cvf::Collection& faults, const QString& name); static qint64 findKeyword(const QString& keyword, QFile& file, qint64 startPos); - static size_t findOrCreateResult(const QString& newResultName, RigCaseData* reservoir); + static size_t findOrCreateResult(const QString& newResultName, RigEclipseCaseData* reservoir); static bool isValidDataKeyword(const QString& keyword); private: diff --git a/ApplicationCode/FileInterface/RifEclipseOutputFileTools.cpp b/ApplicationCode/FileInterface/RifEclipseOutputFileTools.cpp index d4216a13a7..d2dab4a787 100644 --- a/ApplicationCode/FileInterface/RifEclipseOutputFileTools.cpp +++ b/ApplicationCode/FileInterface/RifEclipseOutputFileTools.cpp @@ -26,10 +26,13 @@ #include "cafProgressInfo.h" +#include "cvfMath.h" + #include #include #include +#include //-------------------------------------------------------------------------------------------------- @@ -49,7 +52,7 @@ RifEclipseOutputFileTools::~RifEclipseOutputFileTools() struct KeywordItemCounter { - KeywordItemCounter(std::string keyword, size_t aggregatedItemCount) + KeywordItemCounter(const std::string& keyword, size_t aggregatedItemCount) : m_keyword(keyword), m_aggregatedItemCount(aggregatedItemCount), m_reportStepCount(1) @@ -112,7 +115,7 @@ void getDayMonthYear(const ecl_kw_type* intehead_kw, int* day, int* month, int* //-------------------------------------------------------------------------------------------------- /// Get list of time step texts (dates) //-------------------------------------------------------------------------------------------------- -void RifEclipseOutputFileTools::timeSteps(ecl_file_type* ecl_file, std::vector* timeSteps) +void RifEclipseOutputFileTools::timeSteps(ecl_file_type* ecl_file, std::vector* timeSteps, std::vector* daysSinceSimulationStart) { if (!ecl_file) return; @@ -124,7 +127,7 @@ void RifEclipseOutputFileTools::timeSteps(ecl_file_type* ecl_file, std::vector dayFractions(numINTEHEAD, 0.0); // Init fraction to zero + std::vector dayValues(numINTEHEAD, 0.0); // Init fraction to zero // Read out fraction of day if number of keywords are identical if (numINTEHEAD == numDOUBHEAD) @@ -134,12 +137,7 @@ void RifEclipseOutputFileTools::timeSteps(ecl_file_type* ecl_file, std::vector(dayFraction * 24.0 * 60.0 * 60.0 * 1000.0); + int seconds = milliseconds % 1000; + milliseconds -= seconds * 1000; + QTime time(0, 0); + time = time.addSecs(seconds); + time = time.addMSecs(milliseconds); + + reportDateTime.setTime(time); + + if (std::find(timeSteps->begin(), timeSteps->end(), reportDateTime) == timeSteps->end()) { - int day = 0; - int month = 0; - int year = 0; - getDayMonthYear(kwINTEHEAD, &day, &month, &year); - - QDateTime reportDateTime(QDate(year, month, day)); - CVF_ASSERT(reportDateTime.isValid()); - - double dayFraction = dayFractions[i]; - int seconds = static_cast(dayFraction * 24.0 * 60.0 * 60.0); - QTime time(0, 0); - time = time.addSecs(seconds); - - reportDateTime.setTime(time); - - if (std::find(timeSteps->begin(), timeSteps->end(), reportDateTime) == timeSteps->end()) - { - timeSteps->push_back(reportDateTime); - } + timeSteps->push_back(reportDateTime); + daysSinceSimulationStart->push_back(dayValue); } } } @@ -379,8 +379,9 @@ void RifEclipseOutputFileTools::createReportStepsMetaData(std::vector* values); static bool keywordData(ecl_file_type* ecl_file, const QString& keyword, size_t fileKeywordOccurrence, std::vector* values); - static void timeSteps(ecl_file_type* ecl_file, std::vector* timeSteps); + static void timeSteps(ecl_file_type* ecl_file, std::vector* timeSteps, std::vector* daysSinceSimulationStart); static bool findSiblingFilesWithSameBaseName(const QString& fileName, QStringList* fileSet); diff --git a/ApplicationCode/FileInterface/RifEclipseRestartDataAccess.h b/ApplicationCode/FileInterface/RifEclipseRestartDataAccess.h index 4c89e815c5..6884afe0bf 100644 --- a/ApplicationCode/FileInterface/RifEclipseRestartDataAccess.h +++ b/ApplicationCode/FileInterface/RifEclipseRestartDataAccess.h @@ -22,7 +22,6 @@ #include "cvfBase.h" #include "cvfObject.h" -#include "cvfLibCore.h" #include #include @@ -37,7 +36,7 @@ class RifKeywordLocation { public: - RifKeywordLocation(std::string keyword, size_t itemCount, int indexWithinReportStep) + RifKeywordLocation(const std::string& keyword, size_t itemCount, int indexWithinReportStep) : m_keyword(keyword), m_itemCount(itemCount), m_indexWithinReportStep(indexWithinReportStep) @@ -99,7 +98,7 @@ class RifEclipseRestartDataAccess : public cvf::Object virtual void setTimeSteps(const std::vector& timeSteps) {}; virtual size_t timeStepCount() = 0; - virtual std::vector timeSteps() = 0; + virtual void timeSteps(std::vector* timeSteps, std::vector* daysSinceSimulationStart) = 0; virtual std::vector reportNumbers() = 0; virtual void resultNames(QStringList* resultNames, std::vector* resultDataItemCounts) = 0; diff --git a/ApplicationCode/FileInterface/RifEclipseRestartFilesetAccess.cpp b/ApplicationCode/FileInterface/RifEclipseRestartFilesetAccess.cpp index 418dce66d9..cc4b1fceb8 100644 --- a/ApplicationCode/FileInterface/RifEclipseRestartFilesetAccess.cpp +++ b/ApplicationCode/FileInterface/RifEclipseRestartFilesetAccess.cpp @@ -119,7 +119,7 @@ size_t RifEclipseRestartFilesetAccess::timeStepCount() //-------------------------------------------------------------------------------------------------- /// Get the time steps //-------------------------------------------------------------------------------------------------- -std::vector RifEclipseRestartFilesetAccess::timeSteps() +void RifEclipseRestartFilesetAccess::timeSteps(std::vector* timeSteps, std::vector* daysSinceSimulationStart) { if (m_timeSteps.size() == 0) { @@ -128,24 +128,28 @@ std::vector RifEclipseRestartFilesetAccess::timeSteps() for (i = 0; i < numSteps; i++) { std::vector stepTime; + std::vector stepDays; openTimeStep(i); - RifEclipseOutputFileTools::timeSteps(m_ecl_files[i], &stepTime); + RifEclipseOutputFileTools::timeSteps(m_ecl_files[i], &stepTime, &stepDays); if (stepTime.size() == 1) { m_timeSteps.push_back(stepTime[0]); + m_daysSinceSimulationStart.push_back(stepDays[0]); } else { m_timeSteps.push_back(QDateTime()); + m_daysSinceSimulationStart.push_back(0.0); } } } - return m_timeSteps; + *timeSteps = m_timeSteps; + *daysSinceSimulationStart = m_daysSinceSimulationStart; } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/FileInterface/RifEclipseRestartFilesetAccess.h b/ApplicationCode/FileInterface/RifEclipseRestartFilesetAccess.h index 494d9378cd..9bb4ac7749 100644 --- a/ApplicationCode/FileInterface/RifEclipseRestartFilesetAccess.h +++ b/ApplicationCode/FileInterface/RifEclipseRestartFilesetAccess.h @@ -43,7 +43,7 @@ class RifEclipseRestartFilesetAccess : public RifEclipseRestartDataAccess void setTimeSteps(const std::vector& timeSteps); size_t timeStepCount(); - std::vector timeSteps(); + void timeSteps(std::vector* timeSteps, std::vector* daysSinceSimulationStart) override; std::vector reportNumbers(); void resultNames(QStringList* resultNames, std::vector* resultDataItemCounts); @@ -58,6 +58,7 @@ class RifEclipseRestartFilesetAccess : public RifEclipseRestartDataAccess private: QStringList m_fileNames; std::vector m_timeSteps; + std::vector m_daysSinceSimulationStart; std::vector< ecl_file_type* > m_ecl_files; }; diff --git a/ApplicationCode/FileInterface/RifEclipseUnifiedRestartFileAccess.cpp b/ApplicationCode/FileInterface/RifEclipseUnifiedRestartFileAccess.cpp index 3b486c1351..f5006c4b0f 100644 --- a/ApplicationCode/FileInterface/RifEclipseUnifiedRestartFileAccess.cpp +++ b/ApplicationCode/FileInterface/RifEclipseUnifiedRestartFileAccess.cpp @@ -85,23 +85,23 @@ size_t RifEclipseUnifiedRestartFileAccess::timeStepCount() { return 0; } + std::vector timeSteps; + std::vector daysSinceSimulationStart; + + this->timeSteps(&timeSteps, &daysSinceSimulationStart); - return timeSteps().size(); + return timeSteps.size(); } //-------------------------------------------------------------------------------------------------- /// Get the time steps //-------------------------------------------------------------------------------------------------- -std::vector RifEclipseUnifiedRestartFileAccess::timeSteps() +void RifEclipseUnifiedRestartFileAccess::timeSteps(std::vector* timeSteps, std::vector* daysSinceSimulationStart) { - std::vector timeSteps; - if (openFile()) { - RifEclipseOutputFileTools::timeSteps(m_ecl_file, &timeSteps); + RifEclipseOutputFileTools::timeSteps(m_ecl_file, timeSteps, daysSinceSimulationStart); } - - return timeSteps; } diff --git a/ApplicationCode/FileInterface/RifEclipseUnifiedRestartFileAccess.h b/ApplicationCode/FileInterface/RifEclipseUnifiedRestartFileAccess.h index 14a0e1d14b..2344ed3266 100644 --- a/ApplicationCode/FileInterface/RifEclipseUnifiedRestartFileAccess.h +++ b/ApplicationCode/FileInterface/RifEclipseUnifiedRestartFileAccess.h @@ -46,7 +46,7 @@ class RifEclipseUnifiedRestartFileAccess : public RifEclipseRestartDataAccess void close(); size_t timeStepCount(); - std::vector timeSteps(); + void timeSteps(std::vector* timeSteps, std::vector* daysSinceSimulationStart) override; std::vector reportNumbers(); void resultNames(QStringList* resultNames, std::vector* resultDataItemCounts); diff --git a/ApplicationCode/FileInterface/RifReaderEclipseInput.cpp b/ApplicationCode/FileInterface/RifReaderEclipseInput.cpp index ed8ced8a9e..d9b002fa9f 100644 --- a/ApplicationCode/FileInterface/RifReaderEclipseInput.cpp +++ b/ApplicationCode/FileInterface/RifReaderEclipseInput.cpp @@ -21,7 +21,9 @@ #include "RifReaderEclipseInput.h" #include "RifEclipseInputFileTools.h" -#include "RigCaseData.h" + +#include "RigEclipseCaseData.h" +#include "RigMainGrid.h" //================================================================================================== // @@ -46,7 +48,7 @@ RifReaderEclipseInput::~RifReaderEclipseInput() //-------------------------------------------------------------------------------------------------- /// Open file and read geometry into given reservoir object //-------------------------------------------------------------------------------------------------- -bool RifReaderEclipseInput::open(const QString& fileName, RigCaseData* eclipseCase) +bool RifReaderEclipseInput::open(const QString& fileName, RigEclipseCaseData* eclipseCase) { CVF_ASSERT(eclipseCase); diff --git a/ApplicationCode/FileInterface/RifReaderEclipseInput.h b/ApplicationCode/FileInterface/RifReaderEclipseInput.h index 32499507e4..4a608885fb 100644 --- a/ApplicationCode/FileInterface/RifReaderEclipseInput.h +++ b/ApplicationCode/FileInterface/RifReaderEclipseInput.h @@ -32,7 +32,7 @@ class RifReaderEclipseInput : public RifReaderInterface virtual ~RifReaderEclipseInput(); // Virtual interface implementation - virtual bool open(const QString& fileName, RigCaseData* eclipseCase); + virtual bool open(const QString& fileName, RigEclipseCaseData* eclipseCase); diff --git a/ApplicationCode/FileInterface/RifReaderEclipseOutput.cpp b/ApplicationCode/FileInterface/RifReaderEclipseOutput.cpp index b04c22dc6f..47f37946ce 100644 --- a/ApplicationCode/FileInterface/RifReaderEclipseOutput.cpp +++ b/ApplicationCode/FileInterface/RifReaderEclipseOutput.cpp @@ -20,24 +20,27 @@ #include "RifReaderEclipseOutput.h" -#include "RigCaseCellResultsData.h" -#include "RigCaseData.h" -#include "RigMainGrid.h" - +#include "RifEclipseInputFileTools.h" #include "RifEclipseOutputFileTools.h" #include "RifEclipseRestartFilesetAccess.h" #include "RifEclipseUnifiedRestartFileAccess.h" -#include "RifReaderOpmParserInput.h" + +#include "RigActiveCellInfo.h" +#include "RigCaseCellResultsData.h" +#include "RigEclipseCaseData.h" +#include "RigMainGrid.h" +#include "RigSingleWellResultsData.h" #include "cafProgressInfo.h" -#include "ert/ecl/ecl_nnc_export.h" +#include "cvfTrace.h" + #include "ert/ecl/ecl_kw_magic.h" +#include "ert/ecl/ecl_nnc_export.h" +#include // Needed for HUGE_VAL on Linux #include #include -#include // Needed for HUGE_VAL on Linux -#include "RifEclipseInputFileTools.h" //-------------------------------------------------------------------------------------------------- @@ -230,7 +233,7 @@ void RifReaderEclipseOutput::close() //-------------------------------------------------------------------------------------------------- /// Read geometry from file given by name into given reservoir object //-------------------------------------------------------------------------------------------------- -bool RifReaderEclipseOutput::transferGeometry(const ecl_grid_type* mainEclGrid, RigCaseData* eclipseCase) +bool RifReaderEclipseOutput::transferGeometry(const ecl_grid_type* mainEclGrid, RigEclipseCaseData* eclipseCase) { CVF_ASSERT(eclipseCase); @@ -348,7 +351,7 @@ bool RifReaderEclipseOutput::transferGeometry(const ecl_grid_type* mainEclGrid, //-------------------------------------------------------------------------------------------------- /// Open file and read geometry into given reservoir object //-------------------------------------------------------------------------------------------------- -bool RifReaderEclipseOutput::open(const QString& fileName, RigCaseData* eclipseCase) +bool RifReaderEclipseOutput::open(const QString& fileName, RigEclipseCaseData* eclipseCase) { CVF_ASSERT(eclipseCase); caf::ProgressInfo progInfo(100, ""); @@ -387,7 +390,6 @@ bool RifReaderEclipseOutput::open(const QString& fileName, RigCaseData* eclipseC { cvf::Collection faults; - //importFaultsOpmParser(fileSet, &faults); importFaults(fileSet, &faults); RigMainGrid* mainGrid = eclipseCase->mainGrid(); @@ -434,20 +436,6 @@ bool RifReaderEclipseOutput::open(const QString& fileName, RigCaseData* eclipseC return true; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RifReaderEclipseOutput::importFaultsOpmParser(const QStringList& fileSet, cvf::Collection* faults) const -{ - foreach(QString fname, fileSet) - { - if (fname.endsWith(".DATA")) - { - RifReaderOpmParserInput::readFaults(fname, faults); - } - } -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -469,7 +457,7 @@ void RifReaderEclipseOutput::importFaults(const QStringList& fileSet, cvf::Colle if (fname.endsWith(".DATA")) { std::vector filenamesWithFaults; - RifEclipseInputFileTools::readFaultsInGridSection(fname, faults, &filenamesWithFaults); + RifEclipseInputFileTools::readFaultsInGridSection(fname, faults, &filenamesWithFaults, faultIncludeFileAbsolutePathPrefix()); std::sort(filenamesWithFaults.begin(), filenamesWithFaults.end()); std::vector::iterator last = std::unique(filenamesWithFaults.begin(), filenamesWithFaults.end()); @@ -522,7 +510,7 @@ void RifReaderEclipseOutput::transferNNCData( const ecl_grid_type * mainEclGrid //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RifReaderEclipseOutput::openAndReadActiveCellData(const QString& fileName, const std::vector& mainCaseTimeSteps, RigCaseData* eclipseCase) +bool RifReaderEclipseOutput::openAndReadActiveCellData(const QString& fileName, const std::vector& mainCaseTimeSteps, RigEclipseCaseData* eclipseCase) { CVF_ASSERT(eclipseCase); @@ -668,9 +656,9 @@ void RifReaderEclipseOutput::buildMetaData() progInfo.incrementProgress(); - // Get time steps - m_timeSteps = m_dynamicResultsAccess->timeSteps(); + m_dynamicResultsAccess->timeSteps(&m_timeSteps, &m_daysSinceSimulationStart); + std::vector reportNumbers = m_dynamicResultsAccess->reportNumbers(); QStringList resultNames; std::vector resultNamesDataItemCounts; @@ -685,7 +673,7 @@ void RifReaderEclipseOutput::buildMetaData() for (int i = 0; i < matrixResultNames.size(); ++i) { size_t resIndex = matrixModelResults->addEmptyScalarResult(RimDefines::DYNAMIC_NATIVE, matrixResultNames[i], false); - matrixModelResults->setTimeStepDates(resIndex, m_timeSteps); + matrixModelResults->setTimeStepDates(resIndex, m_timeSteps, m_daysSinceSimulationStart, reportNumbers); } } @@ -698,21 +686,21 @@ void RifReaderEclipseOutput::buildMetaData() for (int i = 0; i < fractureResultNames.size(); ++i) { size_t resIndex = fractureModelResults->addEmptyScalarResult(RimDefines::DYNAMIC_NATIVE, fractureResultNames[i], false); - fractureModelResults->setTimeStepDates(resIndex, m_timeSteps); + fractureModelResults->setTimeStepDates(resIndex, m_timeSteps, m_daysSinceSimulationStart, reportNumbers); } } // Default units type is METRIC - RigCaseData::UnitsType unitsType = RigCaseData::UNITS_METRIC; + RigEclipseCaseData::UnitsType unitsType = RigEclipseCaseData::UNITS_METRIC; { int unitsTypeValue = m_dynamicResultsAccess->readUnitsType(); if (unitsTypeValue == 2) { - unitsType = RigCaseData::UNITS_FIELD; + unitsType = RigEclipseCaseData::UNITS_FIELD; } else if (unitsTypeValue == 3) { - unitsType = RigCaseData::UNITS_LAB; + unitsType = RigEclipseCaseData::UNITS_LAB; } } @@ -734,25 +722,44 @@ void RifReaderEclipseOutput::buildMetaData() RifEclipseOutputFileTools::findKeywordsAndItemCount(filesUsedToFindAvailableKeywords, &resultNames, &resultNamesDataItemCounts); + std::vector staticDate; + std::vector staticDay; + std::vector staticReportNumber; { - QStringList matrixResultNames = validKeywordsForPorosityModel(resultNames, resultNamesDataItemCounts, - m_eclipseCase->activeCellInfo(RifReaderInterface::MATRIX_RESULTS), - m_eclipseCase->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS), - RifReaderInterface::MATRIX_RESULTS, 1); - - std::vector staticDate; - if (m_timeSteps.size() > 0) + if ( m_timeSteps.size() > 0 ) { staticDate.push_back(m_timeSteps.front()); } + if (m_daysSinceSimulationStart.size() > 0) + { + staticDay.push_back(m_daysSinceSimulationStart.front()); + } + + std::vector reportNumbers; + if (m_dynamicResultsAccess.notNull()) + { + reportNumbers = m_dynamicResultsAccess->reportNumbers(); + } + + if ( reportNumbers.size() > 0 ) + { + staticReportNumber.push_back(reportNumbers.front()); + } + } + { + QStringList matrixResultNames = validKeywordsForPorosityModel(resultNames, resultNamesDataItemCounts, + m_eclipseCase->activeCellInfo(RifReaderInterface::MATRIX_RESULTS), + m_eclipseCase->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS), + RifReaderInterface::MATRIX_RESULTS, 1); + // Add ACTNUM matrixResultNames += "ACTNUM"; for (int i = 0; i < matrixResultNames.size(); ++i) { size_t resIndex = matrixModelResults->addEmptyScalarResult(RimDefines::STATIC_NATIVE, matrixResultNames[i], false); - matrixModelResults->setTimeStepDates(resIndex, staticDate); + matrixModelResults->setTimeStepDates(resIndex, staticDate, staticDay, staticReportNumber); } } @@ -761,20 +768,13 @@ void RifReaderEclipseOutput::buildMetaData() m_eclipseCase->activeCellInfo(RifReaderInterface::MATRIX_RESULTS), m_eclipseCase->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS), RifReaderInterface::FRACTURE_RESULTS, 1); - - std::vector staticDate; - if (m_timeSteps.size() > 0) - { - staticDate.push_back(m_timeSteps.front()); - } - // Add ACTNUM fractureResultNames += "ACTNUM"; for (int i = 0; i < fractureResultNames.size(); ++i) { size_t resIndex = fractureModelResults->addEmptyScalarResult(RimDefines::STATIC_NATIVE, fractureResultNames[i], false); - fractureModelResults->setTimeStepDates(resIndex, staticDate); + fractureModelResults->setTimeStepDates(resIndex, staticDate, staticDay, staticReportNumber); } } } @@ -912,6 +912,10 @@ RigWellResultPoint RifReaderEclipseOutput::createWellResultPoint(const RigGridBa int cellJ = well_conn_get_j( ert_connection ); int cellK = well_conn_get_k( ert_connection ); bool isCellOpen = well_conn_open( ert_connection ); + double volumeRate = well_conn_get_volume_rate( ert_connection); + double oilRate = well_conn_get_oil_rate(ert_connection) ; + double gasRate = well_conn_get_gas_rate(ert_connection); + double waterRate = well_conn_get_water_rate(ert_connection); // If a well is defined in fracture region, the K-value is from (cellCountK - 1) -> cellCountK*2 - 1 // Adjust K so index is always in valid grid region @@ -951,8 +955,8 @@ RigWellResultPoint RifReaderEclipseOutput::createWellResultPoint(const RigGridBa // Introduced based on discussion with Hkon Hgstl 08.09.2016 if (cellK >= static_cast(grid->cellCountK())) { - int maxCellKIndex = static_cast(grid->cellCountK() - 1); - cvf::Trace::show("Well Connection for grid " + cvf::String(grid->gridName()) + "\n - Ignored connection with invalid K value (K=" + cvf::String(cellK) + ") for well : " + cvf::String(wellName)); + int maxCellK = static_cast(grid->cellCountK()); + cvf::Trace::show("Well Connection for grid " + cvf::String(grid->gridName()) + "\n - Ignored connection with invalid K value (K=" + cvf::String(cellK) + ", max K = " + cvf::String(maxCellK) + ") for well : " + cvf::String(wellName)); } else { @@ -963,6 +967,28 @@ RigWellResultPoint RifReaderEclipseOutput::createWellResultPoint(const RigGridBa resultPoint.m_ertBranchId = ertBranchId; resultPoint.m_ertSegmentId = ertSegmentId; + resultPoint.m_flowRate = volumeRate; + resultPoint.m_oilRate = oilRate; + resultPoint.m_waterRate = waterRate; + + /// Unit conversion for use with Well Allocation plots + // Convert Gas to oil equivalents + // If field unit, the Gas is in Mega ft^3 while the others are in [stb] (barrel) + + // Unused Gas to Barrel conversion + // we convert gas to stb as well. Based on + // 1 [stb] = 0.15898729492800007 [m^3] + // 1 [ft] = 0.3048 [m] + // megaFt3ToStbFactor = 1.0 / (1.0e-6 * 0.15898729492800007 * ( 1.0 / 0.3048 )^3 ) + // double megaFt3ToStbFactor = 178107.60668; + + double fieldGasToOilEquivalent = 1.0e6/5800; // Mega ft^3 to BOE + double metricGasToOilEquivalent = 1.0/1.0e3; // Sm^3 Gas to Sm^3 oe + + if (m_eclipseCase->unitsType() == RigEclipseCaseData::UNITS_FIELD) gasRate = fieldGasToOilEquivalent * gasRate; + if (m_eclipseCase->unitsType() == RigEclipseCaseData::UNITS_METRIC) gasRate = metricGasToOilEquivalent * gasRate; + + resultPoint.m_gasRate = gasRate; } return resultPoint; @@ -1014,14 +1040,13 @@ cvf::Vec3d interpolate3DPosition(const std::vector& double denominator = 0.0; cvf::Vec3d interpolatedValue = cvf::Vec3d::ZERO; - double distance; for (size_t i = 0; i < filteredPositions.size(); i++) { #if 0 // Pure average test nominators[i] = 1.0; #else - distance = filteredPositions[i].m_lengthFromConnection; + double distance = filteredPositions[i].m_lengthFromConnection; if (distance < 1e-6) { @@ -1122,8 +1147,11 @@ void RifReaderEclipseOutput::readWellCells(const ecl_grid_type* mainEclGrid, boo m_dynamicResultsAccess->readWellData(ert_well_info, importCompleteMswData); - std::vector timeSteps = m_dynamicResultsAccess->timeSteps(); + std::vector daysSinceSimulationStart; + std::vector timeSteps; + m_dynamicResultsAccess->timeSteps(&timeSteps, &daysSinceSimulationStart); std::vector reportNumbers = m_dynamicResultsAccess->reportNumbers(); + bool sameCount = false; if (timeSteps.size() == reportNumbers.size()) { diff --git a/ApplicationCode/FileInterface/RifReaderEclipseOutput.h b/ApplicationCode/FileInterface/RifReaderEclipseOutput.h index 431d4cc39b..55f0ec81ca 100644 --- a/ApplicationCode/FileInterface/RifReaderEclipseOutput.h +++ b/ApplicationCode/FileInterface/RifReaderEclipseOutput.h @@ -22,8 +22,7 @@ #include "RifReaderInterface.h" -#include "RigFault.h" -#include "RigSingleWellResultsData.h" +#include "cvfCollection.h" #include #include @@ -33,6 +32,9 @@ class RifEclipseRestartDataAccess; class RigGridBase; class RigMainGrid; class RigActiveCellInfo; +class RigFault; + +struct RigWellResultPoint; typedef struct ecl_grid_struct ecl_grid_type; typedef struct ecl_file_struct ecl_file_type; @@ -49,15 +51,15 @@ class RifReaderEclipseOutput : public RifReaderInterface RifReaderEclipseOutput(); virtual ~RifReaderEclipseOutput(); - bool open(const QString& fileName, RigCaseData* eclipseCase); + bool open(const QString& fileName, RigEclipseCaseData* eclipseCase); - virtual bool openAndReadActiveCellData(const QString& fileName, const std::vector& mainCaseTimeSteps, RigCaseData* eclipseCase); + virtual bool openAndReadActiveCellData(const QString& fileName, const std::vector& mainCaseTimeSteps, RigEclipseCaseData* eclipseCase); void close(); bool staticResult(const QString& result, PorosityModelResultType matrixOrFracture, std::vector* values); bool dynamicResult(const QString& result, PorosityModelResultType matrixOrFracture, size_t stepIndex, std::vector* values); - static bool transferGeometry(const ecl_grid_type* mainEclGrid, RigCaseData* eclipseCase); + static bool transferGeometry(const ecl_grid_type* mainEclGrid, RigEclipseCaseData* eclipseCase); static void transferCoarseningInfo(const ecl_grid_type* eclGrid, RigGridBase* grid); private: @@ -67,9 +69,8 @@ class RifReaderEclipseOutput : public RifReaderInterface std::string ertGridName( size_t gridNr ); - static RigWellResultPoint createWellResultPoint(const RigGridBase* grid, const well_conn_type* ert_connection, int ertBranchId, int ertSegmentId, const char* wellName); + RigWellResultPoint createWellResultPoint(const RigGridBase* grid, const well_conn_type* ert_connection, int ertBranchId, int ertSegmentId, const char* wellName); - void importFaultsOpmParser(const QStringList& fileSet, cvf::Collection* faults) const; void importFaults(const QStringList& fileSet, cvf::Collection* faults); @@ -89,9 +90,10 @@ class RifReaderEclipseOutput : public RifReaderInterface QString m_fileName; // Name of file used to start accessing Eclipse output files QStringList m_filesWithSameBaseName; // Set of files in filename's path with same base name as filename - RigCaseData* m_eclipseCase; + RigEclipseCaseData* m_eclipseCase; std::vector m_timeSteps; + std::vector m_daysSinceSimulationStart; ecl_file_type* m_ecl_init_file; // File access to static results cvf::ref m_dynamicResultsAccess; // File access to dynamic results diff --git a/ApplicationCode/FileInterface/RifReaderEclipseSummary.cpp b/ApplicationCode/FileInterface/RifReaderEclipseSummary.cpp index d3e0b8b1bc..2ce6ac2532 100644 --- a/ApplicationCode/FileInterface/RifReaderEclipseSummary.cpp +++ b/ApplicationCode/FileInterface/RifReaderEclipseSummary.cpp @@ -30,7 +30,8 @@ /// //-------------------------------------------------------------------------------------------------- RifReaderEclipseSummary::RifReaderEclipseSummary() - : ecl_sum(NULL) + : m_ecl_sum(NULL), + m_ecl_SmSpec(nullptr) { } @@ -48,7 +49,7 @@ RifReaderEclipseSummary::~RifReaderEclipseSummary() //-------------------------------------------------------------------------------------------------- bool RifReaderEclipseSummary::open(const std::string& headerFileName, const std::vector& dataFileNames) { - assert(ecl_sum == NULL); + assert(m_ecl_sum == NULL); if (headerFileName.empty() || dataFileNames.size() == 0) return false; @@ -62,20 +63,17 @@ bool RifReaderEclipseSummary::open(const std::string& headerFileName, const std: } std::string itemSeparatorInVariableNames = ":"; - ecl_sum = ecl_sum_fread_alloc(headerFileName.data(), dataFiles, itemSeparatorInVariableNames.data()); + m_ecl_sum = ecl_sum_fread_alloc(headerFileName.data(), dataFiles, itemSeparatorInVariableNames.data()); stringlist_free(dataFiles); - if (ecl_sum) + if (m_ecl_sum) { - eclSmSpec = ecl_sum_get_smspec(ecl_sum); - assert(eclSmSpec != NULL); - - assert(ecl_sum != NULL); + m_ecl_SmSpec = ecl_sum_get_smspec(m_ecl_sum); for ( int time_index = 0; time_index < timeStepCount(); time_index++ ) { - time_t sim_time = ecl_sum_iget_sim_time(ecl_sum, time_index); + time_t sim_time = ecl_sum_iget_sim_time(m_ecl_sum, time_index); m_timeSteps.push_back(sim_time); } @@ -90,10 +88,10 @@ bool RifReaderEclipseSummary::open(const std::string& headerFileName, const std: //-------------------------------------------------------------------------------------------------- void RifReaderEclipseSummary::close() { - if (ecl_sum) + if (m_ecl_sum) { - ecl_sum_free(ecl_sum); - ecl_sum = NULL; + ecl_sum_free(m_ecl_sum); + m_ecl_sum = NULL; } } @@ -248,7 +246,7 @@ const std::vector& RifReaderEclipseSummary::allResultA //-------------------------------------------------------------------------------------------------- bool RifReaderEclipseSummary::values(const RifEclipseSummaryAddress& resultAddress, std::vector* values) { - assert(ecl_sum != NULL); + assert(m_ecl_sum != NULL); int variableIndex = indexFromAddress(resultAddress); @@ -258,14 +256,16 @@ bool RifReaderEclipseSummary::values(const RifEclipseSummaryAddress& resultAddre int tsCount = timeStepCount(); values->reserve(timeStepCount()); - - const smspec_node_type * ertSumVarNode = ecl_smspec_iget_node(eclSmSpec, variableIndex); - int paramsIndex = smspec_node_get_params_index(ertSumVarNode); - - for(int time_index = 0; time_index < tsCount; time_index++) + if (m_ecl_SmSpec) { - double value = ecl_sum_iget(ecl_sum, time_index, paramsIndex); - values->push_back(value); + const smspec_node_type* ertSumVarNode = ecl_smspec_iget_node(m_ecl_SmSpec, variableIndex); + int paramsIndex = smspec_node_get_params_index(ertSumVarNode); + + for(int time_index = 0; time_index < tsCount; time_index++) + { + double value = ecl_sum_iget(m_ecl_sum, time_index, paramsIndex); + values->push_back(value); + } } return true; @@ -276,9 +276,11 @@ bool RifReaderEclipseSummary::values(const RifEclipseSummaryAddress& resultAddre //-------------------------------------------------------------------------------------------------- int RifReaderEclipseSummary::timeStepCount() const { - assert(ecl_sum != NULL); + assert(m_ecl_sum != nullptr); - return ecl_sum_get_data_length(ecl_sum); + if (m_ecl_SmSpec == nullptr) return 0; + + return ecl_sum_get_data_length(m_ecl_sum); } //-------------------------------------------------------------------------------------------------- @@ -286,7 +288,7 @@ int RifReaderEclipseSummary::timeStepCount() const //-------------------------------------------------------------------------------------------------- const std::vector& RifReaderEclipseSummary::timeSteps() const { - assert(ecl_sum != NULL); + assert(m_ecl_sum != NULL); return m_timeSteps; } @@ -328,12 +330,12 @@ int RifReaderEclipseSummary::indexFromAddress(const RifEclipseSummaryAddress& re //-------------------------------------------------------------------------------------------------- void RifReaderEclipseSummary::buildMetaData() { - if(m_allResultAddresses.size() == 0) + if(m_allResultAddresses.size() == 0 && m_ecl_SmSpec) { - int varCount = ecl_smspec_num_nodes(eclSmSpec); + int varCount = ecl_smspec_num_nodes(m_ecl_SmSpec); for(int i = 0; i < varCount; i++) { - const smspec_node_type * ertSumVarNode = ecl_smspec_iget_node(eclSmSpec, i); + const smspec_node_type * ertSumVarNode = ecl_smspec_iget_node(m_ecl_SmSpec, i); RifEclipseSummaryAddress addr = addressFromErtSmSpecNode(ertSumVarNode); m_allResultAddresses.push_back(addr); m_resultAddressToErtNodeIdx[addr] = i; @@ -358,11 +360,13 @@ bool RifReaderEclipseSummary::hasAddress(const RifEclipseSummaryAddress& resultA //-------------------------------------------------------------------------------------------------- std::string RifReaderEclipseSummary::unitName(const RifEclipseSummaryAddress& resultAddress) { + if (!m_ecl_SmSpec) return ""; + int variableIndex = indexFromAddress(resultAddress); if(variableIndex < 0) return ""; - const smspec_node_type * ertSumVarNode = ecl_smspec_iget_node(eclSmSpec, variableIndex); + const smspec_node_type * ertSumVarNode = ecl_smspec_iget_node(m_ecl_SmSpec, variableIndex); return smspec_node_get_unit(ertSumVarNode); } diff --git a/ApplicationCode/FileInterface/RifReaderEclipseSummary.h b/ApplicationCode/FileInterface/RifReaderEclipseSummary.h index 8bc5136110..cfc930c51b 100644 --- a/ApplicationCode/FileInterface/RifReaderEclipseSummary.h +++ b/ApplicationCode/FileInterface/RifReaderEclipseSummary.h @@ -64,8 +64,8 @@ class RifReaderEclipseSummary : public cvf::Object typedef struct ecl_sum_struct ecl_sum_type; typedef struct ecl_smspec_struct ecl_smspec_type; - ecl_sum_type* ecl_sum; - const ecl_smspec_type * eclSmSpec; + ecl_sum_type* m_ecl_sum; + const ecl_smspec_type * m_ecl_SmSpec; std::vector m_timeSteps; std::vector m_allResultAddresses; diff --git a/ApplicationCode/FileInterface/RifReaderInterface.cpp b/ApplicationCode/FileInterface/RifReaderInterface.cpp index 3d0059a8a2..b7c68a5f0b 100644 --- a/ApplicationCode/FileInterface/RifReaderInterface.cpp +++ b/ApplicationCode/FileInterface/RifReaderInterface.cpp @@ -67,3 +67,13 @@ bool RifReaderInterface::isNNCsEnabled() return false; } + +const QString RifReaderInterface::faultIncludeFileAbsolutePathPrefix() +{ + if (m_settings.notNull()) + { + return m_settings->faultIncludeFileAbsolutePathPrefix; + } + + return QString(); +} diff --git a/ApplicationCode/FileInterface/RifReaderInterface.h b/ApplicationCode/FileInterface/RifReaderInterface.h index abf9160268..be8fa983b5 100644 --- a/ApplicationCode/FileInterface/RifReaderInterface.h +++ b/ApplicationCode/FileInterface/RifReaderInterface.h @@ -22,7 +22,6 @@ #include "cvfBase.h" #include "cvfObject.h" -#include "cvfLibCore.h" #include "cafPdmPointer.h" @@ -30,8 +29,10 @@ #include #include +#include -class RigCaseData; + +class RigEclipseCaseData; class RifReaderSettings; @@ -58,8 +59,9 @@ class RifReaderInterface : public cvf::Object bool isFaultImportEnabled(); bool isImportOfCompleteMswDataEnabled(); bool isNNCsEnabled(); + const QString faultIncludeFileAbsolutePathPrefix(); - virtual bool open(const QString& fileName, RigCaseData* eclipseCase) = 0; + virtual bool open(const QString& fileName, RigEclipseCaseData* eclipseCase) = 0; virtual void close() = 0; virtual bool staticResult(const QString& result, PorosityModelResultType matrixOrFracture, std::vector* values) = 0; diff --git a/ApplicationCode/FileInterface/RifReaderMockModel.cpp b/ApplicationCode/FileInterface/RifReaderMockModel.cpp index c0da5973e2..316b536d07 100644 --- a/ApplicationCode/FileInterface/RifReaderMockModel.cpp +++ b/ApplicationCode/FileInterface/RifReaderMockModel.cpp @@ -19,13 +19,16 @@ ///////////////////////////////////////////////////////////////////////////////// #include "RifReaderMockModel.h" -#include "RigCaseCellResultsData.h" + #include "RifReaderInterface.h" +#include "RigCaseCellResultsData.h" +#include "RigEclipseCaseData.h" + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RifReaderMockModel::open(const QString& fileName, RigCaseData* eclipseCase) +bool RifReaderMockModel::open(const QString& fileName, RigEclipseCaseData* eclipseCase) { m_reservoirBuilder.populateReservoir(eclipseCase); @@ -35,22 +38,31 @@ bool RifReaderMockModel::open(const QString& fileName, RigCaseData* eclipseCase) std::vector dates; + std::vector days; + std::vector repNumbers; for (int i = 0; i < static_cast(m_reservoirBuilder.timeStepCount()); i++) { dates.push_back(QDateTime(QDate(2012+i, 6, 1))); + days.push_back(i); + repNumbers.push_back(i); } for (size_t i = 0; i < m_reservoirBuilder.resultCount(); i++) { size_t resIdx = cellResults->addEmptyScalarResult(RimDefines::DYNAMIC_NATIVE, QString("Dynamic_Result_%1").arg(i), false); - cellResults->setTimeStepDates(resIdx, dates); + cellResults->setTimeStepDates(resIdx, dates, days, repNumbers); } if (m_reservoirBuilder.timeStepCount() == 0) return true; std::vector staticDates; staticDates.push_back(dates[0]); + std::vector staticDays; + staticDays.push_back(days[0]); + std::vector staticRepNumbers; + staticRepNumbers.push_back(0); + for (int i = 0; i < static_cast(m_reservoirBuilder.resultCount()); i++) { QString varEnd; @@ -60,7 +72,7 @@ bool RifReaderMockModel::open(const QString& fileName, RigCaseData* eclipseCase) if (i > 1) resIndex = i; size_t resIdx = cellResults->addEmptyScalarResult(RimDefines::STATIC_NATIVE, QString("Static_Result_%1%2").arg(resIndex).arg(varEnd), false); - cellResults->setTimeStepDates(resIdx, staticDates); + cellResults->setTimeStepDates(resIdx, staticDates, staticDays, staticRepNumbers); } @@ -69,7 +81,7 @@ bool RifReaderMockModel::open(const QString& fileName, RigCaseData* eclipseCase) size_t resIdx; \ QString resultName(Name); \ resIdx = cellResults->addEmptyScalarResult(RimDefines::INPUT_PROPERTY, resultName, false); \ - cellResults->setTimeStepDates(resIdx, staticDates); \ + cellResults->setTimeStepDates(resIdx, staticDates, staticDays, staticRepNumbers); \ cellResults->cellScalarResults(resIdx).resize(1); \ std::vector& values = cellResults->cellScalarResults(resIdx)[0]; \ this->inputProperty(resultName, &values); \ @@ -170,7 +182,7 @@ void RifReaderMockModel::addLocalGridRefinement(const cvf::Vec3st& minCellPositi //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RifReaderMockModel::populateReservoir(RigCaseData* eclipseCase) +void RifReaderMockModel::populateReservoir(RigEclipseCaseData* eclipseCase) { m_reservoirBuilder.populateReservoir(eclipseCase); } diff --git a/ApplicationCode/FileInterface/RifReaderMockModel.h b/ApplicationCode/FileInterface/RifReaderMockModel.h index dbe4a083ee..33f5204f5b 100644 --- a/ApplicationCode/FileInterface/RifReaderMockModel.h +++ b/ApplicationCode/FileInterface/RifReaderMockModel.h @@ -36,17 +36,17 @@ class RifReaderMockModel : public RifReaderInterface void addLocalGridRefinement(const cvf::Vec3st& minCellPosition, const cvf::Vec3st& maxCellPosition, const cvf::Vec3st& singleCellRefinementFactors); - virtual bool open( const QString& fileName, RigCaseData* eclipseCase ); + virtual bool open( const QString& fileName, RigEclipseCaseData* eclipseCase ); virtual void close(); virtual bool staticResult( const QString& result, RifReaderInterface::PorosityModelResultType matrixOrFracture, std::vector* values ); virtual bool dynamicResult( const QString& result, RifReaderInterface::PorosityModelResultType matrixOrFracture, size_t stepIndex, std::vector* values ); private: - void populateReservoir(RigCaseData* eclipseCase); + void populateReservoir(RigEclipseCaseData* eclipseCase); bool inputProperty( const QString& propertyName, std::vector* values ); RigReservoirBuilderMock m_reservoirBuilder; - RigCaseData* m_reservoir; + RigEclipseCaseData* m_reservoir; }; diff --git a/ApplicationCode/FileInterface/RifReaderOpmParserInput.cpp b/ApplicationCode/FileInterface/RifReaderOpmParserInput.cpp deleted file mode 100644 index 5e2553e665..0000000000 --- a/ApplicationCode/FileInterface/RifReaderOpmParserInput.cpp +++ /dev/null @@ -1,649 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#include "RifReaderOpmParserInput.h" - -#include "RifReaderEclipseOutput.h" -#include "RigCaseCellResultsData.h" -#include "RigCaseData.h" -#include "RimEclipseInputCaseOpm.h" -#include "RimEclipseInputProperty.h" -#include "RimEclipseInputPropertyCollection.h" -#include "RiuMainWindow.h" -#include "RiuProcessMonitor.h" - -#include "cafProgressInfo.h" -#include "cvfBase.h" - -#include "opm/parser/eclipse/Deck/DeckItem.hpp" -#include "opm/parser/eclipse/Deck/Section.hpp" -#include "opm/parser/eclipse/Parser/MessageContainer.hpp" -#include "opm/parser/eclipse/Parser/ParseContext.hpp" -#include "opm/parser/eclipse/Parser/Parser.hpp" - -#include "../generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/F.hpp" - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RifReaderOpmParserInput::importGridPropertiesFaults(const QString& fileName, RigCaseData* caseData) -{ - RiuMainWindow::instance()->processMonitor()->addStringToLog(QString("\nStarted reading of grid and properties from file : " + fileName + "\n")); - - { - std::shared_ptr eclipseGrid; - std::string errorMessage; - - std::shared_ptr deck; - - try - { - Opm::Parser parser; - - // A default ParseContext will set up all parsing errors to throw exceptions - Opm::ParseContext parseContext; - RifReaderOpmParserInput::initUsingWarnings(&parseContext); - - deck = parser.parseFile(fileName.toStdString(), parseContext); - - if (deck) - { - eclipseGrid = Opm::Parser::parseGrid(*deck, parseContext); - - if (eclipseGrid && eclipseGrid->c_ptr()) - { - RifReaderEclipseOutput::transferGeometry(eclipseGrid->c_ptr(), caseData); - } - else - { - throw std::invalid_argument("No valid 3D grid detected"); - } - - Opm::TableManager tableManager(*deck); - - Opm::Eclipse3DProperties properties(*deck, tableManager, *eclipseGrid); - - std::vector predefKeywords = RifReaderOpmParserInput::knownPropertyKeywords(); - for (auto keyword : predefKeywords) - { - if (properties.supportsGridProperty(keyword)) - { - if (properties.hasDeckDoubleGridProperty(keyword)) - { - auto allValues = properties.getDoubleGridProperty(keyword).getData(); - - QString newResultName = caseData->results(RifReaderInterface::MATRIX_RESULTS)->makeResultNameUnique(QString::fromStdString(keyword)); - size_t resultIndex = RifReaderOpmParserPropertyReader::findOrCreateResult(newResultName, caseData); - - if (resultIndex != cvf::UNDEFINED_SIZE_T) - { - std::vector< std::vector >& newPropertyData = caseData->results(RifReaderInterface::MATRIX_RESULTS)->cellScalarResults(resultIndex); - newPropertyData.push_back(allValues); - } - } - else if (properties.hasDeckIntGridProperty(keyword)) - { - auto intValues = properties.getIntGridProperty(keyword).getData(); - - QString newResultName = caseData->results(RifReaderInterface::MATRIX_RESULTS)->makeResultNameUnique(QString::fromStdString(keyword)); - size_t resultIndex = RifReaderOpmParserPropertyReader::findOrCreateResult(newResultName, caseData); - - if (resultIndex != cvf::UNDEFINED_SIZE_T) - { - std::vector< std::vector >& newPropertyData = caseData->results(RifReaderInterface::MATRIX_RESULTS)->cellScalarResults(resultIndex); - - std::vector doubleValues; - - doubleValues.insert(std::end(doubleValues), std::begin(intValues), std::end(intValues)); - - newPropertyData.push_back(doubleValues); - } - } - } - - if (caseData->results(RifReaderInterface::MATRIX_RESULTS)->resultCount() == 0) - { - // Eclipse3DProperties was not able to extract results. This is often the case when reading a GRDECL file directly - // Parse for known keywords by analyzing the present keywords in the deck - - RifReaderOpmParserPropertyReader propertyReader(deck); - - std::set keywordsOnFile = propertyReader.keywords(); - std::vector predefKeywords = RifReaderOpmParserInput::knownPropertyKeywords(); - for (auto keyword : predefKeywords) - { - if (std::find(keywordsOnFile.begin(), keywordsOnFile.end(), keyword) != keywordsOnFile.end()) - { - QString newResultName = caseData->results(RifReaderInterface::MATRIX_RESULTS)->makeResultNameUnique(QString::fromStdString(keyword)); - propertyReader.copyPropertyToCaseData(keyword, caseData, newResultName); - } - } - } - - if (caseData->mainGrid()) - { - cvf::Collection faults; - importFaults(*deck, &faults); - if (faults.size() > 0) - { - caseData->mainGrid()->setFaults(faults); - } - } - } - } - } - catch (std::exception& e) - { - errorMessage = e.what(); - } - catch (...) - { - errorMessage = "Unknown exception throwm from Opm::Parser"; - } - - if (deck) - { - const Opm::MessageContainer& messages = deck->getMessageContainer(); - if (messages.size() > 0) - { - RiuMainWindow::instance()->processMonitor()->addStringToLog("\n\nLog messages from Deck : \n"); - } - for (auto m : messages) - { - RiuMainWindow::instance()->processMonitor()->addStringToLog(" Deck : " + QString::fromStdString(m.message) + "\n"); - } - } - - if (eclipseGrid) - { - const Opm::MessageContainer& messages = eclipseGrid->getMessageContainer(); - if (messages.size() > 0) - { - RiuMainWindow::instance()->processMonitor()->addStringToLog("\n\nLog messages from EclipseGrid : \n"); - } - for (auto m : messages) - { - RiuMainWindow::instance()->processMonitor()->addStringToLog(" EclipseGrid :" + QString::fromStdString(m.message) + "\n"); - } - } - - if (errorMessage.size() > 0) - { - RiuMainWindow::instance()->processMonitor()->addStringToLog("\n\nError messages : \n"); - RiuMainWindow::instance()->processMonitor()->addStringToLog(" " + QString::fromStdString(errorMessage) + "\n"); - RiuMainWindow::instance()->processMonitor()->addStringToLog(QString("Failed reading of grid and properties from file : " + fileName + "\n")); - } - else - { - RiuMainWindow::instance()->processMonitor()->addStringToLog(QString("Completed reading of grid and properties from file : " + fileName + "\n")); - } - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RifReaderOpmParserInput::readFaults(const QString& fileName, cvf::Collection* faults) -{ - { - std::string errorMessage; - - try - { - Opm::Parser parser; - - // A default ParseContext will set up all parsing errors to throw exceptions - Opm::ParseContext parseContext; - RifReaderOpmParserInput::initUsingWarnings(&parseContext); - - auto deckptr = parser.parseFile(fileName.toStdString(), parseContext); - const Opm::Deck& deck = *deckptr; - - importFaults(deck, faults); - - } - catch (std::exception& e) - { - errorMessage = e.what(); - } - catch (...) - { - errorMessage = "Unknown exception throwm from Opm::Parser"; - } - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RifReaderOpmParserInput::importFaults(const Opm::Deck& deck, cvf::Collection* faults) -{ - { - std::string errorMessage; - - try - { - RigFault* fault = NULL; - - // The following is based on Opm::FaultCollection - // Not possible to use this class, as the logic in ResInsight handles IJK-values instead - // of cell indices - const auto& faultKeywords = deck.getKeywordList(); - for (auto keyword_iter = faultKeywords.begin(); keyword_iter != faultKeywords.end(); ++keyword_iter) { - const auto& faultsKeyword = *keyword_iter; - for (auto iter = faultsKeyword->begin(); iter != faultsKeyword->end(); ++iter) { - const auto& faultRecord = *iter; - const std::string& faultName = faultRecord.getItem(0).get< std::string >(0); - int I1 = faultRecord.getItem(1).get< int >(0) - 1; - int I2 = faultRecord.getItem(2).get< int >(0) - 1; - int J1 = faultRecord.getItem(3).get< int >(0) - 1; - int J2 = faultRecord.getItem(4).get< int >(0) - 1; - int K1 = faultRecord.getItem(5).get< int >(0) - 1; - int K2 = faultRecord.getItem(6).get< int >(0) - 1; - - const std::string& faceText = faultRecord.getItem(7).get< std::string >(0); - - cvf::StructGridInterface::FaceEnum cellFaceEnum = RifReaderOpmParserInput::faceEnumFromText(QString::fromStdString(faceText)); - - QString name = QString::fromStdString(faultName); - - // Guard against invalid cell ranges by limiting lowest possible range value to zero - cvf::CellRange cellrange(CVF_MAX(I1, 0), CVF_MAX(J1, 0), CVF_MAX(K1, 0), CVF_MAX(I2, 0), CVF_MAX(J2, 0), CVF_MAX(K2, 0)); - - if (!(fault && fault->name() == name)) - { - if (findFaultByName(*faults, name) == cvf::UNDEFINED_SIZE_T) - { - RigFault* newFault = new RigFault; - newFault->setName(name); - - faults->push_back(newFault); - } - - size_t faultIndex = findFaultByName(*faults, name); - if (faultIndex == cvf::UNDEFINED_SIZE_T) - { - CVF_ASSERT(faultIndex != cvf::UNDEFINED_SIZE_T); - continue; - } - - fault = faults->at(faultIndex); - } - - CVF_ASSERT(fault); - - fault->addCellRangeForFace(cellFaceEnum, cellrange); - } - } - } - catch (std::exception& e) - { - errorMessage = e.what(); - } - catch (...) - { - errorMessage = "Unknown exception throwm from Opm::Parser"; - } - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -std::vector RifReaderOpmParserInput::knownPropertyKeywords() -{ - std::vector knownKeywords; - knownKeywords.push_back("AQUIFERA"); - knownKeywords.push_back("ACTNUM"); - knownKeywords.push_back("EQLNUM"); - knownKeywords.push_back("FIPNUM"); - knownKeywords.push_back("KRG"); - knownKeywords.push_back("KRGR"); - knownKeywords.push_back("KRO"); - knownKeywords.push_back("KRORG"); - knownKeywords.push_back("KRORW"); - knownKeywords.push_back("KRW"); - knownKeywords.push_back("KRWR"); - knownKeywords.push_back("MINPVV"); - knownKeywords.push_back("MULTPV"); - knownKeywords.push_back("MULTX"); - knownKeywords.push_back("MULTX-"); - knownKeywords.push_back("MULTY"); - knownKeywords.push_back("MULTY-"); - knownKeywords.push_back("MULTZ"); - knownKeywords.push_back("NTG"); - knownKeywords.push_back("PCG"); - knownKeywords.push_back("PCW"); - knownKeywords.push_back("PERMX"); - knownKeywords.push_back("PERMY"); - knownKeywords.push_back("PERMZ"); - knownKeywords.push_back("PORO"); - knownKeywords.push_back("PVTNUM"); - knownKeywords.push_back("SATNUM"); - knownKeywords.push_back("SGCR"); - knownKeywords.push_back("SGL"); - knownKeywords.push_back("SGLPC"); - knownKeywords.push_back("SGU"); - knownKeywords.push_back("SGWCR"); - knownKeywords.push_back("SWATINIT"); - knownKeywords.push_back("SWCR"); - knownKeywords.push_back("SWGCR"); - knownKeywords.push_back("SWL"); - knownKeywords.push_back("SWLPC"); - knownKeywords.push_back("TRANX"); - knownKeywords.push_back("TRANY"); - knownKeywords.push_back("TRANZ"); - - return knownKeywords; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -std::vector RifReaderOpmParserInput::allParserConfigKeys() -{ - std::vector configKeys; - configKeys.push_back(Opm::ParseContext::PARSE_UNKNOWN_KEYWORD); - configKeys.push_back(Opm::ParseContext::PARSE_RANDOM_TEXT); - configKeys.push_back(Opm::ParseContext::PARSE_RANDOM_SLASH); - configKeys.push_back(Opm::ParseContext::PARSE_MISSING_DIMS_KEYWORD); - configKeys.push_back(Opm::ParseContext::PARSE_EXTRA_DATA); - configKeys.push_back(Opm::ParseContext::PARSE_MISSING_INCLUDE); - configKeys.push_back(Opm::ParseContext::UNSUPPORTED_SCHEDULE_GEO_MODIFIER); - configKeys.push_back(Opm::ParseContext::UNSUPPORTED_COMPORD_TYPE); - configKeys.push_back(Opm::ParseContext::UNSUPPORTED_INITIAL_THPRES); - configKeys.push_back(Opm::ParseContext::INTERNAL_ERROR_UNINITIALIZED_THPRES); - configKeys.push_back(Opm::ParseContext::PARSE_MISSING_SECTIONS); - - return configKeys; -} - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -size_t RifReaderOpmParserInput::findFaultByName(const cvf::Collection& faults, const QString& name) -{ - for (size_t i = 0; i < faults.size(); i++) - { - if (faults.at(i)->name() == name) - { - return i; - } - } - - return cvf::UNDEFINED_SIZE_T; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -cvf::StructGridInterface::FaceEnum RifReaderOpmParserInput::faceEnumFromText(const QString& faceString) -{ - QString upperCaseText = faceString.toUpper().trimmed(); - - if (upperCaseText == "X" || upperCaseText == "X+" || upperCaseText == "I" || upperCaseText == "I+") return cvf::StructGridInterface::POS_I; - if (upperCaseText == "Y" || upperCaseText == "Y+" || upperCaseText == "J" || upperCaseText == "J+") return cvf::StructGridInterface::POS_J; - if (upperCaseText == "Z" || upperCaseText == "Z+" || upperCaseText == "K" || upperCaseText == "K+") return cvf::StructGridInterface::POS_K; - - if (upperCaseText == "X-" || upperCaseText == "I-") return cvf::StructGridInterface::NEG_I; - if (upperCaseText == "Y-" || upperCaseText == "J-") return cvf::StructGridInterface::NEG_J; - if (upperCaseText == "Z-" || upperCaseText == "K-") return cvf::StructGridInterface::NEG_K; - - return cvf::StructGridInterface::NO_FACE; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RifReaderOpmParserInput::initUsingWarnings(Opm::ParseContext* parseContext) -{ - if (!parseContext) return; - - for (auto state : allParserConfigKeys()) - { - parseContext->addKey(state); - } - - // Treat all parsing errors as warnings - parseContext->update(Opm::InputError::WARN); -} - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -size_t RifReaderOpmParserPropertyReader::findOrCreateResult(const QString& newResultName, RigCaseData* reservoir) -{ - size_t resultIndex = reservoir->results(RifReaderInterface::MATRIX_RESULTS)->findScalarResultIndex(newResultName); - if (resultIndex == cvf::UNDEFINED_SIZE_T) - { - resultIndex = reservoir->results(RifReaderInterface::MATRIX_RESULTS)->addEmptyScalarResult(RimDefines::INPUT_PROPERTY, newResultName, false); - } - - return resultIndex; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RifReaderOpmParserPropertyReader::readAllProperties(std::shared_ptr< Opm::Deck > deck, RigCaseData* caseData, std::map* newResults) -{ - std::set uniqueKeywords; - for (auto it = deck->begin(); it != deck->end(); it++) - { - uniqueKeywords.insert(it->name()); - } - - for (auto keyword : uniqueKeywords) - { - bool isItemCountEqual = RifReaderOpmParserPropertyReader::isDataItemCountIdenticalToMainGridCellCount(deck, keyword, caseData); - - if (isItemCountEqual) - { - std::vector allValues; - - RifReaderOpmParserPropertyReader::getAllValuesForKeyword(deck, keyword, allValues); - - QString keywordName = QString::fromStdString(keyword); - QString newResultName = caseData->results(RifReaderInterface::MATRIX_RESULTS)->makeResultNameUnique(keywordName); - size_t resultIndex = findOrCreateResult(newResultName, caseData); - if (resultIndex != cvf::UNDEFINED_SIZE_T) - { - std::vector< std::vector >& newPropertyData = caseData->results(RifReaderInterface::MATRIX_RESULTS)->cellScalarResults(resultIndex); - newPropertyData.push_back(allValues); - } - - newResults->insert(std::make_pair(newResultName, keywordName)); - } - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RifReaderOpmParserPropertyReader::RifReaderOpmParserPropertyReader(std::shared_ptr< Opm::Deck > deck) - : m_deck(deck) -{ - -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RifReaderOpmParserPropertyReader::RifReaderOpmParserPropertyReader(const QString& fileName) -{ - open(fileName); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RifReaderOpmParserPropertyReader::open(const QString& fileName) -{ - { - std::string errorMessage; - - try - { - Opm::Parser parser; - - // A default ParseContext will set up all parsing errors to throw exceptions - Opm::ParseContext parseContext; - - // Treat all parsing errors as warnings - parseContext.update(Opm::InputError::WARN); - - m_deck = parser.parseFile(fileName.toStdString(), parseContext); - } - catch (std::exception& e) - { - errorMessage = e.what(); - } - catch (...) - { - errorMessage = "Unknown exception throwm from Opm::Parser"; - } - } - - return true; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -std::set RifReaderOpmParserPropertyReader::keywords() const -{ - std::set ids; - - if (m_deck) - { - for (auto it = m_deck->begin(); it != m_deck->end(); it++) - { - ids.insert(it->name()); - } - } - - return ids; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RifReaderOpmParserPropertyReader::copyPropertyToCaseData(const std::string& keywordName, RigCaseData* caseData, const QString& resultName) -{ - { - std::string errorMessage; - - try - { - if (m_deck->hasKeyword(keywordName)) - { - bool isItemCountEqual = isDataItemCountIdenticalToMainGridCellCount(m_deck, keywordName, caseData); - if (isItemCountEqual) - { - std::vector allValues; - - getAllValuesForKeyword(m_deck, keywordName, allValues); - - size_t resultIndex = RifReaderOpmParserPropertyReader::findOrCreateResult(resultName, caseData); - if (resultIndex != cvf::UNDEFINED_SIZE_T) - { - std::vector< std::vector >& newPropertyData = caseData->results(RifReaderInterface::MATRIX_RESULTS)->cellScalarResults(resultIndex); - newPropertyData.push_back(allValues); - } - } - } - } - catch (std::exception& e) - { - errorMessage = e.what(); - } - catch (...) - { - errorMessage = "Unknown exception throwm from Opm::Parser"; - } - - QString fileName = QString::fromStdString(m_deck->getDataFile()); - - if (errorMessage.size() > 0) - { - RiuMainWindow::instance()->processMonitor()->addStringToLog(" " + QString::fromStdString(errorMessage) + "\n"); - RiuMainWindow::instance()->processMonitor()->addStringToLog(QString("Error detected while reading property %1 from file : %2\n").arg(QString::fromStdString(keywordName)).arg(fileName)); - } - else - { - RiuMainWindow::instance()->processMonitor()->addStringToLog(QString("Completed reading of property %1 from file : %2\n").arg(QString::fromStdString(keywordName)).arg(fileName)); - } - } - - return true; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RifReaderOpmParserPropertyReader::getAllValuesForKeyword(std::shared_ptr< Opm::Deck > deck, const std::string& keyword, std::vector& allValues) -{ - for (auto deckKeyword : deck->getKeywordList(keyword)) - { - if (deckKeyword->isDataKeyword() && deckKeyword->size() == 1) - { - auto deckRecord = deckKeyword->getDataRecord(); - if (deckRecord.size() == 1) - { - if (deckRecord.getDataItem().typeof() == Opm::DeckItem::integer) - { - auto opmData = deckKeyword->getIntData(); - allValues.insert(std::end(allValues), std::begin(opmData), std::end(opmData)); - } - else if (deckRecord.getDataItem().typeof() == Opm::DeckItem::fdouble) - { - auto opmData = deckKeyword->getRawDoubleData(); - allValues.insert(std::end(allValues), std::begin(opmData), std::end(opmData)); - } - } - } - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RifReaderOpmParserPropertyReader::isDataItemCountIdenticalToMainGridCellCount(std::shared_ptr< Opm::Deck > deck, const std::string& keyword, RigCaseData* caseData) -{ - bool isEqual = false; - { - size_t valueCount = 0; - for (auto deckKeyword : deck->getKeywordList(keyword)) - { - if (deckKeyword->isDataKeyword()) - { - valueCount += deckKeyword->getDataSize(); - } - } - - if (valueCount == caseData->mainGrid()->cellCount()) - { - isEqual = true; - } - } - - return isEqual; -} - diff --git a/ApplicationCode/FileInterface/RifReaderOpmParserInput.h b/ApplicationCode/FileInterface/RifReaderOpmParserInput.h deleted file mode 100644 index 4949929d87..0000000000 --- a/ApplicationCode/FileInterface/RifReaderOpmParserInput.h +++ /dev/null @@ -1,90 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#pragma once - -#include "RigFault.h" - -#include "cvfCollection.h" - -#include -#include -#include -#include -#include - -#include - -class RigCaseData; - -namespace Opm { - class Deck; - class ParseContext; -} - - -//================================================================================================== -// -// -// -//================================================================================================== -class RifReaderOpmParserInput -{ -public: - static void importGridPropertiesFaults(const QString& fileName, RigCaseData* eclipseCase); - - static void readFaults(const QString& fileName, cvf::Collection* faults); - - static std::vector knownPropertyKeywords(); - -private: - static void importFaults(const Opm::Deck& deck, cvf::Collection* faults); - static std::vector allParserConfigKeys(); - static size_t findFaultByName(const cvf::Collection& faults, const QString& name); - static cvf::StructGridInterface::FaceEnum faceEnumFromText(const QString& faceString); - static void initUsingWarnings(Opm::ParseContext* parseContext); -}; - - - -//================================================================================================== -// -// -// -//================================================================================================== -class RifReaderOpmParserPropertyReader -{ -public: - RifReaderOpmParserPropertyReader(std::shared_ptr< Opm::Deck > deck); - RifReaderOpmParserPropertyReader(const QString& fileName); - - std::set keywords() const; - - bool copyPropertyToCaseData(const std::string& keywordName, RigCaseData* eclipseCase, const QString& resultName); - - static size_t findOrCreateResult(const QString& newResultName, RigCaseData* reservoir); - -private: - static void readAllProperties(std::shared_ptr< Opm::Deck > deck, RigCaseData* caseData, std::map* newResults); - static void getAllValuesForKeyword(std::shared_ptr< Opm::Deck > deck, const std::string& keyword, std::vector& allValues); - static bool isDataItemCountIdenticalToMainGridCellCount(std::shared_ptr< Opm::Deck > deck, const std::string& keyword, RigCaseData* caseData); - bool open(const QString& fileName); - -private: - std::shared_ptr< Opm::Deck > m_deck; -}; diff --git a/ApplicationCode/FileInterface/RifReaderSettings.cpp b/ApplicationCode/FileInterface/RifReaderSettings.cpp index 0e257837bf..473a86271c 100644 --- a/ApplicationCode/FileInterface/RifReaderSettings.cpp +++ b/ApplicationCode/FileInterface/RifReaderSettings.cpp @@ -31,14 +31,16 @@ RifReaderSettings::RifReaderSettings() { CAF_PDM_InitObject("RifReaderSettings", "", "", ""); - CAF_PDM_InitField(&importFaults, "importFaults", true, "Import faults", "", "", ""); + CAF_PDM_InitField(&importFaults, "importFaults", true, "Import Faults", "", "", ""); importFaults.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN); CAF_PDM_InitField(&importNNCs, "importSimulationNNCs", true, "Import NNCs", "", "", ""); importNNCs.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN); - CAF_PDM_InitField(&importAdvancedMswData, "importAdvancedMswData", false, "Import advanced MSW data", "", "", ""); + CAF_PDM_InitField(&importAdvancedMswData, "importAdvancedMswData", false, "Import Advanced MSW Data", "", "", ""); importAdvancedMswData.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN); + + CAF_PDM_InitField(&faultIncludeFileAbsolutePathPrefix, "faultIncludeFileAbsolutePathPrefix", QString(), "Fault Include File Absolute Path Prefix", "", "Path used to prefix absolute UNIX paths in fault include statements on Windows", ""); } //-------------------------------------------------------------------------------------------------- @@ -50,7 +52,7 @@ void RifReaderSettings::defineEditorAttribute(const caf::PdmFieldHandle* field, field == &importAdvancedMswData || field == &importNNCs) { - caf::PdmUiCheckBoxEditorAttribute* myAttr = static_cast(attribute); + caf::PdmUiCheckBoxEditorAttribute* myAttr = dynamic_cast(attribute); if (myAttr) { myAttr->m_useNativeCheckBoxLabel = true; @@ -58,3 +60,13 @@ void RifReaderSettings::defineEditorAttribute(const caf::PdmFieldHandle* field, } } +void RifReaderSettings::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) +{ + uiOrdering.add(&importFaults); + uiOrdering.add(&importNNCs); + uiOrdering.add(&importAdvancedMswData); +#ifdef WIN32 + uiOrdering.add(&faultIncludeFileAbsolutePathPrefix); +#endif +} + diff --git a/ApplicationCode/FileInterface/RifReaderSettings.h b/ApplicationCode/FileInterface/RifReaderSettings.h index 8f4a8b7deb..4504fbea1e 100644 --- a/ApplicationCode/FileInterface/RifReaderSettings.h +++ b/ApplicationCode/FileInterface/RifReaderSettings.h @@ -39,9 +39,12 @@ class RifReaderSettings : public caf::PdmObject caf::PdmField importFaults; caf::PdmField importNNCs; caf::PdmField importAdvancedMswData; + caf::PdmField faultIncludeFileAbsolutePathPrefix; protected: virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute); + virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override; + }; diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/CMakeLists.txt b/ApplicationCode/GeoMech/GeoMechDataModel/CMakeLists.txt index 22c03f44d3..2201832c4c 100644 --- a/ApplicationCode/GeoMech/GeoMechDataModel/CMakeLists.txt +++ b/ApplicationCode/GeoMech/GeoMechDataModel/CMakeLists.txt @@ -34,6 +34,8 @@ add_library( ${PROJECT_NAME} RigFemPartGrid.cpp RigFemResultAddress.h RigFemResultPosEnum.h + RimGeoMechGeometrySelectionItem.h + RimGeoMechGeometrySelectionItem.cpp ) target_link_libraries( ${PROJECT_NAME} LibCore cafTensor ResultStatisticsCache) diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemFaceComparator.h b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemFaceComparator.h index ebcc482dde..794f2681a3 100644 --- a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemFaceComparator.h +++ b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemFaceComparator.h @@ -26,6 +26,8 @@ class RigFemFaceComparator { public: + RigFemFaceComparator() : m_minMainFaceNodeIdx(INT_MAX), m_faceIdxToMinMainFaceNodeIdx(0) {} + void setMainFace(const int* elmNodes, const int * localFaceIndices, int faceNodeCount) { m_canonizedMainFaceIdxes.resize(faceNodeCount); diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPart.cpp b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPart.cpp index 2f86eb7f10..dc2c4bee97 100644 --- a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPart.cpp +++ b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPart.cpp @@ -287,16 +287,13 @@ float RigFemPart::characteristicElementSize() { if (m_characteristicElementSize != std::numeric_limits::infinity()) return m_characteristicElementSize; - // take 100 elements - float elmIdxJump = elementCount() / 100.0f; - int elmIdxIncrement = elmIdxJump < 1 ? 1: (int) elmIdxJump; int elmsToAverageCount = 0; float sumMaxEdgeLength = 0; - for (int elmIdx = 0; elmIdx < elementCount(); elmIdx += elmIdxIncrement) + for (int elmIdx = 0; elmIdx < elementCount(); elmIdx++) { RigElementType eType = this->elementType(elmIdx); - if (eType == HEX8 || eType == HEX8P) + if (eType == HEX8P) { const int* elmentConn = this->connectivities(elmIdx); cvf::Vec3f nodePos0 = this->nodes().coordinates[elmentConn[0]]; diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartGrid.h b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartGrid.h index 4b775cdaa2..20e511c569 100644 --- a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartGrid.h +++ b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartGrid.h @@ -27,7 +27,7 @@ class RigFemPart; class RigFemPartGrid : public cvf::StructGridInterface { public: - RigFemPartGrid(const RigFemPart* femPart); + explicit RigFemPartGrid(const RigFemPart* femPart); virtual ~RigFemPartGrid(); virtual bool ijkFromCellIndex(size_t cellIndex, size_t* i, size_t* j, size_t* k) const; diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.cpp b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.cpp index 5777a4f43a..a7a1060638 100644 --- a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.cpp +++ b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.cpp @@ -367,7 +367,7 @@ std::map > RigFemPartResultsCollection::sc //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RigFemScalarResultFrames* RigFemPartResultsCollection::calculateBarConvertedResult(int partIndex, const RigFemResultAddress &convertedResultAddr, const std::string fieldNameToConvert) +RigFemScalarResultFrames* RigFemPartResultsCollection::calculateBarConvertedResult(int partIndex, const RigFemResultAddress &convertedResultAddr, const std::string& fieldNameToConvert) { caf::ProgressInfo frameCountProgress(this->frameCount() * 2, ""); frameCountProgress.setProgressDescription("Calculating " + QString::fromStdString(convertedResultAddr.fieldName + ": " + convertedResultAddr.componentName)); @@ -535,15 +535,11 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateMeanStressSEM(in frameCountProgress.setProgressDescription("Calculating " + QString::fromStdString(resVarAddr.fieldName + ": " + resVarAddr.componentName)); frameCountProgress.setNextProgressIncrement(this->frameCount()); - RigFemScalarResultFrames * sa11 = nullptr; - RigFemScalarResultFrames * sa22 = nullptr; - RigFemScalarResultFrames * sa33 = nullptr; - - sa11 = this->findOrLoadScalarResult(partIndex, RigFemResultAddress(resVarAddr.resultPosType, "SE", "S11")); + RigFemScalarResultFrames * sa11 = this->findOrLoadScalarResult(partIndex, RigFemResultAddress(resVarAddr.resultPosType, "SE", "S11")); frameCountProgress.incrementProgress(); frameCountProgress.setNextProgressIncrement(this->frameCount()); - sa22 = this->findOrLoadScalarResult(partIndex, RigFemResultAddress(resVarAddr.resultPosType, "SE", "S22")); + RigFemScalarResultFrames * sa22 = this->findOrLoadScalarResult(partIndex, RigFemResultAddress(resVarAddr.resultPosType, "SE", "S22")); frameCountProgress.incrementProgress(); frameCountProgress.setNextProgressIncrement(this->frameCount()); - sa33 = this->findOrLoadScalarResult(partIndex, RigFemResultAddress(resVarAddr.resultPosType, "SE", "S33")); + RigFemScalarResultFrames * sa33 = this->findOrLoadScalarResult(partIndex, RigFemResultAddress(resVarAddr.resultPosType, "SE", "S33")); RigFemScalarResultFrames * dstDataFrames = m_femPartResults[partIndex]->createScalarResult(resVarAddr); @@ -581,12 +577,9 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateSFI(int partInde frameCountProgress.setProgressDescription("Calculating " + QString::fromStdString(resVarAddr.fieldName + ": " + resVarAddr.componentName)); frameCountProgress.setNextProgressIncrement(this->frameCount()); - RigFemScalarResultFrames * se1Frames = nullptr; - RigFemScalarResultFrames * se3Frames = nullptr; - - se1Frames = this->findOrLoadScalarResult(partIndex, RigFemResultAddress(resVarAddr.resultPosType, "SE", "S1")); + RigFemScalarResultFrames * se1Frames = this->findOrLoadScalarResult(partIndex, RigFemResultAddress(resVarAddr.resultPosType, "SE", "S1")); frameCountProgress.incrementProgress(); frameCountProgress.setNextProgressIncrement(this->frameCount()); - se3Frames = this->findOrLoadScalarResult(partIndex, RigFemResultAddress(resVarAddr.resultPosType, "SE", "S3")); + RigFemScalarResultFrames * se3Frames = this->findOrLoadScalarResult(partIndex, RigFemResultAddress(resVarAddr.resultPosType, "SE", "S3")); RigFemScalarResultFrames * dstDataFrames = m_femPartResults[partIndex]->createScalarResult(resVarAddr); @@ -617,7 +610,7 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateSFI(int partInde } else { - dstFrameData[vIdx] = ((cohPrFricAngle + 0.5*(se1Data[vIdx] + se3Data[vIdx])) * sin(m_frictionAngleRad)) / (0.5*(se1Data[vIdx] - se3Data[vIdx])); + dstFrameData[vIdx] = ((cohPrFricAngle + 0.5*(se1Data[vIdx] + se3Data[vIdx])) * sinFricAng ) / (0.5*(se1Data[vIdx] - se3Data[vIdx])); } } @@ -638,12 +631,9 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateDSM(int partInde frameCountProgress.setProgressDescription("Calculating " + QString::fromStdString(resVarAddr.fieldName + ": " + resVarAddr.componentName)); frameCountProgress.setNextProgressIncrement(this->frameCount()); - RigFemScalarResultFrames * se1Frames = nullptr; - RigFemScalarResultFrames * se3Frames = nullptr; - - se1Frames = this->findOrLoadScalarResult(partIndex, RigFemResultAddress(resVarAddr.resultPosType, "SE", "S1")); + RigFemScalarResultFrames * se1Frames = this->findOrLoadScalarResult(partIndex, RigFemResultAddress(resVarAddr.resultPosType, "SE", "S1")); frameCountProgress.incrementProgress(); frameCountProgress.setNextProgressIncrement(this->frameCount()); - se3Frames = this->findOrLoadScalarResult(partIndex, RigFemResultAddress(resVarAddr.resultPosType, "SE", "S3")); + RigFemScalarResultFrames * se3Frames = this->findOrLoadScalarResult(partIndex, RigFemResultAddress(resVarAddr.resultPosType, "SE", "S3")); RigFemScalarResultFrames * dstDataFrames = m_femPartResults[partIndex]->createScalarResult(resVarAddr); @@ -690,10 +680,7 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateFOS(int partInde frameCountProgress.setProgressDescription("Calculating " + QString::fromStdString(resVarAddr.fieldName + ": " + resVarAddr.componentName)); frameCountProgress.setNextProgressIncrement(this->frameCount()); - RigFemScalarResultFrames * dsmFrames = nullptr; - RigFemScalarResultFrames * se3Frames = nullptr; - - dsmFrames = this->findOrLoadScalarResult(partIndex, RigFemResultAddress(resVarAddr.resultPosType, "SE", "DSM")); + RigFemScalarResultFrames * dsmFrames = this->findOrLoadScalarResult(partIndex, RigFemResultAddress(resVarAddr.resultPosType, "SE", "DSM")); RigFemScalarResultFrames * dstDataFrames = m_femPartResults[partIndex]->createScalarResult(resVarAddr); @@ -730,17 +717,12 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateMeanStressSTM(in caf::ProgressInfo frameCountProgress(this->frameCount() * 4, ""); frameCountProgress.setProgressDescription("Calculating " + QString::fromStdString(resVarAddr.fieldName + ": " + resVarAddr.componentName)); frameCountProgress.setNextProgressIncrement(this->frameCount()); - - RigFemScalarResultFrames * st11 = nullptr; - RigFemScalarResultFrames * st22 = nullptr; - RigFemScalarResultFrames * st33 = nullptr; - - st11 = this->findOrLoadScalarResult(partIndex, RigFemResultAddress(resVarAddr.resultPosType, "ST", "S11")); + RigFemScalarResultFrames * st11 = this->findOrLoadScalarResult(partIndex, RigFemResultAddress(resVarAddr.resultPosType, "ST", "S11")); frameCountProgress.incrementProgress(); frameCountProgress.setNextProgressIncrement(this->frameCount()); - st22 = this->findOrLoadScalarResult(partIndex, RigFemResultAddress(resVarAddr.resultPosType, "ST", "S22")); + RigFemScalarResultFrames * st22 = this->findOrLoadScalarResult(partIndex, RigFemResultAddress(resVarAddr.resultPosType, "ST", "S22")); frameCountProgress.incrementProgress(); frameCountProgress.setNextProgressIncrement(this->frameCount()); - st33 = this->findOrLoadScalarResult(partIndex, RigFemResultAddress(resVarAddr.resultPosType, "ST", "S33")); + RigFemScalarResultFrames * st33 = this->findOrLoadScalarResult(partIndex, RigFemResultAddress(resVarAddr.resultPosType, "ST", "S33")); RigFemScalarResultFrames * dstDataFrames = m_femPartResults[partIndex]->createScalarResult(resVarAddr); @@ -2109,7 +2091,6 @@ RigFemClosestResultIndexCalculator::RigFemClosestResultIndexCalculator(RigFemPar if ( closestLocalNode >= 0 ) { - float scalarValue = std::numeric_limits::infinity(); int nodeIdx = elmentConn[closestLocalNode]; m_closestElementNodeResIdx = static_cast(femPart->elementNodeResultIdx(elementIndex, closestLocalNode)); @@ -2138,7 +2119,6 @@ RigFemClosestResultIndexCalculator::RigFemClosestResultIndexCalculator(RigFemPar int closestLocalElmNode = -1; { RigElementType elmType = femPart->elementType(elementIndex); - int faceCount = RigFemTypes::elmentFaceCount(elmType); const int* elmNodeIndices = femPart->connectivities(elementIndex); int faceNodeCount = 0; const int* localElmNodeIndicesForFace = RigFemTypes::localElmNodeIndicesForFace(elmType, m_face, &faceNodeCount); diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.h b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.h index 1898abb026..5659479e1b 100644 --- a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.h +++ b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.h @@ -86,7 +86,7 @@ class RigFemPartResultsCollection: public cvf::Object RigFemScalarResultFrames * dstDataFrames, caf::ProgressInfo* frameCountProgress); - RigFemScalarResultFrames* calculateBarConvertedResult(int partIndex, const RigFemResultAddress &convertedResultAddr, const std::string fieldNameToConvert); + RigFemScalarResultFrames* calculateBarConvertedResult(int partIndex, const RigFemResultAddress &convertedResultAddr, const std::string& fieldNameToConvert); RigFemScalarResultFrames* calculateEnIpPorBarResult(int partIndex, const RigFemResultAddress &convertedResultAddr); RigFemScalarResultFrames* calculateTimeLapseResult(int partIndex, const RigFemResultAddress& resVarAddr); RigFemScalarResultFrames* calculateMeanStressSEM(int partIndex, const RigFemResultAddress& resVarAddr); diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemResultAddress.h b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemResultAddress.h index 0010f2bada..02dd5372b0 100644 --- a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemResultAddress.h +++ b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemResultAddress.h @@ -51,9 +51,9 @@ class RigFemResultAddress } RigFemResultPosEnum resultPosType; - std::string fieldName; - std::string componentName; - int timeLapseBaseFrameIdx; + std::string fieldName; + std::string componentName; + int timeLapseBaseFrameIdx; static const int ALL_TIME_LAPSES = -2; diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemScalarResultFrames.h b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemScalarResultFrames.h index 4c0d11bbcf..2ab37169ef 100644 --- a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemScalarResultFrames.h +++ b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemScalarResultFrames.h @@ -20,24 +20,22 @@ #pragma once #include "cvfObject.h" #include -#include //================================================================================================== /// //================================================================================================== -class RigStatisticsDataCache; class RigFemScalarResultFrames: public cvf::Object { public: - RigFemScalarResultFrames(int frameCount); + explicit RigFemScalarResultFrames(int frameCount); virtual ~RigFemScalarResultFrames(); - void enableAsSingleFrameResult(); + void enableAsSingleFrameResult(); - std::vector& frameData(size_t frameIndex); + std::vector& frameData(size_t frameIndex); const std::vector& frameData(size_t frameIndex) const; - int frameCount() const; + int frameCount() const; private: std::vector< std::vector > m_dataForEachFrame; diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/RigGeoMechCaseData.cpp b/ApplicationCode/GeoMech/GeoMechDataModel/RigGeoMechCaseData.cpp index 67e2f1d59c..6cc6ef6f70 100644 --- a/ApplicationCode/GeoMech/GeoMechDataModel/RigGeoMechCaseData.cpp +++ b/ApplicationCode/GeoMech/GeoMechDataModel/RigGeoMechCaseData.cpp @@ -38,8 +38,9 @@ /// //-------------------------------------------------------------------------------------------------- RigGeoMechCaseData::RigGeoMechCaseData(const std::string& fileName) + : m_geoMechCaseFileName(fileName) { - m_geoMechCaseFileName = fileName; + } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/RigGeoMechCaseData.h b/ApplicationCode/GeoMech/GeoMechDataModel/RigGeoMechCaseData.h index dec8eaf7ac..52f23a37ff 100644 --- a/ApplicationCode/GeoMech/GeoMechDataModel/RigGeoMechCaseData.h +++ b/ApplicationCode/GeoMech/GeoMechDataModel/RigGeoMechCaseData.h @@ -35,7 +35,7 @@ class RigFemPartResultsCollection; class RigGeoMechCaseData: public cvf::Object { public: - RigGeoMechCaseData(const std::string& fileName); + explicit RigGeoMechCaseData(const std::string& fileName); ~RigGeoMechCaseData(); bool openAndReadFemParts(std::string* errorMessage); diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/RimGeoMechGeometrySelectionItem.cpp b/ApplicationCode/GeoMech/GeoMechDataModel/RimGeoMechGeometrySelectionItem.cpp new file mode 100644 index 0000000000..2ba10104ad --- /dev/null +++ b/ApplicationCode/GeoMech/GeoMechDataModel/RimGeoMechGeometrySelectionItem.cpp @@ -0,0 +1,108 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimGeoMechGeometrySelectionItem.h" + +#include "RimGeoMechCase.h" +#include "RimGeoMechView.h" + + +#include "RiuSelectionManager.h" + + +CAF_PDM_SOURCE_INIT(RimGeoMechGeometrySelectionItem, "GeoMechGeometrySelectionItem"); + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimGeoMechGeometrySelectionItem::RimGeoMechGeometrySelectionItem() +{ + CAF_PDM_InitObject("GeoMech Topology Item", "", "", ""); + + CAF_PDM_InitFieldNoDefault(&m_geoMechCase, "GeoMechCase", "Geo Mech Case", "", "", ""); + + CAF_PDM_InitFieldNoDefault(&m_gridIndex, "m_gridIndex", "GridIndex", "", "", ""); + CAF_PDM_InitFieldNoDefault(&m_cellIndex, "m_cellIndex", "CellIndex", "", "", ""); + CAF_PDM_InitFieldNoDefault(&m_elementFace, "m_elementFace", "ElementFace", "", "", ""); + CAF_PDM_InitFieldNoDefault(&m_hasIntersectionTriangle, "m_hasIntersectionTriangle", "HasIntersectionTriangle", "", "", ""); + CAF_PDM_InitFieldNoDefault(&m_intersectionTriangle_0, "m_intersectionTriangle_0", "IntersectionTriangle_0", "", "", ""); + CAF_PDM_InitFieldNoDefault(&m_intersectionTriangle_1, "m_intersectionTriangle_1", "IntersectionTriangle_1", "", "", ""); + CAF_PDM_InitFieldNoDefault(&m_intersectionTriangle_2, "m_intersectionTriangle_2", "IntersectionTriangle_2", "", "", ""); + CAF_PDM_InitFieldNoDefault(&m_localIntersectionPoint, "m_localIntersectionPoint", "LocalIntersectionPoint", "", "", ""); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimGeoMechGeometrySelectionItem::~RimGeoMechGeometrySelectionItem() +{ +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimGeoMechGeometrySelectionItem::setFromSelectionItem(const RiuGeoMechSelectionItem* selectionItem) +{ + m_geoMechCase = selectionItem->m_view->geoMechCase(); + + m_gridIndex = selectionItem->m_gridIndex; + m_cellIndex = selectionItem->m_cellIndex; + m_elementFace = selectionItem->m_elementFace; + m_hasIntersectionTriangle = selectionItem->m_hasIntersectionTriangle; + m_intersectionTriangle_0 = cvf::Vec3d(selectionItem->m_intersectionTriangle[0]); + m_intersectionTriangle_1 = cvf::Vec3d(selectionItem->m_intersectionTriangle[1]); + m_intersectionTriangle_2 = cvf::Vec3d(selectionItem->m_intersectionTriangle[2]); + + m_localIntersectionPoint = selectionItem->m_localIntersectionPoint; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimGeoMechGeometrySelectionItem::geometrySelectionText() const +{ + QString text; + +/* + if (m_geoMechCase) + { + text += m_geoMechCase->caseUserDescription(); + } + else + { + text = "No case"; + } + + text += ", "; + text += QString("Grid index %1").arg(m_gridIndex); + text += ", "; + text += RigTimeHistoryResultAccessor::geometrySelectionText(m_geoMechCase->eclipseCaseData(), m_gridIndex, m_cellIndex); +*/ + + return text; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimGeoMechCase* RimGeoMechGeometrySelectionItem::geoMechCase() const +{ + return m_geoMechCase; +} + diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/RimGeoMechGeometrySelectionItem.h b/ApplicationCode/GeoMech/GeoMechDataModel/RimGeoMechGeometrySelectionItem.h new file mode 100644 index 0000000000..9144cb1cb8 --- /dev/null +++ b/ApplicationCode/GeoMech/GeoMechDataModel/RimGeoMechGeometrySelectionItem.h @@ -0,0 +1,61 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "RimGeometrySelectionItem.h" + +#include "cafPdmField.h" +#include "cafPdmFieldCvfVec3d.h" +#include "cafPdmPtrField.h" + +class RiuGeoMechSelectionItem; +class RimGeoMechCase; + +//================================================================================================== +/// +/// +//================================================================================================== +class RimGeoMechGeometrySelectionItem : public RimGeometrySelectionItem +{ + CAF_PDM_HEADER_INIT; +public: + RimGeoMechGeometrySelectionItem(); + virtual ~RimGeoMechGeometrySelectionItem() override; + + void setFromSelectionItem(const RiuGeoMechSelectionItem* selectionItem); + + virtual QString geometrySelectionText() const override; + RimGeoMechCase* geoMechCase() const; + +public: + caf::PdmField m_gridIndex; + caf::PdmField m_cellIndex; + caf::PdmField m_elementFace; + caf::PdmField m_hasIntersectionTriangle; + + caf::PdmField m_intersectionTriangle_0; + caf::PdmField m_intersectionTriangle_1; + caf::PdmField m_intersectionTriangle_2; + + caf::PdmField m_localIntersectionPoint; + +private: + caf::PdmPtrField m_geoMechCase; +}; + diff --git a/ApplicationCode/GeoMech/GeoMechVisualization/RivFemElmVisibilityCalculator.cpp b/ApplicationCode/GeoMech/GeoMechVisualization/RivFemElmVisibilityCalculator.cpp index 07ea185e33..e6dfb37fcf 100644 --- a/ApplicationCode/GeoMech/GeoMechVisualization/RivFemElmVisibilityCalculator.cpp +++ b/ApplicationCode/GeoMech/GeoMechVisualization/RivFemElmVisibilityCalculator.cpp @@ -216,10 +216,6 @@ void RivFemElmVisibilityCalculator::computePropertyVisibility(cvf::UByteArray* c { if((*cellVisibility)[cellIndex]) { - RigElementType eType = grid->elementType(cellIndex); - int elmNodeCount = RigFemTypes::elmentNodeCount(eType); - - const int* elmNodeIndices = grid->connectivities(cellIndex); for(int fpIdx = 0; fpIdx < 24; ++fpIdx) { double scalarValue = resVals[cellIndex*24 + fpIdx]; diff --git a/ApplicationCode/GeoMech/GeoMechVisualization/RivFemPartGeometryGenerator.h b/ApplicationCode/GeoMech/GeoMechVisualization/RivFemPartGeometryGenerator.h index 8f51fccef5..5a3fa7a48a 100644 --- a/ApplicationCode/GeoMech/GeoMechVisualization/RivFemPartGeometryGenerator.h +++ b/ApplicationCode/GeoMech/GeoMechVisualization/RivFemPartGeometryGenerator.h @@ -43,7 +43,7 @@ class RivFemPartTriangleToElmMapper : public cvf::Object class RivFemPartGeometryGenerator : public cvf::Object { public: - RivFemPartGeometryGenerator(const RigFemPart* part); + explicit RivFemPartGeometryGenerator(const RigFemPart* part); ~RivFemPartGeometryGenerator(); // Setup methods diff --git a/ApplicationCode/GeoMech/GeoMechVisualization/RivFemPartPartMgr.cpp b/ApplicationCode/GeoMech/GeoMechVisualization/RivFemPartPartMgr.cpp index d160f97dcd..ac119ce1c7 100644 --- a/ApplicationCode/GeoMech/GeoMechVisualization/RivFemPartPartMgr.cpp +++ b/ApplicationCode/GeoMech/GeoMechVisualization/RivFemPartPartMgr.cpp @@ -36,6 +36,7 @@ #include "RimLegendConfig.h" #include "RivFemPickSourceInfo.h" +#include "RivPartPriority.h" #include "RivResultToTextureMapper.h" #include "RivScalarMapperUtils.h" #include "RivSourceInfo.h" @@ -55,9 +56,11 @@ #include "cvfShaderSourceProvider.h" #include "cvfShaderSourceRepository.h" #include "cvfStructGrid.h" +#include "cvfTransform.h" #include "cvfUniform.h" + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -159,8 +162,7 @@ void RivFemPartPartMgr::generatePartGeometry(RivFemPartGeometryGenerator& geoBui caf::MeshEffectGenerator effGen(prefs->defaultGridLineColors()); eff = effGen.generateCachedEffect(); - // Set priority to make sure fault lines are rendered first - part->setPriority(10); + part->setPriority(RivPartPriority::PartType::MeshLines); part->setEnableMask(meshSurfaceBit); part->setEffect(eff.p()); @@ -196,7 +198,7 @@ void RivFemPartPartMgr::updateCellColor(cvf::Color4f color) if (color.a() < 1.0f) { // Set priority to make sure this transparent geometry are rendered last - if (m_surfaceFaces.notNull()) m_surfaceFaces->setPriority(100); + if (m_surfaceFaces.notNull()) m_surfaceFaces->setPriority(RivPartPriority::PartType::Transparent); } m_opacityLevel = color.a(); diff --git a/ApplicationCode/GeoMech/GeoMechVisualization/RivFemPartPartMgr.h b/ApplicationCode/GeoMech/GeoMechVisualization/RivFemPartPartMgr.h index a1eb4d1d25..bdb1a7ad22 100644 --- a/ApplicationCode/GeoMech/GeoMechVisualization/RivFemPartPartMgr.h +++ b/ApplicationCode/GeoMech/GeoMechVisualization/RivFemPartPartMgr.h @@ -47,7 +47,7 @@ class RigFemPart; class RivFemPartPartMgr: public cvf::Object { public: - RivFemPartPartMgr(const RigFemPart* femPart); + explicit RivFemPartPartMgr(const RigFemPart* femPart); ~RivFemPartPartMgr(); void setTransform(cvf::Transform* scaleTransform); void setCellVisibility(cvf::UByteArray* cellVisibilities ); diff --git a/ApplicationCode/GeoMech/GeoMechVisualization/RivGeoMechVizLogic.h b/ApplicationCode/GeoMech/GeoMechVisualization/RivGeoMechVizLogic.h index 5c64c3f15a..2d0dde9af8 100644 --- a/ApplicationCode/GeoMech/GeoMechVisualization/RivGeoMechVizLogic.h +++ b/ApplicationCode/GeoMech/GeoMechVisualization/RivGeoMechVizLogic.h @@ -40,7 +40,7 @@ class RivGeoMechVizLogic : public cvf::Object { public: - RivGeoMechVizLogic(RimGeoMechView * geomView); + explicit RivGeoMechVizLogic(RimGeoMechView * geomView); virtual ~RivGeoMechVizLogic(); void appendNoAnimPartsToModel(cvf::ModelBasicList* model); diff --git a/ApplicationCode/GeoMech/OdbReader/RifOdbReader.cpp b/ApplicationCode/GeoMech/OdbReader/RifOdbReader.cpp index e7ddabb22a..59a1339df4 100644 --- a/ApplicationCode/GeoMech/OdbReader/RifOdbReader.cpp +++ b/ApplicationCode/GeoMech/OdbReader/RifOdbReader.cpp @@ -52,7 +52,7 @@ class RifOdbBulkDataGetter { public: - RifOdbBulkDataGetter(const odb_FieldBulkData& bulkData) : m_bulkData(bulkData) {}; + explicit RifOdbBulkDataGetter(const odb_FieldBulkData& bulkData) : m_bulkData(bulkData) {}; virtual ~RifOdbBulkDataGetter() {}; float* data() @@ -329,8 +329,6 @@ bool RifOdbReader::readFemParts(RigFemPartCollection* femParts) CVF_ASSERT(femParts); CVF_ASSERT(m_odb != NULL); - - odb_Assembly& rootAssembly = m_odb->rootAssembly(); odb_InstanceRepository instanceRepository = m_odb->rootAssembly().instances(); odb_InstanceRepositoryIT iter(instanceRepository); @@ -378,7 +376,7 @@ bool RifOdbReader::readFemParts(RigFemPartCollection* femParts) int elmCount = elements.size(); femPart->preAllocateElementStorage(elmCount); - std::map::const_iterator it; + std::vector indexBasedConnectivities; m_elementIdToIdxMaps.push_back(std::map()); @@ -589,7 +587,6 @@ odb_Instance* RifOdbReader::instance(int instanceIndex) { CVF_ASSERT(m_odb != NULL); - odb_Assembly& rootAssembly = m_odb->rootAssembly(); odb_InstanceRepository& instanceRepository = m_odb->rootAssembly().instances(); odb_InstanceRepositoryIT iter(instanceRepository); @@ -696,7 +693,7 @@ std::map > RifOdbReader::fieldAndComponent std::map > fieldsAndComponents; std::map< RifOdbResultKey, std::vector >::const_iterator resMapIt; - for (resMapIt = m_resultsMetaData.begin(); resMapIt != m_resultsMetaData.end(); resMapIt++) + for (resMapIt = m_resultsMetaData.begin(); resMapIt != m_resultsMetaData.end(); ++resMapIt) { if (resMapIt->first.resultPostion == position) { @@ -784,7 +781,6 @@ void RifOdbReader::readNodeField(const std::string& fieldName, int partIndex, in const odb_FieldOutput& fieldOutput = instanceFieldOutput.getSubset(odb_Enum::NODAL); const odb_SequenceFieldBulkData& seqFieldBulkData = fieldOutput.bulkDataBlocks(); - size_t dataIndex = 0; int numBlocks = seqFieldBulkData.size(); for (int block = 0; block < numBlocks; block++) { @@ -842,7 +838,6 @@ void RifOdbReader::readElementNodeField(const std::string& fieldName, std::map& elementIdToIdxMap = m_elementIdToIdxMaps[partIndex]; CVF_ASSERT(elementIdToIdxMap.size() > 0); - size_t dataIndex = 0; int numBlocks = seqFieldBulkData.size(); for (int block = 0; block < numBlocks; block++) { @@ -909,7 +904,6 @@ void RifOdbReader::readIntegrationPointField(const std::string& fieldName, int p std::map& elementIdToIdxMap = m_elementIdToIdxMaps[partIndex]; CVF_ASSERT(elementIdToIdxMap.size() > 0); - size_t dataIndex = 0; int numBlocks = seqFieldBulkData.size(); for (int block = 0; block < numBlocks; block++) { diff --git a/ApplicationCode/ModelVisualization/CMakeLists_files.cmake b/ApplicationCode/ModelVisualization/CMakeLists_files.cmake index 359b11b952..53a89564b0 100644 --- a/ApplicationCode/ModelVisualization/CMakeLists_files.cmake +++ b/ApplicationCode/ModelVisualization/CMakeLists_files.cmake @@ -6,7 +6,6 @@ endif() set (SOURCE_GROUP_HEADER_FILES ${CEE_CURRENT_LIST_DIR}RivCellEdgeEffectGenerator.h -${CEE_CURRENT_LIST_DIR}RivColorTableArray.h ${CEE_CURRENT_LIST_DIR}RivFaultPartMgr.h ${CEE_CURRENT_LIST_DIR}RivFaultGeometryGenerator.h ${CEE_CURRENT_LIST_DIR}RivNNCGeometryGenerator.h @@ -16,12 +15,12 @@ ${CEE_CURRENT_LIST_DIR}RivReservoirPartMgr.h ${CEE_CURRENT_LIST_DIR}RivReservoirViewPartMgr.h ${CEE_CURRENT_LIST_DIR}RivPipeGeometryGenerator.h ${CEE_CURRENT_LIST_DIR}RivReservoirFaultsPartMgr.h -${CEE_CURRENT_LIST_DIR}RivReservoirPipesPartMgr.h +${CEE_CURRENT_LIST_DIR}RivReservoirSimWellsPartMgr.h ${CEE_CURRENT_LIST_DIR}RivSourceInfo.h ${CEE_CURRENT_LIST_DIR}RivWellPathSourceInfo.h ${CEE_CURRENT_LIST_DIR}RivWellPathPartMgr.h ${CEE_CURRENT_LIST_DIR}RivWellPathCollectionPartMgr.h -${CEE_CURRENT_LIST_DIR}RivWellPipesPartMgr.h +${CEE_CURRENT_LIST_DIR}RivSimWellPipesPartMgr.h ${CEE_CURRENT_LIST_DIR}RivWellHeadPartMgr.h ${CEE_CURRENT_LIST_DIR}RivResultToTextureMapper.h ${CEE_CURRENT_LIST_DIR}RivTernaryResultToTextureMapper.h @@ -33,12 +32,15 @@ ${CEE_CURRENT_LIST_DIR}RivScalarMapperUtils.h ${CEE_CURRENT_LIST_DIR}RivCellEdgeGeometryUtils.h ${CEE_CURRENT_LIST_DIR}RivPipeQuadToSegmentMapper.h ${CEE_CURRENT_LIST_DIR}RivSingleCellPartGenerator.h -${CEE_CURRENT_LIST_DIR}RivWellPipeSourceInfo.h +${CEE_CURRENT_LIST_DIR}RivSimWellPipeSourceInfo.h +${CEE_CURRENT_LIST_DIR}RivWellSpheresPartMgr.h +${CEE_CURRENT_LIST_DIR}RivPartPriority.h +${CEE_CURRENT_LIST_DIR}RivWellConnectionsPartMgr.h + ) set (SOURCE_GROUP_SOURCE_FILES ${CEE_CURRENT_LIST_DIR}RivCellEdgeEffectGenerator.cpp -${CEE_CURRENT_LIST_DIR}RivColorTableArray.cpp ${CEE_CURRENT_LIST_DIR}RivFaultPartMgr.cpp ${CEE_CURRENT_LIST_DIR}RivNNCGeometryGenerator.cpp ${CEE_CURRENT_LIST_DIR}RivFaultGeometryGenerator.cpp @@ -48,12 +50,12 @@ ${CEE_CURRENT_LIST_DIR}RivReservoirFaultsPartMgr.cpp ${CEE_CURRENT_LIST_DIR}RivReservoirPartMgr.cpp ${CEE_CURRENT_LIST_DIR}RivReservoirViewPartMgr.cpp ${CEE_CURRENT_LIST_DIR}RivPipeGeometryGenerator.cpp -${CEE_CURRENT_LIST_DIR}RivReservoirPipesPartMgr.cpp +${CEE_CURRENT_LIST_DIR}RivReservoirSimWellsPartMgr.cpp ${CEE_CURRENT_LIST_DIR}RivSourceInfo.cpp ${CEE_CURRENT_LIST_DIR}RivWellPathSourceInfo.cpp ${CEE_CURRENT_LIST_DIR}RivWellPathPartMgr.cpp ${CEE_CURRENT_LIST_DIR}RivWellPathCollectionPartMgr.cpp -${CEE_CURRENT_LIST_DIR}RivWellPipesPartMgr.cpp +${CEE_CURRENT_LIST_DIR}RivSimWellPipesPartMgr.cpp ${CEE_CURRENT_LIST_DIR}RivWellHeadPartMgr.cpp ${CEE_CURRENT_LIST_DIR}RivTextureCoordsCreator.cpp ${CEE_CURRENT_LIST_DIR}RivTernaryScalarMapper.cpp @@ -63,7 +65,9 @@ ${CEE_CURRENT_LIST_DIR}RivScalarMapperUtils.cpp ${CEE_CURRENT_LIST_DIR}RivCellEdgeGeometryUtils.cpp ${CEE_CURRENT_LIST_DIR}RivPipeQuadToSegmentMapper.cpp ${CEE_CURRENT_LIST_DIR}RivSingleCellPartGenerator.cpp -${CEE_CURRENT_LIST_DIR}RivWellPipeSourceInfo.cpp +${CEE_CURRENT_LIST_DIR}RivSimWellPipeSourceInfo.cpp +${CEE_CURRENT_LIST_DIR}RivWellSpheresPartMgr.cpp +${CEE_CURRENT_LIST_DIR}RivWellConnectionsPartMgr.cpp ) list(APPEND CODE_HEADER_FILES diff --git a/ApplicationCode/ModelVisualization/GridBox/RivGridBoxGenerator.cpp b/ApplicationCode/ModelVisualization/GridBox/RivGridBoxGenerator.cpp index 00b58c061c..9fe3defa9e 100644 --- a/ApplicationCode/ModelVisualization/GridBox/RivGridBoxGenerator.cpp +++ b/ApplicationCode/ModelVisualization/GridBox/RivGridBoxGenerator.cpp @@ -22,6 +22,7 @@ #include "RiaApplication.h" +#include "RivPartPriority.h" #include "RivPatchGenerator.h" #include "cafEffectGenerator.h" @@ -620,7 +621,7 @@ void RivGridBoxGenerator::createLegend(EdgeType edge, cvf::Collection depth->enableDepthTest(false); eff->setRenderState(depth.p()); - part->setPriority(1500); + part->setPriority(RivPartPriority::PartType::Text); part->setEffect(eff.p()); parts->push_back(part.p()); diff --git a/ApplicationCode/ModelVisualization/Intersections/RivHexGridIntersectionTools.h b/ApplicationCode/ModelVisualization/Intersections/RivHexGridIntersectionTools.h index 9ee1ec9388..0cc00291d5 100644 --- a/ApplicationCode/ModelVisualization/Intersections/RivHexGridIntersectionTools.h +++ b/ApplicationCode/ModelVisualization/Intersections/RivHexGridIntersectionTools.h @@ -71,7 +71,7 @@ class RivEclipseIntersectionGrid : public RivIntersectionHexGridInterface class RivFemIntersectionGrid : public RivIntersectionHexGridInterface { public: - RivFemIntersectionGrid(const RigFemPart * femPart); + explicit RivFemIntersectionGrid(const RigFemPart * femPart); virtual cvf::Vec3d displayOffset() const; virtual cvf::BoundingBox boundingBox() const; diff --git a/ApplicationCode/ModelVisualization/Intersections/RivIntersectionBoxPartMgr.cpp b/ApplicationCode/ModelVisualization/Intersections/RivIntersectionBoxPartMgr.cpp index d5d8ca1755..6beb7374a5 100644 --- a/ApplicationCode/ModelVisualization/Intersections/RivIntersectionBoxPartMgr.cpp +++ b/ApplicationCode/ModelVisualization/Intersections/RivIntersectionBoxPartMgr.cpp @@ -19,7 +19,6 @@ #include "RivIntersectionBoxPartMgr.h" #include "RigCaseCellResultsData.h" -#include "RigCaseData.h" #include "RigFemPartCollection.h" #include "RigFemPartResultsCollection.h" #include "RigGeoMechCaseData.h" @@ -37,6 +36,8 @@ #include "RimTernaryLegendConfig.h" #include "RivIntersectionBoxSourceInfo.h" +#include "RivIntersectionPartMgr.h" +#include "RivPartPriority.h" #include "RivResultToTextureMapper.h" #include "RivScalarMapperUtils.h" #include "RivTernaryScalarMapper.h" @@ -49,7 +50,7 @@ #include "cvfRenderState_FF.h" #include "cvfRenderStateDepth.h" #include "cvfRenderStatePoint.h" -#include "RivIntersectionPartMgr.h" +#include "cvfStructGridGeometryGenerator.h" @@ -94,7 +95,7 @@ void RivIntersectionBoxPartMgr::updateCellResultColor(size_t timeStepIndex) CVF_ASSERT(cellResultColors); RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel()); - RigCaseData* eclipseCase = eclipseView->eclipseCase()->reservoirData(); + RigEclipseCaseData* eclipseCase = eclipseView->eclipseCase()->eclipseCaseData(); // CrossSections if (m_intersectionBoxFaces.notNull()) @@ -126,10 +127,10 @@ void RivIntersectionBoxPartMgr::updateCellResultColor(size_t timeStepIndex) } else { - resultAccessor = RigResultAccessorFactory::createResultAccessor(cellResultColors->reservoirView()->eclipseCase()->reservoirData(), - 0, - timeStepIndex, - cellResultColors); + resultAccessor = RigResultAccessorFactory::createFromResultDefinition(cellResultColors->reservoirView()->eclipseCase()->eclipseCaseData(), + 0, + timeStepIndex, + cellResultColors); } RivIntersectionPartMgr::calculateEclipseTextureCoordinates(m_intersectionBoxFacesTextureCoords.p(), @@ -213,10 +214,6 @@ void RivIntersectionBoxPartMgr::updateCellResultColor(size_t timeStepIndex) } -const int priCrossSectionGeo = 1; -const int priNncGeo = 2; -const int priMesh = 3; - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -246,7 +243,7 @@ void RivIntersectionBoxPartMgr::generatePartGeometry() part->updateBoundingBox(); part->setEnableMask(faultBit); - part->setPriority(priCrossSectionGeo); + part->setPriority(RivPartPriority::PartType::Intersection); m_intersectionBoxFaces = part; } @@ -268,7 +265,7 @@ void RivIntersectionBoxPartMgr::generatePartGeometry() part->updateBoundingBox(); part->setEnableMask(meshFaultBit); - part->setPriority(priMesh); + part->setPriority(RivPartPriority::PartType::MeshLines); m_intersectionBoxGridLines = part; } @@ -352,8 +349,7 @@ cvf::ref RivIntersectionBoxPartMgr::createHexGr m_rimIntersectionBox->firstAncestorOrThisOfType(eclipseView); if (eclipseView) { - RigMainGrid* grid = NULL; - grid = eclipseView->eclipseCase()->reservoirData()->mainGrid(); + RigMainGrid* grid = eclipseView->mainGrid(); return new RivEclipseIntersectionGrid(grid, eclipseView->currentActiveCellInfo(), m_rimIntersectionBox->showInactiveCells()); } diff --git a/ApplicationCode/ModelVisualization/Intersections/RivIntersectionBoxPartMgr.h b/ApplicationCode/ModelVisualization/Intersections/RivIntersectionBoxPartMgr.h index 1b8f0ebc63..e5afcbc5b8 100644 --- a/ApplicationCode/ModelVisualization/Intersections/RivIntersectionBoxPartMgr.h +++ b/ApplicationCode/ModelVisualization/Intersections/RivIntersectionBoxPartMgr.h @@ -45,7 +45,7 @@ class RimIntersectionBox; class RivIntersectionBoxPartMgr : public cvf::Object { public: - RivIntersectionBoxPartMgr(const RimIntersectionBox* intersectionBox); + explicit RivIntersectionBoxPartMgr(const RimIntersectionBox* intersectionBox); void applySingleColorEffect(); void updateCellResultColor(size_t timeStepIndex); diff --git a/ApplicationCode/ModelVisualization/Intersections/RivIntersectionBoxSourceInfo.h b/ApplicationCode/ModelVisualization/Intersections/RivIntersectionBoxSourceInfo.h index b8a9901dda..078c102cf0 100644 --- a/ApplicationCode/ModelVisualization/Intersections/RivIntersectionBoxSourceInfo.h +++ b/ApplicationCode/ModelVisualization/Intersections/RivIntersectionBoxSourceInfo.h @@ -29,7 +29,7 @@ class RimIntersectionBox; class RivIntersectionBoxSourceInfo : public cvf::Object { public: - RivIntersectionBoxSourceInfo(RivIntersectionBoxGeometryGenerator* geometryGenerator); + explicit RivIntersectionBoxSourceInfo(RivIntersectionBoxGeometryGenerator* geometryGenerator); const std::vector& triangleToCellIndex() const; diff --git a/ApplicationCode/ModelVisualization/Intersections/RivIntersectionGeometryGenerator.cpp b/ApplicationCode/ModelVisualization/Intersections/RivIntersectionGeometryGenerator.cpp index 2b1cb70431..c950c7f8bb 100644 --- a/ApplicationCode/ModelVisualization/Intersections/RivIntersectionGeometryGenerator.cpp +++ b/ApplicationCode/ModelVisualization/Intersections/RivIntersectionGeometryGenerator.cpp @@ -24,13 +24,16 @@ #include "RimIntersection.h" +#include "RivHexGridIntersectionTools.h" + #include "cafHexGridIntersectionTools/cafHexGridIntersectionTools.h" #include "cvfDrawableGeo.h" +#include "cvfGeometryTools.h" +#include "cvfPlane.h" #include "cvfPrimitiveSetDirect.h" #include "cvfPrimitiveSetIndexedUInt.h" #include "cvfScalarMapper.h" -#include "cvfGeometryTools.h" //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ModelVisualization/Intersections/RivIntersectionGeometryGenerator.h b/ApplicationCode/ModelVisualization/Intersections/RivIntersectionGeometryGenerator.h index dcc4db9104..284c822928 100644 --- a/ApplicationCode/ModelVisualization/Intersections/RivIntersectionGeometryGenerator.h +++ b/ApplicationCode/ModelVisualization/Intersections/RivIntersectionGeometryGenerator.h @@ -19,8 +19,6 @@ #pragma once -#include "RivHexGridIntersectionTools.h" - #include "cafPdmPointer.h" #include "cvfArray.h" @@ -35,6 +33,8 @@ class RigMainGrid; class RigActiveCellInfo; class RigResultAccessor; class RimIntersection; +class RivIntersectionHexGridInterface; +class RivIntersectionVertexWeights; namespace cvf { diff --git a/ApplicationCode/ModelVisualization/Intersections/RivIntersectionPartMgr.cpp b/ApplicationCode/ModelVisualization/Intersections/RivIntersectionPartMgr.cpp index 64bf8d9f53..0350ae0d2c 100644 --- a/ApplicationCode/ModelVisualization/Intersections/RivIntersectionPartMgr.cpp +++ b/ApplicationCode/ModelVisualization/Intersections/RivIntersectionPartMgr.cpp @@ -20,7 +20,6 @@ #include "RivIntersectionPartMgr.h" #include "RigCaseCellResultsData.h" -#include "RigCaseData.h" #include "RigFemPartCollection.h" #include "RigFemPartResultsCollection.h" #include "RigGeoMechCaseData.h" @@ -37,22 +36,28 @@ #include "RimLegendConfig.h" #include "RimTernaryLegendConfig.h" +#include "RivHexGridIntersectionTools.h" +#include "RivIntersectionGeometryGenerator.h" #include "RivIntersectionSourceInfo.h" +#include "RivPartPriority.h" #include "RivResultToTextureMapper.h" #include "RivScalarMapperUtils.h" #include "RivTernaryScalarMapper.h" #include "RivTernaryTextureCoordsCreator.h" +#include "RiuGeoMechXfTensorResultAccessor.h" + +#include "cafTensor3.h" + #include "cvfDrawableGeo.h" +#include "cvfGeometryTools.h" #include "cvfModelBasicList.h" #include "cvfPart.h" #include "cvfPrimitiveSetDirect.h" #include "cvfRenderState_FF.h" #include "cvfRenderStateDepth.h" #include "cvfRenderStatePoint.h" -#include "cafTensor3.h" -#include "cvfGeometryTools.h" -#include "RiuGeoMechXfTensorResultAccessor.h" +#include "cvfStructGridGeometryGenerator.h" //-------------------------------------------------------------------------------------------------- @@ -98,7 +103,7 @@ void RivIntersectionPartMgr::updateCellResultColor(size_t timeStepIndex) CVF_ASSERT(cellResultColors); RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel()); - RigCaseData* eclipseCase = eclipseView->eclipseCase()->reservoirData(); + RigEclipseCaseData* eclipseCase = eclipseView->eclipseCase()->eclipseCaseData(); // CrossSections if (m_crossSectionFaces.notNull()) @@ -130,10 +135,10 @@ void RivIntersectionPartMgr::updateCellResultColor(size_t timeStepIndex) } else { - resultAccessor = RigResultAccessorFactory::createResultAccessor(cellResultColors->reservoirView()->eclipseCase()->reservoirData(), - 0, - timeStepIndex, - cellResultColors); + resultAccessor = RigResultAccessorFactory::createFromResultDefinition(cellResultColors->reservoirView()->eclipseCase()->eclipseCaseData(), + 0, + timeStepIndex, + cellResultColors); } RivIntersectionPartMgr::calculateEclipseTextureCoordinates(m_crossSectionFacesTextureCoords.p(), @@ -378,10 +383,6 @@ void RivIntersectionPartMgr::calculateEclipseTextureCoordinates(cvf::Vec2fArray* } } -const int priCrossSectionGeo = 1; -const int priNncGeo = 2; -const int priMesh = 3; - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -412,7 +413,7 @@ void RivIntersectionPartMgr::generatePartGeometry() part->updateBoundingBox(); part->setEnableMask(faultBit); - part->setPriority(priCrossSectionGeo); + part->setPriority(RivPartPriority::PartType::Intersection); m_crossSectionFaces = part; } @@ -434,7 +435,7 @@ void RivIntersectionPartMgr::generatePartGeometry() part->updateBoundingBox(); part->setEnableMask(meshFaultBit); - part->setPriority(priMesh); + part->setPriority(RivPartPriority::PartType::MeshLines); m_crossSectionGridLines = part; } @@ -474,7 +475,7 @@ void RivIntersectionPartMgr::createPolyLineParts(bool useBufferObjects) part->setDrawable(polylineGeo.p()); part->updateBoundingBox(); - part->setPriority(10000); + part->setPriority(RivPartPriority::PartType::Highlight); // Always show this part, also when mesh is turned off //part->setEnableMask(meshFaultBit); @@ -506,7 +507,7 @@ void RivIntersectionPartMgr::createPolyLineParts(bool useBufferObjects) part->setDrawable(polylinePointsGeo.p()); part->updateBoundingBox(); - part->setPriority(10000); + part->setPriority(RivPartPriority::PartType::Highlight); // Always show this part, also when mesh is turned off //part->setEnableMask(meshFaultBit); @@ -554,7 +555,7 @@ void RivIntersectionPartMgr::createExtrusionDirParts(bool useBufferObjects) part->setDrawable(polylineGeo.p()); part->updateBoundingBox(); - part->setPriority(10000); + part->setPriority(RivPartPriority::PartType::Highlight); // Always show this part, also when mesh is turned off //part->setEnableMask(meshFaultBit); @@ -586,7 +587,7 @@ void RivIntersectionPartMgr::createExtrusionDirParts(bool useBufferObjects) part->setDrawable(polylinePointsGeo.p()); part->updateBoundingBox(); - part->setPriority(10000); + part->setPriority(RivPartPriority::PartType::Highlight); // Always show this part, also when mesh is turned off //part->setEnableMask(meshFaultBit); @@ -736,8 +737,7 @@ cvf::ref RivIntersectionPartMgr::createHexGridI m_rimCrossSection->firstAncestorOrThisOfType(eclipseView); if (eclipseView) { - RigMainGrid* grid = NULL; - grid = eclipseView->eclipseCase()->reservoirData()->mainGrid(); + RigMainGrid* grid = eclipseView->mainGrid(); return new RivEclipseIntersectionGrid(grid, eclipseView->currentActiveCellInfo(), m_rimCrossSection->showInactiveCells()); } diff --git a/ApplicationCode/ModelVisualization/Intersections/RivIntersectionPartMgr.h b/ApplicationCode/ModelVisualization/Intersections/RivIntersectionPartMgr.h index 761ce01631..76b75c1034 100644 --- a/ApplicationCode/ModelVisualization/Intersections/RivIntersectionPartMgr.h +++ b/ApplicationCode/ModelVisualization/Intersections/RivIntersectionPartMgr.h @@ -19,12 +19,11 @@ #pragma once -#include "RivIntersectionGeometryGenerator.h" - #include "cvfBase.h" #include "cvfObject.h" #include "cvfColor4.h" #include "cvfVector3.h" +#include "cvfArray.h" namespace cvf @@ -32,14 +31,21 @@ namespace cvf class ModelBasicList; class Transform; class Part; + class ScalarMapper; } +class RigFemPart; +class RigFemResultAddress; +class RigGeoMechCaseData; class RigMainGrid; -class RimEclipseCellColors; +class RigResultAccessor; class RimCellEdgeColors; +class RimEclipseCellColors; class RimIntersection; -class RigGeoMechCaseData; -class RigFemResultAddress; +class RivIntersectionGeometryGenerator; +class RivIntersectionHexGridInterface; +class RivIntersectionVertexWeights; + //================================================================================================== /// @@ -49,7 +55,7 @@ class RigFemResultAddress; class RivIntersectionPartMgr : public cvf::Object { public: - RivIntersectionPartMgr(const RimIntersection* rimCrossSection); + explicit RivIntersectionPartMgr(const RimIntersection* rimCrossSection); void applySingleColorEffect(); void updateCellResultColor(size_t timeStepIndex); diff --git a/ApplicationCode/ModelVisualization/Intersections/RivIntersectionSourceInfo.h b/ApplicationCode/ModelVisualization/Intersections/RivIntersectionSourceInfo.h index 436a0a6c75..7cd3b94fc4 100644 --- a/ApplicationCode/ModelVisualization/Intersections/RivIntersectionSourceInfo.h +++ b/ApplicationCode/ModelVisualization/Intersections/RivIntersectionSourceInfo.h @@ -30,7 +30,7 @@ class RimIntersection; class RivIntersectionSourceInfo : public cvf::Object { public: - RivIntersectionSourceInfo(RivIntersectionGeometryGenerator* geometryGenerator); + explicit RivIntersectionSourceInfo(RivIntersectionGeometryGenerator* geometryGenerator); const std::vector& triangleToCellIndex() const; std::array triangle(int triangleIdx) const; diff --git a/ApplicationCode/ModelVisualization/RivCellEdgeEffectGenerator.h b/ApplicationCode/ModelVisualization/RivCellEdgeEffectGenerator.h index 3619ee63f9..80f5c9da24 100644 --- a/ApplicationCode/ModelVisualization/RivCellEdgeEffectGenerator.h +++ b/ApplicationCode/ModelVisualization/RivCellEdgeEffectGenerator.h @@ -101,7 +101,7 @@ class RivTernaryScalarMapper; class CellEdgeEffectGenerator : public caf::EffectGenerator { public: - CellEdgeEffectGenerator(const cvf::ScalarMapper* edgeScalarMapper); + explicit CellEdgeEffectGenerator(const cvf::ScalarMapper* edgeScalarMapper); void setScalarMapper(const cvf::ScalarMapper* cellScalarMapper); void setTernaryScalarMapper(const RivTernaryScalarMapper* ternaryScalarMapper); diff --git a/ApplicationCode/ModelVisualization/RivCellEdgeGeometryUtils.cpp b/ApplicationCode/ModelVisualization/RivCellEdgeGeometryUtils.cpp index 55008114cd..a60f84bd71 100644 --- a/ApplicationCode/ModelVisualization/RivCellEdgeGeometryUtils.cpp +++ b/ApplicationCode/ModelVisualization/RivCellEdgeGeometryUtils.cpp @@ -21,7 +21,7 @@ #include "RivCellEdgeGeometryUtils.h" #include "RigCaseCellResultsData.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" #include "RigCellEdgeResultAccessor.h" #include "RigGridBase.h" #include "RigResultAccessor.h" @@ -55,7 +55,7 @@ void RivCellEdgeGeometryUtils::addCellEdgeResultsToDrawableGeo( bool useDefaultValueForHugeVals, float opacityLevel) { - RigCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData(); + RigEclipseCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->eclipseCaseData(); CVF_ASSERT(eclipseCase != NULL); // Create result access objects @@ -95,7 +95,7 @@ void RivCellEdgeGeometryUtils::addCellEdgeResultsToDrawableGeo( if (opacityLevel < 1.0f) { - isWellPipeVisible = &(cellResultColors->reservoirView()->wellCollection()->resultWellPipeVisibilities(timeStepIndex)); + isWellPipeVisible = &(cellResultColors->reservoirView()->wellCollection()->resultWellGeometryVisibilities(timeStepIndex)); gridCellToWellindexMap = eclipseCase->gridCellToResultWellIndex(gridIndex); } @@ -199,7 +199,7 @@ void RivCellEdgeGeometryUtils::addTernaryCellEdgeResultsToDrawableGeo(size_t tim const cvf::StructGridQuadToCellFaceMapper* quadToCellFaceMapper, cvf::DrawableGeo* geo, size_t gridIndex, float opacityLevel) { - RigCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData(); + RigEclipseCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->eclipseCaseData(); CVF_ASSERT(eclipseCase != NULL); cvf::ref cellEdgeResultAccessor = createCellEdgeResultAccessor(cellResultColors, cellEdgeResultColors, timeStepIndex, eclipseCase, eclipseCase->grid(gridIndex)); @@ -294,14 +294,26 @@ cvf::ref RivCellEdgeGeometryUtils::createCellEdgeResultAccess RimEclipseCellColors* cellResultColors, RimCellEdgeColors* cellEdgeResultColors, size_t timeStepIndex, - RigCaseData* eclipseCase, + RigEclipseCaseData* eclipseCase, const RigGridBase* grid) { cvf::ref cellEdgeResultAccessor = new RigCellEdgeResultAccessor(); + + RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel()); + + if (cellEdgeResultColors->propertyType() == RimCellEdgeColors::ANY_SINGLE_PROPERTY) + { + cvf::ref daObj = RivCellEdgeGeometryUtils::createCellCenterResultAccessor(cellEdgeResultColors->singleVarEdgeResultColors(), timeStepIndex, eclipseCase, grid); + + for (size_t cubeFaceIdx = 0; cubeFaceIdx < 6; cubeFaceIdx++) + { + cellEdgeResultAccessor->setDataAccessObjectForFace(static_cast(cubeFaceIdx), daObj.p()); + } + } + else { size_t resultIndices[6]; cellEdgeResultColors->gridScalarIndices(resultIndices); - RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel()); std::vector metaData; cellEdgeResultColors->cellEdgeMetaData(&metaData); @@ -315,7 +327,7 @@ cvf::ref RivCellEdgeGeometryUtils::createCellEdgeResultAccess adjustedTimeStep = 0; } - cvf::ref daObj = RigResultAccessorFactory::createResultAccessor(eclipseCase, grid->gridIndex(), porosityModel, adjustedTimeStep, resultIndices[cubeFaceIdx]); + cvf::ref daObj = RigResultAccessorFactory::createFromResultIdx(eclipseCase, grid->gridIndex(), porosityModel, adjustedTimeStep, resultIndices[cubeFaceIdx]); cellEdgeResultAccessor->setDataAccessObjectForFace(static_cast(cubeFaceIdx), daObj.p()); } } @@ -326,20 +338,13 @@ cvf::ref RivCellEdgeGeometryUtils::createCellEdgeResultAccess //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -cvf::ref RivCellEdgeGeometryUtils::createCellCenterResultAccessor(RimEclipseCellColors* cellResultColors, size_t timeStepIndex, RigCaseData* eclipseCase, const RigGridBase* grid) +cvf::ref RivCellEdgeGeometryUtils::createCellCenterResultAccessor(RimEclipseCellColors* cellResultColors, size_t timeStepIndex, RigEclipseCaseData* eclipseCase, const RigGridBase* grid) { cvf::ref resultAccessor = NULL; if (cellResultColors->hasResult()) { - if (!cellResultColors->hasDynamicResult()) - { - // Static result values are located at time step 0 - timeStepIndex = 0; - } - - RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel()); - resultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, grid->gridIndex(), porosityModel, timeStepIndex, cellResultColors->resultVariable()); + resultAccessor = RigResultAccessorFactory::createFromResultDefinition(eclipseCase, grid->gridIndex(), timeStepIndex, cellResultColors); } if (resultAccessor.isNull()) @@ -350,9 +355,3 @@ cvf::ref RivCellEdgeGeometryUtils::createCellCenterResultAcce return resultAccessor; } - - - - - - diff --git a/ApplicationCode/ModelVisualization/RivCellEdgeGeometryUtils.h b/ApplicationCode/ModelVisualization/RivCellEdgeGeometryUtils.h index 6dbdc7f7f7..4a8a313736 100644 --- a/ApplicationCode/ModelVisualization/RivCellEdgeGeometryUtils.h +++ b/ApplicationCode/ModelVisualization/RivCellEdgeGeometryUtils.h @@ -32,7 +32,7 @@ class RimCellEdgeColors; class RimEclipseCellColors; class RigGridBase; class RigResultAccessor; -class RigCaseData; +class RigEclipseCaseData; class RivCellEdgeGeometryUtils @@ -60,14 +60,14 @@ class RivCellEdgeGeometryUtils static cvf::ref createCellCenterResultAccessor( RimEclipseCellColors* cellResultColors, size_t timeStepIndex, - RigCaseData* eclipseCase, + RigEclipseCaseData* eclipseCase, const RigGridBase* grid); static cvf::ref createCellEdgeResultAccessor( RimEclipseCellColors* cellResultColors, RimCellEdgeColors* cellEdgeResultColors, size_t timeStepIndex, - RigCaseData* eclipseCase, + RigEclipseCaseData* eclipseCase, const RigGridBase* grid); static bool hideScalarValue(double scalarValue, double scalarValueToHide, double tolerance); diff --git a/ApplicationCode/ModelVisualization/RivColorTableArray.cpp b/ApplicationCode/ModelVisualization/RivColorTableArray.cpp deleted file mode 100644 index a3a6f60d28..0000000000 --- a/ApplicationCode/ModelVisualization/RivColorTableArray.cpp +++ /dev/null @@ -1,44 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) Statoil ASA -// Copyright (C) Ceetron Solutions 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#include "RivColorTableArray.h" - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -cvf::ref RivColorTableArray::colorTableArray() -{ - cvf::ref partColors = new cvf::Color3fArray(); - partColors->reserve(10); - - partColors->add(cvf::Color3f(101.0f/255, 132.0f/255, 96.0f/255)); // Dark green - partColors->add(cvf::Color3f(255.0f/255, 131.0f/255, 140.0f/255)); // Old pink - partColors->add(cvf::Color3f(210.0f/255, 176.0f/255, 112.0f/255)); // Light Brown - partColors->add(cvf::Color3f(140.0f/255, 171.0f/255, 238.0f/255)); // Light gray blue - partColors->add(cvf::Color3f(255.0f/255, 205.0f/255, 131.0f/255)); // Peach - partColors->add(cvf::Color3f(220.0f/255, 212.0f/255, 166.0f/255)); // Dark off white - partColors->add(cvf::Color3f(130.0f/255, 255.0f/255, 120.0f/255)); // Light green - partColors->add(cvf::Color3f(166.0f/255, 220.0f/255, 215.0f/255)); // Light gray torquise - partColors->add(cvf::Color3f(168.0f/255, 220.0f/255, 166.0f/255)); // Light gray green - partColors->add(cvf::Color3f(255.0f/255, 64.0f/255, 236.0f/255)); // Magneta - - return partColors; -} - diff --git a/ApplicationCode/ModelVisualization/RivColorTableArray.h b/ApplicationCode/ModelVisualization/RivColorTableArray.h deleted file mode 100644 index df59373f25..0000000000 --- a/ApplicationCode/ModelVisualization/RivColorTableArray.h +++ /dev/null @@ -1,30 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) Statoil ASA -// Copyright (C) Ceetron Solutions 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#pragma once - -#include "cvfBase.h" -#include "cvfObject.h" -#include "cvfArray.h" - -class RivColorTableArray -{ -public: - static cvf::ref colorTableArray(); -}; diff --git a/ApplicationCode/ModelVisualization/RivFaultPartMgr.cpp b/ApplicationCode/ModelVisualization/RivFaultPartMgr.cpp index 968dcdfb8b..4efb3f420d 100644 --- a/ApplicationCode/ModelVisualization/RivFaultPartMgr.cpp +++ b/ApplicationCode/ModelVisualization/RivFaultPartMgr.cpp @@ -23,16 +23,20 @@ #include "RiaPreferences.h" #include "RigCaseCellResultsData.h" -#include "RigCaseData.h" +#include "RigMainGrid.h" #include "RigResultAccessor.h" #include "RimEclipseCase.h" #include "RimEclipseCellColors.h" #include "RimEclipseView.h" +#include "RimFault.h" #include "RimFaultCollection.h" #include "RimLegendConfig.h" #include "RimTernaryLegendConfig.h" +#include "RivFaultGeometryGenerator.h" +#include "RivNNCGeometryGenerator.h" +#include "RivPartPriority.h" #include "RivResultToTextureMapper.h" #include "RivScalarMapperUtils.h" #include "RivSourceInfo.h" @@ -103,7 +107,7 @@ void RivFaultPartMgr::updateCellResultColor(size_t timeStepIndex, RimEclipseCell RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel()); RimEclipseView* eclipseView = cellResultColors->reservoirView(); - RigCaseData* eclipseCase = eclipseView->eclipseCase()->reservoirData(); + RigEclipseCaseData* eclipseCase = eclipseView->eclipseCase()->eclipseCaseData(); // Faults if (m_nativeFaultFaces.notNull()) @@ -206,10 +210,6 @@ void RivFaultPartMgr::updateCellEdgeResultColor(size_t timeStepIndex, RimEclipse } } -const int priFaultGeo = 1; -const int priNncGeo = 2; -const int priMesh = 3; - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -240,7 +240,7 @@ void RivFaultPartMgr::generatePartGeometry() part->updateBoundingBox(); part->setEnableMask(faultBit); - part->setPriority(priFaultGeo); + part->setPriority(RivPartPriority::PartType::Fault); m_nativeFaultFaces = part; } @@ -262,7 +262,7 @@ void RivFaultPartMgr::generatePartGeometry() part->updateBoundingBox(); part->setEnableMask(meshFaultBit); - part->setPriority(priMesh); + part->setPriority(RivPartPriority::PartType::FaultMeshLines); m_nativeFaultGridLines = part; } @@ -292,7 +292,7 @@ void RivFaultPartMgr::generatePartGeometry() part->updateBoundingBox(); part->setEnableMask(faultBit); - part->setPriority(priFaultGeo); + part->setPriority(RivPartPriority::PartType::Fault); m_oppositeFaultFaces = part; } @@ -314,7 +314,7 @@ void RivFaultPartMgr::generatePartGeometry() part->updateBoundingBox(); part->setEnableMask(meshFaultBit); - part->setPriority(priMesh); + part->setPriority(RivPartPriority::PartType::FaultMeshLines); m_oppositeFaultGridLines = part; } @@ -342,7 +342,7 @@ void RivFaultPartMgr::generatePartGeometry() part->updateBoundingBox(); part->setEnableMask(faultBit); - part->setPriority(priNncGeo); + part->setPriority(RivPartPriority::PartType::Nnc); m_NNCFaces = part; } @@ -397,18 +397,18 @@ void RivFaultPartMgr::updatePartEffect() if (m_opacityLevel < 1.0f) { // Set priority to make sure this transparent geometry are rendered last - if (m_nativeFaultFaces.notNull()) m_nativeFaultFaces->setPriority(100 + priFaultGeo); - if (m_oppositeFaultFaces.notNull()) m_oppositeFaultFaces->setPriority(100 + priFaultGeo); - if (m_NNCFaces.notNull()) m_NNCFaces->setPriority(100 + priNncGeo); + if (m_nativeFaultFaces.notNull()) m_nativeFaultFaces->setPriority(RivPartPriority::PartType::TransparentFault); + if (m_oppositeFaultFaces.notNull()) m_oppositeFaultFaces->setPriority(RivPartPriority::PartType::TransparentFault); + if (m_NNCFaces.notNull()) m_NNCFaces->setPriority(RivPartPriority::PartType::TransparentNnc); if (m_nativeFaultGridLines.notNull()) { - m_nativeFaultGridLines->setPriority(100 + priMesh); + m_nativeFaultGridLines->setPriority(RivPartPriority::PartType::FaultMeshLines); } if (m_oppositeFaultGridLines.notNull()) { - m_oppositeFaultGridLines->setPriority(100 + priMesh); + m_oppositeFaultGridLines->setPriority(RivPartPriority::PartType::FaultMeshLines); } } } @@ -481,7 +481,7 @@ void RivFaultPartMgr::createLabelWithAnchorLine(const cvf::Part* part) cvf::ref eff = new cvf::Effect; part->setEffect(eff.p()); - part->setPriority(1000); + part->setPriority(RivPartPriority::PartType::Text); m_faultLabelPart = part; } diff --git a/ApplicationCode/ModelVisualization/RivFaultPartMgr.h b/ApplicationCode/ModelVisualization/RivFaultPartMgr.h index fdc1276bba..96fbf16c44 100644 --- a/ApplicationCode/ModelVisualization/RivFaultPartMgr.h +++ b/ApplicationCode/ModelVisualization/RivFaultPartMgr.h @@ -18,15 +18,11 @@ ///////////////////////////////////////////////////////////////////////////////// #pragma once + #include "cvfBase.h" #include "cvfObject.h" +#include "cvfArray.h" -#include "RigGridBase.h" -#include "RimFault.h" -#include "RivFaultGeometryGenerator.h" -#include "cvfColor4.h" -#include "RivNNCGeometryGenerator.h" -#include "cvfEffect.h" #include "cafEffectGenerator.h" namespace cvf @@ -40,6 +36,12 @@ namespace cvf class RimEclipseCellColors; class RimCellEdgeColors; class RimFaultCollection; +class RigGridBase; +class RimFaultCollection; +class RimFault; +class RivFaultGeometryGenerator; +class RivNNCGeometryGenerator; + //================================================================================================== /// @@ -83,8 +85,6 @@ class RivFaultPartMgr : public cvf::Object float m_opacityLevel; cvf::Color3f m_defaultColor; - bool m_showLabel; - cvf::ref m_cellVisibility; cvf::ref m_nativeFaultGenerator; diff --git a/ApplicationCode/ModelVisualization/RivGridPartMgr.cpp b/ApplicationCode/ModelVisualization/RivGridPartMgr.cpp index f517f779d4..075636e32d 100644 --- a/ApplicationCode/ModelVisualization/RivGridPartMgr.cpp +++ b/ApplicationCode/ModelVisualization/RivGridPartMgr.cpp @@ -24,7 +24,7 @@ #include "RiaPreferences.h" #include "RigCaseCellResultsData.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" #include "RigResultAccessorFactory.h" #include "RimCellEdgeColors.h" @@ -37,6 +37,7 @@ #include "RimTernaryLegendConfig.h" #include "RivCellEdgeEffectGenerator.h" +#include "RivPartPriority.h" #include "RivResultToTextureMapper.h" #include "RivScalarMapperUtils.h" #include "RivSourceInfo.h" @@ -53,17 +54,19 @@ #include "cvfMath.h" #include "cvfModelBasicList.h" #include "cvfPart.h" +#include "cvfRenderState_FF.h" #include "cvfRenderStateBlending.h" #include "cvfRenderStatePolygonOffset.h" -#include "cvfRenderState_FF.h" #include "cvfShaderProgram.h" #include "cvfShaderProgramGenerator.h" #include "cvfShaderSourceProvider.h" #include "cvfShaderSourceRepository.h" #include "cvfStructGrid.h" +#include "cvfTransform.h" #include "cvfUniform.h" + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -164,8 +167,7 @@ void RivGridPartMgr::generatePartGeometry(cvf::StructGridGeometryGenerator& geoB caf::MeshEffectGenerator effGen(prefs->defaultGridLineColors()); eff = effGen.generateCachedEffect(); - // Set priority to make sure fault lines are rendered first - part->setPriority(10); + part->setPriority(RivPartPriority::PartType::MeshLines); part->setEnableMask(meshSurfaceBit); part->setEffect(eff.p()); @@ -200,8 +202,7 @@ void RivGridPartMgr::updateCellColor(cvf::Color4f color) if (color.a() < 1.0f) { - // Set priority to make sure this transparent geometry are rendered last - if (m_surfaceFaces.notNull()) m_surfaceFaces->setPriority(100); + if (m_surfaceFaces.notNull()) m_surfaceFaces->setPriority(RivPartPriority::PartType::Transparent); } m_opacityLevel = color.a(); @@ -234,21 +235,26 @@ void RivGridPartMgr::updateCellResultColor(size_t timeStepIndex, RimEclipseCellC if (cellResultColors->isTernarySaturationSelected()) { RivTernaryTextureCoordsCreator texturer(cellResultColors, cellResultColors->ternaryLegendConfig(), - timeStepIndex, - m_grid->gridIndex(), - m_surfaceGenerator.quadToCellFaceMapper()); + timeStepIndex, + m_grid->gridIndex(), + m_surfaceGenerator.quadToCellFaceMapper()); texturer.createTextureCoords(m_surfaceFacesTextureCoords.p()); const RivTernaryScalarMapper* mapper = cellResultColors->ternaryLegendConfig()->scalarMapper(); - RivScalarMapperUtils::applyTernaryTextureResultsToPart(m_surfaceFaces.p(), m_surfaceFacesTextureCoords.p(), mapper, m_opacityLevel, caf::FC_NONE, cellResultColors->reservoirView()->isLightingDisabled()); + RivScalarMapperUtils::applyTernaryTextureResultsToPart(m_surfaceFaces.p(), + m_surfaceFacesTextureCoords.p(), + mapper, + m_opacityLevel, + caf::FC_NONE, + cellResultColors->reservoirView()->isLightingDisabled()); } else { RivTextureCoordsCreator texturer(cellResultColors, - timeStepIndex, - m_grid->gridIndex(), - m_surfaceGenerator.quadToCellFaceMapper()); + timeStepIndex, + m_grid->gridIndex(), + m_surfaceGenerator.quadToCellFaceMapper()); if (!texturer.isValid()) { return; @@ -257,7 +263,12 @@ void RivGridPartMgr::updateCellResultColor(size_t timeStepIndex, RimEclipseCellC texturer.createTextureCoords(m_surfaceFacesTextureCoords.p()); const cvf::ScalarMapper* mapper = cellResultColors->legendConfig()->scalarMapper(); - RivScalarMapperUtils::applyTextureResultsToPart(m_surfaceFaces.p(), m_surfaceFacesTextureCoords.p(), mapper, m_opacityLevel, caf::FC_NONE, cellResultColors->reservoirView()->isLightingDisabled()); + RivScalarMapperUtils::applyTextureResultsToPart(m_surfaceFaces.p(), + m_surfaceFacesTextureCoords.p(), + mapper, + m_opacityLevel, + caf::FC_NONE, + cellResultColors->reservoirView()->isLightingDisabled()); } } } diff --git a/ApplicationCode/ModelVisualization/RivPartPriority.h b/ApplicationCode/ModelVisualization/RivPartPriority.h new file mode 100644 index 0000000000..2212b34ece --- /dev/null +++ b/ApplicationCode/ModelVisualization/RivPartPriority.h @@ -0,0 +1,51 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + + + +//-------------------------------------------------------------------------------------------------- +/// Class used to manage part render priorities +/// +/// The render priority determines the order in which parts get rendered. Parts with lower priorities +/// get rendered first. The default priority is 0. +/// +/// See also cvf::Part::setPriority() +/// +//-------------------------------------------------------------------------------------------------- +class RivPartPriority +{ +public: + enum PartType + { + BaseLevel, + Fault, + Nnc, + Intersection, + CrossSectionNnc, + MeshLines, + FaultMeshLines, + Transparent, + TransparentFault, + TransparentNnc, + TransparentMeshLines, + Highlight, + Text + }; +}; diff --git a/ApplicationCode/ModelVisualization/RivPipeGeometryGenerator.cpp b/ApplicationCode/ModelVisualization/RivPipeGeometryGenerator.cpp index 71b1404ddc..fb3472b98f 100644 --- a/ApplicationCode/ModelVisualization/RivPipeGeometryGenerator.cpp +++ b/ApplicationCode/ModelVisualization/RivPipeGeometryGenerator.cpp @@ -19,14 +19,13 @@ ///////////////////////////////////////////////////////////////////////////////// -#include "cvfLibCore.h" -#include "cvfLibRender.h" -#include "cvfLibGeometry.h" -#include "cvfLibViewing.h" - #include "RivPipeGeometryGenerator.h" -#include + #include "cafEffectGenerator.h" +#include "cvfDrawableGeo.h" +#include "cvfPlane.h" +#include "cvfPrimitiveSetIndexedUInt.h" +#include "cvfRay.h" //-------------------------------------------------------------------------------------------------- /// @@ -48,7 +47,6 @@ RivPipeGeometryGenerator::~RivPipeGeometryGenerator() } - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -59,7 +57,6 @@ void RivPipeGeometryGenerator::setPipeCenterCoords(const cvf::Vec3dArray* coords clearComputedData(); } - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -80,7 +77,6 @@ void RivPipeGeometryGenerator::setBendScalingFactor(double scaleFactor) clearComputedData(); } - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -103,7 +99,6 @@ void RivPipeGeometryGenerator::setCrossSectionVertexCount(size_t nodeCount) clearComputedData(); } - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -257,7 +252,6 @@ cvf::ref RivPipeGeometryGenerator::generateLine(const cvf::Vec return geo; } - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -466,7 +460,6 @@ void RivPipeGeometryGenerator::computeExtrudedCoordsAndNormals( cvf::Vec3d inter *extrudedNodes = nextExtrudedNodes; } - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -477,21 +470,13 @@ void RivPipeGeometryGenerator::updateFilteredPipeCenterCoords() double squareDistanceTolerance = 1e-4*1e-4; - size_t firstSegmentWithLength = 0; - size_t i; - for (i = 0; i < m_originalPipeCenterCoords->size() - 1; i++) - { - cvf::Vec3d candidateDir = (*m_originalPipeCenterCoords)[i] - (*m_originalPipeCenterCoords)[i+1]; - double dirLengthSq = candidateDir.lengthSquared(); - if (dirLengthSq > squareDistanceTolerance && candidateDir.normalize()) - { - firstSegmentWithLength = i; - break; - } - } + const size_t lastOriginalCoordIdx = m_originalPipeCenterCoords->size() - 1; + + size_t firstSegmentWithLength = findFirstSegmentWithLenght(squareDistanceTolerance); + + // Return if we have only zero-length segments - // Only zero-length segments - if (i == m_originalPipeCenterCoords->size() - 1) return; + if (firstSegmentWithLength == cvf::UNDEFINED_SIZE_T) return; m_filteredPipeCenterCoords.push_back(m_originalPipeCenterCoords->get(firstSegmentWithLength)); m_filteredPipeSegmentToResult.push_back(firstSegmentWithLength); @@ -499,30 +484,37 @@ void RivPipeGeometryGenerator::updateFilteredPipeCenterCoords() cvf::Vec3d lastValidDirectionAB; size_t lastValidSegment = 0; - for (i = firstSegmentWithLength + 1; i < m_originalPipeCenterCoords->size() - 1; i++) + // Go along the line, inserting bends, and skipping zero segments. + // The zero segments are skipped by ignoring the _first_ coordinate(s) equal to the next ones + + for (size_t coordBIdx = firstSegmentWithLength + 1; coordBIdx < lastOriginalCoordIdx; coordBIdx++) { - cvf::Vec3d coordA = m_originalPipeCenterCoords->get(i - 1); - cvf::Vec3d coordB = m_originalPipeCenterCoords->get(i + 0); - cvf::Vec3d coordC = m_originalPipeCenterCoords->get(i + 1); + cvf::Vec3d coordA = m_originalPipeCenterCoords->get(coordBIdx - 1); + cvf::Vec3d coordB = m_originalPipeCenterCoords->get(coordBIdx + 0); + cvf::Vec3d coordC = m_originalPipeCenterCoords->get(coordBIdx + 1); cvf::Vec3d directionAB = coordB - coordA; - // Skip segment lengths below tolerance if (directionAB.lengthSquared() > squareDistanceTolerance) { lastValidDirectionAB = directionAB.getNormalized(); - lastValidSegment = i; + lastValidSegment = coordBIdx; } + // Wait to store a segment until we find an endpoint that is the start point of a valid segment + cvf::Vec3d directionBC = coordC - coordB; if (directionBC.lengthSquared() < squareDistanceTolerance) { continue; } + // Check if the angle between AB and BC is sharper than m_minimumBendAngle (Straight == 180 deg) + // Sharper angle detected, insert bending stuff + double cosMinBendAngle = cvf::Math::cos(cvf::Math::toRadians(m_minimumBendAngle)); double dotProduct = lastValidDirectionAB * (-directionBC).getNormalized(); - if (dotProduct > cosMinBendAngle) + if (dotProduct > cosMinBendAngle) { bool success = false; @@ -540,40 +532,48 @@ void RivPipeGeometryGenerator::updateFilteredPipeCenterCoords() double bendRadius = m_bendScalingFactor * m_radius + 1.0e-30; cvf::Vec3d firstIntermediate = coordB - pipeIntermediateDirection * bendRadius; + cvf::Vec3d secondIntermediate = coordB + pipeIntermediateDirection * bendRadius; m_filteredPipeCenterCoords.push_back(firstIntermediate); m_filteredPipeSegmentToResult.push_back(lastValidSegment); m_filteredPipeCenterCoords.push_back(coordB); - m_filteredPipeSegmentToResult.push_back(i); + m_filteredPipeSegmentToResult.push_back(coordBIdx); - cvf::Vec3d secondIntermediate = coordB + pipeIntermediateDirection * bendRadius; m_filteredPipeCenterCoords.push_back(secondIntermediate); - m_filteredPipeSegmentToResult.push_back(i); + m_filteredPipeSegmentToResult.push_back(coordBIdx); } else { m_filteredPipeCenterCoords.push_back(coordB); - m_filteredPipeSegmentToResult.push_back(i); + m_filteredPipeSegmentToResult.push_back(coordBIdx); } } - // Add last cross section if not duplicate coordinate - cvf::Vec3d coordA = m_originalPipeCenterCoords->get(m_originalPipeCenterCoords->size() - 2); - cvf::Vec3d coordB = m_originalPipeCenterCoords->get(m_originalPipeCenterCoords->size() - 1); + // Add the last point, as the above loop will not end the last none-zero segment, but wait for the start of the next valid one. - cvf::Vec3d directionAB = coordB - coordA; - if (directionAB.lengthSquared() > squareDistanceTolerance) - { - m_filteredPipeCenterCoords.push_back(m_originalPipeCenterCoords->get(m_originalPipeCenterCoords->size() - 1)); - } - else + m_filteredPipeCenterCoords.push_back(m_originalPipeCenterCoords->get(lastOriginalCoordIdx)); + + CVF_ASSERT(m_filteredPipeCenterCoords.size() - 1 == m_filteredPipeSegmentToResult.size()); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +size_t RivPipeGeometryGenerator::findFirstSegmentWithLenght(double squareDistanceTolerance) +{ + size_t segIdx; + for ( segIdx = 0; segIdx < m_originalPipeCenterCoords->size() - 1; segIdx++ ) { - // Remove last segment as the length is below tolerance - m_filteredPipeSegmentToResult.pop_back(); + cvf::Vec3d candidateDir = (*m_originalPipeCenterCoords)[segIdx] - (*m_originalPipeCenterCoords)[segIdx+1]; + double dirLengthSq = candidateDir.lengthSquared(); + if ( dirLengthSq > squareDistanceTolerance && candidateDir.normalize() ) + { + return segIdx; + } } - CVF_ASSERT(m_filteredPipeCenterCoords.size() - 1 == m_filteredPipeSegmentToResult.size()); + return cvf::UNDEFINED_SIZE_T; } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ModelVisualization/RivPipeGeometryGenerator.h b/ApplicationCode/ModelVisualization/RivPipeGeometryGenerator.h index 657d5a15b2..c0aa640f30 100644 --- a/ApplicationCode/ModelVisualization/RivPipeGeometryGenerator.h +++ b/ApplicationCode/ModelVisualization/RivPipeGeometryGenerator.h @@ -20,6 +20,15 @@ #pragma once +#include "cvfBase.h" +#include "cvfObject.h" +#include "cvfArray.h" + +namespace cvf { + class DrawableGeo; + class ScalarMapper; +} + class RivPipeGeometryGenerator : public cvf::Object { public: @@ -54,6 +63,8 @@ class RivPipeGeometryGenerator : public cvf::Object void clearComputedData(); void updateFilteredPipeCenterCoords(); + size_t findFirstSegmentWithLenght(double squareDistanceTolerance); + static void computeCircle(double radius, size_t tesselationCount, const cvf::Vec3d& center, const cvf::Vec3d& orient1, const cvf::Vec3d& orient2, std::vector* nodes); static cvf::ref generateLine(const cvf::Vec3dArray* coords); diff --git a/ApplicationCode/ModelVisualization/RivReservoirFaultsPartMgr.cpp b/ApplicationCode/ModelVisualization/RivReservoirFaultsPartMgr.cpp index 8ac5974b15..0508bf5306 100644 --- a/ApplicationCode/ModelVisualization/RivReservoirFaultsPartMgr.cpp +++ b/ApplicationCode/ModelVisualization/RivReservoirFaultsPartMgr.cpp @@ -19,13 +19,13 @@ #include "RivReservoirFaultsPartMgr.h" -#include "RigCaseData.h" #include "RigMainGrid.h" #include "RimEclipseCase.h" #include "RimEclipseCellColors.h" #include "RimEclipseFaultColors.h" #include "RimEclipseView.h" +#include "RimFault.h" #include "RimFaultCollection.h" #include "RivFaultPartMgr.h" @@ -169,7 +169,7 @@ void RivReservoirFaultsPartMgr::appendPartsToModel(cvf::ModelBasicList* model) scalarResultIndex = cellResultColors->scalarResultIndex(); } - RigMainGrid* mainGrid = m_reservoirView->eclipseCase()->reservoirData()->mainGrid(); + RigMainGrid* mainGrid = m_reservoirView->mainGrid(); if (!(mainGrid && mainGrid->nncData()->hasScalarValues(scalarResultIndex))) { showNncs = false; diff --git a/ApplicationCode/ModelVisualization/RivReservoirPartMgr.cpp b/ApplicationCode/ModelVisualization/RivReservoirPartMgr.cpp index fbe87a2c21..4cfe9b7d80 100644 --- a/ApplicationCode/ModelVisualization/RivReservoirPartMgr.cpp +++ b/ApplicationCode/ModelVisualization/RivReservoirPartMgr.cpp @@ -20,7 +20,7 @@ #include "RivReservoirPartMgr.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" #include "RivGridPartMgr.h" #include "RivReservoirFaultsPartMgr.h" @@ -30,7 +30,7 @@ //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RivReservoirPartMgr::clearAndSetReservoir(const RigCaseData* eclipseCase, RimEclipseView* reservoirView) +void RivReservoirPartMgr::clearAndSetReservoir(const RigEclipseCaseData* eclipseCase, RimEclipseView* reservoirView) { m_allGrids.clear(); diff --git a/ApplicationCode/ModelVisualization/RivReservoirPartMgr.h b/ApplicationCode/ModelVisualization/RivReservoirPartMgr.h index 005817b625..a99b5e150b 100644 --- a/ApplicationCode/ModelVisualization/RivReservoirPartMgr.h +++ b/ApplicationCode/ModelVisualization/RivReservoirPartMgr.h @@ -32,7 +32,7 @@ namespace cvf class RimEclipseCellColors; class RimCellEdgeColors; -class RigCaseData; +class RigEclipseCaseData; class RimEclipseView; class RivReservoirFaultsPartMgr; class RivGridPartMgr; @@ -47,7 +47,7 @@ class RivGridPartMgr; class RivReservoirPartMgr: public cvf::Object { public: - void clearAndSetReservoir(const RigCaseData* eclipseCase, RimEclipseView* reservoirView); + void clearAndSetReservoir(const RigEclipseCaseData* eclipseCase, RimEclipseView* reservoirView); void setTransform(cvf::Transform* scaleTransform); void setCellVisibility(size_t gridIndex, cvf::UByteArray* cellVisibilities ); diff --git a/ApplicationCode/ModelVisualization/RivReservoirPipesPartMgr.cpp b/ApplicationCode/ModelVisualization/RivReservoirPipesPartMgr.cpp deleted file mode 100644 index a4abb03632..0000000000 --- a/ApplicationCode/ModelVisualization/RivReservoirPipesPartMgr.cpp +++ /dev/null @@ -1,154 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#include "RivReservoirPipesPartMgr.h" - -#include "Rim3dOverlayInfoConfig.h" -#include "RimCellEdgeColors.h" -#include "RimCellRangeFilterCollection.h" -#include "RimEclipseCellColors.h" -#include "RimEclipsePropertyFilterCollection.h" -#include "RimEclipseView.h" -#include "RimEclipseWell.h" -#include "RimEclipseWellCollection.h" - -#include "RivWellHeadPartMgr.h" -#include "RivWellPipesPartMgr.h" - -#include "cafPdmFieldCvfColor.h" -#include "cafPdmFieldCvfMat4d.h" - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RivReservoirPipesPartMgr::RivReservoirPipesPartMgr(RimEclipseView* reservoirView) -{ - m_reservoirView = reservoirView; - - m_scaleTransform = new cvf::Transform(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RivReservoirPipesPartMgr::~RivReservoirPipesPartMgr() -{ - -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RivReservoirPipesPartMgr::clearGeometryCache() -{ - m_wellPipesPartMgrs.clear(); - m_wellHeadPartMgrs.clear(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RivReservoirPipesPartMgr::scheduleGeometryRegen() -{ - for (size_t wIdx = 0; wIdx != m_wellPipesPartMgrs.size(); ++ wIdx) - { - m_wellPipesPartMgrs[wIdx]->scheduleGeometryRegen(); - } - - for (size_t wIdx = 0; wIdx != m_wellHeadPartMgrs.size(); ++ wIdx) - { - //m_wellHeadPartMgrs[wIdx]->scheduleGeometryRegen(scaleTransform); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RivReservoirPipesPartMgr::setScaleTransform(cvf::Transform * scaleTransform) -{ - m_scaleTransform = scaleTransform; - - for (size_t wIdx = 0; wIdx != m_wellPipesPartMgrs.size(); ++ wIdx) - { - m_wellPipesPartMgrs[wIdx]->setScaleTransform(scaleTransform); - } - - for (size_t wIdx = 0; wIdx != m_wellHeadPartMgrs.size(); ++ wIdx) - { - m_wellHeadPartMgrs[wIdx]->setScaleTransform(scaleTransform); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RivReservoirPipesPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model, size_t frameIndex) -{ - if (!m_reservoirView->wellCollection()->isActive()) return; - - if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimEclipseWellCollection::PIPES_FORCE_ALL_OFF) return; - - if (m_reservoirView->wellCollection()->wells.size() != m_wellPipesPartMgrs.size()) - { - clearGeometryCache(); - - for (size_t i = 0; i < m_reservoirView->wellCollection()->wells.size(); ++i) - { - RivWellPipesPartMgr * wppmgr = new RivWellPipesPartMgr(m_reservoirView, m_reservoirView->wellCollection()->wells[i]); - m_wellPipesPartMgrs.push_back(wppmgr); - wppmgr->setScaleTransform(m_scaleTransform.p()); - - RivWellHeadPartMgr* wellHeadMgr = new RivWellHeadPartMgr(m_reservoirView, m_reservoirView->wellCollection()->wells[i]); - m_wellHeadPartMgrs.push_back(wellHeadMgr); - wellHeadMgr->setScaleTransform(m_scaleTransform.p()); - } - } - - for (size_t wIdx = 0; wIdx != m_wellPipesPartMgrs.size(); ++ wIdx) - { - m_wellPipesPartMgrs[wIdx]->appendDynamicGeometryPartsToModel(model, frameIndex); - m_wellHeadPartMgrs[wIdx]->appendDynamicGeometryPartsToModel(model, frameIndex); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RivReservoirPipesPartMgr::updatePipeResultColor(size_t frameIndex) -{ - for (size_t wIdx = 0; wIdx != m_wellPipesPartMgrs.size(); ++ wIdx) - { - m_wellPipesPartMgrs[wIdx]->updatePipeResultColor( frameIndex); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -const std::vector< std::vector >* RivReservoirPipesPartMgr::centerLineOfWellBranches(int wellIdx) -{ - if (wellIdx < static_cast(m_wellPipesPartMgrs.size())) - { - return &(m_wellPipesPartMgrs[wellIdx]->centerLineOfWellBranches()); - } - - return NULL; -} - diff --git a/ApplicationCode/ModelVisualization/RivReservoirPipesPartMgr.h b/ApplicationCode/ModelVisualization/RivReservoirPipesPartMgr.h deleted file mode 100644 index 8736ed0a75..0000000000 --- a/ApplicationCode/ModelVisualization/RivReservoirPipesPartMgr.h +++ /dev/null @@ -1,58 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2011-2012 Statoil ASA, 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#pragma once - -#include "RimEclipseWellCollection.h" - -#include "cvfCollection.h" -#include "cvfVector3.h" - -namespace cvf -{ - class Transform; - class ModelBasicList; -} - -class RimEclipseView; -class RivWellPipesPartMgr; -class RivWellHeadPartMgr; - -class RivReservoirPipesPartMgr : public cvf::Object -{ -public: - RivReservoirPipesPartMgr(RimEclipseView* reservoirView); - ~RivReservoirPipesPartMgr(); - - void clearGeometryCache(); - void scheduleGeometryRegen(); - - void setScaleTransform(cvf::Transform* scaleTransform); - - void appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model, size_t frameIndex); - void updatePipeResultColor(size_t frameIndex); - - const std::vector< std::vector >* centerLineOfWellBranches(int wellIdx); - -private: - caf::PdmPointer m_reservoirView; - cvf::ref m_scaleTransform; - - cvf::Collection< RivWellPipesPartMgr > m_wellPipesPartMgrs; - cvf::Collection< RivWellHeadPartMgr > m_wellHeadPartMgrs; -}; diff --git a/ApplicationCode/ModelVisualization/RivReservoirSimWellsPartMgr.cpp b/ApplicationCode/ModelVisualization/RivReservoirSimWellsPartMgr.cpp new file mode 100644 index 0000000000..b12f804764 --- /dev/null +++ b/ApplicationCode/ModelVisualization/RivReservoirSimWellsPartMgr.cpp @@ -0,0 +1,191 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RivReservoirSimWellsPartMgr.h" + +#include "Rim3dOverlayInfoConfig.h" +#include "RimCellEdgeColors.h" +#include "RimCellRangeFilterCollection.h" +#include "RimEclipseCellColors.h" +#include "RimEclipsePropertyFilterCollection.h" +#include "RimEclipseView.h" +#include "RimEclipseWell.h" +#include "RimEclipseWellCollection.h" + +#include "RivWellHeadPartMgr.h" +#include "RivSimWellPipesPartMgr.h" + +#include "cafPdmFieldCvfColor.h" +#include "cafPdmFieldCvfMat4d.h" + +#include "cvfTransform.h" +#include "RivWellSpheresPartMgr.h" +#include "RivWellConnectionsPartMgr.h" + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RivReservoirSimWellsPartMgr::RivReservoirSimWellsPartMgr(RimEclipseView* reservoirView) +{ + m_reservoirView = reservoirView; + + m_scaleTransform = new cvf::Transform(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RivReservoirSimWellsPartMgr::~RivReservoirSimWellsPartMgr() +{ + +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RivReservoirSimWellsPartMgr::clearGeometryCache() +{ + m_wellPipesPartMgrs.clear(); + m_wellHeadPartMgrs.clear(); + m_wellSpheresPartMgrs.clear(); + +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RivReservoirSimWellsPartMgr::scheduleGeometryRegen() +{ + for (size_t wIdx = 0; wIdx != m_wellPipesPartMgrs.size(); ++ wIdx) + { + m_wellPipesPartMgrs[wIdx]->scheduleGeometryRegen(); + } + + for (size_t wIdx = 0; wIdx != m_wellHeadPartMgrs.size(); ++ wIdx) + { + //m_wellHeadPartMgrs[wIdx]->scheduleGeometryRegen(scaleTransform); + } + + m_wellSpheresPartMgrs.clear(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RivReservoirSimWellsPartMgr::setScaleTransform(cvf::Transform * scaleTransform) +{ + m_scaleTransform = scaleTransform; + + for (size_t wIdx = 0; wIdx != m_wellPipesPartMgrs.size(); ++ wIdx) + { + m_wellPipesPartMgrs[wIdx]->setScaleTransform(scaleTransform); + } + + for (size_t wIdx = 0; wIdx != m_wellHeadPartMgrs.size(); ++ wIdx) + { + m_wellHeadPartMgrs[wIdx]->setScaleTransform(scaleTransform); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RivReservoirSimWellsPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model, size_t frameIndex) +{ + if (!m_reservoirView->wellCollection()->isActive()) return; + + if (m_reservoirView->wellCollection()->wells.size() != m_wellPipesPartMgrs.size()) + { + clearGeometryCache(); + + for (size_t i = 0; i < m_reservoirView->wellCollection()->wells.size(); ++i) + { + RivSimWellPipesPartMgr * wppmgr = new RivSimWellPipesPartMgr(m_reservoirView, m_reservoirView->wellCollection()->wells[i]); + m_wellPipesPartMgrs.push_back(wppmgr); + wppmgr->setScaleTransform(m_scaleTransform.p()); + + RivWellHeadPartMgr* wellHeadMgr = new RivWellHeadPartMgr(m_reservoirView, m_reservoirView->wellCollection()->wells[i]); + m_wellHeadPartMgrs.push_back(wellHeadMgr); + wellHeadMgr->setScaleTransform(m_scaleTransform.p()); + } + } + + for (size_t wIdx = 0; wIdx != m_wellPipesPartMgrs.size(); ++ wIdx) + { + m_wellPipesPartMgrs[wIdx]->appendDynamicGeometryPartsToModel(model, frameIndex); + m_wellHeadPartMgrs[wIdx]->appendDynamicGeometryPartsToModel(model, frameIndex); + } + + // Well spheres + + if (m_reservoirView->wellCollection()->wells.size() != m_wellSpheresPartMgrs.size()) + { + m_wellSpheresPartMgrs.clear(); + + for (RimEclipseWell* rimWell : m_reservoirView->wellCollection()->wells()) + { + RivWellSpheresPartMgr* wppmgr = new RivWellSpheresPartMgr(m_reservoirView, rimWell); + m_wellSpheresPartMgrs.push_back(wppmgr); + } + } + + for (size_t wIdx = 0; wIdx < m_wellSpheresPartMgrs.size(); wIdx++) + { + if (m_reservoirView->wellCollection()->wells[wIdx]->isWellSpheresVisible(frameIndex)) + { + m_wellSpheresPartMgrs[wIdx]->appendDynamicGeometryPartsToModel(model, frameIndex); + } + } + + // Well Connection Arrows + if ( m_reservoirView->wellCollection()->showWellCommunicationLines() ) + { + for ( RimEclipseWell* rimWell : m_reservoirView->wellCollection()->wells() ) + { + cvf::ref wppmgr = new RivWellConnectionsPartMgr(m_reservoirView, rimWell); + wppmgr->appendDynamicGeometryPartsToModel(model, frameIndex); + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RivReservoirSimWellsPartMgr::updatePipeResultColor(size_t frameIndex) +{ + for (size_t wIdx = 0; wIdx != m_wellPipesPartMgrs.size(); ++ wIdx) + { + m_wellPipesPartMgrs[wIdx]->updatePipeResultColor( frameIndex); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const std::vector< std::vector >* RivReservoirSimWellsPartMgr::centerLineOfWellBranches(int wellIdx) +{ + if (wellIdx < static_cast(m_wellPipesPartMgrs.size())) + { + return &(m_wellPipesPartMgrs[wellIdx]->centerLineOfWellBranches()); + } + + return NULL; +} + diff --git a/ApplicationCode/ModelVisualization/RivReservoirSimWellsPartMgr.h b/ApplicationCode/ModelVisualization/RivReservoirSimWellsPartMgr.h new file mode 100644 index 0000000000..459b77ab0b --- /dev/null +++ b/ApplicationCode/ModelVisualization/RivReservoirSimWellsPartMgr.h @@ -0,0 +1,65 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2011-2012 Statoil ASA, 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + + +#include "cvfBase.h" +#include "cvfCollection.h" +#include "cvfVector3.h" + +#include "cafPdmPointer.h" + +namespace cvf +{ + class Transform; + class ModelBasicList; +} + +class RimEclipseView; +class RivSimWellPipesPartMgr; +class RivWellHeadPartMgr; +class RivWellSpheresPartMgr; +class RivWellConnectionsPartMgr; + +class RivReservoirSimWellsPartMgr : public cvf::Object +{ +public: + explicit RivReservoirSimWellsPartMgr(RimEclipseView* reservoirView); + ~RivReservoirSimWellsPartMgr(); + + void clearGeometryCache(); + void scheduleGeometryRegen(); + + void setScaleTransform(cvf::Transform* scaleTransform); + + void appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model, size_t frameIndex); + void updatePipeResultColor(size_t frameIndex); + + const std::vector< std::vector >* centerLineOfWellBranches(int wellIdx); + +private: + caf::PdmPointer m_reservoirView; + cvf::ref m_scaleTransform; + + cvf::Collection< RivSimWellPipesPartMgr > m_wellPipesPartMgrs; + cvf::Collection< RivWellHeadPartMgr > m_wellHeadPartMgrs; + cvf::Collection< RivWellSpheresPartMgr > m_wellSpheresPartMgrs; + cvf::Collection< RivWellConnectionsPartMgr > m_wellConnPartMgrs; + +}; diff --git a/ApplicationCode/ModelVisualization/RivReservoirViewPartMgr.cpp b/ApplicationCode/ModelVisualization/RivReservoirViewPartMgr.cpp index e68546347e..f87dc92ff3 100644 --- a/ApplicationCode/ModelVisualization/RivReservoirViewPartMgr.cpp +++ b/ApplicationCode/ModelVisualization/RivReservoirViewPartMgr.cpp @@ -20,9 +20,11 @@ #include "RivReservoirViewPartMgr.h" +#include "RigActiveCellInfo.h" #include "RigCaseCellResultsData.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" #include "RigCaseToCaseCellMapper.h" +#include "RigCell.h" #include "RigGridBase.h" #include "RigResultAccessorFactory.h" @@ -31,6 +33,7 @@ #include "RimCellRangeFilterCollection.h" #include "RimEclipseCase.h" #include "RimEclipseCellColors.h" +#include "RimEclipsePropertyFilter.h" #include "RimEclipsePropertyFilterCollection.h" #include "RimEclipseResultDefinition.h" #include "RimEclipseView.h" @@ -147,10 +150,10 @@ void RivReservoirViewPartMgr::scheduleGeometryRegen(RivCellSetEnum geometryType) //-------------------------------------------------------------------------------------------------- void RivReservoirViewPartMgr::clearGeometryCache(RivCellSetEnum geomType) { - RigCaseData* eclipseCase = NULL; + RigEclipseCaseData* eclipseCase = NULL; if (m_reservoirView != NULL && m_reservoirView->eclipseCase()) { - eclipseCase = m_reservoirView->eclipseCase()->reservoirData(); + eclipseCase = m_reservoirView->eclipseCase()->eclipseCaseData(); } if (geomType == PROPERTY_FILTERED) @@ -247,7 +250,7 @@ void RivReservoirViewPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicL //-------------------------------------------------------------------------------------------------- void RivReservoirViewPartMgr::createGeometry(RivCellSetEnum geometryType) { - RigCaseData* res = m_reservoirView->eclipseCase()->reservoirData(); + RigEclipseCaseData* res = m_reservoirView->eclipseCase()->eclipseCaseData(); m_geometries[geometryType].clearAndSetReservoir(res, m_reservoirView); m_geometries[geometryType].setTransform(m_scaleTransform.p()); @@ -270,7 +273,7 @@ void RivReservoirViewPartMgr::createGeometry(RivCellSetEnum geometryType) //-------------------------------------------------------------------------------------------------- void RivReservoirViewPartMgr::computeVisibility(cvf::UByteArray* cellVisibility, RivCellSetEnum geometryType, RigGridBase* grid, size_t gridIdx) { - RigCaseData* eclipseCase = m_reservoirView->eclipseCase()->reservoirData(); + RigEclipseCaseData* eclipseCase = m_reservoirView->eclipseCase()->eclipseCaseData(); RigActiveCellInfo* activeCellInfo = m_reservoirView->currentActiveCellInfo(); switch (geometryType) @@ -397,7 +400,7 @@ void RivReservoirViewPartMgr::computeVisibility(cvf::UByteArray* cellVisibility, //-------------------------------------------------------------------------------------------------- void RivReservoirViewPartMgr::createPropertyFilteredNoneWellCellGeometry(size_t frameIndex) { - RigCaseData* res = m_reservoirView->eclipseCase()->reservoirData(); + RigEclipseCaseData* res = m_reservoirView->eclipseCase()->eclipseCaseData(); if ( frameIndex >= m_propFilteredGeometryFrames.size()) { @@ -474,7 +477,7 @@ void RivReservoirViewPartMgr::createPropertyFilteredNoneWellCellGeometry(size_t //-------------------------------------------------------------------------------------------------- void RivReservoirViewPartMgr::createPropertyFilteredWellGeometry(size_t frameIndex) { - RigCaseData* res = m_reservoirView->eclipseCase()->reservoirData(); + RigEclipseCaseData* res = m_reservoirView->eclipseCase()->eclipseCaseData(); if ( frameIndex >= m_propFilteredWellGeometryFrames.size()) { @@ -787,18 +790,9 @@ void RivReservoirViewPartMgr::computePropertyVisibility(cvf::UByteArray* cellVis { const RimCellFilter::FilterModeType filterType = propertyFilter->filterMode(); - RigCaseData* eclipseCase = propFilterColl->reservoirView()->eclipseCase()->reservoirData(); + RigEclipseCaseData* eclipseCase = propFilterColl->reservoirView()->eclipseCase()->eclipseCaseData(); - size_t adjustedTimeStepIndex = timeStepIndex; - - // Set time step to zero for static results - if (propertyFilter->resultDefinition()->hasStaticResult()) - { - adjustedTimeStepIndex = 0; - } - - RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(propertyFilter->resultDefinition()->porosityModel()); - cvf::ref resultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, grid->gridIndex(), porosityModel, adjustedTimeStepIndex, propertyFilter->resultDefinition->resultVariable(), propertyFilter->resultDefinition->resultType()); + cvf::ref resultAccessor = RigResultAccessorFactory::createFromResultDefinition(eclipseCase, grid->gridIndex(), timeStepIndex, propertyFilter->resultDefinition); CVF_ASSERT(resultAccessor.notNull()); @@ -909,7 +903,7 @@ void RivReservoirViewPartMgr::updateFaultCellEdgeResultColor(RivCellSetEnum geom //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -cvf::cref RivReservoirViewPartMgr::cellVisibility(RivCellSetEnum geometryType, size_t gridIndex, size_t timeStepIndex) const +const cvf::UByteArray* RivReservoirViewPartMgr::cellVisibility(RivCellSetEnum geometryType, size_t gridIndex, size_t timeStepIndex) const { RivReservoirPartMgr * pmgr = (const_cast(this))->reservoirPartManager( geometryType, timeStepIndex ); return pmgr->cellVisibility(gridIndex).p(); diff --git a/ApplicationCode/ModelVisualization/RivReservoirViewPartMgr.h b/ApplicationCode/ModelVisualization/RivReservoirViewPartMgr.h index 75417003be..84f1c0b3c9 100644 --- a/ApplicationCode/ModelVisualization/RivReservoirViewPartMgr.h +++ b/ApplicationCode/ModelVisualization/RivReservoirViewPartMgr.h @@ -46,13 +46,13 @@ namespace cvf class RivReservoirViewPartMgr: public cvf::Object { public: - RivReservoirViewPartMgr(RimEclipseView * resv); + explicit RivReservoirViewPartMgr(RimEclipseView * resv); cvf::Transform* scaleTransform() { return m_scaleTransform.p();} void clearGeometryCache(); void scheduleGeometryRegen(RivCellSetEnum geometryType); - cvf::cref cellVisibility(RivCellSetEnum geometryType, size_t gridIndex, size_t frameIndex) const; + const cvf::UByteArray* cellVisibility(RivCellSetEnum geometryType, size_t gridIndex, size_t frameIndex) const; void appendStaticGeometryPartsToModel (cvf::ModelBasicList* model, RivCellSetEnum geometryType, const std::vector& gridIndices); void appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model, RivCellSetEnum geometryType, size_t frameIndex, const std::vector& gridIndices); diff --git a/ApplicationCode/ModelVisualization/RivSimWellPipeSourceInfo.cpp b/ApplicationCode/ModelVisualization/RivSimWellPipeSourceInfo.cpp new file mode 100644 index 0000000000..8d77bf321d --- /dev/null +++ b/ApplicationCode/ModelVisualization/RivSimWellPipeSourceInfo.cpp @@ -0,0 +1,48 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2015- Statoil ASA +// Copyright (C) 2015- Ceetron Solutions 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RivSimWellPipeSourceInfo.h" + +#include "RimEclipseWell.h" + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RivSimWellPipeSourceInfo::RivSimWellPipeSourceInfo(RimEclipseWell* eclipseWell, size_t branchIndex) + : m_eclipseWell(eclipseWell), + m_branchIndex(branchIndex) +{ +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimEclipseWell* RivSimWellPipeSourceInfo::well() const +{ + return m_eclipseWell.p(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +size_t RivSimWellPipeSourceInfo::branchIndex() const +{ + return m_branchIndex; +} diff --git a/ApplicationCode/ModelVisualization/RivSimWellPipeSourceInfo.h b/ApplicationCode/ModelVisualization/RivSimWellPipeSourceInfo.h new file mode 100644 index 0000000000..e765d59728 --- /dev/null +++ b/ApplicationCode/ModelVisualization/RivSimWellPipeSourceInfo.h @@ -0,0 +1,40 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2015- Statoil ASA +// Copyright (C) 2015- Ceetron Solutions 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cvfBase.h" +#include "cvfObject.h" +#include "cafPdmPointer.h" + +class RimEclipseWell; + +class RivSimWellPipeSourceInfo : public cvf::Object +{ +public: + RivSimWellPipeSourceInfo(RimEclipseWell* eclipseWell, size_t branchIndex); + + RimEclipseWell* well() const; + + size_t branchIndex() const; + +private: + caf::PdmPointer m_eclipseWell; + size_t m_branchIndex; +}; diff --git a/ApplicationCode/ModelVisualization/RivSimWellPipesPartMgr.cpp b/ApplicationCode/ModelVisualization/RivSimWellPipesPartMgr.cpp new file mode 100644 index 0000000000..ead55683b6 --- /dev/null +++ b/ApplicationCode/ModelVisualization/RivSimWellPipesPartMgr.cpp @@ -0,0 +1,383 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RivSimWellPipesPartMgr.h" + +#include "RigEclipseCaseData.h" +#include "RigCell.h" +#include "RigMainGrid.h" +#include "RigSimulationWellCenterLineCalculator.h" + +#include "Rim3dOverlayInfoConfig.h" +#include "RimCellEdgeColors.h" +#include "RimCellRangeFilterCollection.h" +#include "RimEclipseCase.h" +#include "RimEclipseCellColors.h" +#include "RimEclipsePropertyFilterCollection.h" +#include "RimEclipseView.h" +#include "RimEclipseWell.h" +#include "RimEclipseWellCollection.h" +#include "RimReservoirCellResultsStorage.h" + +#include "RivPipeGeometryGenerator.h" +#include "RivWellPathSourceInfo.h" +#include "RivSimWellPipeSourceInfo.h" + +#include "cafEffectGenerator.h" +#include "cafPdmFieldCvfColor.h" +#include "cafPdmFieldCvfMat4d.h" + +#include "cvfDrawableGeo.h" +#include "cvfModelBasicList.h" +#include "cvfPart.h" +#include "cvfRay.h" +#include "cvfScalarMapperDiscreteLinear.h" +#include "cvfTransform.h" + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RivSimWellPipesPartMgr::RivSimWellPipesPartMgr(RimEclipseView* reservoirView, RimEclipseWell* well) +{ + m_rimReservoirView = reservoirView; + m_rimWell = well; + m_needsTransformUpdate = true; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RivSimWellPipesPartMgr::~RivSimWellPipesPartMgr() +{ + +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RivSimWellPipesPartMgr::buildWellPipeParts() +{ + if (m_rimReservoirView.isNull()) return; + + m_wellBranches.clear(); + + m_pipeBranchesCLCoords.clear(); + std::vector< std::vector > pipeBranchesCellIds; + + m_rimWell->calculateWellPipeStaticCenterLine(m_pipeBranchesCLCoords, pipeBranchesCellIds); + + double pipeRadius = m_rimWell->pipeRadius(); + + for (size_t brIdx = 0; brIdx < pipeBranchesCellIds.size(); ++brIdx) + { + cvf::ref sourceInfo = new RivSimWellPipeSourceInfo(m_rimWell, brIdx); + + m_wellBranches.push_back(RivPipeBranchData()); + RivPipeBranchData& pbd = m_wellBranches.back(); + + pbd.m_cellIds = pipeBranchesCellIds[brIdx]; + + pbd.m_pipeGeomGenerator = new RivPipeGeometryGenerator; + + pbd.m_pipeGeomGenerator->setRadius(pipeRadius); + pbd.m_pipeGeomGenerator->setCrossSectionVertexCount(m_rimReservoirView->wellCollection()->pipeCrossSectionVertexCount()); + pbd.m_pipeGeomGenerator->setPipeColor( m_rimWell->wellPipeColor()); + + cvf::ref cvfCoords = new cvf::Vec3dArray; + cvfCoords->assign(m_pipeBranchesCLCoords[brIdx]); + + // Scale the centerline coordinates using the Z-scale transform of the grid and correct for the display offset. + const RigMainGrid* mainGrid = m_rimReservoirView->mainGrid(); + + for (size_t cIdx = 0; cIdx < cvfCoords->size(); ++cIdx) + { + cvf::Vec4d transfCoord = m_scaleTransform->worldTransform()* cvf::Vec4d((*cvfCoords)[cIdx] - mainGrid->displayModelOffset(), 1); + (*cvfCoords)[cIdx][0] = transfCoord[0]; + (*cvfCoords)[cIdx][1] = transfCoord[1]; + (*cvfCoords)[cIdx][2] = transfCoord[2]; + } + + pbd.m_pipeGeomGenerator->setPipeCenterCoords(cvfCoords.p()); + pbd.m_surfaceDrawable = pbd.m_pipeGeomGenerator->createPipeSurface(); + pbd.m_centerLineDrawable = pbd.m_pipeGeomGenerator->createCenterLine(); + + if (pbd.m_surfaceDrawable.notNull()) + { + pbd.m_surfacePart = new cvf::Part; + pbd.m_surfacePart->setDrawable(pbd.m_surfaceDrawable.p()); + + caf::SurfaceEffectGenerator surfaceGen(cvf::Color4f(m_rimWell->wellPipeColor()), caf::PO_1); + cvf::ref eff = surfaceGen.generateCachedEffect(); + + pbd.m_surfacePart->setEffect(eff.p()); + + pbd.m_surfacePart->setSourceInfo(sourceInfo.p()); + } + + if (pbd.m_centerLineDrawable.notNull()) + { + pbd.m_centerLinePart = new cvf::Part; + pbd.m_centerLinePart->setDrawable(pbd.m_centerLineDrawable.p()); + + caf::MeshEffectGenerator gen(m_rimWell->wellPipeColor()); + cvf::ref eff = gen.generateCachedEffect(); + + pbd.m_centerLinePart->setEffect(eff.p()); + } + + // Create slightly larger geometry for active (open) wells + // This will avoid visual artifacts when two wells are located at the same position + { + pbd.m_pipeGeomGenerator->setRadius(pipeRadius * 1.1); + pbd.m_largeSurfaceDrawable = pbd.m_pipeGeomGenerator->createPipeSurface(); + } + } + + m_needsTransformUpdate = false; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RivSimWellPipesPartMgr::RivPipeBranchData* RivSimWellPipesPartMgr::pipeBranchData(size_t branchIndex) +{ + if (branchIndex < m_wellBranches.size()) + { + size_t i = 0; + + auto brIt = m_wellBranches.begin(); + while (i < branchIndex) + { + brIt++; + } + + return &(*brIt); + } + + return nullptr; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RivSimWellPipesPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model, size_t frameIndex) +{ + if (m_rimReservoirView.isNull()) return; + if (m_rimWell.isNull()) return; + if (!m_rimWell->isWellPipeVisible(frameIndex)) return; + + if (m_needsTransformUpdate) buildWellPipeParts(); + + std::list::iterator it; + for (it = m_wellBranches.begin(); it != m_wellBranches.end(); ++it) + { + if (it->m_surfacePart.notNull()) + { + model->addPart(it->m_surfacePart.p()); + } + + if (it->m_centerLinePart.notNull()) + { + model->addPart(it->m_centerLinePart.p()); + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RivSimWellPipesPartMgr::updatePipeResultColor(size_t frameIndex) +{ + if (m_rimWell == NULL) return; + + RigSingleWellResultsData* wRes = m_rimWell->wellResults(); + if (wRes == NULL) return; + + if (!wRes->hasWellResult(frameIndex)) return; // Or reset colors or something + + const double closed = -0.1, producing = 1.5, water = 2.5, hcInjection = 3.5; // Closed set to -0.1 instead of 0.5 to workaround bug in the scalar mapper. + + std::list::iterator brIt; + const RigWellResultFrame& wResFrame = wRes->wellResultFrame(frameIndex); + + std::vector wellCellStates; + + // Setup a scalar mapper + cvf::ref scalarMapper = new cvf::ScalarMapperDiscreteLinear; + { + cvf::Color3ubArray legendColors; + legendColors.resize(4); + legendColors[0] = cvf::Color3ub(m_rimWell->wellPipeColor()); + legendColors[1] = cvf::Color3::GREEN; + legendColors[2] = cvf::Color3::BLUE; + legendColors[3] = cvf::Color3::RED; + scalarMapper->setColors(legendColors); + scalarMapper->setRange(0.0, 4.0); + scalarMapper->setLevelCount(4, true); + } + + caf::ScalarMapperEffectGenerator surfEffGen(scalarMapper.p(), caf::PO_1); + + if (m_rimReservoirView && m_rimReservoirView->isLightingDisabled()) + { + surfEffGen.disableLighting(true); + } + + cvf::ref scalarMapperSurfaceEffect = surfEffGen.generateUnCachedEffect(); + + caf::ScalarMapperMeshEffectGenerator meshEffGen(scalarMapper.p()); + cvf::ref scalarMapperMeshEffect = meshEffGen.generateUnCachedEffect(); + + for (brIt = m_wellBranches.begin(); brIt != m_wellBranches.end(); ++brIt) + { + // Initialize well states to "closed" state + wellCellStates.clear(); + wellCellStates.resize(brIt->m_cellIds.size(), closed); + + RimEclipseWellCollection* wellColl = nullptr; + if (m_rimWell) + { + m_rimWell->firstAncestorOrThisOfType(wellColl); + } + + if (wellColl && wellColl->showConnectionStatusColors()) + { + const std::vector & cellIds = brIt->m_cellIds; + for (size_t wcIdx = 0; wcIdx < cellIds.size(); ++wcIdx) + { + // we need a faster lookup, I guess + const RigWellResultPoint* wResCell = NULL; + + if (cellIds[wcIdx].isCell()) + { + wResCell = wResFrame.findResultCell(cellIds[wcIdx].m_gridIndex, cellIds[wcIdx].m_gridCellIndex); + } + + if (wResCell == NULL) + { + // We cant find any state. This well cell is closed. + } + else + { + double cellState = closed; + + if (wResCell->m_isOpen) + { + switch (wResFrame.m_productionType) + { + case RigWellResultFrame::PRODUCER: + cellState = producing; + break; + case RigWellResultFrame::OIL_INJECTOR: + cellState = hcInjection; + break; + case RigWellResultFrame::GAS_INJECTOR: + cellState = hcInjection; + break; + case RigWellResultFrame::WATER_INJECTOR: + cellState = water; + break; + case RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE: + cellState = closed; + break; + } + } + + wellCellStates[wcIdx] = cellState; + } + } + } + + // Find or create texture coords array for pipe surface + + if (brIt->m_surfaceDrawable.notNull()) + { + cvf::ref surfTexCoords = const_cast(brIt->m_surfaceDrawable->textureCoordArray()); + if (surfTexCoords.isNull()) + { + surfTexCoords = new cvf::Vec2fArray; + } + + brIt->m_pipeGeomGenerator->pipeSurfaceTextureCoords(surfTexCoords.p(), wellCellStates, scalarMapper.p()); + + brIt->m_surfaceDrawable->setTextureCoordArray(surfTexCoords.p()); + brIt->m_largeSurfaceDrawable->setTextureCoordArray(surfTexCoords.p()); + + if (wResFrame.m_isOpen) + { + // Use slightly larger geometry for open wells to avoid z-fighting when two wells are located at the same position + + brIt->m_surfacePart->setDrawable(brIt->m_largeSurfaceDrawable.p()); + } + else + { + brIt->m_surfacePart->setDrawable(brIt->m_surfaceDrawable.p()); + } + + brIt->m_surfacePart->setEffect(scalarMapperSurfaceEffect.p()); + } + + // Find or create texture coords array for pipe center line + if (brIt->m_centerLineDrawable.notNull()) + { + cvf::ref lineTexCoords = const_cast(brIt->m_centerLineDrawable->textureCoordArray()); + + if (lineTexCoords.isNull()) + { + lineTexCoords = new cvf::Vec2fArray; + } + + // Calculate new texture coordinates + brIt->m_pipeGeomGenerator->centerlineTextureCoords( lineTexCoords.p(), wellCellStates, scalarMapper.p()); + + // Set the new texture coordinates + + brIt->m_centerLineDrawable->setTextureCoordArray( lineTexCoords.p()); + + // Set effects + + brIt->m_centerLinePart->setEffect(scalarMapperMeshEffect.p()); + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RivSimWellPipesPartMgr::findGridIndexAndCellIndex(size_t branchIndex, size_t triangleIndex, size_t* gridIndex, size_t* cellIndex) +{ + CVF_ASSERT(branchIndex < m_wellBranches.size()); + + RivPipeBranchData* branchData = pipeBranchData(branchIndex); + if (branchData) + { + size_t segmentIndex = branchData->m_pipeGeomGenerator->segmentIndexFromTriangleIndex(triangleIndex); + + *gridIndex = branchData->m_cellIds[segmentIndex].m_gridIndex; + *cellIndex = branchData->m_cellIds[segmentIndex].m_gridCellIndex; + } + else + { + *gridIndex = cvf::UNDEFINED_SIZE_T; + *cellIndex = cvf::UNDEFINED_SIZE_T; + } +} + diff --git a/ApplicationCode/ModelVisualization/RivSimWellPipesPartMgr.h b/ApplicationCode/ModelVisualization/RivSimWellPipesPartMgr.h new file mode 100644 index 0000000000..e113df8af4 --- /dev/null +++ b/ApplicationCode/ModelVisualization/RivSimWellPipesPartMgr.h @@ -0,0 +1,86 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2011-2012 Statoil ASA, 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cvfBase.h" +#include "cvfObject.h" +#include "cvfVector3.h" + +#include "cafPdmPointer.h" +#include +#include "RigSingleWellResultsData.h" + +namespace cvf +{ + class Part; + class ModelBasicList; + class Transform; + class Effect; + class DrawableGeo; +} + +class RivPipeGeometryGenerator; +class RimEclipseView; +class RimEclipseWell; + +class RivSimWellPipesPartMgr : public cvf::Object +{ +public: + RivSimWellPipesPartMgr(RimEclipseView* reservoirView, RimEclipseWell* well); + ~RivSimWellPipesPartMgr(); + + void setScaleTransform(cvf::Transform * scaleTransform) { m_scaleTransform = scaleTransform; scheduleGeometryRegen();} + + void scheduleGeometryRegen() { m_needsTransformUpdate = true; } + + void appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model, size_t frameIndex); + void updatePipeResultColor(size_t frameIndex); + + const std::vector< std::vector >& centerLineOfWellBranches() { return m_pipeBranchesCLCoords;} + + void findGridIndexAndCellIndex(size_t branchIndex, size_t triangleIndex, size_t* gridIndex, size_t* cellIndex); + +private: + caf::PdmPointer m_rimReservoirView; + caf::PdmPointer m_rimWell; + + cvf::ref m_scaleTransform; + bool m_needsTransformUpdate; + + void buildWellPipeParts(); + + struct RivPipeBranchData + { + std::vector m_cellIds; + cvf::ref m_pipeGeomGenerator; + + cvf::ref m_surfacePart; + cvf::ref m_surfaceDrawable; + cvf::ref m_largeSurfaceDrawable; + cvf::ref m_centerLinePart; + cvf::ref m_centerLineDrawable; + + }; + + RivPipeBranchData* pipeBranchData(size_t branchIndex); + + std::list m_wellBranches; + + std::vector< std::vector > m_pipeBranchesCLCoords; +}; diff --git a/ApplicationCode/ModelVisualization/RivSingleCellPartGenerator.cpp b/ApplicationCode/ModelVisualization/RivSingleCellPartGenerator.cpp index 3e1f52435b..5819cbfa89 100644 --- a/ApplicationCode/ModelVisualization/RivSingleCellPartGenerator.cpp +++ b/ApplicationCode/ModelVisualization/RivSingleCellPartGenerator.cpp @@ -19,13 +19,15 @@ #include "RivSingleCellPartGenerator.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" #include "RigFemPartCollection.h" #include "RigGeoMechCaseData.h" +#include "RigGridBase.h" #include "RimGeoMechCase.h" #include "RivFemPartGeometryGenerator.h" +#include "RivPartPriority.h" #include "cafEffectGenerator.h" #include "cvfPart.h" @@ -36,7 +38,7 @@ //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RivSingleCellPartGenerator::RivSingleCellPartGenerator(RigCaseData* rigCaseData, size_t gridIndex, size_t cellIndex) +RivSingleCellPartGenerator::RivSingleCellPartGenerator(RigEclipseCaseData* rigCaseData, size_t gridIndex, size_t cellIndex) : m_rigCaseData(rigCaseData), m_gridIndex(gridIndex), m_cellIndex(cellIndex), @@ -74,7 +76,7 @@ cvf::ref RivSingleCellPartGenerator::createPart(const cvf::Color3f co part->setEffect(eff.p()); - part->setPriority(10000); + part->setPriority(RivPartPriority::PartType::Highlight); return part; } diff --git a/ApplicationCode/ModelVisualization/RivSingleCellPartGenerator.h b/ApplicationCode/ModelVisualization/RivSingleCellPartGenerator.h index 93a2fa370b..665acd59ce 100644 --- a/ApplicationCode/ModelVisualization/RivSingleCellPartGenerator.h +++ b/ApplicationCode/ModelVisualization/RivSingleCellPartGenerator.h @@ -27,7 +27,7 @@ namespace cvf class Part; } -class RigCaseData; +class RigEclipseCaseData; class RimGeoMechCase; //================================================================================================== @@ -37,7 +37,7 @@ class RimGeoMechCase; class RivSingleCellPartGenerator { public: - RivSingleCellPartGenerator(RigCaseData* rigCaseData, size_t gridIndex, size_t cellIndex); + RivSingleCellPartGenerator(RigEclipseCaseData* rigCaseData, size_t gridIndex, size_t cellIndex); RivSingleCellPartGenerator(RimGeoMechCase* rimGeoMechCase, size_t gridIndex, size_t cellIndex); cvf::ref createPart(const cvf::Color3f color); @@ -46,7 +46,7 @@ class RivSingleCellPartGenerator cvf::ref createMeshDrawable(); private: - RigCaseData* m_rigCaseData; + RigEclipseCaseData* m_rigCaseData; RimGeoMechCase* m_geoMechCase; size_t m_gridIndex; size_t m_cellIndex; diff --git a/ApplicationCode/ModelVisualization/RivSourceInfo.h b/ApplicationCode/ModelVisualization/RivSourceInfo.h index a346307a84..5a70203839 100644 --- a/ApplicationCode/ModelVisualization/RivSourceInfo.h +++ b/ApplicationCode/ModelVisualization/RivSourceInfo.h @@ -27,7 +27,7 @@ class RivSourceInfo : public cvf::Object { public: - RivSourceInfo(size_t gridIndex) : m_gridIndex(gridIndex) {} + explicit RivSourceInfo(size_t gridIndex) : m_gridIndex(gridIndex) {} size_t gridIndex() const { return m_gridIndex; } bool hasCellFaceMapping() const; diff --git a/ApplicationCode/ModelVisualization/RivTernarySaturationOverlayItem.h b/ApplicationCode/ModelVisualization/RivTernarySaturationOverlayItem.h index f2cdf4eb7a..23a1c29133 100644 --- a/ApplicationCode/ModelVisualization/RivTernarySaturationOverlayItem.h +++ b/ApplicationCode/ModelVisualization/RivTernarySaturationOverlayItem.h @@ -38,7 +38,7 @@ class Font; class RivTernarySaturationOverlayItem : public cvf::OverlayItem { public: - RivTernarySaturationOverlayItem(cvf::Font* font); + explicit RivTernarySaturationOverlayItem(cvf::Font* font); ~RivTernarySaturationOverlayItem(); void setRangeText(const cvf::String& soilRange, const cvf::String& sgasRange, const cvf::String& swatRange); diff --git a/ApplicationCode/ModelVisualization/RivTernaryScalarMapper.h b/ApplicationCode/ModelVisualization/RivTernaryScalarMapper.h index 2503bde2e9..2b3a297d89 100644 --- a/ApplicationCode/ModelVisualization/RivTernaryScalarMapper.h +++ b/ApplicationCode/ModelVisualization/RivTernaryScalarMapper.h @@ -35,7 +35,7 @@ namespace cvf class RivTernaryScalarMapper : public cvf::Object { public: - RivTernaryScalarMapper(const cvf::Color3f& undefScalarColor); + explicit RivTernaryScalarMapper(const cvf::Color3f& undefScalarColor); void setTernaryRanges(double soilLower, double soilUpper, double sgasLower, double sgasUpper); diff --git a/ApplicationCode/ModelVisualization/RivTernaryTextureCoordsCreator.cpp b/ApplicationCode/ModelVisualization/RivTernaryTextureCoordsCreator.cpp index a1a1400bac..6f625ae6ea 100644 --- a/ApplicationCode/ModelVisualization/RivTernaryTextureCoordsCreator.cpp +++ b/ApplicationCode/ModelVisualization/RivTernaryTextureCoordsCreator.cpp @@ -20,7 +20,7 @@ #include "RivTernaryTextureCoordsCreator.h" #include "RigCaseCellResultsData.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" #include "RigPipeInCellEvaluator.h" #include "RigResultAccessorFactory.h" #include "RigTernaryResultAccessor2d.h" @@ -34,6 +34,8 @@ #include "RivTernaryResultToTextureMapper.h" #include "RivTernaryScalarMapper.h" +#include "cvfStructGridGeometryGenerator.h" + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -47,7 +49,7 @@ RivTernaryTextureCoordsCreator::RivTernaryTextureCoordsCreator( CVF_ASSERT(quadMapper); m_quadMapper = quadMapper; - RigCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData(); + RigEclipseCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->eclipseCaseData(); size_t resTimeStepIdx = timeStepIndex; @@ -55,15 +57,15 @@ RivTernaryTextureCoordsCreator::RivTernaryTextureCoordsCreator( RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel()); - cvf::ref soil = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, resTimeStepIdx, "SOIL"); - cvf::ref sgas = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, resTimeStepIdx, "SGAS"); - cvf::ref swat = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, resTimeStepIdx, "SWAT"); + cvf::ref soil = RigResultAccessorFactory::createFromUiResultName(eclipseCase, gridIndex, porosityModel, resTimeStepIdx, "SOIL"); + cvf::ref sgas = RigResultAccessorFactory::createFromUiResultName(eclipseCase, gridIndex, porosityModel, resTimeStepIdx, "SGAS"); + cvf::ref swat = RigResultAccessorFactory::createFromUiResultName(eclipseCase, gridIndex, porosityModel, resTimeStepIdx, "SWAT"); m_resultAccessor = new RigTernaryResultAccessor(); m_resultAccessor->setTernaryResultAccessors(soil.p(), sgas.p(), swat.p()); cvf::ref pipeInCellEval = - new RigPipeInCellEvaluator(cellResultColors->reservoirView()->wellCollection()->resultWellPipeVisibilities(timeStepIndex), + new RigPipeInCellEvaluator(cellResultColors->reservoirView()->wellCollection()->resultWellGeometryVisibilities(timeStepIndex), eclipseCase->gridCellToResultWellIndex(gridIndex)); const RivTernaryScalarMapper* mapper = ternaryLegendConfig->scalarMapper(); @@ -81,7 +83,7 @@ RivTernaryTextureCoordsCreator::RivTernaryTextureCoordsCreator( size_t timeStepIndex) : m_quadMapper(NULL) { - RigCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData(); + RigEclipseCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->eclipseCaseData(); size_t resTimeStepIdx = timeStepIndex; @@ -90,9 +92,9 @@ RivTernaryTextureCoordsCreator::RivTernaryTextureCoordsCreator( RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel()); size_t gridIndex = 0; - cvf::ref soil = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, resTimeStepIdx, "SOIL"); - cvf::ref sgas = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, resTimeStepIdx, "SGAS"); - cvf::ref swat = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, resTimeStepIdx, "SWAT"); + cvf::ref soil = RigResultAccessorFactory::createFromUiResultName(eclipseCase, gridIndex, porosityModel, resTimeStepIdx, "SOIL"); + cvf::ref sgas = RigResultAccessorFactory::createFromUiResultName(eclipseCase, gridIndex, porosityModel, resTimeStepIdx, "SGAS"); + cvf::ref swat = RigResultAccessorFactory::createFromUiResultName(eclipseCase, gridIndex, porosityModel, resTimeStepIdx, "SWAT"); m_resultAccessor = new RigTernaryResultAccessor(); m_resultAccessor->setTernaryResultAccessors(soil.p(), sgas.p(), swat.p()); diff --git a/ApplicationCode/ModelVisualization/RivTextureCoordsCreator.cpp b/ApplicationCode/ModelVisualization/RivTextureCoordsCreator.cpp index 1b95d89b3f..5403cfa84a 100644 --- a/ApplicationCode/ModelVisualization/RivTextureCoordsCreator.cpp +++ b/ApplicationCode/ModelVisualization/RivTextureCoordsCreator.cpp @@ -20,7 +20,7 @@ #include "RivTextureCoordsCreator.h" #include "RigCaseCellResultsData.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" #include "RigPipeInCellEvaluator.h" #include "RigResultAccessorFactory.h" @@ -32,21 +32,23 @@ #include "RivResultToTextureMapper.h" +#include "cvfStructGridGeometryGenerator.h" + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- RivTextureCoordsCreator::RivTextureCoordsCreator(RimEclipseCellColors* cellResultColors, size_t timeStepIndex, size_t gridIndex, const cvf::StructGridQuadToCellFaceMapper* quadMapper) { - RigCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData(); + RigEclipseCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->eclipseCaseData(); m_quadMapper = quadMapper; CVF_ASSERT(quadMapper && eclipseCase ); - m_resultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, timeStepIndex, cellResultColors); + m_resultAccessor = RigResultAccessorFactory::createFromResultDefinition(eclipseCase, gridIndex, timeStepIndex, cellResultColors); cvf::ref pipeInCellEval = - new RigPipeInCellEvaluator(cellResultColors->reservoirView()->wellCollection()->resultWellPipeVisibilities(timeStepIndex), + new RigPipeInCellEvaluator(cellResultColors->reservoirView()->wellCollection()->resultWellGeometryVisibilities(timeStepIndex), eclipseCase->gridCellToResultWellIndex(gridIndex)); const cvf::ScalarMapper* mapper = cellResultColors->legendConfig()->scalarMapper(); @@ -79,11 +81,10 @@ void RivTextureCoordsCreator::createTextureCoords(cvf::Vec2fArray* quadTextureCo //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RivTextureCoordsCreator::createTextureCoords( - cvf::Vec2fArray* quadTextureCoords, - const cvf::StructGridQuadToCellFaceMapper* quadMapper, - const RigResultAccessor* resultAccessor, - const RivResultToTextureMapper* texMapper) +void RivTextureCoordsCreator::createTextureCoords(cvf::Vec2fArray* quadTextureCoords, + const cvf::StructGridQuadToCellFaceMapper* quadMapper, + const RigResultAccessor* resultAccessor, + const RivResultToTextureMapper* texMapper) { CVF_ASSERT(quadTextureCoords && quadMapper && resultAccessor && texMapper); diff --git a/ApplicationCode/ModelVisualization/RivWellConnectionsPartMgr.cpp b/ApplicationCode/ModelVisualization/RivWellConnectionsPartMgr.cpp new file mode 100644 index 0000000000..2f22b6e803 --- /dev/null +++ b/ApplicationCode/ModelVisualization/RivWellConnectionsPartMgr.cpp @@ -0,0 +1,354 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RivWellConnectionsPartMgr.h" + +#include "RimEclipseResultCase.h" +#include "RimEclipseView.h" +#include "RimEclipseWell.h" +#include "RimEclipseWellCollection.h" + +#include "RigSingleWellResultsData.h" +#include "RigFlowDiagResults.h" +#include "RigEclipseCaseData.h" +#include "RigMainGrid.h" +#include "RigActiveCellInfo.h" + +#include "cafEffectGenerator.h" +#include "cafDisplayCoordTransform.h" + +#include "cvfDrawableGeo.h" +#include "cvfPart.h" +#include "cvfModelBasicList.h" + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RivWellConnectionsPartMgr::RivWellConnectionsPartMgr(RimEclipseView* reservoirView, RimEclipseWell* well) +{ + m_rimReservoirView = reservoirView; + m_rimWell = well; + m_useCurvedArrows = true; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RivWellConnectionsPartMgr::~RivWellConnectionsPartMgr() +{ + +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RivWellConnectionsPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model, size_t frameIndex) +{ + if ( m_rimReservoirView.isNull() ) return; + if ( !m_rimReservoirView->eclipseCase() ) return; + if ( !m_rimWell->showWell() ) return; + if ( !m_rimWell->wellResults()->hasWellResult(frameIndex) ) return; + if ( !m_rimWell->wellResults()->wellResultFrame(frameIndex).m_isOpen ) return; + if ( m_rimWell->wellResults()->wellResultFrame(frameIndex).m_productionType == RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE ) return; + + bool isProducer = (m_rimWell->wellResults()->wellResultFrame(frameIndex).m_productionType == RigWellResultFrame::PRODUCER); + double pipeRadius = m_rimWell->pipeRadius(); + + cvf::Vec3d wellHeadTop; + cvf::Vec3d wellHeadBottom; + double characteristicCellSize; + double mainArrowZHeight; + cvf::ref displayCordXf; + RigFlowDiagResults* flowResults; + + std::string injectorName; + std::string producerName; + std::string crossFlowInjectorName; + std::string crossFlowProducerName; + + double fluxWidthScale = 0.0; + + { + RimEclipseResultCase* eclResCase = dynamic_cast(m_rimReservoirView->eclipseCase()); + if ( !eclResCase ) return; + + if ( !eclResCase->defaultFlowDiagSolution() ) return; + + flowResults = eclResCase->defaultFlowDiagSolution()->flowDiagResults(); + displayCordXf = m_rimReservoirView->displayCoordTransform(); + RigEclipseCaseData* rigReservoir = m_rimReservoirView->eclipseCase()->eclipseCaseData(); + + characteristicCellSize = rigReservoir->mainGrid()->characteristicIJCellSize(); + + m_rimWell->wellHeadTopBottomPosition(frameIndex, &wellHeadTop, &wellHeadBottom); + wellHeadTop = displayCordXf->transformToDisplayCoord(wellHeadTop); + wellHeadBottom = displayCordXf->transformToDisplayCoord(wellHeadBottom); + wellHeadTop.z() += characteristicCellSize; + + cvf::Vec3d activeCellsBoundingBoxMax = displayCordXf->transformToDisplayCoord(m_rimReservoirView->currentActiveCellInfo()->geometryBoundingBox().max()); + mainArrowZHeight = activeCellsBoundingBoxMax.z() + 1.5*characteristicCellSize; // Above the bbox somewhat; + + if ( isProducer ) + { + producerName = m_rimWell->name().toStdString(); + crossFlowInjectorName = RimFlowDiagSolution::addCrossFlowEnding(m_rimWell->name()).toStdString(); + } + else + { + injectorName = m_rimWell->name().toStdString(); + crossFlowProducerName = RimFlowDiagSolution::addCrossFlowEnding(m_rimWell->name()).toStdString(); + } + + double maxAbsFlux = flowResults->maxAbsPairFlux(static_cast(frameIndex)); + if (maxAbsFlux != 0.0) fluxWidthScale = characteristicCellSize / maxAbsFlux; + + } + + bool enableLighting = !m_rimReservoirView->isLightingDisabled(); + RimEclipseWellCollection* wellColl = m_rimReservoirView->wellCollection(); + + // Create potentially two the arrows to/from m_rimWell for each of the other wells in the model. + // One arrow for the "official" state of the well, and one to account for cross flow contributions + + for ( RimEclipseWell * otherWell: wellColl->wells ) + { + if ( otherWell == m_rimWell ) continue; + if ( !otherWell->wellResults()->hasWellResult(frameIndex) ) continue; + if ( !otherWell->wellResults()->wellResultFrame(frameIndex).m_isOpen ) continue; + if ( otherWell->wellResults()->wellResultFrame(frameIndex).m_productionType == RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE ) continue; + + bool isOtherProducer = (otherWell->wellResults()->wellResultFrame(frameIndex).m_productionType == RigWellResultFrame::PRODUCER); + + { + std::string otherWellName = otherWell->name().toStdString(); + std::string otherWellXfName = RimFlowDiagSolution::addCrossFlowEnding(otherWell->name()).toStdString(); + + if ( isProducer != isOtherProducer ) + { + if ( isOtherProducer ) + { + producerName = otherWellName; + crossFlowInjectorName = otherWellXfName; + } + else + { + injectorName = otherWellName; + crossFlowProducerName = otherWellXfName; + } + } + else + { + if ( isProducer ) + { + injectorName = otherWellXfName; + crossFlowProducerName = otherWellName; + } + else + { + producerName = otherWellXfName; + crossFlowInjectorName = otherWellName; + } + } + } + + std::pair injProdFluxPair = flowResults->injectorProducerPairFluxes(injectorName, producerName, static_cast(frameIndex)); + std::pair injProdFluxPairXF = flowResults->injectorProducerPairFluxes(crossFlowInjectorName, crossFlowProducerName, static_cast(frameIndex)); + + const double fluxThreshold = 0.0; // Todo : Needs threshold in Gui + + if ( fabs(injProdFluxPair.first) <= fluxThreshold + && fabs(injProdFluxPair.second) <= fluxThreshold + && fabs(injProdFluxPairXF.first) <= fluxThreshold + && fabs(injProdFluxPairXF.second)<= fluxThreshold ) continue; + + float width = fluxWidthScale * ( isProducer ? injProdFluxPair.second : injProdFluxPair.first); + float widthXf = fluxWidthScale * (!isProducer ? injProdFluxPairXF.second: injProdFluxPairXF.first); + + cvf::Vec3d otherWellHeadTop; + cvf::Vec3d otherWellHeadBottom; + { + otherWell->wellHeadTopBottomPosition(frameIndex, &otherWellHeadTop, &otherWellHeadBottom); + otherWellHeadTop = displayCordXf->transformToDisplayCoord(otherWellHeadTop); + otherWellHeadBottom = displayCordXf->transformToDisplayCoord(otherWellHeadBottom); + otherWellHeadTop.z() += characteristicCellSize; + } + + { + cvf::Vec3f startPoint = cvf::Vec3f(0.5*(wellHeadTop + otherWellHeadTop)); + if (m_useCurvedArrows) startPoint.z() = mainArrowZHeight; + cvf::Vec3f endPoint = cvf::Vec3f(wellHeadTop + (3* pipeRadius * (otherWellHeadTop - wellHeadTop).getNormalized())); + cvf::Color4f arrowColor(otherWell->wellPipeColor()); + + if ( fabs(injProdFluxPair.first) > fluxThreshold + && fabs(injProdFluxPair.second) > fluxThreshold ) + { + if ( isProducer == isOtherProducer ) + { + startPoint.z() -= 0.5*characteristicCellSize; + endPoint.z() -= 0.5*characteristicCellSize; + } + cvf::ref arrowPart = createArrowPart(startPoint, endPoint, width, isProducer, arrowColor, enableLighting); + model->addPart(arrowPart.p()); + } + + if ( fabs(injProdFluxPairXF.first) > fluxThreshold + && fabs(injProdFluxPairXF.second) > fluxThreshold ) + { + startPoint.z() -= 0.5*characteristicCellSize; + endPoint.z() -= 0.5*characteristicCellSize; + cvf::ref arrowPart = createArrowPart(startPoint, endPoint, widthXf, !isProducer, arrowColor, enableLighting); + model->addPart(arrowPart.p()); + } + } + } +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +cvf::ref RivWellConnectionsPartMgr::createArrowPart(const cvf::Vec3f& startPoint, + const cvf::Vec3f& endPoint, + float width, + bool isProducer, + const cvf::Color4f& arrowColor, + bool enableLighting) +{ + cvf::ref part = new cvf::Part; + cvf::ref geo = createArrowGeometry(startPoint, endPoint, width, isProducer); + + part->setDrawable(geo.p()); + caf::SurfaceEffectGenerator surfaceGen(arrowColor, caf::PO_1); + surfaceGen.enableLighting(enableLighting); + + cvf::ref eff = surfaceGen.generateCachedEffect(); + + part->setEffect(eff.p()); + + return part; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +cvf::ref< cvf::DrawableGeo> RivWellConnectionsPartMgr::createArrowGeometry(const cvf::Vec3f& startPoint, + const cvf::Vec3f& endPoint, + double width, + bool useArrowEnd) +{ + // Vertex layout + // _ - _ + // __________ - - _ + // - Producer end: Injector end + // 0 2 4 6 8 10 20 12 14 16 16 + // : flat : : : : : : : : end 18 18 + // 1 3 5 7 9 11 19 13 15 17 17 + + static const cvf::uint producerArrowFaceList[8 * 5 + 4] ={ 4, 0, 1, 3, 2, + 4, 2, 3, 5, 4, + 4, 4, 5, 7, 6, + 4, 6, 7, 9, 8, + 4, 8, 9, 11, 10, + 4, 10, 11, 20, 19, + 4, 19, 20, 13, 12, + 4, 12, 13, 15, 14, + 3, 16, 17, 18 }; + + static const cvf::uint injectorArrowFaceList[8 * 5 + 8] ={ 4, 0, 1, 3, 2, + 4, 2, 3, 5, 4, + 4, 4, 5, 7, 6, + 4, 6, 7, 9, 8, + 4, 8, 9, 11, 10, + 4, 10, 11, 20, 19, + 4, 19, 20, 13, 12, + 4, 12, 13, 15, 14, + 3, 14, 18, 16, + 3, 18, 15, 17 }; + + + cvf::Vec3f endPointInTopPlane = endPoint; + if (m_useCurvedArrows) endPointInTopPlane.z() = startPoint.z(); + + cvf::Vec3f heightDiff = cvf::Vec3f::ZERO; + if (m_useCurvedArrows) heightDiff.z() = (startPoint.z() - endPoint.z()); + + cvf::Vec3f fromTo = endPointInTopPlane - startPoint; + float length = fromTo.length(); + + float halfWidth = width * 0.5; + cvf::Vec3f widthVector = halfWidth *(fromTo.getNormalized() ^ -cvf::Vec3f::Z_AXIS); + + float heightScale = 0.3*length * 0.15; + cvf::Vec3f heightScaleVec = cvf::Vec3f::ZERO; + + if (m_useCurvedArrows) heightScaleVec.z() = heightScale; + + float endStart = 0.4f; + float endStep = (1.0f - endStart) / 7.5f; + + cvf::ref< cvf::Vec3fArray> arrowVertexArray = new cvf::Vec3fArray; + arrowVertexArray->resize(18+3); + + (*arrowVertexArray)[0] = 0.0f * fromTo + startPoint + widthVector; + (*arrowVertexArray)[1] = 0.0f * fromTo + startPoint - widthVector; + (*arrowVertexArray)[2] = endStart * fromTo + startPoint + widthVector; + (*arrowVertexArray)[3] = endStart * fromTo + startPoint - widthVector; + + (*arrowVertexArray)[4] = (1*endStep + endStart) * fromTo + startPoint + widthVector + 0.250f * heightScaleVec;//0.0250f * heightDiff; + (*arrowVertexArray)[5] = (1*endStep + endStart) * fromTo + startPoint - widthVector + 0.250f * heightScaleVec;//0.0250f * heightDiff; + (*arrowVertexArray)[6] = (2*endStep + endStart) * fromTo + startPoint + widthVector + 0.750f * heightScaleVec;//0.0750f * heightDiff; + (*arrowVertexArray)[7] = (2*endStep + endStart) * fromTo + startPoint - widthVector + 0.750f * heightScaleVec;//0.0750f * heightDiff; + (*arrowVertexArray)[8] = (3*endStep + endStart) * fromTo + startPoint + widthVector + 1.000f * heightScaleVec;//0.1000f * heightDiff; + (*arrowVertexArray)[9] = (3*endStep + endStart) * fromTo + startPoint - widthVector + 1.000f * heightScaleVec;//0.1000f * heightDiff; + (*arrowVertexArray)[10] = (4*endStep + endStart) * fromTo + startPoint + widthVector + 0.875f * heightScaleVec;//0.0875f * heightDiff; + (*arrowVertexArray)[11] = (4*endStep + endStart) * fromTo + startPoint - widthVector + 0.875f * heightScaleVec;//0.0875f * heightDiff; + (*arrowVertexArray)[19] = (4.7f*endStep + endStart) * fromTo + startPoint + widthVector + 0.400f * heightScaleVec;//0.0875f * heightDiff; + (*arrowVertexArray)[20] = (4.7f*endStep + endStart) * fromTo + startPoint - widthVector + 0.400f * heightScaleVec;//0.0875f * heightDiff; + + (*arrowVertexArray)[12] = (5*endStep + endStart) * fromTo + startPoint + widthVector; + (*arrowVertexArray)[13] = (5*endStep + endStart) * fromTo + startPoint - widthVector; + + (*arrowVertexArray)[14] = (6*endStep + endStart) * fromTo + startPoint + widthVector - 0.5f * heightDiff; + (*arrowVertexArray)[15] = (6*endStep + endStart) * fromTo + startPoint - widthVector - 0.5f * heightDiff; + + if ( useArrowEnd ) + { + (*arrowVertexArray)[16] = (6*endStep + endStart) * fromTo + startPoint + 1.6f * widthVector - 0.5f * heightDiff; + (*arrowVertexArray)[17] = (6*endStep + endStart) * fromTo + startPoint - 1.6f * widthVector - 0.5f * heightDiff; + (*arrowVertexArray)[18] = 1.0f * fromTo + startPoint - 1.0f * heightDiff; + } + else + { + (*arrowVertexArray)[16] = 1.0f * fromTo + startPoint + 0.5f * widthVector - 1.0f * heightDiff; + (*arrowVertexArray)[17] = 1.0f * fromTo + startPoint - 0.5f * widthVector - 1.0f * heightDiff; + (*arrowVertexArray)[18] = (6*endStep + endStart) * fromTo + startPoint - 0.5f * heightDiff; + } + + cvf::ref geo = new cvf::DrawableGeo; + geo->setVertexArray(arrowVertexArray.p()); + + if ( useArrowEnd ) + geo->setFromFaceList(cvf::UIntArray(producerArrowFaceList, 8 * 5 + 4)); + else + geo->setFromFaceList(cvf::UIntArray(injectorArrowFaceList, 8 * 5 + 8)); + + geo->computeNormals(); + + return geo; +} \ No newline at end of file diff --git a/ApplicationCode/ModelVisualization/RivWellConnectionsPartMgr.h b/ApplicationCode/ModelVisualization/RivWellConnectionsPartMgr.h new file mode 100644 index 0000000000..c1d618c016 --- /dev/null +++ b/ApplicationCode/ModelVisualization/RivWellConnectionsPartMgr.h @@ -0,0 +1,73 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cvfBase.h" +#include "cvfObject.h" + +#include "cafPdmPointer.h" +#include "cvfVector3.h" +#include "cvfColor4.h" + +#include +#include +#include + +namespace cvf +{ + class ModelBasicList; + class DrawableGeo; + class Part; +} + +class RivPipeGeometryGenerator; +class RimEclipseView; +class RimEclipseWell; +class RigWellResultFrame; + +struct RigWellResultPoint; + +class RivWellConnectionsPartMgr : public cvf::Object +{ +public: + RivWellConnectionsPartMgr(RimEclipseView* reservoirView, RimEclipseWell* well); + ~RivWellConnectionsPartMgr(); + + void appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model, size_t frameIndex); + + + +private: + cvf::ref createArrowPart(const cvf::Vec3f& startPoint, + const cvf::Vec3f& endPoint, + float width, + bool isProducer, + const cvf::Color4f& arrowColor, + bool enableLighting); + cvf::ref< cvf::DrawableGeo> createArrowGeometry(const cvf::Vec3f& startPoint, + const cvf::Vec3f& endPoint, + double width, + bool useArrowEnd); + +private: + caf::PdmPointer m_rimReservoirView; + caf::PdmPointer m_rimWell; + + bool m_useCurvedArrows; +}; diff --git a/ApplicationCode/ModelVisualization/RivWellHeadPartMgr.cpp b/ApplicationCode/ModelVisualization/RivWellHeadPartMgr.cpp index 26ea27b554..b2de1de124 100644 --- a/ApplicationCode/ModelVisualization/RivWellHeadPartMgr.cpp +++ b/ApplicationCode/ModelVisualization/RivWellHeadPartMgr.cpp @@ -24,38 +24,33 @@ #include "RiaApplication.h" -#include "RigCaseData.h" +#include "RigActiveCellInfo.h" #include "RigCell.h" +#include "RigEclipseCaseData.h" +#include "RigMainGrid.h" +#include "RigSingleWellResultsData.h" -#include "Rim3dOverlayInfoConfig.h" -#include "RimCellEdgeColors.h" -#include "RimCellRangeFilterCollection.h" #include "RimEclipseCase.h" -#include "RimEclipseCellColors.h" -#include "RimEclipsePropertyFilterCollection.h" #include "RimEclipseView.h" #include "RimEclipseWell.h" #include "RimEclipseWellCollection.h" -#include "RimLegendConfig.h" -#include "RimReservoirCellResultsStorage.h" #include "RivPipeGeometryGenerator.h" -#include "RivWellPipesPartMgr.h" +#include "RivPartPriority.h" +#include "RivSimWellPipeSourceInfo.h" #include "cafEffectGenerator.h" -#include "cafPdmFieldCvfMat4d.h" #include "cvfArrowGenerator.h" #include "cvfDrawableGeo.h" #include "cvfDrawableText.h" -#include "cvfFixedAtlasFont.h" #include "cvfGeometryBuilderFaceList.h" -#include "cvfLibCore.h" #include "cvfModelBasicList.h" #include "cvfPart.h" -#include "cvfPrimitiveSetIndexedUShort.h" #include "cvfTransform.h" #include "cvfqtUtils.h" +#include "cafDisplayCoordTransform.h" + //-------------------------------------------------------------------------------------------------- @@ -75,85 +70,51 @@ RivWellHeadPartMgr::~RivWellHeadPartMgr() } - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void RivWellHeadPartMgr::buildWellHeadParts(size_t frameIndex) { - m_wellHeadParts.clear(); + clearAllGeometry(); if (m_rimReservoirView.isNull()) return; - - RigCaseData* rigReservoir = m_rimReservoirView->eclipseCase()->reservoirData(); + + RigEclipseCaseData* rigReservoir = m_rimReservoirView->eclipseCase()->eclipseCaseData(); RimEclipseWell* well = m_rimWell; + + double characteristicCellSize = rigReservoir->mainGrid()->characteristicIJCellSize(); - RigSingleWellResultsData* wellResults = well->wellResults(); - - if (wellResults->m_staticWellCells.m_wellResultBranches.size() == 0) + cvf::Vec3d whEndPos; + cvf::Vec3d whStartPos; { - wellResults->computeStaticWellCellPath(); - } - if (wellResults->m_staticWellCells.m_wellResultBranches.size() == 0) return; + well->wellHeadTopBottomPosition(frameIndex, &whEndPos, &whStartPos); - if (!wellResults->hasWellResult(frameIndex)) return; - - const RigWellResultFrame& wellResultFrame = wellResults->wellResultFrame(frameIndex); + cvf::ref transForm = m_rimReservoirView->displayCoordTransform(); + whEndPos = transForm->transformToDisplayCoord(whEndPos); + whStartPos = transForm->transformToDisplayCoord(whStartPos); + whEndPos.z() += characteristicCellSize; + } - const RigCell& whCell = rigReservoir->cellFromWellResultCell(wellResultFrame.m_wellHead); + - double characteristicCellSize = rigReservoir->mainGrid()->characteristicIJCellSize(); + if (!well->wellResults()->hasWellResult(frameIndex)) return; - // Match this position with pipe start position in RivWellPipesPartMgr::calculateWellPipeCenterline() - cvf::Vec3d whStartPos = whCell.faceCenter(cvf::StructGridInterface::NEG_K); - whStartPos -= rigReservoir->mainGrid()->displayModelOffset(); - whStartPos.transformPoint(m_scaleTransform->worldTransform()); + const RigWellResultFrame& wellResultFrame = well->wellResults()->wellResultFrame(frameIndex); - // Compute well head based on the z position of the top of the K column the well head is part of - cvf::Vec3d whEndPos = whStartPos; + double pipeRadius = m_rimWell->pipeRadius(); - if (m_rimReservoirView->wellCollection()->wellHeadPosition() == RimEclipseWellCollection::WELLHEAD_POS_TOP_COLUMN) + if (wellResultFrame.m_isOpen) { - // Position well head at top active cell of IJ-column - - size_t i, j, k; - rigReservoir->mainGrid()->ijkFromCellIndex(whCell.mainGridCellIndex(), &i, &j, &k); - - size_t kIndexWellHeadCell = k; - k = 0; - - size_t topActiveCellIndex = rigReservoir->mainGrid()->cellIndexFromIJK(i, j, k); - while(k < kIndexWellHeadCell && !m_rimReservoirView->currentActiveCellInfo()->isActive(topActiveCellIndex)) - { - k++; - topActiveCellIndex = rigReservoir->mainGrid()->cellIndexFromIJK(i, j, k); - } - - const RigCell& topActiveCell = rigReservoir->mainGrid()->cell(topActiveCellIndex); - cvf::Vec3d topCellPos = topActiveCell.faceCenter(cvf::StructGridInterface::NEG_K); - topCellPos -= rigReservoir->mainGrid()->displayModelOffset(); - topCellPos.transformPoint(m_scaleTransform->worldTransform()); - - // Modify position if top active cell is closer to sea than well head - if (kIndexWellHeadCell > k) - { - whEndPos.z() = topCellPos.z() + characteristicCellSize; - } + // Use slightly larger well head arrow when well is open + pipeRadius *= 1.1; } - else - { - // Position well head at top of active cells bounding box - - cvf::Vec3d activeCellsBoundingBoxMax = m_rimReservoirView->currentActiveCellInfo()->geometryBoundingBox().max(); - activeCellsBoundingBoxMax -= rigReservoir->mainGrid()->displayModelOffset(); - activeCellsBoundingBoxMax.transformPoint(m_scaleTransform->worldTransform()); - whEndPos.z() = activeCellsBoundingBoxMax.z(); - } + // Upper part of simulation well pipe is defined to use branch index 0 + cvf::ref sourceInfo = new RivSimWellPipeSourceInfo(m_rimWell, 0); cvf::Vec3d arrowPosition = whEndPos; - arrowPosition.z() += 2.0; + arrowPosition.z() += pipeRadius; // Well head pipe geometry { @@ -167,7 +128,7 @@ void RivWellHeadPartMgr::buildWellHeadParts(size_t frameIndex) pipeGeomGenerator->setPipeColor(well->wellPipeColor()); pipeGeomGenerator->setCrossSectionVertexCount(m_rimReservoirView->wellCollection()->pipeCrossSectionVertexCount()); - double pipeRadius = m_rimReservoirView->wellCollection()->pipeRadiusScaleFactor() * m_rimWell->pipeRadiusScaleFactor() * characteristicCellSize; + pipeGeomGenerator->setRadius(pipeRadius); cvf::ref pipeSurface = pipeGeomGenerator->createPipeSurface(); @@ -180,11 +141,17 @@ void RivWellHeadPartMgr::buildWellHeadParts(size_t frameIndex) part->setDrawable(pipeSurface.p()); caf::SurfaceEffectGenerator surfaceGen(cvf::Color4f(well->wellPipeColor()), caf::PO_1); + if (m_rimReservoirView && m_rimReservoirView->isLightingDisabled()) + { + surfaceGen.enableLighting(false); + } + cvf::ref eff = surfaceGen.generateCachedEffect(); part->setEffect(eff.p()); + part->setSourceInfo(sourceInfo.p()); - m_wellHeadParts.push_back(part.p()); + m_wellHeadPipeSurfacePart = part; } if (centerLineDrawable.notNull()) @@ -197,12 +164,20 @@ void RivWellHeadPartMgr::buildWellHeadParts(size_t frameIndex) cvf::ref eff = meshGen.generateCachedEffect(); part->setEffect(eff.p()); + part->setSourceInfo(sourceInfo.p()); - m_wellHeadParts.push_back(part.p()); + m_wellHeadPipeCenterPart = part; } } - double arrowLength = characteristicCellSize * m_rimReservoirView->wellCollection()->wellHeadScaleFactor(); + double arrowLength = characteristicCellSize * m_rimReservoirView->wellCollection()->wellHeadScaleFactor() * m_rimWell->wellHeadScaleFactor(); + + if (wellResultFrame.m_isOpen) + { + // Use slightly larger well head arrow when well is open + arrowLength = 1.1 * arrowLength; + } + cvf::Vec3d textPosition = arrowPosition; textPosition.z() += 1.2 * arrowLength; @@ -213,6 +188,10 @@ void RivWellHeadPartMgr::buildWellHeadParts(size_t frameIndex) } double ijScaleFactor = arrowLength / 6; + if (wellResultFrame.m_isOpen) + { + ijScaleFactor *= 1.1; + } matr(0, 0) *= ijScaleFactor; matr(1, 1) *= ijScaleFactor; matr(2, 2) *= arrowLength; @@ -255,34 +234,54 @@ void RivWellHeadPartMgr::buildWellHeadParts(size_t frameIndex) part->setDrawable(geo1.p()); cvf::Color4f headColor(cvf::Color3::GRAY); - if (wellResultFrame.m_isOpen) + + RimEclipseWellCollection* wellColl = nullptr; + if (m_rimWell) { - if (wellResultFrame.m_productionType == RigWellResultFrame::PRODUCER) - { - headColor = cvf::Color4f(cvf::Color3::GREEN); - } - else if (wellResultFrame.m_productionType == RigWellResultFrame::OIL_INJECTOR) - { - headColor = cvf::Color4f(cvf::Color3::ORANGE); - } - else if (wellResultFrame.m_productionType == RigWellResultFrame::GAS_INJECTOR) - { - headColor = cvf::Color4f(cvf::Color3::RED); - } - else if (wellResultFrame.m_productionType == RigWellResultFrame::WATER_INJECTOR) + m_rimWell->firstAncestorOrThisOfType(wellColl); + } + + if (wellColl && wellColl->showConnectionStatusColors()) + { + if (wellResultFrame.m_isOpen) { - headColor = cvf::Color4f(cvf::Color3::BLUE); + if (wellResultFrame.m_productionType == RigWellResultFrame::PRODUCER) + { + headColor = cvf::Color4f(cvf::Color3::GREEN); + } + else if (wellResultFrame.m_productionType == RigWellResultFrame::OIL_INJECTOR) + { + headColor = cvf::Color4f(cvf::Color3::ORANGE); + } + else if (wellResultFrame.m_productionType == RigWellResultFrame::GAS_INJECTOR) + { + headColor = cvf::Color4f(cvf::Color3::RED); + } + else if (wellResultFrame.m_productionType == RigWellResultFrame::WATER_INJECTOR) + { + headColor = cvf::Color4f(cvf::Color3::BLUE); + } } } + else + { + headColor = cvf::Color4f(m_rimWell->wellPipeColor()); + } caf::SurfaceEffectGenerator surfaceGen(headColor, caf::PO_1); + if (m_rimReservoirView && m_rimReservoirView->isLightingDisabled()) + { + surfaceGen.enableLighting(false); + } cvf::ref eff = surfaceGen.generateCachedEffect(); part->setEffect(eff.p()); - m_wellHeadParts.push_back(part.p()); + part->setSourceInfo(sourceInfo.p()); + + m_wellHeadArrowPart = part; } - if (m_rimReservoirView->wellCollection()->showWellLabel() && well->showWellLabel() && !well->name().isEmpty()) + if (well->showWellLabel() && !well->name().isEmpty()) { cvf::Font* font = RiaApplication::instance()->customFont(); @@ -294,7 +293,7 @@ void RivWellHeadPartMgr::buildWellHeadParts(size_t frameIndex) drawableText->setVerticalAlignment(cvf::TextDrawer::CENTER); drawableText->setTextColor(m_rimReservoirView->wellCollection()->wellLabelColor()); - cvf::String cvfString = cvfqt::Utils::toString(well->name()); + cvf::String cvfString = cvfqt::Utils::toString(m_rimWell->name()); cvf::Vec3f textCoord(textPosition); drawableText->addText(cvfString, textCoord); @@ -306,30 +305,55 @@ void RivWellHeadPartMgr::buildWellHeadParts(size_t frameIndex) cvf::ref eff = new cvf::Effect; part->setEffect(eff.p()); - part->setPriority(11); + part->setPriority(RivPartPriority::PartType::Text); + part->setSourceInfo(sourceInfo.p()); - m_wellHeadParts.push_back(part.p()); + m_wellHeadLabelPart = part; } } - +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RivWellHeadPartMgr::clearAllGeometry() +{ + m_wellHeadArrowPart = nullptr; + m_wellHeadLabelPart = nullptr; + m_wellHeadPipeCenterPart = nullptr; + m_wellHeadPipeSurfacePart = nullptr; +} //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void RivWellHeadPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model, size_t frameIndex) { - if (m_rimWell.isNull()) return; if (m_rimReservoirView.isNull()) return; - if (m_rimReservoirView->wellCollection()->showWellHead() == false) return; + if (m_rimWell.isNull()) return; + + RimEclipseWellCollection* wellCollection = nullptr; + m_rimWell->firstAncestorOrThisOfType(wellCollection); + if (!wellCollection) return; + if (!m_rimWell->isWellPipeVisible(frameIndex)) return; buildWellHeadParts(frameIndex); - size_t i; - for (i = 0; i < m_wellHeadParts.size(); i++) + // Always add pipe part of well head + if (m_wellHeadPipeCenterPart.notNull()) model->addPart(m_wellHeadPipeCenterPart.p()); + if (m_wellHeadPipeSurfacePart.notNull()) model->addPart(m_wellHeadPipeSurfacePart.p()); + + if (m_rimWell->showWellLabel() && + m_wellHeadLabelPart.notNull()) { - model->addPart(m_wellHeadParts.at(i)); + model->addPart(m_wellHeadLabelPart.p()); + } + + if (m_rimWell->showWellHead() && + m_wellHeadArrowPart.notNull()) + { + model->addPart(m_wellHeadArrowPart.p()); } } + diff --git a/ApplicationCode/ModelVisualization/RivWellHeadPartMgr.h b/ApplicationCode/ModelVisualization/RivWellHeadPartMgr.h index b1b1f991c2..74e42bd5b7 100644 --- a/ApplicationCode/ModelVisualization/RivWellHeadPartMgr.h +++ b/ApplicationCode/ModelVisualization/RivWellHeadPartMgr.h @@ -22,7 +22,6 @@ #include "cvfAssert.h" #include "cvfObject.h" #include "cafPdmPointer.h" -#include "cvfCollection.h" namespace cvf { @@ -48,12 +47,17 @@ class RivWellHeadPartMgr : public cvf::Object private: void buildWellHeadParts(size_t frameIndex); + void clearAllGeometry(); private: - caf::PdmPointer m_rimReservoirView; - caf::PdmPointer m_rimWell; + caf::PdmPointer m_rimReservoirView; + caf::PdmPointer m_rimWell; - cvf::ref m_scaleTransform; - cvf::Collection< cvf::Part > m_wellHeadParts; + cvf::ref m_scaleTransform; + + cvf::ref< cvf::Part > m_wellHeadArrowPart; + cvf::ref< cvf::Part > m_wellHeadLabelPart; + cvf::ref< cvf::Part > m_wellHeadPipeSurfacePart; + cvf::ref< cvf::Part > m_wellHeadPipeCenterPart; }; diff --git a/ApplicationCode/ModelVisualization/RivWellPathCollectionPartMgr.h b/ApplicationCode/ModelVisualization/RivWellPathCollectionPartMgr.h index 386e83d8f6..6c8131905e 100644 --- a/ApplicationCode/ModelVisualization/RivWellPathCollectionPartMgr.h +++ b/ApplicationCode/ModelVisualization/RivWellPathCollectionPartMgr.h @@ -42,7 +42,7 @@ namespace cvf class RivWellPathCollectionPartMgr : public cvf::Object { public: - RivWellPathCollectionPartMgr(RimWellPathCollection* wellPathCollection); + explicit RivWellPathCollectionPartMgr(RimWellPathCollection* wellPathCollection); ~RivWellPathCollectionPartMgr(); void scheduleGeometryRegen(); diff --git a/ApplicationCode/ModelVisualization/RivWellPathPartMgr.cpp b/ApplicationCode/ModelVisualization/RivWellPathPartMgr.cpp index 3f07969fb9..2c594ed4c3 100644 --- a/ApplicationCode/ModelVisualization/RivWellPathPartMgr.cpp +++ b/ApplicationCode/ModelVisualization/RivWellPathPartMgr.cpp @@ -29,6 +29,7 @@ #include "RimWellPathCollection.h" #include "RivPipeGeometryGenerator.h" +#include "RivPartPriority.h" #include "RivWellPathSourceInfo.h" #include "cafEffectGenerator.h" @@ -218,7 +219,7 @@ void RivWellPathPartMgr::buildWellPathParts(cvf::Vec3d displayModelOffset, doubl cvf::ref eff = new cvf::Effect; part->setEffect(eff.p()); - part->setPriority(1000); + part->setPriority(RivPartPriority::Text); m_wellLabelPart = part; } diff --git a/ApplicationCode/ModelVisualization/RivWellPathPartMgr.h b/ApplicationCode/ModelVisualization/RivWellPathPartMgr.h index 18e8e1c646..adffbb73bf 100644 --- a/ApplicationCode/ModelVisualization/RivWellPathPartMgr.h +++ b/ApplicationCode/ModelVisualization/RivWellPathPartMgr.h @@ -40,7 +40,7 @@ class RimWellPath; class RivWellPathPartMgr : public cvf::Object { public: - RivWellPathPartMgr(RimWellPath* wellPath); + explicit RivWellPathPartMgr(RimWellPath* wellPath); ~RivWellPathPartMgr(); void setScaleTransform(cvf::Transform * scaleTransform); diff --git a/ApplicationCode/ModelVisualization/RivWellPathSourceInfo.cpp b/ApplicationCode/ModelVisualization/RivWellPathSourceInfo.cpp index 97fe54a4e6..41b008e230 100644 --- a/ApplicationCode/ModelVisualization/RivWellPathSourceInfo.cpp +++ b/ApplicationCode/ModelVisualization/RivWellPathSourceInfo.cpp @@ -19,6 +19,8 @@ #include "RivWellPathSourceInfo.h" +#include "RigWellPath.h" + #include "RimCase.h" #include "RimWellPath.h" #include "RimWellPathCollection.h" diff --git a/ApplicationCode/ModelVisualization/RivWellPathSourceInfo.h b/ApplicationCode/ModelVisualization/RivWellPathSourceInfo.h index 27d24ad0bd..6bb3935cdf 100644 --- a/ApplicationCode/ModelVisualization/RivWellPathSourceInfo.h +++ b/ApplicationCode/ModelVisualization/RivWellPathSourceInfo.h @@ -33,7 +33,7 @@ class RimWellPath; class RivWellPathSourceInfo : public cvf::Object { public: - RivWellPathSourceInfo(RimWellPath* wellPath); + explicit RivWellPathSourceInfo(RimWellPath* wellPath); RimWellPath* wellPath() const; diff --git a/ApplicationCode/ModelVisualization/RivWellPipeSourceInfo.cpp b/ApplicationCode/ModelVisualization/RivWellPipeSourceInfo.cpp deleted file mode 100644 index 2e90f699bb..0000000000 --- a/ApplicationCode/ModelVisualization/RivWellPipeSourceInfo.cpp +++ /dev/null @@ -1,39 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2015- Statoil ASA -// Copyright (C) 2015- Ceetron Solutions 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#include "RivWellPipeSourceInfo.h" - -#include "RimEclipseWell.h" - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RivEclipseWellSourceInfo::RivEclipseWellSourceInfo(RimEclipseWell* eclipseWell) - : m_eclipseWell(eclipseWell) -{ -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RimEclipseWell* RivEclipseWellSourceInfo::well() const -{ - return m_eclipseWell.p(); -} diff --git a/ApplicationCode/ModelVisualization/RivWellPipeSourceInfo.h b/ApplicationCode/ModelVisualization/RivWellPipeSourceInfo.h deleted file mode 100644 index 41472b6dd1..0000000000 --- a/ApplicationCode/ModelVisualization/RivWellPipeSourceInfo.h +++ /dev/null @@ -1,37 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2015- Statoil ASA -// Copyright (C) 2015- Ceetron Solutions 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#pragma once - -#include "cvfBase.h" -#include "cvfObject.h" -#include "cafPdmPointer.h" - -class RimEclipseWell; - -class RivEclipseWellSourceInfo : public cvf::Object -{ -public: - RivEclipseWellSourceInfo(RimEclipseWell* eclipseWell); - - RimEclipseWell* well() const; - -private: - caf::PdmPointer m_eclipseWell; -}; diff --git a/ApplicationCode/ModelVisualization/RivWellPipesPartMgr.cpp b/ApplicationCode/ModelVisualization/RivWellPipesPartMgr.cpp deleted file mode 100644 index 715c134786..0000000000 --- a/ApplicationCode/ModelVisualization/RivWellPipesPartMgr.cpp +++ /dev/null @@ -1,307 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#include "RivWellPipesPartMgr.h" - -#include "RigCaseData.h" -#include "RigCell.h" - -#include "Rim3dOverlayInfoConfig.h" -#include "RimCellEdgeColors.h" -#include "RimCellRangeFilterCollection.h" -#include "RimEclipseCase.h" -#include "RimEclipseCellColors.h" -#include "RimEclipsePropertyFilterCollection.h" -#include "RimEclipseView.h" -#include "RimEclipseWell.h" -#include "RimEclipseWellCollection.h" -#include "RimReservoirCellResultsStorage.h" - -#include "RivPipeGeometryGenerator.h" -#include "RivWellPathSourceInfo.h" -#include "RivWellPipeSourceInfo.h" - -#include "cafEffectGenerator.h" -#include "cafPdmFieldCvfColor.h" -#include "cafPdmFieldCvfMat4d.h" - -#include "cvfDrawableGeo.h" -#include "cvfLibCore.h" -#include "cvfModelBasicList.h" -#include "cvfPart.h" -#include "cvfRay.h" -#include "cvfScalarMapperDiscreteLinear.h" -#include "cvfTransform.h" -#include "RigSimulationWellCenterLineCalculator.h" - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RivWellPipesPartMgr::RivWellPipesPartMgr(RimEclipseView* reservoirView, RimEclipseWell* well) -{ - m_rimReservoirView = reservoirView; - m_rimWell = well; - m_needsTransformUpdate = true; - - // Setup a scalar mapper - cvf::ref scalarMapper = new cvf::ScalarMapperDiscreteLinear; - cvf::Color3ubArray legendColors; - legendColors.resize(4); - legendColors[0] = cvf::Color3::GRAY; - legendColors[1] = cvf::Color3::GREEN; - legendColors[2] = cvf::Color3::BLUE; - legendColors[3] = cvf::Color3::RED; - scalarMapper->setColors(legendColors); - scalarMapper->setRange(0.0 , 4.0); - scalarMapper->setLevelCount(4, true); - - m_scalarMapper = scalarMapper; - - caf::ScalarMapperEffectGenerator surfEffGen(scalarMapper.p(), caf::PO_1); - m_scalarMapperSurfaceEffect = surfEffGen.generateCachedEffect(); - - caf::ScalarMapperMeshEffectGenerator meshEffGen(scalarMapper.p()); - m_scalarMapperMeshEffect = meshEffGen.generateCachedEffect(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RivWellPipesPartMgr::~RivWellPipesPartMgr() -{ - -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RivWellPipesPartMgr::buildWellPipeParts() -{ - if (m_rimReservoirView.isNull()) return; - - m_wellBranches.clear(); - - m_pipeBranchesCLCoords.clear(); - std::vector< std::vector > pipeBranchesCellIds; - - RigSimulationWellCenterLineCalculator::calculateWellPipeCenterline(m_rimWell.p(), m_pipeBranchesCLCoords, pipeBranchesCellIds); - - double characteristicCellSize = m_rimReservoirView->eclipseCase()->reservoirData()->mainGrid()->characteristicIJCellSize(); - double pipeRadius = m_rimReservoirView->wellCollection()->pipeRadiusScaleFactor() *m_rimWell->pipeRadiusScaleFactor() * characteristicCellSize; - - cvf::ref sourceInfo = new RivEclipseWellSourceInfo(m_rimWell); - - for (size_t brIdx = 0; brIdx < pipeBranchesCellIds.size(); ++brIdx) - { - m_wellBranches.push_back(RivPipeBranchData()); - RivPipeBranchData& pbd = m_wellBranches.back(); - - pbd.m_cellIds = pipeBranchesCellIds[brIdx]; - - pbd.m_pipeGeomGenerator = new RivPipeGeometryGenerator; - - pbd.m_pipeGeomGenerator->setRadius(pipeRadius); - pbd.m_pipeGeomGenerator->setCrossSectionVertexCount(m_rimReservoirView->wellCollection()->pipeCrossSectionVertexCount()); - pbd.m_pipeGeomGenerator->setPipeColor( m_rimWell->wellPipeColor()); - - cvf::ref cvfCoords = new cvf::Vec3dArray; - cvfCoords->assign(m_pipeBranchesCLCoords[brIdx]); - - // Scale the centerline coordinates using the Z-scale transform of the grid and correct for the display offset. - const RigMainGrid* mainGrid = m_rimReservoirView->eclipseCase()->reservoirData()->mainGrid(); - - for (size_t cIdx = 0; cIdx < cvfCoords->size(); ++cIdx) - { - cvf::Vec4d transfCoord = m_scaleTransform->worldTransform()* cvf::Vec4d((*cvfCoords)[cIdx] - mainGrid->displayModelOffset(), 1); - (*cvfCoords)[cIdx][0] = transfCoord[0]; - (*cvfCoords)[cIdx][1] = transfCoord[1]; - (*cvfCoords)[cIdx][2] = transfCoord[2]; - } - - pbd.m_pipeGeomGenerator->setPipeCenterCoords(cvfCoords.p()); - pbd.m_surfaceDrawable = pbd.m_pipeGeomGenerator->createPipeSurface(); - pbd.m_centerLineDrawable = pbd.m_pipeGeomGenerator->createCenterLine(); - - if (pbd.m_surfaceDrawable.notNull()) - { - pbd.m_surfacePart = new cvf::Part; - pbd.m_surfacePart->setDrawable(pbd.m_surfaceDrawable.p()); - - caf::SurfaceEffectGenerator surfaceGen(cvf::Color4f(m_rimWell->wellPipeColor()), caf::PO_1); - cvf::ref eff = surfaceGen.generateCachedEffect(); - - pbd.m_surfacePart->setEffect(eff.p()); - - pbd.m_surfacePart->setSourceInfo(sourceInfo.p()); - } - - if (pbd.m_centerLineDrawable.notNull()) - { - pbd.m_centerLinePart = new cvf::Part; - pbd.m_centerLinePart->setDrawable(pbd.m_centerLineDrawable.p()); - - caf::MeshEffectGenerator gen(m_rimWell->wellPipeColor()); - cvf::ref eff = gen.generateCachedEffect(); - - pbd.m_centerLinePart->setEffect(eff.p()); - } - } - - m_needsTransformUpdate = false; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RivWellPipesPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model, size_t frameIndex) -{ - if (m_rimReservoirView.isNull()) return; - if (m_rimWell.isNull()) return; - if (!m_rimWell->isWellPipeVisible(frameIndex)) return; - - if (m_needsTransformUpdate) buildWellPipeParts(); - - std::list::iterator it; - for (it = m_wellBranches.begin(); it != m_wellBranches.end(); ++it) - { - if (it->m_surfacePart.notNull()) - { - model->addPart(it->m_surfacePart.p()); - } - if (it->m_centerLinePart.notNull()) - { - model->addPart(it->m_centerLinePart.p()); - } - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RivWellPipesPartMgr::updatePipeResultColor(size_t frameIndex) -{ - if (m_rimWell == NULL) return; - - RigSingleWellResultsData* wRes = m_rimWell->wellResults(); - if (wRes == NULL) return; - - if (frameIndex < wRes->firstResultTimeStep()) return; // Or reset colors or something - - const double closed = -0.1, producing = 1.5, water = 2.5, hcInjection = 3.5; // Closed set to -0.1 instead of 0.5 to workaround bug in the scalar mapper. - - std::list::iterator brIt; - const RigWellResultFrame& wResFrame = wRes->wellResultFrame(frameIndex); - - std::vector wellCellStates; - - for (brIt = m_wellBranches.begin(); brIt != m_wellBranches.end(); ++brIt) - { - // Initialize well states to "closed" state - wellCellStates.clear(); - wellCellStates.resize(brIt->m_cellIds.size(), closed); - - const std::vector & cellIds = brIt->m_cellIds; - - for (size_t wcIdx = 0; wcIdx < cellIds.size(); ++wcIdx) - { - // we need a faster lookup, I guess - const RigWellResultPoint* wResCell = NULL; - - if (cellIds[wcIdx].isCell()) - { - wResCell = wResFrame.findResultCell(cellIds[wcIdx].m_gridIndex, cellIds[wcIdx].m_gridCellIndex); - } - - if (wResCell == NULL) - { - // We cant find any state. This well cell is closed. - } - else - { - double cellState = closed; - - if (wResCell->m_isOpen) - { - switch (wResFrame.m_productionType) - { - case RigWellResultFrame::PRODUCER: - cellState = producing; - break; - case RigWellResultFrame::OIL_INJECTOR: - cellState = hcInjection; - break; - case RigWellResultFrame::GAS_INJECTOR: - cellState = hcInjection; - break; - case RigWellResultFrame::WATER_INJECTOR: - cellState = water; - break; - case RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE: - cellState = closed; - break; - } - } - - wellCellStates[wcIdx] = cellState; - } - } - - // Find or create texture coords array for pipe surface - - if (brIt->m_surfaceDrawable.notNull()) - { - cvf::ref surfTexCoords = const_cast(brIt->m_surfaceDrawable->textureCoordArray()); - - if (surfTexCoords.isNull()) - { - surfTexCoords = new cvf::Vec2fArray; - } - - brIt->m_pipeGeomGenerator->pipeSurfaceTextureCoords( surfTexCoords.p(), wellCellStates, m_scalarMapper.p()); - brIt->m_surfaceDrawable->setTextureCoordArray( surfTexCoords.p()); - - brIt->m_surfacePart->setEffect(m_scalarMapperSurfaceEffect.p()); - } - - // Find or create texture coords array for pipe center line - if (brIt->m_centerLineDrawable.notNull()) - { - cvf::ref lineTexCoords = const_cast(brIt->m_centerLineDrawable->textureCoordArray()); - - if (lineTexCoords.isNull()) - { - lineTexCoords = new cvf::Vec2fArray; - } - - // Calculate new texture coordinates - brIt->m_pipeGeomGenerator->centerlineTextureCoords( lineTexCoords.p(), wellCellStates, m_scalarMapper.p()); - - // Set the new texture coordinates - - brIt->m_centerLineDrawable->setTextureCoordArray( lineTexCoords.p()); - - // Set effects - - brIt->m_centerLinePart->setEffect(m_scalarMapperMeshEffect.p()); - } - } -} - diff --git a/ApplicationCode/ModelVisualization/RivWellPipesPartMgr.h b/ApplicationCode/ModelVisualization/RivWellPipesPartMgr.h deleted file mode 100644 index ecaaef8c73..0000000000 --- a/ApplicationCode/ModelVisualization/RivWellPipesPartMgr.h +++ /dev/null @@ -1,88 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2011-2012 Statoil ASA, 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#pragma once - -#include "cvfBase.h" -#include "cvfObject.h" -#include "cvfVector3.h" - -#include "cafPdmPointer.h" -#include -#include "RigSingleWellResultsData.h" - -namespace cvf -{ - class Part; - class ModelBasicList; - class Transform; - class Effect; - class DrawableGeo; - class ScalarMapper; -} - -class RivPipeGeometryGenerator; -class RimEclipseView; -class RimEclipseWell; - -class RivWellPipesPartMgr : public cvf::Object -{ -public: - RivWellPipesPartMgr(RimEclipseView* reservoirView, RimEclipseWell* well); - ~RivWellPipesPartMgr(); - - void setScaleTransform(cvf::Transform * scaleTransform) { m_scaleTransform = scaleTransform; scheduleGeometryRegen();} - - void scheduleGeometryRegen() { m_needsTransformUpdate = true; } - - void appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model, size_t frameIndex); - void updatePipeResultColor(size_t frameIndex); - - const std::vector< std::vector >& centerLineOfWellBranches() { return m_pipeBranchesCLCoords;} - -private: - caf::PdmPointer m_rimReservoirView; - caf::PdmPointer m_rimWell; - - cvf::ref m_scaleTransform; - bool m_needsTransformUpdate; - - void buildWellPipeParts(); - - - struct RivPipeBranchData - { - std::vector m_cellIds; - //std::vector< std::vector > m_cellStatusPrFrame; - cvf::ref m_pipeGeomGenerator; - - cvf::ref m_surfacePart; - cvf::ref m_surfaceDrawable; - cvf::ref m_centerLinePart; - cvf::ref m_centerLineDrawable; - - }; - - std::list m_wellBranches; - - cvf::ref m_scalarMapper; - cvf::ref m_scalarMapperSurfaceEffect; - cvf::ref m_scalarMapperMeshEffect; - - std::vector< std::vector > m_pipeBranchesCLCoords; -}; diff --git a/ApplicationCode/ModelVisualization/RivWellSpheresPartMgr.cpp b/ApplicationCode/ModelVisualization/RivWellSpheresPartMgr.cpp new file mode 100644 index 0000000000..98d9b1d04a --- /dev/null +++ b/ApplicationCode/ModelVisualization/RivWellSpheresPartMgr.cpp @@ -0,0 +1,228 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RivWellSpheresPartMgr.h" + +#include "RiaApplication.h" + +#include "RigMainGrid.h" +#include "RigSingleWellResultsData.h" + +#include "RimEclipseCase.h" +#include "RimEclipseView.h" +#include "RimEclipseWell.h" +#include "RimEclipseWellCollection.h" + +#include "RiuViewer.h" + +#include "cafDisplayCoordTransform.h" +#include "cafEffectGenerator.h" +#include "cafPdmFieldCvfColor.h" +#include "cafPdmFieldCvfMat4d.h" + +#include "cvfDrawableGeo.h" +#include "cvfGeometryBuilderFaceList.h" +#include "cvfGeometryUtils.h" +#include "cvfModelBasicList.h" +#include "cvfObject.h" +#include "cvfPart.h" +#include "cvfDrawableVectors.h" +#include "cvfGeometryBuilderTriangles.h" +#include "cvfOpenGLResourceManager.h" +#include "cvfShaderProgram.h" + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RivWellSpheresPartMgr::RivWellSpheresPartMgr(RimEclipseView* reservoirView, RimEclipseWell* well) +{ + m_rimReservoirView = reservoirView; + m_rimWell = well; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RivWellSpheresPartMgr::~RivWellSpheresPartMgr() +{ + +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RivWellSpheresPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model, size_t frameIndex) +{ + if (m_rimReservoirView.isNull()) return; + if (!m_rimReservoirView->eclipseCase()) return; + if (!m_rimReservoirView->eclipseCase()->eclipseCaseData()) return; + + const RigMainGrid* mainGrid = m_rimReservoirView->mainGrid(); + CVF_ASSERT(mainGrid); + + RigSingleWellResultsData* rigWellResult = m_rimWell->wellResults(); + if (!rigWellResult) return; + + if (!rigWellResult->hasWellResult(frameIndex)) return; + + const RigWellResultFrame& wellResultFrame = rigWellResult->wellResultFrame(frameIndex); + + std::vector > centerColorPairs; + + for (const RigWellResultBranch& wellResultBranch : wellResultFrame.m_wellResultBranches) + { + for (const RigWellResultPoint& wellResultPoint : wellResultBranch.m_branchResultPoints) + { + size_t gridIndex = wellResultPoint.m_gridIndex; + + if (gridIndex >= mainGrid->gridCount()) continue; + + const RigGridBase* rigGrid = rigGrid = mainGrid->gridByIndex(gridIndex); + + size_t gridCellIndex = wellResultPoint.m_gridCellIndex; + if (gridCellIndex >= rigGrid->cellCount()) continue; + + const RigCell& rigCell = rigGrid->cell(gridCellIndex); + + cvf::Vec3d center = rigCell.center(); + cvf::ref transForm = m_rimReservoirView->displayCoordTransform(); + cvf::Vec3d displayCoord = transForm->transformToDisplayCoord(center); + + cvf::Color3f color = wellCellColor(wellResultFrame, wellResultPoint); + + centerColorPairs.push_back(std::make_pair(cvf::Vec3f(displayCoord), color)); + } + } + + cvf::ref part = createPart(centerColorPairs, wellResultFrame.m_isOpen); + + model->addPart(part.p()); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +cvf::ref RivWellSpheresPartMgr::createPart(std::vector >& centerColorPairs, bool isWellOpen) +{ + cvf::ref vertices = new cvf::Vec3fArray; + cvf::ref vecRes = new cvf::Vec3fArray; + cvf::ref colors = new cvf::Color3fArray; + + size_t numVecs = centerColorPairs.size(); + vertices->reserve(numVecs); + vecRes->reserve(numVecs); + colors->reserve(numVecs); + + for (auto centerColorPair : centerColorPairs) + { + vertices->add(centerColorPair.first); + vecRes->add(cvf::Vec3f::X_AXIS); + colors->add(centerColorPair.second); + } + + cvf::ref vectorDrawable; + if (RiaApplication::instance()->useShaders()) + { + // NOTE: Drawable vectors must be rendered using shaders when the rest of the application is rendered using shaders + // Drawing vectors using fixed function when rest of the application uses shaders causes visual artifacts + vectorDrawable = new cvf::DrawableVectors("u_transformationMatrix", "u_color"); + } + else + { + vectorDrawable = new cvf::DrawableVectors(); + } + + vectorDrawable->setVectors(vertices.p(), vecRes.p()); + vectorDrawable->setColors(colors.p()); + + cvf::GeometryBuilderTriangles builder; + double characteristicCellSize = m_rimReservoirView->mainGrid()->characteristicIJCellSize(); + double cellRadius = m_rimReservoirView->wellCollection()->spheresScaleFactor() * characteristicCellSize; + + if (isWellOpen) + { + // Increase radius to make sure open connection are slightly larger than closed connections + cellRadius = 1.1 * cellRadius; + } + + cvf::GeometryUtils::createSphere(cellRadius, 15, 15, &builder); + + vectorDrawable->setGlyph(builder.trianglesUShort().p(), builder.vertices().p()); + + cvf::ref part = new cvf::Part; + part->setDrawable(vectorDrawable.p()); + + cvf::ref eff = new cvf::Effect; + if (RiaApplication::instance()->useShaders()) + { + if (m_rimReservoirView->viewer()) + { + cvf::ref oglContext = m_rimReservoirView->viewer()->cvfOpenGLContext(); + cvf::OpenGLResourceManager* resourceManager = oglContext->resourceManager(); + cvf::ref vectorProgram = resourceManager->getLinkedVectorDrawerShaderProgram(oglContext.p()); + + eff->setShaderProgram(vectorProgram.p()); + } + } + + part->setEffect(eff.p()); + + return part; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +cvf::Color3f RivWellSpheresPartMgr::wellCellColor(const RigWellResultFrame& wellResultFrame, const RigWellResultPoint& wellResultPoint) +{ + // Colours should be synchronized with RivWellPipesPartMgr::updatePipeResultColor + + cvf::Color3f cellColor(cvf::Color3f::GRAY); + + RimEclipseWellCollection* wellColl = nullptr; + if (m_rimWell) + { + m_rimWell->firstAncestorOrThisOfType(wellColl); + } + + if (wellColl) + { + if (wellResultPoint.m_isOpen) + { + switch (wellResultFrame.m_productionType) + { + case RigWellResultFrame::PRODUCER: + cellColor = cvf::Color3f::GREEN; + break; + case RigWellResultFrame::OIL_INJECTOR: + cellColor = cvf::Color3f::RED; + break; + case RigWellResultFrame::GAS_INJECTOR: + cellColor = cvf::Color3f::RED; + break; + case RigWellResultFrame::WATER_INJECTOR: + cellColor = cvf::Color3f::BLUE; + break; + } + } + } + + return cellColor; +} + diff --git a/ApplicationCode/ModelVisualization/RivWellSpheresPartMgr.h b/ApplicationCode/ModelVisualization/RivWellSpheresPartMgr.h new file mode 100644 index 0000000000..05439ae7ea --- /dev/null +++ b/ApplicationCode/ModelVisualization/RivWellSpheresPartMgr.h @@ -0,0 +1,64 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cvfBase.h" +#include "cvfObject.h" +#include "cvfVector3.h" + +#include "cafPdmPointer.h" + +#include +#include +#include + +namespace cvf +{ + class Part; + class ModelBasicList; + class Transform; + class Effect; + class DrawableGeo; + class ScalarMapper; + class Color3f; +} + +class RivPipeGeometryGenerator; +class RimEclipseView; +class RimEclipseWell; +class RigWellResultFrame; + +struct RigWellResultPoint; + +class RivWellSpheresPartMgr : public cvf::Object +{ +public: + RivWellSpheresPartMgr(RimEclipseView* reservoirView, RimEclipseWell* well); + ~RivWellSpheresPartMgr(); + + void appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model, size_t frameIndex); + +private: + cvf::Color3f wellCellColor(const RigWellResultFrame& wellResultFrame, const RigWellResultPoint& wellResultPoint); + cvf::ref createPart(std::vector >& centerColorPairs, bool isWellOpen); + +private: + caf::PdmPointer m_rimReservoirView; + caf::PdmPointer m_rimWell; +}; diff --git a/ApplicationCode/ProjectDataModel/CMakeLists_files.cmake b/ApplicationCode/ProjectDataModel/CMakeLists_files.cmake index 8c8897587f..397883b2ab 100644 --- a/ApplicationCode/ProjectDataModel/CMakeLists_files.cmake +++ b/ApplicationCode/ProjectDataModel/CMakeLists_files.cmake @@ -61,6 +61,7 @@ ${CEE_CURRENT_LIST_DIR}RimGeoMechResultDefinition.h ${CEE_CURRENT_LIST_DIR}RimGeoMechCellColors.h ${CEE_CURRENT_LIST_DIR}RimViewWindow.h ${CEE_CURRENT_LIST_DIR}RimView.h +${CEE_CURRENT_LIST_DIR}RimViewManipulator.h ${CEE_CURRENT_LIST_DIR}RimCase.h ${CEE_CURRENT_LIST_DIR}RimTreeViewStateSerializer.h ${CEE_CURRENT_LIST_DIR}RimViewController.h @@ -80,8 +81,15 @@ ${CEE_CURRENT_LIST_DIR}RimIntersectionCollection.h ${CEE_CURRENT_LIST_DIR}RimContextCommandBuilder.h ${CEE_CURRENT_LIST_DIR}RimGridCollection.h ${CEE_CURRENT_LIST_DIR}RimPlotCurve.h -${CEE_CURRENT_LIST_DIR}RimEclipseInputCaseOpm.h ${CEE_CURRENT_LIST_DIR}RimIntersectionBox.h +${CEE_CURRENT_LIST_DIR}RimMultiSnapshotDefinition.h +${CEE_CURRENT_LIST_DIR}RimMdiWindowController.h +${CEE_CURRENT_LIST_DIR}RimPropertyFilter.h +${CEE_CURRENT_LIST_DIR}RimNamedObject.h +${CEE_CURRENT_LIST_DIR}RimCheckableNamedObject.h +${CEE_CURRENT_LIST_DIR}RimGridTimeHistoryCurve.h +${CEE_CURRENT_LIST_DIR}RimGeometrySelectionItem.h +${CEE_CURRENT_LIST_DIR}RimEclipseGeometrySelectionItem.h ) set (SOURCE_GROUP_SOURCE_FILES @@ -141,6 +149,7 @@ ${CEE_CURRENT_LIST_DIR}RimGeoMechResultDefinition.cpp ${CEE_CURRENT_LIST_DIR}RimGeoMechCellColors.cpp ${CEE_CURRENT_LIST_DIR}RimViewWindow.cpp ${CEE_CURRENT_LIST_DIR}RimView.cpp +${CEE_CURRENT_LIST_DIR}RimViewManipulator.cpp ${CEE_CURRENT_LIST_DIR}RimCase.cpp ${CEE_CURRENT_LIST_DIR}RimTreeViewStateSerializer.cpp ${CEE_CURRENT_LIST_DIR}RimViewController.cpp @@ -160,8 +169,15 @@ ${CEE_CURRENT_LIST_DIR}RimIntersectionCollection.cpp ${CEE_CURRENT_LIST_DIR}RimContextCommandBuilder.cpp ${CEE_CURRENT_LIST_DIR}RimGridCollection.cpp ${CEE_CURRENT_LIST_DIR}RimPlotCurve.cpp -${CEE_CURRENT_LIST_DIR}RimEclipseInputCaseOpm.cpp ${CEE_CURRENT_LIST_DIR}RimIntersectionBox.cpp +${CEE_CURRENT_LIST_DIR}RimMultiSnapshotDefinition.cpp +${CEE_CURRENT_LIST_DIR}RimMdiWindowController.cpp +${CEE_CURRENT_LIST_DIR}RimPropertyFilter.cpp +${CEE_CURRENT_LIST_DIR}RimNamedObject.cpp +${CEE_CURRENT_LIST_DIR}RimCheckableNamedObject.cpp +${CEE_CURRENT_LIST_DIR}RimGridTimeHistoryCurve.cpp +${CEE_CURRENT_LIST_DIR}RimGeometrySelectionItem.cpp +${CEE_CURRENT_LIST_DIR}RimEclipseGeometrySelectionItem.cpp ) list(APPEND CODE_HEADER_FILES diff --git a/ApplicationCode/ProjectDataModel/Flow/CMakeLists_files.cmake b/ApplicationCode/ProjectDataModel/Flow/CMakeLists_files.cmake new file mode 100644 index 0000000000..e0d6fb0abe --- /dev/null +++ b/ApplicationCode/ProjectDataModel/Flow/CMakeLists_files.cmake @@ -0,0 +1,35 @@ + +# Use this workaround until we're on 2.8.3 on all platforms and can use CMAKE_CURRENT_LIST_DIR directly +if (${CMAKE_VERSION} VERSION_GREATER "2.8.2") + set(CEE_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_DIR}/) +endif() + +set (SOURCE_GROUP_HEADER_FILES +${CEE_CURRENT_LIST_DIR}RimFlowDiagSolution.h +${CEE_CURRENT_LIST_DIR}RimFlowPlotCollection.h +${CEE_CURRENT_LIST_DIR}RimWellAllocationPlot.h +${CEE_CURRENT_LIST_DIR}RimTotalWellAllocationPlot.h +${CEE_CURRENT_LIST_DIR}RimWellFlowRateCurve.h +${CEE_CURRENT_LIST_DIR}RimWellAllocationPlotLegend.h +${CEE_CURRENT_LIST_DIR}RimFlowCharacteristicsPlot.h +) + +set (SOURCE_GROUP_SOURCE_FILES +${CEE_CURRENT_LIST_DIR}RimFlowDiagSolution.cpp +${CEE_CURRENT_LIST_DIR}RimFlowPlotCollection.cpp +${CEE_CURRENT_LIST_DIR}RimWellAllocationPlot.cpp +${CEE_CURRENT_LIST_DIR}RimTotalWellAllocationPlot.cpp +${CEE_CURRENT_LIST_DIR}RimWellFlowRateCurve.cpp +${CEE_CURRENT_LIST_DIR}RimWellAllocationPlotLegend.cpp +${CEE_CURRENT_LIST_DIR}RimFlowCharacteristicsPlot.cpp +) + +list(APPEND CODE_HEADER_FILES +${SOURCE_GROUP_HEADER_FILES} +) + +list(APPEND CODE_SOURCE_FILES +${SOURCE_GROUP_SOURCE_FILES} +) + +source_group( "ProjectDataModel\\Flow" FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} ${CEE_CURRENT_LIST_DIR}CMakeLists_files.cmake ) diff --git a/ApplicationCode/ProjectDataModel/Flow/RimFlowCharacteristicsPlot.cpp b/ApplicationCode/ProjectDataModel/Flow/RimFlowCharacteristicsPlot.cpp new file mode 100644 index 0000000000..90acb4e88b --- /dev/null +++ b/ApplicationCode/ProjectDataModel/Flow/RimFlowCharacteristicsPlot.cpp @@ -0,0 +1,320 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimFlowCharacteristicsPlot.h" + +#include "RigFlowDiagResults.h" + +#include "RimEclipseResultCase.h" +#include "RimFlowDiagSolution.h" +#include "RimProject.h" + +#include "RiuFlowCharacteristicsPlot.h" + +#include "cafPdmUiCheckBoxEditor.h" + +#include // Needed for HUGE_VAL on Linux + + +namespace caf +{ +template<> +void AppEnum< RimFlowCharacteristicsPlot::TimeSelectionType >::setUp() +{ + addItem(RimFlowCharacteristicsPlot::ALL_AVAILABLE, "ALL_AVAILABLE", "All available"); + addItem(RimFlowCharacteristicsPlot::SELECT_AVAILABLE, "SELECT_AVAILABLE", "Select"); + setDefault(RimFlowCharacteristicsPlot::ALL_AVAILABLE); +} +} + +CAF_PDM_SOURCE_INIT(RimFlowCharacteristicsPlot, "FlowCharacteristicsPlot"); + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimFlowCharacteristicsPlot::RimFlowCharacteristicsPlot() +{ + CAF_PDM_InitObject("Flow Characteristics", ":/WellAllocPie16x16.png", "", ""); + + CAF_PDM_InitFieldNoDefault(&m_case, "FlowCase", "Case", "", "", ""); + CAF_PDM_InitFieldNoDefault(&m_flowDiagSolution, "FlowDiagSolution", "Flow Diag Solution", "", "", ""); + m_flowDiagSolution.uiCapability()->setUiHidden(true); + + CAF_PDM_InitFieldNoDefault(&m_timeStepSelectionType, "TimeSelectionType", "Time Steps", "", "", ""); + CAF_PDM_InitFieldNoDefault(&m_selectedTimeSteps, "SelectedTimeSteps", "", "", "", ""); + + CAF_PDM_InitField(&m_showLegend, "ShowLegend", true, "Legend", "", "", ""); + + this->m_showWindow = false; + setAsPlotMdiWindow(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimFlowCharacteristicsPlot::~RimFlowCharacteristicsPlot() +{ + removeMdiWindowFromMdiArea(); + + deleteViewWidget(); +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimFlowCharacteristicsPlot::setFromFlowSolution(RimFlowDiagSolution* flowSolution) +{ + if ( !flowSolution ) + { + m_case = nullptr; + } + else + { + RimEclipseResultCase* eclCase; + flowSolution->firstAncestorOrThisOfType(eclCase); + m_case = eclCase; + } + + m_flowDiagSolution = flowSolution; + m_showWindow = true; + + loadDataAndUpdate(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimFlowCharacteristicsPlot::deleteViewWidget() +{ + if (m_flowCharPlotWidget) + { + m_flowCharPlotWidget->deleteLater(); + m_flowCharPlotWidget= nullptr; + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimFlowCharacteristicsPlot::updateCurrentTimeStep() +{ + if (m_timeStepSelectionType() != ALL_AVAILABLE) return; + if (!m_flowDiagSolution()) return; + + RigFlowDiagResults* flowResult = m_flowDiagSolution->flowDiagResults(); + std::vector calculatedTimesteps = flowResult->calculatedTimeSteps(); + + if (m_currentlyPlottedTimeSteps == calculatedTimesteps) return; + + this->loadDataAndUpdate(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QList RimFlowCharacteristicsPlot::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) +{ + QList options; + + if ( fieldNeedingOptions == &m_case ) + { + RimProject* proj = nullptr; + this->firstAncestorOrThisOfType(proj); + if ( proj ) + { + std::vector cases; + proj->descendantsIncludingThisOfType(cases); + RimEclipseResultCase* defaultCase = nullptr; + for ( RimEclipseResultCase* c : cases ) + { + if ( c->defaultFlowDiagSolution() ) + { + options.push_back(caf::PdmOptionItemInfo(c->caseUserDescription(), c, false, c->uiIcon())); + if (!defaultCase) defaultCase = c; // Select first + } + } + if (!m_case() && defaultCase) m_case = defaultCase; + } + } + else if ( fieldNeedingOptions == &m_flowDiagSolution ) + { + if ( m_case ) + { + std::vector flowSols = m_case->flowDiagSolutions(); + + options.push_back(caf::PdmOptionItemInfo("None", nullptr)); + for ( RimFlowDiagSolution* flowSol : flowSols ) + { + options.push_back(caf::PdmOptionItemInfo(flowSol->userDescription(), flowSol, false, flowSol->uiIcon())); + } + } + } + else if ( fieldNeedingOptions == &m_selectedTimeSteps ) + { + if ( m_flowDiagSolution ) + { + RigFlowDiagResults* flowResult = m_flowDiagSolution->flowDiagResults(); + std::vector calculatedTimesteps = flowResult->calculatedTimeSteps(); + + QStringList timeStepDates = m_case->timeStepStrings(); + + for ( int tsIdx : calculatedTimesteps ) + { + options.push_back(caf::PdmOptionItemInfo(timeStepDates[tsIdx], tsIdx)); + } + } + } + + return options; + +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimFlowCharacteristicsPlot::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) +{ + uiOrdering.add(&m_case); + uiOrdering.add(&m_flowDiagSolution); + uiOrdering.add(&m_timeStepSelectionType); + + if (m_timeStepSelectionType == SELECT_AVAILABLE) uiOrdering.add(&m_selectedTimeSteps); + + uiOrdering.add(&m_showLegend); + + uiOrdering.skipRemainingFields(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QWidget* RimFlowCharacteristicsPlot::viewWidget() +{ + return m_flowCharPlotWidget; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimFlowCharacteristicsPlot::zoomAll() +{ + if (m_flowCharPlotWidget) m_flowCharPlotWidget->zoomAll(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimFlowCharacteristicsPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) +{ + RimViewWindow::fieldChangedByUi(changedField, oldValue, newValue); + + if ( &m_case == changedField ) + { + m_flowDiagSolution = m_case->defaultFlowDiagSolution(); + m_currentlyPlottedTimeSteps.clear(); + } + + // All fields update plot + + this->loadDataAndUpdate(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QImage RimFlowCharacteristicsPlot::snapshotWindowContent() +{ + QImage image; + + if (m_flowCharPlotWidget) + { + QPixmap pix = QPixmap::grabWidget(m_flowCharPlotWidget); + image = pix.toImage(); + } + + return image; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimFlowCharacteristicsPlot::loadDataAndUpdate() +{ + updateMdiWindowVisibility(); + + if (m_flowDiagSolution && m_flowCharPlotWidget) + { + RigFlowDiagResults* flowResult = m_flowDiagSolution->flowDiagResults(); + std::vector calculatedTimesteps = flowResult->calculatedTimeSteps(); + + if (m_timeStepSelectionType == SELECT_AVAILABLE) + { + // Find set intersection of selected and available time steps + std::set calculatedTimeStepsSet; + calculatedTimeStepsSet.insert(calculatedTimesteps.begin(), calculatedTimesteps.end()); + calculatedTimesteps.clear(); + + auto selectedTimeSteps = m_selectedTimeSteps(); + for (int tsIdx : selectedTimeSteps) + { + if (calculatedTimeStepsSet.count(tsIdx)) calculatedTimesteps.push_back(tsIdx); + } + } + + m_currentlyPlottedTimeSteps = calculatedTimesteps; + + std::vector timeStepDates = m_case->timeStepDates(); + QStringList timeStepStrings = m_case->timeStepStrings(); + std::vector lorenzVals(timeStepDates.size(), HUGE_VAL); + + m_flowCharPlotWidget->removeAllCurves(); + + for ( int timeStepIdx: calculatedTimesteps ) + { + lorenzVals[timeStepIdx] = flowResult->flowCharacteristicsResults(timeStepIdx).m_lorenzCoefficient; + } + m_flowCharPlotWidget->setLorenzCurve(timeStepStrings, timeStepDates, lorenzVals); + + for ( int timeStepIdx: calculatedTimesteps ) + { + + const auto & flowCharResults = flowResult->flowCharacteristicsResults(timeStepIdx); + m_flowCharPlotWidget->addFlowCapStorageCapCurve(timeStepDates[timeStepIdx], + flowCharResults.m_flowCapStorageCapCurve.first, + flowCharResults.m_flowCapStorageCapCurve.second); + m_flowCharPlotWidget->addSweepEfficiencyCurve(timeStepDates[timeStepIdx], + flowCharResults.m_sweepEfficiencyCurve.first, + flowCharResults.m_sweepEfficiencyCurve.second); + } + + m_flowCharPlotWidget->showLegend(m_showLegend()); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QWidget* RimFlowCharacteristicsPlot::createViewWidget(QWidget* mainWindowParent) +{ + m_flowCharPlotWidget = new RiuFlowCharacteristicsPlot(this, mainWindowParent); + return m_flowCharPlotWidget; +} + + diff --git a/ApplicationCode/ProjectDataModel/Flow/RimFlowCharacteristicsPlot.h b/ApplicationCode/ProjectDataModel/Flow/RimFlowCharacteristicsPlot.h new file mode 100644 index 0000000000..d8bfafd664 --- /dev/null +++ b/ApplicationCode/ProjectDataModel/Flow/RimFlowCharacteristicsPlot.h @@ -0,0 +1,94 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + + +#include "RimViewWindow.h" + +#include "cafPdmField.h" +#include "cafPdmObject.h" +#include "cafPdmPtrField.h" + +#include + +class RimFlowDiagSolution; +class RimEclipseResultCase; + +class RiuFlowCharacteristicsPlot; + +namespace caf { + class PdmOptionItemInfo; +} + +namespace cvf { + class Color3f; +} + + +//================================================================================================== +/// +/// +//================================================================================================== +class RimFlowCharacteristicsPlot : public RimViewWindow +{ + CAF_PDM_HEADER_INIT; + +public: + RimFlowCharacteristicsPlot(); + virtual ~RimFlowCharacteristicsPlot(); + + void setFromFlowSolution(RimFlowDiagSolution* flowSolution); + void updateCurrentTimeStep(); + + // RimViewWindow overrides + + virtual QWidget* viewWidget() override; + virtual void zoomAll() override; + virtual QWidget* createViewWidget(QWidget* mainWindowParent) override; + virtual void deleteViewWidget() override; + + enum TimeSelectionType + { + ALL_AVAILABLE, + SELECT_AVAILABLE + }; +protected: + // RimViewWindow overrides + + virtual void loadDataAndUpdate() override; + virtual QImage snapshotWindowContent() override; + + // Overridden PDM methods + virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override; + virtual QList calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override; + virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override; + +private: + + + caf::PdmPtrField m_case; + caf::PdmPtrField m_flowDiagSolution; + caf::PdmField > m_timeStepSelectionType; + caf::PdmField > m_selectedTimeSteps; + caf::PdmField m_showLegend; + + std::vector m_currentlyPlottedTimeSteps; + + QPointer m_flowCharPlotWidget; +}; diff --git a/ApplicationCode/ProjectDataModel/Flow/RimFlowDiagSolution.cpp b/ApplicationCode/ProjectDataModel/Flow/RimFlowDiagSolution.cpp new file mode 100644 index 0000000000..8b79214dd1 --- /dev/null +++ b/ApplicationCode/ProjectDataModel/Flow/RimFlowDiagSolution.cpp @@ -0,0 +1,344 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimFlowDiagSolution.h" + +#include "RiaApplication.h" +#include "RiaColorTables.h" + +#include "RigActiveCellInfo.h" +#include "RigCaseCellResultsData.h" +#include "RigEclipseCaseData.h" +#include "RigFlowDiagResults.h" +#include "RigMainGrid.h" +#include "RigSingleWellResultsData.h" + +#include "RimEclipseResultCase.h" +#include "RimEclipseView.h" +#include "RimEclipseWell.h" +#include "RimEclipseWellCollection.h" + +CAF_PDM_SOURCE_INIT(RimFlowDiagSolution, "FlowDiagSolution"); + +#define CROSS_FLOW_ENDING "-XF" + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimFlowDiagSolution::hasCrossFlowEnding(const QString& tracerName) +{ + return tracerName.endsWith(CROSS_FLOW_ENDING); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimFlowDiagSolution::removeCrossFlowEnding(const QString& tracerName) +{ + if (tracerName.endsWith(CROSS_FLOW_ENDING)) + { + return tracerName.left(tracerName.size() - 3); + } + else + { + return tracerName; + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimFlowDiagSolution::addCrossFlowEnding(const QString& wellName) +{ + return wellName + CROSS_FLOW_ENDING; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimFlowDiagSolution::RimFlowDiagSolution(void) +{ + CAF_PDM_InitObject("Flow Diagnostics Solution", "", "", ""); + CAF_PDM_InitField(&m_userDescription, "UserDescription", QString("All Wells") ,"Description", "", "",""); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimFlowDiagSolution::~RimFlowDiagSolution(void) +{ + +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimFlowDiagSolution::userDescription() const +{ + return m_userDescription(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigFlowDiagResults* RimFlowDiagSolution::flowDiagResults() +{ + if ( m_flowDiagResults.isNull() ) + { + size_t timeStepCount; + { + RimEclipseResultCase* eclCase; + this->firstAncestorOrThisOfType(eclCase); + + CVF_ASSERT(eclCase && eclCase->eclipseCaseData() ); + + timeStepCount = eclCase->eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)->maxTimeStepCount(); + + } + + m_flowDiagResults = new RigFlowDiagResults(this, timeStepCount); + } + + return m_flowDiagResults.p(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimFlowDiagSolution::tracerNames() const +{ + RimEclipseResultCase* eclCase; + this->firstAncestorOrThisOfType(eclCase); + + std::vector tracerNameSet; + + if (eclCase) + { + const cvf::Collection& wellResults = eclCase->eclipseCaseData()->wellResults(); + + for (size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx) + { + tracerNameSet.push_back(wellResults[wIdx]->m_wellName); + tracerNameSet.push_back(addCrossFlowEnding(wellResults[wIdx]->m_wellName)); + } + } + + return tracerNameSet; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::map > RimFlowDiagSolution::allInjectorTracerActiveCellIndices(size_t timeStepIndex) const +{ + return allTracerActiveCellIndices(timeStepIndex, true); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::map > RimFlowDiagSolution::allProducerTracerActiveCellIndices(size_t timeStepIndex) const +{ + return allTracerActiveCellIndices(timeStepIndex, false); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::map > RimFlowDiagSolution::allTracerActiveCellIndices(size_t timeStepIndex, bool useInjectors) const +{ + RimEclipseResultCase* eclCase; + this->firstAncestorOrThisOfType(eclCase); + + std::map > tracersWithCells; + + if ( eclCase ) + { + const cvf::Collection& wellResults = eclCase->eclipseCaseData()->wellResults(); + RigMainGrid* mainGrid = eclCase->eclipseCaseData()->mainGrid(); + RigActiveCellInfo* activeCellInfo = eclCase->eclipseCaseData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS); //Todo: Must come from the results definition + + for ( size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx ) + { + if (!wellResults[wIdx]->hasWellResult(timeStepIndex) ) continue; + const RigWellResultFrame& wellResFrame = wellResults[wIdx]->wellResultFrame(timeStepIndex); + + bool isInjectorWell = ( wellResFrame.m_productionType != RigWellResultFrame::PRODUCER + && wellResFrame.m_productionType != RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE); + + std::string wellName = wellResults[wIdx]->m_wellName.toStdString(); + std::string wellNameXf = addCrossFlowEnding(wellResults[wIdx]->m_wellName).toStdString(); + + std::vector& tracerCells = tracersWithCells[wellName]; + std::vector& tracerCellsCrossFlow = tracersWithCells[wellNameXf]; + + for (const RigWellResultBranch& wBr: wellResFrame.m_wellResultBranches) + { + for (const RigWellResultPoint& wrp: wBr.m_branchResultPoints) + { + if (wrp.isValid() && wrp.m_isOpen + && ( (useInjectors && wrp.flowRate() < 0.0) || (!useInjectors && wrp.flowRate() > 0.0) ) ) + { + RigGridBase * grid = mainGrid->gridByIndex(wrp.m_gridIndex); + size_t reservoirCellIndex = grid->reservoirCellIndex(wrp.m_gridCellIndex); + + int cellActiveIndex = static_cast(activeCellInfo->cellResultIndex(reservoirCellIndex)); + + if ( useInjectors == isInjectorWell ) + { + tracerCells.push_back(cellActiveIndex); + } + else + { + tracerCellsCrossFlow.push_back(cellActiveIndex); + } + } + } + } + + if (tracerCells.empty()) tracersWithCells.erase(wellName); + if (tracerCellsCrossFlow.empty()) tracersWithCells.erase(wellNameXf); + } + } + + return tracersWithCells; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimFlowDiagSolution::TracerStatusType RimFlowDiagSolution::tracerStatusOverall(const QString& tracerName) const +{ + RimEclipseResultCase* eclCase; + this->firstAncestorOrThisOfTypeAsserted(eclCase); + + TracerStatusType tracerStatus = UNDEFINED; + + const cvf::Collection& wellResults = eclCase->eclipseCaseData()->wellResults(); + + for ( size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx ) + { + QString wellName = removeCrossFlowEnding(tracerName); + + if ( wellResults[wIdx]->m_wellName != wellName ) continue; + + tracerStatus = CLOSED; + for ( const RigWellResultFrame& wellResFrame : wellResults[wIdx]->m_wellCellsTimeSteps ) + { + if ( wellResFrame.m_productionType == RigWellResultFrame::GAS_INJECTOR + || wellResFrame.m_productionType == RigWellResultFrame::OIL_INJECTOR + || wellResFrame.m_productionType == RigWellResultFrame::WATER_INJECTOR ) + { + if ( tracerStatus == PRODUCER ) tracerStatus = VARYING; + else tracerStatus = INJECTOR; + } + else if ( wellResFrame.m_productionType == RigWellResultFrame::PRODUCER ) + { + if ( tracerStatus == INJECTOR ) tracerStatus = VARYING; + else tracerStatus = PRODUCER; + } + if ( tracerStatus == VARYING ) break; + } + + break; + } + + if (hasCrossFlowEnding(tracerName)) + { + if (tracerStatus == PRODUCER) tracerStatus = INJECTOR; + else if (tracerStatus == INJECTOR) tracerStatus = PRODUCER; + } + + return tracerStatus; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimFlowDiagSolution::TracerStatusType RimFlowDiagSolution::tracerStatusInTimeStep(const QString& tracerName, size_t timeStepIndex) const +{ + RimEclipseResultCase* eclCase; + this->firstAncestorOrThisOfTypeAsserted(eclCase); + + const cvf::Collection& wellResults = eclCase->eclipseCaseData()->wellResults(); + + for ( size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx ) + { + QString wellName = removeCrossFlowEnding(tracerName); + + if ( wellResults[wIdx]->m_wellName != wellName ) continue; + if (!wellResults[wIdx]->hasWellResult(timeStepIndex)) return CLOSED; + + const RigWellResultFrame& wellResFrame = wellResults[wIdx]->wellResultFrame(timeStepIndex); + + if ( wellResFrame.m_productionType == RigWellResultFrame::GAS_INJECTOR + || wellResFrame.m_productionType == RigWellResultFrame::OIL_INJECTOR + || wellResFrame.m_productionType == RigWellResultFrame::WATER_INJECTOR ) + { + if ( hasCrossFlowEnding(tracerName) ) return PRODUCER; + + return INJECTOR; + } + else if ( wellResFrame.m_productionType == RigWellResultFrame::PRODUCER + || wellResFrame.m_productionType == RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE ) + { + if ( hasCrossFlowEnding(tracerName) ) return INJECTOR; + + return PRODUCER; + } + else + { + CVF_ASSERT(false); + } + } + + CVF_ASSERT(false); + + return UNDEFINED; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +cvf::Color3f RimFlowDiagSolution::tracerColor(const QString& tracerName) const +{ + QString wellName = removeCrossFlowEnding(tracerName); + + if (wellName == RIG_FLOW_TOTAL_NAME) return cvf::Color3f::LIGHT_GRAY; + if (wellName == RIG_RESERVOIR_TRACER_NAME) return cvf::Color3f::LIGHT_GRAY; + if (wellName == RIG_TINY_TRACER_GROUP_NAME) return cvf::Color3f::DARK_GRAY; + + RimEclipseResultCase* eclCase; + this->firstAncestorOrThisOfType(eclCase); + + if ( eclCase ) + { + return eclCase->defaultWellColor(wellName); + } + + return cvf::Color3f::LIGHT_GRAY; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +caf::PdmFieldHandle* RimFlowDiagSolution::userDescriptionField() +{ + return &m_userDescription; +} + diff --git a/ApplicationCode/ProjectDataModel/Flow/RimFlowDiagSolution.h b/ApplicationCode/ProjectDataModel/Flow/RimFlowDiagSolution.h new file mode 100644 index 0000000000..b3dc0f27c0 --- /dev/null +++ b/ApplicationCode/ProjectDataModel/Flow/RimFlowDiagSolution.h @@ -0,0 +1,73 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafPdmField.h" +#include "cafPdmObject.h" + +#include "cvfBase.h" +#include "cvfObject.h" +#include "cvfColor3.h" + +class RimEclipseWell; +class RigFlowDiagResults; + +//================================================================================================== +/// +/// +//================================================================================================== +class RimFlowDiagSolution : public caf::PdmObject +{ + CAF_PDM_HEADER_INIT; +public: + + RimFlowDiagSolution(); + virtual ~RimFlowDiagSolution(); + + QString userDescription() const; + RigFlowDiagResults* flowDiagResults(); + std::vector tracerNames() const; + + std::map > allInjectorTracerActiveCellIndices(size_t timeStepIndex) const; + std::map > allProducerTracerActiveCellIndices(size_t timeStepIndex) const; + + enum TracerStatusType + { + CLOSED, ///< Tracer has no active cells, and does not contribute + PRODUCER, ///< Tracer with producing cells + INJECTOR, ///< Tracer with injecting cells + VARYING, ///< Tracer is producing and injecting at different time steps. Only used as a timestep-overall type + UNDEFINED ///< Used as "Any" or "not set" + }; + + TracerStatusType tracerStatusOverall(const QString& tracerName) const; + TracerStatusType tracerStatusInTimeStep(const QString& tracerName, size_t timeStepIndex) const; + cvf::Color3f tracerColor(const QString& tracerName) const; + + static bool hasCrossFlowEnding(const QString& tracerName); + static QString removeCrossFlowEnding(const QString& tracerName); + static QString addCrossFlowEnding(const QString& wellName); +private: + std::map > allTracerActiveCellIndices(size_t timeStepIndex, bool useInjectors) const; + + virtual caf::PdmFieldHandle* userDescriptionField() override; + caf::PdmField m_userDescription; + + cvf::ref m_flowDiagResults; +}; diff --git a/ApplicationCode/ProjectDataModel/Flow/RimFlowPlotCollection.cpp b/ApplicationCode/ProjectDataModel/Flow/RimFlowPlotCollection.cpp new file mode 100644 index 0000000000..c69a00c33e --- /dev/null +++ b/ApplicationCode/ProjectDataModel/Flow/RimFlowPlotCollection.cpp @@ -0,0 +1,137 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimFlowPlotCollection.h" + +#include "RimWellAllocationPlot.h" +#include "RimFlowCharacteristicsPlot.h" + + +#include "cvfAssert.h" +#include "cafProgressInfo.h" + +CAF_PDM_SOURCE_INIT(RimFlowPlotCollection, "FlowPlotCollection"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimFlowPlotCollection::RimFlowPlotCollection() +{ + CAF_PDM_InitObject("Flow Diagnostics Plots", ":/WellAllocPlots16x16.png", "", ""); + + CAF_PDM_InitFieldNoDefault(&m_flowCharacteristicsPlot, "FlowCharacteristicsPlot", "", "", "", ""); + m_flowCharacteristicsPlot.uiCapability()->setUiHidden(true); + + CAF_PDM_InitFieldNoDefault(&m_defaultWellAllocPlot, "DefaultWellAllocationPlot", "", "", "", ""); + m_defaultWellAllocPlot.uiCapability()->setUiHidden(true); + + CAF_PDM_InitFieldNoDefault(&m_storedWellAllocPlots, "StoredWellAllocationPlots", "Stored Plots", "", "", ""); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimFlowPlotCollection::~RimFlowPlotCollection() +{ + delete m_defaultWellAllocPlot(); + + m_storedWellAllocPlots.deleteAllChildObjects(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimFlowPlotCollection::closeDefaultPlotWindowAndDeletePlots() +{ + if ( m_defaultWellAllocPlot ) + { + m_defaultWellAllocPlot->removeFromMdiAreaAndDeleteViewWidget(); + delete m_defaultWellAllocPlot(); + } + + delete m_flowCharacteristicsPlot; + + m_storedWellAllocPlots.deleteAllChildObjects(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimFlowPlotCollection::loadDataAndUpdate() +{ + caf::ProgressInfo plotProgress(m_storedWellAllocPlots.size() + 1, ""); + + if (m_defaultWellAllocPlot) m_defaultWellAllocPlot->loadDataAndUpdate(); + plotProgress.incrementProgress(); + + for (RimWellAllocationPlot* p : m_storedWellAllocPlots) + { + p->loadDataAndUpdate(); + plotProgress.incrementProgress(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +size_t RimFlowPlotCollection::plotCount() const +{ + size_t plotCount = 0; + if (m_defaultWellAllocPlot) plotCount = 1; + plotCount += m_storedWellAllocPlots.size(); + return plotCount; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimFlowPlotCollection::addWellAllocPlotToStoredPlots(RimWellAllocationPlot* plot) +{ + m_storedWellAllocPlots.push_back(plot); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimWellAllocationPlot* RimFlowPlotCollection::defaultWellAllocPlot() +{ + if ( !m_defaultWellAllocPlot() ) + { + m_defaultWellAllocPlot = new RimWellAllocationPlot; + m_defaultWellAllocPlot->setDescription("Default Flow Diagnostics Plot"); + } + + this->updateConnectedEditors(); + + return m_defaultWellAllocPlot(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimFlowCharacteristicsPlot* RimFlowPlotCollection::defaultFlowCharacteristicsPlot() +{ + if ( !m_flowCharacteristicsPlot() ) + { + m_flowCharacteristicsPlot = new RimFlowCharacteristicsPlot; + } + + this->updateConnectedEditors(); + + return m_flowCharacteristicsPlot(); +} diff --git a/ApplicationCode/ProjectDataModel/Flow/RimFlowPlotCollection.h b/ApplicationCode/ProjectDataModel/Flow/RimFlowPlotCollection.h new file mode 100644 index 0000000000..b7af74f634 --- /dev/null +++ b/ApplicationCode/ProjectDataModel/Flow/RimFlowPlotCollection.h @@ -0,0 +1,51 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafPdmObject.h" +#include "cafPdmChildArrayField.h" +#include "cafPdmChildField.h" + +class RimWellAllocationPlot; +class RimFlowCharacteristicsPlot; + +//================================================================================================== +/// +/// +//================================================================================================== +class RimFlowPlotCollection : public caf::PdmObject +{ + CAF_PDM_HEADER_INIT; +public: + RimFlowPlotCollection(); + virtual ~RimFlowPlotCollection(); + + void closeDefaultPlotWindowAndDeletePlots(); + void loadDataAndUpdate(); + size_t plotCount() const; + + void addWellAllocPlotToStoredPlots(RimWellAllocationPlot* plot); + RimWellAllocationPlot* defaultWellAllocPlot(); + RimFlowCharacteristicsPlot* defaultFlowCharacteristicsPlot(); + +private: + caf::PdmChildField m_flowCharacteristicsPlot; + caf::PdmChildField m_defaultWellAllocPlot; + caf::PdmChildArrayField m_storedWellAllocPlots; +}; diff --git a/ApplicationCode/ProjectDataModel/Flow/RimTotalWellAllocationPlot.cpp b/ApplicationCode/ProjectDataModel/Flow/RimTotalWellAllocationPlot.cpp new file mode 100644 index 0000000000..89454210ad --- /dev/null +++ b/ApplicationCode/ProjectDataModel/Flow/RimTotalWellAllocationPlot.cpp @@ -0,0 +1,209 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimTotalWellAllocationPlot.h" + +#include "RiaApplication.h" + +#include "RimEclipseView.h" +#include "RimEclipseWell.h" +#include "RimEclipseWellCollection.h" + +#include "RigSingleWellResultsData.h" + +#include "RimWellLogPlot.h" +#include "RimWellLogTrack.h" + +#include "RiuMainPlotWindow.h" +#include "RiuNightchartsWidget.h" +#include "RiuWellAllocationPlot.h" + +#include "cvfColor3.h" + + +CAF_PDM_SOURCE_INIT(RimTotalWellAllocationPlot, "TotalWellAllocationPlot"); + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimTotalWellAllocationPlot::RimTotalWellAllocationPlot() +{ + CAF_PDM_InitObject("Total Allocation", ":/WellAllocPie16x16.png", "", ""); + + CAF_PDM_InitField(&m_userName, "PlotDescription", QString("Total Allocation"), "Name", "", "", ""); + m_userName.uiCapability()->setUiReadOnly(true); + + CAF_PDM_InitField(&m_showPlotTitle, "ShowPlotTitle", true, "Show Plot Title", "", "", ""); + +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimTotalWellAllocationPlot::~RimTotalWellAllocationPlot() +{ + removeMdiWindowFromMdiArea(); + + deleteViewWidget(); +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimTotalWellAllocationPlot::deleteViewWidget() +{ + if (m_wellTotalAllocationPlotWidget) + { + m_wellTotalAllocationPlotWidget->deleteLater(); + m_wellTotalAllocationPlotWidget= nullptr; + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QWidget* RimTotalWellAllocationPlot::viewWidget() +{ + return m_wellTotalAllocationPlotWidget; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimTotalWellAllocationPlot::zoomAll() +{ +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimTotalWellAllocationPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) +{ + RimViewWindow::fieldChangedByUi(changedField, oldValue, newValue); + + if (changedField == &m_userName || + changedField == &m_showPlotTitle) + { + updateMdiWindowTitle(); + } + +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QImage RimTotalWellAllocationPlot::snapshotWindowContent() +{ + QImage image; + + // TODO + + return image; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimTotalWellAllocationPlot::setDescription(const QString& description) +{ + m_userName = description; + this->updateMdiWindowTitle(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimTotalWellAllocationPlot::description() const +{ + return m_userName(); +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimTotalWellAllocationPlot::totalAllocationAsText() const +{ + QString txt; + + for (auto a : m_sliceInfo) + { + txt += a.first; + txt += "\t"; + txt += QString::number(a.second); + txt += "\n"; + } + + return txt; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimTotalWellAllocationPlot::addSlice(const QString& name, const cvf::Color3f& color, float value) +{ + if ( m_wellTotalAllocationPlotWidget ) + { + QColor sliceColor(color.rByte(), color.gByte(), color.bByte()); + + m_wellTotalAllocationPlotWidget->addItem(name, sliceColor, value); + m_wellTotalAllocationPlotWidget->update(); + } + + m_sliceInfo.push_back(std::make_pair(name, value)); +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimTotalWellAllocationPlot::clearSlices() +{ + if ( m_wellTotalAllocationPlotWidget ) + { + m_wellTotalAllocationPlotWidget->clear(); + m_wellTotalAllocationPlotWidget->update(); + } + + m_sliceInfo.clear(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimTotalWellAllocationPlot::loadDataAndUpdate() +{ + updateMdiWindowVisibility(); + +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QWidget* RimTotalWellAllocationPlot::createViewWidget(QWidget* mainWindowParent) +{ + m_wellTotalAllocationPlotWidget = new RiuNightchartsWidget(mainWindowParent); + m_wellTotalAllocationPlotWidget->showLegend(false); + return m_wellTotalAllocationPlotWidget; +} + + diff --git a/ApplicationCode/ProjectDataModel/Flow/RimTotalWellAllocationPlot.h b/ApplicationCode/ProjectDataModel/Flow/RimTotalWellAllocationPlot.h new file mode 100644 index 0000000000..3e5dde6a2a --- /dev/null +++ b/ApplicationCode/ProjectDataModel/Flow/RimTotalWellAllocationPlot.h @@ -0,0 +1,88 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + + +#include "RimViewWindow.h" + +#include "cafPdmField.h" +#include "cafPdmObject.h" +#include "cafPdmPtrField.h" + +#include + +#include + +class RiuWellAllocationPlot; +class RimEclipseWell; +class RimWellLogPlot; +class RiuNightchartsWidget; + +namespace caf { + class PdmOptionItemInfo; +} + +namespace cvf { + class Color3f; +} + + +//================================================================================================== +/// +/// +//================================================================================================== +class RimTotalWellAllocationPlot : public RimViewWindow +{ + CAF_PDM_HEADER_INIT; + +public: + RimTotalWellAllocationPlot(); + virtual ~RimTotalWellAllocationPlot(); + + void setDescription(const QString& description); + QString description() const; + QString totalAllocationAsText() const; + + void addSlice(const QString& name, const cvf::Color3f& color, float value); + void clearSlices(); + // RimViewWindow overrides + + virtual QWidget* viewWidget() override; + virtual void zoomAll() override; + virtual QWidget* createViewWidget(QWidget* mainWindowParent) override; + virtual void deleteViewWidget() override; + +protected: + // RimViewWindow overrides + + virtual void loadDataAndUpdate() override; + virtual QImage snapshotWindowContent() override; + + // Overridden PDM methods + virtual caf::PdmFieldHandle* userDescriptionField() { return &m_userName; } + virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override; + +private: + caf::PdmField m_showPlotTitle; + caf::PdmField m_userName; + + QPointer m_wellTotalAllocationPlotWidget; + + std::vector > m_sliceInfo; +}; diff --git a/ApplicationCode/ProjectDataModel/Flow/RimWellAllocationPlot.cpp b/ApplicationCode/ProjectDataModel/Flow/RimWellAllocationPlot.cpp new file mode 100644 index 0000000000..0d9a0d0861 --- /dev/null +++ b/ApplicationCode/ProjectDataModel/Flow/RimWellAllocationPlot.cpp @@ -0,0 +1,799 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimWellAllocationPlot.h" + +#include "RiaApplication.h" + +#include "RigAccWellFlowCalculator.h" +#include "RigEclipseCaseData.h" +#include "RigFlowDiagResultAddress.h" +#include "RigFlowDiagResults.h" +#include "RigSimulationWellCenterLineCalculator.h" +#include "RigSimulationWellCoordsAndMD.h" +#include "RigSingleWellResultsData.h" + +#include "RimEclipseCase.h" +#include "RimEclipseCellColors.h" +#include "RimEclipseResultCase.h" +#include "RimEclipseView.h" +#include "RimEclipseWell.h" +#include "RimEclipseWellCollection.h" +#include "RimFlowDiagSolution.h" +#include "RimProject.h" +#include "RimTotalWellAllocationPlot.h" +#include "RimWellFlowRateCurve.h" +#include "RimWellLogPlot.h" +#include "RimWellLogTrack.h" +#include "RimWellAllocationPlotLegend.h" + +#include "RiuMainPlotWindow.h" +#include "RiuWellAllocationPlot.h" +#include "RiuWellLogTrack.h" + +CAF_PDM_SOURCE_INIT(RimWellAllocationPlot, "WellAllocationPlot"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- + +namespace caf +{ + +template<> +void AppEnum::setUp() +{ + addItem(RimWellAllocationPlot::ACCUMULATED, "ACCUMULATED", "Accumulated"); + addItem(RimWellAllocationPlot::INFLOW, "INFLOW", "Inflow Rates"); + setDefault(RimWellAllocationPlot::ACCUMULATED); + +} +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimWellAllocationPlot::RimWellAllocationPlot() +{ + CAF_PDM_InitObject("Well Allocation Plot", ":/WellAllocPlot16x16.png", "", ""); + + CAF_PDM_InitField(&m_userName, "PlotDescription", QString("Flow Diagnostics Plot"), "Name", "", "", ""); + m_userName.uiCapability()->setUiReadOnly(true); + + CAF_PDM_InitField(&m_showPlotTitle, "ShowPlotTitle", true, "Show Plot Title", "", "", ""); + + CAF_PDM_InitFieldNoDefault(&m_case, "CurveCase", "Case", "", "", ""); + m_case.uiCapability()->setUiTreeChildrenHidden(true); + + CAF_PDM_InitField(&m_timeStep, "PlotTimeStep", 0, "Time Step", "", "", ""); + CAF_PDM_InitField(&m_wellName, "WellName", QString("None"), "Well", "", "", ""); + CAF_PDM_InitFieldNoDefault(&m_flowDiagSolution, "FlowDiagSolution", "Plot Type", "", "", ""); + CAF_PDM_InitFieldNoDefault(&m_flowType, "FlowType", "Flow Type", "", "", ""); + CAF_PDM_InitField(&m_groupSmallContributions, "GroupSmallContributions", true, "Group Small Contributions", "", "", ""); + CAF_PDM_InitField(&m_smallContributionsThreshold, "SmallContributionsThreshold", 0.005, "Threshold", "", "", ""); + CAF_PDM_InitFieldNoDefault(&m_accumulatedWellFlowPlot, "AccumulatedWellFlowPlot", "Accumulated Well Flow", "", "", ""); + m_accumulatedWellFlowPlot.uiCapability()->setUiHidden(true); + m_accumulatedWellFlowPlot = new RimWellLogPlot; + m_accumulatedWellFlowPlot->setDepthUnit(RimDefines::UNIT_NONE); + m_accumulatedWellFlowPlot->setDepthType(RimWellLogPlot::CONNECTION_NUMBER); + m_accumulatedWellFlowPlot->setTrackLegendsVisible(false); + m_accumulatedWellFlowPlot->uiCapability()->setUiIcon(QIcon(":/WellFlowPlot16x16.png")); + + CAF_PDM_InitFieldNoDefault(&m_totalWellAllocationPlot, "TotalWellFlowPlot", "Total Well Flow", "", "", ""); + m_totalWellAllocationPlot.uiCapability()->setUiHidden(true); + m_totalWellAllocationPlot = new RimTotalWellAllocationPlot; + + CAF_PDM_InitFieldNoDefault(&m_wellAllocationPlotLegend, "WellAllocLegend", "Legend", "", "", ""); + m_wellAllocationPlotLegend.uiCapability()->setUiHidden(true); + m_wellAllocationPlotLegend = new RimWellAllocationPlotLegend; + + this->setAsPlotMdiWindow(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimWellAllocationPlot::~RimWellAllocationPlot() +{ + removeMdiWindowFromMdiArea(); + + delete m_accumulatedWellFlowPlot(); + delete m_totalWellAllocationPlot(); + + deleteViewWidget(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellAllocationPlot::setFromSimulationWell(RimEclipseWell* simWell) +{ + RimEclipseView* eclView; + simWell->firstAncestorOrThisOfType(eclView); + RimEclipseResultCase* eclCase; + simWell->firstAncestorOrThisOfType(eclCase); + + m_case = eclCase; + m_wellName = simWell->wellResults()->m_wellName; + m_timeStep = eclView->currentTimeStep(); + + // Use the active flow diag solutions, or the first one as default + m_flowDiagSolution = eclView->cellResult()->flowDiagSolution(); + if ( !m_flowDiagSolution ) + { + m_flowDiagSolution = m_case->defaultFlowDiagSolution(); + } + + loadDataAndUpdate(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellAllocationPlot::deleteViewWidget() +{ + if (m_wellAllocationPlotWidget) + { + m_wellAllocationPlotWidget->deleteLater(); + m_wellAllocationPlotWidget = nullptr; + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellAllocationPlot::updateFromWell() +{ + // Delete existing tracks + { + std::vector tracks; + accumulatedWellFlowPlot()->descendantsIncludingThisOfType(tracks); + + for (RimWellLogTrack* t : tracks) + { + accumulatedWellFlowPlot()->removeTrack(t); + delete t; + } + } + + CVF_ASSERT(accumulatedWellFlowPlot()->trackCount() == 0); + + QString description; + if (m_flowType() == ACCUMULATED) description = "Accumulated Flow"; + if (m_flowType() == INFLOW) description = "Inflow Rates"; + + accumulatedWellFlowPlot()->setDescription(description + " (" + m_wellName + ")"); + + if (!m_case) return; + + const RigSingleWellResultsData* wellResults = m_case->eclipseCaseData()->findWellResult(m_wellName); + + if (!wellResults) return; + + // Set up the Accumulated Well Flow Calculator + + std::vector< std::vector > pipeBranchesCLCoords; + std::vector< std::vector > pipeBranchesCellIds; + + RigSimulationWellCenterLineCalculator::calculateWellPipeCenterlineFromWellFrame(m_case->eclipseCaseData(), + wellResults, + m_timeStep, + true, + true, + pipeBranchesCLCoords, + pipeBranchesCellIds); + + std::map* > tracerFractionCellValues = findRelevantTracerCellFractions(wellResults); + + std::unique_ptr< RigAccWellFlowCalculator > wfCalculator; + + double smallContributionThreshold = 0.0; + if (m_groupSmallContributions()) smallContributionThreshold = m_smallContributionsThreshold; + + if ( tracerFractionCellValues.size() ) + { + bool isProducer = ( wellResults->wellProductionType(m_timeStep) == RigWellResultFrame::PRODUCER + || wellResults->wellProductionType(m_timeStep) == RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE ); + RigEclCellIndexCalculator cellIdxCalc(m_case->eclipseCaseData()->mainGrid(), m_case->eclipseCaseData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)); + wfCalculator.reset(new RigAccWellFlowCalculator(pipeBranchesCLCoords, + pipeBranchesCellIds, + tracerFractionCellValues, + cellIdxCalc, + smallContributionThreshold, + isProducer)); + } + else + { + if (pipeBranchesCLCoords.size() > 0) + { + wfCalculator.reset(new RigAccWellFlowCalculator(pipeBranchesCLCoords, + pipeBranchesCellIds, + smallContributionThreshold)); + } + } + + auto depthType = accumulatedWellFlowPlot()->depthType(); + + if ( depthType == RimWellLogPlot::MEASURED_DEPTH ) return; + + // Create tracks and curves from the calculated data + + size_t branchCount = pipeBranchesCLCoords.size(); + for (size_t brIdx = 0; brIdx < branchCount; ++brIdx) + { + // Skip Tiny dummy branches + if (pipeBranchesCellIds[brIdx].size() <= 3) continue; + + RimWellLogTrack* plotTrack = new RimWellLogTrack(); + + plotTrack->setDescription(QString("Branch %1").arg(brIdx + 1)); + + accumulatedWellFlowPlot()->addTrack(plotTrack); + + const std::vector& depthValues = depthType == RimWellLogPlot::CONNECTION_NUMBER ? wfCalculator->connectionNumbersFromTop(brIdx) : + depthType == RimWellLogPlot::PSEUDO_LENGTH ? wfCalculator->pseudoLengthFromTop(brIdx) : + depthType == RimWellLogPlot::TRUE_VERTICAL_DEPTH ? wfCalculator->trueVerticalDepth(brIdx) : + std::vector(); + + { + std::vector tracerNames = wfCalculator->tracerNames(); + for (const QString& tracerName: tracerNames) + { + const std::vector* accFlow = nullptr; + if (depthType == RimWellLogPlot::CONNECTION_NUMBER) + { + accFlow = &(m_flowType == ACCUMULATED ? + wfCalculator->accumulatedTracerFlowPrConnection(tracerName, brIdx): + wfCalculator->tracerFlowPrConnection(tracerName, brIdx)); + } + else if ( depthType == RimWellLogPlot::PSEUDO_LENGTH || depthType == RimWellLogPlot::TRUE_VERTICAL_DEPTH) + { + accFlow = &(m_flowType == ACCUMULATED ? + wfCalculator->accumulatedTracerFlowPrPseudoLength(tracerName, brIdx): + wfCalculator->tracerFlowPrPseudoLength(tracerName, brIdx)); + } + + addStackedCurve(tracerName, depthValues, *accFlow, plotTrack); + //TODO: THIs is the data to be plotted... + } + } + + + updateWellFlowPlotXAxisTitle(plotTrack); + + } + + QString wellStatusText = QString("(%1)").arg(RimWellAllocationPlot::wellStatusTextForTimeStep(m_wellName, m_case, m_timeStep)); + + QString flowTypeText = m_flowDiagSolution() ? "Well Allocation": "Well Flow"; + setDescription(flowTypeText + ": " + m_wellName + " " + wellStatusText + ", " + m_case->timeStepStrings()[m_timeStep] + " (" + m_case->caseUserDescription() + ")"); + + /// Pie chart + + m_totalWellAllocationPlot->clearSlices(); + if (m_wellAllocationPlotWidget) m_wellAllocationPlotWidget->clearLegend(); + + if (wfCalculator) + { + std::vector > totalTracerFractions = wfCalculator->totalTracerFractions() ; + + for ( const auto& tracerVal : totalTracerFractions ) + { + cvf::Color3f color; + if (m_flowDiagSolution) + color = m_flowDiagSolution->tracerColor(tracerVal.first); + else + color = getTracerColor(tracerVal.first); + + double tracerPercent = 100*tracerVal.second; + + m_totalWellAllocationPlot->addSlice(tracerVal.first, color, tracerPercent); + if ( m_wellAllocationPlotWidget ) m_wellAllocationPlotWidget->addLegendItem(tracerVal.first, color, tracerPercent); + } + } + + if (m_wellAllocationPlotWidget) m_wellAllocationPlotWidget->showLegend(m_wellAllocationPlotLegend->isShowingLegend()); + m_totalWellAllocationPlot->updateConnectedEditors(); + + accumulatedWellFlowPlot()->updateConnectedEditors(); + if (m_wellAllocationPlotWidget) m_wellAllocationPlotWidget->updateGeometry(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::map *> RimWellAllocationPlot::findRelevantTracerCellFractions(const RigSingleWellResultsData* wellResults) +{ + std::map *> tracerCellFractionValues; + + if ( m_flowDiagSolution && wellResults->hasWellResult(m_timeStep) ) + { + RimFlowDiagSolution::TracerStatusType requestedTracerType = RimFlowDiagSolution::UNDEFINED; + + const RigWellResultFrame::WellProductionType prodType = wellResults->wellProductionType(m_timeStep); + if ( prodType == RigWellResultFrame::PRODUCER + || prodType == RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE ) + { + requestedTracerType = RimFlowDiagSolution::INJECTOR; + } + else + { + requestedTracerType = RimFlowDiagSolution::PRODUCER; + } + + std::vector tracerNames = m_flowDiagSolution->tracerNames(); + for ( const QString& tracerName : tracerNames ) + { + if ( m_flowDiagSolution->tracerStatusInTimeStep(tracerName, m_timeStep) == requestedTracerType ) + { + RigFlowDiagResultAddress resAddr(RIG_FLD_CELL_FRACTION_RESNAME, tracerName.toStdString()); + const std::vector* tracerCellFractions = m_flowDiagSolution->flowDiagResults()->resultValues(resAddr, m_timeStep); + if (tracerCellFractions) tracerCellFractionValues[tracerName] = tracerCellFractions; + } + } + } + + return tracerCellFractionValues; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellAllocationPlot::updateWellFlowPlotXAxisTitle(RimWellLogTrack* plotTrack) +{ + RigEclipseCaseData::UnitsType unitSet = m_case->eclipseCaseData()->unitsType(); + + + if (m_flowDiagSolution) + { + QString unitText; + switch ( unitSet ) + { + case RigEclipseCaseData::UNITS_METRIC: + unitText = "[m3/day]"; + break; + case RigEclipseCaseData::UNITS_FIELD: + unitText = "[Brl/day]"; + break; + case RigEclipseCaseData::UNITS_LAB: + unitText = "[cm3/hr]"; + break; + default: + break; + + } + plotTrack->setXAxisTitle("Reservoir Flow Rate " + unitText); + } + else + { + QString unitText; + switch ( unitSet ) + { + case RigEclipseCaseData::UNITS_METRIC: + unitText = "[Liquid Sm3/day], [Gas kSm3/day]"; + break; + case RigEclipseCaseData::UNITS_FIELD: + unitText = "[Liquid BBL/day], [Gas BOE/day]"; + break; + case RigEclipseCaseData::UNITS_LAB: + unitText = "[cm3/hr]"; + break; + default: + break; + + } + plotTrack->setXAxisTitle("Surface Flow Rate " + unitText); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellAllocationPlot::addStackedCurve(const QString& tracerName, + const std::vector& depthValues, + const std::vector& accFlow, + RimWellLogTrack* plotTrack) +{ + RimWellFlowRateCurve* curve = new RimWellFlowRateCurve; + curve->setFlowValuesPrDepthValue(tracerName, depthValues, accFlow); + + if ( m_flowDiagSolution ) + { + curve->setColor(m_flowDiagSolution->tracerColor(tracerName)); + } + else + { + curve->setColor(getTracerColor(tracerName)); + } + + plotTrack->addCurve(curve); + + curve->loadDataAndUpdate(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellAllocationPlot::updateWidgetTitleWindowTitle() +{ + updateMdiWindowTitle(); + + if (m_wellAllocationPlotWidget) + { + if (m_showPlotTitle) + { + m_wellAllocationPlotWidget->showTitle(m_userName); + } + else + { + m_wellAllocationPlotWidget->hideTitle(); + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimWellAllocationPlot::wellStatusTextForTimeStep(const QString& wellName, const RimEclipseResultCase* eclipseResultCase, size_t timeStep) +{ + QString statusText = "Undefined"; + + if (eclipseResultCase) + { + const RigSingleWellResultsData* wellResults = eclipseResultCase->eclipseCaseData()->findWellResult(wellName); + + if (wellResults) + { + if (wellResults->hasWellResult(timeStep)) + { + const RigWellResultFrame& wellResultFrame = wellResults->wellResultFrame(timeStep); + + RigWellResultFrame::WellProductionType prodType = wellResultFrame.m_productionType; + + switch (prodType) + { + case RigWellResultFrame::PRODUCER: + statusText = "Producer"; + break; + case RigWellResultFrame::OIL_INJECTOR: + statusText = "Oil Injector"; + break; + case RigWellResultFrame::GAS_INJECTOR: + statusText = "Gas Injector"; + break; + case RigWellResultFrame::WATER_INJECTOR: + statusText = "Water Injector"; + break; + case RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE: + break; + default: + break; + } + } + } + } + + return statusText; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QWidget* RimWellAllocationPlot::viewWidget() +{ + return m_wellAllocationPlotWidget; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellAllocationPlot::zoomAll() +{ + m_accumulatedWellFlowPlot()->zoomAll(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimWellLogPlot* RimWellAllocationPlot::accumulatedWellFlowPlot() +{ + return m_accumulatedWellFlowPlot(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimTotalWellAllocationPlot* RimWellAllocationPlot::totalWellFlowPlot() +{ + return m_totalWellAllocationPlot(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +caf::PdmObject* RimWellAllocationPlot::plotLegend() +{ + return m_wellAllocationPlotLegend; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimEclipseResultCase* RimWellAllocationPlot::rimCase() +{ + return m_case(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +int RimWellAllocationPlot::timeStep() +{ + return m_timeStep(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QList RimWellAllocationPlot::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) +{ + QList options; + + if (fieldNeedingOptions == &m_wellName) + { + std::set sortedWellNames = this->findSortedWellNames(); + + QIcon simWellIcon(":/Well.png"); + for ( const QString& wname: sortedWellNames ) + { + options.push_back(caf::PdmOptionItemInfo(wname, wname, false, simWellIcon)); + } + + if (options.size() == 0) + { + options.push_front(caf::PdmOptionItemInfo("None", nullptr)); + } + } + else if (fieldNeedingOptions == &m_timeStep) + { + QStringList timeStepNames; + + if (m_case && m_case->eclipseCaseData()) + { + timeStepNames = m_case->timeStepStrings(); + } + + for (int i = 0; i < timeStepNames.size(); i++) + { + options.push_back(caf::PdmOptionItemInfo(timeStepNames[i], i)); + } + } + else if (fieldNeedingOptions == &m_case) + { + RimProject* proj = nullptr; + this->firstAncestorOrThisOfType(proj); + if (proj) + { + std::vector cases; + proj->descendantsIncludingThisOfType(cases); + + for (RimEclipseResultCase* c : cases) + { + options.push_back(caf::PdmOptionItemInfo(c->caseUserDescription(), c, false, c->uiIcon())); + } + } + } + else if (fieldNeedingOptions == &m_flowDiagSolution) + { + if (m_case) + { + //std::vector flowSols = m_case->flowDiagSolutions(); + // options.push_back(caf::PdmOptionItemInfo("None", nullptr)); + //for (RimFlowDiagSolution* flowSol : flowSols) + //{ + // options.push_back(caf::PdmOptionItemInfo(flowSol->userDescription(), flowSol, false, flowSol->uiIcon())); + //} + + RimFlowDiagSolution* defaultFlowSolution = m_case->defaultFlowDiagSolution(); + options.push_back(caf::PdmOptionItemInfo("Well Flow", nullptr)); + if (defaultFlowSolution) + { + options.push_back(caf::PdmOptionItemInfo("Allocation", defaultFlowSolution )); + } + } + } + + return options; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimWellAllocationPlot::wellName() const +{ + return m_wellName(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellAllocationPlot::removeFromMdiAreaAndDeleteViewWidget() +{ + removeMdiWindowFromMdiArea(); + deleteViewWidget(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellAllocationPlot::showPlotLegend(bool doShow) +{ + if (m_wellAllocationPlotWidget) m_wellAllocationPlotWidget->showLegend(doShow); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellAllocationPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) +{ + RimViewWindow::fieldChangedByUi(changedField, oldValue, newValue); + + if (changedField == &m_userName || + changedField == &m_showPlotTitle) + { + updateWidgetTitleWindowTitle(); + } + else if ( changedField == &m_case) + { + if ( m_flowDiagSolution && m_case ) + { + m_flowDiagSolution = m_case->defaultFlowDiagSolution(); + } + else + { + m_flowDiagSolution = nullptr; + } + + if (!m_case) m_timeStep = 0; + else if (m_timeStep >= static_cast(m_case->timeStepDates().size())) + { + m_timeStep = std::max(0, ((int)m_case->timeStepDates().size()) - 1); + } + + std::set sortedWellNames = findSortedWellNames(); + if (!sortedWellNames.size()) m_wellName = ""; + else if ( sortedWellNames.count(m_wellName()) == 0 ){ m_wellName = *sortedWellNames.begin();} + + loadDataAndUpdate(); + } + else if ( changedField == &m_wellName + || changedField == &m_timeStep + || changedField == &m_flowDiagSolution + || changedField == &m_groupSmallContributions + || changedField == &m_smallContributionsThreshold + || changedField == &m_flowType ) + { + loadDataAndUpdate(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::set RimWellAllocationPlot::findSortedWellNames() +{ + std::set sortedWellNames; + if ( m_case && m_case->eclipseCaseData() ) + { + const cvf::Collection& wellRes = m_case->eclipseCaseData()->wellResults(); + + for ( size_t wIdx = 0; wIdx < wellRes.size(); ++wIdx ) + { + sortedWellNames.insert(wellRes[wIdx]->m_wellName); + } + } + + return sortedWellNames; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QImage RimWellAllocationPlot::snapshotWindowContent() +{ + QImage image; + + if (m_wellAllocationPlotWidget) + { + QPixmap pix = QPixmap::grabWidget(m_wellAllocationPlotWidget); + image = pix.toImage(); + } + + return image; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellAllocationPlot::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) +{ + uiOrdering.add(&m_userName); + uiOrdering.add(&m_showPlotTitle); + + caf::PdmUiGroup& dataGroup = *uiOrdering.addNewGroup("Plot Data"); + dataGroup.add(&m_case); + dataGroup.add(&m_timeStep); + dataGroup.add(&m_wellName); + + caf::PdmUiGroup& optionGroup = *uiOrdering.addNewGroup("Options"); + optionGroup.add(&m_flowDiagSolution); + optionGroup.add(&m_flowType); + optionGroup.add(&m_groupSmallContributions); + optionGroup.add(&m_smallContributionsThreshold); + m_smallContributionsThreshold.uiCapability()->setUiReadOnly(!m_groupSmallContributions()); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellAllocationPlot::setDescription(const QString& description) +{ + m_userName = description; + + updateWidgetTitleWindowTitle(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimWellAllocationPlot::description() const +{ + return m_userName(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellAllocationPlot::loadDataAndUpdate() +{ + updateMdiWindowVisibility(); + updateFromWell(); + m_accumulatedWellFlowPlot->loadDataAndUpdate(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QWidget* RimWellAllocationPlot::createViewWidget(QWidget* mainWindowParent) +{ + m_wellAllocationPlotWidget = new RiuWellAllocationPlot(this, mainWindowParent); + return m_wellAllocationPlotWidget; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +cvf::Color3f RimWellAllocationPlot::getTracerColor(const QString& tracerName) +{ + + if (tracerName == RIG_FLOW_OIL_NAME) return cvf::Color3f::DARK_GREEN; + if (tracerName == RIG_FLOW_GAS_NAME) return cvf::Color3f::DARK_RED; + if (tracerName == RIG_FLOW_WATER_NAME) return cvf::Color3f::BLUE; + return cvf::Color3f::DARK_GRAY; +} + diff --git a/ApplicationCode/ProjectDataModel/Flow/RimWellAllocationPlot.h b/ApplicationCode/ProjectDataModel/Flow/RimWellAllocationPlot.h new file mode 100644 index 0000000000..b8261e7d05 --- /dev/null +++ b/ApplicationCode/ProjectDataModel/Flow/RimWellAllocationPlot.h @@ -0,0 +1,137 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + + +#include "RimViewWindow.h" + +#include "cafPdmField.h" +#include "cafPdmObject.h" +#include "cafPdmPtrField.h" + +#include + +class RimEclipseResultCase; +class RimEclipseWell; +class RimFlowDiagSolution; +class RimTotalWellAllocationPlot; +class RimWellAllocationPlotLegend; +class RimWellLogPlot; +class RiuWellAllocationPlot; +class RimWellLogTrack; +class RigSingleWellResultsData; + +namespace cvf { + class Color3f; +} + +namespace caf { + class PdmOptionItemInfo; +} + + +//================================================================================================== +/// +/// +//================================================================================================== +class RimWellAllocationPlot : public RimViewWindow +{ + CAF_PDM_HEADER_INIT; +public: + enum FlowType { ACCUMULATED, INFLOW}; + +public: + RimWellAllocationPlot(); + virtual ~RimWellAllocationPlot(); + + void setFromSimulationWell(RimEclipseWell* simWell); + + void setDescription(const QString& description); + QString description() const; + + virtual void loadDataAndUpdate() override; + + virtual QWidget* viewWidget() override; + virtual void zoomAll() override; + + RimWellLogPlot* accumulatedWellFlowPlot(); + RimTotalWellAllocationPlot* totalWellFlowPlot(); + caf::PdmObject* plotLegend(); + RimEclipseResultCase* rimCase(); + int timeStep(); + + QString wellName() const; + + void removeFromMdiAreaAndDeleteViewWidget(); + + void showPlotLegend(bool doShow); +protected: + // Overridden PDM methods + virtual caf::PdmFieldHandle* userDescriptionField() { return &m_userName; } + virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override; + + std::set findSortedWellNames(); + + virtual QList calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override; + + virtual QImage snapshotWindowContent() override; + + + virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override; + +private: + void updateFromWell(); + + std::map *> findRelevantTracerCellFractions(const RigSingleWellResultsData* wellResults); + + void updateWellFlowPlotXAxisTitle(RimWellLogTrack* plotTrack); + + void addStackedCurve(const QString& tracerName, + const std::vector& depthValues, + const std::vector& accFlow, + RimWellLogTrack* plotTrack); + + void updateWidgetTitleWindowTitle(); + static QString wellStatusTextForTimeStep(const QString& wellName, const RimEclipseResultCase* eclipseResultCase, size_t timeStep); + + // RimViewWindow overrides + + virtual QWidget* createViewWidget(QWidget* mainWindowParent) override; + virtual void deleteViewWidget() override; + + cvf::Color3f getTracerColor(const QString& tracerName); + +private: + caf::PdmField m_showPlotTitle; + caf::PdmField m_userName; + + caf::PdmPtrField m_case; + caf::PdmField m_wellName; + caf::PdmField m_timeStep; + caf::PdmPtrField m_flowDiagSolution; + caf::PdmField m_groupSmallContributions; + caf::PdmField m_smallContributionsThreshold; + caf::PdmField > m_flowType; + + QPointer m_wellAllocationPlotWidget; + + caf::PdmChildField m_accumulatedWellFlowPlot; + caf::PdmChildField m_totalWellAllocationPlot; + caf::PdmChildField m_wellAllocationPlotLegend; +}; diff --git a/ApplicationCode/ProjectDataModel/Flow/RimWellAllocationPlotLegend.cpp b/ApplicationCode/ProjectDataModel/Flow/RimWellAllocationPlotLegend.cpp new file mode 100644 index 0000000000..0a16a09094 --- /dev/null +++ b/ApplicationCode/ProjectDataModel/Flow/RimWellAllocationPlotLegend.cpp @@ -0,0 +1,63 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimWellAllocationPlotLegend.h" +#include "RimWellAllocationPlot.h" + +CAF_PDM_SOURCE_INIT(RimWellAllocationPlotLegend, "WellAllocationPlotLegend"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimWellAllocationPlotLegend::RimWellAllocationPlotLegend() +{ + CAF_PDM_InitObject("Legend", ":/WellAllocLegend16x16.png", "", ""); + CAF_PDM_InitField(&m_showLegend, "ShowPlotLegend", true, "Show Plot Legend", "", "", ""); + +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimWellAllocationPlotLegend::~RimWellAllocationPlotLegend() +{ + +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +caf::PdmFieldHandle* RimWellAllocationPlotLegend::objectToggleField() +{ + return &m_showLegend; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellAllocationPlotLegend::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) +{ + if (changedField == &m_showLegend) + { + RimWellAllocationPlot* walp; + firstAncestorOrThisOfType(walp); + + if (walp) walp->showPlotLegend(m_showLegend()); + } +} + diff --git a/ApplicationCode/ProjectDataModel/Flow/RimWellAllocationPlotLegend.h b/ApplicationCode/ProjectDataModel/Flow/RimWellAllocationPlotLegend.h new file mode 100644 index 0000000000..be6f44870a --- /dev/null +++ b/ApplicationCode/ProjectDataModel/Flow/RimWellAllocationPlotLegend.h @@ -0,0 +1,47 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafPdmField.h" +#include "cafPdmObject.h" +//================================================================================================== +/// +/// +//================================================================================================== + +class RimWellAllocationPlotLegend : public caf::PdmObject +{ + CAF_PDM_HEADER_INIT; + +public: + RimWellAllocationPlotLegend(); + virtual ~RimWellAllocationPlotLegend(); + + bool isShowingLegend() { return m_showLegend();} + +protected: + + virtual caf::PdmFieldHandle* objectToggleField() override; + virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override; + +private: + caf::PdmField m_showLegend; + +}; + diff --git a/ApplicationCode/ProjectDataModel/Flow/RimWellFlowRateCurve.cpp b/ApplicationCode/ProjectDataModel/Flow/RimWellFlowRateCurve.cpp new file mode 100644 index 0000000000..d9ecaf6cd1 --- /dev/null +++ b/ApplicationCode/ProjectDataModel/Flow/RimWellFlowRateCurve.cpp @@ -0,0 +1,283 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimWellFlowRateCurve.h" + +#include "WellLogCommands/RicWellLogPlotCurveFeatureImpl.h" + +#include "RigWellLogCurveData.h" + +#include "RimWellAllocationPlot.h" +#include "RimWellLogPlot.h" +#include "RimWellLogTrack.h" + +#include "RiuLineSegmentQwtPlotCurve.h" + +#include "qwt_plot.h" + +#include "cvfMath.h" + +#include + + +//================================================================================================== +/// +/// +//================================================================================================== + +CAF_PDM_SOURCE_INIT(RimWellFlowRateCurve, "WellFlowRateCurve"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimWellFlowRateCurve::RimWellFlowRateCurve() +{ + CAF_PDM_InitObject("Flow Rate Curve", "", "", ""); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimWellFlowRateCurve::~RimWellFlowRateCurve() +{ + +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimWellFlowRateCurve::wellName() const +{ + QString name; + + RimWellAllocationPlot* wap = wellAllocationPlot(); + + if (wap) + { + name = wap->wellName(); + } + else + { + name = "Undefined"; + } + + return name; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimWellFlowRateCurve::wellLogChannelName() const +{ + return "AccumulatedFlowRate"; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimWellFlowRateCurve::createCurveAutoName() +{ + return m_tracerName; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellFlowRateCurve::onLoadDataAndUpdate() +{ + RimWellLogCurve::updateCurvePresentation(); + + if (isCurveVisible()) + { + m_qwtPlotCurve->setTitle(createCurveAutoName()); + + updateStackedPlotData(); + + updateZoomInParentPlot(); + + if (m_parentQwtPlot) m_parentQwtPlot->replot(); + } +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellFlowRateCurve::updateCurveAppearance() +{ + RimWellLogCurve::updateCurveAppearance(); + + if ( isUsingConnectionNumberDepthType() ) + { + m_qwtPlotCurve->setStyle(QwtPlotCurve::Steps); + } + + QColor curveQColor = QColor (m_curveColor.value().rByte(), m_curveColor.value().gByte(), m_curveColor.value().bByte()); + m_qwtPlotCurve->setBrush(QBrush( curveQColor)); + + QLinearGradient gradient; + gradient.setCoordinateMode(QGradient::StretchToDeviceMode); + gradient.setColorAt(0,curveQColor.darker(110)); + gradient.setColorAt(0.15,curveQColor); + gradient.setColorAt(0.25,curveQColor); + gradient.setColorAt(0.4,curveQColor.darker(110)); + gradient.setColorAt(0.6,curveQColor); + gradient.setColorAt(0.8,curveQColor.darker(110)); + gradient.setColorAt(1,curveQColor); + m_qwtPlotCurve->setBrush(gradient); + + QPen curvePen = m_qwtPlotCurve->pen(); + curvePen.setColor(curveQColor.darker()); + m_qwtPlotCurve->setPen(curvePen); + m_qwtPlotCurve->setOrientation(Qt::Horizontal); + m_qwtPlotCurve->setBaseline(0.0); + m_qwtPlotCurve->setCurveAttribute(QwtPlotCurve::Inverted, true); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellFlowRateCurve::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) +{ + uiOrdering.add(&m_curveName); + m_curveName.uiCapability()->setUiReadOnly(true); + uiOrdering.add(&m_curveColor); + m_curveColor.uiCapability()->setUiReadOnly(true); + + uiOrdering.skipRemainingFields(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellFlowRateCurve::updateStackedPlotData() +{ + RimWellLogPlot* wellLogPlot; + firstAncestorOrThisOfTypeAsserted(wellLogPlot); + + RimWellLogTrack* wellLogTrack; + firstAncestorOrThisOfTypeAsserted(wellLogTrack); + + bool isFirstTrack = (wellLogTrack == wellLogPlot->trackByIndex(0)); + + RimDefines::DepthUnitType displayUnit = RimDefines::UNIT_NONE; + + std::vector depthValues = m_curveData->measuredDepthPlotValues(displayUnit); + std::vector< std::pair > polyLineStartStopIndices = m_curveData->polylineStartStopIndices(); + std::vector stackedValues(depthValues.size(), 0.0); + + std::vector stackedCurves = wellLogTrack->visibleStackedCurves(); + double zPos = -0.1; + for ( RimWellFlowRateCurve * stCurve: stackedCurves ) + { + std::vector values = stCurve->curveData()->xPlotValues(); + for ( size_t i = 0; i < values.size(); ++i ) + { + stackedValues[i] += values[i]; + } + + if ( stCurve == this ) break; + zPos -= 1.0; + } + + // Insert the first depth position again, to add a value pair + + if ( depthValues.size() ) // Should we really do this for all curve variants ? + { + depthValues.insert(depthValues.begin(), depthValues[0]); + stackedValues.insert(stackedValues.begin(), 0.0); + polyLineStartStopIndices.front().second += 1; + + if (wellLogPlot->trackCount() > 1 && isFirstTrack) + { + // Add a dummy negative depth value to make the contribution + // from other branches connected to well head visible + + double availableMinDepth; + double availableMaxDepth; + wellLogPlot->availableDepthRange(&availableMinDepth, &availableMaxDepth); + + double depthSpan = 0.1 * cvf::Math::abs(availableMinDepth - availableMaxDepth); + + // Round off value to floored decade + double logDecValue = log10(depthSpan); + logDecValue = cvf::Math::floor(logDecValue); + depthSpan = pow(10.0, logDecValue); + + double dummyNegativeDepthValue = depthValues.back() - depthSpan; + + depthValues.push_back(dummyNegativeDepthValue); + stackedValues.push_back(stackedValues.back()); + polyLineStartStopIndices.front().second += 1; + } + } + + // Add a dummy point for the zeroth connection to make the "end" distribution show better. + + if ( isFirstTrack && isUsingConnectionNumberDepthType() ) + { + stackedValues.push_back(stackedValues.back()); + depthValues.push_back(0.0); + + polyLineStartStopIndices.front().second += 1; + } + + m_qwtPlotCurve->setSamples(stackedValues.data(), depthValues.data(), static_cast(depthValues.size())); + m_qwtPlotCurve->setLineSegmentStartStopIndices(polyLineStartStopIndices); + + m_qwtPlotCurve->setZ(zPos); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimWellFlowRateCurve::isUsingConnectionNumberDepthType() const +{ + RimWellLogPlot* wellLogPlot; + firstAncestorOrThisOfType(wellLogPlot); + if ( wellLogPlot && wellLogPlot->depthType() == RimWellLogPlot::CONNECTION_NUMBER ) + { + return true; + } + + return false; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimWellAllocationPlot* RimWellFlowRateCurve::wellAllocationPlot() const +{ + RimWellAllocationPlot* wap = nullptr; + this->firstAncestorOrThisOfType(wap); + + return wap; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellFlowRateCurve::setFlowValuesPrDepthValue(const QString& tracerName, const std::vector& depthValues, const std::vector& flowRates) +{ + m_curveData = new RigWellLogCurveData; + + m_curveData->setValuesAndMD(flowRates, depthValues, RimDefines::UNIT_NONE, false); + + m_tracerName = tracerName; +} + diff --git a/ApplicationCode/ProjectDataModel/Flow/RimWellFlowRateCurve.h b/ApplicationCode/ProjectDataModel/Flow/RimWellFlowRateCurve.h new file mode 100644 index 0000000000..80f5c0a06d --- /dev/null +++ b/ApplicationCode/ProjectDataModel/Flow/RimWellFlowRateCurve.h @@ -0,0 +1,60 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "RimWellLogCurve.h" + +#include "cafPdmPtrField.h" +#include "cafPdmChildField.h" + +class RimEclipseResultCase; +class RimWellAllocationPlot; + + +//================================================================================================== +/// +/// +//================================================================================================== +class RimWellFlowRateCurve : public RimWellLogCurve +{ + CAF_PDM_HEADER_INIT; +public: + RimWellFlowRateCurve(); + virtual ~RimWellFlowRateCurve(); + + void setFlowValuesPrDepthValue(const QString& tracerName , const std::vector& depthValues, const std::vector& flowRates); + void updateStackedPlotData(); + + virtual QString wellName() const override; + virtual QString wellLogChannelName() const override; + +protected: + virtual QString createCurveAutoName() override; + virtual void onLoadDataAndUpdate() override; + virtual void updateCurveAppearance() override; + + virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override; + +private: + bool isUsingConnectionNumberDepthType() const; + RimWellAllocationPlot* wellAllocationPlot() const; + + QString m_tracerName; +}; + diff --git a/ApplicationCode/ProjectDataModel/Rim3dOverlayInfoConfig.cpp b/ApplicationCode/ProjectDataModel/Rim3dOverlayInfoConfig.cpp index ffd069bd20..26bc72a026 100644 --- a/ApplicationCode/ProjectDataModel/Rim3dOverlayInfoConfig.cpp +++ b/ApplicationCode/ProjectDataModel/Rim3dOverlayInfoConfig.cpp @@ -21,13 +21,14 @@ #include "Rim3dOverlayInfoConfig.h" #include "RigCaseCellResultsData.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" #include "RigEclipseNativeVisibleCellsStatCalc.h" #include "RigFemNativeVisibleCellsStatCalc.h" #include "RigFemPartCollection.h" #include "RigFemPartResultsCollection.h" #include "RigFemResultAddress.h" #include "RigGeoMechCaseData.h" +#include "RigMainGrid.h" #include "RigStatisticsDataCache.h" #include "RimCellEdgeColors.h" @@ -45,6 +46,8 @@ #include "RimView.h" #include "RiuViewer.h" +#include "RigFlowDiagResults.h" +#include "RigFlowDiagVisibleCellsStatCalc.h" CAF_PDM_SOURCE_INIT(Rim3dOverlayInfoConfig, "View3dOverlayInfoConfig"); //-------------------------------------------------------------------------------------------------- @@ -182,6 +185,31 @@ caf::PdmFieldHandle* Rim3dOverlayInfoConfig::objectToggleField() return &active; } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void Rim3dOverlayInfoConfig::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) +{ + caf::PdmUiGroup* visGroup = uiOrdering.addNewGroup("Visibility"); + + visGroup->add(&showAnimProgress); + visGroup->add(&showCaseInfo); + visGroup->add(&showResultInfo); + visGroup->add(&showHistogram); + + caf::PdmUiGroup* statGroup = uiOrdering.addNewGroup("Statistics Options"); + RimEclipseView * eclipseView = dynamic_cast(m_viewDef.p()); + + if ( !eclipseView || eclipseView->cellResult()->resultType() != RimDefines::FLOW_DIAGNOSTICS ) // + { + statGroup->add(&m_statisticsTimeRange); + } + statGroup->add(&m_statisticsCellRange); + + uiOrdering.skipRemainingFields(true); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -208,6 +236,9 @@ void Rim3dOverlayInfoConfig::updateEclipse3DInfo(RimEclipseView * eclipseView) if (isResultsInfoRelevant) { size_t scalarIndex = eclipseView->cellResult()->scalarResultIndex(); + if (scalarIndex != cvf::UNDEFINED_SIZE_T) + { + if (m_statisticsCellRange == ALL_CELLS) { if (m_statisticsTimeRange == ALL_TIMESTEPS) @@ -220,12 +251,17 @@ void Rim3dOverlayInfoConfig::updateEclipse3DInfo(RimEclipseView * eclipseView) } else if (m_statisticsTimeRange == CURRENT_TIMESTEP ) { - int timeStepIdx = eclipseView->currentTimeStep(); - eclipseView->currentGridCellResults()->cellResults()->minMaxCellScalarValues(scalarIndex, timeStepIdx, min, max); - eclipseView->currentGridCellResults()->cellResults()->p10p90CellScalarValues(scalarIndex, timeStepIdx, p10, p90); - eclipseView->currentGridCellResults()->cellResults()->meanCellScalarValues(scalarIndex, timeStepIdx, mean); - eclipseView->currentGridCellResults()->cellResults()->sumCellScalarValues(scalarIndex, timeStepIdx, sum); - histogram = &(eclipseView->currentGridCellResults()->cellResults()->cellScalarValuesHistogram(scalarIndex, timeStepIdx)); + int currentTimeStep = eclipseView->currentTimeStep(); + if (eclipseView->cellResult()->hasStaticResult()) + { + currentTimeStep = 0; + } + + eclipseView->currentGridCellResults()->cellResults()->minMaxCellScalarValues(scalarIndex, currentTimeStep, min, max); + eclipseView->currentGridCellResults()->cellResults()->p10p90CellScalarValues(scalarIndex, currentTimeStep, p10, p90); + eclipseView->currentGridCellResults()->cellResults()->meanCellScalarValues(scalarIndex, currentTimeStep, mean); + eclipseView->currentGridCellResults()->cellResults()->sumCellScalarValues(scalarIndex, currentTimeStep, sum); + histogram = &(eclipseView->currentGridCellResults()->cellResults()->cellScalarValuesHistogram(scalarIndex, currentTimeStep)); } else { @@ -248,6 +284,11 @@ void Rim3dOverlayInfoConfig::updateEclipse3DInfo(RimEclipseView * eclipseView) else if (m_statisticsTimeRange == CURRENT_TIMESTEP) { int currentTimeStep = eclipseView->currentTimeStep(); + if (eclipseView->cellResult()->hasStaticResult()) + { + currentTimeStep = 0; + } + m_visibleCellStatistics->meanCellScalarValues(currentTimeStep, mean); m_visibleCellStatistics->minMaxCellScalarValues(currentTimeStep, min, max); m_visibleCellStatistics->p10p90CellScalarValues(currentTimeStep, p10, p90); @@ -256,6 +297,37 @@ void Rim3dOverlayInfoConfig::updateEclipse3DInfo(RimEclipseView * eclipseView) histogram = &(m_visibleCellStatistics->cellScalarValuesHistogram(currentTimeStep)); } } + } + else if (eclipseView->cellResult()->resultType() == RimDefines::FLOW_DIAGNOSTICS) + { + if ( m_statisticsTimeRange == CURRENT_TIMESTEP || m_statisticsTimeRange == ALL_TIMESTEPS) // All timesteps is ignored + { + int currentTimeStep = eclipseView->currentTimeStep(); + + if ( m_statisticsCellRange == ALL_CELLS ) + { + RigFlowDiagResults* fldResults = eclipseView->cellResult()->flowDiagSolution()->flowDiagResults(); + RigFlowDiagResultAddress resAddr = eclipseView->cellResult()->flowDiagResAddress(); + + fldResults->minMaxScalarValues(resAddr, currentTimeStep, &min, &max); + fldResults->p10p90ScalarValues(resAddr, currentTimeStep, &p10, &p90); + fldResults->meanScalarValue(resAddr, currentTimeStep, &mean); + fldResults->sumScalarValue(resAddr, currentTimeStep, &sum); + histogram = &(fldResults->scalarValuesHistogram(resAddr, currentTimeStep)); + } + else if (m_statisticsCellRange == VISIBLE_CELLS ) + { + updateVisCellStatsIfNeeded(); + + m_visibleCellStatistics->meanCellScalarValues(currentTimeStep, mean); + m_visibleCellStatistics->minMaxCellScalarValues(currentTimeStep, min, max); + m_visibleCellStatistics->p10p90CellScalarValues(currentTimeStep, p10, p90); + m_visibleCellStatistics->sumCellScalarValues(currentTimeStep, sum); + + histogram = &(m_visibleCellStatistics->cellScalarValuesHistogram(currentTimeStep)); + } + } + } } } @@ -270,19 +342,19 @@ void Rim3dOverlayInfoConfig::updateEclipse3DInfo(RimEclipseView * eclipseView) QString iSize, jSize, kSize; QString zScale; - if (eclipseView->eclipseCase() && eclipseView->eclipseCase()->reservoirData() && eclipseView->eclipseCase()->reservoirData()->mainGrid()) + if (eclipseView->mainGrid()) { caseName = eclipseView->eclipseCase()->caseUserDescription(); - totCellCount = QString::number(eclipseView->eclipseCase()->reservoirData()->mainGrid()->globalCellArray().size()); - size_t mxActCellCount = eclipseView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->reservoirActiveCellCount(); - size_t frActCellCount = eclipseView->eclipseCase()->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->reservoirActiveCellCount(); + totCellCount = QString::number(eclipseView->mainGrid()->globalCellArray().size()); + size_t mxActCellCount = eclipseView->eclipseCase()->eclipseCaseData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->reservoirActiveCellCount(); + size_t frActCellCount = eclipseView->eclipseCase()->eclipseCaseData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->reservoirActiveCellCount(); if (frActCellCount > 0) activeCellCountText += "Matrix : "; activeCellCountText += QString::number(mxActCellCount); if (frActCellCount > 0) activeCellCountText += " Fracture : " + QString::number(frActCellCount); - iSize = QString::number(eclipseView->eclipseCase()->reservoirData()->mainGrid()->cellCountI()); - jSize = QString::number(eclipseView->eclipseCase()->reservoirData()->mainGrid()->cellCountJ()); - kSize = QString::number(eclipseView->eclipseCase()->reservoirData()->mainGrid()->cellCountK()); + iSize = QString::number(eclipseView->mainGrid()->cellCountI()); + jSize = QString::number(eclipseView->mainGrid()->cellCountJ()); + kSize = QString::number(eclipseView->mainGrid()->cellCountK()); zScale = QString::number(eclipseView->scaleZ()); @@ -299,15 +371,21 @@ void Rim3dOverlayInfoConfig::updateEclipse3DInfo(RimEclipseView * eclipseView) if (eclipseView->cellResult()->isTernarySaturationSelected()) { - QString propName = eclipseView->cellResult()->resultVariable(); + QString propName = eclipseView->cellResult()->resultVariableUiShortName(); infoText += QString("Cell Property: %1 ").arg(propName); } if (isResultsInfoRelevant) { - QString propName = eclipseView->cellResult()->resultVariable(); + QString propName = eclipseView->cellResult()->resultVariableUiShortName(); + QString timeRangeText = m_statisticsTimeRange().uiText(); + if ( eclipseView->cellResult()->resultType() == RimDefines::FLOW_DIAGNOSTICS ) + { + timeRangeText = caf::AppEnum::uiText(CURRENT_TIMESTEP); + } + infoText += QString("Cell Property: %1 ").arg(propName); - infoText += QString("
Statistics: ") + m_statisticsTimeRange().uiText() + " and " + m_statisticsCellRange().uiText(); + infoText += QString("
Statistics: ") + timeRangeText + " and " + m_statisticsCellRange().uiText(); infoText += QString("" "" "" @@ -338,14 +416,14 @@ void Rim3dOverlayInfoConfig::updateEclipse3DInfo(RimEclipseView * eclipseView) } infoText += QString("Fault results: %1
").arg(faultMapping); - infoText += QString("Fault Property: %1
").arg(eclipseView->faultResultSettings()->customFaultResult()->resultVariable()); + infoText += QString("Fault Property: %1
").arg(eclipseView->faultResultSettings()->customFaultResult()->resultVariableUiShortName()); } } if (eclipseView->hasUserRequestedAnimation() && eclipseView->cellEdgeResult()->hasResult()) { double min, max; - QString cellEdgeName = eclipseView->cellEdgeResult()->resultVariable(); + QString cellEdgeName = eclipseView->cellEdgeResult()->resultVariableUiShortName(); eclipseView->cellEdgeResult()->minMaxCellEdgeValues(min, max); infoText += QString("Cell Edge Property: %1 ").arg(cellEdgeName); infoText += QString("
Min P10 Mean P90 Max Sum
%1 %2 %3 %4 %5 %6
" @@ -364,7 +442,7 @@ void Rim3dOverlayInfoConfig::updateEclipse3DInfo(RimEclipseView * eclipseView) if (showHistogram()) { - if (isResultsInfoRelevant) + if (isResultsInfoRelevant && histogram) { eclipseView->viewer()->showHistogram(true); eclipseView->viewer()->setHistogram(min, max, *histogram); @@ -546,10 +624,22 @@ void Rim3dOverlayInfoConfig::updateVisCellStatsIfNeeded() } else if (eclipseView) { - size_t scalarIndex = eclipseView->cellResult()->scalarResultIndex(); - calc = new RigEclipseNativeVisibleCellsStatCalc(eclipseView->currentGridCellResults()->cellResults(), - scalarIndex, + if ( eclipseView->cellResult()->resultType() == RimDefines::FLOW_DIAGNOSTICS ) + { + RigFlowDiagResultAddress resAddr = eclipseView->cellResult()->flowDiagResAddress(); + RigFlowDiagResults* fldResults = eclipseView->cellResult()->flowDiagSolution()->flowDiagResults(); + calc = new RigFlowDiagVisibleCellsStatCalc(fldResults, + resAddr, eclipseView->currentTotalCellVisibility().p()); + + } + else + { + size_t scalarIndex = eclipseView->cellResult()->scalarResultIndex(); + calc = new RigEclipseNativeVisibleCellsStatCalc(eclipseView->currentGridCellResults()->cellResults(), + scalarIndex, + eclipseView->currentTotalCellVisibility().p()); + } } m_visibleCellStatistics = new RigStatisticsDataCache(calc.p()); diff --git a/ApplicationCode/ProjectDataModel/Rim3dOverlayInfoConfig.h b/ApplicationCode/ProjectDataModel/Rim3dOverlayInfoConfig.h index 47dbd1e3fc..3852387beb 100644 --- a/ApplicationCode/ProjectDataModel/Rim3dOverlayInfoConfig.h +++ b/ApplicationCode/ProjectDataModel/Rim3dOverlayInfoConfig.h @@ -65,6 +65,9 @@ class Rim3dOverlayInfoConfig : public caf::PdmObject protected: virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue); virtual caf::PdmFieldHandle* objectToggleField(); + + virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override; + private: void updateEclipse3DInfo(RimEclipseView * reservoirView); diff --git a/ApplicationCode/ProjectDataModel/RimBinaryExportSettings.cpp b/ApplicationCode/ProjectDataModel/RimBinaryExportSettings.cpp index fb579ce85b..d130d87ef0 100644 --- a/ApplicationCode/ProjectDataModel/RimBinaryExportSettings.cpp +++ b/ApplicationCode/ProjectDataModel/RimBinaryExportSettings.cpp @@ -43,7 +43,7 @@ void RimBinaryExportSettings::defineEditorAttribute(const caf::PdmFieldHandle* f { if (field == &fileName) { - caf::PdmUiFilePathEditorAttribute* myAttr = static_cast(attribute); + caf::PdmUiFilePathEditorAttribute* myAttr = dynamic_cast(attribute); if (myAttr) { myAttr->m_selectSaveFileName = true; diff --git a/ApplicationCode/ProjectDataModel/RimCase.cpp b/ApplicationCode/ProjectDataModel/RimCase.cpp index daefa3f2ec..0dc84cde35 100644 --- a/ApplicationCode/ProjectDataModel/RimCase.cpp +++ b/ApplicationCode/ProjectDataModel/RimCase.cpp @@ -39,7 +39,7 @@ CAF_PDM_XML_ABSTRACT_SOURCE_INIT(RimCase, "RimCase"); //-------------------------------------------------------------------------------------------------- RimCase::RimCase() { - CAF_PDM_InitField(&caseUserDescription, "CaseUserDescription", QString(), "Case name", "", "" ,""); + CAF_PDM_InitField(&caseUserDescription, "CaseUserDescription", QString(), "Case Name", "", "" ,""); CAF_PDM_InitField(&caseId, "CaseId", -1, "Case ID", "", "" ,""); caseId.uiCapability()->setUiReadOnly(true); @@ -69,7 +69,7 @@ cvf::Vec3d RimCase::displayModelOffset() const //-------------------------------------------------------------------------------------------------- QList RimCase::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) { - QList optionList; + QList options; if(fieldNeedingOptions == &activeFormationNames) { @@ -78,15 +78,12 @@ QList RimCase::calculateValueOptions(const caf::PdmField { for(RimFormationNames* fnames : proj->activeOilField()->formationNamesCollection()->formationNamesList()) { - optionList.push_back(caf::PdmOptionItemInfo(fnames->fileNameWoPath(), - QVariant::fromValue(caf::PdmPointer(fnames)), - false, - fnames->uiCapability()->uiIcon())); + options.push_back(caf::PdmOptionItemInfo(fnames->fileNameWoPath(), fnames, false, fnames->uiCapability()->uiIcon())); } } - optionList.push_front(caf::PdmOptionItemInfo("None", QVariant::fromValue(caf::PdmPointer(NULL)))); + options.push_front(caf::PdmOptionItemInfo("None", nullptr)); } - return optionList; + return options; } diff --git a/ApplicationCode/ProjectDataModel/RimCase.h b/ApplicationCode/ProjectDataModel/RimCase.h index 8b840399d9..675c5649ac 100644 --- a/ApplicationCode/ProjectDataModel/RimCase.h +++ b/ApplicationCode/ProjectDataModel/RimCase.h @@ -61,8 +61,9 @@ class RimCase : public caf::PdmObject virtual void updateFormationNamesData() = 0; -private: +protected: virtual QList calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override; +private: virtual caf::PdmFieldHandle* userDescriptionField() override { return &caseUserDescription; } }; diff --git a/ApplicationCode/ProjectDataModel/RimCellEdgeColors.cpp b/ApplicationCode/ProjectDataModel/RimCellEdgeColors.cpp index 0dbae8b5d4..c5ae77a1dd 100644 --- a/ApplicationCode/ProjectDataModel/RimCellEdgeColors.cpp +++ b/ApplicationCode/ProjectDataModel/RimCellEdgeColors.cpp @@ -21,6 +21,7 @@ #include "RimCellEdgeColors.h" #include "RigCaseCellResultsData.h" +#include "RigFlowDiagResults.h" #include "RimEclipseCellColors.h" #include "RimEclipseView.h" @@ -90,7 +91,6 @@ RimCellEdgeColors::~RimCellEdgeColors() void RimCellEdgeColors::setReservoirView(RimEclipseView* ownerReservoirView) { m_reservoirView = ownerReservoirView; - this->m_legendConfig()->setReservoirView(ownerReservoirView); m_singleVarEdgeResultColors->setReservoirView(ownerReservoirView); } @@ -103,9 +103,9 @@ void RimCellEdgeColors::loadResult() if (isUsingSingleVariable()) { - size_t resultindex = m_reservoirView->currentGridCellResults()->findOrLoadScalarResult(m_singleVarEdgeResultColors->resultType(), - m_singleVarEdgeResultColors->resultVariable()); - + m_singleVarEdgeResultColors->loadResult();; + + size_t resultindex = m_singleVarEdgeResultColors->scalarResultIndex(); for (int cubeFaceIdx = 0; cubeFaceIdx < 6; ++cubeFaceIdx) { m_resultNameToIndexPairs[cubeFaceIdx] = std::make_pair(m_singleVarEdgeResultColors->resultVariable(), resultindex); @@ -139,8 +139,6 @@ void RimCellEdgeColors::loadResult() } } - updateFieldVisibility(); - updateConnectedEditors(); } @@ -150,8 +148,6 @@ void RimCellEdgeColors::loadResult() void RimCellEdgeColors::initAfterRead() { m_singleVarEdgeResultColors->initAfterRead(); - - updateFieldVisibility(); } //-------------------------------------------------------------------------------------------------- @@ -195,7 +191,7 @@ QList RimCellEdgeColors::calculateValueOptions(const caf //TODO: Must also handle input properties //varList += m_reservoirView->gridCellResults()->resultNames(RimDefines::INPUT_PROPERTY); - QList optionList; + QList options; std::map > varBaseNameToVarsMap; @@ -242,15 +238,15 @@ QList RimCellEdgeColors::calculateValueOptions(const caf } optionUiName += ")"; - optionList.push_back(caf::PdmOptionItemInfo( optionUiName, QVariant(it->first))); + options.push_back(caf::PdmOptionItemInfo( optionUiName, QVariant(it->first))); } - optionList.push_front(caf::PdmOptionItemInfo(RimDefines::undefinedResultName(), "")); + options.push_front(caf::PdmOptionItemInfo(RimDefines::undefinedResultName(), "")); if (useOptionsOnly) *useOptionsOnly = true; - return optionList; + return options; } } @@ -266,9 +262,7 @@ void RimCellEdgeColors::defineUiOrdering(QString uiConfigName, caf::PdmUiOrderin if (isUsingSingleVariable()) { - uiOrdering.add(&(m_singleVarEdgeResultColors->m_resultTypeUiField)); - uiOrdering.add(&(m_singleVarEdgeResultColors->m_porosityModelUiField)); - uiOrdering.add(&(m_singleVarEdgeResultColors->m_resultVariableUiField)); + m_singleVarEdgeResultColors->uiOrdering(uiConfigName,uiOrdering ); } else { @@ -279,7 +273,7 @@ void RimCellEdgeColors::defineUiOrdering(QString uiConfigName, caf::PdmUiOrderin uiOrdering.add(&useZVariable); } - uiOrdering.setForgetRemainingFields(true); + uiOrdering.skipRemainingFields(true); } //-------------------------------------------------------------------------------------------------- @@ -288,7 +282,7 @@ void RimCellEdgeColors::defineUiOrdering(QString uiConfigName, caf::PdmUiOrderin void RimCellEdgeColors::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/) { uiTreeOrdering.add(legendConfig()); - uiTreeOrdering.setForgetRemainingFields(true); + uiTreeOrdering.skipRemainingChildren(true); } //-------------------------------------------------------------------------------------------------- @@ -385,14 +379,6 @@ void RimCellEdgeColors::cellEdgeMetaData(std::vector* metaD } } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimCellEdgeColors::updateFieldVisibility() -{ - m_singleVarEdgeResultColors->updateFieldVisibility(); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -412,6 +398,11 @@ bool RimCellEdgeColors::hasResult() const { if (!enableCellEdgeColors()) return false; + if (isUsingSingleVariable() && m_singleVarEdgeResultColors->resultType() == RimDefines::FLOW_DIAGNOSTICS) + { + return true; + } + bool hasResult = false; int cubeFaceIndex; for (cubeFaceIndex = 0; cubeFaceIndex < 6; ++cubeFaceIndex) @@ -446,22 +437,34 @@ void RimCellEdgeColors::minMaxCellEdgeValues(double& min, double& max) globalMin = HUGE_VAL; globalMax = -HUGE_VAL; - size_t resultIndices[6]; - this->gridScalarIndices(resultIndices); + if (isUsingSingleVariable() && singleVarEdgeResultColors()->resultType() == RimDefines::FLOW_DIAGNOSTICS) + { + int currentTimeStep = m_reservoirView->currentTimeStep(); - size_t idx; - for (idx = 0; idx < 6; idx++) + RigFlowDiagResults* fldResults = singleVarEdgeResultColors()->flowDiagSolution()->flowDiagResults(); + RigFlowDiagResultAddress resAddr = singleVarEdgeResultColors()->flowDiagResAddress(); + + fldResults->minMaxScalarValues(resAddr, currentTimeStep, &globalMin, &globalMax); + } + else { - if (resultIndices[idx] == cvf::UNDEFINED_SIZE_T) continue; + size_t resultIndices[6]; + this->gridScalarIndices(resultIndices); + size_t idx; + for (idx = 0; idx < 6; idx++) { - double cMin, cMax; - m_reservoirView->currentGridCellResults()->cellResults()->minMaxCellScalarValues(resultIndices[idx], cMin, cMax); + if (resultIndices[idx] == cvf::UNDEFINED_SIZE_T) continue; - globalMin = CVF_MIN(globalMin, cMin); - globalMax = CVF_MAX(globalMax, cMax); - } + { + double cMin, cMax; + m_reservoirView->currentGridCellResults()->cellResults()->minMaxCellScalarValues(resultIndices[idx], cMin, cMax); + + globalMin = CVF_MIN(globalMin, cMin); + globalMax = CVF_MAX(globalMax, cMax); + } + } } min = globalMin; @@ -525,6 +528,36 @@ QString RimCellEdgeColors::resultVariable() const } } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimCellEdgeColors::resultVariableUiName() const +{ + if (isUsingSingleVariable()) + { + return m_singleVarEdgeResultColors->resultVariableUiName(); + } + else + { + return m_resultVariable; + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimCellEdgeColors::resultVariableUiShortName() const +{ + if (isUsingSingleVariable()) + { + return m_singleVarEdgeResultColors->resultVariableUiShortName(); + } + else + { + return m_resultVariable; + } +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -564,3 +597,11 @@ RimLegendConfig* RimCellEdgeColors::legendConfig() } } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimCellEdgeColors::PropertyType RimCellEdgeColors::propertyType() const +{ + return m_propertyType(); +} + diff --git a/ApplicationCode/ProjectDataModel/RimCellEdgeColors.h b/ApplicationCode/ProjectDataModel/RimCellEdgeColors.h index 519bcefc46..5395171c48 100644 --- a/ApplicationCode/ProjectDataModel/RimCellEdgeColors.h +++ b/ApplicationCode/ProjectDataModel/RimCellEdgeColors.h @@ -73,6 +73,8 @@ class RimCellEdgeColors : public caf::PdmObject void setResultVariable(const QString& variableName); QString resultVariable() const; + QString resultVariableUiName() const; + QString resultVariableUiShortName() const; caf::PdmField enableCellEdgeColors; @@ -83,8 +85,11 @@ class RimCellEdgeColors : public caf::PdmObject void loadResult(); bool hasResult() const; bool hasCategoryResult() const; + bool isUsingSingleVariable() const; + RimEclipseCellColors* singleVarEdgeResultColors(); RimLegendConfig* legendConfig(); + PropertyType propertyType() const; void minMaxCellEdgeValues(double& min, double& max); void posNegClosestToZero(double& pos, double& neg); @@ -99,8 +104,6 @@ class RimCellEdgeColors : public caf::PdmObject QStringList findResultVariableNames(); private: - void updateFieldVisibility(); - void resetResultIndices(); void updateIgnoredScalarValue(); @@ -117,7 +120,6 @@ class RimCellEdgeColors : public caf::PdmObject caf::PdmPointer m_reservoirView; double m_ignoredResultScalar; - bool isUsingSingleVariable() const; caf::PdmField > m_propertyType; caf::PdmChildField m_legendConfig; diff --git a/ApplicationCode/ProjectDataModel/RimCellFilter.cpp b/ApplicationCode/ProjectDataModel/RimCellFilter.cpp index ba4189ff9d..746c0f25b8 100644 --- a/ApplicationCode/ProjectDataModel/RimCellFilter.cpp +++ b/ApplicationCode/ProjectDataModel/RimCellFilter.cpp @@ -18,8 +18,6 @@ #include "RimCellFilter.h" -#include "cafAppEnum.h" - #include namespace caf @@ -47,9 +45,6 @@ RimCellFilter::RimCellFilter() CAF_PDM_InitField(&isActive, "Active", true, "Active", "", "", ""); isActive.uiCapability()->setUiHidden(true); - CAF_PDM_InitFieldNoDefault(&m_selectedCategoryValues, "SelectedValues", "Values", "", "", ""); - m_selectedCategoryValues.uiCapability()->setUiHidden(true); - CAF_PDM_InitFieldNoDefault(&filterMode, "FilterType", "Filter Type", "", "", ""); } @@ -68,14 +63,6 @@ caf::PdmFieldHandle* RimCellFilter::userDescriptionField() return &name; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -std::vector RimCellFilter::selectedCategoryValues() const -{ - return m_selectedCategoryValues; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -124,67 +111,3 @@ caf::PdmFieldHandle* RimCellFilter::objectToggleField() return &isActive; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -QList RimCellFilter::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) -{ - QList optionList; - - if (&m_selectedCategoryValues == fieldNeedingOptions) - { - if (useOptionsOnly) *useOptionsOnly = true; - - if (m_categoryValues.size() == m_categoryNames.size()) - { - for (size_t i = 0; i < m_categoryValues.size(); i++) - { - int categoryValue = m_categoryValues[i]; - QString categoryName = m_categoryNames[i]; - - optionList.push_back(caf::PdmOptionItemInfo(categoryName, categoryValue)); - } - } - else - { - for (auto it : m_categoryValues) - { - QString str = QString::number(it); - optionList.push_back(caf::PdmOptionItemInfo(str, it)); - } - } - } - - return optionList; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimCellFilter::setCategoryValues(const std::vector& categoryValues) -{ - m_categoryValues = categoryValues; - m_categoryNames.clear(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimCellFilter::setCategoryNames(const std::vector& categoryNames) -{ - m_categoryNames = categoryNames; - - for (size_t i = 0; i < m_categoryNames.size(); i++) - { - m_categoryValues.push_back(static_cast(i)); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimCellFilter::clearCategories() -{ - m_categoryValues.clear(); - m_categoryNames.clear(); -} diff --git a/ApplicationCode/ProjectDataModel/RimCellFilter.h b/ApplicationCode/ProjectDataModel/RimCellFilter.h index f17c67e968..3a576780e3 100644 --- a/ApplicationCode/ProjectDataModel/RimCellFilter.h +++ b/ApplicationCode/ProjectDataModel/RimCellFilter.h @@ -20,7 +20,6 @@ #include "cafPdmField.h" #include "cafPdmObject.h" -#include "cafPdmPointer.h" #include "cafAppEnum.h" @@ -45,22 +44,9 @@ class RimCellFilter : public caf::PdmObject caf::PdmField isActive; caf::PdmField< caf::AppEnum< FilterModeType > > filterMode; - std::vector selectedCategoryValues() const; - void updateIconState(); protected: virtual caf::PdmFieldHandle* userDescriptionField(); virtual caf::PdmFieldHandle* objectToggleField(); - virtual QList calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly); - - void setCategoryValues(const std::vector& categoryValues); - void setCategoryNames(const std::vector& categoryNames); - void clearCategories(); - -protected: - std::vector m_categoryValues; - std::vector m_categoryNames; - - caf::PdmField< std::vector > m_selectedCategoryValues; }; diff --git a/ApplicationCode/ProjectDataModel/RimCellRangeFilter.cpp b/ApplicationCode/ProjectDataModel/RimCellRangeFilter.cpp index 812b78fc03..79cba2b624 100644 --- a/ApplicationCode/ProjectDataModel/RimCellRangeFilter.cpp +++ b/ApplicationCode/ProjectDataModel/RimCellRangeFilter.cpp @@ -22,7 +22,6 @@ #include "RimCellRangeFilter.h" #include "RigActiveCellInfo.h" -#include "RigCaseData.h" #include "RigGridBase.h" #include "RigMainGrid.h" @@ -172,7 +171,7 @@ RimCellRangeFilterCollection* RimCellRangeFilter::parentContainer() //-------------------------------------------------------------------------------------------------- void RimCellRangeFilter::defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute * attribute) { - caf::PdmUiSliderEditorAttribute* myAttr = static_cast(attribute); + caf::PdmUiSliderEditorAttribute* myAttr = dynamic_cast(attribute); if (!myAttr || !parentContainer()) { return; @@ -296,7 +295,7 @@ bool RimCellRangeFilter::isRangeFilterControlled() CVF_ASSERT(rimView); bool isRangeFilterControlled = false; - if (rimView->viewController() && rimView->viewController()->isRangeFiltersControlled()) + if (rimView && rimView->viewController() && rimView->viewController()->isRangeFiltersControlled()) { isRangeFilterControlled = true; } diff --git a/ApplicationCode/ProjectDataModel/RimCellRangeFilterCollection.cpp b/ApplicationCode/ProjectDataModel/RimCellRangeFilterCollection.cpp index 7707b14feb..d90db14c38 100644 --- a/ApplicationCode/ProjectDataModel/RimCellRangeFilterCollection.cpp +++ b/ApplicationCode/ProjectDataModel/RimCellRangeFilterCollection.cpp @@ -20,13 +20,13 @@ #include "RimCellRangeFilterCollection.h" -#include "RigCaseData.h" #include "RigFemPart.h" #include "RigFemPartCollection.h" #include "RigFemPartGrid.h" #include "RigGeoMechCaseData.h" -#include "RigGridBase.h" +#include "RigMainGrid.h" +#include "RimCellRangeFilter.h" #include "RimEclipseCase.h" #include "RimEclipseView.h" #include "RimGeoMechCase.h" @@ -107,16 +107,13 @@ void RimCellRangeFilterCollection::compoundCellRangeFilter(cvf::CellRangeFilter* RigMainGrid* RimCellRangeFilterCollection::mainGrid() const { RimEclipseView* eclipseView = this->eclipseView(); - if (eclipseView && - eclipseView->eclipseCase() && - eclipseView->eclipseCase()->reservoirData() && - eclipseView->eclipseCase()->reservoirData()->mainGrid()) + if (eclipseView && eclipseView->mainGrid()) { - return eclipseView->eclipseCase()->reservoirData()->mainGrid(); + return eclipseView->mainGrid(); } - return NULL; + return nullptr; } //-------------------------------------------------------------------------------------------------- @@ -151,6 +148,7 @@ void RimCellRangeFilterCollection::updateDisplayModeNotifyManagedViews(RimCellRa { RimView* view = NULL; firstAncestorOrThisOfType(view); + if (!view) return; if (view->isMasterView()) { @@ -163,6 +161,7 @@ void RimCellRangeFilterCollection::updateDisplayModeNotifyManagedViews(RimCellRa } } + view->scheduleGeometryRegen(VISIBLE_WELL_CELLS); view->scheduleGeometryRegen(RANGE_FILTERED); view->scheduleGeometryRegen(RANGE_FILTERED_INACTIVE); @@ -225,9 +224,7 @@ const cvf::StructGridInterface* RimCellRangeFilterCollection::gridByIndex(int gr if (mnGrid) { - RigGridBase* grid = NULL; - - grid = mnGrid->gridByIndex(gridIndex); + RigGridBase* grid = mnGrid->gridByIndex(gridIndex); CVF_ASSERT(grid); diff --git a/ApplicationCode/ProjectDataModel/RimCellRangeFilterCollection.h b/ApplicationCode/ProjectDataModel/RimCellRangeFilterCollection.h index 5ad20fb37a..d228cf6902 100644 --- a/ApplicationCode/ProjectDataModel/RimCellRangeFilterCollection.h +++ b/ApplicationCode/ProjectDataModel/RimCellRangeFilterCollection.h @@ -18,14 +18,22 @@ #pragma once -#include "RimCellRangeFilter.h" - +#include "cafPdmObject.h" #include "cafPdmChildArrayField.h" +#include "cafPdmField.h" class RigActiveCellInfo; class RigFemPartCollection; class RigGridBase; class RimView; +class RimCellRangeFilter; +class RimEclipseView; +class RigMainGrid; + +namespace cvf { + class CellRangeFilter; + class StructGridInterface; +}; //================================================================================================== /// diff --git a/ApplicationCode/ProjectDataModel/RimCheckableNamedObject.cpp b/ApplicationCode/ProjectDataModel/RimCheckableNamedObject.cpp new file mode 100644 index 0000000000..e69ba1e3e9 --- /dev/null +++ b/ApplicationCode/ProjectDataModel/RimCheckableNamedObject.cpp @@ -0,0 +1,61 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimCheckableNamedObject.h" + +CAF_PDM_XML_ABSTRACT_SOURCE_INIT(RimCheckableNamedObject, "CheckableNamedObject"); // Do not use. Abstract class + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimCheckableNamedObject::RimCheckableNamedObject(void) +{ + CAF_PDM_InitField(&m_isChecked, "IsChecked", true, "Active", "", "", ""); + m_isChecked.uiCapability()->setUiHidden(true); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimCheckableNamedObject::~RimCheckableNamedObject(void) +{ +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimCheckableNamedObject::isChecked() const +{ + return m_isChecked(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimCheckableNamedObject::setCheckState(bool checkState) +{ + m_isChecked = checkState; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +caf::PdmFieldHandle* RimCheckableNamedObject::objectToggleField() +{ + return &m_isChecked; +} diff --git a/ApplicationCode/ProjectDataModel/RimCheckableNamedObject.h b/ApplicationCode/ProjectDataModel/RimCheckableNamedObject.h new file mode 100644 index 0000000000..2bcfa73d58 --- /dev/null +++ b/ApplicationCode/ProjectDataModel/RimCheckableNamedObject.h @@ -0,0 +1,43 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "RimNamedObject.h" + +//================================================================================================== +/// +/// +//================================================================================================== +class RimCheckableNamedObject : public RimNamedObject +{ + CAF_PDM_HEADER_INIT; +public: + RimCheckableNamedObject(void); + virtual ~RimCheckableNamedObject(void); + + bool isChecked() const; + void setCheckState(bool checkState); + +protected: + virtual caf::PdmFieldHandle* objectToggleField() override; + +private: + caf::PdmField m_isChecked; +}; + diff --git a/ApplicationCode/ProjectDataModel/RimContextCommandBuilder.cpp b/ApplicationCode/ProjectDataModel/RimContextCommandBuilder.cpp index 51e0f56e86..1ed541ec64 100644 --- a/ApplicationCode/ProjectDataModel/RimContextCommandBuilder.cpp +++ b/ApplicationCode/ProjectDataModel/RimContextCommandBuilder.cpp @@ -23,8 +23,6 @@ #include "RimCaseCollection.h" #include "RimCellRangeFilter.h" #include "RimCellRangeFilterCollection.h" -#include "RimIntersection.h" -#include "RimIntersectionCollection.h" #include "RimEclipseCase.h" #include "RimEclipseCaseCollection.h" #include "RimEclipseCellColors.h" @@ -35,6 +33,9 @@ #include "RimEclipseStatisticsCase.h" #include "RimEclipseView.h" #include "RimEclipseWell.h" +#include "RimFault.h" +#include "RimFlowDiagSolution.h" +#include "RimFlowPlotCollection.h" #include "RimFormationNames.h" #include "RimFormationNamesCollection.h" #include "RimGeoMechCase.h" @@ -42,7 +43,9 @@ #include "RimGeoMechPropertyFilterCollection.h" #include "RimGeoMechView.h" #include "RimIdenticalGridCaseGroup.h" +#include "RimIntersection.h" #include "RimIntersectionBox.h" +#include "RimIntersectionCollection.h" #include "RimScriptCollection.h" #include "RimSummaryCase.h" #include "RimSummaryCurve.h" @@ -51,6 +54,7 @@ #include "RimSummaryPlotCollection.h" #include "RimViewController.h" #include "RimViewLinker.h" +#include "RimWellAllocationPlot.h" #include "RimWellLogCurve.h" #include "RimWellLogFileChannel.h" #include "RimWellLogPlot.h" @@ -71,7 +75,6 @@ #include #include -#include "RimFault.h" //-------------------------------------------------------------------------------------------------- /// @@ -136,6 +139,7 @@ QStringList RimContextCommandBuilder::commandsFromSelection() commandIds << "Separator"; commandIds << "RicNewViewFeature"; + commandIds << "RicShowFlowCharacteristicsPlotFeature"; commandIds << "RicEclipseCaseNewGroupFeature"; commandIds << "Separator"; commandIds << "RicCopyReferencesToClipboardFeature"; @@ -161,7 +165,6 @@ QStringList RimContextCommandBuilder::commandsFromSelection() else if (dynamic_cast(uiItem)) { commandIds << "RicAddEclipseInputPropertyFeature"; - commandIds << "RicAddOpmInputPropertyFeature"; } else if (dynamic_cast(uiItem)) { @@ -188,6 +191,7 @@ QStringList RimContextCommandBuilder::commandsFromSelection() else if (dynamic_cast(uiItem)) { commandIds << "RicEclipsePropertyFilterInsertFeature"; + commandIds << "RicApplyPropertyFilterAsCellResultFeature"; } else if (dynamic_cast(uiItem)) { @@ -196,22 +200,19 @@ QStringList RimContextCommandBuilder::commandsFromSelection() else if (dynamic_cast(uiItem)) { commandIds << "RicGeoMechPropertyFilterInsertFeature"; + commandIds << "RicApplyPropertyFilterAsCellResultFeature"; } else if (dynamic_cast(uiItem)) { commandIds << "RicWellPathsImportFileFeature"; commandIds << "RicWellPathsImportSsihubFeature"; commandIds << "RicWellLogsImportFileFeature"; - commandIds << "Separator"; - commandIds << "RicWellPathsDeleteAllFeature"; } else if (dynamic_cast(uiItem)) { commandIds << "RicNewWellLogFileCurveFeature"; commandIds << "RicNewWellLogCurveExtractionFeature"; commandIds << "RicNewWellPathIntersectionFeature"; - commandIds << "Separator"; - commandIds << "RicWellPathDeleteFeature"; } else if (dynamic_cast(uiItem)) { @@ -258,6 +259,7 @@ QStringList RimContextCommandBuilder::commandsFromSelection() commandIds << "RicPasteWellLogTrackFeature"; commandIds << "Separator"; commandIds << "RicNewWellLogPlotTrackFeature"; + commandIds << "RicAsciiExportWellLogPlotFeature"; } else if (dynamic_cast(uiItem)) { @@ -282,6 +284,7 @@ QStringList RimContextCommandBuilder::commandsFromSelection() commandIds << "RicNewSummaryPlotFeature"; commandIds << "RicNewSummaryCurveFilterFeature"; commandIds << "RicNewSummaryCurveFeature"; + commandIds << "RicAsciiExportSummaryPlotFeature"; commandIds << "Separator"; commandIds << "RicCopyReferencesToClipboardFeature"; commandIds << "Separator"; @@ -295,8 +298,6 @@ QStringList RimContextCommandBuilder::commandsFromSelection() commandIds << "RicNewSummaryCurveFeature"; commandIds << "Separator"; commandIds << "RicCopyReferencesToClipboardFeature"; - commandIds << "Separator"; - commandIds << "RicSummaryCurveSwitchAxisFeature"; } else if(dynamic_cast(uiItem)) { @@ -306,8 +307,6 @@ QStringList RimContextCommandBuilder::commandsFromSelection() commandIds << "RicNewSummaryCurveFeature"; commandIds << "Separator"; commandIds << "RicCopyReferencesToClipboardFeature"; - commandIds << "Separator"; - commandIds << "RicSummaryCurveSwitchAxisFeature"; } else if (dynamic_cast(uiItem)) { @@ -334,7 +333,9 @@ QStringList RimContextCommandBuilder::commandsFromSelection() } else if (dynamic_cast(uiItem)) { + commandIds << "RicNewWellLogCurveExtractionFeature"; commandIds << "RicNewSimWellIntersectionFeature"; + commandIds << "RicShowWellAllocationPlotFeature"; } else if(dynamic_cast(uiItem)) { @@ -351,6 +352,18 @@ QStringList RimContextCommandBuilder::commandsFromSelection() { commandIds << "RicExportFaultsFeature"; } + else if (dynamic_cast(uiItem)) + { + commandIds << "RicAddStoredWellAllocationPlotFeature"; + } + else if (dynamic_cast(uiItem)) + { + commandIds << "RicShowFlowCharacteristicsPlotFeature"; + } + else if (dynamic_cast(uiItem)) + { + commandIds << "RicShowFlowCharacteristicsPlotFeature"; + } if (dynamic_cast(uiItem)) @@ -367,6 +380,23 @@ QStringList RimContextCommandBuilder::commandsFromSelection() // Command supporting multiple selected objects if (uiItems.size() > 0) { + // Work in progress -- Start + // All commands should be aware of selection of multiple objects + // Based on the selection, the command feature can decide if the command + // can be executed, communicated by isCommandEnabled(). When a command feature + // is aware of multiple selected items, move the command to this list + // without using dyncamic_cast. + + commandIds << "RicPasteTimeHistoryCurveFeature"; + commandIds << "RicCopyReferencesToClipboardFeature"; + + commandIds << "RicShowPlotDataFeature"; + commandIds << "RicShowTotalAllocationDataFeature"; + + commandIds << "RicSummaryCurveSwitchAxisFeature"; + + // Work in progress -- End + caf::PdmUiItem* uiItem = uiItems[0]; if (dynamic_cast(uiItem)) { @@ -378,21 +408,23 @@ QStringList RimContextCommandBuilder::commandsFromSelection() } else if (dynamic_cast(uiItem)) { + commandIds << "RicReloadCaseFeature"; commandIds << "RicExecuteScriptForCasesFeature"; } - else if (dynamic_cast(uiItem) || - dynamic_cast(uiItem) ) + else if (dynamic_cast(uiItem)) { - commandIds << "RicCopyReferencesToClipboardFeature"; - commandIds << "RicSummaryCurveSwitchAxisFeature"; - + commandIds << "RicAsciiExportSummaryPlotFeature"; + } + else if (dynamic_cast(uiItem)) + { + commandIds << "RicAsciiExportWellLogPlotFeature"; } else if (dynamic_cast(uiItem) || dynamic_cast(uiItem) || dynamic_cast(uiItem)) { - commandIds << "RicCopyReferencesToClipboardFeature"; commandIds << "RicExportToLasFileFeature"; + commandIds << "RicChangeDataSourceFeature"; } else if (dynamic_cast(uiItem)) { @@ -402,6 +434,18 @@ QStringList RimContextCommandBuilder::commandsFromSelection() { commandIds << "RicExportFaultsFeature"; } + else if (dynamic_cast(uiItem)) + { + commandIds << "RicPlotProductionRateFeature"; + commandIds << "RicShowContributingWellsFeature"; + commandIds << "Separator"; + commandIds << "RicEclipseWellShowLabelFeature"; + commandIds << "RicEclipseWellShowHeadFeature"; + commandIds << "RicEclipseWellShowPipeFeature"; + commandIds << "RicEclipseWellShowSpheresFeature"; + commandIds << "RicEclipseWellShowWellCellsFeature"; + commandIds << "RicEclipseWellShowWellCellFenceFeature"; + } } @@ -419,6 +463,20 @@ QStringList RimContextCommandBuilder::commandsFromSelection() commandIds << "RicDeleteItemFeature"; } + if (caf::CmdFeatureManager::instance()->getCommandFeature("RicDeleteSubItemsFeature")->canFeatureBeExecuted()) + { + commandIds << "Separator"; + commandIds << "RicDeleteSubItemsFeature"; + } + + if (caf::CmdFeatureManager::instance()->getCommandFeature("RicWellPathDeleteFeature")->canFeatureBeExecuted()) + { + // Special delete command for Well paths + // Placed here to fit context menu location of general delete feature + commandIds << "Separator"; + commandIds << "RicWellPathDeleteFeature"; + } + if ( caf::CmdFeatureManager::instance()->getCommandFeature("RicCloseCaseFeature")->canFeatureBeExecuted() ) { commandIds << "Separator"; @@ -438,15 +496,29 @@ void RimContextCommandBuilder::appendCommandsToMenu(const QStringList& commandId caf::CmdFeatureManager* commandManager = caf::CmdFeatureManager::instance(); for (int i = 0; i < commandIds.size(); i++) { - caf::CmdFeature* feature = commandManager->getCommandFeature(commandIds[i].toStdString()); - CVF_ASSERT(feature); - - if (feature->canFeatureBeExecuted()) + if (commandIds[i] == "Separator") + { + menu->addSeparator(); + } + else { - QAction* act = commandManager->action(commandIds[i]); - CVF_ASSERT(act); + caf::CmdFeature* feature = commandManager->getCommandFeature(commandIds[i].toStdString()); + CVF_ASSERT(feature); + + if (feature->canFeatureBeExecuted()) + { + QAction* act = commandManager->action(commandIds[i]); + CVF_ASSERT(act); + + for (QAction* existingAct : menu->actions()) + { + // If action exist, continue to make sure the action is positioned at the first + // location of a command ID + if (existingAct == act) continue; + } - menu->addAction(act); + menu->addAction(act); + } } } } diff --git a/ApplicationCode/ProjectDataModel/RimDefines.cpp b/ApplicationCode/ProjectDataModel/RimDefines.cpp index c590e393f1..ec64948c4a 100644 --- a/ApplicationCode/ProjectDataModel/RimDefines.cpp +++ b/ApplicationCode/ProjectDataModel/RimDefines.cpp @@ -32,6 +32,7 @@ namespace caf addItem(RimDefines::GENERATED, "GENERATED", "Generated"); addItem(RimDefines::INPUT_PROPERTY, "INPUT_PROPERTY", "Input Property"); addItem(RimDefines::FORMATION_NAMES, "FORMATION_NAMES", "Formation Names"); + addItem(RimDefines::FLOW_DIAGNOSTICS, "FLOW_DIAGNOSTICS", "Flow Diagnostics"); setDefault(RimDefines::DYNAMIC_NATIVE); } @@ -49,6 +50,8 @@ namespace caf { addItem(RimDefines::UNIT_METER, "UNIT_METER", "Meter"); addItem(RimDefines::UNIT_FEET, "UNIT_FEET", "Feet"); + addItem(RimDefines::UNIT_NONE, "UNIT_NONE", "None"); + setDefault(RimDefines::UNIT_METER); } diff --git a/ApplicationCode/ProjectDataModel/RimDefines.h b/ApplicationCode/ProjectDataModel/RimDefines.h index 06a35b1d1a..779f763d27 100644 --- a/ApplicationCode/ProjectDataModel/RimDefines.h +++ b/ApplicationCode/ProjectDataModel/RimDefines.h @@ -33,6 +33,7 @@ class RimDefines GENERATED, INPUT_PROPERTY, FORMATION_NAMES, + FLOW_DIAGNOSTICS, REMOVED }; @@ -76,7 +77,8 @@ class RimDefines enum DepthUnitType { UNIT_METER, - UNIT_FEET + UNIT_FEET, + UNIT_NONE }; static double feetPerMeter() { return 3.2808399; } diff --git a/ApplicationCode/ProjectDataModel/RimEclipseCase.cpp b/ApplicationCode/ProjectDataModel/RimEclipseCase.cpp index 2be869f90c..b800d32ea3 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseCase.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseCase.cpp @@ -21,10 +21,14 @@ #include "RimEclipseCase.h" #include "RiaApplication.h" +#include "RiaColorTables.h" #include "RiaPreferences.h" +#include "RigActiveCellInfo.h" #include "RigCaseCellResultsData.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" +#include "RigMainGrid.h" +#include "RigSingleWellResultsData.h" #include "RimCaseCollection.h" #include "RimCellEdgeColors.h" @@ -38,6 +42,12 @@ #include "RimProject.h" #include "RimMainPlotCollection.h" #include "RimWellLogPlotCollection.h" +#include "RimSummaryPlotCollection.h" +#include "RimFlowPlotCollection.h" +#include "RimWellLogPlot.h" +#include "RimSummaryPlot.h" +#include "RimFlowCharacteristicsPlot.h" +#include "RimWellAllocationPlot.h" #include "cafPdmDocument.h" #include "cafProgressInfo.h" @@ -103,22 +113,22 @@ RimEclipseCase::~RimEclipseCase() RimWellLogPlotCollection* plotCollection = project->mainPlotCollection()->wellLogPlotCollection(); if (plotCollection) { - plotCollection->removeExtractors(this->reservoirData()); + plotCollection->removeExtractors(this->eclipseCaseData()); } } } - if (this->reservoirData()) + if (this->eclipseCaseData()) { // At this point, we assume that memory should be released - CVF_ASSERT(this->reservoirData()->refCount() == 1); + CVF_ASSERT(this->eclipseCaseData()->refCount() == 1); } } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RigCaseData* RimEclipseCase::reservoirData() +RigEclipseCaseData* RimEclipseCase::eclipseCaseData() { return m_rigEclipseCase.p(); } @@ -126,11 +136,53 @@ RigCaseData* RimEclipseCase::reservoirData() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -const RigCaseData* RimEclipseCase::reservoirData() const +const RigEclipseCaseData* RimEclipseCase::eclipseCaseData() const { return m_rigEclipseCase.p(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +cvf::Color3f RimEclipseCase::defaultWellColor(const QString& wellName) +{ + if ( m_wellToColorMap.empty() ) + { + const caf::ColorTable& colorTable = RiaColorTables::wellsPaletteColors(); + cvf::Color3ubArray wellColors = colorTable.color3ubArray(); + cvf::Color3ubArray interpolatedWellColors = wellColors; + + const cvf::Collection& wellResults = this->eclipseCaseData()->wellResults(); + if ( wellResults.size() > 1 ) + { + interpolatedWellColors = caf::ColorTable::interpolateColorArray(wellColors, wellResults.size()); + } + + for ( size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx ) + { + m_wellToColorMap[wellResults[wIdx]->m_wellName] = cvf::Color3f::BLACK; + } + + size_t wIdx = 0; + for ( auto & wNameColorPair: m_wellToColorMap ) + { + wNameColorPair.second = cvf::Color3f(interpolatedWellColors[wIdx]); + + ++wIdx; + } + } + + auto nmColor = m_wellToColorMap.find(wellName); + if (nmColor != m_wellToColorMap.end()) + { + return nmColor->second; + } + else + { + return cvf::Color3f::LIGHT_GRAY; + } +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -156,19 +208,42 @@ void RimEclipseCase::initAfterRead() //-------------------------------------------------------------------------------------------------- RimEclipseView* RimEclipseCase::createAndAddReservoirView() { - RimEclipseView* riv = new RimEclipseView(); - riv->setEclipseCase(this); - riv->cellEdgeResult()->setResultVariable("MULT"); - riv->cellEdgeResult()->enableCellEdgeColors = false; + RimEclipseView* rimEclipseView = new RimEclipseView(); + rimEclipseView->setEclipseCase(this); + rimEclipseView->cellEdgeResult()->setResultVariable("MULT"); + rimEclipseView->cellEdgeResult()->enableCellEdgeColors = false; - caf::PdmDocument::updateUiIconStateRecursively(riv); + caf::PdmDocument::updateUiIconStateRecursively(rimEclipseView); size_t i = reservoirViews().size(); - riv->name = QString("View %1").arg(i + 1); + rimEclipseView->name = QString("View %1").arg(i + 1); - reservoirViews().push_back(riv); + reservoirViews().push_back(rimEclipseView); - return riv; + return rimEclipseView; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimEclipseView* RimEclipseCase::createCopyAndAddView(const RimEclipseView* sourceView) +{ + CVF_ASSERT(sourceView); + + RimEclipseView* rimEclipseView = dynamic_cast(sourceView->xmlCapability()->copyByXmlSerialization(caf::PdmDefaultObjectFactory::instance())); + CVF_ASSERT(rimEclipseView); + + rimEclipseView->setEclipseCase(this); + + caf::PdmDocument::updateUiIconStateRecursively(rimEclipseView); + + reservoirViews().push_back(rimEclipseView); + + // Resolve references after reservoir view has been inserted into Rim structures + rimEclipseView->resolveReferencesRecursively(); + rimEclipseView->initAfterReadRecursively(); + + return rimEclipseView; } //-------------------------------------------------------------------------------------------------- @@ -228,46 +303,13 @@ void RimEclipseCase::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c { if (changedField == &releaseResultMemory) { - if (this->reservoirData()) - { - for (size_t i = 0; i < reservoirViews().size(); i++) - { - RimEclipseView* reservoirView = reservoirViews()[i]; - CVF_ASSERT(reservoirView); - - RimEclipseCellColors* result = reservoirView->cellResult; - CVF_ASSERT(result); - - result->setResultVariable(RimDefines::undefinedResultName()); - result->loadResult(); - - RimCellEdgeColors* cellEdgeResult = reservoirView->cellEdgeResult; - CVF_ASSERT(cellEdgeResult); - - cellEdgeResult->setResultVariable(RimDefines::undefinedResultName()); - cellEdgeResult->loadResult(); - - reservoirView->createDisplayModelAndRedraw(); - } - - RigCaseCellResultsData* matrixModelResults = reservoirData()->results(RifReaderInterface::MATRIX_RESULTS); - if (matrixModelResults) - { - matrixModelResults->clearAllResults(); - } - - RigCaseCellResultsData* fractureModelResults = reservoirData()->results(RifReaderInterface::FRACTURE_RESULTS); - if (fractureModelResults) - { - fractureModelResults->clearAllResults(); - } - } + reloadDataAndUpdate(); releaseResultMemory = oldValue.toBool(); } else if (changedField == &flipXAxis || changedField == &flipYAxis) { - RigCaseData* rigEclipseCase = reservoirData(); + RigEclipseCaseData* rigEclipseCase = eclipseCaseData(); if (rigEclipseCase) { rigEclipseCase->mainGrid()->setFlipAxis(flipXAxis, flipYAxis); @@ -279,7 +321,7 @@ void RimEclipseCase::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c RimEclipseView* reservoirView = reservoirViews()[i]; reservoirView->scheduleReservoirGridGeometryRegen(); - reservoirView->schedulePipeGeometryRegen(); + reservoirView->scheduleSimWellGeometryRegen(); reservoirView->createDisplayModelAndRedraw(); } } @@ -296,7 +338,7 @@ void RimEclipseCase::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c //-------------------------------------------------------------------------------------------------- void RimEclipseCase::updateFormationNamesData() { - RigCaseData* rigEclipseCase = reservoirData(); + RigEclipseCaseData* rigEclipseCase = eclipseCaseData(); if(rigEclipseCase) { if(activeFormationNames()) @@ -354,7 +396,7 @@ void RimEclipseCase::updateFormationNamesData() //-------------------------------------------------------------------------------------------------- void RimEclipseCase::computeCachedData() { - RigCaseData* rigEclipseCase = reservoirData(); + RigEclipseCaseData* rigEclipseCase = eclipseCaseData(); if (rigEclipseCase) { caf::ProgressInfo pInf(30, ""); @@ -398,15 +440,15 @@ RimCaseCollection* RimEclipseCase::parentCaseCollection() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimEclipseCase::setReservoirData(RigCaseData* eclipseCase) +void RimEclipseCase::setReservoirData(RigEclipseCaseData* eclipseCase) { m_rigEclipseCase = eclipseCase; - if (this->reservoirData()) + if (this->eclipseCaseData()) { - m_fractureModelResults()->setCellResults(reservoirData()->results(RifReaderInterface::FRACTURE_RESULTS)); - m_matrixModelResults()->setCellResults(reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)); - m_fractureModelResults()->setMainGrid(this->reservoirData()->mainGrid()); - m_matrixModelResults()->setMainGrid(this->reservoirData()->mainGrid()); + m_fractureModelResults()->setCellResults(eclipseCaseData()->results(RifReaderInterface::FRACTURE_RESULTS)); + m_matrixModelResults()->setCellResults(eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)); + m_fractureModelResults()->setMainGrid(this->eclipseCaseData()->mainGrid()); + m_matrixModelResults()->setMainGrid(this->eclipseCaseData()->mainGrid()); } else { @@ -484,7 +526,7 @@ bool RimEclipseCase::openReserviorCase() { // If read already, return - if (this->reservoirData() != NULL) return true; + if (this->eclipseCaseData() != NULL) return true; if (!openEclipseGridFile()) { @@ -501,7 +543,7 @@ bool RimEclipseCase::openReserviorCase() size_t combinedTransResIdx = results->cellResults()->findScalarResultIndex(RimDefines::STATIC_NATIVE, RimDefines::combinedTransmissibilityResultName()); if (combinedTransResIdx != cvf::UNDEFINED_SIZE_T) { - reservoirData()->mainGrid()->nncData()->setCombTransmisibilityScalarResultIndex(combinedTransResIdx); + eclipseCaseData()->mainGrid()->nncData()->setCombTransmisibilityScalarResultIndex(combinedTransResIdx); } } @@ -534,7 +576,7 @@ QStringList RimEclipseCase::timeStepStrings() { QStringList stringList; - int timeStepCount = static_cast(results(RifReaderInterface::MATRIX_RESULTS)->cellResults()->timeStepCount(0)); + int timeStepCount = static_cast(results(RifReaderInterface::MATRIX_RESULTS)->cellResults()->maxTimeStepCount()); for (int i = 0; i < timeStepCount; i++) { stringList += this->timeStepName(i); @@ -546,32 +588,119 @@ QStringList RimEclipseCase::timeStepStrings() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- - QString RimEclipseCase::timeStepName(int frameIdx) { + std::vector timeStepDates = this->timeStepDates(); + CVF_ASSERT(frameIdx < static_cast(timeStepDates.size())); + if (m_timeStepFormatString.isEmpty()) { - std::vector timeStepDates = results(RifReaderInterface::MATRIX_RESULTS)->cellResults()->timeStepDates(0); - - bool hasHrsAndMinutesInTimesteps = false; + bool hasHoursAndMinutesInTimesteps = false; + bool hasSecondsInTimesteps = false; + bool hasMillisecondsInTimesteps = false; for (size_t i = 0; i < timeStepDates.size(); i++) { - if (timeStepDates[i].time().hour() != 0.0 || timeStepDates[i].time().minute() != 0.0) + if (timeStepDates[i].time().msec() != 0.0) { - hasHrsAndMinutesInTimesteps = true; + hasMillisecondsInTimesteps = true; + hasSecondsInTimesteps = true; + hasHoursAndMinutesInTimesteps = true; break; } + else if (timeStepDates[i].time().second() != 0.0) { + hasHoursAndMinutesInTimesteps = true; + hasSecondsInTimesteps = true; + } + else if (timeStepDates[i].time().hour() != 0.0 || timeStepDates[i].time().minute() != 0.0) + { + hasHoursAndMinutesInTimesteps = true; + } } m_timeStepFormatString = "dd.MMM yyyy"; - if (hasHrsAndMinutesInTimesteps) + if (hasHoursAndMinutesInTimesteps) { m_timeStepFormatString += " - hh:mm"; + if (hasSecondsInTimesteps) + { + m_timeStepFormatString += ":ss"; + if (hasMillisecondsInTimesteps) + { + m_timeStepFormatString += ".zzz"; + } + } } } + QDateTime date = timeStepDates.at(frameIdx); - QDateTime date = results(RifReaderInterface::MATRIX_RESULTS)->cellResults()->timeStepDate(0,frameIdx); return date.toString(m_timeStepFormatString); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseCase::reloadDataAndUpdate() +{ + if (this->eclipseCaseData()) + { + RigCaseCellResultsData* matrixModelResults = eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS); + if (matrixModelResults) + { + matrixModelResults->clearAllResults(); + } + + RigCaseCellResultsData* fractureModelResults = eclipseCaseData()->results(RifReaderInterface::FRACTURE_RESULTS); + if (fractureModelResults) + { + fractureModelResults->clearAllResults(); + } + + reloadEclipseGridFile(); + for (size_t i = 0; i < reservoirViews().size(); i++) + { + RimEclipseView* reservoirView = reservoirViews()[i]; + CVF_ASSERT(reservoirView); + reservoirView->loadDataAndUpdate(); + } + + RimProject* project = RiaApplication::instance()->project(); + if (project) + { + if (project->mainPlotCollection()) + { + RimWellLogPlotCollection* wellPlotCollection = project->mainPlotCollection()->wellLogPlotCollection(); + RimSummaryPlotCollection* summaryPlotCollection = project->mainPlotCollection()->summaryPlotCollection(); + RimFlowPlotCollection* flowPlotCollection = project->mainPlotCollection()->flowPlotCollection(); + + if (wellPlotCollection) + { + for (size_t i = 0; i < wellPlotCollection->wellLogPlots().size(); ++i) + { + wellPlotCollection->wellLogPlots()[i]->loadDataAndUpdate(); + } + } + if (summaryPlotCollection) + { + for (size_t i = 0; i < summaryPlotCollection->summaryPlots().size(); ++i) + { + summaryPlotCollection->summaryPlots()[i]->loadDataAndUpdate(); + } + } + if (flowPlotCollection) + { + flowPlotCollection->loadDataAndUpdate(); + } + } + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimEclipseCase::timeStepDates() +{ + return results(RifReaderInterface::MATRIX_RESULTS)->cellResults()->timeStepDates(); } diff --git a/ApplicationCode/ProjectDataModel/RimEclipseCase.h b/ApplicationCode/ProjectDataModel/RimEclipseCase.h index af495d16ce..81cf3f1b46 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseCase.h +++ b/ApplicationCode/ProjectDataModel/RimEclipseCase.h @@ -20,27 +20,27 @@ #pragma once -#include "cvfBase.h" -#include "cvfObject.h" +#include "RifReaderInterface.h" #include "RimCase.h" -#include "RimEclipseView.h" - #include "cafPdmChildArrayField.h" #include "cafPdmChildField.h" #include "cafPdmField.h" #include "cafPdmObject.h" -#include "RifReaderInterface.h" +#include "cvfBase.h" +#include "cvfObject.h" +#include "cvfColor3.h" class QString; -class RigCaseData; +class RigEclipseCaseData; class RigGridBase; class RimCaseCollection; class RimIdenticalGridCaseGroup; class RimReservoirCellResultsStorage; +class RimEclipseView; //================================================================================================== @@ -68,12 +68,14 @@ class RimEclipseCase : public RimCase bool openReserviorCase(); virtual bool openEclipseGridFile() = 0; - RigCaseData* reservoirData(); - const RigCaseData* reservoirData() const; + RigEclipseCaseData* eclipseCaseData(); + const RigEclipseCaseData* eclipseCaseData() const; + cvf::Color3f defaultWellColor(const QString& wellName); RimReservoirCellResultsStorage* results(RifReaderInterface::PorosityModelResultType porosityModel); RimEclipseView* createAndAddReservoirView(); + RimEclipseView* createCopyAndAddView(const RimEclipseView* sourceView); void removeResult(const QString& resultName); @@ -86,11 +88,16 @@ class RimEclipseCase : public RimCase virtual std::vector views(); virtual QStringList timeStepStrings(); virtual QString timeStepName(int frameIdx); + std::vector timeStepDates(); + virtual cvf::BoundingBox activeCellsBoundingBox() const; virtual cvf::BoundingBox allCellsBoundingBox() const; virtual cvf::Vec3d displayModelOffset() const; + void reloadDataAndUpdate(); + virtual void reloadEclipseGridFile() = 0; + // Overridden methods from PdmObject public: @@ -103,16 +110,18 @@ class RimEclipseCase : public RimCase // Internal methods protected: void computeCachedData(); - void setReservoirData(RigCaseData* eclipseCase); + void setReservoirData(RigEclipseCaseData* eclipseCase); private: - cvf::ref m_rigEclipseCase; + cvf::ref m_rigEclipseCase; private: caf::PdmChildField m_matrixModelResults; caf::PdmChildField m_fractureModelResults; QString m_timeStepFormatString; + std::map m_wellToColorMap; + // Obsolete fields protected: caf::PdmField caseName; diff --git a/ApplicationCode/ProjectDataModel/RimEclipseCaseCollection.cpp b/ApplicationCode/ProjectDataModel/RimEclipseCaseCollection.cpp index 44e66bafc7..ae8410b0fc 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseCaseCollection.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseCaseCollection.cpp @@ -21,13 +21,16 @@ #include "RimEclipseCaseCollection.h" #include "RiaApplication.h" -#include "RigCaseData.h" + +#include "RigEclipseCaseData.h" #include "RigGridManager.h" -#include "RimEclipseCase.h" +#include "RigMainGrid.h" + #include "RimCaseCollection.h" +#include "RimEclipseCase.h" +#include "RimEclipseStatisticsCase.h" #include "RimIdenticalGridCaseGroup.h" #include "RimProject.h" -#include "RimEclipseStatisticsCase.h" CAF_PDM_SOURCE_INIT(RimEclipseCaseCollection, "ResInsightAnalysisModels"); @@ -73,7 +76,7 @@ RimIdenticalGridCaseGroup* RimEclipseCaseCollection::createIdenticalCaseGroupFro { CVF_ASSERT(mainCase); - RigCaseData* rigEclipseCase = mainCase->reservoirData(); + RigEclipseCaseData* rigEclipseCase = mainCase->eclipseCaseData(); RigMainGrid* equalGrid = registerCaseInGridCollection(rigEclipseCase); CVF_ASSERT(equalGrid); @@ -98,7 +101,7 @@ void RimEclipseCaseCollection::moveEclipseCaseIntoCaseGroup(RimEclipseCase* rimR { CVF_ASSERT(rimReservoir); - RigCaseData* rigEclipseCase = rimReservoir->reservoirData(); + RigEclipseCaseData* rigEclipseCase = rimReservoir->eclipseCaseData(); RigMainGrid* equalGrid = registerCaseInGridCollection(rigEclipseCase); CVF_ASSERT(equalGrid); @@ -136,7 +139,7 @@ void RimEclipseCaseCollection::moveEclipseCaseIntoCaseGroup(RimEclipseCase* rimR //-------------------------------------------------------------------------------------------------- void RimEclipseCaseCollection::removeCaseFromAllGroups(RimEclipseCase* reservoir) { - m_gridCollection->removeCase(reservoir->reservoirData()); + m_gridCollection->removeCase(reservoir->eclipseCaseData()); for (size_t i = 0; i < caseGroups.size(); i++) { @@ -152,7 +155,7 @@ void RimEclipseCaseCollection::removeCaseFromAllGroups(RimEclipseCase* reservoir //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RigMainGrid* RimEclipseCaseCollection::registerCaseInGridCollection(RigCaseData* rigEclipseCase) +RigMainGrid* RimEclipseCaseCollection::registerCaseInGridCollection(RigEclipseCaseData* rigEclipseCase) { CVF_ASSERT(rigEclipseCase); @@ -185,7 +188,7 @@ void RimEclipseCaseCollection::insertCaseInCaseGroup(RimIdenticalGridCaseGroup* { CVF_ASSERT(rimReservoir); - RigCaseData* rigEclipseCase = rimReservoir->reservoirData(); + RigEclipseCaseData* rigEclipseCase = rimReservoir->eclipseCaseData(); registerCaseInGridCollection(rigEclipseCase); caseGroup->addCase(rimReservoir); diff --git a/ApplicationCode/ProjectDataModel/RimEclipseCaseCollection.h b/ApplicationCode/ProjectDataModel/RimEclipseCaseCollection.h index 7ec132f3ae..ce843ceabb 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseCaseCollection.h +++ b/ApplicationCode/ProjectDataModel/RimEclipseCaseCollection.h @@ -27,7 +27,7 @@ #include "cvfObject.h" -class RigCaseData; +class RigEclipseCaseData; class RigGridManager; class RigMainGrid; class RimEclipseCase; @@ -59,6 +59,6 @@ class RimEclipseCaseCollection : public caf::PdmObject void recomputeStatisticsForAllCaseGroups(); private: - RigMainGrid* registerCaseInGridCollection(RigCaseData* rigEclipseCase); + RigMainGrid* registerCaseInGridCollection(RigEclipseCaseData* rigEclipseCase); cvf::ref m_gridCollection; }; diff --git a/ApplicationCode/ProjectDataModel/RimEclipseCellColors.cpp b/ApplicationCode/ProjectDataModel/RimEclipseCellColors.cpp index 72dc13cdec..e68d97f876 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseCellColors.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseCellColors.cpp @@ -20,9 +20,17 @@ #include "RimEclipseCellColors.h" +#include "RigCaseCellResultsData.h" +#include "RigEclipseCaseData.h" +#include "RigFlowDiagResults.h" +#include "RigFormationNames.h" + #include "RimCellEdgeColors.h" +#include "RimEclipseCase.h" #include "RimEclipseFaultColors.h" #include "RimEclipseView.h" +#include "RimEclipseWell.h" +#include "RimEclipseWellCollection.h" #include "RimLegendConfig.h" #include "RimTernaryLegendConfig.h" #include "RimViewController.h" @@ -110,8 +118,6 @@ void RimEclipseCellColors::changeLegendConfig(QString resultVarNameOfNewLegend) { if (resultVarNameOfNewLegend != RimDefines::ternarySaturationResultName()) { - bool found = false; - QString legendResultVariable; if (this->m_legendConfigPtrField()) @@ -121,6 +127,7 @@ void RimEclipseCellColors::changeLegendConfig(QString resultVarNameOfNewLegend) if (!this->m_legendConfigPtrField() || legendResultVariable != resultVarNameOfNewLegend) { + bool found = false; for (size_t i = 0; i < m_legendConfigData.size(); i++) { if (m_legendConfigData[i]->resultVariableName() == resultVarNameOfNewLegend) @@ -135,7 +142,6 @@ void RimEclipseCellColors::changeLegendConfig(QString resultVarNameOfNewLegend) if (!found) { RimLegendConfig* newLegend = new RimLegendConfig; - newLegend->setReservoirView(m_reservoirView); newLegend->resultVariableName = resultVarNameOfNewLegend; m_legendConfigData.push_back(newLegend); @@ -188,7 +194,7 @@ void RimEclipseCellColors::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOr uiTreeOrdering.add(m_legendConfigPtrField()); } - uiTreeOrdering.setForgetRemainingFields(true); + uiTreeOrdering.skipRemainingChildren(true); } //-------------------------------------------------------------------------------------------------- @@ -225,21 +231,163 @@ void RimEclipseCellColors::setReservoirView(RimEclipseView* ownerReservoirView) this->setEclipseCase(ownerReservoirView->eclipseCase()); m_reservoirView = ownerReservoirView; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimEclipseView* RimEclipseCellColors::reservoirView() +{ + return m_reservoirView; +} + +bool operator<(const cvf::Color3ub first, const cvf::Color3ub second) +{ + if (first.r() != second.r()) return first.r() < second.r(); + if (first.g() != second.g()) return first.g() < second.g(); + if (first.b() != second.b()) return first.b() < second.b(); + + return false; +} - for (size_t i = 0; i < m_legendConfigData.size(); i++) +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +class TupleCompare +{ +public : + bool operator() (const std::tuple& t1, const std::tuple& t2) const { - m_legendConfigData[i]->setReservoirView(ownerReservoirView); + using namespace std; + if (get<0>(t1) != get<0>(t2)) return get<0>(t1) < get<0>(t2); + if (get<1>(t1) != get<1>(t2)) return get<1>(t1) < get<1>(t2); + if (get<2>(t1) != get<2>(t2)) return get<2>(t1) < get<2>(t2); + + return false; } +}; - this->ternaryLegendConfig()->setReservoirView(ownerReservoirView); -} //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimEclipseView* RimEclipseCellColors::reservoirView() +void RimEclipseCellColors::updateLegendData(size_t currentTimeStep) { - return m_reservoirView; + if (this->resultType() == RimDefines::FLOW_DIAGNOSTICS) + { + double globalMin, globalMax; + double globalPosClosestToZero, globalNegClosestToZero; + RigFlowDiagResults* flowResultsData = this->flowDiagSolution()->flowDiagResults(); + RigFlowDiagResultAddress resAddr = this->flowDiagResAddress(); + + int integerTimeStep = static_cast(currentTimeStep); + + flowResultsData->minMaxScalarValues(resAddr, integerTimeStep, &globalMin, &globalMax); + flowResultsData->posNegClosestToZero(resAddr, integerTimeStep, &globalPosClosestToZero, &globalNegClosestToZero); + + double localMin, localMax; + double localPosClosestToZero, localNegClosestToZero; + if (this->hasDynamicResult()) + { + flowResultsData->minMaxScalarValues(resAddr, integerTimeStep, &localMin, &localMax); + flowResultsData->posNegClosestToZero(resAddr, integerTimeStep, &localPosClosestToZero, &localNegClosestToZero); + } + else + { + localMin = globalMin; + localMax = globalMax; + + localPosClosestToZero = globalPosClosestToZero; + localNegClosestToZero = globalNegClosestToZero; + } + + CVF_ASSERT(this->legendConfig()); + + this->legendConfig()->disableAllTimeStepsRange(true); + this->legendConfig()->setClosestToZeroValues(globalPosClosestToZero, globalNegClosestToZero, localPosClosestToZero, localNegClosestToZero); + this->legendConfig()->setAutomaticRanges(globalMin, globalMax, localMin, localMax); + + if (this->hasCategoryResult()) + { + std::set, TupleCompare > categories; + //std::set > categories; + + std::vector tracerNames = this->flowDiagSolution()->tracerNames(); + int tracerIndex = 0; + for (const auto& tracerName : tracerNames) + { + RimEclipseWell* well = m_reservoirView->wellCollection()->findWell(RimFlowDiagSolution::removeCrossFlowEnding(tracerName)); + cvf::Color3ub color(cvf::Color3::GRAY); + if (well) color = cvf::Color3ub(well->wellPipeColor()); + + categories.insert(std::make_tuple(tracerName, tracerIndex, color)); + ++tracerIndex; + } + + std::vector> reverseCategories; + for (auto tupIt = categories.rbegin(); tupIt != categories.rend(); ++tupIt) + { + reverseCategories.push_back(*tupIt); + } + + this->legendConfig()->setCategoryItems(reverseCategories); + } + } + else + { + RimEclipseCase* rimEclipseCase = nullptr; + this->firstAncestorOrThisOfType(rimEclipseCase); + CVF_ASSERT(rimEclipseCase); + if (!rimEclipseCase) return; + + RigEclipseCaseData* eclipseCase = rimEclipseCase->eclipseCaseData(); + CVF_ASSERT(eclipseCase); + if (!eclipseCase) return; + + RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(this->porosityModel()); + RigCaseCellResultsData* cellResultsData = eclipseCase->results(porosityModel); + CVF_ASSERT(cellResultsData); + + double globalMin, globalMax; + double globalPosClosestToZero, globalNegClosestToZero; + cellResultsData->minMaxCellScalarValues(this->scalarResultIndex(), globalMin, globalMax); + cellResultsData->posNegClosestToZero(this->scalarResultIndex(), globalPosClosestToZero, globalNegClosestToZero); + + double localMin, localMax; + double localPosClosestToZero, localNegClosestToZero; + if (this->hasDynamicResult()) + { + cellResultsData->minMaxCellScalarValues(this->scalarResultIndex(), currentTimeStep, localMin, localMax); + cellResultsData->posNegClosestToZero(this->scalarResultIndex(), currentTimeStep, localPosClosestToZero, localNegClosestToZero); + } + else + { + localMin = globalMin; + localMax = globalMax; + + localPosClosestToZero = globalPosClosestToZero; + localNegClosestToZero = globalNegClosestToZero; + } + + CVF_ASSERT(this->legendConfig()); + + this->legendConfig()->disableAllTimeStepsRange(false); + this->legendConfig()->setClosestToZeroValues(globalPosClosestToZero, globalNegClosestToZero, localPosClosestToZero, localNegClosestToZero); + this->legendConfig()->setAutomaticRanges(globalMin, globalMax, localMin, localMax); + + if (this->hasCategoryResult()) + { + if (this->resultType() != RimDefines::FORMATION_NAMES) + { + this->legendConfig()->setIntegerCategories(cellResultsData->uniqueCellScalarValues(this->scalarResultIndex())); + } + else + { + const std::vector& fnVector = eclipseCase->activeFormationNames()->formationNames(); + this->legendConfig()->setNamedCategoriesInverse(fnVector); + } + } + } } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimEclipseCellColors.h b/ApplicationCode/ProjectDataModel/RimEclipseCellColors.h index afce58e7b5..7139fd63a0 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseCellColors.h +++ b/ApplicationCode/ProjectDataModel/RimEclipseCellColors.h @@ -44,6 +44,7 @@ class RimEclipseCellColors : public RimEclipseResultDefinition void setReservoirView(RimEclipseView* ownerReservoirView); RimEclipseView* reservoirView(); + void updateLegendData(size_t timestep); RimLegendConfig* legendConfig(); caf::PdmChildField ternaryLegendConfig; diff --git a/ApplicationCode/ProjectDataModel/RimEclipseFaultColors.cpp b/ApplicationCode/ProjectDataModel/RimEclipseFaultColors.cpp index 931cd67220..32a9b6918a 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseFaultColors.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseFaultColors.cpp @@ -19,9 +19,6 @@ #include "RimEclipseFaultColors.h" -#include "RigCaseData.h" -#include "RigMainGrid.h" - #include "RimEclipseCase.h" #include "RimEclipseCellColors.h" #include "RimEclipseView.h" @@ -51,7 +48,6 @@ RimEclipseFaultColors::RimEclipseFaultColors() m_customFaultResultColors.uiCapability()->setUiHidden(true); - updateFieldVisibility(); } //-------------------------------------------------------------------------------------------------- @@ -88,18 +84,10 @@ void RimEclipseFaultColors::fieldChangedByUi(const caf::PdmFieldHandle* changedF void RimEclipseFaultColors::initAfterRead() { m_customFaultResultColors->initAfterRead(); - updateFieldVisibility(); this->updateUiIconFromToggleField(); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimEclipseFaultColors::updateFieldVisibility() -{ - m_customFaultResultColors->updateFieldVisibility(); -} //-------------------------------------------------------------------------------------------------- /// @@ -123,9 +111,7 @@ caf::PdmFieldHandle* RimEclipseFaultColors::objectToggleField() void RimEclipseFaultColors::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) { caf::PdmUiGroup* group1 = uiOrdering.addNewGroup("Result"); - group1->add(&(m_customFaultResultColors->m_resultTypeUiField)); - group1->add(&(m_customFaultResultColors->m_porosityModelUiField)); - group1->add(&(m_customFaultResultColors->m_resultVariableUiField)); + m_customFaultResultColors->uiOrdering(uiConfigName, *group1); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimEclipseFaultColors.h b/ApplicationCode/ProjectDataModel/RimEclipseFaultColors.h index 1e821228f4..458f185e45 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseFaultColors.h +++ b/ApplicationCode/ProjectDataModel/RimEclipseFaultColors.h @@ -39,24 +39,22 @@ class RimEclipseFaultColors : public caf::PdmObject RimEclipseFaultColors(); virtual ~RimEclipseFaultColors(); - void setReservoirView(RimEclipseView* ownerReservoirView); + void setReservoirView(RimEclipseView* ownerReservoirView); - caf::PdmField showCustomFaultResult; + caf::PdmField showCustomFaultResult; - bool hasValidCustomResult(); - RimEclipseCellColors* customFaultResult(); - - void updateFieldVisibility(); + bool hasValidCustomResult(); + RimEclipseCellColors* customFaultResult(); protected: - virtual void initAfterRead(); - virtual caf::PdmFieldHandle* objectToggleField(); - virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue); - virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) ; - virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = ""); + virtual void initAfterRead(); + virtual caf::PdmFieldHandle* objectToggleField(); + virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue); + virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) ; + virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = ""); private: - caf::PdmChildField m_customFaultResultColors; - caf::PdmPointer m_reservoirView; + caf::PdmChildField m_customFaultResultColors; + caf::PdmPointer m_reservoirView; }; diff --git a/ApplicationCode/ProjectDataModel/RimEclipseGeometrySelectionItem.cpp b/ApplicationCode/ProjectDataModel/RimEclipseGeometrySelectionItem.cpp new file mode 100644 index 0000000000..d14b7d3cec --- /dev/null +++ b/ApplicationCode/ProjectDataModel/RimEclipseGeometrySelectionItem.cpp @@ -0,0 +1,110 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimEclipseGeometrySelectionItem.h" + +#include "RigTimeHistoryResultAccessor.h" + +#include "RimEclipseCase.h" +#include "RimEclipseView.h" + +#include "RiuSelectionManager.h" + + +CAF_PDM_SOURCE_INIT(RimEclipseGeometrySelectionItem, "EclipseGeometrySelectionItem"); + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimEclipseGeometrySelectionItem::RimEclipseGeometrySelectionItem() +{ + CAF_PDM_InitObject("Eclipse Geometry Selection Item", "", "", ""); + + CAF_PDM_InitFieldNoDefault(&m_eclipseCase, "EclipseCase", "Eclipse Case", "", "", ""); + CAF_PDM_InitFieldNoDefault(&m_gridIndex, "GridIndex", "m_gridIndex", "", "", ""); + CAF_PDM_InitFieldNoDefault(&m_cellIndex, "CellIndex", "m_cellIndex", "", "", ""); + CAF_PDM_InitFieldNoDefault(&m_localIntersectionPoint, "LocalIntersectionPoint", "m_localIntersectionPoint", "", "", ""); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimEclipseGeometrySelectionItem::~RimEclipseGeometrySelectionItem() +{ +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseGeometrySelectionItem::setFromSelectionItem(const RiuEclipseSelectionItem* selectionItem) +{ + m_gridIndex = selectionItem->m_gridIndex; + m_cellIndex = selectionItem->m_cellIndex; + m_localIntersectionPoint = selectionItem->m_localIntersectionPoint; + + m_eclipseCase = selectionItem->m_view->eclipseCase(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimEclipseGeometrySelectionItem::geometrySelectionText() const +{ + QString text; + + if (m_eclipseCase) + { + text += m_eclipseCase->caseUserDescription(); + } + else + { + text = "No case"; + } + + text += ", "; + text += QString("Grid index %1").arg(m_gridIndex); + text += ", "; + text += RigTimeHistoryResultAccessor::geometrySelectionText(m_eclipseCase->eclipseCaseData(), m_gridIndex, m_cellIndex); + + return text; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimEclipseCase* RimEclipseGeometrySelectionItem::eclipseCase() const +{ + return m_eclipseCase; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +size_t RimEclipseGeometrySelectionItem::gridIndex() const +{ + return m_gridIndex; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +size_t RimEclipseGeometrySelectionItem::cellIndex() const +{ + return m_cellIndex; +} diff --git a/ApplicationCode/ProjectDataModel/RimEclipseGeometrySelectionItem.h b/ApplicationCode/ProjectDataModel/RimEclipseGeometrySelectionItem.h new file mode 100644 index 0000000000..faf69a1146 --- /dev/null +++ b/ApplicationCode/ProjectDataModel/RimEclipseGeometrySelectionItem.h @@ -0,0 +1,56 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "RimGeometrySelectionItem.h" + +#include "cafPdmField.h" +#include "cafPdmFieldCvfVec3d.h" +#include "cafPdmPtrField.h" + +class RimEclipseCase; +class RiuEclipseSelectionItem; + +//================================================================================================== +/// +/// +//================================================================================================== +class RimEclipseGeometrySelectionItem : public RimGeometrySelectionItem +{ + CAF_PDM_HEADER_INIT; +public: + RimEclipseGeometrySelectionItem(); + virtual ~RimEclipseGeometrySelectionItem() override; + + void setFromSelectionItem(const RiuEclipseSelectionItem* selectionItem); + + virtual QString geometrySelectionText() const override; + + RimEclipseCase* eclipseCase() const; + size_t gridIndex() const; + size_t cellIndex() const; + +private: + caf::PdmPtrField m_eclipseCase; + + caf::PdmField m_gridIndex; + caf::PdmField m_cellIndex; + caf::PdmField m_localIntersectionPoint; +}; + diff --git a/ApplicationCode/ProjectDataModel/RimEclipseInputCase.cpp b/ApplicationCode/ProjectDataModel/RimEclipseInputCase.cpp index 3159fe3e54..98700b1092 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseInputCase.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseInputCase.cpp @@ -28,10 +28,12 @@ #include "RifReaderMockModel.h" #include "RifReaderSettings.h" +#include "RigActiveCellInfo.h" #include "RigCaseCellResultsData.h" -#include "RigCaseData.h" -#include "RimDefines.h" +#include "RigEclipseCaseData.h" +#include "RigMainGrid.h" +#include "RimDefines.h" #include "RimEclipseInputProperty.h" #include "RimEclipseInputPropertyCollection.h" #include "RimReservoirCellResultsStorage.h" @@ -49,7 +51,7 @@ RimEclipseInputCase::RimEclipseInputCase() : RimEclipseCase() { CAF_PDM_InitObject("RimInputCase", ":/EclipseInput48x48.png", "", ""); - CAF_PDM_InitField(&m_gridFileName, "GridFileName", QString(), "Case grid filename", "", "" ,""); + CAF_PDM_InitField(&m_gridFileName, "GridFileName", QString(), "Case File Name", "", "" ,""); m_gridFileName.uiCapability()->setUiReadOnly(true); CAF_PDM_InitFieldNoDefault(&m_additionalFileNames, "AdditionalFileNames", "Additional files", "", "" ,""); m_additionalFileNames.uiCapability()->setUiReadOnly(true); @@ -80,8 +82,8 @@ void RimEclipseInputCase::openDataFileSet(const QStringList& fileNames) results(RifReaderInterface::MATRIX_RESULTS)->setReaderInterface(readerInterface.p()); results(RifReaderInterface::FRACTURE_RESULTS)->setReaderInterface(readerInterface.p()); - reservoirData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->computeDerivedData(); - reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->computeDerivedData(); + eclipseCaseData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->computeDerivedData(); + eclipseCaseData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->computeDerivedData(); QFileInfo gridFileName(fileNames[0]); QString caseName = gridFileName.completeBaseName(); @@ -92,19 +94,19 @@ void RimEclipseInputCase::openDataFileSet(const QStringList& fileNames) return; } - if (this->reservoirData() == NULL) + if (this->eclipseCaseData() == NULL) { - this->setReservoirData(new RigCaseData); + this->setReservoirData(new RigEclipseCaseData); } // First find and read the grid data - if (this->reservoirData()->mainGrid()->gridPointDimensions() == cvf::Vec3st(0,0,0)) + if (this->eclipseCaseData()->mainGrid()->gridPointDimensions() == cvf::Vec3st(0,0,0)) { RiaPreferences* prefs = RiaApplication::instance()->preferences(); for (int i = 0; i < fileNames.size(); i++) { - if (RifEclipseInputFileTools::openGridFile(fileNames[i], this->reservoirData(), prefs->readerSettings->importFaults())) + if (RifEclipseInputFileTools::openGridFile(fileNames[i], this->eclipseCaseData(), prefs->readerSettings->importFaults())) { m_gridFileName = fileNames[i]; @@ -113,7 +115,7 @@ void RimEclipseInputCase::openDataFileSet(const QStringList& fileNames) this->caseUserDescription = caseName; - this->reservoirData()->mainGrid()->setFlipAxis(flipXAxis, flipYAxis); + this->eclipseCaseData()->mainGrid()->setFlipAxis(flipXAxis, flipYAxis); computeCachedData(); @@ -122,7 +124,7 @@ void RimEclipseInputCase::openDataFileSet(const QStringList& fileNames) } } - if (this->reservoirData()->mainGrid()->gridPointDimensions() == cvf::Vec3st(0,0,0)) + if (this->eclipseCaseData()->mainGrid()->gridPointDimensions() == cvf::Vec3st(0,0,0)) { return ; // No grid present } @@ -150,7 +152,7 @@ void RimEclipseInputCase::openDataFileSet(const QStringList& fileNames) for (int i = 0; i < filesToRead.size(); i++) { QString propertyFileName = filesToRead[i]; - std::map readProperties = RifEclipseInputFileTools::readProperties(propertyFileName, this->reservoirData()); + std::map readProperties = RifEclipseInputFileTools::readProperties(propertyFileName, this->eclipseCaseData()); std::map::iterator it; for (it = readProperties.begin(); it != readProperties.end(); ++it) @@ -177,7 +179,7 @@ void RimEclipseInputCase::openDataFileSet(const QStringList& fileNames) bool RimEclipseInputCase::openEclipseGridFile() { // Early exit if reservoir data is created - if (this->reservoirData() == NULL) + if (this->eclipseCaseData() == NULL) { cvf::ref readerInterface; @@ -191,7 +193,7 @@ bool RimEclipseInputCase::openEclipseGridFile() readerInterface = new RifReaderEclipseInput; readerInterface->setReaderSetting(prefs->readerSettings()); - cvf::ref eclipseCase = new RigCaseData; + cvf::ref eclipseCase = new RigEclipseCaseData; if (!readerInterface->open(m_gridFileName, eclipseCase.p())) { return false; @@ -200,13 +202,13 @@ bool RimEclipseInputCase::openEclipseGridFile() this->setReservoirData( eclipseCase.p() ); } - CVF_ASSERT(this->reservoirData()); + CVF_ASSERT(this->eclipseCaseData()); CVF_ASSERT(readerInterface.notNull()); results(RifReaderInterface::MATRIX_RESULTS)->setReaderInterface(readerInterface.p()); results(RifReaderInterface::FRACTURE_RESULTS)->setReaderInterface(readerInterface.p()); - this->reservoirData()->mainGrid()->setFlipAxis(flipXAxis, flipYAxis); + this->eclipseCaseData()->mainGrid()->setFlipAxis(flipXAxis, flipYAxis); computeCachedData(); loadAndSyncronizeInputProperties(); @@ -226,6 +228,15 @@ bool RimEclipseInputCase::openEclipseGridFile() return true; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseInputCase::reloadEclipseGridFile() +{ + setReservoirData(nullptr); + openReserviorCase(); +} + #define for_all(stdVector, indexName) for (size_t indexName = 0; indexName < stdVector.size(); ++indexName) //-------------------------------------------------------------------------------------------------- /// Loads input property data from the gridFile and additional files @@ -235,8 +246,8 @@ void RimEclipseInputCase::loadAndSyncronizeInputProperties() { // Make sure we actually have reservoir data - CVF_ASSERT(this->reservoirData()); - CVF_ASSERT(this->reservoirData()->mainGrid()->gridPointDimensions() != cvf::Vec3st(0,0,0)); + CVF_ASSERT(this->eclipseCaseData()); + CVF_ASSERT(this->eclipseCaseData()->mainGrid()->gridPointDimensions() != cvf::Vec3st(0,0,0)); // Then read the properties from all the files referenced by the InputReservoir @@ -246,11 +257,10 @@ void RimEclipseInputCase::loadAndSyncronizeInputProperties() size_t inputPropCount = this->m_inputPropertyCollection()->inputProperties.size(); caf::ProgressInfo progInfo(static_cast(filenames.size() * inputPropCount), "Reading Input properties" ); - int progress = 0; for_all(filenames, i) { - progress = static_cast(i*inputPropCount); + int progress = static_cast(i*inputPropCount); // Find all the keywords present on the file progInfo.setProgressDescription(filenames[i]); @@ -286,7 +296,7 @@ void RimEclipseInputCase::loadAndSyncronizeInputProperties() ipsUsingThisFile[ipIdx]->resolvedState = RimEclipseInputProperty::KEYWORD_NOT_IN_FILE; if (fileKeywordSet.count(kw)) { - if (RifEclipseInputFileTools::readProperty(filenames[i], this->reservoirData(), kw, ipsUsingThisFile[ipIdx]->resultName )) + if (RifEclipseInputFileTools::readProperty(filenames[i], this->eclipseCaseData(), kw, ipsUsingThisFile[ipIdx]->resultName )) { ipsUsingThisFile[ipIdx]->resolvedState = RimEclipseInputProperty::RESOLVED; } @@ -303,8 +313,8 @@ void RimEclipseInputCase::loadAndSyncronizeInputProperties() for (const QString fileKeyword : fileKeywordSet) { { - QString resultName = this->reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)->makeResultNameUnique(fileKeyword); - if (RifEclipseInputFileTools::readProperty(filenames[i], this->reservoirData(), fileKeyword, resultName)) + QString resultName = this->eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)->makeResultNameUnique(fileKeyword); + if (RifEclipseInputFileTools::readProperty(filenames[i], this->eclipseCaseData(), fileKeyword, resultName)) { RimEclipseInputProperty* inputProperty = new RimEclipseInputProperty; inputProperty->resultName = resultName; @@ -333,7 +343,7 @@ void RimEclipseInputCase::loadAndSyncronizeInputProperties() //-------------------------------------------------------------------------------------------------- cvf::ref RimEclipseInputCase::createMockModel(QString modelName) { - cvf::ref reservoir = new RigCaseData; + cvf::ref reservoir = new RigEclipseCaseData; cvf::ref mockFileInterface = new RifReaderMockModel; if (modelName == RimDefines::mockModelBasicInputCase()) @@ -374,6 +384,23 @@ cvf::ref RimEclipseInputCase::createMockModel(QString modelN return mockFileInterface.p(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseInputCase::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) +{ + uiOrdering.add(&caseUserDescription); + uiOrdering.add(&caseId); + uiOrdering.add(&m_gridFileName); + uiOrdering.add(&m_additionalFileNames); + + auto group = uiOrdering.addNewGroup("Case Options"); + group->add(&activeFormationNames); + group->add(&flipXAxis); + group->add(&flipYAxis); + +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimEclipseInputCase.h b/ApplicationCode/ProjectDataModel/RimEclipseInputCase.h index 36974a91f6..73d286284b 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseInputCase.h +++ b/ApplicationCode/ProjectDataModel/RimEclipseInputCase.h @@ -53,6 +53,7 @@ class RimEclipseInputCase : public RimEclipseCase // RimCase overrides virtual bool openEclipseGridFile(); // Find grid file among file set. Read, Find read and validate property date. Syncronize child property sets. + virtual void reloadEclipseGridFile(); // Overrides from RimCase virtual QString locationOnDisc() const; @@ -60,6 +61,9 @@ class RimEclipseInputCase : public RimEclipseCase virtual void updateFilePathsFromProjectPath(const QString& projectPath, const QString& oldProjectPath); +protected: + virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override; + private: cvf::ref createMockModel(QString modelName); diff --git a/ApplicationCode/ProjectDataModel/RimEclipseInputCaseOpm.cpp b/ApplicationCode/ProjectDataModel/RimEclipseInputCaseOpm.cpp deleted file mode 100644 index 80ed512824..0000000000 --- a/ApplicationCode/ProjectDataModel/RimEclipseInputCaseOpm.cpp +++ /dev/null @@ -1,268 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#include "RimEclipseInputCaseOpm.h" - -#include "RiaApplication.h" -#include "RiaPreferences.h" - -#include "RifReaderOpmParserInput.h" -#include "RifReaderSettings.h" - -#include "RigCaseCellResultsData.h" -#include "RigCaseData.h" - -#include "RimEclipseCase.h" -#include "RimEclipseInputProperty.h" -#include "RimEclipseInputPropertyCollection.h" -#include "RimReservoirCellResultsStorage.h" -#include "RimTools.h" - -#include "cafProgressInfo.h" - -#include - - -CAF_PDM_SOURCE_INIT(RimEclipseInputCaseOpm, "EclipseInputCaseOpm"); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RimEclipseInputCaseOpm::RimEclipseInputCaseOpm() - : RimEclipseCase() -{ - CAF_PDM_InitObject("RimInputCase", ":/EclipseInput48x48.png", "", ""); - - CAF_PDM_InitField(&m_gridFileName, "GridFileName", QString(), "Case grid filename", "", "" ,""); - m_gridFileName.uiCapability()->setUiReadOnly(true); - CAF_PDM_InitFieldNoDefault(&m_additionalFileNames, "AdditionalFileNames", "Additional files", "", "", ""); - m_additionalFileNames.uiCapability()->setUiReadOnly(true); - - CAF_PDM_InitFieldNoDefault(&m_inputPropertyCollection, "InputPropertyCollection", "", "", "", ""); - m_inputPropertyCollection = new RimEclipseInputPropertyCollection; - m_inputPropertyCollection->parentField()->uiCapability()->setUiHidden(true); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RimEclipseInputCaseOpm::~RimEclipseInputCaseOpm() -{ - delete m_inputPropertyCollection; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimEclipseInputCaseOpm::importNewEclipseGridAndProperties(const QString& fileName) -{ - m_gridFileName = fileName; - - QFileInfo gridFileName(m_gridFileName); - QString caseName = gridFileName.completeBaseName(); - this->caseUserDescription = caseName + " (opm-parser)"; - - importEclipseGridAndProperties(m_gridFileName); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimEclipseInputCaseOpm::appendPropertiesFromStandaloneFiles(const QStringList& fileNames) -{ - for (auto filename : fileNames) - { - QFileInfo fi(filename); - if (!fi.exists()) continue; - - RifReaderOpmParserPropertyReader propertyReader(filename); - std::set fileKeywordSet = propertyReader.keywords(); - - std::vector knownKeywords = RifReaderOpmParserInput::knownPropertyKeywords(); - for (auto knownKeyword : knownKeywords) - { - if (fileKeywordSet.count(knownKeyword) > 0) - { - QString qtKnownKeyword = QString::fromStdString(knownKeyword); - QString resultName = this->reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)->makeResultNameUnique(qtKnownKeyword); - if (propertyReader.copyPropertyToCaseData(knownKeyword, this->reservoirData(), resultName)) - { - RimEclipseInputProperty* inputProperty = new RimEclipseInputProperty; - inputProperty->resultName = resultName; - inputProperty->eclipseKeyword = qtKnownKeyword; - inputProperty->fileName = filename; - inputProperty->resolvedState = RimEclipseInputProperty::RESOLVED; - m_inputPropertyCollection->inputProperties.push_back(inputProperty); - } - } - } - - m_additionalFileNames.v().push_back(filename); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RimEclipseInputCaseOpm::openEclipseGridFile() -{ - importEclipseGridAndProperties(m_gridFileName); - - loadAndSyncronizeInputProperties(); - - return true; - } - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -QString RimEclipseInputCaseOpm::locationOnDisc() const -{ - if (m_gridFileName().isEmpty()) return QString(); - - QFileInfo fi(m_gridFileName); - return fi.absolutePath(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimEclipseInputCaseOpm::updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath) -{ - bool foundFile = false; - std::vector searchedPaths; - - m_gridFileName = RimTools::relocateFile(m_gridFileName(), newProjectPath, oldProjectPath, &foundFile, &searchedPaths); - - for (size_t i = 0; i < m_additionalFileNames().size(); i++) - { - m_additionalFileNames.v()[i] = RimTools::relocateFile(m_additionalFileNames()[i], newProjectPath, oldProjectPath, &foundFile, &searchedPaths); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimEclipseInputCaseOpm::importEclipseGridAndProperties(const QString& fileName) -{ - if (this->reservoirData() == NULL) - { - this->setReservoirData(new RigCaseData); - - RifReaderOpmParserInput::importGridPropertiesFaults(fileName, reservoirData()); - - if (this->reservoirData()->mainGrid() == NULL) - { - return; - } - - this->reservoirData()->mainGrid()->setFlipAxis(flipXAxis, flipYAxis); - - computeCachedData(); - - RiaApplication* app = RiaApplication::instance(); - if (app->preferences()->autocomputeDepthRelatedProperties) - { - RimReservoirCellResultsStorage* matrixResults = results(RifReaderInterface::MATRIX_RESULTS); - RimReservoirCellResultsStorage* fractureResults = results(RifReaderInterface::FRACTURE_RESULTS); - - matrixResults->computeDepthRelatedResults(); - fractureResults->computeDepthRelatedResults(); - } - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimEclipseInputCaseOpm::loadAndSyncronizeInputProperties() -{ - // Make sure we actually have reservoir data - - CVF_ASSERT(this->reservoirData()); - CVF_ASSERT(this->reservoirData()->mainGrid()->gridPointDimensions() != cvf::Vec3st(0, 0, 0)); - - // Then read the properties from all the files referenced by the InputReservoir - - for (QString filename : m_additionalFileNames()) - { - QFileInfo fileNameInfo(filename); - bool isExistingFile = fileNameInfo.exists(); - - // Find the input property objects referring to the file - - std::vector ipsUsingThisFile = this->m_inputPropertyCollection()->findInputProperties(filename); - - if (!isExistingFile) - { - for (auto inputProperty : ipsUsingThisFile) - { - inputProperty->resolvedState = RimEclipseInputProperty::FILE_MISSING; - } - } - else - { - RifReaderOpmParserPropertyReader propertyReader(filename); - std::set fileKeywordSet = propertyReader.keywords(); - - for (auto inputProperty : ipsUsingThisFile) - { - QString kw = inputProperty->eclipseKeyword(); - inputProperty->resolvedState = RimEclipseInputProperty::KEYWORD_NOT_IN_FILE; - if (fileKeywordSet.count(kw.toStdString())) - { - if (propertyReader.copyPropertyToCaseData(kw.toStdString(), this->reservoirData(), inputProperty->resultName)) - { - inputProperty->resolvedState = RimEclipseInputProperty::RESOLVED; - } - } - fileKeywordSet.erase(kw.toStdString()); - } - - if (!fileKeywordSet.empty()) - { - std::vector knownKeywords = RifReaderOpmParserInput::knownPropertyKeywords(); - for (auto knownKeyword : knownKeywords) - { - if (fileKeywordSet.count(knownKeyword) > 0) - { - QString qtKnownKeyword = QString::fromStdString(knownKeyword); - QString resultName = this->reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)->makeResultNameUnique(qtKnownKeyword); - if (propertyReader.copyPropertyToCaseData(knownKeyword, this->reservoirData(), resultName)) - { - RimEclipseInputProperty* inputProperty = new RimEclipseInputProperty; - inputProperty->resultName = resultName; - inputProperty->eclipseKeyword = qtKnownKeyword; - inputProperty->fileName = filename; - inputProperty->resolvedState = RimEclipseInputProperty::RESOLVED; - m_inputPropertyCollection->inputProperties.push_back(inputProperty); - } - } - } - } - } - } - - for(auto inputProperty : m_inputPropertyCollection->inputProperties()) - { - if (inputProperty->resolvedState() == RimEclipseInputProperty::UNKNOWN) - { - inputProperty->resolvedState = RimEclipseInputProperty::FILE_MISSING; - } - } -} - diff --git a/ApplicationCode/ProjectDataModel/RimEclipseInputCaseOpm.h b/ApplicationCode/ProjectDataModel/RimEclipseInputCaseOpm.h deleted file mode 100644 index 578074d1d7..0000000000 --- a/ApplicationCode/ProjectDataModel/RimEclipseInputCaseOpm.h +++ /dev/null @@ -1,69 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#pragma once - -#include "RimEclipseCase.h" - -#include "cafPdmChildField.h" -#include "cafPdmField.h" -#include "cafPdmObject.h" - -#include "cvfBase.h" -#include "cvfObject.h" - -class RimEclipseInputProperty; -class RimEclipseInputPropertyCollection; - -//================================================================================================== -// -// This class is intended to replace RimEclipseInputCase when the opm-parser is considered stable -// -//================================================================================================== -class RimEclipseInputCaseOpm : public RimEclipseCase -{ - CAF_PDM_HEADER_INIT; - -public: - RimEclipseInputCaseOpm(); - virtual ~RimEclipseInputCaseOpm(); - - void importNewEclipseGridAndProperties(const QString& fileName); - - void appendPropertiesFromStandaloneFiles(const QStringList& fileNames); - - // RimCase overrides - virtual bool openEclipseGridFile(); // Find grid file among file set. Read, Find read and validate property date. Syncronize child property sets. - - // Overrides from RimCase - virtual QString locationOnDisc() const; - virtual QString gridFileName() const { return m_gridFileName();} - - virtual void updateFilePathsFromProjectPath(const QString& projectPath, const QString& oldProjectPath); - -private: - void importEclipseGridAndProperties(const QString& fileName); - void loadAndSyncronizeInputProperties(); - - -private: - caf::PdmChildField m_inputPropertyCollection; - caf::PdmField > m_additionalFileNames; - - caf::PdmField m_gridFileName; -}; diff --git a/ApplicationCode/ProjectDataModel/RimEclipseInputProperty.cpp b/ApplicationCode/ProjectDataModel/RimEclipseInputProperty.cpp index bf4c9918d3..7ae4784756 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseInputProperty.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseInputProperty.cpp @@ -21,7 +21,7 @@ #include "RimEclipseInputProperty.h" #include "RigCaseCellResultsData.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" #include "RimEclipseInputCase.h" #include "RimEclipseResultDefinition.h" @@ -91,7 +91,7 @@ void RimEclipseInputProperty::fieldChangedByUi(const caf::PdmFieldHandle* change QString oldName = oldValue.toString(); QString newName = newValue.toString(); - RigCaseCellResultsData* matrixResults = rimCase->reservoirData()->results(RifReaderInterface::MATRIX_RESULTS); + RigCaseCellResultsData* matrixResults = rimCase->eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS); if (matrixResults) { if (matrixResults->updateResultName(RimDefines::INPUT_PROPERTY, oldName, newName)) @@ -100,7 +100,7 @@ void RimEclipseInputProperty::fieldChangedByUi(const caf::PdmFieldHandle* change } } - RigCaseCellResultsData* fracResults = rimCase->reservoirData()->results(RifReaderInterface::FRACTURE_RESULTS); + RigCaseCellResultsData* fracResults = rimCase->eclipseCaseData()->results(RifReaderInterface::FRACTURE_RESULTS); if (fracResults) { if (fracResults->updateResultName(RimDefines::INPUT_PROPERTY, oldName, newName)) @@ -121,7 +121,7 @@ void RimEclipseInputProperty::fieldChangedByUi(const caf::PdmFieldHandle* change it->setResultVariable(newName); } - it->updateResultNameHasChanged(); + it->loadDataAndUpdate(); it->updateAnyFieldHasChanged(); } } diff --git a/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilter.cpp b/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilter.cpp index 7f1d704dea..12c707e1b6 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilter.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilter.cpp @@ -21,13 +21,15 @@ #include "RimEclipsePropertyFilter.h" #include "RigCaseCellResultsData.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" +#include "RigFlowDiagResults.h" #include "RigFormationNames.h" #include "RimEclipseCase.h" #include "RimEclipsePropertyFilterCollection.h" #include "RimEclipseResultDefinition.h" #include "RimEclipseView.h" +#include "RimFlowDiagSolution.h" #include "RimReservoirCellResultsStorage.h" #include "RimViewController.h" @@ -38,6 +40,8 @@ #include "cvfAssert.h" #include "cvfMath.h" +#include // Needed for HUGE_VAL on Linux + namespace caf { // Obsolete stuff @@ -72,13 +76,18 @@ RimEclipsePropertyFilter::RimEclipsePropertyFilter() resultDefinition.uiCapability()->setUiHidden(true); resultDefinition.uiCapability()->setUiTreeChildrenHidden(true); + CAF_PDM_InitField(&m_rangeLabelText, "Dummy_keyword", QString("Range Type"), "Range Type", "", "", ""); + m_rangeLabelText.xmlCapability()->setIOReadable(false); + m_rangeLabelText.xmlCapability()->setIOWritable(false); + m_rangeLabelText.uiCapability()->setUiReadOnly(true); + CAF_PDM_InitField(&m_lowerBound, "LowerBound", 0.0, "Min", "", "", ""); m_lowerBound.uiCapability()->setUiEditorTypeName(caf::PdmUiDoubleSliderEditor::uiEditorTypeName()); CAF_PDM_InitField(&m_upperBound, "UpperBound", 0.0, "Max", "", "", ""); m_upperBound.uiCapability()->setUiEditorTypeName(caf::PdmUiDoubleSliderEditor::uiEditorTypeName()); - CAF_PDM_InitField(&m_categorySelection, "CategorySelection", false, "Category Selection", "", "", ""); + CAF_PDM_InitField(&m_useCategorySelection, "CategorySelection", false, "Category Selection", "", "", ""); m_upperBound.uiCapability()->setUiEditorTypeName(caf::PdmUiDoubleSliderEditor::uiEditorTypeName()); updateIconState(); @@ -109,7 +118,7 @@ void RimEclipsePropertyFilter::rangeValues(double* lower, double* upper) const //-------------------------------------------------------------------------------------------------- bool RimEclipsePropertyFilter::isCategorySelectionActive() const { - if (resultDefinition->hasCategoryResult() && m_categorySelection) + if (resultDefinition->hasCategoryResult() && m_useCategorySelection) { return true; } @@ -122,18 +131,13 @@ bool RimEclipsePropertyFilter::isCategorySelectionActive() const //-------------------------------------------------------------------------------------------------- void RimEclipsePropertyFilter::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) { - if (&m_categorySelection == changedField) - { - updateFieldVisibility(); - } - if ( &m_lowerBound == changedField || &m_upperBound == changedField || &obsoleteField_evaluationRegion == changedField || &isActive == changedField || &filterMode == changedField || &m_selectedCategoryValues == changedField - || &m_categorySelection == changedField) + || &m_useCategorySelection == changedField) { updateFilterName(); this->updateIconState(); @@ -148,7 +152,10 @@ void RimEclipsePropertyFilter::fieldChangedByUi(const caf::PdmFieldHandle* chang //-------------------------------------------------------------------------------------------------- RimEclipsePropertyFilterCollection* RimEclipsePropertyFilter::parentContainer() { - return dynamic_cast(this->parentField()->ownerObject()); + RimEclipsePropertyFilterCollection* propFilterColl = nullptr; + this->firstAncestorOrThisOfTypeAsserted(propFilterColl); + + return propFilterColl; } //-------------------------------------------------------------------------------------------------- @@ -164,9 +171,7 @@ void RimEclipsePropertyFilter::setToDefaultValues() m_upperBound = m_maximumResultValue; m_selectedCategoryValues = m_categoryValues; - m_categorySelection = true; - - updateFieldVisibility(); + m_useCategorySelection = true; } //-------------------------------------------------------------------------------------------------- @@ -179,23 +184,34 @@ void RimEclipsePropertyFilter::defineUiOrdering(QString uiConfigName, caf::PdmUi // Fields declared in RimResultDefinition caf::PdmUiGroup* group1 = uiOrdering.addNewGroup("Result"); - group1->add(&(resultDefinition->m_resultTypeUiField)); - group1->add(&(resultDefinition->m_porosityModelUiField)); - group1->add(&(resultDefinition->m_resultVariableUiField)); + resultDefinition->uiOrdering(uiConfigName, *group1); + caf::PdmUiGroup& group2 = *(uiOrdering.addNewGroup("Filter Settings")); + // Fields declared in RimCellFilter - uiOrdering.add(&filterMode); - uiOrdering.add(&m_categorySelection); + group2.add(&filterMode); + + group2.add(&m_rangeLabelText); - // Fields declared in this class (RimCellPropertyFilter) - uiOrdering.add(&m_lowerBound); - uiOrdering.add(&m_upperBound); + if (resultDefinition->hasCategoryResult()) + { + group2.add(&m_useCategorySelection); + } - uiOrdering.add(&m_selectedCategoryValues); + if ( resultDefinition->hasCategoryResult() && m_useCategorySelection() ) + { + group2.add(&m_selectedCategoryValues); + } + else + { + group2.add(&m_lowerBound); + group2.add(&m_upperBound); + } - uiOrdering.setForgetRemainingFields(true); + uiOrdering.skipRemainingFields(true); updateReadOnlyStateOfAllFields(); + updateRangeLabel(); } //-------------------------------------------------------------------------------------------------- @@ -223,9 +239,26 @@ void RimEclipsePropertyFilter::updateReadOnlyStateOfAllFields() objFields.push_back(&(resultDefinition->m_porosityModelUiField)); objFields.push_back(&(resultDefinition->m_resultVariableUiField)); - for (size_t i = 0; i < objFields.size(); i++) + for (auto f : objFields) + { + if (f == &m_rangeLabelText) continue; + + f->uiCapability()->setUiReadOnly(readOnlyState); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipsePropertyFilter::updateRangeLabel() +{ + if (resultDefinition->resultType() == RimDefines::FLOW_DIAGNOSTICS) + { + m_rangeLabelText = "Current Timestep"; + } + else { - objFields[i]->uiCapability()->setUiReadOnly(readOnlyState); + m_rangeLabelText = "All Timesteps"; } } @@ -234,11 +267,11 @@ void RimEclipsePropertyFilter::updateReadOnlyStateOfAllFields() //-------------------------------------------------------------------------------------------------- bool RimEclipsePropertyFilter::isPropertyFilterControlled() { - RimView* rimView = NULL; - firstAncestorOrThisOfType(rimView); - CVF_ASSERT(rimView); + RimView* rimView = nullptr; + firstAncestorOrThisOfTypeAsserted(rimView); bool isPropertyFilterControlled = false; + RimViewController* vc = rimView->viewController(); if (vc && vc->isPropertyFilterOveridden()) { @@ -251,41 +284,33 @@ bool RimEclipsePropertyFilter::isPropertyFilterControlled() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimEclipsePropertyFilter::updateActiveState() +void RimEclipsePropertyFilter::setCategoriesFromTracerNames(const std::vector& tracerNames) { - isActive.uiCapability()->setUiReadOnly(isPropertyFilterControlled()); -} + std::vector> tracerNameValuesSorted; -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimEclipsePropertyFilter::updateFieldVisibility() -{ - if (resultDefinition->hasCategoryResult()) { - m_categorySelection.uiCapability()->setUiHidden(false); + std::set> tracerNameSet; - if (!m_categorySelection) + for (size_t i = 0; i < tracerNames.size(); i++) { - m_selectedCategoryValues.uiCapability()->setUiHidden(true); - m_lowerBound.uiCapability()->setUiHidden(false); - m_upperBound.uiCapability()->setUiHidden(false); + tracerNameSet.insert(std::make_pair(tracerNames[i], static_cast(i))); } - else + + for (auto it : tracerNameSet) { - m_selectedCategoryValues.uiCapability()->setUiHidden(false); - m_lowerBound.uiCapability()->setUiHidden(true); - m_upperBound.uiCapability()->setUiHidden(true); + tracerNameValuesSorted.push_back(it); } } - else - { - m_lowerBound.uiCapability()->setUiHidden(false); - m_upperBound.uiCapability()->setUiHidden(false); - m_selectedCategoryValues.uiCapability()->setUiHidden(true); - m_categorySelection.uiCapability()->setUiHidden(true); - } + setCategoryNamesAndValues(tracerNameValuesSorted); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipsePropertyFilter::updateActiveState() +{ + isActive.uiCapability()->setUiReadOnly(isPropertyFilterControlled()); } //-------------------------------------------------------------------------------------------------- @@ -318,37 +343,58 @@ void RimEclipsePropertyFilter::computeResultValueRange() { CVF_ASSERT(parentContainer()); - double min = 0.0; - double max = 0.0; + double min = HUGE_VAL; + double max = -HUGE_VAL; clearCategories(); - size_t scalarIndex = resultDefinition->scalarResultIndex(); - if (scalarIndex != cvf::UNDEFINED_SIZE_T) + if (resultDefinition->resultType() == RimDefines::FLOW_DIAGNOSTICS) { - RimReservoirCellResultsStorage* results = resultDefinition->currentGridCellResults(); - if (results) + RimView* view; + this->firstAncestorOrThisOfType(view); + + int timeStep = 0; + if (view) timeStep = view->currentTimeStep(); + RigFlowDiagResultAddress resAddr = resultDefinition->flowDiagResAddress(); + if ( resultDefinition->flowDiagSolution() ) { - results->cellResults()->minMaxCellScalarValues(scalarIndex, min, max); + RigFlowDiagResults* results = resultDefinition->flowDiagSolution()->flowDiagResults(); + results->minMaxScalarValues(resAddr, timeStep, &min, &max); - if (resultDefinition->hasCategoryResult()) + if ( resultDefinition->hasCategoryResult() ) { - if (resultDefinition->resultType() != RimDefines::FORMATION_NAMES) - { - setCategoryValues(results->cellResults()->uniqueCellScalarValues(scalarIndex)); - } - else + setCategoriesFromTracerNames(resultDefinition->flowDiagSolution()->tracerNames()); + } + } + } + else + { + size_t scalarIndex = resultDefinition->scalarResultIndex(); + if ( scalarIndex != cvf::UNDEFINED_SIZE_T ) + { + RimReservoirCellResultsStorage* results = resultDefinition->currentGridCellResults(); + if ( results ) + { + results->cellResults()->minMaxCellScalarValues(scalarIndex, min, max); + + if ( resultDefinition->hasCategoryResult() ) { - CVF_ASSERT(parentContainer()->reservoirView()->eclipseCase()->reservoirData()); - CVF_ASSERT(parentContainer()->reservoirView()->eclipseCase()->reservoirData()->activeFormationNames()); + if ( resultDefinition->resultType() != RimDefines::FORMATION_NAMES ) + { + setCategoryValues(results->cellResults()->uniqueCellScalarValues(scalarIndex)); + } + else + { + CVF_ASSERT(parentContainer()->reservoirView()->eclipseCase()->eclipseCaseData()); + CVF_ASSERT(parentContainer()->reservoirView()->eclipseCase()->eclipseCaseData()->activeFormationNames()); - const std::vector& fnVector = parentContainer()->reservoirView()->eclipseCase()->reservoirData()->activeFormationNames()->formationNames(); - setCategoryNames(fnVector); + const std::vector& fnVector = parentContainer()->reservoirView()->eclipseCase()->eclipseCaseData()->activeFormationNames()->formationNames(); + setCategoryNames(fnVector); + } } } } } - m_maximumResultValue = max; m_minimumResultValue = min; @@ -356,12 +402,94 @@ void RimEclipsePropertyFilter::computeResultValueRange() m_upperBound.uiCapability()->setUiName(QString("Max (%1)").arg(max)); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipsePropertyFilter::updateFromCurrentTimeStep() +{ + // Update range for flow diagnostics values when time step changes + // Range for flow is always current time step, not computed across all time steps + // If upper/lower slider is set to available extrema, the filter values will be + // updated with the min/max values for the current time step + // + // If the user manually has set a filter value, this value is left untouched + + if (resultDefinition->resultType() != RimDefines::FLOW_DIAGNOSTICS) + { + return; + } + + double threshold = 1e-6; + bool followMin = false; + if (fabs(m_lowerBound - m_minimumResultValue) < threshold || m_minimumResultValue == HUGE_VAL) + { + followMin = true; + } + + bool followMax = false; + if (fabs(m_upperBound - m_maximumResultValue) < threshold || m_maximumResultValue == -HUGE_VAL) + { + followMax = true; + } + + double min = HUGE_VAL; + double max = -HUGE_VAL; + + clearCategories(); + + RimView* view = nullptr; + this->firstAncestorOrThisOfTypeAsserted(view); + + int timeStep = view->currentTimeStep(); + RigFlowDiagResultAddress resAddr = resultDefinition->flowDiagResAddress(); + if (resultDefinition->flowDiagSolution()) + { + RigFlowDiagResults* results = resultDefinition->flowDiagSolution()->flowDiagResults(); + results->minMaxScalarValues(resAddr, timeStep, &min, &max); + + if (resultDefinition->hasCategoryResult()) + { + setCategoriesFromTracerNames(resultDefinition->flowDiagSolution()->tracerNames()); + } + } + + if (min == HUGE_VAL && max == -HUGE_VAL) + { + m_lowerBound.uiCapability()->setUiName(QString("Min (inf)")); + m_upperBound.uiCapability()->setUiName(QString("Max (inf)")); + } + else + { + m_maximumResultValue = max; + m_minimumResultValue = min; + + if (followMin) + { + m_lowerBound = min; + } + + if (followMax) + { + m_upperBound = m_maximumResultValue; + } + + m_lowerBound.uiCapability()->setUiName(QString("Min (%1)").arg(min)); + m_upperBound.uiCapability()->setUiName(QString("Max (%1)").arg(max)); + } + + m_lowerBound.uiCapability()->updateConnectedEditors(); + m_upperBound.uiCapability()->updateConnectedEditors(); + + updateFilterName(); + this->name.uiCapability()->updateConnectedEditors(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void RimEclipsePropertyFilter::updateFilterName() { - QString newFiltername = resultDefinition->resultVariable(); + QString newFiltername = resultDefinition->resultVariableUiShortName(); if (isCategorySelectionActive()) { @@ -409,9 +537,5 @@ void RimEclipsePropertyFilter::initAfterRead() resultDefinition->initAfterRead(); resultDefinition->setEclipseCase(parentContainer()->reservoirView()->eclipseCase()); - resultDefinition->loadResult(); updateIconState(); - computeResultValueRange(); - updateFieldVisibility(); } - diff --git a/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilter.h b/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilter.h index 3053d8a8b7..8cd63c1248 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilter.h +++ b/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilter.h @@ -20,7 +20,7 @@ #pragma once -#include "RimCellFilter.h" +#include "RimPropertyFilter.h" #include "cafPdmChildField.h" @@ -36,7 +36,7 @@ class RigCaseCellResultsData; /// /// //================================================================================================== -class RimEclipsePropertyFilter : public RimCellFilter +class RimEclipsePropertyFilter : public RimPropertyFilter { CAF_PDM_HEADER_INIT; @@ -49,15 +49,14 @@ class RimEclipsePropertyFilter : public RimCellFilter void rangeValues(double* lower, double* upper) const; bool isCategorySelectionActive() const; - RimEclipsePropertyFilterCollection* parentContainer(); void setToDefaultValues(); void updateFilterName(); void computeResultValueRange(); + void updateFromCurrentTimeStep(); virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue); virtual void initAfterRead(); - protected: virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering); virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName); @@ -69,15 +68,19 @@ class RimEclipsePropertyFilter : public RimCellFilter friend class RicEclipsePropertyFilterFeatureImpl; void updateActiveState(); - void updateFieldVisibility(); void updateReadOnlyStateOfAllFields(); + void updateRangeLabel(); bool isPropertyFilterControlled(); + void setCategoriesFromTracerNames(const std::vector& tracerNames); + + RimEclipsePropertyFilterCollection* parentContainer(); private: + caf::PdmField m_rangeLabelText; caf::PdmField m_lowerBound; caf::PdmField m_upperBound; - caf::PdmField m_categorySelection; + caf::PdmField m_useCategorySelection; double m_minimumResultValue; double m_maximumResultValue; diff --git a/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilterCollection.cpp b/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilterCollection.cpp index 116026cd20..e2c976eab9 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilterCollection.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilterCollection.cpp @@ -21,6 +21,7 @@ #include "RimEclipsePropertyFilterCollection.h" #include "RimEclipseCellColors.h" +#include "RimEclipsePropertyFilter.h" #include "RimEclipseResultDefinition.h" #include "RimEclipseView.h" #include "RimViewController.h" @@ -69,7 +70,10 @@ void RimEclipsePropertyFilterCollection::loadAndInitializePropertyFilters() for (size_t i = 0; i < propertyFilters.size(); i++) { RimEclipsePropertyFilter* propertyFilter = propertyFilters[i]; + propertyFilter->resultDefinition->setEclipseCase(reservoirView()->eclipseCase()); propertyFilter->initAfterRead(); + propertyFilter->resultDefinition->loadResult(); + propertyFilter->computeResultValueRange(); } } @@ -141,11 +145,14 @@ void RimEclipsePropertyFilterCollection::updateIconState() RimEclipseView* view = NULL; this->firstAncestorOrThisOfType(view); - RimViewController* viewController = view->viewController(); - if (viewController && (viewController->isPropertyFilterOveridden() - || viewController->isVisibleCellsOveridden())) + if (view) { - activeIcon = false; + RimViewController* viewController = view->viewController(); + if (viewController && (viewController->isPropertyFilterOveridden() + || viewController->isVisibleCellsOveridden())) + { + activeIcon = false; + } } if (!isActive) @@ -163,3 +170,14 @@ void RimEclipsePropertyFilterCollection::updateIconState() } } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipsePropertyFilterCollection::updateFromCurrentTimeStep() +{ + for (RimEclipsePropertyFilter* cellFilter : propertyFilters()) + { + cellFilter->updateFromCurrentTimeStep(); + } +} + diff --git a/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilterCollection.h b/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilterCollection.h index 11a0aff033..7abdeb7490 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilterCollection.h +++ b/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilterCollection.h @@ -20,11 +20,12 @@ #pragma once -#include "RimEclipsePropertyFilter.h" +#include "RimPropertyFilterCollection.h" #include "cafPdmChildArrayField.h" -#include "RimPropertyFilterCollection.h" +class RimEclipsePropertyFilter; +class RimEclipseView; //================================================================================================== /// @@ -50,6 +51,7 @@ class RimEclipsePropertyFilterCollection : public RimPropertyFilterCollection void loadAndInitializePropertyFilters(); void updateIconState(); + void updateFromCurrentTimeStep(); protected: // Overridden methods diff --git a/ApplicationCode/ProjectDataModel/RimEclipseResultCase.cpp b/ApplicationCode/ProjectDataModel/RimEclipseResultCase.cpp index 2210ec9bb7..35a552fa18 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseResultCase.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseResultCase.cpp @@ -28,16 +28,20 @@ #include "RifReaderSettings.h" #include "RigCaseCellResultsData.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" +#include "RigMainGrid.h" #include "RimMockModelSettings.h" #include "RimProject.h" #include "RimReservoirCellResultsStorage.h" #include "RimTools.h" +#include "RimFlowDiagSolution.h" +#include "RigFlowDiagSolverInterface.h" #include "cafPdmSettings.h" #include "cafPdmUiPropertyViewDialog.h" #include "cafProgressInfo.h" +#include "cafUtils.h" #include #include @@ -52,9 +56,14 @@ RimEclipseResultCase::RimEclipseResultCase() { CAF_PDM_InitObject("Eclipse Case", ":/Case48x48.png", "", ""); - CAF_PDM_InitField(&caseFileName, "CaseFileName", QString(), "Case file name", "", "" ,""); + CAF_PDM_InitField(&caseFileName, "CaseFileName", QString(), "Case File Name", "", "" ,""); caseFileName.uiCapability()->setUiReadOnly(true); + CAF_PDM_InitFieldNoDefault (&m_flowDiagSolutions, "FlowDiagSolutions", "Flow Diagnostics Solutions", "", "", ""); + m_flowDiagSolutions.uiCapability()->setUiHidden(true); + m_flowDiagSolutions.uiCapability()->setUiTreeHidden(true); + m_flowDiagSolutions.uiCapability()->setUiTreeChildrenHidden(true); + // Obsolete, unused field CAF_PDM_InitField(&caseDirectory, "CaseFolder", QString(), "Directory", "", "" ,""); caseDirectory.xmlCapability()->setIOWritable(false); @@ -65,6 +74,8 @@ RimEclipseResultCase::RimEclipseResultCase() flipYAxis.xmlCapability()->setIOWritable(true); //flipYAxis.uiCapability()->setUiHidden(true); + + m_activeCellInfoIsReadFromFile = false; m_gridAndWellDataIsReadFromFile = false; } @@ -90,7 +101,7 @@ bool RimEclipseResultCase::openEclipseGridFile() } else { - if (!QFile::exists(caseFileName())) + if (!caf::Utils::fileExists(caseFileName())) { return false; } @@ -100,7 +111,7 @@ bool RimEclipseResultCase::openEclipseGridFile() readerInterface->setReaderSetting(prefs->readerSettings()); readerInterface->setFilenamesWithFaults(this->filesContainingFaults()); - cvf::ref eclipseCase = new RigCaseData; + cvf::ref eclipseCase = new RigEclipseCaseData; if (!readerInterface->open(caseFileName(), eclipseCase.p())) { return false; @@ -116,7 +127,7 @@ bool RimEclipseResultCase::openEclipseGridFile() progInfo.incrementProgress(); - CVF_ASSERT(this->reservoirData()); + CVF_ASSERT(this->eclipseCaseData()); CVF_ASSERT(readerInterface.notNull()); progInfo.setProgressDescription("Computing Case Cache"); @@ -125,13 +136,34 @@ bool RimEclipseResultCase::openEclipseGridFile() m_gridAndWellDataIsReadFromFile = true; m_activeCellInfoIsReadFromFile = true; + if (eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)->hasFlowDiagUsableFluxes()) + { + m_flowDagSolverInterface = new RigFlowDiagSolverInterface(this); + + if (m_flowDiagSolutions.size() == 0) + { + m_flowDiagSolutions.push_back(new RimFlowDiagSolution()); + } + } + return true; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseResultCase::reloadEclipseGridFile() +{ + m_gridAndWellDataIsReadFromFile = false; + m_activeCellInfoIsReadFromFile = false; + setReservoirData(nullptr); + openReserviorCase(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RimEclipseResultCase::openAndReadActiveCellData(RigCaseData* mainEclipseCase) +bool RimEclipseResultCase::openAndReadActiveCellData(RigEclipseCaseData* mainEclipseCase) { // Early exit if data is already read if (m_activeCellInfoIsReadFromFile) return true; @@ -143,25 +175,22 @@ bool RimEclipseResultCase::openAndReadActiveCellData(RigCaseData* mainEclipseCas } else { - if (!QFile::exists(caseFileName())) + if (!caf::Utils::fileExists(caseFileName())) { return false; } - cvf::ref eclipseCase = new RigCaseData; + cvf::ref eclipseCase = new RigEclipseCaseData; CVF_ASSERT(mainEclipseCase && mainEclipseCase->mainGrid()); eclipseCase->setMainGrid(mainEclipseCase->mainGrid()); - size_t scalarIndexWithMaxTimeStepCount = cvf::UNDEFINED_SIZE_T; - mainEclipseCase->results(RifReaderInterface::MATRIX_RESULTS)->maxTimeStepCount(&scalarIndexWithMaxTimeStepCount); - if (scalarIndexWithMaxTimeStepCount == cvf::UNDEFINED_SIZE_T) + std::vector timeStepDates = mainEclipseCase->results(RifReaderInterface::MATRIX_RESULTS)->timeStepDates(); + if (timeStepDates.size() == 0) { return false; } - std::vector timeStepDates = mainEclipseCase->results(RifReaderInterface::MATRIX_RESULTS)->timeStepDates(scalarIndexWithMaxTimeStepCount); - cvf::ref readerEclipseOutput = new RifReaderEclipseOutput; if (!readerEclipseOutput->openAndReadActiveCellData(caseFileName(), timeStepDates, eclipseCase.p())) { @@ -178,10 +207,10 @@ bool RimEclipseResultCase::openAndReadActiveCellData(RigCaseData* mainEclipseCas results(RifReaderInterface::MATRIX_RESULTS)->setReaderInterface(readerInterface.p()); results(RifReaderInterface::FRACTURE_RESULTS)->setReaderInterface(readerInterface.p()); - CVF_ASSERT(this->reservoirData()); + CVF_ASSERT(this->eclipseCaseData()); CVF_ASSERT(readerInterface.notNull()); - reservoirData()->computeActiveCellBoundingBoxes(); + eclipseCaseData()->computeActiveCellBoundingBoxes(); m_activeCellInfoIsReadFromFile = true; @@ -194,7 +223,7 @@ bool RimEclipseResultCase::openAndReadActiveCellData(RigCaseData* mainEclipseCas cvf::ref RimEclipseResultCase::createMockModel(QString modelName) { cvf::ref mockFileInterface = new RifReaderMockModel; - cvf::ref reservoir = new RigCaseData; + cvf::ref reservoir = new RigEclipseCaseData; if (modelName == RimDefines::mockModelBasic()) { @@ -298,6 +327,7 @@ cvf::ref RimEclipseResultCase::createMockModel(QString model RimEclipseResultCase::~RimEclipseResultCase() { reservoirViews.deleteAllChildObjects(); + m_flowDiagSolutions.deleteAllChildObjects(); } //-------------------------------------------------------------------------------------------------- @@ -327,6 +357,15 @@ void RimEclipseResultCase::updateFilePathsFromProjectPath(const QString& newProj // Update filename and folder paths when opening project from a different file location caseFileName = RimTools::relocateFile(caseFileName(), newProjectPath, oldProjectPath, &foundFile, &searchedPaths); + + std::vector relocatedFaultFiles; + for (auto faultFileName : filesContainingFaults()) + { + QString relocatedFaultFile = RimTools::relocateFile(faultFileName, newProjectPath, oldProjectPath, &foundFile, &searchedPaths); + relocatedFaultFiles.push_back(relocatedFaultFile); + } + + filesContainingFaults = relocatedFaultFiles; #if 0 // Output the search path for debugging for (size_t i = 0; i < searchedPaths.size(); ++i) @@ -336,6 +375,41 @@ void RimEclipseResultCase::updateFilePathsFromProjectPath(const QString& newProj } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimFlowDiagSolution* RimEclipseResultCase::defaultFlowDiagSolution() +{ + if (m_flowDiagSolutions.size() > 0) + { + return m_flowDiagSolutions[0]; + } + + return nullptr; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimEclipseResultCase::flowDiagSolutions() +{ + std::vector flowSols; + for ( const caf::PdmPointer& fsol: m_flowDiagSolutions ) + { + flowSols.push_back(fsol.p()); + } + + return flowSols; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigFlowDiagSolverInterface* RimEclipseResultCase::flowDiagSolverInterface() +{ + return m_flowDagSolverInterface.p(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -382,5 +456,11 @@ void RimEclipseResultCase::defineUiOrdering(QString uiConfigName, caf::PdmUiOrde uiOrdering.add(&caseUserDescription); uiOrdering.add(&caseId); uiOrdering.add(&caseFileName); + + auto group = uiOrdering.addNewGroup("Case Options"); + group->add(&activeFormationNames); + group->add(&flipXAxis); + group->add(&flipYAxis); + } diff --git a/ApplicationCode/ProjectDataModel/RimEclipseResultCase.h b/ApplicationCode/ProjectDataModel/RimEclipseResultCase.h index f0f17ccebf..b55640cbee 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseResultCase.h +++ b/ApplicationCode/ProjectDataModel/RimEclipseResultCase.h @@ -24,6 +24,8 @@ class RifReaderInterface; class RigMainGrid; +class RimFlowDiagSolution; +class RigFlowDiagSolverInterface; //================================================================================================== // @@ -42,7 +44,8 @@ class RimEclipseResultCase : public RimEclipseCase void setCaseInfo(const QString& userDescription, const QString& caseFileName); virtual bool openEclipseGridFile(); - bool openAndReadActiveCellData(RigCaseData* mainEclipseCase); + virtual void reloadEclipseGridFile(); + bool openAndReadActiveCellData(RigEclipseCaseData* mainEclipseCase); void readGridDimensions(std::vector< std::vector >& gridDimensions); // Overrides from RimCase @@ -50,6 +53,10 @@ class RimEclipseResultCase : public RimEclipseCase virtual QString gridFileName() const { return caseFileName();} virtual void updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath); + RimFlowDiagSolution* defaultFlowDiagSolution(); + std::vector flowDiagSolutions(); + RigFlowDiagSolverInterface* flowDiagSolverInterface(); + private: cvf::ref createMockModel(QString modelName); @@ -57,8 +64,12 @@ class RimEclipseResultCase : public RimEclipseCase virtual void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ); + cvf::ref m_flowDagSolverInterface; + // Fields: caf::PdmField caseFileName; + caf::PdmChildArrayField m_flowDiagSolutions; + // Obsolete field caf::PdmField caseDirectory; diff --git a/ApplicationCode/ProjectDataModel/RimEclipseResultDefinition.cpp b/ApplicationCode/ProjectDataModel/RimEclipseResultDefinition.cpp index 91082aa2f4..8b6497ec70 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseResultDefinition.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseResultDefinition.cpp @@ -20,22 +20,43 @@ #include "RimEclipseResultDefinition.h" +#include "RigActiveCellInfo.h" #include "RigCaseCellResultsData.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" +#include "RigFlowDiagResultAddress.h" #include "RimCellEdgeColors.h" #include "RimEclipseCase.h" #include "RimEclipseCellColors.h" #include "RimEclipseFaultColors.h" #include "RimEclipsePropertyFilter.h" +#include "RimEclipseResultCase.h" #include "RimEclipseView.h" +#include "RimFlowDiagSolution.h" +#include "RimPlotCurve.h" #include "RimReservoirCellResultsStorage.h" #include "RimView.h" #include "RimViewLinker.h" -#include "RimWellLogCurve.h" +#include "RimGridTimeHistoryCurve.h" +#include "RimWellLogExtractionCurve.h" #include "cafPdmUiListEditor.h" +namespace caf +{ + template<> + void RimEclipseResultDefinition::FlowTracerSelectionEnum::setUp() + { + addItem(RimEclipseResultDefinition::FLOW_TR_INJ_AND_PROD, "FLOW_TR_INJ_AND_PROD", "All Injectors and Producers"); + addItem(RimEclipseResultDefinition::FLOW_TR_PRODUCERS, "FLOW_TR_PRODUCERS", "All Producers"); + addItem(RimEclipseResultDefinition::FLOW_TR_INJECTORS, "FLOW_TR_INJECTORS", "All Injectors"); + addItem(RimEclipseResultDefinition::FLOW_TR_BY_SELECTION, "FLOW_TR_BY_SELECTION", "By Selection"); + + setDefault(RimEclipseResultDefinition::FLOW_TR_INJ_AND_PROD); + } +} + + CAF_PDM_SOURCE_INIT(RimEclipseResultDefinition, "ResultDefinition"); //-------------------------------------------------------------------------------------------------- @@ -47,23 +68,48 @@ RimEclipseResultDefinition::RimEclipseResultDefinition() CAF_PDM_InitFieldNoDefault(&m_resultType, "ResultType", "Type", "", "", ""); m_resultType.uiCapability()->setUiHidden(true); + CAF_PDM_InitFieldNoDefault(&m_porosityModel, "PorosityModelType", "Porosity", "", "", ""); m_porosityModel.uiCapability()->setUiHidden(true); + CAF_PDM_InitField(&m_resultVariable, "ResultVariable", RimDefines::undefinedResultName(), "Variable", "", "", "" ); m_resultVariable.uiCapability()->setUiHidden(true); + CAF_PDM_InitFieldNoDefault(&m_flowSolution, "FlowDiagSolution", "Solution", "", "", ""); + m_flowSolution.uiCapability()->setUiHidden(true); + + CAF_PDM_InitFieldNoDefault(&m_selectedTracers, "SelectedTracers", "Tracers", "", "", ""); + m_selectedTracers.uiCapability()->setUiHidden(true); + + CAF_PDM_InitFieldNoDefault(&m_flowTracerSelectionMode, "FlowTracerSelectionMode", "Tracers", "", "", ""); + + // Ui only fields + CAF_PDM_InitFieldNoDefault(&m_resultTypeUiField, "MResultType", "Type", "", "", ""); m_resultTypeUiField.xmlCapability()->setIOReadable(false); m_resultTypeUiField.xmlCapability()->setIOWritable(false); + CAF_PDM_InitFieldNoDefault(&m_porosityModelUiField, "MPorosityModelType", "Porosity", "", "", ""); m_porosityModelUiField.xmlCapability()->setIOReadable(false); m_porosityModelUiField.xmlCapability()->setIOWritable(false); + CAF_PDM_InitField(&m_resultVariableUiField, "MResultVariable", RimDefines::undefinedResultName(), "Result property", "", "", "" ); m_resultVariableUiField.xmlCapability()->setIOReadable(false); m_resultVariableUiField.xmlCapability()->setIOWritable(false); + m_resultVariableUiField.uiCapability()->setUiEditorTypeName(caf::PdmUiListEditor::uiEditorTypeName()); - m_resultVariableUiField.uiCapability()->setUiEditorTypeName(caf::PdmUiListEditor::uiEditorTypeName()); + CAF_PDM_InitFieldNoDefault(&m_flowSolutionUiField, "MFlowDiagSolution", "Solution", "", "", ""); + m_flowSolutionUiField.xmlCapability()->setIOReadable(false); + m_flowSolutionUiField.xmlCapability()->setIOWritable(false); + m_flowSolutionUiField.uiCapability()->setUiHidden(true); // For now since there are only one to choose from + + CAF_PDM_InitFieldNoDefault(&m_selectedTracersUiField, "MSelectedTracers", " ", "", "", ""); + m_selectedTracersUiField.xmlCapability()->setIOReadable(false); + m_selectedTracersUiField.xmlCapability()->setIOWritable(false); + m_selectedTracersUiField.uiCapability()->setUiEditorTypeName(caf::PdmUiListEditor::uiEditorTypeName()); + + CAF_PDM_InitFieldNoDefault(&m_selectedTracersUiFieldFilter, "SelectedTracersFilter", "Filter", "", "", ""); } //-------------------------------------------------------------------------------------------------- @@ -77,26 +123,27 @@ RimEclipseResultDefinition::~RimEclipseResultDefinition() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimEclipseResultDefinition::setEclipseCase(RimEclipseCase* eclipseCase) +void RimEclipseResultDefinition::simpleCopy(const RimEclipseResultDefinition* other) { - m_eclipseCase = eclipseCase; - updateFieldVisibility(); + this->setResultVariable(other->resultVariable()); + this->setPorosityModel(other->porosityModel()); + this->setResultType(other->resultType()); + this->setFlowSolution(other->m_flowSolution()); + this->setSelectedTracers(other->m_selectedTracers()); + m_flowTracerSelectionMode = other->m_flowTracerSelectionMode(); } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QStringList RimEclipseResultDefinition::getResultVariableListForCurrentUIFieldSettings() +void RimEclipseResultDefinition::setEclipseCase(RimEclipseCase* eclipseCase) { - RimReservoirCellResultsStorage* cellResultsStorage = currentGridCellResults(); - - if (!cellResultsStorage) return QStringList(); - - if (!cellResultsStorage->cellResults()) return QStringList(); - - return cellResultsStorage->cellResults()->resultNames(m_resultTypeUiField()); + m_eclipseCase = eclipseCase; + + assignFlowSolutionFromCase(); } + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -114,23 +161,35 @@ RimReservoirCellResultsStorage* RimEclipseResultDefinition::currentGridCellResul //-------------------------------------------------------------------------------------------------- void RimEclipseResultDefinition::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) { - if ( &m_resultTypeUiField == changedField + if ( &m_flowSolutionUiField == changedField + || &m_resultTypeUiField == changedField || &m_porosityModelUiField == changedField ) { - QStringList varList = getResultVariableListForCurrentUIFieldSettings(); + // If the user are seeing the list with the actually selected result, + // select that result in the list. Otherwise select nothing. + + QStringList varList = getResultNamesForCurrentUiResultType(); - // If the user are seeing the list with the actually selected result, select that result in the list. Otherwise select nothing. - if ( m_resultTypeUiField() == m_resultType() - && m_porosityModelUiField() == m_porosityModel() - && varList.contains(resultVariable())) + bool isFlowDiagFieldsRelevant = (m_resultType() == RimDefines::FLOW_DIAGNOSTICS); + + + if ( ( m_flowSolutionUiField() == m_flowSolution() || !isFlowDiagFieldsRelevant) + && m_resultTypeUiField() == m_resultType() + && m_porosityModelUiField() == m_porosityModel() ) { - m_resultVariableUiField = resultVariable(); + if (varList.contains(resultVariable())) + { + m_resultVariableUiField = resultVariable(); + } + + if (isFlowDiagFieldsRelevant) m_selectedTracersUiField = m_selectedTracers(); + else m_selectedTracersUiField = std::vector(); } else { m_resultVariableUiField = ""; + m_selectedTracersUiField = std::vector(); } - } if (&m_resultVariableUiField == changedField) @@ -139,7 +198,65 @@ void RimEclipseResultDefinition::fieldChangedByUi(const caf::PdmFieldHandle* cha m_resultType = m_resultTypeUiField; m_resultVariable = m_resultVariableUiField; - updateResultNameHasChanged(); + if (m_resultTypeUiField() == RimDefines::FLOW_DIAGNOSTICS) + { + m_flowSolution = m_flowSolutionUiField(); + m_selectedTracers = m_selectedTracersUiField(); + } + loadDataAndUpdate(); + } + + if ( &m_selectedTracersUiField == changedField ) + { + m_flowSolution = m_flowSolutionUiField(); + + if (m_selectedTracersUiFieldFilter().isEmpty()) + { + m_selectedTracers = m_selectedTracersUiField(); + } + else + { + auto filteredTracerNames = tracerNamesMatchingFilter(); + + // Keep selected strings not part of currently visible selection items + std::vector newSelection; + for (auto selectedTracer : m_selectedTracers()) + { + if (std::find(begin(filteredTracerNames), end(filteredTracerNames), selectedTracer) == end(filteredTracerNames)) + { + newSelection.push_back(selectedTracer); + } + } + + for (auto selectedTracerUi : m_selectedTracersUiField()) + { + newSelection.push_back(selectedTracerUi); + } + + m_selectedTracers = newSelection; + } + + loadDataAndUpdate(); + } + + if (&m_selectedTracersUiFieldFilter == changedField) + { + auto visibleTracerNames = tracerNamesMatchingFilter(); + + std::vector subSelection; + + // Remove hidden items from selection + for (auto selectedTracer : m_selectedTracers()) + { + if (std::find(begin(visibleTracerNames), end(visibleTracerNames), selectedTracer) != end(visibleTracerNames)) + { + subSelection.push_back(selectedTracer); + } + } + + m_selectedTracersUiField = subSelection; + + updateConnectedEditors(); } updateAnyFieldHasChanged(); @@ -178,7 +295,7 @@ void RimEclipseResultDefinition::updateAnyFieldHasChanged() cellColors->updateConnectedEditors(); } - RimWellLogCurve* curve = nullptr; + RimPlotCurve* curve = nullptr; this->firstAncestorOrThisOfType(curve); if (curve) { @@ -189,7 +306,42 @@ void RimEclipseResultDefinition::updateAnyFieldHasChanged() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimEclipseResultDefinition::updateResultNameHasChanged() +void RimEclipseResultDefinition::setTofAndSelectTracer(const QString& tracerName) +{ + setResultType(RimDefines::FLOW_DIAGNOSTICS); + setResultVariable("TOF"); + setFlowDiagTracerSelectionType(FLOW_TR_BY_SELECTION); + + std::vector tracers; + tracers.push_back(tracerName); + setSelectedTracers(tracers); + + if (m_flowSolution() == nullptr) + { + assignFlowSolutionFromCase(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseResultDefinition::assignFlowSolutionFromCase() +{ + RimFlowDiagSolution* defaultFlowDiagSolution = nullptr; + + RimEclipseResultCase* eclCase = dynamic_cast(m_eclipseCase.p()); + + if (eclCase) + { + defaultFlowDiagSolution = eclCase->defaultFlowDiagSolution(); + } + this->setFlowSolution(defaultFlowDiagSolution); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseResultDefinition::loadDataAndUpdate() { RimView* view = nullptr; this->firstAncestorOrThisOfType(view); @@ -239,7 +391,7 @@ void RimEclipseResultDefinition::updateResultNameHasChanged() } } - RimWellLogCurve* curve = nullptr; + RimPlotCurve* curve = nullptr; this->firstAncestorOrThisOfType(curve); if (curve) { @@ -247,106 +399,240 @@ void RimEclipseResultDefinition::updateResultNameHasChanged() } } +bool isStringMatch(const QString& filterString, const QString& value) +{ + if (filterString.isEmpty()) return true; + if (filterString.trimmed() == "*") + { + if (!value.isEmpty()) return true; + else return false; + } + + QRegExp searcher(filterString, Qt::CaseInsensitive, QRegExp::WildcardUnix); + return searcher.exactMatch(value); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- QList RimEclipseResultDefinition::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) { - bool showPerFaceResultsFirst = false; - - RimEclipseFaultColors* rimEclipseFaultColors = nullptr; - this->firstAncestorOrThisOfType(rimEclipseFaultColors); - if (rimEclipseFaultColors) showPerFaceResultsFirst = true; - - QList optionItems = calculateValueOptionsForSpecifiedDerivedListPosition(showPerFaceResultsFirst, fieldNeedingOptions, useOptionsOnly); + QList options; - RimWellLogCurve* curve = nullptr; - this->firstAncestorOrThisOfType(curve); + if ( fieldNeedingOptions == &m_resultTypeUiField ) + { + bool hasFlowDiagFluxes = false; + RimEclipseResultCase* eclResCase = dynamic_cast(m_eclipseCase.p()); + if ( eclResCase && eclResCase->eclipseCaseData() ) + { + hasFlowDiagFluxes = eclResCase->eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)->hasFlowDiagUsableFluxes(); + } - RimEclipsePropertyFilter* propFilter = nullptr; - this->firstAncestorOrThisOfType(propFilter); + RimGridTimeHistoryCurve* timeHistoryCurve; + this->firstAncestorOrThisOfType(timeHistoryCurve); - RimCellEdgeColors* cellEdge = nullptr; - this->firstAncestorOrThisOfType(cellEdge); + // Do not include flow diagnostics results if not available or is a time history curve + if ( !hasFlowDiagFluxes || timeHistoryCurve != nullptr ) + { + using ResCatEnum = caf::AppEnum< RimDefines::ResultCatType >; + for ( size_t i = 0; i < ResCatEnum::size(); ++i ) + { + RimDefines::ResultCatType resType = ResCatEnum::fromIndex(i); + if ( resType != RimDefines::FLOW_DIAGNOSTICS ) + { + QString uiString = ResCatEnum::uiTextFromIndex(i); + options.push_back(caf::PdmOptionItemInfo(uiString, resType)); + } + } + } + else + { + // Do nothing, and thereby use the defaults of the AppEnum field + } + } - if (propFilter || curve || cellEdge) + if ( m_resultTypeUiField() != RimDefines::FLOW_DIAGNOSTICS ) { - removePerCellFaceOptionItems(optionItems); + if ( fieldNeedingOptions == &m_resultVariableUiField ) + { + options = calcOptionsForVariableUiFieldStandard(); + } } + else + { + if ( fieldNeedingOptions == &m_resultVariableUiField ) + { + options.push_back(caf::PdmOptionItemInfo("Time Of Flight (Average)", RIG_FLD_TOF_RESNAME)); + options.push_back(caf::PdmOptionItemInfo("Tracer Cell Fraction (Sum)", RIG_FLD_CELL_FRACTION_RESNAME)); + options.push_back(caf::PdmOptionItemInfo("Max Fraction Tracer", RIG_FLD_MAX_FRACTION_TRACER_RESNAME)); + options.push_back(caf::PdmOptionItemInfo("Injector Producer Communication", RIG_FLD_COMMUNICATION_RESNAME)); + } + else if (fieldNeedingOptions == &m_flowSolutionUiField) + { + RimEclipseResultCase* eclCase = dynamic_cast(m_eclipseCase.p()); + if (eclCase) + { + std::vector flowSols = eclCase->flowDiagSolutions(); + for (RimFlowDiagSolution* flowSol : flowSols) + { + options.push_back(caf::PdmOptionItemInfo(flowSol->userDescription(), flowSol)); + } + } + } + else if (fieldNeedingOptions == &m_selectedTracersUiField) + { + RimFlowDiagSolution* flowSol = m_flowSolutionUiField(); + if (flowSol) + { + std::vector tracerNames = tracerNamesMatchingFilter(); + std::map prefixedTracerNamesMap; + for ( const QString& tracerName : tracerNames ) + { + RimFlowDiagSolution::TracerStatusType status = flowSol->tracerStatusOverall(tracerName); + QString prefix; + switch ( status ) + { + case RimFlowDiagSolution::INJECTOR: prefix = "I : "; break; + case RimFlowDiagSolution::PRODUCER: prefix = "P : "; break; + case RimFlowDiagSolution::VARYING: prefix = "I/P: "; break; + case RimFlowDiagSolution::UNDEFINED:prefix = "U : "; break; + } + + if (status != RimFlowDiagSolution::CLOSED) prefixedTracerNamesMap[prefix + tracerName] = tracerName; + } - return optionItems; + for (auto nameIt: prefixedTracerNamesMap) + { + options.push_back(caf::PdmOptionItemInfo(nameIt.first, QVariant(nameIt.second))); + } + } + } + } + + (*useOptionsOnly) = true; + + return options; } + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QList RimEclipseResultDefinition::calculateValueOptionsForSpecifiedDerivedListPosition(bool showDerivedResultsFirstInList, const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) +QList RimEclipseResultDefinition::calcOptionsForVariableUiFieldStandard() { - if (fieldNeedingOptions == &m_resultVariableUiField) + CVF_ASSERT(m_resultTypeUiField() != RimDefines::FLOW_DIAGNOSTICS); + + if (this->currentGridCellResults()) { - if (this->currentGridCellResults()) + QList optionList; + + QStringList cellCenterResultNames; + QStringList cellFaceResultNames; + + foreach(QString s, getResultNamesForCurrentUiResultType()) { - QList optionList; - - QStringList cellCenterResultNames; - QStringList cellFaceResultNames; - - foreach(QString s, getResultVariableListForCurrentUIFieldSettings()) + if (RimDefines::isPerCellFaceResult(s)) { - if (RimDefines::isPerCellFaceResult(s)) - { - cellFaceResultNames.push_back(s); - } - else - { - cellCenterResultNames.push_back(s); - } + cellFaceResultNames.push_back(s); } - - cellCenterResultNames.sort(); - cellFaceResultNames.sort(); - - // Cell Center result names - foreach(QString s, cellCenterResultNames) + else { - optionList.push_back(caf::PdmOptionItemInfo(s, s)); + cellCenterResultNames.push_back(s); } + } + + cellCenterResultNames.sort(); + cellFaceResultNames.sort(); - // Ternary Result - bool hasAtLeastOneTernaryComponent = false; - if (cellCenterResultNames.contains("SOIL")) hasAtLeastOneTernaryComponent = true; - else if (cellCenterResultNames.contains("SGAS")) hasAtLeastOneTernaryComponent = true; - else if (cellCenterResultNames.contains("SWAT")) hasAtLeastOneTernaryComponent = true; + // Cell Center result names + foreach(QString s, cellCenterResultNames) + { + optionList.push_back(caf::PdmOptionItemInfo(s, s)); + } - if (m_resultTypeUiField == RimDefines::DYNAMIC_NATIVE && hasAtLeastOneTernaryComponent) + // Ternary Result + bool hasAtLeastOneTernaryComponent = false; + if (cellCenterResultNames.contains("SOIL")) hasAtLeastOneTernaryComponent = true; + else if (cellCenterResultNames.contains("SGAS")) hasAtLeastOneTernaryComponent = true; + else if (cellCenterResultNames.contains("SWAT")) hasAtLeastOneTernaryComponent = true; + + if (m_resultTypeUiField == RimDefines::DYNAMIC_NATIVE && hasAtLeastOneTernaryComponent) + { + optionList.push_front(caf::PdmOptionItemInfo(RimDefines::ternarySaturationResultName(), RimDefines::ternarySaturationResultName())); + } + + // Cell Face result names + bool showDerivedResultsFirstInList = false; + { + RimEclipseFaultColors* rimEclipseFaultColors = nullptr; + this->firstAncestorOrThisOfType(rimEclipseFaultColors); + + if ( rimEclipseFaultColors ) showDerivedResultsFirstInList = true; + } + + foreach(QString s, cellFaceResultNames) + { + if (showDerivedResultsFirstInList) { - optionList.push_front(caf::PdmOptionItemInfo(RimDefines::ternarySaturationResultName(), RimDefines::ternarySaturationResultName())); + optionList.push_front(caf::PdmOptionItemInfo(s, s)); } - - // Cell Face result names - foreach(QString s, cellFaceResultNames) + else { - if (showDerivedResultsFirstInList) - { - optionList.push_front(caf::PdmOptionItemInfo(s, s)); - } - else - { - optionList.push_back(caf::PdmOptionItemInfo(s, s)); - } + optionList.push_back(caf::PdmOptionItemInfo(s, s)); } + } + + optionList.push_front(caf::PdmOptionItemInfo(RimDefines::undefinedResultName(), RimDefines::undefinedResultName())); - optionList.push_front(caf::PdmOptionItemInfo(RimDefines::undefinedResultName(), RimDefines::undefinedResultName())); + // Remove Per Cell Face options + { + RimPlotCurve* curve = nullptr; + this->firstAncestorOrThisOfType(curve); - if (useOptionsOnly) *useOptionsOnly = true; + RimEclipsePropertyFilter* propFilter = nullptr; + this->firstAncestorOrThisOfType(propFilter); - return optionList; + RimCellEdgeColors* cellEdge = nullptr; + this->firstAncestorOrThisOfType(cellEdge); + + if ( propFilter || curve || cellEdge ) + { + removePerCellFaceOptionItems(optionList); + } } + + return optionList; } return QList(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QStringList RimEclipseResultDefinition::getResultNamesForCurrentUiResultType() +{ + if ( m_resultTypeUiField() != RimDefines::FLOW_DIAGNOSTICS ) + { + RimReservoirCellResultsStorage* cellResultsStorage = currentGridCellResults(); + + if ( !cellResultsStorage ) return QStringList(); + + if ( !cellResultsStorage->cellResults() ) return QStringList(); + + return cellResultsStorage->cellResults()->resultNames(m_resultTypeUiField()); + } + else + { + QStringList flowVars; + flowVars.push_back(RIG_FLD_TOF_RESNAME); + flowVars.push_back(RIG_FLD_CELL_FRACTION_RESNAME); + flowVars.push_back(RIG_FLD_MAX_FRACTION_TRACER_RESNAME); + flowVars.push_back(RIG_FLD_COMMUNICATION_RESNAME); + return flowVars; + } +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -354,6 +640,8 @@ size_t RimEclipseResultDefinition::scalarResultIndex() const { size_t gridScalarResultIndex = cvf::UNDEFINED_SIZE_T; + if (m_resultType() == RimDefines::FLOW_DIAGNOSTICS) return cvf::UNDEFINED_SIZE_T; + const RimReservoirCellResultsStorage* gridCellResults = this->currentGridCellResults(); if (gridCellResults && gridCellResults->cellResults()) { @@ -363,18 +651,158 @@ size_t RimEclipseResultDefinition::scalarResultIndex() const return gridScalarResultIndex; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigFlowDiagResultAddress RimEclipseResultDefinition::flowDiagResAddress() const +{ + CVF_ASSERT(m_resultType() == RimDefines::FLOW_DIAGNOSTICS); + + size_t timeStep = 0; + + RimView* rimView = nullptr; + this->firstAncestorOrThisOfType(rimView); + if (rimView) + { + timeStep = rimView->currentTimeStep(); + } + RimWellLogExtractionCurve* wellLogExtractionCurve = nullptr; + this->firstAncestorOrThisOfType(wellLogExtractionCurve); + if (wellLogExtractionCurve) + { + timeStep = static_cast(wellLogExtractionCurve->currentTimeStep()); + } + + // Time history curves are not supported, since it requires the time + // step to access to be supplied. + RimGridTimeHistoryCurve* timeHistoryCurve = nullptr; + this->firstAncestorOrThisOfType(timeHistoryCurve); + CVF_ASSERT(timeHistoryCurve == nullptr); + + std::set selTracerNames; + if (m_flowTracerSelectionMode == FLOW_TR_BY_SELECTION) + { + for (const QString& tName : m_selectedTracers()) + { + selTracerNames.insert(tName.toStdString()); + } + } + else + { + RimFlowDiagSolution* flowSol = m_flowSolution(); + if (flowSol) + { + std::vector tracerNames = flowSol->tracerNames(); + + if (m_flowTracerSelectionMode == FLOW_TR_INJECTORS || m_flowTracerSelectionMode == FLOW_TR_INJ_AND_PROD) + { + for (const QString& tracerName : tracerNames) + { + RimFlowDiagSolution::TracerStatusType status = flowSol->tracerStatusInTimeStep(tracerName, timeStep); + if (status == RimFlowDiagSolution::INJECTOR) + { + selTracerNames.insert(tracerName.toStdString()); + } + } + } + + if (m_flowTracerSelectionMode == FLOW_TR_PRODUCERS || m_flowTracerSelectionMode == FLOW_TR_INJ_AND_PROD) + { + for (const QString& tracerName : tracerNames) + { + RimFlowDiagSolution::TracerStatusType status = flowSol->tracerStatusInTimeStep(tracerName, timeStep); + if (status == RimFlowDiagSolution::PRODUCER) + { + selTracerNames.insert(tracerName.toStdString()); + } + } + } + } + } + + return RigFlowDiagResultAddress(m_resultVariable().toStdString(), selTracerNames); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseResultDefinition::setFlowDiagTracerSelectionType(FlowTracerSelectionType selectionType) +{ + m_flowTracerSelectionMode = selectionType; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimEclipseResultDefinition::resultVariableUiName() const +{ + if (resultType() == RimDefines::FLOW_DIAGNOSTICS) + { + QString fullName; + + if (m_flowTracerSelectionMode() == FLOW_TR_BY_SELECTION) + { + fullName = QString::fromStdString(flowDiagResAddress().uiText()); + } + else + { + fullName = QString::fromStdString(flowDiagResAddress().uiShortText()); + fullName += QString(" (%1)").arg(m_flowTracerSelectionMode().uiText()); + } + + return fullName; + } + + return m_resultVariable(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimEclipseResultDefinition::resultVariableUiShortName() const +{ + if (resultType() == RimDefines::FLOW_DIAGNOSTICS) + { + QString shortName; + + if (m_flowTracerSelectionMode() == FLOW_TR_BY_SELECTION) + { + QString candidate = QString::fromStdString(flowDiagResAddress().uiText()); + + int stringSizeLimit = 32; + if (candidate.size() > stringSizeLimit) + { + candidate = candidate.left(stringSizeLimit); + candidate += "..."; + } + + shortName = candidate; + } + else + { + shortName = QString::fromStdString(flowDiagResAddress().uiShortText()); + shortName += QString(" (%1)").arg(m_flowTracerSelectionMode().uiText()); + } + + return shortName; + } + + return m_resultVariable(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void RimEclipseResultDefinition::loadResult() { + if (m_resultType() == RimDefines::FLOW_DIAGNOSTICS) return; // Will load automatically on access + RimReservoirCellResultsStorage* gridCellResults = this->currentGridCellResults(); if (gridCellResults) { gridCellResults->findOrLoadScalarResult(m_resultType(), m_resultVariable); } - updateFieldVisibility(); } //-------------------------------------------------------------------------------------------------- @@ -383,6 +811,8 @@ void RimEclipseResultDefinition::loadResult() //-------------------------------------------------------------------------------------------------- bool RimEclipseResultDefinition::hasStaticResult() const { + if (this->resultType() == RimDefines::FLOW_DIAGNOSTICS) return false; + const RimReservoirCellResultsStorage* gridCellResults = this->currentGridCellResults(); size_t gridScalarResultIndex = this->scalarResultIndex(); @@ -401,7 +831,11 @@ bool RimEclipseResultDefinition::hasStaticResult() const //-------------------------------------------------------------------------------------------------- bool RimEclipseResultDefinition::hasResult() const { - if (this->currentGridCellResults() && this->currentGridCellResults()->cellResults()) + if (this->resultType() == RimDefines::FLOW_DIAGNOSTICS) + { + if (m_flowSolution() && !m_resultVariable().isEmpty()) return true; + } + else if (this->currentGridCellResults() && this->currentGridCellResults()->cellResults()) { const RigCaseCellResultsData* gridCellResults = this->currentGridCellResults()->cellResults(); size_t gridScalarResultIndex = gridCellResults->findScalarResultIndex(m_resultType(), m_resultVariable()); @@ -423,6 +857,10 @@ bool RimEclipseResultDefinition::hasDynamicResult() const { return true; } + else if (m_resultType() == RimDefines::FLOW_DIAGNOSTICS) + { + return true; + } if (this->currentGridCellResults() && this->currentGridCellResults()->cellResults()) { @@ -448,6 +886,9 @@ void RimEclipseResultDefinition::initAfterRead() m_resultTypeUiField = m_resultType; m_resultVariableUiField = m_resultVariable; + m_flowSolutionUiField = m_flowSolution(); + m_selectedTracersUiField = m_selectedTracers; + this->updateUiIconFromToggleField(); } @@ -478,6 +919,32 @@ void RimEclipseResultDefinition::setResultVariable(const QString& val) m_resultVariableUiField = val; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimFlowDiagSolution* RimEclipseResultDefinition::flowDiagSolution() +{ + return m_flowSolution(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseResultDefinition::setFlowSolution(RimFlowDiagSolution* flowSol) +{ + this->m_flowSolution = flowSol; + this->m_flowSolutionUiField = flowSol; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseResultDefinition::setSelectedTracers(const std::vector& selectedTracers) +{ + this->m_selectedTracers = selectedTracers; + this->m_selectedTracersUiField = selectedTracers; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -496,30 +963,81 @@ bool RimEclipseResultDefinition::hasCategoryResult() const { if (this->m_resultType() == RimDefines::FORMATION_NAMES && m_eclipseCase - && m_eclipseCase->reservoirData() - && m_eclipseCase->reservoirData()->activeFormationNames() ) return true; + && m_eclipseCase->eclipseCaseData() + && m_eclipseCase->eclipseCaseData()->activeFormationNames() ) return true; + + if (this->m_resultType() == RimDefines::FLOW_DIAGNOSTICS + && m_resultVariable() == RIG_FLD_MAX_FRACTION_TRACER_RESNAME) return true; if (!this->hasStaticResult()) return false; return this->resultVariable().contains("NUM", Qt::CaseInsensitive); } + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimEclipseResultDefinition::updateFieldVisibility() +bool RimEclipseResultDefinition::hasDualPorFractureResult() { - if (m_eclipseCase && - m_eclipseCase->reservoirData() && - m_eclipseCase->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS) ) + if ( m_eclipseCase + && m_eclipseCase->eclipseCaseData() + && m_eclipseCase->eclipseCaseData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS) + && m_eclipseCase->eclipseCaseData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->reservoirActiveCellCount() > 0 ) + { + return true; + } + + return false; +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseResultDefinition::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) +{ + uiOrdering.add(&m_resultTypeUiField); + + if (hasDualPorFractureResult()) { - if (m_eclipseCase->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->reservoirActiveCellCount() == 0) + uiOrdering.add(&m_porosityModelUiField); + } + + if ( m_resultTypeUiField() == RimDefines::FLOW_DIAGNOSTICS ) + { + uiOrdering.add(&m_flowSolutionUiField); + + uiOrdering.add(&m_flowTracerSelectionMode); + + if (m_flowTracerSelectionMode == FLOW_TR_BY_SELECTION) { - m_porosityModelUiField.uiCapability()->setUiHidden(true); + uiOrdering.add(&m_selectedTracersUiFieldFilter); + uiOrdering.add(&m_selectedTracersUiField); } - else + + if ( m_flowSolution() == nullptr ) { - m_porosityModelUiField.uiCapability()->setUiHidden(false); + assignFlowSolutionFromCase(); + } + } + uiOrdering.add(&m_resultVariableUiField); + + uiOrdering.skipRemainingFields(true); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseResultDefinition::defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) +{ + if (m_resultTypeUiField() == RimDefines::FLOW_DIAGNOSTICS + && field == &m_resultVariableUiField) + { + caf::PdmUiListEditorAttribute* listEditAttr = dynamic_cast(attribute); + if (listEditAttr) + { + listEditAttr->m_heightHint = 50; } } } @@ -549,3 +1067,33 @@ void RimEclipseResultDefinition::removePerCellFaceOptionItems(QList RimEclipseResultDefinition::tracerNamesMatchingFilter() const +{ + std::vector matchingNames; + + RimFlowDiagSolution* flowSol = m_flowSolutionUiField(); + if (flowSol) + { + std::vector tracerNames = flowSol->tracerNames(); + if (m_selectedTracersUiFieldFilter().isEmpty()) + { + matchingNames = tracerNames; + } + else + { + for (const QString& tracerName : tracerNames) + { + if (isStringMatch(m_selectedTracersUiFieldFilter, tracerName)) + { + matchingNames.push_back(tracerName); + } + } + } + } + + return matchingNames; +} + diff --git a/ApplicationCode/ProjectDataModel/RimEclipseResultDefinition.h b/ApplicationCode/ProjectDataModel/RimEclipseResultDefinition.h index 410766cf9a..e0a12d143d 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseResultDefinition.h +++ b/ApplicationCode/ProjectDataModel/RimEclipseResultDefinition.h @@ -26,11 +26,15 @@ #include "cafPdmField.h" #include "cafPdmObject.h" #include "cafPdmPointer.h" +#include "cafPdmPtrField.h" class RigCaseCellResultsData; class RimEclipseCase; class RimEclipseView; class RimReservoirCellResultsStorage; +class RimFlowDiagSolution; +class RigFlowDiagResultAddress; + //================================================================================================== /// @@ -39,10 +43,23 @@ class RimReservoirCellResultsStorage; class RimEclipseResultDefinition : public caf::PdmObject { CAF_PDM_HEADER_INIT; + +public: + enum FlowTracerSelectionType + { + FLOW_TR_INJ_AND_PROD, + FLOW_TR_PRODUCERS, + FLOW_TR_INJECTORS, + FLOW_TR_BY_SELECTION + }; + typedef caf::AppEnum FlowTracerSelectionEnum; + public: RimEclipseResultDefinition(); virtual ~RimEclipseResultDefinition(); + void simpleCopy(const RimEclipseResultDefinition* other); + void setEclipseCase(RimEclipseCase* eclipseCase); RimDefines::ResultCatType resultType() const { return m_resultType(); } @@ -51,6 +68,15 @@ class RimEclipseResultDefinition : public caf::PdmObject void setPorosityModel(RimDefines::PorosityModelType val); QString resultVariable() const { return m_resultVariable(); } virtual void setResultVariable(const QString& val); + + void setFlowSolution(RimFlowDiagSolution* flowSol); + RimFlowDiagSolution* flowDiagSolution(); + RigFlowDiagResultAddress flowDiagResAddress() const; + + void setFlowDiagTracerSelectionType(FlowTracerSelectionType selectionType); + + QString resultVariableUiName() const; + QString resultVariableUiShortName() const; void loadResult(); size_t scalarResultIndex() const; @@ -62,38 +88,58 @@ class RimEclipseResultDefinition : public caf::PdmObject RimReservoirCellResultsStorage* currentGridCellResults() const; - virtual void initAfterRead(); - - virtual void updateLegendCategorySettings() {}; - - void updateResultNameHasChanged(); + void loadDataAndUpdate(); void updateAnyFieldHasChanged(); - virtual QList calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly); - virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue); + void setTofAndSelectTracer(const QString& tracerName); + protected: - void updateFieldVisibility(); + virtual void updateLegendCategorySettings() {}; + + virtual QList calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly); + virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue); + virtual void initAfterRead(); + virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override; + virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override; protected: caf::PdmField< caf::AppEnum< RimDefines::ResultCatType > > m_resultType; caf::PdmField< caf::AppEnum< RimDefines::PorosityModelType > > m_porosityModel; caf::PdmField m_resultVariable; + caf::PdmPtrField m_flowSolution; + caf::PdmField > m_selectedTracers; + friend class RimEclipsePropertyFilter; friend class RimEclipseFaultColors; friend class RimWellLogExtractionCurve; // User interface only fields, to support "filtering"-like behaviour etc. + caf::PdmField< caf::AppEnum< RimDefines::ResultCatType > > m_resultTypeUiField; caf::PdmField< caf::AppEnum< RimDefines::PorosityModelType > > m_porosityModelUiField; caf::PdmField m_resultVariableUiField; + caf::PdmField< caf::AppEnum< FlowTracerSelectionType > > m_flowTracerSelectionMode; + caf::PdmPtrField m_flowSolutionUiField; + + caf::PdmField m_selectedTracersUiFieldFilter; + caf::PdmField > m_selectedTracersUiField; + + caf::PdmPointer m_eclipseCase; private: - QList calculateValueOptionsForSpecifiedDerivedListPosition(bool showDerivedResultsFirstInList, const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly); - QStringList getResultVariableListForCurrentUIFieldSettings(); + void setSelectedTracers(const std::vector& selectedTracers); + void assignFlowSolutionFromCase(); + + bool hasDualPorFractureResult(); + + QList calcOptionsForVariableUiFieldStandard(); + QStringList getResultNamesForCurrentUiResultType(); static void removePerCellFaceOptionItems(QList& optionItems); + + std::vector tracerNamesMatchingFilter() const; }; diff --git a/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCase.cpp b/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCase.cpp index 1d23259e85..00bfc18079 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCase.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCase.cpp @@ -23,7 +23,8 @@ #include "RicNewViewFeature.h" #include "RigCaseCellResultsData.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" +#include "RigSingleWellResultsData.h" #include "RimCaseCollection.h" #include "RimEclipseCellColors.h" @@ -74,7 +75,7 @@ RimEclipseStatisticsCase::RimEclipseStatisticsCase() m_selectionSummary.xmlCapability()->setIOReadable(false); m_selectionSummary.uiCapability()->setUiReadOnly(true); m_selectionSummary.uiCapability()->setUiEditorTypeName(caf::PdmUiTextEditor::uiEditorTypeName()); - m_selectionSummary.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::TOP); + m_selectionSummary.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN); CAF_PDM_InitFieldNoDefault(&m_resultType, "ResultType", "Result Type", "", "", ""); m_resultType.xmlCapability()->setIOWritable(false); @@ -113,6 +114,11 @@ RimEclipseStatisticsCase::RimEclipseStatisticsCase() CAF_PDM_InitField(&m_useZeroAsInactiveCellValue, "UseZeroAsInactiveCellValue", false, "Use Zero as Inactive Cell Value", "", "", ""); m_populateSelectionAfterLoadingGrid = false; + + // These does not work properly for statistics case, so hide for now + flipXAxis.uiCapability()->setUiHidden(true); + flipYAxis.uiCapability()->setUiHidden(true); + activeFormationNames.uiCapability()->setUiHidden(true); } //-------------------------------------------------------------------------------------------------- @@ -130,9 +136,9 @@ RimEclipseStatisticsCase::~RimEclipseStatisticsCase() void RimEclipseStatisticsCase::setMainGrid(RigMainGrid* mainGrid) { CVF_ASSERT(mainGrid); - CVF_ASSERT(this->reservoirData()); + CVF_ASSERT(this->eclipseCaseData()); - reservoirData()->setMainGrid(mainGrid); + eclipseCaseData()->setMainGrid(mainGrid); } //-------------------------------------------------------------------------------------------------- @@ -140,9 +146,9 @@ void RimEclipseStatisticsCase::setMainGrid(RigMainGrid* mainGrid) //-------------------------------------------------------------------------------------------------- bool RimEclipseStatisticsCase::openEclipseGridFile() { - if (this->reservoirData()) return true; + if (this->eclipseCaseData()) return true; - cvf::ref eclipseCase = new RigCaseData; + cvf::ref eclipseCase = new RigEclipseCaseData; CVF_ASSERT(parentStatisticsCaseCollection()); @@ -168,6 +174,15 @@ bool RimEclipseStatisticsCase::openEclipseGridFile() return true; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseStatisticsCase::reloadEclipseGridFile() +{ + setReservoirData(nullptr); + openReserviorCase(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -189,7 +204,7 @@ void RimEclipseStatisticsCase::populateResultSelectionAfterLoadingGrid() //-------------------------------------------------------------------------------------------------- void RimEclipseStatisticsCase::computeStatistics() { - if (this->reservoirData() == NULL) + if (this->eclipseCaseData() == NULL) { openEclipseGridFile(); } @@ -227,7 +242,7 @@ void RimEclipseStatisticsCase::computeStatistics() timeStepIndices.push_back(i); } - RigCaseData* resultCase = reservoirData(); + RigEclipseCaseData* resultCase = eclipseCaseData(); QList resultSpecification; @@ -338,12 +353,16 @@ void RimEclipseStatisticsCase::defineUiOrdering(QString uiConfigName, caf::PdmUi updatePercentileUiVisibility(); uiOrdering.add(&caseUserDescription); - uiOrdering.add(&caseId); + uiOrdering.add(&m_calculateEditCommand); - uiOrdering.add(&m_selectionSummary); - caf::PdmUiGroup * group = uiOrdering.addNewGroup("Properties to consider"); + caf::PdmUiGroup * group = uiOrdering.addNewGroup("Summary of Calculation Setup"); + group->add(&m_useZeroAsInactiveCellValue); + m_useZeroAsInactiveCellValue.uiCapability()->setUiHidden(hasComputedStatistics()); + group->add(&m_selectionSummary); + + group = uiOrdering.addNewGroup("Properties to consider"); group->setUiHidden(hasComputedStatistics()); group->add(&m_resultType); group->add(&m_porosityModel); @@ -356,8 +375,6 @@ void RimEclipseStatisticsCase::defineUiOrdering(QString uiConfigName, caf::PdmUi group->add(&m_selectedFractureGeneratedProperties); group->add(&m_selectedFractureInputProperties); - uiOrdering.add(&m_useZeroAsInactiveCellValue); - m_useZeroAsInactiveCellValue.uiCapability()->setUiHidden(hasComputedStatistics()); group = uiOrdering.addNewGroup("Percentile setup"); group->setUiHidden(hasComputedStatistics()); @@ -367,6 +384,11 @@ void RimEclipseStatisticsCase::defineUiOrdering(QString uiConfigName, caf::PdmUi group->add(&m_midPercentile); group->add(&m_highPercentile); + group = uiOrdering.addNewGroup("Case Options"); + group->add(&m_wellDataSourceCase); + group->add(&activeFormationNames); + group->add(&flipXAxis); + group->add(&flipYAxis); } QList toOptionList(const QStringList& varList) @@ -389,12 +411,12 @@ QList RimEclipseStatisticsCase::calculateValueOptions(co if (useOptionsOnly) *useOptionsOnly = true; RimIdenticalGridCaseGroup* idgcg = caseGroup(); - if (!(caseGroup() && caseGroup()->mainCase() && caseGroup()->mainCase()->reservoirData())) + if (!(caseGroup() && caseGroup()->mainCase() && caseGroup()->mainCase()->eclipseCaseData())) { return options; } - RigCaseData* caseData = idgcg->mainCase()->reservoirData(); + RigEclipseCaseData* caseData = idgcg->mainCase()->eclipseCaseData(); if (&m_selectedDynamicProperties == fieldNeedingOptions) { @@ -450,6 +472,7 @@ QList RimEclipseStatisticsCase::calculateValueOptions(co return toOptionList(sourceCaseNames); } + if (!options.size()) options = RimEclipseCase::calculateValueOptions(fieldNeedingOptions, useOptionsOnly); return options; } @@ -459,6 +482,8 @@ QList RimEclipseStatisticsCase::calculateValueOptions(co //-------------------------------------------------------------------------------------------------- void RimEclipseStatisticsCase::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) { + RimEclipseCase::fieldChangedByUi(changedField, oldValue, newValue); + if (&m_resultType == changedField || &m_porosityModel == changedField) { } @@ -485,9 +510,9 @@ void RimEclipseStatisticsCase::fieldChangedByUi(const caf::PdmFieldHandle* chang sourceResultCase->openEclipseGridFile(); // Propagate well info to statistics case - if (sourceResultCase->reservoirData()) + if (sourceResultCase->eclipseCaseData()) { - const cvf::Collection& sourceCaseWellResults = sourceResultCase->reservoirData()->wellResults(); + const cvf::Collection& sourceCaseWellResults = sourceResultCase->eclipseCaseData()->wellResults(); setWellResultsAndUpdateViews(sourceCaseWellResults); } } @@ -504,7 +529,7 @@ void RimEclipseStatisticsCase::fieldChangedByUi(const caf::PdmFieldHandle* chang //-------------------------------------------------------------------------------------------------- void RimEclipseStatisticsCase::setWellResultsAndUpdateViews(const cvf::Collection& sourceCaseWellResults) { - this->reservoirData()->setWellResults(sourceCaseWellResults); + this->eclipseCaseData()->setWellResults(sourceCaseWellResults); caf::ProgressInfo progInfo(reservoirViews().size() + 1, "Updating Well Data for Views"); @@ -588,13 +613,19 @@ void RimEclipseStatisticsCase::defineEditorAttribute(const caf::PdmFieldHandle* if (&m_selectionSummary == field) { caf::PdmUiTextEditorAttribute* textEditAttrib = dynamic_cast (attribute); - textEditAttrib->textMode = caf::PdmUiTextEditorAttribute::HTML; + if (textEditAttrib) + { + textEditAttrib->textMode = caf::PdmUiTextEditorAttribute::HTML; + } } if (&m_calculateEditCommand == field) { caf::PdmUiPushButtonEditorAttribute* attrib = dynamic_cast (attribute); - attrib->m_buttonText = hasComputedStatistics() ? "Edit (Will DELETE current results)": "Compute"; + if (attrib) + { + attrib->m_buttonText = hasComputedStatistics() ? "Edit (Will DELETE current results)": "Compute"; + } } } @@ -636,9 +667,9 @@ void RimEclipseStatisticsCase::updatePercentileUiVisibility() //-------------------------------------------------------------------------------------------------- bool RimEclipseStatisticsCase::hasComputedStatistics() const { - if ( reservoirData() - && ( reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)->resultCount() - || reservoirData()->results(RifReaderInterface::FRACTURE_RESULTS)->resultCount())) + if ( eclipseCaseData() + && ( eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)->resultCount() + || eclipseCaseData()->results(RifReaderInterface::FRACTURE_RESULTS)->resultCount())) { return true; } @@ -676,14 +707,14 @@ void RimEclipseStatisticsCase::updateConnectedEditorsAndReservoirViews() //-------------------------------------------------------------------------------------------------- void RimEclipseStatisticsCase::clearComputedStatistics() { - if (reservoirData() && reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)) + if (eclipseCaseData() && eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)) { - reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)->clearAllResults(); + eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)->clearAllResults(); } - if (reservoirData() && reservoirData()->results(RifReaderInterface::FRACTURE_RESULTS)) + if (eclipseCaseData() && eclipseCaseData()->results(RifReaderInterface::FRACTURE_RESULTS)) { - reservoirData()->results(RifReaderInterface::FRACTURE_RESULTS)->clearAllResults(); + eclipseCaseData()->results(RifReaderInterface::FRACTURE_RESULTS)->clearAllResults(); } updateConnectedEditorsAndReservoirViews(); @@ -700,7 +731,7 @@ void RimEclipseStatisticsCase::computeStatisticsAndUpdateViews() if (reservoirViews.size() == 0) { - RicNewViewFeature::addReservoirView(); + RicNewViewFeature::addReservoirView(this, nullptr); } } @@ -710,12 +741,12 @@ void RimEclipseStatisticsCase::computeStatisticsAndUpdateViews() void RimEclipseStatisticsCase::populateResultSelection() { RimIdenticalGridCaseGroup* idgcg = caseGroup(); - if (!(caseGroup() && caseGroup()->mainCase() && caseGroup()->mainCase()->reservoirData())) + if (!(caseGroup() && caseGroup()->mainCase() && caseGroup()->mainCase()->eclipseCaseData())) { return; } - RigCaseData* caseData = idgcg->mainCase()->reservoirData(); + RigEclipseCaseData* caseData = idgcg->mainCase()->eclipseCaseData(); if (m_selectedDynamicProperties().size() == 0) { diff --git a/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCase.h b/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCase.h index 68aa5854b3..9dd9d434b0 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCase.h +++ b/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCase.h @@ -20,14 +20,16 @@ #pragma once +#include "RimEclipseCase.h" +#include "RimDefines.h" + #include "cvfBase.h" #include "cvfObject.h" #include "cafPdmField.h" #include "cafPdmObject.h" #include "cafAppEnum.h" +#include "cvfCollection.h" -#include "RimEclipseCase.h" -#include "RimDefines.h" class RimIdenticalGridCaseGroup; class RimEclipseResultDefinition; @@ -59,6 +61,7 @@ class RimEclipseStatisticsCase : public RimEclipseCase void updateConnectedEditorsAndReservoirViews(); virtual bool openEclipseGridFile(); + virtual void reloadEclipseGridFile(); RimCaseCollection* parentStatisticsCaseCollection(); diff --git a/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCaseEvaluator.cpp b/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCaseEvaluator.cpp index f43aa7a128..5234ae4313 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCaseEvaluator.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCaseEvaluator.cpp @@ -21,7 +21,8 @@ #include "RimEclipseStatisticsCaseEvaluator.h" #include "RigCaseCellResultsData.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" +#include "RigMainGrid.h" #include "RigResultAccessorFactory.h" #include "RigResultModifier.h" #include "RigResultModifierFactory.h" @@ -43,11 +44,13 @@ void RimEclipseStatisticsCaseEvaluator::addNamedResult(RigCaseCellResultsData* d CVF_ASSERT(m_sourceCases.size() > 0); std::vector sourceTimeStepDates = m_sourceCases[0]->results(RifReaderInterface::MATRIX_RESULTS)->cellResults()->timeStepDates(0); + std::vector sourceDaysSinceSimulationStart = m_sourceCases[0]->results(RifReaderInterface::MATRIX_RESULTS)->cellResults()->daysSinceSimulationStart(0); + std::vector sourceReportStepNumbers = m_sourceCases[0]->results(RifReaderInterface::MATRIX_RESULTS)->cellResults()->reportStepNumbers(0); size_t destinationScalarResultIndex = destinationCellResults->addEmptyScalarResult(resultType, resultName, true); CVF_ASSERT(destinationScalarResultIndex != cvf::UNDEFINED_SIZE_T); - destinationCellResults->setTimeStepDates(destinationScalarResultIndex, sourceTimeStepDates); + destinationCellResults->setTimeStepDates(destinationScalarResultIndex, sourceTimeStepDates, sourceDaysSinceSimulationStart, sourceReportStepNumbers); std::vector< std::vector >& dataValues = destinationCellResults->cellScalarResults(destinationScalarResultIndex); dataValues.resize(sourceTimeStepDates.size()); @@ -161,7 +164,7 @@ void RimEclipseStatisticsCaseEvaluator::evaluateForResults(const QList& // Trigger loading of dataset sourceCase->results(poroModel)->findOrLoadScalarResultForTimeStep(resultType, resultName, dataAccessTimeStepIndex); - cvf::ref resultAccessor = RigResultAccessorFactory::createResultAccessor(sourceCase->reservoirData(), gridIdx, poroModel, dataAccessTimeStepIndex, resultName, resultType); + cvf::ref resultAccessor = RigResultAccessorFactory::createFromNameAndType(sourceCase->eclipseCaseData(), gridIdx, poroModel, dataAccessTimeStepIndex, resultName, resultType); if (resultAccessor.notNull()) { sourceDataAccessList.push_back(resultAccessor.p()); @@ -316,7 +319,7 @@ void RimEclipseStatisticsCaseEvaluator::evaluateForResults(const QList& //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimEclipseStatisticsCaseEvaluator::RimEclipseStatisticsCaseEvaluator(const std::vector& sourceCases, const std::vector& timeStepIndices, const RimStatisticsConfig& statisticsConfig, RigCaseData* destinationCase, RimIdenticalGridCaseGroup* identicalGridCaseGroup) +RimEclipseStatisticsCaseEvaluator::RimEclipseStatisticsCaseEvaluator(const std::vector& sourceCases, const std::vector& timeStepIndices, const RimStatisticsConfig& statisticsConfig, RigEclipseCaseData* destinationCase, RimIdenticalGridCaseGroup* identicalGridCaseGroup) : m_sourceCases(sourceCases), m_statisticsConfig(statisticsConfig), m_destinationCase(destinationCase), @@ -327,7 +330,7 @@ RimEclipseStatisticsCaseEvaluator::RimEclipseStatisticsCaseEvaluator(const std:: { if (sourceCases.size() > 0) { - m_reservoirCellCount = sourceCases[0]->reservoirData()->mainGrid()->globalCellArray().size(); + m_reservoirCellCount = sourceCases[0]->eclipseCaseData()->mainGrid()->globalCellArray().size(); } CVF_ASSERT(m_destinationCase); diff --git a/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCaseEvaluator.h b/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCaseEvaluator.h index 3b24b093b6..73ef9aaa23 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCaseEvaluator.h +++ b/ApplicationCode/ProjectDataModel/RimEclipseStatisticsCaseEvaluator.h @@ -28,7 +28,7 @@ class RimEclipseCase; -class RigCaseData; +class RigEclipseCaseData; class RigCaseCellResultsData; @@ -59,7 +59,7 @@ class RimEclipseStatisticsCaseEvaluator RimEclipseStatisticsCaseEvaluator(const std::vector& sourceCases, const std::vector& timeStepIndices, const RimStatisticsConfig& statisticsConfig, - RigCaseData* destinationCase, + RigEclipseCaseData* destinationCase, RimIdenticalGridCaseGroup* identicalGridCaseGroup); struct ResSpec @@ -90,7 +90,7 @@ class RimEclipseStatisticsCaseEvaluator size_t m_reservoirCellCount; RimStatisticsConfig m_statisticsConfig; - RigCaseData* m_destinationCase; + RigEclipseCaseData* m_destinationCase; RimIdenticalGridCaseGroup* m_identicalGridCaseGroup; bool m_useZeroAsInactiveCellValue; }; diff --git a/ApplicationCode/ProjectDataModel/RimEclipseView.cpp b/ApplicationCode/ProjectDataModel/RimEclipseView.cpp index 4a7c8af8a7..beca825a54 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseView.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseView.cpp @@ -23,28 +23,35 @@ #include "RiaApplication.h" #include "RiaPreferences.h" +#include "RigActiveCellInfo.h" #include "RigCaseCellResultsData.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" +#include "RigFlowDiagResults.h" #include "RigFormationNames.h" +#include "RigMainGrid.h" #include "RigResultAccessor.h" #include "RigResultAccessorFactory.h" +#include "RigSingleWellResultsData.h" #include "Rim3dOverlayInfoConfig.h" #include "RimCellEdgeColors.h" #include "RimCellRangeFilterCollection.h" -#include "RimIntersection.h" -#include "RimIntersectionCollection.h" #include "RimEclipseCase.h" #include "RimEclipseCellColors.h" #include "RimEclipseFaultColors.h" #include "RimEclipsePropertyFilterCollection.h" +#include "RimEclipseResultDefinition.h" #include "RimEclipseWell.h" #include "RimEclipseWellCollection.h" #include "RimFaultCollection.h" +#include "RimFlowDiagSolution.h" #include "RimGridCollection.h" +#include "RimIntersection.h" +#include "RimIntersectionCollection.h" #include "RimLegendConfig.h" #include "RimOilField.h" #include "RimProject.h" +#include "RimReservoirCellResultsStorage.h" #include "RimTernaryLegendConfig.h" #include "RimViewController.h" #include "RimViewLinker.h" @@ -54,7 +61,8 @@ #include "RiuSelectionManager.h" #include "RiuViewer.h" -#include "RivReservoirPipesPartMgr.h" +#include "RivReservoirSimWellsPartMgr.h" +#include "RivReservoirViewPartMgr.h" #include "RivSingleCellPartGenerator.h" #include "RivTernarySaturationOverlayItem.h" #include "RivWellPathCollectionPartMgr.h" @@ -123,15 +131,14 @@ RimEclipseView::RimEclipseView() this->cellResult()->setReservoirView(this); this->cellEdgeResult()->setReservoirView(this); - this->cellEdgeResult()->legendConfig()->setReservoirView(this); this->cellEdgeResult()->legendConfig()->setColorRangeMode(RimLegendConfig::PINK_WHITE); this->faultResultSettings()->setReservoirView(this); m_reservoirGridPartManager = new RivReservoirViewPartMgr(this); - - m_pipesPartManager = new RivReservoirPipesPartMgr(this); - m_reservoir = NULL; + m_simWellsPartManager = new RivReservoirSimWellsPartMgr(this); + + m_eclipseCase = NULL; } //-------------------------------------------------------------------------------------------------- @@ -149,29 +156,9 @@ RimEclipseView::~RimEclipseView() m_reservoirGridPartManager->clearGeometryCache(); - m_reservoir = NULL; + m_eclipseCase = NULL; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimEclipseView::updateViewerWidgetWindowTitle() -{ - if (m_viewer) - { - QString windowTitle; - if (m_reservoir.notNull()) - { - windowTitle = QString("%1 - %2").arg(m_reservoir->caseUserDescription()).arg(name); - } - else - { - windowTitle = name; - } - - m_viewer->layoutWidget()->setWindowTitle(windowTitle); - } -} //-------------------------------------------------------------------------------------------------- /// Clamp the current timestep to actual possibilities @@ -196,34 +183,7 @@ void RimEclipseView::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c { RimView::fieldChangedByUi(changedField, oldValue, newValue); - if (changedField == &showWindow) - { - if (showWindow) - { - bool generateDisplayModel = (viewer() == NULL); - updateViewerWidget(); - - if (generateDisplayModel) - { - updateDisplayModelForWellResults(); - } - } - else - { - if (m_viewer) - { - this->setMdiWindowGeometry( RiuMainWindow::instance()->windowGeometryForViewer(m_viewer->layoutWidget())); - - RiuMainWindow::instance()->removeViewer(m_viewer->layoutWidget()); - delete m_viewer; - m_viewer = NULL; - } - } - - this->updateUiIconFromToggleField(); - } - - else if (changedField == &showInvalidCells) + if (changedField == &showInvalidCells) { this->scheduleGeometryRegen(INACTIVE); this->scheduleGeometryRegen(RANGE_FILTERED_INACTIVE); @@ -266,7 +226,7 @@ void RimEclipseView::updateScaleTransform() scale(2, 2) = scaleZ(); this->scaleTransform()->setLocalTransform(scale); - m_pipesPartManager->setScaleTransform(this->scaleTransform()); + m_simWellsPartManager->setScaleTransform(this->scaleTransform()); if (m_viewer) m_viewer->updateCachedValuesInScene(); } @@ -288,7 +248,7 @@ void RimEclipseView::createDisplayModel() RiuMainWindow::instance()->setResultInfo(QString("RimReservoirView::createDisplayModel() ") + QString::number(callCount++)); #endif - if (!(m_reservoir && m_reservoir->reservoirData())) return; + if (!(m_eclipseCase && m_eclipseCase->eclipseCaseData())) return; // Define a vector containing time step indices to produce geometry for. // First entry in this vector is used to define the geometry only result mode with no results. @@ -388,6 +348,10 @@ void RimEclipseView::createDisplayModel() } } + // NOTE: This assignment must be done here, as m_visibleGridParts is used in code triggered by + // m_reservoirGridPartManager->appendStaticGeometryPartsToModel() + m_visibleGridParts = geometryTypesToAdd; + size_t frameIdx; for (frameIdx = 0; frameIdx < frameModels.size(); ++frameIdx) { @@ -399,8 +363,6 @@ void RimEclipseView::createDisplayModel() // Set static colors this->updateStaticCellColors(); - - m_visibleGridParts = geometryTypesToAdd; } m_reservoirGridPartManager->clearWatertightGeometryFlags(); @@ -461,14 +423,18 @@ void RimEclipseView::createDisplayModel() */ // Well path model - RigMainGrid* mainGrid = eclipseCase()->reservoirData()->mainGrid(); m_wellPathPipeVizModel->removeAllParts(); - addWellPathsToModel(m_wellPathPipeVizModel.p(), - mainGrid->displayModelOffset(), - mainGrid->characteristicIJCellSize(), - currentActiveCellInfo()->geometryBoundingBox(), - m_reservoirGridPartManager->scaleTransform()); + + RigMainGrid* mainGrid = this->mainGrid(); + if (mainGrid) + { + addWellPathsToModel(m_wellPathPipeVizModel.p(), + mainGrid->displayModelOffset(), + mainGrid->characteristicIJCellSize(), + currentActiveCellInfo()->geometryBoundingBox(), + m_reservoirGridPartManager->scaleTransform()); + } m_viewer->addStaticModelOnce(m_wellPathPipeVizModel.p()); @@ -495,7 +461,6 @@ void RimEclipseView::createDisplayModel() if (frameModels.size() > 1 && this->hasUserRequestedAnimation()) { - m_viewer->animationControl()->setCurrentFrameOnly(m_currentTimeStep); m_viewer->setCurrentFrame(m_currentTimeStep); } else @@ -510,6 +475,8 @@ void RimEclipseView::createDisplayModel() //-------------------------------------------------------------------------------------------------- void RimEclipseView::updateCurrentTimeStep() { + m_propertyFilterCollection()->updateFromCurrentTimeStep(); + updateLegends(); // To make sure the scalar mappers are set up correctly std::vector geometriesToRecolor; @@ -650,29 +617,31 @@ void RimEclipseView::updateCurrentTimeStep() crossSectionCollection->applySingleColorEffect(); } - // Simulation Well pipes + // Simulation Wells if (m_viewer) { cvf::Scene* frameScene = m_viewer->frame(m_currentTimeStep); if (frameScene) { - // Simulation Well pipes - - cvf::ref wellPipeModelBasicList = new cvf::ModelBasicList; - wellPipeModelBasicList->setName("SimWellPipeMod"); + cvf::ref simWellModelBasicList = new cvf::ModelBasicList; + simWellModelBasicList->setName("SimWellPipeMod"); - m_pipesPartManager->appendDynamicGeometryPartsToModel(wellPipeModelBasicList.p(), m_currentTimeStep); + m_simWellsPartManager->appendDynamicGeometryPartsToModel(simWellModelBasicList.p(), m_currentTimeStep); - wellPipeModelBasicList->updateBoundingBoxesRecursive(); + simWellModelBasicList->updateBoundingBoxesRecursive(); - this->removeModelByName(frameScene, wellPipeModelBasicList->name()); - frameScene->addModel(wellPipeModelBasicList.p()); + this->removeModelByName(frameScene, simWellModelBasicList->name()); + frameScene->addModel(simWellModelBasicList.p()); - m_pipesPartManager->updatePipeResultColor(m_currentTimeStep); + m_simWellsPartManager->updatePipeResultColor(m_currentTimeStep); } } m_overlayInfoConfig()->update3DInfo(); + + // Invisible Wells are marked as read only when "show wells intersecting visible cells" is enabled + // Visibility of wells differ betweeen time steps, so trigger a rebuild of tree state items + wellCollection->updateConnectedEditors(); } //-------------------------------------------------------------------------------------------------- @@ -682,13 +651,13 @@ void RimEclipseView::loadDataAndUpdate() { updateScaleTransform(); - if (m_reservoir) + if (m_eclipseCase) { - if (!m_reservoir->openReserviorCase()) + if (!m_eclipseCase->openReserviorCase()) { QMessageBox::warning(RiuMainWindow::instance(), "Error when opening project file", - "Could not open the Eclipse Grid file: \n"+ m_reservoir->gridFileName()); + "Could not open the Eclipse Grid file: \n"+ m_eclipseCase->gridFileName()); this->setEclipseCase( NULL); return; } @@ -701,9 +670,8 @@ void RimEclipseView::loadDataAndUpdate() this->cellEdgeResult()->loadResult(); this->faultResultSettings()->customFaultResult()->loadResult(); - this->faultResultSettings()->updateFieldVisibility(); - updateViewerWidget(); + updateMdiWindowVisibility(); this->m_propertyFilterCollection()->loadAndInitializePropertyFilters(); @@ -711,6 +679,7 @@ void RimEclipseView::loadDataAndUpdate() this->faultCollection()->syncronizeFaults(); m_reservoirGridPartManager->clearGeometryCache(); + m_simWellsPartManager->clearGeometryCache(); syncronizeWellsWithResults(); @@ -725,6 +694,8 @@ void RimEclipseView::loadDataAndUpdate() //-------------------------------------------------------------------------------------------------- void RimEclipseView::initAfterRead() { + RimViewWindow::initAfterRead(); + this->faultResultSettings()->setReservoirView(this); this->cellResult()->setReservoirView(this); this->cellEdgeResult()->setReservoirView(this); @@ -828,6 +799,13 @@ void RimEclipseView::updateDisplayModelVisibility() m_viewer->update(); faultCollection->updateConnectedEditors(); + + // This is required to update the read-only state of simulation wells + // when a range filter is manipulated and visible simulation wells might change + // + // The visibility is controlled by RimEclipseWell::defineUiTreeOrdering + // updateConnectedEditors will call recursively on child objects + wellCollection->updateConnectedEditors(); } //-------------------------------------------------------------------------------------------------- @@ -835,11 +813,11 @@ void RimEclipseView::updateDisplayModelVisibility() //-------------------------------------------------------------------------------------------------- RimReservoirCellResultsStorage* RimEclipseView::currentGridCellResults() { - if (m_reservoir) + if (m_eclipseCase) { RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResult->porosityModel()); - return m_reservoir->results(porosityModel); + return m_eclipseCase->results(porosityModel); } return NULL; @@ -850,13 +828,13 @@ RimReservoirCellResultsStorage* RimEclipseView::currentGridCellResults() //-------------------------------------------------------------------------------------------------- RigActiveCellInfo* RimEclipseView::currentActiveCellInfo() { - if (m_reservoir && - m_reservoir->reservoirData() + if (m_eclipseCase && + m_eclipseCase->eclipseCaseData() ) { RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResult->porosityModel()); - return m_reservoir->reservoirData()->activeCellInfo(porosityModel); + return m_eclipseCase->eclipseCaseData()->activeCellInfo(porosityModel); } return NULL; @@ -893,9 +871,9 @@ void RimEclipseView::scheduleReservoirGridGeometryRegen() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimEclipseView::schedulePipeGeometryRegen() +void RimEclipseView::scheduleSimWellGeometryRegen() { - m_pipesPartManager->scheduleGeometryRegen(); + m_simWellsPartManager->scheduleGeometryRegen(); } @@ -908,9 +886,9 @@ void RimEclipseView::indicesToVisibleGrids(std::vector* gridIndices) // Create vector of grid indices to render std::vector grids; - if (this->m_reservoir && this->m_reservoir->reservoirData() ) + if (this->m_eclipseCase && this->m_eclipseCase->eclipseCaseData() ) { - this->m_reservoir->reservoirData()->allGrids(&grids); + this->m_eclipseCase->eclipseCaseData()->allGrids(&grids); } size_t i; @@ -933,12 +911,12 @@ void RimEclipseView::updateLegends() m_viewer->removeAllColorLegends(); } - if (!m_reservoir || !m_viewer || !m_reservoir->reservoirData() ) + if (!m_eclipseCase || !m_viewer || !m_eclipseCase->eclipseCaseData() ) { return; } - RigCaseData* eclipseCase = m_reservoir->reservoirData(); + RigEclipseCaseData* eclipseCase = m_eclipseCase->eclipseCaseData(); CVF_ASSERT(eclipseCase); RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResult()->porosityModel()); @@ -946,6 +924,7 @@ void RimEclipseView::updateLegends() CVF_ASSERT(results); updateMinMaxValuesAndAddLegendToView(QString("Cell Results: \n"), this->cellResult(), results); + if (this->faultResultSettings()->showCustomFaultResult() && this->faultResultSettings()->hasValidCustomResult()) { updateMinMaxValuesAndAddLegendToView(QString("Fault Results: \n"), this->currentFaultResultColors(), results); @@ -953,29 +932,36 @@ void RimEclipseView::updateLegends() if (this->cellEdgeResult()->hasResult()) { - double globalMin, globalMax; - double globalPosClosestToZero, globalNegClosestToZero; - this->cellEdgeResult()->minMaxCellEdgeValues(globalMin, globalMax); - this->cellEdgeResult()->posNegClosestToZero(globalPosClosestToZero, globalNegClosestToZero); + if (this->cellEdgeResult()->isUsingSingleVariable()) + { + this->cellEdgeResult()->singleVarEdgeResultColors()->updateLegendData(m_currentTimeStep); + } + else + { + double globalMin, globalMax; + double globalPosClosestToZero, globalNegClosestToZero; + this->cellEdgeResult()->minMaxCellEdgeValues(globalMin, globalMax); + this->cellEdgeResult()->posNegClosestToZero(globalPosClosestToZero, globalNegClosestToZero); - this->cellEdgeResult()->legendConfig()->setClosestToZeroValues(globalPosClosestToZero, globalNegClosestToZero, globalPosClosestToZero, globalNegClosestToZero); - this->cellEdgeResult()->legendConfig()->setAutomaticRanges(globalMin, globalMax, globalMin, globalMax); + this->cellEdgeResult()->legendConfig()->setClosestToZeroValues(globalPosClosestToZero, globalNegClosestToZero, globalPosClosestToZero, globalNegClosestToZero); + this->cellEdgeResult()->legendConfig()->setAutomaticRanges(globalMin, globalMax, globalMin, globalMax); - if (this->cellEdgeResult()->hasCategoryResult()) - { - if(cellEdgeResult()->singleVarEdgeResultColors()->resultType() != RimDefines::FORMATION_NAMES) - { - cellEdgeResult()->legendConfig()->setIntegerCategories(results->uniqueCellScalarValues(cellEdgeResult()->singleVarEdgeResultColors()->scalarResultIndex())); - } - else + if (this->cellEdgeResult()->hasCategoryResult()) { - const std::vector& fnVector = eclipseCase->activeFormationNames()->formationNames(); - cellEdgeResult()->legendConfig()->setNamedCategoriesInverse(fnVector); + if(cellEdgeResult()->singleVarEdgeResultColors()->resultType() != RimDefines::FORMATION_NAMES) + { + cellEdgeResult()->legendConfig()->setIntegerCategories(results->uniqueCellScalarValues(cellEdgeResult()->singleVarEdgeResultColors()->scalarResultIndex())); + } + else + { + const std::vector& fnVector = eclipseCase->activeFormationNames()->formationNames(); + cellEdgeResult()->legendConfig()->setNamedCategoriesInverse(fnVector); + } } } m_viewer->addColorLegendToBottomLeftCorner(this->cellEdgeResult()->legendConfig()->legend()); - this->cellEdgeResult()->legendConfig()->setTitle(cvfqt::Utils::toString(QString("Edge Results: \n") + this->cellEdgeResult()->resultVariable())); + this->cellEdgeResult()->legendConfig()->setTitle(cvfqt::Utils::toString(QString("Edge Results: \n") + this->cellEdgeResult()->resultVariableUiShortName())); } else { @@ -991,50 +977,12 @@ void RimEclipseView::updateMinMaxValuesAndAddLegendToView(QString legendLabel, R { if (resultColors->hasResult()) { - double globalMin, globalMax; - double globalPosClosestToZero, globalNegClosestToZero; - cellResultsData->minMaxCellScalarValues(resultColors->scalarResultIndex(), globalMin, globalMax); - cellResultsData->posNegClosestToZero(resultColors->scalarResultIndex(), globalPosClosestToZero, globalNegClosestToZero); - - double localMin, localMax; - double localPosClosestToZero, localNegClosestToZero; - if (resultColors->hasDynamicResult()) - { - cellResultsData->minMaxCellScalarValues(resultColors->scalarResultIndex(), m_currentTimeStep, localMin, localMax); - cellResultsData->posNegClosestToZero(resultColors->scalarResultIndex(), m_currentTimeStep, localPosClosestToZero, localNegClosestToZero); - } - else - { - localMin = globalMin; - localMax = globalMax; - - localPosClosestToZero = globalPosClosestToZero; - localNegClosestToZero = globalNegClosestToZero; - } - - CVF_ASSERT(resultColors->legendConfig()); - - resultColors->legendConfig()->setClosestToZeroValues(globalPosClosestToZero, globalNegClosestToZero, localPosClosestToZero, localNegClosestToZero); - resultColors->legendConfig()->setAutomaticRanges(globalMin, globalMax, localMin, localMax); - - if (resultColors->hasCategoryResult()) - { - if(resultColors->resultType() != RimDefines::FORMATION_NAMES) - { - resultColors->legendConfig()->setIntegerCategories(cellResultsData->uniqueCellScalarValues(resultColors->scalarResultIndex())); - } - else - { - const std::vector& fnVector = eclipseCase()->reservoirData()->activeFormationNames()->formationNames(); - resultColors->legendConfig()->setNamedCategoriesInverse(fnVector); - } - } + resultColors->updateLegendData(m_currentTimeStep); m_viewer->addColorLegendToBottomLeftCorner(resultColors->legendConfig()->legend()); - resultColors->legendConfig()->setTitle(cvfqt::Utils::toString(legendLabel + resultColors->resultVariable())); + resultColors->legendConfig()->setTitle(cvfqt::Utils::toString(legendLabel + resultColors->resultVariableUiShortName())); } - size_t maxTimeStepCount = cellResultsData->maxTimeStepCount(); if (resultColors->isTernarySaturationSelected() && maxTimeStepCount > 1) { @@ -1100,7 +1048,7 @@ void RimEclipseView::updateMinMaxValuesAndAddLegendToView(QString legendLabel, R //-------------------------------------------------------------------------------------------------- void RimEclipseView::setEclipseCase(RimEclipseCase* reservoir) { - m_reservoir = reservoir; + m_eclipseCase = reservoir; cellResult()->setEclipseCase(reservoir); faultResultSettings()->customFaultResult()->setEclipseCase(reservoir); @@ -1110,9 +1058,9 @@ void RimEclipseView::setEclipseCase(RimEclipseCase* reservoir) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimEclipseCase* RimEclipseView::eclipseCase() +RimEclipseCase* RimEclipseView::eclipseCase() const { - return m_reservoir; + return m_eclipseCase; } //-------------------------------------------------------------------------------------------------- @@ -1130,9 +1078,9 @@ RimEclipseCase* RimEclipseView::eclipseCase() //-------------------------------------------------------------------------------------------------- void RimEclipseView::syncronizeWellsWithResults() { - if (!(m_reservoir && m_reservoir->reservoirData()) ) return; + if (!(m_eclipseCase && m_eclipseCase->eclipseCaseData()) ) return; - cvf::Collection wellResults = m_reservoir->reservoirData()->wellResults(); + cvf::Collection wellResults = m_eclipseCase->eclipseCaseData()->wellResults(); std::vector > newWells; @@ -1144,6 +1092,8 @@ void RimEclipseView::syncronizeWellsWithResults() well->setWellResults(NULL, -1); } + bool isAnyWellCreated = false; + // Find corresponding well from well result, or create a new for (size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx) @@ -1154,6 +1104,8 @@ void RimEclipseView::syncronizeWellsWithResults() { well = new RimEclipseWell; well->name = wellResults[wIdx]->m_wellName; + + isAnyWellCreated = true; } newWells.push_back(well); @@ -1176,15 +1128,24 @@ void RimEclipseView::syncronizeWellsWithResults() // Set the new wells into the field. this->wellCollection()->wells().insert(0, newWells); - // Make sure all the wells have their reservoirView ptr setup correctly this->wellCollection()->setReservoirView(this); - for (size_t wIdx = 0; wIdx < this->wellCollection()->wells().size(); ++wIdx) + + // Sort wells before assigning colors, as the colors are distributed based on sorting + this->wellCollection()->sortWellsByName(); + + if (isAnyWellCreated) { - this->wellCollection()->wells()[wIdx]->setReservoirView(this); + this->wellCollection()->assignDefaultWellColors(); } +} - this->wellCollection()->sortWellsByName(); +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const RivReservoirViewPartMgr* RimEclipseView::reservoirGridPartManager() const +{ + return m_reservoirGridPartManager.p(); } //-------------------------------------------------------------------------------------------------- @@ -1201,9 +1162,6 @@ void RimEclipseView::calculateVisibleWellCellsIncFence(cvf::UByteArray* visibleC } visibleCells->setAll(false); - // If all wells are forced off, return - if (this->wellCollection()->wellCellsToRangeFilterMode() == RimEclipseWellCollection::RANGE_ADD_NONE) return; - RigActiveCellInfo* activeCellInfo = this->currentActiveCellInfo(); CVF_ASSERT(activeCellInfo); @@ -1212,7 +1170,7 @@ void RimEclipseView::calculateVisibleWellCellsIncFence(cvf::UByteArray* visibleC for (size_t wIdx = 0; wIdx < this->wellCollection()->wells().size(); ++wIdx) { RimEclipseWell* well = this->wellCollection()->wells()[wIdx]; - if (this->wellCollection()->wellCellsToRangeFilterMode() == RimEclipseWellCollection::RANGE_ADD_ALL || (well->showWell() && well->showWellCells()) ) + if (well->isWellCellsVisible()) { RigSingleWellResultsData* wres = well->wellResults(); if (!wres) continue; @@ -1251,7 +1209,7 @@ void RimEclipseView::calculateVisibleWellCellsIncFence(cvf::UByteArray* visibleC (*visibleCells)[gridCellIndex] = true; // Calculate well fence cells - if (well->showWellCellFence() || this->wellCollection()->showWellCellFences()) + if (well->showWellCellFence()) { size_t i, j, k; grid->ijkFromCellIndex(gridCellIndex, &i, &j, &k); @@ -1303,7 +1261,7 @@ void RimEclipseView::calculateVisibleWellCellsIncFence(cvf::UByteArray* visibleC void RimEclipseView::updateDisplayModelForWellResults() { m_reservoirGridPartManager->clearGeometryCache(); - m_pipesPartManager->clearGeometryCache(); + m_simWellsPartManager->clearGeometryCache(); syncronizeWellsWithResults(); @@ -1323,17 +1281,17 @@ void RimEclipseView::updateDisplayModelForWellResults() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimEclipseView::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) +const std::vector& RimEclipseView::visibleGridParts() const { - caf::PdmUiGroup* viewGroup = uiOrdering.addNewGroup("Viewer"); - viewGroup->add(&name); - viewGroup->add(&backgroundColor); - viewGroup->add(&showGridBox); + return m_visibleGridParts; +} - caf::PdmUiGroup* gridGroup = uiOrdering.addNewGroup("Grid Appearance"); - gridGroup->add(&scaleZ); - gridGroup->add(&meshMode); - gridGroup->add(&surfaceMode); +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseView::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) +{ + RimView::defineUiOrdering(uiConfigName, uiOrdering); caf::PdmUiGroup* cellGroup = uiOrdering.addNewGroup("Cell Visibility"); cellGroup->add(&showMainGrid); @@ -1360,7 +1318,7 @@ void RimEclipseView::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering uiTreeOrdering.add(m_rangeFilterCollection()); uiTreeOrdering.add(m_propertyFilterCollection()); - uiTreeOrdering.setForgetRemainingFields(true); + uiTreeOrdering.skipRemainingChildren(true); } //-------------------------------------------------------------------------------------------------- @@ -1481,6 +1439,19 @@ RimCase* RimEclipseView::ownerCase() return eclipseCase(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigMainGrid* RimEclipseView::mainGrid() const +{ + if (eclipseCase() && eclipseCase()->eclipseCaseData()) + { + return eclipseCase()->eclipseCaseData()->mainGrid(); + } + + return nullptr; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -1527,20 +1498,20 @@ void RimEclipseView::setOverridePropertyFilterCollection(RimEclipsePropertyFilte //-------------------------------------------------------------------------------------------------- void RimEclipseView::calculateCurrentTotalCellVisibility(cvf::UByteArray* totalVisibility) { - size_t gridCount = this->eclipseCase()->reservoirData()->gridCount(); - size_t cellCount = this->eclipseCase()->reservoirData()->mainGrid()->globalCellArray().size(); + size_t gridCount = this->eclipseCase()->eclipseCaseData()->gridCount(); + size_t cellCount = this->mainGrid()->globalCellArray().size(); totalVisibility->resize(cellCount); totalVisibility->setAll(false); for (size_t gridIdx = 0; gridIdx < gridCount; ++gridIdx) { - RigGridBase * grid = this->eclipseCase()->reservoirData()->grid(gridIdx); + RigGridBase * grid = this->eclipseCase()->eclipseCaseData()->grid(gridIdx); int gridCellCount = static_cast(grid->cellCount()); for (size_t gpIdx = 0; gpIdx < m_visibleGridParts.size(); ++gpIdx) { - cvf::cref visibility = m_reservoirGridPartManager->cellVisibility(m_visibleGridParts[gpIdx], gridIdx, m_currentTimeStep); + const cvf::UByteArray* visibility = m_reservoirGridPartManager->cellVisibility(m_visibleGridParts[gpIdx], gridIdx, m_currentTimeStep); for (int lcIdx = 0; lcIdx < gridCellCount; ++ lcIdx) { @@ -1575,9 +1546,9 @@ void RimEclipseView::createPartCollectionFromSelection(cvf::Collectionm_view == this) { CVF_ASSERT(eclipseSelItem->m_view->eclipseCase()); - CVF_ASSERT(eclipseSelItem->m_view->eclipseCase()->reservoirData()); + CVF_ASSERT(eclipseSelItem->m_view->eclipseCase()->eclipseCaseData()); - RivSingleCellPartGenerator partGen(eclipseSelItem->m_view->eclipseCase()->reservoirData(), eclipseSelItem->m_gridIndex, eclipseSelItem->m_cellIndex); + RivSingleCellPartGenerator partGen(eclipseSelItem->m_view->eclipseCase()->eclipseCaseData(), eclipseSelItem->m_gridIndex, eclipseSelItem->m_cellIndex); cvf::ref part = partGen.createPart(eclipseSelItem->m_color); part->setTransform(this->scaleTransform()); diff --git a/ApplicationCode/ProjectDataModel/RimEclipseView.h b/ApplicationCode/ProjectDataModel/RimEclipseView.h index 30abe0e99d..3903e52a43 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseView.h +++ b/ApplicationCode/ProjectDataModel/RimEclipseView.h @@ -33,13 +33,13 @@ #include "cafPdmFieldCvfColor.h" #include "cafPdmFieldCvfMat4d.h" -#include "RivReservoirViewPartMgr.h" #include "RimView.h" class RigActiveCellInfo; class RigCaseCellResultsData; class RigGridBase; class RigGridCellFaceVisibilityFilter; +class RigMainGrid; class Rim3dOverlayInfoConfig; class RimEclipseCase; class RimCellEdgeColors; @@ -54,8 +54,9 @@ class RimReservoirCellResultsStorage; class RimEclipseCellColors; class RimEclipseWellCollection; class RiuViewer; -class RivReservoirPipesPartMgr; +class RivReservoirSimWellsPartMgr; class RivIntersectionPartMgr; +class RivReservoirViewPartMgr; namespace cvf { @@ -86,12 +87,12 @@ class RimEclipseView : public RimView // Fields containing child objects : - caf::PdmChildField cellResult; - caf::PdmChildField cellEdgeResult; - caf::PdmChildField faultResultSettings; - - caf::PdmChildField wellCollection; - caf::PdmChildField faultCollection; + caf::PdmChildField cellResult; + caf::PdmChildField cellEdgeResult; + caf::PdmChildField faultResultSettings; + + caf::PdmChildField wellCollection; + caf::PdmChildField faultCollection; // Fields @@ -111,9 +112,11 @@ class RimEclipseView : public RimView RimEclipseCellColors* currentFaultResultColors(); void setEclipseCase(RimEclipseCase* reservoir); - RimEclipseCase* eclipseCase(); + RimEclipseCase* eclipseCase() const; virtual RimCase* ownerCase(); + RigMainGrid* mainGrid() const; + // Display model generation virtual void loadDataAndUpdate(); @@ -121,11 +124,11 @@ class RimEclipseView : public RimView virtual void scheduleGeometryRegen(RivCellSetEnum geometryType); void scheduleReservoirGridGeometryRegen(); - void schedulePipeGeometryRegen(); + void scheduleSimWellGeometryRegen(); void updateDisplayModelForWellResults(); - const std::vector& visibleGridParts() const { return m_visibleGridParts;} - cvf::cref reservoirGridPartManager() const { return m_reservoirGridPartManager.p(); } + const std::vector& visibleGridParts() const; + const RivReservoirViewPartMgr* reservoirGridPartManager() const; // Does this belong here, really ? void calculateVisibleWellCellsIncFence(cvf::UByteArray* visibleCells, RigGridBase * grid); @@ -160,7 +163,6 @@ class RimEclipseView : public RimView void updateLegends(); void updateMinMaxValuesAndAddLegendToView(QString legendLabel, RimEclipseCellColors* resultColors, RigCaseCellResultsData* cellResultsData); virtual void resetLegendsInViewer(); - virtual void updateViewerWidgetWindowTitle(); std::set allVisibleFaultGeometryTypes() const; void updateFaultColors(); @@ -174,11 +176,11 @@ class RimEclipseView : public RimView caf::PdmChildField m_propertyFilterCollection; caf::PdmPointer m_overridePropertyFilterCollection; - caf::PdmPointer m_reservoir; + caf::PdmPointer m_eclipseCase; cvf::ref m_reservoirGridPartManager; - cvf::ref m_pipesPartManager; - + cvf::ref m_simWellsPartManager; + std::vector m_visibleGridParts; }; diff --git a/ApplicationCode/ProjectDataModel/RimEclipseWell.cpp b/ApplicationCode/ProjectDataModel/RimEclipseWell.cpp index 2472ccef0f..ae663e2e13 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseWell.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseWell.cpp @@ -20,11 +20,24 @@ #include "RimEclipseWell.h" -#include "RimIntersectionCollection.h" +#include "RigSimulationWellCenterLineCalculator.h" +#include "RigSingleWellResultsData.h" + +#include "RimCellRangeFilterCollection.h" #include "RimEclipseView.h" #include "RimEclipseWellCollection.h" +#include "RimIntersectionCollection.h" + +#include "RiuMainWindow.h" + +#include "RivReservoirViewPartMgr.h" #include "cvfMath.h" +#include "RigCell.h" +#include "RimEclipseCase.h" +#include "RigEclipseCaseData.h" +#include "RigMainGrid.h" +#include "RigActiveCellInfo.h" CAF_PDM_SOURCE_INIT(RimEclipseWell, "Well"); @@ -35,25 +48,23 @@ RimEclipseWell::RimEclipseWell() { CAF_PDM_InitObject("Well", ":/Well.png", "", ""); - CAF_PDM_InitFieldNoDefault(&name, "WellName", "Name", "", "", ""); - CAF_PDM_InitField(&showWell, "ShowWell", true, "Show well ", "", "", ""); - showWell.uiCapability()->setUiHidden(true); + CAF_PDM_InitFieldNoDefault(&name, "WellName", "Name", "", "", ""); - CAF_PDM_InitField(&showWellLabel, "ShowWellLabel", true, "Show well label", "", "", ""); + CAF_PDM_InitField(&showWell, "ShowWell", true, "Show well ", "", "", ""); - CAF_PDM_InitField(&showWellPipes, "ShowWellPipe", true, "Show well pipe", "", "", ""); - CAF_PDM_InitField(&pipeRadiusScaleFactor, "WellPipeRadiusScale",1.0, "Pipe radius scale", "", "", ""); - CAF_PDM_InitField(&wellPipeColor, "WellPipeColor", cvf::Color3f(0.588f, 0.588f, 0.804f), "Well pipe color", "", "", ""); + CAF_PDM_InitField(&showWellLabel, "ShowWellLabel", true, "Label", "", "", ""); + CAF_PDM_InitField(&showWellHead, "ShowWellHead", true, "Well Head", "", "", ""); + CAF_PDM_InitField(&showWellPipe, "ShowWellPipe", true, "Pipe", "", "", ""); + CAF_PDM_InitField(&showWellSpheres, "ShowWellSpheres", false, "Spheres", "", "", ""); - CAF_PDM_InitField(&showWellCells, "ShowWellCells", true, "Add cells to range filter", "", "", ""); - CAF_PDM_InitField(&showWellCellFence, "ShowWellCellFence", false, "Use well fence", "", "", ""); + CAF_PDM_InitField(&wellHeadScaleFactor, "WellHeadScaleFactor", 1.0, "Well Head Scale", "", "", ""); + CAF_PDM_InitField(&pipeScaleFactor, "WellPipeRadiusScale", 1.0, "Pipe Radius Scale", "", "", ""); + CAF_PDM_InitField(&wellPipeColor, "WellPipeColor", cvf::Color3f(0.588f, 0.588f, 0.804f), "Pipe Color", "", "", ""); - name.uiCapability()->setUiHidden(true); - name.uiCapability()->setUiReadOnly(true); + CAF_PDM_InitField(&showWellCells, "ShowWellCells", false, "Well Cells", "", "", ""); + CAF_PDM_InitField(&showWellCellFence, "ShowWellCellFence", false, "Well Cell Fence", "", "", ""); m_resultWellIndex = cvf::UNDEFINED_SIZE_T; - - m_reservoirView = NULL; } //-------------------------------------------------------------------------------------------------- @@ -74,82 +85,355 @@ caf::PdmFieldHandle* RimEclipseWell::userDescriptionField() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimEclipseWell::setReservoirView(RimEclipseView* ownerReservoirView) +void RimEclipseWell::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) { - m_reservoirView = ownerReservoirView; + RimEclipseView* reservoirView = nullptr; + this->firstAncestorOrThisOfType(reservoirView); + if (reservoirView) + { + if (&showWellLabel == changedField || + &showWellHead == changedField || + &showWellPipe == changedField || + &showWellSpheres == changedField || + &wellPipeColor == changedField) + { + reservoirView->scheduleCreateDisplayModelAndRedraw(); + } + else if (&showWell == changedField || + &showWellCells == changedField || + &showWellCellFence == changedField) + + { + reservoirView->scheduleGeometryRegen(VISIBLE_WELL_CELLS); + reservoirView->scheduleCreateDisplayModelAndRedraw(); + } + else if ( &pipeScaleFactor == changedField + || &wellHeadScaleFactor == changedField) + { + if (reservoirView) + { + reservoirView->scheduleSimWellGeometryRegen(); + reservoirView->scheduleCreateDisplayModelAndRedraw(); + } + } + } + + RimEclipseWellCollection* wellColl = nullptr; + this->firstAncestorOrThisOfType(wellColl); + if (wellColl) + { + wellColl->updateStateForVisibilityCheckboxes(); + + RiuMainWindow::instance()->refreshDrawStyleActions(); + } + + if (changedField == &wellPipeColor) + { + RimEclipseWellCollection::updateWellAllocationPlots(); + } } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimEclipseWell::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) +caf::PdmFieldHandle* RimEclipseWell::objectToggleField() { - if (&showWellLabel == changedField) + return &showWell; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseWell::calculateWellPipeStaticCenterLine(std::vector< std::vector >& pipeBranchesCLCoords, + std::vector< std::vector >& pipeBranchesCellIds) +{ + RigSimulationWellCenterLineCalculator::calculateWellPipeStaticCenterline(this, pipeBranchesCLCoords, pipeBranchesCellIds); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseWell::calculateWellPipeDynamicCenterLine(size_t timeStepIdx, + std::vector< std::vector >& pipeBranchesCLCoords, + std::vector< std::vector >& pipeBranchesCellIds) +{ + RigSimulationWellCenterLineCalculator::calculateWellPipeDynamicCenterline(this, timeStepIdx, pipeBranchesCLCoords, pipeBranchesCellIds); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseWell::wellHeadTopBottomPosition(size_t frameIndex, cvf::Vec3d* top, cvf::Vec3d* bottom) +{ + + RimEclipseView* m_rimReservoirView; + firstAncestorOrThisOfTypeAsserted(m_rimReservoirView); + + RigEclipseCaseData* rigReservoir = m_rimReservoirView->eclipseCase()->eclipseCaseData(); + + if (!this->wellResults()->hasWellResult(frameIndex)) return; + + const RigWellResultFrame& wellResultFrame = this->wellResults()->wellResultFrame(frameIndex); + const RigCell& whCell = rigReservoir->cellFromWellResultCell(wellResultFrame.m_wellHead); + + // Match this position with pipe start position in RivWellPipesPartMgr::calculateWellPipeCenterline() + + (*bottom) = whCell.faceCenter(cvf::StructGridInterface::NEG_K); + + // Compute well head based on the z position of the top of the K column the well head is part of + (*top) = (*bottom); + if ( m_rimReservoirView->wellCollection()->wellHeadPosition() == RimEclipseWellCollection::WELLHEAD_POS_TOP_COLUMN ) { - if (m_reservoirView) + // Position well head at top active cell of IJ-column + + size_t i, j, k; + rigReservoir->mainGrid()->ijkFromCellIndex(whCell.mainGridCellIndex(), &i, &j, &k); + + size_t kIndexWellHeadCell = k; + k = 0; + + size_t topActiveCellIndex = rigReservoir->mainGrid()->cellIndexFromIJK(i, j, k); + while ( k < kIndexWellHeadCell && !m_rimReservoirView->currentActiveCellInfo()->isActive(topActiveCellIndex) ) { - m_reservoirView->scheduleCreateDisplayModelAndRedraw(); + k++; + topActiveCellIndex = rigReservoir->mainGrid()->cellIndexFromIJK(i, j, k); } - } - else if (&showWell == changedField) - { - if (m_reservoirView) + + const RigCell& topActiveCell = rigReservoir->mainGrid()->cell(topActiveCellIndex); + cvf::Vec3d topCellPos = topActiveCell.faceCenter(cvf::StructGridInterface::NEG_K); + + // Modify position if top active cell is closer to sea than well head + if ( kIndexWellHeadCell > k ) { - m_reservoirView->scheduleGeometryRegen(VISIBLE_WELL_CELLS); - m_reservoirView->scheduleCreateDisplayModelAndRedraw(); + top->z() = topCellPos.z(); } } - else if (&showWellCells == changedField) + else { - if (m_reservoirView) - { - m_reservoirView->scheduleGeometryRegen(VISIBLE_WELL_CELLS); - m_reservoirView->scheduleCreateDisplayModelAndRedraw(); - } + // Position well head at top of active cells bounding box + + cvf::Vec3d activeCellsBoundingBoxMax = m_rimReservoirView->currentActiveCellInfo()->geometryBoundingBox().max(); + top->z() = activeCellsBoundingBoxMax.z(); } - else if (&showWellCellFence == changedField) +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +double RimEclipseWell::pipeRadius() +{ + RimEclipseView* reservoirView; + firstAncestorOrThisOfTypeAsserted(reservoirView); + + RigEclipseCaseData* rigReservoir = reservoirView->eclipseCase()->eclipseCaseData(); + + double characteristicCellSize = rigReservoir->mainGrid()->characteristicIJCellSize(); + + double pipeRadius = reservoirView->wellCollection()->pipeScaleFactor() * this->pipeScaleFactor() * characteristicCellSize; + + return pipeRadius; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimEclipseWell::intersectsDynamicWellCellsFilteredCells(size_t frameIndex) const +{ + if (this->wellResults() == nullptr) return false; + + if (!wellResults()->hasWellResult(frameIndex)) return false; + + const RigWellResultFrame& wrsf = this->wellResults()->wellResultFrame(frameIndex); + + return intersectsWellCellsFilteredCells(wrsf, frameIndex); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimEclipseWell::intersectsWellCellsFilteredCells(const RigWellResultFrame &wrsf, size_t frameIndex) const +{ + RimEclipseView* reservoirView = nullptr; + this->firstAncestorOrThisOfType(reservoirView); + if (!reservoirView) return false; + + const std::vector& visGridParts = reservoirView->visibleGridParts(); + const RivReservoirViewPartMgr* rvMan = reservoirView->reservoirGridPartManager(); + + + for (const RivCellSetEnum& visGridPart : visGridParts) { - if (m_reservoirView) + if (visGridPart == ALL_WELL_CELLS + || visGridPart == VISIBLE_WELL_CELLS + || visGridPart == VISIBLE_WELL_FENCE_CELLS + || visGridPart == VISIBLE_WELL_CELLS_OUTSIDE_RANGE_FILTER + || visGridPart == VISIBLE_WELL_FENCE_CELLS_OUTSIDE_RANGE_FILTER + ) + { + // Exclude all cells related to well cells + continue; + } + + // First check the wellhead: + + size_t gridIndex = wrsf.m_wellHead.m_gridIndex; + size_t gridCellIndex = wrsf.m_wellHead.m_gridCellIndex; + + if (gridIndex != cvf::UNDEFINED_SIZE_T && gridCellIndex != cvf::UNDEFINED_SIZE_T) { - m_reservoirView->scheduleGeometryRegen(VISIBLE_WELL_CELLS); - m_reservoirView->scheduleCreateDisplayModelAndRedraw(); + const cvf::UByteArray* cellVisibility = rvMan->cellVisibility(visGridPart, gridIndex, frameIndex); + if (gridCellIndex < cellVisibility->size() && (*cellVisibility)[gridCellIndex]) + { + return true; + } } + // Then check the rest of the well, with all the branches + + const std::vector& wellResSegments = wrsf.m_wellResultBranches; + for (const RigWellResultBranch& branchSegment : wellResSegments) + { + const std::vector& wsResCells = branchSegment.m_branchResultPoints; + for (const RigWellResultPoint& wellResultPoint : wsResCells) + { + if (wellResultPoint.isCell()) + { + gridIndex = wellResultPoint.m_gridIndex; + gridCellIndex = wellResultPoint.m_gridCellIndex; + + const cvf::UByteArray* cellVisibility = rvMan->cellVisibility(visGridPart, gridIndex, frameIndex); + if (gridCellIndex < cellVisibility->size() && (*cellVisibility)[gridCellIndex]) + { + return true; + } + } + } + } } - else if (&showWellPipes == changedField) + + return false; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimEclipseWell::intersectsStaticWellCellsFilteredCells() const +{ + if (this->wellResults() == nullptr) return false; + + // NOTE: Read out static well cells, union of well cells across all time steps + const RigWellResultFrame& wrsf = this->wellResults()->staticWellCells(); + + // NOTE: Use first time step for visibility evaluation + size_t frameIndex = 0; + + return intersectsWellCellsFilteredCells(wrsf, frameIndex); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseWell::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) +{ + caf::PdmUiGroup* appearanceGroup = uiOrdering.addNewGroup("Visibility"); + appearanceGroup->add(&showWellLabel); + appearanceGroup->add(&showWellHead); + appearanceGroup->add(&showWellPipe); + appearanceGroup->add(&showWellSpheres); + + caf::PdmUiGroup* filterGroup = uiOrdering.addNewGroup("Well Cells and Fence"); + filterGroup->add(&showWellCells); + filterGroup->add(&showWellCellFence); + + showWellCellFence.uiCapability()->setUiReadOnly(!showWellCells()); + caf::PdmUiGroup* sizeScalingGroup = uiOrdering.addNewGroup("Size Scaling"); + sizeScalingGroup->add(&wellHeadScaleFactor); + sizeScalingGroup->add(&pipeScaleFactor); + + caf::PdmUiGroup* colorGroup = uiOrdering.addNewGroup("Colors"); + colorGroup->add(&wellPipeColor); + + uiOrdering.skipRemainingFields(true); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseWell::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/) +{ + const RimEclipseView* reservoirView = nullptr; + this->firstAncestorOrThisOfType(reservoirView); + if (!reservoirView) return; + + if (reservoirView->rangeFilterCollection() && !reservoirView->rangeFilterCollection()->hasActiveFilters()) { - if (m_reservoirView) m_reservoirView->scheduleCreateDisplayModelAndRedraw(); + this->uiCapability()->setUiReadOnly(false); + + return; } - else if (&wellPipeColor == changedField) + + const RimEclipseWellCollection* wellColl = nullptr; + this->firstAncestorOrThisOfType(wellColl); + if (!wellColl) return; + + if (wellColl->showWellsIntersectingVisibleCells() && !this->intersectsDynamicWellCellsFilteredCells(static_cast(reservoirView->currentTimeStep()))) { - if (m_reservoirView) m_reservoirView->scheduleCreateDisplayModelAndRedraw(); + // Mark well as read only if well is not intersecting visible cells + + this->uiCapability()->setUiReadOnly(true); } - else if (&pipeRadiusScaleFactor == changedField) + else { - if (m_reservoirView) - { - m_reservoirView->schedulePipeGeometryRegen(); - m_reservoirView->scheduleCreateDisplayModelAndRedraw(); - } + this->uiCapability()->setUiReadOnly(false); } } + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -caf::PdmFieldHandle* RimEclipseWell::objectToggleField() +bool RimEclipseWell::isWellCellsVisible() const { - return &showWell; + const RimEclipseView* reservoirView = nullptr; + this->firstAncestorOrThisOfType(reservoirView); + + if (reservoirView == nullptr) return false; + if (this->wellResults() == nullptr) return false; + + if (!reservoirView->wellCollection()->isActive()) + return false; + + if (!this->showWell()) + return false; + + if (!this->showWellCells()) + return false; + + if (reservoirView->crossSectionCollection()->hasActiveIntersectionForSimulationWell(this)) + return true; + + if (reservoirView->wellCollection()->showWellsIntersectingVisibleCells() + && reservoirView->rangeFilterCollection()->hasActiveFilters()) + { + return intersectsStaticWellCellsFilteredCells(); + } + else + { + return true; + } } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RimEclipseWell::calculateWellPipeVisibility(size_t frameIndex) +bool RimEclipseWell::isWellPipeVisible(size_t frameIndex) const { - if (m_reservoirView == NULL) return false; - if (this->wellResults() == NULL) return false; + const RimEclipseView* reservoirView = nullptr; + this->firstAncestorOrThisOfType(reservoirView); + + if (reservoirView == nullptr) return false; + if (this->wellResults() == nullptr) return false; if (frameIndex >= this->wellResults()->m_resultTimeStepIndexToWellTimeStepIndex.size()) { @@ -162,74 +446,72 @@ bool RimEclipseWell::calculateWellPipeVisibility(size_t frameIndex) return false; } - if (!m_reservoirView->wellCollection()->isActive()) + if (!reservoirView->wellCollection()->isActive()) return false; - if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimEclipseWellCollection::PIPES_FORCE_ALL_ON) - return true; - - if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimEclipseWellCollection::PIPES_FORCE_ALL_OFF) - return false; - - if ( this->showWell() == false ) + if (!this->showWell()) return false; - if ( this->showWellPipes() == false ) + if (!this->showWellPipe()) return false; - if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimEclipseWellCollection::PIPES_INDIVIDUALLY) - return true; - if (m_reservoirView->crossSectionCollection()->hasActiveIntersectionForSimulationWell(this)) + if (reservoirView->crossSectionCollection()->hasActiveIntersectionForSimulationWell(this)) return true; - if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimEclipseWellCollection::PIPES_OPEN_IN_VISIBLE_CELLS) + if (reservoirView->wellCollection()->showWellsIntersectingVisibleCells() + && reservoirView->rangeFilterCollection()->hasActiveFilters()) { - const std::vector& visGridParts = m_reservoirView->visibleGridParts(); - cvf::cref rvMan = m_reservoirView->reservoirGridPartManager(); + return intersectsDynamicWellCellsFilteredCells(frameIndex); + } + else + { + return true; + } +} - for (size_t gpIdx = 0; gpIdx < visGridParts.size(); ++gpIdx) - { - const RigWellResultFrame& wrsf = this->wellResults()->wellResultFrame(frameIndex); +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimEclipseWell::isWellSpheresVisible(size_t frameIndex) const +{ + const RimEclipseView* reservoirView = nullptr; + this->firstAncestorOrThisOfType(reservoirView); - // First check the wellhead: + if (reservoirView == nullptr) return false; + if (this->wellResults() == nullptr) return false; - size_t gridIndex = wrsf.m_wellHead.m_gridIndex; - size_t gridCellIndex = wrsf.m_wellHead.m_gridCellIndex; + if (frameIndex >= this->wellResults()->m_resultTimeStepIndexToWellTimeStepIndex.size()) + { + return false; + } - if (gridIndex != cvf::UNDEFINED_SIZE_T && gridCellIndex != cvf::UNDEFINED_SIZE_T) - { - cvf::cref cellVisibility = rvMan->cellVisibility(visGridParts[gpIdx], gridIndex, frameIndex); - if ((*cellVisibility)[gridCellIndex]) - { - return true; - } - } + size_t wellTimeStepIndex = this->wellResults()->m_resultTimeStepIndexToWellTimeStepIndex[frameIndex]; + if (wellTimeStepIndex == cvf::UNDEFINED_SIZE_T) + { + return false; + } - // Then check the rest of the well, with all the branches + if (!reservoirView->wellCollection()->isActive()) + return false; - const std::vector& wellResSegments = wrsf.m_wellResultBranches; - for (size_t wsIdx = 0; wsIdx < wellResSegments.size(); ++wsIdx) - { - const std::vector& wsResCells = wellResSegments[wsIdx].m_branchResultPoints; - for (size_t cIdx = 0; cIdx < wsResCells.size(); ++ cIdx) - { - if (wsResCells[cIdx].isCell()) - { - gridIndex = wsResCells[cIdx].m_gridIndex; - gridCellIndex = wsResCells[cIdx].m_gridCellIndex; - - cvf::cref cellVisibility = rvMan->cellVisibility(visGridParts[gpIdx], gridIndex, frameIndex); - if ((*cellVisibility)[gridCellIndex]) - { - return true; - } - } - } - } - } + if (!this->showWell()) + return false; + if (!this->showWellSpheres()) return false; + + if (reservoirView->crossSectionCollection()->hasActiveIntersectionForSimulationWell(this)) + return true; + + if (reservoirView->wellCollection()->showWellsIntersectingVisibleCells() + && reservoirView->rangeFilterCollection()->hasActiveFilters()) + { + return intersectsDynamicWellCellsFilteredCells(frameIndex); + } + else + { + return true; } CVF_ASSERT(false); // Never end here. have you added new pipe visibility modes ? @@ -240,35 +522,44 @@ bool RimEclipseWell::calculateWellPipeVisibility(size_t frameIndex) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimEclipseWell::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) +bool RimEclipseWell::isUsingCellCenterForPipe() const { - caf::PdmUiGroup* pipeGroup = uiOrdering.addNewGroup("Appearance"); - pipeGroup->add(&showWellPipes); - pipeGroup->add(&showWellLabel); - pipeGroup->add(&wellPipeColor); - pipeGroup->add(&pipeRadiusScaleFactor); + const RimEclipseWellCollection* wellColl = nullptr; + this->firstAncestorOrThisOfType(wellColl); - caf::PdmUiGroup* filterGroup = uiOrdering.addNewGroup("Range filter"); - filterGroup->add(&showWellCells); - filterGroup->add(&showWellCellFence); + return (wellColl && wellColl->wellPipeCoordType() == RimEclipseWellCollection::WELLPIPE_CELLCENTER); } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RimEclipseWell::isWellPipeVisible(size_t frameIndex) +void RimEclipseWell::setWellResults(RigSingleWellResultsData* wellResults, size_t resultWellIndex) { - CVF_ASSERT(m_resultWellIndex != cvf::UNDEFINED_SIZE_T); + m_wellResults = wellResults; + m_resultWellIndex = resultWellIndex; +} - // Return the possibly cached value - return m_reservoirView->wellCollection()->resultWellPipeVisibilities(frameIndex)[m_resultWellIndex]; +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigSingleWellResultsData* RimEclipseWell::wellResults() +{ + return m_wellResults.p(); } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimEclipseWell::setWellResults(RigSingleWellResultsData* wellResults, size_t resultWellIndex) +const RigSingleWellResultsData* RimEclipseWell::wellResults() const +{ + return m_wellResults.p(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +size_t RimEclipseWell::resultWellIndex() const { - m_wellResults = wellResults; m_resultWellIndex = resultWellIndex; + return m_resultWellIndex; } diff --git a/ApplicationCode/ProjectDataModel/RimEclipseWell.h b/ApplicationCode/ProjectDataModel/RimEclipseWell.h index a3912ad7ba..52e4f1cffa 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseWell.h +++ b/ApplicationCode/ProjectDataModel/RimEclipseWell.h @@ -20,19 +20,21 @@ #pragma once -#include "RigSingleWellResultsData.h" - #include "cafPdmField.h" #include "cafPdmObject.h" #include "cafPdmPointer.h" #include "cafAppEnum.h" +// Include to make Pdm work for cvf::Color +#include "cafPdmFieldCvfColor.h" + #include "cvfObject.h" +#include "cvfVector3.h" -// Include to make Pdm work for cvf::Color -#include "cafPdmFieldCvfColor.h" +class RigSingleWellResultsData; +class RigWellResultFrame; +struct RigWellResultPoint; -class RimEclipseView; //================================================================================================== /// @@ -46,37 +48,58 @@ class RimEclipseWell : public caf::PdmObject RimEclipseWell(); virtual ~RimEclipseWell(); - void setReservoirView(RimEclipseView* ownerReservoirView); - void setWellResults(RigSingleWellResultsData* wellResults, size_t resultWellIndex); - RigSingleWellResultsData* wellResults() { return m_wellResults.p(); } - size_t resultWellIndex() { return m_resultWellIndex; } + RigSingleWellResultsData* wellResults(); + const RigSingleWellResultsData* wellResults() const; + size_t resultWellIndex() const; - bool isWellPipeVisible(size_t frameIndex); + bool isWellCellsVisible() const; + bool isWellPipeVisible(size_t frameIndex) const; + bool isWellSpheresVisible(size_t frameIndex) const; + bool isUsingCellCenterForPipe() const; - bool calculateWellPipeVisibility(size_t frameIndex); - virtual caf::PdmFieldHandle* userDescriptionField(); - virtual caf::PdmFieldHandle* objectToggleField(); + virtual caf::PdmFieldHandle* userDescriptionField() override; + virtual caf::PdmFieldHandle* objectToggleField() override; - virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue); - virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering); + void calculateWellPipeStaticCenterLine( std::vector< std::vector >& pipeBranchesCLCoords, + std::vector< std::vector >& pipeBranchesCellIds); + void calculateWellPipeDynamicCenterLine(size_t timeStepIdx, + std::vector< std::vector >& pipeBranchesCLCoords, + std::vector< std::vector >& pipeBranchesCellIds); + + void wellHeadTopBottomPosition(size_t frameIndex, cvf::Vec3d* top, cvf::Vec3d* bottom); + double pipeRadius(); caf::PdmField showWell; caf::PdmField name; + caf::PdmField showWellLabel; + caf::PdmField showWellHead; + caf::PdmField showWellPipe; + caf::PdmField showWellSpheres; + + caf::PdmField wellHeadScaleFactor; + caf::PdmField pipeScaleFactor; + + caf::PdmField wellPipeColor; caf::PdmField showWellCells; caf::PdmField showWellCellFence; - - caf::PdmField showWellPipes; - caf::PdmField wellPipeColor; - caf::PdmField pipeRadiusScaleFactor; + +protected: + virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override; + virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override; + virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override; + +private: + bool intersectsDynamicWellCellsFilteredCells(size_t frameIndex) const; + bool intersectsStaticWellCellsFilteredCells() const; + + bool intersectsWellCellsFilteredCells(const RigWellResultFrame &wrsf, size_t frameIndex) const; private: cvf::ref m_wellResults; size_t m_resultWellIndex; - - RimEclipseView* m_reservoirView; }; diff --git a/ApplicationCode/ProjectDataModel/RimEclipseWellCollection.cpp b/ApplicationCode/ProjectDataModel/RimEclipseWellCollection.cpp index be76cd33c8..25d6811cfc 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseWellCollection.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseWellCollection.cpp @@ -21,15 +21,30 @@ #include "RimEclipseWellCollection.h" #include "RiaApplication.h" +#include "RiaColorTables.h" #include "RiaPreferences.h" + +#include "RigEclipseCaseData.h" #include "RigSingleWellResultsData.h" + +#include "RimEclipseCase.h" #include "RimEclipseView.h" #include "RimEclipseWell.h" +#include "RimProject.h" +#include "RimWellAllocationPlot.h" + +#include "RiuMainWindow.h" + #include "RivReservoirViewPartMgr.h" +#include "cafPdmUiPushButtonEditor.h" +#include "cafPdmUiCheckBoxTristateEditor.h" +#include "RimEclipseResultCase.h" + namespace caf { + // OBSOLETE enum template<> void RimEclipseWellCollection::WellVisibilityEnum::setUp() { @@ -43,6 +58,7 @@ namespace caf namespace caf { + // OBSOLETE enum template<> void RimEclipseWellCollection::WellCellsRangeFilterEnum::setUp() { @@ -69,12 +85,23 @@ namespace caf template<> void RimEclipseWellCollection::WellHeadPositionEnum::setUp() { - addItem(RimEclipseWellCollection::WELLHEAD_POS_ACTIVE_CELLS_BB, "WELLHEAD_POS_ACTIVE_CELLS_BB", "Top of active cells BB"); - addItem(RimEclipseWellCollection::WELLHEAD_POS_TOP_COLUMN, "WELLHEAD_POS_TOP_COLUMN", "Top of active cells IJ-column"); + addItem(RimEclipseWellCollection::WELLHEAD_POS_ACTIVE_CELLS_BB, "WELLHEAD_POS_ACTIVE_CELLS_BB", "Top of Active Cells"); + addItem(RimEclipseWellCollection::WELLHEAD_POS_TOP_COLUMN, "WELLHEAD_POS_TOP_COLUMN", "Top of Active Cell Column"); setDefault(RimEclipseWellCollection::WELLHEAD_POS_TOP_COLUMN); } } +namespace caf +{ + template<> + void RimEclipseWellCollection::WellPipeCoordEnum::setUp() + { + addItem(RimEclipseWellCollection::WELLPIPE_INTERPOLATED, "WELLPIPE_INTERPOLATED", "Interpolated"); + addItem(RimEclipseWellCollection::WELLPIPE_CELLCENTER, "WELLPIPE_CELLCENTER", "Cell Centers"); + setDefault(RimEclipseWellCollection::WELLPIPE_INTERPOLATED); + } +} + CAF_PDM_SOURCE_INIT(RimEclipseWellCollection, "Wells"); //-------------------------------------------------------------------------------------------------- @@ -87,30 +114,103 @@ RimEclipseWellCollection::RimEclipseWellCollection() CAF_PDM_InitField(&isActive, "Active", true, "Active", "", "", ""); isActive.uiCapability()->setUiHidden(true); - CAF_PDM_InitField(&showWellHead, "ShowWellHead", true, "Show well heads", "", "", ""); - CAF_PDM_InitField(&showWellLabel, "ShowWellLabel", true, "Show well labels", "", "", ""); - CAF_PDM_InitField(&wellHeadScaleFactor, "WellHeadScale", 1.0, "Well head scale", "", "", ""); - CAF_PDM_InitField(&wellHeadPosition, "WellHeadPosition", WellHeadPositionEnum(WELLHEAD_POS_TOP_COLUMN), "Well head position", "", "", ""); + //CAF_PDM_InitField(&showWellsIntersectingVisibleCells, "ShowWellsIntersectingVisibleCells", false, "Hide Wells Not Intersecting Filtered Cells", "", "", ""); + CAF_PDM_InitField(&showWellsIntersectingVisibleCells, "ShowWellsIntersectingVisibleCells", false, "Wells Through Visible Cells Only", "", "", ""); + //CAF_PDM_InitField(&showWellsIntersectingVisibleCells, "ShowWellsIntersectingVisibleCells", false, "Hide Wells Missing Visible Cells", "", "", ""); + + // Appearance + CAF_PDM_InitFieldNoDefault(&m_showWellHead, "ShowWellHeadTristate", "Well Head", "", "", ""); + CAF_PDM_InitFieldNoDefault(&m_showWellLabel, "ShowWellLabelTristate", "Label", "", "", ""); + CAF_PDM_InitFieldNoDefault(&m_showWellPipe, "ShowWellPipe", "Pipe", "", "", ""); + CAF_PDM_InitFieldNoDefault(&m_showWellSpheres, "ShowWellSpheres", "Spheres", "", "", ""); + + m_showWellHead.uiCapability()->setUiEditorTypeName(caf::PdmUiCheckBoxTristateEditor::uiEditorTypeName()); + m_showWellHead.xmlCapability()->setIOReadable(false); + m_showWellHead.xmlCapability()->setIOWritable(false); + + m_showWellLabel.uiCapability()->setUiEditorTypeName(caf::PdmUiCheckBoxTristateEditor::uiEditorTypeName()); + m_showWellLabel.xmlCapability()->setIOReadable(false); + m_showWellLabel.xmlCapability()->setIOWritable(false); + + m_showWellPipe.uiCapability()->setUiEditorTypeName(caf::PdmUiCheckBoxTristateEditor::uiEditorTypeName()); + m_showWellPipe.xmlCapability()->setIOReadable(false); + m_showWellPipe.xmlCapability()->setIOWritable(false); + + m_showWellSpheres.uiCapability()->setUiEditorTypeName(caf::PdmUiCheckBoxTristateEditor::uiEditorTypeName()); + m_showWellSpheres.xmlCapability()->setIOReadable(false); + m_showWellSpheres.xmlCapability()->setIOWritable(false); + + // Scaling + CAF_PDM_InitField(&wellHeadScaleFactor, "WellHeadScale", 1.0, "Well Head Scale", "", "", ""); + CAF_PDM_InitField(&pipeScaleFactor, "WellPipeRadiusScale", 0.1, "Pipe Radius Scale ", "", "", ""); + CAF_PDM_InitField(&spheresScaleFactor, "CellCenterSphereScale", 0.2, "Sphere Radius Scale", "", "", ""); + + // Color cvf::Color3f defWellLabelColor = RiaApplication::instance()->preferences()->defaultWellLabelColor(); - CAF_PDM_InitField(&wellLabelColor, "WellLabelColor", defWellLabelColor, "Well label color", "", "", ""); + CAF_PDM_InitField(&wellLabelColor, "WellLabelColor", defWellLabelColor, "Label Color", "", "", ""); + + CAF_PDM_InitField(&showConnectionStatusColors, "ShowConnectionStatusColors", true, "Color Pipe Connections", "", "", ""); + + cvf::Color3f defaultApplyColor = cvf::Color3f::YELLOW; + CAF_PDM_InitField(&m_wellColorForApply, "WellColorForApply", defaultApplyColor, "", "", "", ""); - CAF_PDM_InitField(&wellPipeVisibility, "GlobalWellPipeVisibility", WellVisibilityEnum(PIPES_OPEN_IN_VISIBLE_CELLS), "Global well pipe visibility", "", "", ""); + CAF_PDM_InitField(&m_applySingleColorToWells, "ApplySingleColorToWells", false, "Uniform Pipe Colors", "", "", ""); + m_applySingleColorToWells.uiCapability()->setUiEditorTypeName(caf::PdmUiPushButtonEditor::uiEditorTypeName()); + m_applySingleColorToWells.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::LEFT); + m_applySingleColorToWells.xmlCapability()->setIOReadable(false); + m_applySingleColorToWells.xmlCapability()->setIOWritable(false); + + CAF_PDM_InitField(&m_applyIndividualColorsToWells, "ApplyIndividualColorsToWells", false, "Unique Pipe Colors", "", "", ""); + m_applyIndividualColorsToWells.uiCapability()->setUiEditorTypeName(caf::PdmUiPushButtonEditor::uiEditorTypeName()); + m_applyIndividualColorsToWells.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::LEFT); + m_applyIndividualColorsToWells.xmlCapability()->setIOReadable(false); + m_applyIndividualColorsToWells.xmlCapability()->setIOWritable(false); - CAF_PDM_InitField(&pipeRadiusScaleFactor, "WellPipeRadiusScale", 0.1, "Pipe radius scale", "", "", ""); CAF_PDM_InitField(&pipeCrossSectionVertexCount, "WellPipeVertexCount", 12, "Pipe vertex count", "", "", ""); pipeCrossSectionVertexCount.uiCapability()->setUiHidden(true); + CAF_PDM_InitField(&wellPipeCoordType, "WellPipeCoordType", WellPipeCoordEnum(WELLPIPE_INTERPOLATED), "Type", "", "", ""); - CAF_PDM_InitField(&wellCellsToRangeFilterMode, "GlobalWellCellVisibility", WellCellsRangeFilterEnum(RANGE_ADD_NONE), "Add cells to range filter", "", "", ""); - CAF_PDM_InitField(&showWellCellFences, "ShowWellFences", false, "Use well fence", "", "", ""); - CAF_PDM_InitField(&wellCellFenceType, "DefaultWellFenceDirection", WellFenceEnum(K_DIRECTION), "Well Fence direction", "", "", ""); + CAF_PDM_InitFieldNoDefault(&m_showWellCells, "ShowWellCellsTristate", "Show Well Cells", "", "", ""); + m_showWellCells.uiCapability()->setUiEditorTypeName(caf::PdmUiCheckBoxTristateEditor::uiEditorTypeName()); + m_showWellCells.xmlCapability()->setIOReadable(false); + m_showWellCells.xmlCapability()->setIOWritable(false); - CAF_PDM_InitField(&wellCellTransparencyLevel, "WellCellTransparency", 0.5, "Well cell transparency", "", "", ""); + CAF_PDM_InitField(&wellCellFenceType, "DefaultWellFenceDirection", WellFenceEnum(K_DIRECTION), "Well Fence Direction", "", "", ""); - CAF_PDM_InitField(&isAutoDetectingBranches, "IsAutoDetectingBranches", true, "Geometry based branch detection", "", "Toggle wether the well pipe visualization will try to detect when a part of the well \nis really a branch, and thus is starting from wellhead", ""); + CAF_PDM_InitField(&wellCellTransparencyLevel, "WellCellTransparency", 0.5, "Well Cell Transparency", "", "", ""); + CAF_PDM_InitField(&isAutoDetectingBranches, "IsAutoDetectingBranches", true, "Branch Detection", "", "Toggle whether the well pipe visualization will try to detect when a part of the well \nis really a branch, and thus is starting from wellhead", ""); + CAF_PDM_InitField(&wellHeadPosition, "WellHeadPosition", WellHeadPositionEnum(WELLHEAD_POS_TOP_COLUMN), "Well Head Position", "", "", ""); CAF_PDM_InitFieldNoDefault(&wells, "Wells", "Wells", "", "", ""); wells.uiCapability()->setUiHidden(true); + CAF_PDM_InitFieldNoDefault(&m_showWellCellFence, "ShowWellCellFenceTristate", "Show Well Cell Fence", "", "", ""); + m_showWellCellFence.uiCapability()->setUiEditorTypeName(caf::PdmUiCheckBoxTristateEditor::uiEditorTypeName()); + m_showWellCellFence.xmlCapability()->setIOReadable(false); + m_showWellCellFence.xmlCapability()->setIOWritable(false); + + CAF_PDM_InitField(&obsoleteField_wellPipeVisibility, "GlobalWellPipeVisibility", WellVisibilityEnum(PIPES_INDIVIDUALLY), "Global well pipe visibility", "", "", ""); + obsoleteField_wellPipeVisibility.uiCapability()->setUiHidden(true); + obsoleteField_wellPipeVisibility.xmlCapability()->setIOWritable(false); + + CAF_PDM_InitField(&obsoleteField_wellCellsToRangeFilterMode, "GlobalWellCellVisibility", WellCellsRangeFilterEnum(RANGE_ADD_INDIVIDUAL), "Add cells to range filter", "", "", ""); + obsoleteField_wellCellsToRangeFilterMode.uiCapability()->setUiHidden(true); + obsoleteField_wellCellsToRangeFilterMode.xmlCapability()->setIOWritable(false); + + CAF_PDM_InitField(&obsoleteField_showWellHead, "ShowWellHead", true, "Show Well Head", "", "", ""); + CAF_PDM_InitField(&obsoleteField_showWellLabel, "ShowWellLabel", true, "Show Well Label", "", "", ""); + CAF_PDM_InitField(&obsoleteField_showWellCellFence, "ShowWellFences", false, "Show Well Cell Fence", "", "", ""); + + CAF_PDM_InitField(&m_showWellCommunicationLines, "ShowWellCommunicationLines", false, "Communication Lines", "", "", ""); + + obsoleteField_showWellHead.uiCapability()->setUiHidden(true); + obsoleteField_showWellLabel.uiCapability()->setUiHidden(true); + obsoleteField_showWellCellFence.uiCapability()->setUiHidden(true); + + obsoleteField_showWellHead.xmlCapability()->setIOWritable(false); + obsoleteField_showWellLabel.xmlCapability()->setIOWritable(false); + obsoleteField_showWellCellFence.xmlCapability()->setIOWritable(false); + m_reservoirView = NULL; } @@ -122,6 +222,40 @@ RimEclipseWellCollection::~RimEclipseWellCollection() wells.deleteAllChildObjects(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseWellCollection::setShowWellCellsState(bool enable) +{ + for (RimEclipseWell* w : wells) + { + w->showWellCells = enable; + } + + updateConnectedEditors(); + + if (m_reservoirView) + { + m_reservoirView->scheduleGeometryRegen(VISIBLE_WELL_CELLS); + m_reservoirView->scheduleCreateDisplayModelAndRedraw(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimEclipseWellCollection::showWellCells() +{ + if (m_showWellCells().isFalse()) + { + return false; + } + else + { + return true; + } +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -143,14 +277,13 @@ RimEclipseWell* RimEclipseWellCollection::findWell(QString name) bool RimEclipseWellCollection::hasVisibleWellCells() { if (!this->isActive()) return false; - if (this->wellCellsToRangeFilterMode() == RANGE_ADD_NONE) return false; if (this->wells().size() == 0 ) return false; bool hasCells = false; for (size_t i = 0 ; !hasCells && i < this->wells().size(); ++i) { RimEclipseWell* well = this->wells()[i]; - if ( well && well->wellResults() && ((well->showWell() && well->showWellCells()) || this->wellCellsToRangeFilterMode() == RANGE_ADD_ALL) ) + if ( well && well->wellResults() && ((well->showWell() && well->showWellCells())) ) { for (size_t tIdx = 0; !hasCells && tIdx < well->wellResults()->m_wellCellsTimeSteps.size(); ++tIdx ) { @@ -165,94 +298,202 @@ bool RimEclipseWellCollection::hasVisibleWellCells() if (!hasCells) return false; - if (this->wellCellsToRangeFilterMode() == RANGE_ADD_INDIVIDUAL || this->wellCellsToRangeFilterMode() == RANGE_ADD_ALL) return true; - // Todo: Handle range filter intersection return true; } //-------------------------------------------------------------------------------------------------- -/// Used to know if we need animation of timesteps due to the wells +/// Used to know if we need animation of time steps due to the wells //-------------------------------------------------------------------------------------------------- -bool RimEclipseWellCollection::hasVisibleWellPipes() +bool RimEclipseWellCollection::hasVisibleWellPipes() { if (!this->isActive()) return false; - if (this->wellPipeVisibility() == PIPES_FORCE_ALL_OFF) return false; if (this->wells().size() == 0 ) return false; - if (this->wellPipeVisibility() == PIPES_FORCE_ALL_ON) return true; return true; } - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void RimEclipseWellCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) { - if (&showWellLabel == changedField || &isActive == changedField) + if (&isActive == changedField) { this->updateUiIconFromToggleField(); + } - if (m_reservoirView) + if (&m_showWellLabel == changedField) + { + for (RimEclipseWell* w : wells) { - m_reservoirView->scheduleGeometryRegen(VISIBLE_WELL_CELLS); - m_reservoirView->scheduleCreateDisplayModelAndRedraw(); + w->showWellLabel = !(m_showWellLabel().isFalse()); + w->updateConnectedEditors(); } } - if (&wellCellsToRangeFilterMode == changedField) + + if (&m_showWellHead == changedField) { - if (m_reservoirView) + for (RimEclipseWell* w : wells) { - m_reservoirView->scheduleGeometryRegen(VISIBLE_WELL_CELLS); - m_reservoirView->scheduleCreateDisplayModelAndRedraw(); + w->showWellHead = !(m_showWellHead().isFalse()); + w->updateConnectedEditors(); } } - else if (&showWellCellFences == changedField) + + if (&m_showWellPipe == changedField) { - if (m_reservoirView) - { - m_reservoirView->scheduleGeometryRegen(VISIBLE_WELL_CELLS); - m_reservoirView->scheduleCreateDisplayModelAndRedraw(); + for (RimEclipseWell* w : wells) + { + w->showWellPipe = !(m_showWellPipe().isFalse()); + w->updateConnectedEditors(); } } - else if (&wellCellTransparencyLevel == changedField) + + if (&m_showWellSpheres == changedField) { - if (m_reservoirView) - { - m_reservoirView->scheduleCreateDisplayModelAndRedraw(); + for (RimEclipseWell* w : wells) + { + w->showWellSpheres = !(m_showWellSpheres().isFalse()); + w->updateConnectedEditors(); } } - else if (&wellCellFenceType == changedField) + + if (&m_showWellCells == changedField) + { + for (RimEclipseWell* w : wells) + { + w->showWellCells = !(m_showWellCells().isFalse()); + w->updateConnectedEditors(); + } + } + + if (&m_showWellCellFence == changedField) + { + for (RimEclipseWell* w : wells) + { + w->showWellCellFence = !(m_showWellCellFence().isFalse()); + w->updateConnectedEditors(); + } + } + + if (m_reservoirView) { - if (m_reservoirView) - { + if ( &isActive == changedField + || &m_showWellLabel == changedField + || &m_showWellCells == changedField + || &m_showWellCellFence == changedField + || &wellCellFenceType == changedField) + { + m_reservoirView->scheduleGeometryRegen(VISIBLE_WELL_CELLS); + m_reservoirView->scheduleCreateDisplayModelAndRedraw(); + } + else if (&wellCellTransparencyLevel == changedField) + { + m_reservoirView->scheduleCreateDisplayModelAndRedraw(); + } + else if ( &spheresScaleFactor == changedField + || &m_showWellSpheres == changedField + || &showConnectionStatusColors == changedField) + { + m_reservoirView->scheduleSimWellGeometryRegen(); + m_reservoirView->scheduleCreateDisplayModelAndRedraw(); + } + else if ( &pipeCrossSectionVertexCount == changedField + || &pipeScaleFactor == changedField + || &wellHeadScaleFactor == changedField + || &m_showWellHead == changedField + || &isAutoDetectingBranches == changedField + || &wellHeadPosition == changedField + || &wellLabelColor == changedField + || &wellPipeCoordType == changedField + || &m_showWellPipe == changedField) + { + m_reservoirView->scheduleSimWellGeometryRegen(); + m_reservoirView->scheduleCreateDisplayModelAndRedraw(); + } + else if (&showWellsIntersectingVisibleCells == changedField) + { m_reservoirView->scheduleGeometryRegen(VISIBLE_WELL_CELLS); + m_reservoirView->scheduleSimWellGeometryRegen(); m_reservoirView->scheduleCreateDisplayModelAndRedraw(); } } - else if (&wellPipeVisibility == changedField) + + if (&m_applyIndividualColorsToWells == changedField) { - if (m_reservoirView) - { - m_reservoirView->scheduleCreateDisplayModelAndRedraw(); + assignDefaultWellColors(); + + if (m_reservoirView) m_reservoirView->scheduleCreateDisplayModelAndRedraw(); + + m_applyIndividualColorsToWells = false; + } + + if (&m_applySingleColorToWells == changedField) + { + cvf::Color3f col = m_wellColorForApply(); + + for (size_t i = 0; i < wells.size(); i++) + { + wells[i]->wellPipeColor = col; + wells[i]->updateConnectedEditors(); } + + if (m_reservoirView) m_reservoirView->scheduleCreateDisplayModelAndRedraw(); + + RimEclipseWellCollection::updateWellAllocationPlots(); + + m_applySingleColorToWells = false; } - else if ( &pipeCrossSectionVertexCount == changedField - || &pipeRadiusScaleFactor == changedField - || &wellHeadScaleFactor == changedField - || &showWellHead == changedField - || &isAutoDetectingBranches == changedField - || &wellHeadPosition == changedField - || &wellLabelColor == changedField) + + if (&m_showWellCells == changedField) { - if (m_reservoirView) + RiuMainWindow::instance()->refreshDrawStyleActions(); + } + + if (&m_showWellCommunicationLines == changedField) + { + if (m_reservoirView) m_reservoirView->scheduleCreateDisplayModelAndRedraw(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseWellCollection::assignDefaultWellColors() +{ + + + RimEclipseCase* ownerCase; + firstAncestorOrThisOfTypeAsserted(ownerCase); + + for (size_t wIdx = 0; wIdx < wells.size(); ++wIdx) + { + RimEclipseWell* well = wells[wIdx]; + if (well && well->wellResults() ) { - m_reservoirView->schedulePipeGeometryRegen(); - m_reservoirView->scheduleCreateDisplayModelAndRedraw(); + well->wellPipeColor = ownerCase->defaultWellColor(well->wellResults()->m_wellName); } } + + RimEclipseWellCollection::updateWellAllocationPlots(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseWellCollection::updateWellAllocationPlots() +{ + RimProject* proj = RiaApplication::instance()->project(); + + std::vector wellAllocationPlots; + proj->descendantsIncludingThisOfType(wellAllocationPlots); + + for (auto wap : wellAllocationPlots) + { + wap->loadDataAndUpdate(); + } } //-------------------------------------------------------------------------------------------------- @@ -268,25 +509,102 @@ void RimEclipseWellCollection::setReservoirView(RimEclipseView* ownerReservoirVi //-------------------------------------------------------------------------------------------------- void RimEclipseWellCollection::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) { - caf::PdmUiGroup* filterGroup = uiOrdering.addNewGroup("Well range filter"); - filterGroup->add(&wellCellsToRangeFilterMode); - filterGroup->add(&showWellCellFences); + updateStateForVisibilityCheckboxes(); + + caf::PdmUiGroup* appearanceGroup = uiOrdering.addNewGroup("Visibility"); + appearanceGroup->add(&showWellsIntersectingVisibleCells); + appearanceGroup->add(&m_showWellLabel); + appearanceGroup->add(&m_showWellHead); + appearanceGroup->add(&m_showWellPipe); + appearanceGroup->add(&m_showWellSpheres); + appearanceGroup->add(&m_showWellCommunicationLines); + + caf::PdmUiGroup* filterGroup = uiOrdering.addNewGroup("Well Cells and Fence"); + filterGroup->add(&m_showWellCells); + filterGroup->add(&m_showWellCellFence); filterGroup->add(&wellCellFenceType); - caf::PdmUiGroup* wellHeadGroup = uiOrdering.addNewGroup("Well head"); - wellHeadGroup->add(&showWellHead); - wellHeadGroup->add(&wellHeadScaleFactor); - wellHeadGroup->add(&showWellLabel); - wellHeadGroup->add(&wellHeadPosition); - wellHeadGroup->add(&wellLabelColor); + caf::PdmUiGroup* sizeScalingGroup = uiOrdering.addNewGroup("Size Scaling"); + sizeScalingGroup->add(&wellHeadScaleFactor); + sizeScalingGroup->add(&pipeScaleFactor); + sizeScalingGroup->add(&spheresScaleFactor); - caf::PdmUiGroup* wellPipe = uiOrdering.addNewGroup("Well pipe"); - wellPipe->add(&wellPipeVisibility); - wellPipe->add(&pipeRadiusScaleFactor); + caf::PdmUiGroup* colorGroup = uiOrdering.addNewGroup("Colors"); + colorGroup->setCollapsedByDefault(true); + colorGroup->add(&showConnectionStatusColors); + colorGroup->add(&wellLabelColor); + colorGroup->add(&m_applyIndividualColorsToWells); + colorGroup->add(&m_applySingleColorToWells); + colorGroup->add(&m_wellColorForApply); + + caf::PdmUiGroup* wellPipeGroup = uiOrdering.addNewGroup("Well Pipe Geometry" ); + wellPipeGroup->add(&wellPipeCoordType); + wellPipeGroup->add(&isAutoDetectingBranches); caf::PdmUiGroup* advancedGroup = uiOrdering.addNewGroup("Advanced"); + advancedGroup->setCollapsedByDefault(true); advancedGroup->add(&wellCellTransparencyLevel); - advancedGroup->add(&isAutoDetectingBranches); + advancedGroup->add(&wellHeadPosition); + + RimEclipseResultCase* ownerCase; + firstAncestorOrThisOfTypeAsserted(ownerCase); + m_showWellCommunicationLines.uiCapability()->setUiHidden(!ownerCase->flowDiagSolverInterface()); + + m_showWellCellFence.uiCapability()->setUiReadOnly(!showWellCells()); + wellCellFenceType.uiCapability()->setUiReadOnly(!showWellCells()); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseWellCollection::updateStateForVisibilityCheckboxes() +{ + size_t showLabelCount = 0; + size_t showWellHeadCount = 0; + size_t showPipeCount = 0; + size_t showSphereCount = 0; + size_t showWellCellsCount = 0; + size_t showWellCellFenceCount = 0; + + for (RimEclipseWell* w : wells) + { + if (w->showWellLabel()) showLabelCount++; + if (w->showWellHead()) showWellHeadCount++; + if (w->showWellPipe()) showPipeCount++; + if (w->showWellSpheres()) showSphereCount++; + if (w->showWellCells()) showWellCellsCount++; + if (w->showWellCellFence()) showWellCellFenceCount++; + } + + updateStateFromEnabledChildCount(showLabelCount, &m_showWellLabel); + updateStateFromEnabledChildCount(showWellHeadCount, &m_showWellHead); + updateStateFromEnabledChildCount(showPipeCount, &m_showWellPipe); + updateStateFromEnabledChildCount(showSphereCount, &m_showWellSpheres); + updateStateFromEnabledChildCount(showWellCellsCount, &m_showWellCells); + updateStateFromEnabledChildCount(showWellCellFenceCount, &m_showWellCellFence); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseWellCollection::updateStateFromEnabledChildCount(size_t enabledChildCount, caf::PdmField* fieldToUpdate) +{ + caf::Tristate tristate; + + if (enabledChildCount == 0) + { + tristate = caf::Tristate::State::False; + } + else if (enabledChildCount == wells.size()) + { + tristate = caf::Tristate::State::True; + } + else + { + tristate = caf::Tristate::State::PartiallyTrue; + } + + fieldToUpdate->setValue(tristate); } //-------------------------------------------------------------------------------------------------- @@ -301,9 +619,110 @@ caf::PdmFieldHandle* RimEclipseWellCollection::objectToggleField() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -const std::vector& RimEclipseWellCollection::resultWellPipeVisibilities(size_t frameIndex) +void RimEclipseWellCollection::initAfterRead() { - calculateIsWellPipesVisible(frameIndex); + if (obsoleteField_wellPipeVisibility() == PIPES_OPEN_IN_VISIBLE_CELLS) + { + showWellsIntersectingVisibleCells = true; + } + else if (obsoleteField_wellPipeVisibility() == PIPES_FORCE_ALL_OFF) + { + showWellsIntersectingVisibleCells = false; + + for (RimEclipseWell* w : wells) + { + w->showWellPipe = false; + } + } + else if (obsoleteField_wellPipeVisibility() == PIPES_FORCE_ALL_ON) + { + showWellsIntersectingVisibleCells = false; + + for (RimEclipseWell* w : wells) + { + w->showWellPipe = true; + } + } + + if (obsoleteField_wellCellsToRangeFilterMode() == RANGE_ADD_NONE) + { + for (RimEclipseWell* w : wells) + { + w->showWellCells = false; + } + } + else if (obsoleteField_wellCellsToRangeFilterMode() == RANGE_ADD_ALL) + { + for (RimEclipseWell* w : wells) + { + w->showWellCells = true; + } + } + + if (!obsoleteField_showWellLabel()) + { + for (RimEclipseWell* w : wells) + { + w->showWellLabel = false; + } + } + + if (!obsoleteField_showWellHead()) + { + for (RimEclipseWell* w : wells) + { + w->showWellHead = false; + } + } + + if (obsoleteField_showWellCellFence()) + { + for (RimEclipseWell* w : wells) + { + w->showWellCellFence = true; + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseWellCollection::defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) +{ + if (&m_applyIndividualColorsToWells == field) + { + caf::PdmUiPushButtonEditorAttribute* editorAttr = dynamic_cast(attribute); + if (editorAttr) + { + editorAttr->m_buttonText = "Apply"; + } + } + + if (&m_applySingleColorToWells == field) + { + caf::PdmUiPushButtonEditorAttribute* editorAttr = dynamic_cast(attribute); + if (editorAttr) + { + QColor col; + col.setRgbF(m_wellColorForApply().r(), m_wellColorForApply().g(), m_wellColorForApply().b()); + + QPixmap pixmap(20, 20); + pixmap.fill(col); + + QIcon colorIcon(pixmap); + + editorAttr->m_buttonIcon = colorIcon; + editorAttr->m_buttonText = "Apply"; + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const std::vector& RimEclipseWellCollection::resultWellGeometryVisibilities(size_t frameIndex) +{ + calculateWellGeometryVisibility(frameIndex); return m_framesOfResultWellPipeVisibilities[frameIndex]; } @@ -318,7 +737,7 @@ void RimEclipseWellCollection::scheduleIsWellPipesVisibleRecalculation() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimEclipseWellCollection::calculateIsWellPipesVisible(size_t frameIndex) +void RimEclipseWellCollection::calculateWellGeometryVisibility(size_t frameIndex) { if (m_framesOfResultWellPipeVisibilities.size() > frameIndex && m_framesOfResultWellPipeVisibilities[frameIndex].size()) return; @@ -328,9 +747,12 @@ void RimEclipseWellCollection::calculateIsWellPipesVisible(size_t frameIndex) if (m_framesOfResultWellPipeVisibilities[frameIndex].size() <= wells().size()) m_framesOfResultWellPipeVisibilities[frameIndex].resize(wells().size(), false); - for (size_t i = 0; i < wells().size(); ++i) + for (const RimEclipseWell* well : wells()) { - m_framesOfResultWellPipeVisibilities[frameIndex][wells[i]->resultWellIndex()] = wells[i]->calculateWellPipeVisibility(frameIndex); + bool wellPipeVisible = well->isWellPipeVisible(frameIndex); + bool wellSphereVisible = well->isWellSpheresVisible(frameIndex); + + m_framesOfResultWellPipeVisibilities[frameIndex][well->resultWellIndex()] = wellPipeVisible || wellSphereVisible; } } diff --git a/ApplicationCode/ProjectDataModel/RimEclipseWellCollection.h b/ApplicationCode/ProjectDataModel/RimEclipseWellCollection.h index 7aa4cf554b..b3daed2623 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseWellCollection.h +++ b/ApplicationCode/ProjectDataModel/RimEclipseWellCollection.h @@ -23,13 +23,10 @@ #include "cafAppEnum.h" #include "cafPdmChildArrayField.h" #include "cafPdmField.h" +#include "cafPdmFieldCvfColor.h" // Include to make Pdm work for cvf::Color #include "cafPdmObject.h" #include "cafPdmPointer.h" - -// Include to make Pdm work for cvf::Color -#include "cafPdmFieldCvfColor.h" - -#include +#include "cafTristate.h" class RimEclipseView; class RimEclipseWell; @@ -45,7 +42,7 @@ class RimEclipseWellCollection : public caf::PdmObject RimEclipseWellCollection(); virtual ~RimEclipseWellCollection(); - + void setReservoirView(RimEclipseView* ownerReservoirView); enum WellVisibilityType @@ -80,47 +77,93 @@ class RimEclipseWellCollection : public caf::PdmObject }; typedef caf::AppEnum WellHeadPositionEnum; + enum WellPipeCoordType + { + WELLPIPE_CELLCENTER, + WELLPIPE_INTERPOLATED + }; + typedef caf::AppEnum WellPipeCoordEnum; - caf::PdmField showWellLabel; - caf::PdmField wellLabelColor; caf::PdmField isActive; + caf::PdmField showWellsIntersectingVisibleCells; + + caf::PdmField wellHeadScaleFactor; + caf::PdmField pipeScaleFactor; + caf::PdmField spheresScaleFactor; + + caf::PdmField wellLabelColor; + caf::PdmField showConnectionStatusColors; + + void setShowWellCellsState(bool enable); + bool showWellCells(); + + bool showWellCommunicationLines() { return m_showWellCommunicationLines();} - caf::PdmField wellCellsToRangeFilterMode; - caf::PdmField showWellCellFences; caf::PdmField wellCellFenceType; caf::PdmField wellCellTransparencyLevel; - caf::PdmField wellPipeVisibility; - caf::PdmField pipeRadiusScaleFactor; caf::PdmField pipeCrossSectionVertexCount; + caf::PdmField wellPipeCoordType; - caf::PdmField wellHeadScaleFactor; - caf::PdmField showWellHead; caf::PdmField wellHeadPosition; - caf::PdmField isAutoDetectingBranches; - - caf::PdmChildArrayField wells; + + caf::PdmChildArrayField wells; RimEclipseWell* findWell(QString name); bool hasVisibleWellCells(); bool hasVisibleWellPipes(); void sortWellsByName(); - const std::vector& resultWellPipeVisibilities(size_t frameIndex); + const std::vector& resultWellGeometryVisibilities(size_t frameIndex); void scheduleIsWellPipesVisibleRecalculation(); + void updateStateForVisibilityCheckboxes(); + + + void assignDefaultWellColors(); + + static void updateWellAllocationPlots(); protected: - virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue); - virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering); - virtual caf::PdmFieldHandle* objectToggleField(); -private: + virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override; + - void calculateIsWellPipesVisible(size_t frameIndex); + virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override; - RimEclipseView* m_reservoirView; - std::vector< std::vector< cvf::ubyte > > - m_framesOfResultWellPipeVisibilities; + + virtual caf::PdmFieldHandle* objectToggleField() override; + virtual void initAfterRead() override; + virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override; + +private: + void calculateWellGeometryVisibility(size_t frameIndex); + void updateStateFromEnabledChildCount(size_t showLabelCount, caf::PdmField* fieldToUpdate); + +private: + RimEclipseView* m_reservoirView; + std::vector< std::vector< cvf::ubyte > > m_framesOfResultWellPipeVisibilities; + + // Fields + caf::PdmField m_wellColorForApply; + caf::PdmField m_applySingleColorToWells; + caf::PdmField m_applyIndividualColorsToWells; + + caf::PdmField m_showWellLabel; + caf::PdmField m_showWellHead; + caf::PdmField m_showWellPipe; + caf::PdmField m_showWellSpheres; + caf::PdmField m_showWellCells; + caf::PdmField m_showWellCellFence; + + caf::PdmField m_showWellCommunicationLines; + + // Obsolete fields + caf::PdmField obsoleteField_wellPipeVisibility; + caf::PdmField obsoleteField_wellCellsToRangeFilterMode; + + caf::PdmField obsoleteField_showWellLabel; + caf::PdmField obsoleteField_showWellHead; + caf::PdmField obsoleteField_showWellCellFence; }; diff --git a/ApplicationCode/ProjectDataModel/RimExportInputPropertySettings.cpp b/ApplicationCode/ProjectDataModel/RimExportInputPropertySettings.cpp index d0a5ca98a8..b7ac2b0bb2 100644 --- a/ApplicationCode/ProjectDataModel/RimExportInputPropertySettings.cpp +++ b/ApplicationCode/ProjectDataModel/RimExportInputPropertySettings.cpp @@ -31,7 +31,7 @@ RimExportInputSettings::RimExportInputSettings() CAF_PDM_InitFieldNoDefault(&fileName, "Filename", "Export filename", "", "", ""); fileName.uiCapability()->setUiEditorTypeName(caf::PdmUiFilePathEditor::uiEditorTypeName()); - CAF_PDM_InitFieldNoDefault(&eclipseKeyword, "Eclipse Keyword", "Keyword", "", "", ""); + CAF_PDM_InitFieldNoDefault(&eclipseKeyword, "Keyword", "Eclipse Keyword", "", "", ""); } @@ -42,7 +42,7 @@ void RimExportInputSettings::defineEditorAttribute(const caf::PdmFieldHandle* fi { if (field == &fileName) { - caf::PdmUiFilePathEditorAttribute* myAttr = static_cast(attribute); + caf::PdmUiFilePathEditorAttribute* myAttr = dynamic_cast(attribute); if (myAttr) { myAttr->m_selectSaveFileName = true; diff --git a/ApplicationCode/ProjectDataModel/RimFaultCollection.cpp b/ApplicationCode/ProjectDataModel/RimFaultCollection.cpp index b2c7f1a127..5f6617b9f8 100644 --- a/ApplicationCode/ProjectDataModel/RimFaultCollection.cpp +++ b/ApplicationCode/ProjectDataModel/RimFaultCollection.cpp @@ -21,9 +21,11 @@ #include "RiaApplication.h" #include "RiaPreferences.h" +#include "RiaColorTables.h" -#include "RigCaseData.h" +#include "RigMainGrid.h" +#include "RimDefines.h" #include "RimEclipseCase.h" #include "RimEclipseView.h" #include "RimFault.h" @@ -32,8 +34,6 @@ #include "RiuMainWindow.h" -#include "RivColorTableArray.h" - #include "cafAppEnum.h" #include "cafPdmFieldCvfColor.h" #include "cafPdmFieldCvfMat4d.h" @@ -185,11 +185,11 @@ bool faultComparator(const cvf::ref& a, const cvf::ref& b) //-------------------------------------------------------------------------------------------------- void RimFaultCollection::syncronizeFaults() { - if (!(m_reservoirView && m_reservoirView->eclipseCase() && m_reservoirView->eclipseCase()->reservoirData() && m_reservoirView->eclipseCase()->reservoirData()->mainGrid()) ) return; + if (!(m_reservoirView && m_reservoirView->mainGrid()) ) return; - cvf::ref partColors = RivColorTableArray::colorTableArray(); + const caf::ColorTable& colorTable = RiaColorTables::faultsPaletteColors(); - const cvf::Collection constRigFaults = m_reservoirView->eclipseCase()->reservoirData()->mainGrid()->faults(); + const cvf::Collection constRigFaults = m_reservoirView->mainGrid()->faults(); cvf::Collection rigFaults; { @@ -246,7 +246,7 @@ void RimFaultCollection::syncronizeFaults() if (!rimFault) { rimFault = new RimFault(); - rimFault->faultColor = partColors->get(fIdx % partColors->size()); + rimFault->faultColor = colorTable.cycledColor3f(fIdx); QString faultName = rigFaults[fIdx]->name(); if (faultName.startsWith(RimDefines::undefinedGridFaultName(), Qt::CaseInsensitive) @@ -270,7 +270,7 @@ void RimFaultCollection::syncronizeFaults() // NNCs this->noCommonAreaNnncCollection()->noCommonAreaNncs().deleteAllChildObjects(); - RigMainGrid* mainGrid = m_reservoirView->eclipseCase()->reservoirData()->mainGrid(); + RigMainGrid* mainGrid = m_reservoirView->mainGrid(); std::vector& nncConnections = mainGrid->nncData()->connections(); for (size_t i = 0; i < nncConnections.size(); i++) { @@ -397,7 +397,7 @@ void RimFaultCollection::setShowFaultsOutsideFilters(bool enableState) //-------------------------------------------------------------------------------------------------- void RimFaultCollection::addMockData() { - if (!(m_reservoirView && m_reservoirView->eclipseCase() && m_reservoirView->eclipseCase()->reservoirData() && m_reservoirView->eclipseCase()->reservoirData()->mainGrid())) return; + if (!(m_reservoirView && m_reservoirView->mainGrid())) return; } diff --git a/ApplicationCode/ProjectDataModel/RimFaultCollection.h b/ApplicationCode/ProjectDataModel/RimFaultCollection.h index aab9468473..870704fb98 100644 --- a/ApplicationCode/ProjectDataModel/RimFaultCollection.h +++ b/ApplicationCode/ProjectDataModel/RimFaultCollection.h @@ -19,8 +19,6 @@ #pragma once -#include "RimReservoirCellResultsStorage.h" - #include "cafAppEnum.h" #include "cafPdmChildArrayField.h" #include "cafPdmChildField.h" diff --git a/ApplicationCode/ProjectDataModel/RimGeoMechCase.cpp b/ApplicationCode/ProjectDataModel/RimGeoMechCase.cpp index 3d73488e10..47759350be 100644 --- a/ApplicationCode/ProjectDataModel/RimGeoMechCase.cpp +++ b/ApplicationCode/ProjectDataModel/RimGeoMechCase.cpp @@ -40,6 +40,8 @@ #include "RimGeoMechResultDefinition.h" #include "RimGeoMechPropertyFilter.h" +#include "cafUtils.h" + #include CAF_PDM_SOURCE_INIT(RimGeoMechCase, "ResInsightGeoMechCase"); @@ -50,7 +52,7 @@ RimGeoMechCase::RimGeoMechCase(void) { CAF_PDM_InitObject("Geomechanical Case", ":/GeoMechCase48x48.png", "", ""); - CAF_PDM_InitField(&m_caseFileName, "CaseFileName", QString(), "Case file name", "", "", ""); + CAF_PDM_InitField(&m_caseFileName, "CaseFileName", QString(), "Case File Name", "", "", ""); m_caseFileName.uiCapability()->setUiReadOnly(true); CAF_PDM_InitFieldNoDefault(&geoMechViews, "GeoMechViews", "", "", "", ""); geoMechViews.uiCapability()->setUiHidden(true); @@ -110,7 +112,7 @@ bool RimGeoMechCase::openGeoMechCase(std::string* errorMessage) // If read already, return if (this->m_geoMechCaseData.notNull()) return true; - if (!QFile::exists(m_caseFileName())) + if (!caf::Utils::fileExists(m_caseFileName())) { return false; } diff --git a/ApplicationCode/ProjectDataModel/RimGeoMechCellColors.cpp b/ApplicationCode/ProjectDataModel/RimGeoMechCellColors.cpp index 3232cd06c7..6798c2e7ef 100644 --- a/ApplicationCode/ProjectDataModel/RimGeoMechCellColors.cpp +++ b/ApplicationCode/ProjectDataModel/RimGeoMechCellColors.cpp @@ -55,14 +55,17 @@ void RimGeoMechCellColors::updateIconState() this->firstAncestorOrThisOfType(rimView); CVF_ASSERT(rimView); - RimViewController* viewController = rimView->viewController(); - if (viewController && viewController->isResultColorControlled()) + if (rimView) { - updateUiIconFromState(false); - } - else - { - updateUiIconFromState(true); + RimViewController* viewController = rimView->viewController(); + if (viewController && viewController->isResultColorControlled()) + { + updateUiIconFromState(false); + } + else + { + updateUiIconFromState(true); + } } uiCapability()->updateConnectedEditors(); diff --git a/ApplicationCode/ProjectDataModel/RimGeoMechPropertyFilter.cpp b/ApplicationCode/ProjectDataModel/RimGeoMechPropertyFilter.cpp index ae63df3d51..d24d4cb96e 100644 --- a/ApplicationCode/ProjectDataModel/RimGeoMechPropertyFilter.cpp +++ b/ApplicationCode/ProjectDataModel/RimGeoMechPropertyFilter.cpp @@ -122,7 +122,6 @@ void RimGeoMechPropertyFilter::setToDefaultValues() m_selectedCategoryValues = m_categoryValues; - this->updateFieldVisibility(); this->updateFilterName(); } @@ -134,17 +133,25 @@ void RimGeoMechPropertyFilter::defineUiOrdering(QString uiConfigName, caf::PdmUi uiOrdering.add(&name); caf::PdmUiGroup* group1 = uiOrdering.addNewGroup("Result"); - resultDefinition->defineUiOrdering(uiConfigName, *group1); + resultDefinition->uiOrdering(uiConfigName, *group1); - uiOrdering.add(&isActive); - uiOrdering.add(&filterMode); + caf::PdmUiGroup& group2 = *(uiOrdering.addNewGroup("Filter Settings")); - uiOrdering.add(&lowerBound); - uiOrdering.add(&upperBound); + group2.add(&filterMode); - uiOrdering.add(&m_selectedCategoryValues); + if ( resultDefinition->hasCategoryResult() ) + { + group2.add(&m_selectedCategoryValues); + } + else + { + group2.add(&lowerBound); + group2.add(&upperBound); + } updateReadOnlyStateOfAllFields(); + + uiOrdering.skipRemainingFields(true); } //-------------------------------------------------------------------------------------------------- @@ -184,38 +191,23 @@ void RimGeoMechPropertyFilter::updateReadOnlyStateOfAllFields() //-------------------------------------------------------------------------------------------------- bool RimGeoMechPropertyFilter::isPropertyFilterControlled() { + bool isPropertyFilterControlled = false; + RimView* rimView = NULL; firstAncestorOrThisOfType(rimView); CVF_ASSERT(rimView); - - bool isPropertyFilterControlled = false; - RimViewController* vc = rimView->viewController(); - if (vc && vc->isPropertyFilterOveridden()) + if (rimView) { - isPropertyFilterControlled = true; + RimViewController* vc = rimView->viewController(); + if (vc && vc->isPropertyFilterOveridden()) + { + isPropertyFilterControlled = true; + } } return isPropertyFilterControlled; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimGeoMechPropertyFilter::updateFieldVisibility() -{ - if (resultDefinition->hasCategoryResult()) - { - m_selectedCategoryValues.uiCapability()->setUiHidden(false); - lowerBound.uiCapability()->setUiHidden(true); - upperBound.uiCapability()->setUiHidden(true); - } - else - { - m_selectedCategoryValues.uiCapability()->setUiHidden(true); - lowerBound.uiCapability()->setUiHidden(false); - upperBound.uiCapability()->setUiHidden(false); - } -} //-------------------------------------------------------------------------------------------------- /// diff --git a/ApplicationCode/ProjectDataModel/RimGeoMechPropertyFilter.h b/ApplicationCode/ProjectDataModel/RimGeoMechPropertyFilter.h index 168c908c34..aad1331506 100644 --- a/ApplicationCode/ProjectDataModel/RimGeoMechPropertyFilter.h +++ b/ApplicationCode/ProjectDataModel/RimGeoMechPropertyFilter.h @@ -19,7 +19,7 @@ #pragma once -#include "RimCellFilter.h" +#include "RimPropertyFilter.h" #include "cafPdmChildField.h" @@ -31,7 +31,7 @@ class RimGeoMechPropertyFilterCollection; /// /// //================================================================================================== -class RimGeoMechPropertyFilter : public RimCellFilter +class RimGeoMechPropertyFilter : public RimPropertyFilter { CAF_PDM_HEADER_INIT; @@ -50,7 +50,6 @@ class RimGeoMechPropertyFilter : public RimCellFilter void updateFilterName(); void computeResultValueRange(); - void updateFieldVisibility(); void updateActiveState(); protected: diff --git a/ApplicationCode/ProjectDataModel/RimGeoMechPropertyFilterCollection.cpp b/ApplicationCode/ProjectDataModel/RimGeoMechPropertyFilterCollection.cpp index 90cad2cb83..acc74532fb 100644 --- a/ApplicationCode/ProjectDataModel/RimGeoMechPropertyFilterCollection.cpp +++ b/ApplicationCode/ProjectDataModel/RimGeoMechPropertyFilterCollection.cpp @@ -73,7 +73,6 @@ void RimGeoMechPropertyFilterCollection::loadAndInitializePropertyFilters() propertyFilter->resultDefinition->setGeoMechCase(reservoirView()->geoMechCase()); propertyFilter->resultDefinition->loadResult(); propertyFilter->computeResultValueRange(); - propertyFilter->updateFieldVisibility(); } } @@ -145,11 +144,14 @@ void RimGeoMechPropertyFilterCollection::updateIconState() RimGeoMechView* view = NULL; this->firstAncestorOrThisOfType(view); - RimViewController* viewController = view->viewController(); - if (viewController && ( viewController->isPropertyFilterOveridden() - || viewController->isVisibleCellsOveridden())) + if (view) { - activeIcon = false; + RimViewController* viewController = view->viewController(); + if (viewController && ( viewController->isPropertyFilterOveridden() + || viewController->isVisibleCellsOveridden())) + { + activeIcon = false; + } } if (!isActive) diff --git a/ApplicationCode/ProjectDataModel/RimGeoMechResultDefinition.cpp b/ApplicationCode/ProjectDataModel/RimGeoMechResultDefinition.cpp index ea31ef9658..c7f1c50155 100644 --- a/ApplicationCode/ProjectDataModel/RimGeoMechResultDefinition.cpp +++ b/ApplicationCode/ProjectDataModel/RimGeoMechResultDefinition.cpp @@ -30,8 +30,8 @@ #include "RimGeoMechCellColors.h" #include "RimGeoMechPropertyFilter.h" #include "RimGeoMechView.h" +#include "RimPlotCurve.h" #include "RimViewLinker.h" -#include "RimWellLogCurve.h" #include "cafPdmUiListEditor.h" @@ -114,12 +114,15 @@ void RimGeoMechResultDefinition::defineUiOrdering(QString uiConfigName, caf::Pdm uiOrdering.add(&m_resultPositionTypeUiField); uiOrdering.add(&m_resultVariableUiField); - caf::PdmUiGroup * timeLapseGr = uiOrdering.addNewGroup("Relative Result Options"); - timeLapseGr->add(&m_isTimeLapseResultUiField); - if (m_isTimeLapseResultUiField()) - timeLapseGr->add(&m_timeLapseBaseTimestepUiField); + if ( m_resultPositionTypeUiField() != RIG_FORMATION_NAMES ) + { + caf::PdmUiGroup * timeLapseGr = uiOrdering.addNewGroup("Relative Result Options"); + timeLapseGr->add(&m_isTimeLapseResultUiField); + if ( m_isTimeLapseResultUiField() ) + timeLapseGr->add(&m_timeLapseBaseTimestepUiField); + } - uiOrdering.setForgetRemainingFields(true); + uiOrdering.skipRemainingFields(true); } //-------------------------------------------------------------------------------------------------- @@ -137,7 +140,9 @@ QList RimGeoMechResultDefinition::calculateValueOptions( std::map > fieldCompNames = getResultMetaDataForUIFieldSetting(); QStringList uiVarNames; QStringList varNames; - getUiAndResultVariableStringList(&uiVarNames, &varNames, fieldCompNames, m_isTimeLapseResultUiField, m_timeLapseBaseTimestepUiField); + bool isNeedingTimeLapseStrings = m_isTimeLapseResultUiField() && (m_resultPositionTypeUiField() != RIG_FORMATION_NAMES); + + getUiAndResultVariableStringList(&uiVarNames, &varNames, fieldCompNames, isNeedingTimeLapseStrings, m_timeLapseBaseTimestepUiField); for (int oIdx = 0; oIdx < uiVarNames.size(); ++oIdx) { @@ -189,7 +194,8 @@ void RimGeoMechResultDefinition::fieldChangedByUi(const caf::PdmFieldHandle* cha std::map > fieldCompNames = getResultMetaDataForUIFieldSetting(); QStringList uiVarNames; QStringList varNames; - getUiAndResultVariableStringList(&uiVarNames, &varNames, fieldCompNames, m_isTimeLapseResultUiField, m_timeLapseBaseTimestepUiField); + bool isNeedingTimeLapseStrings = m_isTimeLapseResultUiField() && (m_resultPositionTypeUiField() != RIG_FORMATION_NAMES); + getUiAndResultVariableStringList(&uiVarNames, &varNames, fieldCompNames, isNeedingTimeLapseStrings, m_timeLapseBaseTimestepUiField); if (m_resultPositionTypeUiField() == m_resultPositionType() && m_isTimeLapseResultUiField() == m_isTimeLapseResult() @@ -206,12 +212,11 @@ void RimGeoMechResultDefinition::fieldChangedByUi(const caf::PdmFieldHandle* cha // Get the possible property filter owner RimGeoMechPropertyFilter* propFilter = dynamic_cast(this->parentField()->ownerObject()); - RimView* view = NULL; + RimView* view = nullptr; this->firstAncestorOrThisOfType(view); - RimWellLogCurve* curve = NULL; + RimPlotCurve* curve = nullptr; this->firstAncestorOrThisOfType(curve); - if (&m_resultVariableUiField == changedField) { QStringList fieldComponentNames = m_resultVariableUiField().split(QRegExp("\\s+")); diff --git a/ApplicationCode/ProjectDataModel/RimGeoMechResultDefinition.h b/ApplicationCode/ProjectDataModel/RimGeoMechResultDefinition.h index 13974fb11b..428406fe06 100644 --- a/ApplicationCode/ProjectDataModel/RimGeoMechResultDefinition.h +++ b/ApplicationCode/ProjectDataModel/RimGeoMechResultDefinition.h @@ -63,8 +63,7 @@ class RimGeoMechResultDefinition : public caf::PdmObject protected: virtual void updateLegendCategorySettings() {}; - - + virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override; private: @@ -72,7 +71,6 @@ class RimGeoMechResultDefinition : public caf::PdmObject virtual QList calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly); - virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override; virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue); diff --git a/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp b/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp index 9842376684..3b7240578a 100644 --- a/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp +++ b/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp @@ -58,6 +58,7 @@ #include "cvfOverlayScalarMapperLegend.h" #include "cvfPart.h" #include "cvfScene.h" +#include "cvfTransform.h" #include "cvfViewport.h" #include "cvfqtUtils.h" @@ -84,9 +85,6 @@ RimGeoMechView::RimGeoMechView(void) m_propertyFilterCollection = new RimGeoMechPropertyFilterCollection(); m_propertyFilterCollection.uiCapability()->setUiHidden(true); - //this->cellResult()->setReservoirView(this); - this->cellResult()->legendConfig()->setReservoirView(this); - m_scaleTransform = new cvf::Transform(); m_vizLogic = new RivGeoMechVizLogic(this); } @@ -102,28 +100,6 @@ RimGeoMechView::~RimGeoMechView(void) delete m_propertyFilterCollection; } - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimGeoMechView::updateViewerWidgetWindowTitle() -{ - if (m_viewer) - { - QString windowTitle; - if (m_geomechCase.notNull()) - { - windowTitle = QString("%1 - %2").arg(m_geomechCase->caseUserDescription()).arg(name); - } - else - { - windowTitle = name; - } - - m_viewer->layoutWidget()->setWindowTitle(windowTitle); - } -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -159,7 +135,7 @@ void RimGeoMechView::loadDataAndUpdate() progress.incrementProgress(); progress.setProgressDescription("Create Display model"); - updateViewerWidget(); + updateMdiWindowVisibility(); this->geoMechPropertyFilterCollection()->loadAndInitializePropertyFilters(); @@ -257,7 +233,6 @@ void RimGeoMechView::createDisplayModel() if (isTimeStepDependentDataVisible()) { - m_viewer->animationControl()->setCurrentFrameOnly(m_currentTimeStep); m_viewer->setCurrentFrame(m_currentTimeStep); } else @@ -502,33 +477,6 @@ cvf::Transform* RimGeoMechView::scaleTransform() void RimGeoMechView::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) { RimView::fieldChangedByUi(changedField, oldValue, newValue); - - if (changedField == &showWindow) - { - if (showWindow) - { - bool generateDisplayModel = (viewer() == NULL); - updateViewerWidget(); - - if (generateDisplayModel) - { - scheduleCreateDisplayModelAndRedraw(); - } - } - else - { - if (m_viewer) - { - this->setMdiWindowGeometry( RiuMainWindow::instance()->windowGeometryForViewer(m_viewer->layoutWidget())); - - RiuMainWindow::instance()->removeViewer(m_viewer->layoutWidget()); - delete m_viewer; - m_viewer = NULL; - } - } - - this->updateUiIconFromToggleField(); - } } //-------------------------------------------------------------------------------------------------- @@ -536,6 +484,7 @@ void RimGeoMechView::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c //-------------------------------------------------------------------------------------------------- void RimGeoMechView::initAfterRead() { + RimViewWindow::initAfterRead(); this->cellResult()->setGeoMechCase(m_geomechCase); this->updateUiIconFromToggleField(); @@ -692,7 +641,7 @@ void RimGeoMechView::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering uiTreeOrdering.add(m_rangeFilterCollection()); uiTreeOrdering.add(m_propertyFilterCollection()); - uiTreeOrdering.setForgetRemainingFields(true); + uiTreeOrdering.skipRemainingChildren(true); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimGeoMechView.h b/ApplicationCode/ProjectDataModel/RimGeoMechView.h index a28aae99a4..0f59007179 100644 --- a/ApplicationCode/ProjectDataModel/RimGeoMechView.h +++ b/ApplicationCode/ProjectDataModel/RimGeoMechView.h @@ -99,7 +99,6 @@ class RimGeoMechView : public RimView virtual void updateCurrentTimeStep(); virtual void updateStaticCellColors(); - virtual void updateViewerWidgetWindowTitle(); virtual void resetLegendsInViewer(); void updateLegends(); diff --git a/ApplicationCode/ProjectDataModel/RimGeometrySelectionItem.cpp b/ApplicationCode/ProjectDataModel/RimGeometrySelectionItem.cpp new file mode 100644 index 0000000000..e29ec5fff6 --- /dev/null +++ b/ApplicationCode/ProjectDataModel/RimGeometrySelectionItem.cpp @@ -0,0 +1,38 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimGeometrySelectionItem.h" + + +CAF_PDM_XML_ABSTRACT_SOURCE_INIT(RimGeometrySelectionItem, "GeometrySelectionItem"); + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimGeometrySelectionItem::RimGeometrySelectionItem() +{ +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimGeometrySelectionItem::~RimGeometrySelectionItem() +{ + +} diff --git a/ApplicationCode/ProjectDataModel/RimGeometrySelectionItem.h b/ApplicationCode/ProjectDataModel/RimGeometrySelectionItem.h new file mode 100644 index 0000000000..57ddd966ad --- /dev/null +++ b/ApplicationCode/ProjectDataModel/RimGeometrySelectionItem.h @@ -0,0 +1,32 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafPdmObject.h" + +class RimGeometrySelectionItem : public caf::PdmObject +{ + CAF_PDM_HEADER_INIT; +public: + RimGeometrySelectionItem(); + virtual ~RimGeometrySelectionItem(); + + virtual QString geometrySelectionText() const = 0; +}; + diff --git a/ApplicationCode/ProjectDataModel/RimGridCollection.cpp b/ApplicationCode/ProjectDataModel/RimGridCollection.cpp index 5ccf7522ab..4c1e9c23e1 100644 --- a/ApplicationCode/ProjectDataModel/RimGridCollection.cpp +++ b/ApplicationCode/ProjectDataModel/RimGridCollection.cpp @@ -61,7 +61,7 @@ void RimGridCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField this->firstAncestorOrThisOfType(rimView); CVF_ASSERT(rimView); - rimView->showGridCells(isActive); + if (rimView) rimView->showGridCells(isActive); updateUiIconFromState(isActive); } diff --git a/ApplicationCode/ProjectDataModel/RimGridTimeHistoryCurve.cpp b/ApplicationCode/ProjectDataModel/RimGridTimeHistoryCurve.cpp new file mode 100644 index 0000000000..e9ac2b3c6f --- /dev/null +++ b/ApplicationCode/ProjectDataModel/RimGridTimeHistoryCurve.cpp @@ -0,0 +1,663 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimGridTimeHistoryCurve.h" + +#include "RiaApplication.h" + +#include "RigCaseCellResultsData.h" +#include "RigEclipseCaseData.h" +#include "RigMainGrid.h" +#include "RigTimeHistoryResultAccessor.h" + +#include "RimEclipseCase.h" +#include "RimEclipseCellColors.h" +#include "RimEclipseResultDefinition.h" +#include "RimEclipseGeometrySelectionItem.h" +#include "RimEclipseView.h" +#include "RimGeoMechCase.h" +#include "RimGeoMechGeometrySelectionItem.h" +#include "RimGeoMechResultDefinition.h" +#include "RimGeoMechView.h" +#include "RimProject.h" +#include "RimReservoirCellResultsStorage.h" +#include "RimSummaryPlot.h" +#include "RimSummaryTimeAxisProperties.h" + +#include "RiuFemTimeHistoryResultAccessor.h" +#include "RiuLineSegmentQwtPlotCurve.h" +#include "RiuSelectionManager.h" + +#include "qwt_plot.h" + +CAF_PDM_SOURCE_INIT(RimGridTimeHistoryCurve, "GridTimeHistoryCurve"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimGridTimeHistoryCurve::RimGridTimeHistoryCurve() +{ + CAF_PDM_InitObject("Grid Time History Curve", ":/SummaryCurve16x16.png", "", ""); + + CAF_PDM_InitFieldNoDefault(&m_geometrySelectionText, "GeometrySelectionText", "Cell Reference", "", "", ""); + m_geometrySelectionText.registerGetMethod(this, &RimGridTimeHistoryCurve::geometrySelectionText); + m_geometrySelectionText.uiCapability()->setUiReadOnly(true); + + CAF_PDM_InitFieldNoDefault(&m_eclipseResultDefinition, "EclipseResultDefinition", "Eclipse Result definition", "", "", ""); + m_eclipseResultDefinition.uiCapability()->setUiHidden(true); + m_eclipseResultDefinition.uiCapability()->setUiTreeChildrenHidden(true); + + CAF_PDM_InitFieldNoDefault(&m_geoMechResultDefinition, "GeoMechResultDefinition", "GeoMech Result definition", "", "", ""); + m_geoMechResultDefinition.uiCapability()->setUiHidden(true); + m_geoMechResultDefinition.uiCapability()->setUiTreeChildrenHidden(true); + + CAF_PDM_InitFieldNoDefault(&m_geometrySelectionItem, "GeometrySelectionItem", "Geometry Selection", "", "", ""); + m_geometrySelectionItem.uiCapability()->setUiTreeHidden(true); + m_geometrySelectionItem.uiCapability()->setUiTreeChildrenHidden(true); + + CAF_PDM_InitField(&m_plotAxis, "PlotAxis", caf::AppEnum< RimDefines::PlotAxis >(RimDefines::PLOT_AXIS_LEFT), "Axis", "", "", ""); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimGridTimeHistoryCurve::~RimGridTimeHistoryCurve() +{ +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimGridTimeHistoryCurve::setFromSelectionItem(const RiuSelectionItem* selectionItem) +{ + if (m_geometrySelectionItem()) + { + delete m_geometrySelectionItem(); + } + + if (m_eclipseResultDefinition()) + { + delete m_eclipseResultDefinition(); + } + + if (m_geoMechResultDefinition()) + { + delete m_geoMechResultDefinition(); + } + + const RiuEclipseSelectionItem* eclSelectionItem = dynamic_cast(selectionItem); + if (eclSelectionItem) + { + RimEclipseGeometrySelectionItem* geomSelectionItem = new RimEclipseGeometrySelectionItem; + m_geometrySelectionItem = geomSelectionItem; + + geomSelectionItem->setFromSelectionItem(eclSelectionItem); + + if (eclSelectionItem->m_view) + { + m_eclipseResultDefinition = new RimEclipseResultDefinition; + m_eclipseResultDefinition->simpleCopy(eclSelectionItem->m_view->cellResult()); + } + } + + const RiuGeoMechSelectionItem* geoMechSelectionItem = dynamic_cast(selectionItem); + if (geoMechSelectionItem) + { + RimGeoMechGeometrySelectionItem* geomSelectionItem = new RimGeoMechGeometrySelectionItem; + m_geometrySelectionItem = geomSelectionItem; + + geomSelectionItem->setFromSelectionItem(geoMechSelectionItem); + + if (geoMechSelectionItem->m_view) + { + m_geoMechResultDefinition = new RimGeoMechResultDefinition; + m_geoMechResultDefinition->setGeoMechCase(geoMechSelectionItem->m_view->geoMechCase()); + m_geoMechResultDefinition->setResultAddress(geoMechSelectionItem->m_view->cellResultResultDefinition()->resultAddress()); + } + } + + updateResultDefinitionFromCase(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimDefines::PlotAxis RimGridTimeHistoryCurve::yAxis() const +{ + return m_plotAxis(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimGridTimeHistoryCurve::setYAxis(RimDefines::PlotAxis plotAxis) +{ + m_plotAxis = plotAxis; + + updateQwtPlotAxis(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimGridTimeHistoryCurve::yValues() const +{ + std::vector values; + + RimEclipseGeometrySelectionItem* eclTopItem = eclipseGeomSelectionItem(); + if (eclTopItem && eclTopItem->eclipseCase()) + { + size_t cellIndex = eclTopItem->cellIndex(); + size_t gridIndex = eclTopItem->gridIndex(); + + CVF_ASSERT(m_eclipseResultDefinition()); + m_eclipseResultDefinition->loadResult(); + + RimReservoirCellResultsStorage* cellResStorage = m_eclipseResultDefinition->currentGridCellResults(); + RigCaseCellResultsData* cellResultsData = cellResStorage->cellResults(); + + std::vector timeStepDates = cellResultsData->timeStepDates(); + + values = RigTimeHistoryResultAccessor::timeHistoryValues(eclTopItem->eclipseCase()->eclipseCaseData(), m_eclipseResultDefinition(), gridIndex, cellIndex, timeStepDates.size()); + } + + if (geoMechGeomSelectionItem() && geoMechGeomSelectionItem()->geoMechCase()) + { + std::unique_ptr timeHistResultAccessor = femTimeHistoryResultAccessor(); + + if (timeHistResultAccessor) + { + values = timeHistResultAccessor->timeHistoryValues(); + } + } + + return values; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimGridTimeHistoryCurve::quantityName() const +{ + RimEclipseGeometrySelectionItem* eclTopItem = eclipseGeomSelectionItem(); + if (eclTopItem) + { + CVF_ASSERT(m_eclipseResultDefinition()); + + return m_eclipseResultDefinition->resultVariableUiName(); + } + + if (geoMechGeomSelectionItem()) + { + CVF_ASSERT(m_geoMechResultDefinition()); + + RimGeoMechGeometrySelectionItem* geoMechTopItem = geoMechGeomSelectionItem(); + std::unique_ptr timeHistResultAccessor = femTimeHistoryResultAccessor(); + + QString text; + + caf::AppEnum resPosAppEnum = m_geoMechResultDefinition()->resultPositionType(); + text.append(resPosAppEnum.uiText() + ", "); + text.append(m_geoMechResultDefinition()->resultFieldUiName() + ", "); + text.append(m_geoMechResultDefinition()->resultComponentUiName() + " "); + + if (resPosAppEnum == RIG_ELEMENT_NODAL_FACE) + { + if (geoMechTopItem->m_elementFace >= 0) + { + text.append(", " + caf::AppEnum::textFromIndex(geoMechTopItem->m_elementFace)); + } + else + { + text.append(", from N[" + QString::number(timeHistResultAccessor->closestNodeId()) + "] transformed onto intersection"); + } + } + + return text; + } + + return ""; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimGridTimeHistoryCurve::caseName() const +{ + RimEclipseGeometrySelectionItem* eclTopItem = eclipseGeomSelectionItem(); + if (eclTopItem && eclTopItem->eclipseCase()) + { + return eclTopItem->eclipseCase()->caseUserDescription(); + } + + RimGeoMechGeometrySelectionItem* geoMechTopItem = geoMechGeomSelectionItem(); + if (geoMechTopItem && geoMechTopItem->geoMechCase()) + { + return geoMechTopItem->geoMechCase()->caseUserDescription(); + } + + return ""; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimGridTimeHistoryCurve::createCurveAutoName() +{ + QString text; + + text += quantityName(); + + QString topoText = geometrySelectionText(); + + if (!topoText.isEmpty()) + { + text += ", "; + text += topoText; + } + + return text; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimGridTimeHistoryCurve::updateZoomInParentPlot() +{ + RimSummaryPlot* plot = nullptr; + firstAncestorOrThisOfType(plot); + + plot->updateZoomInQwt(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimGridTimeHistoryCurve::onLoadDataAndUpdate() +{ + this->RimPlotCurve::updateCurvePresentation(); + + if (isCurveVisible()) + { + std::vector values; + + RimEclipseGeometrySelectionItem* eclTopItem = eclipseGeomSelectionItem(); + if (eclTopItem && eclTopItem->eclipseCase()) + { + m_eclipseResultDefinition->loadResult(); + } + + RimGeoMechGeometrySelectionItem* geoMechTopItem = geoMechGeomSelectionItem(); + if (geoMechTopItem && geoMechTopItem->geoMechCase()) + { + m_geoMechResultDefinition->loadResult(); + } + + values = yValues(); + + RimSummaryPlot* plot = nullptr; + firstAncestorOrThisOfType(plot); + bool isLogCurve = plot->isLogarithmicScaleEnabled(this->yAxis()); + + if (plot->timeAxisProperties()->timeMode() == RimSummaryTimeAxisProperties::DATE) + { + std::vector dateTimes = timeStepValues(); + if (dateTimes.size() > 0 && dateTimes.size() == values.size()) + { + m_qwtPlotCurve->setSamplesFromTimeTAndValues(dateTimes, values, isLogCurve); + } + else + { + m_qwtPlotCurve->setSamplesFromTimeTAndValues(std::vector(), std::vector(), isLogCurve); + } + } + else + { + std::vector days = daysSinceSimulationStart(); + if (days.size() > 0 && days.size() == values.size()) + { + double timeScale = plot->timeAxisProperties()->fromDaysToDisplayUnitScale(); + + std::vector times; + for (double day : days) + { + times.push_back(timeScale * day); + } + + m_qwtPlotCurve->setSamplesFromTimeAndValues(times, values, isLogCurve); + } + else + { + m_qwtPlotCurve->setSamplesFromTimeTAndValues(std::vector(), std::vector(), isLogCurve); + } + } + + updateZoomInParentPlot(); + + if (m_parentQwtPlot) m_parentQwtPlot->replot(); + + updateQwtPlotAxis(); + plot->updateAxes(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimGridTimeHistoryCurve::timeStepValues() const +{ + std::vector dateTimes; + + RimEclipseGeometrySelectionItem* eclTopItem = eclipseGeomSelectionItem(); + if (eclTopItem && eclTopItem->eclipseCase()) + { + RimReservoirCellResultsStorage* cellResStorage = m_eclipseResultDefinition->currentGridCellResults(); + RigCaseCellResultsData* cellResultsData = cellResStorage->cellResults(); + + std::vector timeStepDates = cellResultsData->timeStepDates(); + + for (QDateTime dt : timeStepDates) + { + dateTimes.push_back(dt.toTime_t()); + } + } + + RimGeoMechGeometrySelectionItem* geoMechTopItem = geoMechGeomSelectionItem(); + if (geoMechTopItem && geoMechTopItem->geoMechCase()) + { + std::unique_ptr timeHistResultAccessor = femTimeHistoryResultAccessor(); + if (timeHistResultAccessor) + { + std::vector values = timeHistResultAccessor->timeHistoryValues(); + + QStringList stepNames = geoMechTopItem->geoMechCase()->timeStepStrings(); + std::vector dates = RimGeoMechCase::dateTimeVectorFromTimeStepStrings(stepNames); + if (dates.size() == values.size()) + { + for (QDateTime dt : dates) + { + dateTimes.push_back(dt.toTime_t()); + } + } + else + { + for (size_t i = 0; i < values.size(); i++) + { + dateTimes.push_back(i); + } + } + } + } + + return dateTimes; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimGridTimeHistoryCurve::daysSinceSimulationStart() const +{ + std::vector daysSinceSimulationStart; + RimEclipseGeometrySelectionItem* eclTopItem = eclipseGeomSelectionItem(); + if (eclTopItem && eclTopItem->eclipseCase()) + { + RimReservoirCellResultsStorage* cellResStorage = m_eclipseResultDefinition->currentGridCellResults(); + RigCaseCellResultsData* cellResultsData = cellResStorage->cellResults(); + + daysSinceSimulationStart = cellResultsData->daysSinceSimulationStart(); + } + + RimGeoMechGeometrySelectionItem* geoMechTopItem = geoMechGeomSelectionItem(); + if (geoMechTopItem && geoMechTopItem->geoMechCase()) + { + std::unique_ptr timeHistResultAccessor = femTimeHistoryResultAccessor(); + if (timeHistResultAccessor) + { + std::vector values = timeHistResultAccessor->timeHistoryValues(); + + QStringList stepNames = geoMechTopItem->geoMechCase()->timeStepStrings(); + std::vector dates = RimGeoMechCase::dateTimeVectorFromTimeStepStrings(stepNames); + if (dates.size() == values.size()) + { + if (!dates.empty()) { + time_t startDate = dates[0].toTime_t(); + double secondsToDaysConversion = (24.0 * 60.0 * 60.0); + for (QDateTime dt : dates) + { + double timeDifference = static_cast(dt.toTime_t() - startDate); + daysSinceSimulationStart.push_back(timeDifference / secondsToDaysConversion); + } + } + } + else + { + for (size_t i = 0; i < values.size(); i++) + { + daysSinceSimulationStart.push_back(i); + } + } + } + } + + return daysSinceSimulationStart; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimGridTimeHistoryCurve::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) +{ + RimPlotCurve::updateOptionSensitivity(); + + uiOrdering.add(&m_geometrySelectionText); + + // Fields declared in RimResultDefinition + caf::PdmUiGroup* group1 = uiOrdering.addNewGroup("Result"); + if (eclipseGeomSelectionItem()) + { + CVF_ASSERT(m_eclipseResultDefinition()); + m_eclipseResultDefinition->uiOrdering(uiConfigName, *group1); + } + + if (geoMechGeomSelectionItem()) + { + CVF_ASSERT(m_geoMechResultDefinition()); + m_geoMechResultDefinition->uiOrdering(uiConfigName, *group1); + } + + uiOrdering.add(&m_plotAxis); + + caf::PdmUiGroup* appearanceGroup = uiOrdering.addNewGroup("Appearance"); + RimPlotCurve::appearanceUiOrdering(*appearanceGroup); + + caf::PdmUiGroup* nameGroup = uiOrdering.addNewGroup("Curve Name"); + nameGroup->setCollapsedByDefault(true); + nameGroup->add(&m_showLegend); + RimPlotCurve::curveNameUiOrdering(*nameGroup); + +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimGridTimeHistoryCurve::initAfterRead() +{ + updateResultDefinitionFromCase(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimGridTimeHistoryCurve::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) +{ + if (changedField == &m_plotAxis) + { + updateQwtPlotAxis(); + + RimSummaryPlot* plot = nullptr; + firstAncestorOrThisOfTypeAsserted(plot); + + plot->updateAxes(); + } + else + { + RimPlotCurve::fieldChangedByUi(changedField, oldValue, newValue); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigMainGrid* RimGridTimeHistoryCurve::mainGrid() +{ + if (eclipseGeomSelectionItem() && eclipseGeomSelectionItem()->eclipseCase() && eclipseGeomSelectionItem()->eclipseCase()->eclipseCaseData()) + { + return eclipseGeomSelectionItem()->eclipseCase()->eclipseCaseData()->mainGrid(); + } + + return nullptr; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimEclipseGeometrySelectionItem* RimGridTimeHistoryCurve::eclipseGeomSelectionItem() const +{ + RimGeometrySelectionItem* pickItem = m_geometrySelectionItem(); + + return dynamic_cast(pickItem); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimGeoMechGeometrySelectionItem* RimGridTimeHistoryCurve::geoMechGeomSelectionItem() const +{ + RimGeometrySelectionItem* pickItem = m_geometrySelectionItem(); + + return dynamic_cast(pickItem); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimGridTimeHistoryCurve::updateResultDefinitionFromCase() +{ + if (eclipseGeomSelectionItem()) + { + CVF_ASSERT(m_eclipseResultDefinition()); + + m_eclipseResultDefinition->setEclipseCase(eclipseGeomSelectionItem()->eclipseCase()); + } + + if (geoMechGeomSelectionItem()) + { + CVF_ASSERT(m_geoMechResultDefinition()); + + m_geoMechResultDefinition->setGeoMechCase(geoMechGeomSelectionItem()->geoMechCase()); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimGridTimeHistoryCurve::geometrySelectionText() const +{ + QString text; + + if (eclipseGeomSelectionItem() && m_geometrySelectionItem()) + { + text = m_geometrySelectionItem->geometrySelectionText(); + } + else if (geoMechGeomSelectionItem()) + { + std::unique_ptr timeHistResultAccessor = femTimeHistoryResultAccessor(); + if (timeHistResultAccessor) + { + text = timeHistResultAccessor->geometrySelectionText(); + } + } + else + { + text = "No Geometry"; + } + + return text; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimGridTimeHistoryCurve::updateQwtPlotAxis() +{ + if (m_qwtPlotCurve) + { + if (this->yAxis() == RimDefines::PLOT_AXIS_LEFT) + { + m_qwtPlotCurve->setYAxis(QwtPlot::yLeft); + } + else + { + m_qwtPlotCurve->setYAxis(QwtPlot::yRight); + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::unique_ptr RimGridTimeHistoryCurve::femTimeHistoryResultAccessor() const +{ + std::unique_ptr timeHistResultAccessor; + + if ( geoMechGeomSelectionItem() + && geoMechGeomSelectionItem()->geoMechCase() + && geoMechGeomSelectionItem()->geoMechCase()->geoMechData()) + { + RimGeoMechGeometrySelectionItem* geoMechTopItem = geoMechGeomSelectionItem(); + if (geoMechTopItem->m_hasIntersectionTriangle) + { + std::array intersectionTriangle; + intersectionTriangle[0] = cvf::Vec3f(geoMechTopItem->m_intersectionTriangle_0()); + intersectionTriangle[1] = cvf::Vec3f(geoMechTopItem->m_intersectionTriangle_1()); + intersectionTriangle[2] = cvf::Vec3f(geoMechTopItem->m_intersectionTriangle_2()); + + timeHistResultAccessor = std::unique_ptr( + new RiuFemTimeHistoryResultAccessor(geoMechTopItem->geoMechCase()->geoMechData(), + m_geoMechResultDefinition()->resultAddress(), + geoMechTopItem->m_gridIndex, + static_cast(geoMechTopItem->m_cellIndex), + geoMechTopItem->m_elementFace, + geoMechTopItem->m_localIntersectionPoint, + intersectionTriangle)); + } + else + { + timeHistResultAccessor = std::unique_ptr( + new RiuFemTimeHistoryResultAccessor(geoMechTopItem->geoMechCase()->geoMechData(), + m_geoMechResultDefinition()->resultAddress(), + geoMechTopItem->m_gridIndex, + static_cast(geoMechTopItem->m_cellIndex), + geoMechTopItem->m_elementFace, + geoMechTopItem->m_localIntersectionPoint)); + } + + } + + return timeHistResultAccessor; +} diff --git a/ApplicationCode/ProjectDataModel/RimGridTimeHistoryCurve.h b/ApplicationCode/ProjectDataModel/RimGridTimeHistoryCurve.h new file mode 100644 index 0000000000..94e9aa7181 --- /dev/null +++ b/ApplicationCode/ProjectDataModel/RimGridTimeHistoryCurve.h @@ -0,0 +1,93 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// +#pragma once + +#include "RimPlotCurve.h" + +#include "RimDefines.h" + +#include "cafPdmChildField.h" +#include "cafPdmProxyValueField.h" +#include "cafPdmPtrField.h" + +#include + +class RigMainGrid; +class RimEclipseCase; +class RimEclipseResultDefinition; +class RimEclipseGeometrySelectionItem; +class RimGeoMechResultDefinition; +class RimGeoMechGeometrySelectionItem; +class RimGeometrySelectionItem; +class RiuFemTimeHistoryResultAccessor; +class RiuSelectionItem; + +//================================================================================================== +/// +/// +//================================================================================================== +class RimGridTimeHistoryCurve : public RimPlotCurve +{ + CAF_PDM_HEADER_INIT; +public: + +public: + RimGridTimeHistoryCurve(); + virtual ~RimGridTimeHistoryCurve(); + + void setFromSelectionItem(const RiuSelectionItem* selectionItem); + RimDefines::PlotAxis yAxis() const; + void setYAxis(RimDefines::PlotAxis plotAxis); + + std::vector yValues() const; + std::vector timeStepValues() const; + std::vector daysSinceSimulationStart() const; + + QString quantityName() const; + QString caseName() const; + +protected: + virtual QString createCurveAutoName() override; + virtual void updateZoomInParentPlot() override; + virtual void onLoadDataAndUpdate() override; + + + virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override; + virtual void initAfterRead() override; + virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override; + +private: + RigMainGrid* mainGrid(); + RimEclipseGeometrySelectionItem* eclipseGeomSelectionItem() const; + RimGeoMechGeometrySelectionItem* geoMechGeomSelectionItem() const; + void updateResultDefinitionFromCase(); + QString geometrySelectionText() const; + void updateQwtPlotAxis(); + + std::unique_ptr femTimeHistoryResultAccessor() const; + +private: + caf::PdmProxyValueField m_geometrySelectionText; + + caf::PdmChildField m_eclipseResultDefinition; + caf::PdmChildField m_geoMechResultDefinition; + + caf::PdmChildField m_geometrySelectionItem; + caf::PdmField< caf::AppEnum< RimDefines::PlotAxis > > m_plotAxis; +}; + diff --git a/ApplicationCode/ProjectDataModel/RimIdenticalGridCaseGroup.cpp b/ApplicationCode/ProjectDataModel/RimIdenticalGridCaseGroup.cpp index 671aadd93d..c68751c22d 100644 --- a/ApplicationCode/ProjectDataModel/RimIdenticalGridCaseGroup.cpp +++ b/ApplicationCode/ProjectDataModel/RimIdenticalGridCaseGroup.cpp @@ -22,22 +22,26 @@ #include "RigActiveCellInfo.h" #include "RigCaseCellResultsData.h" -#include "RigCaseData.h" +#include "RigCaseCellResultsData.h" +#include "RigEclipseCaseData.h" #include "RigGridManager.h" -#include "RimEclipseCase.h" +#include "RigMainGrid.h" + #include "RimCaseCollection.h" #include "RimCellEdgeColors.h" -#include "RimReservoirCellResultsStorage.h" -#include "RimEclipseView.h" -#include "RimEclipseResultCase.h" +#include "RimEclipseCase.h" #include "RimEclipseCellColors.h" +#include "RimEclipseResultCase.h" #include "RimEclipseStatisticsCase.h" -#include "RigCaseCellResultsData.h" +#include "RimEclipseView.h" +#include "RimReservoirCellResultsStorage.h" -#include "cafProgressInfo.h" #include "RiuMainWindow.h" -#include + +#include "cafProgressInfo.h" + #include +#include CAF_PDM_SOURCE_INIT(RimIdenticalGridCaseGroup, "RimIdenticalGridCaseGroup"); @@ -98,11 +102,11 @@ void RimIdenticalGridCaseGroup::addCase(RimEclipseCase* reservoir) if (!m_mainGrid) { - m_mainGrid = reservoir->reservoirData()->mainGrid(); + m_mainGrid = reservoir->eclipseCaseData()->mainGrid(); } else { - reservoir->reservoirData()->setMainGrid(m_mainGrid); + reservoir->eclipseCaseData()->setMainGrid(m_mainGrid); } caseCollection()->reservoirs().push_back(reservoir); @@ -177,7 +181,7 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo() return; } - RigCaseData* rigCaseData = mainCase->reservoirData(); + RigEclipseCaseData* rigCaseData = mainCase->eclipseCaseData(); CVF_ASSERT(rigCaseData); RifReaderInterface::PorosityModelResultType poroModel = RifReaderInterface::MATRIX_RESULTS; @@ -235,6 +239,9 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo() RifReaderInterface::PorosityModelResultType poroModel = RifReaderInterface::MATRIX_RESULTS; std::vector timeStepDates = rigCaseData->results(poroModel)->timeStepDates(0); + std::vector daysSinceSimulationStart = rigCaseData->results(poroModel)->daysSinceSimulationStart(0); + std::vector reportStepNumbers = rigCaseData->results(poroModel)->reportStepNumbers(0); + const std::vector resultInfos = rigCaseData->results(poroModel)->infoForEachResultIndex(); for (size_t i = 1; i < caseCollection()->reservoirs.size(); i++) @@ -258,7 +265,7 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo() if (mustBeCalculated) cellResultsStorage->cellResults()->setMustBeCalculated(scalarResultIndex); - cellResultsStorage->cellResults()->setTimeStepDates(scalarResultIndex, timeStepDates); + cellResultsStorage->cellResults()->setTimeStepDates(scalarResultIndex, timeStepDates, daysSinceSimulationStart, reportStepNumbers); std::vector< std::vector >& dataValues = cellResultsStorage->cellResults()->cellScalarResults(scalarResultIndex); dataValues.resize(timeStepDates.size()); @@ -279,7 +286,7 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo() if (i == 0) { - rimReservoir->reservoirData()->computeActiveCellBoundingBoxes(); + rimReservoir->eclipseCaseData()->computeActiveCellBoundingBoxes(); } } } @@ -325,7 +332,7 @@ void RimIdenticalGridCaseGroup::computeUnionOfActiveCells() if (activeM[gridLocalCellIndex] == 0) { - if (caseCollection->reservoirs[caseIdx]->reservoirData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->isActive(reservoirCellIndex)) + if (caseCollection->reservoirs[caseIdx]->eclipseCaseData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->isActive(reservoirCellIndex)) { activeM[gridLocalCellIndex] = 1; } @@ -333,7 +340,7 @@ void RimIdenticalGridCaseGroup::computeUnionOfActiveCells() if (activeF[gridLocalCellIndex] == 0) { - if (caseCollection->reservoirs[caseIdx]->reservoirData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->isActive(reservoirCellIndex)) + if (caseCollection->reservoirs[caseIdx]->eclipseCaseData()->activeCellInfo(RifReaderInterface::FRACTURE_RESULTS)->isActive(reservoirCellIndex)) { activeF[gridLocalCellIndex] = 1; } @@ -381,6 +388,7 @@ RimEclipseStatisticsCase* RimIdenticalGridCaseGroup::createAndAppendStatisticsCa newStatisticsCase->populateResultSelectionAfterLoadingGrid(); newStatisticsCase->openEclipseGridFile(); + newStatisticsCase->eclipseCaseData()->computeActiveCellBoundingBoxes(); return newStatisticsCase; } @@ -394,13 +402,13 @@ void RimIdenticalGridCaseGroup::updateMainGridAndActiveCellsForStatisticsCases() { RimEclipseCase* rimStaticsCase = statisticsCaseCollection->reservoirs[i]; - if (rimStaticsCase->reservoirData()) + if (rimStaticsCase->eclipseCaseData()) { - rimStaticsCase->reservoirData()->setMainGrid(this->mainGrid()); + rimStaticsCase->eclipseCaseData()->setMainGrid(this->mainGrid()); if (i == 0) { - rimStaticsCase->reservoirData()->computeActiveCellBoundingBoxes(); + rimStaticsCase->eclipseCaseData()->computeActiveCellBoundingBoxes(); } } } @@ -515,7 +523,7 @@ RimEclipseCase* RimIdenticalGridCaseGroup::mainCase() //-------------------------------------------------------------------------------------------------- bool RimIdenticalGridCaseGroup::canCaseBeAdded(RimEclipseCase* reservoir) const { - CVF_ASSERT(reservoir && reservoir->reservoirData() && reservoir->reservoirData()->mainGrid()); + CVF_ASSERT(reservoir && reservoir->eclipseCaseData() && reservoir->eclipseCaseData()->mainGrid()); if (!m_mainGrid) { @@ -523,7 +531,7 @@ bool RimIdenticalGridCaseGroup::canCaseBeAdded(RimEclipseCase* reservoir) const return true; } - RigMainGrid* incomingMainGrid = reservoir->reservoirData()->mainGrid(); + RigMainGrid* incomingMainGrid = reservoir->eclipseCaseData()->mainGrid(); if (RigGridManager::isEqual(m_mainGrid, incomingMainGrid)) { diff --git a/ApplicationCode/ProjectDataModel/RimIntersection.cpp b/ApplicationCode/ProjectDataModel/RimIntersection.cpp index 793043f292..5506f75758 100644 --- a/ApplicationCode/ProjectDataModel/RimIntersection.cpp +++ b/ApplicationCode/ProjectDataModel/RimIntersection.cpp @@ -22,6 +22,7 @@ #include "RiaApplication.h" #include "RigSimulationWellCenterLineCalculator.h" +#include "RigWellPath.h" #include "RimCase.h" #include "RimEclipseView.h" @@ -29,6 +30,7 @@ #include "RimEclipseWellCollection.h" #include "RimOilField.h" #include "RimProject.h" +#include "RimTools.h" #include "RimView.h" #include "RimWellPath.h" @@ -40,6 +42,9 @@ #include "cafPdmUiListEditor.h" #include "cafPdmUiPushButtonEditor.h" +#include "cvfBoundingBox.h" +#include "cvfPlane.h" + namespace caf { @@ -223,7 +228,7 @@ void RimIntersection::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& updateWellExtentDefaultValue(); - uiOrdering.setForgetRemainingFields(true); + uiOrdering.skipRemainingFields(true); } //-------------------------------------------------------------------------------------------------- @@ -235,21 +240,11 @@ QList RimIntersection::calculateValueOptions(const caf:: if (fieldNeedingOptions == &wellPath) { - RimProject* proj = RiaApplication::instance()->project(); - if (proj->activeOilField()->wellPathCollection()) - { - caf::PdmChildArrayField& wellPaths = proj->activeOilField()->wellPathCollection()->wellPaths; - - QIcon wellIcon(":/Well.png"); - for (size_t i = 0; i < wellPaths.size(); i++) - { - options.push_back(caf::PdmOptionItemInfo(wellPaths[i]->name(), QVariant::fromValue(caf::PdmPointer(wellPaths[i])), false, wellIcon)); - } - } + RimTools::wellPathOptionItems(&options); - if (options.size() == 0) + if (options.size() > 0) { - options.push_front(caf::PdmOptionItemInfo("None", QVariant::fromValue(caf::PdmPointer(NULL)))); + options.push_front(caf::PdmOptionItemInfo("None", nullptr)); } } else if (fieldNeedingOptions == &simulationWell) @@ -260,15 +255,15 @@ QList RimIntersection::calculateValueOptions(const caf:: caf::PdmChildArrayField& eclWells = coll->wells; QIcon simWellIcon(":/Well.png"); - for (size_t i = 0; i < eclWells.size(); i++) + for (RimEclipseWell* eclWell : eclWells) { - options.push_back(caf::PdmOptionItemInfo(eclWells[i]->name(), QVariant::fromValue(caf::PdmPointer(eclWells[i])), false, simWellIcon)); + options.push_back(caf::PdmOptionItemInfo(eclWell->name(), eclWell, false, simWellIcon)); } } if (options.size() == 0) { - options.push_front(caf::PdmOptionItemInfo("None", QVariant::fromValue(caf::PdmPointer(NULL)))); + options.push_front(caf::PdmOptionItemInfo("None", nullptr)); } } else if (fieldNeedingOptions == &m_branchIndex) @@ -400,7 +395,7 @@ void RimIntersection::updateWellCenterline() const { std::vector< std::vector > pipeBranchesCellIds; - RigSimulationWellCenterLineCalculator::calculateWellPipeCenterline(simulationWell(), m_wellBranchCenterlines, pipeBranchesCellIds); + simulationWell->calculateWellPipeStaticCenterLine(m_wellBranchCenterlines, pipeBranchesCellIds); } } else @@ -558,13 +553,16 @@ void RimIntersection::defineEditorAttribute(const caf::PdmFieldHandle* field, QS { caf::PdmUiPushButtonEditorAttribute* attrib = dynamic_cast (attribute); - if (inputPolyLineFromViewerEnabled) + if (attrib) { - attrib->m_buttonText = "Stop picking points"; - } - else - { - attrib->m_buttonText = "Start picking points"; + if (inputPolyLineFromViewerEnabled) + { + attrib->m_buttonText = "Stop picking points"; + } + else + { + attrib->m_buttonText = "Start picking points"; + } } } else if (field == &m_userPolyline) @@ -579,13 +577,16 @@ void RimIntersection::defineEditorAttribute(const caf::PdmFieldHandle* field, QS { caf::PdmUiPushButtonEditorAttribute* attrib = dynamic_cast (attribute); - if (inputExtrusionPointsFromViewerEnabled) - { - attrib->m_buttonText = "Stop picking points"; - } - else + if (attrib) { - attrib->m_buttonText = "Start picking points"; + if (inputExtrusionPointsFromViewerEnabled) + { + attrib->m_buttonText = "Stop picking points"; + } + else + { + attrib->m_buttonText = "Start picking points"; + } } } else if (field == &m_customExtrusionPoints) diff --git a/ApplicationCode/ProjectDataModel/RimIntersectionBox.cpp b/ApplicationCode/ProjectDataModel/RimIntersectionBox.cpp index 5f357ef89c..54f543a790 100644 --- a/ApplicationCode/ProjectDataModel/RimIntersectionBox.cpp +++ b/ApplicationCode/ProjectDataModel/RimIntersectionBox.cpp @@ -351,6 +351,8 @@ void RimIntersectionBox::updateBoxManipulatorGeometry() RimView* rimView = nullptr; this->firstAncestorOrThisOfType(rimView); + if (!rimView) return; + cvf::ref transForm = rimView->displayCoordTransform(); m_boxManipulator->setOrigin(transForm->transformToDisplayCoord(boxOrigin().translation())); @@ -402,14 +404,18 @@ void RimIntersectionBox::defineEditorAttribute(const caf::PdmFieldHandle* field, { caf::PdmUiPushButtonEditorAttribute* attrib = dynamic_cast (attribute); - if (m_show3DManipulator) - { - attrib->m_buttonText = "Hide 3D manipulator"; - } - else + if (attrib) { - attrib->m_buttonText = "Show 3D manipulator"; + if (m_show3DManipulator) + { + attrib->m_buttonText = "Hide 3D manipulator"; + } + else + { + attrib->m_buttonText = "Show 3D manipulator"; + } } + } } @@ -468,10 +474,12 @@ void RimIntersectionBox::initAfterRead() //-------------------------------------------------------------------------------------------------- void RimIntersectionBox::slotScheduleRedraw() { - RimView* rimView = nullptr; + RimView* rimView = NULL; this->firstAncestorOrThisOfType(rimView); - - rimView->scheduleCreateDisplayModelAndRedraw(); + if (rimView) + { + rimView->scheduleCreateDisplayModelAndRedraw(); + } } //-------------------------------------------------------------------------------------------------- @@ -516,12 +524,7 @@ void RimIntersectionBox::rebuildGeometryAndScheduleCreateDisplayModel() { m_intersectionBoxPartMgr = nullptr; - RimView* rimView = NULL; - this->firstAncestorOrThisOfType(rimView); - if (rimView) - { - rimView->scheduleCreateDisplayModelAndRedraw(); - } + slotScheduleRedraw(); } //-------------------------------------------------------------------------------------------------- @@ -633,7 +636,7 @@ cvf::BoundingBox RimIntersectionBox::currentCellBoundingBox() this->firstAncestorOrThisOfType(rimCase); CVF_ASSERT(rimCase); - + /* RimEclipseView* eclView = nullptr; this->firstAncestorOrThisOfType(eclView); @@ -645,7 +648,7 @@ cvf::BoundingBox RimIntersectionBox::currentCellBoundingBox() if(false)//useAllCells) // For now, only use the active CellsBBox. return rimCase->allCellsBoundingBox(); - else + else */ return rimCase->activeCellsBoundingBox(); } diff --git a/ApplicationCode/ProjectDataModel/RimIntersectionCollection.cpp b/ApplicationCode/ProjectDataModel/RimIntersectionCollection.cpp index 350d3bd606..096c392e18 100644 --- a/ApplicationCode/ProjectDataModel/RimIntersectionCollection.cpp +++ b/ApplicationCode/ProjectDataModel/RimIntersectionCollection.cpp @@ -191,7 +191,7 @@ void RimIntersectionCollection::fieldChangedByUi(const caf::PdmFieldHandle* chan //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RimIntersectionCollection::hasActiveIntersectionForSimulationWell(RimEclipseWell* eclipseWell) const +bool RimIntersectionCollection::hasActiveIntersectionForSimulationWell(const RimEclipseWell* eclipseWell) const { if (!isActive) return false; diff --git a/ApplicationCode/ProjectDataModel/RimIntersectionCollection.h b/ApplicationCode/ProjectDataModel/RimIntersectionCollection.h index 29866d3f11..7ff1b7bd0e 100644 --- a/ApplicationCode/ProjectDataModel/RimIntersectionCollection.h +++ b/ApplicationCode/ProjectDataModel/RimIntersectionCollection.h @@ -51,7 +51,7 @@ class RimIntersectionCollection : public caf::PdmObject void appendIntersection(RimIntersection* intersection); void appendIntersectionBox(RimIntersectionBox* intersectionBox); - bool hasActiveIntersectionForSimulationWell(RimEclipseWell* eclipseWell) const; + bool hasActiveIntersectionForSimulationWell(const RimEclipseWell* eclipseWell) const; void updateIntersectionBoxGeometry(); diff --git a/ApplicationCode/ProjectDataModel/RimLegendConfig.cpp b/ApplicationCode/ProjectDataModel/RimLegendConfig.cpp index d726b519e4..149a7acca9 100644 --- a/ApplicationCode/ProjectDataModel/RimLegendConfig.cpp +++ b/ApplicationCode/ProjectDataModel/RimLegendConfig.cpp @@ -21,11 +21,13 @@ #include "RimLegendConfig.h" #include "RiaApplication.h" +#include "RiaColorTables.h" #include "RimCellEdgeColors.h" #include "RimEclipseCellColors.h" #include "RimEclipseView.h" #include "RimGeoMechResultDefinition.h" +#include "RimViewLinker.h" #include "cafCategoryLegend.h" #include "cafCategoryMapper.h" @@ -112,7 +114,8 @@ RimLegendConfig::RimLegendConfig() m_globalAutoPosClosestToZero(0), m_globalAutoNegClosestToZero(0), m_localAutoPosClosestToZero(0), - m_localAutoNegClosestToZero(0) + m_localAutoNegClosestToZero(0), + m_isAllTimeStepsRangeDisabled(false) { CAF_PDM_InitObject("Legend Definition", ":/Legend.png", "", ""); CAF_PDM_InitField(&m_numLevels, "NumberOfLevels", 8, "Number of levels", "", "A hint on how many tick marks you whish.",""); @@ -182,7 +185,19 @@ void RimLegendConfig::fieldChangedByUi(const caf::PdmFieldHandle* changedField, updateLegend(); - if (m_reservoirView) m_reservoirView->updateCurrentTimeStepAndRedraw(); + RimView* view = nullptr; + this->firstAncestorOrThisOfType(view); + + if (view) + { + RimViewLinker* viewLinker = view->assosiatedViewLinker(); + if (viewLinker) + { + viewLinker->updateCellResult(); + } + + view->updateCurrentTimeStepAndRedraw(); + } } //-------------------------------------------------------------------------------------------------- @@ -264,129 +279,7 @@ void RimLegendConfig::updateLegend() m_logDiscreteScalarMapper->setRange(adjustedMin, adjustedMax); m_logSmoothScalarMapper->setRange(adjustedMin, adjustedMax); - cvf::Color3ubArray legendColors; - switch (m_colorRangeMode()) - { - case NORMAL: - { - legendColors.reserve(7); - legendColors.add(cvf::Color3ub( 0, 0, 255)); - legendColors.add(cvf::Color3ub( 0, 127, 255)); - legendColors.add(cvf::Color3ub( 0, 255, 255)); - legendColors.add(cvf::Color3ub( 0, 255, 0)); - legendColors.add(cvf::Color3ub(255, 255, 0)); - legendColors.add(cvf::Color3ub(255, 127, 0)); - legendColors.add(cvf::Color3ub(255, 0, 0)); - } - break; - case OPPOSITE_NORMAL: - { - legendColors.reserve(7); - legendColors.add(cvf::Color3ub(255, 0, 0)); - legendColors.add(cvf::Color3ub(255, 127, 0)); - legendColors.add(cvf::Color3ub(255, 255, 0)); - legendColors.add(cvf::Color3ub( 0, 255, 0)); - legendColors.add(cvf::Color3ub( 0, 255, 255)); - legendColors.add(cvf::Color3ub( 0, 127, 255)); - legendColors.add(cvf::Color3ub( 0, 0, 255)); - } - break; - case BLACK_WHITE: - case WHITE_BLACK: - { - legendColors.reserve(2); - if (m_colorRangeMode() == BLACK_WHITE) - { - legendColors.add(cvf::Color3ub::BLACK); - legendColors.add(cvf::Color3ub::WHITE); - } - else - { - legendColors.add(cvf::Color3ub::WHITE); - legendColors.add(cvf::Color3ub::BLACK); - } - } - break; - case PINK_WHITE: - case WHITE_PINK: - { - legendColors.reserve(2); - if (m_colorRangeMode() == PINK_WHITE) - { - legendColors.add(cvf::Color3ub::DEEP_PINK); - legendColors.add(cvf::Color3ub::WHITE); - } - else - { - legendColors.add(cvf::Color3ub::WHITE); - legendColors.add(cvf::Color3ub::DEEP_PINK); - } - } - break; - case BLUE_WHITE_RED: - case RED_WHITE_BLUE: - { - legendColors.reserve(3); - if (m_colorRangeMode() == BLUE_WHITE_RED) - { - legendColors.add(cvf::Color3ub::BLUE); - legendColors.add(cvf::Color3ub::WHITE); - legendColors.add(cvf::Color3ub::RED); - } - else - { - legendColors.add(cvf::Color3ub::RED); - legendColors.add(cvf::Color3ub::WHITE); - legendColors.add(cvf::Color3ub::BLUE); - } - } - break; - - case CATEGORY: - { - // Based on http://stackoverflow.com/questions/470690/how-to-automatically-generate-n-distinct-colors - // and Kelly Colors and sorted by hue - // See also http://www.w3schools.com/colors/ for palettes etc. - legendColors.reserve(20); - legendColors.add(cvf::Color3ub(128, 62, 117)); // hwb(310, 24%, 50%) strong_purple - legendColors.add(cvf::Color3ub(212, 28, 132)); // hwb(326, 11%, 17%) strong_purplish_red - legendColors.add(cvf::Color3ub(246, 118, 142)); // hwb(349, 46%, 4%) strong_purplish_pink - legendColors.add(cvf::Color3ub(193, 0, 32)); // hwb(350, 0%, 24%) vivid_red - legendColors.add(cvf::Color3ub(127, 24, 13)); // hwb( 6, 5%, 50%) strong_reddish_brown - legendColors.add(cvf::Color3ub(241, 58, 19)); // hwb( 11, 7%, 5%) vivid_reddish_orange - legendColors.add(cvf::Color3ub(255, 122, 92)); // hwb( 11, 36%, 0%) strong_yellowish_pink - legendColors.add(cvf::Color3ub(129, 112, 102)); // hwb( 22, 40%, 49%) medium_gray - legendColors.add(cvf::Color3ub(255, 104, 0)); // hwb( 24, 0%, 0%) vivid_orange - legendColors.add(cvf::Color3ub( 89, 51, 21)); // hwb( 26, 8%, 65%) deep_yellowish_brown - legendColors.add(cvf::Color3ub(255, 142, 0)); // hwb( 33, 0%, 0%) vivid_orange_yellow - legendColors.add(cvf::Color3ub(206, 162, 98)); // hwb( 36, 38%, 19%) grayish_yellow - legendColors.add(cvf::Color3ub(244, 200, 0)); // hwb( 49, 0%, 4%) vivid_greenish_yellow - legendColors.add(cvf::Color3ub(147, 170, 0)); // hwb( 68, 0%, 33%) vivid_yellowish_green - legendColors.add(cvf::Color3ub( 59, 84, 23)); // hwb( 85, 9%, 67%) dark_olive_green - legendColors.add(cvf::Color3ub( 0, 125, 52)); // hwb(145, 0%, 51%) vivid_green - legendColors.add(cvf::Color3ub( 54, 125, 123)); // hwb(178, 21%, 51%) vivid_blueish_green - legendColors.add(cvf::Color3ub( 0, 83, 138)); // hwb(204, 0%, 46%) strong_blue - legendColors.add(cvf::Color3ub(166, 189, 215)); // hwb(212, 65%, 16%) very_light_blue - legendColors.add(cvf::Color3ub( 46, 76, 224)); // hwb(230, 18%, 12%) medium_blue - } - break; - - case ANGULAR: - { - legendColors.reserve(9); - legendColors.add(cvf::Color3ub(255, 0, 255)); - legendColors.add(cvf::Color3ub(0, 0, 255)); - legendColors.add(cvf::Color3ub(0, 127, 255)); - legendColors.add(cvf::Color3ub(0, 255, 255)); - legendColors.add(cvf::Color3ub(0, 255, 0)); - legendColors.add(cvf::Color3ub(255, 255, 0)); - legendColors.add(cvf::Color3ub(255, 127, 0)); - legendColors.add(cvf::Color3ub(255, 0, 0)); - legendColors.add(cvf::Color3ub(255, 0, 255)); - } - break; - - } + cvf::Color3ubArray legendColors = colorArrayFromColorType(m_colorRangeMode()); m_linDiscreteScalarMapper->setColors(legendColors); m_logDiscreteScalarMapper->setColors(legendColors); @@ -415,7 +308,15 @@ void RimLegendConfig::updateLegend() break; case CATEGORY_INTEGER: m_categoryMapper->setCategoriesWithNames(m_categories, m_categoryNames); - m_categoryMapper->setInterpolateColors(legendColors); + + if (m_categoryColors.size() > 0) + { + m_categoryMapper->setCycleColors(m_categoryColors); + } + else + { + m_categoryMapper->setInterpolateColors(legendColors); + } m_currentScalarMapper = m_categoryMapper.p(); break; default: @@ -475,6 +376,21 @@ void RimLegendConfig::updateLegend() } } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimLegendConfig::disableAllTimeStepsRange(bool doDisable) +{ + // If we enable AllTimesteps, and we have used current timestep, then "restore" the default + if (m_isAllTimeStepsRangeDisabled && !doDisable && m_rangeMode == AUTOMATIC_CURRENT_TIMESTEP) m_rangeMode = AUTOMATIC_ALLTIMESTEPS; + + m_isAllTimeStepsRangeDisabled = doDisable; + + if (doDisable && m_rangeMode == AUTOMATIC_ALLTIMESTEPS) m_rangeMode = AUTOMATIC_CURRENT_TIMESTEP; + +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -571,55 +487,6 @@ void RimLegendConfig::setMappingMode(MappingType mappingType) updateLegend(); } -/* -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -cvf::ref RimLegendConfig::interpolateColorArray(const cvf::Color3ubArray& colorArray, cvf::uint targetColorCount) -{ - uint inputColorCount = static_cast(colorArray.size()); - CVF_ASSERT(inputColorCount > 1); - CVF_ASSERT(targetColorCount > 1); - - cvf::ref colors = new cvf::Color3ubArray; - colors->reserve(targetColorCount); - - const uint inputLevelCount = inputColorCount - 1; - const uint outputLevelCount = targetColorCount - 1; - - uint outputLevelIdx; - for (outputLevelIdx = 0; outputLevelIdx < outputLevelCount; outputLevelIdx++) - { - double dblInputLevelIndex = inputLevelCount * (outputLevelIdx / static_cast(outputLevelCount)); - - const uint inputLevelIndex = static_cast(dblInputLevelIndex); - CVF_ASSERT(inputLevelIndex < inputLevelCount); - - double t = dblInputLevelIndex - inputLevelIndex; - CVF_ASSERT(t >= 0 && t <= 1.0); - - cvf::Color3ub c1 = colorArray[inputLevelIndex]; - cvf::Color3ub c2 = colorArray[inputLevelIndex + 1]; - - int r = static_cast(c1.r() + t*(c2.r() - c1.r()) + 0.5); - int g = static_cast(c1.g() + t*(c2.g() - c1.g()) + 0.5); - int b = static_cast(c1.b() + t*(c2.b() - c1.b()) + 0.5); - - r = cvf::Math::clamp(r, 0, 255); - g = cvf::Math::clamp(g, 0, 255); - b = cvf::Math::clamp(b, 0, 255); - - cvf::Color3ub col((cvf::ubyte)r, (cvf::ubyte)g, (cvf::ubyte)b); - colors->add(col); - } - - colors->add(colorArray[colorArray.size() - 1]); - - return colors; -} -*/ - - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -711,6 +578,7 @@ void RimLegendConfig::setIntegerCategories(const std::vector& categories) { m_categories = categories; m_categoryNames.clear(); + m_categoryColors.clear(); updateLegend(); } @@ -730,10 +598,52 @@ void RimLegendConfig::setNamedCategoriesInverse(const std::vector& cate m_categories = nameIndices; m_categoryNames = names; + m_categoryColors.clear(); updateLegend(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimLegendConfig::setCategoryItems(const std::vector< std::tuple >& categories) +{ + m_categories.clear(); + m_categoryNames.clear(); + m_categoryColors.clear(); + m_categoryColors.reserve(categories.size()); + + for (auto item : categories) + { + m_categoryNames.push_back(cvfqt::Utils::toString(std::get<0>(item))); + m_categories.push_back(std::get<1>(item)); + m_categoryColors.add(std::get<2>(item)); + } + + updateLegend(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimLegendConfig::categoryNameFromCategoryValue(double categoryResultValue) const +{ + if (categoryResultValue == HUGE_VAL) return "Undefined"; + + if (m_categoryNames.size() > 0) + { + for (size_t categoryIndex = 0; categoryIndex < m_categories.size(); categoryIndex++) + { + if (categoryResultValue == m_categories[categoryIndex]) + { + return cvfqt::Utils::toQString(m_categoryNames[categoryIndex]); + } + } + } + + return QString("%1").arg(categoryResultValue); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -758,6 +668,59 @@ cvf::OverlayItem* RimLegendConfig::legend() } } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimLegendConfig::setUiValuesFromLegendConfig(const RimLegendConfig* otherLegendConfig) +{ + QString serializedObjectString = otherLegendConfig->writeObjectToXmlString(); + this->readObjectFromXmlString(serializedObjectString, caf::PdmDefaultObjectFactory::instance()); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +cvf::Color3ubArray RimLegendConfig::colorArrayFromColorType(ColorRangesType colorType) +{ + switch (colorType) + { + case RimLegendConfig::NORMAL: + return RiaColorTables::normalPaletteColors().color3ubArray(); + break; + case RimLegendConfig::OPPOSITE_NORMAL: + return RiaColorTables::normalPaletteOppositeOrderingColors().color3ubArray(); + break; + case RimLegendConfig::WHITE_PINK: + return RiaColorTables::whitePinkPaletteColors().color3ubArray(); + break; + case RimLegendConfig::PINK_WHITE: + return RiaColorTables::pinkWhitePaletteColors().color3ubArray(); + break; + case RimLegendConfig::WHITE_BLACK: + return RiaColorTables::whiteBlackPaletteColors().color3ubArray(); + break; + case RimLegendConfig::BLACK_WHITE: + return RiaColorTables::blackWhitePaletteColors().color3ubArray(); + break; + case RimLegendConfig::BLUE_WHITE_RED: + return RiaColorTables::blueWhiteRedPaletteColors().color3ubArray(); + break; + case RimLegendConfig::RED_WHITE_BLUE: + return RiaColorTables::redWhiteBluePaletteColors().color3ubArray(); + break; + case RimLegendConfig::CATEGORY: + return RiaColorTables::categoryPaletteColors().color3ubArray(); + break; + case RimLegendConfig::ANGULAR: + return RiaColorTables::angularPaletteColors().color3ubArray(); + break; + default: + break; + } + + return RiaColorTables::normalPaletteColors().color3ubArray(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -803,7 +766,7 @@ QList RimLegendConfig::calculateValueOptions(const caf:: } } - QList optionList; + QList options; if (fieldNeedingOptions == &m_mappingMode) { @@ -821,7 +784,7 @@ QList RimLegendConfig::calculateValueOptions(const caf:: for(MappingType mapType: mappingTypes) { - optionList.push_back(caf::PdmOptionItemInfo(MappingEnum::uiText(mapType), mapType)); + options.push_back(caf::PdmOptionItemInfo(MappingEnum::uiText(mapType), mapType)); } } else if (fieldNeedingOptions == &m_colorRangeMode) @@ -845,10 +808,18 @@ QList RimLegendConfig::calculateValueOptions(const caf:: for(ColorRangesType colType: rangeTypes) { - optionList.push_back(caf::PdmOptionItemInfo(ColorRangeEnum::uiText(colType), colType)); + options.push_back(caf::PdmOptionItemInfo(ColorRangeEnum::uiText(colType), colType)); + } + } + else if (fieldNeedingOptions == &m_rangeMode) + { + if (!m_isAllTimeStepsRangeDisabled) { + options.push_back(caf::PdmOptionItemInfo(RangeModeEnum::uiText(RimLegendConfig::AUTOMATIC_ALLTIMESTEPS), RimLegendConfig::AUTOMATIC_ALLTIMESTEPS)); } + options.push_back(caf::PdmOptionItemInfo(RangeModeEnum::uiText(RimLegendConfig::AUTOMATIC_CURRENT_TIMESTEP), RimLegendConfig::AUTOMATIC_CURRENT_TIMESTEP)); + options.push_back(caf::PdmOptionItemInfo(RangeModeEnum::uiText(RimLegendConfig::USER_DEFINED), RimLegendConfig::USER_DEFINED)); } - return optionList; + return options; } diff --git a/ApplicationCode/ProjectDataModel/RimLegendConfig.h b/ApplicationCode/ProjectDataModel/RimLegendConfig.h index c71276467e..c0bbced3e5 100644 --- a/ApplicationCode/ProjectDataModel/RimLegendConfig.h +++ b/ApplicationCode/ProjectDataModel/RimLegendConfig.h @@ -26,6 +26,8 @@ #include "cafPdmObject.h" #include "cafPdmField.h" +#include + namespace cvf { class ScalarMapperContinuousLog; @@ -57,8 +59,6 @@ class RimLegendConfig: public caf::PdmObject RimLegendConfig(); virtual ~RimLegendConfig(); - void setReservoirView(RimView* ownerReservoirView) {m_reservoirView = ownerReservoirView; } - caf::PdmField resultVariableName; // Used internally to describe the variable this legend setup is used for enum RangeModeType @@ -103,11 +103,15 @@ class RimLegendConfig: public caf::PdmObject ColorRangesType colorRangeMode() { return m_colorRangeMode();} void setMappingMode(MappingType mappingType); MappingType mappingMode() { return m_mappingMode();} + void disableAllTimeStepsRange(bool doDisable); void setAutomaticRanges(double globalMin, double globalMax, double localMin, double localMax); void setClosestToZeroValues(double globalPosClosestToZero, double globalNegClosestToZero, double localPosClosestToZero, double localNegClosestToZero); + void setIntegerCategories(const std::vector& categories); void setNamedCategoriesInverse(const std::vector& categoryNames); + void setCategoryItems(const std::vector>& categories); + QString categoryNameFromCategoryValue(double categoryResultValue) const; void setTitle(const cvf::String& title); @@ -123,13 +127,14 @@ class RimLegendConfig: public caf::PdmObject private: void updateLegend(); void updateFieldVisibility(); - cvf::ref interpolateColorArray(const cvf::Color3ubArray& colorArray, cvf::uint targetColorCount); double roundToNumSignificantDigits(double value, double precision); + friend class RimViewLinker; + void setUiValuesFromLegendConfig(const RimLegendConfig* otherLegendConfig); + + static cvf::Color3ubArray colorArrayFromColorType(ColorRangesType colorType); private: - caf::PdmPointer m_reservoirView; - cvf::ref m_linDiscreteScalarMapper; cvf::ref m_logDiscreteScalarMapper; cvf::ref m_logSmoothScalarMapper; @@ -151,8 +156,11 @@ class RimLegendConfig: public caf::PdmObject double m_localAutoPosClosestToZero; double m_localAutoNegClosestToZero; + bool m_isAllTimeStepsRangeDisabled; + std::vector m_categories; std::vector m_categoryNames; + cvf::Color3ubArray m_categoryColors; // Fields caf::PdmField m_numLevels; diff --git a/ApplicationCode/ProjectDataModel/RimMainPlotCollection.cpp b/ApplicationCode/ProjectDataModel/RimMainPlotCollection.cpp index d778da5ccf..bcc09bb545 100644 --- a/ApplicationCode/ProjectDataModel/RimMainPlotCollection.cpp +++ b/ApplicationCode/ProjectDataModel/RimMainPlotCollection.cpp @@ -19,12 +19,14 @@ #include "RimMainPlotCollection.h" +#include "RimFlowPlotCollection.h" #include "RimProject.h" #include "RimSummaryPlotCollection.h" #include "RimWellLogPlotCollection.h" #include "RiuMainWindow.h" #include "RiuProjectPropertyView.h" +#include "RimFlowCharacteristicsPlot.h" CAF_PDM_SOURCE_INIT(RimMainPlotCollection, "MainPlotCollection"); @@ -44,11 +46,13 @@ RimMainPlotCollection::RimMainPlotCollection() CAF_PDM_InitFieldNoDefault(&m_summaryPlotCollection, "SummaryPlotCollection", "Summary Plots", "", "", ""); m_summaryPlotCollection.uiCapability()->setUiHidden(true); + CAF_PDM_InitFieldNoDefault(&m_flowPlotCollection, "FlowPlotCollection", "Flow Diagnostics Plots", "", "", ""); + m_flowPlotCollection.uiCapability()->setUiHidden(true); + m_wellLogPlotCollection = new RimWellLogPlotCollection(); m_summaryPlotCollection = new RimSummaryPlotCollection(); + m_flowPlotCollection = new RimFlowPlotCollection(); - //m_plotMainWindow = NULL; - //m_plotManagerMainWindow = NULL; } //-------------------------------------------------------------------------------------------------- @@ -56,11 +60,10 @@ RimMainPlotCollection::RimMainPlotCollection() //-------------------------------------------------------------------------------------------------- RimMainPlotCollection::~RimMainPlotCollection() { - if (m_wellLogPlotCollection()) delete m_wellLogPlotCollection(); - if (m_summaryPlotCollection()) delete m_summaryPlotCollection(); + if (m_wellLogPlotCollection()) delete m_wellLogPlotCollection(); + if (m_summaryPlotCollection()) delete m_summaryPlotCollection(); + if (m_flowPlotCollection()) delete m_flowPlotCollection(); - //m_plotManagerMainWindow->close(); - //m_plotManagerMainWindow->deleteLater(); } //-------------------------------------------------------------------------------------------------- @@ -68,62 +71,9 @@ RimMainPlotCollection::~RimMainPlotCollection() //-------------------------------------------------------------------------------------------------- void RimMainPlotCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) { -#if 0 - if (changedField == &showWindow) - { - if (showWindow) - { - showPlotWindow(); - } - else - { - hidePlotWindow(); - } - } - #endif -} -#if 0 -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimMainPlotCollection::showPlotWindow() -{ - if (!m_plotManagerMainWindow) - { - m_plotManagerMainWindow = new QMainWindow; - m_plotManagerMainWindow->setDockNestingEnabled(true); - - m_plotMainWindow = new QMainWindow; - m_plotMainWindow->setDockNestingEnabled(true); - - // NOTE! setCentralWidget takes ownership of widget - m_plotManagerMainWindow->setCentralWidget(m_plotMainWindow); - - { - QDockWidget* dockWidget = new QDockWidget("Plots", m_plotManagerMainWindow); - dockWidget->setObjectName("dockWidget"); - - RiuMainWindow* mainWindow = RiuMainWindow::instance(); - - RiuProjectAndPropertyView* projPropView = new RiuProjectAndPropertyView(dockWidget); - dockWidget->setWidget(projPropView); - - RimProject* proj = NULL; - this->firstAncestorOrThisOfType(proj); - - projPropView->setPdmItem(this); - m_plotManagerMainWindow->addDockWidget(Qt::LeftDockWidgetArea, dockWidget); - } - } - - m_plotMainWindow->show(); - - m_plotManagerMainWindow->showNormal(); - m_plotManagerMainWindow->raise(); } -#endif //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -148,115 +98,31 @@ RimSummaryPlotCollection* RimMainPlotCollection::summaryPlotCollection() return m_summaryPlotCollection(); } -#if 0 -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimMainPlotCollection::createDockWindowsForAllPlots() -{ - for (size_t i = 0; i < m_graphPlots.size(); i++) - { - if (!dockWidgetFromPlot(m_graphPlots[i])) - { - createPlotDockWidget(m_graphPlots[i]); - } - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -QDockWidget* RimMainPlotCollection::dockWidgetFromPlot(RimSummaryPlot* graphPlot) -{ - foreach(QDockWidget* dockW, m_plotViewDockWidgets) - { - if (dockW && dockW->widget() == graphPlot->widget()) - { - return dockW; - } - } - - return NULL; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimMainPlotCollection::createPlotDockWidget(RimSummaryPlot* graphPlot) +RimFlowPlotCollection* RimMainPlotCollection::flowPlotCollection() { - assert(m_plotMainWindow != NULL); - - QDockWidget* dockWidget = new QDockWidget(QString("Plot Widget Tree (%1)").arg(m_plotViewDockWidgets.size() + 1), m_plotMainWindow); - dockWidget->setObjectName("dockWidget"); - // dockWidget->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); - - QWidget* widget = graphPlot->createPlotWidget(m_plotMainWindow); - - dockWidget->setWidget(widget); - - m_plotMainWindow->addDockWidget(Qt::RightDockWidgetArea, dockWidget); - - m_plotViewDockWidgets.push_back(dockWidget); + return m_flowPlotCollection(); } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimMainPlotCollection::eraseDockWidget(RimSummaryPlot* graphPlot) +void RimMainPlotCollection::deleteAllContainedObjects() { - QDockWidget* dockW = dockWidgetFromPlot(graphPlot); - if (dockW) - { - m_plotMainWindow->removeDockWidget(dockW); - dockW->setWidget(NULL); - dockW->deleteLater(); - } -} + m_wellLogPlotCollection()->wellLogPlots.deleteAllChildObjects(); + m_summaryPlotCollection()->summaryPlots.deleteAllChildObjects(); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimMainPlotCollection::redrawAllPlots() -{ - for (size_t i = 0; i < m_graphPlots.size(); i++) - { - m_graphPlots[i]->redrawAllCurves(); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -QMainWindow* RimMainPlotCollection::windowWithGraphPlots() -{ - return m_plotMainWindow; + m_flowPlotCollection()->closeDefaultPlotWindowAndDeletePlots(); } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimMainPlotCollection::initAfterRead() +void RimMainPlotCollection::updateCurrentTimeStepInPlots() { - if (show()) - { - showPlotWindow(); - } - else - { - hidePlotWindow(); - } + m_flowPlotCollection()->defaultFlowCharacteristicsPlot()->updateCurrentTimeStep(); } - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimMainPlotCollection::hidePlotWindow() -{ - if (m_plotManagerMainWindow) - { - m_plotManagerMainWindow->hide(); - } -} -#endif \ No newline at end of file diff --git a/ApplicationCode/ProjectDataModel/RimMainPlotCollection.h b/ApplicationCode/ProjectDataModel/RimMainPlotCollection.h index b9de518b2d..e39d432805 100644 --- a/ApplicationCode/ProjectDataModel/RimMainPlotCollection.h +++ b/ApplicationCode/ProjectDataModel/RimMainPlotCollection.h @@ -32,6 +32,7 @@ class RimSummaryPlotCollection; class RimSummaryPlot; class RifReaderEclipseSummary; class RimEclipseResultCase; +class RimFlowPlotCollection; //================================================================================================== @@ -45,39 +46,22 @@ class RimMainPlotCollection : public caf::PdmObject RimMainPlotCollection(); virtual ~RimMainPlotCollection(); - RimWellLogPlotCollection* wellLogPlotCollection(); - RimSummaryPlotCollection* summaryPlotCollection(); + RimWellLogPlotCollection* wellLogPlotCollection(); + RimSummaryPlotCollection* summaryPlotCollection(); + RimFlowPlotCollection* flowPlotCollection(); - #if 0 - // Separate Window stuff - void showPlotWindow(); - void hidePlotWindow(); + void deleteAllContainedObjects(); + void updateCurrentTimeStepInPlots(); - void redrawAllPlots(); - void createDockWindowsForAllPlots(); - QMainWindow* windowWithGraphPlots(); -private: - - QDockWidget* dockWidgetFromPlot(RimSummaryPlot* graphPlot); - void createPlotDockWidget(RimSummaryPlot* graphPlot); - void eraseDockWidget(RimSummaryPlot* graphPlot); - -private: - QMainWindow* m_plotManagerMainWindow; // Outer main Window - QMainWindow* m_plotMainWindow; // Inner main window - - std::vector > m_plotViewDockWidgets; // ChildPlotWidgets - #endif protected: // Overridden PDM methods virtual caf::PdmFieldHandle* objectToggleField(); - virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue); - //virtual void initAfterRead(); - + virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue); caf::PdmChildField m_wellLogPlotCollection; caf::PdmChildField m_summaryPlotCollection; + caf::PdmChildField m_flowPlotCollection; - caf::PdmField show; + caf::PdmField show; }; diff --git a/ApplicationCode/ProjectDataModel/RimMdiWindowController.cpp b/ApplicationCode/ProjectDataModel/RimMdiWindowController.cpp new file mode 100644 index 0000000000..5064c83b1e --- /dev/null +++ b/ApplicationCode/ProjectDataModel/RimMdiWindowController.cpp @@ -0,0 +1,173 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimMdiWindowController.h" + +#include "RiaApplication.h" +#include "RimViewWindow.h" +#include "RiuMainWindowBase.h" + +CAF_PDM_XML_SOURCE_INIT(RimMdiWindowController, "MdiWindowController"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimMdiWindowController::RimMdiWindowController() +{ + CAF_PDM_InitField(&m_mainWindowID, "MainWindowID", -1, "", "", "", "" ); + CAF_PDM_InitField(& m_x , "xPos", -1, "", "", "", "" ); + CAF_PDM_InitField(& m_y , "yPos", -1, "", "", "", "" ); + CAF_PDM_InitField(& m_width , "Width", -1, "", "", "", "" ); + CAF_PDM_InitField(& m_height , "Height", -1, "", "", "", "" ); + CAF_PDM_InitField(& m_isMaximized, "IsMaximized", false, "", "", "", "" ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimMdiWindowController::~RimMdiWindowController() +{ + +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimMdiWindowController::setMdiWindowGeometry(const RimMdiWindowGeometry& windowGeometry) +{ + m_mainWindowID = windowGeometry.mainWindowID; + m_x = windowGeometry.x; + m_y = windowGeometry.y; + m_width = windowGeometry.width; + m_height = windowGeometry.height; + m_isMaximized = windowGeometry.isMaximized; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimMdiWindowGeometry RimMdiWindowController::mdiWindowGeometry() +{ + RimMdiWindowGeometry windowGeometry; + + windowGeometry.mainWindowID = m_mainWindowID; + windowGeometry.x = m_x ; + windowGeometry.y = m_y ; + windowGeometry.width = m_width ; + windowGeometry.height = m_height ; + windowGeometry.isMaximized = m_isMaximized ; + + return windowGeometry; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimMdiWindowController::handleViewerDeletion() +{ + viewPdmObject()->m_showWindow = false; + + uiCapability()->updateUiIconFromToggleField(); + updateConnectedEditors(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimMdiWindowController::removeWindowFromMDI() +{ + RiuMainWindowBase* mainWin = getMainWindow(); + if (mainWin && viewWidget()) mainWin->removeViewer(viewWidget()); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimViewWindow* RimMdiWindowController::viewPdmObject() +{ + RimViewWindow * viewWindowObj; + this->firstAncestorOrThisOfType(viewWindowObj); + return viewWindowObj; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QWidget* RimMdiWindowController::viewWidget() +{ + return viewPdmObject()->viewWidget(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuMainWindowBase* RimMdiWindowController::getMainWindow() +{ + return RiaApplication::instance()->mainWindowByID(m_mainWindowID); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimMdiWindowController::setupBeforeSave() +{ + if ( viewWidget() && getMainWindow() ) + { + this->setMdiWindowGeometry(getMainWindow()->windowGeometryForViewer(viewWidget())); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimMdiWindowController::updateViewerWidget() +{ + RiuMainWindowBase* mainWindow = getMainWindow(); + if ( !mainWindow ) return; + + if ( viewPdmObject()->m_showWindow() ) + { + if ( !viewWidget() ) + { + QWidget * viewWidget = viewPdmObject()->createViewWidget(mainWindow); + + mainWindow->addViewer(viewWidget, this->mdiWindowGeometry()); + mainWindow->setActiveViewer(viewWidget); + + viewPdmObject()->updateViewWidgetAfterCreation(); + } + else + { + mainWindow->setActiveViewer(viewWidget()); + } + + viewPdmObject()->updateMdiWindowTitle(); + } + else + { + if ( viewWidget() ) + { + this->setMdiWindowGeometry(mainWindow->windowGeometryForViewer(viewWidget())); + + mainWindow->removeViewer(viewWidget()); + + viewPdmObject()->deleteViewWidget(); + } + } +} + diff --git a/ApplicationCode/ProjectDataModel/RimMdiWindowController.h b/ApplicationCode/ProjectDataModel/RimMdiWindowController.h new file mode 100644 index 0000000000..4ba4062b70 --- /dev/null +++ b/ApplicationCode/ProjectDataModel/RimMdiWindowController.h @@ -0,0 +1,69 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafPdmObject.h" +#include "cafPdmChildField.h" +#include "cafPdmField.h" + + +class RimViewWindow; +class RiuMainWindowBase; +struct RimMdiWindowGeometry; + +//================================================================================================== +/// +/// +//================================================================================================== +class RimMdiWindowController : public caf::PdmObject +{ + CAF_PDM_HEADER_INIT; + +public: + RimMdiWindowController(); + virtual ~RimMdiWindowController(); + + void setMdiWindowGeometry(const RimMdiWindowGeometry& windowGeometry); + RimMdiWindowGeometry mdiWindowGeometry(); + + void updateViewerWidget(); + void handleViewerDeletion(); + void removeWindowFromMDI(); + +protected: + + RimViewWindow* viewPdmObject(); + QWidget* viewWidget(); + RiuMainWindowBase* getMainWindow(); + + // Overridden PDM methods + virtual void setupBeforeSave() override; + +private: + + caf::PdmField< int > m_mainWindowID; + + caf::PdmField< int > m_x; + caf::PdmField< int > m_y; + caf::PdmField< int > m_width; + caf::PdmField< int > m_height; + caf::PdmField< bool> m_isMaximized; +}; + + diff --git a/ApplicationCode/ProjectDataModel/RimMultiSnapshotDefinition.cpp b/ApplicationCode/ProjectDataModel/RimMultiSnapshotDefinition.cpp new file mode 100644 index 0000000000..8234936beb --- /dev/null +++ b/ApplicationCode/ProjectDataModel/RimMultiSnapshotDefinition.cpp @@ -0,0 +1,294 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimMultiSnapshotDefinition.h" + +#include "RiaApplication.h" + +#include "RigActiveCellInfo.h" +#include "RigCaseCellResultsData.h" + +#include "RimCase.h" +#include "RimCellRangeFilterCollection.h" +#include "RimEclipseView.h" +#include "RimProject.h" +#include "RimReservoirCellResultsStorage.h" +#include "RimTools.h" +#include "RimView.h" + +#include "cafPdmPointer.h" + +namespace caf +{ + template<> + void caf::AppEnum< RimMultiSnapshotDefinition::SnapShotDirectionEnum >::setUp() + { + addItem(RimMultiSnapshotDefinition::NO_RANGEFILTER, "None", "None"); + addItem(RimMultiSnapshotDefinition::RANGEFILTER_I, "I", "I"); + addItem(RimMultiSnapshotDefinition::RANGEFILTER_J, "J", "J"); + addItem(RimMultiSnapshotDefinition::RANGEFILTER_K, "K", "K"); + + setDefault(RimMultiSnapshotDefinition::RANGEFILTER_K); + } +} + +CAF_PDM_SOURCE_INIT(RimMultiSnapshotDefinition, "MultiSnapshotDefinition"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimMultiSnapshotDefinition::RimMultiSnapshotDefinition() +{ + //CAF_PDM_InitObject("MultiSnapshotDefinition", ":/Well.png", "", ""); + CAF_PDM_InitObject("MultiSnapshotDefinition", "", "", ""); + + CAF_PDM_InitField(&isActive, "IsActive", true, "Active", "", "", ""); + + CAF_PDM_InitFieldNoDefault(&view, "View", "View", "", "", ""); + + CAF_PDM_InitFieldNoDefault(&eclipseResultType, "EclipseResultType", "Result Type", "", "", ""); + CAF_PDM_InitFieldNoDefault(&selectedEclipseResults, "SelectedEclipseResults", "Properties", "", "", ""); + + CAF_PDM_InitField(&timeStepStart, "TimeStepStart", 0, "Start Time", "", "", ""); + CAF_PDM_InitField(&timeStepEnd, "TimeStepEnd", 0, "End Time", "", "", ""); + + CAF_PDM_InitField(&sliceDirection, "SnapShotDirection", caf::AppEnum(NO_RANGEFILTER), "Range Filter Slice", "", "", ""); + CAF_PDM_InitField(&startSliceIndex, "RangeFilterStart", 1, "Range Start", "", "", ""); + CAF_PDM_InitField(&endSliceIndex, "RangeFilterEnd", 1, "Range End", "", "", ""); + + CAF_PDM_InitFieldNoDefault(&additionalCases, "AdditionalCases", "Cases", "", "", ""); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimMultiSnapshotDefinition::~RimMultiSnapshotDefinition() +{ +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QList RimMultiSnapshotDefinition::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) +{ + QList options; + + if (fieldNeedingOptions == &view) + { + options.push_back(caf::PdmOptionItemInfo("None", nullptr)); + + std::vector views; + + RimProject* proj = RiaApplication::instance()->project(); + std::vector cases; + proj->allCases(cases); + + for (RimCase* rimCase : cases) + { + for (RimView* rimView : rimCase->views()) + { + views.push_back(rimView); + } + } + + for (RimView* view : views) + { + QString caseAndView = view->ownerCase()->caseUserDescription() + " - " + view->name(); + options.push_back(caf::PdmOptionItemInfo(caseAndView, view)); + } + } + else if (fieldNeedingOptions == &eclipseResultType) + { + options.push_back(caf::PdmOptionItemInfo(caf::AppEnum(RimDefines::DYNAMIC_NATIVE).uiText(), RimDefines::DYNAMIC_NATIVE)); + options.push_back(caf::PdmOptionItemInfo(caf::AppEnum(RimDefines::STATIC_NATIVE).uiText(), RimDefines::STATIC_NATIVE)); + } + else if (fieldNeedingOptions == &selectedEclipseResults) + { + RimEclipseView* rimEclipseView = dynamic_cast(view().p()); + if (rimEclipseView) + { + QStringList varList; + varList = rimEclipseView->currentGridCellResults()->cellResults()->resultNames(eclipseResultType()); + + options = toOptionList(varList); + } + } + else if (fieldNeedingOptions == &timeStepEnd) + { + getTimeStepStrings(options); + } + else if (fieldNeedingOptions == &timeStepStart) + { + getTimeStepStrings(options); + } + else if (fieldNeedingOptions == &additionalCases) + { + RimTools::caseOptionItems(&options); + } + + if (useOptionsOnly) *useOptionsOnly = true; + + return options; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimMultiSnapshotDefinition::getTimeStepStrings(QList &options) +{ + if (!view()) return; + + QStringList timeSteps; + + timeSteps = view->ownerCase()->timeStepStrings(); + + for (int i = 0; i < timeSteps.size(); i++) + { + options.push_back(caf::PdmOptionItemInfo(timeSteps[i], i)); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimMultiSnapshotDefinition::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) +{ + if (changedField == &eclipseResultType) + { + selectedEclipseResults.v().clear(); + } + else if (changedField == &sliceDirection) + { + const cvf::StructGridInterface* mainGrid = nullptr; + RigActiveCellInfo* actCellInfo = nullptr; + + if (view()) + { + mainGrid = view()->rangeFilterCollection()->gridByIndex(0); + actCellInfo = view()->rangeFilterCollection()->activeCellInfo(); + } + + if (mainGrid && actCellInfo) + { + cvf::Vec3st min, max; + actCellInfo->IJKBoundingBox(min, max); + + // Adjust to Eclipse indexing + min.x() = min.x() + 1; + min.y() = min.y() + 1; + min.z() = min.z() + 1; + + max.x() = max.x() + 1; + max.y() = max.y() + 1; + max.z() = max.z() + 1; + + int maxInt = 0; + int minInt = 0; + + if (newValue == RimMultiSnapshotDefinition::RANGEFILTER_I) + { + maxInt = static_cast(max.x()); + minInt = static_cast(min.x()); + } + else if (newValue == RimMultiSnapshotDefinition::RANGEFILTER_J) + { + maxInt = static_cast(max.y()); + minInt = static_cast(min.y()); + } + else if (newValue == RimMultiSnapshotDefinition::RANGEFILTER_K) + { + maxInt = static_cast(max.z()); + minInt = static_cast(min.z()); + } + + startSliceIndex = minInt; + endSliceIndex = maxInt; + + } + + startSliceIndex.uiCapability()->updateConnectedEditors(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QList RimMultiSnapshotDefinition::toOptionList(const QStringList& varList) +{ + QList optionList; + int i; + for (i = 0; i < varList.size(); ++i) + { + optionList.push_back(caf::PdmOptionItemInfo(varList[i], varList[i])); + } + return optionList; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimMultiSnapshotDefinition::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) +{ + if (!isActive()) + { + view.uiCapability()->setUiReadOnly(true); + eclipseResultType.uiCapability()->setUiReadOnly(true); + selectedEclipseResults.uiCapability()->setUiReadOnly(true); + timeStepStart.uiCapability()->setUiReadOnly(true); + timeStepEnd.uiCapability()->setUiReadOnly(true); + sliceDirection.uiCapability()->setUiReadOnly(true); + startSliceIndex.uiCapability()->setUiReadOnly(true); + endSliceIndex.uiCapability()->setUiReadOnly(true); + additionalCases.uiCapability()->setUiReadOnly(true); + } + else + { + view.uiCapability()->setUiReadOnly(false); + + if (!view()) + { + eclipseResultType.uiCapability()->setUiReadOnly(true); + selectedEclipseResults.uiCapability()->setUiReadOnly(true); + timeStepStart.uiCapability()->setUiReadOnly(true); + timeStepEnd.uiCapability()->setUiReadOnly(true); + sliceDirection.uiCapability()->setUiReadOnly(true); + startSliceIndex.uiCapability()->setUiReadOnly(true); + endSliceIndex.uiCapability()->setUiReadOnly(true); + additionalCases.uiCapability()->setUiReadOnly(true); + } + else + { + eclipseResultType.uiCapability()->setUiReadOnly(false); + selectedEclipseResults.uiCapability()->setUiReadOnly(false); + timeStepStart.uiCapability()->setUiReadOnly(false); + timeStepEnd.uiCapability()->setUiReadOnly(false); + sliceDirection.uiCapability()->setUiReadOnly(false); + + additionalCases.uiCapability()->setUiReadOnly(false); + + bool rangeReadOnly = false; + if (sliceDirection() == NO_RANGEFILTER) + { + rangeReadOnly = true; + } + + startSliceIndex.uiCapability()->setUiReadOnly(rangeReadOnly); + endSliceIndex.uiCapability()->setUiReadOnly(rangeReadOnly); + } + } +} diff --git a/ApplicationCode/ProjectDataModel/RimMultiSnapshotDefinition.h b/ApplicationCode/ProjectDataModel/RimMultiSnapshotDefinition.h new file mode 100644 index 0000000000..93177ab6d6 --- /dev/null +++ b/ApplicationCode/ProjectDataModel/RimMultiSnapshotDefinition.h @@ -0,0 +1,78 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "RimDefines.h" + +#include "cafAppEnum.h" +#include "cafPdmField.h" +#include "cafPdmObject.h" +#include "cafPdmPtrField.h" +#include "cafPdmPtrArrayField.h" + +class RimCase; +class RimView; + +//================================================================================================== +/// +/// +//================================================================================================== +class RimMultiSnapshotDefinition : public caf::PdmObject +{ + CAF_PDM_HEADER_INIT; +public: + RimMultiSnapshotDefinition(); + virtual ~RimMultiSnapshotDefinition(); + + caf::PdmField isActive; + + caf::PdmPtrField view; + + caf::PdmField< caf::AppEnum< RimDefines::ResultCatType > > eclipseResultType; + caf::PdmField< std::vector > selectedEclipseResults; + + caf::PdmField timeStepStart; + caf::PdmField timeStepEnd; + + enum SnapShotDirectionEnum + { + RANGEFILTER_I, + RANGEFILTER_J, + RANGEFILTER_K, + NO_RANGEFILTER + }; + + caf::PdmField< caf::AppEnum< SnapShotDirectionEnum > > sliceDirection; + caf::PdmField startSliceIndex; + caf::PdmField endSliceIndex; + + caf::PdmPtrArrayField additionalCases; + +protected: + virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override; + +private: + virtual QList calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override; + + void getTimeStepStrings(QList &options); + + virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override; + + QList toOptionList(const QStringList& varList); +}; diff --git a/ApplicationCode/ProjectDataModel/RimNamedObject.cpp b/ApplicationCode/ProjectDataModel/RimNamedObject.cpp new file mode 100644 index 0000000000..674fc3ef45 --- /dev/null +++ b/ApplicationCode/ProjectDataModel/RimNamedObject.cpp @@ -0,0 +1,61 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimNamedObject.h" + +CAF_PDM_XML_ABSTRACT_SOURCE_INIT(RimNamedObject, "NamedObject"); // Do not use. Abstract class + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimNamedObject::RimNamedObject(void) +{ + CAF_PDM_InitField(&m_name, "Name", QString(), "Name", "", "", ""); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimNamedObject::~RimNamedObject(void) +{ +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimNamedObject::name() const +{ + return m_name(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimNamedObject::setName(const QString& name) +{ + m_name = name; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +caf::PdmFieldHandle* RimNamedObject::userDescriptionField() +{ + return &m_name; +} diff --git a/ApplicationCode/ProjectDataModel/RimNamedObject.h b/ApplicationCode/ProjectDataModel/RimNamedObject.h new file mode 100644 index 0000000000..4836df2b75 --- /dev/null +++ b/ApplicationCode/ProjectDataModel/RimNamedObject.h @@ -0,0 +1,46 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafPdmObject.h" +#include "cafPdmField.h" + + +//================================================================================================== +/// +/// +//================================================================================================== +class RimNamedObject : public caf::PdmObject +{ + CAF_PDM_HEADER_INIT; + +public: + RimNamedObject(void); + virtual ~RimNamedObject(void); + + QString name() const; + void setName(const QString& name); + +protected: + virtual caf::PdmFieldHandle* userDescriptionField() override; + +private: + caf::PdmField m_name; +}; + diff --git a/ApplicationCode/ProjectDataModel/RimPlotCurve.cpp b/ApplicationCode/ProjectDataModel/RimPlotCurve.cpp index 405d82a39a..65f0a06ccd 100644 --- a/ApplicationCode/ProjectDataModel/RimPlotCurve.cpp +++ b/ApplicationCode/ProjectDataModel/RimPlotCurve.cpp @@ -79,17 +79,19 @@ RimPlotCurve::RimPlotCurve() CAF_PDM_InitField(&m_curveColor, "Color", cvf::Color3f(cvf::Color3::BLACK), "Color", "", "", ""); - CAF_PDM_InitField(&m_curveThickness, "Thickness", 1, "Thickness", "", "", ""); + CAF_PDM_InitField(&m_curveThickness, "Thickness", 1, "Line Thickness", "", "", ""); m_curveThickness.uiCapability()->setUiEditorTypeName(caf::PdmUiComboBoxEditor::uiEditorTypeName()); caf::AppEnum< RimPlotCurve::LineStyleEnum > lineStyle = STYLE_SOLID; - CAF_PDM_InitField(&m_lineStyle, "LineStyle", lineStyle, "Line style", "", "", ""); + CAF_PDM_InitField(&m_lineStyle, "LineStyle", lineStyle, "Line Style", "", "", ""); caf::AppEnum< RimPlotCurve::PointSymbolEnum > pointSymbol = SYMBOL_NONE; - CAF_PDM_InitField(&m_pointSymbol, "PointSymbol", pointSymbol, "Point style", "", "", ""); + CAF_PDM_InitField(&m_pointSymbol, "PointSymbol", pointSymbol, "Symbol", "", "", ""); CAF_PDM_InitField(&m_symbolSkipPixelDistance, "SymbolSkipPxDist", 0.0f, "Symbol Skip Distance", "", "Minimum pixel distance between symbols", ""); + CAF_PDM_InitField(&m_showLegend, "ShowLegend", true, "Contribute To Legend", "", "", ""); + m_qwtPlotCurve = new RiuLineSegmentQwtPlotCurve; m_parentQwtPlot = NULL; @@ -137,9 +139,12 @@ void RimPlotCurve::fieldChangedByUi(const caf::PdmFieldHandle* changedField, con m_customCurveName = createCurveAutoName(); } - updateOptionSensitivity(); updateCurveName(); } + else if (changedField == &m_showLegend) + { + updateLegendVisibility(); + } if (m_parentQwtPlot) m_parentQwtPlot->replot(); } @@ -241,15 +246,6 @@ bool RimPlotCurve::isCurveVisible() const return m_showCurve; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimPlotCurve::initAfterRead() -{ - updateOptionSensitivity(); -} - - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -265,6 +261,7 @@ void RimPlotCurve::updateCurveName() } m_qwtPlotCurve->setTitle(m_curveName); + updateLegendVisibility(); } //-------------------------------------------------------------------------------------------------- @@ -275,6 +272,28 @@ void RimPlotCurve::updateOptionSensitivity() m_curveName.uiCapability()->setUiReadOnly(m_isUsingAutoName); } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimPlotCurve::appearanceUiOrdering(caf::PdmUiOrdering& uiOrdering) +{ + uiOrdering.add(&m_curveColor); + uiOrdering.add(&m_pointSymbol); + uiOrdering.add(&m_symbolSkipPixelDistance); + uiOrdering.add(&m_curveThickness); + uiOrdering.add(&m_lineStyle); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimPlotCurve::curveNameUiOrdering(caf::PdmUiOrdering& uiOrdering) +{ + uiOrdering.add(&m_isUsingAutoName); + uiOrdering.add(&m_curveName); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -408,3 +427,37 @@ void RimPlotCurve::setLineThickness(int thickness) m_curveThickness = thickness; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimPlotCurve::showLegend(bool show) +{ + m_showLegend = show; + updateLegendVisibility(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimPlotCurve::updateLegendVisibility() +{ + if (m_showLegend()) { + if (m_curveName().isEmpty()) + { + m_qwtPlotCurve->setItemAttribute(QwtPlotItem::Legend, false); + } + else + { + m_qwtPlotCurve->setItemAttribute(QwtPlotItem::Legend, true); + } + } + else + { + m_qwtPlotCurve->setItemAttribute(QwtPlotItem::Legend, false); + } + + if (m_parentQwtPlot != nullptr) + { + m_parentQwtPlot->updateLegend(); + } +} diff --git a/ApplicationCode/ProjectDataModel/RimPlotCurve.h b/ApplicationCode/ProjectDataModel/RimPlotCurve.h index 599431c181..f6f3cd802f 100644 --- a/ApplicationCode/ProjectDataModel/RimPlotCurve.h +++ b/ApplicationCode/ProjectDataModel/RimPlotCurve.h @@ -78,6 +78,9 @@ class RimPlotCurve : public caf::PdmObject QString curveName() const { return m_curveName; } void updateCurveVisibility(); + void updateLegendVisibility(); + + void showLegend(bool show); protected: @@ -86,7 +89,7 @@ class RimPlotCurve : public caf::PdmObject virtual void onLoadDataAndUpdate() = 0; void updateCurvePresentation(); - void updateCurveAppearance(); + virtual void updateCurveAppearance(); void updateOptionSensitivity(); @@ -96,8 +99,9 @@ class RimPlotCurve : public caf::PdmObject virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue); virtual caf::PdmFieldHandle* objectToggleField(); virtual caf::PdmFieldHandle* userDescriptionField(); - virtual void initAfterRead(); virtual QList calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly); + void appearanceUiOrdering(caf::PdmUiOrdering& uiOrdering); + void curveNameUiOrdering(caf::PdmUiOrdering& uiOrdering); protected: QPointer m_parentQwtPlot; @@ -106,6 +110,7 @@ class RimPlotCurve : public caf::PdmObject caf::PdmField m_showCurve; caf::PdmField m_curveName; caf::PdmField m_customCurveName; + caf::PdmField m_showLegend; caf::PdmField m_isUsingAutoName; caf::PdmField m_curveColor; diff --git a/ApplicationCode/ProjectDataModel/RimProject.cpp b/ApplicationCode/ProjectDataModel/RimProject.cpp index 46dd4fc816..f784c71e42 100644 --- a/ApplicationCode/ProjectDataModel/RimProject.cpp +++ b/ApplicationCode/ProjectDataModel/RimProject.cpp @@ -23,7 +23,8 @@ #include "RiaApplication.h" #include "RiaVersionInfo.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" +#include "RigGridBase.h" #include "RimCalcScript.h" #include "RimCase.h" @@ -32,12 +33,14 @@ #include "RimContextCommandBuilder.h" #include "RimEclipseCase.h" #include "RimEclipseCaseCollection.h" +#include "RimFlowPlotCollection.h" #include "RimFormationNamesCollection.h" #include "RimGeoMechCase.h" #include "RimGeoMechModels.h" #include "RimGridSummaryCase.h" #include "RimIdenticalGridCaseGroup.h" #include "RimMainPlotCollection.h" +#include "RimMultiSnapshotDefinition.h" #include "RimOilField.h" #include "RimScriptCollection.h" #include "RimSummaryCaseCollection.h" @@ -58,6 +61,8 @@ #include "cafCmdFeatureManager.h" #include "cafPdmUiTreeOrdering.h" +#include "cvfBoundingBox.h" + #include #include @@ -98,6 +103,8 @@ RimProject::RimProject(void) CAF_PDM_InitFieldNoDefault(&commandObjects, "CommandObjects", "CommandObjects", "", "", ""); //wellPathImport.uiCapability()->setUiHidden(true); + CAF_PDM_InitFieldNoDefault(&multiSnapshotDefinitions, "MultiSnapshotDefinitions", "MultiSnapshotDefinitions", "", "", ""); + CAF_PDM_InitFieldNoDefault(&mainWindowTreeViewState, "TreeViewState", "", "", "", ""); mainWindowTreeViewState.uiCapability()->setUiHidden(true); CAF_PDM_InitFieldNoDefault(&mainWindowCurrentModelIndexPath, "TreeViewCurrentModelIndexPath", "", "", "", ""); @@ -155,14 +162,9 @@ RimProject::~RimProject(void) //-------------------------------------------------------------------------------------------------- void RimProject::close() { - if (mainPlotCollection() && mainPlotCollection()->wellLogPlotCollection()) - { - mainPlotCollection()->wellLogPlotCollection()->wellLogPlots.deleteAllChildObjects(); - } - - if (mainPlotCollection() && mainPlotCollection()->summaryPlotCollection()) + if (mainPlotCollection()) { - mainPlotCollection()->summaryPlotCollection()->m_summaryPlots.deleteAllChildObjects(); + mainPlotCollection()->deleteAllContainedObjects(); } oilFields.deleteAllChildObjects(); @@ -175,6 +177,8 @@ void RimProject::close() commandObjects.deleteAllChildObjects(); + multiSnapshotDefinitions.deleteAllChildObjects(); + delete viewLinkerCollection->viewLinker(); viewLinkerCollection->viewLinker = NULL; @@ -413,20 +417,20 @@ void RimProject::setProjectFileNameAndUpdateDependencies(const QString& fileName } // Update path to well path file cache - for (size_t oilFieldIdx = 0; oilFieldIdx < oilFields().size(); oilFieldIdx++) - { - RimOilField* oilField = oilFields[oilFieldIdx]; - if (oilField == NULL || oilField->wellPathCollection == NULL) continue; - oilField->wellPathCollection->updateFilePathsFromProjectPath(newProjectPath, oldProjectPath); - } - for(RimOilField* oilField: oilFields) { - if(oilField == NULL) continue; - if(oilField->formationNamesCollection() != NULL) + if (oilField == NULL) continue; + if (oilField->wellPathCollection() != NULL) + { + oilField->wellPathCollection()->updateFilePathsFromProjectPath(newProjectPath, oldProjectPath); + } + if (oilField->formationNamesCollection() != NULL) { oilField->formationNamesCollection()->updateFilePathsFromProjectPath(newProjectPath, oldProjectPath); } + if (oilField->summaryCaseCollection() != NULL) { + oilField->summaryCaseCollection()->updateFilePathsFromProjectPath(newProjectPath, oldProjectPath); + } } @@ -636,11 +640,11 @@ void RimProject::computeUtmAreaOfInterest() { RimEclipseCase* rimCase = dynamic_cast(cases[i]); - if (rimCase && rimCase->reservoirData()) + if (rimCase && rimCase->eclipseCaseData()) { - for (size_t gridIdx = 0; gridIdx < rimCase->reservoirData()->gridCount(); gridIdx++ ) + for (size_t gridIdx = 0; gridIdx < rimCase->eclipseCaseData()->gridCount(); gridIdx++ ) { - RigGridBase* rigGrid = rimCase->reservoirData()->grid(gridIdx); + RigGridBase* rigGrid = rimCase->eclipseCaseData()->grid(gridIdx); projectBB.add(rigGrid->boundingBox()); } @@ -802,15 +806,17 @@ void RimProject::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QS { uiTreeOrdering.add(mainPlotCollection->wellLogPlotCollection()); } + if (mainPlotCollection->summaryPlotCollection()) { uiTreeOrdering.add(mainPlotCollection->summaryPlotCollection()); } - } - - uiTreeOrdering.setForgetRemainingFields(true); - return; + if (mainPlotCollection->flowPlotCollection()) + { + uiTreeOrdering.add(mainPlotCollection->flowPlotCollection()); + } + } } else { @@ -830,8 +836,8 @@ void RimProject::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QS } uiTreeOrdering.add(scriptCollection()); - - uiTreeOrdering.setForgetRemainingFields(true); } + + uiTreeOrdering.skipRemainingChildren(true); } diff --git a/ApplicationCode/ProjectDataModel/RimProject.h b/ApplicationCode/ProjectDataModel/RimProject.h index d9fdc0860b..63d8c151a5 100644 --- a/ApplicationCode/ProjectDataModel/RimProject.h +++ b/ApplicationCode/ProjectDataModel/RimProject.h @@ -26,20 +26,22 @@ #include -class RigCaseData; +class RigEclipseCaseData; class RigGridManager; class RigMainGrid; + class RimCase; class RimCommandObject; class RimEclipseCase; class RimIdenticalGridCaseGroup; -class RimViewLinker; -class RimViewLinkerCollection; class RimMainPlotCollection; +class RimMultiSnapshotDefinition; class RimOilField; class RimScriptCollection; class RimSummaryCase; class RimView; +class RimViewLinker; +class RimViewLinkerCollection; class RimWellPathImport; namespace caf @@ -70,6 +72,8 @@ class RimProject : public caf::PdmDocument caf::PdmChildField viewLinkerCollection; caf::PdmChildArrayField commandObjects; + caf::PdmChildArrayField multiSnapshotDefinitions; + caf::PdmField mainWindowTreeViewState; caf::PdmField mainWindowCurrentModelIndexPath; diff --git a/ApplicationCode/ProjectDataModel/RimPropertyFilter.cpp b/ApplicationCode/ProjectDataModel/RimPropertyFilter.cpp new file mode 100644 index 0000000000..35abd2db2e --- /dev/null +++ b/ApplicationCode/ProjectDataModel/RimPropertyFilter.cpp @@ -0,0 +1,126 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimPropertyFilter.h" + + +CAF_PDM_SOURCE_INIT(RimPropertyFilter, "PropertyFilter"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimPropertyFilter::RimPropertyFilter() +{ + CAF_PDM_InitObject("Property Filter", "", "", ""); + + CAF_PDM_InitFieldNoDefault(&m_selectedCategoryValues, "SelectedValues", "Values", "", "", ""); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimPropertyFilter::~RimPropertyFilter() +{ +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimPropertyFilter::selectedCategoryValues() const +{ + return m_selectedCategoryValues; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QList RimPropertyFilter::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) +{ + QList options; + + if (&m_selectedCategoryValues == fieldNeedingOptions) + { + if (useOptionsOnly) *useOptionsOnly = true; + + if (m_categoryValues.size() == m_categoryNames.size()) + { + for (size_t i = 0; i < m_categoryValues.size(); i++) + { + int categoryValue = m_categoryValues[i]; + QString categoryName = m_categoryNames[i]; + + options.push_back(caf::PdmOptionItemInfo(categoryName, categoryValue)); + } + } + else + { + for (auto it : m_categoryValues) + { + QString str = QString::number(it); + options.push_back(caf::PdmOptionItemInfo(str, it)); + } + } + } + + return options; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimPropertyFilter::setCategoryValues(const std::vector& categoryValues) +{ + m_categoryValues = categoryValues; + m_categoryNames.clear(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimPropertyFilter::setCategoryNames(const std::vector& categoryNames) +{ + m_categoryNames = categoryNames; + + for (size_t i = 0; i < m_categoryNames.size(); i++) + { + m_categoryValues.push_back(static_cast(i)); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimPropertyFilter::setCategoryNamesAndValues(const std::vector>& categoryNamesAndValues) +{ + clearCategories(); + + for (auto it : categoryNamesAndValues) + { + m_categoryNames.push_back(it.first); + m_categoryValues.push_back(it.second); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimPropertyFilter::clearCategories() +{ + m_categoryValues.clear(); + m_categoryNames.clear(); +} diff --git a/ApplicationCode/ProjectDataModel/RimPropertyFilter.h b/ApplicationCode/ProjectDataModel/RimPropertyFilter.h new file mode 100644 index 0000000000..bb786eebb1 --- /dev/null +++ b/ApplicationCode/ProjectDataModel/RimPropertyFilter.h @@ -0,0 +1,50 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "RimCellFilter.h" + + +//================================================================================================== +/// +/// +//================================================================================================== +class RimPropertyFilter : public RimCellFilter +{ + CAF_PDM_HEADER_INIT; +public: + RimPropertyFilter(); + virtual ~RimPropertyFilter(); + + std::vector selectedCategoryValues() const; + +protected: + void setCategoryValues(const std::vector& categoryValues); + void setCategoryNames(const std::vector& categoryNames); + void setCategoryNamesAndValues(const std::vector>& categoryNamesAndValues); + void clearCategories(); + + virtual QList calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override; + +protected: + caf::PdmField< std::vector > m_selectedCategoryValues; + + std::vector m_categoryValues; + std::vector m_categoryNames; +}; diff --git a/ApplicationCode/ProjectDataModel/RimPropertyFilterCollection.cpp b/ApplicationCode/ProjectDataModel/RimPropertyFilterCollection.cpp index 185c9df9a4..fb083d3eb4 100644 --- a/ApplicationCode/ProjectDataModel/RimPropertyFilterCollection.cpp +++ b/ApplicationCode/ProjectDataModel/RimPropertyFilterCollection.cpp @@ -49,6 +49,7 @@ void RimPropertyFilterCollection::updateDisplayModelNotifyManagedViews() const RimView* view = NULL; this->firstAncestorOrThisOfType(view); CVF_ASSERT(view); + if (!view) return; view->scheduleGeometryRegen(PROPERTY_FILTERED); view->scheduleCreateDisplayModelAndRedraw(); diff --git a/ApplicationCode/ProjectDataModel/RimReservoirCellResultsStorage.cpp b/ApplicationCode/ProjectDataModel/RimReservoirCellResultsStorage.cpp index fc8db4dc07..0beded7277 100644 --- a/ApplicationCode/ProjectDataModel/RimReservoirCellResultsStorage.cpp +++ b/ApplicationCode/ProjectDataModel/RimReservoirCellResultsStorage.cpp @@ -21,7 +21,7 @@ #include "RigActiveCellInfo.h" #include "RigCaseCellResultsData.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" #include "RigCell.h" #include "RigMainGrid.h" @@ -29,6 +29,7 @@ #include "RimTools.h" #include "cafProgressInfo.h" +#include "cafUtils.h" #include "cvfGeometryTools.h" @@ -137,6 +138,7 @@ void RimReservoirCellResultsStorage::setupBeforeSave() cacheEntry->m_resultType = resInfo[rIdx].m_resultType; cacheEntry->m_resultName = resInfo[rIdx].m_resultName; cacheEntry->m_timeStepDates = resInfo[rIdx].m_timeStepDates; + cacheEntry->m_daysSinceSimulationStart = resInfo[rIdx].m_daysSinceSimulationStart; // Take note of the file position for fast lookup later cacheEntry->m_filePosition = cacheFile.pos(); @@ -649,19 +651,19 @@ void RimReservoirCellResultsStorage::computeDepthRelatedResults() if (computeDx) { cvf::Vec3d cellWidth = cell.faceCenter(cvf::StructGridInterface::NEG_I) - cell.faceCenter(cvf::StructGridInterface::POS_I); - dx[0][cellIdx] = cvf::Math::abs(cellWidth.x()); + dx[0][cellIdx] = cellWidth.length(); } if (computeDy) { cvf::Vec3d cellWidth = cell.faceCenter(cvf::StructGridInterface::NEG_J) - cell.faceCenter(cvf::StructGridInterface::POS_J); - dy[0][cellIdx] = cvf::Math::abs(cellWidth.y()); + dy[0][cellIdx] = cellWidth.length(); } if (computeDz) { cvf::Vec3d cellWidth = cell.faceCenter(cvf::StructGridInterface::NEG_K) - cell.faceCenter(cvf::StructGridInterface::POS_K); - dz[0][cellIdx] = cvf::Math::abs(cellWidth.z()); + dz[0][cellIdx] = cellWidth.length(); } if (computeTops) @@ -1393,16 +1395,15 @@ void RimReservoirCellResultsStorage::setCellResults(RigCaseCellResultsData* cell // Get the name of the cache name relative to the current project file position QString newValidCacheFileName = getValidCacheFileName(); - QFile storageFile(newValidCacheFileName); - // Warn if we thought we were to find some data on the storage file - if (!storageFile.exists() && m_resultCacheMetaData.size()) + if (!caf::Utils::fileExists(newValidCacheFileName) && m_resultCacheMetaData.size()) { qWarning() << "Reading stored results: Missing the storage file : " + newValidCacheFileName; return; } + QFile storageFile(newValidCacheFileName); if (!storageFile.open(QIODevice::ReadOnly)) { qWarning() << "Reading stored results: Can't open the file : " + newValidCacheFileName; @@ -1436,7 +1437,7 @@ void RimReservoirCellResultsStorage::setCellResults(RigCaseCellResultsData* cell RimReservoirCellResultsStorageEntryInfo* resInfo = m_resultCacheMetaData[rIdx]; size_t resultIndex = m_cellResults->addEmptyScalarResult(resInfo->m_resultType(), resInfo->m_resultName(), true); - m_cellResults->setTimeStepDates(resultIndex, resInfo->m_timeStepDates()); + m_cellResults->setTimeStepDates(resultIndex, resInfo->m_timeStepDates(), resInfo->m_daysSinceSimulationStart(), std::vector()); // Hack: Using no report step numbers. Not really used except for Flow Diagnostics... progress.setProgressDescription(resInfo->m_resultName); @@ -1516,19 +1517,19 @@ double RimReservoirCellResultsStorage::darchysValue() RimEclipseCase* rimCase = NULL; this->firstAncestorOrThisOfType(rimCase); - if (rimCase && rimCase->reservoirData()) + if (rimCase && rimCase->eclipseCaseData()) { - RigCaseData::UnitsType unitsType = rimCase->reservoirData()->unitsType(); + RigEclipseCaseData::UnitsType unitsType = rimCase->eclipseCaseData()->unitsType(); - if (unitsType == RigCaseData::UNITS_FIELD) + if (unitsType == RigEclipseCaseData::UNITS_FIELD) { darchy = 0.001127; } - else if (unitsType == RigCaseData::UNITS_METRIC) + else if (unitsType == RigEclipseCaseData::UNITS_METRIC) { darchy = 0.008527; } - else if (unitsType == RigCaseData::UNITS_LAB) + else if (unitsType == RigEclipseCaseData::UNITS_LAB) { darchy = 3.6; } @@ -1556,6 +1557,7 @@ RimReservoirCellResultsStorageEntryInfo::RimReservoirCellResultsStorageEntryInfo CAF_PDM_InitField(&m_resultType, "ResultType", caf::AppEnum(RimDefines::REMOVED), "ResultType", "", "" ,""); CAF_PDM_InitField(&m_resultName, "ResultName", QString(), "ResultName", "", "" ,""); CAF_PDM_InitFieldNoDefault(&m_timeStepDates, "TimeSteps", "TimeSteps", "", "" ,""); + CAF_PDM_InitFieldNoDefault(&m_daysSinceSimulationStart, "DaysSinceSimulationStart", "DaysSinceSimulationStart", "", "", ""); CAF_PDM_InitField(&m_filePosition, "FilePositionDataStart", qint64(-1), "FilePositionDataStart", "", "" ,""); } diff --git a/ApplicationCode/ProjectDataModel/RimReservoirCellResultsStorage.h b/ApplicationCode/ProjectDataModel/RimReservoirCellResultsStorage.h index 1acdcfd157..9793d7d67f 100644 --- a/ApplicationCode/ProjectDataModel/RimReservoirCellResultsStorage.h +++ b/ApplicationCode/ProjectDataModel/RimReservoirCellResultsStorage.h @@ -101,6 +101,7 @@ class RimReservoirCellResultsStorageEntryInfo : public caf::PdmObject caf::PdmField > m_resultType; caf::PdmField m_resultName; caf::PdmField< std::vector > m_timeStepDates; + caf::PdmField< std::vector > m_daysSinceSimulationStart; caf::PdmField m_filePosition; }; diff --git a/ApplicationCode/ProjectDataModel/RimScriptCollection.cpp b/ApplicationCode/ProjectDataModel/RimScriptCollection.cpp index 04908c574c..2ed6cc2778 100644 --- a/ApplicationCode/ProjectDataModel/RimScriptCollection.cpp +++ b/ApplicationCode/ProjectDataModel/RimScriptCollection.cpp @@ -87,11 +87,12 @@ void RimScriptCollection::readContentFromDisc() { QString fileName = fileList.at(i); - QFileInfo fi(fileName); - if (fi.exists()) + if (caf::Utils::fileExists(fileName)) { RimCalcScript* calcScript = new RimCalcScript; calcScript->absolutePath = fileName; + + QFileInfo fi(fileName); calcScript->setUiName(fi.baseName()); calcScripts.push_back(calcScript); @@ -187,7 +188,10 @@ void RimScriptCollection::defineEditorAttribute(const caf::PdmFieldHandle* field { if (field == &directory) { - caf::PdmUiFilePathEditorAttribute* myAttr = static_cast(attribute); - myAttr->m_selectDirectory = true; + caf::PdmUiFilePathEditorAttribute* myAttr = dynamic_cast(attribute); + if (myAttr) + { + myAttr->m_selectDirectory = true; + } } } diff --git a/ApplicationCode/ProjectDataModel/RimTernaryLegendConfig.cpp b/ApplicationCode/ProjectDataModel/RimTernaryLegendConfig.cpp index 0c107d4f2c..c7e70a331e 100644 --- a/ApplicationCode/ProjectDataModel/RimTernaryLegendConfig.cpp +++ b/ApplicationCode/ProjectDataModel/RimTernaryLegendConfig.cpp @@ -19,15 +19,17 @@ #include "RimTernaryLegendConfig.h" -#include "cafPdmUiPushButtonEditor.h" -#include "cafPdmUiTextEditor.h" - #include "RiaApplication.h" + #include "RimEclipseView.h" +#include "RimViewLinker.h" #include "RivTernarySaturationOverlayItem.h" #include "RivTernaryScalarMapper.h" +#include "cafPdmUiPushButtonEditor.h" +#include "cafPdmUiTextEditor.h" + #include "cvfqtUtils.h" #include @@ -152,7 +154,19 @@ void RimTernaryLegendConfig::fieldChangedByUi(const caf::PdmFieldHandle* changed updateLabelText(); updateLegend(); - if (m_reservoirView) m_reservoirView->updateCurrentTimeStepAndRedraw(); + RimView* view = nullptr; + this->firstAncestorOrThisOfType(view); + + if (view) + { + RimViewLinker* viewLinker = view->assosiatedViewLinker(); + if (viewLinker) + { + viewLinker->updateCellResult(); + } + + view->updateCurrentTimeStepAndRedraw(); + } } //-------------------------------------------------------------------------------------------------- @@ -231,6 +245,15 @@ void RimTernaryLegendConfig::recreateLegend() updateLegend(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimTernaryLegendConfig::setUiValuesFromLegendConfig(const RimTernaryLegendConfig* otherLegendConfig) +{ + QString serializedObjectString = otherLegendConfig->writeObjectToXmlString(); + this->readObjectFromXmlString(serializedObjectString, caf::PdmDefaultObjectFactory::instance()); +} + //-------------------------------------------------------------------------------------------------- /// Rounding the double value to given number of significant digits //-------------------------------------------------------------------------------------------------- @@ -298,7 +321,7 @@ void RimTernaryLegendConfig::defineUiOrdering(QString uiConfigName, caf::PdmUiOr group->add(&ternaryRangeSummary); } - uiOrdering.setForgetRemainingFields(true); + uiOrdering.skipRemainingFields(true); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimTernaryLegendConfig.h b/ApplicationCode/ProjectDataModel/RimTernaryLegendConfig.h index 321629cdec..544a980f36 100644 --- a/ApplicationCode/ProjectDataModel/RimTernaryLegendConfig.h +++ b/ApplicationCode/ProjectDataModel/RimTernaryLegendConfig.h @@ -65,15 +65,13 @@ class RimTernaryLegendConfig : public caf::PdmObject RimTernaryLegendConfig(); virtual ~RimTernaryLegendConfig(); - void setReservoirView(RimEclipseView* ownerReservoirView) {m_reservoirView = ownerReservoirView; } - void setAutomaticRanges(TernaryArrayIndex ternaryIndex, double globalMin, double globalMax, double localMin, double localMax); void ternaryRanges(double& soilLower, double& soilUpper, double& sgasLower, double& sgasUpper, double& swatLower, double& swatUpper) const; void recreateLegend(); RivTernarySaturationOverlayItem* legend(); - RivTernaryScalarMapper* scalarMapper(); + RivTernaryScalarMapper* scalarMapper(); protected: virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue); @@ -84,7 +82,9 @@ class RimTernaryLegendConfig : public caf::PdmObject void updateLegend(); void updateLabelText(); double roundToNumSignificantDigits(double value, double precision); - + + friend class RimViewLinker; + void setUiValuesFromLegendConfig(const RimTernaryLegendConfig* otherLegendConfig); private: caf::PdmField precision; @@ -107,7 +107,6 @@ class RimTernaryLegendConfig : public caf::PdmObject std::vector m_localAutoMax; std::vector m_localAutoMin; - caf::PdmPointer m_reservoirView; cvf::ref m_legend; cvf::ref m_scalarMapper; }; diff --git a/ApplicationCode/ProjectDataModel/RimTools.cpp b/ApplicationCode/ProjectDataModel/RimTools.cpp index 7c982956ab..2d47f7c43a 100644 --- a/ApplicationCode/ProjectDataModel/RimTools.cpp +++ b/ApplicationCode/ProjectDataModel/RimTools.cpp @@ -21,7 +21,16 @@ #include "RimTools.h" #include "RiaApplication.h" + +#include "RimCase.h" +#include "RimOilField.h" #include "RimProject.h" +#include "RimWellLogFile.h" +#include "RimWellPath.h" +#include "RimWellPathCollection.h" + +#include "cafPdmUiItem.h" +#include "cafUtils.h" #include #include @@ -73,7 +82,7 @@ QString RimTools::relocateFile(const QString& orgFileName, const QString& orgNew bool isWindowsPath = false; if (orgFileName.count("/")) isWindowsPath = false; // "/" are not allowed in a windows path else if (orgFileName.count("\\") - && !QFile::exists(orgFileName)) // To make sure we do not convert single linux files containing "\" + && !caf::Utils::fileExists(orgFileName)) // To make sure we do not convert single linux files containing "\" { isWindowsPath = true; } @@ -85,7 +94,7 @@ QString RimTools::relocateFile(const QString& orgFileName, const QString& orgNew } if (searchedPaths) searchedPaths->push_back(fileName); - if (QFile::exists(fileName)) + if (caf::Utils::fileExists(fileName)) { return fileName; } @@ -96,7 +105,7 @@ QString RimTools::relocateFile(const QString& orgFileName, const QString& orgNew QString candidate = QDir::fromNativeSeparators(newProjectPath + QDir::separator() + fileNameWithoutPath); if (searchedPaths) searchedPaths->push_back(candidate); - if (QFile::exists(candidate)) + if (caf::Utils::fileExists(candidate)) { return candidate; } @@ -122,7 +131,15 @@ QString RimTools::relocateFile(const QString& orgFileName, const QString& orgNew int firstDiffIdx = 0; for (firstDiffIdx = 0; firstDiffIdx < gridPathElements.size() && firstDiffIdx < oldProjPathElements.size(); ++firstDiffIdx) { - if (gridPathElements[firstDiffIdx] == oldProjPathElements[firstDiffIdx]) +#ifdef WIN32 + // When comparing parts of a file path, the drive letter has been seen to be a mix of + // upper and lower cases. Always use case insensitive compare on Windows, as this is a valid approach + // for all parts for a file path + Qt::CaseSensitivity cs = Qt::CaseInsensitive; +#else + Qt::CaseSensitivity cs = Qt::CaseSensitive; +#endif + if (gridPathElements[firstDiffIdx].compare(oldProjPathElements[firstDiffIdx], cs) == 0) { pathStartsAreEqual = pathStartsAreEqual || !gridPathElements[firstDiffIdx].isEmpty(); } @@ -183,7 +200,7 @@ QString RimTools::relocateFile(const QString& orgFileName, const QString& orgNew if (searchedPaths) searchedPaths->push_back(relocatedFileName); - if (QFile::exists(relocatedFileName)) + if (caf::Utils::fileExists(relocatedFileName)) { return relocatedFileName; } @@ -200,3 +217,45 @@ QString RimTools::relocateFile(const QString& orgFileName, const QString& orgNew return fileName; } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimTools::wellPathOptionItems(QList* options) +{ + CVF_ASSERT(options); + if (!options) return; + + RimProject* proj = RiaApplication::instance()->project(); + if (proj && proj->activeOilField() && proj->activeOilField()->wellPathCollection()) + { + caf::PdmChildArrayField& wellPaths = proj->activeOilField()->wellPathCollection()->wellPaths; + + QIcon wellIcon(":/Well.png"); + for (RimWellPath* wellPath : wellPaths) + { + options->push_back(caf::PdmOptionItemInfo(wellPath->name(), wellPath, false, wellIcon)); + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimTools::caseOptionItems(QList* options) +{ + CVF_ASSERT(options); + if (!options) return; + + RimProject* proj = RiaApplication::instance()->project(); + if (proj) + { + std::vector cases; + proj->allCases(cases); + + for (RimCase* c : cases) + { + options->push_back(caf::PdmOptionItemInfo(c->caseUserDescription(), c, false, c->uiIcon())); + } + } +} diff --git a/ApplicationCode/ProjectDataModel/RimTools.h b/ApplicationCode/ProjectDataModel/RimTools.h index e2f39a0eb3..8078c44f39 100644 --- a/ApplicationCode/ProjectDataModel/RimTools.h +++ b/ApplicationCode/ProjectDataModel/RimTools.h @@ -20,14 +20,22 @@ #pragma once +#include #include #include +namespace caf { + class PdmOptionItemInfo; +} + class RimTools { public: static QString getCacheRootDirectoryPathFromProject(); static QString relocateFile(const QString& fileName, const QString& newProjectPath, const QString& oldProjectPath, bool* foundFile, std::vector* searchedPaths); + + static void wellPathOptionItems(QList* options); + static void caseOptionItems(QList* options); }; diff --git a/ApplicationCode/ProjectDataModel/RimView.cpp b/ApplicationCode/ProjectDataModel/RimView.cpp index aff25c9b4b..70970875f4 100644 --- a/ApplicationCode/ProjectDataModel/RimView.cpp +++ b/ApplicationCode/ProjectDataModel/RimView.cpp @@ -3,14 +3,13 @@ #include "RiaApplication.h" #include "RiaPreferences.h" -#include "RigCaseData.h" - #include "Rim3dOverlayInfoConfig.h" #include "RimCellRangeFilterCollection.h" #include "RimEclipseCase.h" #include "RimEclipseView.h" #include "RimGridCollection.h" #include "RimIntersectionCollection.h" +#include "RimMainPlotCollection.h" #include "RimOilField.h" #include "RimProject.h" #include "RimPropertyFilterCollection.h" @@ -75,9 +74,6 @@ RimView::RimView(void) CAF_PDM_InitField(&name, "UserDescription", QString(""), "Name", "", "", ""); - CAF_PDM_InitField(&showWindow, "ShowWindow", true, "Show 3D viewer", "", "", ""); - showWindow.uiCapability()->setUiHidden(true); - CAF_PDM_InitField(&cameraPosition, "CameraPosition", cvf::Mat4d::IDENTITY, "", "", "", ""); cameraPosition.uiCapability()->setUiHidden(true); @@ -142,6 +138,8 @@ RimView::RimView(void) m_wellPathPipeVizModel = new cvf::ModelBasicList; m_wellPathPipeVizModel->setName("WellPathPipeModel"); + + this->setAs3DViewMdiWindow(); } //-------------------------------------------------------------------------------------------------- @@ -171,12 +169,9 @@ RimView::~RimView(void) delete this->m_overlayInfoConfig(); - if (m_viewer) - { - RiuMainWindow::instance()->removeViewer(m_viewer->layoutWidget()); - } + removeMdiWindowFromMdiArea(); - delete m_viewer; + deleteViewWidget(); delete m_rangeFilterCollection; delete m_overrideRangeFilterCollection; @@ -195,63 +190,95 @@ RiuViewer* RimView::viewer() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimView::updateViewerWidget() +QWidget* RimView::createViewWidget(QWidget* mainWindowParent) { - if (showWindow()) - { - bool isViewerCreated = false; - if (!m_viewer) - { - QGLFormat glFormat; - glFormat.setDirectRendering(RiaApplication::instance()->useShaders()); + QGLFormat glFormat; + glFormat.setDirectRendering(RiaApplication::instance()->useShaders()); - m_viewer = new RiuViewer(glFormat, NULL); - m_viewer->setOwnerReservoirView(this); + m_viewer = new RiuViewer(glFormat, NULL); + m_viewer->setOwnerReservoirView(this); - RiuMainWindow::instance()->addViewer(m_viewer->layoutWidget(), mdiWindowGeometry()); - m_viewer->setDefaultPerspectiveNearPlaneDistance(10); - - this->resetLegendsInViewer(); + return m_viewer->layoutWidget(); +} - m_viewer->updateNavigationPolicy(); - m_viewer->enablePerfInfoHud(RiaApplication::instance()->showPerformanceInfo()); - isViewerCreated = true; - } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimView::updateViewWidgetAfterCreation() +{ + m_viewer->setDefaultPerspectiveNearPlaneDistance(10); - RiuMainWindow::instance()->setActiveViewer(m_viewer->layoutWidget()); + this->resetLegendsInViewer(); - if(isViewerCreated) - { - m_viewer->mainCamera()->setViewMatrix(cameraPosition); - m_viewer->setPointOfInterest(cameraPointOfInterest()); - m_viewer->enableParallelProjection(!isPerspectiveView()); - } - m_viewer->mainCamera()->viewport()->setClearColor(cvf::Color4f(backgroundColor())); + m_viewer->updateNavigationPolicy(); + m_viewer->enablePerfInfoHud(RiaApplication::instance()->showPerformanceInfo()); - this->updateGridBoxData(); - this->createHighlightAndGridBoxDisplayModel(); + m_viewer->mainCamera()->setViewMatrix(cameraPosition); + m_viewer->setPointOfInterest(cameraPointOfInterest()); + m_viewer->enableParallelProjection(!isPerspectiveView()); - m_viewer->update(); - } - else + m_viewer->mainCamera()->viewport()->setClearColor(cvf::Color4f(backgroundColor())); + + this->updateGridBoxData(); + this->createHighlightAndGridBoxDisplayModel(); + + m_viewer->update(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimView::updateMdiWindowTitle() +{ + if (m_viewer) { - if (m_viewer && m_viewer->layoutWidget()) + QString windowTitle; + if (ownerCase()) { - if (m_viewer->layoutWidget()->parentWidget()) - { - m_viewer->layoutWidget()->parentWidget()->hide(); - } - else - { - m_viewer->layoutWidget()->hide(); - } + windowTitle = QString("%1 - %2").arg(ownerCase()->caseUserDescription()).arg(name); } + else + { + windowTitle = name; + } + + m_viewer->layoutWidget()->setWindowTitle(windowTitle); } +} - updateViewerWidgetWindowTitle(); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimView::deleteViewWidget() +{ + if (m_viewer) + { + m_viewer->deleteLater(); + m_viewer = nullptr; + } } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimView::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) +{ + caf::PdmUiGroup* viewGroup = uiOrdering.addNewGroup("Viewer"); + viewGroup->add(&name); + viewGroup->add(&backgroundColor); + viewGroup->add(&showGridBox); + viewGroup->add(&isPerspectiveView); + viewGroup->add(&m_disableLighting); + + caf::PdmUiGroup* gridGroup = uiOrdering.addNewGroup("Grid Appearance"); + gridGroup->add(&scaleZ); + gridGroup->add(&meshMode); + gridGroup->add(&surfaceMode); + + +} //-------------------------------------------------------------------------------------------------- /// @@ -260,6 +287,9 @@ QImage RimView::snapshotWindowContent() { if (m_viewer) { + // Force update of scheduled display models before snapshotting + RiaApplication::instance()->slotUpdateScheduledDisplayModels(); + m_viewer->repaint(); return m_viewer->snapshotImage(); @@ -284,6 +314,20 @@ void RimView::scheduleCreateDisplayModelAndRedraw() } } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimView::setCurrentTimeStepAndUpdate(int frameIndex) +{ + setCurrentTimeStep(frameIndex); + + this->updateCurrentTimeStep(); + + RimProject* project; + firstAncestorOrThisOfTypeAsserted(project); + project->mainPlotCollection()->updateCurrentTimeStepInPlots(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -297,15 +341,19 @@ void RimView::setCurrentTimeStep(int frameIndex) { m_currentReservoirCellVisibility = NULL; } - this->updateCurrentTimeStep(); } + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void RimView::updateCurrentTimeStepAndRedraw() { this->updateCurrentTimeStep(); - + + RimProject* project; + firstAncestorOrThisOfTypeAsserted(project); + project->mainPlotCollection()->updateCurrentTimeStepInPlots(); + if (m_viewer) m_viewer->update(); } @@ -366,8 +414,6 @@ void RimView::setupBeforeSave() hasUserRequestedAnimation = m_viewer->isAnimationActive(); // JJS: This is not conceptually correct. The variable is updated as we go, and store the user intentions. But I guess that in practice... cameraPosition = m_viewer->mainCamera()->viewMatrix(); cameraPointOfInterest = m_viewer->pointOfInterest(); - - setMdiWindowGeometry(RiuMainWindow::instance()->windowGeometryForViewer(m_viewer->layoutWidget())); } } @@ -513,6 +559,8 @@ bool RimView::isLightingDisabled() const //-------------------------------------------------------------------------------------------------- void RimView::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) { + RimViewWindow::fieldChangedByUi(changedField, oldValue, newValue); + if (changedField == &meshMode) { createDisplayModel(); @@ -585,7 +633,7 @@ void RimView::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QV } else if (changedField == &name) { - updateViewerWidgetWindowTitle(); + updateMdiWindowTitle(); if (viewController()) { @@ -616,9 +664,9 @@ void RimView::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QV } else if (changedField == &backgroundColor) { - if (viewer() != NULL) + if (m_viewer != nullptr) { - updateViewerWidget(); + m_viewer->mainCamera()->viewport()->setClearColor(cvf::Color4f(backgroundColor())); } } else if (changedField == &maximumFrameRate) @@ -952,6 +1000,15 @@ cvf::ref RimView::displayCoordTransform() //-------------------------------------------------------------------------------------------------- QWidget* RimView::viewWidget() { - return m_viewer; + if ( m_viewer ) return m_viewer->layoutWidget(); + else return nullptr; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimView::forceShowWindowOn() +{ + m_showWindow.setValueWithFieldChanged(true); } diff --git a/ApplicationCode/ProjectDataModel/RimView.h b/ApplicationCode/ProjectDataModel/RimView.h index 0ed45f58c8..098c4fdabc 100644 --- a/ApplicationCode/ProjectDataModel/RimView.h +++ b/ApplicationCode/ProjectDataModel/RimView.h @@ -82,7 +82,6 @@ class RimView : public RimViewWindow caf::PdmField name; caf::PdmField scaleZ; - caf::PdmField showWindow; caf::PdmField cameraPosition; caf::PdmField cameraPointOfInterest; caf::PdmField isPerspectiveView; @@ -137,10 +136,10 @@ class RimView : public RimViewWindow void setScaleZAndUpdate(double scaleZ); // Animation - int currentTimeStep() { return m_currentTimeStep;} + int currentTimeStep() const { return m_currentTimeStep;} void setCurrentTimeStep(int frameIdx); + void updateCurrentTimeStepAndRedraw(); - void endAnimation(); virtual void scheduleGeometryRegen(RivCellSetEnum geometryType) = 0; void scheduleCreateDisplayModelAndRedraw(); @@ -166,12 +165,12 @@ class RimView : public RimViewWindow cvf::ref displayCoordTransform(); virtual QWidget* viewWidget() override; + void forceShowWindowOn(); public: virtual void loadDataAndUpdate() = 0; virtual RimCase* ownerCase() = 0; - virtual caf::PdmFieldHandle* objectToggleField() { return &showWindow; } virtual caf::PdmFieldHandle* userDescriptionField() { return &name; } protected: @@ -201,9 +200,6 @@ class RimView : public RimViewWindow virtual void updateScaleTransform() = 0; virtual cvf::Transform* scaleTransform() = 0; - void updateViewerWidget(); - virtual void updateViewerWidgetWindowTitle() = 0; - virtual void resetLegendsInViewer() = 0; virtual void calculateCurrentTotalCellVisibility(cvf::UByteArray* totalVisibility) = 0; @@ -219,8 +215,14 @@ class RimView : public RimViewWindow // Overridden PDM methods: virtual void setupBeforeSave(); + virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue); + virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override; + - virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue); + virtual QWidget* createViewWidget(QWidget* mainWindowParent) override; + virtual void updateViewWidgetAfterCreation() override; + virtual void updateMdiWindowTitle() override; + virtual void deleteViewWidget() override; cvf::ref m_currentReservoirCellVisibility; @@ -230,6 +232,11 @@ class RimView : public RimViewWindow private: RimViewLinker* viewLinkerIfMasterView() const; + + friend class RiuViewer; + void setCurrentTimeStepAndUpdate(int frameIdx); + void endAnimation(); + private: bool m_previousGridModeMeshLinesWasFaults; caf::PdmField m_disableLighting; diff --git a/ApplicationCode/ProjectDataModel/RimViewController.cpp b/ApplicationCode/ProjectDataModel/RimViewController.cpp index e016374774..fa28191803 100644 --- a/ApplicationCode/ProjectDataModel/RimViewController.cpp +++ b/ApplicationCode/ProjectDataModel/RimViewController.cpp @@ -21,13 +21,14 @@ #include "RiaApplication.h" -#include "RigCaseData.h" #include "RigCaseToCaseCellMapper.h" #include "RigCaseToCaseRangeFilterMapper.h" #include "RigFemPartCollection.h" #include "RigGeoMechCaseData.h" +#include "RigMainGrid.h" #include "RimCase.h" +#include "RimCellRangeFilter.h" #include "RimCellRangeFilterCollection.h" #include "RimEclipseCase.h" #include "RimEclipseCellColors.h" @@ -66,9 +67,11 @@ RimViewController::RimViewController(void) CAF_PDM_InitFieldNoDefault(&m_managedView, "ManagedView", "Linked View", "", "", ""); m_managedView.uiCapability()->setUiTreeChildrenHidden(true); - CAF_PDM_InitField(&m_syncCamera, "SyncCamera", true, "Camera", "", "", ""); - CAF_PDM_InitField(&m_syncTimeStep, "SyncTimeStep", true, "Time Step", "", "", ""); - CAF_PDM_InitField(&m_syncCellResult, "SyncCellResult", false, "Cell Color Result", "", "", ""); + CAF_PDM_InitField(&m_syncCamera, "SyncCamera", true, "Camera", "", "", ""); + CAF_PDM_InitField(&m_showCursor, "ShowCursor", true, " Show Cursor", "", "", ""); + CAF_PDM_InitField(&m_syncTimeStep, "SyncTimeStep", true, "Time Step", "", "", ""); + CAF_PDM_InitField(&m_syncCellResult, "SyncCellResult", false, "Cell Result", "", "", ""); + CAF_PDM_InitField(&m_syncLegendDefinitions, "SyncLegendDefinitions", true, " Legend Definition", "", "", ""); CAF_PDM_InitField(&m_syncVisibleCells, "SyncVisibleCells", false, "Visible Cells", "", "", ""); /// We do not support this. Consider to remove sometime @@ -93,7 +96,7 @@ RimViewController::~RimViewController(void) //-------------------------------------------------------------------------------------------------- QList RimViewController::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) { - QList optionList; + QList options; if (fieldNeedingOptions == &m_managedView) { @@ -107,35 +110,33 @@ QList RimViewController::calculateValueOptions(const caf views.push_back(this->managedView()); } - RimViewLinker* linkedViews = NULL; - this->firstAncestorOrThisOfType(linkedViews); + RimViewLinker* viewLinker = nullptr; + this->firstAncestorOrThisOfType(viewLinker); + CVF_ASSERT(viewLinker); - for (size_t i = 0; i< views.size(); i++) + for (RimView* view : views) { - if (views[i] != linkedViews->masterView()) + if (view != viewLinker->masterView()) { - RimCase* rimCase = NULL; - views[i]->firstAncestorOrThisOfType(rimCase); + RimCase* rimCase = nullptr; + view->firstAncestorOrThisOfType(rimCase); QIcon icon; if (rimCase) { icon = rimCase->uiCapability()->uiIcon(); } - optionList.push_back(caf::PdmOptionItemInfo(RimViewLinker::displayNameForView(views[i]), - QVariant::fromValue(caf::PdmPointer(views[i])), - false, - icon)); + options.push_back(caf::PdmOptionItemInfo(RimViewLinker::displayNameForView(view), view, false, icon)); } } - if (optionList.size() > 0) + if (options.size() > 0) { - optionList.push_front(caf::PdmOptionItemInfo("None", QVariant::fromValue(caf::PdmPointer(NULL)))); + options.push_front(caf::PdmOptionItemInfo("None", nullptr)); } } - return optionList; + return options; } //-------------------------------------------------------------------------------------------------- @@ -144,7 +145,7 @@ QList RimViewController::calculateValueOptions(const caf void RimViewController::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/) { updateDisplayNameAndIcon(); - uiTreeOrdering.setForgetRemainingFields(true); + uiTreeOrdering.skipRemainingChildren(true); } //-------------------------------------------------------------------------------------------------- @@ -173,6 +174,13 @@ void RimViewController::fieldChangedByUi(const caf::PdmFieldHandle* changedField { updateTimeStepLink(); } + else if (changedField == &m_showCursor) + { + if (!m_showCursor && m_managedView && m_managedView->viewer()) + { + m_managedView->viewer()->setCursorPosition(cvf::Vec3d::UNDEFINED); + } + } else if (changedField == &m_syncCellResult) { updateResultColorsControl(); @@ -185,6 +193,10 @@ void RimViewController::fieldChangedByUi(const caf::PdmFieldHandle* changedField managedGeoView()->cellResult()->updateIconState(); } } + else if (changedField == &m_syncLegendDefinitions) + { + updateLegendDefinitions(); + } else if (changedField == &m_syncRangeFilters) { if (!m_syncRangeFilters) @@ -218,7 +230,7 @@ void RimViewController::fieldChangedByUi(const caf::PdmFieldHandle* changedField //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimEclipseView* RimViewController::managedEclipseView() +RimEclipseView* RimViewController::managedEclipseView() const { RimView* rimView = m_managedView; @@ -228,7 +240,7 @@ RimEclipseView* RimViewController::managedEclipseView() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimGeoMechView* RimViewController::managedGeoView() +RimGeoMechView* RimViewController::managedGeoView() const { RimView* rimView = m_managedView; @@ -350,12 +362,19 @@ void RimViewController::removeOverrides(RimView* view) //-------------------------------------------------------------------------------------------------- void RimViewController::updateOptionSensitivity() { - RimViewLinker* linkedViews = NULL; - firstAncestorOrThisOfType(linkedViews); - CVF_ASSERT(linkedViews); + RimView* mainView = nullptr; + + { + RimViewLinker* linkedViews = nullptr; + firstAncestorOrThisOfType(linkedViews); + CVF_ASSERT(linkedViews); - RimView* mainView = linkedViews->masterView(); - CVF_ASSERT(mainView); + if (linkedViews) + { + mainView = linkedViews->masterView(); + } + CVF_ASSERT(mainView); + } RimEclipseView* eclipseMasterView = dynamic_cast(mainView); RimGeoMechView* geoMasterView = dynamic_cast(mainView); @@ -365,6 +384,7 @@ void RimViewController::updateOptionSensitivity() { isMasterAndDependentViewDifferentType = true; } + if (geoMasterView && !managedGeoView()) { isMasterAndDependentViewDifferentType = true; @@ -374,10 +394,22 @@ void RimViewController::updateOptionSensitivity() { this->m_syncCellResult.uiCapability()->setUiReadOnly(true); this->m_syncCellResult = false; + + this->m_syncLegendDefinitions.uiCapability()->setUiReadOnly(true); + this->m_syncLegendDefinitions = false; } else { this->m_syncCellResult.uiCapability()->setUiReadOnly(false); + + if (this->m_syncCellResult) + { + this->m_syncLegendDefinitions.uiCapability()->setUiReadOnly(false); + } + else + { + this->m_syncLegendDefinitions.uiCapability()->setUiReadOnly(true); + } } if (isPropertyFilterControlPossible()) @@ -390,7 +422,6 @@ void RimViewController::updateOptionSensitivity() this->m_syncPropertyFilters = false; } - if (isRangeFilterControlPossible()) { this->m_syncRangeFilters.uiCapability()->setUiReadOnly(false); @@ -401,13 +432,23 @@ void RimViewController::updateOptionSensitivity() this->m_syncRangeFilters = false; } + if (m_syncCamera) + { + this->m_showCursor.uiCapability()->setUiReadOnly(false); + } + else + { + this->m_showCursor.uiCapability()->setUiReadOnly(true); + this->m_showCursor = false; + } + m_syncVisibleCells.uiCapability()->setUiReadOnly(!this->isMasterAndDepViewDifferentType()); } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimView* RimViewController::managedView() +RimView* RimViewController::managedView() const { return m_managedView; } @@ -438,8 +479,10 @@ void RimViewController::defineUiOrdering(QString uiConfigName, caf::PdmUiOrderin caf::PdmUiGroup* scriptGroup = uiOrdering.addNewGroup("Link Options"); scriptGroup->add(&m_syncCamera); + scriptGroup->add(&m_showCursor); scriptGroup->add(&m_syncTimeStep); scriptGroup->add(&m_syncCellResult); + scriptGroup->add(&m_syncLegendDefinitions); caf::PdmUiGroup* visibleCells = uiOrdering.addNewGroup("Link Cell Filters"); visibleCells->add(&m_syncVisibleCells); @@ -501,7 +544,18 @@ void RimViewController::updateResultColorsControl() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimViewLinker* RimViewController::ownerViewLinker() +void RimViewController::updateLegendDefinitions() +{ + if (!this->isLegendDefinitionsControlled()) return; + + RimViewLinker* viewLinker = ownerViewLinker(); + viewLinker->updateCellResult(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimViewLinker* RimViewController::ownerViewLinker() const { RimViewLinker* viewLinker = NULL; this->firstAncestorOrThisOfType(viewLinker); @@ -524,14 +578,14 @@ const RigCaseToCaseCellMapper* RimViewController::cellMapper() RigFemPart* masterFemPart = NULL; RigFemPart* dependFemPart = NULL; - if (masterEclipseView && masterEclipseView->eclipseCase()->reservoirData()) + if (masterEclipseView) { - masterEclGrid = masterEclipseView->eclipseCase()->reservoirData()->mainGrid(); + masterEclGrid = masterEclipseView->mainGrid(); } - if (dependEclipseView && dependEclipseView->eclipseCase()->reservoirData()) + if (dependEclipseView) { - dependEclGrid = dependEclipseView->eclipseCase()->reservoirData()->mainGrid(); + dependEclGrid = dependEclipseView->mainGrid(); } if (masterGeomechView && masterGeomechView->geoMechCase()->geoMechData() @@ -580,7 +634,7 @@ const RigCaseToCaseCellMapper* RimViewController::cellMapper() } else if (masterFemPart && dependEclGrid) { - m_caseToCaseCellMapper = new RigCaseToCaseCellMapper(masterFemPart, dependEclGrid); + m_caseToCaseCellMapper = new RigCaseToCaseCellMapper(masterFemPart, dependEclGrid); } } @@ -590,7 +644,7 @@ const RigCaseToCaseCellMapper* RimViewController::cellMapper() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimView* RimViewController::masterView() +RimView* RimViewController::masterView() const { return ownerViewLinker()->masterView(); } @@ -598,7 +652,7 @@ RimView* RimViewController::masterView() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RimViewController::isMasterAndDepViewDifferentType() +bool RimViewController::isMasterAndDepViewDifferentType() const { RimEclipseView* eclipseMasterView = dynamic_cast(masterView()); RimGeoMechView* geoMasterView = dynamic_cast(masterView()); @@ -619,7 +673,7 @@ bool RimViewController::isMasterAndDepViewDifferentType() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimViewController::scheduleCreateDisplayModelAndRedrawForDependentView() +void RimViewController::scheduleCreateDisplayModelAndRedrawForDependentView() const { if (!this->isActive()) return; @@ -639,7 +693,7 @@ void RimViewController::scheduleCreateDisplayModelAndRedrawForDependentView() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimViewController::scheduleGeometryRegenForDepViews(RivCellSetEnum geometryType) +void RimViewController::scheduleGeometryRegenForDepViews(RivCellSetEnum geometryType) const { if (!this->isActive()) return; @@ -664,7 +718,7 @@ void RimViewController::scheduleGeometryRegenForDepViews(RivCellSetEnum geometry //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RimViewController::isActive() +bool RimViewController::isActive() const { return ownerViewLinker()->isActive() && this->m_isActive(); } @@ -672,7 +726,7 @@ bool RimViewController::isActive() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RimViewController::isCameraLinked() +bool RimViewController::isCameraLinked() const { if (ownerViewLinker()->isActive() && this->m_isActive()) { @@ -687,7 +741,15 @@ bool RimViewController::isCameraLinked() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RimViewController::isTimeStepLinked() +bool RimViewController::showCursor() const +{ + return m_showCursor; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimViewController::isTimeStepLinked() const { if (ownerViewLinker()->isActive() && this->m_isActive()) { @@ -702,7 +764,7 @@ bool RimViewController::isTimeStepLinked() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RimViewController::isResultColorControlled() +bool RimViewController::isResultColorControlled() const { if (ownerViewLinker()->isActive() && this->m_isActive()) { @@ -717,7 +779,22 @@ bool RimViewController::isResultColorControlled() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RimViewController::isVisibleCellsOveridden() +bool RimViewController::isLegendDefinitionsControlled() const +{ + if (ownerViewLinker()->isActive() && this->m_isActive()) + { + return m_syncLegendDefinitions; + } + else + { + return false; + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimViewController::isVisibleCellsOveridden() const { if (isMasterAndDepViewDifferentType()) { @@ -739,7 +816,7 @@ bool RimViewController::isVisibleCellsOveridden() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RimViewController::isRangeFilterControlPossible() +bool RimViewController::isRangeFilterControlPossible() const { return true; #if 0 @@ -773,7 +850,7 @@ bool RimViewController::isRangeFilterControlPossible() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RimViewController::isRangeFilterMappingApliccable() +bool RimViewController::isRangeFilterMappingApliccable() const { if (!isMasterAndDepViewDifferentType()) return false; @@ -785,9 +862,9 @@ bool RimViewController::isRangeFilterMappingApliccable() if (eclipseView && geomView) { - if (eclipseView->eclipseCase()->reservoirData() && geomView->geoMechCase() && geomView->geoMechCase()->geoMechData()) + if (eclipseView->eclipseCase()->eclipseCaseData() && geomView->geoMechCase() && geomView->geoMechCase()->geoMechData()) { - RigMainGrid* eclGrid = eclipseView->eclipseCase()->reservoirData()->mainGrid(); + RigMainGrid* eclGrid = eclipseView->mainGrid(); RigFemPart* femPart = geomView->geoMechCase()->geoMechData()->femParts()->part(0); if (eclGrid && femPart) @@ -806,7 +883,7 @@ bool RimViewController::isRangeFilterMappingApliccable() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RimViewController::isRangeFiltersControlled() +bool RimViewController::isRangeFiltersControlled() const { if (!isRangeFilterControlPossible()) return false; @@ -822,7 +899,7 @@ bool RimViewController::isRangeFiltersControlled() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RimViewController::isPropertyFilterControlPossible() +bool RimViewController::isPropertyFilterControlPossible() const { // The cases need to be the same RimGeoMechView* geomView = dynamic_cast(masterView()); @@ -854,7 +931,7 @@ bool RimViewController::isPropertyFilterControlPossible() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RimViewController::isPropertyFilterOveridden() +bool RimViewController::isPropertyFilterOveridden() const { if (!isPropertyFilterControlPossible()) return false; @@ -902,9 +979,9 @@ void RimViewController::updateRangeFilterOverrides(RimCellRangeFilter* changedRa if (eclipseMasterView && depGeomView) { - if (eclipseMasterView->eclipseCase()->reservoirData()) + if (eclipseMasterView->mainGrid()) { - RigMainGrid* srcEclGrid = eclipseMasterView->eclipseCase()->reservoirData()->mainGrid(); + RigMainGrid* srcEclGrid = eclipseMasterView->mainGrid(); RigFemPart* dstFemPart = depGeomView->geoMechCase()->geoMechData()->femParts()->part(0); for (size_t rfIdx = 0; rfIdx < sourceFilterCollection->rangeFilters().size(); ++rfIdx) { @@ -917,10 +994,10 @@ void RimViewController::updateRangeFilterOverrides(RimCellRangeFilter* changedRa } else if (geoMasterView && depEclView) { - if (depEclView->eclipseCase()->reservoirData()) + if (depEclView->mainGrid()) { RigFemPart* srcFemPart = geoMasterView->geoMechCase()->geoMechData()->femParts()->part(0); - RigMainGrid* dstEclGrid = depEclView->eclipseCase()->reservoirData()->mainGrid(); + RigMainGrid* dstEclGrid = depEclView->mainGrid(); for (size_t rfIdx = 0; rfIdx < sourceFilterCollection->rangeFilters().size(); ++rfIdx) { RimCellRangeFilter* srcRFilter = sourceFilterCollection->rangeFilters[rfIdx]; diff --git a/ApplicationCode/ProjectDataModel/RimViewController.h b/ApplicationCode/ProjectDataModel/RimViewController.h index 1f30e228f0..e8eda82175 100644 --- a/ApplicationCode/ProjectDataModel/RimViewController.h +++ b/ApplicationCode/ProjectDataModel/RimViewController.h @@ -47,27 +47,29 @@ class RimViewController : public caf::PdmObject RimViewController(void); virtual ~RimViewController(void); - bool isActive(); + bool isActive() const; - RimView* managedView(); + RimView* managedView() const; void setManagedView(RimView* view); - RimView* masterView(); - RimViewLinker* ownerViewLinker(); + RimView* masterView() const; + RimViewLinker* ownerViewLinker() const; const RigCaseToCaseCellMapper* cellMapper(); - bool isCameraLinked(); - bool isTimeStepLinked(); + bool isCameraLinked() const; + bool showCursor() const; + bool isTimeStepLinked() const; - bool isResultColorControlled(); - bool isRangeFiltersControlled(); + bool isResultColorControlled() const; + bool isLegendDefinitionsControlled() const; + bool isRangeFiltersControlled() const; - bool isVisibleCellsOveridden(); - bool isPropertyFilterOveridden(); + bool isVisibleCellsOveridden() const; + bool isPropertyFilterOveridden() const; - void scheduleCreateDisplayModelAndRedrawForDependentView(); - void scheduleGeometryRegenForDepViews(RivCellSetEnum geometryType); + void scheduleCreateDisplayModelAndRedrawForDependentView() const; + void scheduleGeometryRegenForDepViews(RivCellSetEnum geometryType) const; void updateOverrides(); void updateOptionSensitivity(); void removeOverrides(); @@ -90,27 +92,32 @@ class RimViewController : public caf::PdmObject void updateCameraLink(); void updateTimeStepLink(); void updateResultColorsControl(); + void updateLegendDefinitions(); - bool isMasterAndDepViewDifferentType(); - bool isRangeFilterControlPossible(); - bool isPropertyFilterControlPossible(); - bool isRangeFilterMappingApliccable(); + bool isMasterAndDepViewDifferentType() const; + bool isRangeFilterControlPossible() const; + bool isPropertyFilterControlPossible() const; + bool isRangeFilterMappingApliccable() const; - RimEclipseView* managedEclipseView(); - RimGeoMechView* managedGeoView(); + RimEclipseView* managedEclipseView() const; + RimGeoMechView* managedGeoView() const; + static void removeOverrides(RimView* view); - static bool askUserToRestoreOriginalRangeFilterCollection(const QString& viewName); + private: caf::PdmField m_name; caf::PdmPtrField m_managedView; caf::PdmField m_isActive; caf::PdmField m_syncCamera; + caf::PdmField m_showCursor; caf::PdmField m_syncTimeStep; + // Overridden properties caf::PdmField m_syncCellResult; + caf::PdmField m_syncLegendDefinitions; caf::PdmField m_syncRangeFilters; caf::PdmField m_syncVisibleCells; diff --git a/ApplicationCode/ProjectDataModel/RimViewLinker.cpp b/ApplicationCode/ProjectDataModel/RimViewLinker.cpp index 8d1e71c6a8..ae2cb4687a 100644 --- a/ApplicationCode/ProjectDataModel/RimViewLinker.cpp +++ b/ApplicationCode/ProjectDataModel/RimViewLinker.cpp @@ -21,10 +21,9 @@ #include "RiaApplication.h" -#include "RigCaseData.h" +#include "RigMainGrid.h" #include "RimCase.h" - #include "RimEclipseCellColors.h" #include "RimEclipseInputCase.h" #include "RimEclipseResultCase.h" @@ -34,16 +33,18 @@ #include "RimGeoMechCellColors.h" #include "RimGeoMechResultDefinition.h" #include "RimGeoMechView.h" -#include "RimViewController.h" +#include "RimLegendConfig.h" #include "RimProject.h" +#include "RimTernaryLegendConfig.h" #include "RimView.h" +#include "RimViewController.h" #include "RimViewLinkerCollection.h" +#include "RimViewManipulator.h" #include "RiuViewer.h" #include "cvfCamera.h" #include "cvfScene.h" -#include "cafFrameAnimationControl.h" #include "cvfMatrix4.h" #include "cafPdmUiTreeOrdering.h" @@ -102,7 +103,6 @@ void RimViewLinker::updateTimeStep(RimView* sourceView, int timeStep) if (m_masterView && m_masterView->viewer() && sourceView != m_masterView) { m_masterView->viewer()->setCurrentFrame(timeStep); - m_masterView->viewer()->animationControl()->setCurrentFrameOnly(timeStep); } for (size_t i = 0; i < m_viewControllers.size(); i++) @@ -116,7 +116,6 @@ void RimViewLinker::updateTimeStep(RimView* sourceView, int timeStep) && viewLink->managedView()->viewer()) { viewLink->managedView()->viewer()->setCurrentFrame(timeStep); - viewLink->managedView()->viewer()->animationControl()->setCurrentFrameOnly(timeStep); } } } @@ -139,18 +138,27 @@ void RimViewLinker::updateCellResult() if (viewLink->managedView()) { RimView* rimView = viewLink->managedView(); - RimEclipseView* eclipeView = dynamic_cast(rimView); - if (eclipeView) + RimEclipseView* eclipseView = dynamic_cast(rimView); + if (eclipseView) { if (viewLink->isResultColorControlled()) { - eclipeView->cellResult()->setPorosityModel(eclipseCellResultDefinition->porosityModel()); - eclipeView->cellResult()->setResultType(eclipseCellResultDefinition->resultType()); - eclipeView->cellResult()->setResultVariable(eclipseCellResultDefinition->resultVariable()); - eclipeView->scheduleCreateDisplayModelAndRedraw(); + eclipseView->cellResult()->simpleCopy(eclipseCellResultDefinition); + eclipseView->cellResult()->loadResult(); + + if (viewLink->isLegendDefinitionsControlled()) + { + eclipseView->cellResult()->legendConfig()->setUiValuesFromLegendConfig(masterEclipseView->cellResult()->legendConfig()); + eclipseView->cellResult()->legendConfig()->updateLegend(); + + eclipseView->cellResult()->ternaryLegendConfig()->setUiValuesFromLegendConfig(masterEclipseView->cellResult()->ternaryLegendConfig()); + eclipseView->cellResult()->ternaryLegendConfig()->updateLegend(); + } + + eclipseView->scheduleCreateDisplayModelAndRedraw(); } - eclipeView->cellResult()->updateIconState(); + eclipseView->cellResult()->updateIconState(); } } } @@ -174,6 +182,13 @@ void RimViewLinker::updateCellResult() if (viewLink->isResultColorControlled()) { geoView->cellResult()->setResultAddress(geoMechResultDefinition->resultAddress()); + + if (viewLink->isLegendDefinitionsControlled()) + { + geoView->cellResult()->legendConfig()->setUiValuesFromLegendConfig(masterGeoView->cellResult()->legendConfig()); + geoView->cellResult()->legendConfig()->updateLegend(); + } + geoView->scheduleCreateDisplayModelAndRedraw(); } @@ -232,7 +247,7 @@ void RimViewLinker::removeOverrides() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimViewLinker::allViewsForCameraSync(RimView* source, std::vector& views) +void RimViewLinker::allViewsForCameraSync(const RimView* source, std::vector& views) const { if (!isActive()) return; @@ -276,8 +291,10 @@ QString RimViewLinker::displayNameForView(RimView* view) { RimCase* rimCase = NULL; view->firstAncestorOrThisOfType(rimCase); - - displayName = rimCase->caseUserDescription() + ": " + view->name; + if (rimCase) + { + displayName = rimCase->caseUserDescription() + ": " + view->name; + } } return displayName; @@ -307,7 +324,7 @@ void RimViewLinker::setMasterView(RimView* view) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimView* RimViewLinker::masterView() +RimView* RimViewLinker::masterView() const { return m_masterView; } @@ -315,7 +332,7 @@ RimView* RimViewLinker::masterView() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimViewLinker::allViews(std::vector& views) +void RimViewLinker::allViews(std::vector& views) const { views.push_back(m_masterView()); @@ -367,7 +384,7 @@ void RimViewLinker::updateScaleZ(RimView* sourceView, double scaleZ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RimViewLinker::isActive() +bool RimViewLinker::isActive() const { RimViewLinkerCollection* viewLinkerCollection = NULL; this->firstAncestorOrThisOfType(viewLinkerCollection); @@ -470,108 +487,33 @@ void RimViewLinker::findNameAndIconFromView(QString* name, QIcon* icon, RimView* //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimViewLinker::updateCamera(RimView* sourceView) +void RimViewLinker::updateCursorPosition(const RimView* sourceView, const cvf::Vec3d& domainCoord) { - if (!sourceView->viewer()) return; - - if (!isActive()) return; - - RimViewController* viewLink = sourceView->viewController(); - if (viewLink) + RimViewController* sourceViewLink = sourceView->viewController(); + if (sourceViewLink && !sourceViewLink->showCursor()) { - if (!viewLink->isCameraLinked()) - { - return; - } + return; } std::vector viewsToUpdate; allViewsForCameraSync(sourceView, viewsToUpdate); - cvf::Vec3d sourceCamUp; - cvf::Vec3d sourceCamEye; - cvf::Vec3d sourceCamViewRefPoint; - sourceView->viewer()->mainCamera()->toLookAt(&sourceCamEye, &sourceCamViewRefPoint, &sourceCamUp); - - cvf::Vec3d sourceCamGlobalEye = sourceCamEye; - cvf::Vec3d sourceCamGlobalViewRefPoint = sourceCamViewRefPoint; - - // Source bounding box in global coordinates including scaleZ - cvf::BoundingBox sourceSceneBB = sourceView->viewer()->currentScene()->boundingBox(); - - RimEclipseView* eclipseView = dynamic_cast(sourceView); - if (eclipseView - && eclipseView->eclipseCase() - && eclipseView->eclipseCase()->reservoirData() - && eclipseView->eclipseCase()->reservoirData()->mainGrid()) - { - cvf::Vec3d offset = eclipseView->eclipseCase()->reservoirData()->mainGrid()->displayModelOffset(); - offset.z() *= eclipseView->scaleZ(); - - sourceCamGlobalEye += offset; - sourceCamGlobalViewRefPoint += offset; - - cvf::Mat4d trans; - trans.setTranslation(offset); - sourceSceneBB.transform(trans); - } - for (RimView* destinationView : viewsToUpdate) { - if (!destinationView) continue; + if (destinationView == sourceView) continue; + + if (destinationView != m_masterView) + { + RimViewController* viewLink = destinationView->viewController(); + if (!viewLink) continue; - destinationView->isPerspectiveView = sourceView->isPerspectiveView; + if (!viewLink->showCursor()) continue; + } RiuViewer* destinationViewer = destinationView->viewer(); if (destinationViewer) { - destinationViewer->enableParallelProjection(!sourceView->isPerspectiveView); - - // Destination bounding box in global coordinates including scaleZ - cvf::BoundingBox destSceneBB = destinationViewer->currentScene()->boundingBox(); - - RimEclipseView* destEclipseView = dynamic_cast(destinationView); - if (destEclipseView - && destEclipseView->eclipseCase() - && destEclipseView->eclipseCase()->reservoirData() - && destEclipseView->eclipseCase()->reservoirData()->mainGrid()) - { - cvf::Vec3d destOffset = destEclipseView->eclipseCase()->reservoirData()->mainGrid()->displayModelOffset(); - destOffset.z() *= destEclipseView->scaleZ(); - - cvf::Vec3d destinationCamEye = sourceCamGlobalEye - destOffset; - cvf::Vec3d destinationCamViewRefPoint = sourceCamGlobalViewRefPoint - destOffset; - - cvf::Mat4d trans; - trans.setTranslation(destOffset); - destSceneBB.transform(trans); - - if (isBoundingBoxesOverlappingOrClose(sourceSceneBB, destSceneBB)) - { - destinationViewer->mainCamera()->setFromLookAt(destinationCamEye, destinationCamViewRefPoint, sourceCamUp); - } - else - { - // Fallback using values from source camera - destinationViewer->mainCamera()->setFromLookAt(sourceCamEye, sourceCamViewRefPoint, sourceCamUp); - } - } - else - { - if (isBoundingBoxesOverlappingOrClose(sourceSceneBB, destSceneBB)) - { - destinationViewer->mainCamera()->setFromLookAt(sourceCamGlobalEye, sourceCamGlobalViewRefPoint, sourceCamUp); - } - else - { - // Fallback using values from source camera - destinationViewer->mainCamera()->setFromLookAt(sourceCamEye, sourceCamViewRefPoint, sourceCamUp); - } - } - - destinationViewer->updateParallelProjectionSettings(sourceView->viewer()); - - destinationViewer->update(); + destinationViewer->setCursorPosition(domainCoord); } } } @@ -579,25 +521,25 @@ void RimViewLinker::updateCamera(RimView* sourceView) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RimViewLinker::isBoundingBoxesOverlappingOrClose(const cvf::BoundingBox& sourceBB, const cvf::BoundingBox& destBB) +void RimViewLinker::updateCamera(RimView* sourceView) { - if (!sourceBB.isValid() || !destBB.isValid()) return false; - - if (sourceBB.intersects(destBB)) return true; + if (!sourceView->viewer()) return; + + if (!isActive()) return; - double largestExtent = sourceBB.extent().length(); - if (destBB.extent().length() > largestExtent) + RimViewController* viewLink = sourceView->viewController(); + if (viewLink) { - largestExtent = destBB.extent().length(); + if (!viewLink->isCameraLinked()) + { + return; + } } - double centerDist = (sourceBB.center() - destBB.center()).length(); - if (centerDist < largestExtent * 5) - { - return true; - } + std::vector viewsToUpdate; + allViewsForCameraSync(sourceView, viewsToUpdate); - return false; + RimViewManipulator::applySourceViewCameraOnDestinationViews(sourceView, viewsToUpdate); } //-------------------------------------------------------------------------------------------------- @@ -611,18 +553,16 @@ void RimViewLinker::addDependentView(RimView* view) this->m_viewControllers.push_back(viewContr); viewContr->setManagedView(view); - - } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimViewLinker::addViewControllers(caf::PdmUiTreeOrdering& uiTreeOrdering) +void RimViewLinker::addViewControllers(caf::PdmUiTreeOrdering& uiTreeOrdering) const { for (size_t j = 0; j < m_viewControllers.size(); j++) { - uiTreeOrdering.add(m_viewControllers()[j]); + uiTreeOrdering.add(m_viewControllers[j]); } } diff --git a/ApplicationCode/ProjectDataModel/RimViewLinker.h b/ApplicationCode/ProjectDataModel/RimViewLinker.h index 5ea734651d..a46199e58d 100644 --- a/ApplicationCode/ProjectDataModel/RimViewLinker.h +++ b/ApplicationCode/ProjectDataModel/RimViewLinker.h @@ -28,6 +28,9 @@ #include "cafPdmObject.h" #include "cafPdmPtrField.h" +#include "cvfBase.h" +#include "cvfVector3.h" + namespace cvf { class BoundingBox; @@ -50,10 +53,10 @@ class RimViewLinker : public caf::PdmObject RimViewLinker(void); virtual ~RimViewLinker(void); - bool isActive(); + bool isActive() const; void setMasterView(RimView* view); - RimView* masterView(); + RimView* masterView() const; void addDependentView(RimView* view); void updateDependentViews(); @@ -66,21 +69,24 @@ class RimViewLinker : public caf::PdmObject void updateScaleZ(RimView* sourceView, double scaleZ); void updateCellResult(); + void updateRangeFilters(RimCellRangeFilter* changedRangeFilter); void applyRangeFilterCollectionByUserChoice(); void scheduleGeometryRegenForDepViews(RivCellSetEnum geometryType); void scheduleCreateDisplayModelAndRedrawForDependentViews(); - void allViews(std::vector& views); + void allViews(std::vector& views) const; void updateUiNameAndIcon(); - void addViewControllers(caf::PdmUiTreeOrdering& uiTreeOrdering); + void addViewControllers(caf::PdmUiTreeOrdering& uiTreeOrdering) const; static void applyIconEnabledState(caf::PdmObject* obj, const QIcon& icon, bool disable); static void findNameAndIconFromView(QString* name, QIcon* icon, RimView* view); + void updateCursorPosition(const RimView* sourceView, const cvf::Vec3d& domainCoord); + public: static QString displayNameForView(RimView* view); @@ -89,12 +95,10 @@ class RimViewLinker : public caf::PdmObject virtual void initAfterRead(); private: - void allViewsForCameraSync(RimView* source, std::vector& views); + void allViewsForCameraSync(const RimView* source, std::vector& views) const; void removeOverrides(); - static bool isBoundingBoxesOverlappingOrClose(const cvf::BoundingBox& sourceBB, const cvf::BoundingBox& destBB); - private: caf::PdmChildArrayField m_viewControllers; caf::PdmPtrField m_masterView; diff --git a/ApplicationCode/ProjectDataModel/RimViewLinkerCollection.cpp b/ApplicationCode/ProjectDataModel/RimViewLinkerCollection.cpp index ece9c7a518..c0bbe4bf32 100644 --- a/ApplicationCode/ProjectDataModel/RimViewLinkerCollection.cpp +++ b/ApplicationCode/ProjectDataModel/RimViewLinkerCollection.cpp @@ -62,7 +62,7 @@ void RimViewLinkerCollection::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTre childObject->addViewControllers(uiTreeOrdering); } - uiTreeOrdering.setForgetRemainingFields(true); + uiTreeOrdering.skipRemainingChildren(true); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimViewManipulator.cpp b/ApplicationCode/ProjectDataModel/RimViewManipulator.cpp new file mode 100644 index 0000000000..ac8712139c --- /dev/null +++ b/ApplicationCode/ProjectDataModel/RimViewManipulator.cpp @@ -0,0 +1,151 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimViewManipulator.h" + +#include "RigMainGrid.h" + +#include "RimEclipseView.h" +#include "RimView.h" +#include "RimCase.h" + +#include "RiuViewer.h" + +#include "cvfBase.h" +#include "cvfBoundingBox.h" +#include "cvfCamera.h" +#include "cvfMatrix4.h" +#include "cvfScene.h" + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimViewManipulator::applySourceViewCameraOnDestinationViews(RimView* sourceView, std::vector& destinationViews) +{ + bool setPointOfInterest = false; + cvf::Vec3d sourceCamUp; + cvf::Vec3d sourceCamEye; + cvf::Vec3d sourceCamViewRefPoint; + cvf::Vec3d sourcePointOfInterest; + sourceView->viewer()->mainCamera()->toLookAt(&sourceCamEye, &sourceCamViewRefPoint, &sourceCamUp); + + cvf::Vec3d sourceCamGlobalEye = sourceCamEye; + cvf::Vec3d sourceCamGlobalViewRefPoint = sourceCamViewRefPoint; + if (sourceView->viewer()->getNavigationPolicy() != nullptr) + { + setPointOfInterest = true; + sourcePointOfInterest = sourceView->viewer()->pointOfInterest(); + } + + // Source bounding box in global coordinates including scaleZ + cvf::BoundingBox sourceSceneBB = sourceView->viewer()->currentScene()->boundingBox(); + { + cvf::Vec3d offset = cvf::Vec3d::ZERO; + RimCase* sourceOwnerCase = sourceView->ownerCase(); + if (sourceOwnerCase) + { + offset = sourceOwnerCase->displayModelOffset(); + offset.z() *= sourceView->scaleZ(); + } + + sourceCamGlobalEye += offset; + sourceCamGlobalViewRefPoint += offset; + if (setPointOfInterest) sourcePointOfInterest += offset; + + cvf::Mat4d trans; + trans.setTranslation(offset); + sourceSceneBB.transform(trans); + } + + for (RimView* destinationView : destinationViews) + { + if (!destinationView) continue; + + destinationView->isPerspectiveView = sourceView->isPerspectiveView; + + RiuViewer* destinationViewer = destinationView->viewer(); + if (destinationViewer) + { + destinationViewer->enableParallelProjection(!sourceView->isPerspectiveView); + + // Destination bounding box in global coordinates including scaleZ + cvf::BoundingBox destSceneBB = destinationViewer->currentScene()->boundingBox(); + cvf::Vec3d destinationCamEye = sourceCamGlobalEye; + cvf::Vec3d destinationCamViewRefPoint = sourceCamGlobalViewRefPoint; + cvf::Vec3d offset = cvf::Vec3d::ZERO; + + RimCase* destinationOwnerCase = destinationView->ownerCase(); + if (destinationOwnerCase) + { + offset = destinationOwnerCase->displayModelOffset(); + offset.z() *= destinationView->scaleZ(); + } + + destinationCamEye -= offset; + destinationCamViewRefPoint -= offset; + + cvf::Mat4d trans; + trans.setTranslation(offset); + destSceneBB.transform(trans); + + if (isBoundingBoxesOverlappingOrClose(sourceSceneBB, destSceneBB)) + { + destinationViewer->mainCamera()->setFromLookAt(destinationCamEye, destinationCamViewRefPoint, sourceCamUp); + } + else + { + // Fallback using values from source camera + destinationViewer->mainCamera()->setFromLookAt(sourceCamEye, sourceCamViewRefPoint, sourceCamUp); + } + + if (setPointOfInterest) + { + cvf::Vec3d pointOfInterest = sourcePointOfInterest; + pointOfInterest -= offset; + destinationViewer->updateParallelProjectionHeightFromMoveZoom(pointOfInterest); + destinationViewer->updateParallelProjectionCameraPosFromPointOfInterestMove(pointOfInterest); + } + + destinationViewer->update(); + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimViewManipulator::isBoundingBoxesOverlappingOrClose(const cvf::BoundingBox& sourceBB, const cvf::BoundingBox& destBB) +{ + if (!sourceBB.isValid() || !destBB.isValid()) return false; + + if (sourceBB.intersects(destBB)) return true; + + double largestExtent = sourceBB.extent().length(); + if (destBB.extent().length() > largestExtent) + { + largestExtent = destBB.extent().length(); + } + + double centerDist = (sourceBB.center() - destBB.center()).length(); + if (centerDist < largestExtent * 5) + { + return true; + } + + return false; +} diff --git a/ApplicationCode/ProjectDataModel/RimViewManipulator.h b/ApplicationCode/ProjectDataModel/RimViewManipulator.h new file mode 100644 index 0000000000..0c6ee4026e --- /dev/null +++ b/ApplicationCode/ProjectDataModel/RimViewManipulator.h @@ -0,0 +1,36 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include + +namespace cvf { + class BoundingBox; +} + +class RimView; + +class RimViewManipulator +{ +public: + static void applySourceViewCameraOnDestinationViews(RimView* sourceView, std::vector& destinationViews); + +private: + static bool isBoundingBoxesOverlappingOrClose(const cvf::BoundingBox& sourceBB, const cvf::BoundingBox& destBB); +}; \ No newline at end of file diff --git a/ApplicationCode/ProjectDataModel/RimViewWindow.cpp b/ApplicationCode/ProjectDataModel/RimViewWindow.cpp index d7ea0b0309..4718b549da 100644 --- a/ApplicationCode/ProjectDataModel/RimViewWindow.cpp +++ b/ApplicationCode/ProjectDataModel/RimViewWindow.cpp @@ -17,7 +17,9 @@ ///////////////////////////////////////////////////////////////////////////////// #include "RimViewWindow.h" - +#include "RimMdiWindowController.h" +#include "cvfAssert.h" +#include CAF_PDM_XML_ABSTRACT_SOURCE_INIT(RimViewWindow, "ViewWindow"); // Do not use. Abstract class @@ -26,9 +28,17 @@ CAF_PDM_XML_ABSTRACT_SOURCE_INIT(RimViewWindow, "ViewWindow"); // Do not use. Ab //-------------------------------------------------------------------------------------------------- RimViewWindow::RimViewWindow(void) { - CAF_PDM_InitFieldNoDefault(&m_windowGeometry, "WindowGeometry", "", "", "", ""); - m_windowGeometry.uiCapability()->setUiHidden(true); + CAF_PDM_InitFieldNoDefault(&m_windowController, "WindowController", "", "", "", ""); + m_windowController.uiCapability()->setUiHidden(true); + m_windowController.uiCapability()->setUiTreeChildrenHidden(true); + + CAF_PDM_InitField(&m_showWindow, "ShowWindow", true, "Show Window", "", "", ""); + m_showWindow.uiCapability()->setUiHidden(true); + // Obsolete field + CAF_PDM_InitFieldNoDefault(&obsoleteField_windowGeometry, "WindowGeometry", "", "", "", ""); + obsoleteField_windowGeometry.uiCapability()->setUiHidden(true); + obsoleteField_windowGeometry.xmlCapability()->setIOWritable(false); } //-------------------------------------------------------------------------------------------------- @@ -36,25 +46,72 @@ RimViewWindow::RimViewWindow(void) //-------------------------------------------------------------------------------------------------- RimViewWindow::~RimViewWindow(void) { + if ( m_windowController() ) delete m_windowController() ; +} +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimViewWindow::removeMdiWindowFromMdiArea() +{ + if ( m_windowController() ) m_windowController->removeWindowFromMDI(); } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimViewWindow::setMdiWindowGeometry(const RimMdiWindowGeometry& windowGeometry) +void RimViewWindow::handleMdiWindowClosed() +{ + if ( m_windowController() ) m_windowController->handleViewerDeletion(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimViewWindow::updateMdiWindowVisibility() +{ + if (m_windowController()) + { + m_windowController->updateViewerWidget(); + } + else + { + if (viewWidget()) + { + if (m_showWindow) + { + viewWidget()->show(); + } + else + { + viewWidget()->hide(); + } + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimViewWindow::isMdiWindow() const { - std::vector geom; - geom.clear(); - if (windowGeometry.isValid()) + if (m_windowController()) { - geom.push_back(windowGeometry.x); - geom.push_back(windowGeometry.y); - geom.push_back(windowGeometry.width); - geom.push_back(windowGeometry.height); - geom.push_back(windowGeometry.isMaximized); + return true; } - m_windowGeometry.setValue(geom); + + return false; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimViewWindow::setMdiWindowGeometry(const RimMdiWindowGeometry& windowGeometry) +{ + CVF_ASSERT(m_windowController()); + + if (m_windowController()) m_windowController()->setMdiWindowGeometry(windowGeometry); + } //-------------------------------------------------------------------------------------------------- @@ -62,17 +119,100 @@ void RimViewWindow::setMdiWindowGeometry(const RimMdiWindowGeometry& windowGeome //-------------------------------------------------------------------------------------------------- RimMdiWindowGeometry RimViewWindow::mdiWindowGeometry() { + CVF_ASSERT(m_windowController()); + + if (m_windowController()) return m_windowController()->mdiWindowGeometry(); + else return RimMdiWindowGeometry(); + +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +caf::PdmFieldHandle* RimViewWindow::objectToggleField() +{ + return &m_showWindow; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimViewWindow::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) +{ + if ( changedField == &m_showWindow ) + { + if (m_showWindow) + { + loadDataAndUpdate(); + } + else + { + updateMdiWindowVisibility(); + } + uiCapability()->updateUiIconFromToggleField(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimViewWindow::updateMdiWindowTitle() +{ + if ( viewWidget() ) + { + if ( this->userDescriptionField() ) + { + caf::PdmUiFieldHandle* uiFieldHandle = this->userDescriptionField()->uiCapability(); + if ( uiFieldHandle ) + { + QVariant v = uiFieldHandle->uiValue(); + viewWidget()->setWindowTitle(v.toString()); + } + } + } +} - RimMdiWindowGeometry wg; - if (m_windowGeometry.value().size() == 5) +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimViewWindow::setAsMdiWindow(int mainWindowID) +{ + if ( !m_windowController() ) { - wg.x = m_windowGeometry.value()[0]; - wg.y = m_windowGeometry.value()[1]; - wg.width = m_windowGeometry.value()[2]; - wg.height = m_windowGeometry.value()[3]; - wg.isMaximized = m_windowGeometry.value()[4]; + m_windowController = new RimMdiWindowController; + RimMdiWindowGeometry mwg; + mwg.mainWindowID = mainWindowID; + setMdiWindowGeometry(mwg); } +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +#include "RimView.h" + +void RimViewWindow::initAfterRead() +{ + if (obsoleteField_windowGeometry.value().size() == 5) + { + RimMdiWindowGeometry wg; + int mainWindowID = -1; + + if (dynamic_cast (this)) + mainWindowID = 0; + else + mainWindowID = 1; + + wg.mainWindowID = mainWindowID; + wg.x = obsoleteField_windowGeometry.value()[0]; + wg.y = obsoleteField_windowGeometry.value()[1]; + wg.width = obsoleteField_windowGeometry.value()[2]; + wg.height = obsoleteField_windowGeometry.value()[3]; + wg.isMaximized = obsoleteField_windowGeometry.value()[4]; - return wg; + setAsMdiWindow(mainWindowID); + setMdiWindowGeometry(wg); + } } diff --git a/ApplicationCode/ProjectDataModel/RimViewWindow.h b/ApplicationCode/ProjectDataModel/RimViewWindow.h index d351aba516..96e627faf8 100644 --- a/ApplicationCode/ProjectDataModel/RimViewWindow.h +++ b/ApplicationCode/ProjectDataModel/RimViewWindow.h @@ -20,13 +20,18 @@ #include "cafPdmObject.h" #include "cafPdmField.h" +#include "cafPdmChildField.h" #include +class RimMdiWindowController; + struct RimMdiWindowGeometry { - RimMdiWindowGeometry() : x(0), y(0), width(-1), height(-1) {} - bool isValid() const { return (width >= 0 && height >= 0);} + RimMdiWindowGeometry() : mainWindowID(-1), x(0), y(0), width(-1), height(-1), isMaximized(false) {} + bool isValid() const { return (mainWindowID >= 0 && width >= 0 && height >= 0);} + + int mainWindowID; int x; int y; @@ -42,15 +47,50 @@ class RimViewWindow : public caf::PdmObject RimViewWindow(void); virtual ~RimViewWindow(void); - void setMdiWindowGeometry(const RimMdiWindowGeometry& windowGeometry); - RimMdiWindowGeometry mdiWindowGeometry(); + void handleMdiWindowClosed(); + + void setAs3DViewMdiWindow() { setAsMdiWindow(0); } + void setAsPlotMdiWindow() { setAsMdiWindow(1); } + bool isMdiWindow() const; + + void setMdiWindowGeometry(const RimMdiWindowGeometry& windowGeometry); + RimMdiWindowGeometry mdiWindowGeometry(); + + virtual QWidget* viewWidget() = 0; + + virtual QImage snapshotWindowContent() = 0; + virtual void zoomAll() = 0; + +protected: + void removeMdiWindowFromMdiArea(); + void updateMdiWindowVisibility(); + + ///////// Interface for the Window controller + friend class RimMdiWindowController; + + virtual QWidget* createViewWidget(QWidget* mainWindowParent) = 0; + virtual void updateViewWidgetAfterCreation() {}; + virtual void updateMdiWindowTitle(); // Has real default implementation + virtual void deleteViewWidget() = 0; + virtual void loadDataAndUpdate() = 0; + ////////// + + // Derived classes are not supposed to override this function. The intention is to always use m_showWindow + // as the objectToggleField for this class. This way the visibility of a widget being part of a composite widget + // can be controlled from the project tree using check box toggles + virtual caf::PdmFieldHandle* objectToggleField() override final; + virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override; + virtual void initAfterRead() override; + + caf::PdmField m_showWindow; + +private: + void setAsMdiWindow(int mainWindowID); - virtual QImage snapshotWindowContent() = 0; - virtual void zoomAll() = 0; + caf::PdmChildField m_windowController; - virtual QWidget* viewWidget() = 0; -private: - caf::PdmField< std::vector > m_windowGeometry; + // Obsoleted field + caf::PdmField< std::vector > obsoleteField_windowGeometry; }; diff --git a/ApplicationCode/ProjectDataModel/RimWellLogCurve.cpp b/ApplicationCode/ProjectDataModel/RimWellLogCurve.cpp index 61e36ba395..c0d2e21a53 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogCurve.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogCurve.cpp @@ -19,8 +19,9 @@ #include "RimWellLogCurve.h" -#include "RimWellLogPlot.h" +#include "RigWellLogCurveData.h" +#include "RimWellLogPlot.h" #include "RimWellLogTrack.h" #include "RiuLineSegmentQwtPlotCurve.h" diff --git a/ApplicationCode/ProjectDataModel/RimWellLogCurve.h b/ApplicationCode/ProjectDataModel/RimWellLogCurve.h index df1dff236f..68a6f65653 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogCurve.h +++ b/ApplicationCode/ProjectDataModel/RimWellLogCurve.h @@ -20,7 +20,8 @@ #pragma once #include "RimPlotCurve.h" -#include "RigWellLogCurveData.h" + +#include "cvfObject.h" class RigWellLogCurveData; diff --git a/ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.cpp b/ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.cpp index b00a0c7b14..7182c85e2b 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.cpp @@ -22,12 +22,17 @@ #include "RiaApplication.h" #include "RigCaseCellResultsData.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" #include "RigEclipseWellLogExtractor.h" #include "RigFemPartResultsCollection.h" #include "RigGeoMechCaseData.h" #include "RigGeoMechWellLogExtractor.h" #include "RigResultAccessorFactory.h" +#include "RigSimulationWellCenterLineCalculator.h" +#include "RigSimulationWellCoordsAndMD.h" +#include "RigSingleWellResultsData.h" +#include "RigWellLogCurveData.h" +#include "RigWellPath.h" #include "RimEclipseCase.h" #include "RimEclipseCellColors.h" @@ -36,8 +41,10 @@ #include "RimGeoMechCase.h" #include "RimGeoMechResultDefinition.h" #include "RimGeoMechView.h" +#include "RimMainPlotCollection.h" #include "RimOilField.h" #include "RimProject.h" +#include "RimTools.h" #include "RimWellLogCurve.h" #include "RimWellLogPlot.h" #include "RimWellLogPlotCollection.h" @@ -49,8 +56,10 @@ #include "RiuWellLogTrack.h" #include "cafPdmUiTreeOrdering.h" +#include "cafUtils.h" #include +#include "RimEclipseWell.h" //================================================================================================== /// @@ -59,6 +68,19 @@ CAF_PDM_SOURCE_INIT(RimWellLogExtractionCurve, "RimWellLogExtractionCurve"); + +namespace caf +{ +template<> +void AppEnum< RimWellLogExtractionCurve::TrajectoryType >::setUp() +{ + addItem(RimWellLogExtractionCurve::WELL_PATH, "WELL_PATH", "Well Path"); + addItem(RimWellLogExtractionCurve::SIMULATION_WELL, "SIMULATION_WELL", "Simulation Well"); + setDefault(RimWellLogExtractionCurve::WELL_PATH); +} +} + + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -66,17 +88,22 @@ RimWellLogExtractionCurve::RimWellLogExtractionCurve() { CAF_PDM_InitObject("Well Log Curve", "", "", ""); - CAF_PDM_InitFieldNoDefault(&m_wellPath, "CurveWellPath", "Well Path", "", "", ""); + CAF_PDM_InitFieldNoDefault(&m_trajectoryType, "TrajectoryType", "Trajectory", "", "", ""); + + CAF_PDM_InitFieldNoDefault(&m_wellPath, "CurveWellPath", " ", "", "", ""); m_wellPath.uiCapability()->setUiTreeChildrenHidden(true); - //m_wellPath.uiCapability()->setUiHidden(true); + + CAF_PDM_InitField(&m_simWellName, "SimulationWellName", QString("None"), " ", "", "", ""); + CAF_PDM_InitField(&m_branchIndex, "Branch", 0, " ", "", "", ""); CAF_PDM_InitFieldNoDefault(&m_case, "CurveCase", "Case", "", "", ""); m_case.uiCapability()->setUiTreeChildrenHidden(true); - //m_case.uiCapability()->setUiHidden(true); + CAF_PDM_InitFieldNoDefault(&m_eclipseResultDefinition, "CurveEclipseResult", "", "", "", ""); m_eclipseResultDefinition.uiCapability()->setUiHidden(true); m_eclipseResultDefinition.uiCapability()->setUiTreeChildrenHidden(true); m_eclipseResultDefinition = new RimEclipseResultDefinition; + m_eclipseResultDefinition->findField("MResultType")->uiCapability()->setUiName("Result Type"); CAF_PDM_InitFieldNoDefault(&m_geomResultDefinition, "CurveGeomechResult", "", "", "", ""); m_geomResultDefinition.uiCapability()->setUiHidden(true); @@ -91,8 +118,6 @@ RimWellLogExtractionCurve::RimWellLogExtractionCurve() CAF_PDM_InitField(&m_addWellNameToCurveName, "AddWellNameToCurveName", true, " Well Name", "", "", ""); CAF_PDM_InitField(&m_addTimestepToCurveName, "AddTimestepToCurveName", false, " Timestep", "", "", ""); CAF_PDM_InitField(&m_addDateToCurveName, "AddDateToCurveName", true, " Date", "", "", ""); - - updateOptionSensitivity(); } //-------------------------------------------------------------------------------------------------- @@ -100,6 +125,8 @@ RimWellLogExtractionCurve::RimWellLogExtractionCurve() //-------------------------------------------------------------------------------------------------- RimWellLogExtractionCurve::~RimWellLogExtractionCurve() { + clearGeneratedSimWellPaths(); + delete m_geomResultDefinition; delete m_eclipseResultDefinition; } @@ -113,6 +140,43 @@ void RimWellLogExtractionCurve::setWellPath(RimWellPath* wellPath) m_wellPath = wellPath; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimWellPath* RimWellLogExtractionCurve::wellPath() const +{ + return m_wellPath; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogExtractionCurve::setFromSimulationWellName(const QString& simWellName, int branchIndex) +{ + m_trajectoryType = SIMULATION_WELL; + m_simWellName = simWellName; + m_branchIndex = branchIndex; + + clearGeneratedSimWellPaths(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogExtractionCurve::setCase(RimCase* rimCase) +{ + m_case = rimCase; + clearGeneratedSimWellPaths(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimCase* RimWellLogExtractionCurve::rimCase() const +{ + return m_case; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -128,8 +192,8 @@ void RimWellLogExtractionCurve::setPropertiesFromView(RimView* view) RimEclipseView* eclipseView = dynamic_cast(view); if (eclipseView) { - m_eclipseResultDefinition->setResultType(eclipseView->cellResult()->resultType()); - m_eclipseResultDefinition->setResultVariable(eclipseView->cellResult()->resultVariable()); + m_eclipseResultDefinition->simpleCopy(eclipseView->cellResult()); + m_timeStep = eclipseView->currentTimeStep(); } @@ -139,6 +203,8 @@ void RimWellLogExtractionCurve::setPropertiesFromView(RimView* view) m_geomResultDefinition->setResultAddress(geoMechView->cellResultResultDefinition()->resultAddress()); m_timeStep = geoMechView->currentTimeStep(); } + + clearGeneratedSimWellPaths(); } //-------------------------------------------------------------------------------------------------- @@ -155,6 +221,23 @@ void RimWellLogExtractionCurve::clampTimestep() } } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogExtractionCurve::clampBranchIndex() +{ + int branchCount = static_cast(m_generatedSimulationWellPathBranches.size()); + if ( branchCount > 0 ) + { + if ( m_branchIndex >= branchCount ) m_branchIndex = branchCount - 1; + else if ( m_branchIndex < 0 ) m_branchIndex = 0; + } + else + { + m_branchIndex = -1; + } +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -165,6 +248,11 @@ void RimWellLogExtractionCurve::fieldChangedByUi(const caf::PdmFieldHandle* chan if (changedField == &m_case) { clampTimestep(); + + auto wellNameSet = findSortedWellNames(); + if (!wellNameSet.count(m_simWellName())) m_simWellName = "None"; + + clearGeneratedSimWellPaths(); this->loadDataAndUpdate(); } @@ -172,6 +260,17 @@ void RimWellLogExtractionCurve::fieldChangedByUi(const caf::PdmFieldHandle* chan { this->loadDataAndUpdate(); } + else if (changedField == &m_simWellName) + { + clearGeneratedSimWellPaths(); + + this->loadDataAndUpdate(); + } + else if (changedField == &m_trajectoryType || + changedField == &m_branchIndex) + { + this->loadDataAndUpdate(); + } else if (changedField == &m_timeStep) { this->loadDataAndUpdate(); @@ -204,11 +303,27 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate() m_eclipseResultDefinition->setEclipseCase(eclipseCase); m_geomResultDefinition->setGeoMechCase(geomCase); - RimWellLogPlotCollection* wellLogCollection = NULL; - this->firstAncestorOrThisOfType(wellLogCollection); - CVF_ASSERT(wellLogCollection); + updateGeneratedSimulationWellpath(); + clampBranchIndex(); - cvf::ref eclExtractor = wellLogCollection->findOrCreateExtractor(m_wellPath, eclipseCase); + RimWellLogPlotCollection* wellLogCollection; + this->firstAncestorOrThisOfTypeAsserted(wellLogCollection); + + cvf::ref eclExtractor; + if ( m_trajectoryType == WELL_PATH ) + { + eclExtractor = wellLogCollection->findOrCreateExtractor(m_wellPath, eclipseCase); + } + else + { + if (m_branchIndex >= 0 && m_branchIndex < static_cast(m_generatedSimulationWellPathBranches.size()) ) + { + eclExtractor = wellLogCollection->findOrCreateSimWellExtractor(m_simWellName, + eclipseCase->caseUserDescription(), + m_generatedSimulationWellPathBranches[m_branchIndex].p(), + eclipseCase->eclipseCaseData()); + } + } cvf::ref geomExtractor = wellLogCollection->findOrCreateExtractor(m_wellPath, geomCase); std::vector values; @@ -224,19 +339,18 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate() m_eclipseResultDefinition->loadResult(); - cvf::ref resAcc = RigResultAccessorFactory::createResultAccessor( - eclipseCase->reservoirData(), - 0, - m_timeStep, - m_eclipseResultDefinition); + cvf::ref resAcc = RigResultAccessorFactory::createFromResultDefinition(eclipseCase->eclipseCaseData(), + 0, + m_timeStep, + m_eclipseResultDefinition); if (resAcc.notNull()) { eclExtractor->curveData(resAcc.p(), &values); } - RigCaseData::UnitsType eclipseUnitsType = eclipseCase->reservoirData()->unitsType(); - if (eclipseUnitsType == RigCaseData::UNITS_FIELD) + RigEclipseCaseData::UnitsType eclipseUnitsType = eclipseCase->eclipseCaseData()->unitsType(); + if (eclipseUnitsType == RigEclipseCaseData::UNITS_FIELD) { // See https://github.com/OPM/ResInsight/issues/538 @@ -272,6 +386,7 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate() RimWellLogPlot* wellLogPlot; firstAncestorOrThisOfType(wellLogPlot); CVF_ASSERT(wellLogPlot); + if (!wellLogPlot) return; displayUnit = wellLogPlot->depthUnit(); @@ -279,7 +394,7 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate() { m_qwtPlotCurve->setSamples(m_curveData->xPlotValues().data(), m_curveData->trueDepthPlotValues(displayUnit).data(), static_cast(m_curveData->xPlotValues().size())); } - else + else if (wellLogPlot->depthType() == RimWellLogPlot::MEASURED_DEPTH) { m_qwtPlotCurve->setSamples(m_curveData->xPlotValues().data(), m_curveData->measuredDepthPlotValues(displayUnit).data(), static_cast(m_curveData->xPlotValues().size())); } @@ -294,67 +409,162 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate() } } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::set RimWellLogExtractionCurve::findSortedWellNames() +{ + std::set sortedWellNames; + RimEclipseCase* eclipseCase = dynamic_cast(m_case.value()); + + if ( eclipseCase && eclipseCase->eclipseCaseData() ) + { + const cvf::Collection& wellRes = eclipseCase->eclipseCaseData()->wellResults(); + + for ( size_t wIdx = 0; wIdx < wellRes.size(); ++wIdx ) + { + sortedWellNames.insert(wellRes[wIdx]->m_wellName); + } + } + + return sortedWellNames; +} + + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogExtractionCurve::updateGeneratedSimulationWellpath() +{ + if (m_generatedSimulationWellPathBranches.size()) return; // Already created. Nothing to do + + RimEclipseCase* eclipseCase = dynamic_cast(m_case.value()); + + if (!(!m_simWellName().isEmpty() && m_simWellName() != "None" && eclipseCase && eclipseCase->eclipseCaseData())) + { + return ; + } + + RigEclipseCaseData* eclCaseData = eclipseCase->eclipseCaseData(); + const RigSingleWellResultsData* wellResults = eclCaseData->findWellResult(m_simWellName()); + + if (!wellResults) return; + + std::vector< std::vector > pipeBranchesCLCoords; + std::vector< std::vector > pipeBranchesCellIds; + + RigSimulationWellCenterLineCalculator::calculateWellPipeCenterlineFromWellFrame(eclCaseData, + wellResults, + -1, + true, + true, + pipeBranchesCLCoords, + pipeBranchesCellIds); + + + for ( size_t brIdx = 0; brIdx < pipeBranchesCLCoords.size(); ++brIdx ) + { + auto wellMdCalculator = RigSimulationWellCoordsAndMD(pipeBranchesCLCoords[brIdx]); // Todo, branch index + + cvf::ref newWellPath = new RigWellPath(); + newWellPath->m_measuredDepths = wellMdCalculator.measuredDepths(); + newWellPath->m_wellPathPoints = wellMdCalculator.wellPathPoints(); + + m_generatedSimulationWellPathBranches.push_back(newWellPath.p() ); + } +} + +//-------------------------------------------------------------------------------------------------- +/// Clean up existing generated well paths +//-------------------------------------------------------------------------------------------------- +void RimWellLogExtractionCurve::clearGeneratedSimWellPaths() +{ + RimWellLogPlotCollection* wellLogCollection = nullptr; + + // Need to use this approach, and not firstAnchestor because the curve might not be inside the hierarchy when deleted. + + RimProject * proj = RiaApplication::instance()->project(); + if (proj && proj->mainPlotCollection() ) wellLogCollection = proj->mainPlotCollection()->wellLogPlotCollection(); + + if (!wellLogCollection) return; + + for ( size_t wpIdx = 0; wpIdx < m_generatedSimulationWellPathBranches.size(); ++wpIdx ) + { + wellLogCollection->removeExtractors(m_generatedSimulationWellPathBranches[wpIdx].p()); + } + + m_generatedSimulationWellPathBranches.clear(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- QList RimWellLogExtractionCurve::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) { - QList optionList; + QList options; - optionList = RimWellLogCurve::calculateValueOptions(fieldNeedingOptions, useOptionsOnly); - if (optionList.size() > 0) return optionList; + options = RimWellLogCurve::calculateValueOptions(fieldNeedingOptions, useOptionsOnly); + if (options.size() > 0) return options; if (fieldNeedingOptions == &m_wellPath) { - RimProject* proj = RiaApplication::instance()->project(); - if (proj->activeOilField()->wellPathCollection()) - { - caf::PdmChildArrayField& wellPaths = proj->activeOilField()->wellPathCollection()->wellPaths; + RimTools::wellPathOptionItems(&options); - for (size_t i = 0; i< wellPaths.size(); i++) - { - optionList.push_back(caf::PdmOptionItemInfo(wellPaths[i]->name(), QVariant::fromValue(caf::PdmPointer(wellPaths[i])))); - } - - if (optionList.size() > 0) - { - optionList.push_front(caf::PdmOptionItemInfo("None", QVariant::fromValue(caf::PdmPointer(NULL)))); - } - } + options.push_front(caf::PdmOptionItemInfo("None", nullptr)); } else if (fieldNeedingOptions == &m_case) { - RimProject* proj = RiaApplication::instance()->project(); - std::vector cases; + RimTools::caseOptionItems(&options); - proj->allCases(cases); + options.push_front(caf::PdmOptionItemInfo("None", nullptr)); + } + else if (fieldNeedingOptions == &m_timeStep) + { + QStringList timeStepNames; - for (size_t i = 0; i< cases.size(); i++) + if (m_case) { - optionList.push_back(caf::PdmOptionItemInfo(cases[i]->caseUserDescription(), QVariant::fromValue(caf::PdmPointer(cases[i])))); + timeStepNames = m_case->timeStepStrings(); } - if (optionList.size() > 0) + for (int i = 0; i < timeStepNames.size(); i++) { - optionList.push_front(caf::PdmOptionItemInfo("None", QVariant::fromValue(caf::PdmPointer(NULL)))); + options.push_back(caf::PdmOptionItemInfo(timeStepNames[i], i)); } } - else if (fieldNeedingOptions == &m_timeStep) + else if (fieldNeedingOptions == &m_simWellName) { - QStringList timeStepNames; + std::set sortedWellNames = this->findSortedWellNames(); - if (m_case) + QIcon simWellIcon(":/Well.png"); + for ( const QString& wname: sortedWellNames ) { - timeStepNames = m_case->timeStepStrings(); + options.push_back(caf::PdmOptionItemInfo(wname, wname, false, simWellIcon)); } - for (int i = 0; i < timeStepNames.size(); i++) + if ( options.size() == 0 ) { - optionList.push_back(caf::PdmOptionItemInfo(timeStepNames[i], i)); + options.push_front(caf::PdmOptionItemInfo("None", "None")); } } + else if (fieldNeedingOptions == &m_branchIndex) + { + updateGeneratedSimulationWellpath(); + + size_t branchCount = m_generatedSimulationWellPathBranches.size(); - return optionList; + for ( int bIdx = 0; bIdx < static_cast(branchCount); ++bIdx) + { + options.push_back(caf::PdmOptionItemInfo("Branch " + QString::number(bIdx + 1), QVariant::fromValue(bIdx) )); + } + + if (options.size() == 0) + { + options.push_front(caf::PdmOptionItemInfo("None", -1)); + } + } + return options; } @@ -363,52 +573,65 @@ QList RimWellLogExtractionCurve::calculateValueOptions(c //-------------------------------------------------------------------------------------------------- void RimWellLogExtractionCurve::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) { + RimPlotCurve::updateOptionSensitivity(); + caf::PdmUiGroup* curveDataGroup = uiOrdering.addNewGroup("Curve Data"); - curveDataGroup->add(&m_wellPath); curveDataGroup->add(&m_case); - + RimGeoMechCase* geomCase = dynamic_cast(m_case.value()); RimEclipseCase* eclipseCase = dynamic_cast(m_case.value()); - if (eclipseCase) + curveDataGroup->add(&m_trajectoryType); + if (m_trajectoryType() == WELL_PATH) { - curveDataGroup->add(&(m_eclipseResultDefinition->m_resultTypeUiField)); - curveDataGroup->add(&(m_eclipseResultDefinition->m_porosityModelUiField)); - curveDataGroup->add(&(m_eclipseResultDefinition->m_resultVariableUiField)); - - if (m_eclipseResultDefinition->hasDynamicResult()) + curveDataGroup->add(&m_wellPath); + } + else + { + curveDataGroup->add(&m_simWellName); + if ( m_generatedSimulationWellPathBranches.size() > 1 ) { - curveDataGroup->add(&m_timeStep); + curveDataGroup->add(&m_branchIndex); } } + + if (eclipseCase) + { + m_eclipseResultDefinition->uiOrdering(uiConfigName, *curveDataGroup); + + } else if (geomCase) { - curveDataGroup->add(&(m_geomResultDefinition->m_resultPositionTypeUiField)); - curveDataGroup->add(&(m_geomResultDefinition->m_resultVariableUiField)); + m_geomResultDefinition->uiOrdering(uiConfigName, *curveDataGroup); + + } + if ( (eclipseCase && m_eclipseResultDefinition->hasDynamicResult()) + || geomCase) + { curveDataGroup->add(&m_timeStep); } caf::PdmUiGroup* appearanceGroup = uiOrdering.addNewGroup("Appearance"); - appearanceGroup->add(&m_curveColor); - appearanceGroup->add(&m_curveThickness); - appearanceGroup->add(&m_pointSymbol); - appearanceGroup->add(&m_symbolSkipPixelDistance); - appearanceGroup->add(&m_lineStyle); - appearanceGroup->add(&m_curveName); - appearanceGroup->add(&m_isUsingAutoName); + RimPlotCurve::appearanceUiOrdering(*appearanceGroup); + + caf::PdmUiGroup* nameGroup = uiOrdering.addNewGroup("Curve Name"); + nameGroup->setCollapsedByDefault(true); + nameGroup->add(&m_showLegend); + RimPlotCurve::curveNameUiOrdering(*nameGroup); + if (m_isUsingAutoName) { - appearanceGroup->add(&m_addWellNameToCurveName); - appearanceGroup->add(&m_addCaseNameToCurveName); - appearanceGroup->add(&m_addPropertyToCurveName); - appearanceGroup->add(&m_addDateToCurveName); - appearanceGroup->add(&m_addTimestepToCurveName); + nameGroup->add(&m_addWellNameToCurveName); + nameGroup->add(&m_addCaseNameToCurveName); + nameGroup->add(&m_addPropertyToCurveName); + nameGroup->add(&m_addDateToCurveName); + nameGroup->add(&m_addTimestepToCurveName); } - uiOrdering.setForgetRemainingFields(true); + uiOrdering.skipRemainingFields(true); } //-------------------------------------------------------------------------------------------------- @@ -430,7 +653,7 @@ void RimWellLogExtractionCurve::initAfterRead() //-------------------------------------------------------------------------------------------------- void RimWellLogExtractionCurve::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/) { - uiTreeOrdering.setForgetRemainingFields(true); + uiTreeOrdering.skipRemainingChildren(true); } //-------------------------------------------------------------------------------------------------- @@ -463,9 +686,13 @@ QString RimWellLogExtractionCurve::createCurveAutoName() RimEclipseCase* eclipseCase = dynamic_cast(m_case.value()); QString generatedCurveName; - if (m_addWellNameToCurveName && m_wellPath) + if (m_addWellNameToCurveName ) { generatedCurveName += wellName(); + if (m_trajectoryType == SIMULATION_WELL && m_generatedSimulationWellPathBranches.size() > 1) + { + generatedCurveName += " Br" + QString::number(m_branchIndex + 1); + } } if (m_addCaseNameToCurveName && m_case()) @@ -495,9 +722,9 @@ QString RimWellLogExtractionCurve::createCurveAutoName() if (eclipseCase) { RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(m_eclipseResultDefinition->porosityModel()); - if (eclipseCase->reservoirData()) + if (eclipseCase->eclipseCaseData()) { - maxTimeStep = eclipseCase->reservoirData()->results(porosityModel)->maxTimeStepCount(); + maxTimeStep = eclipseCase->eclipseCaseData()->results(porosityModel)->maxTimeStepCount(); } } else if (geomCase) @@ -547,7 +774,7 @@ QString RimWellLogExtractionCurve::wellLogChannelName() const QString name; if (eclipseCase) { - name = m_eclipseResultDefinition->resultVariable(); + name = caf::Utils::makeValidFileBasename( m_eclipseResultDefinition->resultVariableUiName()); } else if (geoMechCase) { @@ -570,13 +797,20 @@ QString RimWellLogExtractionCurve::wellLogChannelName() const //-------------------------------------------------------------------------------------------------- QString RimWellLogExtractionCurve::wellName() const { - if (m_wellPath) + if ( m_trajectoryType() == WELL_PATH ) { - return m_wellPath->name(); + if ( m_wellPath ) + { + return m_wellPath->name(); + } + else + { + return QString(); + } } else { - return QString(); + return m_simWellName; } } @@ -593,7 +827,7 @@ QString RimWellLogExtractionCurve::wellDate() const if (eclipseCase) { RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(m_eclipseResultDefinition->porosityModel()); - if (eclipseCase->reservoirData()) + if (eclipseCase->eclipseCaseData()) { timeStepNames = eclipseCase->timeStepStrings(); } @@ -666,3 +900,11 @@ double RimWellLogExtractionCurve::rkbDiff() const return HUGE_VAL; } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +int RimWellLogExtractionCurve::currentTimeStep() const +{ + return m_timeStep(); +} diff --git a/ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.h b/ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.h index 0df85b9df2..70734a3414 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.h +++ b/ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.h @@ -23,12 +23,14 @@ #include "cafPdmPtrField.h" #include "cafPdmChildField.h" +#include "cvfCollection.h" class RimCase; class RimEclipseResultDefinition; class RimGeoMechResultDefinition; class RimView; class RimWellPath; +class RigWellPath; //================================================================================================== /// @@ -41,8 +43,16 @@ class RimWellLogExtractionCurve : public RimWellLogCurve RimWellLogExtractionCurve(); virtual ~RimWellLogExtractionCurve(); - + enum TrajectoryType { WELL_PATH, SIMULATION_WELL}; + void setWellPath(RimWellPath* wellPath); + RimWellPath* wellPath() const; + + void setFromSimulationWellName(const QString& simWellName, int branchIndex); + + void setCase(RimCase* rimCase); + RimCase* rimCase() const; + void setPropertiesFromView(RimView* view); virtual QString wellName() const; @@ -53,6 +63,8 @@ class RimWellLogExtractionCurve : public RimWellLogCurve QString caseName() const; double rkbDiff() const; + int currentTimeStep() const; + protected: virtual QString createCurveAutoName(); virtual void onLoadDataAndUpdate(); @@ -69,9 +81,16 @@ class RimWellLogExtractionCurve : public RimWellLogCurve private: void setLogScaleFromSelectedResult(); void clampTimestep(); + void clampBranchIndex(); + std::set findSortedWellNames(); + void updateGeneratedSimulationWellpath(); + void clearGeneratedSimWellPaths(); private: caf::PdmPtrField m_wellPath; + caf::PdmField > m_trajectoryType; + caf::PdmField m_simWellName; + caf::PdmField m_branchIndex; caf::PdmPtrField m_case; caf::PdmChildField m_eclipseResultDefinition; caf::PdmChildField m_geomResultDefinition; @@ -82,5 +101,7 @@ class RimWellLogExtractionCurve : public RimWellLogCurve caf::PdmField m_addWellNameToCurveName; caf::PdmField m_addTimestepToCurveName; caf::PdmField m_addDateToCurveName; + + cvf::Collection m_generatedSimulationWellPathBranches; }; diff --git a/ApplicationCode/ProjectDataModel/RimWellLogFileCurve.cpp b/ApplicationCode/ProjectDataModel/RimWellLogFileCurve.cpp index 5a575cf94d..e6811a4ace 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogFileCurve.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogFileCurve.cpp @@ -19,14 +19,16 @@ #include "RimWellLogFileCurve.h" -#include "RimProject.h" +#include "RigWellLogCurveData.h" + #include "RimOilField.h" -#include "RimWellPathCollection.h" -#include "RimWellPath.h" -#include "RimWellLogFileChannel.h" +#include "RimProject.h" #include "RimWellLogFile.h" -#include "RimWellLogTrack.h" +#include "RimWellLogFileChannel.h" #include "RimWellLogPlot.h" +#include "RimWellLogTrack.h" +#include "RimWellPath.h" +#include "RimWellPathCollection.h" #include "RiuWellLogTrack.h" #include "RiuLineSegmentQwtPlotCurve.h" @@ -54,8 +56,6 @@ RimWellLogFileCurve::RimWellLogFileCurve() CAF_PDM_InitFieldNoDefault(&m_wellLogChannnelName, "CurveWellLogChannel", "Well Log Channel", "", "", ""); m_wellPath = NULL; - - updateOptionSensitivity(); } //-------------------------------------------------------------------------------------------------- @@ -80,11 +80,11 @@ void RimWellLogFileCurve::onLoadDataAndUpdate() firstAncestorOrThisOfType(wellLogPlot); CVF_ASSERT(wellLogPlot); - if (wellLogPlot->depthType() == RimWellLogPlot::TRUE_VERTICAL_DEPTH) + if (wellLogPlot && wellLogPlot->depthType() == RimWellLogPlot::TRUE_VERTICAL_DEPTH) { if (RiaApplication::instance()->preferences()->showLasCurveWithoutTvdWarning()) { - QString tmp = QString("Display of True Vertical Depth (TVD) for LAS curves in not yet supported, and no LAS curve will be displayed in this mode.\n\n"); + QString tmp = QString("Display of True Vertical Depth (TVD) for LAS curves is not yet supported, and the LAS curve will be hidden in this mode.\n\n"); tmp += "Control display of this warning from \"Preferences->Show LAS curve without TVD warning\""; QMessageBox::warning(NULL, "LAS curve without TVD", tmp); @@ -169,18 +169,19 @@ void RimWellLogFileCurve::fieldChangedByUi(const caf::PdmFieldHandle* changedFie //-------------------------------------------------------------------------------------------------- void RimWellLogFileCurve::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) { + RimPlotCurve::updateOptionSensitivity(); + caf::PdmUiGroup* curveDataGroup = uiOrdering.addNewGroup("Curve Data"); curveDataGroup->add(&m_wellPath); curveDataGroup->add(&m_wellLogChannnelName); caf::PdmUiGroup* appearanceGroup = uiOrdering.addNewGroup("Appearance"); - appearanceGroup->add(&m_curveColor); - appearanceGroup->add(&m_curveThickness); - appearanceGroup->add(&m_pointSymbol); - appearanceGroup->add(&m_symbolSkipPixelDistance); - appearanceGroup->add(&m_lineStyle); - appearanceGroup->add(&m_curveName); - appearanceGroup->add(&m_isUsingAutoName); + RimPlotCurve::appearanceUiOrdering(*appearanceGroup); + + caf::PdmUiGroup* nameGroup = uiOrdering.addNewGroup("Curve Name"); + nameGroup->add(&m_showLegend); + RimPlotCurve::curveNameUiOrdering(*nameGroup); + } //-------------------------------------------------------------------------------------------------- @@ -188,7 +189,7 @@ void RimWellLogFileCurve::defineUiOrdering(QString uiConfigName, caf::PdmUiOrder //-------------------------------------------------------------------------------------------------- void RimWellLogFileCurve::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/) { - uiTreeOrdering.setForgetRemainingFields(true); + uiTreeOrdering.skipRemainingChildren(true); } //-------------------------------------------------------------------------------------------------- @@ -196,10 +197,10 @@ void RimWellLogFileCurve::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrd //-------------------------------------------------------------------------------------------------- QList RimWellLogFileCurve::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) { - QList optionList; + QList options; - optionList = RimWellLogCurve::calculateValueOptions(fieldNeedingOptions, useOptionsOnly); - if (optionList.size() > 0) return optionList; + options = RimWellLogCurve::calculateValueOptions(fieldNeedingOptions, useOptionsOnly); + if (options.size() > 0) return options; if (fieldNeedingOptions == &m_wellPath) { @@ -210,15 +211,16 @@ QList RimWellLogFileCurve::calculateValueOptions(const c for (size_t i = 0; i < wellPaths.size(); i++) { + // Only include well paths coming from a well log file if (wellPaths[i]->m_wellLogFile()) { - optionList.push_back(caf::PdmOptionItemInfo(wellPaths[i]->name(), QVariant::fromValue(caf::PdmPointer(wellPaths[i])))); + options.push_back(caf::PdmOptionItemInfo(wellPaths[i]->name(), wellPaths[i])); } } - if (optionList.size() > 0) + if (options.size() > 0) { - optionList.push_front(caf::PdmOptionItemInfo("None", QVariant::fromValue(caf::PdmPointer(NULL)))); + options.push_front(caf::PdmOptionItemInfo("None", nullptr)); } } } @@ -235,18 +237,18 @@ QList RimWellLogFileCurve::calculateValueOptions(const c for (size_t i = 0; i < fileLogs->size(); i++) { QString wellLogChannelName = (*fileLogs)[i]->name(); - optionList.push_back(caf::PdmOptionItemInfo(wellLogChannelName, wellLogChannelName)); + options.push_back(caf::PdmOptionItemInfo(wellLogChannelName, wellLogChannelName)); } } } - if (optionList.size() == 0) + if (options.size() == 0) { - optionList.push_back(caf::PdmOptionItemInfo("None", "None")); + options.push_back(caf::PdmOptionItemInfo("None", "None")); } } - return optionList; + return options; } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp b/ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp index 2b9476659f..6409efa341 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp @@ -21,6 +21,10 @@ #include "RiaApplication.h" +#include "RigWellLogCurveData.h" + +#include "RimWellAllocationPlot.h" +#include "RimWellLogCurve.h" #include "RimWellLogTrack.h" #include "RiuMainPlotWindow.h" @@ -41,6 +45,8 @@ namespace caf { { addItem(RimWellLogPlot::MEASURED_DEPTH, "MEASURED_DEPTH", "Measured Depth"); addItem(RimWellLogPlot::TRUE_VERTICAL_DEPTH, "TRUE_VERTICAL_DEPTH", "True Vertical Depth"); + addItem(RimWellLogPlot::PSEUDO_LENGTH, "PSEUDO_LENGTH", "Pseudo Length"); + addItem(RimWellLogPlot::CONNECTION_NUMBER, "CONNECTION_NUMBER", "Connection Number"); setDefault(RimWellLogPlot::MEASURED_DEPTH); } @@ -59,9 +65,6 @@ RimWellLogPlot::RimWellLogPlot() m_viewer = NULL; - CAF_PDM_InitField(&m_showWindow, "ShowWindow", true, "Show well log plot", "", "", ""); - m_showWindow.uiCapability()->setUiHidden(true); - CAF_PDM_InitField(&m_userName, "PlotDescription", QString("Well Log Plot"),"Name", "", "", ""); caf::AppEnum< RimWellLogPlot::DepthTypeEnum > depthType = MEASURED_DEPTH; @@ -73,6 +76,7 @@ RimWellLogPlot::RimWellLogPlot() CAF_PDM_InitField(&m_minVisibleDepth, "MinimumDepth", 0.0, "Min", "", "", ""); CAF_PDM_InitField(&m_maxVisibleDepth, "MaximumDepth", 1000.0, "Max", "", "", ""); CAF_PDM_InitField(&m_isAutoScaleDepthEnabled, "AutoScaleDepthEnabled", true, "Auto Scale", "", "", ""); + CAF_PDM_InitField(&m_showTrackLegends, "ShowTrackLegends", true, "Show Legends", "", "", ""); CAF_PDM_InitFieldNoDefault(&m_tracks, "Tracks", "", "", "", ""); m_tracks.uiCapability()->setUiHidden(true); @@ -86,52 +90,11 @@ RimWellLogPlot::RimWellLogPlot() //-------------------------------------------------------------------------------------------------- RimWellLogPlot::~RimWellLogPlot() { - if (RiaApplication::instance()->mainPlotWindow()) - { - RiaApplication::instance()->mainPlotWindow()->removeViewer(m_viewer); - } + removeMdiWindowFromMdiArea(); - detachAllCurves(); m_tracks.deleteAllChildObjects(); - delete m_viewer; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimWellLogPlot::updateViewerWidget() -{ - RiuMainPlotWindow* mainPlotWindow = RiaApplication::instance()->mainPlotWindow(); - if (!mainPlotWindow) return; - - if (m_showWindow()) - { - if (!m_viewer) - { - m_viewer = new RiuWellLogPlot(this, mainPlotWindow); - - recreateTrackPlots(); - - mainPlotWindow->addViewer(m_viewer, this->mdiWindowGeometry()); - mainPlotWindow->setActiveViewer(m_viewer); - } - - updateViewerWidgetWindowTitle(); - } - else - { - if (m_viewer) - { - this->setMdiWindowGeometry(mainPlotWindow->windowGeometryForViewer(m_viewer)); - - mainPlotWindow->removeViewer(m_viewer); - detachAllCurves(); - - delete m_viewer; - m_viewer = NULL; - } - } + deleteViewWidget(); } //-------------------------------------------------------------------------------------------------- @@ -139,20 +102,9 @@ void RimWellLogPlot::updateViewerWidget() //-------------------------------------------------------------------------------------------------- void RimWellLogPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) { - if (changedField == &m_showWindow) - { - if (m_showWindow) - { - loadDataAndUpdate(); - } - else - { - updateViewerWidget(); - } + RimViewWindow::fieldChangedByUi(changedField, oldValue, newValue); - uiCapability()->updateUiIconFromToggleField(); - } - else if (changedField == &m_minVisibleDepth || changedField == &m_maxVisibleDepth) + if (changedField == &m_minVisibleDepth || changedField == &m_maxVisibleDepth) { applyDepthZoomFromVisibleDepth(); @@ -164,21 +116,57 @@ void RimWellLogPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c } else if (changedField == &m_userName) { - updateViewerWidgetWindowTitle(); + updateMdiWindowTitle(); + } + + if ( changedField == &m_depthType ) + { + RimWellAllocationPlot* wellAllocPlot; + firstAncestorOrThisOfType(wellAllocPlot); + if (wellAllocPlot) wellAllocPlot->loadDataAndUpdate(); + else updateTracks(); + } + if ( changedField == &m_depthUnit) + { + updateTracks(); } - if (changedField == &m_depthType || - changedField == &m_depthUnit) + + if ( changedField == &m_showTrackLegends) { updateTracks(); + if (m_viewer) m_viewer->updateChildrenLayout(); } + } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -caf::PdmFieldHandle* RimWellLogPlot::objectToggleField() +QList RimWellLogPlot::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) { - return &m_showWindow; + QList options; + + if (fieldNeedingOptions == &m_depthType ) + { + using DepthAppEnum = caf::AppEnum< DepthTypeEnum >; + for (size_t i = 0; i < DepthAppEnum::size(); ++i) + { + DepthTypeEnum enumVal = DepthAppEnum::fromIndex(i); + if (m_disabledDepthTypes.count( enumVal) == 0) + { + options.push_back(caf::PdmOptionItemInfo(DepthAppEnum::uiText(enumVal), enumVal)); + } + } + } + else if ( fieldNeedingOptions == &m_depthUnit) + { + using UnitAppEnum = caf::AppEnum< RimDefines::DepthUnitType >; + options.push_back(caf::PdmOptionItemInfo(UnitAppEnum::uiText(RimDefines::UNIT_METER), RimDefines::UNIT_METER)); + options.push_back(caf::PdmOptionItemInfo(UnitAppEnum::uiText(RimDefines::UNIT_FEET), RimDefines::UNIT_FEET)); + } + + (*useOptionsOnly) = true; + return options; } //-------------------------------------------------------------------------------------------------- @@ -208,8 +196,6 @@ void RimWellLogPlot::addTrack(RimWellLogTrack* track) track->recreateViewer(); m_viewer->addTrackPlot(track->viewer()); } - - updateTrackNames(); } //-------------------------------------------------------------------------------------------------- @@ -240,6 +226,17 @@ void RimWellLogPlot::removeTrack(RimWellLogTrack* track) } } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogPlot::removeTrackByIndex(size_t index) +{ + CVF_ASSERT(index < m_tracks.size()); + + RimWellLogTrack* track = m_tracks[index]; + this->removeTrack(track); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -269,6 +266,14 @@ void RimWellLogPlot::moveTracks(RimWellLogTrack* insertAfterTrack, const std::ve updateTrackNames(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimWellLogTrack* RimWellLogPlot::trackByIndex(size_t index) +{ + return m_tracks[index]; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -384,25 +389,88 @@ QWidget* RimWellLogPlot::viewWidget() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimWellLogPlot::depthZoomMinMax(double* minimumDepth, double* maximumDepth) const +QString RimWellLogPlot::asciiDataForPlotExport() const { - *minimumDepth = m_minVisibleDepth; - *maximumDepth = m_maxVisibleDepth; -} + QString out; + RimWellAllocationPlot* wellAllocPlot = nullptr; + this->firstAncestorOrThisOfType(wellAllocPlot); + if (wellAllocPlot) + { + out += wellAllocPlot->description(); + } + else + { + out += description(); + } + out += "\n"; -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimWellLogPlot::setupBeforeSave() -{ - if (m_viewer) + for (RimWellLogTrack* track : m_tracks) { - if (RiaApplication::instance()->mainPlotWindow()) + if (!track->isVisible()) continue; + + out += "\n" + track->description() + "\n"; + + std::vector curves = track->curvesVector(); + + std::vector curveNames; + std::vector curveDepths; + std::vector > curvesPlotXValues; + + + for (RimWellLogCurve* curve : curves) + { + curveNames.push_back(curve->curveName()); + const RigWellLogCurveData* curveData = curve->curveData(); + if (!curveData) return out; + + if (curveNames.size() == 1) + { + curveDepths = curveData->measuredDepthPlotValues(RimDefines::UNIT_NONE); + } + + std::vector xPlotValues = curveData->xPlotValues(); + if (!(curveDepths.size() == xPlotValues.size())) return out; + curvesPlotXValues.push_back(xPlotValues); + } + + + for (int i = static_cast(curveDepths.size()) - 1; i >= 0; i--) { - this->setMdiWindowGeometry(RiaApplication::instance()->mainPlotWindow()->windowGeometryForViewer(m_viewer)); + if (i == static_cast(curveDepths.size()) - 1) + { + if (depthType() == CONNECTION_NUMBER) out += "Connection"; + else if (depthType() == MEASURED_DEPTH) out += "MD "; + else if (depthType() == PSEUDO_LENGTH) out += "PL "; + else if (depthType() == TRUE_VERTICAL_DEPTH) out += "TVD "; + for (QString name : curveNames) out += " \t" + name; + out += "\n"; + } + else if (curveDepths[i] == curveDepths[i+1]) + { + continue; + } + + out += QString::number(curveDepths[i], 'f', 3); + for (std::vector plotVector : curvesPlotXValues) + { + out += " \t" + QString::number(plotVector[i], 'g'); + } + out += "\n"; } + } + + return out; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogPlot::depthZoomMinMax(double* minimumDepth, double* maximumDepth) const +{ + *minimumDepth = m_minVisibleDepth; + *maximumDepth = m_maxVisibleDepth; } @@ -413,12 +481,23 @@ void RimWellLogPlot::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& { uiOrdering.add(&m_userName); uiOrdering.add(&m_depthType); - uiOrdering.add(&m_depthUnit); + + RimWellAllocationPlot* wap; + firstAncestorOrThisOfType(wap); + if (!wap) + { + uiOrdering.add(&m_depthUnit); + } + + uiOrdering.add(&m_showTrackLegends); caf::PdmUiGroup* gridGroup = uiOrdering.addNewGroup("Visible Depth Range"); gridGroup->add(&m_isAutoScaleDepthEnabled); gridGroup->add(&m_minVisibleDepth); gridGroup->add(&m_maxVisibleDepth); + + + uiOrdering.skipRemainingFields(true); } @@ -427,7 +506,7 @@ void RimWellLogPlot::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& //-------------------------------------------------------------------------------------------------- void RimWellLogPlot::loadDataAndUpdate() { - updateViewerWidget(); + updateMdiWindowVisibility(); updateTracks(); } @@ -438,6 +517,8 @@ void RimWellLogPlot::updateTracks() { if (m_showWindow) { + updateDisabledDepthTypes(); + for (size_t tIdx = 0; tIdx < m_tracks.size(); ++tIdx) { m_tracks[tIdx]->loadDataAndUpdate(); @@ -548,29 +629,27 @@ QString RimWellLogPlot::description() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimWellLogPlot::updateViewerWidgetWindowTitle() +QWidget* RimWellLogPlot::createViewWidget(QWidget* mainWindowParent) { - if (m_viewer) - { - m_viewer->setWindowTitle(m_userName); - } + m_viewer = new RiuWellLogPlot(this, mainWindowParent); + + recreateTrackPlots(); + + return m_viewer; } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimWellLogPlot::handleViewerDeletion() +void RimWellLogPlot::deleteViewWidget() { - m_showWindow = false; + detachAllCurves(); - if (m_viewer) - { - detachAllCurves(); - m_viewer = NULL; - } - - uiCapability()->updateUiIconFromToggleField(); - updateConnectedEditors(); + if (m_viewer) + { + m_viewer->deleteLater(); + m_viewer = nullptr; + } } //-------------------------------------------------------------------------------------------------- @@ -581,6 +660,14 @@ RimWellLogPlot::DepthTypeEnum RimWellLogPlot::depthType() const return m_depthType.value(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogPlot::setDepthType(DepthTypeEnum depthType) +{ + m_depthType = depthType; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -599,14 +686,24 @@ QString RimWellLogPlot::depthPlotTitle() const switch (m_depthType.value()) { case MEASURED_DEPTH: - depthTitle = "MD"; - break; + depthTitle = "MD"; + break; case TRUE_VERTICAL_DEPTH: - depthTitle = "TVD"; - break; + depthTitle = "TVD"; + break; + + case PSEUDO_LENGTH: + depthTitle = "PL"; + break; + + case CONNECTION_NUMBER: + depthTitle = "Connection"; + break; } + if (m_depthType() == CONNECTION_NUMBER) return depthTitle; + if (m_depthUnit == RimDefines::UNIT_METER) { depthTitle += " [m]"; @@ -615,10 +712,30 @@ QString RimWellLogPlot::depthPlotTitle() const { depthTitle += " [ft]"; } + else if (m_depthUnit == RimDefines::UNIT_NONE) + { + depthTitle += ""; + } return depthTitle; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimWellLogPlot::isTrackLegendsVisible() const +{ + return m_showTrackLegends(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogPlot::setTrackLegendsVisible(bool doShow) +{ + m_showTrackLegends = doShow; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -637,3 +754,26 @@ void RimWellLogPlot::setDepthUnit(RimDefines::DepthUnitType depthUnit) updateTracks(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogPlot::updateDisabledDepthTypes() +{ + m_disabledDepthTypes.clear(); + RimWellAllocationPlot* wap; + firstAncestorOrThisOfType(wap); + if (wap) + { + m_disabledDepthTypes.insert(MEASURED_DEPTH); + if (m_disabledDepthTypes.count(m_depthType() )) + { + m_depthType = CONNECTION_NUMBER; + } + } + else + { + m_disabledDepthTypes.insert(PSEUDO_LENGTH); + m_disabledDepthTypes.insert(CONNECTION_NUMBER); + } +} + diff --git a/ApplicationCode/ProjectDataModel/RimWellLogPlot.h b/ApplicationCode/ProjectDataModel/RimWellLogPlot.h index 1db858f1ef..dd0ce4013b 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogPlot.h +++ b/ApplicationCode/ProjectDataModel/RimWellLogPlot.h @@ -24,11 +24,11 @@ #include "cafPdmChildArrayField.h" #include "cafAppEnum.h" -#include #include "RimDefines.h" - #include "RimViewWindow.h" +#include + class RiuWellLogPlot; class RimWellLogTrack; @@ -45,10 +45,14 @@ class RimWellLogPlot : public RimViewWindow enum DepthTypeEnum { MEASURED_DEPTH, - TRUE_VERTICAL_DEPTH + TRUE_VERTICAL_DEPTH, + PSEUDO_LENGTH, + CONNECTION_NUMBER }; + + public: RimWellLogPlot(); virtual ~RimWellLogPlot(); @@ -57,20 +61,28 @@ class RimWellLogPlot : public RimViewWindow QString description() const; DepthTypeEnum depthType() const; + void setDepthType(DepthTypeEnum depthType); RimDefines::DepthUnitType depthUnit() const; void setDepthUnit(RimDefines::DepthUnitType depthUnit); + QString depthPlotTitle() const; + bool isTrackLegendsVisible() const; + void setTrackLegendsVisible(bool doShow); void addTrack(RimWellLogTrack* track); void insertTrack(RimWellLogTrack* track, size_t index); size_t trackCount() { return m_tracks.size();} + void removeTrackByIndex(size_t index); + void removeTrack(RimWellLogTrack* track); size_t trackIndex(RimWellLogTrack* track); void moveTracks(RimWellLogTrack* insertAfterTrack, const std::vector& tracksToMove); - void loadDataAndUpdate(); + RimWellLogTrack* trackByIndex(size_t index); + + virtual void loadDataAndUpdate() override; void updateTracks(); void updateTrackNames(); @@ -87,39 +99,46 @@ class RimWellLogPlot : public RimViewWindow virtual void zoomAll() override; virtual QWidget* viewWidget() override; + QString asciiDataForPlotExport() const; + protected: // Overridden PDM methods virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue); - virtual void setupBeforeSave(); virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering); - virtual caf::PdmFieldHandle* objectToggleField(); virtual caf::PdmFieldHandle* userDescriptionField() { return &m_userName; } + virtual QList calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override; virtual QImage snapshotWindowContent() override; private: - void updateViewerWidget(); - void updateViewerWidgetWindowTitle(); void applyZoomAllDepths(); void applyDepthZoomFromVisibleDepth(); void recreateTrackPlots(); void detachAllCurves(); - void handleViewerDeletion(); + + void updateDisabledDepthTypes(); + +public: // Needed by RiuWellAllocation Plot + // RimViewWindow overrides + + virtual QWidget* createViewWidget(QWidget* mainWindowParent) override; + virtual void deleteViewWidget() override; private: - caf::PdmField m_showWindow; caf::PdmField m_userName; caf::PdmField< caf::AppEnum< DepthTypeEnum > > m_depthType; caf::PdmField< caf::AppEnum< RimDefines::DepthUnitType > > m_depthUnit; + std::set m_disabledDepthTypes; caf::PdmChildArrayField m_tracks; caf::PdmField m_minVisibleDepth; caf::PdmField m_maxVisibleDepth; caf::PdmField m_isAutoScaleDepthEnabled; + caf::PdmField m_showTrackLegends; double m_minAvailableDepth; double m_maxAvailableDepth; diff --git a/ApplicationCode/ProjectDataModel/RimWellLogPlotCollection.cpp b/ApplicationCode/ProjectDataModel/RimWellLogPlotCollection.cpp index 95fda59b02..b1f0ac84d4 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogPlotCollection.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogPlotCollection.cpp @@ -19,7 +19,6 @@ #include "RimWellLogPlotCollection.h" -#include "RigCaseData.h" #include "RigEclipseWellLogExtractor.h" #include "RigGeoMechCaseData.h" #include "RigGeoMechWellLogExtractor.h" @@ -53,17 +52,45 @@ RimWellLogPlotCollection::~RimWellLogPlotCollection() wellLogPlots.deleteAllChildObjects(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigEclipseWellLogExtractor* RimWellLogPlotCollection::findOrCreateSimWellExtractor(const QString& simWellName, + const QString& caseUserDescription, + const RigWellPath* wellPathGeom, + const RigEclipseCaseData* eclCaseData) +{ + if (!(wellPathGeom && eclCaseData)) + { + return nullptr; + } + + for (size_t exIdx = 0; exIdx < m_extractors.size(); ++exIdx) + { + if (m_extractors[exIdx]->caseData() == eclCaseData && m_extractors[exIdx]->wellPathData() == wellPathGeom) + { + return m_extractors[exIdx].p(); + } + } + + std::string errorIdName = (simWellName + " " + caseUserDescription).toStdString(); + cvf::ref extractor = new RigEclipseWellLogExtractor(eclCaseData, wellPathGeom, errorIdName); + m_extractors.push_back(extractor.p()); + + return extractor.p(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- RigEclipseWellLogExtractor* RimWellLogPlotCollection::findOrCreateExtractor(RimWellPath* wellPath, RimEclipseCase* eclCase) { - if (!(wellPath && eclCase && wellPath->wellPathGeometry() && eclCase->reservoirData())) + if (!(wellPath && eclCase && wellPath->wellPathGeometry() && eclCase->eclipseCaseData())) { return NULL; } - RigCaseData* eclCaseData = eclCase->reservoirData(); + RigEclipseCaseData* eclCaseData = eclCase->eclipseCaseData(); RigWellPath* wellPathGeom = wellPath->wellPathGeometry(); for (size_t exIdx = 0; exIdx < m_extractors.size(); ++exIdx) { @@ -132,7 +159,7 @@ void RimWellLogPlotCollection::removeExtractors(const RigWellPath* wellPath) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimWellLogPlotCollection::removeExtractors(const RigCaseData* caseData) +void RimWellLogPlotCollection::removeExtractors(const RigEclipseCaseData* caseData) { for (int eIdx = (int) m_extractors.size() - 1; eIdx >= 0; eIdx--) { diff --git a/ApplicationCode/ProjectDataModel/RimWellLogPlotCollection.h b/ApplicationCode/ProjectDataModel/RimWellLogPlotCollection.h index dbd475c392..11990bffbe 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogPlotCollection.h +++ b/ApplicationCode/ProjectDataModel/RimWellLogPlotCollection.h @@ -28,7 +28,7 @@ class RimWellLogPlot; class RigEclipseWellLogExtractor; class RigGeoMechWellLogExtractor; class RimGeoMechCase; -class RigCaseData; +class RigEclipseCaseData; class RigGeoMechCaseData; class RigWellPath; class RimWellPath; @@ -45,12 +45,17 @@ class RimWellLogPlotCollection : public caf::PdmObject public: RimWellLogPlotCollection(); virtual ~RimWellLogPlotCollection(); - + + RigEclipseWellLogExtractor* findOrCreateSimWellExtractor(const QString& simWellName, + const QString& caseUserDescription, + const RigWellPath* wellPathGeom, + const RigEclipseCaseData* eclCaseData); + RigEclipseWellLogExtractor* findOrCreateExtractor(RimWellPath* wellPath, RimEclipseCase* eclCase); RigGeoMechWellLogExtractor* findOrCreateExtractor(RimWellPath* wellPath, RimGeoMechCase* eclCase); void removeExtractors(const RigWellPath* wellPath); - void removeExtractors(const RigCaseData* caseData); + void removeExtractors(const RigEclipseCaseData* caseData); void removeExtractors(const RigGeoMechCaseData* caseData); caf::PdmChildArrayField wellLogPlots; diff --git a/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp b/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp index 580e5314cb..c63d2a7f49 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp @@ -1,457 +1,517 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2015- Statoil ASA -// Copyright (C) 2015- Ceetron Solutions 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#include "RimWellLogTrack.h" - -#include "RigStatisticsCalculator.h" - -#include "RimWellLogPlot.h" -#include "RimWellLogCurve.h" - -#include "RiuWellLogTrack.h" -#include "RiuWellLogPlot.h" -#include "RiuMainWindow.h" - -#include "cvfAssert.h" -#include "cvfMath.h" - -#include "qwt_scale_engine.h" - -#include - -#define RI_LOGPLOTTRACK_MINX_DEFAULT -10.0 -#define RI_LOGPLOTTRACK_MAXX_DEFAULT 100.0 - - -CAF_PDM_SOURCE_INIT(RimWellLogTrack, "WellLogPlotTrack"); - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RimWellLogTrack::RimWellLogTrack() -{ - CAF_PDM_InitObject("Track", ":/WellLogTrack16x16.png", "", ""); - - CAF_PDM_InitFieldNoDefault(&m_userName, "TrackDescription", "Name", "", "", ""); - m_userName.uiCapability()->setUiReadOnly(true); - - CAF_PDM_InitField(&m_show, "Show", true, "Show track", "", "", ""); - m_show.uiCapability()->setUiHidden(true); - - CAF_PDM_InitFieldNoDefault(&curves, "Curves", "", "", "", ""); - curves.uiCapability()->setUiHidden(true); - - CAF_PDM_InitField(&m_visibleXRangeMin, "VisibleXRangeMin", RI_LOGPLOTTRACK_MINX_DEFAULT, "Min", "", "", ""); - CAF_PDM_InitField(&m_visibleXRangeMax, "VisibleXRangeMax", RI_LOGPLOTTRACK_MAXX_DEFAULT, "Max", "", "", ""); - - CAF_PDM_InitField(&m_isAutoScaleXEnabled, "AutoScaleX", true, "Auto Scale", "", "", ""); - - CAF_PDM_InitField(&m_isLogarithmicScaleEnabled, "LogarithmicScaleX", false, "Logarithmic Scale", "", "", ""); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RimWellLogTrack::~RimWellLogTrack() -{ - curves.deleteAllChildObjects(); - - delete m_wellLogTrackPlotWidget; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimWellLogTrack::setDescription(const QString& description) -{ - m_userName = description; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimWellLogTrack::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) -{ - if (changedField == &m_show) - { - if (m_wellLogTrackPlotWidget) - { - m_wellLogTrackPlotWidget->setVisible(m_show()); - } - - RimWellLogPlot* wellLogPlot; - this->firstAncestorOrThisOfType(wellLogPlot); - if (wellLogPlot) - { - wellLogPlot->calculateAvailableDepthRange(); - wellLogPlot->updateDepthZoom(); - - RiuWellLogPlot* wellLogPlotViewer = dynamic_cast(wellLogPlot->viewWidget()); - if (wellLogPlotViewer) - { - wellLogPlotViewer->updateChildrenLayout(); - } - } - } - else if (changedField == &m_visibleXRangeMin || changedField == &m_visibleXRangeMax) - { - m_wellLogTrackPlotWidget->setXRange(m_visibleXRangeMin, m_visibleXRangeMax); - m_wellLogTrackPlotWidget->replot(); - m_isAutoScaleXEnabled = false; - } - else if (changedField == &m_isAutoScaleXEnabled) - { - if (m_isAutoScaleXEnabled()) - { - this->updateXZoom(); - computeAndSetXRangeMinForLogarithmicScale(); - - if (m_wellLogTrackPlotWidget) m_wellLogTrackPlotWidget->replot(); - } - } - else if (changedField == &m_isLogarithmicScaleEnabled) - { - updateAxisScaleEngine(); - - this->updateXZoom(); - computeAndSetXRangeMinForLogarithmicScale(); - - m_wellLogTrackPlotWidget->setXRange(m_visibleXRangeMin, m_visibleXRangeMax); - - m_wellLogTrackPlotWidget->replot(); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -caf::PdmFieldHandle* RimWellLogTrack::objectToggleField() -{ - return &m_show; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -caf::PdmFieldHandle* RimWellLogTrack::userDescriptionField() -{ - return &m_userName; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimWellLogTrack::addCurve(RimWellLogCurve* curve) -{ - curves.push_back(curve); - - if (m_wellLogTrackPlotWidget) - { - curve->setParentQwtPlot(m_wellLogTrackPlotWidget); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimWellLogTrack::insertCurve(RimWellLogCurve* curve, size_t index) -{ - curves.insert(index, curve); - // Todo: Mark curve data to use either TVD or MD - - if (m_wellLogTrackPlotWidget) - { - curve->setParentQwtPlot(m_wellLogTrackPlotWidget); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimWellLogTrack::removeCurve(RimWellLogCurve* curve) -{ - size_t index = curves.index(curve); - if ( index < curves.size()) - { - curves[index]->detachQwtCurve(); - curves.removeChildObject(curve); - } -} - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RiuWellLogTrack* RimWellLogTrack::viewer() -{ - return m_wellLogTrackPlotWidget; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimWellLogTrack::availableDepthRange(double* minimumDepth, double* maximumDepth) -{ - double minDepth = HUGE_VAL; - double maxDepth = -HUGE_VAL; - - size_t curveCount = curves.size(); - - for (size_t cIdx = 0; cIdx < curveCount; cIdx++) - { - double minCurveDepth = HUGE_VAL; - double maxCurveDepth = -HUGE_VAL; - - if (curves[cIdx]->isCurveVisible() && curves[cIdx]->depthRange(&minCurveDepth, &maxCurveDepth)) - { - if (minCurveDepth < minDepth) - { - minDepth = minCurveDepth; - } - - if (maxCurveDepth > maxDepth) - { - maxDepth = maxCurveDepth; - } - } - } - - *minimumDepth = minDepth; - *maximumDepth = maxDepth; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimWellLogTrack::loadDataAndUpdate() -{ - RimWellLogPlot* wellLogPlot; - firstAncestorOrThisOfType(wellLogPlot); - if (wellLogPlot && m_wellLogTrackPlotWidget) - { - m_wellLogTrackPlotWidget->setDepthTitle(wellLogPlot->depthPlotTitle()); - } - - for (size_t cIdx = 0; cIdx < curves.size(); ++cIdx) - { - curves[cIdx]->loadDataAndUpdate(); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimWellLogTrack::recreateViewer() -{ - if (m_wellLogTrackPlotWidget == NULL) - { - m_wellLogTrackPlotWidget = new RiuWellLogTrack(this); - updateAxisScaleEngine(); - - for (size_t cIdx = 0; cIdx < curves.size(); ++cIdx) - { - curves[cIdx]->setParentQwtPlot(this->m_wellLogTrackPlotWidget); - } - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimWellLogTrack::detachAllCurves() -{ - for (size_t cIdx = 0; cIdx < curves.size(); ++cIdx) - { - curves[cIdx]->detachQwtCurve(); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimWellLogTrack::updateXZoomAndParentPlotDepthZoom() -{ - if (m_wellLogTrackPlotWidget) - { - RimWellLogPlot* wellLogPlot; - firstAncestorOrThisOfType(wellLogPlot); - if (wellLogPlot) - { - wellLogPlot->updateDepthZoom(); - } - - updateXZoom(); - - m_wellLogTrackPlotWidget->replot(); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimWellLogTrack::updateXZoom() -{ - if (!m_isAutoScaleXEnabled()) - { - m_wellLogTrackPlotWidget->setXRange(m_visibleXRangeMin, m_visibleXRangeMax); - m_wellLogTrackPlotWidget->replot(); - return; - } - - double minValue = HUGE_VAL; - double maxValue = -HUGE_VAL; - - for (size_t cIdx = 0; cIdx < curves.size(); cIdx++) - { - double minCurveValue = HUGE_VAL; - double maxCurveValue = -HUGE_VAL; - - if (curves[cIdx]->isCurveVisible() && curves[cIdx]->valueRange(&minCurveValue, &maxCurveValue)) - { - if (minCurveValue < minValue) - { - minValue = minCurveValue; - } - - if (maxCurveValue > maxValue) - { - maxValue = maxCurveValue; - } - } - } - - if (minValue == HUGE_VAL) - { - minValue = RI_LOGPLOTTRACK_MINX_DEFAULT; - maxValue = RI_LOGPLOTTRACK_MAXX_DEFAULT; - } - - m_visibleXRangeMin = minValue; - m_visibleXRangeMax = maxValue; - - computeAndSetXRangeMinForLogarithmicScale(); - - if (m_wellLogTrackPlotWidget) m_wellLogTrackPlotWidget->setXRange(m_visibleXRangeMin, m_visibleXRangeMax); - - updateConnectedEditors(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RimWellLogCurve* RimWellLogTrack::curveDefinitionFromCurve(const QwtPlotCurve* curve) const -{ - for (size_t idx = 0; idx < curves.size(); idx++) - { - if (curves[idx]->qwtPlotCurve() == curve) - { - return curves[idx]; - } - } - - return NULL; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimWellLogTrack::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) -{ - uiOrdering.add(&m_userName); - - caf::PdmUiGroup* gridGroup = uiOrdering.addNewGroup("Visible X Axis Range"); - gridGroup->add(&m_isAutoScaleXEnabled); - gridGroup->add(&m_visibleXRangeMin); - gridGroup->add(&m_visibleXRangeMax); - gridGroup->add(&m_isLogarithmicScaleEnabled); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -size_t RimWellLogTrack::curveIndex(RimWellLogCurve* curve) -{ - return curves.index(curve); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RimWellLogTrack::isVisible() -{ - return m_show; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimWellLogTrack::updateAxisScaleEngine() -{ - if (m_isLogarithmicScaleEnabled) - { - m_wellLogTrackPlotWidget->setAxisScaleEngine(QwtPlot::xTop, new QwtLogScaleEngine); - - // NB! Must assign scale engine to bottom in order to make QwtPlotGrid work - m_wellLogTrackPlotWidget->setAxisScaleEngine(QwtPlot::xBottom, new QwtLogScaleEngine); - } - else - { - m_wellLogTrackPlotWidget->setAxisScaleEngine(QwtPlot::xTop, new QwtLinearScaleEngine); - - // NB! Must assign scale engine to bottom in order to make QwtPlotGrid work - m_wellLogTrackPlotWidget->setAxisScaleEngine(QwtPlot::xBottom, new QwtLinearScaleEngine); - } -} - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimWellLogTrack::computeAndSetXRangeMinForLogarithmicScale() -{ - if (m_isAutoScaleXEnabled && m_isLogarithmicScaleEnabled) - { - double pos = HUGE_VAL; - double neg = -HUGE_VAL; - - for (size_t cIdx = 0; cIdx < curves.size(); cIdx++) - { - if (curves[cIdx]->isCurveVisible() && curves[cIdx]->curveData()) - { - RigStatisticsCalculator::posNegClosestToZero(curves[cIdx]->curveData()->xPlotValues(), pos, neg); - } - } - - if (pos != HUGE_VAL) - { - m_visibleXRangeMin = pos; - } - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimWellLogTrack::setLogarithmicScale(bool enable) -{ - m_isLogarithmicScaleEnabled = enable; - - updateAxisScaleEngine(); - computeAndSetXRangeMinForLogarithmicScale(); -} +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2015- Statoil ASA +// Copyright (C) 2015- Ceetron Solutions 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimWellLogTrack.h" + +#include "RigStatisticsCalculator.h" +#include "RigWellLogCurveData.h" + +#include "RimWellFlowRateCurve.h" +#include "RimWellLogCurve.h" +#include "RimWellLogPlot.h" + +#include "RiuMainWindow.h" +#include "RiuWellLogPlot.h" +#include "RiuWellLogTrack.h" + +#include "cvfAssert.h" +#include "cvfMath.h" + +#include "qwt_scale_engine.h" + +#include + +#define RI_LOGPLOTTRACK_MINX_DEFAULT -10.0 +#define RI_LOGPLOTTRACK_MAXX_DEFAULT 100.0 + + +CAF_PDM_SOURCE_INIT(RimWellLogTrack, "WellLogPlotTrack"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimWellLogTrack::RimWellLogTrack() +{ + CAF_PDM_InitObject("Track", ":/WellLogTrack16x16.png", "", ""); + + CAF_PDM_InitFieldNoDefault(&m_userName, "TrackDescription", "Name", "", "", ""); + m_userName.uiCapability()->setUiReadOnly(true); + + CAF_PDM_InitField(&m_show, "Show", true, "Show track", "", "", ""); + m_show.uiCapability()->setUiHidden(true); + + CAF_PDM_InitFieldNoDefault(&curves, "Curves", "", "", "", ""); + curves.uiCapability()->setUiHidden(true); + + CAF_PDM_InitField(&m_visibleXRangeMin, "VisibleXRangeMin", RI_LOGPLOTTRACK_MINX_DEFAULT, "Min", "", "", ""); + CAF_PDM_InitField(&m_visibleXRangeMax, "VisibleXRangeMax", RI_LOGPLOTTRACK_MAXX_DEFAULT, "Max", "", "", ""); + + CAF_PDM_InitField(&m_isAutoScaleXEnabled, "AutoScaleX", true, "Auto Scale", "", "", ""); + + CAF_PDM_InitField(&m_isLogarithmicScaleEnabled, "LogarithmicScaleX", false, "Logarithmic Scale", "", "", ""); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimWellLogTrack::~RimWellLogTrack() +{ + curves.deleteAllChildObjects(); + + if (m_wellLogTrackPlotWidget) + { + m_wellLogTrackPlotWidget->deleteLater(); + m_wellLogTrackPlotWidget = nullptr; + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogTrack::setDescription(const QString& description) +{ + m_userName = description; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogTrack::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) +{ + if (changedField == &m_show) + { + if (m_wellLogTrackPlotWidget) + { + m_wellLogTrackPlotWidget->setVisible(m_show()); + } + + RimWellLogPlot* wellLogPlot; + this->firstAncestorOrThisOfType(wellLogPlot); + if (wellLogPlot) + { + wellLogPlot->calculateAvailableDepthRange(); + wellLogPlot->updateDepthZoom(); + + RiuWellLogPlot* wellLogPlotViewer = dynamic_cast(wellLogPlot->viewWidget()); + if (wellLogPlotViewer) + { + wellLogPlotViewer->updateChildrenLayout(); + } + } + } + else if (changedField == &m_visibleXRangeMin || changedField == &m_visibleXRangeMax) + { + m_wellLogTrackPlotWidget->setXRange(m_visibleXRangeMin, m_visibleXRangeMax); + m_wellLogTrackPlotWidget->replot(); + m_isAutoScaleXEnabled = false; + } + else if (changedField == &m_isAutoScaleXEnabled) + { + if (m_isAutoScaleXEnabled()) + { + this->updateXZoom(); + computeAndSetXRangeMinForLogarithmicScale(); + + if (m_wellLogTrackPlotWidget) m_wellLogTrackPlotWidget->replot(); + } + } + else if (changedField == &m_isLogarithmicScaleEnabled) + { + updateAxisScaleEngine(); + + this->updateXZoom(); + computeAndSetXRangeMinForLogarithmicScale(); + + m_wellLogTrackPlotWidget->setXRange(m_visibleXRangeMin, m_visibleXRangeMax); + + m_wellLogTrackPlotWidget->replot(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +caf::PdmFieldHandle* RimWellLogTrack::objectToggleField() +{ + return &m_show; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +caf::PdmFieldHandle* RimWellLogTrack::userDescriptionField() +{ + return &m_userName; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogTrack::addCurve(RimWellLogCurve* curve) +{ + curves.push_back(curve); + + if (m_wellLogTrackPlotWidget) + { + curve->setParentQwtPlot(m_wellLogTrackPlotWidget); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogTrack::insertCurve(RimWellLogCurve* curve, size_t index) +{ + curves.insert(index, curve); + // Todo: Mark curve data to use either TVD or MD + + if (m_wellLogTrackPlotWidget) + { + curve->setParentQwtPlot(m_wellLogTrackPlotWidget); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogTrack::removeCurve(RimWellLogCurve* curve) +{ + size_t index = curves.index(curve); + if ( index < curves.size()) + { + curves[index]->detachQwtCurve(); + curves.removeChildObject(curve); + } +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuWellLogTrack* RimWellLogTrack::viewer() +{ + return m_wellLogTrackPlotWidget; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogTrack::availableDepthRange(double* minimumDepth, double* maximumDepth) +{ + double minDepth = HUGE_VAL; + double maxDepth = -HUGE_VAL; + + size_t curveCount = curves.size(); + + for (size_t cIdx = 0; cIdx < curveCount; cIdx++) + { + double minCurveDepth = HUGE_VAL; + double maxCurveDepth = -HUGE_VAL; + + if (curves[cIdx]->isCurveVisible() && curves[cIdx]->depthRange(&minCurveDepth, &maxCurveDepth)) + { + if (minCurveDepth < minDepth) + { + minDepth = minCurveDepth; + } + + if (maxCurveDepth > maxDepth) + { + maxDepth = maxCurveDepth; + } + } + } + + *minimumDepth = minDepth; + *maximumDepth = maxDepth; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogTrack::loadDataAndUpdate() +{ + RimWellLogPlot* wellLogPlot; + firstAncestorOrThisOfType(wellLogPlot); + if (wellLogPlot && m_wellLogTrackPlotWidget) + { + m_wellLogTrackPlotWidget->setDepthTitle(wellLogPlot->depthPlotTitle()); + m_wellLogTrackPlotWidget->setXTitle(m_xAxisTitle); + } + + for (size_t cIdx = 0; cIdx < curves.size(); ++cIdx) + { + curves[cIdx]->loadDataAndUpdate(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogTrack::setXAxisTitle(const QString& text) +{ + m_xAxisTitle = text; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogTrack::recreateViewer() +{ + if (m_wellLogTrackPlotWidget == NULL) + { + m_wellLogTrackPlotWidget = new RiuWellLogTrack(this); + updateAxisScaleEngine(); + + for (size_t cIdx = 0; cIdx < curves.size(); ++cIdx) + { + curves[cIdx]->setParentQwtPlot(this->m_wellLogTrackPlotWidget); + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogTrack::detachAllCurves() +{ + for (size_t cIdx = 0; cIdx < curves.size(); ++cIdx) + { + curves[cIdx]->detachQwtCurve(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogTrack::updateXZoomAndParentPlotDepthZoom() +{ + if (m_wellLogTrackPlotWidget) + { + RimWellLogPlot* wellLogPlot; + firstAncestorOrThisOfType(wellLogPlot); + if (wellLogPlot) + { + wellLogPlot->updateDepthZoom(); + } + + updateXZoom(); + + m_wellLogTrackPlotWidget->replot(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogTrack::updateXZoom() +{ + std::vector stackCurves = visibleStackedCurves(); + for (RimWellFlowRateCurve* stCurve: stackCurves) stCurve->updateStackedPlotData(); + + if (!m_isAutoScaleXEnabled()) + { + m_wellLogTrackPlotWidget->setXRange(m_visibleXRangeMin, m_visibleXRangeMax); + m_wellLogTrackPlotWidget->replot(); + return; + } + + double minValue = HUGE_VAL; + double maxValue = -HUGE_VAL; + + for (size_t cIdx = 0; cIdx < curves.size(); cIdx++) + { + double minCurveValue = HUGE_VAL; + double maxCurveValue = -HUGE_VAL; + + if (curves[cIdx]->isCurveVisible() && curves[cIdx]->valueRange(&minCurveValue, &maxCurveValue)) + { + if (minCurveValue < minValue) + { + minValue = minCurveValue; + } + + if (maxCurveValue > maxValue) + { + maxValue = maxCurveValue; + } + } + } + + if (minValue == HUGE_VAL) + { + minValue = RI_LOGPLOTTRACK_MINX_DEFAULT; + maxValue = RI_LOGPLOTTRACK_MAXX_DEFAULT; + } + + m_visibleXRangeMin = minValue; + m_visibleXRangeMax = maxValue; + + computeAndSetXRangeMinForLogarithmicScale(); + + if (m_wellLogTrackPlotWidget) m_wellLogTrackPlotWidget->setXRange(m_visibleXRangeMin, m_visibleXRangeMax); + + updateConnectedEditors(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimWellLogCurve* RimWellLogTrack::curveDefinitionFromCurve(const QwtPlotCurve* curve) const +{ + for (size_t idx = 0; idx < curves.size(); idx++) + { + if (curves[idx]->qwtPlotCurve() == curve) + { + return curves[idx]; + } + } + + return NULL; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogTrack::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) +{ + uiOrdering.add(&m_userName); + + caf::PdmUiGroup* gridGroup = uiOrdering.addNewGroup("Visible X Axis Range"); + gridGroup->add(&m_isAutoScaleXEnabled); + gridGroup->add(&m_isLogarithmicScaleEnabled); + gridGroup->add(&m_visibleXRangeMin); + gridGroup->add(&m_visibleXRangeMax); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +size_t RimWellLogTrack::curveIndex(RimWellLogCurve* curve) +{ + return curves.index(curve); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimWellLogTrack::isVisible() +{ + return m_show; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogTrack::updateAxisScaleEngine() +{ + if (m_isLogarithmicScaleEnabled) + { + m_wellLogTrackPlotWidget->setAxisScaleEngine(QwtPlot::xTop, new QwtLogScaleEngine); + + // NB! Must assign scale engine to bottom in order to make QwtPlotGrid work + m_wellLogTrackPlotWidget->setAxisScaleEngine(QwtPlot::xBottom, new QwtLogScaleEngine); + } + else + { + m_wellLogTrackPlotWidget->setAxisScaleEngine(QwtPlot::xTop, new QwtLinearScaleEngine); + + // NB! Must assign scale engine to bottom in order to make QwtPlotGrid work + m_wellLogTrackPlotWidget->setAxisScaleEngine(QwtPlot::xBottom, new QwtLinearScaleEngine); + } +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogTrack::computeAndSetXRangeMinForLogarithmicScale() +{ + if (m_isAutoScaleXEnabled && m_isLogarithmicScaleEnabled) + { + double pos = HUGE_VAL; + double neg = -HUGE_VAL; + + for (size_t cIdx = 0; cIdx < curves.size(); cIdx++) + { + if (curves[cIdx]->isCurveVisible() && curves[cIdx]->curveData()) + { + RigStatisticsCalculator::posNegClosestToZero(curves[cIdx]->curveData()->xPlotValues(), pos, neg); + } + } + + if (pos != HUGE_VAL) + { + m_visibleXRangeMin = pos; + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogTrack::setLogarithmicScale(bool enable) +{ + m_isLogarithmicScaleEnabled = enable; + + updateAxisScaleEngine(); + computeAndSetXRangeMinForLogarithmicScale(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimWellLogTrack::visibleStackedCurves() +{ + std::vector stackedCurves; + for (RimWellLogCurve* curve: curves) + { + if (curve && curve->isCurveVisible() ) + { + RimWellFlowRateCurve* wfrCurve = dynamic_cast(curve); + if (wfrCurve) stackedCurves.push_back(wfrCurve); + } + } + + return stackedCurves; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimWellLogTrack::description() +{ + return m_userName; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimWellLogTrack::curvesVector() +{ + std::vector curvesVector; + + for (RimWellLogCurve* curve : curves) + { + curvesVector.push_back(curve); + } + + return curvesVector; +} + diff --git a/ApplicationCode/ProjectDataModel/RimWellLogTrack.h b/ApplicationCode/ProjectDataModel/RimWellLogTrack.h index fb23a715ea..dbcfc96321 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogTrack.h +++ b/ApplicationCode/ProjectDataModel/RimWellLogTrack.h @@ -29,6 +29,7 @@ class RimWellLogCurve; class RiuWellLogTrack; +class RimWellFlowRateCurve; class QwtPlotCurve; @@ -50,6 +51,7 @@ class RimWellLogTrack : public caf::PdmObject void removeCurve(RimWellLogCurve* curve); size_t curveIndex(RimWellLogCurve* curve); size_t curveCount() { return curves.size(); } + void setXAxisTitle(const QString& text); void recreateViewer(); void detachAllCurves(); @@ -66,6 +68,12 @@ class RimWellLogTrack : public caf::PdmObject void setLogarithmicScale(bool enable); + std::vector visibleStackedCurves(); + + QString description(); + std::vector curvesVector(); + + protected: // Overridden PDM methods virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue); @@ -80,6 +88,10 @@ class RimWellLogTrack : public caf::PdmObject void updateAxisScaleEngine(); private: + QString m_xAxisTitle; + + // Fields + caf::PdmField m_show; caf::PdmField m_userName; caf::PdmChildArrayField curves; diff --git a/ApplicationCode/ProjectDataModel/RimWellPath.cpp b/ApplicationCode/ProjectDataModel/RimWellPath.cpp index 2612ef6004..f55b9af141 100644 --- a/ApplicationCode/ProjectDataModel/RimWellPath.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellPath.cpp @@ -21,20 +21,27 @@ #include "RimWellPath.h" #include "RifJsonEncodeDecode.h" + +#include "RigWellPath.h" + +#include "RimMainPlotCollection.h" +#include "RimProject.h" #include "RimProject.h" #include "RimTools.h" #include "RimWellLogFile.h" -#include "RimProject.h" -#include "RimMainPlotCollection.h" #include "RimWellLogPlotCollection.h" -#include "RivWellPathPartMgr.h" +#include "RimWellPathCollection.h" #include "RiuMainWindow.h" +#include "RivWellPathPartMgr.h" + +#include "cafUtils.h" + +#include #include #include #include -#include CAF_PDM_SOURCE_INIT(RimWellPath, "WellPath"); @@ -147,6 +154,14 @@ void RimWellPath::setSurveyType(QString surveyType) wellPathColor = cvf::Color3f(0.0f, 0.333f, 0.999f); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigWellPath* RimWellPath::wellPathGeometry() +{ + return m_wellPath.p(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -189,7 +204,7 @@ bool RimWellPath::readWellPathFile(QString* errorMessage, RifWellPathAsciiFileRe { QFileInfo fileInf(filepath()); - if (fileInf.isFile() && fileInf.exists()) + if (caf::Utils::fileExists(filepath())) { if (fileInf.suffix().compare("json") == 0) { @@ -210,6 +225,14 @@ bool RimWellPath::readWellPathFile(QString* errorMessage, RifWellPathAsciiFileRe } } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellPath::setWellPathGeometry(RigWellPath* wellPathModel) +{ + m_wellPath = wellPathModel; +} + //-------------------------------------------------------------------------------------------------- /// Read JSON file containing well path data //-------------------------------------------------------------------------------------------------- @@ -389,7 +412,7 @@ void RimWellPath::updateFilePathsFromProjectPath(const QString& newProjectPath, { QString newCacheFileName = getCacheFileName(); - if (QFile::exists(newCacheFileName)) + if (caf::Utils::fileExists(newCacheFileName)) { filepath = newCacheFileName; } diff --git a/ApplicationCode/ProjectDataModel/RimWellPath.h b/ApplicationCode/ProjectDataModel/RimWellPath.h index 7483b658e5..253ffaeaab 100644 --- a/ApplicationCode/ProjectDataModel/RimWellPath.h +++ b/ApplicationCode/ProjectDataModel/RimWellPath.h @@ -20,9 +20,6 @@ #pragma once -#include "RigWellPath.h" -#include "RimWellPathCollection.h" - #include "cafPdmField.h" #include "cafPdmObject.h" #include "cafPdmPointer.h" @@ -32,10 +29,13 @@ // Include to make Pdm work for cvf::Color #include "cafPdmFieldCvfColor.h" +#include "cvfObject.h" +class RifWellPathAsciiFileReader; +class RigWellPath; class RimProject; -class RivWellPathPartMgr; class RimWellLogFile; +class RivWellPathPartMgr; //================================================================================================== /// @@ -69,7 +69,7 @@ class RimWellPath : public caf::PdmObject caf::PdmChildField m_wellLogFile; - RigWellPath* wellPathGeometry() { return m_wellPath.p(); } + RigWellPath* wellPathGeometry(); RivWellPathPartMgr* partMgr(); bool readWellPathFile(QString * errorMessage, RifWellPathAsciiFileReader* asciiReader); @@ -79,7 +79,7 @@ class RimWellPath : public caf::PdmObject private: - void setWellPathGeometry(RigWellPath* wellPathModel) { m_wellPath = wellPathModel; } + void setWellPathGeometry(RigWellPath* wellPathModel); void readJsonWellPathFile(); void readAsciiWellPathFile(RifWellPathAsciiFileReader* asciiReader); QString surveyType() { return m_surveyType; } diff --git a/ApplicationCode/ProjectDataModel/RimWellPathCollection.cpp b/ApplicationCode/ProjectDataModel/RimWellPathCollection.cpp index 5d77b67e80..2b3d3082e4 100644 --- a/ApplicationCode/ProjectDataModel/RimWellPathCollection.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellPathCollection.cpp @@ -22,13 +22,17 @@ #include "RiaApplication.h" #include "RiaPreferences.h" + +#include "RigWellPath.h" + #include "RimProject.h" -#include "RimWellPath.h" #include "RimWellLogFile.h" -#include "RivWellPathCollectionPartMgr.h" +#include "RimWellPath.h" #include "RiuMainWindow.h" +#include "RivWellPathCollectionPartMgr.h" + #include "cafPdmUiEditorHandle.h" #include "cafProgressInfo.h" diff --git a/ApplicationCode/ProjectDataModel/Summary/RimFileSummaryCase.cpp b/ApplicationCode/ProjectDataModel/Summary/RimFileSummaryCase.cpp index 5d80f255c0..101d485c0c 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimFileSummaryCase.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimFileSummaryCase.cpp @@ -17,6 +17,8 @@ ///////////////////////////////////////////////////////////////////////////////// #include "RimFileSummaryCase.h" +#include "RimTools.h" + #include "QFileInfo" @@ -32,8 +34,7 @@ CAF_PDM_SOURCE_INIT(RimFileSummaryCase,"FileSummaryCase"); //-------------------------------------------------------------------------------------------------- RimFileSummaryCase::RimFileSummaryCase() { - CAF_PDM_InitFieldNoDefault(&m_summaryHeaderFilename, "SummaryHeaderFilename", "Summary Header File", "", "", ""); - m_summaryHeaderFilename.uiCapability()->setUiReadOnly(true); + } //-------------------------------------------------------------------------------------------------- @@ -66,9 +67,17 @@ QString RimFileSummaryCase::summaryHeaderFilename() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString RimFileSummaryCase::caseName() const +QString RimFileSummaryCase::caseName() { QFileInfo caseFileName(this->summaryHeaderFilename()); return caseFileName.completeBaseName(); } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimFileSummaryCase::updateFilePathsFromProjectPath(const QString & newProjectPath, const QString & oldProjectPath) +{ + m_summaryHeaderFilename = RimTools::relocateFile(m_summaryHeaderFilename(), newProjectPath, oldProjectPath, nullptr, nullptr); +} diff --git a/ApplicationCode/ProjectDataModel/Summary/RimFileSummaryCase.h b/ApplicationCode/ProjectDataModel/Summary/RimFileSummaryCase.h index 7340af129a..64df13c198 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimFileSummaryCase.h +++ b/ApplicationCode/ProjectDataModel/Summary/RimFileSummaryCase.h @@ -34,10 +34,10 @@ class RimFileSummaryCase: public RimSummaryCase void setSummaryHeaderFilename(const QString& fileName); virtual QString summaryHeaderFilename() const override; - virtual QString caseName() const override; + virtual QString caseName() override; + virtual void updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath) override; private: - caf::PdmField m_summaryHeaderFilename; }; diff --git a/ApplicationCode/ProjectDataModel/Summary/RimGridSummaryCase.cpp b/ApplicationCode/ProjectDataModel/Summary/RimGridSummaryCase.cpp index 7db50f87be..e0ed20797a 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimGridSummaryCase.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimGridSummaryCase.cpp @@ -20,6 +20,7 @@ #include "RigSummaryCaseData.h" #include "RimEclipseCase.h" +#include "RimProject.h" #include @@ -37,15 +38,17 @@ CAF_PDM_SOURCE_INIT(RimGridSummaryCase,"GridSummaryCase"); //-------------------------------------------------------------------------------------------------- RimGridSummaryCase::RimGridSummaryCase() { - CAF_PDM_InitFieldNoDefault(&m_eclipseCase, "Associated3DCase", "Main View", "", "", ""); + CAF_PDM_InitFieldNoDefault(&m_eclipseCase, "Associated3DCase", "Eclipse Case", "", "", ""); + m_eclipseCase.uiCapability()->setUiHidden(true); + + CAF_PDM_InitFieldNoDefault(&m_cachedCaseName, "CachedCasename", "Case Name", "", "", ""); + m_cachedCaseName.uiCapability()->setUiHidden(true); CAF_PDM_InitFieldNoDefault(&m_eclipseGridFileName, "Associated3DCaseGridFileName", "Grid File Name", "", "", ""); m_eclipseGridFileName.registerGetMethod(this, &RimGridSummaryCase::eclipseGridFileName); m_eclipseGridFileName.uiCapability()->setUiReadOnly(true); + m_eclipseGridFileName.xmlCapability()->setIOWritable(false); - CAF_PDM_InitFieldNoDefault(&m_eclipseSummaryFileName, "SummaryFileName", "Summary File Name", "", "", ""); - m_eclipseSummaryFileName.registerGetMethod(this, &RimGridSummaryCase::summaryHeaderFilename); - m_eclipseSummaryFileName.uiCapability()->setUiReadOnly(true); } //-------------------------------------------------------------------------------------------------- @@ -56,12 +59,33 @@ RimGridSummaryCase::~RimGridSummaryCase() } +QString summaryHeaderFilenameFromEclipseCase(RimEclipseCase* eclCase) +{ + if (!eclCase) return QString(); + + QFileInfo gridFileInfo(eclCase->gridFileName()); + + QString possibleSumHeaderFileName = gridFileInfo.path() +"/"+ gridFileInfo.completeBaseName() + ".SMSPEC"; + + return possibleSumHeaderFileName; +} + +QString caseNameFromEclipseCase(RimEclipseCase* eclCase) +{ + if (!eclCase) return QString(); + + return eclCase->caseUserDescription(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void RimGridSummaryCase::setAssociatedEclipseCase(RimEclipseCase* eclipseCase) { m_eclipseCase = eclipseCase; + m_summaryHeaderFilename = summaryHeaderFilenameFromEclipseCase(eclipseCase); + m_cachedCaseName = caseNameFromEclipseCase(eclipseCase); + this->updateAutoShortName(); this->updateTreeItemName(); } @@ -71,6 +95,32 @@ void RimGridSummaryCase::setAssociatedEclipseCase(RimEclipseCase* eclipseCase) //-------------------------------------------------------------------------------------------------- RimEclipseCase* RimGridSummaryCase::associatedEclipseCase() { + if (!m_eclipseCase()) + { + // Find a possible associated eclipse case + + RimProject* project; + firstAncestorOrThisOfTypeAsserted(project); + std::vector allCases; + project->allCases(allCases); + for ( RimCase* someCase: allCases ) + { + auto eclCase = dynamic_cast(someCase); + if ( eclCase ) + { + QString sumHeaderFileName = summaryHeaderFilenameFromEclipseCase(eclCase); + if ( sumHeaderFileName == m_summaryHeaderFilename ) + { + m_eclipseCase = eclCase; + this->updateAutoShortName(); + this->updateTreeItemName(); + + break; + } + } + } + } + return m_eclipseCase(); } @@ -79,24 +129,19 @@ RimEclipseCase* RimGridSummaryCase::associatedEclipseCase() //-------------------------------------------------------------------------------------------------- QString RimGridSummaryCase::summaryHeaderFilename() const { - if (!m_eclipseCase()) return QString(); + if (!m_eclipseCase()) return m_summaryHeaderFilename(); - QFileInfo gridFileInfo(m_eclipseCase()->gridFileName()); - - QString possibleSumHeaderFileName = gridFileInfo.path() +"/"+ gridFileInfo.completeBaseName() + ".SMSPEC"; - - return possibleSumHeaderFileName; + return summaryHeaderFilenameFromEclipseCase(m_eclipseCase()); } - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString RimGridSummaryCase::caseName() const +QString RimGridSummaryCase::caseName() { - if (!m_eclipseCase()) return QString(); + if (m_eclipseCase()) m_cachedCaseName = caseNameFromEclipseCase(m_eclipseCase()); - return m_eclipseCase()->caseUserDescription(); + return m_cachedCaseName; } //-------------------------------------------------------------------------------------------------- @@ -109,3 +154,11 @@ QString RimGridSummaryCase::eclipseGridFileName() const return m_eclipseCase()->gridFileName(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimGridSummaryCase::updateFilePathsFromProjectPath(const QString & newProjectPath, const QString & oldProjectPath) +{ + // Shouldn't have to do anything +} + diff --git a/ApplicationCode/ProjectDataModel/Summary/RimGridSummaryCase.h b/ApplicationCode/ProjectDataModel/Summary/RimGridSummaryCase.h index 1f51facd9d..368b233333 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimGridSummaryCase.h +++ b/ApplicationCode/ProjectDataModel/Summary/RimGridSummaryCase.h @@ -40,15 +40,17 @@ class RimGridSummaryCase: public RimSummaryCase RimEclipseCase* associatedEclipseCase(); virtual QString summaryHeaderFilename() const override; - virtual QString caseName() const override; + virtual QString caseName() override; + virtual void updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath) override; private: QString eclipseGridFileName() const; private: caf::PdmPtrField m_eclipseCase; + mutable caf::PdmField m_cachedCaseName; caf::PdmProxyValueField m_eclipseGridFileName; - caf::PdmProxyValueField m_eclipseSummaryFileName; + //caf::PdmProxyValueField m_eclipseSummaryFileName; }; diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCase.cpp b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCase.cpp index da8d4fccd3..213ae2930d 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCase.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCase.cpp @@ -38,6 +38,9 @@ RimSummaryCase::RimSummaryCase() CAF_PDM_InitField(&m_shortName, "ShortName", QString("Display Name"), "Display Name", "", "", ""); CAF_PDM_InitField(&m_useAutoShortName, "AutoShortyName", false, "Use Auto Display Name", "", "", ""); + + CAF_PDM_InitFieldNoDefault(&m_summaryHeaderFilename, "SummaryHeaderFilename", "Summary Header File", "", "", ""); + m_summaryHeaderFilename.uiCapability()->setUiReadOnly(true); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCase.h b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCase.h index 1f1a1b0dce..009004f6d4 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCase.h +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCase.h @@ -39,7 +39,7 @@ class RimSummaryCase : public caf::PdmObject virtual ~RimSummaryCase(); virtual QString summaryHeaderFilename() const = 0; - virtual QString caseName() const = 0; + virtual QString caseName() = 0; QString shortName() const; void updateAutoShortName(); @@ -48,11 +48,14 @@ class RimSummaryCase : public caf::PdmObject void loadCase(); RigSummaryCaseData* caseData(); + virtual void updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath) = 0; + protected: void updateTreeItemName(); caf::PdmField m_shortName; caf::PdmField m_useAutoShortName; + caf::PdmField m_summaryHeaderFilename; cvf::ref m_summaryCaseData; diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCaseCollection.cpp b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCaseCollection.cpp index cbc4ffff3f..b9eba91efd 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCaseCollection.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCaseCollection.cpp @@ -264,3 +264,14 @@ QString RimSummaryCaseCollection::uniqueShortNameForCase(RimSummaryCase* summary return shortName; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSummaryCaseCollection::updateFilePathsFromProjectPath(const QString & newProjectPath, const QString & oldProjectPath) +{ + for (auto summaryCase : m_cases) + { + summaryCase->updateFilePathsFromProjectPath(newProjectPath, oldProjectPath); + } +} + diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCaseCollection.h b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCaseCollection.h index 5eaaa731a1..14db31be05 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCaseCollection.h +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCaseCollection.h @@ -47,6 +47,8 @@ class RimSummaryCaseCollection : public caf::PdmObject QString uniqueShortNameForCase(RimSummaryCase* summaryCase); + void updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath); + private: private: diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurve.cpp b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurve.cpp index c964234cc7..ab60c6bbc7 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurve.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurve.cpp @@ -32,6 +32,7 @@ #include "RimSummaryCurveFilter.h" #include "RimSummaryFilter.h" #include "RimSummaryPlot.h" +#include "RimSummaryTimeAxisProperties.h" #include "RiuLineSegmentQwtPlotCurve.h" #include "RiuSummaryQwtPlot.h" @@ -41,7 +42,6 @@ #include "cafPdmUiTreeOrdering.h" #include "qwt_date.h" -#include "RimSummaryTimeAxisProperties.h" CAF_PDM_SOURCE_INIT(RimSummaryAddress, "SummaryAddress"); @@ -156,8 +156,7 @@ RimSummaryCurve::RimSummaryCurve() m_summaryFilter.uiCapability()->setUiTreeChildrenHidden(true); m_summaryFilter.uiCapability()->setUiHidden(true); - m_summaryFilterObject = std::unique_ptr(new RimSummaryFilter); - m_summaryFilter = m_summaryFilterObject.get(); + m_summaryFilter = new RimSummaryFilter; CAF_PDM_InitFieldNoDefault(&m_uiFilterResultSelection, "FilterResultSelection", "Filter Result", "", "", ""); m_uiFilterResultSelection.xmlCapability()->setIOWritable(false); @@ -170,8 +169,7 @@ RimSummaryCurve::RimSummaryCurve() m_curveVariable.uiCapability()->setUiHidden(true); m_curveVariable.uiCapability()->setUiTreeChildrenHidden(true); - m_curveVariableObject = std::unique_ptr(new RimSummaryAddress); - m_curveVariable = m_curveVariableObject.get(); + m_curveVariable = new RimSummaryAddress; CAF_PDM_InitFieldNoDefault(&m_plotAxis, "PlotAxis", "Axis", "", "", ""); @@ -179,12 +177,10 @@ RimSummaryCurve::RimSummaryCurve() m_curveNameConfig.uiCapability()->setUiHidden(true); m_curveNameConfig.uiCapability()->setUiTreeChildrenHidden(true); - m_curveNameConfigObject = std::unique_ptr(new RimSummaryCurveAutoName); - m_curveNameConfig = m_curveNameConfigObject.get(); + m_curveNameConfig = new RimSummaryCurveAutoName; m_symbolSkipPixelDistance = 10.0f; m_curveThickness = 2; - updateOptionSensitivity(); } //-------------------------------------------------------------------------------------------------- @@ -210,14 +206,6 @@ RimSummaryCase* RimSummaryCurve::summaryCase() return m_summaryCase(); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimSummaryCurve::setVariable(QString varName) -{ - m_curveVariable->setAddress(RifEclipseSummaryAddress::fieldVarAddress(varName.toStdString())); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -232,6 +220,8 @@ RifEclipseSummaryAddress RimSummaryCurve::summaryAddress() void RimSummaryCurve::setSummaryAddress(const RifEclipseSummaryAddress& address) { m_curveVariable->setAddress(address); + + m_summaryFilter->updateFromAddress(address); } //-------------------------------------------------------------------------------------------------- @@ -295,8 +285,8 @@ RimDefines::PlotAxis RimSummaryCurve::yAxis() const //-------------------------------------------------------------------------------------------------- QList RimSummaryCurve::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) { - QList optionList = this->RimPlotCurve::calculateValueOptions(fieldNeedingOptions,useOptionsOnly); - if (!optionList.isEmpty()) return optionList; + QList options = this->RimPlotCurve::calculateValueOptions(fieldNeedingOptions,useOptionsOnly); + if (!options.isEmpty()) return options; if (fieldNeedingOptions == &m_summaryCase) @@ -306,16 +296,14 @@ QList RimSummaryCurve::calculateValueOptions(const caf:: proj->allSummaryCases(cases); - for (size_t i = 0; i < cases.size(); i++) + for (RimSummaryCase* rimCase : cases) { - RimSummaryCase* rimCase = cases[i]; - - optionList.push_back(caf::PdmOptionItemInfo(rimCase->caseName(), QVariant::fromValue(caf::PdmPointer(rimCase)))); + options.push_back(caf::PdmOptionItemInfo(rimCase->caseName(), rimCase)); } - if (optionList.size() > 0) + if (options.size() > 0) { - optionList.push_front(caf::PdmOptionItemInfo("None", QVariant::fromValue(caf::PdmPointer(NULL)))); + options.push_front(caf::PdmOptionItemInfo("None", nullptr)); } } else if(fieldNeedingOptions == &m_uiFilterResultSelection) @@ -339,16 +327,16 @@ QList RimSummaryCurve::calculateValueOptions(const caf:: { std::string name = addrIntPair.first.uiText(); QString s = QString::fromStdString(name); - optionList.push_back(caf::PdmOptionItemInfo(s, addrIntPair.second)); + options.push_back(caf::PdmOptionItemInfo(s, addrIntPair.second)); } } - optionList.push_front(caf::PdmOptionItemInfo(RimDefines::undefinedResultName(), addressCount)); + options.push_front(caf::PdmOptionItemInfo(RimDefines::undefinedResultName(), addressCount)); if(useOptionsOnly) *useOptionsOnly = true; } } - return optionList; + return options; } @@ -446,33 +434,33 @@ void RimSummaryCurve::onLoadDataAndUpdate() //-------------------------------------------------------------------------------------------------- void RimSummaryCurve::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) { + RimPlotCurve::updateOptionSensitivity(); + caf::PdmUiGroup* curveDataGroup = uiOrdering.addNewGroup("Summary Vector"); curveDataGroup->add(&m_summaryCase); curveDataGroup->add(&m_selectedVariableDisplayField); caf::PdmUiGroup* curveVarSelectionGroup = curveDataGroup->addNewGroup("Vector Selection"); - m_summaryFilter->defineUiOrdering(uiConfigName, *curveVarSelectionGroup); - + curveVarSelectionGroup->setCollapsedByDefault(true); + m_summaryFilter->uiOrdering(uiConfigName, *curveVarSelectionGroup); curveVarSelectionGroup->add(&m_uiFilterResultSelection); + uiOrdering.add(&m_plotAxis); + caf::PdmUiGroup* appearanceGroup = uiOrdering.addNewGroup("Appearance"); - appearanceGroup->add(&m_curveColor); - appearanceGroup->add(&m_curveThickness); - appearanceGroup->add(&m_pointSymbol); - appearanceGroup->add(&m_symbolSkipPixelDistance); - appearanceGroup->add(&m_lineStyle); - appearanceGroup->add(&m_curveName); - appearanceGroup->add(&m_isUsingAutoName); + RimPlotCurve::appearanceUiOrdering(*appearanceGroup); + + caf::PdmUiGroup* nameGroup = uiOrdering.addNewGroup("Curve Name"); + nameGroup->setCollapsedByDefault(true); + nameGroup->add(&m_showLegend); + RimPlotCurve::curveNameUiOrdering(*nameGroup); if (m_isUsingAutoName) { - caf::PdmUiGroup* autoNameGroup = appearanceGroup->addNewGroup("Auto Name Config"); - m_curveNameConfig->defineUiOrdering(uiConfigName, *autoNameGroup); + m_curveNameConfig->uiOrdering(uiConfigName, *nameGroup); } - uiOrdering.add(&m_plotAxis); - - uiOrdering.setForgetRemainingFields(true); // For now. + uiOrdering.skipRemainingFields(); // For now. } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurve.h b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurve.h index ff357156e0..083695114a 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurve.h +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurve.h @@ -31,7 +31,6 @@ #include "cafAppEnum.h" -#include class RifReaderEclipseSummary; class RimSummaryCase; @@ -80,7 +79,6 @@ class RimSummaryCurve : public RimPlotCurve void setSummaryCase(RimSummaryCase* sumCase); RimSummaryCase* summaryCase(); - void setVariable(QString varName); RifEclipseSummaryAddress summaryAddress(); void setSummaryAddress(const RifEclipseSummaryAddress& address); @@ -125,9 +123,4 @@ class RimSummaryCurve : public RimPlotCurve // Filter fields caf::PdmChildField m_summaryFilter; caf::PdmField m_uiFilterResultSelection; - - // Internal objects managed by unique_ptr - std::unique_ptr m_curveVariableObject; - std::unique_ptr m_summaryFilterObject; - std::unique_ptr m_curveNameConfigObject; }; diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurveAppearanceCalculator.cpp b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurveAppearanceCalculator.cpp index b65ff72be7..cd6ce06d03 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurveAppearanceCalculator.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurveAppearanceCalculator.cpp @@ -17,7 +17,12 @@ ///////////////////////////////////////////////////////////////////////////////// #include "RimSummaryCurveAppearanceCalculator.h" + +#include "RiaColorTables.h" + #include "RimSummaryCurve.h" +#include "RimSummaryCase.h" + #include "cvfVector3.h" #include @@ -40,11 +45,14 @@ void caf::AppEnum< RimSummaryCurveAppearanceCalculator::CurveAppearanceType >::s //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimSummaryCurveAppearanceCalculator::RimSummaryCurveAppearanceCalculator(const std::set >& curveDefinitions) +RimSummaryCurveAppearanceCalculator::RimSummaryCurveAppearanceCalculator(const std::set >& curveDefinitions, const std::set allSummaryCaseNames, const std::set allSummaryWellNames) { + m_allSummaryCaseNames = allSummaryCaseNames; + m_allSummaryWellNames = allSummaryWellNames; + for(const std::pair& curveDef : curveDefinitions) { - if(curveDef.first) m_caseToAppearanceIdxMap[curveDef.first] = -1; + if(curveDef.first) m_caseToAppearanceIdxMap[curveDef.first] = -1; if(!curveDef.second.wellName().empty()) m_welToAppearanceIdxMap[curveDef.second.wellName()] = -1; if(!curveDef.second.wellGroupName().empty()) m_grpToAppearanceIdxMap[curveDef.second.wellGroupName()] = -1; if(!(curveDef.second.regionNumber() == -1)) m_regToAppearanceIdxMap[curveDef.second.regionNumber()] = -1; @@ -91,6 +99,7 @@ RimSummaryCurveAppearanceCalculator::RimSummaryCurveAppearanceCalculator(const s unusedAppearTypes.insert(LINE_STYLE); unusedAppearTypes.insert(SYMBOL); unusedAppearTypes.insert(LINE_THICKNESS); + m_currentCurveGradient = 0.0f; m_dimensionCount = 0; if(m_variableCount > 1) { m_varAppearanceType = *(unusedAppearTypes.begin()); unusedAppearTypes.erase(unusedAppearTypes.begin()); m_dimensionCount++; } @@ -101,16 +110,8 @@ RimSummaryCurveAppearanceCalculator::RimSummaryCurveAppearanceCalculator(const s if (m_dimensionCount == 0) m_varAppearanceType = COLOR; // basically one curve - // Assign increasing indexes - { int idx = 0; for(auto& pair : m_caseToAppearanceIdxMap) pair.second = idx++; } - { int idx = 0; for(auto& pair : m_varToAppearanceIdxMap) pair.second = idx++; } - { int idx = 0; for(auto& pair : m_welToAppearanceIdxMap) pair.second = idx++; } - { int idx = 0; for(auto& pair : m_grpToAppearanceIdxMap) pair.second = idx++; } - { int idx = 0; for(auto& pair : m_regToAppearanceIdxMap) pair.second = idx++; } - - for (auto& charMapPair : m_secondCharToVarToAppearanceIdxMap) - { int idx = 0; for(auto& pair : charMapPair.second) pair.second = idx++; } + updateApperanceIndices(); } //-------------------------------------------------------------------------------------------------- @@ -135,6 +136,126 @@ void RimSummaryCurveAppearanceCalculator::assignDimensions( CurveAppearanceType if(m_wellAppearanceType != NONE) ++m_dimensionCount; if(m_groupAppearanceType != NONE) ++m_dimensionCount; if(m_regionAppearanceType != NONE) ++m_dimensionCount; + + updateApperanceIndices(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSummaryCurveAppearanceCalculator::updateApperanceIndices() +{ + { + std::map caseAppearanceIndices = mapNameToAppearanceIndex(m_caseAppearanceType, m_allSummaryCaseNames); + int idx = 0; + for (auto& pair : m_caseToAppearanceIdxMap) + { + pair.second = static_cast(caseAppearanceIndices[pair.first->summaryHeaderFilename().toUtf8().constData()]); + } + } + { + std::map wellAppearanceIndices = mapNameToAppearanceIndex(m_wellAppearanceType, m_allSummaryWellNames); + int idx = 0; + for (auto& pair : m_welToAppearanceIdxMap) + { + pair.second = static_cast(wellAppearanceIndices[pair.first]); + } + } + // Assign increasing indexes + { int idx = 0; for(auto& pair : m_varToAppearanceIdxMap) pair.second = idx++; } + { int idx = 0; for(auto& pair : m_grpToAppearanceIdxMap) pair.second = idx++; } + { int idx = 0; for(auto& pair : m_regToAppearanceIdxMap) pair.second = idx++; } + + for (auto& charMapPair : m_secondCharToVarToAppearanceIdxMap) + { + int idx = 0; + for (auto& pair : charMapPair.second) pair.second = idx++; + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::map RimSummaryCurveAppearanceCalculator::mapNameToAppearanceIndex(CurveAppearanceType& appearance, const std::set& names) +{ + std::map nameToIndex; + size_t numOptions; + if (appearance == CurveAppearanceType::COLOR) + { + numOptions = RiaColorTables::summaryCurveDefaultPaletteColors().size(); + } + else if (appearance == CurveAppearanceType::SYMBOL) + { + numOptions = caf::AppEnum::size(); + } + else if (appearance == CurveAppearanceType::LINE_STYLE) + { + numOptions = caf::AppEnum::size(); + } + else { + // If none of these styles are used, fall back to a simply incrementing index + size_t idx = 0; + for (const std::string& name : names) + { + nameToIndex[name] = idx; + ++idx; + } + return nameToIndex; + } + + std::hash stringHasher; + std::vector< std::set > nameIndices; + for (const std::string& name : names) + { + size_t nameHash = stringHasher(name); + nameHash = nameHash % numOptions; + + size_t index = nameHash; + while (true) + { + while (nameIndices.size() <= index) + { + // Ensure there exists a set at the insertion index + nameIndices.push_back(std::set()); + } + + std::set& matches = nameIndices[index]; + if (matches.empty()) + { + // If there are no matches here, the summary case has not been added. + matches.insert(name); + break; + } + else if (matches.find(name) != matches.end()) + { + // Check to see if the summary case exists at this index. + break; + } + else + { + // Simply increment index to check if the next bucket is available. + index = (index + 1) % numOptions; + if (index == nameHash) + { + // If we've reached `caseHash` again, no other slot was available, so add it here. + matches.insert(name); + break; + } + } + } + } + + size_t index = 0; + for (std::set& nameIndex : nameIndices) + { + for (const std::string& name : nameIndex) + { + nameToIndex[name] = index; + } + index++; + } + + return nameToIndex; } //-------------------------------------------------------------------------------------------------- @@ -253,31 +374,7 @@ cvf::Color3f RimSummaryCurveAppearanceCalculator::cycledPaletteColor(int colorIn { if (colorIndex < 0) return cvf::Color3f::BLACK; - static const int colorCount = 15; - static const cvf::ubyte colorData[][3] = - { - { 0, 112, 136 }, // Dark Green-Blue - { 202, 0, 0 }, // Red - { 78, 204, 0 }, // Clear Green - { 236, 118, 0 }, // Orange - { 0 , 0, 0 }, // Black - { 56, 56, 255 }, // Vivid Blue - { 248, 0, 170 }, // Magenta - { 169, 2, 240 }, // Purple - { 0, 221, 221 }, // Turquoise - { 201, 168, 206 }, // Light Violet - { 0, 205, 68 }, // Bluish Green - { 236, 188, 0 }, // Mid Yellow - { 51, 204, 255 }, // Bluer Turquoise - { 164, 193, 0 }, // Mid Yellowish Green - { 0, 143, 239 }, // Dark Light Blue - }; - - int paletteIdx = colorIndex % colorCount; - - cvf::Color3ub ubColor(colorData[paletteIdx][0], colorData[paletteIdx][1], colorData[paletteIdx][2]); - cvf::Color3f cvfColor(ubColor); - return cvfColor; + return RiaColorTables::summaryCurveDefaultPaletteColors().cycledColor3f(colorIndex); } //-------------------------------------------------------------------------------------------------- @@ -287,23 +384,7 @@ cvf::Color3f RimSummaryCurveAppearanceCalculator::cycledNoneRGBBrColor(int color { if(colorIndex < 0) return cvf::Color3f::BLACK; - static const int colorCount = 7; - static const cvf::ubyte colorData[][3] = - { - { 236, 118, 0 }, // Orange - { 0 , 0, 0 }, // Black - { 248, 0, 170 }, // Magenta - { 236, 188, 0 }, // Mid Yellow - { 169, 2, 240 }, // Purple - { 0, 221, 221 }, // Turquoise - { 201, 168, 206 }, // Light Violet - }; - - int paletteIdx = colorIndex % colorCount; - - cvf::Color3ub ubColor(colorData[paletteIdx][0], colorData[paletteIdx][1], colorData[paletteIdx][2]); - cvf::Color3f cvfColor(ubColor); - return cvfColor; + return RiaColorTables::summaryCurveNoneRedGreenBlueBrownPaletteColors().cycledColor3f(colorIndex); } //-------------------------------------------------------------------------------------------------- @@ -313,19 +394,7 @@ cvf::Color3f RimSummaryCurveAppearanceCalculator::cycledGreenColor(int colorInde { if(colorIndex < 0) return cvf::Color3f::BLACK; - static const int colorCount = 3; - static const cvf::ubyte colorData[][3] = - { - { 78, 204, 0 }, // Clear Green - { 164, 193, 0 }, // Mid Yellowish Green - { 0, 205, 68 } // Bluish Green - }; - - int paletteIdx = colorIndex % colorCount; - - cvf::Color3ub ubColor(colorData[paletteIdx][0], colorData[paletteIdx][1], colorData[paletteIdx][2]); - cvf::Color3f cvfColor(ubColor); - return cvfColor; + return RiaColorTables::summaryCurveGreenPaletteColors().cycledColor3f(colorIndex); } @@ -336,19 +405,7 @@ cvf::Color3f RimSummaryCurveAppearanceCalculator::cycledBlueColor(int colorIndex { if(colorIndex < 0) return cvf::Color3f::BLACK; - static const int colorCount = 3; - static const cvf::ubyte colorData[][3] = - { - { 56, 56, 255 }, // Vivid Blue - { 0, 143, 239 }, // Dark Light Blue - { 153, 153, 255 }, // Off Light Blue - }; - - int paletteIdx = colorIndex % colorCount; - - cvf::Color3ub ubColor(colorData[paletteIdx][0], colorData[paletteIdx][1], colorData[paletteIdx][2]); - cvf::Color3f cvfColor(ubColor); - return cvfColor; + return RiaColorTables::summaryCurveBluePaletteColors().cycledColor3f(colorIndex); } @@ -359,19 +416,7 @@ cvf::Color3f RimSummaryCurveAppearanceCalculator::cycledRedColor(int colorIndex) { if(colorIndex < 0) return cvf::Color3f::BLACK; - static const int colorCount = 3; - static const cvf::ubyte colorData[][3] = - { - { 202, 0, 0 }, // Off Red - { 255, 51, 51}, // Bright Red - { 255, 102, 102 } // Light Red - }; - - int paletteIdx = colorIndex % colorCount; - - cvf::Color3ub ubColor(colorData[paletteIdx][0], colorData[paletteIdx][1], colorData[paletteIdx][2]); - cvf::Color3f cvfColor(ubColor); - return cvfColor; + return RiaColorTables::summaryCurveRedPaletteColors().cycledColor3f(colorIndex); } @@ -382,19 +427,7 @@ cvf::Color3f RimSummaryCurveAppearanceCalculator::cycledBrownColor(int colorInde { if(colorIndex < 0) return cvf::Color3f::BLACK; - static const int colorCount = 3; - static const cvf::ubyte colorData[][3] = - { - {186, 101, 44}, - { 99, 53, 23 }, // Highway Brown - { 103, 56, 24} // Dark Brown - }; - - int paletteIdx = colorIndex % colorCount; - - cvf::Color3ub ubColor(colorData[paletteIdx][0], colorData[paletteIdx][1], colorData[paletteIdx][2]); - cvf::Color3f cvfColor(ubColor); - return cvfColor; + return RiaColorTables::summaryCurveBrownPaletteColors().cycledColor3f(colorIndex); } //-------------------------------------------------------------------------------------------------- @@ -426,7 +459,7 @@ int RimSummaryCurveAppearanceCalculator::cycledLineThickness(int index) static const int thicknesses[] ={ 1, 3, 5 }; if (index < 0) return 1; - return (thicknesses[(index) % 3]); + return (thicknesses[(index) % thicknessCount]); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurveAppearanceCalculator.h b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurveAppearanceCalculator.h index 4c591db5a3..d094221c9b 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurveAppearanceCalculator.h +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurveAppearanceCalculator.h @@ -16,19 +16,22 @@ // ///////////////////////////////////////////////////////////////////////////////// #pragma once + +#include "RimPlotCurve.h" + #include "cvfBase.h" #include "cvfColor3.h" + #include -#include "RifEclipseSummaryAddress.h" -#include "RimPlotCurve.h" class RimSummaryCurve; class RimSummaryCase; +class RifEclipseSummaryAddress; class RimSummaryCurveAppearanceCalculator { public: - RimSummaryCurveAppearanceCalculator(const std::set >& curveDefinitions); + explicit RimSummaryCurveAppearanceCalculator(const std::set >& curveDefinitions, const std::set allSummaryCaseNames, const std::set allSummaryWellNames); enum CurveAppearanceType { NONE, @@ -52,17 +55,18 @@ class RimSummaryCurveAppearanceCalculator void setupCurveLook(RimSummaryCurve* curve); -private: - + static cvf::Color3f cycledPaletteColor(int colorIndex); + static cvf::Color3f cycledNoneRGBBrColor(int colorIndex); + static cvf::Color3f cycledGreenColor(int colorIndex); + static cvf::Color3f cycledBlueColor(int colorIndex); + static cvf::Color3f cycledRedColor(int colorIndex); + static cvf::Color3f cycledBrownColor(int colorIndex); +private: void setOneCurveAppearance(CurveAppearanceType appeaType, size_t totalCount, int appeaIdx, RimSummaryCurve* curve); + void updateApperanceIndices(); + std::map mapNameToAppearanceIndex(CurveAppearanceType & appearance, const std::set& names); - cvf::Color3f cycledPaletteColor(int colorIndex); - cvf::Color3f cycledNoneRGBBrColor(int colorIndex); - cvf::Color3f cycledGreenColor(int colorIndex); - cvf::Color3f cycledBlueColor(int colorIndex); - cvf::Color3f cycledRedColor(int colorIndex); - cvf::Color3f cycledBrownColor(int colorIndex); RimPlotCurve::LineStyleEnum cycledLineStyle(int index); RimPlotCurve::PointSymbolEnum cycledSymbol(int index); @@ -95,6 +99,9 @@ class RimSummaryCurveAppearanceCalculator std::map > m_secondCharToVarToAppearanceIdxMap; + std::set m_allSummaryCaseNames; + std::set m_allSummaryWellNames; + }; diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurveAutoName.cpp b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurveAutoName.cpp index cdccb7c83f..e0dd5be9dc 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurveAutoName.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurveAutoName.cpp @@ -47,10 +47,6 @@ RimSummaryCurveAutoName::RimSummaryCurveAutoName() CAF_PDM_InitField(&m_completion, "Completion", true, "I, J, K", "", "", ""); CAF_PDM_InitField(&m_caseName, "CaseName", true, "Case Name", "", "", ""); - - CAF_PDM_InitField(&m_showAdvancedProperties, "ShowAdvancedProperties", false, "Show Advanced Properties", "", "", ""); - m_showAdvancedProperties.uiCapability()->setUiEditorTypeName(caf::PdmUiPushButtonEditor::uiEditorTypeName()); - m_showAdvancedProperties.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN); } //-------------------------------------------------------------------------------------------------- @@ -208,8 +204,6 @@ void RimSummaryCurveAutoName::applySettings(const RimSummaryCurveAutoName& other m_wellSegmentNumber = other.m_wellSegmentNumber; m_lgrName = other.m_lgrName; m_completion = other.m_completion; - - m_showAdvancedProperties = other.m_showAdvancedProperties; } //-------------------------------------------------------------------------------------------------- @@ -269,37 +263,14 @@ void RimSummaryCurveAutoName::defineUiOrdering(QString uiConfigName, caf::PdmUiO uiOrdering.add(&m_wellGroupName); uiOrdering.add(&m_wellName); - if (m_showAdvancedProperties) - { - uiOrdering.add(&m_regionNumber); - uiOrdering.add(&m_lgrName); - uiOrdering.add(&m_completion); - uiOrdering.add(&m_wellSegmentNumber); - uiOrdering.add(&m_unit); - } - - uiOrdering.add(&m_showAdvancedProperties); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimSummaryCurveAutoName::defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute * attribute) -{ - if (&m_showAdvancedProperties == field) - { - caf::PdmUiPushButtonEditorAttribute* attrib = dynamic_cast (attribute); - if (attrib) - { - if (m_showAdvancedProperties) - { - attrib->m_buttonText = "Hide Advanced Options"; - } - else - { - attrib->m_buttonText = "Show Advanced Options"; - } - } - } + caf::PdmUiGroup& advanced = *(uiOrdering.addNewGroup("Advanced")); + advanced.setCollapsedByDefault(true); + advanced.add(&m_regionNumber); + advanced.add(&m_lgrName); + advanced.add(&m_completion); + advanced.add(&m_wellSegmentNumber); + advanced.add(&m_unit); + + uiOrdering.skipRemainingFields(); } diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurveAutoName.h b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurveAutoName.h index 5dc0043157..5cc98c1878 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurveAutoName.h +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurveAutoName.h @@ -42,7 +42,6 @@ class RimSummaryCurveAutoName : public caf::PdmObject friend class RimSummaryCurveFilter; virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override; - virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute * attribute); private: void appendWellName(std::string& text, const RifEclipseSummaryAddress& summaryAddress) const; diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurveFilter.cpp b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurveFilter.cpp index acb5f9a86a..1af3b1f1ab 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurveFilter.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurveFilter.cpp @@ -72,14 +72,13 @@ RimSummaryCurveFilter::RimSummaryCurveFilter() m_selectedSummaryCases.uiCapability()->setAutoAddingOptionFromValue(false); m_selectedSummaryCases.xmlCapability()->setIOWritable(false); m_selectedSummaryCases.xmlCapability()->setIOReadable(false); - m_selectedSummaryCases.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::TOP); + m_selectedSummaryCases.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN); CAF_PDM_InitFieldNoDefault(&m_summaryFilter, "VarListFilter", "Filter", "", "", ""); m_summaryFilter.uiCapability()->setUiTreeChildrenHidden(true); m_summaryFilter.uiCapability()->setUiHidden(true); - m_summaryFilterObject = std::unique_ptr(new RimSummaryFilter); - m_summaryFilter = m_summaryFilterObject.get(); + m_summaryFilter = new RimSummaryFilter; CAF_PDM_InitFieldNoDefault(&m_uiFilterResultMultiSelection, "FilterResultSelection", "Filter Result", "", "Ctrl-A : Select All", ""); m_uiFilterResultMultiSelection.xmlCapability()->setIOWritable(false); @@ -92,14 +91,14 @@ RimSummaryCurveFilter::RimSummaryCurveFilter() m_curves.uiCapability()->setUiHidden(true); m_curves.uiCapability()->setUiTreeChildrenHidden(false); - CAF_PDM_InitFieldNoDefault(&m_applyButtonField, "ApplySelection", "Apply", "", "", ""); + CAF_PDM_InitFieldNoDefault(&m_applyButtonField, "ApplySelection", "", "", "", ""); m_applyButtonField.xmlCapability()->setIOWritable(false); m_applyButtonField.xmlCapability()->setIOReadable(false); m_applyButtonField = false; m_applyButtonField.uiCapability()->setUiEditorTypeName(caf::PdmUiPushButtonEditor::uiEditorTypeName()); - m_applyButtonField.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN); + m_applyButtonField.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::LEFT); - CAF_PDM_InitField(&m_autoApplyChangesToPlot, "AutoApplyFilterChanges", false, "Auto Apply Changes", "", "", ""); + CAF_PDM_InitField(&m_autoApplyChangesToPlot, "AutoApplyFilterChanges", true, "Auto Apply Changes", "", "", ""); CAF_PDM_InitField(&m_showCurves, "IsActive", true, "Show Curves", "", "", ""); m_showCurves.uiCapability()->setUiHidden(true); @@ -113,13 +112,13 @@ RimSummaryCurveFilter::RimSummaryCurveFilter() CAF_PDM_InitFieldNoDefault(&m_regionAppearanceType, "RegionAppearanceType", "Region", "", "", ""); CAF_PDM_InitFieldNoDefault(&m_plotAxis, "PlotAxis", "Axis", "", "", ""); + CAF_PDM_InitField(&m_showLegend, "ShowLegend", true, "Contribute To Legend", "", "", ""); CAF_PDM_InitFieldNoDefault(&m_curveNameConfig, "SummaryCurveNameConfig", "SummaryCurveNameConfig", "", "", ""); m_curveNameConfig.uiCapability()->setUiHidden(true); m_curveNameConfig.uiCapability()->setUiTreeChildrenHidden(true); - m_curveNameConfigObject = std::unique_ptr(new RimSummaryCurveAutoName); - m_curveNameConfig = m_curveNameConfigObject.get(); + m_curveNameConfig = new RimSummaryCurveAutoName; } //-------------------------------------------------------------------------------------------------- @@ -155,7 +154,7 @@ void RimSummaryCurveFilter::createCurves(RimSummaryCase* summaryCase, const QStr //-------------------------------------------------------------------------------------------------- QList RimSummaryCurveFilter::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) { - QList optionList; + QList options; if (fieldNeedingOptions == &m_selectedSummaryCases) { @@ -164,11 +163,9 @@ QList RimSummaryCurveFilter::calculateValueOptions(const proj->allSummaryCases(cases); - for (size_t i = 0; i < cases.size(); i++) + for (RimSummaryCase* rimCase : cases) { - RimSummaryCase* rimCase = cases[i]; - - optionList.push_back(caf::PdmOptionItemInfo(rimCase->caseName(), QVariant::fromValue(caf::PdmPointer(rimCase)))); + options.push_back(caf::PdmOptionItemInfo(rimCase->caseName(), rimCase)); } } else if(fieldNeedingOptions == &m_uiFilterResultMultiSelection) @@ -179,13 +176,13 @@ QList RimSummaryCurveFilter::calculateValueOptions(const { std::string name = address.uiText(); QString s = QString::fromStdString(name); - optionList.push_back(caf::PdmOptionItemInfo(s, QVariant::fromValue(address))); + options.push_back(caf::PdmOptionItemInfo(s, QVariant::fromValue(address))); } } if(useOptionsOnly) *useOptionsOnly = true; - return optionList; + return options; } //-------------------------------------------------------------------------------------------------- @@ -193,27 +190,24 @@ QList RimSummaryCurveFilter::calculateValueOptions(const //-------------------------------------------------------------------------------------------------- void RimSummaryCurveFilter::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) { - caf::PdmUiGroup* curveDataGroup = uiOrdering.addNewGroup("Summary Vectors"); + caf::PdmUiGroup* curveDataGroup = uiOrdering.addNewGroup("Cases"); curveDataGroup->add(&m_selectedSummaryCases); - caf::PdmUiGroup* curveVarSelectionGroup = curveDataGroup->addNewGroup("Vector Selection"); - - m_summaryFilter->defineUiOrdering(uiConfigName, *curveVarSelectionGroup); - + caf::PdmUiGroup* curveVarSelectionGroup = uiOrdering.addNewGroup("Vector Selection"); + m_summaryFilter->uiOrdering(uiConfigName, *curveVarSelectionGroup); curveVarSelectionGroup->add(&m_uiFilterResultMultiSelection); - caf::PdmUiGroup* appearanceGroup = uiOrdering.addNewGroup("Appearance settings"); - appearanceGroup->add(&m_useAutoAppearanceAssignment); - if(!m_useAutoAppearanceAssignment()) - { - appearanceGroup->add(&m_caseAppearanceType); - appearanceGroup->add(&m_variableAppearanceType); - appearanceGroup->add(&m_wellAppearanceType); - appearanceGroup->add(&m_groupAppearanceType); - appearanceGroup->add(&m_regionAppearanceType); - } + uiOrdering.add(&m_plotAxis); - // Set sensitivity + caf::PdmUiGroup* appearanceGroup = uiOrdering.addNewGroup("Appearance Settings"); + appearanceGroup->setCollapsedByDefault(true); + appearanceGroup->add(&m_useAutoAppearanceAssignment); + appearanceGroup->add(&m_caseAppearanceType); + appearanceGroup->add(&m_variableAppearanceType); + appearanceGroup->add(&m_wellAppearanceType); + appearanceGroup->add(&m_groupAppearanceType); + appearanceGroup->add(&m_regionAppearanceType); + // Appearance option sensitivity { m_caseAppearanceType.uiCapability()->setUiReadOnly(m_useAutoAppearanceAssignment); m_variableAppearanceType.uiCapability()->setUiReadOnly(m_useAutoAppearanceAssignment); @@ -223,13 +217,15 @@ void RimSummaryCurveFilter::defineUiOrdering(QString uiConfigName, caf::PdmUiOrd } caf::PdmUiGroup* autoNameGroup = uiOrdering.addNewGroup("Curve Name Configuration"); - m_curveNameConfig->defineUiOrdering(uiConfigName, *autoNameGroup); + autoNameGroup->setCollapsedByDefault(true); + autoNameGroup->add(&m_showLegend); + m_curveNameConfig->uiOrdering(uiConfigName, *autoNameGroup); - uiOrdering.add(&m_plotAxis); uiOrdering.add(&m_autoApplyChangesToPlot); uiOrdering.add(&m_applyButtonField); + m_applyButtonField.uiCapability()->setUiReadOnly(m_autoApplyChangesToPlot()); - uiOrdering.setForgetRemainingFields(true); + uiOrdering.skipRemainingFields(true); } //-------------------------------------------------------------------------------------------------- @@ -277,6 +273,13 @@ void RimSummaryCurveFilter::fieldChangedByUi(const caf::PdmFieldHandle* changedF plotNeedsRedraw = true; } + else if (changedField == &m_showLegend) + { + for (auto curve : m_curves) + { + curve->showLegend(m_showLegend()); + } + } else { plotNeedsRedraw = true; @@ -420,7 +423,10 @@ void RimSummaryCurveFilter::defineEditorAttribute(const caf::PdmFieldHandle* fie if(&m_applyButtonField == field) { caf::PdmUiPushButtonEditorAttribute* attrib = dynamic_cast (attribute); - attrib->m_buttonText = "Apply"; + if (attrib) + { + attrib->m_buttonText = "Apply"; + } } } @@ -437,7 +443,10 @@ void RimSummaryCurveFilter::updatePlotAxisForCurves() RimSummaryPlot* plot = nullptr; firstAncestorOrThisOfType(plot); - plot->updateAxes(); + if (plot) + { + plot->updateAxes(); + } } //-------------------------------------------------------------------------------------------------- @@ -512,12 +521,9 @@ void RimSummaryCurveFilter::createSetOfCasesAndResultAdresses( //-------------------------------------------------------------------------------------------------- void RimSummaryCurveFilter::createCurvesFromCurveDefinitions(const std::set >& curveDefinitions) { - int colorIndex = 2; - int lineStyleIdx = -1; - RimSummaryCase* prevCase = nullptr; RimPlotCurve::LineStyleEnum lineStyle = RimPlotCurve::STYLE_SOLID; - RimSummaryCurveAppearanceCalculator curveLookCalc(curveDefinitions); + RimSummaryCurveAppearanceCalculator curveLookCalc(curveDefinitions, getAllSummaryCaseNames(), getAllSummaryWellNames()); if (!m_useAutoAppearanceAssignment()) { @@ -662,3 +668,57 @@ std::set RimSummaryCurveFilter::findPossibleSummaryAdd return addrUnion; } + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::set RimSummaryCurveFilter::getAllSummaryCaseNames() +{ + std::set summaryCaseHashes; + RimProject* proj = RiaApplication::instance()->project(); + std::vector cases; + + proj->allSummaryCases(cases); + + for (RimSummaryCase* rimCase : cases) + { + summaryCaseHashes.insert(rimCase->summaryHeaderFilename().toUtf8().constData()); + } + + return summaryCaseHashes; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::set RimSummaryCurveFilter::getAllSummaryWellNames() +{ + std::set summaryWellNames; + RimProject* proj = RiaApplication::instance()->project(); + std::vector cases; + + proj->allSummaryCases(cases); + for (RimSummaryCase* rimCase : cases) + { + RifReaderEclipseSummary* reader = nullptr; + if (rimCase && rimCase->caseData()) + { + reader = rimCase->caseData()->summaryReader(); + } + + if (reader) + { + const std::vector allAddresses = reader->allResultAddresses(); + + for (size_t i = 0; i < allAddresses.size(); i++) + { + if (allAddresses[i].category() == RifEclipseSummaryAddress::SUMMARY_WELL) + { + summaryWellNames.insert(allAddresses[i].wellName()); + } + } + } + } + return summaryWellNames; +} diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurveFilter.h b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurveFilter.h index 6ada07ace1..c60da52986 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurveFilter.h +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurveFilter.h @@ -28,12 +28,11 @@ #include "cafAppEnum.h" #include "cafPdmPtrArrayField.h" +#include "RifEclipseSummaryAddress.h" + #include "RimDefines.h" #include "RimSummaryCurveAppearanceCalculator.h" - -#include - class QwtPlot; class QwtPlotCurve; class RifReaderEclipseSummary; @@ -44,7 +43,6 @@ class RiuLineSegmentQwtPlotCurve; class RimSummaryCurveAutoName; - Q_DECLARE_METATYPE(RifEclipseSummaryAddress); //================================================================================================== @@ -100,6 +98,9 @@ class RimSummaryCurveFilter : public caf::PdmObject void updatePlotAxisForCurves(); void loadDataAndUpdatePlot(); + std::set getAllSummaryCaseNames(); + std::set getAllSummaryWellNames(); + private: QPointer m_parentQwtPlot; @@ -109,6 +110,7 @@ class RimSummaryCurveFilter : public caf::PdmObject caf::PdmChildArrayField m_curves; caf::PdmField< caf::AppEnum< RimDefines::PlotAxis > > m_plotAxis; + caf::PdmField m_showLegend; // Filter fields @@ -130,9 +132,5 @@ class RimSummaryCurveFilter : public caf::PdmObject caf::PdmField< AppearanceTypeAppEnum > m_regionAppearanceType; std::vector< caf::PdmPointer > m_selectionCache; - - // Internal objects managed by unique_ptr - std::unique_ptr m_summaryFilterObject; - std::unique_ptr m_curveNameConfigObject; }; diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurvesCalculator.cpp b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurvesCalculator.cpp index 047304e503..d90aa4ab04 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurvesCalculator.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurvesCalculator.cpp @@ -97,12 +97,12 @@ class ScientificScaleDraw : public QwtScaleDraw //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimSummaryPlotYAxisFormater::RimSummaryPlotYAxisFormater(RimSummaryYAxisProperties* axisProperties, - const std::vector& curves, - const std::vector& curveFilters) +RimSummaryPlotYAxisFormatter::RimSummaryPlotYAxisFormatter(RimSummaryYAxisProperties* axisProperties, + const std::vector& curves, + const std::set& timeHistoryCurveQuantities) : m_axisProperties(axisProperties), m_singleCurves(curves), - m_curveFilters(curveFilters) + m_timeHistoryCurveQuantities(timeHistoryCurveQuantities) { } @@ -110,7 +110,7 @@ RimSummaryPlotYAxisFormater::RimSummaryPlotYAxisFormater(RimSummaryYAxisProperti //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimSummaryPlotYAxisFormater::applyYAxisPropertiesToPlot(RiuSummaryQwtPlot* qwtPlot) +void RimSummaryPlotYAxisFormatter::applyYAxisPropertiesToPlot(RiuSummaryQwtPlot* qwtPlot) { if (!qwtPlot) return; @@ -189,34 +189,18 @@ void RimSummaryPlotYAxisFormater::applyYAxisPropertiesToPlot(RiuSummaryQwtPlot* //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString RimSummaryPlotYAxisFormater::autoAxisTitle() const +QString RimSummaryPlotYAxisFormatter::autoAxisTitle() const { std::map > unitToQuantityNameMap; for ( RimSummaryCurve* rimCurve : m_singleCurves ) { - if ( rimCurve->isCurveVisible() && rimCurve->yAxis() == this->m_axisProperties->plotAxisType() ) + if ( rimCurve->yAxis() == this->m_axisProperties->plotAxisType() ) { unitToQuantityNameMap[rimCurve->unitName()].insert(rimCurve->summaryAddress().quantityName()); } } - for ( RimSummaryCurveFilter* curveFilter : m_curveFilters ) - { - if ( curveFilter->isCurvesVisible() ) - { - std::vector curveFilterCurves = curveFilter->curves(); - - for ( RimSummaryCurve* rimCurve : curveFilterCurves ) - { - if ( rimCurve->isCurveVisible() && rimCurve->yAxis() == this->m_axisProperties->plotAxisType() ) - { - unitToQuantityNameMap[rimCurve->unitName()].insert(rimCurve->summaryAddress().quantityName()); - } - } - } - } - QString assembledYAxisText; for ( auto unitIt : unitToQuantityNameMap ) @@ -228,6 +212,19 @@ QString RimSummaryPlotYAxisFormater::autoAxisTitle() const assembledYAxisText += "[" + QString::fromStdString(unitIt.first) + "] "; } + if (m_timeHistoryCurveQuantities.size() > 0) + { + if (!assembledYAxisText.isEmpty()) + { + assembledYAxisText += " : "; + } + + for (auto timeQuantity : m_timeHistoryCurveQuantities) + { + assembledYAxisText += timeQuantity + " "; + } + } + return assembledYAxisText; } @@ -241,9 +238,12 @@ QString RimSummaryPlotYAxisFormater::autoAxisTitle() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimSummaryPlotYAxisRangeCalculator::RimSummaryPlotYAxisRangeCalculator(RimSummaryYAxisProperties* axisProperties, const std::vector& curves) - : m_axisProperties(axisProperties), - m_singleCurves(curves) +RimSummaryPlotYAxisRangeCalculator::RimSummaryPlotYAxisRangeCalculator( + const std::vector& qwtCurves, + const std::vector& yValuesForAllCurves) + : + m_singleCurves(qwtCurves), + m_yValuesForAllCurves(yValuesForAllCurves) { } @@ -255,12 +255,12 @@ void RimSummaryPlotYAxisRangeCalculator::computeYRange(double* min, double* max) double minValue = HUGE_VAL; double maxValue = -HUGE_VAL; - for (RimSummaryCurve* curve : m_singleCurves) + for (QwtPlotCurve* curve : m_singleCurves) { double minCurveValue = HUGE_VAL; double maxCurveValue = -HUGE_VAL; - if (curve->isCurveVisible() && curveValueRangeY(curve->qwtPlotCurve(), &minCurveValue, &maxCurveValue)) + if (curveValueRangeY(curve, &minCurveValue, &maxCurveValue)) { if (minCurveValue < minValue) { @@ -280,26 +280,17 @@ void RimSummaryPlotYAxisRangeCalculator::computeYRange(double* min, double* max) maxValue = RimDefines::maximumDefaultValuePlot(); } - if (m_axisProperties->isLogarithmicScaleEnabled) - { - // For logarithmic auto scaling, compute positive curve value closest to zero and use - // this value as the plot visible minimum + // For logarithmic auto scaling, compute positive curve value closest to zero and use + // this value as the plot visible minimum - double pos = HUGE_VAL; - double neg = -HUGE_VAL; + double pos = HUGE_VAL; + double neg = -HUGE_VAL; - for (RimSummaryCurve* curve : m_singleCurves) - { - if (curve->isCurveVisible()) - { - RigStatisticsCalculator::posNegClosestToZero(curve->yValues(), pos, neg); - } - } + RigStatisticsCalculator::posNegClosestToZero(m_yValuesForAllCurves, pos, neg); - if (pos != HUGE_VAL) - { - minValue = pos; - } + if (pos != HUGE_VAL) + { + minValue = pos; } *min = minValue; diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurvesCalculator.h b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurvesCalculator.h index 3622bccff1..9b013535fc 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurvesCalculator.h +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurvesCalculator.h @@ -17,10 +17,11 @@ ///////////////////////////////////////////////////////////////////////////////// #pragma once -#include - #include +#include +#include + class RimSummaryCurve; class RimSummaryCurveFilter; class RimSummaryYAxisProperties; @@ -29,12 +30,12 @@ class RiuSummaryQwtPlot; class QwtPlotCurve; -class RimSummaryPlotYAxisFormater +class RimSummaryPlotYAxisFormatter { public: - RimSummaryPlotYAxisFormater(RimSummaryYAxisProperties* axisProperties, + RimSummaryPlotYAxisFormatter(RimSummaryYAxisProperties* axisProperties, const std::vector& curves, - const std::vector& curveFilters); + const std::set& timeHistoryCurveQuantities); void applyYAxisPropertiesToPlot(RiuSummaryQwtPlot* qwtPlot); @@ -43,16 +44,16 @@ class RimSummaryPlotYAxisFormater private: RimSummaryYAxisProperties* m_axisProperties; - std::vector m_singleCurves; - std::vector m_curveFilters; + const std::vector m_singleCurves; + const std::set m_timeHistoryCurveQuantities; }; class RimSummaryPlotYAxisRangeCalculator { public: - RimSummaryPlotYAxisRangeCalculator(RimSummaryYAxisProperties* axisProperties, - const std::vector& curves); + RimSummaryPlotYAxisRangeCalculator( const std::vector& qwtCurves, + const std::vector& yValuesForAllCurves); void computeYRange(double* min, double* max) const; @@ -60,7 +61,7 @@ class RimSummaryPlotYAxisRangeCalculator bool curveValueRangeY(const QwtPlotCurve* qwtCurve, double* min, double* max) const; private: - RimSummaryYAxisProperties* m_axisProperties; - std::vector m_singleCurves; + const std::vector m_singleCurves; + const std::vector m_yValuesForAllCurves; }; diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryFilter.cpp b/ApplicationCode/ProjectDataModel/Summary/RimSummaryFilter.cpp index 94e4a7ee8d..ace16d24d7 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryFilter.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryFilter.cpp @@ -78,8 +78,112 @@ RimSummaryFilter::~RimSummaryFilter() } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString cellIJKString(int cellI, int cellJ, int cellK) +{ + QString ijkString; + if (cellI >= 0 && cellJ >= 0 && cellK >= 0) + { + ijkString = QString::number(cellI) + ", " + QString::number(cellJ) + ", " + QString::number(cellK); + } + + return ijkString; +} +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSummaryFilter::updateFromAddress(const RifEclipseSummaryAddress& address) +{ + RifEclipseSummaryAddress::SummaryVarCategory category = address.category(); + + m_filterQuantityName = QString::fromStdString(address.quantityName()); + + switch (category) + { + case RifEclipseSummaryAddress::SUMMARY_INVALID: + m_filterType = SUM_FILTER_VAR_STRING; + break; + + case RifEclipseSummaryAddress::SUMMARY_FIELD: + m_filterType = SUM_FILTER_FIELD; + break; + + case RifEclipseSummaryAddress::SUMMARY_AQUIFER: + m_filterType = SUM_FILTER_AQUIFER; + break; + + case RifEclipseSummaryAddress::SUMMARY_NETWORK: + m_filterType = SUM_FILTER_NETWORK; + break; + + case RifEclipseSummaryAddress::SUMMARY_MISC: + m_filterType = SUM_FILTER_MISC; + break; + + case RifEclipseSummaryAddress::SUMMARY_REGION: + m_filterType = SUM_FILTER_REGION; + m_regionNumberFilter= QString("%1").arg(address.regionNumber()); + break; + + case RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION: + m_filterType = SUM_FILTER_REGION_2_REGION; + m_regionNumberFilter = QString("%1").arg(address.regionNumber()); + m_regionNumber2Filter = QString("%1").arg(address.regionNumber2()); + break; + + case RifEclipseSummaryAddress::SUMMARY_WELL_GROUP: + m_filterType = SUM_FILTER_WELL_GROUP; + m_wellGroupNameFilter = QString::fromStdString(address.wellGroupName()); + break; + + case RifEclipseSummaryAddress::SUMMARY_WELL: + m_filterType = SUM_FILTER_WELL; + m_wellNameFilter = QString::fromStdString(address.wellName()); + break; + + case RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION: + m_filterType = SUM_FILTER_WELL_COMPLETION; + m_wellNameFilter = QString::fromStdString(address.wellName()); + m_cellIJKFilter = cellIJKString(address.cellI(), address.cellJ(), address.cellK()); + break; + + case RifEclipseSummaryAddress::SUMMARY_WELL_LGR: + m_filterType = SUM_FILTER_WELL_LGR; + m_wellNameFilter= QString::fromStdString(address.wellName()); + m_lgrNameFilter = QString::fromStdString(address.lgrName()); + break; + + case RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR: + m_filterType = SUM_FILTER_WELL_COMPLETION_LGR; + m_wellNameFilter = QString::fromStdString(address.wellName()); + m_lgrNameFilter = QString::fromStdString(address.lgrName()); + m_cellIJKFilter = cellIJKString(address.cellI(), address.cellJ(), address.cellK()); + break; + + case RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT: + m_filterType = SUM_FILTER_WELL_SEGMENT; + m_wellNameFilter = QString::fromStdString(address.wellName()); + m_wellSegmentNumberFilter = QString("%1").arg(address.wellSegmentNumber()); + break; + + case RifEclipseSummaryAddress::SUMMARY_BLOCK: + m_filterType = SUM_FILTER_BLOCK; + m_cellIJKFilter = cellIJKString(address.cellI(), address.cellJ(), address.cellK()); + break; + + case RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR: + m_filterType = SUM_FILTER_BLOCK_LGR; + m_lgrNameFilter = QString::fromStdString(address.lgrName()); + m_cellIJKFilter = cellIJKString(address.cellI(), address.cellJ(), address.cellK()); + break; + default: + break; + } +} bool isNumberMatch(QString numericalFilterString, int number) { @@ -119,11 +223,7 @@ bool isIJKMatch(QString filterString, int cellI, int cellJ, int cellK) else return false; } - QString ijkString; - if(cellI >= 0 && cellJ >= 0 && cellK >= 0) - { - ijkString = QString::number(cellI) + ", " + QString::number(cellJ) + ", " + QString::number(cellK); - } + QString ijkString = cellIJKString(cellI, cellJ, cellK); // Todo: Ranges, and lists QRegExp searcher(filterString, Qt::CaseInsensitive, QRegExp::WildcardUnix); @@ -346,6 +446,8 @@ void RimSummaryFilter::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering } } + + uiOrdering.skipRemainingFields(); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryFilter.h b/ApplicationCode/ProjectDataModel/Summary/RimSummaryFilter.h index b37a22cff6..112929c7df 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryFilter.h +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryFilter.h @@ -17,9 +17,11 @@ ///////////////////////////////////////////////////////////////////////////////// #pragma once + +#include "RifEclipseSummaryAddress.h" + #include "cafPdmField.h" #include "cafPdmObject.h" -#include "RifEclipseSummaryAddress.h" class RimSummaryFilter: public caf::PdmObject { @@ -49,18 +51,22 @@ class RimSummaryFilter: public caf::PdmObject RimSummaryFilter(); virtual ~RimSummaryFilter(); - bool isIncludedByFilter(const RifEclipseSummaryAddress& addr) const; + void updateFromAddress(const RifEclipseSummaryAddress& address); + void setCompleteVarStringFilter(const QString& stringFilter); - void setCompleteVarStringFilter(const QString& stringFilter); + bool isIncludedByFilter(const RifEclipseSummaryAddress& addr) const; - virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override; + virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override; private: friend class RimSummaryCurve; friend class RimSummaryCurveFilter; - static bool isSumVarTypeMatchingFilterType(SummaryFilterType sumFilterType, RifEclipseSummaryAddress::SummaryVarCategory sumVarType); + static bool isSumVarTypeMatchingFilterType(SummaryFilterType sumFilterType, RifEclipseSummaryAddress::SummaryVarCategory sumVarType); + virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override; + +private: caf::PdmField > m_filterType; caf::PdmField m_completeVarStringFilter; @@ -73,7 +79,4 @@ class RimSummaryFilter: public caf::PdmObject caf::PdmField m_wellSegmentNumberFilter; caf::PdmField m_lgrNameFilter; caf::PdmField m_cellIJKFilter; - - virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override; - }; diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlot.cpp b/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlot.cpp index 35fb3eab11..4356570764 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlot.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlot.cpp @@ -20,6 +20,8 @@ #include "RiaApplication.h" +#include "RimGridTimeHistoryCurve.h" +#include "RimSummaryCase.h" #include "RimSummaryCurve.h" #include "RimSummaryCurveFilter.h" #include "RimSummaryCurvesCalculator.h" @@ -28,19 +30,22 @@ #include "RimSummaryYAxisProperties.h" #include "RiuMainPlotWindow.h" -#include "RiuSelectionColors.h" #include "RiuSummaryQwtPlot.h" #include "cvfBase.h" #include "cvfColor3.h" #include "cafPdmUiTreeOrdering.h" +#include "cafPdmUiCheckBoxEditor.h" #include +#include #include #include "qwt_plot_curve.h" #include "qwt_plot_renderer.h" +#include "qwt_abstract_legend.h" +#include "qwt_legend.h" CAF_PDM_SOURCE_INIT(RimSummaryPlot, "SummaryPlot"); @@ -50,41 +55,44 @@ CAF_PDM_SOURCE_INIT(RimSummaryPlot, "SummaryPlot"); //-------------------------------------------------------------------------------------------------- RimSummaryPlot::RimSummaryPlot() { - CAF_PDM_InitObject("Summary Plot", ":/SummaryPlot16x16.png", "", ""); - CAF_PDM_InitField(&m_showWindow, "ShowWindow", true, "Show Summary Plot", "", "", ""); - m_showWindow.uiCapability()->setUiHidden(true); + CAF_PDM_InitObject("Summary Plot", ":/SummaryPlotLight16x16.png", "", ""); CAF_PDM_InitField(&m_userName, "PlotDescription", QString("Summary Plot"), "Name", "", "", ""); - CAF_PDM_InitField(&m_showPlotTitle, "ShowPlotTitle", true, "Show Plot Title", "", "", ""); + CAF_PDM_InitField(&m_showPlotTitle, "ShowPlotTitle", true, "Plot Title", "", "", ""); + m_showPlotTitle.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN); + CAF_PDM_InitField(&m_showLegend, "ShowLegend", true, "Legend", "", "", ""); + m_showLegend.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN); CAF_PDM_InitFieldNoDefault(&m_curveFilters, "SummaryCurveFilters", "", "", "", ""); m_curveFilters.uiCapability()->setUiTreeHidden(true); - CAF_PDM_InitFieldNoDefault(&m_curves, "SummaryCurves", "", "", "", ""); - m_curves.uiCapability()->setUiTreeHidden(true); + CAF_PDM_InitFieldNoDefault(&m_summaryCurves, "SummaryCurves", "", "", "", ""); + m_summaryCurves.uiCapability()->setUiTreeHidden(true); + + CAF_PDM_InitFieldNoDefault(&m_gridTimeHistoryCurves, "GridTimeHistoryCurves", "", "", "", ""); + m_gridTimeHistoryCurves.uiCapability()->setUiTreeHidden(true); CAF_PDM_InitFieldNoDefault(&m_leftYAxisProperties, "LeftYAxisProperties", "Left Y Axis", "", "", ""); m_leftYAxisProperties.uiCapability()->setUiTreeHidden(true); - m_leftYAxisPropertiesObject = std::unique_ptr(new RimSummaryYAxisProperties); - m_leftYAxisPropertiesObject->setNameAndAxis("Left Y-Axis", QwtPlot::yLeft); - m_leftYAxisProperties = m_leftYAxisPropertiesObject.get(); + m_leftYAxisProperties = new RimSummaryYAxisProperties; + m_leftYAxisProperties->setNameAndAxis("Left Y-Axis", QwtPlot::yLeft); CAF_PDM_InitFieldNoDefault(&m_rightYAxisProperties, "RightYAxisProperties", "Right Y Axis", "", "", ""); m_rightYAxisProperties.uiCapability()->setUiTreeHidden(true); - m_rightYAxisPropertiesObject = std::unique_ptr(new RimSummaryYAxisProperties); - m_rightYAxisPropertiesObject->setNameAndAxis("Right Y-Axis", QwtPlot::yRight); - m_rightYAxisProperties = m_rightYAxisPropertiesObject.get(); + m_rightYAxisProperties = new RimSummaryYAxisProperties; + m_rightYAxisProperties->setNameAndAxis("Right Y-Axis", QwtPlot::yRight); CAF_PDM_InitFieldNoDefault(&m_timeAxisProperties, "TimeAxisProperties", "Time Axis", "", "", ""); m_timeAxisProperties.uiCapability()->setUiTreeHidden(true); - m_timeAxisPropertiesObject = std::unique_ptr(new RimSummaryTimeAxisProperties); - m_timeAxisProperties = m_timeAxisPropertiesObject.get(); + m_timeAxisProperties = new RimSummaryTimeAxisProperties; CAF_PDM_InitField(&m_isAutoZoom, "AutoZoom", true, "Auto Zoom", "", "", ""); m_isAutoZoom.uiCapability()->setUiHidden(true); + + setAsPlotMdiWindow(); } //-------------------------------------------------------------------------------------------------- @@ -92,29 +100,14 @@ RimSummaryPlot::RimSummaryPlot() //-------------------------------------------------------------------------------------------------- RimSummaryPlot::~RimSummaryPlot() { - if (RiaApplication::instance()->mainPlotWindow()) - { - RiaApplication::instance()->mainPlotWindow()->removeViewer(m_qwtPlot); - } + removeMdiWindowFromMdiArea(); - deletePlotWidget(); + deleteViewWidget(); - m_curves.deleteAllChildObjects(); + m_summaryCurves.deleteAllChildObjects(); m_curveFilters.deleteAllChildObjects(); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimSummaryPlot::deletePlotWidget() -{ - if (m_qwtPlot) - { - m_qwtPlot->deleteLater(); - m_qwtPlot = NULL; - } -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -133,14 +126,7 @@ void RimSummaryPlot::updateAxes() //-------------------------------------------------------------------------------------------------- bool RimSummaryPlot::isLogarithmicScaleEnabled(RimDefines::PlotAxis plotAxis) const { - if (plotAxis == RimDefines::PLOT_AXIS_LEFT) - { - return m_leftYAxisProperties->isLogarithmicScaleEnabled(); - } - else - { - return m_rightYAxisProperties->isLogarithmicScaleEnabled(); - } + return yAxisPropertiesForAxis(plotAxis)->isLogarithmicScaleEnabled(); } //-------------------------------------------------------------------------------------------------- @@ -195,9 +181,9 @@ time_t RimSummaryPlot::firstTimeStepOfFirstCurve() } size_t i = 0; - while (firstCurve == nullptr && i < m_curves.size()) + while (firstCurve == nullptr && i < m_summaryCurves.size()) { - firstCurve = m_curves[i]; + firstCurve = m_summaryCurves[i]; ++i; } @@ -216,6 +202,166 @@ QWidget* RimSummaryPlot::viewWidget() return m_qwtPlot; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimSummaryPlot::asciiDataForPlotExport() const +{ + QString out; + + out += description(); + + { + std::vector curves; + this->descendantsIncludingThisOfType(curves); + + std::vector caseNames; + std::vector > timeSteps; + + std::vector > > allCurveData; + std::vector > allCurveNames; + //Vectors containing cases - curves - data points/curve name + + for (RimSummaryCurve* curve : curves) + { + if (!curve->isCurveVisible()) continue; + QString curveCaseName = curve->summaryCase()->caseName(); + + size_t casePosInList = cvf::UNDEFINED_SIZE_T; + for (size_t i = 0; i < caseNames.size(); i++) + { + if (curveCaseName == caseNames[i]) casePosInList = i; + } + + if (casePosInList == cvf::UNDEFINED_SIZE_T) + { + caseNames.push_back(curveCaseName); + + std::vector curveTimeSteps = curve->timeSteps(); + timeSteps.push_back(curveTimeSteps); + + std::vector > curveDataForCase; + std::vector curveYData = curve->yValues(); + curveDataForCase.push_back(curveYData); + allCurveData.push_back(curveDataForCase); + + std::vector curveNamesForCase; + curveNamesForCase.push_back(curve->curveName()); + allCurveNames.push_back(curveNamesForCase); + } + else + { + std::vector curveYData = curve->yValues(); + allCurveData[casePosInList].push_back(curveYData); + + QString curveName = curve->curveName(); + allCurveNames[casePosInList].push_back(curveName); + } + } + + for (size_t i = 0; i < timeSteps.size(); i++) //cases + { + out += "\n\n"; + out += "Case: " + caseNames[i]; + out += "\n"; + + for (size_t j = 0; j < timeSteps[i].size(); j++) //time steps & data points + { + if (j == 0) + { + out += "Date and time"; + for (size_t k = 0; k < allCurveNames[i].size(); k++) // curves + { + out += "\t" + (allCurveNames[i][k]); + } + } + out += "\n"; + out += QDateTime::fromTime_t(timeSteps[i][j]).toUTC().toString("yyyy-MM-dd hh:mm:ss "); + + for (size_t k = 0; k < allCurveData[i].size(); k++) // curves + { + out += "\t" + QString::number(allCurveData[i][k][j], 'g', 6); + } + } + } + } + + + { + std::vector caseNames; + std::vector > timeSteps; + + std::vector > > allCurveData; + std::vector > allCurveNames; + //Vectors containing cases - curves - data points/curve name + + for (RimGridTimeHistoryCurve* curve : m_gridTimeHistoryCurves) + { + if (!curve->isCurveVisible()) continue; + QString curveCaseName = curve->caseName(); + + size_t casePosInList = cvf::UNDEFINED_SIZE_T; + for (size_t i = 0; i < caseNames.size(); i++) + { + if (curveCaseName == caseNames[i]) casePosInList = i; + } + + if (casePosInList == cvf::UNDEFINED_SIZE_T) + { + caseNames.push_back(curveCaseName); + + std::vector curveTimeSteps = curve->timeStepValues(); + timeSteps.push_back(curveTimeSteps); + + std::vector > curveDataForCase; + std::vector curveYData = curve->yValues(); + curveDataForCase.push_back(curveYData); + allCurveData.push_back(curveDataForCase); + + std::vector curveNamesForCase; + curveNamesForCase.push_back(curve->curveName()); + allCurveNames.push_back(curveNamesForCase); + } + else + { + std::vector curveYData = curve->yValues(); + allCurveData[casePosInList].push_back(curveYData); + + QString curveName = curve->curveName(); + allCurveNames[casePosInList].push_back(curveName); + } + } + + for (size_t i = 0; i < timeSteps.size(); i++) //cases + { + out += "\n\n"; + out += "Case: " + caseNames[i]; + out += "\n"; + + for (size_t j = 0; j < timeSteps[i].size(); j++) //time steps & data points + { + if (j == 0) + { + out += "Date and time"; + for (size_t k = 0; k < allCurveNames[i].size(); k++) // curves + { + out += "\t" + (allCurveNames[i][k]); + } + } + out += "\n"; + out += QDateTime::fromTime_t(timeSteps[i][j]).toUTC().toString("yyyy-MM-dd hh:mm:ss "); + + for (size_t k = 0; k < allCurveData[i].size(); k++) // curves + { + out += "\t" + QString::number(allCurveData[i][k][j], 'g', 6); + } + } + } + } + + return out; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -224,62 +370,103 @@ void RimSummaryPlot::updateAxis(RimDefines::PlotAxis plotAxis) if (!m_qwtPlot) return; QwtPlot::Axis qwtAxis = QwtPlot::yLeft; - RimSummaryYAxisProperties* yAxisProperties = nullptr; if (plotAxis == RimDefines::PLOT_AXIS_LEFT) { qwtAxis = QwtPlot::yLeft; - yAxisProperties = m_leftYAxisProperties(); } else { qwtAxis = QwtPlot::yRight; - yAxisProperties = m_rightYAxisProperties(); } - if (!yAxisProperties->isActive()) + RimSummaryYAxisProperties* yAxisProperties = yAxisPropertiesForAxis(plotAxis); + if (yAxisProperties->isActive() && hasVisibleCurvesForAxis(plotAxis)) { - m_qwtPlot->enableAxis(qwtAxis, false); + m_qwtPlot->enableAxis(qwtAxis, true); + + std::set timeHistoryQuantities; + + for (auto c : visibleTimeHistoryCurvesForAxis(plotAxis)) + { + timeHistoryQuantities.insert(c->quantityName()); + } + + RimSummaryPlotYAxisFormatter calc(yAxisProperties, visibleSummaryCurvesForAxis(plotAxis), timeHistoryQuantities); + calc.applyYAxisPropertiesToPlot(m_qwtPlot); } else { - if (hasVisibleCurvesForAxis(plotAxis)) - { - std::vector curves; - curves.insert(curves.begin(), m_curves.begin(), m_curves.end()); + m_qwtPlot->enableAxis(qwtAxis, false); + } +} - std::vector curveFilters; - curveFilters.insert(curveFilters.begin(), m_curveFilters.begin(), m_curveFilters.end()); +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSummaryPlot::updateZoomForAxis(RimDefines::PlotAxis plotAxis) +{ + RimSummaryYAxisProperties* yAxisProps = yAxisPropertiesForAxis(plotAxis); - m_qwtPlot->enableAxis(qwtAxis, true); + if (yAxisProps->isLogarithmicScaleEnabled) + { + std::vector yValues; + std::vector plotCurves; - RimSummaryPlotYAxisFormater calc(yAxisProperties, curves, curveFilters); - calc.applyYAxisPropertiesToPlot(m_qwtPlot); + for (RimSummaryCurve* c : visibleSummaryCurvesForAxis(plotAxis)) + { + std::vector curveValues = c->yValues(); + yValues.insert(yValues.end(), curveValues.begin(), curveValues.end()); + plotCurves.push_back(c->qwtPlotCurve()); } - else + + for (RimGridTimeHistoryCurve* c : visibleTimeHistoryCurvesForAxis(plotAxis)) { - m_qwtPlot->enableAxis(qwtAxis, false); + std::vector curveValues = c->yValues(); + yValues.insert(yValues.end(), curveValues.begin(), curveValues.end()); + plotCurves.push_back(c->qwtPlotCurve()); } + + double min, max; + RimSummaryPlotYAxisRangeCalculator calc(plotCurves, yValues); + calc.computeYRange(&min, &max); + + m_qwtPlot->setAxisScale(yAxisProps->qwtPlotAxisType(), min, max); + } + else + { + m_qwtPlot->setAxisAutoScale(yAxisProps->qwtPlotAxisType(), true); } } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::vector RimSummaryPlot::curvesForAxis(RimDefines::PlotAxis plotAxis) const +std::vector RimSummaryPlot::visibleSummaryCurvesForAxis(RimDefines::PlotAxis plotAxis) const { std::vector curves; - std::vector childCurves; - this->descendantsIncludingThisOfType(childCurves); - - for (RimSummaryCurve* curve : childCurves) + for (RimSummaryCurve* curve : m_summaryCurves) { - if (curve->yAxis() == plotAxis) + if (curve->isCurveVisible() && curve->yAxis() == plotAxis) { curves.push_back(curve); } } + for (RimSummaryCurveFilter * curveFilter : m_curveFilters) + { + if (curveFilter->isCurvesVisible()) + { + for (RimSummaryCurve* curve : curveFilter->curves()) + { + if (curve->isCurveVisible() && curve->yAxis() == plotAxis) + { + curves.push_back(curve); + } + } + } + } + return curves; } @@ -288,23 +475,56 @@ std::vector RimSummaryPlot::curvesForAxis(RimDefines::PlotAxis //-------------------------------------------------------------------------------------------------- bool RimSummaryPlot::hasVisibleCurvesForAxis(RimDefines::PlotAxis plotAxis) const { - for (RimSummaryCurve* curve : m_curves) + if (visibleSummaryCurvesForAxis(plotAxis).size() > 0) { - if (curve->isCurveVisible() && curve->yAxis() == plotAxis) return true; + return true; } - for (RimSummaryCurveFilter * curveFilter : m_curveFilters) + if (visibleTimeHistoryCurvesForAxis(plotAxis).size() > 0) { - if (curveFilter->isCurvesVisible()) + return true; + } + + return false; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimSummaryYAxisProperties* RimSummaryPlot::yAxisPropertiesForAxis(RimDefines::PlotAxis plotAxis) const +{ + RimSummaryYAxisProperties* yAxisProps = nullptr; + + if (plotAxis == RimDefines::PLOT_AXIS_LEFT) + { + yAxisProps = m_leftYAxisProperties(); + } + else + { + yAxisProps = m_rightYAxisProperties(); + } + + CVF_ASSERT(yAxisProps); + + return yAxisProps; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimSummaryPlot::visibleTimeHistoryCurvesForAxis(RimDefines::PlotAxis plotAxis) const +{ + std::vector curves; + + for (auto c : m_gridTimeHistoryCurves) + { + if (c->isCurveVisible() && c->yAxis() == plotAxis) { - for ( RimSummaryCurve* curve : curveFilter->curves() ) - { - if ( curve->isCurveVisible() && curve->yAxis() == plotAxis ) return true; - } + curves.push_back(c); } } - return false; + return curves; } //-------------------------------------------------------------------------------------------------- @@ -367,28 +587,12 @@ void RimSummaryPlot::updateTimeAxis() } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimSummaryPlot::handleViewerDeletion() -{ - m_showWindow = false; - - if (m_qwtPlot) - { - detachAllCurves(); - } - - uiCapability()->updateUiIconFromToggleField(); - updateConnectedEditors(); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void RimSummaryPlot::updateCaseNameHasChanged() { - for (RimSummaryCurve* curve : m_curves) + for (RimSummaryCurve* curve : m_summaryCurves) { curve->updateCurveName(); curve->updateConnectedEditors(); @@ -429,40 +633,13 @@ void RimSummaryPlot::zoomAll() { m_qwtPlot->setAxisAutoScale(QwtPlot::xBottom, true); - if (m_leftYAxisProperties->isLogarithmicScaleEnabled) - { - std::vector curves = curvesForAxis(RimDefines::PLOT_AXIS_LEFT); - - double min, max; - RimSummaryPlotYAxisRangeCalculator calc(m_leftYAxisProperties, curves); - calc.computeYRange(&min, &max); - - m_qwtPlot->setAxisScale(m_leftYAxisProperties->qwtPlotAxisType(), min, max); - } - else - { - m_qwtPlot->setAxisAutoScale(QwtPlot::yLeft, true); - } - - if (m_rightYAxisProperties->isLogarithmicScaleEnabled) - { - std::vector curves = curvesForAxis(RimDefines::PLOT_AXIS_RIGHT); - - double min, max; - RimSummaryPlotYAxisRangeCalculator calc(m_rightYAxisProperties, curves); - calc.computeYRange(&min, &max); - - m_qwtPlot->setAxisScale(m_rightYAxisProperties->qwtPlotAxisType(), min, max); - } - else - { - m_qwtPlot->setAxisAutoScale(QwtPlot::yRight, true); - } + updateZoomForAxis(RimDefines::PLOT_AXIS_LEFT); + updateZoomForAxis(RimDefines::PLOT_AXIS_RIGHT); m_qwtPlot->replot(); } - updateZoomFromQwt(); + updateZoomWindowFromQwt(); m_isAutoZoom = true; } @@ -474,7 +651,7 @@ void RimSummaryPlot::addCurve(RimSummaryCurve* curve) { if (curve) { - m_curves.push_back(curve); + m_summaryCurves.push_back(curve); if (m_qwtPlot) { curve->setParentQwtPlot(m_qwtPlot); @@ -502,39 +679,34 @@ void RimSummaryPlot::addCurveFilter(RimSummaryCurveFilter* curveFilter) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimSummaryPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) +void RimSummaryPlot::addGridTimeHistoryCurve(RimGridTimeHistoryCurve* curve) { - if (changedField == &m_showWindow) - { - if (m_showWindow) - { - loadDataAndUpdate(); - } - else - { - updateViewerWidget(); - } + CVF_ASSERT(curve); - uiCapability()->updateUiIconFromToggleField(); - } - else if (changedField == &m_userName || - changedField == &m_showPlotTitle) + m_gridTimeHistoryCurves.push_back(curve); + if (m_qwtPlot) { - updateViewerWidgetWindowTitle(); + curve->setParentQwtPlot(m_qwtPlot); + this->updateAxes(); } } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimSummaryPlot::setupBeforeSave() +void RimSummaryPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) { - if (m_qwtPlot && RiaApplication::instance()->mainPlotWindow()) + RimViewWindow::fieldChangedByUi(changedField, oldValue, newValue); + + if (changedField == &m_userName || + changedField == &m_showPlotTitle || + changedField == &m_showLegend) { - this->setMdiWindowGeometry(RiaApplication::instance()->mainPlotWindow()->windowGeometryForViewer(m_qwtPlot)); + updateMdiWindowTitle(); } } + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -568,9 +740,10 @@ void RimSummaryPlot::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering axisFolder->add(&m_rightYAxisProperties); uiTreeOrdering.add(&m_curveFilters); - uiTreeOrdering.add(&m_curves); + uiTreeOrdering.add(&m_summaryCurves); + uiTreeOrdering.add(&m_gridTimeHistoryCurves); - uiTreeOrdering.setForgetRemainingFields(true); + uiTreeOrdering.skipRemainingChildren(true); } //-------------------------------------------------------------------------------------------------- @@ -578,18 +751,23 @@ void RimSummaryPlot::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering //-------------------------------------------------------------------------------------------------- void RimSummaryPlot::loadDataAndUpdate() { - updateViewerWidget(); + updateMdiWindowVisibility(); for (RimSummaryCurveFilter* curveFilter: m_curveFilters) { curveFilter->loadDataAndUpdate(); } - for (RimSummaryCurve* curve : m_curves) + for (RimSummaryCurve* curve : m_summaryCurves) { curve->loadDataAndUpdate(); } + for (RimGridTimeHistoryCurve* curve : m_gridTimeHistoryCurves) + { + curve->loadDataAndUpdate(); + } + this->updateAxes(); updateZoomInQwt(); @@ -632,7 +810,7 @@ void RimSummaryPlot::setZoomIntervalsInQwtPlot() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimSummaryPlot::updateZoomFromQwt() +void RimSummaryPlot::updateZoomWindowFromQwt() { if (!m_qwtPlot) return; @@ -669,51 +847,49 @@ QString RimSummaryPlot::description() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimSummaryPlot::updateViewerWidget() +QWidget* RimSummaryPlot::createViewWidget(QWidget* mainWindowParent) { - RiuMainPlotWindow* mainPlotWindow = RiaApplication::instance()->mainPlotWindow(); - if (!mainPlotWindow) return; - - if (m_showWindow()) + if (!m_qwtPlot) { - if (!m_qwtPlot) - { - m_qwtPlot = new RiuSummaryQwtPlot(this, mainPlotWindow); - - for(RimSummaryCurveFilter* curveFilter: m_curveFilters) - { - curveFilter->setParentQwtPlot(m_qwtPlot); - } + m_qwtPlot = new RiuSummaryQwtPlot(this, mainWindowParent); - for(RimSummaryCurve* curve : m_curves) - { - curve->setParentQwtPlot(m_qwtPlot); - } + for(RimSummaryCurveFilter* curveFilter: m_curveFilters) + { + curveFilter->setParentQwtPlot(m_qwtPlot); + } - mainPlotWindow->addViewer(m_qwtPlot, this->mdiWindowGeometry()); - mainPlotWindow->setActiveViewer(m_qwtPlot); + for(RimSummaryCurve* curve : m_summaryCurves) + { + curve->setParentQwtPlot(m_qwtPlot); } - updateViewerWidgetWindowTitle(); - } - else - { - if (m_qwtPlot) + for (RimGridTimeHistoryCurve* curve : m_gridTimeHistoryCurves) { - this->setMdiWindowGeometry(mainPlotWindow->windowGeometryForViewer(m_qwtPlot)); + curve->setParentQwtPlot(m_qwtPlot); + } + } - mainPlotWindow->removeViewer(m_qwtPlot); - detachAllCurves(); + return m_qwtPlot; +} - deletePlotWidget(); - } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSummaryPlot::deleteViewWidget() +{ + detachAllCurves(); + + if (m_qwtPlot) + { + m_qwtPlot->deleteLater(); + m_qwtPlot = nullptr; } } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimSummaryPlot::updateViewerWidgetWindowTitle() +void RimSummaryPlot::updateMdiWindowTitle() { if (m_qwtPlot) { @@ -727,6 +903,18 @@ void RimSummaryPlot::updateViewerWidgetWindowTitle() { m_qwtPlot->setTitle(""); } + + + if (m_showLegend) + { + // Will be released in plot destructor or when a new legend is set + QwtLegend* legend = new QwtLegend(m_qwtPlot); + m_qwtPlot->insertLegend(legend, QwtPlot::BottomLegend); + } + else + { + m_qwtPlot->insertLegend(nullptr); + } } } @@ -740,7 +928,12 @@ void RimSummaryPlot::detachAllCurves() curveFilter->detachQwtCurves(); } - for(RimSummaryCurve* curve : m_curves) + for(RimSummaryCurve* curve : m_summaryCurves) + { + curve->detachQwtCurve(); + } + + for (RimGridTimeHistoryCurve* curve : m_gridTimeHistoryCurves) { curve->detachQwtCurve(); } @@ -749,13 +942,21 @@ void RimSummaryPlot::detachAllCurves() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimSummaryCurve* RimSummaryPlot::findRimCurveFromQwtCurve(const QwtPlotCurve* qwtCurve) const +caf::PdmObject* RimSummaryPlot::findRimCurveFromQwtCurve(const QwtPlotCurve* qwtCurve) const { - for(RimSummaryCurve* rimCurve: m_curves) + for(RimSummaryCurve* curve : m_summaryCurves) { - if(rimCurve->qwtPlotCurve() == qwtCurve) + if(curve->qwtPlotCurve() == qwtCurve) { - return rimCurve; + return curve; + } + } + + for (RimGridTimeHistoryCurve* curve : m_gridTimeHistoryCurves) + { + if (curve->qwtPlotCurve() == qwtCurve) + { + return curve; } } @@ -767,3 +968,26 @@ RimSummaryCurve* RimSummaryPlot::findRimCurveFromQwtCurve(const QwtPlotCurve* qw return NULL; } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +size_t RimSummaryPlot::curveCount() const +{ + return m_summaryCurves.size() + m_gridTimeHistoryCurves.size(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSummaryPlot::defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute * attribute) +{ + if (field == &m_showLegend || field == &m_showPlotTitle) + { + caf::PdmUiCheckBoxEditorAttribute* myAttr = dynamic_cast(attribute); + if (myAttr) + { + myAttr->m_useNativeCheckBoxLabel = true; + } + } +} diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlot.h b/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlot.h index 113dbfbb8b..d4cd5c2284 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlot.h +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlot.h @@ -30,13 +30,12 @@ #include -#include - class RiuSummaryQwtPlot; class RimSummaryCurve; class RimSummaryCurveFilter; class RimSummaryYAxisProperties; class RimSummaryTimeAxisProperties; +class RimGridTimeHistoryCurve; class PdmUiTreeOrdering; class QwtPlotCurve; @@ -60,11 +59,14 @@ class RimSummaryPlot : public RimViewWindow void addCurve(RimSummaryCurve* curve); void addCurveFilter(RimSummaryCurveFilter* curveFilter); - RimSummaryCurve* findRimCurveFromQwtCurve(const QwtPlotCurve* curve) const; + void addGridTimeHistoryCurve(RimGridTimeHistoryCurve* curve); + + caf::PdmObject* findRimCurveFromQwtCurve(const QwtPlotCurve* curve) const; + size_t curveCount() const; - void loadDataAndUpdate(); + virtual void loadDataAndUpdate() override; - void handleViewerDeletion(); + void detachAllCurves(); void updateCaseNameHasChanged(); void updateAxes(); @@ -74,7 +76,7 @@ class RimSummaryPlot : public RimViewWindow const QwtInterval& timeAxis); void updateZoomInQwt(); - void updateZoomFromQwt(); + void updateZoomWindowFromQwt(); void disableAutoZoom(); bool isLogarithmicScaleEnabled(RimDefines::PlotAxis plotAxis) const; @@ -86,48 +88,48 @@ class RimSummaryPlot : public RimViewWindow virtual QWidget* viewWidget() override; + QString asciiDataForPlotExport() const; + protected: // Overridden PDM methods - virtual caf::PdmFieldHandle* objectToggleField() { return &m_showWindow; } virtual caf::PdmFieldHandle* userDescriptionField() { return &m_userName; } virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override; - virtual void setupBeforeSave() override; virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override; + virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute); virtual QImage snapshotWindowContent() override; private: - void updateViewerWidget(); - void updateViewerWidgetWindowTitle(); - void detachAllCurves(); - void deletePlotWidget(); - - void updateAxis(RimDefines::PlotAxis plotAxis); - std::vector curvesForAxis(RimDefines::PlotAxis plotAxis) const; + std::vector visibleSummaryCurvesForAxis(RimDefines::PlotAxis plotAxis) const; + std::vector visibleTimeHistoryCurvesForAxis(RimDefines::PlotAxis plotAxis) const; bool hasVisibleCurvesForAxis(RimDefines::PlotAxis plotAxis) const; + RimSummaryYAxisProperties* yAxisPropertiesForAxis(RimDefines::PlotAxis plotAxis) const; + void updateAxis(RimDefines::PlotAxis plotAxis); + void updateZoomForAxis(RimDefines::PlotAxis plotAxis); + void updateTimeAxis(); void setZoomIntervalsInQwtPlot(); + // RimViewWindow overrides + + virtual QWidget* createViewWidget(QWidget* mainWindowParent) override; + void updateMdiWindowTitle() override; + virtual void deleteViewWidget() override; private: - caf::PdmField m_showWindow; - - caf::PdmField m_showPlotTitle; - caf::PdmField m_userName; + caf::PdmField m_showPlotTitle; + caf::PdmField m_showLegend; + caf::PdmField m_userName; - caf::PdmChildArrayField m_curves; - caf::PdmChildArrayField m_curveFilters; - - caf::PdmField m_isAutoZoom; - caf::PdmChildField m_leftYAxisProperties; - caf::PdmChildField m_rightYAxisProperties; - caf::PdmChildField m_timeAxisProperties; + caf::PdmChildArrayField m_gridTimeHistoryCurves; + caf::PdmChildArrayField m_summaryCurves; + caf::PdmChildArrayField m_curveFilters; - QPointer m_qwtPlot; + caf::PdmField m_isAutoZoom; + caf::PdmChildField m_leftYAxisProperties; + caf::PdmChildField m_rightYAxisProperties; + caf::PdmChildField m_timeAxisProperties; - // Internal objects managed by unique_ptr - std::unique_ptr m_leftYAxisPropertiesObject; - std::unique_ptr m_rightYAxisPropertiesObject; - std::unique_ptr m_timeAxisPropertiesObject; + QPointer m_qwtPlot; }; diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlotCollection.cpp b/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlotCollection.cpp index 5eea46d180..c4463b7476 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlotCollection.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlotCollection.cpp @@ -40,8 +40,8 @@ RimSummaryPlotCollection::RimSummaryPlotCollection() { CAF_PDM_InitObject("Summary Plots", ":/SummaryPlots16x16.png", "", ""); - CAF_PDM_InitFieldNoDefault(&m_summaryPlots, "SummaryPlots", "Summary Plots", "", "", ""); - m_summaryPlots.uiCapability()->setUiHidden(true); + CAF_PDM_InitFieldNoDefault(&summaryPlots, "SummaryPlots", "Summary Plots", "", "", ""); + summaryPlots.uiCapability()->setUiHidden(true); } @@ -50,7 +50,7 @@ RimSummaryPlotCollection::RimSummaryPlotCollection() //-------------------------------------------------------------------------------------------------- RimSummaryPlotCollection::~RimSummaryPlotCollection() { - m_summaryPlots.deleteAllChildObjects(); + summaryPlots.deleteAllChildObjects(); for (auto it = m_summaryFileReaders.begin(); it != m_summaryFileReaders.end(); it++) { @@ -124,7 +124,7 @@ RifReaderEclipseSummary* RimSummaryPlotCollection::createSummaryFileReader(const //-------------------------------------------------------------------------------------------------- void RimSummaryPlotCollection::updateSummaryNameHasChanged() { - for (RimSummaryPlot* plot : m_summaryPlots) + for (RimSummaryPlot* plot : summaryPlots) { plot->updateCaseNameHasChanged(); } diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlotCollection.h b/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlotCollection.h index 00afb0d151..c675f478f5 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlotCollection.h +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlotCollection.h @@ -43,7 +43,7 @@ class RimSummaryPlotCollection : public caf::PdmObject RifReaderEclipseSummary* getOrCreateSummaryFileReader(const RimEclipseResultCase* eclipseCase); - caf::PdmChildArrayField m_summaryPlots; + caf::PdmChildArrayField summaryPlots; void updateSummaryNameHasChanged(); private: diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryTimeAxisProperties.cpp b/ApplicationCode/ProjectDataModel/Summary/RimSummaryTimeAxisProperties.cpp index 09ebc322a7..42cb6cb51b 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryTimeAxisProperties.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryTimeAxisProperties.cpp @@ -278,16 +278,48 @@ double RimSummaryTimeAxisProperties::fromTimeTToDisplayUnitScale() return scale; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +double RimSummaryTimeAxisProperties::fromDaysToDisplayUnitScale() +{ + double scale = 1.0; + switch (m_timeUnit()) + { + case SECONDS: + scale = 60.0 * 60.0 * 24.0; + break; + case MINUTES: + scale = 60.0 * 24.0; + break; + case HOURS: + scale = 24.0; + break; + case DAYS: + break; + case YEARS: + scale = 1.0/365.2425; + break; + default: + CVF_ASSERT(false); + break; + } + + return scale; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void RimSummaryTimeAxisProperties::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) { - uiOrdering.add(&showTitle); - uiOrdering.add(&title); - uiOrdering.add(&titlePositionEnum); - uiOrdering.add(&fontSize); - caf::PdmUiGroup* timeGroup = uiOrdering.addNewGroup("Time"); + caf::PdmUiGroup& titleGroup = *(uiOrdering.addNewGroup("Axis Title")); + titleGroup.add(&showTitle); + titleGroup.add(&title); + titleGroup.add(&titlePositionEnum); + titleGroup.add(&fontSize); + + caf::PdmUiGroup* timeGroup = uiOrdering.addNewGroup("Time Values"); timeGroup->add(&m_timeMode); if (m_timeMode() == DATE) { @@ -301,7 +333,7 @@ void RimSummaryTimeAxisProperties::defineUiOrdering(QString uiConfigName, caf::P timeGroup->add(&m_visibleTimeRangeMin); } - uiOrdering.setForgetRemainingFields(true); + uiOrdering.skipRemainingFields(true); } //-------------------------------------------------------------------------------------------------- @@ -311,6 +343,7 @@ void RimSummaryTimeAxisProperties::fieldChangedByUi(const caf::PdmFieldHandle* c { RimSummaryPlot* rimSummaryPlot = nullptr; this->firstAncestorOrThisOfType(rimSummaryPlot); + if (!rimSummaryPlot) return; if (changedField == &m_visibleDateRangeMax) { diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryTimeAxisProperties.h b/ApplicationCode/ProjectDataModel/Summary/RimSummaryTimeAxisProperties.h index 3e528c7be9..1f67606a0c 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryTimeAxisProperties.h +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryTimeAxisProperties.h @@ -69,6 +69,7 @@ class RimSummaryTimeAxisProperties : public caf::PdmObject TimeModeType timeMode() const { return m_timeMode(); } void setTimeMode(TimeModeType val) { m_timeMode = val; } double fromTimeTToDisplayUnitScale(); + double fromDaysToDisplayUnitScale(); double visibleRangeMin() const; double visibleRangeMax() const; diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryYAxisProperties.cpp b/ApplicationCode/ProjectDataModel/Summary/RimSummaryYAxisProperties.cpp index af382360cf..c24f34832f 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryYAxisProperties.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryYAxisProperties.cpp @@ -113,6 +113,25 @@ QList RimSummaryYAxisProperties::calculateValueOptions(c return options; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSummaryYAxisProperties::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) +{ + caf::PdmUiGroup& titleGroup = *(uiOrdering.addNewGroup("Axis Title")); + titleGroup.add(&isAutoTitle); + titleGroup.add(&customTitle); + titleGroup.add(&titlePositionEnum); + titleGroup.add(&fontSize); + + caf::PdmUiGroup& scaleGroup = *(uiOrdering.addNewGroup("Axis Values")); + scaleGroup.add(&isLogarithmicScaleEnabled); + scaleGroup.add(&numberFormat); + scaleGroup.add(&visibleRangeMin); + scaleGroup.add(&visibleRangeMax); + +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -155,33 +174,37 @@ bool RimSummaryYAxisProperties::isActive() const //-------------------------------------------------------------------------------------------------- void RimSummaryYAxisProperties::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) { - RimSummaryPlot* rimSummaryPlot = nullptr; - this->firstAncestorOrThisOfType(rimSummaryPlot); if (changedField == &isAutoTitle) { updateOptionSensitivity(); } - else if (changedField == &visibleRangeMax) + + RimSummaryPlot* rimSummaryPlot = nullptr; + this->firstAncestorOrThisOfType(rimSummaryPlot); + if (rimSummaryPlot) { - if (visibleRangeMin > visibleRangeMax) visibleRangeMax = oldValue.toDouble(); + if (changedField == &visibleRangeMax) + { + if (visibleRangeMin > visibleRangeMax) visibleRangeMax = oldValue.toDouble(); - rimSummaryPlot->disableAutoZoom(); - } - else if (changedField == &visibleRangeMin) - { - if (visibleRangeMin > visibleRangeMax) visibleRangeMin = oldValue.toDouble(); + rimSummaryPlot->disableAutoZoom(); + } + else if (changedField == &visibleRangeMin) + { + if (visibleRangeMin > visibleRangeMax) visibleRangeMin = oldValue.toDouble(); - rimSummaryPlot->disableAutoZoom(); - } + rimSummaryPlot->disableAutoZoom(); + } - if (changedField == &isLogarithmicScaleEnabled) - { - rimSummaryPlot->loadDataAndUpdate(); - } - else - { - rimSummaryPlot->updateAxes(); + if (changedField == &isLogarithmicScaleEnabled) + { + rimSummaryPlot->loadDataAndUpdate(); + } + else + { + rimSummaryPlot->updateAxes(); + } } } diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryYAxisProperties.h b/ApplicationCode/ProjectDataModel/Summary/RimSummaryYAxisProperties.h index 37afeb5369..bf9cae4d42 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryYAxisProperties.h +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryYAxisProperties.h @@ -81,6 +81,7 @@ class RimSummaryYAxisProperties : public caf::PdmObject virtual caf::PdmFieldHandle* objectToggleField() override; virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override; virtual QList calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override; + virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override; private: void updateOptionSensitivity(); diff --git a/ApplicationCode/ReservoirDataModel/CMakeLists_files.cmake b/ApplicationCode/ReservoirDataModel/CMakeLists_files.cmake index 6f63e66697..f4e9eb5681 100644 --- a/ApplicationCode/ReservoirDataModel/CMakeLists_files.cmake +++ b/ApplicationCode/ReservoirDataModel/CMakeLists_files.cmake @@ -7,7 +7,7 @@ endif() set (SOURCE_GROUP_HEADER_FILES ${CEE_CURRENT_LIST_DIR}RigActiveCellInfo.h ${CEE_CURRENT_LIST_DIR}RigCell.h -${CEE_CURRENT_LIST_DIR}RigCaseData.h +${CEE_CURRENT_LIST_DIR}RigEclipseCaseData.h ${CEE_CURRENT_LIST_DIR}RigGridBase.h ${CEE_CURRENT_LIST_DIR}RigGridManager.h ${CEE_CURRENT_LIST_DIR}RigResultAccessor.h @@ -20,6 +20,14 @@ ${CEE_CURRENT_LIST_DIR}RigCombMultResultAccessor.h ${CEE_CURRENT_LIST_DIR}RigResultModifier.h ${CEE_CURRENT_LIST_DIR}RigResultModifierFactory.h ${CEE_CURRENT_LIST_DIR}RigFormationNames.h +${CEE_CURRENT_LIST_DIR}RigFlowDiagResultAddress.h +${CEE_CURRENT_LIST_DIR}RigFlowDiagResults.h +${CEE_CURRENT_LIST_DIR}RigFlowDiagResultFrames.h +${CEE_CURRENT_LIST_DIR}RigFlowDiagSolverInterface.h +${CEE_CURRENT_LIST_DIR}RigFlowDiagInterfaceTools.h +${CEE_CURRENT_LIST_DIR}RigFlowDiagStatCalc.h +${CEE_CURRENT_LIST_DIR}RigFlowDiagVisibleCellsStatCalc.h +${CEE_CURRENT_LIST_DIR}RigAccWellFlowCalculator.h ${CEE_CURRENT_LIST_DIR}RigWellLogExtractor.h ${CEE_CURRENT_LIST_DIR}RigEclipseWellLogExtractor.h ${CEE_CURRENT_LIST_DIR}RigLocalGrid.h @@ -42,12 +50,13 @@ ${CEE_CURRENT_LIST_DIR}RigTimeHistoryResultAccessor.h ${CEE_CURRENT_LIST_DIR}RigCurveDataTools.h ${CEE_CURRENT_LIST_DIR}RigSummaryCaseData.h ${CEE_CURRENT_LIST_DIR}RigLasFileExporter.h +${CEE_CURRENT_LIST_DIR}RigSimulationWellCoordsAndMD.h ) set (SOURCE_GROUP_SOURCE_FILES ${CEE_CURRENT_LIST_DIR}RigActiveCellInfo.cpp ${CEE_CURRENT_LIST_DIR}RigCell.cpp -${CEE_CURRENT_LIST_DIR}RigCaseData.cpp +${CEE_CURRENT_LIST_DIR}RigEclipseCaseData.cpp ${CEE_CURRENT_LIST_DIR}RigGridBase.cpp ${CEE_CURRENT_LIST_DIR}RigGridManager.cpp ${CEE_CURRENT_LIST_DIR}RigResultAccessor.cpp @@ -59,6 +68,13 @@ ${CEE_CURRENT_LIST_DIR}RigCombTransResultAccessor.cpp ${CEE_CURRENT_LIST_DIR}RigCombMultResultAccessor.cpp ${CEE_CURRENT_LIST_DIR}RigResultModifierFactory.cpp ${CEE_CURRENT_LIST_DIR}RigFormationNames.cpp +${CEE_CURRENT_LIST_DIR}RigFlowDiagResultAddress.cpp +${CEE_CURRENT_LIST_DIR}RigFlowDiagResults.cpp +${CEE_CURRENT_LIST_DIR}RigFlowDiagResultFrames.cpp +${CEE_CURRENT_LIST_DIR}RigFlowDiagSolverInterface.cpp +${CEE_CURRENT_LIST_DIR}RigFlowDiagStatCalc.cpp +${CEE_CURRENT_LIST_DIR}RigFlowDiagVisibleCellsStatCalc.cpp +${CEE_CURRENT_LIST_DIR}RigAccWellFlowCalculator.cpp ${CEE_CURRENT_LIST_DIR}RigWellLogExtractor.cpp ${CEE_CURRENT_LIST_DIR}RigEclipseWellLogExtractor.cpp ${CEE_CURRENT_LIST_DIR}RigLocalGrid.cpp @@ -79,6 +95,7 @@ ${CEE_CURRENT_LIST_DIR}RigTimeHistoryResultAccessor.cpp ${CEE_CURRENT_LIST_DIR}RigCurveDataTools.cpp ${CEE_CURRENT_LIST_DIR}RigSummaryCaseData.cpp ${CEE_CURRENT_LIST_DIR}RigLasFileExporter.cpp +${CEE_CURRENT_LIST_DIR}RigSimulationWellCoordsAndMD.cpp ) list(APPEND CODE_HEADER_FILES diff --git a/ApplicationCode/ReservoirDataModel/RigAccWellFlowCalculator.cpp b/ApplicationCode/ReservoirDataModel/RigAccWellFlowCalculator.cpp new file mode 100644 index 0000000000..ab18acd9e3 --- /dev/null +++ b/ApplicationCode/ReservoirDataModel/RigAccWellFlowCalculator.cpp @@ -0,0 +1,861 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RigAccWellFlowCalculator.h" + +#include "RigSingleWellResultsData.h" +#include "RigMainGrid.h" +#include "RigActiveCellInfo.h" +#include "RigFlowDiagResults.h" +#include "RigSimulationWellCoordsAndMD.h" + +//================================================================================================== +/// +/// +//================================================================================================== + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +size_t RigEclCellIndexCalculator::resultCellIndex(size_t gridIndex, size_t gridCellIndex) const +{ + const RigGridBase* grid = m_mainGrid->gridByIndex(gridIndex); + size_t reservoirCellIndex = grid->reservoirCellIndex(gridCellIndex); + + return m_activeCellInfo->cellResultIndex(reservoirCellIndex); +} + + +//================================================================================================== +/// +/// +//================================================================================================== + +#define USE_WELL_PHASE_RATES + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigAccWellFlowCalculator::RigAccWellFlowCalculator(const std::vector< std::vector >& pipeBranchesCLCoords, + const std::vector< std::vector >& pipeBranchesCellIds, + const std::map* >& tracerCellFractionValues, + const RigEclCellIndexCalculator& cellIndexCalculator, + double smallContribThreshold, + bool isProducer) + : m_pipeBranchesCLCoords(pipeBranchesCLCoords), + m_pipeBranchesCellIds(pipeBranchesCellIds), + m_tracerCellFractionValues(&tracerCellFractionValues), + m_cellIndexCalculator(cellIndexCalculator), + m_smallContributionsThreshold(smallContribThreshold), + m_isProducer(isProducer) +{ + m_connectionFlowPrBranch.resize(m_pipeBranchesCellIds.size()); + m_pseudoLengthFlowPrBranch.resize(m_pipeBranchesCellIds.size()); + + + for ( const auto& it: (*m_tracerCellFractionValues) ) m_tracerNames.push_back(it.first); + + m_tracerNames.push_back(RIG_RESERVOIR_TRACER_NAME); + + calculateAccumulatedFlowPrConnection(0, 1); + calculateFlowPrPseudoLength(0, 0.0); + sortTracers(); + groupSmallContributions(); + +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigAccWellFlowCalculator::RigAccWellFlowCalculator(const std::vector< std::vector >& pipeBranchesCLCoords, + const std::vector< std::vector >& pipeBranchesCellIds, + double smallContribThreshold) + : m_pipeBranchesCLCoords(pipeBranchesCLCoords), + m_pipeBranchesCellIds(pipeBranchesCellIds), + m_tracerCellFractionValues(nullptr), + m_cellIndexCalculator(RigEclCellIndexCalculator(nullptr, nullptr)), + m_smallContributionsThreshold(smallContribThreshold), + m_isProducer(true) +{ + m_connectionFlowPrBranch.resize(m_pipeBranchesCellIds.size()); + m_pseudoLengthFlowPrBranch.resize(m_pipeBranchesCellIds.size()); + +#ifdef USE_WELL_PHASE_RATES + m_tracerNames.push_back(RIG_FLOW_OIL_NAME); + m_tracerNames.push_back(RIG_FLOW_GAS_NAME); + m_tracerNames.push_back(RIG_FLOW_WATER_NAME); +#else + m_tracerNames.push_back(RIG_FLOW_TOTAL_NAME); +#endif + + calculateAccumulatedFlowPrConnection(0, 1); + calculateFlowPrPseudoLength(0, 0.0); +#ifdef USE_WELL_PHASE_RATES + sortTracers(); +#endif +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const std::vector& RigAccWellFlowCalculator::connectionNumbersFromTop(size_t branchIdx) const +{ + return m_connectionFlowPrBranch[branchIdx].depthValuesFromTop; +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const std::vector& RigAccWellFlowCalculator::accumulatedTracerFlowPrConnection(const QString& tracerName, size_t branchIdx) const +{ + auto flowPrTracerIt = m_connectionFlowPrBranch[branchIdx].accFlowPrTracer.find(tracerName); + if ( flowPrTracerIt != m_connectionFlowPrBranch[branchIdx].accFlowPrTracer.end()) + { + return flowPrTracerIt->second; + } + else + { + CVF_ASSERT(false); + static std::vector dummy; + return dummy; + } +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const std::vector& RigAccWellFlowCalculator::tracerFlowPrConnection(const QString& tracerName, size_t branchIdx) const +{ + auto flowPrTracerIt = m_connectionFlowPrBranch[branchIdx].flowPrTracer.find(tracerName); + if ( flowPrTracerIt != m_connectionFlowPrBranch[branchIdx].flowPrTracer.end()) + { + return flowPrTracerIt->second; + } + else + { + CVF_ASSERT(false); + static std::vector dummy; + return dummy; + } +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const std::vector& RigAccWellFlowCalculator::pseudoLengthFromTop(size_t branchIdx) const +{ + return m_pseudoLengthFlowPrBranch[branchIdx].depthValuesFromTop; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const std::vector& RigAccWellFlowCalculator::trueVerticalDepth(size_t branchIdx) const +{ + return m_pseudoLengthFlowPrBranch[branchIdx].trueVerticalDepth; +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const std::vector& RigAccWellFlowCalculator::accumulatedTracerFlowPrPseudoLength(const QString& tracerName, size_t branchIdx) const +{ + auto flowPrTracerIt = m_pseudoLengthFlowPrBranch[branchIdx].accFlowPrTracer.find(tracerName); + if ( flowPrTracerIt != m_pseudoLengthFlowPrBranch[branchIdx].accFlowPrTracer.end()) + { + return flowPrTracerIt->second; + } + else + { + CVF_ASSERT(false); + static std::vector dummy; + return dummy; + } +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const std::vector& RigAccWellFlowCalculator::tracerFlowPrPseudoLength(const QString& tracerName, size_t branchIdx) const +{ + auto flowPrTracerIt = m_pseudoLengthFlowPrBranch[branchIdx].flowPrTracer.find(tracerName); + if ( flowPrTracerIt != m_pseudoLengthFlowPrBranch[branchIdx].flowPrTracer.end()) + { + return flowPrTracerIt->second; + } + else + { + CVF_ASSERT(false); + static std::vector dummy; + return dummy; + } +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector > RigAccWellFlowCalculator::totalWellFlowPrTracer() const +{ + std::vector tracerNames = this->tracerNames(); + std::vector > tracerWithValues; + + for (const QString& tracerName: tracerNames) + { + const std::vector& accFlow = this->accumulatedTracerFlowPrConnection(tracerName, 0); + tracerWithValues.push_back(std::make_pair(tracerName, accFlow.back())); + } + + return tracerWithValues; +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector > RigAccWellFlowCalculator::totalTracerFractions() const +{ + std::vector > totalFlows = totalWellFlowPrTracer(); + + float sumTracerFlows = 0.0f; + for ( const auto& tracerVal : totalFlows) + { + sumTracerFlows += tracerVal.second; + } + + if (sumTracerFlows == 0.0) totalFlows.clear(); + + for (auto& tracerPair : totalFlows) + { + tracerPair.second = tracerPair.second/sumTracerFlows; + } + + return totalFlows; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RigAccWellFlowCalculator::isWellFlowConsistent() const +{ + bool isConsistent = true; + for (const std::vector & branch : m_pipeBranchesCellIds) + { + for (const RigWellResultPoint& wrp : branch) + { + isConsistent = isFlowRateConsistent(wrp.flowRate()); + + if (!isConsistent) break; + } + if (!isConsistent) break; + } + return isConsistent; +} +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- + +std::vector RigAccWellFlowCalculator::calculateAccumulatedFractions(const std::vector& accumulatedFlowPrTracer ) const +{ + double totalFlow = 0.0; + for ( double tracerFlow: accumulatedFlowPrTracer) + { + totalFlow += tracerFlow; + } + + std::vector flowFractionsPrTracer(accumulatedFlowPrTracer.size(), 0.0); + + if (totalFlow == 0.0 || !isFlowRateConsistent(totalFlow)) // If we have no accumulated flow, we set all the flow associated to the last tracer, which is the reservoir + { + flowFractionsPrTracer.back() = 1.0; + return flowFractionsPrTracer; + } + + for ( size_t tIdx = 0; tIdx < accumulatedFlowPrTracer.size(); ++tIdx) + { + double tracerFlow = accumulatedFlowPrTracer[tIdx]; + flowFractionsPrTracer[tIdx] = tracerFlow / totalFlow; + } + + return flowFractionsPrTracer; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RigAccWellFlowCalculator::isConnectionFlowConsistent(const RigWellResultPoint &wellCell) const +{ + if (!m_tracerCellFractionValues) return true; // No flow diagnostics. + + return isFlowRateConsistent (wellCell.flowRate()); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RigAccWellFlowCalculator::isFlowRateConsistent(double flowRate) const +{ + if (!m_tracerCellFractionValues) return true; // No flow diagnostics. + + return (flowRate >= 0.0 && m_isProducer) || (flowRate <= 0.0 && !m_isProducer); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigAccWellFlowCalculator::calculateAccumulatedFlowPrConnection(size_t branchIdx, size_t startConnectionNumberFromTop) +{ + const std::vector& branchCells = m_pipeBranchesCellIds[branchIdx]; + + std::vector resPointUniqueIndexFromBottom = wrpToUniqueWrpIndexFromBottom(branchCells); + + size_t prevConnIndx = -1; + int clSegIdx = static_cast(branchCells.size()) - 1; + + std::vector accFlowPrTracer(m_tracerNames.size(), 0.0); + + while ( clSegIdx >= 0 ) + { + // Skip point if referring to the same cell as the previous centerline segment did + { + if ( resPointUniqueIndexFromBottom[clSegIdx] == prevConnIndx ) + { + --clSegIdx; + continue; + } + + prevConnIndx = resPointUniqueIndexFromBottom[clSegIdx]; + } + + // Accumulate the connection-cell's fraction flows + + const RigWellResultPoint& wellCell = branchCells[clSegIdx]; + + std::vector flowPrTracer = calculateWellCellFlowPrTracer(wellCell, accFlowPrTracer); + + addDownStreamBranchFlow(&accFlowPrTracer, flowPrTracer); + + if (!isConnectionFlowConsistent(wellCell)) + { + // Associate all the flow with the reservoir tracer for inconsistent flow direction + flowPrTracer = std::vector (flowPrTracer.size(), 0.0 ); + flowPrTracer.back() = wellCell.flowRate(); + } + + // Add the total accumulated (fraction) flows from any branches connected to this cell + + size_t connNumFromTop = connectionIndexFromTop(resPointUniqueIndexFromBottom, clSegIdx) + startConnectionNumberFromTop; + + std::vector downStreamBranchIndices = findDownStreamBranchIdxs(branchCells[clSegIdx]); + for ( size_t dsBidx : downStreamBranchIndices ) + { + BranchFlow &downStreamBranchFlow = m_connectionFlowPrBranch[dsBidx]; + if ( dsBidx != branchIdx && downStreamBranchFlow.depthValuesFromTop.size() == 0 ) // Not this branch or already calculated + { + calculateAccumulatedFlowPrConnection(dsBidx, connNumFromTop); + std::vector accBranchFlowPrTracer = accumulatedDsBranchFlowPrTracer(downStreamBranchFlow); + addDownStreamBranchFlow(&accFlowPrTracer, accBranchFlowPrTracer); + if (m_pipeBranchesCellIds[dsBidx].size() <= 3) + { + // Short branch. Will not be visible. Show branch flow as addition to this connections direct flow + addDownStreamBranchFlow(&flowPrTracer, accBranchFlowPrTracer); + } + } + } + + // Push back the accumulated result into the storage + + BranchFlow& branchFlow = m_connectionFlowPrBranch[branchIdx]; + + storeFlowOnDepth(&branchFlow, connNumFromTop, accFlowPrTracer, flowPrTracer); + + --clSegIdx; + + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigAccWellFlowCalculator::calculateFlowPrPseudoLength(size_t branchIdx, double startPseudoLengthFromTop) +{ + const std::vector& branchCells = m_pipeBranchesCellIds[branchIdx]; + const std::vector & branchClPoints = m_pipeBranchesCLCoords[branchIdx]; + + RigSimulationWellCoordsAndMD mdCalculator(branchClPoints); + + int clSegIdx = static_cast(branchCells.size()) - 1; + + std::vector accFlowPrTracer(m_tracerNames.size(), 0.0); + + BranchFlow& branchFlow = m_pseudoLengthFlowPrBranch[branchIdx]; + + RigWellResultPoint previousResultPoint; + + while ( clSegIdx >= 0 ) + { + int cellBottomPointIndex = -1; + int cellUpperPointIndex = -1; + int currentSegmentIndex = -1; + + // Find the complete cell span + { + cellBottomPointIndex = clSegIdx + 1; + + previousResultPoint = branchCells[clSegIdx]; + --clSegIdx; + while ( clSegIdx >= 0 && previousResultPoint.isEqual(branchCells[clSegIdx]) ) { --clSegIdx; } + + cellUpperPointIndex = clSegIdx + 1; + currentSegmentIndex = cellUpperPointIndex; + } + const RigWellResultPoint& wellCell = branchCells[currentSegmentIndex]; + std::vector flowPrTracerToAccumulate = calculateWellCellFlowPrTracer( wellCell, accFlowPrTracer); + + double pseudoLengthFromTop_lower = mdCalculator.measuredDepths()[cellBottomPointIndex] + startPseudoLengthFromTop; + double tvd_lower = -mdCalculator.wellPathPoints()[cellBottomPointIndex][2]; + + // Push back the new start-of-cell flow, with the previously accumulated result into the storage + + std::vector flowPrTracer; + if (!isConnectionFlowConsistent(wellCell)) + { + // Associate all the flow with the reservoir tracer for inconsistent flow direction + flowPrTracer = std::vector (flowPrTracerToAccumulate.size(), 0.0 ); + flowPrTracer.back() = wellCell.flowRate(); + } + else + { + flowPrTracer = flowPrTracerToAccumulate; + } + + storeFlowOnDepthWTvd(&branchFlow, pseudoLengthFromTop_lower, tvd_lower, accFlowPrTracer, flowPrTracer); + + // Accumulate the connection-cell's fraction flows + + addDownStreamBranchFlow(&accFlowPrTracer, flowPrTracerToAccumulate); + + double pseudoLengthFromTop_upper = mdCalculator.measuredDepths()[cellUpperPointIndex] + startPseudoLengthFromTop; + double tvd_upper = -mdCalculator.wellPathPoints()[cellUpperPointIndex][2]; + + // Push back the accumulated result into the storage + + storeFlowOnDepthWTvd(&branchFlow, pseudoLengthFromTop_upper, tvd_upper, accFlowPrTracer, flowPrTracer); + + // Add the total accumulated (fraction) flows from any branches connected to this cell + + std::vector downStreamBranchIndices = findDownStreamBranchIdxs(branchCells[cellUpperPointIndex]); + for ( size_t dsBidx : downStreamBranchIndices ) + { + BranchFlow &downStreamBranchFlow = m_pseudoLengthFlowPrBranch[dsBidx]; + if ( dsBidx != branchIdx && downStreamBranchFlow.depthValuesFromTop.size() == 0 ) // Not this branch or already calculated + { + calculateFlowPrPseudoLength(dsBidx, pseudoLengthFromTop_upper); + std::vector accBranchFlowPrTracer = accumulatedDsBranchFlowPrTracer(downStreamBranchFlow); + addDownStreamBranchFlow(&accFlowPrTracer, accBranchFlowPrTracer); + if (m_pipeBranchesCellIds[dsBidx].size() <= 3) + { + // Short branch. Will not be visible. Show branch flow as addition to this connections direct flow + addDownStreamBranchFlow(&flowPrTracer, accBranchFlowPrTracer); + } + } + } + + // Push back the accumulated result after adding the branch result into the storage + + if (downStreamBranchIndices.size()) storeFlowOnDepthWTvd(&branchFlow, pseudoLengthFromTop_upper, tvd_upper, accFlowPrTracer, flowPrTracer); + + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigAccWellFlowCalculator::addDownStreamBranchFlow(std::vector *accFlowPrTracer, + const std::vector& accBranchFlowPrTracer) const +{ + + double totalThisBranchFlow = 0.0; + for ( double tracerFlow: *accFlowPrTracer) + { + totalThisBranchFlow += tracerFlow; + } + + double totalDsBranchFlow = 0.0; + for ( double tracerFlow: accBranchFlowPrTracer) + { + totalDsBranchFlow += tracerFlow; + } + + bool isAccumulationConsistent = isFlowRateConsistent(totalThisBranchFlow); // If inconsistent, is it always only the Reservoir tracer that has the flow ? + bool isBranchConsistent = isFlowRateConsistent(totalDsBranchFlow); + + + if (isAccumulationConsistent == isBranchConsistent) + { + for ( size_t tracerIdx = 0; tracerIdx < (*accFlowPrTracer).size() ; ++tracerIdx ) + { + (*accFlowPrTracer)[tracerIdx] += accBranchFlowPrTracer[tracerIdx]; + } + return; + } + + double totalAccFlow = totalThisBranchFlow + totalDsBranchFlow; + + if (!isFlowRateConsistent(totalAccFlow)) + { + // Reset the accumulated values, as everything must be moved to the "Reservoir" tracer. + for (double& val : (*accFlowPrTracer) ) val = 0.0; + + // Put all flow into the Reservoir tracer + accFlowPrTracer->back() = totalThisBranchFlow + totalDsBranchFlow; + + return; + } + + // We will end up with a consistent accumulated flow, and need to keep the accumulated distribution in this branch + // or to use the ds branch distribution + + std::vector accFractionsPrTracer; + + if ( !isAccumulationConsistent && isBranchConsistent ) + { + accFractionsPrTracer = calculateAccumulatedFractions(accBranchFlowPrTracer); + } + else if ( isAccumulationConsistent && !isBranchConsistent ) + { + accFractionsPrTracer = calculateAccumulatedFractions(*accFlowPrTracer); + } + + // Set the accumulated values to the totalFlow times the tracer fraction selected. + + for (size_t tIdx = 0; tIdx < accFlowPrTracer->size(); ++tIdx) + { + (*accFlowPrTracer)[tIdx] = accFractionsPrTracer[tIdx] * (totalAccFlow); + } + +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigAccWellFlowCalculator::storeFlowOnDepth(BranchFlow* branchFlow, double depthValue, const std::vector& accFlowPrTracer, const std::vector& flowPrTracer) +{ + size_t tracerIdx = 0; + for ( const auto & tracerName: m_tracerNames ) + { + branchFlow->accFlowPrTracer[tracerName].push_back(accFlowPrTracer[tracerIdx]); + branchFlow->flowPrTracer[tracerName].push_back(flowPrTracer[tracerIdx]); + tracerIdx++; + } + + branchFlow->depthValuesFromTop.push_back(depthValue); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigAccWellFlowCalculator::storeFlowOnDepthWTvd(BranchFlow *branchFlow, double depthValue, double trueVerticalDepth, const std::vector& accFlowPrTracer, const std::vector& flowPrTracer) +{ + size_t tracerIdx = 0; + for ( const auto & tracerName: m_tracerNames ) + { + branchFlow->accFlowPrTracer[tracerName].push_back(accFlowPrTracer[tracerIdx]); + branchFlow->flowPrTracer[tracerName].push_back(flowPrTracer[tracerIdx]); + tracerIdx++; + } + + branchFlow->depthValuesFromTop.push_back(depthValue); + branchFlow->trueVerticalDepth.push_back(trueVerticalDepth); +} + +std::vector RigAccWellFlowCalculator::accumulatedDsBranchFlowPrTracer(const BranchFlow &downStreamBranchFlow) const +{ + std::vector accBranchFlowPrTracer(m_tracerNames.size(), 0.0); + + size_t tracerIdx = 0; + for ( const auto & tracerName: m_tracerNames ) + { + const auto trNameAccFlowsPair = downStreamBranchFlow.accFlowPrTracer.find(tracerName); + if ( trNameAccFlowsPair != downStreamBranchFlow.accFlowPrTracer.end()) + { + accBranchFlowPrTracer[tracerIdx] = trNameAccFlowsPair->second.back(); + } + tracerIdx++; + } + + return accBranchFlowPrTracer; +} + +//-------------------------------------------------------------------------------------------------- +/// Calculate the flow pr tracer. If inconsistent flow, keep the existing fractions constant +//-------------------------------------------------------------------------------------------------- +std::vector RigAccWellFlowCalculator::calculateWellCellFlowPrTracer(const RigWellResultPoint& wellCell, + const std::vector& currentAccumulatedFlowPrTracer) const +{ + std::vector flowPrTracer(m_tracerNames.size(), 0.0); + + if ( !isConnectionFlowConsistent(wellCell) ) + { + double flowRate = wellCell.flowRate(); + flowPrTracer = calculateAccumulatedFractions(currentAccumulatedFlowPrTracer); + for (double & accFraction: flowPrTracer) + { + accFraction *= flowRate; + } + + return flowPrTracer; + } + + if ( m_tracerCellFractionValues ) + { + if ( wellCell.isCell() && wellCell.m_isOpen ) + { + size_t resCellIndex = m_cellIndexCalculator.resultCellIndex(wellCell.m_gridIndex, + wellCell.m_gridCellIndex); + size_t tracerIdx = 0; + double totalTracerFractionInCell = 0.0; + for ( const auto & tracerFractionValsPair: (*m_tracerCellFractionValues) ) + { + const std::vector* fractionVals = tracerFractionValsPair.second ; + if ( fractionVals ) + { + double cellTracerFraction = (*fractionVals)[resCellIndex]; + if ( cellTracerFraction != HUGE_VAL && cellTracerFraction == cellTracerFraction ) + { + double tracerFlow = cellTracerFraction * wellCell.flowRate(); + flowPrTracer[tracerIdx] = tracerFlow; + + totalTracerFractionInCell += cellTracerFraction; + } + } + tracerIdx++; + } + + double reservoirFraction = 1.0 - totalTracerFractionInCell; + double reservoirTracerFlow = reservoirFraction * wellCell.flowRate(); + flowPrTracer[tracerIdx] = reservoirTracerFlow; + } + } + else + { + #ifdef USE_WELL_PHASE_RATES + flowPrTracer[0] = wellCell.oilRate(); + flowPrTracer[1] = wellCell.gasRate(); + flowPrTracer[2] = wellCell.waterRate(); + #else + flowPrTracer[0] = wellCell.flowRate(); + #endif + } + + return flowPrTracer; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RigAccWellFlowCalculator::wrpToUniqueWrpIndexFromBottom(const std::vector &branchCells) const +{ + std::vector resPointToConnectionIndexFromBottom; + resPointToConnectionIndexFromBottom.resize(branchCells.size(), -1); + + size_t connIdxFromBottom = 0; + int clSegIdx = static_cast(branchCells.size()) - 1; + + if (clSegIdx < 0) return resPointToConnectionIndexFromBottom; + + size_t prevGridIdx = branchCells[clSegIdx].m_gridIndex; + size_t prevGridCellIdx = branchCells[clSegIdx].m_gridCellIndex; + int prevErtSegId = branchCells[clSegIdx].m_ertSegmentId; + int prevErtBranchId = branchCells[clSegIdx].m_ertBranchId; + + while ( clSegIdx >= 0 ) + { + if ( branchCells[clSegIdx].isValid() + && ( branchCells[clSegIdx].m_gridIndex != prevGridIdx + || branchCells[clSegIdx].m_gridCellIndex != prevGridCellIdx + || branchCells[clSegIdx].m_ertSegmentId != prevErtSegId + || branchCells[clSegIdx].m_ertBranchId != prevErtBranchId) ) + { + ++connIdxFromBottom; + + prevGridIdx = branchCells[clSegIdx].m_gridIndex ; + prevGridCellIdx = branchCells[clSegIdx].m_gridCellIndex; + prevErtSegId = branchCells[clSegIdx].m_ertSegmentId; + prevErtBranchId = branchCells[clSegIdx].m_ertBranchId; + } + + resPointToConnectionIndexFromBottom[clSegIdx] = connIdxFromBottom; + + --clSegIdx; + } + + return resPointToConnectionIndexFromBottom; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +size_t RigAccWellFlowCalculator::connectionIndexFromTop(const std::vector& resPointToConnectionIndexFromBottom, size_t clSegIdx) +{ + return resPointToConnectionIndexFromBottom.front() - resPointToConnectionIndexFromBottom[clSegIdx]; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RigAccWellFlowCalculator::findDownStreamBranchIdxs(const RigWellResultPoint& connectionPoint) const +{ + std::vector downStreamBranchIdxs; + + for ( size_t bIdx = 0; bIdx < m_pipeBranchesCellIds.size(); ++bIdx ) + { + if ( m_pipeBranchesCellIds[bIdx][0].m_gridIndex == connectionPoint.m_gridIndex + && m_pipeBranchesCellIds[bIdx][0].m_gridCellIndex == connectionPoint.m_gridCellIndex + && m_pipeBranchesCellIds[bIdx][0].m_ertBranchId == connectionPoint.m_ertBranchId + && m_pipeBranchesCellIds[bIdx][0].m_ertSegmentId == connectionPoint.m_ertSegmentId) + { + downStreamBranchIdxs.push_back(bIdx); + } + } + return downStreamBranchIdxs; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- + +void RigAccWellFlowCalculator::sortTracers() +{ + std::multimap sortedTracers; + for (const QString& tracerName: m_tracerNames) + { + const std::vector& mainBranchAccFlow = accumulatedTracerFlowPrConnection(tracerName, 0); + + double totalFlow = 0.0; + + if (mainBranchAccFlow.size()) totalFlow = - fabs( mainBranchAccFlow.back() ); // Based on size in reverse order (biggest to least) + + sortedTracers.insert({totalFlow, tracerName}); + } + + m_tracerNames.clear(); + for (const auto& tracerPair : sortedTracers) + { + m_tracerNames.push_back(tracerPair.second); + } +} + +//-------------------------------------------------------------------------------------------------- +/// Concatenate small tracers into an "Other" group +//-------------------------------------------------------------------------------------------------- +void RigAccWellFlowCalculator::groupSmallContributions() +{ + + if ( ! (m_smallContributionsThreshold > 0.0) ) return; + + // Find the tracers we need to group + + std::vector tracersToGroup; + { + bool hasConsistentWellFlow = isWellFlowConsistent(); + + std::vector > totalTracerFractions = this->totalTracerFractions(); + + if ( totalTracerFractions.size() < 5 ) return; // No grouping for few legend items + + + for ( const auto& tracerPair : totalTracerFractions ) + { + if ( fabs(tracerPair.second) <= m_smallContributionsThreshold + && (hasConsistentWellFlow || tracerPair.first != RIG_RESERVOIR_TRACER_NAME) ) // Do not group the Reservoir tracer if the well flow is inconsistent, because cross flow is shown as the reservoir fraction + { + tracersToGroup.push_back(tracerPair.first); + } + } + } + + if ( tracersToGroup.size() < 2 ) return; // Must at least group two ... + + // Concatenate the values for each branch, erasing the tracers being grouped, replaced with the concatenated values + + for ( BranchFlow& brRes : m_connectionFlowPrBranch ) + { + groupSmallTracers( &brRes.accFlowPrTracer, tracersToGroup); + groupSmallTracers( &brRes.flowPrTracer, tracersToGroup); + } + + for ( BranchFlow& brRes : m_pseudoLengthFlowPrBranch ) + { + groupSmallTracers( &brRes.accFlowPrTracer, tracersToGroup); + groupSmallTracers( &brRes.flowPrTracer, tracersToGroup); + } + + // Remove the grouped tracer names from the tracerName list, and replace with the "Others" name + + std::vector filteredTracernames; + for ( const QString& tracerName: m_tracerNames ) + { + bool isDeleted = false; + for ( const QString& deletedTracerName: tracersToGroup ) + { + if ( tracerName == deletedTracerName ) { isDeleted = true; break; } + } + + if ( !isDeleted ) filteredTracernames.push_back(tracerName); + } + + m_tracerNames.swap(filteredTracernames); + m_tracerNames.push_back(RIG_TINY_TRACER_GROUP_NAME); + +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigAccWellFlowCalculator::groupSmallTracers(std::map >* branchFlowSet, const std::vector& tracersToGroup) +{ + if ( branchFlowSet->empty() ) return; + + size_t depthCount = branchFlowSet->begin()->second.size(); + std::vector groupedAccFlowValues(depthCount, 0.0); + + for ( const QString& tracername:tracersToGroup ) + { + auto it = branchFlowSet->find(tracername); + + if ( it != branchFlowSet->end() ) + { + const std::vector& tracerVals = it->second; + for ( size_t cIdx = 0; cIdx < groupedAccFlowValues.size(); ++cIdx ) + { + groupedAccFlowValues[cIdx] += tracerVals[cIdx]; + } + } + + branchFlowSet->erase(it); + } + + (*branchFlowSet)[RIG_TINY_TRACER_GROUP_NAME] = groupedAccFlowValues; +} + diff --git a/ApplicationCode/ReservoirDataModel/RigAccWellFlowCalculator.h b/ApplicationCode/ReservoirDataModel/RigAccWellFlowCalculator.h new file mode 100644 index 0000000000..4c2027cb71 --- /dev/null +++ b/ApplicationCode/ReservoirDataModel/RigAccWellFlowCalculator.h @@ -0,0 +1,145 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once +#include +#include +//================================================================================================== +/// +/// +//================================================================================================== + +class RigMainGrid; +class RigActiveCellInfo; + +class RigEclCellIndexCalculator +{ +public: + RigEclCellIndexCalculator(const RigMainGrid* mainGrid, const RigActiveCellInfo* activeCellInfo) + : m_mainGrid(mainGrid), m_activeCellInfo(activeCellInfo) + {} + + size_t resultCellIndex(size_t gridIndex, size_t gridCellIndex) const; + +private: + const RigMainGrid* m_mainGrid; + const RigActiveCellInfo* m_activeCellInfo; +}; + +//================================================================================================== +/// +/// +//================================================================================================== + +#include +#include "cvfBase.h" +#include "cvfVector3.h" + +struct RigWellResultPoint; + +class RigAccWellFlowCalculator +{ + +public: + RigAccWellFlowCalculator(const std::vector< std::vector >& pipeBranchesCLCoords, + const std::vector< std::vector >& pipeBranchesCellIds, + const std::map* >& tracerCellFractionValues, + const RigEclCellIndexCalculator& cellIndexCalculator, + double smallContribThreshold, + bool isProducer); + + RigAccWellFlowCalculator(const std::vector< std::vector >& pipeBranchesCLCoords, + const std::vector< std::vector >& pipeBranchesCellIds, + double smallContribThreshold); + + const std::vector& connectionNumbersFromTop(size_t branchIdx) const; + const std::vector& accumulatedTracerFlowPrConnection(const QString& tracerName, size_t branchIdx) const; + const std::vector& tracerFlowPrConnection(const QString& tracerName, size_t branchIdx) const; + + const std::vector& pseudoLengthFromTop(size_t branchIdx) const; + const std::vector& trueVerticalDepth(size_t branchIdx) const; + const std::vector& accumulatedTracerFlowPrPseudoLength(const QString& tracerName, size_t branchIdx) const; + const std::vector& tracerFlowPrPseudoLength(const QString& tracerName, size_t branchIdx) const; + + + const std::vector& tracerNames() const { return m_tracerNames;} + + std::vector > totalTracerFractions() const; + +private: + bool isConnectionFlowConsistent(const RigWellResultPoint &wellCell) const; + bool isFlowRateConsistent(double flowRate) const; + + void calculateAccumulatedFlowPrConnection(size_t branchIdx, + size_t startConnectionNumberFromTop); + void calculateFlowPrPseudoLength(size_t branchIdx, + double startPseudoLengthFromTop); + + std::vector calculateWellCellFlowPrTracer(const RigWellResultPoint& wellCell, + const std::vector& currentAccumulatedFlowPrTracer ) const; + void sortTracers(); + void groupSmallContributions(); + + void groupSmallTracers(std::map >* branchFlowSet, + const std::vector& tracersToGroup); + + bool isWellFlowConsistent() const; + std::vector calculateAccumulatedFractions(const std::vector& accumulatedFlowPrTracer) const; + std::vector wrpToUniqueWrpIndexFromBottom(const std::vector &branchCells) const; + static size_t connectionIndexFromTop( const std::vector& resPointToConnectionIndexFromBottom, size_t clSegIdx) ; + std::vector findDownStreamBranchIdxs( const RigWellResultPoint& connectionPoint) const; + + std::vector > totalWellFlowPrTracer() const; + + + const std::vector< std::vector >& m_pipeBranchesCLCoords; + const std::vector< std::vector >& m_pipeBranchesCellIds; + const std::map* >* m_tracerCellFractionValues; + RigEclCellIndexCalculator m_cellIndexCalculator; + std::vector m_tracerNames; + double m_smallContributionsThreshold; + bool m_isProducer; + + struct BranchFlow + { + std::vector depthValuesFromTop; + std::vector trueVerticalDepth; + std::map > accFlowPrTracer; + std::map > flowPrTracer; + }; + + void storeFlowOnDepth(BranchFlow *branchFlow, + double depthValue, + const std::vector& accFlowPrTracer, + const std::vector& flowPrTracer); + void storeFlowOnDepthWTvd(BranchFlow *branchFlow, + double depthValue, + double trueVerticalDepth, + const std::vector& accFlowPrTracer, + const std::vector& flowPrTracer); + + std::vector accumulatedDsBranchFlowPrTracer(const BranchFlow &downStreamBranchFlow) const; + void addDownStreamBranchFlow(std::vector *accFlowPrTracer, + const std::vector& accBranchFlowPrTracer) const; + + std::vector< BranchFlow > m_connectionFlowPrBranch; + std::vector< BranchFlow > m_pseudoLengthFlowPrBranch; + +}; + + diff --git a/ApplicationCode/ReservoirDataModel/RigActiveCellInfo.cpp b/ApplicationCode/ReservoirDataModel/RigActiveCellInfo.cpp index 9354aea2ba..0ff7038692 100644 --- a/ApplicationCode/ReservoirDataModel/RigActiveCellInfo.cpp +++ b/ApplicationCode/ReservoirDataModel/RigActiveCellInfo.cpp @@ -203,6 +203,14 @@ bool RigActiveCellInfo::isCoarseningActive() const return m_reservoirCellResultCount != m_reservoirActiveCellCount; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigActiveCellInfo::GridActiveCellCounts::GridActiveCellCounts() +: m_activeCellCount(0) +{ +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ReservoirDataModel/RigActiveCellInfo.h b/ApplicationCode/ReservoirDataModel/RigActiveCellInfo.h index 87a9224f9f..0a2b3e7b8a 100644 --- a/ApplicationCode/ReservoirDataModel/RigActiveCellInfo.h +++ b/ApplicationCode/ReservoirDataModel/RigActiveCellInfo.h @@ -61,6 +61,8 @@ class RigActiveCellInfo : public cvf::Object class GridActiveCellCounts { public: + GridActiveCellCounts(); + size_t activeCellCount() const; void setActiveCellCount(size_t activeCellCount); diff --git a/ApplicationCode/ReservoirDataModel/RigActiveCellsResultAccessor.cpp b/ApplicationCode/ReservoirDataModel/RigActiveCellsResultAccessor.cpp index 2db41e94b7..f09a8d8fc8 100644 --- a/ApplicationCode/ReservoirDataModel/RigActiveCellsResultAccessor.cpp +++ b/ApplicationCode/ReservoirDataModel/RigActiveCellsResultAccessor.cpp @@ -25,7 +25,7 @@ #include -RigActiveCellsResultAccessor::RigActiveCellsResultAccessor(const RigGridBase* grid, std::vector* reservoirResultValues, const RigActiveCellInfo* activeCellInfo) +RigActiveCellsResultAccessor::RigActiveCellsResultAccessor(const RigGridBase* grid, const std::vector* reservoirResultValues, const RigActiveCellInfo* activeCellInfo) : m_grid(grid), m_reservoirResultValues(reservoirResultValues), m_activeCellInfo(activeCellInfo) diff --git a/ApplicationCode/ReservoirDataModel/RigActiveCellsResultAccessor.h b/ApplicationCode/ReservoirDataModel/RigActiveCellsResultAccessor.h index 2f48e6e682..41a27903a3 100644 --- a/ApplicationCode/ReservoirDataModel/RigActiveCellsResultAccessor.h +++ b/ApplicationCode/ReservoirDataModel/RigActiveCellsResultAccessor.h @@ -31,7 +31,7 @@ class RigActiveCellInfo; class RigActiveCellsResultAccessor : public RigResultAccessor { public: - RigActiveCellsResultAccessor(const RigGridBase* grid, std::vector* reservoirResultValues, const RigActiveCellInfo* activeCellInfo); + RigActiveCellsResultAccessor(const RigGridBase* grid, const std::vector* reservoirResultValues, const RigActiveCellInfo* activeCellInfo); virtual double cellScalar(size_t gridLocalCellIndex) const; virtual double cellFaceScalar(size_t gridLocalCellIndex, cvf::StructGridInterface::FaceType faceId) const; @@ -42,6 +42,6 @@ class RigActiveCellsResultAccessor : public RigResultAccessor private: const RigActiveCellInfo* m_activeCellInfo; const RigGridBase* m_grid; - std::vector* m_reservoirResultValues; + const std::vector* m_reservoirResultValues; }; diff --git a/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.cpp b/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.cpp index b2ef4e3cec..60ece82835 100644 --- a/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.cpp +++ b/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.cpp @@ -373,13 +373,27 @@ bool RigCaseCellResultsData::isUsingGlobalActiveIndex(size_t scalarResultIndex) return true; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RigCaseCellResultsData::hasFlowDiagUsableFluxes() const +{ + QStringList dynResVarNames = resultNames(RimDefines::DYNAMIC_NATIVE); + + bool hasFlowFluxes = true; + hasFlowFluxes = dynResVarNames.contains("FLRWATI+"); + hasFlowFluxes = hasFlowFluxes && dynResVarNames.contains("FLROILI+") || dynResVarNames.contains("FLRGASI+"); + + return hasFlowFluxes; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- QDateTime RigCaseCellResultsData::timeStepDate(size_t scalarResultIndex, size_t timeStepIndex) const { - if (scalarResultIndex < m_resultInfos.size() && (size_t)(m_resultInfos[scalarResultIndex].m_timeStepDates.size()) > timeStepIndex) - return m_resultInfos[scalarResultIndex].m_timeStepDates[static_cast(timeStepIndex)]; + if (scalarResultIndex < m_resultInfos.size() && m_resultInfos[scalarResultIndex].m_timeStepDates.size() > timeStepIndex) + return m_resultInfos[scalarResultIndex].m_timeStepDates[timeStepIndex]; else return QDateTime(); } @@ -389,8 +403,8 @@ QDateTime RigCaseCellResultsData::timeStepDate(size_t scalarResultIndex, size_t //-------------------------------------------------------------------------------------------------- std::vector RigCaseCellResultsData::timeStepDates(size_t scalarResultIndex) const { - if (scalarResultIndex < m_resultInfos.size() ) - return m_resultInfos[scalarResultIndex].m_timeStepDates; + if (scalarResultIndex < m_resultInfos.size()) + return m_resultInfos[scalarResultIndex].m_timeStepDates; else return std::vector(); } @@ -398,11 +412,73 @@ std::vector RigCaseCellResultsData::timeStepDates(size_t scalarResult //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RigCaseCellResultsData::setTimeStepDates(size_t scalarResultIndex, const std::vector& dates) +std::vector RigCaseCellResultsData::timeStepDates() const +{ + size_t scalarResWithMostTimeSteps = cvf::UNDEFINED_SIZE_T; + maxTimeStepCount(&scalarResWithMostTimeSteps); + + return timeStepDates(scalarResWithMostTimeSteps); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RigCaseCellResultsData::daysSinceSimulationStart() const +{ + size_t scalarResWithMostTimeSteps = cvf::UNDEFINED_SIZE_T; + maxTimeStepCount(&scalarResWithMostTimeSteps); + + return daysSinceSimulationStart(scalarResWithMostTimeSteps); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RigCaseCellResultsData::daysSinceSimulationStart(size_t scalarResultIndex) const +{ + if (scalarResultIndex < m_resultInfos.size()) + { + return m_resultInfos[scalarResultIndex].m_daysSinceSimulationStart; + } + else + { + return std::vector(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +int RigCaseCellResultsData::reportStepNumber(size_t scalarResultIndex, size_t timeStepIndex) const +{ + if (scalarResultIndex < m_resultInfos.size() && m_resultInfos[scalarResultIndex].m_timeStepReportNumbers.size() > timeStepIndex) + return m_resultInfos[scalarResultIndex].m_timeStepReportNumbers[timeStepIndex]; + else + return -1; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RigCaseCellResultsData::reportStepNumbers(size_t scalarResultIndex) const +{ + if (scalarResultIndex < m_resultInfos.size() ) + return m_resultInfos[scalarResultIndex].m_timeStepReportNumbers; + else + return std::vector(); + +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigCaseCellResultsData::setTimeStepDates(size_t scalarResultIndex, const std::vector& dates, const std::vector& daysSinceSimulationStart, const std::vector& reportStepNumbers) { CVF_ASSERT(scalarResultIndex < m_resultInfos.size() ); m_resultInfos[scalarResultIndex].m_timeStepDates = dates; + m_resultInfos[scalarResultIndex].m_daysSinceSimulationStart = daysSinceSimulationStart; + m_resultInfos[scalarResultIndex].m_timeStepReportNumbers = reportStepNumbers; std::vector< std::vector >& dataValues = this->cellScalarResults(scalarResultIndex); dataValues.resize(dates.size()); diff --git a/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.h b/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.h index 73038a9089..2723669748 100644 --- a/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.h +++ b/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.h @@ -23,7 +23,8 @@ #include "RifReaderInterface.h" #include "RimDefines.h" -#include "RigStatisticsDataCache.h" + +#include "cvfCollection.h" #include @@ -33,6 +34,7 @@ class RifReaderInterface; class RigMainGrid; class RigActiveCellInfo; +class RigStatisticsDataCache; //================================================================================================== /// Class containing the results for the complete number of active cells. Both main grid and LGR's @@ -40,7 +42,7 @@ class RigActiveCellInfo; class RigCaseCellResultsData : public cvf::Object { public: - RigCaseCellResultsData(RigMainGrid* ownerGrid); + explicit RigCaseCellResultsData(RigMainGrid* ownerGrid); void setMainGrid(RigMainGrid* ownerGrid); void setActiveCellInfo(RigActiveCellInfo* activeCellInfo) { m_activeCellInfo = activeCellInfo;} @@ -69,10 +71,16 @@ class RigCaseCellResultsData : public cvf::Object size_t maxTimeStepCount(size_t* scalarResultIndex = NULL) const; QStringList resultNames(RimDefines::ResultCatType type) const; bool isUsingGlobalActiveIndex(size_t scalarResultIndex) const; + bool hasFlowDiagUsableFluxes() const; + std::vector timeStepDates() const; QDateTime timeStepDate(size_t scalarResultIndex, size_t timeStepIndex) const; std::vector timeStepDates(size_t scalarResultIndex) const; - void setTimeStepDates(size_t scalarResultIndex, const std::vector& dates); + std::vector daysSinceSimulationStart() const; + std::vector daysSinceSimulationStart(size_t scalarResultIndex) const; + int reportStepNumber(size_t scalarResultIndex, size_t timeStepIndex) const; + std::vector reportStepNumbers(size_t scalarResultIndex) const; + void setTimeStepDates(size_t scalarResultIndex, const std::vector& dates, const std::vector& daysSinceSimulationStart, const std::vector& reportStepNumbers); // Find or create a slot for the results @@ -112,6 +120,8 @@ class RigCaseCellResultsData : public cvf::Object QString m_resultName; size_t m_gridScalarResultIndex; std::vector m_timeStepDates; + std::vector m_timeStepReportNumbers; + std::vector m_daysSinceSimulationStart; }; const std::vector& infoForEachResultIndex() { return m_resultInfos;} diff --git a/ApplicationCode/ReservoirDataModel/RigCaseData.cpp b/ApplicationCode/ReservoirDataModel/RigCaseData.cpp deleted file mode 100644 index 04ca8067e8..0000000000 --- a/ApplicationCode/ReservoirDataModel/RigCaseData.cpp +++ /dev/null @@ -1,611 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#include "RigCaseData.h" - -#include "RigCaseCellResultsData.h" -#include "RigFormationNames.h" -#include "RigMainGrid.h" -#include "RigResultAccessorFactory.h" - -#include - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RigCaseData::RigCaseData() -{ - m_mainGrid = new RigMainGrid(); - - m_matrixModelResults = new RigCaseCellResultsData(m_mainGrid.p()); - m_fractureModelResults = new RigCaseCellResultsData(m_mainGrid.p()); - - m_activeCellInfo = new RigActiveCellInfo; - m_fractureActiveCellInfo = new RigActiveCellInfo; - - m_matrixModelResults->setActiveCellInfo(m_activeCellInfo.p()); - m_fractureModelResults->setActiveCellInfo(m_fractureActiveCellInfo.p()); - - m_unitsType = UNITS_METRIC; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RigCaseData::~RigCaseData() -{ - -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RigCaseData::setMainGrid(RigMainGrid* mainGrid) -{ - m_mainGrid = mainGrid; - - m_matrixModelResults->setMainGrid(m_mainGrid.p()); - m_fractureModelResults->setMainGrid(m_mainGrid.p()); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RigCaseData::allGrids(std::vector* grids) -{ - CVF_ASSERT(grids); - - if (m_mainGrid.isNull()) - { - return; - } - - size_t i; - for (i = 0; i < m_mainGrid->gridCount(); i++) - { - grids->push_back(m_mainGrid->gridByIndex(i)); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RigCaseData::allGrids(std::vector* grids) const -{ - CVF_ASSERT(grids); - - if (m_mainGrid.isNull()) - { - return; - } - - size_t i; - for (i = 0; i < m_mainGrid->gridCount(); i++) - { - grids->push_back(m_mainGrid->gridByIndex(i)); - } -} - -//-------------------------------------------------------------------------------------------------- -/// Get grid by index. The main grid has index 0, so the first lgr has index 1 -//-------------------------------------------------------------------------------------------------- -const RigGridBase* RigCaseData::grid(size_t index) const -{ - CVF_ASSERT(m_mainGrid.notNull()); - return m_mainGrid->gridByIndex(index); -} - - -//-------------------------------------------------------------------------------------------------- -/// Get grid by index. The main grid has index 0, so the first lgr has index 1 -//-------------------------------------------------------------------------------------------------- -RigGridBase* RigCaseData::grid(size_t index) -{ - CVF_ASSERT(m_mainGrid.notNull()); - return m_mainGrid->gridByIndex(index); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -size_t RigCaseData::gridCount() const -{ - CVF_ASSERT(m_mainGrid.notNull()); - return m_mainGrid->gridCount(); -} - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RigCaseData::computeWellCellsPrGrid() -{ - // If we have computed this already, return - if (m_wellCellsInGrid.size()) return; - - std::vector grids; - this->allGrids(&grids); - - // Debug code used to display grid names and grid sizes -/* - size_t totCellCount = 0; - for (auto g : grids) - { - qDebug() << g->gridName().data(); - qDebug() << g->cellCountI() << " " << g->cellCountJ() << " " << g->cellCountK() << " "; - - size_t cellCount = g->cellCount(); - totCellCount += cellCount; - qDebug() << cellCount; - - qDebug() << "\n"; - } - - qDebug() << "\nTotal cell count " << totCellCount; -*/ - - size_t gIdx; - - // Allocate and initialize the arrays - - m_wellCellsInGrid.resize(grids.size()); - m_gridCellToResultWellIndex.resize(grids.size()); - - for (gIdx = 0; gIdx < grids.size(); ++gIdx) - { - if (m_wellCellsInGrid[gIdx].isNull() || m_wellCellsInGrid[gIdx]->size() != grids[gIdx]->cellCount()) - { - m_wellCellsInGrid[gIdx] = new cvf::UByteArray; - m_wellCellsInGrid[gIdx]->resize(grids[gIdx]->cellCount()); - - m_gridCellToResultWellIndex[gIdx] = new cvf::UIntArray; - m_gridCellToResultWellIndex[gIdx]->resize(grids[gIdx]->cellCount()); - } - m_wellCellsInGrid[gIdx]->setAll(false); - m_gridCellToResultWellIndex[gIdx]->setAll(cvf::UNDEFINED_UINT); - } - - // Fill arrays with data - size_t wIdx; - for (wIdx = 0; wIdx < m_wellResults.size(); ++wIdx) - { - size_t tIdx; - for (tIdx = 0; tIdx < m_wellResults[wIdx]->m_wellCellsTimeSteps.size(); ++tIdx) - { - RigWellResultFrame& wellCells = m_wellResults[wIdx]->m_wellCellsTimeSteps[tIdx]; - - // Well head - { - size_t gridIndex = wellCells.m_wellHead.m_gridIndex; - size_t gridCellIndex = wellCells.m_wellHead.m_gridCellIndex; - - if (gridIndex < m_wellCellsInGrid.size() && gridCellIndex < m_wellCellsInGrid[gridIndex]->size()) - { - size_t reservoirCellIndex = grids[gridIndex]->reservoirCellIndex(gridCellIndex); - if (m_activeCellInfo->isActive(reservoirCellIndex) - || m_fractureActiveCellInfo->isActive(reservoirCellIndex)) - { - m_wellCellsInGrid[gridIndex]->set(gridCellIndex, true); - m_gridCellToResultWellIndex[gridIndex]->set(gridCellIndex, static_cast(wIdx)); - } - } - } - - // Well result branches - for (size_t sIdx = 0; sIdx < wellCells.m_wellResultBranches.size(); ++sIdx) - { - RigWellResultBranch& wellSegment = wellCells.m_wellResultBranches[sIdx]; - size_t cdIdx; - for (cdIdx = 0; cdIdx < wellSegment.m_branchResultPoints.size(); ++cdIdx) - { - size_t gridIndex = wellSegment.m_branchResultPoints[cdIdx].m_gridIndex; - size_t gridCellIndex = wellSegment.m_branchResultPoints[cdIdx].m_gridCellIndex; - - if(gridIndex < m_wellCellsInGrid.size() && gridCellIndex < m_wellCellsInGrid[gridIndex]->size()) - { - // NOTE : We do not check if the grid cell is active as we do for well head. - // If we add test for active cell, thorough testing and verification of the new behaviour must be adressed - - m_wellCellsInGrid[gridIndex]->set(gridCellIndex, true); - m_gridCellToResultWellIndex[gridIndex]->set(gridCellIndex, static_cast(wIdx)); - } - } - } - } - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RigCaseData::setWellResults(const cvf::Collection& data) -{ - m_wellResults = data; - m_wellCellsInGrid.clear(); - m_gridCellToResultWellIndex.clear(); - - computeWellCellsPrGrid(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -const cvf::UByteArray* RigCaseData::wellCellsInGrid(size_t gridIndex) -{ - computeWellCellsPrGrid(); - CVF_ASSERT(gridIndex < m_wellCellsInGrid.size()); - - return m_wellCellsInGrid[gridIndex].p(); -} - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -const cvf::UIntArray* RigCaseData::gridCellToResultWellIndex(size_t gridIndex) -{ - computeWellCellsPrGrid(); - CVF_ASSERT(gridIndex < m_gridCellToResultWellIndex.size()); - - return m_gridCellToResultWellIndex[gridIndex].p(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RigCell& RigCaseData::cellFromWellResultCell(const RigWellResultPoint& wellResultCell) -{ - CVF_ASSERT(wellResultCell.isCell()); - - size_t gridIndex = wellResultCell.m_gridIndex; - size_t gridCellIndex = wellResultCell.m_gridCellIndex; - - std::vector grids; - allGrids(&grids); - - return grids[gridIndex]->cell(gridCellIndex); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RigCaseData::findSharedSourceFace(cvf::StructGridInterface::FaceType& sharedSourceFace,const RigWellResultPoint& sourceWellCellResult, const RigWellResultPoint& otherWellCellResult) const -{ - size_t gridIndex = sourceWellCellResult.m_gridIndex; - size_t gridCellIndex = sourceWellCellResult.m_gridCellIndex; - - size_t otherGridIndex = otherWellCellResult.m_gridIndex; - size_t otherGridCellIndex = otherWellCellResult.m_gridCellIndex; - - if (gridIndex != otherGridIndex) return false; - - std::vector grids; - allGrids(&grids); - - const RigGridBase* grid = grids[gridIndex]; - size_t i, j, k; - grid->ijkFromCellIndex(gridCellIndex, &i, &j, &k); - - size_t faceIdx; - for (faceIdx = 0; faceIdx < 6; faceIdx++) - { - cvf::StructGridInterface::FaceType sourceFace = static_cast(faceIdx); - - size_t ni, nj, nk; - grid->neighborIJKAtCellFace(i, j, k, sourceFace, &ni, &nj, &nk); - - if (grid->isCellValid(ni, nj, nk)) - { - - size_t neighborCellIndex = grid->cellIndexFromIJK(ni, nj, nk); - - if (neighborCellIndex == otherGridCellIndex) - { - sharedSourceFace = sourceFace; - return true; - } - } - } - - return false; -} - - - -//-------------------------------------------------------------------------------------------------- -/// Helper class used to find min/max range for valid and active cells -//-------------------------------------------------------------------------------------------------- -class CellRangeBB -{ -public: - CellRangeBB() - : m_min(cvf::UNDEFINED_SIZE_T, cvf::UNDEFINED_SIZE_T, cvf::UNDEFINED_SIZE_T), - m_max(cvf::Vec3st::ZERO) - { - - } - - void add(size_t i, size_t j, size_t k) - { - if (i < m_min.x()) m_min.x() = i; - if (j < m_min.y()) m_min.y() = j; - if (k < m_min.z()) m_min.z() = k; - - if (i > m_max.x()) m_max.x() = i; - if (j > m_max.y()) m_max.y() = j; - if (k > m_max.z()) m_max.z() = k; - } - -public: - cvf::Vec3st m_min; - cvf::Vec3st m_max; -}; - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RigCaseData::computeActiveCellIJKBBox() -{ - if (m_mainGrid.notNull() && m_activeCellInfo.notNull() && m_fractureActiveCellInfo.notNull()) - { - CellRangeBB matrixModelActiveBB; - CellRangeBB fractureModelActiveBB; - - size_t idx; - for (idx = 0; idx < m_mainGrid->cellCount(); idx++) - { - size_t i, j, k; - m_mainGrid->ijkFromCellIndex(idx, &i, &j, &k); - - if (m_activeCellInfo->isActive(idx)) - { - matrixModelActiveBB.add(i, j, k); - } - - if (m_fractureActiveCellInfo->isActive(idx)) - { - fractureModelActiveBB.add(i, j, k); - } - } - m_activeCellInfo->setIJKBoundingBox(matrixModelActiveBB.m_min, matrixModelActiveBB.m_max); - m_fractureActiveCellInfo->setIJKBoundingBox(fractureModelActiveBB.m_min, fractureModelActiveBB.m_max); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RigCaseData::computeActiveCellBoundingBoxes() -{ - computeActiveCellIJKBBox(); - computeActiveCellsGeometryBoundingBox(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RigActiveCellInfo* RigCaseData::activeCellInfo(RifReaderInterface::PorosityModelResultType porosityModel) -{ - if (porosityModel == RifReaderInterface::MATRIX_RESULTS) - { - return m_activeCellInfo.p(); - } - - return m_fractureActiveCellInfo.p(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -const RigActiveCellInfo* RigCaseData::activeCellInfo(RifReaderInterface::PorosityModelResultType porosityModel) const -{ - if (porosityModel == RifReaderInterface::MATRIX_RESULTS) - { - return m_activeCellInfo.p(); - } - - return m_fractureActiveCellInfo.p(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RigCaseData::setActiveCellInfo(RifReaderInterface::PorosityModelResultType porosityModel, RigActiveCellInfo* activeCellInfo) -{ - if (porosityModel == RifReaderInterface::MATRIX_RESULTS) - { - m_activeCellInfo = activeCellInfo; - m_matrixModelResults->setActiveCellInfo(m_activeCellInfo.p()); - } - else - { - m_fractureActiveCellInfo = activeCellInfo; - m_fractureModelResults->setActiveCellInfo(m_fractureActiveCellInfo.p()); - } -} - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RigCaseData::computeActiveCellsGeometryBoundingBox() -{ - if (m_activeCellInfo.isNull() || m_fractureActiveCellInfo.isNull()) - { - return; - } - - if (m_mainGrid.isNull()) - { - cvf::BoundingBox bb; - m_activeCellInfo->setGeometryBoundingBox(bb); - m_fractureActiveCellInfo->setGeometryBoundingBox(bb); - return; - } - - RigActiveCellInfo* activeInfos[2]; - activeInfos[0] = m_fractureActiveCellInfo.p(); - activeInfos[1] = m_activeCellInfo.p(); // Last, to make this bb.min become display offset - - cvf::BoundingBox bb; - for (int acIdx = 0; acIdx < 2; ++acIdx) - { - bb.reset(); - if (m_mainGrid->nodes().size() == 0) - { - bb.add(cvf::Vec3d::ZERO); - } - else - { - for (size_t i = 0; i < m_mainGrid->cellCount(); i++) - { - if (activeInfos[acIdx]->isActive(i)) - { - const RigCell& c = m_mainGrid->globalCellArray()[i]; - const caf::SizeTArray8& indices = c.cornerIndices(); - - size_t idx; - for (idx = 0; idx < 8; idx++) - { - bb.add(m_mainGrid->nodes()[indices[idx]]); - } - } - } - } - - activeInfos[acIdx]->setGeometryBoundingBox(bb); - } - - m_mainGrid->setDisplayModelOffset(bb.min()); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RigCaseData::setActiveFormationNames(RigFormationNames* activeFormationNames) -{ - m_activeFormationNamesData = activeFormationNames; - - size_t totalGlobCellCount = m_mainGrid->globalCellArray().size(); - size_t resIndex = m_matrixModelResults->addStaticScalarResult(RimDefines::FORMATION_NAMES, - "Active Formation Names", - false, - totalGlobCellCount); - - std::vector& fnData = m_matrixModelResults->cellScalarResults(resIndex,0); - - if (m_activeFormationNamesData.isNull()) - { - for ( size_t cIdx = 0; cIdx < totalGlobCellCount; ++cIdx ) - { - fnData[cIdx] = HUGE_VAL; - } - - return; - } - - size_t localCellCount = m_mainGrid->cellCount(); - for (size_t cIdx = 0; cIdx < localCellCount; ++cIdx) - { - size_t i (cvf::UNDEFINED_SIZE_T), j(cvf::UNDEFINED_SIZE_T), k(cvf::UNDEFINED_SIZE_T); - - if(!m_mainGrid->ijkFromCellIndex(cIdx, &i, &j, &k)) continue; - - int formNameIdx = activeFormationNames->formationIndexFromKLayerIdx(k); - if (formNameIdx != -1) - { - fnData[cIdx] = formNameIdx; - } - else - { - fnData[cIdx] = HUGE_VAL; - } - } - - for (size_t cIdx = localCellCount; cIdx < totalGlobCellCount; ++cIdx) - { - size_t mgrdCellIdx = m_mainGrid->globalCellArray()[cIdx].mainGridCellIndex(); - - size_t i (cvf::UNDEFINED_SIZE_T), j(cvf::UNDEFINED_SIZE_T), k(cvf::UNDEFINED_SIZE_T); - - if(!m_mainGrid->ijkFromCellIndex(mgrdCellIdx, &i, &j, &k)) continue; - - int formNameIdx = activeFormationNames->formationIndexFromKLayerIdx(k); - if (formNameIdx != -1) - { - fnData[cIdx] = formNameIdx; - } - else - { - fnData[cIdx] = HUGE_VAL; - } - } - -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RigFormationNames* RigCaseData::activeFormationNames() -{ - return m_activeFormationNamesData.p(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RigCaseCellResultsData* RigCaseData::results(RifReaderInterface::PorosityModelResultType porosityModel) -{ - if (porosityModel == RifReaderInterface::MATRIX_RESULTS) - { - return m_matrixModelResults.p(); - } - - return m_fractureModelResults.p(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -const RigCaseCellResultsData* RigCaseData::results(RifReaderInterface::PorosityModelResultType porosityModel) const -{ - if (porosityModel == RifReaderInterface::MATRIX_RESULTS) - { - return m_matrixModelResults.p(); - } - - return m_fractureModelResults.p(); -} - -/* -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RigCaseData::closeReaderInterface() -{ - RifReaderInterface* readerInterface = m_matrixModelResults->readerInterface(); - - if (readerInterface) - { - readerInterface->close(); - } -} -*/ diff --git a/ApplicationCode/ReservoirDataModel/RigCaseData.h b/ApplicationCode/ReservoirDataModel/RigCaseData.h deleted file mode 100644 index c5c53ef753..0000000000 --- a/ApplicationCode/ReservoirDataModel/RigCaseData.h +++ /dev/null @@ -1,104 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#pragma once - -#include -#include "RigCell.h" -#include "cvfVector3.h" -#include "cvfAssert.h" -#include "cvfObject.h" -#include "RigMainGrid.h" -#include "RigSingleWellResultsData.h" -#include "RigActiveCellInfo.h" - -class RigCaseCellResultsData; -class RigFormationNames; - -class RigCaseData : public cvf::Object -{ -public: - enum UnitsType - { - UNITS_METRIC, - UNITS_FIELD, - UNITS_LAB - }; - -public: - RigCaseData(); - ~RigCaseData(); - - RigMainGrid* mainGrid() { return m_mainGrid.p(); } - const RigMainGrid* mainGrid() const { return m_mainGrid.p(); } - void setMainGrid(RigMainGrid* mainGrid); - - void allGrids(std::vector* grids); // To be removed - void allGrids(std::vector* grids) const;// To be removed - const RigGridBase* grid(size_t index) const; - RigGridBase* grid(size_t index); - size_t gridCount() const; - - RigCaseCellResultsData* results(RifReaderInterface::PorosityModelResultType porosityModel); - const RigCaseCellResultsData* results(RifReaderInterface::PorosityModelResultType porosityModel) const; - - RigActiveCellInfo* activeCellInfo(RifReaderInterface::PorosityModelResultType porosityModel); - const RigActiveCellInfo* activeCellInfo(RifReaderInterface::PorosityModelResultType porosityModel) const; - void setActiveCellInfo(RifReaderInterface::PorosityModelResultType porosityModel, RigActiveCellInfo* activeCellInfo); - - void setActiveFormationNames(RigFormationNames* activeFormationNames); - RigFormationNames* activeFormationNames(); - - void setWellResults(const cvf::Collection& data); - const cvf::Collection& wellResults() { return m_wellResults; } - - const cvf::UByteArray* wellCellsInGrid(size_t gridIndex); - const cvf::UIntArray* gridCellToResultWellIndex(size_t gridIndex); - - RigCell& cellFromWellResultCell(const RigWellResultPoint& wellResultCell); - bool findSharedSourceFace(cvf::StructGridInterface::FaceType& sharedSourceFace, const RigWellResultPoint& sourceWellCellResult, const RigWellResultPoint& otherWellCellResult) const; - - void computeActiveCellBoundingBoxes(); - - UnitsType unitsType() const { return m_unitsType; } - void setUnitsType(UnitsType unitsType) { m_unitsType = unitsType; } - -private: - void computeActiveCellIJKBBox(); - void computeWellCellsPrGrid(); - void computeActiveCellsGeometryBoundingBox(); -private: - cvf::ref m_mainGrid; - - cvf::ref m_activeCellInfo; - cvf::ref m_fractureActiveCellInfo; - - cvf::ref m_matrixModelResults; - cvf::ref m_fractureModelResults; - - cvf::ref m_activeFormationNamesData; - - cvf::Collection m_wellResults; //< A WellResults object for each well in the reservoir - cvf::Collection m_wellCellsInGrid; //< A bool array pr grid with one bool pr cell telling wether the cell is a well cell or not - cvf::Collection m_gridCellToResultWellIndex; //< Array pr grid with index to well pr cell telling which well a cell is in - - UnitsType m_unitsType; - -}; diff --git a/ApplicationCode/ReservoirDataModel/RigCaseToCaseCellMapper.cpp b/ApplicationCode/ReservoirDataModel/RigCaseToCaseCellMapper.cpp index 82b74df1db..ed3eff7898 100644 --- a/ApplicationCode/ReservoirDataModel/RigCaseToCaseCellMapper.cpp +++ b/ApplicationCode/ReservoirDataModel/RigCaseToCaseCellMapper.cpp @@ -120,7 +120,7 @@ void RigCaseToCaseCellMapper::addMapping(int depCaseCellIdx, int masterCaseMatch m_masterCellIndexSeries.back().push_back(masterCaseMatchingCell); m_masterCellOrIntervalIndex[depCaseCellIdx] = -newSeriesIdx; } - else if (mcOrSeriesIdx < 0) + else { m_masterCellIndexSeries[-mcOrSeriesIdx].push_back(masterCaseMatchingCell); } diff --git a/ApplicationCode/ReservoirDataModel/RigCombMultResultAccessor.h b/ApplicationCode/ReservoirDataModel/RigCombMultResultAccessor.h index 174185c101..a3362c2da0 100644 --- a/ApplicationCode/ReservoirDataModel/RigCombMultResultAccessor.h +++ b/ApplicationCode/ReservoirDataModel/RigCombMultResultAccessor.h @@ -32,7 +32,7 @@ class RigGridBase; class RigCombMultResultAccessor : public RigResultAccessor { public: - RigCombMultResultAccessor(const RigGridBase* grid); + explicit RigCombMultResultAccessor(const RigGridBase* grid); void setMultResultAccessors( RigResultAccessor* multXPosAccessor, diff --git a/ApplicationCode/ReservoirDataModel/RigCombTransResultAccessor.h b/ApplicationCode/ReservoirDataModel/RigCombTransResultAccessor.h index 2687db8000..61c50235d6 100644 --- a/ApplicationCode/ReservoirDataModel/RigCombTransResultAccessor.h +++ b/ApplicationCode/ReservoirDataModel/RigCombTransResultAccessor.h @@ -32,7 +32,7 @@ class RigGridBase; class RigCombTransResultAccessor : public RigResultAccessor { public: - RigCombTransResultAccessor(const RigGridBase* grid); + explicit RigCombTransResultAccessor(const RigGridBase* grid); void setTransResultAccessors(RigResultAccessor* xTransAccessor, RigResultAccessor* yTransAccessor, diff --git a/ApplicationCode/ReservoirDataModel/RigEclipseCaseData.cpp b/ApplicationCode/ReservoirDataModel/RigEclipseCaseData.cpp new file mode 100644 index 0000000000..ebb0c5f7f8 --- /dev/null +++ b/ApplicationCode/ReservoirDataModel/RigEclipseCaseData.cpp @@ -0,0 +1,643 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RigEclipseCaseData.h" + +#include "RigActiveCellInfo.h" +#include "RigCaseCellResultsData.h" +#include "RigFormationNames.h" +#include "RigMainGrid.h" +#include "RigResultAccessorFactory.h" +#include "RigSingleWellResultsData.h" + +#include + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigEclipseCaseData::RigEclipseCaseData() +{ + m_mainGrid = new RigMainGrid(); + + m_matrixModelResults = new RigCaseCellResultsData(m_mainGrid.p()); + m_fractureModelResults = new RigCaseCellResultsData(m_mainGrid.p()); + + m_activeCellInfo = new RigActiveCellInfo; + m_fractureActiveCellInfo = new RigActiveCellInfo; + + m_matrixModelResults->setActiveCellInfo(m_activeCellInfo.p()); + m_fractureModelResults->setActiveCellInfo(m_fractureActiveCellInfo.p()); + + m_unitsType = UNITS_METRIC; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigEclipseCaseData::~RigEclipseCaseData() +{ + +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigMainGrid* RigEclipseCaseData::mainGrid() +{ + return m_mainGrid.p(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const RigMainGrid* RigEclipseCaseData::mainGrid() const +{ + return m_mainGrid.p(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigEclipseCaseData::setMainGrid(RigMainGrid* mainGrid) +{ + m_mainGrid = mainGrid; + + m_matrixModelResults->setMainGrid(m_mainGrid.p()); + m_fractureModelResults->setMainGrid(m_mainGrid.p()); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigEclipseCaseData::allGrids(std::vector* grids) +{ + CVF_ASSERT(grids); + + if (m_mainGrid.isNull()) + { + return; + } + + size_t i; + for (i = 0; i < m_mainGrid->gridCount(); i++) + { + grids->push_back(m_mainGrid->gridByIndex(i)); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigEclipseCaseData::allGrids(std::vector* grids) const +{ + CVF_ASSERT(grids); + + if (m_mainGrid.isNull()) + { + return; + } + + size_t i; + for (i = 0; i < m_mainGrid->gridCount(); i++) + { + grids->push_back(m_mainGrid->gridByIndex(i)); + } +} + +//-------------------------------------------------------------------------------------------------- +/// Get grid by index. The main grid has index 0, so the first lgr has index 1 +//-------------------------------------------------------------------------------------------------- +const RigGridBase* RigEclipseCaseData::grid(size_t index) const +{ + CVF_ASSERT(m_mainGrid.notNull()); + return m_mainGrid->gridByIndex(index); +} + + +//-------------------------------------------------------------------------------------------------- +/// Get grid by index. The main grid has index 0, so the first lgr has index 1 +//-------------------------------------------------------------------------------------------------- +RigGridBase* RigEclipseCaseData::grid(size_t index) +{ + CVF_ASSERT(m_mainGrid.notNull()); + return m_mainGrid->gridByIndex(index); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +size_t RigEclipseCaseData::gridCount() const +{ + CVF_ASSERT(m_mainGrid.notNull()); + return m_mainGrid->gridCount(); +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigEclipseCaseData::computeWellCellsPrGrid() +{ + // If we have computed this already, return + if (m_wellCellsInGrid.size()) return; + + std::vector grids; + this->allGrids(&grids); + + // Debug code used to display grid names and grid sizes +/* + size_t totCellCount = 0; + for (auto g : grids) + { + qDebug() << g->gridName().data(); + qDebug() << g->cellCountI() << " " << g->cellCountJ() << " " << g->cellCountK() << " "; + + size_t cellCount = g->cellCount(); + totCellCount += cellCount; + qDebug() << cellCount; + + qDebug() << "\n"; + } + + qDebug() << "\nTotal cell count " << totCellCount; +*/ + + size_t gIdx; + + // Allocate and initialize the arrays + + m_wellCellsInGrid.resize(grids.size()); + m_gridCellToResultWellIndex.resize(grids.size()); + + for (gIdx = 0; gIdx < grids.size(); ++gIdx) + { + if (m_wellCellsInGrid[gIdx].isNull() || m_wellCellsInGrid[gIdx]->size() != grids[gIdx]->cellCount()) + { + m_wellCellsInGrid[gIdx] = new cvf::UByteArray; + m_wellCellsInGrid[gIdx]->resize(grids[gIdx]->cellCount()); + + m_gridCellToResultWellIndex[gIdx] = new cvf::UIntArray; + m_gridCellToResultWellIndex[gIdx]->resize(grids[gIdx]->cellCount()); + } + m_wellCellsInGrid[gIdx]->setAll(false); + m_gridCellToResultWellIndex[gIdx]->setAll(cvf::UNDEFINED_UINT); + } + + // Fill arrays with data + size_t wIdx; + for (wIdx = 0; wIdx < m_wellResults.size(); ++wIdx) + { + size_t tIdx; + for (tIdx = 0; tIdx < m_wellResults[wIdx]->m_wellCellsTimeSteps.size(); ++tIdx) + { + RigWellResultFrame& wellCells = m_wellResults[wIdx]->m_wellCellsTimeSteps[tIdx]; + + // Well head + { + size_t gridIndex = wellCells.m_wellHead.m_gridIndex; + size_t gridCellIndex = wellCells.m_wellHead.m_gridCellIndex; + + if (gridIndex < m_wellCellsInGrid.size() && gridCellIndex < m_wellCellsInGrid[gridIndex]->size()) + { + size_t reservoirCellIndex = grids[gridIndex]->reservoirCellIndex(gridCellIndex); + if (m_activeCellInfo->isActive(reservoirCellIndex) + || m_fractureActiveCellInfo->isActive(reservoirCellIndex)) + { + m_wellCellsInGrid[gridIndex]->set(gridCellIndex, true); + m_gridCellToResultWellIndex[gridIndex]->set(gridCellIndex, static_cast(wIdx)); + } + } + } + + // Well result branches + for (size_t sIdx = 0; sIdx < wellCells.m_wellResultBranches.size(); ++sIdx) + { + RigWellResultBranch& wellSegment = wellCells.m_wellResultBranches[sIdx]; + size_t cdIdx; + for (cdIdx = 0; cdIdx < wellSegment.m_branchResultPoints.size(); ++cdIdx) + { + size_t gridIndex = wellSegment.m_branchResultPoints[cdIdx].m_gridIndex; + size_t gridCellIndex = wellSegment.m_branchResultPoints[cdIdx].m_gridCellIndex; + + if(gridIndex < m_wellCellsInGrid.size() && gridCellIndex < m_wellCellsInGrid[gridIndex]->size()) + { + // NOTE : We do not check if the grid cell is active as we do for well head. + // If we add test for active cell, thorough testing and verification of the new behaviour must be adressed + + m_wellCellsInGrid[gridIndex]->set(gridCellIndex, true); + m_gridCellToResultWellIndex[gridIndex]->set(gridCellIndex, static_cast(wIdx)); + } + } + } + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigEclipseCaseData::setWellResults(const cvf::Collection& data) +{ + m_wellResults = data; + m_wellCellsInGrid.clear(); + m_gridCellToResultWellIndex.clear(); + + computeWellCellsPrGrid(); +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const RigSingleWellResultsData* RigEclipseCaseData::findWellResult(QString wellName) const +{ + for (size_t wIdx = 0; wIdx < m_wellResults.size(); ++wIdx) + { + if (m_wellResults[wIdx]->m_wellName == wellName) return m_wellResults[wIdx].p(); + } + + return nullptr; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const cvf::UByteArray* RigEclipseCaseData::wellCellsInGrid(size_t gridIndex) +{ + computeWellCellsPrGrid(); + CVF_ASSERT(gridIndex < m_wellCellsInGrid.size()); + + return m_wellCellsInGrid[gridIndex].p(); +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const cvf::UIntArray* RigEclipseCaseData::gridCellToResultWellIndex(size_t gridIndex) +{ + computeWellCellsPrGrid(); + CVF_ASSERT(gridIndex < m_gridCellToResultWellIndex.size()); + + return m_gridCellToResultWellIndex[gridIndex].p(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const RigCell& RigEclipseCaseData::cellFromWellResultCell(const RigWellResultPoint& wellResultCell) const +{ + CVF_ASSERT(wellResultCell.isCell()); + + size_t gridIndex = wellResultCell.m_gridIndex; + size_t gridCellIndex = wellResultCell.m_gridCellIndex; + + std::vector grids; + allGrids(&grids); + + return grids[gridIndex]->cell(gridCellIndex); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RigEclipseCaseData::findSharedSourceFace(cvf::StructGridInterface::FaceType& sharedSourceFace,const RigWellResultPoint& sourceWellCellResult, const RigWellResultPoint& otherWellCellResult) const +{ + size_t gridIndex = sourceWellCellResult.m_gridIndex; + size_t gridCellIndex = sourceWellCellResult.m_gridCellIndex; + + size_t otherGridIndex = otherWellCellResult.m_gridIndex; + size_t otherGridCellIndex = otherWellCellResult.m_gridCellIndex; + + if (gridIndex != otherGridIndex) return false; + + std::vector grids; + allGrids(&grids); + + const RigGridBase* grid = grids[gridIndex]; + size_t i, j, k; + grid->ijkFromCellIndex(gridCellIndex, &i, &j, &k); + + size_t faceIdx; + for (faceIdx = 0; faceIdx < 6; faceIdx++) + { + cvf::StructGridInterface::FaceType sourceFace = static_cast(faceIdx); + + size_t ni, nj, nk; + grid->neighborIJKAtCellFace(i, j, k, sourceFace, &ni, &nj, &nk); + + if (grid->isCellValid(ni, nj, nk)) + { + + size_t neighborCellIndex = grid->cellIndexFromIJK(ni, nj, nk); + + if (neighborCellIndex == otherGridCellIndex) + { + sharedSourceFace = sourceFace; + return true; + } + } + } + + return false; +} + + + +//-------------------------------------------------------------------------------------------------- +/// Helper class used to find min/max range for valid and active cells +//-------------------------------------------------------------------------------------------------- +class CellRangeBB +{ +public: + CellRangeBB() + : m_min(cvf::UNDEFINED_SIZE_T, cvf::UNDEFINED_SIZE_T, cvf::UNDEFINED_SIZE_T), + m_max(cvf::Vec3st::ZERO) + { + + } + + void add(size_t i, size_t j, size_t k) + { + if (i < m_min.x()) m_min.x() = i; + if (j < m_min.y()) m_min.y() = j; + if (k < m_min.z()) m_min.z() = k; + + if (i > m_max.x()) m_max.x() = i; + if (j > m_max.y()) m_max.y() = j; + if (k > m_max.z()) m_max.z() = k; + } + +public: + cvf::Vec3st m_min; + cvf::Vec3st m_max; +}; + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigEclipseCaseData::computeActiveCellIJKBBox() +{ + if (m_mainGrid.notNull() && m_activeCellInfo.notNull() && m_fractureActiveCellInfo.notNull()) + { + CellRangeBB matrixModelActiveBB; + CellRangeBB fractureModelActiveBB; + + size_t idx; + for (idx = 0; idx < m_mainGrid->cellCount(); idx++) + { + size_t i, j, k; + m_mainGrid->ijkFromCellIndex(idx, &i, &j, &k); + + if (m_activeCellInfo->isActive(idx)) + { + matrixModelActiveBB.add(i, j, k); + } + + if (m_fractureActiveCellInfo->isActive(idx)) + { + fractureModelActiveBB.add(i, j, k); + } + } + m_activeCellInfo->setIJKBoundingBox(matrixModelActiveBB.m_min, matrixModelActiveBB.m_max); + m_fractureActiveCellInfo->setIJKBoundingBox(fractureModelActiveBB.m_min, fractureModelActiveBB.m_max); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigEclipseCaseData::computeActiveCellBoundingBoxes() +{ + computeActiveCellIJKBBox(); + computeActiveCellsGeometryBoundingBox(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigActiveCellInfo* RigEclipseCaseData::activeCellInfo(RifReaderInterface::PorosityModelResultType porosityModel) +{ + if (porosityModel == RifReaderInterface::MATRIX_RESULTS) + { + return m_activeCellInfo.p(); + } + + return m_fractureActiveCellInfo.p(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const RigActiveCellInfo* RigEclipseCaseData::activeCellInfo(RifReaderInterface::PorosityModelResultType porosityModel) const +{ + if (porosityModel == RifReaderInterface::MATRIX_RESULTS) + { + return m_activeCellInfo.p(); + } + + return m_fractureActiveCellInfo.p(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigEclipseCaseData::setActiveCellInfo(RifReaderInterface::PorosityModelResultType porosityModel, RigActiveCellInfo* activeCellInfo) +{ + if (porosityModel == RifReaderInterface::MATRIX_RESULTS) + { + m_activeCellInfo = activeCellInfo; + m_matrixModelResults->setActiveCellInfo(m_activeCellInfo.p()); + } + else + { + m_fractureActiveCellInfo = activeCellInfo; + m_fractureModelResults->setActiveCellInfo(m_fractureActiveCellInfo.p()); + } +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigEclipseCaseData::computeActiveCellsGeometryBoundingBox() +{ + if (m_activeCellInfo.isNull() || m_fractureActiveCellInfo.isNull()) + { + return; + } + + if (m_mainGrid.isNull()) + { + cvf::BoundingBox bb; + m_activeCellInfo->setGeometryBoundingBox(bb); + m_fractureActiveCellInfo->setGeometryBoundingBox(bb); + return; + } + + RigActiveCellInfo* activeInfos[2]; + activeInfos[0] = m_fractureActiveCellInfo.p(); + activeInfos[1] = m_activeCellInfo.p(); // Last, to make this bb.min become display offset + + cvf::BoundingBox bb; + for (int acIdx = 0; acIdx < 2; ++acIdx) + { + bb.reset(); + if (m_mainGrid->nodes().size() == 0) + { + bb.add(cvf::Vec3d::ZERO); + } + else + { + for (size_t i = 0; i < m_mainGrid->cellCount(); i++) + { + if (activeInfos[acIdx]->isActive(i)) + { + const RigCell& c = m_mainGrid->globalCellArray()[i]; + const caf::SizeTArray8& indices = c.cornerIndices(); + + size_t idx; + for (idx = 0; idx < 8; idx++) + { + bb.add(m_mainGrid->nodes()[indices[idx]]); + } + } + } + } + + activeInfos[acIdx]->setGeometryBoundingBox(bb); + } + + m_mainGrid->setDisplayModelOffset(bb.min()); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigEclipseCaseData::setActiveFormationNames(RigFormationNames* activeFormationNames) +{ + m_activeFormationNamesData = activeFormationNames; + + size_t totalGlobCellCount = m_mainGrid->globalCellArray().size(); + size_t resIndex = m_matrixModelResults->addStaticScalarResult(RimDefines::FORMATION_NAMES, + "Active Formation Names", + false, + totalGlobCellCount); + + std::vector& fnData = m_matrixModelResults->cellScalarResults(resIndex,0); + + if (m_activeFormationNamesData.isNull()) + { + for ( size_t cIdx = 0; cIdx < totalGlobCellCount; ++cIdx ) + { + fnData[cIdx] = HUGE_VAL; + } + + return; + } + + size_t localCellCount = m_mainGrid->cellCount(); + for (size_t cIdx = 0; cIdx < localCellCount; ++cIdx) + { + size_t i (cvf::UNDEFINED_SIZE_T), j(cvf::UNDEFINED_SIZE_T), k(cvf::UNDEFINED_SIZE_T); + + if(!m_mainGrid->ijkFromCellIndex(cIdx, &i, &j, &k)) continue; + + int formNameIdx = activeFormationNames->formationIndexFromKLayerIdx(k); + if (formNameIdx != -1) + { + fnData[cIdx] = formNameIdx; + } + else + { + fnData[cIdx] = HUGE_VAL; + } + } + + for (size_t cIdx = localCellCount; cIdx < totalGlobCellCount; ++cIdx) + { + size_t mgrdCellIdx = m_mainGrid->globalCellArray()[cIdx].mainGridCellIndex(); + + size_t i (cvf::UNDEFINED_SIZE_T), j(cvf::UNDEFINED_SIZE_T), k(cvf::UNDEFINED_SIZE_T); + + if(!m_mainGrid->ijkFromCellIndex(mgrdCellIdx, &i, &j, &k)) continue; + + int formNameIdx = activeFormationNames->formationIndexFromKLayerIdx(k); + if (formNameIdx != -1) + { + fnData[cIdx] = formNameIdx; + } + else + { + fnData[cIdx] = HUGE_VAL; + } + } + +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigFormationNames* RigEclipseCaseData::activeFormationNames() +{ + return m_activeFormationNamesData.p(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigCaseCellResultsData* RigEclipseCaseData::results(RifReaderInterface::PorosityModelResultType porosityModel) +{ + if (porosityModel == RifReaderInterface::MATRIX_RESULTS) + { + return m_matrixModelResults.p(); + } + + return m_fractureModelResults.p(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const RigCaseCellResultsData* RigEclipseCaseData::results(RifReaderInterface::PorosityModelResultType porosityModel) const +{ + if (porosityModel == RifReaderInterface::MATRIX_RESULTS) + { + return m_matrixModelResults.p(); + } + + return m_fractureModelResults.p(); +} + +/* +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigCaseData::closeReaderInterface() +{ + RifReaderInterface* readerInterface = m_matrixModelResults->readerInterface(); + + if (readerInterface) + { + readerInterface->close(); + } +} +*/ diff --git a/ApplicationCode/ReservoirDataModel/RigEclipseCaseData.h b/ApplicationCode/ReservoirDataModel/RigEclipseCaseData.h new file mode 100644 index 0000000000..ac363ab2d7 --- /dev/null +++ b/ApplicationCode/ReservoirDataModel/RigEclipseCaseData.h @@ -0,0 +1,119 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + + +#include "RifReaderInterface.h" + +#include "cvfAssert.h" +#include "cvfArray.h" +#include "cvfObject.h" +#include "cvfCollection.h" +#include "cvfStructGrid.h" +#include "cvfVector3.h" + +#include + +class RigCaseCellResultsData; +class RigFormationNames; +class RigMainGrid; +class RigGridBase; +class RigCaseCellResultsData; +class RigActiveCellInfo; +class RigSingleWellResultsData; +class RigCell; + +struct RigWellResultPoint; + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +class RigEclipseCaseData : public cvf::Object +{ +public: + enum UnitsType + { + UNITS_METRIC, + UNITS_FIELD, + UNITS_LAB + }; + +public: + RigEclipseCaseData(); + ~RigEclipseCaseData(); + + RigMainGrid* mainGrid(); + const RigMainGrid* mainGrid() const; + void setMainGrid(RigMainGrid* mainGrid); + + void allGrids(std::vector* grids); // To be removed + void allGrids(std::vector* grids) const;// To be removed + const RigGridBase* grid(size_t index) const; + RigGridBase* grid(size_t index); + size_t gridCount() const; + + RigCaseCellResultsData* results(RifReaderInterface::PorosityModelResultType porosityModel); + const RigCaseCellResultsData* results(RifReaderInterface::PorosityModelResultType porosityModel) const; + + RigActiveCellInfo* activeCellInfo(RifReaderInterface::PorosityModelResultType porosityModel); + const RigActiveCellInfo* activeCellInfo(RifReaderInterface::PorosityModelResultType porosityModel) const; + void setActiveCellInfo(RifReaderInterface::PorosityModelResultType porosityModel, RigActiveCellInfo* activeCellInfo); + + void setActiveFormationNames(RigFormationNames* activeFormationNames); + RigFormationNames* activeFormationNames(); + + void setWellResults(const cvf::Collection& data); + const cvf::Collection& wellResults() { return m_wellResults; } + const RigSingleWellResultsData* findWellResult(QString wellName) const; + + const cvf::UByteArray* wellCellsInGrid(size_t gridIndex); + const cvf::UIntArray* gridCellToResultWellIndex(size_t gridIndex); + + const RigCell& cellFromWellResultCell(const RigWellResultPoint& wellResultCell) const; + bool findSharedSourceFace(cvf::StructGridInterface::FaceType& sharedSourceFace, const RigWellResultPoint& sourceWellCellResult, const RigWellResultPoint& otherWellCellResult) const; + + void computeActiveCellBoundingBoxes(); + + UnitsType unitsType() const { return m_unitsType; } + void setUnitsType(UnitsType unitsType) { m_unitsType = unitsType; } + +private: + void computeActiveCellIJKBBox(); + void computeWellCellsPrGrid(); + void computeActiveCellsGeometryBoundingBox(); + +private: + cvf::ref m_mainGrid; + + cvf::ref m_activeCellInfo; + cvf::ref m_fractureActiveCellInfo; + + cvf::ref m_matrixModelResults; + cvf::ref m_fractureModelResults; + + cvf::ref m_activeFormationNamesData; + + cvf::Collection m_wellResults; //< A WellResults object for each well in the reservoir + cvf::Collection m_wellCellsInGrid; //< A bool array pr grid with one bool pr cell telling wether the cell is a well cell or not + cvf::Collection m_gridCellToResultWellIndex; //< Array pr grid with index to well pr cell telling which well a cell is in + + UnitsType m_unitsType; +}; diff --git a/ApplicationCode/ReservoirDataModel/RigEclipseNativeStatCalc.cpp b/ApplicationCode/ReservoirDataModel/RigEclipseNativeStatCalc.cpp index 3d3783b0d2..97e86bdfa2 100644 --- a/ApplicationCode/ReservoirDataModel/RigEclipseNativeStatCalc.cpp +++ b/ApplicationCode/ReservoirDataModel/RigEclipseNativeStatCalc.cpp @@ -41,26 +41,10 @@ RigEclipseNativeStatCalc::RigEclipseNativeStatCalc(RigCaseCellResultsData* cellR //-------------------------------------------------------------------------------------------------- void RigEclipseNativeStatCalc::minMaxCellScalarValues(size_t timeStepIndex, double& min, double& max) { - std::vector& values = m_resultsData->cellScalarResults(m_scalarResultIndex, timeStepIndex); - - size_t i; - for (i = 0; i < values.size(); i++) - { - if (values[i] == HUGE_VAL) - { - continue; - } - - if (values[i] < min) - { - min = values[i]; - } - - if (values[i] > max) - { - max = values[i]; - } - } + MinMaxAccumulator acc(min, max); + traverseCells(acc, timeStepIndex); + min = acc.min; + max = acc.max; } //-------------------------------------------------------------------------------------------------- @@ -68,9 +52,10 @@ void RigEclipseNativeStatCalc::minMaxCellScalarValues(size_t timeStepIndex, doub //-------------------------------------------------------------------------------------------------- void RigEclipseNativeStatCalc::posNegClosestToZero(size_t timeStepIndex, double& pos, double& neg) { - std::vector& values = m_resultsData->cellScalarResults(m_scalarResultIndex, timeStepIndex); - - RigStatisticsCalculator::posNegClosestToZero(values, pos, neg); + PosNegAccumulator acc(pos, neg); + traverseCells(acc, timeStepIndex); + pos = acc.pos; + neg = acc.neg; } //-------------------------------------------------------------------------------------------------- @@ -78,9 +63,7 @@ void RigEclipseNativeStatCalc::posNegClosestToZero(size_t timeStepIndex, double& //-------------------------------------------------------------------------------------------------- void RigEclipseNativeStatCalc::addDataToHistogramCalculator(size_t timeStepIndex, RigHistogramCalculator& histogramCalculator) { - std::vector& values = m_resultsData->cellScalarResults(m_scalarResultIndex, timeStepIndex); - - histogramCalculator.addData(values); + traverseCells(histogramCalculator, timeStepIndex); } //-------------------------------------------------------------------------------------------------- @@ -88,12 +71,9 @@ void RigEclipseNativeStatCalc::addDataToHistogramCalculator(size_t timeStepIndex //-------------------------------------------------------------------------------------------------- void RigEclipseNativeStatCalc::uniqueValues(size_t timeStepIndex, std::set& values) { - std::vector& doubleValues = m_resultsData->cellScalarResults(m_scalarResultIndex, timeStepIndex); - - for (size_t cIdx = 0; cIdx < doubleValues.size(); ++cIdx) - { - values.insert(std::floor(doubleValues[cIdx])); - } + UniqueValueAccumulator acc; + traverseCells(acc, timeStepIndex); + values = acc.uniqueValues; } //-------------------------------------------------------------------------------------------------- @@ -101,22 +81,10 @@ void RigEclipseNativeStatCalc::uniqueValues(size_t timeStepIndex, std::set& //-------------------------------------------------------------------------------------------------- void RigEclipseNativeStatCalc::valueSumAndSampleCount(size_t timeStepIndex, double& valueSum, size_t& sampleCount) { - std::vector& values = m_resultsData->cellScalarResults(m_scalarResultIndex, timeStepIndex); - size_t undefValueCount = 0; - for (size_t cIdx = 0; cIdx < values.size(); ++cIdx) - { - double value = values[cIdx]; - if (value == HUGE_VAL || value != value) - { - ++undefValueCount; - continue; - } - - valueSum += value; - } - - sampleCount += values.size(); - sampleCount -= undefValueCount; + SumCountAccumulator acc(valueSum, sampleCount); + traverseCells(acc, timeStepIndex); + valueSum = acc.valueSum; + sampleCount = acc.sampleCount; } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ReservoirDataModel/RigEclipseNativeStatCalc.h b/ApplicationCode/ReservoirDataModel/RigEclipseNativeStatCalc.h index 0012bb6741..26d82198d6 100644 --- a/ApplicationCode/ReservoirDataModel/RigEclipseNativeStatCalc.h +++ b/ApplicationCode/ReservoirDataModel/RigEclipseNativeStatCalc.h @@ -21,33 +21,60 @@ #include "RigStatisticsCalculator.h" -#include "cvfBase.h" -#include "cvfObject.h" -#include "cvfCollection.h" +#include "RigCaseCellResultsData.h" +#include "RigActiveCellInfo.h" class RigHistogramCalculator; -class RigCaseCellResultsData; //================================================================================================== /// //================================================================================================== + class RigEclipseNativeStatCalc : public RigStatisticsCalculator { public: RigEclipseNativeStatCalc(RigCaseCellResultsData* cellResultsData, size_t scalarResultIndex); - virtual void minMaxCellScalarValues(size_t timeStepIndex, double& min, double& max); - virtual void posNegClosestToZero(size_t timeStepIndex, double& pos, double& neg); - - virtual void valueSumAndSampleCount(size_t timeStepIndex, double& valueSum, size_t& sampleCount); - - virtual void addDataToHistogramCalculator(size_t timeStepIndex, RigHistogramCalculator& histogramCalculator); - + virtual void minMaxCellScalarValues(size_t timeStepIndex, double& min, double& max); + virtual void posNegClosestToZero(size_t timeStepIndex, double& pos, double& neg); + virtual void valueSumAndSampleCount(size_t timeStepIndex, double& valueSum, size_t& sampleCount); + virtual void addDataToHistogramCalculator(size_t timeStepIndex, RigHistogramCalculator& histogramCalculator); virtual void uniqueValues(size_t timeStepIndex, std::set& values); - virtual size_t timeStepCount(); private: RigCaseCellResultsData* m_resultsData; - size_t m_scalarResultIndex; + size_t m_scalarResultIndex; + + template + void traverseCells(StatisticsAccumulator& accumulator, size_t timeStepIndex) + { + std::vector& values = m_resultsData->cellScalarResults(m_scalarResultIndex, timeStepIndex); + + if (values.empty()) + { + // Can happen if values do not exist for the current time step index. + return; + } + + const RigActiveCellInfo* actCellInfo = m_resultsData->activeCellInfo(); + size_t cellCount = actCellInfo->reservoirCellCount(); + + for (size_t cIdx = 0; cIdx < cellCount; ++cIdx) + { + // Filter out inactive cells + if (!actCellInfo->isActive(cIdx)) continue; + + size_t cellResultIndex = cIdx; + if (m_resultsData->isUsingGlobalActiveIndex(m_scalarResultIndex)) + { + cellResultIndex = actCellInfo->cellResultIndex(cIdx); + } + + if (cellResultIndex != cvf::UNDEFINED_SIZE_T && cellResultIndex < values.size()) + { + accumulator.addValue(values[cellResultIndex]); + } + } + } }; diff --git a/ApplicationCode/ReservoirDataModel/RigEclipseNativeVisibleCellsStatCalc.h b/ApplicationCode/ReservoirDataModel/RigEclipseNativeVisibleCellsStatCalc.h index f5a229a04f..790f17bcd2 100644 --- a/ApplicationCode/ReservoirDataModel/RigEclipseNativeVisibleCellsStatCalc.h +++ b/ApplicationCode/ReservoirDataModel/RigEclipseNativeVisibleCellsStatCalc.h @@ -55,6 +55,13 @@ class RigEclipseNativeVisibleCellsStatCalc : public RigStatisticsCalculator void traverseCells(StatisticsAccumulator& accumulator, size_t timeStepIndex) { std::vector& values = m_caseData->cellScalarResults(m_scalarResultIndex, timeStepIndex); + + if (values.empty()) + { + // Can happen if values do not exist for the current time step index. + return; + } + const RigActiveCellInfo* actCellInfo = m_caseData->activeCellInfo(); size_t cellCount = actCellInfo->reservoirCellCount(); @@ -64,9 +71,16 @@ class RigEclipseNativeVisibleCellsStatCalc : public RigStatisticsCalculator { if (!(*m_cellVisibilities)[cIdx]) continue; - size_t cellResultIndex = actCellInfo->cellResultIndex(cIdx); + size_t cellResultIndex = cIdx; + if (m_caseData->isUsingGlobalActiveIndex(m_scalarResultIndex)) + { + cellResultIndex = actCellInfo->cellResultIndex(cIdx); + } - if (cellResultIndex != cvf::UNDEFINED_SIZE_T) accumulator.addValue(values[cellResultIndex]); + if (cellResultIndex != cvf::UNDEFINED_SIZE_T && cellResultIndex < values.size()) + { + accumulator.addValue(values[cellResultIndex]); + } } } diff --git a/ApplicationCode/ReservoirDataModel/RigEclipseWellLogExtractor.cpp b/ApplicationCode/ReservoirDataModel/RigEclipseWellLogExtractor.cpp index b994d24d80..d3840eec23 100644 --- a/ApplicationCode/ReservoirDataModel/RigEclipseWellLogExtractor.cpp +++ b/ApplicationCode/ReservoirDataModel/RigEclipseWellLogExtractor.cpp @@ -19,7 +19,7 @@ #include "RigEclipseWellLogExtractor.h" #include -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" #include "RigWellPath.h" #include "RigResultAccessor.h" #include "cvfBoundingBox.h" @@ -32,7 +32,7 @@ /// //================================================================================================== -RigEclipseWellLogExtractor::RigEclipseWellLogExtractor(const RigCaseData* aCase, const RigWellPath* wellpath, const std::string& wellCaseErrorMsgName) +RigEclipseWellLogExtractor::RigEclipseWellLogExtractor(const RigEclipseCaseData* aCase, const RigWellPath* wellpath, const std::string& wellCaseErrorMsgName) : m_caseData(aCase), RigWellLogExtractor(wellpath, wellCaseErrorMsgName) { calculateIntersection(); diff --git a/ApplicationCode/ReservoirDataModel/RigEclipseWellLogExtractor.h b/ApplicationCode/ReservoirDataModel/RigEclipseWellLogExtractor.h index d92a362377..abb0c3b03b 100644 --- a/ApplicationCode/ReservoirDataModel/RigEclipseWellLogExtractor.h +++ b/ApplicationCode/ReservoirDataModel/RigEclipseWellLogExtractor.h @@ -29,7 +29,7 @@ #include #include "cvfStructGrid.h" -class RigCaseData; +class RigEclipseCaseData; class RigWellPath; class RigResultAccessor; @@ -43,14 +43,14 @@ namespace cvf { class RigEclipseWellLogExtractor : public RigWellLogExtractor { public: - RigEclipseWellLogExtractor(const RigCaseData* aCase, const RigWellPath* wellpath, const std::string& wellCaseErrorMsgName); + RigEclipseWellLogExtractor(const RigEclipseCaseData* aCase, const RigWellPath* wellpath, const std::string& wellCaseErrorMsgName); void curveData(const RigResultAccessor* resultAccessor, std::vector* values ); - const RigCaseData* caseData() { return m_caseData.p();} + const RigEclipseCaseData* caseData() { return m_caseData.p();} protected: void calculateIntersection(); std::vector findCloseCells(const cvf::BoundingBox& bb); - cvf::cref m_caseData; + cvf::cref m_caseData; }; diff --git a/ApplicationCode/ReservoirDataModel/RigFault.h b/ApplicationCode/ReservoirDataModel/RigFault.h index e65e8ad15d..dbb79ad832 100644 --- a/ApplicationCode/ReservoirDataModel/RigFault.h +++ b/ApplicationCode/ReservoirDataModel/RigFault.h @@ -43,7 +43,7 @@ class RigFaultsPrCellAccumulator : public cvf::Object enum { NO_FAULT = -1, UNKNOWN_FAULT = -2 }; public: - RigFaultsPrCellAccumulator(size_t reservoirCellCount) + explicit RigFaultsPrCellAccumulator(size_t reservoirCellCount) { const int initVals[6] = { NO_FAULT, NO_FAULT, NO_FAULT, NO_FAULT, NO_FAULT, NO_FAULT}; caf::IntArray6 initVal; diff --git a/ApplicationCode/ReservoirDataModel/RigFlowDiagInterfaceTools.h b/ApplicationCode/ReservoirDataModel/RigFlowDiagInterfaceTools.h new file mode 100644 index 0000000000..d7856563fc --- /dev/null +++ b/ApplicationCode/ReservoirDataModel/RigFlowDiagInterfaceTools.h @@ -0,0 +1,95 @@ + +#pragma once + + +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +namespace RigFlowDiagInterfaceTools { + + template + inline Opm::FlowDiagnostics::ConnectionValues + extractFluxField(const Opm::ECLGraph& G, + FluxCalc&& getFlux) + { + using ConnVals = Opm::FlowDiagnostics::ConnectionValues; + + const auto actPh = G.activePhases(); + + auto flux = ConnVals(ConnVals::NumConnections{ G.numConnections() }, + ConnVals::NumPhases{ actPh.size() }); + + auto phas = ConnVals::PhaseID{ 0 }; + + for (const auto& p : actPh) { + const auto pflux = getFlux(p); + + if (!pflux.empty()) { + assert(pflux.size() == flux.numConnections()); + + auto conn = ConnVals::ConnID{ 0 }; + for (const auto& v : pflux) { + flux(conn, phas) = v; + conn.id += 1; + } + } + + phas.id += 1; + } + + return flux; + } + + inline Opm::FlowDiagnostics::ConnectionValues + extractFluxFieldFromRestartFile(const Opm::ECLGraph& G, + const Opm::ECLRestartData& rstrt) + { + auto getFlux = [&G, &rstrt] + (const Opm::ECLPhaseIndex p) + { + return G.flux(rstrt, p); + }; + + return extractFluxField(G, getFlux); + } + + template + Opm::FlowDiagnostics::CellSetValues + extractWellFlows(const Opm::ECLGraph& G, + const WellFluxes& well_fluxes) + { + Opm::FlowDiagnostics::CellSetValues inflow; + for (const auto& well : well_fluxes) { + for (const auto& completion : well.completions) { + const auto& gridName = completion.gridName; + const auto& ijk = completion.ijk; + const int cell_index = G.activeCell(ijk, gridName); + if (cell_index >= 0) { + // Since inflow is a std::map, if the key was not + // already present operator[] will insert a + // value-initialized value (as in T() for a type + // T), which is zero for built-in numerical types, + // including double. + inflow[cell_index] += completion.reservoir_inflow_rate; + } + } + } + + return inflow; + } + +} + + + diff --git a/ApplicationCode/ReservoirDataModel/RigFlowDiagResultAddress.cpp b/ApplicationCode/ReservoirDataModel/RigFlowDiagResultAddress.cpp new file mode 100644 index 0000000000..e41c37d665 --- /dev/null +++ b/ApplicationCode/ReservoirDataModel/RigFlowDiagResultAddress.cpp @@ -0,0 +1,54 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RigFlowDiagResultAddress.h" + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RigFlowDiagResultAddress::isNativeResult() const +{ + return (((variableName == RIG_FLD_TOF_RESNAME) || (variableName == RIG_FLD_CELL_FRACTION_RESNAME)) && selectedTracerNames.size() <= 1); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::string RigFlowDiagResultAddress::uiText() const +{ + std::string uiVarname = variableName; + + std::string uitext = uiVarname; + uitext += " ("; + for (const std::string& tracerName : selectedTracerNames) + { + uitext += " " + tracerName; + } + uitext += " )"; + return uitext; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::string RigFlowDiagResultAddress::uiShortText() const +{ + return variableName; +} + diff --git a/ApplicationCode/ReservoirDataModel/RigFlowDiagResultAddress.h b/ApplicationCode/ReservoirDataModel/RigFlowDiagResultAddress.h new file mode 100644 index 0000000000..7b0844988e --- /dev/null +++ b/ApplicationCode/ReservoirDataModel/RigFlowDiagResultAddress.h @@ -0,0 +1,67 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// +#pragma once + +#include +#include + +#define RIG_FLD_TOF_RESNAME "TOF" +#define RIG_FLD_CELL_FRACTION_RESNAME "Fraction" +#define RIG_FLD_MAX_FRACTION_TRACER_RESNAME "MaxFractionTracer" +#define RIG_FLD_COMMUNICATION_RESNAME "Communication" + +#define RIG_FLOW_TOTAL_NAME "Total" +#define RIG_FLOW_OIL_NAME "Oil" +#define RIG_FLOW_GAS_NAME "Gas" +#define RIG_FLOW_WATER_NAME "Water" + +#define RIG_RESERVOIR_TRACER_NAME "Reservoir" +#define RIG_TINY_TRACER_GROUP_NAME "Other" + +class RigFlowDiagResultAddress +{ + +public: + RigFlowDiagResultAddress(const std::string& aVariableName, const std::set& someSelectedTracerNames) + : variableName(aVariableName), selectedTracerNames(someSelectedTracerNames) {} + + RigFlowDiagResultAddress(const std::string& aVariableName, const std::string& tracerName) + : variableName(aVariableName) + { + selectedTracerNames.insert(tracerName); + } + + bool isNativeResult() const; + + std::string uiText() const; + std::string uiShortText() const; + + std::string variableName; + std::set selectedTracerNames; + + bool operator< (const RigFlowDiagResultAddress& other) const + { + if ( selectedTracerNames != other.selectedTracerNames ) + { + return selectedTracerNames < other.selectedTracerNames; + } + + return variableName < other.variableName; + } +}; + diff --git a/ApplicationCode/ReservoirDataModel/RigFlowDiagResultFrames.cpp b/ApplicationCode/ReservoirDataModel/RigFlowDiagResultFrames.cpp new file mode 100644 index 0000000000..17802af085 --- /dev/null +++ b/ApplicationCode/ReservoirDataModel/RigFlowDiagResultFrames.cpp @@ -0,0 +1,64 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2015- Statoil ASA +// Copyright (C) 2015- Ceetron Solutions 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include + +#include "RigFlowDiagResultFrames.h" + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigFlowDiagResultFrames::RigFlowDiagResultFrames(size_t frameCount) +{ + m_dataForEachFrame.resize(frameCount); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigFlowDiagResultFrames::~RigFlowDiagResultFrames() +{ + +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +size_t RigFlowDiagResultFrames::frameCount() const +{ + return m_dataForEachFrame.size(); +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector& RigFlowDiagResultFrames::frameData(size_t frameIndex) +{ + return m_dataForEachFrame[frameIndex]; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const std::vector& RigFlowDiagResultFrames::frameData(size_t frameIndex) const +{ + return m_dataForEachFrame[frameIndex]; +} diff --git a/ApplicationCode/ReservoirDataModel/RigFlowDiagResultFrames.h b/ApplicationCode/ReservoirDataModel/RigFlowDiagResultFrames.h new file mode 100644 index 0000000000..95cbec99bd --- /dev/null +++ b/ApplicationCode/ReservoirDataModel/RigFlowDiagResultFrames.h @@ -0,0 +1,41 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// +#pragma once + +#include "cvfBase.h" +#include "cvfObject.h" + +#include + +class RigFlowDiagResultFrames: public cvf::Object +{ +public: + explicit RigFlowDiagResultFrames(size_t frameCount); + virtual ~RigFlowDiagResultFrames(); + + const + std::vector& frameData(size_t frameIndex) const; + std::vector& frameData(size_t frameIndex); + size_t frameCount() const; + +private: + std::vector< std::vector > m_dataForEachFrame; +}; + + + diff --git a/ApplicationCode/ReservoirDataModel/RigFlowDiagResults.cpp b/ApplicationCode/ReservoirDataModel/RigFlowDiagResults.cpp new file mode 100644 index 0000000000..1261d74b61 --- /dev/null +++ b/ApplicationCode/ReservoirDataModel/RigFlowDiagResults.cpp @@ -0,0 +1,686 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RigFlowDiagResults.h" + +#include "RigActiveCellInfo.h" +#include "RigEclipseCaseData.h" +#include "RigFlowDiagSolverInterface.h" +#include "RigFlowDiagStatCalc.h" + +#include "RimEclipseCase.h" +#include "RimEclipseResultCase.h" +#include "RimFlowDiagSolution.h" +#include "RigFlowDiagResultFrames.h" +#include "RigStatisticsDataCache.h" + +#include // Needed for HUGE_VAL on Linux + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigFlowDiagResults::RigFlowDiagResults(RimFlowDiagSolution* flowSolution, size_t timeStepCount) + : m_flowDiagSolution(flowSolution) +{ + + m_timeStepCount = timeStepCount; + m_hasAtemptedNativeResults.resize(timeStepCount, false); + m_injProdPairFluxCommunicationTimesteps.resize(timeStepCount); + m_flowCharResultFrames.resize(timeStepCount); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigFlowDiagResults::~RigFlowDiagResults() +{ + +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const std::vector* RigFlowDiagResults::resultValues(const RigFlowDiagResultAddress& resVarAddr, size_t frameIndex) +{ + CVF_ASSERT(m_timeStepCount != cvf::UNDEFINED_SIZE_T); // Forgotten to call init + + return findOrCalculateResult(resVarAddr, frameIndex); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const RigActiveCellInfo * RigFlowDiagResults::activeCellInfo(const RigFlowDiagResultAddress& resVarAddr) +{ + RimEclipseResultCase* eclCase; + m_flowDiagSolution->firstAncestorOrThisOfType(eclCase); + + return eclCase->eclipseCaseData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS); // Todo: base on resVarAddr member +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const std::vector* RigFlowDiagResults::findOrCalculateResult(const RigFlowDiagResultAddress& resVarAddr, size_t frameIndex) +{ + + std::vector* frameData = findScalarResultFrame(resVarAddr, frameIndex); + + if ( frameData ) return frameData; + + frameData = calculateDerivedResult(resVarAddr, frameIndex); + + if ( frameData ) return frameData; + + // We need to access the native data from the opm solver + + if (!solverInterface()) return nullptr; + + calculateNativeResultsIfNotPreviouslyAttempted(frameIndex); + + return findScalarResultFrame(resVarAddr, frameIndex); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigFlowDiagResults::calculateNativeResultsIfNotPreviouslyAttempted(size_t frameIndex) +{ + if ( !m_hasAtemptedNativeResults[frameIndex] ) + { + + RigFlowDiagTimeStepResult nativeTimestepResults = solverInterface()->calculate(frameIndex, + m_flowDiagSolution->allInjectorTracerActiveCellIndices(frameIndex), + m_flowDiagSolution->allProducerTracerActiveCellIndices(frameIndex)); + + std::map >& nativeResults = nativeTimestepResults.nativeResults(); + + for ( auto& resIt: nativeResults ) + { + RigFlowDiagResultFrames* nativeResFrames = findScalarResult(resIt.first); + if ( !nativeResFrames ) nativeResFrames = createScalarResult(resIt.first); + + nativeResFrames->frameData(frameIndex).swap(resIt.second); + } + + m_injProdPairFluxCommunicationTimesteps[frameIndex].swap(nativeTimestepResults.injProdWellPairFluxes()); + + m_flowCharResultFrames[frameIndex].m_lorenzCoefficient = nativeTimestepResults.lorenzCoefficient(); + m_flowCharResultFrames[frameIndex].m_flowCapStorageCapCurve.first.swap(nativeTimestepResults.flowCapStorageCapCurve().first); + m_flowCharResultFrames[frameIndex].m_flowCapStorageCapCurve.second.swap(nativeTimestepResults.flowCapStorageCapCurve().second); + m_flowCharResultFrames[frameIndex].m_sweepEfficiencyCurve.first.swap(nativeTimestepResults.sweepEfficiencyCurve().first); + m_flowCharResultFrames[frameIndex].m_sweepEfficiencyCurve.second.swap(nativeTimestepResults.sweepEfficiencyCurve().second); + + m_hasAtemptedNativeResults[frameIndex] = true; + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector* RigFlowDiagResults::findScalarResultFrame(const RigFlowDiagResultAddress& resVarAddr, size_t frameIndex) +{ + RigFlowDiagResultFrames* resFrames = findScalarResult (resVarAddr); + + if ( resFrames ) + { + std::vector& frame = resFrames->frameData(frameIndex); + if ( frame.size() ) return(&frame); + } + return nullptr; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigFlowDiagSolverInterface* RigFlowDiagResults::solverInterface() +{ + RimEclipseResultCase* eclCase; + m_flowDiagSolution->firstAncestorOrThisOfType(eclCase); + + return eclCase->flowDiagSolverInterface(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigFlowDiagResultFrames* RigFlowDiagResults::createScalarResult(const RigFlowDiagResultAddress& resVarAddr) +{ + cvf::ref newFrameSet = new RigFlowDiagResultFrames(m_timeStepCount); + m_resultSets[resVarAddr] = newFrameSet; + + return newFrameSet.p(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigFlowDiagResultFrames* RigFlowDiagResults::findScalarResult(const RigFlowDiagResultAddress& resVarAddr) +{ + decltype(m_resultSets)::iterator it = m_resultSets.find(resVarAddr); + + if ( it == m_resultSets.end() ) return nullptr; + + return it->second.p(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector* RigFlowDiagResults::calculateDerivedResult(const RigFlowDiagResultAddress& resVarAddr, size_t frameIndex) +{ + if (resVarAddr.isNativeResult()) return nullptr; + + if (resVarAddr.variableName == RIG_FLD_TOF_RESNAME) + { + return calculateAverageTOFResult(resVarAddr, frameIndex); + } + else if (resVarAddr.variableName == RIG_FLD_CELL_FRACTION_RESNAME) + { + return calculateSumOfFractionsResult(resVarAddr, frameIndex); + } + else if ( resVarAddr.variableName == RIG_FLD_COMMUNICATION_RESNAME ) + { + return calculateCommunicationResult(resVarAddr, frameIndex); + } + else if ( resVarAddr.variableName == RIG_FLD_MAX_FRACTION_TRACER_RESNAME ) + { + return calculateTracerWithMaxFractionResult(resVarAddr, frameIndex); + } + + return nullptr; +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector* RigFlowDiagResults::calculateAverageTOFResult(const RigFlowDiagResultAddress& resVarAddr, size_t frameIndex) +{ + std::vector* > injectorTOFs = findResultsForSelectedTracers(resVarAddr, frameIndex, + RIG_FLD_TOF_RESNAME, RimFlowDiagSolution::INJECTOR); + std::vector* > injectorFractions = findResultsForSelectedTracers(resVarAddr, frameIndex, + RIG_FLD_CELL_FRACTION_RESNAME, RimFlowDiagSolution::INJECTOR); + + std::vector* > producerTOFs = findResultsForSelectedTracers(resVarAddr, frameIndex, + RIG_FLD_TOF_RESNAME, RimFlowDiagSolution::PRODUCER); + std::vector* > producerFractions = findResultsForSelectedTracers(resVarAddr, frameIndex, + RIG_FLD_CELL_FRACTION_RESNAME, RimFlowDiagSolution::PRODUCER); + size_t activeCellCount = this->activeCellInfo(resVarAddr)->reservoirActiveCellCount(); + + std::vector injectorTotalFractions; + std::vector injectorFractMultTof; + calculateSumOfFractionAndFractionMultTOF(activeCellCount, injectorFractions, injectorTOFs, &injectorTotalFractions, &injectorFractMultTof); + + std::vector producerTotalFractions; + std::vector producerFractMultTof; + calculateSumOfFractionAndFractionMultTOF(activeCellCount, producerFractions, producerTOFs, &producerTotalFractions, &producerFractMultTof); + + RigFlowDiagResultFrames* averageTofFrames = this->createScalarResult(resVarAddr); + std::vector& averageTof = averageTofFrames->frameData(frameIndex); + averageTof.resize(activeCellCount, HUGE_VAL); + + for ( size_t acIdx = 0 ; acIdx < activeCellCount; ++acIdx ) + { + if ( injectorTotalFractions[acIdx] == 0.0 && producerTotalFractions[acIdx] == 0.0 ) + { + averageTof[acIdx] = HUGE_VAL; + } + else + { + double retVal = 0.0; + if ( injectorTotalFractions[acIdx] != 0.0 ) retVal += (1.0/injectorTotalFractions[acIdx]) * injectorFractMultTof[acIdx]; + if ( producerTotalFractions[acIdx] != 0.0 ) retVal += (1.0/producerTotalFractions[acIdx]) * producerFractMultTof[acIdx]; + averageTof[acIdx] = retVal; + } + } + + /// Test to remove all averaging + // if (injectorTOFs.size()) averageTof = (*injectorTOFs[0]); + + return &averageTof; +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigFlowDiagResults::calculateSumOfFractionAndFractionMultTOF(size_t activeCellCount, + const std::vector *> & fractions, + const std::vector *> & TOFs, + std::vector *sumOfFractions, + std::vector *fractionMultTOF) +{ + sumOfFractions->resize(activeCellCount, 0.0); + fractionMultTOF->resize(activeCellCount, 0.0); + + for ( size_t iIdx = 0; iIdx < fractions.size() ; ++iIdx ) + { + const std::vector * frInj = fractions[iIdx]; + const std::vector * tofInj = TOFs[iIdx]; + + if ( ! (frInj && tofInj) ) continue; + + for ( size_t acIdx = 0 ; acIdx < activeCellCount; ++acIdx ) + { + if ( (*frInj)[acIdx] == HUGE_VAL ) continue; + + (*sumOfFractions)[acIdx] += (*frInj)[acIdx]; + (*fractionMultTOF)[acIdx] += (*frInj)[acIdx] * (*tofInj)[acIdx]; + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector* RigFlowDiagResults::calculateSumOfFractionsResult(const RigFlowDiagResultAddress& resVarAddr, size_t frameIndex) +{ + std::vector* > fractions = findResultsForSelectedTracers(resVarAddr, + frameIndex, + RIG_FLD_CELL_FRACTION_RESNAME, + RimFlowDiagSolution::UNDEFINED); + + RigFlowDiagResultFrames* sumOfFractionsFrames = this->createScalarResult(resVarAddr); + std::vector& sumOfFractions = sumOfFractionsFrames->frameData(frameIndex); + + size_t activeCellCount = this->activeCellInfo(resVarAddr)->reservoirActiveCellCount(); + + calculateSumOfFractions(fractions, activeCellCount, &sumOfFractions); + + return &sumOfFractions; +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector* RigFlowDiagResults::calculateTracerWithMaxFractionResult(const RigFlowDiagResultAddress &resVarAddr, size_t frameIndex) +{ + std::vector< std::pair* > > fractions = findNamedResultsForSelectedTracers(resVarAddr, + frameIndex, + RIG_FLD_CELL_FRACTION_RESNAME, + RimFlowDiagSolution::UNDEFINED); + + std::vector resultTracerIdxToGlobalTracerIdx; + { + resultTracerIdxToGlobalTracerIdx.resize(fractions.size(), -1); + + std::vector allTracerNames = m_flowDiagSolution->tracerNames(); + int selTracerIdx = 0; + for ( const auto& trNameFractionPair: fractions ) + { + for ( size_t globIdx = 0; globIdx < allTracerNames.size(); ++globIdx ) + { + if ( allTracerNames[globIdx].toStdString() == trNameFractionPair.first ) + { + resultTracerIdxToGlobalTracerIdx[selTracerIdx] = static_cast(globIdx); + break; + } + } + + ++selTracerIdx; + } + } + + size_t activeCellCount = this->activeCellInfo(resVarAddr)->reservoirActiveCellCount(); + + RigFlowDiagResultFrames* maxFractionTracerIdxFrames = this->createScalarResult(resVarAddr); + std::vector& maxFractionTracerIdx = maxFractionTracerIdxFrames->frameData(frameIndex); + { + + maxFractionTracerIdx.resize(activeCellCount, HUGE_VAL); + + std::vector maxFraction; + maxFraction.resize(activeCellCount, -HUGE_VAL); + + for ( size_t frIdx = 0; frIdx < fractions.size(); ++frIdx ) + { + const std::vector * fr = fractions[frIdx].second; + + if (!fr) continue; + + for ( size_t acIdx = 0 ; acIdx < activeCellCount; ++acIdx ) + { + if ( (*fr)[acIdx] == HUGE_VAL ) continue; + + if ( maxFraction[acIdx] < (*fr)[acIdx] ) + { + maxFraction[acIdx] = (*fr)[acIdx]; + maxFractionTracerIdx[acIdx] = resultTracerIdxToGlobalTracerIdx[frIdx]; + } + } + } + } + + return &maxFractionTracerIdx; +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector* RigFlowDiagResults::calculateCommunicationResult(const RigFlowDiagResultAddress& resVarAddr, size_t frameIndex) +{ + std::vector* > injectorFractions = findResultsForSelectedTracers(resVarAddr, + frameIndex, + RIG_FLD_CELL_FRACTION_RESNAME, + RimFlowDiagSolution::INJECTOR); + std::vector* > producerFractions = findResultsForSelectedTracers(resVarAddr, + frameIndex, + RIG_FLD_CELL_FRACTION_RESNAME, + RimFlowDiagSolution::PRODUCER); + size_t activeCellCount = this->activeCellInfo(resVarAddr)->reservoirActiveCellCount(); + + std::vector sumOfInjectorFractions; + calculateSumOfFractions(injectorFractions, activeCellCount, &sumOfInjectorFractions); + + std::vector sumOfProducerFractions; + calculateSumOfFractions(producerFractions, activeCellCount, &sumOfProducerFractions); + + RigFlowDiagResultFrames* commFrames = this->createScalarResult(resVarAddr); + std::vector& commPI = commFrames->frameData(frameIndex); + commPI.resize(activeCellCount, HUGE_VAL); + + for ( size_t acIdx = 0 ; acIdx < activeCellCount; ++acIdx ) + { + if ( (sumOfInjectorFractions)[acIdx] == HUGE_VAL ) continue; + if ( (sumOfProducerFractions)[acIdx] == HUGE_VAL ) continue; + + (commPI)[acIdx] = (sumOfInjectorFractions)[acIdx] * (sumOfProducerFractions)[acIdx]; + } + + return &commPI; +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector* > RigFlowDiagResults::findResultsForSelectedTracers(const RigFlowDiagResultAddress& resVarAddr, + size_t frameIndex, + const std::string& nativeResultName, + RimFlowDiagSolution::TracerStatusType wantedTracerType) +{ + + std::vector* > selectedTracersResults; + + for ( const std::string& tracerName: resVarAddr.selectedTracerNames ) + { + RimFlowDiagSolution::TracerStatusType tracerType = m_flowDiagSolution->tracerStatusInTimeStep(QString::fromStdString(tracerName), frameIndex); + + if (tracerType != RimFlowDiagSolution::CLOSED + && ( tracerType == wantedTracerType || wantedTracerType == RimFlowDiagSolution::UNDEFINED) ) + { + selectedTracersResults.push_back(findOrCalculateResult(RigFlowDiagResultAddress(nativeResultName, tracerName), frameIndex)); + } + } + + return selectedTracersResults; +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector< std::pair*> > +RigFlowDiagResults::findNamedResultsForSelectedTracers(const RigFlowDiagResultAddress& resVarAddr, + size_t frameIndex, + const std::string& nativeResultName, + RimFlowDiagSolution::TracerStatusType wantedTracerType) +{ + + std::vector* > > selectedTracersResults; + + for ( const std::string& tracerName: resVarAddr.selectedTracerNames ) + { + RimFlowDiagSolution::TracerStatusType tracerType = m_flowDiagSolution->tracerStatusInTimeStep(QString::fromStdString(tracerName), frameIndex); + + if (tracerType != RimFlowDiagSolution::CLOSED + && ( tracerType == wantedTracerType || wantedTracerType == RimFlowDiagSolution::UNDEFINED) ) + { + selectedTracersResults.push_back(std::make_pair(tracerName, findOrCalculateResult(RigFlowDiagResultAddress(nativeResultName, tracerName), frameIndex))); + } + } + + return selectedTracersResults; +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigStatisticsDataCache* RigFlowDiagResults::statistics(const RigFlowDiagResultAddress& resVarAddr) +{ + RigStatisticsDataCache* statCache = m_resultStatistics[resVarAddr].p(); + if ( !statCache ) + { + RigFlowDiagStatCalc* calculator = new RigFlowDiagStatCalc(this, resVarAddr); + statCache = new RigStatisticsDataCache(calculator); + m_resultStatistics[resVarAddr] = statCache; + } + + return statCache; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigFlowDiagResults::calculateSumOfFractions(const std::vector *> &fractions, + size_t activeCellCount, + std::vector* sumOfFractions) +{ + sumOfFractions->resize(activeCellCount, HUGE_VAL); + + for ( size_t iIdx = 0; iIdx < fractions.size() ; ++iIdx ) + { + const std::vector * fraction = fractions[iIdx]; + + if ( ! (fraction) ) continue; + + for ( size_t acIdx = 0 ; acIdx < activeCellCount; ++acIdx ) + { + if ( (*fraction)[acIdx] == HUGE_VAL ) continue; + + if ( (*sumOfFractions)[acIdx] == HUGE_VAL ) (*sumOfFractions)[acIdx] = 0.0; + + (*sumOfFractions)[acIdx] += (*fraction)[acIdx]; + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigFlowDiagResults::minMaxScalarValues(const RigFlowDiagResultAddress& resVarAddr, int frameIndex, + double* localMin, double* localMax) +{ + this->statistics(resVarAddr)->minMaxCellScalarValues(frameIndex, *localMin, *localMax); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigFlowDiagResults::minMaxScalarValues(const RigFlowDiagResultAddress& resVarAddr, + double* globalMin, double* globalMax) +{ + this->statistics(resVarAddr)->minMaxCellScalarValues(*globalMin, *globalMax); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigFlowDiagResults::posNegClosestToZero(const RigFlowDiagResultAddress& resVarAddr, int frameIndex, double* localPosClosestToZero, double* localNegClosestToZero) +{ + this->statistics(resVarAddr)->posNegClosestToZero(frameIndex, *localPosClosestToZero, *localNegClosestToZero); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigFlowDiagResults::posNegClosestToZero(const RigFlowDiagResultAddress& resVarAddr, double* globalPosClosestToZero, double* globalNegClosestToZero) +{ + this->statistics(resVarAddr)->posNegClosestToZero(*globalPosClosestToZero, *globalNegClosestToZero); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigFlowDiagResults::meanScalarValue(const RigFlowDiagResultAddress& resVarAddr, double* meanValue) +{ + CVF_ASSERT(meanValue); + + this->statistics(resVarAddr)->meanCellScalarValues(*meanValue); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigFlowDiagResults::meanScalarValue(const RigFlowDiagResultAddress& resVarAddr, int frameIndex, double* meanValue) +{ + this->statistics(resVarAddr)->meanCellScalarValues(frameIndex, *meanValue); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigFlowDiagResults::p10p90ScalarValues(const RigFlowDiagResultAddress& resVarAddr, double* p10, double* p90) +{ + this->statistics(resVarAddr)->p10p90CellScalarValues(*p10, *p90); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigFlowDiagResults::p10p90ScalarValues(const RigFlowDiagResultAddress& resVarAddr, int frameIndex, double* p10, double* p90) +{ + this->statistics(resVarAddr)->p10p90CellScalarValues(frameIndex, *p10, *p90); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigFlowDiagResults::sumScalarValue(const RigFlowDiagResultAddress& resVarAddr, double* sum) +{ + CVF_ASSERT(sum); + + this->statistics(resVarAddr)->sumCellScalarValues(*sum); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigFlowDiagResults::sumScalarValue(const RigFlowDiagResultAddress& resVarAddr, int frameIndex, double* sum) +{ + CVF_ASSERT(sum); + + this->statistics(resVarAddr)->sumCellScalarValues(frameIndex, *sum); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const std::vector& RigFlowDiagResults::scalarValuesHistogram(const RigFlowDiagResultAddress& resVarAddr) +{ + return this->statistics(resVarAddr)->cellScalarValuesHistogram(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const std::vector& RigFlowDiagResults::scalarValuesHistogram(const RigFlowDiagResultAddress& resVarAddr, int frameIndex) +{ + return this->statistics(resVarAddr)->cellScalarValuesHistogram(frameIndex); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const std::vector& RigFlowDiagResults::uniqueCellScalarValues(const RigFlowDiagResultAddress& resVarAddr) +{ + return this->statistics(resVarAddr)->uniqueCellScalarValues(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const std::vector& RigFlowDiagResults::uniqueCellScalarValues(const RigFlowDiagResultAddress& resVarAddr, int frameIndex) +{ + return this->statistics(resVarAddr)->uniqueCellScalarValues(frameIndex); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::pair RigFlowDiagResults::injectorProducerPairFluxes(const std::string& injTracername, + const std::string& prodTracerName, + int frameIndex) +{ + calculateNativeResultsIfNotPreviouslyAttempted(frameIndex); + + auto commPair = m_injProdPairFluxCommunicationTimesteps[frameIndex].find(std::make_pair(injTracername, prodTracerName)); + if (commPair != m_injProdPairFluxCommunicationTimesteps[frameIndex].end()) + { + return commPair->second; + } + else + { + return std::make_pair(0.0, 0.0); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +double RigFlowDiagResults::maxAbsPairFlux(int frameIndex) +{ + calculateNativeResultsIfNotPreviouslyAttempted(frameIndex); + double maxFlux = 0.0; + + for (const auto& commPair : m_injProdPairFluxCommunicationTimesteps[frameIndex]) + { + if (fabs(commPair.second.first) > maxFlux ) maxFlux = fabs(commPair.second.first); + if (fabs(commPair.second.second) > maxFlux ) maxFlux = fabs(commPair.second.second); + } + + return maxFlux; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RigFlowDiagResults::calculatedTimeSteps() +{ + std::vector timestepIndices; + for (size_t tsIdx = 0; tsIdx < m_timeStepCount; ++tsIdx) + { + if (m_hasAtemptedNativeResults[tsIdx]) timestepIndices.push_back(static_cast(tsIdx)); + } + + return timestepIndices; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigFlowDiagResults::FlowCharacteristicsResultFrame::FlowCharacteristicsResultFrame() + : m_lorenzCoefficient(HUGE_VAL) +{ + +} diff --git a/ApplicationCode/ReservoirDataModel/RigFlowDiagResults.h b/ApplicationCode/ReservoirDataModel/RigFlowDiagResults.h new file mode 100644 index 0000000000..fa230eb809 --- /dev/null +++ b/ApplicationCode/ReservoirDataModel/RigFlowDiagResults.h @@ -0,0 +1,143 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// +#pragma once + +#include "RigFlowDiagResultAddress.h" + +#include "RimFlowDiagSolution.h" + +#include "cafPdmPointer.h" + +#include "cvfBase.h" +#include "cvfObject.h" + +#include +#include +#include + +class RigFlowDiagResultFrames; +class RigStatisticsDataCache; +class RigFlowDiagSolverInterface; +class RigActiveCellInfo; + +class RigFlowDiagResults: public cvf::Object +{ +public: + RigFlowDiagResults(RimFlowDiagSolution* flowSolution, size_t timeStepCount); + virtual ~RigFlowDiagResults(); + + const std::vector* resultValues(const RigFlowDiagResultAddress& resVarAddr, size_t frameIndex); + size_t timeStepCount() { return m_timeStepCount; } + const RigActiveCellInfo * activeCellInfo(const RigFlowDiagResultAddress& resVarAddr); + + void minMaxScalarValues (const RigFlowDiagResultAddress& resVarAddr, int frameIndex, double* localMin, double* localMax); + void minMaxScalarValues (const RigFlowDiagResultAddress& resVarAddr, double* globalMin, double* globalMax); + void posNegClosestToZero(const RigFlowDiagResultAddress& resVarAddr, int frameIndex, double* localPosClosestToZero, double* localNegClosestToZero); + void posNegClosestToZero(const RigFlowDiagResultAddress& resVarAddr, double* globalPosClosestToZero, double* globalNegClosestToZero); + void meanScalarValue(const RigFlowDiagResultAddress& resVarAddr, double* meanValue); + void meanScalarValue(const RigFlowDiagResultAddress& resVarAddr, int frameIndex, double* meanValue); + void p10p90ScalarValues(const RigFlowDiagResultAddress& resVarAddr, double* p10, double* p90); + void p10p90ScalarValues(const RigFlowDiagResultAddress& resVarAddr, int frameIndex, double* p10, double* p90); + void sumScalarValue(const RigFlowDiagResultAddress& resVarAddr, double* sum); + void sumScalarValue(const RigFlowDiagResultAddress& resVarAddr, int frameIndex, double* sum); + const std::vector& scalarValuesHistogram(const RigFlowDiagResultAddress& resVarAddr); + const std::vector& scalarValuesHistogram(const RigFlowDiagResultAddress& resVarAddr, int frameIndex); + const std::vector& uniqueCellScalarValues(const RigFlowDiagResultAddress& resVarAddr); + const std::vector& uniqueCellScalarValues(const RigFlowDiagResultAddress& resVarAddr, int frameIndex); + + std::pair injectorProducerPairFluxes(const std::string& injTracername, const std::string& prodTracerName, int frameIndex); + double maxAbsPairFlux(int frameIndex); + + std::vector calculatedTimeSteps(); + + struct FlowCharacteristicsResultFrame + { + FlowCharacteristicsResultFrame(); + + using Curve = std::pair< std::vector, std::vector >; + + Curve m_flowCapStorageCapCurve; + Curve m_sweepEfficiencyCurve; + double m_lorenzCoefficient; + }; + + const FlowCharacteristicsResultFrame& flowCharacteristicsResults(int frameIndex) { return m_flowCharResultFrames[frameIndex];} + +private: + const std::vector* findOrCalculateResult (const RigFlowDiagResultAddress& resVarAddr, size_t frameIndex); + void calculateNativeResultsIfNotPreviouslyAttempted(size_t frameIndex); + + std::vector* calculateDerivedResult(const RigFlowDiagResultAddress& resVarAddr, size_t frameIndex); + + + + + std::vector* calculateAverageTOFResult(const RigFlowDiagResultAddress& resVarAddr, size_t frameIndex); + std::vector* calculateSumOfFractionsResult(const RigFlowDiagResultAddress& resVarAddr, size_t frameIndex); + std::vector* calculateTracerWithMaxFractionResult(const RigFlowDiagResultAddress &resVarAddr, size_t frameIndex); + std::vector* calculateCommunicationResult(const RigFlowDiagResultAddress& resVarAddr, size_t frameIndex); + + + std::vector* > findResultsForSelectedTracers(const RigFlowDiagResultAddress& resVarAddr, + size_t frameIndex, + const std::string& nativeResultName, + RimFlowDiagSolution::TracerStatusType wantedTracerType); + std::vector< std::pair*> > + findNamedResultsForSelectedTracers(const RigFlowDiagResultAddress& resVarAddr, + size_t frameIndex, + const std::string& nativeResultName, + RimFlowDiagSolution::TracerStatusType wantedTracerType); + + void calculateSumOfFractionAndFractionMultTOF(size_t activeCellCount, + const std::vector *>& injectorFractions, + const std::vector *>& injectorTOFs, + std::vector *injectorTotalFractions, + std::vector *injectorFractMultTof); + + void calculateSumOfFractions(const std::vector *> &fractions, + size_t activeCellCount, + std::vector* sumOfFractions); + + RigStatisticsDataCache* statistics(const RigFlowDiagResultAddress& resVarAddr); + + RigFlowDiagResultFrames* createScalarResult(const RigFlowDiagResultAddress& resVarAddr); + RigFlowDiagResultFrames* findScalarResult (const RigFlowDiagResultAddress& resVarAddr) ; + std::vector* findScalarResultFrame (const RigFlowDiagResultAddress& resVarAddr, size_t frameIndex); + + //void deleteScalarResult(const RigFlowDiagResultAddress& resVarAddr); + + RigFlowDiagSolverInterface* solverInterface(); + + size_t m_timeStepCount; + caf::PdmPointer m_flowDiagSolution; + + std::vector m_hasAtemptedNativeResults; + + std::map< RigFlowDiagResultAddress, cvf::ref > m_resultSets; + std::map< RigFlowDiagResultAddress, cvf::ref > m_resultStatistics; + + using InjectorProducerCommunicationMap = std::map< std::pair, std::pair >; + std::vector m_injProdPairFluxCommunicationTimesteps; + + + + std::vector m_flowCharResultFrames; + +}; + + diff --git a/ApplicationCode/ReservoirDataModel/RigFlowDiagSolverInterface.cpp b/ApplicationCode/ReservoirDataModel/RigFlowDiagSolverInterface.cpp new file mode 100644 index 0000000000..a69cdf5192 --- /dev/null +++ b/ApplicationCode/ReservoirDataModel/RigFlowDiagSolverInterface.cpp @@ -0,0 +1,417 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RigFlowDiagSolverInterface.h" + +#include "RifEclipseOutputFileTools.h" +#include "RifReaderInterface.h" + +#include "RigActiveCellInfo.h" +#include "RigCaseCellResultsData.h" +#include "RigEclipseCaseData.h" + +#include "RigFlowDiagInterfaceTools.h" +#include "opm/flowdiagnostics/DerivedQuantities.hpp" + +#include "RimEclipseCase.h" +#include "RimEclipseResultCase.h" +#include "RimFlowDiagSolution.h" + +#include +#include "cafProgressInfo.h" + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigFlowDiagTimeStepResult::RigFlowDiagTimeStepResult(size_t activeCellCount) + : m_activeCellCount(activeCellCount), m_lorenzCoefficient(HUGE_VAL) +{ + +} + + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigFlowDiagTimeStepResult::setTracerTOF(const std::string& tracerName, const std::map& cellValues) +{ + std::set tracers; + tracers.insert(tracerName); + + RigFlowDiagResultAddress resAddr(RIG_FLD_TOF_RESNAME, tracers); + + this->addResult(resAddr, cellValues); + + std::vector& activeCellValues = m_nativeResults[resAddr]; + for (double & val: activeCellValues) + { + val = val * 1.15741e-5; // days pr second. Converting to days + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigFlowDiagTimeStepResult::setTracerFraction(const std::string& tracerName, const std::map& cellValues) +{ + std::set tracers; + tracers.insert(tracerName); + + this->addResult(RigFlowDiagResultAddress(RIG_FLD_CELL_FRACTION_RESNAME, tracers), cellValues); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigFlowDiagTimeStepResult::setInjProdWellPairFlux(const std::string& injectorTracerName, + const std::string& producerTracerName, + const std::pair& injProdFluxes) +{ + m_injProdWellPairFluxes[std::make_pair(injectorTracerName, producerTracerName)] = injProdFluxes; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigFlowDiagTimeStepResult::addResult(const RigFlowDiagResultAddress& resAddr, const std::map& cellValues) +{ + std::vector& activeCellValues = m_nativeResults[resAddr]; + + CVF_ASSERT(activeCellValues.empty()); + + activeCellValues.resize(m_activeCellCount, HUGE_VAL); + + for (const auto& pairIt : cellValues) + { + activeCellValues[pairIt.first] = pairIt.second; + } +} + + +class RigOpmFlowDiagStaticData : public cvf::Object +{ +public: + RigOpmFlowDiagStaticData(const std::string& grid, const std::string& init) + { + Opm::ECLInitFileData initData(init); + + m_eclGraph.reset(new Opm::ECLGraph(Opm::ECLGraph::load(grid, initData))); + + m_hasUnifiedRestartFile = false; + m_poreVolume = m_eclGraph->poreVolume(); + } + + std::unique_ptr m_eclGraph; + std::vector m_poreVolume; + std::unique_ptr m_fldToolbox; + bool m_hasUnifiedRestartFile; + std::vector m_singleRestartDataTimeSteps; + std::unique_ptr m_unifiedRestartData; +}; + + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigFlowDiagSolverInterface::RigFlowDiagSolverInterface(RimEclipseResultCase * eclipseCase) +: m_eclipseCase(eclipseCase) +{ +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigFlowDiagSolverInterface::~RigFlowDiagSolverInterface() +{ + +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigFlowDiagTimeStepResult RigFlowDiagSolverInterface::calculate(size_t timeStepIndex, + std::map > injectorTracers, + std::map > producerTracers) +{ + using namespace Opm::FlowDiagnostics; + + RigFlowDiagTimeStepResult result(m_eclipseCase->eclipseCaseData()->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->reservoirActiveCellCount()); + + caf::ProgressInfo progressInfo(8, "Calculating Flow Diagnostics"); + + if ( m_opmFlowDiagStaticData.isNull() ) + { + progressInfo.setProgressDescription("Grid access"); + + // Get set of files + QString gridFileName = m_eclipseCase->gridFileName(); + + QStringList m_filesWithSameBaseName; + + if ( !RifEclipseOutputFileTools::findSiblingFilesWithSameBaseName(gridFileName, &m_filesWithSameBaseName) ) return result; + + QString initFileName = RifEclipseOutputFileTools::firstFileNameOfType(m_filesWithSameBaseName, ECL_INIT_FILE); + + m_opmFlowDiagStaticData = new RigOpmFlowDiagStaticData(gridFileName.toStdString(), + initFileName.toStdString()); + + progressInfo.incrementProgress(); + progressInfo.setProgressDescription("Calculating Connectivities"); + + const Opm::FlowDiagnostics::ConnectivityGraph connGraph = + Opm::FlowDiagnostics::ConnectivityGraph{ static_cast(m_opmFlowDiagStaticData->m_eclGraph->numCells()), + m_opmFlowDiagStaticData->m_eclGraph->neighbours() }; + + progressInfo.incrementProgress(); + progressInfo.setProgressDescription("Initialize Solver"); + + // Create the Toolbox. + + m_opmFlowDiagStaticData->m_fldToolbox.reset(new Opm::FlowDiagnostics::Toolbox{ connGraph }); + m_opmFlowDiagStaticData->m_fldToolbox->assignPoreVolume( m_opmFlowDiagStaticData->m_poreVolume); + + // Look for unified restart file + + QString restartFileName = RifEclipseOutputFileTools::firstFileNameOfType(m_filesWithSameBaseName, ECL_UNIFIED_RESTART_FILE); + if ( !restartFileName.isEmpty() ) + { + m_opmFlowDiagStaticData->m_unifiedRestartData.reset(new Opm::ECLRestartData(Opm::ECLRestartData(restartFileName.toStdString()))); + m_opmFlowDiagStaticData->m_hasUnifiedRestartFile = true; + } + else + { + QStringList restartFileNames = RifEclipseOutputFileTools::filterFileNamesOfType(m_filesWithSameBaseName, ECL_RESTART_FILE); + + size_t restartFileCount = static_cast(restartFileNames.size()); + size_t maxTimeStepCount = m_eclipseCase->eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)->maxTimeStepCount(); + + if (restartFileCount <= timeStepIndex && restartFileCount != maxTimeStepCount ) + { + QMessageBox::critical(nullptr, "ResInsight", "Flow Diagnostics: Could not find all the restart files. Results will not be loaded."); + return result; + } + + restartFileNames.sort(); // To make sure they are sorted in increasing *.X000N order. Hack. Should probably be actual time stored on file. + m_opmFlowDiagStaticData->m_hasUnifiedRestartFile = false; + + for (auto restartFileName : restartFileNames) + { + m_opmFlowDiagStaticData->m_singleRestartDataTimeSteps.push_back(Opm::ECLRestartData(restartFileName.toStdString())); + } + } + } + + progressInfo.setProgress(3); + progressInfo.setProgressDescription("Assigning Flux Field"); + + Opm::ECLRestartData* currentRestartData = nullptr; + + if ( ! m_opmFlowDiagStaticData->m_hasUnifiedRestartFile ) + { + currentRestartData = &(m_opmFlowDiagStaticData->m_singleRestartDataTimeSteps[timeStepIndex]); + } + else + { + currentRestartData = m_opmFlowDiagStaticData->m_unifiedRestartData.get(); + } + + CVF_ASSERT(currentRestartData); + + size_t resultIndexWithMaxTimeSteps = cvf::UNDEFINED_SIZE_T; + m_eclipseCase->eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)->maxTimeStepCount(&resultIndexWithMaxTimeSteps); + + int reportStepNumber = m_eclipseCase->eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)->reportStepNumber(resultIndexWithMaxTimeSteps, timeStepIndex); + + if ( !currentRestartData->selectReportStep(reportStepNumber) ) + { + QMessageBox::critical(nullptr, "ResInsight", "Flow Diagnostics: Could not find the requested timestep in the result file. Results will not be loaded."); + return result; + } + + + // Set up flow Toolbox with timestep data + Opm::FlowDiagnostics::CellSetValues sumWellFluxPrCell; + + { + Opm::FlowDiagnostics::ConnectionValues connectionsVals = RigFlowDiagInterfaceTools::extractFluxFieldFromRestartFile(*(m_opmFlowDiagStaticData->m_eclGraph), + *currentRestartData); + + m_opmFlowDiagStaticData->m_fldToolbox->assignConnectionFlux(connectionsVals); + + progressInfo.incrementProgress(); + + Opm::ECLWellSolution wsol = Opm::ECLWellSolution{-1.0 , false}; + + std::vector gridNames = m_opmFlowDiagStaticData->m_eclGraph->activeGrids(); + + const std::vector well_fluxes = wsol.solution(*currentRestartData, gridNames); + + sumWellFluxPrCell = RigFlowDiagInterfaceTools::extractWellFlows(*(m_opmFlowDiagStaticData->m_eclGraph), well_fluxes); + + m_opmFlowDiagStaticData->m_fldToolbox->assignInflowFlux(sumWellFluxPrCell); + + // Start Hack: Filter connection cells with inconsistent well in flow direction (Hack, we should do something better) + + for ( auto& tracerCellIdxsPair: injectorTracers ) + { + std::vector filteredCellIndices; + + for (int activeCellIdx : tracerCellIdxsPair.second) + { + auto activeCellIdxFluxPair = sumWellFluxPrCell.find(activeCellIdx); + CVF_TIGHT_ASSERT(activeCellIdxFluxPair != sumWellFluxPrCell.end()); + + if (activeCellIdxFluxPair->second > 0 ) + { + filteredCellIndices.push_back(activeCellIdx); + } + } + + if (tracerCellIdxsPair.second.size() != filteredCellIndices.size()) tracerCellIdxsPair.second = filteredCellIndices; + } + + for ( auto& tracerCellIdxsPair: producerTracers ) + { + std::vector filteredCellIndices; + + for (int activeCellIdx : tracerCellIdxsPair.second) + { + auto activeCellIdxFluxPair = sumWellFluxPrCell.find(activeCellIdx); + CVF_TIGHT_ASSERT(activeCellIdxFluxPair != sumWellFluxPrCell.end()); + + if (activeCellIdxFluxPair->second < 0 ) + { + filteredCellIndices.push_back(activeCellIdx); + } + } + if (tracerCellIdxsPair.second.size() != filteredCellIndices.size()) tracerCellIdxsPair.second = filteredCellIndices; + } + + // End Hack + } + + progressInfo.incrementProgress(); + progressInfo.setProgressDescription("Injector Solution"); + + { + // Injection Solution + + std::vector injectorCellSets; + for ( const auto& tIt: injectorTracers ) + { + injectorCellSets.push_back(CellSet(CellSetID(tIt.first), tIt.second)); + } + + std::unique_ptr injectorSolution; + try + { + injectorSolution.reset(new Toolbox::Forward( m_opmFlowDiagStaticData->m_fldToolbox->computeInjectionDiagnostics(injectorCellSets))); + } + catch (const std::exception& e) + { + QMessageBox::critical(nullptr, "ResInsight", "Flow Diagnostics: " + QString(e.what())); + return result; + } + + for ( const CellSetID& tracerId: injectorSolution->fd.startPoints() ) + { + CellSetValues tofVals = injectorSolution->fd.timeOfFlight(tracerId); + result.setTracerTOF(tracerId.to_string(), tofVals); + CellSetValues fracVals = injectorSolution->fd.concentration(tracerId); + result.setTracerFraction(tracerId.to_string(), fracVals); + } + + progressInfo.incrementProgress(); + progressInfo.setProgressDescription("Producer Solution"); + + // Producer Solution + + std::vector prodjCellSets; + for ( const auto& tIt: producerTracers ) + { + prodjCellSets.push_back(CellSet(CellSetID(tIt.first), tIt.second)); + } + + std::unique_ptr producerSolution; + try + { + producerSolution.reset(new Toolbox::Reverse(m_opmFlowDiagStaticData->m_fldToolbox->computeProductionDiagnostics(prodjCellSets))); + } + catch ( const std::exception& e ) + { + QMessageBox::critical(nullptr, "ResInsight", "Flow Diagnostics: " + QString(e.what())); + return result; + } + + for ( const CellSetID& tracerId: producerSolution->fd.startPoints() ) + { + CellSetValues tofVals = producerSolution->fd.timeOfFlight(tracerId); + result.setTracerTOF(tracerId.to_string(), tofVals); + CellSetValues fracVals = producerSolution->fd.concentration(tracerId); + result.setTracerFraction(tracerId.to_string(), fracVals); + } + + progressInfo.incrementProgress(); + progressInfo.setProgressDescription("Well pair fluxes"); + + int producerTracerCount = static_cast( prodjCellSets.size()); + + #pragma omp parallel for + for ( int pIdx = 0; pIdx < producerTracerCount; ++pIdx ) + { + const auto& prodCellSet = prodjCellSets[pIdx]; + + for ( const auto& injCellSet : injectorCellSets ) + { + std::pair fluxPair = injectorProducerPairFlux(*(injectorSolution.get()), + *(producerSolution.get()), + injCellSet, + prodCellSet, + sumWellFluxPrCell); + #pragma omp critical + { + result.setInjProdWellPairFlux(injCellSet.id().to_string(), + prodCellSet.id().to_string(), + fluxPair); + } + } + } + + try + { + Graph flowCapStorCapCurve = flowCapacityStorageCapacityCurve(*(injectorSolution.get()), + *(producerSolution.get()), + m_opmFlowDiagStaticData->m_poreVolume, + 0.1); + + result.setFlowCapStorageCapCurve(flowCapStorCapCurve); + result.setSweepEfficiencyCurve(sweepEfficiency(flowCapStorCapCurve)); + result.setLorenzCoefficient(lorenzCoefficient(flowCapStorCapCurve)); + } + catch ( const std::exception& e ) + { + QMessageBox::critical(nullptr, "ResInsight", "Flow Diagnostics: " + QString(e.what())); + } + } + + return result; // Relying on implicit move constructor +} + diff --git a/ApplicationCode/ReservoirDataModel/RigFlowDiagSolverInterface.h b/ApplicationCode/ReservoirDataModel/RigFlowDiagSolverInterface.h new file mode 100644 index 0000000000..81a154b715 --- /dev/null +++ b/ApplicationCode/ReservoirDataModel/RigFlowDiagSolverInterface.h @@ -0,0 +1,93 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// +#pragma once + +#include "RigFlowDiagResultAddress.h" +#include "cvfBase.h" +#include "cvfObject.h" +#include "cafPdmPointer.h" + +#include +#include +#include + +class RimEclipseResultCase; +class RimFlowDiagSolution; + + +class RigFlowDiagTimeStepResult +{ +public: + explicit RigFlowDiagTimeStepResult(size_t activeCellCount); + + void setTracerTOF (const std::string& tracerName, const std::map& cellValues); + void setTracerFraction(const std::string& tracerName, const std::map& cellValues); + void setInjProdWellPairFlux(const std::string& injectorTracerName, + const std::string& producerTracerName, + const std::pair& injProdFluxes) ; + + using Curve = std::pair< std::vector, std::vector >; + void setFlowCapStorageCapCurve(const Curve& flCapStCapCurve) { m_flowCapStorageCapCurve = flCapStCapCurve;} + void setSweepEfficiencyCurve(const Curve& sweepEffCurve) { m_sweepEfficiencyCurve = sweepEffCurve; } + void setLorenzCoefficient(double coeff) { m_lorenzCoefficient = coeff;} + + // Used to "steal" the data from this one using swap + std::map >& nativeResults() { return m_nativeResults; } + std::map, std::pair > & injProdWellPairFluxes() { return m_injProdWellPairFluxes; } + + Curve& flowCapStorageCapCurve() { return m_flowCapStorageCapCurve; } + Curve& sweepEfficiencyCurve() { return m_sweepEfficiencyCurve; } + double lorenzCoefficient() { return m_lorenzCoefficient;} + +private: + + void addResult(const RigFlowDiagResultAddress& resAddr, const std::map& cellValues); + + std::map > m_nativeResults; + std::map, std::pair > m_injProdWellPairFluxes; + + Curve m_flowCapStorageCapCurve; + Curve m_sweepEfficiencyCurve; + double m_lorenzCoefficient; + + size_t m_activeCellCount; +}; + + +class RigEclipseCaseData; +class RigOpmFlowDiagStaticData; + +class RigFlowDiagSolverInterface : public cvf::Object +{ +public: + explicit RigFlowDiagSolverInterface(RimEclipseResultCase * eclipseCase); + virtual ~RigFlowDiagSolverInterface(); + + RigFlowDiagTimeStepResult calculate(size_t timestep, + std::map > injectorTracers, + std::map > producerTracers); + +private: + RimEclipseResultCase * m_eclipseCase; + + cvf::ref m_opmFlowDiagStaticData; + +}; + + + diff --git a/ApplicationCode/ReservoirDataModel/RigFlowDiagStatCalc.cpp b/ApplicationCode/ReservoirDataModel/RigFlowDiagStatCalc.cpp new file mode 100644 index 0000000000..724d026ebd --- /dev/null +++ b/ApplicationCode/ReservoirDataModel/RigFlowDiagStatCalc.cpp @@ -0,0 +1,107 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) Statoil ASA +// Copyright (C) Ceetron Solutions 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RigFlowDiagStatCalc.h" +#include "RigFlowDiagResults.h" + +#include +#include "RigStatisticsMath.h" + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigFlowDiagStatCalc::RigFlowDiagStatCalc(RigFlowDiagResults* flowDiagResults, const RigFlowDiagResultAddress& resVarAddr) +: m_resVarAddr(resVarAddr) +{ + m_resultsData = flowDiagResults; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigFlowDiagStatCalc::minMaxCellScalarValues(size_t timeStepIndex, double& min, double& max) +{ + MinMaxAccumulator minMaxCalc(min, max); + const std::vector* vals = m_resultsData->resultValues(m_resVarAddr, timeStepIndex); + + if (vals) minMaxCalc.addData(*vals); + + min = minMaxCalc.min; + max = minMaxCalc.max; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigFlowDiagStatCalc::posNegClosestToZero(size_t timeStepIndex, double& pos, double& neg) +{ + PosNegAccumulator posNegCalc(pos, neg); + const std::vector* vals = m_resultsData->resultValues(m_resVarAddr, timeStepIndex); + + if ( vals ) posNegCalc.addData(*vals); + + pos = posNegCalc.pos; + neg = posNegCalc.neg; +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigFlowDiagStatCalc::valueSumAndSampleCount(size_t timeStepIndex, double& valueSum, size_t& sampleCount) +{ + SumCountAccumulator sumCountCalc(valueSum, sampleCount); + const std::vector* vals = m_resultsData->resultValues(m_resVarAddr, timeStepIndex); + + if ( vals ) sumCountCalc.addData(*vals); + + valueSum = sumCountCalc.valueSum; + sampleCount = sumCountCalc.sampleCount; +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigFlowDiagStatCalc::addDataToHistogramCalculator(size_t timeStepIndex, RigHistogramCalculator& histogramCalculator) +{ + const std::vector* vals = m_resultsData->resultValues(m_resVarAddr, timeStepIndex); + + if ( vals ) histogramCalculator.addData(*vals); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigFlowDiagStatCalc::uniqueValues(size_t timeStepIndex, std::set& uniqueValues) +{ + const std::vector* vals = m_resultsData->resultValues(m_resVarAddr, timeStepIndex); + + if ( vals ) for ( double val : (*vals) ) uniqueValues.insert(static_cast(val)); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +size_t RigFlowDiagStatCalc::timeStepCount() +{ + return m_resultsData->timeStepCount(); +} + + diff --git a/ApplicationCode/ReservoirDataModel/RigFlowDiagStatCalc.h b/ApplicationCode/ReservoirDataModel/RigFlowDiagStatCalc.h new file mode 100644 index 0000000000..bd145c43d2 --- /dev/null +++ b/ApplicationCode/ReservoirDataModel/RigFlowDiagStatCalc.h @@ -0,0 +1,50 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) Statoil ASA +// Copyright (C) Ceetron Solutions 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "RigStatisticsCalculator.h" +#include "RigFlowDiagResultAddress.h" + +class RigHistogramCalculator; +class RigFlowDiagResults; + +//================================================================================================== +/// +//================================================================================================== + +class RigFlowDiagStatCalc : public RigStatisticsCalculator +{ +public: + RigFlowDiagStatCalc(RigFlowDiagResults* femResultCollection, const RigFlowDiagResultAddress& resVarAddr); + + virtual void minMaxCellScalarValues(size_t timeStepIndex, double& min, double& max); + virtual void posNegClosestToZero(size_t timeStepIndex, double& pos, double& neg); + virtual void valueSumAndSampleCount(size_t timeStepIndex, double& valueSum, size_t& sampleCount); + virtual void addDataToHistogramCalculator(size_t timeStepIndex, RigHistogramCalculator& histogramCalculator); + virtual void uniqueValues(size_t timeStepIndex, std::set& values); + virtual size_t timeStepCount(); + +private: + RigFlowDiagResults* m_resultsData; + RigFlowDiagResultAddress m_resVarAddr; +}; + + + diff --git a/ApplicationCode/ReservoirDataModel/RigFlowDiagVisibleCellsStatCalc.cpp b/ApplicationCode/ReservoirDataModel/RigFlowDiagVisibleCellsStatCalc.cpp new file mode 100644 index 0000000000..2fc30a2de9 --- /dev/null +++ b/ApplicationCode/ReservoirDataModel/RigFlowDiagVisibleCellsStatCalc.cpp @@ -0,0 +1,99 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2015- Statoil ASA +// Copyright (C) 2015- Ceetron Solutions 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + + +#include "RigFlowDiagVisibleCellsStatCalc.h" +#include "RigActiveCellInfo.h" + +#include +#include "RigStatisticsMath.h" +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigFlowDiagVisibleCellsStatCalc::RigFlowDiagVisibleCellsStatCalc(RigFlowDiagResults* resultsData, + const RigFlowDiagResultAddress& resVarAddr, + const cvf::UByteArray* cellVisibilities) +: m_resultsData(resultsData), m_resVarAddr(resVarAddr), m_cellVisibilities(cellVisibilities) +{ +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigFlowDiagVisibleCellsStatCalc::minMaxCellScalarValues(size_t timeStepIndex, double& min, double& max) +{ + MinMaxAccumulator acc(min, max); + traverseElementNodes(acc, timeStepIndex); + min = acc.min; + max = acc.max; +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigFlowDiagVisibleCellsStatCalc::posNegClosestToZero(size_t timeStepIndex, double& pos, double& neg) +{ + PosNegAccumulator acc(pos, neg); + traverseElementNodes(acc, timeStepIndex); + pos = acc.pos; + neg = acc.neg; + +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigFlowDiagVisibleCellsStatCalc::valueSumAndSampleCount(size_t timeStepIndex, double& valueSum, size_t& sampleCount) +{ + SumCountAccumulator acc(valueSum, sampleCount); + traverseElementNodes(acc, timeStepIndex); + valueSum = acc.valueSum; + sampleCount = acc.sampleCount; +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigFlowDiagVisibleCellsStatCalc::addDataToHistogramCalculator(size_t timeStepIndex, RigHistogramCalculator& histogramCalculator) +{ + traverseElementNodes(histogramCalculator, timeStepIndex); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigFlowDiagVisibleCellsStatCalc::uniqueValues(size_t timeStepIndex, std::set& values) +{ + UniqueValueAccumulator acc; + traverseElementNodes(acc, timeStepIndex); + values = acc.uniqueValues; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +size_t RigFlowDiagVisibleCellsStatCalc::timeStepCount() +{ + return m_resultsData->timeStepCount(); +} + + diff --git a/ApplicationCode/ReservoirDataModel/RigFlowDiagVisibleCellsStatCalc.h b/ApplicationCode/ReservoirDataModel/RigFlowDiagVisibleCellsStatCalc.h new file mode 100644 index 0000000000..7a0bf1261e --- /dev/null +++ b/ApplicationCode/ReservoirDataModel/RigFlowDiagVisibleCellsStatCalc.h @@ -0,0 +1,79 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2015- Statoil ASA +// Copyright (C) 2015- Ceetron Solutions 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +//================================================================================================== +/// +//================================================================================================== +#include "RigStatisticsCalculator.h" +#include "RigFlowDiagResultAddress.h" +#include "RigFlowDiagResults.h" +#include "RigActiveCellInfo.h" + +#include "cvfArray.h" + +class RigFlowDiagResults; +class RigActiveCellInfo; + +class RigFlowDiagVisibleCellsStatCalc : public RigStatisticsCalculator +{ +public: + RigFlowDiagVisibleCellsStatCalc(RigFlowDiagResults* resultsData, + const RigFlowDiagResultAddress& resVarAddr, + const cvf::UByteArray* cellVisibilities); + + virtual void minMaxCellScalarValues(size_t timeStepIndex, double& min, double& max); + virtual void posNegClosestToZero(size_t timeStepIndex, double& pos, double& neg); + virtual void valueSumAndSampleCount(size_t timeStepIndex, double& valueSum, size_t& sampleCount); + virtual void addDataToHistogramCalculator(size_t timeStepIndex, RigHistogramCalculator& histogramCalculator); + virtual void uniqueValues(size_t timeStepIndex, std::set& values); + virtual size_t timeStepCount(); + +private: + RigFlowDiagResults* m_resultsData; + RigFlowDiagResultAddress m_resVarAddr; + cvf::cref m_cellVisibilities; + + template + void traverseElementNodes(StatisticsAccumulator& accumulator, size_t timeStepIndex) + { + const std::vector* values = m_resultsData->resultValues(m_resVarAddr, timeStepIndex); + if (!values) return; + + const RigActiveCellInfo* actCellInfo = m_resultsData->activeCellInfo(m_resVarAddr); + + size_t cellCount = actCellInfo->reservoirCellCount(); + + CVF_TIGHT_ASSERT(cellCount == m_cellVisibilities->size()); + + for ( size_t cIdx = 0; cIdx < cellCount; ++cIdx ) + { + if ( !(*m_cellVisibilities)[cIdx] ) continue; + + size_t cellResultIndex = actCellInfo->cellResultIndex(cIdx); + + if ( cellResultIndex != cvf::UNDEFINED_SIZE_T ) accumulator.addValue((*values)[cellResultIndex]); + } + } + +}; + + + diff --git a/ApplicationCode/ReservoirDataModel/RigGridBase.cpp b/ApplicationCode/ReservoirDataModel/RigGridBase.cpp index 9344584342..36db2e1bb8 100644 --- a/ApplicationCode/ReservoirDataModel/RigGridBase.cpp +++ b/ApplicationCode/ReservoirDataModel/RigGridBase.cpp @@ -126,11 +126,8 @@ void RigGridBase::initSubCellsMainGridCellIndex() size_t cellIdx; for (cellIdx = 0; cellIdx < grid->cellCount(); ++cellIdx) { - RigLocalGrid* localGrid = NULL; - RigGridBase* parentGrid = NULL; - - localGrid = static_cast(grid); - parentGrid = localGrid->parentGrid(); + RigLocalGrid* localGrid = static_cast(grid); + RigGridBase* parentGrid = localGrid->parentGrid(); RigCell& cell = localGrid->cell(cellIdx); size_t parentCellIndex = cell.parentCellIndex(); diff --git a/ApplicationCode/ReservoirDataModel/RigGridBase.h b/ApplicationCode/ReservoirDataModel/RigGridBase.h index 6a3bbd550a..b36dc4c284 100644 --- a/ApplicationCode/ReservoirDataModel/RigGridBase.h +++ b/ApplicationCode/ReservoirDataModel/RigGridBase.h @@ -43,7 +43,7 @@ class RigActiveCellInfo; class RigGridBase : public cvf::StructGridInterface { public: - RigGridBase(RigMainGrid* mainGrid); + explicit RigGridBase(RigMainGrid* mainGrid); virtual ~RigGridBase(void); void setGridPointDimensions(const cvf::Vec3st& gridDimensions) { m_gridPointDimensions = gridDimensions;} @@ -125,7 +125,7 @@ class RigGridBase : public cvf::StructGridInterface class RigGridCellFaceVisibilityFilter : public cvf::CellFaceVisibilityFilter { public: - RigGridCellFaceVisibilityFilter(const RigGridBase* grid) + explicit RigGridCellFaceVisibilityFilter(const RigGridBase* grid) : m_grid(grid) { } diff --git a/ApplicationCode/ReservoirDataModel/RigGridManager.cpp b/ApplicationCode/ReservoirDataModel/RigGridManager.cpp index d02816ce5d..e52d0525e6 100644 --- a/ApplicationCode/ReservoirDataModel/RigGridManager.cpp +++ b/ApplicationCode/ReservoirDataModel/RigGridManager.cpp @@ -17,14 +17,14 @@ ///////////////////////////////////////////////////////////////////////////////// #include "RigGridManager.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" #include "RigMainGrid.h" //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RigGridManager::addCase(RigCaseData* eclipseCase) +void RigGridManager::addCase(RigEclipseCaseData* eclipseCase) { cvf::ref caseAndGrid = new CaseToGridMap(eclipseCase, eclipseCase->mainGrid()); m_caseToGrid.push_back(caseAndGrid.p()); @@ -33,7 +33,7 @@ void RigGridManager::addCase(RigCaseData* eclipseCase) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RigGridManager::removeCase(RigCaseData* eclipseCase) +void RigGridManager::removeCase(RigEclipseCaseData* eclipseCase) { for (size_t i = 0; i < m_caseToGrid.size(); i++) { @@ -121,7 +121,7 @@ bool RigGridManager::isGridDimensionsEqual(const std::vector< std::vector > //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RigGridManager::CaseToGridMap::CaseToGridMap(RigCaseData* eclipseCase, RigMainGrid* mainGrid) : +RigGridManager::CaseToGridMap::CaseToGridMap(RigEclipseCaseData* eclipseCase, RigMainGrid* mainGrid) : m_eclipseCase(eclipseCase), m_mainGrid(mainGrid) { diff --git a/ApplicationCode/ReservoirDataModel/RigGridManager.h b/ApplicationCode/ReservoirDataModel/RigGridManager.h index 7f5f2adc45..6f96b20f16 100644 --- a/ApplicationCode/ReservoirDataModel/RigGridManager.h +++ b/ApplicationCode/ReservoirDataModel/RigGridManager.h @@ -25,14 +25,14 @@ #include class RigMainGrid; -class RigCaseData; +class RigEclipseCaseData; class RigGridManager : public cvf::Object { public: - void addCase(RigCaseData* eclipseCase); + void addCase(RigEclipseCaseData* eclipseCase); - void removeCase(RigCaseData* eclipseCase); + void removeCase(RigEclipseCaseData* eclipseCase); RigMainGrid* findEqualGrid(RigMainGrid* candidateGrid); @@ -44,9 +44,9 @@ class RigGridManager : public cvf::Object class CaseToGridMap : public cvf::Object { public: - CaseToGridMap(RigCaseData* eclipseCase, RigMainGrid* mainGrid); + CaseToGridMap(RigEclipseCaseData* eclipseCase, RigMainGrid* mainGrid); - RigCaseData* m_eclipseCase; + RigEclipseCaseData* m_eclipseCase; RigMainGrid* m_mainGrid; }; diff --git a/ApplicationCode/ReservoirDataModel/RigLasFileExporter.cpp b/ApplicationCode/ReservoirDataModel/RigLasFileExporter.cpp index d304e09aa5..c93b0bc4d7 100644 --- a/ApplicationCode/ReservoirDataModel/RigLasFileExporter.cpp +++ b/ApplicationCode/ReservoirDataModel/RigLasFileExporter.cpp @@ -24,6 +24,8 @@ #include "RimWellLogCurve.h" #include "RimWellLogExtractionCurve.h" +#include "cafUtils.h" + #include "cvfAssert.h" #include "laswell.hpp" @@ -146,41 +148,34 @@ class SingleLasFileMetaData std::string generateFilename() const { - QString f; + QString fileBasenameCandidate; QString separator("-"); if (!m_wellName.isEmpty()) { - f += m_wellName; + fileBasenameCandidate += m_wellName; } if (!m_caseName.isEmpty()) { - if (!f.isEmpty()) f += separator; - f += m_caseName; + if (!fileBasenameCandidate.isEmpty()) fileBasenameCandidate += separator; + fileBasenameCandidate += m_caseName; } // Add property name if only one curve is exported if (m_logCurveData.size() == 1) { - if (!f.isEmpty()) f += separator; - f += QString::fromStdString(m_logCurveData[0].channelName()); + if (!fileBasenameCandidate.isEmpty()) fileBasenameCandidate += separator; + fileBasenameCandidate += QString::fromStdString(m_logCurveData[0].channelName()); } if (!m_date.isEmpty()) { - if (!f.isEmpty()) f += separator; - f += m_date; + if (!fileBasenameCandidate.isEmpty()) fileBasenameCandidate += separator; + fileBasenameCandidate += m_date; } - QString cleanFileName = f.trimmed(); - cleanFileName.replace(".", "_"); - cleanFileName.replace(",", "_"); - cleanFileName.replace(":", "_"); - cleanFileName.replace(";", "_"); - cleanFileName.replace(" ", "_"); - cleanFileName.replace("/", "_"); - cleanFileName.replace(QRegExp("_+"), "_"); + QString cleanFileName = caf::Utils::makeValidFileBasename( fileBasenameCandidate); cleanFileName += ".las"; @@ -209,6 +204,11 @@ class SingleLasFileMetaData { lasFile->AddLog("DEPTH", "FT", "Depth in feet", firstCurveData->measuredDepths()); } + else if ( firstCurveData->depthUnit() == RimDefines::UNIT_NONE ) + { + CVF_ASSERT(false); + lasFile->AddLog("DEPTH", "", "Depth in Connection number", firstCurveData->measuredDepths()); + } if (firstCurveData->tvDepths().size()) { @@ -231,6 +231,12 @@ class SingleLasFileMetaData { lasFile->AddLog("TVDRKB", "FT", "True vertical depth (Rotary Kelly Bushing)", tvdrkbValues); } + else if ( firstCurveData->depthUnit() == RimDefines::UNIT_NONE ) + { + CVF_ASSERT(false); + lasFile->AddLog("TVDRKB", "", "", tvdrkbValues); + } + } } @@ -249,6 +255,10 @@ class SingleLasFileMetaData { lasFile->setDepthUnit("FT"); } + else if ( firstCurveData->depthUnit() == RimDefines::UNIT_NONE ) + { + CVF_ASSERT(false); + } double absentValue = SingleLasFileMetaData::createAbsentValue(m_minimumCurveValue); lasFile->SetMissing(absentValue); @@ -287,7 +297,7 @@ class SingleLasFileMetaData QString m_date; double m_rkbDiff; - double m_exportTvdrkb; + bool m_exportTvdrkb; RimDefines::DepthUnitType m_depthUnit; std::vector m_depthValues; @@ -381,7 +391,7 @@ bool RigLasFileExporter::writeToFolder(const QString& exportFolder) QDir dir(exportFolder); QString fileName = dir.absoluteFilePath(QString::fromStdString(lasFileDescr.generateFilename())); - if (QFile::exists(fileName)) + if (caf::Utils::fileExists(fileName)) { QString txt = QString("File %1 exists.\n\nDo you want to overwrite the file?").arg(fileName); int ret = QMessageBox::question(NULL, "LAS File Export", diff --git a/ApplicationCode/ReservoirDataModel/RigLasFileExporter.h b/ApplicationCode/ReservoirDataModel/RigLasFileExporter.h index 503bd9561c..2fd2c8cda7 100644 --- a/ApplicationCode/ReservoirDataModel/RigLasFileExporter.h +++ b/ApplicationCode/ReservoirDataModel/RigLasFileExporter.h @@ -32,7 +32,7 @@ class SingleLasFileMetaData; class RigLasFileExporter { public: - RigLasFileExporter(const std::vector& curves); + explicit RigLasFileExporter(const std::vector& curves); void setResamplingInterval(double interval); diff --git a/ApplicationCode/ReservoirDataModel/RigLocalGrid.h b/ApplicationCode/ReservoirDataModel/RigLocalGrid.h index 23f36f7f37..7371afe7ee 100644 --- a/ApplicationCode/ReservoirDataModel/RigLocalGrid.h +++ b/ApplicationCode/ReservoirDataModel/RigLocalGrid.h @@ -22,7 +22,7 @@ class RigLocalGrid : public RigGridBase { public: - RigLocalGrid(RigMainGrid* mainGrid); + explicit RigLocalGrid(RigMainGrid* mainGrid); virtual ~RigLocalGrid(); RigGridBase * parentGrid() const { return m_parentGrid; } diff --git a/ApplicationCode/ReservoirDataModel/RigMainGrid.cpp b/ApplicationCode/ReservoirDataModel/RigMainGrid.cpp index 3bc6632a2b..6c1a1b1d0a 100644 --- a/ApplicationCode/ReservoirDataModel/RigMainGrid.cpp +++ b/ApplicationCode/ReservoirDataModel/RigMainGrid.cpp @@ -20,12 +20,14 @@ #include "RigMainGrid.h" -#include "cvfAssert.h" +#include "RiaLogging.h" #include "RimDefines.h" #include "RigFault.h" -#include "cvfBoundingBoxTree.h" #include "RigActiveCellInfo.h" +#include "cvfBoundingBoxTree.h" +#include "cvfAssert.h" + RigMainGrid::RigMainGrid(void) : RigGridBase(this) @@ -215,12 +217,32 @@ void RigMainGrid::setFaults(const cvf::Collection& faults) } } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RigMainGrid::hasFaultWithName(const QString& name) const +{ + for (auto fault : m_faults) + { + if (fault->name() == name) + { + return true; + } + } + return false; +} //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void RigMainGrid::calculateFaults(const RigActiveCellInfo* activeCellInfo) { + if (hasFaultWithName(RimDefines::undefinedGridFaultName()) + && hasFaultWithName(RimDefines::undefinedGridFaultWithInactiveName())) + { + //RiaLogging::debug(QString("Calculate faults already run for grid.")); + return; + } m_faultsPrCellAcc = new RigFaultsPrCellAccumulator(m_cells.size()); // Spread fault idx'es on the cells from the faults diff --git a/ApplicationCode/ReservoirDataModel/RigMainGrid.h b/ApplicationCode/ReservoirDataModel/RigMainGrid.h index 470454a58a..3259a8c67e 100644 --- a/ApplicationCode/ReservoirDataModel/RigMainGrid.h +++ b/ApplicationCode/ReservoirDataModel/RigMainGrid.h @@ -81,6 +81,7 @@ class RigMainGrid : public RigGridBase void initAllSubGridsParentGridPointer(); void initAllSubCellsMainGridCellIndex(); void buildCellSearchTree(); + bool hasFaultWithName(const QString& name) const; private: std::vector m_nodes; ///< Global vertex table diff --git a/ApplicationCode/ReservoirDataModel/RigNNCData.cpp b/ApplicationCode/ReservoirDataModel/RigNNCData.cpp index b383cbb665..72a4f023a4 100644 --- a/ApplicationCode/ReservoirDataModel/RigNNCData.cpp +++ b/ApplicationCode/ReservoirDataModel/RigNNCData.cpp @@ -45,11 +45,12 @@ void RigNNCData::processConnections(const RigMainGrid& mainGrid) // Try to find the shared face - char hasNeighbourInAnyDirection = 0; bool isPossibleNeighborInDirection[6]= {true, true, true, true, true, true}; if (c1.hostGrid() == c2.hostGrid()) { + char hasNeighbourInAnyDirection = 0; + size_t i1, j1, k1; c1.hostGrid()->ijkFromCellIndex(c1.gridLocalCellIndex(), &i1, &j1, &k1); size_t i2, j2, k2; diff --git a/ApplicationCode/ReservoirDataModel/RigReservoirBuilderMock.cpp b/ApplicationCode/ReservoirDataModel/RigReservoirBuilderMock.cpp index c18c58da66..e928da4c44 100644 --- a/ApplicationCode/ReservoirDataModel/RigReservoirBuilderMock.cpp +++ b/ApplicationCode/ReservoirDataModel/RigReservoirBuilderMock.cpp @@ -19,9 +19,12 @@ ///////////////////////////////////////////////////////////////////////////////// #include "RigReservoirBuilderMock.h" -#include "RigCaseData.h" -#include "RigActiveCellInfo.h" +#include "RigActiveCellInfo.h" +#include "RigEclipseCaseData.h" +#include "RigCell.h" +#include "RigMainGrid.h" +#include "RigSingleWellResultsData.h" /* rand example: guess the number */ #include @@ -165,7 +168,7 @@ void RigReservoirBuilderMock::appendCells(size_t nodeStartIndex, size_t cellCoun //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RigReservoirBuilderMock::populateReservoir(RigCaseData* eclipseCase) +void RigReservoirBuilderMock::populateReservoir(RigEclipseCaseData* eclipseCase) { std::vector& mainGridNodes = eclipseCase->mainGrid()->nodes(); appendNodes(m_minWorldCoordinate, m_maxWorldCoordinate, cellDimension(), mainGridNodes); @@ -290,7 +293,7 @@ void RigReservoirBuilderMock::setWorldCoordinates(cvf::Vec3d minWorldCoordinate, //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RigReservoirBuilderMock::inputProperty(RigCaseData* eclipseCase, const QString& propertyName, std::vector* values) +bool RigReservoirBuilderMock::inputProperty(RigEclipseCaseData* eclipseCase, const QString& propertyName, std::vector* values) { size_t k; @@ -311,7 +314,7 @@ bool RigReservoirBuilderMock::inputProperty(RigCaseData* eclipseCase, const QStr //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RigReservoirBuilderMock::staticResult(RigCaseData* eclipseCase, const QString& result, std::vector* values) +bool RigReservoirBuilderMock::staticResult(RigEclipseCaseData* eclipseCase, const QString& result, std::vector* values) { values->resize(eclipseCase->mainGrid()->globalCellArray().size()); @@ -327,7 +330,7 @@ bool RigReservoirBuilderMock::staticResult(RigCaseData* eclipseCase, const QStri //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RigReservoirBuilderMock::dynamicResult(RigCaseData* eclipseCase, const QString& result, size_t stepIndex, std::vector* values) +bool RigReservoirBuilderMock::dynamicResult(RigEclipseCaseData* eclipseCase, const QString& result, size_t stepIndex, std::vector* values) { int resultIndex = 1; @@ -362,7 +365,7 @@ bool RigReservoirBuilderMock::dynamicResult(RigCaseData* eclipseCase, const QStr //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RigReservoirBuilderMock::addWellData(RigCaseData* eclipseCase, RigGridBase* grid) +void RigReservoirBuilderMock::addWellData(RigEclipseCaseData* eclipseCase, RigGridBase* grid) { CVF_ASSERT(eclipseCase); CVF_ASSERT(grid); @@ -434,15 +437,14 @@ void RigReservoirBuilderMock::addWellData(RigCaseData* eclipseCase, RigGridBase* RigWellResultPoint deadEndData1 = data; deadEndData1.m_gridCellIndex = data.m_gridCellIndex + 2; - deadEndData.m_isOpen = false; + deadEndData1.m_isOpen = false; wellSegment.m_branchResultPoints.push_back(deadEndData); - wellSegment.m_branchResultPoints.push_back(deadEndData1); + wellSegment.m_branchResultPoints.push_back(deadEndData1); - deadEndData.m_isOpen = true; - wellSegment.m_branchResultPoints.push_back(deadEndData); + wellSegment.m_branchResultPoints.push_back(deadEndData); - data.m_isOpen = true; + data.m_isOpen = true; wellSegment.m_branchResultPoints.push_back(data); } } @@ -478,7 +480,7 @@ void RigReservoirBuilderMock::addWellData(RigCaseData* eclipseCase, RigGridBase* //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RigReservoirBuilderMock::addFaults(RigCaseData* eclipseCase) +void RigReservoirBuilderMock::addFaults(RigEclipseCaseData* eclipseCase) { if (!eclipseCase) return; diff --git a/ApplicationCode/ReservoirDataModel/RigReservoirBuilderMock.h b/ApplicationCode/ReservoirDataModel/RigReservoirBuilderMock.h index 3e5f5cc713..682c548210 100644 --- a/ApplicationCode/ReservoirDataModel/RigReservoirBuilderMock.h +++ b/ApplicationCode/ReservoirDataModel/RigReservoirBuilderMock.h @@ -24,8 +24,14 @@ #include "cvfObject.h" #include "cvfArray.h" #include "cvfVector3.h" -#include "RigCell.h" -#include "RigCaseData.h" + +class RigEclipseCaseData; +class RigMainGrid; +class RigConnection; +class RigGridBase; +class RigCell; + +class QString; class LocalGridRefinement { @@ -58,17 +64,17 @@ class RigReservoirBuilderMock void addLocalGridRefinement(const cvf::Vec3st& minCellPosition, const cvf::Vec3st& maxCellPosition, const cvf::Vec3st& singleCellRefinementFactors); - void populateReservoir(RigCaseData* eclipseCase); + void populateReservoir(RigEclipseCaseData* eclipseCase); - bool inputProperty(RigCaseData* eclipseCase, const QString& propertyName, std::vector* values ); - bool staticResult(RigCaseData* eclipseCase, const QString& result, std::vector* values ); - bool dynamicResult(RigCaseData* eclipseCase, const QString& result, size_t stepIndex, std::vector* values ); + bool inputProperty(RigEclipseCaseData* eclipseCase, const QString& propertyName, std::vector* values ); + bool staticResult(RigEclipseCaseData* eclipseCase, const QString& result, std::vector* values ); + bool dynamicResult(RigEclipseCaseData* eclipseCase, const QString& result, size_t stepIndex, std::vector* values ); private: - void addFaults(RigCaseData* eclipseCase); + void addFaults(RigEclipseCaseData* eclipseCase); static void addNnc(RigMainGrid* grid, size_t i1, size_t j1, size_t k1, size_t i2, size_t j2, size_t k2, std::vector &nncConnections); - void addWellData(RigCaseData* eclipseCase, RigGridBase* grid); + void addWellData(RigEclipseCaseData* eclipseCase, RigGridBase* grid); static void appendCells(size_t nodeStartIndex, size_t cellCount, RigGridBase* hostGrid, std::vector& cells); static void appendNodes(const cvf::Vec3d& min, const cvf::Vec3d& max, const cvf::Vec3st& cubeDimension, std::vector& nodes); diff --git a/ApplicationCode/ReservoirDataModel/RigResultAccessorFactory.cpp b/ApplicationCode/ReservoirDataModel/RigResultAccessorFactory.cpp index c9d3514bad..5b1411e14e 100644 --- a/ApplicationCode/ReservoirDataModel/RigResultAccessorFactory.cpp +++ b/ApplicationCode/ReservoirDataModel/RigResultAccessorFactory.cpp @@ -23,7 +23,7 @@ #include "RigActiveCellsResultAccessor.h" #include "RigAllGridCellsResultAccessor.h" #include "RigCaseCellResultsData.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" #include "RigCombMultResultAccessor.h" #include "RigCombTransResultAccessor.h" #include "RigGridBase.h" @@ -32,21 +32,18 @@ #include "RimEclipseResultDefinition.h" -#include "cvfAssert.h" -#include "cvfBase.h" -#include "cvfLibCore.h" -#include "cvfObject.h" - #include +#include "RimFlowDiagSolution.h" +#include "RigFlowDiagResults.h" //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -cvf::ref RigResultAccessorFactory::createResultAccessor(RigCaseData* eclipseCase, - size_t gridIndex, - RifReaderInterface::PorosityModelResultType porosityModel, - size_t timeStepIndex, - const QString& uiResultName) +cvf::ref RigResultAccessorFactory::createFromUiResultName(RigEclipseCaseData* eclipseCase, + size_t gridIndex, + RifReaderInterface::PorosityModelResultType porosityModel, + size_t timeStepIndex, + const QString& uiResultName) { CVF_ASSERT(gridIndex < eclipseCase->gridCount()); CVF_ASSERT(eclipseCase); @@ -61,9 +58,9 @@ cvf::ref RigResultAccessorFactory::createResultAccessor(RigCa cvf::ref cellFaceAccessObject = new RigCombTransResultAccessor(grid); - cvf::ref xTransAccessor = RigResultAccessorFactory::createNativeResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, "TRANX"); - cvf::ref yTransAccessor = RigResultAccessorFactory::createNativeResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, "TRANY"); - cvf::ref zTransAccessor = RigResultAccessorFactory::createNativeResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, "TRANZ"); + cvf::ref xTransAccessor = RigResultAccessorFactory::createNativeFromUiResultName(eclipseCase, gridIndex, porosityModel, timeStepIndex, "TRANX"); + cvf::ref yTransAccessor = RigResultAccessorFactory::createNativeFromUiResultName(eclipseCase, gridIndex, porosityModel, timeStepIndex, "TRANY"); + cvf::ref zTransAccessor = RigResultAccessorFactory::createNativeFromUiResultName(eclipseCase, gridIndex, porosityModel, timeStepIndex, "TRANZ"); cellFaceAccessObject->setTransResultAccessors(xTransAccessor.p(), yTransAccessor.p(), zTransAccessor.p()); @@ -75,12 +72,12 @@ cvf::ref RigResultAccessorFactory::createResultAccessor(RigCa cvf::ref cellFaceAccessObject = new RigCombMultResultAccessor(grid); - cvf::ref multXPos = RigResultAccessorFactory::createNativeResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, "MULTX"); - cvf::ref multXNeg = RigResultAccessorFactory::createNativeResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, "MULTX-"); - cvf::ref multYPos = RigResultAccessorFactory::createNativeResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, "MULTY"); - cvf::ref multYNeg = RigResultAccessorFactory::createNativeResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, "MULTY-"); - cvf::ref multZPos = RigResultAccessorFactory::createNativeResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, "MULTZ"); - cvf::ref multZNeg = RigResultAccessorFactory::createNativeResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, "MULTZ-"); + cvf::ref multXPos = RigResultAccessorFactory::createNativeFromUiResultName(eclipseCase, gridIndex, porosityModel, timeStepIndex, "MULTX"); + cvf::ref multXNeg = RigResultAccessorFactory::createNativeFromUiResultName(eclipseCase, gridIndex, porosityModel, timeStepIndex, "MULTX-"); + cvf::ref multYPos = RigResultAccessorFactory::createNativeFromUiResultName(eclipseCase, gridIndex, porosityModel, timeStepIndex, "MULTY"); + cvf::ref multYNeg = RigResultAccessorFactory::createNativeFromUiResultName(eclipseCase, gridIndex, porosityModel, timeStepIndex, "MULTY-"); + cvf::ref multZPos = RigResultAccessorFactory::createNativeFromUiResultName(eclipseCase, gridIndex, porosityModel, timeStepIndex, "MULTZ"); + cvf::ref multZNeg = RigResultAccessorFactory::createNativeFromUiResultName(eclipseCase, gridIndex, porosityModel, timeStepIndex, "MULTZ-"); cellFaceAccessObject->setMultResultAccessors(multXPos.p(), multXNeg.p(), multYPos.p(), multYNeg.p(), multZPos.p(), multZNeg.p()); @@ -92,9 +89,9 @@ cvf::ref RigResultAccessorFactory::createResultAccessor(RigCa cvf::ref cellFaceAccessObject = new RigCombTransResultAccessor(grid); - cvf::ref xTransAccessor = RigResultAccessorFactory::createNativeResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, RimDefines::riTranXResultName()); - cvf::ref yTransAccessor = RigResultAccessorFactory::createNativeResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, RimDefines::riTranYResultName()); - cvf::ref zTransAccessor = RigResultAccessorFactory::createNativeResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, RimDefines::riTranZResultName()); + cvf::ref xTransAccessor = RigResultAccessorFactory::createNativeFromUiResultName(eclipseCase, gridIndex, porosityModel, timeStepIndex, RimDefines::riTranXResultName()); + cvf::ref yTransAccessor = RigResultAccessorFactory::createNativeFromUiResultName(eclipseCase, gridIndex, porosityModel, timeStepIndex, RimDefines::riTranYResultName()); + cvf::ref zTransAccessor = RigResultAccessorFactory::createNativeFromUiResultName(eclipseCase, gridIndex, porosityModel, timeStepIndex, RimDefines::riTranZResultName()); cellFaceAccessObject->setTransResultAccessors(xTransAccessor.p(), yTransAccessor.p(), zTransAccessor.p()); @@ -106,9 +103,9 @@ cvf::ref RigResultAccessorFactory::createResultAccessor(RigCa cvf::ref cellFaceAccessObject = new RigCombTransResultAccessor(grid); - cvf::ref xRiMultAccessor = RigResultAccessorFactory::createNativeResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, RimDefines::riMultXResultName()); - cvf::ref yRiMultAccessor = RigResultAccessorFactory::createNativeResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, RimDefines::riMultYResultName()); - cvf::ref zRiMultAccessor = RigResultAccessorFactory::createNativeResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, RimDefines::riMultZResultName()); + cvf::ref xRiMultAccessor = RigResultAccessorFactory::createNativeFromUiResultName(eclipseCase, gridIndex, porosityModel, timeStepIndex, RimDefines::riMultXResultName()); + cvf::ref yRiMultAccessor = RigResultAccessorFactory::createNativeFromUiResultName(eclipseCase, gridIndex, porosityModel, timeStepIndex, RimDefines::riMultYResultName()); + cvf::ref zRiMultAccessor = RigResultAccessorFactory::createNativeFromUiResultName(eclipseCase, gridIndex, porosityModel, timeStepIndex, RimDefines::riMultZResultName()); cellFaceAccessObject->setTransResultAccessors(xRiMultAccessor.p(), yRiMultAccessor.p(), zRiMultAccessor.p()); @@ -120,27 +117,27 @@ cvf::ref RigResultAccessorFactory::createResultAccessor(RigCa cvf::ref cellFaceAccessObject = new RigCombTransResultAccessor(grid); - cvf::ref xRiAreaNormTransAccessor = RigResultAccessorFactory::createNativeResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, RimDefines::riAreaNormTranXResultName()); - cvf::ref yRiAreaNormTransAccessor = RigResultAccessorFactory::createNativeResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, RimDefines::riAreaNormTranYResultName()); - cvf::ref zRiAreaNormTransAccessor = RigResultAccessorFactory::createNativeResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, RimDefines::riAreaNormTranZResultName()); + cvf::ref xRiAreaNormTransAccessor = RigResultAccessorFactory::createNativeFromUiResultName(eclipseCase, gridIndex, porosityModel, timeStepIndex, RimDefines::riAreaNormTranXResultName()); + cvf::ref yRiAreaNormTransAccessor = RigResultAccessorFactory::createNativeFromUiResultName(eclipseCase, gridIndex, porosityModel, timeStepIndex, RimDefines::riAreaNormTranYResultName()); + cvf::ref zRiAreaNormTransAccessor = RigResultAccessorFactory::createNativeFromUiResultName(eclipseCase, gridIndex, porosityModel, timeStepIndex, RimDefines::riAreaNormTranZResultName()); cellFaceAccessObject->setTransResultAccessors(xRiAreaNormTransAccessor.p(), yRiAreaNormTransAccessor.p(), zRiAreaNormTransAccessor.p()); return cellFaceAccessObject; } - return RigResultAccessorFactory::createNativeResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, uiResultName); + return RigResultAccessorFactory::createNativeFromUiResultName(eclipseCase, gridIndex, porosityModel, timeStepIndex, uiResultName); } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -cvf::ref RigResultAccessorFactory::createResultAccessor(RigCaseData* eclipseCase, - size_t gridIndex, - RifReaderInterface::PorosityModelResultType porosityModel, - size_t timeStepIndex, - const QString& uiResultName, - RimDefines::ResultCatType resultType) +cvf::ref RigResultAccessorFactory::createFromNameAndType(RigEclipseCaseData* eclipseCase, + size_t gridIndex, + RifReaderInterface::PorosityModelResultType porosityModel, + size_t timeStepIndex, + const QString& uiResultName, + RimDefines::ResultCatType resultType) { CVF_ASSERT(gridIndex < eclipseCase->gridCount()); CVF_ASSERT(eclipseCase); @@ -164,38 +161,59 @@ cvf::ref RigResultAccessorFactory::createResultAccessor(RigCa adjustedTimeStepIndex = 0; } - return createResultAccessor(eclipseCase, gridIndex, porosityModel, adjustedTimeStepIndex, scalarSetIndex); + return createFromResultIdx(eclipseCase, gridIndex, porosityModel, adjustedTimeStepIndex, scalarSetIndex); } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -cvf::ref RigResultAccessorFactory::createResultAccessor(RigCaseData* eclipseCase, size_t gridIndex, size_t timeStepIndex, RimEclipseResultDefinition* resultDefinition) +cvf::ref RigResultAccessorFactory::createFromResultDefinition(RigEclipseCaseData* eclipseCase, + size_t gridIndex, + size_t timeStepIndex, + RimEclipseResultDefinition* resultDefinition) { RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(resultDefinition->porosityModel()); - size_t adjustedTimeStepIndex = timeStepIndex; - if (resultDefinition->hasStaticResult()) + if (resultDefinition->resultType() != RimDefines::FLOW_DIAGNOSTICS) { - adjustedTimeStepIndex = 0; + + size_t adjustedTimeStepIndex = timeStepIndex; + if ( resultDefinition->hasStaticResult() ) + { + adjustedTimeStepIndex = 0; + } + + return RigResultAccessorFactory::createFromUiResultName(eclipseCase, + gridIndex, + porosityModel, + adjustedTimeStepIndex, + resultDefinition->resultVariable()); } + else + { + RimFlowDiagSolution* flowSol = resultDefinition->flowDiagSolution(); + if (!flowSol) return new RigHugeValResultAccessor;; - return RigResultAccessorFactory::createResultAccessor( - eclipseCase, - gridIndex, - porosityModel, - adjustedTimeStepIndex, - resultDefinition->resultVariable()); + const std::vector* resultValues = flowSol->flowDiagResults()->resultValues( resultDefinition->flowDiagResAddress(), timeStepIndex); + if (!resultValues) return new RigHugeValResultAccessor; + + RigGridBase* grid = eclipseCase->grid(gridIndex); + if ( !grid ) return new RigHugeValResultAccessor; + + cvf::ref object = new RigActiveCellsResultAccessor(grid, resultValues, eclipseCase->activeCellInfo(porosityModel)); + + return object; + } } //-------------------------------------------------------------------------------------------------- /// This function must be harmonized with RigResultModifierFactory::createResultModifier() //-------------------------------------------------------------------------------------------------- -cvf::ref RigResultAccessorFactory::createNativeResultAccessor(RigCaseData* eclipseCase, - size_t gridIndex, - RifReaderInterface::PorosityModelResultType porosityModel, - size_t timeStepIndex, - const QString& uiResultName) +cvf::ref RigResultAccessorFactory::createNativeFromUiResultName(RigEclipseCaseData* eclipseCase, + size_t gridIndex, + RifReaderInterface::PorosityModelResultType porosityModel, + size_t timeStepIndex, + const QString& uiResultName) { CVF_ASSERT(gridIndex < eclipseCase->gridCount()); CVF_ASSERT(eclipseCase); @@ -213,19 +231,19 @@ cvf::ref RigResultAccessorFactory::createNativeResultAccessor return NULL; } - return createResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, scalarSetIndex); + return createFromResultIdx(eclipseCase, gridIndex, porosityModel, timeStepIndex, scalarSetIndex); } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -cvf::ref RigResultAccessorFactory::createResultAccessor(RigCaseData* eclipseCase, - size_t gridIndex, - RifReaderInterface::PorosityModelResultType porosityModel, - size_t timeStepIndex, - size_t resultIndex) +cvf::ref RigResultAccessorFactory::createFromResultIdx(RigEclipseCaseData* eclipseCase, + size_t gridIndex, + RifReaderInterface::PorosityModelResultType porosityModel, + size_t timeStepIndex, + size_t resultIndex) { - if (resultIndex == cvf::UNDEFINED_SIZE_T) + if ( resultIndex == cvf::UNDEFINED_SIZE_T ) { return new RigHugeValResultAccessor; } diff --git a/ApplicationCode/ReservoirDataModel/RigResultAccessorFactory.h b/ApplicationCode/ReservoirDataModel/RigResultAccessorFactory.h index b85440b573..5cb2e83b13 100644 --- a/ApplicationCode/ReservoirDataModel/RigResultAccessorFactory.h +++ b/ApplicationCode/ReservoirDataModel/RigResultAccessorFactory.h @@ -33,40 +33,40 @@ class RigResultAccessorFactory { public: static cvf::ref - createResultAccessor(RigCaseData* eclipseCase, - size_t gridIndex, - size_t timeStepIndex, - RimEclipseResultDefinition* resultDefinition); + createFromResultDefinition(RigEclipseCaseData* eclipseCase, + size_t gridIndex, + size_t timeStepIndex, + RimEclipseResultDefinition* resultDefinition); - static cvf::ref - createResultAccessor(RigCaseData* eclipseCase, - size_t gridIndex, - RifReaderInterface::PorosityModelResultType porosityModel, - size_t timeStepIndex, - const QString& uiResultName); + static cvf::ref + createFromUiResultName(RigEclipseCaseData* eclipseCase, + size_t gridIndex, + RifReaderInterface::PorosityModelResultType porosityModel, + size_t timeStepIndex, + const QString& uiResultName); static cvf::ref - createResultAccessor(RigCaseData* eclipseCase, - size_t gridIndex, - RifReaderInterface::PorosityModelResultType porosityModel, - size_t timeStepIndex, - const QString& uiResultName, - RimDefines::ResultCatType resultType); + createFromNameAndType(RigEclipseCaseData* eclipseCase, + size_t gridIndex, + RifReaderInterface::PorosityModelResultType porosityModel, + size_t timeStepIndex, + const QString& uiResultName, + RimDefines::ResultCatType resultType); static cvf::ref - createResultAccessor(RigCaseData* eclipseCase, - size_t gridIndex, - RifReaderInterface::PorosityModelResultType porosityModel, - size_t timeStepIndex, - size_t resultIndex); + createFromResultIdx(RigEclipseCaseData* eclipseCase, + size_t gridIndex, + RifReaderInterface::PorosityModelResultType porosityModel, + size_t timeStepIndex, + size_t resultIndex); private: - static cvf::ref - createNativeResultAccessor(RigCaseData* eclipseCase, - size_t gridIndex, - RifReaderInterface::PorosityModelResultType porosityModel, - size_t timeStepIndex, - const QString& resultName); + static cvf::ref + createNativeFromUiResultName(RigEclipseCaseData* eclipseCase, + size_t gridIndex, + RifReaderInterface::PorosityModelResultType porosityModel, + size_t timeStepIndex, + const QString& resultName); }; diff --git a/ApplicationCode/ReservoirDataModel/RigResultModifierFactory.cpp b/ApplicationCode/ReservoirDataModel/RigResultModifierFactory.cpp index bb7746d9d2..0515009f7f 100644 --- a/ApplicationCode/ReservoirDataModel/RigResultModifierFactory.cpp +++ b/ApplicationCode/ReservoirDataModel/RigResultModifierFactory.cpp @@ -20,7 +20,7 @@ #include "RigResultModifierFactory.h" #include "RigCaseCellResultsData.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" #include "RigResultModifier.h" #include @@ -29,11 +29,11 @@ //-------------------------------------------------------------------------------------------------- /// This function must be harmonized with RigResultAccessorFactory::createNativeResultAccessor() //-------------------------------------------------------------------------------------------------- -cvf::ref RigResultModifierFactory::createResultModifier(RigCaseData* eclipseCase, - size_t gridIndex, - RifReaderInterface::PorosityModelResultType porosityModel, - size_t timeStepIndex, - QString& uiResultName) +cvf::ref RigResultModifierFactory::createResultModifier(RigEclipseCaseData* eclipseCase, + size_t gridIndex, + RifReaderInterface::PorosityModelResultType porosityModel, + size_t timeStepIndex, + QString& uiResultName) { if (!eclipseCase) return NULL; @@ -51,12 +51,12 @@ cvf::ref RigResultModifierFactory::createResultModifier(RigCa //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -cvf::ref RigResultModifierFactory::createResultModifier(RigCaseData* eclipseCase, - size_t gridIndex, - RifReaderInterface::PorosityModelResultType porosityModel, - size_t timeStepIndex, size_t scalarResultIndex) +cvf::ref RigResultModifierFactory::createResultModifier(RigEclipseCaseData* eclipseCase, + size_t gridIndex, + RifReaderInterface::PorosityModelResultType porosityModel, + size_t timeStepIndex, size_t scalarResultIndex) { - if (!eclipseCase) return NULL; + if ( !eclipseCase ) return NULL; if (!eclipseCase->results(porosityModel) || !eclipseCase->activeCellInfo(porosityModel)) { diff --git a/ApplicationCode/ReservoirDataModel/RigResultModifierFactory.h b/ApplicationCode/ReservoirDataModel/RigResultModifierFactory.h index 7c320fa4ad..61b36d3425 100644 --- a/ApplicationCode/ReservoirDataModel/RigResultModifierFactory.h +++ b/ApplicationCode/ReservoirDataModel/RigResultModifierFactory.h @@ -21,25 +21,25 @@ #include "RifReaderInterface.h" -class RigCaseData; +class RigEclipseCaseData; class RigResultModifier; class RigResultModifierFactory { public: - static cvf::ref - createResultModifier(RigCaseData* eclipseCase, - size_t gridIndex, - RifReaderInterface::PorosityModelResultType porosityModel, - size_t timeStepIndex, - QString& uiResultName); + static cvf::ref + createResultModifier(RigEclipseCaseData* eclipseCase, + size_t gridIndex, + RifReaderInterface::PorosityModelResultType porosityModel, + size_t timeStepIndex, + QString& uiResultName); - static cvf::ref - createResultModifier(RigCaseData* eclipseCase, - size_t gridIndex, - RifReaderInterface::PorosityModelResultType porosityModel, - size_t timeStepIndex, - size_t scalarResultIndex); + static cvf::ref + createResultModifier(RigEclipseCaseData* eclipseCase, + size_t gridIndex, + RifReaderInterface::PorosityModelResultType porosityModel, + size_t timeStepIndex, + size_t scalarResultIndex); }; diff --git a/ApplicationCode/ReservoirDataModel/RigSimulationWellCenterLineCalculator.cpp b/ApplicationCode/ReservoirDataModel/RigSimulationWellCenterLineCalculator.cpp index ae03466d2c..7ca0b0b0e4 100644 --- a/ApplicationCode/ReservoirDataModel/RigSimulationWellCenterLineCalculator.cpp +++ b/ApplicationCode/ReservoirDataModel/RigSimulationWellCenterLineCalculator.cpp @@ -18,11 +18,15 @@ ///////////////////////////////////////////////////////////////////////////////// #include "RigSimulationWellCenterLineCalculator.h" + +#include "RigEclipseCaseData.h" +#include "RigCell.h" + +#include "RimEclipseCase.h" #include "RimEclipseView.h" #include "RimEclipseWell.h" #include "RimEclipseWellCollection.h" -#include "RimEclipseCase.h" -#include "RigCaseData.h" + #include "cvfRay.h" //-------------------------------------------------------------------------------------------------- @@ -30,337 +34,436 @@ /// The returned CellIds is one less than the number of centerline points, /// and are describing the lines between the points, starting with the first line //-------------------------------------------------------------------------------------------------- -void RigSimulationWellCenterLineCalculator::calculateWellPipeCenterline(RimEclipseWell* rimWell, +void RigSimulationWellCenterLineCalculator::calculateWellPipeStaticCenterline(RimEclipseWell* rimWell, std::vector< std::vector >& pipeBranchesCLCoords, std::vector< std::vector >& pipeBranchesCellIds) { - bool isAutoDetectBranches = false; - RigCaseData* eclipseCaseData = NULL; - RigSingleWellResultsData* wellResults = NULL; + calculateWellPipeDynamicCenterline(rimWell, -1, pipeBranchesCLCoords, pipeBranchesCellIds); +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigSimulationWellCenterLineCalculator::calculateWellPipeDynamicCenterline(RimEclipseWell* rimWell, + size_t timeStepIndex, + std::vector< std::vector >& pipeBranchesCLCoords, + std::vector< std::vector >& pipeBranchesCellIds) +{ + CVF_ASSERT(rimWell); + + RigSingleWellResultsData* wellResults = rimWell->wellResults(); + + RimEclipseView* eclipseView; + rimWell->firstAncestorOrThisOfType(eclipseView); + + CVF_ASSERT(eclipseView); + + RigEclipseCaseData* eclipseCaseData = eclipseView->eclipseCase()->eclipseCaseData(); + bool isAutoDetectBranches = eclipseView->wellCollection()->isAutoDetectingBranches(); + + bool useAllCellCenters = rimWell->isUsingCellCenterForPipe(); + + calculateWellPipeCenterlineFromWellFrame(eclipseCaseData, + wellResults, + static_cast(timeStepIndex), + isAutoDetectBranches, + useAllCellCenters, + pipeBranchesCLCoords, + pipeBranchesCellIds); +} + +//-------------------------------------------------------------------------------------------------- +/// Based on the points and cells, calculate a pipe centerline +/// The returned CellIds is one less than the number of centerline points, +/// and are describing the lines between the points, starting with the first line +//-------------------------------------------------------------------------------------------------- +void RigSimulationWellCenterLineCalculator::calculateWellPipeCenterlineFromWellFrame(const RigEclipseCaseData* eclipseCaseData, + const RigSingleWellResultsData* wellResults, + int timeStepIndex, + bool isAutoDetectBranches, + bool useAllCellCenters, + std::vector> &pipeBranchesCLCoords, + std::vector> &pipeBranchesCellIds) +{ + if ( !wellResults) return; + if ( timeStepIndex >= 0 && !wellResults->hasWellResult(timeStepIndex) ) return; + const RigWellResultFrame* wellFramePtr = nullptr; + + if (timeStepIndex < 0) { - CVF_ASSERT(rimWell); - RimEclipseView* eclipseView; - rimWell->firstAncestorOrThisOfType(eclipseView); - CVF_ASSERT(eclipseView); - - isAutoDetectBranches = eclipseView->wellCollection()->isAutoDetectingBranches(); - eclipseCaseData = eclipseView->eclipseCase()->reservoirData(); - wellResults = rimWell->wellResults(); + wellFramePtr = &wellResults->staticWellCells(); } - - // Make sure we have computed the static representation of the well - if (wellResults->m_staticWellCells.m_wellResultBranches.size() == 0) + else { - wellResults->computeStaticWellCellPath(); + wellFramePtr = &(wellResults->wellResultFrame(timeStepIndex)); } - const RigWellResultFrame& staticWellFrame = wellResults->m_staticWellCells; - if (staticWellFrame.m_wellResultBranches.size() == 0) return; - + const RigWellResultFrame& wellFrame = *wellFramePtr; + bool isMultiSegmentWell = wellResults->isMultiSegmentWell(); + // Initialize the return arrays pipeBranchesCLCoords.clear(); pipeBranchesCellIds.clear(); + if ( wellFrame.m_wellResultBranches.size() == 0 ) return; + // Well head // Match this position with well head position in RivWellHeadPartMgr::buildWellHeadParts() - const RigCell& whCell = eclipseCaseData->cellFromWellResultCell(staticWellFrame.m_wellHead); + + const RigCell& whCell = eclipseCaseData->cellFromWellResultCell(wellFrame.m_wellHead); cvf::Vec3d whStartPos = whCell.faceCenter(cvf::StructGridInterface::NEG_K); - const RigWellResultPoint* whResCell = &(staticWellFrame.m_wellHead); + const RigWellResultPoint* whResCell = &(wellFrame.m_wellHead); - // Loop over all the well branches - const std::vector& resBranches = staticWellFrame.m_wellResultBranches; - bool hasResultCells = false; - if (resBranches.size()) - { - for (size_t i = 0 ; i < resBranches.size(); ++i) - { - if (resBranches[i].m_branchResultPoints.size() != 0) - { - hasResultCells = true; - break; - } - } - } - if (hasResultCells) - { + const std::vector& resBranches = wellFrame.m_wellResultBranches; - // Add extra coordinate between cell face and cell center - // to make sure the well pipe terminated in a segment parallel to z-axis - cvf::Vec3d whIntermediate = whStartPos; - whIntermediate.z() = (whStartPos.z() + whCell.center().z()) / 2.0; + if ( ! hasAnyResultCells(resBranches) ) return; + + // Add extra coordinate between cell face and cell center + // to make sure the well pipe terminated in a segment parallel to z-axis - const RigWellResultPoint* prevWellResPoint = NULL; + cvf::Vec3d whIntermediate = whStartPos; + whIntermediate.z() = (whStartPos.z() + whCell.center().z()) / 2.0; - CVF_ASSERT(wellResults->isMultiSegmentWell() || resBranches.size() <= 1); + const RigWellResultPoint* prevWellResPoint = NULL; - // The centerline is calculated by adding a point when the pipe enters a cell, - // and one when the line leaves the cell. - // For the sake of the loop: - // The currentResultPoint (Cell) and the one we index by the loop variable is the one we calculate the entry point to. - // The previous cell is the one we leave, and calculate the "out-point" from + CVF_ASSERT(isMultiSegmentWell || resBranches.size() <= 1); + // The centerline is calculated by adding a point when the pipe enters a cell, + // and one when the line leaves the cell. + // For the sake of the loop: + // The currentResultPoint (Cell) and the one we index by the loop variable is the one we calculate the entry point to. + // The previous cell is the one we leave, and calculate the "out-point" from - for (size_t brIdx = 0; brIdx < resBranches.size(); brIdx++) - { - // Skip empty branches. Do not know why they exist, but they make problems. + for (size_t brIdx = 0; brIdx < resBranches.size(); brIdx++) + { - bool hasValidData = false; - for (size_t cIdx = 0; cIdx < resBranches[brIdx].m_branchResultPoints.size(); ++cIdx) - { - if (resBranches[brIdx].m_branchResultPoints[cIdx].isValid()) - { - hasValidData = true; - break; - } - } - if (!hasValidData) continue; + // Skip empty branches. Do not know why they exist, but they make problems. + const RigWellResultBranch& branch = resBranches[brIdx]; + if ( !hasAnyValidDataCells(branch) ) continue; - prevWellResPoint = NULL; + prevWellResPoint = NULL; - // Find the start the MSW well-branch centerline. Normal wells are started "once" at wellhead in the code above + // Find the start the MSW well-branch centerline. Normal wells are started "once" at wellhead in the code above - pipeBranchesCLCoords.push_back(std::vector()); - pipeBranchesCellIds.push_back(std::vector ()); + pipeBranchesCLCoords.push_back(std::vector()); + pipeBranchesCellIds.push_back(std::vector ()); - if (brIdx == 0) - { - // The first branch contains segment number 1, and this is the only segment connected to well head - // See Eclipse documentation for the keyword WELSEGS - prevWellResPoint = whResCell; + if (brIdx == 0) + { + // The first branch contains segment number 1, and this is the only segment connected to well head + // See Eclipse documentation for the keyword WELSEGS + prevWellResPoint = whResCell; - pipeBranchesCLCoords.back().push_back(whStartPos); - pipeBranchesCellIds.back().push_back(*prevWellResPoint); + pipeBranchesCLCoords.back().push_back(whStartPos); + pipeBranchesCellIds.back().push_back(*prevWellResPoint); - pipeBranchesCLCoords.back().push_back(whIntermediate); - pipeBranchesCellIds.back().push_back(*prevWellResPoint); - } + pipeBranchesCLCoords.back().push_back(whIntermediate); + pipeBranchesCellIds.back().push_back(*prevWellResPoint); + } - // Loop over all the resultPoints in the branch + // Loop over all the resultPoints in the branch - const std::vector& resBranchCells = resBranches[brIdx].m_branchResultPoints; + const std::vector& resBranchCells = resBranches[brIdx].m_branchResultPoints; + + for (int cIdx = 0; cIdx < static_cast(resBranchCells.size()); cIdx++) // Need int because cIdx can temporarily end on -1 + { + std::vector& branchCLCoords = pipeBranchesCLCoords.back(); + std::vector& branchCellIds = pipeBranchesCellIds.back(); - for (int cIdx = 0; cIdx < static_cast(resBranchCells.size()); cIdx++) // Need int because cIdx can temporarily end on -1 + const RigWellResultPoint& currentWellResPoint = resBranchCells[cIdx]; + + // Ignore invalid cells + + if (!currentWellResPoint.isValid()) { - std::vector& branchCLCoords = pipeBranchesCLCoords.back(); - std::vector& branchCellIds = pipeBranchesCellIds.back(); + //CVF_ASSERT(false); // Some segments does not get anything yet. + continue; + } - const RigWellResultPoint& currentWellResPoint = resBranchCells[cIdx]; + // Add cl contribution for a geometrical resultPoint by adding exit point from previous cell, + // and then the result point position - // Ignore invalid cells + if (!currentWellResPoint.isCell()) + { + // Use the interpolated value of branch head + CVF_ASSERT(currentWellResPoint.isPointValid()); - if (!currentWellResPoint.isValid()) - { - //CVF_ASSERT(false); // Some segments does not get anything yet. - continue; - } + cvf::Vec3d currentPoint = currentWellResPoint.m_bottomPosition; - // Add cl contribution for a geometrical resultPoint by adding exit point from previous cell, - // and then the result point position + // If we have a real previous cell, we need to go out of it, before adding the current point + // That is: add a CL-point describing where it leaves the previous cell. - if (!currentWellResPoint.isCell()) + if (prevWellResPoint && prevWellResPoint->isCell()) { - // Use the interpolated value of branch head - CVF_ASSERT(currentWellResPoint.isPointValid()); + // Create ray between the previous and this position + + const RigCell& prevCell = eclipseCaseData->cellFromWellResultCell(*prevWellResPoint); + cvf::Vec3d centerPreviousCell = prevCell.center(); - cvf::Vec3d currentPoint = currentWellResPoint.m_bottomPosition; + cvf::Ray rayToThisCell; + rayToThisCell.setOrigin(centerPreviousCell); + rayToThisCell.setDirection((currentPoint - centerPreviousCell).getNormalized()); - // If we have a real previous cell, we need to go out of it, before adding the current point - // That is: add a CL-point describing where it leaves the previous cell. + cvf::Vec3d outOfPrevCell(centerPreviousCell); - if (prevWellResPoint && prevWellResPoint->isCell()) + prevCell.firstIntersectionPoint(rayToThisCell, &outOfPrevCell); + if ((currentPoint - outOfPrevCell).lengthSquared() > 1e-3) { - // Create ray between the previous and this position + branchCLCoords.push_back(outOfPrevCell); + branchCellIds.push_back(RigWellResultPoint()); + } - const RigCell& prevCell = eclipseCaseData->cellFromWellResultCell(*prevWellResPoint); - cvf::Vec3d centerPreviousCell = prevCell.center(); + } - cvf::Ray rayToThisCell; - rayToThisCell.setOrigin(centerPreviousCell); - rayToThisCell.setDirection((currentPoint - centerPreviousCell).getNormalized()); + branchCLCoords.push_back(currentPoint); + branchCellIds.push_back(currentWellResPoint); - cvf::Vec3d outOfPrevCell(centerPreviousCell); + prevWellResPoint = ¤tWellResPoint; - int intersectionOk = prevCell.firstIntersectionPoint(rayToThisCell, &outOfPrevCell); - //CVF_ASSERT(intersectionOk); - //CVF_ASSERT(intersectionOk); - if ((currentPoint - outOfPrevCell).lengthSquared() > 1e-3) - { - branchCLCoords.push_back(outOfPrevCell); - branchCellIds.push_back(RigWellResultPoint()); - } + continue; + } - } + // + // Handle currentWellResPoint as a real cell result points. + // - branchCLCoords.push_back(currentPoint); - branchCellIds.push_back(currentWellResPoint); - - prevWellResPoint = ¤tWellResPoint; + const RigCell& cell = eclipseCaseData->cellFromWellResultCell(currentWellResPoint); - continue; - } + // Check if this and the previous cells has shared faces + + cvf::StructGridInterface::FaceType sharedFace; + if (prevWellResPoint && prevWellResPoint->isCell() && eclipseCaseData->findSharedSourceFace(sharedFace, currentWellResPoint, *prevWellResPoint)) + { + // If they share faces, the shared face center is used as point + // describing the entry of this cell. (And exit of the previous cell) - // - // Handle currentWellResPoint as a real cell result points. - // + branchCLCoords.push_back(cell.faceCenter(sharedFace)); + branchCellIds.push_back(currentWellResPoint); + } + else + { + // This and the previous cell does not share a face. + // Then we need to calculate the exit of the previous cell, and the entry point into this cell - const RigCell& cell = eclipseCaseData->cellFromWellResultCell(currentWellResPoint); + cvf::Vec3d centerPreviousCell(cvf::Vec3d::ZERO); + cvf::Vec3d centerThisCell = cell.center(); + bool distanceToWellHeadIsLonger = true; - // Check if this and the previous cells has shared faces + // If we have a previous well result point, use its center as measure point and ray intersection start + // when considering things. - cvf::StructGridInterface::FaceType sharedFace; - if (prevWellResPoint && prevWellResPoint->isCell() && eclipseCaseData->findSharedSourceFace(sharedFace, currentWellResPoint, *prevWellResPoint)) + if (prevWellResPoint && prevWellResPoint->isValid()) { - // If they share faces, the shared face center is used as point - // describing the entry of this cell. (And exit of the previous cell) + if (prevWellResPoint->isCell()) + { + const RigCell& prevCell = eclipseCaseData->cellFromWellResultCell(*prevWellResPoint); + centerPreviousCell = prevCell.center(); + } + else + { + centerPreviousCell = prevWellResPoint->m_bottomPosition; + } - branchCLCoords.push_back(cell.faceCenter(sharedFace)); - branchCellIds.push_back(currentWellResPoint); + distanceToWellHeadIsLonger = (centerThisCell - centerPreviousCell).lengthSquared() <= (centerThisCell - whStartPos).lengthSquared(); } - else - { - // This and the previous cell does not share a face. - // Then we need to calculate the exit of the previous cell, and the entry point into this cell - cvf::Vec3d centerPreviousCell(cvf::Vec3d::ZERO); - cvf::Vec3d centerThisCell = cell.center(); - bool distanceToWellHeadIsLonger = true; - // If we have a previous well result point, use its center as measure point and ray intersection start - // when considering things. + // First make sure this cell is not starting a new "display" branch for none MSW's + + if ( isMultiSegmentWell + || !isAutoDetectBranches + || (prevWellResPoint == whResCell) + || distanceToWellHeadIsLonger) + { + // Not starting a "display" branch for normal wells + // Calculate the exit of the previous cell, and the entry point into this cell + + cvf::Vec3d intoThisCell(centerThisCell); // Use cell center as default for "into" point. if (prevWellResPoint && prevWellResPoint->isValid()) { - if (prevWellResPoint->isCell()) + // We have a defined previous point + // Create ray between the previous and this cell + + cvf::Ray rayToThisCell; + rayToThisCell.setOrigin(centerPreviousCell); + rayToThisCell.setDirection((centerThisCell - centerPreviousCell).getNormalized()); + + // Intersect with the current cell to find a better entry point than the cell center + + int intersectionCount = cell.firstIntersectionPoint(rayToThisCell, &intoThisCell); + bool isPreviousResPointInsideCurrentCell = (intersectionCount % 2); // Must intersect uneven times to be inside. (1 % 2 = 1) + + // If we have a real previous cell, we need to go out of it, before entering this. + // That is: add a CL-point describing where it leaves the previous cell. + + if ( prevWellResPoint->isCell()) { + cvf::Vec3d outOfPrevCell(centerPreviousCell); + const RigCell& prevCell = eclipseCaseData->cellFromWellResultCell(*prevWellResPoint); - centerPreviousCell = prevCell.center(); + prevCell.firstIntersectionPoint(rayToThisCell, &outOfPrevCell); + if ((intoThisCell - outOfPrevCell).lengthSquared() > 1e-3) + { + branchCLCoords.push_back(outOfPrevCell); + branchCellIds.push_back(RigWellResultPoint()); + } } - else + else if (isPreviousResPointInsideCurrentCell) { - centerPreviousCell = prevWellResPoint->m_bottomPosition; + // Since the previous point actually is inside this cell, + /// use that as the entry point into this cell + intoThisCell = centerPreviousCell; } - distanceToWellHeadIsLonger = (centerThisCell - centerPreviousCell).lengthSquared() <= (centerThisCell - whStartPos).lengthSquared(); } - - // First make sure this cell is not starting a new "display" branch for none MSW's + branchCLCoords.push_back(intoThisCell); + branchCellIds.push_back(currentWellResPoint); + } + else + { + // Need to start a "display branch" for a Normal Well. - if ( wellResults->isMultiSegmentWell() - || !isAutoDetectBranches - || (prevWellResPoint == whResCell) - || distanceToWellHeadIsLonger) - { - // Not starting a "display" branch for normal wells - // Calculate the exit of the previous cell, and the entry point into this cell + CVF_ASSERT(!isMultiSegmentWell); - cvf::Vec3d intoThisCell(centerThisCell); // Use cell center as default for "into" point. + // This cell is further from the previous cell than from the well head, + // thus we interpret it as a new branch. - if (prevWellResPoint && prevWellResPoint->isValid()) - { - // We have a defined previous point - // Create ray between the previous and this cell - - cvf::Ray rayToThisCell; - rayToThisCell.setOrigin(centerPreviousCell); - rayToThisCell.setDirection((centerThisCell - centerPreviousCell).getNormalized()); + // First finish the current branch in the previous cell + //branchCLCoords.push_back(branchCLCoords.back() + 1.5*(centerPreviousCell - branchCLCoords.back()) ); + finishPipeCenterLine(pipeBranchesCLCoords, centerPreviousCell); - // Intersect with the current cell to find a better entry point than the cell center + // Create new display branch + pipeBranchesCLCoords.push_back(std::vector()); + pipeBranchesCellIds.push_back(std::vector ()); - int intersectionCount = cell.firstIntersectionPoint(rayToThisCell, &intoThisCell); - bool isPreviousResPointInsideCurrentCell = (intersectionCount % 2); // Must intersect uneven times to be inside. (1 % 2 = 1) + // Start the new branch by entering the first cell (the wellhead) and intermediate + prevWellResPoint = whResCell; + pipeBranchesCLCoords.back().push_back(whStartPos); + pipeBranchesCellIds.back().push_back(*prevWellResPoint); - // If we have a real previous cell, we need to go out of it, before entering this. - // That is: add a CL-point describing where it leaves the previous cell. + // Include intermediate + pipeBranchesCLCoords.back().push_back(whIntermediate); + pipeBranchesCellIds.back().push_back(*prevWellResPoint); - if ( prevWellResPoint->isCell()) - { - cvf::Vec3d outOfPrevCell(centerPreviousCell); - - const RigCell& prevCell = eclipseCaseData->cellFromWellResultCell(*prevWellResPoint); - bool intersectionOk = prevCell.firstIntersectionPoint(rayToThisCell, &outOfPrevCell); - //CVF_ASSERT(intersectionOk); - //CVF_ASSERT(intersectionOk); - if ((intoThisCell - outOfPrevCell).lengthSquared() > 1e-3) - { - branchCLCoords.push_back(outOfPrevCell); - branchCellIds.push_back(RigWellResultPoint()); - } - } - else if (isPreviousResPointInsideCurrentCell) - { - // Since the previous point actually is inside this cell, - /// use that as the entry point into this cell - intoThisCell = centerPreviousCell; - } + // Well now we need to step one back to take this cell again, but in the new branch. + cIdx--; + continue; + } + } - } + prevWellResPoint = ¤tWellResPoint; + } - branchCLCoords.push_back(intoThisCell); - branchCellIds.push_back(currentWellResPoint); - } - else - { - // Need to start a "display branch" for a Normal Well. + // For the last cell, add the point 0.5 past the center of that cell + // Remember that prevWellResPoint actually is the last one in this branch. - CVF_ASSERT(!wellResults->isMultiSegmentWell()); + if (prevWellResPoint && prevWellResPoint->isCell()) + { + const RigCell& prevCell = eclipseCaseData->cellFromWellResultCell(*prevWellResPoint); + cvf::Vec3d centerLastCell = prevCell.center(); + finishPipeCenterLine(pipeBranchesCLCoords, centerLastCell); + } + else if (prevWellResPoint && prevWellResPoint->isPointValid()) + { + // Continue the line with the same point, just to keep the last Cell ID + pipeBranchesCLCoords.back().push_back(prevWellResPoint->m_bottomPosition); + } + else + { + // Remove the ID that is superfluous since we will not add an ending point + pipeBranchesCellIds.back().pop_back(); + } + } - // This cell is further from the previous cell than from the well head, - // thus we interpret it as a new branch. + if (useAllCellCenters) addCellCenterPoints(eclipseCaseData, pipeBranchesCLCoords, pipeBranchesCellIds); - // First finish the current branch in the previous cell - //branchCLCoords.push_back(branchCLCoords.back() + 1.5*(centerPreviousCell - branchCLCoords.back()) ); - finishPipeCenterLine(pipeBranchesCLCoords, centerPreviousCell); + CVF_ASSERT(pipeBranchesCellIds.size() == pipeBranchesCLCoords.size()); + for (size_t i = 0 ; i < pipeBranchesCellIds.size() ; ++i) + { + CVF_ASSERT(pipeBranchesCellIds[i].size() == pipeBranchesCLCoords[i].size()-1); + } +} - // Create new display branch - pipeBranchesCLCoords.push_back(std::vector()); - pipeBranchesCellIds.push_back(std::vector ()); +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigSimulationWellCenterLineCalculator::addCellCenterPoints(const RigEclipseCaseData* eclipseCaseData, + std::vector> &pipeBranchesCLCoords, + std::vector> &pipeBranchesCellIds) +{ + for ( size_t brIdx = 0; brIdx < pipeBranchesCellIds.size(); brIdx++ ) + { + const std::vector& branchResPoints = pipeBranchesCellIds[brIdx]; + const std::vector& branchClPoints = pipeBranchesCLCoords[brIdx]; + + std::vector branchResPointsWithCellCenters; + std::vector branchClPointsWithCellCenters; - // Start the new branch by entering the first cell (the wellhead) and intermediate - prevWellResPoint = whResCell; - pipeBranchesCLCoords.back().push_back(whStartPos); - pipeBranchesCellIds.back().push_back(*prevWellResPoint); + for ( size_t cIdx = 0; cIdx < branchResPoints.size(); cIdx++ ) + { + branchResPointsWithCellCenters.push_back(branchResPoints[cIdx]); + branchClPointsWithCellCenters.push_back(branchClPoints[cIdx]); - // Include intermediate - pipeBranchesCLCoords.back().push_back(whIntermediate); - pipeBranchesCellIds.back().push_back(*prevWellResPoint); + if ( branchResPoints[cIdx].isCell() ) + { + const RigCell& cell = eclipseCaseData->cellFromWellResultCell(branchResPoints[cIdx]); + cvf::Vec3d center = cell.center(); + branchClPointsWithCellCenters.push_back(center); + branchResPointsWithCellCenters.push_back(branchResPoints[cIdx]); + } + } + + branchClPointsWithCellCenters.push_back(branchClPoints[branchResPoints.size()]); - // Well now we need to step one back to take this cell again, but in the new branch. - cIdx--; - continue; - } - } + pipeBranchesCellIds[brIdx] = branchResPointsWithCellCenters; + pipeBranchesCLCoords[brIdx] = branchClPointsWithCellCenters; + } +} - prevWellResPoint = ¤tWellResPoint; - } - - // For the last cell, add the point 0.5 past the center of that cell - // Remember that prevWellResPoint actually is the last one in this branch. - - cvf::Vec3d centerLastCell; - if (prevWellResPoint && prevWellResPoint->isCell()) - { - const RigCell& prevCell = eclipseCaseData->cellFromWellResultCell(*prevWellResPoint); - centerLastCell = prevCell.center(); - finishPipeCenterLine(pipeBranchesCLCoords, centerLastCell); - } - else - { - // Remove the ID that is superfluous since we will not add an ending point - pipeBranchesCellIds.back().pop_back(); - } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RigSimulationWellCenterLineCalculator::hasAnyResultCells(const std::vector &resBranches) +{ + bool hasResultCells = false; + if ( resBranches.size() ) + { + for ( size_t i = 0 ; i < resBranches.size(); ++i ) + { + if ( resBranches[i].m_branchResultPoints.size() != 0 ) + { + hasResultCells = true; + break; + } } } + return hasResultCells; +} - CVF_ASSERT(pipeBranchesCellIds.size() == pipeBranchesCLCoords.size()); - for (size_t i = 0 ; i < pipeBranchesCellIds.size() ; ++i) + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RigSimulationWellCenterLineCalculator::hasAnyValidDataCells(const RigWellResultBranch& branch) +{ + bool hasValidData = false; + for ( size_t cIdx = 0; cIdx < branch.m_branchResultPoints.size(); ++cIdx ) { - CVF_ASSERT(pipeBranchesCellIds[i].size() == pipeBranchesCLCoords[i].size()-1); + if ( branch.m_branchResultPoints[cIdx].isValid() ) + { + hasValidData = true; + break; + } } + + return hasValidData; } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ReservoirDataModel/RigSimulationWellCenterLineCalculator.h b/ApplicationCode/ReservoirDataModel/RigSimulationWellCenterLineCalculator.h index 7fc3396a67..00d1c88305 100644 --- a/ApplicationCode/ReservoirDataModel/RigSimulationWellCenterLineCalculator.h +++ b/ApplicationCode/ReservoirDataModel/RigSimulationWellCenterLineCalculator.h @@ -23,14 +23,34 @@ #include class RimEclipseWell; +class RigEclipseCaseData; class RigSimulationWellCenterLineCalculator { public: - static void calculateWellPipeCenterline(RimEclipseWell* m_rimWell, - std::vector< std::vector >& pipeBranchesCLCoords, - std::vector< std::vector >& pipeBranchesCellIds) ; + static void calculateWellPipeStaticCenterline(RimEclipseWell* rimWell, + std::vector< std::vector >& pipeBranchesCLCoords, + std::vector< std::vector >& pipeBranchesCellIds) ; + + static void calculateWellPipeDynamicCenterline(RimEclipseWell* rimWell, + size_t timeStepIndex, + std::vector< std::vector >& pipeBranchesCLCoords, + std::vector< std::vector >& pipeBranchesCellIds) ; + + + static void calculateWellPipeCenterlineFromWellFrame(const RigEclipseCaseData* eclipseCaseData, + const RigSingleWellResultsData* wellResults, + int timeStepIndex, + bool isAutoDetectBranches, + bool useAllCellCenters, + std::vector> &pipeBranchesCLCoords, + std::vector> &pipeBranchesCellIds); private: + + static bool hasAnyResultCells(const std::vector &resBranches); + static bool hasAnyValidDataCells(const RigWellResultBranch& branch); static void finishPipeCenterLine( std::vector< std::vector > &pipeBranchesCLCoords, const cvf::Vec3d& lastCellCenter ) ; + + static void addCellCenterPoints(const RigEclipseCaseData* eclipseCaseData, std::vector> &pipeBranchesCLCoords, std::vector> &pipeBranchesCellIds); }; diff --git a/ApplicationCode/ReservoirDataModel/RigSimulationWellCoordsAndMD.cpp b/ApplicationCode/ReservoirDataModel/RigSimulationWellCoordsAndMD.cpp new file mode 100644 index 0000000000..f241302508 --- /dev/null +++ b/ApplicationCode/ReservoirDataModel/RigSimulationWellCoordsAndMD.cpp @@ -0,0 +1,143 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RigSimulationWellCoordsAndMD.h" + +#include "cvfGeometryTools.h" + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigSimulationWellCoordsAndMD::RigSimulationWellCoordsAndMD(const std::vector& wellPathPoints) +: m_wellPathPoints(wellPathPoints) +{ + computeMeasuredDepths(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const std::vector& RigSimulationWellCoordsAndMD::wellPathPoints() const +{ + return m_wellPathPoints; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const std::vector& RigSimulationWellCoordsAndMD::measuredDepths() const +{ + return m_measuredDepths; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +cvf::Vec3d RigSimulationWellCoordsAndMD::interpolatedPointAlongWellPath(double measuredDepth) const +{ + cvf::Vec3d wellPathPoint = cvf::Vec3d::ZERO; + + size_t i = 0; + while (i < m_measuredDepths.size() && m_measuredDepths.at(i) < measuredDepth) + { + i++; + } + + if (m_measuredDepths.size() > i) + { + if (i == 0) + { + //For measuredDepth same or lower than first point, use this first point + wellPathPoint = m_wellPathPoints.at(0); + } + else + { + //Do interpolation + double stepsize = (measuredDepth - m_measuredDepths.at(i - 1)) / + (m_measuredDepths.at(i) - m_measuredDepths.at(i - 1)); + wellPathPoint = m_wellPathPoints.at(i - 1) + stepsize * (m_wellPathPoints.at(i) - m_wellPathPoints.at(i - 1)); + } + } + else + { + //Use endpoint if measuredDepth same or higher than last point + wellPathPoint = m_wellPathPoints.at(i - 1); + } + + return wellPathPoint; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +double RigSimulationWellCoordsAndMD::locationAlongWellCoords(const cvf::Vec3d& position) const +{ + double location = 0.0; + + size_t closestIndex = cvf::UNDEFINED_SIZE_T; + double closestDistance = cvf::UNDEFINED_DOUBLE; + + for (size_t i = 1; i < m_wellPathPoints.size(); i++) + { + cvf::Vec3d p1 = m_wellPathPoints[i - 1]; + cvf::Vec3d p2 = m_wellPathPoints[i - 0]; + + double candidateDistance = cvf::GeometryTools::linePointSquareDist(p1, p2, position); + if (candidateDistance < closestDistance) + { + closestDistance = candidateDistance; + closestIndex = i; + } + } + + if (closestIndex != cvf::UNDEFINED_DOUBLE) + { + cvf::Vec3d p1 = m_wellPathPoints[closestIndex - 1]; + cvf::Vec3d p2 = m_wellPathPoints[closestIndex - 0]; + + double intersection = 0.0; + cvf::GeometryTools::projectPointOnLine(p1, p2, position, &intersection); + + location = m_measuredDepths[closestIndex - 1]; + location += intersection * (p1-p2).length(); + } + + return location; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigSimulationWellCoordsAndMD::computeMeasuredDepths() +{ + cvf::Vec3d prev = cvf::Vec3d::UNDEFINED; + + double accumulatedMD = 0; + + for (const auto& point : m_wellPathPoints) + { + if (!prev.isUndefined()) + { + accumulatedMD += point.pointDistance(prev); + } + + m_measuredDepths.push_back(accumulatedMD); + + prev = point; + } +} diff --git a/ApplicationCode/ReservoirDataModel/RigSimulationWellCoordsAndMD.h b/ApplicationCode/ReservoirDataModel/RigSimulationWellCoordsAndMD.h new file mode 100644 index 0000000000..7c7fdd6971 --- /dev/null +++ b/ApplicationCode/ReservoirDataModel/RigSimulationWellCoordsAndMD.h @@ -0,0 +1,50 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cvfBase.h" +#include "cvfVector3.h" + +#include + + + + +//================================================================================================== +/// +/// +//================================================================================================== +class RigSimulationWellCoordsAndMD +{ +public: + explicit RigSimulationWellCoordsAndMD(const std::vector& wellPathPoints); + + const std::vector& wellPathPoints() const; + const std::vector& measuredDepths() const; + + cvf::Vec3d interpolatedPointAlongWellPath(double measuredDepth) const; + double locationAlongWellCoords(const cvf::Vec3d& position) const; + +private: + void computeMeasuredDepths(); + +private: + std::vector m_wellPathPoints; + std::vector m_measuredDepths; +}; diff --git a/ApplicationCode/ReservoirDataModel/RigSingleWellResultsData.cpp b/ApplicationCode/ReservoirDataModel/RigSingleWellResultsData.cpp index b3af8e7f06..3cb3831d9a 100644 --- a/ApplicationCode/ReservoirDataModel/RigSingleWellResultsData.cpp +++ b/ApplicationCode/ReservoirDataModel/RigSingleWellResultsData.cpp @@ -95,20 +95,6 @@ bool RigSingleWellResultsData::hasWellResult(size_t resultTimeStepIndex) const return wellTimeStepIndex != cvf::UNDEFINED_SIZE_T; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -size_t RigSingleWellResultsData::firstResultTimeStep() const -{ - size_t i = 0; - for(i = 0; i < m_resultTimeStepIndexToWellTimeStepIndex.size(); ++i) - { - if (m_resultTimeStepIndexToWellTimeStepIndex[i] != cvf::UNDEFINED_SIZE_T) return i; - } - - return cvf::UNDEFINED_SIZE_T; -} - bool operator== (const RigWellResultPoint& p1, const RigWellResultPoint& p2) { return @@ -121,7 +107,7 @@ bool operator== (const RigWellResultPoint& p1, const RigWellResultPoint& p2) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RigSingleWellResultsData::computeStaticWellCellPath() +void RigSingleWellResultsData::computeStaticWellCellPath() const { if (m_wellCellsTimeSteps.size() == 0) return; @@ -133,7 +119,7 @@ void RigSingleWellResultsData::computeStaticWellCellPath() for (size_t bIdx = 0; bIdx < m_wellCellsTimeSteps[0].m_wellResultBranches.size(); ++bIdx) { int branchErtId = m_wellCellsTimeSteps[0].m_wellResultBranches[bIdx].m_ertBranchId; - std::vector& frameCells = m_wellCellsTimeSteps[0].m_wellResultBranches[bIdx].m_branchResultPoints; + const std::vector& frameCells = m_wellCellsTimeSteps[0].m_wellResultBranches[bIdx].m_branchResultPoints; std::list< RigWellResultPoint >& branch = staticWellBranches[branchErtId]; @@ -152,7 +138,7 @@ void RigSingleWellResultsData::computeStaticWellCellPath() for (size_t bIdx = 0; bIdx < m_wellCellsTimeSteps[tIdx].m_wellResultBranches.size(); ++bIdx) { int branchId = m_wellCellsTimeSteps[tIdx].m_wellResultBranches[bIdx].m_ertBranchId; - std::vector& resBranch = m_wellCellsTimeSteps[tIdx].m_wellResultBranches[bIdx].m_branchResultPoints; + const std::vector& resBranch = m_wellCellsTimeSteps[tIdx].m_wellResultBranches[bIdx].m_branchResultPoints; std::list< RigWellResultPoint >& stBranch = staticWellBranches[branchId]; std::list< RigWellResultPoint >::iterator sEndIt; @@ -276,6 +262,52 @@ bool RigSingleWellResultsData::isMultiSegmentWell() const } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigWellResultFrame::WellProductionType RigSingleWellResultsData::wellProductionType(size_t resultTimeStepIndex) const +{ + if (hasWellResult(resultTimeStepIndex)) + { + const RigWellResultFrame& wResFrame = wellResultFrame(resultTimeStepIndex); + return wResFrame.m_productionType; + } + else + { + return RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE; + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const RigWellResultFrame& RigSingleWellResultsData::staticWellCells() const +{ + // Make sure we have computed the static representation of the well + if (m_staticWellCells.m_wellResultBranches.size() == 0) + { + computeStaticWellCellPath(); + } + + return m_staticWellCells; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RigSingleWellResultsData::isOpen(size_t resultTimeStepIndex) const +{ + if (hasWellResult(resultTimeStepIndex)) + { + const RigWellResultFrame& wResFrame = wellResultFrame(resultTimeStepIndex); + return wResFrame.m_isOpen; + } + else + { + return false; + } +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ReservoirDataModel/RigSingleWellResultsData.h b/ApplicationCode/ReservoirDataModel/RigSingleWellResultsData.h index 2015f05942..6b6479f085 100644 --- a/ApplicationCode/ReservoirDataModel/RigSingleWellResultsData.h +++ b/ApplicationCode/ReservoirDataModel/RigSingleWellResultsData.h @@ -39,9 +39,13 @@ struct RigWellResultPoint m_isOpen(false), m_ertBranchId(-1), m_ertSegmentId(-1), - m_bottomPosition(cvf::Vec3d::UNDEFINED) + m_bottomPosition(cvf::Vec3d::UNDEFINED), + m_flowRate(0.0), + m_oilRate(0.0), + m_gasRate(0.0), + m_waterRate(0.0) { } - + bool isPointValid() const { return m_bottomPosition != cvf::Vec3d::UNDEFINED; @@ -57,6 +61,64 @@ struct RigWellResultPoint return isCell() || isPointValid(); } + double flowRate() const + { + if ( isCell() && m_isOpen) + { + return m_flowRate; + } + else + { + return 0.0; + } + } + + double oilRate() const + { + if ( isCell() && m_isOpen) + { + return m_oilRate; + } + else + { + return 0.0; + } + } + + double gasRate() const + { + if ( isCell() && m_isOpen) + { + return m_gasRate; + } + else + { + return 0.0; + } + } + + double waterRate() const + { + if ( isCell() && m_isOpen) + { + return m_waterRate; + } + else + { + return 0.0; + } + } + + bool isEqual(const RigWellResultPoint& other ) const + { + return ( m_gridIndex == other.m_gridIndex + && m_gridCellIndex == other.m_gridCellIndex + && m_isOpen == other.m_isOpen + && m_ertBranchId == other.m_ertBranchId + && m_ertSegmentId == other.m_ertSegmentId + && m_flowRate == other.m_flowRate); + } + size_t m_gridIndex; size_t m_gridCellIndex; //< Index to cell which is included in the well @@ -66,6 +128,10 @@ struct RigWellResultPoint int m_ertSegmentId; cvf::Vec3d m_bottomPosition; //< The estimated bottom position of the well segment, when we have no grid cell connections for the segment. + double m_flowRate; //< Total reservoir rate + double m_oilRate; //< Surface oil rate + double m_gasRate; //< Surface gas rate For Field-unit, converted to [stb/day] to allign with oil and water. + double m_waterRate; //< Surface water rate }; //================================================================================================== @@ -117,24 +183,29 @@ class RigSingleWellResultsData : public cvf::Object public: RigSingleWellResultsData() { m_isMultiSegmentWell = false; } - void setMultiSegmentWell(bool isMultiSegmentWell); - bool isMultiSegmentWell() const; + void setMultiSegmentWell(bool isMultiSegmentWell); + bool isMultiSegmentWell() const; - bool hasWellResult(size_t resultTimeStepIndex) const; - size_t firstResultTimeStep() const; + bool hasWellResult(size_t resultTimeStepIndex) const; + const RigWellResultFrame& wellResultFrame(size_t resultTimeStepIndex) const; + bool isOpen(size_t resultTimeStepIndex) const; + RigWellResultFrame::WellProductionType wellProductionType(size_t resultTimeStepIndex) const; - const RigWellResultFrame& wellResultFrame(size_t resultTimeStepIndex) const; - - void computeStaticWellCellPath(); - - void computeMappingFromResultTimeIndicesToWellTimeIndices(const std::vector& resultTimes); - -public: - QString m_wellName; - bool m_isMultiSegmentWell; + const RigWellResultFrame& staticWellCells() const; + + void computeMappingFromResultTimeIndicesToWellTimeIndices(const std::vector& resultTimes); - std::vector m_resultTimeStepIndexToWellTimeStepIndex; // Well result timesteps may differ from result timesteps - std::vector< RigWellResultFrame > m_wellCellsTimeSteps; - RigWellResultFrame m_staticWellCells; +public: // Todo: Clean up this regarding public members and constness etc. + QString m_wellName; + + std::vector m_resultTimeStepIndexToWellTimeStepIndex; // Well result timesteps may differ from result timesteps + std::vector< RigWellResultFrame > m_wellCellsTimeSteps; + mutable RigWellResultFrame m_staticWellCells; + +private: + void computeStaticWellCellPath() const; + +private: + bool m_isMultiSegmentWell; }; diff --git a/ApplicationCode/ReservoirDataModel/RigSummaryCaseData.h b/ApplicationCode/ReservoirDataModel/RigSummaryCaseData.h index 70eb3574e3..5827032c89 100644 --- a/ApplicationCode/ReservoirDataModel/RigSummaryCaseData.h +++ b/ApplicationCode/ReservoirDataModel/RigSummaryCaseData.h @@ -27,7 +27,7 @@ class RifReaderEclipseSummary; class RigSummaryCaseData: public cvf::Object { public: - RigSummaryCaseData(const QString& summaryHeaderFileName ); + explicit RigSummaryCaseData(const QString& summaryHeaderFileName ); ~RigSummaryCaseData(); diff --git a/ApplicationCode/ReservoirDataModel/RigTimeHistoryResultAccessor.cpp b/ApplicationCode/ReservoirDataModel/RigTimeHistoryResultAccessor.cpp index 2a1bb6aaa4..7f2ffc6eee 100644 --- a/ApplicationCode/ReservoirDataModel/RigTimeHistoryResultAccessor.cpp +++ b/ApplicationCode/ReservoirDataModel/RigTimeHistoryResultAccessor.cpp @@ -19,70 +19,62 @@ #include "RigTimeHistoryResultAccessor.h" -#include // Needed for HUGE_VAL on Linux - -#include "RigCaseData.h" #include "RigResultAccessor.h" #include "RigResultAccessorFactory.h" -#include "RigCaseCellResultsData.h" +#include "RigEclipseCaseData.h" +#include "RigGridBase.h" +//#include // Needed for HUGE_VAL on Linux //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RigTimeHistoryResultAccessor::RigTimeHistoryResultAccessor(RigCaseData* eclipseCaseData, size_t gridIndex, size_t cellIndex, size_t scalarResultIndex, RifReaderInterface::PorosityModelResultType porosityModel) - : m_eclipseCaseData(eclipseCaseData), - m_gridIndex(gridIndex), - m_cellIndex(cellIndex), - m_scalarResultIndex(scalarResultIndex), - m_porosityModel(porosityModel) +std::vector RigTimeHistoryResultAccessor::timeHistoryValues(RigEclipseCaseData* eclipseCaseData, RimEclipseResultDefinition* resultDefinition, size_t gridIndex, size_t cellIndex, size_t timeStepCount) { - m_face = cvf::StructGridInterface::NO_FACE; + std::vector values; - computeTimeHistoryData(); -} + RigHugeValResultAccessor hugeVal; -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RigTimeHistoryResultAccessor::setFace(cvf::StructGridInterface::FaceType face) -{ - m_face = face; + for (size_t i = 0; i < timeStepCount; i++) + { + // TODO: Consider rewrite RigResultAccessorFactory::createFromResultDefinition so the function always returns a valid + // result accessor. Use hugeVal result accessor if no valid result is found - computeTimeHistoryData(); -} + cvf::ref resultAccessor = RigResultAccessorFactory::createFromResultDefinition(eclipseCaseData, gridIndex, i, resultDefinition); + if (resultAccessor.notNull()) + { + values.push_back(resultAccessor->cellScalar(cellIndex)); + } + else + { + values.push_back(hugeVal.cellScalar(cellIndex)); + } + } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -std::vector RigTimeHistoryResultAccessor::timeHistoryValues() const -{ - return m_timeHistoryValues; + return values; } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString RigTimeHistoryResultAccessor::topologyText() const +QString RigTimeHistoryResultAccessor::geometrySelectionText(RigEclipseCaseData* eclipseCaseData, size_t gridIndex, size_t cellIndex) { QString text; - if (m_eclipseCaseData) + if (eclipseCaseData) { - if (m_cellIndex != cvf::UNDEFINED_SIZE_T) + if (cellIndex != cvf::UNDEFINED_SIZE_T) { size_t i = 0; size_t j = 0; size_t k = 0; - if (m_eclipseCaseData->grid(m_gridIndex)->ijkFromCellIndex(m_cellIndex, &i, &j, &k)) + if (eclipseCaseData->grid(gridIndex)->ijkFromCellIndex(cellIndex, &i, &j, &k)) { // Adjust to 1-based Eclipse indexing i++; j++; k++; - cvf::StructGridInterface::FaceEnum faceEnum(m_face); - text += QString("Cell : [%1, %2, %3]").arg(i).arg(j).arg(k); } } @@ -91,23 +83,3 @@ QString RigTimeHistoryResultAccessor::topologyText() const return text; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RigTimeHistoryResultAccessor::computeTimeHistoryData() -{ - m_timeHistoryValues.clear(); - - if (m_eclipseCaseData) - { - size_t timeStepCount = m_eclipseCaseData->results(m_porosityModel)->timeStepCount(m_scalarResultIndex); - - for (size_t i = 0; i < timeStepCount; i++) - { - cvf::ref resultAccessor = RigResultAccessorFactory::createResultAccessor(m_eclipseCaseData, m_gridIndex, m_porosityModel, i, m_scalarResultIndex); - - m_timeHistoryValues.push_back(resultAccessor->cellScalar(m_cellIndex)); - } - } -} - diff --git a/ApplicationCode/ReservoirDataModel/RigTimeHistoryResultAccessor.h b/ApplicationCode/ReservoirDataModel/RigTimeHistoryResultAccessor.h index 1caacfb575..59d64a827f 100644 --- a/ApplicationCode/ReservoirDataModel/RigTimeHistoryResultAccessor.h +++ b/ApplicationCode/ReservoirDataModel/RigTimeHistoryResultAccessor.h @@ -19,34 +19,18 @@ #pragma once -#include "cvfStructGrid.h" -#include "RifReaderInterface.h" +#include +#include -class RigCaseData; + +class RigEclipseCaseData; +class RimEclipseResultDefinition; class RigTimeHistoryResultAccessor { public: - RigTimeHistoryResultAccessor(RigCaseData* eclipseCaseData, size_t gridIndex, size_t cellIndex, size_t scalarResultIndex, RifReaderInterface::PorosityModelResultType porosityModel); - void setFace(cvf::StructGridInterface::FaceType face); - - QString topologyText() const; - std::vector timeHistoryValues() const; - -private: - void computeTimeHistoryData(); - -private: - RigCaseData* m_eclipseCaseData; - - size_t m_gridIndex; - size_t m_cellIndex; - size_t m_scalarResultIndex; - - cvf::StructGridInterface::FaceType m_face; - RifReaderInterface::PorosityModelResultType m_porosityModel; - - std::vector m_timeHistoryValues; + static QString geometrySelectionText(RigEclipseCaseData* eclipseCaseData, size_t m_gridIndex, size_t m_cellIndex); + static std::vector timeHistoryValues(RigEclipseCaseData* eclipseCaseData, RimEclipseResultDefinition* resultDefinition, size_t gridIndex, size_t cellIndex, size_t timeStepCount); }; diff --git a/ApplicationCode/ReservoirDataModel/RigWellLogCurveData.cpp b/ApplicationCode/ReservoirDataModel/RigWellLogCurveData.cpp index 365d5ce437..545d2f7bda 100644 --- a/ApplicationCode/ReservoirDataModel/RigWellLogCurveData.cpp +++ b/ApplicationCode/ReservoirDataModel/RigWellLogCurveData.cpp @@ -186,14 +186,13 @@ cvf::ref RigWellLogCurveData::calculateResampledCurveData(d bool isTvDepthsAvailable = false; std::vector tvDepths; - size_t segmentStartIdx = 0; - if (m_tvDepths.size() > 0) isTvDepthsAvailable = true; if(m_measuredDepths.size() > 0) { double currentMd = m_measuredDepths[0]; + size_t segmentStartIdx = 0; while(segmentStartIdx < m_measuredDepths.size() - 1) { double segmentStartMd = m_measuredDepths[segmentStartIdx]; diff --git a/ApplicationCode/ReservoirDataModel/RigWellLogExtractor.cpp b/ApplicationCode/ReservoirDataModel/RigWellLogExtractor.cpp index 8786191416..8475aefc88 100644 --- a/ApplicationCode/ReservoirDataModel/RigWellLogExtractor.cpp +++ b/ApplicationCode/ReservoirDataModel/RigWellLogExtractor.cpp @@ -20,6 +20,7 @@ #include "RigWellLogExtractor.h" #include "RigWellPath.h" #include "cvfTrace.h" +#include "RiaLogging.h" //-------------------------------------------------------------------------------------------------- /// @@ -202,7 +203,7 @@ void RigWellLogExtractor::populateReturnArrays(std::mapfirst.measuredDepth))); + RiaLogging::warning(QString("Well Log Extraction : ") + QString::fromStdString(m_wellCaseErrorMsgName) + (" Discards a point at MD: ") + QString::number((double)(it1->first.measuredDepth))); // Found that 8 to 10 is not connected, after finding 7 to 9 it1 = it21; // Discard 8 by Jumping to 10 @@ -211,7 +212,7 @@ void RigWellLogExtractor::populateReturnArrays(std::mapfirst.measuredDepth))); + RiaLogging::warning(QString("Well Log Extraction : ") + QString::fromStdString(m_wellCaseErrorMsgName) + (" Discards a point at MD: ") + QString::number((double)(it1->first.measuredDepth))); // Found that 10 to 11 is not connected, and not 10 to 12 either ++it1; // Discard 10 and jump to 11 and hope that recovers us diff --git a/ApplicationCode/ReservoirDataModel/RigWellLogFile.cpp b/ApplicationCode/ReservoirDataModel/RigWellLogFile.cpp index 76f78734e9..6c89a5a1b5 100644 --- a/ApplicationCode/ReservoirDataModel/RigWellLogFile.cpp +++ b/ApplicationCode/ReservoirDataModel/RigWellLogFile.cpp @@ -19,6 +19,8 @@ #include "RigWellLogFile.h" +#include "RigWellLogCurveData.h" + #include "RimWellLogCurve.h" #include "well.hpp" @@ -228,6 +230,11 @@ QString RigWellLogFile::wellLogChannelUnitString(const QString& wellLogChannelNa { return "FT"; } + else if (displayDepthUnit == RimDefines::UNIT_NONE) + { + CVF_ASSERT(false); + return ""; + } } } @@ -279,7 +286,11 @@ bool RigWellLogFile::exportToLasFile(const RimWellLogCurve* curve, const QString else if (curveData->depthUnit() == RimDefines::UNIT_FEET) { lasFile.AddLog("DEPTH", "FT", "Depth in feet", curveData->measuredDepths()); - + } + else if (curveData->depthUnit() == RimDefines::UNIT_NONE) + { + CVF_ASSERT(false); + lasFile.AddLog("DEPTH", "", "Depth in connection number", curveData->measuredDepths()); } if(curveData->tvDepths().size()) @@ -305,6 +316,11 @@ bool RigWellLogFile::exportToLasFile(const RimWellLogCurve* curve, const QString { lasFile.setDepthUnit("FT"); } + else if ( curveData->depthUnit() == RimDefines::UNIT_NONE ) + { + CVF_ASSERT(false); + lasFile.setDepthUnit(""); + } lasFile.setVersionInfo("2.0"); diff --git a/ApplicationCode/ReservoirDataModel/cvfGeometryTools.h b/ApplicationCode/ReservoirDataModel/cvfGeometryTools.h index 2a7b730af0..8722f13259 100644 --- a/ApplicationCode/ReservoirDataModel/cvfGeometryTools.h +++ b/ApplicationCode/ReservoirDataModel/cvfGeometryTools.h @@ -104,7 +104,7 @@ class GeometryTools ArrayWrapperConst completeFacePolygon, const cvf::Vec3d& faceNormal, const std::vector< std::vector* >& faceOverlapPolygons, - const std::vector faceOverlapPolygonWindingSameAsCubeFaceFlags, + const std::vector& faceOverlapPolygonWindingSameAsCubeFaceFlags, std::vector* partialFacePolygon, bool* m_partiallyFreeCubeFaceHasHoles); }; diff --git a/ApplicationCode/ReservoirDataModel/cvfGeometryTools.inl b/ApplicationCode/ReservoirDataModel/cvfGeometryTools.inl index 8a27e4ba5d..c11664e743 100644 --- a/ApplicationCode/ReservoirDataModel/cvfGeometryTools.inl +++ b/ApplicationCode/ReservoirDataModel/cvfGeometryTools.inl @@ -245,14 +245,12 @@ bool GeometryTools::calculateOverlapPolygonOfTwoQuads(std::vector * p for (cv1Idx = 0 ; cv1Idx < 4 ; ++cv1Idx) { - bool found = false; for (cv2Idx = 0; cv2Idx < 4; ++cv2Idx) { if (cv1CubeFaceIndices[cv1Idx] == cv2CubeFaceIndices[cv2Idx]) { cv1VxTouchCv2[cv1Idx] = true; cv2VxTouchCv1[cv2Idx] = true; - found = true; ++numMatchedNodes; continue; } @@ -577,7 +575,7 @@ void GeometryTools::calculatePartiallyFreeCubeFacePolygon(ArrayWrapperConst completeFacePolygon, const cvf::Vec3d& faceNormal, const std::vector< std::vector* >& faceOverlapPolygons, - const std::vector faceOverlapPolygonWindingSameAsCubeFaceFlags, + const std::vector& faceOverlapPolygonWindingSameAsCubeFaceFlags, std::vector* partialFacePolygon, bool* m_partiallyFreeCubeFaceHasHoles) { diff --git a/ApplicationCode/Resources/Cases16x16.png b/ApplicationCode/Resources/Cases16x16.png index 843e4d95a5..00ea6279d0 100644 Binary files a/ApplicationCode/Resources/Cases16x16.png and b/ApplicationCode/Resources/Cases16x16.png differ diff --git a/ApplicationCode/Resources/GeoMechCases48x48.png b/ApplicationCode/Resources/GeoMechCases48x48.png index c27dd63b30..6711bfad3f 100644 Binary files a/ApplicationCode/Resources/GeoMechCases48x48.png and b/ApplicationCode/Resources/GeoMechCases48x48.png differ diff --git a/ApplicationCode/Resources/ResInsight.qrc b/ApplicationCode/Resources/ResInsight.qrc index 4e9ac12226..22b393629a 100644 --- a/ApplicationCode/Resources/ResInsight.qrc +++ b/ApplicationCode/Resources/ResInsight.qrc @@ -80,6 +80,12 @@ RightAxis16x16.png BottomAxis16x16.png Axes16x16.png + WellAllocPlots16x16.png + WellAllocPlot16x16.png + WellFlowPlot16x16.png + WellAllocPie16x16.png + WellAllocLegend16x16.png + SummaryPlotLight16x16.png fs_CellFace.glsl diff --git a/ApplicationCode/Resources/SummaryPlotLight16x16.png b/ApplicationCode/Resources/SummaryPlotLight16x16.png new file mode 100644 index 0000000000..a4ca2ce006 Binary files /dev/null and b/ApplicationCode/Resources/SummaryPlotLight16x16.png differ diff --git a/ApplicationCode/Resources/SummaryPlots16x16.png b/ApplicationCode/Resources/SummaryPlots16x16.png index bce6e9eeff..0bc430143b 100644 Binary files a/ApplicationCode/Resources/SummaryPlots16x16.png and b/ApplicationCode/Resources/SummaryPlots16x16.png differ diff --git a/ApplicationCode/Resources/WellAllocLegend16x16.png b/ApplicationCode/Resources/WellAllocLegend16x16.png new file mode 100644 index 0000000000..58cbe6955a Binary files /dev/null and b/ApplicationCode/Resources/WellAllocLegend16x16.png differ diff --git a/ApplicationCode/Resources/WellAllocPie16x16.png b/ApplicationCode/Resources/WellAllocPie16x16.png new file mode 100644 index 0000000000..c3bfced5d3 Binary files /dev/null and b/ApplicationCode/Resources/WellAllocPie16x16.png differ diff --git a/ApplicationCode/Resources/WellAllocPlot16x16.png b/ApplicationCode/Resources/WellAllocPlot16x16.png new file mode 100644 index 0000000000..05d0c29aad Binary files /dev/null and b/ApplicationCode/Resources/WellAllocPlot16x16.png differ diff --git a/ApplicationCode/Resources/WellAllocPlots16x16.png b/ApplicationCode/Resources/WellAllocPlots16x16.png new file mode 100644 index 0000000000..5740466504 Binary files /dev/null and b/ApplicationCode/Resources/WellAllocPlots16x16.png differ diff --git a/ApplicationCode/Resources/WellFlowPlot16x16.png b/ApplicationCode/Resources/WellFlowPlot16x16.png new file mode 100644 index 0000000000..a2dc854f6d Binary files /dev/null and b/ApplicationCode/Resources/WellFlowPlot16x16.png differ diff --git a/ApplicationCode/Resources/WellLogPlots16x16.png b/ApplicationCode/Resources/WellLogPlots16x16.png index 71d60aa85c..53008463b9 100644 Binary files a/ApplicationCode/Resources/WellLogPlots16x16.png and b/ApplicationCode/Resources/WellLogPlots16x16.png differ diff --git a/ApplicationCode/ResultStatisticsCache/RigStatisticsDataCache.cpp b/ApplicationCode/ResultStatisticsCache/RigStatisticsDataCache.cpp index 73cf73a540..1becf85281 100644 --- a/ApplicationCode/ResultStatisticsCache/RigStatisticsDataCache.cpp +++ b/ApplicationCode/ResultStatisticsCache/RigStatisticsDataCache.cpp @@ -262,7 +262,17 @@ const std::vector& RigStatisticsDataCache::uniqueCellScalarValues() { computeUniqueValuesIfNeeded(); - return m_uniqueValues; + return m_statsAllTimesteps.m_uniqueValues; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const std::vector& RigStatisticsDataCache::uniqueCellScalarValues(size_t timeStepIndex) +{ + computeUniqueValuesIfNeeded(timeStepIndex); + + return m_statsPrTs[timeStepIndex].m_uniqueValues; } //-------------------------------------------------------------------------------------------------- @@ -334,15 +344,31 @@ void RigStatisticsDataCache::computeHistogramStatisticsIfNeeded(size_t timeStepI //-------------------------------------------------------------------------------------------------- void RigStatisticsDataCache::computeUniqueValuesIfNeeded() { - if (m_uniqueValues.size() == 0) + if (m_statsAllTimesteps.m_uniqueValues.size() == 0) { std::set setValues; - m_statisticsCalculator->uniqueValues(0, setValues); + m_statisticsCalculator->uniqueValues(0, setValues); // This is a Hack ! Only using first timestep. Ok for Static eclipse results but beware ! for (auto val : setValues) { - m_uniqueValues.push_back(val); + m_statsAllTimesteps.m_uniqueValues.push_back(val); } } } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigStatisticsDataCache::computeUniqueValuesIfNeeded(size_t timeStepIndex) +{ + if ( m_statsPrTs[timeStepIndex].m_uniqueValues.size() == 0 ) + { + std::set setValues; + m_statisticsCalculator->uniqueValues(timeStepIndex, setValues); + + for ( auto val : setValues ) + { + m_statsPrTs[timeStepIndex].m_uniqueValues.push_back(val); + } + } +} diff --git a/ApplicationCode/ResultStatisticsCache/RigStatisticsDataCache.h b/ApplicationCode/ResultStatisticsCache/RigStatisticsDataCache.h index e35a60f578..6edcf999eb 100644 --- a/ApplicationCode/ResultStatisticsCache/RigStatisticsDataCache.h +++ b/ApplicationCode/ResultStatisticsCache/RigStatisticsDataCache.h @@ -33,7 +33,7 @@ class RigStatisticsDataCache : public cvf::Object { public: - RigStatisticsDataCache(RigStatisticsCalculator* statisticsCalculator); + explicit RigStatisticsDataCache(RigStatisticsCalculator* statisticsCalculator); void clearAllStatistics(); @@ -56,12 +56,14 @@ class RigStatisticsDataCache : public cvf::Object const std::vector& cellScalarValuesHistogram(size_t timeStepIndex); const std::vector& uniqueCellScalarValues(); + const std::vector& uniqueCellScalarValues(size_t timeStepIndex); private: void computeHistogramStatisticsIfNeeded(); void computeHistogramStatisticsIfNeeded(size_t timeStepIndex); void computeUniqueValuesIfNeeded(); + void computeUniqueValuesIfNeeded(size_t timeStepIndex); private: struct StatisticsValues @@ -100,11 +102,12 @@ class RigStatisticsDataCache : public cvf::Object bool m_isValueSumCalculated; std::vector m_histogram; + std::vector m_uniqueValues; }; StatisticsValues m_statsAllTimesteps; std::vector m_statsPrTs; - std::vector m_uniqueValues; + cvf::ref m_statisticsCalculator; }; diff --git a/ApplicationCode/ResultStatisticsCache/RigStatisticsMath.h b/ApplicationCode/ResultStatisticsCache/RigStatisticsMath.h index 7c299b380a..34079596a0 100644 --- a/ApplicationCode/ResultStatisticsCache/RigStatisticsMath.h +++ b/ApplicationCode/ResultStatisticsCache/RigStatisticsMath.h @@ -62,7 +62,24 @@ class RigHistogramCalculator class MinMaxAccumulator { public: - MinMaxAccumulator(double initMin, double initMax): max(initMax), min(initMin) {} + MinMaxAccumulator(double initMin = -HUGE_VAL, double initMax = HUGE_VAL): max(initMax), min(initMin) {} + + void addData(const std::vector& values) + { + for ( double val : values ) + { + addValue(val); + } + } + + void addData(const std::vector& values) + { + for ( float val : values ) + { + addValue(val); + } + } + void addValue(double value) { if (value == HUGE_VAL) // TODO @@ -89,7 +106,24 @@ class MinMaxAccumulator class PosNegAccumulator { public: - PosNegAccumulator(double initPos, double initNeg): pos(initPos), neg(initNeg) {} + PosNegAccumulator(double initPos = HUGE_VAL, double initNeg = -HUGE_VAL): pos(initPos), neg(initNeg) {} + + void addData(const std::vector& values) + { + for (double val : values) + { + addValue(val); + } + } + + void addData(const std::vector& values) + { + for ( float val : values ) + { + addValue(val); + } + } + void addValue(double value) { if (value == HUGE_VAL) @@ -116,7 +150,23 @@ class PosNegAccumulator class SumCountAccumulator { public: - SumCountAccumulator(double initSum, size_t initCount): valueSum(initSum), sampleCount(initCount) {} + SumCountAccumulator(double initSum = 0.0, size_t initCount = 0): valueSum(initSum), sampleCount(initCount) {} + + void addData(const std::vector& values) + { + for ( double val : values ) + { + addValue(val); + } + } + + void addData(const std::vector& values) + { + for ( float val : values ) + { + addValue(val); + } + } void addValue(double value) { @@ -140,6 +190,22 @@ class UniqueValueAccumulator UniqueValueAccumulator() {} + void addData(const std::vector& values) + { + for ( double val : values ) + { + addValue(val); + } + } + + void addData(const std::vector& values) + { + for ( float val : values ) + { + addValue(val); + } + } + void addValue(double value) { uniqueValues.insert(static_cast(value)); diff --git a/ApplicationCode/RiaMain.cpp b/ApplicationCode/RiaMain.cpp index d14d0dd18a..b694888f39 100644 --- a/ApplicationCode/RiaMain.cpp +++ b/ApplicationCode/RiaMain.cpp @@ -17,10 +17,15 @@ ///////////////////////////////////////////////////////////////////////////////// #include "RiaApplication.h" +#include "RiaLogging.h" + #include "RiuMainWindow.h" +#include "RiuMessagePanel.h" int main(int argc, char *argv[]) { + RiaLogging::loggerInstance()->setLevel(RI_LL_DEBUG); + RiaApplication app(argc, argv); QLocale::setDefault(QLocale(QLocale::English, QLocale::UnitedStates)); @@ -39,11 +44,19 @@ int main(int argc, char *argv[]) window.loadWinGeoAndDockToolBarLayout(); window.showWindow(); + RiaLogging::setLoggerInstance(new RiuMessagePanelLogger(window.messagePanel())); + RiaLogging::loggerInstance()->setLevel(RI_LL_DEBUG); + if (app.parseArguments()) { - return app.exec(); + int exitCode = app.exec(); + RiaLogging::deleteLoggerInstance(); + + return exitCode; } + RiaLogging::deleteLoggerInstance(); + return 0; } diff --git a/ApplicationCode/SocketInterface/RiaCaseInfoCommands.cpp b/ApplicationCode/SocketInterface/RiaCaseInfoCommands.cpp index 768df7361e..3d998de20c 100644 --- a/ApplicationCode/SocketInterface/RiaCaseInfoCommands.cpp +++ b/ApplicationCode/SocketInterface/RiaCaseInfoCommands.cpp @@ -19,23 +19,26 @@ ///////////////////////////////////////////////////////////////////////////////// #include "RiaSocketCommand.h" + #include "RiaSocketServer.h" #include "RiaSocketTools.h" #include "RiaApplication.h" #include "RiaPreferences.h" -#include "RimEclipseView.h" -#include "RimEclipseCellColors.h" +#include "RigActiveCellInfo.h" +#include "RigCaseCellResultsData.h" +#include "RigEclipseCaseData.h" +#include "RigMainGrid.h" + +#include "Rim3dOverlayInfoConfig.h" #include "RimCellEdgeColors.h" #include "RimCellRangeFilterCollection.h" +#include "RimEclipseCase.h" +#include "RimEclipseCellColors.h" #include "RimEclipsePropertyFilterCollection.h" +#include "RimEclipseView.h" #include "RimEclipseWellCollection.h" -#include "Rim3dOverlayInfoConfig.h" #include "RimReservoirCellResultsStorage.h" -#include "RimEclipseCase.h" - -#include "RigCaseData.h" -#include "RigCaseCellResultsData.h" #include @@ -62,11 +65,11 @@ class RiaGetMainGridDimensions: public RiaSocketCommand size_t jCount = 0; size_t kCount = 0; - if (rimCase && rimCase->reservoirData() && rimCase->reservoirData()->mainGrid()) + if (rimCase && rimCase->eclipseCaseData() && rimCase->eclipseCaseData()->mainGrid()) { - iCount = rimCase->reservoirData()->mainGrid()->cellCountI(); - jCount = rimCase->reservoirData()->mainGrid()->cellCountJ(); - kCount = rimCase->reservoirData()->mainGrid()->cellCountK(); + iCount = rimCase->eclipseCaseData()->mainGrid()->cellCountI(); + jCount = rimCase->eclipseCaseData()->mainGrid()->cellCountJ(); + kCount = rimCase->eclipseCaseData()->mainGrid()->cellCountK(); } socketStream << (quint64)iCount << (quint64)jCount << (quint64)kCount; @@ -106,7 +109,7 @@ class RiaGetActiveCellInfo: public RiaSocketCommand // Write data back to octave: columnCount, bytesPrTimestep, GridNr I J K ParentGridNr PI PJ PK CoarseBoxIdx caf::FixedArray, 9> activeCellInfo; - if (!(rimCase && rimCase->reservoirData() && rimCase->reservoirData()->mainGrid()) ) + if (!(rimCase && rimCase->eclipseCaseData() && rimCase->eclipseCaseData()->mainGrid()) ) { // No data available socketStream << (quint64)0 << (quint64)0 ; @@ -153,12 +156,12 @@ class RiaGetActiveCellInfo: public RiaSocketCommand hostCellK.clear(); globalCoarseningBoxIdx.clear(); - if (!reservoirCase || !reservoirCase->reservoirData() || !reservoirCase->reservoirData()->mainGrid()) + if (!reservoirCase || !reservoirCase->eclipseCaseData() || !reservoirCase->eclipseCaseData()->mainGrid()) { return; } - RigActiveCellInfo* actCellInfo = reservoirCase->reservoirData()->activeCellInfo(porosityModel); + RigActiveCellInfo* actCellInfo = reservoirCase->eclipseCaseData()->activeCellInfo(porosityModel); size_t numMatrixModelActiveCells = actCellInfo->reservoirActiveCellCount(); gridNumber.reserve(numMatrixModelActiveCells); @@ -171,18 +174,18 @@ class RiaGetActiveCellInfo: public RiaSocketCommand hostCellK.reserve(numMatrixModelActiveCells); globalCoarseningBoxIdx.reserve(numMatrixModelActiveCells); - const std::vector& reservoirCells = reservoirCase->reservoirData()->mainGrid()->globalCellArray(); + const std::vector& reservoirCells = reservoirCase->eclipseCaseData()->mainGrid()->globalCellArray(); std::vector globalCoarseningBoxIndexStart; { size_t globalCoarseningBoxCount = 0; - for (size_t gridIdx = 0; gridIdx < reservoirCase->reservoirData()->gridCount(); gridIdx++) + for (size_t gridIdx = 0; gridIdx < reservoirCase->eclipseCaseData()->gridCount(); gridIdx++) { globalCoarseningBoxIndexStart.push_back(globalCoarseningBoxCount); - RigGridBase* grid = reservoirCase->reservoirData()->grid(gridIdx); + RigGridBase* grid = reservoirCase->eclipseCaseData()->grid(gridIdx); size_t localCoarseningBoxCount = grid->coarseningBoxCount(); globalCoarseningBoxCount += localCoarseningBoxCount; @@ -267,7 +270,7 @@ class RiaGetCoarseningInfo : public RiaSocketCommand } RimEclipseCase* rimCase = server->findReservoir(argCaseGroupId); - if (!rimCase || !rimCase->reservoirData() || !rimCase->reservoirData()->mainGrid()) + if (!rimCase || !rimCase->eclipseCaseData() || !rimCase->eclipseCaseData()->mainGrid()) { quint64 byteCount = 0; @@ -278,13 +281,13 @@ class RiaGetCoarseningInfo : public RiaSocketCommand // Write data back to octave: I1, I2, J1, J2, K1, K2 for all coarsening boxes - if (rimCase && rimCase->reservoirData() && rimCase->reservoirData()->mainGrid()) + if (rimCase && rimCase->eclipseCaseData() && rimCase->eclipseCaseData()->mainGrid()) { size_t globalCoarseningBoxCount = 0; - for (size_t gridIdx = 0; gridIdx < rimCase->reservoirData()->gridCount(); gridIdx++) + for (size_t gridIdx = 0; gridIdx < rimCase->eclipseCaseData()->gridCount(); gridIdx++) { - RigGridBase* grid = rimCase->reservoirData()->grid(gridIdx); + RigGridBase* grid = rimCase->eclipseCaseData()->grid(gridIdx); size_t localCoarseningBoxCount = grid->coarseningBoxCount(); globalCoarseningBoxCount += localCoarseningBoxCount; @@ -293,9 +296,9 @@ class RiaGetCoarseningInfo : public RiaSocketCommand quint64 byteCount = globalCoarseningBoxCount * 6 * sizeof(qint32); socketStream << byteCount; - for (size_t gridIdx = 0; gridIdx < rimCase->reservoirData()->gridCount(); gridIdx++) + for (size_t gridIdx = 0; gridIdx < rimCase->eclipseCaseData()->gridCount(); gridIdx++) { - RigGridBase* grid = rimCase->reservoirData()->grid(gridIdx); + RigGridBase* grid = rimCase->eclipseCaseData()->grid(gridIdx); size_t localCoarseningBoxCount = grid->coarseningBoxCount(); for (size_t boxIdx = 0; boxIdx < localCoarseningBoxCount; boxIdx++) @@ -339,7 +342,7 @@ class RiaGetGridDimensions : public RiaSocketCommand } RimEclipseCase* rimCase = server->findReservoir(argCaseGroupId); - if (!rimCase || !rimCase->reservoirData() || !rimCase->reservoirData()->mainGrid()) + if (!rimCase || !rimCase->eclipseCaseData() || !rimCase->eclipseCaseData()->mainGrid()) { quint64 byteCount = 0; @@ -351,10 +354,10 @@ class RiaGetGridDimensions : public RiaSocketCommand // Write data back to octave: I, J, K dimensions - if (rimCase && rimCase->reservoirData() && rimCase->reservoirData()->mainGrid()) + if (rimCase && rimCase->eclipseCaseData() && rimCase->eclipseCaseData()->mainGrid()) { std::vector grids; - rimCase->reservoirData()->allGrids(&grids); + rimCase->eclipseCaseData()->allGrids(&grids); quint64 byteCount = grids.size() * 3 * sizeof(quint64); socketStream << byteCount; @@ -401,15 +404,15 @@ class RiaGetTimeStepDates : public RiaSocketCommand bool canFetchData = true; - if (!rimCase || !rimCase->reservoirData()) + if (!rimCase || !rimCase->eclipseCaseData()) { canFetchData = false; } size_t scalarIndexWithMaxTimeStepCount = cvf::UNDEFINED_SIZE_T; - if (rimCase && rimCase->reservoirData()) + if (rimCase && rimCase->eclipseCaseData()) { - rimCase->reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)->maxTimeStepCount(&scalarIndexWithMaxTimeStepCount); + rimCase->eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)->maxTimeStepCount(&scalarIndexWithMaxTimeStepCount); if (scalarIndexWithMaxTimeStepCount == cvf::UNDEFINED_SIZE_T) { canFetchData = false; @@ -428,7 +431,7 @@ class RiaGetTimeStepDates : public RiaSocketCommand return true; } - std::vector timeStepDates = rimCase->reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)->timeStepDates(scalarIndexWithMaxTimeStepCount); + std::vector timeStepDates = rimCase->eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)->timeStepDates(scalarIndexWithMaxTimeStepCount); quint64 timeStepCount = timeStepDates.size(); quint64 byteCount = sizeof(quint64) + 6 * timeStepCount * sizeof(qint32); @@ -488,15 +491,15 @@ class RiaGetTimeStepDays : public RiaSocketCommand bool canFetchData = true; - if (!rimCase || !rimCase->reservoirData()) + if (!rimCase || !rimCase->eclipseCaseData()) { canFetchData = false; } size_t scalarIndexWithMaxTimeStepCount = cvf::UNDEFINED_SIZE_T; - if (rimCase && rimCase->reservoirData()) + if (rimCase && rimCase->eclipseCaseData()) { - rimCase->reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)->maxTimeStepCount(&scalarIndexWithMaxTimeStepCount); + rimCase->eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)->maxTimeStepCount(&scalarIndexWithMaxTimeStepCount); if (scalarIndexWithMaxTimeStepCount == cvf::UNDEFINED_SIZE_T) { canFetchData = false; @@ -515,26 +518,17 @@ class RiaGetTimeStepDays : public RiaSocketCommand return true; } - std::vector timeStepDates = rimCase->reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)->timeStepDates(scalarIndexWithMaxTimeStepCount); + std::vector daysSinceSimulationStart = rimCase->eclipseCaseData()->results(RifReaderInterface::MATRIX_RESULTS)->daysSinceSimulationStart(scalarIndexWithMaxTimeStepCount); - quint64 timeStepCount = timeStepDates.size(); + quint64 timeStepCount = daysSinceSimulationStart.size(); quint64 byteCount = sizeof(quint64) + timeStepCount * sizeof(qint32); socketStream << byteCount; socketStream << timeStepCount; - if (timeStepCount > 0) + for (double day : daysSinceSimulationStart) { - double secondsInADay = 24 * 60 * 60; - - for (size_t i = 0; i < timeStepCount; i++) - { - double secondsDiff = timeStepDates[0].secsTo(timeStepDates[i]); - - double decimalDaysDiff = secondsDiff / secondsInADay; - - socketStream << decimalDaysDiff; - } + socketStream << day; } return true; diff --git a/ApplicationCode/SocketInterface/RiaGeometryCommands.cpp b/ApplicationCode/SocketInterface/RiaGeometryCommands.cpp index 0d52a47e0a..096b41332a 100644 --- a/ApplicationCode/SocketInterface/RiaGeometryCommands.cpp +++ b/ApplicationCode/SocketInterface/RiaGeometryCommands.cpp @@ -19,27 +19,53 @@ ///////////////////////////////////////////////////////////////////////////////// #include "RiaSocketCommand.h" + +#include "RiaApplication.h" +#include "RiaPreferences.h" #include "RiaSocketServer.h" #include "RiaSocketTools.h" -#include "RimEclipseView.h" -#include "RimEclipseCellColors.h" +#include "RigActiveCellInfo.h" +#include "RigCaseCellResultsData.h" +#include "RigEclipseCaseData.h" +#include "RigMainGrid.h" + +#include "Rim3dOverlayInfoConfig.h" #include "RimCellEdgeColors.h" #include "RimCellRangeFilterCollection.h" +#include "RimEclipseCase.h" +#include "RimEclipseCellColors.h" #include "RimEclipsePropertyFilterCollection.h" +#include "RimEclipseView.h" #include "RimEclipseWellCollection.h" -#include "Rim3dOverlayInfoConfig.h" #include "RimReservoirCellResultsStorage.h" -#include "RimEclipseCase.h" -#include "RigCaseData.h" -#include "RigCaseCellResultsData.h" - #include -#include "RiaApplication.h" -#include "RiaPreferences.h" +//-------------------------------------------------------------------------------------------------- +/// Convert internal ResInsight representation of cells with negative depth to positive depth. +//-------------------------------------------------------------------------------------------------- +static inline void convertVec3dToPositiveDepth(cvf::Vec3d* vec) +{ + double& z = vec->z(); + z *= -1; +} +//-------------------------------------------------------------------------------------------------- +/// Retrieve a cell corner where the depth is represented as negative converted to positive depth. +//-------------------------------------------------------------------------------------------------- +static inline double getCellCornerWithPositiveDepth(const cvf::Vec3d *cornerVerts, size_t cornerIndexMapping, int coordIdx) +{ + if (coordIdx == 2) + { + // Z-value aka depth + return -1 * cornerVerts[cornerIndexMapping][coordIdx]; + } + else + { + return cornerVerts[cornerIndexMapping][coordIdx]; + } +} //-------------------------------------------------------------------------------------------------- /// @@ -54,14 +80,14 @@ class RiaGetCellCenters : public RiaSocketCommand RimEclipseCase* rimCase = RiaSocketTools::findCaseFromArgs(server, args); size_t argGridIndex = args[2].toUInt(); - if (!rimCase || !rimCase->reservoirData() || (argGridIndex >= rimCase->reservoirData()->gridCount()) ) + if (!rimCase || !rimCase->eclipseCaseData() || (argGridIndex >= rimCase->eclipseCaseData()->gridCount()) ) { // No data available socketStream << (quint64)0 << (quint64)0 << (quint64)0 << (quint64)0 << (quint64)0; return true; } - RigGridBase* rigGrid = rimCase->reservoirData()->grid(argGridIndex); + RigGridBase* rigGrid = rimCase->eclipseCaseData()->grid(argGridIndex); quint64 cellCount = (quint64)rigGrid->cellCount(); quint64 cellCountI = (quint64)rigGrid->cellCountI(); @@ -105,6 +131,8 @@ class RiaGetCellCenters : public RiaSocketCommand size_t gridLocalCellIndex = rigGrid->cellIndexFromIJK(i, j, k); cvf::Vec3d center = rigGrid->cell(gridLocalCellIndex).center(); + convertVec3dToPositiveDepth(¢er); + doubleValues[valueIndex++] = center[coordIdx]; } } @@ -143,15 +171,15 @@ class RiaGetActiveCellCenters : public RiaSocketCommand porosityModelEnum = RifReaderInterface::FRACTURE_RESULTS; } - if (!rimCase || !rimCase->reservoirData()) + if (!rimCase || !rimCase->eclipseCaseData()) { // No data available socketStream << (quint64)0 << (quint64)0 ; return true; } - RigActiveCellInfo* actCellInfo = rimCase->reservoirData()->activeCellInfo(porosityModelEnum); - RigMainGrid* mainGrid = rimCase->reservoirData()->mainGrid(); + RigActiveCellInfo* actCellInfo = rimCase->eclipseCaseData()->activeCellInfo(porosityModelEnum); + RigMainGrid* mainGrid = rimCase->eclipseCaseData()->mainGrid(); size_t activeCellCount = actCellInfo->reservoirActiveCellCount(); size_t doubleValueCount = activeCellCount * 3; @@ -184,6 +212,8 @@ class RiaGetActiveCellCenters : public RiaSocketCommand cvf::Vec3d center = mainGrid->globalCellArray()[reservoirCellIndex].center(); + convertVec3dToPositiveDepth(¢er); + doubleValues[valueIndex++] = center[coordIdx]; } @@ -215,14 +245,14 @@ class RiaGetCellCorners : public RiaSocketCommand RimEclipseCase* rimCase = RiaSocketTools::findCaseFromArgs(server, args); size_t argGridIndex = args[2].toUInt(); - if (!rimCase || !rimCase->reservoirData() || (argGridIndex >= rimCase->reservoirData()->gridCount()) ) + if (!rimCase || !rimCase->eclipseCaseData() || (argGridIndex >= rimCase->eclipseCaseData()->gridCount()) ) { // No data available socketStream << (quint64)0 << (quint64)0 << (quint64)0 << (quint64)0 << (quint64)0; return true; } - RigGridBase* rigGrid = rimCase->reservoirData()->grid(argGridIndex); + RigGridBase* rigGrid = rimCase->eclipseCaseData()->grid(argGridIndex); quint64 cellCount = (quint64)rigGrid->cellCount(); quint64 cellCountI = (quint64)rigGrid->cellCountI(); @@ -272,7 +302,7 @@ class RiaGetCellCorners : public RiaSocketCommand size_t gridLocalCellIndex = rigGrid->cellIndexFromIJK(i, j, k); rigGrid->cellCornerVertices(gridLocalCellIndex, cornerVerts); - doubleValues[valueIndex++] = cornerVerts[cornerIndexMapping][coordIdx]; + doubleValues[valueIndex++] = getCellCornerWithPositiveDepth(cornerVerts, cornerIndexMapping, coordIdx); } } } @@ -312,15 +342,15 @@ class RiaGetActiveCellCorners : public RiaSocketCommand porosityModelEnum = RifReaderInterface::FRACTURE_RESULTS; } - if (!rimCase || !rimCase->reservoirData() ) + if (!rimCase || !rimCase->eclipseCaseData() ) { // No data available socketStream << (quint64)0 << (quint64)0 ; return true; } - RigActiveCellInfo* actCellInfo = rimCase->reservoirData()->activeCellInfo(porosityModelEnum); - RigMainGrid* mainGrid = rimCase->reservoirData()->mainGrid(); + RigActiveCellInfo* actCellInfo = rimCase->eclipseCaseData()->activeCellInfo(porosityModelEnum); + RigMainGrid* mainGrid = rimCase->eclipseCaseData()->mainGrid(); size_t activeCellCount = actCellInfo->reservoirActiveCellCount(); size_t doubleValueCount = activeCellCount * 3 * 8; @@ -358,7 +388,7 @@ class RiaGetActiveCellCorners : public RiaSocketCommand mainGrid->cellCornerVertices(reservoirCellIndex, cornerVerts); - doubleValues[valueIndex++] = cornerVerts[cornerIndexMapping][coordIdx]; + doubleValues[valueIndex++] = getCellCornerWithPositiveDepth(cornerVerts, cornerIndexMapping, coordIdx); } CVF_ASSERT(valueIndex == activeCellCount); diff --git a/ApplicationCode/SocketInterface/RiaProjectInfoCommands.cpp b/ApplicationCode/SocketInterface/RiaProjectInfoCommands.cpp index c4ab077840..42e3cb62b1 100644 --- a/ApplicationCode/SocketInterface/RiaProjectInfoCommands.cpp +++ b/ApplicationCode/SocketInterface/RiaProjectInfoCommands.cpp @@ -19,29 +19,29 @@ ///////////////////////////////////////////////////////////////////////////////// #include "RiaSocketCommand.h" + +#include "RiaApplication.h" #include "RiaSocketServer.h" #include "RiaSocketTools.h" -#include "RimEclipseView.h" -#include "RimEclipseCellColors.h" +#include "Rim3dOverlayInfoConfig.h" +#include "RimCaseCollection.h" #include "RimCellEdgeColors.h" #include "RimCellRangeFilterCollection.h" +#include "RimEclipseCase.h" +#include "RimEclipseCaseCollection.h" +#include "RimEclipseCellColors.h" #include "RimEclipsePropertyFilterCollection.h" +#include "RimEclipseView.h" #include "RimEclipseWellCollection.h" -#include "Rim3dOverlayInfoConfig.h" +#include "RimIdenticalGridCaseGroup.h" +#include "RimOilField.h" +#include "RimProject.h" #include "RimReservoirCellResultsStorage.h" +#include "RimScriptCollection.h" -#include "RimEclipseCase.h" -#include "RigCaseData.h" -#include "RigCaseCellResultsData.h" #include "RiuMainWindow.h" -#include "RiaApplication.h" -#include "RimProject.h" -#include "RimIdenticalGridCaseGroup.h" -#include "RimCaseCollection.h" -#include "RimScriptCollection.h" -#include "RimOilField.h" -#include "RimEclipseCaseCollection.h" + #include "cafSelectionManager.h" diff --git a/ApplicationCode/SocketInterface/RiaPropertyDataCommands.cpp b/ApplicationCode/SocketInterface/RiaPropertyDataCommands.cpp index d40db3aa32..5b02f12f19 100644 --- a/ApplicationCode/SocketInterface/RiaPropertyDataCommands.cpp +++ b/ApplicationCode/SocketInterface/RiaPropertyDataCommands.cpp @@ -24,18 +24,19 @@ #include "RiaSocketTools.h" #include "RigCaseCellResultsData.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" +#include "RigMainGrid.h" #include "RigResultAccessor.h" #include "RigResultAccessorFactory.h" #include "RigResultModifier.h" #include "RigResultModifierFactory.h" -#include "RimEclipseCase.h" #include "RimEclipseCase.h" #include "RimEclipseCellColors.h" #include "RimEclipseInputCase.h" #include "RimEclipseInputProperty.h" #include "RimEclipseInputPropertyCollection.h" +#include "RimEclipseView.h" #include "RimReservoirCellResultsStorage.h" #include "RiuMainWindow.h" @@ -138,7 +139,7 @@ class RiaGetActiveCellProperty: public RiaSocketCommand // then the byte-size of the result values in one timestep - const RigActiveCellInfo* activeInfo = rimCase->reservoirData()->activeCellInfo(porosityModelEnum); + const RigActiveCellInfo* activeInfo = rimCase->eclipseCaseData()->activeCellInfo(porosityModelEnum); size_t timestepResultCount = activeInfo->reservoirActiveCellCount(); quint64 timestepByteCount = (quint64)(timestepResultCount*sizeof(double)); @@ -240,7 +241,7 @@ class RiaGetGridProperty: public RiaSocketCommand size_t scalarResultIndex = cvf::UNDEFINED_SIZE_T; - if (gridIdx < 0 || rimCase->reservoirData()->gridCount() <= (size_t)gridIdx) + if (gridIdx < 0 || rimCase->eclipseCaseData()->gridCount() <= (size_t)gridIdx) { server->errorMessageDialog()->showMessage("ResInsight SocketServer: riGetGridProperty : \n" "The gridIndex \"" + QString::number(gridIdx) + "\" does not point to an existing grid." ); @@ -303,7 +304,7 @@ class RiaGetGridProperty: public RiaSocketCommand } - RigGridBase* rigGrid = rimCase->reservoirData()->grid(gridIdx); + RigGridBase* rigGrid = rimCase->eclipseCaseData()->grid(gridIdx); quint64 cellCountI = (quint64)rigGrid->cellCountI(); quint64 cellCountJ = (quint64)rigGrid->cellCountJ(); @@ -320,7 +321,7 @@ class RiaGetGridProperty: public RiaSocketCommand for (size_t tsIdx = 0; tsIdx < timestepCount; tsIdx++) { - cvf::ref resultAccessor = RigResultAccessorFactory::createResultAccessor(rimCase->reservoirData(), gridIdx, porosityModelEnum, requestedTimesteps[tsIdx], propertyName); + cvf::ref resultAccessor = RigResultAccessorFactory::createFromUiResultName(rimCase->eclipseCaseData(), gridIdx, porosityModelEnum, requestedTimesteps[tsIdx], propertyName); if (resultAccessor.isNull()) { @@ -520,7 +521,7 @@ class RiaSetActiveCellProperty: public RiaSocketCommand size_t cellCountFromOctave = m_bytesPerTimeStepToRead / sizeof(double); - RigActiveCellInfo* activeCellInfo = m_currentReservoir->reservoirData()->activeCellInfo(m_porosityModelEnum); + RigActiveCellInfo* activeCellInfo = m_currentReservoir->eclipseCaseData()->activeCellInfo(m_porosityModelEnum); size_t activeCellCountReservoir = activeCellInfo->reservoirActiveCellCount(); size_t totalCellCount = activeCellInfo->reservoirCellCount(); @@ -584,7 +585,6 @@ class RiaSetActiveCellProperty: public RiaSocketCommand while ((currentClient->bytesAvailable() >= (int)m_bytesPerTimeStepToRead) && (m_currentTimeStepNumberToRead < m_timeStepCountToRead)) { - qint64 bytesRead = 0; if ( !isCoarseningActive) { internalMatrixData = m_scalarResultsToAdd->at(m_requestedTimesteps[m_currentTimeStepNumberToRead]).data(); @@ -630,8 +630,7 @@ class RiaSetActiveCellProperty: public RiaSocketCommand RimEclipseInputCase* inputRes = dynamic_cast(m_currentReservoir); if (inputRes) { - RimEclipseInputProperty* inputProperty = NULL; - inputProperty = inputRes->m_inputPropertyCollection->findInputProperty(m_currentPropertyName); + RimEclipseInputProperty* inputProperty = inputRes->m_inputPropertyCollection->findInputProperty(m_currentPropertyName); if (!inputProperty) { inputProperty = new RimEclipseInputProperty; @@ -645,8 +644,8 @@ class RiaSetActiveCellProperty: public RiaSocketCommand } if( m_currentScalarIndex != cvf::UNDEFINED_SIZE_T && - m_currentReservoir->reservoirData() && - m_currentReservoir->reservoirData()->results(m_porosityModelEnum) ) + m_currentReservoir->eclipseCaseData() && + m_currentReservoir->eclipseCaseData()->results(m_porosityModelEnum) ) { // Adjust the result data if only one time step is requested so the result behaves like a static result if (m_requestedTimesteps.size() == 1 && m_currentScalarIndex != cvf::UNDEFINED_SIZE_T) @@ -668,7 +667,7 @@ class RiaSetActiveCellProperty: public RiaSocketCommand } } - m_currentReservoir->reservoirData()->results(m_porosityModelEnum)->recalculateStatistics(m_currentScalarIndex); + m_currentReservoir->eclipseCaseData()->results(m_porosityModelEnum)->recalculateStatistics(m_currentScalarIndex); } for (size_t i = 0; i < m_currentReservoir->reservoirViews.size(); ++i) @@ -750,7 +749,7 @@ class RiaSetGridProperty : public RiaSocketCommand m_porosityModelEnum = RifReaderInterface::FRACTURE_RESULTS; } - RigGridBase* grid = rimCase->reservoirData()->grid(m_currentGridIndex); + RigGridBase* grid = rimCase->eclipseCaseData()->grid(m_currentGridIndex); if (!grid) { server->errorMessageDialog()->showMessage(RiaSocketServer::tr("ResInsight SocketServer: \n") + RiaSocketServer::tr("Could not find the grid index : %1").arg(m_currentGridIndex)); @@ -890,7 +889,7 @@ class RiaSetGridProperty : public RiaSocketCommand if (!currentClient->bytesAvailable()) return false; - RigGridBase* grid = m_currentReservoir->reservoirData()->grid(m_currentGridIndex); + RigGridBase* grid = m_currentReservoir->eclipseCaseData()->grid(m_currentGridIndex); if (!grid) { server->errorMessageDialog()->showMessage(RiaSocketServer::tr("ResInsight SocketServer: \n") + @@ -972,7 +971,7 @@ class RiaSetGridProperty : public RiaSocketCommand return true; } - cvf::ref resultModifier = RigResultModifierFactory::createResultModifier(m_currentReservoir->reservoirData(), grid->gridIndex(), m_porosityModelEnum, m_requestedTimesteps[m_currentTimeStepNumberToRead], m_currentScalarIndex); + cvf::ref resultModifier = RigResultModifierFactory::createResultModifier(m_currentReservoir->eclipseCaseData(), grid->gridIndex(), m_porosityModelEnum, m_requestedTimesteps[m_currentTimeStepNumberToRead], m_currentScalarIndex); if (!resultModifier.isNull()) { for (size_t cellIdx = 0; static_cast(cellIdx) < cellCountFromOctave; cellIdx++) @@ -994,8 +993,7 @@ class RiaSetGridProperty : public RiaSocketCommand RimEclipseInputCase* inputRes = dynamic_cast(m_currentReservoir); if (inputRes) { - RimEclipseInputProperty* inputProperty = NULL; - inputProperty = inputRes->m_inputPropertyCollection->findInputProperty(m_currentPropertyName); + RimEclipseInputProperty* inputProperty = inputRes->m_inputPropertyCollection->findInputProperty(m_currentPropertyName); if (!inputProperty) { inputProperty = new RimEclipseInputProperty; @@ -1009,8 +1007,8 @@ class RiaSetGridProperty : public RiaSocketCommand } if( m_currentScalarIndex != cvf::UNDEFINED_SIZE_T && - m_currentReservoir->reservoirData() && - m_currentReservoir->reservoirData()->results(m_porosityModelEnum) ) + m_currentReservoir->eclipseCaseData() && + m_currentReservoir->eclipseCaseData()->results(m_porosityModelEnum) ) { // Adjust the result data if only one time step is requested so the result behaves like a static result if (m_requestedTimesteps.size() == 1 && m_currentScalarIndex != cvf::UNDEFINED_SIZE_T) @@ -1032,7 +1030,7 @@ class RiaSetGridProperty : public RiaSocketCommand } } - m_currentReservoir->reservoirData()->results(m_porosityModelEnum)->recalculateStatistics(m_currentScalarIndex); + m_currentReservoir->eclipseCaseData()->results(m_porosityModelEnum)->recalculateStatistics(m_currentScalarIndex); } for (size_t i = 0; i < m_currentReservoir->reservoirViews.size(); ++i) @@ -1104,7 +1102,7 @@ class RiaGetPropertyNames : public RiaSocketCommand std::vector propNames; std::vector propTypes; - RigCaseCellResultsData* results = rimCase->reservoirData()->results(porosityModelEnum); + RigCaseCellResultsData* results = rimCase->eclipseCaseData()->results(porosityModelEnum); std::vector resTypes; std::vector resTypeNames; diff --git a/ApplicationCode/SocketInterface/RiaSocketDataTransfer.cpp b/ApplicationCode/SocketInterface/RiaSocketDataTransfer.cpp index e68e48899d..c351798b2a 100644 --- a/ApplicationCode/SocketInterface/RiaSocketDataTransfer.cpp +++ b/ApplicationCode/SocketInterface/RiaSocketDataTransfer.cpp @@ -26,7 +26,6 @@ bool RiaSocketDataTransfer::writeBlockDataToSocket(QTcpSocket* socket, const char* data, quint64 bytesToWrite, QStringList& errorMessages) { quint64 bytesWritten = 0; - int blockCount = 0; quint64 maxBlockSize = maximumValueCountInBlock() * sizeof(double); @@ -45,7 +44,6 @@ bool RiaSocketDataTransfer::writeBlockDataToSocket(QTcpSocket* socket, const cha bytesWritten += actuallyBytesWritten; - blockCount++; } return true; diff --git a/ApplicationCode/SocketInterface/RiaSocketServer.cpp b/ApplicationCode/SocketInterface/RiaSocketServer.cpp index e27a4661e6..799acd25d0 100644 --- a/ApplicationCode/SocketInterface/RiaSocketServer.cpp +++ b/ApplicationCode/SocketInterface/RiaSocketServer.cpp @@ -20,29 +20,13 @@ #include "RiaSocketServer.h" #include "RiaSocketCommand.h" -#include "RiaSocketTools.h" #include "RiaApplication.h" -#include "RigCaseCellResultsData.h" -#include "RigCaseData.h" -#include "RigGridBase.h" - -#include "Rim3dOverlayInfoConfig.h" -#include "RimCaseCollection.h" -#include "RimCellEdgeColors.h" -#include "RimCellRangeFilterCollection.h" #include "RimEclipseCase.h" -#include "RimEclipseCaseCollection.h" -#include "RimEclipseCellColors.h" -#include "RimEclipsePropertyFilterCollection.h" #include "RimEclipseView.h" -#include "RimEclipseWellCollection.h" -#include "RimIdenticalGridCaseGroup.h" -#include "RimOilField.h" #include "RimProject.h" -#include "RimReservoirCellResultsStorage.h" -#include "RimScriptCollection.h" +#include "RimCase.h" #include "RiuMainWindow.h" #include "RiuViewer.h" diff --git a/ApplicationCode/SocketInterface/RiaSocketServer.h b/ApplicationCode/SocketInterface/RiaSocketServer.h index 1a2e4659e8..0f4d0878d1 100644 --- a/ApplicationCode/SocketInterface/RiaSocketServer.h +++ b/ApplicationCode/SocketInterface/RiaSocketServer.h @@ -47,7 +47,7 @@ class RiaSocketServer : public QObject enum ReadState {ReadingCommand, ReadingPropertyData}; public: - RiaSocketServer(QObject *parent = 0); + explicit RiaSocketServer(QObject *parent = 0); ~RiaSocketServer(); unsigned short serverPort(); diff --git a/ApplicationCode/SocketInterface/RiaSocketTools.cpp b/ApplicationCode/SocketInterface/RiaSocketTools.cpp index 0378b0f3af..3ff0149142 100644 --- a/ApplicationCode/SocketInterface/RiaSocketTools.cpp +++ b/ApplicationCode/SocketInterface/RiaSocketTools.cpp @@ -39,6 +39,8 @@ #include "RimIdenticalGridCaseGroup.h" #include "RimReservoirCellResultsStorage.h" +#include "cvfTimer.h" + #include #include diff --git a/ApplicationCode/SocketInterface/RiaWellDataCommands.cpp b/ApplicationCode/SocketInterface/RiaWellDataCommands.cpp index 527032e0f7..2b2242c6ca 100644 --- a/ApplicationCode/SocketInterface/RiaWellDataCommands.cpp +++ b/ApplicationCode/SocketInterface/RiaWellDataCommands.cpp @@ -22,7 +22,8 @@ #include "RiaSocketServer.h" #include "RiaSocketTools.h" -#include "RigCaseData.h" +#include "RigGridBase.h" +#include "RigEclipseCaseData.h" #include "RigSingleWellResultsData.h" #include "RimEclipseCase.h" @@ -54,7 +55,7 @@ class RiaGetWellNames : public RiaSocketCommand std::vector wellNames; - const cvf::Collection& wells = rimCase->reservoirData()->wellResults(); + const cvf::Collection& wells = rimCase->eclipseCaseData()->wellResults(); for (size_t wIdx = 0; wIdx < wells.size(); ++wIdx) { @@ -111,7 +112,7 @@ class RiaGetWellStatus : public RiaSocketCommand std::vector requestedTimesteps; //First find the well result for the correct well - const cvf::Collection& allWellRes = rimCase->reservoirData()->wellResults(); + const cvf::Collection& allWellRes = rimCase->eclipseCaseData()->wellResults(); cvf::ref currentWellResult; for (size_t tsIdx = 0; tsIdx < allWellRes.size(); ++tsIdx) { @@ -246,7 +247,7 @@ class RiaGetWellCells : public RiaSocketCommand return true; } - const cvf::Collection& allWellRes = rimCase->reservoirData()->wellResults(); + const cvf::Collection& allWellRes = rimCase->eclipseCaseData()->wellResults(); cvf::ref currentWellResult; for (size_t cIdx = 0; cIdx < allWellRes.size(); ++cIdx) { @@ -283,7 +284,7 @@ class RiaGetWellCells : public RiaSocketCommand // Fetch results const RigWellResultFrame& wellResFrame = currentWellResult->wellResultFrame(timeStepIdx); std::vector grids; - rimCase->reservoirData()->allGrids(&grids); + rimCase->eclipseCaseData()->allGrids(&grids); for (size_t bIdx = 0; bIdx < wellResFrame.m_wellResultBranches.size(); ++bIdx) { diff --git a/ApplicationCode/UnitTests/CMakeLists_files.cmake b/ApplicationCode/UnitTests/CMakeLists_files.cmake index 099fe43849..49274a271f 100644 --- a/ApplicationCode/UnitTests/CMakeLists_files.cmake +++ b/ApplicationCode/UnitTests/CMakeLists_files.cmake @@ -21,8 +21,6 @@ ${CEE_CURRENT_LIST_DIR}RivPipeGeometryGenerator-Test.cpp ${CEE_CURRENT_LIST_DIR}RivTernaryScalarMapper-Test.cpp ${CEE_CURRENT_LIST_DIR}ScalarMapper-Test.cpp ${CEE_CURRENT_LIST_DIR}WellPathAsciiFileReader-Test.cpp -${CEE_CURRENT_LIST_DIR}opm-parser-Test.cpp -${CEE_CURRENT_LIST_DIR}opm-parser-Performance-Test.cpp ${CEE_CURRENT_LIST_DIR}opm-flowdiagnostics-Test.cpp ) diff --git a/ApplicationCode/UnitTests/RifEclipseInputFileTools-Test.cpp b/ApplicationCode/UnitTests/RifEclipseInputFileTools-Test.cpp index 98b071f106..b25013e84f 100644 --- a/ApplicationCode/UnitTests/RifEclipseInputFileTools-Test.cpp +++ b/ApplicationCode/UnitTests/RifEclipseInputFileTools-Test.cpp @@ -1,6 +1,6 @@ #include "gtest/gtest.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" #include "RifEclipseInputFileTools.h" diff --git a/ApplicationCode/UnitTests/RifReaderEclipseOutput-Test.cpp b/ApplicationCode/UnitTests/RifReaderEclipseOutput-Test.cpp index df75bfdbf3..e58cb7a0f2 100644 --- a/ApplicationCode/UnitTests/RifReaderEclipseOutput-Test.cpp +++ b/ApplicationCode/UnitTests/RifReaderEclipseOutput-Test.cpp @@ -20,7 +20,7 @@ #include "gtest/gtest.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" #include @@ -441,7 +441,7 @@ TEST(RigReservoirTest, BasicTest) TEST(RigReservoirTest, WellTest) { cvf::ref readerInterfaceEcl = new RifReaderEclipseOutput; - cvf::ref reservoir = new RigCaseData; + cvf::ref reservoir = new RigEclipseCaseData; // Location of test dataset received from Håkon Høgstøl in July 2011 with 10k active cells #ifdef WIN32 diff --git a/ApplicationCode/UnitTests/RigReservoir-Test.cpp b/ApplicationCode/UnitTests/RigReservoir-Test.cpp index 42df377a7f..b6b3db35cc 100644 --- a/ApplicationCode/UnitTests/RigReservoir-Test.cpp +++ b/ApplicationCode/UnitTests/RigReservoir-Test.cpp @@ -20,8 +20,9 @@ #include "gtest/gtest.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" #include "RigGridManager.h" +#include "RigMainGrid.h" //-------------------------------------------------------------------------------------------------- @@ -31,10 +32,9 @@ TEST(RigGridManager, BasicTest) { cvf::ref mainGridA = new RigMainGrid; - cvf::ref eclipseCase = new RigCaseData; + cvf::ref eclipseCase = new RigEclipseCaseData; eclipseCase->setMainGrid(mainGridA.p()); - int count = mainGridA->refCount(); EXPECT_EQ(mainGridA->refCount(), 2); RigGridManager gridCollection; @@ -58,7 +58,7 @@ TEST(RigGridManager, EqualTests) mainGridA->nodes().push_back(cvf::Vec3d(0, 0, 1)); mainGridA->nodes().push_back(cvf::Vec3d(0, 0, 2)); - cvf::ref eclipseCase = new RigCaseData; + cvf::ref eclipseCase = new RigEclipseCaseData; eclipseCase->setMainGrid(mainGridA.p()); diff --git a/ApplicationCode/UnitTests/RigStatisticsMath-Test.cpp b/ApplicationCode/UnitTests/RigStatisticsMath-Test.cpp index ca5f1aaab9..8c304e9946 100644 --- a/ApplicationCode/UnitTests/RigStatisticsMath-Test.cpp +++ b/ApplicationCode/UnitTests/RigStatisticsMath-Test.cpp @@ -130,7 +130,7 @@ TEST(RigStatisticsMath, HistogramPercentiles) std::vector histogram; RigHistogramCalculator histCalc(min, max, 100, &histogram); histCalc.addData(values); - std::vector pVals; + double p10, p50, p90; p10 = histCalc.calculatePercentil(0.1); p50 = histCalc.calculatePercentil(0.5); diff --git a/ApplicationCode/UnitTests/ScalarMapper-Test.cpp b/ApplicationCode/UnitTests/ScalarMapper-Test.cpp index fbe39089c6..71ef74b9f9 100644 --- a/ApplicationCode/UnitTests/ScalarMapper-Test.cpp +++ b/ApplicationCode/UnitTests/ScalarMapper-Test.cpp @@ -14,11 +14,8 @@ TEST(ScalarMapperTest, TestHumanReadableTickmarks) cvf::ref m_linDiscreteScalarMapper = new cvf::ScalarMapperDiscreteLinear; - double adjustedMin = 0.0; - double adjustedMax = 0.0; - - adjustedMin = 2141234; - adjustedMax = 2165239; + double adjustedMin = 2141234; + double adjustedMax = 2165239; size_t m_numLevels = 10; diff --git a/ApplicationCode/UnitTests/cvfGeometryTools-Test.cpp b/ApplicationCode/UnitTests/cvfGeometryTools-Test.cpp index 3d3eefd9be..428cf1816e 100644 --- a/ApplicationCode/UnitTests/cvfGeometryTools-Test.cpp +++ b/ApplicationCode/UnitTests/cvfGeometryTools-Test.cpp @@ -94,56 +94,6 @@ NodeType quadNormal (ArrayWrapperConst nodeCoords, ( nodeCoords[cubeFaceIndices[3]] - nodeCoords[cubeFaceIndices[1]]); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- - -class QuadFaceIntersectorImplHandle -{ -public: - virtual ~QuadFaceIntersectorImplHandle() {} - virtual bool intersect() = 0; -}; - -template < typename NodeArrayType, typename NodeType, typename IndicesArrayType, typename IndicesType> -class QuadFaceIntersectorImpl : public QuadFaceIntersectorImplHandle -{ -public: - QuadFaceIntersectorImpl( ArrayWrapperToEdit nodeArray, ArrayWrapperToEdit indices) - : m_nodeArray(nodeArray), - m_indices(indices){} - - - virtual bool intersect() - { - size_t nodeCount = m_nodeArray.size(); - NodeType a = m_nodeArray[0]; - IndicesType idx = m_indices[0]; - return true; - } - - -private: - - ArrayWrapperToEdit m_nodeArray; - ArrayWrapperToEdit m_indices; -}; - - -class QuadFaceIntersector -{ -public: - template - void setup( ArrayWrapperToEdit nodeArray, ArrayWrapperToEdit indices) - { - - m_implementation = new QuadFaceIntersectorImpl< NodeArrayType, NodeType, IndicesArrayType, IndicesType>( nodeArray, indices); - } - - bool intersect() { return m_implementation->intersect(); } -private: - QuadFaceIntersectorImplHandle * m_implementation; -}; //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -217,14 +167,13 @@ TEST(CellFaceIntersectionTst, Intersection1) edgeIntersectionStorage.setVertexCount(nodes.size()); { std::vector polygon; - bool isOk = false; - isOk = GeometryTools::calculateOverlapPolygonOfTwoQuads( - &polygon, - &additionalVertices, - &edgeIntersectionStorage, - wrapArrayConst(&nodes), - faces[0].data(), - faces[1].data(), + bool isOk = GeometryTools::calculateOverlapPolygonOfTwoQuads( + &polygon, + &additionalVertices, + &edgeIntersectionStorage, + wrapArrayConst(&nodes), + faces[0].data(), + faces[1].data(), 1e-6); EXPECT_EQ( (size_t)5, polygon.size()); @@ -237,8 +186,7 @@ TEST(CellFaceIntersectionTst, Intersection1) { std::vector polygon; - bool isOk = false; - isOk = GeometryTools::calculateOverlapPolygonOfTwoQuads( + bool isOk = GeometryTools::calculateOverlapPolygonOfTwoQuads( &polygon, &additionalVertices, &edgeIntersectionStorage, @@ -257,8 +205,7 @@ TEST(CellFaceIntersectionTst, Intersection1) { std::vector polygon; - bool isOk = false; - isOk = GeometryTools::calculateOverlapPolygonOfTwoQuads( + bool isOk = GeometryTools::calculateOverlapPolygonOfTwoQuads( &polygon, &additionalVertices, &edgeIntersectionStorage, @@ -280,7 +227,7 @@ TEST(CellFaceIntersectionTst, Intersection1) for (cvf::uint vxIdx = 0; vxIdx < nodes.size(); ++vxIdx) { - bool inserted = GeometryTools::insertVertexInPolygon( + GeometryTools::insertVertexInPolygon( &basePolygon, wrapArrayConst(&nodes), vxIdx, @@ -295,7 +242,7 @@ TEST(CellFaceIntersectionTst, Intersection1) { for (cvf::uint vxIdx = 0; vxIdx < nodes.size(); ++vxIdx) { - bool inserted = GeometryTools::insertVertexInPolygon( + GeometryTools::insertVertexInPolygon( &overlapPolygons[pIdx], wrapArrayConst(&nodes), vxIdx, diff --git a/ApplicationCode/UnitTests/exampleSetup.hpp b/ApplicationCode/UnitTests/exampleSetup.hpp new file mode 100644 index 0000000000..7fa97eb36c --- /dev/null +++ b/ApplicationCode/UnitTests/exampleSetup.hpp @@ -0,0 +1,157 @@ +/* + Copyright 2016 SINTEF ICT, Applied Mathematics. + Copyright 2016 Statoil ASA. + + This file is part of the Open Porous Media project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#ifndef OPM_EXAMPLESETUP_HEADER_INCLUDED +#define OPM_EXAMPLESETUP_HEADER_INCLUDED + + + +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace example { + + + inline Opm::FlowDiagnostics::ConnectionValues + extractFluxField(const Opm::ECLGraph& G) + { + using ConnVals = Opm::FlowDiagnostics::ConnectionValues; + + using NConn = ConnVals::NumConnections; + using NPhas = ConnVals::NumPhases; + + const auto nconn = NConn{G.numConnections()}; + const auto nphas = NPhas{3}; + + auto flux = ConnVals(nconn, nphas); + + auto phas = ConnVals::PhaseID{0}; + + for (const auto& p : { Opm::ECLGraph::PhaseIndex::Aqua , + Opm::ECLGraph::PhaseIndex::Liquid , + Opm::ECLGraph::PhaseIndex::Vapour }) + { + const std::vector pflux = G.flux(p); + + if (! pflux.empty()) { + assert (pflux.size() == nconn.total); + + auto conn = ConnVals::ConnID{0}; + + for (const auto& v : pflux) { + flux(conn, phas) = v; + + conn.id += 1; + } + } + + phas.id += 1; + } + + return flux; + } + + template + Opm::FlowDiagnostics::CellSetValues + extractWellFlows(const Opm::ECLGraph& G, + const WellFluxes& well_fluxes) + { + Opm::FlowDiagnostics::CellSetValues inflow; + for (const auto& well : well_fluxes) { + for (const auto& completion : well.completions) { + const int grid_index = completion.grid_index; + const auto& ijk = completion.ijk; + const int cell_index = G.activeCell(ijk, grid_index); + if (cell_index >= 0) { + inflow.emplace(cell_index, completion.reservoir_inflow_rate); + } + } + } + + return inflow; + } + + namespace Hack { + inline Opm::FlowDiagnostics::ConnectionValues + convert_flux_to_SI(Opm::FlowDiagnostics::ConnectionValues&& fl) + { + using Co = Opm::FlowDiagnostics::ConnectionValues::ConnID; + using Ph = Opm::FlowDiagnostics::ConnectionValues::PhaseID; + + const auto nconn = fl.numConnections(); + const auto nphas = fl.numPhases(); + + for (auto phas = Ph{0}; phas.id < nphas; ++phas.id) { + for (auto conn = Co{0}; conn.id < nconn; ++conn.id) { + fl(conn, phas) /= 86400; + } + } + + return fl; + } + } + + inline Opm::FlowDiagnostics::Toolbox + initialiseFlowDiagnostics(const Opm::ECLGraph& G) + { + const Opm::FlowDiagnostics::ConnectivityGraph connGraph = + Opm::FlowDiagnostics::ConnectivityGraph{ static_cast(G.numCells()), + G.neighbours() }; + + // Create the Toolbox. + + Opm::FlowDiagnostics::Toolbox tool = Opm::FlowDiagnostics::Toolbox{ connGraph }; + + tool.assignPoreVolume(G.poreVolume()); + + Opm::FlowDiagnostics::ConnectionValues connectionsVals = Hack::convert_flux_to_SI(extractFluxField(G)); + tool.assignConnectionFlux(connectionsVals); + + Opm::ECLWellSolution wsol = Opm::ECLWellSolution{}; + + const std::vector well_fluxes = + wsol.solution(G.rawResultData(), G.numGrids()); + + tool.assignInflowFlux(extractWellFlows(G, well_fluxes)); + + return tool; + } + + + +} // namespace example + + + +#endif // OPM_EXAMPLESETUP_HEADER_INCLUDED diff --git a/ApplicationCode/UnitTests/opm-flowdiagnostics-Test.cpp b/ApplicationCode/UnitTests/opm-flowdiagnostics-Test.cpp index f2dd723b8c..5279eff299 100644 --- a/ApplicationCode/UnitTests/opm-flowdiagnostics-Test.cpp +++ b/ApplicationCode/UnitTests/opm-flowdiagnostics-Test.cpp @@ -1,10 +1,50 @@ #include "gtest/gtest.h" -#include -#include +const std::string casePath = "\\\\csfiles\\Store\\ProjectData\\StatoilReservoir\\ReferenceCases\\simple_FlowDiag_Model\\"; + +/* +#include "exampleSetup.hpp" TEST(opm_flowdiagnostics_test, basic_construction) { - auto g = Opm::AssembledConnections{}; - auto s = Opm::FlowDiagnostics::CellSet{}; + + try + { + Opm::ECLRestartData rstrt(casePath + "SIMPLE.UNRST"); + Opm::ECLInitFileData initData(casePath + "SIMPLE.INIT"); + + Opm::ECLGraph graph = Opm::ECLGraph::load(casePath + "SIMPLE.EGRID", + initData); + + int step = 2; + if ( ! rstrt.selectReportStep(step) ) + { + std::ostringstream os; + + os << "Report Step " << step + << " is Not Available in Result Set '" + << casePath << '\''; + + throw std::domain_error(os.str()); + } + + Opm::FlowDiagnostics::Toolbox fdTool = example::initialiseFlowDiagnostics(graph); + + // Solve for time of flight. + std::vector start; + Opm::FlowDiagnostics::Toolbox::Forward sol = fdTool.computeInjectionDiagnostics(start); + const std::vector& tof = sol.fd.timeOfFlight(); + + // Write it to standard out. + std::cout.precision(16); + for ( double t : tof ) + { + std::cout << t << '\n'; + } + } + catch ( const std::exception& e ) + { + std::cerr << "Caught exception: " << e.what() << '\n'; + } } +*/ diff --git a/ApplicationCode/UnitTests/opm-parser-Performance-Test.cpp b/ApplicationCode/UnitTests/opm-parser-Performance-Test.cpp deleted file mode 100644 index dd673675c9..0000000000 --- a/ApplicationCode/UnitTests/opm-parser-Performance-Test.cpp +++ /dev/null @@ -1,60 +0,0 @@ - -#include "opm/parser/eclipse/Parser/Parser.hpp" -#include "gtest/gtest.h" - -#include "RigCaseData.h" -#include "RifEclipseInputFileTools.h" -#include "RifReaderOpmParserInput.h" - -#include -#include -#include - - -using namespace Opm; - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -TEST(opm_parser_test, smallCase) -{ -/* - // QString filename = "d:/Models/Statoil/small_ascii/10K_BOX_MSW.GRDECL"; - QString filename = "d:/Models/Statoil/testcase_juli_2011/data/grid_local.grdecl"; - - - - size_t iterationCount = 5; - - qDebug() << "ERT reading\n"; - - for (size_t i = 0; i < iterationCount; i++) - { - QTime time; - time.start(); - - RigCaseData caseData; - - RifEclipseInputFileTools::openGridFile(filename, &caseData, false); - - qDebug() << time.elapsed(); - } - - - qDebug() << "OPM reading\n"; - - for (size_t i = 0; i < iterationCount; i++) - { - QTime time; - time.start(); - - RigCaseData caseData; - - RifReaderOpmParserInput::openGridFile(filename, false, &caseData, false); - - qDebug() << time.elapsed(); - } -*/ - -} - diff --git a/ApplicationCode/UnitTests/opm-parser-Test.cpp b/ApplicationCode/UnitTests/opm-parser-Test.cpp deleted file mode 100644 index 980449ff61..0000000000 --- a/ApplicationCode/UnitTests/opm-parser-Test.cpp +++ /dev/null @@ -1,163 +0,0 @@ -#include "gtest/gtest.h" - -#include "opm/parser/eclipse/Parser/Parser.hpp" - - -using namespace Opm; - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -TEST(opm_parser_test, basicConstruction) -{ - - - // Several filenames taken from Models/Statoil folder - -/* - std::string filename = "d:/Models/MRST/simple/SIMPLE.DATA"; - std::string filename = "d:/gitroot/opm-data/spe1/SPE1CASE1.DATA"; - std::string filename = "d:/Models/Statoil/Brillig/BRILLIG.DATA"; -*/ - - std::string filename = "d:/gitroot-magnesj/opm-parser/testdata/cases_with_issues/testcase_juli_2011/TEST10K_FLT_LGR_NNC.DATA"; -/* - std::string filename = "d:/Models/Statoil/1.2.0_Osesyd_segfault/BASEPRED6.DATA"; - std::string filename = "d:/Models/Statoil/1.3.0_fault_assert_binary/BV-R2-11-0.DATA"; - std::string filename = "d:/Models/Statoil/Brillig/BRILLIG_FMTOUT.DATA"; - std::string filename = "d:/Models/Statoil/ceetron-case.tar/ceetron-case.tar"; - std::string filename = "d:/Models/Statoil/ceetron-case/.#R5_22X22_H25_C1_SW2_FV1.DATA"; - std::string filename = "d:/Models/Statoil/ceetron-case/R5_22X22_H25_C1_SW2_FV1.DATA"; - std::string filename = "d:/Models/Statoil/CO2_well_rst_error/E300_THERMAL_23_RS.DATA"; - std::string filename = "d:/Models/Statoil/E300_thermal_option/DualProperty/DUALPERM.DATA"; - std::string filename = "d:/Models/Statoil/E300_thermal_option/DualProperty/DUALPORO.DATA"; - std::string filename = "d:/Models/Statoil/HD_TEST/HD_TEST.DATA"; - std::string filename = "d:/Models/Statoil/HM_10/HM_10.DATA"; - std::string filename = "d:/Models/Statoil/LGC_TESTCASE2/LGC_TESTCASE2.DATA"; - std::string filename = "d:/Models/Statoil/MAGNE_DUALK2PORO_DPNUMz/DUALK2PORO_DPNUM.DATA"; - std::string filename = "d:/Models/Statoil/missingCorner_TP4093/TRAINING_FIXED_MOVE_INJ1.DATA"; - std::string filename = "d:/Models/Statoil/nnc_faults/TEST10K_FLT_LGR_NNC0P03_FAULTS1P0.DATA"; - std::string filename = "d:/Models/Statoil/NNCsDisconnected/TEST10K_FLT_LGR_NNC0P03_LGRNNC0P02_FAULTS0P1.DATA"; - std::string filename = "d:/Models/Statoil/NNCsDisconnected/TEST10K_FLT_LGR_NNC0P03_NNC0P02_FAULTS0P1.DATA"; - std::string filename = "d:/Models/Statoil/RegressionTests/1NotRun/TestCase_10K_MultipleTimestepsSameDay/TEST10K_FLT_LGR_NNC_TSTEP.DATA"; - std::string filename = "d:/Models/Statoil/RegressionTests/1NotRun/TestCase_10K_SingleTStep/TEST10K_FLT_LGR_NNC_TSTEP.DATA"; - std::string filename = "d:/Models/Statoil/RegressionTests/1NotRun/TestCase_DualPerm/DUALPERM.DATA"; - std::string filename = "d:/Models/Statoil/RegressionTests/1NotRun/TestCase_DualPoro/DUALPORO.DATA"; - std::string filename = "d:/Models/Statoil/RegressionTests/1NotRun/TestCase_Large_FirstLargeCase/R5_22X22_H25_C1_SW2_FV1.DATA"; - std::string filename = "d:/Models/Statoil/RegressionTests/1NotRun/TestCase_LGC/LGC_TESTCASE2.DATA"; - std::string filename = "d:/Models/Statoil/RegressionTests/1NotRun/TestCase_LGR_Amalg/TESTCASE_AMALG_LGR.DATA"; - std::string filename = "d:/Models/Statoil/RegressionTests/1NotRun/TestCase_Wells_HM_10/HM_10.DATA"; - std::string filename = "d:/Models/Statoil/RegressionTests/TestCase_10K_Complete/TEST10K_FLT_LGR_NNC.DATA"; - std::string filename = "d:/Models/Statoil/RegressionTests/tmp/TestCase_MultiRestartFile_CO2_well_rst_error/E300_THERMAL_23_RS.DATA"; - std::string filename = "d:/Models/Statoil/SmbS_ffm/REF161213.DATA"; - std::string filename = "d:/Models/Statoil/TEST_RKMFAULTS/TEST_RKMFAULTS.DATA"; - std::string filename = "d:/Models/Statoil/TEST10K_FLT_LGR_NNC_TSTEP/TEST10K_FLT_LGR_NNC_TSTEP.DATA"; - std::string filename = "d:/Models/Statoil/TestCase_10K_MultipleTimestepsSameDay/TEST10K_FLT_LGR_NNC_TSTEP.DATA"; - std::string filename = "d:/Models/Statoil/testcase_amalg_lgr/TESTCASE_AMALG_LGR.DATA"; - std::string filename = "d:/Models/Statoil/testcase_juli_2011/data/TEST10K_FLT_LGR_NNC.DATA"; - std::string filename = "d:/Models/Statoil/trainint_fixed_move/TRAINING_FIXED_MOVE_INJ1.DATA"; - std::string filename = "d:/Models/Statoil/troll_Ref2014/T07-4A-W2014-06.DATA"; -*/ - - - -/* - try - { - } - catch (CException* e) - { - } -*/ - -/* - ParseContext parseContext; - parseContext.update(InputError::WARN); - - Opm::ParserPtr parser(new Opm::Parser()); - Opm::DeckConstPtr deck = parser->parseFile(filename, parseContext); - - Opm::EclipseState es(deck, parseContext); - auto ep = es.get3DProperties(); - auto grid = es.getInputGrid(); -*/ - - -/* - Parser parser; - const auto deck = parser.newDeckFromFile(filename, Opm::ParseContext()); - const auto grid = Parser::parseGrid(*deck); -*/ - -/* - { - std::string inline_json = "{\"key\": \"value\"}"; - Json::JsonObject parser(inline_json); - parser.has_item("key"); - parser.has_item("keyX"); - } - - { - ParserStringItemPtr itemString(new ParserStringItem(std::string("STRINGITEM1"))); - ParserRecordPtr record1(new ParserRecord()); - RawRecord rawRecord(" ' VALUE ' "); - ParseContext parseContext; - record1->addItem(itemString); - //BOOST_CHECK_EQUAL(" VALUE ", deckRecord.getItem(0).get< std::string >(0)); - } - -*/ - { - const auto* input_deck = "RUNSPEC\n\n" - "TITLE\n\n" - "DIMENS\n10 10 10/\n" - "EQLDIMS\n/\n"; - - Parser parser; - const auto deck = parser.newDeckFromString(input_deck, ParseContext()); - //BOOST_CHECK_EQUAL("untitled", deck->getKeyword("TITLE").getStringData().front()); - - } -} - - - -// TEST opm- common -TEST(opm_parser_test, opm_common_test) -{ -/* - Logger logger; - std::ostringstream log_stream; - std::shared_ptr counter = std::make_shared(); - std::shared_ptr streamLog = std::make_shared(log_stream, Log::MessageType::Warning); - logger.hasBackend("NO"); - - logger.addBackend("COUNTER", counter); - logger.addBackend("STREAM", streamLog); -*/ -/* - BOOST_CHECK_EQUAL(true, logger.hasBackend("COUNTER")); - BOOST_CHECK_EQUAL(true, logger.hasBackend("STREAM")); - - logger.addMessage(Log::MessageType::Error, "Error"); - logger.addMessage(Log::MessageType::Warning, "Warning"); - BOOST_CHECK_EQUAL(1U, counter->numMessages(Log::MessageType::Error)); - BOOST_CHECK_EQUAL(1U, counter->numMessages(Log::MessageType::Warning)); - BOOST_CHECK_EQUAL(0U, counter->numMessages(Log::MessageType::Info)); - - BOOST_CHECK_EQUAL(log_stream.str(), "Warning\n"); - - - BOOST_CHECK_THROW(logger.getBackend("No"), std::invalid_argument); - { - auto counter2 = logger.getBackend("COUNTER"); - BOOST_CHECK_EQUAL(1U, counter2->numMessages(Log::MessageType::Warning)); - BOOST_CHECK_EQUAL(1U, counter2->numMessages(Log::MessageType::Error)); - BOOST_CHECK_EQUAL(0, counter2->numMessages(Log::MessageType::Info)); - } - - BOOST_CHECK_EQUAL(false, logger.removeBackend("NO-not-found")); - BOOST_CHECK_EQUAL(true, logger.removeBackend("COUNTER")); - BOOST_CHECK_EQUAL(false, logger.hasBackend("COUNTER")); -*/ -} diff --git a/ApplicationCode/UserInterface/CMakeLists_files.cmake b/ApplicationCode/UserInterface/CMakeLists_files.cmake index e5e0c8cc8b..a3b595d0d1 100644 --- a/ApplicationCode/UserInterface/CMakeLists_files.cmake +++ b/ApplicationCode/UserInterface/CMakeLists_files.cmake @@ -10,6 +10,7 @@ ${CEE_CURRENT_LIST_DIR}RiuCursors.h ${CEE_CURRENT_LIST_DIR}RiuDragDrop.h ${CEE_CURRENT_LIST_DIR}RiuFemResultTextBuilder.h ${CEE_CURRENT_LIST_DIR}RiuGeoQuestNavigation.h +${CEE_CURRENT_LIST_DIR}RiuInterfaceToViewWindow.h ${CEE_CURRENT_LIST_DIR}RiuLineSegmentQwtPlotCurve.h ${CEE_CURRENT_LIST_DIR}RiuMainPlotWindow.h ${CEE_CURRENT_LIST_DIR}RiuMainWindow.h @@ -20,13 +21,15 @@ ${CEE_CURRENT_LIST_DIR}RiuProcessMonitor.h ${CEE_CURRENT_LIST_DIR}RiuProjectPropertyView.h ${CEE_CURRENT_LIST_DIR}RiuPropertyViewTabWidget.h ${CEE_CURRENT_LIST_DIR}RiuQwtScalePicker.h +${CEE_CURRENT_LIST_DIR}RiuQwtCurvePointTracker.h +${CEE_CURRENT_LIST_DIR}RiuQwtPlotWheelZoomer.h +${CEE_CURRENT_LIST_DIR}RiuQwtPlotZoomer.h ${CEE_CURRENT_LIST_DIR}RiuRecentFileActionProvider.h ${CEE_CURRENT_LIST_DIR}RiuResultInfoPanel.h ${CEE_CURRENT_LIST_DIR}RiuResultQwtPlot.h ${CEE_CURRENT_LIST_DIR}RiuResultTextBuilder.h ${CEE_CURRENT_LIST_DIR}RiuRmsNavigation.h ${CEE_CURRENT_LIST_DIR}RiuSelectionChangedHandler.h -${CEE_CURRENT_LIST_DIR}RiuSelectionColors.h ${CEE_CURRENT_LIST_DIR}RiuSelectionManager.h ${CEE_CURRENT_LIST_DIR}RiuSimpleHistogramWidget.h ${CEE_CURRENT_LIST_DIR}RiuSummaryQwtPlot.h @@ -38,6 +41,13 @@ ${CEE_CURRENT_LIST_DIR}RiuWellLogPlot.h ${CEE_CURRENT_LIST_DIR}RiuWellLogTrack.h ${CEE_CURRENT_LIST_DIR}RiuGeoMechXfTensorResultAccessor.h ${CEE_CURRENT_LIST_DIR}RiuFemTimeHistoryResultAccessor.h +${CEE_CURRENT_LIST_DIR}RiuExportMultipleSnapshotsWidget.h +${CEE_CURRENT_LIST_DIR}RiuWellAllocationPlot.h +${CEE_CURRENT_LIST_DIR}RiuFlowCharacteristicsPlot.h +${CEE_CURRENT_LIST_DIR}RiuNightchartsWidget.h +${CEE_CURRENT_LIST_DIR}RiuMessagePanel.h +${CEE_CURRENT_LIST_DIR}RiuPlotObjectPicker.h +${CEE_CURRENT_LIST_DIR}RiuContextMenuLauncher.h ) set (SOURCE_GROUP_SOURCE_FILES @@ -46,6 +56,7 @@ ${CEE_CURRENT_LIST_DIR}RiuCursors.cpp ${CEE_CURRENT_LIST_DIR}RiuDragDrop.cpp ${CEE_CURRENT_LIST_DIR}RiuFemResultTextBuilder.cpp ${CEE_CURRENT_LIST_DIR}RiuGeoQuestNavigation.cpp +${CEE_CURRENT_LIST_DIR}RiuInterfaceToViewWindow.cpp ${CEE_CURRENT_LIST_DIR}RiuLineSegmentQwtPlotCurve.cpp ${CEE_CURRENT_LIST_DIR}RiuMainPlotWindow.cpp ${CEE_CURRENT_LIST_DIR}RiuMainWindow.cpp @@ -56,13 +67,14 @@ ${CEE_CURRENT_LIST_DIR}RiuProcessMonitor.cpp ${CEE_CURRENT_LIST_DIR}RiuProjectPropertyView.cpp ${CEE_CURRENT_LIST_DIR}RiuPropertyViewTabWidget.cpp ${CEE_CURRENT_LIST_DIR}RiuQwtScalePicker.cpp +${CEE_CURRENT_LIST_DIR}RiuQwtCurvePointTracker.cpp +${CEE_CURRENT_LIST_DIR}RiuQwtPlotWheelZoomer.cpp ${CEE_CURRENT_LIST_DIR}RiuRecentFileActionProvider.cpp ${CEE_CURRENT_LIST_DIR}RiuResultInfoPanel.cpp ${CEE_CURRENT_LIST_DIR}RiuResultQwtPlot.cpp ${CEE_CURRENT_LIST_DIR}RiuResultTextBuilder.cpp ${CEE_CURRENT_LIST_DIR}RiuRmsNavigation.cpp ${CEE_CURRENT_LIST_DIR}RiuSelectionChangedHandler.cpp -${CEE_CURRENT_LIST_DIR}RiuSelectionColors.cpp ${CEE_CURRENT_LIST_DIR}RiuSelectionManager.cpp ${CEE_CURRENT_LIST_DIR}RiuSimpleHistogramWidget.cpp ${CEE_CURRENT_LIST_DIR}RiuSummaryQwtPlot.cpp @@ -74,6 +86,13 @@ ${CEE_CURRENT_LIST_DIR}RiuWellLogPlot.cpp ${CEE_CURRENT_LIST_DIR}RiuWellLogTrack.cpp ${CEE_CURRENT_LIST_DIR}RiuGeoMechXfTensorResultAccessor.cpp ${CEE_CURRENT_LIST_DIR}RiuFemTimeHistoryResultAccessor.cpp +${CEE_CURRENT_LIST_DIR}RiuExportMultipleSnapshotsWidget.cpp +${CEE_CURRENT_LIST_DIR}RiuWellAllocationPlot.cpp +${CEE_CURRENT_LIST_DIR}RiuFlowCharacteristicsPlot.cpp +${CEE_CURRENT_LIST_DIR}RiuNightchartsWidget.cpp +${CEE_CURRENT_LIST_DIR}RiuMessagePanel.cpp +${CEE_CURRENT_LIST_DIR}RiuPlotObjectPicker.cpp +${CEE_CURRENT_LIST_DIR}RiuContextMenuLauncher.cpp ) list(APPEND CODE_HEADER_FILES @@ -99,6 +118,12 @@ ${CEE_CURRENT_LIST_DIR}RiuWellLogTrack.h ${CEE_CURRENT_LIST_DIR}RiuRecentFileActionProvider.h ${CEE_CURRENT_LIST_DIR}RiuSummaryQwtPlot.h ${CEE_CURRENT_LIST_DIR}RiuQwtScalePicker.h +${CEE_CURRENT_LIST_DIR}RiuQwtPlotWheelZoomer.h +${CEE_CURRENT_LIST_DIR}RiuExportMultipleSnapshotsWidget.h +${CEE_CURRENT_LIST_DIR}RiuWellAllocationPlot.h +${CEE_CURRENT_LIST_DIR}RiuFlowCharacteristicsPlot.h +${CEE_CURRENT_LIST_DIR}RiuNightchartsWidget.h +${CEE_CURRENT_LIST_DIR}RiuMessagePanel.h ) list(APPEND QT_UI_FILES diff --git a/ApplicationCode/UserInterface/RiuContextMenuLauncher.cpp b/ApplicationCode/UserInterface/RiuContextMenuLauncher.cpp new file mode 100644 index 0000000000..5ebe6ec8c0 --- /dev/null +++ b/ApplicationCode/UserInterface/RiuContextMenuLauncher.cpp @@ -0,0 +1,65 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RiuContextMenuLauncher.h" + +#include "RimContextCommandBuilder.h" + +#include "cvfAssert.h" + +#include +#include +#include +#include + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuContextMenuLauncher::RiuContextMenuLauncher(QWidget* widget, const QStringList& commandIds) : + QObject(widget), + m_commandIds(commandIds) +{ + widget->installEventFilter(this); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RiuContextMenuLauncher::eventFilter(QObject* watchedObject, QEvent* event) +{ + if (event->type() == QEvent::ContextMenu) + { + QMenu menu; + RimContextCommandBuilder::appendCommandsToMenu(m_commandIds, &menu); + + if (menu.actions().size() > 0) + { + QContextMenuEvent* cme = static_cast(event); + CVF_ASSERT(cme); + + menu.exec(cme->globalPos()); + } + + return true; + } + + // standard event processing + return QObject::eventFilter(watchedObject, event); +} + diff --git a/ApplicationCode/UserInterface/RiuContextMenuLauncher.h b/ApplicationCode/UserInterface/RiuContextMenuLauncher.h new file mode 100644 index 0000000000..6267158981 --- /dev/null +++ b/ApplicationCode/UserInterface/RiuContextMenuLauncher.h @@ -0,0 +1,43 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + + +#include +#include + +class QEvent; +class QWidget; + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +class RiuContextMenuLauncher : public QObject +{ +public: + explicit RiuContextMenuLauncher(QWidget* widget, const QStringList& commandIds); + +protected: + bool eventFilter(QObject* watched, QEvent* event) override; + +private: + QStringList m_commandIds; +}; + diff --git a/ApplicationCode/UserInterface/RiuDragDrop.cpp b/ApplicationCode/UserInterface/RiuDragDrop.cpp index 1afc4cd4ca..d0e54b3007 100644 --- a/ApplicationCode/UserInterface/RiuDragDrop.cpp +++ b/ApplicationCode/UserInterface/RiuDragDrop.cpp @@ -29,11 +29,11 @@ #include "RimEclipseResultCase.h" #include "RimIdenticalGridCaseGroup.h" #include "RimMimeData.h" -#include "RimWellLogFileChannel.h" -#include "RimWellLogTrack.h" +#include "RimWellAllocationPlot.h" #include "RimWellLogCurve.h" +#include "RimWellLogFileChannel.h" #include "RimWellLogPlot.h" - +#include "RimWellLogTrack.h" #include "RimWellLogTrack.h" #include "RiuMainWindow.h" @@ -51,12 +51,12 @@ template class RiuTypedPdmObjects { public: - RiuTypedPdmObjects(const caf::PdmObjectGroup& objectGroup) + explicit RiuTypedPdmObjects(const caf::PdmObjectGroup& objectGroup) { objectGroup.objectsByType(&m_typedObjects); } - RiuTypedPdmObjects(const std::vector >& objectHandles) + explicit RiuTypedPdmObjects(const std::vector >& objectHandles) { for (size_t i = 0; i < objectHandles.size(); i++) { @@ -147,6 +147,14 @@ Qt::ItemFlags RiuDragDrop::flags(const QModelIndex &index) const caf::PdmUiTreeView* uiTreeView = RiuMainWindow::instance()->projectTreeView(); caf::PdmUiItem* uiItem = uiTreeView->uiItemFromModelIndex(index); + caf::PdmObject* pdmObj = dynamic_cast(uiItem); + if (pdmObj) + { + RimWellAllocationPlot* wellAllocationPlot = nullptr; + pdmObj->firstAncestorOrThisOfType(wellAllocationPlot); + if (wellAllocationPlot) return itemflags; + } + if (dynamic_cast(uiItem) || dynamic_cast(uiItem) || dynamic_cast(uiItem) || diff --git a/ApplicationCode/UserInterface/RiuExportMultipleSnapshotsWidget.cpp b/ApplicationCode/UserInterface/RiuExportMultipleSnapshotsWidget.cpp new file mode 100644 index 0000000000..393a6c87d4 --- /dev/null +++ b/ApplicationCode/UserInterface/RiuExportMultipleSnapshotsWidget.cpp @@ -0,0 +1,254 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RiuExportMultipleSnapshotsWidget.h" + +#include "RiaApplication.h" + +#include "RicExportMultipleSnapshotsFeature.h" + +#include "RimCase.h" +#include "RimEclipseCellColors.h" +#include "RimEclipseView.h" +#include "RimMultiSnapshotDefinition.h" +#include "RimProject.h" +#include "RimView.h" + +#include "cafCmdFeatureManager.h" +#include "cafPdmUiTableView.h" +#include "cafSelectionManager.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuExportMultipleSnapshotsWidget::RiuExportMultipleSnapshotsWidget(QWidget* parent, RimProject* project) + : QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint), + m_rimProject(project) +{ + setWindowTitle("Export Multiple Snapshots"); + + int nWidth = 1000; + int nHeight = 300; + resize(nWidth, nHeight); + + QVBoxLayout* dialogLayout = new QVBoxLayout; + setLayout(dialogLayout); + + m_pdmTableView = new caf::PdmUiTableView(this); + m_pdmTableView->tableView()->setSelectionMode(QAbstractItemView::ExtendedSelection); + m_pdmTableView->tableView()->setContextMenuPolicy(Qt::CustomContextMenu); + m_pdmTableView->enableHeaderText(false); + + connect(m_pdmTableView->tableView(), SIGNAL(customContextMenuRequested(QPoint)), SLOT(customMenuRequested(QPoint))); + + m_pdmTableView->setListField(&(project->multiSnapshotDefinitions())); + + QHeaderView* verticalHeader = m_pdmTableView->tableView()->verticalHeader(); + verticalHeader->setResizeMode(QHeaderView::Interactive); + + m_pdmTableView->tableView()->resizeColumnsToContents(); + + // Set active child array to be able to use generic delete + caf::SelectionManager::instance()->setActiveChildArrayFieldHandle(&(project->multiSnapshotDefinitions())); + + dialogLayout->addWidget(m_pdmTableView); + + // Export folder + { + QHBoxLayout* layout = new QHBoxLayout; + + layout->addWidget(new QLabel("Export folder")); + + // Save images in snapshot catalog relative to project directory + QString snapshotFolderName = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath("snapshots"); + + m_exportFolderLineEdit = new QLineEdit(snapshotFolderName); + + QToolButton* button = new QToolButton; + button->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred)); + button->setText(QLatin1String("...")); + + layout->addWidget(m_exportFolderLineEdit); + layout->addWidget(button); + + connect(button, SIGNAL(clicked()), this, SLOT(folderSelectionClicked())); + + dialogLayout->addLayout(layout); + } + + + // Buttons + QDialogButtonBox* buttonBox = new QDialogButtonBox(QDialogButtonBox::Close); + connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())); + connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); + + QPushButton* exportButton = new QPushButton(tr("Export")); + exportButton->setDefault(true); + buttonBox->addButton(exportButton, QDialogButtonBox::ActionRole); + connect(exportButton, SIGNAL(clicked()), this, SLOT(exportSnapshots())); + + dialogLayout->addWidget(buttonBox); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuExportMultipleSnapshotsWidget::~RiuExportMultipleSnapshotsWidget() +{ + m_pdmTableView->setListField(nullptr); + + caf::SelectionManager::instance()->setActiveChildArrayFieldHandle(nullptr); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuExportMultipleSnapshotsWidget::addSnapshotItemFromActiveView() +{ + if (!m_rimProject) return; + + RimView* activeView = RiaApplication::instance()->activeReservoirView(); + if (activeView) + { + RimMultiSnapshotDefinition* multiSnapshot = new RimMultiSnapshotDefinition(); + multiSnapshot->view = activeView; + + RimEclipseView* eclipseView = dynamic_cast(activeView); + if (eclipseView) + { + multiSnapshot->eclipseResultType = eclipseView->cellResult->resultType(); + multiSnapshot->selectedEclipseResults.v().push_back(eclipseView->cellResult->resultVariable()); + + } + multiSnapshot->timeStepStart = activeView->currentTimeStep(); + multiSnapshot->timeStepEnd = activeView->currentTimeStep(); + + RimCase* sourceCase = nullptr; + activeView->firstAncestorOrThisOfType(sourceCase); + if (sourceCase) + { + multiSnapshot->additionalCases().push_back(sourceCase); + } + + m_rimProject->multiSnapshotDefinitions.push_back(multiSnapshot); + m_rimProject->multiSnapshotDefinitions.uiCapability()->updateConnectedEditors(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuExportMultipleSnapshotsWidget::addEmptySnapshotItems(size_t itemCount) +{ + if (!m_rimProject) return; + + for (size_t i = 0; i < itemCount; i++) + { + RimMultiSnapshotDefinition* multiSnapshot = new RimMultiSnapshotDefinition(); + multiSnapshot->isActive = false; + + m_rimProject->multiSnapshotDefinitions.push_back(multiSnapshot); + } + + m_rimProject->multiSnapshotDefinitions.uiCapability()->updateConnectedEditors(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuExportMultipleSnapshotsWidget::customMenuRequested(QPoint pos) +{ + caf::CmdFeatureManager* commandManager = caf::CmdFeatureManager::instance(); + + QMenu menu; + menu.addAction(commandManager->action("PdmListField_DeleteItem","Delete row")); + + QAction* newRowAction = new QAction("New row", this); + connect(newRowAction, SIGNAL(triggered()), SLOT(addSnapshotItem())); + menu.addAction(newRowAction); + + QAction* clearAllRows = new QAction("Clear", this); + connect(clearAllRows, SIGNAL(triggered()), SLOT(deleteAllSnapshotItems())); + menu.addAction(clearAllRows); + + + // Qt doc: QAbstractScrollArea and its subclasses that map the context menu event to coordinates of the viewport(). + QPoint globalPos = m_pdmTableView->tableView()->viewport()->mapToGlobal(pos); + + menu.exec(globalPos); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuExportMultipleSnapshotsWidget::deleteAllSnapshotItems() +{ + if (!m_rimProject) return; + + m_rimProject->multiSnapshotDefinitions.deleteAllChildObjects(); + + m_rimProject->multiSnapshotDefinitions.uiCapability()->updateConnectedEditors(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuExportMultipleSnapshotsWidget::exportSnapshots() +{ + RicExportMultipleSnapshotsFeature::exportMultipleSnapshots(m_exportFolderLineEdit->text(), m_rimProject); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuExportMultipleSnapshotsWidget::folderSelectionClicked() +{ + QString defaultPath = m_exportFolderLineEdit->text(); + + QString directoryPath = QFileDialog::getExistingDirectory(m_exportFolderLineEdit, + tr("Get existing directory"), + defaultPath, + QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); + + if (!directoryPath.isEmpty()) + { + m_exportFolderLineEdit->setText(directoryPath); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuExportMultipleSnapshotsWidget::addSnapshotItem() +{ + addSnapshotItemFromActiveView(); +} diff --git a/ApplicationCode/UserInterface/RiuExportMultipleSnapshotsWidget.h b/ApplicationCode/UserInterface/RiuExportMultipleSnapshotsWidget.h new file mode 100644 index 0000000000..d963555dfa --- /dev/null +++ b/ApplicationCode/UserInterface/RiuExportMultipleSnapshotsWidget.h @@ -0,0 +1,54 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include + +class RimProject; + +namespace caf { + class PdmUiTableView; +} + +class QWidget; +class QLineEdit; + +class RiuExportMultipleSnapshotsWidget : public QDialog +{ + Q_OBJECT +public: + RiuExportMultipleSnapshotsWidget(QWidget* parent, RimProject* project); + ~RiuExportMultipleSnapshotsWidget(); + + void addSnapshotItemFromActiveView(); + void addEmptySnapshotItems(size_t itemCount); + +private slots: + void customMenuRequested(QPoint pos); + void addSnapshotItem(); + void deleteAllSnapshotItems(); + void exportSnapshots(); + + void folderSelectionClicked(); + +private: + RimProject* m_rimProject; + caf::PdmUiTableView* m_pdmTableView; + QLineEdit* m_exportFolderLineEdit; +}; diff --git a/ApplicationCode/UserInterface/RiuFemResultTextBuilder.cpp b/ApplicationCode/UserInterface/RiuFemResultTextBuilder.cpp index 3e5f8ee9f8..3f996f5af0 100644 --- a/ApplicationCode/UserInterface/RiuFemResultTextBuilder.cpp +++ b/ApplicationCode/UserInterface/RiuFemResultTextBuilder.cpp @@ -89,7 +89,7 @@ QString RiuFemResultTextBuilder::mainResultText() if (!text.isEmpty()) text += "\n"; - QString topoText = this->topologyText("\n"); + QString topoText = this->geometrySelectionText("\n"); text += topoText; appendDetails(text, formationDetails()); text += "\n"; @@ -102,7 +102,7 @@ QString RiuFemResultTextBuilder::mainResultText() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString RiuFemResultTextBuilder::topologyText(QString itemSeparator) +QString RiuFemResultTextBuilder::geometrySelectionText(QString itemSeparator) { QString text; diff --git a/ApplicationCode/UserInterface/RiuFemResultTextBuilder.h b/ApplicationCode/UserInterface/RiuFemResultTextBuilder.h index 2b3e3d45b7..dd81d9bea0 100644 --- a/ApplicationCode/UserInterface/RiuFemResultTextBuilder.h +++ b/ApplicationCode/UserInterface/RiuFemResultTextBuilder.h @@ -49,7 +49,7 @@ class RiuFemResultTextBuilder QString mainResultText(); - QString topologyText(QString itemSeparator); + QString geometrySelectionText(QString itemSeparator); private: void appendDetails(QString& text, const QString& details); diff --git a/ApplicationCode/UserInterface/RiuFemTimeHistoryResultAccessor.cpp b/ApplicationCode/UserInterface/RiuFemTimeHistoryResultAccessor.cpp index 2e5c03f40b..a0db095e51 100644 --- a/ApplicationCode/UserInterface/RiuFemTimeHistoryResultAccessor.cpp +++ b/ApplicationCode/UserInterface/RiuFemTimeHistoryResultAccessor.cpp @@ -74,7 +74,7 @@ RiuFemTimeHistoryResultAccessor::RiuFemTimeHistoryResultAccessor(RigGeoMechCaseD //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString RiuFemTimeHistoryResultAccessor::topologyText() const +QString RiuFemTimeHistoryResultAccessor::geometrySelectionText() const { QString text; diff --git a/ApplicationCode/UserInterface/RiuFemTimeHistoryResultAccessor.h b/ApplicationCode/UserInterface/RiuFemTimeHistoryResultAccessor.h index 299961ade9..6df48f7d66 100644 --- a/ApplicationCode/UserInterface/RiuFemTimeHistoryResultAccessor.h +++ b/ApplicationCode/UserInterface/RiuFemTimeHistoryResultAccessor.h @@ -46,7 +46,7 @@ class RiuFemTimeHistoryResultAccessor const cvf::Vec3d& intersectionPoint, const std::array& m_intersectionTriangle); - QString topologyText() const; + QString geometrySelectionText() const; std::vector timeHistoryValues() const; int closestNodeId() const { return m_closestNodeId; } @@ -59,7 +59,6 @@ class RiuFemTimeHistoryResultAccessor size_t m_gridIndex; int m_elementIndex; - size_t m_scalarResultIndex; int m_face; int m_closestNodeId; diff --git a/ApplicationCode/UserInterface/RiuFlowCharacteristicsPlot.cpp b/ApplicationCode/UserInterface/RiuFlowCharacteristicsPlot.cpp new file mode 100644 index 0000000000..09a39eaa13 --- /dev/null +++ b/ApplicationCode/UserInterface/RiuFlowCharacteristicsPlot.cpp @@ -0,0 +1,310 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RiuFlowCharacteristicsPlot.h" + +#include "RiaColorTables.h" + +#include "RimFlowCharacteristicsPlot.h" + +#include "RiuLineSegmentQwtPlotCurve.h" +#include "RiuQwtPlotWheelZoomer.h" +#include "RiuQwtPlotZoomer.h" +#include "RiuResultQwtPlot.h" +#include "RiuSummaryQwtPlot.h" + +#include "cvfBase.h" +#include "cvfColor3.h" + +#include "qwt_date.h" +#include "qwt_legend.h" +#include "qwt_plot.h" +#include "qwt_plot_zoomer.h" +#include "qwt_symbol.h" + +#include +#include +#include +#include +#include + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuFlowCharacteristicsPlot::RiuFlowCharacteristicsPlot(RimFlowCharacteristicsPlot* plotDefinition, QWidget* parent) + : m_plotDefinition(plotDefinition), + QFrame(parent) +{ + Q_ASSERT(m_plotDefinition); + + QGridLayout* mainLayout = new QGridLayout(); + this->setLayout(mainLayout); + this->layout()->setMargin(3); + this->layout()->setSpacing(3); + + // White background + QPalette pal = this->palette(); + pal.setColor(QPalette::Background, Qt::white); + this->setAutoFillBackground(true); + this->setPalette(pal); + + m_lorenzPlot = new QwtPlot(this); + m_flowCapVsStorageCapPlot = new QwtPlot(this); + m_sweepEffPlot = new QwtPlot(this); + + mainLayout->addWidget(m_lorenzPlot, 0 ,0, 1, 2); + mainLayout->addWidget(m_flowCapVsStorageCapPlot, 1, 0); + mainLayout->addWidget(m_sweepEffPlot, 1, 1); + + RiuSummaryQwtPlot::setCommonPlotBehaviour(m_lorenzPlot); + new RiuQwtPlotWheelZoomer(m_lorenzPlot); + addWindowZoom(m_lorenzPlot); + RiuSummaryQwtPlot::enableDateBasedBottomXAxis(m_lorenzPlot); + m_lorenzPlot->setTitle("Lorenz Coefficient"); + + RiuSummaryQwtPlot::setCommonPlotBehaviour(m_sweepEffPlot); + new RiuQwtPlotWheelZoomer(m_sweepEffPlot); + addWindowZoom(m_sweepEffPlot); + m_sweepEffPlot->setTitle("Sweep Efficiency"); + + RiuSummaryQwtPlot::setCommonPlotBehaviour(m_flowCapVsStorageCapPlot); + new RiuQwtPlotWheelZoomer(m_flowCapVsStorageCapPlot); + addWindowZoom(m_flowCapVsStorageCapPlot); + m_flowCapVsStorageCapPlot->setTitle("Flow Capacity vs Storage Capacity"); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuFlowCharacteristicsPlot::addWindowZoom(QwtPlot* plot) +{ + auto zoomer = new RiuQwtPlotZoomer(plot->canvas()); + zoomer->setRubberBandPen(QColor(Qt::black)); + zoomer->setTrackerMode(QwtPicker::AlwaysOff); + zoomer->setTrackerPen(QColor(Qt::black)); + zoomer->initMousePattern(1); +} +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuFlowCharacteristicsPlot::~RiuFlowCharacteristicsPlot() +{ + if (m_plotDefinition) + { + m_plotDefinition->handleMdiWindowClosed(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuFlowCharacteristicsPlot::setLorenzCurve(const QStringList& dateTimeStrings, const std::vector& dateTimes, const std::vector& timeHistoryValues) +{ + initializeColors(dateTimes); + + m_lorenzPlot->detachItems(QwtPlotItem::Rtti_PlotCurve, true); + + for (size_t tsIdx = 0; tsIdx < dateTimes.size(); ++tsIdx) + { + if (timeHistoryValues[tsIdx] == HUGE_VAL) continue; + + QDateTime dateTime = dateTimes[tsIdx]; + double timeHistoryValue = timeHistoryValues[tsIdx]; + + QString curveName = dateTimeStrings[static_cast(tsIdx)]; + + RiuFlowCharacteristicsPlot::addCurveWithLargeSymbol(m_lorenzPlot, curveName, m_dateToColorMap[dateTime], dateTime, timeHistoryValue); + } + + m_lorenzPlot->replot(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuFlowCharacteristicsPlot::addCurveWithLargeSymbol(QwtPlot* plot, const QString& curveName, const QColor& color, const QDateTime& dateTime, double timeHistoryValue) +{ + auto curve = createEmptyCurve(plot, curveName, color); + + QwtSymbol::Style style = QwtSymbol::Diamond; + QwtSymbol* symbol = new QwtSymbol(style); + + symbol->setSize(15, 15); + symbol->setColor(color); + + curve->setSymbol(symbol); + + // Add date and value twice to avoid a cross as symbol generated by RiuLineSegmentQwtPlotCurve + + std::vector dateTimes; + dateTimes.push_back(dateTime); + dateTimes.push_back(dateTime); + + std::vector timeHistoryValues; + timeHistoryValues.push_back(timeHistoryValue); + timeHistoryValues.push_back(timeHistoryValue); + + curve->setSamplesFromDateAndValues(dateTimes, timeHistoryValues, false); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuLineSegmentQwtPlotCurve* RiuFlowCharacteristicsPlot::createEmptyCurve(QwtPlot* plot, const QString& curveName, const QColor& curveColor ) +{ + RiuLineSegmentQwtPlotCurve* plotCurve = new RiuLineSegmentQwtPlotCurve(curveName); + + plotCurve->setTitle(curveName); + plotCurve->setPen(QPen(curveColor)); + plotCurve->attach(plot); + return plotCurve; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuFlowCharacteristicsPlot::addFlowCapStorageCapCurve(const QDateTime& dateTime, const std::vector& xVals, const std::vector& yVals) +{ + CVF_ASSERT(!m_dateToColorMap.empty()); + + RiuLineSegmentQwtPlotCurve* plotCurve = createEmptyCurve(m_flowCapVsStorageCapPlot, dateTime.toString(), m_dateToColorMap[dateTime]); + plotCurve->setSamplesFromTimeAndValues(xVals, yVals, false); + m_flowCapVsStorageCapPlot->replot(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuFlowCharacteristicsPlot::addSweepEfficiencyCurve(const QDateTime& dateTime, const std::vector& xVals, const std::vector& yVals) +{ + CVF_ASSERT(!m_dateToColorMap.empty()); + + RiuLineSegmentQwtPlotCurve* plotCurve = createEmptyCurve(m_sweepEffPlot, dateTime.toString(), m_dateToColorMap[dateTime]); + plotCurve->setSamplesFromTimeAndValues(xVals, yVals, false); + + m_sweepEffPlot->replot(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuFlowCharacteristicsPlot::removeAllCurves() +{ + m_lorenzPlot->detachItems(QwtPlotItem::Rtti_PlotCurve, true); + m_lorenzPlot->replot(); + m_sweepEffPlot->detachItems(QwtPlotItem::Rtti_PlotCurve, true); + m_sweepEffPlot->replot(); + m_flowCapVsStorageCapPlot->detachItems(QwtPlotItem::Rtti_PlotCurve, true); + m_flowCapVsStorageCapPlot->replot(); + m_dateToColorMap.clear(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void zoomAllInPlot(QwtPlot * plot) +{ + plot->setAxisAutoScale(QwtPlot::xBottom, true); + plot->setAxisAutoScale(QwtPlot::yLeft, true); + plot->replot(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuFlowCharacteristicsPlot::zoomAll() +{ + zoomAllInPlot(m_lorenzPlot); + zoomAllInPlot(m_sweepEffPlot); + zoomAllInPlot(m_flowCapVsStorageCapPlot); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuFlowCharacteristicsPlot::showLegend(bool show) +{ + if (show) + { + // Will be released in plot destructor or when a new legend is set + QwtLegend* legend = new QwtLegend(m_lorenzPlot); + m_lorenzPlot->insertLegend(legend, QwtPlot::BottomLegend); + } + else + { + m_lorenzPlot->insertLegend(nullptr); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimFlowCharacteristicsPlot* RiuFlowCharacteristicsPlot::ownerPlotDefinition() +{ + return m_plotDefinition; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimViewWindow* RiuFlowCharacteristicsPlot::ownerViewWindow() const +{ + return m_plotDefinition; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QSize RiuFlowCharacteristicsPlot::minimumSizeHint() const +{ + return QSize(0, 100); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QSize RiuFlowCharacteristicsPlot::sizeHint() const +{ + return QSize(0, 0); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuFlowCharacteristicsPlot::setDefaults() +{ + +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuFlowCharacteristicsPlot::initializeColors(const std::vector& dateTimes) +{ + CVF_ASSERT(m_dateToColorMap.empty()); + + const caf::ColorTable& palette = RiaColorTables::timestepsPaletteColors(); + cvf::Color3ubArray colorArray = caf::ColorTable::interpolateColorArray(palette.color3ubArray(), dateTimes.size()); + + for (size_t tsIdx = 0; tsIdx < dateTimes.size(); ++tsIdx) + { + m_dateToColorMap[dateTimes[tsIdx]] = QColor( colorArray[tsIdx].r(), colorArray[tsIdx].g(), colorArray[tsIdx].b()); + } +} + diff --git a/ApplicationCode/UserInterface/RiuFlowCharacteristicsPlot.h b/ApplicationCode/UserInterface/RiuFlowCharacteristicsPlot.h new file mode 100644 index 0000000000..b2f763df59 --- /dev/null +++ b/ApplicationCode/UserInterface/RiuFlowCharacteristicsPlot.h @@ -0,0 +1,86 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "RiuInterfaceToViewWindow.h" + +#include "cafPdmPointer.h" + +#include "qwt_plot.h" + +#include +#include + +class RimFlowCharacteristicsPlot; +class RiuNightchartsWidget; +class RiuResultQwtPlot; +class RiuLineSegmentQwtPlotCurve; + +class QLabel; + +namespace cvf { + class Color3f; +} + +//================================================================================================== +// +// +// +//================================================================================================== +class RiuFlowCharacteristicsPlot : public QFrame, public RiuInterfaceToViewWindow +{ + Q_OBJECT; +public: + RiuFlowCharacteristicsPlot(RimFlowCharacteristicsPlot* plotDefinition, QWidget* parent = NULL); + virtual ~RiuFlowCharacteristicsPlot(); + + void setLorenzCurve(const QStringList& dateTimeStrings, const std::vector& dateTimes, const std::vector& timeHistoryValues); + void addFlowCapStorageCapCurve(const QDateTime& dateTime, const std::vector& xVals, const std::vector& yVals); + void addSweepEfficiencyCurve(const QDateTime& dateTime, const std::vector& xVals, const std::vector& yVals); + + void removeAllCurves(); + void zoomAll(); + + void showLegend(bool show); + + RimFlowCharacteristicsPlot* ownerPlotDefinition(); + virtual RimViewWindow* ownerViewWindow() const override; + + static void addWindowZoom(QwtPlot* plot); + static RiuLineSegmentQwtPlotCurve* createEmptyCurve(QwtPlot* plot, const QString& curveName, const QColor& curveColor); + +protected: + virtual QSize sizeHint() const override; + virtual QSize minimumSizeHint() const override; + +private: + void setDefaults(); + void initializeColors(const std::vector& dateTimes); + + static void addCurveWithLargeSymbol(QwtPlot* plot, const QString& curveName, const QColor& color, const QDateTime& dateTime, double timeHistoryValue); + +private: + caf::PdmPointer m_plotDefinition; + QPointer m_lorenzPlot; + QPointer m_flowCapVsStorageCapPlot; + QPointer m_sweepEffPlot; + + std::map m_dateToColorMap; +}; + diff --git a/ApplicationCode/UserInterface/RiuInterfaceToViewWindow.cpp b/ApplicationCode/UserInterface/RiuInterfaceToViewWindow.cpp new file mode 100644 index 0000000000..4e44aa983b --- /dev/null +++ b/ApplicationCode/UserInterface/RiuInterfaceToViewWindow.cpp @@ -0,0 +1,19 @@ +#include "RiuInterfaceToViewWindow.h" + +#include + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimViewWindow* RiuInterfaceToViewWindow::viewWindowFromWidget(QWidget* possibleViewWindowWidget) +{ + auto interfaceToViewWindow = dynamic_cast(possibleViewWindowWidget); + if ( interfaceToViewWindow ) + { + return (interfaceToViewWindow->ownerViewWindow()); + } + else + { + return nullptr; + } +} diff --git a/ApplicationCode/UserInterface/RiuInterfaceToViewWindow.h b/ApplicationCode/UserInterface/RiuInterfaceToViewWindow.h new file mode 100644 index 0000000000..21eb5c42ec --- /dev/null +++ b/ApplicationCode/UserInterface/RiuInterfaceToViewWindow.h @@ -0,0 +1,35 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +class RimViewWindow; +class QWidget; + +//================================================================================================== +// +// +// +//================================================================================================== +class RiuInterfaceToViewWindow +{ +public: + virtual RimViewWindow* ownerViewWindow() const = 0; + static RimViewWindow* viewWindowFromWidget( QWidget* possibleViewWindowWidget); +}; + diff --git a/ApplicationCode/UserInterface/RiuMainPlotWindow.cpp b/ApplicationCode/UserInterface/RiuMainPlotWindow.cpp index 6d5f930c4c..12454f36dd 100644 --- a/ApplicationCode/UserInterface/RiuMainPlotWindow.cpp +++ b/ApplicationCode/UserInterface/RiuMainPlotWindow.cpp @@ -26,6 +26,7 @@ #include "RimSummaryPlot.h" #include "RimTreeViewStateSerializer.h" #include "RimViewWindow.h" +#include "RimWellAllocationPlot.h" #include "RimWellLogPlot.h" #include "RiuDragDrop.h" @@ -33,6 +34,7 @@ #include "RiuSummaryQwtPlot.h" #include "RiuToolTipMenu.h" #include "RiuTreeViewEventFilter.h" +#include "RiuWellAllocationPlot.h" #include "RiuWellLogPlot.h" #include "cafCmdFeatureManager.h" @@ -62,6 +64,7 @@ RiuMainPlotWindow::RiuMainPlotWindow() : m_pdmRoot(NULL), m_mainViewer(NULL), + m_activePlotViewWindow(nullptr), m_windowMenu(NULL), m_blockSlotSubWindowActivated(false) { @@ -98,6 +101,11 @@ void RiuMainPlotWindow::initializeGuiNewProjectLoaded() setPdmRoot(RiaApplication::instance()->project()); restoreTreeViewState(); + if (m_pdmUiPropertyView && m_pdmUiPropertyView->currentObject()) + { + m_pdmUiPropertyView->currentObject()->uiCapability()->updateConnectedEditors(); + } + refreshToolbars(); } @@ -112,6 +120,16 @@ void RiuMainPlotWindow::cleanupGuiBeforeProjectClose() { m_pdmUiPropertyView->showProperties(NULL); } + + for (QWidget* w : m_temporaryWidgets) + { + w->close(); + w->deleteLater(); + } + + m_temporaryWidgets.clear(); + + setWindowTitle("Plots - ResInsight"); } //-------------------------------------------------------------------------------------------------- @@ -119,11 +137,24 @@ void RiuMainPlotWindow::cleanupGuiBeforeProjectClose() //-------------------------------------------------------------------------------------------------- void RiuMainPlotWindow::closeEvent(QCloseEvent* event) { + RiaApplication* app = RiaApplication::instance(); + + if (app->isMain3dWindowVisible()) + { + return; + } + + if (!app->askUserToSaveModifiedProject()) + { + event->ignore(); + return; + } + saveWinGeoAndDockToolBarLayout(); - if (!RiaApplication::instance()->tryCloseMainWindow()) return; + if (!app->tryCloseMainWindow()) return; - RiaApplication::instance()->closeProject(); + app->closeProject(); } //-------------------------------------------------------------------------------------------------- @@ -154,7 +185,6 @@ void RiuMainPlotWindow::createMenus() QMenu* importMenu = fileMenu->addMenu("&Import"); importMenu->addAction(cmdFeatureMgr->action("RicImportEclipseCaseFeature")); importMenu->addAction(cmdFeatureMgr->action("RicImportInputEclipseCaseFeature")); - //importMenu->addAction(cmdFeatureMgr->action("RicImportInputEclipseCaseOpmFeature")); importMenu->addAction(cmdFeatureMgr->action("RicImportSummaryCaseFeature")); importMenu->addAction(cmdFeatureMgr->action("RicCreateGridCaseGroupFeature")); importMenu->addSeparator(); @@ -365,6 +395,16 @@ QList RiuMainPlotWindow::subWindowList(QMdiArea::WindowOrder ord return m_mdiArea->subWindowList(order); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuMainPlotWindow::addToTemporaryWidgets(QWidget* widget) +{ + CVF_ASSERT(widget); + + m_temporaryWidgets.push_back(widget); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -458,45 +498,22 @@ void RiuMainPlotWindow::setPdmRoot(caf::PdmObject* pdmRoot) void RiuMainPlotWindow::slotSubWindowActivated(QMdiSubWindow* subWindow) { if (!subWindow) return; - if (m_blockSlotSubWindowActivated) return; RimProject * proj = RiaApplication::instance()->project(); if (!proj) return; - { - RiuWellLogPlot* wellLogPlotViewer = dynamic_cast(subWindow->widget()); - if (wellLogPlotViewer) - { - RimWellLogPlot* wellLogPlot = wellLogPlotViewer->ownerPlotDefinition(); + // Select in Project Tree - if (wellLogPlot != RiaApplication::instance()->activeWellLogPlot()) - { - RiaApplication::instance()->setActiveWellLogPlot(wellLogPlot); - projectTreeView()->selectAsCurrentItem(wellLogPlot); - } - } - else - { - RiaApplication::instance()->setActiveWellLogPlot(NULL); - } - } + RimViewWindow* viewWindow = RiuInterfaceToViewWindow::viewWindowFromWidget(subWindow->widget()); + if (viewWindow && viewWindow != m_activePlotViewWindow) { - RiuSummaryQwtPlot* summaryPlotViewer = dynamic_cast(subWindow->widget()); - if (summaryPlotViewer) - { - RimSummaryPlot* summaryPlot = summaryPlotViewer->ownerPlotDefinition(); - - if (summaryPlot != RiaApplication::instance()->activeSummaryPlot()) - { - RiaApplication::instance()->setActiveSummaryPlot(summaryPlot); - projectTreeView()->selectAsCurrentItem(summaryPlot); - } - } - else + if (!m_blockSlotSubWindowActivated) { - RiaApplication::instance()->setActiveSummaryPlot(NULL); + selectAsCurrentItem(viewWindow); } + + m_activePlotViewWindow = viewWindow; } } @@ -573,58 +590,28 @@ void RiuMainPlotWindow::selectedObjectsChanged() if (!firstSelectedObject) return; - // Well log plot - - bool isActiveWellLogPlotChanged = false; - - RimWellLogPlot* selectedWellLogPlot = dynamic_cast(firstSelectedObject); - - if (!selectedWellLogPlot) + RimViewWindow* selectedWindow = dynamic_cast(firstSelectedObject); + if (!selectedWindow) { - firstSelectedObject->firstAncestorOrThisOfType(selectedWellLogPlot); + firstSelectedObject->firstAncestorOrThisOfType(selectedWindow); } - if (selectedWellLogPlot) + // If we cant find the view window as an MDI sub window, we search higher in the + // project tree to find a possible parent view window that has. + if (selectedWindow && !findMdiSubWindow(selectedWindow->viewWidget())) { - if (selectedWellLogPlot->viewWidget()) + if (selectedWindow->parentField() && selectedWindow->parentField()->ownerObject()) { - setActiveViewer(selectedWellLogPlot->viewWidget()); + selectedWindow->parentField()->ownerObject()->firstAncestorOrThisOfType(selectedWindow); } - isActiveWellLogPlotChanged = true; - } - - if (isActiveWellLogPlotChanged) - { - RiaApplication::instance()->setActiveWellLogPlot(selectedWellLogPlot); } - // Summary plot - - bool isActiveSummaryPlotChanged = false; - - RimSummaryPlot* selectedSummaryPlot = dynamic_cast(firstSelectedObject); - - if (!selectedSummaryPlot) + if (selectedWindow) { - firstSelectedObject->firstAncestorOrThisOfType(selectedSummaryPlot); - } - - if (selectedSummaryPlot) - { - if (selectedSummaryPlot->viewWidget()) + if (selectedWindow->viewWidget()) { - setActiveViewer(selectedSummaryPlot->viewWidget()); + setActiveViewer(selectedWindow->viewWidget()); } - isActiveSummaryPlotChanged = true; - } - - if (isActiveSummaryPlotChanged) - { - RiaApplication::instance()->setActiveSummaryPlot(selectedSummaryPlot); - } - - if (isActiveWellLogPlotChanged || isActiveSummaryPlotChanged) - { // The only way to get to this code is by selection change initiated from the project tree view // As we are activating an MDI-window, the focus is given to this MDI-window // Set focus back to the tree view to be able to continue keyboard tree view navigation @@ -722,32 +709,12 @@ RimMdiWindowGeometry RiuMainPlotWindow::windowGeometryForViewer(QWidget* viewer) QMdiSubWindow* mdiWindow = findMdiSubWindow(viewer); if (mdiWindow) { - return windowGeometryForWidget(mdiWindow); + return RiuMdiSubWindow::windowGeometryForWidget(mdiWindow); } RimMdiWindowGeometry geo; return geo; } - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RimMdiWindowGeometry RiuMainPlotWindow::windowGeometryForWidget(QWidget* widget) -{ - RimMdiWindowGeometry geo; - - if (widget) - { - geo.x = widget->pos().x(); - geo.y = widget->pos().y(); - geo.width = widget->size().width(); - geo.height = widget->size().height(); - geo.isMaximized = widget->isMaximized(); - } - - return geo; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/UserInterface/RiuMainPlotWindow.h b/ApplicationCode/UserInterface/RiuMainPlotWindow.h index 77f3fd2a89..89d1aad8d7 100644 --- a/ApplicationCode/UserInterface/RiuMainPlotWindow.h +++ b/ApplicationCode/UserInterface/RiuMainPlotWindow.h @@ -31,6 +31,7 @@ class QMdiSubWindow; class RiuViewer; struct RimMdiWindowGeometry; +class RimViewWindow; namespace caf { @@ -57,9 +58,9 @@ class RiuMainPlotWindow : public RiuMainWindowBase void initializeGuiNewProjectLoaded(); void cleanupGuiBeforeProjectClose(); - void removeViewer( QWidget* viewer ); - void addViewer(QWidget* viewer, const RimMdiWindowGeometry& windowsGeometry); - void setActiveViewer(QWidget* subWindow); + void removeViewer( QWidget* viewer ) override; + void addViewer(QWidget* viewer, const RimMdiWindowGeometry& windowsGeometry) override; + void setActiveViewer(QWidget* subWindow) override; caf::PdmUiTreeView* projectTreeView() { return m_projectTreeView;} @@ -71,14 +72,15 @@ class RiuMainPlotWindow : public RiuMainWindowBase void setExpanded(const caf::PdmUiItem* uiItem, bool expanded); - RimMdiWindowGeometry windowGeometryForViewer(QWidget* viewer); - RimMdiWindowGeometry windowGeometryForWidget(QWidget* widget); + RimMdiWindowGeometry windowGeometryForViewer(QWidget* viewer) override; void tileWindows(); bool isAnyMdiSubWindowVisible(); QMdiSubWindow* findMdiSubWindow(QWidget* viewer); QList subWindowList(QMdiArea::WindowOrder order); + void addToTemporaryWidgets(QWidget* widget); + protected: virtual void closeEvent(QCloseEvent* event); @@ -113,7 +115,8 @@ private slots: QMdiArea* m_mdiArea; RiuViewer* m_mainViewer; - + RimViewWindow* m_activePlotViewWindow; + QMenu* m_windowMenu; caf::PdmUiTreeView* m_projectTreeView; @@ -124,4 +127,6 @@ private slots: caf::PdmUiPropertyView* m_pdmUiPropertyView; bool m_blockSlotSubWindowActivated; + + std::vector m_temporaryWidgets; }; diff --git a/ApplicationCode/UserInterface/RiuMainWindow.cpp b/ApplicationCode/UserInterface/RiuMainWindow.cpp index dd6725fca5..21149dbee1 100644 --- a/ApplicationCode/UserInterface/RiuMainWindow.cpp +++ b/ApplicationCode/UserInterface/RiuMainWindow.cpp @@ -38,6 +38,7 @@ #include "RiuDragDrop.h" #include "RiuMdiSubWindow.h" +#include "RiuMessagePanel.h" #include "RiuProcessMonitor.h" #include "RiuProjectPropertyView.h" #include "RiuPropertyViewTabWidget.h" @@ -55,6 +56,9 @@ #include "cafPdmUiPropertyViewDialog.h" #include "cafPdmUiTreeView.h" #include "cafSelectionManager.h" +#include "cafUtils.h" + +#include "cvfTimer.h" #include #include @@ -70,6 +74,9 @@ #include +#define DOCK_PANEL_NAME_PROCESS_MONITOR "dockProcessMonitor" + + //================================================================================================== /// @@ -141,6 +148,11 @@ void RiuMainWindow::initializeGuiNewProjectLoaded() refreshAnimationActions(); refreshDrawStyleActions(); + if (m_pdmUiPropertyView && m_pdmUiPropertyView->currentObject()) + { + m_pdmUiPropertyView->currentObject()->uiCapability()->updateConnectedEditors(); + } + m_processMonitor->slotClearTextEdit(); } @@ -186,15 +198,24 @@ void RiuMainWindow::cleanupGuiBeforeProjectClose() //-------------------------------------------------------------------------------------------------- void RiuMainWindow::closeEvent(QCloseEvent* event) { - saveWinGeoAndDockToolBarLayout(); - RiaApplication* app = RiaApplication::instance(); + if (app->isMainPlotWindowVisible()) + { + return; + } + + if (!app->askUserToSaveModifiedProject()) + { + event->ignore(); + return; + } + + saveWinGeoAndDockToolBarLayout(); + if (!app->tryClosePlotWindow()) return; - RiaApplication::instance()->closeProject(); - - event->accept(); + app->closeProject(); } //-------------------------------------------------------------------------------------------------- @@ -286,11 +307,10 @@ void RiuMainWindow::createActions() m_toggleFaultsLabelAction->setCheckable(true); connect(m_toggleFaultsLabelAction, SIGNAL(toggled(bool)), SLOT(slotToggleFaultLabelsAction(bool))); - m_addWellCellsToRangeFilterAction = new QAction(QIcon(":/draw_style_WellCellsToRangeFilter_24x24.png"), "&Add Well Cells To Range Filter", this); - m_addWellCellsToRangeFilterAction->setCheckable(true); - m_addWellCellsToRangeFilterAction->setToolTip("Add Well Cells To Range Filter based on the individual settings"); - connect(m_addWellCellsToRangeFilterAction, SIGNAL(toggled(bool)), SLOT(slotAddWellCellsToRangeFilterAction(bool))); - + m_showWellCellsAction = new QAction(QIcon(":/draw_style_WellCellsToRangeFilter_24x24.png"), "&Show Well Cells", this); + m_showWellCellsAction->setCheckable(true); + m_showWellCellsAction->setToolTip("Show Well Cells"); + connect(m_showWellCellsAction, SIGNAL(toggled(bool)), SLOT(slotShowWellCellsAction(bool))); } //-------------------------------------------------------------------------------------------------- @@ -314,7 +334,6 @@ void RiuMainWindow::createMenus() QMenu* importMenu = fileMenu->addMenu("&Import"); importMenu->addAction(cmdFeatureMgr->action("RicImportEclipseCaseFeature")); importMenu->addAction(cmdFeatureMgr->action("RicImportInputEclipseCaseFeature")); - //importMenu->addAction(cmdFeatureMgr->action("RicImportInputEclipseCaseOpmFeature")); importMenu->addAction(cmdFeatureMgr->action("RicImportSummaryCaseFeature")); importMenu->addAction(cmdFeatureMgr->action("RicCreateGridCaseGroupFeature")); importMenu->addSeparator(); @@ -331,6 +350,7 @@ void RiuMainWindow::createMenus() QMenu* exportMenu = fileMenu->addMenu("&Export"); exportMenu->addAction(cmdFeatureMgr->action("RicSnapshotViewToFileFeature")); exportMenu->addAction(m_snapshotAllViewsToFile); + exportMenu->addAction(cmdFeatureMgr->action("RicExportMultipleSnapshotsFeature")); fileMenu->addSeparator(); fileMenu->addAction(cmdFeatureMgr->action("RicSaveProjectFeature")); @@ -375,8 +395,6 @@ void RiuMainWindow::createMenus() connect(viewMenu, SIGNAL(aboutToShow()), SLOT(slotRefreshViewActions())); // Debug menu - testMenu->addAction(cmdFeatureMgr->action("RicImportInputEclipseCaseOpmFeature")); - testMenu->addAction(m_mockModelAction); testMenu->addAction(m_mockResultsModelAction); testMenu->addAction(m_mockLargeResultsModelAction); @@ -470,7 +488,7 @@ void RiuMainWindow::createToolBars() dsToolBar->addAction(m_disableLightingAction); dsToolBar->addAction(m_drawStyleHideGridCellsAction); dsToolBar->addAction(m_toggleFaultsLabelAction); - dsToolBar->addAction(m_addWellCellsToRangeFilterAction); + dsToolBar->addAction(m_showWellCellsAction); } // Create animation toolbar @@ -550,8 +568,6 @@ void RiuMainWindow::createDockPanels() m_pdmUiPropertyView = new caf::PdmUiPropertyView(dockWidget); dockWidget->setWidget(m_pdmUiPropertyView); - m_pdmUiPropertyView->layout()->setContentsMargins(5,0,0,0); - addDockWidget(Qt::LeftDockWidgetArea, dockWidget); } @@ -567,7 +583,7 @@ void RiuMainWindow::createDockPanels() { QDockWidget* dockPanel = new QDockWidget("Process Monitor", this); - dockPanel->setObjectName("dockProcessMonitor"); + dockPanel->setObjectName(DOCK_PANEL_NAME_PROCESS_MONITOR); dockPanel->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea | Qt::BottomDockWidgetArea); m_processMonitor = new RiuProcessMonitor(dockPanel); dockPanel->setWidget(m_processMonitor); @@ -586,6 +602,15 @@ void RiuMainWindow::createDockPanels() addDockWidget(Qt::BottomDockWidgetArea, dockPanel); } + { + QDockWidget* dockWidget = new QDockWidget("Messages", this); + dockWidget->setObjectName("dockMessages"); + m_messagePanel = new RiuMessagePanel(dockWidget); + dockWidget->setWidget(m_messagePanel); + addDockWidget(Qt::BottomDockWidgetArea, dockWidget); + dockWidget->hide(); + } + setCorner(Qt::BottomLeftCorner, Qt::LeftDockWidgetArea); setCorner(Qt::BottomRightCorner, Qt::BottomDockWidgetArea); } @@ -613,7 +638,7 @@ void RiuMainWindow::slotRefreshFileActions() { RiaApplication* app = RiaApplication::instance(); - bool projectFileExists = QFile::exists(app->project()->fileName()); + bool projectFileExists = caf::Utils::fileExists(app->project()->fileName()); caf::CmdFeatureManager* cmdFeatureMgr = caf::CmdFeatureManager::instance(); CVF_ASSERT(cmdFeatureMgr); @@ -800,6 +825,14 @@ RiuResultQwtPlot* RiuMainWindow::resultPlot() return m_resultQwtPlot; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuMessagePanel* RiuMainWindow::messagePanel() +{ + return m_messagePanel; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -1372,7 +1405,7 @@ void RiuMainWindow::refreshDrawStyleActions() enable = enable && eclView; m_toggleFaultsLabelAction->setEnabled(enable); - m_addWellCellsToRangeFilterAction->setEnabled(enable); + m_showWellCellsAction->setEnabled(enable); if (enable) { @@ -1380,9 +1413,10 @@ void RiuMainWindow::refreshDrawStyleActions() m_toggleFaultsLabelAction->setChecked(eclView->faultCollection()->showFaultLabel()); m_toggleFaultsLabelAction->blockSignals(false); - m_addWellCellsToRangeFilterAction->blockSignals(true); - m_addWellCellsToRangeFilterAction->setChecked(eclView->wellCollection()->wellCellsToRangeFilterMode() != RimEclipseWellCollection::RANGE_ADD_NONE); - m_addWellCellsToRangeFilterAction->blockSignals(false); + m_showWellCellsAction->blockSignals(true); + eclView->wellCollection()->updateStateForVisibilityCheckboxes(); + m_showWellCellsAction->setChecked(eclView->wellCollection()->showWellCells()); + m_showWellCellsAction->blockSignals(false); } } @@ -1422,6 +1456,31 @@ void RiuMainWindow::restoreTreeViewState() } } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuMainWindow::showDockPanel(const QString &dockPanelName) +{ + QList dockWidgets = findChildren(); + + foreach (QDockWidget* dock, dockWidgets) + { + if (dock && dock->objectName() == dockPanelName) + { + dock->show(); + return; + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuMainWindow::showProcessMonitorDockPanel() +{ + showDockPanel(DOCK_PANEL_NAME_PROCESS_MONITOR); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -1569,15 +1628,12 @@ void RiuMainWindow::setDefaultWindowSize() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuMainWindow::slotAddWellCellsToRangeFilterAction(bool doAdd) +void RiuMainWindow::slotShowWellCellsAction(bool doAdd) { RimEclipseView* riv = dynamic_cast(RiaApplication::instance()->activeReservoirView()); if (riv) { - caf::AppEnum rangeAddType; - rangeAddType = doAdd ? RimEclipseWellCollection::RANGE_ADD_INDIVIDUAL : RimEclipseWellCollection::RANGE_ADD_NONE; - - riv->wellCollection()->wellCellsToRangeFilterMode.setValueWithFieldChanged(rangeAddType); + riv->wellCollection()->setShowWellCellsState(doAdd); } } @@ -1618,32 +1674,13 @@ RimMdiWindowGeometry RiuMainWindow::windowGeometryForViewer(QWidget* viewer) QMdiSubWindow* mdiWindow = findMdiSubWindow(viewer); if (mdiWindow) { - return windowGeometryForWidget(mdiWindow); + return RiuMdiSubWindow::windowGeometryForWidget(mdiWindow); } RimMdiWindowGeometry geo; return geo; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RimMdiWindowGeometry RiuMainWindow::windowGeometryForWidget(QWidget* widget) -{ - RimMdiWindowGeometry geo; - - if (widget) - { - geo.x = widget->pos().x(); - geo.y = widget->pos().y(); - geo.width = widget->size().width(); - geo.height = widget->size().height(); - geo.isMaximized = widget->isMaximized(); - } - - return geo; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/UserInterface/RiuMainWindow.h b/ApplicationCode/UserInterface/RiuMainWindow.h index b01e20cea2..903db4adc1 100644 --- a/ApplicationCode/UserInterface/RiuMainWindow.h +++ b/ApplicationCode/UserInterface/RiuMainWindow.h @@ -37,17 +37,20 @@ class QSpinBox; class QUndoView; class RimCase; + +class RiuMessagePanel; class RiuProcessMonitor; class RiuResultInfoPanel; -class RiuViewer; class RiuResultQwtPlot; +class RiuViewer; + struct RimMdiWindowGeometry; namespace caf { class PdmUiTreeView; class AnimationToolBar; - class PdmObject; + class PdmObject; class PdmUiPropertyView; class PdmUiItem; } @@ -77,9 +80,9 @@ class RiuMainWindow : public RiuMainWindowBase void cleanupGuiCaseClose(); void cleanupGuiBeforeProjectClose(); - void removeViewer( QWidget* viewer ); - void addViewer(QWidget* viewer, const RimMdiWindowGeometry& windowsGeometry); - void setActiveViewer(QWidget* subWindow); + void removeViewer( QWidget* viewer ) override; + void addViewer(QWidget* viewer, const RimMdiWindowGeometry& windowsGeometry) override; + void setActiveViewer(QWidget* subWindow) override; void setResultInfo(const QString& info) const; @@ -102,14 +105,16 @@ class RiuMainWindow : public RiuMainWindowBase void setExpanded(const caf::PdmUiItem* uiItem, bool expanded); RimMdiWindowGeometry windowGeometryForViewer(QWidget* viewer); - RimMdiWindowGeometry windowGeometryForWidget(QWidget* widget); void tileWindows(); bool isAnyMdiSubWindowVisible(); QMdiSubWindow* findMdiSubWindow(QWidget* viewer); QList subWindowList(QMdiArea::WindowOrder order); - RiuResultQwtPlot* resultPlot(); + RiuResultQwtPlot* resultPlot(); + RiuMessagePanel* messagePanel(); + + void showProcessMonitorDockPanel(); protected: virtual void closeEvent(QCloseEvent* event); @@ -122,6 +127,8 @@ class RiuMainWindow : public RiuMainWindowBase void restoreTreeViewState(); + void showDockPanel(const QString& dockPanelName); + private: static RiuMainWindow* sm_mainWindowInstance; @@ -158,6 +165,7 @@ class RiuMainWindow : public RiuMainWindowBase RiuViewer* m_mainViewer; RiuResultInfoPanel* m_resultInfoPanel; RiuProcessMonitor* m_processMonitor; + QPointer m_messagePanel; RiuResultQwtPlot* m_resultQwtPlot; @@ -191,7 +199,7 @@ private slots: void slotToggleFaultLabelsAction(bool); void slotDisableLightingAction(bool); - void slotAddWellCellsToRangeFilterAction(bool doAdd); + void slotShowWellCellsAction(bool doAdd); // Debug slots void slotUseShaders(bool enable); @@ -246,7 +254,7 @@ private slots: QAction* m_drawStyleLinesSolidAction; QAction* m_drawStyleFaultLinesSolidAction; QAction* m_drawStyleSurfOnlyAction; - QAction* m_addWellCellsToRangeFilterAction; + QAction* m_showWellCellsAction; std::vector > additionalProjectViews; diff --git a/ApplicationCode/UserInterface/RiuMainWindowBase.h b/ApplicationCode/UserInterface/RiuMainWindowBase.h index 4352d66b3f..ce4cafc65c 100644 --- a/ApplicationCode/UserInterface/RiuMainWindowBase.h +++ b/ApplicationCode/UserInterface/RiuMainWindowBase.h @@ -19,6 +19,7 @@ #pragma once #include +struct RimMdiWindowGeometry; class RiuMainWindowBase : public QMainWindow { @@ -29,6 +30,12 @@ class RiuMainWindowBase : public QMainWindow virtual QString mainWindowName() = 0; + virtual void removeViewer( QWidget* viewer ) = 0; + virtual void addViewer(QWidget* viewer, const RimMdiWindowGeometry& windowsGeometry)= 0; + virtual void setActiveViewer(QWidget* subWindow) = 0; + + virtual RimMdiWindowGeometry windowGeometryForViewer(QWidget* viewer) = 0; + void loadWinGeoAndDockToolBarLayout(); void saveWinGeoAndDockToolBarLayout(); void showWindow(); diff --git a/ApplicationCode/UserInterface/RiuMdiSubWindow.cpp b/ApplicationCode/UserInterface/RiuMdiSubWindow.cpp index 8b7ce8911f..fc20f0fa30 100644 --- a/ApplicationCode/UserInterface/RiuMdiSubWindow.cpp +++ b/ApplicationCode/UserInterface/RiuMdiSubWindow.cpp @@ -53,30 +53,58 @@ void RiuMdiSubWindow::closeEvent(QCloseEvent* event) { QWidget* mainWidget = widget(); - RiuWellLogPlot* wellLogPlot = dynamic_cast(mainWidget); - RiuSummaryQwtPlot* summaryPlot = dynamic_cast(mainWidget); - if (wellLogPlot) + RimViewWindow* viewWindow = RiuInterfaceToViewWindow::viewWindowFromWidget(mainWidget); + if ( viewWindow ) { - RiuMainPlotWindow* mainPlotWindow = RiaApplication::instance()->mainPlotWindow(); - CVF_ASSERT(mainPlotWindow); - - wellLogPlot->ownerPlotDefinition()->setMdiWindowGeometry(mainPlotWindow->windowGeometryForWidget(this)); - } - else if (summaryPlot) - { - RiuMainPlotWindow* mainPlotWindow = RiaApplication::instance()->mainPlotWindow(); - CVF_ASSERT(mainPlotWindow); - - summaryPlot->ownerPlotDefinition()->setMdiWindowGeometry(mainPlotWindow->windowGeometryForWidget(this)); + viewWindow->setMdiWindowGeometry(windowGeometryForWidget(this)); } else { RiuViewer* viewer = mainWidget->findChild(); if (viewer) { - viewer->ownerReservoirView()->setMdiWindowGeometry(RiuMainWindow::instance()->windowGeometryForWidget(this)); + viewer->ownerReservoirView()->setMdiWindowGeometry(windowGeometryForWidget(this)); } } - QMdiSubWindow::closeEvent(event); } + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimMdiWindowGeometry RiuMdiSubWindow::windowGeometryForWidget(QWidget* widget) +{ + RimMdiWindowGeometry geo; + + // Find topmost parent + + QWidget* nextParent = widget->parentWidget(); + QWidget* parent = nullptr; + while(nextParent) + { + parent = nextParent; + nextParent = nextParent->parentWidget(); + } + + int mainWinID = 0; + if (parent) + { + if (parent == RiaApplication::instance()->mainPlotWindow()) + { + mainWinID = 1; + } + } + + if (widget) + { + geo.mainWindowID = mainWinID; + geo.x = widget->pos().x(); + geo.y = widget->pos().y(); + geo.width = widget->size().width(); + geo.height = widget->size().height(); + geo.isMaximized = widget->isMaximized(); + } + + return geo; +} diff --git a/ApplicationCode/UserInterface/RiuMdiSubWindow.h b/ApplicationCode/UserInterface/RiuMdiSubWindow.h index 53dbba7a2f..ed043f0e9f 100644 --- a/ApplicationCode/UserInterface/RiuMdiSubWindow.h +++ b/ApplicationCode/UserInterface/RiuMdiSubWindow.h @@ -19,6 +19,7 @@ #pragma once #include +#include "RimViewWindow.h" class RiuMdiSubWindow : public QMdiSubWindow @@ -28,6 +29,8 @@ class RiuMdiSubWindow : public QMdiSubWindow ~RiuMdiSubWindow(); + static RimMdiWindowGeometry windowGeometryForWidget(QWidget* widget); + protected: virtual void closeEvent(QCloseEvent* event); }; diff --git a/ApplicationCode/UserInterface/RiuMessagePanel.cpp b/ApplicationCode/UserInterface/RiuMessagePanel.cpp new file mode 100644 index 0000000000..fa35977dc3 --- /dev/null +++ b/ApplicationCode/UserInterface/RiuMessagePanel.cpp @@ -0,0 +1,199 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RiuMessagePanel.h" + +#include +#include +#include +#include + + + +//================================================================================================== +// +// +// +//================================================================================================== + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuMessagePanel::RiuMessagePanel(QDockWidget* parent) +: QWidget(parent) +{ + QVBoxLayout* layout = new QVBoxLayout(this); + layout->setMargin(0); + + m_textEdit = new QPlainTextEdit; + m_textEdit->setReadOnly(true); + m_textEdit->setLineWrapMode(QPlainTextEdit::NoWrap); + m_textEdit->setContextMenuPolicy(Qt::CustomContextMenu); + + connect(m_textEdit, SIGNAL(customContextMenuRequested(const QPoint&)), SLOT(slotShowContextMenu(const QPoint&))); + + layout->addWidget(m_textEdit); +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuMessagePanel::addMessage(RILogLevel messageLevel, const QString& msg) +{ + QColor clr(Qt::black); + if (messageLevel == RI_LL_ERROR) clr = Qt::red; + else if (messageLevel == RI_LL_WARNING) clr = QColor(220,100,10); + else if (messageLevel == RI_LL_DEBUG) clr = QColor(100,100,200); + + QTextCharFormat form = m_textEdit->currentCharFormat(); + form.setForeground(clr); + form.setFontWeight(messageLevel == RI_LL_ERROR ? QFont::DemiBold : QFont::Normal); + form.setFontItalic(messageLevel == RI_LL_DEBUG ? true : false); + m_textEdit->setCurrentCharFormat(form); + m_textEdit->appendPlainText(msg); + + m_textEdit->moveCursor(QTextCursor::End); + m_textEdit->ensureCursorVisible(); +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QSize RiuMessagePanel::sizeHint() const +{ + return QSize(20, 20); +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuMessagePanel::slotShowContextMenu(const QPoint& pos) +{ + QMenu* menu = m_textEdit->createStandardContextMenu(); + + menu->addSeparator(); + menu->addAction("Clear All &Messages", this, SLOT(slotClearMessages())); + + menu->exec(m_textEdit->mapToGlobal(pos)); + + delete menu; +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuMessagePanel::slotClearMessages() +{ + m_textEdit->clear(); + + RiaLogging::info("Message window cleared."); +} + + + +//================================================================================================== +// +// +// +//================================================================================================== + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuMessagePanelLogger::RiuMessagePanelLogger(RiuMessagePanel* messagePanel) +: m_messagePanel(messagePanel), + m_logLevel(RI_LL_WARNING) +{ +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +int RiuMessagePanelLogger::level() const +{ + return m_logLevel; +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuMessagePanelLogger::setLevel(int logLevel) +{ + m_logLevel = logLevel; +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuMessagePanelLogger::error(const char* message) +{ + writeToMessagePanel(RI_LL_ERROR, message); +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuMessagePanelLogger::warning(const char* message) +{ + writeToMessagePanel(RI_LL_WARNING, message); +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuMessagePanelLogger::info(const char* message) +{ + writeToMessagePanel(RI_LL_INFO, message); +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuMessagePanelLogger::debug(const char* message) +{ + writeToMessagePanel(RI_LL_DEBUG, message); +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuMessagePanelLogger::writeToMessagePanel(RILogLevel messageLevel, const char* message) +{ + if (messageLevel > m_logLevel) + { + return; + } + + if (m_messagePanel) + { + m_messagePanel->addMessage(messageLevel, message); + } +} + + diff --git a/ApplicationCode/UserInterface/RiuMessagePanel.h b/ApplicationCode/UserInterface/RiuMessagePanel.h new file mode 100644 index 0000000000..133f1c295f --- /dev/null +++ b/ApplicationCode/UserInterface/RiuMessagePanel.h @@ -0,0 +1,80 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "RiaLogging.h" + +#include +#include + +class QDockWidget; +class QPlainTextEdit; + + +//================================================================================================== +// +// +// +//================================================================================================== +class RiuMessagePanel : public QWidget +{ + Q_OBJECT + +public: + explicit RiuMessagePanel(QDockWidget* parent); + + void addMessage(RILogLevel messageLevel, const QString& msg); + virtual QSize sizeHint () const; + +private slots: + void slotShowContextMenu(const QPoint& pos); + void slotClearMessages(); + +private: + QPointer m_textEdit; +}; + + + +//================================================================================================== +// +// +// +//================================================================================================== +class RiuMessagePanelLogger : public RiaLogger +{ +public: + explicit RiuMessagePanelLogger(RiuMessagePanel* messagePanel); + + virtual int level() const override; + virtual void setLevel(int logLevel) override; + + virtual void error( const char* message) override; + virtual void warning(const char* message) override; + virtual void info( const char* message) override; + virtual void debug( const char* message) override; + +private: + void writeToMessagePanel(RILogLevel messageLevel, const char* message); + +private: + QPointer m_messagePanel; + int m_logLevel; +}; + diff --git a/ApplicationCode/UserInterface/RiuMultiCaseImportDialog.cpp b/ApplicationCode/UserInterface/RiuMultiCaseImportDialog.cpp index 4c56698144..e7d6ea6389 100644 --- a/ApplicationCode/UserInterface/RiuMultiCaseImportDialog.cpp +++ b/ApplicationCode/UserInterface/RiuMultiCaseImportDialog.cpp @@ -27,7 +27,7 @@ class FileListModel: public QStringListModel { public: - FileListModel(QObject *parent = 0) : m_isItemsEditable(false), QStringListModel(parent) + explicit FileListModel(QObject *parent = 0) : m_isItemsEditable(false), QStringListModel(parent) { } @@ -76,7 +76,7 @@ class FileListModel: public QStringListModel /// //-------------------------------------------------------------------------------------------------- RiuMultiCaseImportDialog::RiuMultiCaseImportDialog(QWidget *parent /*= 0*/) - : QDialog(parent) + : QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint) { ui = new Ui::RiuMultiCaseImportDialog; ui->setupUi(this); diff --git a/ApplicationCode/UserInterface/RiuMultiCaseImportDialog.h b/ApplicationCode/UserInterface/RiuMultiCaseImportDialog.h index 815628d147..4030c384eb 100644 --- a/ApplicationCode/UserInterface/RiuMultiCaseImportDialog.h +++ b/ApplicationCode/UserInterface/RiuMultiCaseImportDialog.h @@ -37,7 +37,7 @@ class RiuMultiCaseImportDialog: public QDialog Q_OBJECT public: - RiuMultiCaseImportDialog(QWidget *parent = 0); + explicit RiuMultiCaseImportDialog(QWidget *parent = 0); virtual ~RiuMultiCaseImportDialog(); QStringList eclipseCaseFileNames() const; diff --git a/ApplicationCode/UserInterface/RiuNightchartsWidget.cpp b/ApplicationCode/UserInterface/RiuNightchartsWidget.cpp new file mode 100644 index 0000000000..31557fa5e6 --- /dev/null +++ b/ApplicationCode/UserInterface/RiuNightchartsWidget.cpp @@ -0,0 +1,192 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RiuNightchartsWidget.h" + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuNightchartsWidget::RiuNightchartsWidget(QWidget* parent) : + QWidget(parent) +{ + m_showLegend = true; + m_showPie = true; + updateSizePolicy(); + clear(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuNightchartsWidget::setType(Nightcharts::type t) +{ + m_chart.setType(t); +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuNightchartsWidget::showLegend(bool doShow) +{ + m_showLegend = doShow; + updateSizePolicy(); + +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuNightchartsWidget::showPie(bool doShow) +{ + m_showPie = doShow; + updateSizePolicy(); + +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuNightchartsWidget::updateSizePolicy() +{ + if (m_showPie && m_showLegend) + { + this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); + } + else if (m_showPie && !m_showLegend ) + { + this->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum); + } + else if (!m_showPie && m_showLegend ) + { + this->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); + } + else + { + this->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuNightchartsWidget::clear() +{ + m_chart = Nightcharts(); + m_chart.setType(Nightcharts::Pie); + m_chart.setLegendType(Nightcharts::Vertical); + m_chart.setShadows(false); + + m_marginLeft = 10; + m_marginTop = 10; + m_maxNameWidth = 0; +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QSize RiuNightchartsWidget::sizeHint() const +{ + int widthHint = 0; + int heightHint = 0; + + if ( m_showLegend ) + { + int lineHeight = this->fontMetrics().height(); + int lineCount = m_chart.pieceCount(); + + int exactLegendHeight = (lineCount + lineCount-1) * lineHeight; + + widthHint = m_maxNameWidth + 5 + lineHeight; + heightHint = exactLegendHeight; + } + + if (m_showPie) + { + int maxPieSize = 180; + + widthHint = widthHint + maxPieSize; + heightHint = heightHint > maxPieSize ? heightHint : maxPieSize; + } + + if ( m_showPie || m_showLegend ) + { + widthHint += 2*m_marginLeft; + heightHint += 2*m_marginTop; + return QSize(widthHint, heightHint); + } + else + { + return QSize(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuNightchartsWidget::paintEvent(QPaintEvent* e) +{ + QWidget::paintEvent(e); + + if(!m_chart.pieceCount()) return ; + + QPainter painter; + painter.begin(this); + + int legendWidth = 170; + int legendMargin = 20; + + if (!m_showLegend) + { + legendWidth = 0; + legendMargin = 0; + } + + int w = (this->width() - 2* m_marginLeft - legendWidth - legendMargin); + int h = (this->height() - 2* m_marginTop ); + + int size = ( w < h ) ? w : h; + + if ( m_showPie ) + { + m_chart.setCords(m_marginLeft, m_marginTop, size, size); + m_chart.setLegendCords(m_marginLeft + size + legendMargin, m_marginTop); + } + else + { + m_chart.setLegendCords(m_marginLeft, m_marginTop); + } + + if (m_showPie) m_chart.draw(&painter); + + if ( m_showLegend) m_chart.drawLegend(&painter); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuNightchartsWidget::addItem(const QString& name, const QColor& color, float value) +{ + m_chart.addPiece(name, color, value); + int textWidth = this->fontMetrics().width(name + " (00 %)"); + + m_maxNameWidth = textWidth > m_maxNameWidth ? textWidth: m_maxNameWidth; +} diff --git a/ApplicationCode/UserInterface/RiuNightchartsWidget.h b/ApplicationCode/UserInterface/RiuNightchartsWidget.h new file mode 100644 index 0000000000..378f0177d5 --- /dev/null +++ b/ApplicationCode/UserInterface/RiuNightchartsWidget.h @@ -0,0 +1,59 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + + +#include "nightcharts/nightcharts.h" + +#include "cafPdmPointer.h" + +#include +#include + + +class RiuNightchartsWidget : public QWidget +{ + Q_OBJECT +public: + explicit RiuNightchartsWidget(QWidget* parent = 0); + + void addItem(const QString& name, const QColor& color, float value); + void setType(Nightcharts::type type); + void showLegend(bool doShow); + void showPie(bool doShow); + + void clear(); + + + virtual QSize sizeHint() const override; + +protected: + virtual void paintEvent(QPaintEvent* e); + +private: + void updateSizePolicy(); + + Nightcharts m_chart; + int m_marginLeft; + int m_marginTop; + bool m_showLegend; + bool m_showPie; + int m_maxNameWidth; +}; + diff --git a/ApplicationCode/UserInterface/RiuPlotObjectPicker.cpp b/ApplicationCode/UserInterface/RiuPlotObjectPicker.cpp new file mode 100644 index 0000000000..46c1f6d6f3 --- /dev/null +++ b/ApplicationCode/UserInterface/RiuPlotObjectPicker.cpp @@ -0,0 +1,67 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RiuPlotObjectPicker.h" + +#include "RiaApplication.h" +#include "RiuMainPlotWindow.h" + +#include + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuPlotObjectPicker::RiuPlotObjectPicker(QWidget* widget, caf::PdmObject* associatedObject) : + QObject(widget), + m_associatedObject(associatedObject) +{ + widget->installEventFilter(this); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RiuPlotObjectPicker::eventFilter(QObject* watchedObject, QEvent* event) +{ + RiuMainPlotWindow* mainPlotWindow = RiaApplication::instance()->mainPlotWindow(); + if (mainPlotWindow && m_associatedObject.notNull()) + { + if (event->type() == QEvent::MouseButtonPress) + { + QMouseEvent* me = static_cast(event); + if (me->button() == Qt::RightButton) + { + mainPlotWindow->selectAsCurrentItem(m_associatedObject); + } + } + else if (event->type() == QEvent::MouseButtonRelease) + { + QMouseEvent* me = static_cast(event); + if (me->button() == Qt::LeftButton) + { + mainPlotWindow->selectAsCurrentItem(m_associatedObject); + return true; + } + } + } + + // standard event processing + return QObject::eventFilter(watchedObject, event); +} + diff --git a/ApplicationCode/UserInterface/RiuPlotObjectPicker.h b/ApplicationCode/UserInterface/RiuPlotObjectPicker.h new file mode 100644 index 0000000000..87f65556c8 --- /dev/null +++ b/ApplicationCode/UserInterface/RiuPlotObjectPicker.h @@ -0,0 +1,48 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + + +#include "cafPdmPointer.h" + +#include + +namespace caf { + class PdmObject; +} + +class QEvent; +class QWidget; + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +class RiuPlotObjectPicker : public QObject +{ +public: + explicit RiuPlotObjectPicker(QWidget* widget, caf::PdmObject* associatedObject); + +protected: + bool eventFilter(QObject* watched, QEvent* event) override; + +private: + caf::PdmPointer m_associatedObject; +}; + diff --git a/ApplicationCode/UserInterface/RiuProcessMonitor.h b/ApplicationCode/UserInterface/RiuProcessMonitor.h index 7a49b5ffd6..25bb54317f 100644 --- a/ApplicationCode/UserInterface/RiuProcessMonitor.h +++ b/ApplicationCode/UserInterface/RiuProcessMonitor.h @@ -46,7 +46,7 @@ class RiuProcessMonitor : public QWidget caf::UiProcess* m_monitoredProcess; // Pointer to the process we're monitoring. Needed to fetch text public: - RiuProcessMonitor(QDockWidget* pParent); + explicit RiuProcessMonitor(QDockWidget* pParent); ~RiuProcessMonitor(); void startMonitorWorkProcess(caf::UiProcess* process); diff --git a/ApplicationCode/UserInterface/RiuPropertyViewTabWidget.cpp b/ApplicationCode/UserInterface/RiuPropertyViewTabWidget.cpp index b6d6eb2e5c..4aa3cd5a86 100644 --- a/ApplicationCode/UserInterface/RiuPropertyViewTabWidget.cpp +++ b/ApplicationCode/UserInterface/RiuPropertyViewTabWidget.cpp @@ -26,12 +26,13 @@ #include #include #include +#include //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- RiuPropertyViewTabWidget::RiuPropertyViewTabWidget(QWidget* parent, caf::PdmObject* object, const QString& windowTitle, const QStringList& uiConfigNameForTabs) - : QDialog(parent) + : QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint) { setWindowTitle(windowTitle); @@ -39,9 +40,10 @@ RiuPropertyViewTabWidget::RiuPropertyViewTabWidget(QWidget* parent, caf::PdmObje for (int i = 0; i < uiConfigNameForTabs.size(); i++) { - // Use a container widget to get some UI space around a PdmUiPropertyView - QWidget* containerWidget = new QWidget; QHBoxLayout* widgetLayout = new QHBoxLayout; + widgetLayout->setContentsMargins(0, 0, 0, 0); + + QWidget* containerWidget = new QWidget; containerWidget->setLayout(widgetLayout); caf::PdmUiPropertyView* pdmUiPropertyView = new caf::PdmUiPropertyView(); @@ -60,7 +62,6 @@ RiuPropertyViewTabWidget::RiuPropertyViewTabWidget(QWidget* parent, caf::PdmObje dialogLayout->addWidget(tabWidget); - // Buttons QDialogButtonBox* buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())); @@ -79,3 +80,24 @@ RiuPropertyViewTabWidget::~RiuPropertyViewTabWidget() w->showProperties(NULL); } } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QSize RiuPropertyViewTabWidget::sizeHint() const +{ + QSize maxSizeHint = QDialog::sizeHint(); + //qDebug() << "dialog size hint : " << maxSizeHint; + + for (auto w : m_pageWidgets) + { + //qDebug() << "tab size hint" << w->sizeHint(); + + QSize pageSize = w->sizeHint(); + pageSize += QSize(0, 100); + + maxSizeHint = maxSizeHint.expandedTo(pageSize); + } + + return maxSizeHint; +} diff --git a/ApplicationCode/UserInterface/RiuPropertyViewTabWidget.h b/ApplicationCode/UserInterface/RiuPropertyViewTabWidget.h index 464d6c8d54..2f184b872c 100644 --- a/ApplicationCode/UserInterface/RiuPropertyViewTabWidget.h +++ b/ApplicationCode/UserInterface/RiuPropertyViewTabWidget.h @@ -36,6 +36,8 @@ class RiuPropertyViewTabWidget : public QDialog RiuPropertyViewTabWidget(QWidget* parent, caf::PdmObject* object, const QString& windowTitle, const QStringList& uiConfigNameForTabs); ~RiuPropertyViewTabWidget(); + virtual QSize sizeHint() const override; + private: std::vector m_pageWidgets; }; diff --git a/ApplicationCode/UserInterface/RiuQwtCurvePointTracker.cpp b/ApplicationCode/UserInterface/RiuQwtCurvePointTracker.cpp new file mode 100644 index 0000000000..3c83ce3ae8 --- /dev/null +++ b/ApplicationCode/UserInterface/RiuQwtCurvePointTracker.cpp @@ -0,0 +1,232 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RiuQwtCurvePointTracker.h" + +#include "qwt_plot_marker.h" +#include "qwt_symbol.h" + +#include "qwt_plot_curve.h" +#include "qwt_date_scale_draw.h" + +#include // For DBL_MAX + +#include + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuQwtCurvePointTracker::RiuQwtCurvePointTracker(QwtPlot* plot, bool isMainAxisHorizontal) + : QwtPlotPicker(plot->canvas()), m_plot(plot), m_isMainAxisHorizontal(isMainAxisHorizontal) +{ + this->setTrackerMode(QwtPicker::AlwaysOn); + m_plotMarker = new QwtPlotMarker; + + // QwtPlotMarker takes ownership of the symbol, it is deleted in destructor of QwtPlotMarker + QwtSymbol* mySymbol = new QwtSymbol(QwtSymbol::Ellipse, Qt::NoBrush, QPen(Qt::black, 2.0), QSize(12, 12)); + m_plotMarker->setSymbol(mySymbol); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuQwtCurvePointTracker::~RiuQwtCurvePointTracker() +{ + m_plotMarker->detach(); + delete m_plotMarker; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuQwtCurvePointTracker::removeMarkerOnFocusLeave() +{ + if ( m_plotMarker->plot() ) + { + m_plotMarker->detach(); + + m_plot->replot(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RiuQwtCurvePointTracker::eventFilter(QObject *watched, QEvent *event) +{ + if ( event->type() == QEvent::Leave ) + { + this->removeMarkerOnFocusLeave(); + } + + // pass the event on to the parent class + return QwtPlotPicker::eventFilter(watched, event); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QwtText RiuQwtCurvePointTracker::trackerText(const QPoint& pos) const +{ + QwtText txt; + + if ( m_plot ) + { + QwtPlot::Axis relatedYAxis = QwtPlot::yLeft; + QwtPlot::Axis relatedXAxis = QwtPlot::xBottom; + + QString mainAxisValueString; + QString valueAxisValueString; + QPointF closestPoint = closestCurvePoint(pos, &valueAxisValueString, &mainAxisValueString, &relatedXAxis, &relatedYAxis); + if ( !closestPoint.isNull() ) + { + QString str = valueAxisValueString; + + if ( !mainAxisValueString.isEmpty() ) + { + str += QString(" (%1)").arg(mainAxisValueString); + } + + txt.setText(str); + } + + updateClosestCurvePointMarker(closestPoint, relatedXAxis, relatedYAxis); + } + + return txt; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QPointF RiuQwtCurvePointTracker::closestCurvePoint(const QPoint& cursorPosition, QString* valueAxisValueString, QString* mainAxisValueString, QwtPlot::Axis* relatedXAxis, QwtPlot::Axis* relatedYAxis) const +{ + QPointF samplePoint; + + QwtPlotCurve* closestCurve = nullptr; + double distMin = DBL_MAX; + int closestPointSampleIndex = -1; + + const QwtPlotItemList& itmList = m_plot->itemList(); + for ( QwtPlotItemIterator it = itmList.begin(); it != itmList.end(); it++ ) + { + if ( (*it)->rtti() == QwtPlotItem::Rtti_PlotCurve ) + { + QwtPlotCurve* candidateCurve = static_cast(*it); + double dist = DBL_MAX; + int candidateSampleIndex = candidateCurve->closestPoint(cursorPosition, &dist); + if ( dist < distMin ) + { + closestCurve = candidateCurve; + distMin = dist; + closestPointSampleIndex = candidateSampleIndex; + } + } + } + + if ( closestCurve && distMin < 50 ) + { + samplePoint = closestCurve->sample(closestPointSampleIndex); + + if ( relatedXAxis ) *relatedXAxis = static_cast(closestCurve->xAxis()); + if ( relatedYAxis ) *relatedYAxis = static_cast(closestCurve->yAxis()); + } + + + if ( mainAxisValueString ) + { + const QwtScaleDraw* mainAxisScaleDraw = m_isMainAxisHorizontal ? m_plot->axisScaleDraw(*relatedXAxis): m_plot->axisScaleDraw(*relatedYAxis); + auto dateScaleDraw = dynamic_cast(mainAxisScaleDraw) ; + + qreal mainAxisSampleVal = 0.0; + if ( m_isMainAxisHorizontal ) + mainAxisSampleVal = samplePoint.x(); + else + mainAxisSampleVal = samplePoint.y(); + + if ( dateScaleDraw ) + { + QDateTime date = dateScaleDraw->toDateTime(mainAxisSampleVal); + *mainAxisValueString = date.toString("hh:mm dd.MMMM.yyyy"); + } + else if ( mainAxisScaleDraw ) + { + *mainAxisValueString = mainAxisScaleDraw->label(mainAxisSampleVal).text(); + } + } + + if ( valueAxisValueString && closestCurve ) + { + const QwtScaleDraw* valueAxisScaleDraw = m_isMainAxisHorizontal ? m_plot->axisScaleDraw(*relatedYAxis): m_plot->axisScaleDraw(*relatedXAxis); + + qreal valueAxisSampleVal = 0.0; + if ( m_isMainAxisHorizontal ) + valueAxisSampleVal = samplePoint.y(); + else + valueAxisSampleVal = samplePoint.x(); + + if ( valueAxisScaleDraw ) + { + *valueAxisValueString = valueAxisScaleDraw->label(valueAxisSampleVal).text(); + } + } + + return samplePoint; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuQwtCurvePointTracker::updateClosestCurvePointMarker(const QPointF& closestPoint, QwtPlot::Axis relatedXAxis, QwtPlot::Axis relatedYAxis) const +{ + bool replotRequired = false; + + if ( !closestPoint.isNull() ) + { + if ( !m_plotMarker->plot() ) + { + m_plotMarker->attach(m_plot); + + replotRequired = true; + } + + if ( m_plotMarker->value() != closestPoint ) + { + m_plotMarker->setValue(closestPoint.x(), closestPoint.y()); + + // Set the axes that the marker realtes to, to make the positioning correct + m_plotMarker->setAxes(relatedXAxis, relatedYAxis); + + // TODO : Should use a color or other visual indicator to show what axis the curve relates to + + replotRequired = true; + } + } + else + { + if ( m_plotMarker->plot() ) + { + m_plotMarker->detach(); + + replotRequired = true; + } + } + + if ( replotRequired ) m_plot->replot(); +} diff --git a/ApplicationCode/UserInterface/RiuQwtCurvePointTracker.h b/ApplicationCode/UserInterface/RiuQwtCurvePointTracker.h new file mode 100644 index 0000000000..9142950532 --- /dev/null +++ b/ApplicationCode/UserInterface/RiuQwtCurvePointTracker.h @@ -0,0 +1,55 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// +#pragma once + +#include "qwt_plot_picker.h" +#include "qwt_plot.h" + +#include + +class QwtPlotMarker; + +//-------------------------------------------------------------------------------------------------- +/// Class to add mouse over-tracking of curve points with text marker +//-------------------------------------------------------------------------------------------------- +class RiuQwtCurvePointTracker : public QwtPlotPicker +{ +public: + explicit RiuQwtCurvePointTracker(QwtPlot* plot, bool isMainAxisHorizontal); + ~RiuQwtCurvePointTracker(); + +protected: + + virtual bool eventFilter(QObject *, QEvent *) override; + void removeMarkerOnFocusLeave(); + + virtual QwtText trackerText(const QPoint& pos) const override; + QPointF closestCurvePoint(const QPoint& cursorPosition, + QString* valueAxisValueString, + QString* mainAxisValueString, + QwtPlot::Axis* relatedXAxis, + QwtPlot::Axis* relatedYAxis) const; + void updateClosestCurvePointMarker(const QPointF& closestPoint, + QwtPlot::Axis relatedXAxis, + QwtPlot::Axis relatedYAxis) const; + + QPointer m_plot; + QwtPlotMarker* m_plotMarker; + bool m_isMainAxisHorizontal; +}; + diff --git a/ApplicationCode/UserInterface/RiuQwtPlotWheelZoomer.cpp b/ApplicationCode/UserInterface/RiuQwtPlotWheelZoomer.cpp new file mode 100644 index 0000000000..72aee64f35 --- /dev/null +++ b/ApplicationCode/UserInterface/RiuQwtPlotWheelZoomer.cpp @@ -0,0 +1,73 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RiuQwtPlotWheelZoomer.h" +#include "qwt_plot.h" +#include +#include + +#define RIU_SCROLLWHEEL_ZOOMFACTOR 1.1 +#define RIU_SCROLLWHEEL_PANFACTOR 0.1 + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuQwtPlotWheelZoomer::RiuQwtPlotWheelZoomer(QwtPlot* plot): QObject(plot), m_plot(plot) +{ + plot->canvas()->installEventFilter(this); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void zoomOnAxis(QwtPlot* plot, QwtPlot::Axis axis, double zoomFactor, int eventPos) +{ + QwtScaleMap scaleMap = plot->canvasMap(axis); + double zoomCenter = scaleMap.invTransform(eventPos); + double newMin = zoomCenter - zoomFactor * (zoomCenter - scaleMap.s1()); + double newMax = zoomCenter + zoomFactor * (-zoomCenter + scaleMap.s2()); + plot->setAxisScale(axis, newMin, newMax); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RiuQwtPlotWheelZoomer::eventFilter(QObject * watched, QEvent * event) +{ + QWheelEvent* wheelEvent = dynamic_cast(event); + if ( wheelEvent ) + { + double zoomFactor = 1.0/RIU_SCROLLWHEEL_ZOOMFACTOR; + if ( wheelEvent->delta() > 0 ) + { + zoomFactor = RIU_SCROLLWHEEL_ZOOMFACTOR; + } + + zoomOnAxis(m_plot, QwtPlot::xBottom, zoomFactor, wheelEvent->pos().x()); + zoomOnAxis(m_plot, QwtPlot::xTop, zoomFactor, wheelEvent->pos().x()); + zoomOnAxis(m_plot, QwtPlot::yLeft, zoomFactor, wheelEvent->pos().y()); + zoomOnAxis(m_plot, QwtPlot::yRight, zoomFactor, wheelEvent->pos().y()); + + m_plot->replot(); + emit zoomUpdated(); + } + + return false; +} + diff --git a/ApplicationCode/UserInterface/RiuQwtPlotWheelZoomer.h b/ApplicationCode/UserInterface/RiuQwtPlotWheelZoomer.h new file mode 100644 index 0000000000..a06f28b63a --- /dev/null +++ b/ApplicationCode/UserInterface/RiuQwtPlotWheelZoomer.h @@ -0,0 +1,40 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// +#pragma once + +#include + +class QwtPlot; +class QEvent; + +class RiuQwtPlotWheelZoomer : public QObject +{ + Q_OBJECT +public: + RiuQwtPlotWheelZoomer(QwtPlot* plot); + + virtual bool eventFilter(QObject * watched, QEvent * event) override; + +signals: + void zoomUpdated(); + +private: + QwtPlot* m_plot; +}; + + diff --git a/ApplicationCode/UserInterface/RiuQwtPlotZoomer.h b/ApplicationCode/UserInterface/RiuQwtPlotZoomer.h new file mode 100644 index 0000000000..1cdb0e9903 --- /dev/null +++ b/ApplicationCode/UserInterface/RiuQwtPlotZoomer.h @@ -0,0 +1,35 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// +#pragma once + +#include "qwt_plot_zoomer.h" + +class RiuQwtPlotZoomer : public QwtPlotZoomer +{ +public: + RiuQwtPlotZoomer(QWidget * canvas, bool doReplot=true) : QwtPlotZoomer(canvas, doReplot) {} + +protected: + virtual QSizeF minZoomSize() const override + { + return QwtPlotZoomer::minZoomSize() / 10.0e6; + } +}; + + + diff --git a/ApplicationCode/UserInterface/RiuQwtScalePicker.h b/ApplicationCode/UserInterface/RiuQwtScalePicker.h index abef1584c9..3f9955ff88 100644 --- a/ApplicationCode/UserInterface/RiuQwtScalePicker.h +++ b/ApplicationCode/UserInterface/RiuQwtScalePicker.h @@ -12,7 +12,7 @@ class RiuQwtScalePicker : public QObject { Q_OBJECT public: - RiuQwtScalePicker(QwtPlot *plot); + explicit RiuQwtScalePicker(QwtPlot *plot); virtual bool eventFilter( QObject *, QEvent * ); diff --git a/ApplicationCode/UserInterface/RiuRecentFileActionProvider.cpp b/ApplicationCode/UserInterface/RiuRecentFileActionProvider.cpp index faa6e8cdf4..899463ebf9 100644 --- a/ApplicationCode/UserInterface/RiuRecentFileActionProvider.cpp +++ b/ApplicationCode/UserInterface/RiuRecentFileActionProvider.cpp @@ -122,18 +122,24 @@ void RiuRecentFileActionProvider::slotOpenRecentFile() QAction* action = qobject_cast(sender()); if (action) { - QString filename = action->data().toString(); - bool loadingSucceded = RiaApplication::instance()->openFile(filename); + QString fileName = action->data().toString(); + RiaApplication* app = RiaApplication::instance(); + if (RiaApplication::hasValidProjectFileExtension(fileName)) + { + if (!app->askUserToSaveModifiedProject()) return; + } + + bool loadingSucceded = RiaApplication::instance()->openFile(fileName); if (loadingSucceded) { - addFileName(filename); + addFileName(fileName); } else { - QMessageBox::warning(NULL, "File open", "Failed to import file located at\n" + filename); + QMessageBox::warning(NULL, "File open", "Failed to import file located at\n" + fileName); - removeFileName(filename); + removeFileName(fileName); } } } diff --git a/ApplicationCode/UserInterface/RiuRecentFileActionProvider.h b/ApplicationCode/UserInterface/RiuRecentFileActionProvider.h index 301466239b..7bfe102d28 100644 --- a/ApplicationCode/UserInterface/RiuRecentFileActionProvider.h +++ b/ApplicationCode/UserInterface/RiuRecentFileActionProvider.h @@ -35,7 +35,7 @@ class RiuRecentFileActionProvider : public QObject Q_OBJECT public: - RiuRecentFileActionProvider(int maxActionCount = 9); + explicit RiuRecentFileActionProvider(int maxActionCount = 9); ~RiuRecentFileActionProvider(); void addFileName(const QString& fileName); diff --git a/ApplicationCode/UserInterface/RiuResultInfoPanel.cpp b/ApplicationCode/UserInterface/RiuResultInfoPanel.cpp index b49341938d..e6c5a8d74d 100644 --- a/ApplicationCode/UserInterface/RiuResultInfoPanel.cpp +++ b/ApplicationCode/UserInterface/RiuResultInfoPanel.cpp @@ -79,6 +79,6 @@ void RiuResultInfoPanel::convertStringToHTML(QString* str) //-------------------------------------------------------------------------------------------------- QSize RiuResultInfoPanel::sizeHint () const { - // As small as possible fow now + // As small as possible for now return QSize(20, 20); } diff --git a/ApplicationCode/UserInterface/RiuResultInfoPanel.h b/ApplicationCode/UserInterface/RiuResultInfoPanel.h index dad1b39dca..96e964e31c 100644 --- a/ApplicationCode/UserInterface/RiuResultInfoPanel.h +++ b/ApplicationCode/UserInterface/RiuResultInfoPanel.h @@ -35,7 +35,7 @@ class RiuResultInfoPanel : public QWidget Q_OBJECT public: - RiuResultInfoPanel(QDockWidget* parent); + explicit RiuResultInfoPanel(QDockWidget* parent); void setInfo(const QString& info); diff --git a/ApplicationCode/UserInterface/RiuResultQwtPlot.cpp b/ApplicationCode/UserInterface/RiuResultQwtPlot.cpp index 07b1b36ef7..e69b5e16ff 100644 --- a/ApplicationCode/UserInterface/RiuResultQwtPlot.cpp +++ b/ApplicationCode/UserInterface/RiuResultQwtPlot.cpp @@ -21,6 +21,8 @@ #include "RigCurveDataTools.h" +#include "RimContextCommandBuilder.h" + #include "RiuLineSegmentQwtPlotCurve.h" #include "cvfBase.h" @@ -35,6 +37,10 @@ #include "qwt_plot_layout.h" #include "qwt_scale_engine.h" +#include +#include +#include "RiuSummaryQwtPlot.h" + //-------------------------------------------------------------------------------------------------- /// @@ -42,9 +48,6 @@ RiuResultQwtPlot::RiuResultQwtPlot(QWidget* parent) : QwtPlot(parent) { - m_grid = new QwtPlotGrid; - m_grid->attach(this); - setDefaults(); } @@ -54,9 +57,6 @@ RiuResultQwtPlot::RiuResultQwtPlot(QWidget* parent) RiuResultQwtPlot::~RiuResultQwtPlot() { deleteAllCurves(); - - m_grid->detach(); - delete m_grid; } //-------------------------------------------------------------------------------------------------- @@ -127,61 +127,40 @@ QSize RiuResultQwtPlot::minimumSizeHint() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuResultQwtPlot::setDefaults() +void RiuResultQwtPlot::contextMenuEvent(QContextMenuEvent* event) { - QPalette newPalette(palette()); - newPalette.setColor(QPalette::Background, Qt::white); - setPalette(newPalette); + QMenu menu; + QStringList commandIds; + + commandIds << "RicNewGridTimeHistoryCurveFeature"; - setAutoFillBackground(true); - setCanvasBackground(Qt::white); + RimContextCommandBuilder::appendCommandsToMenu(commandIds, &menu); - QFrame* canvasFrame = dynamic_cast(canvas()); - if (canvasFrame) + if (menu.actions().size() > 0) { - canvasFrame->setFrameShape(QFrame::NoFrame); + menu.exec(event->globalPos()); } +} - canvas()->setMouseTracking(true); - canvas()->installEventFilter(this); - - QPen gridPen(Qt::SolidLine); - gridPen.setColor(Qt::lightGray); - m_grid->setPen(gridPen); +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuResultQwtPlot::setDefaults() +{ + RiuSummaryQwtPlot::setCommonPlotBehaviour(this); enableAxis(QwtPlot::xBottom, true); enableAxis(QwtPlot::yLeft, true); enableAxis(QwtPlot::xTop, false); enableAxis(QwtPlot::yRight, false); - plotLayout()->setAlignCanvasToScales(true); - - QwtDateScaleDraw* scaleDraw = new QwtDateScaleDraw(Qt::UTC); - scaleDraw->setDateFormat(QwtDate::Year, QString("dd-MM-yyyy")); - - QwtDateScaleEngine* scaleEngine = new QwtDateScaleEngine(Qt::UTC); - setAxisScaleEngine(QwtPlot::xBottom, scaleEngine); - setAxisScaleDraw(QwtPlot::xBottom, scaleDraw); - - QFont xAxisFont = axisFont(QwtPlot::xBottom); - xAxisFont.setPixelSize(9); - setAxisFont(QwtPlot::xBottom, xAxisFont); - - QFont yAxisFont = axisFont(QwtPlot::yLeft); - yAxisFont.setPixelSize(9); - setAxisFont(QwtPlot::yLeft, yAxisFont); - - QwtText axisTitleY = axisTitle(QwtPlot::yLeft); - QFont yAxisTitleFont = axisTitleY.font(); - yAxisTitleFont.setPixelSize(9); - yAxisTitleFont.setBold(false); - axisTitleY.setFont(yAxisTitleFont); - axisTitleY.setRenderFlags(Qt::AlignRight); - setAxisTitle(QwtPlot::yLeft, axisTitleY); - + RiuSummaryQwtPlot::enableDateBasedBottomXAxis(this); - QwtLegend* legend = new QwtLegend(this); + setAxisMaxMinor(QwtPlot::xBottom, 2); + setAxisMaxMinor(QwtPlot::yLeft, 3); + // The legend will be deleted in the destructor of the plot or when // another legend is inserted. + QwtLegend* legend = new QwtLegend(this); this->insertLegend(legend, BottomLegend); } diff --git a/ApplicationCode/UserInterface/RiuResultQwtPlot.h b/ApplicationCode/UserInterface/RiuResultQwtPlot.h index 687aab0cc9..c08250accc 100644 --- a/ApplicationCode/UserInterface/RiuResultQwtPlot.h +++ b/ApplicationCode/UserInterface/RiuResultQwtPlot.h @@ -37,23 +37,29 @@ namespace cvf class RiuResultQwtPlot : public QwtPlot { public: - RiuResultQwtPlot(QWidget* parent = NULL); + explicit RiuResultQwtPlot(QWidget* parent = NULL); virtual ~RiuResultQwtPlot(); - void addCurve(const QString& curveName, const cvf::Color3f& curveColor, const std::vector& dateTimes, const std::vector& timeHistoryValues); - void addCurve(const QString& curveName, const cvf::Color3f& curveColor, const std::vector& frameTimes, const std::vector& timeHistoryValues); + void addCurve(const QString& curveName, + const cvf::Color3f& curveColor, + const std::vector& dateTimes, + const std::vector& timeHistoryValues); + void addCurve(const QString& curveName, + const cvf::Color3f& curveColor, + const std::vector& frameTimes, + const std::vector& timeHistoryValues); void deleteAllCurves(); protected: virtual QSize sizeHint() const; virtual QSize minimumSizeHint() const; + virtual void contextMenuEvent(QContextMenuEvent *) override; private: void setDefaults(); private: std::vector m_plotCurves; - QwtPlotGrid* m_grid; }; diff --git a/ApplicationCode/UserInterface/RiuResultTextBuilder.cpp b/ApplicationCode/UserInterface/RiuResultTextBuilder.cpp index f7604389bd..383d50fd6e 100644 --- a/ApplicationCode/UserInterface/RiuResultTextBuilder.cpp +++ b/ApplicationCode/UserInterface/RiuResultTextBuilder.cpp @@ -20,19 +20,23 @@ #include "RiuResultTextBuilder.h" #include "RigCaseCellResultsData.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" +#include "RigFormationNames.h" #include "RigMainGrid.h" #include "RigResultAccessor.h" #include "RigResultAccessorFactory.h" +#include "RigSingleWellResultsData.h" -#include "RimEclipseCase.h" #include "RimCellEdgeColors.h" +#include "RimEclipseCase.h" +#include "RimEclipseCellColors.h" #include "RimEclipseFaultColors.h" -#include "RimReservoirCellResultsStorage.h" #include "RimEclipseView.h" -#include "RimEclipseCellColors.h" #include "RimFormationNames.h" -#include "RigFormationNames.h" +#include "RimLegendConfig.h" +#include "RimReservoirCellResultsStorage.h" + +#include "cafDisplayCoordTransform.h" @@ -109,7 +113,7 @@ QString RiuResultTextBuilder::mainResultText() text += "\n"; } - QString topoText = this->topologyText("\n"); + QString topoText = this->geometrySelectionText("\n"); text += topoText; appendDetails(text, formationDetails()); text += "\n"; @@ -130,13 +134,13 @@ QString RiuResultTextBuilder::mainResultText() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString RiuResultTextBuilder::topologyText(QString itemSeparator) +QString RiuResultTextBuilder::geometrySelectionText(QString itemSeparator) { QString text; - if (m_reservoirView->eclipseCase()) + if (m_reservoirView && m_reservoirView->eclipseCase()) { - const RigCaseData* eclipseCase = m_reservoirView->eclipseCase()->reservoirData(); + const RigEclipseCaseData* eclipseCase = m_reservoirView->eclipseCase()->eclipseCaseData(); if (eclipseCase) { if (m_cellIndex != cvf::UNDEFINED_SIZE_T) @@ -161,7 +165,9 @@ QString RiuResultTextBuilder::topologyText(QString itemSeparator) } } - cvf::Vec3d domainCoord = m_intersectionPoint + eclipseCase->grid(0)->displayModelOffset(); + + cvf::ref transForm = m_reservoirView->displayCoordTransform(); + cvf::Vec3d domainCoord = transForm->translateToDomainCoord(m_intersectionPoint); QString formattedText; formattedText.sprintf("Intersection point : [E: %.2f, N: %.2f, Depth: %.2f]", domainCoord.x(), domainCoord.y(), -domainCoord.z()); @@ -180,9 +186,9 @@ QString RiuResultTextBuilder::gridResultDetails() { QString text; - if (m_reservoirView->eclipseCase() && m_reservoirView->eclipseCase()->reservoirData()) + if (m_reservoirView->eclipseCase() && m_reservoirView->eclipseCase()->eclipseCaseData()) { - RigCaseData* eclipseCaseData = m_reservoirView->eclipseCase()->reservoirData(); + RigEclipseCaseData* eclipseCaseData = m_reservoirView->eclipseCase()->eclipseCaseData(); RigGridBase* grid = eclipseCaseData->grid(m_gridIndex); this->appendTextFromResultColors(eclipseCaseData, m_gridIndex, m_cellIndex, m_timeStepIndex, m_reservoirView->cellResult(), &text); @@ -203,9 +209,9 @@ QString RiuResultTextBuilder::faultResultDetails() { QString text; - if (m_reservoirView->eclipseCase() && m_reservoirView->eclipseCase()->reservoirData()) + if (m_reservoirView->eclipseCase() && m_reservoirView->eclipseCase()->eclipseCaseData()) { - RigCaseData* eclipseCaseData = m_reservoirView->eclipseCase()->reservoirData(); + RigEclipseCaseData* eclipseCaseData = m_reservoirView->eclipseCase()->eclipseCaseData(); RigGridBase* grid = eclipseCaseData->grid(m_gridIndex); RigMainGrid* mainGrid = grid->mainGrid(); @@ -246,7 +252,7 @@ QString RiuResultTextBuilder::formationDetails() size_t k = cvf::UNDEFINED_SIZE_T; { - const RigCaseData* eclipseData = m_reservoirView->eclipseCase()->reservoirData(); + const RigEclipseCaseData* eclipseData = m_reservoirView->eclipseCase()->eclipseCaseData(); if(eclipseData) { if(m_cellIndex != cvf::UNDEFINED_SIZE_T) @@ -294,9 +300,9 @@ QString RiuResultTextBuilder::faultResultText() { QString text; - if (m_reservoirView->eclipseCase() && m_reservoirView->eclipseCase()->reservoirData()) + if (m_reservoirView->eclipseCase() && m_reservoirView->eclipseCase()->eclipseCaseData()) { - RigCaseData* eclipseCaseData = m_reservoirView->eclipseCase()->reservoirData(); + RigEclipseCaseData* eclipseCaseData = m_reservoirView->eclipseCase()->eclipseCaseData(); RigGridBase* grid = eclipseCaseData->grid(m_gridIndex); RigMainGrid* mainGrid = grid->mainGrid(); @@ -326,7 +332,7 @@ QString RiuResultTextBuilder::nncResultText() { if (m_reservoirView.notNull() && m_reservoirView->eclipseCase()) { - RigCaseData* eclipseCase = m_reservoirView->eclipseCase()->reservoirData(); + RigEclipseCaseData* eclipseCase = m_reservoirView->eclipseCase()->eclipseCaseData(); RigMainGrid* grid = eclipseCase->mainGrid(); CVF_ASSERT(grid); @@ -345,7 +351,7 @@ QString RiuResultTextBuilder::nncResultText() const std::vector* nncValues = nncData->connectionScalarResult(scalarResultIdx); if (nncValues) { - QString resultVar = m_reservoirView->currentFaultResultColors()->resultVariable(); + QString resultVar = m_reservoirView->currentFaultResultColors()->resultVariableUiName(); double scalarValue = (*nncValues)[m_nncIndex]; text = QString("%1 : %2").arg(resultVar).arg(scalarValue); @@ -361,7 +367,7 @@ QString RiuResultTextBuilder::nncResultText() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuResultTextBuilder::appendTextFromResultColors(RigCaseData* eclipseCase, size_t gridIndex, size_t cellIndex, size_t timeStepIndex, RimEclipseCellColors* resultColors, QString* resultInfoText) +void RiuResultTextBuilder::appendTextFromResultColors(RigEclipseCaseData* eclipseCase, size_t gridIndex, size_t cellIndex, size_t timeStepIndex, RimEclipseCellColors* resultColors, QString* resultInfoText) { if (!resultColors) { @@ -378,9 +384,9 @@ void RiuResultTextBuilder::appendTextFromResultColors(RigCaseData* eclipseCase, size_t sgasScalarSetIndex = gridCellResults->findOrLoadScalarResult(RimDefines::DYNAMIC_NATIVE, "SGAS"); size_t swatScalarSetIndex = gridCellResults->findOrLoadScalarResult(RimDefines::DYNAMIC_NATIVE, "SWAT"); - cvf::ref dataAccessObjectX = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, soilScalarSetIndex); - cvf::ref dataAccessObjectY = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, sgasScalarSetIndex); - cvf::ref dataAccessObjectZ = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, swatScalarSetIndex); + cvf::ref dataAccessObjectX = RigResultAccessorFactory::createFromResultIdx(eclipseCase, gridIndex, porosityModel, timeStepIndex, soilScalarSetIndex); + cvf::ref dataAccessObjectY = RigResultAccessorFactory::createFromResultIdx(eclipseCase, gridIndex, porosityModel, timeStepIndex, sgasScalarSetIndex); + cvf::ref dataAccessObjectZ = RigResultAccessorFactory::createFromResultIdx(eclipseCase, gridIndex, porosityModel, timeStepIndex, swatScalarSetIndex); double scalarValue = 0.0; @@ -396,17 +402,18 @@ void RiuResultTextBuilder::appendTextFromResultColors(RigCaseData* eclipseCase, else scalarValue = 0.0; resultInfoText->append(QString("SWAT : %1\n").arg(scalarValue)); } + + return; } else if (resultColors->hasResult()) { RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(resultColors->porosityModel()); - cvf::ref resultAccessor; if (resultColors->hasStaticResult()) { if (resultColors->resultVariable().compare(RimDefines::combinedTransmissibilityResultName(), Qt::CaseInsensitive) == 0) { - cvf::ref transResultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, 0, RimDefines::combinedTransmissibilityResultName()); + cvf::ref transResultAccessor = RigResultAccessorFactory::createFromUiResultName(eclipseCase, gridIndex, porosityModel, 0, RimDefines::combinedTransmissibilityResultName()); { double scalarValue = transResultAccessor->cellFaceScalar(cellIndex, cvf::StructGridInterface::POS_I); resultInfoText->append(QString("Tran X : %1\n").arg(scalarValue)); @@ -417,14 +424,14 @@ void RiuResultTextBuilder::appendTextFromResultColors(RigCaseData* eclipseCase, scalarValue = transResultAccessor->cellFaceScalar(cellIndex, cvf::StructGridInterface::POS_K); resultInfoText->append(QString("Tran Z : %1\n").arg(scalarValue)); } + + return; } else if (resultColors->resultVariable().compare(RimDefines::combinedMultResultName(), Qt::CaseInsensitive) == 0) { - cvf::ref multResultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, 0, RimDefines::combinedMultResultName()); + cvf::ref multResultAccessor = RigResultAccessorFactory::createFromUiResultName(eclipseCase, gridIndex, porosityModel, 0, RimDefines::combinedMultResultName()); { - double scalarValue = 0.0; - - scalarValue = multResultAccessor->cellFaceScalar(cellIndex, cvf::StructGridInterface::POS_I); + double scalarValue = multResultAccessor->cellFaceScalar(cellIndex, cvf::StructGridInterface::POS_I); resultInfoText->append(QString("MULTX : %1\n").arg(scalarValue)); scalarValue = multResultAccessor->cellFaceScalar(cellIndex, cvf::StructGridInterface::NEG_I); resultInfoText->append(QString("MULTX- : %1\n").arg(scalarValue)); @@ -439,10 +446,12 @@ void RiuResultTextBuilder::appendTextFromResultColors(RigCaseData* eclipseCase, scalarValue = multResultAccessor->cellFaceScalar(cellIndex, cvf::StructGridInterface::NEG_K); resultInfoText->append(QString("MULTZ- : %1\n").arg(scalarValue)); } + + return; } else if (resultColors->resultVariable().compare(RimDefines::combinedRiTranResultName(), Qt::CaseInsensitive) == 0) { - cvf::ref transResultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, 0, RimDefines::combinedRiTranResultName()); + cvf::ref transResultAccessor = RigResultAccessorFactory::createFromUiResultName(eclipseCase, gridIndex, porosityModel, 0, RimDefines::combinedRiTranResultName()); { double scalarValue = transResultAccessor->cellFaceScalar(cellIndex, cvf::StructGridInterface::POS_I); resultInfoText->append(QString("riTran X : %1\n").arg(scalarValue)); @@ -453,10 +462,12 @@ void RiuResultTextBuilder::appendTextFromResultColors(RigCaseData* eclipseCase, scalarValue = transResultAccessor->cellFaceScalar(cellIndex, cvf::StructGridInterface::POS_K); resultInfoText->append(QString("riTran Z : %1\n").arg(scalarValue)); } + + return; } else if (resultColors->resultVariable().compare(RimDefines::combinedRiMultResultName(), Qt::CaseInsensitive) == 0) { - cvf::ref resultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, 0, RimDefines::combinedRiMultResultName()); + cvf::ref resultAccessor = RigResultAccessorFactory::createFromUiResultName(eclipseCase, gridIndex, porosityModel, 0, RimDefines::combinedRiMultResultName()); { double scalarValue = resultAccessor->cellFaceScalar(cellIndex, cvf::StructGridInterface::POS_I); resultInfoText->append(QString("riMult X : %1\n").arg(scalarValue)); @@ -467,10 +478,12 @@ void RiuResultTextBuilder::appendTextFromResultColors(RigCaseData* eclipseCase, scalarValue = resultAccessor->cellFaceScalar(cellIndex, cvf::StructGridInterface::POS_K); resultInfoText->append(QString("riMult Z : %1\n").arg(scalarValue)); } + + return; } else if (resultColors->resultVariable().compare(RimDefines::combinedRiAreaNormTranResultName(), Qt::CaseInsensitive) == 0) { - cvf::ref resultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, 0, RimDefines::combinedRiAreaNormTranResultName()); + cvf::ref resultAccessor = RigResultAccessorFactory::createFromUiResultName(eclipseCase, gridIndex, porosityModel, 0, RimDefines::combinedRiAreaNormTranResultName()); { double scalarValue = resultAccessor->cellFaceScalar(cellIndex, cvf::StructGridInterface::POS_I); resultInfoText->append(QString("riTransByArea X : %1\n").arg(scalarValue)); @@ -481,25 +494,13 @@ void RiuResultTextBuilder::appendTextFromResultColors(RigCaseData* eclipseCase, scalarValue = resultAccessor->cellFaceScalar(cellIndex, cvf::StructGridInterface::POS_K); resultInfoText->append(QString("riTransByArea Z : %1\n").arg(scalarValue)); } - } - else - { - resultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, 0, resultColors->scalarResultIndex()); - } - } - else - { - resultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, resultColors->scalarResultIndex()); - } - if (resultAccessor.notNull()) - { - double scalarValue = resultAccessor->cellScalar(cellIndex); - resultInfoText->append("Cell result : "); - resultInfoText->append(resultColors->resultVariable()); - resultInfoText->append(QString(" : %1\n").arg(scalarValue)); + return; + } } } + + resultInfoText->append(cellResultText(resultColors)); } //-------------------------------------------------------------------------------------------------- @@ -511,33 +512,42 @@ QString RiuResultTextBuilder::cellEdgeResultDetails() if (m_reservoirView->cellEdgeResult()->hasResult()) { - std::vector metaData; - m_reservoirView->cellEdgeResult()->cellEdgeMetaData(&metaData); - - std::set uniqueResultIndices; - text += "-- Cell edge result data --\n"; - for (int idx = 0; idx < 6; idx++) + + if (m_reservoirView->cellEdgeResult()->isUsingSingleVariable()) { - size_t resultIndex = metaData[idx].m_resultIndex; - if (resultIndex == cvf::UNDEFINED_SIZE_T) continue; - - if (uniqueResultIndices.find(resultIndex) != uniqueResultIndices.end()) continue; + text += cellResultText(m_reservoirView->cellEdgeResult()->singleVarEdgeResultColors()); + text += "\n"; + } + else + { + std::vector metaData; + m_reservoirView->cellEdgeResult()->cellEdgeMetaData(&metaData); - size_t adjustedTimeStep = m_timeStepIndex; - if (metaData[idx].m_isStatic) - { - adjustedTimeStep = 0; - } + std::set uniqueResultIndices; - RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(m_reservoirView->cellResult()->porosityModel()); - cvf::ref resultAccessor = RigResultAccessorFactory::createResultAccessor(m_reservoirView->eclipseCase()->reservoirData(), m_gridIndex, porosityModel, adjustedTimeStep, resultIndex); - if (resultAccessor.notNull()) + for (int idx = 0; idx < 6; idx++) { - double scalarValue = resultAccessor->cellScalar(m_cellIndex); - text.append(QString("%1 : %2\n").arg(metaData[idx].m_resultVariable).arg(scalarValue)); + size_t resultIndex = metaData[idx].m_resultIndex; + if (resultIndex == cvf::UNDEFINED_SIZE_T) continue; + + if (uniqueResultIndices.find(resultIndex) != uniqueResultIndices.end()) continue; + + size_t adjustedTimeStep = m_timeStepIndex; + if (metaData[idx].m_isStatic) + { + adjustedTimeStep = 0; + } - uniqueResultIndices.insert(resultIndex); + RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(m_reservoirView->cellResult()->porosityModel()); + cvf::ref resultAccessor = RigResultAccessorFactory::createFromResultIdx(m_reservoirView->eclipseCase()->eclipseCaseData(), m_gridIndex, porosityModel, adjustedTimeStep, resultIndex); + if (resultAccessor.notNull()) + { + double scalarValue = resultAccessor->cellScalar(m_cellIndex); + text.append(QString("%1 : %2\n").arg(metaData[idx].m_resultVariable).arg(scalarValue)); + + uniqueResultIndices.insert(resultIndex); + } } } } @@ -556,7 +566,7 @@ QString RiuResultTextBuilder::nncDetails() { if (m_reservoirView.notNull() && m_reservoirView->eclipseCase()) { - RigCaseData* eclipseCase = m_reservoirView->eclipseCase()->reservoirData(); + RigEclipseCaseData* eclipseCase = m_reservoirView->eclipseCase()->eclipseCaseData(); RigMainGrid* grid = eclipseCase->mainGrid(); CVF_ASSERT(grid); @@ -642,15 +652,11 @@ QString RiuResultTextBuilder::cellResultText(RimEclipseCellColors* resultColors) { QString text; - if (m_reservoirView->eclipseCase() && m_reservoirView->eclipseCase()->reservoirData()) + if (m_reservoirView->eclipseCase() && m_reservoirView->eclipseCase()->eclipseCaseData()) { - RigCaseData* eclipseCaseData = m_reservoirView->eclipseCase()->reservoirData(); + RigEclipseCaseData* eclipseCaseData = m_reservoirView->eclipseCase()->eclipseCaseData(); RigGridBase* grid = eclipseCaseData->grid(m_gridIndex); - RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(resultColors->porosityModel()); - - QString resultVar = resultColors->resultVariable(); - if (resultColors->isTernarySaturationSelected()) { RimReservoirCellResultsStorage* gridCellResults = m_reservoirView->cellResult()->currentGridCellResults(); @@ -660,9 +666,11 @@ QString RiuResultTextBuilder::cellResultText(RimEclipseCellColors* resultColors) size_t sgasScalarSetIndex = gridCellResults->findOrLoadScalarResult(RimDefines::DYNAMIC_NATIVE, "SGAS"); size_t swatScalarSetIndex = gridCellResults->findOrLoadScalarResult(RimDefines::DYNAMIC_NATIVE, "SWAT"); - cvf::ref dataAccessObjectX = RigResultAccessorFactory::createResultAccessor(eclipseCaseData, m_gridIndex, porosityModel, m_timeStepIndex, soilScalarSetIndex); - cvf::ref dataAccessObjectY = RigResultAccessorFactory::createResultAccessor(eclipseCaseData, m_gridIndex, porosityModel, m_timeStepIndex, sgasScalarSetIndex); - cvf::ref dataAccessObjectZ = RigResultAccessorFactory::createResultAccessor(eclipseCaseData, m_gridIndex, porosityModel, m_timeStepIndex, swatScalarSetIndex); + RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(resultColors->porosityModel()); + + cvf::ref dataAccessObjectX = RigResultAccessorFactory::createFromResultIdx(eclipseCaseData, m_gridIndex, porosityModel, m_timeStepIndex, soilScalarSetIndex); + cvf::ref dataAccessObjectY = RigResultAccessorFactory::createFromResultIdx(eclipseCaseData, m_gridIndex, porosityModel, m_timeStepIndex, sgasScalarSetIndex); + cvf::ref dataAccessObjectZ = RigResultAccessorFactory::createFromResultIdx(eclipseCaseData, m_gridIndex, porosityModel, m_timeStepIndex, swatScalarSetIndex); double scalarValue = 0.0; @@ -687,11 +695,25 @@ QString RiuResultTextBuilder::cellResultText(RimEclipseCellColors* resultColors) adjustedTimeStep = 0; } - cvf::ref resultAccessor = RigResultAccessorFactory::createResultAccessor(eclipseCaseData, m_gridIndex, porosityModel, adjustedTimeStep, resultVar); + cvf::ref resultAccessor = RigResultAccessorFactory::createFromResultDefinition(eclipseCaseData, m_gridIndex, adjustedTimeStep, resultColors); if (resultAccessor.notNull()) { double scalarValue = resultAccessor->cellFaceScalar(m_cellIndex, m_face); - text = QString("%1 : %2").arg(resultVar).arg(scalarValue); + QString resultVar = resultColors->resultVariableUiName(); + + QString resultValueText; + if (resultColors->hasCategoryResult()) + { + RimLegendConfig* legendConfig = resultColors->legendConfig(); + + resultValueText += legendConfig->categoryNameFromCategoryValue(scalarValue); + } + else + { + resultValueText = QString("%1").arg(scalarValue); + } + + text = QString("%1 : %2").arg(resultVar).arg(resultValueText); } } } @@ -707,14 +729,14 @@ QString RiuResultTextBuilder::wellResultText() QString text; if (m_reservoirView->eclipseCase() && - m_reservoirView->eclipseCase()->reservoirData() ) + m_reservoirView->eclipseCase()->eclipseCaseData() ) { - cvf::Collection wellResults = m_reservoirView->eclipseCase()->reservoirData()->wellResults(); + cvf::Collection wellResults = m_reservoirView->eclipseCase()->eclipseCaseData()->wellResults(); for (size_t i = 0; i < wellResults.size(); i++) { RigSingleWellResultsData* singleWellResultData = wellResults.at(i); - if (m_timeStepIndex < singleWellResultData->firstResultTimeStep()) + if (!singleWellResultData->hasWellResult(m_timeStepIndex)) { continue; } diff --git a/ApplicationCode/UserInterface/RiuResultTextBuilder.h b/ApplicationCode/UserInterface/RiuResultTextBuilder.h index 543214c57f..7f58c8eaad 100644 --- a/ApplicationCode/UserInterface/RiuResultTextBuilder.h +++ b/ApplicationCode/UserInterface/RiuResultTextBuilder.h @@ -27,7 +27,7 @@ class RimEclipseView; class RimEclipseCellColors; class QString; -class RigCaseData; +class RigEclipseCaseData; namespace cvf { class Part; @@ -47,7 +47,7 @@ class RiuResultTextBuilder QString mainResultText(); - QString topologyText(QString itemSeparator); + QString geometrySelectionText(QString itemSeparator); private: void appendDetails(QString& text, const QString& details); @@ -65,7 +65,7 @@ class RiuResultTextBuilder QString cellResultText(RimEclipseCellColors* resultColors); - void appendTextFromResultColors(RigCaseData* eclipseCase, size_t gridIndex, size_t cellIndex, size_t timeStepIndex, RimEclipseCellColors* resultColors, QString* resultInfoText); + void appendTextFromResultColors(RigEclipseCaseData* eclipseCase, size_t gridIndex, size_t cellIndex, size_t timeStepIndex, RimEclipseCellColors* resultColors, QString* resultInfoText); private: caf::PdmPointer m_reservoirView; diff --git a/ApplicationCode/UserInterface/RiuSelectionChangedHandler.cpp b/ApplicationCode/UserInterface/RiuSelectionChangedHandler.cpp index 61446f0b28..c15ae4d56c 100644 --- a/ApplicationCode/UserInterface/RiuSelectionChangedHandler.cpp +++ b/ApplicationCode/UserInterface/RiuSelectionChangedHandler.cpp @@ -22,10 +22,12 @@ #include "RiaApplication.h" #include "RigCaseCellResultsData.h" -#include "RigCaseData.h" -#include "RiuFemTimeHistoryResultAccessor.h" +#include "RigEclipseCaseData.h" +#include "RigFemPartCollection.h" +#include "RigFemPartResultsCollection.h" #include "RigGeoMechCaseData.h" #include "RigTimeHistoryResultAccessor.h" +#include "RiuFemTimeHistoryResultAccessor.h" #include "RimEclipseCase.h" #include "RimEclipseCellColors.h" @@ -37,15 +39,13 @@ #include "RiuFemResultTextBuilder.h" #include "RiuMainWindow.h" +#include "RiuResultQwtPlot.h" #include "RiuResultTextBuilder.h" #include "RiuSelectionManager.h" -#include "RiuResultQwtPlot.h" #include #include -#include "RigFemPartResultsCollection.h" -#include "RigFemPartCollection.h" //-------------------------------------------------------------------------------------------------- /// @@ -103,29 +103,30 @@ void RiuSelectionChangedHandler::addCurveFromSelectionItem(const RiuEclipseSelec { RimEclipseView* eclipseView = eclipseSelectionItem->m_view.p(); - if (eclipseView->cellResult()->hasDynamicResult() && + if (eclipseView->cellResult()->resultType() == RimDefines::FLOW_DIAGNOSTICS) + { + // NB! Do not read out data for flow results, as this can be a time consuming operation + + return; + } + else if (eclipseView->cellResult()->hasDynamicResult() && eclipseView->eclipseCase() && - eclipseView->eclipseCase()->reservoirData()) + eclipseView->eclipseCase()->eclipseCaseData()) { RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(eclipseView->cellResult()->porosityModel()); - size_t scalarIndexWithMaxTimeStepCount = cvf::UNDEFINED_SIZE_T; - eclipseView->eclipseCase()->reservoirData()->results(porosityModel)->maxTimeStepCount(&scalarIndexWithMaxTimeStepCount); - std::vector timeStepDates = eclipseView->eclipseCase()->reservoirData()->results(porosityModel)->timeStepDates(scalarIndexWithMaxTimeStepCount); - - RigTimeHistoryResultAccessor timeHistResultAccessor(eclipseView->eclipseCase()->reservoirData(), - eclipseSelectionItem->m_gridIndex, eclipseSelectionItem->m_cellIndex, - eclipseView->cellResult()->scalarResultIndex(), porosityModel); + std::vector timeStepDates = eclipseView->eclipseCase()->eclipseCaseData()->results(porosityModel)->timeStepDates(); QString curveName = eclipseView->eclipseCase()->caseUserDescription(); curveName += ", "; - curveName += eclipseView->cellResult()->resultVariable(); + curveName += eclipseView->cellResult()->resultVariableUiShortName(); curveName += ", "; curveName += QString("Grid index %1").arg(eclipseSelectionItem->m_gridIndex); curveName += ", "; - curveName += timeHistResultAccessor.topologyText(); + curveName += RigTimeHistoryResultAccessor::geometrySelectionText(eclipseView->eclipseCase()->eclipseCaseData(), eclipseSelectionItem->m_gridIndex, eclipseSelectionItem->m_cellIndex); + - std::vector timeHistoryValues = timeHistResultAccessor.timeHistoryValues(); + std::vector timeHistoryValues = RigTimeHistoryResultAccessor::timeHistoryValues(eclipseView->eclipseCase()->eclipseCaseData(), eclipseView->cellResult(), eclipseSelectionItem->m_gridIndex, eclipseSelectionItem->m_cellIndex, timeStepDates.size()); CVF_ASSERT(timeStepDates.size() == timeHistoryValues.size()); RiuMainWindow::instance()->resultPlot()->addCurve(curveName, eclipseSelectionItem->m_color, timeStepDates, timeHistoryValues); @@ -190,7 +191,7 @@ void RiuSelectionChangedHandler::addCurveFromSelectionItem(const RiuGeoMechSelec } curveName.append("\n"); - curveName.append(timeHistResultAccessor->topologyText()); + curveName.append(timeHistResultAccessor->geometrySelectionText()); std::vector timeHistoryValues = timeHistResultAccessor->timeHistoryValues(); @@ -273,7 +274,7 @@ void RiuSelectionChangedHandler::updateResultInfo(const RiuSelectionItem* itemAd resultInfo = textBuilder.mainResultText(); - pickInfo = textBuilder.topologyText(", "); + pickInfo = textBuilder.geometrySelectionText(", "); } else if (itemAdded->type() == RiuSelectionItem::GEOMECH_SELECTION_OBJECT) { @@ -287,7 +288,7 @@ void RiuSelectionChangedHandler::updateResultInfo(const RiuSelectionItem* itemAd resultInfo = textBuilder.mainResultText(); - pickInfo = textBuilder.topologyText(", "); + pickInfo = textBuilder.geometrySelectionText(", "); } } diff --git a/ApplicationCode/UserInterface/RiuSelectionColors.cpp b/ApplicationCode/UserInterface/RiuSelectionColors.cpp deleted file mode 100644 index ec2c6d2431..0000000000 --- a/ApplicationCode/UserInterface/RiuSelectionColors.cpp +++ /dev/null @@ -1,57 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2015- Statoil ASA -// Copyright (C) 2015- Ceetron Solutions 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#include "RiuSelectionColors.h" - -#include - -static const int RI_SELECTION_COLOR_COUNT = 7; -static const int RI_SELECTION_COLOR[] = -{ - Qt::magenta, - Qt::cyan, - Qt::blue, - Qt::red, - Qt::green, - Qt::yellow, - Qt::gray -}; - -static int riuSelectionColorIndex = 0; - -//-------------------------------------------------------------------------------------------------- -/// Pick default curve color from an index based palette -//-------------------------------------------------------------------------------------------------- -cvf::Color3f RiuSelectionColors::curveColorFromTable() -{ - QColor color = QColor(Qt::GlobalColor(RI_SELECTION_COLOR[riuSelectionColorIndex % RI_SELECTION_COLOR_COUNT])); - ++riuSelectionColorIndex; - cvf::Color3f cvfColor(color.redF(), color.greenF(), color.blueF()); - return cvfColor; -} - -//-------------------------------------------------------------------------------------------------- -/// Color rarely present in result value colors -//-------------------------------------------------------------------------------------------------- -cvf::Color3f RiuSelectionColors::singleCurveColor() -{ - riuSelectionColorIndex = 0; - - return curveColorFromTable(); -} diff --git a/ApplicationCode/UserInterface/RiuSelectionColors.h b/ApplicationCode/UserInterface/RiuSelectionColors.h deleted file mode 100644 index b0dbceaf2d..0000000000 --- a/ApplicationCode/UserInterface/RiuSelectionColors.h +++ /dev/null @@ -1,33 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2015- Statoil ASA -// Copyright (C) 2015- Ceetron Solutions 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#pragma once - -#include "cvfBase.h" -#include "cvfColor3.h" - -//================================================================================================== -/// -//================================================================================================== -class RiuSelectionColors -{ -public: - static cvf::Color3f curveColorFromTable(); - static cvf::Color3f singleCurveColor(); -}; diff --git a/ApplicationCode/UserInterface/RiuSelectionManager.cpp b/ApplicationCode/UserInterface/RiuSelectionManager.cpp index 379fa14277..71a40c0eac 100644 --- a/ApplicationCode/UserInterface/RiuSelectionManager.cpp +++ b/ApplicationCode/UserInterface/RiuSelectionManager.cpp @@ -21,6 +21,10 @@ #include "RimEclipseView.h" #include "RimGeoMechView.h" +#include "RimWellPath.h" + +#include "RivSimWellPipeSourceInfo.h" +#include "RivWellPathSourceInfo.h" #include "RiuSelectionChangedHandler.h" @@ -30,6 +34,7 @@ RiuSelectionManager::RiuSelectionManager() : m_notificationCenter(new RiuSelectionChangedHandler) { + m_selection.resize(2); } //-------------------------------------------------------------------------------------------------- @@ -37,6 +42,9 @@ RiuSelectionManager::RiuSelectionManager() //-------------------------------------------------------------------------------------------------- RiuSelectionManager::~RiuSelectionManager() { + deleteAllItemsFromSelection(RUI_APPLICATION_GLOBAL); + deleteAllItemsFromSelection(RUI_TEMPORARY); + delete m_notificationCenter; } @@ -52,64 +60,93 @@ RiuSelectionManager* RiuSelectionManager::instance() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuSelectionManager::selectedItems(std::vector& items) const +void RiuSelectionManager::selectedItems(std::vector& items, int role) const { - items = m_selection; + const std::vector& s = m_selection[role]; + + items = s; } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuSelectionManager::appendItemToSelection(RiuSelectionItem* item) +RiuSelectionItem* RiuSelectionManager::selectedItem(int role /*= RUI_APPLICATION_GLOBAL*/) const { - m_selection.push_back(item); + const std::vector& s = m_selection[role]; + + if (s.size() == 1) + { + if (s[0]) + { + return s[0]; + } + } - m_notificationCenter->handleItemAppended(item); + return nullptr; } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuSelectionManager::setSelectedItem(RiuSelectionItem* item) +void RiuSelectionManager::appendItemToSelection(RiuSelectionItem* item, int role) { - deleteAllItemsFromSelection(); + std::vector& s = m_selection[role]; - m_selection.push_back(item); + s.push_back(item); - m_notificationCenter->handleSetSelectedItem(item); + if (role == RUI_APPLICATION_GLOBAL) m_notificationCenter->handleItemAppended(item); } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuSelectionManager::deleteAllItems() +void RiuSelectionManager::setSelectedItem(RiuSelectionItem* item, int role) { - if (m_selection.size() == 0) return; + deleteAllItemsFromSelection(role); - deleteAllItemsFromSelection(); + std::vector& s = m_selection[role]; - m_notificationCenter->handleSelectionDeleted(); + s.push_back(item); + + if (role == RUI_APPLICATION_GLOBAL) m_notificationCenter->handleSetSelectedItem(item); } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RiuSelectionManager::isEmpty() const +void RiuSelectionManager::deleteAllItems(int role) { - return m_selection.size() == 0; + if (!isEmpty(role)) + { + deleteAllItemsFromSelection(role); + + if (role == RUI_APPLICATION_GLOBAL) m_notificationCenter->handleSelectionDeleted(); + } } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuSelectionManager::deleteAllItemsFromSelection() +bool RiuSelectionManager::isEmpty(int role) const { - for (size_t i = 0; i < m_selection.size(); i++) + const std::vector& s = m_selection[role]; + + return s.size() == 0; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuSelectionManager::deleteAllItemsFromSelection(int role) +{ + std::vector& s = m_selection[role]; + + for (RiuSelectionItem* item : s) { - delete m_selection[i]; + delete item; } - m_selection.clear(); + s.clear(); } //-------------------------------------------------------------------------------------------------- @@ -162,7 +199,31 @@ RiuGeoMechSelectionItem::RiuGeoMechSelectionItem(RimGeoMechView* view, m_elementFace(elementFace), m_localIntersectionPoint(localIntersectionPoint), m_hasIntersectionTriangle(true), - m_intersectionTriangle(m_intersectionTriangle) + m_intersectionTriangle(intersectionTriangle) { } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuWellPathSelectionItem::RiuWellPathSelectionItem(const RivWellPathSourceInfo* wellPathSourceInfo, + const cvf::Vec3d& pipeCenterLineIntersectionInDomainCoords, + double measuredDepth) + : m_pipeCenterlineIntersectionInDomainCoords(pipeCenterLineIntersectionInDomainCoords), + m_measuredDepth(measuredDepth) +{ + m_wellpath = wellPathSourceInfo->wellPath(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuSimWellSelectionItem::RiuSimWellSelectionItem(RimEclipseWell* simwell, + cvf::Vec3d m_domainCoord, + size_t m_branchIndex) + : m_simWell(simwell), + m_domainCoord(m_domainCoord), + m_branchIndex(m_branchIndex) +{ +} \ No newline at end of file diff --git a/ApplicationCode/UserInterface/RiuSelectionManager.h b/ApplicationCode/UserInterface/RiuSelectionManager.h index 4b91fc8608..000604521f 100644 --- a/ApplicationCode/UserInterface/RiuSelectionManager.h +++ b/ApplicationCode/UserInterface/RiuSelectionManager.h @@ -28,11 +28,17 @@ #include #include #include +#include "RimEclipseWell.h" +// #include "RivWellPathSourceInfo.h" +// #include "RivWellPipeSourceInfo.h" class RimEclipseView; class RiuSelectionChangedHandler; class RiuSelectionItem; class RimGeoMechView; +class RimWellPath; +class RivWellPathSourceInfo; +class RivSimWellPipeSourceInfo; //================================================================================================== // @@ -42,33 +48,47 @@ class RimGeoMechView; class RiuSelectionManager { public: - RiuSelectionManager(); - ~RiuSelectionManager(); + enum SelectionRole + { + RUI_APPLICATION_GLOBAL, // Selection role intended to manage the cells selected by left mouse click in the 3D view + RUI_TEMPORARY // Selection role intended to manage the items selected by a right mouse click in the 3D view + }; +public: static RiuSelectionManager* instance(); // Returns selected items // Selection manager owns the selection items - void selectedItems(std::vector& items) const; - + void selectedItems(std::vector& items, int role = RUI_APPLICATION_GLOBAL) const; + + // Returns selected items + // Selection manager owns the selection items + RiuSelectionItem* selectedItem(int role = RUI_APPLICATION_GLOBAL) const; + // PdmUiItem* selectedItem(int role = SelectionManager::APPLICATION_GLOBAL); + + // Append item to selected items // SelectionManager takes ownership of the item - void appendItemToSelection(RiuSelectionItem* item); + void appendItemToSelection(RiuSelectionItem* item, int role = RUI_APPLICATION_GLOBAL); // Set one selected item // SelectionManager takes ownership of the item - void setSelectedItem(RiuSelectionItem* item); + void setSelectedItem(RiuSelectionItem* item, int role = RUI_APPLICATION_GLOBAL); // Deletes all items in the SelectionManager - void deleteAllItems(); + void deleteAllItems(int role = RUI_APPLICATION_GLOBAL); - bool isEmpty() const; + bool isEmpty(int role = RUI_APPLICATION_GLOBAL) const; private: - void deleteAllItemsFromSelection(); + RiuSelectionManager(); + ~RiuSelectionManager(); + RiuSelectionManager(const RiuSelectionManager&) = delete; + + void deleteAllItemsFromSelection(int role); private: - std::vector < RiuSelectionItem* > m_selection; + std::vector< std::vector > m_selection; RiuSelectionChangedHandler* m_notificationCenter; }; @@ -85,7 +105,9 @@ class RiuSelectionItem enum RiuSelectionType { ECLIPSE_SELECTION_OBJECT, - GEOMECH_SELECTION_OBJECT + GEOMECH_SELECTION_OBJECT, + WELLPATH_SELECTION_OBJECT, + SIMWELL_SELECTION_OBJECT }; public: @@ -146,7 +168,7 @@ class RiuGeoMechSelectionItem : public RiuSelectionItem cvf::Color3f color, int elementFace, const cvf::Vec3d& localIntersectionPoint, - const std::array& m_intersectionTriangle ); + const std::array& intersectionTriangle ); virtual ~RiuGeoMechSelectionItem() {}; virtual RiuSelectionType type() const @@ -165,3 +187,54 @@ class RiuGeoMechSelectionItem : public RiuSelectionItem cvf::Vec3d m_localIntersectionPoint; }; + +//================================================================================================== +// +// +// +//================================================================================================== +class RiuWellPathSelectionItem : public RiuSelectionItem +{ +public: + explicit RiuWellPathSelectionItem(const RivWellPathSourceInfo* wellPathSourceInfo, + const cvf::Vec3d& currentPickPositionInDomainCoords, + double measuredDepth); + + virtual ~RiuWellPathSelectionItem() {}; + + virtual RiuSelectionType type() const + { + return WELLPATH_SELECTION_OBJECT; + } + +public: + RimWellPath* m_wellpath; + cvf::Vec3d m_pipeCenterlineIntersectionInDomainCoords; + double m_measuredDepth; +}; + + + +//================================================================================================== +// +// +// +//================================================================================================== +class RiuSimWellSelectionItem : public RiuSelectionItem +{ +public: + explicit RiuSimWellSelectionItem(RimEclipseWell* simwell, cvf::Vec3d domainCoord, size_t branchIndex); + + + virtual ~RiuSimWellSelectionItem() {}; + + virtual RiuSelectionType type() const + { + return SIMWELL_SELECTION_OBJECT; + } + +public: + RimEclipseWell* m_simWell; + cvf::Vec3d m_domainCoord; + size_t m_branchIndex; +}; diff --git a/ApplicationCode/UserInterface/RiuSimpleHistogramWidget.cpp b/ApplicationCode/UserInterface/RiuSimpleHistogramWidget.cpp index 253b098955..3f0785e38f 100644 --- a/ApplicationCode/UserInterface/RiuSimpleHistogramWidget.cpp +++ b/ApplicationCode/UserInterface/RiuSimpleHistogramWidget.cpp @@ -14,6 +14,11 @@ QWidget(parent, f) m_min = HUGE_VAL; m_max = -HUGE_VAL; m_maxHistogramCount = 0; + + m_width = 0; + m_height = 0; + m_x = 0; + m_y = 0; } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/UserInterface/RiuSummaryQwtPlot.cpp b/ApplicationCode/UserInterface/RiuSummaryQwtPlot.cpp index ff057bd04a..c6b8dc9f56 100644 --- a/ApplicationCode/UserInterface/RiuSummaryQwtPlot.cpp +++ b/ApplicationCode/UserInterface/RiuSummaryQwtPlot.cpp @@ -1,491 +1,371 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#include "RiuSummaryQwtPlot.h" - -#include "RiaApplication.h" - -#include "RimSummaryCurve.h" -#include "RimSummaryPlot.h" - -#include "RiuMainPlotWindow.h" -#include "RiuQwtScalePicker.h" - -#include "qwt_date_scale_draw.h" -#include "qwt_date_scale_engine.h" -#include "qwt_legend.h" -#include "qwt_plot_curve.h" -#include "qwt_plot_grid.h" -#include "qwt_plot_layout.h" -#include "qwt_plot_marker.h" -#include "qwt_plot_panner.h" -#include "qwt_plot_picker.h" -#include "qwt_plot_zoomer.h" -#include "qwt_scale_engine.h" -#include "qwt_symbol.h" - -#include -#include - -#include - - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -class RiuQwtPlotPicker : public QwtPlotPicker -{ -public: - RiuQwtPlotPicker(QWidget *canvas) - : QwtPlotPicker(canvas) - { - } - -protected: - //-------------------------------------------------------------------------------------------------- - /// - //-------------------------------------------------------------------------------------------------- - virtual QwtText trackerText(const QPoint& pos) const override - { - QwtText txt; - - const RiuSummaryQwtPlot* sumPlot = dynamic_cast(this->plot()); - if (sumPlot) - { - int closestYAxis = QwtPlot::yLeft; - QString timeString; - QString valueString; - QPointF closestPoint = sumPlot->closestCurvePoint(pos, &valueString, &timeString, &closestYAxis); - if (!closestPoint.isNull()) - { - QString str = valueString; - - if (!timeString.isEmpty()) - { - str += QString(" (%1)").arg(timeString); - } - - txt.setText(str); - } - - RiuSummaryQwtPlot* nonConstPlot = const_cast(sumPlot); - nonConstPlot->updateClosestCurvePointMarker(closestPoint, closestYAxis); - } - - return txt; - } -}; - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RiuSummaryQwtPlot::RiuSummaryQwtPlot(RimSummaryPlot* plotDefinition, QWidget* parent) : QwtPlot(parent) -{ - Q_ASSERT(plotDefinition); - m_plotDefinition = plotDefinition; - - m_grid = new QwtPlotGrid; - m_grid->attach(this); - - setDefaults(); - - // LeftButton for the zooming - m_zoomerLeft = new QwtPlotZoomer(canvas()); - m_zoomerLeft->setRubberBandPen(QColor(Qt::black)); - m_zoomerLeft->setTrackerMode(QwtPicker::AlwaysOff); - m_zoomerLeft->setTrackerPen(QColor(Qt::black)); - m_zoomerLeft->initMousePattern(1); - - // MidButton for the panning - QwtPlotPanner* panner = new QwtPlotPanner(canvas()); - panner->setMouseButton(Qt::MidButton); - - connect(m_zoomerLeft, SIGNAL(zoomed( const QRectF & )), SLOT(onZoomedSlot())); - connect(panner, SIGNAL(panned( int , int )), SLOT(onZoomedSlot())); - - // Attach a zoomer for the right axis - m_zoomerRight = new QwtPlotZoomer(canvas()); - m_zoomerRight->setAxis(xTop, yRight); - m_zoomerRight->setTrackerMode(QwtPicker::AlwaysOff); - m_zoomerRight->initMousePattern(1); - - - RiuQwtScalePicker* scalePicker = new RiuQwtScalePicker(this); - connect(scalePicker, SIGNAL(clicked(int, double)), this, SLOT(onAxisClicked(int, double))); - - // Create a plot picker to display values next to mouse cursor - m_plotPicker = new RiuQwtPlotPicker(this->canvas()); - m_plotPicker->setTrackerMode(QwtPicker::AlwaysOn); - - m_plotMarker = new QwtPlotMarker; - - // QwtPlotMarker takes ownership of the symbol, it is deleted in destructor of QwtPlotMarker - QwtSymbol* mySymbol = new QwtSymbol(QwtSymbol::Ellipse, Qt::NoBrush, QPen(Qt::black, 2.0), QSize(12, 12)); - m_plotMarker->setSymbol(mySymbol); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RiuSummaryQwtPlot::~RiuSummaryQwtPlot() -{ - m_grid->detach(); - delete m_grid; - - if (m_plotDefinition) - { - m_plotDefinition->handleViewerDeletion(); - } - - m_plotMarker->detach(); - delete m_plotMarker; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RimSummaryPlot* RiuSummaryQwtPlot::ownerPlotDefinition() -{ - return m_plotDefinition; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuSummaryQwtPlot::currentVisibleWindow(QwtInterval* leftAxis, QwtInterval* rightAxis, QwtInterval* timeAxis) const -{ - *leftAxis = axisScaleDiv(yLeft).interval(); - *rightAxis = axisScaleDiv(yRight).interval(); - *timeAxis = axisScaleDiv(xBottom).interval(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuSummaryQwtPlot::setZoomWindow(const QwtInterval& leftAxis, const QwtInterval& rightAxis, const QwtInterval& timeAxis) -{ - { - QRectF zoomWindow; - zoomWindow.setLeft(timeAxis.minValue()); - zoomWindow.setRight(timeAxis.maxValue()); - zoomWindow.setTop(leftAxis.maxValue()); - zoomWindow.setBottom(leftAxis.minValue()); - - m_zoomerLeft->zoom(zoomWindow); - } - - { - QRectF zoomWindow; - zoomWindow.setLeft(timeAxis.minValue()); - zoomWindow.setRight(timeAxis.maxValue()); - zoomWindow.setTop(rightAxis.maxValue()); - zoomWindow.setBottom(rightAxis.minValue()); - - m_zoomerRight->zoom(zoomWindow); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -QSize RiuSummaryQwtPlot::minimumSizeHint() const -{ - return QSize(0, 100); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -QSize RiuSummaryQwtPlot::sizeHint() const -{ - return QSize(0, 0); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -QPointF RiuSummaryQwtPlot::closestCurvePoint(const QPoint& cursorPosition, QString* valueString, QString* timeString, int* yAxis) const -{ - QPointF samplePoint; - - QwtPlotCurve* closestCurve = nullptr; - double distMin = DBL_MAX; - int closestPointSampleIndex = -1; - - const QwtPlotItemList& itmList = itemList(); - for (QwtPlotItemIterator it = itmList.begin(); it != itmList.end(); it++) - { - if ((*it)->rtti() == QwtPlotItem::Rtti_PlotCurve) - { - QwtPlotCurve* candidateCurve = static_cast(*it); - double dist = DBL_MAX; - int candidateSampleIndex = candidateCurve->closestPoint(cursorPosition, &dist); - if (dist < distMin) - { - closestCurve = candidateCurve; - distMin = dist; - closestPointSampleIndex = candidateSampleIndex; - } - } - } - - if (closestCurve && distMin < 50) - { - samplePoint = closestCurve->sample(closestPointSampleIndex); - - if (yAxis) *yAxis = closestCurve->yAxis(); - } - - - if (timeString) - { - const QwtScaleDraw* timeAxisScaleDraw = axisScaleDraw(QwtPlot::xBottom); - if (timeAxisScaleDraw) - { - *timeString = timeAxisScaleDraw->label(samplePoint.x()).text(); - } - } - - if (valueString && closestCurve) - { - const QwtScaleDraw* yAxisScaleDraw = axisScaleDraw(closestCurve->yAxis()); - if (yAxisScaleDraw) - { - *valueString = yAxisScaleDraw->label(samplePoint.y()).text(); - } - } - - return samplePoint; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuSummaryQwtPlot::updateClosestCurvePointMarker(const QPointF& closestPoint, int yAxis) -{ - bool replotRequired = false; - - if (!closestPoint.isNull()) - { - if (!m_plotMarker->plot()) - { - m_plotMarker->attach(this); - - replotRequired = true; - } - - if (m_plotMarker->value() != closestPoint) - { - m_plotMarker->setValue(closestPoint.x(), closestPoint.y()); - - // Set y-axis to be able to support more than one y-axis. Default y-axis is left axis. - // TODO : Should use a color or other visual indicator to show what axis the curve relates to - m_plotMarker->setYAxis(yAxis); - - replotRequired = true; - } - } - else - { - if (m_plotMarker->plot()) - { - m_plotMarker->detach(); - - replotRequired = true; - } - } - - if (replotRequired) this->replot(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuSummaryQwtPlot::setDefaults() -{ - QPalette newPalette(palette()); - newPalette.setColor(QPalette::Background, Qt::white); - setPalette(newPalette); - - setAutoFillBackground(true); - setCanvasBackground(Qt::white); - - QFrame* canvasFrame = dynamic_cast(canvas()); - if (canvasFrame) - { - canvasFrame->setFrameShape(QFrame::NoFrame); - } - - canvas()->setMouseTracking(true); - canvas()->installEventFilter(this); - - QPen gridPen(Qt::SolidLine); - gridPen.setColor(Qt::lightGray); - m_grid->setPen(gridPen); - - enableAxis(QwtPlot::xBottom, true); - enableAxis(QwtPlot::yLeft, true); - enableAxis(QwtPlot::xTop, false); - enableAxis(QwtPlot::yRight, false); - - plotLayout()->setAlignCanvasToScales(true); - - useDateBasedTimeAxis(); - - QFont xAxisFont = axisFont(QwtPlot::xBottom); - xAxisFont.setPixelSize(11); - setAxisFont(QwtPlot::xBottom, xAxisFont); - setAxisMaxMinor(QwtPlot::xBottom, 2); - - QFont yAxisFont = axisFont(QwtPlot::yLeft); - yAxisFont.setPixelSize(11); - setAxisFont(QwtPlot::yLeft, yAxisFont); - - setAxisMaxMinor(QwtPlot::yLeft, 3); - - QwtText axisTitleY = axisTitle(QwtPlot::yLeft); - QFont yAxisTitleFont = axisTitleY.font(); - yAxisTitleFont.setPixelSize(11); - yAxisTitleFont.setBold(false); - axisTitleY.setFont(yAxisTitleFont); - axisTitleY.setRenderFlags(Qt::AlignRight); - setAxisTitle(QwtPlot::yLeft, axisTitleY); - - - QwtLegend* legend = new QwtLegend(this); - // The legend will be deleted in the destructor of the plot or when - // another legend is inserted. - this->insertLegend(legend, BottomLegend); -} - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuSummaryQwtPlot::useDateBasedTimeAxis() -{ - QwtDateScaleDraw* scaleDraw = new QwtDateScaleDraw(Qt::UTC); - scaleDraw->setDateFormat(QwtDate::Year, QString("dd-MM-yyyy")); - - QwtDateScaleEngine* scaleEngine = new QwtDateScaleEngine(Qt::UTC); - setAxisScaleEngine(QwtPlot::xBottom, scaleEngine); - setAxisScaleDraw(QwtPlot::xBottom, scaleDraw); -} - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuSummaryQwtPlot::useTimeBasedTimeAxis() -{ - setAxisScaleEngine(QwtPlot::xBottom, new QwtLinearScaleEngine()); - setAxisScaleDraw(QwtPlot::xBottom, new QwtScaleDraw()); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RiuSummaryQwtPlot::eventFilter(QObject* watched, QEvent* event) -{ - if(watched == canvas()) - { - QMouseEvent* mouseEvent = dynamic_cast(event); - if(mouseEvent) - { - if(mouseEvent->button() == Qt::LeftButton && mouseEvent->type() == QMouseEvent::MouseButtonRelease) - { - selectClosestCurve(mouseEvent->pos()); - } - } - } - - return QwtPlot::eventFilter(watched, event); -} - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuSummaryQwtPlot::leaveEvent(QEvent *) -{ - if (m_plotMarker->plot()) - { - m_plotMarker->detach(); - - replot(); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuSummaryQwtPlot::selectClosestCurve(const QPoint& pos) -{ - QwtPlotCurve* closestCurve = NULL; - double distMin = DBL_MAX; - - const QwtPlotItemList& itmList = itemList(); - for(QwtPlotItemIterator it = itmList.begin(); it != itmList.end(); it++) - { - if((*it)->rtti() == QwtPlotItem::Rtti_PlotCurve) - { - QwtPlotCurve* candidateCurve = static_cast(*it); - double dist = DBL_MAX; - candidateCurve->closestPoint(pos, &dist); - if(dist < distMin) - { - closestCurve = candidateCurve; - distMin = dist; - } - } - } - - if(closestCurve && distMin < 20) - { - RimSummaryCurve* selectedCurve = m_plotDefinition->findRimCurveFromQwtCurve(closestCurve); - if(selectedCurve) - { - RiaApplication::instance()->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem(selectedCurve); - } - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuSummaryQwtPlot::onZoomedSlot() -{ - QwtInterval left, right, time; - currentVisibleWindow(&left, &right, &time); - - this->setZoomWindow(left, right, time); - - m_plotDefinition->updateZoomFromQwt(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuSummaryQwtPlot::onAxisClicked(int axis, double value) -{ - if (!m_plotDefinition) return; - - m_plotDefinition->selectAxisInPropertyEditor(axis); -} +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RiuSummaryQwtPlot.h" + +#include "RiaApplication.h" + +#include "RimContextCommandBuilder.h" +#include "RimSummaryCurve.h" +#include "RimSummaryPlot.h" + +#include "RiuMainPlotWindow.h" +#include "RiuQwtScalePicker.h" +#include "RiuQwtCurvePointTracker.h" + +#include "cafSelectionManager.h" + +#include "qwt_date_scale_engine.h" +#include "qwt_date_scale_draw.h" +#include "qwt_legend.h" +#include "qwt_plot_curve.h" +#include "qwt_plot_grid.h" +#include "qwt_plot_layout.h" +#include "qwt_plot_panner.h" +#include "qwt_plot_zoomer.h" +#include "qwt_scale_engine.h" + +#include +#include +#include + +#include +#include "qwt_plot_magnifier.h" +#include "RiuQwtPlotWheelZoomer.h" +#include "RiuQwtPlotZoomer.h" + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuSummaryQwtPlot::RiuSummaryQwtPlot(RimSummaryPlot* plotDefinition, QWidget* parent) : QwtPlot(parent) +{ + Q_ASSERT(plotDefinition); + m_plotDefinition = plotDefinition; + + setDefaults(); + + // LeftButton for the zooming + m_zoomerLeft = new RiuQwtPlotZoomer(canvas()); + m_zoomerLeft->setRubberBandPen(QColor(Qt::black)); + m_zoomerLeft->setTrackerMode(QwtPicker::AlwaysOff); + m_zoomerLeft->setTrackerPen(QColor(Qt::black)); + m_zoomerLeft->initMousePattern(1); + + // Attach a zoomer for the right axis + m_zoomerRight = new RiuQwtPlotZoomer(canvas()); + m_zoomerRight->setAxis(xTop, yRight); + m_zoomerRight->setTrackerMode(QwtPicker::AlwaysOff); + m_zoomerRight->initMousePattern(1); + + // MidButton for the panning + QwtPlotPanner* panner = new QwtPlotPanner(canvas()); + panner->setMouseButton(Qt::MidButton); + + auto wheelZoomer = new RiuQwtPlotWheelZoomer(this); + + connect(wheelZoomer, SIGNAL(zoomUpdated()), SLOT(onZoomedSlot())); + connect(m_zoomerLeft, SIGNAL(zoomed( const QRectF & )), SLOT(onZoomedSlot())); + connect(panner, SIGNAL(panned( int , int )), SLOT(onZoomedSlot())); + + RiuQwtScalePicker* scalePicker = new RiuQwtScalePicker(this); + connect(scalePicker, SIGNAL(clicked(int, double)), this, SLOT(onAxisClicked(int, double))); + +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuSummaryQwtPlot::~RiuSummaryQwtPlot() +{ + if (m_plotDefinition) + { + m_plotDefinition->detachAllCurves(); + m_plotDefinition->handleMdiWindowClosed(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimSummaryPlot* RiuSummaryQwtPlot::ownerPlotDefinition() +{ + return m_plotDefinition; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimViewWindow* RiuSummaryQwtPlot::ownerViewWindow() const +{ + return m_plotDefinition; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuSummaryQwtPlot::currentVisibleWindow(QwtInterval* leftAxis, QwtInterval* rightAxis, QwtInterval* timeAxis) const +{ + *leftAxis = axisScaleDiv(yLeft).interval(); + *rightAxis = axisScaleDiv(yRight).interval(); + *timeAxis = axisScaleDiv(xBottom).interval(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuSummaryQwtPlot::setZoomWindow(const QwtInterval& leftAxis, const QwtInterval& rightAxis, const QwtInterval& timeAxis) +{ + { + QRectF zoomWindow; + zoomWindow.setLeft(timeAxis.minValue()); + zoomWindow.setRight(timeAxis.maxValue()); + zoomWindow.setTop(leftAxis.maxValue()); + zoomWindow.setBottom(leftAxis.minValue()); + + m_zoomerLeft->zoom(zoomWindow); + } + + { + QRectF zoomWindow; + zoomWindow.setLeft(timeAxis.minValue()); + zoomWindow.setRight(timeAxis.maxValue()); + zoomWindow.setTop(rightAxis.maxValue()); + zoomWindow.setBottom(rightAxis.minValue()); + + m_zoomerRight->zoom(zoomWindow); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QSize RiuSummaryQwtPlot::minimumSizeHint() const +{ + return QSize(0, 100); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuSummaryQwtPlot::contextMenuEvent(QContextMenuEvent* event) +{ + QMenu menu; + QStringList commandIds; + + caf::SelectionManager::instance()->setSelectedItem(ownerPlotDefinition()); + + commandIds << "RicShowPlotDataFeature"; + + RimContextCommandBuilder::appendCommandsToMenu(commandIds, &menu); + + if (menu.actions().size() > 0) + { + menu.exec(event->globalPos()); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QSize RiuSummaryQwtPlot::sizeHint() const +{ + return QSize(0, 0); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuSummaryQwtPlot::setDefaults() +{ + setCommonPlotBehaviour(this); + + enableAxis(QwtPlot::xBottom, true); + enableAxis(QwtPlot::yLeft, true); + enableAxis(QwtPlot::xTop, false); + enableAxis(QwtPlot::yRight, false); + + useDateBasedTimeAxis(); + + setAxisMaxMinor(QwtPlot::xBottom, 2); + setAxisMaxMinor(QwtPlot::yLeft, 3); + + // The legend will be deleted in the destructor of the plot or when + // another legend is inserted. + QwtLegend* legend = new QwtLegend(this); + this->insertLegend(legend, BottomLegend); +} + +void RiuSummaryQwtPlot::setCommonPlotBehaviour(QwtPlot* plot) +{ + // Plot background and frame look + + QPalette newPalette(plot->palette()); + newPalette.setColor(QPalette::Background, Qt::white); + plot->setPalette(newPalette); + + plot->setAutoFillBackground(true); + plot->setCanvasBackground(Qt::white); + + QFrame* canvasFrame = dynamic_cast(plot->canvas()); + if (canvasFrame) + { + canvasFrame->setFrameShape(QFrame::NoFrame); + } + + // Grid + + QwtPlotGrid* grid = new QwtPlotGrid; + grid->attach(plot); + QPen gridPen(Qt::SolidLine); + gridPen.setColor(Qt::lightGray); + grid->setPen(gridPen); + + // Axis number font + QFont axisFont = plot->axisFont(QwtPlot::xBottom); + axisFont.setPixelSize(11); + + plot->setAxisFont(QwtPlot::xBottom, axisFont); + plot->setAxisFont(QwtPlot::xTop, axisFont); + plot->setAxisFont(QwtPlot::yLeft, axisFont); + plot->setAxisFont(QwtPlot::yRight, axisFont); + + // Axis title font + QwtText axisTitle = plot->axisTitle(QwtPlot::xBottom); + QFont axisTitleFont = axisTitle.font(); + axisTitleFont.setPixelSize(11); + axisTitleFont.setBold(false); + axisTitle.setFont(axisTitleFont); + axisTitle.setRenderFlags(Qt::AlignRight); + + plot->setAxisTitle(QwtPlot::xBottom, axisTitle); + plot->setAxisTitle(QwtPlot::xTop, axisTitle); + plot->setAxisTitle(QwtPlot::yLeft, axisTitle); + plot->setAxisTitle(QwtPlot::yRight, axisTitle); + + // Enable mousetracking and event filter + + plot->canvas()->setMouseTracking(true); + plot->canvas()->installEventFilter(plot); + plot->plotLayout()->setAlignCanvasToScales(true); + + new RiuQwtCurvePointTracker(plot, true); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuSummaryQwtPlot::useDateBasedTimeAxis() +{ + enableDateBasedBottomXAxis(this); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuSummaryQwtPlot::enableDateBasedBottomXAxis(QwtPlot* plot) +{ + QwtDateScaleDraw* scaleDraw = new QwtDateScaleDraw(Qt::UTC); + scaleDraw->setDateFormat(QwtDate::Year, QString("dd-MM-yyyy")); + + QwtDateScaleEngine* scaleEngine = new QwtDateScaleEngine(Qt::UTC); + plot->setAxisScaleEngine(QwtPlot::xBottom, scaleEngine); + plot->setAxisScaleDraw(QwtPlot::xBottom, scaleDraw); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuSummaryQwtPlot::useTimeBasedTimeAxis() +{ + setAxisScaleEngine(QwtPlot::xBottom, new QwtLinearScaleEngine()); + setAxisScaleDraw(QwtPlot::xBottom, new QwtScaleDraw()); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RiuSummaryQwtPlot::eventFilter(QObject* watched, QEvent* event) +{ + if(watched == canvas()) + { + QMouseEvent* mouseEvent = dynamic_cast(event); + if(mouseEvent) + { + if(mouseEvent->button() == Qt::LeftButton && mouseEvent->type() == QMouseEvent::MouseButtonRelease) + { + selectClosestCurve(mouseEvent->pos()); + } + } + } + + return QwtPlot::eventFilter(watched, event); +} + + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuSummaryQwtPlot::selectClosestCurve(const QPoint& pos) +{ + QwtPlotCurve* closestCurve = NULL; + double distMin = DBL_MAX; + + const QwtPlotItemList& itmList = itemList(); + for(QwtPlotItemIterator it = itmList.begin(); it != itmList.end(); it++) + { + if((*it)->rtti() == QwtPlotItem::Rtti_PlotCurve) + { + QwtPlotCurve* candidateCurve = static_cast(*it); + double dist = DBL_MAX; + candidateCurve->closestPoint(pos, &dist); + if(dist < distMin) + { + closestCurve = candidateCurve; + distMin = dist; + } + } + } + + if(closestCurve && distMin < 20) + { + caf::PdmObject* selectedCurve = m_plotDefinition->findRimCurveFromQwtCurve(closestCurve); + if(selectedCurve) + { + RiaApplication::instance()->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem(selectedCurve); + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuSummaryQwtPlot::onZoomedSlot() +{ + m_plotDefinition->updateZoomWindowFromQwt(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuSummaryQwtPlot::onAxisClicked(int axis, double value) +{ + if (!m_plotDefinition) return; + + m_plotDefinition->selectAxisInPropertyEditor(axis); +} diff --git a/ApplicationCode/UserInterface/RiuSummaryQwtPlot.h b/ApplicationCode/UserInterface/RiuSummaryQwtPlot.h index 7c48f489cb..a57bf3c1cb 100644 --- a/ApplicationCode/UserInterface/RiuSummaryQwtPlot.h +++ b/ApplicationCode/UserInterface/RiuSummaryQwtPlot.h @@ -1,90 +1,87 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#pragma once - -#include "qwt_plot.h" -#include "cafPdmPointer.h" - -#include - -class QwtPlotCurve; -class QwtPlotGrid; -class QwtPlotZoomer; -class QwtInterval; -class QwtPicker; -class QwtPlotMarker; - -class RimSummaryPlot; - -//================================================================================================== -// -// -// -//================================================================================================== -class RiuSummaryQwtPlot : public QwtPlot -{ - Q_OBJECT; -public: - RiuSummaryQwtPlot(RimSummaryPlot* plotDefinition, QWidget* parent = NULL); - virtual ~RiuSummaryQwtPlot(); - - RimSummaryPlot* ownerPlotDefinition(); - - void useDateBasedTimeAxis(); - void useTimeBasedTimeAxis(); - - void currentVisibleWindow(QwtInterval* leftAxis, - QwtInterval* rightAxis, - QwtInterval* timeAxis) const; - - void setZoomWindow(const QwtInterval& leftAxis, - const QwtInterval& rightAxis, - const QwtInterval& timeAxis); - -protected: - virtual bool eventFilter(QObject* watched, QEvent* event) override; - virtual void leaveEvent(QEvent *) override; - - virtual QSize sizeHint() const override; - virtual QSize minimumSizeHint() const override; - -private: - friend class RiuQwtPlotPicker; - QPointF closestCurvePoint(const QPoint& pos, QString* valueString, QString* timeString, int* yAxis) const; - void updateClosestCurvePointMarker(const QPointF& pos, int yAxis); - - void setDefaults(); - void selectClosestCurve(const QPoint& pos); - void showToolTip(const QPoint& pos); - -private slots: - void onZoomedSlot( ); - void onAxisClicked(int axis, double value); - -private: - QwtPlotGrid* m_grid; - QwtPicker* m_plotPicker; - QwtPlotMarker* m_plotMarker; - - caf::PdmPointer m_plotDefinition; - - QPointer m_zoomerLeft; - QPointer m_zoomerRight; -}; - +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "qwt_plot.h" +#include "cafPdmPointer.h" + +#include +#include "RiuInterfaceToViewWindow.h" + +class QwtPlotCurve; +class QwtPlotGrid; +class QwtPlotZoomer; +class QwtInterval; +class QwtPicker; +class QwtPlotMarker; + +class RimSummaryPlot; + +//================================================================================================== +// +// +// +//================================================================================================== +class RiuSummaryQwtPlot : public QwtPlot, public RiuInterfaceToViewWindow +{ + Q_OBJECT; +public: + RiuSummaryQwtPlot(RimSummaryPlot* plotDefinition, QWidget* parent = NULL); + virtual ~RiuSummaryQwtPlot(); + + RimSummaryPlot* ownerPlotDefinition(); + virtual RimViewWindow* ownerViewWindow() const override; + + void useDateBasedTimeAxis(); + void useTimeBasedTimeAxis(); + + void currentVisibleWindow(QwtInterval* leftAxis, + QwtInterval* rightAxis, + QwtInterval* timeAxis) const; + + void setZoomWindow(const QwtInterval& leftAxis, + const QwtInterval& rightAxis, + const QwtInterval& timeAxis); + + static void setCommonPlotBehaviour(QwtPlot* plot); + static void enableDateBasedBottomXAxis(QwtPlot* plot); + +protected: + virtual bool eventFilter(QObject* watched, QEvent* event) override; + + virtual QSize sizeHint() const override; + virtual QSize minimumSizeHint() const override; + virtual void contextMenuEvent(QContextMenuEvent *) override; + +private: + + void setDefaults(); + void selectClosestCurve(const QPoint& pos); + +private slots: + void onZoomedSlot( ); + void onAxisClicked(int axis, double value); + +private: + caf::PdmPointer m_plotDefinition; + + QPointer m_zoomerLeft; + QPointer m_zoomerRight; +}; + diff --git a/ApplicationCode/UserInterface/RiuToolTipMenu.h b/ApplicationCode/UserInterface/RiuToolTipMenu.h index c792551dff..d67ee41b7b 100644 --- a/ApplicationCode/UserInterface/RiuToolTipMenu.h +++ b/ApplicationCode/UserInterface/RiuToolTipMenu.h @@ -26,7 +26,7 @@ class RiuToolTipMenu : public QMenu { public: - RiuToolTipMenu(QWidget * parent); + explicit RiuToolTipMenu(QWidget * parent); bool event(QEvent* e); }; diff --git a/ApplicationCode/UserInterface/RiuTreeViewEventFilter.cpp b/ApplicationCode/UserInterface/RiuTreeViewEventFilter.cpp index eedc2637a5..fdf3c47298 100644 --- a/ApplicationCode/UserInterface/RiuTreeViewEventFilter.cpp +++ b/ApplicationCode/UserInterface/RiuTreeViewEventFilter.cpp @@ -21,12 +21,16 @@ #include "ToggleCommands/RicToggleItemsFeatureImpl.h" +#include "RiaApplication.h" + #include "RimCaseCollection.h" #include "RimEclipseCase.h" #include "RimGeoMechCase.h" #include "RimGeoMechView.h" #include "RimIdenticalGridCaseGroup.h" + #include "RiuMainWindow.h" +#include "RiuMainPlotWindow.h" #include "cafCmdFeature.h" #include "cafCmdFeatureManager.h" @@ -85,7 +89,18 @@ bool RiuTreeViewEventFilter::eventFilter(QObject *obj, QEvent *event) } } - if (!RiuMainWindow::instance()->projectTreeView()->isTreeItemEditWidgetActive()) + // Do not toggle state if currently editing a name in the tree view + bool toggleStateForSelection = true; + if (RiuMainWindow::instance()->projectTreeView()->isTreeItemEditWidgetActive()) + { + toggleStateForSelection = false; + } + else if (RiaApplication::instance()->mainPlotWindow() && RiaApplication::instance()->mainPlotWindow()->projectTreeView()->isTreeItemEditWidgetActive()) + { + toggleStateForSelection = false; + } + + if (toggleStateForSelection) { switch (keyEvent->key()) { diff --git a/ApplicationCode/UserInterface/RiuTreeViewEventFilter.h b/ApplicationCode/UserInterface/RiuTreeViewEventFilter.h index fd065b8018..37b950cf65 100644 --- a/ApplicationCode/UserInterface/RiuTreeViewEventFilter.h +++ b/ApplicationCode/UserInterface/RiuTreeViewEventFilter.h @@ -29,7 +29,7 @@ class RiuTreeViewEventFilter : public QObject { Q_OBJECT public: - RiuTreeViewEventFilter(QObject* parent); + explicit RiuTreeViewEventFilter(QObject* parent); protected: bool eventFilter(QObject *obj, QEvent *event); diff --git a/ApplicationCode/UserInterface/RiuViewer.cpp b/ApplicationCode/UserInterface/RiuViewer.cpp index be64e732c4..7eb793912c 100644 --- a/ApplicationCode/UserInterface/RiuViewer.cpp +++ b/ApplicationCode/UserInterface/RiuViewer.cpp @@ -39,7 +39,9 @@ #include "cafCategoryLegend.h" #include "cafCeetronPlusNavigation.h" +#include "cafDisplayCoordTransform.h" #include "cafEffectGenerator.h" +#include "cafFrameAnimationControl.h" #include "cvfCamera.h" #include "cvfFont.h" @@ -169,8 +171,9 @@ RiuViewer::RiuViewer(const QGLFormat& format, QWidget* parent) setContextMenuPolicy(Qt::PreventContextMenu); m_gridBoxGenerator = new RivGridBoxGenerator; -} + m_cursorPositionDomainCoords = cvf::Vec3d::UNDEFINED; +} //-------------------------------------------------------------------------------------------------- /// @@ -179,8 +182,7 @@ RiuViewer::~RiuViewer() { if (m_rimView) { - m_rimView->showWindow = false; - m_rimView->uiCapability()->updateUiIconFromToggleField(); + m_rimView->handleMdiWindowClosed(); m_rimView->cameraPosition = m_mainCamera->viewMatrix(); m_rimView->cameraPointOfInterest = pointOfInterest(); @@ -396,16 +398,38 @@ void RiuViewer::paintOverlayItems(QPainter* painter) { m_histogramWidget->resize(columnWidth, 40); m_histogramWidget->render(painter,QPoint(columnPos, yPos)); - yPos += m_histogramWidget->height() + margin; + //yPos += m_histogramWidget->height() + margin; } - if (m_showInfoText) + if (m_showInfoText) // Version Label { QSize size(m_versionInfoLabel->sizeHint().width(), m_versionInfoLabel->sizeHint().height()); QPoint pos(this->width() - size.width() - margin, this->height() - size.height() - margin); m_versionInfoLabel->resize(size.width(), size.height()); m_versionInfoLabel->render(painter, pos); - yPos += size.height() + margin; + } + + if (!m_cursorPositionDomainCoords.isUndefined()) + { + if (mainCamera()) + { + cvf::ref trans = m_rimView->displayCoordTransform(); + + cvf::Vec3d displayCoord = trans->transformToDisplayCoord(m_cursorPositionDomainCoords); + + cvf::Vec3d screenCoords; + if (mainCamera()->project(displayCoord, &screenCoords)) + { + int translatedMousePosY = height() - screenCoords.y(); + QPoint centerPos(screenCoords.x(), translatedMousePosY); + + // Draw a cross hair marker + int markerHalfLength = 6; + + painter->drawLine(centerPos.x(), centerPos.y() - markerHalfLength, centerPos.x(), centerPos.y() + markerHalfLength); + painter->drawLine(centerPos.x() - markerHalfLength, centerPos.y(), centerPos.x() + markerHalfLength, centerPos.y()); + } + } } } @@ -609,7 +633,9 @@ void RiuViewer::setCurrentFrame(int frameIndex) cvf::Rendering* firstRendering = m_mainRendering.p(); CVF_ASSERT(firstRendering); - if (m_rimView) m_rimView->setCurrentTimeStep(frameIndex); + if (m_rimView) m_rimView->setCurrentTimeStepAndUpdate(frameIndex); + + animationControl()->setCurrentFrameOnly(frameIndex); caf::Viewer::slotSetCurrentFrame(frameIndex); } @@ -622,6 +648,14 @@ RimView* RiuViewer::ownerReservoirView() return m_rimView; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimViewWindow* RiuViewer::ownerViewWindow() const +{ + return m_rimView; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -655,6 +689,54 @@ void RiuViewer::resizeGL(int width, int height) } } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuViewer::mouseMoveEvent(QMouseEvent* mouseEvent) +{ + if (m_rimView) + { + RimViewLinker* viewLinker = m_rimView->assosiatedViewLinker(); + if (viewLinker) + { + int translatedMousePosX = mouseEvent->pos().x(); + int translatedMousePosY = height() - mouseEvent->pos().y(); + + cvf::Vec3d displayCoord(0, 0, 0); + if (mainCamera()->unproject(cvf::Vec3d(static_cast(translatedMousePosX), static_cast(translatedMousePosY), 0), &displayCoord)) + { + if (m_cursorPositionDomainCoords != cvf::Vec3d::UNDEFINED) + { + // Reset the extra cursor if the view currently is receiving mouse cursor events + // Set undefined and redraw to remove the previously displayed cursor + m_cursorPositionDomainCoords = cvf::Vec3d::UNDEFINED; + + update(); + } + + cvf::ref trans = m_rimView->displayCoordTransform(); + cvf::Vec3d domainCoord = trans->transformToDomainCoord(displayCoord); + + viewLinker->updateCursorPosition(m_rimView, domainCoord); + } + } + } + + caf::Viewer::mouseMoveEvent(mouseEvent); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuViewer::leaveEvent(QEvent *) +{ + if (m_rimView && m_rimView->assosiatedViewLinker()) + { + RimViewLinker* viewLinker = m_rimView->assosiatedViewLinker(); + viewLinker->updateCursorPosition(m_rimView, cvf::Vec3d::UNDEFINED); + } +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -752,6 +834,19 @@ void RiuViewer::updateParallelProjectionSettings(RiuViewer* sourceViewer) this->updateParallelProjectionCameraPosFromPointOfInterestMove(poi); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuViewer::setCursorPosition(const cvf::Vec3d& domainCoord) +{ + if (m_cursorPositionDomainCoords != domainCoord) + { + m_cursorPositionDomainCoords = domainCoord; + + update(); + } +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/UserInterface/RiuViewer.h b/ApplicationCode/UserInterface/RiuViewer.h index 525ea5342c..748dbcda33 100644 --- a/ApplicationCode/UserInterface/RiuViewer.h +++ b/ApplicationCode/UserInterface/RiuViewer.h @@ -27,6 +27,7 @@ #include "cafMouseState.h" #include "cvfStructGrid.h" +#include "RiuInterfaceToViewWindow.h" class RicCommandFeature; class RimView; @@ -52,7 +53,7 @@ namespace cvf // RiuViewer // //================================================================================================== -class RiuViewer : public caf::Viewer +class RiuViewer : public caf::Viewer, public RiuInterfaceToViewWindow { Q_OBJECT @@ -65,6 +66,7 @@ class RiuViewer : public caf::Viewer void setPointOfInterest(cvf::Vec3d poi); void setOwnerReservoirView(RimView * owner); RimView* ownerReservoirView(); + RimViewWindow* ownerViewWindow() const override; void setEnableMask(unsigned int mask); void showInfoText(bool enable); @@ -96,6 +98,8 @@ class RiuViewer : public caf::Viewer void updateParallelProjectionSettings(RiuViewer* sourceViewer); + void setCursorPosition(const cvf::Vec3d& domainCoord); + public slots: virtual void slotSetCurrentFrame(int frameIndex); virtual void slotEndAnimation(); @@ -103,6 +107,8 @@ public slots: protected: virtual void optimizeClippingPlanes(); virtual void resizeGL(int width, int height); + virtual void mouseMoveEvent(QMouseEvent* e) override; + virtual void leaveEvent(QEvent *) override; private: void updateTextAndTickMarkColorForOverlayItems(); @@ -140,5 +146,7 @@ public slots: RiuViewerCommands* m_viewerCommands; RivGridBoxGenerator* m_gridBoxGenerator; + + cvf::Vec3d m_cursorPositionDomainCoords; }; diff --git a/ApplicationCode/UserInterface/RiuViewerCommands.cpp b/ApplicationCode/UserInterface/RiuViewerCommands.cpp index a6d0a795f7..f6dc88ae91 100644 --- a/ApplicationCode/UserInterface/RiuViewerCommands.cpp +++ b/ApplicationCode/UserInterface/RiuViewerCommands.cpp @@ -20,6 +20,7 @@ #include "RiuViewerCommands.h" #include "RiaApplication.h" +#include "RiaColorTables.h" #include "RicViewerEventInterface.h" #include "RicEclipsePropertyFilterNewExec.h" @@ -27,11 +28,12 @@ #include "RicRangeFilterNewExec.h" #include "WellPathCommands/RicWellPathViewerEventHandler.h" -#include "RigCaseData.h" +#include "RigEclipseCaseData.h" #include "RigFault.h" #include "RigFemPartCollection.h" #include "RigFemPartGrid.h" #include "RigGeoMechCaseData.h" +#include "RigMainGrid.h" #include "RimCellEdgeColors.h" #include "RimContextCommandBuilder.h" @@ -54,7 +56,6 @@ #include "RimWellPath.h" #include "RiuMainWindow.h" -#include "RiuSelectionColors.h" #include "RiuSelectionManager.h" #include "RiuViewer.h" @@ -65,7 +66,7 @@ #include "RivSourceInfo.h" #include "RivTernarySaturationOverlayItem.h" #include "RivWellPathSourceInfo.h" -#include "RivWellPipeSourceInfo.h" +#include "RivSimWellPipeSourceInfo.h" #include "cafCmdExecCommandManager.h" #include "cafCmdFeatureManager.h" @@ -76,6 +77,7 @@ #include "cvfOverlayAxisCross.h" #include "cvfOverlayScalarMapperLegend.h" #include "cvfPart.h" +#include "cvfTransform.h" #include #include @@ -254,8 +256,7 @@ void RiuViewerCommands::displayContextMenu(QMouseEvent* event) } // Hide faults command - const RigCaseData* reservoir = eclipseView->eclipseCase()->reservoirData(); - const RigFault* fault = reservoir->mainGrid()->findFaultFromCellIndexAndCellFace(m_currentCellIndex, m_currentFaceIndex); + const RigFault* fault = eclipseView->mainGrid()->findFaultFromCellIndexAndCellFace(m_currentCellIndex, m_currentFaceIndex); if (fault) { menu.addSeparator(); @@ -293,13 +294,14 @@ void RiuViewerCommands::displayContextMenu(QMouseEvent* event) { caf::SelectionManager::instance()->setSelectedItem(wellPath); - commandIds << "RicNewWellLogFileCurveFeature"; commandIds << "RicNewWellLogCurveExtractionFeature"; + commandIds << "RicNewWellLogFileCurveFeature"; + commandIds << "Separator"; commandIds << "RicNewWellPathIntersectionFeature"; } } - const RivEclipseWellSourceInfo* eclipseWellSourceInfo = dynamic_cast(firstHitPart->sourceInfo()); + const RivSimWellPipeSourceInfo* eclipseWellSourceInfo = dynamic_cast(firstHitPart->sourceInfo()); if (eclipseWellSourceInfo) { RimEclipseWell* well = eclipseWellSourceInfo->well(); @@ -307,7 +309,16 @@ void RiuViewerCommands::displayContextMenu(QMouseEvent* event) { caf::SelectionManager::instance()->setSelectedItem(well); + commandIds << "RicNewWellLogCurveExtractionFeature"; + commandIds << "RicShowWellAllocationPlotFeature"; + commandIds << "RicPlotProductionRateFeature"; + commandIds << "Separator"; + commandIds << "RicShowContributingWellsFeature"; + commandIds << "Separator"; commandIds << "RicNewSimWellIntersectionFeature"; + + RiuSelectionItem* selItem = new RiuSimWellSelectionItem(eclipseWellSourceInfo->well(), m_currentPickPositionInDomainCoords, eclipseWellSourceInfo->branchIndex()); + RiuSelectionManager::instance()->setSelectedItem(selItem, RiuSelectionManager::RUI_TEMPORARY); } } @@ -322,13 +333,20 @@ void RiuViewerCommands::displayContextMenu(QMouseEvent* event) commandIds << "RicUnLinkViewFeature"; } + commandIds << "Separator"; + commandIds << "RicNewGridTimeHistoryCurveFeature"; + commandIds << "RicShowFlowCharacteristicsPlotFeature"; + RimContextCommandBuilder::appendCommandsToMenu(commandIds, &menu); - if (menu.actions().size() > 0) + if (!menu.isEmpty()) { menu.exec(event->globalPos()); } + + // Delete items in temporary selection + RiuSelectionManager::instance()->deleteAllItems(RiuSelectionManager::RUI_TEMPORARY); } //-------------------------------------------------------------------------------------------------- @@ -397,8 +415,7 @@ void RiuViewerCommands::slotHideFault() RimEclipseView* eclipseView = dynamic_cast(m_reservoirView.p()); if(!eclipseView) return; - const RigCaseData* reservoir = eclipseView->eclipseCase()->reservoirData(); - const RigFault* fault = reservoir->mainGrid()->findFaultFromCellIndexAndCellFace(m_currentCellIndex, m_currentFaceIndex); + const RigFault* fault = eclipseView->mainGrid()->findFaultFromCellIndexAndCellFace(m_currentCellIndex, m_currentFaceIndex); if (fault) { QString faultName = fault->name(); @@ -507,7 +524,7 @@ void RiuViewerCommands::handlePickAction(int winPosX, int winPosY, Qt::KeyboardM const RivFemPickSourceInfo* femSourceInfo = dynamic_cast(firstHitPart->sourceInfo()); const RivIntersectionSourceInfo* crossSectionSourceInfo = dynamic_cast(firstHitPart->sourceInfo()); const RivIntersectionBoxSourceInfo* intersectionBoxSourceInfo = dynamic_cast(firstHitPart->sourceInfo()); - const RivEclipseWellSourceInfo* eclipseWellSourceInfo = dynamic_cast(firstHitPart->sourceInfo()); + const RivSimWellPipeSourceInfo* eclipseWellSourceInfo = dynamic_cast(firstHitPart->sourceInfo()); if (rivSourceInfo) { @@ -576,10 +593,16 @@ void RiuViewerCommands::handlePickAction(int winPosX, int winPosY, Qt::KeyboardM appendToSelection = true; } - cvf::Color3f curveColor = RiuSelectionColors::curveColorFromTable(); - if (RiuSelectionManager::instance()->isEmpty() || !appendToSelection) + std::vector items; + RiuSelectionManager::instance()->selectedItems(items); + + const caf::ColorTable& colorTable = RiaColorTables::selectionPaletteColors(); + + cvf::Color3f curveColor = colorTable.cycledColor3f(items.size()); + + if (!appendToSelection) { - curveColor = RiuSelectionColors::singleCurveColor(); + curveColor = colorTable.cycledColor3f(0); } RiuSelectionItem* selItem = NULL; @@ -638,7 +661,7 @@ void RiuViewerCommands::findCellAndGridIndex(const RivIntersectionSourceInfo* cr { size_t globalCellIndex = crossSectionSourceInfo->triangleToCellIndex()[firstPartTriangleIndex]; - const RigCell& cell = eclipseView->eclipseCase()->reservoirData()->mainGrid()->globalCellArray()[globalCellIndex]; + const RigCell& cell = eclipseView->mainGrid()->globalCellArray()[globalCellIndex]; *cellIndex = cell.gridLocalCellIndex(); *gridIndex = cell.hostGrid()->gridIndex(); } @@ -662,7 +685,7 @@ void RiuViewerCommands::findCellAndGridIndex(const RivIntersectionBoxSourceInfo* { size_t globalCellIndex = intersectionBoxSourceInfo->triangleToCellIndex()[firstPartTriangleIndex]; - const RigCell& cell = eclipseView->eclipseCase()->reservoirData()->mainGrid()->globalCellArray()[globalCellIndex]; + const RigCell& cell = eclipseView->mainGrid()->globalCellArray()[globalCellIndex]; *cellIndex = cell.gridLocalCellIndex(); *gridIndex = cell.hostGrid()->gridIndex(); } @@ -688,9 +711,9 @@ void RiuViewerCommands::extractIntersectionData(const cvf::HitItemCollection& hi { RimEclipseView* eclipseView = dynamic_cast(m_reservoirView.p()); - if (eclipseView && eclipseView->eclipseCase()) + if (eclipseView && eclipseView->mainGrid()) { - double characteristicCellSize = eclipseView->eclipseCase()->reservoirData()->mainGrid()->characteristicIJCellSize(); + double characteristicCellSize = eclipseView->mainGrid()->characteristicIJCellSize(); pickDepthThresholdSquared = characteristicCellSize / 100.0; pickDepthThresholdSquared = pickDepthThresholdSquared * pickDepthThresholdSquared; } @@ -813,7 +836,7 @@ void RiuViewerCommands::ijkFromCellIndex(size_t gridIdx, size_t cellIndex, size if (eclipseView && eclipseView->eclipseCase()) { - eclipseView->eclipseCase()->reservoirData()->grid(gridIdx)->ijkFromCellIndex(cellIndex, i, j, k); + eclipseView->eclipseCase()->eclipseCaseData()->grid(gridIdx)->ijkFromCellIndex(cellIndex, i, j, k); } if (geomView && geomView->geoMechCase()) diff --git a/ApplicationCode/UserInterface/RiuViewerCommands.h b/ApplicationCode/UserInterface/RiuViewerCommands.h index b71a636082..76c29d5687 100644 --- a/ApplicationCode/UserInterface/RiuViewerCommands.h +++ b/ApplicationCode/UserInterface/RiuViewerCommands.h @@ -50,7 +50,7 @@ class RiuViewerCommands: public QObject Q_OBJECT public: - RiuViewerCommands(RiuViewer* ownerViewer); + explicit RiuViewerCommands(RiuViewer* ownerViewer); ~RiuViewerCommands(); void setOwnerView(RimView * owner); diff --git a/ApplicationCode/UserInterface/RiuWellAllocationPlot.cpp b/ApplicationCode/UserInterface/RiuWellAllocationPlot.cpp new file mode 100644 index 0000000000..95fc7e0f45 --- /dev/null +++ b/ApplicationCode/UserInterface/RiuWellAllocationPlot.cpp @@ -0,0 +1,220 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RiuWellAllocationPlot.h" + +#include "RiaApplication.h" + +#include "RimContextCommandBuilder.h" +#include "RimTotalWellAllocationPlot.h" +#include "RimWellAllocationPlot.h" +#include "RimWellLogPlot.h" +#include "RimWellLogTrack.h" + +#include "RiuContextMenuLauncher.h" +#include "RiuNightchartsWidget.h" +#include "RiuPlotObjectPicker.h" + +#include "cvfColor3.h" + +#include +#include +#include +#include + + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuWellAllocationPlot::RiuWellAllocationPlot(RimWellAllocationPlot* plotDefinition, QWidget* parent) + : m_plotDefinition(plotDefinition), + QFrame(parent) +{ + Q_ASSERT(m_plotDefinition); + + QVBoxLayout* mainLayout = new QVBoxLayout(); + this->setLayout(mainLayout); + this->layout()->setMargin(0); + this->layout()->setSpacing(2); + + m_titleLabel = new QLabel(this); + new RiuPlotObjectPicker(m_titleLabel, m_plotDefinition->accumulatedWellFlowPlot()); + + QFont font = m_titleLabel->font(); + font.setPointSize(14); + font.setBold(true); + m_titleLabel->setFont(font); + + // White background + QPalette pal = this->palette(); + pal.setColor(QPalette::Background, Qt::white); + this->setAutoFillBackground(true); + this->setPalette(pal); + + mainLayout->addWidget(m_titleLabel, 0, Qt::AlignCenter); + + auto plotWidgetsLayout = new QHBoxLayout(); + auto rightColumnLayout = new QVBoxLayout(); + + mainLayout->addLayout(plotWidgetsLayout); + plotWidgetsLayout->addLayout(rightColumnLayout); + + m_legendWidget = new RiuNightchartsWidget(this); + new RiuPlotObjectPicker(m_legendWidget, m_plotDefinition->plotLegend()); + + QStringList commandIds; + commandIds << "RicShowTotalAllocationDataFeature"; + new RiuContextMenuLauncher(m_legendWidget, commandIds); + + rightColumnLayout->addWidget(m_legendWidget); + m_legendWidget->showPie(false); + + QWidget* totalFlowAllocationWidget = m_plotDefinition->totalWellFlowPlot()->createViewWidget(this); + new RiuPlotObjectPicker(totalFlowAllocationWidget, m_plotDefinition->totalWellFlowPlot()); + new RiuContextMenuLauncher(totalFlowAllocationWidget, commandIds); + + rightColumnLayout->addWidget(totalFlowAllocationWidget); + rightColumnLayout->addStretch(); + + QWidget* wellFlowWidget = m_plotDefinition->accumulatedWellFlowPlot()->createViewWidget(this); + + plotWidgetsLayout->addWidget(wellFlowWidget); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuWellAllocationPlot::~RiuWellAllocationPlot() +{ + if (m_plotDefinition) + { + m_plotDefinition->handleMdiWindowClosed(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimWellAllocationPlot* RiuWellAllocationPlot::ownerPlotDefinition() +{ + return m_plotDefinition; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimViewWindow* RiuWellAllocationPlot::ownerViewWindow() const +{ + return m_plotDefinition; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuWellAllocationPlot::showTitle(const QString& title) +{ + m_titleLabel->show(); + + m_titleLabel->setText(title); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuWellAllocationPlot::hideTitle() +{ + m_titleLabel->hide(); +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuWellAllocationPlot::showLegend(bool doShow) +{ + if (doShow) + m_legendWidget->show(); + else + m_legendWidget->hide(); +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuWellAllocationPlot::addLegendItem(const QString& name, const cvf::Color3f& color, float value) +{ + QColor sliceColor(color.rByte(), color.gByte(), color.bByte()); + + m_legendWidget->addItem(name, sliceColor, value); + m_legendWidget->updateGeometry(); + m_legendWidget->update(); +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuWellAllocationPlot::clearLegend() +{ + m_legendWidget->clear(); +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QSize RiuWellAllocationPlot::minimumSizeHint() const +{ + return QSize(0, 100); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuWellAllocationPlot::contextMenuEvent(QContextMenuEvent* event) +{ + QMenu menu; + QStringList commandIds; + + commandIds << "RicShowContributingWellsFromPlotFeature"; + + RimContextCommandBuilder::appendCommandsToMenu(commandIds, &menu); + + if (menu.actions().size() > 0) + { + menu.exec(event->globalPos()); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QSize RiuWellAllocationPlot::sizeHint() const +{ + return QSize(0, 0); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuWellAllocationPlot::setDefaults() +{ +} + diff --git a/ApplicationCode/UserInterface/RiuWellAllocationPlot.h b/ApplicationCode/UserInterface/RiuWellAllocationPlot.h new file mode 100644 index 0000000000..6fcee19707 --- /dev/null +++ b/ApplicationCode/UserInterface/RiuWellAllocationPlot.h @@ -0,0 +1,74 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "qwt_plot.h" + +#include "cafPdmPointer.h" + +#include +#include + +#include "RiuInterfaceToViewWindow.h" + +class RimWellAllocationPlot; +class RiuNightchartsWidget; + +class QLabel; + +namespace cvf { + class Color3f; +} + +//================================================================================================== +// +// +// +//================================================================================================== +class RiuWellAllocationPlot : public QFrame, public RiuInterfaceToViewWindow +{ + Q_OBJECT; +public: + RiuWellAllocationPlot(RimWellAllocationPlot* plotDefinition, QWidget* parent = NULL); + virtual ~RiuWellAllocationPlot(); + + RimWellAllocationPlot* ownerPlotDefinition(); + virtual RimViewWindow* ownerViewWindow() const override; + + void showTitle(const QString& title); + void hideTitle(); + void showLegend(bool doShow); + void addLegendItem(const QString& name, const cvf::Color3f& color, float value); + void clearLegend(); + + +protected: + virtual QSize sizeHint() const override; + virtual QSize minimumSizeHint() const override; + + virtual void contextMenuEvent(QContextMenuEvent *) override; + +private: + void setDefaults(); + +private: + caf::PdmPointer m_plotDefinition; + QPointer m_legendWidget; + QPointer m_titleLabel; +}; diff --git a/ApplicationCode/UserInterface/RiuWellLogPlot.cpp b/ApplicationCode/UserInterface/RiuWellLogPlot.cpp index 7bb414d2e6..220680add0 100644 --- a/ApplicationCode/UserInterface/RiuWellLogPlot.cpp +++ b/ApplicationCode/UserInterface/RiuWellLogPlot.cpp @@ -1,363 +1,415 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2015- Statoil ASA -// Copyright (C) 2015- Ceetron Solutions 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#include "RiuWellLogPlot.h" - -#include "RimWellLogPlot.h" -#include "RimWellLogTrack.h" -#include "RiuMainWindow.h" -#include "RiuWellLogTrack.h" - -#include "qwt_legend.h" - -#include "cvfAssert.h" - -#include -#include -#include -#include -#include - -#include - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RiuWellLogPlot::RiuWellLogPlot(RimWellLogPlot* plotDefinition, QWidget* parent) - : QWidget(parent), m_scheduleUpdateChildrenLayoutTimer(NULL) -{ - Q_ASSERT(plotDefinition); - m_plotDefinition = plotDefinition; - - QPalette newPalette(palette()); - newPalette.setColor(QPalette::Background, Qt::white); - setPalette(newPalette); - - setAutoFillBackground(true); - - m_scrollBar = new QScrollBar(this); - m_scrollBar->setOrientation(Qt::Vertical); - m_scrollBar->setVisible(true); - - connect(m_scrollBar, SIGNAL(valueChanged(int)), this, SLOT(slotSetMinDepth(int))); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RiuWellLogPlot::~RiuWellLogPlot() -{ - if (m_plotDefinition) - { - m_plotDefinition->handleViewerDeletion(); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuWellLogPlot::addTrackPlot(RiuWellLogTrack* trackPlot) -{ - // Insert the plot to the left of the scroll bar - insertTrackPlot(trackPlot, m_trackPlots.size()); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuWellLogPlot::insertTrackPlot(RiuWellLogTrack* trackPlot, size_t index) -{ - trackPlot->setParent(this); - - m_trackPlots.insert(static_cast(index), trackPlot); - - QwtLegend* legend = new QwtLegend(this); - legend->setMaxColumns(1); - legend->connect(trackPlot, SIGNAL(legendDataChanged(const QVariant &, const QList< QwtLegendData > &)), SLOT(updateLegend(const QVariant &, const QList< QwtLegendData > &))); - legend->contentsWidget()->layout()->setAlignment(Qt::AlignBottom | Qt::AlignHCenter); - m_legends.insert(static_cast(index), legend); - - this->connect(trackPlot, SIGNAL(legendDataChanged(const QVariant &, const QList< QwtLegendData > &)), SLOT(scheduleUpdateChildrenLayout())); - - trackPlot->updateLegend(); - - if (trackPlot->isRimTrackVisible()) - { - trackPlot->show(); - } - else - { - trackPlot->hide(); - } - - modifyWidthOfContainingMdiWindow(trackPlot->width()); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuWellLogPlot::removeTrackPlot(RiuWellLogTrack* trackPlot) -{ - if (!trackPlot) return; - - int windowWidthChange = - trackPlot->width(); - - int trackIdx = m_trackPlots.indexOf(trackPlot); - CVF_ASSERT(trackIdx >= 0); - - m_trackPlots.removeAt(trackIdx); - trackPlot->setParent(NULL); - - QwtLegend* legend = m_legends[trackIdx]; - m_legends.removeAt(trackIdx); - delete legend; - - modifyWidthOfContainingMdiWindow(windowWidthChange); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuWellLogPlot::modifyWidthOfContainingMdiWindow(int widthChange) -{ - QMdiSubWindow* mdiWindow = RiuMainWindow::instance()->findMdiSubWindow(this); - if (mdiWindow) - { - if (m_trackPlots.size() == 0 && widthChange <= 0) return; // Last track removed. Leave be - - QSize subWindowSize = mdiWindow->size(); - int newWidth = 0; - - if (m_trackPlots.size() == 1 && widthChange > 0) // First track added - { - newWidth = widthChange; - } - else - { - newWidth = subWindowSize.width() + widthChange; - } - - if (newWidth < 0) newWidth = 100; - - subWindowSize.setWidth(newWidth); - mdiWindow->resize(subWindowSize); - - if (mdiWindow->isMaximized()) - { - // Set window temporarily to normal state and back to maximized - // to redo layout so the whole window canvas is filled - // Tried to activate layout, did not work as expected - // Tested code: - // m_layout->activate(); - // mdiWindow->layout()->activate(); - - mdiWindow->showNormal(); - mdiWindow->showMaximized(); - } - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuWellLogPlot::setDepthZoomAndReplot(double minDepth, double maxDepth) -{ - for (int tpIdx = 0; tpIdx < m_trackPlots.count(); tpIdx++) - { - m_trackPlots[tpIdx]->setDepthZoom(minDepth, maxDepth); - m_trackPlots[tpIdx]->replot(); - } - - updateScrollBar(minDepth, maxDepth); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuWellLogPlot::updateScrollBar(double minDepth, double maxDepth) -{ - double availableMinDepth; - double availableMaxDepth; - m_plotDefinition->availableDepthRange(&availableMinDepth, &availableMaxDepth); - availableMaxDepth += 0.01*(availableMaxDepth-availableMinDepth); - - double visibleDepth = maxDepth - minDepth; - - m_scrollBar->blockSignals(true); - { - m_scrollBar->setRange((int) availableMinDepth, (int) ((availableMaxDepth - visibleDepth))); - m_scrollBar->setPageStep((int) visibleDepth); - m_scrollBar->setValue((int) minDepth); - - m_scrollBar->setVisible(true); - } - m_scrollBar->blockSignals(false); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuWellLogPlot::slotSetMinDepth(int value) -{ - double minimumDepth; - double maximumDepth; - m_plotDefinition->depthZoomMinMax(&minimumDepth, &maximumDepth); - - double delta = value - minimumDepth; - m_plotDefinition->setDepthZoomMinMax(minimumDepth + delta, maximumDepth + delta); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RimWellLogPlot* RiuWellLogPlot::ownerPlotDefinition() -{ - return m_plotDefinition; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuWellLogPlot::resizeEvent(QResizeEvent *event) -{ - int height = event->size().height(); - int width = event->size().width(); - - placeChildWidgets(height, width); - QWidget::resizeEvent(event); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuWellLogPlot::placeChildWidgets(int height, int width) -{ - int trackCount = m_trackPlots.size(); - CVF_ASSERT(m_legends.size() == trackCount); - - int visibleTrackCount = 0; - for (int tIdx = 0; tIdx < trackCount; ++tIdx) - { - if (m_trackPlots[tIdx]->isVisible()) ++visibleTrackCount; - } - - int scrollBarWidth = 0; - if (m_scrollBar->isVisible()) scrollBarWidth = m_scrollBar->sizeHint().width(); - - int maxLegendHeight = 0; - - for (int tIdx = 0; tIdx < trackCount; ++tIdx) - { - if (m_trackPlots[tIdx]->isVisible()) - { - int legendHeight = m_legends[tIdx]->sizeHint().height(); - if (legendHeight > maxLegendHeight) maxLegendHeight = legendHeight; - } - } - - int trackHeight = height - maxLegendHeight; - int trackX = 0; - - - if (visibleTrackCount) - { - int trackWidth = (width - scrollBarWidth)/visibleTrackCount; - int trackWidthExtra = (width-scrollBarWidth)%visibleTrackCount; - - for (int tIdx = 0; tIdx < trackCount; ++tIdx) - { - if (m_trackPlots[tIdx]->isVisible()) - { - int realTrackWidth = trackWidth; - if (trackWidthExtra > 0) - { - realTrackWidth += 1; - --trackWidthExtra; - } - int realLegendWidth = std::max(realTrackWidth, m_legends[tIdx]->sizeHint().width()); - m_legends[tIdx]->setGeometry(trackX, 0, realLegendWidth, maxLegendHeight); - m_trackPlots[tIdx]->setGeometry(trackX, maxLegendHeight, realTrackWidth, trackHeight); - - trackX += realTrackWidth; - } - } - } - - if (m_scrollBar->isVisible()) m_scrollBar->setGeometry(trackX, maxLegendHeight, scrollBarWidth, trackHeight); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuWellLogPlot::updateChildrenLayout() -{ - int trackCount = m_trackPlots.size(); - for (int tIdx = 0; tIdx < trackCount; ++tIdx) - { - if (m_trackPlots[tIdx]->isVisible()) - { - m_legends[tIdx]->show(); - } - else - { - m_legends[tIdx]->hide(); - } - } - - placeChildWidgets(this->height(), this->width()); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuWellLogPlot::showEvent(QShowEvent *) -{ - updateChildrenLayout(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuWellLogPlot::changeEvent(QEvent *event) -{ - if (event->type() == QEvent::WindowStateChange) - { - updateChildrenLayout(); - } -} - -//-------------------------------------------------------------------------------------------------- -/// Schedule an update of the widget positions -/// Will happen just a bit after the event loop is entered -/// Used to delay the positioning to after the legend widgets is actually updated. -//-------------------------------------------------------------------------------------------------- -void RiuWellLogPlot::scheduleUpdateChildrenLayout() -{ - if (!m_scheduleUpdateChildrenLayoutTimer) - { - m_scheduleUpdateChildrenLayoutTimer = new QTimer(this); - connect(m_scheduleUpdateChildrenLayoutTimer, SIGNAL(timeout()), this, SLOT(updateChildrenLayout())); - } - - if (!m_scheduleUpdateChildrenLayoutTimer->isActive()) - { - m_scheduleUpdateChildrenLayoutTimer->setSingleShot(true); - m_scheduleUpdateChildrenLayoutTimer->start(10); - } -} +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2015- Statoil ASA +// Copyright (C) 2015- Ceetron Solutions 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RiuWellLogPlot.h" + +#include "RimContextCommandBuilder.h" +#include "RimWellLogPlot.h" +#include "RimWellLogTrack.h" + +#include "RiuMainWindow.h" +#include "RiuWellLogTrack.h" + +#include "cafSelectionManager.h" + +#include "cvfAssert.h" + +#include "qwt_legend.h" + +#include +#include +#include +#include +#include +#include + +#include + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuWellLogPlot::RiuWellLogPlot(RimWellLogPlot* plotDefinition, QWidget* parent) + : QWidget(parent), m_scheduleUpdateChildrenLayoutTimer(NULL) +{ + Q_ASSERT(plotDefinition); + m_plotDefinition = plotDefinition; + + QPalette newPalette(palette()); + newPalette.setColor(QPalette::Background, Qt::white); + setPalette(newPalette); + + setAutoFillBackground(true); + + m_scrollBar = new QScrollBar(this); + m_scrollBar->setOrientation(Qt::Vertical); + m_scrollBar->setVisible(true); + + this->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); + + connect(m_scrollBar, SIGNAL(valueChanged(int)), this, SLOT(slotSetMinDepth(int))); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuWellLogPlot::~RiuWellLogPlot() +{ + if (m_plotDefinition) + { + m_plotDefinition->detachAllCurves(); + m_plotDefinition->handleMdiWindowClosed(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuWellLogPlot::addTrackPlot(RiuWellLogTrack* trackPlot) +{ + // Insert the plot to the left of the scroll bar + insertTrackPlot(trackPlot, m_trackPlots.size()); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuWellLogPlot::insertTrackPlot(RiuWellLogTrack* trackPlot, size_t index) +{ + trackPlot->setParent(this); + + m_trackPlots.insert(static_cast(index), trackPlot); + + QwtLegend* legend = new QwtLegend(this); + legend->setMaxColumns(1); + legend->connect(trackPlot, SIGNAL(legendDataChanged(const QVariant &, const QList< QwtLegendData > &)), SLOT(updateLegend(const QVariant &, const QList< QwtLegendData > &))); + legend->contentsWidget()->layout()->setAlignment(Qt::AlignBottom | Qt::AlignHCenter); + m_legends.insert(static_cast(index), legend); + + this->connect(trackPlot, SIGNAL(legendDataChanged(const QVariant &, const QList< QwtLegendData > &)), SLOT(scheduleUpdateChildrenLayout())); + + if (!m_plotDefinition->isTrackLegendsVisible()) + { + legend->hide(); + } + + trackPlot->updateLegend(); + + if (trackPlot->isRimTrackVisible()) + { + trackPlot->show(); + } + else + { + trackPlot->hide(); + } + + modifyWidthOfContainingMdiWindow(trackPlot->width()); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuWellLogPlot::removeTrackPlot(RiuWellLogTrack* trackPlot) +{ + if (!trackPlot) return; + + int windowWidthChange = - trackPlot->width(); + + int trackIdx = m_trackPlots.indexOf(trackPlot); + CVF_ASSERT(trackIdx >= 0); + + m_trackPlots.removeAt(trackIdx); + trackPlot->setParent(NULL); + + QwtLegend* legend = m_legends[trackIdx]; + m_legends.removeAt(trackIdx); + delete legend; + + modifyWidthOfContainingMdiWindow(windowWidthChange); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuWellLogPlot::modifyWidthOfContainingMdiWindow(int widthChange) +{ + QMdiSubWindow* mdiWindow = RiuMainWindow::instance()->findMdiSubWindow(this); + if (mdiWindow) + { + if (m_trackPlots.size() == 0 && widthChange <= 0) return; // Last track removed. Leave be + + QSize subWindowSize = mdiWindow->size(); + int newWidth = 0; + + if (m_trackPlots.size() == 1 && widthChange > 0) // First track added + { + newWidth = widthChange; + } + else + { + newWidth = subWindowSize.width() + widthChange; + } + + if (newWidth < 0) newWidth = 100; + + subWindowSize.setWidth(newWidth); + mdiWindow->resize(subWindowSize); + + if (mdiWindow->isMaximized()) + { + // Set window temporarily to normal state and back to maximized + // to redo layout so the whole window canvas is filled + // Tried to activate layout, did not work as expected + // Tested code: + // m_layout->activate(); + // mdiWindow->layout()->activate(); + + mdiWindow->showNormal(); + mdiWindow->showMaximized(); + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuWellLogPlot::setDepthZoomAndReplot(double minDepth, double maxDepth) +{ + for (int tpIdx = 0; tpIdx < m_trackPlots.count(); tpIdx++) + { + m_trackPlots[tpIdx]->setDepthZoom(minDepth, maxDepth); + m_trackPlots[tpIdx]->replot(); + } + + updateScrollBar(minDepth, maxDepth); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QSize RiuWellLogPlot::sizeHint() const +{ + return QSize(1,1); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuWellLogPlot::contextMenuEvent(QContextMenuEvent* event) +{ + QMenu menu; + QStringList commandIds; + + caf::SelectionManager::instance()->setSelectedItem(ownerPlotDefinition()); + + commandIds << "RicShowPlotDataFeature"; + commandIds << "RicShowContributingWellsFromPlotFeature"; + + RimContextCommandBuilder::appendCommandsToMenu(commandIds, &menu); + + if (menu.actions().size() > 0) + { + menu.exec(event->globalPos()); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuWellLogPlot::updateScrollBar(double minDepth, double maxDepth) +{ + double availableMinDepth; + double availableMaxDepth; + m_plotDefinition->availableDepthRange(&availableMinDepth, &availableMaxDepth); + availableMaxDepth += 0.01*(availableMaxDepth-availableMinDepth); + + double visibleDepth = maxDepth - minDepth; + + m_scrollBar->blockSignals(true); + { + m_scrollBar->setRange((int) availableMinDepth, (int) ((availableMaxDepth - visibleDepth))); + m_scrollBar->setPageStep((int) visibleDepth); + m_scrollBar->setValue((int) minDepth); + + m_scrollBar->setVisible(true); + } + m_scrollBar->blockSignals(false); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuWellLogPlot::slotSetMinDepth(int value) +{ + double minimumDepth; + double maximumDepth; + m_plotDefinition->depthZoomMinMax(&minimumDepth, &maximumDepth); + + double delta = value - minimumDepth; + m_plotDefinition->setDepthZoomMinMax(minimumDepth + delta, maximumDepth + delta); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimWellLogPlot* RiuWellLogPlot::ownerPlotDefinition() +{ + return m_plotDefinition; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimViewWindow* RiuWellLogPlot::ownerViewWindow() const +{ + return m_plotDefinition; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuWellLogPlot::resizeEvent(QResizeEvent *event) +{ + int height = event->size().height(); + int width = event->size().width(); + + placeChildWidgets(height, width); + QWidget::resizeEvent(event); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuWellLogPlot::placeChildWidgets(int height, int width) +{ + int trackCount = m_trackPlots.size(); + CVF_ASSERT(m_legends.size() == trackCount); + + int visibleTrackCount = 0; + for (int tIdx = 0; tIdx < trackCount; ++tIdx) + { + if (m_trackPlots[tIdx]->isVisible()) ++visibleTrackCount; + } + + int scrollBarWidth = 0; + if (m_scrollBar->isVisible()) scrollBarWidth = m_scrollBar->sizeHint().width(); + + int maxLegendHeight = 0; + + if (m_plotDefinition && m_plotDefinition->isTrackLegendsVisible()) + { + for ( int tIdx = 0; tIdx < trackCount; ++tIdx ) + { + if ( m_trackPlots[tIdx]->isVisible() ) + { + int legendHeight = m_legends[tIdx]->sizeHint().height(); + if ( legendHeight > maxLegendHeight ) maxLegendHeight = legendHeight; + } + } + } + + int trackHeight = height - maxLegendHeight; + int trackX = 0; + + if (visibleTrackCount) + { + int trackWidth = (width - scrollBarWidth)/visibleTrackCount; + int trackWidthExtra = (width-scrollBarWidth)%visibleTrackCount; + + for (int tIdx = 0; tIdx < trackCount; ++tIdx) + { + if (m_trackPlots[tIdx]->isVisible()) + { + int realTrackWidth = trackWidth; + if (trackWidthExtra > 0) + { + realTrackWidth += 1; + --trackWidthExtra; + } + int realLegendWidth = std::max(realTrackWidth, m_legends[tIdx]->sizeHint().width()); + m_legends[tIdx]->setGeometry(trackX, 0, realLegendWidth, maxLegendHeight); + m_trackPlots[tIdx]->setGeometry(trackX, maxLegendHeight, realTrackWidth, trackHeight); + + trackX += realTrackWidth; + } + } + } + + if (m_scrollBar->isVisible()) m_scrollBar->setGeometry(trackX, maxLegendHeight, scrollBarWidth, trackHeight); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuWellLogPlot::updateChildrenLayout() +{ + int trackCount = m_trackPlots.size(); + for (int tIdx = 0; tIdx < trackCount; ++tIdx) + { + if (m_trackPlots[tIdx]->isVisible()) + { + m_legends[tIdx]->show(); + } + else + { + m_legends[tIdx]->hide(); + } + } + + placeChildWidgets(this->height(), this->width()); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuWellLogPlot::showEvent(QShowEvent *) +{ + updateChildrenLayout(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuWellLogPlot::changeEvent(QEvent *event) +{ + if (event->type() == QEvent::WindowStateChange) + { + updateChildrenLayout(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// Schedule an update of the widget positions +/// Will happen just a bit after the event loop is entered +/// Used to delay the positioning to after the legend widgets is actually updated. +//-------------------------------------------------------------------------------------------------- +void RiuWellLogPlot::scheduleUpdateChildrenLayout() +{ + if (!m_scheduleUpdateChildrenLayoutTimer) + { + m_scheduleUpdateChildrenLayoutTimer = new QTimer(this); + connect(m_scheduleUpdateChildrenLayoutTimer, SIGNAL(timeout()), this, SLOT(updateChildrenLayout())); + } + + if (!m_scheduleUpdateChildrenLayoutTimer->isActive()) + { + m_scheduleUpdateChildrenLayoutTimer->setSingleShot(true); + m_scheduleUpdateChildrenLayoutTimer->start(10); + } +} diff --git a/ApplicationCode/UserInterface/RiuWellLogPlot.h b/ApplicationCode/UserInterface/RiuWellLogPlot.h index b88398c527..8ef62c57a8 100644 --- a/ApplicationCode/UserInterface/RiuWellLogPlot.h +++ b/ApplicationCode/UserInterface/RiuWellLogPlot.h @@ -1,80 +1,87 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2015- Statoil ASA -// Copyright (C) 2015- Ceetron Solutions 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#pragma once - -#include -#include -#include "cafPdmPointer.h" - -class RimWellLogPlot; -class RiuWellLogTrack; - -class QHBoxLayout; -class QScrollBar; -class QFocusEvent; -class QwtLegend; - -//================================================================================================== -// -// RiuWellLogPlot -// -//================================================================================================== -class RiuWellLogPlot : public QWidget -{ - Q_OBJECT - -public: - RiuWellLogPlot(RimWellLogPlot* plotDefinition, QWidget* parent = NULL); - virtual ~RiuWellLogPlot(); - - RimWellLogPlot* ownerPlotDefinition(); - - void addTrackPlot(RiuWellLogTrack* trackPlot); - void insertTrackPlot(RiuWellLogTrack* trackPlot, size_t index); - void removeTrackPlot(RiuWellLogTrack* trackPlot); - - void setDepthZoomAndReplot(double minDepth, double maxDepth); - -public slots: - void updateChildrenLayout(); - -protected: - virtual void resizeEvent(QResizeEvent *event); - virtual void showEvent(QShowEvent *); - virtual void changeEvent(QEvent *); - -private: - void updateScrollBar(double minDepth, double maxDepth); - void modifyWidthOfContainingMdiWindow(int widthChange); - void placeChildWidgets(int height, int width); - -private slots: - void slotSetMinDepth(int value); - void scheduleUpdateChildrenLayout(); - -private: - QHBoxLayout* m_layout; - QScrollBar* m_scrollBar; - QList m_legends; - QList m_trackPlots; - caf::PdmPointer m_plotDefinition; - QTimer* m_scheduleUpdateChildrenLayoutTimer; -}; - +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2015- Statoil ASA +// Copyright (C) 2015- Ceetron Solutions 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafPdmPointer.h" + +#include +#include +#include + +#include "RiuInterfaceToViewWindow.h" + +class RimWellLogPlot; +class RiuWellLogTrack; + +class QHBoxLayout; +class QScrollBar; +class QFocusEvent; +class QwtLegend; + +//================================================================================================== +// +// RiuWellLogPlot +// +//================================================================================================== +class RiuWellLogPlot : public QWidget, public RiuInterfaceToViewWindow +{ + Q_OBJECT + +public: + RiuWellLogPlot(RimWellLogPlot* plotDefinition, QWidget* parent = NULL); + virtual ~RiuWellLogPlot(); + + RimWellLogPlot* ownerPlotDefinition(); + virtual RimViewWindow* ownerViewWindow() const override; + + void addTrackPlot(RiuWellLogTrack* trackPlot); + void insertTrackPlot(RiuWellLogTrack* trackPlot, size_t index); + void removeTrackPlot(RiuWellLogTrack* trackPlot); + + void setDepthZoomAndReplot(double minDepth, double maxDepth); + + public slots: + void updateChildrenLayout(); + +protected: + virtual void resizeEvent(QResizeEvent *event); + virtual void showEvent(QShowEvent *); + virtual void changeEvent(QEvent *); + virtual QSize sizeHint() const override; + virtual void contextMenuEvent(QContextMenuEvent *) override; + +private: + void updateScrollBar(double minDepth, double maxDepth); + void modifyWidthOfContainingMdiWindow(int widthChange); + void placeChildWidgets(int height, int width); + +private slots: + void slotSetMinDepth(int value); + void scheduleUpdateChildrenLayout(); + +private: + QHBoxLayout* m_layout; + QScrollBar* m_scrollBar; + QList > m_legends; + QList > m_trackPlots; + caf::PdmPointer m_plotDefinition; + QTimer* m_scheduleUpdateChildrenLayoutTimer; +}; + diff --git a/ApplicationCode/UserInterface/RiuWellLogTrack.cpp b/ApplicationCode/UserInterface/RiuWellLogTrack.cpp index 5903e2ce30..e4f346fadf 100644 --- a/ApplicationCode/UserInterface/RiuWellLogTrack.cpp +++ b/ApplicationCode/UserInterface/RiuWellLogTrack.cpp @@ -1,458 +1,261 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2015- Statoil ASA -// Copyright (C) 2015- Ceetron Solutions 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#include "RiuWellLogTrack.h" - -#include "RiaApplication.h" - -#include "RimWellLogPlot.h" -#include "RimWellLogTrack.h" -#include "RimWellLogCurve.h" - -#include "RiuMainPlotWindow.h" - -#include "qwt_legend.h" -#include "qwt_plot_curve.h" -#include "qwt_plot_grid.h" -#include "qwt_plot_layout.h" -#include "qwt_plot_marker.h" -#include "qwt_plot_picker.h" -#include "qwt_scale_draw.h" -#include "qwt_scale_engine.h" -#include "qwt_symbol.h" -#include "qwt_text.h" - -#include -#include -#include -#include - -#include - -#define RIU_SCROLLWHEEL_ZOOMFACTOR 1.1 -#define RIU_SCROLLWHEEL_PANFACTOR 0.1 - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -class RiuWellLogTrackQwtPicker : public QwtPlotPicker -{ -public: - RiuWellLogTrackQwtPicker(QWidget *canvas) - : QwtPlotPicker(canvas) - { - } - -protected: - //-------------------------------------------------------------------------------------------------- - /// - //-------------------------------------------------------------------------------------------------- - virtual QwtText trackerText(const QPoint& pos) const override - { - QwtText txt; - - const RiuWellLogTrack* wellLogTrack = dynamic_cast(this->plot()); - if (wellLogTrack) - { - QString depthString; - QString valueString; - QPointF closestPoint = wellLogTrack->closestCurvePoint(pos, &valueString, &depthString); - if (!closestPoint.isNull()) - { - QString str = valueString; - - if (!depthString.isEmpty()) - { - str += QString(" (%1)").arg(depthString); - } - - txt.setText(str); - } - - RiuWellLogTrack* nonConstPlot = const_cast(wellLogTrack); - nonConstPlot->updateClosestCurvePointMarker(closestPoint); - } - - return txt; - } -}; - - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RiuWellLogTrack::RiuWellLogTrack(RimWellLogTrack* plotTrackDefinition, QWidget* parent) - : QwtPlot(parent) -{ - Q_ASSERT(plotTrackDefinition); - m_plotTrackDefinition = plotTrackDefinition; - - m_grid = new QwtPlotGrid(); - m_grid->attach(this); - - setFocusPolicy(Qt::ClickFocus); - setDefaults(); - - // Create a plot picker to display values next to mouse cursor - m_plotPicker = new RiuWellLogTrackQwtPicker(this->canvas()); - m_plotPicker->setTrackerMode(QwtPicker::AlwaysOn); - - m_plotMarker = new QwtPlotMarker; - - // QwtPlotMarker takes ownership of the symbol, it is deleted in destructor of QwtPlotMarker - QwtSymbol* mySymbol = new QwtSymbol(QwtSymbol::Ellipse, Qt::NoBrush, QPen(Qt::black, 2.0), QSize(12, 12)); - m_plotMarker->setSymbol(mySymbol); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RiuWellLogTrack::~RiuWellLogTrack() -{ - m_grid->detach(); - delete m_grid; - - m_plotMarker->detach(); - delete m_plotMarker; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -QPointF RiuWellLogTrack::closestCurvePoint(const QPoint& pos, QString* valueString, QString* depthString) const -{ - QPointF samplePoint; - - QwtPlotCurve* closestCurve = nullptr; - double distMin = DBL_MAX; - int closestPointSampleIndex = -1; - - const QwtPlotItemList& itmList = itemList(); - for (QwtPlotItemIterator it = itmList.begin(); it != itmList.end(); it++) - { - if ((*it)->rtti() == QwtPlotItem::Rtti_PlotCurve) - { - QwtPlotCurve* candidateCurve = static_cast(*it); - double dist = DBL_MAX; - int candidateSampleIndex = candidateCurve->closestPoint(pos, &dist); - if (dist < distMin) - { - closestCurve = candidateCurve; - distMin = dist; - closestPointSampleIndex = candidateSampleIndex; - } - } - } - - if (closestCurve && distMin < 50) - { - samplePoint = closestCurve->sample(closestPointSampleIndex); - } - - if (depthString) - { - const QwtScaleDraw* depthAxisScaleDraw = axisScaleDraw(QwtPlot::yLeft); - if (depthAxisScaleDraw) - { - *depthString = depthAxisScaleDraw->label(samplePoint.y()).text(); - } - } - - if (valueString && closestCurve) - { - const QwtScaleDraw* xAxisScaleDraw = axisScaleDraw(closestCurve->xAxis()); - if (xAxisScaleDraw) - { - *valueString = xAxisScaleDraw->label(samplePoint.x()).text(); - } - } - - return samplePoint; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuWellLogTrack::updateClosestCurvePointMarker(const QPointF& pos) -{ - bool replotRequired = false; - - if (!pos.isNull()) - { - if (!m_plotMarker->plot()) - { - m_plotMarker->attach(this); - - replotRequired = true; - } - - if (m_plotMarker->value() != pos) - { - m_plotMarker->setValue(pos.x(), pos.y()); - - replotRequired = true; - } - } - else - { - if (m_plotMarker->plot()) - { - m_plotMarker->detach(); - - replotRequired = true; - } - } - - if (replotRequired) this->replot(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuWellLogTrack::setDefaults() -{ - QPalette newPalette(palette()); - newPalette.setColor(QPalette::Background, Qt::white); - setPalette(newPalette); - - setAutoFillBackground(true); - setCanvasBackground(Qt::white); - - QFrame* canvasFrame = dynamic_cast(canvas()); - if (canvasFrame) - { - canvasFrame->setFrameShape(QFrame::NoFrame); - } - - canvas()->setMouseTracking(true); - canvas()->installEventFilter(this); - - QPen gridPen(Qt::SolidLine); - gridPen.setColor(Qt::lightGray); - m_grid->setPen(gridPen); - - enableAxis(QwtPlot::xTop, true); - enableAxis(QwtPlot::yLeft, true); - enableAxis(QwtPlot::xBottom, false); - enableAxis(QwtPlot::yRight, false); - - plotLayout()->setAlignCanvasToScales(true); - - axisScaleEngine(QwtPlot::yLeft)->setAttribute(QwtScaleEngine::Inverted, true); - - // Align the canvas with the actual min and max values of the curves - axisScaleEngine(QwtPlot::xTop)->setAttribute(QwtScaleEngine::Floating, true); - axisScaleEngine(QwtPlot::yLeft)->setAttribute(QwtScaleEngine::Floating, true); - setAxisScale(QwtPlot::yLeft, 1000, 0); - setAxisScale(QwtPlot::xTop, -10, 100); - - QFont xAxisFont = axisFont(QwtPlot::xTop); - xAxisFont.setPixelSize(9); - setAxisFont(QwtPlot::xTop, xAxisFont); - - QFont yAxisFont = axisFont(QwtPlot::yLeft); - yAxisFont.setPixelSize(9); - setAxisFont(QwtPlot::yLeft, yAxisFont); - - QwtText axisTitleY = axisTitle(QwtPlot::yLeft); - QFont yAxisTitleFont = axisTitleY.font(); - yAxisTitleFont.setPixelSize(9); - yAxisTitleFont.setBold(false); - axisTitleY.setFont(yAxisTitleFont); - axisTitleY.setRenderFlags(Qt::AlignRight); - setAxisTitle(QwtPlot::yLeft, axisTitleY); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuWellLogTrack::setDepthZoom(double minDepth, double maxDepth) -{ - // Note: Y-axis is inverted - setAxisScale(QwtPlot::yLeft, maxDepth, minDepth); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuWellLogTrack::setXRange(double min, double max) -{ - setAxisScale(QwtPlot::xTop, min, max); - setAxisScale(QwtPlot::xBottom, min, max); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuWellLogTrack::setDepthTitle(const QString& title) -{ - QwtText axisTitleY = axisTitle(QwtPlot::yLeft); - axisTitleY.setText(title); - setAxisTitle(QwtPlot::yLeft, axisTitleY); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RiuWellLogTrack::eventFilter(QObject* watched, QEvent* event) -{ - if (watched == canvas()) - { - QWheelEvent* wheelEvent = dynamic_cast(event); - if (wheelEvent) - { - if (!m_plotTrackDefinition) - { - return QwtPlot::eventFilter(watched, event); - } - - RimWellLogPlot* plotDefinition; - m_plotTrackDefinition->firstAncestorOrThisOfType(plotDefinition); - if (!plotDefinition) - { - return QwtPlot::eventFilter(watched, event); - } - - if (wheelEvent->modifiers() & Qt::ControlModifier) - { - QwtScaleMap scaleMap = canvasMap(QwtPlot::yLeft); - double zoomCenter = scaleMap.invTransform(wheelEvent->pos().y()); - - if (wheelEvent->delta() > 0) - { - plotDefinition->setDepthZoomByFactorAndCenter(RIU_SCROLLWHEEL_ZOOMFACTOR, zoomCenter); - } - else - { - plotDefinition->setDepthZoomByFactorAndCenter(1.0/RIU_SCROLLWHEEL_ZOOMFACTOR, zoomCenter); - } - } - else - { - plotDefinition->panDepth(wheelEvent->delta() < 0 ? RIU_SCROLLWHEEL_PANFACTOR : -RIU_SCROLLWHEEL_PANFACTOR); - } - - event->accept(); - return true; - } - else - { - QMouseEvent* mouseEvent = dynamic_cast(event); - if (mouseEvent) - { - if (mouseEvent->button() == Qt::LeftButton && mouseEvent->type() == QMouseEvent::MouseButtonRelease) - { - selectClosestCurve(mouseEvent->pos()); - } - } - } - } - - return QwtPlot::eventFilter(watched, event); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuWellLogTrack::focusInEvent(QFocusEvent* event) -{ - if (m_plotTrackDefinition) - { - RiaApplication::instance()->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem(m_plotTrackDefinition); - clearFocus(); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuWellLogTrack::selectClosestCurve(const QPoint& pos) -{ - QwtPlotCurve* closestCurve = NULL; - double distMin = DBL_MAX; - - const QwtPlotItemList& itmList = itemList(); - for (QwtPlotItemIterator it = itmList.begin(); it != itmList.end(); it++) - { - if ((*it )->rtti() == QwtPlotItem::Rtti_PlotCurve ) - { - QwtPlotCurve* candidateCurve = static_cast(*it); - double dist = DBL_MAX; - candidateCurve->closestPoint(pos, &dist); - if (dist < distMin) - { - closestCurve = candidateCurve; - distMin = dist; - } - } - } - - if (closestCurve && distMin < 20) - { - RimWellLogCurve* selectedCurve = m_plotTrackDefinition->curveDefinitionFromCurve(closestCurve); - if (selectedCurve) - { - RiaApplication::instance()->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem(selectedCurve); - } - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -QSize RiuWellLogTrack::sizeHint() const -{ - return QSize(0, 0); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -QSize RiuWellLogTrack::minimumSizeHint() const -{ - return QSize(0, 0); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuWellLogTrack::leaveEvent(QEvent *) -{ - if (m_plotMarker->plot()) - { - m_plotMarker->detach(); - - replot(); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RiuWellLogTrack::isRimTrackVisible() -{ - if (m_plotTrackDefinition) - { - return m_plotTrackDefinition->isVisible(); - } - - return false; -} - +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2015- Statoil ASA +// Copyright (C) 2015- Ceetron Solutions 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RiuWellLogTrack.h" + +#include "RiaApplication.h" + +#include "RimWellLogPlot.h" +#include "RimWellLogTrack.h" +#include "RimWellLogCurve.h" + +#include "RiuMainPlotWindow.h" +#include "RiuQwtCurvePointTracker.h" + +#include "qwt_legend.h" +#include "qwt_plot_curve.h" +#include "qwt_plot_grid.h" +#include "qwt_plot_layout.h" +#include "qwt_plot_marker.h" +#include "qwt_plot_picker.h" +#include "qwt_scale_draw.h" +#include "qwt_scale_engine.h" +#include "qwt_symbol.h" +#include "qwt_text.h" + +#include +#include +#include +#include + +#include +#include "RiuSummaryQwtPlot.h" + +#define RIU_SCROLLWHEEL_ZOOMFACTOR 1.1 +#define RIU_SCROLLWHEEL_PANFACTOR 0.1 + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuWellLogTrack::RiuWellLogTrack(RimWellLogTrack* plotTrackDefinition, QWidget* parent) + : QwtPlot(parent) +{ + Q_ASSERT(plotTrackDefinition); + m_plotTrackDefinition = plotTrackDefinition; + + setDefaults(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuWellLogTrack::~RiuWellLogTrack() +{ + +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuWellLogTrack::setDefaults() +{ + RiuSummaryQwtPlot::setCommonPlotBehaviour(this); + + enableAxis(QwtPlot::xTop, true); + enableAxis(QwtPlot::yLeft, true); + enableAxis(QwtPlot::xBottom, false); + enableAxis(QwtPlot::yRight, false); + + axisScaleEngine(QwtPlot::yLeft)->setAttribute(QwtScaleEngine::Inverted, true); + + // Align the canvas with the actual min and max values of the curves + axisScaleEngine(QwtPlot::xTop)->setAttribute(QwtScaleEngine::Floating, true); + axisScaleEngine(QwtPlot::yLeft)->setAttribute(QwtScaleEngine::Floating, true); + setAxisScale(QwtPlot::yLeft, 1000, 0); + setAxisScale(QwtPlot::xTop, -10, 100); + +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuWellLogTrack::setDepthZoom(double minDepth, double maxDepth) +{ + // Note: Y-axis is inverted + setAxisScale(QwtPlot::yLeft, maxDepth, minDepth); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuWellLogTrack::setXRange(double min, double max) +{ + setAxisScale(QwtPlot::xTop, min, max); + setAxisScale(QwtPlot::xBottom, min, max); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuWellLogTrack::setDepthTitle(const QString& title) +{ + QwtText axisTitleY = axisTitle(QwtPlot::yLeft); + axisTitleY.setText(title); + setAxisTitle(QwtPlot::yLeft, axisTitleY); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuWellLogTrack::setXTitle(const QString& title) +{ + QwtText axisTitleX = axisTitle(QwtPlot::xTop); + axisTitleX.setText(title); + setAxisTitle(QwtPlot::xTop, axisTitleX); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RiuWellLogTrack::eventFilter(QObject* watched, QEvent* event) +{ + if (watched == canvas()) + { + QWheelEvent* wheelEvent = dynamic_cast(event); + if (wheelEvent) + { + if (!m_plotTrackDefinition) + { + return QwtPlot::eventFilter(watched, event); + } + + RimWellLogPlot* plotDefinition; + m_plotTrackDefinition->firstAncestorOrThisOfType(plotDefinition); + if (!plotDefinition) + { + return QwtPlot::eventFilter(watched, event); + } + + if (wheelEvent->modifiers() & Qt::ControlModifier) + { + QwtScaleMap scaleMap = canvasMap(QwtPlot::yLeft); + double zoomCenter = scaleMap.invTransform(wheelEvent->pos().y()); + + if (wheelEvent->delta() > 0) + { + plotDefinition->setDepthZoomByFactorAndCenter(RIU_SCROLLWHEEL_ZOOMFACTOR, zoomCenter); + } + else + { + plotDefinition->setDepthZoomByFactorAndCenter(1.0/RIU_SCROLLWHEEL_ZOOMFACTOR, zoomCenter); + } + } + else + { + plotDefinition->panDepth(wheelEvent->delta() < 0 ? RIU_SCROLLWHEEL_PANFACTOR : -RIU_SCROLLWHEEL_PANFACTOR); + } + + event->accept(); + return true; + } + else + { + QMouseEvent* mouseEvent = dynamic_cast(event); + if (mouseEvent) + { + if (mouseEvent->button() == Qt::LeftButton && mouseEvent->type() == QMouseEvent::MouseButtonRelease) + { + selectClosestCurve(mouseEvent->pos()); + } + } + } + } + + return QwtPlot::eventFilter(watched, event); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuWellLogTrack::selectClosestCurve(const QPoint& pos) +{ + QwtPlotCurve* closestCurve = NULL; + double distMin = DBL_MAX; + + const QwtPlotItemList& itmList = itemList(); + for (QwtPlotItemIterator it = itmList.begin(); it != itmList.end(); it++) + { + if ((*it )->rtti() == QwtPlotItem::Rtti_PlotCurve ) + { + QwtPlotCurve* candidateCurve = static_cast(*it); + double dist = DBL_MAX; + candidateCurve->closestPoint(pos, &dist); + if (dist < distMin) + { + closestCurve = candidateCurve; + distMin = dist; + } + } + } + + if (closestCurve && distMin < 20) + { + RimWellLogCurve* selectedCurve = m_plotTrackDefinition->curveDefinitionFromCurve(closestCurve); + if (selectedCurve) + { + RiaApplication::instance()->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem(selectedCurve); + + return; + } + } + + RiaApplication::instance()->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem(m_plotTrackDefinition); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QSize RiuWellLogTrack::sizeHint() const +{ + return QSize(0, 0); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QSize RiuWellLogTrack::minimumSizeHint() const +{ + return QSize(0, 0); +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RiuWellLogTrack::isRimTrackVisible() +{ + if (m_plotTrackDefinition) + { + return m_plotTrackDefinition->isVisible(); + } + + return false; +} + diff --git a/ApplicationCode/UserInterface/RiuWellLogTrack.h b/ApplicationCode/UserInterface/RiuWellLogTrack.h index d939d8f560..a97f8f3246 100644 --- a/ApplicationCode/UserInterface/RiuWellLogTrack.h +++ b/ApplicationCode/UserInterface/RiuWellLogTrack.h @@ -1,76 +1,68 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2015- Statoil ASA -// Copyright (C) 2015- Ceetron Solutions 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#pragma once - -#include "qwt_plot.h" - -#include "cafPdmPointer.h" - -class RimWellLogTrack; - -class QwtLegend; -class QwtPicker; -class QwtPlotGrid; -class QwtPlotMarker; - -class QEvent; - -//================================================================================================== -// -// -// -//================================================================================================== -class RiuWellLogTrack : public QwtPlot -{ - Q_OBJECT - -public: - RiuWellLogTrack(RimWellLogTrack* plotTrackDefinition, QWidget* parent = NULL); - virtual ~RiuWellLogTrack(); - - void setDepthZoom(double minDepth, double maxDepth); - void setDepthTitle(const QString& title); - - void setXRange(double min, double max); - - bool isRimTrackVisible(); - -protected: - virtual bool eventFilter(QObject* watched, QEvent* event); - virtual void focusInEvent(QFocusEvent* event); - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; - virtual void leaveEvent(QEvent *) override; - -private: - friend class RiuWellLogTrackQwtPicker; - QPointF closestCurvePoint(const QPoint& pos, QString* valueString, QString* depthString) const; - void updateClosestCurvePointMarker(const QPointF& pos); - - void setDefaults(); - void selectClosestCurve(const QPoint& pos); - -private: - caf::PdmPointer m_plotTrackDefinition; - QwtPlotGrid* m_grid; - QwtPicker* m_plotPicker; - QwtPlotMarker* m_plotMarker; -}; - +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2015- Statoil ASA +// Copyright (C) 2015- Ceetron Solutions 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "qwt_plot.h" + +#include "cafPdmPointer.h" + +class RimWellLogTrack; + +class QwtLegend; +class QwtPicker; +class QwtPlotGrid; +class QwtPlotMarker; + +class QEvent; + +//================================================================================================== +// +// +// +//================================================================================================== +class RiuWellLogTrack : public QwtPlot +{ + Q_OBJECT + +public: + RiuWellLogTrack(RimWellLogTrack* plotTrackDefinition, QWidget* parent = NULL); + virtual ~RiuWellLogTrack(); + + void setDepthZoom(double minDepth, double maxDepth); + void setDepthTitle(const QString& title); + void setXTitle(const QString& title); + + void setXRange(double min, double max); + + bool isRimTrackVisible(); + +protected: + virtual bool eventFilter(QObject* watched, QEvent* event); + virtual QSize sizeHint() const; + virtual QSize minimumSizeHint() const; + +private: + void setDefaults(); + void selectClosestCurve(const QPoint& pos); + +private: + caf::PdmPointer m_plotTrackDefinition; +}; + diff --git a/ApplicationCode/WellPathImportSsihub/RimOilRegionEntry.h b/ApplicationCode/WellPathImportSsihub/RimOilRegionEntry.h index 0af69eb858..110a53fa28 100644 --- a/ApplicationCode/WellPathImportSsihub/RimOilRegionEntry.h +++ b/ApplicationCode/WellPathImportSsihub/RimOilRegionEntry.h @@ -20,10 +20,9 @@ #include "cafPdmObject.h" #include "cafPdmField.h" +#include "cafPdmChildArrayField.h" -#include "RimOilFieldEntry.h" - - +class RimOilFieldEntry; class RimOilRegionEntry : public caf::PdmObject diff --git a/ApplicationCode/WellPathImportSsihub/RimWellPathImport.cpp b/ApplicationCode/WellPathImportSsihub/RimWellPathImport.cpp index 32b0a33c68..cc1add2b59 100644 --- a/ApplicationCode/WellPathImportSsihub/RimWellPathImport.cpp +++ b/ApplicationCode/WellPathImportSsihub/RimWellPathImport.cpp @@ -17,6 +17,9 @@ ///////////////////////////////////////////////////////////////////////////////// #include "RimWellPathImport.h" + +#include "RimOilFieldEntry.h" +#include "RimOilRegionEntry.h" #include "RimTools.h" #include "RimWellPath.h" #include "RimWellPathCollection.h" diff --git a/ApplicationCode/WellPathImportSsihub/RimWellPathImport.h b/ApplicationCode/WellPathImportSsihub/RimWellPathImport.h index 491664f051..bba20d4aae 100644 --- a/ApplicationCode/WellPathImportSsihub/RimWellPathImport.h +++ b/ApplicationCode/WellPathImportSsihub/RimWellPathImport.h @@ -21,9 +21,9 @@ #include "cafPdmObject.h" #include "cafPdmField.h" #include "cafAppEnum.h" -#include "RimOilRegionEntry.h" - +#include "cafPdmChildArrayField.h" +class RimOilRegionEntry; class RimWellPathImport : public caf::PdmObject diff --git a/ApplicationCode/WellPathImportSsihub/RiuWellImportWizard.cpp b/ApplicationCode/WellPathImportSsihub/RiuWellImportWizard.cpp index 0471ffa8b2..e44f32c6f5 100644 --- a/ApplicationCode/WellPathImportSsihub/RiuWellImportWizard.cpp +++ b/ApplicationCode/WellPathImportSsihub/RiuWellImportWizard.cpp @@ -19,6 +19,9 @@ #include "RiuWellImportWizard.h" #include "RifJsonEncodeDecode.h" + +#include "RimOilFieldEntry.h" +#include "RimOilRegionEntry.h" #include "RimWellPathImport.h" #include "cafPdmDocument.h" @@ -29,6 +32,7 @@ #include "cafPdmUiPropertyView.h" #include "cafPdmUiTreeView.h" #include "cafPdmUiTreeViewEditor.h" +#include "cafUtils.h" #include #include @@ -96,7 +100,7 @@ QString RiuWellImportWizard::jsonWellsFilePath() void RiuWellImportWizard::downloadFields() { QString wellFileName = jsonWellsFilePath(); - if (QFile::exists(wellFileName)) + if (caf::Utils::fileExists(wellFileName)) { QFile::remove(wellFileName); } @@ -352,7 +356,7 @@ void RiuWellImportWizard::updateFieldsModel() { QString fileName = jsonFieldsFilePath(); - if (QFile::exists(fileName)) + if (caf::Utils::fileExists(fileName)) { ResInsightInternalJson::JsonReader jsonReader; QMap jsonMap = jsonReader.decodeFile(fileName); @@ -537,7 +541,7 @@ QStringList RiuWellImportWizard::absoluteFilePathsToWellPaths() const for (size_t i = 0; i < downloadEntities.size(); i++) { - if (QFile::exists(downloadEntities[i].responseFilename)) + if (caf::Utils::fileExists(downloadEntities[i].responseFilename)) { filePaths.push_back(downloadEntities[i].responseFilename); } @@ -579,7 +583,7 @@ void RiuWellImportWizard::parseWellsResponse(RimOilFieldEntry* oilFieldEntry) QStringList surveyNames; QStringList planNames; - if (QFile::exists(oilFieldEntry->wellsFilePath)) + if (caf::Utils::fileExists(oilFieldEntry->wellsFilePath)) { ResInsightInternalJson::JsonReader jsonReader; QMap jsonMap = jsonReader.decodeFile(oilFieldEntry->wellsFilePath); @@ -884,10 +888,10 @@ void WellSelectionPage::buildWellTreeView() RimWellPathEntry* wellPathEntry = oilField->wells[wIdx]; // Create a copy of the PdmObject, as it is not supported to have multiple parents of any objects - QString objStr = xmlObj(wellPathEntry)->writeObjectToXmlString(); + QString objStr = wellPathEntry->writeObjectToXmlString(); RimWellPathEntry* wellPathCopy = new RimWellPathEntry; - xmlObj(wellPathCopy)->readObjectFromXmlString(objStr, caf::PdmDefaultObjectFactory::instance()); + wellPathCopy->readObjectFromXmlString(objStr, caf::PdmDefaultObjectFactory::instance()); fieldGroup->objects.push_back(wellPathCopy); } @@ -1053,7 +1057,7 @@ void WellSummaryPage::updateSummaryPage() for (size_t i = 0; i < downloadEntities.size(); i++) { - if (QFile::exists(downloadEntities[i].responseFilename)) + if (caf::Utils::fileExists(downloadEntities[i].responseFilename)) { wellPathCount++; } diff --git a/CMakeLists.txt b/CMakeLists.txt index 672bed3594..7b8272fd67 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,49 +49,6 @@ endif() ################################################################################ include (ResInsightVersion.cmake) -################################################################################ -# Boost -################################################################################ - -# if we are building shared libraries ourselves, then don't include Boost in them -if (BUILD_SHARED_LIBS) - set(Boost_USE_STATIC_LIBS OFF) -elseif (DEFINED BUILD_SHARED_LIBS) - set(Boost_USE_STATIC_LIBS ON) -endif () -set(Boost_USE_MULTITHREADED ON) -set(Boost_USE_STATIC_RUNTIME OFF) - -if (MSVC) - ADD_DEFINITIONS("-DBOOST_ALL_NO_LIB") -endif() - - -# Requires BOOST filesystem version 3, thus 1.44 is necessary. -add_definitions(-DBOOST_FILESYSTEM_VERSION=3) - -if(MSVC) - set(BUILD_SHARED_LIBS OFF) - set(Boost_USE_STATIC_LIBS ON) - set(RESINSIGHT_BOOST_ROOT "" CACHE PATH "Path to installed boost directories" ) - set(RESINSIGHT_BOOST_LIBRARYDIR "" CACHE PATH "Path to boost binary libraries" ) - set(BOOST_ROOT ${RESINSIGHT_BOOST_ROOT}) - set(BOOST_LIBRARYDIR ${RESINSIGHT_BOOST_LIBRARYDIR}) - - if (RESINSIGHT_BOOST_ROOT AND RESINSIGHT_BOOST_LIBRARYDIR) - find_package(Boost 1.44.0 COMPONENTS filesystem date_time system regex REQUIRED) - else() - message (FATAL_ERROR "You need to set RESINSIGHT_BOOST_ROOT and RESINSIGHT_BOOST_LIBRARYDIR") - endif() - -else() - find_package(Boost 1.44.0 COMPONENTS filesystem date_time system regex REQUIRED) -endif() - -# Boost < 1.57 has c++11 name mangling issues in boost::filesystem -if(Boost_VERSION VERSION_LESS 105700) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBOOST_NO_CXX11_SCOPED_ENUMS") -endif() ################################################################################ # cotire @@ -104,9 +61,6 @@ if(RESINSIGHT_ENABLE_COTIRE) set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") include(cotire) - - set(CAF_USE_COTIRE TRUE CACHE INTERNAL "CAF: Use cotire") - endif() @@ -191,7 +145,7 @@ else() set_property(TARGET ${ERT_LIBRARIES} ecl_lfs - PROPERTY FOLDER "ERT" + PROPERTY FOLDER "Thirdparty/ERT" ) endif() @@ -201,14 +155,37 @@ else() endif(RESINSIGHT_ERT_EXTERNAL_LIB_ROOT OR RESINSIGHT_ERT_EXTERNAL_INCLUDE_ROOT) +################################################################################ +# Subset of Boost, used by NRLib and flow diagnostics application +################################################################################ + +if(MSVC) + # stop MSVC from trying to auto-link libs + add_definitions("-DBOOST_ALL_NO_LIB") +endif() + +add_subdirectory(ThirdParty/boost-Subset) + +list(APPEND THIRD_PARTY_LIBRARIES + boost-Subset +) + ################################################################################ # Opm ################################################################################ -add_subdirectory(ThirdParty/custom-opm-parser) -add_subdirectory(ThirdParty/custom-opm-parser/custom-opm-parser-tests) add_subdirectory(ThirdParty/custom-opm-flowdiagnostics) +add_subdirectory(ThirdParty/custom-opm-flowdiag-app) + +list(APPEND OPM_LIBRARIES + custom-opm-flowdiagnostics + custom-opm-flowdiag-app +) +set_property(TARGET + ${OPM_LIBRARIES} + PROPERTY FOLDER "Thirdparty/OPM" +) ################################################################################ # NRLib @@ -216,6 +193,10 @@ add_subdirectory(ThirdParty/custom-opm-flowdiagnostics) add_subdirectory(ThirdParty/NRLib) +list(APPEND THIRD_PARTY_LIBRARIES + NRLib +) + ################################################################################ # Qt @@ -241,6 +222,30 @@ find_package( OpenGL ) add_subdirectory(ThirdParty/Qwt/src) +list(APPEND THIRD_PARTY_LIBRARIES + Qwt +) + + +################################################################################ +# Nightcharts +################################################################################ + +add_subdirectory(ThirdParty/nightcharts) + +list(APPEND THIRD_PARTY_LIBRARIES + nightcharts +) + + +################################################################################ +# Thirdparty libraries are put in ThirdParty solution folder +################################################################################ +set_property(TARGET + ${THIRD_PARTY_LIBRARIES} + PROPERTY FOLDER "Thirdparty" +) + ################################################################################ # Vizualization Framework ################################################################################ @@ -343,19 +348,12 @@ set_property(TARGET # Installation settings ################################################################################ -set (RESINSIGHT_FINAL_NAME "ResInsight-${STRPRODUCTVER}") - -# Append el5 when compiled on RHEL5 and el6 if compiled on RHEL6 -string(REGEX MATCH "el[5,6]?" RESINSIGHT_PLATFORM ${CMAKE_SYSTEM}) -if (NOT "${RESINSIGHT_PLATFORM}" STREQUAL "") - set (RESINSIGHT_FINAL_NAME "${RESINSIGHT_FINAL_NAME}-${RESINSIGHT_PLATFORM}") -endif() +set (RESINSIGHT_INSTALL_FOLDER ".") # override system install prefix if private installation chosen option (RESINSIGHT_PRIVATE_INSTALL "Install as an independent bundle including the neccesary Qt libraries" ON) if (RESINSIGHT_PRIVATE_INSTALL) set (CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/Install/) - #set (CMAKE_INSTALL_PREFIX /usr/${RESINSIGHT_FINAL_NAME}) ################################################################################ # ERT shared library files @@ -366,22 +364,22 @@ if (RESINSIGHT_PRIVATE_INSTALL) set(ERT_SHARED_LIB_FILES ${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl.so ${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl.so.2 - ${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl.so.2.1 + ${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl.so.2.2 ${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libeclxx.so ${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libeclxx.so.2 - ${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libeclxx.so.2.1 + ${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libeclxx.so.2.2 ${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl_well.so ${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl_well.so.2 - ${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl_well.so.2.1 + ${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl_well.so.2.2 ${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libert_geometry.so ${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libert_geometry.so.2 - ${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libert_geometry.so.2.1 + ${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libert_geometry.so.2.2 ${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libert_util.so ${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libert_util.so.2 - ${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libert_util.so.2.1 + ${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libert_util.so.2.2 ) - install(FILES ${ERT_SHARED_LIB_FILES} DESTINATION ${RESINSIGHT_FINAL_NAME} ) + install(FILES ${ERT_SHARED_LIB_FILES} DESTINATION ${RESINSIGHT_INSTALL_FOLDER} ) endif() endif (RESINSIGHT_PRIVATE_INSTALL) @@ -424,14 +422,50 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Windows") set(CPACK_GENERATOR ZIP) endif() -set(CPACK_PACKAGE_VERSION_MAJOR ${CMAKE_MAJOR_VERSION}) -set(CPACK_PACKAGE_VERSION_MINOR ${CMAKE_MINOR_VERSION}) -set(CPACK_PACKAGE_VERSION_PATCH ${CMAKE_PATCH_VERSION}) +if(RESINSIGHT_OCTAVE_PLUGIN_MKOCTFILE) + get_filename_component(RESINSIGHT_OCTAVE_DIRECTORY ${RESINSIGHT_OCTAVE_PLUGIN_MKOCTFILE} DIRECTORY) + + execute_process (COMMAND octave-config -v + WORKING_DIRECTORY ${RESINSIGHT_OCTAVE_DIRECTORY} + OUTPUT_VARIABLE OCTAVE_VERSION_STRING + OUTPUT_STRIP_TRAILING_WHITESPACE) +endif () + +# Handling of system name on Windows +if(${CMAKE_SYSTEM_NAME} MATCHES Windows) + if(CMAKE_CL_64) + set(CPACK_SYSTEM_NAME win64) + else() + set(CPACK_SYSTEM_NAME win32) + endif() +endif() + +# Append el5 when compiled on RHEL5 and el6 if compiled on RHEL6 +string(REGEX MATCH "el[5,6]?" RESINSIGHT_RHEL_SYSTEM_NAME ${CMAKE_SYSTEM}) + + +set(RESINSIGHT_PACKAGE_NAME "ResInsight") + +set (RESINSIGHT_PACKAGE_NAME "${RESINSIGHT_PACKAGE_NAME}-${STRPRODUCTVER}") + +if(NOT ${RESINSIGHT_ODB_API_DIR} EQUAL "") + set (RESINSIGHT_PACKAGE_NAME "${RESINSIGHT_PACKAGE_NAME}_odb") +endif() + +if(NOT ${OCTAVE_VERSION_STRING} EQUAL "") + set (RESINSIGHT_PACKAGE_NAME "${RESINSIGHT_PACKAGE_NAME}_oct-${OCTAVE_VERSION_STRING}") +endif() -set(CPACK_PACKAGE_NAME "ResInsight-bin") -if (NOT "${RESINSIGHT_PLATFORM}" STREQUAL "") - set (CPACK_SYSTEM_NAME "${RESINSIGHT_PLATFORM}") +# Append el5 when compiled on RHEL5 and el6 if compiled on RHEL6 +if (NOT "${RESINSIGHT_RHEL_SYSTEM_NAME}" STREQUAL "") + set (RESINSIGHT_PACKAGE_NAME "${RESINSIGHT_PACKAGE_NAME}_${RESINSIGHT_RHEL_SYSTEM_NAME}") +else() + set (RESINSIGHT_PACKAGE_NAME "${RESINSIGHT_PACKAGE_NAME}_${CPACK_SYSTEM_NAME}") endif() +#message("RESINSIGHT_PACKAGE_NAME : " ${RESINSIGHT_PACKAGE_NAME}) +set(CPACK_PACKAGE_FILE_NAME ${RESINSIGHT_PACKAGE_NAME}) + + include (CPack) diff --git a/Fwk/AppFwk/CommonCode/CMakeLists.txt b/Fwk/AppFwk/CommonCode/CMakeLists.txt index 855306a200..8ea50bb5d9 100644 --- a/Fwk/AppFwk/CommonCode/CMakeLists.txt +++ b/Fwk/AppFwk/CommonCode/CMakeLists.txt @@ -43,7 +43,8 @@ add_library( ${PROJECT_NAME} cvfStructGrid.h cvfCellRange.cpp cvfCellRange.h - + cafColorTable.cpp + cafColorTable.h cvfStructGridGeometryGenerator.cpp cvfStructGridGeometryGenerator.h diff --git a/Fwk/AppFwk/CommonCode/cafColorTable.cpp b/Fwk/AppFwk/CommonCode/cafColorTable.cpp new file mode 100644 index 0000000000..a9282144ca --- /dev/null +++ b/Fwk/AppFwk/CommonCode/cafColorTable.cpp @@ -0,0 +1,169 @@ +//################################################################################################## +// +// Custom Visualization Core library +// Copyright (C) 2017 Ceetron Solutions AS +// +// This library may be used under the terms of either the GNU General Public License or +// the GNU Lesser General Public License as follows: +// +// GNU General Public License Usage +// This library 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. +// +// This library 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 <> +// for more details. +// +// GNU Lesser General Public License Usage +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library 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 Lesser General Public License at <> +// for more details. +// +//################################################################################################## + + +#include "cafColorTable.h" + +#include + + +namespace caf { + + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +ColorTable::ColorTable(const std::vector& colors) + : m_colors(colors) +{ + CVF_ASSERT(m_colors.size() > 0); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +cvf::Color3f ColorTable::cycledColor3f(size_t itemIndex) const +{ + return cvf::Color3f(cycledColor3ub(itemIndex)); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +cvf::Color3ub ColorTable::cycledColor3ub(size_t itemIndex) const +{ + size_t modIndex = itemIndex % m_colors.size(); + + return m_colors[modIndex]; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QColor ColorTable::cycledQColor(size_t itemIndex) const +{ + cvf::Color3ub col = cycledColor3ub(itemIndex); + return QColor(col.r(), col.g(), col.b()); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +cvf::Color3ubArray ColorTable::color3ubArray() const +{ + return cvf::Color3ubArray(m_colors); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +cvf::Color3fArray ColorTable::color3fArray() const +{ + cvf::Color3fArray col3fArr; + + col3fArr.resize(m_colors.size()); + for (const auto& c : m_colors) + { + col3fArr.add(cvf::Color3f(c)); + } + + return col3fArr; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +size_t ColorTable::size() const +{ + return m_colors.size(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +cvf::Color3ub ColorTable::fromQColor(const QColor& color) +{ + return cvf::Color3ub(color.red(), color.green(), color.blue()); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +cvf::Color3ubArray ColorTable::interpolateColorArray(const cvf::Color3ubArray& colorArray, size_t targetColorCount) +{ + size_t inputColorCount = colorArray.size(); + CVF_ASSERT(inputColorCount > 1); + CVF_ASSERT(targetColorCount > 1); + + cvf::Color3ubArray colors; + colors.reserve(targetColorCount); + + const size_t inputColorsMaxIdx = inputColorCount - 1; + const size_t outputColorsMaxIdx = targetColorCount - 1; + + for (size_t outputLevelIdx = 0; outputLevelIdx < outputColorsMaxIdx; outputLevelIdx++) + { + double dblInputLevelIndex = inputColorsMaxIdx * (outputLevelIdx / static_cast(outputColorsMaxIdx)); + + const size_t inputLevelIndex = static_cast(dblInputLevelIndex); + CVF_ASSERT(inputLevelIndex < inputColorsMaxIdx); + + double t = dblInputLevelIndex - inputLevelIndex; + CVF_ASSERT(t >= 0 && t <= 1.0); + + cvf::Color3ub c1 = colorArray[inputLevelIndex]; + cvf::Color3ub c2 = colorArray[inputLevelIndex + 1]; + + int r = static_cast(c1.r() + t*(c2.r() - c1.r()) + 0.5); + int g = static_cast(c1.g() + t*(c2.g() - c1.g()) + 0.5); + int b = static_cast(c1.b() + t*(c2.b() - c1.b()) + 0.5); + + r = cvf::Math::clamp(r, 0, 255); + g = cvf::Math::clamp(g, 0, 255); + b = cvf::Math::clamp(b, 0, 255); + + cvf::Color3ub col((cvf::ubyte)r, (cvf::ubyte)g, (cvf::ubyte)b); + colors.add(col); + } + + colors.add(colorArray[colorArray.size() - 1]); + + return colors; + +} + +} // namespace caf diff --git a/Fwk/AppFwk/CommonCode/cafColorTable.h b/Fwk/AppFwk/CommonCode/cafColorTable.h new file mode 100644 index 0000000000..d1181711a7 --- /dev/null +++ b/Fwk/AppFwk/CommonCode/cafColorTable.h @@ -0,0 +1,76 @@ +//################################################################################################## +// +// Custom Visualization Core library +// Copyright (C) 2017 Ceetron Solutions AS +// +// This library may be used under the terms of either the GNU General Public License or +// the GNU Lesser General Public License as follows: +// +// GNU General Public License Usage +// This library 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. +// +// This library 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 <> +// for more details. +// +// GNU Lesser General Public License Usage +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library 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 Lesser General Public License at <> +// for more details. +// +//################################################################################################## + + +#pragma once + +#include "cvfBase.h" +#include "cvfArray.h" + +#include + + +class QColor; + + +namespace caf { + +//================================================================================================== +// +// +// +//================================================================================================== +class ColorTable +{ +public: + explicit ColorTable(const std::vector& colors); + + cvf::Color3f cycledColor3f(size_t itemIndex) const; + cvf::Color3ub cycledColor3ub(size_t itemIndex) const; + QColor cycledQColor(size_t itemIndex) const; + + cvf::Color3ubArray color3ubArray() const; + cvf::Color3fArray color3fArray() const; + + size_t size() const; + + static cvf::Color3ub fromQColor(const QColor& color); + static cvf::Color3ubArray interpolateColorArray(const cvf::Color3ubArray& colorArray, size_t targetColorCount); +private: + const std::vector m_colors; +}; + +} diff --git a/Fwk/AppFwk/CommonCode/cafEffectCache.cpp b/Fwk/AppFwk/CommonCode/cafEffectCache.cpp index d0734f361a..18bf9e7986 100644 --- a/Fwk/AppFwk/CommonCode/cafEffectCache.cpp +++ b/Fwk/AppFwk/CommonCode/cafEffectCache.cpp @@ -86,7 +86,6 @@ cvf::Effect* EffectCache::findEffect(const EffectGenerator* generator) if (m_effectCache[i].first->isEqual(generator)) { cvf::ref effect = m_effectCache[i].second; - EffectGenerator* effGen = m_effectCache[i].first; return effect.p(); } } diff --git a/Fwk/AppFwk/CommonCode/cafEffectGenerator.cpp b/Fwk/AppFwk/CommonCode/cafEffectGenerator.cpp index fcfe86f08a..2c91de2872 100644 --- a/Fwk/AppFwk/CommonCode/cafEffectGenerator.cpp +++ b/Fwk/AppFwk/CommonCode/cafEffectGenerator.cpp @@ -36,27 +36,29 @@ #include "cafEffectGenerator.h" + +#include "cafEffectCache.h" #include "cafUtils.h" -#include "cvfRenderState_FF.h" -#include "cvfTextureImage.h" -#include "cvfTexture2D_FF.h" -#include "cvfShaderProgramGenerator.h" -#include "cvfShaderSourceProvider.h" -#include "cvfUniform.h" -#include "cvfShaderProgram.h" #include "cvfMatrixState.h" -#include "cvfTexture.h" -#include "cvfSampler.h" -#include "cvfRenderStatePolygonOffset.h" +#include "cvfRenderState_FF.h" #include "cvfRenderStateBlending.h" #include "cvfRenderStateCullFace.h" -#include "cvfRenderStateTextureBindings.h" -#include "cvfRenderStatePolygonMode.h" #include "cvfRenderStateDepth.h" +#include "cvfRenderStateLine.h" +#include "cvfRenderStatePolygonMode.h" +#include "cvfRenderStatePolygonOffset.h" +#include "cvfRenderStateTextureBindings.h" +#include "cvfSampler.h" +#include "cvfShaderProgram.h" +#include "cvfShaderProgramGenerator.h" +#include "cvfShaderSourceProvider.h" +#include "cvfTexture.h" +#include "cvfTexture2D_FF.h" +#include "cvfTextureImage.h" +#include "cvfUniform.h" #include -#include "cafEffectCache.h" namespace caf { @@ -807,6 +809,15 @@ MeshEffectGenerator::MeshEffectGenerator(const cvf::Color3f& color) { m_color = color; m_lineStipple = false; + m_lineWidth = cvf::UNDEFINED_FLOAT; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void MeshEffectGenerator::setLineWidth(float lineWidth) +{ + m_lineWidth = lineWidth; } //-------------------------------------------------------------------------------------------------- @@ -830,6 +841,13 @@ void MeshEffectGenerator::updateForShaderBasedRendering(cvf::Effect* effect) con // TODO: Use when VizFwk is updated //eff->setRenderState(new cvf::RenderStateLineStipple_FF); } + + if (m_lineWidth < cvf::UNDEFINED_FLOAT) + { + eff->setRenderState(new cvf::RenderStateLine(m_lineWidth)); + } + + eff->setRenderState(new cvf::RenderStateDepth(true, cvf::RenderStateDepth::LEQUAL)); } //-------------------------------------------------------------------------------------------------- @@ -870,6 +888,11 @@ bool MeshEffectGenerator::isEqual(const EffectGenerator* other) const return false; } + if (m_lineWidth != otherMesh->m_lineWidth) + { + return false; + } + return true; } @@ -883,6 +906,7 @@ EffectGenerator* MeshEffectGenerator::copy() const { MeshEffectGenerator* effGen = new MeshEffectGenerator(m_color); effGen->setLineStipple(m_lineStipple); + effGen->setLineWidth(m_lineWidth); return effGen; } diff --git a/Fwk/AppFwk/CommonCode/cafEffectGenerator.h b/Fwk/AppFwk/CommonCode/cafEffectGenerator.h index fc5a2ec63f..0a8856cce4 100644 --- a/Fwk/AppFwk/CommonCode/cafEffectGenerator.h +++ b/Fwk/AppFwk/CommonCode/cafEffectGenerator.h @@ -206,7 +206,7 @@ class ScalarMapperEffectGenerator : public EffectGenerator class ScalarMapperMeshEffectGenerator : public EffectGenerator { public: - ScalarMapperMeshEffectGenerator(const cvf::ScalarMapper* scalarMapper); + explicit ScalarMapperMeshEffectGenerator(const cvf::ScalarMapper* scalarMapper); void setOpacityLevel(float opacity) { m_opacityLevel = cvf::Math::clamp(opacity, 0.0f , 1.0f ); } void setUndefinedColor(cvf::Color3f color) { m_undefinedColor = color; } @@ -237,8 +237,9 @@ class ScalarMapperMeshEffectGenerator : public EffectGenerator class MeshEffectGenerator : public EffectGenerator { public: - MeshEffectGenerator(const cvf::Color3f& color); + explicit MeshEffectGenerator(const cvf::Color3f& color); void setLineStipple(bool enable) { m_lineStipple = enable; } + void setLineWidth(float lineWidth); protected: virtual bool isEqual(const EffectGenerator* other) const; @@ -250,6 +251,7 @@ class MeshEffectGenerator : public EffectGenerator private: cvf::Color3f m_color; bool m_lineStipple; + float m_lineWidth; }; diff --git a/Fwk/AppFwk/CommonCode/cafMessagePanel.h b/Fwk/AppFwk/CommonCode/cafMessagePanel.h index cbc084eeae..57806df71e 100644 --- a/Fwk/AppFwk/CommonCode/cafMessagePanel.h +++ b/Fwk/AppFwk/CommonCode/cafMessagePanel.h @@ -55,7 +55,7 @@ class MessagePanel : public QWidget Q_OBJECT public: - MessagePanel(QDockWidget* parent); + explicit MessagePanel(QDockWidget* parent); static MessagePanel* instance(); diff --git a/Fwk/AppFwk/CommonCode/cafUtils.cpp b/Fwk/AppFwk/CommonCode/cafUtils.cpp index 1b29cd721d..679170b94b 100644 --- a/Fwk/AppFwk/CommonCode/cafUtils.cpp +++ b/Fwk/AppFwk/CommonCode/cafUtils.cpp @@ -44,6 +44,9 @@ #include +#include +#include + namespace caf { @@ -121,6 +124,32 @@ QString Utils::constructFullFileName(const QString& folder, const QString& baseF } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString Utils::makeValidFileBasename(const QString& fileBasenameCandidate) +{ + QString cleanBasename = fileBasenameCandidate.trimmed(); + cleanBasename.replace(".", "_"); + cleanBasename.replace(",", "_"); + cleanBasename.replace(":", "_"); + cleanBasename.replace(";", "_"); + cleanBasename.replace(" ", "_"); + cleanBasename.replace("/", "_"); + cleanBasename.replace("\\", "_"); + cleanBasename.replace("<", "_"); + cleanBasename.replace(">", "_"); + cleanBasename.replace("\"", "_"); + cleanBasename.replace("|", "_"); + cleanBasename.replace("?", "_"); + cleanBasename.replace("*", "_"); + + + cleanBasename.replace(QRegExp("_+"), "_"); + + return cleanBasename; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -135,5 +164,81 @@ QString Utils::indentString(int numSpacesToIndent, const QString& str) return retStr; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool Utils::getSaveDirectoryAndCheckOverwriteFiles(const QString& defaultDir, std::vector fileNames, QString* saveDir) +{ + bool overWriteFiles = false; + (*saveDir) = QFileDialog::getExistingDirectory(NULL, "Select save directory", defaultDir); + + std::vector filesToOverwrite; + for (QString fileName : fileNames) + { + QFileInfo fileInfo((*saveDir) + "/" +fileName); + if (fileInfo.exists()) + { + filesToOverwrite.push_back(fileName); + } + } + + if (filesToOverwrite.size() == 0) + { + overWriteFiles = true; + return overWriteFiles; + } + else if (filesToOverwrite.size() > 0) + { + QMessageBox msgBox; + + QString message = "The following files will be overwritten in the export:"; + for (QString fileName : filesToOverwrite) + { + message += "\n" + (*saveDir) + "/" + fileName; + } + msgBox.setText(message); + + + msgBox.setInformativeText("Do you want to continue?"); + msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); + msgBox.setDefaultButton(QMessageBox::Ok); + int ret = msgBox.exec(); + + switch (ret) + { + case QMessageBox::Ok: + overWriteFiles = true; + break; + case QMessageBox::Cancel: + overWriteFiles = false; + break; + default: + // should never be reached + break; + } + + } + + return overWriteFiles; +} + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool Utils::fileExists(const QString& fileName) +{ + QFileInfo fi(fileName); + + // QFileInfo::exists returns true for both files and folders + // Also check if the path points to a file + + if (fi.exists() && fi.isFile()) + { + return true; + } + + return false; +} } // namespace caf diff --git a/Fwk/AppFwk/CommonCode/cafUtils.h b/Fwk/AppFwk/CommonCode/cafUtils.h index 27e85796c8..cb92cee651 100644 --- a/Fwk/AppFwk/CommonCode/cafUtils.h +++ b/Fwk/AppFwk/CommonCode/cafUtils.h @@ -37,6 +37,8 @@ #pragma once +#include + class QLineEdit; class QString; class QStringList; @@ -56,9 +58,13 @@ class Utils static QString absoluteFileName(const QString& fileName); static QStringList getFilesInDirectory(const QString& dirPath, const QString& filter, bool getAbsoluteFileNames); static QString constructFullFileName(const QString& folder, const QString& baseFileName, const QString& extension); + static QString makeValidFileBasename(const QString& fileBasenameCandidate); static QString indentString(int numSpacesToIndent, const QString& str); + static bool getSaveDirectoryAndCheckOverwriteFiles(const QString& defaultDir, std::vector fileNames, QString* saveDir); + + static bool fileExists(const QString& fileName); }; } diff --git a/Fwk/AppFwk/CommonCode/cvfStructGridCutPlane.h b/Fwk/AppFwk/CommonCode/cvfStructGridCutPlane.h index 3017f83e27..cd1e130624 100644 --- a/Fwk/AppFwk/CommonCode/cvfStructGridCutPlane.h +++ b/Fwk/AppFwk/CommonCode/cvfStructGridCutPlane.h @@ -58,7 +58,7 @@ class StructGridScalarDataAccess; class StructGridCutPlane : public Object { public: - StructGridCutPlane(const StructGridInterface* grid); + explicit StructGridCutPlane(const StructGridInterface* grid); ~StructGridCutPlane(); void setPlane(const Plane& plane); diff --git a/Fwk/AppFwk/CommonCode/cvfStructGridGeometryGenerator.h b/Fwk/AppFwk/CommonCode/cvfStructGridGeometryGenerator.h index 03ba0642bb..29b532828b 100644 --- a/Fwk/AppFwk/CommonCode/cvfStructGridGeometryGenerator.h +++ b/Fwk/AppFwk/CommonCode/cvfStructGridGeometryGenerator.h @@ -144,7 +144,7 @@ class StructGridQuadToCellFaceMapper : public Object class StuctGridTriangleToCellFaceMapper : public Object { public: - StuctGridTriangleToCellFaceMapper(const StructGridQuadToCellFaceMapper* quadMapper) { m_quadMapper = quadMapper; } + explicit StuctGridTriangleToCellFaceMapper(const StructGridQuadToCellFaceMapper* quadMapper) { m_quadMapper = quadMapper; } size_t triangleCount() const { return 2* m_quadMapper->quadCount();} size_t cellIndex(size_t triangleIdx) const {return m_quadMapper->cellIndex(triangleIdx/2); } @@ -163,7 +163,7 @@ class StuctGridTriangleToCellFaceMapper : public Object class StructGridGeometryGenerator : public Object { public: - StructGridGeometryGenerator(const StructGridInterface* grid); + explicit StructGridGeometryGenerator(const StructGridInterface* grid); ~StructGridGeometryGenerator(); // Setup methods diff --git a/Fwk/AppFwk/cafAnimControl/cafAnimationToolBar.h b/Fwk/AppFwk/cafAnimControl/cafAnimationToolBar.h index e09bd0c521..208a0dac78 100644 --- a/Fwk/AppFwk/cafAnimControl/cafAnimationToolBar.h +++ b/Fwk/AppFwk/cafAnimControl/cafAnimationToolBar.h @@ -58,7 +58,7 @@ class AnimationToolBar : public QToolBar Q_OBJECT public: - AnimationToolBar(QWidget *parent = 0); + explicit AnimationToolBar(QWidget *parent = 0); AnimationToolBar(const QString &title, QWidget *parent = 0); void connectAnimationControl(caf::FrameAnimationControl* animationControl); diff --git a/Fwk/AppFwk/cafAnimControl/cafFrameAnimationControl.h b/Fwk/AppFwk/cafAnimControl/cafFrameAnimationControl.h index f24ad7dba7..a180548f68 100644 --- a/Fwk/AppFwk/cafAnimControl/cafFrameAnimationControl.h +++ b/Fwk/AppFwk/cafAnimControl/cafFrameAnimationControl.h @@ -53,7 +53,7 @@ class FrameAnimationControl : public QObject Q_OBJECT public: - FrameAnimationControl(QObject* parent = 0); + explicit FrameAnimationControl(QObject* parent = 0); void setNumFrames(int numFrames); int numFrames() const; diff --git a/Fwk/AppFwk/cafCommand/cafCmdExecCommandManager.cpp b/Fwk/AppFwk/cafCommand/cafCmdExecCommandManager.cpp index 7ed84b8a39..a62872d559 100644 --- a/Fwk/AppFwk/cafCommand/cafCmdExecCommandManager.cpp +++ b/Fwk/AppFwk/cafCommand/cafCmdExecCommandManager.cpp @@ -50,7 +50,7 @@ class UndoRedoWrapper : public QUndoCommand { public: - UndoRedoWrapper(caf::CmdExecuteCommand* executeCommand) + explicit UndoRedoWrapper(caf::CmdExecuteCommand* executeCommand) { m_executeCommand = executeCommand; diff --git a/Fwk/AppFwk/cafCommand/cafCmdExecCommandManager.h b/Fwk/AppFwk/cafCommand/cafCmdExecCommandManager.h index eecc4bb20b..f093c1afff 100644 --- a/Fwk/AppFwk/cafCommand/cafCmdExecCommandManager.h +++ b/Fwk/AppFwk/cafCommand/cafCmdExecCommandManager.h @@ -36,6 +36,9 @@ #pragma once + +#include + #include class QUndoStack; @@ -55,6 +58,9 @@ class CmdExecCommandManager public: static CmdExecCommandManager* instance(); + CmdExecCommandManager(const CmdExecCommandManager&) = delete; + CmdExecCommandManager& operator=(const CmdExecCommandManager&) = delete; + // When the undoFeature is enabled, execute commands are inserted in the undo stack // The application can use the QUndoStack to display/modify execute commands wrapped in QUndoCommand objects void enableUndoCommandSystem(bool enable); @@ -78,10 +84,11 @@ class CmdExecCommandManager bool isUndoEnabledForCurrentCommand(CmdExecuteCommand* command); + friend class CmdExecCommandSystemActivator; friend class CmdExecCommandSystemDeactivator; private: - QUndoStack* m_undoStack; + QPointer m_undoStack; CmdUiCommandSystemImpl* m_commandFeatureInterface; }; @@ -103,5 +110,21 @@ class CmdExecCommandSystemDeactivator } }; +//================================================================================================== +/// Helper class used to temporarily enable the command system including undo/redo functionality +//================================================================================================== +class CmdExecCommandSystemActivator +{ +public: + CmdExecCommandSystemActivator() + { + CmdExecCommandManager::instance()->activateCommandSystem(); + } + + ~CmdExecCommandSystemActivator() + { + CmdExecCommandManager::instance()->deactivateCommandSystem(); + } +}; } // end namespace caf diff --git a/Fwk/AppFwk/cafCommand/cafCmdExecuteCommand.h b/Fwk/AppFwk/cafCommand/cafCmdExecuteCommand.h index 6fe6e4b420..1cd8ef8e3d 100644 --- a/Fwk/AppFwk/cafCommand/cafCmdExecuteCommand.h +++ b/Fwk/AppFwk/cafCommand/cafCmdExecuteCommand.h @@ -38,7 +38,6 @@ #pragma once #include -#include namespace caf { @@ -52,7 +51,7 @@ class PdmObjectHandle; class CmdExecuteCommand { public: - CmdExecuteCommand(NotificationCenter* notificationCenter) + explicit CmdExecuteCommand(NotificationCenter* notificationCenter) { m_notificationCenter = notificationCenter; } diff --git a/Fwk/AppFwk/cafCommand/cafCmdFeature.cpp b/Fwk/AppFwk/cafCommand/cafCmdFeature.cpp index a7fa7f18e1..1e31c33914 100644 --- a/Fwk/AppFwk/cafCommand/cafCmdFeature.cpp +++ b/Fwk/AppFwk/cafCommand/cafCmdFeature.cpp @@ -39,7 +39,7 @@ #include "cafCmdExecCommandManager.h" #include "cafCmdFeatureManager.h" -#include +#include "cafPdmUiModelChangeDetector.h" #include @@ -47,6 +47,21 @@ namespace caf { +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +CmdFeature::CmdFeature() + : m_triggerModelChange(true) +{ +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +CmdFeature::~CmdFeature() +{ + +} //-------------------------------------------------------------------------------------------------- /// @@ -118,4 +133,41 @@ void CmdFeature::refreshCheckedState() } } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool CmdFeature::canFeatureBeExecuted() +{ + return this->isCommandEnabled(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void CmdFeature::actionTriggered(bool isChecked) +{ + this->onActionTriggered(isChecked); + + if (m_triggerModelChange) + { + caf::PdmUiModelChangeDetector::instance()->setModelChanged(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool CmdFeature::isCommandChecked() +{ + return false; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void CmdFeature::disableModelChangeContribution() +{ + m_triggerModelChange = false; +} + } // end namespace caf diff --git a/Fwk/AppFwk/cafCommand/cafCmdFeature.h b/Fwk/AppFwk/cafCommand/cafCmdFeature.h index 155fe1dedb..70e36dee8a 100644 --- a/Fwk/AppFwk/cafCommand/cafCmdFeature.h +++ b/Fwk/AppFwk/cafCommand/cafCmdFeature.h @@ -73,27 +73,30 @@ class CmdFeature : public QObject { Q_OBJECT public: - CmdFeature() {} - virtual ~CmdFeature() {} + CmdFeature(); + virtual ~CmdFeature(); - QAction* action(); - QAction* action(QString customText); - void refreshEnabledState(); - void refreshCheckedState(); + QAction* action(); + QAction* action(QString customText); + void refreshEnabledState(); + void refreshCheckedState(); - bool canFeatureBeExecuted() { return this->isCommandEnabled(); } + bool canFeatureBeExecuted(); public slots: - void actionTriggered(bool isChecked) { this->onActionTriggered(isChecked); } + void actionTriggered(bool isChecked); protected: - virtual void onActionTriggered(bool isChecked) = 0; - virtual void setupActionLook(QAction* actionToSetup) = 0; - virtual bool isCommandEnabled() = 0; - virtual bool isCommandChecked() { return false; } + virtual void onActionTriggered(bool isChecked) = 0; + virtual void setupActionLook(QAction* actionToSetup) = 0; + virtual bool isCommandEnabled() = 0; + virtual bool isCommandChecked(); + + void disableModelChangeContribution(); private: std::map m_customTextToActionMap; + bool m_triggerModelChange; }; diff --git a/Fwk/AppFwk/cafCommand/cafCmdFeatureManager.cpp b/Fwk/AppFwk/cafCommand/cafCmdFeatureManager.cpp index f74a4b6947..91049771ca 100644 --- a/Fwk/AppFwk/cafCommand/cafCmdFeatureManager.cpp +++ b/Fwk/AppFwk/cafCommand/cafCmdFeatureManager.cpp @@ -46,8 +46,6 @@ #include -#include - namespace caf { @@ -129,7 +127,7 @@ std::pair CmdFeatureManager::createFeature(const std::strin } CmdFeature* feature = CommandFeatureFactory::instance()->create(commandId); - assert(feature); // The command ID is not known in the factory + CAF_ASSERT(feature); // The command ID is not known in the factory feature->setParent(this); size_t index = m_commandFeatures.size(); diff --git a/Fwk/AppFwk/cafCommand/cafCmdFieldChangeExec.cpp b/Fwk/AppFwk/cafCommand/cafCmdFieldChangeExec.cpp index dd3c1bad69..ff96516272 100644 --- a/Fwk/AppFwk/cafCommand/cafCmdFieldChangeExec.cpp +++ b/Fwk/AppFwk/cafCommand/cafCmdFieldChangeExec.cpp @@ -87,7 +87,7 @@ void CmdFieldChangeExec::redo() PdmFieldHandle* field = PdmReferenceHelper::fieldFromReference(m_commandData->m_rootObject, m_commandData->m_pathToField); if (!field) { - assert(false); + CAF_ASSERT(false); return; } @@ -140,7 +140,7 @@ void CmdFieldChangeExec::undo() PdmFieldHandle* field = PdmReferenceHelper::fieldFromReference(m_commandData->m_rootObject, m_commandData->m_pathToField); if (!field) { - assert(false); + CAF_ASSERT(false); return; } diff --git a/Fwk/AppFwk/cafCommand/cafCmdFieldChangeExec.h b/Fwk/AppFwk/cafCommand/cafCmdFieldChangeExec.h index 3a503ec0aa..5606809b7e 100644 --- a/Fwk/AppFwk/cafCommand/cafCmdFieldChangeExec.h +++ b/Fwk/AppFwk/cafCommand/cafCmdFieldChangeExec.h @@ -76,7 +76,7 @@ class CmdFieldChangeExecData : public PdmObject class CmdFieldChangeExec : public CmdExecuteCommand { public: - CmdFieldChangeExec(NotificationCenter* notificationCenter); + explicit CmdFieldChangeExec(NotificationCenter* notificationCenter); virtual ~CmdFieldChangeExec(); diff --git a/Fwk/AppFwk/cafCommand/cafCmdSelectionChangeExec.h b/Fwk/AppFwk/cafCommand/cafCmdSelectionChangeExec.h index c485a09402..aada19f097 100644 --- a/Fwk/AppFwk/cafCommand/cafCmdSelectionChangeExec.h +++ b/Fwk/AppFwk/cafCommand/cafCmdSelectionChangeExec.h @@ -78,7 +78,7 @@ class CmdSelectionChangeExecData : public PdmObject class CmdSelectionChangeExec : public CmdExecuteCommand { public: - CmdSelectionChangeExec(NotificationCenter* notificationCenter); + explicit CmdSelectionChangeExec(NotificationCenter* notificationCenter); virtual ~CmdSelectionChangeExec();; CmdSelectionChangeExecData* commandData(); diff --git a/Fwk/AppFwk/cafCommand/cafCmdSelectionHelper.cpp b/Fwk/AppFwk/cafCommand/cafCmdSelectionHelper.cpp index da4496fd50..e3a78c5c62 100644 --- a/Fwk/AppFwk/cafCommand/cafCmdSelectionHelper.cpp +++ b/Fwk/AppFwk/cafCommand/cafCmdSelectionHelper.cpp @@ -47,7 +47,7 @@ namespace caf //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void CmdSelectionHelper::executeSelectionCommand(std::vector selection, SelectionManager::SelectionRole role) +void CmdSelectionHelper::executeSelectionCommand(const std::vector& selection, SelectionManager::SelectionRole role) { CmdSelectionChangeExec* selectionChangeExec = createSelectionCommand(selection, role); diff --git a/Fwk/AppFwk/cafCommand/cafCmdSelectionHelper.h b/Fwk/AppFwk/cafCommand/cafCmdSelectionHelper.h index eb8698a0e1..bb933ba9fa 100644 --- a/Fwk/AppFwk/cafCommand/cafCmdSelectionHelper.h +++ b/Fwk/AppFwk/cafCommand/cafCmdSelectionHelper.h @@ -49,7 +49,7 @@ class CmdSelectionChangeExec; class CmdSelectionHelper { public: - static void executeSelectionCommand(std::vector selection, SelectionManager::SelectionRole role); + static void executeSelectionCommand(const std::vector& selection, SelectionManager::SelectionRole role); static CmdSelectionChangeExec* createSelectionCommand(const std::vector& selection, SelectionManager::SelectionRole role); }; diff --git a/Fwk/AppFwk/cafCommand/cafCmdUiCommandSystemImpl.cpp b/Fwk/AppFwk/cafCommand/cafCmdUiCommandSystemImpl.cpp index b61080db31..cfc18684fd 100644 --- a/Fwk/AppFwk/cafCommand/cafCmdUiCommandSystemImpl.cpp +++ b/Fwk/AppFwk/cafCommand/cafCmdUiCommandSystemImpl.cpp @@ -121,7 +121,7 @@ void CmdUiCommandSystemImpl::fieldChangedCommand(PdmFieldHandle* editorField, co QString reference = PdmReferenceHelper::referenceFromRootToField(rootObjHandle, field); if (reference.isEmpty()) { - assert(false); + CAF_ASSERT(false); return; } diff --git a/Fwk/AppFwk/cafCommand/defaultfeatures/cafCmdAddItemExec.cpp b/Fwk/AppFwk/cafCommand/defaultfeatures/cafCmdAddItemExec.cpp index 242aba4898..a121bf17be 100644 --- a/Fwk/AppFwk/cafCommand/defaultfeatures/cafCmdAddItemExec.cpp +++ b/Fwk/AppFwk/cafCommand/defaultfeatures/cafCmdAddItemExec.cpp @@ -88,7 +88,6 @@ void CmdAddItemExec::redo() if (!obj) return; listField->insertAt(m_commandData->m_indexAfter, obj); - caf::PdmUiObjectHandle* uiObject = uiObj(obj); if (m_commandData->m_indexAfter == -1) { diff --git a/Fwk/AppFwk/cafCommand/defaultfeatures/cafCmdAddItemExec.h b/Fwk/AppFwk/cafCommand/defaultfeatures/cafCmdAddItemExec.h index aaf23ab4a1..3ee60f49b0 100644 --- a/Fwk/AppFwk/cafCommand/defaultfeatures/cafCmdAddItemExec.h +++ b/Fwk/AppFwk/cafCommand/defaultfeatures/cafCmdAddItemExec.h @@ -51,7 +51,7 @@ class CmdAddItemExecData; class CmdAddItemExec : public CmdExecuteCommand { public: - CmdAddItemExec(NotificationCenter* notificationCenter); + explicit CmdAddItemExec(NotificationCenter* notificationCenter); virtual ~CmdAddItemExec();; CmdAddItemExecData* commandData(); diff --git a/Fwk/AppFwk/cafCommand/defaultfeatures/cafCmdAddItemFeature.cpp b/Fwk/AppFwk/cafCommand/defaultfeatures/cafCmdAddItemFeature.cpp index 861f8573ce..031209f85e 100644 --- a/Fwk/AppFwk/cafCommand/defaultfeatures/cafCmdAddItemFeature.cpp +++ b/Fwk/AppFwk/cafCommand/defaultfeatures/cafCmdAddItemFeature.cpp @@ -48,6 +48,8 @@ #include "cafPdmChildArrayField.h" #include "cafPdmField.h" +#include "cafAssert.h" + #include @@ -107,7 +109,7 @@ void CmdAddItemFeature::onActionTriggered(bool isChecked) } else { - assert(0); + CAF_ASSERT(0); } } } diff --git a/Fwk/AppFwk/cafCommand/defaultfeatures/cafCmdDeleteItemExec.h b/Fwk/AppFwk/cafCommand/defaultfeatures/cafCmdDeleteItemExec.h index 14f3d39965..083aa43a00 100644 --- a/Fwk/AppFwk/cafCommand/defaultfeatures/cafCmdDeleteItemExec.h +++ b/Fwk/AppFwk/cafCommand/defaultfeatures/cafCmdDeleteItemExec.h @@ -51,7 +51,7 @@ class CmdDeleteItemExecData; class CmdDeleteItemExec : public CmdExecuteCommand { public: - CmdDeleteItemExec(NotificationCenter* notificationCenter); + explicit CmdDeleteItemExec(NotificationCenter* notificationCenter); virtual ~CmdDeleteItemExec() {}; diff --git a/Fwk/AppFwk/cafCommand/defaultfeatures/cafCmdDeleteItemFeature.cpp b/Fwk/AppFwk/cafCommand/defaultfeatures/cafCmdDeleteItemFeature.cpp index cf26a3edf8..c3731af51e 100644 --- a/Fwk/AppFwk/cafCommand/defaultfeatures/cafCmdDeleteItemFeature.cpp +++ b/Fwk/AppFwk/cafCommand/defaultfeatures/cafCmdDeleteItemFeature.cpp @@ -89,7 +89,7 @@ CmdExecuteCommand* CmdDeleteItemFeature::createExecuteCommand() } // Did not find currently selected pdm object in the current list field - assert(indexAfter != -1); + CAF_ASSERT(indexAfter != -1); CmdDeleteItemExec* executeCmd = new CmdDeleteItemExec(SelectionManager::instance()->notificationCenter()); @@ -129,7 +129,7 @@ void CmdDeleteItemFeature::onActionTriggered(bool isChecked) } else { - assert(0); + CAF_ASSERT(0); } } } diff --git a/Fwk/AppFwk/cafProjectDataModel/cafFactory.h b/Fwk/AppFwk/cafProjectDataModel/cafFactory.h index a6c6218d59..94a87f979f 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafFactory.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafFactory.h @@ -37,7 +37,8 @@ #pragma once -#include +#include "cafAssert.h" + #include #include #include @@ -112,8 +113,8 @@ namespace caf } else { - assert(key != entryIt->first); // classNameKeyword has already been used - assert(false); // To be sure .. + CAF_ASSERT(key != entryIt->first); // classNameKeyword has already been used + CAF_ASSERT(false); // To be sure .. return false; } } diff --git a/Fwk/AppFwk/cafProjectDataModel/cafFixedArray.h b/Fwk/AppFwk/cafProjectDataModel/cafFixedArray.h index eab0ac9247..86ab9af79d 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafFixedArray.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafFixedArray.h @@ -37,7 +37,8 @@ #pragma once -#include "cvfAssert.h" +#include "cafAssert.h" + namespace caf { @@ -57,8 +58,8 @@ class FixedArray FixedArray& operator=(const T* ptr) { for (size_t i = 0; i < size ; ++i) m_array[i] = ptr[i]; return *this;} - template T& operator[](const IndexType& index) { CVF_TIGHT_ASSERT(static_cast(index) < size); return m_array[index]; } - template const T& operator[](const IndexType& index) const { CVF_TIGHT_ASSERT(static_cast(index) < size); return m_array[index]; } + template T& operator[](const IndexType& index) { CAF_ASSERT(static_cast(index) < size); return m_array[index]; } + template const T& operator[](const IndexType& index) const { CAF_ASSERT(static_cast(index) < size); return m_array[index]; } }; typedef FixedArray IntArray3; diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/CMakeLists.txt b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/CMakeLists.txt index ed65edd58e..1108fc67e8 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/CMakeLists.txt +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/CMakeLists.txt @@ -11,41 +11,45 @@ include_directories ( set( PROJECT_FILES - cafAppEnum.h - cafClassTypeName.h - cafPdmBase.h - cafPdmChildArrayField.h - cafPdmChildArrayField.inl - cafPdmChildArrayFieldHandle.cpp - cafPdmChildField.h - cafPdmChildField.inl - cafPdmDataValueField.h - cafPdmFieldCapability.h - cafPdmFieldHandle.cpp - cafPdmFieldHandle.h - cafPdmObjectCapability.h - cafPdmObjectHandle.cpp - cafPdmObjectHandle.h - cafPdmPointer.cpp - cafPdmPointer.h - cafPdmProxyValueField.h - cafPdmPtrArrayField.h - cafPdmPtrArrayField.inl - cafPdmPtrArrayFieldHandle.h - cafPdmPtrField.h - cafPdmPtrField.inl - cafPdmReferenceHelper.cpp - cafPdmReferenceHelper.h + cafAssert.h + cafAppEnum.h + cafClassTypeName.h + cafPdmBase.h + cafPdmChildArrayField.h + cafPdmChildArrayField.inl + cafPdmChildArrayFieldHandle.cpp + cafPdmChildField.h + cafPdmChildField.inl + cafPdmDataValueField.h + cafPdmFieldCapability.h + cafPdmFieldHandle.cpp + cafPdmFieldHandle.h + cafPdmObjectCapability.h + cafPdmObjectHandle.cpp + cafPdmObjectHandle.h + cafPdmPointer.cpp + cafPdmPointer.h + cafPdmProxyValueField.h + cafPdmPtrArrayField.h + cafPdmPtrArrayField.inl + cafPdmPtrArrayFieldHandle.h + cafPdmPtrField.h + cafPdmPtrField.inl + cafPdmReferenceHelper.cpp + cafPdmReferenceHelper.h cafPdmUiFieldHandleInterface.h - cafPdmValueField.h + cafPdmValueField.h cafNotificationCenter.cpp - cafNotificationCenter.h + cafNotificationCenter.h + + cafTristate.cpp + cafTristate.h ) add_library( ${PROJECT_NAME} - ${PROJECT_FILES} + ${PROJECT_FILES} ) -source_group("" FILES ${PROJECT_FILES}) \ No newline at end of file +source_group("" FILES ${PROJECT_FILES}) diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafAppEnum.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafAppEnum.h index 287e0e5b21..06c5f284ec 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafAppEnum.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafAppEnum.h @@ -194,7 +194,7 @@ class AppEnum } else { - // assert(m_mapping.size()); + // CAF_ASSERT(m_mapping.size()); return m_mapping[0].m_enumVal; } } diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafAssert.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafAssert.h new file mode 100644 index 0000000000..440497aed4 --- /dev/null +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafAssert.h @@ -0,0 +1,15 @@ + +#pragma once + +#include + +#define CAF_ASSERT(expr) \ + do \ + { \ + if(!(expr)) \ + { \ + std::cout << __FILE__ << ":" << __LINE__ << ": CAF_ASSERT(" \ + << #expr << ") failed" << std::endl; \ + std::abort(); \ + } \ + } while(false) diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafNotificationCenter.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafNotificationCenter.cpp index 0ba8c85e64..6789e4cbdb 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafNotificationCenter.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafNotificationCenter.cpp @@ -18,9 +18,10 @@ #include "cafNotificationCenter.h" +#include "cafAssert.h" + #include -#include #include @@ -42,7 +43,7 @@ NotificationCenter::NotificationCenter() //-------------------------------------------------------------------------------------------------- NotificationCenter::~NotificationCenter() { - assert(m_observers.size() == 0); + CAF_ASSERT(m_observers.size() == 0); } @@ -78,7 +79,7 @@ void NotificationCenter::removeObserver(DataModelObserver* observer) //-------------------------------------------------------------------------------------------------- void NotificationCenter::notifyObserversOfDataChange(caf::PdmObjectHandle* itemThatChanged) { - assert(itemThatChanged); + CAF_ASSERT(itemThatChanged); foreach(DataModelObserver* o, m_observers) { diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmChildArrayField.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmChildArrayField.h index 100cfcf48f..665c6a60c0 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmChildArrayField.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmChildArrayField.h @@ -1,10 +1,11 @@ #pragma once +#include "cafPdmPtrArrayFieldHandle.h" + +#include "cafAssert.h" #include "cafPdmFieldHandle.h" #include "cafPdmPointer.h" -#include -#include "cafPdmPtrArrayFieldHandle.h" namespace caf { @@ -39,7 +40,7 @@ class PdmChildArrayField : public PdmFieldHandle public: PdmChildArrayField() { - bool doNotUsePdmPointersFieldForAnythingButPointersToPdmObject = false; assert(doNotUsePdmPointersFieldForAnythingButPointersToPdmObject); + bool doNotUsePdmPointersFieldForAnythingButPointersToPdmObject = false; CAF_ASSERT(doNotUsePdmPointersFieldForAnythingButPointersToPdmObject); } }; diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmChildArrayField.inl b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmChildArrayField.inl index 15013bc5b3..a04bb162d0 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmChildArrayField.inl +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmChildArrayField.inl @@ -15,14 +15,7 @@ namespace caf template PdmChildArrayField::~PdmChildArrayField() { -#ifdef _DEBUG - for (size_t index = 0; index < m_pointers.size(); ++index) - { - assert(m_pointers.at(index).isNull()); - } -#endif - - this->removeThisAsParentField(); + deleteAllChildObjects(); } //-------------------------------------------------------------------------------------------------- @@ -40,7 +33,7 @@ DataType* PdmChildArrayField::operator[](size_t index) const template void PdmChildArrayField::push_back(DataType* pointer) { - assert(isInitializedByInitFieldMacro()); + CAF_ASSERT(isInitializedByInitFieldMacro()); m_pointers.push_back(pointer); if (pointer) pointer->setAsParentField(this); @@ -53,7 +46,7 @@ void PdmChildArrayField::push_back(DataType* pointer) template void PdmChildArrayField::set(size_t index, DataType* pointer) { - assert(isInitializedByInitFieldMacro()); + CAF_ASSERT(isInitializedByInitFieldMacro()); if (m_pointers[index]) m_pointers[index]->removeAsParentField(this); m_pointers[index] = pointer; @@ -67,7 +60,7 @@ void PdmChildArrayField::set(size_t index, DataType* pointer) template void PdmChildArrayField::insert(size_t index, DataType* pointer) { - assert(isInitializedByInitFieldMacro()); + CAF_ASSERT(isInitializedByInitFieldMacro()); m_pointers.insert(m_pointers.begin()+index, pointer); @@ -82,7 +75,7 @@ void PdmChildArrayField::insert(size_t index, DataType* pointer) template void PdmChildArrayField::insert(size_t index, const std::vector >& objects) { - assert(isInitializedByInitFieldMacro()); + CAF_ASSERT(isInitializedByInitFieldMacro()); m_pointers.insert(m_pointers.begin()+index, objects.begin(), objects.end()); @@ -122,7 +115,7 @@ size_t PdmChildArrayField::count(const DataType* pointer) const template void PdmChildArrayField::clear() { - assert(isInitializedByInitFieldMacro()); + CAF_ASSERT(isInitializedByInitFieldMacro()); this->removeThisAsParentField(); m_pointers.clear(); @@ -134,7 +127,7 @@ void PdmChildArrayField::clear() template void PdmChildArrayField::deleteAllChildObjects() { - assert(isInitializedByInitFieldMacro()); + CAF_ASSERT(isInitializedByInitFieldMacro()); size_t index; for (index = 0; index < m_pointers.size(); ++index) @@ -153,7 +146,7 @@ void PdmChildArrayField::deleteAllChildObjects() template void PdmChildArrayField::erase(size_t index) { - assert(isInitializedByInitFieldMacro()); + CAF_ASSERT(isInitializedByInitFieldMacro()); if (m_pointers[index].rawPtr()) { @@ -188,7 +181,7 @@ size_t PdmChildArrayField::index(DataType* pointer) template void PdmChildArrayField::removeChildObject(PdmObjectHandle* object) { - assert(isInitializedByInitFieldMacro()); + CAF_ASSERT(isInitializedByInitFieldMacro()); std::vector< PdmPointer > tempPointers; @@ -231,7 +224,7 @@ void PdmChildArrayField::childObjects(std::vector* template void PdmChildArrayField::insertAt(int indexAfter, PdmObjectHandle* obj) { - assert(isInitializedByInitFieldMacro()); + CAF_ASSERT(isInitializedByInitFieldMacro()); // This method should assert if obj to insert is not castable to the container type, but since this // is a virtual method, its implementation is always created and that makes a dyn_cast add the need for diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmChildField.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmChildField.h index 6a1ec04317..183e1c2771 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmChildField.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmChildField.h @@ -1,9 +1,9 @@ #pragma once -#include "cafPdmPointer.h" - #include "cafPdmFieldHandle.h" -#include + +#include "cafAssert.h" +#include "cafPdmPointer.h" namespace caf { @@ -22,7 +22,7 @@ class PdmChildField : public PdmFieldHandle public: PdmChildField() { - bool doNotUsePdmPtrFieldForAnythingButPointersToPdmObject = false; assert(doNotUsePdmPtrFieldForAnythingButPointersToPdmObject); + bool doNotUsePdmPtrFieldForAnythingButPointersToPdmObject = false; CAF_ASSERT(doNotUsePdmPtrFieldForAnythingButPointersToPdmObject); } }; diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmChildField.inl b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmChildField.inl index f761595d2c..d87924431e 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmChildField.inl +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmChildField.inl @@ -1,7 +1,7 @@ #include #include -#include + namespace caf { @@ -11,7 +11,7 @@ namespace caf template void caf::PdmChildField::childObjects(std::vector* objects) { - assert(objects); + CAF_ASSERT(objects); PdmObjectHandle* obj = m_fieldValue.rawPtr(); if (obj) { @@ -52,12 +52,7 @@ caf::PdmChildField::PdmChildField(const DataTypePtr& fieldValue) template caf::PdmChildField::~PdmChildField() { -#ifdef _DEBUG - assert(m_fieldValue.isNull()); -#endif - - if (!m_fieldValue.isNull()) m_fieldValue.rawPtr()->removeAsParentField(this); - m_fieldValue.setRawPtr(NULL); + delete m_fieldValue.rawPtr(); } @@ -67,7 +62,7 @@ caf::PdmChildField::~PdmChildField() template caf::PdmChildField& PdmChildField::operator=(const DataTypePtr & fieldValue) { - assert(isInitializedByInitFieldMacro()); + CAF_ASSERT(isInitializedByInitFieldMacro()); if (m_fieldValue) m_fieldValue->removeAsParentField(this); m_fieldValue = fieldValue; diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmCore_UnitTests/cafPdmChildArrayFieldHandleTest.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmCore_UnitTests/cafPdmChildArrayFieldHandleTest.cpp index 93465d7fad..e5e4046532 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmCore_UnitTests/cafPdmChildArrayFieldHandleTest.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmCore_UnitTests/cafPdmChildArrayFieldHandleTest.cpp @@ -58,7 +58,8 @@ class ContainerObj : public caf::PdmObjectHandle public: ContainerObj() : PdmObjectHandle() { - this->addField(&derivedObjs, "derivedObjs"); + this->addField(&derivedObjs, "derivedObjs"); + this->addField(&derivedOtherObjs, "derivedOtherObjs"); } ~ContainerObj() @@ -96,8 +97,7 @@ TEST(ChildArrayFieldHandle, DerivedObjects) containerObj->derivedObjs.push_back(s1); containerObj->derivedObjs.push_back(s2); - SimpleObjDerived* myObj = NULL; - myObj = findObjectById(containerObj->derivedObjs.begin(), containerObj->derivedObjs.end(), 2); + SimpleObjDerived* myObj = findObjectById(containerObj->derivedObjs.begin(), containerObj->derivedObjs.end(), 2); EXPECT_EQ(s2, myObj); myObj = findObjectById(containerObj->derivedObjs.begin(), containerObj->derivedObjs.end(), -1); @@ -120,8 +120,7 @@ TEST(ChildArrayFieldHandle, DerivedOtherObjects) containerObj->derivedOtherObjs.push_back(s1); containerObj->derivedOtherObjs.push_back(s2); - SimpleObjDerivedOther* myObj = NULL; - myObj = findObjectById(containerObj->derivedOtherObjs.begin(), containerObj->derivedOtherObjs.end(), s2Id); + SimpleObjDerivedOther* myObj = findObjectById(containerObj->derivedOtherObjs.begin(), containerObj->derivedOtherObjs.end(), s2Id); EXPECT_EQ(s2, myObj); myObj = findObjectById(containerObj->derivedOtherObjs.begin(), containerObj->derivedOtherObjs.end(), -1); diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmCore_UnitTests/cafPdmCoreBasicTest.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmCore_UnitTests/cafPdmCoreBasicTest.cpp index 0c4dddf18c..b70ae0c460 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmCore_UnitTests/cafPdmCoreBasicTest.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmCore_UnitTests/cafPdmCoreBasicTest.cpp @@ -209,10 +209,15 @@ TEST(BaseTest, TestPdmValueFieldInterface) //-------------------------------------------------------------------------------------------------- TEST(BaseTest, NormalPdmField) { - class A + class A : public caf::PdmObjectHandle { public: - A(const std::vector& testValue) : field2(testValue), field3(field2) {} + explicit A(const std::vector& testValue) : field2(testValue), field3(field2) + { + this->addField(&field1, "field1"); + this->addField(&field2, "field2"); + this->addField(&field3, "field3"); + } caf::PdmDataValueField > field1; caf::PdmDataValueField > field2; @@ -432,9 +437,15 @@ TEST(BaseTest, PdmChildArrayFieldHandle) TEST(BaseTest, PdmChildField) { - class A { + class A : public caf::PdmObjectHandle + { public: - A(Child* a) :field2(a) {} + explicit A(Child* a) + : field2(a), + b(0) + { + this->addField(&field2, "field2"); + } ~A() { @@ -446,7 +457,6 @@ TEST(BaseTest, PdmChildField) }; { - Parent* parent = new Parent; Child* testValue = new Child; // Constructor assignment @@ -455,7 +465,7 @@ TEST(BaseTest, PdmChildField) // Guarded delete testValue; - EXPECT_EQ((Child*)0, a.field2); + EXPECT_EQ(static_cast(nullptr), a.field2); } { A a(NULL); @@ -483,13 +493,11 @@ TEST(BaseTest, PdmPtrField) InheritedDemoObj* ihd2 = new InheritedDemoObj; // Direct access - EXPECT_EQ((InheritedDemoObj*)NULL, ihd1->m_ptrField); - - InheritedDemoObj* accessedIhd = NULL; + EXPECT_EQ(static_cast(nullptr), ihd1->m_ptrField); // Assignment ihd1->m_ptrField = ihd1; - accessedIhd = ihd1->m_ptrField; + InheritedDemoObj* accessedIhd = ihd1->m_ptrField; EXPECT_EQ(ihd1, accessedIhd); ihd1->m_ptrField = caf::PdmPointer(ihd2); diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmCore_UnitTests/cafPdmReferenceHelperTest.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmCore_UnitTests/cafPdmReferenceHelperTest.cpp index f8bed80aa1..8f7826653f 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmCore_UnitTests/cafPdmReferenceHelperTest.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmCore_UnitTests/cafPdmReferenceHelperTest.cpp @@ -16,7 +16,8 @@ class SimpleObj : public caf::PdmObjectHandle { public: - SimpleObj() : PdmObjectHandle() + SimpleObj() : PdmObjectHandle(), + m_doubleMember(0.0) { this->addField(&m_position, "m_position"); this->addField(&m_dir, "m_dir"); diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmDataValueField.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmDataValueField.h index 7fd6955496..4529e4aed5 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmDataValueField.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmDataValueField.h @@ -39,13 +39,13 @@ #include "cafPdmValueField.h" +#include "cafAssert.h" #include "cafInternalPdmValueFieldSpecializations.h" #include "cafPdmUiFieldHandleInterface.h" #include #include -#include namespace caf @@ -70,19 +70,19 @@ class PdmDataValueField : public PdmValueField // Assignment - PdmDataValueField& operator= (const PdmDataValueField& other) { assert(isInitializedByInitFieldMacro()); m_fieldValue = other.m_fieldValue; return *this; } - PdmDataValueField& operator= (const DataType& fieldValue) { assert(isInitializedByInitFieldMacro()); m_fieldValue = fieldValue; return *this; } + PdmDataValueField& operator= (const PdmDataValueField& other) { CAF_ASSERT(isInitializedByInitFieldMacro()); m_fieldValue = other.m_fieldValue; return *this; } + PdmDataValueField& operator= (const DataType& fieldValue) { CAF_ASSERT(isInitializedByInitFieldMacro()); m_fieldValue = fieldValue; return *this; } // Basic access DataType value() const { return m_fieldValue; } - void setValue(const DataType& fieldValue) { assert(isInitializedByInitFieldMacro()); m_fieldValue = fieldValue; } + void setValue(const DataType& fieldValue) { CAF_ASSERT(isInitializedByInitFieldMacro()); m_fieldValue = fieldValue; } void setValueWithFieldChanged(const DataType& fieldValue); // Implementation of PdmValueField interface - virtual QVariant toQVariant() const { assert(isInitializedByInitFieldMacro()); return PdmValueFieldSpecialization::convert(m_fieldValue); } - virtual void setFromQVariant(const QVariant& variant) { assert(isInitializedByInitFieldMacro()); PdmValueFieldSpecialization::setFromVariant(variant, m_fieldValue); } + virtual QVariant toQVariant() const { CAF_ASSERT(isInitializedByInitFieldMacro()); return PdmValueFieldSpecialization::convert(m_fieldValue); } + virtual void setFromQVariant(const QVariant& variant) { CAF_ASSERT(isInitializedByInitFieldMacro()); PdmValueFieldSpecialization::setFromVariant(variant, m_fieldValue); } virtual bool isReadOnly() const { return false; } // Access operators @@ -117,7 +117,7 @@ class PdmDataValueField : public PdmValueField template void caf::PdmDataValueField::setValueWithFieldChanged(const DataType& fieldValue) { - assert(isInitializedByInitFieldMacro()); + CAF_ASSERT(isInitializedByInitFieldMacro()); PdmUiFieldHandleInterface* uiFieldHandleInterface = capability(); if (uiFieldHandleInterface) diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmFieldHandle.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmFieldHandle.cpp index 55c0f727d8..1d7de210f2 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmFieldHandle.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmFieldHandle.cpp @@ -2,7 +2,6 @@ #include "cafPdmFieldCapability.h" -#include namespace caf { diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmObjectHandle.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmObjectHandle.cpp index 2124871255..6c859f530a 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmObjectHandle.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmObjectHandle.cpp @@ -1,11 +1,10 @@ #include "cafPdmObjectHandle.h" +#include "cafAssert.h" #include "cafPdmFieldHandle.h" #include "cafPdmObjectCapability.h" -#include - namespace caf { @@ -42,7 +41,7 @@ void PdmObjectHandle::fields(std::vector& fields) const //-------------------------------------------------------------------------------------------------- void PdmObjectHandle::setAsParentField(PdmFieldHandle* parentField) { - assert(m_parentField == NULL); + CAF_ASSERT(m_parentField == NULL); m_parentField = parentField; } @@ -52,7 +51,7 @@ void PdmObjectHandle::setAsParentField(PdmFieldHandle* parentField) //-------------------------------------------------------------------------------------------------- void PdmObjectHandle::removeAsParentField(PdmFieldHandle* parentField) { - assert(m_parentField == parentField); + CAF_ASSERT(m_parentField == parentField); m_parentField = NULL; } @@ -110,8 +109,8 @@ void PdmObjectHandle::addField(PdmFieldHandle* field, const QString& keyword) { field->m_ownerObject = this; - assert(!keyword.isEmpty()); - assert(this->findField(keyword) == NULL); + CAF_ASSERT(!keyword.isEmpty()); + CAF_ASSERT(this->findField(keyword) == NULL); field->setKeyword(keyword); m_fields.push_back(field); @@ -121,7 +120,7 @@ void PdmObjectHandle::addField(PdmFieldHandle* field, const QString& keyword) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -PdmFieldHandle* PdmObjectHandle::findField(const QString& keyword) +PdmFieldHandle* PdmObjectHandle::findField(const QString& keyword) const { std::vector fields; this->fields(fields); diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmObjectHandle.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmObjectHandle.h index 56224aff34..aaae53e0f3 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmObjectHandle.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmObjectHandle.h @@ -1,11 +1,12 @@ #pragma once +#include "cafAssert.h" #include "cafPdmBase.h" class QString; -#include #include +#include namespace caf @@ -22,12 +23,12 @@ class PdmXmlObjectHandle; class PdmObjectHandle { public: - PdmObjectHandle() { m_parentField = NULL; } + PdmObjectHandle() { m_parentField = nullptr; } virtual ~PdmObjectHandle(); /// The registered fields contained in this PdmObject. void fields(std::vector& fields) const; - PdmFieldHandle* findField(const QString& keyword); + PdmFieldHandle* findField(const QString& keyword) const; /// The field referencing this object as a child PdmFieldHandle* parentField() const; @@ -37,6 +38,10 @@ class PdmObjectHandle template void firstAncestorOrThisOfType(T*& ancestor) const; + /// Calls firstAncestorOrThisOfType, and asserts that a valid object is found + template + void firstAncestorOrThisOfTypeAsserted(T*& ancestor) const; + /// Traverses all children recursively to find objects of the requested type. This object is also /// included if it is of the requested type. template @@ -60,7 +65,7 @@ class PdmObjectHandle CapabilityType* capability = dynamic_cast(m_capabilities[i].first); if (capability) return capability; } - return NULL; + return nullptr; } PdmUiObjectHandle* uiCapability() const; // Implementation is in cafPdmUiObjectHandle.cpp @@ -115,7 +120,7 @@ namespace caf template void PdmObjectHandle::firstAncestorOrThisOfType(T*& ancestor) const { - ancestor = NULL; + ancestor = nullptr; // Check if this matches the type @@ -128,11 +133,11 @@ void PdmObjectHandle::firstAncestorOrThisOfType(T*& ancestor) const // Search parents for first type match - PdmObjectHandle* parent = NULL; + PdmObjectHandle* parent = nullptr; PdmFieldHandle* parentField = this->parentField(); if (parentField) parent = parentField->ownerObject(); - while (parent != NULL) + while (parent != nullptr) { T* objectOfType = dynamic_cast(parent); if (objectOfType) @@ -151,11 +156,22 @@ void PdmObjectHandle::firstAncestorOrThisOfType(T*& ancestor) const } else { - parent = NULL; + parent = nullptr; } } } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +template +void PdmObjectHandle::firstAncestorOrThisOfTypeAsserted(T*& ancestor) const +{ + firstAncestorOrThisOfType(ancestor); + + CAF_ASSERT(ancestor); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmProxyValueField.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmProxyValueField.h index 2943025d3d..0927ccd91b 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmProxyValueField.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmProxyValueField.h @@ -1,14 +1,13 @@ #pragma once +#include "cafAssert.h" +#include "cafInternalPdmValueFieldSpecializations.h" #include "cafPdmFieldHandle.h" #include "cafPdmPointer.h" - #include "cafPdmValueField.h" -#include "cafInternalPdmValueFieldSpecializations.h" #include -#include namespace caf { @@ -32,8 +31,8 @@ class PdmProxyValueField : public PdmValueField // Basic access - void setValue(const DataType& fieldValue) { assert(isInitializedByInitFieldMacro()); if (m_valueSetter) m_valueSetter->setValue(fieldValue); } - DataType value() const { assert(m_valueGetter); return m_valueGetter->getValue(); } + void setValue(const DataType& fieldValue) { CAF_ASSERT(isInitializedByInitFieldMacro()); if (m_valueSetter) m_valueSetter->setValue(fieldValue); } + DataType value() const { CAF_ASSERT(m_valueGetter); return m_valueGetter->getValue(); } // Implementation of PdmValueField interface diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmPtrArrayField.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmPtrArrayField.h index f376f333ae..e9ef9f9f5e 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmPtrArrayField.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmPtrArrayField.h @@ -2,7 +2,6 @@ #include "cafPdmFieldHandle.h" #include "cafPdmPointer.h" -#include #include "cafPdmPtrArrayFieldHandle.h" namespace caf @@ -23,7 +22,7 @@ class PdmPtrArrayField : public PdmFieldHandle public: PdmPtrArrayField() { - bool doNotUsePdmPtrArrayFieldForAnythingButPointersToPdmObject = false; assert(doNotUsePdmPtrArrayFieldForAnythingButPointersToPdmObject); + bool doNotUsePdmPtrArrayFieldForAnythingButPointersToPdmObject = false; CAF_ASSERT(doNotUsePdmPtrArrayFieldForAnythingButPointersToPdmObject); } }; diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmPtrArrayField.inl b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmPtrArrayField.inl index ab7d9d7ada..39bad04251 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmPtrArrayField.inl +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmPtrArrayField.inl @@ -54,7 +54,7 @@ DataType* PdmPtrArrayField::operator[](size_t index) const template void PdmPtrArrayField::push_back(DataType* pointer) { - assert(isInitializedByInitFieldMacro()); + CAF_ASSERT(isInitializedByInitFieldMacro()); m_pointers.push_back(pointer); if(pointer) pointer->addReferencingPtrField(this); @@ -67,7 +67,7 @@ void PdmPtrArrayField::push_back(DataType* pointer) template void PdmPtrArrayField::set(size_t index, DataType* pointer) { - assert(isInitializedByInitFieldMacro()); + CAF_ASSERT(isInitializedByInitFieldMacro()); if(m_pointers[index]) m_pointers[index]->removeReferencingPtrField(this); m_pointers[index] = pointer; @@ -81,7 +81,7 @@ void PdmPtrArrayField::set(size_t index, DataType* pointer) template void PdmPtrArrayField::insert(size_t index, DataType* pointer) { - assert(isInitializedByInitFieldMacro()); + CAF_ASSERT(isInitializedByInitFieldMacro()); m_pointers.insert(m_pointers.begin()+index, pointer); @@ -96,7 +96,7 @@ void PdmPtrArrayField::insert(size_t index, DataType* pointer) template void PdmPtrArrayField::insert(size_t index, const std::vector >& objects) { - assert(isInitializedByInitFieldMacro()); + CAF_ASSERT(isInitializedByInitFieldMacro()); m_pointers.insert(m_pointers.begin()+index, objects.begin(), objects.end()); @@ -136,7 +136,7 @@ size_t PdmPtrArrayField::count(const DataType* pointer) const template void PdmPtrArrayField::clear() { - assert(isInitializedByInitFieldMacro()); + CAF_ASSERT(isInitializedByInitFieldMacro()); this->removeThisAsReferencingPtrField(); m_pointers.clear(); @@ -151,7 +151,7 @@ void PdmPtrArrayField::clear() template void PdmPtrArrayField::erase(size_t index) { - assert(isInitializedByInitFieldMacro()); + CAF_ASSERT(isInitializedByInitFieldMacro()); if(m_pointers[index].rawPtr()) { @@ -186,7 +186,7 @@ size_t PdmPtrArrayField::index(DataType* pointer) template void PdmPtrArrayField::removePtr(PdmObjectHandle* object) { - assert(isInitializedByInitFieldMacro()); + CAF_ASSERT(isInitializedByInitFieldMacro()); std::vector< PdmPointer > tempPointers; @@ -229,9 +229,9 @@ void PdmPtrArrayField::ptrReferencedObjects(std::vector void PdmPtrArrayField::insertAt(int indexAfter, PdmObjectHandle* obj) { - assert(isInitializedByInitFieldMacro()); + CAF_ASSERT(isInitializedByInitFieldMacro()); - // This method should assert if obj to insert is not castable to the container type, but since this + // This method should CAF_ASSERT( if obj to insert is not castable to the container type, but since this // is a virtual method, its implementation is always created and that makes a dyn_cast add the need for // #include of the header file "everywhere" typename std::vector< PdmPointer >::iterator it; diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmPtrField.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmPtrField.h index 5d21371460..f8b86a2531 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmPtrField.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmPtrField.h @@ -1,9 +1,9 @@ #pragma once +#include "cafAssert.h" #include "cafPdmPointer.h" #include "cafPdmFieldHandle.h" -#include namespace caf { @@ -26,7 +26,7 @@ class PdmPtrField : public PdmFieldHandle public: PdmPtrField() { - bool doNotUsePdmPtrFieldForAnythingButPointersToPdmObject = false; assert(doNotUsePdmPtrFieldForAnythingButPointersToPdmObject); + bool doNotUsePdmPtrFieldForAnythingButPointersToPdmObject = false; CAF_ASSERT(doNotUsePdmPtrFieldForAnythingButPointersToPdmObject); } }; diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmPtrField.inl b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmPtrField.inl index 031aaf6b98..d02373d73c 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmPtrField.inl +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmPtrField.inl @@ -29,7 +29,7 @@ caf::PdmPtrField::~PdmPtrField() template void PdmPtrField::setValue(const DataTypePtr& fieldValue) { - assert(isInitializedByInitFieldMacro()); + CAF_ASSERT(isInitializedByInitFieldMacro()); if (m_fieldValue) m_fieldValue->removeReferencingPtrField(this); m_fieldValue = fieldValue; @@ -42,7 +42,7 @@ void PdmPtrField::setValue(const DataTypePtr& fieldValue) template void PdmPtrField::setRawPtr(PdmObjectHandle* obj) { - assert(isInitializedByInitFieldMacro()); + CAF_ASSERT(isInitializedByInitFieldMacro()); if (m_fieldValue.notNull()) m_fieldValue.rawPtr()->removeReferencingPtrField(this); m_fieldValue.setRawPtr(obj); @@ -56,7 +56,7 @@ void PdmPtrField::setRawPtr(PdmObjectHandle* obj) template caf::PdmPtrField& PdmPtrField::operator=(const DataTypePtr & fieldValue) { - assert(isInitializedByInitFieldMacro()); + CAF_ASSERT(isInitializedByInitFieldMacro()); if (m_fieldValue) m_fieldValue->removeReferencingPtrField(this); m_fieldValue = fieldValue; @@ -72,7 +72,7 @@ caf::PdmPtrField& PdmPtrField::operator=(const DataTypePtr template caf::PdmPtrField& PdmPtrField::operator=(const FieldDataType & fieldValue) { - assert(isInitializedByInitFieldMacro()); + CAF_ASSERT(isInitializedByInitFieldMacro()); if (m_fieldValue) m_fieldValue->removeReferencingPtrField(this); m_fieldValue = fieldValue; diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmReferenceHelper.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmReferenceHelper.cpp index a2e4e7ed7d..b62453472e 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmReferenceHelper.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmReferenceHelper.cpp @@ -37,11 +37,11 @@ #include "cafPdmReferenceHelper.h" +#include "cafAssert.h" #include "cafPdmFieldHandle.h" #include -#include #include @@ -323,8 +323,8 @@ PdmObjectHandle* PdmReferenceHelper::objectFromFieldReference(PdmFieldHandle* fr QStringList decodedReference = reference.split(QRegExp("\\s+"), QString::SkipEmptyParts); PdmObjectHandle* lastCommonAnchestor = fromField->ownerObject(); - assert(lastCommonAnchestor); - assert(decodedReference.size()); + CAF_ASSERT(lastCommonAnchestor); + CAF_ASSERT(decodedReference.size()); while (decodedReference.front() == "..") { @@ -336,7 +336,7 @@ PdmObjectHandle* PdmReferenceHelper::objectFromFieldReference(PdmFieldHandle* fr } lastCommonAnchestor = parentField->ownerObject(); - assert(lastCommonAnchestor); + CAF_ASSERT(lastCommonAnchestor); decodedReference.pop_front(); } diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmValueField.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmValueField.h index 1de3c13714..6ab7c97a6e 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmValueField.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmValueField.h @@ -57,7 +57,7 @@ class PdmValueField : public PdmFieldHandle // class PdmProxyValueField : public PdmValueField // { -// DataType value() const { assert(m_valueGetter); return m_valueGetter->getValue(); } +// DataType value() const { CAF_ASSERT(m_valueGetter); return m_valueGetter->getValue(); } // void setValue(const DataType& fieldValue) { if (m_valueSetter) m_valueSetter->setValue(fieldValue); } // } diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafTristate.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafTristate.cpp new file mode 100644 index 0000000000..a392d6627c --- /dev/null +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafTristate.cpp @@ -0,0 +1,150 @@ +#include "cafTristate.h" + +#include + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +caf::Tristate::Tristate() + : m_state(State::False) +{ +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void caf::Tristate::operator=(const State& state) +{ + m_state = state; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool caf::Tristate::operator==(const Tristate& other) const +{ + return m_state == other.m_state; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool caf::Tristate::operator==(State state) const +{ + return m_state == state; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool caf::Tristate::operator!=(const Tristate& other) const +{ + return !(m_state == other.m_state); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +caf::Tristate::State caf::Tristate::state() const +{ + return m_state; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool caf::Tristate::isTrue() const +{ + return m_state == State::True; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool caf::Tristate::isPartiallyTrue() const +{ + return m_state == State::PartiallyTrue; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool caf::Tristate::isFalse() const +{ + return m_state == State::False; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString caf::Tristate::text() const +{ + QString txt; + + switch (m_state) + { + case Tristate::State::False: + txt = "False"; + break; + case Tristate::State::PartiallyTrue: + txt = "PartiallyTrue"; + break; + case Tristate::State::True: + txt = "True"; + break; + default: + break; + } + + return txt; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void caf::Tristate::setFromText(const QString& valueText) +{ + QString lowerCase = valueText.toLower(); + + if (lowerCase == "false") + { + m_state = State::False; + } + else if (lowerCase == "partiallytrue") + { + m_state = State::PartiallyTrue; + } + else if (lowerCase == "true") + { + m_state = State::True; + } +} + + + + + + + + + + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void operator >> (QTextStream& str, caf::Tristate& triplet) +{ + QString text; + str >> text; + triplet.setFromText(text); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void operator << (QTextStream& str, const caf::Tristate& triplet) +{ + str << triplet.text(); +} diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafTristate.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafTristate.h new file mode 100644 index 0000000000..6693ec32f5 --- /dev/null +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafTristate.h @@ -0,0 +1,52 @@ + + +#pragma once + +#include + +class QTextStream; + + +namespace caf +{ + +//================================================================================================== +//================================================================================================== +class Tristate +{ +public: + enum class State {False, PartiallyTrue, True}; + +public: + Tristate(); + + void operator=(const State& state); + + bool operator==(const Tristate& other) const; + bool operator==(State state) const; + bool operator!=(const Tristate& other) const; + + State state() const; + + bool isTrue() const; + bool isPartiallyTrue() const; + bool isFalse() const; + + QString text() const; + void setFromText(const QString& valueText); + +protected: + State m_state; +}; + + +} // end namespace caf + + +//================================================================================================== +// Overload of QTextStream for caf::Triplet +//================================================================================================== +void operator >> (QTextStream& str, caf::Tristate& triplet); +void operator << (QTextStream& str, const caf::Tristate& triplet); + +Q_DECLARE_METATYPE(caf::Tristate); diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmObject.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmObject.h index 6aff3e09df..a3618b4c85 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmObject.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmObject.h @@ -44,7 +44,6 @@ #include "cafPdmPointer.h" #include -#include class QXmlStreamReader; class QXmlStreamWriter; @@ -97,6 +96,8 @@ class PdmObjectCapability; #define CAF_PDM_InitField(field, keyword, default, uiName, iconResourceName, toolTip, whatsThis) \ { \ + CAF_PDM_VERIFY_XML_KEYWORD(keyword) \ + \ static bool chekingThePresenceOfHeaderAndSourceInitMacros = \ Error_You_forgot_to_add_the_macro_CAF_PDM_XML_HEADER_INIT_and_or_CAF_PDM_XML_SOURCE_INIT_to_your_cpp_file_for_this_class(); \ this->isInheritedFromPdmUiObject(); \ @@ -113,6 +114,8 @@ class PdmObjectCapability; #define CAF_PDM_InitFieldNoDefault(field, keyword, uiName, iconResourceName, toolTip, whatsThis) \ { \ + CAF_PDM_VERIFY_XML_KEYWORD(keyword) \ + \ static bool chekingThePresenceOfHeaderAndSourceInitMacros = \ Error_You_forgot_to_add_the_macro_CAF_PDM_XML_HEADER_INIT_and_or_CAF_PDM_XML_SOURCE_INIT_to_your_cpp_file_for_this_class(); \ this->isInheritedFromPdmUiObject(); \ diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmObjectGroup.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmObjectGroup.h index d7e19fc3cc..067e797f28 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmObjectGroup.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmObjectGroup.h @@ -58,7 +58,7 @@ void PdmObjectGroup::createCopyByType(std::vector >* copyOfTypedOb PdmObjectHandle* objectCopy = PdmXmlObjectHandle::readUnknownObjectFromXmlString(xml, PdmDefaultObjectFactory::instance()); T* typedObject = dynamic_cast(objectCopy); - assert(typedObject); + CAF_ASSERT(typedObject); copyOfTypedObjects->push_back(typedObject); } diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/CMakeLists.txt b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/CMakeLists.txt index 49361d5ef5..bf64072d00 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/CMakeLists.txt +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/CMakeLists.txt @@ -28,6 +28,8 @@ set( PROJECT_FILES cafPdmUiFieldSpecialization.h cafPdmUiItem.cpp cafPdmUiItem.h + cafPdmUiModelChangeDetector.cpp + cafPdmUiModelChangeDetector.h cafPdmUiObjectEditorHandle.cpp cafPdmUiObjectEditorHandle.h cafPdmUiObjectHandle.cpp diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafInternalPdmUiFieldCapability.inl b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafInternalPdmUiFieldCapability.inl index 145fc9f703..5c84bc6d4d 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafInternalPdmUiFieldCapability.inl +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafInternalPdmUiFieldCapability.inl @@ -27,7 +27,7 @@ void caf::PdmFieldUiCap::setValueFromUiEditor(const QVariant& uiValue if (uiValue.type() == QVariant::UInt) { uint optionIndex = uiValue.toUInt(); - assert(optionIndex < static_cast(m_optionEntryCache.size())); + CAF_ASSERT(optionIndex < static_cast(m_optionEntryCache.size())); QVariant optionVariantValue = m_optionEntryCache[optionIndex].value; @@ -66,7 +66,7 @@ void caf::PdmFieldUiCap::setValueFromUiEditor(const QVariant& uiValue { // We are not getting indexes as expected from the UI. For now assert, to catch this condition // but it should possibly be handled as setting the values explicitly. The code for that is below the assert - assert(false); + CAF_ASSERT(false); typename FieldType::FieldDataType value; PdmUiFieldSpecialization::setFromVariant(uiValue, value); m_field->setValue(value); @@ -79,7 +79,7 @@ void caf::PdmFieldUiCap::setValueFromUiEditor(const QVariant& uiValue { // We are not getting indexes as expected from the UI. For now assert, to catch this condition // but it should possibly be handled as setting the values explicitly. The code for that is below the assert - assert(false); + CAF_ASSERT(false); typename FieldType::FieldDataType value; PdmUiFieldSpecialization::setFromVariant(uiValue, value); m_field->setValue(value); @@ -128,7 +128,7 @@ QVariant caf::PdmFieldUiCap::uiValue() const { if (isAutoAddingOptionFromValue() && indexesToFoundOptions.size() != static_cast(uiBasedQVariant.toList().size())) { - assert(false); // Did not find all the field values among the options available, even though we should. + CAF_ASSERT(false); // Did not find all the field values among the options available, even though we should. // Reasons might be: // The "core" data type in the field is probably not supported by QVariant::toString() // You forgot to call valueOptions() before the call to uiValue(). @@ -149,7 +149,7 @@ QVariant caf::PdmFieldUiCap::uiValue() const else return QVariant(-1); // Return -1 if not found instead of assert. Should result in clearing the selection } - assert(false); + CAF_ASSERT(false); return uiBasedQVariant; } else diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiEditorHandle.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiEditorHandle.h index 5e699b152e..fd9842f6f2 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiEditorHandle.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiEditorHandle.h @@ -97,7 +97,7 @@ class PdmUiEditorHandle: public QObject class PdmUiProxyEditorHandle: public PdmUiEditorHandle { public: - PdmUiProxyEditorHandle(PdmUiEditorHandle* mainEditorHandle) : PdmUiEditorHandle() { m_mainEditorHandle = mainEditorHandle; } + explicit PdmUiProxyEditorHandle(PdmUiEditorHandle* mainEditorHandle) : PdmUiEditorHandle() { m_mainEditorHandle = mainEditorHandle; } virtual ~PdmUiProxyEditorHandle() {}; protected: // Interface to override: diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiFieldHandle.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiFieldHandle.cpp index 23387dbbb6..1f6686a5dd 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiFieldHandle.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiFieldHandle.cpp @@ -1,10 +1,10 @@ #include "cafPdmUiFieldHandle.h" -#include "cafPdmFieldHandle.h" +#include "cafAssert.h" +#include "cafPdmFieldHandle.h" +#include "cafPdmUiModelChangeDetector.h" #include "cafPdmUiObjectHandle.h" -#include - namespace caf { @@ -27,7 +27,7 @@ void PdmUiFieldHandle::notifyFieldChanged(const QVariant& oldFieldValue, const Q if (oldFieldValue != newFieldValue) { PdmFieldHandle* fieldHandle = this->fieldHandle(); - assert(fieldHandle && fieldHandle->ownerObject()); + CAF_ASSERT(fieldHandle && fieldHandle->ownerObject()); PdmUiObjectHandle* uiObjHandle = uiObj(fieldHandle->ownerObject()); if (uiObjHandle) @@ -38,6 +38,8 @@ void PdmUiFieldHandle::notifyFieldChanged(const QVariant& oldFieldValue, const Q // Update field editors this->updateConnectedEditors(); + + PdmUiModelChangeDetector::instance()->setModelChanged(); } } @@ -47,7 +49,7 @@ void PdmUiFieldHandle::notifyFieldChanged(const QVariant& oldFieldValue, const Q PdmUiFieldHandle* PdmFieldHandle::uiCapability() { PdmUiFieldHandle* uiField = capability(); - assert(uiField); + CAF_ASSERT(uiField); return uiField; } diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiItem.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiItem.cpp index 55d76423a9..08c1915b26 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiItem.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiItem.cpp @@ -37,10 +37,21 @@ #include "cafPdmUiItem.h" #include "cafPdmUiEditorHandle.h" +#include "cafPdmPtrField.h" namespace caf { + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +PdmOptionItemInfo::PdmOptionItemInfo(QString anOptionUiText, caf::PdmObjectHandle* obj, bool anIsDimmed /*= false*/, QIcon anIcon /*= QIcon()*/) + : optionUiText(anOptionUiText), isDimmed(anIsDimmed), icon(anIcon) +{ + value = QVariant::fromValue(caf::PdmPointer(obj)); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -269,26 +280,28 @@ PdmUiItem::~PdmUiItem() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void PdmUiItem::updateUiIconFromState(bool active) +void PdmUiItem::updateUiIconFromState(bool isActive, QString uiConfigName) { - // Reset dynamic icon - this->setUiIcon(QIcon()); - // Get static one - QIcon icon = this->uiIcon(); + static const QString iconStorageConfigNamePostfix = "_Internally_StoredNormalIcon"; + const PdmUiItemInfo* conInfo = configInfo(uiConfigName + iconStorageConfigNamePostfix); + QIcon normalIcon; - // Get a pixmap, and modify it + if (conInfo) normalIcon = conInfo->m_icon; + else normalIcon = this->uiIcon(uiConfigName); - QPixmap icPixmap; - icPixmap = icon.pixmap(16, 16, QIcon::Normal); + this->setUiIcon(normalIcon, uiConfigName + iconStorageConfigNamePostfix); - if (!active) + if ( isActive ) { - QIcon temp(icPixmap); - icPixmap = temp.pixmap(16, 16, QIcon::Disabled); + this->setUiIcon(normalIcon, uiConfigName); + m_configItemInfos.erase(uiConfigName + iconStorageConfigNamePostfix); + } + else + { + QIcon disabledIcon(normalIcon.pixmap(16, 16, QIcon::Disabled)); + this->setUiIcon(disabledIcon, uiConfigName); + this->setUiIcon(normalIcon, uiConfigName + iconStorageConfigNamePostfix); } - - QIcon newIcon(icPixmap); - this->setUiIcon(newIcon); } } //End of namespace caf diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiItem.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiItem.h index da952663ab..64c12303ff 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiItem.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiItem.h @@ -90,6 +90,8 @@ class PdmOptionItemInfo : value(aValue), optionUiText(anOptionUiText), isDimmed(anIsDimmed), icon(anIcon) {} + PdmOptionItemInfo(QString anOptionUiText, caf::PdmObjectHandle* obj, bool anIsDimmed = false, QIcon anIcon = QIcon()); + QString optionUiText; bool isDimmed; QIcon icon; @@ -135,7 +137,7 @@ bool PdmOptionItemInfo::findValues(const QList& optionList, Q for (int i = 0; i < valuesSelectedInField.size(); ++i) { std::list >::iterator it; - for (it = optionVariantAndIndexPairs.begin(); it != optionVariantAndIndexPairs.end(); it++) + for (it = optionVariantAndIndexPairs.begin(); it != optionVariantAndIndexPairs.end(); ++it) { if (PdmUiFieldSpecialization::isDataElementEqual(valuesSelectedInField[i], it->first)) { @@ -180,10 +182,9 @@ class PdmUiItem PdmUiItem() : m_staticItemInfo(NULL) { } virtual ~PdmUiItem(); - // Copy and assignment to avoid hampering our internal pointer. - PdmUiItem(const PdmUiItem& ) : m_staticItemInfo(NULL) { } - PdmUiItem& operator=(const PdmUiItem& ) { return *this; } - + PdmUiItem(const PdmUiItem&) = delete; + PdmUiItem& operator=(const PdmUiItem&) = delete; + const QString uiName(QString uiConfigName = "") const; void setUiName(const QString& uiName, QString uiConfigName = "") { m_configItemInfos[uiConfigName].m_uiName = uiName; } @@ -219,7 +220,7 @@ class PdmUiItem void updateConnectedEditors(); - void updateUiIconFromState(bool active); + void updateUiIconFromState(bool isActive, QString uiConfigName = ""); public: // Pdm-Private only //================================================================================================== diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiModelChangeDetector.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiModelChangeDetector.cpp new file mode 100644 index 0000000000..90e5ce6d1b --- /dev/null +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiModelChangeDetector.cpp @@ -0,0 +1,84 @@ +//################################################################################################## +// +// Copyright (C) Ceetron Solutions AS +// +// This library may be used under the terms of either the GNU General Public License or +// the GNU Lesser General Public License as follows: +// +// GNU General Public License Usage +// This library 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. +// +// This library 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 <> +// for more details. +// +// GNU Lesser General Public License Usage +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library 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 Lesser General Public License at <> +// for more details. +// +//################################################################################################## + +#include "cafPdmUiModelChangeDetector.h" + + +namespace caf { + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +PdmUiModelChangeDetector::PdmUiModelChangeDetector() + : m_isModelChanged(false) +{ +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +PdmUiModelChangeDetector* PdmUiModelChangeDetector::instance() +{ + static PdmUiModelChangeDetector staticInstance; + + return &staticInstance; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void PdmUiModelChangeDetector::setModelChanged() +{ + m_isModelChanged = true; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void PdmUiModelChangeDetector::reset() +{ + m_isModelChanged = false; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool PdmUiModelChangeDetector::isModelChanged() const +{ + return m_isModelChanged; +} + +} // end namespace caf diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiModelChangeDetector.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiModelChangeDetector.h new file mode 100644 index 0000000000..b07fce79f7 --- /dev/null +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiModelChangeDetector.h @@ -0,0 +1,58 @@ +//################################################################################################## +// +// Copyright (C) Ceetron Solutions AS +// +// This library may be used under the terms of either the GNU General Public License or +// the GNU Lesser General Public License as follows: +// +// GNU General Public License Usage +// This library 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. +// +// This library 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 <> +// for more details. +// +// GNU Lesser General Public License Usage +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library 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 Lesser General Public License at <> +// for more details. +// +//################################################################################################## + +#pragma once + +namespace caf +{ + +class PdmUiModelChangeDetector +{ +public: + static PdmUiModelChangeDetector* instance(); + + void setModelChanged(); + void reset(); + bool isModelChanged() const; + +private: + PdmUiModelChangeDetector(); + +private: + bool m_isModelChanged; +}; + +} // End of namespace caf + diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiObjectHandle.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiObjectHandle.cpp index 2ef4a4fab8..7b82d496c5 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiObjectHandle.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiObjectHandle.cpp @@ -1,13 +1,12 @@ #include "cafPdmUiObjectHandle.h" +#include "cafAssert.h" #include "cafPdmFieldHandle.h" #include "cafPdmObjectHandle.h" #include "cafPdmUiFieldHandle.h" #include "cafPdmUiOrdering.h" #include "cafPdmUiTreeOrdering.h" -#include - namespace caf { @@ -28,7 +27,7 @@ PdmUiObjectHandle* uiObj(PdmObjectHandle* obj) { if (!obj) return NULL; PdmUiObjectHandle* uiObject = obj->capability(); - assert(uiObject); + CAF_ASSERT(uiObject); return uiObject; } @@ -38,9 +37,12 @@ PdmUiObjectHandle* uiObj(PdmObjectHandle* obj) //-------------------------------------------------------------------------------------------------- void PdmUiObjectHandle::uiOrdering(QString uiConfigName, PdmUiOrdering& uiOrdering) { -#if 1 + // Restore state for includeRemainingFields, as this flag + // can be changed in defineUiOrdering() + bool includeRemaining_originalState = uiOrdering.isIncludingRemainingFields(); + this->defineUiOrdering(uiConfigName, uiOrdering); - if (!uiOrdering.forgetRemainingFields()) + if (uiOrdering.isIncludingRemainingFields()) { // Add the remaining Fields To UiConfig std::vector fields; @@ -54,7 +56,11 @@ void PdmUiObjectHandle::uiOrdering(QString uiConfigName, PdmUiOrdering& uiOrderi } } } -#endif + + // Restore incoming value + uiOrdering.skipRemainingFields(!includeRemaining_originalState); + + CAF_ASSERT(includeRemaining_originalState == uiOrdering.isIncludingRemainingFields()); } //-------------------------------------------------------------------------------------------------- @@ -84,7 +90,7 @@ void PdmUiObjectHandle::objectEditorAttribute(QString uiConfigName, PdmUiEditorA //-------------------------------------------------------------------------------------------------- PdmUiTreeOrdering* PdmUiObjectHandle::uiTreeOrdering(QString uiConfigName /*= ""*/) { - assert(this); // This method actually is possible to call on a NULL ptr without getting a crash, so we assert instead. + CAF_ASSERT(this); // This method actually is possible to call on a NULL ptr without getting a crash, so we assert instead. PdmUiTreeOrdering* uiTreeOrdering = new PdmUiTreeOrdering(NULL, m_owner); @@ -104,7 +110,7 @@ PdmUiTreeOrdering* PdmUiObjectHandle::uiTreeOrdering(QString uiConfigName /*= "" void PdmUiObjectHandle::addDefaultUiTreeChildren(PdmUiTreeOrdering* uiTreeOrdering) { #if 1 - if (!uiTreeOrdering->forgetRemainingFields()) + if (uiTreeOrdering->isIncludingRemainingChildren()) { // Add the remaining Fields To UiConfig std::vector fields; @@ -231,7 +237,7 @@ void PdmUiObjectHandle::updateUiIconFromToggleField() PdmUiObjectHandle* PdmObjectHandle::uiCapability() const { PdmUiObjectHandle* uiField = capability(); - assert(uiField); + CAF_ASSERT(uiField); return uiField; } diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiObjectHandle.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiObjectHandle.h index 3b67ad45ba..57414ac753 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiObjectHandle.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiObjectHandle.h @@ -34,7 +34,7 @@ class PdmUiObjectHandle : public PdmUiItem, public PdmObjectCapability /// For a specific field, return editor specific parameters used to customize the editor behavior. - void editorAttribute(const PdmFieldHandle* field, QString uiConfigName, PdmUiEditorAttribute * attribute); + void editorAttribute(const PdmFieldHandle* field, QString uiConfigName, PdmUiEditorAttribute* attribute); /// Return object editor specific parameters used to customize the editor behavior. void objectEditorAttribute(QString uiConfigName, PdmUiEditorAttribute* attribute); @@ -47,32 +47,33 @@ class PdmUiObjectHandle : public PdmUiItem, public PdmObjectCapability // Virtual interface to override in subclasses to support special behaviour if needed public: // Virtual - virtual PdmFieldHandle* userDescriptionField() { return NULL; } + virtual caf::PdmFieldHandle* userDescriptionField() { return NULL; } /// Field used to toggle object on/off in UI-related uses of the object (ie checkbox in treeview) - virtual PdmFieldHandle* objectToggleField() { return NULL; } + virtual caf::PdmFieldHandle* objectToggleField() { return NULL; } /// Method to reimplement to catch when the field has changed due to setUiValue() - virtual void fieldChangedByUi(const PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) {} + virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) {} + /// Method to re-implement to supply option values for a specific field virtual QList - calculateValueOptions(const PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) { return QList(); } + calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) { return QList(); } protected: /// Override to customize the order and grouping of the Gui. /// Fill up the uiOrdering object with groups and field references to create the gui structure /// If the uiOrdering is empty, it is interpreted as meaning all fields w/o grouping. - virtual void defineUiOrdering(QString uiConfigName, PdmUiOrdering& uiOrdering) {} + virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) {} /// Override to customize the tree representations of the object hierarchy. /// If the PdmUiTreeOrdering is empty, it is interpreted as meaning all fields containing child objects in order - virtual void defineUiTreeOrdering(PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") { } + virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") { } /// Override to provide editor specific data for the field and uiConfigName - virtual void defineEditorAttribute(const PdmFieldHandle* field, QString uiConfigName, PdmUiEditorAttribute * attribute) {} + virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) {} /// Override to provide editor specific data for the uiConfigName for the object - virtual void defineObjectEditorAttribute(QString uiConfigName, PdmUiEditorAttribute * attribute) {} + virtual void defineObjectEditorAttribute(QString uiConfigName, caf::PdmUiEditorAttribute* attribute) {} /// This method is intended to be used in macros to make compile time errors // if user uses them on wrong type of objects diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiOrdering.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiOrdering.cpp index 7bc8540cdb..bb828b39ef 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiOrdering.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiOrdering.cpp @@ -41,7 +41,6 @@ #include "cafPdmUiFieldHandle.h" #include "cafPdmUiObjectHandle.h" -#include namespace caf { @@ -75,7 +74,7 @@ PdmUiGroup* PdmUiOrdering::addNewGroup(QString displayName) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool PdmUiOrdering::contains(const PdmUiItem* item) +bool PdmUiOrdering::contains(const PdmUiItem* item) const { for (size_t i = 0; i < m_ordering.size(); ++i) { @@ -94,8 +93,8 @@ bool PdmUiOrdering::contains(const PdmUiItem* item) void PdmUiOrdering::add(const PdmFieldHandle* field) { PdmUiFieldHandle* uiItem = const_cast(field)->uiCapability(); - assert(uiItem); - assert(!this->contains(uiItem)); + CAF_ASSERT(uiItem); + CAF_ASSERT(!this->contains(uiItem)); m_ordering.push_back(uiItem); } @@ -106,11 +105,35 @@ void PdmUiOrdering::add(const PdmFieldHandle* field) void PdmUiOrdering::add(const PdmObjectHandle* obj) { PdmUiObjectHandle* uiItem = uiObj(const_cast(obj)); - assert(uiItem); - assert(!this->contains(uiItem)); + CAF_ASSERT(uiItem); + CAF_ASSERT(!this->contains(uiItem)); m_ordering.push_back(uiItem); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool PdmUiOrdering::isIncludingRemainingFields() const +{ + return !m_skipRemainingFields; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void PdmUiOrdering::skipRemainingFields(bool doSkip /*= true*/) +{ + m_skipRemainingFields = doSkip; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const std::vector& PdmUiOrdering::uiItems() const +{ + return m_ordering; +} + } //End of namespace caf diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiOrdering.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiOrdering.h index 58f4c03e47..9ade4e1189 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiOrdering.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiOrdering.h @@ -55,40 +55,56 @@ class PdmObjectHandle; class PdmUiOrdering { public: - PdmUiOrdering(): m_forgetRemainingFields(false) { }; + PdmUiOrdering(): m_skipRemainingFields(false) { }; virtual ~PdmUiOrdering(); + PdmUiOrdering(const PdmUiOrdering&) = delete; + PdmUiOrdering& operator=(const PdmUiOrdering&) = delete; + PdmUiGroup* addNewGroup(QString displayName); - //void add(PdmUiItem* item) { m_ordering.push_back(item); } - /// HACK constness of this class and functions must be revisited - //void add(const PdmUiItem* item) { m_ordering.push_back(const_cast(item)); } void add(const PdmFieldHandle* field); void add(const PdmObjectHandle* obj); - bool forgetRemainingFields() const { return m_forgetRemainingFields; } - void setForgetRemainingFields(bool val) { m_forgetRemainingFields = val; } + void skipRemainingFields(bool doSkip = true); - const std::vector& uiItems() const { return m_ordering; } - bool contains(const PdmUiItem* item); + // Pdm internal methods -private: - // Private copy constructor and assignment to prevent this. (The vectors below will make trouble) - PdmUiOrdering(const PdmUiOrdering& other) { } - PdmUiOrdering& operator= (const PdmUiOrdering& other) { } + const std::vector& uiItems() const; + bool contains(const PdmUiItem* item) const; + bool isIncludingRemainingFields() const; - std::vector m_ordering; ///< The order of groups and fields - std::vector m_createdGroups; ///< Owned PdmUiGroups, for mem management - bool m_forgetRemainingFields; +private: + std::vector m_ordering; ///< The order of groups and fields + std::vector m_createdGroups; ///< Owned PdmUiGroups, for memory management only + bool m_skipRemainingFields; }; //================================================================================================== -/// Class representing a group of fields +/// Class representing a group of fields communicated to the Gui //================================================================================================== class PdmUiGroup : public PdmUiItem, public PdmUiOrdering { +public: + PdmUiGroup() { m_isCollapsedByDefault = false; m_hasForcedExpandedState = false; m_forcedCollapseState = false;} + virtual bool isUiGroup() { return true; } + + /// Set this group to be collapsed by default. When the user expands the group, the default no longer has any effect. + void setCollapsedByDefault(bool doCollapse) { m_isCollapsedByDefault = doCollapse;} + /// Forcifully set the collapsed state of the group, overriding the previous user actions and the default + void setCollapsed(bool doCollapse) { m_hasForcedExpandedState = true; m_forcedCollapseState = doCollapse;} + + // Pdm internal methods + bool isExpandedByDefault() const { return !m_isCollapsedByDefault;} + bool hasForcedExpandedState() const { return m_hasForcedExpandedState;} + bool forcedExpandedState() const { return !m_forcedCollapseState;} + +private: + bool m_isCollapsedByDefault; + bool m_hasForcedExpandedState; + bool m_forcedCollapseState; }; diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiTreeOrdering.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiTreeOrdering.cpp index dde47242b4..b46913a8b9 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiTreeOrdering.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiTreeOrdering.cpp @@ -37,13 +37,13 @@ #include "cafPdmUiTreeOrdering.h" +#include "cafAssert.h" #include "cafPdmDataValueField.h" #include "cafPdmObjectHandle.h" #include "cafPdmUiEditorHandle.h" #include "cafPdmUiFieldHandle.h" #include "cafPdmUiObjectHandle.h" -#include #include namespace caf @@ -54,7 +54,7 @@ namespace caf //-------------------------------------------------------------------------------------------------- void PdmUiTreeOrdering::add(PdmFieldHandle* field, QString uiConfigName) { - assert(field); + CAF_ASSERT(field); if (field->uiCapability()->isUiTreeHidden(uiConfigName)) { @@ -71,7 +71,7 @@ void PdmUiTreeOrdering::add(PdmFieldHandle* field, QString uiConfigName) } else { - PdmUiTreeOrdering* child = new PdmUiTreeOrdering(this, field); + new PdmUiTreeOrdering(this, field); } } @@ -80,9 +80,9 @@ void PdmUiTreeOrdering::add(PdmFieldHandle* field, QString uiConfigName) //-------------------------------------------------------------------------------------------------- void PdmUiTreeOrdering::add(PdmObjectHandle* object) { - assert(object); + CAF_ASSERT(object); - PdmUiTreeOrdering* child = new PdmUiTreeOrdering(this, object); + new PdmUiTreeOrdering(this, object); } //-------------------------------------------------------------------------------------------------- @@ -91,7 +91,7 @@ void PdmUiTreeOrdering::add(PdmObjectHandle* object) PdmUiTreeOrdering* PdmUiTreeOrdering::add(const QString & title, const QString& iconResourceName) { PdmUiTreeOrdering* child = new PdmUiTreeOrdering(title, iconResourceName); - assert(child->isValid()); + CAF_ASSERT(child->isValid()); this->appendChild(child); return child; @@ -102,7 +102,7 @@ PdmUiTreeOrdering* PdmUiTreeOrdering::add(const QString & title, const QString& //-------------------------------------------------------------------------------------------------- bool PdmUiTreeOrdering::containsField(const PdmFieldHandle* field) { - assert (field); + CAF_ASSERT(field); for (int cIdx = 0; cIdx < this->childCount(); ++cIdx) { PdmUiTreeOrdering* child = dynamic_cast(this->child(cIdx)); // What ??? @@ -121,7 +121,7 @@ bool PdmUiTreeOrdering::containsField(const PdmFieldHandle* field) //-------------------------------------------------------------------------------------------------- bool PdmUiTreeOrdering::containsObject(const PdmObjectHandle* object) { - assert (object); + CAF_ASSERT(object); for (int cIdx = 0; cIdx < this->childCount(); ++cIdx) { PdmUiTreeOrdering* child = this->child(cIdx); @@ -247,7 +247,7 @@ PdmUiTreeOrdering::~PdmUiTreeOrdering() //-------------------------------------------------------------------------------------------------- PdmObjectHandle* PdmUiTreeOrdering::object() const { - assert(isRepresentingObject()); return m_object; + CAF_ASSERT(isRepresentingObject()); return m_object; } //-------------------------------------------------------------------------------------------------- @@ -255,7 +255,7 @@ PdmObjectHandle* PdmUiTreeOrdering::object() const //-------------------------------------------------------------------------------------------------- PdmFieldHandle* PdmUiTreeOrdering::field() const { - assert(isRepresentingField()); return m_field; + CAF_ASSERT(isRepresentingField()); return m_field; } //-------------------------------------------------------------------------------------------------- @@ -263,7 +263,7 @@ PdmFieldHandle* PdmUiTreeOrdering::field() const //-------------------------------------------------------------------------------------------------- PdmUiItem* PdmUiTreeOrdering::uiItem() const { - assert(isDisplayItemOnly()); return m_uiItem; + CAF_ASSERT(isDisplayItemOnly()); return m_uiItem; } //-------------------------------------------------------------------------------------------------- @@ -328,7 +328,7 @@ void PdmUiTreeOrdering::debugDump(int level) const //-------------------------------------------------------------------------------------------------- PdmUiTreeOrdering* PdmUiTreeOrdering::child(int index) const { - assert(index < m_childItems.size()); + CAF_ASSERT(index < m_childItems.size()); return m_childItems.value(index); } diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiTreeOrdering.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiTreeOrdering.h index 5ffd1f099b..c9a622d248 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiTreeOrdering.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiTreeOrdering.h @@ -63,19 +63,22 @@ class PdmUiTreeOrdering; class PdmUiTreeOrdering { public: - PdmUiTreeOrdering(PdmObjectHandle* pdmItem ); - PdmUiTreeOrdering(PdmFieldHandle* pdmField ); + explicit PdmUiTreeOrdering(PdmObjectHandle* pdmItem ); + explicit PdmUiTreeOrdering(PdmFieldHandle* pdmField ); PdmUiTreeOrdering(const QString & title, const QString& iconResourceName ); ~PdmUiTreeOrdering(); + PdmUiTreeOrdering(const PdmUiTreeOrdering&) = delete; + PdmUiTreeOrdering& operator=(const PdmUiTreeOrdering&) = delete; + void add(PdmFieldHandle * field, QString uiConfigName = ""); void add(PdmObjectHandle* object); PdmUiTreeOrdering* add(const QString & title, const QString& iconResourceName ); - /// If the rest of the fields containing children is supposed to be omitted, setForgetRemainingFileds to true. - void setForgetRemainingFields(bool val) { m_forgetRemainingFields = val; } - /// To stop the tree generation at this level, doIgnoreSubTree to true + /// If the rest of the fields containing children is supposed to be omitted, set skipRemainingFields to true. + void skipRemainingChildren(bool doSkip = true) { m_forgetRemainingFields = doSkip; } + /// To stop the tree generation at this level, setIgnoreSubTree to true void setIgnoreSubTree(bool doIgnoreSubTree ) { m_isToIgnoreSubTree = doIgnoreSubTree; } // Testing for the PdmItem being represented @@ -86,7 +89,7 @@ class PdmUiTreeOrdering // Access to the PdmItem being represented PdmUiItem* activeItem() const; - PdmObjectHandle* object() const; + PdmObjectHandle* object() const; PdmFieldHandle* field() const; PdmUiItem* uiItem() const; @@ -101,8 +104,8 @@ class PdmUiTreeOrdering private: friend class PdmObjectHandle; friend class PdmUiObjectHandle; - bool forgetRemainingFields() const { return m_forgetRemainingFields; } - bool ignoreSubTree() const { return m_isToIgnoreSubTree; } + bool isIncludingRemainingChildren() const { return !m_forgetRemainingFields; } + bool ignoreSubTree() const { return m_isToIgnoreSubTree; } bool containsField(const PdmFieldHandle* field); bool containsObject(const PdmObjectHandle* object); void appendChild( PdmUiTreeOrdering* child); diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafUiTreeItem.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafUiTreeItem.h index f118cbbef1..b1bc82c029 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafUiTreeItem.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafUiTreeItem.h @@ -39,7 +39,6 @@ //#include #include -#include #include namespace caf @@ -73,7 +72,7 @@ class UiTreeItem UiTreeItem* child(int row) const { - assert(row < m_childItems.size()); + CAF_ASSERT(row < m_childItems.size()); return m_childItems.value(row); } diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/CMakeLists.txt b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/CMakeLists.txt index c42cab52c4..c5a8585247 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/CMakeLists.txt +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/CMakeLists.txt @@ -33,6 +33,8 @@ set( PROJECT_FILES cafPdmSettings.h cafPdmSettings.cpp + + cafPdmXmlStringValidation.h ) diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafInternalPdmXmlFieldCapability.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafInternalPdmXmlFieldCapability.h index 420b115320..b904463a0a 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafInternalPdmXmlFieldCapability.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafInternalPdmXmlFieldCapability.h @@ -15,7 +15,7 @@ class PdmFieldXmlCap : public PdmXmlFieldHandle // Xml Serializing public: virtual void readFieldData(QXmlStreamReader& xmlStream, PdmObjectFactory* objectFactory); - virtual void writeFieldData(QXmlStreamWriter& xmlStream); + virtual void writeFieldData(QXmlStreamWriter& xmlStream) const; private: FieldType* m_field; }; @@ -39,7 +39,7 @@ class PdmFieldXmlCap< PdmPtrField > : public PdmXmlFieldHandle // Xml Serializing public: virtual void readFieldData(QXmlStreamReader& xmlStream, PdmObjectFactory* objectFactory); - virtual void writeFieldData(QXmlStreamWriter& xmlStream); + virtual void writeFieldData(QXmlStreamWriter& xmlStream) const; virtual void resolveReferences(); private: @@ -68,7 +68,7 @@ class PdmFieldXmlCap< PdmPtrArrayField >: public PdmXmlFieldHandle // Xml Serializing public: virtual void readFieldData(QXmlStreamReader& xmlStream, PdmObjectFactory* objectFactory); - virtual void writeFieldData(QXmlStreamWriter& xmlStream); + virtual void writeFieldData(QXmlStreamWriter& xmlStream) const; virtual void resolveReferences(); private: @@ -92,7 +92,7 @@ class PdmFieldXmlCap< PdmChildField > : public PdmXmlFieldHandle // Xml Serializing public: virtual void readFieldData(QXmlStreamReader& xmlStream, PdmObjectFactory* objectFactory); - virtual void writeFieldData(QXmlStreamWriter& xmlStream); + virtual void writeFieldData(QXmlStreamWriter& xmlStream) const; private: FieldType* m_field; }; @@ -110,7 +110,7 @@ class PdmFieldXmlCap< PdmChildArrayField > : public PdmXmlFieldHandle // Xml Serializing public: virtual void readFieldData(QXmlStreamReader& xmlStream, PdmObjectFactory* objectFactory); - virtual void writeFieldData(QXmlStreamWriter& xmlStream); + virtual void writeFieldData(QXmlStreamWriter& xmlStream) const; private: FieldType* m_field; }; diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafInternalPdmXmlFieldCapability.inl b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafInternalPdmXmlFieldCapability.inl index 2bebe739a2..6e9a567ae1 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafInternalPdmXmlFieldCapability.inl +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafInternalPdmXmlFieldCapability.inl @@ -1,3 +1,5 @@ + +#include "cafAssert.h" #include "cafInternalPdmFieldIoHelper.h" #include "cafPdmObjectFactory.h" #include "cafPdmXmlObjectHandle.h" @@ -30,7 +32,7 @@ template /// //-------------------------------------------------------------------------------------------------- template - void caf::PdmFieldXmlCap::writeFieldData(QXmlStreamWriter& xmlStream) +void caf::PdmFieldXmlCap::writeFieldData(QXmlStreamWriter& xmlStream) const { this->assertValid(); PdmFieldWriter::writeFieldData(m_field->value(), xmlStream); @@ -79,7 +81,7 @@ template //-------------------------------------------------------------------------------------------------- template - void caf::PdmFieldXmlCap< caf::PdmPtrField >::writeFieldData(QXmlStreamWriter& xmlStream) + void caf::PdmFieldXmlCap< caf::PdmPtrField >::writeFieldData(QXmlStreamWriter& xmlStream) const { this->assertValid(); @@ -142,7 +144,7 @@ template //-------------------------------------------------------------------------------------------------- template - void caf::PdmFieldXmlCap< caf::PdmPtrArrayField >::writeFieldData(QXmlStreamWriter& xmlStream) + void caf::PdmFieldXmlCap< caf::PdmPtrArrayField >::writeFieldData(QXmlStreamWriter& xmlStream) const { this->assertValid(); @@ -201,7 +203,7 @@ void caf::PdmFieldXmlCap< caf::PdmChildField >::readFieldData(QXmlStr // Create an object if needed if (m_field->value() == NULL) { - assert(objectFactory); + CAF_ASSERT(objectFactory); obj = objectFactory->create(className); if (obj == NULL) @@ -217,7 +219,7 @@ void caf::PdmFieldXmlCap< caf::PdmChildField >::readFieldData(QXmlStr PdmXmlObjectHandle* xmlObject = xmlObj(obj); if (!xmlObject || xmlObject->classKeyword() != className) { - assert(false); // Inconsistency in the factory. It creates objects of wrong type from the ClassKeyword + CAF_ASSERT(false); // Inconsistency in the factory. It creates objects of wrong type from the ClassKeyword xmlStream.skipCurrentElement(); // Skip to the endelement of the object we was supposed to read xmlStream.skipCurrentElement(); // Skip to the endelement of this field @@ -264,7 +266,7 @@ void caf::PdmFieldXmlCap< caf::PdmChildField >::readFieldData(QXmlStr //-------------------------------------------------------------------------------------------------- template -void caf::PdmFieldXmlCap< caf::PdmChildField >::writeFieldData(QXmlStreamWriter& xmlStream) +void caf::PdmFieldXmlCap< caf::PdmChildField >::writeFieldData(QXmlStreamWriter& xmlStream) const { if (m_field->m_fieldValue.rawPtr() == NULL) return; @@ -287,7 +289,7 @@ void caf::PdmFieldXmlCap< caf::PdmChildField >::writeFieldData(QXmlSt /// //-------------------------------------------------------------------------------------------------- template -void caf::PdmFieldXmlCap< caf::PdmChildArrayField >::writeFieldData(QXmlStreamWriter& xmlStream) +void caf::PdmFieldXmlCap< caf::PdmChildArrayField >::writeFieldData(QXmlStreamWriter& xmlStream) const { typename std::vector< PdmPointer >::iterator it; for (it = m_field->m_pointers.begin(); it != m_field->m_pointers.end(); ++it) @@ -319,7 +321,7 @@ void caf::PdmFieldXmlCap< caf::PdmChildArrayField >::readFieldData(QX { QString className = xmlStream.name().toString(); - assert(objectFactory); + CAF_ASSERT(objectFactory); PdmObjectHandle * obj = objectFactory->create(className); if (obj == NULL) @@ -343,7 +345,7 @@ void caf::PdmFieldXmlCap< caf::PdmChildArrayField >::readFieldData(QX PdmXmlObjectHandle* xmlObject = xmlObj(obj); if (!xmlObject || xmlObject->classKeyword() != className) { - assert(false); // There is an inconsistency in the factory. It creates objects of type not matching the ClassKeyword + CAF_ASSERT(false); // There is an inconsistency in the factory. It creates objects of type not matching the ClassKeyword // Skip to EndElement of the object xmlStream.skipCurrentElement(); diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafInternalPdmXmlFieldReaderWriter.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafInternalPdmXmlFieldReaderWriter.h index 3263c14379..68cd701683 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafInternalPdmXmlFieldReaderWriter.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafInternalPdmXmlFieldReaderWriter.h @@ -8,7 +8,6 @@ #include "cafPdmReferenceHelper.h" #include "cafInternalPdmFieldIoHelper.h" -#include namespace caf @@ -79,7 +78,7 @@ struct PdmFieldWriter< PdmPointer > { QString dataString; - assert(referenceHelper); + CAF_ASSERT(referenceHelper); if (fieldValue.isNull()) { @@ -111,7 +110,7 @@ struct PdmFieldReader< PdmPointer > if (dataString != "NULL") { - assert(referenceHelper); + CAF_ASSERT(referenceHelper); PdmObjectHandle* objHandle = referenceHelper->objectFromReference(dataString); fieldValue.setRawPtr(objHandle); diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmDefaultObjectFactory.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmDefaultObjectFactory.h index a23be61d4a..9cf98d3606 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmDefaultObjectFactory.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmDefaultObjectFactory.h @@ -39,9 +39,10 @@ #include "cafPdmObjectFactory.h" +#include "cafAssert.h" + #include -#include #include namespace caf @@ -77,8 +78,8 @@ class PdmDefaultObjectFactory : public PdmObjectFactory } else { - assert(classNameKeyword != entryIt->first); // classNameKeyword has already been used - assert(false); // To be sure .. + CAF_ASSERT(classNameKeyword != entryIt->first); // classNameKeyword has already been used + CAF_ASSERT(false); // To be sure .. return false; // never hit; } } diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmSettings.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmSettings.cpp index c324694325..06620a0a6a 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmSettings.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmSettings.cpp @@ -40,7 +40,6 @@ #include "cafPdmField.h" #include "cafPdmXmlObjectHandle.h" -#include namespace caf @@ -85,7 +84,7 @@ void PdmSettings::readFieldsFromApplicationStore(caf::PdmObjectHandle* object, c QVariant val = settings.value(key); caf::PdmValueField* valueField = dynamic_cast(fieldHandle); - assert(valueField); + CAF_ASSERT(valueField); valueField->setFromQVariant(val); } } @@ -97,7 +96,7 @@ void PdmSettings::readFieldsFromApplicationStore(caf::PdmObjectHandle* object, c //-------------------------------------------------------------------------------------------------- void PdmSettings::writeFieldsToApplicationStore(caf::PdmObjectHandle* object, const QString context) { - assert(object); + CAF_ASSERT(object); // Qt doc : // @@ -133,7 +132,7 @@ void PdmSettings::writeFieldsToApplicationStore(caf::PdmObjectHandle* object, co if (children.size() == 0) { caf::PdmValueField* valueField = dynamic_cast(fieldHandle); - assert(valueField); + CAF_ASSERT(valueField); settings.setValue(context + fieldHandle->keyword(), valueField->toQVariant()); } } diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlFieldHandle.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlFieldHandle.cpp index e6bd532bd3..15ecfc1df4 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlFieldHandle.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlFieldHandle.cpp @@ -1,5 +1,6 @@ #include "cafPdmXmlFieldHandle.h" +#include "cafAssert.h" #include "cafPdmFieldHandle.h" #include "cafPdmXmlObjectHandle.h" @@ -55,7 +56,7 @@ QString PdmXmlFieldHandle::childClassKeyword() PdmXmlFieldHandle* PdmFieldHandle::xmlCapability() { PdmXmlFieldHandle* xmlField = capability(); - assert(xmlField); + CAF_ASSERT(xmlField); return xmlField; } diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlFieldHandle.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlFieldHandle.h index bf426be4a1..8db7870ca7 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlFieldHandle.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlFieldHandle.h @@ -25,17 +25,18 @@ class PdmXmlFieldHandle : public PdmFieldCapability PdmXmlFieldHandle(PdmFieldHandle* owner , bool giveOwnership); virtual ~PdmXmlFieldHandle() { } - PdmFieldHandle* fieldHandle() { return m_owner; } + PdmFieldHandle* fieldHandle() { return m_owner; } + const PdmFieldHandle* fieldHandle() const { return m_owner; } - bool isIOReadable() { return m_isIOReadable; } - bool isIOWritable() { return m_isIOWritable; } - void setIOWritable(bool isWritable) { m_isIOWritable = isWritable; } - void setIOReadable(bool isReadable) { m_isIOReadable = isReadable; } + bool isIOReadable() const { return m_isIOReadable; } + bool isIOWritable() const { return m_isIOWritable; } + void setIOWritable(bool isWritable) { m_isIOWritable = isWritable; } + void setIOReadable(bool isReadable) { m_isIOReadable = isReadable; } QString childClassKeyword(); virtual void readFieldData(QXmlStreamReader& xmlStream, PdmObjectFactory* objectFactory) = 0; - virtual void writeFieldData(QXmlStreamWriter& xmlStream) = 0; + virtual void writeFieldData(QXmlStreamWriter& xmlStream) const = 0; virtual void resolveReferences() { }; diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlObjectHandle.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlObjectHandle.cpp index 9bcaa193a5..645f8aff3a 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlObjectHandle.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlObjectHandle.cpp @@ -1,5 +1,6 @@ #include "cafPdmXmlObjectHandle.h" +#include "cafAssert.h" #include "cafPdmObjectHandle.h" #include "cafPdmXmlFieldHandle.h" @@ -9,7 +10,6 @@ #include #include -#include namespace caf { @@ -30,7 +30,7 @@ PdmXmlObjectHandle* xmlObj(PdmObjectHandle* obj) { if (!obj) return NULL; PdmXmlObjectHandle* xmlObject = obj->capability(); - assert(xmlObject); + CAF_ASSERT(xmlObject); return xmlObject; } @@ -108,17 +108,17 @@ void PdmXmlObjectHandle::readFields(QXmlStreamReader& xmlStream, PdmObjectFactor //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void PdmXmlObjectHandle::writeFields(QXmlStreamWriter& xmlStream) +void PdmXmlObjectHandle::writeFields(QXmlStreamWriter& xmlStream) const { std::vector fields; m_owner->fields(fields); for (size_t it = 0; it < fields.size(); ++it) { - PdmXmlFieldHandle* field = fields[it]->xmlCapability(); + const PdmXmlFieldHandle* field = fields[it]->xmlCapability(); if (field && field->isIOWritable()) { QString keyword = field->fieldHandle()->keyword(); - assert(PdmXmlObjectHandle::isValidXmlElementName(keyword)); + CAF_ASSERT(PdmXmlObjectHandle::isValidXmlElementName(keyword)); xmlStream.writeStartElement("", keyword); field->writeFieldData(xmlStream); @@ -147,7 +147,7 @@ void PdmXmlObjectHandle::readObjectFromXmlString(const QString& xmlString, PdmO tt = inputStream.readNext(); // Start of document tt = inputStream.readNext(); QString classKeyword = inputStream.name().toString(); - assert(classKeyword == this->classKeyword()); + CAF_ASSERT(classKeyword == this->classKeyword()); this->readFields(inputStream, objectFactory); } @@ -188,7 +188,7 @@ PdmObjectHandle* PdmXmlObjectHandle::copyByXmlSerialization(PdmObjectFactory* ob //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString PdmXmlObjectHandle::writeObjectToXmlString() +QString PdmXmlObjectHandle::writeObjectToXmlString() const { QString xmlString; QXmlStreamWriter outputStream(&xmlString); @@ -340,7 +340,7 @@ void PdmXmlObjectHandle::setupBeforeSaveRecursively(PdmObjectHandle* object) PdmXmlObjectHandle* PdmObjectHandle::xmlCapability() const { PdmXmlObjectHandle* xmlField = capability(); - assert(xmlField); + CAF_ASSERT(xmlField); return xmlField; } diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlObjectHandle.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlObjectHandle.h index 0759889f52..5616308e67 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlObjectHandle.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlObjectHandle.h @@ -30,18 +30,18 @@ class PdmXmlObjectHandle : public PdmObjectCapability virtual ~PdmXmlObjectHandle() { } /// The classKeyword method is overridden in subclasses by the CAF_PDM_XML_HEADER_INIT macro - virtual QString classKeyword() = 0; + virtual QString classKeyword() const = 0; /// Convenience methods to serialize/de-serialize this particular object (with children) void readObjectFromXmlString(const QString& xmlString, PdmObjectFactory* objectFactory); - QString writeObjectToXmlString(); + QString writeObjectToXmlString() const; static PdmObjectHandle* readUnknownObjectFromXmlString(const QString& xmlString, PdmObjectFactory* objectFactory); PdmObjectHandle* copyByXmlSerialization(PdmObjectFactory* objectFactory); // Main XML serialization methods that is used internally by the document serialization system // Not supposed to be used directly. void readFields(QXmlStreamReader& inputStream, PdmObjectFactory* objectFactory); - void writeFields(QXmlStreamWriter& outputStream); + void writeFields(QXmlStreamWriter& outputStream) const; /// Check if a string is a valid Xml element name static bool isValidXmlElementName(const QString& name); diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlObjectHandleMacros.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlObjectHandleMacros.h index a00116f2df..65130635ec 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlObjectHandleMacros.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlObjectHandleMacros.h @@ -1,6 +1,7 @@ #pragma once #include "cafPdmDefaultObjectFactory.h" +#include "cafPdmXmlStringValidation.h" // Taken from gtest.h // @@ -15,6 +16,11 @@ #define PDM_OBJECT_STRING_CONCATENATE(foo, bar) PDM_OBJECT_STRING_CONCATENATE_IMPL_(foo, bar) #define PDM_OBJECT_STRING_CONCATENATE_IMPL_(foo, bar) foo ## bar +#define CAF_PDM_VERIFY_XML_KEYWORD(keyword) \ + static_assert(isFirstCharacterValidInXmlKeyword(keyword), "First character in keyword is invalid"); \ + static_assert(!isFirstThreeCharactersXml(keyword), "Keyword starts with invalid sequence xml"); \ + static_assert(isValidXmlKeyword(keyword), "Detected invalid character in keyword"); + /// CAF_PDM_HEADER_INIT assists the factory used when reading objects from file /// Place this in the header file inside the class definition of your PdmObject @@ -22,7 +28,7 @@ // To be renamed CAF_PDM_XML_HEADER_INIT #define CAF_PDM_XML_HEADER_INIT \ public: \ - virtual QString classKeyword() { return classKeywordStatic(); } \ + virtual QString classKeyword() const { return classKeywordStatic(); } \ static QString classKeywordStatic(); \ \ static bool Error_You_forgot_to_add_the_macro_CAF_PDM_XML_HEADER_INIT_and_or_CAF_PDM_XML_SOURCE_INIT_to_your_cpp_file_for_this_class() @@ -35,16 +41,25 @@ public: \ #define CAF_PDM_XML_SOURCE_INIT(ClassName, keyword) \ bool ClassName::Error_You_forgot_to_add_the_macro_CAF_PDM_XML_HEADER_INIT_and_or_CAF_PDM_XML_SOURCE_INIT_to_your_cpp_file_for_this_class() { return false;} \ \ - QString ClassName::classKeywordStatic() { return keyword; } \ + QString ClassName::classKeywordStatic() \ + { \ + CAF_PDM_VERIFY_XML_KEYWORD(keyword) \ + return keyword; \ + } \ static bool PDM_OBJECT_STRING_CONCATENATE(my##ClassName, __LINE__) = caf::PdmDefaultObjectFactory::instance()->registerCreator() #define CAF_PDM_XML_ABSTRACT_SOURCE_INIT(ClassName, keyword) \ bool ClassName::Error_You_forgot_to_add_the_macro_CAF_PDM_XML_HEADER_INIT_and_or_CAF_PDM_XML_SOURCE_INIT_to_your_cpp_file_for_this_class() { return false;} \ \ - QString ClassName::classKeywordStatic() { return keyword; } \ + QString ClassName::classKeywordStatic() \ + { \ + CAF_PDM_VERIFY_XML_KEYWORD(keyword) \ + return keyword; \ + } \ #define CAF_PDM_XML_InitField(field, keyword) \ { \ + CAF_PDM_VERIFY_XML_KEYWORD(keyword) \ static bool chekingThePresenceOfHeaderAndSourceInitMacros = \ Error_You_forgot_to_add_the_macro_CAF_PDM_XML_HEADER_INIT_and_or_CAF_PDM_XML_SOURCE_INIT_to_your_cpp_file_for_this_class(); \ this->isInheritedFromPdmXmlSerializable(); \ diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlStringValidation.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlStringValidation.h new file mode 100644 index 0000000000..178f18fed3 --- /dev/null +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXmlStringValidation.h @@ -0,0 +1,48 @@ +#pragma once + +constexpr bool isLowerCase(char c) { + return (c >= 'a' && c <= 'z'); +} + +constexpr bool isUpperCase(char c) { + return (c >= 'A' && c <= 'Z'); +} + +constexpr bool isLetter(char c) { + return isLowerCase(c) || isUpperCase(c); +} + +constexpr bool isDigit(char c) { + return (c >= '0' && c <= '9'); +} + +constexpr bool isValidFirstCharacterInXmlKeyword(char c) { + return (c != '.') && !isDigit(c); +} + +constexpr bool isValidCharacterInXmlKeyword(char c) { + return isLetter(c) || isDigit(c) || (c == '_'); +} + +template< unsigned N > constexpr +bool isValidXmlKeyword(const char(&arr)[N], unsigned i = 0) +{ + return (!isValidCharacterInXmlKeyword(arr[i])) ? false : + i == N-2 ? true : + isValidXmlKeyword(arr, i + 1); +} + +template< unsigned N > constexpr +bool isFirstCharacterValidInXmlKeyword(const char(&arr)[N]) +{ + static_assert(N>0, "String literal is too small"); + + return isValidFirstCharacterInXmlKeyword(arr[0]); +} + +template< unsigned N > constexpr +bool isFirstThreeCharactersXml(const char(&arr)[N]) +{ + return (N < 3) ? false : arr[0] == 'x' && arr[1] == 'm' && arr[2] == 'l'; +} + diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXml_UnitTests/cafPdmAdvancedTemplateTest.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXml_UnitTests/cafPdmAdvancedTemplateTest.cpp index 7c8000f8c9..ae9acc4301 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXml_UnitTests/cafPdmAdvancedTemplateTest.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXml_UnitTests/cafPdmAdvancedTemplateTest.cpp @@ -28,7 +28,7 @@ class ItemPdmObject : public caf::PdmObjectHandle, public caf::PdmXmlObjectHandl CAF_PDM_XML_InitField(&m_name, "Name"); } - ItemPdmObject(QString name) : PdmObjectHandle(), PdmXmlObjectHandle(this, false) + explicit ItemPdmObject(QString name) : PdmObjectHandle(), PdmXmlObjectHandle(this, false) { CAF_PDM_XML_InitField(&m_name, "Name"); m_name = name; diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXml_UnitTests/cafPdmXmlBasicTest.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXml_UnitTests/cafPdmXmlBasicTest.cpp index ed388c2496..86078bacf8 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXml_UnitTests/cafPdmXmlBasicTest.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXml_UnitTests/cafPdmXmlBasicTest.cpp @@ -192,7 +192,8 @@ class SimpleObj : public caf::PdmObjectHandle, public caf::PdmXmlObjectHandle { CAF_PDM_XML_HEADER_INIT; public: - SimpleObj() : PdmObjectHandle(), PdmXmlObjectHandle(this, false) + SimpleObj() : PdmObjectHandle(), PdmXmlObjectHandle(this, false), + m_doubleMember(0.0) { CAF_PDM_XML_InitField(&m_position, "Position"); CAF_PDM_XML_InitField(&m_dir, "Dir"); diff --git a/Fwk/AppFwk/cafProjectDataModel/cafProjectDataModel_UnitTests/cafPdmBasicTest.cpp b/Fwk/AppFwk/cafProjectDataModel/cafProjectDataModel_UnitTests/cafPdmBasicTest.cpp index 27ac4227fc..8c53376a39 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafProjectDataModel_UnitTests/cafPdmBasicTest.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafProjectDataModel_UnitTests/cafPdmBasicTest.cpp @@ -61,7 +61,8 @@ class SimpleObj: public caf::PdmObject { CAF_PDM_HEADER_INIT; public: - SimpleObj() : PdmObject() + SimpleObj() : PdmObject(), + m_doubleMember(0.0) { CAF_PDM_InitObject("SimpleObj", "", "Tooltip SimpleObj", "WhatsThis SimpleObj"); @@ -93,6 +94,7 @@ class SimpleObj: public caf::PdmObject m_dir = other.m_dir; m_up = other.m_up; m_numbers = other.m_numbers; + m_doubleMember = other.m_doubleMember; } ~SimpleObj() {} @@ -279,6 +281,22 @@ TEST(BaseTest, Start) //-------------------------------------------------------------------------------------------------- TEST(BaseTest, NormalPdmField) { + class ObjectWithVectors : public caf::PdmObjectHandle + { + public: + ObjectWithVectors() + { + this->addField(&field1, "field1"); + this->addField(&field2, "field2"); + this->addField(&field3, "field3"); + } + + caf::PdmField > field1; + caf::PdmField > field2; + caf::PdmField > field3; + }; + + std::vector testValue; testValue.push_back(1.1); testValue.push_back(1.2); @@ -289,22 +307,24 @@ TEST(BaseTest, NormalPdmField) testValue2.push_back(2.2); testValue2.push_back(2.3); + ObjectWithVectors myObj; + // Constructors - caf::PdmField > field2(testValue); - EXPECT_EQ(1.3, field2.v()[2]); - caf::PdmField > field3(field2); - EXPECT_EQ(1.3, field3.v()[2]); - caf::PdmField > field1; - EXPECT_EQ(size_t(0), field1().size()); + myObj.field2 = testValue; + EXPECT_EQ(1.3, myObj.field2.v()[2]); + + myObj.field3 = myObj.field2; + EXPECT_EQ(1.3, myObj.field3.v()[2]); + EXPECT_EQ(size_t(0), myObj.field1().size()); // Operators - EXPECT_FALSE(field1 == field3); - field1 = field2; - EXPECT_EQ(1.3, field1()[2]); - field1 = testValue2; - EXPECT_EQ(2.3, field1()[2]); - field3 = field1; - EXPECT_TRUE(field1 == field3); + EXPECT_FALSE(myObj.field1 == myObj.field3); + myObj.field1 = myObj.field2; + EXPECT_EQ(1.3, myObj.field1()[2]); + myObj.field1 = testValue2; + EXPECT_EQ(2.3, myObj.field1()[2]); + myObj.field3 = myObj.field1; + EXPECT_TRUE(myObj.field1 == myObj.field3); } #if 0 @@ -733,31 +753,26 @@ TEST(BaseTest, PdmPointer) TEST(BaseTest, PdmObjectFactory) { { - SimpleObj* s = NULL; - s = dynamic_cast (caf::PdmDefaultObjectFactory::instance()->create("SimpleObj")); + SimpleObj* s = dynamic_cast (caf::PdmDefaultObjectFactory::instance()->create("SimpleObj")); EXPECT_TRUE(s != NULL); } { - DemoPdmObject* s = NULL; - s = dynamic_cast (caf::PdmDefaultObjectFactory::instance()->create("DemoPdmObject")); + DemoPdmObject* s = dynamic_cast (caf::PdmDefaultObjectFactory::instance()->create("DemoPdmObject")); EXPECT_TRUE(s != NULL); delete s; } { - InheritedDemoObj* s = NULL; - s = dynamic_cast (caf::PdmDefaultObjectFactory::instance()->create("InheritedDemoObj")); + InheritedDemoObj* s = dynamic_cast (caf::PdmDefaultObjectFactory::instance()->create("InheritedDemoObj")); EXPECT_TRUE(s != NULL); } { - caf::PdmDocument* s = NULL; - s = dynamic_cast (caf::PdmDefaultObjectFactory::instance()->create("PdmDocument")); + caf::PdmDocument* s = dynamic_cast (caf::PdmDefaultObjectFactory::instance()->create("PdmDocument")); EXPECT_TRUE(s != NULL); } { - caf::PdmObjectGroup* s = NULL; - s = dynamic_cast (caf::PdmDefaultObjectFactory::instance()->create("PdmObjectGroup")); + caf::PdmObjectGroup* s = dynamic_cast (caf::PdmDefaultObjectFactory::instance()->create("PdmObjectGroup")); EXPECT_TRUE(s != NULL); } @@ -941,7 +956,6 @@ TEST(BaseTest, PdmReferenceHelper) s3->m_position = 3000; InheritedDemoObj* ihd1 = new InheritedDemoObj; - caf::PdmChildArrayFieldHandle* listField = &(ihd1->m_simpleObjectsField); ihd1->m_simpleObjectsField.push_back(new SimpleObj); ihd1->m_simpleObjectsField.push_back(s1); diff --git a/Fwk/AppFwk/cafTests/cafTestApplication/MainWindow.cpp b/Fwk/AppFwk/cafTests/cafTestApplication/MainWindow.cpp index 35a053a93a..8c38ff6ea9 100644 --- a/Fwk/AppFwk/cafTests/cafTestApplication/MainWindow.cpp +++ b/Fwk/AppFwk/cafTests/cafTestApplication/MainWindow.cpp @@ -69,6 +69,10 @@ class SmallDemoPdmObject: public caf::PdmObject m_proxyDoubleField = 0; if (!(m_proxyDoubleField == 3)) { std::cout << "Double is not 3 " << std::endl; } + CAF_PDM_InitFieldNoDefault(&m_multiSelectList, "SelectedItems", " ", "", "", ""); + m_multiSelectList.xmlCapability()->setIOReadable(false); + m_multiSelectList.xmlCapability()->setIOWritable(false); + m_multiSelectList.uiCapability()->setUiEditorTypeName(caf::PdmUiListEditor::uiEditorTypeName()); } @@ -77,6 +81,9 @@ class SmallDemoPdmObject: public caf::PdmObject caf::PdmField m_textField; caf::PdmProxyValueField m_proxyDoubleField; + caf::PdmField > m_multiSelectList; + + caf::PdmField m_toggleField; virtual caf::PdmFieldHandle* objectToggleField() { diff --git a/Fwk/AppFwk/cafUserInterface/CMakeLists.txt b/Fwk/AppFwk/cafUserInterface/CMakeLists.txt index a8bedae088..deae069417 100644 --- a/Fwk/AppFwk/cafUserInterface/CMakeLists.txt +++ b/Fwk/AppFwk/cafUserInterface/CMakeLists.txt @@ -20,8 +20,10 @@ include_directories ( set( QOBJECT_HEADERS cafPdmUiCheckBoxDelegate.h cafPdmUiCheckBoxEditor.h + cafPdmUiCheckBoxTristateEditor.h cafPdmUiColorEditor.h cafPdmUiComboBoxEditor.h + cafPdmUiDefaultObjectEditor.h cafPdmUiDoubleSliderEditor.h cafPdmUiFilePathEditor.h cafPdmUiLineEditor.h @@ -41,6 +43,7 @@ set( QOBJECT_HEADERS cafPdmUiTreeViewModel.h cafPdmUiTreeViewEditor.h cafUiProcess.h + QMinimizePanel.h ) if ( (${CMAKE_VERSION} VERSION_LESS 2.8.6) OR (NOT CMAKE_AUTOMOC) ) @@ -55,6 +58,8 @@ set( PROJECT_FILES cafPdmUiCheckBoxDelegate.h cafPdmUiCheckBoxEditor.cpp cafPdmUiCheckBoxEditor.h + cafPdmUiCheckBoxTristateEditor.cpp + cafPdmUiCheckBoxTristateEditor.h cafPdmUiColorEditor.cpp cafPdmUiColorEditor.h cafPdmUiComboBoxEditor.cpp @@ -118,6 +123,8 @@ set( PROJECT_FILES cafProgressInfo.h cafUiProcess.cpp cafUiProcess.h + QMinimizePanel.cpp + QMinimizePanel.h ) add_library( ${PROJECT_NAME} @@ -134,7 +141,7 @@ target_link_libraries ( ${PROJECT_NAME} ${QT_LIBRARIES} ) -if (CAF_USE_COTIRE) +if (COMMAND cotire) cotire(${PROJECT_NAME}) # make sure the unity target is included in the active builds to trigger rebuild before debug diff --git a/Fwk/AppFwk/cafUserInterface/QMinimizePanel.cpp b/Fwk/AppFwk/cafUserInterface/QMinimizePanel.cpp new file mode 100644 index 0000000000..9a08d6dbd4 --- /dev/null +++ b/Fwk/AppFwk/cafUserInterface/QMinimizePanel.cpp @@ -0,0 +1,295 @@ +//################################################################################################## +// +// QMinimizePanel +// Copyright (C) 2017 Ceetron Solutions AS +// +// This class may be used under the terms of either the GNU General Public License or +// the GNU Lesser General Public License as follows: +// +// GNU General Public License Usage +// This library 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. +// +// This library 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 <> +// for more details. +// +// GNU Lesser General Public License Usage +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library 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 Lesser General Public License at <> +// for more details. +// +//################################################################################################## + +#include "QMinimizePanel.h" + +#include +#include +#include +#include +#include +#include + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- + +static const struct { + unsigned int width; + unsigned int height; + unsigned int bytes_per_pixel; /* 2:RGB16, 3:RGB, 4:RGBA */ + unsigned char pixel_data[7 * 10 * 4 + 1]; +} expandDownArrow = { + 7, 10, 4, + "QRY\317445A\0\0\0\0\0\0\0\0\0\0\0\0""445AJJN\317OQW\256OPW\317445#\0\0\0" + "\0""445#IJP\317HIN\256445#MOT\317LMS\317445#IJP\317GHM\317445#\0\0\0\0""4" + "45#DEK\317??C\317BBG\317445#\0\0\0\0\0\0\0\0\0\0\0\0""445#>?B\317445#\0\0" + "\0\0\0\0\0\0LNT\317445A\0\0\0\0\0\0\0\0\0\0\0\0""445ACEI\317JKR\256IJP\317" + "445#\0\0\0\0""445#DEH\317BCJ\256445#GHO\317EGK\317445#DEH\317BDI\317445#" + "\0\0\0\0""445#@AE\317??C\317??B\317445#\0\0\0\0\0\0\0\0\0\0\0\0""445#<?B\317445#\0\0\0\0\0\0\0\0\0\0\0\0" + """445#DEK\317??C\317BBG\317445#\0\0\0\0""445#MOT\317LMS\317445#IJP\317GH" + "M\317445#OQW\256OPW\317445#\0\0\0\0""445#IJP\317HIN\256QRY\317445A\0\0\0" + "\0\0\0\0\0\0\0\0\0""445AJJN\317", +}; + +QIcon createExpandUpIcon() +{ + QImage img(expandUpArrow.pixel_data,expandUpArrow.width, expandUpArrow.height, QImage::Format_ARGB32 ); + QPixmap pxMap; + pxMap = QPixmap::fromImage(img); + + return QIcon(pxMap); +} + +static const QIcon& expandUpIcon() +{ + static QIcon expandUpIcon(createExpandUpIcon()); + return expandUpIcon; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QMinimizePanel::QMinimizePanel(QWidget* parent/*=0*/) +{ + this->initialize(""); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QMinimizePanel::QMinimizePanel(const QString &title, QWidget* parent/*=0*/) +{ + this->initialize(title); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void QMinimizePanel::initialize(const QString &title) +{ + m_titleFrame = new QFrame(this); + m_titleFrame->setFrameStyle(QFrame::Box | QFrame::Plain); + m_titleFrame->setAutoFillBackground(true); + + { + QLinearGradient titleGrad(QPointF(0, 0), QPointF(0, 1)); + titleGrad.setCoordinateMode(QGradient::StretchToDeviceMode); + titleGrad.setColorAt(0, QColor(255, 255, 255, 20)); + titleGrad.setColorAt(1, QColor(0, 0, 0, 30)); + + QPalette titleFramePalette = m_titleFrame->palette(); + titleFramePalette.setBrush(QPalette::Window, titleGrad); + titleFramePalette.setBrush(QPalette::Foreground, titleFramePalette.dark()); + m_titleFrame->setPalette(titleFramePalette); + } + + m_titleLabel = new QLabel(title, m_titleFrame); + m_titleLabel->setPalette(QApplication::palette()); // To avoid title foreground color bleeding through + + m_collapseButton = new QPushButton( m_titleFrame); + m_collapseButton->setFlat(true); + m_collapseButton->setIcon(expandUpIcon()); + + m_contentFrame = new QFrame(this); + m_contentFrame->setFrameStyle(QFrame::StyledPanel | QFrame::Plain); + m_contentFrame->setAutoFillBackground(true); + + QPalette contentFramePalette = m_contentFrame->palette(); + contentFramePalette.setBrush(QPalette::Window, QColor(255,250,250,85)); + m_contentFrame->setPalette(contentFramePalette); + + connect(m_collapseButton, SIGNAL(clicked()),this, SLOT(toggleExpanded()) ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QMinimizePanel::~QMinimizePanel() +{ + +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void QMinimizePanel::setTitle(const QString& title) +{ + m_titleLabel->setText(title); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString QMinimizePanel::title() const +{ + return m_titleLabel->text(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QSize QMinimizePanel::sizeHint() const +{ + QSize labelSize = m_titleLabel->sizeHint(); + QSize titleBarHint = labelSize + QSize(4 + labelSize.height() + 8 - 2 + 1, 8); + + if (!m_contentFrame->isHidden()) + { + QSize titleBarMin(0, labelSize.height() + 8); + QSize contentsMin(m_contentFrame->sizeHint()); + QSize total = contentsMin.expandedTo(titleBarMin); + total.rheight() += titleBarMin.height(); + + return total; + } + else + { + return titleBarHint; + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void QMinimizePanel::setExpanded(bool isExpanded) +{ + if (m_contentFrame->isHidden() != isExpanded) return; + + m_contentFrame->setVisible(isExpanded); + isExpanded ? m_collapseButton->setIcon(expandUpIcon()) : m_collapseButton->setIcon(expandDownIcon()); + this->QWidget::updateGeometry(); + + emit expandedChanged(isExpanded); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void QMinimizePanel::toggleExpanded() +{ + setExpanded(m_contentFrame->isHidden()); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QSize QMinimizePanel::minimumSizeHint() const +{ + QSize labelSize = m_titleLabel->sizeHint(); + QSize titleBarHint = labelSize + QSize(4 + labelSize.height() + 8 - 2 + 1, 8); + + if (!m_contentFrame->isHidden()) + { + QSize titleBarMin(0, labelSize.height() + 8 ); + QSize contentsMin(m_contentFrame->minimumSizeHint()); + QSize total = contentsMin.expandedTo(titleBarMin); + total.rheight() += titleBarMin.height(); + + return total; + } + else + { + return titleBarHint; + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void QMinimizePanel::resizeEvent(QResizeEvent *resizeEv ) +{ + QWidget::updateGeometry(); + + int width = resizeEv->size().width(); + int heigth = resizeEv->size().height(); + int labelHeight = m_titleLabel->sizeHint().height(); + int titleHeight = labelHeight + 8; + + int buttonSize = titleHeight - 2; + + m_titleFrame->setGeometry(0,0,width, titleHeight); + m_titleLabel->setGeometry( 4, titleHeight - labelHeight - 4, width - 4 - buttonSize - 1, labelHeight); + m_collapseButton->setGeometry(width - buttonSize - 1, 1, buttonSize, buttonSize); + + m_contentFrame->setGeometry(0, titleHeight-1, width, heigth - (titleHeight-1)); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool QMinimizePanel::event(QEvent* event) +{ + if (event->type() == QEvent::LayoutRequest) + { + this->QWidget::updateGeometry(); + } + + return this->QWidget::event(event); +} diff --git a/Fwk/AppFwk/cafUserInterface/QMinimizePanel.h b/Fwk/AppFwk/cafUserInterface/QMinimizePanel.h new file mode 100644 index 0000000000..f1738b58d8 --- /dev/null +++ b/Fwk/AppFwk/cafUserInterface/QMinimizePanel.h @@ -0,0 +1,85 @@ +//################################################################################################## +// +// QMinimizePanel +// Copyright (C) 2017 Ceetron Solutions AS +// +// This class may be used under the terms of either the GNU General Public License or +// the GNU Lesser General Public License as follows: +// +// GNU General Public License Usage +// This library 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. +// +// This library 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 <> +// for more details. +// +// GNU Lesser General Public License Usage +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library 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 Lesser General Public License at <> +// for more details. +// +//################################################################################################## + +#pragma once + +#include + +class QFrame; +class QLabel; +class QPushButton; + +//================================================================================================== +// +// +// +//================================================================================================== +class QMinimizePanel : public QWidget +{ + Q_OBJECT +public: + explicit QMinimizePanel(QWidget* parent=0); + explicit QMinimizePanel(const QString &title, QWidget* parent=0); + ~QMinimizePanel(); + + QFrame* contentFrame() { return m_contentFrame; } + void setTitle (const QString& title); + QString title() const; + + virtual QSize sizeHint() const override; + +public slots: + void setExpanded(bool isExpanded); + void toggleExpanded(); + +signals: + void expandedChanged(bool isExpanded); + +public: + virtual QSize minimumSizeHint() const override; + +protected: + QFrame* m_titleFrame; + QLabel* m_titleLabel; + QPushButton* m_collapseButton; + QFrame* m_contentFrame; + + virtual void resizeEvent(QResizeEvent *) override; + virtual bool event(QEvent* event) override; // To catch QEvent::LayoutRequest + +private: + void initialize(const QString &title); +}; diff --git a/Fwk/AppFwk/cafUserInterface/cafAboutDialog.cpp b/Fwk/AppFwk/cafUserInterface/cafAboutDialog.cpp index 5f66d2dd58..ce5716554c 100644 --- a/Fwk/AppFwk/cafUserInterface/cafAboutDialog.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafAboutDialog.cpp @@ -36,13 +36,13 @@ #include "cafAboutDialog.h" +#include "cafAssert.h" #include #include #include #include #include -#include namespace caf { @@ -60,7 +60,7 @@ namespace caf { /// //-------------------------------------------------------------------------------------------------- AboutDialog::AboutDialog(QWidget* parent) -: QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint) + : QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint) { m_isCreated = false; @@ -80,7 +80,7 @@ AboutDialog::AboutDialog(QWidget* parent) //-------------------------------------------------------------------------------------------------- void AboutDialog::setApplicationName(const QString& appName) { - assert(!m_isCreated); + CAF_ASSERT(!m_isCreated); m_appName = appName; } @@ -90,7 +90,7 @@ void AboutDialog::setApplicationName(const QString& appName) //-------------------------------------------------------------------------------------------------- void AboutDialog::setApplicationVersion(const QString& ver) { - assert(!m_isCreated); + CAF_ASSERT(!m_isCreated); m_appVersion = ver; } @@ -100,7 +100,7 @@ void AboutDialog::setApplicationVersion(const QString& ver) //-------------------------------------------------------------------------------------------------- void AboutDialog::setCopyright(const QString& copyright) { - assert(!m_isCreated); + CAF_ASSERT(!m_isCreated); m_appCopyright = copyright; } @@ -110,7 +110,7 @@ void AboutDialog::setCopyright(const QString& copyright) //-------------------------------------------------------------------------------------------------- void AboutDialog::showQtVersion(bool show) { - assert(!m_isCreated); + CAF_ASSERT(!m_isCreated); m_showQtVersion = show; } @@ -120,12 +120,12 @@ void AboutDialog::showQtVersion(bool show) //-------------------------------------------------------------------------------------------------- void AboutDialog::addVersionEntry(const QString& verLabel, const QString& verText) { - assert(!m_isCreated); + CAF_ASSERT(!m_isCreated); m_verLabels.push_back(verLabel); m_verTexts.push_back(verText); - assert(m_verLabels.size() == m_verTexts.size()); + CAF_ASSERT(m_verLabels.size() == m_verTexts.size()); } @@ -134,7 +134,7 @@ void AboutDialog::addVersionEntry(const QString& verLabel, const QString& verTex //-------------------------------------------------------------------------------------------------- void AboutDialog::setIsDebugBuild(bool isDebugBuild) { - assert(!m_isCreated); + CAF_ASSERT(!m_isCreated); m_isDebugBuild = isDebugBuild; } @@ -145,7 +145,7 @@ void AboutDialog::setIsDebugBuild(bool isDebugBuild) void AboutDialog::create() { // Only allowed to call once - assert(!m_isCreated); + CAF_ASSERT(!m_isCreated); // Only show app info if app name is non-empty bool showAppInfo = !m_appName.isEmpty(); @@ -180,7 +180,7 @@ void AboutDialog::create() appInfoLayout->setSpacing(3); // Always do app name - assert(!m_appName.isEmpty()); + CAF_ASSERT(!m_appName.isEmpty()); QLabel* appNameLabel = new QLabel(this); QFont appNameFont(appNameLabel->font()); @@ -245,7 +245,7 @@ void AboutDialog::create() // Custom specified labels if (m_verLabels.size() > 0) { - assert(m_verLabels.size() == m_verTexts.size()); + CAF_ASSERT(m_verLabels.size() == m_verTexts.size()); int i; for (i = 0; i < m_verLabels.size(); i++) diff --git a/Fwk/AppFwk/cafUserInterface/cafAboutDialog.h b/Fwk/AppFwk/cafUserInterface/cafAboutDialog.h index 3fa4c8ad5e..e7ff92341f 100644 --- a/Fwk/AppFwk/cafUserInterface/cafAboutDialog.h +++ b/Fwk/AppFwk/cafUserInterface/cafAboutDialog.h @@ -52,7 +52,7 @@ namespace caf { class AboutDialog : public QDialog { public: - AboutDialog(QWidget* parent); + explicit AboutDialog(QWidget* parent); void setApplicationName(const QString& appName); void setApplicationVersion(const QString& ver); diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiCheckBoxDelegate.h b/Fwk/AppFwk/cafUserInterface/cafPdmUiCheckBoxDelegate.h index 8908dc38a9..ca50434112 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiCheckBoxDelegate.h +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiCheckBoxDelegate.h @@ -52,7 +52,7 @@ class PdmUiCheckBoxDelegate : public QStyledItemDelegate Q_OBJECT public: - PdmUiCheckBoxDelegate( QObject* pParent = 0 ); + explicit PdmUiCheckBoxDelegate( QObject* pParent = 0 ); virtual ~PdmUiCheckBoxDelegate(); virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiCheckBoxEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiCheckBoxEditor.cpp index 7c83fe3551..d5806c27f4 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiCheckBoxEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiCheckBoxEditor.cpp @@ -46,7 +46,6 @@ #include "cafFactory.h" -#include namespace caf @@ -60,8 +59,8 @@ CAF_PDM_UI_FIELD_EDITOR_SOURCE_INIT(PdmUiCheckBoxEditor); //-------------------------------------------------------------------------------------------------- void PdmUiCheckBoxEditor::configureAndUpdateUi(const QString& uiConfigName) { - assert(!m_checkBox.isNull()); - assert(!m_label.isNull()); + CAF_ASSERT(!m_checkBox.isNull()); + CAF_ASSERT(!m_label.isNull()); PdmUiCheckBoxEditorAttribute attributes; caf::PdmUiObjectHandle* uiObject = uiObj(field()->fieldHandle()->ownerObject()); diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiCheckBoxTristateEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiCheckBoxTristateEditor.cpp new file mode 100644 index 0000000000..5463c3f016 --- /dev/null +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiCheckBoxTristateEditor.cpp @@ -0,0 +1,112 @@ + + +#include "cafPdmUiCheckBoxTristateEditor.h" + +#include "cafPdmUiDefaultObjectEditor.h" + +#include "cafPdmObject.h" +#include "cafPdmUiFieldEditorHandle.h" +#include "cafPdmUiOrdering.h" +#include "cafPdmField.h" + +#include "cafFactory.h" +#include "cafTristate.h" + + + +namespace caf +{ + +CAF_PDM_UI_FIELD_EDITOR_SOURCE_INIT(PdmUiCheckBoxTristateEditor); + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void PdmUiCheckBoxTristateEditor::configureAndUpdateUi(const QString& uiConfigName) +{ + CAF_ASSERT(!m_checkBox.isNull()); + CAF_ASSERT(!m_label.isNull()); + + { + QIcon ic = field()->uiIcon(uiConfigName); + if (!ic.isNull()) + { + m_label->setPixmap(ic.pixmap(ic.actualSize(QSize(64, 64)))); + } + else + { + m_label->setText(field()->uiName(uiConfigName)); + } + } + + m_label->setEnabled(!field()->isUiReadOnly(uiConfigName)); + m_label->setToolTip(field()->uiToolTip(uiConfigName)); + + m_checkBox->setEnabled(!field()->isUiReadOnly(uiConfigName)); + m_checkBox->setToolTip(field()->uiToolTip(uiConfigName)); + + Tristate state = field()->uiValue().value(); + + if (state == Tristate::State::True) + { + m_checkBox->setCheckState(Qt::Checked); + } + else if (state == Tristate::State::PartiallyTrue) + { + m_checkBox->setCheckState(Qt::PartiallyChecked); + } + else if (state == Tristate::State::False) + { + m_checkBox->setCheckState(Qt::Unchecked); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QWidget* PdmUiCheckBoxTristateEditor::createEditorWidget(QWidget * parent) +{ + m_checkBox = new QCheckBox(parent); + m_checkBox->setTristate(true); + + connect(m_checkBox, SIGNAL(clicked(bool)), this, SLOT(slotClicked(bool))); + return m_checkBox; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QWidget* PdmUiCheckBoxTristateEditor::createLabelWidget(QWidget * parent) +{ + m_label = new QLabel(parent); + return m_label; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void PdmUiCheckBoxTristateEditor::slotClicked(bool) +{ + Tristate state; + + if (m_checkBox->checkState() == Qt::Checked) + { + state = Tristate::State::True; + } + else if (m_checkBox->checkState() == Qt::PartiallyChecked) + { + state = Tristate::State::PartiallyTrue; + } + else if (m_checkBox->checkState() == Qt::Unchecked) + { + state = Tristate::State::False; + } + + QVariant v = QVariant::fromValue(state); + + this->setValueToField(v); +} + + +} // end namespace caf diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiCheckBoxTristateEditor.h b/Fwk/AppFwk/cafUserInterface/cafPdmUiCheckBoxTristateEditor.h new file mode 100644 index 0000000000..e372c1bde4 --- /dev/null +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiCheckBoxTristateEditor.h @@ -0,0 +1,38 @@ + + +#pragma once + +#include "cafPdmUiFieldEditorHandle.h" + +#include +#include +#include +#include + +namespace caf +{ + +class PdmUiCheckBoxTristateEditor : public PdmUiFieldEditorHandle +{ + Q_OBJECT + CAF_PDM_UI_FIELD_EDITOR_HEADER_INIT; + +public: + PdmUiCheckBoxTristateEditor() {} + virtual ~PdmUiCheckBoxTristateEditor() {} + +protected: + virtual QWidget* createEditorWidget(QWidget* parent); + virtual QWidget* createLabelWidget(QWidget* parent); + virtual void configureAndUpdateUi(const QString& uiConfigName); + +protected slots: + void slotClicked(bool); + +private: + QPointer m_checkBox; + QPointer m_label; +}; + + +} // end namespace caf diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiColorEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiColorEditor.cpp index 630a8bdf5b..8c8e59e05f 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiColorEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiColorEditor.cpp @@ -53,8 +53,6 @@ #include #include -#include - namespace caf { @@ -75,7 +73,7 @@ PdmUiColorEditor::PdmUiColorEditor() //-------------------------------------------------------------------------------------------------- void PdmUiColorEditor::configureAndUpdateUi(const QString& uiConfigName) { - assert(!m_label.isNull()); + CAF_ASSERT(!m_label.isNull()); QIcon ic = field()->uiIcon(uiConfigName); if (!ic.isNull()) @@ -143,8 +141,6 @@ QWidget* PdmUiColorEditor::createLabelWidget(QWidget * parent) //-------------------------------------------------------------------------------------------------- void PdmUiColorEditor::colorSelectionClicked() { - bool ok = false; - QColorDialog::ColorDialogOptions flags; if (m_attributes.showAlpha) { diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiComboBoxEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiComboBoxEditor.cpp index a360b886a3..ce48122c9e 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiComboBoxEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiComboBoxEditor.cpp @@ -45,8 +45,7 @@ #include #include - -#include +#include namespace caf @@ -77,12 +76,10 @@ void PdmUiComboBoxEditor::configureAndUpdateUi(const QString& uiConfigName) { m_comboBox->setEnabled(!field()->isUiReadOnly(uiConfigName)); - // Demo code for attribute retreival when becoming relevant - // PdmUiComboBoxEditorAttribute attributes; - // field()->ownerObject()->editorAttribute(field(), uiConfigName, &attributes); - - bool fromMenuOnly = false; + bool fromMenuOnly = true; QList options = field()->valueOptions(&fromMenuOnly); + CAF_ASSERT(fromMenuOnly); // Not supported + m_comboBox->blockSignals(true); m_comboBox->clear(); if (!options.isEmpty()) @@ -102,14 +99,66 @@ void PdmUiComboBoxEditor::configureAndUpdateUi(const QString& uiConfigName) } } +//-------------------------------------------------------------------------------------------------- +// Special class used to prevent a combo box to steal focus when scrolling +// the QScrollArea using the mouse wheel +// +// Based on +// http://stackoverflow.com/questions/5821802/qspinbox-inside-a-qscrollarea-how-to-prevent-spin-box-from-stealing-focus-when +//-------------------------------------------------------------------------------------------------- +class CustomQComboBox : public QComboBox +{ +public: + explicit CustomQComboBox(QWidget* parent = 0) + : QComboBox(parent) + {} + + //-------------------------------------------------------------------------------------------------- + /// + //-------------------------------------------------------------------------------------------------- + void wheelEvent(QWheelEvent *e) + { + if (hasFocus()) + { + QComboBox::wheelEvent(e); + } + else + { + // Ignore the event to make sure event is handled by another widget + e->ignore(); + } + } + +protected: + //-------------------------------------------------------------------------------------------------- + /// + //-------------------------------------------------------------------------------------------------- + virtual void focusInEvent(QFocusEvent* e) override + { + setFocusPolicy(Qt::WheelFocus); + QComboBox::focusInEvent(e); + } + + //-------------------------------------------------------------------------------------------------- + /// + //-------------------------------------------------------------------------------------------------- + virtual void focusOutEvent(QFocusEvent* e) override + { + setFocusPolicy(Qt::StrongFocus); + QComboBox::focusOutEvent(e); + } +}; //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- QWidget* PdmUiComboBoxEditor::createEditorWidget(QWidget * parent) { - m_comboBox = new QComboBox(parent); + m_comboBox = new CustomQComboBox(parent); + m_comboBox->setFocusPolicy(Qt::StrongFocus); + connect(m_comboBox, SIGNAL(activated(int)), this, SLOT(slotIndexActivated(int))); + return m_comboBox; } diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiDefaultObjectEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiDefaultObjectEditor.cpp index 9b542389c6..e1caef3c5a 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiDefaultObjectEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiDefaultObjectEditor.cpp @@ -50,8 +50,6 @@ #include #include -#include - namespace caf @@ -70,6 +68,7 @@ CAF_PDM_UI_REGISTER_DEFAULT_FIELD_EDITOR(PdmUiListEditor, std::vector); CAF_PDM_UI_REGISTER_DEFAULT_FIELD_EDITOR(PdmUiListEditor, std::vector); CAF_PDM_UI_REGISTER_DEFAULT_FIELD_EDITOR(PdmUiListEditor, std::vector); + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -85,7 +84,7 @@ PdmUiDefaultObjectEditor::~PdmUiDefaultObjectEditor() { // If there are field editor present, the usage of this editor has not cleared correctly // The intended usage is to call the method setPdmObject(NULL) before closing the dialog - assert(m_fieldViews.size() == 0); + CAF_ASSERT(m_fieldViews.size() == 0); } //-------------------------------------------------------------------------------------------------- @@ -158,8 +157,8 @@ void PdmUiDefaultObjectEditor::configureAndUpdateUi(const QString& uiConfigName) // Remove all unmentioned group boxes - std::map >::iterator itOld; - std::map >::iterator itNew; + std::map >::iterator itOld; + std::map >::iterator itNew; for (itOld = m_groupBoxes.begin(); itOld != m_groupBoxes.end(); ++itOld ) { @@ -188,7 +187,7 @@ void PdmUiDefaultObjectEditor::cleanupBeforeSettingPdmObject() m_newGroupBoxes.clear(); - std::map >::iterator groupIt; + std::map >::iterator groupIt; for (groupIt = m_groupBoxes.begin(); groupIt != m_groupBoxes.end(); ++groupIt) { if (!groupIt->second.isNull()) groupIt->second->deleteLater(); @@ -215,29 +214,30 @@ void PdmUiDefaultObjectEditor::recursiveSetupFieldsAndGroups(const std::vector

& groupChildren = group->uiItems(); QString groupBoxKey = uiItems[i]->uiName(); - QGroupBox* groupBox = NULL; + QMinimizePanel* groupBox = NULL; QGridLayout* groupBoxLayout = NULL; // Find or create groupBox - std::map >::iterator it; + std::map >::iterator it; it = m_groupBoxes.find(groupBoxKey); if (it == m_groupBoxes.end()) { - groupBox = new QGroupBox( parent ); + groupBox = new QMinimizePanel( parent ); groupBox->setTitle(uiItems[i]->uiName()); groupBoxLayout = new QGridLayout(); - groupBox->setLayout(groupBoxLayout); + groupBox->contentFrame()->setLayout(groupBoxLayout); + connect(groupBox, SIGNAL(expandedChanged(bool)), this, SLOT(groupBoxExpandedStateToggled(bool))); m_newGroupBoxes[groupBoxKey] = groupBox; } else { groupBox = it->second; - assert(groupBox); + CAF_ASSERT(groupBox); - groupBoxLayout = dynamic_cast(groupBox->layout()); - assert(groupBoxLayout); + groupBoxLayout = dynamic_cast(groupBox->contentFrame()->layout()); + CAF_ASSERT(groupBoxLayout); m_newGroupBoxes[groupBoxKey] = groupBox; } @@ -245,7 +245,12 @@ void PdmUiDefaultObjectEditor::recursiveSetupFieldsAndGroups(const std::vector

addWidget(groupBox, currentRowIndex, 0, 1, 2); - recursiveSetupFieldsAndGroups(groupChildren, groupBox, groupBoxLayout, uiConfigName); + + // Set Expanded state + bool isExpanded = isUiGroupExpanded(group); + groupBox->setExpanded(isExpanded); + + recursiveSetupFieldsAndGroups(groupChildren, groupBox->contentFrame(), groupBoxLayout, uiConfigName); currentRowIndex++; } else @@ -259,32 +264,7 @@ void PdmUiDefaultObjectEditor::recursiveSetupFieldsAndGroups(const std::vector

uiEditorTypeName(uiConfigName).isEmpty() ) - { - fieldEditor = caf::Factory::instance()->create(field->uiEditorTypeName(uiConfigName)); - } - else - { - // Find the default field editor - - QString editorTypeName = qStringTypeName(*(field->fieldHandle())); - - // Handle a single value field with valueOptions: Make a combobox - - if (field->toUiBasedQVariant().type() != QVariant::List) - { - bool useOptionsOnly = true; - QList options = field->valueOptions( &useOptionsOnly); - - if (!options.empty()) - { - editorTypeName = caf::PdmUiComboBoxEditor::uiEditorTypeName(); - } - } - - fieldEditor = caf::Factory::instance()->create(editorTypeName); - } + fieldEditor = PdmUiFieldEditorHelper::fieldEditorForField(field, uiConfigName); if (fieldEditor) { @@ -302,7 +282,7 @@ void PdmUiDefaultObjectEditor::recursiveSetupFieldsAndGroups(const std::vector

hasForcedExpandedState()) return uiGroup->forcedExpandedState(); + + auto kwMapPair = m_objectKeywordGroupUiNameExpandedState.find(pdmObject()->xmlCapability()->classKeyword()); + if ( kwMapPair != m_objectKeywordGroupUiNameExpandedState.end() ) + { + QString uiName = uiGroup->uiName(); + + auto uiNameExpStatePair = kwMapPair->second.find(uiName); + if ( uiNameExpStatePair != kwMapPair->second.end() ) + { + return uiNameExpStatePair->second; + } + } + + return uiGroup->isExpandedByDefault(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -401,7 +403,7 @@ void PdmUiDefaultObjectEditor::recursiveVerifyUniqueNames(const std::vectorfind(groupBoxKey) != groupNames->end()) { // It is not supported to have two groups with identical names - assert(false); + CAF_ASSERT(false); } else { @@ -418,7 +420,7 @@ void PdmUiDefaultObjectEditor::recursiveVerifyUniqueNames(const std::vectorfind(fieldKeyword) != fieldKeywordNames->end()) { // It is not supported to have two fields with identical names - assert(false); + CAF_ASSERT(false); } else { @@ -428,5 +430,65 @@ void PdmUiDefaultObjectEditor::recursiveVerifyUniqueNames(const std::vectoruiEditorTypeName(uiConfigName).isEmpty()) + { + fieldEditor = caf::Factory::instance()->create(field->uiEditorTypeName(uiConfigName)); + } + else + { + // Find the default field editor + QString fieldTypeName = qStringTypeName(*(field->fieldHandle())); + + if (fieldTypeName.indexOf("PdmPtrField") != -1) + { + fieldTypeName = caf::PdmUiComboBoxEditor::uiEditorTypeName(); + } + else if (fieldTypeName.indexOf("PdmPtrArrayField") != -1) + { + fieldTypeName = caf::PdmUiListEditor::uiEditorTypeName(); + } + else if (field->toUiBasedQVariant().type() != QVariant::List) + { + // Handle a single value field with valueOptions: Make a combobox + + bool useOptionsOnly = true; + QList options = field->valueOptions(&useOptionsOnly); + CAF_ASSERT(useOptionsOnly); // Not supported + + if (!options.empty()) + { + fieldTypeName = caf::PdmUiComboBoxEditor::uiEditorTypeName(); + } + } + + fieldEditor = caf::Factory::instance()->create(fieldTypeName); + } + + return fieldEditor; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void PdmUiDefaultObjectEditor::groupBoxExpandedStateToggled(bool isExpanded) +{ + if (!this->pdmObject()->xmlCapability()) return; + + QString objKeyword = this->pdmObject()->xmlCapability()->classKeyword(); + QMinimizePanel* panel = dynamic_cast(this->sender()); + + if (!panel) return; + + m_objectKeywordGroupUiNameExpandedState[objKeyword][panel->title()] = isExpanded; + +} } // end namespace caf diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiDefaultObjectEditor.h b/Fwk/AppFwk/cafUserInterface/cafPdmUiDefaultObjectEditor.h index 6ac2e42adf..332da51af7 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiDefaultObjectEditor.h +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiDefaultObjectEditor.h @@ -45,6 +45,7 @@ #include #include #include +#include "QMinimizePanel.h" class QGridLayout; @@ -52,6 +53,15 @@ namespace caf { class PdmUiFieldEditorHandle; class PdmUiItem; +class PdmUiGroup; + + +class PdmUiFieldEditorHelper +{ +public: + static PdmUiFieldEditorHandle* fieldEditorForField(PdmUiFieldHandle* fieldHandle, const QString& uiConfigName); +}; + //================================================================================================== /// The default editor for PdmObjects. Manages the field editors in a gridlayout vertically @@ -59,6 +69,7 @@ class PdmUiItem; class PdmUiDefaultObjectEditor : public PdmUiObjectEditorHandle { + Q_OBJECT public: PdmUiDefaultObjectEditor(); ~PdmUiDefaultObjectEditor(); @@ -68,16 +79,22 @@ class PdmUiDefaultObjectEditor : public PdmUiObjectEditorHandle virtual void configureAndUpdateUi(const QString& uiConfigName) override; virtual void cleanupBeforeSettingPdmObject() override; +protected slots: + void groupBoxExpandedStateToggled(bool isExpanded); + private: - void recursiveSetupFieldsAndGroups(const std::vector& uiItems, QWidget* parent, QGridLayout* parentLayout, const QString& uiConfigName); - void recursiveVerifyUniqueNames(const std::vector& uiItems, const QString& uiConfigName, std::set* fieldKeywordNames, std::set* groupNames); + void recursiveSetupFieldsAndGroups(const std::vector& uiItems, QWidget* parent, QGridLayout* parentLayout, const QString& uiConfigName); + bool isUiGroupExpanded(const PdmUiGroup* uiGroup); + void recursiveVerifyUniqueNames(const std::vector& uiItems, const QString& uiConfigName, std::set* fieldKeywordNames, std::set* groupNames); std::map m_fieldViews; - std::map > m_groupBoxes; - std::map > m_newGroupBoxes; ///< used temporarily to store the new(complete) set of group boxes + std::map > m_groupBoxes; + std::map > m_newGroupBoxes; ///< used temporarily to store the new(complete) set of group boxes + + QPointer m_mainWidget; + QPointer m_layout; - QPointer m_mainWidget; - QGridLayout* m_layout; + std::map > m_objectKeywordGroupUiNameExpandedState; }; diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiDoubleSliderEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiDoubleSliderEditor.cpp index 18ce56ffba..f1de0f9202 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiDoubleSliderEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiDoubleSliderEditor.cpp @@ -58,7 +58,7 @@ class PdmDoubleValidator : public QDoubleValidator { public: - PdmDoubleValidator(QObject * parent = 0) : QDoubleValidator(parent) + explicit PdmDoubleValidator(QObject * parent = 0) : QDoubleValidator(parent) { } @@ -93,7 +93,7 @@ CAF_PDM_UI_FIELD_EDITOR_SOURCE_INIT(PdmUiDoubleSliderEditor); //-------------------------------------------------------------------------------------------------- void PdmUiDoubleSliderEditor::configureAndUpdateUi(const QString& uiConfigName) { - assert(!m_lineEdit.isNull()); + CAF_ASSERT(!m_lineEdit.isNull()); QIcon ic = field()->uiIcon(uiConfigName); if (!ic.isNull()) diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiFilePathEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiFilePathEditor.cpp index 0b16102795..40a91b2518 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiFilePathEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiFilePathEditor.cpp @@ -49,7 +49,6 @@ #include #include -#include #include "cafFactory.h" #include "qboxlayout.h" #include "qtoolbutton.h" @@ -67,8 +66,8 @@ CAF_PDM_UI_FIELD_EDITOR_SOURCE_INIT(PdmUiFilePathEditor); //-------------------------------------------------------------------------------------------------- void PdmUiFilePathEditor::configureAndUpdateUi(const QString& uiConfigName) { - assert(!m_lineEdit.isNull()); - assert(!m_label.isNull()); + CAF_ASSERT(!m_lineEdit.isNull()); + CAF_ASSERT(!m_label.isNull()); QIcon ic = field()->uiIcon(uiConfigName); if (!ic.isNull()) diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiLineEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiLineEditor.cpp index e46d513fcf..6dc54df6df 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiLineEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiLineEditor.cpp @@ -45,16 +45,16 @@ #include "cafPdmUiOrdering.h" #include "cafSelectionManager.h" +#include #include #include #include -#include -#include #include -#include +#include +#include #include +#include -#include @@ -62,13 +62,12 @@ class PdmUniqueIdValidator : public QValidator { public: PdmUniqueIdValidator(const std::set& usedIds, bool multipleSelectionOfSameFieldsSelected, const QString& errorMessage, QObject* parent) - : QValidator(parent) + : QValidator(parent), + m_usedIds(usedIds), + m_nextValidValue(0), + m_multipleSelectionOfSameFieldsSelected(multipleSelectionOfSameFieldsSelected), + m_errorMessage(errorMessage) { - m_usedIds = usedIds; - m_nextValidValue = 0; - m_multipleSelectionOfSameFieldsSelected = multipleSelectionOfSameFieldsSelected; - m_errorMessage = errorMessage; - computeNextValidId(); } @@ -179,7 +178,21 @@ void PdmUiLineEditor::configureAndUpdateUi(const QString& uiConfigName) if (!m_lineEdit.isNull()) { - m_lineEdit->setEnabled(!field()->isUiReadOnly(uiConfigName)); + bool isReadOnly = field()->isUiReadOnly(uiConfigName); + if (isReadOnly) + { + m_lineEdit->setReadOnly(true); + + m_lineEdit->setStyleSheet("QLineEdit {" + "color: #808080;" + "background-color: #F0F0F0;}"); + } + else + { + m_lineEdit->setReadOnly(false); + m_lineEdit->setStyleSheet(""); + } + m_lineEdit->setToolTip(field()->uiToolTip(uiConfigName)); { @@ -215,8 +228,10 @@ void PdmUiLineEditor::configureAndUpdateUi(const QString& uiConfigName) } - bool fromMenuOnly = false; + bool fromMenuOnly = true; QList enumNames = field()->valueOptions(&fromMenuOnly); + CAF_ASSERT(fromMenuOnly); // Not supported + if (!enumNames.isEmpty() && fromMenuOnly == true) { int enumValue = field()->uiValue().toInt(); @@ -253,7 +268,9 @@ void PdmUiLineEditor::configureAndUpdateUi(const QString& uiConfigName) QWidget* PdmUiLineEditor::createEditorWidget(QWidget * parent) { m_lineEdit = new QLineEdit(parent); + connect(m_lineEdit, SIGNAL(editingFinished()), this, SLOT(slotEditingFinished())); + return m_lineEdit; } diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiListEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiListEditor.cpp index 13eb61c3e1..b9869b89d0 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiListEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiListEditor.cpp @@ -57,8 +57,6 @@ #include -#include - //================================================================================================== /// Helper class used to override flags to disable editable items @@ -66,7 +64,7 @@ class MyStringListModel : public QStringListModel { public: - MyStringListModel(QObject *parent = 0) : m_isItemsEditable(false), QStringListModel(parent) { } + explicit MyStringListModel(QObject *parent = 0) : m_isItemsEditable(false), QStringListModel(parent) { } virtual Qt::ItemFlags flags (const QModelIndex& index) const { @@ -86,6 +84,45 @@ class MyStringListModel : public QStringListModel }; +//================================================================================================== +/// Helper class used to control height of size hint +//================================================================================================== +class QListViewHeightHint : public QListView +{ +public: + explicit QListViewHeightHint(QWidget *parent = 0) + : m_heightHint(-1) + { + } + + //-------------------------------------------------------------------------------------------------- + /// + //-------------------------------------------------------------------------------------------------- + virtual QSize sizeHint() const override + { + QSize mySize = QListView::sizeHint(); + + if (m_heightHint > 0) + { + mySize.setHeight(m_heightHint); + } + + return mySize; + } + + //-------------------------------------------------------------------------------------------------- + /// + //-------------------------------------------------------------------------------------------------- + void setHeightHint(int heightHint) + { + m_heightHint = heightHint; + } + +private: + int m_heightHint; +}; + + namespace caf { @@ -99,12 +136,12 @@ CAF_PDM_UI_FIELD_EDITOR_SOURCE_INIT(PdmUiListEditor); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -PdmUiListEditor::PdmUiListEditor(): m_optionsOnly(false) +PdmUiListEditor::PdmUiListEditor() : + m_isEditOperationsAvailable(true), + m_optionItemCount(0) { } - - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -117,13 +154,13 @@ PdmUiListEditor::~PdmUiListEditor() //-------------------------------------------------------------------------------------------------- void PdmUiListEditor::configureAndUpdateUi(const QString& uiConfigName) { - // TODO: Fix assert here when undoing in testapp + // TODO: Fix CAF_ASSERT( here when undoing in testapp // See PdmUiComboBoxEditor for pattern // This might also apply to other editors - assert(!m_listView.isNull()); - assert(!m_label.isNull()); - assert(m_listView->selectionModel()); + CAF_ASSERT(!m_listView.isNull()); + CAF_ASSERT(!m_label.isNull()); + CAF_ASSERT(m_listView->selectionModel()); QIcon ic = field()->uiIcon(uiConfigName); if (!ic.isNull()) @@ -142,6 +179,14 @@ void PdmUiListEditor::configureAndUpdateUi(const QString& uiConfigName) m_listView->setEnabled(!field()->isUiReadOnly(uiConfigName)); m_listView->setToolTip(field()->uiToolTip(uiConfigName)); + bool optionsOnly = true; + QList options = field()->valueOptions(&optionsOnly); + m_optionItemCount = options.size(); + if (options.size() > 0 || field()->isUiReadOnly(uiConfigName)) + { + m_isEditOperationsAvailable = false; + } + PdmUiListEditorAttribute attributes; caf::PdmUiObjectHandle* uiObject = uiObj(field()->fieldHandle()->ownerObject()); if (uiObject) @@ -152,20 +197,20 @@ void PdmUiListEditor::configureAndUpdateUi(const QString& uiConfigName) myPalette.setColor(QPalette::Base, attributes.m_baseColor); m_listView->setPalette(myPalette); + m_listView->setHeightHint(attributes.m_heightHint); } MyStringListModel* strListModel = dynamic_cast(m_model.data()); - assert(strListModel); + CAF_ASSERT(strListModel); - m_options = field()->valueOptions(&m_optionsOnly); - if (!m_options.isEmpty()) + if (!options.isEmpty()) { - assert(m_optionsOnly); // Handling Additions on the fly not implemented + CAF_ASSERT(optionsOnly); // Handling Additions on the fly not implemented strListModel->setItemsEditable(false); QModelIndex currentItem = m_listView->selectionModel()->currentIndex(); - QStringList texts = PdmOptionItemInfo::extractUiTexts(m_options); + QStringList texts = PdmOptionItemInfo::extractUiTexts(options); strListModel->setStringList(texts); QVariant fieldValue = field()->uiValue(); @@ -231,21 +276,25 @@ void PdmUiListEditor::configureAndUpdateUi(const QString& uiConfigName) } } - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- QWidget* PdmUiListEditor::createEditorWidget(QWidget * parent) { - m_listView = new QListView(parent); + m_listView = new QListViewHeightHint(parent); m_model = new MyStringListModel(m_listView); m_listView->setModel(m_model); connect(m_listView->selectionModel(), SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection& )), this, SLOT(slotSelectionChanged(const QItemSelection&, const QItemSelection& ))); connect(m_model, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)), this, SLOT(slotListItemEdited(const QModelIndex&, const QModelIndex&))); + + // Used to track key press m_listView->installEventFilter(this); + // Used to track mouse events + m_listView->viewport()->installEventFilter(this); + return m_listView; } @@ -263,7 +312,7 @@ QWidget* PdmUiListEditor::createLabelWidget(QWidget * parent) //-------------------------------------------------------------------------------------------------- void PdmUiListEditor::slotSelectionChanged(const QItemSelection & selected, const QItemSelection & deselected) { - if (m_options.isEmpty()) return; + if (m_optionItemCount == 0) return; QVariant fieldValue = field()->uiValue(); if (fieldValue.type() == QVariant::Int || fieldValue.type() == QVariant::UInt) @@ -280,7 +329,7 @@ void PdmUiListEditor::slotSelectionChanged(const QItemSelection & selected, cons QModelIndexList idxList = m_listView->selectionModel()->selectedIndexes(); if (idxList.size() >= 1) { - if (idxList[0].row() < m_options.size()) + if (idxList[0].row() < m_optionItemCount) { this->setValueToField(QVariant(static_cast(idxList[0].row()))); } @@ -290,7 +339,10 @@ void PdmUiListEditor::slotSelectionChanged(const QItemSelection & selected, cons { QModelIndexList idxList = m_listView->selectionModel()->selectedIndexes(); - if (idxList.size() == 1) + QVariant fieldValue = field()->uiValue(); + QList valuesSelectedInField = fieldValue.toList(); + + if (idxList.size() == 1 && valuesSelectedInField.size() == 1) { // NOTE : Workaround for update issue seen on RHEL6 with Qt 4.6.2 // An invalid call to setSelection() from QAbstractItemView::keyPressEvent() causes the stepping using arrow keys @@ -308,7 +360,7 @@ void PdmUiListEditor::slotSelectionChanged(const QItemSelection & selected, cons QList valuesToSetInField; for (int i = 0; i < idxList.size(); ++i) { - if (idxList[i].row() < m_options.size()) + if (idxList[i].row() < m_optionItemCount) { valuesToSetInField.push_back(QVariant(static_cast(idxList[i].row()))); } @@ -317,13 +369,13 @@ void PdmUiListEditor::slotSelectionChanged(const QItemSelection & selected, cons this->setValueToField(valuesToSetInField); } } + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void PdmUiListEditor::slotListItemEdited(const QModelIndex&, const QModelIndex&) { - if (m_optionsOnly) return; - assert(m_options.isEmpty()); // Not supported yet + CAF_ASSERT(m_isEditOperationsAvailable); QStringList uiList = m_model->stringList(); @@ -368,41 +420,66 @@ void PdmUiListEditor::pasteFromString(const QString& content) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool PdmUiListEditor::eventFilter(QObject * listView, QEvent * event) +bool PdmUiListEditor::eventFilter(QObject* object, QEvent * event) { - if (listView == m_listView && event->type() == QEvent::KeyPress) + if (!m_listView) { - if (m_optionsOnly) return false; - assert(m_options.isEmpty()); // Not supported yet - - QKeyEvent* keyEv = static_cast(event); - if (keyEv->key() == Qt::Key_Delete || keyEv->key() == Qt::Key_Backspace ) + return false; + } + if (object == m_listView->viewport() && event->type() == QEvent::MouseMove) + { + QMouseEvent* mouseEvent = dynamic_cast(event); + if (mouseEvent) { - QModelIndexList idxList = m_listView->selectionModel()->selectedIndexes(); - bool isAnyDeleted = false; - while(idxList.size()) + if (mouseEvent->buttons() & Qt::LeftButton + && mouseEvent->modifiers() & Qt::ControlModifier) { - m_model->removeRow(idxList[0].row()); - idxList = m_listView->selectionModel()->selectedIndexes(); - isAnyDeleted = true; + // When Ctrl button is pressed, left mouse button is pressed, and the mouse is moving, + // a possible bug in Qt is observed causing the selection to end up with single item selection + // When returning here without doing anything, system behaves as expected + + // NOTE: The mouse event is handled by the viewport() of the list view, not the list view itself + + return true; } + } + } - if (isAnyDeleted) - { - QStringList uiList = m_model->stringList(); + if (object == m_listView && event->type() == QEvent::KeyPress) + { + QKeyEvent* keyEv = static_cast(event); - // Remove dummy elements specifically at the end of list. + if (m_isEditOperationsAvailable) + { + if (keyEv->key() == Qt::Key_Delete || keyEv->key() == Qt::Key_Backspace ) + { + QModelIndexList idxList = m_listView->selectionModel()->selectedIndexes(); + bool isAnyDeleted = false; + while(idxList.size()) + { + m_model->removeRow(idxList[0].row()); + idxList = m_listView->selectionModel()->selectedIndexes(); + isAnyDeleted = true; + } - QStringList result; - foreach (const QString &str, uiList) + if (isAnyDeleted) { - if (str != "" && str != " ") result += str; + QStringList uiList = m_model->stringList(); + + // Remove dummy elements specifically at the end of list. + + QStringList result; + foreach (const QString &str, uiList) + { + if (str != "" && str != " ") result += str; + } + this->setValueToField(result); } - this->setValueToField(result); + return true; } - return true; } - else if (keyEv->modifiers() & Qt::ControlModifier) + + if (keyEv->modifiers() & Qt::ControlModifier) { if (keyEv->key() == Qt::Key_C) { @@ -415,7 +492,7 @@ bool PdmUiListEditor::eventFilter(QObject * listView, QEvent * event) return true; } } - else if (keyEv->key() == Qt::Key_V) + else if (m_isEditOperationsAvailable && keyEv->key() == Qt::Key_V) { QClipboard* clipboard = QApplication::clipboard(); if (clipboard) diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiListEditor.h b/Fwk/AppFwk/cafUserInterface/cafPdmUiListEditor.h index b68133c632..c088bbf056 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiListEditor.h +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiListEditor.h @@ -39,10 +39,9 @@ #include "cafPdmUiFieldEditorHandle.h" -class QGridLayout; class QStringListModel; class QItemSelection; -class QListView; +class QListViewHeightHint; class QLabel; class QModelIndex; @@ -56,7 +55,7 @@ class PdmUiListEditorAttribute : public PdmUiEditorAttribute { public: PdmUiListEditorAttribute() - : m_baseColor(Qt::white) + : m_heightHint(2000) { QPalette myPalette; @@ -64,7 +63,8 @@ class PdmUiListEditorAttribute : public PdmUiEditorAttribute } public: - QColor m_baseColor; + QColor m_baseColor; + int m_heightHint; }; @@ -95,15 +95,12 @@ protected slots: void pasteFromString(const QString& content); private: - QPointer m_listView; + QPointer m_listView; QPointer m_label; QPointer m_model; - QList m_options; - bool m_optionsOnly; - - - + bool m_isEditOperationsAvailable; + int m_optionItemCount; }; diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiListView.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiListView.cpp index e496a088f3..143f7b5f2d 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiListView.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiListView.cpp @@ -82,7 +82,7 @@ PdmUiListView::~PdmUiListView() //-------------------------------------------------------------------------------------------------- void PdmUiListView::setPdmObject(caf::PdmObjectCollection* object) { - assert(m_listViewEditor); + CAF_ASSERT(m_listViewEditor); m_listViewEditor->setPdmObject(object); } diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiListViewEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiListViewEditor.cpp index 958d994b2d..014efad09e 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiListViewEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiListViewEditor.cpp @@ -48,6 +48,7 @@ + namespace caf { @@ -208,6 +209,9 @@ void caf::UiListViewModelPdm::setPdmData(PdmObjectCollection* objectGroup, const /// //-------------------------------------------------------------------------------------------------- PdmUiListViewEditor::PdmUiListViewEditor() + : + m_tableView(nullptr), + m_tableModelPdm(nullptr) { } @@ -224,19 +228,21 @@ PdmUiListViewEditor::~PdmUiListViewEditor() //-------------------------------------------------------------------------------------------------- QWidget* PdmUiListViewEditor::createWidget(QWidget* parent) { - m_mainWidget = new QWidget(parent); - m_layout = new QVBoxLayout(); - m_mainWidget->setLayout(m_layout); + CAF_ASSERT(parent); + + QWidget* mainWidget = new QWidget(parent); + QVBoxLayout* layout = new QVBoxLayout(); + mainWidget->setLayout(layout); - m_tableModelPdm = new UiListViewModelPdm(m_mainWidget); + m_tableModelPdm = new UiListViewModelPdm(mainWidget); - m_tableView = new QTableView(m_mainWidget); + m_tableView = new QTableView(mainWidget); m_tableView->setShowGrid(false); m_tableView->setModel(m_tableModelPdm); - m_layout->addWidget(m_tableView); + layout->addWidget(m_tableView); - return m_mainWidget; + return mainWidget; } //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiListViewEditor.h b/Fwk/AppFwk/cafUserInterface/cafPdmUiListViewEditor.h index ce2c9c55e4..662100cf00 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiListViewEditor.h +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiListViewEditor.h @@ -78,7 +78,7 @@ class UiListViewModelPdm : public QAbstractTableModel Q_OBJECT public: - UiListViewModelPdm(QObject* parent); + explicit UiListViewModelPdm(QObject* parent); void setPdmData(PdmObjectCollection* objectGroup, const QString& configName); @@ -114,11 +114,8 @@ class PdmUiListViewEditor : public PdmUiObjectEditorHandle virtual void configureAndUpdateUi(const QString& uiConfigName); private: - QPointer m_mainWidget; - QLayout* m_layout; - - QTableView* m_tableView; - UiListViewModelPdm* m_tableModelPdm; + QPointer m_tableView; + UiListViewModelPdm* m_tableModelPdm; }; diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiPropertyView.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiPropertyView.cpp index dd20eeb9c8..1f9408cd1b 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiPropertyView.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiPropertyView.cpp @@ -40,7 +40,37 @@ #include "cafPdmObject.h" #include "cafPdmUiDefaultObjectEditor.h" +#include #include +#include +#include + + + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QVerticalScrollArea::QVerticalScrollArea(QWidget* parent) : + QScrollArea(parent) +{ + setWidgetResizable(true); + setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool QVerticalScrollArea::eventFilter(QObject* object, QEvent* event) +{ + // This works because QScrollArea::setWidget installs an eventFilter on the widget + if (object && object == widget() && event->type() == QEvent::Resize) + { + setMinimumWidth(widget()->minimumSizeHint().width() + verticalScrollBar()->width()); + } + + return QScrollArea::eventFilter(object, event); +} namespace caf @@ -53,12 +83,20 @@ namespace caf PdmUiPropertyView::PdmUiPropertyView(QWidget* parent, Qt::WindowFlags f) : QWidget (parent, f) { - m_layout = new QVBoxLayout(this); - m_layout->insertStretch(1, 1); - m_layout->setContentsMargins(0, 0, 0, 0); - m_layout->setSpacing(0); + QVerticalScrollArea* scrollArea = new QVerticalScrollArea(this); + scrollArea->setFrameStyle(QFrame::NoFrame); + scrollArea->setWidgetResizable(true); + + m_placeholder = new QWidget(); + scrollArea->setWidget(m_placeholder); - setLayout(m_layout); + m_placeHolderLayout = new QVBoxLayout(); + m_placeHolderLayout->setContentsMargins(5,5,5,0); + m_placeholder->setLayout(m_placeHolderLayout); + + QVBoxLayout* dummy = new QVBoxLayout(this); + dummy->setContentsMargins(0,0,0,0); + dummy->addWidget(scrollArea); m_currentObjectView = NULL; } @@ -123,12 +161,11 @@ void PdmUiPropertyView::showProperties( PdmObjectHandle* object) // Remove Widget from layout if (m_currentObjectView) { - layout()->removeWidget(m_currentObjectView->widget()); + this->m_placeHolderLayout->removeWidget(m_currentObjectView->widget()); delete m_currentObjectView; m_currentObjectView = NULL; } - //m_currentObjectView = PdmObjViewFactory::instance()->create(object->editorType(m_uiConfigName)); if (!m_currentObjectView) { PdmUiDefaultObjectEditor* defaultEditor = new PdmUiDefaultObjectEditor(); @@ -136,12 +173,14 @@ void PdmUiPropertyView::showProperties( PdmObjectHandle* object) } // Create widget to handle this - QWidget * page = NULL; - page = m_currentObjectView->getOrCreateWidget(this); + QWidget* propertyWidget = m_currentObjectView->getOrCreateWidget(m_placeholder); + + CAF_ASSERT(propertyWidget); - assert(page); + this->m_placeHolderLayout->insertWidget(0, propertyWidget); - this->m_layout->insertWidget(0, page); + // Add stretch to make sure the property widget is not stretched + this->m_placeHolderLayout->insertStretch(-1, 1); } m_currentObjectView->setPdmObject(object); @@ -163,7 +202,12 @@ PdmObjectHandle* PdmUiPropertyView::currentObject() //-------------------------------------------------------------------------------------------------- QSize PdmUiPropertyView::sizeHint() const { - return QSize(200, 200); + if (m_placeholder) + { + return m_placeholder->sizeHint(); + } + + return QWidget::sizeHint(); } } //End of namespace caf diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiPropertyView.h b/Fwk/AppFwk/cafUserInterface/cafPdmUiPropertyView.h index f73d87aa5c..c7883b611b 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiPropertyView.h +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiPropertyView.h @@ -36,11 +36,28 @@ #pragma once + #include #include +#include class QVBoxLayout; + +#include + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +class QVerticalScrollArea : public QScrollArea +{ + Q_OBJECT +public: + explicit QVerticalScrollArea(QWidget* parent = 0); + virtual bool eventFilter(QObject* object, QEvent* event) override; +}; + + namespace caf { @@ -63,13 +80,15 @@ class PdmUiPropertyView : public QWidget virtual QSize sizeHint() const override; - public slots: +public slots: void showProperties(caf::PdmObjectHandle* object); // Signal/Slot system needs caf:: prefix in some cases private: PdmUiObjectEditorHandle* m_currentObjectView; QString m_uiConfigName; - QVBoxLayout* m_layout; + + QPointer m_placeHolderLayout; + QPointer m_placeholder; }; diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiPushButtonEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiPushButtonEditor.cpp index 42108b0f76..f90a9eed22 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiPushButtonEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiPushButtonEditor.cpp @@ -46,7 +46,6 @@ #include "cafFactory.h" -#include namespace caf @@ -60,8 +59,8 @@ CAF_PDM_UI_FIELD_EDITOR_SOURCE_INIT(PdmUiPushButtonEditor); //-------------------------------------------------------------------------------------------------- void PdmUiPushButtonEditor::configureAndUpdateUi(const QString& uiConfigName) { - assert(!m_pushButton.isNull()); - assert(!m_label.isNull()); + CAF_ASSERT(!m_pushButton.isNull()); + CAF_ASSERT(!m_label.isNull()); QIcon ic = field()->uiIcon(uiConfigName); if (!ic.isNull()) @@ -93,7 +92,8 @@ void PdmUiPushButtonEditor::configureAndUpdateUi(const QString& uiConfigName) { m_pushButton->setIcon(attributes.m_buttonIcon); } - else if (!attributes.m_buttonText.isEmpty()) + + if (!attributes.m_buttonText.isEmpty()) { m_pushButton->setText(attributes.m_buttonText); } diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiSliderEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiSliderEditor.cpp index ce09b82736..392cdba6eb 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiSliderEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiSliderEditor.cpp @@ -49,7 +49,6 @@ #include #include -#include namespace caf @@ -62,7 +61,7 @@ CAF_PDM_UI_FIELD_EDITOR_SOURCE_INIT(PdmUiSliderEditor); //-------------------------------------------------------------------------------------------------- void PdmUiSliderEditor::configureAndUpdateUi(const QString& uiConfigName) { - assert(!m_spinBox.isNull()); + CAF_ASSERT(!m_spinBox.isNull()); QIcon ic = field()->uiIcon(uiConfigName); if (!ic.isNull()) diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableItemEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableItemEditor.cpp index 32ad3d34f1..54c78e8b63 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableItemEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableItemEditor.cpp @@ -71,6 +71,16 @@ PdmUiTableItemEditor::~PdmUiTableItemEditor() //-------------------------------------------------------------------------------------------------- void PdmUiTableItemEditor::configureAndUpdateUi(const QString& uiConfigName) { + caf::PdmUiObjectHandle* uiObject = dynamic_cast(this->pdmItem()); + if (uiObject) + { + // Call uiOrdering method, as this method is responsible for control of + // object states like hidden/readOnly, etc... + + caf::PdmUiOrdering dummy; + uiObject->uiOrdering(uiConfigName, dummy); + } + QModelIndex miStart = m_model->index(m_row, 0); QModelIndex miEnd = m_model->index(m_row, m_model->columnCount()); diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableView.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableView.cpp index 6b96a90e40..00e7127cfc 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableView.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableView.cpp @@ -78,7 +78,7 @@ PdmUiTableView::~PdmUiTableView() //-------------------------------------------------------------------------------------------------- void PdmUiTableView::setListField(PdmChildArrayFieldHandle* listField) { - assert(m_listViewEditor); + CAF_ASSERT(m_listViewEditor); m_listViewEditor->setListField(listField); @@ -106,7 +106,7 @@ void PdmUiTableView::setUiConfigurationName(QString uiConfigName) //-------------------------------------------------------------------------------------------------- QTableView* PdmUiTableView::tableView() { - assert(m_listViewEditor); + CAF_ASSERT(m_listViewEditor); return m_listViewEditor->tableView(); } @@ -119,6 +119,14 @@ void PdmUiTableView::enableDefaultContextMenu(bool enable) m_listViewEditor->enableDefaultContextMenu(enable); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void PdmUiTableView::enableHeaderText(bool enable) +{ + m_listViewEditor->enableHeaderText(enable); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableView.h b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableView.h index b34c10865c..f0257fe673 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableView.h +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableView.h @@ -71,6 +71,7 @@ class PdmUiTableView : public QWidget, public DataModelObserver void setListField(PdmChildArrayFieldHandle* object); void enableDefaultContextMenu(bool enable); + void enableHeaderText(bool enable); void setSelectionRole(SelectionManager::SelectionRole role); QTableView* tableView(); diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewDelegate.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewDelegate.cpp index 244fbd81c2..b106c6a0a0 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewDelegate.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewDelegate.cpp @@ -39,7 +39,6 @@ #include "cafPdmUiFieldEditorHandle.h" #include "cafPdmUiTableViewModel.h" -#include namespace caf @@ -68,7 +67,7 @@ PdmUiTableViewDelegate::~PdmUiTableViewDelegate() //-------------------------------------------------------------------------------------------------- QWidget * PdmUiTableViewDelegate::createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const { - assert(m_model); + CAF_ASSERT(m_model); QWidget* editorWidget = m_model->getEditorWidgetAndTransferOwnership(parent, index); connect( editorWidget, SIGNAL(destroyed(QObject*)), SLOT(slotEditorDestroyed(QObject*))); diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewEditor.cpp index 70ad2a96b8..9b595b82d4 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewEditor.cpp @@ -62,7 +62,7 @@ namespace caf class FocusEventHandler : public QObject { public: - FocusEventHandler(PdmUiTableViewEditor* tableViewEditor) + explicit FocusEventHandler(PdmUiTableViewEditor* tableViewEditor) : QObject(tableViewEditor) { m_tableViewEditor = tableViewEditor; @@ -93,7 +93,9 @@ PdmUiTableViewEditor::PdmUiTableViewEditor() { m_layout = NULL;; m_tableView = NULL; + m_tableHeading = NULL; m_tableModelPdm = NULL; + m_tableHeadingIcon = NULL; m_pdmListField = NULL; m_delegate = NULL; @@ -118,7 +120,9 @@ PdmUiTableViewEditor::~PdmUiTableViewEditor() QWidget* PdmUiTableViewEditor::createWidget(QWidget* parent) { m_mainWidget = new QWidget(parent); - m_layout = new QVBoxLayout(); + + m_layout = new QVBoxLayout(); + m_layout->setContentsMargins(0, 0, 0, 0); m_mainWidget->setLayout(m_layout); m_tableModelPdm = new PdmUiTableViewModel(m_mainWidget); @@ -267,6 +271,15 @@ void PdmUiTableViewEditor::enableDefaultContextMenu(bool enable) updateContextMenuSignals(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void PdmUiTableViewEditor::enableHeaderText(bool enable) +{ + m_tableHeading->setVisible(enable); + m_tableHeadingIcon->setVisible(enable); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewEditor.h b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewEditor.h index 34396e6136..cb2a592f82 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewEditor.h +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewEditor.h @@ -74,6 +74,7 @@ class PdmUiTableViewEditor : public PdmUiEditorHandle ~PdmUiTableViewEditor(); void enableDefaultContextMenu(bool enable); + void enableHeaderText(bool enable); void setSelectionRole(SelectionManager::SelectionRole role); PdmObjectHandle* pdmObjectFromModelIndex(const QModelIndex& mi); diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewModel.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewModel.cpp index c01d9d4b32..3562e4bb94 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewModel.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewModel.cpp @@ -42,6 +42,7 @@ #include "cafPdmObject.h" #include "cafPdmUiComboBoxEditor.h" #include "cafPdmUiCommandSystemProxy.h" +#include "cafPdmUiDefaultObjectEditor.h" #include "cafPdmUiLineEditor.h" #include "cafPdmUiTableItemEditor.h" #include "cafSelectionManager.h" @@ -118,6 +119,10 @@ QVariant PdmUiTableViewModel::headerData(int section, Qt::Orientation orientatio return uiFieldHandle->uiName(m_currentConfigName); } } + else if (orientation == Qt::Vertical) + { + return section + 1; + } } return QVariant(); @@ -184,14 +189,60 @@ bool PdmUiTableViewModel::setData(const QModelIndex &index, const QVariant &valu //-------------------------------------------------------------------------------------------------- QVariant PdmUiTableViewModel::data(const QModelIndex &index, int role /*= Qt::DisplayRole */) const { + if (role == Qt::TextColorRole) + { + PdmFieldHandle* fieldHandle = getField(index); + if (fieldHandle && fieldHandle->uiCapability()) + { + if (fieldHandle->uiCapability()->isUiReadOnly(m_currentConfigName)) + { + return Qt::lightGray; + } + } + } + if (role == Qt::DisplayRole || role == Qt::EditRole) { PdmFieldHandle* fieldHandle = getField(index); + PdmUiFieldHandle* uiFieldHandle = fieldHandle->uiCapability(); if (uiFieldHandle) { - bool fromMenuOnly = false; - QList valueOptions = uiFieldHandle->valueOptions(&fromMenuOnly); + QVariant fieldValue = uiFieldHandle->uiValue(); + if (fieldValue.type() == QVariant::List) + { + QString displayText; + QList valuesSelectedInField = fieldValue.toList(); + + if (valuesSelectedInField.size() > 0) + { + QList options; + bool useOptionsOnly = true; + options = uiFieldHandle->valueOptions(&useOptionsOnly); + CAF_ASSERT(useOptionsOnly); // Not supported + + for (QVariant v : valuesSelectedInField) + { + int index = v.toInt(); + if (index != -1) + { + if (!displayText.isEmpty()) displayText += ", "; + + if (index < options.size()) + { + displayText += options.at(index).optionUiText; + } + } + } + } + + return displayText; + } + + bool useOptionsOnly = true; + QList valueOptions = uiFieldHandle->valueOptions(&useOptionsOnly); + CAF_ASSERT(useOptionsOnly); // Not supported + if (!valueOptions.isEmpty()) { int listIndex = uiFieldHandle->uiValue().toInt(); @@ -235,7 +286,7 @@ QVariant PdmUiTableViewModel::data(const QModelIndex &index, int role /*= Qt::Di } else { - assert(false); + CAF_ASSERT(false); } } else if (role == Qt::CheckStateRole) @@ -277,20 +328,31 @@ void PdmUiTableViewModel::setPdmData(PdmChildArrayFieldHandle* listField, const m_pdmList = listField; m_currentConfigName = configName; - PdmUiOrdering config; + PdmUiOrdering configForFirstRow; - if (m_pdmList && m_pdmList->size() > 0) + if (m_pdmList) { - PdmObjectHandle* firstObject = m_pdmList->at(0); + PdmUiOrdering dummy; - PdmUiObjectHandle* uiObject = uiObj(firstObject); - if (uiObject) + for (size_t i = 0; i < listField->size(); i++) { - uiObject->uiOrdering(configName, config); + PdmObjectHandle* pdmObjHandle = m_pdmList->at(i); + PdmUiObjectHandle* uiObject = uiObj(pdmObjHandle); + if (uiObject) + { + if (i == 0) + { + uiObject->uiOrdering(configName, configForFirstRow); + } + else + { + uiObject->uiOrdering(configName, dummy); + } + } } } - const std::vector& uiItems = config.uiItems(); + const std::vector& uiItems = configForFirstRow.uiItems(); // Set all fieldViews to be unvisited std::map::iterator it; @@ -317,32 +379,7 @@ void PdmUiTableViewModel::setPdmData(PdmChildArrayFieldHandle* listField, const if (it == m_fieldEditors.end()) { - // If editor type is specified, find in factory - if ( !uiItems[i]->uiEditorTypeName(configName).isEmpty() ) - { - fieldEditor = Factory::instance()->create(field->uiEditorTypeName(configName)); - } - else - { - // Find the default field editor - - QString editorTypeName = qStringTypeName(*(field->fieldHandle())); - - // Handle a single value field with valueOptions: Make a combobox - - if (field->uiValue().type() != QVariant::List) - { - bool useOptionsOnly = true; - QList options = field->valueOptions( &useOptionsOnly); - - if (!options.empty()) - { - editorTypeName = PdmUiComboBoxEditor::uiEditorTypeName(); - } - } - - fieldEditor = Factory::instance()->create(editorTypeName); - } + fieldEditor = PdmUiFieldEditorHelper::fieldEditorForField(field, configName); if (fieldEditor) { @@ -414,7 +451,7 @@ PdmFieldHandle* PdmUiTableViewModel::getField(const QModelIndex &index) const } else { - assert(false); + CAF_ASSERT(false); } } } diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewModel.h b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewModel.h index ff130d65f2..9909f43cdd 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewModel.h +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTableViewModel.h @@ -64,7 +64,7 @@ class PdmUiTableViewModel : public QAbstractTableModel Q_OBJECT public: - PdmUiTableViewModel(QWidget* parent); + explicit PdmUiTableViewModel(QWidget* parent); QItemSelection modelIndexFromPdmObject(PdmObjectHandle* pdmObject); PdmFieldHandle* getField(const QModelIndex &index) const; @@ -82,8 +82,6 @@ class PdmUiTableViewModel : public QAbstractTableModel void selectedUiItems(std::vector& objects); - PdmUiFieldEditorHandle* getEditor(const QModelIndex &index); - QWidget* getEditorWidgetAndTransferOwnership(QWidget* parent, const QModelIndex &index); void notifyDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight); bool isRepresentingBoolean(const QModelIndex &index) const; @@ -92,6 +90,10 @@ class PdmUiTableViewModel : public QAbstractTableModel int getFieldIndex(PdmFieldHandle* field) const; void recreateTableItemEditors(); + friend class PdmUiTableViewDelegate; + QWidget* getEditorWidgetAndTransferOwnership(QWidget* parent, const QModelIndex &index); + PdmUiFieldEditorHandle* getEditor(const QModelIndex &index); + private: PdmChildArrayFieldHandle* m_pdmList; QString m_currentConfigName; diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTextEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiTextEditor.cpp index 8203e6d0e8..0c78490d83 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTextEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTextEditor.cpp @@ -48,7 +48,6 @@ #include #include -#include @@ -82,8 +81,8 @@ void TextEdit::focusOutEvent(QFocusEvent *e) //-------------------------------------------------------------------------------------------------- void PdmUiTextEditor::configureAndUpdateUi(const QString& uiConfigName) { - assert(!m_textEdit.isNull()); - assert(!m_label.isNull()); + CAF_ASSERT(!m_textEdit.isNull()); + CAF_ASSERT(!m_label.isNull()); QIcon ic = field()->uiIcon(uiConfigName); if (!ic.isNull()) diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiToolBarEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiToolBarEditor.cpp index 5fff9907ab..40d3ca6c22 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiToolBarEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiToolBarEditor.cpp @@ -47,7 +47,6 @@ #include #include -#include #include "cafPdmUiOrdering.h" #include "cafPdmObjectHandle.h" #include "cafPdmUiObjectHandle.h" @@ -169,8 +168,8 @@ void PdmUiToolBarEditor::configureAndUpdateUi(const QString& uiConfigName) } } - assert(m_fields.size() == m_fieldViews.size()); - assert(static_cast(m_fields.size()) == m_actions.size()); + CAF_ASSERT(m_fields.size() == m_fieldViews.size()); + CAF_ASSERT(static_cast(m_fields.size()) == m_actions.size()); for (size_t i = 0; i < m_fields.size(); i++) { @@ -204,7 +203,7 @@ void PdmUiToolBarEditor::setFields(std::vector& fields) caf::PdmUiFieldHandle* uiFieldHandle = fields[i]->uiCapability(); // Supports only bool fields - assert(uiFieldHandle->uiValue().type() == QVariant::Bool); + CAF_ASSERT(uiFieldHandle->uiValue().type() == QVariant::Bool); } m_fields = fields; diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiToolButtonEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiToolButtonEditor.cpp index fc640bd691..50b18bf29f 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiToolButtonEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiToolButtonEditor.cpp @@ -54,7 +54,7 @@ CAF_PDM_UI_FIELD_EDITOR_SOURCE_INIT(PdmUiToolButtonEditor); //-------------------------------------------------------------------------------------------------- void PdmUiToolButtonEditor::configureAndUpdateUi(const QString& uiConfigName) { - assert(!m_toolButton.isNull()); + CAF_ASSERT(!m_toolButton.isNull()); QIcon ic = field()->uiIcon(uiConfigName); if (!ic.isNull()) diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeItemEditor.h b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeItemEditor.h index 2055e79235..bb3915c55c 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeItemEditor.h +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeItemEditor.h @@ -50,7 +50,7 @@ namespace caf class PdmUiTreeItemEditor: public PdmUiEditorHandle { public: - PdmUiTreeItemEditor(PdmUiItem* uiItem); + explicit PdmUiTreeItemEditor(PdmUiItem* uiItem); virtual ~PdmUiTreeItemEditor() {}; void setTreeViewEditor(PdmUiTreeEditorHandle* treeViewEditor) { m_treeViewEditor = treeViewEditor; } diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewEditor.cpp index 3c34e90792..d50f9a9ddb 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewEditor.cpp @@ -64,7 +64,7 @@ namespace caf class PdmUiTreeViewWidget : public QTreeView { public: - PdmUiTreeViewWidget(QWidget* parent = 0) : QTreeView(parent) {}; + explicit PdmUiTreeViewWidget(QWidget* parent = 0) : QTreeView(parent) {}; virtual ~PdmUiTreeViewWidget() {}; bool isTreeItemEditWidgetActive() const @@ -105,7 +105,9 @@ PdmUiTreeViewEditor::PdmUiTreeViewEditor() m_useDefaultContextMenu = false; m_updateSelectionManager = false; m_appendClassNameToUiItemText = false; - + m_layout = nullptr; + m_treeView = nullptr; + m_treeViewModel = nullptr; } //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewModel.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewModel.cpp index b0146df257..a915469e85 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewModel.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewModel.cpp @@ -92,7 +92,7 @@ void PdmUiTreeViewModel::setPdmItemRoot(PdmUiItem* rootItem) } } - assert( newRoot || rootItem == NULL ); // Only fields, objects or NULL is allowed. + CAF_ASSERT( newRoot || rootItem == NULL ); // Only fields, objects or NULL is allowed. //if (newRoot) newRoot->debugDump(0); @@ -242,7 +242,7 @@ void PdmUiTreeViewModel::updateSubTreeRecursive(const QModelIndex& existingSubTr } // Delete items with largest index first from existing - for (std::vector::reverse_iterator it = indicesToRemoveFromExisting.rbegin(); it != indicesToRemoveFromExisting.rend(); it++) + for (std::vector::reverse_iterator it = indicesToRemoveFromExisting.rbegin(); it != indicesToRemoveFromExisting.rend(); ++it) { this->beginRemoveRows(existingSubTreeRootModIdx, *it, *it); existingSubTreeRoot->removeChildren(*it, 1); @@ -320,7 +320,7 @@ void PdmUiTreeViewModel::updateSubTreeRecursive(const QModelIndex& existingSubTr } // Delete new items from source because they have been moved into newMergedOrdering - for (std::vector::reverse_iterator it = indicesToRemoveFromSource.rbegin(); it != indicesToRemoveFromSource.rend(); it++) + for (std::vector::reverse_iterator it = indicesToRemoveFromSource.rbegin(); it != indicesToRemoveFromSource.rend(); ++it) { // Use the removeChildrenNoDelete() to remove the pointer from the list without deleting the pointer sourceSubTreeRoot->removeChildrenNoDelete(*it, 1); @@ -371,7 +371,7 @@ void PdmUiTreeViewModel::updateEditorsForSubTree(PdmUiTreeOrdering* root) { PdmUiTreeItemEditor* treeItemEditor = new PdmUiTreeItemEditor(root->activeItem()); root->setEditor(treeItemEditor); - assert(root->editor()); + CAF_ASSERT(root->editor()); } PdmUiTreeItemEditor* treeItemEditor = dynamic_cast(root->editor()); @@ -396,7 +396,7 @@ PdmUiTreeOrdering* caf::PdmUiTreeViewModel::treeItemFromIndex(const QModelIndex& return m_treeOrderingRoot; } - assert(index.internalPointer()); + CAF_ASSERT(index.internalPointer()); PdmUiTreeOrdering* treeItem = static_cast(index.internalPointer()); @@ -457,7 +457,7 @@ QModelIndex PdmUiTreeViewModel::index(int row, int column, const QModelIndex &pa else parentItem = static_cast(parentIndex.internalPointer()); - assert(parentItem); + CAF_ASSERT(parentItem); if (parentItem->childCount() <= row) { @@ -533,9 +533,6 @@ QVariant PdmUiTreeViewModel::data(const QModelIndex &index, int role ) const } bool isObjRep = uitreeOrdering->isRepresentingObject(); - bool isFieldRep = uitreeOrdering->isRepresentingField(); - bool isDisplayOnly = uitreeOrdering->isDisplayItemOnly(); - if (role == Qt::DisplayRole && !uitreeOrdering->isValid()) { @@ -673,7 +670,7 @@ bool PdmUiTreeViewModel::setData(const QModelIndex &index, const QVariant &value } PdmUiTreeOrdering* treeItem = PdmUiTreeViewModel::treeItemFromIndex(index); - assert(treeItem); + CAF_ASSERT(treeItem); if (!treeItem->isRepresentingObject()) return false; @@ -723,7 +720,7 @@ Qt::ItemFlags PdmUiTreeViewModel::flags(const QModelIndex &index) const Qt::ItemFlags flagMask = QAbstractItemModel::flags(index); PdmUiTreeOrdering* treeItem = treeItemFromIndex(index); - assert(treeItem); + CAF_ASSERT(treeItem); if (treeItem->isRepresentingObject()) { diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewModel.h b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewModel.h index 60dbb127ec..6744255077 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewModel.h +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewModel.h @@ -60,7 +60,7 @@ class PdmUiTreeViewModel : public QAbstractItemModel Q_OBJECT public: - PdmUiTreeViewModel(PdmUiTreeViewEditor* treeViewEditor); + explicit PdmUiTreeViewModel(PdmUiTreeViewEditor* treeViewEditor); void setPdmItemRoot(PdmUiItem* rootItem); void updateSubTree(PdmUiItem* subTreeRoot); diff --git a/Fwk/AppFwk/cafUserInterface/cafProgressInfo.cpp b/Fwk/AppFwk/cafUserInterface/cafProgressInfo.cpp index f349a44d4c..a689604fdc 100644 --- a/Fwk/AppFwk/cafUserInterface/cafProgressInfo.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafProgressInfo.cpp @@ -36,12 +36,13 @@ #include "cafProgressInfo.h" +#include "cafAssert.h" + #include #include #include #include #include -#include namespace caf { @@ -256,9 +257,9 @@ namespace caf { std::vector& maxProgressStack_v = maxProgressStack(); size_t levCount = 1; - for (size_t levelDepth = 0; levelDepth < maxProgressStack().size(); ++levelDepth) + for (size_t levelDepth = 0; levelDepth < maxProgressStack_v.size(); ++levelDepth) { - levCount *= maxProgressStack()[levelDepth]; + levCount *= maxProgressStack_v[levelDepth]; } return levCount; } @@ -274,10 +275,10 @@ namespace caf { std::vector& progressSpanStack_v = progressSpanStack(); std::vector& maxProgressStack_v = maxProgressStack(); - for (int i = static_cast(progressStack().size()) - 1; i >= 0; --i) + for (int i = static_cast(progressStack_v.size()) - 1; i >= 0; --i) { - size_t span = (i < 1) ? 1 : progressSpanStack()[i - 1]; - progress = span*(progress + progressStack()[i]) / maxProgressStack()[i]; + size_t span = (i < 1) ? 1 : progressSpanStack_v[i - 1]; + progress = span*(progress + progressStack_v[i]) / maxProgressStack_v[i]; } size_t totalIntProgress = static_cast(currentTotalMaxProgressValue()*progress); @@ -332,7 +333,7 @@ namespace caf { std::vector& progressSpanStack_v = progressSpanStack(); std::vector& maxProgressStack_v = maxProgressStack(); - if (!maxProgressStack().size()) + if (!maxProgressStack_v.size()) { //progressDialog()->setWindowModality(Qt::ApplicationModal); progressDialog()->setMinimum(0); @@ -341,9 +342,9 @@ namespace caf { progressDialog()->show(); } - maxProgressStack().push_back(maxProgressValue); - progressStack().push_back(0); - progressSpanStack().push_back(1); + maxProgressStack_v.push_back(maxProgressValue); + progressStack_v.push_back(0); + progressSpanStack_v.push_back(1); titleStack().push_back(title); descriptionStack().push_back(""); @@ -382,18 +383,18 @@ namespace caf { std::vector& progressSpanStack_v = progressSpanStack(); std::vector& maxProgressStack_v = maxProgressStack(); - if (progressValue == progressStack().back()) return; // Do nothing if no progress. + if (progressValue == progressStack_v.back()) return; // Do nothing if no progress. // Guard against the max value set for this level - if (progressValue > maxProgressStack().back()) progressValue = maxProgressStack().back(); + if (progressValue > maxProgressStack_v.back()) progressValue = maxProgressStack_v.back(); - progressStack().back() = progressValue; - progressSpanStack().back() = 1; + progressStack_v.back() = progressValue; + progressSpanStack_v.back() = 1; int totalProgress = static_cast(currentTotalProgress()); int totalMaxProgress = static_cast(currentTotalMaxProgressValue()); - assert(static_cast(totalProgress) <= totalMaxProgress); + CAF_ASSERT(static_cast(totalProgress) <= totalMaxProgress); progressDialog()->setMaximum(totalMaxProgress); progressDialog()->setValue(totalProgress); @@ -412,10 +413,9 @@ namespace caf { std::vector& progressStack_v = progressStack(); std::vector& progressSpanStack_v = progressSpanStack(); - std::vector& maxProgressStack_v = maxProgressStack(); - assert(progressStack().size()); - ProgressInfoStatic::setProgress(progressStack().back() + progressSpanStack().back()); + CAF_ASSERT(progressStack_v.size()); + ProgressInfoStatic::setProgress(progressStack_v.back() + progressSpanStack_v.back()); } @@ -426,7 +426,7 @@ namespace caf { { if (!isUpdatePossible()) return; - assert(progressSpanStack().size()); + CAF_ASSERT(progressSpanStack().size()); progressSpanStack().back() = nextStepSize; } @@ -443,16 +443,16 @@ namespace caf { std::vector& progressSpanStack_v = progressSpanStack(); std::vector& maxProgressStack_v = maxProgressStack(); - assert(maxProgressStack().size() && progressStack().size() && progressSpanStack().size() && titleStack().size() && descriptionStack().size()); + CAF_ASSERT(maxProgressStack_v.size() && progressStack_v.size() && progressSpanStack_v.size() && titleStack().size() && descriptionStack().size()); // Set progress to max value, and leave it there until somebody touches the progress again - ProgressInfoStatic::setProgress(maxProgressStack().back()); + ProgressInfoStatic::setProgress(maxProgressStack_v.back()); // Pop all the stacks - maxProgressStack().pop_back(); - progressStack().pop_back(); - progressSpanStack().pop_back(); + maxProgressStack_v.pop_back(); + progressStack_v.pop_back(); + progressSpanStack_v.pop_back(); titleStack().pop_back(); descriptionStack().pop_back(); @@ -460,7 +460,7 @@ namespace caf { progressDialog()->setLabelText(currentComposedLabel()); // If we are finishing the last level, clean up - if (!maxProgressStack().size()) + if (!maxProgressStack_v.size()) { if (progressDialog() != NULL) { diff --git a/Fwk/AppFwk/cafUserInterface/cafUiProcess.h b/Fwk/AppFwk/cafUserInterface/cafUiProcess.h index 46351f1ce5..b7d365cddb 100644 --- a/Fwk/AppFwk/cafUserInterface/cafUiProcess.h +++ b/Fwk/AppFwk/cafUserInterface/cafUiProcess.h @@ -60,7 +60,7 @@ class UiProcess : public QProcess QTime m_timer; public: - UiProcess(QObject* pParent = 0); + explicit UiProcess(QObject* pParent = 0); private: void doEmitStatusMsg(const QString& msg, int statusMsgType); diff --git a/Fwk/AppFwk/cafViewer/cafCeetronNavigation.cpp b/Fwk/AppFwk/cafViewer/cafCeetronNavigation.cpp index 8c0e152041..e66df439b2 100644 --- a/Fwk/AppFwk/cafViewer/cafCeetronNavigation.cpp +++ b/Fwk/AppFwk/cafViewer/cafCeetronNavigation.cpp @@ -61,6 +61,7 @@ using cvf::ManipulatorTrackball; /// //-------------------------------------------------------------------------------------------------- caf::CeetronNavigation::CeetronNavigation() + : m_isRotCenterInitialized(false) { } diff --git a/Fwk/AppFwk/cafViewer/cafTrackBallBasedNavigation.cpp b/Fwk/AppFwk/cafViewer/cafTrackBallBasedNavigation.cpp index a5c3ecc88c..519b5d8534 100644 --- a/Fwk/AppFwk/cafViewer/cafTrackBallBasedNavigation.cpp +++ b/Fwk/AppFwk/cafViewer/cafTrackBallBasedNavigation.cpp @@ -50,7 +50,14 @@ //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -caf::TrackBallBasedNavigation::TrackBallBasedNavigation() : m_consumeEvents(false) +caf::TrackBallBasedNavigation::TrackBallBasedNavigation() : + m_isRotCenterInitialized(false), + m_isNavigating(false), + m_hasMovedMouseDuringNavigation(false), + m_isZooming(false), + m_lastPosX(0), + m_lastPosY(0), + m_consumeEvents(false) { } diff --git a/Fwk/AppFwk/cafViewer/cafViewer.cpp b/Fwk/AppFwk/cafViewer/cafViewer.cpp index d5f37bdb96..66aa61ddb5 100644 --- a/Fwk/AppFwk/cafViewer/cafViewer.cpp +++ b/Fwk/AppFwk/cafViewer/cafViewer.cpp @@ -461,6 +461,14 @@ void caf::Viewer::setNavigationPolicy(caf::NavigationPolicy* navigationPolicy) if (m_navigationPolicy.notNull()) m_navigationPolicy->setViewer(this); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const caf::NavigationPolicy* caf::Viewer::getNavigationPolicy() const +{ + return m_navigationPolicy.p(); +} + //-------------------------------------------------------------------------------------------------- /// diff --git a/Fwk/AppFwk/cafViewer/cafViewer.h b/Fwk/AppFwk/cafViewer/cafViewer.h index c90fb63721..23db03d2d6 100644 --- a/Fwk/AppFwk/cafViewer/cafViewer.h +++ b/Fwk/AppFwk/cafViewer/cafViewer.h @@ -117,6 +117,7 @@ class Viewer : public caf::OpenGLWidget // Set the navigation policy void setNavigationPolicy(caf::NavigationPolicy* navigationPolicy); + const caf::NavigationPolicy* getNavigationPolicy() const; void enableNavigationPolicy(bool enable); void setView( const cvf::Vec3d& alongDirection, const cvf::Vec3d& upDirection ); void zoomAll(); diff --git a/Fwk/AppFwk/cafVizExtensions/cafCategoryLegend.h b/Fwk/AppFwk/cafVizExtensions/cafCategoryLegend.h index 73a2c20920..74e9f1d03a 100644 --- a/Fwk/AppFwk/cafVizExtensions/cafCategoryLegend.h +++ b/Fwk/AppFwk/cafVizExtensions/cafCategoryLegend.h @@ -62,6 +62,13 @@ class CategoryLegend : public cvf::OverlayItem { OverlayColorLegendLayoutInfo(const cvf::Vec2i& pos, const cvf::Vec2ui& setSize) { + charHeight = 0.0f; + lineSpacing = 0.0f; + margins = cvf::Vec2f::ZERO; + tickX = 0.0f; + x0 = 0.0f; + x1 = 0.0f; + position = pos; size = setSize; } diff --git a/Fwk/AppFwk/cafVizExtensions/cafCategoryMapper.cpp b/Fwk/AppFwk/cafVizExtensions/cafCategoryMapper.cpp index 8b22153732..a95c9027ca 100644 --- a/Fwk/AppFwk/cafVizExtensions/cafCategoryMapper.cpp +++ b/Fwk/AppFwk/cafVizExtensions/cafCategoryMapper.cpp @@ -16,7 +16,8 @@ namespace caf { /// //-------------------------------------------------------------------------------------------------- CategoryMapper::CategoryMapper() - : m_textureSize(2048) + : m_textureSize(2048), + m_maxTexCoord(1.0) { } diff --git a/Fwk/AppFwk/cafVizExtensions/cafDisplayCoordTransform.cpp b/Fwk/AppFwk/cafVizExtensions/cafDisplayCoordTransform.cpp index 413f99ebfd..fa85ed6994 100644 --- a/Fwk/AppFwk/cafVizExtensions/cafDisplayCoordTransform.cpp +++ b/Fwk/AppFwk/cafVizExtensions/cafDisplayCoordTransform.cpp @@ -27,12 +27,21 @@ void caf::DisplayCoordTransform::setTranslation(const cvf::Vec3d& translation) m_translation = translation; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +cvf::Vec3d caf::DisplayCoordTransform::translateToDisplayCoord(const cvf::Vec3d& domainCoord) const +{ + return domainCoord - m_translation; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- cvf::Vec3d caf::DisplayCoordTransform::transformToDisplayCoord(const cvf::Vec3d& domainCoord) const { - cvf::Vec3d coord = domainCoord - m_translation; + cvf::Vec3d coord = translateToDisplayCoord(domainCoord); + coord.x() *= m_scale.x(); coord.y() *= m_scale.y(); coord.z() *= m_scale.z(); @@ -56,16 +65,22 @@ cvf::Vec3d caf::DisplayCoordTransform::scaleToDisplaySize(const cvf::Vec3d& doma //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -cvf::Vec3d caf::DisplayCoordTransform::transformToDomainCoord(const cvf::Vec3d& displayCoord) const +cvf::Vec3d caf::DisplayCoordTransform::translateToDomainCoord(const cvf::Vec3d& displayCoord) const { - cvf::Vec3d coord = displayCoord; - coord.x() /= m_scale.x(); - coord.y() /= m_scale.y(); - coord.z() /= m_scale.z(); + return displayCoord + m_translation; +} - coord += m_translation; +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +cvf::Vec3d caf::DisplayCoordTransform::transformToDomainCoord(const cvf::Vec3d& displayCoord) const +{ + cvf::Vec3d unScaledDisplayCoord = displayCoord; + unScaledDisplayCoord.x() /= m_scale.x(); + unScaledDisplayCoord.y() /= m_scale.y(); + unScaledDisplayCoord.z() /= m_scale.z(); - return coord; + return translateToDomainCoord(unScaledDisplayCoord); } //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/cafVizExtensions/cafDisplayCoordTransform.h b/Fwk/AppFwk/cafVizExtensions/cafDisplayCoordTransform.h index 73eaf5d980..f4e73ceda7 100644 --- a/Fwk/AppFwk/cafVizExtensions/cafDisplayCoordTransform.h +++ b/Fwk/AppFwk/cafVizExtensions/cafDisplayCoordTransform.h @@ -22,9 +22,13 @@ class DisplayCoordTransform : public cvf::Object cvf::Vec3d transformToDisplayCoord(const cvf::Vec3d& domainCoord) const; cvf::Vec3d scaleToDisplaySize(const cvf::Vec3d& domainSize) const; + cvf::Vec3d translateToDomainCoord(const cvf::Vec3d& displayCoord) const; cvf::Vec3d transformToDomainCoord(const cvf::Vec3d& displayCoord) const; cvf::Vec3d scaleToDomainSize(const cvf::Vec3d& displaySize) const; +private: + cvf::Vec3d translateToDisplayCoord(const cvf::Vec3d& domainCoord) const; + private: cvf::Vec3d m_scale; cvf::Vec3d m_translation; diff --git a/Fwk/AppFwk/cafVizExtensions/cafFixedAtlasFont.h b/Fwk/AppFwk/cafVizExtensions/cafFixedAtlasFont.h index 39dc217d91..0756ce5de5 100644 --- a/Fwk/AppFwk/cafVizExtensions/cafFixedAtlasFont.h +++ b/Fwk/AppFwk/cafVizExtensions/cafFixedAtlasFont.h @@ -70,7 +70,7 @@ class FixedAtlasFont : public cvf::Font }; public: - FixedAtlasFont(FontSize size); + explicit FixedAtlasFont(FontSize size); virtual ~FixedAtlasFont(); virtual const cvf::String& name() const; diff --git a/Fwk/AppFwk/cafVizExtensions/cafTransparentWBRenderConfiguration.cpp b/Fwk/AppFwk/cafVizExtensions/cafTransparentWBRenderConfiguration.cpp index d0617aaf93..9e05655d84 100644 --- a/Fwk/AppFwk/cafVizExtensions/cafTransparentWBRenderConfiguration.cpp +++ b/Fwk/AppFwk/cafVizExtensions/cafTransparentWBRenderConfiguration.cpp @@ -56,7 +56,7 @@ using namespace cvf; class RenderPassPreparator : public cvf::DynamicUniformSet { public: - RenderPassPreparator(TransparentWBRenderConfiguration* renderConfiguration) + explicit RenderPassPreparator(TransparentWBRenderConfiguration* renderConfiguration) { CVF_ASSERT(renderConfiguration); m_renderConfiguration = renderConfiguration; diff --git a/Fwk/VizFwk/LibGuiQt/cvfqtBasicAboutDialog.cpp b/Fwk/VizFwk/LibGuiQt/cvfqtBasicAboutDialog.cpp index d05f149cb5..765f19ee91 100644 --- a/Fwk/VizFwk/LibGuiQt/cvfqtBasicAboutDialog.cpp +++ b/Fwk/VizFwk/LibGuiQt/cvfqtBasicAboutDialog.cpp @@ -62,7 +62,7 @@ namespace cvfqt { /// //-------------------------------------------------------------------------------------------------- BasicAboutDialog::BasicAboutDialog(QWidget* parent) -: QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint) + : QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint) { m_isCreated = false; diff --git a/OctavePlugin/CMakeLists.txt b/OctavePlugin/CMakeLists.txt index 4ff452e42e..21ec239bad 100644 --- a/OctavePlugin/CMakeLists.txt +++ b/OctavePlugin/CMakeLists.txt @@ -224,7 +224,7 @@ if (RESINSIGHT_OCTAVE_PLUGIN_QMAKE AND RESINSIGHT_OCTAVE_PLUGIN_MKOCTFILE) if (RESINSIGHT_PRIVATE_INSTALL) - install(FILES ${OCTAVE_BINARY_OCT_FILES} DESTINATION ${RESINSIGHT_FINAL_NAME}) + install(FILES ${OCTAVE_BINARY_OCT_FILES} DESTINATION ${RESINSIGHT_INSTALL_FOLDER}) else (RESINSIGHT_PRIVATE_INSTALL) # probe for site location of .oct files if (NOT OCTAVE_SITE_OCT_DIR) diff --git a/OctavePlugin/riSetActiveCellProperty.cpp b/OctavePlugin/riSetActiveCellProperty.cpp index a079ccd0da..1aedda4c5f 100644 --- a/OctavePlugin/riSetActiveCellProperty.cpp +++ b/OctavePlugin/riSetActiveCellProperty.cpp @@ -88,6 +88,13 @@ void setEclipseProperty(const Matrix& propertyFrames, const QString &hostName, q { error("riSetActiveCellProperty : ResInsight refused to accept the data. Maybe the dimensions or porosity model is wrong"); } + +#ifdef WIN32 + // TODO: Due to synchronization issues seen on Windows 10, it is required to do a sleep here to be able to catch disconnect + // signals from the socket. No sleep causes the server to hang. + Sleep(100); +#endif //WIN32 + return; } diff --git a/OctavePlugin/riSetGridProperty.cpp b/OctavePlugin/riSetGridProperty.cpp index 3ef34adda4..890c9f2f51 100644 --- a/OctavePlugin/riSetGridProperty.cpp +++ b/OctavePlugin/riSetGridProperty.cpp @@ -110,6 +110,13 @@ void setEclipseProperty(const NDArray& propertyFrames, const QString &hostName, { error("riSetGridProperty : ResInsight refused to accept the data. Maybe the dimensions or porosity model is wrong.\n"); } + +#ifdef WIN32 + // TODO: Due to synchronization issues seen on Windows 10, it is required to do a sleep here to be able to catch disconnect + // signals from the socket. No sleep causes the server to hang. + Sleep(100); +#endif //WIN32 + return; } diff --git a/README.md b/README.md index 0e4137db44..a83b1fee87 100644 --- a/README.md +++ b/README.md @@ -9,15 +9,15 @@ The main input data is *.GRID and *.EGRID files along with their *.INIT and rest ResInsight has been co-developed by Statoil ASA, Ceetron Solutions AS, and Ceetron AS with the aim to provide a versatile tool for professionals who need to visualize and process reservoir models. The software is copyrighted by Ceetron and Statoil and licensed under GPL 3+. See COPYING for details. ### Dependencies -ResInsight uses the Ensambles/ert library to access Eclipse result files, and the two projects collaborates closely. The source code of the approved ert library version is embedded in the ResInsight source code tree, making downloading and building simple. +ResInsight uses the Statoil/libecl (formerly Ensambles/ert) library to access Eclipse result files, and the two projects collaborates closely. The source code of the approved libecl version is embedded in the ResInsight source code tree, making downloading and building simple. ResInsight also features an interface to Octave for retrieval of data from ResInsight, processing using Octave, and communication of data back into ResInsight for further handling and visualization. Octave : [http://www.gnu.org/software/octave/](http://www.gnu.org/software/octave/) -Ensembles/ert : [https://github.com/Ensembles/ert](https://github.com/Ensembles/ert) +Statoil/libecl : [https://github.com/Statoil/libecl](https://github.com/Statoil/libecl) ### Supported Platforms -ResInsight is designed cross-platform from the start. Efforts have been made to ensure that code will compile and run on Linux and Windows platforms. Tested platforms are currently 64 bit RHEL6 and Windows 7. +ResInsight is designed cross-platform from the start. Efforts have been made to ensure that code will compile and run on Linux and Windows platforms. Tested platforms are currently 64 bit RHEL6 and Windows 7/8/10, and we have also received reports on successful builds on Ubuntu based systems. ### Documentation @@ -38,4 +38,4 @@ Release branches that might pop up are dedicated bug fix branches for the releas ### Building ResInsight -See [ Build Instructions ] (http://resinsight.org/docs/buildinstructions/) +See [ Build Instructions ](http://resinsight.org/docs/buildinstructions/) diff --git a/ResInsightVersion.cmake b/ResInsightVersion.cmake index eb8c6aa2e8..82a02e7903 100644 --- a/ResInsightVersion.cmake +++ b/ResInsightVersion.cmake @@ -1,19 +1,24 @@ -set(CMAKE_MAJOR_VERSION 2016) -set(CMAKE_MINOR_VERSION 11) -set(CMAKE_PATCH_VERSION 0) -#set(DEV_VERSION "-dev") +set(RESINSIGHT_MAJOR_VERSION 2017) +set(RESINSIGHT_MINOR_VERSION 05) +set(RESINSIGHT_INCREMENT_VERSION "1") # https://github.com/CRAVA/crava/tree/master/libs/nrlib set(NRLIB_GITHUB_SHA "ba35d4359882f1c6f5e9dc30eb95fe52af50fd6f") -# https://github.com/Ensembles/ert -set(ERT_GITHUB_SHA "236164870f011305aed2eca85c45944b021e4107") +# https://github.com/Statoil/libecl +set(ERT_GITHUB_SHA "06a39878636af0bc52582430ad0431450e51139c") -set(OPM_COMMON_GITHUB_SHA "1216bc052542f24ec6fcfbe1947d52e6300ff754") -set(OPM_PARSER_GITHUB_SHA "a3496df501a4369fd827fbf0ff893d03deff425f") +# https://github.com/OPM/opm-flowdiagnostics +set(OPM_FLOWDIAGNOSTICS_SHA "b6e59ddcd2feba450c8612a7402c9239e442c0d4") -set(PRODUCTVER ${CMAKE_MAJOR_VERSION},${CMAKE_MINOR_VERSION},0,${CMAKE_PATCH_VERSION}) -set(STRPRODUCTVER ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}${DEV_VERSION}) +# https://github.com/OPM/opm-flowdiagnostics-applications +set(OPM_FLOWDIAGNOSTICS_APPLICATIONS_SHA "ccaaa4dd1b553e131a3051687fd615fe728b76ee") + +# https://github.com/OPM/opm-parser/blob/master/opm/parser/eclipse/Units/Units.hpp +# This file was moved from opm-core to opm-parser october 2016 +# sha for Units.hpp 9a679071dd0066236154852c39a9e0b3c3ac4873 + +set(STRPRODUCTVER ${RESINSIGHT_MAJOR_VERSION}.${RESINSIGHT_MINOR_VERSION}.${RESINSIGHT_INCREMENT_VERSION}) diff --git a/ThirdParty/Ert/.gitignore b/ThirdParty/Ert/.gitignore index b0601e3c62..b835bff007 100644 --- a/ThirdParty/Ert/.gitignore +++ b/ThirdParty/Ert/.gitignore @@ -22,6 +22,5 @@ python/lib64 scratch.sparsebundle *.iml *.DS_Store -__ert_lib_path.py -__ert_lib_info.py - +__ecl_lib_path.py +__ecl_lib_info.py diff --git a/ThirdParty/Ert/.travis.yml b/ThirdParty/Ert/.travis.yml index 6e3998c990..81671386ce 100644 --- a/ThirdParty/Ert/.travis.yml +++ b/ThirdParty/Ert/.travis.yml @@ -1,63 +1,38 @@ +dist: trusty +sudo: false language: c -matrix: - fast_finish: true - allow_failures: - - os: osx - include: - - os: osx - osx_image: xcode7.3 - compiler: clang - - os: linux - compiler: gcc - addons: apt: sources: - - ubuntu-toolchain-r-test + - ubuntu-toolchain-r-test packages: - - liblapack-dev - - valgrind - - gcc-4.8 - - g++-4.8 - - clang - -install: - - if [[ "$CC" == "gcc" ]]; then export CXX="g++-4.8"; fi - - - export TRAVIS_PYTHON_VERSION="2.7" - # We do this conditionally because it saves us some downloading if the version is the same. - - if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - wget https://repo.continuum.io/miniconda/Miniconda-latest-MacOSX-x86_64.sh -O miniconda.sh; - else - wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh; - fi - else - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh; - else - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; - fi - fi - - - bash miniconda.sh -b -p $HOME/miniconda - - export CONDA_HOME="$HOME/miniconda" - - export PATH="$CONDA_HOME/bin:$PATH" - - hash -r - - conda config --set always_yes yes --set changeps1 no - - conda update -q conda - # Useful for debugging any issues with conda - - conda info -a - - conda install pyqt=4 scipy=0.16.1 numpy pandas matplotlib + - liblapack-dev + - valgrind + - gcc-4.8 + - g++-4.8 env: global: - - ERT_SHOW_BACKTRACE=1 + - ERT_SHOW_BACKTRACE=1 + +install: +- if [[ "$CC" == "gcc" ]]; then export CXX="g++-4.8"; fi +- wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh +- bash miniconda.sh -b -p $HOME/miniconda +- export CONDA_HOME="$HOME/miniconda" +- export PATH="$CONDA_HOME/bin:$PATH" +- hash -r +- conda config --set always_yes yes --set changeps1 no +- conda update -q conda +- conda info -a # Useful for debugging any issues with conda +- conda install pylint numpy pandas before_script: - - mkdir build - - cd build - - cmake -DPYTHON_INSTALL_PREFIX=python -DBUILD_ERT=ON -DERT_BUILD_GUI=ON -DBUILD_TESTS=ON -DBUILD_APPLICATIONS=ON -DUSE_RUNPATH=ON -DBUILD_PYTHON=ON -DERT_USE_OPENMP=ON -DERT_DOC=OFF -DERT_BUILD_CXX=ON .. +- mkdir build +- cd build +- cmake -DBUILD_TESTS=ON -DBUILD_PYTHON=ON -DERT_BUILD_CXX=ON -DBUILD_APPLICATIONS=ON .. -script: make && ctest --output-on-failure +script: +- make +- ctest --output-on-failure -E ert_util_ping diff --git a/ThirdParty/Ert/CMakeLists.txt b/ThirdParty/Ert/CMakeLists.txt index 08d043e38e..cb4d90eb8f 100644 --- a/ThirdParty/Ert/CMakeLists.txt +++ b/ThirdParty/Ert/CMakeLists.txt @@ -8,7 +8,7 @@ endif() #----------------------------------------------------------------- set( ERT_VERSION_MAJOR 2 ) # Remember to update release notes whenever -set( ERT_VERSION_MINOR 1 ) # you change the ERT_VERSION_MINOR or MAJOR +set( ERT_VERSION_MINOR 2 ) # you change the ERT_VERSION_MINOR or MAJOR set( ERT_VERSION_MICRO git ) # with "new in Ert Version X.X.X"! # If the micro version is not integer, that should be interpreted as a @@ -16,15 +16,13 @@ set( ERT_VERSION_MICRO git ) # with "new in Ert Version X.X.X"! #----------------------------------------------------------------- -option( BUILD_ERT "Build the full ERT application - Linux only" OFF) option( BUILD_TESTS "Should the tests be built" OFF) option( BUILD_APPLICATIONS "Should we build small utility applications" OFF) option( BUILD_ECL_SUMMARY "Build the commandline application ecl_summary" OFF) option( BUILD_PYTHON "Run py_compile on the python wrappers" ON ) option( BUILD_SHARED_LIBS "Build shared libraries" ON ) option( INSTALL_ERT "Should anything be installed when issuing make install?" ON ) -option( ERT_BUILD_GUI "Should the PyQt based GUI be compiled and installed" OFF) -option( ERT_USE_OPENMP "Use OpenMP - currently only in EclGrid" OFF) +option( ERT_USE_OPENMP "Use OpenMP" OFF ) option( ERT_DOC "Build ERT documantation" OFF) option( ERT_BUILD_CXX "Build some CXX wrappers" ON) @@ -50,18 +48,21 @@ include( CheckTypeSize ) ENABLE_TESTING() if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") + message(STATUS "Found Linux") set(ERT_LINUX TRUE ) add_definitions( -DERT_LINUX ) set( ERT_BINARY_POSTFIX .${ERT_VERSION_MAJOR}.${ERT_VERSION_MINOR} ) elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + message(STATUS "Found Darwin") set(ERT_LINUX TRUE ) set(ERT_MAC TRUE) add_definitions( -DERT_LINUX ) set( ERT_BINARY_POSTFIX .${ERT_VERSION_MAJOR}.${ERT_VERSION_MINOR} ) elseif (${CMAKE_SYSTEM_NAME} MATCHES "Windows") + message(STATUS "Found Windows") set(ERT_WINDOWS TRUE) add_definitions( -DERT_WINDOWS ) -endif() +endif() if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) message(STATUS "Setting build type to 'RelWithDebInfo' as none was specified.") @@ -74,7 +75,7 @@ endif() # Treat warnings as errors if not on Windows if (NOT ERT_WINDOWS) - set( CMAKE_C_FLAGS "-std=gnu99 -Wall -Wno-unknown-pragmas ") + set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall -Wno-unknown-pragmas ") set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall " ) endif() @@ -82,20 +83,22 @@ if (MSVC) add_definitions( "/W3 /D_CRT_SECURE_NO_WARNINGS /wd4996" ) endif() -list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules) -find_package(CXX11Features) if (ERT_USE_OPENMP) - find_package(OpenMP) - if (OPENMP_FOUND) - message(STATUS "Enabling OpenMP support") - # The actual use of OpenMP is only in the libecl library - the compile flags is only applied there. - else() - set( ERT_USE_OPENMP OFF ) - message(STATUS "OpenMP package not found - OpenMP disabled") - endif() + find_package(OpenMP) + if (OPENMP_FOUND) + message(STATUS "Enabling OpenMP support") + # The actual use of OpenMP is only in the libecl library - the compile flags is only applied there. + else() + set( ERT_USE_OPENMP OFF ) + message(STATUS "OpenMP package not found - OpenMP disabled") + endif() endif() +list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules) +find_package(CXX11Features) + + #----------------------------------------------------------------- @@ -126,17 +129,6 @@ set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/bin) -if (BUILD_SHARED_LIBS) - set( LIBRARY_TYPE SHARED ) -else() - set( LIBRARY_TYPE STATIC ) - if (BUILD_ERT) - message(FATAL_ERROR "The full ERT application must be built with shared libraries") - endif() - if (BUILD_PYTHON) - message(FATAL_ERROR "The Python wrappers require shared libraries") - endif() -endif() if (MSVC) add_definitions( -D__func__="\\"????\\"") @@ -176,48 +168,32 @@ endif() include_directories( ${PROJECT_SOURCE_DIR}/libecl_well/include ) add_subdirectory( libecl_well ) - -#----------------------------------------------------------------- -if (BUILD_ERT) -#----------------------------------------------------------------- - if (BUILD_TESTS) - option( ERT_LSF_SUBMIT_TEST "Build and run tests of LSF submit" OFF) - endif() - add_subdirectory( bin ) - - include(cmake/ert_module_name.cmake) - - include_directories( ${PROJECT_SOURCE_DIR}/libconfig/include ) - add_subdirectory( libconfig ) - - include_directories( ${PROJECT_SOURCE_DIR}/libsched/include ) - add_subdirectory( libsched ) - - include_directories( ${PROJECT_SOURCE_DIR}/librms/include ) - add_subdirectory( librms ) - - include_directories( ${PROJECT_SOURCE_DIR}/libanalysis/include ) - add_subdirectory( libanalysis ) - - include_directories( ${PROJECT_SOURCE_DIR}/libjob_queue/include ) - add_subdirectory( libjob_queue ) - - include_directories( ${PROJECT_SOURCE_DIR}/libenkf/include ) - add_subdirectory( libenkf ) - - install(DIRECTORY ${PROJECT_SOURCE_DIR}/share DESTINATION ${CMAKE_INSTALL_PREFIX}) -endif() - - if (BUILD_PYTHON) if (ERT_WINDOWS) - message(STATUS "Python is not supported on Windows") + message(WARNING "Python is not supported on Windows") + set( BUILD_PYTHON OFF ) else() - include(cmake/python.cmake2) + # If finding the Python interpreter and required packages + # fails in the python/CMakeLists.txt file the BUILD_PYTHON + # will be set to OFF. add_subdirectory( python ) + if(ERT_DOC) add_subdirectory( docs ) endif() endif() endif() +if (BUILD_PYTHON) + if (NOT ${BUILD_SHARED_LIBS}) + message(FATAL_ERROR "The Python wrappers require shared libraries") + endif() +endif() + + + +configure_file( cmake/libecl-config.cmake.in libecl-config.cmake @ONLY) +configure_file( cmake/libecl-config-version.cmake.in libecl-config-version.cmake @ONLY) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libecl-config.cmake + ${CMAKE_CURRENT_BINARY_DIR}/libecl-config-version.cmake + DESTINATION lib/libecl ) diff --git a/ThirdParty/Ert/COPYING b/ThirdParty/Ert/COPYING new file mode 100644 index 0000000000..94a9ed024d --- /dev/null +++ b/ThirdParty/Ert/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program 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. + + This program 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 for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/ThirdParty/Ert/README b/ThirdParty/Ert/README deleted file mode 100644 index dcae8cff53..0000000000 --- a/ThirdParty/Ert/README +++ /dev/null @@ -1,341 +0,0 @@ -Coming from OPM?? ------------------ - -ERT is a package for handling an ensemble of reservoir models, an -important part of that is beeing able to read and write the files from -standard reservoir applications; ert has quite extensive support for -reading and writing the result files from the ECLIPSE reservoir -simulator. The capabilities to read and write ECLIPSE result files is -used by the OPM simulator codes. - -The ERT build system has many configuration options, but when -compiling for OPM you should be able to use the all defaults route: - - git clone https://github.com/Ensembles/ert.git - cd ert - mkdir build - cd build - cmake .. - make - -The OPM build system can find an ERT distribution in the sibling -location, i.e. if you have cloned ert beside the opm modules like: - - ert/ - opm-common/ - opm-parser/ - opm-material/ - .... - -The opm build system will find the ert distribution in-place, -otherwise you should install ert with 'make install' and the normal -cmake machinery of the opm build system should find it. - - ------------------------------------------------------------------------- - - _________________________________ - / \ - | ______ ______ _______ | - | | ____| | __ \ |__ __| | - | | |__ | |__) | | | | - | | __| | _ / | | | - | | |____ | | \ \ | | | - | |______| |_| \_\ |_| | - | | - | Ensemble based Reservoir Tool | - \_________________________________/ - - ------------------------------------------------------------------------- - - 1. ERT - 2. ECLIPSE utilities. - 3. Building ERT - 3.1 CMake settings you might want to adjust - 4. The code: - 4.1 The different libraries - 4.2 The general structure - 4.3 Python wrappers - 5. Tests - ------------------------------------------------------------------------- - -1. ERT - -ERT - Ensemble based Reservoir Tool is a tool for managing an ensemble -of reservoir models. The initial motivation for creating ERT was a as -tool to do assisted history matching with the Ensemble Kalman Filter -(EnKF). Very briefly, the process of using EnKF for history matching -can be summarized as: - - 1. Sample initial reservoir parameters from a (Gaussian) initial - distribution. - - 2. Simulate the ensemble of of reservoir forward in time through a - part of the historical period for which data is available. - - 3. Load the results, compare with the observed data, update the - parameters and the state of reservoir by filtering out the most - inacurate results, and restart the forward simulations. - -This recipe is quite complex technically, and in particular involves -the ability to read and write input and output files from the -reservoir simulator (i.e. ECLIPSE in the case of ERT), run simulations -with arbitrary external programs, plotting data and so on. This -implies that a quite significant technical machinery must be in place -before the EnKF algorithm as such can be utilizied. This in particular -applies to real industry reservoir models, where typically -imperfections of all kinds flourish. - -Despite the fact that the initial motivation for creating ERT was to -be able to use the EnKF algorithm for history matching, ERT is -currently more used with the Ensemble Smoother and also purely as a -workflow manager, i.e. herding a large collection of reservoir models -through the required simulations steps. - - -2. ECLIPSE Utilities - -ERT has a quite large amount of code devoted to reading and writing -the ECLIPSE output files (grid/rft/restart/init/summary). In addition, -there is also reasonable support for reading and writing the grdecl -input files, but there is no general .DATA file parser. The ability to -read and write ECLIPSE output files is valuable in many reservoir -applications, and it is possible to only build and use the libecl -(with support libraries) library for working with ECLIPSE files. In -fact, the default build setup is to only build the ECLIPSE related -library and utilities. This part of the ERT distribution can also be -built on Windows with Visual Studio (albeit with maaaany warnings) and -with MinGW. - - -3. Building ERT - -CMake is the build system for ERT. The top level CMakeLists.txt file -is located in the top level directory of the repository, and this -CMakeLists.txt file includes individual CMakeLists.txt files for the -different libraries. - -Building with CMake is performed like this: - - 1. Create a build directory, this can in principle be anywhere in - the filesystem. One level above the toplevel source directory is - a practical choice. - - 2. Go to the build directory and invoke the command: - - ccmake - - Go through several 'configure' steps with CMake and generate - native build files. - - 3. Exit ccmake and invoke the native build system, i.e. ordinarily - 'make' on Linux. - - 4. Subsequent builds can be performed using just the native make - command, as in step 3. - -3.1 CMake settings you might want to adjust - -The main setting you should adjust is BUILD_ERT which is default to -OFF, i.e. by default only the ECLIPSE related utilities will be -built. The build system has numerous configurations checks; the -ECLIPSE utilities should build on Windows, but to build all of ERT you -will need a Linux (Posix) system. - - -4. The code - -The code is mainly a collection of libraries written in C. - -4.1 The different libraries - -The provided libraries are: - - libert_util: This library is a collection of utilities of various - sorts; if C++ had been chosen as implementation language, most of - these utilities could probably be replaced by standard C++ classes. - - libgeometry: This is a very small geometry library; the main code - is a small implementantion of an alorithm to determine whether a - point is inside a polyhedron. The ECLIPSE library has some - geometry related code which should be moved here. - - libwell: This library will load well information from an ECLIPSE - restart file. This is mainly for the purpose of visualization - of the existing wells, and can not be used to update or model - the well configuration. - - libecl: This library will read and (partly) write the various - binary ECLIPSE files, including GRID/EGRID, summary, INIT, - restart and RFT files. There is also support for reading an - writing grdecl formatted files, but there is no support for - general parsing of the ECLIPSE input format. - - ---------------------------------------------------------------------------- - - librms: This is a library for reading and writing RMS Roff - files. It turns out that ECLIPSE file formats is by far the most - common external file format for RMS and that the ROFF support is - not essential for this reason. - - libconfig: This library implements a parser for the ERT config file - format, this format is used in the main ERT configuration file, - and also in several small special-purpose configuration files used - by ERT. The config format parsed by this library was inspired by - the ECLIPSE format, in retrospect that was a mistake - it should - have been based on a standard format like xml. - - To confuse things even further, the libconfig library implements - /two/ formats for configuration files -- the 'second format' is - implemented in the file conf.c, and only used as format for the - observations in ERT. - - libplot: A *very* simple library for creating plots which only - satisfies the needs of ERT. - - libanalysis: The EnKF algorithm is implemented in this library. - - libjob_queue: This library implements a system to manage and run - simulations in the form of external programs. The library has a - queue manager, and a system with drivers which communicate with - the underlying system. Currently, the library has a LSF driver - to work with LSF, a LOCAL driver which starts simulations on the - current workstation and a RSH driver which submits jobs to a - 'cluster' of workstation using ssh. - - libenkf: This is the main functionality which is ERT specific; this - library is too large. - - -4.2 General structure - -The code is written in C, but conventions give a 'scent of object -orientation'. Most of the code is uses the following conventions: - - - Every file 'xxx' implements a data type 'xxx_type' - this naming - convention is quite strong. - - - All the structure definitions are in the source files, - i.e. external scopes must access the data of a structure - through accessor functions. - - - All functions which operate on a type 'xxx_type' take a pointer - to xxx_type as their first argument, the structure closely - resemble the 'self' argument used when implementing Python - classes. - - - Memory management is manual; however there are some conventions: - * Functions allocating storage have _alloc_ as part of the name. - * For all functions xxx_alloc() which allocate memory, there - should be a matching xxx_free() function to discard the objects. - * Containers can optionally destroy their content if the content - is installed with a destructor. - - - In libert_util/src/type_macros.h there is a macro based - 'type-system' which is used to runtime check casts of (void *). - - -4.3 Python wrappers - -Some of the code, in particular the ECLIPSE related functionality, has -been wrapped for usage in Python. Using these wrappers, it is quite -easy work with ECLIPSE files. The python wrappers are quite well -documented both in the directory python/docs and in the Python classes -themselves. - - -5. Tests - -The ERT codebase has a small but increasing test coverage. The tests -are typically located in a per-library subdirectory tests/. The test -framework is based on ctest which basically works like this: - - 1. In the CMakeLists.txt file testing is enabled with - ENABLE_TESTING(). - - 2. Tests are added with: - - add_test( test_name test_executable arg1 arg2 arg3 ... ) - - If the executable exits with status 0 the test has passed, - otherwise it has failed. The executable run by the test can - typically be an executable built as part of the solution, but can - in principle be an arbitrary executable like a dedicated test - runner or e.g. the Python interpreter. - -5.1 Testing of C code - -The main part of the testing infrastructure are small C applications -which are added like this: - - add_executable( test_exe test_source.c ) - target_link_libraries( test_exe lib ) - add_test( test_name ${EXECUTABLE_OUTPUT_PATH}/test_exe commandline_arg1 commandline_arg2 ) - -Where the first two lines create the test executable in the normal -way, and the last line adds it as a test. - -5.2 Testing of Python Code - -In python/test there are several files with Python tests, these files -are executable files and they are invoked directly from the command -line. A limited number of the tests have been integrated in the ctest -system. - -5.3 Test names - -The tests in the cmake build system follow the naming convention of -the library regarding the functionality which they are testing: For -example, all tests for the libecl library use a name starting with -'ecl' and all tests for the tests for the config library are prefixed -by 'config'. The ctest options -R and -E can be used to include and -exclude tests based on their name - - ctest -R ecl # Run all tests containing the regular expression 'ecl' - ctest -E ecl # Run all tests NOT containing the regular expression 'ecl' - - -5.4 Test labels - -Using the cmake set_property() function it is possible to assign -labels to the test, and the -L and -LE options to ctest can be used to -limit which tests to run. A test can only have one label; in the -current ctest setup different labels are combined into one composite -label with a ":" separator, e.g. - - set_property( TEST test_xxx PROPERTY LABELS StatoilData:Python) - -will set the 'StatoilData' and 'Python' properties on test_xxx. The -labels currently available in the ERT test setup are: - - StatoilData: This implies that the test makes use of Statoil - internal data. If you are work for the Bergen office of Statoil, - you can read the the file test-data/README for instructions on - how to make this data available. - - If you are not for Statoil in Bergen, you must pass the option: - "-EL StatoilData" to ctest to skip all the tests which require - Statoil internal data. - - StatoilBuild: There is one python test which makes use of Statoil - internal configuration data, this test is labeled with - StatoilBuild. If you want to run this test, you must set the - cmake option ECL_LOCAL_TARGET to point to a file which contains - these local configuration settings, e.g. where the ECLIPSE binary - is installed. - - Python: This label is used to indicate that the test uses Python. - - LSF: This labels indicates that the test needs a working LSF - environment to run. - - -5.5 ctest examples - - ctest -L Statoil # Run all tests labeled with Statoil - both - # StatoilData and StatoilBuild - - ctest -EL "Statoil|LSF" # Exclude all tests labeled with Statoil or LSF. - diff --git a/ThirdParty/Ert/README.md b/ThirdParty/Ert/README.md new file mode 100644 index 0000000000..b63800a9ba --- /dev/null +++ b/ThirdParty/Ert/README.md @@ -0,0 +1,302 @@ +# libecl [![Build Status](https://travis-ci.org/Statoil/libecl.svg?branch=master)](https://travis-ci.org/Statoil/libecl) + + +## Coming from OPM? + +`libecl` is a package for handling an ensemble of reservoir models, an +important part of that is beeing able to read and write the files from +standard reservoir applications; `libecl` has quite extensive support for +reading and writing the result files from the ECLIPSE reservoir +simulator. The capabilities to read and write ECLIPSE result files is +used by the OPM simulator codes. + +The `libecl` build system has many configuration options, but when +compiling for OPM you should be able to use the all defaults route: + +```bash +git clone https://github.com/Statoil/libecl.git +cd libecl +mkdir build +cd build +cmake .. +make +``` + +The OPM build system can find an `libecl` distribution in the sibling +location, i.e. if you have cloned ert beside the opm modules like: + +``` +libecl/ +opm-common/ +opm-parser/ +opm-material/ +... +``` + +The opm build system will find the ert distribution in-place, +otherwise you should install ert with 'make install' and the normal +cmake machinery of the opm build system should find it. + +``` +------------------------------------------------------------------------ + + _________________________________ + / \ + | ______ ______ _______ | + | | ____| | __ \ |__ __| | + | | |__ | |__) | | | | + | | __| | _ / | | | + | | |____ | | \ \ | | | + | |______| |_| \_\ |_| | + | | + | Ensemble based Reservoir Tool | + \_________________________________/ + + +------------------------------------------------------------------------ +``` + +1. `libecl` +2. ECLIPSE utilities. +3. Building `libecl` + 1. CMake settings you might want to adjust +4. The code: + 1. The different libraries + 2. The general structure + 3. Python wrappers +5. Tests + +------------------------------------------------------------------------ + +## 1. `libecl` + +`libecl` - Ensemble based Reservoir Tool is a tool for managing an ensemble +of reservoir models. The initial motivation for creating `libecl` was a as +tool to do assisted history matching with the Ensemble Kalman Filter +(EnKF). Very briefly, the process of using EnKF for history matching +can be summarized as: + +1. Sample initial reservoir parameters from a (Gaussian) initial +distribution. +2. Simulate the ensemble of of reservoir forward in time through a +part of the historical period for which data is available. +3. Load the results, compare with the observed data, update the +parameters and the state of reservoir by filtering out the most +inacurate results, and restart the forward simulations. + +This recipe is quite complex technically, and in particular involves +the ability to read and write input and output files from the +reservoir simulator (i.e. ECLIPSE in the case of `libecl`), run simulations +with arbitrary external programs, plotting data and so on. This +implies that a quite significant technical machinery must be in place +before the EnKF algorithm as such can be utilizied. This in particular +applies to real industry reservoir models, where typically +imperfections of all kinds flourish. + +Despite the fact that the initial motivation for creating `libecl` was to +be able to use the EnKF algorithm for history matching, `libecl` is +currently more used with the Ensemble Smoother and also purely as a +workflow manager, i.e. herding a large collection of reservoir models +through the required simulations steps. + + +## 2. ECLIPSE Utilities + +`libecl` has a quite large amount of code devoted to reading and writing +the ECLIPSE output files (grid/rft/restart/init/summary). In addition, +there is also reasonable support for reading and writing the grdecl +input files, but there is no general .DATA file parser. The ability to +read and write ECLIPSE output files is valuable in many reservoir +applications, and it is possible to only build and use the libecl +(with support libraries) library for working with ECLIPSE files. In +fact, the default build setup is to only build the ECLIPSE related +library and utilities. This part of the `libecl` distribution can also be +built on Windows with Visual Studio (albeit with maaaany warnings) and +with MinGW. + + +## 3. Building `libecl` + +CMake is the build system for `libecl`. The top level CMakeLists.txt file +is located in the top level directory of the repository, and this +CMakeLists.txt file includes individual CMakeLists.txt files for the +different libraries. + +Building with CMake is performed like this: + +1. Create a build directory, this can in principle be anywhere in the +filesystem. One level above the toplevel source directory is a practical choice. +2. Go to the build directory and invoke the command: +``` +ccmake +``` +Go through several 'configure' steps with CMake and generate native build files. + +3. Exit ccmake and invoke the native build system, i.e. ordinarily 'make' on +Linux. +4. Subsequent builds can be performed using just the native make command, as in +step 3. + +### 3.1 CMake settings you might want to adjust + +The main setting you should adjust is `BUILD_ERT` which is default to +`OFF`, i.e. by default only the ECLIPSE related utilities will be +built. The build system has numerous configurations checks; the +ECLIPSE utilities should build on Windows, but to build all of `libecl` you +will need a Linux (Posix) system. + + +## 4. The code + +The code is mainly a collection of libraries written in C. + +### 4.1 The different libraries + +The _provided libraries_ are: + +* `libert_util`: This library is a collection of utilities of various sorts; if +C++ had been chosen as implementation language, most of these utilities could +probably be replaced by standard C++ classes. +* `libgeometry`: This is a very small geometry library; the main code is a small +implementantion of an alorithm to determine whether a point is inside a +polyhedron. The ECLIPSE library has some geometry related code which should be +moved here. +* `libwell`: This library will load well information from an ECLIPSE restart +file. This is mainly for the purpose of visualization of the existing wells, +and can not be used to update or model the well configuration. +* `libecl`: This library will read and (partly) write the various binary ECLIPSE +files, including `GRID/EGRID`, summary, `INIT`, restart and `RFT` files. There +is also support for reading an writing grdecl formatted files, but there is no +support for general parsing of the _ECLIPSE_ input format. + + + +### 4.2 General structure + +The code is written in C, but conventions give a 'scent of object +orientation'. Most of the code is uses the following conventions: + +* Every file 'xxx' implements a data type 'xxx_type' - this naming convention is +quite strong. +* All the structure definitions are in the source files, i.e. external scopes +must access the data of a structure through accessor functions. +* All functions which operate on a type 'xxx_type' take a pointer to xxx_type as +their first argument, the structure closely resemble the 'self' argument used +when implementing Python classes. +* Memory management is manual; however there are some conventions: + * Functions allocating storage have _alloc_ as part of the name. + * For all functions xxx_alloc() which allocate memory, there +should be a matching xxx_free() function to discard the objects. + * Containers can optionally destroy their content if the content +is installed with a destructor. +* In `libert_util/src/type_macros.h` there is a macro based +'type-system' which is used to runtime check casts of (void *). + + +### 4.3 Python wrappers + +Some of the code, in particular the ECLIPSE related functionality, has +been wrapped for usage in Python. Using these wrappers, it is quite +easy work with ECLIPSE files. The python wrappers are quite well +documented both in the directory python/docs and in the Python classes +themselves. + + +## 5. Tests + +The `libecl` codebase has a small but increasing test coverage. The tests +are typically located in a per-library subdirectory tests/. The test +framework is based on ctest which basically works like this: + +1. In the CMakeLists.txt file testing is enabled with `ENABLE_TESTING()`. +2. Tests are added with: +```python +add_test( test_name test_executable arg1 arg2 arg3 ... ) +``` + +If the executable exits with status 0 the test has passed, +otherwise it has failed. The executable run by the test can +typically be an executable built as part of the solution, but can +in principle be an arbitrary executable like a dedicated test +runner or e.g. the Python interpreter. + +### 5.1 Testing of C code + +The main part of the testing infrastructure are small C applications +which are added like this: + +``` +add_executable( test_exe test_source.c ) +target_link_libraries( test_exe lib ) +add_test( test_name ${EXECUTABLE_OUTPUT_PATH}/test_exe commandline_arg1 commandline_arg2 ) +``` + +Where the first two lines create the test executable in the normal +way, and the last line adds it as a test. + +### 5.2 Testing of Python Code + +In python/test there are several files with Python tests, these files +are executable files and they are invoked directly from the command +line. A limited number of the tests have been integrated in the ctest +system. + +### 5.3 Test names + +The tests in the cmake build system follow the naming convention of +the library regarding the functionality which they are testing: For +example, all tests for the libecl library use a name starting with +'ecl' and all tests for the tests for the config library are prefixed +by 'config'. The ctest options -R and -E can be used to include and +exclude tests based on their name + +``` +ctest -R ecl # Run all tests containing the regular expression 'ecl' +ctest -E ecl # Run all tests NOT containing the regular expression 'ecl' +``` + +### 5.4 Test labels + +Using the cmake set_property() function it is possible to assign +labels to the test, and the -L and -LE options to ctest can be used to +limit which tests to run. A test can only have one label; in the +current ctest setup different labels are combined into one composite +label with a ":" separator, e.g. + +``` +set_property( TEST test_xxx PROPERTY LABELS StatoilData:Python) +``` + +will set the 'StatoilData' and 'Python' properties on test_xxx. The +labels currently available in the `libecl` test setup are: + + StatoilData: This implies that the test makes use of Statoil + internal data. If you are work for the Bergen office of Statoil, + you can read the the file test-data/README for instructions on + how to make this data available. + + If you are not for Statoil in Bergen, you must pass the option: + "-EL StatoilData" to ctest to skip all the tests which require + Statoil internal data. + + StatoilBuild: There is one python test which makes use of Statoil + internal configuration data, this test is labeled with + StatoilBuild. If you want to run this test, you must set the + cmake option ECL_LOCAL_TARGET to point to a file which contains + these local configuration settings, e.g. where the ECLIPSE binary + is installed. + + Python: This label is used to indicate that the test uses Python. + + LSF: This labels indicates that the test needs a working LSF + environment to run. + + +### 5.5 ctest examples + +``` +ctest -L Statoil # Run all tests labeled with Statoil - both + # StatoilData and StatoilBuild + +ctest -EL "Statoil|LSF" # Exclude all tests labeled with Statoil or LSF. +``` diff --git a/ThirdParty/Ert/cmake/Modules/FindSphinx.cmake b/ThirdParty/Ert/cmake/Modules/FindSphinx.cmake new file mode 100644 index 0000000000..e4f6d45c27 --- /dev/null +++ b/ThirdParty/Ert/cmake/Modules/FindSphinx.cmake @@ -0,0 +1,14 @@ +find_program(SPHINX_EXECUTABLE NAMES sphinx-build + HINTS + $ENV{SPHINX_DIR} + PATH_SUFFIXES bin + DOC "Sphinx documentation generator" +) + +include(FindPackageHandleStandardArgs) + +find_package_handle_standard_args(Sphinx DEFAULT_MSG + SPHINX_EXECUTABLE +) + +mark_as_advanced(SPHINX_EXECUTABLE) \ No newline at end of file diff --git a/ThirdParty/Ert/cmake/cmake_pyc b/ThirdParty/Ert/cmake/cmake_pyc deleted file mode 100644 index 03fd6507e2..0000000000 --- a/ThirdParty/Ert/cmake/cmake_pyc +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env python -import py_compile -import os -import os.path -import sys - -# Small 'python compiler' used in the build system for ert. The -# commandline arguments should be: -# -# cmake_pyc.py src1.py src2.py src3.py /path/to/pyc/files -# -# The input source files can contain a path component like -# path/src1.py, but the path will not be recreated in the target -# domain. - - -def compile_file(src_file , target_file): - path = os.path.dirname( target_file ) - if not os.path.exists( path ): - os.makedirs( path ) - try: - py_compile.compile( src_file , cfile = target_file , doraise = True) - except Exception,error: - sys.exit(1) - - -target_path = sys.argv[-1] -for src_file in sys.argv[1:-1]: - compile_file( src_file , "%s/%sc" % (target_path , os.path.basename(src_file))) - -sys.exit(0) - - - - diff --git a/ThirdParty/Ert/cmake/cmake_pyc2 b/ThirdParty/Ert/cmake/cmake_pyc2 deleted file mode 100644 index 23170b2c8e..0000000000 --- a/ThirdParty/Ert/cmake/cmake_pyc2 +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env python -import py_compile -import os -import os.path -import sys -import shutil - - -src_file = sys.argv[1] -target_file = sys.argv[2] - -(target_path , tail) = os.path.split( target_file ) -if not os.path.exists( target_path ): - try: - os.makedirs( target_path ) - except: - # When running with make -j 4 there might be a race to create this directory. - pass - -shutil.copyfile( src_file , target_file ) -shutil.copystat( src_file , target_file ) -try: - py_compile.compile( target_file , doraise = True) -except Exception,error: - sys.exit("py_compile(%s) failed:%s" % (target_file , error)) - - -sys.exit(0) - - - - diff --git a/ThirdParty/Ert/cmake/cmake_pyc_file b/ThirdParty/Ert/cmake/cmake_pyc_file deleted file mode 100644 index 9304f69c0f..0000000000 --- a/ThirdParty/Ert/cmake/cmake_pyc_file +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env python -import py_compile -import os -import sys -import os.path - -# Small 'python compiler' used in the build system for ert. - -for file in sys.argv[1:]: - try: - py_compile.compile( file , doraise = True ) - except Exception,error: - sys.exit("py_compile(%s) failed:%s" % (file , error)) - - -sys.exit(0) - - - - diff --git a/ThirdParty/Ert/cmake/cmake_pyc_tree b/ThirdParty/Ert/cmake/cmake_pyc_tree deleted file mode 100644 index eeeaa389b6..0000000000 --- a/ThirdParty/Ert/cmake/cmake_pyc_tree +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env python -import py_compile -import os -import sys -import os.path - -# Small 'python compiler' used in the build system for ert. The -# commandline argument should be the top level name of directory -# containing python source code. The 'compiler' will walk through the -# tree and in-place compile all the python files. - - -root_path = sys.argv[1] -for (root , dir_list , file_list) in os.walk( root_path ): - for file in file_list: - full_path = os.path.join( root , file ) - (tmp , ext) = os.path.splitext( full_path ) - if ext == ".py": - py_file = full_path - pyc_file = full_path + "c" - if os.path.exists( pyc_file ): - os.unlink( pyc_file ) - - try: - print "Compiling: %s" % py_file - py_compile.compile( py_file , doraise = True ) - except Exception,error: - sys.exit("py_compile(%s) failed:%s" % (py_file , error)) - - -sys.exit(0) - - - - diff --git a/ThirdParty/Ert/cmake/ert_api_check.cmake b/ThirdParty/Ert/cmake/ert_api_check.cmake index 972ae76eb5..1362cd0235 100644 --- a/ThirdParty/Ert/cmake/ert_api_check.cmake +++ b/ThirdParty/Ert/cmake/ert_api_check.cmake @@ -16,6 +16,8 @@ endif() find_library( LAPACK_LIBRARY NAMES lapack) if (LAPACK_LIBRARY) set(ERT_HAVE_LAPACK ON) +else() + set(ERT_HAVE_LAPACK OFF) endif() #----------------------------------------------------------------- @@ -25,9 +27,13 @@ find_path( ZLIB_HEADER zlib.h /usr/include ) if (ZLIB_LIBRARY AND ZLIB_HEADER) set( ERT_HAVE_ZLIB ON ) else() - message("ZLib not found - zlib support will not be included." ) + if(NOT DEFINED ZLIB_LIBRARY) + message(STATUS "ZLib library not found - zlib support will not be included." ) + endif() + if(NOT DEFINED ZLIB_HEADER) + message(STATUS "zlib.h not found - zlib support will not be included.") + endif() endif() - #----------------------------------------------------------------- try_compile( ERT_HAVE_ISFINITE ${CMAKE_BINARY_DIR} ${PROJECT_SOURCE_DIR}/cmake/Tests/test_isfinite.c ) @@ -70,5 +76,4 @@ endif() find_program(PING_PATH NAMES ping) if (PING_PATH) set( ERT_HAVE_PING ON ) - add_definitions( -DPING_CMD="${PING_PATH}" ) -endif() \ No newline at end of file +endif() diff --git a/ThirdParty/Ert/cmake/ert_build_check.cmake b/ThirdParty/Ert/cmake/ert_build_check.cmake index 6abfd821f1..ea9d7b9c14 100644 --- a/ThirdParty/Ert/cmake/ert_build_check.cmake +++ b/ThirdParty/Ert/cmake/ert_build_check.cmake @@ -73,4 +73,8 @@ if (NOT HAVE_CXX_SHARED_PTR) set( BUILD_CXX OFF ) endif() +if (HAVE_FORK AND HAVE_PTHREAD AND HAVE_EXECINFO AND HAVE_GETPWUID) + set( HAVE_UTIL_ABORT_INTERCEPT ON) + set( HAVE_BACKTRACE ON) +endif() diff --git a/ThirdParty/Ert/cmake/libecl-config-version.cmake.in b/ThirdParty/Ert/cmake/libecl-config-version.cmake.in new file mode 100644 index 0000000000..3a8e633c45 --- /dev/null +++ b/ThirdParty/Ert/cmake/libecl-config-version.cmake.in @@ -0,0 +1,14 @@ +set(PACKAGE_VERSION @ERT_VERSION_MAJOR@.@ERT_VERSION_MINOR@.@ERT_VERSION_PATCH@) +set(PACKAGE_VERSION_MAJOR @ERT_VERSION_MAJOR@) +set(PACKAGE_VERSION_MINOR @ERT_VERSION_MINOR@) +set(PACKAGE_VERSION_PATCH @ERT_VERSION_MICRO@) + +set(libecl_INCLUDE_DIRS @CMAKE_INSTALL_PREFIX@/include) +set(libecl_LIBRARIES -lecl_well -lecl -lert_geometry -lert_util) +link_directories( @CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ ) +include_directories( @CMAKE_INSTALL_PREFIX@/include ) + +set( CMAKE_MODULE_PATH @CMAKE_INSTALL_PREFIX@/share/cmake/Modules ${CMAKE_MODULE_PATH}) +if (@BUILD_PYTHON@) + set(libecl_PYTHONPATH @CMAKE_INSTALL_PREFIX@/@PYTHON_INSTALL_PREFIX@ ) +endif() \ No newline at end of file diff --git a/ThirdParty/Ert/cmake/libecl-config.cmake.in b/ThirdParty/Ert/cmake/libecl-config.cmake.in new file mode 100644 index 0000000000..318a35c20b --- /dev/null +++ b/ThirdParty/Ert/cmake/libecl-config.cmake.in @@ -0,0 +1,10 @@ +set(libecl_INCLUDE_DIRS @CMAKE_INSTALL_PREFIX@/include) +set(libecl_LIBRARIES -lecl_well -lecl -lert_geometry -lert_util) + +set( CMAKE_MODULE_PATH @CMAKE_INSTALL_PREFIX@/share/cmake/Modules ${CMAKE_MODULE_PATH}) +link_directories( @CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ ) +include_directories( @CMAKE_INSTALL_PREFIX@/include ) + +if (@BUILD_PYTHON@) + set(libecl_PYTHONPATH @CMAKE_INSTALL_PREFIX@/@PYTHON_INSTALL_PREFIX@ ) +endif() \ No newline at end of file diff --git a/ThirdParty/Ert/cmake/python.cmake b/ThirdParty/Ert/cmake/python.cmake deleted file mode 100644 index 6b567a8d35..0000000000 --- a/ThirdParty/Ert/cmake/python.cmake +++ /dev/null @@ -1,25 +0,0 @@ -macro(add_python_target tgt PYTHON_INSTALL_PATH) - SET(OUT_FILES "") - foreach(file ${python_source_files}) - set(OUT ${CMAKE_CURRENT_BINARY_DIR}/${file}.pyc) - list(APPEND OUT_FILES ${OUT}) -#------------------------------------------------------ - ADD_CUSTOM_COMMAND( - OUTPUT ${OUT} - COMMAND ${PROJECT_SOURCE_DIR}/cmake/cmake_pyc - ARGS ${CMAKE_CURRENT_SOURCE_DIR}/${file}.py ${PROJECT_BINARY_DIR}/${PYTHON_INSTALL_PATH} - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${file}.py) -#------------------------------------------------------ - if (INSTALL_ERT) - install(FILES ${PROJECT_BINARY_DIR}/${PYTHON}/${file}.pyc DESTINATION ${CMAKE_INSTALL_PREFIX}/${PYTHON_INSTALL_PATH}) - install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${file}.py DESTINATION ${CMAKE_INSTALL_PREFIX}/${PYTHON_INSTALL_PATH}) - endif() - endforeach(file) - list(REMOVE_DUPLICATES OUT_FILES) - - ADD_CUSTOM_TARGET( - ${tgt} ALL DEPENDS ${OUT_FILES}) - -endmacro() - - diff --git a/ThirdParty/Ert/cmake/python.cmake2 b/ThirdParty/Ert/cmake/python.cmake2 deleted file mode 100644 index 740fe86618..0000000000 --- a/ThirdParty/Ert/cmake/python.cmake2 +++ /dev/null @@ -1,43 +0,0 @@ -if (NOT PYTHONINTERP_FOUND) - find_package (PythonInterp REQUIRED) -endif () -function(add_python_package target package_path source_files install_package) - - set(build_files "") - - foreach (file ${source_files} ) - string(SUBSTRING ${file} 0 1 first_char) - string(SUBSTRING ${file} 1 1 second_char) - if (first_char STREQUAL "/" OR second_char STREQUAL ":") - set( source_file ${file} ) - set( build_file ${file} ) - file(RELATIVE_PATH file ${CMAKE_CURRENT_BINARY_DIR} ${file}) - set(dependent_target) - else() - set( source_file ${CMAKE_CURRENT_SOURCE_DIR}/${file} ) - set( build_file ${PROJECT_BINARY_DIR}/${package_path}/${file} ) - set(dependent_target DEPENDS ${source_file}) - endif() - if("$ENV{DESTDIR}" STREQUAL "") - set( install_file ${CMAKE_INSTALL_PREFIX}/${package_path}/${file} ) - else() - set( install_file $ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/${package_path}/${file} ) - endif() - - add_custom_command( - OUTPUT ${build_file} - COMMAND ${PYTHON_EXECUTABLE} - ARGS ${PROJECT_SOURCE_DIR}/cmake/cmake_pyc2 ${source_file} ${build_file} - ${dependent_target}) - - list(APPEND build_files ${build_file} ) - - if (install_package) - install(FILES ${build_file} DESTINATION ${CMAKE_INSTALL_PREFIX}/${package_path}) - install(CODE "execute_process(COMMAND ${PROJECT_SOURCE_DIR}/cmake/cmake_pyc_file ${install_file})") - endif() - - endforeach() - add_custom_target( ${target} ALL DEPENDS ${build_files}) - -endfunction() diff --git a/ThirdParty/Ert/debian/changelog b/ThirdParty/Ert/debian/changelog index 1924ff336a..b1760ad6be 100644 --- a/ThirdParty/Ert/debian/changelog +++ b/ThirdParty/Ert/debian/changelog @@ -1,9 +1,3 @@ -ert.ecl (2016.10-rfinal-1~xenial) xenial; urgency=medium - - * New release - - -- Arne Morten Kvarving Wed, 26 Oct 2016 09:46:18 +0200 - ert.ecl (1.0-4) precise; urgency=low * Unmark -dev package as architecture independent due to library symlink diff --git a/ThirdParty/Ert/debian/libert.ecl1.install b/ThirdParty/Ert/debian/libert.ecl1.install index 00c8fc1fd2..fb57ef3917 100644 --- a/ThirdParty/Ert/debian/libert.ecl1.install +++ b/ThirdParty/Ert/debian/libert.ecl1.install @@ -1,2 +1,3 @@ usr/lib/*/lib*.so.* usr/bin/* +usr/share/man/man1/ecl_summary.1 diff --git a/ThirdParty/Ert/docs/CMakeLists.txt b/ThirdParty/Ert/docs/CMakeLists.txt index f2bd01dc75..512cb8408a 100644 --- a/ThirdParty/Ert/docs/CMakeLists.txt +++ b/ThirdParty/Ert/docs/CMakeLists.txt @@ -1,45 +1,85 @@ -set( ERT_DOC_INSTALL_PATH "" CACHE PATH "Absolute path to install documentation *in addition* to $PREFIX/documentation") -set( ERT_DOC_EXTERNAL_ROOT "" CACHE PATH "Path to site local ERT documentation") - -file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/tmp_doc") -EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/user" "${PROJECT_BINARY_DIR}/tmp_doc/user") -EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/code" "${PROJECT_BINARY_DIR}/tmp_doc/code") - -if (ERT_DOC_EXTERNAL_ROOT) - EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E create_symlink "${ERT_DOC_EXTERNAL_ROOT}" "${PROJECT_BINARY_DIR}/tmp_doc/external-doc") - message(STATUS "Adding documentation link ${PROJECT_BINARY_DIR}/tmp_doc/external-doc -> ${ERT_DOC_EXTERNAL_ROOT}") - set( ERT_DOC_LINK external-doc/index ) -else() - set( ERT_DOC_LINK "" ) +option( ERT_RST_DOC "Build RST based documentation" ON) +option( ERT_DOXY_DOC "Build doxygen documentation" ON) +option( ERT_DOXY_GRAPHICAL "Add graphics to doxygen documentation" OFF) + +if (NOT BUILD_ERT) + if (ERT_RST_DOC) + message(WARNING "Turning off ERT_RST_DOC. Depends on BUILD_ERT.") + set (ERT_RST_DOC OFF) + endif() + if (ERT_DOXY_DOC) + message(WARNING "Turning off ERT_DOXY_DOC. Depends on BUILD_ERT.") + set (ERT_DOXY_DOC OFF) + endif() endif() -configure_file(index.rst.in ${PROJECT_BINARY_DIR}/tmp_doc/index.rst) -configure_file(conf.py.in ${PROJECT_BINARY_DIR}/conf.py) +if (ERT_RST_DOC) + find_package(Sphinx REQUIRED) + if (SPHINX_FOUND) + set( ERT_DOC_INSTALL_PATH "" CACHE PATH "Absolute path to install documentation *in addition* to $PREFIX/documentation") + set( ERT_DOC_EXTERNAL_ROOT "" CACHE PATH "Path to site local ERT documentation") -add_custom_target(doc_out ALL - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/script/run-sphinx.py ${PROJECT_BINARY_DIR}/conf.py ${PROJECT_BINARY_DIR}/${PYTHON_INSTALL_PREFIX} ${PROJECT_BINARY_DIR}/tmp_doc - DEPENDS enkf) + file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/doc-src") + file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/doc-src/_static") + EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/user" "${PROJECT_BINARY_DIR}/doc-src/user") -INSTALL( DIRECTORY ${PROJECT_BINARY_DIR}/tmp_doc/_build/ DESTINATION ${CMAKE_INSTALL_PREFIX}/documentation ) + if (ERT_DOC_EXTERNAL_ROOT) + EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E create_symlink "${ERT_DOC_EXTERNAL_ROOT}" "${PROJECT_BINARY_DIR}/doc-src/external-doc") + message(STATUS "Adding documentation link ${PROJECT_BINARY_DIR}/doc-src/external-doc -> ${ERT_DOC_EXTERNAL_ROOT}") + set( ERT_DOC_LINK external-doc/index ) + else() + set( ERT_DOC_LINK "" ) + endif() -if (ERT_DOC_INSTALL_PATH) - INSTALL( DIRECTORY ${PROJECT_BINARY_DIR}/tmp_doc/_build/ DESTINATION ${ERT_DOC_INSTALL_PATH} ) -endif() + configure_file(index.rst.in ${PROJECT_BINARY_DIR}/doc-src/index.rst) + configure_file(conf.py.in ${PROJECT_BINARY_DIR}/doc-src/conf.py) + + if (BUILD_PYTHON) + EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/code" "${PROJECT_BINARY_DIR}/doc-src/code") + add_custom_target(api-doc ALL + COMMAND sphinx-apidoc -e -o doc-src/API/python ${PROJECT_BINARY_DIR}/${PYTHON_INSTALL_PREFIX} + DEPENDS enkf + WORKING_DIRECTORY ${PROJECT_BINARY_DIR}) + endif() + + add_custom_target(rst-doc ALL + COMMAND sphinx-build -b html -d doc-src/doctrees doc-src documentation/rst + WORKING_DIRECTORY ${PROJECT_BINARY_DIR} + DEPENDS api-doc + ) -find_package(Doxygen) -if (DOXYGEN_FOUND) - message(STATUS "Creating doxygen target") - if (DOXYGEN_DOT_FOUND) - message(STATUS "Found graphviz, will run doxygen with graphics") - set( DOXYGEN_HAVE_DOT "YES" ) else() - message(STATUS "Graphviz not found, disabling dot") - set( DOXYGEN_HAVE_DOT "NO" ) + message(STATUS "Sphinx documentation tool not found - documentation not generated") endif() +endif() - configure_file(doxygen.cfg.in ${PROJECT_BINARY_DIR}/doxygen.cfg) - add_custom_target(doxy - COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/doxygen.cfg - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/../ - COMMENT "Generating doxygen documentation") + +if (ERT_DOXY_DOC) + find_package(Doxygen) + if (DOXYGEN_FOUND) + file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/documentation/doxy") + set( DOXYGEN_HAVE_DOT "NO" ) + if ( ERT_DOXY_GRAPHICAL) + if (DOXYGEN_DOT_FOUND) + set( DOXYGEN_HAVE_DOT "YES" ) + endif() + endif() + + if (BUILD_ERT) + SET( DOXYGEN_INPUT "${PROJECT_SOURCE_DIR}/libanalysis ${PROJECT_SOURCE_DIR}/libconfig ${PROJECT_SOURCE_DIR}/libecl ${PROJECT_SOURCE_DIR}/libecl_well ${PROJECT_SOURCE_DIR}/libeclxx ${PROJECT_SOURCE_DIR}/libenkf ${PROJECT_SOURCE_DIR}/libert_util ${PROJECT_SOURCE_DIR}/libert_utilxx ${PROJECT_SOURCE_DIR}/libgeometry ${PROJECT_SOURCE_DIR}/libjob_queue ${PROJECT_SOURCE_DIR}/librms ${PROJECT_SOURCE_DIR}/libsched") + else() + SET( DOXYGEN_INPUT "${PROJECT_SOURCE_DIR}/libecl ${PROJECT_SOURCE_DIR}/libecl_well ${PROJECT_SOURCE_DIR}/libeclxx ${PROJECT_SOURCE_DIR}/libert_util ${PROJECT_SOURCE_DIR}/libert_utilxx ${PROJECT_SOURCE_DIR}/libgeometry") + endif() + + configure_file(doxygen.cfg.in ${PROJECT_BINARY_DIR}/doxygen.cfg) + add_custom_target(doxy ALL + COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/doxygen.cfg + WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/../ + COMMENT "Generating doxygen documentation" + DEPENDS enkf) + + endif() endif() + + +INSTALL( DIRECTORY ${PROJECT_BINARY_DIR}/documentation DESTINATION ${CMAKE_INSTALL_PREFIX} ) diff --git a/ThirdParty/Ert/docs/course/config/config.ert b/ThirdParty/Ert/docs/course/config/config.ert new file mode 100644 index 0000000000..ec14cc6def --- /dev/null +++ b/ThirdParty/Ert/docs/course/config/config.ert @@ -0,0 +1,34 @@ +QUEUE_SYSTEM LOCAL + +JOBNAME SNAKE_OIL_%d +NUM_REALIZATIONS 25 + +DEFINE storage/ + +RUNPATH_FILE directory/test_runpath_list.txt +RUNPATH /runpath/realisation-%d/iter-%d +ENSPATH /ensemble +ECLBASE SNAKE_OIL_FIELD +SUMMARY * + +HISTORY_SOURCE REFCASE_HISTORY +REFCASE refcase/SNAKE_OIL_FIELD + +TIME_MAP refcase/time_map.txt + +INSTALL_JOB SNAKE_OIL_SIMULATOR jobs/SNAKE_OIL_SIMULATOR +INSTALL_JOB SNAKE_OIL_NPV jobs/SNAKE_OIL_NPV +INSTALL_JOB SNAKE_OIL_DIFF jobs/SNAKE_OIL_DIFF + +FORWARD_MODEL SNAKE_OIL_SIMULATOR +FORWARD_MODEL SNAKE_OIL_NPV +FORWARD_MODEL SNAKE_OIL_DIFF + +RUN_TEMPLATE templates/seed_template.txt seed.txt + +GEN_KW SNAKE_OIL_PARAM templates/snake_oil_template.txt snake_oil_params.txt parameters/snake_oil_parameters.txt +CUSTOM_KW SNAKE_OIL_NPV snake_oil_npv.txt +GEN_DATA SNAKE_OIL_OPR_DIFF INPUT_FORMAT:ASCII RESULT_FILE:snake_oil_opr_diff_%d.txt REPORT_STEPS:199 +GEN_DATA SNAKE_OIL_WPR_DIFF INPUT_FORMAT:ASCII RESULT_FILE:snake_oil_wpr_diff_%d.txt REPORT_STEPS:199 +GEN_DATA SNAKE_OIL_GPR_DIFF INPUT_FORMAT:ASCII RESULT_FILE:snake_oil_gpr_diff_%d.txt REPORT_STEPS:199 + diff --git a/ThirdParty/Ert/test-data/local/snake_oil/jobs/SNAKE_OIL_DIFF b/ThirdParty/Ert/docs/course/config/jobs/SNAKE_OIL_DIFF similarity index 100% rename from ThirdParty/Ert/test-data/local/snake_oil/jobs/SNAKE_OIL_DIFF rename to ThirdParty/Ert/docs/course/config/jobs/SNAKE_OIL_DIFF diff --git a/ThirdParty/Ert/test-data/local/snake_oil/jobs/SNAKE_OIL_NPV b/ThirdParty/Ert/docs/course/config/jobs/SNAKE_OIL_NPV similarity index 100% rename from ThirdParty/Ert/test-data/local/snake_oil/jobs/SNAKE_OIL_NPV rename to ThirdParty/Ert/docs/course/config/jobs/SNAKE_OIL_NPV diff --git a/ThirdParty/Ert/test-data/local/snake_oil/jobs/SNAKE_OIL_SIMULATOR b/ThirdParty/Ert/docs/course/config/jobs/SNAKE_OIL_SIMULATOR similarity index 100% rename from ThirdParty/Ert/test-data/local/snake_oil/jobs/SNAKE_OIL_SIMULATOR rename to ThirdParty/Ert/docs/course/config/jobs/SNAKE_OIL_SIMULATOR diff --git a/ThirdParty/Ert/docs/course/config/jobs/snake_oil_diff.py b/ThirdParty/Ert/docs/course/config/jobs/snake_oil_diff.py new file mode 100644 index 0000000000..51ef5d472f --- /dev/null +++ b/ThirdParty/Ert/docs/course/config/jobs/snake_oil_diff.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python +from ecl.ecl import EclSum + +def writeDiff(filename, vector1, vector2): + with open(filename, "w") as f: + for index in range(len(vector1)): + node1 = vector1[index] + node2 = vector2[index] + + diff = node1.value - node2.value + f.write("%f\n" % diff) + + +if __name__ == '__main__': + ecl_sum = EclSum("SNAKE_OIL_FIELD") + + report_step = 199 + writeDiff("snake_oil_opr_diff_%d.txt" % report_step, ecl_sum["WOPR:OP1"], ecl_sum["WOPR:OP2"]) + writeDiff("snake_oil_wpr_diff_%d.txt" % report_step, ecl_sum["WWPR:OP1"], ecl_sum["WWPR:OP2"]) + writeDiff("snake_oil_gpr_diff_%d.txt" % report_step, ecl_sum["WGPR:OP1"], ecl_sum["WGPR:OP2"]) + + + + diff --git a/ThirdParty/Ert/docs/course/config/jobs/snake_oil_npv.py b/ThirdParty/Ert/docs/course/config/jobs/snake_oil_npv.py new file mode 100644 index 0000000000..126c917725 --- /dev/null +++ b/ThirdParty/Ert/docs/course/config/jobs/snake_oil_npv.py @@ -0,0 +1,103 @@ +#!/usr/bin/env python +from ecl.ecl import EclSum + +OIL_PRICES = {"2010-01-01": 78.33, + "2010-02-01": 76.39, + "2010-03-01": 81.20, + "2010-04-01": 84.29, + "2010-05-01": 73.74, + "2010-06-01": 75.34, + "2010-07-01": 76.32, + "2010-08-01": 76.60, + "2010-09-01": 75.24, + "2010-10-01": 81.89, + "2010-11-01": 84.25, + "2010-12-01": 89.15, + "2011-01-01": 89.17, + "2011-02-01": 88.58, + "2011-03-01": 102.86, + "2011-04-01": 109.53, + "2011-05-01": 100.90, + "2011-06-01": 96.26, + "2011-07-01": 97.30, + "2011-08-01": 86.33, + "2011-09-01": 85.52, + "2011-10-01": 86.32, + "2011-11-01": 97.16, + "2011-12-01": 98.56, + "2012-01-01": 100.27, + "2012-02-01": 102.20, + "2012-03-01": 106.16, + "2012-04-01": 103.32, + "2012-05-01": 94.65, + "2012-06-01": 82.30, + "2012-07-01": 87.90, + "2012-08-01": 94.13, + "2012-09-01": 94.51, + "2012-10-01": 89.49, + "2012-11-01": 86.53, + "2012-12-01": 87.86, + "2013-01-01": 94.76, + "2013-02-01": 95.31, + "2013-03-01": 92.94, + "2013-04-01": 92.02, + "2013-05-01": 94.51, + "2013-06-01": 95.77, + "2013-07-01": 104.67, + "2013-08-01": 106.57, + "2013-09-01": 106.29, + "2013-10-01": 100.54, + "2013-11-01": 93.86, + "2013-12-01": 97.63, + "2014-01-01": 94.62, + "2014-02-01": 100.82, + "2014-03-01": 100.80, + "2014-04-01": 102.07, + "2014-05-01": 102.18, + "2014-06-01": 105.79, + "2014-07-01": 103.59, + "2014-08-01": 96.54, + "2014-09-01": 93.21, + "2014-10-01": 84.40, + "2014-11-01": 75.79, + "2014-12-01": 59.29, + "2015-01-01": 47.22, + "2015-02-01": 50.58, + "2015-03-01": 47.82, + "2015-04-01": 54.45, + "2015-05-01": 59.27, + "2015-06-01": 59.82, + "2015-07-01": 50.90, + "2015-08-01": 42.87, + "2015-09-01": 45.48} + +if __name__ == '__main__': + ecl_sum = EclSum("SNAKE_OIL_FIELD") + start_time = ecl_sum.getStartTime() + date_ranges = ecl_sum.timeRange(start_time, interval="1M") + production_sums = ecl_sum.blockedProduction("FOPT", date_ranges) + + npv = 0.0 + for index in range(0, len(date_ranges) - 1): + date = date_ranges[index + 1] # end of period + production_sum = production_sums[index] + + oil_price = OIL_PRICES[date.date().strftime("%Y-%m-%d")] + + production_value = oil_price * production_sum + npv += production_value + + with open("snake_oil_npv.txt", "w") as output_file: + output_file.write("NPV %s\n" % npv) + + if npv < 80000: + rating = "POOR" + elif 80000 <= npv < 100000: + rating = "AVERAGE" + elif 100000 <= npv < 120000: + rating = "GOOD" + else: + rating = "EXCELLENT" + + output_file.write("RATING %s\n" % rating) + diff --git a/ThirdParty/Ert/docs/course/config/jobs/snake_oil_simulator.py b/ThirdParty/Ert/docs/course/config/jobs/snake_oil_simulator.py new file mode 100644 index 0000000000..40b4d4a6a1 --- /dev/null +++ b/ThirdParty/Ert/docs/course/config/jobs/snake_oil_simulator.py @@ -0,0 +1,185 @@ +#!/usr/bin/env python +from datetime import datetime +import os +import sys + +from ecl.ecl import EclSum, EclSumTStep +from ecl.test import ExtendedTestCase + +try: + from synthesizer import OilSimulator +except ImportError as e: + share_lib_path = ExtendedTestCase.createShareRoot("lib") + + sys.path.insert(0, share_lib_path) + synthesizer_module = __import__("synthesizer") + OilSimulator = synthesizer_module.OilSimulator + sys.path.pop(0) + + +def globalIndex(i, j, k, nx=10, ny=10, nz=10): + return i + nx * (j - 1) + nx * ny * (k - 1) + + +def readParameters(filename): + params = {} + with open(filename, "r") as f: + for line in f: + key, value = line.split(":", 1) + params[key] = value.strip() + + return params + + +def runSimulator(simulator, history_simulator, time_step_count): + """ @rtype: EclSum """ + ecl_sum = EclSum.writer("SNAKE_OIL_FIELD", datetime(2010, 1, 1), 10, 10, 10) + + ecl_sum.addVariable("FOPT") + ecl_sum.addVariable("FOPR") + ecl_sum.addVariable("FGPT") + ecl_sum.addVariable("FGPR") + ecl_sum.addVariable("FWPT") + ecl_sum.addVariable("FWPR") + ecl_sum.addVariable("FGOR") + ecl_sum.addVariable("FWCT") + + ecl_sum.addVariable("FOPTH") + ecl_sum.addVariable("FOPRH") + ecl_sum.addVariable("FGPTH") + ecl_sum.addVariable("FGPRH") + ecl_sum.addVariable("FWPTH") + ecl_sum.addVariable("FWPRH") + ecl_sum.addVariable("FGORH") + ecl_sum.addVariable("FWCTH") + + ecl_sum.addVariable("WOPR", wgname="OP1") + ecl_sum.addVariable("WOPR", wgname="OP2") + ecl_sum.addVariable("WWPR", wgname="OP1") + ecl_sum.addVariable("WWPR", wgname="OP2") + ecl_sum.addVariable("WGPR", wgname="OP1") + ecl_sum.addVariable("WGPR", wgname="OP2") + ecl_sum.addVariable("WGOR", wgname="OP1") + ecl_sum.addVariable("WGOR", wgname="OP2") + ecl_sum.addVariable("WWCT", wgname="OP1") + ecl_sum.addVariable("WWCT", wgname="OP2") + + ecl_sum.addVariable("WOPRH", wgname="OP1") + ecl_sum.addVariable("WOPRH", wgname="OP2") + ecl_sum.addVariable("WWPRH", wgname="OP1") + ecl_sum.addVariable("WWPRH", wgname="OP2") + ecl_sum.addVariable("WGPRH", wgname="OP1") + ecl_sum.addVariable("WGPRH", wgname="OP2") + ecl_sum.addVariable("WGORH", wgname="OP1") + ecl_sum.addVariable("WGORH", wgname="OP2") + ecl_sum.addVariable("WWCTH", wgname="OP1") + ecl_sum.addVariable("WWCTH", wgname="OP2") + + ecl_sum.addVariable("BPR", num=globalIndex(5, 5, 5)) + ecl_sum.addVariable("BPR", num=globalIndex(1, 3, 8)) + + time_map = [] + mini_step_count = 10 + total_step_count = time_step_count * mini_step_count + + for report_step in range(time_step_count): + for mini_step in range(mini_step_count): + t_step = ecl_sum.addTStep(report_step + 1, sim_days=report_step * mini_step_count + mini_step) + + time_map.append(t_step.getSimTime().datetime().strftime("%d/%m/%Y")) + + simulator.step(scale=1.0 / total_step_count) + history_simulator.step(scale=1.0 / total_step_count) + + t_step["FOPR"] = simulator.fopr() + t_step["FOPT"] = simulator.fopt() + t_step["FGPR"] = simulator.fgpr() + t_step["FGPT"] = simulator.fgpt() + t_step["FWPR"] = simulator.fwpr() + t_step["FWPT"] = simulator.fwpt() + t_step["FGOR"] = simulator.fgor() + t_step["FWCT"] = simulator.fwct() + + t_step["WOPR:OP1"] = simulator.opr("OP1") + t_step["WOPR:OP2"] = simulator.opr("OP2") + + t_step["WGPR:OP1"] = simulator.gpr("OP1") + t_step["WGPR:OP2"] = simulator.gpr("OP2") + + t_step["WWPR:OP1"] = simulator.wpr("OP1") + t_step["WWPR:OP2"] = simulator.wpr("OP2") + + t_step["WGOR:OP1"] = simulator.gor("OP1") + t_step["WGOR:OP2"] = simulator.gor("OP2") + + t_step["WWCT:OP1"] = simulator.wct("OP1") + t_step["WWCT:OP2"] = simulator.wct("OP2") + + t_step["BPR:5,5,5"] = simulator.bpr("5,5,5") + t_step["BPR:1,3,8"] = simulator.bpr("1,3,8") + + t_step["FOPRH"] = history_simulator.fopr() + t_step["FOPTH"] = history_simulator.fopt() + t_step["FGPRH"] = history_simulator.fgpr() + t_step["FGPTH"] = history_simulator.fgpt() + t_step["FWPRH"] = history_simulator.fwpr() + t_step["FWPTH"] = history_simulator.fwpt() + t_step["FGORH"] = history_simulator.fgor() + t_step["FWCTH"] = history_simulator.fwct() + + t_step["WOPRH:OP1"] = history_simulator.opr("OP1") + t_step["WOPRH:OP2"] = history_simulator.opr("OP2") + + t_step["WGPRH:OP1"] = history_simulator.gpr("OP1") + t_step["WGPRH:OP2"] = history_simulator.gpr("OP2") + + t_step["WWPRH:OP1"] = history_simulator.wpr("OP1") + t_step["WWPRH:OP2"] = history_simulator.wpr("OP2") + + t_step["WGORH:OP1"] = history_simulator.gor("OP1") + t_step["WGORH:OP2"] = history_simulator.gor("OP2") + + t_step["WWCTH:OP1"] = history_simulator.wct("OP1") + t_step["WWCTH:OP2"] = history_simulator.wct("OP2") + + return ecl_sum, time_map + + +def roundedInt(value): + return int(round(float(value))) + + +if __name__ == '__main__': + seed = int(readParameters("seed.txt")["SEED"]) + parameters = readParameters("snake_oil_params.txt") + + op1_divergence_scale = float(parameters["OP1_DIVERGENCE_SCALE"]) + op2_divergence_scale = float(parameters["OP2_DIVERGENCE_SCALE"]) + op1_persistence = float(parameters["OP1_PERSISTENCE"]) + op2_persistence = float(parameters["OP2_PERSISTENCE"]) + op1_offset = float(parameters["OP1_OFFSET"]) + op2_offset = float(parameters["OP2_OFFSET"]) + bpr_138_persistence = float(parameters["BPR_138_PERSISTENCE"]) + bpr_555_persistence = float(parameters["BPR_555_PERSISTENCE"]) + + op1_octaves = roundedInt(parameters["OP1_OCTAVES"]) + op2_octaves = roundedInt(parameters["OP2_OCTAVES"]) + + simulator = OilSimulator() + simulator.addWell("OP1", seed * 997, persistence=op1_persistence, octaves=op1_octaves, divergence_scale=op1_divergence_scale, offset=op1_offset) + simulator.addWell("OP2", seed * 13, persistence=op2_persistence, octaves=op2_octaves, divergence_scale=op2_divergence_scale, offset=op2_offset) + simulator.addBlock("5,5,5", seed * 37, persistence=bpr_555_persistence) + simulator.addBlock("1,3,8", seed * 31, persistence=bpr_138_persistence) + + history_simulator = OilSimulator() + history_simulator.addWell("OP1", 222118781) + history_simulator.addWell("OP2", 118116362) + + report_step_count = 200 + ecl_sum, time_map = runSimulator(simulator, history_simulator, report_step_count) + + ecl_sum.fwrite() + + with open("time_map.txt", "w") as f: + for t in time_map: + f.write("%s\n" % t) diff --git a/ThirdParty/Ert/test-data/local/snake_oil/parameters/snake_oil_parameters.txt b/ThirdParty/Ert/docs/course/config/parameters/snake_oil_parameters.txt similarity index 100% rename from ThirdParty/Ert/test-data/local/snake_oil/parameters/snake_oil_parameters.txt rename to ThirdParty/Ert/docs/course/config/parameters/snake_oil_parameters.txt diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/refcase/SNAKE_OIL_FIELD.SMSPEC b/ThirdParty/Ert/docs/course/config/refcase/SNAKE_OIL_FIELD.SMSPEC similarity index 100% rename from ThirdParty/Ert/test-data/local/snake_oil_field/refcase/SNAKE_OIL_FIELD.SMSPEC rename to ThirdParty/Ert/docs/course/config/refcase/SNAKE_OIL_FIELD.SMSPEC diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/refcase/SNAKE_OIL_FIELD.UNSMRY b/ThirdParty/Ert/docs/course/config/refcase/SNAKE_OIL_FIELD.UNSMRY similarity index 100% rename from ThirdParty/Ert/test-data/local/snake_oil_field/refcase/SNAKE_OIL_FIELD.UNSMRY rename to ThirdParty/Ert/docs/course/config/refcase/SNAKE_OIL_FIELD.UNSMRY diff --git a/ThirdParty/Ert/test-data/local/snake_oil/refcase/refcase_readme.txt b/ThirdParty/Ert/docs/course/config/refcase/refcase_readme.txt similarity index 100% rename from ThirdParty/Ert/test-data/local/snake_oil/refcase/refcase_readme.txt rename to ThirdParty/Ert/docs/course/config/refcase/refcase_readme.txt diff --git a/ThirdParty/Ert/test-data/local/snake_oil/refcase/seed.txt b/ThirdParty/Ert/docs/course/config/refcase/seed.txt similarity index 100% rename from ThirdParty/Ert/test-data/local/snake_oil/refcase/seed.txt rename to ThirdParty/Ert/docs/course/config/refcase/seed.txt diff --git a/ThirdParty/Ert/test-data/local/snake_oil/refcase/snake_oil_params.txt b/ThirdParty/Ert/docs/course/config/refcase/snake_oil_params.txt similarity index 100% rename from ThirdParty/Ert/test-data/local/snake_oil/refcase/snake_oil_params.txt rename to ThirdParty/Ert/docs/course/config/refcase/snake_oil_params.txt diff --git a/ThirdParty/Ert/test-data/local/snake_oil/refcase/time_map.txt b/ThirdParty/Ert/docs/course/config/refcase/time_map.txt similarity index 100% rename from ThirdParty/Ert/test-data/local/snake_oil/refcase/time_map.txt rename to ThirdParty/Ert/docs/course/config/refcase/time_map.txt diff --git a/ThirdParty/Ert/test-data/local/snake_oil_no_data/snake_oil.ert b/ThirdParty/Ert/docs/course/config/snake_oil.ert similarity index 100% rename from ThirdParty/Ert/test-data/local/snake_oil_no_data/snake_oil.ert rename to ThirdParty/Ert/docs/course/config/snake_oil.ert diff --git a/ThirdParty/Ert/test-data/local/snake_oil/templates/seed_template.txt b/ThirdParty/Ert/docs/course/config/templates/seed_template.txt similarity index 100% rename from ThirdParty/Ert/test-data/local/snake_oil/templates/seed_template.txt rename to ThirdParty/Ert/docs/course/config/templates/seed_template.txt diff --git a/ThirdParty/Ert/test-data/local/snake_oil/templates/snake_oil_template.txt b/ThirdParty/Ert/docs/course/config/templates/snake_oil_template.txt similarity index 100% rename from ThirdParty/Ert/test-data/local/snake_oil/templates/snake_oil_template.txt rename to ThirdParty/Ert/docs/course/config/templates/snake_oil_template.txt diff --git a/ThirdParty/Ert/docs/course/ex1/ex1.txt b/ThirdParty/Ert/docs/course/ex1/ex1.txt new file mode 100644 index 0000000000..dadcc397eb --- /dev/null +++ b/ThirdParty/Ert/docs/course/ex1/ex1.txt @@ -0,0 +1,7 @@ +1. Create a small Python script which will load a ERT configuration + file and instantiate a EnkfMain object. + +2. Query the EnKFMain instance and print on standard out: + + a) How many realisations there are. + b) List all GEN_KW keywords, and their internal keys. diff --git a/ThirdParty/Ert/docs/course/ex1/sol1.py b/ThirdParty/Ert/docs/course/ex1/sol1.py new file mode 100644 index 0000000000..5c30971e1b --- /dev/null +++ b/ThirdParty/Ert/docs/course/ex1/sol1.py @@ -0,0 +1,27 @@ +#!/usr/bin/env python +import sys +import time +from ert.enkf import EnKFMain +from ert.enkf.enums import ErtImplType + + +# This will instantiate the EnkFMain object and create a handle to +# "everything" ert related for this instance. +ert = EnKFMain( sys.argv[1] ) + + +# Ask the EnKFMain instance how many realisations it has. Observe that +# the answer to this question is just the value of the +# NUM_REALISATIONS setting in the configuration file. +print("This instance has %d realisations" % ert.getEnsembleSize()) + + +# Get the ensemble configuration object, and ask for all GEN_KW keys: +ens_config = ert.ensembleConfig( ) +for key in ens_config.getKeylistFromImplType(ErtImplType.GEN_KW): + config_node = ens_config[key] + + # "Downcast" to GEN_KW configuration. + gen_kw_config = config_node.getModelConfig( ) + print("%s : %s" % (key , gen_kw_config.getKeyWords( ))) + diff --git a/ThirdParty/Ert/docs/course/ex2/ex2.txt b/ThirdParty/Ert/docs/course/ex2/ex2.txt new file mode 100644 index 0000000000..32daa87560 --- /dev/null +++ b/ThirdParty/Ert/docs/course/ex2/ex2.txt @@ -0,0 +1 @@ +Implement the [] operator for the gen_data class in GenData.py diff --git a/ThirdParty/Ert/docs/course/ex2/sol2.txt b/ThirdParty/Ert/docs/course/ex2/sol2.txt new file mode 100644 index 0000000000..e6b4474389 --- /dev/null +++ b/ThirdParty/Ert/docs/course/ex2/sol2.txt @@ -0,0 +1,35 @@ +The [] operator for python objects is implemeted with the +__getitem__() and __setitem__() methods. + +1. The __setitem__ and __getitem__ methods should clearly be based on + C functions which set and get an item based on an index. Going to + libenkf/src/gen_data.c we see that two such functions already exist: + + double gen_data_iget_double(const gen_data_type * gen_data, int index); + void gen_data_iset_double(gen_data_type * gen_data, int index, double value); + + +2. We must add bindings from Python to these C functions. Add the + following lines to at the top of the declaration of class GenData: + + _iset = EnkfPrototype("void gen_data_iset_double(gen_data, int , double)") + _iget = EnkfPrototype("double gen_data_iget_double(gen_data, int )") + + +3. Create (simple) Python methods: + + def __getitem__(self , index): + if index < len(self): + return self._iget( index ) + else: + raise IndexError("Invalid index:%d - valid range: [0,%d)" % (index , len(self))) + + + def __setitem__(self , index, value): + if index < len(self): + self._iset( index , value ) + else: + raise IndexError("Invalid index:%d - valid range: [0,%d)" % (index , len(self))) + + + diff --git a/ThirdParty/Ert/docs/course/ex3/ex3.txt b/ThirdParty/Ert/docs/course/ex3/ex3.txt new file mode 100644 index 0000000000..e5c6750107 --- /dev/null +++ b/ThirdParty/Ert/docs/course/ex3/ex3.txt @@ -0,0 +1,2 @@ +Iterate through all the forward models which have been installed and +get the configuration file and executable. diff --git a/ThirdParty/Ert/docs/course/ex3/sol3.py b/ThirdParty/Ert/docs/course/ex3/sol3.py new file mode 100644 index 0000000000..044a865719 --- /dev/null +++ b/ThirdParty/Ert/docs/course/ex3/sol3.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python +import sys +import time +from ert.enkf import EnKFMain + + +# This will instantiate the EnkFMain object and create a handle to +# "everything" ert related for this instance. +ert = EnKFMain( sys.argv[1] ) +site_config = ert.siteConfig( ) + +jobs = site_config.get_installed_jobs( ) +for job in jobs: + print job.name() + print " config : %s" % job.get_config_file() + print " executable: %s" % job.get_executable( ) + print diff --git a/ThirdParty/Ert/docs/course/ex4/ex4.txt b/ThirdParty/Ert/docs/course/ex4/ex4.txt new file mode 100644 index 0000000000..38b16f1939 --- /dev/null +++ b/ThirdParty/Ert/docs/course/ex4/ex4.txt @@ -0,0 +1,13 @@ +Create a small script which: + +1. Loads the configuration file. + +2. Initializes the realisations and creates runpath folders. + +3. Submit simulations. + +4. Wait for simulations to complete. + +5. Fetch and print GEN_DATA results - use the GenData[] operator. + + diff --git a/ThirdParty/Ert/docs/course/ex4/sol4.py b/ThirdParty/Ert/docs/course/ex4/sol4.py new file mode 100644 index 0000000000..d62277c6c2 --- /dev/null +++ b/ThirdParty/Ert/docs/course/ex4/sol4.py @@ -0,0 +1,71 @@ +#!/usr/bin/env python +import sys +import time +from ert.enkf import EnKFMain, RunArg, NodeId +from ert.enkf.data import EnkfNode +from ert.job_queue import JobQueueManager + +ert = EnKFMain( sys.argv[1] ) +fs_manager = ert.getEnkfFsManager( ) +fs = fs_manager.getCurrentFileSystem( ) + + +# Initialize the realisations. +for iens in range( ert.getEnsembleSize()): + realisation = ert.getRealisation( iens ) + realisation.initialize( fs ) + + +# Fetch out the job_queue from the SiteConfig object. In addition we +# create a JobQueueManager objects which wraps the queue. The purpose +# of this manager object is to let the queue run nonblocking in the +# background. +site_config = ert.siteConfig( ) +queue_manager = JobQueueManager( site_config.getJobQueue( ) ) +queue_manager.startQueue( ert.getEnsembleSize( ) , verbose = False ) + + +# Create list of RunArg instances which hold metadata for one running +# realisation, create the directory where the simulation should run +# and submit the simulation. +path_fmt = "/tmp/run%d" +arg_list = [ RunArg.createEnsembleExperimentRunArg(fs, iens, path_fmt % iens) for iens in range(ert.getEnsembleSize()) ] +for arg in arg_list: + ert.createRunPath( arg ) + ert.submitSimulation( arg ) + + +while True: + print("Waiting:%d Running:%d Complete:%d/%d" % (queue_manager.getNumWaiting( ), queue_manager.getNumRunning( ) , queue_manager.getNumSuccess() , queue_manager.getNumFailed( ))) + if not queue_manager.isRunning( ): + break + + time.sleep( 5 ) + +ens_config = ert.ensembleConfig( ) +data_config = ens_config["SNAKE_OIL_OPR_DIFF"] +param_config = ens_config["SNAKE_OIL_PARAM"] +for iens in range(ert.getEnsembleSize( )): + data_id = NodeId( realization_number = iens, + report_step = 199 ) + enkf_node1 = EnkfNode( data_config ) + enkf_node1.load( fs , data_id ) + gen_data = enkf_node1.asGenData( ) + data = gen_data.getData( ) + + + param_id = NodeId( realization_number = iens, + report_step = 0 ) + + enkf_node2 = EnkfNode( param_config ) + enkf_node2.load( fs , param_id ) + gen_kw = enkf_node2.asGenKw( ) + + print sum(data) + for v in gen_kw: + print v + + # Using the __getitem__() of GenData which was implemented + # previously. + for d in gen_data: + print d diff --git a/ThirdParty/Ert/docs/doxygen.cfg.in b/ThirdParty/Ert/docs/doxygen.cfg.in index e5b354eec9..969caa1615 100644 --- a/ThirdParty/Ert/docs/doxygen.cfg.in +++ b/ThirdParty/Ert/docs/doxygen.cfg.in @@ -5,7 +5,7 @@ PROJECT_NAME = "Ert" PROJECT_NUMBER = ${ERT_VERSION_MAJOR}.${ERT_VERSION_MINOR} PROJECT_BRIEF = "ERT is a software initially developed by Statoil which main feature is to handle several ECLIPSE simulations in an Ensemble setting. --- http://ert.nr.no/ert" PROJECT_LOGO = -OUTPUT_DIRECTORY = ${PROJECT_BINARY_DIR}/doxy +OUTPUT_DIRECTORY = ${PROJECT_BINARY_DIR}/documentation/doxy CREATE_SUBDIRS = NO STRIP_FROM_PATH = STRIP_FROM_INC_PATH = @@ -25,7 +25,7 @@ WARN_IF_DOC_ERROR = NO WARN_NO_PARAMDOC = NO WARN_FORMAT = "$file:$line: $text" -INPUT = ${PROJECT_SOURCE_DIR}/libanalysis ${PROJECT_SOURCE_DIR}/libconfig ${PROJECT_SOURCE_DIR}/libecl ${PROJECT_SOURCE_DIR}/libecl_well ${PROJECT_SOURCE_DIR}/libeclxx ${PROJECT_SOURCE_DIR}/libenkf ${PROJECT_SOURCE_DIR}/libert_util ${PROJECT_SOURCE_DIR}/libert_utilxx ${PROJECT_SOURCE_DIR}/libgeometry ${PROJECT_SOURCE_DIR}/libjob_queue ${PROJECT_SOURCE_DIR}/librms ${PROJECT_SOURCE_DIR}/libsched +INPUT = ${DOXYGEN_INPUT} RECURSIVE = YES EXCLUDE_PATTERNS = */test/* */build/* */test-data/* */docs/* */python*/ diff --git a/ThirdParty/Ert/docs/man/man1/ecl_summary.1 b/ThirdParty/Ert/docs/man/man1/ecl_summary.1 new file mode 100644 index 0000000000..66b5ad9351 --- /dev/null +++ b/ThirdParty/Ert/docs/man/man1/ecl_summary.1 @@ -0,0 +1,188 @@ +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH ecl_summary "1" "November 8 2016" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +ecl_summary \- Program to extract summary vectors from ECLIPSE files +.SH DESCRIPTION +The ecl_summary program is used to quickly extract summary vectors +from ECLIPSE summary files. The program is invoked as: +.PP +computer> ecl_summary \fI\,/Path/to/ECLIPSE\/\fP key1 key2 key3 .... +.PP +Here ECLIPSE is the name of an existing case, you can give it with +extension, or without; the case need not be in the current directory. +.PP +The keys are formed by combining ECLIPSE variable names and +qualifiers from the WGNAMES and NUMS arrays. Examples of keys are: +.TP +WWCT:F\-36 +\- The watercut in the well F\-36. +.TP +FOPT +\- The total field oil production. +.TP +RPR:3 +\- The region pressure in region 3. +.TP +GGIT:NORTH +\- The total gas injection group NORTH. +.TP +SPR:F\-12:18 +\- The segment pressure in well F\-12, segment 18. +.TP +BPR:10,10,10 +\- The block pressure in cell 10,10,10. +.IP +LBPR:LGR3:10,10,10 \- The block pressure in cell 10,10,10 \- in LGR3 +.PP +The option \fB\-\-list\fR can be used to list all available keys. +.SH OPTIONS +.HP +\fB\-\-list\fR : The program will list available keys. +.HP +\fB\-\-no\-restart\fR: If the simulation in question is a restart, i.e a prediction +.IP +which starts at the end of the historical period, the ecl_summary +program will by default also load historical data. If the \fB\-\-no\-restart\fR +option is used the program will not look for old results. +.HP +\fB\-\-no\-header\fR: By default ecl_summary will print a header line at the top, with the +.IP +option \fB\-\-no\-header\fR this will be suppressed. +.HP +\fB\-\-report\-only\fR: Will only report results at report times (i.e. DATES). +.HP +\fB\-\-help\fR: Print this message and exit. +.PP +The options should come before the ECLIPSE basename. +.PP +Example1: +.TP +computer> ecl_summary +CASE1_XXX WWCT:F\-36 FOPT FWPT +.IP +This example will load results from case 'CASE1_XXX' and print the +results for keys 'WWCT:F\-36', 'FOPT' and 'FWPT' on standard out. +.PP +Example2: +.TP +computer> ecl_summary +\fB\-\-list\fR CASE2_XXX "*:F\-36" "BPR:*" +.IP +This example will list all the available keys which end with +\&':F\-36' and those which start with 'BPR:'. Observe the use of +quoting characters "" when using shell wildcards. +.PP +The ecl_summary program will look for and load both unified and +non\-unified and formatted and non\-formatted files. The default +search order is: UNSMRY, Snnnn, FUNSMRY, Annnn, however you can +manipulate this with the extension to the basename: +.PP +* If the extension corresponds to an unformatted file, ecl_summary +.IP +will only look for unformatted files. +.PP +* If the extension corresponds to a unified file, ecl_summary will +.IP +only look for unified files. +.PP +Contact Joakim Hove / joaho@statoil.com / 92 68 57 04 for bugs +and feature requests. +.PP +The ecl_summary program is used to quickly extract summary vectors +from ECLIPSE summary files. The program is invoked as: +.PP +computer> ecl_summary \fI\,/Path/to/ECLIPSE\/\fP key1 key2 key3 .... +.PP +Here ECLIPSE is the name of an existing case, you can give it with +extension, or without; the case need not be in the current directory. +.PP +The keys are formed by combining ECLIPSE variable names and +qualifiers from the WGNAMES and NUMS arrays. Examples of keys are: +.TP +WWCT:F\-36 +\- The watercut in the well F\-36. +.TP +FOPT +\- The total field oil production. +.TP +RPR:3 +\- The region pressure in region 3. +.TP +GGIT:NORTH +\- The total gas injection group NORTH. +.TP +SPR:F\-12:18 +\- The segment pressure in well F\-12, segment 18. +.TP +BPR:10,10,10 +\- The block pressure in cell 10,10,10. +.IP +LBPR:LGR3:10,10,10 \- The block pressure in cell 10,10,10 \- in LGR3 +.PP +The option \fB\-\-list\fR can be used to list all available keys. +.HP +\fB\-\-list\fR : The program will list available keys. +.HP +\fB\-\-no\-restart\fR: If the simulation in question is a restart, i.e a prediction +.IP +which starts at the end of the historical period, the ecl_summary +program will by default also load historical data. If the \fB\-\-no\-restart\fR +option is used the program will not look for old results. +.HP +\fB\-\-no\-header\fR: By default ecl_summary will print a header line at the top, with the +.IP +option \fB\-\-no\-header\fR this will be suppressed. +.HP +\fB\-\-report\-only\fR: Will only report results at report times (i.e. DATES). +.HP +\fB\-\-help\fR: Print this message and exit. +.PP +The options should come before the ECLIPSE basename. +.PP +Example1: +.TP +computer> ecl_summary +CASE1_XXX WWCT:F\-36 FOPT FWPT +.IP +This example will load results from case 'CASE1_XXX' and print the +results for keys 'WWCT:F\-36', 'FOPT' and 'FWPT' on standard out. +.PP +Example2: +.TP +computer> ecl_summary +\fB\-\-list\fR CASE2_XXX "*:F\-36" "BPR:*" +.IP +This example will list all the available keys which end with +\&':F\-36' and those which start with 'BPR:'. Observe the use of +quoting characters "" when using shell wildcards. +.PP +The ecl_summary program will look for and load both unified and +non\-unified and formatted and non\-formatted files. The default +search order is: UNSMRY, Snnnn, FUNSMRY, Annnn, however you can +manipulate this with the extension to the basename: +.PP +* If the extension corresponds to an unformatted file, ecl_summary +.IP +will only look for unformatted files. +.PP +* If the extension corresponds to a unified file, ecl_summary will +.IP +only look for unified files. +.PP +Contact Joakim Hove / joaho@statoil.com / 92 68 57 04 for bugs +and feature requests. + diff --git a/ThirdParty/Ert/docs/script/run-sphinx.py b/ThirdParty/Ert/docs/script/run-sphinx.py deleted file mode 100644 index 2a30049661..0000000000 --- a/ThirdParty/Ert/docs/script/run-sphinx.py +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env python -import sys -import os -import subprocess -import shutil - -config_file = sys.argv[1] -PYTHONPATH = sys.argv[2] -work_path = sys.argv[3] - -os.environ["PYTHONPATH"] = PYTHONPATH -shutil.copy(config_file , work_path) - -os.chdir( work_path ) -if not os.path.isdir("_static"): - os.mkdir("_static") - -subprocess.call(["sphinx-apidoc" , "-e" , "-o" , "API/python" , PYTHONPATH ]) -subprocess.call(["sphinx-build" , "-b" , "html" , "-d" , "_build/doctrees" , "." , "_build"]) diff --git a/ThirdParty/Ert/docs/user/distributions/index.rst b/ThirdParty/Ert/docs/user/distributions/index.rst deleted file mode 100644 index c1b8f9ea94..0000000000 --- a/ThirdParty/Ert/docs/user/distributions/index.rst +++ /dev/null @@ -1,141 +0,0 @@ -.. toctree:: - :maxdepth: 1 - -.. _prior_distributions: - -Prior distributions avaliable in ERT -==================================== - -The :ref:`GEN_KW ` keyword is typically used in sensitivy -studies and as parameters which are updated with the Ensemble Smoother -in a model updating project. In your configuration file the -:ref:`GEN_KW ` keyword is configured as: - -:: - - GEN_KW ID my_template.txt my_eclipse_include.txt my_priors.txt - -The file ``my_priors.txt`` contains the names of the variables -you are considering, and specifies the distribution which should be -used for the initial sampling. - - -NORMAL ------- -To set a normal (Gaussian) prior, use the keyword NORMAL. It takes two -arguments, a mean value and a standard deviation. Thus, the following -example will assign a normal prior with mean 0 and standard deviation -1 to the variable VAR1: - -:: - - VAR1 NORMAL 0 1 - -LOGNORMAL ---------- -A stochastic variable is log normally distributed if the logarithm of -the variable is normally distributed. In other words, if X is normally -distributed, then Y = exp(X) is log normally distributed. - -A log normal prior is suited to model positive quanties with a heavy -tail (tendency to take large values). To set a log normal prior, use -the keyword LOGNORMAL. It takes two arguments, the mean and standard -deviation of the *logarithm* of the variable: - -:: - - VAR2 LOGNORMAL 0 - -TRUNCATED_NORMAL ------------------ - -This *TRUNCATED_NORMAL* distribution works as follows: - - 1. Draw random variable X ~ N(mu,std) - 2. Clamp X to the interval [min, max] - -This is **not** a proper truncated normal distribution; hence the -clamping to ``[min,max]` should be an exceptional event. To configure -this distribution for a situation with mean 1, standard deviation 0.25 -and hard limits 0 and 10: - -:: - - VAR3 TRUNCATED_NORMAL 1 0.25 0 10 - - -UNIFORM -------- - -A stochastic variable is uniformly distributed if has a constant -probability density on a closed interval. Thus, the uniform -distribution is completely characterized by it's minimum and maximum -value. To assign a uniform distribution to a variable, use the keyword -UNIFORM, which takes a minimum and a maximum value for a the -variable. Here is an example, which assigns a uniform distribution -between 0 and 1 to a variable ``VAR4``: - -:: - - VAR4 UNIFORM 0 1 - -It can be shown that among all distributions bounded below by a and -above by b, the uniform distribution with parameters a and b has the -maximal entropy (contains the least information). Thus, the uniform -distribution should be your preferred prior distribution for robust -modeling of bounded variables. - - -LOGUNIF -------- - -A stochastic variable is log uniformly distributed if it's logarithm -is uniformly distributed on the interval [a,b]. To assign a log -uniform distribution to a a variable, use the keyword LOGUNIF, which -takes a minimum and a maximum value for the output variable as -arguments. The example - -:: - - VAR5 LOGUNIF 0.00001 1 - -will give values in the range [0.00001,1] - with considerably more -weight towards the lower limit. The log uniform distribution is useful -when modeling a bounded positive variable who has most of it's -probability weight towards one of the bounds. - -CONST ------ - -The keyword CONST is used to assign a Dirac distribution to a -variable, i.e. set it to a constant value. Here is an example of use: - -:: - - CONST 1.0 - - - -Priors and transformations -========================== - -The Ensemble Smoother method, which ERT uses for updating of -parameters, works with normally distributed variables. So internally -in ERT the interplay between ``GEN_KW`` variables and updates is as -follows: - - 1. ERT samples a random variable ``x ~ N(0,1)`` - before outputing - to the forward model this is *transformed* to ``y ~ F(Y)`` where - the the distribution ``F(Y)`` is the correct prior distribution. - - 2. When the prior simulations are complete ERT calculates misfits - between simulated and observed values and *updates* the - parameters; hence the variables ``x`` now represent samples from - a posterior distribution which is Normal with mean and standard - deviation *different from (0,1)*. - -The transformation prescribed by ``F(y)`` still "works" - but it no -longer maps to a distribution in the same family as initially -specified by the prior. A consequence of this is that the update -process can *not* give you a posterior with updated parameters in the -same distribution family as the Prior. diff --git a/ThirdParty/Ert/docs/user/index.rst b/ThirdParty/Ert/docs/user/index.rst deleted file mode 100644 index 79949d3ae5..0000000000 --- a/ThirdParty/Ert/docs/user/index.rst +++ /dev/null @@ -1,15 +0,0 @@ -User documentation for ERT -========================== - -Contents: - -.. toctree:: - :maxdepth: 1 - - tutorial/index - keywords/index - workflows/index - magic_strings/index - observations/index - distributions/index - localization/index diff --git a/ThirdParty/Ert/docs/user/keywords/index.rst b/ThirdParty/Ert/docs/user/keywords/index.rst deleted file mode 100644 index 01e5a6e7f0..0000000000 --- a/ThirdParty/Ert/docs/user/keywords/index.rst +++ /dev/null @@ -1,1921 +0,0 @@ -.. _ert_kw_full_doc: - -Keywords for the configuration file -=================================== - -:ref:`Go to main ERT page ` - - -General overview ----------------- -The enkf application is started with a single argument, which is the name of the configuration file to be used. The enkf configuration file serves several purposes, which are: - -* Defining which ECLIPSE model to use, i.e. giving a data, grid and schedule file. -* Defining which observation file to use. -* Defining how to run simulations. -* Defining where to store results. -* Creating a parametrization of the ECLIPSE model. - -The configuration file is a plain text file, with one statement per line. The first word on each line is a keyword, which then is followed by a set of arguments that are unique to the particular keyword. Except for the DEFINE keyword, ordering of the keywords is not significant. Similarly to ECLIPSE data files, lines starting with "--" are treated as comments. - -The keywords in the enkf configuration file can roughly be divded into two groups: - -* Basic required keywords not related to parametrization. I.e., keywords giving the data, grid, schedule and observation file, defining how to run simulations and how to store results. These keywords are described in :ref:`Basic required keywords.` -* Basic optional keywords not related to parametrization. These keywords are described in :ref:`Basic optional keywords `. -* Keywords related to parametrization of the ECLIPSE model. These keywords are described in :ref:`Parametrization keywords`. -* Advanced keywords not related to parametrization. These keywords are described in :ref:`Advanced optional keywords`. - - -List of keywords ----------------- - -===================================================================== ====================================== ============================== ============================================================================================================================================== -Keyword name Required by user? Default value Purpose -===================================================================== ====================================== ============================== ============================================================================================================================================== -:ref:`ADD_FIXED_LENGTH_SCHEDULE_KW ` NO Supporting unknown SCHEDULE keywords. -:ref:`ADD_STATIC_KW ` NO Add static ECLIPSE keyword that should be stored -:ref:`ANALYSIS_COPY ` NO Create new instance of analysis module -:ref:`ANALYSIS_LOAD ` NO Load analysis module -:ref:`ANALYSIS_SET_VAR ` NO Set analysis module internal state variable -:ref:`ANALYSIS_SELECT ` NO STD_ENKF Select analysis module to use in update -:ref:`CASE_TABLE ` NO For running sensitivities you can give the cases descriptive names -:ref:`CONTAINER ` NO ... -:ref:`CUSTOM_KW ` NO Ability to load arbitrary values from the forward model. -:ref:`DATA_FILE ` YES Provide an ECLIPSE data file for the problem. -:ref:`DATA_KW ` NO Replace strings in ECLIPSE .DATA files -:ref:`DBASE_TYPE ` NO BLOCK_FS Which 'database' system should be used for storage -:ref:`DEFINE ` NO Define keywords with config scope -:ref:`DELETE_RUNPATH ` NO Explicitly tell ert to delete the runpath when a job is complete -:ref:`ECLBASE ` YES Define a name for the ECLIPSE simulations. -:ref:`END_DATE ` NO You can tell ERT how lon the simulations should be - for error check -:ref:`ENKF_ALPHA ` NO 1.50 Parameter controlling outlier behaviour in EnKF algorithm -:ref:`ENKF_BOOTSTRAP ` NO FALSE Should we bootstrap the Kalman gain estimate -:ref:`ENKF_CROSS_VALIDATION ` NO ... -:ref:`ENKF_CV_FOLDS ` NO 10 Number of folds used in the Cross-Validation scheme -:ref:`ENKF_FORCE_NCOMP ` NO FALSE Should we want to use a spesific subspace dimension -:ref:`ENKF_KERNEL_REGRESSION ` NO FALSE -:ref:`ENKF_KERNEL_FUNCTION ` NO 1 -:ref:`ENKF_KERNEL_PARAM ` NO 1 -:ref:`ENKF_LOCAL_CV ` NO FALSE Should we estimate the subspace dimenseion using Cross-Validation -:ref:`ENKF_MERGE_OBSERVATIONS ` NO FALSE Should observations from many times be merged together -:ref:`ENKF_MODE ` NO STANDARD Which EnKF should be used -:ref:`ENKF_NCOMP ` NO 1 Dimension of the reduced order subspace (If ENKF_FORCE_NCOMP = TRUE) -:ref:`ENKF_PEN_PRESS ` NO FALSE Should we want to use a penalised PRESS statistic in model selection? -:ref:`ENKF_RERUN ` NO FALSE Should the simulations be restarted from time zero after each update. -:ref:`ENKF_SCALING ` NO TRUE Do we want to normalize the data ensemble to have unit variance? -:ref:`ENKF_TRUNCATION ` NO 0.99 Cutoff used on singular value spectrum. -:ref:`ENSPATH ` NO storage Folder used for storage of simulation results. -:ref:`EQUIL_INIT_FILE ` NO Use INIT_SECTION instead -:ref:`FIELD ` NO Ads grid parameters -:ref:`FORWARD_MODEL ` NO Add the running of a job to the simulation forward model. -:ref:`GEN_DATA ` NO Specify a general type of data created/updated by the forward model. -:ref:`GEN_KW ` NO Add a scalar parameter. -:ref:`GEN_KW_TAG_FORMAT ` NO <%s> Format used to add keys in the GEN_KW template files. -:ref:`GEN_KW_EXPORT_FILE ` NO parameter.txt Name of file to export GEN_KW parameters to. -:ref:`GEN_PARAM ` NO Add a general parameter. -:ref:`GRID ` NO Provide an ECLIPSE grid for the reservoir model. -:ref:`HISTORY_SOURCE ` NO REFCASE_HISTORY Source used for historical values. -:ref:`HOOK_WORKFLOW ` NO Install a workflow to be run automatically. -:ref:`HOST_TYPE ` NO -:ref:`IGNORE_SCHEDULE ` NO -:ref:`IMAGE_TYPE ` NO png The type of the images created when plotting. -:ref:`IMAGE_VIEWER ` NO /usr/bin/display External program spawned to view images. -:ref:`INIT_SECTION ` NO Initialization code for the reservoir model. -:ref:`INSTALL_JOB ` NO Install a job for use in a forward model. -:ref:`ITER_CASE ` NO IES%d Case name format - iterated ensemble smoother -:ref:`ITER_COUNT ` NO 4 Number of iterations - iterated ensemble smoother -:ref:`ITER_RETRY_COUNT ` NO 4 Number of retries for a iteration - iterated ensemble smoother -:ref:`JOBNAME ` NO Name used for simulation files. An alternative to ECLBASE. -:ref:`JOB_SCRIPT ` NO Python script managing the forward model. -:ref:`LOAD_SEED ` NO Load random seed from given file. -:ref:`LOAD_WORKFLOW ` NO Load a workflow into ERT. -:ref:`LOAD_WORKFLOW_JOB ` NO Load a workflow job into ERT. -:ref:`LICENSE_PATH ` NO A path where ert-licenses to e.g. RMS are stored. -:ref:`LOCAL_CONFIG ` NO A file with configuration information for local analysis. -:ref:`LOG_FILE ` NO log Name of log file -:ref:`LOG_LEVEL ` NO 1 How much logging? -:ref:`LSF_QUEUE ` NO normal Name of LSF queue. -:ref:`LSF_RESOURCES ` NO -:ref:`LSF_SERVER ` NO Set server used when submitting LSF jobs. -:ref:`MAX_ITER_COUNT ` NO Maximal number of iterations - iterated ensemble smoother. -:ref:`MAX_RESAMPLE ` NO 1 How many times should ert resample & retry a simulation. -:ref:`MAX_RUNNING_LOCAL ` NO The maximum number of running jobs when running locally. -:ref:`MAX_RUNNING_LSF ` NO The maximum number of simultaneous jobs submitted to LSF. -:ref:`MAX_RUNNING_RSH ` NO The maximum number of running jobs when using RSH queue system. -:ref:`MAX_RUNTIME ` NO 0 Set the maximum runtime in seconds for a realization. -:ref:`MAX_SUBMIT ` NO 2 How many times should the queue system retry a simulation. -:ref:`MIN_REALIZATIONS ` NO 0 Set the number of minimum reservoir realizations to run before long running realizations are stopped. Keyword STOP_LONG_RUNNING must be set to TRUE when MIN_REALIZATIONS are set. -:ref:`NUM_REALIZATIONS ` YES Set the number of reservoir realizations to use. -:ref:`OBS_CONFIG ` NO File specifying observations with uncertainties. -:ref:`PLOT_DRIVER ` NO PLPLOT Which plotting system should be used. -:ref:`PLOT_ERRORBAR ` NO FALSE Should errorbars on observations be plotted? -:ref:`PLOT_ERRORBAR_MAX ` NO 25 Show error bars if less than this number of observations. -:ref:`PLOT_HEIGHT ` NO 768 Pixel height of the plots. -:ref:`PLOT_PATH ` NO plots Path to where the plots are stored. -:ref:`PLOT_REFCASE ` NO TRUE TRUE (IF you want to plot the listed reference cases) FALSE if not. -:ref:`PLOT_REFCASE_LIST ` NO Deprecated. Use REFCASE_LIST instead. -:ref:`PLOT_WIDTH ` NO 1024 Pixel width of the plots. -:ref:`PRE_CLEAR_RUNPATH ` NO FALSE Should the runpath be cleared before initializing? -:ref:`QUEUE_SYSTEM ` NO System used for running simulation jobs. -:ref:`REFCASE ` NO (see HISTORY_SOURCE and SUMMARY) Reference case used for observations and plotting. -:ref:`REFCASE_LIST ` NO Full path to Eclipse .DATA files containing completed runs (which you can add to plots) -:ref:`RERUN_PATH ` NO ... -:ref:`RERUN_START ` NO 0 ... -:ref:`RFT_CONFIG ` NO Config file specifying wellnames and dates for rft-measurments. Used for plotting. The format has to be name day month year (ex. Q-2FI 02 08 1973), with a new entry on a new line. -:ref:`RFTPATH ` NO rft Path to where the rft well observations are stored -:ref:`RSH_COMMAND ` NO Command used for remote shell operations. -:ref:`RSH_HOST ` NO Remote host used to run forward model. -:ref:`RUNPATH ` NO simulations/realization%d Directory to run simulations -:ref:`RUN_TEMPLATE ` NO Install arbitrary files in the runpath directory. -:ref:`STD_SCALE_CORRELATED_OBS ` NO FALSE Try to estimate the correlations in the data to inflate the observation std. -:ref:`SCHEDULE_FILE ` NO Provide an ECLIPSE schedule file for the problem. -:ref:`SCHEDULE_PREDICTION_FILE ` NO Schedule prediction file. -:ref:`SETENV ` NO You can modify the UNIX environment with SETENV calls. -:ref:`SINGLE_NODE_UPDATE ` NO FALSE ... -:ref:`STD_CUTOFF ` NO 1e-6 ... -:ref:`STOP_LONG_RUNNING ` NO FALSE Stop long running realizations after minimum number of realizations (MIN_REALIZATIONS) have run. -:ref:`STORE_SEED ` NO File where the random seed used is stored. -:ref:`SUMMARY

` NO Add summary variables for internalization. -:ref:`SURFACE ` NO Surface parameter read from RMS IRAP file. -:ref:`TORQUE_QUEUE ` NO ... -:ref:`TIME_MAP ` NO Ability to manually enter a list of dates to establish report step <-> dates mapping. -:ref:`UMASK ` NO Control the permissions on files created by ERT. -:ref:`UPDATE_LOG_PATH ` NO update_log Summary of the EnKF update steps are stored in this directory. -:ref:`UPDATE_PATH ` NO Modify a UNIX path variable like LD_LIBRARY_PATH. -:ref:`WORKFLOW_JOB_DIRECTORY ` NO Directory containing workflow jobs. -===================================================================== ====================================== ============================== ============================================================================================================================================== - - -:ref:` <>` - -Basic required keywords ------------------------ -.. _basic_required_keywords: - -These keywords must be set to make the enkf function properly. - -.. _data_file: -.. topic:: DATA_FILE - - | This is the name of ECLIPSE data file used to control the simulations. The data file should be prepared according to the guidelines given in Preparing an ECLIPSE reservoir model for use with enkf. - - *Example:* - - :: - - -- Load the data file called ECLIPSE.DATA - DATA_FILE ECLIPSE.DATA - - - - -.. _eclbase: -.. topic:: ECLBASE - - | The ECLBASE keyword sets the basename used for the ECLIPSE simulations. It can (and should, for your convenience) contain a %d specifier, which will be replaced with the realization numbers when running ECLIPSE. Note that due to limitations in ECLIPSE, the ECLBASE string must be in strictly upper or lower case. - - *Example:* - - :: - - -- Use MY_VERY_OWN_OIL_FIELD-0 etc. as basename. - -- When ECLIPSE is running, the %d will be, - -- replaced with realization number, giving: - -- - -- MY_VERY_OWN_OIL_FIELD-0 - -- MY_VERY_OWN_OIL_FIELD-1 - -- MY_VERY_OWN_OIL_FIELD-2 - -- ... - -- and so on. - ECLBASE MY_VERY_OWN_OIL_FIELD-%d - -.. _jobname: -.. topic:: JOBNAME - - As an alternative to the ECLBASE keyword you can use the JOBNAME keyword; in particular in cases where your forward model does not include ECLIPSE at all that makes more sense. If JOBANME is used instead of ECLBASE the same rules of no-mixed-case apply. - -.. _grid: -.. topic:: GRID - - This is the name of an existing GRID/EGRID file for your ECLIPSE model. If you had to create a new grid file when preparing your ECLIPSE reservoir model for use with enkf, this should point to the new .EGRID file. - - *Example:* - - :: - - -- Load the .EGRID file called MY_GRID.EGRID - GRID MY_GRID.EGRID - - -.. _init_section: -.. topic:: INIT_SECTION - - The INIT_SECTION keyword is used to handle initialization of the ECLIPSE run. See the documentation of the Initialization for more details on why this has to be done. The keyword can be used in two different ways: - - * If it is set to the name of an existing file, the contents of this file will be used for the initialization. - * If it is set to the name of a non-existing file, it will be assumed that a file with this name in the simulation folder will be generated when simulations are submitted, either by the enkf application itself, or by some job installed by the user (see INSTALL_JOB). This generated file will then be used by ECLIPSE for initialization. - - *Example A:* - - :: - - -- Use the contents of the file parameters/EQUIL.INC for initialization - INIT_SECTION params/EQUIL.INC - - *Example B:* - - :: - - -- Use a generated file for the initialization - INIT_SECTION MY_GENERATED_EQUIL_KEYWORD.INC - - -.. _num_realizations: -.. topic:: NUM_REALIZATIONS - - This is just the size of the ensemble, i.e. the number of realizations/members in the ensemble. - - *Example:* - - :: - - -- Use 200 realizations/members - NUM_REALIZATIONS 200 - - -.. _schedule_file: -.. topic:: SCHEDULE_FILE - - This keyword should be the name a text file containing the SCHEDULE section of the ECLIPSE data file. It should be prepared in accordance with the guidelines given in Preparing an ECLIPSE reservoir model for use with enkf. This SCHEDULE section will be used to control the ECLIPSE simulations. You can optionally give a second filename, which is the name of file which will be written into the directories for running ECLIPSE. - - *Example:* - - :: - - -- Parse MY_SCHEDULE.SCH, call the generated file ECLIPSE_SCHEDULE.SCH - SCHEDULE_FILE MY_SCHEDULE.SCH ECLIPSE_SCHEDULE.SCH - - Observe that the SCHEDULE_FILE keyword is only required when you need ERT to stop and restart your simulations; i.e. when you are using the EnKF algorithm. If you are only using ERT to your simulations; or using smoother update it is recommended to leave the SCHEDULE_FILE keyword out. In that case you must make sure that the ECLIPSE datafile correctly includes the SCHEDULE section. - - -Basic optional keywords ------------------------ -.. _basic_optional_keywords: - -These keywords are optional. However, they serve many useful purposes, and it is recommended that you read through this section to get a thorough idea of what's possible to do with the enkf application. - -.. _data_kw: -.. topic:: DATA_KW - - The keyword DATA_KW can be used for inserting strings into placeholders in the ECLIPSE data file. For instance, it can be used to insert include paths. - - *Example:* - - :: - - -- Define the alias MY_PATH using DATA_KW. Any instances of (yes, with brackets) - -- in the ECLIPSE data file will now be replaced with /mnt/my_own_disk/my_reservoir_model - -- when running the ECLIPSE jobs. - DATA_KW MY_PATH /mnt/my_own_disk/my_reservoir_model - - The DATA_KW keyword is of course optional. Note also that the enkf has some built in magic strings. - -.. _delete_runpath: -.. topic:: DELETE_RUNPATH - - When the ert application is running it creates directories for - the forward model simulations, one for each realization. When - the simulations are done, ert will load the results into the - internal database. By default the realization folders will be - left intact after ert has loaded the results, but using the - keyword DELETE_RUNPATH you can request to have (some of) the - directories deleted after results have been loaded. - - *Example A:* - - :: - - -- Delete simulation directories 0 to 99 - DELETE_RUNPATH 0-99 - - *Example B:* - - :: - - -- Delete simulation directories 0 to 10 as well as 12, 15 and 20. - DELETE_RUNPATH 0 - 10, 12, 15, 20 - - The DELETE_RUNPATH keyword is optional. - - -.. _end_date: -.. topic:: END_DATE - - When running a set of models from beginning to end ERT does - not now in advance how long the simulation is supposed to be, - it is therefor impossible beforehand to determine which - restart file number should be used as target file, and the - procedure used for EnKF runs can not be used to verify that an - ECLIPSE simulation has run to the end. - - By using the END_DATE keyword you can tell ERT that the - simulation should go at least up to the date given by - END_DATE, otherwise they will be regarded as failed. The - END_DATE does not need to correspond exactly to the end date - of the simulation, it must just be set so that all simulations - which go to or beyond END_DATE are regarded as successfull. - - *Example:* - - :: - END_DATE 10/10/2010 - - With this END_DATE setting all simulations which have gone to - at least 10.th of October 2010 are OK. - - -.. _enspath: -.. topic:: ENSPATH - - The ENSPATH should give the name of a folder that will be used - for storage by the enkf application. Note that the contents of - this folder is not intended for human inspection. By default, - ENSPATH is set to "storage". - - *Example:* - - :: - - -- Use internal storage in /mnt/my_big_enkf_disk - ENSPATH /mnt/my_big_enkf_disk - - The ENSPATH keyword is optional. - - -.. _history_source: -.. topic:: HISTORY_SOURCE - - In the observation configuration file you can enter - observations with the keyword HISTORY_OBSERVATION; this means - that ERT will the observed 'true' values from the model - history. Practically the historical values can be fetched - either from the SCHEDULE file or from a reference case. What - source to use for the historical values can be controlled with - the HISTORY_SOURCE keyword. The different possible values for - the HISTORY_SOURCE keyword are: - - - REFCASE_HISTORY - This is the default value for HISTORY_SOURCE, - ERT will fetch the historical values from the *xxxH* - keywords in the refcase summary, e.g. observations of - WGOR:OP_1 is based the WGORH:OP_1 vector from the - refcase summary. - - REFCASE_SIMULATED - In this case the historical values are based on the simulated values from the refcase, this is mostly relevant when a you want compare with another case which serves as 'the truth'. - - SCHEDULE - Load historical values from the WCONHIST and WCONINJE keywords in the Schedule file. - - - When setting HISTORY_SOURCE to either REFCASE_SIMULATED or REFCASE_HISTORY you must also set the REFCASE variable to point to the ECLIPSE data file in an existing reference case (should be created with the same schedule file as you are using now). - - *Example:* - - :: - - -- Use historic data from reference case - HISTORY_SOURCE REFCASE_HISTORY - REFCASE /somefolder/ECLIPSE.DATA - - The HISTORY_SOURCE keyword is optional. - -.. _refcase: -.. topic:: REFCASE - - With the REFCASE key you can supply ert with a reference case which can be used for observations (see HISTORY_SOURCE), if you want to use wildcards with the SUMMARY keyword you also must supply a REFCASE keyword. The REFCASE keyword should just point to an existing ECLIPSE data file; ert will then look up and load the corresponding summary results. - - *Example:* - - :: - - -- The REFCASE keyword points to the datafile of an existing ECLIPSE simulation. - REFCASE /path/to/somewhere/SIM_01_BASE.DATA - - -.. _install_job: -.. topic:: INSTALL_JOB - - The INSTALL_JOB keyword is used to learn the enkf application how to run external applications and scripts, i.e. defining a job. After a job has been defined with INSTALL_JOB, it can be used with the FORWARD_MODEL keyword. For example, if you have a script which generates relative permeability curves from a set of parameters, it can be added as a job, allowing you to do history matching and sensitivity analysis on the parameters defining the relative permeability curves. - - The INSTALL_JOB keyword takes two arguments, a job name and the name of a configuration file for that particular job. - - *Example:* - - :: - - -- Define a Lomeland relative permeabilty job. - -- The file jobs/lomeland.txt contains a detailed - -- specification of the job. - INSTALL_JOB LOMELAND jobs/lomeland.txt - - The configuration file used to specify an external job is easy to use and very flexible. It is documented in Customizing the simulation workflow in enkf. - - The INSTALL_JOB keyword is optional. - -.. _obs_config: -.. topic:: OBS_CONFIG - - The OBS_CONFIG key should point to a file defining observations and associated uncertainties. The file should be in plain text and formatted according to the guidelines given in Creating an observation file for use with enkf. - - *Example:* - - :: - - -- Use the observations in my_observations.txt - OBS_CONFIG my_observations.txt - - The OBS_CONFIG keyword is optional, but for your own convenience, it is strongly recommended to provide an observation file. - -.. _result_path: -.. topic:: RESULT_PATH - - The enkf application will print some simple tabulated results at each report step. The RESULT_PATH keyword should point to a folder where the tabulated results are to be written. It can contain a %d specifier, which will be replaced with the report step by enkf. The default value for RESULT_PATH is "results/step_%d". - - *Example:* - - :: - - -- Changing RESULT_PATH - RESULT_PATH my_nice_results/step-%d - - The RESULT_PATH keyword is optional. - -.. _runpath: -.. topic:: RUNPATH - - The RUNPATH keyword should give the name of the folders where the ECLIPSE simulations are executed. It should contain at least one %d specifier, which will be replaced by the realization number when the enkf creates the folders. Optionally, it can contain one more %d specifier, which will be replaced by the iteration number. - - By default, RUNPATH is set to "simulations/realization-%d". - - *Example A:* - - :: - -- Giving a RUNPATH with just one %d specifer. - RUNPATH /mnt/my_scratch_disk/realization-%d - - *Example B:* - - :: - - -- Giving a RUNPATH with two %d specifers. - RUNPATH /mnt/my_scratch_disk/realization-%d/iteration-%d - - The RUNPATH keyword is optional. - - -.. _runpath_file: -.. topic:: RUNPATH_FILE - -When running workflows based on external scripts it is necessary to 'tell' the external script in some way or another were all the realisations are located in the filesystem. Since the number of realisations can be quite high this will easily overflow the commandline buffer; the solution which is used is therefor to let ert write a reagular file which looks like this:: - - 0 /path/to/realisation0 CASE0 iter - 1 /path/to/realisation1 CASE1 iter - ... - N /path/to/realisationN CASEN iter - -The path to this file can then be passed to the scripts using the -magic string . The RUNPATH_FILE will by default be -stored as .ert_runpath_list in the same directory as the configuration -file, but you can set it to something else with the RUNPATH_FILE key. - -Keywords controlling the simulations ------------------------------------- -.. _keywords_controlling_the_simulations: - -.. _min_realizations: -.. topic:: MIN_REALIZATIONS - - MIN_REALIZATIONS is the minimum number of realizations that must have succeeded for the simulation to be regarded as a success. - - MIN_REALIZATIONS can also be used in combination with STOP_LONG_RUNNING, see the documentation for STOP_LONG_RUNNING for a description of this. - - *Example:* - - :: - - MIN_REALIZATIONS 20 - - The MIN_REALIZATIONS key can also be set as a percentage of NUM_REALIZATIONS - - :: - - MIN_REALIZATIONS 10% - - The MIN_REALIZATIONS key is optional. - - -.. _stop_long_running: -.. topic:: STOP_LONG_RUNNING - - The STOP_LONG_RUNNING key is used in combination with the MIN_REALIZATIONS key to control the runtime of simulations. When STOP_LONG_RUNNING is set to TRUE, MIN_REALIZATIONS is the minimum number of realizations run before the simulation is stopped. After MIN_REALIZATIONS have succeded successfully, the realizatons left are allowed to run for 25% of the average runtime for successfull realizations, and then killed. - - *Example:* - - :: - - -- Stop long running realizations after 20 realizations have succeeded - MIN_REALIZATIONS 20 - STOP_LONG_RUNNING TRUE - - The STOP_LONG_RUNNING key is optional. The MIN_REALIZATIONS key must be set when STOP_LONG_RUNNING is set to TRUE. - - -.. _max_runtime: -.. topic:: MAX_RUNTIME - - The MAX_RUNTIME keyword is used to control the runtime of simulations. When MAX_RUNTIME is set, a job is only allowed to run for MAX_RUNTIME, given in seconds. A value of 0 means unlimited runtime. - - *Example:* - - :: - - -- Let each realizations run for 50 seconds - MAX_RUNTIME 50 - - The MAX_RUNTIME key is optional. - - -Parameterization keywords -------------------------- -.. _parameterization_keywords: - -The keywords in this section are used to define a parametrization of the ECLIPSE model. I.e., defining which parameters to change in a sensitivity analysis and/or history matching project. For some parameters, it necessary to specify a prior distribution. See Prior distributions available in enkf for a complete list of available priors. - -.. _field: -.. topic:: FIELD - - The FIELD keyword is used to parametrize quantities which have extent over the full grid. Both dynamic properties like pressure, and static properties like porosity, are implemented in terms of FIELD objects. When adding fields in the config file the syntax is a bit different for dynamic fields (typically solution data from ECLIPSE) and parameter fields like permeability and porosity. - - **Dynamic fields** - - To add a dynamic field the entry in the configuration file looks like this: - - :: - FIELD DYNAMIC MIN:X MAX:Y - - In this case ID is not an arbitrary string; it must coincide with the keyword name found in the ECLIPSE restart file, e.g. PRESSURE. Optionally, you can add a minimum and/or a maximum value with MIN:X and MAX:Y. - - *Example A:* - - :: - - -- Adding pressure field (unbounded) - FIELD PRESSURE DYNAMIC - - *Example B:* - - :: - - -- Adding a bounded water saturation field - FIELD SWAT DYNAMIC MIN:0.2 MAX:0.95 - - **Parameter fields** - - A parameter field (e.g. porosity or permeability) is defined as follows: - - :: - - FIELD ID PARAMETER INIT_FILES:/path/%d MIN:X MAX:Y OUTPUT_TRANSFORM:FUNC INIT_TRANSFORM:FUNC - - Here ID is again an arbitrary string, ECLIPSE_FILE is the name of the file the enkf will export this field to when running simulations. Note that there should be an IMPORT statement in the ECLIPSE data file corresponding to the name given with ECLIPSE_FILE. INIT_FILES is a filename (with an embedded %d) to load the initial field from. Can be RMS ROFF format, ECLIPSE restart format or ECLIPSE GRDECL format. - - The options MIN, MAX, INIT_TRANSFORM and OUTPUT_TRANSFORM are all optional. MIN and MAX are as for dynamic fields. OUTPUT_TRANSFORM is the name of a mathematical function which will be applied to the field before it is exported, and INIT_TRANSFORM is the name of a function which will be applied to the fields when they are loaded. [Just use INIT_TRANSFORM:XXX to get a list of available functions.] - - Regarding format of ECLIPSE_FILE: The default format for the parameter fields is binary format of the same type as used in the ECLIPSE restart files. This requires that the ECLIPSE datafile contains an IMPORT statement. The advantage with using a binary format is that the files are smaller, and reading/writing is faster than for plain text files. If you give the ECLIPSE_FILE with the extension .grdecl (arbitrary case), enkf will produce ordinary .grdecl files, which are loaded with an INCLUDE statement. This is probably what most users are used to beforehand - but we recomend the IMPORT form. - - **General fields** - - In addition to dynamic and parameter field there is also a general field, where you have fine grained control over input/output. Use of the general field type is only relevant for advanced features. The arguments for the general field type are as follows: - - :: - - FIELD ID GENERAL FILE_GENERATED_BY_ENKF FILE_LOADED_BY_ENKF - - The OPTIONS argument is the same as for the parameter field. - -.. _gen_data: -.. topic:: GEN_DATA - - The GEN_DATA keyword is used when estimating data types which enkf does not know anything about. GEN_DATA is very similar to GEN_PARAM, but GEN_DATA is used for data which are updated/created by the forward model like e.g. seismic data. In the main configuration file the input for a GEN_DATA instance is as follows: - - :: - - GEN_DATA ID RESULT_FILE:yyy INPUT_FORMAT:xx REPORT_STEPS:10,20 ECL_FILE:xxx OUTPUT_FORMAT:xx INIT_FILES:/path/files%d TEMPLATE:/template_file TEMPLATE_KEY:magic_string - - The GEN_DATA keyword has many options; in many cases you can leave many of them off. We therefor list the required and the optional options separately: - - **Required GEN_DATA options** - - * RESULT_FILE - This if the name the file generated by the forward model and read by ERT. This filename _must_ have a %d as part of the name, that %d will be replaced by report step when loading. - * INPUT_FORMAT - The format of the file written by the forward model (i.e. RESULT_FILE) and read by ERT, valid values are ASCII, BINARY_DOUBLE and BINARY_FLOAT. - * REPORT_STEPS A list of the report step(s) where you expect the forward model to create a result file. I.e. if the forward model should create a result file for report steps 50 and 100 this setting should be: REPORT_STEPS:50,100. If you have observations of this GEN_DATA data the RESTART setting of the corresponding GENERAL_OBSERVATION must match one of the values given by REPORT_STEPS. - - **Optional GEN_DATA options** - - * ECL_FILE - This is the name of file written by enkf to be read by the forward model. - * OUTPUT_FORMAT - The format of the files written by enkf and read by the forward model, valid values are ASCII, BINARY_DOUBLE, BINARY_FLOAT and ASCII_TEMPLATE. If you use ASCII_TEMPLATE you must also supply values for TEMPLATE and TEMPLATE_KEY. - * INIT_FILES - Format string with '%d' of files to load the initial data from. - - *Example:* - - :: - - GEN_DATA 4DWOC INPUT_FORMAT:ASCII RESULT_FILE:SimulatedWOC%d.txt REPORT_STEPS:10,100 - - Here we introduce a GEN_DATA instance with name 4DWOC. When the forward model has run it should create two files with name SimulatedWOC10.txt and SimulatedWOC100.txt. The result files are in ASCII format, ERT will look for these files and load the content. The files should be pure numbers - without any header. - - **Observe that the GEN_DATA RESULT_FILE setting must have a %d format specifier, that will be replaced with the report step..** - - -.. _custom_kw: -.. topic:: CUSTOM_KW - - The keyword CUSTOM_KW enables custom data key:value pairs - to be stored in ERT storage. Custom KW has many - similarities to Gen KW and Gen Data but is fully defined by - the user and contain only key_value pairs. - - *Example:* - - :: - - CUSTOM_KW GROUP_NAME - - --GROUP_NAME - This is similar to Gen KW where every keyword is prefixed with the GROUP_NAME like this: GROUP_NAME:KEYWORD - - --input_file - This is the input file expected to be generated by a forward model. - - --Example - CUSTOM_KW COMPOSITION composition.txt - - With this setup ERT will expect the file composition.txt to be present in the runpath. - This file may look like this - - :: - - oil 0.5 - water 0.2 - gas 0.2 - unknown 0.1 - state good - - Every key-value pair must be a string followed by a space and a value. - The value can either be a number or a string (all numbers are interpreted as floats). - - After a successful run, ERT will store the COMPOSITION - Custom KW in its filesystem and will be available for every - realization. An export will present the values produced as: - - * COMPOSITION:oil - * COMPOSITION:water - * COMPOSITION:gas - * COMPOSITION:unknown - * COMPOSITION:state - - -.. _gen_kw: -.. topic:: GEN_KW - - The GEN_KW (abbreviation of general keyword) parameter is based on a template file and substitution. In the main config file a GEN_KW instance is defined as follows: - - :: - - GEN_KW ID my_template.txt my_eclipse_include.txt my_priors.txt - - Here ID is an (arbitrary) unique string, my_template.txt is - the name of a template file, my_eclipse_include.txt is the - name of the file which is made for each member based on - my_template.txt and my_priors.txt is a file containing a list - of parametrized keywords and a prior distribution for - each. Note that you must manually edit the ECLIPSE data file - so that my_eclipse_include.txt is included. - - Let us consider an example where the GEN_KW parameter type is - used to estimate pore volume multipliers. We would then - declare a GEN_KW instance in the main enkf configuration file: - - :: - - GEN_KW PAR_MULTPV multpv_template.txt multpv.txt multpv_priors.txt - - In the GRID or EDIT section of the ECLIPSE data file, we would - insert the following include statement: - - :: - - INCLUDE - 'multpv.txt' / - - The template file multpv_template.txt would contain some - parametrized ECLIPSE statements: - - :: - - BOX - 1 10 1 30 13 13 / - MULTPV - 300* / - ENDBOX - - BOX - 1 10 1 30 14 14 / - MULTPV - 300* / - ENDBOX - - Here, and will act as magic - strings. Note that the '<' '>' must be present around the - magic strings. In this case, the parameter configuration file - multpv_priors.txt could look like this: - - :: - - MULTPV_BOX2 UNIFORM 0.98 1.03 - MULTPV_BOX1 UNIFORM 0.85 1.00 - - In general, the first keyword on each line in the parameter - configuration file defines a key, which when found in the - template file enclosed in '<' and '>', is replaced with a - value. The rest of the line defines a prior distribution for - the key. See Prior distributions available in enkf for a list - of available prior distributions. - - **Example: Using GEN_KW to estimate fault transmissibility multipliers** - - Previously enkf supported a datatype MULTFLT for estimating - fault transmissibility multipliers. This has now been - depreceated, as the functionality can be easily achieved with - the help of GEN_KW. In th enkf config file: - - :: - - GEN_KW MY-FAULTS MULTFLT.tmpl MULTFLT.INC MULTFLT.txt - - Here MY-FAULTS is the (arbitrary) key assigned to the fault - multiplers, MULTFLT.tmpl is the template file, which can look - like this: - - :: - - MULTFLT - 'FAULT1' / - 'FAULT2' / - / - - and finally the initial distribution of the parameters FAULT1 - and FAULT2 are defined in the file MULTFLT.txt: - - :: - - FAULT1 LOGUNIF 0.00001 0.1 - FAULT2 UNIFORM 0.00 1.0 - - The various prior distributions available for the ``GEN_KW`` - keyword are here :ref:`prior distributions available in ERT ` - - - Loading GEN_KW values from an external file - - The default use of the GEN_KW keyword is to let the ERT - application sample random values for the elements in the - GEN_KW instance, but it is also possible to tell ERT to load a - precreated set of data files, this can for instance be used as - a component in a experimental design based workflow. When - using external files to initialize the GEN_KW instances you - supply an extra keyword ``INIT_FILE:/path/to/priors/files%d`` - which tells where the prior files are: - - :: - - GEN_KW MY-FAULTS MULTFLT.tmpl MULTFLT.INC MULTFLT.txt INIT_FILES:priors/multflt/faults%d - - In the example above you must prepare files - priors/multflt/faults0, priors/multflt/faults1, - ... priors/multflt/faultsn which ert will load when you - initialize the case. The format of the GEN_KW input files can - be of two varieties: - - 1. The files can be plain ASCII text files with a list of numbers: - - :: - - 1.25 - 2.67 - - The numbers will be assigned to parameters in the order found in the MULTFLT.txt file. - - 2. Alternatively values and keywords can be interleaved as in: - - :: - - FAULT1 1.25 - FAULT2 2.56 - - in this case the ordering can differ in the init files and the parameter file. - - The heritage of the ERT program is based on the EnKF algorithm, and the EnKF algorithm evolves around Gaussian variables - internally the GEN_KW variables are assumed to be samples from the N(0,1) distribution, and the distributions specified in the parameters file are based on transformations starting with a N(0,1) distributed variable. The slightly awkward consequence of this is that to let your sampled values pass through ERT unmodified you must configure the distribution NORMAL 0 1 in the parameter file; alternatively if you do not intend to update the GEN_KW variable you can use the distribution RAW. - - -.. _gen_param: -.. topic:: GEN_PARAM - - The GEN_PARAM parameter type is used to estimate parameters which do not really fit into any of the other categories. As an example, consider the following situation: - - Some external Software (e.g. Cohiba) makes a large vector of random numbers which will serve as input to the forward model. (It is no requirement that the parameter set is large, but if it only consists of a few parameters the GEN_KW type will be easier to use.) - We want to update this parameter with enkf. - In the main configuration file the input for a GEN_PARAM instance is as follows: - - :: - - GEN_PARAM ID ECLIPSE_FILE INPUT_FORMAT:xx OUTPUT_FORMAT:xx INIT_FILES:/path/to/init/files%d (TEMPLATE:/template_file KEY:magic_string) - - here ID is the usual unique string identifying this instance and ECLIPSE_FILE is the name of the file which is written into the run directories. The three arguments GEN_PARAM, ID and ECLIPSE_FILE must be the three first arguments. In addition you must have three additional arguments, INPUT_FORMAT, OUTPUT_FORMAT and INIT_FILES. INPUT_FORMAT is the format of the files enkf should load to initialize, and OUTPUT_FORMAT is the format of the files enkf writes for the forward model. The valid values are: - - * ASCII - This is just text file with formatted numbers. - * ASCII_TEMPLATE - An plain text file with formatted numbers, and an arbitrary header/footer. - * BINARY_FLOAT - A vector of binary float numbers. - * BINARY_DOUBLE - A vector of binary double numbers. - - Regarding the different formats - observe the following: - - #. Except the format ASCII_TEMPLATE the files contain no header information. - #. The format ASCII_TEMPLATE can only be used as output format. - #. If you use the output format ASCII_TEMPLATE you must also supply a TEMPLATE:X and KEY:Y option. See documentation of this below. - #. For the binary formats files generated by Fortran can not be used - can easily be supported on request. - - **Regarding templates:** If you use OUTPUT_FORMAT:ASCII_TEMPLATE you must also supply the arguments TEMPLATE:/template/file and KEY:MaGiCKEY. The template file is an arbitrary existing text file, and KEY is a magic string found in this file. When enkf is running the magic string is replaced with parameter data when the ECLIPSE_FILE is written to the directory where the simulation is run from. Consider for example the follwing configuration: - - :: - - TEMPLATE:/some/file KEY:Magic123 - - The template file can look like this (only the Magic123 is special): - - :: - - Header line1 - Header line2 - ============ - Magic123 - ============ - Footer line1 - Footer line2 - - When enkf is running the string Magic123 is replaced with parameter values, and the resulting file will look like this: - - :: - - Header line1 - Header line2 - ============ - 1.6723 - 5.9731 - 4.8881 - ..... - ============ - Footer line1 - Footer line2 - -.. _surface: -.. topic:: SURFACE - - The SURFACE keyword can be used to work with surface from RMS in the irap format. The surface keyword is configured like this: - - :: - - SURFACE TOP OUTPUT_FILE:surf.irap INIT_FILES:Surfaces/surf%d.irap BASE_SURFACE:Surfaces/surf0.irap - - The first argument, TOP in the example above, is the identifier you want to use for this surface in ert. The OUTPUT_FILE key is the name of surface file which ERT will generate for you, INIT_FILES points to a list of files which are used to initialize, and BASE_SURFACE must point to one existing surface file. When loading the surfaces ERT will check that all the headers are compatible. An example of a surface IRAP file is: - - :: - - -996 511 50.000000 50.000000 - 444229.9688 457179.9688 6809537.0000 6835037.0000 - 260 -30.0000 444229.9688 6809537.0000 - 0 0 0 0 0 0 0 - 2735.7461 2734.8909 2736.9705 2737.4048 2736.2539 2737.0122 - 2740.2644 2738.4014 2735.3770 2735.7327 2733.4944 2731.6448 - 2731.5454 2731.4810 2730.4644 2730.5591 2729.8997 2726.2217 - 2721.0996 2716.5913 2711.4338 2707.7791 2705.4504 2701.9187 - .... - - The surface data will typically be fed into other programs like Cohiba or RMS. The data can be updated using e.g. the Smoother. - - **Initializing from the FORWARD MODEL** - - All the parameter types like FIELD,GEN_KW,GEN_PARAM and SURFACE can be initialized from the forward model. To achieve this you just add the setting FORWARD_INIT:True to the configuration. When using forward init the initialization will work like this: - - #. The explicit initialization from the case menu, or when you start a simulation, will be ignored. - #. When the FORWARD_MODEL is complete ERT will try to initialize the node based on files created by the forward model. If the init fails the job as a whole will fail. - #. If a node has been initialized, it will not be initialized again if you run again. [Should be possible to force this ....] - - When using FORWARD_INIT:True ERT will consider the INIT_FILES setting to find which file to initialize from. If the INIT_FILES setting contains a relative filename, it will be interpreted relativt to the runpath directory. In the example below we assume that RMS has created a file petro.grdecl which contains both the PERMX and the PORO fields in grdecl format; we wish to initialize PERMX and PORO nodes from these files: - - :: - - FIELD PORO PARAMETER poro.grdecl INIT_FILES:petro.grdecl FORWARD_INIT:True - FIELD PERMX PARAMETER permx.grdecl INIT_FILES:petro.grdecl FORWARD_INIT:True - - Observe that forward model has created the file petro.grdecl and the nodes PORO and PERMX create the ECLIPSE input files poro.grdecl and permx.grdecl, to ensure that ECLIPSE finds the input files poro.grdecl and permx.grdecl the forward model should contain a job which will copy/convert petro.grdecl -> (poro.grdecl,permx.grdecl), this job should not overwrite existing versions of permx.grdecl and poro.grdecl. This extra hoops is not strictly needed in all cases, but strongly recommended to ensure that you have control over which data is used, and that everything is consistent in the case where the forward model is run again. - - -.. _summary: -.. topic:: SUMMARY - - The SUMMARY keyword is used to add variables from the ECLIPSE summary file to the parametrization. The keyword expects a string, which should have the format VAR:WGRNAME. Here, VAR should be a quantity, such as WOPR, WGOR, RPR or GWCT. Moreover, WGRNAME should refer to a well, group or region. If it is a field property, such as FOPT, WGRNAME need not be set to FIELD. - - *Example:* - - :: - - -- Using the SUMMARY keyword to add diagnostic variables - SUMMARY WOPR:MY_WELL - SUMMARY RPR:8 - SUMMARY F* -- Use of wildcards requires that you have entered a REFCASE. - - The SUMMARY keyword has limited support for '*' wildcards, if your key contains one or more '*' characters all matching variables from the refcase are selected. Observe that if your summary key contains wildcards you must supply a refcase with the REFCASE key - otherwise it will fail hard. - - **Note:** Properties added using the SUMMARY keyword are only diagnostic. I.e., they have no effect on the sensitivity analysis or history match. - - -Keywords controlling the ES algorithm ------------------------------------------ -.. _keywords_controlling_the_es_algorithm: - -.. _enkf_alpha: -.. topic:: ENKF_ALPHA - - ENKF_ALPHA has some latex letters - need to be handled!! - Scaling factor (double) used in outlier detection. Increasing this factor means that more observations will potentially be included in the assimilation. The default value is 1.50. - - Including outliers in the EnKF algorithm can dramatically increase the coupling between the ensemble members. It is therefore important to filter out these outlier data prior to data assimilation. An observation, \textstyle d^o_i, will be classified as an outlier if - - :: - - |d^o_i - \bar{d}_i| > \mathrm{ENKF\_ALPHA} \left(s_{d_i} + \sigma_{d^o_i}\right), - - where \textstyle\boldsymbol{d}^o is the vector of observed data, \textstyle\boldsymbol{\bar{d}} is the average of the forcasted data ensemble, \textstyle\boldsymbol{s_{d}} is the vector of estimated standard deviations for the forcasted data ensemble, and \textstyle\boldsymbol{s_{d}^o} is the vector standard deviations for the observation error (specified a priori). - - -.. _enkf_bootstrap: -.. topic:: ENKF_BOOTSTRAP - - Boolean specifying if we want to resample the Kalman gain matrix in the update step. The purpose is to avoid that the ensemble covariance collapses. When this keyword is true each ensemble member will be updated based on a Kalman gain matrix estimated from a resampling with replacement of the full ensemble. - - In theory and in practice this has worked well when one uses a small number of ensemble members. - - -.. _enkf_cv_folds: -.. topic:: ENKF_CV_FOLDS - - Integer specifying how many folds we should use in the Cross-Validation (CV) scheme. Possible choices are the integers between 2 and the ensemble size (2-fold CV and leave-one-out CV respectively). However, a robust choice for the number of CV-folds is 5 or 10 (depending on the ensemble size). - - *Example:* - - :: - - -- Setting the number of CV folds equal to 5 - ENKF_CV_FOLDS 5 - - Requires that the ENKF_LOCAL_CV keyword is set to TRUE - - -.. _enkf_force_ncomp: -.. topic:: ENKF_FORCE_NCOMP - - Bool specifying if we want to force the subspace dimension we want to use in the EnKF updating scheme (SVD-based) to a specific integer. This is an alternative to selecting the dimension using ENKF_TRUNCATION or ENKF_LOCAL_CV. - - *Example:* - - :: - - -- Setting the the subspace dimension to 2 - ENKF_FORCE_NCOMP TRUE - ENKF_NCOMP 2 - - - -.. _enkf_local_cv: -.. topic:: ENKF_LOCAL_CV - - Boolean specifying if we want to select the subspace dimension in the SVD-based EnKF algorithm using Cross-Validation (CV) [1]. This is a more robust alternative to selecting the subspace dimension based on the estimated singular values (See ENKF_TRUNCATION), because the predictive power of the estimated Kalman gain matrix is taken into account. - - *Example:* - - :: - - -- Select the subspace dimension using Cross-Validation - ENKF_LOCAL_CV TRUE - - - -.. _enkf_pen_press: -.. topic:: ENKF_PEN_PRESS - - Boolean specifying if we want to select the subspace dimension in the SVD-based EnKF algorithm using Cross-Validation (CV), and a penalised version of the predictive error sum of squares (PRESS) statistic [2]. This is recommended when overfitting is a severe problem (and when the number of ensemble members is small) - - *Example:* - - :: - - -- Select the subspace dimension using Cross-Validation - ENKF_LOCAL_CV TRUE - - -- Using penalised PRESS statistic - ENKF_PEN_PRESS TRUE - - - -.. _enkf_mode: -.. topic:: ENKF_MODE - - The ENKF_MODE keyword is used to select which EnKF algorithm to use. Use the value STANDARD for the original EnKF algorithm, or SQRT for the so-called square root scheme. The default value for ENKF_MODE is STANDARD. - - *Example A:* - - :: - - -- Using the square root update - ENKF_MODE SQRT - - *Example B:* - - :: - - -- Using the standard update - ENKF_MODE STANDARD - - The ENKF_MODE keyword is optional. - - -.. _enkf_merge_observations: -.. topic:: ENKF_MERGE_OBSERVATIONS - - If you use the ENKF_SCHED_FILE option to jump over several dates at a time you can choose whether you want to use all the observations in between, or just the final. If set to TRUE, all observations will be used. If set to FALSE, only the final observation is used. The default value for ENKF_MERGE_OBSERVATIONS is FALSE. - - *Example:* - - :: - - -- Merge observations - ENKF_MERGE_OBSERVATIONS TRUE - - -.. _enkf_ncomp: -.. topic:: ENKF_NCOMP - - Integer specifying the subspace dimension. Requires that ENKF_FORCE_NCOMP is TRUE. - -.. _enkf_rerun: -.. topic:: ENKF_RERUN - - This is a boolean switch - TRUE or FALSE. Should the simulation start from time zero after each update. - - - -.. _enkf_scaling: -.. topic:: ENKF_SCALING - - This is a boolean switch - TRUE (Default) or FALSE. If TRUE, we scale the data ensemble matrix to unit variance. This is generally recommended because the SVD-based EnKF algorithm is not scale invariant. - - -.. _enkf_truncation: -.. topic:: ENKF_TRUNCATION - - Truncation factor for the SVD-based EnKF algorithm (see Evensen, 2007). In this algorithm, the forecasted data will be projected into a low dimensional subspace before assimilation. This can substantially improve on the results obtained with the EnKF, especially if the data ensemble matrix is highly collinear (Saetrom and Omre, 2010). The subspace dimension, p, is selected such that - - :: - - \frac{\sum_{i=1}^{p} s_i^2}{\sum_{i=1}^r s_i^2} \geq \mathrm{ENKF\_TRUNCATION}, - - where si is the ith singular value of the centered data ensemble matrix and r is the rank of this matrix. This criterion is similar to the explained variance criterion used in Principal Component Analysis (see e.g. Mardia et al. 1979). - - The default value of ENKF_TRUNCATION is 0.99. If ensemble collapse is a big problem, a smaller value should be used (e.g 0.90 or smaller). However, this does not guarantee that the problem of ensemble collapse will disappear. Note that setting the truncation factor to 1.00, will recover the Standard-EnKF algorithm if and only if the covariance matrix for the observation errors is proportional to the identity matrix. - - -.. _std_scale_correlated_obs: -.. topic:: STD_SCALE_CORRELATED_OBS - - With this kewyord you can instruct ERT to use the simulated - data to estimate the correlations in the observations, and - then inflate the observation standard deviation as a way to - estimate the real information content in the observations. The - method is based on PCA, the scaling factor is calculated as: - - :: - - \sqrt{\frac{N_{\sigma}}{N_{\mathrm{obs}}} - - where $N_{\sigma}$ is the number of singular components, at - (fixed) truncation 0.95 and $N_{\mathrm{obs}}$ is the number - of observations. The STD_SCALE_CORRELATED_OBS keyword will - flatten all your observations, including temporal and spatial - correlations. For more fine grained control you can use the - STD_CALE_CORRELATED_OBS workflow job, or even write your own - plugins. - - - -.. _update_log_path: -.. topic:: UPDATE_LOG_PATH - - A summary of the data used for updates are stored in this directory. - - -**References** - -* Evensen, G. (2007). "Data Assimilation, the Ensemble Kalman Filter", Springer. -* Mardia, K. V., Kent, J. T. and Bibby, J. M. (1979). "Multivariate Analysis", Academic Press. -* Saetrom, J. and Omre, H. (2010). "Ensemble Kalman filtering with shrinkage regression techniques", Computational Geosciences (online first). - - -Analysis module ---------------- -.. _analysis_module: - -The final EnKF linear algebra is performed in an analysis module. The keywords to load, select and modify the analysis modules are documented here. - -.. _analysis_load: -.. topic:: ANALYSIS_LOAD - - The ANALYSIS_LOAD key is the main key to load an analysis module: - - :: - - ANALYSIS_LOAD ANAME analysis.so - - The first argument ANAME is just an arbitrary unique name which you want to use to refer to the module later. The second argument is the name of the shared library file implementing the module, this can either be an absolute path as /path/to/my/module/ana.so or a relative file name as analysis.so. The module is loaded with dlopen() and the normal shared library search semantics applies. - - -.. _analysis_select: -.. topic:: ANALYSIS_SELECT - - This command is used to select which analysis module to actually use in the updates: - - :: - - ANALYSIS_SELECT ANAME - - Here ANAME is the name you have assigned to the module when loading it with ANALYSIS_LOAD. - - -.. _analysis_set_var: -.. topic:: ANALYSIS_SET_VAR - - The analysis modules can have internal state, like e.g. truncation cutoff values, these values can be manipulated from the config file using the ANALYSIS_SET_VAR keyword: - - :: - - ANALYSIS_SET_VAR ANAME ENKF_TRUNCATION 0.97 - - To use this you must know which variables the module supports setting this way. If you try to set an unknown variable you will get an error message on stderr. - - -.. _analysis_copy: -.. topic:: ANALYSIS_COPY - - With the ANALYSIS_COPY keyword you can create a new instance of a module. This can be convenient if you want to run the same algorithm with the different settings: - - :: - - ANALYSIS_LOAD A1 analysis.so - ANALYISIS_COPY A1 A2 - - We load a module analysis.so and assign the name A1; then we copy A1 -> A2. The module A1 and A2 are now 100% identical. We then set the truncation to two different values: - - :: - - ANALYSIS_SET_VAR A1 ENKF_TRUNCATION 0.95 - ANALYSIS_SET_VAR A2 ENKF_TRUNCATION 0.98 - -**Developing analysis modules** - -In the analysis module the update equations are formulated based on familiar matrix expressions, and no knowledge of the innards of the ERT program are required. Some more details of how modules work can be found here modules.txt. In principle a module is 'just' a shared library following some conventions, and if you are sufficiently savy with gcc you can build them manually, but along with the ert installation you should have utility script ert_module which can be used to build a module; just write ert_module without any arguments to get a brief usage description. - -Advanced optional keywords --------------------------- -.. _advanced_optional_keywords: - -The keywords in this section, controls advanced features of the enkf application. Insight in the internals of the enkf application and/or ECLIPSE may be required to fully understand their effect. Moreover, many of these keywords are defined in the site configuration, and thus optional to set for the user, but required when installing the enkf application at a new site. - - -.. _add_fixed_length_schedule_kw: -.. topic:: ADD_FIXED_LENGTH_SCHEDULE_KW - - Real low level fix for some SCHEDULE parsing problems. - - -.. _add_static_kw: -.. topic:: ADD_STATIC_KW - - The restart files from ECLIPSE are organized by keywords, which are of three different types: - - #. Keywords containing the dynamic solution, e.g. pressure and saturations. - #. Keywords containing various types of header information which is needed for a restart. - #. Keywords containing various types of diagnostic information which is not needed for a restart. - - Keywords in category 2 and 3 are referred to as static keywords. To be able to restart ECLIPSE, the enkf application has to store the keywords in category 2, whereas keywords in category 3 can safely be dropped. To determine whether a particular keyword is in category 2 or 3 the enkf considers an internal list of keywords. The current list contains the keywords: - - :: - - INTEHEAD LOGIHEAD DOUBHEAD IGRP SGRP XGRP ZGRP IWEL SWEL XWEL ZWEL - ICON SCON XCON HIDDEN STARTSOL PRESSURE SWAT SGAS RS RV ENDSOL ICAQNUM ICAQ IAAQ - SCAQNUM SCAQ SAAQ ACAQNUM ACAQ XAAQ - ISEG ILBS ILBR RSEG ISTHW ISTHG - - By using ADD_STATIC_KW you can dynamically add to this list. The magic string __ALL__ will add all static keywords. Use of the __ALL__ option is strongly discouraged, as it wastes a lot disk space. - - -.. _define: -.. topic:: DEFINE - - With the DEFINE keyword you can define key-value pairs which will be substituted in the rest of the configuration file. The DEFINE keyword expects two arguments: A key and a value to replace for that key. Later instances of the key enclosed in '<' and '>' will be substituted with the value. The value can consist of several strings, in that case they will be joined by one single space. - - *Example:* - - :: - - -- Define ECLIPSE_PATH and ECLIPSE_BASE - DEFINE ECLIPSE_PATH /path/to/eclipse/run - DEFINE ECLIPSE_BASE STATF02 - DEFINE KEY VALUE1 VALUE2 VALUE3 VALUE4 - - -- Set the GRID in terms of the ECLIPSE_PATH - -- and ECLIPSE_BASE keys. - GRID /.EGRID - - Observe that when you refer to the keys later in the config file they must be enclosed in '<' and '>'. Furthermore, a key-value pair must be defined in the config file before it can be used. The final key define above KEY, will be replaced with VALUE1 VALUE2 VALUE3 VALUE4 - i.e. the extra spaces will be discarded. - - -.. _time_map: -.. topic:: TIME_MAP - - Normally the mapping between report steps and true dates is - inferred by ERT indirectly by loading the ECLIPSE summary - files. In cases where you do not have any ECLIPSE summary - files you can use the TIME_MAP keyword to specify a file with - dates which are used to establish this mapping: - - *Example:* - - :: - - -- Load a list of dates from external file: "time_map.txt" - TIME_MAP time_map.txt - - The format of the TIME_MAP file should just be a list of dates - formatted as dd/mm/yyyy. The example file below has four dates: - - :: - - 01/01/2000 - 01/07/2000 - 01/01/2001 - 01/07/2001 - - - -.. _schedule_prediction_file: -.. topic:: SCHEDULE_PREDICTION_FILE - - This is the name of a schedule prediction file. It can contain %d to get different files for different members. Observe that the ECLIPSE datafile should include only one schedule file, even if you are doing predictions. - - -Keywords related to running the forward model ---------------------------------------------- -.. _keywords_related_to_running_the_forward_model: - - - -.. _forward_model: -.. topic:: FORWARD_MODEL - - The FORWARD_MODEL keyword is used to define how the simulations are executed. E.g., which version of ECLIPSE to use, which rel.perm script to run, which rock physics model to use etc. Jobs (i.e. programs and scripts) that are to be used in the FORWARD_MODEL keyword must be defined using the INSTALL_JOB keyword. A set of default jobs are available, and by default FORWARD_MODEL takes the value ECLIPSE100. - - The FORWARD_MODEL keyword expects a series of keywords, each defined with INSTALL_JOB. The enkf will execute the jobs in sequentially in the order they are entered. Note that the ENKF_SCHED_FILE keyword can be used to change the FORWARD_MODEL for sub-sequences of the run. - - *Example A:* - - :: - - -- Suppose that "MY_RELPERM_SCRIPT" has been defined with - -- the INSTALL_JOB keyword. This FORWARD_MODEL will execute - -- "MY_RELPERM_SCRIPT" before ECLIPSE100. - FORWARD_MODEL MY_RELPERM_SCRIPT ECLIPSE100 - - *Example B:* - - :: - - -- Suppose that "MY_RELPERM_SCRIPT" and "MY_ROCK_PHYSICS_MODEL" - -- has been defined with the INSTALL_JOB keyword. - -- This FORWARD_MODEL will execute "MY_RELPERM_SCRIPT", then - -- "ECLIPSE100" and in the end "MY_ROCK_PHYSICS_MODEL". - FORWARD_MODEL MY_RELPERM_SCRIPT ECLIPSE100 MY_ROCK_PHYSICS_MODEL - - For advanced jobs you can pass string arguments to the job using a KEY=VALUE based approach, this is further described in: passing arguments. In available jobs in enkf you can see a list of the jobs which are available. - - -.. _job_script: -.. topic:: JOB_SCRIPT - - Running the forward model from enkf is a multi-level process which can be summarized as follows: - - #. A Python module called jobs.py is written and stored in the directory where the forward simulation is run. The jobs.py module contains a list of job-elements, where each element is a Python representation of the code entered when installing the job. - #. The enkf application submits a Python script to the enkf queue system, this script then loads the jobs.py module to find out which programs to run, and how to run them. - #. The job_script starts and monitors the individual jobs in the jobs.py module. - - The JOB_SCRIPT variable should point at the Python script which is managing the forward model. This should normally be set in the site wide configuration file. - - -.. _queue_system: -.. topic:: QUEUE_SYSTEM - - The keyword QUEUE_SYSTEM can be used to control where the - simulation jobs are executed. It can take the values LSF, - TORQUE, RSH and LOCAL. - - The LSF option will submit jobs to the LSF cluster at your - location, and is recommended whenever LSF is available. - - The TORQUE option will submit jobs to the TORQUE a torque - based system, using the commands qsub, qstat etc., if - available. - - If you do not have access to LSF or TORQUE you can submit to - your local workstation using the LOCAL option and to homemade - cluster of workstations using the RSH option. All of the queue - systems can be further configured, see separate sections. - - *Example:* - - :: - - -- Tell ert to use the LSF cluster. - QUEUE_SYSTEM LSF - - The QUEUE_SYSTEM keyword is optional, and usually defaults to - LSF (this is site dependent). - -Configuring LSF access ----------------------- -.. _configuring_lsf_access: - -The LSF system is the most useful of the queue alternatives, and also -the alternative with most options. The most important options are -related to how ert should submit jobs to the LSF system. Essentially -there are two methods ert can use when submitting jobs to the LSF -system: - -#. For workstations which have direct access to LSF ert can submit - directly with no further configuration. This is preferred solution, - but unfortunately not very common. -#. Alternatively ert can issue shell commands to bsub/bjobs/bkill to - submit jobs. These shell commands can be issued on the current - workstation, or alternatively on a remote workstation using ssh. - -The main switch between alternatives 1 and 2 above is the LSF_SERVER -option. - -.. _lsf_server: -.. topic:: LSF_SERVER - - By using the LSF_SERVER option you essentially tell ert two - things about how jobs should be submitted to LSF: - - #. You tell ert that jobs should be submitted using shell - commands. - #. You tell ert which server should be used when submitting - - So when your configuration file has the setting: - - :: - - LSF_SERVER be-grid01 - - ert will use ssh to submit your jobs using shell commands on - the server be-grid01. For this to work you must have - passwordless ssh to the server be-grid01. If you give the - special server name LOCAL ert will submit using shell commands - on the current workstation. - - **bsub/bjobs/bkill options** - - By default ert will use the shell commands bsub,bjobs and - bkill to interact with the queue system, i.e. whatever - binaries are first in your PATH will be used. For fine grained - control of the shell based submission you can tell ert which - programs to use: - - :: - - QUEUE_OPTION LSF BJOBS_CMD /path/to/my/bjobs - QUEUE_OPTION LSF BSUB_CMD /path/to/my/bsub - - *Example 1* - - :: - - LSF_SERVER be-grid01 - QUEUE_OPTION LSF BJOBS_CMD /path/to/my/bjobs - QUEUE_OPTION LSF BSUB_CMD /path/to/my/bsub - - In this example we tell ert to submit jobs from the - workstation be-grid01 using custom binaries for bsub and - bjobs. - - *Example 2* - - :: - - LSF_SERVER LOCAL - - In this example we will submit on the current workstation, - without using ssh first, and we will use the default bsub and - bjobs executables. The remaining LSF options apply - irrespective of which method has been used to submit the jobs. - - -.. _lsf_queue: -.. topic:: LSF_QUEUE - - The name of the LSF queue you are running ECLIPSE simulations in. - - -.. _max_running_lsf: -.. topic:: MAX_RUNNING_LSF - - The keyword MAX_RUNNING_LSF controls the maximum number of - simultaneous jobs submitted to the LSF (Load Sharing Facility) - queue when using the LSF option in QUEUE_SYSTEM. - - *Example:* - - :: - - -- Submit no more than 30 simultaneous jobs - -- to the LSF cluster. - MAX_RUNNING_LSF 30 - - - - -Configuring TORQUE access -------------------------- -.. _configuring_torque_access: - -The TORQUE system is the only available system on some clusters. The -most important options are related to how ert should submit jobs to -the TORQUE system. - -* Currently, the TORQUE option only works when the machine you are - logged into have direct access to the queue system. ert then submit - directly with no further configuration. - -The most basic invocation is in other words: - -:: - - QUEUE_SYSTEM TORQUE - -**qsub/qstat/qdel options** - -By default ert will use the shell commands qsub,qstat and qdel to -interact with the queue system, i.e. whatever binaries are first in -your PATH will be used. For fine grained control of the shell based -submission you can tell ert which programs to use: - -:: - - QUEUE_SYSTEM TORQUE - QUEUE_OPTION TORQUE QSUB_CMD /path/to/my/qsub - QUEUE_OPTION TORQUE QSTAT_CMD /path/to/my/qstat - QUEUE_OPTION TORQUE QDEL_CMD /path/to/my/qdel - -In this example we tell ert to submit jobs using custom binaries for -bsub and bjobs. - -**Name of queue** - -The name of the TORQUE queue you are running ECLIPSE simulations in. - -:: - - QUEUE_OPTION TORQUE QUEUE name_of_queue - -**Name of cluster (label)** - -The name of the TORQUE cluster you are running ECLIPSE simulations -in. This might be a label (serveral clusters), or a single one, as in -this example baloo. - -:: - - QUEUE_OPTION TORQUE CLUSTER_LABEL baloo - -**Max running jobs** - -The queue option MAX_RUNNING controls the maximum number of -simultaneous jobs submitted to the queue when using (in this case) the -TORQUE option in QUEUE_SYSTEM. - -:: - - QUEUE_SYSTEM TORQUE - -- Submit no more than 30 simultaneous jobs - -- to the TORQUE cluster. - QUEUE_OPTION TORQUE MAX_RUNNING 30 - -**Queue options controlling number of nodes and CPUs** - -When using TORQUE, you must specify how many nodes a single job is -should to use, and how many CPUs per node. The default setup in ert -will use one node and one CPU. These options are called NUM_NODES and -NUM_CPUS_PER_NODE. - -If the numbers specified is higher than supported by the cluster -(i.e. use 32 CPUs, but no node has more than 16), the job will not -start. - -If you wish to increase these number, the program running (typically -ECLIPSE) will usually also have to be told to correspondingly use more -processing units (keyword PARALLEL) - -:: - - QUEUE_SYSTEM TORQUE - -- Use more nodes and CPUs - -- in the TORQUE cluster per job submitted - -- This should (in theory) allow for 24 processing - -- units to be used by eg. ECLIPSE - QUEUE_OPTION TORQUE NUM_NODES 3 - QUEUE_OPTION TORQUE NUM_CPUS_PER_NODE 8 - -**Keep output from qsub** - -Sometimes the error messages from qsub can be useful, if something is -seriously wrong with the environment or setup. To keep this output -(stored in your home folder), use this: - -:: - - QUEUE_OPTION TORQUE KEEP_QSUB_OUTPUT 1 - - -** Slow submit to torque ** - -To be more gentle with the torqueue system you can instruct the driver -to sleep for every submit request. The argument to the SUBMIT_SLEEP is -the number of seconds to sleep for every submit, can be a fraction -like 0.5. - -:: - - QUEUE_OPTION TORQUE SUBMIT_SLEEP 0.25 - - -** Torque debug log ** - -You can ask the torqueu driver to store a debug log of the jobs -submitted, and the resulting job id. This is done with the queue -option DEBUG_OUTPUT: - -:: - - QUEUE_OPTION TORQUE DEBUG_OUTPUT torque_log.txt - - - -Configuring the LOCAL queue ---------------------------- -.. _configuring_the_local_queue: - - -.. _max_running_local: -.. topic:: MAX_RUNNING_LOCAL - - The keyword MAX_RUNNING_LOCAL controls the maximum number of simultaneous jobs running when using the LOCAL option in QUEUE_SYSTEM. It is strongly recommended to not let MAX_RUNNING_LOCAL exceed the number of processors on the workstation used. - - *Example:* - - :: - - -- No more than 3 simultaneous jobs - MAX_RUNNING_LOCAL 3 - - -Configuring the RSH queue -------------------------- -.. _configuring_the_rsh_queue: - -.. _rsh_host: -.. topic:: RSH_HOST - - You can run the forward model in enkf on workstations using remote-shell commands. To use the RSH queue system you must first set a list of computers which enkf can use for running jobs: - - :: - - RSH_HOST computer1:2 computer2:2 large_computer:8 - - Here you tell enkf that you can run on three different computers: computer1, computer2 and large_computer. The two first computers can accept two jobs from enkf, and the last can take eight jobs. Observe the following when using RSH: - - You must have passwordless login to the computers listed in RSH_HOST otherwise it will fail hard. enkf will not consider total load on the various computers; if have said it can take two jobs, it will get two jobs, irrespective of the existing load. - -.. _rsh_command: -.. topic:: RSH_COMMAND - - This is the name of the executable used to invoke remote shell operations. Will typically be either rsh or ssh. The command given to RSH_COMMAND must either be in PATH or an absolute path. - - :: - - MAX_RUNNING_RSH - - The keyword MAX_RUNNING_RSH controls the maximum number of simultaneous jobs running when using the RSH option in QUEUE_SYSTEM. It MAX_RUNNING_RSH exceeds the total capacity defined in RSH_HOST, it will automatically be truncated to that capacity. - - *Example:* - - :: - - -- No more than 10 simultaneous jobs - -- running via RSH. - MAX_RUNNING_RSH 10 - - - -Keywords related to plotting ----------------------------- -.. _keywords_related_to_plotting: - - -.. _image_viewer: -.. topic:: IMAGE_VIEWER - - The enkf application has some limited plotting capabilities. The plotting is based on creating a graphics file (currently a png file) and then viewing that file with an external application. The current default image viewer is a program called /usr/bin/display, but you can set IMAGE_VIEWER to point to another binary if that is desired. In particular it can be interesting to set as - - :: - - IMAGE_VIEWER /d/proj/bg/enkf/bin/noplot.sh - - then the plot files will be created, but they will not be flashing in your face (which can be a bit annoying). - - -.. _image_type: -.. topic:: IMAGE_TYPE - - This switch control the type of the plot figures/images created by the PLPLOT plot driver. It is by default set to png which works fine, but you can probably(??) use other popular graphics formats like gif and jpg as well. - - -.. _plot_driver: -.. topic:: PLOT_DRIVER - - This is the name of the sub system used for creating plots. The default system is called 'PLPLOT' - all the other options regarding plotting are sub options which are only relevant when you are using PLPLOT. In addition to PLPLOT you can chose the value 'TEXT'; this will actually not produce any plots, just textfiles which can be used for plotting with your favorite plotting program. This is particularly relevant if you have some special requirements to the plots. - - -.. _plot_errorbar: -.. topic:: PLOT_ERRORBAR - - Should errorbars on the observations be plotted? - - -.. _plot_errorbar_max: -.. topic:: PLOT_ERRORBAR_MAX - - When plotting summary vectors for which observations have been 'installed' with the OBS_CONFIG keyword, ert will plot the observed values. If you have less than PLOT_ERRORBAR_MAX observations ert will use errorbars to show the observed values, otherwise it will use two dashed lines indicating +/- one standard deviation. This option is only meaningful when PLOT_PLOT_ERRORBAR is activated. - - To ensure that you always get errorbars you can set PLOT_ERRORBAR_MAX to a very large value, on the other hand setting PLOT_ERRORBAR_MAX to 0 will ensure that ert always plots observation uncertainty using dashed lines of +/- one standard deviation. - - The setting here will also affect the output when you are using the TEXT driver to plot. - - -.. _plot_height: -.. topic:: PLOT_HEIGHT - - When the PLPLOT driver creates a plot file, it will have the height (in pixels) given by the PLOT_HEIGHT keyword. The default value for PLOT_HEIGHT is 768 pixels. - - -.. _plot_refcase: -.. topic:: PLOT_REFCASE - - Boolean variable which is TRUE if you want to add the refcases to the plots. - - *Example:* - - :: - - PLOT_REFCASE TRUE - - - -.. refcase_list: -.. topic:: REFCASE_LIST - - Provide one or more Eclipse .DATA files for a refcase to be added in the plots. This refcase will be plotted in different colours. The summary files related to the refcase should be in the same folder as the refcase. - - *Example:* - - :: - - REFCASE_LIST /path/to/refcase1/file1.DATA /path/to/refcase2/file2.DATA - - - -.. _plot_path: -.. topic:: PLOT_PATH - - The plotting engine creates 'files' with plots, they are stored in a directory. You can tell what that directory should be. Observe that the current 'casename' will automatically be appended to the plot path. - - -.. plot_width: -.. topic:: PLOT_WIDTH - - When the PLPLOT driver creates a plot file, it will have the width (in pixels) given by the PLOT_WIDTH keyword. The default value for PLOT_WIDTH is 1024 pixels. To create plots of half the size you use: - - :: - - PLOT_HEIGHT 384 - PLOT_WIDTH 512 - - - -.. _rft_config: -.. topic:: RFT_CONFIG - - RFT_CONFIGS argument is a file with the name of the rfts followed by date (day month year) Ex. - - :: - - RFT_CONFIG ../models/wells/rft/WELLNAME_AND_RFT_TIME.txt - - Where the contents of the file is something like - - :: - - be-linapp16(inmyr) -/models/wells/rft 34> more WELLNAME_AND_RFT_TIME.txt - A-1HP 06 05 1993 - A-9HW 31 07 1993 - C-1HP 11 12 2007 - C-5HP 21 12 1999 - C-6HR 09 11 1999 - D-4HP 10 07 2003 - K-3HW 09 02 2003 - K-6HW 08 11 2002 - K-7HW 21 04 2005 - D-6HP 22 04 2006 - - - -.. _rftpath: -.. topic:: RFTPATH - - - RFTPATHs argument is the path to where the rft-files are located - - :: - - RFTPATH ../models/wells/rft/ - - - - -.. _hook_workflow: -.. topic:: HOOK_WORKFLOW - -With the keyword :code:`HOOK_WORKFLOW` you can configure workflow -'hooks'; meaning workflows which will be run automatically at certain -points during ERTs execution. Currently there are two points in ERTs -flow of execution where you can hook in a workflow, either just before -the simulations start, :code:`PRE_SIMULATION` - or after all the -simulations have completed :code:`POST_SIMULATION`. The -:code:`POST_SIMULATION` hook is typically used to trigger QC -workflows: - -:: - - HOOK_WORKFLOW initWFLOW PRE_SIMULATION - HOOK_WORKFLOW QC_WFLOW1 POST_SIMULATION - HOOK_WORKFLOW QC_WFLOW2 POST_SIMULATION - -In this example the the workflow :code:`initWFLOW` will run after all -the simulation directiories have been created, just before the forward -model is submitted to the queue. When all the simulations are complete -the two workflows :code:`QC_WFLOW1` and :code:`QC_WFLOW2` will be -run. Observe that the workflows being 'hooked in' with the -:code:`HOOK_WORKFLOW` must be loaded with the :code:`LOAD_WORKFLOW` -keyword. - - -Manipulating the Unix environment ---------------------------------- -.. _manipulating_the_unix_environment: - -The two keywords SETENV and UPDATE_PATH can be used to manipulate the Unix environment of the ERT process, tha manipulations only apply to the running ERT instance, and are not applied to the shell. - - -.. _setenv: -.. topic:: SETENV - - You can use the SETENV keyword to alter the unix environment enkf is running in. This is probably most relevant for setting up the environment for the external jobs invoked by enkf. - - *Example:* - - :: - - -- Setting up LSF - SETENV LSF_BINDIR /prog/LSF/7.0/linux2.6-glibc2.3-x86_64/bin - SETENV LSF_LIBDIR /prog/LSF/7.0/linux2.6-glibc2.3-x86_64/lib - SETENV LSF_UIDDIR /prog/LSF/7.0/linux2.6-glibc2.3-x86_64/lib/uid - SETENV LSF_SERVERDIR /prog/LSF/7.0/linux2.6-glibc2.3-x86_64/etc - SETENV LSF_ENVDIR /prog/LSF/conf - - Observe that the SETENV command is not as powerful as the corresponding shell utility. In particular you can not use $VAR to refer to the existing value of an environment variable. To add elements to the PATH variable it is easier to use the UPDATE_PATH keyword. - - -.. _update_path: -.. topic:: UPDATE_PATH - - The UPDATE_PATH keyword will prepend a new element to an existing PATH variable. I.e. the config - - :: - - UPDATE_PATH PATH /some/funky/path/bin - - will be equivalent to the shell command: - - :: - - setenv PATH /some/funky/path/bin:$PATH - - The whole thing is just a workaround because we can not use $PATH. - -.. _umask: -.. topic:: UMASK - - The `umask` is a concept used by Linux to controll the - permissions on newly created files. By default the files - created by ert will have the default permissions of your - account, but by using the keyword `UMASK` you can alter the - permissions of files created by ert. - - To determine the initial permissions on newly created files - start with the initial permissions `-rw-rw-rw-` (octal 0666) - for files and `-rwxrwxrwx` (octal 0777) for directories, and - then *~subtract* the current umask setting. So if you wish the - newly created files to have permissions `-rw-r-----` you need - to subtract write permissions for group and read and write - permissions for others - corresponding to `umask - 0026`. - - :: - - UMASK 0022 - - We remove write permissions from group and others, implying - that everyone can read the files and directories created by - ert, but only the owner can write to them. Also everyone can - execute the directories (i.e. list the content). - - :: - - UMASK 0 - - No permissions are removed, i.e. everyone can do everything - with the files and directories created by ert. - - The umask setting in ert is passed on to the forward model, - and should apply to the files/directories created by the - forward model also. However - the executables in the forward - model can in principle set it's own umask setting or alter - permissions in another way - so there is no guarantee that the - umask setting will apply to all files created by the forward - model. - - The octal permissions are based on three octal numbers for - owner, group and others, where each value is based on adding - the constants: - - 1: Execute permission - 2: Write permission - 4: Read permission - - So an octal permission of 0754 means: - - - Owner(7) can execute(1), write(2) and read(4). - - Group(5) can execute(1) and read(4). - - Others(2) can read(4) - - - diff --git a/ThirdParty/Ert/docs/user/localization/index.rst b/ThirdParty/Ert/docs/user/localization/index.rst deleted file mode 100644 index 47ad720563..0000000000 --- a/ThirdParty/Ert/docs/user/localization/index.rst +++ /dev/null @@ -1,602 +0,0 @@ - -Keywords for the local configuration file -========================================= - - - -General overview ----------------- - -To create a configuration for localization you must "program" your own -local config commands by writing a Python script, and invoking it from a workflow. - - -**Local config python script example:** - -:: - - from ert.enkf import ErtScript - from ert.enkf import LocalConfig, LocalObsdata, LocalObsdataNode, LocalMinistep, LocalUpdateStep, LocalDataset, ActiveList - from ert.ecl import EclGrid, EclRegion, Ecl3DKW, EclFile, EclInitFile, EclKW, EclTypeEnum - - class LocalConfigJob(ErtScript): - - - def run(self): - - # This example can be used with the REEK data set from the ERT tutorial - - # Get the ert object - ert = self.ert() - - # Get local config object - local_config = ert.getLocalConfig() - - # Reset internal local config structure. From now you need to specify what to localize - local_config.clear() - - # There is only one update step - updatestep = local_config.getUpdatestep() - - # A ministep - ministep = local_config.createMinistep("MINISTEP" ) - - # Add some dataset you want to localize here. - dataset_multflt = local_config.createDataset("DATASET_MULTFLT") - - # Add some field and localize inside a box - data_poro = local_config.createDataset("DATA_PORO") - ecl_grid = local_config.getGrid() - ecl_region = EclRegion(ecl_grid, False) - ecl_region.select_box((0,0,0),(3,3,3)) - data_poro.addField("PORO", ecl_region) - - - # Add some index from MULTFLT to the dataset - dataset_multflt.addNode("MULTFLT") - active_list = dataset_multflt.getActiveList("MULTFLT") - active_list.addActiveIndex(0) - - # Add existing observations from WOPR:OP_1. Alternatively, use getObservations and filter the observations you want to use for this ministep. - obsdata_wopr = local_config.createObsdata("WOPR:OP_1_10") - for i in range(1,10): - obsdata_wopr.addNode("OBS"+str(i)) - - # Attach the created dataset and obsset to the ministep - ministep.attachDataset(dataset_multflt) - ministep.attachObsset(obsdata_wopr) - - # Then attach the ministep to the update step - updatestep.attachMinistep(ministep) - - # Write a .csv file for debugging. The generated file can be imported into Excel for better tabulation of the setup - local_config.writeSummaryFile("tmp/summary_local_config.csv") - -=========================================================================================== ============================================================================================================================================== -ERT script function Purpose -=========================================================================================== ============================================================================================================================================== -:ref:`getObservations ` Get the observations currently imported, use to filter the observations to localize -:ref:`getGrid ` Get the underlying grid use to define active cells in a field -:ref:`getUpdatestep ` Creates and gets default updatestep -:ref:`createMinistep ` Creates ministep -:ref:`createDataset ` Creates dataset -:ref:`copyDataset ` Deep copy of dataset -:ref:`createObsdata ` Creates observation set -:ref:`copyObsdata ` Deep copy of observation set -:ref:`attachMinistep ` Attaches ministep to update step -:ref:`attachDataset ` Attaches dataset to mini step -:ref:`attachObsset ` Attaches observation set to mini step -:ref:`addNode ` Adds data node to dataset -:ref:`del (data) ` Deletes observation node from dataset -:ref:`addNode, addNodeAndRange ` Adds observation node to observation set for all times or in a given time range -:ref:`del (obs) ` Deletes observation node from observation set -:ref:`clear ` Delete all the data keys from a dataset -:ref:`addActiveIndex (data) ` Adds several data indices to the list of active indices -:ref:`addActiveIndex (obs) ` Adds several observation indices to the list of active indices -:ref:`addField ` Adds field node to dataset -:ref:`EclGrid, EclInitFile ` Loads eclipse file in restart format -:ref:`EclRegion ` Creates a new region for use when defining active regions for fields -:ref:`select_active ` Selects or deselects cells in a region -:ref:`select_equal ` Selects or deselects cells in a region equal to given value -:ref:`select_less ` Selects or deselects cells in a region equal less than a given value -:ref:`select_more ` Selects or deselects cells in a region equal greater than a given value -:ref:`select_box ` Selects or deselects cells in a box -:ref:`select_islice, _jslice,_kslice ` Selects or deselects cells in a slice -:ref:`select_below_plane ` Selects or deselects cells in a half space defined by a plane -:ref:`select_inside_polygon ` Selects or deselects cells in region inside polygon -:ref:`Example create polygon ` Creates a geo-polygon based on coordinate list -:ref:`Example load polygon ` Loads polygon in Irap RMS format from file - -=========================================================================================== ============================================================================================================================================== - - -.. ########################################################################################################### - -.. _create_updatestep: -.. topic:: getUpdatestep - - | This function will create the default updatestep. - | Observe that you must get, otherwise it will not be able to do anything. - - *Example:* - - :: - - updatestep = local_config.getUpdatestep() - -.. ########################################################################################################### - -.. _all_obs: -.. topic:: getObservations - - | This function will retrieve ERT's observations - - *Example:* - - :: - - all_obs = local_config.getObservations() - -.. ########################################################################################################### - -.. _ert_grid: -.. topic:: getGrid - - | This function will retrieve ERT's grid - - *Example:* - - :: - - grid = local_config.getGrid() - -.. ########################################################################################################### - - -.. _create_ministep: -.. topic:: createMinistep - - | This function will create a new ministep with a given name and an optional analysis module. The default analysis module for this ministep is ERT's current analysis module. - | A given observation set can be attached to a given ministep with attachObsset.The ministep is then ready for adding data. Before the ministep can be used you must attach it to an updatestep with the attachMinistep command - - *Example:* - - :: - - ministep = local_config.createMinistep("MINISTEP") - - *Example:* - - :: - - analysis_config = ert.analysisConfig() - std_enkf_analysis_module = analysis_config.getModule("STD_ENKF") - ministep_using_std_enkf = local_config.createMinistep("MINISTEP", std_enkf_analysis_module) - - -.. ########################################################################################################### - -.. _create_dataset: -.. topic:: createDataset - - | This function will create a new dataset with a given name, i.e. a collection of enkf_nodes which should be updated together. Before you can actually use a dataset you must attach it to a ministep with the attachDataset command. - - - *Example:* - - :: - - dataset_multflt = local_config.createDataset("DATASET_MULTFLT") - -.. ########################################################################################################### - -.. _copy_dataset: -.. topic:: copyDataset - - | Will create a new local_obsset instance which is a copy of the - source dataset; this is a deep copy where also the lowest level active_list instances are copied, and can then subsequently be updated independently of each other. - - - *Example:* - - :: - - dataset_multflt_copy = local_config.copyDataset("DATASET_MULTFLT","DATASET_MULTFLT_COPY") - -.. ########################################################################################################### - -.. _create_obsset: -.. topic:: createObsdata - - | This function will create an observation set, i.e. a collection of observation keys which will be used as the observations in one ministep. Before the obsset can be used it must be attached to a ministep with the attachDataset command. - - - *Example:* - - :: - - obsset_obs_well = local_config.createObsdata("OBS_WELL") - - -.. ########################################################################################################### - -.. _copy_obsset: -.. topic:: copyObsdata - - | Will create a new local_obsset instance which is a copy of the - source dataset; this is a deep copy where also the lowest level active_list instances are copied, and can then subsequently be updated independently of each other. - - - *Example:* - - :: - - obsset_obs_well_copy = local_config.copyObsdata("OBS_WELL", "OBS_WELL_COPY") - -.. ########################################################################################################### - -.. _attach_ministep: -.. topic:: attachMinistep - - | This function will attach the ministep to the default updatestep. - - *Example:* - - :: - - update_step.attachMinistep(ministep) - - -.. ########################################################################################################### - -.. _attach_dataset: -.. topic:: attachDataset - - | Will attach the given dataset to the ministep. - - - *Example:* - - :: - - ministep.attachDataset(dataset_multflt) - - -.. ########################################################################################################### - -.. _attach_obsset: -.. topic:: attachObsset - - | Will attach the given obsset to the ministep. - - *Example:* - - :: - - ministep.attachObsset(obsset_obs_well) - - -.. ########################################################################################################### - -.. _add_data: -.. topic:: addNode - - | This function will add the data KEY as one enkf node which should be updated in this dataset. If you do not manipulate the KEY further with addActiveIndex, the KEY will be added as 'ALL_ACTIVE', i.e. all elements will be updated. - - - *Example:* - - :: - - dataset_multflt.addNode("MULTFLT") - -.. ########################################################################################################### - -.. _del_data: -.. topic:: del (data) - - | This function will delete the data 'KEY' from the dataset. - - - *Example:* - - :: - - del dataset_multflt["MULTFLT"] - - -.. ########################################################################################################### - -.. _add_obs: -.. topic:: addNode - - | This function will install the observation 'OBS_KEY' as an observation for this obsset - similarly to the addNode function. - - *Example:* - - :: - - -- The obsset has a time range - obsset_obs_well.addNodeAndRange("WOPR:OBS_WELL", 0, 1) - - -- All times are active - obsset_obs_well.addNode("WOPR:OBS_WELL") - - -.. ########################################################################################################### - -.. _del_obs: -.. topic:: del (obs) - - | This function will delete the obs 'OBS_KEY' from the obsset 'NAME_OF_OBSSET'. - - - *Example:* - - :: - - del obsset_obs_well["WOPR:OBS_WELL"] - - -.. ########################################################################################################### - -.. _dataset_del_all_data: -.. topic:: clear - - | This function will delete all the data keys from the dataset. - - *Example:* - - :: - - dataset_multflt.clear() - -.. ########################################################################################################### - -.. _active_list_add_data_index: -.. topic:: addActiveIndex (data) - - | This function will say that the data with name 'DATA_KEY' in dataset with name 'DATASTEP_NAME' should have the index 'INDEX' active. - - - *Example:* - - :: - - active_list = dataset_multflt.getActiveList("MULTFLT") - active_list.addActiveIndex(0); - -.. ########################################################################################################### - -.. _active_list_add_obs_index: -.. topic:: addActiveIndex (obs) - - | This function will say that the observation with name 'OBS_KEY' in obsset with name 'OBSSET_NAME' should have the index 'INDEX' active. - - *Example:* - - :: - - active_list = obsset_obs_well.getActiveList("WOPR:OBS_WELL") - active_list.addActiveIndex(0); - - -.. ########################################################################################################### - -.. _add_field: -.. topic:: addField - - | This function will install the node with name 'FIELD_NAME' in the dataset 'DATASET_NAME'. It will in addition select all the (currently) active cells in the region 'ECLREGION_NAME' as active for this field/ministep combination. The ADD_FIELD command is actually a shortcut of: ADD_DATA DATASET FIELD_NAME; followed by: ACTIVE_LIST_ADD_MANY_DATA_INDEX - - *Example:* - - :: - - # Load Eclipse grid - ecl_grid = EclGrid("path/to/LOCAL.GRDECL") - - with open("path/to/LOCAL.GRDECL","r") as fileH: - local_kw = Ecl3DKW.read_grdecl(ecl_grid, fileH, "LOCAL") - - # Define Eclipse region - eclreg_poro = EclRegion(ecl_grid, False) - eclreg_poro.select_more(local_kw, 1) - - # Create dataset and add field to dataset - data_poro = local_config.createDataset("DATA_PORO") - data_poro.addField("PORO", eclreg_poro) - - -.. ########################################################################################################### - -.. _load_file: -.. topic:: EclGrid, EclInitFile - - | This function will load an ECLIPSE file in restart format (i.e. restart file or INIT file), the keywords in this file can then subsequently be used in ECLREGION_SELECT_VALUE_XXX commands below. The 'KEY' argument is a string which will be used later when we refer to the content of this file. - - *Example:* - - :: - - # Load Eclipse grid and init file - ecl_grid = EclGrid("path/to/FULLMODEL.GRDECL") - refinit_file = EclInitFile(grid , "path/to/somefile.init") - -.. ########################################################################################################### - -.. _create_eclregion: -.. topic:: EclRegion - - | This function will create a new region 'ECLREGION_NAME', which can subsequently be used when defining active regions for fields. The second argument, SELECT_ALL, is a boolean value. If this value is set to true the region will start with all cells selected, if set to false the region will start with no cells selected. - - *Example:* - - :: - - # Define Eclipse region - eclreg_poro = EclRegion(ecl_grid, False) - -.. ########################################################################################################### - -.. _eclregion_select_all: -.. topic:: select_active - - | Will select all the cells in the region (or deselect if SELECT == FALSE). - - - *Example:* - - :: - - eclreg_poro.select_active() - - -.. ########################################################################################################### - -.. _eclregion_select_value_equal: -.. topic:: select_equal - - | This function will compare an ecl_kw instance loaded from file with a user supplied value, and select (or deselect) all cells which match this value. It is assumed that the ECLIPSE keyword is an INTEGER keyword, for float comparisons use the ECLREGION_SELECT_VALUE_LESS and ECLREGION_SELECT_VALUE_MORE functions. - - *Example:* - - :: - - # Load Eclipse grid - ecl_grid = EclGrid("path/to/LOCAL.GRDECL") - - with open("path/to/LOCAL.GRDECL","r") as fileH: - local_kw = Ecl3DKW.read_grdecl(ecl_grid, fileH, "LOCAL", ecl_type= EclTypeEnum.ECL_INT_TYPE) - - # Define Eclipse region - eclreg_poro = EclRegion(ecl_grid, False) - eclreg_poro.select_equal(local_kw, 1) - print 'GRID LOADED%s' % ecl_grid - print ecl_grid.getDims() - print local_kw.header - - - -.. ########################################################################################################### - -.. _eclregion_select_value_less: -.. topic:: select_less - - | This function will compare an ecl_kw instance loaded from disc with a numerical value, and select all cells which have numerical below the limiting value. The ecl_kw value should be a floating point value like e.g. PRESSURE or PORO. The arguments are just as for ECLREGION_SELECT_VALUE_EQUAL. - - *Example:* - - :: - - eclreg_poro.select_less(local_kw, 1) - - -.. ########################################################################################################### - -.. _eclregion_select_value_more: -.. topic:: select_more - - | This function will compare an ecl_kw instance loaded from disc with a numerical value, and select all cells which have numerical above the limiting value. The ecl_kw value should be a floating point value like e.g. PRESSURE or PORO. The arguments are just as for ECLREGION_SELECT_VALUE_EQUAL. - - - *Example:* - - :: - - eclreg_poro.select_more(local_kw, 1) - -.. ########################################################################################################### - -.. _eclregion_select_box: -.. topic:: select_box - - | This function will select (or deselect) all the cells in the box defined by the six coordinates i1 i2 j1 j2 k1 k2. The coordinates are inclusive, and the counting starts at 1. - - - *Example:* - - :: - - eclreg_poro.select_box((0,2,4),(1,3,5)) - - - -.. ########################################################################################################### - -.. _eclregion_select_slice: -.. topic:: select_islice, _jslice,_kslice - - | This function will select a slice in the direction given by 'dir', which can 'x', 'y' or 'z'. Depending on the value of 'dir' the numbers n1 and n2 are interpreted as (i1 i2), (j1 j2) or (k1 k2) respectively. The numbers n1 and n2 are inclusice and the counting starts at 1. It is OK to use very high/low values to imply "the rest of the cells" in one direction. - - - *Example:* - - :: - - eclreg_poro.select_kslice(2,3) - - -.. ########################################################################################################### - -.. _eclregion_select_plane: -.. topic:: select_below_plane - - | Will select all points which have positive (sign > 0) distance to the plane defined by normal vector n = (nx,ny,nz) and point p = (px,py,pz). If sign < 0 all cells with negative distance to plane will be selected. - - *Example:* - - :: - - eclreg_poro.select_below_plane((1,1,1),(0,0,0)) - - -.. ########################################################################################################### - -.. _eclregion_select_in_polygon: -.. topic:: select_inside_polygon - - | Well select all the points which are inside the polygon with name 'POLYGON_NAME'. The polygon should have been created with command CREATE_POLYGON or loaded with command 'LOAD_POLYGON' first. - - - - *Example:* - - :: - - polygon = [(0,0) , (0,1) , (1,0)] - eclreg_poro.select_inside_polygon(polygon) - -.. ########################################################################################################### - -.. _create_polygon: -.. topic:: Example create polygon - - | Will create a geo_polygon instance based on the coordinate list: (x1,y1), (x2,y2), (x3,y3), ... The polygon should not be explicitly closed - i.e. you should in general have (x1,y1) != (xn,yn). The polygon will be stored under the name 'POLYGON_NAME' - which should later be used when referring to the polygon in region select operations. - - - - *Example:* - - :: - - polygon = [(0,0) , (0,1) , (1,0)] - -.. ########################################################################################################### - -.. _load_polygon: -.. topic:: Example load polygon - - | Will load a polygon instance from the file 'FILENAME' - the file should be in irap RMS format. The polygon will be stored under the name 'POLYGON_NAME' which can then later be used to refer to the polygon for e.g. select operations. - - - *Example:* - - :: - - polygon = [] - with open("polygon.ply","r") as fileH: - for line in fileH.readlines(): - tmp = line.split() - polygon.append( (float(tmp[0]) , float(tmp[1]))) - - diff --git a/ThirdParty/Ert/docs/user/magic_strings/index.rst b/ThirdParty/Ert/docs/user/magic_strings/index.rst deleted file mode 100644 index 9252b0a1aa..0000000000 --- a/ThirdParty/Ert/docs/user/magic_strings/index.rst +++ /dev/null @@ -1,30 +0,0 @@ -.. _ert_magic_strings_full_doc: - -Magic Strings -=================================== - -Magic strings are special keywords that can be used in configuration files and templates which have special meanings. - -ERT Config ----------- - -These magic strings are available in the ERT config file. - -**** - -Inserts the config file name with extension into the config file. - -:: - - ENSPATH storage//ensemble - -If the config file is named *config.ert* then the resulting storage path will be: - -:: - - storage/config.ert/ensemble - - -**** - -Same as but inserts the config file name without the extension into the config file. diff --git a/ThirdParty/Ert/docs/user/observations/index.rst b/ThirdParty/Ert/docs/user/observations/index.rst deleted file mode 100644 index 47c019dafc..0000000000 --- a/ThirdParty/Ert/docs/user/observations/index.rst +++ /dev/null @@ -1,463 +0,0 @@ -Configuring observations for ERT -================================ - -General overview ----------------- - -When using ERT to condition on dynamic data, it is necessary to -specify which data to condition on. In particular, for a given piece -of data to condition on, the ERT application needs to know: - - - The actual measured value of the data. - - The uncertainty of the measured data. - - The time of measurement. - - How to simulate a response of the data given a parametrized ECLIPSE model. - - -To provide this observation to ERT, an observation file must be -created. The observation file is a plain text file, and is in essence -built around for different classes of observations and has an -associated keyword for each class: - - - Well or group rates from an existing ECLIPSE reference case: The - HISTORY_OBSERVATION keyword. - - - Well logs, RFTS and PLTs: The BLOCK_OBSERVATION keyword. - - - Separator tests, region pressures, etc.: The SUMMARY_OBSERVATION - keyword. - - - Exotic observations (e.g. data from 4D seismic): The - GENERAL_OBSERVATION keyword. - - -The HISTORY_OBSERVATION keyword -------------------------------- - -The keyword HISTORY_OBSERVATION is used to condition on observations -from the WCONHIST and WCONINJH keywords in schedule file provided to -the enkf project (or alternatively an ECLIPSE summary file if you have -changed the HISTORY_SOURCE keyword in the enkf project). The keyword -is typically used to condition on production and injection rates for -groups and wells, as well as bottom hole and tubing head pressures. An -observation entered with the HISTORY_OBSERVATION keyword will be -active at all report steps where data for the observation can be -found. - -In it's simplest form, a history observation is created as follows:: - - HISTORY_OBSERVATION WOPR:P1; - -This will condition on WOPR in well P1 using a default observation -error. The default observation error is a relative error of 10% to the -measurement with a minimum error of 0.10. See below on how explicitly -set the error. - -In general, to condition on variable VAR in well or group WGNAME, one -uses:: - - HISTORY_OBSERVATION VAR:WGNAME; - -Note that there must be a colon ":" between VAR and WGNAME and that -the statement shall end with a semi-colon ";". Thus, to condition on -WOPR, WWCT and WGOR in well C-17, and for the GOPR for the whole -field, one would add the following to the observation configuration:: - - HISTORY_OBSERVATION WOPR:C-17; - HISTORY_OBSERVATION WWCT:C-17; - HISTORY_OBSERVATION WGOR:C-17; - - HISTORY_OBSERVATION GOPR:FIELD; - -By default, the observation error is set to 10% of the observed value, -with a minimum of 0.10. It can be changed as follows:: - - HISTORY_OBSERVATION GOPR:FIELD - { - ERROR = 1000; - ERROR_MODE = ABS; - }; - -This will set the observation error to 1000 for all observations of -GOPR:FIELD. Note that both the items ERROR and ERROR_MODE as well as -the whole definition shall end with a semi-colon. - -The item ERROR_MODE can take three different values: ABS, REL or -RELMIN. If set to REL, all observation errors will be set to the -observed values multiplied by ERROR. Thus, the following will -condition on water injection rate for the whole field with 20% -observation uncertainity:: - - HISTORY_OBSERVATION GWIR:FIELD - { - ERROR = 0.20; - ERROR_MODE = REL; - }; - -If you do not want the observation error to drop below a given -threshold, say 100, you can use RELMIN and the keyword ERROR_MIN:: - - HISTORY_OBSERVATION GWIR:FIELD - { - ERROR = 0.20; - ERROR_MODE = RELMIN; - ERROR_MIN = 100; - }; - -Note that the configuration parser does not threat carriage return -different from space. Thus, the following statement is equivalent to -the previous:: - - HISTORY_OBSERVATION GWIR:FIELD { ERROR = 0.20; ERROR_MODE = RELMIN; ERROR_MIN = 100; }; - - -Also note that the special keyword include can be used to read an -external file. This can be very useful if you want to change the -standard configuration for a lot of observations in one go. For -example, consider the following code:: - - HISTORY_OBSERVATION WOPR:P1 { include "hist_obs_wells.txt"; }; - HISTORY_OBSERVATION WOPR:P2 { include "hist_obs_wells.txt"; }; - HISTORY_OBSERVATION WOPR:P3 { include "hist_obs_wells.txt"; }; - HISTORY_OBSERVATION WOPR:P4 { include "hist_obs_wells.txt"; }; - HISTORY_OBSERVATION WOPR:P5 { include "hist_obs_wells.txt"; }; - -Where the contents of the file hist_obs_wells.txt may be something -like:: - - ERROR_MODE = RELMIN; - ERROR = 0.25; - ERROR_MIN = 100; - -In this case, changing the file hist_obs_wells.txt will affect all of -the observations. - -Note that the keyword include can be used anywhere in the -configuration file. However, nested inclusion (use of include in a -file that has already been included with include) is not allowed. - -By default, an observation entered with the HISTORY_OBSERVATION -keyword will get the observed values, i.e. the 'true' values, from the -WCONHIST and WCONINJH keywords in the schedule file provided to the -ERT project. However it also possible to get the observed values from -a reference case. In that case you must set set HISTORY_SOURCE -variable in the ERT configuration file, see Creating a configuration -file for ERT. - -To change the observation error for a HISTORY_OBSERVATION for one or -more segments of the historic period, you can use the SEGMENT -keyword. For example:: - - HISTORY_OBSERVATION GWIR:FIELD - { - ERROR = 0.20; - ERROR_MODE = RELMIN; - ERROR_MIN = 100; - - SEGMENT FIRST_YEAR - { - START = 0; - STOP = 10; - ERROR = 0.50; - ERROR_MODE = REL; - }; - - SEGMENT SECOND_YEAR - { - START = 11; - STOP = 20; - ERRROR = 1000; - ERROR_MODE = ABS; - }; - }; - -The items START and STOP sets the start and stop of the segment in -terms of ECLIPSE restart steps. The keywords ERROR, ERROR_MODE and -ERROR_MIN behaves like before. If the segments overlap, they are -computed in alphabetical order. Error covariance for "merged" updates - -When merging the historical observations from several report steps -together in one update the different steps are not independent, and it -is beneficial to use a error covariance matrix, by using the keywords -AUTO_CORRF and AUTO_CORRF_PARAM ERT will automatically estimate a -error-covariance matrix based on the auto correlation function -specified by the AUTO_CORRF keyword, with the parameter given by the -AUTO_CORRF_PARAM parameter (i.e. the auto correlation length). The -currently available auto correlation functions are: - - EXP ~ exp(-x) - GAUSS ~ exp(-x*x/2) - -where the parameter x is given as: - - x = (t2 - t1) / AUTO_CORRF_PARAM - - -The SUMMARY_OBSERVATION keyword -------------------------------- - -The keyword SUMMARY_OBSERVATION can be used to condition on any -observation whos simulated value is written to the ECLIPSE summary -file, e.g. well rates, region properties, group and field rates etc. A -quite typical usage of SUMMARY_OBSERVATION is to condition on the -results of a separator test. - -Note: Although it is possible to condition on well and group rates -with SUMMARY_OBSERVATION, it is usually easier to use -HISTORY_OBSERVATION for this. - -In order to create a summary observation, four pieces of information -are needed: The observed value, the observation error, the time of -observation and a summary key. A typical summary observation is -created as follows:: - - SUMMARY_OBSERVATION SEP_TEST_2005 - { - VALUE = 100; - ERROR = 5; - DATE = 21/08/2005; - KEY = GOPR:BRENT; - }; - -This will create an observation of group oil production for the brent -group on 21th of august 2005. The observed value was 100 with a -standard deviation of 5. The name SEP_TEST_2005 will be used as a -label for the observation within the ERT and must be unique. - -Similarly to the name of a HISTORY_OBSERVATION, the item KEY in a -SUMMARY_OBSERVATION is used to look up the simulated value from the -summary file. And again, as when declaring a HISTORY_OBSERVATION, to -condition on VAR in well, group or region WGRNAME, one uses:: - - KEY = VAR:WGRNAME; - -For example, to condition on RPPW in region 8, one uses:: - - KEY = RPPW:8; - -It is also possible to give the observation time as a restart number -using the RESTART item or as time in days from simulation start using -the DAYS item. Here are two examples:: - - -- Giving the observation time in terms of restart number. - SUMMARY_OBSERVATION SEP_TEST_2005 - { - VALUE = 100; - ERROR = 5; - RESTART = 42; - KEY = GOPR:BRENT; - }; - - - -- Giving the observation time in terms of days - -- from simulation start. - SUMMARY_OBSERVATION SEP_TEST_2008 - { - VALUE = 213; - ERROR = 10; - DAYS = 911; - KEY = GOPR:NESS; - }; - - - -The BLOCK_OBSERVATION keyword ------------------------------- - -This is observations of variables in grid blocks/cells. The -observations can be of arbitrary ECLIPSE fields like PRESSURE -(typically for an RFT), PORO or PERM. A block observation is entered -with the BLOCK_OBSERVATION keyword. Here is an example of a typical -block observation:: - - BLOCK_OBSERVATION RFT_2006 - { - FIELD = PRESSURE; - DATE = 22/10/2006; - - OBS P1 { I = 1; J = 1; K = 1; VALUE = 100; ERROR = 5; }; - OBS P2 { I = 2; J = 2; K = 1; VALUE = 101; ERROR = 5; }; - OBS P3 { I = 2; J = 3; K = 1; VALUE = 102; ERROR = 5; }; - }; - -This will condition on observations of the pressure in grid blocks -(1,1,1), (2,2,1) and (2,3,1) on the 22/10/2006. - -By default the BLOCK_OBSERVATION requires that the specific field -which has been observed (e.g. PRESSURE in the example above) must have -been specified in main ERT configuration file using the FIELD keyword, -and ECLIPSE must be configured to produce a restart file for this -particular time. Alternatively it is possible to tell ERT to use the -summary vector as source of the data:: - - BLOCK_OBSERVATION RFT_2006 - { - FIELD = PRESSURE; - DATE = 22/10/2006; - SOURCE = SUMMARY; - - OBS P1 { I = 1; J = 1; K = 1; VALUE = 100; ERROR = 5; }; - OBS P2 { I = 2; J = 2; K = 1; VALUE = 101; ERROR = 5; }; - OBS P3 { I = 2; J = 3; K = 1; VALUE = 102; ERROR = 5; }; - }; - -In this case the data will be loaded from the BPR vectors in the -summary file. - -Note the use of the sub class OBS to specify the actUal observed -values, the observation errors and their grid location. Each OBS shall -have a unique key within the BLOCK_OBSERVATION instance, and is -required to have the items I, J, K, VALUE and ERROR. These are the -grid i,j and k indicies for the observation point, the observed value -and it's standard deviation. - -As with a SUMMARY_OBSERVATION, the observation time can be given as -either a date, days since simulation start or restart number. The -respective keys for setting giving it as date, days or restart number -are DATE, DAYS and RESTART. Note that each BLOCK_OBSERVATION instance -must have an unique global name (RFT_2006 in the example above). - -Block observations can often be quite long. Thus, it is often a good -idea to use the special keyword include in order to store the OBS -structures in a different file. This is done as follows:: - - BLOCK_OBSERVATION RFT_2006 - { - FIELD = PRESSURE; - RESTART = 20; - - include 'RFT_2006_OBS_DATA.txt'; - }; - -Where the file RFT_2006_OBS_DATA.txt contains the OBS instances:: - - OBS P1 { I = 1; J = 1; K = 1; VALUE = 100; ERROR = 5; }; - OBS P2 { I = 2; J = 2; K = 1; VALUE = 101; ERROR = 5; }; - OBS P3 { I = 2; J = 3; K = 1; VALUE = 112; ERROR = 5; }; - OBS P4 { I = 3; J = 3; K = 1; VALUE = 122; ERROR = 5; }; - OBS P5 { I = 4; J = 3; K = 1; VALUE = 112; ERROR = 5; }; - OBS P6 { I = 5; J = 3; K = 1; VALUE = 122; ERROR = 5; }; - - - -The GENERAL_OBSERVATION keyword --------------------------------- - -The GENERAL_OBSERVATION keyword is used together with the GEN_DATA and -GEN_PARAM type. This pair of observation and data types are typically -used when you want to update something special which does not fit into -any of the predefined enkf types. The ERT application just treats -GENERAL_OBSERVATION (and also GEN_DATA) as a range of number with no -particular structure, this is very flexible, but of course also a bit -more complex to use:: - - GENERAL_OBSERVATION GEN_OBS1{ - DATA = SOME_FIELD; - RESTART = 20; - OBS_FILE = some_file.txt; - }; - -This example a minimum GENERAL_OBSERVATION. The keyword DATA points to -the GEN_DATA instance this observation is 'observing', RESTART gives -the report step when this observation is active. OBS_FILE should be -the name of a file with observation values, and the corresponding -uncertainties. The file with observations should just be a plain text -file with numbers in it, observations and corresponding uncertainties -interleaved. An example of an OBS_FILE:: - - 1.46 0.26 - 25.0 5.0 - 5.00 1.00 - -This OBS_FILE has three observations: 1.46 +/- 0.26, 25.0 +/- 5.0 and -5.00 +/- 1.00. In the example above it is assumed that the DATA -instance we are observing (i.e. comparing with) has the same number of -elements as the observation, i.e. three in this case. By using the -keywords INDEX_LIST or INDEX_FILE you can select the elements of the -GEN_DATA instance you are interested in. Consider for example:: - - GENERAL_OBSERVATION GEN_OBS1{ - DATA = SOME_FIELD; - INDEX_LIST = 0,3,9; - RESTART = 20; - OBS_FILE = some_file.txt; - }; - -Here we use INDEX_LIST to indicate that we are interested in element -0,3 and 9 of the GEN_DATA instance:: - - GEN_DATA GEN_OBS1 - ======== =========== - 1.56 <---------------------> 1.46 0.26 - 23.0 /--------------> 25.0 5.00 - 56.0 | /---------> 5.00 1.00 - 27.0 <------/ | =========== - 0.2 | - 1.56 | - 1.78 | - 6.78 | - 9.00 | - 4.50 <-----------/ - ======== - -In addition to INDEX_LIST it is possible to use INDEX_FILE which -should just point at an plain text file with indexes (without any ',' -or anything). Finally, if your observation only has one value, you can -embed it in the config object with VALUE and ERROR. - -Matching GEN_OBS and GEN_DATA -............................. - -It is important to match up the GEN_OBS observations with the -corresponding GEN_DATA simulation data correctly. The GEN_DATA result -files must have an embedded '%d' to indicate the report step in them - -in the case of smoother based workflows the actual numerical value -here is not important. To ensure that GEN_OBS and corresponding -GEN_DATA values match up correctly only the RESTART method is allowed -for GEN_OBS when specifying the time. So consider a setup like this:: - - -- Config file: - GEN_DATA RFT_BH67 INPUT_FORMAT:ASCII RESULT_FILE:rft_BH67_%d REPORT_STEPS:20 - ... /|\ /|\ - ... | | - -- Observation file: | | - GENERAL_OBSERVATION GEN_OBS1{ +------------------/ - DATA = RFT_BH67; | - RESTART = 20; <------------------------------------/ - OBS_FILE = some_file.txt; - }; - -Here we see that the observation is active at report step 20, and we -expect the forward model to create a file rft_BH67_20 in each -realization directory. Error covariance - -The optional keyword ERROR_COVAR can be used to point to an existing -file, containing an error covariance matrix. The file should contain -the elements of the matrix as formatted numbers; newline formatting is -allowed but not necessary. Since the matrix should by construction be -symmetric there is no difference between column-major and row-major -order! The covariance matrix - - [ 1 0.75 -0.25] -C = [ 0.75 1.25 -0.50] - [-0.25 -0.50 0.85] - -Can be represented by the file:: - - 1 - 0.75 - -0.25 - 0.75 - 1.25 - -0.50 - -0.25 - -0.50 - 0.85 - -without newlines, or alternatively:: - - 1 0.75 -0.25 - 0.75 1.25 -0.50 - -0.25 -0.50 0.85 - -with newlines. diff --git a/ThirdParty/Ert/docs/user/tutorial/index.rst b/ThirdParty/Ert/docs/user/tutorial/index.rst deleted file mode 100644 index fdcc65dfe1..0000000000 --- a/ThirdParty/Ert/docs/user/tutorial/index.rst +++ /dev/null @@ -1,3 +0,0 @@ -ERT Tutorial -============ -Tutorial for ert diff --git a/ThirdParty/Ert/docs/user/workflows/built_in.rst b/ThirdParty/Ert/docs/user/workflows/built_in.rst deleted file mode 100644 index 60edeb4fa9..0000000000 --- a/ThirdParty/Ert/docs/user/workflows/built_in.rst +++ /dev/null @@ -1,401 +0,0 @@ -.. _built_in_workflow_jobs: - -Built in workflow jobs -====================== - - -ERT comes with a list of default workflow jobs which invoke internal -ERT functionality. The internal workflows include: - -Jobs related to case management -------------------------------- - -**SELECT_CASE** - -The job SELECT_CASE can be used to change the currently selected -case. The SELECT_CASE job should be used as: - -:: - - SELECT_CASE newCase - -if the case newCase does not exist it will be created. - -**CREATE_CASE** - -The job CREATE_CASE can be used to create a new case without selecting -it. The CREATE_CASE job should be used as: - -:: - - CREATE_CASE newCase - - -**INIT_CASE_FROM_EXISTING** - -The job INIT_CASE_FROM_EXISTING can be used to initialize a case from -an existing case. The argument to the workflow should be the name of -the workflow you are initializing from; so to initialize the current -case from the existing case "oldCase": - -:: - - INIT_CASE_FROM_EXISTING oldCase - -By default the job will initialize the 'current case', but optionally -you can give the name of a second case which should be initialized. In -this example we will initialize "newCase" from "oldCase": - -:: - - INIT_CASE_FROM_EXISTING oldCase newCase - -When giving the name of a second case as target for the initialization -job the 'current' case will not be affected. - - -Jobs related to export ----------------------- - -**EXPORT_FIELD** - -The EXPORT_FIELD workflow job exports field data to roff or grdecl -format dependent on the extension of the export file argument.The job -takes the following arguments: - -#. Field to be exported -#. Filename for export file, must contain %d -#. Report_step -#. Realization range - -The filename must contain a %d. This will be replaced with the -realization number. - -The realization range parameter is optional. Default is all -realizations. - - -Example use of this job in a workflow: - -:: - - EXPORT_FIELD PERMZ path_to_export/filename%d.grdecl 0 0,2 - -**EXPORT_FIELD_RMS_ROFF** - -The EXPORT_FIELD_RMS_ROFF workflow job exports field data to roff -format. The job takes the following arguments: - -#. Field to be exported -#. Filename for export file, must contain %d -#. Report_step -#. Realization range - -The filename must contain a %d. This will be replaced with the -realization number. - -The realization range parameter is optional. Default is all realizations. - - -Example uses of this job in a workflow: - -:: - - EXPORT_FIELD_RMS_ROFF PERMZ path_to_export/filename%d.roff 0 - EXPORT_FIELD_RMS_ROFF PERMX path_to_export/filename%d 0 0-5 - - -**EXPORT_FIELD_ECL_GRDECL** - -The EXPORT_FIELD_ECL_GRDECL workflow job exports field data to grdecl -format. The job takes the following arguments: - -#. Field to be exported -#. Filename for export file, must contain %d -#. Report_step -#. Realization range - -The filename must contain a %d. This will be replaced with the realization number. - -The realization range parameter is optional. Default is all realizations. - - -Example uses of this job in a workflow: - -:: - - EXPORT_FIELD_ECL_GRDECL PERMZ path_to_export/filename%d.grdecl 0 - EXPORT_FIELD_ECL_GRDECL PERMX path_to_export/filename%d 0 0-5 - - -**EXPORT_RUNPATH** - -The EXPORT_RUNPATH workflow job writes the runpath file RUNPATH_FILE -for the selected case. - -The job can have no arguments, or one can set a range of realizations -and a range of iterations as arguments. - -Example uses of this job in a workflow: - -:: - - EXPORT_RUNPATH - -With no arguments, entries for all realizations are written to the -runpath file. If the runpath supports iterations, entries for all -realizations in iter0 are written to the runpath file. - -:: - - EXPORT_RUNPATH 0-5 | * - -A range of realizations and a range of iterations can be given. "|" is -used as a delimiter to separate realizations and iterations. "*" can -be used to select all realizations or iterations. In the example -above, entries for realizations 0-5 for all iterations are written to -the runpath file. - - -Jobs related to analysis update -------------------------------- - -**ANALYSIS_UPDATE** - -This job will perform a update and store the updated parameters as -initial parameters of a different case. The name of the source case -and the target case must be given as arguments: - -:: - - ANALYSIS_UPDATE prior posterior - -Will fetch prior parameters and simulated responses from the -case:`prior` and store updated parameters in the case:`posterior`. If -you have configured local updates that will be respected, otherwise -all available data will be used - and all parameters will be updated. - - -Jobs related to running simulations - including updates -------------------------------------------------------- - -**RUN_SMOOTHER** - -The RUN_SMOOTHER job will run a simulation and perform an update. The -job has one required argument - the name of a case where the updated -parameters are stored. Optionally the job can take a second boolean -argument, if the second argument is set to true the job will rerun -based on the updated parameters. - -Run a simulation and an update. Store the updated parameters in the -specified case. This case is created if it does not exist: - -:: - - RUN_SMOOTHER new_case - - -Run a simulation and an update. Store the updated parameters in the -specified case, then run a simulation on this case: - -:: - - RUN_SMOOTHER new_case true - - - -**RUN_SMOOTHER_WITH_ITER** - -This is exactly like the RUN_SMOOTHER job, but it has an additional -first argumeent iter which can be used to control the iter number in -the RUNPATH. When using the RUN_SMOOTHER job the iter number will be -defaultetd to zero, and one in the optional rerun. - -**ENSEMBLE_RUN** - -The ENSEMBLE_RUN job will run a simulation, no update. The job take as -optional arguments a range and/or list of which realizations to run. - -:: - - ENSEMBLE_RUN - -:: - - ENSEMBLE_RUN 1-5, 8 - - -**LOAD_RESULTS** - -The LOAD_RESULTS loads result from simulation(s). The job takes as -optional arguments a range and/or list of which realizations to load -results from. If no realizations are specified, results for all -realizations are loaded. - -:: - - LOAD_RESULTS - -:: - - LOAD_RESULTS 1-5, 8 - -In the case of multi iteration jobs, like e.g. the integrated smoother -update, the LOAD_RESULTS job will load the results from iter==0. To -control which iteration is loaded from you can use the -LOAD_RESULTS_ITER job. - - -**LOAD_RESULTS_ITER** - -The LOAD_RESULTS_ITER job is similar to the LOAD_RESULTS job, but it -takes an additional first argument which is the iteration number to -load from. This should be used when manually loading results from a -multi iteration workflow: - -:: - - LOAD_RESULTS_ITER - -:: - - LOAD_RESULTS_ITER 3 1-3, 8-10 - -Will load the realisations 1,2,3 and 8,9,10 from the fourth iteration -(counting starts at zero). - - -**MDA_ES** - -This workflow job (plugin) is used to run the *Multiple Data -Assimilation Ensemble Smoother* :code:`MDA ES`. Only two arguments -are required to start the MDA ES process; target case format and -iteration weights. The weights implicitly indicate the number of -iterations and the normalized global standard deviation scaling -applied to the update step. - -:: - - MDA_ES target_case_%d observations/obs.txt - -This command will use the weights specified in the obs.txt file. This -file should have a single floating point number per line. -Alternatively the weights can be given as arguments as shown here. - -:: - - MDA_ES target_case_%d 8,4,2,1 - -This command will use the normalized version of the weights 8,4,2,1 -and run for four iterations. The prior will be in *target_case_0* and -the results from the last iteration will be in *target_case_4*. -**Note: the weights must be listed with no spaces and separated with -commas.** - -If this is run as a plugin from Ertshell or the GUI a convenient user -interface can be shown. - - -Jobs for ranking realizations ------------------------------ - -**OBSERVATION_RANKING** - -The OBSERVATION_RANKING job will rank realizations based on the delta -between observed and simulated values for selected variables and time -steps. The data for selected variables and time steps are summarized -for both observed and simulated values, and then the simulated versus -observed delta is used for ranking the realizations in increasing -order. The job takes a name for the ranking as the first parameter, -then the time steps, a "|" character and then variables to rank on. If -no time steps and/or no variables are given, all time steps and -variables are taken into account. - - -Rank the realizations on observation/simulation delta value for all -WOPR data for time steps 0-20: - -:: - - OBSERVATION_RANKING Ranking1 0-20 | WOPR:* - - -Rank the simulations on observation/simulation delta value for all -WOPR and WWCT data for time steps 1 and 10-50 - -:: - - OBSERVATION_RANKING Ranking2 1, 10-50 | WOPR:* WWCT:* - - -Rank the realizations on observation/simulation delta value for -WOPR:OP-1 data for all time steps - -:: - - OBSERVATION_RANKING Ranking3 | WOPR:OP-1 - -**DATA_RANKING** - -The DATA_RANKING job will rank realizations in increasing or -decreasing order on selected data value for a selected time step. The -job takes as parameters the name of the ranking, the data key to rank -on, increasing order and selected time steps. If no time step is -given, the default is the last timestep. - -Rank the realizations on PORO:1,2,3 on time step 0 in decreasing order - -:: - - DATA_RANKING Dataranking1 PORO:1,2,3 false 0 - - -**EXPORT_RANKING** - -The EXPORT_RANKING job exports ranking results to file. The job takes -two parameters; the name of the ranking to export and the file to -export to. - -:: - - EXPORT_RANKING Dataranking1 /tmp/dataranking1.txt - - -**INIT_MISFIT_TABLE** - -Calculating the misfit for all observations and all timesteps can -potentially be a bit timeconsuming, the results are therefor cached -internally. If you need to force the recalculation of this cache you -can use the INIT_MISFIT_TABLE job to initialize the misfit table that -is used in observation ranking. - -:: - - INIT_MISFIT_TABLE - - -**STD_SCALE_CORRELATED_OBS** - -The workflow job :code:`STD_SCALE_CORRELATED_OBS` is used to scale the -observation standard deviation in an attempt to reduce the effect of -correlations in the observed data. The job expects the observation -keys you want to consider as arguments: - -:: - - STD_SCALE_CORRELATED_OBS WWCT:OP_1 WWCT:OP_2 - -In this example the observation uncertainty corresponding to -:code:`WWCT:OP_1` and :code:`WWCT:OP_2` will be scaled. Observe that -the :code:`STD_SCALE_CORRELATED_OBS` keyword will "flatten" in both -time and spatial direction. Wildcards are allow, i.e. - -:: - - STD_SCALE_CORRELATED_OBS W*:OP_1 - -Will scale based on all the observations of well 'OP_1'. For more -advanced selections of observations, where you only want to scale -based on parts of the observation - spatially or temporaly you must -write your own plugin. - diff --git a/ThirdParty/Ert/docs/user/workflows/index.rst b/ThirdParty/Ert/docs/user/workflows/index.rst deleted file mode 100644 index 8a0f541975..0000000000 --- a/ThirdParty/Ert/docs/user/workflows/index.rst +++ /dev/null @@ -1,30 +0,0 @@ -Workflows and plugins -===================== - -Contents - -.. toctree:: - :maxdepth: 1 - - workflows - plugins - built_in - -The Forward Model in ERT runs in the context of a single realization, -i.e. there is no communication between the different processes, and -the jobs are run outside of the main ERT process. - -As an alternative to the forward model ERT has a system with -*workflows*. Using workflows way you can automate cumbersome normal -ERT processes, and also invoke external programs. The workflows are -run serially on the workstation actually running ERT, and should not -be used for computationally heavy tasks. - -In addition to workflows ERT has a system for *plugins*, a plugin is -quite similar to a workflow job, but the plugin appears in a gui -dropdown, and can even have a gui of it's own. A plugin is written in -Python and has *full access* to ERT internals. The plugins hook into -the running Python process, and can only be invoked from the gui or -:code:`ertshell`. - - diff --git a/ThirdParty/Ert/docs/user/workflows/plugins.rst b/ThirdParty/Ert/docs/user/workflows/plugins.rst deleted file mode 100644 index b3e6f93d14..0000000000 --- a/ThirdParty/Ert/docs/user/workflows/plugins.rst +++ /dev/null @@ -1,246 +0,0 @@ -Python plugins -============== - -When you are using one of the python based frontends :code:`gert` or -:code:`ertshell` you can write plugins to ert in Python. The plugins -will run as part of the running ert process, and can do anything ert -can do itself. Writing a plugin is quite similar to writing an -:ref:`ert_script` - the main difference is that the class should -inherit from :code:`ErtPlugin`. This plugin will print the ensemble -size in the console: - -.. code:: python - - from ert.util import DoubleVector - from ert.enkf import ErtScript - - class PrintEnsembleSize(ErtPlugin): - - # The run method is the entry point which is called - # when the plugin is invoked. - def run(self): - ert = self.ert() - print("Ensemble size: %d" % ert.getEnsembleSize( )) - - - # This is the name of the plugin which will appear in the - # "Plugin" menu in the gui. - def getName(self): - return "Size plugin" - - - -The plugins should be *installed* with a small configuration -file. Assume that the small code above is implemented in the script -file :code:`script/ens_size.py` then it is installed in ert as: - - INTERNAL TRUE -- The job will call an internal function of the current running ERT instance. - SCRIPT sripts/ens_size.py -- An existing Python script - -ERT will detect that the class inherits from :code:`ErtPlugin`, and -the functionality will be available as :code:`Size plugin` in the plugin menu. - -As an example of a more complete plugin is the :code:`CSV export` -plugin from the ert code, this code can be used to export simulated -results, parameters and observations to a CSV file[#csv_export]_. - -.. code:: python - - import os - import re - - import pandas - from PyQt4.QtGui import QCheckBox - - from ert.enkf import ErtPlugin, CancelPluginException - from ert.enkf.export import SummaryCollector, GenKwCollector, MisfitCollector, DesignMatrixReader, CustomKWCollector - from ert_gui.ertwidgets.customdialog import CustomDialog - from ert_gui.ertwidgets.listeditbox import ListEditBox - from ert_gui.ertwidgets.models.path_model import PathModel - from ert_gui.ertwidgets.pathchooser import PathChooser - - - class CSVExportJob(ErtPlugin): - """ - Export of summary, custom_kw, misfit, design matrix data and gen kw into a single CSV file. - - The script expects a single argument: - - output_file: this is the path to the file to output the CSV data to - - Optional arguments: - - case_list: a comma separated list of cases to export (no spaces allowed) - if no list is provided the current case is exported - a single * can be used to export all cases - - design_matrix: a path to a file containing the design matrix - - infer_iteration: If True the script will try to infer the iteration number by looking at the suffix of the case name - (i.e. default_2 = iteration 2) - If False the script will use the ordering of the case list: the first item will be iteration 0, - the second item will be iteration 1... - - The script also looks for default values for output path and design matrix path to present in the GUI. These can - be specified with DATA_KW keyword in the config file: - DATA_KW CSV_OUTPUT_PATH - DATA_KW DESIGN_MATRIX_PATH - """ - - INFER_HELP = ("" - "If this is checked the iteration number will be inferred from the name i.e.:" - "
    " - "
  • case_name -> iteration: 0
  • " - "
  • case_name_0 -> iteration: 0
  • " - "
  • case_name_2 -> iteration: 2
  • " - "
  • case_0, case_2, case_5 -> iterations: 0, 2, 5
  • " - "
" - "Leave this unchecked to set iteration number to the order of the listed cases:" - "
  • case_0, case_2, case_5 -> iterations: 0, 1, 2
" - "
" - "") - - def getName(self): - return "CSV Export" - - def getDescription(self): - return "Export GenKW, CustomKW, design matrix, misfit data and summary data into a single CSV file." - - def inferIterationNumber(self, case_name): - pattern = re.compile("_([0-9]+$)") - match = pattern.search(case_name) - - if match is not None: - return int(match.group(1)) - return 0 - - - def run(self, output_file, case_list=None, design_matrix_path=None, infer_iteration=True): - cases = [] - - if case_list is not None: - if case_list.strip() == "*": - cases = self.getAllCaseList() - else: - cases = case_list.split(",") - - if case_list is None or len(cases) == 0: - cases = [self.ert().getEnkfFsManager().getCurrentFileSystem().getCaseName()] - - if design_matrix_path is not None: - if not os.path.exists(design_matrix_path): - raise UserWarning("The design matrix file does not exists!") - - if not os.path.isfile(design_matrix_path): - raise UserWarning("The design matrix is not a file!") - - data = pandas.DataFrame() - - for index, case in enumerate(cases): - case = case.strip() - - if not self.ert().getEnkfFsManager().caseExists(case): - raise UserWarning("The case '%s' does not exist!" % case) - - if not self.ert().getEnkfFsManager().caseHasData(case): - raise UserWarning("The case '%s' does not have any data!" % case) - - if infer_iteration: - iteration_number = self.inferIterationNumber(case) - else: - iteration_number = index - - case_data = GenKwCollector.loadAllGenKwData(self.ert(), case) - - custom_kw_data = CustomKWCollector.loadAllCustomKWData(self.ert(), case) - if not custom_kw_data.empty: - case_data = case_data.join(custom_kw_data, how='outer') - - if design_matrix_path is not None: - design_matrix_data = DesignMatrixReader.loadDesignMatrix(design_matrix_path) - if not design_matrix_data.empty: - case_data = case_data.join(design_matrix_data, how='outer') - - misfit_data = MisfitCollector.loadAllMisfitData(self.ert(), case) - if not misfit_data.empty: - case_data = case_data.join(misfit_data, how='outer') - - summary_data = SummaryCollector.loadAllSummaryData(self.ert(), case) - if not summary_data.empty: - case_data = case_data.join(summary_data, how='outer') - else: - case_data["Date"] = None - case_data.set_index(["Date"], append=True, inplace=True) - - case_data["Iteration"] = iteration_number - case_data["Case"] = case - case_data.set_index(["Case", "Iteration"], append=True, inplace=True) - - data = pandas.concat([data, case_data]) - - data = data.reorder_levels(["Realization", "Iteration", "Date", "Case"]) - data.to_csv(output_file) - - export_info = "Exported %d rows and %d columns to %s." % (len(data.index), len(data.columns), output_file) - return export_info - - - def getArguments(self, parent=None): - description = "The CSV export requires some information before it starts:" - dialog = CustomDialog("CSV Export", description, parent) - - default_csv_output_path = self.getDataKWValue("CSV_OUTPUT_PATH", default="output.csv") - output_path_model = PathModel(default_csv_output_path) - output_path_chooser = PathChooser(output_path_model) - - design_matrix_default = self.getDataKWValue("DESIGN_MATRIX_PATH", default="") - design_matrix_path_model = PathModel(design_matrix_default, is_required=False, must_exist=True) - design_matrix_path_chooser = PathChooser(design_matrix_path_model) - - list_edit = ListEditBox(self.getAllCaseList()) - - infer_iteration_check = QCheckBox() - infer_iteration_check.setChecked(True) - infer_iteration_check.setToolTip(CSVExportJob.INFER_HELP) - - dialog.addLabeledOption("Output file path", output_path_chooser) - dialog.addLabeledOption("Design Matrix path", design_matrix_path_chooser) - dialog.addLabeledOption("List of cases to export", list_edit) - dialog.addLabeledOption("Infer iteration number", infer_iteration_check) - - dialog.addButtons() - - success = dialog.showAndTell() - - if success: - design_matrix_path = design_matrix_path_model.getPath() - if design_matrix_path.strip() == "": - design_matrix_path = None - - case_list = ",".join(list_edit.getItems()) - - return [output_path_model.getPath(), case_list, design_matrix_path, infer_iteration_check.isChecked()] - - raise CancelPluginException("User cancelled!") - - - def getDataKWValue(self, name, default): - data_kw = self.ert().getDataKW() - if name in data_kw: - return data_kw[data_kw.indexForKey(name)][1] - return default - - def getAllCaseList(self): - fs_manager = self.ert().getEnkfFsManager() - all_case_list = fs_manager.getCaseList() - all_case_list = [case for case in all_case_list if fs_manager.caseHasData(case)] - return all_case_list - - -.. rubric:: Footnotes - -.. [csv_export] There are many solutions for CSV export; this plugin - is an example which is implemented based on the - internal ert datastructures, other - probably more - widely used alterantives are based on an external - process running through the simulation folders. diff --git a/ThirdParty/Ert/docs/user/workflows/workflows.rst b/ThirdParty/Ert/docs/user/workflows/workflows.rst deleted file mode 100644 index d77f05fb03..0000000000 --- a/ThirdParty/Ert/docs/user/workflows/workflows.rst +++ /dev/null @@ -1,360 +0,0 @@ -.. _workflows: - -Configuring workflows in ERT consists of two steps: *installing the -jobs* which should be available for ERT to use in workflows, and then -subsequently assemble one or more jobs, with arguments, in a -workflow. You can use predefined workflow jobs, or create your -own. There are no predefined complete workflows. - - - -Workflow jobs -============= - -The workflow jobs are quite similar to the jobs in the forward model, -in particular the jobs are described by a configuration file which -resembles the one used by the forward model jobs. The workflow jobs -can be of two fundamentally different types - *external* and *internal*. - - -External workflow jobs ----------------------- - -These jobs invoke an external program/script to do the job, this is -very similar to the jobs of the forward model, but instead of running -as separate jobs on the cluster - one for each realization, the -workflow jobs will be invoked on the workstation running ert, and -typically go through all the realizations in one loop. - -The executable invoked by the workflow job can be an executable you -have written yourself - in any language, or it can be an existing -Linux command like e.g. :code:`cp` or :code:`mv`. - -Internal workflow jobs ----------------------- - -These jobs invoke a function in the address space of the ERT program -itself; i.e. they are run as part of the running ERT process - and can -in principle do anything that ERT can do itself. There are two two -varieties of the internal workflow jobs: - - -Invoke a pre exported function -.............................. - -This is the simplest, where you can invoke a a predefined ERT -function. The function must already have been marked as *exported* in -the ert code base. The list of predefined workflow jobs based on this -method can be found here: :ref:`built_in_workflow_jobs`. Marking a new -function as exported is quite simple, but it requires changes to the -core code and a new version must be installed. - -.. _ert_script: -Run a Python Script -................... - -If you are using one of the Python based frontends, *gert* or -*erthsell*, you can write your own Python script which is run as part -of the existing process. By using the full ert Python api you get -access to powerful customization/automization features. Below is an -example of :code:`ErtScript` which calculates the misfit for all -observations and prints the result to a text file. All Python scripts -of this kind must: - - 1. Be implemented as a class which iherits from :code:`ErtScript` - 2. Have a method :code:`run(self)` which does the actual job - - -.. code:: python - - from ert.util import DoubleVector - from ert.enkf import ErtScript - - class ExportMisfit(ErtScript): - - def run(self): - # Get a handle to running ert instance - ert = self.ert() - - - # Get a handle to the case / filesystem we are interested in; - # this should ideally come as an argument - not just use current. - fs = ert.getEnkfFsManager().getCurrentFileSystem() - - - # How many realisations: - ens_size = ert.getEnsembleSize( ) - - - # Get a handle to all the observations - observations = ert.getObservations() - - - # Iterate through all the observations; each element in this - # iteration corresponds to one key in the observations file. - for obs in observations: - misfit = DoubleVector() - for iens in range(ens_size): - chi2 = obs.getTotalChi2( fs , iens ) - misfit[iens] = chi2 - - permutation = misfit.permutationSort( ) - - print " # Realisation Misfit:%s" % obs.getObservationKey() - print "-----------------------------------" - for index in range(len(misfit)): - iens = permutation[index] - print "%2d %2d %10.5f" % (index , iens , misfit[iens]) - - print "-----------------------------------\n" - - - - -Configuring workflow jobs -------------------------- - -Workflow jobs are configured with a small configuration file much like -the configuration file used to install forward model jobs. The -keywords used in the configuration file are in two *clases* - those -related to how the job should located/run and the arguments which -should passed from the workflow to the job. - - -Configure an internal job -......................... - -When configuring an internal workflow job the keyword :code:`INTERNAL` -is given the value :code:`TRUE` to indicate that this is an internal -job. In addition you give the name of the C function you wish to -invoke. By default the workflow job will search for the function -symbol in the current process space, but by passing the :code:`MODULE` -keyword you can request the loading of an external shared library: - -:: - - INTERNAL TRUE -- The job will call an internal function of the current running ERT instance. - FUNCTION enkf_main_plot_all -- Name of the ERT function we are calling; must be marked exportable. - MODULE /name/of/shared/library -- Very optional - to load an extra shared library. - - -Configure a an internal job: Python -................................... - -If you wish to implement your job as a Python class, derived from -:code:`ErtScript` you should use the :code:`SCRIPT` keyword instead of -:code:`FUNCTION`, to point to an existing Python script: - -:: - - INTERNAL TRUE -- The job will call an internal function of the current running ERT instance. - SCRIPT sripts/my_script.py -- An existing Python script - -Observe that the important thing here is the fact that we are writing -an *internal* Python script; if you are writing an external script to -loop through all your realization folders that will typically be an -*external* script, and in that case the implementation language - -i.e. Python, Perl, C++, F77 ... has no relevance. - - -Configure an external job -......................... - -An *external* job is a workflow job which is implemented in an -external executable, i.e. typically a script written in for instance -Python. When configuring an external job the most important keyword is -:code:`EXECUTABLE` which is used to give the path to the external -executable: - -:: - - INTERNAL FALSE -- This is the default - not necessary to include. - EXECUTABLE path/to/program -- Path to a program/script which will be invoked by the job. - - -Configuring the arguments -......................... - -In addition to the INTERNAL, FUNCTION, MODULE and EXECUTABLE keys -which are used to configure what the job should do there are some keys -which can be used to configure the number of arguments and their -type. These arguments apply to both internal and external jobs: - -:: - - MIN_ARG 2 -- The job should have at least 2 arguments. - MAX_ARG 3 -- The job should have maximum 3 arguments. - ARG_TYPE 0 INT -- The first argument should be an integer - ARG_TYPE 1 FLOAT -- The second argument should be a float value - ARG_TYPE 2 STRING -- The third argument should be a string - the default. - -The MIN_ARG,MAX_ARG and ARG_TYPE arguments are used to validate workflows. - - -**Example 1 : Plot variables** - -:: - - -- FILE: PLOT -- - INTERNAL TRUE - FUNCTION ert_tui_plot_JOB - MIN_ARG 1 - -This job will use the ERT internal function ert_tui_plot_JOB to plot -an ensemble of an arbitrary ERT variable. The job needs at least one -argument; there is no upper limit on the number of arguments. - - -**Example 2 : Run external script** - -:: - - -- FILE: ECL_HIST -- - EXECUTABLE Script/ecl_hist.py - MIN_ARG 3 - -This job will invoke the external script Script/ecl_host.py; the -script should have at least three commandline arguments. The path to -the script, Script/ecl_hist.py is interpreted relative to the location -of the configuration file. - - -Loading workflow jobs into ERT ------------------------------- - -Before the jobs can be used in workflows they must be 'loaded' into -ERT. This is done with two different ERT keywords: - -:: - - LOAD_WORKFLOW_JOB jobConfigFile JobName - -The LOAD_WORKFLOW_JOB keyword will load one workflow job. The name of -the job is optional, if not provided the job will get name from the -configuration file. Alternatively you can use the command -WORKFLOW_JOB_DIRECTORY which will load all the jobs in a -directory. The command: - -:: - - WORKFLOW_JOB_DIRECTORY /path/to/jobs - -will load all the workflow jobs in the /path/to/jobs -directory. Observe that all the files in the /path/to/jobs directory -should be job configuration files. The jobs loaded in this way will -all get the name of the file as the name of the job. The -:code:`WORKFLOW_OB_DIRECTORY` keyword will *not* load configuration -files recursively. - - - - -Complete Workflows -================== - -A workflow is a list of calls to jobs, with additional arguments. The -job name should be the first element on each line. Based on the two -jobs PLOT and ECL_HIST we can create a small workflow example: - -:: - - PLOT WWCT:OP_1 WWCT:OP_3 PRESSURE:10,10,10 - PLOT FGPT FOPT - ECL_HIST //wwct_hist WWCT:OP_1 WWCT:OP_2 - -In this workflow we create plots of the nodes -WWCT:OP_1;WWCT:OP_3,PRESSURE:10,10,10,FGPT and FOPT. The plot job we -have created in this example is completely general, if we limited -ourselves to ECLIPSE summary variables we could get wildcard -support. Then we invoke the ECL_HIST example job to create a -histogram. See below for documentation of , and -. - - -Loading workflows ------------------ - -Workflows are loaded with the configuration option LOAD_WORKFLOW: - -:: - - LOAD_WORKFLOW /path/to/workflow/WFLOW1 - LOAD_WORKFLOW /path/to/workflow/workflow2 WFLOW2 - -The LOAD_WORKFLOW takes the path to a workflow file as the first -argument. By default the workflow will be labeled with the filename -internally in ERT, but optionally you can supply a second extra -argument which will be used as name for the workflow. Alternatively -you can load a workflow interactively. - - -Automatically run workflows : HOOK_WORKFLOW -------------------------------------------- -.. _hook_workflow: -.. topic:: HOOK_WORKFLOW - -With the keyword :code:`HOOK_WORKFLOW` you can configure workflow -'hooks'; meaning workflows which will be run automatically at certain -points during ERTs execution. Currently there are two points in ERTs -flow of execution where you can hook in a workflow, either just before -the simulations start, :code:`PRE_SIMULATION` - or after all the -simulations have completed :code:`POST_SIMULATION`. The -:code:`POST_SIMULATION` hook is typically used to trigger QC -workflows: - -:: - - HOOK_WORKFLOW initWFLOW PRE_SIMULATION - HOOK_WORKFLOW QC_WFLOW1 POST_SIMULATION - HOOK_WORKFLOW QC_WFLOW2 POST_SIMULATION - -In this example the the workflow :code:`initWFLOW` will run after all -the simulation directiories have been created, just before the forward -model is submitted to the queue. When all the simulations are complete -the two workflows :code:`QC_WFLOW1` and :code:`QC_WFLOW2` will be -run. Observe that the workflows being 'hooked in' with the -:code:`HOOK_WORKFLOW` must be loaded with the :code:`LOAD_WORKFLOW` -keyword. - - - -Locating the realisations: ------------------------------------------ - -Context must be passed between the main ERT process and the script -through the use of string substitution, in particular the 'magic' key - has been introduced for this purpose. - -Many of the external workflow jobs involve looping over all the -realisations in a construction like this: - -:: - - for each realisation: - // Do something for realisation - summarize() - -When running an external job in a workflow there is no direct transfer -of information between the main ERT process and the external -script. We therefor must have a convention for transfering the -information of which realisations we have simulated on, and where they -are located in the filesystem. This is done through a file which looks -like this: - -:: - - 0 /path/to/real0 CASE_0000 - 1 /path/to/real1 CASE_0001 - ... - 9 /path/to/real9 CASE_0009 - -The name and location of this file is available as the magical string - and that is typically used as the first argument to -external workflow jobs which should iterate over all realisations. The -realisations referred to in the are meant to be last -simulations you have run; the file is updated every time you run -simulations. This implies that it is (currently) not so convenient to -alter which directories should be used when running a workflow. - - - diff --git a/ThirdParty/Ert/etc-example/ERT/Scripts/job_dispatch.py b/ThirdParty/Ert/etc-example/ERT/Scripts/job_dispatch.py deleted file mode 100644 index 147c6ad409..0000000000 --- a/ThirdParty/Ert/etc-example/ERT/Scripts/job_dispatch.py +++ /dev/null @@ -1,308 +0,0 @@ -#!/usr/bin/python -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file 'job_dispatch.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - - -import sys -import os -import os.path -import socket -import time -import random - - -OK_file = "OK" -EXIT_file = "EXIT" -STATUS_file = "STATUS" -run_path = sys.argv[1] -sleep_time = 10 # Time to sleep before exiting the script - to let the disks sync up. -short_sleep = 2 - -################################################################# - -def redirect(file , fd , open_mode): - new_fd = os.open(file , open_mode , 0644) - os.dup2(new_fd , fd) - os.close(new_fd) - - -def cond_symlink(target , src): - if not os.path.exists(src): - os.symlink( target , src ) - - -def cond_unlink(file): - if os.path.exists(file): - os.unlink(file) - - - -def exec_job(job , executable): - if job["stdin"]: - redirect(job["stdin"] , 0 , os.O_RDONLY) - - if job["stdout"]: - redirect(job["stdout"] , 1 , os.O_WRONLY | os.O_TRUNC | os.O_CREAT ) - - if job["stderr"]: - redirect(job["stderr"] , 2 , os.O_WRONLY | os.O_TRUNC | os.O_CREAT ) - - if job["environment"]: - env = job["environment"] - for key in env.keys(): - os.putenv(key , env[key]) - os.execvp(executable , [executable] + job["argList"]) - - - -def unlink_empty(file): - if os.path.exists(file): - st = os.stat( file ) - if st.st_size == 0: - os.unlink( file ) - - - -def cleanup( job ): - if job["stdout"]: - unlink_empty( job["stdout"] ) - if job["stderr"]: - unlink_empty( job["stderr"] ) - - if job["license_link"]: - os.unlink(job["license_link"]) - - - -# This function implements a simple "personal license" system limiting -# how many instances of this job can run concurrently. Observe that the -# limiting is based on pr. invocation of the queue system (i.e. ERT -# binary) and pr user. The system works as follows: -# -# 1. The job is initilized with a license_path and a max_running -# variable. -# -# 2. In the licens_path directory a license file is made. -# -# 3. For each instance a random hard-link is created to the license -# file - this is how the number of concurrent uses is counted. -# -# 4. When the external program is finished the hard link is removed. - - -def license_check( job ): - job["license_link"] = None - if job.has_key("max_running"): - if job["max_running"]: - job["license_file"] = "%s/%s" % (job["license_path"] , job["name"]) - max_running = job["max_running"] - license_file = job["license_file"] - while True: - job["license_link"] = "%s/%d" % (job["license_path"] , random.randint(100000,999999)) - if not os.path.exists(job["license_link"]): - break - - - if not os.path.exists(license_file): - fileH = open(license_file , "w") - fileH.write("This is a license file for job:%s" % job["name"]) - fileH.close() - - - stat_info = os.stat(license_file) - currently_running = stat_info[3] - 1 - - while True: - stat_info = os.stat(license_file) - currently_running = stat_info[3] - 1 - if currently_running < max_running: - break - else: - time.sleep(5) - - os.link(license_file , job["license_link"]) - - while True: - stat_info = os.stat(license_file) - currently_running = stat_info[3] - 1 - if currently_running <= max_running: - break # OK - now we can leave the building - and let the job start - else: - time.sleep(5) - - -# Compatibility mode which must be retained until all ert prior to -# svn 2709 has been removed. - -def get_executable( job ): - executable = job.get("executable") - if not executable: - executable = job.get("portable_exe") - if not executable: - cpu = os.uname()[4] - if job["platform_exe"].has_key(cpu): - executable = job["platform_exe"][cpu] - else: - return (False, 0 , "%s : did not recognize platform:%s" % (job["name"] , cpu)) - - return executable - - - -def run_one(job): - license_check( job ) - if job["stdin"]: - if not os.path.exists(job["stdin"]): - return (False , 0 , "Could not locate stdin file: %s" % job["stdin"]) - - if job["start_file"]: - if not os.path.exists(job["start_file"]): - return (False , -1 , "Could not locate start_file:%s" % job["start_file"]) - - - - executable = get_executable( job ) - start_time = time.time() - pid = os.fork() - if pid == 0: - exec_job(job , executable) - else: - if job["max_running_minutes"]: - proc_path = "/proc/%d" % pid - # There is max run time on the job. - while True: - time.sleep( short_sleep ) - if os.path.exists( proc_path ): # Checking if the - run_time = time.time() - start_time - if run_time > (60 * job["max_running_minutes"]): - return (False , 0 , "Run time of %d minutes exceeded for job:%s" % ( job["max_running_minutes"] , job["name"])) - else: - break # The job is no longer running - - else: - (return_pid , exit_status) = os.waitpid(pid , 0) - - - if job["target_file"]: - if os.path.exists(job["target_file"]): - stat = os.stat(job["target_file"]) - if stat.st_ctime > start_time: - cleanup(job) - return (True , 0 , "") - else: - cleanup(job) - return (True , 0 , "Hmmm - seems the target file has not been updated - let the job suceed anyway...??") - else: - cleanup(job) - return (False , exit_status , "%s : could not find target_file:%s" % (job["name"] , job["target_file"])) - else: - cleanup(job) - return (True , exit_status , "Target file not speced") # Do not really look at exit status yet... - - - -################################################################# - -################################################################# - -os.nice(19) -if not os.path.exists( run_path ): - sys.stderr.write("*****************************************************************\n"); - sys.stderr.write("** FATAL Error: Could not find dirctory: %s \n" % run_path) - sys.stderr.write("** CWD: %s\n" % os.getcwd()) - sys.stderr.write("*****************************************************************\n"); - - fileH = open(EXIT_file , "w") - fileH.write("Could not locate:%s " % run_path) - fileH.write("CWD: %s" % os.getcwd()) - fileH.close() - sys.exit(-1) - -os.chdir( run_path ) -cond_unlink(EXIT_file) -cond_unlink(STATUS_file) -cond_unlink(OK_file) -fileH = open(STATUS_file , "a") -fileH.write("%-40s: %s/%s\n" % ("Current host:" , socket.gethostname() , os.uname()[4])) -fileH.close() - -sys.path.append( os.getcwd() ) -import jobs -random.seed() - -for job in jobs.jobList: - # To ensure compatibility with old versions. - if not job.has_key("max_running_minutes"): - job["max_running_minutes"] = None - -if len(sys.argv) == 2: - # Normal batch run. - for job in jobs.jobList: - fileH = open(STATUS_file , "a") - now = time.localtime() - fileH.write("%-32s: %02d:%02d:%02d .... " % (job["name"] , now.tm_hour , now.tm_min , now.tm_sec)) - fileH.close() - (OK , exit_status, error_msg) = run_one(job) - now = time.localtime() - if OK: - fileH = open(STATUS_file , "a") - fileH.write("%02d:%02d:%02d \n" % (now.tm_hour , now.tm_min , now.tm_sec)) - fileH.close() - else: - fileH = open(EXIT_file , "w") - fileH.write("%02d:%02d:%02d \n" % (now.tm_hour , now.tm_min , now.tm_sec)) - fileH.write("%s : failed\n" % job["name"]) - fileH.write("%s\n" % error_msg) - fileH.close() - sys.exit(exit_status) - - - if OK: - fileH = open("OK" , "w") - fileH.write("All jobs complete") - fileH.close() - time.sleep( sleep_time ) # Let the disks sync up -else: - #Interactive run - jobHash = {} - for job in jobs.jobList: - jobHash[job["name"]] = job - - for job_name in sys.argv[2:]: - if jobHash.has_key( job_name ): - job = jobHash[job_name] - print "Running job: %s ... " % job_name, - sys.stdout.flush() - (OK , exit_status, error_msg) = run_one( job ) - if OK: - print "OK" - else: - print "failed ...." - print "-----------------------------------------------------------------" - if job["stderr"]: - print "Error:%s " % error_msg - if os.path.exists(job["stderr"]): - fileH = open(job["stderr"],"r") - for line in fileH.readlines(): - print line, - fileH.close() - print "-----------------------------------------------------------------" - sys.exit() - else: - print "Job: %s does not exist. Available jobs:" % job_name - for j in jobs.jobList: - print " %s" % j["name"] - diff --git a/ThirdParty/Ert/etc-example/ERT/Scripts/run_RMS_20xx b/ThirdParty/Ert/etc-example/ERT/Scripts/run_RMS_20xx deleted file mode 100644 index 0fb8b6d027..0000000000 --- a/ThirdParty/Ert/etc-example/ERT/Scripts/run_RMS_20xx +++ /dev/null @@ -1,394 +0,0 @@ -#!/usr/bin/python -import sys -import os -import re -import random -import time - -if os.path.exists( "dot_master.py" ): - sys.path += [ os.getcwd() ] - import dot_master -else: - dot_master = None - -dot_master_fmt = "%-39s = %s\n" -error_file = "RMS_20XX_ERRORS_" -multi_seed_file = "random.seeds" - - -################################################################## -# -# The purpose of this script is to run a per-instance RMS workflow in -# batch from eg ERT. The script expects the following input as arguments -# on the commandline -# -# : The path to where the simulation should run. Directory -# must exist. -# -# : An integer saying which realiziton number this is. -# -# : This is a string which indicates which RMS version -# should be run. The allowed versions are the keys in -# the dictionary rms_version_table below, there should -# be no problems adding more versions to this table. -# -# : This is the (full) path to the source RMS project. -# -# -# : The absolute path (set in the RMS project) part which -# should be replaced with the current directory. -# -# : This is the name of the workflow we want to run. -# -# : This is the name of the workflow we want to run. -# -# : This is the name of the workflow we want to run. -# -# -# Example: -# -# bash% run_RMS_20xx.py 0 2009.3 /d/MyField/models/rms/geomodel.pro /OLDPATH WorkFlow1 WorkFlow2 ... -# -# The script works as follows: -# -# 1. The first commandline argument is the runpath of the script, and -# it will start by chdir() there. -# -# -# 2. The script recursively walks through the original project -# directory, and does the following: -# -# a) All directories found in the original project are created -# in the copy project, thus creating a empty project -# skeleton. -# If a non-directory entry with the same name is found in the -# copy project the script will exit (this is maybe a bit over -# the top strict??) -# -# b) For files in the source directory the script will do the -# following: -# -# o If the name of the file is ".master" the script will -# _copy_ the file from the source project to the copy -# project, and on the way it will perform the string -# substitutions asked for. -# -# or -# -# o If a file with this name already exists in the target -# project nothing will be done. -# -# else -# -# o A symlink will be created from the copy project to the -# original source project. -# -# -# 3. The lockfiles "project-lock-file" and ".lock" are removed. -# -# -# 4. The program loops as follows: -# o Updating the global seed (incrementing by one with each subsequent iteration). -# o Running the rms binary for each workflow. -# -# -# Observe that this script has no explicit built in support for -# per-instance files (i.e. IPL scripts). The way that is meant to be -# solved is that an external program writes those files to the target -# project (creating necessary directories on the way) prior to calling -# this script. -# -################################################################ - - -rms_license_file = "/prog/roxar/licensing/geomaticLM.lic" - - -rms_version_table = {"2010.1.1" : "/PATH/RMS/2010.1.1/linux-amd64-gcc_3_4-release/bin/rms", - "2010" : "/PATH/RMS/2010/linux-amd64-gcc_3_2-release/bin/rms", - "2009" : "/PATH/RMS/2009/linux-amd64-gcc_3_2-release/bin/rms", - "2009.2" : "/PATH/RMS/2009.2/linux-amd64-gcc_3_2-release/bin/rms", - "2009.3" : "/PATH/RMS/2009.3/linux-amd64-gcc_3_2-release/bin/rms", - "9.0.7.4" : "/PATH/RMS/9.0.7.4/linux-amd64-gcc_3_2-release/bin/rms"} - - - -# This function will write the error message on both "RMS_20XX_ERRORS_" and -# stderr, and then exit. -def fatal_error( msg ): - fileH = open(error_file , "w") - fileH.write( msg ) - fileH.close() - - sys.exit( msg ) - - -# This function will copy the file @src_entry to the file -# @target_entry, and on the way it will perform two different string -# substitutions. The .master file is organized like a key value list: -# -# key1 = Value1 -# key2 = Value2 -# ...... -# -# The input argument @value_subst is a list of tuples, where each -# occurence of the first element in the tuple is replaced with the -# second element in the tuple. -# -# The input argument @set_list is a dictionary, if the key in the -# .master file is in the @set_list dictionary the value in the .master -# will be replaced with the value in the set_List dictionary. - -def copy_dot_master( src_entry , target_entry , subst_list , set_list): - print "Copying %s -> %s" % (src_entry , target_entry) - if os.path.exists( target_entry ): - os.unlink( target_entry ) - - srcH = open( src_entry , "r") - targetH = open( target_entry , "w") - - for line in srcH.readlines(): - for (old , new) in subst_list: - line = line.replace( old , new ) - - tmp = re.split( "\s*=\s*" , line) - key = tmp[0] - if set_list.has_key( key) : - targetH.write( dot_master_fmt % (key , set_list[key])) - else: - targetH.write( line ) - - srcH.close() - targetH.close() - - - - -def create_project_directory( arg_dict , path , entries ): - offset = arg_dict["offset"] - target_root = arg_dict["target_root"] - src_path = arg_dict["src_path"] - subst = arg_dict["subst_list"] - set_list = arg_dict["set_list"] - - newpath = "%s/%s" % ( target_root , path[offset:] ) - - #Creating all the directories of the project - if not os.path.exists( newpath ): - os.makedirs( newpath ) - else: - if os.path.islink( newpath ): - fatal_error("Entry:%s already exists as a symbolic link. Clean up first..." % newpath) - - if not os.path.isdir( newpath ): - fatal_error("Entry:%s already exists - and it is not a directory. Clean up first..." % newpath) - - # Linking in all the files - for entry in entries: - src_entry = "%s/%s" % (path , entry) - if os.path.isfile( src_entry ): - target_entry = "%s/%s" % (newpath , entry) - if entry == ".master": - copy_dot_master( src_entry , target_entry , subst , set_list) - else: - if not os.path.exists( target_entry ): - os.symlink( src_entry , target_entry ) - - - - - -# This function duplicate the directory structure of the project -# located in src_path. The newly created project will be created in -# the current directory. All files are symlinked. - -def create_project_directories( src_path , project , target_path , subst_list , set_list): - src_project = os.path.join( src_path , project ) - arg_dict = {"offset" : len(src_path) , - "target_root": target_path , - "src_path" : src_path , - "subst_list" : subst_list , - "set_list" : set_list} - print "Creating all project directories: %s/%s" % (arg_dict["target_root"] , project ) - os.path.walk( src_project , create_project_directory , arg_dict) - print "Setting up RMS project complete." - - -################################################################# -# This function will update the seed in the master_file. The function -# will update the following lines in the master_file: -# -# global_seed = 12345678 -# seeds(n) = 09999999 -# -# All the lines will be updated with the __same_seed__. This function is -# only called once, with the root level .master file as argument, if -# there are other random seeds around they are not touched. -# -# -# What seed to use: -# ----------------- -# -# There are three different systems for choosing seed to use; the three -# methods are tried out in the following order: -# -# 1. If the file "RMS_SEED" exists in current working directory the -# script will use the value found in that file as seed. -# -# 2. If the file random.seeds exists the script will use integer -# nr @iens as seed. The format of the @multi_seed_file is just a -# list of integer, each on a separate line. The first integer should be the number of seeds -# -# 3. If neither of the seed files exist the script will use -# /dev/urandom to initialize the python rng, and then -# random.randint() to get a seed. -# -# The seed which is actually used in the end is appended to the file -# RMS_SEED_USED. Observe that for both the files RMS_SEED and -# @multi_seed_file the format "better" be right - the script will fail -# hard if these files are not formatted correctly. - - -def get_seed( target_path , project , iens): - single_seed_file = "%s/RMS_SEED" % target_path - if os.path.exists( single_seed_file ): - # Using existing single seed file - fileH = open( single_seed_file , "r" ) - new_seed = int( fileH.readline( ) ) - fileH.close() - elif os.path.exists( multi_seed_file ): - fileH = open( multi_seed_file , "r") - seed_list = [ int(x) for x in fileH.readlines() ] - fileH.close() - if seed_list[0] <= iens: - fatal_error("Asking for seed:%d seed_file:%s only has %d seeds\n" % (iens , multi_seed_file , seed_list[0])) - new_seed = seed_list[iens + 1] - else: - # Generate a seed from /dev/urandom - fileH = open( "/dev/urandom" , "r") - buffer = fileH.read( 64 ) - fileH.close() - random.seed( buffer ) - new_seed = random.randint( 0 , 21047483000 ) - - fileH = open("%s/RMS_SEED_USED" % target_path , "a+") - fileH.write("%s ... %d\n" % (time.strftime("%d-%m-%Y %H:%M:%S" , time.localtime(time.time())) , new_seed)) - fileH.close() - return new_seed - - -def set_seed( seed ): - master_file = "%s/%s/.master" % ( target_path , project ) - if not os.path.exists( master_file ): - fatal_error("Could not find rms master file: %s - seems like a broken project" % master_file ) - - fileH = open(master_file , "r") - linelist = fileH.readlines() - fileH.close() - - fileH = open( master_file , "w" ) - for line in linelist: - line = re.sub("^global_seed\s+=\s+\d+" , "global_seed = %d" % seed , line) - line = re.sub("^seeds\((\d+)\)\s+=\s+\d+" , "seeds(\1) = %d" % seed , line) - fileH.write( line ) - fileH.close() - - -################################################################# - -def init( arglist ): - if len(arglist) < 7: - msg = """ -The run_RMS_20xx script needs the following arguments -\n cwd iens rms_version path_to_project replace_path workflow1 | workflow2 workflow3 ... - -The available rms_versions are:%s -""" % rms_version_table.keys() - fatal_error( msg ) - - cwd = sys.argv[1] - iens = int( sys.argv[2] ) - - rms_version = sys.argv[3] - if rms_version_table.has_key( rms_version ): - rms_executable = rms_version_table[ rms_version ] - else: - fatal_error("Sorry: rms_version:%s not recognized - available:%s" % ( rms_version , rms_version_table.keys())) - - - src_project = arglist[4] - if os.path.exists( src_project ): - if os.path.isdir( src_project ): - (src_path , project) = os.path.split( src_project ) - else: - fatal_error("Fatal error - %s is not a directory" % src_project) - else: - fatal_error("Fatal error - project:%s does not exist" % src_project) - - replace_path = sys.argv[5] - - rms_workflows = sys.argv[6:] - - return (cwd , iens , rms_executable , src_path , project , replace_path , rms_workflows ) - - -################################################################# - - - -def unlink_lockfiles( project ): - lock_file1 = "%s/.lock" % project - if os.path.exists( lock_file1 ): - os.unlink( lock_file1 ) - - lock_file2 = "%s/project_lock_file" % project - if os.path.exists( lock_file2 ): - os.unlink( lock_file2 ) - - - -################################################################# - -def run_rms( rms_executable , project , workflow ): - os.environ["LM_LICENSE_FILE"] = rms_license_file - cmd = "%s -nomesa -project %s -batch %s" % ( rms_executable , project , workflow ) - print "Starting rms with command: \"%s\"" % cmd - os.system( cmd ) - print "RMS run is complete" - - - -################################################################# -################################################################# -# Main program starting: - -(target_path , iens , rms_executable , src_path , project , replace_path , rms_workflows) = init( sys.argv ) -if os.path.exists( target_path ): - os.chdir( target_path ) -else: - fatal_error("Directory:%s does not exist \n" % target_path ) - -subst_list = [(replace_path , target_path)] - -# If the dot_master module is present we ignore the replace_path commandline argument -if dot_master: - subst_list = dot_master.subst_list - set_list = dot_master.set_list -else: - set_list = {} - -create_project_directories( src_path , project , target_path , subst_list , set_list) -unlink_lockfiles( project ) -global_seed = get_seed( target_path , project , iens) -for workflow in rms_workflows: - set_seed( global_seed ) - run_rms( rms_executable , project , workflow ) - global_seed += 1 - - - - - - - - diff --git a/ThirdParty/Ert/etc-example/ERT/Scripts/run_eclipse.py b/ThirdParty/Ert/etc-example/ERT/Scripts/run_eclipse.py deleted file mode 100644 index c1ceb59ee6..0000000000 --- a/ThirdParty/Ert/etc-example/ERT/Scripts/run_eclipse.py +++ /dev/null @@ -1,228 +0,0 @@ -#!/usr/bin/python -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file 'run_eclipse.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - - -import os -import sys -import socket -################################################################# -# -# This is a small script used to run ECLIPSE simulations from ERT. The -# script will set up some environment variables, initialize file -# descriptors and then exec() to the ECLIPSE executable (or to mpirun in -# the case of parallell simulations). -# -# The script expects three commandline arguments: -# -# run_eclipse.py version eclipse_name -# -# The @version argument is one of the keys in the the dictionary -# version_table, below. @num_cpu is optional, it will default to one if -# not set. -# -# -################################################################# - - -# The first element in the tuple is the single CPU version to use, and -# the second element is the MPI version to use. - -version_table = {"2007.1" : ("/PATH/ECLIPSE/2007.1/bin/linux_x86_64/eclipse.exe" , "/PATH/ECLIPSE/2007.1/bin/linux_x86_64/eclipse_scampi.exe"), - "2007.2" : ("/PATH/ECLIPSE/2007.2/bin/linux_x86_64/eclipse.exe" , "/PATH/ECLIPSE/2007.2/bin/linux_x86_64/eclipse_scampi.exe"), - "2008.1" : ("/PATH/ECLIPSE/2008.1/bin/linux_x86_64/eclipse.exe" , "/PATH/ECLIPSE/2008.1/bin/linux_x86_64/eclipse_scampi.exe"), - "2008.2" : ("/PATH/ECLIPSE/2008.2/bin/linux_x86_64/eclipse.exe" , "/PATH/ECLIPSE/2008.2/bin/linux_x86_64/eclipse_scampi.exe"), - "2009.1" : ("/PATH/ECLIPSE/2009.1/bin/linux_x86_64/eclipse.exe" , "/PATH/ECLIPSE/2009.1/bin/linux_x86_64/eclipse_scampi.exe"), - "2009.2" : ("/PATH/ECLIPSE/2009.2/bin/linux_x86_64/eclipse.exe" , "/PATH/ECLIPSE/2009.2/bin/linux_x86_64/eclipse_scampi.exe")} - -scali_path = "/opt/scali" -ecldir = "/PATH/ECLIPSE" - -mpirun = "%s/bin/mpirun" % scali_path -config_file = "%s/macros/CONFIG.ECL" % ecldir - -config_link = "ECL.CFG" -env_variables = {"F_UFMTENDIAN" : "big", - "LM_LICENSE_FILE" : "flexlm.server.com" } - -max_cpu_sec = 10000000 -max_wall_sec = 99999999 - -stdin_file = "eclipse.stdin" -stdout_file = "eclipse.stdout" -stderr_file = "eclipse.stderr" - -# End of configuration options -################################################################# - - -# Will take a version string as input, and return the path to the -# executable file. If num_cpu == 1 it will return the serial version, -# whereas the Scali MPI version will be used if num_cpu > 1. -# -# If the @version input argument can not be found in the version_table -# dictionary, or the corresponding file does not exist, the function -# will fail with a fatal error. -def get_executable( version , num_cpu ): - t = version_table.get( version , None ) - if t: - if num_cpu == 1: - executable = t[0] - else: - executable = t[1] - else: - fatal_error("Eclipse version:\'%s\' not recognized. Available versions:%s" % (version , version_table.keys())) - - if not os.path.exists( executable ): - fatal_error("The executable:%s could not be found" % executable) - - return executable - - - - -def init_mpi( base_name , num_cpu ): - # Before the SCALI MPI executable can run we must update the path by prepending - # ECL_SCALI_LOC/bin and ECL_SCALI_LOC/lib64 to the $PATH and $LD_LIBRARY_PATH - # environment variables. - - env_variables["PATH"] = "%s/bin:%s" % ( scali_path , os.getenv("PATH")) - env_variables["LD_LIBRARY_PATH"] = "%s/lib64:%s" % ( scali_path , os.getenv("LD_LIBRARY_PATH")) - machine_list = [] - - - # If the environment variable LSB_HOSTS is set we assume the job is - # running on LSF - otherwise we assume it is running on the current host. - # - # If the LSB_HOSTS variable is indeed set it will be a string like this: - # - # host1 host1 host2 host3 - # - # i.e. each processs is listed with one hostname entry (i.e. NOT - # the :num_proc syntax which is used in LSB_MCPU_HOSTS variable. - - machine_file = "%s.mpi" % base_name - fileH = open( machine_file , "w") - - LSB_HOSTS = os.getenv("LSB_HOSTS") - if LSB_HOSTS: - for host in LSB_HOSTS.split(): - fileH.write("%s\n" % host) - else: - localhost = socket.gethostname() - for i in (range(num_cpu)): - fileH.write("%s\n" % localhost) - - fileH.close() - return machine_file - - - -def fatal_error( msg ): - fileH = open( stderr_file , "w") - fileH.write( msg ) - fileH.close() - sys.exit() - - - -def init_fd( base_name ): - # Creating a stupid input file which is connected to stdin - fileH = open(stdin_file , "w") - fileH.write("%s\n" % base_name); - fileH.write("%s\n" % base_name); - fileH.write("%d\n" % max_cpu_sec); - fileH.write("%d\n\n" % max_wall_sec); - fileH.close() - - # Redirecting stdin / stdout / stderr - fd_stdin = os.open(stdin_file , os.O_RDONLY , 0644) - fd_stdout = os.open(stdout_file , os.O_WRONLY | os.O_TRUNC | os.O_CREAT , 0644); - fd_stderr = os.open(stderr_file , os.O_WRONLY | os.O_TRUNC | os.O_CREAT , 0644); - - os.dup2(fd_stdin , 0) - os.dup2(fd_stdout , 1) - os.dup2(fd_stderr , 2) - - os.close(fd_stdin) - os.close(fd_stdout) - os.close(fd_stderr) - - - -def init_path( base_name ): - smspec_file = "%s.SMSPEC" % base_name - fsmspec_file = "%s.FSMSPEC" % base_name - - if os.path.exists( smspec_file ): - os.unlink( smspec_file ); - - if os.path.exists( fsmspec_file ): - os.unlink( fsmspec_file ); - - if not os.path.exists( config_link ): - os.symlink( config_file , config_link ) - - -def exec_single(executable , env_variables): - os.execve(executable , [ executable ] , env_variables) - - -def exec_mpi(executable , base_name , num_cpu , env_variables): - machine_file = init_mpi( base_name , num_cpu ) - os.execve( mpirun , [mpirun , "-np" , "%s" % num_cpu , "-machinefile" , machine_file , executable , base_name ] , env_variables) - - -################################################################# -# Main program starts. - -if len(sys.argv) < 3 or len(sys.argv) > 4: - fatal_error("The run_eclipse script needs two/three arguments: eclipse_version eclipse_base [num_cpu]") - - -version = sys.argv[1] -(run_path , file) = os.path.split( sys.argv[2] ) -(base_name , ext ) = os.path.splitext( file ) -if run_path: - try: - os.chdir( run_path ) - except: - fatal_error("The run_eclipse script could not change to directory:%s" % run_path) - -if len(sys.argv) == 4: - - # Must support older (svn version before ~ 2844) versions of ERT - # which do not provide a value for the the argument, so - # in this case the run_eclipse.py script will just get the string - # "", we catch the ValueError when converting to int, and - # use the default value num_cpu = 1. - - try: - num_cpu = int( sys.argv[3] ) - except ValueError: - num_cpu = 1 -else: - num_cpu = 1 - -executable = get_executable(version , num_cpu) -init_path( base_name ) -init_fd( base_name ) -if num_cpu == 1: - exec_single( executable , env_variables) -else: - exec_mpi( executable , base_name , num_cpu , env_variables ) - - diff --git a/ThirdParty/Ert/etc-example/ERT/jobs/ECLIPSE b/ThirdParty/Ert/etc-example/ERT/jobs/ECLIPSE deleted file mode 100644 index 5620171d37..0000000000 --- a/ThirdParty/Ert/etc-example/ERT/jobs/ECLIPSE +++ /dev/null @@ -1,3 +0,0 @@ -PORTABLE_EXE ../Scripts/run_eclipse.py -TARGET_FILE -ARGLIST diff --git a/ThirdParty/Ert/etc-example/ERT/jobs/ECLIPSE100_2009.2 b/ThirdParty/Ert/etc-example/ERT/jobs/ECLIPSE100_2009.2 deleted file mode 100644 index 79f5137a0c..0000000000 --- a/ThirdParty/Ert/etc-example/ERT/jobs/ECLIPSE100_2009.2 +++ /dev/null @@ -1,3 +0,0 @@ -PORTABLE_EXE ../Scripts/run_eclipse.py -TARGET_FILE -ARGLIST 2009.2 diff --git a/ThirdParty/Ert/etc-example/ERT/jobs/ECLIPSE100_2009.2_NOTARGET b/ThirdParty/Ert/etc-example/ERT/jobs/ECLIPSE100_2009.2_NOTARGET deleted file mode 100644 index a6d4718354..0000000000 --- a/ThirdParty/Ert/etc-example/ERT/jobs/ECLIPSE100_2009.2_NOTARGET +++ /dev/null @@ -1,2 +0,0 @@ -PORTABLE_EXE ../Scripts/run_eclipse.py -ARGLIST 2009.2 diff --git a/ThirdParty/Ert/etc-example/ERT/jobs/RUN_RMS_20XX b/ThirdParty/Ert/etc-example/ERT/jobs/RUN_RMS_20XX deleted file mode 100644 index 2870b39abd..0000000000 --- a/ThirdParty/Ert/etc-example/ERT/jobs/RUN_RMS_20XX +++ /dev/null @@ -1,8 +0,0 @@ -STDERR rms.stderr -STDOUT rms.stdout - -PORTABLE_EXE /project/res/etc/ERT/Scripts/run_RMS_20xx --- RMS_PROJECT should be the full path to the rms project -ARGLIST /ROXAR -TARGET_FILE -ENV LM_LICENSE_FILE /prog/roxar/licensing/geomaticLM.lic diff --git a/ThirdParty/Ert/etc-example/ERT/site-config b/ThirdParty/Ert/etc-example/ERT/site-config deleted file mode 100644 index a4a979f65f..0000000000 --- a/ThirdParty/Ert/etc-example/ERT/site-config +++ /dev/null @@ -1,79 +0,0 @@ --- This file is an example of site-wide configuration file for --- ERT. Observe that the user can override/add to everything which is set --- in this file in her per-project configuration file. Observe that --- prior to parsing this file ERT will issue a chdir() system call to --- the location of this file, i.e. you can safely use paths relative --- to the location of this file. - - --- Setting configuration information about the LSF system: -LSF_QUEUE normal -MAX_RUNNING_LSF 20 -LSF_RESOURCES select[cs && x86_64Linux] rusage[ecl100v2000=1:duration=5] - - --- Setting configuration information for running with rsh/ssh between --- workstations. Observe that to actually use this option the user --- must in addition specify which workstations to use in her project --- specific configuration file like: --- RSH_HOST_LIST host1:2 host2:4 host3:4 --- Which will run up to two jobs on 'host1' and four jobs on 'host2' --- and 'host3'; in addition it is essential to have passwordless login --- to the hosts 'hostx'. -MAX_RUNNING_RSH 100 -- You will never get more than the hosts allow anyway. -RSH_COMMAND /usr/bin/ssh - - --- Configuration for running the local workstation: -MAX_RUNNING_LOCAL 4 - - --- Which queue system will we use? -QUEUE_SYSTEM LSF - --- How many times will we submit a job before failing it. Setting this --- to two means first one submit, and then one more. -MAX_SUBMIT 2 - --- Not related to the conventional idea of a license - forget about it .... -LICENSE_PATH license - - --- The script used to run through the jobs in the forward model - a --- very important script. -JOB_SCRIPT Scripts/job_dispatch.py - - --- Installing a couple of jobs. A site will typically have a much --- longer list of available jobs. The arguments of the INSTALL_JOB --- command are first the short name of the job, which will be used --- to refer to the job when setting up the forward, and secondly a --- file with more details on how to run this job. Each of these files --- are used to populate on instance of ext_job_type which is --- implemented in libjob_queue/src/ext_job.c. -INSTALL_JOB RUN_RMS_20XX Config/jobs/RUN_RMS_20XX -INSTALL_JOB ECLIPSE100 Config/jobs/ECLIPSE100 -INSTALL_JOB ECLIPSE100_2009.2 Config/jobs/ECLIPSE100_2009.2 -INSTALL_JOB ECLIPSE100_2009.2_NOTARGET Config/jobs/ECLIPSE100_2009.2_NOTARGET - - - --- You can set environment variables with the SETENV command. The --- SETENV command understands $VAR, so you can also update variables. - --- The LSF variables must be set for LSF to work, this is similar to --- sourcing a LSF configuration file. -SETENV LSF_BINDIR /LSF_PATH/bin -SETENV LSF_LIBDIR /LSF_PATH/lib -SETENV XLSF_UIDDIR /LSF_PATH/lib/uid -SETENV LSF_SERVERDIR /LSF_PATH/etc -SETENV LSF_ENVDIR /LS_PATH/conf - --- In addition to SETENV you can also use UPDATE_PATH to update ':' --- separated path related environment variables. UPDATE_PATH will --- prepend the existing value of PATH with the new value. - -UPDATE_PATH PATH /funky/path/bin -SETENV LD_LIBRARY_PATH /funky/path/lib:$LD_LIBRARY_PATH - - diff --git a/ThirdParty/Ert/etc-example/README b/ThirdParty/Ert/etc-example/README deleted file mode 100644 index 9c12ddd5e2..0000000000 --- a/ThirdParty/Ert/etc-example/README +++ /dev/null @@ -1,42 +0,0 @@ -This directory contains some example configuration files / scripts for -ERT. This directory should typically be installed in shared location -where it is readably for everyone. The files/directories are: - -ERT/site-config ---------------- -This is the shared configuration file for all ERT users. - - -ERT/Scripts ------------ -This is a collection of scripts. These are: - - o ERT/Scripts/job_dispatch.py - the executable program started by - ERT, which again will start and run the other programs in the - forward model. A very important script; the path to this script is - set with the JOB_SCRIPT variable in the site-config file. - - o ERT/Scripts/run_eclipse.py: This a script to run ECLIPSE - nothing - special about this. If you want to use this script, you must at the - very least update the paths to the ECLIPSE binary. - - o ERT/Scripts/run_RMS_20xx: A script to run version 20xx of - RMS. Observe that this script is specifically designed to work - around a bug with exporting RMS datasets to a relative path; that - bug is now fixed in RMS. - - -ERT/jobs/*** -------------- -The files in directory ERT/jobs are job-description files which are -used to 'install' jobs into ERT. The directory ERT/jobs/ contains -small config files to install three different ECLIPSE jobs. (Make the -effort and understand the difference between ECLIPSE100_2009.2 and -ECLIPSE100_2009.2_NOTARGET, this will serve you well when debugging -problems with failed jobs). - -The jobs in ERT/jobs are installed into ERT with the INSTALL_JOB -commands in the sitewide configuration file. - - - diff --git a/ThirdParty/Ert/libanalysis/CMakeLists.txt b/ThirdParty/Ert/libanalysis/CMakeLists.txt deleted file mode 100644 index 883682c544..0000000000 --- a/ThirdParty/Ert/libanalysis/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -include(cmake/ert_module.cmake) - -add_subdirectory( script ) -add_subdirectory( src ) -add_subdirectory( modules ) - -if (BUILD_TESTS) - add_subdirectory( tests ) -endif() - -if (BUILD_APPLICATIONS) - add_subdirectory( applications ) -endif() - diff --git a/ThirdParty/Ert/libanalysis/applications/CMakeLists.txt b/ThirdParty/Ert/libanalysis/applications/CMakeLists.txt deleted file mode 100644 index 48241603c4..0000000000 --- a/ThirdParty/Ert/libanalysis/applications/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ -add_executable( ert_module_test ert_module_test.c ) -target_link_libraries( ert_module_test analysis ert_util ) - -if (USE_RUNPATH) - add_runpath( ert_module_test ) -endif() - -set (destination ${CMAKE_INSTALL_PREFIX}/bin) - -install(TARGETS ert_module_test DESTINATION ${destination}) - -if (INSTALL_GROUP) - install(CODE "EXECUTE_PROCESS(COMMAND chgrp ${INSTALL_GROUP} ${destination}/ert_module_test)") - install(CODE "EXECUTE_PROCESS(COMMAND chmod g+w ${destination}/ert_module_test)") -endif() - -if (BUILD_TESTS) - ert_module_name( VAR_RML rml_enkf ${LIBRARY_OUTPUT_PATH} ) - add_test( analysis_module_test_RML ${EXECUTABLE_OUTPUT_PATH}/ert_module_test ${VAR_RML}) -endif() diff --git a/ThirdParty/Ert/libanalysis/applications/ert_module_test.c b/ThirdParty/Ert/libanalysis/applications/ert_module_test.c deleted file mode 100644 index b6ddd9be74..0000000000 --- a/ThirdParty/Ert/libanalysis/applications/ert_module_test.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'module_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include - -#include - -#include - - -int check_module( rng_type * rng , const char * lib_name ) { - analysis_module_load_status_enum load_status; - analysis_module_type * module = analysis_module_alloc_external__( rng , lib_name , false , &load_status); - if (module != NULL) { - printf("Module loaded successfully\n"); - analysis_module_free( module ); - return 0; - } else { - if (load_status == DLOPEN_FAILURE) { - printf("\ndlerror(): %s\n\n",dlerror()); - printf("The runtime linker could not open the library:%s.\n", lib_name); - printf("For the runtime linker to succesfully open your library\n"); - printf("at least one of two must be satisfied: \n\n"); - printf(" 1. You give the FULL PATH to library - including .so extension\n\n"); - printf(" 2. The path containing the library is in LD_LIBRARY_PATH.\n\n"); - printf("In addition all libraries needed by your module must be found\n"); - } else if (load_status == LOAD_SYMBOL_TABLE_NOT_FOUND) { - printf("\nThe library %s was loaded successfully, however\n",lib_name); - printf("the symbol table:\'%s\' was not found. You must make sure\n",EXTERNAL_MODULE_NAME); - printf("that the \'analysis_table_type\' structure at the bottom\n"); - printf("of the source file is named exactly: \'analysis_table\'.\n"); - printf("See documentation of \'symbol_table\' in modules.txt.\n\n"); - } - } - return 1; -} - - - -int main( int argc , char ** argv) { - exit( check_module( NULL , argv[1] ) ); -} diff --git a/ThirdParty/Ert/libanalysis/applications/main_test.c b/ThirdParty/Ert/libanalysis/applications/main_test.c deleted file mode 100644 index 7f0449909e..0000000000 --- a/ThirdParty/Ert/libanalysis/applications/main_test.c +++ /dev/null @@ -1,32 +0,0 @@ -#include -#include -#include -#include - - -int main( int argc , char ** argv) { - rng_type * rng = NULL; - if (0) - { - analysis_module_type * module = analysis_module_alloc_external( rng , "./simple_enkf.so" , "SimpleEnKF" ); - if (module != NULL) { - analysis_module_set_var( module , "FLAG" , "42" ); - analysis_module_set_var( module , "VarX" , "42.77" ); - analysis_module_free( module ); - } else - fprintf(stderr,"Hmmmm - failed to load external analysis module. \n"); - - } - - - { - analysis_module_type * module = analysis_module_alloc_internal( rng , "simple_enkf_symbol_table", "SimpleEnKF" ); - if (module != NULL) { - analysis_module_set_var( module , "FLAG" , "42" ); - analysis_module_set_var( module , "VarX" , "42.7708" ); - analysis_module_free( module ); - } else - fprintf(stderr,"Hmmmm - failed to load internal analysis module. \n"); - } - -} diff --git a/ThirdParty/Ert/libanalysis/cmake/ert_module.cmake b/ThirdParty/Ert/libanalysis/cmake/ert_module.cmake deleted file mode 100644 index db3857f401..0000000000 --- a/ThirdParty/Ert/libanalysis/cmake/ert_module.cmake +++ /dev/null @@ -1,23 +0,0 @@ -function( ert_module target args source_files ) - - set( build_file ${target}.so ) - set( depends analysis ) - set( arg_string "${target} ${args}") - separate_arguments( arg_list UNIX_COMMAND "${arg_string}") - foreach (src_file ${source_files} ) - list(APPEND arg_list ${CMAKE_CURRENT_SOURCE_DIR}/${src_file} ) - list(APPEND depends ${CMAKE_CURRENT_SOURCE_DIR}/${src_file} ) - endforeach() - - add_custom_command( - OUTPUT ${build_file} - COMMAND ${PROJECT_SOURCE_DIR}/libanalysis/script/ert_module - ARGS ${arg_list} - DEPENDS ${depends}) - - install(FILES ${build_file} DESTINATION ${CMAKE_INSTALL_LIBDIR}) - - get_filename_component( module ${target} NAME ) - add_custom_target( ${module} ALL DEPENDS ${build_file} ) - -endfunction() diff --git a/ThirdParty/Ert/libanalysis/include/ert/analysis/analysis_module.h b/ThirdParty/Ert/libanalysis/include/ert/analysis/analysis_module.h deleted file mode 100644 index a20937786f..0000000000 --- a/ThirdParty/Ert/libanalysis/include/ert/analysis/analysis_module.h +++ /dev/null @@ -1,134 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'analysis_module.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ANALYSIS_MODULE_H -#define ERT_ANALYSIS_MODULE_H -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -#include - -/* - These are option flag values which are used by the core ert code to - query the module of it's needs and capabilities. For instance to to - determine whether the data should be scaled prior to analysis the - core code will issue the call: - - if (analysis_module_get_option( module, ANALYSIS_SCALE_DATA)) - obs_data_scale( obs_data , S , E , D , R , dObs ); - - It is the responsability of the module to set the various flags. -*/ - - -typedef enum { - ANALYSIS_NEED_ED = 1, - ANALYSIS_USE_A = 4, // The module will read the content of A - but not modify it. - ANALYSIS_UPDATE_A = 8, // The update will be based on modifying A directly, and not on an X matrix. - ANALYSIS_SCALE_DATA = 16, - ANALYSIS_ITERABLE = 32 // The module can bu used as an iterative smoother. -} analysis_module_flag_enum; - - -#define ANALYSIS_MODULE_FLAG_ENUM_SIZE 5 -#define ANALYSIS_MODULE_FLAG_ENUM_DEFS {.value = ANALYSIS_NEED_ED , .name = "ANALYSIS_NEED_ED"},\ - {.value = ANALYSIS_USE_A , .name = "ANALYSIS_USE_A"},\ - {.value = ANALYSIS_UPDATE_A , .name = "ANALYSIS_UPDATE_A"},\ - {.value = ANALYSIS_SCALE_DATA , .name = "ANALYSIS_SCALE_DATA"},\ - {.value = ANALYSIS_ITERABLE , .name = "ANALYSIS_ITERABLE"} - - -#define EXTERNAL_MODULE_NAME "analysis_table" -#define EXTERNAL_MODULE_SYMBOL analysis_table - - typedef enum { - LOAD_OK = 0, - DLOPEN_FAILURE = 1, - LOAD_SYMBOL_TABLE_NOT_FOUND = 2 - } analysis_module_load_status_enum; - - - typedef struct analysis_module_struct analysis_module_type; - - analysis_module_type * analysis_module_alloc_internal__( rng_type * rng , const char * symbol_table , bool verbose , analysis_module_load_status_enum * load_status); - analysis_module_type * analysis_module_alloc_internal( rng_type * rng , const char * symbol_table ); - - analysis_module_type * analysis_module_alloc_external__(rng_type * rng , const char * lib_name , bool verbose , analysis_module_load_status_enum * load_status); - analysis_module_type * analysis_module_alloc_external( rng_type * rng , const char * libname ); - - void analysis_module_free( analysis_module_type * module ); - void analysis_module_free__( void * arg); - - void analysis_module_initX(analysis_module_type * module , - matrix_type * X , - matrix_type * A , - matrix_type * S , - matrix_type * R , - matrix_type * dObs , - matrix_type * E , - matrix_type * D); - - - void analysis_module_updateA(analysis_module_type * module , - matrix_type * A , - matrix_type * S , - matrix_type * R , - matrix_type * dObs , - matrix_type * E , - matrix_type * D , - const module_info_type* module_info); - - - void analysis_module_init_update( analysis_module_type * module , - const bool_vector_type * ens_mask , - const matrix_type * S , - const matrix_type * R , - const matrix_type * dObs , - const matrix_type * E , - const matrix_type * D ); - - - const char * analysis_module_get_lib_name( const analysis_module_type * module); - bool analysis_module_internal( const analysis_module_type * module ); - bool analysis_module_set_var( analysis_module_type * module , const char * var_name , const char * string_value ); - const char * analysis_module_get_table_name( const analysis_module_type * module); - const char * analysis_module_get_name( const analysis_module_type * module ); - void analysis_module_set_name( analysis_module_type * module , const char * name); - bool analysis_module_check_option( const analysis_module_type * module , long flag); - void analysis_module_complete_update( analysis_module_type * module ); - - bool analysis_module_has_var( const analysis_module_type * module , const char * var ); - double analysis_module_get_double( const analysis_module_type * module , const char * var); - int analysis_module_get_int( const analysis_module_type * module , const char * var); - bool analysis_module_get_bool( const analysis_module_type * module , const char * var); - void * analysis_module_get_ptr( const analysis_module_type * module , const char * var); - const char * analysis_module_flag_enum_iget( int index, int * value); - - - - UTIL_IS_INSTANCE_HEADER( analysis_module ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libanalysis/include/ert/analysis/analysis_table.h b/ThirdParty/Ert/libanalysis/include/ert/analysis/analysis_table.h deleted file mode 100644 index bbbbc7993e..0000000000 --- a/ThirdParty/Ert/libanalysis/include/ert/analysis/analysis_table.h +++ /dev/null @@ -1,95 +0,0 @@ -#ifndef ERT_ANALYSIS_TABLE_H -#define ERT_ANALYSIS_TABLE_H - -#ifdef __cplusplus -extern "C" { -#endif - - -#include -#include -#include - -#include - - - typedef void (analysis_updateA_ftype) (void * module_data , - matrix_type * A , - matrix_type * S , - matrix_type * R , - matrix_type * dObs , - matrix_type * E , - matrix_type * D , - const module_info_type* module_info); - - - typedef void (analysis_initX_ftype) (void * module_data , - matrix_type * X , - matrix_type * A , - matrix_type * S , - matrix_type * R , - matrix_type * dObs , - matrix_type * E , - matrix_type * D ); - - - typedef bool (analysis_set_int_ftype) (void * module_data , const char * flag , int value); - typedef bool (analysis_set_bool_ftype) (void * module_data , const char * flag , bool value); - typedef bool (analysis_set_double_ftype) (void * module_data , const char * var , double value); - typedef bool (analysis_set_string_ftype) (void * module_data , const char * var , const char * value); - typedef void (analysis_free_ftype) (void * ); - typedef void * (analysis_alloc_ftype) ( rng_type * rng ); - - - typedef void (analysis_init_update_ftype) (void * module_data, - const bool_vector_type * ens_mask , - const matrix_type * S , - const matrix_type * R , - const matrix_type * dObs , - const matrix_type * E , - const matrix_type * D); - - typedef void (analysis_complete_update_ftype) (void * module_data ); - - typedef long (analysis_get_options_ftype) (void * module_data , long option); - - typedef bool (analysis_has_var_ftype) (const void * module_data , const char * var_name); - typedef int (analysis_get_int_ftype) (const void * module_data , const char * var_name ); - typedef double (analysis_get_double_ftype) (const void * module_data , const char * var_name ); - typedef bool (analysis_get_bool_ftype) (const void * module_data , const char * var_name ); - typedef void * (analysis_get_ptr_ftype) (const void * module_data , const char * var_name ); - -/*****************************************************************/ - - -typedef struct { - const char * name; - analysis_updateA_ftype * updateA; - analysis_initX_ftype * initX; - analysis_init_update_ftype * init_update; - analysis_complete_update_ftype * complete_update; - - analysis_free_ftype * freef; - analysis_alloc_ftype * alloc; - - analysis_set_int_ftype * set_int; - analysis_set_double_ftype * set_double; - analysis_set_bool_ftype * set_bool; - analysis_set_string_ftype * set_string; - analysis_get_options_ftype * get_options; - - analysis_has_var_ftype * has_var; - analysis_get_int_ftype * get_int; - analysis_get_double_ftype * get_double; - analysis_get_bool_ftype * get_bool; - analysis_get_ptr_ftype * get_ptr; -} analysis_table_type; - - - - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libanalysis/include/ert/analysis/cv_enkf.h b/ThirdParty/Ert/libanalysis/include/ert/analysis/cv_enkf.h deleted file mode 100644 index 1f5d518859..0000000000 --- a/ThirdParty/Ert/libanalysis/include/ert/analysis/cv_enkf.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'cv_enkf.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -typedef struct cv_enkf_data_struct cv_enkf_data_type; - -void * cv_enkf_data_alloc( rng_type * rng ); -void cv_enkf_data_free( void * arg ); - -void cv_enkf_init_update( void * arg , - const bool_vector_type * ens_mask , - const matrix_type * S , - const matrix_type * R , - const matrix_type * dObs , - const matrix_type * E , - const matrix_type * D ); - -void cv_enkf_initX(void * module_data , - matrix_type * X , - matrix_type * A , - matrix_type * S , - matrix_type * R , - matrix_type * dObs , - matrix_type * E , - matrix_type * D); - -bool cv_enkf_set_double( void * arg , const char * var_name , double value); -bool cv_enkf_set_int( void * arg , const char * var_name , int value); -bool cv_enkf_set_bool( void * arg , const char * var_name , bool value ); - -void cv_enkf_set_truncation( cv_enkf_data_type * data , double truncation ); -void cv_enkf_set_pen_press( cv_enkf_data_type * data , bool value ); -void cv_enkf_set_subspace_dimension( cv_enkf_data_type * data , int subspace_dimension); - diff --git a/ThirdParty/Ert/libanalysis/include/ert/analysis/enkf_linalg.h b/ThirdParty/Ert/libanalysis/include/ert/analysis/enkf_linalg.h deleted file mode 100644 index 19f6b841df..0000000000 --- a/ThirdParty/Ert/libanalysis/include/ert/analysis/enkf_linalg.h +++ /dev/null @@ -1,110 +0,0 @@ -#ifndef ERT_ENKF_LINALG_H -#define ERT_ENKF_LINALG_H - -#include -#include -#include - - -int enkf_linalg_get_PC( const matrix_type * S0, - const matrix_type * dObs , - double truncation, - int ncomp, - matrix_type * PC, - matrix_type * PC_obs , - double_vector_type * singular_values); - -int enkf_linalg_num_PC(const matrix_type * S , double truncation ); - - -void enkf_linalg_init_stdX( matrix_type * X , - const matrix_type * S , - const matrix_type * D , - const matrix_type * W , - const double * eig , - bool bootstrap); - - -void enkf_linalg_init_sqrtX(matrix_type * X5 , - const matrix_type * S , - const matrix_type * randrot , - const matrix_type * innov , - const matrix_type * W , - const double * eig , - bool bootstrap); - - -void enkf_linalg_Cee(matrix_type * B, int nrens , const matrix_type * R , const matrix_type * U0 , const double * inv_sig0); - - -int enkf_linalg_svd_truncation(const matrix_type * S , - double truncation , - int ncomp , - dgesvd_vector_enum store_V0T , - double * sig0, - matrix_type * U0 , - matrix_type * V0T); - - -int enkf_linalg_svdS(const matrix_type * S , - double truncation , - int ncomp , - dgesvd_vector_enum jobVT , - double * sig0, - matrix_type * U0 , - matrix_type * V0T); - - - -matrix_type * enkf_linalg_alloc_innov( const matrix_type * dObs , const matrix_type * S); - -void enkf_linalg_lowrankCinv__(const matrix_type * S , - const matrix_type * R , - matrix_type * V0T , - matrix_type * Z, - double * eig , - matrix_type * U0, - double truncation, - int ncomp); - - - -void enkf_linalg_lowrankCinv(const matrix_type * S , - const matrix_type * R , - matrix_type * W , /* Corresponding to X1 from Eq. 14.29 */ - double * eig , /* Corresponding to 1 / (1 + Lambda_1) (14.29) */ - double truncation , - int ncomp); - - - -void enkf_linalg_genX2(matrix_type * X2 , const matrix_type * S , const matrix_type * W , const double * eig); -void enkf_linalg_genX3(matrix_type * X3 , const matrix_type * W , const matrix_type * D , const double * eig); - -void enkf_linalg_meanX5(const matrix_type * S , - const matrix_type * W , - const double * eig , - const matrix_type * innov , - matrix_type * X5); - - -void enkf_linalg_X5sqrt(matrix_type * X2 , matrix_type * X5 , const matrix_type * randrot, int nrobs); - -matrix_type * enkf_linalg_alloc_mp_randrot(int ens_size , rng_type * rng); -void enkf_linalg_set_randrot( matrix_type * Q , rng_type * rng); -void enkf_linalg_checkX(const matrix_type * X , bool bootstrap); - - -//rml_enkf functions - -void enkf_linalg_rml_enkfX1(matrix_type *X1, matrix_type * Udr ,matrix_type * S ,matrix_type *R); -void enkf_linalg_rml_enkfX2(matrix_type *X2, double *Wdr, matrix_type * X1 ,double a , int nsign); -void enkf_linalg_rml_enkfX3(matrix_type *X3, matrix_type *VdTr, double *Wdr,matrix_type *X2, int nsign); - -double enkf_linalg_data_mismatch(matrix_type *D , matrix_type *R , matrix_type *Sk); -void enkf_linalg_Covariance(matrix_type *Cd, const matrix_type *E, double nsc ,int nrobs); -void enkf_linalg_rml_enkfAm(matrix_type * Um, const double * Wm,int nsign1); - -void enkf_linalg_rml_enkfX7(matrix_type * X7, matrix_type * VdT, double * Wdr, double a,matrix_type * X6); - -#endif diff --git a/ThirdParty/Ert/libanalysis/include/ert/analysis/fwd_step_enkf.h b/ThirdParty/Ert/libanalysis/include/ert/analysis/fwd_step_enkf.h deleted file mode 100644 index 627ae5efd4..0000000000 --- a/ThirdParty/Ert/libanalysis/include/ert/analysis/fwd_step_enkf.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'fwd_step_enkf.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -#include -#include - -typedef struct fwd_step_enkf_data_struct fwd_step_enkf_data_type; - -void * fwd_step_enkf_data_alloc( rng_type * rng ); -void fwd_step_enkf_data_free( void * arg ); - -void fwd_step_enkf_updateA(void * module_data , - matrix_type * A , - matrix_type * S , - matrix_type * R , - matrix_type * dObs , - matrix_type * E , - matrix_type * D , - const module_info_type* module_info); - - - diff --git a/ThirdParty/Ert/libanalysis/include/ert/analysis/fwd_step_log.h b/ThirdParty/Ert/libanalysis/include/ert/analysis/fwd_step_log.h deleted file mode 100644 index d48e587f98..0000000000 --- a/ThirdParty/Ert/libanalysis/include/ert/analysis/fwd_step_log.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - Copyright (C) 2016 Statoil ASA, Norway. - - The file 'fwd_step_log.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef FWD_STEP_LOG_H -#define FWD_STEP_LOG_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - - typedef struct fwd_step_log_struct fwd_step_log_type; - - fwd_step_log_type * fwd_step_log_alloc(); - void fwd_step_log_free(fwd_step_log_type * fwd_step_log); - bool fwd_step_log_get_clear_log( const fwd_step_log_type * data ); - void fwd_step_log_set_clear_log( fwd_step_log_type * data , bool clear_log); - void fwd_step_log_set_log_file( fwd_step_log_type * data , const char * log_file ); - const char * fwd_step_log_get_log_file( const fwd_step_log_type * data); - void fwd_step_log_open( fwd_step_log_type * fwd_step_log ); - void fwd_step_log_close( fwd_step_log_type * fwd_step_log ); - void fwd_step_log_line( fwd_step_log_type * fwd_step_log , const char * fmt , ...); - bool fwd_step_log_is_open( const fwd_step_log_type * fwd_step_log ); - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/ThirdParty/Ert/libanalysis/include/ert/analysis/module_data_block.h b/ThirdParty/Ert/libanalysis/include/ert/analysis/module_data_block.h deleted file mode 100644 index aecac5803f..0000000000 --- a/ThirdParty/Ert/libanalysis/include/ert/analysis/module_data_block.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - Copyright (C) 2016 Statoil ASA, Norway. - - The file 'module_data_blocks.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef MODULE_DATA_BLOCKS_H -#define MODULE_DATA_BLOCKS_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - - struct module_data_block_struct { - UTIL_TYPE_ID_DECLARATION; - char * key; - const int * index_list; - int A_row_start; - int n_active; - }; - - typedef struct module_data_block_struct module_data_block_type; - - module_data_block_type * module_data_block_alloc( const char * key, const int * index_list , const int row_start, const int n_active); - const char * module_data_block_get_key(const module_data_block_type * module_data_block); - const int module_data_block_get_row_start(const module_data_block_type * module_data_block); - const int module_data_block_get_row_end(const module_data_block_type * module_data_block); - const int * module_data_block_get_active_indices(const module_data_block_type * module_data_block ); - void module_data_block_free(module_data_block_type * module_data_block); - void module_data_block_free__( void * arg ); - - UTIL_IS_INSTANCE_HEADER( module_data_block ); - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/ThirdParty/Ert/libanalysis/include/ert/analysis/module_data_block_vector.h b/ThirdParty/Ert/libanalysis/include/ert/analysis/module_data_block_vector.h deleted file mode 100644 index 9ab86fbf8b..0000000000 --- a/ThirdParty/Ert/libanalysis/include/ert/analysis/module_data_block_vector.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - Copyright (C) 2016 Statoil ASA, Norway. - - The file 'module_data_block_vector.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#ifndef ERT_MODULE_DATA_BLOCK_VECTOR_H -#define ERT_MODULE_DATA_BLOCK_VECTOR_H - -#ifdef __cplusplus -extern "C" { -#endif - - - -#include - - typedef struct module_data_block_vector_struct module_data_block_vector_type; - - module_data_block_vector_type * module_data_block_vector_alloc(); - void module_data_block_vector_free(); - void module_data_block_vector_add_data_block( module_data_block_vector_type * module_data_block_vector , const module_data_block_type * data_block); - module_data_block_type * module_data_block_vector_iget_module_data_block(const module_data_block_vector_type * module_data_block_vector, int index); - int module_data_block_vector_get_size(const module_data_block_vector_type * module_data_block_vector); - - UTIL_IS_INSTANCE_HEADER( module_data_block_vector ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libanalysis/include/ert/analysis/module_info.h b/ThirdParty/Ert/libanalysis/include/ert/analysis/module_info.h deleted file mode 100644 index a5783d17a3..0000000000 --- a/ThirdParty/Ert/libanalysis/include/ert/analysis/module_info.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - Copyright (C) 2016 Statoil ASA, Norway. - - The file 'module_info.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#ifndef ERT_MODULE_INFO_H -#define ERT_MODULE_INFO_H - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - - - typedef struct module_info_struct module_info_type; - - module_info_type * module_info_alloc(const char* ministep_name); - void module_info_free(); - char * module_info_get_ministep_name(const module_info_type * module_info); - module_data_block_vector_type * module_info_get_data_block_vector(const module_info_type * module_info); - module_obs_block_vector_type * module_info_get_obs_block_vector(const module_info_type * module_info); - - UTIL_IS_INSTANCE_HEADER( module_info ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libanalysis/include/ert/analysis/module_obs_block.h b/ThirdParty/Ert/libanalysis/include/ert/analysis/module_obs_block.h deleted file mode 100644 index e838e8ea16..0000000000 --- a/ThirdParty/Ert/libanalysis/include/ert/analysis/module_obs_block.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - Copyright (C) 2016 Statoil ASA, Norway. - - The file 'module_obs_blocks.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef MODULE_OBS_BLOCKS_H -#define MODULE_OBS_BLOCKS_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - - struct module_obs_block_struct { - UTIL_TYPE_ID_DECLARATION; - char * key; - const int * index_list; - int D_row_start; - int n_active; - }; - - typedef struct module_obs_block_struct module_obs_block_type; - - module_obs_block_type * module_obs_block_alloc( const char * key, const int * index_list, const int row_start, const int n_active); - const char * module_obs_block_get_key(const module_obs_block_type * module_obs_block); - const int module_obs_block_get_row_start(const module_obs_block_type * module_obs_block); - const int module_obs_block_get_row_end(const module_obs_block_type * module_obs_block); - const int * module_obs_block_get_active_indices(const module_obs_block_type * module_obs_block ); - void module_obs_block_free(module_obs_block_type * module_obs_block); - void module_obs_block_free__( void * arg ); - - UTIL_IS_INSTANCE_HEADER( module_obs_block ); - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/ThirdParty/Ert/libanalysis/include/ert/analysis/module_obs_block_vector.h b/ThirdParty/Ert/libanalysis/include/ert/analysis/module_obs_block_vector.h deleted file mode 100644 index 75063e643c..0000000000 --- a/ThirdParty/Ert/libanalysis/include/ert/analysis/module_obs_block_vector.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - Copyright (C) 2016 Statoil ASA, Norway. - - The file 'module_obs_block_vector.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#ifndef ERT_MODULE_OBS_BLOCK_VECTOR_H -#define ERT_MODULE_OBS_BLOCK_VECTOR_H - -#ifdef __cplusplus -extern "C" { -#endif - - - -#include - - typedef struct module_obs_block_vector_struct module_obs_block_vector_type; - - module_obs_block_vector_type * module_obs_block_vector_alloc(); - void module_obs_block_vector_free(); - void module_obs_block_vector_add_obs_block( module_obs_block_vector_type * module_obs_block_vector , module_obs_block_type * obs_block); - module_obs_block_type * module_obs_block_vector_iget_module_obs_block(const module_obs_block_vector_type * module_obs_block_vector, int index); - const module_obs_block_type * module_obs_block_vector_search_module_obs_block(const module_obs_block_vector_type * module_obs_block_vector, int global_index); - int module_obs_block_vector_get_size(const module_obs_block_vector_type * module_obs_block_vector); - - UTIL_IS_INSTANCE_HEADER( module_obs_block_vector ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libanalysis/include/ert/analysis/std_enkf.h b/ThirdParty/Ert/libanalysis/include/ert/analysis/std_enkf.h deleted file mode 100644 index 34159b8f65..0000000000 --- a/ThirdParty/Ert/libanalysis/include/ert/analysis/std_enkf.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef ERT_STD_ENKF_H -#define ERT_STD_ENKF_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include -#include - -#define DEFAULT_ENKF_TRUNCATION_ 0.98 -#define ENKF_TRUNCATION_KEY_ "ENKF_TRUNCATION" -#define ENKF_NCOMP_KEY_ "ENKF_NCOMP" -#define USE_EE_KEY_ "USE_EE" -#define ANALYSIS_SCALE_DATA_KEY_ "ANALYSIS_SCALE_DATA" - - typedef struct std_enkf_data_struct std_enkf_data_type; - - - bool std_enkf_set_double( void * arg , const char * var_name , double value); - - int std_enkf_get_subspace_dimension( std_enkf_data_type * data ); - void std_enkf_set_truncation( std_enkf_data_type * data , double truncation ); - void std_enkf_set_subspace_dimension( std_enkf_data_type * data , int subspace_dimension); - void std_enkf_set_lambda0( std_enkf_data_type * data , double lambda0 ); - bool std_enkf_has_var( const void * arg, const char * var_name); - - double std_enkf_get_truncation( std_enkf_data_type * data ); - void * std_enkf_data_alloc( rng_type * rng); - void std_enkf_data_free( void * module_data ); - - bool std_enkf_get_bool( const void * arg, const char * var_name); - int std_enkf_get_int( const void * arg, const char * var_name); - double std_enkf_get_double( const void * arg, const char * var_name); - bool std_enkf_has_var( const void * arg, const char * var_name); - long std_enkf_get_options( void * arg , long flag ); - bool std_enkf_set_bool( void * arg , const char * var_name , bool value); - bool std_enkf_set_int( void * arg , const char * var_name , int value); - bool std_enkf_set_double( void * arg , const char * var_name , double value); - void std_enkf_initX(void * module_data , - matrix_type * X , - matrix_type * A , - matrix_type * S , - matrix_type * R , - matrix_type * dObs , - matrix_type * E , - matrix_type * D); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ThirdParty/Ert/libanalysis/modules/CMakeLists.txt b/ThirdParty/Ert/libanalysis/modules/CMakeLists.txt deleted file mode 100644 index 799d533169..0000000000 --- a/ThirdParty/Ert/libanalysis/modules/CMakeLists.txt +++ /dev/null @@ -1,49 +0,0 @@ -include_directories(${CMAKE_CURRENT_SOURCE_DIR}) - -set( RML_SOURCE_FILES - rml_enkf_config.c - rml_enkf_log.c - rml_enkf.c - rml_enkf_common.c ) - -set( header_files analysis_module.h enkf_linalg.h analysis_table.h std_enkf.h rml_enkf_common.h) -add_library( rml_enkf SHARED ${RML_SOURCE_FILES} ) -add_library( std_enkf_debug SHARED std_enkf_debug.c ) - -set_target_properties( rml_enkf PROPERTIES VERSION 1.0 SOVERSION 1.0 PREFIX "") -set_target_properties( std_enkf_debug PROPERTIES VERSION 1.0 SOVERSION 1.0 PREFIX "") - -target_link_libraries( rml_enkf analysis dl ) -target_link_libraries( std_enkf_debug analysis dl ) - -if (USE_RUNPATH) - add_runpath( rml_enkf ) - add_runpath( std_enkf_debug ) -endif() - -if (BUILD_TESTS) - add_subdirectory( tests ) -endif() - -if (INSTALL_ERT) - install(TARGETS rml_enkf DESTINATION ${CMAKE_INSTALL_LIBDIR}) - install(TARGETS std_enkf_debug DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() - - -#----------------------------------------------------------------- - -# Alternative script based build: -#if (BUILD_TESTS) -# if (BUILD_APPLICATIONS) -#set( args "--silent --exclude-ert -I${PROJECT_SOURCE_DIR}/libanalysis/include -I${PROJECT_SOURCE_DIR}/libert_util/include -I${CMAKE_CURRENT_SOURCE_DIR} -I${PROJECT_BINARY_DIR}/libert_util/include") - - -#set( RML_SOURCE_FILES -# rml_enkf.c -# rml_enkf_common.c ) - -#ert_module( ${LIBRARY_OUTPUT_PATH}/rml_enkf ${args} "${RML_SOURCE_FILES}") - - - diff --git a/ThirdParty/Ert/libanalysis/modules/deprecated/rml_enkf.c b/ThirdParty/Ert/libanalysis/modules/deprecated/rml_enkf.c deleted file mode 100644 index d86ca89341..0000000000 --- a/ThirdParty/Ert/libanalysis/modules/deprecated/rml_enkf.c +++ /dev/null @@ -1,427 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'rml_enkf.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -/* - A random 'magic' integer id which is used for run-time type checking - of the input data. -*/ -#define RML_ENKF_TYPE_ID 261123 - - - - -/* - Observe that only one of the settings subspace_dimension and - truncation can be valid at a time; otherwise the svd routine will - fail. This implies that the set_truncation() and - set_subspace_dimension() routines will set one variable, AND - INVALIDATE THE OTHER. For most situations this will be OK, but if - you have repeated calls to both of these functions the end result - might be a surprise. -*/ -#define INVALID_SUBSPACE_DIMENSION -1 -#define INVALID_TRUNCATION -1 -#define DEFAULT_SUBSPACE_DIMENSION INVALID_SUBSPACE_DIMENSION - - - - - -/* - The configuration data used by the rml_enkf module is contained in a - rml_enkf_data_struct instance. The data type used for the rml_enkf - module is quite simple; with only a few scalar variables, but there - are essentially no limits to what you can pack into such a datatype. - - All the functions in the module have a void pointer as the first - argument, this will immediately be casted to a rml_enkf_data_type - instance, to get some type safety the UTIL_TYPE_ID system should be - used (see documentation in util.h) - - The data structure holding the data for your analysis module should - be created and initialized by a constructor, which should be - registered with the '.alloc' element of the analysis table; in the - same manner the desctruction of this data should be handled by a - destructor or free() function registered with the .freef field of - the analysis table. -*/ - - -typedef struct rml_enkf_data_struct rml_enkf_data_type; - -struct rml_enkf_data_struct { - UTIL_TYPE_ID_DECLARATION; - double truncation; // Controlled by config key: ENKF_TRUNCATION_KEY - int subspace_dimension; // Controlled by config key: ENKF_NCOMP_KEY (-1: use Truncation instead) - long option_flags; - - int iteration_nr; // Keep track of the outer iteration loop - double lambda; // parameter to control the search direction in Marquardt levenberg optimization - double lambda0; // Initial lambda value - double Sk; // Objective function value - double Std; // Standard Deviation of the Objective function - matrix_type *state; - bool_vector_type * ens_mask; -}; - - -/* - This is a macro which will expand to generate a function: - - rml_enkf_data_type * rml_enkf_data_safe_cast( void * arg ) {} - - which is used for runtime type checking of all the functions which - accept a void pointer as first argument. -*/ -static UTIL_SAFE_CAST_FUNCTION( rml_enkf_data , RML_ENKF_TYPE_ID ) -static UTIL_SAFE_CAST_FUNCTION_CONST( rml_enkf_data , RML_ENKF_TYPE_ID ) - - -double rml_enkf_get_truncation( rml_enkf_data_type * data ) { - return data->truncation; -} - -int rml_enkf_get_subspace_dimension( rml_enkf_data_type * data ) { - return data->subspace_dimension; -} - -void rml_enkf_set_truncation( rml_enkf_data_type * data , double truncation ) { - data->truncation = truncation; - if (truncation > 0.0) - data->subspace_dimension = INVALID_SUBSPACE_DIMENSION; -} - -void rml_enkf_set_lambda0(rml_enkf_data_type * data , double lambda0 ) { - data->lambda0 = lambda0; -} - -void rml_enkf_set_subspace_dimension( rml_enkf_data_type * data , int subspace_dimension) { - data->subspace_dimension = subspace_dimension; - if (subspace_dimension > 0) - data->truncation = INVALID_TRUNCATION; -} - -void rml_enkf_set_iteration_number( rml_enkf_data_type *data , int iteration_number ) { - data->iteration_nr = iteration_number; -} - - -void * rml_enkf_data_alloc( rng_type * rng) { - rml_enkf_data_type * data = util_malloc( sizeof * data ); - UTIL_TYPE_ID_INIT( data , RML_ENKF_TYPE_ID ); - - rml_enkf_set_truncation( data , DEFAULT_ENKF_TRUNCATION_ ); - rml_enkf_set_subspace_dimension( data , DEFAULT_SUBSPACE_DIMENSION ); - data->option_flags = ANALYSIS_NEED_ED + ANALYSIS_UPDATE_A + ANALYSIS_ITERABLE + ANALYSIS_SCALE_DATA; - data->iteration_nr = 0; - data->Std = 0; - data->state = matrix_alloc(1,1); // This will be resized under use; but we need a valid instance - data->lambda0 = -1.0; - data->ens_mask = bool_vector_alloc(0,false); - return data; -} - - -void rml_enkf_data_free( void * module_data ) { - rml_enkf_data_type * data = rml_enkf_data_safe_cast( module_data ); - matrix_free( data->state ); - bool_vector_free(data->ens_mask); - free( data ); -} - - - - - -/* - About the matrix Cd: The matrix Cd is calculated based on the content - of the E input matrix. In the original implementation this matrix was - only calculated in the first iteration, and then reused between subsequent - iterations. - - Due to deactivating outliers the number of active observations can change - from one iteration to the next, if the matrix Cd is then reused between - iterations we will get a matrix size mismatch in the linear algebra. In the - current implementation the Cd matrix is recalculated based on the E input - for each iteration. - */ - -void rml_enkf_updateA(void * module_data , - matrix_type * A , - matrix_type * S , - matrix_type * R , - matrix_type * dObs , - matrix_type * E , - matrix_type * D) { - - - rml_enkf_data_type * data = rml_enkf_data_safe_cast( module_data ); - double truncation = data->truncation; - double Sk_new; - double Std_new; - - int ens_size = matrix_get_columns( S ); - int nrobs = matrix_get_rows( S ); - matrix_type * Cd = matrix_alloc( nrobs , nrobs); - double nsc = 1/sqrt(ens_size-1); - matrix_type * Skm = matrix_alloc(matrix_get_columns(D),matrix_get_columns(D)); - FILE *fp = util_fopen("rml_enkf_output","a"); - - int nrmin = util_int_min( ens_size , nrobs); - matrix_type * Ud = matrix_alloc( nrobs , nrmin ); /* Left singular vectors. */ - matrix_type * VdT = matrix_alloc( nrmin , ens_size ); /* Right singular vectors. */ - double * Wd = util_calloc( nrmin , sizeof * Wd ); - - - Cd = matrix_alloc( nrobs, nrobs ); - enkf_linalg_Covariance(Cd ,E ,nsc, nrobs); - matrix_inv(Cd); - - if (data->iteration_nr == 0) { - Sk_new = enkf_linalg_data_mismatch(D,Cd,Skm); //Calculate the intitial data mismatch term - Std_new = matrix_diag_std(Skm,Sk_new); - rml_enkf_common_store_state( data->state , A , data->ens_mask ); - - - - if (data->lambda0 < 0) - data->lambda = pow(10,floor(log10(Sk_new/(2*nrobs)))); - else - data->lambda = data->lambda0; - - rml_enkf_common_initA__(A,S,Cd,E,D,truncation,data->lambda,Ud,Wd,VdT); - data->Sk = Sk_new; - data->Std = Std_new; - printf("Prior Objective function value is %5.3f \n", data->Sk); - - fprintf(fp,"Iteration number\t Lamda Value \t Current Mean (OB FN) \t Old Mean\t Current Stddev\n"); - fprintf(fp, "\n\n"); - fprintf(fp,"%d \t\t NA \t %5.5f \t \t %5.5f \n",data->iteration_nr, Sk_new, Std_new); - - } else { - Sk_new = enkf_linalg_data_mismatch(D , Cd , Skm); //Calculate the intitial data mismatch term - Std_new= matrix_diag_std(Skm,Sk_new); - printf(" Current Objective function value is %5.3f \n\n",Sk_new); - printf("The old Objective function value is %5.3f \n", data->Sk); - - - if ((Sk_new< (data->Sk)) && (Std_new< (data->Std))) - { - if ( (1- (Sk_new/data->Sk)) < .0001) // check convergence ** model change norm has to be added in this!! - data-> iteration_nr = 16; - - - fprintf(fp,"%d \t\t %5.5f \t %5.5f \t %5.5f \t %5.5f \n",data->iteration_nr,data->lambda, Sk_new,data->Sk, Std_new); - data->lambda = data->lambda / 10 ; - data->Std = Std_new; - - rml_enkf_common_store_state( data->state , A , data->ens_mask ); - - data->Sk = Sk_new; - rml_enkf_common_initA__(A,S,Cd,E,D,truncation,data->lambda,Ud,Wd,VdT); - } - else if((Sk_new< (data->Sk)) && (Std_new > (data->Std))) - { - if ( (1- (Sk_new/data->Sk)) < .0001) // check convergence ** model change norm has to be added in this!! - data-> iteration_nr = 16; - - - fprintf(fp,"%d \t\t %5.5f \t %5.5f \t %5.5f \t %5.5f \n",data->iteration_nr,data->lambda, Sk_new,data->Sk, Std_new); - data->Std=Std_new; - - rml_enkf_common_store_state( data->state , A , data->ens_mask ); - - data->Sk = Sk_new; - rml_enkf_common_initA__(A,S,Cd,E,D,truncation,data->lambda,Ud,Wd,VdT); - } - else { - fprintf(fp,"%d \t\t %5.5f \t %5.5f \t %5.5f \t %5.5f \n",data->iteration_nr,data->lambda, Sk_new,data->Sk, Std_new); - printf("The previous step is rejected !!\n"); - data->lambda = data ->lambda * 4; - - rml_enkf_common_recover_state( data->state , A , data->ens_mask ); - - rml_enkf_common_initA__(A,S,Cd,E,D,truncation,data->lambda,Ud,Wd,VdT); - data->iteration_nr--; - } - } - data->iteration_nr++; - - // setting the lower bound for lambda - if (data->lambda <.01) - data->lambda= .01; - - - printf ("The current iteration number is %d \n ", data->iteration_nr); - - - matrix_free(Cd); - matrix_free(Ud); - matrix_free(VdT); - matrix_free(Skm); - free(Wd); - fclose(fp); -} - - -void rml_enkf_init_update(void * arg , - const bool_vector_type * ens_mask , - const matrix_type * S , - const matrix_type * R , - const matrix_type * dObs , - const matrix_type * E , - const matrix_type * D ) { - rml_enkf_data_type * module_data = rml_enkf_data_safe_cast( arg ); - bool_vector_memcpy( module_data->ens_mask , ens_mask ); -} - - - -bool rml_enkf_set_double( void * arg , const char * var_name , double value) { - rml_enkf_data_type * module_data = rml_enkf_data_safe_cast( arg ); - { - bool name_recognized = true; - - if (strcmp( var_name , ENKF_TRUNCATION_KEY_) == 0) - rml_enkf_set_truncation( module_data , value ); - else if (strcmp( var_name , ENKF_LAMBDA0_KEY_) == 0) - rml_enkf_set_lambda0( module_data , value ); - else - name_recognized = false; - - return name_recognized; - } -} - - -bool rml_enkf_set_int( void * arg , const char * var_name , int value) { - rml_enkf_data_type * module_data = rml_enkf_data_safe_cast( arg ); - { - bool name_recognized = true; - - if (strcmp( var_name , ENKF_NCOMP_KEY_) == 0) - rml_enkf_set_subspace_dimension( module_data , value ); - else if(strcmp( var_name , ENKF_ITER_KEY_) == 0) - rml_enkf_set_iteration_number( module_data , value ); - else - name_recognized = false; - - return name_recognized; - } -} - - -long rml_enkf_get_options( void * arg , long flag ) { - rml_enkf_data_type * module_data = rml_enkf_data_safe_cast( arg ); - { - return module_data->option_flags; - } -} - - - - bool rml_enkf_has_var( const void * arg, const char * var_name) { - bool ret = false; - - if ((strcmp(var_name , ENKF_ITER_KEY_) == 0) || - (strcmp(var_name , ENKF_TRUNCATION_KEY_) == 0) || - (strcmp(var_name , ENKF_LAMBDA0_KEY_) == 0)) { - ret = true; - } - return ret; - } - - - - - int rml_enkf_get_int( const void * arg, const char * var_name) { - const rml_enkf_data_type * module_data = rml_enkf_data_safe_cast_const( arg ); - { - if (strcmp(var_name , ENKF_ITER_KEY_) == 0) - return module_data->iteration_nr; - else - return -1; - } - } - - double rml_enkf_get_double( const void * arg, const char * var_name) { - const rml_enkf_data_type * module_data = rml_enkf_data_safe_cast_const( arg ); - { - if (strcmp(var_name , ENKF_TRUNCATION_KEY_) == 0) - return module_data->truncation; - else if (strcmp(var_name , ENKF_LAMBDA0_KEY_) == 0) - return module_data->lambda0; - else - return -1.0; - } - } - - - - -/** - gcc -fpic -c -I?? - gcc -shared -o -*/ - - - -#ifdef INTERNAL_LINK -#define SYMBOL_TABLE rml_enkf_symbol_table -#else -#define SYMBOL_TABLE EXTERNAL_MODULE_SYMBOL -#endif - - -analysis_table_type SYMBOL_TABLE = { - .alloc = rml_enkf_data_alloc, - .freef = rml_enkf_data_free, - .set_int = rml_enkf_set_int , - .set_double = rml_enkf_set_double , - .set_bool = NULL , - .set_string = NULL , - .get_options = rml_enkf_get_options , - .initX = NULL, - .updateA = rml_enkf_updateA , - .init_update = rml_enkf_init_update , - .complete_update = NULL, - .has_var = rml_enkf_has_var, - .get_int = rml_enkf_get_int, - .get_double = rml_enkf_get_double, - .get_ptr = NULL, -}; - diff --git a/ThirdParty/Ert/libanalysis/modules/rml_enkf.c b/ThirdParty/Ert/libanalysis/modules/rml_enkf.c deleted file mode 100644 index efba06b83d..0000000000 --- a/ThirdParty/Ert/libanalysis/modules/rml_enkf.c +++ /dev/null @@ -1,824 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'rml_enkf.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - -typedef struct rml_enkf_data_struct rml_enkf_data_type; - - - -//********************************************** -// DEFAULT PARAMS -//********************************************** -/* - Observe that only one of the settings subspace_dimension and - truncation can be valid at a time; otherwise the svd routine will - fail. This implies that the set_truncation() and - set_subspace_dimension() routines will set one variable, AND - INVALIDATE THE OTHER. For most situations this will be OK, but if - you have repeated calls to both of these functions the end result - might be a surprise. -*/ - - - -#define USE_PRIOR_KEY "USE_PRIOR" -#define LAMBDA_REDUCE_FACTOR_KEY "LAMBDA_REDUCE" -#define LAMBDA_INCREASE_FACTOR_KEY "LAMBDA_INCREASE" -#define LAMBDA0_KEY "LAMBDA0" -#define LAMBDA_MIN_KEY "LAMBDA_MIN" -#define LAMBDA_RECALCULATE_KEY "LAMBDA_RECALCULATE" -#define ITER_KEY "ITER" -#define LOG_FILE_KEY "LOG_FILE" -#define CLEAR_LOG_KEY "CLEAR_LOG" - - - - -#define RML_ENKF_TYPE_ID 261123 - - -//********************************************** -// RML "object" data definition -//********************************************** -/* - The configuration data used by the rml_enkf module is contained in a - rml_enkf_data_struct instance. The data type used for the rml_enkf - module is quite simple; with only a few scalar variables, but there - are essentially no limits to what you can pack into such a datatype. - - All the functions in the module have a void pointer as the first - argument, this will immediately be casted to a rml_enkf_data_type - instance, to get some type safety the UTIL_TYPE_ID system should be - used (see documentation in util.h) - - The data structure holding the data for your analysis module should - be created and initialized by a constructor, which should be - registered with the '.alloc' element of the analysis table; in the - same manner the desctruction of this data should be handled by a - destructor or free() function registered with the .freef field of - the analysis table. -*/ - - - - - -struct rml_enkf_data_struct { - UTIL_TYPE_ID_DECLARATION; - - int iteration_nr; // Keep track of the outer iteration loop - double Sk; // Objective function value - double Std; // Standard Deviation of the Objective function - double * Csc; - bool_vector_type * ens_mask; - - matrix_type *Am; // Scaled right singular vectors of ensemble anomalies. - - matrix_type *global_prior; // m_pr - matrix_type *previous_state; // m_l - - - double lambda; // parameter to control the setp length in Marquardt levenberg optimization - - - rml_enkf_log_type * rml_log; - rml_enkf_config_type * config; -}; - - - -static UTIL_SAFE_CAST_FUNCTION( rml_enkf_data , RML_ENKF_TYPE_ID ) -static UTIL_SAFE_CAST_FUNCTION_CONST( rml_enkf_data , RML_ENKF_TYPE_ID ) - - - - - - -//********************************************** -// Set / Get -//********************************************** - - -void rml_enkf_set_iteration_nr( rml_enkf_data_type * data , int iteration_nr) { - data->iteration_nr = iteration_nr; -} - -int rml_enkf_get_iteration_nr( const rml_enkf_data_type * data ) { - return data->iteration_nr; -} - - - - - -//********************************************** -// Log-file related stuff -//********************************************** - - -static void rml_enkf_write_log_header( rml_enkf_data_type * data, const char * format) { - if (rml_enkf_log_is_open( data->rml_log )) { - const char * column1 = "Iter#"; - const char * column2 = "Lambda"; - const char * column3 = "Sk old"; - const char * column4 = "Sk_new"; - const char * column5 = "std(Sk)"; - - rml_enkf_log_line(data->rml_log, format, column1, column2, column3, column4, column5); - } -} - -static void rml_enkf_write_iter_info( rml_enkf_data_type * data , double prev_Sk , double Sk_new, double Std_new ) { - if (rml_enkf_log_is_open( data->rml_log )) { - - const char * format = "\n%2d-->%-2d %-7.3f %-7.3f --> %-7.3f %-7.3f"; - const char * format_headers = "\n%-7s %-7s %-7s --> %-7s %-7s"; - static bool has_printed_header = false; - - if (!has_printed_header) { - rml_enkf_write_log_header( data, format_headers ); - has_printed_header = true; - } - - rml_enkf_log_line( data->rml_log , format, data->iteration_nr, data->iteration_nr+1, data->lambda, prev_Sk, Sk_new, Std_new); - } -} - - - - - -//********************************************** -// Memory -//********************************************** -void * rml_enkf_data_alloc( rng_type * rng) { - rml_enkf_data_type * data = util_malloc( sizeof * data); - UTIL_TYPE_ID_INIT( data , RML_ENKF_TYPE_ID ); - - data->config = rml_enkf_config_alloc(); - data->rml_log = rml_enkf_log_alloc(); - - data->Csc = NULL; - data->iteration_nr = 0; - data->Std = 0; - data->previous_state = matrix_alloc(1,1); - data->global_prior = NULL; - data->ens_mask = NULL; - return data; -} - -void rml_enkf_data_free( void * arg ) { - rml_enkf_data_type * data = rml_enkf_data_safe_cast( arg ); - - matrix_free( data->previous_state ); - if (data->global_prior) - matrix_free( data->global_prior ); - - rml_enkf_log_free( data->rml_log ); - rml_enkf_config_free( data->config ); - free( data ); -} - - - - - -//********************************************** -// Notation -//********************************************** -/* - * X1-X7, intermediate calculations in iterations. See D.Oliver algorithm - * - * Variable name in code <-> D.Oliver notation <-> Description - * ------------------------------------------------------------------------------------------------------------- - * A <-> m_l <-> Ensemble matrix. Updated in-place by iterations. - * data->previous_state <-> m_(l-1) <-> "A" from the previous iteration. Backs up A in case the update is bad. - * data->global_prior <-> <-> Previously: "active_prior". Stores A from before iter0, i.e. the actual prior. - * Acopy <-> <-> Eliminated from code. Copy of A (at each iteration, before acceptance/rejection decision) - - * - * Am <-> A_m <-> Am = Um*Wm^(-1) - * Csc <-> C_sc^(1/2) <-> State scalings. Note the square root. - * Dm (in init1__) <-> Delta m <-> Anomalies of prior wrt. its mean (row i scaled by 1/(Csc[i]*sqrt(N-1))) - * Dm (in initA__) <-> Csc * Delta m <-> Anomalies of A wrt. its mean (only scaled by 1/sqrt(N-1)) - * Dk1 (in init2__) <-> Delta m <-> Anomailes of A (row i scaled by 1/(Csc[i]*sqrt(N-1))) - * Dk (in init2__) <-> C_sc^(-1) * (m - m_pr ) <-> Anomalies wrt. prior (as opposed to the mean; only scaled by Csc) - * dA1 (in initA__) <-> delta m_1 <-> Ensemble updates coming from data mismatch - * dA2 (in init2__) <-> delta m_2 <-> Ensemble updates coming from prior mismatch -*/ - - - - -//********************************************** -// Actual Algorithm, called through updateA() -//********************************************** - -// Just (pre)calculates data->Am = Um*Wm^(-1). -static void rml_enkf_init1__( rml_enkf_data_type * data) { - // Differentiate this routine from init2__, which actually calculates the prior mismatch update. - // This routine does not change any ensemble matrix. - // Um*Wm^(-1) are the scaled, truncated, right singular vectors of data->global_prior - - matrix_type * prior = matrix_alloc_column_compressed_copy( data->global_prior , data->ens_mask); - int state_size = matrix_get_rows( prior ); - int ens_size = matrix_get_columns( prior ); - int nrmin = util_int_min( ens_size , state_size); - matrix_type * Dm = matrix_alloc_copy( prior ); - matrix_type * Um = matrix_alloc( state_size , nrmin ); /* Left singular vectors. */ - matrix_type * VmT = matrix_alloc( nrmin , ens_size ); /* Right singular vectors. */ - double * Wm = util_calloc( nrmin , sizeof * Wm ); - double nsc = 1/sqrt(ens_size - 1); - - matrix_subtract_row_mean(Dm); - { - const double * Csc = data->Csc; - for (int i=0; i < state_size; i++){ - double sc = nsc / (Csc[i]); - matrix_scale_row( Dm , i , sc); - } - } - - // Um Wm VmT = Dm; nsign1 = num of non-zero singular values. - int nsign1 = enkf_linalg_svd_truncation(Dm , rml_enkf_config_get_truncation( data->config ) , -1 , DGESVD_MIN_RETURN , Wm , Um , VmT); - - // Am = Um*Wm^(-1). I.e. scale *columns* of Um - enkf_linalg_rml_enkfAm(Um, Wm, nsign1); - - data->Am = matrix_alloc_copy( Um ); - matrix_free(Um); - matrix_free(VmT); - matrix_free(Dm); - matrix_free(prior); - free(Wm); -} - - - -// Creates state scaling matrix -void rml_enkf_init_Csc(const rml_enkf_data_type * data ){ - // This seems a strange choice of scaling matrix. Review? - matrix_type * prior = matrix_alloc_column_compressed_copy( data->global_prior , data->ens_mask ); - { - int state_size = matrix_get_rows( prior ); - int ens_size = matrix_get_columns( prior ); - - for (int row=0; row < state_size; row++) { - double sumrow = matrix_get_row_sum(prior , row); - double tmp = sumrow / ens_size; - - if (abs(tmp)< 1) - data->Csc[row] = 0.05; - else - data->Csc[row] = 1.00; - - } - matrix_free( prior ); - } -} - -// Calculates update from data mismatch (delta m_1). Also provides SVD for later use. -static void rml_enkf_initA__(rml_enkf_data_type * data, matrix_type * A, matrix_type * S, matrix_type * Cd, matrix_type * E, matrix_type * D, matrix_type * Udr, double * Wdr, matrix_type * VdTr) { - - int ens_size = matrix_get_columns( S ); - int state_size = matrix_get_rows( A ); - double nsc = 1/sqrt(ens_size-1); - int nsign; - - // Perform SVD of tmp, where: tmp = diag_sqrt(Cd^(-1)) * centered(S) / sqrt(N-1) = Ud * Wd * Vd(T) - { - int nrobs = matrix_get_rows( S ); - matrix_type *tmp = matrix_alloc (nrobs, ens_size); - matrix_subtract_row_mean( S ); // Center S - matrix_inplace_diag_sqrt(Cd); // Assumes that Cd is diag! - matrix_matmul(tmp , Cd , S ); // - matrix_scale(tmp , nsc); // - - nsign = enkf_linalg_svd_truncation(tmp , rml_enkf_config_get_truncation( data->config ) , -1 , DGESVD_MIN_RETURN , Wdr , Udr , VdTr); - matrix_free( tmp ); - } - - // Calc X3 - { - matrix_type * X3 = matrix_alloc( ens_size, ens_size ); - { - matrix_type * X1 = matrix_alloc( nsign, ens_size); - matrix_type * X2 = matrix_alloc( nsign, ens_size ); - - - // See LM-EnRML algorithm in Oliver'2013 (Comp. Geo.) for meaning - enkf_linalg_rml_enkfX1(X1, Udr ,D ,Cd ); // X1 = Ud(T)*Cd(-1/2)*D -- D= -(dk-d0) - enkf_linalg_rml_enkfX2(X2, Wdr ,X1 ,data->lambda + 1 , nsign); // X2 = ((a*Ipd)+Wd^2)^-1 * X1 - enkf_linalg_rml_enkfX3(X3, VdTr ,Wdr,X2, nsign); // X3 = Vd *Wd*X2 - - matrix_free(X2); - matrix_free(X1); - } - - // Update A - { - matrix_type * dA1 = matrix_alloc( state_size , ens_size); - matrix_type * Dm = matrix_alloc_copy( A ); - - matrix_subtract_row_mean( Dm ); /* Remove the mean from the ensemble of model parameters*/ - matrix_scale(Dm, nsc); - - matrix_matmul(dA1, Dm , X3); - matrix_inplace_add(A,dA1); // dA - - matrix_free(Dm); - matrix_free(dA1); - } - matrix_free(X3); - - } -} - -// Calculate prior mismatch update (delta m_2). -void rml_enkf_init2__( rml_enkf_data_type * data, matrix_type *A, double * Wdr, matrix_type * VdTr) { - // Distinguish from init1__ which only makes preparations, and is only called at iter=0 - - - int state_size = matrix_get_rows( A ); - int ens_size = matrix_get_columns( A ); - double nsc = 1/sqrt(ens_size-1); - - matrix_type *Am = matrix_alloc_copy(data->Am); - matrix_type *Apr = matrix_alloc_column_compressed_copy(data->global_prior , data->ens_mask ); - - // fprintf(stdout,"\n"); - // fprintf(stdout,"A: %d x %d\n", matrix_get_rows(A), matrix_get_columns(A)); - // fprintf(stdout,"prior : %d x %d\n", matrix_get_rows(data->global_prior), matrix_get_columns(data->global_prior)); - // fprintf(stdout,"state : %d x %d\n", matrix_get_rows(data->previous_state), matrix_get_columns(data->previous_state)); - // fprintf(stdout,"Apr : %d x %d\n", matrix_get_rows(Apr), matrix_get_columns(Apr)); - // fprintf(stdout,"Am : %d x %d\n", matrix_get_rows(Am), matrix_get_columns(Am)); - // Example: - // A : 27760 x 10 - // prior : 27760 x 10 - // state : 27760 x 50 - // prior0 : 27760 x 50 - // Apr : 27760 x 10 - // Am : 27760 x 1 - - - int nsign1 = matrix_get_columns(data->Am); - - - matrix_type * X4 = matrix_alloc(nsign1,ens_size); - matrix_type * X5 = matrix_alloc(state_size,ens_size); - matrix_type * X6 = matrix_alloc(ens_size,ens_size); - matrix_type * X7 = matrix_alloc(ens_size,ens_size); - matrix_type * dA2 = matrix_alloc(state_size , ens_size); - matrix_type * Dk1 = matrix_alloc_copy( A ); - - // Dk = Csc^(-1) * (A - Aprior) - // X4 = Am' * Dk - { - matrix_type * Dk = matrix_alloc_copy( A ); - - matrix_inplace_sub( Dk , Apr ); - rml_enkf_common_scaleA(Dk , data->Csc , true); - - matrix_dgemm(X4 , Am , Dk , true, false, 1.0, 0.0); - matrix_free(Dk); - } - // X5 = Am * X4 - matrix_matmul(X5 , Am , X4); - - // Dk1 = Csc^(-1)/sqrt(N-1) * A*(I - 1/N*ones(m,N)) - matrix_subtract_row_mean(Dk1); // Dk1 = Dk1 * (I - 1/N*ones(m,N)) - rml_enkf_common_scaleA(Dk1 , data->Csc , true); // Dk1 = Csc^(-1) * Dk1 - matrix_scale(Dk1,nsc); // Dk1 = Dk1 / sqrt(N-1) - - // X6 = Dk1' * X5 - matrix_dgemm(X6, Dk1, X5, true, false, 1.0, 0.0); - - // X7 - enkf_linalg_rml_enkfX7(X7, VdTr , Wdr , data->lambda + 1, X6); - - // delta m_2 - rml_enkf_common_scaleA(Dk1 , data->Csc , false); - matrix_matmul(dA2 , Dk1 , X7); - matrix_inplace_sub(A, dA2); - - matrix_free(Am); - matrix_free(Apr); - matrix_free(X4); - matrix_free(X5); - matrix_free(X6); - matrix_free(X7); - matrix_free(dA2); - matrix_free(Dk1); -} - -// Initialize state and prior from A. Initialize lambda0, lambda. Call initA__, init1__ -static void rml_enkf_updateA_iter0(rml_enkf_data_type * data, matrix_type * A, matrix_type * S, matrix_type * R, matrix_type * dObs, matrix_type * E, matrix_type * D, matrix_type * Cd) { - - int ens_size = matrix_get_columns( S ); - int nrobs = matrix_get_rows( S ); - int nrmin = util_int_min( ens_size , nrobs); - int state_size = matrix_get_rows( A ); - matrix_type * Skm = matrix_alloc(ens_size, ens_size); // Mismatch - matrix_type * Ud = matrix_alloc( nrobs , nrmin ); /* Left singular vectors. */ - matrix_type * VdT = matrix_alloc( nrmin , ens_size ); /* Right singular vectors. */ - double * Wd = util_calloc( nrmin , sizeof * Wd ); - - data->Csc = util_calloc(state_size , sizeof * data->Csc); - data->Sk = enkf_linalg_data_mismatch(D,Cd,Skm); - data->Std = matrix_diag_std(Skm,data->Sk); - - { - double lambda0 = rml_enkf_config_get_lambda0( data->config ); - if (lambda0 < 0) - data->lambda = pow(10 , floor(log10(data->Sk/(2*nrobs))) ); - else - data->lambda = lambda0; - } - - - // state = A - rml_enkf_common_store_state( data->previous_state , A , data->ens_mask ); - - // prior = A - data->global_prior = matrix_alloc_copy( data->previous_state ); - - // Update dependant on data mismatch - rml_enkf_initA__(data , A, S , Cd , E , D , Ud , Wd , VdT); - // Update dependant on prior mismatch. This should be zero (coz iter0). - // Therefore the purpose of init1__ is just to prepare some matrices. - if (rml_enkf_config_get_use_prior(data->config)) { - rml_enkf_init_Csc( data ); - rml_enkf_init1__( data ); - } - - rml_enkf_write_iter_info(data, data->Sk , data->Sk, data->Std); - - matrix_free( Skm ); - matrix_free( Ud ); - matrix_free( VdT ); - free( Wd ); -} - - -void rml_enkf_updateA(void * module_data, matrix_type * A, matrix_type * S, matrix_type * R, matrix_type * dObs, matrix_type * E, matrix_type * D, const module_info_type* module_info) { -// A : ensemble matrix -// R : (Inv?) Obs error cov. -// S : measured ensemble -// dObs: observed data -// E : perturbations for obs -// D = dObs + E - S : Innovations (wrt pert. obs) -// module_info: Information on parameters/data for internal logging - - - - double Sk_new; // Mismatch - double Std_new; // Std dev(Mismatch) - rml_enkf_data_type * data = rml_enkf_data_safe_cast( module_data ); - int nrobs = matrix_get_rows( S ); // Num obs - int ens_size = matrix_get_columns( S ); // N - double nsc = 1/sqrt(ens_size-1); // Scale factor - matrix_type * Cd = matrix_alloc( nrobs, nrobs ); // Cov(E), where E = measurement perturbations? - - - // Empirical error covar. R is left unused. Investigate? - enkf_linalg_Covariance(Cd ,E ,nsc, nrobs); // Cd = SampCov(E) (including (N-1) normalization) - matrix_inv(Cd); // In-place inversion - - rml_enkf_log_open(data->rml_log , data->iteration_nr); - fprintf(stdout,"\nIter %d --> %d", data->iteration_nr, data->iteration_nr + 1); - - - if (data->iteration_nr == 0) { - // IF ITERATION 0 - rml_enkf_updateA_iter0(data , A , S , R , dObs , E , D , Cd); - data->iteration_nr++; - } else { - // IF ITERATION 1, 2, ... - int nrmin = util_int_min( ens_size , nrobs); // Min(p,N) - matrix_type * Ud = matrix_alloc( nrobs , nrmin ); // Left singular vectors. */ - matrix_type * VdT = matrix_alloc( nrmin , ens_size ); // Right singular vectors. */ - double * Wd = util_calloc( nrmin , sizeof * Wd ); // Singular values, vector - matrix_type * Skm = matrix_alloc(ens_size,ens_size); // Mismatch - Sk_new = enkf_linalg_data_mismatch(D,Cd,Skm); // Skm = D'*inv(Cd)*D; Sk_new = trace(Skm)/N - Std_new = matrix_diag_std(Skm,Sk_new); // Standard deviation of mismatches. - - - // Lambda = Normalized data mismatch (rounded) - if (rml_enkf_config_get_lambda_recalculate( data->config )) - data->lambda = pow(10 , floor(log10(Sk_new / (2*nrobs))) ); - - // Accept/Reject update? Lambda calculation. - { - bool mismatch_reduced = false; - bool std_reduced = false; - - if (Sk_new < data->Sk) - mismatch_reduced = true; - - if (Std_new <= data->Std) - std_reduced = true; - - rml_enkf_write_iter_info(data, data->Sk , Sk_new, Std_new); - - if (mismatch_reduced) { - /* - Stop check: if ( (1- (Sk_new/data->Sk)) < .0001) // check convergence ** model change norm has to be added in this!! - */ - - // Reduce Lambda - if (std_reduced) - data->lambda = data->lambda * rml_enkf_config_get_lambda_decrease_factor( data->config ); - - rml_enkf_common_store_state(data->previous_state , A , data->ens_mask ); - - data->Sk = Sk_new; - data->Std=Std_new; - data->iteration_nr++; - } else { - // Increase lambda - data->lambda = data->lambda * rml_enkf_config_get_lambda_increase_factor( data->config ); - // A = data->previous_state - rml_enkf_common_recover_state( data->previous_state , A , data->ens_mask ); - } - } - - // Update dependant on data mismatch (delta m_1) - rml_enkf_initA__(data , A , S , Cd , E , D , Ud , Wd , VdT); - - // Update dependant on prior mismatch (delta m_2) - if (rml_enkf_config_get_use_prior(data->config)) { - rml_enkf_init_Csc( data ); - rml_enkf_init2__(data , A , Wd , VdT); - } - - // Free - matrix_free(Skm); - matrix_free( Ud ); - matrix_free( VdT ); - free( Wd ); - } - - { - double lambda_min = rml_enkf_config_get_lambda_min( data->config ); - if (data->lambda < lambda_min) - data->lambda = lambda_min; - } - - - rml_enkf_log_close( data->rml_log ); - matrix_free(Cd); -} - - - -void rml_enkf_init_update(void * arg, const bool_vector_type * ens_mask, const matrix_type * S, const matrix_type * R, const matrix_type * dObs, const matrix_type * E, const matrix_type * D ) { - rml_enkf_data_type * module_data = rml_enkf_data_safe_cast( arg ); - - if (module_data->ens_mask) - bool_vector_free( module_data->ens_mask ); - - module_data->ens_mask = bool_vector_alloc_copy( ens_mask ); -} - - - - - - - -//********************************************** -// Set / Get basic types -//********************************************** -bool rml_enkf_set_int( void * arg , const char * var_name , int value) { - rml_enkf_data_type * module_data = rml_enkf_data_safe_cast( arg ); - { - bool name_recognized = true; - - if (strcmp( var_name , ENKF_NCOMP_KEY_) == 0) - rml_enkf_config_set_subspace_dimension(module_data->config , value); - else if (strcmp( var_name , ITER_KEY) == 0) - rml_enkf_set_iteration_nr( module_data , value ); - else - name_recognized = false; - - return name_recognized; - } -} - -int rml_enkf_get_int( const void * arg, const char * var_name) { - const rml_enkf_data_type * module_data = rml_enkf_data_safe_cast_const( arg ); - { - if (strcmp(var_name , ITER_KEY) == 0) - return module_data->iteration_nr; - else - return -1; - } -} - -bool rml_enkf_set_bool( void * arg , const char * var_name , bool value) { - rml_enkf_data_type * module_data = rml_enkf_data_safe_cast( arg ); - { - bool name_recognized = true; - - if (strcmp( var_name , USE_PRIOR_KEY) == 0) - rml_enkf_config_set_use_prior( module_data->config , value); - else if (strcmp( var_name , CLEAR_LOG_KEY) == 0) - rml_enkf_log_set_clear_log( module_data->rml_log , value ); - else if (strcmp( var_name , LAMBDA_RECALCULATE_KEY) == 0) - rml_enkf_config_set_lambda_recalculate( module_data->config , value ); - else - name_recognized = false; - - return name_recognized; - } -} - -bool rml_enkf_get_bool( const void * arg, const char * var_name) { - const rml_enkf_data_type * module_data = rml_enkf_data_safe_cast_const( arg ); - { - if (strcmp(var_name , USE_PRIOR_KEY) == 0) - return rml_enkf_config_get_use_prior( module_data->config ); - else if (strcmp(var_name , CLEAR_LOG_KEY) == 0) - return rml_enkf_log_get_clear_log( module_data->rml_log ); - else if (strcmp(var_name , LAMBDA_RECALCULATE_KEY) == 0) - return rml_enkf_config_get_lambda_recalculate( module_data->config ); - else - return false; - } -} - -bool rml_enkf_set_double( void * arg , const char * var_name , double value) { - rml_enkf_data_type * module_data = rml_enkf_data_safe_cast( arg ); - { - bool name_recognized = true; - - if (strcmp( var_name , ENKF_TRUNCATION_KEY_) == 0) - rml_enkf_config_set_truncation( module_data->config , value ); - else if (strcmp( var_name , LAMBDA_INCREASE_FACTOR_KEY) == 0) - rml_enkf_config_set_lambda_increase_factor( module_data->config , value ); - else if (strcmp( var_name , LAMBDA_REDUCE_FACTOR_KEY) == 0) - rml_enkf_config_set_lambda_decrease_factor( module_data->config , value ); - else if (strcmp( var_name , LAMBDA0_KEY) == 0) - rml_enkf_config_set_lambda0( module_data->config , value ); - else if (strcmp( var_name , LAMBDA_MIN_KEY) == 0) - rml_enkf_config_set_lambda_min( module_data->config , value ); - else - name_recognized = false; - - return name_recognized; - } -} - -double rml_enkf_get_double( const void * arg, const char * var_name) { - const rml_enkf_data_type * module_data = rml_enkf_data_safe_cast_const( arg ); - { - if (strcmp(var_name , LAMBDA_REDUCE_FACTOR_KEY) == 0) - return rml_enkf_config_get_lambda_decrease_factor(module_data->config); - - if (strcmp(var_name , LAMBDA_INCREASE_FACTOR_KEY) == 0) - return rml_enkf_config_get_lambda_increase_factor(module_data->config); - - if (strcmp(var_name , LAMBDA0_KEY) == 0) - return rml_enkf_config_get_lambda0(module_data->config); - - if (strcmp(var_name , LAMBDA_MIN_KEY) == 0) - return rml_enkf_config_get_lambda_min(module_data->config); - - if (strcmp(var_name , ENKF_TRUNCATION_KEY_) == 0) - return rml_enkf_config_get_truncation( module_data->config ); - - return -1; - } -} - - -bool rml_enkf_set_string( void * arg , const char * var_name , const char * value) { - rml_enkf_data_type * module_data = rml_enkf_data_safe_cast( arg ); - { - bool name_recognized = true; - - if (strcmp( var_name , LOG_FILE_KEY) == 0) - rml_enkf_log_set_log_file( module_data->rml_log , value ); - else - name_recognized = false; - - return name_recognized; - } -} - -long rml_enkf_get_options( void * arg , long flag ) { - rml_enkf_data_type * module_data = rml_enkf_data_safe_cast( arg ); - { - return rml_enkf_config_get_option_flags( module_data->config ); - } -} - -bool rml_enkf_has_var( const void * arg, const char * var_name) { - { - if (strcmp(var_name , ITER_KEY) == 0) - return true; - else if (strcmp(var_name , USE_PRIOR_KEY) == 0) - return true; - else if (strcmp(var_name , LAMBDA_INCREASE_FACTOR_KEY) == 0) - return true; - else if (strcmp(var_name , LAMBDA_REDUCE_FACTOR_KEY) == 0) - return true; - else if (strcmp(var_name , LAMBDA0_KEY) == 0) - return true; - else if (strcmp(var_name , LAMBDA_MIN_KEY) == 0) - return true; - else if (strcmp(var_name , LAMBDA_RECALCULATE_KEY) == 0) - return true; - else if (strcmp(var_name , ENKF_TRUNCATION_KEY_) == 0) - return true; - else if (strcmp(var_name , LOG_FILE_KEY) == 0) - return true; - else if (strcmp(var_name , CLEAR_LOG_KEY) == 0) - return true; - else - return false; - } -} - -void * rml_enkf_get_ptr( const void * arg , const char * var_name ) { - const rml_enkf_data_type * module_data = rml_enkf_data_safe_cast_const( arg ); - { - if (strcmp(var_name , LOG_FILE_KEY) == 0) - return (void *) rml_enkf_log_get_log_file( module_data->rml_log ); - else - return NULL; - } -} - - - - - - -//********************************************** -// Symbol table -//********************************************** -#ifdef INTERNAL_LINK -#define LINK_NAME RML_ENKF -#else -#define LINK_NAME EXTERNAL_MODULE_SYMBOL -#endif - - -analysis_table_type LINK_NAME = { - .name = "RML_ENKF", - .alloc = rml_enkf_data_alloc, - .freef = rml_enkf_data_free, - .set_int = rml_enkf_set_int , - .set_double = rml_enkf_set_double , - .set_bool = rml_enkf_set_bool, - .set_string = rml_enkf_set_string, - .get_options = rml_enkf_get_options , - .initX = NULL, - .updateA = rml_enkf_updateA , - .init_update = rml_enkf_init_update , - .complete_update = NULL, - .has_var = rml_enkf_has_var, - .get_int = rml_enkf_get_int, - .get_double = rml_enkf_get_double, - .get_bool = rml_enkf_get_bool, - .get_ptr = rml_enkf_get_ptr, -}; - diff --git a/ThirdParty/Ert/libanalysis/modules/rml_enkf_common.c b/ThirdParty/Ert/libanalysis/modules/rml_enkf_common.c deleted file mode 100644 index fdc541bfbc..0000000000 --- a/ThirdParty/Ert/libanalysis/modules/rml_enkf_common.c +++ /dev/null @@ -1,91 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'rml_enkf.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include - - -// Explanation -// zzz_enkf_common_store_state( state , A ,ens_mask) assigns A to state. RESIZES state to rows(A)-by-LEN(ens_mask) -// zzz_enkf_common_recover_state(state , A ,ens_mask) assigns state to A. RESIZES A to rows(state)-by-SUM(ens_mask) - - -void rml_enkf_common_store_state( matrix_type * state , const matrix_type * A , const bool_vector_type * ens_mask ) { - matrix_resize( state , matrix_get_rows( A ) , bool_vector_size( ens_mask ) , false); - { - const int ens_size = bool_vector_size( ens_mask ); - int active_index = 0; - for (int iens = 0; iens < ens_size; iens++) { - if (bool_vector_iget( ens_mask , iens )) { - matrix_copy_column( state , A , iens , active_index ); - active_index++; - } else - matrix_set_const_column( state , iens , 0); - } - } -} - - - -void rml_enkf_common_recover_state( const matrix_type * state , matrix_type * A , const bool_vector_type * ens_mask ) { - const int ens_size = bool_vector_size( ens_mask ); - const int active_size = bool_vector_count_equal( ens_mask , true ); - const int rows = matrix_get_rows( state ); - - matrix_resize( A , rows , active_size , false ); - { - int active_index = 0; - for (int iens = 0; iens < ens_size; iens++) { - if (bool_vector_iget( ens_mask , iens )) { - matrix_copy_column( A , state , active_index , iens ); - active_index++; - } - } - } -} - - - -// Scale rows by the entries in the vector Csc -void rml_enkf_common_scaleA(matrix_type *A , const double * Csc, bool invert ){ - int nrows = matrix_get_rows(A); - if (invert) { - for (int i=0; i< nrows ; i++) { - double sc= 1/Csc[i]; - matrix_scale_row(A, i, sc); - } - } else { - for (int i=0; i< nrows ; i++) { - double sc= Csc[i]; - matrix_scale_row(A, i, sc); - } - } -} diff --git a/ThirdParty/Ert/libanalysis/modules/rml_enkf_common.h b/ThirdParty/Ert/libanalysis/modules/rml_enkf_common.h deleted file mode 100644 index f288b56419..0000000000 --- a/ThirdParty/Ert/libanalysis/modules/rml_enkf_common.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef ERT_RML_ENKF_COMMON_H -#define ERT_RML_ENKF_COMMON_H - -#include - -#include -#include -#include - - -void rml_enkf_common_store_state( matrix_type * state , const matrix_type * A , const bool_vector_type * ens_mask ); -void rml_enkf_common_recover_state( const matrix_type * state , matrix_type * A , const bool_vector_type * ens_mask ); -void rml_enkf_common_scaleA(matrix_type *A , const double * Csc, bool invert ); - -#endif diff --git a/ThirdParty/Ert/libanalysis/modules/rml_enkf_config.c b/ThirdParty/Ert/libanalysis/modules/rml_enkf_config.c deleted file mode 100644 index 6e9ff18287..0000000000 --- a/ThirdParty/Ert/libanalysis/modules/rml_enkf_config.c +++ /dev/null @@ -1,168 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA, Norway. - - The file 'rml_enkf_config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include - -#include -#include - -#include - - -#define INVALID_SUBSPACE_DIMENSION -1 -#define INVALID_TRUNCATION -1 - -#define DEFAULT_SUBSPACE_DIMENSION INVALID_SUBSPACE_DIMENSION -#define DEFAULT_USE_PRIOR true - -#define DEFAULT_LAMBDA_INCREASE_FACTOR 4 -#define DEFAULT_LAMBDA_REDUCE_FACTOR 0.1 -#define DEFAULT_LAMBDA0 -1 -#define DEFAULT_LAMBDA_MIN 0.01 -#define DEFAULT_LAMBDA_RECALCULATE false - - - -#define RML_ENKF_CONFIG_TYPE_ID 61400061 - -struct rml_enkf_config_struct { - UTIL_TYPE_ID_DECLARATION; - double truncation; // Controlled by config key: ENKF_TRUNCATION_KEY - int subspace_dimension; // Controlled by config key: ENKF_NCOMP_KEY (-1: use Truncation instead) - long option_flags; - bool use_prior; // Use exact/approximate scheme? Approximate scheme drops the "prior" term in the LM step. - - - double lambda0; - double lambda_min; - double lambda_decrease_factor; - double lambda_increase_factor; - bool lambda_recalculate; -}; - - - - - - - -rml_enkf_config_type * rml_enkf_config_alloc() { - rml_enkf_config_type * config = util_malloc( sizeof * config ); - UTIL_TYPE_ID_INIT( config , RML_ENKF_CONFIG_TYPE_ID ); - - rml_enkf_config_set_truncation( config , DEFAULT_ENKF_TRUNCATION_); - rml_enkf_config_set_subspace_dimension( config , DEFAULT_SUBSPACE_DIMENSION); - rml_enkf_config_set_use_prior( config , DEFAULT_USE_PRIOR ); - rml_enkf_config_set_option_flags( config , ANALYSIS_NEED_ED + ANALYSIS_UPDATE_A + ANALYSIS_ITERABLE + ANALYSIS_SCALE_DATA); - - rml_enkf_config_set_lambda_min( config , DEFAULT_LAMBDA_MIN ); - rml_enkf_config_set_lambda0( config , DEFAULT_LAMBDA0 ); - rml_enkf_config_set_lambda_decrease_factor( config , DEFAULT_LAMBDA_REDUCE_FACTOR ); - rml_enkf_config_set_lambda_increase_factor( config , DEFAULT_LAMBDA_INCREASE_FACTOR ); - rml_enkf_config_set_lambda_recalculate( config , DEFAULT_LAMBDA_RECALCULATE ); - - return config; -} - - -bool rml_enkf_config_get_use_prior( const rml_enkf_config_type * config ) { - return config->use_prior; -} - -void rml_enkf_config_set_use_prior( rml_enkf_config_type * config , bool use_prior) { - config->use_prior = use_prior; -} - - -double rml_enkf_config_get_truncation( rml_enkf_config_type * config ) { - return config->truncation; -} - -void rml_enkf_config_set_truncation( rml_enkf_config_type * config , double truncation) { - config->truncation = truncation; - if (truncation > 0.0) - config->subspace_dimension = INVALID_SUBSPACE_DIMENSION; -} - -int rml_enkf_config_get_subspace_dimension( rml_enkf_config_type * config ) { - return config->subspace_dimension; -} - -void rml_enkf_config_set_subspace_dimension( rml_enkf_config_type * config , int subspace_dimension) { - config->subspace_dimension = subspace_dimension; - if (subspace_dimension > 0) - config->truncation = INVALID_TRUNCATION; -} - -void rml_enkf_config_set_option_flags( rml_enkf_config_type * config , long flags) { - config->option_flags = flags; -} - -long rml_enkf_config_get_option_flags( const rml_enkf_config_type * config ) { - return config->option_flags; -} - -double rml_enkf_config_get_lambda0( rml_enkf_config_type * config ) { - return config->lambda0; -} - -void rml_enkf_config_set_lambda0( rml_enkf_config_type * config , double lambda0) { - config->lambda0 = lambda0; -} - - -double rml_enkf_config_get_lambda_min( rml_enkf_config_type * config ) { - return config->lambda_min; -} - -void rml_enkf_config_set_lambda_min( rml_enkf_config_type * config , double lambda_min) { - config->lambda_min = lambda_min; -} - - -double rml_enkf_config_get_lambda_increase_factor( rml_enkf_config_type * config ) { - return config->lambda_increase_factor; -} - -void rml_enkf_config_set_lambda_increase_factor( rml_enkf_config_type * config , double lambda_increase_factor) { - config->lambda_increase_factor = lambda_increase_factor; -} - -double rml_enkf_config_get_lambda_decrease_factor( rml_enkf_config_type * config ) { - return config->lambda_decrease_factor; -} - -void rml_enkf_config_set_lambda_decrease_factor( rml_enkf_config_type * config , double lambda_decrease_factor) { - config->lambda_decrease_factor = lambda_decrease_factor; -} - - -bool rml_enkf_config_get_lambda_recalculate( const rml_enkf_config_type * config ) { - return config->lambda_recalculate; -} - -void rml_enkf_config_set_lambda_recalculate( rml_enkf_config_type * config , bool lambda_recalculate) { - config->lambda_recalculate = lambda_recalculate; -} - - -void rml_enkf_config_free(rml_enkf_config_type * config) { - free( config ); -} diff --git a/ThirdParty/Ert/libanalysis/modules/rml_enkf_config.h b/ThirdParty/Ert/libanalysis/modules/rml_enkf_config.h deleted file mode 100644 index 8173b9f7e6..0000000000 --- a/ThirdParty/Ert/libanalysis/modules/rml_enkf_config.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA, Norway. - - The file 'rml_enkf_config.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef RML_ENKF_CONFIG_H -#define RML_ENKF_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif - - -typedef struct rml_enkf_config_struct rml_enkf_config_type; - - - rml_enkf_config_type * rml_enkf_config_alloc(); - void rml_enkf_config_free(rml_enkf_config_type * config); - - int rml_enkf_config_get_subspace_dimension( rml_enkf_config_type * config ); - void rml_enkf_config_set_subspace_dimension( rml_enkf_config_type * config , int subspace_dimension); - - double rml_enkf_config_get_truncation( rml_enkf_config_type * config ); - void rml_enkf_config_set_truncation( rml_enkf_config_type * config , double truncation); - - bool rml_enkf_config_get_use_prior( const rml_enkf_config_type * config ); - void rml_enkf_config_set_use_prior( rml_enkf_config_type * config , bool use_prior); - - void rml_enkf_config_set_option_flags( rml_enkf_config_type * config , long flags); - long rml_enkf_config_get_option_flags( const rml_enkf_config_type * config ); - - double rml_enkf_config_get_lambda0( rml_enkf_config_type * config ); - void rml_enkf_config_set_lambda0( rml_enkf_config_type * config , double lambda0); - - double rml_enkf_config_get_lambda_min( rml_enkf_config_type * config ); - void rml_enkf_config_set_lambda_min( rml_enkf_config_type * config , double lambda_min); - - double rml_enkf_config_get_lambda_increase_factor( rml_enkf_config_type * config ); - void rml_enkf_config_set_lambda_increase_factor( rml_enkf_config_type * config , double lambda_increase_factor); - - double rml_enkf_config_get_lambda_decrease_factor( rml_enkf_config_type * config ); - void rml_enkf_config_set_lambda_decrease_factor( rml_enkf_config_type * config , double lambda_decrease_factor); - - bool rml_enkf_config_get_lambda_recalculate( const rml_enkf_config_type * config ); - void rml_enkf_config_set_lambda_recalculate( rml_enkf_config_type * config , bool lambda_recalculate); - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libanalysis/modules/rml_enkf_log.c b/ThirdParty/Ert/libanalysis/modules/rml_enkf_log.c deleted file mode 100644 index 3ee3f7443d..0000000000 --- a/ThirdParty/Ert/libanalysis/modules/rml_enkf_log.c +++ /dev/null @@ -1,108 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA, Norway. - - The file 'rml_enkf_log.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include - -#include - -#include - -#define DEFAULT_LOG_FILE "rml_enkf.out" -#define DEFAULT_CLEAR_LOG true - -struct rml_enkf_log_struct { - bool clear_log; - char * log_file; - FILE * log_stream; -}; - - -rml_enkf_log_type * rml_enkf_log_alloc() { - rml_enkf_log_type * rml_log = util_malloc( sizeof * rml_log ); - rml_log->log_file = NULL; - rml_log->log_stream = NULL; - rml_enkf_log_set_clear_log( rml_log , DEFAULT_CLEAR_LOG ); - return rml_log; -} - -bool rml_enkf_log_get_clear_log( const rml_enkf_log_type * data ) { - return data->clear_log; -} - -void rml_enkf_log_set_clear_log( rml_enkf_log_type * data , bool clear_log) { - data->clear_log = clear_log; -} - -void rml_enkf_log_set_log_file( rml_enkf_log_type * data , const char * log_file ) { - data->log_file = util_realloc_string_copy( data->log_file , log_file ); -} - -const char * rml_enkf_log_get_log_file( const rml_enkf_log_type * data) { - return data->log_file; -} - - -void rml_enkf_log_free(rml_enkf_log_type * rml_log) { - rml_enkf_log_close( rml_log ); - util_safe_free( rml_log->log_file ); - free( rml_log ); -} - - -void rml_enkf_log_open( rml_enkf_log_type * rml_log , int iteration_nr ) { - if (rml_log->log_file) { - if ( iteration_nr == 0) { - - if (rml_log->clear_log) - rml_log->log_stream = util_mkdir_fopen( rml_log->log_file , "w"); - else - rml_log->log_stream = util_mkdir_fopen( rml_log->log_file , "a"); - - } else - rml_log->log_stream = util_fopen( rml_log->log_file , "a"); - } -} - - -bool rml_enkf_log_is_open( const rml_enkf_log_type * rml_log ) { - if (rml_log->log_stream) - return true; - else - return false; -} - - -void rml_enkf_log_close( rml_enkf_log_type * rml_log ) { - if (rml_log->log_stream) - fclose( rml_log->log_stream ); - - rml_log->log_stream = NULL; -} - - -void rml_enkf_log_line( rml_enkf_log_type * rml_log , const char * fmt , ...) { - if (rml_log->log_stream) { - va_list ap; - va_start(ap , fmt); - vfprintf( rml_log->log_stream , fmt , ap ); - va_end( ap ); - } -} - diff --git a/ThirdParty/Ert/libanalysis/modules/rml_enkf_log.h b/ThirdParty/Ert/libanalysis/modules/rml_enkf_log.h deleted file mode 100644 index 2c61d655e7..0000000000 --- a/ThirdParty/Ert/libanalysis/modules/rml_enkf_log.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA, Norway. - - The file 'rml_enkf_log.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef RML_ENKF_LOG_H -#define RML_ENKF_LOG_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - - typedef struct rml_enkf_log_struct rml_enkf_log_type; - - rml_enkf_log_type * rml_enkf_log_alloc(); - void rml_enkf_log_free(rml_enkf_log_type * rml_log); - bool rml_enkf_log_get_clear_log( const rml_enkf_log_type * data ); - void rml_enkf_log_set_clear_log( rml_enkf_log_type * data , bool clear_log); - void rml_enkf_log_set_log_file( rml_enkf_log_type * data , const char * log_file ); - const char * rml_enkf_log_get_log_file( const rml_enkf_log_type * data); - void rml_enkf_log_open( rml_enkf_log_type * rml_log , int iteration_nr ); - void rml_enkf_log_close( rml_enkf_log_type * rml_log ); - void rml_enkf_log_line( rml_enkf_log_type * rml_log , const char * fmt , ...); - bool rml_enkf_log_is_open( const rml_enkf_log_type * rml_log ); - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/ThirdParty/Ert/libanalysis/modules/std_enkf_debug.c b/ThirdParty/Ert/libanalysis/modules/std_enkf_debug.c deleted file mode 100644 index 8ae6a8b1b7..0000000000 --- a/ThirdParty/Ert/libanalysis/modules/std_enkf_debug.c +++ /dev/null @@ -1,245 +0,0 @@ -/* - Copyright (C) 2016 Statoil ASA, Norway. - - This file is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#define PREFIX_KEY "PREFIX" -#define DEFAULT_PREFIX "debug" - -/* - A random 'magic' integer id which is used for run-time type checking - of the input data. -*/ -#define STD_ENKF_DEBUG_TYPE_ID 269923 - -typedef struct std_enkf_debug_data_struct std_enkf_debug_data_type; - -struct std_enkf_debug_data_struct { - UTIL_TYPE_ID_DECLARATION; - std_enkf_data_type * std_data; - char * prefix; - int update_count; -}; - - -static UTIL_SAFE_CAST_FUNCTION_CONST( std_enkf_debug_data , STD_ENKF_DEBUG_TYPE_ID ) -static UTIL_SAFE_CAST_FUNCTION( std_enkf_debug_data , STD_ENKF_DEBUG_TYPE_ID ) - - -void std_enkf_debug_data_set_prefix( std_enkf_debug_data_type * data , const char * prefix ) { - data->prefix = util_realloc_string_copy( data->prefix , prefix ); -} - - -void * std_enkf_debug_data_alloc( rng_type * rng) { - std_enkf_debug_data_type * data = util_malloc( sizeof * data ); - UTIL_TYPE_ID_INIT( data , STD_ENKF_DEBUG_TYPE_ID ); - data->std_data = std_enkf_data_alloc( rng ); - - data->update_count = 0; - data->prefix = NULL; - std_enkf_debug_data_set_prefix( data , DEFAULT_PREFIX ); - return data; -} - - -void std_enkf_debug_data_free( void * arg ) { - std_enkf_debug_data_type * data = std_enkf_debug_data_safe_cast( arg ); - std_enkf_data_free( data->std_data ); - free( data ); -} - -void std_enkf_debug_save_matrix( const matrix_type * m , const char * path , const char * file, bool transpose) { - char * filename = util_alloc_filename( path , file , NULL ); - - if (transpose) { - matrix_type * mt = matrix_alloc_transpose( m ); - matrix_dump_csv(mt,filename); - matrix_free( mt ); - } else - matrix_dump_csv(m , filename); - - - free( filename ); -} - - - -void std_enkf_debug_initX(void * module_data , - matrix_type * X , - matrix_type * A , - matrix_type * S , - matrix_type * R , - matrix_type * dObs , - matrix_type * E , - matrix_type * D) { - - std_enkf_debug_data_type * data = std_enkf_debug_data_safe_cast( module_data ); - char * debug_path = util_alloc_sprintf( "%s/%d" , data->prefix , data->update_count ); - std_enkf_data_type * std_data = data->std_data; - util_make_path( debug_path ); - std_enkf_debug_save_matrix( A , debug_path , "prior_ert.csv" , true); - - std_enkf_debug_save_matrix( S , debug_path , "S.csv" , true); - std_enkf_debug_save_matrix( S , debug_path , "simResponses.csv" , true); - - std_enkf_debug_save_matrix( E , debug_path , "E.csv" , true); - std_enkf_debug_save_matrix( E , debug_path , "measurementErrors.csv" , true); - - std_enkf_debug_save_matrix( R , debug_path , "R.csv" , true); - std_enkf_debug_save_matrix( D , debug_path , "D.csv" , true); - { - matrix_type * value = matrix_alloc_sub_copy( dObs , 0 , 0 , matrix_get_rows( dObs ) , 1 ); - matrix_type * std = matrix_alloc_sub_copy( dObs , 0 , 1 , matrix_get_rows( dObs ) , 1 ); - - std_enkf_debug_save_matrix( value , debug_path , "observations.csv", true); - std_enkf_debug_save_matrix( std , debug_path , "observations_std.csv", true); - - matrix_free( value ); - matrix_free( std ); - } - std_enkf_initX( std_data , X , A , S , R , dObs , E , D ); - { - matrix_type * posterior = matrix_alloc_matmul( A , X ); - std_enkf_debug_save_matrix( posterior , debug_path , "posterior_ert.csv" , true); - matrix_free( posterior ); - } - - data->update_count++; -} - - - - - - - -bool std_enkf_debug_set_double( void * arg , const char * var_name , double value) { - std_enkf_debug_data_type * module_data = std_enkf_debug_data_safe_cast( arg ); - return std_enkf_set_double( module_data->std_data , var_name , value ); -} - - -bool std_enkf_debug_set_int( void * arg , const char * var_name , int value) { - std_enkf_debug_data_type * module_data = std_enkf_debug_data_safe_cast( arg ); - return std_enkf_set_int( module_data->std_data , var_name , value ); -} - - -bool std_enkf_debug_set_bool( void * arg , const char * var_name , bool value) { - std_enkf_debug_data_type * module_data = std_enkf_debug_data_safe_cast( arg ); - return std_enkf_set_bool( module_data->std_data , var_name , value ); -} - - -bool std_enkf_debug_set_string( void * arg , const char * var_name , const char * value) { - std_enkf_debug_data_type * module_data = std_enkf_debug_data_safe_cast( arg ); - if (strcmp(var_name, PREFIX_KEY) == 0) { - std_enkf_debug_data_set_prefix( module_data , value ); - return true; - } else - return false; -} - - - -long std_enkf_debug_get_options( void * arg , long flag ) { - const std_enkf_debug_data_type * module_data = std_enkf_debug_data_safe_cast_const( arg ); - long options = std_enkf_get_options( module_data->std_data , flag ); - options |= ANALYSIS_USE_A; - return options; -} - - -bool std_enkf_debug_has_var( const void * arg, const char * var_name) { - if (strcmp(var_name , PREFIX_KEY) == 0) - return true; - else { - const std_enkf_debug_data_type * module_data = std_enkf_debug_data_safe_cast_const( arg ); - return std_enkf_has_var( module_data->std_data , var_name ); - } -} - - -double std_enkf_debug_get_double( const void * arg, const char * var_name) { - const std_enkf_debug_data_type * module_data = std_enkf_debug_data_safe_cast_const( arg ); - return std_enkf_get_double( module_data->std_data , var_name ); -} - -int std_enkf_debug_get_int( const void * arg, const char * var_name) { - const std_enkf_debug_data_type * module_data = std_enkf_debug_data_safe_cast_const( arg ); - return std_enkf_get_int( module_data->std_data , var_name ); -} - - -bool std_enkf_debug_get_bool( const void * arg, const char * var_name) { - const std_enkf_debug_data_type * module_data = std_enkf_debug_data_safe_cast_const( arg ); - return std_enkf_get_bool( module_data->std_data , var_name ); -} - - -void * std_enkf_debug_get_ptr( const void * arg, const char * var_name) { - const std_enkf_debug_data_type * module_data = std_enkf_debug_data_safe_cast_const( arg ); - if (strcmp( var_name , PREFIX_KEY) == 0) - return (void *) module_data->prefix; - else - return NULL; -} - - - -#ifdef INTERNAL_LINK -#define LINK_NAME STD_ENKF_DEBUG -#else -#define LINK_NAME EXTERNAL_MODULE_SYMBOL -#endif - - -analysis_table_type LINK_NAME = { - .name = "STD_ENKF_DEBUG_DEBUG", - .alloc = std_enkf_debug_data_alloc, - .freef = std_enkf_debug_data_free, - .set_int = std_enkf_debug_set_int , - .set_double = std_enkf_debug_set_double , - .set_bool = std_enkf_debug_set_bool, - .set_string = std_enkf_debug_set_string, - .get_options = std_enkf_debug_get_options , - .initX = std_enkf_debug_initX , - .updateA = NULL, - .init_update = NULL, - .complete_update = NULL, - .has_var = std_enkf_debug_has_var, - .get_int = std_enkf_debug_get_int, - .get_double = std_enkf_debug_get_double, - .get_bool = std_enkf_debug_get_bool, - .get_ptr = std_enkf_debug_get_ptr -}; - diff --git a/ThirdParty/Ert/libanalysis/modules/tests/CMakeLists.txt b/ThirdParty/Ert/libanalysis/modules/tests/CMakeLists.txt deleted file mode 100644 index 6463497ffa..0000000000 --- a/ThirdParty/Ert/libanalysis/modules/tests/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -add_executable(analysis_rml_enkf_common analysis_rml_enkf_common.c ../rml_enkf_common.c) -target_link_libraries( analysis_rml_enkf_common analysis util test_util ) - -add_test( analysis_rml_enkf_common ${EXECUTABLE_OUTPUT_PATH}/analysis_rml_enkf_common ) - diff --git a/ThirdParty/Ert/libanalysis/modules/tests/analysis_rml_enkf_common.c b/ThirdParty/Ert/libanalysis/modules/tests/analysis_rml_enkf_common.c deleted file mode 100644 index 355eeaca1f..0000000000 --- a/ThirdParty/Ert/libanalysis/modules/tests/analysis_rml_enkf_common.c +++ /dev/null @@ -1,133 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'analysis_rml_common.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include - -#include - - - -void test_store_recover_state() { - rng_type * rng = rng_alloc( MZRAN , INIT_DEFAULT ); - int ens_size = 10; - int active_size = 8; - int rows = 100; - matrix_type * state = matrix_alloc(1,1); - bool_vector_type * ens_mask = bool_vector_alloc(ens_size , false); - matrix_type * A = matrix_alloc( rows , active_size); - matrix_type * A2 = matrix_alloc( rows, active_size ); - matrix_type * A3 = matrix_alloc( 1,1 ); - - for (int i=0; i < active_size; i++) - bool_vector_iset( ens_mask , i + 1 , true ); - - matrix_random_init(A , rng); - rml_enkf_common_store_state( state , A , ens_mask ); - - test_assert_int_equal( matrix_get_rows( state ) , rows ); - test_assert_int_equal( matrix_get_columns( state ) , ens_size ); - - { - int g; - int a = 0; - for (g=0; g < ens_size; g++) { - if (bool_vector_iget( ens_mask , g )) { - test_assert_true( matrix_columns_equal( state , g , A , a )); - a++; - } - } - } - - rml_enkf_common_recover_state( state , A2 , ens_mask); - rml_enkf_common_recover_state( state , A3 , ens_mask); - test_assert_true( matrix_equal( A , A2 )); - test_assert_true( matrix_equal( A , A3 )); - - bool_vector_free( ens_mask ); - matrix_free( state ); - matrix_free( A ); -} - - - - - -void test_scaleA() { - const int N = 10; - matrix_type * m1 = matrix_alloc(N , N); - matrix_type * m2 = matrix_alloc(N , N); - double * csc = util_calloc( N , sizeof * csc ); - rng_type * rng = rng_alloc( MZRAN , INIT_DEFAULT ); - - matrix_random_init( m1 , rng ); - matrix_assign(m2 , m1); - test_assert_true( matrix_equal(m1 , m2)); - - { - for (int i=0; i < N; i++) - csc[i] = (i + 2); - } - rml_enkf_common_scaleA( m1 , csc , false ); - { - int row,col; - for (row = 0; row < N; row++) { - for (col=0; col < N; col++) { - double v1 = matrix_iget(m1 , row , col); - double v2 = matrix_iget(m2 , row , col); - - test_assert_double_equal( v1 , v2 * csc[row] ); - } - } - } - rml_enkf_common_scaleA( m2 , csc , false ); - test_assert_true( matrix_equal(m1 , m2)); - - rml_enkf_common_scaleA( m2 , csc , true ); - { - int row,col; - for (row = 0; row < N; row++) { - for (col=0; col < N; col++) { - double v1 = matrix_iget(m1 , row , col); - double v2 = matrix_iget(m2 , row , col); - - test_assert_double_equal( v1 , v2 * csc[row] ); - } - } - } - rml_enkf_common_scaleA( m1 , csc , true ); - test_assert_true( matrix_equal(m1 , m2)); - - - rng_free( rng ); - matrix_free(m1); - matrix_free(m2); - free( csc ); -} - - - -int main(int argc , char ** argv) { - test_store_recover_state(); - test_scaleA(); - exit(0); -} - diff --git a/ThirdParty/Ert/libanalysis/script/CMakeLists.txt b/ThirdParty/Ert/libanalysis/script/CMakeLists.txt deleted file mode 100644 index ce8e9028fb..0000000000 --- a/ThirdParty/Ert/libanalysis/script/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -set (destination ${CMAKE_INSTALL_PREFIX}/bin) - -install(PROGRAMS ert_module DESTINATION ${destination}) - -if (INSTALL_GROUP) - install(CODE "EXECUTE_PROCESS(COMMAND chgrp ${INSTALL_GROUP} ${destination}/ert_module)") - install(CODE "EXECUTE_PROCESS(COMMAND chmod g+w ${destination}/ert_module)") -endif() diff --git a/ThirdParty/Ert/libanalysis/script/ert_module b/ThirdParty/Ert/libanalysis/script/ert_module deleted file mode 100644 index 57a4d34683..0000000000 --- a/ThirdParty/Ert/libanalysis/script/ert_module +++ /dev/null @@ -1,239 +0,0 @@ -#!/usr/bin/env python -import sys -import os -import os.path -from optparse import OptionParser - -ert_root = os.path.realpath( os.path.join(os.path.dirname( os.path.realpath( os.path.abspath( __file__))) , "../") ) - -#----------------------------------------------------------------- - -default_lib_list = ["analysis" , "ert_util"] -default_define_list = ["HAVE_PTHREAD" , "COMPILER_GCC"] - - -CFLAGS = "-std=gnu99 -O2 -Wall -fpic -g" -LDFLAGS_list = ["-shared"] -CC = "gcc" -LD = CC - -#----------------------------------------------------------------- - - -c_file = 0 -header_file = 1 -object_file = 2 -other = 3 - -file_types = {".o" : object_file , - ".h" : header_file , - ".c" : c_file } - -def base_name(file): - (name,ext) = os.path.split( file ) - return name - - -def file_type( file ): - name,ext = os.path.splitext( file ) - return file_types.get( ext , other ) - - -def object_file_name( file ): - (name,ext) = os.path.splitext( file ) - return "%s.o" % name - - -def make_LDFLAGS( use_rpath , lib_path_list): - if use_rpath: - LDFLAGS_list.append("-Wl,--enable-new-dtags") - for path in lib_path_list: - LDFLAGS_list.append("-Wl,-rpath,%s" % path) - LDFLAGS_list.append("-Wl,-soname,") - - return " ".join(LDFLAGS_list) - - -def make_XFLAG( X , def_list ): - FLAG = "" - for d in def_list: - FLAG += "-%s%s " % (X , d) - return FLAG - - -def compile_file( file , IFLAG , DFLAG , verbose): - target = object_file_name( file ) - if os.path.exists( target ): - os.unlink( target ) - - cmd = "%s %s %s %s -c %s -o %s" % (CC , CFLAGS , IFLAG , DFLAG , file , target) - if verbose: - print "Compiling: %s" % cmd - os.system( cmd ) - if os.path.exists( target ): - return target - else: - sys.exit("Compile cmd:%s failed" % cmd) - - -def link( soname , filename , object_list , LDFLAGS , LFLAG , lFLAG , verbose): - object_string = "" - for obj in object_list: - object_string += "%s " % obj - - cmd = "%s %s%s -o %s %s %s %s" % ( LD , LDFLAGS , soname , filename , object_string , LFLAG , lFLAG) - if verbose: - print "Linking : %s" % cmd - if os.path.exists( filename ): - os.unlink( filename ) - os.system(cmd) - if os.path.exists( filename ): - return True - else: - return False - - -usage = """ -The ert_module script is a small convenience script to -compile C source code into an analysis module which can -be loaded by ert. The script is controlled by commandline -arguments: - - 1. The first argument should be the name of the module - you are creating, an extension .so will be appended. - - 2. List the source files you want to include, the - files should have extension .c. In addition you can - include object files which have been compiled by - other means, the object files should have - extension .o - - 3. Optionally you can pass -I and -D options which are - passed to the compiler; and -l and -L options which - are passed to the linker. - -Example: - - ert_module my_module my_src1.c my_src2.c f90_object1.o f90_object2.o -I/path -DFAST=Yes -L/path/to/lib -lfm -lz - -Will create a module 'my_module' based on the src files my_src1.c -and my_src2.c; in addition the object files f90_object1.o and -f90_object2.o will be included in the final module. - ------------------------------------------------------------------ - -To compile the module code you will typically need the include files -and libraries from an existing ert installation. By default the -ert_module script will locate the ert installation based on the -location of the script, but you can pass the option: - - --ert-root=/path/where/ert/is/installed - -The --ert-root option should point to a directory containing the -lib64/ and include/ directories of a binary etr distribution. In -addition to --ert-root you can use the normal -L/path/to/lib option to -send in additional link path arguments. - -By default the path to shared libraries will not be embedded in the -resulting module, but by passing the option --use-rpath you can tell -the script to embed these paths in the final shared object. - ------------------------------------------------------------------ - -Options summary: - - -L/path/to/lib: Include the path /path/to/lib in the linker path - - -llib1 : Link with the library lib1 - - -I/include : Include the path /include in the compiler include path. - - --ert-root=/path/to/ert : Use this is as root for ert headers - and libraries. [Default: inferred from location of script] - - --use-rpath : Embed library paths in shared objects. Default off. - - --exclude-ert: Do not use any ert default libraries or headers - - -Default flags: - -Compile: %s %s %s -Link: %s %s %s -""" % (CC, - make_XFLAG( "I" , ["./" , "%s/include" % ert_root]) , - make_XFLAG( "D" , default_define_list) , - LD , - make_XFLAG("L" , ["%s/lib64" % ert_root]) , - make_XFLAG("l" , default_lib_list)) - -parser = OptionParser( usage ) -parser.add_option("--ert-root" , dest="ert_root" , action="store") -parser.add_option("-I" , dest = "include_path_list", action = "append" , default = []) -parser.add_option("-D" , dest = "define_list" , action = "append" , default = []) -parser.add_option("-L" , dest = "lib_path_list" , action = "append" , default = []) -parser.add_option("-l" , dest = "lib_list" , action = "append" , default = []) -parser.add_option("--exclude-ert" , dest = "exclude_ert" , action="store_true" , default = False) -parser.add_option("--use-rpath" , dest="use_rpath" , action="store_true" , default = False) -parser.add_option("--silent" , dest="silent" , action="store_true" , default = False) - -(options , args) = parser.parse_args() -if len(args) == 0: - sys.exit( usage ) - -if options.ert_root: - ert_root = options.ert_root - -if options.exclude_ert: - default_include_path_list = ["./"] - default_lib_path_list = [] - default_lib_list = [] -else: - default_include_path_list = ["./" , "%s/include" % ert_root] - default_lib_path_list = ["%s/lib64" % ert_root] - default_lib_list = default_lib_list - - -# What is supplied as commandline options should take presedence, this -# implies that it should be first OR last on the commandline. -include_path_list = options.include_path_list + default_include_path_list -define_list = default_define_list + options.define_list -lib_list = options.lib_list + default_lib_list -lib_path_list = options.lib_path_list + default_lib_path_list - - -verbose = not options.silent -LDFLAGS = make_LDFLAGS( options.use_rpath , lib_path_list) -input_name = args[0] -(path , tmp ) = os.path.split( input_name ) -(module , ext) = os.path.splitext( tmp ) - -soname = "%s.so" % module -if path: - filename = "%s/%s.so" % (path , module) - if not os.path.exists( path ): - os.makedirs( path ) -else: - filename = "%s.so" % module - -#----------------------------------------------------------------- - -IFLAG = make_XFLAG( "I" , include_path_list ) -DFLAG = make_XFLAG( "D" , define_list ) -LFLAG = make_XFLAG( "L" , lib_path_list ) -lFLAG = make_XFLAG( "l" , lib_list ) - -object_list = [] -for arg in args[1:]: - if file_type( arg ) == c_file: - object_list.append( compile_file( arg , IFLAG , DFLAG , verbose) ) - elif file_type( arg ) == object_file: - object_list.append( arg ) - else: - print "** Warning: ignoring file:%s" % arg - - -if link( soname , filename , object_list , LDFLAGS , LFLAG , lFLAG , verbose): - sys.exit() -else: - sys.exit("Creating library failed") diff --git a/ThirdParty/Ert/libanalysis/src/CMakeLists.txt b/ThirdParty/Ert/libanalysis/src/CMakeLists.txt deleted file mode 100644 index 84d3198959..0000000000 --- a/ThirdParty/Ert/libanalysis/src/CMakeLists.txt +++ /dev/null @@ -1,25 +0,0 @@ -# Common libanalysis library -set( source_files analysis_module.c enkf_linalg.c std_enkf.c sqrt_enkf.c cv_enkf.c bootstrap_enkf.c null_enkf.c fwd_step_enkf.c fwd_step_log.c module_data_block.c module_data_block_vector.c module_obs_block.c module_obs_block_vector.c module_info.c) -set( header_files analysis_module.h enkf_linalg.h analysis_table.h std_enkf.h fwd_step_enkf.h fwd_step_log.h module_data_block.h module_data_block_vector.h module_obs_block.h module_obs_block_vector.h module_info.h) -add_library( analysis SHARED ${source_files} ) -set_target_properties( analysis PROPERTIES COMPILE_DEFINITIONS INTERNAL_LINK) -set_target_properties( analysis PROPERTIES VERSION ${ERT_VERSION_MAJOR}.${ERT_VERSION_MINOR} SOVERSION ${ERT_VERSION_MAJOR} ) - -target_link_libraries( analysis ert_util ) -target_link_libraries( analysis dl ) - -if (USE_RUNPATH) - add_runpath( analysis ) -endif() - - -#----------------------------------------------------------------- - -if (INSTALL_ERT) - install(TARGETS analysis DESTINATION ${CMAKE_INSTALL_LIBDIR}) - #install(TARGETS rml_enkf DESTINATION ${CMAKE_INSTALL_LIBDIR}) - foreach(header ${header_files}) - install(FILES ../include/ert/analysis/${header} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/ert/analysis) - endforeach() -endif() - diff --git a/ThirdParty/Ert/libanalysis/src/analysis_module.c b/ThirdParty/Ert/libanalysis/src/analysis_module.c deleted file mode 100644 index 59aec768a0..0000000000 --- a/ThirdParty/Ert/libanalysis/src/analysis_module.c +++ /dev/null @@ -1,463 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'analysis_module.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -#define ANALYSIS_MODULE_TYPE_ID 6610123 - -struct analysis_module_struct { - UTIL_TYPE_ID_DECLARATION; - void * lib_handle; - void * module_data; - char * symbol_table; - char * lib_name; - - analysis_free_ftype * freef; - analysis_alloc_ftype * alloc; - analysis_initX_ftype * initX; - analysis_updateA_ftype * updateA; - analysis_init_update_ftype * init_update; - analysis_complete_update_ftype * complete_update; - - analysis_get_options_ftype * get_options; - analysis_set_int_ftype * set_int; - analysis_set_double_ftype * set_double; - analysis_set_bool_ftype * set_bool; - analysis_set_string_ftype * set_string; - - analysis_has_var_ftype * has_var; - analysis_get_int_ftype * get_int; - analysis_get_double_ftype * get_double; - analysis_get_bool_ftype * get_bool; - analysis_get_ptr_ftype * get_ptr; - - bool internal; - char * user_name; /* String used to identify this module for the user; not used in - the linking process. */ -}; - - - -static analysis_module_type * analysis_module_alloc_empty( const char * symbol_table , const char * lib_name) { - analysis_module_type * module = util_malloc( sizeof * module ); - UTIL_TYPE_ID_INIT( module , ANALYSIS_MODULE_TYPE_ID ); - - module->lib_handle = NULL; - module->initX = NULL; - module->updateA = NULL; - module->set_int = NULL; - module->set_bool = NULL; - module->set_double = NULL; - module->set_string = NULL; - module->module_data = NULL; - module->init_update = NULL; - module->complete_update = NULL; - module->has_var = NULL; - module->get_int = NULL; - module->get_double = NULL; - module->get_bool = NULL; - module->get_ptr = NULL; - module->alloc = NULL; - - module->user_name = NULL; - module->symbol_table = util_alloc_string_copy( symbol_table ); - module->lib_name = util_alloc_string_copy( lib_name ); - - return module; -} - - -static bool analysis_module_internal_check( analysis_module_type * module ) { - if (!module->user_name) - fprintf(stderr,"Invalid module loaded from lib:%s / symbol_table:%s - name not set\n", module->lib_name , module->symbol_table); - - return true; -} - - -static analysis_module_type * analysis_module_alloc__( rng_type * rng , - const analysis_table_type * table , - const char * symbol_table , - const char * lib_name , - void * lib_handle ) { - - analysis_module_type * module = analysis_module_alloc_empty( symbol_table , lib_name ); - - module->lib_handle = lib_handle; - module->initX = table->initX; - module->updateA = table->updateA; - module->init_update = table->init_update; - module->complete_update = table->complete_update; - module->set_int = table->set_int; - module->set_double = table->set_double; - module->set_string = table->set_string; - module->set_bool = table->set_bool; - module->alloc = table->alloc; - module->freef = table->freef; - module->get_options = table->get_options; - module->has_var = table->has_var; - module->get_int = table->get_int; - module->get_double = table->get_double; - module->get_bool = table->get_bool; - module->get_ptr = table->get_ptr; - analysis_module_set_name( module , table->name ); - - if (module->alloc) - module->module_data = module->alloc( rng ); - - if (!analysis_module_internal_check( module )) { - fprintf(stderr,"** Warning loading module: %s failed - internal inconsistency\n", module->user_name); - analysis_module_free( module ); - module = NULL; - } - - return module; -} - - - - - -static analysis_module_type * analysis_module_alloc( rng_type * rng , - const char * libname , - const char * table_name , - bool verbose, - analysis_module_load_status_enum * load_status) { - analysis_module_type * module = NULL; - void * lib_handle = dlopen( libname , RTLD_NOW ); - if (lib_handle != NULL) { - analysis_table_type * analysis_table = (analysis_table_type *) dlsym( lib_handle , table_name ); - if (analysis_table != NULL) { - *load_status = LOAD_OK; - module = analysis_module_alloc__( rng , analysis_table , table_name , libname , lib_handle ); - } else { - *load_status = LOAD_SYMBOL_TABLE_NOT_FOUND; - if (verbose) - fprintf(stderr , "Failed to load symbol table:%s Error:%s \n",table_name , dlerror()); - } - - if (module == NULL) - dlclose( lib_handle ); - } else { - *load_status = DLOPEN_FAILURE; - if (verbose) - fprintf(stderr , "Failed to load library:%s Error:%s \n",libname , dlerror()); - } - - if (module != NULL) { - if (libname == NULL) - module->internal = true; - else - module->internal = false; - } - - return module; -} - -analysis_module_type * analysis_module_alloc_internal__( rng_type * rng , const char * symbol_table , bool verbose , analysis_module_load_status_enum * load_status) { - return analysis_module_alloc( rng , NULL , symbol_table , verbose , load_status); -} - -analysis_module_type * analysis_module_alloc_internal( rng_type * rng , const char * symbol_table ) { - analysis_module_load_status_enum load_status; - return analysis_module_alloc_internal__( rng , symbol_table , true , &load_status); -} - - -analysis_module_type * analysis_module_alloc_external__(rng_type * rng , const char * lib_name , bool verbose , analysis_module_load_status_enum * load_status) { - return analysis_module_alloc( rng , lib_name , EXTERNAL_MODULE_NAME , verbose , load_status); -} - - -analysis_module_type * analysis_module_alloc_external( rng_type * rng , const char * lib_name) { - analysis_module_load_status_enum load_status; - return analysis_module_alloc_external__( rng , lib_name , true , &load_status); -} - -/*****************************************************************/ - -const char * analysis_module_get_name( const analysis_module_type * module ) { - return module->user_name; -} - -void analysis_module_set_name( analysis_module_type * module , const char * name) { - module->user_name = util_realloc_string_copy( module->user_name , name ); -} - - -const char * analysis_module_get_table_name( const analysis_module_type * module) { - return module->symbol_table; -} - -const char * analysis_module_get_lib_name( const analysis_module_type * module) { - return module->lib_name; -} - -bool analysis_module_internal( const analysis_module_type * module ) { - return module->internal; -} - -/*****************************************************************/ - -static UTIL_SAFE_CAST_FUNCTION( analysis_module , ANALYSIS_MODULE_TYPE_ID ) -UTIL_IS_INSTANCE_FUNCTION( analysis_module , ANALYSIS_MODULE_TYPE_ID ) - - -void analysis_module_free( analysis_module_type * module ) { - if (module->freef != NULL) - module->freef( module->module_data ); - - util_safe_free( module->lib_name ); - free( module->user_name ); - free( module->symbol_table ); - dlclose( module->lib_handle ); - free( module ); -} - - -void analysis_module_free__( void * arg) { - analysis_module_type * module = analysis_module_safe_cast( arg ); - analysis_module_free( module ); -} - -/*****************************************************************/ -/* Update functions */ - - -void analysis_module_initX(analysis_module_type * module , - matrix_type * X , - matrix_type * A , - matrix_type * S , - matrix_type * R , - matrix_type * dObs , - matrix_type * E , - matrix_type * D ) { - - - module->initX(module->module_data , X , A , S , R , dObs , E , D ); -} - - -void analysis_module_updateA(analysis_module_type * module , - matrix_type * A , - matrix_type * S , - matrix_type * R , - matrix_type * dObs , - matrix_type * E , - matrix_type * D , - const module_info_type* module_info) { - - module->updateA(module->module_data , A , S , R , dObs , E , D, module_info); -} - - - - -void analysis_module_init_update( analysis_module_type * module , - const bool_vector_type * ens_mask , - const matrix_type * S , - const matrix_type * R , - const matrix_type * dObs , - const matrix_type * E , - const matrix_type * D ) { - if (module->init_update != NULL) - module->init_update( module->module_data , ens_mask , S , R , dObs , E , D); -} - - -void analysis_module_complete_update( analysis_module_type * module ) { - if (module->complete_update != NULL) - module->complete_update( module->module_data ); -} - -/*****************************************************************/ - - -static bool analysis_module_set_int(analysis_module_type * module , const char * flag , int value) { - if (module->set_int != NULL) - return module->set_int( module->module_data , flag , value ); - else - return false; -} - -static bool analysis_module_set_double(analysis_module_type * module , const char * var , double value) { - if (module->set_double != NULL) - return module->set_double( module->module_data , var , value ); - else - return false; -} - - -static bool analysis_module_set_bool(analysis_module_type * module , const char * var , bool value) { - if (module->set_bool != NULL) - return module->set_bool( module->module_data , var , value ); - else - return false; -} - - -static bool analysis_module_set_string(analysis_module_type * module , const char * var , const char * value) { - if (module->set_string != NULL) - return module->set_string( module->module_data , var , value ); - else - return false; -} - - - -/* - The input value typically comes from the configuration system and - is in terms of a string, irrespective of the fundamental type of - the underlying parameter. The algorithm for setting the parameter - tries datatypes as follows: integer - double - string. - - For the numeric datatypes the algorithm is two step: - - 1. Try the conversion string -> numeric. - 2. Try calling the analysis_module_set_xxx() function. - - Observe that this implies that the same variable name can NOT be - used for different variable types. -*/ - -bool analysis_module_set_var( analysis_module_type * module , const char * var_name , const char * string_value ) { - bool set_ok = false; - { - int int_value; - - if (util_sscanf_int( string_value , &int_value )) - set_ok = analysis_module_set_int( module , var_name , int_value ); - - - if (set_ok) - return true; - } - - { - double double_value; - if (util_sscanf_double( string_value , &double_value )) - set_ok = analysis_module_set_double( module , var_name , double_value ); - - if (set_ok) - return true; - } - - { - bool bool_value; - if (util_sscanf_bool( string_value , &bool_value)) - set_ok = analysis_module_set_bool( module , var_name , bool_value ); - - if (set_ok) - return true; - } - - - set_ok = analysis_module_set_string( module , var_name , string_value ); - if (!set_ok) - fprintf(stderr,"** Warning: failed to set %s=%s for analysis module:%s\n", var_name , string_value , module->user_name); - - return set_ok; -} - - -bool analysis_module_check_option( const analysis_module_type * module , long flag) { - if ((flag & module->get_options( module->module_data , flag )) == flag) - return true; - else - return false; -} - - -bool analysis_module_has_var( const analysis_module_type * module , const char * var) { - if (module->has_var) - return module->has_var( module->module_data , var ); - else - return false; -} - - -int analysis_module_get_int( const analysis_module_type * module , const char * var) { - if (analysis_module_has_var( module , var )) { - if (module->get_int != NULL) - return module->get_int( module->module_data , var ); - else - util_exit("%s: Tried to get integer variable:%s from module:%s - get_int() method not implemented for this module\n" , __func__ , var , module->user_name); - } else - util_exit("%s: Tried to get integer variable:%s from module:%s - module does not support this variable \n" , __func__ , var , module->user_name); - - return 0; -} - - -bool analysis_module_get_bool( const analysis_module_type * module , const char * var) { - if (analysis_module_has_var( module , var )) { - if (module->get_bool != NULL) - return module->get_bool( module->module_data , var ); - else - util_exit("%s: Tried to get bool variable:%s from module:%s - get_int() method not implemented for this module\n" , __func__ , var , module->user_name); - } else - util_exit("%s: Tried to get bool variable:%s from module:%s - module does not support this variable \n" , __func__ , var , module->user_name); - - return false; -} - - -double analysis_module_get_double( const analysis_module_type * module , const char * var) { - if (analysis_module_has_var( module , var )) { - if (module->get_double != NULL) - return module->get_double( module->module_data , var ); - else - util_exit("%s: Tried to get double variable:%s from module:%s - get_double() method not implemented for this module\n" , __func__ , var , module->user_name); - } else - util_exit("%s: Tried to get double variable:%s from module:%s - module does not support this variable \n" , __func__ , var , module->user_name); - - return 0; -} - - -void * analysis_module_get_ptr( const analysis_module_type * module , const char * var) { - if (analysis_module_has_var( module , var )) { - if (module->get_double != NULL) - return module->get_ptr( module->module_data , var ); - else - util_exit("%s: Tried to get pointer variable:%s from module:%s - get_ptr() method not implemented for this module\n" , __func__ , var , module->user_name); - } else - util_exit("%s: Tried to get pointer variable:%s from module:%s - module does not support this variable \n" , __func__ , var , module->user_name); - - return NULL; -} - - -/*****************************************************************/ - -const char * analysis_module_flag_enum_iget( int index, int * value) { - return util_enum_iget( index , ANALYSIS_MODULE_FLAG_ENUM_SIZE , (const util_enum_element_type []) { ANALYSIS_MODULE_FLAG_ENUM_DEFS }, value); -} - diff --git a/ThirdParty/Ert/libanalysis/src/bootstrap_enkf.c b/ThirdParty/Ert/libanalysis/src/bootstrap_enkf.c deleted file mode 100644 index 29c7980b53..0000000000 --- a/ThirdParty/Ert/libanalysis/src/bootstrap_enkf.c +++ /dev/null @@ -1,300 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'bootstrap_enkf.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - - -#define BOOTSTRAP_ENKF_TYPE_ID 741223 - -#define INVALID_SUBSPACE_DIMENSION -1 -#define INVALID_TRUNCATION -1 -#define DEFAULT_TRUNCATION 0.95 -#define DEFAULT_NCOMP INVALID_SUBSPACE_DIMENSION - -#define DEFAULT_DO_CV false -#define DEFAULT_NFOLDS 10 -#define NFOLDS_KEY "BOOTSTRAP_NFOLDS" - - -typedef struct { - UTIL_TYPE_ID_DECLARATION; - std_enkf_data_type * std_enkf_data; - cv_enkf_data_type * cv_enkf_data; - rng_type * rng; - long option_flags; - bool doCV; -} bootstrap_enkf_data_type; - - -static UTIL_SAFE_CAST_FUNCTION( bootstrap_enkf_data , BOOTSTRAP_ENKF_TYPE_ID ) -static UTIL_SAFE_CAST_FUNCTION_CONST( bootstrap_enkf_data , BOOTSTRAP_ENKF_TYPE_ID ) - - -void bootstrap_enkf_set_doCV( bootstrap_enkf_data_type * data , bool doCV) { - data->doCV = doCV; -} - - - -void bootstrap_enkf_set_truncation( bootstrap_enkf_data_type * boot_data , double truncation ) { - std_enkf_set_truncation( boot_data->std_enkf_data , truncation ); - cv_enkf_set_truncation( boot_data->cv_enkf_data , truncation ); -} - - -void bootstrap_enkf_set_subspace_dimension( bootstrap_enkf_data_type * boot_data , int ncomp) { - std_enkf_set_subspace_dimension( boot_data->std_enkf_data , ncomp ); - cv_enkf_set_subspace_dimension( boot_data->cv_enkf_data , ncomp ); -} - - -void * bootstrap_enkf_data_alloc( rng_type * rng ) { - bootstrap_enkf_data_type * boot_data = util_malloc( sizeof * boot_data ); - UTIL_TYPE_ID_INIT( boot_data , BOOTSTRAP_ENKF_TYPE_ID ); - - boot_data->std_enkf_data = std_enkf_data_alloc( NULL ); - boot_data->cv_enkf_data = cv_enkf_data_alloc( rng ); - - boot_data->rng = rng; - bootstrap_enkf_set_truncation( boot_data , DEFAULT_TRUNCATION ); - bootstrap_enkf_set_subspace_dimension( boot_data , DEFAULT_NCOMP ); - bootstrap_enkf_set_doCV( boot_data , DEFAULT_DO_CV); - boot_data->option_flags = ANALYSIS_NEED_ED + ANALYSIS_UPDATE_A + ANALYSIS_SCALE_DATA; - return boot_data; -} - - - - - -void bootstrap_enkf_data_free( void * arg ) { - bootstrap_enkf_data_type * boot_data = bootstrap_enkf_data_safe_cast( arg ); - { - std_enkf_data_free( boot_data->std_enkf_data ); - cv_enkf_data_free( boot_data->cv_enkf_data ); - } - free( boot_data ); -} - - -static int ** alloc_iens_resample( rng_type * rng , int ens_size ) { - int ** iens_resample; - int iens; - - iens_resample = util_calloc( ens_size , sizeof * iens_resample ); - for (iens = 0; iens < ens_size; iens++) - iens_resample[iens] = util_calloc( ens_size , sizeof( ** iens_resample ) ); - - { - int i,j; - for (i=0; i < ens_size; i++) - for (j=0; j < ens_size; j++) - iens_resample[i][j] = rng_get_int( rng , ens_size ); - } - return iens_resample; -} - - -static void free_iens_resample( int ** iens_resample, int ens_size ) { - for (int i=0; i < ens_size; i++) - free( iens_resample[i] ); - free( iens_resample ); -} - - - -void bootstrap_enkf_updateA(void * module_data , - matrix_type * A , - matrix_type * S , - matrix_type * R , - matrix_type * dObs , - matrix_type * E , - matrix_type * D , - const module_info_type* module_info) { - - bootstrap_enkf_data_type * bootstrap_data = bootstrap_enkf_data_safe_cast( module_data ); - { - const int num_cpu_threads = 4; - int ens_size = matrix_get_columns( A ); - matrix_type * X = matrix_alloc( ens_size , ens_size ); - matrix_type * A0 = matrix_alloc_copy( A ); - matrix_type * S_resampled = matrix_alloc_copy( S ); - matrix_type * A_resampled = matrix_alloc( matrix_get_rows(A0) , matrix_get_columns( A0 )); - int ** iens_resample = alloc_iens_resample( bootstrap_data->rng , ens_size ); - { - int ensemble_members_loop; - for ( ensemble_members_loop = 0; ensemble_members_loop < ens_size; ensemble_members_loop++) { - int unique_bootstrap_components; - int ensemble_counter; - /* Resample A and meas_data. Here we are careful to resample the working copy.*/ - { - { - int_vector_type * bootstrap_components = int_vector_alloc( ens_size , 0); - for (ensemble_counter = 0; ensemble_counter < ens_size; ensemble_counter++) { - int random_column = iens_resample[ ensemble_members_loop][ensemble_counter]; - int_vector_iset( bootstrap_components , ensemble_counter , random_column ); - matrix_copy_column( A_resampled , A0 , ensemble_counter , random_column ); - matrix_copy_column( S_resampled , S , ensemble_counter , random_column ); - } - int_vector_select_unique( bootstrap_components ); - unique_bootstrap_components = int_vector_size( bootstrap_components ); - int_vector_free( bootstrap_components ); - } - - if (bootstrap_data->doCV) { - const bool_vector_type * ens_mask = NULL; - cv_enkf_init_update( bootstrap_data->cv_enkf_data , ens_mask , S_resampled , R , dObs , E , D); - cv_enkf_initX( bootstrap_data->cv_enkf_data , X , A_resampled , S_resampled , R , dObs , E , D); - } else - std_enkf_initX(bootstrap_data->std_enkf_data , X , NULL , S_resampled,R, dObs, E,D ); - - - matrix_inplace_matmul_mt1( A_resampled , X , num_cpu_threads ); - matrix_inplace_add( A_resampled , A0 ); - matrix_copy_column( A , A_resampled, ensemble_members_loop, ensemble_members_loop); - - } - } - } - - - free_iens_resample( iens_resample , ens_size); - matrix_free( X ); - matrix_free( S_resampled ); - matrix_free( A_resampled ); - matrix_free( A0 ); - } -} - - - - - - -long bootstrap_enkf_get_options( void * arg , long flag) { - bootstrap_enkf_data_type * bootstrap_data = bootstrap_enkf_data_safe_cast( arg ); - { - return bootstrap_data->option_flags; - } -} - - -bool bootstrap_enkf_set_double( void * arg , const char * var_name , double value) { - bootstrap_enkf_data_type * bootstrap_data = bootstrap_enkf_data_safe_cast( arg ); - { - if (std_enkf_set_double( bootstrap_data->std_enkf_data , var_name , value )) - return true; - else { - return false; - } - } -} - - -bool bootstrap_enkf_set_int( void * arg , const char * var_name , int value) { - bootstrap_enkf_data_type * bootstrap_data = bootstrap_enkf_data_safe_cast( arg ); - { - if (std_enkf_set_int( bootstrap_data->std_enkf_data , var_name , value )) - return true; - else { - return false; - } - } -} - - -bool bootstrap_enkf_set_bool( void * arg , const char * var_name , bool value) { - bootstrap_enkf_data_type * bootstrap_data = bootstrap_enkf_data_safe_cast( arg ); - { - bool name_recognized = true; - - if (strcmp( var_name , "CV" ) == 0) - bootstrap_data->doCV = value; - else - name_recognized = false; - - return name_recognized; - } -} - - -bool bootstrap_enkf_has_var( const void * arg, const char * var_name) { - const bootstrap_enkf_data_type * module_data = bootstrap_enkf_data_safe_cast_const( arg ); - { - return std_enkf_has_var(module_data->std_enkf_data, var_name); - } -} - -double bootstrap_enkf_get_double( const void * arg, const char * var_name) { - const bootstrap_enkf_data_type * module_data = bootstrap_enkf_data_safe_cast_const( arg ); - { - return std_enkf_get_double( module_data->std_enkf_data , var_name); - } -} - -int bootstrap_enkf_get_int( const void * arg, const char * var_name) { - const bootstrap_enkf_data_type * module_data = bootstrap_enkf_data_safe_cast_const( arg ); - { - return std_enkf_get_int( module_data->std_enkf_data , var_name); - } -} - - - - -#ifdef INTERNAL_LINK -#define LINK_NAME BOOTSTRAP_ENKF -#else -#define LINK_NAME EXTERNAL_MODULE_SYMBOL -#endif - - -analysis_table_type LINK_NAME = { - .name = "BOOTSTRAP_ENKF", - .alloc = bootstrap_enkf_data_alloc, - .freef = bootstrap_enkf_data_free, - .set_int = bootstrap_enkf_set_int , - .set_double = bootstrap_enkf_set_double , - .set_bool = bootstrap_enkf_set_bool , - .set_string = NULL , - .get_options = bootstrap_enkf_get_options , - .initX = NULL, - .updateA = bootstrap_enkf_updateA, - .init_update = NULL, - .complete_update = NULL, - .has_var = bootstrap_enkf_has_var, - .get_int = bootstrap_enkf_get_int, - .get_double = bootstrap_enkf_get_double, - .get_bool = NULL, - .get_ptr = NULL, -}; diff --git a/ThirdParty/Ert/libanalysis/src/cv_enkf.c b/ThirdParty/Ert/libanalysis/src/cv_enkf.c deleted file mode 100644 index b00574c83d..0000000000 --- a/ThirdParty/Ert/libanalysis/src/cv_enkf.c +++ /dev/null @@ -1,721 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'cv_enkf.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#define CV_ENKF_TYPE_ID 765523 - -#define INVALID_SUBSPACE_DIMENSION -1 -#define INVALID_TRUNCATION -1 -#define DEFAULT_SUBSPACE_DIMENSION INVALID_SUBSPACE_DIMENSION - -#define DEFAULT_NFOLDS 10 -#define DEFAULT_PEN_PRESS false -#define NFOLDS_KEY "CV_NFOLDS" -#define CV_PEN_PRESS_KEY "CV_PEN_PRESS" - - - - -struct cv_enkf_data_struct { - UTIL_TYPE_ID_DECLARATION; - matrix_type * Z; - matrix_type * Rp; - matrix_type * Dp; - rng_type * rng; - double truncation; - int nfolds; - int subspace_dimension; // ENKF_NCOMP_KEY (-1: use Truncation instead) - long option_flags; - bool penalised_press; -}; - - - -static UTIL_SAFE_CAST_FUNCTION( cv_enkf_data , CV_ENKF_TYPE_ID ) -static UTIL_SAFE_CAST_FUNCTION_CONST( cv_enkf_data , CV_ENKF_TYPE_ID ) - - -void cv_enkf_set_truncation( cv_enkf_data_type * data , double truncation ) { - data->truncation = truncation; - if (truncation > 0.0) - data->subspace_dimension = INVALID_SUBSPACE_DIMENSION; -} - - -void cv_enkf_set_subspace_dimension( cv_enkf_data_type * data , int subspace_dimension) { - data->subspace_dimension = subspace_dimension; - if (subspace_dimension > 0) - data->truncation = INVALID_TRUNCATION; -} - - -void cv_enkf_set_nfolds( cv_enkf_data_type * data , int nfolds ) { - data->nfolds = nfolds; -} - -void cv_enkf_set_pen_press( cv_enkf_data_type * data , bool value ) { - data->penalised_press = value; -} - - -void * cv_enkf_data_alloc( rng_type * rng ) { - cv_enkf_data_type * data = util_malloc( sizeof * data); - UTIL_TYPE_ID_INIT( data , CV_ENKF_TYPE_ID ); - - data->Z = NULL; - data->Rp = NULL; - data->Dp = NULL; - data->rng = rng; - - data->penalised_press = DEFAULT_PEN_PRESS; - data->option_flags = ANALYSIS_NEED_ED + ANALYSIS_USE_A + ANALYSIS_SCALE_DATA; - data->nfolds = DEFAULT_NFOLDS; - cv_enkf_set_truncation( data , DEFAULT_ENKF_TRUNCATION_ ); - - return data; -} - - - -void cv_enkf_data_free( void * arg ) { - cv_enkf_data_type * cv_data = cv_enkf_data_safe_cast( arg ); - { - matrix_safe_free( cv_data->Z ); - matrix_safe_free( cv_data->Rp ); - matrix_safe_free( cv_data->Dp ); - } - free( cv_data ); -} - - - - - - -void cv_enkf_init_update( void * arg , - const bool_vector_type * ens_mask , - const matrix_type * S , - const matrix_type * R , - const matrix_type * dObs , - const matrix_type * E , - const matrix_type * D ) { - - cv_enkf_data_type * cv_data = cv_enkf_data_safe_cast( arg ); - { - int i, j; - const int nrobs = matrix_get_rows( S ); - const int nrens = matrix_get_columns( S ); - const int nrmin = util_int_min( nrobs , nrens ); - - cv_data->Z = matrix_alloc( nrmin , nrens ); - cv_data->Rp = matrix_alloc( nrmin , nrmin ); - cv_data->Dp = matrix_alloc( nrmin , nrens ); - - /* - Compute SVD(S) - */ - matrix_type * U0 = matrix_alloc( nrobs , nrmin ); /* Left singular vectors. */ - matrix_type * V0T = matrix_alloc( nrmin , nrens ); /* Right singular vectors. */ - - double * inv_sig0 = util_calloc( nrmin , sizeof * inv_sig0 ); - double * sig0 = inv_sig0; - - printf("Computing svd using truncation %0.4f\n",cv_data->truncation); - - enkf_linalg_svdS(S , cv_data->truncation , cv_data->subspace_dimension , DGESVD_MIN_RETURN , inv_sig0 , U0 , V0T); - - /* Need to use the original non-inverted singular values. */ - for(i = 0; i < nrmin; i++) - if ( inv_sig0[i] > 0 ) - sig0[i] = 1.0 / inv_sig0[i]; - - /* - Compute the actual principal components, Z = sig0 * VOT - NOTE: Z contains potentially alot of redundant zeros, but - we do not care about this for now - */ - - for(i = 0; i < nrmin; i++) - for(j = 0; j < nrens; j++) - matrix_iset( cv_data->Z , i , j , sig0[i] * matrix_iget( V0T , i , j ) ); - - /* Also compute Rp */ - { - matrix_type * X0 = matrix_alloc( nrmin , matrix_get_rows( R )); - matrix_dgemm(X0 , U0 , R , true , false , 1.0 , 0.0); /* X0 = U0^T * R */ - matrix_dgemm(cv_data->Rp , X0 , U0 , false , false , 1.0 , 0.0); /* Rp = X0 * U0 */ - matrix_free(X0); - } - - /*We also need to compute the reduced "Innovation matrix" Dp = U0' * D */ - matrix_dgemm(cv_data->Dp , U0 , D , true , false , 1.0 , 0.0); - - - free(inv_sig0); - matrix_free(U0); - matrix_free(V0T); - - /* - 2: Diagonalize the S matrix; singular vectors etc. needed later in the local CV: - (V0T = transposed right singular vectors of S, Z = scaled principal components, - eig = scaled, inverted singular vectors, U0 = left singular vectors of S - eig = inv(I+Lambda1),(Eq.14.30, and 14.29, Evensen, 2007, respectively) - */ - } -} - - - -/*Function that computes the PRESS for different subspace dimensions using - m-fold CV - INPUT : - A : State-Vector ensemble matrix - Z : Ensemble matrix of principal components - Rp : Reduced order Observation error matrix - indexTrain: index of training ensemble - indexTest: index of test ensemble - nTest : number of members in the training ensemble - nTrain . number of members in the test ensemble - foldIndex: integer specifying which "cv-fold" we are considering - - OUTPUT: - cvErr : UPDATED MATRIX OF PRESS VALUES - -*/ - -static void cv_enkf_get_cv_error_prin_comp( cv_enkf_data_type * cv_data , - matrix_type * cvErr , - const matrix_type * A , - const int * indexTest, - const int * indexTrain , - const int nTest , - const int nTrain , - const int foldIndex, - const int maxP) { - /* - We need to predict ATest(p), for p = 1,...,nens -1, based on the estimated regression model: - AHatTest(p) = A[:,indexTrain] * Z[1:p,indexTrain]'* inv( Z[1:p,indexTrain] * Z[1:p,indexTrain]' + (nens-1) * Rp[1:p,1:p] ) * Z[1:p,indexTest]; - */ - - - const int nx = matrix_get_rows( A ); - matrix_type * AHat = matrix_alloc(nx , nTest ); - matrix_type * ATrain = matrix_alloc( nx , nTrain ); - - int p,i,j; - - - /* Copy elements*/ - for (i = 0; i < nx; i++) - for (j = 0; j < nTrain; j++) - matrix_iset(ATrain , i , j , matrix_iget( A , i , indexTrain[j])); - - - for (p = 0; p < maxP; p++) { - matrix_type * ZpTrain = matrix_alloc( p + 1, nTrain ); - matrix_type *SigDp = matrix_alloc( p + 1 , p + 1); - - - for (i = 0; i <= p ; i++) - for (j = 0; j < nTrain; j++) - matrix_iset(ZpTrain , i , j , matrix_iget(cv_data->Z , i , indexTrain[j])); - - /* SigDp = ZpTrain * ZpTrain' */ - matrix_dgemm( SigDp , ZpTrain , ZpTrain, false , true , 1.0, 0.0); - - /* SigDp += (nTrain - 1) * Rp */ - for(i = 0; i <= p; i++) - for( j = 0; j <= p; j++) - matrix_iadd( SigDp , i , j , (nTrain - 1) * matrix_iget(cv_data->Rp, i, j)); - - - /* Invert the covariance matrix for the principal components */ - { - int inv_ok = matrix_inv( SigDp ); - if ( inv_ok != 0 ) - util_abort("%s: inversion of covariance matrix for the principal components failed for subspace dimension p = %d\n - aborting \n",__func__,p+1); - } - - - { - matrix_type * W = matrix_alloc(p + 1 , nTest ); - matrix_type * W2 = matrix_alloc(nTrain , nTest ); - - /* W = inv(SigDp) * ZTest */ - for (i = 0; i <= p; i++) { - for (j = 0; j < nTest; j++) { - double ksum = 0.0; - for (int k = 0; k <= p; k++) - ksum += matrix_iget(SigDp , i , k) * matrix_iget(cv_data->Z , k , indexTest[j]); - - matrix_iset(W , i , j , ksum); - } - } - - /* W2 = ZpTrain' * W */ - matrix_dgemm( W2 , ZpTrain , W , true , false , 1.0 , 0.0); - - /* Estimate the state-vector */ - matrix_matmul( AHat , ATrain , W2 ); - - matrix_free( W2 ); - matrix_free( W ); - } - - - /*Compute Press Statistic: */ - { - double R2Sum = 0; - - for (i = 0; i < nx; i++) { - for (j = 0; j < nTest; j++) { - double tmp = matrix_iget(A , i , indexTest[j]) - matrix_iget(AHat , i , j); - R2Sum += tmp * tmp; - } - } - matrix_iset( cvErr , p , foldIndex , R2Sum ); - } - - - - matrix_free( ZpTrain ); - matrix_free( SigDp ); - } /*end for p */ - - matrix_free( AHat ); - matrix_free( ATrain ); -} - - - - - - -int cv_enkf_get_optimal_numb_comp(cv_enkf_data_type * cv_data , - const matrix_type * cvErr , - const int maxP ) { - - - double * cvMean = util_calloc( maxP , sizeof * cvMean ); - double * cvStd = util_calloc( maxP , sizeof * cvStd ); - int optP; - - { - for (int p = 0; p < maxP; p++ ){ - double err_sum = 0; - for (int folds = 0; folds < cv_data->nfolds; folds++ ) - err_sum += matrix_iget( cvErr , p, folds ); - - cvMean[p] = err_sum / cv_data->nfolds; - } - - for ( int p = 0; p < maxP; p++){ - double err_sum2 = 0; - for ( int folds = 0; folds < cv_data->nfolds; folds++) - err_sum2 += pow( matrix_iget( cvErr , p , folds ) - cvMean[p] , 2); - - cvStd[p] = sqrt( err_sum2 / (cv_data->nfolds - 1) ); - } - } - - { - double minErr = cvMean[0]; - int i; - optP = 1; - - printf("PRESS:\n"); - printf("%f\n",cvMean[0]); - for (i = 1; i < maxP; i++) { - printf("%f\n",cvMean[i]); - if ((cvMean[i] < minErr) && (cvMean[i] > 0.0)) { - minErr = cvMean[i]; - optP = i+1; - } - } - - - - - if (cv_data->penalised_press) { - for ( i = 0; i < optP; i++){ - if( cvMean[i] - cvStd[i] <= minErr ){ - optP = i+1; - break; - } - } - } - } - - free( cvStd ); - free( cvMean ); - return optP; -} - - - - - - -/* Function that performs cross-validation to find the optimal subspace dimension, */ - - -static int get_optimal_principal_components( cv_enkf_data_type * cv_data , - const matrix_type * A) { - - - const int nrens = matrix_get_columns( cv_data->Z ); - const int nrmin = matrix_get_rows( cv_data->Z ); - - - - matrix_type * cvError; - int * randperms = util_calloc( nrens , sizeof * randperms); - - int maxP = nrmin; - int optP; - - - /* We only want to search the non-zero eigenvalues */ - for (int i = 0; i < nrmin; i++) { - if (matrix_iget(cv_data->Z,i,1) == 0.0) { - maxP = i; - break; - } - } - - if (maxP > nrmin) - maxP = nrmin - 1; // <- Change by Joakim; using nrmin here will load to out - // bounds access oc cv_data->Z at line 460. - - - - - if ( nrens < cv_data->nfolds ) - util_abort("%s: number of ensemble members %d need to be larger than the number of cv-folds - aborting \n", - __func__, - nrens, - cv_data->nfolds); - - for (int i=0; i < nrens; i++) - randperms[i] = i; - - rng_shuffle_int( cv_data->rng , randperms , nrens ); - - cvError = matrix_alloc( maxP , cv_data->nfolds ); - { - int ntest, ntrain, k,j,i; - int * indexTest = util_calloc( nrens , sizeof * indexTest ); - int * indexTrain = util_calloc( nrens , sizeof * indexTrain ); - for (i = 0; i < cv_data->nfolds; i++) { - ntest = 0; - ntrain = 0; - k = i; - /*extract members for the training and test ensembles */ - for (j = 0; j < nrens; j++) { - if (j == k) { - indexTest[ntest] = randperms[j]; - k += cv_data->nfolds; - ntest++; - } else { - indexTrain[ntrain] = randperms[j]; - ntrain++; - } - } - - /*Perform CV for each subspace dimension p */ - cv_enkf_get_cv_error_prin_comp( cv_data , cvError , A , indexTest , indexTrain, ntest, ntrain , i , maxP); - } - free( indexTest ); - free( indexTrain ); - } - - - /* find optimal truncation value for the cv-scheme */ - optP = cv_enkf_get_optimal_numb_comp( cv_data , cvError , maxP); - - matrix_free( cvError ); - free( randperms ); - return optP; -} - - - -/*NB! HERE WE COUNT optP from 0,1,2,... */ -static void getW_prin_comp(cv_enkf_data_type * cv_data , matrix_type *W , const int optP) { - - int i, j; - double tmp2; - int nrens = matrix_get_columns( cv_data->Z ); - - /* Finally, compute W = Z(1:p,:)' * inv(Z(1:p,:) * Z(1:p,:)' + (n -1) * Rp) */ - matrix_type *Zp = matrix_alloc( optP, nrens ); - matrix_type *SigZp = matrix_alloc( optP ,optP); - - // This loop will fail with i to large whcn accessing cv_data->Z - // if we do not limit maxP to nrmin - 1? - for (i = 0; i < optP ; i++) - for (j = 0; j < nrens; j++) - matrix_iset_safe(Zp , i , j , matrix_iget_safe(cv_data->Z , i ,j)); - - // Matrix copy_block should be used in stead of the double (i,j) loop; - // however that failed because the cv_data->Z matrix had one row too few? - // matrix_copy_block( Zp , 0 , 0 , optP , nrens , cv_data->Z , 0 , 0 ); - - /*Compute SigZp = Zp * Zp' */ - matrix_dgemm( SigZp , Zp , Zp, false , true , 1.0, 0.0); - - /*Add (ntrain-1) * Rp*/ - for(i = 0; i < optP; i++) { - for( j = 0; j < optP; j++) { - tmp2 = matrix_iget(SigZp , i , j) + (nrens - 1) * matrix_iget(cv_data->Rp, i, j); - matrix_iset( SigZp , i , j , tmp2 ); - } - } - - - /* Invert the covariance matrix for the principal components */ - int inv_ok = matrix_inv( SigZp ); - - /*Check if the inversion went ok */ - if ( inv_ok != 0 ) - util_abort("%s: inversion of covariance matrix for the principal components failed for subspace dimension p = %d\n - aborting \n",__func__,optP); - - - - - /*Compute W = Zp' * inv(SigZp) */ - matrix_dgemm( W , Zp , SigZp , true , false , 1.0 , 0.0); - - matrix_free( Zp ); - matrix_free( SigZp ); -} - - - - -void cv_enkf_initX(void * module_data , - matrix_type * X , - matrix_type * A , - matrix_type * S , - matrix_type * R , - matrix_type * dObs , - matrix_type * E , - matrix_type * D) { - - - cv_enkf_data_type * cv_data = cv_enkf_data_safe_cast( module_data ); - printf("Running CV\n"); - { - int optP; - int ens_size = matrix_get_columns( S ); - - /* Get the optimal number of principal components - where p is found minimizing the PRESS statistic */ - - { - matrix_type * workA = matrix_alloc_copy( A ); - matrix_subtract_row_mean( workA ); - optP = get_optimal_principal_components(cv_data , workA ); - printf("Optimal subspace dimension found %d\n",optP); - matrix_free( workA ); - } - - { - matrix_type * W = matrix_alloc(ens_size , optP); - - /* Compute W = Z(1:p,:)' * inv(Z(1:p,:) * Z(1:p,:)' + (ens_size-1) * Rp(1:p,1:p))*/ - getW_prin_comp( cv_data , W , optP); - - /*Compute the actual X5 matrix: */ - /*Compute X5 = W * Dp (The hard way) */ - for( int i = 0; i < ens_size; i++) { - for( int j = 0; j < ens_size; j++) { - double tmp = 0.0; - - for( int k = 0; k < optP; k++) - tmp += matrix_iget( W , i , k) * matrix_iget( cv_data->Dp , k , j); - - matrix_iset(X , i , j ,tmp); - } - matrix_iadd( X , i , i , 1.0); /* X5 = I + X5 */ - } - - matrix_free( W ); - } - } -} - - - -void cv_enkf_complete_update( void * arg ) { - cv_enkf_data_type * cv_data = cv_enkf_data_safe_cast( arg ); - { - matrix_free( cv_data->Z ); - matrix_free( cv_data->Rp ); - matrix_free( cv_data->Dp ); - - cv_data->Z = NULL; - cv_data->Rp = NULL; - cv_data->Dp = NULL; - } -} - - - -bool cv_enkf_set_double( void * arg , const char * var_name , double value) { - cv_enkf_data_type * module_data = cv_enkf_data_safe_cast( arg ); - { - bool name_recognized = true; - - if (strcmp( var_name , ENKF_TRUNCATION_KEY_) == 0) - cv_enkf_set_truncation( module_data , value ); - else - name_recognized = false; - - return name_recognized; - } -} - - -bool cv_enkf_set_int( void * arg , const char * var_name , int value) { - cv_enkf_data_type * module_data = cv_enkf_data_safe_cast( arg ); - { - bool name_recognized = true; - - if (strcmp( var_name , ENKF_NCOMP_KEY_) == 0) - cv_enkf_set_subspace_dimension( module_data , value ); - else if (strcmp( var_name , NFOLDS_KEY) == 0) - cv_enkf_set_nfolds( module_data , value); - else - name_recognized = false; - - return name_recognized; - } -} - - -bool cv_enkf_set_bool( void * arg , const char * var_name , bool value) { - cv_enkf_data_type * module_data = cv_enkf_data_safe_cast( arg ); - { - bool name_recognized = true; - if (strcmp( var_name , CV_PEN_PRESS_KEY) == 0) - cv_enkf_set_pen_press( module_data , value ); - else - name_recognized = false; - - return name_recognized; - } -} - - -long cv_enkf_get_options( void * arg , long flag) { - cv_enkf_data_type * cv_data = cv_enkf_data_safe_cast( arg ); - { - return cv_data->option_flags; - } -} - -bool cv_enkf_has_var( const void * arg, const char * var_name) { - { - if (strcmp(var_name , ENKF_NCOMP_KEY_) == 0) - return true; - else if (strcmp(var_name , ENKF_TRUNCATION_KEY_) == 0) - return true; - else if (strcmp(var_name , NFOLDS_KEY) == 0) - return true; - else if (strcmp(var_name , CV_PEN_PRESS_KEY) == 0) - return true; - else - return false; - } -} - -double cv_enkf_get_double( const void * arg, const char * var_name) { - const cv_enkf_data_type * module_data = cv_enkf_data_safe_cast_const( arg ); - { - if (strcmp(var_name , ENKF_TRUNCATION_KEY_) == 0) - return module_data->truncation; - else - return -1; - } -} - -int cv_enkf_get_int( const void * arg, const char * var_name) { - const cv_enkf_data_type * module_data = cv_enkf_data_safe_cast_const( arg ); - { - if (strcmp(var_name , ENKF_NCOMP_KEY_) == 0) - return module_data->subspace_dimension; - else if (strcmp(var_name , NFOLDS_KEY) == 0) - return module_data->nfolds; - else - return -1; - } -} - -bool cv_enkf_get_bool( const void * arg, const char * var_name) { - const cv_enkf_data_type * module_data = cv_enkf_data_safe_cast_const( arg ); - { - if (strcmp(var_name , CV_PEN_PRESS_KEY) == 0) - return module_data->penalised_press; - else - return false; - } -} - - -#ifdef INTERNAL_LINK -#define LINK_NAME CV_ENKF -#else -#define LINK_NAME EXTERNAL_MODULE_SYMBOL -#endif - - -analysis_table_type LINK_NAME = { - .name = "CV_ENKF", - .alloc = cv_enkf_data_alloc, - .freef = cv_enkf_data_free, - .set_int = cv_enkf_set_int , - .set_double = cv_enkf_set_double , - .set_bool = cv_enkf_set_bool , - .set_string = NULL , - .get_options = cv_enkf_get_options , - .initX = cv_enkf_initX , - .updateA = NULL, - .init_update = cv_enkf_init_update , - .complete_update = cv_enkf_complete_update , - .has_var = cv_enkf_has_var, - .get_int = cv_enkf_get_int, - .get_double = cv_enkf_get_double, - .get_bool = cv_enkf_get_bool, - .get_ptr = NULL, -}; diff --git a/ThirdParty/Ert/libanalysis/src/enkf_linalg.c b/ThirdParty/Ert/libanalysis/src/enkf_linalg.c deleted file mode 100644 index d1636fb6c4..0000000000 --- a/ThirdParty/Ert/libanalysis/src/enkf_linalg.c +++ /dev/null @@ -1,791 +0,0 @@ -#include -#include -#include - -#include -#include -#include -#include - -#include - -void enkf_linalg_genX3(matrix_type * X3 , const matrix_type * W , const matrix_type * D , const double * eig) { - const int nrobs = matrix_get_rows( D ); - const int nrens = matrix_get_columns( D ); - const int nrmin = util_int_min( nrobs , nrens ); - int i,j; - matrix_type * X1 = matrix_alloc(nrmin , nrobs); - matrix_type * X2 = matrix_alloc(nrmin , nrens); - - /* X1 = (I + Lambda1)^(-1) * W'*/ - for (i=0; i < nrmin; i++) - for (j=0; j < nrobs; j++) - matrix_iset(X1 , i , j , eig[i] * matrix_iget(W , j , i)); - - matrix_matmul(X2 , X1 , D); /* X2 = X1 * D (Eq. 14.31) */ - matrix_matmul(X3 , W , X2); /* X3 = W * X2 = X1 * X2 (Eq. 14.31) */ - - matrix_free( X1 ); - matrix_free( X2 ); -} - - -void enkf_linalg_genX2(matrix_type * X2 , const matrix_type * S , const matrix_type * W , const double * eig) { - const int nrens = matrix_get_columns( S ); - const int idim = matrix_get_rows( X2 ); - matrix_dgemm(X2 , W , S , true , false , 1.0 , 0.0); - { - int i,j; - for (j=0; j < nrens; j++) - for (i=0; i < idim; i++) - matrix_imul(X2 , i,j , sqrt(eig[i])); - } -} - - - -/** - This function calculates the svd of the input matrix S. The number - of significant singular values to retain can either be forced to a - fixed number, or a cutoff on small singular values can be - used. This behaviour is regulated by the @ncomp and @truncation - parameters: - - ncomp > 0 , truncation < 0: Use ncomp parameters. - ncomp < 0 , truncation > 0: Truncate at level 'truncation'. - - The singular values are returned in the inv_sig0 vector; the values - we retain are inverted and the remaining elements in are explicitly - set to zero. - - The left-hand singular vectors are returned in the matrix - U0. Depending on the value of the flag @store_V0T the right hand - singular vectors are stored in the V0T matrix, or just - discarded. If you do not intend to use the right hand vectors at - all, i.e. store_V0T == DGESVD_NONE, the V0T matrix will not be - accessed. - - The input S matrix should have been shifted to zero mean prior to - calling this function. -*/ - - - -/*This function is similar to enkf_linalg_svdS but it returns the eigen values without its inverse and also give the matrices truncated U VT and Sig0*/ - -// Trunc.SVD(S) = U0 * Sig0 * V0T -int enkf_linalg_svd_truncation(const matrix_type * S , - double truncation , - int ncomp , - dgesvd_vector_enum store_V0T , - double * sig0, - matrix_type * U0 , - matrix_type * V0T) { - - int num_significant = -1; - int nrows = matrix_get_rows(S); - int ncolumns= matrix_get_columns(S); - - if (((truncation > 0) && (ncomp < 0)) || - ((truncation < 0) && (ncomp > 0))) { - - int num_singular_values = util_int_min( matrix_get_rows( S ) , matrix_get_columns( S )); - { - matrix_type * workS = matrix_alloc_copy( S ); - matrix_dgesvd(DGESVD_MIN_RETURN , store_V0T , workS , sig0 , U0 , V0T); - matrix_free( workS ); - } - int i; - - if (ncomp > 0) - num_significant = ncomp; - else { - double total_sigma2 = 0; - for (i=0; i < num_singular_values; i++) - total_sigma2 += sig0[i]; - - /* - Determine the number of singular values by enforcing that - less than a fraction @truncation of the total variance be - accounted for. - */ - num_significant = 0; - { - double running_sigma2 = 0; - for (i=0; i < num_singular_values; i++) { - if (running_sigma2 / total_sigma2 < truncation) { /* Include one more singular value ? */ - num_significant++; - running_sigma2 += sig0[i]; - } else - break; - } - } - } - if (num_significant > 0) { - matrix_resize(U0 , nrows , num_significant , true); - matrix_resize(V0T , num_significant , ncolumns , true); - } else - util_abort("%s: zero significant singular values\n",__func__); - } - else - util_abort("%s: truncation:%g ncomp:%d - invalid ambigous input.\n",__func__ , truncation , ncomp ); - - return num_significant; -} - - -static int enkf_linalg_num_significant(int num_singular_values , const double * sig0 , double truncation ) { - int num_significant = 0; - double total_sigma2 = 0; - for (int i=0; i < num_singular_values; i++) - total_sigma2 += sig0[i] * sig0[i]; - - /* - Determine the number of singular values by enforcing that - less than a fraction @truncation of the total variance be - accounted for. - */ - { - double running_sigma2 = 0; - for (int i=0; i < num_singular_values; i++) { - if (running_sigma2 / total_sigma2 < truncation) { /* Include one more singular value ? */ - num_significant++; - running_sigma2 += sig0[i] * sig0[i]; - } else - break; - } - } - - return num_significant; -} - - -int enkf_linalg_svdS(const matrix_type * S , - double truncation , - int ncomp , - dgesvd_vector_enum store_V0T , - double * inv_sig0, - matrix_type * U0 , - matrix_type * V0T) { - - double * sig0 = inv_sig0; - int num_significant = 0; - - - if (((truncation > 0) && (ncomp < 0)) || - ((truncation < 0) && (ncomp > 0))) { - int num_singular_values = util_int_min( matrix_get_rows( S ) , matrix_get_columns( S )); - { - matrix_type * workS = matrix_alloc_copy( S ); - matrix_dgesvd(DGESVD_MIN_RETURN , store_V0T , workS , sig0 , U0 , V0T); - matrix_free( workS ); - } - - if (ncomp > 0) - num_significant = ncomp; - else - num_significant = enkf_linalg_num_significant( num_singular_values , sig0 , truncation ); - - { - int i; - /* Inverting the significant singular values */ - for (i = 0; i < num_significant; i++) - inv_sig0[i] = 1.0 / sig0[i]; - - /* Explicitly setting the insignificant singular values to zero. */ - for (i=num_significant; i < num_singular_values; i++) - inv_sig0[i] = 0; - } - } else - - util_abort("%s: truncation:%g ncomp:%d - invalid ambigous input.\n",__func__ , truncation , ncomp ); - - return num_significant; -} - - -int enkf_linalg_num_PC(const matrix_type * S , double truncation ) { - int num_singular_values = util_int_min( matrix_get_rows( S ) , matrix_get_columns( S )); - int num_significant; - double * sig0 = util_calloc( num_singular_values , sizeof * sig0); - - { - matrix_type * workS = matrix_alloc_copy( S ); - matrix_dgesvd(DGESVD_NONE , DGESVD_NONE , workS , sig0 , NULL , NULL); - matrix_free( workS ); - } - - num_significant = enkf_linalg_num_significant( num_singular_values , sig0 , truncation ); - free( sig0 ); - return num_significant; -} - - - - - -void enkf_linalg_Cee(matrix_type * B, int nrens , const matrix_type * R , const matrix_type * U0 , const double * inv_sig0) { - const int nrmin = matrix_get_rows( B ); - { - matrix_type * X0 = matrix_alloc( nrmin , matrix_get_rows( R )); - matrix_dgemm(X0 , U0 , R , true , false , 1.0 , 0.0); /* X0 = U0^T * R */ - matrix_dgemm(B , X0 , U0 , false , false , 1.0 , 0.0); /* B = X0 * U0 */ - matrix_free( X0 ); - } - - { - int i ,j; - - /* Funny code ?? - Multiply B with S^(-1)from left and right - BHat = S^(-1) * B * S^(-1) - */ - for (j=0; j < matrix_get_columns( B ) ; j++) - for (i=0; i < matrix_get_rows( B ); i++) - matrix_imul(B , i , j , inv_sig0[i]); - - for (j=0; j < matrix_get_columns( B ) ; j++) - for (i=0; i < matrix_get_rows( B ); i++) - matrix_imul(B , i , j , inv_sig0[j]); - } - - matrix_scale(B , nrens - 1.0); -} - - - - -void enkf_linalg_lowrankCinv__(const matrix_type * S , - const matrix_type * R , - matrix_type * V0T , - matrix_type * Z, - double * eig , - matrix_type * U0, - double truncation, - int ncomp) { - - const int nrobs = matrix_get_rows( S ); - const int nrens = matrix_get_columns( S ); - const int nrmin = util_int_min( nrobs , nrens ); - - double * inv_sig0 = util_calloc( nrmin , sizeof * inv_sig0); - - if (V0T != NULL) - enkf_linalg_svdS(S , truncation , ncomp , DGESVD_MIN_RETURN , inv_sig0 , U0 , V0T ); - else - enkf_linalg_svdS(S , truncation , ncomp , DGESVD_NONE , inv_sig0, U0 , NULL); - - { - matrix_type * B = matrix_alloc( nrmin , nrmin ); - enkf_linalg_Cee( B , nrens , R , U0 , inv_sig0); /* B = Xo = (N-1) * Sigma0^(+) * U0'* Cee * U0 * Sigma0^(+') (14.26)*/ - matrix_dgesvd(DGESVD_MIN_RETURN , DGESVD_NONE, B , eig, Z , NULL); - matrix_free( B ); - } - - { - int i,j; - /* Lambda1 = (I + Lambda)^(-1) */ - - for (i=0; i < nrmin; i++) - eig[i] = 1.0 / (1 + eig[i]); - - for (j=0; j < nrmin; j++) - for (i=0; i < nrmin; i++) - matrix_imul(Z , i , j , inv_sig0[i]); /* Z2 = Sigma0^(+) * Z; */ - } - util_safe_free( inv_sig0 ); -} - - -void enkf_linalg_lowrankCinv(const matrix_type * S , - const matrix_type * R , - matrix_type * W , /* Corresponding to X1 from Eq. 14.29 */ - double * eig , /* Corresponding to 1 / (1 + Lambda_1) (14.29) */ - double truncation , - int ncomp) { - - const int nrobs = matrix_get_rows( S ); - const int nrens = matrix_get_columns( S ); - const int nrmin = util_int_min( nrobs , nrens ); - - matrix_type * U0 = matrix_alloc( nrobs , nrmin ); - matrix_type * Z = matrix_alloc( nrmin , nrmin ); - - enkf_linalg_lowrankCinv__( S , R , NULL , Z , eig , U0 , truncation , ncomp); - matrix_matmul(W , U0 , Z); /* X1 = W = U0 * Z2 = U0 * Sigma0^(+') * Z */ - - matrix_free( U0 ); - matrix_free( Z ); -} - - -void enkf_linalg_meanX5(const matrix_type * S , - const matrix_type * W , - const double * eig , - const matrix_type * dObs, - matrix_type * X5) { - - - const int nrens = matrix_get_columns( S ); - const int nrobs = matrix_get_rows( S ); - const int nrmin = util_int_min( nrobs , nrens ); - double * work = util_calloc( (2 * nrmin + nrobs + nrens) , sizeof * work ); - matrix_type * innov = enkf_linalg_alloc_innov( dObs , S ); - { - double * y1 = &work[0]; - double * y2 = &work[nrmin]; - double * y3 = &work[2*nrmin]; - double * y4 = &work[2*nrmin + nrobs]; - - if (nrobs == 1) { - /* Is this special casing necessary ??? */ - y1[0] = matrix_iget(W , 0,0) * matrix_iget( innov , 0 , 0); - y2[0] = eig[0] * y1[0]; - y3[0] = matrix_iget(W , 0, 0) *y2[0]; - for (int iens = 0; iens < nrens; iens++) - y4[iens] = y3[0] * matrix_iget(S , 0, iens); - } else { - matrix_dgemv(W , matrix_get_data( innov ) , y1 , true , 1.0, 0.0); /* y1 = Trans(W) * innov */ - for (int i= 0; i < nrmin; i++) - y2[i] = eig[i] * y1[i]; /* y2 = eig * y1 */ - matrix_dgemv(W , y2 , y3 , false , 1.0 , 0.0); /* y3 = W * y2; */ - matrix_dgemv(S , y3 , y4 , true , 1.0 , 0.0); /* y4 = Trans(S) * y3 */ - } - - for (int iens = 0; iens < nrens; iens++) - matrix_set_column(X5 , y4 , iens ); - - matrix_shift(X5 , 1.0/nrens); - } - free( work ); - matrix_free( innov ); -} - - - -void enkf_linalg_X5sqrt(matrix_type * X2 , matrix_type * X5 , const matrix_type * randrot, int nrobs) { - const int nrens = matrix_get_columns( X5 ); - const int nrmin = util_int_min( nrobs , nrens ); - matrix_type * VT = matrix_alloc( nrens , nrens ); - double * sig = util_calloc( nrmin , sizeof * sig ); - double * isig = util_calloc( nrmin , sizeof * sig ); - - matrix_dgesvd(DGESVD_NONE , DGESVD_ALL , X2 , sig , NULL , VT); - { - matrix_type * X3 = matrix_alloc( nrens , nrens ); - matrix_type * X33 = matrix_alloc( nrens , nrens ); - matrix_type * X4 = matrix_alloc( nrens , nrens ); - matrix_type * IenN = matrix_alloc( nrens , nrens ); - int i,j; - for (i = 0; i < nrmin; i++) - isig[i] = sqrt( util_double_max( 1.0 - sig[i]*sig[i] ,0.0)); - - for (j = 0; j < nrens; j++) - for (i = 0; i < nrens; i++) - matrix_iset(X3 , i , j , matrix_iget(VT , j , i)); - - for (j=0; j< nrmin; j++) - matrix_scale_column(X3 , j , isig[j]); - - matrix_dgemm(X33 , X3 , VT , false , false , 1.0 , 0.0); /* X33 = X3 * VT */ - if (randrot != NULL) - matrix_dgemm(X4 , X33 , randrot , false, false , 1.0 , 0.0); /* X4 = X33 * Randrot */ - else - matrix_assign(X4 , X33); - - matrix_set(IenN , -1.0/ nrens); - for (i = 0; i < nrens; i++) - matrix_iadd(IenN , i , i , 1.0); - - matrix_dgemm(X5 , IenN , X4 , false , false , 1.0 , 1.0); /* X5 = IenN * X4 + X5 */ - - matrix_free( X3 ); - matrix_free( X33 ); - matrix_free( X4 ); - matrix_free( IenN ); - } - - free(sig); - free(isig); - matrix_free( VT ); -} - - -matrix_type * enkf_linalg_alloc_innov( const matrix_type * dObs , const matrix_type * S) { - matrix_type * innov = matrix_alloc_copy( dObs ); - - for (int iobs =0; iobs < matrix_get_row_sum( dObs , iobs); iobs++) - matrix_isub( innov , iobs , 0 , matrix_get_row_sum( S , iobs )); - - return innov; -} - - -void enkf_linalg_init_stdX( matrix_type * X , const matrix_type * S , const matrix_type * D , - const matrix_type * W , const double * eig , bool bootstrap) { - - int nrobs = matrix_get_rows( W ); - int ens_size = matrix_get_rows( X ); - - matrix_type * X3 = matrix_alloc(nrobs , ens_size); - enkf_linalg_genX3(X3 , W , D , eig ); /* X2 = diag(eig) * W' * D (Eq. 14.31, Evensen (2007)) */ - /* X3 = W * X2 = X1 * X2 (Eq. 14.31, Evensen (2007)) */ - - matrix_dgemm( X , S , X3 , true , false , 1.0 , 0.0); /* X = S' * X3 */ - if (!bootstrap) { - for (int i = 0; i < ens_size ; i++) - matrix_iadd( X , i , i , 1.0); /*X = I + X */ - } - - matrix_free( X3 ); -} - - - -void enkf_linalg_init_sqrtX(matrix_type * X5 , - const matrix_type * S , - const matrix_type * randrot , - const matrix_type * innov , - const matrix_type * W , - const double * eig , - bool bootstrap) { - - const int nrobs = matrix_get_rows( S ); - const int nrens = matrix_get_columns( S ); - const int nrmin = util_int_min( nrobs , nrens ); - - matrix_type * X2 = matrix_alloc(nrmin , nrens); - - if (bootstrap) - util_exit("%s: Sorry bootstrap support not fully implemented for SQRT scheme\n",__func__); - - enkf_linalg_meanX5( S , W , eig , innov , X5 ); - enkf_linalg_genX2(X2 , S , W , eig); - enkf_linalg_X5sqrt(X2 , X5 , randrot , nrobs); - - matrix_free( X2 ); -} - -/*****************************************************************/ - - - - - -/** - This routine generates a real orthogonal random matrix. - The algorithm is the one by - Francesco Mezzadri (2007), How to generate random matrices from the classical - compact groups, Notices of the AMS, Vol. 54, pp 592-604. - 1. First a matrix with independent random normal numbers are simulated. - 2. Then the QR decomposition is computed, and Q will then be a random orthogonal matrix. - 3. The diagonal elements of R are extracted and we construct the diagonal matrix X(j,j)=R(j,j)/|R(j,j)| - 4. An updated Q'=Q X is computed, and this is now a random orthogonal matrix with a Haar measure. - - The implementation is a plain reimplementation/copy of the old m_randrot.f90 function. -*/ - - - -/** - NB: This should rather use the implementation in m_mean_preserving_rotation.f90. -*/ - -void enkf_linalg_set_randrot( matrix_type * Q , rng_type * rng) { - int ens_size = matrix_get_rows( Q ); - double * tau = util_calloc( ens_size , sizeof * tau ); - int * sign = util_calloc( ens_size , sizeof * sign); - - for (int i = 0; i < ens_size; i++) - for (int j = 0; j < ens_size; j++) - matrix_iset(Q , i , j , rng_std_normal( rng )); - - matrix_dgeqrf( Q , tau ); /* QR factorization */ - for (int i=0; i < ens_size; i++) { - double Qii = matrix_iget( Q , i,i); - sign[i] = Qii / abs(Qii); - } - - matrix_dorgqr( Q , tau , ens_size ); - for (int i = 0; i < ens_size; i++) { - if (sign[i] < 0) - matrix_scale_column( Q , i , -1 ); - } - - free( sign ); - free( tau ); -} - - - - -/** - Generates the mean preserving random rotation for the EnKF SQRT algorithm - using the algorithm from Sakov 2006-07. I.e, generate rotation Up such that - Up*Up^T=I and Up*1=1 (all rows have sum = 1) see eq 17. - From eq 18, Up=B * Upb * B^T - B is a random orthonormal basis with the elements in the first column equals 1/sqrt(nrens) - - Upb = | 1 0 | - | 0 U | - - where U is an arbitrary orthonormal matrix of dim nrens-1 x nrens-1 (eq. 19) -*/ - -matrix_type * enkf_linalg_alloc_mp_randrot(int ens_size , rng_type * rng) { - matrix_type * Up = matrix_alloc( ens_size , ens_size ); /* The return value. */ - { - matrix_type * B = matrix_alloc( ens_size , ens_size ); - matrix_type * Upb = matrix_alloc( ens_size , ens_size ); - matrix_type * U = matrix_alloc_shared(Upb , 1 , 1 , ens_size - 1, ens_size - 1); - - - { - int k,j; - matrix_type * R = matrix_alloc( ens_size , ens_size ); - matrix_random_init( B , rng); /* B is filled up with U(0,1) numbers. */ - matrix_set_const_column( B , 1.0 / sqrt( ens_size ) , 0 ); - - /* modified_gram_schmidt is used to create the orthonormal basis in B.*/ - for (k=0; k < ens_size; k++) { - double Rkk = sqrt( matrix_column_column_dot_product( B , k , B , k)); - matrix_iset(R , k , k , Rkk); - matrix_scale_column(B , k , 1.0/Rkk); - for (j=k+1; j < ens_size; j++) { - double Rkj = matrix_column_column_dot_product(B , k , B , j); - matrix_iset(R , k , j , Rkj); - { - int i; - for (i=0; i < ens_size; i++) { - double Bij = matrix_iget(B , i , j); - double Bik = matrix_iget(B , i , k); - matrix_iset(B , i , j , Bij - Bik * Rkj); - } - } - } - } - matrix_free( R ); - } - - enkf_linalg_set_randrot( U , rng ); - matrix_iset( Upb , 0 , 0 , 1); - - - { - matrix_type * Q = matrix_alloc( ens_size , ens_size ); - matrix_dgemm( Q , B , Upb , false , false , 1, 0); /* Q = B * Ubp */ - matrix_dgemm( Up , Q , B , false , true , 1, 0); /* Up = Q * T(B) */ - matrix_free( Q ); - } - - matrix_free( B ); - matrix_free( Upb ); - matrix_free( U ); - } - - return Up; -} - - -/*****************************************************************/ - -/** - Checking that the sum through one row in the X matrix equals - @target_sum. @target_sum will be 1 normally, and zero if we are doing - bootstrap. -*/ - -void enkf_linalg_checkX(const matrix_type * X , bool bootstrap) { - matrix_assert_finite( X ); - { - int target_sum; - if (bootstrap) - target_sum = 0; - else - target_sum = 1; - - for (int icol = 0; icol < matrix_get_columns( X ); icol++) { - double col_sum = matrix_get_column_sum(X , icol); - if (fabs(col_sum - target_sum) > 0.0001) - util_abort("%s: something is seriously broken. col:%d col_sum = %g != %g - ABORTING\n",__func__ , icol , col_sum , target_sum); - } - } -} - - -/*****************************************************************/ - -int enkf_linalg_get_PC( const matrix_type * S0, - const matrix_type * dObs , - double truncation, - int ncomp, - matrix_type * PC, - matrix_type * PC_obs, - double_vector_type * singular_values) { - - const int nrobs = matrix_get_rows( S0 ); - const int nrens = matrix_get_columns( S0 ); - const int nrmin = util_int_min( nrobs , nrens ); - - matrix_type * U0 = matrix_alloc( nrobs , nrens ); - matrix_type * S = matrix_alloc_copy( S0 ); - double * inv_sig0; - int num_PC; - - double_vector_iset( singular_values , nrmin - 1 , 0 ); - matrix_subtract_row_mean( S ); - ncomp = util_int_min( ncomp , nrmin ); - inv_sig0 = double_vector_get_ptr( singular_values ); - { - matrix_type * S_mean = matrix_alloc( nrobs , 1 ); - num_PC = enkf_linalg_svdS(S , truncation , ncomp, DGESVD_NONE , inv_sig0 , U0 , NULL); - - matrix_assign( S , S0); // The svd routine will overwrite S - we therefor must pick it up again from S0. - matrix_subtract_and_store_row_mean( S , S_mean); - - /* Multiply with inverted singular values. */ - matrix_resize( U0 , nrobs , num_PC , true); - for (int i=0; i < num_PC; i++) - matrix_imul_col( U0 , i , inv_sig0[i] ); - - /* The simulated components / projections */ - { - matrix_resize( PC , num_PC , nrens , false ); - matrix_dgemm( PC , U0 , S , true , false , 1.0 , 0.0 ); - } - - - /* The observer projections. */ - { - matrix_scale( S_mean , -1.0); - matrix_inplace_add_column( S_mean , dObs , 0 , 0 ); - matrix_resize( PC_obs , num_PC , 1 , false ); - matrix_dgemm( PC_obs , U0 , S_mean , true , false , 1.0 , 0.0 ); - } - - for (int i=0; i < double_vector_size( singular_values ); i++) - inv_sig0[i] = 1.0 / inv_sig0[i]; - - matrix_free( S_mean ); - } - matrix_free( S ); - matrix_free( U0 ); - - return num_PC; -} - - - -void enkf_linalg_rml_enkfX1(matrix_type *X1, matrix_type *Udr, matrix_type *D, matrix_type *R) -{ - /* - This routine computes X1 for RML_EnKF module as X1 = Ud(T)*Cd(-1/2)*D -- D= (dk-do) - here the negative sign cancels with one needed in X3 matrix computation - */ - matrix_type * tmp = matrix_alloc(matrix_get_columns(Udr),matrix_get_rows(R)); - - matrix_matmul_with_transpose( tmp, Udr, R, true, false); - matrix_matmul( X1 , tmp, D); - - matrix_free(tmp); -} - - - -void enkf_linalg_rml_enkfX2(matrix_type *X2 , double *Wdr , matrix_type * X1 , double a , int nsign) -{ - /* - This routine computes X2 for RML_EnKF module as X2 = ((a*Ipd)+Wd^2)^-1 * X1 - Since a+Ipd & Wd are diagonal in nature the computation is reduced to array operations - */ - - for (int i=0; i< nsign ; i++) { - double scale_factor = 1 / (a + (Wdr[i]*Wdr[i])); - matrix_scale_row(X1 , i , scale_factor); - } - matrix_assign(X2,X1); - -} - - -void enkf_linalg_rml_enkfX3(matrix_type *X3, matrix_type *VdTr, double *Wdr, matrix_type *X2, int nsign) -{ - /* - This routine computes X3 for RML_EnKF module as X3 = Vd *Wd*X2 - */ - - printf("\nWd: "); - matrix_type *tmp = matrix_alloc_copy(VdTr); - for (int i=0; i< nsign ; i++) { - printf("%5.2f ", Wdr[i]); - matrix_scale_row(tmp, i, Wdr[i]); - } - printf("\n\n"); - - matrix_matmul_with_transpose( X3 , tmp , X2 , true, false); - matrix_free(tmp); -} - - - - -double enkf_linalg_data_mismatch(matrix_type *D , matrix_type *R , matrix_type *Sk) -{ - matrix_type * tmp = matrix_alloc (matrix_get_columns(D), matrix_get_columns(R)); - double mismatch; - matrix_matmul_with_transpose(tmp, D, R,true, false); // tmp = D' * R, i.e. N-by-p - matrix_matmul(Sk, tmp, D); // Sk = D' * R * D - // Calculate the mismatch - mismatch = matrix_trace(Sk)/(matrix_get_columns(D)); - - return mismatch; -} - -// Cd = SampCov(E) (including (N-1) normalization) -void enkf_linalg_Covariance(matrix_type *Cd, const matrix_type *E, double nsc ,int nrobs) -{ - matrix_matmul_with_transpose(Cd, E, E,false,true); - for (int i=0; i< nrobs; i++) { - for (int j=0;j< nrobs; j++) { - if (i!=j) - matrix_iset(Cd, i, j, 0.0); - } - } - nsc = nsc*nsc; - matrix_scale(Cd,nsc); -} - - - -// Scale columns (not rows!) of Um by entries in diagonal Wm -void enkf_linalg_rml_enkfAm(matrix_type * Um, const double * Wm,int nsign1){ - for (int i=0; i< nsign1 ; i++) { - double sc = 1 / Wm[i]; - matrix_scale_column(Um, i, sc); - } -} - - - - -void enkf_linalg_rml_enkfX7(matrix_type * X7, matrix_type * VdT, double * Wdr, double a, matrix_type * X6){ - - int nsign = matrix_get_rows(VdT); - int ens_size = matrix_get_columns(VdT); - matrix_type *tmp1 = matrix_alloc_copy(VdT); - matrix_type *tmp2 = matrix_alloc(ens_size,ens_size); - - - for (int i=0; i < nsign ; i++) { - double scale_factor = 1 / ( a + (Wdr[i]*Wdr[i])); - matrix_scale_row( tmp1 , i , scale_factor); - } - - - matrix_matmul_with_transpose(tmp2, tmp1, VdT, true, false); - matrix_matmul(X7, tmp2, X6); - matrix_free(tmp1); - matrix_free(tmp2); -} - - diff --git a/ThirdParty/Ert/libanalysis/src/fwd_step_enkf.c b/ThirdParty/Ert/libanalysis/src/fwd_step_enkf.c deleted file mode 100644 index d2a695677c..0000000000 --- a/ThirdParty/Ert/libanalysis/src/fwd_step_enkf.c +++ /dev/null @@ -1,509 +0,0 @@ -/* - copyright (C) 2011 Statoil ASA, Norway. - - The file 'fwd_step_enkf.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - - -#define FWD_STEP_ENKF_TYPE_ID 765524 - -#define DEFAULT_NFOLDS 5 -#define DEFAULT_R2_LIMIT 0.99 -#define NFOLDS_KEY "CV_NFOLDS" -#define R2_LIMIT_KEY "FWD_STEP_R2_LIMIT" -#define DEFAULT_VERBOSE false -#define VERBOSE_KEY "VERBOSE" -#define LOG_FILE_KEY "LOG_FILE" -#define CLEAR_LOG_KEY "CLEAR_LOG" - -struct fwd_step_enkf_data_struct { - UTIL_TYPE_ID_DECLARATION; - stepwise_type * stepwise_data; - rng_type * rng; - int nfolds; - long option_flags; - double r2_limit; - bool verbose; - fwd_step_log_type * fwd_step_log; -}; - - -static UTIL_SAFE_CAST_FUNCTION_CONST( fwd_step_enkf_data , FWD_STEP_ENKF_TYPE_ID ) -static UTIL_SAFE_CAST_FUNCTION( fwd_step_enkf_data , FWD_STEP_ENKF_TYPE_ID ) - - -void fwd_step_enkf_set_nfolds( fwd_step_enkf_data_type * data , int nfolds ) { - data->nfolds = nfolds; -} - -void fwd_step_enkf_set_r2_limit( fwd_step_enkf_data_type * data , double limit ) { - data->r2_limit = limit; -} - -void fwd_step_enkf_set_verbose( fwd_step_enkf_data_type * data , bool verbose ) { - data->verbose = verbose; -} - -void * fwd_step_enkf_data_alloc( rng_type * rng ) { - fwd_step_enkf_data_type * data = util_malloc( sizeof * data ); - UTIL_TYPE_ID_INIT( data , FWD_STEP_ENKF_TYPE_ID ); - - data->stepwise_data = NULL; - data->rng = rng; - data->nfolds = DEFAULT_NFOLDS; - data->r2_limit = DEFAULT_R2_LIMIT; - data->option_flags = ANALYSIS_NEED_ED + ANALYSIS_UPDATE_A + ANALYSIS_SCALE_DATA; - data->verbose = DEFAULT_VERBOSE; - data->fwd_step_log = fwd_step_log_alloc(); - return data; -} - -void fwd_step_enkf_data_free( void * arg ) { - fwd_step_enkf_data_type * fwd_step_data = fwd_step_enkf_data_safe_cast( arg ); - { - - if (fwd_step_data != NULL) { - if (fwd_step_data->stepwise_data != NULL) { - stepwise_free( fwd_step_data->stepwise_data ); - } - } - } - fwd_step_log_free( fwd_step_data->fwd_step_log ); - free( fwd_step_data ); -} - - -//********************************************** -// Log-file related stuff -//********************************************** - - -static void fwd_step_enkf_write_log_header( fwd_step_enkf_data_type * fwd_step_data, const char * ministep_name, const int nx, const int nd, const int ens_size) { - const char * format = "%-25s%-25s%-25s%-25s\n"; - const char * column1 = "Parameter(ActiveIndex)"; - const char * column2 = "GlobalIndex"; - const char * column3 = "NumAttached"; - const char * column4 = "AttachedObs(ActiveIndex)[Percentage sensitivity]"; - int nfolds = fwd_step_data->nfolds; - double r2_limit = fwd_step_data->r2_limit; - - if (fwd_step_log_is_open( fwd_step_data->fwd_step_log )) { - fwd_step_log_line(fwd_step_data->fwd_step_log, "===============================================================================================================================\n"); - fwd_step_log_line(fwd_step_data->fwd_step_log, "Ministep : %s\n",ministep_name); - fwd_step_log_line(fwd_step_data->fwd_step_log, "Total number of parameters : %d\n",nx); - fwd_step_log_line(fwd_step_data->fwd_step_log, "Total number of observations: %d\n",nd); - fwd_step_log_line(fwd_step_data->fwd_step_log, "Number of ensembles : %d\n",ens_size); - fwd_step_log_line(fwd_step_data->fwd_step_log, "CV folds : %d\n",nfolds); - fwd_step_log_line(fwd_step_data->fwd_step_log, "Relative R2 tolerance : %f\n",r2_limit); - fwd_step_log_line(fwd_step_data->fwd_step_log, "===============================================================================================================================\n"); - fwd_step_log_line(fwd_step_data->fwd_step_log, format, column1, column2, column3, column4); - fwd_step_log_line(fwd_step_data->fwd_step_log, "===============================================================================================================================\n"); - } - - printf("===============================================================================================================================\n"); - printf("Ministep : %s\n",ministep_name); - printf("Total number of parameters : %d\n",nx); - printf("Total number of observations: %d\n",nd); - printf("Number of ensembles : %d\n",ens_size); - printf("CV folds : %d\n",nfolds); - printf("Relative R2 tolerance : %f\n",r2_limit); - printf("===============================================================================================================================\n"); - printf(format, column1, column2, column3, column4); - printf("===============================================================================================================================\n"); -} - -static void fwd_step_enkf_write_iter_info( fwd_step_enkf_data_type * data , stepwise_type * stepwise, const char* key, const int data_active_index, const int global_index, const module_info_type * module_info ) { - - const char * format = "%-25s%-25d%-25d"; - int n_active = stepwise_get_n_active( stepwise); - bool_vector_type * active_set = stepwise_get_active_set(stepwise); - bool has_log = fwd_step_log_is_open( data->fwd_step_log ); - module_obs_block_vector_type * module_obs_block_vector = module_info_get_obs_block_vector(module_info); - char * loc_key = util_alloc_string_copy(key); - char * data_active_index_str = util_alloc_sprintf( "(%d)" , data_active_index ); - char * cat = util_strcat_realloc(loc_key , data_active_index_str ); - if (has_log) - fwd_step_log_line( data->fwd_step_log , format, cat, global_index, n_active); - - printf(format, cat, global_index,n_active); - - const double sum_beta = stepwise_get_sum_beta(stepwise); - int obs_active_index = 0; - stringlist_type * obs_list = stringlist_alloc_new( ); - double_vector_type * r_list = double_vector_alloc(0, 0); - - const char * format1 = "%s(%d)[%.1f] "; - for (int ivar = 0; ivar < bool_vector_size( active_set); ivar++) { - if (!bool_vector_iget( active_set , ivar)) - continue; - - const module_obs_block_type * module_obs_block = module_obs_block_vector_search_module_obs_block(module_obs_block_vector, ivar); - const int* active_indices = module_obs_block_get_active_indices(module_obs_block); - bool all_active = active_indices == NULL; /* Inactive are not present in D */ - int row_start = module_obs_block_get_row_start(module_obs_block); - int row_end = module_obs_block_get_row_end(module_obs_block); - const char* obs_key = module_obs_block_get_key(module_obs_block); - const double var_beta = stepwise_iget_beta(stepwise, ivar); - const double var_beta_percent = 100.0 * fabs(var_beta) / sum_beta; - - int local_index = 0; - for (int i = row_start; i < row_end; i++) { - if (i == ivar){ - if (all_active) - obs_active_index = local_index; - else - obs_active_index = active_indices[local_index]; - break; - } - local_index ++; - } - - char * obs_list_entry = util_alloc_sprintf(format1 , obs_key, obs_active_index,var_beta_percent); - stringlist_append_copy(obs_list, obs_list_entry); - double_vector_append(r_list, var_beta_percent); - free( obs_list_entry ); - } - - { - /* Sorting with respect to sensitivity */ - perm_vector_type * sort_perm = double_vector_alloc_rsort_perm(r_list); - for (int i = 0; i < stringlist_get_size( obs_list); i++) { - const char * obs_list_entry = stringlist_iget(obs_list, perm_vector_iget(sort_perm, i)); - if (has_log) - fwd_step_log_line( data->fwd_step_log , "%s", obs_list_entry); - - printf("%s", obs_list_entry); - } - perm_vector_free(sort_perm); - } - - - - if (has_log) - fwd_step_log_line( data->fwd_step_log , "\n"); - - printf("\n"); - - stringlist_free(obs_list); - util_safe_free(data_active_index_str); - util_safe_free(cat); -} - -/*Main function: */ -void fwd_step_enkf_updateA(void * module_data , - matrix_type * A , - matrix_type * S , - matrix_type * R , - matrix_type * dObs , - matrix_type * E , - matrix_type * D , - const module_info_type* module_info) { - - - - fwd_step_enkf_data_type * fwd_step_data = fwd_step_enkf_data_safe_cast( module_data ); - fwd_step_log_open(fwd_step_data->fwd_step_log); - module_data_block_vector_type * data_block_vector = module_info_get_data_block_vector(module_info); - printf("Running Forward Stepwise regression:\n"); - { - - int ens_size = matrix_get_columns( S ); - int nx = matrix_get_rows( A ); - int nd = matrix_get_rows( S ); - int nfolds = fwd_step_data->nfolds; - double r2_limit = fwd_step_data->r2_limit; - bool verbose = fwd_step_data->verbose; - int num_kw = module_data_block_vector_get_size(data_block_vector); - - - if ( ens_size <= nfolds) - util_abort("%s: The number of ensembles must be larger than the CV fold - aborting\n", __func__); - - - { - - stepwise_type * stepwise_data = stepwise_alloc1(ens_size, nd , fwd_step_data->rng); - - matrix_type * workS = matrix_alloc( ens_size , nd ); - matrix_type * workE = matrix_alloc( ens_size , nd ); - - /*workS = S' */ - matrix_subtract_row_mean( S ); /* Shift away the mean */ - workS = matrix_alloc_transpose( S ); - workE = matrix_alloc_transpose( E ); - - stepwise_set_X0( stepwise_data , workS ); - stepwise_set_E0( stepwise_data , workE ); - - matrix_type * di = matrix_alloc( 1 , nd ); - - if (verbose){ - char * ministep_name = module_info_get_ministep_name(module_info); - fwd_step_enkf_write_log_header(fwd_step_data, ministep_name, nx, nd, ens_size); - } - - for (int kw = 0; kw < num_kw; kw++) { - - module_data_block_type * data_block = module_data_block_vector_iget_module_data_block(data_block_vector, kw); - const char * key = module_data_block_get_key(data_block); - int row_start = module_data_block_get_row_start(data_block); - int row_end = module_data_block_get_row_end(data_block); - const int* active_indices = module_data_block_get_active_indices(data_block); - int local_index = 0; - int active_index = 0; - bool all_active = active_indices == NULL; /* Inactive are not present in A */ - - for (int i = row_start; i < row_end; i++) { - - /*Update values of y */ - /*Start of the actual update */ - matrix_type * y = matrix_alloc( ens_size , 1 ); - - for (int j = 0; j < ens_size; j++) { - matrix_iset(y , j , 0 , matrix_iget( A, i , j ) ); - } - - stepwise_set_Y0( stepwise_data , y ); - - stepwise_estimate(stepwise_data , r2_limit , nfolds ); - - /*manipulate A directly*/ - for (int j = 0; j < ens_size; j++) { - for (int k = 0; k < nd; k++) { - matrix_iset(di , 0 , k , matrix_iget( D , k , j ) ); - } - double aij = matrix_iget( A , i , j ); - double xHat = stepwise_eval(stepwise_data , di ); - matrix_iset(A , i , j , aij + xHat); - } - - if (verbose){ - if (all_active) - active_index = local_index; - else - active_index = active_indices[local_index]; - - fwd_step_enkf_write_iter_info(fwd_step_data, stepwise_data, key, active_index, i, module_info); - - } - - local_index ++; - } - } - - if (verbose) - printf("===============================================================================================================================\n"); - - printf("Done with stepwise regression enkf\n"); - - stepwise_free( stepwise_data ); - matrix_free( di ); - - } - - - - } - - fwd_step_log_close( fwd_step_data->fwd_step_log ); -} - - - - - - -bool fwd_step_enkf_set_double( void * arg , const char * var_name , double value) { - fwd_step_enkf_data_type * module_data = fwd_step_enkf_data_safe_cast( arg ); - { - bool name_recognized = true; - - if (strcmp( var_name , R2_LIMIT_KEY ) == 0) - fwd_step_enkf_set_r2_limit( module_data , value ); - else - name_recognized = false; - - return name_recognized; - } -} - - -bool fwd_step_enkf_set_int( void * arg , const char * var_name , int value) { - fwd_step_enkf_data_type * module_data = fwd_step_enkf_data_safe_cast( arg ); - { - bool name_recognized = true; - - /*Set number of CV folds */ - if (strcmp( var_name , NFOLDS_KEY) == 0) - fwd_step_enkf_set_nfolds( module_data , value); - else - name_recognized = false; - - return name_recognized; - } -} - -bool fwd_step_enkf_set_bool( void * arg , const char * var_name , bool value) { - fwd_step_enkf_data_type * module_data = fwd_step_enkf_data_safe_cast( arg ); - { - bool name_recognized = true; - - /*Set verbose */ - if (strcmp( var_name , VERBOSE_KEY) == 0) - fwd_step_enkf_set_verbose( module_data , value); - else if (strcmp( var_name , CLEAR_LOG_KEY) == 0) - fwd_step_log_set_clear_log( module_data->fwd_step_log , value ); - else - name_recognized = false; - - return name_recognized; - } -} - -bool fwd_step_enkf_set_string( void * arg , const char * var_name , const char * value) { - fwd_step_enkf_data_type * module_data = fwd_step_enkf_data_safe_cast( arg ); - { - bool name_recognized = true; - - if (strcmp( var_name , LOG_FILE_KEY) == 0) - fwd_step_log_set_log_file( module_data->fwd_step_log , value ); - else - name_recognized = false; - - return name_recognized; - } -} - -long fwd_step_enkf_get_options( void * arg , long flag) { - fwd_step_enkf_data_type * fwd_step_data = fwd_step_enkf_data_safe_cast( arg ); - { - return fwd_step_data->option_flags; - } -} - -bool fwd_step_enkf_has_var( const void * arg, const char * var_name) { - { - if (strcmp(var_name , NFOLDS_KEY) == 0) - return true; - else if (strcmp(var_name , R2_LIMIT_KEY ) == 0) - return true; - else if (strcmp(var_name , VERBOSE_KEY ) == 0) - return true; - else if (strcmp(var_name , LOG_FILE_KEY) == 0) - return true; - else if (strcmp(var_name , CLEAR_LOG_KEY) == 0) - return true; - else - return false; - } -} - -double fwd_step_enkf_get_double( const void * arg, const char * var_name) { - const fwd_step_enkf_data_type * module_data = fwd_step_enkf_data_safe_cast_const( arg ); - { - if (strcmp(var_name , R2_LIMIT_KEY ) == 0) - return module_data->r2_limit; - else - return -1; - } -} - -int fwd_step_enkf_get_int( const void * arg, const char * var_name) { - const fwd_step_enkf_data_type * module_data = fwd_step_enkf_data_safe_cast_const( arg ); - { - if (strcmp(var_name , NFOLDS_KEY) == 0) - return module_data->nfolds; - else - return -1; - } -} - -bool fwd_step_enkf_get_bool( const void * arg, const char * var_name) { - const fwd_step_enkf_data_type * module_data = fwd_step_enkf_data_safe_cast_const( arg ); - { - if (strcmp(var_name , VERBOSE_KEY) == 0) - return module_data->verbose; - else if (strcmp(var_name , CLEAR_LOG_KEY) == 0) - return fwd_step_log_get_clear_log( module_data->fwd_step_log ); - else - return false; - } -} - -void * fwd_step_enkf_get_ptr( const void * arg , const char * var_name ) { - const fwd_step_enkf_data_type * module_data = fwd_step_enkf_data_safe_cast_const( arg ); - { - if (strcmp(var_name , LOG_FILE_KEY) == 0) - return (void *) fwd_step_log_get_log_file( module_data->fwd_step_log ); - else - return NULL; - } -} - - - - - -#ifdef INTERNAL_LINK -#define LINK_NAME FWD_STEP_ENKF -#else -#define LINK_NAME EXTERNAL_MODULE_SYMBOL -#endif - - -analysis_table_type LINK_NAME = { - .name = "FWD_STEP_ENKF", - .alloc = fwd_step_enkf_data_alloc, - .freef = fwd_step_enkf_data_free, - .set_int = fwd_step_enkf_set_int , - .set_double = fwd_step_enkf_set_double , - .set_bool = fwd_step_enkf_set_bool , - .set_string = fwd_step_enkf_set_string , - .get_options = fwd_step_enkf_get_options , - .initX = NULL , - .updateA = fwd_step_enkf_updateA, - .init_update = NULL , - .complete_update = NULL , - .has_var = fwd_step_enkf_has_var, - .get_int = fwd_step_enkf_get_int , - .get_double = fwd_step_enkf_get_double , - .get_bool = fwd_step_enkf_get_bool , - .get_ptr = fwd_step_enkf_get_ptr -}; - - diff --git a/ThirdParty/Ert/libanalysis/src/fwd_step_log.c b/ThirdParty/Ert/libanalysis/src/fwd_step_log.c deleted file mode 100644 index d8c585e9a6..0000000000 --- a/ThirdParty/Ert/libanalysis/src/fwd_step_log.c +++ /dev/null @@ -1,105 +0,0 @@ -/* - Copyright (C) 2016 Statoil ASA, Norway. - - The file 'fwd_step_log.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include - -#include - -#include - -#define DEFAULT_LOG_FILE "fwd_step.out" -#define DEFAULT_CLEAR_LOG false - -struct fwd_step_log_struct { - bool clear_log; - char * log_file; - FILE * log_stream; -}; - - -fwd_step_log_type * fwd_step_log_alloc() { - fwd_step_log_type * fwd_step_log = util_malloc( sizeof * fwd_step_log ); - fwd_step_log->log_file = NULL; - fwd_step_log->log_stream = NULL; - fwd_step_log_set_log_file( fwd_step_log , DEFAULT_LOG_FILE); - fwd_step_log_set_clear_log( fwd_step_log , DEFAULT_CLEAR_LOG ); - return fwd_step_log; -} - -bool fwd_step_log_get_clear_log( const fwd_step_log_type * data ) { - return data->clear_log; -} - -void fwd_step_log_set_clear_log( fwd_step_log_type * data , bool clear_log) { - data->clear_log = clear_log; -} - -void fwd_step_log_set_log_file( fwd_step_log_type * data , const char * log_file ) { - data->log_file = util_realloc_string_copy( data->log_file , log_file ); -} - -const char * fwd_step_log_get_log_file( const fwd_step_log_type * data) { - return data->log_file; -} - - -void fwd_step_log_free(fwd_step_log_type * fwd_step_log) { - fwd_step_log_close( fwd_step_log ); - util_safe_free( fwd_step_log->log_file ); - free( fwd_step_log ); -} - - -void fwd_step_log_open( fwd_step_log_type * fwd_step_log ) { - if (fwd_step_log->log_file) { - if (fwd_step_log->clear_log) - fwd_step_log->log_stream = util_mkdir_fopen( fwd_step_log->log_file , "w"); - else - fwd_step_log->log_stream = util_mkdir_fopen( fwd_step_log->log_file , "a"); - } -} - - -bool fwd_step_log_is_open( const fwd_step_log_type * fwd_step_log ) { - if (fwd_step_log->log_stream) - return true; - else - return false; -} - - -void fwd_step_log_close( fwd_step_log_type * fwd_step_log ) { - if (fwd_step_log->log_stream) - fclose( fwd_step_log->log_stream ); - - fwd_step_log->log_stream = NULL; -} - - -void fwd_step_log_line( fwd_step_log_type * fwd_step_log , const char * fmt , ...) { - if (fwd_step_log->log_stream) { - va_list ap; - va_start(ap , fmt); - vfprintf( fwd_step_log->log_stream , fmt , ap ); - va_end( ap ); - } -} - - diff --git a/ThirdParty/Ert/libanalysis/src/module_data_block.c b/ThirdParty/Ert/libanalysis/src/module_data_block.c deleted file mode 100644 index ebe9d34c23..0000000000 --- a/ThirdParty/Ert/libanalysis/src/module_data_block.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - Copyright (C) 2016 Statoil ASA, Norway. - - The file 'module_data_block.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include - -#include -#include - -#include - -#define MODULE_DATA_BLOCK_TYPE_ID 73217801 -static UTIL_SAFE_CAST_FUNCTION( module_data_block , MODULE_DATA_BLOCK_TYPE_ID); -UTIL_IS_INSTANCE_FUNCTION( module_data_block , MODULE_DATA_BLOCK_TYPE_ID) - -module_data_block_type * module_data_block_alloc( const char * key, const int * index_list , const int row_start, const int n_active) { - module_data_block_type * module_data_block = util_malloc( sizeof * module_data_block ); - UTIL_TYPE_ID_INIT( module_data_block , MODULE_DATA_BLOCK_TYPE_ID ); - module_data_block->key = util_alloc_string_copy( key ); - module_data_block->index_list = index_list; - module_data_block->A_row_start = row_start; - module_data_block->n_active = n_active; - return module_data_block; -} - - -const char * module_data_block_get_key(const module_data_block_type * module_data_block){ - return module_data_block->key; -} - -const int module_data_block_get_row_start(const module_data_block_type * module_data_block){ - return module_data_block->A_row_start; -} - -const int module_data_block_get_row_end(const module_data_block_type * module_data_block){ - return module_data_block->A_row_start + module_data_block->n_active; -} - -const int * module_data_block_get_active_indices(const module_data_block_type * module_data_block ){ - return module_data_block->index_list; -} - -void module_data_block_free( module_data_block_type * module_data_block ) { - util_safe_free(module_data_block->key); - free( module_data_block ); -} - -void module_data_block_free__( void * arg ) { - module_data_block_type * data_block = module_data_block_safe_cast( arg ); - module_data_block_free( data_block ); -} diff --git a/ThirdParty/Ert/libanalysis/src/module_data_block_vector.c b/ThirdParty/Ert/libanalysis/src/module_data_block_vector.c deleted file mode 100644 index 33ff3a86cc..0000000000 --- a/ThirdParty/Ert/libanalysis/src/module_data_block_vector.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - Copyright (C) 2016 Statoil ASA, Norway. - - The file 'module_data_block_vector.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -#include -#include -#include - -#include -#include - -#define MODULE_DATA_BLOCK_VECTOR_TYPE_ID 732178012 - -struct module_data_block_vector_struct { - UTIL_TYPE_ID_DECLARATION; - vector_type * data_block_vector; -}; - -UTIL_IS_INSTANCE_FUNCTION( module_data_block_vector , MODULE_DATA_BLOCK_VECTOR_TYPE_ID) - -module_data_block_vector_type * module_data_block_vector_alloc( ) { - module_data_block_vector_type * module_data_block_vector = util_malloc( sizeof * module_data_block_vector ); - UTIL_TYPE_ID_INIT( module_data_block_vector , MODULE_DATA_BLOCK_VECTOR_TYPE_ID ); - module_data_block_vector->data_block_vector = vector_alloc_new(); - return module_data_block_vector; -} - - -void module_data_block_vector_free( module_data_block_vector_type * module_data_block_vector ) { - vector_free( module_data_block_vector->data_block_vector ); - free( module_data_block_vector ); -} - -void module_data_block_vector_add_data_block( module_data_block_vector_type * module_data_block_vector , const module_data_block_type * data_block) { - vector_append_owned_ref(module_data_block_vector->data_block_vector, data_block , module_data_block_free__); -} - - -module_data_block_type * module_data_block_vector_iget_module_data_block(const module_data_block_vector_type * module_data_block_vector, int index){ - return vector_iget(module_data_block_vector->data_block_vector, index); -} - -int module_data_block_vector_get_size(const module_data_block_vector_type * module_data_block_vector){ - return vector_get_size(module_data_block_vector->data_block_vector); -} - - diff --git a/ThirdParty/Ert/libanalysis/src/module_info.c b/ThirdParty/Ert/libanalysis/src/module_info.c deleted file mode 100644 index 969df3792a..0000000000 --- a/ThirdParty/Ert/libanalysis/src/module_info.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - Copyright (C) 2016 Statoil ASA, Norway. - - The file 'module_info.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -#include -#include -#include - -#include - -#define MODULE_INFO_TYPE_ID 73780123 - -struct module_info_struct { - UTIL_TYPE_ID_DECLARATION; - char * ministep_name; - module_data_block_vector_type * data_block_vector; - module_obs_block_vector_type * obs_block_vector; -}; - -UTIL_IS_INSTANCE_FUNCTION( module_info , MODULE_INFO_TYPE_ID) - -module_info_type * module_info_alloc( const char* ministep_name ) { - module_info_type * module_info = util_malloc( sizeof * module_info ); - UTIL_TYPE_ID_INIT( module_info , MODULE_INFO_TYPE_ID ); - module_info->ministep_name = util_alloc_string_copy( ministep_name ); - module_info->data_block_vector = module_data_block_vector_alloc(); - module_info->obs_block_vector = module_obs_block_vector_alloc(); - return module_info; -} - - -void module_info_free( module_info_type * module_info ) { - util_safe_free(module_info->ministep_name); - module_data_block_vector_free( module_info->data_block_vector ); - module_obs_block_vector_free( module_info->obs_block_vector ); - free( module_info ); -} - -module_data_block_vector_type * module_info_get_data_block_vector(const module_info_type * module_info){ - return module_info->data_block_vector; -} - -module_obs_block_vector_type * module_info_get_obs_block_vector(const module_info_type * module_info){ - return module_info->obs_block_vector; -} - -char * module_info_get_ministep_name(const module_info_type * module_info){ - return module_info->ministep_name; -} diff --git a/ThirdParty/Ert/libanalysis/src/module_obs_block.c b/ThirdParty/Ert/libanalysis/src/module_obs_block.c deleted file mode 100644 index 7960919528..0000000000 --- a/ThirdParty/Ert/libanalysis/src/module_obs_block.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - Copyright (C) 2016 Statoil ASA, Norway. - - The file 'module_obs_block.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include - -#include -#include - -#include - -#define MODULE_OBS_BLOCK_TYPE_ID 73217901 -static UTIL_SAFE_CAST_FUNCTION( module_obs_block , MODULE_OBS_BLOCK_TYPE_ID); -UTIL_IS_INSTANCE_FUNCTION( module_obs_block , MODULE_OBS_BLOCK_TYPE_ID) - -module_obs_block_type * module_obs_block_alloc( const char * key, const int * index_list, const int row_start, const int n_active) { - module_obs_block_type * module_obs_block = util_malloc( sizeof * module_obs_block ); - UTIL_TYPE_ID_INIT( module_obs_block , MODULE_OBS_BLOCK_TYPE_ID ); - module_obs_block->key = util_alloc_string_copy( key ); - module_obs_block->index_list = index_list; - module_obs_block->D_row_start = row_start; - module_obs_block->n_active = n_active; - return module_obs_block; -} - - -const char * module_obs_block_get_key(const module_obs_block_type * module_obs_block){ - return module_obs_block->key; -} - -const int module_obs_block_get_row_start(const module_obs_block_type * module_obs_block){ - return module_obs_block->D_row_start; -} - -const int module_obs_block_get_row_end(const module_obs_block_type * module_obs_block){ - return module_obs_block->D_row_start + module_obs_block->n_active; -} - -const int * module_obs_block_get_active_indices(const module_obs_block_type * module_obs_block ){ - return module_obs_block->index_list; -} - -void module_obs_block_free( module_obs_block_type * module_obs_block ) { - util_safe_free(module_obs_block->key); - free( module_obs_block ); -} - -void module_obs_block_free__( void * arg ) { - module_obs_block_type * obs_block = module_obs_block_safe_cast( arg ); - module_obs_block_free( obs_block ); -} diff --git a/ThirdParty/Ert/libanalysis/src/module_obs_block_vector.c b/ThirdParty/Ert/libanalysis/src/module_obs_block_vector.c deleted file mode 100644 index dc076d0523..0000000000 --- a/ThirdParty/Ert/libanalysis/src/module_obs_block_vector.c +++ /dev/null @@ -1,82 +0,0 @@ -/* - Copyright (C) 2016 Statoil ASA, Norway. - - The file 'module_obs_block_vector.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -#include -#include -#include - -#include -#include - -#define MODULE_OBS_BLOCK_VECTOR_TYPE_ID 732188012 - -struct module_obs_block_vector_struct { - UTIL_TYPE_ID_DECLARATION; - vector_type * obs_block_vector; -}; - -UTIL_IS_INSTANCE_FUNCTION( module_obs_block_vector , MODULE_OBS_BLOCK_VECTOR_TYPE_ID) - -module_obs_block_vector_type * module_obs_block_vector_alloc() { - module_obs_block_vector_type * module_obs_block_vector = util_malloc( sizeof * module_obs_block_vector ); - UTIL_TYPE_ID_INIT( module_obs_block_vector , MODULE_OBS_BLOCK_VECTOR_TYPE_ID ); - module_obs_block_vector->obs_block_vector = vector_alloc_new(); - return module_obs_block_vector; -} - - -void module_obs_block_vector_free( module_obs_block_vector_type * module_obs_block_vector ) { - vector_free( module_obs_block_vector->obs_block_vector ); - free( module_obs_block_vector ); -} - -void module_obs_block_vector_add_obs_block( module_obs_block_vector_type * module_obs_block_vector , module_obs_block_type * obs_block) { - vector_append_owned_ref(module_obs_block_vector->obs_block_vector, obs_block , module_obs_block_free__); -} - - -module_obs_block_type * module_obs_block_vector_iget_module_obs_block(const module_obs_block_vector_type * module_obs_block_vector, int block_index){ - return vector_iget(module_obs_block_vector->obs_block_vector, block_index); -} - -const module_obs_block_type * module_obs_block_vector_search_module_obs_block(const module_obs_block_vector_type * module_obs_block_vector, int global_index){ - /* This function maps from a global index to an observation information block. Will return NULL if block is not found */ - int block_nr = 0; - while (true) { - if (block_nr >= module_obs_block_vector_get_size( module_obs_block_vector )) - break; - - module_obs_block_type * module_obs_block = module_obs_block_vector_iget_module_obs_block (module_obs_block_vector, block_nr); - int row_start = module_obs_block_get_row_start(module_obs_block); - int row_end = module_obs_block_get_row_end(module_obs_block); - if (global_index >= row_start && global_index < row_end) - return module_obs_block; - - block_nr++; - } - return NULL; -} - -int module_obs_block_vector_get_size(const module_obs_block_vector_type * module_obs_block_vector){ - return vector_get_size(module_obs_block_vector->obs_block_vector); -} - - diff --git a/ThirdParty/Ert/libanalysis/src/modules.txt b/ThirdParty/Ert/libanalysis/src/modules.txt deleted file mode 100644 index 906a777b9c..0000000000 --- a/ThirdParty/Ert/libanalysis/src/modules.txt +++ /dev/null @@ -1,212 +0,0 @@ -Overview --------- -The ERT application has evolved into a quite complex beast. Originally -the actual EnKF algorithm was located very deep down in the code, and -changes to the EnKF algorithm required detailed knowledge about the -enkf_node objects, the datatype for measurements and observations, -serialisation and so on. Quite complex and fragile stuff. - -To facilitate easier development and testing of new update schemes the -core EnKF update step has been factored out as analysis modules, which -are called from the enkf_main scope. The update functions in the -module get ordinary matrices as input, and do not need to know -anything about the internals of the ERT application. - -The modules can either be built in, or you can compile your own module -as a shared library and load it runtime. Apart from the initial -loading internal modules and external modules are treated 100% -identically. - - -How modules work ----------------- -The modules are instances of the object type analysis_module_type, and -the enkf_main layer interacts with the module through the -analyis_module instance. The most important part of the -analysis_module type is a list of function pointers to functions which -"actually do the work". In addition to some functions for setting -internal module variables the most core functions are: - - init_update() - initX() - updateA() - complete_update() - -Of these functions a module should have ONLY ONE of initX() and -updateA(); the initX() function will initialize an X matrix which is -then subsequently used to update the ensemble matrix A. Alternatively -the updateA() function should will directly manipulate the A matrix. - -The init_update() and complete_update() functions are optional, they -can be used to avoid repeated initialization calculations. These -functions interact quite closely with the scheme used for local -analysis; so you should understand that in detail before deciding -whether it is worthwile to implement init_update() and -complete_update() functions. - - -Loading modules ---------------- - -The loading of modules is based on the dlopen() function to open a -shared a library and map it into the adress space of the current -process, and then the dlsym() function to locate a symbol table which -is a list of function pointers. The only difference between internal -and external modules is in the arguments passed to the dlopen() and -dlsym() function calls: - - Loading internal modules - ------------------------ - Internal modules means modules which have been compiled into the - libanalyis library, i.e. they are already part of the ERT - executable, however before we have "loaded" these modules we have - no way to access them. The current executable is loaded by - passing NULL as argument to dlopen(). - - When dlopen() has succeded we must use dlsym() to get a handle to - the symbol table. The symbol table is essentially a global - variable in the ERT adress space, and must have a unique name for - each module. - - - Loading external modules - ------------------------ - External modules are ordinary shared libraries. To load an external - module the name of the shared library must be given to the dlopen() - function, normal rules for runtime loading of dynamic libraries - apply - i.e. the shared library must be in a location where the - dynamic linker can find it. The name of module should be a - filename, including the .so extension. undo - - When dlopen() has succeded we must use dlsym() to get a handle to - the symbol table; when the module loading is hidden behind a - dlopen() call we have essentially created a module namespace, and - the symbol tables from the different modules can have the same - name. For convenience we assume that the symbol table is given by - the name defined by the symbol EXTERNAL_MODULE_TABLE in - analysis_module.h. - -In practice all of is handled by the functions: - - analysis_module_type * analysis_module_alloc_internal( ); - analysis_module_type * analysis_module_alloc_external( ); - -symbol_table ------------- - -Interacting with modules ------------------------- -The modules can implement four different functions to set a scalar -value. The four functions have signature: - - bool set_int (void * module_data, const char * var_name , int value) - bool set_double( void * module_data , const char * var_name , double value) - bool set_bool( void * module_data , const char * var_name , bool value ) - bool set_string( void * module_data , const char * var_name , const char * value ) - -Common for all these functions is: - - 1. It is not necessary to implement these functions; if you know - that the module has no internal integer variables which should be - user-modifiable you can just set the set_int function pointer to - NULL. - - 2. If the module recognizes the variable name and actually sets an - internal variable it should return true, otherwise return false. - - 3. The set_xxx() functions are called from the wrapper function - analysis_module_set_var(); when calling the wrapper function the - value variable is a string which we try to convert to int, double - and bool respectively and then cascade through the functions in - the order listed above. This involves two things: - - a) A module has an internal variable namespace which is shared - among all variable types. - - b) If the string value argument is incorrectly formatted, - i.e. an integer is passed as "12x" the correct low level - function will not be called. - -The method to get information out from the module is much more -limited. Each module should contain an internal variable: - - long option_flags; - -And when instantiating the module data you should initialize the -option_flags variable by adding together the relevant option flags -from analysis_module.h. The enkf_main_UPDATE() method which invokes -the module functions will inspect the option_flags to see which -variables to pass to the module, and which module functions to invoke, -so this must be correct. - -Example -------- -The module/file std_enkf.c is commented quite heavily to serve as an -example. - ---------------------------------------------------------------------- - -With the analysis modules we have essentially got a three layer -design: - - 1. The ert core layer which creates/loads a list of analysis_module - instances. - - 2. analysis_module instances are a thing layer which: - - a) Hold on to specific analysis implementations like e.g. the - std_enkf implementation on one side. - - b) Present a uniform module interface to the ert layer on the - 'other side'. - - 3. Specific analysis module implementations like the std_enkf. - - -In fine ASCII art: - . - +----------------------+ . +---------------------------+ - | Analysis module | . | Implementation std_enkf | - +----------------------+ . +---------------------------+ - | | /------> | std_enkf_alloc() | - ----------------------> | | / . | std_enkf_free() | - / | X |o--------> | std_enkf_get_options() | - / | | \ . | std_enkf_initX() | - +------------------------------------------+ / | | \------> | std_enkf_set_int() | - | The ert core layer; in particular | / | | . | std_enkf_set_double() | - | the following functions: | / +----------------------+ . +---------------------------+ - | - analysis_config_load_external_module() |o . - | - analysis_config_load_internal_module() | \ +----------------------+ . +---------------------------+ - | - enkf_main_module_update() | \ | Analysis module | . | Implementation sqrt_enkf | - +------------------------------------------+ \ +----------------------+ . +---------------------------+ - \ | | /------> | sqrt_enkf_alloc() | - \ | | / . | sqrt_enkf_free() | - \---------------------> | |o--------> | sqrt_enkf_get_options() | - \ | X | \ . | sqrt_enkf_initX() | - \ | | \------> | sqrt_enkf_set_int() | - \ | | . | sqrt_enkf_set_double() | - \ +----------------------+ . +---------------------------+ - \ . - In the ert core layer the \ +----------------------+ . +---------------------------+ - different analysis module \ | Analysis module | . | Implementation cv_enkf | - instances are collected in \ +----------------------+ . +---------------------------+ - a hash table, and all function \ | | /------> | cv_enkf_alloc() | - invocations go through the \ | | / . | cv_enkf_free() | - functions in the analysis_module -----------> | |o--------> | cv_enkf_get_options() | - layer. | X | \ . | cv_enkf_initX() | - | | \------> | cv_enkf_set_int() | - | | . | cv_enkf_set_double() | - +----------------------+ . +---------------------------+ - . - . - . - . - . - The links between the analysis - modules and the std_enkf, sqrt_enkf - and cv_enkf implementations are - in terms of function pointers. These - links are established runtime, and - the vertical dotted line represents - an opaque wall which ert core layer - can not see through. diff --git a/ThirdParty/Ert/libanalysis/src/null_enkf.c b/ThirdParty/Ert/libanalysis/src/null_enkf.c deleted file mode 100644 index 295ab53ada..0000000000 --- a/ThirdParty/Ert/libanalysis/src/null_enkf.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'null_enkf.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - - - - -void null_enkf_initX(void * module_data , - matrix_type * X , - matrix_type * A , - matrix_type * S , - matrix_type * R , - matrix_type * dObs , - matrix_type * E , - matrix_type * D) { - - matrix_diag_set_scalar( X , 1.0 ); - -} - - -long null_enkf_get_options( void * arg , long flag ) { - return 0L; -} - - - -/** - gcc -fpic -c -I?? - gcc -shared -o -*/ - - - -#ifdef INTERNAL_LINK -#define LINK_NAME NULL_ENKF -#else -#define LINK_NAME EXTERNAL_MODULE_SYMBOL -#endif - -analysis_table_type LINK_NAME = { - .name = "NULL_ENKF", - .alloc = NULL , - .freef = NULL , - .set_int = NULL , - .set_double = NULL , - .set_bool = NULL , - .set_string = NULL , - .get_options = null_enkf_get_options, - .initX = null_enkf_initX , - .updateA = NULL, - .init_update = NULL, - .complete_update = NULL, - .has_var = NULL, - .get_int = NULL, - .get_double = NULL, - .get_ptr = NULL, -}; - diff --git a/ThirdParty/Ert/libanalysis/src/sqrt_enkf.c b/ThirdParty/Ert/libanalysis/src/sqrt_enkf.c deleted file mode 100644 index 082a57bc29..0000000000 --- a/ThirdParty/Ert/libanalysis/src/sqrt_enkf.c +++ /dev/null @@ -1,223 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sqrt_enkf.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include - - -/* - The sqrt_enkf module performs a EnKF update based on the square root - scheme. Observe that this module shares quite a lot of - implementation with the std_enkf module. -*/ - -#define SQRT_ENKF_TYPE_ID 268823 - -typedef struct { - UTIL_TYPE_ID_DECLARATION; - std_enkf_data_type * std_data; - matrix_type * randrot; - rng_type * rng; - long options; -} sqrt_enkf_data_type; - - -static UTIL_SAFE_CAST_FUNCTION( sqrt_enkf_data , SQRT_ENKF_TYPE_ID ) -static UTIL_SAFE_CAST_FUNCTION_CONST( sqrt_enkf_data , SQRT_ENKF_TYPE_ID ) - - -void * sqrt_enkf_data_alloc( rng_type * rng ) { - sqrt_enkf_data_type * data = util_malloc( sizeof * data ); - UTIL_TYPE_ID_INIT( data , SQRT_ENKF_TYPE_ID ); - - data->std_data = std_enkf_data_alloc( rng ); - data->randrot = NULL; - data->rng = rng; - data->options = ANALYSIS_SCALE_DATA; - - return data; -} - - - -void sqrt_enkf_data_free( void * data ) { - sqrt_enkf_data_type * module_data = sqrt_enkf_data_safe_cast( data ); - { - std_enkf_data_free( module_data->std_data ); - free( module_data ); - } -} - - - -bool sqrt_enkf_set_double( void * arg , const char * var_name , double value) { - sqrt_enkf_data_type * module_data = sqrt_enkf_data_safe_cast( arg ); - { - if (std_enkf_set_double( module_data->std_data , var_name , value )) - return true; - else { - /* Could in principle set sqrt specific variables here. */ - return false; - } - } -} - - -bool sqrt_enkf_set_int( void * arg , const char * var_name , int value) { - sqrt_enkf_data_type * module_data = sqrt_enkf_data_safe_cast( arg ); - { - if (std_enkf_set_int( module_data->std_data , var_name , value )) - return true; - else { - /* Could in principle set sqrt specific variables here. */ - return false; - } - } -} - - - - - -void sqrt_enkf_initX(void * module_data , - matrix_type * X , - matrix_type * A , - matrix_type * S , - matrix_type * R , - matrix_type * dObs , - matrix_type * E , - matrix_type *D ) { - - sqrt_enkf_data_type * data = sqrt_enkf_data_safe_cast( module_data ); - { - int ncomp = std_enkf_get_subspace_dimension( data->std_data ); - double truncation = std_enkf_get_truncation( data->std_data ); - int nrobs = matrix_get_rows( S ); - int ens_size = matrix_get_columns( S ); - int nrmin = util_int_min( ens_size , nrobs); - matrix_type * W = matrix_alloc(nrobs , nrmin); - double * eig = util_calloc( nrmin , sizeof * eig ); - - matrix_subtract_row_mean( S ); /* Shift away the mean */ - enkf_linalg_lowrankCinv( S , R , W , eig , truncation , ncomp); - enkf_linalg_init_sqrtX( X , S , data->randrot , dObs , W , eig , false); - matrix_free( W ); - free( eig ); - - enkf_linalg_checkX( X , false ); - } -} - - -long sqrt_enkf_get_options( void * arg , long flag ) { - sqrt_enkf_data_type * module_data = sqrt_enkf_data_safe_cast( arg ); - { - return module_data->options; - } -} - - - -// Called from analysis_module.c: analysis_module_init_update() -void sqrt_enkf_init_update( void * arg , - const bool_vector_type * ens_mask, - const matrix_type * S , - const matrix_type * R , - const matrix_type * dObs , - const matrix_type * E , - const matrix_type * D ) { - - sqrt_enkf_data_type * sqrt_data = sqrt_enkf_data_safe_cast( arg ); - { - int ens_size = matrix_get_columns( S ); - sqrt_data->randrot = enkf_linalg_alloc_mp_randrot( ens_size , sqrt_data->rng ); - } -} - - -void sqrt_enkf_complete_update( void * arg ) { - sqrt_enkf_data_type * sqrt_data = sqrt_enkf_data_safe_cast( arg ); - { - matrix_free( sqrt_data->randrot ); - sqrt_data->randrot = NULL; - } -} - -bool sqrt_enkf_has_var( const void * arg, const char * var_name) { - const sqrt_enkf_data_type * module_data = sqrt_enkf_data_safe_cast_const( arg ); - { - return std_enkf_has_var(module_data->std_data, var_name); - } -} - -double sqrt_enkf_get_double( const void * arg, const char * var_name) { - const sqrt_enkf_data_type * module_data = sqrt_enkf_data_safe_cast_const( arg ); - { - return std_enkf_get_double( module_data->std_data , var_name); - } -} - -int sqrt_enkf_get_int( const void * arg, const char * var_name) { - const sqrt_enkf_data_type * module_data = sqrt_enkf_data_safe_cast_const( arg ); - { - return std_enkf_get_int( module_data->std_data , var_name); - } -} - - - -/*****************************************************************/ - -#ifdef INTERNAL_LINK -#define LINK_NAME SQRT_ENKF -#else -#define LINK_NAME EXTERNAL_MODULE_SYMBOL -#endif - - - -analysis_table_type LINK_NAME = { - .name = "SQRT_ENKF", - .alloc = sqrt_enkf_data_alloc, - .freef = sqrt_enkf_data_free, - .set_int = sqrt_enkf_set_int , - .set_double = sqrt_enkf_set_double , - .set_bool = NULL , - .set_string = NULL , - .initX = sqrt_enkf_initX , - .updateA = NULL, - .init_update = sqrt_enkf_init_update, - .complete_update = sqrt_enkf_complete_update, - .get_options = sqrt_enkf_get_options, - .has_var = sqrt_enkf_has_var, - .get_int = sqrt_enkf_get_int, - .get_double = sqrt_enkf_get_double, - .get_bool = NULL, - .get_ptr = NULL -}; - diff --git a/ThirdParty/Ert/libanalysis/src/std_enkf.c b/ThirdParty/Ert/libanalysis/src/std_enkf.c deleted file mode 100644 index b42b685962..0000000000 --- a/ThirdParty/Ert/libanalysis/src/std_enkf.c +++ /dev/null @@ -1,351 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'std_enkf.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - - -/* - A random 'magic' integer id which is used for run-time type checking - of the input data. -*/ -#define STD_ENKF_TYPE_ID 261123 - - - -/* - Observe that only one of the settings subspace_dimension and - truncation can be valid at a time; otherwise the svd routine will - fail. This implies that the set_truncation() and - set_subspace_dimension() routines will set one variable, AND - INVALIDATE THE OTHER. For most situations this will be OK, but if - you have repeated calls to both of these functions the end result - might be a surprise. -*/ -#define INVALID_SUBSPACE_DIMENSION -1 -#define INVALID_TRUNCATION -1 -#define DEFAULT_SUBSPACE_DIMENSION INVALID_SUBSPACE_DIMENSION -#define DEFAULT_USE_EE false -#define DEFAULT_ANALYSIS_SCALE_DATA true - - - - - -/* - The configuration data used by the std_enkf module is contained in a - std_enkf_data_struct instance. The data type used for the std_enkf - module is quite simple; with only a few scalar variables, but there - are essentially no limits to what you can pack into such a datatype. - - All the functions in the module have a void pointer as the first - argument, this will immediately be casted to a std_enkf_data_type - instance, to get some type safety the UTIL_TYPE_ID system should be - used (see documentation in util.h) - - The data structure holding the data for your analysis module should - be created and initialized by a constructor, which should be - registered with the '.alloc' element of the analysis table; in the - same manner the desctruction of this data should be handled by a - destructor or free() function registered with the .freef field of - the analysis table. -*/ - - - - -struct std_enkf_data_struct { - UTIL_TYPE_ID_DECLARATION; - double truncation; // Controlled by config key: ENKF_TRUNCATION_KEY - int subspace_dimension; // Controlled by config key: ENKF_NCOMP_KEY (-1: use Truncation instead) - long option_flags; - bool use_EE; - bool analysis_scale_data; -}; - -static UTIL_SAFE_CAST_FUNCTION_CONST( std_enkf_data , STD_ENKF_TYPE_ID ) - - -/* - This is a macro which will expand to generate a function: - - std_enkf_data_type * std_enkf_data_safe_cast( void * arg ) {} - - which is used for runtime type checking of all the functions which - accept a void pointer as first argument. -*/ -static UTIL_SAFE_CAST_FUNCTION( std_enkf_data , STD_ENKF_TYPE_ID ) - - -double std_enkf_get_truncation( std_enkf_data_type * data ) { - return data->truncation; -} - -int std_enkf_get_subspace_dimension( std_enkf_data_type * data ) { - return data->subspace_dimension; -} - -void std_enkf_set_truncation( std_enkf_data_type * data , double truncation ) { - data->truncation = truncation; - if (truncation > 0.0) - data->subspace_dimension = INVALID_SUBSPACE_DIMENSION; -} - -void std_enkf_set_subspace_dimension( std_enkf_data_type * data , int subspace_dimension) { - data->subspace_dimension = subspace_dimension; - if (subspace_dimension > 0) - data->truncation = INVALID_TRUNCATION; -} - - - -void * std_enkf_data_alloc( rng_type * rng) { - std_enkf_data_type * data = util_malloc( sizeof * data ); - UTIL_TYPE_ID_INIT( data , STD_ENKF_TYPE_ID ); - - std_enkf_set_truncation( data , DEFAULT_ENKF_TRUNCATION_ ); - std_enkf_set_subspace_dimension( data , DEFAULT_SUBSPACE_DIMENSION ); - data->option_flags = ANALYSIS_NEED_ED; - data->use_EE = DEFAULT_USE_EE; - data->analysis_scale_data = DEFAULT_ANALYSIS_SCALE_DATA; - return data; -} - - -void std_enkf_data_free( void * data ) { - free( data ); -} - - - - -static void std_enkf_initX__( matrix_type * X , - matrix_type * S , - matrix_type * R , - matrix_type * E , - matrix_type * D , - double truncation, - int ncomp, - bool bootstrap , - bool use_EE) { - - int nrobs = matrix_get_rows( S ); - int ens_size = matrix_get_columns( S ); - int nrmin = util_int_min( ens_size , nrobs); - - matrix_type * W = matrix_alloc(nrobs , nrmin); - double * eig = util_calloc( nrmin , sizeof * eig); - - matrix_subtract_row_mean( S ); /* Shift away the mean */ - - if (use_EE) { - matrix_type * Et = matrix_alloc_transpose( E ); - matrix_type * Cee = matrix_alloc_matmul( E , Et ); - matrix_scale( Cee , 1.0 / (ens_size - 1)); - - enkf_linalg_lowrankCinv( S , Cee , W , eig , truncation , ncomp); - - matrix_free( Et ); - matrix_free( Cee ); - } else - enkf_linalg_lowrankCinv( S , R , W , eig , truncation , ncomp); - - - enkf_linalg_init_stdX( X , S , D , W , eig , bootstrap); - - matrix_free( W ); - free( eig ); - enkf_linalg_checkX( X , bootstrap ); -} - - - - - -void std_enkf_initX(void * module_data , - matrix_type * X , - matrix_type * A , - matrix_type * S , - matrix_type * R , - matrix_type * dObs , - matrix_type * E , - matrix_type * D) { - - - std_enkf_data_type * data = std_enkf_data_safe_cast( module_data ); - { - int ncomp = data->subspace_dimension; - double truncation = data->truncation; - - std_enkf_initX__(X,S,R,E,D,truncation,ncomp,false,data->use_EE); - } -} - - - - - - - -bool std_enkf_set_double( void * arg , const char * var_name , double value) { - std_enkf_data_type * module_data = std_enkf_data_safe_cast( arg ); - { - bool name_recognized = true; - - if (strcmp( var_name , ENKF_TRUNCATION_KEY_) == 0) - std_enkf_set_truncation( module_data , value ); - else - name_recognized = false; - - return name_recognized; - } -} - - -bool std_enkf_set_int( void * arg , const char * var_name , int value) { - std_enkf_data_type * module_data = std_enkf_data_safe_cast( arg ); - { - bool name_recognized = true; - - if (strcmp( var_name , ENKF_NCOMP_KEY_) == 0) - std_enkf_set_subspace_dimension( module_data , value ); - else - name_recognized = false; - - return name_recognized; - } -} - - -bool std_enkf_set_bool( void * arg , const char * var_name , bool value) { - std_enkf_data_type * module_data = std_enkf_data_safe_cast( arg ); - { - bool name_recognized = true; - - if (strcmp( var_name , USE_EE_KEY_) == 0) - module_data->use_EE = value; - else if (strcmp( var_name , ANALYSIS_SCALE_DATA_KEY_) == 0) - module_data->analysis_scale_data = value; - else - name_recognized = false; - - return name_recognized; - } -} - - - -long std_enkf_get_options( void * arg , long flag ) { - std_enkf_data_type * module_data = std_enkf_data_safe_cast( arg ); - int scale_option = (module_data->analysis_scale_data) ? ANALYSIS_SCALE_DATA : 0; - return module_data->option_flags + scale_option; -} - -bool std_enkf_has_var( const void * arg, const char * var_name) { - { - if (strcmp(var_name , ENKF_NCOMP_KEY_) == 0) - return true; - else if (strcmp(var_name , ENKF_TRUNCATION_KEY_) == 0) - return true; - else if (strcmp(var_name , USE_EE_KEY_) == 0) - return true; - else if (strcmp(var_name , ANALYSIS_SCALE_DATA_KEY_) == 0) - return true; - else - return false; - } -} - -double std_enkf_get_double( const void * arg, const char * var_name) { - const std_enkf_data_type * module_data = std_enkf_data_safe_cast_const( arg ); - { - if (strcmp(var_name , ENKF_TRUNCATION_KEY_) == 0) - return module_data->truncation; - else - return -1; - } -} - -int std_enkf_get_int( const void * arg, const char * var_name) { - const std_enkf_data_type * module_data = std_enkf_data_safe_cast_const( arg ); - { - if (strcmp(var_name , ENKF_NCOMP_KEY_) == 0) - return module_data->subspace_dimension; - else - return -1; - } -} - - -bool std_enkf_get_bool( const void * arg, const char * var_name) { - const std_enkf_data_type * module_data = std_enkf_data_safe_cast_const( arg ); - { - if (strcmp(var_name , USE_EE_KEY_) == 0) - return module_data->use_EE; - if (strcmp(var_name , ANALYSIS_SCALE_DATA_KEY_) == 0) - return module_data->analysis_scale_data; - else - return false; - } -} - - -/** - gcc -fpic -c -I?? - gcc -shared -o -*/ - - -#ifdef INTERNAL_LINK -#define LINK_NAME STD_ENKF -#else -#define LINK_NAME EXTERNAL_MODULE_SYMBOL -#endif - - -analysis_table_type LINK_NAME = { - .name = "STD_ENKF", - .alloc = std_enkf_data_alloc, - .freef = std_enkf_data_free, - .set_int = std_enkf_set_int , - .set_double = std_enkf_set_double , - .set_bool = std_enkf_set_bool, - .set_string = NULL , - .get_options = std_enkf_get_options , - .initX = std_enkf_initX , - .updateA = NULL, - .init_update = NULL, - .complete_update = NULL, - .has_var = std_enkf_has_var, - .get_int = std_enkf_get_int, - .get_double = std_enkf_get_double, - .get_bool = std_enkf_get_bool, - .get_ptr = NULL, -}; - diff --git a/ThirdParty/Ert/libanalysis/tests/CMakeLists.txt b/ThirdParty/Ert/libanalysis/tests/CMakeLists.txt deleted file mode 100644 index ff75b8e0d0..0000000000 --- a/ThirdParty/Ert/libanalysis/tests/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -ert_module_name( VAR_RML rml_enkf ${LIBRARY_OUTPUT_PATH} ) - -add_executable(analysis_test_external_module analysis_test_external_module.c ) -target_link_libraries( analysis_test_external_module analysis util test_util ) - -add_test( analysis_module_rml ${EXECUTABLE_OUTPUT_PATH}/analysis_test_external_module "RML_ENKF" ${VAR_RML} 41 - ITER:45 - USE_PRIOR:False - LAMBDA_REDUCE:0.10 - LAMBDA_INCREASE:2.5 - ENKF_TRUNCATION:0.77 - LAMBDA0:0.25 - LAMBDA_MIN:0.01 - LOG_FILE:LogFile.txt - CLEAR_LOG:True - LAMBDA_RECALCULATE:True ) - - -add_executable( analysis_test_module_info analysis_test_module_info.c ) -target_link_libraries( analysis_test_module_info analysis util test_util) -add_test( analysis_test_module_info ${EXECUTABLE_OUTPUT_PATH}/analysis_test_module_info ) diff --git a/ThirdParty/Ert/libanalysis/tests/analysis_test_external_module.c b/ThirdParty/Ert/libanalysis/tests/analysis_test_external_module.c deleted file mode 100644 index 01f5a661f8..0000000000 --- a/ThirdParty/Ert/libanalysis/tests/analysis_test_external_module.c +++ /dev/null @@ -1,106 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'analysis_test_external_module.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include - -#include -#include -#include - -#include - - - -void test_set_get(analysis_module_type * module , const char * var_value) { - char * var , *string_value; - util_binary_split_string( var_value , ":" , false , &var , &string_value); - - if (var && string_value) { - printf("Testing variable:%s \n",var); - while (true) { - int int_value; - double double_value; - bool bool_value; - test_assert_true(analysis_module_has_var( module , var )); - - if (util_sscanf_int( string_value , &int_value)) { - test_assert_true(analysis_module_set_var( module , var , string_value )); - test_assert_int_equal( int_value , analysis_module_get_int( module , var )); - break; - } - - if (util_sscanf_double( string_value , &double_value)) { - test_assert_true(analysis_module_set_var( module , var , string_value )); - test_assert_double_equal( double_value , analysis_module_get_double( module , var )); - break; - } - - if (util_sscanf_bool( string_value , &bool_value)) { - test_assert_true(analysis_module_set_var( module , var , string_value )); - test_assert_bool_equal( bool_value , analysis_module_get_bool( module , var )); - break; - } - - - test_assert_true(analysis_module_set_var( module , var , string_value )); - test_assert_string_equal( string_value , (const char *) analysis_module_get_ptr( module , var )); - break; - } - } else { - fprintf(stderr,"Invalid test input data: %s -> could not split in var:value\n" , var_value); - exit(1); - } -} - - - -void load_module( rng_type * rng , const char * user_name , const char * lib_name, const char * options_str , int nvar , const char ** var_list) { - long flags = strtol(options_str , NULL , 10); - analysis_module_type * analysis_module = analysis_module_alloc_external(rng , lib_name); - - printf("Loading:%s \n" , lib_name); - test_assert_string_equal( EXTERNAL_MODULE_NAME , analysis_module_get_table_name(analysis_module)); - if (util_is_abs_path(lib_name)) - test_assert_string_equal( lib_name , analysis_module_get_lib_name(analysis_module)); - - test_assert_true( analysis_module_is_instance( analysis_module)); - { - for (int i=0; i < nvar; i++) - test_set_get( analysis_module , var_list[i] ); - } - test_assert_false( analysis_module_has_var(analysis_module , "DoesNotHaveThisVariable")); - - test_assert_true( analysis_module_check_option( analysis_module , flags)); - flags += 1; - test_assert_false( analysis_module_check_option( analysis_module , flags)); - analysis_module_free( analysis_module); -} - - -int main(int argc , char ** argv) { - const char * user_name = argv[1]; - const char * lib_name = argv[2]; - const char * options_str = argv[3]; - int nvar = argc - 4; - rng_type * rng = rng_alloc( MZRAN , INIT_DEFAULT); - - load_module(rng , user_name , lib_name , options_str , nvar , (const char **) &argv[4]); - rng_free( rng ); - - exit(0); -} diff --git a/ThirdParty/Ert/libanalysis/tests/analysis_test_module_info.c b/ThirdParty/Ert/libanalysis/tests/analysis_test_module_info.c deleted file mode 100644 index 6924263441..0000000000 --- a/ThirdParty/Ert/libanalysis/tests/analysis_test_module_info.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - Copyright (C) 2016 Statoil ASA, Norway. - - The file 'analysis_test_module_info.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include - -#include - - -int main(int argc , char ** argv) { - - const char* ministep_name = "SOME MINISTEP"; - module_info_type * module_info = module_info_alloc( ministep_name ); - test_assert_true( module_info_is_instance( module_info )); - - module_data_block_vector_type * module_data_block_vector = module_info_get_data_block_vector(module_info); - test_assert_true( module_data_block_vector_is_instance( module_data_block_vector )); - - module_obs_block_vector_type * module_obs_block_vector = module_info_get_obs_block_vector(module_info); - test_assert_true( module_obs_block_vector_is_instance( module_obs_block_vector )); - - int index_list[1] = { 1 }; - module_data_block_type * module_data_block = module_data_block_alloc( "PARAMETER", &index_list[0], 0, 1 ); - test_assert_true( module_data_block_is_instance( module_data_block )); - module_data_block_vector_add_data_block(module_data_block_vector, module_data_block); - - - module_obs_block_type * module_obs_block = module_obs_block_alloc( "OBS", &index_list[0], 0, 1 ); - test_assert_true( module_obs_block_is_instance( module_obs_block )); - module_obs_block_vector_add_obs_block(module_obs_block_vector, module_obs_block); - - module_info_free( module_info ); - exit(0); -} - - diff --git a/ThirdParty/Ert/libconfig/CMakeLists.txt b/ThirdParty/Ert/libconfig/CMakeLists.txt deleted file mode 100644 index 6d8bd6b946..0000000000 --- a/ThirdParty/Ert/libconfig/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -add_subdirectory( src ) -if (BUILD_TESTS) - add_subdirectory( tests ) -endif() diff --git a/ThirdParty/Ert/libconfig/applications/conf_test.c b/ThirdParty/Ert/libconfig/applications/conf_test.c deleted file mode 100644 index 31aa43222f..0000000000 --- a/ThirdParty/Ert/libconfig/applications/conf_test.c +++ /dev/null @@ -1,213 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'conf_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include - -int main() -{ - const char * enkf_conf_help = "The main enkf conf shall contain neccessary infomation to run the enkf."; - conf_class_type * enkf_conf_class = conf_class_alloc_empty("ENKF_conf", true, false, enkf_conf_help); - conf_class_set_help(enkf_conf_class, enkf_conf_help); - - /** Create and insert HISTORY_OBSERVATION class. */ - { - const char * help_class_history_observation = "The class HISTORY_OBSERVATION is used to condition on a time series from the production history. The name of the an instance is used to define the item to condition on, and should be in summary.x syntax. E.g., creating a HISTORY_OBSERVATION instance with name GOPR:P4 conditions on GOPR for group P4."; - conf_class_type * history_observation_class = conf_class_alloc_empty("HISTORY_OBSERVATION", false, false, help_class_history_observation); - conf_class_set_help(history_observation_class, help_class_history_observation); - - - const char * help_item_spec_error_mode = "The string ERROR_MODE gives the error mode for the observation."; - conf_item_spec_type * item_spec_error_mode = conf_item_spec_alloc("ERROR_MODE", true, DT_STR, help_item_spec_error_mode); - conf_item_spec_set_help(item_spec_error_mode, help_item_spec_error_mode); - - conf_item_spec_add_restriction(item_spec_error_mode, "rel"); - conf_item_spec_add_restriction(item_spec_error_mode, "abs"); - conf_item_spec_add_restriction(item_spec_error_mode, "relmin"); - - conf_item_spec_set_default_value(item_spec_error_mode, "rel"); - - - const char * help_item_spec_error = "The positive floating number ERROR gives the standard deviation (abs) or the relative uncertainty (rel/relmin) of the observations."; - conf_item_spec_type * item_spec_error = conf_item_spec_alloc("ERROR", true, DT_POSFLOAT, help_item_spec_error); - conf_item_spec_set_default_value(item_spec_error, "0.10"); - conf_item_spec_set_help(item_spec_error, help_item_spec_error); - - const char * help_item_spec_error_min = "The positive floating point number ERROR_MIN gives the minimum value for the standard deviation of the observation when relmin is used."; - conf_item_spec_type * item_spec_error_min = conf_item_spec_alloc("ERROR_MIN", true, DT_POSFLOAT, help_item_spec_error_min); - conf_item_spec_set_default_value(item_spec_error_min, "0.10"); - conf_item_spec_set_help(item_spec_error_min, help_item_spec_error_min); - - - conf_class_insert_owned_item_spec(history_observation_class, item_spec_error_mode); - conf_class_insert_owned_item_spec(history_observation_class, item_spec_error); - conf_class_insert_owned_item_spec(history_observation_class, item_spec_error_min); - - conf_class_insert_owned_sub_class(enkf_conf_class, history_observation_class); - } - - - - /** Create and insert SUMMARY_OBSERVATION class. */ - { - const char * help_class_summary_observation = "The class SUMMARY_OBSERVATION can be used to condition on any observation whos simulated value is written to the summary file."; - conf_class_type * summary_observation_class = conf_class_alloc_empty("SUMMARY_OBSERVATION", false, false, help_class_summary_observation); - conf_class_set_help(summary_observation_class, help_class_summary_observation); - - const char * help_item_spec_value = "The floating point number VALUE gives the observed value."; - conf_item_spec_type * item_spec_value = conf_item_spec_alloc("VALUE", true, DT_FLOAT, help_item_spec_value); - conf_item_spec_set_help(item_spec_value, help_item_spec_value); - - - const char * help_item_spec_error = "The positive floating point number ERROR is the standard deviation of the observed value."; - conf_item_spec_type * item_spec_error = conf_item_spec_alloc("ERROR", true, DT_POSFLOAT, help_item_spec_error); - conf_item_spec_set_help(item_spec_error, help_item_spec_error); - - const char * help_item_spec_date = "The DATE item gives the date of the observation. Format is dd/mm/yyyy."; - conf_item_spec_type * item_spec_date = conf_item_spec_alloc("DATE", false, DT_DATE, help_item_spec_date); - conf_item_spec_set_help(item_spec_date, help_item_spec_date); - - const char * help_item_spec_days = "The DAYS item gives the observation time as days after simulation start."; - conf_item_spec_type * item_spec_days = conf_item_spec_alloc("DAYS", false, DT_POSFLOAT, help_item_spec_days); - conf_item_spec_set_help(item_spec_days, help_item_spec_days); - - const char * help_item_spec_restart = "The RESTART item gives the observation time as the ECLIPSE restart nr."; - conf_item_spec_type * item_spec_restart = conf_item_spec_alloc("RESTART", false, DT_POSINT, help_item_spec_restart); - conf_item_spec_set_help(item_spec_restart, help_item_spec_restart); - - const char * help_item_spec_sumkey = "The string SUMMARY_KEY is used to look up the simulated value in the summary file. It has the same format as the summary.x program, e.g. WOPR:P4"; - conf_item_spec_type * item_spec_sumkey = conf_item_spec_alloc("KEY", true, DT_STR, help_item_spec_sumkey); - conf_item_spec_set_help(item_spec_sumkey, help_item_spec_sumkey); - - conf_class_insert_owned_item_spec(summary_observation_class, item_spec_value); - conf_class_insert_owned_item_spec(summary_observation_class, item_spec_error); - conf_class_insert_owned_item_spec(summary_observation_class, item_spec_date); - conf_class_insert_owned_item_spec(summary_observation_class, item_spec_days); - conf_class_insert_owned_item_spec(summary_observation_class, item_spec_restart); - conf_class_insert_owned_item_spec(summary_observation_class, item_spec_sumkey); - - /** Create a mutex on DATE, DAYS and RESTART. */ - conf_item_mutex_type * time_mutex = conf_class_new_item_mutex(summary_observation_class , true , false); - - conf_item_mutex_add_item_spec(time_mutex, item_spec_date); - conf_item_mutex_add_item_spec(time_mutex, item_spec_days); - conf_item_mutex_add_item_spec(time_mutex, item_spec_restart); - - - - - conf_class_insert_owned_sub_class(enkf_conf_class, summary_observation_class); - } - - - - /** Create and insert BLOCK_OBSERVATION class. */ - { - const char * help_class_block_observation = "The class BLOCK_OBSERVATION can be used to condition on an observation whos simulated values are block/cell values of a field, e.g. RFT tests."; - conf_class_type * block_observation_class = conf_class_alloc_empty("BLOCK_OBSERVATION", false, false, help_class_block_observation); - conf_class_set_help(block_observation_class, help_class_block_observation); - - const char * help_item_spec_field = "The item FIELD gives the observed field. E.g., ECLIPSE fields such as PRESSURE, SGAS or any user defined fields such as PORO or PERMX."; - conf_item_spec_type * item_spec_field = conf_item_spec_alloc("FIELD", true, DT_STR, help_item_spec_field); - conf_item_spec_set_help(item_spec_field, help_item_spec_field); - - const char * help_item_spec_date = "The DATE item gives the date of the observation. Format is dd/mm/yyyy."; - conf_item_spec_type * item_spec_date = conf_item_spec_alloc("DATE", true, DT_DATE, help_item_spec_date); - conf_item_spec_set_help(item_spec_date, help_item_spec_date); - - conf_class_insert_owned_item_spec(block_observation_class, item_spec_field); - conf_class_insert_owned_item_spec(block_observation_class, item_spec_date); - - /** Create and insert the sub class OBS. */ - { - const char * help_class_obs = "The class OBS is used to specify a single observed point."; - conf_class_type * obs_class = conf_class_alloc_empty("OBS", true, true , help_class_obs); - conf_class_set_help(obs_class, help_class_obs); - - const char * help_item_i = "The item I gives the I index of the block observation."; - conf_item_spec_type * item_spec_i = conf_item_spec_alloc("I", true, DT_POSINT, help_item_i); - conf_item_spec_set_help(item_spec_i, help_item_i); - - const char * help_item_j = "The item J gives the J index of the block observation."; - conf_item_spec_type * item_spec_j = conf_item_spec_alloc("J", true, DT_POSINT, help_item_j); - conf_item_spec_set_help(item_spec_j, help_item_j); - - const char * help_item_k = "The item K gives the K index of the block observation."; - conf_item_spec_type * item_spec_k = conf_item_spec_alloc("K", true, DT_POSINT, help_item_k); - conf_item_spec_set_help(item_spec_k, help_item_k); - - const char * help_item_spec_value = "The floating point number VALUE gives the observed value."; - conf_item_spec_type * item_spec_value = conf_item_spec_alloc("VALUE", true, DT_FLOAT, help_item_spec_value); - conf_item_spec_set_help(item_spec_value, help_item_spec_value); - - const char * help_item_spec_error = "The positive floating point number ERROR is the standard deviation of the observed value."; - conf_item_spec_type * item_spec_error = conf_item_spec_alloc("ERROR", true, DT_POSFLOAT, help_item_spec_error); - conf_item_spec_set_help(item_spec_error, help_item_spec_error); - - conf_class_insert_owned_item_spec(obs_class, item_spec_i); - conf_class_insert_owned_item_spec(obs_class, item_spec_j); - conf_class_insert_owned_item_spec(obs_class, item_spec_k); - conf_class_insert_owned_item_spec(obs_class, item_spec_value); - conf_class_insert_owned_item_spec(obs_class, item_spec_error); - - conf_class_insert_owned_sub_class(block_observation_class, obs_class); - } - - conf_class_insert_owned_sub_class(enkf_conf_class, block_observation_class); - } - - - - /** Try to create an instance of the enkf_conf_class. */ - - conf_instance_type * enkf_conf = conf_instance_alloc_from_file(enkf_conf_class, "enkf_conf", "testcase/test.txt"); - conf_instance_type * enkf_conf2 = conf_instance_alloc_from_file(enkf_conf_class, "enkf_conf2", "testcase/test2.txt"); - - /** Validate enkf_conf_class. */ - - conf_instance_validate(enkf_conf); - conf_instance_validate(enkf_conf2); - - /** Overload. */ - conf_instance_overload(enkf_conf, enkf_conf2); - - - /** Print the name of the HISTORY_OBSERVATION instances. */ - { - stringlist_type * history_observations = conf_instance_alloc_list_of_sub_instances_of_class_by_name(enkf_conf, "HISTORY_OBSERVATION"); - - int num_history_observations = stringlist_get_size(history_observations); - - for(int obs_nr = 0; obs_nr < num_history_observations ; obs_nr++) - { - printf("%2i. %s\n", obs_nr, stringlist_iget(history_observations, obs_nr)); - const conf_instance_type * sched_obs = conf_instance_get_sub_instance_ref(enkf_conf, stringlist_iget(history_observations, obs_nr)); - double error = conf_instance_get_item_value_double(sched_obs, "ERROR"); - printf(" std.dev : %f\n", error); - } - - stringlist_free(history_observations); - } - - - /** Clean up. */ - - conf_instance_free(enkf_conf); - conf_instance_free(enkf_conf2); - conf_class_free(enkf_conf_class); - -} diff --git a/ThirdParty/Ert/libconfig/applications/config_test.c b/ThirdParty/Ert/libconfig/applications/config_test.c deleted file mode 100644 index 7a2a14ff77..0000000000 --- a/ThirdParty/Ert/libconfig/applications/config_test.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'config_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include - - -int main(void) { - const char * config_file = "config_test_input"; - config_parser_type * config = config_alloc(); - config_schema_item_type * item; - - item = config_add_schema_item(config , "KEY1" , true , true); - item = config_add_schema_item(config , "KEY2" , true , false); - config_schema_item_set_argc_minmax(item , 1 , 4 , 4 , (const config_item_types [4]) {CONFIG_EXECUTABLE , CONFIG_EXISTING_FILE , CONFIG_BOOLEAN , CONFIG_BOOLEAN}); - - - item = config_add_schema_item(config , "FATHER" , false , false); - { - stringlist_type * children = stringlist_alloc_argv_ref( (const char *[2]) {"CHILD1" , "CHILD2"} , 2); - config_schema_item_set_required_children(item , children); - stringlist_free(children); - } - item = config_add_schema_item(config , "CHILD1" , false , false); - config_schema_item_set_argc_minmax(item , 1 , 1 , 1 , (const config_item_types [1]) {CONFIG_INT}); - - config_parse(config , config_file , "--" , "INCLUDE" , NULL , true, true); - - - - { - stringlist_type * sl = config_alloc_complete_stringlist(config , "KEY1"); - char * s = stringlist_alloc_joined_string(sl , "|"); - printf("KEY1 -> \"%s\" \n",s); - printf("CONFIG_IGET:%s\n" , config_iget(config , "KEY2" , 0 , 0)); - free(s); - stringlist_free(sl); - } - - - config_free(config); -} diff --git a/ThirdParty/Ert/libconfig/include/ert/config/conf.h b/ThirdParty/Ert/libconfig/include/ert/config/conf.h deleted file mode 100644 index aad3e275ab..0000000000 --- a/ThirdParty/Ert/libconfig/include/ert/config/conf.h +++ /dev/null @@ -1,354 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'conf.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_CONF_H -#define ERT_CONF_H - -/* libconfig: lightweight configuration parser - * - * - * - * Introduction - * - * This library provides a lightweight configuration parser for the - * enkf application. The goal of the library is to provide the - * developer with a tool for rapid specification of configuration - * files, automatic checking of user provided configuration files - * and typed access to configuration items. - * - * - * - * A Simple Example - * - * Let us consider a simple example of user provided configuration - * file that can be used with the parser: - * - * - * res_sim FrontSim2007 - * { - * executable = /bin/frontsim2007; - * version = 2007; - * - * run_host bgo179lin - * { - * hostname = bgo179lin.nho.hydro.com; - * num_jobs = 4; - * }; - * }; - * - * - * Note that the newlines are not neccessary. In the example above, - * the user has provided an instance of the class "res_sim" with name - * FrontSim2007. Further, the user has set the items executable and version. - * He has also provided a instance of the sub class "run_host" with name - * bgo179lin and allocated 4 jobs to this machine. - * - * - * - * Structure - * - * The system is built around four basic objects: - * - * - Class definitions. - * - Item specifications. - * - Instances of classes. - * - Instances of item specifications, i.e. items. - * - * The relationship between the objects is as follows : - * - * - Class: - * . Can have contain both classes and item specifications. - * . Can not contain items or class instances. - * - * - Item specifications: - * . Can not contain any of the other objects. - * - * - Instances of classes: - * . Can contain class instances and items. - * - * - Items: - * . Can not contain any of the other objects. - * - * - * - * General Use - * - * The parser is designed to be used in the following way: - * - * - The developer creates the classes and item specifications needed. - * - Using the library and the classes, user provided configuration - * files are read and validated. - * - If the validation fails, the developer can choose to exit. - * - Using the library, the devloper has typed access to all - * information provided by the user. - * - */ - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include -#include - -#include - - - -typedef struct conf_class_struct conf_class_type; -typedef struct conf_instance_struct conf_instance_type; -typedef struct conf_item_spec_struct conf_item_spec_type; -typedef struct conf_item_struct conf_item_type; -typedef struct conf_item_mutex_struct conf_item_mutex_type; - - -/** D E F A U L T A L L O C / F R E E F U N C T I O N S */ - - - -conf_class_type * conf_class_alloc_empty( - const char * class_name, - bool require_instance, - bool singleton, - const char * help); - -void conf_class_free( - conf_class_type * conf_class); - -void conf_class_free__( - void * conf_class); - - - -conf_instance_type * conf_instance_alloc_default( - const conf_class_type * conf_class, - const char * name); - -conf_instance_type * conf_instance_copyc( - const conf_instance_type * conf_instance); - -void conf_instance_free( - conf_instance_type * conf_instance); - -void conf_instance_free__( - void * conf_instance); - - - -conf_item_spec_type * conf_item_spec_alloc( - char * name, - bool required_set, - dt_enum dt, - const char * help); - -void conf_item_spec_free( - conf_item_spec_type * conf_item_spec); - -void conf_item_spec_free__( - void * conf_item_spec); - - - -conf_item_type * conf_item_alloc( - const conf_item_spec_type * conf_item_spec, - const char * value); - -conf_item_type * conf_item_copyc( - const conf_item_type * conf_item); - -void conf_item_free( - conf_item_type * conf_item); - -void conf_item_free__( - void * conf_item); - - - -void conf_item_mutex_free( - conf_item_mutex_type * conf_item_mutex); - -void conf_item_mutex_free__( - void * conf_item_mutex); - - - -/** M A N I P U L A T O R S , I N S E R T I O N */ - - - -void conf_class_insert_owned_sub_class( - conf_class_type * conf_class, - conf_class_type * sub_conf_class); - -void conf_class_insert_owned_item_spec( - conf_class_type * conf_class, - conf_item_spec_type * item_spec); - -void conf_instance_insert_owned_sub_instance( - conf_instance_type * conf_instance, - conf_instance_type * sub_conf_instance); - -void conf_instance_insert_owned_item( - conf_instance_type * conf_instance, - conf_item_type * conf_item); - -void conf_instance_insert_item( - conf_instance_type * conf_instance, - const char * item_name, - const char * value); - -void conf_instance_overload( - conf_instance_type * conf_instance_target, - const conf_instance_type * conf_instance_source); - -conf_item_mutex_type * conf_class_new_item_mutex( - conf_class_type * conf_class, - bool require_one, - bool inverse); - -void conf_item_mutex_add_item_spec( - conf_item_mutex_type * conf_item_mutex, - const conf_item_spec_type * conf_item_spec); - - - -/** M A N I P U L A T O R S , C L A S S A N D I T E M S P E C I F I C A T I O N */ - - - -void conf_class_set_help( - conf_class_type * conf_class, - const char * help); - - - -void conf_item_spec_add_restriction( - conf_item_spec_type * conf_item_spec, - const char * restriction); - -void conf_item_spec_set_default_value( - conf_item_spec_type * conf_item_spec, - const char * default_value); - -void conf_item_spec_set_help( - conf_item_spec_type * conf_item_spec, - const char * help); - - - -/** A C C E S S O R S */ - - - -bool conf_class_has_item_spec( - const conf_class_type * conf_class, - const char * item_name); - -bool conf_class_has_sub_class( - const conf_class_type * conf_class, - const char * sub_class_name); - -const conf_item_spec_type * conf_class_get_item_spec_ref( - const conf_class_type * conf_class, - const char * item_name); - -const conf_class_type * conf_class_get_sub_class_ref( - const conf_class_type * conf_class, - const char * sub_class_name); - - - -const char * conf_instance_get_name_ref( - const conf_instance_type * conf_instance); - -bool conf_instance_is_of_class( - const conf_instance_type * conf_instance, - const char * class_name); - -bool conf_instance_has_item( - const conf_instance_type * conf_instance, - const char * item_name); - -bool conf_instance_has_sub_instance( - const conf_instance_type * conf_instance, - const char * sub_instance_name); - -const conf_instance_type * conf_instance_get_sub_instance_ref( - const conf_instance_type * conf_instance, - const char * sub_instance_name); - -stringlist_type * conf_instance_alloc_list_of_sub_instances_of_class( - const conf_instance_type * conf_instance, - const conf_class_type * conf_class); - -stringlist_type * conf_instance_alloc_list_of_sub_instances_of_class_by_name( - const conf_instance_type * conf_instance, - const char * sub_class_name); - -const conf_class_type * conf_instance_get_class_ref( - const conf_instance_type * conf_instance); - -const char * conf_instance_get_class_name_ref( - const conf_instance_type * conf_instance); - -const char * conf_instance_get_item_value_ref( - const conf_instance_type * conf_instance, - const char * item_name); - -/** If the dt supports it, these functions will parse the item - value to the requested types. - - NOTE: - If the dt does not support it, or the conf_instance - does not have the item, the functions will abort your program. -*/ -int conf_instance_get_item_value_int( - const conf_instance_type * conf_instance, - const char * item_name); - -double conf_instance_get_item_value_double( - const conf_instance_type * conf_instance, - const char * item_name); - -time_t conf_instance_get_item_value_time_t( - const conf_instance_type * conf_instance, - const char * item_name); - -/** V A L I D A T O R S */ - - - -bool conf_instance_validate( - const conf_instance_type * conf_instance); - - - -/** A L L O C F R O M F I L E */ - - -conf_instance_type * conf_instance_alloc_from_file( - const conf_class_type * conf_class, - const char * name, - const char * file_name); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libconfig/include/ert/config/conf_data.h b/ThirdParty/Ert/libconfig/include/ert/config/conf_data.h deleted file mode 100644 index 96f3c79377..0000000000 --- a/ThirdParty/Ert/libconfig/include/ert/config/conf_data.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'conf_data.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_CONF_DATA_H -#define ERT_CONF_DATA_H -#include -#include - -typedef enum { - DT_STR, - DT_INT, - DT_POSINT, - DT_FLOAT, - DT_POSFLOAT, - DT_FILE, - DT_EXEC, - DT_FOLDER, - DT_DATE - } dt_enum; - -dt_enum conf_data_get_dt_from_string( - const char * str); - -bool conf_data_string_is_dt( - const char * str); - -const char * conf_data_get_dt_name_ref( - dt_enum dt); - -bool conf_data_validate_string_as_dt_value( - dt_enum dt, - const char * str); - -int conf_data_get_int_from_string( - dt_enum dt, - const char * str); - -double conf_data_get_double_from_string( - dt_enum dt, - const char * str); - -time_t conf_data_get_time_t_from_string( - dt_enum dt, - const char * str); - -#endif diff --git a/ThirdParty/Ert/libconfig/include/ert/config/conf_util.h b/ThirdParty/Ert/libconfig/include/ert/config/conf_util.h deleted file mode 100644 index 9fbc5dfb93..0000000000 --- a/ThirdParty/Ert/libconfig/include/ert/config/conf_util.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'conf_util.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_CONF_UTIL_H -#define ERT_CONF_UTIL_H - -char * conf_util_fscanf_alloc_token_buffer( const char * file_name ); - -char * conf_util_alloc_next_token( char ** buffer_position ); - -#endif diff --git a/ThirdParty/Ert/libconfig/include/ert/config/config_content.h b/ThirdParty/Ert/libconfig/include/ert/config/config_content.h deleted file mode 100644 index 57b7562dfe..0000000000 --- a/ThirdParty/Ert/libconfig/include/ert/config/config_content.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA, Norway. - - The file 'config_content.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#ifndef ERT_CONFIG_CONTENT_H -#define ERT_CONFIG_CONTENT_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -#include -#include -#include -#include - -typedef struct config_content_struct config_content_type; - - - config_content_type * config_content_alloc(); - void config_content_free( config_content_type * content ); - void config_content_set_valid( config_content_type * content); - bool config_content_is_valid( const config_content_type * content ); - bool config_content_has_item( const config_content_type * content , const char * key); - void config_content_add_item( config_content_type * content , const config_schema_item_type * schema_item , const config_path_elm_type * path_elm); - config_content_item_type * config_content_get_item( const config_content_type * content , const char * key); - void config_content_add_node( config_content_type * content , config_content_node_type * content_node ); - config_error_type * config_content_get_errors( const config_content_type * content); - - const char * config_content_iget( const config_content_type * content , const char * key , int occurence , int index); - int config_content_iget_as_int( const config_content_type * content , const char * key , int occurence , int index); - bool config_content_iget_as_bool( const config_content_type * content , const char * key , int occurence , int index); - double config_content_iget_as_double( const config_content_type * content , const char * key , int occurence , int index); - const char * config_content_iget_as_path( const config_content_type * content , const char * key , int occurence , int index); - const char * config_content_safe_iget(const config_content_type * content , const char *kw, int occurence , int index); - int config_content_get_occurences(const config_content_type * content, const char * kw); - - bool config_content_get_value_as_bool(const config_content_type * config , const char * kw); - int config_content_get_value_as_int(const config_content_type * config , const char * kw); - double config_content_get_value_as_double(const config_content_type * config , const char * kw); - const char * config_content_get_value_as_path( const config_content_type * config , const char * kw); - const char * config_content_get_value_as_abspath( const config_content_type * config , const char * kw); - const char * config_content_get_value_as_relpath( const config_content_type * config , const char * kw); - const char * config_content_get_value(const config_content_type * config , const char * kw); - char * config_content_alloc_joined_string(const config_content_type * content , const char * kw, const char * sep); - stringlist_type * config_content_alloc_complete_stringlist(const config_content_type * content , const char * kw); - const stringlist_type * config_content_iget_stringlist_ref(const config_content_type * content , const char * kw, int occurence); - config_content_node_type * config_content_get_value_node( const config_content_type * content , const char * kw); - void config_content_add_define( config_content_type * content , const char * key , const char * value ); - subst_list_type * config_content_get_define_list( config_content_type * content ); - const char * config_content_get_config_file( const config_content_type * content , bool abs_path ); - void config_content_set_config_file( config_content_type * content , const char * config_file ); - int config_content_get_size(const config_content_type * content); - const config_content_node_type * config_content_iget_node( const config_content_type * content , int index); - bool config_content_add_file( config_content_type * content , const char * config_file); - config_root_path_type * config_content_get_invoke_path( config_content_type * content ); - void config_content_set_invoke_path( config_content_type * content); - config_path_elm_type * config_content_add_path_elm( config_content_type * content , const char * path ); - void config_content_pop_path_stack( config_content_type * content ); - - UTIL_IS_INSTANCE_HEADER( config_content ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libconfig/include/ert/config/config_content_item.h b/ThirdParty/Ert/libconfig/include/ert/config/config_content_item.h deleted file mode 100644 index 40b843ff93..0000000000 --- a/ThirdParty/Ert/libconfig/include/ert/config/config_content_item.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'config_content_item.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#ifndef ERT_CONFIG_CONTENT_ITEM_H -#define ERT_CONFIG_CONTENT_ITEM_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -#include -#include -#include -#include - -typedef struct config_content_item_struct config_content_item_type; - - int config_content_item_get_size(const config_content_item_type * item); - config_content_node_type * config_content_item_get_last_node(const config_content_item_type * item); - config_content_node_type * config_content_item_iget_node(const config_content_item_type * item , int index); - const config_content_node_type * config_content_item_get_last_node_const(const config_content_item_type * item); - const config_content_node_type * config_content_item_iget_node_const(const config_content_item_type * item , int index); - char * config_content_item_ialloc_joined_string(const config_content_item_type * item , const char * sep , int occurence); - char * config_content_item_alloc_joined_string(const config_content_item_type * item , const char * sep); - const stringlist_type * config_content_item_iget_stringlist_ref(const config_content_item_type * item, int occurence); - const stringlist_type * config_content_item_get_stringlist_ref(const config_content_item_type * item); - stringlist_type * config_content_item_alloc_complete_stringlist(const config_content_item_type * item, bool copy); - stringlist_type * config_content_item_alloc_stringlist(const config_content_item_type * item, bool copy); - hash_type * config_content_item_alloc_hash(const config_content_item_type * item , bool copy); - const char * config_content_item_iget(const config_content_item_type * item , int occurence , int index); - bool config_content_item_iget_as_bool(const config_content_item_type * item, int occurence , int index); - int config_content_item_iget_as_int(const config_content_item_type * item, int occurence , int index); - double config_content_item_iget_as_double(const config_content_item_type * item, int occurence , int index); - void config_content_item_clear( config_content_item_type * item ); - void config_content_item_free( config_content_item_type * item ); - void config_content_item_free__( void * arg ); - config_content_item_type * config_content_item_alloc( const config_schema_item_type * schema , const config_path_elm_type * path_elm); - void config_content_item_validate(const config_content_item_type * item, config_error_type * error); - config_content_node_type * config_content_item_alloc_node( const config_content_item_type * item , const config_path_elm_type * path_elm); - const config_schema_item_type * config_content_item_get_schema( const config_content_item_type * item ); - const config_path_elm_type * config_content_item_get_path_elm( const config_content_item_type * item ); - - UTIL_IS_INSTANCE_HEADER( config_content_item ); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ThirdParty/Ert/libconfig/include/ert/config/config_content_node.h b/ThirdParty/Ert/libconfig/include/ert/config/config_content_node.h deleted file mode 100644 index 954777c430..0000000000 --- a/ThirdParty/Ert/libconfig/include/ert/config/config_content_node.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'config_content_node.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#ifndef ERT_CONFIG_CONTENT_NODE_H -#define ERT_CONFIG_CONTENT_NODE_H - -#ifdef __cplusplus -define extern "C" { -#endif - -#include - -#include -#include - -typedef struct config_content_node_struct config_content_node_type; - - config_item_types config_content_node_iget_type( const config_content_node_type * node , int index); - config_content_node_type * config_content_node_alloc( const config_schema_item_type * schema , const config_path_elm_type * cwd); - void config_content_node_add_value(config_content_node_type * node , const char * value); - void config_content_node_set(config_content_node_type * node , const stringlist_type * token_list); - char * config_content_node_alloc_joined_string(const config_content_node_type * node, const char * sep); - void config_content_node_free(config_content_node_type * node); - void config_content_node_free__(void * arg); - const char * config_content_node_get_full_string( config_content_node_type * node , const char * sep ); - const char * config_content_node_iget(const config_content_node_type * node , int index); - bool config_content_node_iget_as_bool(const config_content_node_type * node , int index); - int config_content_node_iget_as_int(const config_content_node_type * node , int index); - double config_content_node_iget_as_double(const config_content_node_type * node , int index); - const char * config_content_node_iget_as_path(config_content_node_type * node , int index); - const char * config_content_node_iget_as_abspath( config_content_node_type * node , int index); - const char * config_content_node_iget_as_relpath( config_content_node_type * node , int index); - time_t config_content_node_iget_as_isodate(const config_content_node_type * node , int index); - const stringlist_type * config_content_node_get_stringlist( const config_content_node_type * node ); - const char * config_content_node_safe_iget(const config_content_node_type * node , int index); - int config_content_node_get_size( const config_content_node_type * node ); - const char * config_content_node_get_kw( const config_content_node_type * node ); - void config_content_node_assert_key_value( const config_content_node_type * node ); - const config_path_elm_type * config_content_node_get_path_elm( const config_content_node_type * node ); - void config_content_node_init_opt_hash( const config_content_node_type * node , hash_type * opt_hash , int elm_offset); - void config_content_node_fprintf( const config_content_node_type * node , FILE * stream ); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ThirdParty/Ert/libconfig/include/ert/config/config_error.h b/ThirdParty/Ert/libconfig/include/ert/config/config_error.h deleted file mode 100644 index d634a2859d..0000000000 --- a/ThirdParty/Ert/libconfig/include/ert/config/config_error.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'config_error.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_CONFIG_ERROR_H -#define ERT_CONFIG_ERROR_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -typedef struct config_error_struct config_error_type; - - - config_error_type * config_error_alloc(); - config_error_type * config_error_alloc_copy( const config_error_type * src_error); - void config_error_free(config_error_type * error); - const char * config_error_iget(const config_error_type * error , int index); - void config_error_add( config_error_type * error , char * new_error ); - void config_error_clear( config_error_type * error ); - int config_error_count( const config_error_type * error ); - void config_error_fprintf( const config_error_type * error , bool add_count , FILE * stream ); - bool config_error_equal( const config_error_type * error1 , const config_error_type * error2); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ThirdParty/Ert/libconfig/include/ert/config/config_parser.h b/ThirdParty/Ert/libconfig/include/ert/config/config_parser.h deleted file mode 100644 index dc746a9370..0000000000 --- a/ThirdParty/Ert/libconfig/include/ert/config/config_parser.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'config.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_CONFIG_H -#define ERT_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include - -#define ECL_COM_KW "--" -#define ENKF_COM_KW "--" - - - - - -typedef struct config_parser_struct config_parser_type; - - - void config_free(config_parser_type *); - config_parser_type * config_alloc( ); - char ** config_alloc_active_list(const config_parser_type * , int * ); - config_content_type * config_parse(config_parser_type * config, const char * filename, const char * comment_string, const char * include_kw, const char * define_kw, const hash_type * pre_defined_kw_map, config_schema_unrecognized_enum unrecognized_behaviour , bool validate); - bool config_has_schema_item(const config_parser_type * config , const char * kw); - -/*****************************************************************/ - - config_schema_item_type * config_get_schema_item(const config_parser_type *, const char *); - bool config_item_set(const config_parser_type * , const char * ); - void config_add_alias(config_parser_type * , const char * , const char * ); - void config_install_message(config_parser_type * , const char * , const char * ); - const char * config_safe_get(const config_parser_type * , const char *); - char * config_alloc_joined_string(const config_parser_type * , const char * , const char * ); - - void config_add_define( config_parser_type * config , const char * key , const char * value ); - - /* - bool config_schema_item_is_set(const config_schema_item_type * ); - void config_schema_item_set_argc_minmax(config_schema_item_type * , int , int , int type_map_size , const config_item_types * ); - void config_schema_item_set_common_selection_set(config_schema_item_type * , int argc , const char ** argv); - void config_schema_item_set_indexed_selection_set(config_schema_item_type * item , int , int , const char ** ); - void config_schema_item_set_required_children(config_schema_item_type * , stringlist_type * ); - void config_schema_item_set_required_children_on_value(config_schema_item_type * , const char * , stringlist_type * ); - void config_schema_item_add_required_children(config_schema_item_type * item , const char * child_key); - */ - - config_schema_item_type * config_add_schema_item(config_parser_type * config, - const char * kw, - bool required); - - - stringlist_type * config_alloc_complete_stringlist(const config_parser_type * , const char * ); - stringlist_type * config_alloc_stringlist(const config_parser_type * config , const char * ); - hash_type * config_alloc_hash(const config_parser_type * , const char * ); - const stringlist_type * config_iget_stringlist_ref(const config_parser_type * , const char * , int ); - - int config_get_occurences(const config_parser_type * , const char * ); - int config_get_occurence_size( const config_parser_type * config , const char * kw , int occurence); - - bool config_has_content_item( const config_parser_type * config , const char * input_kw); - config_content_item_type * config_get_content_item( const config_parser_type * config , const char * input_kw); - config_schema_item_type * config_add_key_value( config_parser_type * config , const char * key , bool required , config_item_types item_type); -; - const char * config_get_value_as_relpath( const config_parser_type * config , const char * kw); - const char * config_get_value_as_path( const config_parser_type * config , const char * kw); - const char * config_get_value(const config_parser_type * config , const char * kw); - - const subst_list_type * config_get_define_list( const config_parser_type * config); - int config_get_schema_size( const config_parser_type * config ); - config_content_node_type * config_get_value_node( const config_parser_type * config , const char * kw); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libconfig/include/ert/config/config_path_elm.h b/ThirdParty/Ert/libconfig/include/ert/config/config_path_elm.h deleted file mode 100644 index 7a50066d0a..0000000000 --- a/ThirdParty/Ert/libconfig/include/ert/config/config_path_elm.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'config_path_elm.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_CONFIG_PATH_ELM_H -#define ERT_CONFIG_PATH_ELM_H - -#ifdef __cplusplus -extern "C" -#endif - -#include - -typedef struct config_path_elm_struct config_path_elm_type; - -void config_path_elm_free( config_path_elm_type * path_elm ); -void config_path_elm_free__( void * arg ); -config_path_elm_type * config_path_elm_alloc( const config_root_path_type * root_path , const char * path); -const char * config_path_elm_get_abspath( const config_path_elm_type * path_elm ); -const char * config_path_elm_get_relpath( const config_path_elm_type * path_elm ); -const config_root_path_type * config_path_elm_get_rootpath( const config_path_elm_type * path_elm ); -char * config_path_elm_alloc_abspath(const config_path_elm_type * path_elm , const char * input_path); -char * config_path_elm_alloc_relpath(const config_path_elm_type * path_elm , const char * input_path); -char * config_path_elm_alloc_path(const config_path_elm_type * path_elm , const char * input_path); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ThirdParty/Ert/libconfig/include/ert/config/config_root_path.h b/ThirdParty/Ert/libconfig/include/ert/config/config_root_path.h deleted file mode 100644 index be1edf9786..0000000000 --- a/ThirdParty/Ert/libconfig/include/ert/config/config_root_path.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'config_root_path.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_CONFIG_ROOT_PATH_H -#define ERT_CONFIG_ROOT_PATH_H - -#ifdef __cplusplus -extern "C" -#endif - - -typedef struct config_root_path_struct config_root_path_type; - -void config_root_path_free( config_root_path_type * root_path ); -config_root_path_type * config_root_path_alloc( const char * input_path ); - -const char * config_root_path_get_input_path( const config_root_path_type * root_path ); -const char * config_root_path_get_rel_path( const config_root_path_type * root_path ); -const char * config_root_path_get_abs_path( const config_root_path_type * root_path ); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ThirdParty/Ert/libconfig/include/ert/config/config_schema_item.h b/ThirdParty/Ert/libconfig/include/ert/config/config_schema_item.h deleted file mode 100644 index 7b7171e373..0000000000 --- a/ThirdParty/Ert/libconfig/include/ert/config/config_schema_item.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'config_schema_item.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#ifndef ERT_CONFIG_SCHEMA_ITEM_H -#define ERT_CONFIG_SCHEMA_ITEM_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include -#include - -/** - Types used for validation of config items. -*/ -typedef enum { - CONFIG_STRING = 1, - CONFIG_INT = 2, - CONFIG_FLOAT = 4, - CONFIG_PATH = 8, - CONFIG_EXISTING_PATH = 16, - CONFIG_BOOL = 32, - CONFIG_CONFIG = 64, - CONFIG_BYTESIZE = 128, - CONFIG_EXECUTABLE = 256, - CONFIG_ISODATE = 512, - CONFIG_INVALID = 1024 -} config_item_types; - - -typedef enum { - CONFIG_UNRECOGNIZED_IGNORE = 0, - CONFIG_UNRECOGNIZED_WARN = 1, - CONFIG_UNRECOGNIZED_ERROR = 2 -} config_schema_unrecognized_enum; - - - -#define CONFIG_DEFAULT_ARG_MIN -1 -#define CONFIG_DEFAULT_ARG_MAX -1 - - - - typedef struct config_schema_item_struct config_schema_item_type; - - - config_schema_item_type * config_schema_item_alloc(const char * kw , bool required); - bool config_schema_item_validate_set(const config_schema_item_type * item , - stringlist_type * token_list , - const char * config_file, - const config_path_elm_type * path_elm, - config_error_type * error_list); - - void config_schema_item_free( config_schema_item_type * item); - void config_schema_item_free__ (void * void_item); - - void config_schema_item_set_required_children_on_value(config_schema_item_type * item , const char * value , stringlist_type * child_list); - void config_schema_item_set_common_selection_set(config_schema_item_type * item , int argc , const char ** argv); - void config_schema_item_set_indexed_selection_set(config_schema_item_type * item , int index , int argc , const char ** argv); - void config_schema_item_add_indexed_alternative(config_schema_item_type * item , int index , const char * value); - void config_schema_item_set_required_children(config_schema_item_type * item , stringlist_type * stringlist); - void config_schema_item_add_required_children(config_schema_item_type * item , const char * child_key); - void config_schema_item_set_envvar_expansion( config_schema_item_type * item , bool expand_envvar ); - void config_schema_item_set_argc_minmax(config_schema_item_type * item , - int argc_min , - int argc_max); - void config_schema_item_assure_type(const config_schema_item_type * item , int index , int type_mask); - - int config_schema_item_num_required_children(const config_schema_item_type * item); - const char * config_schema_item_iget_required_child( const config_schema_item_type * item , int index); - const char * config_schema_item_get_kw( const config_schema_item_type * item ); - bool config_schema_item_required( const config_schema_item_type * item ); - bool config_schema_item_expand_envvar( const config_schema_item_type * item ); - void config_schema_item_get_argc( const config_schema_item_type * item , int *argc_min , int *argc_max); - bool config_schema_item_has_required_children_value( const config_schema_item_type * item ); - stringlist_type * config_schema_item_get_required_children_value(const config_schema_item_type * item , const char * value); - - void config_schema_item_iset_type( config_schema_item_type * item , int index , config_item_types type); - config_item_types config_schema_item_iget_type(const config_schema_item_type * item , int index ); - void config_schema_item_set_default_type( config_schema_item_type * item , config_item_types type); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ThirdParty/Ert/libconfig/src/CMakeLists.txt b/ThirdParty/Ert/libconfig/src/CMakeLists.txt deleted file mode 100644 index 4f5217b223..0000000000 --- a/ThirdParty/Ert/libconfig/src/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -set( source_files config_parser.c config_content.c config_error.c config_schema_item.c config_content_item.c config_content_node.c config_root_path.c config_path_elm.c conf.c conf_util.c conf_data.c) -set( header_files config_parser.h config_content.h config_error.h config_schema_item.h config_content_item.h config_content_node.h config_root_path.h config_path_elm.h conf.h conf_data.h) - -add_library( config ${LIBRARY_TYPE} ${source_files} ) -set_target_properties( config PROPERTIES VERSION ${ERT_VERSION_MAJOR}.${ERT_VERSION_MINOR} SOVERSION ${ERT_VERSION_MAJOR} ) - -target_link_libraries( config ert_util ) -if (USE_RUNPATH) - add_runpath( config ) -endif() - -if (INSTALL_ERT) - install(TARGETS config DESTINATION ${CMAKE_INSTALL_LIBDIR}) - foreach(header ${header_files}) - install(FILES ../include/ert/config/${header} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/ert/config) - endforeach() -endif() diff --git a/ThirdParty/Ert/libconfig/src/conf.c b/ThirdParty/Ert/libconfig/src/conf.c deleted file mode 100644 index 7ec931c97e..0000000000 --- a/ThirdParty/Ert/libconfig/src/conf.c +++ /dev/null @@ -1,1569 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'conf.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -#include -#include -#include -#include - -#include -#include - - - -/** S T R U C T D E F I N I T I O N S */ - - - -struct conf_class_struct -{ - const conf_class_type * super_class; /** Can be NULL. */ - char * class_name; - char * help; /** Can be NULL if not given. */ - bool require_instance; - bool singleton; - - hash_type * sub_classes; /** conf_class_types */ - hash_type * item_specs; /** conf_item_spec_types */ - vector_type * item_mutexes; /** item_mutex_types */ -}; - - - -struct conf_instance_struct -{ - const conf_class_type * conf_class; - char * name; - - hash_type * sub_instances; /** conf_instance_types */ - hash_type * items; /** conf_item_types */ -}; - - - -struct conf_item_spec_struct -{ - const conf_class_type * super_class; /** NULL if not inserted into a class. */ - char * name; - bool required_set; /** Require the item to take a valid value. */ - char * default_value; /** Can be NULL if not given. */ - dt_enum dt; /** Data type. See conf_data.* */ - set_type * restriction; /** If non-empty, allowable values. */ - char * help; /** Can be NULL if not given. */ -}; - - - -struct conf_item_struct -{ - const conf_item_spec_type * conf_item_spec; - char * value; -}; - - - -struct conf_item_mutex_struct -{ - const conf_class_type * super_class; - bool require_one; - bool inverse; /* if inverse == true the 'mutex' implements: if A then ALSO B, C and D. */ - hash_type * item_spec_refs; -}; - - - -/** D E F A U L T A L L O C / F R E E F U N C T I O N S */ - - - -conf_class_type * conf_class_alloc_empty( - const char * class_name, - bool require_instance, - bool singleton, - const char * help) -{ - assert(class_name != NULL); - - conf_class_type * conf_class = util_malloc(sizeof *conf_class); - - conf_class->super_class = NULL; - conf_class->class_name = util_alloc_string_copy(class_name); - conf_class->help = NULL; - conf_class->require_instance = require_instance; - conf_class->singleton = singleton; - conf_class->sub_classes = hash_alloc(); - conf_class->item_specs = hash_alloc(); - conf_class->item_mutexes = vector_alloc_new(); - - - conf_class_set_help( conf_class , help ); - return conf_class; -} - - - -void conf_class_free( - conf_class_type * conf_class) -{ - free(conf_class->class_name); - util_safe_free(conf_class->help); - hash_free(conf_class->sub_classes); - hash_free(conf_class->item_specs); - vector_free(conf_class->item_mutexes); - free(conf_class); -} - - - -void conf_class_free__( - void * conf_class) -{ - conf_class_free( (conf_class_type *) conf_class); -} - - - -conf_instance_type * conf_instance_alloc_default( - const conf_class_type * conf_class, - const char * name) -{ - assert(conf_class != NULL); - assert(name != NULL); - - conf_instance_type * conf_instance = util_malloc(sizeof * conf_instance); - - conf_instance->conf_class = conf_class; - conf_instance->name = util_alloc_string_copy(name); - conf_instance->sub_instances = hash_alloc(); - conf_instance->items = hash_alloc(); - - { - /** Insert items that have a default value in their specs. */ - int num_item_specs = hash_get_size(conf_class->item_specs); - char ** item_spec_keys = hash_alloc_keylist(conf_class->item_specs); - - for(int item_spec_nr = 0; item_spec_nr < num_item_specs; item_spec_nr++) - { - const char * item_spec_name = item_spec_keys[item_spec_nr]; - const conf_item_spec_type * conf_item_spec = hash_get(conf_class->item_specs, item_spec_name); - if(conf_item_spec->default_value != NULL) - { - conf_item_type * conf_item = conf_item_alloc(conf_item_spec, conf_item_spec->default_value); - conf_instance_insert_owned_item(conf_instance, conf_item); - } - } - - util_free_stringlist(item_spec_keys, num_item_specs); - } - - return conf_instance; -} - - - -static -void conf_instance_copy_items( - conf_instance_type * conf_instance_target, - const conf_instance_type * conf_instance_source) -{ - int num_items = hash_get_size(conf_instance_source->items); - char ** item_keys = hash_alloc_keylist(conf_instance_source->items); - - for(int item_nr = 0; item_nr < num_items; item_nr++) - { - const char * item_name = item_keys[item_nr]; - const conf_item_type * conf_item = hash_get(conf_instance_source->items, item_name); - conf_item_type * conf_item_copy = conf_item_copyc(conf_item); - conf_instance_insert_owned_item(conf_instance_target, conf_item_copy); - } - - util_free_stringlist(item_keys, num_items); -} - - - -static -void conf_instance_copy_sub_instances( - conf_instance_type * conf_instance_target, - const conf_instance_type * conf_instance_source) -{ - int num_sub_instances = hash_get_size(conf_instance_source->sub_instances); - char ** sub_instance_keys = hash_alloc_keylist(conf_instance_source->sub_instances); - - for(int sub_nr = 0; sub_nr < num_sub_instances; sub_nr++) - { - const char * sub_name = sub_instance_keys[sub_nr]; - const conf_instance_type * sub_conf_instance = hash_get(conf_instance_source->sub_instances, sub_name); - conf_instance_type * sub_conf_instance_copy = conf_instance_copyc(sub_conf_instance); - conf_instance_insert_owned_sub_instance(conf_instance_target, sub_conf_instance_copy); - } - - util_free_stringlist(sub_instance_keys, num_sub_instances); -} - - - -conf_instance_type * conf_instance_copyc( - const conf_instance_type * conf_instance) -{ - conf_instance_type * conf_instance_copy = util_malloc(sizeof * conf_instance_copy); - - conf_instance_copy->conf_class = conf_instance->conf_class; - conf_instance_copy->name = util_alloc_string_copy(conf_instance->name); - conf_instance_copy->sub_instances = hash_alloc(); - conf_instance_copy->items = hash_alloc(); - - conf_instance_copy_items( conf_instance_copy, conf_instance); - conf_instance_copy_sub_instances(conf_instance_copy, conf_instance); - - return conf_instance_copy; -} - - - -void conf_instance_free( - conf_instance_type * conf_instance) -{ - free(conf_instance->name); - hash_free(conf_instance->sub_instances); - hash_free(conf_instance->items); - free(conf_instance); -} - - - -void conf_instance_free__( - void * conf_instance) -{ - conf_instance_free( (conf_instance_type *) conf_instance); -} - - - -conf_item_spec_type * conf_item_spec_alloc( - char * name, - bool required_set, - dt_enum dt, - const char * help) -{ - assert(name != NULL); - - conf_item_spec_type * conf_item_spec = util_malloc(sizeof * conf_item_spec); - - conf_item_spec->super_class = NULL; - conf_item_spec->name = util_alloc_string_copy(name); - conf_item_spec->required_set = required_set; - conf_item_spec->dt = dt; - conf_item_spec->default_value = NULL; - conf_item_spec->restriction = set_alloc_empty(); - conf_item_spec->help = NULL; - conf_item_spec_set_help( conf_item_spec , help ); - return conf_item_spec; -} - - - -void conf_item_spec_free( - conf_item_spec_type * conf_item_spec) -{ - free(conf_item_spec->name); - util_safe_free(conf_item_spec->default_value); - util_safe_free(conf_item_spec->help); - set_free(conf_item_spec->restriction); - free(conf_item_spec); -} - - - -void conf_item_spec_free__( - void * conf_item_spec) -{ - conf_item_spec_free( (conf_item_spec_type *) conf_item_spec); -} - - - -conf_item_type * conf_item_alloc( - const conf_item_spec_type * conf_item_spec, - const char * value) -{ - conf_item_type * conf_item = util_malloc(sizeof * conf_item); - - assert(conf_item_spec != NULL); - assert(value != NULL); - - conf_item->conf_item_spec = conf_item_spec; - conf_item->value = util_alloc_string_copy(value); - - return conf_item; -} - - - -conf_item_type * conf_item_copyc( - const conf_item_type * conf_item) -{ - return conf_item_alloc(conf_item->conf_item_spec, conf_item->value); -} - - - -void conf_item_free( - conf_item_type * conf_item) -{ - free(conf_item->value); - free(conf_item); -} - - - -void conf_item_free__( - void * conf_item) -{ - conf_item_free( (conf_item_type *) conf_item); -} - - - -static -conf_item_mutex_type * conf_item_mutex_alloc( - const conf_class_type * super_class, - bool require_one, - bool inverse) -{ - conf_item_mutex_type * conf_item_mutex = util_malloc(sizeof * conf_item_mutex); - - conf_item_mutex->super_class = super_class; - conf_item_mutex->require_one = require_one; - conf_item_mutex->inverse = inverse; - conf_item_mutex->item_spec_refs = hash_alloc(); - - return conf_item_mutex; -} - - - -void conf_item_mutex_free( - conf_item_mutex_type * conf_item_mutex) -{ - hash_free(conf_item_mutex->item_spec_refs); - free(conf_item_mutex); -} - - - -void conf_item_mutex_free__( - void * conf_item_mutex) -{ - conf_item_mutex_free( (conf_item_mutex_type *) conf_item_mutex); -} - - - - - - -/** M A N I P U L A T O R S , I N S E R T I O N */ - - - -static -bool conf_class_has_super_class( - const conf_class_type * conf_class, - const conf_class_type * super_class) -{ - assert(conf_class != NULL); - assert(super_class != NULL); - - const conf_class_type * parent = conf_class->super_class; - - while(parent != NULL) - { - if(parent == super_class) - return true; - else - parent = parent->super_class; - } - return false; -} - - - -void conf_class_insert_owned_sub_class( - conf_class_type * conf_class, - conf_class_type * sub_conf_class) -{ - assert(conf_class != NULL); - assert(sub_conf_class != NULL); - - /** Abort if conf_class already has an item with the same name. */ - if(hash_has_key(conf_class->item_specs, sub_conf_class->class_name)) - util_abort("%s: Internal error. conf class already has an item with name \"%s\".\n", - __func__, sub_conf_class->class_name); - - /** Abort if sub_conf_class is equal to conf_class. */ - if(sub_conf_class == conf_class) - util_abort("%s: Internal error. Trying to make a class it's own super class.\n", __func__); - - /** Abort if sub_conf_class is a super class to conf_class. */ - if(conf_class_has_super_class(conf_class, sub_conf_class)) - util_abort("%s: Internal error. Trying to make a class it's own super class .\n", __func__); - - /** Abort if sub_conf_class already has a super class. */ - if(sub_conf_class->super_class != NULL) - util_abort("%s: Internal error. Inserted class already has a super class.\n", __func__); - - hash_insert_hash_owned_ref(conf_class->sub_classes, sub_conf_class->class_name, - sub_conf_class, conf_class_free__); - - sub_conf_class->super_class = conf_class; -} - - - -void conf_class_insert_owned_item_spec( - conf_class_type * conf_class, - conf_item_spec_type * item_spec) -{ - assert(conf_class != NULL); - assert(item_spec != NULL); - - - /** Abort if item_spec already has a super class. */ - if(item_spec->super_class != NULL) - util_abort("%s: Internal error: item is already assigned to another class.\n", __func__); - - - /** Abort if the class has a sub class with the same name.. */ - if(hash_has_key(conf_class->sub_classes, item_spec->name)) - util_abort("%s: Internal error. conf class already has a sub class with name \"%s\".\n", __func__, item_spec->name); - - - hash_insert_hash_owned_ref(conf_class->item_specs, item_spec->name, - item_spec, conf_item_spec_free__); - - item_spec->super_class = conf_class; -} - - - -conf_item_mutex_type * conf_class_new_item_mutex(conf_class_type * conf_class , bool require_one , bool inverse) -{ - assert(conf_class != NULL); - conf_item_mutex_type * mutex = conf_item_mutex_alloc( conf_class , require_one , inverse); - vector_append_owned_ref(conf_class->item_mutexes, mutex, conf_item_mutex_free__); - return mutex; -} - - - -void conf_instance_insert_owned_sub_instance( - conf_instance_type * conf_instance, - conf_instance_type * sub_conf_instance) -{ - assert(conf_instance != NULL); - assert(sub_conf_instance != NULL); - - /** Abort if the instance is of unknown type. */ - if(sub_conf_instance->conf_class->super_class != conf_instance->conf_class) - util_abort("%s: Internal error. Trying to insert instance of unknown type.\n", __func__); - - - /** Check if the instance's class is singleton. If so, remove the old instance. */ - if(sub_conf_instance->conf_class->singleton) - { - stringlist_type * instances = conf_instance_alloc_list_of_sub_instances_of_class(conf_instance, - sub_conf_instance->conf_class); - int num_instances = stringlist_get_size(instances); - - for(int i = 0; i < num_instances; i++) - { - const char * key = stringlist_iget(instances, i); - printf("WARNING: Class \"%s\" is of singleton type. Overwriting instance \"%s\" with \"%s\".\n", - sub_conf_instance->conf_class->class_name, key, sub_conf_instance->name); - hash_del(conf_instance->sub_instances, key); - } - - stringlist_free(instances); - } - - - /** Warn if the sub_instance already exists and is overwritten. */ - if(hash_has_key(conf_instance->sub_instances, sub_conf_instance->name)) - { - printf("WARNING: Overwriting instance \"%s\" of class \"%s\" in instance \"%s\" of class \"%s\"\n", - sub_conf_instance->name, conf_instance_get_class_name_ref(sub_conf_instance), - conf_instance->name, conf_instance_get_class_name_ref(conf_instance)); - } - - hash_insert_hash_owned_ref(conf_instance->sub_instances, - sub_conf_instance->name, - sub_conf_instance, - conf_instance_free__); -} - - - -void conf_instance_insert_owned_item( - conf_instance_type * conf_instance, - conf_item_type * conf_item) -{ - assert(conf_instance != NULL); - assert(conf_item != NULL); - - const char * item_name = conf_item->conf_item_spec->name; - - /** Check that the inserted item is of known type. */ - { - const hash_type * item_spec_hash = conf_instance->conf_class->item_specs; - const conf_item_spec_type * conf_item_spec = hash_get(item_spec_hash, item_name); - if(conf_item_spec != conf_item->conf_item_spec) - util_abort("%s: Internal error.\n", __func__); - } - - hash_insert_hash_owned_ref(conf_instance->items, item_name, conf_item, conf_item_free__); -} - - - -void conf_instance_insert_item( - conf_instance_type * conf_instance, - const char * item_name, - const char * value) -{ - assert(conf_instance != NULL); - assert(item_name != NULL); - assert(value != NULL); - - conf_item_type * conf_item; - const conf_class_type * conf_class = conf_instance->conf_class; - const conf_item_spec_type * conf_item_spec; - - if(!conf_class_has_item_spec(conf_class, item_name)) - util_abort("%s: Internal error. Unkown item \"%s\" in class \"%s\".\n", - __func__, item_name, conf_instance->conf_class->class_name); - - conf_item_spec = conf_class_get_item_spec_ref(conf_class, item_name); - - conf_item = conf_item_alloc(conf_item_spec, value); - conf_instance_insert_owned_item(conf_instance, conf_item); -} - - - -void conf_instance_overload( - conf_instance_type * conf_instance_target, - const conf_instance_type * conf_instance_source) -{ - assert(conf_instance_target != NULL); - assert(conf_instance_source != NULL); - - if(conf_instance_target->conf_class != conf_instance_source->conf_class) - util_abort("%s: Internal error. Invalid overloading.\n", __func__); - - conf_instance_copy_items( conf_instance_target, conf_instance_source); - conf_instance_copy_sub_instances(conf_instance_target, conf_instance_source); -} - - - -void conf_item_mutex_add_item_spec( - conf_item_mutex_type * conf_item_mutex, - const conf_item_spec_type * conf_item_spec) -{ - - if(conf_item_mutex->super_class != NULL) - { - const conf_class_type * conf_class = conf_item_mutex->super_class; - const char * item_key = conf_item_spec->name; - - if(!hash_has_key(conf_class->item_specs, item_key)) - { - util_abort("%s: Internal error. Trying to insert a mutex on item \"%s\", which class \"%s\" does not have.\n", - __func__, item_key, conf_class->class_name); - } - else - { - const conf_item_spec_type * conf_item_spec_class = hash_get(conf_class->item_specs, item_key); - if(conf_item_spec_class != conf_item_spec) - { - util_abort("Internal error. Trying to insert a mutex on item \"%s\", which class \"%s\" has a different implementation of.\n", - __func__, item_key, conf_class->class_name); - } - } - } - - if(conf_item_mutex->require_one && conf_item_spec->required_set) - util_abort("%s: Trying to add item \"%s\" to a mutex, but it is required set!\n", - __func__, conf_item_spec->name); - - hash_insert_ref(conf_item_mutex->item_spec_refs, conf_item_spec->name, conf_item_spec); -} - - - -/** M A N I P U L A T O R S , C L A S S A N D I T E M S P E C I F I C A T I O N */ - - - -void conf_class_set_help( - conf_class_type * conf_class, - const char * help) -{ - conf_class->help = util_realloc_string_copy(conf_class->help , help); -} - - - -void conf_item_spec_add_restriction( - conf_item_spec_type * conf_item_spec, - const char * restriction) -{ - set_add_key(conf_item_spec->restriction, restriction); -} - - - -void conf_item_spec_set_default_value( - conf_item_spec_type * conf_item_spec, - const char * default_value) -{ - if(conf_item_spec->default_value != NULL) - free(conf_item_spec->default_value); - if(default_value != NULL) - conf_item_spec->default_value = util_alloc_string_copy(default_value); - else - conf_item_spec->default_value = NULL; -} - - - -void conf_item_spec_set_help( - conf_item_spec_type * conf_item_spec, - const char * help) -{ - conf_item_spec->help = util_realloc_string_copy( conf_item_spec->help , help); -} - - - - -/** A C C E S S O R S */ - - - -bool conf_class_has_item_spec( - const conf_class_type * conf_class, - const char * item_name) -{ - if(!hash_has_key(conf_class->item_specs, item_name)) - return false; - else - return true; -} - - - -bool conf_class_has_sub_class( - const conf_class_type * conf_class, - const char * sub_class_name) -{ - if(!hash_has_key(conf_class->sub_classes, sub_class_name)) - return false; - else - return true; -} - - - -const conf_item_spec_type * conf_class_get_item_spec_ref( - const conf_class_type * conf_class, - const char * item_name) -{ - if(!hash_has_key(conf_class->item_specs, item_name)) - util_abort("%s: Internal error.\n", __func__); - - return hash_get(conf_class->item_specs, item_name); -} - - - -const conf_class_type * conf_class_get_sub_class_ref( - const conf_class_type * conf_class, - const char * sub_class_name) -{ - if(!hash_has_key(conf_class->sub_classes, sub_class_name)) - util_abort("%s: Internal error.\n", __func__); - - return hash_get(conf_class->sub_classes, sub_class_name); -} - - - -const char * conf_instance_get_name_ref( - const conf_instance_type * conf_instance) -{ - return conf_instance->name; -} - - - -bool conf_instance_is_of_class( - const conf_instance_type * conf_instance, - const char * class_name) -{ - if(strcmp(conf_instance->conf_class->class_name, class_name) == 0) - return true; - else - return false; -} - - - -bool conf_instance_has_item( - const conf_instance_type * conf_instance, - const char * item_name) -{ - if(!hash_has_key(conf_instance->items, item_name)) - return false; - else - return true; -} - - - -bool conf_instance_has_sub_instance( - const conf_instance_type * conf_instance, - const char * sub_instance_name) -{ - if(!hash_has_key(conf_instance->sub_instances, sub_instance_name)) - return false; - else - return true; -} - - - -const conf_instance_type * conf_instance_get_sub_instance_ref( - const conf_instance_type * conf_instance, - const char * sub_instance_name) -{ - if(!hash_has_key(conf_instance->sub_instances, sub_instance_name)) - { - util_abort("%s: Instance %s of type %s has no sub instance named %s.\n", - __func__, conf_instance->name, - conf_instance->conf_class->class_name, - sub_instance_name); - } - return hash_get(conf_instance->sub_instances, sub_instance_name); -} - - - -stringlist_type * conf_instance_alloc_list_of_sub_instances_of_class( - const conf_instance_type * conf_instance, - const conf_class_type * conf_class) -{ - stringlist_type * instances = stringlist_alloc_new(); - int num_sub_instances = hash_get_size(conf_instance->sub_instances); - char ** sub_instance_keys = hash_alloc_keylist(conf_instance->sub_instances); - - for(int key_nr = 0; key_nr < num_sub_instances; key_nr++) - { - const conf_instance_type * sub_instance = hash_get(conf_instance->sub_instances, - sub_instance_keys[key_nr]); - - const conf_class_type * sub_instance_class = sub_instance->conf_class; - - if(sub_instance_class == conf_class) - stringlist_append_copy(instances, sub_instance_keys[key_nr]); - } - - util_free_stringlist(sub_instance_keys, num_sub_instances); - - return instances; -} - - - -stringlist_type * conf_instance_alloc_list_of_sub_instances_of_class_by_name( - const conf_instance_type * conf_instance, - const char * sub_class_name) -{ - if(!conf_class_has_sub_class(conf_instance->conf_class, sub_class_name)) - util_abort("%s: Instance \"%s\" is of class \"%s\" which has no sub class with name \"%s\"\n", - conf_instance->name, conf_instance->conf_class->class_name, sub_class_name); - - const conf_class_type * conf_class = conf_class_get_sub_class_ref(conf_instance->conf_class, sub_class_name); - - return conf_instance_alloc_list_of_sub_instances_of_class(conf_instance, conf_class); -} - - - -const conf_class_type * conf_instance_get_class_ref( - const conf_instance_type * conf_instance) -{ - return conf_instance->conf_class; -} - - - -const char * conf_instance_get_class_name_ref( - const conf_instance_type * conf_instance) -{ - return conf_instance->conf_class->class_name; -} - - - -const char * conf_instance_get_item_value_ref( - const conf_instance_type * conf_instance, - const char * item_name) -{ - if(!hash_has_key(conf_instance->items, item_name)) - { - util_abort("%s: Instance %s of type %s has no item %s.\n", - __func__, conf_instance->name, - conf_instance->conf_class->class_name, - item_name); - } - const conf_item_type * conf_item = hash_get(conf_instance->items, item_name); - return conf_item->value; -} - - - -/** If the dt supports it, this function shall return the item value as an int. - If the dt does not support it, the function will abort. -*/ -int conf_instance_get_item_value_int( - const conf_instance_type * conf_instance, - const char * item_name) -{ - if(!hash_has_key(conf_instance->items, item_name)) - util_abort("%s: Instance %s of type %s has no item %s.\n", - __func__, conf_instance->name, - conf_instance->conf_class->class_name, - item_name); - - const conf_item_type * conf_item = hash_get(conf_instance->items, item_name); - const conf_item_spec_type * conf_item_spec = conf_item->conf_item_spec; - - return conf_data_get_int_from_string(conf_item_spec->dt, conf_item->value); -} - - - -/** If the dt supports it, this function shall return the item value as a double. - If the dt does not support it, the function will abort. -*/ -double conf_instance_get_item_value_double( - const conf_instance_type * conf_instance, - const char * item_name) -{ - if(!hash_has_key(conf_instance->items, item_name)) - util_abort("%s: Instance %s of type %s has no item %s.\n", - __func__, conf_instance->name, - conf_instance->conf_class->class_name, - item_name); - - const conf_item_type * conf_item = hash_get(conf_instance->items, item_name); - const conf_item_spec_type * conf_item_spec = conf_item->conf_item_spec; - - return conf_data_get_double_from_string(conf_item_spec->dt, conf_item->value); -} - - - -/** If the dt supports it, this function shall return the item value as a time_t. - If the dt does not support it, the function will abort. -*/ -time_t conf_instance_get_item_value_time_t( - const conf_instance_type * conf_instance, - const char * item_name) -{ - if(!hash_has_key(conf_instance->items, item_name)) - util_abort("%s: Instance %s of type %s has no item %s.\n", - __func__, conf_instance->name, - conf_instance->conf_class->class_name, - item_name); - - const conf_item_type * conf_item = hash_get(conf_instance->items, item_name); - const conf_item_spec_type * conf_item_spec = conf_item->conf_item_spec; - - return conf_data_get_time_t_from_string(conf_item_spec->dt, conf_item->value); -} - - - - - -/** V A L I D A T O R S */ - - - -static -void conf_item_spec_printf_help( - const conf_item_spec_type * conf_item_spec) -{ - assert(conf_item_spec->super_class != NULL); - int num_restrictions = set_get_size(conf_item_spec->restriction); - - printf("\n Help on item \"%s\" in class \"%s\":\n\n", - conf_item_spec->name, conf_item_spec->super_class->class_name); - printf(" - Data type : %s\n\n", conf_data_get_dt_name_ref(conf_item_spec->dt)); - if(conf_item_spec->default_value != NULL) - printf(" - Default value: %s\n\n", conf_item_spec->default_value); - if(conf_item_spec->help != NULL) - printf(" - %s\n", conf_item_spec->help); - - if(num_restrictions > 0) - { - printf("\n The item \"%s\" is restricted to the following values:\n\n", - conf_item_spec->name); - char ** restriction_keys = set_alloc_keylist(conf_item_spec->restriction); - - for(int key_nr = 0; key_nr < num_restrictions; key_nr++) - { - printf(" %i. %s\n", key_nr + 1, restriction_keys[key_nr]); - } - - util_free_stringlist(restriction_keys, num_restrictions); - } - printf("\n"); -} - - - -static -void conf_class_printf_help( - const conf_class_type * conf_class) -{ - /** TODO Should print info on the required sub classes and items. */ - - if(conf_class->help != NULL) - { - if(conf_class->super_class != NULL) - printf("\n Help on class \"%s\" with super class \"%s\":\n\n", - conf_class->class_name, conf_class->super_class->class_name); - else - printf("\n Help on class \"%s\":\n\n", - conf_class->class_name); - - printf(" %s\n", conf_class->help); - } - printf("\n"); -} - - - -static -bool conf_item_validate( - const conf_item_type * conf_item) -{ - assert(conf_item != NULL); - - bool ok = true; - const conf_item_spec_type * conf_item_spec = conf_item->conf_item_spec; - int num_restrictions = set_get_size(conf_item_spec->restriction); - - if(!conf_data_validate_string_as_dt_value(conf_item_spec->dt, conf_item->value)) - { - ok = false; - printf("ERROR: Failed to validate \"%s\" as a %s for item \"%s\".\n", - conf_item->value, conf_data_get_dt_name_ref(conf_item_spec->dt), - conf_item_spec->name); - } - - if(num_restrictions > 0 && ok) - { - char ** restriction_keys = set_alloc_keylist(conf_item_spec->restriction); - - /** Legacy work-around when removing the vector supprt. */ - const int num_tokens = 1; - const char ** tokens = (const char **) &conf_item->value; - - for(int token_nr = 0; token_nr < num_tokens; token_nr++) - { - bool valid = false; - - for(int key_nr = 0; key_nr < num_restrictions; key_nr++) - { - if(strcmp(tokens[token_nr], restriction_keys[key_nr]) == 0) - valid = true; - } - - if(valid == false) - { - ok = false; - printf("ERROR: Failed to validate \"%s\" as a valid value for item \"%s\".\n", - conf_item->value, conf_item_spec->name); - } - } - util_free_stringlist(restriction_keys, num_restrictions); - } - - if(!ok) - conf_item_spec_printf_help(conf_item_spec); - - - return ok; -} - - - -static -bool conf_instance_has_required_items( - const conf_instance_type * conf_instance) -{ - bool ok = true; - const conf_class_type * conf_class = conf_instance->conf_class; - - int num_item_specs = hash_get_size(conf_class->item_specs); - char ** item_spec_keys = hash_alloc_keylist(conf_class->item_specs); - - for(int item_spec_nr = 0; item_spec_nr < num_item_specs; item_spec_nr++) - { - const char * item_spec_name = item_spec_keys[item_spec_nr]; - const conf_item_spec_type * conf_item_spec = hash_get(conf_class->item_specs, item_spec_name); - if(conf_item_spec->required_set) - { - if(!hash_has_key(conf_instance->items, item_spec_name)) - { - ok = false; - printf("ERROR: Missing item \"%s\" in instance \"%s\" of class \"%s\"\n", - item_spec_name, conf_instance->name, conf_instance->conf_class->class_name); - conf_item_spec_printf_help(conf_item_spec); - } - } - } - - util_free_stringlist(item_spec_keys, num_item_specs); - - return ok; -} - - - -static -bool conf_instance_has_valid_items( - const conf_instance_type * conf_instance) -{ - bool ok = true; - - int num_items = hash_get_size(conf_instance->items); - char ** item_keys = hash_alloc_keylist(conf_instance->items); - - for(int item_nr = 0; item_nr < num_items; item_nr++) - { - const conf_item_type * conf_item = hash_get(conf_instance->items, item_keys[item_nr]); - if(!conf_item_validate(conf_item)) - ok = false; - } - - util_free_stringlist(item_keys, num_items); - - return ok; -} - - -static -bool conf_instance_check_item_mutex( - const conf_instance_type * conf_instance, - const conf_item_mutex_type * conf_item_mutex) -{ - bool ok = true; - int num_items_set = 0; - set_type * items_set = set_alloc_empty(); - int num_items = hash_get_size(conf_item_mutex->item_spec_refs); - char ** item_keys = hash_alloc_keylist(conf_item_mutex->item_spec_refs); - - for(int item_nr = 0; item_nr < num_items; item_nr++) - { - const char * item_key = item_keys[item_nr]; - if(conf_instance_has_item(conf_instance, item_key)) - { - set_add_key(items_set, item_key); - } - } - - num_items_set = set_get_size(items_set); - - if (conf_item_mutex->inverse) - { - /** This is an inverse mutex - all (or none) items should be set. */ - if (!((num_items_set == 0) || (num_items_set == num_items))) - { - ok = false; - char ** items_set_keys = set_alloc_keylist(items_set); - printf("ERROR: Failed to validate mutal inclusion in instance \"%s\" of class \"%s\".\n\n", - conf_instance->name, conf_instance->conf_class->class_name); - printf(" When using one or more of the following items, all must be set:\n"); - for(int item_nr = 0; item_nr < num_items; item_nr++) - printf(" %i : %s\n", item_nr, item_keys[item_nr]); - printf("\n"); - printf(" However, only the following items were set:\n"); - for(int item_nr = 0; item_nr < num_items_set; item_nr++) - printf(" %i : %s\n", item_nr, items_set_keys[item_nr]); - printf("\n"); - - util_free_stringlist(items_set_keys, num_items_set); - } - } - else - { - if(num_items_set > 1) - { - ok = false; - char ** items_set_keys = set_alloc_keylist(items_set); - - printf("ERROR: Failed to validate mutex in instance \"%s\" of class \"%s\".\n\n", - conf_instance->name, conf_instance->conf_class->class_name); - printf(" Only one of the following items may be set:\n"); - for(int item_nr = 0; item_nr < num_items; item_nr++) - printf(" %i : %s\n", item_nr, item_keys[item_nr]); - - printf("\n"); - printf(" However, all the following items were set:\n"); - for(int item_nr = 0; item_nr < num_items_set; item_nr++) - printf(" %i : %s\n", item_nr, items_set_keys[item_nr]); - printf("\n"); - - util_free_stringlist(items_set_keys, num_items_set); - } - } - - if(num_items_set == 0 && conf_item_mutex->require_one && num_items > 0) - { - ok = false; - printf("ERROR: Failed to validate mutex in instance \"%s\" of class \"%s\".\n\n", - conf_instance->name, conf_instance->conf_class->class_name); - printf(" One of the following items MUST be set:\n"); - for(int item_nr = 0; item_nr < num_items; item_nr++) - printf(" %i : %s\n", item_nr, item_keys[item_nr]); - printf("\n"); - } - - util_free_stringlist(item_keys, num_items); - set_free(items_set); - - return ok; -} - - - -static -bool conf_instance_has_valid_mutexes( - const conf_instance_type * conf_instance) -{ - bool ok = true; - const conf_class_type * conf_class = conf_instance->conf_class; - const vector_type * item_mutexes = conf_class->item_mutexes; - int num_mutexes = vector_get_size(item_mutexes); - - for(int mutex_nr = 0; mutex_nr < num_mutexes; mutex_nr++) - { - const conf_item_mutex_type * conf_item_mutex = vector_iget( item_mutexes, mutex_nr ); - if(!conf_instance_check_item_mutex(conf_instance, conf_item_mutex)) - ok = false; - } - - return ok; -} - -static bool __instance_has_sub_instance_of_type( - const conf_class_type * __conf_class, int num_sub_instances, conf_class_type ** class_signatures) -{ - for(int sub_instance_nr = 0; sub_instance_nr < num_sub_instances; sub_instance_nr++) - { - if(class_signatures[sub_instance_nr] == __conf_class) - return true; - } - return false; -} - -static -bool conf_instance_has_required_sub_instances( - const conf_instance_type * conf_instance) -{ - /** U G L Y B U G L Y U G L Y B U G LY U G L Y B U G LY U G L Y B U G LY */ - /** This function is really ugly. It could be smoother if set_type supported size_t's. */ - /** U G L Y B U G L Y U G L Y B U G LY U G L Y B U G LY U G L Y B U G LY */ - - bool ok = true; - - - /** This first part is just concerned with creating the function __instance_has_sub_instance_of_type. */ - int num_sub_instances = hash_get_size(conf_instance->sub_instances); - conf_class_type ** class_signatures = util_calloc(num_sub_instances , sizeof * class_signatures); - { - char ** sub_instance_keys = hash_alloc_keylist(conf_instance->sub_instances); - for(int sub_instance_nr = 0; sub_instance_nr < num_sub_instances; sub_instance_nr++) - { - const char * sub_instance_name = sub_instance_keys[sub_instance_nr]; - const conf_instance_type * sub_conf_instance = hash_get(conf_instance->sub_instances, sub_instance_name); - class_signatures[sub_instance_nr] = (conf_class_type *) sub_conf_instance->conf_class; - } - util_free_stringlist(sub_instance_keys, num_sub_instances); - } - - - - - - - /** OK, we now check that the sub classes that have require_instance true have at least one instance. */ - { - const conf_class_type * conf_class = conf_instance->conf_class; - int num_sub_classes = hash_get_size(conf_class->sub_classes); - char ** sub_class_keys = hash_alloc_keylist(conf_class->sub_classes); - - for(int sub_class_nr = 0; sub_class_nr < num_sub_classes; sub_class_nr ++) - { - const char * sub_class_name = sub_class_keys[sub_class_nr]; - const conf_class_type * sub_conf_class = hash_get(conf_class->sub_classes, sub_class_name); - if(sub_conf_class->require_instance) - { - if(!__instance_has_sub_instance_of_type(sub_conf_class, num_sub_instances, class_signatures)) - { - printf("ERROR: Missing required instance of sub class \"%s\" in instance \"%s\" of class \"%s\".\n", - sub_conf_class->class_name, conf_instance->name, conf_instance->conf_class->class_name); - conf_class_printf_help(sub_conf_class); - ok = false; - } - } - } - - util_free_stringlist(sub_class_keys, num_sub_classes); - } - - free(class_signatures); - - return ok; -} - - - -static -bool conf_instance_validate_sub_instances( - const conf_instance_type * conf_instance) -{ - bool ok = true; - - int num_sub_instances = hash_get_size(conf_instance->sub_instances); - char ** sub_instance_keys = hash_alloc_keylist(conf_instance->sub_instances); - - for(int sub_instance_nr = 0; sub_instance_nr < num_sub_instances; sub_instance_nr++) - { - const char * sub_instances_key = sub_instance_keys[sub_instance_nr]; - const conf_instance_type * sub_conf_instance = hash_get(conf_instance->sub_instances, sub_instances_key); - if(!conf_instance_validate(sub_conf_instance)) - ok = false; - } - - util_free_stringlist(sub_instance_keys, num_sub_instances); - - return ok; -} - - - -bool conf_instance_validate( - const conf_instance_type * conf_instance) -{ - bool ok = true; - - if(conf_instance == NULL) - { - printf("%s: Trying to dereference NULL pointer.\n", __func__); - return false; - } - - if(!conf_instance_has_required_items(conf_instance)) - ok = false; - - if(!conf_instance_has_valid_mutexes(conf_instance)) - ok = false; - - if(!conf_instance_has_valid_items(conf_instance)) - ok = false; - - if(!conf_instance_has_required_sub_instances(conf_instance)) - ok = false; - - if(!conf_instance_validate_sub_instances(conf_instance)) - ok = false; - - return ok; -} - - - -/** A L L O C F R O M F I L E */ - - - -static -void conf_instance_parser_add_item( - conf_instance_type * conf_instance, - const char * item_name, - char ** buffer_pos) -{ - char * token_assign; - char * token_value; - char * token_end; - - char * buffer_pos_loc = *buffer_pos; - - token_assign = conf_util_alloc_next_token(&buffer_pos_loc); - if(token_assign == NULL) - { - /** This will fail. Give up. */ - printf("WARNING: Unexpected EOF after \"%s\". Giving up on this item.\n\n", item_name); - return; - } - else if(strcmp(token_assign, "=") != 0) - { - /** This will fail. Give up. */ - printf("WARNING: Unexpected \"%s\" after \"%s\". Giving up on this item.\n\n", token_assign, item_name); - free(token_assign); - *buffer_pos = buffer_pos_loc; - return; - } - - token_value = conf_util_alloc_next_token(&buffer_pos_loc); - if(token_value == NULL) - { - /** This will fail. Give up. */ - printf("WARNING: Unexpected EOF after \"%s = \". Giving up on this item.\n\n", item_name); - free(token_assign); - return; - } - else - conf_instance_insert_item(conf_instance, item_name, token_value); - - *buffer_pos = buffer_pos_loc; - - token_end = conf_util_alloc_next_token(&buffer_pos_loc); - if(token_end == NULL) - { - /** We've already alloc'd the token. Print a warning to the user. */ - printf("WARNING: Unexpected EOF after \"%s = %s \".\n\n", item_name, token_value); - free(token_assign); - free(token_value); - return; - } - else if(strcmp(token_end, ";") != 0) - { - printf("WARNING: Unexpected \"%s\" after \"%s = %s \". Probably a missing \";\".\n\n", - token_end, item_name, token_value); - } - else - { - *buffer_pos = buffer_pos_loc; - } - - free(token_assign); - free(token_value); - free(token_end); -} - - - -static -void conf_instance_parser_skip_unknown_class( - char ** buffer_pos) -{ - int depth_in_unkown_class = 1; - char * token = conf_util_alloc_next_token(buffer_pos); - - while(token != NULL) - { - if(strcmp(token, "{") == 0) - depth_in_unkown_class++; - else if(strcmp(token, "}") == 0) - depth_in_unkown_class--; - - printf("WARNING: Skipping token \"%s\" in unknown class.\n", token); - free(token); - if(depth_in_unkown_class == 0) - break; - else - token = conf_util_alloc_next_token(buffer_pos); - } -} - - - -static -void conf_instance_add_data_from_token_buffer( - conf_instance_type * conf_instance, - char ** buffer_pos, - bool allow_inclusion, - bool is_root) -{ - const conf_class_type * conf_class = conf_instance->conf_class; - char * token = conf_util_alloc_next_token(buffer_pos); - - bool scope_start_set = false; - bool scope_end_set = false; - - while(token != NULL) - { - if(conf_class_has_item_spec(conf_class, token) && (scope_start_set || is_root)) - conf_instance_parser_add_item(conf_instance, token, buffer_pos); - else if(conf_class_has_sub_class(conf_class, token) && (scope_start_set || is_root)) - { - char * name = conf_util_alloc_next_token(buffer_pos); - const conf_class_type * sub_conf_class = conf_class_get_sub_class_ref(conf_class, token); - if(name != NULL) - { - conf_instance_type * sub_conf_instance = conf_instance_alloc_default(sub_conf_class, name); - free(name); - conf_instance_insert_owned_sub_instance(conf_instance, sub_conf_instance); - conf_instance_add_data_from_token_buffer(sub_conf_instance, buffer_pos, allow_inclusion, false); - } - else - printf("WARNING: Unexpected EOF after \"%s\".\n\n", token); - } - else if(strcmp(token, "}") == 0) - { - if(scope_start_set) - { - scope_end_set = true; - free(token); - break; - } - else - printf("WARNING: Skipping unexpected token \"%s\".\n\n", token); - } - else if(strcmp(token, "{") == 0) - { - if(!scope_start_set && !is_root) - scope_start_set = true; - else - conf_instance_parser_skip_unknown_class(buffer_pos); - } - else if(strcmp(token, ";") == 0) - { - if(!scope_start_set) - { - free(token); - break; - } - else - printf("WARNING: Skipping unexpected token \"%s\".\n\n", token); - } - else if(strcmp(token, "include") == 0) - { - char * file_name = conf_util_alloc_next_token(buffer_pos); - char * buffer_pos_lookahead = *buffer_pos; - char * token_end; - - if(file_name == NULL) - { - printf("WARNING: Unexpected EOF after \"%s\".\n\n", token); - free(token); - break; - } - else if(!allow_inclusion) - { - printf("WARNING: No support for nested inclusion. Skipping file \"%s\".\n\n", file_name); - } - else - { - char * buffer_new = conf_util_fscanf_alloc_token_buffer(file_name); - char * buffer_pos_new = buffer_new; - - conf_instance_add_data_from_token_buffer(conf_instance, &buffer_pos_new, false, true); - - free(buffer_new); - } - - /** Check that the filename is followed by a ; */ - token_end = conf_util_alloc_next_token(&buffer_pos_lookahead); - if(token_end == NULL) - { - printf("WARNING: Unexpected EOF after inclusion of file \"%s\".\n\n", file_name); - free(token); - free(file_name); - break; - } - else if(strcmp(token_end, ";") != 0) - { - printf("WARNING: Unexpected \"%s\" after inclusion of file \"%s\". Probably a missing \";\".\n\n", - token_end, file_name); - } - else - { - *buffer_pos = buffer_pos_lookahead; - } - free(token_end); - free(file_name); - } - else - { - printf("WARNING: Skipping unexpected token \"%s\".\n\n", token); - } - - free(token); - token = conf_util_alloc_next_token(buffer_pos); - } - - - if(scope_end_set) - { - token = conf_util_alloc_next_token(buffer_pos); - if(token == NULL) - { - printf("WARNING: Unexpected EOF. Missing terminating \";\".\n"); - } - else if(strcmp(token, ";") != 0) - { - printf("WARNING: Missing terminating \";\" at the end of \"%s\".\n", conf_instance->name); - free(token); - } - else - free(token); - } -} - - - -conf_instance_type * conf_instance_alloc_from_file( - const conf_class_type * conf_class, - const char * name, - const char * file_name) -{ - conf_instance_type * conf_instance = conf_instance_alloc_default(conf_class, name); - - char * buffer = conf_util_fscanf_alloc_token_buffer(file_name); - char * buffer_pos = buffer; - - conf_instance_add_data_from_token_buffer(conf_instance, &buffer_pos, true, true); - - free(buffer); - - return conf_instance; -} - - diff --git a/ThirdParty/Ert/libconfig/src/conf_data.c b/ThirdParty/Ert/libconfig/src/conf_data.c deleted file mode 100644 index eb0867c6d2..0000000000 --- a/ThirdParty/Ert/libconfig/src/conf_data.c +++ /dev/null @@ -1,259 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'conf_data.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include - -#include - - - -#define DT_STR_STRING "string" -#define DT_INT_STRING "integer" -#define DT_POSINT_STRING "positive integer" -#define DT_FLOAT_STRING "floating point number" -#define DT_POSFLOAT_STRING "positive floating foint number" -#define DT_FILE_STRING "file" -#define DT_EXEC_STRING "executable" -#define DT_FOLDER_STRING "folder" -#define DT_DATE_STRING "date" - - - -#define RETURN_TYPE_IF_MATCH(STRING,TYPE) if(strcmp(STRING, TYPE ##_STRING) == 0){ return TYPE;} -dt_enum conf_data_get_dt_from_string( - const char * str) -{ - RETURN_TYPE_IF_MATCH(str, DT_STR); - RETURN_TYPE_IF_MATCH(str, DT_INT); - RETURN_TYPE_IF_MATCH(str, DT_POSINT); - RETURN_TYPE_IF_MATCH(str, DT_FLOAT); - RETURN_TYPE_IF_MATCH(str, DT_POSFLOAT); - RETURN_TYPE_IF_MATCH(str, DT_FILE); - RETURN_TYPE_IF_MATCH(str, DT_EXEC); - RETURN_TYPE_IF_MATCH(str, DT_FOLDER); - RETURN_TYPE_IF_MATCH(str, DT_DATE); - - util_abort("%s: Data type \"%s\" is unkown.\n", __func__, str); - return 0; -} -#undef RETURN_TYPE_IF_MATCH - - - -bool conf_data_string_is_dt( - const char * str) -{ - if( !strcmp(str, DT_STR_STRING )) return true; - else if(!strcmp(str, DT_INT_STRING )) return true; - else if(!strcmp(str, DT_POSINT_STRING )) return true; - else if(!strcmp(str, DT_FLOAT_STRING )) return true; - else if(!strcmp(str, DT_POSFLOAT_STRING )) return true; - else if(!strcmp(str, DT_FILE_STRING )) return true; - else if(!strcmp(str, DT_EXEC_STRING )) return true; - else if(!strcmp(str, DT_FOLDER_STRING )) return true; - else if(!strcmp(str, DT_DATE_STRING )) return true; - else return false; -} - - - -const char * conf_data_get_dt_name_ref( - dt_enum dt) -{ - switch(dt) - { - case(DT_STR): - return DT_STR_STRING; - case(DT_INT): - return DT_INT_STRING; - case(DT_POSINT): - return DT_POSINT_STRING; - case(DT_FLOAT): - return DT_FLOAT_STRING; - case(DT_POSFLOAT): - return DT_POSFLOAT_STRING; - case(DT_FILE): - return DT_FILE_STRING; - case(DT_EXEC): - return DT_EXEC_STRING; - case(DT_FOLDER): - return DT_FOLDER_STRING; - case(DT_DATE): - return DT_DATE_STRING; - default: - util_abort("%s: Internal error.\n", __func__); - return ""; - } -} - - - -bool conf_data_validate_string_as_dt_value( - dt_enum dt, - const char * str) -{ - if(str == NULL) - return false; - - switch(dt) - { - case(DT_STR): - return true; - case(DT_INT): - return util_sscanf_int(str, NULL); - case(DT_POSINT): - { - int val; - bool ok = util_sscanf_int(str, &val); - if(!ok) - return false; - else - return val > 0; - } - case(DT_FLOAT): - return util_sscanf_double(str, NULL); - case(DT_POSFLOAT): - { - double val; - bool ok = util_sscanf_double(str, &val); - if(!ok) - return false; - else - return val >= 0.0; - } - case(DT_FILE): - { - return util_file_exists(str); - } - case(DT_EXEC): - { - bool ok; - char * exec = util_alloc_PATH_executable(str); - ok = exec != NULL; - free(exec); - return ok; - } - case(DT_FOLDER): - { - return util_is_directory(str); - } - case(DT_DATE): - { - time_t date; - return util_sscanf_date_utc(str, &date); - } - default: - util_abort("%s: Internal error.\n", __func__); - } - return true; -} - - - - - -int conf_data_get_int_from_string( - dt_enum dt, - const char * str) -{ - int value = 0; - bool ok = true; - - switch(dt) - { - case(DT_INT): - ok = util_sscanf_int(str, &value); - break; - case(DT_POSINT): - ok = util_sscanf_int(str, &value); - break; - default: - ok = false; - } - - if(!ok) - util_abort("%s: Can not get an int from \"%s\".\n", - __func__, str); - - return value; -} - - - -double conf_data_get_double_from_string( - dt_enum dt, - const char * str) -{ - double value = 0; - bool ok = true; - - switch(dt) - { - case(DT_INT): - ok = util_sscanf_double(str, &value); - break; - case(DT_POSINT): - ok = util_sscanf_double(str, &value); - break; - case(DT_FLOAT): - ok = util_sscanf_double(str, &value); - break; - case(DT_POSFLOAT): - ok = util_sscanf_double(str, &value); - break; - default: - ok = false; - } - - if(!ok) - util_abort("%s: Can not get a double from \"%s\".\n", - __func__, str); - - return value; -} - - - -time_t conf_data_get_time_t_from_string( - dt_enum dt, - const char * str) -{ - time_t value = 0; - bool ok = true; - - switch(dt) - { - case(DT_DATE): - ok = util_sscanf_date_utc(str, &value); - break; - default: - ok = false; - } - - if(!ok) - util_abort("%s: Can not get a time_t from \"%s\".\n", - __func__, str); - return value; -} - - - diff --git a/ThirdParty/Ert/libconfig/src/conf_util.c b/ThirdParty/Ert/libconfig/src/conf_util.c deleted file mode 100644 index f634b784ad..0000000000 --- a/ThirdParty/Ert/libconfig/src/conf_util.c +++ /dev/null @@ -1,161 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'conf_util.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -#include -#include - -#include - - -/* - This function creates a string buffer from a file. Furthermore, if the strings in pad_keys are found in the buffer, - they are padded with a space before and after. - - I.e., if the file contains - - key=value - - and "=" is in pad_keys, then the buffer will read - - key = value -*/ -static -char * __conf_util_fscanf_alloc_token_buffer( - const char * file, - const char * comment, - int num_pad_keys, - const char ** pad_keys) -{ - char * buffer_wrk = basic_parser_fread_alloc_file_content( file , NULL /* quote_set */ , NULL /* delete_set */ , "--" /* Comment start*/ , "\n" /* Comment end */); - char ** padded_keys = util_calloc(num_pad_keys , sizeof * padded_keys); - for(int key_nr = 0; key_nr < num_pad_keys; key_nr++) - { - assert(pad_keys[key_nr] != NULL); - - int key_len = strlen(pad_keys[key_nr]); - padded_keys[key_nr] = util_calloc((key_len + 3) , sizeof * padded_keys[key_nr]); - padded_keys[key_nr][0] = ' '; - for(int i=0; i 0) - found = true; - else if(len_token == 0 && !quoted) - return NULL; - else if(len_token == 0 && quoted) - *buff_pos += 1; - } - - char * token = util_calloc( (len_token + 1) , sizeof * token); - memmove(token, *buff_pos, len_token); - token[len_token] = '\0'; - *buff_pos += len_token; - - if(quoted) - *buff_pos += 1; - - return token; -} diff --git a/ThirdParty/Ert/libconfig/src/config_content.c b/ThirdParty/Ert/libconfig/src/config_content.c deleted file mode 100644 index b96592b782..0000000000 --- a/ThirdParty/Ert/libconfig/src/config_content.c +++ /dev/null @@ -1,417 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA, Norway. - - The file 'config_content.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - - -#define CONFIG_CONTENT_TYPE_ID 6612520 - -struct config_content_struct { - UTIL_TYPE_ID_DECLARATION; - set_type * parsed_files; /* A set of config files whcih have been parsed - to protect against circular includes. */ - vector_type * nodes; - hash_type * items; - config_error_type * parse_errors; - subst_list_type * define_list; - char * config_file; - char * abs_path; - - config_root_path_type * invoke_path; - vector_type * path_elm_storage; - vector_type * path_elm_stack; - bool valid; -}; - - -UTIL_IS_INSTANCE_FUNCTION( config_content , CONFIG_CONTENT_TYPE_ID ) - -config_content_type * config_content_alloc() { - config_content_type * content = util_malloc( sizeof * content ); - UTIL_TYPE_ID_INIT( content , CONFIG_CONTENT_TYPE_ID ); - content->valid = false; - content->items = hash_alloc(); - content->nodes = vector_alloc_new(); - content->parse_errors = config_error_alloc(); - content->define_list = subst_list_alloc( NULL ); - content->parsed_files = set_alloc_empty(); - - content->path_elm_storage = vector_alloc_new(); - content->path_elm_stack = vector_alloc_new(); - - content->invoke_path = NULL; - content->config_file = NULL; - content->abs_path = NULL; - return content; -} - - -bool config_content_has_item( const config_content_type * content , const char * key) { - return hash_has_key( content->items , key ); -} - - -config_content_item_type * config_content_get_item( const config_content_type * content , const char * key) { - return hash_get( content->items , key ); -} - - -void config_content_add_item( config_content_type * content , const config_schema_item_type * schema_item , const config_path_elm_type * path_elm) { - - const char * kw = config_schema_item_get_kw( schema_item ); - config_content_item_type * content_item = config_content_item_alloc( schema_item , path_elm ); - hash_insert_hash_owned_ref( content->items , kw , content_item , config_content_item_free__ ); - -} - -void config_content_add_node( config_content_type * content , config_content_node_type * content_node ) { - vector_append_ref( content->nodes , content_node ); -} - - -void config_content_set_valid( config_content_type * content) { - content->valid = true; -} - -bool config_content_is_valid( const config_content_type * content ) { - return content->valid; -} - - -config_error_type * config_content_get_errors( const config_content_type * content) { - return content->parse_errors; -} - -void config_content_free( config_content_type * content ) { - vector_free( content->nodes ); - vector_free( content->path_elm_stack ); - vector_free( content->path_elm_storage ); - hash_free( content->items ); - config_error_free( content->parse_errors ); - subst_list_free( content->define_list ); - util_safe_free( content->config_file ); - util_safe_free( content->abs_path ); - set_free( content->parsed_files ); - if (content->invoke_path != NULL) - config_root_path_free( content->invoke_path ); - - free( content ); -} - -bool config_content_add_file( config_content_type * content , const char * config_file) { - return set_add_key( content->parsed_files , config_file); -} - -config_root_path_type * config_content_get_invoke_path( config_content_type * content ) { - return content->invoke_path; -} - - -void config_content_set_invoke_path( config_content_type * content) { - if (content->invoke_path != NULL) - config_root_path_free( content->invoke_path ); - content->invoke_path = config_root_path_alloc( NULL ); -} - - - -/*****************************************************************/ - -/* - Here comes some xxx_get() functions - many of them will fail if - the item has not been added in the right way (this is to ensure that - the xxx_get() request is unambigous. -*/ - - -/** - This function can be used to get the value of a config - parameter. But to ensure that the get is unambigous we set the - following requirements to the item corresponding to 'kw': - - * argc_minmax has been set to 1,1 - - If this is not the case - we die. -*/ - -/** - Assume we installed a key 'KEY' which occurs three times in the final - config file: - - KEY 1 2 3 - KEY 11 22 33 - KEY 111 222 333 - - - Now when accessing these values the occurence variable will - correspond to the linenumber, and the index will index along a line: - - config_iget_as_int( config , "KEY" , 0 , 2) => 3 - config_iget_as_int( config , "KEY" , 2 , 1) => 222 -*/ - -const char * config_content_iget( const config_content_type * content , const char * key , int occurence , int index) { - config_content_item_type * item = config_content_get_item(content , key); - return config_content_item_iget(item , occurence , index); -} - - -int config_content_iget_as_int( const config_content_type * content , const char * key , int occurence , int index) { - config_content_item_type * item = config_content_get_item(content , key); - return config_content_item_iget_as_int(item , occurence , index); -} - - -bool config_content_iget_as_bool( const config_content_type * content , const char * key , int occurence , int index) { - config_content_item_type * item = config_content_get_item(content , key); - return config_content_item_iget_as_bool(item , occurence , index); -} - - -double config_content_iget_as_double( const config_content_type * content , const char * key , int occurence , int index) { - config_content_item_type * item = config_content_get_item(content , key); - return config_content_item_iget_as_double(item , occurence , index); -} - -const char * config_content_iget_as_path( const config_content_type * content , const char * key , int occurence , int index) { - config_content_item_type * item = config_content_get_item(content , key); - config_content_node_type * node = config_content_item_iget_node( item , index ); - return config_content_node_iget_as_path(node , index); -} - - -/** - This function will return NULL is the item has not been set, - however it must be installed with config_add_schema_item(). -*/ - -const char * config_content_safe_iget(const config_content_type * content , const char *kw, int occurence , int index) { - const char * value = NULL; - - if (config_content_has_item( content , kw )) { - config_content_item_type * item = config_content_get_item(content , kw); - if (occurence < config_content_item_get_size( item )) { - config_content_node_type * node = config_content_item_iget_node( item , occurence ); - value = config_content_node_safe_iget( node , index ); - } - } - return value; -} - - -/** - Return the number of times a keyword has been set - dies on unknown - 'kw'. If the append_arg attribute has been set to false the - function will return 0 or 1 irrespective of how many times the item - has been set in the config file. -*/ - - -int config_content_get_occurences(const config_content_type * content, const char * kw) { - if (config_content_has_item( content , kw )) - return config_content_item_get_size( config_content_get_item(content , kw) ); - else - return 0; -} - - - -const config_content_node_type * config_content_iget_node( const config_content_type * content , int index) { - const config_content_node_type * node = vector_iget_const(content->nodes , index ); - return node; -} - - -int config_content_get_size(const config_content_type * content) { - return vector_get_size( content->nodes ); -} - -/*****************************************************************/ -/* All the get_value functions will operate on the last item which has - been set with a particular key value. So assuming the config file - looks like: - - KEY VALUE1 - KEY VALUE2 OPTIONAL - KEY 100 VALUE3 OPTIONAL ERROR - - these functions will all operate on the last line in the config file: - - KEY 100 VALUE3 OPTIONAL ERROR -*/ - - - -static config_content_node_type * config_content_get_value_node__( const config_content_type * config , const char * kw) { - config_content_node_type * node = config_content_get_value_node( config , kw ); - if (node == NULL) - util_abort("Tried to get value node from unset kw:%s \n",__func__ , kw ); - - return node; -} - -config_content_node_type * config_content_get_value_node( const config_content_type * content , const char * kw) { - config_content_item_type * item = config_content_get_item(content , kw); - config_content_node_type * node = config_content_item_get_last_node( item ); - config_content_node_assert_key_value( node ); - return node; -} - - -bool config_content_get_value_as_bool(const config_content_type * config , const char * kw) { - config_content_node_type * node = config_content_get_value_node__( config , kw ); - return config_content_node_iget_as_bool(node , 0); -} - -int config_content_get_value_as_int(const config_content_type * config , const char * kw) { - config_content_node_type * node = config_content_get_value_node__( config , kw ); - return config_content_node_iget_as_int(node , 0); -} - -double config_content_get_value_as_double(const config_content_type * config , const char * kw) { - config_content_node_type * node = config_content_get_value_node__( config , kw ); - return config_content_node_iget_as_double(node , 0); -} - -const char * config_content_get_value_as_path( const config_content_type * config , const char * kw) { - config_content_node_type * node = config_content_get_value_node__( config , kw ); - return config_content_node_iget_as_path(node , 0); -} - -const char * config_content_get_value_as_abspath( const config_content_type * config , const char * kw) { - config_content_node_type * node = config_content_get_value_node__( config , kw ); - return config_content_node_iget_as_abspath(node , 0); -} - -const char * config_content_get_value_as_relpath( const config_content_type * config , const char * kw) { - config_content_node_type * node = config_content_get_value_node__( config , kw ); - return config_content_node_iget_as_relpath(node , 0); -} - - -const char * config_content_get_value(const config_content_type * config , const char * kw) { - config_content_node_type * node = config_content_get_value_node__( config , kw ); - return config_content_node_iget(node , 0); -} - -/*****************************************************************/ - -char * config_content_alloc_joined_string(const config_content_type * content , const char * kw, const char * sep) { - config_content_item_type * item = config_content_get_item(content , kw); - return config_content_item_alloc_joined_string(item , sep); -} - - -/** - This function allocates a new stringlist containing *ALL* the - arguements for an item. With reference to the illustrated example at - the top the function call: - - config_alloc_complete_strtinglist(config , "KEY1"); - - would produce the list: ("ARG1" "ARG2" "ARG2" "VERBOSE"), i.e. the - arguments for the various occurences of "KEY1" are collapsed to one - stringlist. -*/ - - -stringlist_type * config_content_alloc_complete_stringlist(const config_content_type * content , const char * kw) { - bool copy = true; - config_content_item_type * item = config_content_get_item(content , kw); - return config_content_item_alloc_complete_stringlist(item , copy); -} - - - -const stringlist_type * config_content_iget_stringlist_ref(const config_content_type * content , const char * kw, int occurence) { - config_content_item_type * item = config_content_get_item(content , kw); - - return config_content_item_iget_stringlist_ref(item , occurence); -} - -void config_content_add_define( config_content_type * content , const char * key , const char * value ) { - subst_list_append_copy( content->define_list , key , value , NULL ); -} - -subst_list_type * config_content_get_define_list( config_content_type * content ) { - return content->define_list; -} - - -/*****************************************************************/ - -void config_content_set_config_file( config_content_type * content , const char * config_file ) { - content->config_file = util_realloc_string_copy( content->config_file , config_file ); - - util_safe_free(content->abs_path); - content->abs_path = util_alloc_abs_path( config_file ); -} - - - -const char * config_content_get_config_file( const config_content_type * content , bool abs_path ) { - if (abs_path) - return content->abs_path; - else - return content->config_file; -} - - -config_path_elm_type * config_content_add_path_elm( config_content_type * content , const char * path ) { - const config_path_elm_type * current_path_elm; - - if (vector_get_size( content->path_elm_stack ) == 0) - current_path_elm = NULL; - else - current_path_elm = vector_get_last_const(content->path_elm_stack); - - { - config_path_elm_type * new_path_elm; - - { - char * rel_path = NULL; - config_root_path_type * invoke_path = config_content_get_invoke_path( content ); - if (path != NULL) { - if (current_path_elm == NULL) - rel_path = util_alloc_rel_path( config_root_path_get_abs_path(invoke_path) , path); - else - rel_path = config_path_elm_alloc_relpath( current_path_elm , path ); - } - new_path_elm = config_path_elm_alloc( invoke_path , rel_path ); - util_safe_free( rel_path ); - } - vector_append_owned_ref( content->path_elm_storage , new_path_elm , config_path_elm_free__); - vector_append_ref( content->path_elm_stack , new_path_elm ); - return new_path_elm; - } -} - -void config_content_pop_path_stack( config_content_type * content ) { - vector_pop_back( content->path_elm_stack ); -} diff --git a/ThirdParty/Ert/libconfig/src/config_content_item.c b/ThirdParty/Ert/libconfig/src/config_content_item.c deleted file mode 100644 index b6d4873f30..0000000000 --- a/ThirdParty/Ert/libconfig/src/config_content_item.c +++ /dev/null @@ -1,293 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'config_content_item.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - - -#define CONFIG_CONTENT_ITEM_ID 8876752 -struct config_content_item_struct { - UTIL_TYPE_ID_DECLARATION; - const config_schema_item_type * schema; - vector_type * nodes; - const config_path_elm_type * path_elm; -}; - - - - - - - - -/*****************************************************************/ - -/** - This function counts the number of times a config item has been - set. Referring again to the example at the top: - - config_content_item_get_occurences( "KEY1" ) - - will return 2. -*/ - - - -int config_content_item_get_size(const config_content_item_type * item) { - return vector_get_size( item->nodes ); -} - - -config_content_node_type * config_content_item_get_last_node(const config_content_item_type * item) { - return vector_get_last( item->nodes ); -} - -config_content_node_type * config_content_item_iget_node(const config_content_item_type * item , int index) { - return vector_iget( item->nodes , index ); -} - -const config_content_node_type * config_content_item_get_last_node_const(const config_content_item_type * item) { - return vector_get_last( item->nodes ); -} - -const config_content_node_type * config_content_item_iget_node_const(const config_content_item_type * item , int index) { - return vector_iget( item->nodes , index ); -} - - -char * config_content_item_ialloc_joined_string(const config_content_item_type * item , const char * sep , int occurence) { - const config_content_node_type * node = config_content_item_iget_node(item , occurence); - return config_content_node_alloc_joined_string(node , sep); -} - - - -char * config_content_item_alloc_joined_string(const config_content_item_type * item , const char * sep) { - const int occurences = config_content_item_get_size( item ); - char * joined_string = NULL; - - for (int i =0; i < occurences ; i++) { - char * element = config_content_item_ialloc_joined_string(item , sep , i); - joined_string = util_strcat_realloc( joined_string , element); - if (i < (occurences - 1)) - joined_string = util_strcat_realloc( joined_string , sep ); - free( element ); - } - - return joined_string; -} - -const stringlist_type * config_content_item_iget_stringlist_ref(const config_content_item_type * item, int occurence) { - const config_content_node_type * node = config_content_item_iget_node(item , occurence); - return config_content_node_get_stringlist( node ); -} - - -const stringlist_type * config_content_item_get_stringlist_ref(const config_content_item_type * item) { - const config_content_node_type * node = config_content_item_get_last_node( item ); - return config_content_node_get_stringlist( node ); -} - - -/** - If copy == false - the stringlist will break down when/if the - config object is freed - your call. -*/ - -stringlist_type * config_content_item_alloc_complete_stringlist(const config_content_item_type * item, bool copy) { - int inode; - stringlist_type * stringlist = stringlist_alloc_new(); - for (inode = 0; inode < vector_get_size( item->nodes ); inode++) { - const config_content_node_type * node = config_content_item_iget_node(item , inode); - const stringlist_type * src_list = config_content_node_get_stringlist( node ); - - if (copy) - stringlist_append_stringlist_copy( stringlist , src_list ); - else - stringlist_append_stringlist_ref( stringlist , src_list ); - - } - - return stringlist; -} - - -/** - If copy == false - the stringlist will break down when/if the - config object is freed - your call. -*/ - -stringlist_type * config_content_item_alloc_stringlist(const config_content_item_type * item, bool copy) { - const config_content_node_type * node = config_content_item_get_last_node( item ); - stringlist_type * stringlist = stringlist_alloc_new(); - const stringlist_type * src_list = config_content_node_get_stringlist( node ); - - if (copy) - stringlist_append_stringlist_copy( stringlist , src_list ); - else - stringlist_append_stringlist_ref( stringlist , src_list ); - - return stringlist; -} - - -/** - If copy == false - the hash will break down when/if the - config object is freed - your call. -*/ - -hash_type * config_content_item_alloc_hash(const config_content_item_type * item , bool copy) { - hash_type * hash = hash_alloc(); - if (item != NULL) { - int inode; - for (inode = 0; inode < vector_get_size( item->nodes ); inode++) { - const config_content_node_type * node = config_content_item_iget_node(item , inode); - const stringlist_type * src_list = config_content_node_get_stringlist( node ); - const char * key = stringlist_iget(src_list , 0); - const char * value = stringlist_iget(src_list , 1); - - if (copy) { - hash_insert_hash_owned_ref(hash , - key , - util_alloc_string_copy(value) , - free); - } else - hash_insert_ref(hash , key , value ); - - } - } - return hash; -} - - -/******************************************************************/ - - - - -const char * config_content_item_iget(const config_content_item_type * item , int occurence , int index) { - const config_content_node_type * node = config_content_item_iget_node(item , occurence); - const stringlist_type * src_list = config_content_node_get_stringlist( node ); - return stringlist_iget( src_list , index ); -} - -bool config_content_item_iget_as_bool(const config_content_item_type * item, int occurence , int index) { - bool value; - config_schema_item_assure_type(item->schema , index , CONFIG_BOOL); - util_sscanf_bool( config_content_item_iget(item , occurence ,index) , &value ); - return value; -} - - - - -int config_content_item_iget_as_int(const config_content_item_type * item, int occurence , int index) { - int value; - config_schema_item_assure_type(item->schema , index , CONFIG_INT); - util_sscanf_int( config_content_item_iget(item , occurence , index) , &value ); - return value; -} - - -double config_content_item_iget_as_double(const config_content_item_type * item, int occurence , int index) { - double value; - config_schema_item_assure_type(item->schema , index , CONFIG_FLOAT); - util_sscanf_double( config_content_item_iget(item , occurence , index) , &value ); - return value; -} - - -/** - Used to reset an item is the special string 'CLEAR_STRING' - is found as the only argument: - - OPTION V1 - OPTION V2 V3 V4 - OPTION __RESET__ - OPTION V6 - - In this case OPTION will get the value 'V6'. The example given - above is a bit contrived; this option is designed for situations - where several config files are parsed serially; and the user can - not/will not update the first. -*/ - -void config_content_item_clear( config_content_item_type * item ) { - vector_clear( item->nodes ); -} - - - -void config_content_item_free( config_content_item_type * item ) { - vector_free( item->nodes ); - free(item); -} - - - -UTIL_SAFE_CAST_FUNCTION( config_content_item , CONFIG_CONTENT_ITEM_ID) -UTIL_IS_INSTANCE_FUNCTION( config_content_item , CONFIG_CONTENT_ITEM_ID) - - -void config_content_item_free__( void * arg ) { - config_content_item_type * content_item = config_content_item_safe_cast( arg ); - config_content_item_free( content_item ); -} - - -config_content_item_type * config_content_item_alloc( const config_schema_item_type * schema , const config_path_elm_type * path_elm) { - config_content_item_type * content_item = util_malloc( sizeof * content_item ); - UTIL_TYPE_ID_INIT( content_item , CONFIG_CONTENT_ITEM_ID ); - content_item->schema = schema; - content_item->nodes = vector_alloc_new(); - content_item->path_elm = path_elm; - return content_item; -} - - - - - -config_content_node_type * config_content_item_alloc_node( const config_content_item_type * item , const config_path_elm_type * path_elm) { - config_content_node_type * node = config_content_node_alloc( item->schema , path_elm ); - vector_append_owned_ref( item->nodes , node , config_content_node_free__); - return node; -} - - - -const config_schema_item_type * config_content_item_get_schema( const config_content_item_type * item ) { - return item->schema; -} - - - - -const config_path_elm_type * config_content_item_get_path_elm( const config_content_item_type * item ) { - return item->path_elm; -} diff --git a/ThirdParty/Ert/libconfig/src/config_content_node.c b/ThirdParty/Ert/libconfig/src/config_content_node.c deleted file mode 100644 index ba9673cb93..0000000000 --- a/ThirdParty/Ert/libconfig/src/config_content_node.c +++ /dev/null @@ -1,242 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'config_content_node.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include - -#include -#include -#include - -#include -#include -#include - - -#define CONFIG_CONTENT_NODE_ID 6752887 -struct config_content_node_struct { - UTIL_TYPE_ID_DECLARATION; - const config_schema_item_type * schema; - stringlist_type * stringlist; /* The values which have been set. */ - const config_path_elm_type * cwd; - stringlist_type * string_storage; -}; - - -static UTIL_SAFE_CAST_FUNCTION( config_content_node , CONFIG_CONTENT_NODE_ID ) - - - -config_content_node_type * config_content_node_alloc( const config_schema_item_type * schema , const config_path_elm_type * cwd) { - config_content_node_type * node = util_malloc(sizeof * node ); - UTIL_TYPE_ID_INIT( node , CONFIG_CONTENT_NODE_ID ); - node->stringlist = stringlist_alloc_new(); - node->cwd = cwd; - node->schema = schema; - node->string_storage = NULL; - return node; -} - - -void config_content_node_add_value(config_content_node_type * node , const char * value) { - stringlist_append_copy( node->stringlist , value); -} - - -void config_content_node_set(config_content_node_type * node , const stringlist_type * token_list) { - int argc = stringlist_get_size( token_list ) - 1; - for (int iarg=0; iarg < argc; iarg++) - config_content_node_add_value( node , stringlist_iget( token_list , iarg + 1)); -} - - - -char * config_content_node_alloc_joined_string(const config_content_node_type * node, const char * sep) { - return stringlist_alloc_joined_string(node->stringlist , sep); -} - - - -void config_content_node_free(config_content_node_type * node) { - stringlist_free(node->stringlist); - if (node->string_storage != NULL) - stringlist_free( node->string_storage ); - free(node); -} - - - -void config_content_node_free__(void * arg) { - config_content_node_type * node = config_content_node_safe_cast( arg ); - config_content_node_free( node ); -} - -static void config_content_node_push_string( config_content_node_type * node , char * string) { - if (node->string_storage == NULL) - node->string_storage = stringlist_alloc_new( ); - - stringlist_append_owned_ref( node->string_storage , string ); -} - -const char * config_content_node_get_full_string( config_content_node_type * node , const char * sep ) { - char * full_string = stringlist_alloc_joined_string(node->stringlist , sep); - config_content_node_push_string( node , full_string ); - return full_string; -} - -const char * config_content_node_iget(const config_content_node_type * node , int index) { - return stringlist_iget( node->stringlist , index ); -} - - -const char * config_content_node_safe_iget(const config_content_node_type * node , int index) { - if (index >= stringlist_get_size( node->stringlist )) - return NULL; - else - return stringlist_iget( node->stringlist , index ); -} - - -config_item_types config_content_node_iget_type( const config_content_node_type * node , int index) { - return config_schema_item_iget_type( node->schema , index ); -} - - -time_t config_content_node_iget_as_isodate(const config_content_node_type * node , int index) { - time_t value; - config_schema_item_assure_type(node->schema , index , CONFIG_ISODATE); - util_sscanf_isodate( config_content_node_iget(node , index) , &value ); - return value; -} - - -bool config_content_node_iget_as_bool(const config_content_node_type * node , int index) { - bool value; - config_schema_item_assure_type(node->schema , index , CONFIG_BOOL); - util_sscanf_bool( config_content_node_iget(node , index) , &value ); - return value; -} - - -int config_content_node_iget_as_int(const config_content_node_type * node , int index) { - int value; - config_schema_item_assure_type(node->schema , index , CONFIG_INT); - util_sscanf_int( config_content_node_iget(node , index) , &value ); - return value; -} - - - -double config_content_node_iget_as_double(const config_content_node_type * node , int index) { - double value; - config_schema_item_assure_type(node->schema , index , CONFIG_FLOAT + CONFIG_INT); - util_sscanf_double( config_content_node_iget(node , index) , &value ); - return value; -} - - - - -const char * config_content_node_iget_as_path(config_content_node_type * node , int index) { - config_schema_item_assure_type(node->schema , index , CONFIG_PATH + CONFIG_EXISTING_PATH); - { - const char * config_value = config_content_node_iget(node , index); - char * path_value = config_path_elm_alloc_path( node->cwd , config_value ); - config_content_node_push_string( node , path_value ); - - return path_value; - } -} - - -const char * config_content_node_iget_as_abspath( config_content_node_type * node , int index) { - config_schema_item_assure_type(node->schema , index , CONFIG_PATH + CONFIG_EXISTING_PATH); - { - const char * config_value = config_content_node_iget(node , index); - char * path_value = config_path_elm_alloc_abspath( node->cwd , config_value ); - config_content_node_push_string( node , path_value ); - - return path_value; - } -} - - -const char * config_content_node_iget_as_relpath( config_content_node_type * node , int index) { - config_schema_item_assure_type(node->schema , index , CONFIG_PATH + CONFIG_EXISTING_PATH); - { - const char * config_value = config_content_node_iget(node , index); - char * path_value = config_path_elm_alloc_relpath( node->cwd , config_value ); - config_content_node_push_string( node , path_value ); - - return path_value; - } -} - - -const stringlist_type * config_content_node_get_stringlist( const config_content_node_type * node ) { - return node->stringlist; -} - - -const char * config_content_node_get_kw( const config_content_node_type * node ) { - return config_schema_item_get_kw( node->schema ); -} - - - - -int config_content_node_get_size( const config_content_node_type * node ) { - return stringlist_get_size( node->stringlist ); -} - - -void config_content_node_assert_key_value( const config_content_node_type * node ) { - int argc_min , argc_max; - config_schema_item_get_argc( node->schema , &argc_min , &argc_max); - - if (!((argc_min == 1) && (argc_min == 1))) - util_abort("%s: item:%s before calling config_get_value() functions *without* index you must set argc_min == argc_max = 1 \n",__func__ , config_schema_item_get_kw( node->schema )); -} - - -const config_path_elm_type * config_content_node_get_path_elm( const config_content_node_type * node ) { - return node->cwd; -} - -/** - The node should contain elements of the type: - - KEY1:VALUE1 KEY2:Value2 XX Key3:Val3 Ignored - - Which will be inserted in the opt_hash dictionary as : {"KEY1" : - "VALUE1" , ... } Elements which do not conform to this syntax are - ignored. -*/ - - -void config_content_node_init_opt_hash( const config_content_node_type * node , hash_type * opt_hash , int elm_offset) { - int i; - for (i = elm_offset; i < config_content_node_get_size( node ); i++) - hash_add_option( opt_hash , config_content_node_iget( node , i )); -} - - -void config_content_node_fprintf( const config_content_node_type * node , FILE * stream ) { - fprintf(stream , "%s: {" , config_schema_item_get_kw( node->schema )); - stringlist_fprintf( node->stringlist , ", " , stream ); - fprintf(stream , "}\n"); -} diff --git a/ThirdParty/Ert/libconfig/src/config_error.c b/ThirdParty/Ert/libconfig/src/config_error.c deleted file mode 100644 index 9924e94b62..0000000000 --- a/ThirdParty/Ert/libconfig/src/config_error.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'config_error.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include - -#include -#include - -#include - -struct config_error_struct { - stringlist_type * error_list; -}; - - - -config_error_type * config_error_alloc() { - config_error_type * error = util_malloc( sizeof * error ); - error->error_list = stringlist_alloc_new(); - return error; -} - - -config_error_type * config_error_alloc_copy( const config_error_type * src_error) { - config_error_type * config_error = config_error_alloc(); - stringlist_deep_copy( config_error->error_list , src_error->error_list ); - return config_error; -} - - -bool config_error_equal( const config_error_type * error1 , const config_error_type * error2) { - return stringlist_equal( error1->error_list , error2->error_list ); -} - -void config_error_free( config_error_type * error ) { - stringlist_free( error->error_list ); - free( error ); -} - - - -void config_error_add( config_error_type * error , char * new_error) { - stringlist_append_copy( error->error_list , new_error ); -} - - - -void config_error_clear( config_error_type * error ) { - stringlist_clear( error->error_list ); -} - - -int config_error_count( const config_error_type * error ) { - return stringlist_get_size( error->error_list ); -} - - -const char * config_error_iget( const config_error_type * error , int index) { - return stringlist_iget( error->error_list , index ); -} - - -void config_error_fprintf( const config_error_type * error , bool add_count , FILE * stream ) { - int error_nr; - - for (error_nr = 0; error_nr < stringlist_get_size( error->error_list ); error_nr++) { - if (add_count) - fprintf(stream , " %02d: " , error_nr); - - fprintf( stream , "%s\n" , stringlist_iget( error->error_list , error_nr)); - } -} diff --git a/ThirdParty/Ert/libconfig/src/config_get.c b/ThirdParty/Ert/libconfig/src/config_get.c deleted file mode 100644 index ea331b7c06..0000000000 --- a/ThirdParty/Ert/libconfig/src/config_get.c +++ /dev/null @@ -1,103 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'config_get.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -/*****************************************************************/ -/* All the functions in this block will operate on the last item - which has been set with a particular key value. So assuming the - config file looks like: - - KEY VALUE1 - KEY VALUE2 OPTIONAL - KEY 100 VALUE3 OPTIONAL ERROR - - these functions will all operate on the last line in the config file: - - KEY 100 VALUE3 OPTIONAL ERROR -*/ - - -/*config_content_node_type * config_get_value_node( const config_parser_type * config , const char * kw) { - config_content_item_type * item = config_get_content_item(config , kw); - if (item != NULL) { - config_content_node_type * node = config_content_item_get_last_node( item ); - config_content_node_assert_key_value( node ); - return node; - } else - return NULL; // Will return NULL on unset keywords - must check NULL return value?! -} - -static config_content_node_type * config_get_value_node__( const config_parser_type * config , const char * kw) { - config_content_node_type * node = config_get_value_node( config , kw ); - if (node == NULL) - util_abort("Tried to get value node from unset kw:%s \n",__func__ , kw ); - - return node; -} - -bool config_get_value_as_bool(const config_parser_type * config , const char * kw) { - config_content_node_type * node = config_get_value_node__( config , kw ); - return config_content_node_iget_as_bool(node , 0); -} - -int config_get_value_as_int(const config_parser_type * config , const char * kw) { - config_content_node_type * node = config_get_value_node__( config , kw ); - return config_content_node_iget_as_int(node , 0); -} - -double config_get_value_as_double(const config_parser_type * config , const char * kw) { - config_content_node_type * node = config_get_value_node__( config , kw ); - return config_content_node_iget_as_double(node , 0); -} - -const char * config_get_value_as_path( const config_parser_type * config , const char * kw) { - config_content_node_type * node = config_get_value_node__( config , kw ); - return config_content_node_iget_as_path(node , 0); -} - -const char * config_get_value_as_abspath( const config_parser_type * config , const char * kw) { - config_content_node_type * node = config_get_value_node__( config , kw ); - return config_content_node_iget_as_abspath(node , 0); -} - -const char * config_get_value_as_relpath( const config_parser_type * config , const char * kw) { - config_content_node_type * node = config_get_value_node__( config , kw ); - return config_content_node_iget_as_relpath(node , 0); -} - - -const char * config_get_value(const config_parser_type * config , const char * kw) { - config_content_node_type * node = config_get_value_node__( config , kw ); - return config_content_node_iget(node , 0); -} -*/ - -/*****************************************************************/ - - - - - - -int config_get_schema_size( const config_parser_type * config ) { - return hash_get_size( config->schema_items ); -} - - - - diff --git a/ThirdParty/Ert/libconfig/src/config_parser.c b/ThirdParty/Ert/libconfig/src/config_parser.c deleted file mode 100644 index 7afe49eee3..0000000000 --- a/ThirdParty/Ert/libconfig/src/config_parser.c +++ /dev/null @@ -1,716 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#define CLEAR_STRING "__RESET__" - - - -/** -Structure to parse configuration files of this type: - -KEYWORD1 ARG2 ARG2 ARG3 -KEYWORD2 ARG1-2 -.... -KEYWORDN ARG1 ARG2 - -A keyword can occure many times. - -*/ - - - -/** - - - ============================= - | config_type object | - | | - | Contains 'all' the | - | configuration information.| - | | - ============================= - | | - | \________________________ - | \ - KEY1 KEY2 - | | - \|/ \|/ - ========================= ========================= - | config_item object | | config_item object | - | | | | - | Indexed by a keyword | | Indexed by a keyword | - | which is the first | | which is the first | - | string in the | | string in the | - | config file. | | config file. | - | | | | - ========================= ========================= - | | | - | | | - \|/ \|/ \|/ -============================ ============================ ============================ -| config_item_node object | | config_item_node object | | config_item_node object | -| | | | | | -| Only containing the | | Only containing the | | Only containing the | -| stringlist object | | stringlist object | | stringlist object | -| directly parsed from the | | directly parsed from the | | directly parsed from the | -| file. | | file. | | file. | -|--------------------------| |--------------------------| |--------------------------| -| ARG1 ARG2 ARG3 | | VERBOSE | | DEBUG | -============================ ============================ ============================ - - -The example illustrated above would correspond to the following config -file (invariant under line-permutations): - -KEY1 ARG1 ARG2 ARG3 -KEY1 VERBOSE -KEY2 DEBUG - - -Example config file(2): - -OUTFILE filename -INPUT filename -OPTIONS store -OPTIONS verbose -OPTIONS optimize cache=1 - -In this case the whole config object will contain three items, -corresponding to the keywords OUTFILE, INPUT and OPTIONS. The two -first will again only contain one node each, whereas the OPTIONS item -will contain three nodes, corresponding to the three times the keyword -"OPTIONS" appear in the config file. -*/ - - - - - - - - - - - -struct config_parser_struct { - hash_type * schema_items; - hash_type * messages; /* Can print a (warning) message when a keyword is encountered. */ -}; - - - - - - - - - - - - - - - - - - -/* - The last argument (config_file) is only used for printing - informative error messages, and can be NULL. The config_cwd is - essential if we are looking up a filename, otherwise it can be NULL. - - Returns a string with an error description, or NULL if the supplied - arguments were OK. The string is allocated here, but is assumed that - calling scope will free it. -*/ - -static config_content_node_type * config_content_item_set_arg__(subst_list_type * define_list , - config_error_type * parse_errors , - config_content_item_type * item , - stringlist_type * token_list , - const config_path_elm_type * path_elm , - const char * config_file ) { - - config_content_node_type * new_node = NULL; - int argc = stringlist_get_size( token_list ) - 1; - - if (argc == 1 && (strcmp(stringlist_iget(token_list , 1) , CLEAR_STRING) == 0)) { - config_content_item_clear(item); - } else { - const config_schema_item_type * schema_item = config_content_item_get_schema( item ); - - /* Filtering based on DEFINE statements */ - if (subst_list_get_size( define_list ) > 0) { - int iarg; - for (iarg = 0; iarg < argc; iarg++) { - char * filtered_copy = subst_list_alloc_filtered_string( define_list , stringlist_iget(token_list , iarg + 1)); - stringlist_iset_owned_ref( token_list , iarg + 1 , filtered_copy); - } - } - - - /* Filtering based on environment variables */ - if (config_schema_item_expand_envvar( schema_item )) { - int iarg; - for (iarg = 0; iarg < argc; iarg++) { - int env_offset = 0; - while (true) { - char * env_var = util_isscanf_alloc_envvar( stringlist_iget(token_list , iarg + 1) , env_offset ); - if (env_var == NULL) - break; - - { - const char * env_value = getenv( &env_var[1] ); - if (env_value != NULL) { - char * new_value = util_string_replace_alloc( stringlist_iget( token_list , iarg + 1 ) , env_var , env_value ); - stringlist_iset_owned_ref( token_list , iarg + 1 , new_value ); - } else { - env_offset += 1; - fprintf(stderr,"** Warning: environment variable: %s is not defined \n", env_var); - } - } - - free( env_var ); - } - } - } - - { - if (config_schema_item_validate_set(schema_item , token_list , config_file, path_elm , parse_errors)) { - new_node = config_content_item_alloc_node( item , config_content_item_get_path_elm( item )); - config_content_node_set(new_node , token_list); - } - } - } - return new_node; -} - - - - - -/*****************************************************************/ - - - -config_parser_type * config_alloc() { - config_parser_type *config = util_malloc(sizeof * config ); - config->schema_items = hash_alloc(); - config->messages = hash_alloc(); - return config; -} - - - - - - - - - - -void config_free(config_parser_type * config) { - - hash_free(config->schema_items); - hash_free(config->messages); - - free(config); -} - - - -static void config_insert_schema_item(config_parser_type * config , const char * kw , const config_schema_item_type * item , bool ref) { - if (ref) - hash_insert_ref(config->schema_items , kw , item); - else - hash_insert_hash_owned_ref(config->schema_items , kw , item , config_schema_item_free__); -} - - -/** - This function allocates a simple item with all values - defaulted. The item is added to the config object, and a pointer is - returned to the calling scope. If you want to change the properties - of the item you can do that with config_schema_item_set_xxxx() functions - from the calling scope. -*/ - - -config_schema_item_type * config_add_schema_item(config_parser_type * config , - const char * kw, - bool required) { - - config_schema_item_type * item = config_schema_item_alloc( kw , required ); - config_insert_schema_item(config , kw , item , false); - return item; -} - - - -/** - This is a minor wrapper for adding an item with the properties. - - 1. It has argc_minmax = {1,1} - - The value can than be extracted with config_get_value() and - config_get_value_as_xxxx functions. -*/ - -config_schema_item_type * config_add_key_value( config_parser_type * config , const char * key , bool required , config_item_types item_type) { - config_schema_item_type * item = config_add_schema_item( config , key , required ); - config_schema_item_set_argc_minmax( item , 1 , 1 ); - config_schema_item_iset_type( item , 0 , item_type ); - return item; -} - - - -bool config_has_schema_item(const config_parser_type * config , const char * kw) { - return hash_has_key(config->schema_items , kw); -} - - -config_schema_item_type * config_get_schema_item(const config_parser_type * config , const char * kw) { - return hash_get(config->schema_items , kw); -} - -/* - Due to the possibility of aliases we must go through the canonical - keyword which is internalized in the schema_item. -*/ - - - - - - - - - -static void config_validate_content_item(const config_parser_type * config , config_content_type * content , const config_content_item_type * item) { - const config_schema_item_type * schema_item = config_content_item_get_schema( item ); - const char * schema_kw = config_schema_item_get_kw( schema_item ); - - { - int i; - for (i = 0; i < config_schema_item_num_required_children(schema_item); i++) { - const char * required_child = config_schema_item_iget_required_child( schema_item , i ); - if (!config_content_has_item(content , required_child)) { - char * error_message = util_alloc_sprintf("When:%s is set - you also must set:%s.",schema_kw , required_child); - config_error_add( config_content_get_errors( content ) , error_message ); - free( error_message ); - } - } - - if (config_schema_item_has_required_children_value( schema_item )) { - int inode; - for (inode = 0; inode < config_content_item_get_size(item); inode++) { - config_content_node_type * node = config_content_item_iget_node(item , inode); - const stringlist_type * values = config_content_node_get_stringlist( node ); - int is; - - for (is = 0; is < stringlist_get_size(values); is++) { - const char * value = stringlist_iget(values , is); - stringlist_type * required_children = config_schema_item_get_required_children_value( schema_item , value ); - - if (required_children != NULL) { - int ic; - for (ic = 0; ic < stringlist_get_size( required_children ); ic++) { - const char * req_child = stringlist_iget( required_children , ic ); - if (!config_content_has_item(content , req_child )) { - char * error_message = util_alloc_sprintf("When:%s is set to:%s - you also must set:%s.",schema_kw , value , req_child ); - config_error_add( config_content_get_errors( content ) , error_message ); - free( error_message ); - } - } - } - } - } - } - } -} - - - -static void config_validate(config_parser_type * config, config_content_type * content , const char * filename) { - int size = hash_get_size(config->schema_items); - char ** key_list = hash_alloc_keylist(config->schema_items); - int ikey; - for (ikey = 0; ikey < size; ikey++) { - const config_schema_item_type * schema_item = config_get_schema_item( config , key_list[ikey]); - const char * content_key = config_schema_item_get_kw( schema_item ); - if (config_content_has_item( content , content_key)) { - const config_content_item_type * item = config_content_get_item(content , content_key); - config_validate_content_item(config , content , item ); - } else { - if (config_schema_item_required( schema_item)) { /* The item is not set ... */ - char * error_message = util_alloc_sprintf("Item:%s must be set - parsing:%s",content_key , config_content_get_config_file( content , true )); - config_error_add( config_content_get_errors( content ) , error_message ); - free( error_message ); - } - } - } - util_free_stringlist(key_list , size); -} - - - - - - - -/** - This function parses the config file 'filename', and updated the - internal state of the config object as parsing proceeds. If - comment_string != NULL everything following 'comment_string' on a - line is discarded. - - include_kw is a string identifier for an include functionality, if - an include is encountered, the included file is parsed immediately - (through a recursive call to config_parse__). if include_kw == NULL, - include files are not supported. - - Observe that use of include, relative paths and all that shit is - quite tricky. The following is currently implemented: - - 1. The front_end function will split the path to the config file - in a path_name component and a file component. - - 2. Recursive calls to config_parse__() will keep control of the - parsers notion of cwd (note that the real OS'wise cwd never - changes), and every item is tagged with the config_cwd - currently active. - - 3. When an item has been entered with type CONFIG_FILE / - CONFIG_DIRECTORY / CONFIG_EXECUTABLE - the item is updated to - reflect to be relative (iff it is relative in the first place) - to the path of the root config file. - - These are not strict rules - it is possible to get other things to - work as well, but the problem is that it very quickly becomes - dependant on 'arbitrariness' in the parsing configuration. - - validate: whether we should validate when complete, that should - typically only be done at the last parsing. - - - define_kw: This a string which can serve as a "#define" for the - parsing. The define_kw keyword should have two arguments - a key - and a value. If the define_kw is present all __subsequent__ - occurences of 'key' are replaced with 'value'. alloc_new_key - is an optinal function (can be NULL) which is used to alloc a new - key, i.e. add leading and trailing 'magic' characters. - - - Example: - -------- - - char * add_angular_brackets(const char * key) { - char * new_key = util_alloc_sprintf("<%s>" , key); - } - - - - config_parse(... , "myDEF" , add_angular_brackets , ...) - - - Config file: - ------------- - myDEF Name BJARNE - myDEF sexual-pref Dogs - ... - ... - PERSON 28 - ... - ------------ - - After parsing we will have an entry: "NAME" , "Bjarne" , "28" , "Dogs". - - The key-value pairs internalized during the config parsing are NOT - returned to the calling scope in any way. -*/ - - -static void config_parse__(config_parser_type * config , - config_content_type * content , - path_stack_type * path_stack , - const char * config_input , - const char * comment_string , - const char * include_kw , - const char * define_kw , - config_schema_unrecognized_enum unrecognized, - bool validate) { - - /* Guard against circular includes. */ - { - char * abs_filename = util_alloc_realpath(config_input); - if (!config_content_add_file( content , abs_filename )) - util_exit("%s: file:%s already parsed - circular include ? \n",__func__ , abs_filename); - free( abs_filename ); - } - config_path_elm_type * current_path_elm; - - char * config_file; - { - /* Extract the path component of the current input file and chdir() */ - char * config_path; - { - char * config_base; - char * config_ext; - util_alloc_file_components( config_input , &config_path , &config_base , &config_ext); - config_file = util_alloc_filename( NULL , config_base , config_ext ); - free( config_base ); - util_safe_free( config_ext ); - } - current_path_elm = config_content_add_path_elm( content , config_path ); - path_stack_push_cwd( path_stack ); - if (config_path != NULL) { - util_chdir( config_path ); - free( config_path ); - } - } - - - { - const char * comment_end = comment_string ? "\n" : NULL; - basic_parser_type * parser = basic_parser_alloc(" \t" , "\"", NULL , NULL , comment_string , comment_end); - FILE * stream = util_fopen(config_file , "r"); - bool at_eof = false; - - while (!at_eof) { - int active_tokens; - stringlist_type * token_list; - char *line_buffer; - - - line_buffer = util_fscanf_alloc_line(stream , &at_eof); - if (line_buffer != NULL) { - token_list = basic_parser_tokenize_buffer(parser , line_buffer , true); - active_tokens = stringlist_get_size( token_list ); - - /* - util_split_string(line_buffer , " \t" , &tokens , &token_list); - active_tokens = tokens; - for (i = 0; i < tokens; i++) { - char * comment_ptr = NULL; - if(comment_string != NULL) - comment_ptr = strstr(token_list[i] , comment_string); - - if (comment_ptr != NULL) { - if (comment_ptr == token_list[i]) - active_tokens = i; - else - active_tokens = i + 1; - break; - } - } - */ - - if (active_tokens > 0) { - const char * kw = stringlist_iget( token_list , 0 ); - - /*Treating the include keyword. */ - if (include_kw != NULL && (strcmp(include_kw , kw) == 0)) { - if (active_tokens != 2) - util_abort("%s: keyword:%s must have exactly one argument. \n",__func__ ,include_kw); - { - const char *include_file = stringlist_iget( token_list , 1); - if (util_file_exists( include_file )) - config_parse__(config , content , path_stack , include_file , comment_string , include_kw , define_kw , unrecognized, false); /* Recursive call */ - else { - char * error_message = util_alloc_sprintf("%s file:%s not found" , include_kw , include_file); - config_error_add( config_content_get_errors( content ) , error_message ); - free( error_message ); - } - } - } else if ((define_kw != NULL) && (strcmp(define_kw , kw) == 0)) { - /* Treating the define keyword. */ - if (active_tokens < 3) - util_abort("%s: keyword:%s must have exactly one (or more) arguments. \n",__func__ , define_kw); - { - char * key = util_alloc_string_copy( stringlist_iget(token_list ,1) ); - char * value = stringlist_alloc_joined_substring( token_list , 2 , active_tokens , " "); - - { - char * filtered_value = subst_list_alloc_filtered_string( config_content_get_define_list( content ) , value); - config_content_add_define( content , key , filtered_value ); - free( filtered_value ); - } - free(key); - free(value); - } - } else { - if (hash_has_key(config->messages , kw)) - printf("%s \n", (const char *) hash_get(config->messages , kw)); - - if (!config_has_schema_item(config , kw)) { - if (unrecognized == CONFIG_UNRECOGNIZED_WARN) - fprintf(stderr,"** Warning keyword:%s not recognized when parsing:%s --- \n" , kw , config_input); - else if (unrecognized == CONFIG_UNRECOGNIZED_ERROR) { - char * error_message = util_alloc_sprintf("Keyword:%s is not recognized" , kw); - config_error_add( config_content_get_errors( content ) , error_message ); - free( error_message ); - } - } - - if (config_has_schema_item(config , kw)) { - config_schema_item_type * schema_item = config_get_schema_item( config , kw ); - char * config_cwd; - util_alloc_file_components( config_file , &config_cwd , NULL , NULL ); - - if (!config_content_has_item( content , kw )) - config_content_add_item( content , schema_item , current_path_elm); - - - { - subst_list_type * define_list = config_content_get_define_list( content ); - config_content_item_type * content_item = config_content_get_item( content , config_schema_item_get_kw( schema_item ) ); - config_content_node_type * new_node = config_content_item_set_arg__(define_list , config_content_get_errors( content ) , content_item , token_list , current_path_elm , config_file ); - if (new_node) - config_content_add_node( content , new_node ); - - } - } - } - } - stringlist_free(token_list); - free(line_buffer); - } - } - if (validate) - config_validate(config , content , config_file); - fclose(stream); - basic_parser_free( parser ); - } - free(config_file); - path_stack_pop( path_stack ); - config_content_pop_path_stack( content ); -} - - - - - - - - - - - - -config_content_type * config_parse(config_parser_type * config , - const char * filename, - const char * comment_string , - const char * include_kw , - const char * define_kw , - const hash_type * pre_defined_kw_map, - config_schema_unrecognized_enum unrecognized_behaviour, - bool validate) { - - config_content_type * content = config_content_alloc( ); - - if(pre_defined_kw_map != NULL) { - hash_iter_type * keys = hash_iter_alloc(pre_defined_kw_map); - - while(!hash_iter_is_complete(keys)) { - const char * key = hash_iter_get_next_key(keys); - const char * value = hash_get(pre_defined_kw_map, key); - config_content_add_define( content , key , value ); - } - - hash_iter_free(keys); - } -// - - if (util_file_readable( filename )) { - path_stack_type * path_stack = path_stack_alloc(); - { - config_content_set_config_file( content , filename ); - config_content_set_invoke_path( content ); - config_parse__(config , content , path_stack , filename , comment_string , include_kw , define_kw , unrecognized_behaviour , validate); - } - path_stack_free( path_stack ); - } else { - char * error_message = util_alloc_sprintf("Could not open file:%s for parsing" , filename); - config_error_add( config_content_get_errors( content ) , error_message ); - free( error_message ); - } - - if (config_error_count( config_content_get_errors( content ) ) == 0) - config_content_set_valid( content ); - - return content; -} - - - - -/*****************************************************************/ - - - - -/** - This function adds an alias to an existing item; so that the - value+++ of an item can be referred to by two different names. -*/ - - -void config_add_alias(config_parser_type * config , const char * src , const char * alias) { - if (config_has_schema_item(config , src)) { - config_schema_item_type * item = config_get_schema_item(config , src); - config_insert_schema_item(config , alias , item , true); - } else - util_abort("%s: item:%s not recognized \n",__func__ , src); -} - - - -void config_install_message(config_parser_type * config , const char * kw, const char * message) { - hash_insert_hash_owned_ref(config->messages , kw , util_alloc_string_copy(message) , free); -} - - - - -#include "config_get.c" - - diff --git a/ThirdParty/Ert/libconfig/src/config_path_elm.c b/ThirdParty/Ert/libconfig/src/config_path_elm.c deleted file mode 100644 index ec95f5a913..0000000000 --- a/ThirdParty/Ert/libconfig/src/config_path_elm.c +++ /dev/null @@ -1,135 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'config_path_elm.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include -#include -#include - -#include -#include - -#include -#include - -#define CONFIG_PATH_ELM_TYPE_ID 7100063 - -struct config_path_elm_struct { - UTIL_TYPE_ID_DECLARATION; - char * abs_path; // This will always be absolute - char * rel_path; // This will always be relative to the root path. - const config_root_path_type * root_path; -}; - -static UTIL_SAFE_CAST_FUNCTION( config_path_elm , CONFIG_PATH_ELM_TYPE_ID ) - - -config_path_elm_type * config_path_elm_alloc( const config_root_path_type * root_path , const char * path) { - if (root_path != NULL) { - config_path_elm_type * path_elm = util_malloc( sizeof * path_elm ); - UTIL_TYPE_ID_INIT(path_elm , CONFIG_PATH_ELM_TYPE_ID); - path_elm->root_path = root_path; - if (path == NULL) { - path_elm->rel_path = NULL; - path_elm->abs_path = util_alloc_string_copy( config_root_path_get_abs_path(root_path) ); - } else { - if (util_is_abs_path( path )) { - path_elm->abs_path = util_alloc_string_copy( path ); - path_elm->rel_path = util_alloc_rel_path( config_root_path_get_abs_path(root_path) , path ); - } else { - path_elm->abs_path = util_alloc_filename( config_root_path_get_abs_path(root_path) , path , NULL ); - path_elm->rel_path = util_alloc_string_copy( path ); - } - } - return path_elm; - } else { - util_abort("%s: root_path input argument == NULL - invalid \n",__func__); - return NULL; - } -} - - - - -void config_path_elm_free( config_path_elm_type * path_elm ) { - util_safe_free( path_elm->rel_path ); - util_safe_free( path_elm->abs_path ); - free( path_elm ); -} - - - -void config_path_elm_free__( void * arg ) { - config_path_elm_type * path_elm = config_path_elm_safe_cast( arg ); - config_path_elm_free( path_elm ); -} - -const config_root_path_type * config_path_elm_get_rootpath( const config_path_elm_type * path_elm ) { - return path_elm->root_path; -} - -const char * config_path_elm_get_relpath( const config_path_elm_type * path_elm ) { - return path_elm->rel_path; -} - -const char * config_path_elm_get_abspath( const config_path_elm_type * path_elm ) { - return path_elm->abs_path; -} - - -/*****************************************************************/ - - -char * config_path_elm_alloc_path(const config_path_elm_type * path_elm , const char * path) { - if (util_is_abs_path( path )) - return util_alloc_string_copy( path ); - else { - /* This will be relative or absolute depending on the relative/absolute - status of the root_path. */ - const char * input_root = config_root_path_get_input_path( path_elm->root_path ); - if (input_root == NULL) - return util_alloc_filename( path_elm->rel_path , path , NULL); - else - return util_alloc_joined_string( (const char *[3]) { input_root , path_elm->rel_path , path } , 3 , UTIL_PATH_SEP_STRING ); - } -} - - -char * config_path_elm_alloc_relpath(const config_path_elm_type * path_elm , const char * input_path) { - if (util_is_abs_path( input_path )) - return util_alloc_rel_path( config_root_path_get_rel_path( path_elm->root_path ) , input_path); - else { - char * abs_path = config_path_elm_alloc_abspath( path_elm , input_path ); - char * rel_path = util_alloc_rel_path( config_root_path_get_abs_path( path_elm->root_path ) , abs_path ); - free( abs_path ); - return rel_path; - } -} - - -char * config_path_elm_alloc_abspath(const config_path_elm_type * path_elm , const char * input_path) { - if (util_is_abs_path( input_path )) - return util_alloc_string_copy( input_path ); - else { - char * abs_path1 = util_alloc_filename( path_elm->abs_path , input_path , NULL ); - char * abs_path = util_alloc_realpath__( abs_path1 ); // The util_alloc_realpath__() will work also for nonexsting paths - free( abs_path1 ); - return abs_path; - } -} diff --git a/ThirdParty/Ert/libconfig/src/config_root_path.c b/ThirdParty/Ert/libconfig/src/config_root_path.c deleted file mode 100644 index 9a82d3adce..0000000000 --- a/ThirdParty/Ert/libconfig/src/config_root_path.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'config_root_path.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include -#include -#include - -#include - -#include - -struct config_root_path_struct { - char * input_path; - char * abs_path; - char * rel_path; -}; - - -/** - Input must be an existing directory, which will be used as the - root; or NULL in which case cwd will be used as root. The input - directory can be both realtive or absolute. -*/ - -config_root_path_type * config_root_path_alloc( const char * input_path ) { - if (input_path == NULL || util_is_directory( input_path )) { - config_root_path_type * root_path = util_malloc( sizeof * root_path ); - { - char * cwd = util_alloc_cwd(); - - root_path->input_path = util_alloc_string_copy( input_path ); - if (input_path == NULL) { - root_path->rel_path = NULL; - root_path->abs_path = util_alloc_string_copy( cwd ); - } else { - if (util_is_abs_path( input_path )) { - root_path->abs_path = util_alloc_string_copy( input_path ); - root_path->rel_path = util_alloc_rel_path( cwd , root_path->abs_path); - } else { - root_path->rel_path = util_alloc_string_copy( input_path ); - { - char * abs_path = util_alloc_filename( cwd , input_path , NULL ); - root_path->abs_path = util_alloc_realpath( abs_path ); - free( abs_path ); - } - } - } - free( cwd ); - } - return root_path; - } else - return NULL; -} - - -void config_root_path_free( config_root_path_type * root_path ) { - util_safe_free( root_path->rel_path ); - util_safe_free( root_path->abs_path ); - util_safe_free( root_path->input_path ); - free( root_path ); -} - -const char * config_root_path_get_input_path( const config_root_path_type * root_path ) { - return root_path->input_path; -} - - -const char * config_root_path_get_rel_path( const config_root_path_type * root_path ) { - return root_path->rel_path; -} - - -const char * config_root_path_get_abs_path( const config_root_path_type * root_path ) { - return root_path->abs_path; -} - - - - - diff --git a/ThirdParty/Ert/libconfig/src/config_schema_item.c b/ThirdParty/Ert/libconfig/src/config_schema_item.c deleted file mode 100644 index cc55fc61f6..0000000000 --- a/ThirdParty/Ert/libconfig/src/config_schema_item.c +++ /dev/null @@ -1,542 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'config_schema_item.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -typedef struct validate_struct validate_type; - -/** - This is a 'support-struct' holding various pieces of information - needed during the validation process. Observe the following about - validation: - - 1. It is atomic, in the sense that if you try to an item like this: - - KW ARG1 ARG2 ARG3 - - where ARG1 and ARG2 are valid, whereas there is something wrong - with ARG3, NOTHING IS SET. - - 2. Validation is a two-step process, the first step is run when an - item is parsed. This includes checking: - - o The number of argument. - o That the arguments have the right type. - o That the values match the selection set. - - The second validation step is done when the pasing is complete, - in this pass we check dependencies - i.e. required_children and - required_children_on_value. - - - Observe that nothing has-to be set in this struct. There are some dependencies: - - 1. Only _one_ of common_selection_set and indexed_selection_set - can be set. - - 2. If setting indexed_selection_set or type_map, you MUST set - argc_max first. -*/ - - -struct validate_struct { - int argc_min; /* The minimum number of arguments: -1 means no lower limit. */ - int argc_max; /* The maximum number of arguments: -1 means no upper limit. */ - set_type * common_selection_set; /* A selection set which will apply uniformly to all the arguments. */ - int_vector_type * type_map; /* A list of types for the items. Set along with argc_minmax(); */ - stringlist_type * required_children; /* A list of item's which must also be set (if this item is set). (can be NULL) */ - hash_type * required_children_value; /* A list of item's which must also be set - depending on the value of this item. (can be NULL) (This one is complex). */ - vector_type * indexed_selection_set; /* A vector of set_type instances which will apply for specific (indexed) arguments. */ -}; - - - - - -#define CONFIG_SCHEMA_ITEM_ID 6751 -struct config_schema_item_struct { - UTIL_TYPE_ID_DECLARATION; - char * kw; /* The kw which identifies this item */ - - - bool required_set; - stringlist_type * required_children; /* A list of item's which must also be set (if this item is set). (can be NULL) */ - hash_type * required_children_value; /* A list of item's which must also be set - depending on the value of this item. (can be NULL) */ - validate_type * validate; /* Information need during validation. */ - bool expand_envvar; /* Should environment variables like $HOME be expanded?*/ -}; - - -/*****************************************************************/ - - -/*****************************************************************/ -static void validate_set_default_type( validate_type * validate , config_item_types item_type) { - int_vector_set_default(validate->type_map , item_type); -} - -static validate_type * validate_alloc() { - validate_type * validate = util_malloc(sizeof * validate ); - validate->argc_min = CONFIG_DEFAULT_ARG_MIN; - validate->argc_max = CONFIG_DEFAULT_ARG_MAX; - validate->common_selection_set = NULL; - validate->indexed_selection_set = vector_alloc_new(); - validate->required_children = NULL; - validate->required_children_value = NULL; - validate->type_map = int_vector_alloc(0 , 0); - validate_set_default_type( validate , CONFIG_STRING ); - return validate; -} - - -static void validate_free(validate_type * validate) { - if (validate->common_selection_set != NULL) set_free(validate->common_selection_set); - - vector_free( validate->indexed_selection_set ); - int_vector_free( validate->type_map ); - if (validate->required_children != NULL) stringlist_free(validate->required_children); - if (validate->required_children_value != NULL) hash_free(validate->required_children_value); - free(validate); -} - - -static void validate_iset_type( validate_type * validate , int index , config_item_types type) { - int_vector_iset( validate->type_map , index , type); -} - - -static config_item_types validate_iget_type( const validate_type * validate , int index) { - return int_vector_safe_iget( validate->type_map , index ); -} - - -static void validate_set_argc_minmax(validate_type * validate , int argc_min , int argc_max) { - if (validate->argc_min != CONFIG_DEFAULT_ARG_MIN) - util_abort("%s: sorry - current implementation does not allow repeated calls to: %s \n",__func__ , __func__); - - if (argc_min == CONFIG_DEFAULT_ARG_MIN) - argc_min = 0; - - validate->argc_min = argc_min; - validate->argc_max = argc_max; - - if ((argc_max != CONFIG_DEFAULT_ARG_MAX) && (argc_max < argc_min)) - util_abort("%s invalid arg min/max values. argc_min:%d argc_max:%d \n",__func__ , argc_min , argc_max); - - { - int internal_type_size = 0; /* Should end up in the range [argc_min,argc_max] */ - - if (argc_max > 0) - internal_type_size = argc_max; - else - internal_type_size = argc_min; - } - -} - - - -static void validate_set_common_selection_set(validate_type * validate , int argc , const char ** argv) { - if (validate->common_selection_set != NULL) - set_free(validate->common_selection_set); - validate->common_selection_set = set_alloc( argc , argv ); -} - - -static set_type * validate_iget_selection_set( validate_type * validate , int index) { - return vector_safe_iget( validate->indexed_selection_set , index); -} - -static void validate_add_indexed_alternative(validate_type * validate , int index , const char * value) { - set_type * set = validate_iget_selection_set( validate , index ); - - if (!set) { - vector_safe_iset_owned_ref( validate->indexed_selection_set , index , set_alloc(0,NULL) , set_free__ ); - set = vector_safe_iget( validate->indexed_selection_set , index); - } - - set_add_key( set , value ); -} - - - -static void validate_set_indexed_selection_set(validate_type * validate , int index , int argc , const char ** argv) { - - if (validate->indexed_selection_set == NULL) - util_abort("%s: must call xxx_set_argc_minmax() first - aborting \n",__func__); - - if (index >= validate->argc_min) - util_abort("%s: When not not setting argc_max selection set can only be applied to indices up to argc_min\n",__func__); - - vector_safe_iset_owned_ref( validate->indexed_selection_set , index , set_alloc(argc,argv) , set_free__ ); -} - - -/*****************************************************************/ - - -static UTIL_SAFE_CAST_FUNCTION( config_schema_item , CONFIG_SCHEMA_ITEM_ID) - -void config_schema_item_assure_type(const config_schema_item_type * item , int index , int type_mask) { - bool OK = false; - - if (int_vector_safe_iget( item->validate->type_map , index) & type_mask) - OK = true; - - if (!OK) - util_abort("%s: failed - wrong installed type \n" , __func__); -} - - -config_schema_item_type * config_schema_item_alloc(const char * kw , bool required) { - config_schema_item_type * item = util_malloc(sizeof * item ); - UTIL_TYPE_ID_INIT( item , CONFIG_SCHEMA_ITEM_ID); - item->kw = util_alloc_string_copy(kw); - - item->required_set = required; - item->required_children = NULL; - item->required_children_value = NULL; - item->expand_envvar = true; /* Default is to expand $VAR expressions; can be turned off with - config_schema_item_set_envvar_expansion( item , false ); */ - item->validate = validate_alloc(); - return item; -} - - - -static char * __alloc_relocated__(const config_path_elm_type * path_elm , const char * value) { - char * file; - - if (util_is_abs_path(value)) - file = util_alloc_string_copy( value ); - else - file = util_alloc_filename(config_path_elm_get_relpath( path_elm ) , value , NULL); - - return file; -} - - -bool config_schema_item_validate_set(const config_schema_item_type * item , stringlist_type * token_list , const char * config_file, const config_path_elm_type * path_elm , config_error_type * error_list) { - bool OK = true; - int argc = stringlist_get_size( token_list ) - 1; - if (item->validate->argc_min >= 0) { - if (argc < item->validate->argc_min) { - OK = false; - { - char * error_message; - if (config_file != NULL) - error_message = util_alloc_sprintf("Error when parsing config_file:\"%s\" Keyword:%s must have at least %d arguments.",config_file , item->kw , item->validate->argc_min); - else - error_message = util_alloc_sprintf("Error:: Keyword:%s must have at least %d arguments.",item->kw , item->validate->argc_min); - - config_error_add( error_list , error_message ); - } - } - } - - if (item->validate->argc_max >= 0) { - if (argc > item->validate->argc_max) { - OK = false; - { - char * error_message; - - if (config_file != NULL) - error_message = util_alloc_sprintf("Error when parsing config_file:\"%s\" Keyword:%s must have maximum %d arguments.",config_file , item->kw , item->validate->argc_max); - else - error_message = util_alloc_sprintf("Error:: Keyword:%s must have maximum %d arguments.",item->kw , item->validate->argc_max); - - config_error_add( error_list , error_message ); - } - } - } - - /* - OK - now we have verified that the number of arguments is correct. Then - we start actually looking at the values. - */ - if (OK) { - /* Validating selection set - first common, then indexed */ - if (item->validate->common_selection_set) { - for (int iarg = 0; iarg < argc; iarg++) { - if (!set_has_key(item->validate->common_selection_set , stringlist_iget( token_list , iarg + 1))) { - config_error_add( error_list , util_alloc_sprintf("%s: is not a valid value for: %s.",stringlist_iget( token_list , iarg + 1) , item->kw)); - OK = false; - } - } - } else if (item->validate->indexed_selection_set != NULL) { - for (int iarg = 0; iarg < argc; iarg++) { - if ((item->validate->argc_max > 0) || (iarg < item->validate->argc_min)) { /* Without this test we might go out of range on the indexed selection set. */ - const set_type * selection_set = validate_iget_selection_set( item->validate , iarg); - if (selection_set) { - if (!set_has_key( selection_set, stringlist_iget( token_list , iarg + 1))) { - config_error_add( error_list , util_alloc_sprintf("%s: is not a valid value for item %d of \'%s\'.",stringlist_iget( token_list , iarg + 1) , iarg + 1 , item->kw)); - OK = false; - } - } - } - } - } - - /* - Observe that the following code might rewrite the content of - argv for arguments referring to path locations. - */ - - - /* Validate the TYPE of the various argumnents */ - { - for (int iarg = 0; iarg < argc; iarg++) { - const char * value = stringlist_iget(token_list , iarg + 1); - switch (validate_iget_type( item->validate , iarg)) { - case(CONFIG_STRING): /* This never fails ... */ - break; - case(CONFIG_ISODATE): - if (!util_sscanf_isodate( value , NULL )) - config_error_add( error_list , util_alloc_sprintf("Failed to parse:%s as an ISO date: YYYY-MM-DD.",value)); - break; - case(CONFIG_INT): - if (!util_sscanf_int( value , NULL )) - config_error_add( error_list , util_alloc_sprintf("Failed to parse:%s as an integer.",value)); - break; - case(CONFIG_FLOAT): - if (!util_sscanf_double( value , NULL )) { - config_error_add( error_list , util_alloc_sprintf("Failed to parse:%s as a floating point number.", value)); - OK = false; - } - break; - case(CONFIG_PATH): - // As long as we do not reuqire the path to exist it is just a string. - break; - case(CONFIG_EXISTING_PATH): - { - char * path = config_path_elm_alloc_abspath( path_elm , value ); - if (!util_entry_exists(path)) { - config_error_add( error_list , util_alloc_sprintf("Can not find entry %s in %s ",value , config_path_elm_get_relpath( path_elm) )); - OK = false; - } - free( path ); - } - break; - case(CONFIG_EXECUTABLE): - { - /* - 1. If the supplied value is an abolute path - do nothing. - 2. If the supplied is _not_ an absolute path: - - a. Try if the relocated exists - then use that. - b. Else - try if the util_alloc_PATH_executable() exists. - */ - if (!util_is_abs_path( value )) { - char * relocated = __alloc_relocated__(path_elm , value); - char * path_exe = util_alloc_PATH_executable( value ); - - if (util_file_exists(relocated)) { - if (util_is_executable(relocated)) - stringlist_iset_copy( token_list , iarg , relocated); - } else if (path_exe != NULL) - stringlist_iset_copy( token_list , iarg , path_exe); - else - config_error_add( error_list , util_alloc_sprintf("Could not locate executable:%s ", value)); - - free(relocated); - util_safe_free(path_exe); - } else { - if (!util_is_executable( value )) - config_error_add( error_list , util_alloc_sprintf("Could not locate executable:%s ", value)); - } - } - break; - case(CONFIG_BOOL): - if (!util_sscanf_bool( value , NULL )) { - config_error_add( error_list , util_alloc_sprintf("Failed to parse:%s as a boolean.", value)); - OK = false; - } - break; - case(CONFIG_BYTESIZE): - if (!util_sscanf_bytesize( value , NULL)) { - config_error_add( error_list , util_alloc_sprintf("Failed to parse:\"%s\" as number of bytes." , value)); - OK = false; - } - break; - default: - util_abort("%s: config_item_type:%d not recognized \n",__func__ , validate_iget_type(item->validate , iarg)); - } - } - } - } - return OK; -} - - -void config_schema_item_free( config_schema_item_type * item) { - free(item->kw); - if (item->required_children != NULL) stringlist_free(item->required_children); - if (item->required_children_value != NULL) hash_free(item->required_children_value); - validate_free(item->validate); - free(item); -} - - -void config_schema_item_free__ (void * void_item) { - config_schema_item_type * item = config_schema_item_safe_cast( void_item ); - config_schema_item_free( item ); -} - - - -void config_schema_item_set_required_children_on_value(config_schema_item_type * item , const char * value , stringlist_type * child_list) { - if (item->required_children_value == NULL) - item->required_children_value = hash_alloc(); - hash_insert_hash_owned_ref( item->required_children_value , value , stringlist_alloc_deep_copy(child_list) , stringlist_free__); -} - - - -/** - This function is used to set the minimum and maximum number of - arguments for an item. In addition you can pass in a pointer to an - array of config_schema_item_types values which will be used for validation - of the input. This vector must be argc_max elements long; it can be - NULL. -*/ - - -void config_schema_item_set_argc_minmax(config_schema_item_type * item , - int argc_min , - int argc_max) { - - validate_set_argc_minmax(item->validate , argc_min , argc_max); - -} - -void config_schema_item_iset_type( config_schema_item_type * item , int index , config_item_types type) { - validate_iset_type( item->validate , index , type ); -} - -void config_schema_item_set_default_type( config_schema_item_type * item , config_item_types type) { - validate_set_default_type( item->validate , type ); -} - - -config_item_types config_schema_item_iget_type(const config_schema_item_type * item , int index ) { - return validate_iget_type( item->validate , index ); -} - - - - -void config_schema_item_set_envvar_expansion( config_schema_item_type * item , bool expand_envvar ) { - item->expand_envvar = expand_envvar; -} - - - -void config_schema_item_set_common_selection_set(config_schema_item_type * item , int argc , const char ** argv) { - validate_set_common_selection_set(item->validate , argc , argv); -} - -void config_schema_item_set_indexed_selection_set(config_schema_item_type * item , int index , int argc , const char ** argv) { - validate_set_indexed_selection_set(item->validate , index , argc , argv); -} - -void config_schema_item_add_indexed_alternative(config_schema_item_type * item , int index , const char * value) { - validate_add_indexed_alternative(item->validate , index , value); -} - - - -void config_schema_item_set_required_children(config_schema_item_type * item , stringlist_type * stringlist) { - item->required_children = stringlist_alloc_deep_copy(stringlist); -} - -void config_schema_item_add_required_children(config_schema_item_type * item , const char * child_key) { - if (item->required_children == NULL) - item->required_children = stringlist_alloc_new(); - - stringlist_append_copy( item->required_children , child_key ); -} - - -int config_schema_item_num_required_children(const config_schema_item_type * item) { - if (item->required_children == NULL) - return 0; - else - return stringlist_get_size( item->required_children ); -} - - -const char * config_schema_item_iget_required_child( const config_schema_item_type * item , int index) { - return stringlist_iget( item->required_children , index ); -} - - -const char * config_schema_item_get_kw( const config_schema_item_type * item ) { - return item->kw; -} - - -bool config_schema_item_required( const config_schema_item_type * item ) { - return item->required_set; -} - - -bool config_schema_item_expand_envvar( const config_schema_item_type * item ) { - return item->expand_envvar; -} - - -void config_schema_item_get_argc( const config_schema_item_type * item , int *argc_min , int *argc_max) { - *argc_min = item->validate->argc_min; - *argc_max = item->validate->argc_max; -} - - - -bool config_schema_item_has_required_children_value( const config_schema_item_type * item ) { - if (item->required_children_value == NULL) - return false; - else - return true; -} - - - -stringlist_type * config_schema_item_get_required_children_value(const config_schema_item_type * item , const char * value) { - return hash_safe_get( item->required_children_value , value ); -} - - -/*****************************************************************/ -/* Small functions to support enum introspection. */ - diff --git a/ThirdParty/Ert/libconfig/src/testcase/test.txt b/ThirdParty/Ert/libconfig/src/testcase/test.txt deleted file mode 100644 index 075a883f95..0000000000 --- a/ThirdParty/Ert/libconfig/src/testcase/test.txt +++ /dev/null @@ -1,76 +0,0 @@ --- Dette er en OK kommentar. - - - - - -" " -HISTORY_OBSERVATION C-17:WOPR -{ - ERROR = 0.10; - ERROR_MODE = "rel"; - ERROR_MIN = 0.10; -}; - - - -HISTORY_OBSERVATION C-17:WGOR; -HISTORY_OBSERVATION C-17:WWCT; - - - - -SUMMARY_OBSERVATION SEP_TEST_2006 -{ - VALUE = 1; - ERROR = 0.1; --- DATE = 22/10/2006; --- DAYS = 100; - RESTART = 10; - KEY = GOPR:G4; -}; - - - -SUMMARY_OBSERVATION SEP_TEST_2007 -{ - VALUE = 1; - ERROR = 0.1; - RESTART = 10; - KEY = GOPR:G4; -}; - - - -BLOCK_OBSERVATION RFT_2005 -{ - DATE = 22/10/2005; - - OBS P1 { I=1; J=1; K=1; VALUE=10; ERROR=1;}; - OBS P2 { I=2; J=1; K=1; VALUE=10; ERROR=1;}; - OBS P3 { I=3; J=1; K=1; VALUE=10; ERROR=1;}; - OBS P4 { I=4; J=1; K=1; VALUE=10; ERROR=1;}; - OBS P5 { I=5; J=1; K=1; VALUE=10; ERROR=1;}; - OBS P6 { I=6; J=1; K=1; VALUE=10; ERROR=1;}; - OBS P7 { I=7; J=1; K=1; VALUE=10; ERROR=1;}; - OBS P8 { I=8; J=1; K=1; VALUE=10; ERROR=1;}; - OBS P9 { I=9; J=1; K=1; VALUE=10; ERROR=1;}; - OBS P10 { I=10; J=1; K=1; VALUE=10; ERROR=1;}; - OBS P11 { I=11; J=1; K=1; VALUE=10; ERROR=1;}; - OBS P12 { I=12; J=1; K=1; VALUE=10; ERROR=1;}; - - - FIELD = SWAT; -}; - -INTVEC = -[ -0 -1 -2 -3 -]; - -DOUBLEVEC = [0.1, 0.2, 10.1, 3.14]; - -SINGLETON svada; diff --git a/ThirdParty/Ert/libconfig/src/testcase/test2.txt b/ThirdParty/Ert/libconfig/src/testcase/test2.txt deleted file mode 100644 index b0f1e1a668..0000000000 --- a/ThirdParty/Ert/libconfig/src/testcase/test2.txt +++ /dev/null @@ -1,9 +0,0 @@ --- Dette er en OK kommentar. - - -HISTORY_OBSERVATION C-18:WOPR -{ - ERROR = 0.10; - ERROR_MODE = "rel"; - ERROR_MIN = 0.10; -}; diff --git a/ThirdParty/Ert/libconfig/tests/CMakeLists.txt b/ThirdParty/Ert/libconfig/tests/CMakeLists.txt deleted file mode 100644 index 456b59144b..0000000000 --- a/ThirdParty/Ert/libconfig/tests/CMakeLists.txt +++ /dev/null @@ -1,61 +0,0 @@ -add_executable( config_append_test config_append_test.c ) -target_link_libraries( config_append_test config test_util ) - -add_executable( config_node_test config_node_test.c ) -target_link_libraries( config_node_test config test_util ) - -add_executable( config_typeOK config_typeOK.c ) -target_link_libraries( config_typeOK config test_util ) - -add_executable( config_typeFail config_typeFail.c ) -target_link_libraries( config_typeFail config test_util ) - -add_executable( config_path_elm config_path_elm.c ) -target_link_libraries( config_path_elm config test_util ) - -add_executable( config_root_path config_root_path.c ) -target_link_libraries( config_root_path config test_util ) - -add_executable( config_include_test config_include_test.c) -target_link_libraries( config_include_test config test_util ) - -add_executable( config_content_node config_content_node.c) -target_link_libraries( config_content_node config test_util ) - -add_executable( config_content_item config_content_item.c) -target_link_libraries( config_content_item config test_util ) - -add_executable( config_argc config_argc.c) -target_link_libraries( config_argc config test_util ) - -add_executable( config_define config_define.c) -target_link_libraries( config_define config test_util ) - -add_executable( config_error config_error.c) -target_link_libraries( config_error config test_util ) -add_test( config_error ${EXECUTABLE_OUTPUT_PATH}/config_error ) - -add_executable( config_content config_content.c) -target_link_libraries( config_content config test_util ) -add_test( config_content ${EXECUTABLE_OUTPUT_PATH}/config_content ) - - -add_executable( config_config config_config.c) -target_link_libraries( config_config config test_util ) -add_test( config_config ${EXECUTABLE_OUTPUT_PATH}/config_config ) - -add_executable( config_schema_item config_schema_item.c) -target_link_libraries( config_schema_item config test_util ) -add_test( config_schema_item ${EXECUTABLE_OUTPUT_PATH}/config_schema_item ) - -add_test( config_typeOK ${EXECUTABLE_OUTPUT_PATH}/config_typeOK ${CMAKE_CURRENT_SOURCE_DIR}/data/type_testOK ) -add_test( config_typeFail ${EXECUTABLE_OUTPUT_PATH}/config_typeFail ${CMAKE_CURRENT_SOURCE_DIR}/data/type_testFail ) -add_test( config_append_test ${EXECUTABLE_OUTPUT_PATH}/config_append_test ${CMAKE_CURRENT_SOURCE_DIR}/data/append_test ) -add_test( config_node_test ${EXECUTABLE_OUTPUT_PATH}/config_node_test ${CMAKE_CURRENT_SOURCE_DIR}/data/append_test ) -add_test( config_define ${EXECUTABLE_OUTPUT_PATH}/config_define ${CMAKE_CURRENT_SOURCE_DIR}/data/define_test ) -add_test( config_path_elm ${EXECUTABLE_OUTPUT_PATH}/config_path_elm ) -add_test( config_content_node ${EXECUTABLE_OUTPUT_PATH}/config_content_node ) -add_test( config_content_item ${EXECUTABLE_OUTPUT_PATH}/config_content_item ${CMAKE_CURRENT_SOURCE_DIR}/data/content_item_test) -add_test( config_include_test ${EXECUTABLE_OUTPUT_PATH}/config_include_test ${CMAKE_CURRENT_SOURCE_DIR}/data include_test ) -add_test( config_root_path ${EXECUTABLE_OUTPUT_PATH}/config_root_path ${CMAKE_CURRENT_SOURCE_DIR}/data ) -add_test( config_argc ${EXECUTABLE_OUTPUT_PATH}/config_argc ${CMAKE_CURRENT_SOURCE_DIR}/data/argc_OK ${CMAKE_CURRENT_SOURCE_DIR}/data/argc_less ${CMAKE_CURRENT_SOURCE_DIR}/data/argc_more) diff --git a/ThirdParty/Ert/libconfig/tests/config_append_test.c b/ThirdParty/Ert/libconfig/tests/config_append_test.c deleted file mode 100644 index 4c89d18853..0000000000 --- a/ThirdParty/Ert/libconfig/tests/config_append_test.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'config_append_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include - -#include - -#include -#include - - - - -int main(int argc , char ** argv) { - const char * config_file = argv[1]; - config_parser_type * config = config_alloc(); - config_schema_item_type * item = config_add_schema_item(config , "APPEND" , false ); - config_schema_item_set_argc_minmax( item , 1 , 1); - - { - config_content_type * content = config_parse(config , config_file , "--" , NULL , NULL , NULL , false , true ); - test_assert_true(config_content_is_instance( content )); - test_assert_true(config_content_is_valid( content )); - test_assert_int_equal( config_content_get_occurences( content , "APPEND" ) , 3); - - { - const char * value = config_content_get_value( content , "APPEND"); - test_assert_string_equal( value , "VALUE3"); - } - - config_content_free( content ); - } - - { - config_content_type * content = config_parse( config , "DoesNotExist" , "--" , NULL , NULL , NULL , false , true); - test_assert_false( config_content_is_valid( content )); - config_content_free( content ); - } - exit(0); -} diff --git a/ThirdParty/Ert/libconfig/tests/config_argc.c b/ThirdParty/Ert/libconfig/tests/config_argc.c deleted file mode 100644 index 067023672e..0000000000 --- a/ThirdParty/Ert/libconfig/tests/config_argc.c +++ /dev/null @@ -1,90 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'config_argc.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include - -void install_SIGNALS(void) { - signal(SIGSEGV , util_abort_signal); /* Segmentation violation, i.e. overwriting memory ... */ - signal(SIGINT , util_abort_signal); /* Control C */ - signal(SIGTERM , util_abort_signal); /* If killing the program with SIGTERM (the default kill signal) you will get a backtrace. - Killing with SIGKILL (-9) will not give a backtrace.*/ -} - - - -int main(int argc , char ** argv) { - install_SIGNALS(); - { - const char * argc_OK = argv[1]; - const char * argc_less = argv[2]; - const char * argc_more = argv[3]; - - config_parser_type * config = config_alloc(); - config_schema_item_type * schema_item = config_add_schema_item( config , "ITEM" , false ); - config_schema_item_set_argc_minmax( schema_item , 2 , 2 ); - - { - config_content_type * content = config_parse( config , argc_OK , "--" , NULL , NULL , NULL , CONFIG_UNRECOGNIZED_ERROR , true); - test_assert_true( config_content_is_instance( content )); - test_assert_true(config_content_is_valid( content )); - config_content_free( content ); - } - - { - config_content_type * content = config_parse( config , argc_less , "--" , NULL , NULL , NULL , CONFIG_UNRECOGNIZED_ERROR , true); - test_assert_true( config_content_is_instance( content )); - test_assert_false( config_content_is_valid( content )); - - { - const config_error_type * config_error = config_content_get_errors( content ); - const char * error_msg = "Error when parsing config_file:\"argc_less\" Keyword:ITEM must have at least 2 arguments."; - - test_assert_int_equal( config_error_count( config_error ) , 1); - test_assert_string_equal( config_error_iget( config_error , 0 ) , error_msg); - } - config_content_free( content ); - } - - { - config_content_type * content = config_parse( config , argc_more , "--" , NULL , NULL , NULL , CONFIG_UNRECOGNIZED_ERROR , true); - test_assert_true( config_content_is_instance( content )); - test_assert_false( config_content_is_valid( content )); - { - const config_error_type * config_error = config_content_get_errors( content ); - const char * error_msg = "Error when parsing config_file:\"argc_more\" Keyword:ITEM must have maximum 2 arguments."; - - test_assert_int_equal( config_error_count( config_error ) , 1); - test_assert_string_equal( config_error_iget( config_error , 0 ) , error_msg); - } - config_content_free( content ); - } - - config_free( config ); - exit(0); - } -} diff --git a/ThirdParty/Ert/libconfig/tests/config_config.c b/ThirdParty/Ert/libconfig/tests/config_config.c deleted file mode 100644 index 8d10c89cf5..0000000000 --- a/ThirdParty/Ert/libconfig/tests/config_config.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'config_config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include - -#include -#include - - -int main(int argc , char ** argv) { - config_parser_type * config = config_alloc(); - config_add_schema_item( config , "KEYWORD" , false ); - config_free( config ); - exit(0); -} - diff --git a/ThirdParty/Ert/libconfig/tests/config_content.c b/ThirdParty/Ert/libconfig/tests/config_content.c deleted file mode 100644 index 6ce29004ed..0000000000 --- a/ThirdParty/Ert/libconfig/tests/config_content.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA, Norway. - - The file 'config_content.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include - -#include - - -void test_create() { - config_content_type * content = config_content_alloc( ); - test_assert_true( config_content_is_instance( content ) ); - config_content_free( content ); -} - - - - - - -int main( int argc , char ** argv) { - test_create(); -} diff --git a/ThirdParty/Ert/libconfig/tests/config_content_item.c b/ThirdParty/Ert/libconfig/tests/config_content_item.c deleted file mode 100644 index 0b8ab1aa41..0000000000 --- a/ThirdParty/Ert/libconfig/tests/config_content_item.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'config_content_item.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include - - -int main(int argc , char ** argv) { - const char * config_file = argv[1]; - config_parser_type * config = config_alloc(); - - config_add_schema_item( config , "SET" , true ); - config_add_schema_item( config , "NOTSET" , false ); - - { - config_content_type * content = config_parse( config , config_file , "--" , "INCLUDE" , NULL , NULL , CONFIG_UNRECOGNIZED_IGNORE , true ); - test_assert_true( config_content_is_instance( content )); - test_assert_true(config_content_is_valid( content )); - - test_assert_true( config_content_has_item( content , "SET" )); - test_assert_false( config_content_has_item( content , "NOTSET" ) ); - test_assert_false( config_content_has_item( content , "UNKNOWN" ) ); - - test_assert_true( config_has_schema_item( config , "SET" )); - test_assert_true( config_has_schema_item( config , "NOTSET" )); - test_assert_false( config_has_schema_item( config , "UNKNOWN" )); - - config_content_free( content ); - } - - exit(0); -} - diff --git a/ThirdParty/Ert/libconfig/tests/config_content_node.c b/ThirdParty/Ert/libconfig/tests/config_content_node.c deleted file mode 100644 index f7289f60de..0000000000 --- a/ThirdParty/Ert/libconfig/tests/config_content_node.c +++ /dev/null @@ -1,76 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'config_content_node.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - - -int main(int argc , char ** argv) { - config_schema_item_type * schema = config_schema_item_alloc("TEST" , true); - config_root_path_type * root_path = config_root_path_alloc( NULL ); - config_path_elm_type * cwd = config_path_elm_alloc( root_path , NULL ); - { - config_content_node_type * node = config_content_node_alloc( schema , cwd ); - config_content_node_add_value( node , "KEY1:VALUE1" ); - config_content_node_add_value( node , "KEY2:VALUE2" ); - config_content_node_add_value( node , "KEY3:VALUE3" ); - config_content_node_add_value( node , "KEYVALUE" ); - - test_assert_int_equal( config_content_node_get_size( node ) , 4 ); - test_assert_string_equal( config_content_node_iget( node , 0 ) , "KEY1:VALUE1" ); - test_assert_string_equal( config_content_node_iget( node , 2 ) , "KEY3:VALUE3" ); - - test_assert_string_equal( config_content_node_get_full_string( node , ",") , "KEY1:VALUE1,KEY2:VALUE2,KEY3:VALUE3,KEYVALUE"); - - { - hash_type * opt_hash = hash_alloc( ); - { - config_content_node_init_opt_hash( node , opt_hash , 0 ); - test_assert_int_equal( hash_get_size( opt_hash ) , 3 ); - test_assert_string_equal( hash_get( opt_hash , "KEY1" ) , "VALUE1" ); - test_assert_string_equal( hash_get( opt_hash , "KEY3" ) , "VALUE3" ); - } - - hash_clear( opt_hash ); - test_assert_int_equal( hash_get_size( opt_hash ) , 0 ); - config_content_node_init_opt_hash( node , opt_hash , 1 ); - test_assert_int_equal( hash_get_size( opt_hash ) , 2 ); - test_assert_string_equal( hash_get( opt_hash , "KEY2" ) , "VALUE2" ); - test_assert_string_equal( hash_get( opt_hash , "KEY3" ) , "VALUE3" ); - test_assert_false( hash_has_key( opt_hash , "KEY1" ) ); - test_assert_false( hash_has_key( opt_hash , "KEYVALUE" ) ); - hash_free( opt_hash ); - } - - - config_content_node_free( node ); - } - config_path_elm_free( cwd ); - config_root_path_free( root_path ); - config_schema_item_free( schema ); - exit(0); -} - diff --git a/ThirdParty/Ert/libconfig/tests/config_define.c b/ThirdParty/Ert/libconfig/tests/config_define.c deleted file mode 100644 index 386ab0c655..0000000000 --- a/ThirdParty/Ert/libconfig/tests/config_define.c +++ /dev/null @@ -1,80 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'config_define.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include - -void test_define(config_parser_type * config , const char * config_file) { - hash_type * pre_defined_kw_map = hash_alloc(); - hash_insert_string(pre_defined_kw_map, "", "TEST_VALUE"); - config_content_type * content = config_parse( config , config_file , NULL , NULL , "DEFINE" , pre_defined_kw_map , CONFIG_UNRECOGNIZED_IGNORE , true ); - hash_free(pre_defined_kw_map); - test_assert_true( config_content_is_instance( content )); - test_assert_true(config_content_is_valid( content )); - { - const subst_list_type * define_list = config_content_get_define_list( content ); - test_assert_true( subst_list_has_key( define_list , "VAR1")); - test_assert_true( subst_list_has_key( define_list , "VAR2")); - test_assert_true( subst_list_has_key( define_list , "VARX")); - test_assert_true( subst_list_has_key( define_list , "")); - test_assert_false( subst_list_has_key( define_list , "VARY")); - - - test_assert_string_equal( subst_list_get_value( define_list , "VAR1") , "100"); - test_assert_string_equal( subst_list_get_value( define_list , "VAR2") , "10"); - test_assert_string_equal( subst_list_get_value( define_list , "VARX") , "1"); - test_assert_string_equal( subst_list_get_value( define_list , "") , "TEST_VALUE"); - } - - config_content_free( content ); -} - - - -config_parser_type * config_create_schema() { - config_parser_type * config = config_alloc(); - - config_add_schema_item( config , "SET" , true ); - config_add_schema_item( config , "NOTSET" , false ); - - return config; -} - - -int main(int argc , char ** argv) { - util_install_signals(); - { - const char * config_file = argv[1]; - config_parser_type * config = config_create_schema(); - - test_define( config , config_file ); - - config_free( config ); - exit(0); - } -} - diff --git a/ThirdParty/Ert/libconfig/tests/config_error.c b/ThirdParty/Ert/libconfig/tests/config_error.c deleted file mode 100644 index 5312d937d9..0000000000 --- a/ThirdParty/Ert/libconfig/tests/config_error.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'config_error.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include - -#include - -int main(int argc , char ** argv) { - config_error_type * config_error = config_error_alloc(); - - { - config_error_type * error_copy = config_error_alloc_copy( config_error ); - - test_assert_true( config_error_equal( config_error , error_copy )); - test_assert_ptr_not_equal( config_error , error_copy ); - - config_error_free( error_copy ); - } - - config_error_free( config_error ); - exit(0); -} - diff --git a/ThirdParty/Ert/libconfig/tests/config_include_test.c b/ThirdParty/Ert/libconfig/tests/config_include_test.c deleted file mode 100644 index 593a34af5b..0000000000 --- a/ThirdParty/Ert/libconfig/tests/config_include_test.c +++ /dev/null @@ -1,135 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'config_include_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -void parse_test(config_parser_type * config , - const char * root_path , // The new working directory - the test will start by chdir() here. - const char * config_file ) { // The config_file, either as an absolute path - or relative from root_path - -#ifdef ERT_LINUX - const char * path0 = "PATH0"; - const char * path1 = "path/PATH1"; - const char * path2 = "path/PATH2"; - const char * path3 = "path/subpath/PATH3"; - const char * path4 = "path/subpath/subsubpath/PATH4"; -#endif - - - char * config_path, *config_rel_path,*config_abs_path; - path_stack_type * path_stack = path_stack_alloc(); - - util_alloc_file_components( config_file , &config_path , NULL , NULL); - path_stack_push( path_stack , NULL ); - if (root_path != NULL) - util_chdir( root_path ); - - config_abs_path = util_alloc_abs_path( config_path ); - config_rel_path = util_alloc_rel_path( NULL , config_abs_path); - - { - config_content_type * content = config_parse( config , config_file , "--" , "INCLUDE" , NULL , NULL , CONFIG_UNRECOGNIZED_IGNORE , true ); - if (config_content_is_valid( content )) { - - char * relpath0 = util_alloc_filename( config_rel_path , path0, NULL); - char * relpath1 = util_alloc_filename( config_rel_path , path1, NULL); - char * relpath2 = util_alloc_filename( config_rel_path , path2, NULL); - char * relpath3 = util_alloc_filename( config_rel_path , path3, NULL); - char * relpath4 = util_alloc_filename( config_rel_path , path4, NULL); - - char * abspath0 = util_alloc_filename( config_abs_path , path0, NULL); - char * abspath1 = util_alloc_filename( config_abs_path , path1, NULL); - char * abspath2 = util_alloc_filename( config_abs_path , path2, NULL); - char * abspath3 = util_alloc_filename( config_abs_path , path3, NULL); - char * abspath4 = util_alloc_filename( config_abs_path , path4, NULL); - - test_assert_string_equal(config_content_get_value_as_relpath(content , "PATH0") , relpath0 ); - test_assert_string_equal(config_content_get_value_as_relpath(content , "PATH1") , relpath1 ); - test_assert_string_equal(config_content_get_value_as_relpath(content , "PATH2") , relpath2 ); - test_assert_string_equal(config_content_get_value_as_relpath(content , "PATH3") , relpath3 ); - test_assert_string_equal(config_content_get_value_as_relpath(content , "PATH4") , relpath4 ); - - test_assert_string_equal(config_content_get_value_as_abspath(content , "PATH0") , abspath0 ); - test_assert_string_equal(config_content_get_value_as_abspath(content , "PATH1") , abspath1 ); - test_assert_string_equal(config_content_get_value_as_abspath(content , "PATH2") , abspath2 ); - test_assert_string_equal(config_content_get_value_as_abspath(content , "PATH3") , abspath3 ); - test_assert_string_equal(config_content_get_value_as_abspath(content , "PATH4") , abspath4 ); - - } else { - const config_error_type * error = config_content_get_errors( content ); - config_error_fprintf( error , true , stdout ); - test_error_exit("Hmm - parsing %s failed \n", config_file ); - } - config_content_free( content ); - } - path_stack_pop( path_stack ); -} - - -int main(int argc , char ** argv) { - const char * abs_path = argv[1]; - const char * config_file = argv[2]; - char * abs_config_file = util_alloc_filename( abs_path , config_file , NULL); - config_parser_type * config = config_alloc(); - - { - config_schema_item_type * schema_item; - - schema_item = config_add_schema_item( config , "PATH0" , true ); - config_schema_item_set_argc_minmax( schema_item , 1 , 1 ); - config_schema_item_iset_type( schema_item , 0 , CONFIG_PATH ); - - schema_item = config_add_schema_item( config , "PATH1" , true ); - config_schema_item_set_argc_minmax( schema_item , 1 , 1 ); - config_schema_item_iset_type( schema_item , 0 , CONFIG_PATH ); - - schema_item = config_add_schema_item( config , "PATH2" , true ); - config_schema_item_set_argc_minmax( schema_item , 1 , 1 ); - config_schema_item_iset_type( schema_item , 0 , CONFIG_PATH ); - - schema_item = config_add_schema_item( config , "PATH3" , true ); - config_schema_item_set_argc_minmax( schema_item , 1 , 1 ); - config_schema_item_iset_type( schema_item , 0 , CONFIG_PATH ); - - schema_item = config_add_schema_item( config , "PATH4" , true ); - config_schema_item_set_argc_minmax( schema_item , 1 , 1 ); - config_schema_item_iset_type( schema_item , 0 , CONFIG_PATH ); - } - - parse_test( config , abs_path , config_file ); - parse_test( config , abs_path , abs_config_file ); - parse_test( config , NULL , abs_config_file ); - parse_test( config , "../../" , abs_config_file ); - - config_free( config ); - exit(0); -} - - - - diff --git a/ThirdParty/Ert/libconfig/tests/config_node_test.c b/ThirdParty/Ert/libconfig/tests/config_node_test.c deleted file mode 100644 index 7f18c4fd7e..0000000000 --- a/ThirdParty/Ert/libconfig/tests/config_node_test.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'config_node_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include - -#include -#include - - - -int main(int argc , char ** argv) { - const char * config_file = argv[1]; - config_parser_type * config = config_alloc(); - { - config_schema_item_type * item = config_add_schema_item(config , "APPEND" , false ); - config_schema_item_set_argc_minmax( item , 1 , 1); - } - config_add_schema_item(config , "NEXT" , false ); - - config_content_type * content = config_parse(config , config_file , "--" , NULL , NULL , NULL , false , true ); - - if (config_content_is_valid( content )) { - if (config_content_get_size( content ) == 4) { - const config_content_node_type * node0 = config_content_iget_node( content , 0 ); - if (strcmp( config_content_node_get_kw( node0 ) , "APPEND") == 0) { - if (config_content_node_get_size(node0) == 1) { - const config_content_node_type * node3 = config_content_iget_node( content , 3 ); - if (strcmp( config_content_node_get_kw( node3 ) , "NEXT") == 0) { - if (config_content_node_get_size(node3) == 2) { - config_content_free( content ); - exit(0); - } else printf("Size error node3\n"); - } else printf("kw error node3 \n"); - } else printf("Size error node0\n"); - } else printf("kw error node0 kw:%s \n", config_content_node_get_kw( node0 )); - } else printf("Size error \n"); - } else printf("Parse error"); - - config_content_free( content ); - exit(1); -} - diff --git a/ThirdParty/Ert/libconfig/tests/config_path_elm.c b/ThirdParty/Ert/libconfig/tests/config_path_elm.c deleted file mode 100644 index e6b4ea50f1..0000000000 --- a/ThirdParty/Ert/libconfig/tests/config_path_elm.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'config_path_elm.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -int main(int argc , char ** argv) { -#ifdef ERT_LINUX - const char * rel_path = "rel/path"; - const char * rel_true = "rel/path/XXX"; - const char * path_true1 = "rel/path/XXX"; - - -#endif - test_work_area_type * work_area = test_work_area_alloc( "config_path_elm" ); - const char * root = test_work_area_get_cwd( work_area ); - char * abs_path = util_alloc_filename( root , "rel/path" , NULL); - char * abs_true = util_alloc_filename( root , "rel/path/XXX" , NULL); - char * path_true2 = util_alloc_filename( root , "rel/path/XXX" , NULL); - - util_chdir( test_work_area_get_original_cwd( work_area )); - config_root_path_type * root_path = config_root_path_alloc( root ); - { - config_path_elm_type * path_elm = config_path_elm_alloc( root_path , rel_path ); - - test_assert_string_equal( config_path_elm_get_relpath( path_elm ) , rel_path ); - test_assert_string_equal( config_path_elm_get_abspath( path_elm ) , abs_path ); - - test_assert_string_equal( config_path_elm_alloc_relpath( path_elm , "XXX" ) , rel_true); - test_assert_string_equal( config_path_elm_alloc_abspath( path_elm , "XXX" ) , abs_true); - test_assert_string_equal( config_path_elm_alloc_path( path_elm , "XXX" ) , path_true2 ); - - - config_path_elm_free( path_elm ); - } - { - config_path_elm_type * path_elm = config_path_elm_alloc( root_path , abs_path ); - - test_assert_string_equal( config_path_elm_get_relpath( path_elm ) , rel_path ); - test_assert_string_equal( config_path_elm_get_abspath( path_elm ) , abs_path ); - - test_assert_string_equal( config_path_elm_alloc_relpath( path_elm , "XXX" ) , rel_true); - test_assert_string_equal( config_path_elm_alloc_abspath( path_elm , "XXX" ) , abs_true); - test_assert_string_equal( config_path_elm_alloc_path( path_elm , "XXX" ) , path_true2 ); - - config_path_elm_free( path_elm ); - } - config_root_path_free( root_path ); - - util_chdir( root ); - root_path = config_root_path_alloc( NULL ); - { - config_path_elm_type * path_elm = config_path_elm_alloc( root_path , rel_path ); - - test_assert_string_equal( config_path_elm_get_relpath( path_elm ) , rel_path ); - test_assert_string_equal( config_path_elm_get_abspath( path_elm ) , abs_path ); - - test_assert_string_equal( config_path_elm_alloc_relpath( path_elm , "XXX" ) , rel_true); - test_assert_string_equal( config_path_elm_alloc_abspath( path_elm , "XXX" ) , abs_true); - test_assert_string_equal( config_path_elm_alloc_path( path_elm , "XXX" ) , path_true1 ); - - - config_path_elm_free( path_elm ); - } - - exit(0); -} - diff --git a/ThirdParty/Ert/libconfig/tests/config_root_path.c b/ThirdParty/Ert/libconfig/tests/config_root_path.c deleted file mode 100644 index 60bbe9be69..0000000000 --- a/ThirdParty/Ert/libconfig/tests/config_root_path.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'config_root_path.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include - -#include -#include - -#include -#include - - -int main(int argc , char ** argv) { - char * cwd = util_alloc_cwd(); - - { - config_root_path_type * root_path = config_root_path_alloc( NULL ); - - if (!test_check_string_equal( config_root_path_get_abs_path( root_path ) , cwd )) - test_error_exit("abs:path:%s expeceted:%s \n",config_root_path_get_abs_path( root_path ) , cwd ); - - if (!test_check_string_equal( config_root_path_get_input_path( root_path ) , NULL )) - test_error_exit("input:path:%s expeceted:%s \n",config_root_path_get_input_path( root_path ) , NULL ); - - if (!test_check_string_equal( config_root_path_get_rel_path( root_path ) , NULL )) - test_error_exit("rel:path:%s expeceted:%s \n",config_root_path_get_rel_path( root_path ) , NULL ); - - - config_root_path_free( root_path ); - } - - - { - config_root_path_type * root_path = config_root_path_alloc( "/does/not/exist" ); - if (root_path != NULL) - test_error_exit("Created root_path instance for not-existing input \n"); - } - - - - { - const char * input_path = argv[1]; - char * cwd = util_alloc_cwd(); - char * rel_path = util_alloc_rel_path( cwd , input_path ); - - config_root_path_type * root_path1 = config_root_path_alloc( input_path ); - config_root_path_type * root_path2 = config_root_path_alloc( rel_path ); - - if (!test_check_string_equal( config_root_path_get_rel_path( root_path1 ) , config_root_path_get_rel_path( root_path2 ))) - test_error_exit("Rel: %s != %s \n",config_root_path_get_rel_path( root_path1 ) , config_root_path_get_rel_path( root_path2)); - - if (!test_check_string_equal( config_root_path_get_abs_path( root_path1 ) , config_root_path_get_abs_path( root_path2 ))) - test_error_exit("Abs: %s != %s \n",config_root_path_get_abs_path( root_path1 ) , config_root_path_get_abs_path( root_path2 )); - - config_root_path_free( root_path1 ); - config_root_path_free( root_path2 ); - } - - - exit(0); -} - diff --git a/ThirdParty/Ert/libconfig/tests/config_schema_item.c b/ThirdParty/Ert/libconfig/tests/config_schema_item.c deleted file mode 100644 index 69dc55238c..0000000000 --- a/ThirdParty/Ert/libconfig/tests/config_schema_item.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'config_schema_item.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include - -#include - -#include - - - -int main(int argc , char ** argv) { - config_schema_item_type * schema_item = config_schema_item_alloc( "KW" , false ); - - test_assert_int_equal( config_schema_item_iget_type( schema_item , 1 ) , CONFIG_STRING ); - test_assert_int_equal( config_schema_item_iget_type( schema_item , 2 ) , CONFIG_STRING ); - - config_schema_item_iset_type( schema_item , 0 , CONFIG_INT ); - config_schema_item_iset_type( schema_item , 5 , CONFIG_BOOL ); - - - test_assert_int_equal( config_schema_item_iget_type( schema_item , 0 ) , CONFIG_INT ); - test_assert_int_equal( config_schema_item_iget_type( schema_item , 1 ) , CONFIG_STRING ); - test_assert_int_equal( config_schema_item_iget_type( schema_item , 2 ) , CONFIG_STRING ); - test_assert_int_equal( config_schema_item_iget_type( schema_item , 5 ) , CONFIG_BOOL ); - - config_schema_item_set_default_type( schema_item , CONFIG_FLOAT ); - test_assert_int_equal( config_schema_item_iget_type( schema_item , 7 ) , CONFIG_FLOAT ); - - config_schema_item_free( schema_item ); - exit(0); -} - diff --git a/ThirdParty/Ert/libconfig/tests/config_typeFail.c b/ThirdParty/Ert/libconfig/tests/config_typeFail.c deleted file mode 100644 index c3a113adf7..0000000000 --- a/ThirdParty/Ert/libconfig/tests/config_typeFail.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'config_parser_typeFail.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include - -#include - -#include -#include -#include - - -void error(char * msg) { - fprintf(stderr , msg); - exit(1); -} - - -int main(int argc , char ** argv) { - const char * config_file = argv[1]; - config_parser_type * config = config_alloc(); - { - config_schema_item_type * item = config_add_schema_item(config , "TYPES_KEY" , false ); - config_schema_item_set_argc_minmax( item , 4 , 4 ); - config_schema_item_iset_type( item , 0 , CONFIG_INT ); - config_schema_item_iset_type( item , 1 , CONFIG_FLOAT ); - config_schema_item_iset_type( item , 2 , CONFIG_BOOL ); - - item = config_add_schema_item( config , "SHORT_KEY" , false ); - config_schema_item_set_argc_minmax( item , 1 , 1 ); - - item = config_add_schema_item( config , "LONG_KEY" , false ); - config_schema_item_set_argc_minmax( item , 3 , CONFIG_DEFAULT_ARG_MAX); - } - - { - config_content_type * content = config_parse(config , config_file , "--" , NULL , NULL , NULL , false , true ); - - if (config_content_is_valid( content )) { - error("Parse error\n"); - } else { - const config_error_type * cerror = config_content_get_errors( content ); - if (config_error_count( cerror ) > 0) { - int i; - for (i=0; i < config_error_count( cerror ); i++) { - printf("Error %d: %s \n",i , config_error_iget( cerror , i )); - } - } - test_assert_int_equal( 5 , config_error_count( cerror )); - } - config_content_free( content ); - } - printf("OK \n"); - exit(0); -} - diff --git a/ThirdParty/Ert/libconfig/tests/config_typeOK.c b/ThirdParty/Ert/libconfig/tests/config_typeOK.c deleted file mode 100644 index e68c4e929c..0000000000 --- a/ThirdParty/Ert/libconfig/tests/config_typeOK.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'config_parser_typeOK.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include - -#include -#include -#include - - - - -int main(int argc , char ** argv) { - const char * config_file = argv[1]; - config_parser_type * config = config_alloc(); - { - config_schema_item_type * item = config_add_schema_item(config , "TYPE_KEY" , false ); - config_schema_item_set_argc_minmax( item , 4 , 4 ); - config_schema_item_iset_type( item , 0 , CONFIG_INT ); - config_schema_item_iset_type( item , 1 , CONFIG_FLOAT ); - config_schema_item_iset_type( item , 2 , CONFIG_BOOL ); - - item = config_add_schema_item( config , "SHORT_KEY" , false ); - config_schema_item_set_argc_minmax( item , 1 , 1 ); - - item = config_add_schema_item( config , "LONG_KEY" , false ); - config_schema_item_set_argc_minmax( item , 3 , CONFIG_DEFAULT_ARG_MAX ); - } - { - config_content_type * content = config_parse(config , config_file , "--" , NULL , NULL , NULL , false , true ); - test_assert_true( config_content_is_valid( content )); - config_content_free( content ); - } - - - exit(0); -} - diff --git a/ThirdParty/Ert/libconfig/tests/data/append_test b/ThirdParty/Ert/libconfig/tests/data/append_test deleted file mode 100644 index 8af962aaa2..0000000000 --- a/ThirdParty/Ert/libconfig/tests/data/append_test +++ /dev/null @@ -1,4 +0,0 @@ -APPEND VALUE1 -APPEND VALUE2 -APPEND VALUE3 -NEXT VALUE4 VALUE5 \ No newline at end of file diff --git a/ThirdParty/Ert/libconfig/tests/data/argc_OK b/ThirdParty/Ert/libconfig/tests/data/argc_OK deleted file mode 100644 index 771501c380..0000000000 --- a/ThirdParty/Ert/libconfig/tests/data/argc_OK +++ /dev/null @@ -1 +0,0 @@ -ITEM Arg1 Arg2 diff --git a/ThirdParty/Ert/libconfig/tests/data/argc_less b/ThirdParty/Ert/libconfig/tests/data/argc_less deleted file mode 100644 index 26c79f150b..0000000000 --- a/ThirdParty/Ert/libconfig/tests/data/argc_less +++ /dev/null @@ -1 +0,0 @@ -ITEM Arg1 diff --git a/ThirdParty/Ert/libconfig/tests/data/argc_more b/ThirdParty/Ert/libconfig/tests/data/argc_more deleted file mode 100644 index bd026bbdc4..0000000000 --- a/ThirdParty/Ert/libconfig/tests/data/argc_more +++ /dev/null @@ -1,2 +0,0 @@ -ITEM Arg1 ARG2 Arg3 - diff --git a/ThirdParty/Ert/libconfig/tests/data/content_item_test b/ThirdParty/Ert/libconfig/tests/data/content_item_test deleted file mode 100644 index 403ef6ae3e..0000000000 --- a/ThirdParty/Ert/libconfig/tests/data/content_item_test +++ /dev/null @@ -1 +0,0 @@ -SET SetValue diff --git a/ThirdParty/Ert/libconfig/tests/data/define_test b/ThirdParty/Ert/libconfig/tests/data/define_test deleted file mode 100644 index 6976c4853f..0000000000 --- a/ThirdParty/Ert/libconfig/tests/data/define_test +++ /dev/null @@ -1,5 +0,0 @@ -DEFINE VAR1 100 -DEFINE VAR2 10 -DEFINE VARX 1 - -SET VAR1 100 diff --git a/ThirdParty/Ert/libconfig/tests/data/include_test b/ThirdParty/Ert/libconfig/tests/data/include_test deleted file mode 100644 index 9717f9dcaf..0000000000 --- a/ThirdParty/Ert/libconfig/tests/data/include_test +++ /dev/null @@ -1,3 +0,0 @@ -PATH0 PATH0 -INCLUDE path/include1 -INCLUDE path/subpath/include2 \ No newline at end of file diff --git a/ThirdParty/Ert/libconfig/tests/data/path/include1 b/ThirdParty/Ert/libconfig/tests/data/path/include1 deleted file mode 100644 index 24c1ce46d0..0000000000 --- a/ThirdParty/Ert/libconfig/tests/data/path/include1 +++ /dev/null @@ -1,5 +0,0 @@ -PATH1 PATH1 -PATH2 PATH2 - -INCLUDE subpath/include3 -INCLUDE subpath/subsubpath/include4 \ No newline at end of file diff --git a/ThirdParty/Ert/libconfig/tests/data/path/subpath/include2 b/ThirdParty/Ert/libconfig/tests/data/path/subpath/include2 deleted file mode 100644 index df203e9835..0000000000 --- a/ThirdParty/Ert/libconfig/tests/data/path/subpath/include2 +++ /dev/null @@ -1 +0,0 @@ -PATH2 PATH2 \ No newline at end of file diff --git a/ThirdParty/Ert/libconfig/tests/data/path/subpath/include3 b/ThirdParty/Ert/libconfig/tests/data/path/subpath/include3 deleted file mode 100644 index 85a8dae08a..0000000000 --- a/ThirdParty/Ert/libconfig/tests/data/path/subpath/include3 +++ /dev/null @@ -1 +0,0 @@ -PATH3 PATH3 \ No newline at end of file diff --git a/ThirdParty/Ert/libconfig/tests/data/path/subpath/subsubpath/include4 b/ThirdParty/Ert/libconfig/tests/data/path/subpath/subsubpath/include4 deleted file mode 100644 index 9bb116f3a4..0000000000 --- a/ThirdParty/Ert/libconfig/tests/data/path/subpath/subsubpath/include4 +++ /dev/null @@ -1 +0,0 @@ -PATH4 PATH4 \ No newline at end of file diff --git a/ThirdParty/Ert/libconfig/tests/data/type_testFail b/ThirdParty/Ert/libconfig/tests/data/type_testFail deleted file mode 100644 index f54ebe9a10..0000000000 --- a/ThirdParty/Ert/libconfig/tests/data/type_testFail +++ /dev/null @@ -1,6 +0,0 @@ -TYPES_KEY 100 0.75 rue String -TYPES_KEY 100 0.75 True String -TYPES_KEY 100 0.75X True String -TYPES_KEY 100X 0.75 True String -SHORT_KEY 100 100 -LONG_KEY 100 100 diff --git a/ThirdParty/Ert/libconfig/tests/data/type_testOK b/ThirdParty/Ert/libconfig/tests/data/type_testOK deleted file mode 100644 index 7801b99a58..0000000000 --- a/ThirdParty/Ert/libconfig/tests/data/type_testOK +++ /dev/null @@ -1,4 +0,0 @@ -TYPES_KEY 100 0.75 True String -SHORT_KEY 100 -LONG_KEY 100 100 100 -LONG_KEY asc asc asc asc asc asc as asc sac asc sac sca sca sa sac \ No newline at end of file diff --git a/ThirdParty/Ert/libecl/applications/CMakeLists.txt b/ThirdParty/Ert/libecl/applications/CMakeLists.txt index fa498fa89c..1ebcfb0918 100644 --- a/ThirdParty/Ert/libecl/applications/CMakeLists.txt +++ b/ThirdParty/Ert/libecl/applications/CMakeLists.txt @@ -72,5 +72,10 @@ if (BUILD_ECL_SUMMARY) install(CODE "EXECUTE_PROCESS(COMMAND chmod g+w ${destination}/ecl_summary)") endif() endif() + + include(GNUInstallDirs) + install(FILES ${PROJECT_SOURCE_DIR}/docs/man/man1/ecl_summary.1 + DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) + endif() diff --git a/ThirdParty/Ert/libecl/applications/ecl_pack.c b/ThirdParty/Ert/libecl/applications/ecl_pack.c index 0dacd92249..34ae853cda 100644 --- a/ThirdParty/Ert/libecl/applications/ecl_pack.c +++ b/ThirdParty/Ert/libecl/applications/ecl_pack.c @@ -25,6 +25,7 @@ #include #include #include +#include @@ -67,7 +68,7 @@ int main(int argc, char ** argv) { if (target_type == ECL_UNIFIED_RESTART_FILE) { int dummy; - seqnum_kw = ecl_kw_alloc_new("SEQNUM" , 1 , ECL_INT_TYPE , &dummy); + seqnum_kw = ecl_kw_alloc_new("SEQNUM" , 1 , ECL_INT , &dummy); } { diff --git a/ThirdParty/Ert/libecl/applications/grdecl_grid.c b/ThirdParty/Ert/libecl/applications/grdecl_grid.c index e510ff8e45..f961118ef6 100644 --- a/ThirdParty/Ert/libecl/applications/grdecl_grid.c +++ b/ThirdParty/Ert/libecl/applications/grdecl_grid.c @@ -28,10 +28,10 @@ int main(int argc , char ** argv) { FILE * stream = util_fopen( argv[1] , "r"); - ecl_kw_type * gridhead_kw = ecl_kw_fscanf_alloc_grdecl_dynamic__( stream , SPECGRID_KW , false , ECL_INT_TYPE ); - ecl_kw_type * zcorn_kw = ecl_kw_fscanf_alloc_grdecl_dynamic( stream , ZCORN_KW , ECL_FLOAT_TYPE ); - ecl_kw_type * coord_kw = ecl_kw_fscanf_alloc_grdecl_dynamic( stream , COORD_KW , ECL_FLOAT_TYPE ); - ecl_kw_type * actnum_kw = ecl_kw_fscanf_alloc_grdecl_dynamic( stream , ACTNUM_KW , ECL_INT_TYPE ); + ecl_kw_type * gridhead_kw = ecl_kw_fscanf_alloc_grdecl_dynamic__( stream , SPECGRID_KW , false , ECL_INT ); + ecl_kw_type * zcorn_kw = ecl_kw_fscanf_alloc_grdecl_dynamic( stream , ZCORN_KW , ECL_FLOAT ); + ecl_kw_type * coord_kw = ecl_kw_fscanf_alloc_grdecl_dynamic( stream , COORD_KW , ECL_FLOAT ); + ecl_kw_type * actnum_kw = ecl_kw_fscanf_alloc_grdecl_dynamic( stream , ACTNUM_KW , ECL_INT ); { int nx = ecl_kw_iget_int( gridhead_kw , SPECGRID_NX_INDEX ); diff --git a/ThirdParty/Ert/libecl/applications/grdecl_test.c b/ThirdParty/Ert/libecl/applications/grdecl_test.c index a503f515b0..8e73a7db4c 100644 --- a/ThirdParty/Ert/libecl/applications/grdecl_test.c +++ b/ThirdParty/Ert/libecl/applications/grdecl_test.c @@ -32,7 +32,7 @@ int main(int argc , char ** argv) { while (true) { ecl_kw_type * grdecl_kw; timer_start( timer ); - grdecl_kw = ecl_kw_fscanf_alloc_current_grdecl( stream , ECL_FLOAT_TYPE ); + grdecl_kw = ecl_kw_fscanf_alloc_current_grdecl( stream , ECL_FLOAT ); timer_stop( timer ); if (grdecl_kw != NULL) { diff --git a/ThirdParty/Ert/libecl/applications/make_grid.c b/ThirdParty/Ert/libecl/applications/make_grid.c index 200cc4575e..a369b22ae9 100644 --- a/ThirdParty/Ert/libecl/applications/make_grid.c +++ b/ThirdParty/Ert/libecl/applications/make_grid.c @@ -48,7 +48,7 @@ int main(int argc, char ** argv) { char * EGRID_file = util_alloc_filename( path , basename , "EGRID"); printf("Writing file: %s ...",EGRID_file); fflush(stdout); - ecl_grid_fwrite_EGRID2( ecl_grid , EGRID_file, ERT_ECL_METRIC_UNITS); + ecl_grid_fwrite_EGRID2( ecl_grid , EGRID_file, ECL_METRIC_UNITS); free( EGRID_file ); } diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_coarse_cell.h b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_coarse_cell.h index 49046b794b..a69dc40045 100644 --- a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_coarse_cell.h +++ b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_coarse_cell.h @@ -27,7 +27,7 @@ extern "C" { typedef struct ecl_coarse_cell_struct ecl_coarse_cell_type; bool ecl_coarse_cell_equal( const ecl_coarse_cell_type * coarse_cell1 , const ecl_coarse_cell_type * coarse_cell2); - ecl_coarse_cell_type * ecl_coarse_cell_alloc( ); + ecl_coarse_cell_type * ecl_coarse_cell_alloc( void ); void ecl_coarse_cell_update( ecl_coarse_cell_type * coarse_cell , int i , int j , int k , int global_index ); void ecl_coarse_cell_free( ecl_coarse_cell_type * coarse_cell ); void ecl_coarse_cell_free__( void * arg ); diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_file.h b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_file.h index c0c1a682ff..d7186ada55 100644 --- a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_file.h +++ b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_file.h @@ -32,6 +32,7 @@ extern "C" { #include #include #include +#include @@ -76,11 +77,11 @@ extern "C" { ecl_file_kw_type * ecl_file_iget_file_kw( const ecl_file_type * file , int global_index); ecl_file_kw_type * ecl_file_iget_named_file_kw( const ecl_file_type * file , const char * kw, int ith); ecl_kw_type * ecl_file_iget_kw( const ecl_file_type * file , int global_index); - ecl_type_enum ecl_file_iget_type( const ecl_file_type * file , int global_index); + ecl_data_type ecl_file_iget_data_type( const ecl_file_type * file , int global_index); int ecl_file_iget_size( const ecl_file_type * file , int global_index); const char * ecl_file_iget_header( const ecl_file_type * file , int global_index); ecl_kw_type * ecl_file_iget_named_kw( const ecl_file_type * file , const char * kw, int ith); - ecl_type_enum ecl_file_iget_named_type( const ecl_file_type * file , const char * kw , int ith); + ecl_data_type ecl_file_iget_named_data_type( const ecl_file_type * file , const char * kw , int ith); int ecl_file_iget_named_size( const ecl_file_type * file , const char * kw , int ith); void ecl_file_indexed_read(const ecl_file_type * file , const char * kw, int index, const int_vector_type * index_map, char* buffer); diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_file_kw.h b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_file_kw.h index 0f9998ee17..bfd6b5e8e5 100644 --- a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_file_kw.h +++ b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_file_kw.h @@ -33,7 +33,7 @@ extern "C" { typedef struct ecl_file_kw_struct ecl_file_kw_type; typedef struct inv_map_struct inv_map_type; - inv_map_type * inv_map_alloc(); + inv_map_type * inv_map_alloc(void); ecl_file_kw_type * inv_map_get_file_kw( inv_map_type * inv_map , const ecl_kw_type * ecl_kw ); void inv_map_free( inv_map_type * map ); @@ -45,7 +45,7 @@ typedef struct inv_map_struct inv_map_type; ecl_file_kw_type * ecl_file_kw_alloc_copy( const ecl_file_kw_type * src ); const char * ecl_file_kw_get_header( const ecl_file_kw_type * file_kw ); int ecl_file_kw_get_size( const ecl_file_kw_type * file_kw ); - ecl_type_enum ecl_file_kw_get_type( const ecl_file_kw_type * file_kw); + ecl_data_type ecl_file_kw_get_data_type(const ecl_file_kw_type *); offset_type ecl_file_kw_get_offset(const ecl_file_kw_type * file_kw); bool ecl_file_kw_ptr_eq( const ecl_file_kw_type * file_kw , const ecl_kw_type * ecl_kw); void ecl_file_kw_replace_kw( ecl_file_kw_type * file_kw , fortio_type * target , ecl_kw_type * new_kw ); diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_file_view.h b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_file_view.h index e44d332919..8e363158da 100644 --- a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_file_view.h +++ b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_file_view.h @@ -25,6 +25,7 @@ #include #include +#include #ifdef __cplusplus @@ -63,11 +64,11 @@ typedef struct ecl_file_view_struct ecl_file_view_type; const char * ecl_file_view_iget_distinct_kw( const ecl_file_view_type * ecl_file_view , int index); int ecl_file_view_get_num_distinct_kw( const ecl_file_view_type * ecl_file_view ); int ecl_file_view_get_size( const ecl_file_view_type * ecl_file_view ); - ecl_type_enum ecl_file_view_iget_type( const ecl_file_view_type * ecl_file_view , int index); + ecl_data_type ecl_file_view_iget_data_type( const ecl_file_view_type * ecl_file_view , int index); int ecl_file_view_iget_size( const ecl_file_view_type * ecl_file_view , int index); const char * ecl_file_view_iget_header( const ecl_file_view_type * ecl_file_view , int index); ecl_kw_type * ecl_file_view_iget_named_kw( const ecl_file_view_type * ecl_file_view , const char * kw, int ith); - ecl_type_enum ecl_file_view_iget_named_type( const ecl_file_view_type * ecl_file_view , const char * kw , int ith); + ecl_data_type ecl_file_view_iget_named_data_type( const ecl_file_view_type * ecl_file_view , const char * kw , int ith); int ecl_file_view_iget_named_size( const ecl_file_view_type * ecl_file_view , const char * kw , int ith); void ecl_file_view_replace_kw( ecl_file_view_type * ecl_file_view , ecl_kw_type * old_kw , ecl_kw_type * new_kw , bool insert_copy); bool ecl_file_view_load_all( ecl_file_view_type * ecl_file_view ); diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_grav_common.h b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_grav_common.h index 1b7b6b6dd8..0efd3c7afb 100644 --- a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_grav_common.h +++ b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_grav_common.h @@ -30,6 +30,7 @@ extern "C" { bool * ecl_grav_common_alloc_aquifer_cell( const ecl_grid_cache_type * grid_cache , const ecl_file_type * init_file); double ecl_grav_common_eval_biot_savart( const ecl_grid_cache_type * grid_cache , ecl_region_type * region , const bool * aquifer , const double * weight , double utm_x , double utm_y , double depth); + double ecl_grav_common_eval_geertsma( const ecl_grid_cache_type * grid_cache , ecl_region_type * region , const bool * aquifer , const double * weight , double utm_x , double utm_y , double depth, double poisson_ratio, double seabed); #ifdef __cplusplus } diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_grid.h b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_grid.h index f81156310d..fdea668183 100644 --- a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_grid.h +++ b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_grid.h @@ -32,6 +32,9 @@ extern "C" { #include #include +#define ECL_GRID_COORD_SIZE(nx,ny) (((nx) + 1) * ((ny) + 1) * 6) +#define ECL_GRID_ZCORN_SIZE(nx,ny,nz) (((nx) * (ny) * (nz) * 8)) + #define ECL_GRID_GLOBAL_GRID "Global" // used as key in hash tables over grids. #define ECL_GRID_MAINGRID_LGR_NR 0 @@ -46,6 +49,8 @@ extern "C" { ecl_coarse_cell_type * ecl_grid_get_cell_coarse_group1( const ecl_grid_type * ecl_grid , int global_index); ecl_coarse_cell_type * ecl_grid_get_cell_coarse_group3( const ecl_grid_type * ecl_grid , int i , int j , int k); + int ecl_grid_get_cell_twist1( const ecl_grid_type * ecl_grid, int global_index ); + int ecl_grid_get_cell_twist3( const ecl_grid_type * ecl_grid, int i , int j , int k); void ecl_grid_get_column_property(const ecl_grid_type * ecl_grid , const ecl_kw_type * ecl_kw , int i , int j, double_vector_type * column); int ecl_grid_get_global_index_from_xy_top( const ecl_grid_type * ecl_grid , double x , double y); @@ -80,9 +85,11 @@ extern "C" { double ecl_grid_get_cell_volume1( const ecl_grid_type * ecl_grid, int global_index ); double ecl_grid_get_cell_volume1_tskille( const ecl_grid_type * ecl_grid, int global_index ); double ecl_grid_get_cell_volume3( const ecl_grid_type * ecl_grid, int i , int j , int k); + double ecl_grid_get_cell_volume1A( const ecl_grid_type * ecl_grid, int active_index ); bool ecl_grid_cell_contains1(const ecl_grid_type * grid , int global_index , double x , double y , double z); bool ecl_grid_cell_contains3(const ecl_grid_type * grid , int i , int j ,int k , double x , double y , double z); int ecl_grid_get_global_index_from_xyz(ecl_grid_type * grid , double x , double y , double z , int start_index); + bool ecl_grid_get_ijk_from_xyz(ecl_grid_type * grid , double x , double y , double z , int start_index, int *i, int *j, int *k ); bool ecl_grid_get_ij_from_xy( const ecl_grid_type * grid , double x , double y , int k , int* i, int* j); const char * ecl_grid_get_name( const ecl_grid_type * ); int ecl_grid_get_active_index3(const ecl_grid_type * ecl_grid , int i , int j , int k); @@ -129,9 +136,14 @@ extern "C" { void ecl_grid_get_ijk1(const ecl_grid_type * , int global_index , int *, int * , int *); void ecl_grid_get_ijk1A(const ecl_grid_type * , int active_index, int *, int * , int *); void ecl_grid_get_ijk_from_active_index(const ecl_grid_type *, int , int *, int * , int * ); + void ecl_grid_get_xyz3(const ecl_grid_type * , int , int , int , double * , double * , double *); void ecl_grid_get_xyz1(const ecl_grid_type * grid , int global_index , double *xpos , double *ypos , double *zpos); void ecl_grid_get_xyz1A(const ecl_grid_type * grid , int active_index , double *xpos , double *ypos , double *zpos); + + bool ecl_grid_get_xyz_inside1(const ecl_grid_type * grid , int global_index , double *xpos , double *ypos , double *zpos); + bool ecl_grid_get_xyz_inside3(const ecl_grid_type * grid , int i , int j , int k , double *xpos , double *ypos , double *zpos); + int ecl_grid_get_global_size( const ecl_grid_type * ecl_grid ); bool ecl_grid_compare(const ecl_grid_type * g1 , const ecl_grid_type * g2 , bool include_lgr, bool include_nnc , bool verbose); int ecl_grid_get_active_size( const ecl_grid_type * ecl_grid ); @@ -194,14 +206,17 @@ extern "C" { void ecl_grid_fwrite_dims( const ecl_grid_type * grid , fortio_type * init_file, ert_ecl_unit_enum output_unit); void ecl_grid_fwrite_depth( const ecl_grid_type * grid , fortio_type * init_file , ert_ecl_unit_enum ouput_unit); + void ecl_grid_fwrite_EGRID( ecl_grid_type * grid , const char * filename, bool metric_output); void ecl_grid_fwrite_EGRID2( ecl_grid_type * grid , const char * filename, ert_ecl_unit_enum output_unit); void ecl_grid_fwrite_GRID( const ecl_grid_type * grid , const char * filename); + void ecl_grid_fwrite_GRID2( const ecl_grid_type * grid , const char * filename, ert_ecl_unit_enum output_unit); + void ecl_grid_fprintf_grdecl( ecl_grid_type * grid , FILE * stream ); - void ecl_grid_fwrite_EGRID_header__( int dims[3] , const float mapaxes[6], int dualp_flag , fortio_type * fortio); - void ecl_grid_fwrite_EGRID_header( int dims[3] , const float mapaxes[6], fortio_type * fortio); + void ecl_grid_fprintf_grdecl2( ecl_grid_type * grid , FILE * stream , ert_ecl_unit_enum output_unit); + int ecl_grid_zcorn_index__(int nx, int ny , int i, int j , int k , int c); int ecl_grid_zcorn_index(const ecl_grid_type * grid , int i, int j , int k , int c); ecl_grid_type * ecl_grid_alloc_EGRID(const char * grid_file, bool apply_mapaxes ); ecl_grid_type * ecl_grid_alloc_GRID(const char * grid_file, bool apply_mapaxes ); diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_grid_cache.h b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_grid_cache.h index 4f018feeb2..2aecabe56a 100644 --- a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_grid_cache.h +++ b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_grid_cache.h @@ -1,20 +1,20 @@ /* - Copyright (C) 2011 Statoil ASA, Norway. - + Copyright (C) 2011 Statoil ASA, Norway. + The file 'ecl_grid_cache.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. + + ERT 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. + + ERT 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 + for more details. */ #ifndef ERT_ECL_GRID_CACHE_H @@ -25,9 +25,9 @@ #ifdef __cplusplus extern "C" { #endif - + typedef struct ecl_grid_cache_struct ecl_grid_cache_type; - + ecl_grid_cache_type * ecl_grid_cache_alloc( const ecl_grid_type * grid ); int ecl_grid_cache_get_size( const ecl_grid_cache_type * grid_cache ); @@ -36,8 +36,9 @@ extern "C" { const double * ecl_grid_cache_get_xpos( const ecl_grid_cache_type * grid_cache ); const double * ecl_grid_cache_get_ypos( const ecl_grid_cache_type * grid_cache ); const double * ecl_grid_cache_get_zpos( const ecl_grid_cache_type * grid_cache ); + const double * ecl_grid_cache_get_volume( const ecl_grid_cache_type * grid_cache ); void ecl_grid_cache_free( ecl_grid_cache_type * grid_cache ); - + #ifdef __cplusplus } diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_init_file.h b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_init_file.h index 10b54da87c..771b0f7c91 100644 --- a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_init_file.h +++ b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_init_file.h @@ -28,9 +28,9 @@ extern "C" { #include #include #include +#include - - void ecl_init_file_fwrite_header( fortio_type * fortio , const ecl_grid_type * grid , const ecl_kw_type * poro , int phases , time_t start_date); + void ecl_init_file_fwrite_header( fortio_type * fortio , const ecl_grid_type * grid , const ecl_kw_type * poro , ert_ecl_unit_enum unit_system, int phases , time_t start_date); #ifdef __cplusplus diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_kw.h b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_kw.h index d6172cdaaf..72a74fd20f 100644 --- a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_kw.h +++ b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_kw.h @@ -31,12 +31,18 @@ extern "C" { #include #include +#include UTIL_IS_INSTANCE_HEADER(ecl_kw); typedef struct ecl_kw_struct ecl_kw_type; + typedef enum { + ECL_KW_READ_OK = 0, + ECL_KW_READ_FAIL = 1 + } ecl_read_status_enum; + /* The size of an ecl_kw instance is denoted with an integer. The choice of int to store the size obviously limits the maximum size to @@ -49,20 +55,29 @@ extern "C" { #define ECL_KW_MAX_SIZE INT_MAX +/* + Character data in ECLIPSE files comes as an array of fixed-length + string. Each of these strings is 8 characters long. The type name, + i.e. 'REAL', 'INTE', ... , come as 4 character strings. +*/ +#define ECL_KW_HEADER_DATA_SIZE ECL_STRING8_LENGTH + ECL_TYPE_LENGTH + 4 +#define ECL_KW_HEADER_FORTIO_SIZE ECL_KW_HEADER_DATA_SIZE + 8 + + + int ecl_kw_first_different( const ecl_kw_type * kw1 , const ecl_kw_type * kw2 , int offset, double abs_epsilon , double rel_epsilon); size_t ecl_kw_fortio_size( const ecl_kw_type * ecl_kw ); void * ecl_kw_get_ptr(const ecl_kw_type *ecl_kw); void ecl_kw_set_data_ptr(ecl_kw_type * ecl_kw , void * data); void ecl_kw_fwrite_data(const ecl_kw_type *_ecl_kw , fortio_type *fortio); bool ecl_kw_fread_realloc_data(ecl_kw_type *ecl_kw, fortio_type *fortio); - ecl_type_enum ecl_kw_get_type(const ecl_kw_type *); + ecl_data_type ecl_kw_get_data_type(const ecl_kw_type *); + size_t ecl_kw_get_sizeof_ctype(const ecl_kw_type *); const char * ecl_kw_get_header8(const ecl_kw_type *); const char * ecl_kw_get_header(const ecl_kw_type * ecl_kw ); - ecl_kw_type * ecl_kw_alloc_empty(); - bool ecl_kw_fread_header(ecl_kw_type *, fortio_type *); + ecl_kw_type * ecl_kw_alloc_empty(void); + ecl_read_status_enum ecl_kw_fread_header(ecl_kw_type *, fortio_type *); void ecl_kw_set_header_name(ecl_kw_type * , const char * ); - void ecl_kw_set_header(ecl_kw_type * , const char * , int , const char *); - void ecl_kw_set_header_alloc(ecl_kw_type * , const char * , int , const char *); bool ecl_kw_fseek_kw(const char * , bool , bool , fortio_type *); bool ecl_kw_fseek_last_kw(const char * , bool , fortio_type *); void ecl_kw_inplace_update_file(const ecl_kw_type * , const char * , int ) ; @@ -74,13 +89,14 @@ extern "C" { void ecl_kw_fread(ecl_kw_type * , fortio_type * ); ecl_kw_type * ecl_kw_fread_alloc(fortio_type *); void ecl_kw_free_data(ecl_kw_type *); - void ecl_kw_fread_indexed_data(fortio_type * fortio, offset_type data_offset, ecl_type_enum ecl_type, int element_count, const int_vector_type* index_map, char* buffer); + void ecl_kw_fread_indexed_data(fortio_type * fortio, offset_type data_offset, ecl_data_type, int element_count, const int_vector_type* index_map, char* buffer); void ecl_kw_free(ecl_kw_type *); void ecl_kw_free__(void *); ecl_kw_type * ecl_kw_alloc_copy (const ecl_kw_type *); ecl_kw_type * ecl_kw_alloc_sub_copy( const ecl_kw_type * src, const char * new_kw , int offset , int count); const void * ecl_kw_copyc__(const void *); ecl_kw_type * ecl_kw_alloc_slice_copy( const ecl_kw_type * src, int index1, int index2, int stride); + void ecl_kw_resize( ecl_kw_type * ecl_kw, int new_size); //void * ecl_kw_get_data_ref(const ecl_kw_type *); void * ecl_kw_alloc_data_copy(const ecl_kw_type * ); void ecl_kw_memcpy(ecl_kw_type *, const ecl_kw_type *); @@ -94,15 +110,17 @@ extern "C" { void ecl_kw_iset(ecl_kw_type *ecl_kw , int i , const void *iptr); void ecl_kw_iset_char_ptr( ecl_kw_type * ecl_kw , int index, const char * s); void ecl_kw_iset_string8(ecl_kw_type * ecl_kw , int index , const char *s8); + void ecl_kw_iset_string_ptr(ecl_kw_type*, int, const char*); + const char * ecl_kw_iget_string_ptr(const ecl_kw_type *, int); const char * ecl_kw_iget_char_ptr( const ecl_kw_type * ecl_kw , int i); void * ecl_kw_iget_ptr(const ecl_kw_type *, int); int ecl_kw_get_size(const ecl_kw_type *); bool ecl_kw_ichar_eq(const ecl_kw_type *, int , const char *); - ecl_kw_type * ecl_kw_alloc( const char * header , int size , ecl_type_enum ecl_type ); - ecl_kw_type * ecl_kw_alloc_new(const char * , int , ecl_type_enum , const void * ); - ecl_kw_type * ecl_kw_alloc_new_shared(const char * , int , ecl_type_enum , void * ); - void ecl_kw_fwrite_param(const char * , bool , const char * , ecl_type_enum , int , void * ); - void ecl_kw_fwrite_param_fortio(fortio_type *, const char * , ecl_type_enum , int , void * ); + ecl_kw_type * ecl_kw_alloc( const char * header , int size , ecl_data_type ); + ecl_kw_type * ecl_kw_alloc_new(const char * , int , ecl_data_type , const void * ); + ecl_kw_type * ecl_kw_alloc_new_shared(const char * , int , ecl_data_type , void * ); + void ecl_kw_fwrite_param(const char * , bool , const char * , ecl_data_type , int , void * ); + void ecl_kw_fwrite_param_fortio(fortio_type *, const char * , ecl_data_type , int , void * ); void ecl_kw_summarize(const ecl_kw_type * ecl_kw); void ecl_kw_fread_double_param(const char * , bool , double *); float ecl_kw_iget_as_float(const ecl_kw_type * ecl_kw , int i); @@ -118,13 +136,12 @@ extern "C" { bool ecl_kw_block_equal( const ecl_kw_type * ecl_kw1 , const ecl_kw_type * ecl_kw2 , int cmp_elements); bool ecl_kw_data_equal( const ecl_kw_type * ecl_kw , const void * data); bool ecl_kw_content_equal( const ecl_kw_type * ecl_kw1 , const ecl_kw_type * ecl_kw2); - bool ecl_kw_fskip_data__( ecl_type_enum ecl_type , int size , fortio_type * fortio); + bool ecl_kw_fskip_data__( ecl_data_type, int, fortio_type *); bool ecl_kw_fskip_data(ecl_kw_type *ecl_kw, fortio_type *fortio); bool ecl_kw_fread_data(ecl_kw_type *ecl_kw, fortio_type *fortio); void ecl_kw_fskip_header( fortio_type * fortio); - bool ecl_kw_is_grdecl_file(FILE * ); bool ecl_kw_is_kw_file(fortio_type * fortio); int ecl_kw_element_sum_int( const ecl_kw_type * ecl_kw ); diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_kw_grdecl.h b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_kw_grdecl.h index 8174a1e5ea..6c5afabcb1 100644 --- a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_kw_grdecl.h +++ b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_kw_grdecl.h @@ -32,17 +32,17 @@ extern "C" { bool ecl_kw_grdecl_fseek_kw(const char * , bool , FILE * ); - ecl_kw_type * ecl_kw_fscanf_alloc_grdecl_dynamic__( FILE * stream , const char * kw , bool strict , ecl_type_enum ecl_type); - ecl_kw_type * ecl_kw_fscanf_alloc_grdecl_dynamic( FILE * stream , const char * kw , ecl_type_enum ecl_type); + ecl_kw_type * ecl_kw_fscanf_alloc_grdecl_dynamic__( FILE * stream , const char * kw , bool strict , ecl_data_type ); + ecl_kw_type * ecl_kw_fscanf_alloc_grdecl_dynamic( FILE * stream , const char * kw , ecl_data_type); - ecl_kw_type * ecl_kw_fscanf_alloc_grdecl_data__(FILE * stream , bool strict , int size, ecl_type_enum ecl_type ); - ecl_kw_type * ecl_kw_fscanf_alloc_grdecl_data( FILE * stream , int size , ecl_type_enum ecl_type); + ecl_kw_type * ecl_kw_fscanf_alloc_grdecl_data__(FILE * stream , bool strict , int size, ecl_data_type data_type ); + ecl_kw_type * ecl_kw_fscanf_alloc_grdecl_data( FILE * stream , int size , ecl_data_type data_type); - ecl_kw_type * ecl_kw_fscanf_alloc_grdecl__(FILE * stream, const char * kw , bool strict , int size, ecl_type_enum ecl_type); - ecl_kw_type * ecl_kw_fscanf_alloc_grdecl(FILE * stream , const char * kw, int size, ecl_type_enum ecl_type); + ecl_kw_type * ecl_kw_fscanf_alloc_grdecl__(FILE * stream, const char * kw , bool strict , int size, ecl_data_type data_type); + ecl_kw_type * ecl_kw_fscanf_alloc_grdecl(FILE * stream , const char * kw, int size, ecl_data_type data_type); - ecl_kw_type * ecl_kw_fscanf_alloc_current_grdecl__( FILE * stream , bool strict , ecl_type_enum ecl_type); - ecl_kw_type * ecl_kw_fscanf_alloc_current_grdecl( FILE * stream , ecl_type_enum ecl_type); + ecl_kw_type * ecl_kw_fscanf_alloc_current_grdecl__( FILE * stream , bool strict , ecl_data_type data_type); + ecl_kw_type * ecl_kw_fscanf_alloc_current_grdecl( FILE * stream , ecl_data_type data_type); bool ecl_kw_grdecl_fseek_next_kw( FILE * stream ); char * ecl_kw_grdecl_alloc_next_header( FILE * stream ); diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_kw_magic.h b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_kw_magic.h index 8f580aef22..846ad40765 100644 --- a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_kw_magic.h +++ b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_kw_magic.h @@ -31,6 +31,257 @@ extern "C" { #define LGRHEADI_LGR_NR_INDEX 0 #define LGRJOIN_KW "LGRJOIN" + +/* + The table in the INIT file are organized with one large data keyword + 'TAB' and one keyword 'TABDIMS' which describe the layout of the + data in the TAB keyword. + + For each of the tables there 'TABDIMS_xxx_OFFSET_ITEM' which points + to an element in the 'TABDIMS' vector which contains the starting + address of table 'xxx' in the 'TAB' keyword, then there are one or + several integer values describing how many values/tables there + are. In addition there is an assumed number of columns which is not + explicitly stored in the TABDIMS keyword. + + The input format is quite flexible with respect to the size of the + individual tables and subtables, but the representation in the INIT + file is based on fixed length columns and equal sized tables, where + all inactive elements have the default value 2e20. + + Assume the following PVTO input: + + + PVTO + 1.55203 1.00000 1.15907572 0.64345 + 25.00000 1.15319788 0.67619 + 50.00000 1.14759314 0.70959 / + + 28.04570 25.00000 1.17415042 0.63294 + 50.00000 1.16792401 0.66638 + 75.00000 1.16222385 0.69918 + 100.00000 1.15212320 0.76297 / + + 35.62113 50.00000 1.19208190 0.61538 + 75.00000 1.18568689 0.64790 + 100.00000 1.17982339 0.67985 + 125.00000 1.17441865 0.71127 + 150.00000 1.16941365 0.74217 / + + / + 20.66588 1.00000 1.15642614 0.57010 + 25.00000 1.15051027 0.59831 + 50.00000 1.14487540 0.62703 / + + 27.65815 25.00000 1.17402576 0.56928 + 50.00000 1.16771923 0.59875 + 75.00000 1.16195281 0.62760 + 100.00000 1.15665041 0.65588 + / + +This is the PVTO table, and it is described by the constants +TABDIMS_IBPVTO_OFFSET_ITEM, TABDIMS_JBPVTO_OFFSET_ITEM, +TABDIMS_NRPVTO_ITEM, TABDIMS_NPPVTO_ITEM and TABDIMS_NTPVTO_ITEM. Observe the following: + + 1. There are 3 GOR values in the first table and 2 in the second, + this is the number of composition nodes - + TABDIMS_NRPVTO_ITEM. Since there are 3 in the first table and 2 in + the second the value of TABDIMS[ TABDIMS_NRPVTO_ITEM ] >= 3. + + 2. The GOR node values (1.55203, 28.04570, 35.62113) and (20.66588, + 27.65815) are stored separately at offset + TABDIMS[ TABDIMS_JBPVTO_OFFSET_ITEM ] in the TAB array. + + 3. The length of the longest column is 5 elements so the value of + TABDIMS[ TABDIMS_NPPVTO_ITEM ] >= 5. + + 4. The actual table data starts at offset TABDIMS[ + TABDIMS_IBPVTO_ITEM] in the TAB table. + +When packing the actual data into the TAB array the indices are +running as row,GOR,table,column - with row fastest. All in all the +linear vector for this PVTO table will look like: + + 1.00000 \ \ \ \ + 25.00000 | | | | + 50.00000 | NPPVTO = 5 | | | + * | | | | + * | | | | +-----------/ | | | + 25.00000 | | | + 50.00000 | | | + 75.00000 | NRPVTO = 3 | | +100.00000 | | | + * | | | +----------- | | | + 50.00000 | | | + 75.00000 | | | +100.00000 | | | +125.00000 | | | +150.00000 | | | +=========== / | NTPVTO = 2 | + 1.00000 | | + 25.00000 | | + 50.00000 | | + * | | + * | | Three columns - +----------- | | (not in TABDIMS) + 25.00000 | | + 50.00000 | | + 75.00000 | | +100.00000 | | + * | | +----------- | | +* | | +* | | +* | | +* | | +* | | +@@@@@@@@@@@ / | +1.15907572 | +1.15319788 | +1.14759314 | + * | + * | +----------- | +1.17415042 | +1.16792401 | +1.16222385 | +1.15212320 | + * | +----------- | +1.19208190 | +1.18568689 | +1.17982339 | +1.17441865 | +1.16941365 | +=========== | +1.15642614 | +1.15051027 | +1.14487540 | + * | + * | +----------- | +1.17402576 | +1.16771923 | +1.16195281 | +1.15665041 | + * | +----------- | +* | +* | +* | +* | +* | +@@@@@@@@@@@ | +0.64345 | +0.67619 | +0.70959 | + * | + * | +----------- | +0.63294 | +0.66638 | +0.69918 | +0.76297 | + * | +----------- | +0.61538 | +0.64790 | +0.67985 | +0.71127 | +0.74217 | +=========== | +0.57010 | +0.59831 | +0.62703 | + * | + * | +----------- | +0.56928 | +0.59875 | +0.62760 | +0.65588 | + * | +----------- | +* | +* | +* | +* | +* | + / + +In this vector representation the different composition subtable +columns are separated by '----', the different main tables are +separated by '======' and the columns are separated by '@@@@'. Default +values (2e20) are denoted with '*'. + +*/ +#define TABDIMS_SIZE 100 + +#define TABDIMS_TAB_SIZE_ITEM 0 + +#define TABDIMS_IBROCK_OFFSET_ITEM 1 +#define TABDIMS_NTROCK_ITEM 2 + +#define TABDIMS_IBROCC_OFFSET_ITEM 3 +#define TABDIMS_NPROCC_ITEM 4 + +#define TABDIMS_IBPVTO_OFFSET_ITEM 6 +#define TABDIMS_JBPVTO_OFFSET_ITEM 7 +#define TABDIMS_NRPVTO_ITEM 8 +#define TABDIMS_NPPVTO_ITEM 9 +#define TABDIMS_NTPVTO_ITEM 10 + +#define TABDIMS_IBPVTW_OFFSET_ITEM 11 +#define TABDIMS_NTPVTW_ITEM 12 + +#define TABDIMS_IBPVTG_OFFSET_ITEM 13 +#define TABDIMS_JBPVTG_OFFSET_ITEM 14 +#define TABDIMS_NRPVTG_ITEM 15 +#define TABDIMS_NPPVTG_ITEM 16 +#define TABDIMS_NTPVTG_ITEM 17 + +#define TABDIMS_IBDENS_OFFSET_ITEM 18 +#define TABDIMS_NTDENS_ITEM 19 + +#define TABDIMS_IBSWFN_OFFSET_ITEM 20 +#define TABDIMS_NSSWFN_ITEM 21 +#define TABDIMS_NTSWFN_ITEM 22 + +#define TABDIMS_IBSGFN_OFFSET_ITEM 23 +#define TABDIMS_NSSGFN_ITEM 24 +#define TABDIMS_NTSGFN_ITEM 25 + +#define TABDIMS_IBSOFN_OFFSET_ITEM 26 +#define TABDIMS_IBSWCO_OFFSET_ITEM 27 +#define TABDIMS_NSSOFN_ITEM 28 +#define TABDIMS_NTSOFN_ITEM 29 + +#define TABDIMS_IBVETB_OFFSET_ITEM 40 +#define TABDIMS_NSVETB_ITEM 41 +#define TABDIMS_NTVETB_ITEM 42 + +#define TABDIMS_IBTHPR_OFFSET_ITEM 43 +#define TABDIMS_IBSLIM_ITEM 44 +#define TABDIMS_NSENDP_ITEM 45 +#define TABDIMS_NTENDP_ITEM 46 + +#define TABDIMS_IBRTEM_OFFSET_ITEM 47 +#define TABDIMS_IBCTOL_ITEM 48 + +#define TABDIMS_IBLANG_OFFSET_ITEM 50 // LANGMUIR Table +#define TABDIMS_NCLANG_ITEM 51 // LANGMUIR Table +#define TABDIMS_NSLANG_ITEM 52 // LANGMUIR Table +#define TABDIMS_NTLANG_ITEM 53 // LANGMUIR Table + +#define TABDIMS_IBLNG2_OFFSET_ITEM 54 // LANGSOLV Table +#define TABDIMS_IBCADP_OFFSET_ITEM 55 // COALPP Table +#define TABDIMS_IBCADS_OFFSET_ITEM 56 // COALADS Table +#define TABDIMS_IBROCP_OFFSET_ITEM 57 // ROCKPAMA Table +#define TABDIMS_NTRPMA_ITEM 58 // ROCKPAMA Table + + /* Observe that many of the elements in the INTEHEAD keyword is shared between the restart and init files. The ones listed below here are @@ -56,6 +307,8 @@ extern "C" { #define INTEHEAD_ECLIPSE100_VALUE 100 #define INTEHEAD_ECLIPSE300_VALUE 300 #define INTEHEAD_ECLIPSE300THERMAL_VALUE 500 +#define INTEHEAD_INTERSECT_VALUE 700 +#define INTEHEAD_FRONTSIM_VALUE 800 #define INTEHEAD_INIT_SIZE 95 #define INTEHEAD_RESTART_SIZE 180 @@ -103,10 +356,12 @@ extern "C" { #define STARTSOL_KW "STARTSOL" #define ENDSOL_KW "ENDSOL" +#define XWEL_KW "XWEL" #define IWEL_KW "IWEL" #define ZWEL_KW "ZWEL" #define ICON_KW "ICON" #define SCON_KW "SCON" +#define XCON_KW "XCON" #define ISEG_KW "ISEG" #define RSEG_KW "RSEG" @@ -128,6 +383,7 @@ extern "C" { #define INTEHEAD_NWELLS_INDEX 16 // Number of wells #define INTEHEAD_NIWELZ_INDEX 24 // Number of elements pr. well in the IWEL array. +#define INTEHEAD_NXWELZ_INDEX 26 // Number of elements pr. well in the XWEL array. #define INTEHEAD_NZWELZ_INDEX 27 // Number of 8 character words pr. well #define INTEHEAD_NCWMAX_INDEX 17 // Maximum number of completions per well @@ -137,7 +393,7 @@ extern "C" { #define INTEHEAD_NXWELZ_INDEX 26 #define INTEHEAD_NICONZ_INDEX 32 // Number of elements pr completion in the ICON array. #define INTEHEAD_NSCONZ_INDEX 33 // Number of elements pr completion in the SCON array -#define INTEHEAD_NXCONZ_INDEX 34 +#define INTEHEAD_NXCONZ_INDEX 34 // Number of elements pr completion in the XCON array #define INTEHEAD_NIGRPZ_INDEX 36 // Number of elements pr group in the IGRP array. @@ -158,6 +414,7 @@ extern "C" { #define MINISTEP_KW "MINISTEP" #define STARTDAT_KW "STARTDAT" /* Intgere keyword containing day,month,year. */ #define WGNAMES_KW "WGNAMES" /* The names of wells/groups for the summary vectors. */ +#define NAMES_KW "NAMES" /* Alias for WGNAMES_KW. */ #define KEYWORDS_KW "KEYWORDS" /* The variable type for the various summary vectors. */ #define UNITS_KW "UNITS" /* The units, i.e SM^3/DAY the summary vectors. */ #define DIMENS_KW "DIMENS" /* The dimensions of the grid - also used in the GRID files. */ diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_nnc_geometry.h b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_nnc_geometry.h new file mode 100644 index 0000000000..743d45f33a --- /dev/null +++ b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_nnc_geometry.h @@ -0,0 +1,50 @@ +/* + Copyright (C) 2017 Statoil ASA, Norway. + + The file 'ecl_nnc_geometry.h' is part of ERT - Ensemble based Reservoir Tool. + + ERT 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. + + ERT 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 + for more details. +*/ + +#ifndef ERT_NNC_GEOMETRY_H +#define ERT_NNC_GEOMETRY_H +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#include + +typedef struct ecl_nnc_geometry_struct ecl_nnc_geometry_type; +typedef struct ecl_nnc_pair_struct ecl_nnc_pair_type; + +struct ecl_nnc_pair_struct { + int grid_nr1; + int global_index1; + int grid_nr2; + int global_index2; + + int input_index; /* corresponds to the input ordering of this nnc */ +}; + +UTIL_IS_INSTANCE_HEADER( ecl_nnc_geometry); +void ecl_nnc_geometry_free( ecl_nnc_geometry_type * nnc_geo); +ecl_nnc_geometry_type * ecl_nnc_geometry_alloc( const ecl_grid_type * grid ); +int ecl_nnc_geometry_size( const ecl_nnc_geometry_type * nnc_geo ); +const ecl_nnc_pair_type * ecl_nnc_geometry_iget( const ecl_nnc_geometry_type * nnc_geo , int index); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_rsthead.h b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_rsthead.h index e48a9b8f30..28aa0dbaee 100644 --- a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_rsthead.h +++ b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_rsthead.h @@ -41,6 +41,8 @@ extern "C" { int version; // 100, 300, 500 (Eclipse300-Thermal) int phase_sum; // Oil = 1 Gas = 2 Water = 4 + ert_ecl_unit_enum unit_system; + int nx; int ny; int nz; @@ -56,11 +58,13 @@ extern "C" { int nwells; // Number of wells int niwelz; // Number of elements pr well in IWEL array int nzwelz; // Number of 8 character words pr well in ZWEL array + int nxwelz; // Number of elements pr well in XWEL array. // Connection properties int niconz; // Number of elements per completion in ICON array int ncwmax; // Maximum number of completions per well int nsconz; // Number of elements per completion in SCON array + int nxconz; // Number of elements per completion in XCON array // Segment properties int nisegz; // Number of entries pr segment in the ISEG array @@ -83,7 +87,7 @@ extern "C" { void ecl_rsthead_free( ecl_rsthead_type * rsthead ); ecl_rsthead_type * ecl_rsthead_alloc_from_kw( int report_step , const ecl_kw_type * intehead_kw , const ecl_kw_type * doubhead_kw , const ecl_kw_type * logihead_kw ); ecl_rsthead_type * ecl_rsthead_alloc( const ecl_file_view_type * rst_file , int report_step); - ecl_rsthead_type * ecl_rsthead_alloc_empty(); + ecl_rsthead_type * ecl_rsthead_alloc_empty(void); time_t ecl_rsthead_date( const ecl_kw_type * intehead_kw ); void ecl_rsthead_fprintf( const ecl_rsthead_type * header , FILE * stream); void ecl_rsthead_fprintf_struct( const ecl_rsthead_type * header , FILE * stream); diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_smspec.h b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_smspec.h index e7cfe31cdf..f63f3faf90 100644 --- a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_smspec.h +++ b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_smspec.h @@ -43,6 +43,8 @@ typedef struct ecl_smspec_struct ecl_smspec_type; the functions smspec_node_alloc(), ecl_smsepec_fread_header() and ecl_smspec_install_gen_key() must be updated. */ + + int * ecl_smspec_alloc_mapping( const ecl_smspec_type * self, const ecl_smspec_type * other); const int_vector_type * ecl_smspec_get_index_map( const ecl_smspec_type * smspec ); void ecl_smspec_index_node( ecl_smspec_type * ecl_smspec , smspec_node_type * smspec_node); void ecl_smspec_insert_node(ecl_smspec_type * ecl_smspec, smspec_node_type * smspec_node); @@ -126,7 +128,7 @@ typedef struct ecl_smspec_struct ecl_smspec_type; stringlist_type * ecl_smspec_alloc_group_list( const ecl_smspec_type * smspec , const char * pattern); stringlist_type * ecl_smspec_alloc_well_var_list( const ecl_smspec_type * smspec ); const char * ecl_smspec_get_simulation_path(const ecl_smspec_type * ecl_smspec); - const stringlist_type * ecl_smspec_get_restart_list( const ecl_smspec_type * ecl_smspec); + const char * ecl_smspec_get_restart_case( const ecl_smspec_type * ecl_smspec); const char * ecl_smspec_get_join_string( const ecl_smspec_type * smspec); const float_vector_type * ecl_smspec_get_params_default( const ecl_smspec_type * ecl_smspec ); void ecl_smspec_update_wgname( ecl_smspec_type * smspec , smspec_node_type * node , const char * wgname ); @@ -139,6 +141,8 @@ typedef struct ecl_smspec_struct ecl_smspec_type; char * ecl_smspec_alloc_well_key( const ecl_smspec_type * smspec , const char * keyword , const char * wgname); + bool ecl_smspec_equal( const ecl_smspec_type * self , const ecl_smspec_type * other); + #ifdef __cplusplus } diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_sum_data.h b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_sum_data.h index 625b291c87..3cee6b5468 100644 --- a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_sum_data.h +++ b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_sum_data.h @@ -36,6 +36,8 @@ extern "C" { #include typedef struct ecl_sum_data_struct ecl_sum_data_type ; + + void ecl_sum_data_add_case(ecl_sum_data_type * self, const ecl_sum_data_type * other); void ecl_sum_data_fwrite_step( const ecl_sum_data_type * data , const char * ecl_case , bool fmt_case , bool unified, int report_step); void ecl_sum_data_fwrite( const ecl_sum_data_type * data , const char * ecl_case , bool fmt_case , bool unified); bool ecl_sum_data_fread( ecl_sum_data_type * data , const stringlist_type * filelist); diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_sum_tstep.h b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_sum_tstep.h index 5324a61a4f..e5e92471e5 100644 --- a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_sum_tstep.h +++ b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_sum_tstep.h @@ -30,7 +30,8 @@ extern "C" { typedef struct ecl_sum_tstep_struct ecl_sum_tstep_type; - + ecl_sum_tstep_type * ecl_sum_tstep_alloc_remap_copy( const ecl_sum_tstep_type * src , const ecl_smspec_type * new_smspec, float default_value , const int * params_map); + ecl_sum_tstep_type * ecl_sum_tstep_alloc_copy( const ecl_sum_tstep_type * src ); void ecl_sum_tstep_free( ecl_sum_tstep_type * ministep ); void ecl_sum_tstep_free__( void * __ministep); ecl_sum_tstep_type * ecl_sum_tstep_alloc_from_file(int report_step , diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_type.h b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_type.h new file mode 100644 index 0000000000..7a596ddcf3 --- /dev/null +++ b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_type.h @@ -0,0 +1,154 @@ +/* + Copyright (C) 2017 Statoil ASA, Norway. + + The file 'ecl_type.h' is part of ERT - Ensemble based Reservoir Tool. + + ERT 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. + + ERT 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 + for more details. +*/ + +#ifndef ERT_ECL_TYPE_H +#define ERT_ECL_TYPE_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include + +/* + The type of an eclipse keyword is carried by a struct + ecl_type_struct which contains a type enum, and the size in bytes of + one such element. These structs are for the most part handled with + value semantics, and created with macros ECL_INT, ECL_FLOAT and so + on. + + The macros in C use designated initializers, whereas the C++ macros + use a constructor, for this reason this file has two slightly + different code paths for C and C++. +*/ + +#define ECL_STRING8_LENGTH 8 +#define ECL_TYPE_LENGTH 4 + +typedef enum { + ECL_CHAR_TYPE = 0, + ECL_FLOAT_TYPE = 1, + ECL_DOUBLE_TYPE = 2, + ECL_INT_TYPE = 3, + ECL_BOOL_TYPE = 4, + ECL_MESS_TYPE = 5, + ECL_STRING_TYPE = 7 +} ecl_type_enum; + +#define ECL_TYPE_ENUM_DEFS {.value = 0 , .name = "ECL_CHAR_TYPE"}, \ +{.value = 1 , .name = "ECL_FLOAT_TYPE"} , \ +{.value = 2 , .name = "ECL_DOUBLE_TYPE"}, \ +{.value = 3 , .name = "ECL_INT_TYPE"}, \ +{.value = 4 , .name = "ECL_BOOL_TYPE"}, \ +{.value = 5 , .name = "ECL_MESS_TYPE"}, \ +{.value = 7 , .name = "ECL_STRING_TYPE"} + +#define ECL_TYPE_ENUM_SIZE 7 + +/* + Character data in ECLIPSE files comes as an array of fixed-length + string. Each of these strings is 8 characters long. The type name, + i.e. 'REAL', 'INTE', ... , come as 4 character strings. +*/ + +#define ECL_STRING8_LENGTH 8 // 'Normal' 8 characters 'CHAR' type. +#define ECL_STRING10_LENGTH 10 // 'Normal' 8 characters 'CHAR' type. +#define ECL_TYPE_LENGTH 4 + + +#ifdef __cplusplus +} +#endif + + +#ifdef __cplusplus + +struct ecl_type_struct { + const ecl_type_enum type; + const size_t element_size; + + ecl_type_struct( ecl_type_enum t, size_t es) : + type( t ), + element_size( es ) + {} +}; + +#define ECL_INT ecl_data_type( ECL_INT_TYPE, sizeof(int)) +#define ECL_FLOAT ecl_data_type( ECL_FLOAT_TYPE, sizeof(float)) +#define ECL_DOUBLE ecl_data_type( ECL_DOUBLE_TYPE, sizeof(double)) +#define ECL_BOOL ecl_data_type( ECL_BOOL_TYPE, sizeof(int)) +#define ECL_CHAR ecl_data_type( ECL_CHAR_TYPE, ECL_STRING8_LENGTH + 1) +#define ECL_MESS ecl_data_type( ECL_MESS_TYPE, 0) +#define ECL_STRING(size) ecl_data_type(ECL_STRING_TYPE, size + 1) + +#else + +struct ecl_type_struct { + const ecl_type_enum type; + const size_t element_size; +}; + +#define ECL_CHAR (ecl_data_type) {.type = ECL_CHAR_TYPE, .element_size = ECL_STRING8_LENGTH + 1} +#define ECL_INT (ecl_data_type) {.type = ECL_INT_TYPE, .element_size = sizeof(int)} +#define ECL_FLOAT (ecl_data_type) {.type = ECL_FLOAT_TYPE, .element_size = sizeof(float)} +#define ECL_DOUBLE (ecl_data_type) {.type = ECL_DOUBLE_TYPE, .element_size = sizeof(double)} +#define ECL_BOOL (ecl_data_type) {.type = ECL_BOOL_TYPE, .element_size = sizeof(int)} +#define ECL_MESS (ecl_data_type) {.type = ECL_MESS_TYPE, .element_size = 0} +#define ECL_STRING(size) (ecl_data_type) {.type = ECL_STRING_TYPE, .element_size = size + 1} + +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct ecl_type_struct ecl_data_type; + +ecl_data_type ecl_type_create_from_name(const char *); +ecl_data_type ecl_type_create(const ecl_type_enum, const size_t); +ecl_data_type ecl_type_create_from_type(const ecl_type_enum); + +ecl_type_enum ecl_type_get_type(const ecl_data_type); +char * ecl_type_alloc_name(const ecl_data_type); + +int ecl_type_get_sizeof_ctype(const ecl_data_type); +int ecl_type_get_sizeof_ctype_fortio(const ecl_data_type); + +bool ecl_type_is_equal(const ecl_data_type, const ecl_data_type); + +bool ecl_type_is_numeric(const ecl_data_type); +bool ecl_type_is_alpha(const ecl_data_type); +bool ecl_type_is_char(const ecl_data_type); +bool ecl_type_is_int(const ecl_data_type); +bool ecl_type_is_float(const ecl_data_type); +bool ecl_type_is_double(const ecl_data_type); +bool ecl_type_is_mess(const ecl_data_type); +bool ecl_type_is_bool(const ecl_data_type); +bool ecl_type_is_string(const ecl_data_type); + +// Temporary fixup for OPM. +char * ecl_type_get_name(const ecl_data_type); + +#ifdef __cplusplus +} +#endif + + +#endif diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_units.h b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_units.h new file mode 100644 index 0000000000..ecee98a662 --- /dev/null +++ b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_units.h @@ -0,0 +1,46 @@ +/* + Copyright (C) 2017 Statoil ASA, Norway. + + The file 'ecl_units.h' is part of ERT - Ensemble based Reservoir Tool. + + ERT 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. + + ERT 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 + for more details. +*/ + +#ifndef ECL_UNITS_H +#define ECL_UNITS_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define ECL_UNITS_CUBIC(x) ((x)*(x)*(x)) +#define ECL_UNITS_MILLI(x) ((x)*0.001) +#define ECL_UNITS_MEGA(x) ((x)*1000000) + +#define ECL_UNITS_LENGTH_INCH 0.0254 +#define ECL_UNITS_LENGTH_FEET 12 * ECL_UNITS_LENGTH_INCH + +#define ECL_UNITS_VOLUME_GALLON 231 * ECL_UNITS_CUBIC( ECL_UNITS_LENGTH_INCH ) +#define ECL_UNITS_VOLUME_BARREL ECL_UNITS_VOLUME_GALLON * 42 +#define ECL_UNITS_VOLUME_LITER 0.001 +#define ECL_UNITS_VOLUME_MILLI_LITER ECL_UNITS_MILLI( ECL_UNITS_VOLUME_LITER ) +#define ECL_UNITS_VOLUME_GAS_FIELD ECL_UNITS_MEGA( ECL_UNITS_CUBIC( ECL_UNITS_LENGTH_FEET ) ) + +#define ECL_UNITS_TIME_HOUR 3600 +#define ECL_UNITS_TIME_DAY 24 * ECL_UNITS_TIME_HOUR + + +#ifdef __cplusplus +} +#endif +#endif diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_util.h b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_util.h index 2074249582..67cca9cde2 100644 --- a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_util.h +++ b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_util.h @@ -27,6 +27,7 @@ extern "C" { #include #include #include +#include typedef enum { ECL_OTHER_FILE = 0 , @@ -55,53 +56,23 @@ typedef enum { ECL_OTHER_FILE = 0 , ECL_BINARY_NON_UNIFIED = 4, ECL_FORMATTED_NON_UNIFIED = 8} ecl_storage_enum; -/* - Character data in ECLIPSE files comes as an array of fixed-length - string. Each of these strings is 8 characters long. The type name, - i.e. 'REAL', 'INTE', ... , come as 4 character strings. -*/ - -#define ECL_STRING_LENGTH 8 -#define ECL_TYPE_LENGTH 4 -#define ECL_KW_HEADER_DATA_SIZE ECL_STRING_LENGTH + ECL_TYPE_LENGTH + 4 -#define ECL_KW_HEADER_FORTIO_SIZE ECL_KW_HEADER_DATA_SIZE + 8 - -/*****************************************************************/ -/* - Observe that these type identidiers are (ab)used in both the rms and - ert/enkf libraries in situations where ECLIPSE is not at all involved. -*/ - -typedef enum { - ECL_CHAR_TYPE = 0, - ECL_FLOAT_TYPE = 1, - ECL_DOUBLE_TYPE = 2, - ECL_INT_TYPE = 3, - ECL_BOOL_TYPE = 4, - ECL_MESS_TYPE = 5 -} ecl_type_enum; - -#define ECL_TYPE_ENUM_DEFS {.value = 0 , .name = "ECL_CHAR_TYPE"}, \ -{.value = 1 , .name = "ECL_FLOAT_TYPE"} , \ -{.value = 2 , .name = "ECL_DOUBLE_TYPE"}, \ -{.value = 3 , .name = "ECL_INT_TYPE"}, \ -{.value = 4 , .name = "ECL_BOOL_TYPE"}, \ -{.value = 5 , .name = "ECL_MESS_TYPE"} - -#define ECL_TYPE_ENUM_SIZE 6 - - - /* The libecl library has been built and tested 99.5% with ECLIPSE100 as context, but in thye gravity code there is some very limited functionality related to ECLIPSE100 versus ECLIPSE300 functionality. + + Observe that numerical values found as part of the INTEHAD keyword + differ from these values, and are found in the ecl_kw_magic.h + header. */ typedef enum { - ECLIPSE_UNDEFINED = 0, - ECLIPSE100 = 1, - ECLIPSE300 = 2 + ECLIPSE_UNDEFINED = 0, + ECLIPSE100 = 1, + ECLIPSE300 = 2, + ECLIPSE300_THERMAL = 3, + INTERSECT = 4, + FRONTSIM = 5 } ecl_version_enum; /* @@ -127,14 +98,12 @@ typedef enum { typedef enum { - ERT_ECL_METRIC_UNITS = 0, - ERT_ECL_FIELD_UNITS = 1, - ERT_ECL_LAB_UNITS = 2 + ECL_METRIC_UNITS = 1, + ECL_FIELD_UNITS = 2, + ECL_LAB_UNITS = 3, + ECL_PVT_M_UNITS = 4 } ert_ecl_unit_enum; -#define ECL_UNIT_ENUM_DEFS {.value = 0 , .name = "ECL_METRIC_UNITS"}, {.value = 1 , .name = "ECL_FIELD_UNITS"} , {.value = 2 , .name = "ECL_LAB_UNITS"} -#define ECL_UNIT_ENUM_SIZE 3 - // For unformatted files: #define ECL_BOOL_TRUE_INT -1 // Binary representation: 11111111 11111111 11111111 1111111 @@ -143,10 +112,6 @@ typedef enum { #define ECL_COMMENT_CHAR '-' // Need to consecutive to make an ECLIPSE comment #define ECL_DATA_TERMINATION "/" -int ecl_util_get_sizeof_ctype_fortio(ecl_type_enum ecl_type); -int ecl_util_get_sizeof_ctype(ecl_type_enum ); -ecl_type_enum ecl_util_get_type_from_name( const char * type_name ); -const char * ecl_util_get_type_name( ecl_type_enum ecl_type ); /*****************************************************************/ bool ecl_util_unified_file(const char *filename); @@ -157,7 +122,7 @@ ecl_file_enum ecl_util_get_file_type(const char * , bool * , int * ); ecl_file_enum ecl_util_inspect_extension(const char * ext , bool *_fmt_file, int * _report_nr); char * ecl_util_alloc_filename(const char * /* path */, const char * /* base */, ecl_file_enum , bool /* fmt_file */ , int /*report_nr*/); char * ecl_util_alloc_exfilename(const char * /* path */, const char * /* base */, ecl_file_enum , bool /* fmt_file */ , int /*report_nr*/); -void ecl_util_memcpy_typed_data(void *, const void * , ecl_type_enum , ecl_type_enum , int ); +void ecl_util_memcpy_typed_data(void *, const void * , ecl_data_type , ecl_data_type , int ); void ecl_util_escape_kw(char * kw); bool ecl_util_alloc_summary_files(const char * , const char * , const char * , char ** , stringlist_type * ); void ecl_util_alloc_summary_data_files(const char * path , const char * base , bool fmt_file , stringlist_type * filelist); diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/smspec_node.h b/ThirdParty/Ert/libecl/include/ert/ecl/smspec_node.h index 7de9f48d21..18a21da43d 100644 --- a/ThirdParty/Ert/libecl/include/ert/ecl/smspec_node.h +++ b/ThirdParty/Ert/libecl/include/ert/ecl/smspec_node.h @@ -73,7 +73,9 @@ typedef enum {ECL_SMSPEC_INVALID_VAR = 0 , char * smspec_alloc_local_block_key( const char * join_string , const char * keyword , const char * lgr_name , int i , int j , int k); char * smspec_alloc_local_completion_key( const char * join_string, const char * keyword , const char * lgr_name , const char * wgname , int i , int j , int k); + bool smspec_node_equal( const smspec_node_type * node1, const smspec_node_type * node2); + bool smspec_node_init( smspec_node_type * smspec_node, ecl_smspec_var_type var_type , const char * wgname , diff --git a/ThirdParty/Ert/libecl/src/CMakeLists.txt b/ThirdParty/Ert/libecl/src/CMakeLists.txt index 3c3994b174..dcbf36677a 100644 --- a/ThirdParty/Ert/libecl/src/CMakeLists.txt +++ b/ThirdParty/Ert/libecl/src/CMakeLists.txt @@ -2,85 +2,91 @@ include_directories( ext ) file(GLOB ext_source "ext/*.c" ) file(GLOB ext_header "ext/*.h" ) -set( source_files - ecl_rsthead.c - ecl_sum_tstep.c - ecl_rst_file.c - ecl_init_file.c - ecl_grid_cache.c - smspec_node.c - ecl_kw_grdecl.c +set( source_files + ecl_rsthead.c + ecl_sum_tstep.c + ecl_rst_file.c + ecl_init_file.c + ecl_grid_cache.c + smspec_node.c + ecl_kw_grdecl.c ecl_file_kw.c - ecl_file_view.c - ecl_grav.c - ecl_grav_calc.c - ecl_smspec.c - ecl_sum_data.c - ecl_util.c - ecl_kw.c + ecl_file_view.c + ecl_grav.c + ecl_grav_calc.c + ecl_smspec.c + ecl_sum_data.c + ecl_util.c + ecl_kw.c ecl_sum.c ecl_sum_vector.c - fortio.c - ecl_rft_file.c - ecl_rft_node.c - ecl_rft_cell.c - ecl_grid.c - ecl_coarse_cell.c - ecl_box.c - ecl_io_config.c - ecl_file.c - ecl_region.c - ecl_subsidence.c - ecl_grid_dims.c - grid_dims.c - nnc_info.c - ecl_grav_common.c - nnc_vector.c - ecl_nnc_export.c + fortio.c + ecl_rft_file.c + ecl_rft_node.c + ecl_rft_cell.c + ecl_grid.c + ecl_coarse_cell.c + ecl_box.c + ecl_io_config.c + ecl_file.c + ecl_region.c + ecl_subsidence.c + ecl_grid_dims.c + grid_dims.c + nnc_info.c + ecl_grav_common.c + nnc_vector.c + ecl_nnc_export.c + ecl_nnc_geometry.c layer.c fault_block_layer.c + ecl_type.c + ecl_type_python.c ${ext_source}) -set( header_files - ecl_rsthead.h - ecl_sum_tstep.h - ecl_rst_file.h - ecl_init_file.h - smspec_node.h - ecl_grid_cache.h - ecl_kw_grdecl.h - ecl_file_kw.h - ecl_grav.h - ecl_grav_calc.h - ecl_endian_flip.h - ecl_smspec.h - ecl_sum_data.h - ecl_util.h - ecl_kw.h +set( header_files + ecl_units.h + ecl_rsthead.h + ecl_sum_tstep.h + ecl_rst_file.h + ecl_init_file.h + smspec_node.h + ecl_grid_cache.h + ecl_kw_grdecl.h + ecl_file_kw.h + ecl_grav.h + ecl_grav_calc.h + ecl_endian_flip.h + ecl_smspec.h + ecl_sum_data.h + ecl_util.h + ecl_kw.h ecl_sum.h ecl_sum_vector.h - fortio.h - ecl_rft_file.h - ecl_rft_node.h - ecl_rft_cell.h - ecl_box.h - ecl_coarse_cell.h - ecl_grid.h - ecl_io_config.h + fortio.h + ecl_rft_file.h + ecl_rft_node.h + ecl_rft_cell.h + ecl_box.h + ecl_coarse_cell.h + ecl_grid.h + ecl_io_config.h ecl_file.h - ecl_file_view.h - ecl_region.h - ecl_kw_magic.h - ecl_subsidence.h - ecl_grid_dims.h - grid_dims.h - nnc_info.h - nnc_vector.h - ecl_grav_common.h - ecl_nnc_export.h + ecl_file_view.h + ecl_region.h + ecl_kw_magic.h + ecl_subsidence.h + ecl_grid_dims.h + grid_dims.h + nnc_info.h + nnc_vector.h + ecl_grav_common.h + ecl_nnc_export.h + ecl_nnc_geometry.h layer.h fault_block.h fault_block_layer.h + ecl_type.h ${ext_header}) if (ERT_USE_OPENMP) @@ -90,7 +96,7 @@ if (ERT_USE_OPENMP) set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${OpenMP_SHARED_LINKER_FLAGS}") endif() -add_library( ecl ${LIBRARY_TYPE} ${source_files} ) +add_library( ecl ${source_files} ) set_target_properties( ecl PROPERTIES VERSION ${ERT_VERSION_MAJOR}.${ERT_VERSION_MINOR} SOVERSION ${ERT_VERSION_MAJOR}) if (USE_RUNPATH) add_runpath( ecl ) @@ -98,7 +104,7 @@ endif() target_link_libraries( ecl ert_geometry ert_util ) #----------------------------------------------------------------- -if (INSTALL_ERT) +if (INSTALL_ERT) install(TARGETS ecl DESTINATION ${CMAKE_INSTALL_LIBDIR}) foreach(header ${header_files}) install(FILES ../include/ert/ecl/${header} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/ert/ecl) diff --git a/ThirdParty/Ert/libecl/src/ecl_file.c b/ThirdParty/Ert/libecl/src/ecl_file.c index be07878a59..5a5f3c695f 100644 --- a/ThirdParty/Ert/libecl/src/ecl_file.c +++ b/ThirdParty/Ert/libecl/src/ecl_file.c @@ -36,6 +36,7 @@ #include #include #include +#include /** This file implements functionality to load an ECLIPSE file in @@ -418,8 +419,8 @@ ecl_kw_type * ecl_file_iget_kw( const ecl_file_type * file , int global_index) { return ecl_file_view_iget_kw( file->active_view , global_index); } -ecl_type_enum ecl_file_iget_type( const ecl_file_type * file , int global_index) { - return ecl_file_view_iget_type( file->active_view , global_index); +ecl_data_type ecl_file_iget_data_type( const ecl_file_type * file , int global_index) { + return ecl_file_view_iget_data_type( file->active_view , global_index); } int ecl_file_iget_size( const ecl_file_type * file , int global_index) { @@ -446,8 +447,8 @@ void ecl_file_indexed_read(const ecl_file_type * file , const char * kw, int ind ecl_file_view_index_fload_kw(file->active_view, kw, index, index_map, buffer); } -ecl_type_enum ecl_file_iget_named_type( const ecl_file_type * file , const char * kw , int ith) { - return ecl_file_view_iget_named_type( file->active_view , kw , ith ); +ecl_data_type ecl_file_iget_named_data_type( const ecl_file_type * file , const char * kw , int ith) { + return ecl_file_view_iget_named_data_type( file->active_view , kw , ith ); } int ecl_file_iget_named_size( const ecl_file_type * file , const char * kw , int ith) { @@ -515,7 +516,7 @@ static bool ecl_file_scan( ecl_file_type * ecl_file ) { bool scan_ok = false; fortio_fseek( ecl_file->fortio , 0 , SEEK_SET ); { - ecl_kw_type * work_kw = ecl_kw_alloc_new("WORK-KW" , 0 , ECL_INT_TYPE , NULL); + ecl_kw_type * work_kw = ecl_kw_alloc_new("WORK-KW" , 0 , ECL_INT , NULL); while (true) { if (fortio_read_at_eof(ecl_file->fortio)) { @@ -525,14 +526,19 @@ static bool ecl_file_scan( ecl_file_type * ecl_file ) { { offset_type current_offset = fortio_ftell( ecl_file->fortio ); - if (ecl_kw_fread_header( work_kw , ecl_file->fortio)) { + ecl_read_status_enum read_status = ecl_kw_fread_header( work_kw , ecl_file->fortio); + if (read_status == ECL_KW_READ_FAIL) { + printf("Skipping on read:%s \n", ecl_kw_get_header( work_kw )); + break; + } + + if (read_status == ECL_KW_READ_OK) { ecl_file_kw_type * file_kw = ecl_file_kw_alloc( work_kw , current_offset); if (ecl_file_kw_fskip_data( file_kw , ecl_file->fortio )) ecl_file_view_add_kw( ecl_file->global_view , file_kw ); else break; - } else - break; + } } } @@ -698,12 +704,21 @@ ecl_version_enum ecl_file_get_ecl_version( const ecl_file_type * file ) { if (int_value == INTEHEAD_ECLIPSE100_VALUE) return ECLIPSE100; - else if ((int_value == INTEHEAD_ECLIPSE300_VALUE) || (int_value == INTEHEAD_ECLIPSE300THERMAL_VALUE)) + + if (int_value == INTEHEAD_ECLIPSE300_VALUE) return ECLIPSE300; - else { - util_abort("%s: ECLIPSE version value:%d not recognized \n",__func__ , int_value ); - return -1; - } + + if (int_value == INTEHEAD_ECLIPSE300THERMAL_VALUE) + return ECLIPSE300_THERMAL; + + if (int_value == INTEHEAD_INTERSECT_VALUE) + return INTERSECT; + + if (int_value == INTEHEAD_FRONTSIM_VALUE) + return FRONTSIM; + + util_abort("%s: Simulator version value:%d not recognized \n",__func__ , int_value ); + return -1; } /* diff --git a/ThirdParty/Ert/libecl/src/ecl_file_kw.c b/ThirdParty/Ert/libecl/src/ecl_file_kw.c index 64e106589a..4a137974c2 100644 --- a/ThirdParty/Ert/libecl/src/ecl_file_kw.c +++ b/ThirdParty/Ert/libecl/src/ecl_file_kw.c @@ -57,7 +57,7 @@ struct inv_map_struct { struct ecl_file_kw_struct { UTIL_TYPE_ID_DECLARATION; offset_type file_offset; - ecl_type_enum ecl_type; + ecl_data_type data_type; int kw_size; char * header; ecl_kw_type * kw; @@ -135,13 +135,13 @@ UTIL_IS_INSTANCE_FUNCTION( ecl_file_kw , ECL_FILE_KW_TYPE_ID ) -static ecl_file_kw_type * ecl_file_kw_alloc__( const char * header , ecl_type_enum ecl_type , int size , offset_type offset) { +static ecl_file_kw_type * ecl_file_kw_alloc__( const char * header , ecl_data_type data_type , int size , offset_type offset) { ecl_file_kw_type * file_kw = util_malloc( sizeof * file_kw ); UTIL_TYPE_ID_INIT( file_kw , ECL_FILE_KW_TYPE_ID ); file_kw->header = util_alloc_string_copy( header ); + memcpy(&file_kw->data_type, &data_type, sizeof data_type); file_kw->kw_size = size; - file_kw->ecl_type = ecl_type; file_kw->file_offset = offset; file_kw->kw = NULL; @@ -161,7 +161,7 @@ static ecl_file_kw_type * ecl_file_kw_alloc__( const char * header , ecl_type_en */ ecl_file_kw_type * ecl_file_kw_alloc( const ecl_kw_type * ecl_kw , offset_type offset ) { - return ecl_file_kw_alloc__( ecl_kw_get_header( ecl_kw ) , ecl_kw_get_type( ecl_kw ) , ecl_kw_get_size( ecl_kw ) , offset ); + return ecl_file_kw_alloc__( ecl_kw_get_header( ecl_kw ) , ecl_kw_get_data_type( ecl_kw ) , ecl_kw_get_size( ecl_kw ) , offset ); } @@ -169,7 +169,7 @@ ecl_file_kw_type * ecl_file_kw_alloc( const ecl_kw_type * ecl_kw , offset_type o Does NOT copy the kw pointer which must be reloaded. */ ecl_file_kw_type * ecl_file_kw_alloc_copy( const ecl_file_kw_type * src ) { - return ecl_file_kw_alloc__( src->header , src->ecl_type , src->kw_size , src->file_offset ); + return ecl_file_kw_alloc__( src->header , ecl_file_kw_get_data_type(src) , src->kw_size , src->file_offset ); } @@ -193,7 +193,10 @@ void ecl_file_kw_free__( void * arg ) { static void ecl_file_kw_assert_kw( const ecl_file_kw_type * file_kw ) { - if (file_kw->ecl_type != ecl_kw_get_type( file_kw->kw )) + if(!ecl_type_is_equal( + ecl_file_kw_get_data_type(file_kw), + ecl_kw_get_data_type(file_kw->kw) + )) util_abort("%s: type mismatch between header and file.\n",__func__); if (file_kw->kw_size != ecl_kw_get_size( file_kw->kw )) @@ -265,18 +268,20 @@ bool ecl_file_kw_ptr_eq( const ecl_file_kw_type * file_kw , const ecl_kw_type * void ecl_file_kw_replace_kw( ecl_file_kw_type * file_kw , fortio_type * target , ecl_kw_type * new_kw ) { - if ((file_kw->ecl_type == ecl_kw_get_type( new_kw )) && - (file_kw->kw_size == ecl_kw_get_size( new_kw ))) { + if (!ecl_type_is_equal( + ecl_file_kw_get_data_type(file_kw), + ecl_kw_get_data_type(new_kw) + )) + util_abort("%s: sorry type mismatch between in-file keyword and new keyword \n",__func__); + if((file_kw->kw_size == ecl_kw_get_size( new_kw ))) + util_abort("%s: sorry size mismatch between in-file keyword and new keyword \n",__func__); - if (file_kw->kw != NULL) - ecl_kw_free( file_kw->kw ); - - file_kw->kw = new_kw; - fortio_fseek( target , file_kw->file_offset , SEEK_SET ); - ecl_kw_fwrite( file_kw->kw , target ); + if (file_kw->kw != NULL) + ecl_kw_free( file_kw->kw ); - } else - util_abort("%s: sorry size/type mismatch between in-file keyword and new keyword \n",__func__); + file_kw->kw = new_kw; + fortio_fseek( target , file_kw->file_offset , SEEK_SET ); + ecl_kw_fwrite( file_kw->kw , target ); } @@ -289,8 +294,8 @@ int ecl_file_kw_get_size( const ecl_file_kw_type * file_kw ) { return file_kw->kw_size; } -ecl_type_enum ecl_file_kw_get_type( const ecl_file_kw_type * file_kw) { - return file_kw->ecl_type; +ecl_data_type ecl_file_kw_get_data_type(const ecl_file_kw_type * file_kw) { + return file_kw->data_type; } offset_type ecl_file_kw_get_offset(const ecl_file_kw_type * file_kw) { @@ -298,7 +303,7 @@ offset_type ecl_file_kw_get_offset(const ecl_file_kw_type * file_kw) { } bool ecl_file_kw_fskip_data( const ecl_file_kw_type * file_kw , fortio_type * fortio) { - return ecl_kw_fskip_data__( file_kw->ecl_type , file_kw->kw_size , fortio ); + return ecl_kw_fskip_data__( ecl_file_kw_get_data_type(file_kw) , file_kw->kw_size , fortio ); } diff --git a/ThirdParty/Ert/libecl/src/ecl_file_view.c b/ThirdParty/Ert/libecl/src/ecl_file_view.c index 38f6921270..8798a90caf 100644 --- a/ThirdParty/Ert/libecl/src/ecl_file_view.c +++ b/ThirdParty/Ert/libecl/src/ecl_file_view.c @@ -27,6 +27,7 @@ #include #include #include +#include struct ecl_file_view_struct { @@ -166,10 +167,10 @@ void ecl_file_view_index_fload_kw(const ecl_file_view_type * ecl_file_view, cons if (fortio_assert_stream_open( ecl_file_view->fortio )) { offset_type offset = ecl_file_kw_get_offset(file_kw); - ecl_type_enum ecl_type = ecl_file_kw_get_type(file_kw); + ecl_data_type data_type = ecl_file_kw_get_data_type(file_kw); int element_count = ecl_file_kw_get_size(file_kw); - ecl_kw_fread_indexed_data(ecl_file_view->fortio, offset + ECL_KW_HEADER_FORTIO_SIZE, ecl_type, element_count, index_map, buffer); + ecl_kw_fread_indexed_data(ecl_file_view->fortio, offset + ECL_KW_HEADER_FORTIO_SIZE, data_type, element_count, index_map, buffer); } } @@ -204,9 +205,9 @@ int ecl_file_view_get_size( const ecl_file_view_type * ecl_file_view ) { } -ecl_type_enum ecl_file_view_iget_type( const ecl_file_view_type * ecl_file_view , int index) { +ecl_data_type ecl_file_view_iget_data_type( const ecl_file_view_type * ecl_file_view , int index) { ecl_file_kw_type * file_kw = ecl_file_view_iget_file_kw( ecl_file_view , index ); - return ecl_file_kw_get_type( file_kw ); + return ecl_file_kw_get_data_type( file_kw ); } int ecl_file_view_iget_size( const ecl_file_view_type * ecl_file_view , int index) { @@ -235,9 +236,9 @@ ecl_kw_type * ecl_file_view_iget_named_kw( const ecl_file_view_type * ecl_file_v return ecl_kw; } -ecl_type_enum ecl_file_view_iget_named_type( const ecl_file_view_type * ecl_file_view , const char * kw , int ith) { +ecl_data_type ecl_file_view_iget_named_data_type( const ecl_file_view_type * ecl_file_view , const char * kw , int ith) { ecl_file_kw_type * file_kw = ecl_file_view_iget_named_file_kw( ecl_file_view , kw, ith); - return ecl_file_kw_get_type( file_kw ); + return ecl_file_kw_get_data_type( file_kw ); } int ecl_file_view_iget_named_size( const ecl_file_view_type * ecl_file_view , const char * kw , int ith) { @@ -357,10 +358,12 @@ void ecl_file_view_fprintf_kw_list(const ecl_file_view_type * ecl_file_view , FI int i; for (i=0; i < vector_get_size( ecl_file_view->kw_list ); i++) { const ecl_file_kw_type * file_kw = vector_iget_const( ecl_file_view->kw_list , i ); + char * type_name = ecl_type_alloc_name(ecl_file_kw_get_data_type(file_kw)); fprintf(stream , "%-8s %7d:%s\n", ecl_file_kw_get_header( file_kw ) , ecl_file_kw_get_size( file_kw ) , - ecl_util_get_type_name( ecl_file_kw_get_type( file_kw ))); + type_name); + free(type_name); } } diff --git a/ThirdParty/Ert/libecl/src/ecl_grav.c b/ThirdParty/Ert/libecl/src/ecl_grav.c index a53409b8db..a763f111f0 100644 --- a/ThirdParty/Ert/libecl/src/ecl_grav.c +++ b/ThirdParty/Ert/libecl/src/ecl_grav.c @@ -133,7 +133,7 @@ static const char * get_den_kw( ecl_phase_enum phase , ecl_version_enum ecl_vers util_abort("%s: unrecognized phase id:%d \n",__func__ , phase); return NULL; } - } else if (ecl_version == ECLIPSE300) { + } else if ((ecl_version == ECLIPSE300) || (ecl_version == ECLIPSE300_THERMAL)) { switch( phase ) { case( ECL_OIL_PHASE ): return ECLIPSE300_OIL_DEN_KW; @@ -149,7 +149,7 @@ static const char * get_den_kw( ecl_phase_enum phase , ecl_version_enum ecl_vers return NULL; } } else { - util_abort("%s: unrecognized version id:%d \n",__func__ , ecl_version); + util_abort("%s: unrecognized simulator id:%d \n",__func__ , ecl_version); return NULL; } } diff --git a/ThirdParty/Ert/libecl/src/ecl_grav_common.c b/ThirdParty/Ert/libecl/src/ecl_grav_common.c index 515f55ebdf..024a44c09f 100644 --- a/ThirdParty/Ert/libecl/src/ecl_grav_common.c +++ b/ThirdParty/Ert/libecl/src/ecl_grav_common.c @@ -38,16 +38,16 @@ bool * ecl_grav_common_alloc_aquifer_cell( const ecl_grid_cache_type * grid_cache , const ecl_file_type * init_file) { bool * aquifer_cell = util_calloc( ecl_grid_cache_get_size( grid_cache ) , sizeof * aquifer_cell ); + for (int active_index = 0; active_index < ecl_grid_cache_get_size( grid_cache ); active_index++) + aquifer_cell[ active_index ] = false; + if (ecl_file_has_kw( init_file , AQUIFER_KW)) { ecl_kw_type * aquifer_kw = ecl_file_iget_named_kw( init_file , AQUIFER_KW , 0); const int * aquifer_data = ecl_kw_get_int_ptr( aquifer_kw ); - int active_index; - for (active_index = 0; active_index < ecl_grid_cache_get_size( grid_cache ); active_index++) { + for (int active_index = 0; active_index < ecl_grid_cache_get_size( grid_cache ); active_index++) { if (aquifer_data[ active_index ] < 0) aquifer_cell[ active_index ] = true; - else - aquifer_cell[ active_index ] = false; } } @@ -63,7 +63,7 @@ double ecl_grav_common_eval_biot_savart( const ecl_grid_cache_type * grid_cache double sum = 0; if (region == NULL) { const int size = ecl_grid_cache_get_size( grid_cache ); - int index; + int index; for ( index = 0; index < size; index++) { if (!aquifer[index]) { double dist_x = (xpos[index] - utm_x ); @@ -99,3 +99,65 @@ double ecl_grav_common_eval_biot_savart( const ecl_grid_cache_type * grid_cache } +static inline double ecl_grav_common_eval_geertsma_kernel(int index, const double * xpos, const double * ypos, const double * zpos , double utm_x , double utm_y , double depth, double poisson_ratio, double seabed) { + double z = zpos[index]; + z -= seabed; + double dist_x = xpos[index] - utm_x; + double dist_y = ypos[index] - utm_y; + + double dist_z1 = z - depth; + double dist_z2 = dist_z1 - 2*z; + + double dist1 = sqrt( dist_x*dist_x + dist_y*dist_y + dist_z1*dist_z1 ); + double dist2 = sqrt( dist_x*dist_x + dist_y*dist_y + dist_z2*dist_z2 ); + + double cube_dist1 = dist1*dist1*dist1; + double cube_dist2 = dist2*dist2*dist2; + + double displacement = + dist_z1 / cube_dist1 + + (3 - 4*poisson_ratio)*dist_z2 / cube_dist2 - + 6*depth * (z + depth) * dist_z2 / (dist2*dist2*cube_dist2) + + 2*((3 - 4*poisson_ratio)*(z + depth) - depth)/cube_dist2 ; + + return displacement; +} + + +double ecl_grav_common_eval_geertsma( const ecl_grid_cache_type * grid_cache , ecl_region_type * region , const bool * aquifer , const double * weight , double utm_x , double utm_y , double depth, double poisson_ratio, double seabed) { + const double * xpos = ecl_grid_cache_get_xpos( grid_cache ); + const double * ypos = ecl_grid_cache_get_ypos( grid_cache ); + const double * zpos = ecl_grid_cache_get_zpos( grid_cache ); + double sum = 0; + if (region == NULL) { + const int size = ecl_grid_cache_get_size( grid_cache ); + int index; + for ( index = 0; index < size; index++) { + if (!aquifer[index]) { + + double displacement = ecl_grav_common_eval_geertsma_kernel( index, xpos , ypos , zpos, utm_x, utm_y , depth, poisson_ratio, seabed); + + /** + For numerical precision it might be benficial to use the + util_kahan_sum() function to do a Kahan summation. + */ + sum += weight[index] * displacement; + } + } + } else { + const int_vector_type * index_vector = ecl_region_get_active_list( region ); + const int size = int_vector_size( index_vector ); + const int * index_list = int_vector_get_const_ptr( index_vector ); + int i, index; + for (i = 0; i < size; i++) { + index = index_list[i]; + if (!aquifer[index]) { + double displacement = ecl_grav_common_eval_geertsma_kernel( index, xpos , ypos , zpos, utm_x, utm_y , depth , poisson_ratio, seabed); + sum += weight[index] * displacement; + } + } + } + return sum; +} + + diff --git a/ThirdParty/Ert/libecl/src/ecl_grid.c b/ThirdParty/Ert/libecl/src/ecl_grid.c index 38a26a88b0..0e2dd610ef 100644 --- a/ThirdParty/Ert/libecl/src/ecl_grid.c +++ b/ThirdParty/Ert/libecl/src/ecl_grid.c @@ -33,6 +33,7 @@ #include #include +#include #include #include #include @@ -492,45 +493,55 @@ Warning: The main author of this code suspects that the coordinate system can be right-handed as well, giving a z axis which will increase 'towards the sky'; the safest is probaly to check this explicitly if it matters for the case at hand. + +Method 0 corresponds to a tetrahedron decomposition which will split +the lower layer along the 1-2 diagonal and the upper layer along the +4-7 diagonal, method 1 corresponds to the alternative decomposition +which splits the lower face along the 0-3 diagnoal and the upper face +along the 5-6 diagonal. */ -static const int tetrahedron_permutations[2][12][3] = {{{0,1,2}, + +static const int tetrahedron_permutations[2][12][3] = {{ + // K- + {0,1,2}, {3,2,1}, - {0,4,1}, - {5,1,4}, + // J+ + {6,2,7}, + {3,7,2}, + // I- {0,2,4}, {6,4,2}, - {3,7,2}, - {6,2,7}, + // I+ {3,1,7}, {5,7,1}, + // J- + {0,4,1}, + {5,1,4}, + // K+ {5,4,7}, - {6,7,4}}, - {{1,5,3}, + {6,7,4} + }, + { + // K- {1,3,0}, - {1,0,5}, {2,0,3}, - {2,6,0}, + // J+ {2,3,6}, - {4,5,0}, - {4,6,5}, + {7,6,3}, + // I- + {2,6,0}, {4,0,6}, - {7,5,6}, + // I+ {7,3,5}, - {7,6,3}}}; - - - - - - - -static const int bounding_planes[6][3] = {{0,1,2}, - {0,2,4}, - {0,4,1}, - {4,6,5}, - {2,3,6}, - {1,5,3}}; + {1,5,3}, + // J- + {1,0,5}, + {4,5,0}, + // K+ + {7,5,6}, + {4,6,5} + }}; @@ -605,37 +616,6 @@ static double point_dot_product( const point_type * v1 , const point_type * v2) return v1->x*v2->x + v1->y*v2->y + v1->z*v2->z; } -static bool point_equal( const point_type *p1 , const point_type * p2) { - return (memcmp( p1 , p2 , sizeof * p1 ) == 0); -} - -/** - This function calculates the (signed) distance from point 'p' to - the plane specifed by the plane vector 'n' and the point - 'plane_point' which is part of the plane. -*/ - -static double point_plane_distance(const point_type * p , const point_type * n , const point_type * plane_point) { - point_type diff = *p; - point_inplace_sub( &diff, plane_point ); - return point_dot_product( n, &diff ); -} - -static void point_normal_vector(point_type * n, const point_type * p0, const point_type * p1 , const point_type * p2) { - point_type v1 = *p1; - point_type v2 = *p2; - - point_inplace_sub( &v1, p0 ); - point_inplace_sub( &v2, p0 ); - - point_vector_cross( n, &v1, &v2 ); -} - -static double point3_plane_distance(const point_type * p0 , const point_type * p1 , const point_type * p2 , const point_type * x) { - point_type n; - point_normal_vector( &n , p0 , p1 , p2 ); - return point_plane_distance( x , &n , p0 ) / sqrt( n.x*n.x + n.y*n.y + n.z*n.z); -} static void point_compare( const point_type *p1 , const point_type * p2, bool * equal) { const double tolerance = 0.001; @@ -700,7 +680,8 @@ typedef struct ecl_cell_struct ecl_cell_type; #define GET_CELL_FLAG(cell,flag) (((cell->cell_flags & (flag)) == 0) ? false : true) #define SET_CELL_FLAG(cell,flag) ((cell->cell_flags |= (flag))) -#define METER_TO_FEET_SCALE_FACTOR 3.28084 +#define METER_TO_FEET_SCALE_FACTOR 3.28084 +#define METER_TO_CM_SCALE_FACTOR 100.0 struct ecl_cell_struct { point_type center; @@ -1065,6 +1046,21 @@ static void ecl_cell_taint_cell( ecl_cell_type * cell ) { } + +static int ecl_cell_get_twist( const ecl_cell_type * cell ) { + int twist_count = 0; + + for (int c = 0; c < 4; c++) { + const point_type * p1 = &cell->corner_list[c]; + const point_type * p2 = &cell->corner_list[c + 4]; + if ((p2->z - p1->z) < 0) + twist_count += 1; + } + return twist_count; +} + + + /*****************************************************************/ @@ -1112,6 +1108,7 @@ static void ecl_cell_set_center( ecl_cell_type * cell) { } + static void ecl_cell_assert_center( ecl_cell_type * cell) { if (!GET_CELL_FLAG(cell , CELL_FLAG_CENTER)) ecl_cell_set_center( cell ); @@ -1229,6 +1226,35 @@ static inline double tetrahedron_volume6( tetrahedron_type tet ) { return tet.p0.x*bxc.x + tet.p0.y*bxc.y + tet.p0.z*bxc.z; } +/* + Returns true if and only if the point p is inside the tetrahedron tet. +*/ +static bool tetrahedron_contains(tetrahedron_type tet, const point_type p) { + const double epsilon = 1e-9; + double tetra_volume = fabs(tetrahedron_volume6(tet)); + + if(tetra_volume < epsilon) + return false; + + // Decomposes tetrahedron into 4 new tetrahedrons + point_type tetra_points[4] = {tet.p0, tet.p1, tet.p2, tet.p3}; + double decomposition_volume = 0; + for(int i = 0; i < 4; ++i) { + const point_type tmp = tetra_points[i]; + tetra_points[i] = p; + + // Compute volum of decomposition tetrahedron + tetrahedron_type dec_tet; + dec_tet.p0 = tetra_points[0]; dec_tet.p1 = tetra_points[1]; + dec_tet.p2 = tetra_points[2]; dec_tet.p3 = tetra_points[3]; + decomposition_volume += fabs(tetrahedron_volume6(dec_tet)); + + tetra_points[i] = tmp; + } + + return (fabs(tetra_volume - decomposition_volume) < epsilon); +} + /* * This function used to account for a significant amount of execution time * when used in opm-parser and has been optimised significantly. This means @@ -1279,7 +1305,7 @@ static double ecl_cell_get_signed_volume( ecl_cell_type * cell) { * 6 * Since sum( |a·(b x c)| ) / 6 is equal to * sum( |a·(b x c)| / 6 ) we can do the (rather expensive) division only once - * and stil get the correct result. We multiply by 0.5 because we've now + * and still get the correct result. We multiply by 0.5 because we've now * considered two decompositions of the tetrahedron, and want their average. * * @@ -1339,6 +1365,52 @@ static bool triangle_contains(const point_type *p0 , const point_type * p1 , con } } +static double parallelogram_area3d(const point_type * p0, const point_type * p1, const point_type * p2) { + point_type a = *p1; + point_type b = *p2; + point_inplace_sub(&a, p0); + point_inplace_sub(&b, p0); + + point_type c; + point_vector_cross(&c, &a, &b); + return sqrt(point_dot_product(&c, &c)); +} + +/* + * Returns true if and only if point p is contained in the triangle denoted by + * p0, p1 and p2. Note that if the triangle is a line, the function will still + * return true if the point lies on the line segment. + */ +static bool triangle_contains3d(const point_type *p0 , const point_type * p1 , const point_type *p2 , const point_type *p) { + double epsilon = 1e-10; + double vt = parallelogram_area3d(p0, p1, p2); + + double v1 = parallelogram_area3d(p0, p1, p); + double v2 = parallelogram_area3d(p0, p2, p); + double v3 = parallelogram_area3d(p1, p2, p); + + // p0, p1, p2 represents a line segment and + // p lies on the line this segment represents + if(vt < epsilon && fabs(v1+v2+v3) < epsilon) { + double x_min = util_double_min(p0->x, util_double_min(p1->x, p2->x)); + double x_max = util_double_max(p0->x, util_double_max(p1->x, p2->x)); + + double y_min = util_double_min(p0->y, util_double_min(p1->y, p2->y)); + double y_max = util_double_max(p0->y, util_double_max(p1->y, p2->y)); + + double z_min = util_double_min(p0->z, util_double_min(p1->z, p2->z)); + double z_max = util_double_max(p0->z, util_double_max(p1->z, p2->z)); + + return ( + x_min-epsilon <= p->x && p->x <= x_max+epsilon && + y_min-epsilon <= p->y && p->y <= y_max+epsilon && + z_min-epsilon <= p->z && p->z <= z_max+epsilon + ); + } + + return (fabs( vt - (v1 + v2 + v3 )) < epsilon); +} + @@ -1507,7 +1579,7 @@ static ecl_grid_type * ecl_grid_alloc_empty(ecl_grid_type * global_grid , int du grid->index_map = NULL; grid->fracture_index_map = NULL; grid->inv_fracture_index_map = NULL; - grid->unit_system = ERT_ECL_METRIC_UNITS; + grid->unit_system = ECL_METRIC_UNITS; if (global_grid != NULL) { @@ -2152,10 +2224,7 @@ static void ecl_grid_set_lgr_name_GRID(ecl_grid_type * lgr_grid , const ecl_file the zcorn vector. */ -int ecl_grid_zcorn_index(const ecl_grid_type * grid , int i, int j , int k , int c) { - int nx = grid->nx; - int ny = grid->ny; - +int ecl_grid_zcorn_index__(int nx, int ny , int i, int j , int k , int c) { int zcorn_index = k*8*nx*ny + j*4*nx + 2*i; if ((c % 2) == 1) zcorn_index += 1; @@ -2172,6 +2241,9 @@ int ecl_grid_zcorn_index(const ecl_grid_type * grid , int i, int j , int k , int return zcorn_index; } +int ecl_grid_zcorn_index(const ecl_grid_type * grid , int i, int j , int k , int c) { + return ecl_grid_zcorn_index__( grid->nx, grid->ny , i , j , k , c ); +} static void ecl_grid_init_GRDECL_data_jslice(ecl_grid_type * ecl_grid , const float * zcorn , const float * coord , const int * actnum, const int * corsnum , int j) { @@ -2273,7 +2345,7 @@ static ecl_grid_type * ecl_grid_alloc_GRDECL_data__(ecl_grid_type * global_grid if (corsnum != NULL) ecl_grid->coarsening_active = true; - ecl_grid->coord_kw = ecl_kw_alloc_new("COORD" , 6*(nx + 1) * (ny + 1) , ECL_FLOAT_TYPE , coord ); + ecl_grid->coord_kw = ecl_kw_alloc_new("COORD" , 6*(nx + 1) * (ny + 1) , ECL_FLOAT , coord ); ecl_grid_init_GRDECL_data( ecl_grid , zcorn , coord , actnum , corsnum); ecl_grid_init_coarse_cells( ecl_grid ); @@ -2651,9 +2723,16 @@ static void ecl_grid_init_nnc(ecl_grid_type * main_grid, ecl_file_type * ecl_fil int num_nnchead_kw = ecl_file_get_num_named_kw( ecl_file , NNCHEAD_KW ); int i; - if(num_nnchead_kw > 0 && main_grid->eclipse_version == 2015){ - return; //Eclipse 2015 has an error with nnc. - } + /* + NB: There is a bug in Eclipse version 2015.1, for MPI runs with + six or more processors (I think ...) the NNC datastructures + are in an internally inconsistent state; and will lead to a + hard crash. The issue has been fixed in version 2015.2, but + unfortunately it is not possible to test for micro version. + + if(num_nnchead_kw > 0 && main_grid->eclipse_version == 2015) + return; + */ for (i = 0; i < num_nnchead_kw; i++) { ecl_file_view_type * lgr_view = ecl_file_alloc_global_blockview(ecl_file , NNCHEAD_KW , i); @@ -3749,143 +3828,268 @@ bool ecl_grid_compare(const ecl_grid_type * g1 , const ecl_grid_type * g2 , bool /*****************************************************************/ -bool ecl_grid_cell_contains_xyz1( const ecl_grid_type * ecl_grid , int global_index , double x , double y , double z) { - const double min_volume = 1e-9; - point_type p; - ecl_cell_type * cell = ecl_grid_get_cell( ecl_grid , global_index ); - - point_set( &p , x , y , z); - /* - 1. first check if the point z value is below the deepest point of - the cell, or above the shallowest => return false. +typedef enum {NOT_ON_FACE, BELONGS_TO_CELL, BELONGS_TO_OTHER} face_status_enum; - 2. should do similar fast checks in x/y direction. - - 3. full geometric verification. - */ - if (GET_CELL_FLAG(cell , CELL_FLAG_TAINTED)) +/* + Returns whether the given point is contained within the minimal cube + encapsulating the cell that has all faces parallel to a coordinate plane. +*/ +static bool ecl_grid_cube_contains(const ecl_cell_type * cell, const point_type * p) { + if (p->z < ecl_cell_min_z( cell )) return false; - if (p.z < ecl_cell_min_z( cell )) + if (p->z > ecl_cell_max_z( cell )) return false; - if (p.z > ecl_cell_max_z( cell )) + if (p->x < ecl_cell_min_x( cell )) return false; - if (p.x < ecl_cell_min_x( cell )) + if (p->x > ecl_cell_max_x( cell )) return false; - if (p.x > ecl_cell_max_x( cell )) + if (p->y < ecl_cell_min_y( cell )) return false; - if (p.y < ecl_cell_min_y( cell )) + if (p->y > ecl_cell_max_y( cell )) return false; - if (p.y > ecl_cell_max_y( cell )) - return false; + return true; +} - { - int i,j,k; - ecl_grid_get_ijk1( ecl_grid , global_index , &i , &j , &k); - ecl_cell_assert_center( cell ); +/* + Returns true if and only if p is on plane "plane" of cell when decomposed by "method". +*/ +static bool ecl_grid_on_plane(const ecl_cell_type * cell, const int method, + const int plane, const point_type * p) { + const point_type * p0 = &cell->corner_list[ tetrahedron_permutations[method][plane][0] ]; + const point_type * p1 = &cell->corner_list[ tetrahedron_permutations[method][plane][1] ]; + const point_type * p2 = &cell->corner_list[ tetrahedron_permutations[method][plane][2] ]; + return triangle_contains3d(p0, p1, p2, p); +} - /* - Special case checks for the corner points. - */ - if (point_equal( &p , &cell->corner_list[0])) - return true; +/* + Returns true if and only if p is on one of the cells faces and + "belongs" to this cell. This is done such that every point is contained in at most + one point. + + Known caveats when using this function: + - if a point is on the surface of a/many cells, but for all of these cells + the point is contained on two opposite sides of the cell. Imagine a cake + being cut as a cake should be cut. To which of the slices does the center + point of the cake belong? This is a somewhat obscure situation and it is + not possible to circumvent by only considering the grid cell by cell. + - if there is a fault and this cell is on the border of the grid. + - if a cells projection to the xy-plane is concave, this method might give + false positives. + + Note: The correctness of this function relies *HEAVILY* on the permutation of the + tetrahedrons in the decompositions. +*/ +static face_status_enum ecl_grid_on_cell_face(const ecl_cell_type * cell, const int method, + const point_type * p, + const bool max_i, const bool max_j, const bool max_k) { - if (point_equal( &p , &cell->corner_list[1] )) { - if (i == (ecl_grid->nx - 1)) - return true; - else - return false; - } + int k_minus = 0, j_pluss = 1, i_minus = 2, i_pluss = 3, j_minus = 4, k_pluss = 5; + bool on[6]; + for(int i = 0; i < 6; ++i) { + on[i] = ( + ecl_grid_on_plane(cell, method, 2*i, p) || + ecl_grid_on_plane(cell, method, 2*i+1, p) + ); + } - if (point_equal( &p , &cell->corner_list[2])) { - if (j == (ecl_grid->ny - 1)) - return true; - else - return false; - } + // Not on any of the cell sides + if(!on[k_minus] && !on[k_pluss] && !on[j_pluss] && !on[j_minus] && !on[i_minus] && !on[i_pluss]) + return NOT_ON_FACE; - if (point_equal( &p , &cell->corner_list[3])) { - if ((j == (ecl_grid->ny - 1)) && - (i == (ecl_grid->nx - 1))) - return true; - else - return false; - } + // Handles side collapses, i.e. the point is contained on opposite sides. + // Cell passes on the responsibility if not on border of grid. + bool i_collapse = (on[i_minus] && on[i_pluss]); + bool j_collapse = (on[j_minus] && on[j_pluss]); + bool k_collapse = (on[k_minus] && on[k_pluss]); - if (point_equal( &p , &cell->corner_list[4])) { - if (k == (ecl_grid->nz - 1)) - return true; - else - return false; - } + for(int i = 0; i < 6; ++i) + on[i] &= (!i_collapse || max_i) && (!j_collapse || max_j) && (!k_collapse || max_k); - if (point_equal( &p , &cell->corner_list[5] )) { - if ((i == (ecl_grid->nx - 1)) && - (k == (ecl_grid->nz - 1))) - return true; - else - return false; - } + on[i_minus] &= !on[i_pluss]; + on[j_minus] &= !on[j_pluss]; + on[k_minus] &= !on[k_pluss]; - if (point_equal( &p , &cell->corner_list[6] )) { - if ((j == (ecl_grid->ny - 1)) && - (k == (ecl_grid->nz - 1))) - return true; - else + // Removed from all sides + if(!on[k_minus] && !on[k_pluss] && !on[j_pluss] && !on[j_minus] && !on[i_minus] && !on[i_pluss]) + return BELONGS_TO_OTHER; + + // Not on any of the lower priority sides + if(!on[k_pluss] && !on[j_pluss] && !on[i_pluss]) + return BELONGS_TO_CELL; + + // Contained in cell due to border conditions + // NOTE: One should read X <= Y as X "implies" Y + if((on[i_pluss] <= max_i) && (on[j_pluss] <= max_j) && (on[k_pluss] <= max_k)) + return BELONGS_TO_CELL; + + return BELONGS_TO_OTHER; +} + +/* + Returns true if and only if the tetrahedron defined by p0, p1, p2, p3 + contains p. + + The sole purpose of this functions is to make concave_cell_contains + more readable. +*/ +static bool tetrahedron_by_points_contains(const point_type * p0, + const point_type * p1, + const point_type * p2, + const point_type * p3, + const point_type * p) { + + tetrahedron_type pro_tet; + pro_tet.p0 = *p0; + pro_tet.p1 = *p1; + pro_tet.p2 = *p2; + pro_tet.p3 = *p3; + + return tetrahedron_contains(pro_tet, *p); +} + +static bool tetrahedron_positive_volume(const point_type * p0, + const point_type * p1, + const point_type * p2, + const point_type * p3) { + + tetrahedron_type pro_tet; + pro_tet.p0 = *p0; + pro_tet.p1 = *p1; + pro_tet.p2 = *p2; + pro_tet.p3 = *p3; + + return tetrahedron_volume6(pro_tet) >= 0; +} + +/* + Returns true if and only if the cell "cell" decomposed by "method" contains the point "p". + This is done by decomposing the cell into 5 tetrahedrons according to the decomposition + method for the faces. + + Assumes the cell to not be self-intersecting! + + Note: This function relies *HEAVILY* on the permutation of tetrahedron_permutations. +*/ +static bool concave_cell_contains( const ecl_cell_type * cell, int method, const point_type * p) { + + const point_type * dia[2][2] = { + { + &cell->corner_list[tetrahedron_permutations[method][0][1]], + &cell->corner_list[tetrahedron_permutations[method][0][2]] + }, + { + &cell->corner_list[tetrahedron_permutations[method][10][1]], + &cell->corner_list[tetrahedron_permutations[method][10][2]] + } + }; + + const point_type * extra[2][2] = { + { + &cell->corner_list[tetrahedron_permutations[method][0][0]], + &cell->corner_list[tetrahedron_permutations[method][1][0]] + }, + { + &cell->corner_list[tetrahedron_permutations[method][10][0]], + &cell->corner_list[tetrahedron_permutations[method][11][0]] + } + }; + + // Test for containment in cell core + bool contained = tetrahedron_by_points_contains(dia[0][0], dia[1][0], dia[0][1], dia[1][1], p); + + // Test for containment in protrusions + for(int i = 0; i < 2; ++i) { + if(tetrahedron_by_points_contains(dia[i][0], dia[i][1], dia[(i+1)%2][0], extra[i][0], p)) { + contained = true; + + bool on_inner_faces = false; + on_inner_faces |= triangle_contains3d(dia[i][0], dia[(i+1)%2][0], extra[i][0], p); + on_inner_faces |= triangle_contains3d(dia[i][1], dia[(i+1)%2][0], extra[i][0], p); + + if(!on_inner_faces && !tetrahedron_positive_volume(dia[i][0], dia[i][1], dia[(i+1)%2][0], extra[i][0])) return false; } - if (point_equal( &p , &cell->corner_list[7] )) { - if ((i == (ecl_grid->nx - 1)) && - (j == (ecl_grid->ny - 1)) && - (k == (ecl_grid->nz - 1))) - return true; - else + if(tetrahedron_by_points_contains(dia[i][0], dia[(i+1)%2][1], dia[i][1], extra[i][1], p)) { + contained = true; + + bool on_inner_faces = false; + on_inner_faces |= triangle_contains3d(dia[i][0], dia[(i+1)%2][1], extra[i][1], p); + on_inner_faces |= triangle_contains3d(dia[i][1], dia[(i+1)%2][1], extra[i][1], p); + + if(!on_inner_faces && !tetrahedron_positive_volume(dia[i][0], dia[(i+1)%2][1], dia[i][1], extra[i][1])) return false; } + } - { - double sign = 1.0; - int plane_nr = 0; - double signed_volume = ecl_cell_get_signed_volume( cell ); - if (fabs(signed_volume) > min_volume) { - point_type * p0; - point_type * p1; - point_type * p2; - - if (signed_volume < 0) - sign = -1; - { - while (true) { - p0 = &cell->corner_list[ bounding_planes[plane_nr][0] ]; - p1 = &cell->corner_list[ bounding_planes[plane_nr][1] ]; - p2 = &cell->corner_list[ bounding_planes[plane_nr][2] ]; + return contained; +} - if (point_equal(p0, p1) || point_equal(p0,p2) || point_equal(p1,p2)) - return false; +/* + Observe the following quirks with this functions: - if (sign * point3_plane_distance(p0 , p1 , p2 , &p ) < 0) - return false; + - It is quite simple to create a cell where the center point is + actually *not* inside the cell - that might come as a surprise! - plane_nr++; - if (plane_nr == 6) - return true; - } - } - } else - return false; - } + - Cells with nonzero twist are completely discarded from the search, + if the point (x,y,z) "should" have been found on the inside of a + twisted cell the algorithm will incorrectly return false; a + warning will be printed on stderr if a cell is discarded due to + twist. + + - See the documentation of ecl_grid_on_cell_face for caveats regarding + containtment of points of cell faces. +*/ +bool ecl_grid_cell_contains_xyz3( const ecl_grid_type * ecl_grid , int i, int j , int k, double x , double y , double z) { + point_type p; + ecl_cell_type * cell = ecl_grid_get_cell( ecl_grid , ecl_grid_get_global_index3( ecl_grid , i, j , k )); + point_set( &p , x , y , z); + int method = (i + j + k) % 2; // Chooses the approperiate decomposition method for the cell + + if (GET_CELL_FLAG(cell , CELL_FLAG_TAINTED)) + return false; + + // Pruning + if (!ecl_grid_cube_contains(cell, &p)) + return false; + + // Checks if point is on one of the faces of the cell, and if so whether it + // "belongs" to this cell. + bool max_i = (i == ecl_grid->nx-1); + bool max_j = (j == ecl_grid->ny-1); + bool max_k = (k == ecl_grid->nz-1); + face_status_enum face_status = ecl_grid_on_cell_face(cell, method, &p, max_i, max_j, max_k); + + if(face_status != NOT_ON_FACE) { + // Since we might get false positives in the case when the cells + // projections to the xy-plane is concave, we still check whether + // the point is contained in the cell if it face_status is + // BELONGS_TO_CELL. + if(face_status == BELONGS_TO_OTHER) + return false; + } + + // Twisted cells + if (ecl_cell_get_twist(cell) > 0) { + fprintf(stderr, "** Warning: Point (%g,%g,%g) is in vicinity of twisted cell: (%d,%d,%d) - function:%s might be mistaken.\n", x,y,z,i,j,k, __func__); + return false; } + + // We now check whether the point is strictly inside the cell + return concave_cell_contains(cell, method, &p); } -bool ecl_grid_cell_contains_xyz3( const ecl_grid_type * ecl_grid , int i , int j , int k, double x , double y , double z) { - int global_index = ecl_grid_get_global_index3( ecl_grid , i , j , k ); - return ecl_grid_cell_contains_xyz1( ecl_grid , global_index , x ,y , z); + +bool ecl_grid_cell_contains_xyz1( const ecl_grid_type * ecl_grid , int global_index, double x , double y , double z) { + int i,j,k; + ecl_grid_get_ijk1( ecl_grid , global_index , &i , &j , &k); + return ecl_grid_cell_contains_xyz3( ecl_grid , i,j,k,x ,y , z); } /** @@ -4013,7 +4217,9 @@ int ecl_grid_get_global_index_from_xyz(ecl_grid_type * grid , double x , double else { /* Try boxes 2, 4, 8, ..., 64 */ for (int bx = 1; bx <= 6; bx++) { - global_index = ecl_grid_get_global_index_from_xyz_around_box( grid , x, y, z, start_index, 1<= 0) return global_index; } @@ -4021,29 +4227,25 @@ int ecl_grid_get_global_index_from_xyz(ecl_grid_type * grid , double x , double } /* - OK - the attempted shortcuts did not pay off. We start on the - full linear search starting from start_index. + OK - the attempted shortcuts did not pay off. Perform full linear search. */ - { - int index = 0; - global_index = -1; - - while (true) { - int current_index = ((index + start_index) % grid->size); - bool cell_contains; - cell_contains = ecl_grid_cell_contains_xyz1( grid , current_index , x , y , z); + global_index = -1; - if (cell_contains) { - global_index = current_index; - break; - } - index++; - if (index == grid->size) - break; - } + for (int index = 0; index < grid->size; index++) { + if (ecl_grid_cell_contains_xyz1( grid , index , x , y , z)) + return index; } - return global_index; + return -1; +} + +bool ecl_grid_get_ijk_from_xyz(ecl_grid_type * grid , double x , double y , double z , int start_index, int *i, int *j, int *k ) { + int g = ecl_grid_get_global_index_from_xyz(grid, x, y, z, start_index); + if (g < 0) + return false; + + ecl_grid_get_ijk1( grid , g , i,j,k); + return true; } @@ -4440,12 +4642,15 @@ void ecl_grid_get_ijk1A(const ecl_grid_type *ecl_grid , int active_index , int * /******************************************************************/ /* Functions to get the 'true' (i.e. UTM or whatever) position (x,y,z). -*/ -/* - ijk are C-based zero offset. + The cell center is calculated as the plain average of the eight + corner positions, it is quite simple to construct cells where this + average position is on the outside of the cell - hence there is no + guarantee that the (x,y,z) position returned from this function + actually is on the inside of the cell. */ + void ecl_grid_get_xyz1(const ecl_grid_type * grid , int global_index , double *xpos , double *ypos , double *zpos) { ecl_cell_type * cell = ecl_grid_get_cell( grid , global_index); ecl_cell_assert_center( cell ); @@ -4458,6 +4663,7 @@ void ecl_grid_get_xyz1(const ecl_grid_type * grid , int global_index , double *x + void ecl_grid_get_xyz3(const ecl_grid_type * grid , int i, int j , int k, double *xpos , double *ypos , double *zpos) { const int global_index = ecl_grid_get_global_index__(grid , i , j , k ); ecl_grid_get_xyz1( grid , global_index , xpos , ypos , zpos); @@ -4465,8 +4671,6 @@ void ecl_grid_get_xyz3(const ecl_grid_type * grid , int i, int j , int k, double - - /** This function will return (by reference) the x,y,z values of corner nr 'corner_nr' in cell 'global_index'. See the documentation of @@ -5054,7 +5258,31 @@ bool ecl_grid_cell_regular3( const ecl_grid_type * ecl_grid, int i,int j,int k) return ecl_grid_cell_regular1( ecl_grid , global_index ); } +/* + The function ecl_grid_get_cell_twist() is an attempt to measure how + twisted or deformed a cell is. For a 'normal' cell the corners + [0..3] will z value <= the corners [4..7]. This function will count + the number of times the z value from the [4..7] is lower than the + corresponding z value from the [0..3] layer. + + The purpose of the function is to detect twisted cells before + embarking on cell contains calculation. The current + ecl_cell_contains_xyz( ) implementation will fail badly for twisted + cells. + + If the function return 4 you probably have an inverted z-axis! +*/ +int ecl_grid_get_cell_twist1( const ecl_grid_type * ecl_grid, int global_index ) { + ecl_cell_type * cell = ecl_grid_get_cell( ecl_grid , global_index ); + return ecl_cell_get_twist( cell ); +} + + +int ecl_grid_get_cell_twist3(const ecl_grid_type * ecl_grid, int i, int j , int k) { + int global_index = ecl_grid_get_global_index3( ecl_grid , i , j , k); + return ecl_grid_get_cell_twist1( ecl_grid , global_index ); +} double ecl_grid_get_cell_volume1( const ecl_grid_type * ecl_grid, int global_index ) { @@ -5162,8 +5390,8 @@ static int ecl_grid_get_property_index__(const ecl_grid_type * ecl_grid , const static bool ecl_grid_get_property__(const ecl_grid_type * ecl_grid , const ecl_kw_type * ecl_kw , int i , int j , int k, void * value) { - ecl_type_enum ecl_type = ecl_kw_get_type( ecl_kw ); - if ((ecl_type == ECL_FLOAT_TYPE) || (ecl_type == ECL_INT_TYPE) || (ecl_type == ECL_DOUBLE_TYPE)) { + ecl_data_type data_type = ecl_kw_get_data_type( ecl_kw ); + if (ecl_type_is_numeric(data_type)) { int lookup_index = ecl_grid_get_property_index__( ecl_grid , ecl_kw , i , j , k ); if (lookup_index >= 0) { @@ -5173,15 +5401,15 @@ static bool ecl_grid_get_property__(const ecl_grid_type * ecl_grid , const ecl_k return false; } else { - util_abort("%s: sorry - can not lookup ECLIPSE type:%s with %s.\n",__func__ , ecl_util_get_type_name( ecl_type ) , __func__); + util_abort("%s: sorry - can not lookup ECLIPSE type:%s with %s.\n",__func__ , ecl_type_alloc_name( data_type ) , __func__); return false; } } double ecl_grid_get_double_property(const ecl_grid_type * ecl_grid , const ecl_kw_type * ecl_kw , int i , int j , int k) { - ecl_type_enum ecl_type = ecl_kw_get_type( ecl_kw ); - if (ecl_type == ECL_DOUBLE_TYPE) { + ecl_data_type data_type = ecl_kw_get_data_type( ecl_kw ); + if (ecl_type_is_double(data_type)) { double value; if (ecl_grid_get_property__( ecl_grid , ecl_kw , i , j , k , &value)) return value; @@ -5195,8 +5423,8 @@ double ecl_grid_get_double_property(const ecl_grid_type * ecl_grid , const ecl_k int ecl_grid_get_int_property(const ecl_grid_type * ecl_grid , const ecl_kw_type * ecl_kw , int i , int j , int k) { - ecl_type_enum ecl_type = ecl_kw_get_type( ecl_kw ); - if (ecl_type == ECL_INT_TYPE) { + ecl_data_type data_type = ecl_kw_get_data_type( ecl_kw ); + if (ecl_type_is_int(data_type)) { int value; if (ecl_grid_get_property__( ecl_grid , ecl_kw , i , j , k , &value)) @@ -5212,8 +5440,8 @@ int ecl_grid_get_int_property(const ecl_grid_type * ecl_grid , const ecl_kw_type float ecl_grid_get_float_property(const ecl_grid_type * ecl_grid , const ecl_kw_type * ecl_kw , int i , int j , int k) { - ecl_type_enum ecl_type = ecl_kw_get_type( ecl_kw ); - if (ecl_type == ECL_FLOAT_TYPE) { + ecl_data_type data_type = ecl_kw_get_data_type( ecl_kw ); + if (ecl_type_is_float(data_type)) { float value; if (ecl_grid_get_property__( ecl_grid , ecl_kw , i , j , k , &value)) @@ -5228,8 +5456,8 @@ float ecl_grid_get_float_property(const ecl_grid_type * ecl_grid , const ecl_kw_ } double ecl_grid_get_property(const ecl_grid_type * ecl_grid , const ecl_kw_type * ecl_kw , int i , int j , int k) { - ecl_type_enum ecl_type = ecl_kw_get_type( ecl_kw ); - if ((ecl_type == ECL_FLOAT_TYPE) || (ecl_type == ECL_INT_TYPE) || (ecl_type == ECL_DOUBLE_TYPE)) { + ecl_data_type data_type = ecl_kw_get_data_type( ecl_kw ); + if (ecl_type_is_numeric(data_type)) { int lookup_index = ecl_grid_get_property_index__( ecl_grid , ecl_kw , i , j , k ); if (lookup_index >= 0) @@ -5238,7 +5466,7 @@ double ecl_grid_get_property(const ecl_grid_type * ecl_grid , const ecl_kw_type return -1; /* Tried to lookup an inactive cell. */ } else { - util_abort("%s: sorry - can not lookup ECLIPSE type:%s with %s.\n",__func__ , ecl_util_get_type_name( ecl_type ) , __func__); + util_abort("%s: sorry - can not lookup ECLIPSE type:%s with %s.\n",__func__ , ecl_type_alloc_name( data_type ) , __func__); return -1; } } @@ -5262,8 +5490,8 @@ double ecl_grid_get_property(const ecl_grid_type * ecl_grid , const ecl_kw_type void ecl_grid_get_column_property(const ecl_grid_type * ecl_grid , const ecl_kw_type * ecl_kw , int i , int j, double_vector_type * column) { - ecl_type_enum ecl_type = ecl_kw_get_type( ecl_kw ); - if ((ecl_type == ECL_FLOAT_TYPE) || (ecl_type == ECL_INT_TYPE) || (ecl_type == ECL_DOUBLE_TYPE)) { + ecl_data_type data_type = ecl_kw_get_data_type(ecl_kw); + if (ecl_type_is_numeric(data_type)) { int kw_size = ecl_kw_get_size( ecl_kw ); bool use_global_index = false; @@ -5289,7 +5517,7 @@ void ecl_grid_get_column_property(const ecl_grid_type * ecl_grid , const ecl_kw_ } } } else - util_abort("%s: sorry - can not lookup ECLIPSE type:%s with %s.\n",__func__ , ecl_util_get_type_name( ecl_type ) , __func__); + util_abort("%s: sorry - can not lookup ECLIPSE type:%s with %s.\n",__func__ , ecl_type_alloc_name( data_type ) , __func__); } @@ -5326,7 +5554,7 @@ void ecl_grid_get_column_property(const ecl_grid_type * ecl_grid , const ecl_kw_ int ecl_grid_get_region_cells(const ecl_grid_type * ecl_grid , const ecl_kw_type * region_kw , int region_value , bool active_only, bool export_active_index , int_vector_type * index_list) { int cells_found = 0; if (ecl_kw_get_size( region_kw ) == ecl_grid->size) { - if (ecl_kw_get_type( region_kw ) == ECL_INT_TYPE) { + if (ecl_type_is_int(ecl_kw_get_data_type( region_kw ))) { const int * region_ptr = ecl_kw_iget_ptr( region_kw , 0); int_vector_reset( index_list ); @@ -5369,7 +5597,7 @@ void ecl_grid_grdecl_fprintf_kw( const ecl_grid_type * ecl_grid , const ecl_kw_t float float_default; int int_default; int bool_default; - ecl_type_enum ecl_type = ecl_kw_get_type( ecl_kw ); + ecl_type_enum ecl_type = ecl_type_get_type(ecl_kw_get_data_type( ecl_kw )); if (ecl_type == ECL_FLOAT_TYPE) { float_default = (float) double_default; @@ -5585,18 +5813,36 @@ static const float * ecl_grid_get_mapaxes( const ecl_grid_type * grid ) { } static ecl_kw_type * ecl_grid_alloc_mapaxes_kw( const float * mapaxes ) { - return ecl_kw_alloc_new( MAPAXES_KW , 6 , ECL_FLOAT_TYPE , mapaxes); + return ecl_kw_alloc_new( MAPAXES_KW , 6 , ECL_FLOAT , mapaxes); } -static ecl_kw_type * ecl_grid_alloc_mapunits_kw( ) { - ecl_kw_type * mapunits_kw = ecl_kw_alloc( MAPUNITS_KW , 1 , ECL_CHAR_TYPE); - ecl_kw_iset_string8( mapunits_kw , 0 , "METRES" ); +static ecl_kw_type * ecl_grid_alloc_mapunits_kw( ert_ecl_unit_enum output_unit ) { + ecl_kw_type * mapunits_kw = ecl_kw_alloc( MAPUNITS_KW , 1 , ECL_CHAR); + + if (output_unit == ECL_FIELD_UNITS) + ecl_kw_iset_string8( mapunits_kw , 0 , "FEET" ); + + if (output_unit == ECL_METRIC_UNITS) + ecl_kw_iset_string8( mapunits_kw , 0 , "METRES" ); + + if (output_unit == ECL_LAB_UNITS) + ecl_kw_iset_string8( mapunits_kw , 0 , "CM" ); + return mapunits_kw; } -static ecl_kw_type * ecl_grid_alloc_gridunits_kw( ) { - ecl_kw_type * gridunits_kw = ecl_kw_alloc( GRIDUNIT_KW , 2 , ECL_CHAR_TYPE); - ecl_kw_iset_string8( gridunits_kw , 0 , "METRES" ); +static ecl_kw_type * ecl_grid_alloc_gridunits_kw( ert_ecl_unit_enum output_unit ) { + ecl_kw_type * gridunits_kw = ecl_kw_alloc( GRIDUNIT_KW , 2 , ECL_CHAR); + + if (output_unit == ECL_FIELD_UNITS) + ecl_kw_iset_string8( gridunits_kw , 0 , "FEET" ); + + if (output_unit == ECL_METRIC_UNITS) + ecl_kw_iset_string8( gridunits_kw , 0 , "METRES" ); + + if (output_unit == ECL_LAB_UNITS) + ecl_kw_iset_string8( gridunits_kw , 0 , "CM" ); + ecl_kw_iset_string8( gridunits_kw , 1 , "" ); return gridunits_kw; } @@ -5604,19 +5850,24 @@ static ecl_kw_type * ecl_grid_alloc_gridunits_kw( ) { /*****************************************************************/ static float ecl_grid_output_scaling( const ecl_grid_type * grid , ert_ecl_unit_enum output_unit) { - if (output_unit == ERT_ECL_LAB_UNITS) - util_abort("%s: sorry - lab units not yet supported" , __func__); - - if (grid->unit_system == ERT_ECL_LAB_UNITS) - util_abort("%s: sorry - lab units not yet supported"); - if (grid->unit_system == output_unit) - return 1.0; + return 1.0; else { - if (grid->unit_system == ERT_ECL_METRIC_UNITS) - return METER_TO_FEET_SCALE_FACTOR; - else - return 1.0 / METER_TO_FEET_SCALE_FACTOR; + double scale_factor = 1; + + if (grid->unit_system == ECL_FIELD_UNITS) + scale_factor = 1.0 / METER_TO_FEET_SCALE_FACTOR; + + if (grid->unit_system == ECL_LAB_UNITS) + scale_factor = 1.0 / METER_TO_CM_SCALE_FACTOR; + + if (output_unit == ECL_FIELD_UNITS) + scale_factor *= METER_TO_FEET_SCALE_FACTOR; + + if (output_unit == ECL_LAB_UNITS) + scale_factor *= METER_TO_CM_SCALE_FACTOR; + + return scale_factor; } } @@ -5627,39 +5878,40 @@ static void ecl_grid_fwrite_mapaxes( const float * mapaxes , fortio_type * forti ecl_kw_free( mapaxes_kw ); } -static void ecl_grid_fwrite_mapunits( fortio_type * fortio ) { - ecl_kw_type * mapunits_kw = ecl_grid_alloc_mapunits_kw( ); +static void ecl_grid_fwrite_mapunits( fortio_type * fortio , ert_ecl_unit_enum output_unit) { + ecl_kw_type * mapunits_kw = ecl_grid_alloc_mapunits_kw( output_unit ); ecl_kw_fwrite( mapunits_kw , fortio ); ecl_kw_free( mapunits_kw ); } -static void ecl_grid_fwrite_gridunits( fortio_type * fortio) { - ecl_kw_type * gridunits_kw = ecl_grid_alloc_gridunits_kw( ); +static void ecl_grid_fwrite_gridunits( fortio_type * fortio, ert_ecl_unit_enum output_unit) { + ecl_kw_type * gridunits_kw = ecl_grid_alloc_gridunits_kw( output_unit ); ecl_kw_fwrite( gridunits_kw , fortio ); ecl_kw_free( gridunits_kw ); } -static void ecl_grid_fwrite_main_GRID_headers( const ecl_grid_type * ecl_grid , fortio_type * fortio) { - ecl_grid_fwrite_mapunits( fortio ); + +static void ecl_grid_fwrite_main_GRID_headers( const ecl_grid_type * ecl_grid , fortio_type * fortio , ert_ecl_unit_enum output_unit) { + ecl_grid_fwrite_mapunits( fortio , output_unit ); if (ecl_grid->use_mapaxes) ecl_grid_fwrite_mapaxes( ecl_grid->mapaxes , fortio ); - ecl_grid_fwrite_gridunits( fortio ); + ecl_grid_fwrite_gridunits( fortio , output_unit ); } -static void ecl_grid_fwrite_GRID__( const ecl_grid_type * grid , int coords_size , fortio_type * fortio) { +static void ecl_grid_fwrite_GRID__( const ecl_grid_type * grid , int coords_size , fortio_type * fortio, ert_ecl_unit_enum output_unit) { if (grid->parent_grid != NULL) { - ecl_kw_type * lgr_kw = ecl_kw_alloc(LGR_KW , 1 , ECL_CHAR_TYPE ); + ecl_kw_type * lgr_kw = ecl_kw_alloc(LGR_KW , 1 , ECL_CHAR); ecl_kw_iset_string8( lgr_kw , 0 , grid->name ); ecl_kw_fwrite( lgr_kw , fortio ); ecl_kw_free( lgr_kw ); } { - ecl_kw_type * dimens_kw = ecl_kw_alloc(DIMENS_KW , 3 , ECL_INT_TYPE ); + ecl_kw_type * dimens_kw = ecl_kw_alloc(DIMENS_KW , 3 , ECL_INT); ecl_kw_iset_int( dimens_kw , 0 , grid->nx ); ecl_kw_iset_int( dimens_kw , 1 , grid->ny ); if (grid->dualp_flag == FILEHEAD_SINGLE_POROSITY) @@ -5672,18 +5924,18 @@ static void ecl_grid_fwrite_GRID__( const ecl_grid_type * grid , int coords_size } if (grid->parent_grid == NULL) - ecl_grid_fwrite_main_GRID_headers( grid , fortio ); + ecl_grid_fwrite_main_GRID_headers( grid , fortio , output_unit); { - ecl_kw_type * radial_kw = ecl_kw_alloc( RADIAL_KW , 1 , ECL_CHAR_TYPE); + ecl_kw_type * radial_kw = ecl_kw_alloc( RADIAL_KW , 1 , ECL_CHAR); ecl_kw_iset_string8( radial_kw , 0 , "FALSE" ); ecl_kw_fwrite( radial_kw , fortio ); ecl_kw_free( radial_kw ); } { - ecl_kw_type * coords_kw = ecl_kw_alloc( COORDS_KW , coords_size , ECL_INT_TYPE ); - ecl_kw_type * corners_kw = ecl_kw_alloc( CORNERS_KW , 24 , ECL_FLOAT_TYPE ); + ecl_kw_type * coords_kw = ecl_kw_alloc( COORDS_KW , coords_size , ECL_INT); + ecl_kw_type * corners_kw = ecl_kw_alloc( CORNERS_KW , 24 , ECL_FLOAT); int i,j,k; for (k=0; k < grid->nz; k++) { for (j=0; j < grid->ny; j++) { @@ -5712,7 +5964,7 @@ static void ecl_grid_fwrite_GRID__( const ecl_grid_type * grid , int coords_size } -void ecl_grid_fwrite_GRID( const ecl_grid_type * grid , const char * filename) { +void ecl_grid_fwrite_GRID2( const ecl_grid_type * grid , const char * filename, ert_ecl_unit_enum output_unit) { int coords_size = 5; bool fmt_file = false; @@ -5723,18 +5975,22 @@ void ecl_grid_fwrite_GRID( const ecl_grid_type * grid , const char * filename) { if (grid->coarsening_active) coords_size = 7; - ecl_grid_fwrite_GRID__( grid , coords_size , fortio ); + ecl_grid_fwrite_GRID__( grid , coords_size , fortio , output_unit); { int grid_nr; for (grid_nr = 0; grid_nr < vector_get_size( grid->LGR_list ); grid_nr++) { const ecl_grid_type * igrid = vector_iget_const( grid->LGR_list , grid_nr ); - ecl_grid_fwrite_GRID__( igrid , coords_size , fortio ); + ecl_grid_fwrite_GRID__( igrid , coords_size , fortio , output_unit ); } } fortio_fclose( fortio ); } +void ecl_grid_fwrite_GRID( const ecl_grid_type * grid , const char * filename) { + ecl_grid_fwrite_GRID2( grid , filename , ECL_METRIC_UNITS ); +} + /*****************************************************************/ /* @@ -5756,31 +6012,32 @@ ENDGRID 0:INTE a standard EGRID header without creating a grid instance first. */ -static void ecl_grid_fwrite_main_EGRID_header( const float * mapaxes, int dualp_flag , fortio_type * fortio ) { +static void ecl_grid_fwrite_main_EGRID_header( const ecl_grid_type * grid , fortio_type * fortio , ert_ecl_unit_enum output_unit) { int EGRID_VERSION = 3; int RELEASE_YEAR = 2007; int COMPAT_VERSION = 0; + const float * mapaxes = ecl_grid_get_mapaxes( grid ); { - ecl_kw_type * filehead_kw = ecl_kw_alloc( FILEHEAD_KW , 100 , ECL_INT_TYPE ); + ecl_kw_type * filehead_kw = ecl_kw_alloc( FILEHEAD_KW , 100 , ECL_INT); ecl_kw_scalar_set_int( filehead_kw , 0 ); ecl_kw_iset_int( filehead_kw , FILEHEAD_VERSION_INDEX , EGRID_VERSION ); ecl_kw_iset_int( filehead_kw , FILEHEAD_YEAR_INDEX , RELEASE_YEAR ); ecl_kw_iset_int( filehead_kw , FILEHEAD_COMPAT_INDEX , COMPAT_VERSION ); ecl_kw_iset_int( filehead_kw , FILEHEAD_TYPE_INDEX , FILEHEAD_GRIDTYPE_CORNERPOINT ); - ecl_kw_iset_int( filehead_kw , FILEHEAD_DUALP_INDEX , dualp_flag ); + ecl_kw_iset_int( filehead_kw , FILEHEAD_DUALP_INDEX , grid->dualp_flag ); ecl_kw_iset_int( filehead_kw , FILEHEAD_ORGFORMAT_INDEX , FILEHEAD_ORGTYPE_CORNERPOINT ); ecl_kw_fwrite( filehead_kw , fortio ); ecl_kw_free( filehead_kw ); } - ecl_grid_fwrite_mapunits( fortio ); + ecl_grid_fwrite_mapunits( fortio , output_unit ); if (mapaxes != NULL) ecl_grid_fwrite_mapaxes( mapaxes , fortio ); - ecl_grid_fwrite_gridunits( fortio ); + ecl_grid_fwrite_gridunits( fortio , output_unit); } @@ -5793,16 +6050,6 @@ static void ecl_grid_fwrite_gridhead_kw( int nx, int ny , int nz, int grid_nr, f -void ecl_grid_fwrite_EGRID_header__( int dims[3] , const float mapaxes[6], int dualp_flag , fortio_type * fortio) { - ecl_grid_fwrite_main_EGRID_header( mapaxes , dualp_flag , fortio ); - ecl_grid_fwrite_gridhead_kw( dims[0] , dims[1] , dims[2] , 0 , fortio); -} - -void ecl_grid_fwrite_EGRID_header( int dims[3] , const float mapaxes[6], fortio_type * fortio) { - ecl_grid_fwrite_EGRID_header__(dims , mapaxes , FILEHEAD_SINGLE_POROSITY , fortio ); -} - - /*****************************************************************/ @@ -5961,21 +6208,19 @@ void ecl_grid_init_coord_data_double( const ecl_grid_type * grid , double * coor float * ecl_grid_alloc_coord_data( const ecl_grid_type * grid ) { - float * coord = util_calloc( (grid->nx + 1) * (grid->ny + 1) * 6 , sizeof * coord ); + float * coord = util_calloc( ecl_grid_get_coord_size(grid) , sizeof * coord ); ecl_grid_init_coord_data( grid , coord ); return coord; } void ecl_grid_assert_coord_kw( ecl_grid_type * grid ) { if (grid->coord_kw == NULL) { - grid->coord_kw = ecl_kw_alloc( COORD_KW , (grid->nx + 1) * (grid->ny + 1) * 6 , ECL_FLOAT_TYPE ); + grid->coord_kw = ecl_kw_alloc( COORD_KW , ecl_grid_get_coord_size( grid ) , ECL_FLOAT); ecl_grid_init_coord_data( grid , ecl_kw_get_void_ptr( grid->coord_kw )); } } -int ecl_grid_get_coord_size( const ecl_grid_type * ecl_grid) { - return (ecl_grid->nx + 1) * (ecl_grid->ny + 1) * 6; -} + @@ -6041,14 +6286,19 @@ float * ecl_grid_alloc_zcorn_data( const ecl_grid_type * grid ) { ecl_kw_type * ecl_grid_alloc_zcorn_kw( const ecl_grid_type * grid ) { - ecl_kw_type * zcorn_kw = ecl_kw_alloc( ZCORN_KW , 8 * grid->size , ECL_FLOAT_TYPE ); + ecl_kw_type * zcorn_kw = ecl_kw_alloc( ZCORN_KW , 8 * grid->size , ECL_FLOAT); ecl_grid_init_zcorn_data( grid , ecl_kw_get_void_ptr( zcorn_kw )); return zcorn_kw; } +int ecl_grid_get_coord_size( const ecl_grid_type * grid) { + return ECL_GRID_COORD_SIZE( grid->nx , grid->ny ); +} + + int ecl_grid_get_zcorn_size( const ecl_grid_type * grid ) { - return 8 * grid->size; + return ECL_GRID_ZCORN_SIZE( grid->nx , grid->ny, grid->nz ); } /*****************************************************************/ @@ -6100,7 +6350,7 @@ int * ecl_grid_alloc_actnum_data( const ecl_grid_type * grid ) { ecl_kw_type * ecl_grid_alloc_actnum_kw( const ecl_grid_type * grid ) { - ecl_kw_type * actnum_kw = ecl_kw_alloc( ACTNUM_KW , grid->size , ECL_INT_TYPE ); + ecl_kw_type * actnum_kw = ecl_kw_alloc( ACTNUM_KW , grid->size , ECL_INT); ecl_grid_init_actnum_data( grid , ecl_kw_get_void_ptr( actnum_kw )); return actnum_kw; } @@ -6154,7 +6404,7 @@ int * ecl_grid_alloc_hostnum_data( const ecl_grid_type * grid ) { ecl_kw_type * ecl_grid_alloc_hostnum_kw( const ecl_grid_type * grid ) { - ecl_kw_type * hostnum_kw = ecl_kw_alloc( HOSTNUM_KW , grid->size , ECL_INT_TYPE ); + ecl_kw_type * hostnum_kw = ecl_kw_alloc( HOSTNUM_KW , grid->size , ECL_INT); ecl_grid_init_hostnum_data( grid , ecl_kw_get_void_ptr( hostnum_kw )); return hostnum_kw; } @@ -6177,7 +6427,7 @@ int * ecl_grid_alloc_corsnum_data( const ecl_grid_type * grid ) { ecl_kw_type * ecl_grid_alloc_corsnum_kw( const ecl_grid_type * grid ) { - ecl_kw_type * corsnum_kw = ecl_kw_alloc( CORSNUM_KW , grid->size , ECL_INT_TYPE ); + ecl_kw_type * corsnum_kw = ecl_kw_alloc( CORSNUM_KW , grid->size , ECL_INT); ecl_grid_init_corsnum_data( grid , ecl_kw_get_void_ptr( corsnum_kw )); return corsnum_kw; } @@ -6186,7 +6436,7 @@ ecl_kw_type * ecl_grid_alloc_corsnum_kw( const ecl_grid_type * grid ) { ecl_kw_type * ecl_grid_alloc_gridhead_kw( int nx, int ny , int nz , int grid_nr) { - ecl_kw_type * gridhead_kw = ecl_kw_alloc( GRIDHEAD_KW , GRIDHEAD_SIZE , ECL_INT_TYPE ); + ecl_kw_type * gridhead_kw = ecl_kw_alloc( GRIDHEAD_KW , GRIDHEAD_SIZE , ECL_INT); ecl_kw_scalar_set_int( gridhead_kw , 0 ); ecl_kw_iset_int( gridhead_kw , GRIDHEAD_TYPE_INDEX , GRIDHEAD_GRIDTYPE_CORNERPOINT ); ecl_kw_iset_int( gridhead_kw , GRIDHEAD_NX_INDEX , nx); @@ -6235,9 +6485,9 @@ static void ecl_grid_fwrite_self_nnc( const ecl_grid_type * grid , fortio_type } { int num_nnc = int_vector_size( g1 ); - ecl_kw_type * nnc1_kw = ecl_kw_alloc_new_shared( NNC1_KW , num_nnc , ECL_INT_TYPE , int_vector_get_ptr( g1 )); - ecl_kw_type * nnc2_kw = ecl_kw_alloc_new_shared( NNC2_KW , num_nnc , ECL_INT_TYPE , int_vector_get_ptr( g2 )); - ecl_kw_type * nnchead_kw = ecl_kw_alloc( NNCHEAD_KW , NNCHEAD_SIZE , ECL_INT_TYPE ); + ecl_kw_type * nnc1_kw = ecl_kw_alloc_new_shared( NNC1_KW , num_nnc , ECL_INT , int_vector_get_ptr( g1 )); + ecl_kw_type * nnc2_kw = ecl_kw_alloc_new_shared( NNC2_KW , num_nnc , ECL_INT , int_vector_get_ptr( g2 )); + ecl_kw_type * nnchead_kw = ecl_kw_alloc( NNCHEAD_KW , NNCHEAD_SIZE , ECL_INT); ecl_kw_scalar_set_int( nnchead_kw , 0 ); ecl_kw_iset_int( nnchead_kw , NNCHEAD_NUMNNC_INDEX , num_nnc ); @@ -6264,17 +6514,17 @@ static void ecl_grid_fwrite_EGRID__( ecl_grid_type * grid , fortio_type * fortio /* Writing header */ if (!is_lgr) { - ecl_grid_fwrite_main_EGRID_header( ecl_grid_get_mapaxes( grid ) , grid->dualp_flag , fortio ); + ecl_grid_fwrite_main_EGRID_header( grid , fortio , output_unit ); } else { { - ecl_kw_type * lgr_kw = ecl_kw_alloc(LGR_KW , 1 , ECL_CHAR_TYPE ); + ecl_kw_type * lgr_kw = ecl_kw_alloc(LGR_KW , 1 , ECL_CHAR); ecl_kw_iset_string8( lgr_kw , 0 , grid->name ); ecl_kw_fwrite( lgr_kw , fortio ); ecl_kw_free( lgr_kw ); } { - ecl_kw_type * lgr_parent_kw = ecl_kw_alloc(LGR_PARENT_KW , 1 , ECL_CHAR_TYPE ); + ecl_kw_type * lgr_parent_kw = ecl_kw_alloc(LGR_PARENT_KW , 1 , ECL_CHAR); if (grid->parent_name != NULL) ecl_kw_iset_string8( lgr_parent_kw , 0 , grid->parent_name ); else @@ -6320,14 +6570,14 @@ static void ecl_grid_fwrite_EGRID__( ecl_grid_type * grid , fortio_type * fortio } { - ecl_kw_type * endgrid_kw = ecl_kw_alloc( ENDGRID_KW , 0 , ECL_INT_TYPE ); + ecl_kw_type * endgrid_kw = ecl_kw_alloc( ENDGRID_KW , 0 , ECL_INT); ecl_kw_fwrite( endgrid_kw , fortio ); ecl_kw_free( endgrid_kw ); } } if (is_lgr) { - ecl_kw_type * endlgr_kw = ecl_kw_alloc( ENDLGR_KW , 0 , ECL_INT_TYPE ); + ecl_kw_type * endlgr_kw = ecl_kw_alloc( ENDLGR_KW , 0 , ECL_INT); ecl_kw_fwrite( endlgr_kw , fortio ); ecl_kw_free( endlgr_kw ); } @@ -6360,10 +6610,10 @@ void ecl_grid_fwrite_EGRID2( ecl_grid_type * grid , const char * filename, ert_e */ void ecl_grid_fwrite_EGRID( ecl_grid_type * grid , const char * filename, bool output_metric) { - ert_ecl_unit_enum output_unit = ERT_ECL_METRIC_UNITS; + ert_ecl_unit_enum output_unit = ECL_METRIC_UNITS; if (!output_metric) - output_unit = ERT_ECL_FIELD_UNITS; + output_unit = ECL_FIELD_UNITS; ecl_grid_fwrite_EGRID2( grid , filename , output_unit ); } @@ -6371,7 +6621,7 @@ void ecl_grid_fwrite_EGRID( ecl_grid_type * grid , const char * filename, bool o void ecl_grid_fwrite_depth( const ecl_grid_type * grid , fortio_type * init_file , ert_ecl_unit_enum output_unit) { - ecl_kw_type * depth_kw = ecl_kw_alloc("DEPTH" , ecl_grid_get_nactive(grid) , ECL_FLOAT_TYPE ); + ecl_kw_type * depth_kw = ecl_kw_alloc("DEPTH" , ecl_grid_get_nactive(grid) , ECL_FLOAT); { float * depth_ptr = ecl_kw_get_ptr(depth_kw); for (int i = 0; i < ecl_grid_get_nactive( grid ); i++) @@ -6384,9 +6634,9 @@ void ecl_grid_fwrite_depth( const ecl_grid_type * grid , fortio_type * init_file void ecl_grid_fwrite_dims( const ecl_grid_type * grid , fortio_type * init_file, ert_ecl_unit_enum output_unit) { - ecl_kw_type * dx = ecl_kw_alloc("DX" , ecl_grid_get_nactive(grid) , ECL_FLOAT_TYPE ); - ecl_kw_type * dy = ecl_kw_alloc("DY" , ecl_grid_get_nactive(grid) , ECL_FLOAT_TYPE ); - ecl_kw_type * dz = ecl_kw_alloc("DZ" , ecl_grid_get_nactive(grid) , ECL_FLOAT_TYPE ); + ecl_kw_type * dx = ecl_kw_alloc("DX" , ecl_grid_get_nactive(grid) , ECL_FLOAT); + ecl_kw_type * dy = ecl_kw_alloc("DY" , ecl_grid_get_nactive(grid) , ECL_FLOAT); + ecl_kw_type * dz = ecl_kw_alloc("DZ" , ecl_grid_get_nactive(grid) , ECL_FLOAT); { { float * dx_ptr = ecl_kw_get_ptr(dx); @@ -6422,9 +6672,9 @@ void ecl_grid_fwrite_dims( const ecl_grid_type * grid , fortio_type * init_file, possible LGRs which are attached. */ -void ecl_grid_fprintf_grdecl(ecl_grid_type * grid , FILE * stream ) { +void ecl_grid_fprintf_grdecl2(ecl_grid_type * grid , FILE * stream , ert_ecl_unit_enum output_unit) { { - ecl_kw_type * mapunits_kw = ecl_grid_alloc_mapunits_kw( grid ); + ecl_kw_type * mapunits_kw = ecl_grid_alloc_mapunits_kw( output_unit ); ecl_kw_fprintf_grdecl( mapunits_kw , stream ); ecl_kw_free( mapunits_kw ); fprintf(stream , "\n"); @@ -6437,7 +6687,7 @@ void ecl_grid_fprintf_grdecl(ecl_grid_type * grid , FILE * stream ) { } { - ecl_kw_type * gridunits_kw = ecl_grid_alloc_gridunits_kw( grid ); + ecl_kw_type * gridunits_kw = ecl_grid_alloc_gridunits_kw( output_unit ); ecl_kw_fprintf_grdecl( gridunits_kw , stream ); ecl_kw_free( gridunits_kw ); fprintf(stream , "\n"); @@ -6476,6 +6726,11 @@ void ecl_grid_fprintf_grdecl(ecl_grid_type * grid , FILE * stream ) { } +void ecl_grid_fprintf_grdecl(ecl_grid_type * grid , FILE * stream ) { + ecl_grid_fprintf_grdecl2( grid , stream , ECL_METRIC_UNITS); +} + + /*****************************************************************/ /** @@ -6534,7 +6789,7 @@ int ecl_grid_get_num_nnc( const ecl_grid_type * grid ) { static ecl_kw_type * ecl_grid_alloc_volume_kw_active( const ecl_grid_type * grid) { - ecl_kw_type * volume_kw = ecl_kw_alloc("VOLUME" , ecl_grid_get_active_size(grid) , ECL_DOUBLE_TYPE); + ecl_kw_type * volume_kw = ecl_kw_alloc("VOLUME" , ecl_grid_get_active_size(grid) , ECL_DOUBLE); { double * volume_data = ecl_kw_get_ptr( volume_kw ); int active_index; @@ -6548,7 +6803,7 @@ static ecl_kw_type * ecl_grid_alloc_volume_kw_active( const ecl_grid_type * grid static ecl_kw_type * ecl_grid_alloc_volume_kw_global( const ecl_grid_type * grid) { - ecl_kw_type * volume_kw = ecl_kw_alloc("VOLUME" , ecl_grid_get_global_size(grid) , ECL_DOUBLE_TYPE); + ecl_kw_type * volume_kw = ecl_kw_alloc("VOLUME" , ecl_grid_get_global_size(grid) , ECL_DOUBLE); { double * volume_data = ecl_kw_get_ptr( volume_kw ); int global_index; @@ -6568,3 +6823,4 @@ ecl_kw_type * ecl_grid_alloc_volume_kw( const ecl_grid_type * grid , bool active else return ecl_grid_alloc_volume_kw_global( grid ); } +// diff --git a/ThirdParty/Ert/libecl/src/ecl_grid_cache.c b/ThirdParty/Ert/libecl/src/ecl_grid_cache.c index 717b7a4824..3c11f46231 100644 --- a/ThirdParty/Ert/libecl/src/ecl_grid_cache.c +++ b/ThirdParty/Ert/libecl/src/ecl_grid_cache.c @@ -1,20 +1,20 @@ /* - Copyright (C) 2011 Statoil ASA, Norway. - + Copyright (C) 2011 Statoil ASA, Norway. + The file 'ecl_grid_cache.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. + + ERT 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. + + ERT 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 + for more details. */ #include @@ -36,7 +36,7 @@ The ecl_grid_cache_struct data structure internalizes the world position of all the active cells. This is just a minor simplification to speed up repeated calls to get the true world - coordinates of a cell. + coordinates of a cell. */ struct ecl_grid_cache_struct { @@ -44,7 +44,9 @@ struct ecl_grid_cache_struct { double * xpos; double * ypos; double * zpos; + double * volume; /* Will be initialized on demand. */ int * global_index; /* Maps from active index (i.e. natural index in this context) - to the corresponding global index. */ + const ecl_grid_type * grid; }; @@ -53,7 +55,9 @@ struct ecl_grid_cache_struct { ecl_grid_cache_type * ecl_grid_cache_alloc( const ecl_grid_type * grid ) { ecl_grid_cache_type * grid_cache = util_malloc( sizeof * grid_cache ); - + + grid_cache->grid = grid; + grid_cache->volume = NULL; grid_cache->size = ecl_grid_get_active_size( grid ); grid_cache->xpos = util_calloc( grid_cache->size , sizeof * grid_cache->xpos ); grid_cache->ypos = util_calloc( grid_cache->size , sizeof * grid_cache->ypos ); @@ -61,20 +65,20 @@ ecl_grid_cache_type * ecl_grid_cache_alloc( const ecl_grid_type * grid ) { grid_cache->global_index = util_calloc( grid_cache->size , sizeof * grid_cache->global_index ); { int active_index; - - + + /* Go trough all the active cells and extract the cell center position and store it in xpos/ypos/zpos. */ for (active_index = 0; active_index < grid_cache->size; active_index++) { int global_index = ecl_grid_get_global_index1A( grid , active_index ); grid_cache->global_index[ active_index ] = global_index; - ecl_grid_get_xyz1( grid , global_index , - &grid_cache->xpos[ active_index ] , - &grid_cache->ypos[ active_index ] , + ecl_grid_get_xyz1( grid , global_index , + &grid_cache->xpos[ active_index ] , + &grid_cache->ypos[ active_index ] , &grid_cache->zpos[ active_index ]); } - + } return grid_cache; } @@ -104,10 +108,25 @@ const double * ecl_grid_cache_get_zpos( const ecl_grid_cache_type * grid_cache ) return grid_cache->zpos; } +const double * ecl_grid_cache_get_volume( const ecl_grid_cache_type * grid_cache ) { + + if (!grid_cache->volume) { + // C++ style const cast. + ecl_grid_cache_type * gc = (ecl_grid_cache_type *) grid_cache; + gc->volume = util_calloc( gc->size , sizeof * gc->volume ); + for (int active_index = 0; active_index < grid_cache->size; active_index++) + gc->volume[active_index] = ecl_grid_get_cell_volume1A( gc->grid , active_index ); + } + + return grid_cache->volume; +} + + void ecl_grid_cache_free( ecl_grid_cache_type * grid_cache ) { free( grid_cache->xpos ); free( grid_cache->ypos ); free( grid_cache->zpos ); free( grid_cache->global_index ); + free( grid_cache->volume ); free( grid_cache ); } diff --git a/ThirdParty/Ert/libecl/src/ecl_init_file.c b/ThirdParty/Ert/libecl/src/ecl_init_file.c index 639b232a5e..eb20dc8674 100644 --- a/ThirdParty/Ert/libecl/src/ecl_init_file.c +++ b/ThirdParty/Ert/libecl/src/ecl_init_file.c @@ -37,12 +37,14 @@ #include #include #include +#include +#include -static ecl_kw_type * ecl_init_file_alloc_INTEHEAD( const ecl_grid_type * ecl_grid , int phases, time_t start_date , int simulator) { - ecl_kw_type * intehead_kw = ecl_kw_alloc( INTEHEAD_KW , INTEHEAD_INIT_SIZE , ECL_INT_TYPE ); +static ecl_kw_type * ecl_init_file_alloc_INTEHEAD( const ecl_grid_type * ecl_grid , ert_ecl_unit_enum unit_system, int phases, time_t start_date , int simulator) { + ecl_kw_type * intehead_kw = ecl_kw_alloc( INTEHEAD_KW , INTEHEAD_INIT_SIZE , ECL_INT ); ecl_kw_scalar_set_int( intehead_kw , 0 ); - ecl_kw_iset_int( intehead_kw , INTEHEAD_UNIT_INDEX , INTEHEAD_METRIC_VALUE ); + ecl_kw_iset_int( intehead_kw , INTEHEAD_UNIT_INDEX , unit_system ); ecl_kw_iset_int( intehead_kw , INTEHEAD_NX_INDEX , ecl_grid_get_nx( ecl_grid )); ecl_kw_iset_int( intehead_kw , INTEHEAD_NY_INDEX , ecl_grid_get_ny( ecl_grid )); ecl_kw_iset_int( intehead_kw , INTEHEAD_NZ_INDEX , ecl_grid_get_nz( ecl_grid )); @@ -88,7 +90,7 @@ static ecl_kw_type * ecl_init_file_alloc_LOGIHEAD( int simulator ) { bool scale_gas_PC_at_max_sat = false; - ecl_kw_type * logihead_kw = ecl_kw_alloc( LOGIHEAD_KW , LOGIHEAD_INIT_SIZE , ECL_BOOL_TYPE ); + ecl_kw_type * logihead_kw = ecl_kw_alloc( LOGIHEAD_KW , LOGIHEAD_INIT_SIZE , ECL_BOOL ); ecl_kw_scalar_set_bool( logihead_kw , false ); @@ -119,7 +121,7 @@ static ecl_kw_type * ecl_init_file_alloc_LOGIHEAD( int simulator ) { static ecl_kw_type * ecl_init_file_alloc_DOUBHEAD( ) { - ecl_kw_type * doubhead_kw = ecl_kw_alloc( DOUBHEAD_KW , DOUBHEAD_INIT_SIZE , ECL_DOUBLE_TYPE ); + ecl_kw_type * doubhead_kw = ecl_kw_alloc( DOUBHEAD_KW , DOUBHEAD_INIT_SIZE , ECL_DOUBLE ); ecl_kw_scalar_set_double( doubhead_kw , 0); @@ -146,7 +148,7 @@ static ecl_kw_type * ecl_init_file_alloc_DOUBHEAD( ) { static void ecl_init_file_fwrite_poro( fortio_type * fortio , const ecl_grid_type * ecl_grid , const ecl_kw_type * poro ) { { - ecl_kw_type * porv = ecl_kw_alloc( PORV_KW , ecl_grid_get_global_size( ecl_grid ) , ECL_FLOAT_TYPE); + ecl_kw_type * porv = ecl_kw_alloc( PORV_KW , ecl_grid_get_global_size( ecl_grid ) , ECL_FLOAT); int global_index; bool global_poro = (ecl_kw_get_size( poro ) == ecl_grid_get_global_size( ecl_grid )) ? true : false; for ( global_index = 0; global_index < ecl_grid_get_global_size( ecl_grid ); global_index++) { @@ -171,10 +173,10 @@ static void ecl_init_file_fwrite_poro( fortio_type * fortio , const ecl_grid_typ that. */ -void ecl_init_file_fwrite_header( fortio_type * fortio , const ecl_grid_type * ecl_grid , const ecl_kw_type * poro , int phases , time_t start_date) { +void ecl_init_file_fwrite_header( fortio_type * fortio , const ecl_grid_type * ecl_grid , const ecl_kw_type * poro , ert_ecl_unit_enum unit_system, int phases , time_t start_date) { int simulator = INTEHEAD_ECLIPSE100_VALUE; { - ecl_kw_type * intehead_kw = ecl_init_file_alloc_INTEHEAD( ecl_grid , phases , start_date , simulator ); + ecl_kw_type * intehead_kw = ecl_init_file_alloc_INTEHEAD( ecl_grid , unit_system , phases , start_date , simulator ); ecl_kw_fwrite( intehead_kw , fortio ); ecl_kw_free( intehead_kw ); } diff --git a/ThirdParty/Ert/libecl/src/ecl_kw.c b/ThirdParty/Ert/libecl/src/ecl_kw.c index 8cb30aa1b4..d562f1a09a 100644 --- a/ThirdParty/Ert/libecl/src/ecl_kw.c +++ b/ThirdParty/Ert/libecl/src/ecl_kw.c @@ -27,9 +27,9 @@ #include #include -#include #include #include +#include #define ECL_KW_TYPE_ID 6111098 @@ -41,8 +41,7 @@ struct ecl_kw_struct { UTIL_TYPE_ID_DECLARATION; int size; - int sizeof_ctype; - ecl_type_enum ecl_type; + ecl_data_type data_type; char * header8; /* Header which is right padded with ' ' to become exactly 8 characters long. Should only be used internally.*/ char * header; /* Header which is trimmed to no-space. */ char * data; /* The actual data vector. */ @@ -156,92 +155,93 @@ UTIL_IS_INSTANCE_FUNCTION(ecl_kw , ECL_KW_TYPE_ID ) #define BOOL_FALSE_CHAR 'F' +ecl_type_enum ecl_kw_get_type(const ecl_kw_type *); +void ecl_kw_set_data_type(ecl_kw_type * ecl_kw, ecl_data_type data_type); -static const char * get_read_fmt( ecl_type_enum ecl_type ) { - switch(ecl_type) { +static char * alloc_read_fmt_string(const ecl_data_type ecl_type) { + return util_alloc_sprintf( + "%%%dc", + ecl_type_get_sizeof_ctype_fortio(ecl_type) + ); +} + +static char * alloc_read_fmt(const ecl_data_type data_type ) { + switch(ecl_type_get_type(data_type)) { case(ECL_CHAR_TYPE): - return READ_FMT_CHAR; - break; + return util_alloc_string_copy(READ_FMT_CHAR); case(ECL_INT_TYPE): - return READ_FMT_INT; - break; + return util_alloc_string_copy(READ_FMT_INT); case(ECL_FLOAT_TYPE): - return READ_FMT_FLOAT; - break; + return util_alloc_string_copy(READ_FMT_FLOAT); case(ECL_DOUBLE_TYPE): - return READ_FMT_DOUBLE; - break; + return util_alloc_string_copy(READ_FMT_DOUBLE); case(ECL_BOOL_TYPE): - return READ_FMT_BOOL; - break; + return util_alloc_string_copy(READ_FMT_BOOL); case(ECL_MESS_TYPE): - return READ_FMT_MESS; - break; + return util_alloc_string_copy(READ_FMT_MESS); + case(ECL_STRING_TYPE): + return alloc_read_fmt_string(data_type); default: - util_abort("%s: invalid ecl_type:%d \n",__func__ , ecl_type); + util_abort("%s: invalid ecl_type:%s \n",__func__ , ecl_type_alloc_name(data_type)); return NULL; } } +static char * alloc_write_fmt_string(const ecl_data_type ecl_type) { + return util_alloc_sprintf( + " '%%-%ds'", + ecl_type_get_sizeof_ctype_fortio(ecl_type) + ); +} -const char * ecl_kw_get_write_fmt( ecl_type_enum ecl_type ) { - switch(ecl_type) { +static char * alloc_write_fmt(const ecl_data_type data_type) { + switch(ecl_type_get_type(data_type)) { case(ECL_CHAR_TYPE): - return WRITE_FMT_CHAR; - break; + return util_alloc_string_copy(WRITE_FMT_CHAR); case(ECL_INT_TYPE): - return WRITE_FMT_INT; - break; + return util_alloc_string_copy(WRITE_FMT_INT); case(ECL_FLOAT_TYPE): - return WRITE_FMT_FLOAT; - break; + return util_alloc_string_copy(WRITE_FMT_FLOAT); case(ECL_DOUBLE_TYPE): - return WRITE_FMT_DOUBLE; - break; + return util_alloc_string_copy(WRITE_FMT_DOUBLE); case(ECL_BOOL_TYPE): - return WRITE_FMT_BOOL; - break; + return util_alloc_string_copy(WRITE_FMT_BOOL); case(ECL_MESS_TYPE): - return WRITE_FMT_MESS; - break; + return util_alloc_string_copy(WRITE_FMT_MESS); + case(ECL_STRING_TYPE): + return alloc_write_fmt_string(data_type); default: - util_abort("%s: invalid ecl_type:%d \n",__func__ , ecl_type); + util_abort("%s: invalid ecl_type: %s\n",__func__ , ecl_type_alloc_name(data_type)); return NULL; } } -static int get_blocksize( ecl_type_enum ecl_type ) { - if (ecl_type == ECL_CHAR_TYPE) - return BLOCKSIZE_CHAR; - else if (ecl_type == ECL_MESS_TYPE) +static int get_blocksize( ecl_data_type data_type ) { + if (ecl_type_is_alpha(data_type)) return BLOCKSIZE_CHAR; - else - return BLOCKSIZE_NUMERIC; + + return BLOCKSIZE_NUMERIC; } -static int get_columns( ecl_type_enum ecl_type ) { - switch(ecl_type) { +static int get_columns(const ecl_data_type data_type) { + switch(ecl_type_get_type(data_type)) { case(ECL_CHAR_TYPE): return COLUMNS_CHAR; - break; case(ECL_INT_TYPE): return COLUMNS_INT; - break; case(ECL_FLOAT_TYPE): return COLUMNS_FLOAT; - break; case(ECL_DOUBLE_TYPE): return COLUMNS_DOUBLE; - break; case(ECL_BOOL_TYPE): return COLUMNS_BOOL; - break; case(ECL_MESS_TYPE): return COLUMNS_MESSAGE; - break; + case(ECL_STRING_TYPE): + return COLUMNS_CHAR; // TODO: Is this correct? default: - util_abort("%s: invalid ecl_type:%d \n",__func__ , ecl_type); + util_abort("%s: invalid ecl_type: %s\n",__func__ , ecl_type_alloc_name(data_type)); return -1; } } @@ -258,8 +258,8 @@ static void ecl_kw_assert_index(const ecl_kw_type *ecl_kw , int index, const cha static void ecl_kw_endian_convert_data(ecl_kw_type *ecl_kw) { - if (ecl_kw->ecl_type != ECL_CHAR_TYPE && ecl_kw->ecl_type != ECL_MESS_TYPE) - util_endian_flip_vector(ecl_kw->data , ecl_kw->sizeof_ctype , ecl_kw->size); + if (ecl_type_is_numeric(ecl_kw->data_type) || ecl_type_is_bool(ecl_kw->data_type)) + util_endian_flip_vector(ecl_kw->data , ecl_kw_get_sizeof_ctype(ecl_kw) , ecl_kw->size); } @@ -281,35 +281,35 @@ bool ecl_kw_name_equal( const ecl_kw_type * ecl_kw , const char * name) { void ecl_kw_get_memcpy_data(const ecl_kw_type *ecl_kw , void *target) { - memcpy(target , ecl_kw->data , ecl_kw->size * ecl_kw->sizeof_ctype); + memcpy(target , ecl_kw->data , ecl_kw->size * ecl_kw_get_sizeof_ctype(ecl_kw)); } void ecl_kw_get_memcpy_int_data(const ecl_kw_type *ecl_kw , int * target) { - if (ecl_kw->ecl_type == ECL_INT_TYPE) + if (ecl_type_is_int(ecl_kw->data_type)) ecl_kw_get_memcpy_data( ecl_kw , target ); } void ecl_kw_get_memcpy_float_data(const ecl_kw_type *ecl_kw , float *target) { - if (ecl_kw->ecl_type == ECL_FLOAT_TYPE) + if (ecl_type_is_float(ecl_kw->data_type)) ecl_kw_get_memcpy_data( ecl_kw , target ); } void ecl_kw_get_memcpy_double_data(const ecl_kw_type *ecl_kw , double *target) { -if (ecl_kw->ecl_type == ECL_DOUBLE_TYPE) +if (ecl_type_is_double(ecl_kw->data_type)) ecl_kw_get_memcpy_data( ecl_kw , target ); } /** Allocates a untyped buffer with exactly the same content as the ecl_kw instances data. */ void * ecl_kw_alloc_data_copy(const ecl_kw_type * ecl_kw) { - void * buffer = util_alloc_copy( ecl_kw->data , ecl_kw->size * ecl_kw->sizeof_ctype ); + void * buffer = util_alloc_copy( ecl_kw->data , ecl_kw->size * ecl_kw_get_sizeof_ctype(ecl_kw) ); return buffer; } void ecl_kw_set_memcpy_data(ecl_kw_type *ecl_kw , const void *src) { if (src != NULL) - memcpy(ecl_kw->data , src , ecl_kw->size * ecl_kw->sizeof_ctype); + memcpy(ecl_kw->data , src , ecl_kw->size * ecl_kw_get_sizeof_ctype(ecl_kw)); } @@ -321,7 +321,7 @@ static bool ecl_kw_string_eq(const char *s1 , const char *s2) { const int len2 = strlen(short_kw); int index; bool eq = true; - if (len1 > ECL_STRING_LENGTH) + if (len1 > ECL_STRING8_LENGTH) util_abort("%s : eclipse keyword:%s is too long - aborting \n",__func__ , long_kw); for (index = 0; index < len2; index++) @@ -338,21 +338,15 @@ static bool ecl_kw_string_eq(const char *s1 , const char *s2) { bool ecl_kw_ichar_eq(const ecl_kw_type *ecl_kw , int i , const char *value) { - char s1[ECL_STRING_LENGTH + 1]; + char s1[ECL_STRING8_LENGTH + 1]; ecl_kw_iget(ecl_kw , i , s1); return ecl_kw_string_eq(s1 , value); } bool ecl_kw_size_and_type_equal( const ecl_kw_type *ecl_kw1 , const ecl_kw_type * ecl_kw2 ) { - bool equal = true; - - if (ecl_kw1->size != ecl_kw2->size) - equal = false; - else if (ecl_kw1->ecl_type != ecl_kw2->ecl_type) - equal = false; - - return equal; + return (ecl_kw1->size == ecl_kw2->size && + ecl_type_is_equal(ecl_kw1->data_type, ecl_kw2->data_type)); } @@ -368,7 +362,7 @@ bool ecl_kw_header_eq(const ecl_kw_type *ecl_kw1 , const ecl_kw_type * ecl_kw2) } static bool ecl_kw_data_equal__( const ecl_kw_type * ecl_kw , const void * data , int cmp_elements) { - int cmp = memcmp( ecl_kw->data , data , cmp_elements * ecl_kw->sizeof_ctype); + int cmp = memcmp( ecl_kw->data , data , cmp_elements * ecl_kw_get_sizeof_ctype(ecl_kw)); if (cmp == 0) return true; else @@ -413,27 +407,6 @@ bool ecl_kw_equal(const ecl_kw_type *ecl_kw1, const ecl_kw_type *ecl_kw2) { } -#define CMP(ctype,ABS) \ -static bool CMP_ ## ctype( ctype v1, ctype v2 , ctype abs_epsilon , ctype rel_epsilon) { \ - if ((ABS(v1) + ABS(v2)) == 0) \ - return true; \ - { \ - ctype diff = ABS(v1 - v2); \ - if ((abs_epsilon > 0) && (diff > abs_epsilon)) \ - return false; \ - { \ - ctype sum = ABS(v1) + ABS(v2); \ - ctype rel_diff = diff / sum; \ - if ((rel_epsilon > 0) && (rel_diff > rel_epsilon)) \ - return false; \ - } \ - return true; \ - } \ -} -CMP(float,fabsf) -CMP(double,fabs) -#undef CMP - #define ECL_KW_NUMERIC_CMP(ctype) \ static bool ecl_kw_numeric_equal_ ## ctype( const ecl_kw_type * ecl_kw1 , const ecl_kw_type * ecl_kw2 , ctype abs_diff , ctype rel_diff) { \ @@ -443,7 +416,7 @@ CMP(double,fabs) const ctype * data1 = (const ctype *) ecl_kw1->data; \ const ctype * data2 = (const ctype *) ecl_kw2->data; \ for (index = 0; index < ecl_kw1->size; index++) { \ - equal = CMP_ ## ctype( data1[index] , data2[index] , abs_diff , rel_diff); \ + equal = util_ ## ctype ## _approx_equal__( data1[index], data2[index] , rel_diff , abs_diff); \ if (!equal) \ break; \ } \ @@ -463,22 +436,15 @@ ECL_KW_NUMERIC_CMP( double ) */ bool ecl_kw_numeric_equal(const ecl_kw_type *ecl_kw1, const ecl_kw_type *ecl_kw2 , double abs_diff , double rel_diff) { - bool equal = true; - if ( ecl_kw1->ecl_type != ecl_kw2->ecl_type) - equal = false; - - if ( ecl_kw1->size != ecl_kw2->size) - equal = false; - - if (equal) { - if (ecl_kw1->ecl_type == ECL_FLOAT_TYPE) - equal = ecl_kw_numeric_equal_float( ecl_kw1 , ecl_kw2 , abs_diff , rel_diff ); - else if (ecl_kw1->ecl_type == ECL_DOUBLE_TYPE) - equal = ecl_kw_numeric_equal_double( ecl_kw1 , ecl_kw2 , abs_diff , rel_diff ); - else - equal = ecl_kw_data_equal( ecl_kw1 , ecl_kw2->data ); - } - return equal; + if(!ecl_kw_size_and_type_equal(ecl_kw1, ecl_kw2)) + return false; + + if (ecl_type_is_float(ecl_kw1->data_type)) + return ecl_kw_numeric_equal_float( ecl_kw1 , ecl_kw2 , abs_diff , rel_diff ); + else if (ecl_type_is_double(ecl_kw1->data_type)) + return ecl_kw_numeric_equal_double( ecl_kw1 , ecl_kw2 , abs_diff , rel_diff ); + else + return ecl_kw_data_equal( ecl_kw1 , ecl_kw2->data ); } @@ -506,26 +472,21 @@ static void ecl_kw_set_shared_ref(ecl_kw_type * ecl_kw , void *data_ptr) { -static void ecl_kw_initialize(ecl_kw_type * ecl_kw , const char *header , int size , ecl_type_enum ecl_type) { - ecl_kw->ecl_type = ecl_type; - ecl_kw->sizeof_ctype = ecl_util_get_sizeof_ctype(ecl_kw->ecl_type); - - // NOTE ! Do not abort when reading a keyword with more than eight characters - // The keyword is populated with the eight first characters, and import works as expected - - //if (strlen(header) > ECL_STRING_LENGTH) - //util_abort("%s: Fatal error: ecl_header_name:%s is longer than eight characters - aborting \n",__func__,header); +static void ecl_kw_initialize(ecl_kw_type * ecl_kw , const char *header , int size , ecl_data_type data_type) { + ecl_kw_set_data_type(ecl_kw, data_type); + if (strlen(header) > ECL_STRING8_LENGTH) + util_abort("%s: Fatal error: ecl_header_name:%s is longer than eight characters - aborting \n",__func__,header); ecl_kw_set_header_name(ecl_kw , header); ecl_kw->size = size; } static size_t ecl_kw_fortio_data_size( const ecl_kw_type * ecl_kw) { - const int blocksize = get_blocksize( ecl_kw->ecl_type ); + const int blocksize = get_blocksize( ecl_kw->data_type ); const int num_blocks = ecl_kw->size / blocksize + (ecl_kw->size % blocksize == 0 ? 0 : 1); return num_blocks * (4 + 4) + // Fortran fluff for each block - ecl_kw->size * ecl_util_get_sizeof_ctype_fortio( ecl_kw->ecl_type ); // Actual data + ecl_kw->size * ecl_type_get_sizeof_ctype_fortio( ecl_kw->data_type ); // Actual data } @@ -546,10 +507,10 @@ size_t ecl_kw_fortio_size( const ecl_kw_type * ecl_kw ) { /** The data is copied from the input argument to the ecl_kw; data can be NULL. */ -ecl_kw_type * ecl_kw_alloc_new(const char * header , int size, ecl_type_enum ecl_type , const void * data) { +ecl_kw_type * ecl_kw_alloc_new(const char * header , int size, ecl_data_type data_type , const void * data) { ecl_kw_type *ecl_kw; ecl_kw = ecl_kw_alloc_empty(); - ecl_kw_initialize(ecl_kw , header , size , ecl_type); + ecl_kw_initialize(ecl_kw , header , size , data_type); if (data != NULL) { ecl_kw_alloc_data(ecl_kw); ecl_kw_set_memcpy_data(ecl_kw , data); @@ -559,20 +520,22 @@ ecl_kw_type * ecl_kw_alloc_new(const char * header , int size, ecl_type_enum ec -ecl_kw_type * ecl_kw_alloc( const char * header , int size , ecl_type_enum ecl_type ) { +ecl_kw_type * ecl_kw_alloc( const char * header , int size , ecl_data_type data_type ) { ecl_kw_type *ecl_kw; + ecl_kw = ecl_kw_alloc_empty(); - ecl_kw_initialize(ecl_kw , header , size , ecl_type); + ecl_kw_initialize(ecl_kw , header , size , data_type); ecl_kw_alloc_data(ecl_kw); + return ecl_kw; } -ecl_kw_type * ecl_kw_alloc_new_shared(const char * header , int size, ecl_type_enum ecl_type , void * data) { +ecl_kw_type * ecl_kw_alloc_new_shared(const char * header , int size, ecl_data_type data_type , void * data) { ecl_kw_type *ecl_kw; ecl_kw = ecl_kw_alloc_empty(); - ecl_kw_initialize(ecl_kw , header , size , ecl_type); + ecl_kw_initialize(ecl_kw , header , size , data_type); ecl_kw_set_shared_ref(ecl_kw , data); return ecl_kw; } @@ -588,7 +551,6 @@ ecl_kw_type * ecl_kw_alloc_empty() { ecl_kw->data = NULL; ecl_kw->shared_data = false; ecl_kw->size = 0; - ecl_kw->sizeof_ctype = 0; UTIL_TYPE_ID_INIT(ecl_kw , ECL_KW_TYPE_ID); @@ -610,19 +572,17 @@ void ecl_kw_free__(void *void_ecl_kw) { void ecl_kw_memcpy_data( ecl_kw_type * target , const ecl_kw_type * src) { - if (!ecl_kw_assert_binary( target , src )) + if (!ecl_kw_size_and_type_equal( target , src )) util_abort("%s: type/size mismatch \n",__func__); - memcpy(target->data , src->data , target->size * target->sizeof_ctype); + memcpy(target->data , src->data , target->size * ecl_kw_get_sizeof_ctype(target)); } void ecl_kw_memcpy(ecl_kw_type *target, const ecl_kw_type *src) { target->size = src->size; - target->sizeof_ctype = src->sizeof_ctype; - target->ecl_type = src->ecl_type; - + ecl_kw_set_data_type(target, src->data_type); ecl_kw_set_header_name( target , src->header ); ecl_kw_alloc_data(target); @@ -670,7 +630,7 @@ ecl_kw_type * ecl_kw_alloc_slice_copy( const ecl_kw_type * src, int index1, int } if (new_size > 0) { new_kw = ecl_kw_alloc_empty(); - ecl_kw_initialize(new_kw , src->header , new_size , src->ecl_type); + ecl_kw_initialize(new_kw , src->header , new_size , src->data_type); ecl_kw_alloc_data(new_kw); /* 2: Copy over the elements. */ @@ -679,7 +639,7 @@ ecl_kw_type * ecl_kw_alloc_slice_copy( const ecl_kw_type * src, int index1, int int target_index = 0; const char * src_ptr = src->data; char * new_ptr = new_kw->data; - int sizeof_ctype = new_kw->sizeof_ctype; + int sizeof_ctype = ecl_kw_get_sizeof_ctype(new_kw); while ( src_index < index2 ) { memcpy( &new_ptr[ target_index * sizeof_ctype ] , &src_ptr[ src_index * sizeof_ctype ] , sizeof_ctype ); @@ -695,7 +655,22 @@ ecl_kw_type * ecl_kw_alloc_slice_copy( const ecl_kw_type * src, int index1, int +void ecl_kw_resize( ecl_kw_type * ecl_kw, int new_size) { + if (ecl_kw->shared_data) + util_abort("%s: trying to allocate data for ecl_kw object which has been declared with shared storage - aborting \n",__func__); + if (new_size != ecl_kw->size) { + size_t old_byte_size = ecl_kw->size * ecl_kw_get_sizeof_ctype(ecl_kw); + size_t new_byte_size = new_size * ecl_kw_get_sizeof_ctype(ecl_kw); + + ecl_kw->data = util_realloc(ecl_kw->data , new_byte_size ); + if (new_byte_size > old_byte_size) { + size_t offset = old_byte_size; + memset(&ecl_kw->data[offset] , 0 , new_byte_size - old_byte_size); + } + ecl_kw->size = new_size; + } +} /** Will allocate a copy of the src_kw. Will copy @count elements @@ -718,7 +693,7 @@ ecl_kw_type * ecl_kw_alloc_sub_copy( const ecl_kw_type * src, const char * new_k { void * src_data = ecl_kw_iget_ptr( src , offset ); - return ecl_kw_alloc_new( new_kw , count , src->ecl_type , src_data ); + return ecl_kw_alloc_new( new_kw , count , src->data_type , src_data ); } } @@ -730,18 +705,18 @@ const void * ecl_kw_copyc__(const void * void_kw) { static void * ecl_kw_iget_ptr_static(const ecl_kw_type *ecl_kw , int i) { ecl_kw_assert_index(ecl_kw , i , __func__); - return &ecl_kw->data[i * ecl_kw->sizeof_ctype]; + return &ecl_kw->data[i * ecl_kw_get_sizeof_ctype(ecl_kw)]; } static void ecl_kw_iget_static(const ecl_kw_type *ecl_kw , int i , void *iptr) { - memcpy(iptr , ecl_kw_iget_ptr_static(ecl_kw , i) , ecl_kw->sizeof_ctype); + memcpy(iptr , ecl_kw_iget_ptr_static(ecl_kw , i) , ecl_kw_get_sizeof_ctype(ecl_kw)); } static void ecl_kw_iset_static(ecl_kw_type *ecl_kw , int i , const void *iptr) { ecl_kw_assert_index(ecl_kw , i , __func__); - memcpy(&ecl_kw->data[i * ecl_kw->sizeof_ctype] , iptr, ecl_kw->sizeof_ctype); + memcpy(&ecl_kw->data[i * ecl_kw_get_sizeof_ctype(ecl_kw)] , iptr, ecl_kw_get_sizeof_ctype(ecl_kw)); } @@ -755,11 +730,11 @@ void ecl_kw_iget(const ecl_kw_type *ecl_kw , int i , void *iptr) { float and int. */ double ecl_kw_iget_as_double(const ecl_kw_type * ecl_kw , int index) { - if (ecl_kw->ecl_type == ECL_FLOAT_TYPE) + if (ecl_type_is_float(ecl_kw->data_type)) return ecl_kw_iget_float( ecl_kw , index); /* Here the compiler will silently insert a float -> double conversion. */ - else if (ecl_kw->ecl_type == ECL_DOUBLE_TYPE) + else if (ecl_type_is_double(ecl_kw->data_type)) return ecl_kw_iget_double( ecl_kw, index); - else if (ecl_kw->ecl_type == ECL_INT_TYPE) + else if (ecl_type_is_int(ecl_kw->data_type)) return ecl_kw_iget_int( ecl_kw, index); /* */ else { util_abort("%s: can not be converted to double - no data for you! \n",__func__); @@ -772,9 +747,9 @@ double ecl_kw_iget_as_double(const ecl_kw_type * ecl_kw , int index) { */ float ecl_kw_iget_as_float(const ecl_kw_type * ecl_kw , int i) { - if (ecl_kw->ecl_type == ECL_FLOAT_TYPE) + if (ecl_type_is_float(ecl_kw->data_type)) return ecl_kw_iget_float( ecl_kw , i); - else if (ecl_kw->ecl_type == ECL_DOUBLE_TYPE) + else if (ecl_type_is_double(ecl_kw->data_type)) return (float) ecl_kw_iget_double( ecl_kw, i); else { util_abort("%s: can not be converted to float - no data for you! \n",__func__); @@ -819,6 +794,12 @@ const char * ecl_kw_iget_char_ptr( const ecl_kw_type * ecl_kw , int i) { return ecl_kw_iget_ptr( ecl_kw , i ); } +const char * ecl_kw_iget_string_ptr( const ecl_kw_type * ecl_kw, int i) { + if (ecl_kw_get_type(ecl_kw) != ECL_STRING_TYPE) + util_abort("%s: Keyword: %s is wrong type - aborting \n",__func__ , ecl_kw_get_header8(ecl_kw)); + return ecl_kw_iget_ptr( ecl_kw , i ); +} + /** This will set the elemnts of the ecl_kw data storage in index to @@ -828,10 +809,10 @@ const char * ecl_kw_iget_char_ptr( const ecl_kw_type * ecl_kw , int i) { */ void ecl_kw_iset_string8(ecl_kw_type * ecl_kw , int index , const char *s8) { char * ecl_string = (char *) ecl_kw_iget_ptr( ecl_kw , index ); - if (strlen( s8 ) >= ECL_STRING_LENGTH) { + if (strlen( s8 ) >= ECL_STRING8_LENGTH) { /* The whole string goes in - possibly loosing content at the end. */ int i; - for (i=0; i < ECL_STRING_LENGTH; i++) + for (i=0; i < ECL_STRING8_LENGTH; i++) ecl_string[i] = s8[i]; } else { /* The string is padded with trailing spaces. */ @@ -841,12 +822,12 @@ void ecl_kw_iset_string8(ecl_kw_type * ecl_kw , int index , const char *s8) { for (i=0; i < string_length; i++) ecl_string[i] = s8[i]; - for (i=string_length; i < ECL_STRING_LENGTH; i++) + for (i=string_length; i < ECL_STRING8_LENGTH; i++) ecl_string[i] = ' '; } - ecl_string[ ECL_STRING_LENGTH ] = '\0'; + ecl_string[ ECL_STRING8_LENGTH ] = '\0'; } /** @@ -861,16 +842,40 @@ void ecl_kw_iset_string8(ecl_kw_type * ecl_kw , int index , const char *s8) { elements is not what you want? */ void ecl_kw_iset_char_ptr( ecl_kw_type * ecl_kw , int index, const char * s) { - int strings = strlen( s ) / ECL_STRING_LENGTH; - if ((strlen( s ) % ECL_STRING_LENGTH) != 0) + int strings = strlen( s ) / ECL_STRING8_LENGTH; + if ((strlen( s ) % ECL_STRING8_LENGTH) != 0) strings++; { int sub_index; for (sub_index = 0; sub_index < strings; sub_index++) - ecl_kw_iset_string8( ecl_kw , index + sub_index , &s[ sub_index * ECL_STRING_LENGTH ]); + ecl_kw_iset_string8( ecl_kw , index + sub_index , &s[ sub_index * ECL_STRING8_LENGTH ]); } } +/** + * This function will verify that the given string is of approperiate length + * (0 <= lenght <= data_type.element_size). If so, the elements of @s will be + * written to the @ecl_kw string array starting at @index. + */ +void ecl_kw_iset_string_ptr( ecl_kw_type * ecl_kw, int index, const char * s) { + if(!ecl_type_is_alpha(ecl_kw_get_data_type(ecl_kw))) { + char * type_name = ecl_type_alloc_name(ecl_kw_get_data_type(ecl_kw)); + util_abort("%s: Expected alphabetic data type (CHAR, CXXX or MESS), was %s\n", __func__, type_name); + } + + size_t input_len = strlen(s); + size_t type_len = ecl_type_get_sizeof_ctype_fortio(ecl_kw_get_data_type(ecl_kw)); + + if(input_len > type_len) + util_abort("%s: String of length %d cannot hold input string of length %d\n", __func__, type_len, input_len); + + char * ecl_string = (char *) ecl_kw_iget_ptr(ecl_kw, index); + for(int i = 0; i < input_len; ++i) + ecl_string[i] = s[i]; + + ecl_string[input_len] = '\0'; +} + /** This function will compare the string at position @index with the @@ -1082,10 +1087,10 @@ bool ecl_kw_fread_data(ecl_kw_type *ecl_kw, fortio_type *fortio) { const char null_char = '\0'; bool fmt_file = fortio_fmt_file( fortio ); if (ecl_kw->size > 0) { - const int blocksize = get_blocksize( ecl_kw->ecl_type ); + const int blocksize = get_blocksize( ecl_kw->data_type ); if (fmt_file) { const int blocks = ecl_kw->size / blocksize + (ecl_kw->size % blocksize == 0 ? 0 : 1); - const char * read_fmt = get_read_fmt( ecl_kw->ecl_type ); + char * read_fmt = alloc_read_fmt( ecl_kw->data_type ); FILE * stream = fortio_get_FILE(fortio); int offset = 0; int index = 0; @@ -1093,15 +1098,23 @@ bool ecl_kw_fread_data(ecl_kw_type *ecl_kw, fortio_type *fortio) { for (ib = 0; ib < blocks; ib++) { int read_elm = util_int_min((ib + 1) * blocksize , ecl_kw->size) - ib * blocksize; for (ir = 0; ir < read_elm; ir++) { - switch(ecl_kw->ecl_type) { + switch(ecl_kw_get_type(ecl_kw)) { case(ECL_CHAR_TYPE): ecl_kw_fscanf_qstring(&ecl_kw->data[offset] , read_fmt , 8, stream); break; + case(ECL_STRING_TYPE): + ecl_kw_fscanf_qstring( + &ecl_kw->data[offset], + read_fmt, + ecl_type_get_sizeof_ctype_fortio(ecl_kw_get_data_type(ecl_kw)), + stream + ); + break; case(ECL_INT_TYPE): { int iread = fscanf(stream , read_fmt , (int *) &ecl_kw->data[offset]); if (iread != 1) - util_abort("%s: after reading %d values reading of keyword:%s from:%s failed - aborting \n",__func__ , offset / ecl_kw->sizeof_ctype , ecl_kw->header8 , fortio_filename_ref(fortio)); + util_abort("%s: after reading %d values reading of keyword:%s from:%s failed - aborting \n",__func__ , offset / ecl_kw_get_sizeof_ctype(ecl_kw) , ecl_kw->header8 , fortio_filename_ref(fortio)); } break; case(ECL_FLOAT_TYPE): @@ -1109,7 +1122,7 @@ bool ecl_kw_fread_data(ecl_kw_type *ecl_kw, fortio_type *fortio) { int iread = fscanf(stream , read_fmt , (float *) &ecl_kw->data[offset]); if (iread != 1) { util_abort("%s: after reading %d values reading of keyword:%s from:%s failed - aborting \n",__func__ , - offset / ecl_kw->sizeof_ctype , + offset / ecl_kw_get_sizeof_ctype(ecl_kw) , ecl_kw->header8 , fortio_filename_ref(fortio)); } @@ -1139,19 +1152,20 @@ bool ecl_kw_fread_data(ecl_kw_type *ecl_kw, fortio_type *fortio) { ecl_kw_fscanf_qstring(&ecl_kw->data[offset] , read_fmt , 8 , stream); break; default: - util_abort("%s: Internal error: internal eclipse_type: %d not recognized - aborting \n",__func__ , ecl_kw->ecl_type); + util_abort("%s: Internal error: internal eclipse_type: %d not recognized - aborting \n",__func__ , ecl_kw_get_type(ecl_kw)); } - offset += ecl_kw->sizeof_ctype; + offset += ecl_kw_get_sizeof_ctype(ecl_kw); index++; } } /* Skip the trailing newline */ fortio_fseek( fortio , 1 , SEEK_CUR); + free(read_fmt); return true; } else { bool read_ok = true; - if (ecl_kw->ecl_type == ECL_CHAR_TYPE || ecl_kw->ecl_type == ECL_MESS_TYPE) { + if (ecl_type_is_char(ecl_kw->data_type) || ecl_type_is_mess(ecl_kw->data_type) || ecl_type_is_string(ecl_kw->data_type)) { const int blocks = ecl_kw->size / blocksize + (ecl_kw->size % blocksize == 0 ? 0 : 1); int ib = 0; while (true) { @@ -1164,9 +1178,11 @@ bool ecl_kw_fread_data(ecl_kw_type *ecl_kw, fortio_type *fortio) { int record_size = fortio_init_read(fortio); if (record_size >= 0) { int ir; + const int sizeof_ctype = ecl_type_get_sizeof_ctype(ecl_kw->data_type); + const int sizeof_ctype_fortio = ecl_type_get_sizeof_ctype_fortio(ecl_kw->data_type); for (ir = 0; ir < read_elm; ir++) { - util_fread( &ecl_kw->data[(ib * blocksize + ir) * ecl_kw->sizeof_ctype] , 1 , ECL_STRING_LENGTH , stream , __func__); - ecl_kw->data[(ib * blocksize + ir) * ecl_kw->sizeof_ctype + ECL_STRING_LENGTH] = null_char; + util_fread( &ecl_kw->data[(ib * blocksize + ir) * sizeof_ctype] , 1 , sizeof_ctype_fortio , stream , __func__); + ecl_kw->data[(ib * blocksize + ir) * sizeof_ctype + sizeof_ctype_fortio] = null_char; } read_ok = fortio_complete_read(fortio , record_size); } else @@ -1184,7 +1200,7 @@ bool ecl_kw_fread_data(ecl_kw_type *ecl_kw, fortio_type *fortio) { This function handles the fuc***g blocks transparently at a low level. */ - read_ok = fortio_fread_buffer(fortio , ecl_kw->data , ecl_kw->size * ecl_kw->sizeof_ctype); + read_ok = fortio_fread_buffer(fortio , ecl_kw->data , ecl_kw->size * ecl_kw_get_sizeof_ctype(ecl_kw)); if (read_ok && ECL_ENDIAN_FLIP) ecl_kw_endian_convert_data(ecl_kw); } @@ -1196,14 +1212,14 @@ bool ecl_kw_fread_data(ecl_kw_type *ecl_kw, fortio_type *fortio) { } -void ecl_kw_fread_indexed_data(fortio_type * fortio, offset_type data_offset, ecl_type_enum ecl_type, int element_count, const int_vector_type* index_map, char* buffer) { - const int block_size = get_blocksize( ecl_type ); +void ecl_kw_fread_indexed_data(fortio_type * fortio, offset_type data_offset, ecl_data_type data_type, int element_count, const int_vector_type* index_map, char* buffer) { + const int block_size = get_blocksize(data_type); FILE *stream = fortio_get_FILE( fortio ); int index; - int element_size = ecl_util_get_sizeof_ctype(ecl_type); + int element_size = ecl_type_get_sizeof_ctype(data_type); - if(ecl_type == ECL_CHAR_TYPE || ecl_type == ECL_MESS_TYPE) { - element_size = ECL_STRING_LENGTH; + if(ecl_type_is_char(data_type) || ecl_type_is_mess(data_type)) { + element_size = ECL_STRING8_LENGTH; } @@ -1234,35 +1250,33 @@ bool ecl_kw_fread_realloc_data(ecl_kw_type *ecl_kw, fortio_type *fortio) { Static method without a class instance. */ -bool ecl_kw_fskip_data__( ecl_type_enum ecl_type , const int element_count , fortio_type * fortio) { - bool fmt_file = fortio_fmt_file(fortio); - bool skip_ok = true; - if (element_count > 0) { - if (fmt_file) { - /* Formatted skipping actually involves reading the data - nice ??? */ - ecl_kw_type * tmp_kw = ecl_kw_alloc_empty( ); - ecl_kw_initialize( tmp_kw , "WORK" , element_count , ecl_type ); - ecl_kw_alloc_data(tmp_kw); - ecl_kw_fread_data(tmp_kw , fortio); - ecl_kw_free( tmp_kw ); - } else { - const int blocksize = get_blocksize( ecl_type ); - const int block_count = element_count / blocksize + (element_count % blocksize == 0 ? 0 : 1); +bool ecl_kw_fskip_data__( ecl_data_type data_type , const int element_count , fortio_type * fortio) { + if (element_count <= 0) + return true; - int element_size = ecl_util_get_sizeof_ctype(ecl_type ); - if(ecl_type == ECL_CHAR_TYPE || ecl_type == ECL_MESS_TYPE) { - element_size = ECL_STRING_LENGTH; - } + bool fmt_file = fortio_fmt_file(fortio); + if (fmt_file) { + /* Formatted skipping actually involves reading the data - nice ??? */ + ecl_kw_type * tmp_kw = ecl_kw_alloc_empty( ); + ecl_kw_initialize( tmp_kw , "WORK" , element_count , data_type ); + ecl_kw_alloc_data(tmp_kw); + ecl_kw_fread_data(tmp_kw , fortio); + ecl_kw_free( tmp_kw ); + } else { + const int blocksize = get_blocksize( data_type ); + const int block_count = element_count / blocksize + (element_count % blocksize != 0); + int element_size = ecl_type_get_sizeof_ctype_fortio(data_type); - skip_ok = fortio_data_fskip(fortio, element_size, element_count, block_count); - } + if(!fortio_data_fskip(fortio, element_size, element_count, block_count)) + return false; } - return skip_ok; + + return true; } bool ecl_kw_fskip_data(ecl_kw_type *ecl_kw, fortio_type *fortio) { - return ecl_kw_fskip_data__( ecl_kw->ecl_type , ecl_kw->size , fortio ); + return ecl_kw_fskip_data__( ecl_kw_get_data_type(ecl_kw) , ecl_kw->size , fortio ); } @@ -1286,52 +1300,55 @@ void ecl_kw_fskip_header( fortio_type * fortio) { } -bool ecl_kw_fread_header(ecl_kw_type *ecl_kw , fortio_type * fortio) { +ecl_read_status_enum ecl_kw_fread_header(ecl_kw_type *ecl_kw , fortio_type * fortio) { const char null_char = '\0'; FILE *stream = fortio_get_FILE( fortio ); bool fmt_file = fortio_fmt_file( fortio ); - char header[ECL_STRING_LENGTH + 1]; + char header[ECL_STRING8_LENGTH + 1]; char ecl_type_str[ECL_TYPE_LENGTH + 1]; int record_size; int size; - bool OK = true; if (fmt_file) { - OK = ecl_kw_fscanf_qstring(header , "%8c" , 8 , stream); - if (OK) { - int read_count = fscanf(stream , "%d" , &size); - if (read_count == 1) { - ecl_kw_fscanf_qstring(ecl_type_str , "%4c" , 4 , stream); - fgetc(stream); /* Reading the trailing newline ... */ - } else - util_abort("%s: reading failed - at end of file?\n",__func__); - } - } else { - header[ECL_STRING_LENGTH] = null_char; + if(!ecl_kw_fscanf_qstring(header , "%8c" , 8 , stream)) + return ECL_KW_READ_FAIL; + + int read_count = fscanf(stream , "%d" , &size); + if (read_count != 1) + util_abort("%s: reading failed - at end of file?\n",__func__); + + ecl_kw_fscanf_qstring(ecl_type_str , "%4c" , 4 , stream); + fgetc(stream); /* Reading the trailing newline ... */ + } + else { + header[ECL_STRING8_LENGTH] = null_char; ecl_type_str[ECL_TYPE_LENGTH] = null_char; record_size = fortio_init_read(fortio); - if (record_size > 0) { - char buffer[ECL_KW_HEADER_DATA_SIZE]; - size_t read_bytes = fread(buffer , 1 , ECL_KW_HEADER_DATA_SIZE , stream); - if (read_bytes == ECL_KW_HEADER_DATA_SIZE) { - memcpy( header , &buffer[0] , ECL_STRING_LENGTH); - size = *( (int *) &buffer[ECL_STRING_LENGTH] ); - memcpy( ecl_type_str , &buffer[ECL_STRING_LENGTH + sizeof(size)] , ECL_TYPE_LENGTH); + if (record_size <= 0) + return ECL_KW_READ_FAIL; - OK = fortio_complete_read(fortio , record_size); - } else - OK = false; + char buffer[ECL_KW_HEADER_DATA_SIZE]; + size_t read_bytes = fread(buffer , 1 , ECL_KW_HEADER_DATA_SIZE , stream); - if (OK && ECL_ENDIAN_FLIP) - util_endian_flip_vector(&size , sizeof size , 1); - } else - OK = false; + if (read_bytes != ECL_KW_HEADER_DATA_SIZE) + return ECL_KW_READ_FAIL; + + memcpy( header , &buffer[0] , ECL_STRING8_LENGTH); + size = *( (int *) &buffer[ECL_STRING8_LENGTH] ); + memcpy( ecl_type_str , &buffer[ECL_STRING8_LENGTH + sizeof(size)] , ECL_TYPE_LENGTH); + + if(!fortio_complete_read(fortio , record_size)) + return ECL_KW_READ_FAIL; + + if (ECL_ENDIAN_FLIP) + util_endian_flip_vector(&size , sizeof size , 1); } - if (OK) - ecl_kw_set_header(ecl_kw , header , size , ecl_type_str); - return OK; + ecl_data_type data_type = ecl_type_create_from_name( ecl_type_str ); + ecl_kw_initialize( ecl_kw , header , size , data_type); + + return ECL_KW_READ_OK; } @@ -1359,8 +1376,7 @@ bool ecl_kw_fseek_kw(const char * kw , bool rewind , bool abort_on_error , forti kw_found = false; while (cont) { long current_pos = fortio_ftell( fortio ); - bool header_OK = ecl_kw_fread_header(tmp_kw , fortio); - if (header_OK) { + if (ecl_kw_fread_header(tmp_kw , fortio) == ECL_KW_READ_OK) { if (ecl_kw_string_eq(ecl_kw_get_header8(tmp_kw) , kw)) { fortio_fseek( fortio , current_pos , SEEK_SET ); kw_found = true; @@ -1439,7 +1455,7 @@ void ecl_kw_alloc_data(ecl_kw_type *ecl_kw) { util_abort("%s: trying to allocate data for ecl_kw object which has been declared with shared storage - aborting \n",__func__); { - size_t byte_size = ecl_kw->size * ecl_kw->sizeof_ctype; + size_t byte_size = ecl_kw->size * ecl_kw_get_sizeof_ctype(ecl_kw); ecl_kw->data = util_realloc(ecl_kw->data , byte_size ); memset(ecl_kw->data , 0 , byte_size); } @@ -1457,7 +1473,7 @@ void ecl_kw_free_data(ecl_kw_type *ecl_kw) { void ecl_kw_set_header_name(ecl_kw_type * ecl_kw , const char * header) { - ecl_kw->header8 = realloc(ecl_kw->header8 , ECL_STRING_LENGTH + 1); + ecl_kw->header8 = realloc(ecl_kw->header8 , ECL_STRING8_LENGTH + 1); sprintf(ecl_kw->header8 , "%-8s" , header); /* Internalizing a header without the trailing spaces as well. */ @@ -1466,22 +1482,13 @@ void ecl_kw_set_header_name(ecl_kw_type * ecl_kw , const char * header) { } - -void ecl_kw_set_header(ecl_kw_type *ecl_kw , const char *header , int size , const char *type_name) { - ecl_type_enum ecl_type = ecl_util_get_type_from_name( type_name ); - ecl_kw_initialize( ecl_kw , header , size , ecl_type); -} - - -void ecl_kw_set_header_alloc(ecl_kw_type *ecl_kw , const char *header , int size , const char *type_name ) { - ecl_kw_set_header(ecl_kw , header , size , type_name ); - ecl_kw_alloc_data(ecl_kw); +void ecl_kw_set_data_type(ecl_kw_type * ecl_kw, ecl_data_type data_type) { + memcpy(&ecl_kw->data_type, &data_type, sizeof data_type); } bool ecl_kw_fread_realloc(ecl_kw_type *ecl_kw , fortio_type *fortio) { - bool OK = ecl_kw_fread_header(ecl_kw , fortio); - if (OK) + if (ecl_kw_fread_header(ecl_kw , fortio) == ECL_KW_READ_OK) return ecl_kw_fread_realloc_data( ecl_kw , fortio ); else return false; @@ -1490,7 +1497,7 @@ bool ecl_kw_fread_realloc(ecl_kw_type *ecl_kw , fortio_type *fortio) { void ecl_kw_fread(ecl_kw_type * ecl_kw , fortio_type * fortio) { int current_size = ecl_kw->size; - if (!ecl_kw_fread_header(ecl_kw , fortio)) + if (ecl_kw_fread_header(ecl_kw , fortio) != ECL_KW_READ_OK) util_abort("%s: failed to read header for ecl_kw - aborting \n",__func__); if (ecl_kw->size == current_size) @@ -1528,28 +1535,29 @@ static void ecl_kw_fwrite_data_unformatted( ecl_kw_type * ecl_kw , fortio_type * ecl_kw_endian_convert_data(ecl_kw); { - const int blocksize = get_blocksize( ecl_kw->ecl_type ); + const int blocksize = get_blocksize( ecl_kw->data_type ); const int num_blocks = ecl_kw->size / blocksize + (ecl_kw->size % blocksize == 0 ? 0 : 1); int block_nr; for (block_nr = 0; block_nr < num_blocks; block_nr++) { int this_blocksize = util_int_min((block_nr + 1)*blocksize , ecl_kw->size) - block_nr*blocksize; - if (ecl_kw->ecl_type == ECL_CHAR_TYPE || ecl_kw->ecl_type == ECL_MESS_TYPE) { + if (ecl_type_is_char(ecl_kw->data_type) || ecl_type_is_mess(ecl_kw->data_type) || ecl_type_is_string(ecl_kw->data_type)) { /* Due to the terminating \0 characters there is not a continous file/memory mapping - the \0 characters arel skipped. */ - FILE *stream = fortio_get_FILE(fortio); - int record_size = this_blocksize * ECL_STRING_LENGTH; /* The total size in bytes of the record written by the fortio layer. */ - int i; + FILE *stream = fortio_get_FILE(fortio); + int word_size = ecl_type_get_sizeof_ctype_fortio(ecl_kw->data_type); + int record_size = this_blocksize * word_size; /* The total size in bytes of the record written by the fortio layer. */ + int i; fortio_init_write(fortio , record_size ); for (i = 0; i < this_blocksize; i++) - fwrite(&ecl_kw->data[(block_nr * blocksize + i) * ecl_kw->sizeof_ctype] , 1 , ECL_STRING_LENGTH , stream); + fwrite(&ecl_kw->data[(block_nr * blocksize + i) * ecl_kw_get_sizeof_ctype(ecl_kw)] , 1 , word_size , stream); fortio_complete_write(fortio , record_size); } else { - int record_size = this_blocksize * ecl_kw->sizeof_ctype; /* The total size in bytes of the record written by the fortio layer. */ - fortio_fwrite_record(fortio , &ecl_kw->data[block_nr * blocksize * ecl_kw->sizeof_ctype] , record_size); + int record_size = this_blocksize * ecl_kw_get_sizeof_ctype(ecl_kw); /* The total size in bytes of the record written by the fortio layer. */ + fortio_fwrite_record(fortio , &ecl_kw->data[block_nr * blocksize * ecl_kw_get_sizeof_ctype(ecl_kw)] , record_size); } } } @@ -1601,9 +1609,9 @@ static void ecl_kw_fwrite_data_formatted( ecl_kw_type * ecl_kw , fortio_type * f { FILE * stream = fortio_get_FILE( fortio ); - const int blocksize = get_blocksize( ecl_kw->ecl_type ); - const int columns = get_columns( ecl_kw->ecl_type ); - const char * write_fmt = ecl_kw_get_write_fmt( ecl_kw->ecl_type ); + const int blocksize = get_blocksize( ecl_kw->data_type ); + const int columns = get_columns( ecl_kw->data_type ); + char * write_fmt = alloc_write_fmt( ecl_kw->data_type ); const int num_blocks = ecl_kw->size / blocksize + (ecl_kw->size % blocksize == 0 ? 0 : 1); int block_nr; @@ -1617,10 +1625,13 @@ static void ecl_kw_fwrite_data_formatted( ecl_kw_type * ecl_kw , fortio_type * f for (col_nr =0; col_nr < num_columns; col_nr++) { int data_index = block_nr * blocksize + line_nr * columns + col_nr; void * data_ptr = ecl_kw_iget_ptr_static( ecl_kw , data_index ); - switch (ecl_kw->ecl_type) { + switch (ecl_kw_get_type(ecl_kw)) { case(ECL_CHAR_TYPE): fprintf(stream , write_fmt , data_ptr); break; + case(ECL_STRING_TYPE): + fprintf(stream , write_fmt , data_ptr); + break; case(ECL_INT_TYPE): { int int_value = ((int *) data_ptr)[0]; @@ -1656,6 +1667,8 @@ static void ecl_kw_fwrite_data_formatted( ecl_kw_type * ecl_kw , fortio_type * f fprintf(stream , "\n"); } } + + free(write_fmt); } } @@ -1675,8 +1688,10 @@ void ecl_kw_fwrite_data(const ecl_kw_type *_ecl_kw , fortio_type *fortio) { void ecl_kw_fwrite_header(const ecl_kw_type *ecl_kw , fortio_type *fortio) { FILE *stream = fortio_get_FILE(fortio); bool fmt_file = fortio_fmt_file(fortio); + char * type_name = ecl_type_alloc_name(ecl_kw->data_type); + if (fmt_file) - fprintf(stream , WRITE_HEADER_FMT , ecl_kw->header8 , ecl_kw->size , ecl_util_get_type_name( ecl_kw->ecl_type )); + fprintf(stream , WRITE_HEADER_FMT , ecl_kw->header8 , ecl_kw->size , type_name); else { int size = ecl_kw->size; if (ECL_ENDIAN_FLIP) @@ -1684,13 +1699,15 @@ void ecl_kw_fwrite_header(const ecl_kw_type *ecl_kw , fortio_type *fortio) { fortio_init_write(fortio , ECL_KW_HEADER_DATA_SIZE ); - fwrite(ecl_kw->header8 , sizeof(char) , ECL_STRING_LENGTH , stream); + fwrite(ecl_kw->header8 , sizeof(char) , ECL_STRING8_LENGTH , stream); fwrite(&size , sizeof(int) , 1 , stream); - fwrite(ecl_util_get_type_name( ecl_kw->ecl_type ) , sizeof(char) , ECL_TYPE_LENGTH , stream); + fwrite(type_name , sizeof(char) , ECL_TYPE_LENGTH , stream); fortio_complete_write(fortio , ECL_KW_HEADER_DATA_SIZE); } + + free(type_name); } @@ -1716,7 +1733,17 @@ int ecl_kw_get_size(const ecl_kw_type * ecl_kw) { return ecl_kw->size; } -ecl_type_enum ecl_kw_get_type(const ecl_kw_type * ecl_kw) { return ecl_kw->ecl_type; } +ecl_type_enum ecl_kw_get_type(const ecl_kw_type * ecl_kw) { + return ecl_type_get_type(ecl_kw->data_type); +} + +ecl_data_type ecl_kw_get_data_type(const ecl_kw_type * ecl_kw) { + return ecl_kw->data_type; +} + +size_t ecl_kw_get_sizeof_ctype(const ecl_kw_type * ecl_kw) { + return ecl_type_get_sizeof_ctype(ecl_kw->data_type); +} /******************************************************************/ @@ -1726,37 +1753,39 @@ ecl_kw_type * ecl_kw_buffer_alloc(buffer_type * buffer) { const char * header = buffer_fread_string( buffer ); int size = buffer_fread_int( buffer ); ecl_type_enum ecl_type = buffer_fread_int( buffer ); - { - ecl_kw_type * ecl_kw = ecl_kw_alloc_empty(); - ecl_kw_initialize( ecl_kw , header , size , ecl_type ); - ecl_kw_alloc_data(ecl_kw); - buffer_fread(buffer , ecl_kw->data , ecl_kw->sizeof_ctype , ecl_kw->size); - return ecl_kw; - } + size_t element_size = buffer_fread_int( buffer ); + + ecl_data_type data_type = ecl_type_create(ecl_type, element_size); + ecl_kw_type * ecl_kw = ecl_kw_alloc_empty(); + ecl_kw_initialize( ecl_kw , header , size , data_type ); + ecl_kw_alloc_data(ecl_kw); + buffer_fread(buffer , ecl_kw->data , ecl_kw_get_sizeof_ctype(ecl_kw) , ecl_kw->size); + return ecl_kw; } void ecl_kw_buffer_store(const ecl_kw_type * ecl_kw , buffer_type * buffer) { buffer_fwrite_string( buffer , ecl_kw->header8 ); buffer_fwrite_int( buffer , ecl_kw->size ); - buffer_fwrite_int( buffer , ecl_kw->ecl_type ); - buffer_fwrite( buffer , ecl_kw->data , ecl_kw->sizeof_ctype , ecl_kw->size); + buffer_fwrite_int( buffer , ecl_type_get_type(ecl_kw->data_type) ); + buffer_fwrite_int( buffer , ecl_type_get_sizeof_ctype(ecl_kw->data_type)); + buffer_fwrite( buffer , ecl_kw->data , ecl_kw_get_sizeof_ctype(ecl_kw) , ecl_kw->size); } -void ecl_kw_fwrite_param_fortio(fortio_type * fortio, const char * header , ecl_type_enum ecl_type , int size, void * data) { - ecl_kw_type * ecl_kw = ecl_kw_alloc_new_shared(header , size , ecl_type , data); +void ecl_kw_fwrite_param_fortio(fortio_type * fortio, const char * header , ecl_data_type data_type , int size, void * data) { + ecl_kw_type * ecl_kw = ecl_kw_alloc_new_shared(header , size , data_type , data); ecl_kw_fwrite(ecl_kw , fortio); ecl_kw_free(ecl_kw); } -void ecl_kw_fwrite_param(const char * filename , bool fmt_file , const char * header , ecl_type_enum ecl_type , int size, void * data) { +void ecl_kw_fwrite_param(const char * filename , bool fmt_file , const char * header , ecl_data_type data_type , int size, void * data) { fortio_type * fortio = fortio_open_writer(filename , fmt_file , ECL_ENDIAN_FLIP); - ecl_kw_fwrite_param_fortio(fortio , header , ecl_type , size , data); + ecl_kw_fwrite_param_fortio(fortio , header , data_type , size , data); fortio_fclose(fortio); } @@ -1764,14 +1793,14 @@ void ecl_kw_fwrite_param(const char * filename , bool fmt_file , const char * he void ecl_kw_get_data_as_double(const ecl_kw_type * ecl_kw , double * double_data) { - if (ecl_kw->ecl_type == ECL_DOUBLE_TYPE) + if (ecl_type_is_double(ecl_kw->data_type)) // Direct memcpy - no conversion ecl_kw_get_memcpy_data(ecl_kw , double_data); else { - if (ecl_kw->ecl_type == ECL_FLOAT_TYPE) { + if (ecl_type_is_float(ecl_kw->data_type)) { const float * float_data = (const float *) ecl_kw->data; util_float_to_double(double_data , float_data , ecl_kw->size); - } else if (ecl_kw->ecl_type == ECL_INT_TYPE) { + } else if (ecl_type_is_int(ecl_kw->data_type)) { const int * int_data = (const int *) ecl_kw->data; int i; for (i=0; i < ecl_kw->size; i++) @@ -1787,14 +1816,14 @@ void ecl_kw_get_data_as_double(const ecl_kw_type * ecl_kw , double * double_data void ecl_kw_get_data_as_float(const ecl_kw_type * ecl_kw , float * float_data) { - if (ecl_kw->ecl_type == ECL_FLOAT_TYPE) + if (ecl_type_is_float(ecl_kw->data_type)) // Direct memcpy - no conversion ecl_kw_get_memcpy_data(ecl_kw , float_data); else { - if (ecl_kw->ecl_type == ECL_DOUBLE_TYPE) { + if (ecl_type_is_double(ecl_kw->data_type)) { const double * double_data = (const double *) ecl_kw->data; util_double_to_float(float_data , double_data , ecl_kw->size); - } else if (ecl_kw->ecl_type == ECL_INT_TYPE) { + } else if (ecl_type_is_int(ecl_kw->data_type)) { const int * int_data = (const int *) ecl_kw->data; int i; for (i=0; i < ecl_kw->size; i++) @@ -1830,13 +1859,13 @@ ecl_kw_type * ecl_kw_alloc_scatter_copy( const ecl_kw_type * src_kw , int target float default_float = 0; int default_bool = ECL_BOOL_FALSE_INT; const char * default_char = ""; - ecl_kw_type * new_kw = ecl_kw_alloc( src_kw->header , target_size , src_kw->ecl_type ); + ecl_kw_type * new_kw = ecl_kw_alloc( src_kw->header , target_size , src_kw->data_type ); if (def_value != NULL) ecl_kw_scalar_set__( new_kw , def_value ); else { /** Initialize with defaults .*/ - switch (src_kw->ecl_type) { + switch (ecl_kw_get_type(src_kw)) { case(ECL_INT_TYPE): ecl_kw_scalar_set__( new_kw , &default_int ); break; @@ -1853,12 +1882,12 @@ ecl_kw_type * ecl_kw_alloc_scatter_copy( const ecl_kw_type * src_kw , int target ecl_kw_scalar_set__( new_kw , default_char ); break; default: - util_abort("%s: unsupported type:%d \n", __func__ , src_kw->ecl_type); + util_abort("%s: unsupported type:%d \n", __func__ , ecl_kw_get_type(src_kw)); } } { - int sizeof_ctype = ecl_util_get_sizeof_ctype( src_kw->ecl_type ); + int sizeof_ctype = ecl_type_get_sizeof_ctype( src_kw->data_type ); int i; for( i =0; i < src_kw->size; i++) { int target_index = mapping[i]; @@ -1885,9 +1914,11 @@ void ecl_kw_fread_double_param(const char * filename , bool fmt_file , double * void ecl_kw_summarize(const ecl_kw_type * ecl_kw) { + char * type_name = ecl_type_alloc_name(ecl_kw->data_type); printf("%8s %10d:%4s \n",ecl_kw_get_header8(ecl_kw), ecl_kw_get_size(ecl_kw), - ecl_util_get_type_name( ecl_kw->ecl_type)); + type_name); + free(type_name); } @@ -1898,7 +1929,7 @@ void ecl_kw_summarize(const ecl_kw_type * ecl_kw) { #define ECL_KW_SCALAR_SET_TYPED( ctype , ECL_TYPE ) \ void ecl_kw_scalar_set_ ## ctype( ecl_kw_type * ecl_kw , ctype value){ \ - if (ecl_kw->ecl_type == ECL_TYPE) { \ + if (ecl_kw_get_type(ecl_kw) == ECL_TYPE) { \ ctype * data = ecl_kw_get_data_ref(ecl_kw); \ int i; \ for (i=0;i < ecl_kw->size; i++) \ @@ -1944,7 +1975,7 @@ void ecl_kw_scalar_set_float_or_double( ecl_kw_type * ecl_kw , double value ) { Untyped - low level alternative. */ void ecl_kw_scalar_set__(ecl_kw_type * ecl_kw , const void * value) { - int sizeof_ctype = ecl_util_get_sizeof_ctype( ecl_kw->ecl_type ); + int sizeof_ctype = ecl_type_get_sizeof_ctype( ecl_kw->data_type ); int i; for (i=0;i < ecl_kw->size; i++) memcpy( &ecl_kw->data[ i * sizeof_ctype ] , value , sizeof_ctype); @@ -1957,12 +1988,12 @@ void ecl_kw_scalar_set__(ecl_kw_type * ecl_kw , const void * value) { void ecl_kw_alloc_double_data(ecl_kw_type * ecl_kw , double * values) { ecl_kw_alloc_data(ecl_kw); - memcpy(ecl_kw->data , values , ecl_kw->size * ecl_kw->sizeof_ctype); + memcpy(ecl_kw->data , values , ecl_kw->size * ecl_kw_get_sizeof_ctype(ecl_kw)); } void ecl_kw_alloc_float_data(ecl_kw_type * ecl_kw , float * values) { ecl_kw_alloc_data(ecl_kw); - memcpy(ecl_kw->data , values , ecl_kw->size * ecl_kw->sizeof_ctype); + memcpy(ecl_kw->data , values , ecl_kw->size * ecl_kw_get_sizeof_ctype(ecl_kw)); } /*****************************************************************/ @@ -2026,40 +2057,17 @@ void ecl_kw_shift_float_or_double( ecl_kw_type * ecl_kw , double shift_value ) { util_abort("%s: wrong type \n",__func__); } - - -bool ecl_kw_assert_numeric( const ecl_kw_type * kw ) { - if ((kw->ecl_type == ECL_INT_TYPE) || (kw->ecl_type == ECL_FLOAT_TYPE) || (kw->ecl_type == ECL_DOUBLE_TYPE)) - return true; - else - return false; -} - - -bool ecl_kw_assert_binary( const ecl_kw_type * kw1, const ecl_kw_type * kw2) { - if (kw1->size != kw2->size) - return false; /* Size mismatch */ - if (kw1->ecl_type != kw2->ecl_type) - return false; /* Type mismatch */ - - return true; -} - - -bool ecl_kw_assert_binary_numeric( const ecl_kw_type * kw1, const ecl_kw_type * kw2) { - if (!ecl_kw_assert_binary( kw1 , kw2)) - return false; - else - return ecl_kw_assert_numeric( kw1 ); +bool ecl_kw_size_and_numeric_type_equal( const ecl_kw_type * kw1, const ecl_kw_type * kw2) { + return ecl_kw_size_and_type_equal(kw1, kw2) && ecl_type_is_numeric(kw1->data_type); } #define ECL_KW_ASSERT_TYPED_BINARY_OP( ctype , ECL_TYPE ) \ bool ecl_kw_assert_binary_ ## ctype( const ecl_kw_type * kw1 , const ecl_kw_type * kw2) { \ - if (!ecl_kw_assert_binary_numeric( kw1 , kw2)) \ + if (!ecl_kw_size_and_numeric_type_equal( kw1 , kw2)) \ return false; \ - if (kw1->ecl_type != ECL_TYPE) \ + if (ecl_kw_get_type(kw1) != ECL_TYPE) \ return false; /* Type mismatch */ \ return true; \ } @@ -2071,12 +2079,12 @@ ECL_KW_ASSERT_TYPED_BINARY_OP( double , ECL_DOUBLE_TYPE ) void ecl_kw_copy_indexed( ecl_kw_type * target_kw , const int_vector_type * index_set , const ecl_kw_type * src_kw) { - if (!ecl_kw_assert_binary( target_kw , src_kw )) + if (!ecl_kw_size_and_type_equal( target_kw , src_kw )) util_abort("%s: type/size mismatch\n",__func__); { char * target_data = ecl_kw_get_data_ref( target_kw ); const char * src_data = ecl_kw_get_data_ref( src_kw ); - int sizeof_ctype = ecl_util_get_sizeof_ctype(target_kw->ecl_type); + int sizeof_ctype = ecl_type_get_sizeof_ctype(target_kw->data_type); int set_size = int_vector_size( index_set ); const int * index_data = int_vector_get_const_ptr( index_set ); int i; @@ -2125,7 +2133,7 @@ void ecl_kw_inplace_add_indexed( ecl_kw_type * target_kw , const int_vector_type ecl_kw_inplace_add_indexed_int( target_kw , index_set , add_kw ); break; default: - util_abort("%s: inplace add not implemented for type:%s \n",__func__ , ecl_util_get_type_name( type )); + util_abort("%s: inplace add not implemented for type:%s \n",__func__ , ecl_type_alloc_name( ecl_kw_get_data_type(target_kw) )); } } @@ -2163,7 +2171,7 @@ void ecl_kw_inplace_add( ecl_kw_type * target_kw , const ecl_kw_type * add_kw) { ecl_kw_inplace_add_int( target_kw , add_kw ); break; default: - util_abort("%s: inplace add not implemented for type:%s \n",__func__ , ecl_util_get_type_name( type )); + util_abort("%s: inplace add not implemented for type:%s \n",__func__ , ecl_type_alloc_name( ecl_kw_get_data_type(target_kw) )); } } @@ -2202,7 +2210,7 @@ void ecl_kw_inplace_sub( ecl_kw_type * target_kw , const ecl_kw_type * sub_kw) { ecl_kw_inplace_sub_int( target_kw , sub_kw ); break; default: - util_abort("%s: inplace sub not implemented for type:%s \n",__func__ , ecl_util_get_type_name( type )); + util_abort("%s: inplace sub not implemented for type:%s \n",__func__ , ecl_type_alloc_name( ecl_kw_get_data_type(target_kw) )); } } @@ -2242,7 +2250,7 @@ void ecl_kw_inplace_sub_indexed( ecl_kw_type * target_kw , const int_vector_type ecl_kw_inplace_sub_indexed_int( target_kw , index_set , sub_kw ); break; default: - util_abort("%s: inplace sub not implemented for type:%s \n",__func__ , ecl_util_get_type_name( type )); + util_abort("%s: inplace sub not implemented for type:%s \n",__func__ , ecl_type_alloc_name( ecl_kw_get_data_type(target_kw) )); } } @@ -2277,7 +2285,7 @@ void ecl_kw_inplace_abs( ecl_kw_type * kw ) { ecl_kw_inplace_abs_int( kw ); break; default: - util_abort("%s: inplace abs not implemented for type:%s \n",__func__ , ecl_util_get_type_name( type )); + util_abort("%s: inplace abs not implemented for type:%s \n",__func__ , ecl_type_alloc_name( ecl_kw_get_data_type(kw) )); } } @@ -2314,7 +2322,7 @@ void ecl_kw_inplace_mul( ecl_kw_type * target_kw , const ecl_kw_type * mul_kw) { ecl_kw_inplace_mul_int( target_kw , mul_kw ); break; default: - util_abort("%s: inplace mul not implemented for type:%s \n",__func__ , ecl_util_get_type_name( type )); + util_abort("%s: inplace mul not implemented for type:%s \n",__func__ , ecl_type_alloc_name( ecl_kw_get_data_type(target_kw) )); } } @@ -2354,7 +2362,7 @@ void ecl_kw_inplace_mul_indexed( ecl_kw_type * target_kw , const int_vector_type ecl_kw_inplace_mul_indexed_int( target_kw , index_set , mul_kw ); break; default: - util_abort("%s: inplace mul not implemented for type:%s \n",__func__ , ecl_util_get_type_name( type )); + util_abort("%s: inplace mul not implemented for type:%s \n",__func__ , ecl_type_alloc_name( ecl_kw_get_data_type(target_kw) )); } } @@ -2392,7 +2400,7 @@ void ecl_kw_inplace_div( ecl_kw_type * target_kw , const ecl_kw_type * div_kw) { ecl_kw_inplace_div_int( target_kw , div_kw ); break; default: - util_abort("%s: inplace div not implemented for type:%s \n",__func__ , ecl_util_get_type_name( type )); + util_abort("%s: inplace div not implemented for type:%s \n",__func__ , ecl_type_alloc_name( ecl_kw_get_data_type(target_kw) )); } } @@ -2433,7 +2441,7 @@ void ecl_kw_inplace_div_indexed( ecl_kw_type * target_kw , const int_vector_type ecl_kw_inplace_div_indexed_int( target_kw , index_set , div_kw ); break; default: - util_abort("%s: inplace div not implemented for type:%s \n",__func__ , ecl_util_get_type_name( type )); + util_abort("%s: inplace div not implemented for type:%s \n",__func__ , ecl_type_alloc_name( ecl_kw_get_data_type(target_kw) )); } } @@ -2488,7 +2496,7 @@ void ecl_kw_inplace_update_file(const ecl_kw_type * ecl_kw , const char * filena ecl_kw_fread_header(file_kw , fortio); fortio_fseek( fortio , current_pos , SEEK_SET ); - if (!((file_kw->size == ecl_kw->size) && (file_kw->ecl_type == ecl_kw->ecl_type))) + if (!ecl_kw_size_and_type_equal(ecl_kw, file_kw)) util_abort("%s: header mismatch when trying to update:%s in %s \n",__func__ , ecl_kw_get_header8(ecl_kw) , filename); ecl_kw_free(file_kw); } @@ -2512,10 +2520,10 @@ bool ecl_kw_is_kw_file(fortio_type * fortio) { ecl_kw_type * ecl_kw = ecl_kw_alloc_empty(); if (fortio_fmt_file( fortio )) - kw_file = ecl_kw_fread_header(ecl_kw , fortio); + kw_file = (ecl_kw_fread_header(ecl_kw , fortio) != ECL_KW_READ_FAIL); else { if (fortio_is_fortio_file(fortio)) - kw_file = ecl_kw_fread_header(ecl_kw , fortio); + kw_file = (ecl_kw_fread_header(ecl_kw , fortio) != ECL_KW_READ_FAIL); else kw_file = false; } @@ -2528,41 +2536,6 @@ bool ecl_kw_is_kw_file(fortio_type * fortio) { } - - - -bool ecl_kw_is_grdecl_file(FILE * stream) { - const long int init_pos = util_ftell(stream); - bool grdecl_file; - bool at_eof = false; - util_fskip_chars(stream , " \r\n\t" , &at_eof); /* Skipping intial space */ - util_fskip_cchars(stream , " \r\n\t" , &at_eof); /* Skipping PORO/PERMX/... */ - if (at_eof) - grdecl_file = false; - else { - grdecl_file = true; - { - int c; - do { - c = fgetc(stream); - if (c == '\r' || c == '\n') - break; - else { - if (c != ' ') { - grdecl_file = false; - break; - } - } - } while (c == ' '); - } - } - util_fseek(stream , init_pos , SEEK_SET); - return grdecl_file; -} - - - - #define KW_MAX_MIN(type) \ { \ type * data = ecl_kw_get_data_ref(ecl_kw); \ @@ -2571,14 +2544,14 @@ bool ecl_kw_is_grdecl_file(FILE * stream) { int i; \ for (i=1; i < ecl_kw_get_size(ecl_kw); i++) \ util_update_ ## type ## _max_min(data[i] , &max , &min); \ - memcpy(_max , &max , ecl_kw->sizeof_ctype); \ - memcpy(_min , &min , ecl_kw->sizeof_ctype); \ + memcpy(_max , &max , ecl_kw_get_sizeof_ctype(ecl_kw)); \ + memcpy(_min , &min , ecl_kw_get_sizeof_ctype(ecl_kw)); \ } void ecl_kw_max_min(const ecl_kw_type * ecl_kw , void * _max , void *_min) { - switch (ecl_kw->ecl_type) { + switch (ecl_kw_get_type(ecl_kw)) { case(ECL_FLOAT_TYPE): KW_MAX_MIN(float); break; @@ -2636,20 +2609,20 @@ ECL_KW_MIN( double ) -#define KW_SUM(type) \ -{ \ - type * data = ecl_kw_get_data_ref(ecl_kw); \ - type sum = 0; \ - int i; \ - for (i=0; i < ecl_kw_get_size(ecl_kw); i++) \ - sum += data[i]; \ - memcpy(_sum , &sum , ecl_kw->sizeof_ctype); \ +#define KW_SUM(type) \ +{ \ + type * data = ecl_kw_get_data_ref(ecl_kw); \ + type sum = 0; \ + int i; \ + for (i=0; i < ecl_kw_get_size(ecl_kw); i++) \ + sum += data[i]; \ + memcpy(_sum , &sum , ecl_kw_get_sizeof_ctype(ecl_kw)); \ } void ecl_kw_element_sum(const ecl_kw_type * ecl_kw , void * _sum) { - switch (ecl_kw->ecl_type) { + switch (ecl_kw_get_type(ecl_kw)) { case(ECL_FLOAT_TYPE): KW_SUM(float); break; @@ -2671,18 +2644,18 @@ double ecl_kw_element_sum_float( const ecl_kw_type * ecl_kw ) { double double_sum; void * sum_ptr = NULL; - if (ecl_kw->ecl_type == ECL_DOUBLE_TYPE) + if (ecl_type_is_double(ecl_kw->data_type)) sum_ptr = &double_sum; - else if (ecl_kw->ecl_type == ECL_FLOAT_TYPE) + else if (ecl_type_is_float(ecl_kw->data_type)) sum_ptr = &float_sum; else util_abort("%s: invalid type: \n",__func__); ecl_kw_element_sum( ecl_kw , sum_ptr ); - if (ecl_kw->ecl_type == ECL_DOUBLE_TYPE) + if (ecl_type_is_double(ecl_kw->data_type)) return double_sum; - else if (ecl_kw->ecl_type == ECL_FLOAT_TYPE) + else if (ecl_type_is_float(ecl_kw->data_type)) return float_sum; else return 0; @@ -2724,24 +2697,24 @@ static void ecl_kw_fprintf_data_bool( const ecl_kw_type * ecl_kw , const char * } -static void ecl_kw_fprintf_data_char( const ecl_kw_type * ecl_kw , const char * fmt , FILE * stream) { +static void ecl_kw_fprintf_data_string( const ecl_kw_type * ecl_kw , const char * fmt , FILE * stream) { int i; for (i=0; i < ecl_kw->size; i++) - fprintf(stream , fmt , &ecl_kw->data[ i * ecl_kw->sizeof_ctype]); + fprintf(stream , fmt , &ecl_kw->data[ i * ecl_kw_get_sizeof_ctype(ecl_kw)]); } void ecl_kw_fprintf_data( const ecl_kw_type * ecl_kw , const char * fmt , FILE * stream) { - if (ecl_kw->ecl_type == ECL_DOUBLE_TYPE) + if (ecl_type_is_double(ecl_kw->data_type)) ecl_kw_fprintf_data_double( ecl_kw , fmt , stream ); - else if (ecl_kw->ecl_type == ECL_FLOAT_TYPE) + else if (ecl_type_is_float(ecl_kw->data_type)) ecl_kw_fprintf_data_float( ecl_kw , fmt , stream ); - else if (ecl_kw->ecl_type == ECL_INT_TYPE) + else if (ecl_type_is_int(ecl_kw->data_type)) ecl_kw_fprintf_data_int( ecl_kw , fmt , stream ); - else if (ecl_kw->ecl_type == ECL_BOOL_TYPE) + else if (ecl_type_is_bool(ecl_kw->data_type)) ecl_kw_fprintf_data_bool( ecl_kw , fmt , stream ); - else if (ecl_kw->ecl_type == ECL_CHAR_TYPE) - ecl_kw_fprintf_data_char( ecl_kw , fmt , stream ); + else if (ecl_type_is_char(ecl_kw->data_type) || ecl_type_is_string(ecl_kw->data_type)) + ecl_kw_fprintf_data_string( ecl_kw , fmt , stream ); } @@ -2749,13 +2722,13 @@ void ecl_kw_fprintf_data( const ecl_kw_type * ecl_kw , const char * fmt , FILE * static bool ecl_kw_elm_equal_numeric__( const ecl_kw_type * ecl_kw1 , const ecl_kw_type * ecl_kw2 , int offset, double abs_epsilon, double rel_epsilon) { double v1 = ecl_kw_iget_as_double( ecl_kw1 , offset ); double v2 = ecl_kw_iget_as_double( ecl_kw2 , offset ); - return CMP_double(v1 , v2 , abs_epsilon , rel_epsilon ); + return util_double_approx_equal__( v1, v2 , rel_epsilon , abs_epsilon ); } static bool ecl_kw_elm_equal__( const ecl_kw_type * ecl_kw1 , const ecl_kw_type * ecl_kw2 , int offset) { - size_t data_offset = ecl_kw1->sizeof_ctype * offset; - int cmp = memcmp( &ecl_kw1->data[ data_offset ] , &ecl_kw2->data[ data_offset ] , ecl_kw1->sizeof_ctype); + size_t data_offset = ecl_kw_get_sizeof_ctype(ecl_kw1) * offset; + int cmp = memcmp( &ecl_kw1->data[ data_offset ] , &ecl_kw2->data[ data_offset ] , ecl_kw_get_sizeof_ctype(ecl_kw1)); if (cmp == 0) return true; else @@ -2794,5 +2767,4 @@ int ecl_kw_first_different( const ecl_kw_type * ecl_kw1 , const ecl_kw_type * ec } } - #include "ecl_kw_functions.c" diff --git a/ThirdParty/Ert/libecl/src/ecl_kw_grdecl.c b/ThirdParty/Ert/libecl/src/ecl_kw_grdecl.c index 42fb0711fc..bf44d6cff3 100644 --- a/ThirdParty/Ert/libecl/src/ecl_kw_grdecl.c +++ b/ThirdParty/Ert/libecl/src/ecl_kw_grdecl.c @@ -22,6 +22,7 @@ #include #include +#include #include @@ -41,7 +42,7 @@ formatted numbers it is in general impossible to determine whether the underlying datatype should be integer, float or double. Therefor all the file-reading routines here expect an - ecl_type_enum variable as input. + ecl_data_type as input. 2. The files can have comment sections; even in the data block. @@ -333,13 +334,13 @@ static void iset_range( char * data , int data_offset , int sizeof_ctype , void Observe that no-spaces-are-allowed-around-the-* */ -static char * fscanf_alloc_grdecl_data( const char * header , bool strict , ecl_type_enum ecl_type , int * kw_size , FILE * stream ) { +static char * fscanf_alloc_grdecl_data( const char * header , bool strict , ecl_data_type data_type , int * kw_size , FILE * stream ) { char newline = '\n'; bool atEOF = false; int init_size = 32; int buffer_size = 64; int data_index = 0; - int sizeof_ctype = ecl_util_get_sizeof_ctype( ecl_type ); + int sizeof_ctype = ecl_type_get_sizeof_ctype( data_type ); int data_size = init_size; char * buffer = util_calloc( (buffer_size + 1) , sizeof * buffer ); char * data = util_calloc( sizeof_ctype * data_size , sizeof * data ); @@ -369,7 +370,7 @@ static char * fscanf_alloc_grdecl_data( const char * header , bool strict , ecl_ void * value_ptr = NULL; bool char_input = false; - if (ecl_type == ECL_INT_TYPE) { + if (ecl_type_is_int(data_type)) { int value; if (sscanf(buffer , "%d*%d" , &multiplier , &value) == 2) @@ -383,7 +384,7 @@ static char * fscanf_alloc_grdecl_data( const char * header , bool strict , ecl_ } value_ptr = &value; - } else if (ecl_type == ECL_FLOAT_TYPE) { + } else if (ecl_type_is_float(data_type)) { float value; if (sscanf(buffer , "%d*%g" , &multiplier , &value) == 2) @@ -397,7 +398,7 @@ static char * fscanf_alloc_grdecl_data( const char * header , bool strict , ecl_ } value_ptr = &value; - } else if (ecl_type == ECL_DOUBLE_TYPE) { + } else if (ecl_type_is_double(data_type)) { double value; if (sscanf(buffer , "%d*%lg" , &multiplier , &value) == 2) @@ -412,7 +413,7 @@ static char * fscanf_alloc_grdecl_data( const char * header , bool strict , ecl_ value_ptr = &value; } else - util_abort("%s: sorry type:%s not supported \n",__func__ , ecl_util_get_type_name(ecl_type)); + util_abort("%s: sorry type:%s not supported \n",__func__ , ecl_type_alloc_name(data_type)); /* Removing this warning on user request: @@ -515,9 +516,8 @@ static char * fscanf_alloc_grdecl_data( const char * header , bool strict , ecl_ if there is something wrong it can be difficult to detect. */ - -static ecl_kw_type * __ecl_kw_fscanf_alloc_grdecl__(FILE * stream , const char * header , bool strict , int size , ecl_type_enum ecl_type) { - if (! (ecl_type == ECL_FLOAT_TYPE || ecl_type == ECL_INT_TYPE || ecl_type == ECL_DOUBLE_TYPE)) +static ecl_kw_type * __ecl_kw_fscanf_alloc_grdecl__(FILE * stream , const char * header , bool strict , int size , ecl_data_type data_type) { + if (!ecl_type_is_numeric(data_type)) util_abort("%s: sorry only types FLOAT, INT and DOUBLE supported\n",__func__); if (header != NULL) @@ -528,7 +528,7 @@ static ecl_kw_type * __ecl_kw_fscanf_alloc_grdecl__(FILE * stream , const char * char file_header[9]; if (fscanf(stream , "%s" , file_header) == 1) { int kw_size; - char * data = fscanf_alloc_grdecl_data( file_header , strict , ecl_type , &kw_size , stream ); + char * data = fscanf_alloc_grdecl_data( file_header , strict , data_type , &kw_size , stream ); // Verify size if (size > 0) @@ -539,7 +539,7 @@ static ecl_kw_type * __ecl_kw_fscanf_alloc_grdecl__(FILE * stream , const char * } { - ecl_kw_type * ecl_kw = ecl_kw_alloc_new( file_header , kw_size , ecl_type , NULL ); + ecl_kw_type * ecl_kw = ecl_kw_alloc_new( file_header , kw_size , data_type , NULL ); ecl_kw_set_data_ptr( ecl_kw , data ); return ecl_kw; } @@ -569,14 +569,14 @@ static ecl_kw_type * __ecl_kw_fscanf_alloc_grdecl__(FILE * stream , const char * /*****************************************************************/ -ecl_kw_type * ecl_kw_fscanf_alloc_grdecl_data__(FILE * stream , bool strict , int size , ecl_type_enum ecl_type) { - return __ecl_kw_fscanf_alloc_grdecl__( stream , NULL , strict , size , ecl_type ); +ecl_kw_type * ecl_kw_fscanf_alloc_grdecl_data__(FILE * stream , bool strict , int size , ecl_data_type data_type) { + return __ecl_kw_fscanf_alloc_grdecl__( stream , NULL , strict , size , data_type ); } -ecl_kw_type * ecl_kw_fscanf_alloc_grdecl_data(FILE * stream , int size , ecl_type_enum ecl_type) { +ecl_kw_type * ecl_kw_fscanf_alloc_grdecl_data(FILE * stream , int size , ecl_data_type data_type) { bool strict = true; - return ecl_kw_fscanf_alloc_grdecl_data__( stream , strict , size , ecl_type ); + return ecl_kw_fscanf_alloc_grdecl_data__( stream , strict , size , data_type ); } /*****************************************************************/ @@ -591,13 +591,13 @@ ecl_kw_type * ecl_kw_fscanf_alloc_grdecl_data(FILE * stream , int size , ecl_typ the whole keyword is loaded, and then return. */ -ecl_kw_type * ecl_kw_fscanf_alloc_grdecl_dynamic__( FILE * stream , const char * kw , bool strict , ecl_type_enum ecl_type) { - return __ecl_kw_fscanf_alloc_grdecl__( stream , kw , strict , 0 , ecl_type ); +ecl_kw_type * ecl_kw_fscanf_alloc_grdecl_dynamic__( FILE * stream , const char * kw , bool strict , ecl_data_type data_type) { + return __ecl_kw_fscanf_alloc_grdecl__( stream , kw , strict , 0 , data_type ); } -ecl_kw_type * ecl_kw_fscanf_alloc_grdecl_dynamic( FILE * stream , const char * kw , ecl_type_enum ecl_type) { +ecl_kw_type * ecl_kw_fscanf_alloc_grdecl_dynamic( FILE * stream , const char * kw , ecl_data_type data_type) { bool strict = true; - return ecl_kw_fscanf_alloc_grdecl_dynamic__( stream , kw , strict , ecl_type ); + return ecl_kw_fscanf_alloc_grdecl_dynamic__( stream , kw , strict , data_type ); } /*****************************************************************/ @@ -615,14 +615,14 @@ ecl_kw_type * ecl_kw_fscanf_alloc_grdecl_dynamic( FILE * stream , const char * k size == 0. */ -ecl_kw_type * ecl_kw_fscanf_alloc_grdecl__( FILE * stream , const char * kw , bool strict , int size , ecl_type_enum ecl_type) { - return __ecl_kw_fscanf_alloc_grdecl__( stream , kw , strict , size , ecl_type ); +ecl_kw_type * ecl_kw_fscanf_alloc_grdecl__( FILE * stream , const char * kw , bool strict , int size , ecl_data_type data_type) { + return __ecl_kw_fscanf_alloc_grdecl__( stream , kw , strict , size , data_type ); } -ecl_kw_type * ecl_kw_fscanf_alloc_grdecl( FILE * stream , const char * kw , int size , ecl_type_enum ecl_type) { +ecl_kw_type * ecl_kw_fscanf_alloc_grdecl( FILE * stream , const char * kw , int size , ecl_data_type data_type) { bool strict = true; - return ecl_kw_fscanf_alloc_grdecl__( stream , kw , strict , size , ecl_type ); + return ecl_kw_fscanf_alloc_grdecl__( stream , kw , strict , size , data_type ); } /*****************************************************************/ @@ -636,14 +636,14 @@ ecl_kw_type * ecl_kw_fscanf_alloc_grdecl( FILE * stream , const char * kw , int input file is well formatted. */ -ecl_kw_type * ecl_kw_fscanf_alloc_current_grdecl__( FILE * stream , bool strict , ecl_type_enum ecl_type) { - return __ecl_kw_fscanf_alloc_grdecl__( stream , NULL , strict , 0 , ecl_type ); +ecl_kw_type * ecl_kw_fscanf_alloc_current_grdecl__( FILE * stream , bool strict , ecl_data_type data_type) { + return __ecl_kw_fscanf_alloc_grdecl__( stream , NULL , strict , 0 , data_type ); } -ecl_kw_type * ecl_kw_fscanf_alloc_current_grdecl( FILE * stream , ecl_type_enum ecl_type) { +ecl_kw_type * ecl_kw_fscanf_alloc_current_grdecl( FILE * stream , ecl_data_type data_type) { bool strict = true; - return ecl_kw_fscanf_alloc_current_grdecl__( stream , strict , ecl_type ); + return ecl_kw_fscanf_alloc_current_grdecl__( stream , strict , data_type ); } @@ -676,4 +676,3 @@ void ecl_kw_fprintf_grdecl__(const ecl_kw_type * ecl_kw , const char * special_h void ecl_kw_fprintf_grdecl(const ecl_kw_type * ecl_kw , FILE * stream) { ecl_kw_fprintf_grdecl__(ecl_kw , NULL , stream ); } - diff --git a/ThirdParty/Ert/libecl/src/ecl_nnc_geometry.c b/ThirdParty/Ert/libecl/src/ecl_nnc_geometry.c new file mode 100644 index 0000000000..378112cced --- /dev/null +++ b/ThirdParty/Ert/libecl/src/ecl_nnc_geometry.c @@ -0,0 +1,126 @@ +/* + Copyright (c) 2017 statoil asa, norway. + + The file 'ecl_nnc_geometry.c' is part of ert - ensemble based reservoir tool. + + ERT 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. + + ERT 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 + for more details. +*/ + +#include + +#include + +#define ECL_NNC_GEOMETRY_TYPE_ID 6124343 + +struct ecl_nnc_geometry_struct { + UTIL_TYPE_ID_DECLARATION; + struct_vector_type * data; +}; + + +UTIL_IS_INSTANCE_FUNCTION( ecl_nnc_geometry, ECL_NNC_GEOMETRY_TYPE_ID ) + + +int ecl_nnc_geometry_size( const ecl_nnc_geometry_type * nnc_geo ) { + return struct_vector_get_size( nnc_geo->data ); +} + +/* + Will go through the grid and add links for all NNC connections in + the grid. The endpoints of an NNC are defined by the tuple: + + (grid_nr, global_index), + + and a NNC link is defined by a pair of such connections, linking + cells (grid_nr1, global_index1) and (grid_nr2, global_index2). +*/ + +static void ecl_nnc_geometry_add_pairs( const ecl_nnc_geometry_type * nnc_geo , const ecl_grid_type * grid ) { + int lgr_nr1 = ecl_grid_get_lgr_nr( grid ); + const ecl_grid_type * global_grid = ecl_grid_get_global_grid( grid ); + + if (!global_grid) + global_grid = grid; + + + for (int global_index1 = 0; global_index1 < ecl_grid_get_global_size( grid ); global_index1++) { + const nnc_info_type * nnc_info = ecl_grid_get_cell_nnc_info1( grid , global_index1 ); + if (!nnc_info) + continue; + + for (int lgr_index2 = 0; lgr_index2 < nnc_info_get_size( nnc_info ); lgr_index2++) { + const nnc_vector_type * nnc_vector = nnc_info_iget_vector( nnc_info , lgr_index2 ); + const int_vector_type * grid2_index_list = nnc_vector_get_grid_index_list( nnc_vector ); + const int_vector_type * nnc_index_list = nnc_vector_get_nnc_index_list( nnc_vector ); + int lgr_nr2 = nnc_vector_get_lgr_nr( nnc_vector ); + + for (int index2 = 0; index2 < nnc_vector_get_size( nnc_vector ); index2++) { + ecl_nnc_pair_type pair = {.grid_nr1 = lgr_nr1, + .global_index1 = global_index1, + .grid_nr2 = lgr_nr2, + .global_index2 = int_vector_iget( grid2_index_list , index2 ), + .input_index = int_vector_iget( nnc_index_list, index2 )}; + + struct_vector_append( nnc_geo->data , &pair); + } + } + } +} + + +static int ecl_nnc_cmp(const void * _nnc1 , const void * _nnc2) { + const ecl_nnc_pair_type * nnc1 = (const ecl_nnc_pair_type * ) _nnc1; + const ecl_nnc_pair_type * nnc2 = (const ecl_nnc_pair_type * ) _nnc2; + + if (nnc1->grid_nr1 != nnc2->grid_nr1) + return nnc1->grid_nr1 - nnc2->grid_nr1; + + if (nnc1->grid_nr2 != nnc2->grid_nr2) + return nnc1->grid_nr2 - nnc2->grid_nr2; + + if (nnc1->global_index1 != nnc2->global_index1) + return nnc1->global_index1 - nnc2->global_index1; + + if (nnc1->global_index2 != nnc2->global_index2) + return nnc1->global_index2 - nnc2->global_index2; + + return 0; +} + + + +ecl_nnc_geometry_type * ecl_nnc_geometry_alloc( const ecl_grid_type * grid ) { + ecl_nnc_geometry_type * nnc_geo = util_malloc( sizeof * nnc_geo ); + UTIL_TYPE_ID_INIT( nnc_geo , ECL_NNC_GEOMETRY_TYPE_ID ); + nnc_geo->data = struct_vector_alloc( sizeof( struct ecl_nnc_pair_struct )); + + ecl_nnc_geometry_add_pairs( nnc_geo , grid ); + for (int lgr_index = 0; lgr_index < ecl_grid_get_num_lgr(grid); lgr_index++) { + ecl_grid_type * igrid = ecl_grid_iget_lgr( grid , lgr_index ); + ecl_nnc_geometry_add_pairs( nnc_geo, igrid ); + } + struct_vector_sort( nnc_geo->data , ecl_nnc_cmp ); + return nnc_geo; +} + + +void ecl_nnc_geometry_free( ecl_nnc_geometry_type * nnc_geo) { + struct_vector_free( nnc_geo->data ); + free( nnc_geo ); +} + + +const ecl_nnc_pair_type * ecl_nnc_geometry_iget( const ecl_nnc_geometry_type * nnc_geo , int index) { + return struct_vector_iget_ptr( nnc_geo->data , index ); + +} diff --git a/ThirdParty/Ert/libecl/src/ecl_region.c b/ThirdParty/Ert/libecl/src/ecl_region.c index 88e2b8372e..ca1a2faeb7 100644 --- a/ThirdParty/Ert/libecl/src/ecl_region.c +++ b/ThirdParty/Ert/libecl/src/ecl_region.c @@ -306,7 +306,7 @@ void ecl_region_deselect_cell( ecl_region_type * region , int i , int j , int k) static void ecl_region_select_equal__( ecl_region_type * region , const ecl_kw_type * ecl_kw, int value , bool select) { bool global_kw; ecl_region_assert_kw( region , ecl_kw , &global_kw); - if (ecl_kw_get_type( ecl_kw ) != ECL_INT_TYPE) + if (!ecl_type_is_int(ecl_kw_get_data_type( ecl_kw ))) util_abort("%s: sorry - select by equality is only supported for integer keywords \n",__func__); { const int * kw_data = ecl_kw_get_int_ptr( ecl_kw ); @@ -344,7 +344,7 @@ void ecl_region_deselect_equal( ecl_region_type * region , const ecl_kw_type * e static void ecl_region_select_bool_equal__( ecl_region_type * region , const ecl_kw_type * ecl_kw, bool value , bool select) { bool global_kw; ecl_region_assert_kw( region , ecl_kw , &global_kw); - if (ecl_kw_get_type( ecl_kw ) != ECL_BOOL_TYPE) + if (!ecl_type_is_bool(ecl_kw_get_data_type( ecl_kw ))) util_abort("%s: sorry - select by equality is only supported for boolean keywords \n",__func__); { if (global_kw) { @@ -392,7 +392,7 @@ void ecl_region_deselect_false( ecl_region_type * region , const ecl_kw_type * e static void ecl_region_select_in_interval__( ecl_region_type * region , const ecl_kw_type * ecl_kw, float min_value , float max_value , bool select) { bool global_kw; ecl_region_assert_kw( region , ecl_kw , &global_kw); - if (ecl_kw_get_type( ecl_kw ) != ECL_FLOAT_TYPE) + if (!ecl_type_is_float(ecl_kw_get_data_type( ecl_kw ))) util_abort("%s: sorry - select by in_interval is only supported for float keywords \n",__func__); { const float * kw_data = ecl_kw_get_float_ptr( ecl_kw ); @@ -439,13 +439,13 @@ void ecl_region_deselect_in_interval( ecl_region_type * region , const ecl_kw_ty */ static void ecl_region_select_with_limit__( ecl_region_type * region , const ecl_kw_type * ecl_kw, float limit , bool select_less , bool select) { bool global_kw; - ecl_type_enum ecl_type = ecl_kw_get_type( ecl_kw ); + ecl_data_type data_type = ecl_kw_get_data_type( ecl_kw ); ecl_region_assert_kw( region , ecl_kw , &global_kw); - if (!((ecl_type == ECL_FLOAT_TYPE) || (ecl_type == ECL_INT_TYPE) || (ecl_type == ECL_DOUBLE_TYPE))) + if (!ecl_type_is_numeric(data_type)) util_abort("%s: sorry - select by in_interval is only supported for float and integer keywords \n",__func__); { - if (ecl_type == ECL_FLOAT_TYPE) { + if (ecl_type_is_float(data_type)) { const float * kw_data = ecl_kw_get_float_ptr( ecl_kw ); float float_limit = limit; if (global_kw) { @@ -475,7 +475,7 @@ static void ecl_region_select_with_limit__( ecl_region_type * region , const ecl } } } - } else if (ecl_type == ECL_INT_TYPE) { + } else if (ecl_type_is_int(data_type)) { const int * kw_data = ecl_kw_get_int_ptr( ecl_kw ); int int_limit = (int) limit; if (global_kw) { @@ -505,7 +505,7 @@ static void ecl_region_select_with_limit__( ecl_region_type * region , const ecl } } } - } else if (ecl_type == ECL_DOUBLE_TYPE) { + } else if (ecl_type_is_double(data_type)) { const double * kw_data = ecl_kw_get_double_ptr( ecl_kw ); double double_limit = (double) limit; if (global_kw) { @@ -566,11 +566,10 @@ void ecl_region_deselect_larger( ecl_region_type * ecl_region , const ecl_kw_typ static void ecl_region_cmp_select__( ecl_region_type * region , const ecl_kw_type * kw1 , const ecl_kw_type * kw2 , bool select_less , bool select) { bool global_kw; ecl_region_assert_kw( region , kw1 , &global_kw); - if (ecl_kw_get_type( kw1 ) != ECL_FLOAT_TYPE) + if (!ecl_type_is_float(ecl_kw_get_data_type( kw1 ))) util_abort("%s: sorry - select by cmp() is only supported for float keywords \n",__func__); { - if ((ecl_kw_get_size( kw1 ) == ecl_kw_get_size( kw2 )) && - (ecl_kw_get_type( kw1 ) == ecl_kw_get_type( kw2 ))) { + if (ecl_kw_size_and_type_equal(kw1, kw2)) { const float * kw1_data = ecl_kw_get_float_ptr( kw1 ); const float * kw2_data = ecl_kw_get_float_ptr( kw2 ); diff --git a/ThirdParty/Ert/libecl/src/ecl_rft_node.c b/ThirdParty/Ert/libecl/src/ecl_rft_node.c index 57af776213..72cf1b33d2 100644 --- a/ThirdParty/Ert/libecl/src/ecl_rft_node.c +++ b/ThirdParty/Ert/libecl/src/ecl_rft_node.c @@ -34,6 +34,7 @@ #include #include #include +#include /** @@ -480,7 +481,7 @@ bool ecl_rft_node_is_RFT( const ecl_rft_node_type * rft_node ) { } static void ecl_rft_node_fill_welletc(ecl_kw_type * welletc, ert_ecl_unit_enum unit_set){ - if(unit_set==ERT_ECL_METRIC_UNITS) { + if(unit_set==ECL_METRIC_UNITS) { ecl_kw_iset_string8(welletc, 0, " DAYS"); ecl_kw_iset_string8(welletc, 2, ""); ecl_kw_iset_string8(welletc, 3, " METRES"); @@ -495,7 +496,7 @@ static void ecl_rft_node_fill_welletc(ecl_kw_type * welletc, ert_ecl_unit_enum u ecl_kw_iset_string8(welletc, 13, " KG/SM3"); ecl_kw_iset_string8(welletc, 14, " KG/DAY"); ecl_kw_iset_string8(welletc, 15, " KG/KG"); - }else if(unit_set==ERT_ECL_FIELD_UNITS){ + }else if(unit_set==ECL_FIELD_UNITS){ ecl_kw_iset_string8(welletc, 0, " DAYS"); ecl_kw_iset_string8(welletc, 2, ""); ecl_kw_iset_string8(welletc, 3, " FEET"); @@ -511,7 +512,7 @@ static void ecl_rft_node_fill_welletc(ecl_kw_type * welletc, ert_ecl_unit_enum u ecl_kw_iset_string8(welletc, 14, " LB/DAY"); ecl_kw_iset_string8(welletc, 15, " LB/LB"); - }else if(unit_set==ERT_ECL_LAB_UNITS){ + }else if(unit_set==ECL_LAB_UNITS){ ecl_kw_iset_string8(welletc, 0, " HR"); ecl_kw_iset_string8(welletc, 2, ""); ecl_kw_iset_string8(welletc, 3, " CM"); @@ -537,14 +538,14 @@ void ecl_rft_node_fwrite(const ecl_rft_node_type * rft_node, fortio_type * forti util_abort("%s: sorry - only writing of simple RFT is currently implemented",__func__); { - ecl_kw_type * time = ecl_kw_alloc(TIME_KW, 1, ECL_FLOAT_TYPE); + ecl_kw_type * time = ecl_kw_alloc(TIME_KW, 1, ECL_FLOAT); ecl_kw_iset_float(time, 0, ecl_rft_node_get_days(rft_node)); ecl_kw_fwrite(time, fortio); ecl_kw_free(time); } { - ecl_kw_type * datevalue = ecl_kw_alloc(DATE_KW, 3, ECL_INT_TYPE); + ecl_kw_type * datevalue = ecl_kw_alloc(DATE_KW, 3, ECL_INT); time_t date = ecl_rft_node_get_date(rft_node); int day; int month; @@ -558,7 +559,7 @@ void ecl_rft_node_fwrite(const ecl_rft_node_type * rft_node, fortio_type * forti } { - ecl_kw_type * welletc = ecl_kw_alloc(WELLETC_KW, 16, ECL_CHAR_TYPE); + ecl_kw_type * welletc = ecl_kw_alloc(WELLETC_KW, 16, ECL_CHAR); ecl_rft_enum type = ecl_rft_node_get_type(rft_node); ecl_kw_iset_string8(welletc, 1, ecl_rft_node_get_well_name(rft_node)); @@ -577,14 +578,14 @@ void ecl_rft_node_fwrite(const ecl_rft_node_type * rft_node, fortio_type * forti { int size_cells = ecl_rft_node_get_size(rft_node); - ecl_kw_type * conipos = ecl_kw_alloc(CONIPOS_KW, size_cells, ECL_INT_TYPE); - ecl_kw_type * conjpos = ecl_kw_alloc(CONJPOS_KW, size_cells, ECL_INT_TYPE); - ecl_kw_type * conkpos = ecl_kw_alloc(CONKPOS_KW, size_cells, ECL_INT_TYPE); - ecl_kw_type * hostgrid = ecl_kw_alloc(HOSTGRID_KW, size_cells, ECL_CHAR_TYPE); - ecl_kw_type * depth = ecl_kw_alloc(DEPTH_KW, size_cells, ECL_FLOAT_TYPE); - ecl_kw_type * pressure = ecl_kw_alloc(PRESSURE_KW, size_cells, ECL_FLOAT_TYPE); - ecl_kw_type * swat = ecl_kw_alloc(SWAT_KW, size_cells, ECL_FLOAT_TYPE); - ecl_kw_type * sgas = ecl_kw_alloc(SGAS_KW, size_cells, ECL_FLOAT_TYPE); + ecl_kw_type * conipos = ecl_kw_alloc(CONIPOS_KW, size_cells, ECL_INT); + ecl_kw_type * conjpos = ecl_kw_alloc(CONJPOS_KW, size_cells, ECL_INT); + ecl_kw_type * conkpos = ecl_kw_alloc(CONKPOS_KW, size_cells, ECL_INT); + ecl_kw_type * hostgrid = ecl_kw_alloc(HOSTGRID_KW, size_cells, ECL_CHAR); + ecl_kw_type * depth = ecl_kw_alloc(DEPTH_KW, size_cells, ECL_FLOAT); + ecl_kw_type * pressure = ecl_kw_alloc(PRESSURE_KW, size_cells, ECL_FLOAT); + ecl_kw_type * swat = ecl_kw_alloc(SWAT_KW, size_cells, ECL_FLOAT); + ecl_kw_type * sgas = ecl_kw_alloc(SGAS_KW, size_cells, ECL_FLOAT); int i; for(i =0;i #include #include +#include struct ecl_rst_file_struct { fortio_type * fortio; @@ -101,7 +102,7 @@ ecl_rst_file_type * ecl_rst_file_open_write_seek( const char * filename , int re fortio_fseek( rst_file->fortio , 0 , SEEK_SET ); { - ecl_kw_type * work_kw = ecl_kw_alloc_new("WORK-KW" , 0 , ECL_INT_TYPE , NULL); + ecl_kw_type * work_kw = ecl_kw_alloc_new("WORK-KW" , 0 , ECL_INT, NULL); while (true) { offset_type current_offset = fortio_ftell( rst_file->fortio ); @@ -112,7 +113,7 @@ ecl_rst_file_type * ecl_rst_file_open_write_seek( const char * filename , int re break; } - if (!ecl_kw_fread_header( work_kw , rst_file->fortio)) + if (ecl_kw_fread_header( work_kw , rst_file->fortio) == ECL_KW_READ_FAIL) break; if (ecl_kw_name_equal( work_kw , SEQNUM_KW)) { @@ -157,20 +158,20 @@ void ecl_rst_file_close( ecl_rst_file_type * rst_file ) { /*****************************************************************/ static void ecl_rst_file_fwrite_SEQNUM( ecl_rst_file_type * rst_file , int seqnum ) { - ecl_kw_type * seqnum_kw = ecl_kw_alloc( SEQNUM_KW , 1 , ECL_INT_TYPE ); + ecl_kw_type * seqnum_kw = ecl_kw_alloc( SEQNUM_KW , 1 , ECL_INT ); ecl_kw_iset_int( seqnum_kw , 0 , seqnum ); ecl_kw_fwrite( seqnum_kw , rst_file->fortio ); ecl_kw_free( seqnum_kw ); } void ecl_rst_file_start_solution( ecl_rst_file_type * rst_file ) { - ecl_kw_type * startsol_kw = ecl_kw_alloc( STARTSOL_KW , 0 , ECL_MESS_TYPE ); + ecl_kw_type * startsol_kw = ecl_kw_alloc( STARTSOL_KW , 0 , ECL_MESS ); ecl_kw_fwrite( startsol_kw , rst_file->fortio ); ecl_kw_free( startsol_kw ); } void ecl_rst_file_end_solution( ecl_rst_file_type * rst_file ) { - ecl_kw_type * endsol_kw = ecl_kw_alloc( ENDSOL_KW , 0 , ECL_MESS_TYPE ); + ecl_kw_type * endsol_kw = ecl_kw_alloc( ENDSOL_KW , 0 , ECL_MESS ); ecl_kw_fwrite( endsol_kw , rst_file->fortio ); ecl_kw_free( endsol_kw ); } @@ -180,10 +181,10 @@ void ecl_rst_file_end_solution( ecl_rst_file_type * rst_file ) { static ecl_kw_type * ecl_rst_file_alloc_INTEHEAD( ecl_rst_file_type * rst_file, ecl_rsthead_type * rsthead, int simulator ) { - ecl_kw_type * intehead_kw = ecl_kw_alloc( INTEHEAD_KW , INTEHEAD_RESTART_SIZE , ECL_INT_TYPE ); + ecl_kw_type * intehead_kw = ecl_kw_alloc( INTEHEAD_KW , INTEHEAD_RESTART_SIZE , ECL_INT ); ecl_kw_scalar_set_int( intehead_kw , 0 ); - ecl_kw_iset_int( intehead_kw , INTEHEAD_UNIT_INDEX , INTEHEAD_METRIC_VALUE ); + ecl_kw_iset_int( intehead_kw , INTEHEAD_UNIT_INDEX , rsthead->unit_system ); ecl_kw_iset_int( intehead_kw , INTEHEAD_NX_INDEX , rsthead->nx); ecl_kw_iset_int( intehead_kw , INTEHEAD_NY_INDEX , rsthead->ny); ecl_kw_iset_int( intehead_kw , INTEHEAD_NZ_INDEX , rsthead->nz); @@ -230,7 +231,7 @@ static ecl_kw_type * ecl_rst_file_alloc_LOGIHEAD( int simulator ) { bool radial_grid_ECLIPSE100 = false; bool radial_grid_ECLIPSE300 = false; - ecl_kw_type * logihead_kw = ecl_kw_alloc( LOGIHEAD_KW , LOGIHEAD_RESTART_SIZE , ECL_BOOL_TYPE ); + ecl_kw_type * logihead_kw = ecl_kw_alloc( LOGIHEAD_KW , LOGIHEAD_RESTART_SIZE , ECL_BOOL ); ecl_kw_scalar_set_bool( logihead_kw , false ); @@ -245,7 +246,7 @@ static ecl_kw_type * ecl_rst_file_alloc_LOGIHEAD( int simulator ) { static ecl_kw_type * ecl_rst_file_alloc_DOUBHEAD( ecl_rst_file_type * rst_file , double days) { - ecl_kw_type * doubhead_kw = ecl_kw_alloc( DOUBHEAD_KW , DOUBHEAD_RESTART_SIZE , ECL_DOUBLE_TYPE ); + ecl_kw_type * doubhead_kw = ecl_kw_alloc( DOUBHEAD_KW , DOUBHEAD_RESTART_SIZE , ECL_DOUBLE ); ecl_kw_scalar_set_double( doubhead_kw , 0); ecl_kw_iset_double( doubhead_kw , DOUBHEAD_DAYS_INDEX , days ); diff --git a/ThirdParty/Ert/libecl/src/ecl_rsthead.c b/ThirdParty/Ert/libecl/src/ecl_rsthead.c index c98e2ce928..e515df45fd 100644 --- a/ThirdParty/Ert/libecl/src/ecl_rsthead.c +++ b/ThirdParty/Ert/libecl/src/ecl_rsthead.c @@ -73,9 +73,10 @@ ecl_rsthead_type * ecl_rsthead_alloc_from_kw( int report_step , const ecl_kw_typ rsthead->nwells = data[INTEHEAD_NWELLS_INDEX]; rsthead->niwelz = data[INTEHEAD_NIWELZ_INDEX]; + rsthead->nxwelz = data[INTEHEAD_NXWELZ_INDEX]; rsthead->nzwelz = data[INTEHEAD_NZWELZ_INDEX]; - rsthead->nsconz = data[INTEHEAD_NSCONZ_INDEX]; + rsthead->nxconz = data[INTEHEAD_NXCONZ_INDEX]; rsthead->niconz = data[INTEHEAD_NICONZ_INDEX]; rsthead->ncwmax = data[INTEHEAD_NCWMAX_INDEX]; @@ -88,7 +89,7 @@ ecl_rsthead_type * ecl_rsthead_alloc_from_kw( int report_step , const ecl_kw_typ rsthead->sim_time = rsthead_date( rsthead->day , rsthead->month , rsthead->year ); } if (doubhead_kw) - rsthead->sim_days = ecl_kw_iget_double( doubhead_kw , DOUBHEAD_DAYS_INDEX ); + rsthead->sim_days = ecl_kw_iget_double( doubhead_kw , DOUBHEAD_DAYS_INDEX ); if (logihead_kw) rsthead->dualp = ecl_kw_iget_bool( logihead_kw , LOGIHEAD_DUALP_INDEX); @@ -109,8 +110,7 @@ ecl_rsthead_type * ecl_rsthead_alloc_from_kw( int report_step , const ecl_kw_typ ecl_rsthead_type * ecl_rsthead_alloc( const ecl_file_view_type * rst_view, int report_step) { const ecl_kw_type * intehead_kw = ecl_file_view_iget_named_kw( rst_view , INTEHEAD_KW , 0); -// const ecl_kw_type * doubhead_kw = ecl_file_view_iget_named_kw(rst_view, DOUBHEAD_KW, 0); - const ecl_kw_type * doubhead_kw = NULL;//ecl_file_view_iget_named_kw( rst_view , DOUBHEAD_KW , 0); + const ecl_kw_type * doubhead_kw = NULL; const ecl_kw_type * logihead_kw = NULL; if (ecl_file_view_has_kw(rst_view, LOGIHEAD_KW)) @@ -233,3 +233,13 @@ void ecl_rsthead_fprintf_struct( const ecl_rsthead_type * header , FILE * stream void ecl_rsthead_free( ecl_rsthead_type * rsthead ) { free( rsthead ); } + + +int ecl_rsthead_get_nxconz( const ecl_rsthead_type * rsthead ) { + return rsthead->nxconz; +} + + +int ecl_rsthead_get_ncwmax( const ecl_rsthead_type * rsthead ) { + return rsthead->ncwmax; +} diff --git a/ThirdParty/Ert/libecl/src/ecl_smspec.c b/ThirdParty/Ert/libecl/src/ecl_smspec.c index 5a9773c5a3..07e86b53d6 100644 --- a/ThirdParty/Ert/libecl/src/ecl_smspec.c +++ b/ThirdParty/Ert/libecl/src/ecl_smspec.c @@ -35,6 +35,7 @@ #include #include #include +#include #ifdef HAVE_FNMATCH #include @@ -139,7 +140,7 @@ struct ecl_smspec_struct { bool has_lgr; float_vector_type * params_default; - stringlist_type * restart_list; /* List of ECLBASE names of restart files this case has been restarted from (if any). */ + char * restart_case; }; @@ -233,11 +234,14 @@ static const char* special_vars[] = {"NEWTON", this simple list. */ -static const char* smspec_required_keywords[] = {WGNAMES_KW, - KEYWORDS_KW, - STARTDAT_KW, - UNITS_KW, - DIMENS_KW}; +static const size_t num_req_keywords = 5; +static const char* smspec_required_keywords[] = { + WGNAMES_KW, + KEYWORDS_KW, + STARTDAT_KW, + UNITS_KW, + DIMENS_KW + }; /*****************************************************************/ @@ -269,7 +273,7 @@ static ecl_smspec_type * ecl_smspec_alloc_empty(bool write_mode , const char * k ecl_smspec->time_seconds = -1; ecl_smspec->index_map = int_vector_alloc(0,0); - ecl_smspec->restart_list = stringlist_alloc_new(); + ecl_smspec->restart_case = NULL; ecl_smspec->params_default = float_vector_alloc(0 , PARAMS_GLOBAL_DEFAULT); ecl_smspec->write_mode = write_mode; ecl_smspec->need_nums = false; @@ -278,6 +282,29 @@ static ecl_smspec_type * ecl_smspec_alloc_empty(bool write_mode , const char * k } +int * ecl_smspec_alloc_mapping( const ecl_smspec_type * self, const ecl_smspec_type * other) { + int params_size = ecl_smspec_get_params_size( self ); + int * mapping = util_malloc( params_size * sizeof * mapping ); + + for (int i = 0; i < params_size; i++) + mapping[i] = -1; + + + for (int i=0; i < ecl_smspec_num_nodes( self ); i++) { + const smspec_node_type * self_node = ecl_smspec_iget_node( self , i ); + int self_index = smspec_node_get_params_index( self_node ); + const char * key = smspec_node_get_gen_key1( self_node ); + if (ecl_smspec_has_general_var( other , key)) { + const smspec_node_type * other_node = ecl_smspec_get_general_var_node( other , key); + int other_index = smspec_node_get_params_index(other_node); + mapping[ self_index ] = other_index; + } + } + + return mapping; +} + + /** Observe that the index here is into the __INTERNAL__ indexing in the smspec_nodes vector; and in general widely different from the @@ -309,6 +336,21 @@ void ecl_smspec_lock( ecl_smspec_type * smspec ) { smspec->locked = true; } +/** + * Returns an ecl data type for which all names will fit. If the maximum name + * length is at most 8, an ECL_CHAR is returned and otherwise a large enough + * ECL_STRING. + */ +static ecl_data_type get_wgnames_type(const ecl_smspec_type * smspec) { + size_t max_len = 0; + for(int i = 0; i < ecl_smspec_num_nodes(smspec); ++i) { + const char * name = smspec_node_get_wgname(ecl_smspec_iget_node(smspec, i)); + if(name != NULL) + max_len = util_size_t_max(max_len, strlen(name)); + } + + return max_len <= 8 ? ECL_CHAR : ECL_STRING(max_len); +} // DIMENS // KEYWORDS @@ -321,7 +363,7 @@ void ecl_smspec_lock( ecl_smspec_type * smspec ) { static void ecl_smspec_fortio_fwrite( const ecl_smspec_type * smspec , fortio_type * fortio) { int num_nodes = ecl_smspec_num_nodes( smspec ); { - ecl_kw_type * restart_kw = ecl_kw_alloc( RESTART_KW , SUMMARY_RESTART_SIZE , ECL_CHAR_TYPE ); + ecl_kw_type * restart_kw = ecl_kw_alloc( RESTART_KW , SUMMARY_RESTART_SIZE , ECL_CHAR ); int i; for (i=0; i < SUMMARY_RESTART_SIZE; i++) ecl_kw_iset_string8( restart_kw , i , ""); @@ -330,7 +372,7 @@ static void ecl_smspec_fortio_fwrite( const ecl_smspec_type * smspec , fortio_ty ecl_kw_free( restart_kw ); } { - ecl_kw_type * dimens_kw = ecl_kw_alloc( DIMENS_KW , DIMENS_SIZE , ECL_INT_TYPE ); + ecl_kw_type * dimens_kw = ecl_kw_alloc( DIMENS_KW , DIMENS_SIZE , ECL_INT ); ecl_kw_iset_int( dimens_kw , DIMENS_SMSPEC_SIZE_INDEX , num_nodes ); ecl_kw_iset_int( dimens_kw , DIMENS_SMSPEC_NX_INDEX , smspec->grid_dims[0] ); ecl_kw_iset_int( dimens_kw , DIMENS_SMSPEC_NY_INDEX , smspec->grid_dims[1] ); @@ -346,13 +388,21 @@ static void ecl_smspec_fortio_fwrite( const ecl_smspec_type * smspec , fortio_ty { - ecl_kw_type * keywords_kw = ecl_kw_alloc( KEYWORDS_KW , num_nodes , ECL_CHAR_TYPE ); - ecl_kw_type * wgnames_kw = ecl_kw_alloc( WGNAMES_KW , num_nodes , ECL_CHAR_TYPE ); - ecl_kw_type * units_kw = ecl_kw_alloc( UNITS_KW , num_nodes , ECL_CHAR_TYPE ); + ecl_kw_type * keywords_kw = ecl_kw_alloc( KEYWORDS_KW , num_nodes , ECL_CHAR ); + ecl_kw_type * units_kw = ecl_kw_alloc( UNITS_KW , num_nodes , ECL_CHAR ); ecl_kw_type * nums_kw = NULL; + // If the names_type is an ECL_STRING we expect this to be an INTERSECT + // summary, otherwise an ECLIPSE summary. + ecl_data_type names_type = get_wgnames_type(smspec); + ecl_kw_type * wgnames_kw = ecl_kw_alloc( + ecl_type_is_char(names_type) ? WGNAMES_KW : NAMES_KW, + num_nodes, + names_type + ); + if (smspec->need_nums) - nums_kw = ecl_kw_alloc( NUMS_KW , num_nodes , ECL_INT_TYPE); + nums_kw = ecl_kw_alloc( NUMS_KW , num_nodes , ECL_INT); { int i; for (i=0; i < ecl_smspec_num_nodes( smspec ); i++) { @@ -379,7 +429,7 @@ static void ecl_smspec_fortio_fwrite( const ecl_smspec_type * smspec , fortio_ty if (smspec_node_get_var_type( smspec_node ) == ECL_SMSPEC_INVALID_VAR) { ecl_kw_iset_string8( keywords_kw , i , "WWCT" ); ecl_kw_iset_string8( units_kw , i , "????????"); - ecl_kw_iset_string8( wgnames_kw , i , DUMMY_WELL); + ecl_kw_iset_string_ptr( wgnames_kw , i , DUMMY_WELL); } else { ecl_kw_iset_string8( keywords_kw , i , smspec_node_get_keyword( smspec_node )); ecl_kw_iset_string8( units_kw , i , smspec_node_get_unit( smspec_node )); @@ -387,7 +437,7 @@ static void ecl_smspec_fortio_fwrite( const ecl_smspec_type * smspec , fortio_ty const char * wgname = DUMMY_WELL; if (smspec_node_get_wgname( smspec_node ) != NULL) wgname = smspec_node_get_wgname( smspec_node ); - ecl_kw_iset_string8( wgnames_kw , i , wgname); + ecl_kw_iset_string_ptr( wgnames_kw , i , wgname); } } @@ -412,7 +462,7 @@ static void ecl_smspec_fortio_fwrite( const ecl_smspec_type * smspec , fortio_ty } { - ecl_kw_type * startdat_kw = ecl_kw_alloc( STARTDAT_KW , STARTDAT_SIZE , ECL_INT_TYPE ); + ecl_kw_type * startdat_kw = ecl_kw_alloc( STARTDAT_KW , STARTDAT_SIZE , ECL_INT ); int day,month,year; ecl_util_set_date_values( smspec->sim_start_time , &day, &month , &year); @@ -907,66 +957,34 @@ bool ecl_smspec_needs_num( ecl_smspec_var_type var_type ) { } -static bool ecl_smspec_kw_equal(const ecl_file_type * header , const ecl_file_type * restart_header , const char * kw , int cmp_elements) { - if (ecl_file_has_kw( header , kw ) == ecl_file_has_kw( restart_header , kw )) { - if (ecl_file_has_kw( header , kw)) { - ecl_kw_type *ecl_kw1 = ecl_file_iget_named_kw(header, kw , 0); - ecl_kw_type *ecl_kw2 = ecl_file_iget_named_kw(restart_header, kw , 0); - - return ecl_kw_block_equal( ecl_kw1 , ecl_kw2 , cmp_elements); - } else - return true; // None of the headers have this keyword - that is equality! - } else - return false; -} - - -/** - When loading historical summary results the SMSPEC header of the - historical results is not internalized, i.e. it is essential that - the historical case has identical header as the main case. This - function compares the ecl_file represeantation of two SMSPEC - headers. - - Unfortunately there are legitimate reasons why some of the headers - can be different; in particular new well can appear. In the code - below we therefor only check a limited set of keywords for - equality. -*/ -static bool ecl_smspec_file_equal( const ecl_file_type * header1 , const ecl_file_type * header2) { - if (! ecl_smspec_kw_equal( header1 , header2 , KEYWORDS_KW , 0)) - return false; - if (! ecl_smspec_kw_equal( header1 , header2 , STARTDAT_KW , 0)) - return false; +bool ecl_smspec_equal( const ecl_smspec_type * self , const ecl_smspec_type * other) { + bool equal = true; - if (! ecl_smspec_kw_equal( header1 , header2 , UNITS_KW , 0)) - return false; + if (vector_get_size( self->smspec_nodes ) == vector_get_size( other->smspec_nodes)) { + for (int i=0; i < vector_get_size( self->smspec_nodes ); i++) { + const smspec_node_type * node1 = vector_iget_const( self->smspec_nodes , i ); + const smspec_node_type * node2 = vector_iget_const( other->smspec_nodes , i ); - if (! ecl_smspec_kw_equal( header1 , header2 , DIMENS_KW , 4)) // Only the first four elements are compared. - return false; + if (!smspec_node_equal( node1,node2)) { + equal = false; + break; + } - if (!ecl_smspec_kw_equal( header1, header2 , LGRS_KW , 0)) - return false; + } + } else + equal = false; - return true; + return equal; } -/** - This will iterate backwards through the RESTART header in the - SMSPEC files to find names of the case(s) this case has been - restarted from. - The case names are internalized in the restart_list field of the - ecl_smspec instance. The actual loading of the restart summary data - is subsequently handled by the ecl_sum_data function. -*/ static void ecl_smspec_load_restart( ecl_smspec_type * ecl_smspec , const ecl_file_type * header ) { if (ecl_file_has_kw( header , RESTART_KW )) { - const ecl_kw_type * restart_kw = ecl_file_iget_kw( header , 0 ); + const ecl_kw_type * restart_kw = ecl_file_iget_named_kw(header, RESTART_KW , 0); char tmp_base[73]; /* To accomodate a maximum of 9 items which consist of 8 characters each. */ char * restart_base; int i; @@ -981,32 +999,12 @@ static void ecl_smspec_load_restart( ecl_smspec_type * ecl_smspec , const ecl_fi util_alloc_file_components( ecl_smspec->header_file , &path , NULL , NULL ); smspec_header = ecl_util_alloc_exfilename( path , restart_base , ECL_SUMMARY_HEADER_FILE , ecl_smspec->formatted , 0); - if (smspec_header == NULL) - fprintf(stderr,"Warning - the header file: %s refers to restart from case: %s - which was not found.... \n", ecl_smspec->header_file , restart_base); - - else { - if (!util_same_file(smspec_header , ecl_smspec->header_file)) { /* Restart from the current case is ignored. */ - /* - Verify that this smspec_header is not already in the list of restart - cases. Don't know if this is at all possible, but this test - nevertheless prevents against a recursive death. - */ - if (!stringlist_contains( ecl_smspec->restart_list , restart_base)) { - ecl_file_type * restart_header = ecl_file_open( smspec_header , 0); - if (restart_header) { - if (ecl_smspec_file_equal( header , restart_header)) { - stringlist_insert_copy( ecl_smspec->restart_list , 0 , restart_base ); - ecl_smspec_load_restart( ecl_smspec , restart_header); /* Recursive call */ - } else - fprintf(stderr,"** Warning: the historical case: %s is not compatible with the current case - ignored.\n" , - ecl_file_get_src_file( restart_header)); - - ecl_file_close( restart_header ); - } else - fprintf(stderr,"** Warning: failed to historical case:%s - ignored.\n", smspec_header); - } - } + if (!util_same_file(smspec_header , ecl_smspec->header_file)) /* Restart from the current case is ignored. */ { + char * tmp_path = util_alloc_filename( path , restart_base , NULL ); + ecl_smspec->restart_case = util_alloc_abs_path(tmp_path); + free( tmp_path ); } + util_safe_free( path ); util_safe_free( smspec_header ); } @@ -1086,16 +1084,25 @@ const int_vector_type * ecl_smspec_get_index_map( const ecl_smspec_type * smspec return smspec->index_map; } +/** + * This function is to support the NAMES alias for WGNAMES. If similar + * situations occur in the future, this is a sane starting point for general + * support. + */ +static const char * get_active_keyword_alias(ecl_file_type * header, const char * keyword) { + if (strcmp(keyword, WGNAMES_KW) == 0 || strcmp(keyword, NAMES_KW) == 0) + return ecl_file_has_kw(header, WGNAMES_KW) ? WGNAMES_KW : NAMES_KW; + + return keyword; +} + static bool ecl_smspec_check_header( ecl_file_type * header ) { bool OK = true; - int num_required = sizeof( smspec_required_keywords ) / sizeof( smspec_required_keywords[0] ); - int i; - - for (i=0; i < num_required; i++) { - if (!ecl_file_has_kw( header , smspec_required_keywords[i])) { - OK = false; - break; - } + for (int i=0; i < num_req_keywords && OK; i++) { + OK &= ecl_file_has_kw( + header, + get_active_keyword_alias(header, smspec_required_keywords[i]) + ); } return OK; @@ -1105,16 +1112,18 @@ static bool ecl_smspec_check_header( ecl_file_type * header ) { static bool ecl_smspec_fread_header(ecl_smspec_type * ecl_smspec, const char * header_file , bool include_restart) { ecl_file_type * header = ecl_file_open( header_file , 0); if (header && ecl_smspec_check_header( header )) { - ecl_kw_type *wells = ecl_file_iget_named_kw(header, WGNAMES_KW , 0); - ecl_kw_type *keywords = ecl_file_iget_named_kw(header, KEYWORDS_KW , 0); - ecl_kw_type *startdat = ecl_file_iget_named_kw(header, STARTDAT_KW , 0); - ecl_kw_type *units = ecl_file_iget_named_kw(header, UNITS_KW , 0); - ecl_kw_type *dimens = ecl_file_iget_named_kw(header, DIMENS_KW , 0); - ecl_kw_type *nums = NULL; - ecl_kw_type *lgrs = NULL; - ecl_kw_type *numlx = NULL; - ecl_kw_type *numly = NULL; - ecl_kw_type *numlz = NULL; + const char * names_alias = get_active_keyword_alias(header, WGNAMES_KW); + ecl_kw_type *wells = ecl_file_iget_named_kw(header, names_alias , 0); + ecl_kw_type *keywords = ecl_file_iget_named_kw(header, KEYWORDS_KW , 0); + ecl_kw_type *startdat = ecl_file_iget_named_kw(header, STARTDAT_KW , 0); + ecl_kw_type *units = ecl_file_iget_named_kw(header, UNITS_KW , 0); + ecl_kw_type *dimens = ecl_file_iget_named_kw(header, DIMENS_KW , 0); + ecl_kw_type *nums = NULL; + ecl_kw_type *lgrs = NULL; + ecl_kw_type *numlx = NULL; + ecl_kw_type *numly = NULL; + ecl_kw_type *numlz = NULL; + int params_index; ecl_smspec->num_regions = 0; if (startdat == NULL) @@ -1620,8 +1629,8 @@ const char * ecl_smspec_get_header_file( const ecl_smspec_type * ecl_smspec ) { -const stringlist_type * ecl_smspec_get_restart_list( const ecl_smspec_type * ecl_smspec) { - return ecl_smspec->restart_list; +const char * ecl_smspec_get_restart_case( const ecl_smspec_type * ecl_smspec) { + return ecl_smspec->restart_case; } @@ -1644,7 +1653,7 @@ void ecl_smspec_free(ecl_smspec_type *ecl_smspec) { int_vector_free( ecl_smspec->index_map ); float_vector_free( ecl_smspec->params_default ); vector_free( ecl_smspec->smspec_nodes ); - stringlist_free( ecl_smspec->restart_list ); + free( ecl_smspec->restart_case ); free( ecl_smspec ); } diff --git a/ThirdParty/Ert/libecl/src/ecl_subsidence.c b/ThirdParty/Ert/libecl/src/ecl_subsidence.c index cd1ff9ee02..4fe053f6f9 100644 --- a/ThirdParty/Ert/libecl/src/ecl_subsidence.c +++ b/ThirdParty/Ert/libecl/src/ecl_subsidence.c @@ -18,6 +18,7 @@ */ #include +#define _USE_MATH_DEFINES // for C WINDOWS #include #include @@ -46,7 +47,7 @@ /** The ecl_subsidence_struct datastructure is the main structure for - calculating the subsidence from time lapse ECLIPSE simulations. + calculating the subsidence from time lapse ECLIPSE simulations. */ struct ecl_subsidence_struct { @@ -81,17 +82,17 @@ struct ecl_subsidence_survey_struct { /*****************************************************************/ -static ecl_subsidence_survey_type * ecl_subsidence_survey_alloc_empty(const ecl_subsidence_type * sub, +static ecl_subsidence_survey_type * ecl_subsidence_survey_alloc_empty(const ecl_subsidence_type * sub, const char * name) { ecl_subsidence_survey_type * survey = util_malloc( sizeof * survey ); UTIL_TYPE_ID_INIT( survey , ECL_SUBSIDENCE_SURVEY_ID ); survey->grid_cache = sub->grid_cache; survey->aquifer_cell = sub->aquifer_cell; survey->name = util_alloc_string_copy( name ); - + survey->porv = util_calloc( ecl_grid_cache_get_size( sub->grid_cache ) , sizeof * survey->porv ); survey->pressure = util_calloc( ecl_grid_cache_get_size( sub->grid_cache ) , sizeof * survey->pressure ); - + return survey; } @@ -108,7 +109,7 @@ static ecl_subsidence_survey_type * ecl_subsidence_survey_alloc_PRESSURE(ecl_sub int active_index; ecl_kw_type * init_porv_kw = ecl_file_iget_named_kw( ecl_subsidence->init_file , PORV_KW , 0); /*Global indexing*/ ecl_kw_type * pressure_kw = ecl_file_view_iget_named_kw( restart_view , PRESSURE_KW , 0); /*Active indexing*/ - + for (active_index = 0; active_index < size; active_index++){ survey->porv[ active_index ] = ecl_kw_iget_float( init_porv_kw , global_index[active_index] ); survey->pressure[ active_index ] = ecl_kw_iget_float( pressure_kw , active_index ); @@ -138,7 +139,7 @@ static void ecl_subsidence_survey_free__( void * __subsidence_survey ) { static double ecl_subsidence_survey_eval( const ecl_subsidence_survey_type * base_survey , const ecl_subsidence_survey_type * monitor_survey, ecl_region_type * region , - double utm_x , double utm_y , double depth, + double utm_x , double utm_y , double depth, double compressibility, double poisson_ratio) { const ecl_grid_cache_type * grid_cache = base_survey->grid_cache; @@ -154,14 +155,44 @@ static double ecl_subsidence_survey_eval( const ecl_subsidence_survey_type * bas for (index = 0; index < size; index++) weight[index] = base_survey->porv[index] * base_survey->pressure[index]; } - - deltaz = compressibility * 31.83099*(1-poisson_ratio) * + + deltaz = compressibility * 31.83099*(1-poisson_ratio) * ecl_grav_common_eval_biot_savart( grid_cache , region , base_survey->aquifer_cell , weight , utm_x , utm_y , depth ); - + free( weight ); return deltaz; } + +static double ecl_subsidence_survey_eval_geertsma( const ecl_subsidence_survey_type * base_survey , + const ecl_subsidence_survey_type * monitor_survey, + ecl_region_type * region , + double utm_x , double utm_y , double depth, + double youngs_modulus, double poisson_ratio, double seabed) { + + const ecl_grid_cache_type * grid_cache = base_survey->grid_cache; + const double * cell_volume = ecl_grid_cache_get_volume( grid_cache ); + const int size = ecl_grid_cache_get_size( grid_cache ); + double scale_factor = 1e4 *(1 + poisson_ratio) * ( 1 - 2*poisson_ratio) / ( 4*M_PI*( 1 - poisson_ratio) * youngs_modulus ); + double * weight = util_calloc( size , sizeof * weight ); + double deltaz; + + for (int index = 0; index < size; index++) { + if (monitor_survey) { + weight[index] = scale_factor * cell_volume[index] * (base_survey->pressure[index] - monitor_survey->pressure[index]); + } else { + weight[index] = scale_factor * cell_volume[index] * (base_survey->pressure[index] ); + } + } + + deltaz = ecl_grav_common_eval_geertsma( grid_cache , region , base_survey->aquifer_cell , weight , utm_x , utm_y , depth , poisson_ratio, seabed); + + free( weight ); + return deltaz; +} + + + /*****************************************************************/ /** The grid instance is only used during the construction phase. The @@ -175,7 +206,7 @@ ecl_subsidence_type * ecl_subsidence_alloc( const ecl_grid_type * ecl_grid, cons ecl_subsidence->init_file = init_file; ecl_subsidence->grid_cache = ecl_grid_cache_alloc( ecl_grid ); ecl_subsidence->aquifer_cell = ecl_grav_common_alloc_aquifer_cell( ecl_subsidence->grid_cache , init_file ); - + ecl_subsidence->surveys = hash_alloc(); return ecl_subsidence; } @@ -205,14 +236,23 @@ static ecl_subsidence_survey_type * ecl_subsidence_get_survey( const ecl_subside } -double ecl_subsidence_eval( const ecl_subsidence_type * subsidence , const char * base, const char * monitor , ecl_region_type * region , - double utm_x, double utm_y , double depth, +double ecl_subsidence_eval( const ecl_subsidence_type * subsidence , const char * base, const char * monitor , ecl_region_type * region , + double utm_x, double utm_y , double depth, double compressibility, double poisson_ratio) { ecl_subsidence_survey_type * base_survey = ecl_subsidence_get_survey( subsidence , base ); ecl_subsidence_survey_type * monitor_survey = ecl_subsidence_get_survey( subsidence , monitor ); return ecl_subsidence_survey_eval( base_survey , monitor_survey , region , utm_x , utm_y , depth , compressibility, poisson_ratio); } + +double ecl_subsidence_eval_geertsma( const ecl_subsidence_type * subsidence , const char * base, const char * monitor , ecl_region_type * region , + double utm_x, double utm_y , double depth, + double youngs_modulus, double poisson_ratio, double seabed) { + ecl_subsidence_survey_type * base_survey = ecl_subsidence_get_survey( subsidence , base ); + ecl_subsidence_survey_type * monitor_survey = ecl_subsidence_get_survey( subsidence , monitor ); + return ecl_subsidence_survey_eval_geertsma( base_survey , monitor_survey , region , utm_x , utm_y , depth , youngs_modulus, poisson_ratio, seabed); +} + void ecl_subsidence_free( ecl_subsidence_type * ecl_subsidence ) { ecl_grid_cache_free( ecl_subsidence->grid_cache ); free( ecl_subsidence->aquifer_cell ); diff --git a/ThirdParty/Ert/libecl/src/ecl_sum.c b/ThirdParty/Ert/libecl/src/ecl_sum.c index 9b5aa3638a..6c59715abf 100644 --- a/ThirdParty/Ert/libecl/src/ecl_sum.c +++ b/ThirdParty/Ert/libecl/src/ecl_sum.c @@ -174,16 +174,7 @@ static bool ecl_sum_fread_data( ecl_sum_type * ecl_sum , const stringlist_type * ecl_sum->data = ecl_sum_data_alloc( ecl_sum->smspec ); if (ecl_sum_data_fread( ecl_sum->data , data_files )) { if (include_restart) { - const char * path = ecl_sum->path; - const stringlist_type * restart_cases = ecl_smspec_get_restart_list( ecl_sum->smspec ); - stringlist_type * restart_files = stringlist_alloc_new(); - - int restart_nr; - for (restart_nr = 0; restart_nr < stringlist_get_size( restart_cases ); restart_nr++) { - ecl_util_alloc_summary_data_files(path , stringlist_iget( restart_cases , restart_nr ) , ecl_sum->fmt_case , restart_files ); - ecl_sum_data_fread_restart( ecl_sum->data , restart_files ); - } - stringlist_free( restart_files ); + } return true; } else @@ -191,6 +182,15 @@ static bool ecl_sum_fread_data( ecl_sum_type * ecl_sum , const stringlist_type * } +static void ecl_sum_fread_history( ecl_sum_type * ecl_sum ) { + ecl_sum_type * history = ecl_sum_fread_alloc_case__( ecl_smspec_get_restart_case( ecl_sum->smspec ) , ":" , true); + if (history) { + ecl_sum_data_add_case(ecl_sum->data , history->data ); + ecl_sum_free( history ); + } +} + + static bool ecl_sum_fread(ecl_sum_type * ecl_sum , const char *header_file , const stringlist_type *data_files , bool include_restart) { ecl_sum->smspec = ecl_smspec_fread_alloc( header_file , ecl_sum->key_join_string , include_restart); @@ -213,6 +213,9 @@ static bool ecl_sum_fread(ecl_sum_type * ecl_sum , const char *header_file , con } else return false; + if (include_restart && ecl_smspec_get_restart_case( ecl_sum->smspec )) + ecl_sum_fread_history( ecl_sum ); + return true; } diff --git a/ThirdParty/Ert/libecl/src/ecl_sum_data.c b/ThirdParty/Ert/libecl/src/ecl_sum_data.c index dbfe45fb22..c8871fb84d 100644 --- a/ThirdParty/Ert/libecl/src/ecl_sum_data.c +++ b/ThirdParty/Ert/libecl/src/ecl_sum_data.c @@ -324,7 +324,7 @@ ecl_sum_data_type * ecl_sum_data_alloc_writer( ecl_smspec_type * smspec ) { static void ecl_sum_data_fwrite_report__( const ecl_sum_data_type * data , int report_step , fortio_type * fortio) { { - ecl_kw_type * seqhdr_kw = ecl_kw_alloc( SEQHDR_KW , SEQHDR_SIZE , ECL_INT_TYPE ); + ecl_kw_type * seqhdr_kw = ecl_kw_alloc( SEQHDR_KW , SEQHDR_SIZE , ECL_INT ); ecl_kw_iset_int( seqhdr_kw , 0 , 0 ); ecl_kw_fwrite( seqhdr_kw , fortio ); ecl_kw_free( seqhdr_kw ); @@ -712,7 +712,7 @@ double_vector_type * ecl_sum_data_alloc_seconds_solution( const ecl_sum_data_typ -static void ecl_sum_data_append_tstep__( ecl_sum_data_type * data , int ministep_nr , ecl_sum_tstep_type * tstep) { +static void ecl_sum_data_append_tstep__( ecl_sum_data_type * data , ecl_sum_tstep_type * tstep) { /* Here the tstep is just appended naively, the vector will be sorted by ministep_nr before the data instance is returned. @@ -854,7 +854,7 @@ ecl_sum_tstep_type * ecl_sum_data_add_new_tstep( ecl_sum_data_type * data , int if (vector_get_size( data->data ) > 0) prev_tstep = vector_get_last( data->data ); - ecl_sum_data_append_tstep__( data , ministep_nr , tstep ); + ecl_sum_data_append_tstep__( data , tstep ); { bool rebuild_index = true; @@ -938,7 +938,7 @@ static void ecl_sum_data_add_ecl_file(ecl_sum_data_type * data , if (tstep != NULL) { if (load_end == 0 || (ecl_sum_tstep_get_sim_time( tstep ) < load_end)) - ecl_sum_data_append_tstep__( data , ministep_nr , tstep ); + ecl_sum_data_append_tstep__( data , tstep ); else /* This tstep is in a time-period overlapping with data we already have; discard this. */ @@ -950,6 +950,42 @@ static void ecl_sum_data_add_ecl_file(ecl_sum_data_type * data , } +void ecl_sum_data_add_case(ecl_sum_data_type * self, const ecl_sum_data_type * other) { + int * param_mapping = NULL; + bool header_equal = ecl_smspec_equal( self->smspec , other->smspec); + float default_value = 0; + + if (!header_equal) + param_mapping = ecl_smspec_alloc_mapping( self->smspec , other->smspec ); + + + for (int tstep_nr = 0; tstep_nr < ecl_sum_data_get_length( other ); tstep_nr++) { + ecl_sum_tstep_type * other_tstep = ecl_sum_data_iget_ministep( other , tstep_nr ); + + /* + The dataset 'self' is the authorative in the timeinterval where + it has data, so if 'other' also has data in the same time interval + that is discarded. + */ + + if (!time_interval_contains( self->sim_time , ecl_sum_tstep_get_sim_time( other_tstep ))) { + ecl_sum_tstep_type * new_tstep; + + if (header_equal) + new_tstep = ecl_sum_tstep_alloc_copy( other_tstep ); + else + new_tstep = ecl_sum_tstep_alloc_remap_copy( other_tstep , self->smspec , default_value , param_mapping ); + + ecl_sum_data_append_tstep__( self , new_tstep ); + + } + } + + ecl_sum_data_build_index( self ); + free( param_mapping ); +} + + static bool ecl_sum_data_check_file( ecl_file_type * ecl_file ) { if (ecl_file_has_kw( ecl_file , PARAMS_KW ) && (ecl_file_get_num_named_kw( ecl_file , PARAMS_KW ) == ecl_file_get_num_named_kw( ecl_file , MINISTEP_KW))) diff --git a/ThirdParty/Ert/libecl/src/ecl_sum_tstep.c b/ThirdParty/Ert/libecl/src/ecl_sum_tstep.c index 4fcefb538a..8228400d02 100644 --- a/ThirdParty/Ert/libecl/src/ecl_sum_tstep.c +++ b/ThirdParty/Ert/libecl/src/ecl_sum_tstep.c @@ -26,6 +26,7 @@ #include #include #include +#include #define ECL_SUM_TSTEP_ID 88631 @@ -69,6 +70,31 @@ struct ecl_sum_tstep_struct { }; +ecl_sum_tstep_type * ecl_sum_tstep_alloc_remap_copy( const ecl_sum_tstep_type * src , const ecl_smspec_type * new_smspec, float default_value , const int * params_map) { + int params_size = ecl_smspec_get_params_size( new_smspec ); + ecl_sum_tstep_type * target = util_alloc_copy(src , sizeof * src ); + + target->smspec = new_smspec; + target->data = util_malloc( params_size * sizeof * target->data ); + target->data_size = params_size; + for (int i=0; i < params_size; i++) { + + if (params_map[i] >= 0) + target->data[i] = src->data[ params_map[i] ]; + else + target->data[i] = default_value; + + } + return target; +} + +ecl_sum_tstep_type * ecl_sum_tstep_alloc_copy( const ecl_sum_tstep_type * src ) { + ecl_sum_tstep_type * target = util_alloc_copy(src , sizeof * src ); + target->data = util_alloc_copy( src->data , src->data_size * sizeof * src->data ); + return target; +} + + static ecl_sum_tstep_type * ecl_sum_tstep_alloc( int report_step , int ministep_nr , const ecl_smspec_type * smspec) { ecl_sum_tstep_type * tstep = util_malloc( sizeof * tstep ); UTIL_TYPE_ID_INIT( tstep , ECL_SUM_TSTEP_ID); @@ -245,7 +271,7 @@ int ecl_sum_tstep_get_ministep(const ecl_sum_tstep_type * ministep) { void ecl_sum_tstep_fwrite( const ecl_sum_tstep_type * ministep , const int_vector_type * index_map , fortio_type * fortio) { { - ecl_kw_type * ministep_kw = ecl_kw_alloc( MINISTEP_KW , 1 , ECL_INT_TYPE ); + ecl_kw_type * ministep_kw = ecl_kw_alloc( MINISTEP_KW , 1 , ECL_INT ); ecl_kw_iset_int( ministep_kw , 0 , ministep->ministep ); ecl_kw_fwrite( ministep_kw , fortio ); ecl_kw_free( ministep_kw ); @@ -253,7 +279,7 @@ void ecl_sum_tstep_fwrite( const ecl_sum_tstep_type * ministep , const int_vecto { int compact_size = int_vector_size( index_map ); - ecl_kw_type * params_kw = ecl_kw_alloc( PARAMS_KW , compact_size , ECL_FLOAT_TYPE ); + ecl_kw_type * params_kw = ecl_kw_alloc( PARAMS_KW , compact_size , ECL_FLOAT ); const int * index = int_vector_get_ptr( index_map ); float * data = ecl_kw_get_ptr( params_kw ); diff --git a/ThirdParty/Ert/libecl/src/ecl_type.c b/ThirdParty/Ert/libecl/src/ecl_type.c new file mode 100644 index 0000000000..a259bb5428 --- /dev/null +++ b/ThirdParty/Ert/libecl/src/ecl_type.c @@ -0,0 +1,210 @@ +/* + Copyright (C) 2017 Statoil ASA, Norway. + + The file 'ecl_type.c' is part of ERT - Ensemble based Reservoir Tool. + + ERT 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. + + ERT 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 + for more details. +*/ + +#include +#include +#include + +#include +#include + +/*****************************************************************/ +/* The string names for the different ECLIPSE low-level + types. +*/ +#define ECL_TYPE_NAME_CHAR "CHAR" +#define ECL_TYPE_NAME_FLOAT "REAL" +#define ECL_TYPE_NAME_INT "INTE" +#define ECL_TYPE_NAME_DOUBLE "DOUB" +#define ECL_TYPE_NAME_BOOL "LOGI" +#define ECL_TYPE_NAME_MESSAGE "MESS" + +static char * alloc_string_name(const ecl_data_type ecl_type) { + return util_alloc_sprintf( + "C%03d", + ecl_type_get_sizeof_ctype_fortio(ecl_type) + ); +} + +static bool is_ecl_string_name(const char * type_name) { + return (type_name[0] == 'C' && + isdigit(type_name[1]) && + isdigit(type_name[2]) && + isdigit(type_name[3]) + ); +} + +static size_t get_ecl_string_length(const char * type_name) { + if(!is_ecl_string_name(type_name)) + util_abort("%s: Expected eclipse string (CXXX), received %s\n", + __func__, type_name); + + return atoi(type_name+1); +} + +ecl_data_type ecl_type_create(const ecl_type_enum type, const size_t element_size) { + ecl_data_type ecl_type = ( + type == ECL_STRING_TYPE ? + ECL_STRING(element_size) : + ecl_type_create_from_type(type) + ); + + if(ecl_type_get_sizeof_ctype_fortio(ecl_type) != element_size) + util_abort( + "%s: element_size mismatch for type %d, was: %d, expected: %d\n", + __func__, type, + element_size, ecl_type_get_sizeof_ctype_fortio(ecl_type) + ); + + return ecl_type; +} + +ecl_data_type ecl_type_create_from_type(const ecl_type_enum type) { + switch(type) { + case(ECL_CHAR_TYPE): + return ECL_CHAR; + case(ECL_INT_TYPE): + return ECL_INT; + case(ECL_FLOAT_TYPE): + return ECL_FLOAT; + case(ECL_DOUBLE_TYPE): + return ECL_DOUBLE; + case(ECL_BOOL_TYPE): + return ECL_BOOL; + case(ECL_MESS_TYPE): + return ECL_MESS; + case(ECL_STRING_TYPE): + util_abort("%s: Variable length string type cannot be created" + " from type alone!\n" , __func__); + return ECL_STRING(0); /* Dummy */ + default: + util_abort("%s: invalid ecl_type: %d\n", __func__, type); + return ECL_INT; /* Dummy */ + } +} + +ecl_type_enum ecl_type_get_type(const ecl_data_type ecl_type) { + return ecl_type.type; +} + +char * ecl_type_alloc_name(const ecl_data_type ecl_type) { + switch (ecl_type.type) { + case(ECL_CHAR_TYPE): + return util_alloc_string_copy(ECL_TYPE_NAME_CHAR); + case(ECL_STRING_TYPE): + return alloc_string_name(ecl_type); + case(ECL_FLOAT_TYPE): + return util_alloc_string_copy(ECL_TYPE_NAME_FLOAT); + case(ECL_DOUBLE_TYPE): + return util_alloc_string_copy(ECL_TYPE_NAME_DOUBLE); + case(ECL_INT_TYPE): + return util_alloc_string_copy(ECL_TYPE_NAME_INT); + case(ECL_BOOL_TYPE): + return util_alloc_string_copy(ECL_TYPE_NAME_BOOL); + case(ECL_MESS_TYPE): + return util_alloc_string_copy(ECL_TYPE_NAME_MESSAGE); + default: + util_abort("Internal error in %s - internal eclipse_type: %d not recognized - aborting \n",__func__ , ecl_type.type); + return NULL; /* Dummy */ + } +} + +ecl_data_type ecl_type_create_from_name( const char * type_name ) { + if (strncmp( type_name , ECL_TYPE_NAME_FLOAT , ECL_TYPE_LENGTH) == 0) + return ECL_FLOAT; + else if (strncmp( type_name , ECL_TYPE_NAME_INT , ECL_TYPE_LENGTH) == 0) + return ECL_INT; + else if (strncmp( type_name , ECL_TYPE_NAME_DOUBLE , ECL_TYPE_LENGTH) == 0) + return ECL_DOUBLE; + else if (strncmp( type_name , ECL_TYPE_NAME_CHAR , ECL_TYPE_LENGTH) == 0) + return ECL_CHAR; + else if (is_ecl_string_name(type_name)) + return ECL_STRING(get_ecl_string_length(type_name)); + else if (strncmp( type_name , ECL_TYPE_NAME_MESSAGE , ECL_TYPE_LENGTH) == 0) + return ECL_MESS; + else if (strncmp( type_name , ECL_TYPE_NAME_BOOL , ECL_TYPE_LENGTH) == 0) + return ECL_BOOL; + else { + util_abort("%s: unrecognized type name:%s \n",__func__ , type_name); + return ECL_INT; /* Dummy */ + } +} + + +int ecl_type_get_sizeof_ctype_fortio(const ecl_data_type ecl_type) { + if(ecl_type_is_char(ecl_type) || ecl_type_is_string(ecl_type)) + return ecl_type.element_size - 1; + else + return ecl_type_get_sizeof_ctype(ecl_type); +} + +int ecl_type_get_sizeof_ctype(const ecl_data_type ecl_type) { + return ecl_type.element_size; +} + +bool ecl_type_is_numeric(const ecl_data_type ecl_type) { + return (ecl_type_is_int(ecl_type) || + ecl_type_is_float(ecl_type) || + ecl_type_is_double(ecl_type)); +} + +bool ecl_type_is_alpha(const ecl_data_type ecl_type) { + return (ecl_type_is_char(ecl_type) || + ecl_type_is_mess(ecl_type) || + ecl_type_is_string(ecl_type)); +} + +bool ecl_type_is_equal(const ecl_data_type ecl_type1, + const ecl_data_type ecl_type2) { + return (ecl_type1.type == ecl_type2.type && + ecl_type1.element_size == ecl_type2.element_size); +} + +bool ecl_type_is_char(const ecl_data_type ecl_type) { + return (ecl_type.type == ECL_CHAR_TYPE); +} + +bool ecl_type_is_int(const ecl_data_type ecl_type) { + return (ecl_type.type == ECL_INT_TYPE); +} + +bool ecl_type_is_float(const ecl_data_type ecl_type) { + return (ecl_type.type == ECL_FLOAT_TYPE); +} + +bool ecl_type_is_double(const ecl_data_type ecl_type) { + return (ecl_type.type == ECL_DOUBLE_TYPE); +} + +bool ecl_type_is_mess(const ecl_data_type ecl_type) { + return (ecl_type.type == ECL_MESS_TYPE); +} + +bool ecl_type_is_bool(const ecl_data_type ecl_type) { + return (ecl_type.type == ECL_BOOL_TYPE); +} + +bool ecl_type_is_string(const ecl_data_type ecl_type) { + return (ecl_type.type == ECL_STRING_TYPE); +} + +// Temporary fixup for OPM. + char * ecl_type_get_name(const ecl_data_type ecl_type) { + return ecl_type_alloc_name( ecl_type ); + } + diff --git a/ThirdParty/Ert/libecl/src/ecl_type_python.c b/ThirdParty/Ert/libecl/src/ecl_type_python.c new file mode 100644 index 0000000000..8e5f843dd9 --- /dev/null +++ b/ThirdParty/Ert/libecl/src/ecl_type_python.c @@ -0,0 +1,108 @@ +#include +#include +#include + +/** + * + * Functions only to be used by the *PYTHON* prototype for EclDataType + * + */ +ecl_data_type * ecl_type_alloc_copy_python(const ecl_data_type * src_type) { + ecl_data_type * data_type = util_malloc(sizeof * src_type); + memcpy(data_type, src_type, sizeof * data_type); + return data_type; +} + +ecl_data_type * ecl_type_alloc_python(const ecl_type_enum type, const size_t element_size) { + ecl_data_type src_type = ecl_type_create(type, element_size); + return ecl_type_alloc_copy_python(&src_type); +} + +ecl_data_type * ecl_type_alloc_from_type_python(const ecl_type_enum type) { + ecl_data_type src_type = ecl_type_create_from_type(type); + return ecl_type_alloc_copy_python(&src_type); +} + +ecl_data_type * ecl_type_alloc_from_name_python(const char * name) { + ecl_data_type src_type = ecl_type_create_from_name(name); + return ecl_type_alloc_copy_python(&src_type); +} + +void ecl_type_free_python(ecl_data_type * data_type) { + free(data_type); +} + +ecl_type_enum ecl_type_get_type_python(const ecl_data_type * ecl_type) { + return ecl_type_get_type(*ecl_type); +} + +const char * ecl_type_alloc_name_python(const ecl_data_type * ecl_type) { + return ecl_type_alloc_name(*ecl_type); +} + +int ecl_type_get_sizeof_ctype_fortio_python(const ecl_data_type * ecl_type) { + return ecl_type_get_sizeof_ctype_fortio(*ecl_type); +} + +int ecl_type_get_sizeof_ctype_python(const ecl_data_type * ecl_type) { + return ecl_type_get_sizeof_ctype(*ecl_type); +} + +bool ecl_type_is_numeric_python(const ecl_data_type * ecl_type) { + return ecl_type_is_numeric(*ecl_type); +} + +bool ecl_type_is_equal_python(const ecl_data_type * ecl_type1, + const ecl_data_type * ecl_type2) { + return ecl_type_is_equal(*ecl_type1, *ecl_type2); +} + +bool ecl_type_is_char_python(const ecl_data_type * ecl_type) { + return ecl_type_is_char(*ecl_type); +} + +bool ecl_type_is_int_python(const ecl_data_type * ecl_type) { + return ecl_type_is_int(*ecl_type); +} + +bool ecl_type_is_float_python(const ecl_data_type * ecl_type) { + return ecl_type_is_float(*ecl_type); +} + +bool ecl_type_is_double_python(const ecl_data_type * ecl_type) { + return ecl_type_is_double(*ecl_type); +} + +bool ecl_type_is_mess_python(const ecl_data_type * ecl_type) { + return ecl_type_is_mess(*ecl_type); +} + +bool ecl_type_is_bool_python(const ecl_data_type * ecl_type) { + return ecl_type_is_bool(*ecl_type); +} + +bool ecl_type_is_string_python(const ecl_data_type * ecl_type) { + return ecl_type_is_string(*ecl_type); +} + +/** + * + * Functions for the EclKw prototype + * + */ +ecl_kw_type * ecl_kw_fscanf_alloc_grdecl_dynamic_python( FILE * stream , const char * kw , bool strict , const ecl_data_type * data_type) { + return ecl_kw_fscanf_alloc_grdecl_dynamic__( stream , kw , strict, *data_type ); +} + +ecl_kw_type * ecl_kw_alloc_python( const char * header , int size , const ecl_data_type * data_type ) { + return ecl_kw_alloc(header, size, *data_type); +} + +ecl_data_type * ecl_kw_get_data_type_python( const ecl_kw_type * ecl_kw ) { + ecl_data_type data_type = ecl_kw_get_data_type(ecl_kw); + return ecl_type_alloc_copy_python(&data_type); +} + +void ecl_kw_fread_indexed_data_python(fortio_type * fortio, offset_type data_offset, const ecl_data_type * data_type, int element_count, const int_vector_type* index_map, char* buffer) { + return ecl_kw_fread_indexed_data(fortio, data_offset, *data_type, element_count, index_map, buffer); +} diff --git a/ThirdParty/Ert/libecl/src/ecl_util.c b/ThirdParty/Ert/libecl/src/ecl_util.c index 4301580896..6b1dae13f9 100644 --- a/ThirdParty/Ert/libecl/src/ecl_util.c +++ b/ThirdParty/Ert/libecl/src/ecl_util.c @@ -30,20 +30,7 @@ #include #include - - -/*****************************************************************/ -/* The string names for the different ECLIPSE low-level - types. -*/ - - -#define ECL_TYPE_NAME_CHAR "CHAR" -#define ECL_TYPE_NAME_FLOAT "REAL" -#define ECL_TYPE_NAME_INT "INTE" -#define ECL_TYPE_NAME_DOUBLE "DOUB" -#define ECL_TYPE_NAME_BOOL "LOGI" -#define ECL_TYPE_NAME_MESSAGE "MESS" +#include #define ECL_PHASE_NAME_OIL "SOIL" // SHould match the keywords found in restart file @@ -105,104 +92,6 @@ const char * ecl_util_get_phase_name( ecl_phase_enum phase ) { } - - - -const char * ecl_util_get_type_name( ecl_type_enum ecl_type ) { - switch (ecl_type) { - case(ECL_CHAR_TYPE): - return ECL_TYPE_NAME_CHAR ; - break; - case(ECL_FLOAT_TYPE): - return ECL_TYPE_NAME_FLOAT; - break; - case(ECL_DOUBLE_TYPE): - return ECL_TYPE_NAME_DOUBLE; - break; - case(ECL_INT_TYPE): - return ECL_TYPE_NAME_INT; - break; - case(ECL_BOOL_TYPE): - return ECL_TYPE_NAME_BOOL; - break; - case(ECL_MESS_TYPE): - return ECL_TYPE_NAME_MESSAGE; - break; - default: - util_abort("Internal error in %s - internal eclipse_type: %d not recognized - aborting \n",__func__ , ecl_type); - } - return NULL; /* Dummy */ -} - - -ecl_type_enum ecl_util_get_type_from_name( const char * type_name ) { - ecl_type_enum ecl_type; - - if (strncmp( type_name , ECL_TYPE_NAME_FLOAT , ECL_TYPE_LENGTH) == 0) - ecl_type = ECL_FLOAT_TYPE; - else if (strncmp( type_name , ECL_TYPE_NAME_INT , ECL_TYPE_LENGTH) == 0) - ecl_type = ECL_INT_TYPE; - else if (strncmp( type_name , ECL_TYPE_NAME_DOUBLE , ECL_TYPE_LENGTH) == 0) - ecl_type = ECL_DOUBLE_TYPE; - else if (strncmp( type_name , ECL_TYPE_NAME_CHAR , ECL_TYPE_LENGTH) == 0) - ecl_type = ECL_CHAR_TYPE; - else if (strncmp( type_name , ECL_TYPE_NAME_MESSAGE , ECL_TYPE_LENGTH) == 0) - ecl_type = ECL_MESS_TYPE; - else if (strncmp( type_name , ECL_TYPE_NAME_BOOL , ECL_TYPE_LENGTH) == 0) - ecl_type = ECL_BOOL_TYPE; - else { - util_abort("%s: unrecognized type name:%s \n",__func__ , type_name); - ecl_type = -1; /* Dummy */ - } - return ecl_type; -} - - -int ecl_util_get_sizeof_ctype_fortio(ecl_type_enum ecl_type) { - int size = ecl_util_get_sizeof_ctype ( ecl_type ); - if (ecl_type == ECL_CHAR_TYPE) - size = ECL_STRING_LENGTH * sizeof(char); - - return size; -} - -int ecl_util_get_sizeof_ctype(ecl_type_enum ecl_type) { - int sizeof_ctype = -1; - switch (ecl_type) { - case(ECL_CHAR_TYPE): - /* - One element of character data is a string section of 8 - characters + \0. Observe that the return value here - corresponds to the size requirements of ECL_CHAR_TYPE instance - in memory; on disk the trailing \0 is not stored. - */ - sizeof_ctype = (ECL_STRING_LENGTH + 1) * sizeof(char); - break; - case(ECL_FLOAT_TYPE): - sizeof_ctype = sizeof(float); - break; - case(ECL_DOUBLE_TYPE): - sizeof_ctype = sizeof(double); - break; - case(ECL_INT_TYPE): - sizeof_ctype = sizeof(int); - break; - case(ECL_BOOL_TYPE): - sizeof_ctype = sizeof(int); // The ECL_BOOL_TYPE type is internally implemented as an integer - and not a bool. - break; - case(ECL_MESS_TYPE): - sizeof_ctype = sizeof(char); - break; - default: - util_abort("Internal error in %s - internal eclipse_type: %d not recognized - aborting \n",__func__ , ecl_type); - } - return sizeof_ctype; -} - - - - - /*****************************************************************/ @@ -723,7 +612,7 @@ bool ecl_util_fmt_file(const char *filename , bool * __fmt_file) { int report_nr; ecl_file_enum file_type; bool status = true; - bool fmt_file; + bool fmt_file = 0; if (util_file_exists(filename)) { file_type = ecl_util_get_file_type(filename , &fmt_file , &report_nr); @@ -756,17 +645,17 @@ bool ecl_util_fmt_file(const char *filename , bool * __fmt_file) { appropriate numerical conversion is applied. */ -void ecl_util_memcpy_typed_data(void *_target_data , const void * _src_data , ecl_type_enum target_type , ecl_type_enum src_type, int size) { +void ecl_util_memcpy_typed_data(void *_target_data , const void * _src_data , ecl_data_type target_type , ecl_data_type src_type, int size) { int i; - if (target_type == src_type) - memcpy(_target_data , _src_data , size * ecl_util_get_sizeof_ctype(src_type)); + if (ecl_type_is_equal(target_type, src_type)) + memcpy(_target_data , _src_data , size * ecl_type_get_sizeof_ctype(src_type)); else { - switch (target_type) { + switch (ecl_type_get_type(target_type)) { case(ECL_DOUBLE_TYPE): { double * target_data = (double *) _target_data; - switch(src_type) { + switch(ecl_type_get_type(src_type)) { case(ECL_FLOAT_TYPE): util_float_to_double(target_data , (const float *) _src_data , size); break; @@ -782,7 +671,7 @@ void ecl_util_memcpy_typed_data(void *_target_data , const void * _src_data , ec case(ECL_FLOAT_TYPE): { float * target_data = (float *) _target_data; - switch(src_type) { + switch(ecl_type_get_type(src_type)) { case(ECL_FLOAT_TYPE): util_double_to_float(target_data , (const double *) _src_data , size); break; @@ -796,7 +685,7 @@ void ecl_util_memcpy_typed_data(void *_target_data , const void * _src_data , ec break; } default: - util_abort("%s con not convert %d -> %d \n",__func__ , src_type , target_type); + util_abort("%s con not convert %s -> %s \n",__func__ , ecl_type_alloc_name(src_type) , ecl_type_alloc_name(target_type)); } } } @@ -1318,8 +1207,15 @@ static int ecl_util_get_num_slave_cpu__(basic_parser_type* parser, FILE* stream, if (first_item[0] == '/') { break; } - else - ++num_cpu; + else{ + int no_of_tokens = stringlist_get_size(tokens); + int no_of_slaves =0; + if(no_of_tokens == 6 && util_sscanf_int(stringlist_iget(tokens, 4), &no_of_slaves)){ + num_cpu += no_of_slaves; + }else{ + ++num_cpu; + } + } } stringlist_free( tokens ); } @@ -1353,14 +1249,14 @@ int ecl_util_get_num_cpu(const char * data_file) { ert_ecl_unit_enum ecl_util_get_unit_set(const char * data_file) { - ert_ecl_unit_enum units = ERT_ECL_METRIC_UNITS; + ert_ecl_unit_enum units = ECL_METRIC_UNITS; basic_parser_type * parser = basic_parser_alloc(" \t\r\n" , "\"\'" , NULL , NULL , "--" , "\n"); FILE * stream = util_fopen(data_file , "r"); if (basic_parser_fseek_string( parser , stream , "FIELD" , true , true)) { /* Seeks case insensitive. */ - units = ERT_ECL_FIELD_UNITS; + units = ECL_FIELD_UNITS; } else if (basic_parser_fseek_string( parser , stream , "LAB" , true , true)) { /* Seeks case insensitive. */ - units = ERT_ECL_LAB_UNITS; + units = ECL_LAB_UNITS; } basic_parser_free( parser ); diff --git a/ThirdParty/Ert/libecl/src/fault_block_layer.c b/ThirdParty/Ert/libecl/src/fault_block_layer.c index 0c458eb470..87c899f118 100644 --- a/ThirdParty/Ert/libecl/src/fault_block_layer.c +++ b/ThirdParty/Ert/libecl/src/fault_block_layer.c @@ -130,7 +130,7 @@ bool fault_block_layer_scan_kw( fault_block_layer_type * layer , const ecl_kw_ty if (ecl_kw_get_size( fault_block_kw) != ecl_grid_get_global_size(layer->grid)) return false; - else if (ecl_kw_get_type( fault_block_kw ) != ECL_INT_TYPE) + else if (!ecl_type_is_int(ecl_kw_get_data_type( fault_block_kw ))) return false; else { int i,j; @@ -171,7 +171,7 @@ bool fault_block_layer_scan_kw( fault_block_layer_type * layer , const ecl_kw_ty bool fault_block_layer_load_kw( fault_block_layer_type * layer , const ecl_kw_type * fault_block_kw) { if (ecl_kw_get_size( fault_block_kw) != ecl_grid_get_global_size(layer->grid)) return false; - else if (ecl_kw_get_type( fault_block_kw ) != ECL_INT_TYPE) + else if (!ecl_type_is_int(ecl_kw_get_data_type( fault_block_kw ))) return false; else { int i,j; @@ -316,7 +316,7 @@ void fault_block_layer_insert_block_content( fault_block_layer_type * layer , co bool fault_block_layer_export( const fault_block_layer_type * layer , ecl_kw_type * faultblock_kw) { - if ((ecl_kw_get_type( faultblock_kw ) == ECL_INT_TYPE) && (ecl_kw_get_size( faultblock_kw ) == ecl_grid_get_global_size( layer->grid ))) { + if (ecl_type_is_int(ecl_kw_get_data_type( faultblock_kw )) && (ecl_kw_get_size( faultblock_kw ) == ecl_grid_get_global_size( layer->grid ))) { int i,j; for (j=0; j < ecl_grid_get_ny( layer->grid ); j++) { diff --git a/ThirdParty/Ert/libecl/src/smspec_node.c b/ThirdParty/Ert/libecl/src/smspec_node.c index 5ab358d72e..e009a53272 100644 --- a/ThirdParty/Ert/libecl/src/smspec_node.c +++ b/ThirdParty/Ert/libecl/src/smspec_node.c @@ -52,16 +52,19 @@ struct smspec_node_struct { UTIL_TYPE_ID_DECLARATION; - char * gen_key1; /* The main composite key, i.e. WWCT:OP3 for this element. */ - char * gen_key2; /* Some of the ijk based elements will have both a xxx:i,j,k and a xxx:num key. Some of the region_2_region elements will have both a xxx:num and a xxx:r2-r2 key. Mostly NULL. */ - ecl_smspec_var_type var_type; /* The variable type */ char * wgname; /* The value of the WGNAMES vector for this element. */ char * keyword; /* The value of the KEYWORDS vector for this elements. */ char * unit; /* The value of the UNITS vector for this elements. */ int num; /* The value of the NUMS vector for this elements - NB this will have the value SMSPEC_NUMS_INVALID if the smspec file does not have a NUMS vector. */ - int * ijk; /* The ijk coordinates (NB: OFFSET 1) corresponding to the nums value - will be NULL if not relevant. */ char * lgr_name; /* The lgr name of the current variable - will be NULL for non-lgr variables. */ int * lgr_ijk; /* The (i,j,k) coordinate, in the local grid, if this is a LGR variable. WIll be NULL for no-lgr variables. */ + + /*------------------------------------------- All members below this line are *derived* quantities. */ + + char * gen_key1; /* The main composite key, i.e. WWCT:OP3 for this element. */ + char * gen_key2; /* Some of the ijk based elements will have both a xxx:i,j,k and a xxx:num key. Some of the region_2_region elements will have both a xxx:num and a xxx:r2-r2 key. Mostly NULL. */ + ecl_smspec_var_type var_type; /* The variable type */ + int * ijk; /* The ijk coordinates (NB: OFFSET 1) corresponding to the nums value - will be NULL if not relevant. */ bool rate_variable; /* Is this a rate variable (i.e. WOPR) or a state variable (i.e. BPR). Relevant when doing time interpolation. */ bool total_variable; /* Is this a total variable like WOPT? */ bool historical; /* Does the name end with 'H'? */ @@ -70,6 +73,36 @@ struct smspec_node_struct { }; +static bool string_equal(const char * s1 , const char * s2) +{ + if ((s1 == NULL) && (s2 == NULL)) + return true; + else + return util_string_equal( s1 , s2 ); +} + +bool smspec_node_equal( const smspec_node_type * node1, const smspec_node_type * node2) { + if ((node1->params_index == node2->params_index) && + (node1->num == node2->num) && + (node1->var_type == node2->var_type) && + (string_equal( node1->keyword, node2->keyword)) && + (string_equal( node1->wgname, node2->wgname)) && + (string_equal( node1->unit, node2->unit)) && + (string_equal( node1->lgr_name, node2->lgr_name))) + { + if (node1->lgr_ijk) + return ((node1->lgr_ijk[0] == node2->lgr_ijk[0]) && + (node1->lgr_ijk[1] == node2->lgr_ijk[1]) && + (node1->lgr_ijk[2] == node2->lgr_ijk[2])); + + return true; + } + + return false; +} + + + /*****************************************************************/ /* The key formats for the combined keys like e.g. 'WWCT:OP_5' should @@ -308,6 +341,7 @@ static void smspec_node_set_flags( smspec_node_type * smspec_node) { if (smspec_node->var_type == ECL_SMSPEC_WELL_VAR || smspec_node->var_type == ECL_SMSPEC_GROUP_VAR || smspec_node->var_type == ECL_SMSPEC_FIELD_VAR || + smspec_node->var_type == ECL_SMSPEC_REGION_VAR || smspec_node->var_type == ECL_SMSPEC_COMPLETION_VAR ) { const char *total_vars[] = {"OPT" , "GPT" , "WPT" , "GIT", "WIT", "OPTF" , "OPTS" , "OIT" , "OVPT" , "OVIT" , "MWT" , "WVPT" , "WVIT" , "GMT" , "GPTF" , "SGT" , "GST" , "FGT" , "GCT" , "GIMT" , @@ -373,20 +407,12 @@ smspec_node_type * smspec_node_alloc_new(int params_index, float default_value) } -/** - Observe that the wellname can have max 8 characters; anything - beyond that is silently dropped. -*/ - static void smspec_node_set_wgname( smspec_node_type * index , const char * wgname ) { if (wgname == NULL) { util_safe_free( index->wgname ); index->wgname = NULL; } else { - if (strlen(wgname) > 8) - index->wgname = util_realloc_substring_copy(index->wgname , wgname , 8); - else - index->wgname = util_realloc_string_copy(index->wgname , wgname ); + index->wgname = util_realloc_string_copy(index->wgname , wgname ); } } diff --git a/ThirdParty/Ert/libecl/tests/CMakeLists.txt b/ThirdParty/Ert/libecl/tests/CMakeLists.txt index edad35ed31..62aa9a50c2 100644 --- a/ThirdParty/Ert/libecl/tests/CMakeLists.txt +++ b/ThirdParty/Ert/libecl/tests/CMakeLists.txt @@ -1,4 +1,9 @@ if (BUILD_TESTS) + + # Common test binary used in both the Statoil internal tests and the open tests. + add_executable( ecl_grid_cell_contains ecl_grid_cell_contains.c ) + target_link_libraries( ecl_grid_cell_contains ecl ) + include( tests.cmake ) if (STATOIL_TESTDATA_ROOT) include (statoil_tests.cmake) diff --git a/ThirdParty/Ert/libecl/tests/data/num_cpu3 b/ThirdParty/Ert/libecl/tests/data/num_cpu3 index 54ee5d3fa4..d5decfa953 100644 --- a/ThirdParty/Ert/libecl/tests/data/num_cpu3 +++ b/ThirdParty/Ert/libecl/tests/data/num_cpu3 @@ -1,8 +1,9 @@ SLAVES -- slave datafile machine directory -- name root hostname of data file -'RES-R2' 'base' 'rios' '/usr/models/res2' / -'RES-R3' 'base' 'sg-indigo' '/usr/models/res3' / +'RES-R2' 'base' 'rios' '/usr/models/res2' 3 / +'RES-R3' 'base' 'sg-indigo' '/usr/models/res3' A / -- a wrongfully added character in the +-- "slaves token" position doesn't brake parsing -- Testing comments in middle -'RES-R5' 'base' 'sg-indigo' '/usr/models/res5' / - /testRubbish \ No newline at end of file +'RES-R5' 'base' 'sg-indigo' '/usr/models/res5' 10 / + /testRubbish -- this line also counts \ No newline at end of file diff --git a/ThirdParty/Ert/libecl/tests/ecl_alloc_cpgrid.c b/ThirdParty/Ert/libecl/tests/ecl_alloc_cpgrid.c new file mode 100644 index 0000000000..e9417f887b --- /dev/null +++ b/ThirdParty/Ert/libecl/tests/ecl_alloc_cpgrid.c @@ -0,0 +1,112 @@ +/* + Copyright (C) 2017 Statoil ASA, Norway. + + The file 'ecl_alloc_cpgrid.c' is part of ERT - Ensemble based Reservoir Tool. + + ERT 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. + + ERT 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 + for more details. +*/ + +#include +#include +#include + +#include +#include +#include +#include +#include + + +void test_grid(int nx, int ny, int nz) { + ecl_kw_type * coord_kw = ecl_kw_alloc( COORD_KW , ECL_GRID_COORD_SIZE( nx , ny ) , ECL_FLOAT ); + ecl_kw_type * zcorn_kw = ecl_kw_alloc( ZCORN_KW , ECL_GRID_ZCORN_SIZE( nx , ny , nz) , ECL_FLOAT ); + int i,j,k; + double a = 1.0; + for (j= 0; j < ny; j++) { + for (i = 0; i < nx; i++) { + int offset = 6*(i + j*nx); + ecl_kw_iset_float( coord_kw , offset , a*i); + ecl_kw_iset_float( coord_kw , offset + 1, a*j); + ecl_kw_iset_float( coord_kw , offset + 2, -1); + + ecl_kw_iset_float( coord_kw , offset + 3, a*i); + ecl_kw_iset_float( coord_kw , offset + 4, a*j); + ecl_kw_iset_float( coord_kw , offset + 5, -1); + + for (k=0; k < nz; k++) { + for (int c = 0; c < 4; c++) { + int zi1 = ecl_grid_zcorn_index__( nx , ny , i , j , k , c); + int zi2 = ecl_grid_zcorn_index__( nx , ny , i , j , k , c + 4); + + double z1 = k*a; + double z2 = (k + 1) * a; + + ecl_kw_iset_float( zcorn_kw , zi1 , z1 ); + ecl_kw_iset_float( zcorn_kw , zi2 , z2 ); + } + } + } + } + + + { + ecl_grid_type * grid = ecl_grid_alloc_GRDECL_kw( nx,ny,nz, zcorn_kw , coord_kw , NULL, NULL ); + test_assert_int_equal( ecl_grid_get_cell_twist3( grid , 0,0,0) , 0 ); + ecl_grid_free( grid ); + } + + + { + int zi1 = ecl_grid_zcorn_index__( nx , ny , 0 , 0 , 0 , 0); + int zi2 = ecl_grid_zcorn_index__( nx , ny , 0 , 0 , 0 , 4); + + double z1 = 0; + double z2 = -0.25; + + ecl_kw_iset_float( zcorn_kw , zi1 , z1 ); + ecl_kw_iset_float( zcorn_kw , zi2 , z2 ); + + { + ecl_grid_type * grid = ecl_grid_alloc_GRDECL_kw( nx,ny,nz, zcorn_kw , coord_kw , NULL, NULL ); + test_assert_int_equal( ecl_grid_get_cell_twist3( grid , 0,0,0) , 1 ); + ecl_grid_free( grid ); + } + + zi1 = ecl_grid_zcorn_index__( nx , ny , 0 , 0 , 0 , 3); + zi2 = ecl_grid_zcorn_index__( nx , ny , 0 , 0 , 0 , 7); + + ecl_kw_iset_float( zcorn_kw , zi1 , z1 ); + ecl_kw_iset_float( zcorn_kw , zi2 , z2 ); + + { + ecl_grid_type * grid = ecl_grid_alloc_GRDECL_kw( nx,ny,nz, zcorn_kw , coord_kw , NULL, NULL ); + test_assert_int_equal( ecl_grid_get_cell_twist3( grid , 0,0,0) , 2 ); + ecl_grid_free( grid ); + } + } + + + ecl_kw_free( coord_kw ); + ecl_kw_free( zcorn_kw ); +} + + +int main(int argc , char ** argv) { + int nx = 10; + int ny = 7; + int nz = 8; + + test_grid( nx,ny,nz ); + + exit(0); +} diff --git a/ThirdParty/Ert/libecl/tests/ecl_fault_block_layer.c b/ThirdParty/Ert/libecl/tests/ecl_fault_block_layer.c index 08917065df..37e0184688 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_fault_block_layer.c +++ b/ThirdParty/Ert/libecl/tests/ecl_fault_block_layer.c @@ -26,6 +26,7 @@ #include #include #include +#include @@ -62,7 +63,7 @@ void test_create( const ecl_grid_type * grid , ecl_kw_type * fault_block_kw) { void test_create_invalid( const ecl_grid_type * grid ) { - ecl_kw_type * fault_blk_kw = ecl_kw_alloc("FAULTBLK" , ecl_grid_get_global_size( grid ) - 1, ECL_INT_TYPE ); + ecl_kw_type * fault_blk_kw = ecl_kw_alloc("FAULTBLK" , ecl_grid_get_global_size( grid ) - 1, ECL_INT); test_assert_NULL( fault_block_layer_alloc( grid , 7 )); @@ -105,9 +106,9 @@ void test_trace_edge( const ecl_grid_type * grid) { void test_export( const ecl_grid_type * grid) { fault_block_layer_type * layer = fault_block_layer_alloc( grid , 0 ); - ecl_kw_type * ecl_kw1 = ecl_kw_alloc("FAULTBLK" , ecl_grid_get_global_size( grid ) , ECL_INT_TYPE ); - ecl_kw_type * ecl_kw2 = ecl_kw_alloc("FAULTBLK" , ecl_grid_get_global_size( grid ) + 1 , ECL_INT_TYPE ); - ecl_kw_type * ecl_kw3 = ecl_kw_alloc("FAULTBLK" , ecl_grid_get_global_size( grid ) , ECL_FLOAT_TYPE ); + ecl_kw_type * ecl_kw1 = ecl_kw_alloc("FAULTBLK" , ecl_grid_get_global_size( grid ) , ECL_INT); + ecl_kw_type * ecl_kw2 = ecl_kw_alloc("FAULTBLK" , ecl_grid_get_global_size( grid ) + 1 , ECL_INT); + ecl_kw_type * ecl_kw3 = ecl_kw_alloc("FAULTBLK" , ecl_grid_get_global_size( grid ) , ECL_FLOAT); fault_block_type * block = fault_block_layer_add_block( layer , 10 ); fault_block_add_cell( block , 0 , 0 ); @@ -141,7 +142,7 @@ void test_neighbours( const ecl_grid_type * grid) { const int k = 0; fault_block_layer_type * layer = fault_block_layer_alloc( grid , k ); geo_polygon_collection_type * polylines = geo_polygon_collection_alloc(); - ecl_kw_type * ecl_kw = ecl_kw_alloc("FAULTBLK" , ecl_grid_get_global_size( grid ) , ECL_INT_TYPE ); + ecl_kw_type * ecl_kw = ecl_kw_alloc("FAULTBLK" , ecl_grid_get_global_size( grid ) , ECL_INT); ecl_kw_iset_int( ecl_kw , 0 , 1); ecl_kw_iset_int( ecl_kw , ecl_grid_get_global_index3( grid , 3,3,k) , 2); @@ -181,7 +182,7 @@ void test_neighbours( const ecl_grid_type * grid) { int main(int argc , char ** argv) { ecl_grid_type * ecl_grid = ecl_grid_alloc_rectangular( 9 , 9 , 2 , 1 , 1 , 1 , NULL ); - ecl_kw_type * fault_blk_kw = ecl_kw_alloc("FAULTBLK" , ecl_grid_get_global_size( ecl_grid ) , ECL_INT_TYPE ); + ecl_kw_type * fault_blk_kw = ecl_kw_alloc("FAULTBLK" , ecl_grid_get_global_size( ecl_grid ) , ECL_INT); test_create( ecl_grid , fault_blk_kw ); test_create_invalid( ecl_grid ); diff --git a/ThirdParty/Ert/libecl/tests/ecl_fault_block_layer_statoil.c b/ThirdParty/Ert/libecl/tests/ecl_fault_block_layer_statoil.c index c14b094090..9fc2581572 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_fault_block_layer_statoil.c +++ b/ThirdParty/Ert/libecl/tests/ecl_fault_block_layer_statoil.c @@ -74,7 +74,7 @@ int main(int argc , char ** argv) { ecl_kw_type * fault_blk_kw; { FILE * stream = util_fopen( fault_blk_file , "r"); - fault_blk_kw = ecl_kw_fscanf_alloc_grdecl( stream , "FAULTBLK" , ecl_grid_get_global_size( ecl_grid ) , ECL_INT_TYPE); + fault_blk_kw = ecl_kw_fscanf_alloc_grdecl( stream , "FAULTBLK" , ecl_grid_get_global_size( ecl_grid ) , ECL_INT); fclose( stream ); } diff --git a/ThirdParty/Ert/libecl/tests/ecl_file.c b/ThirdParty/Ert/libecl/tests/ecl_file.c index a2001c36fd..fa6d19995d 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_file.c +++ b/ThirdParty/Ert/libecl/tests/ecl_file.c @@ -136,7 +136,7 @@ void test_truncated() { test_work_area_type * work_area = test_work_area_alloc("ecl_file_truncated" ); { ecl_grid_type * grid = ecl_grid_alloc_rectangular(20,20,20,1,1,1,NULL); - ecl_grid_fwrite_EGRID2( grid , "TEST.EGRID", ERT_ECL_METRIC_UNITS ); + ecl_grid_fwrite_EGRID2( grid , "TEST.EGRID", ECL_METRIC_UNITS ); ecl_grid_free( grid ); } { diff --git a/ThirdParty/Ert/libecl/tests/ecl_fortio.c b/ThirdParty/Ert/libecl/tests/ecl_fortio.c index d675c9f2a3..c722d49abd 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_fortio.c +++ b/ThirdParty/Ert/libecl/tests/ecl_fortio.c @@ -19,7 +19,6 @@ #include #include -#include #include #include #include diff --git a/ThirdParty/Ert/libecl/tests/ecl_get_num_cpu_test.c b/ThirdParty/Ert/libecl/tests/ecl_get_num_cpu_test.c index f5458e2de3..e0a94881c7 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_get_num_cpu_test.c +++ b/ThirdParty/Ert/libecl/tests/ecl_get_num_cpu_test.c @@ -28,11 +28,11 @@ int main(int argc , char ** argv) { const char * filename3 = argv[3]; const char * filename4 = argv[4]; - int num_cpu = 4; - test_assert_int_equal(ecl_util_get_num_cpu(filename1), num_cpu); - test_assert_int_equal(ecl_util_get_num_cpu(filename2), num_cpu); - test_assert_int_equal(ecl_util_get_num_cpu(filename3), num_cpu); - test_assert_int_equal(ecl_util_get_num_cpu(filename4), num_cpu); + + test_assert_int_equal(ecl_util_get_num_cpu(filename1), 4); + test_assert_int_equal(ecl_util_get_num_cpu(filename2), 4); + test_assert_int_equal(ecl_util_get_num_cpu(filename3), 15); + test_assert_int_equal(ecl_util_get_num_cpu(filename4), 4); exit(0); } diff --git a/ThirdParty/Ert/libecl/tests/ecl_grid_add_nnc.c b/ThirdParty/Ert/libecl/tests/ecl_grid_add_nnc.c index 25099fb98f..2f7d5cb878 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_grid_add_nnc.c +++ b/ThirdParty/Ert/libecl/tests/ecl_grid_add_nnc.c @@ -62,7 +62,7 @@ void simple_test() { { test_work_area_type * test_area = test_work_area_alloc("ecl_grid_nnc"); ecl_grid_type * grid1; - ecl_grid_fwrite_EGRID2( grid0 , "TEST.EGRID" , ERT_ECL_METRIC_UNITS); + ecl_grid_fwrite_EGRID2( grid0 , "TEST.EGRID" , ECL_METRIC_UNITS); grid1 = ecl_grid_alloc( "TEST.EGRID" ); verify_simple_nnc( grid1 ); @@ -92,7 +92,7 @@ void overwrite_test() { { test_work_area_type * test_area = test_work_area_alloc("ecl_grid_nnc"); ecl_grid_type * grid1; - ecl_grid_fwrite_EGRID2( grid0 , "TEST.EGRID" , ERT_ECL_METRIC_UNITS); + ecl_grid_fwrite_EGRID2( grid0 , "TEST.EGRID" , ECL_METRIC_UNITS); grid1 = ecl_grid_alloc( "TEST.EGRID" ); verify_simple_nnc( grid1 ); @@ -120,7 +120,7 @@ void list_test() { { test_work_area_type * test_area = test_work_area_alloc("ecl_grid_nnc"); ecl_grid_type * grid1; - ecl_grid_fwrite_EGRID2( grid0 , "TEST.EGRID" , ERT_ECL_METRIC_UNITS); + ecl_grid_fwrite_EGRID2( grid0 , "TEST.EGRID" , ECL_METRIC_UNITS); grid1 = ecl_grid_alloc( "TEST.EGRID" ); verify_simple_nnc( grid1 ); diff --git a/ThirdParty/Ert/libecl/tests/ecl_grid_cell_contains.c b/ThirdParty/Ert/libecl/tests/ecl_grid_cell_contains.c index fe9b17a2fe..b2aa88e501 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_grid_cell_contains.c +++ b/ThirdParty/Ert/libecl/tests/ecl_grid_cell_contains.c @@ -1,29 +1,70 @@ /* - Copyright (C) 2014 Statoil ASA, Norway. - + Copyright (C) 2014 Statoil ASA, Norway. + The file 'ecl_grid_cell_contains.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. + + ERT 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. + + ERT 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 + for more details. */ #include #include +#include #include #include +bool get_test_point1(const ecl_grid_type * grid , int global_index, double *_xpos , double *_ypos , double *_zpos) { + const int corners[4] = {1,2,5,6}; + double xpos = 0; + double ypos = 0; + double zpos = 0; + const double min_volume = 1e-8; + + if (fabs(ecl_grid_get_cell_volume1( grid , global_index )) <= min_volume) + return false; + + if (ecl_grid_get_cell_twist1( grid , global_index ) > 0) + return false; + + if (!ecl_grid_cell_regular1( grid , global_index )) + return false; + + + for (int ci = 0; ci < 4; ci++) { + int corner = corners[ci]; + double x,y,z; + ecl_grid_get_cell_corner_xyz1( grid , global_index, corner , &x, &y , &z); + xpos += x; + ypos += y; + zpos += z; + } + + *_xpos = xpos * 0.25; + *_ypos = ypos * 0.25; + *_zpos = zpos * 0.25; + + return ecl_grid_cell_contains_xyz1(grid, global_index, *_xpos, *_ypos, *_zpos); +} + + +bool get_test_point3(const ecl_grid_type * grid , int i , int j ,int k, double *_xpos , double *_ypos , double *_zpos) { + const int global_index = ecl_grid_get_global_index3(grid , i , j , k ); + return get_test_point1( grid , global_index , _xpos , _ypos , _zpos); +} + + void test_grid_covering( const ecl_grid_type * grid) { const int nx = ecl_grid_get_nx( grid ); const int ny = ecl_grid_get_ny( grid ); @@ -44,12 +85,12 @@ void test_grid_covering( const ecl_grid_type * grid) { test_assert_true( p1[ 1 ] == p2[ 1 ] ); test_assert_true( p1[ 2 ] == p2[ 2 ] ); } - - + + for (int l=0; l < 4; l++) { ecl_grid_get_cell_corner_xyz1( grid , g1 , l, &p1[0], &p1[1], &p1[2] ); ecl_grid_get_cell_corner_xyz1( grid , g1 , l + 4 , &p2[0], &p2[1], &p2[2] ); - + test_assert_true( p2[2] >= p1[2] ); } } @@ -59,53 +100,54 @@ void test_grid_covering( const ecl_grid_type * grid) { -void test_contains_count( const ecl_grid_type * grid ) { - int error_count = 0; +void assert_contains( const ecl_grid_type * grid , int i , int j , int k , double x , double y , double z) { + if (!ecl_grid_cell_contains_xyz3( grid , i,j,k , x,y, z )) + fprintf(stderr," Point: (%g,%g,%g) not found in cell: (%d,%d,%d) \n",x,y,z,i,j,k); + + test_assert_true( ecl_grid_cell_contains_xyz3( grid , i,j,k , x,y, z )); +} + + +void test_contains( const ecl_grid_type * grid ) { const int nx = ecl_grid_get_nx( grid ); const int ny = ecl_grid_get_ny( grid ); const int nz = ecl_grid_get_nz( grid ); for (int k=0; k < nz; k++) { - printf("k: %d/%d \n", k , nz - 1); for (int j=0; j < ny; j++) { for (int i=0; i < nx; i++) { - double x,y,z; - ecl_grid_get_xyz3( grid , i,j,k , &x,&y,&z); - { - int i2,j2,k2; - int contains_count = 0; - int kmin = util_int_max( 0 , k - 1 ); - int kmax = util_int_min( nz , k + 1 ); - - int jmin = util_int_max( 0 , j - 1 ); - int jmax = util_int_min( ny , j + 1 ); - - int imin = util_int_max( 0 , i - 1 ); - int imax = util_int_min( nx , i + 1 ); - - - for (k2 = kmin; k2 < kmax; k2++) { - for (j2 = jmin; j2 < jmax; j2++) { - for (i2 = imin; i2 < imax; i2++) { - if (ecl_grid_cell_contains_xyz3( grid , i2,j2,k2 , x,y, z )) { - contains_count++; + if (!ecl_grid_get_cell_twist3( grid , i,j,k) == 0) { + double x,y,z; + if (get_test_point3( grid , i,j,k , &x,&y,&z)) { + assert_contains( grid , i , j , k , x , y , z); + { + int i2,j2,k2; + int kmin = util_int_max( 0 , k - 1 ); + int kmax = util_int_min( nz , k + 1 ); + + int jmin = util_int_max( 0 , j - 1 ); + int jmax = util_int_min( ny , j + 1 ); + + int imin = util_int_max( 0 , i - 1 ); + int imax = util_int_min( nx , i + 1 ); + + + for (k2 = kmin; k2 < kmax; k2++) { + for (j2 = jmin; j2 < jmax; j2++) { + for (i2 = imin; i2 < imax; i2++) { + if ( (i != i2) && (j != j2 ) && (k != k2)) { + if (ecl_grid_get_cell_twist3( grid , i2,j2,k2) == 0) + test_assert_false( ecl_grid_cell_contains_xyz3( grid , i2,j2,k2 , x,y, z ) ); + } + } } } } } - - if (contains_count != 1) { - if (contains_count > 1) - error_count += 1; - else - if (ecl_grid_cell_regular3( grid , i,j,k)) - error_count += 1; - } } } } } - test_assert_int_equal( error_count , 0 ); } @@ -115,91 +157,30 @@ void test_find( ecl_grid_type * grid ) { int find_count = 100; int delta = util_int_max(1 , ecl_grid_get_global_size( grid ) / find_count); for (init_index = 0; init_index < ecl_grid_get_global_size( grid ); init_index += delta) { - printf("find index:%d \n",init_index / delta); - if (!ecl_grid_cell_invalid1(grid , init_index) && ecl_grid_cell_regular1( grid , init_index) ) { + if (ecl_grid_get_cell_twist1( grid , init_index ) == 0) { double x,y,z; int find_index; int start_index = 0; - - ecl_grid_get_xyz1( grid , init_index , &x,&y,&z); - find_index = ecl_grid_get_global_index_from_xyz(grid , x, y , z , start_index ); - test_assert_int_equal(init_index , find_index ); + + if (get_test_point1( grid , init_index , &x,&y,&z)) { + find_index = ecl_grid_get_global_index_from_xyz(grid , x, y , z , start_index ); + if (init_index != find_index) { + int i1,j1,k1,i2,j2,k2; + + ecl_grid_get_ijk1( grid , init_index , &i1,&j1,&k1); + ecl_grid_get_ijk1( grid , find_index , &i2,&j2,&k2); + printf(" point: %14.7f %14.7f %14.7f \n",x,y,z); + printf(" Regular: %d / %d \n",ecl_grid_cell_regular3(grid , i1,j1,k1) , ecl_grid_cell_regular3(grid , i2,j2,k2)); + printf(" init: contains(%7d) : %d (%d,%d,%d) V:%g \n",init_index , ecl_grid_cell_contains_xyz1( grid , init_index ,x , y , z), i1+1,j1+1,k1+1, ecl_grid_get_cell_volume1( grid , init_index)); + printf("ERROR: find: contains(%7d) : %d (%d,%d,%d) V:%g \n\n",find_index , ecl_grid_cell_contains_xyz1( grid , find_index ,x , y , z), i2+1,j2+1,k2+1,ecl_grid_get_cell_volume1( grid , find_index)); + test_assert_int_equal(init_index , find_index ); + } + } } } } -// /* -// Will indeed answer yes when asked if it contains it's own center. -// */ -// test_assert_true( ecl_grid_cell_contains_xyz1( grid , init_index , x,y,z) ); -// -// if (1) -// { -// int start_index = 0; -// -// if (find_index != init_index) { -// int init_ijk[3]; -// int find_ijk[3]; -// -// ecl_grid_get_ijk1( grid , find_index , &find_ijk[0] , &find_ijk[1] , &find_ijk[2]); -// ecl_grid_get_ijk1( grid , init_index , &init_ijk[0] , &init_ijk[1] , &init_ijk[2]); -// -// printf("ijk: %d:(%2d,%2d,%2d) -> %d:(%2d,%2d,%2d) \n",init_index , init_ijk[0] , init_ijk[1] , init_ijk[2] , find_index , find_ijk[0] , find_ijk[1], find_ijk[2]); -// global_error += 1; -// } -// -// if (0) { -// //if (find_index != init_index) { -// int init_ijk[3]; -// int find_ijk[3]; -// -// ecl_grid_get_ijk1( grid , find_index , &find_ijk[0] , &find_ijk[1] , &find_ijk[2]); -// ecl_grid_get_ijk1( grid , init_index , &init_ijk[0] , &init_ijk[1] , &init_ijk[2]); -// -// { -// printf("ijk: (%2d,%2d,%2d) -> (%2d,%2d,%2d) \n",init_ijk[0] , init_ijk[1] , init_ijk[2] , find_ijk[0] , find_ijk[1], find_ijk[2]); -// -// if (0) { -// printf(" ecl_grid_cell_contains_xyz3(%d,%d,%d) : %d Volume:%g \n",init_ijk[0] , init_ijk[1], init_ijk[2] , -// ecl_grid_cell_contains_xyz3( grid , init_ijk[0] , init_ijk[1], init_ijk[2] , x , y , z ), -// ecl_grid_get_cell_volume1( grid , init_index)); -// -// printf(" ecl_grid_cell_contains_xyz3(%d,%d,%d) : %d Volume:%g \n",find_ijk[0] , find_ijk[1], find_ijk[2] , -// ecl_grid_cell_contains_xyz3( grid , find_ijk[0] , find_ijk[1], find_ijk[2] , x , y , z ), -// ecl_grid_get_cell_volume1( grid , find_index)); -// } -// -// { -// int find_index2 = ecl_grid_get_global_index_from_xyz(grid , x, y , z , init_index ); -// printf("find_index2:%d \n",find_index2); -// } -// -// printf("init_index:%d find_index:%d \n",init_index , find_index); -// if (find_index >= 0) -// printf("Vrengte: %d\n",ecl_grid_cell_inside_out1( grid , find_index)); -// printf("Vrengte: %d\n",ecl_grid_cell_inside_out1( grid , init_index)); -// -// { -// bool init_cell_inside_out = ecl_grid_cell_inside_out1( grid , init_index); -// bool find_cell_inside_out = false; -// -// if (find_index >= 0) -// find_cell_inside_out = ecl_grid_cell_inside_out1( grid , find_index ); -// else -// test_assert_int_not_equal( -1 , find_index ); -// -// if (find_cell_inside_out == init_cell_inside_out) { -// if (init_cell_inside_out == false) -// test_assert_int_equal( init_index , find_index ); -// } -// } -// } -// } -// } -// } -// } -//} void test_corners() { @@ -225,7 +206,7 @@ void test_corners() { ecl_grid_get_cell_corner_xyz3( grid , 0, 0, 0 , i , &x , &y , &z); test_assert_int_not_equal( 0 , ecl_grid_get_global_index_from_xyz( grid , x,y,z,0)); } - + // Corner 1 ecl_grid_get_cell_corner_xyz3(grid , 2,0,0,1 , &x,&y,&z); test_assert_int_equal( ecl_grid_get_global_index3( grid , 2,0,0 ) , ecl_grid_get_global_index_from_xyz( grid , x,y,z,0)); @@ -254,7 +235,7 @@ void test_corners() { ecl_grid_get_cell_corner_xyz3(grid , 2,2,2,7 , &x,&y,&z); test_assert_int_equal( ecl_grid_get_global_index3( grid , 2,2,2 ) , ecl_grid_get_global_index_from_xyz( grid , x,y,z,0)); } - + ecl_grid_free( grid ); } @@ -265,19 +246,17 @@ void test_corners() { int main(int argc , char ** argv) { ecl_grid_type * grid; - int case_nr; util_install_signals(); - util_sscanf_int( argv[1] , &case_nr ); - if (argc == 2) { + if (argc == 1) { grid = ecl_grid_alloc_rectangular(6,6,6,1,2,3,NULL); } else - grid = ecl_grid_alloc( argv[2] ); - + grid = ecl_grid_alloc( argv[1] ); + test_grid_covering( grid ); - test_contains_count( grid ); - + test_contains( grid ); + test_find(grid); test_corners(); diff --git a/ThirdParty/Ert/libecl/tests/ecl_grid_cell_contains_wellpath.c b/ThirdParty/Ert/libecl/tests/ecl_grid_cell_contains_wellpath.c new file mode 100644 index 0000000000..0afc83b1c1 --- /dev/null +++ b/ThirdParty/Ert/libecl/tests/ecl_grid_cell_contains_wellpath.c @@ -0,0 +1,101 @@ +/* + Copyright (C) 2017 Statoil ASA, Norway. + + The file 'ecl_grid_cell_contains_wellpath.c' is part of ERT - + Ensemble based Reservoir Tool. + + ERT 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. + + ERT 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 + for more details. +*/ + +#include +#include +#include + +#include +#include +#include + + +typedef struct { + double x; + double y; + double z; + + int g; + int i; + int j; + int k; + + bool skip; +} point_type; + + + +vector_type * load_expected( const ecl_grid_type * grid, const char * filename ) { + FILE * stream = util_fopen( filename , "r"); + vector_type * expected = vector_alloc_new(); + + while (true) { + double x,y,z; + int i,j,k,skip; + + if (fscanf( stream , "%lg %lg %lg %d %d %d %d" , &x,&y,&z,&i,&j,&k,&skip) == 7) { + point_type * p = util_malloc( sizeof * p ); + p->x = x; + p->y = y; + p->z = z; + + p->i = i-1; + p->j = j-1; + p->k = k-1; + p->skip = skip; + p->g = ecl_grid_get_global_index3(grid, p->i, p->j, p->k); + vector_append_owned_ref( expected, p , free ); + } else + break; + } + + fclose( stream ); + test_assert_int_equal( 10 , vector_get_size( expected )); + return expected; +} + + + +int main(int argc , char ** argv) { + util_install_signals(); + { + ecl_grid_type * grid = ecl_grid_alloc( argv[1] ); + vector_type * expected = load_expected( grid, argv[2] ); + + for (int c=0; c < vector_get_size( expected ); c++) { + const point_type * p = vector_iget_const( expected , c ); + int g = ecl_grid_get_global_index_from_xyz(grid , p->x, p->y , p->z , 0 ); + if (g != ecl_grid_get_global_index3(grid, p->i,p->j, p->k)) { + int i,j,k; + ecl_grid_get_ijk1(grid, g, &i, &j, &k); + fprintf(stderr,"point:%d (%g,%g,%g), Simulated: %d:(%d,%d,%d) Expected: %d:(%d,%d,%d) contains:%d\n", + c , p->x, p->y, p->z, g, i,j,k, p->g, p->i, p->j, p->k, ecl_grid_cell_contains_xyz1( grid, p->g , p->x , p->y, p->z)); + } + if (!p->skip) + test_assert_int_equal( g , ecl_grid_get_global_index3(grid, p->i,p->j, p->k)); + else { + if ( g != ecl_grid_get_global_index3(grid, p->i,p->j, p->k)) + fprintf(stderr," ** Skipping failed test for point:%d \n",c); + } + } + ecl_grid_free( grid ); + vector_free( expected ); + } + exit(0); +} diff --git a/ThirdParty/Ert/libecl/tests/ecl_grid_corner.c b/ThirdParty/Ert/libecl/tests/ecl_grid_corner.c index eb98690b22..b4adf52270 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_grid_corner.c +++ b/ThirdParty/Ert/libecl/tests/ecl_grid_corner.c @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/ThirdParty/Ert/libecl/tests/ecl_grid_fwrite.c b/ThirdParty/Ert/libecl/tests/ecl_grid_fwrite.c index 42cac7ba07..a323591116 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_grid_fwrite.c +++ b/ThirdParty/Ert/libecl/tests/ecl_grid_fwrite.c @@ -28,7 +28,7 @@ void test_fwrite_EGRID(ecl_grid_type * grid ) { test_work_area_type * work_area = test_work_area_alloc("grid-has-mapaxes"); - ecl_grid_fwrite_EGRID2( grid , "TEST.EGRID", ERT_ECL_METRIC_UNITS); + ecl_grid_fwrite_EGRID2( grid , "TEST.EGRID", ECL_METRIC_UNITS); { ecl_grid_type * copy = ecl_grid_alloc( "TEST.EGRID" ); test_assert_true( ecl_grid_compare( grid , copy , false , false , true )); diff --git a/ThirdParty/Ert/libecl/tests/ecl_grid_init_fwrite.c b/ThirdParty/Ert/libecl/tests/ecl_grid_init_fwrite.c index 81ff681cfa..cc0141b9ad 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_grid_init_fwrite.c +++ b/ThirdParty/Ert/libecl/tests/ecl_grid_init_fwrite.c @@ -34,7 +34,7 @@ void test_write_depth(const ecl_grid_type * grid) { test_work_area_type * test_area = test_work_area_alloc("write_depth"); { fortio_type * init_file = fortio_open_writer( "INIT" , false , ECL_ENDIAN_FLIP ); - ecl_grid_fwrite_depth( grid , init_file , ERT_ECL_METRIC_UNITS); + ecl_grid_fwrite_depth( grid , init_file , ECL_METRIC_UNITS); fortio_fclose( init_file ); } { @@ -55,7 +55,7 @@ void test_write_dims(const ecl_grid_type * grid) { test_work_area_type * test_area = test_work_area_alloc("write_dims"); { fortio_type * init_file = fortio_open_writer( "INIT" , false , ECL_ENDIAN_FLIP ); - ecl_grid_fwrite_dims( grid , init_file , ERT_ECL_METRIC_UNITS ); + ecl_grid_fwrite_dims( grid , init_file , ECL_METRIC_UNITS ); fortio_fclose( init_file ); } { diff --git a/ThirdParty/Ert/libecl/tests/ecl_grid_volume.c b/ThirdParty/Ert/libecl/tests/ecl_grid_volume.c index 58daf928e4..2ef4335333 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_grid_volume.c +++ b/ThirdParty/Ert/libecl/tests/ecl_grid_volume.c @@ -68,7 +68,7 @@ int main(int argc , char ** argv) { total_volume += grid_volume; total_diff += fabs( eclipse_volume - grid_volume ); - if (!util_double_approx_equal__( grid_volume , eclipse_volume , 2.5e-3)) { + if (!util_double_approx_equal__( grid_volume , eclipse_volume , 2.5e-3, 0.00)) { double diff = 100 * (grid_volume - eclipse_volume) / eclipse_volume; printf("Error in cell: %d V1: %g V2: %g diff:%g %% \n", iglobal , grid_volume , eclipse_volume , diff); error_count++; diff --git a/ThirdParty/Ert/libecl/tests/ecl_init_file.c b/ThirdParty/Ert/libecl/tests/ecl_init_file.c index f5395160f2..0e3d3978d8 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_init_file.c +++ b/ThirdParty/Ert/libecl/tests/ecl_init_file.c @@ -28,6 +28,7 @@ #include #include #include +#include void test_write_header() { @@ -48,9 +49,9 @@ void test_write_header() { // Write poro with global size. { fortio_type * f = fortio_open_writer( "FOO1.INIT" , false , ECL_ENDIAN_FLIP ); - ecl_kw_type * poro = ecl_kw_alloc( "PORO" , ecl_grid_get_global_size( ecl_grid ) , ECL_FLOAT_TYPE ); + ecl_kw_type * poro = ecl_kw_alloc( "PORO" , ecl_grid_get_global_size( ecl_grid ) , ECL_FLOAT); ecl_kw_scalar_set_float( poro , 0.10 ); - ecl_init_file_fwrite_header( f , ecl_grid , poro , 7 , start_time ); + ecl_init_file_fwrite_header( f , ecl_grid , poro , ECL_FIELD_UNITS, 7 , start_time ); ecl_kw_free( poro ); fortio_fclose( f ); } @@ -59,9 +60,9 @@ void test_write_header() { // Write poro with nactive size. { fortio_type * f = fortio_open_writer( "FOO2.INIT" , false , ECL_ENDIAN_FLIP ); - ecl_kw_type * poro = ecl_kw_alloc( "PORO" , ecl_grid_get_global_size( ecl_grid ) , ECL_FLOAT_TYPE ); + ecl_kw_type * poro = ecl_kw_alloc( "PORO" , ecl_grid_get_global_size( ecl_grid ) , ECL_FLOAT); ecl_kw_scalar_set_float( poro , 0.10 ); - ecl_init_file_fwrite_header( f , ecl_grid , poro , 7 , start_time ); + ecl_init_file_fwrite_header( f , ecl_grid , poro , ECL_FIELD_UNITS, 7 , start_time ); ecl_kw_free( poro ); fortio_fclose( f ); } @@ -80,7 +81,7 @@ void test_write_header() { // Poro == NULL { fortio_type * f = fortio_open_writer( "FOO3.INIT" , false , ECL_ENDIAN_FLIP ); - ecl_init_file_fwrite_header( f , ecl_grid , NULL , 7 , start_time ); + ecl_init_file_fwrite_header( f , ecl_grid , NULL , ECL_METRIC_UNITS, 7 , start_time ); fortio_fclose( f ); } test_work_area_free( test_area ); diff --git a/ThirdParty/Ert/libecl/tests/ecl_kw_cmp_string.c b/ThirdParty/Ert/libecl/tests/ecl_kw_cmp_string.c index 934a931654..c12009dbc5 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_kw_cmp_string.c +++ b/ThirdParty/Ert/libecl/tests/ecl_kw_cmp_string.c @@ -21,11 +21,12 @@ #include #include +#include void test_cmp_string() { - ecl_kw_type * ecl_kw = ecl_kw_alloc( "HEADER" , 1 , ECL_CHAR_TYPE ); + ecl_kw_type * ecl_kw = ecl_kw_alloc( "HEADER" , 1 , ECL_CHAR); ecl_kw_iset_string8( ecl_kw , 0 , "ABCD"); diff --git a/ThirdParty/Ert/libecl/tests/ecl_kw_equal.c b/ThirdParty/Ert/libecl/tests/ecl_kw_equal.c index 4ec147e84e..3e00c26c3e 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_kw_equal.c +++ b/ThirdParty/Ert/libecl/tests/ecl_kw_equal.c @@ -21,10 +21,11 @@ #include #include #include +#include int main(int argc , char ** argv) { - ecl_kw_type * ecl_kw1 = ecl_kw_alloc( "KW" , 10 , ECL_INT_TYPE ); + ecl_kw_type * ecl_kw1 = ecl_kw_alloc( "KW" , 10 , ECL_INT ); int data[10]; int i; for (i=0; i < 10; i++) { @@ -49,8 +50,8 @@ int main(int argc , char ** argv) { } { - ecl_kw_type * ecl_ikw = ecl_kw_alloc_new_shared( "KW" , 10 , ECL_INT_TYPE , data); - ecl_kw_type * ecl_fkw = ecl_kw_alloc_new_shared( "KW" , 10 , ECL_FLOAT_TYPE , data); + ecl_kw_type * ecl_ikw = ecl_kw_alloc_new_shared( "KW" , 10 , ECL_INT , data); + ecl_kw_type * ecl_fkw = ecl_kw_alloc_new_shared( "KW" , 10 , ECL_FLOAT , data); test_assert_true( ecl_kw_content_equal( ecl_kw1 , ecl_ikw )); test_assert_false( ecl_kw_content_equal( ecl_kw1 , ecl_fkw )); diff --git a/ThirdParty/Ert/libecl/tests/ecl_kw_fread.c b/ThirdParty/Ert/libecl/tests/ecl_kw_fread.c index 69871c8562..be6fd6569b 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_kw_fread.c +++ b/ThirdParty/Ert/libecl/tests/ecl_kw_fread.c @@ -44,7 +44,7 @@ void test_truncated(const char * filename , offset_type truncate_size) { void test_fread_alloc() { test_work_area_type * work_area = test_work_area_alloc("ecl_kw_fread" ); { - ecl_kw_type * kw1 = ecl_kw_alloc( "INT" , 100 , ECL_INT_TYPE ); + ecl_kw_type * kw1 = ecl_kw_alloc( "INT" , 100 , ECL_INT ); int i; for (i=0; i < 100; i++) ecl_kw_iset_int( kw1 , i , i ); diff --git a/ThirdParty/Ert/libecl/tests/ecl_kw_grdecl.c b/ThirdParty/Ert/libecl/tests/ecl_kw_grdecl.c index 6dafd0a90d..bf3a3185b2 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_kw_grdecl.c +++ b/ThirdParty/Ert/libecl/tests/ecl_kw_grdecl.c @@ -26,7 +26,7 @@ int main(int argc , char ** argv) { int i; - ecl_kw_type * ecl_kw = ecl_kw_alloc("HEAD" , 10 , ECL_INT_TYPE); + ecl_kw_type * ecl_kw = ecl_kw_alloc("HEAD" , 10 , ECL_INT); for (i=0; i < 10; i++) ecl_kw_iset_int(ecl_kw , i , i ); @@ -40,7 +40,7 @@ int main(int argc , char ** argv) { stream = util_fopen( "FILE.grdecl" , "r"); { - ecl_kw_type * ecl_kw2 = ecl_kw_fscanf_alloc_grdecl( stream , "HEAD" , 10 , ECL_INT_TYPE); + ecl_kw_type * ecl_kw2 = ecl_kw_fscanf_alloc_grdecl( stream , "HEAD" , 10 , ECL_INT); test_assert_not_NULL( ecl_kw2 ); test_assert_true( ecl_kw_equal( ecl_kw , ecl_kw2)); @@ -54,10 +54,10 @@ int main(int argc , char ** argv) { stream = util_fopen( "FILE.grdecl" , "r"); { - ecl_kw_type * ecl_kw2 = ecl_kw_fscanf_alloc_grdecl( stream , "HEAD" , 10 , ECL_INT_TYPE); + ecl_kw_type * ecl_kw2 = ecl_kw_fscanf_alloc_grdecl( stream , "HEAD" , 10 , ECL_INT); test_assert_NULL( ecl_kw2 ); - ecl_kw2 = ecl_kw_fscanf_alloc_grdecl( stream , "HEAD1234" , 10 , ECL_INT_TYPE); + ecl_kw2 = ecl_kw_fscanf_alloc_grdecl( stream , "HEAD1234" , 10 , ECL_INT); test_assert_not_NULL( ecl_kw2 ); test_assert_string_equal( ecl_kw_get_header( ecl_kw2 ) , "HEAD1234" ); diff --git a/ThirdParty/Ert/libecl/tests/ecl_kw_init.c b/ThirdParty/Ert/libecl/tests/ecl_kw_init.c index 79da2ef774..9a95fdfe7e 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_kw_init.c +++ b/ThirdParty/Ert/libecl/tests/ecl_kw_init.c @@ -27,7 +27,7 @@ void test_int() { size_t N = 1000; int i; - ecl_kw_type * kw = ecl_kw_alloc("KW" , N , ECL_INT_TYPE); + ecl_kw_type * kw = ecl_kw_alloc("KW" , N , ECL_INT); for (i=0; i < N; i++) test_assert_int_equal( 0 , ecl_kw_iget_int( kw , i )); @@ -38,7 +38,7 @@ void test_int() { void test_double() { size_t N = 1000; double i; - ecl_kw_type * kw = ecl_kw_alloc("KW" , N , ECL_DOUBLE_TYPE); + ecl_kw_type * kw = ecl_kw_alloc("KW" , N , ECL_DOUBLE); for (i=0; i < N; i++) test_assert_double_equal( 0 , ecl_kw_iget_double( kw , i )); @@ -49,7 +49,7 @@ void test_double() { void test_float() { size_t N = 1000; int i; - ecl_kw_type * kw = ecl_kw_alloc("KW" , N , ECL_FLOAT_TYPE); + ecl_kw_type * kw = ecl_kw_alloc("KW" , N , ECL_FLOAT); for (i=0; i < N; i++) test_assert_int_equal( 0 , ecl_kw_iget_float( kw , i )); diff --git a/ThirdParty/Ert/libecl/tests/ecl_layer.c b/ThirdParty/Ert/libecl/tests/ecl_layer.c index 891cefff07..e6420cecc4 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_layer.c +++ b/ThirdParty/Ert/libecl/tests/ecl_layer.c @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/ThirdParty/Ert/libecl/tests/ecl_layer_statoil.c b/ThirdParty/Ert/libecl/tests/ecl_layer_statoil.c index 9969aab104..df41e92c53 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_layer_statoil.c +++ b/ThirdParty/Ert/libecl/tests/ecl_layer_statoil.c @@ -28,7 +28,7 @@ ecl_kw_type * alloc_faultblock_kw( const char * filename, int grid_size) { FILE * stream = util_fopen( filename , "r"); - ecl_kw_type * kw = ecl_kw_fscanf_alloc_grdecl( stream , "FAULTBLK" , grid_size , ECL_INT_TYPE ); + ecl_kw_type * kw = ecl_kw_fscanf_alloc_grdecl( stream , "FAULTBLK" , grid_size , ECL_INT ); fclose( stream ); return kw; diff --git a/ThirdParty/Ert/libecl/tests/ecl_lfs.c b/ThirdParty/Ert/libecl/tests/ecl_lfs.c index 871b7bfa0a..d89181e6fe 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_lfs.c +++ b/ThirdParty/Ert/libecl/tests/ecl_lfs.c @@ -23,6 +23,7 @@ #include #include #include +#include @@ -30,7 +31,7 @@ int main( int argc , char ** argv) { int num_kw = 1000; // Total file size should roughly exceed 2GB int kw_size = 600000; - ecl_kw_type * kw = ecl_kw_alloc("KW" , kw_size , ECL_INT_TYPE ); + ecl_kw_type * kw = ecl_kw_alloc("KW" , kw_size , ECL_INT ); rng_type * rng = rng_alloc( MZRAN , INIT_DEFAULT ); int i; offset_type file_size; diff --git a/ThirdParty/Ert/libecl/tests/ecl_nnc_export.c b/ThirdParty/Ert/libecl/tests/ecl_nnc_export.c index 33845e49a3..527530435a 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_nnc_export.c +++ b/ThirdParty/Ert/libecl/tests/ecl_nnc_export.c @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -231,6 +232,20 @@ void test_export(const char * name, bool have_tran_data) { for (int i =0; i < ecl_nnc_export_get_size( grid ); i++) test_assert_true( ecl_nnc_equal( &nnc_data1[i] , &nnc_data2[i] )); + { + ecl_nnc_geometry_type * nnc_geo = ecl_nnc_geometry_alloc( grid ); + test_assert_int_equal( ecl_nnc_export_get_size( grid ), ecl_nnc_geometry_size( nnc_geo )); + for (int i=0; i < ecl_nnc_geometry_size( nnc_geo ); i++) { + const ecl_nnc_pair_type *nnc_pair = ecl_nnc_geometry_iget( nnc_geo , i ); + ecl_nnc_type * nnc1 = &nnc_data1[i]; + + test_assert_int_equal( nnc_pair->grid_nr1 , nnc1->grid_nr1 ); + test_assert_int_equal( nnc_pair->grid_nr2 , nnc1->grid_nr2 ); + test_assert_int_equal( nnc_pair->global_index1 , nnc1->global_index1 ); + test_assert_int_equal( nnc_pair->global_index2 , nnc1->global_index2 ); + } + ecl_nnc_geometry_free( nnc_geo ); + } free( nnc_data2 ); free( nnc_data1 ); diff --git a/ThirdParty/Ert/libecl/tests/ecl_nnc_geometry.c b/ThirdParty/Ert/libecl/tests/ecl_nnc_geometry.c new file mode 100644 index 0000000000..276a7a30c1 --- /dev/null +++ b/ThirdParty/Ert/libecl/tests/ecl_nnc_geometry.c @@ -0,0 +1,60 @@ +/* + Copyright (C) 2017 Statoil ASA, Norway. + + The file 'ecl_nnc_geometry.c' is part of ERT - Ensemble based Reservoir Tool. + + ERT 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. + + ERT 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 + for more details. +*/ +#include +#include + +#include +#include +#include +#include +#include +#include + + +void test_create_empty() { + ecl_grid_type * grid = ecl_grid_alloc_rectangular(10,10,10,1,1,1,NULL); + ecl_nnc_geometry_type * nnc_geo = ecl_nnc_geometry_alloc( grid ); + test_assert_true( ecl_nnc_geometry_is_instance( nnc_geo )); + test_assert_int_equal( ecl_nnc_geometry_size( nnc_geo ) , 0 ); + ecl_nnc_geometry_free( nnc_geo ); + ecl_grid_free( grid ); +} + +void test_create_simple() { + int nx = 10; + int ny = 10; + int nz = 10; + ecl_grid_type * grid0 = ecl_grid_alloc_rectangular(nx,ny,nz,1,1,1,NULL); + + ecl_grid_add_self_nnc(grid0, 0 ,nx*ny + 0, 0 ); + ecl_grid_add_self_nnc(grid0, 1 ,nx*ny + 1, 1 ); + ecl_grid_add_self_nnc(grid0, 2 ,nx*ny + 2, 2 ); + { + ecl_nnc_geometry_type * nnc_geo = ecl_nnc_geometry_alloc( grid0 ); + test_assert_int_equal( ecl_nnc_geometry_size( nnc_geo ) , 3 ); + ecl_nnc_geometry_free( nnc_geo ); + } + ecl_grid_free( grid0 ); +} + + +int main(int argc , char ** argv) { + util_install_signals( ); + test_create_empty( ); + test_create_simple( ); +} diff --git a/ThirdParty/Ert/libecl/tests/ecl_rft.c b/ThirdParty/Ert/libecl/tests/ecl_rft.c index 4ae87f99cd..1cacb41ef1 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_rft.c +++ b/ThirdParty/Ert/libecl/tests/ecl_rft.c @@ -42,7 +42,7 @@ void test_rft_read_write(const char * rft_file){ nodes[2]=new_node; test_work_area_type * work_area = test_work_area_alloc("RFT_RW"); - ecl_rft_file_update("eclipse.rft", nodes,3, ERT_ECL_METRIC_UNITS); + ecl_rft_file_update("eclipse.rft", nodes,3, ECL_METRIC_UNITS); test_work_area_free(work_area); free(nodes); } diff --git a/ThirdParty/Ert/libecl/tests/ecl_rst_file.c b/ThirdParty/Ert/libecl/tests/ecl_rst_file.c index 5be806b92b..7d9c149180 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_rst_file.c +++ b/ThirdParty/Ert/libecl/tests/ecl_rst_file.c @@ -25,18 +25,19 @@ #include #include #include +#include -void write_keyword( fortio_type * fortio , const char * kw, ecl_type_enum ecl_type ) { - ecl_kw_type * ecl_kw = ecl_kw_alloc( kw , 1000 , ecl_type ); +void write_keyword( fortio_type * fortio , const char * kw, ecl_data_type data_type ) { + ecl_kw_type * ecl_kw = ecl_kw_alloc( kw , 1000 , data_type ); ecl_kw_fwrite( ecl_kw , fortio ); ecl_kw_free( ecl_kw ); } void write_seqnum( fortio_type * fortio , int report_step ) { - ecl_kw_type * ecl_kw = ecl_kw_alloc( SEQNUM_KW , 1 , ECL_INT_TYPE ); + ecl_kw_type * ecl_kw = ecl_kw_alloc( SEQNUM_KW , 1 , ECL_INT); ecl_kw_iset_int( ecl_kw , 0 , report_step ); ecl_kw_fwrite( ecl_kw , fortio ); ecl_kw_free( ecl_kw ); @@ -68,13 +69,13 @@ void test_Xfile() { { fortio_type * f = fortio_open_writer( "TEST.X0010" , false , ECL_ENDIAN_FLIP); - write_keyword( f , "INTEHEAD" , ECL_INT_TYPE ); - write_keyword( f , "PRESSURE" , ECL_FLOAT_TYPE ); - write_keyword( f , "SWAT" , ECL_FLOAT_TYPE ); + write_keyword( f , "INTEHEAD" , ECL_INT); + write_keyword( f , "PRESSURE" , ECL_FLOAT); + write_keyword( f , "SWAT" , ECL_FLOAT); - write_keyword( f , "INTEHEAD" , ECL_INT_TYPE ); - write_keyword( f , "PRESSURE" , ECL_FLOAT_TYPE ); - write_keyword( f , "SWAT" , ECL_FLOAT_TYPE ); + write_keyword( f , "INTEHEAD" , ECL_INT); + write_keyword( f , "PRESSURE" , ECL_FLOAT); + write_keyword( f , "SWAT" , ECL_FLOAT); fortio_fclose( f ); } @@ -92,21 +93,21 @@ void test_UNRST0() { { fortio_type * f = fortio_open_writer( "TEST.UNRST" , false , ECL_ENDIAN_FLIP); write_seqnum( f , 0 ); - write_keyword( f , "INTEHEAD" , ECL_INT_TYPE ); - write_keyword( f , "PRESSURE" , ECL_FLOAT_TYPE ); - write_keyword( f , "SWAT" , ECL_FLOAT_TYPE ); + write_keyword( f , "INTEHEAD" , ECL_INT); + write_keyword( f , "PRESSURE" , ECL_FLOAT); + write_keyword( f , "SWAT" , ECL_FLOAT); pos10 = fortio_ftell( f ); write_seqnum( f , 10 ); - write_keyword( f , "INTEHEAD" , ECL_INT_TYPE ); - write_keyword( f , "PRESSURE" , ECL_FLOAT_TYPE ); - write_keyword( f , "SWAT" , ECL_FLOAT_TYPE ); + write_keyword( f , "INTEHEAD" , ECL_INT); + write_keyword( f , "PRESSURE" , ECL_FLOAT); + write_keyword( f , "SWAT" , ECL_FLOAT); pos20 = fortio_ftell( f ); write_seqnum( f , 20 ); - write_keyword( f , "INTEHEAD" , ECL_INT_TYPE ); - write_keyword( f , "PRESSURE" , ECL_FLOAT_TYPE ); - write_keyword( f , "SWAT" , ECL_FLOAT_TYPE ); + write_keyword( f , "INTEHEAD" , ECL_INT); + write_keyword( f , "PRESSURE" , ECL_FLOAT); + write_keyword( f , "SWAT" , ECL_FLOAT); pos_end = fortio_ftell( f ); fortio_fclose( f ); @@ -131,21 +132,21 @@ void test_UNRST1() { fortio_type * f = fortio_open_writer( "TEST.UNRST" , false , ECL_ENDIAN_FLIP); pos5 = fortio_ftell( f ); write_seqnum( f , 5 ); - write_keyword( f , "INTEHEAD" , ECL_INT_TYPE ); - write_keyword( f , "PRESSURE" , ECL_FLOAT_TYPE ); - write_keyword( f , "SWAT" , ECL_FLOAT_TYPE ); + write_keyword( f , "INTEHEAD" , ECL_INT); + write_keyword( f , "PRESSURE" , ECL_FLOAT); + write_keyword( f , "SWAT" , ECL_FLOAT); pos10 = fortio_ftell( f ); write_seqnum( f , 10 ); - write_keyword( f , "INTEHEAD" , ECL_INT_TYPE ); - write_keyword( f , "PRESSURE" , ECL_FLOAT_TYPE ); - write_keyword( f , "SWAT" , ECL_FLOAT_TYPE ); + write_keyword( f , "INTEHEAD" , ECL_INT); + write_keyword( f , "PRESSURE" , ECL_FLOAT); + write_keyword( f , "SWAT" , ECL_FLOAT); pos20 = fortio_ftell( f ); write_seqnum( f , 20 ); - write_keyword( f , "INTEHEAD" , ECL_INT_TYPE ); - write_keyword( f , "PRESSURE" , ECL_FLOAT_TYPE ); - write_keyword( f , "SWAT" , ECL_FLOAT_TYPE ); + write_keyword( f , "INTEHEAD" , ECL_INT); + write_keyword( f , "PRESSURE" , ECL_FLOAT); + write_keyword( f , "SWAT" , ECL_FLOAT); pos_end = fortio_ftell( f ); fortio_fclose( f ); diff --git a/ThirdParty/Ert/libecl/tests/ecl_smspec.c b/ThirdParty/Ert/libecl/tests/ecl_smspec.c new file mode 100644 index 0000000000..9b7f50d737 --- /dev/null +++ b/ThirdParty/Ert/libecl/tests/ecl_smspec.c @@ -0,0 +1,42 @@ +/* + Copyright (C) 2016 Statoil ASA, Norway. + + This file is part of ERT - Ensemble based Reservoir Tool. + + ERT 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. + + ERT 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 + for more details. +*/ + +#include +#include + +#include + +#include + + + +int main(int argc, char ** argv) { + const char * case1 = argv[1]; + const char * case2 = argv[2]; + ecl_smspec_type * smspec1 = ecl_smspec_fread_alloc( case1 , ":" , false ); + ecl_smspec_type * smspec2 = ecl_smspec_fread_alloc( case2 , ":" , false ); + + test_assert_true( ecl_smspec_equal( smspec2 , smspec2 )); + test_assert_true( ecl_smspec_equal( smspec1 , smspec1 )); + + test_assert_false( ecl_smspec_equal( smspec1 , smspec2 )); + test_assert_false( ecl_smspec_equal( smspec2 , smspec1 )); + + ecl_smspec_free( smspec1 ); + ecl_smspec_free( smspec2 ); +} diff --git a/ThirdParty/Ert/libecl/tests/statoil_tests.cmake b/ThirdParty/Ert/libecl/tests/statoil_tests.cmake index 11c0a20d7d..8962b49fa2 100644 --- a/ThirdParty/Ert/libecl/tests/statoil_tests.cmake +++ b/ThirdParty/Ert/libecl/tests/statoil_tests.cmake @@ -1,21 +1,21 @@ add_executable( ecl_coarse_test ecl_coarse_test.c ) -target_link_libraries( ecl_coarse_test ecl test_util ) +target_link_libraries( ecl_coarse_test ecl ) add_test( ecl_coarse_test ${EXECUTABLE_OUTPUT_PATH}/ecl_coarse_test ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/LGCcase/LGC_TESTCASE2 ) add_executable( ecl_grid_layer_contains ecl_grid_layer_contains.c ) -target_link_libraries( ecl_grid_layer_contains ecl test_util ) +target_link_libraries( ecl_grid_layer_contains ecl ) add_test( ecl_grid_layer_contains1 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_layer_contains ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID ) add_test( ecl_grid_layer_contains2 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_layer_contains ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Mariner/MARINER.EGRID ) add_executable( ecl_restart_test ecl_restart_test.c ) -target_link_libraries( ecl_restart_test ecl test_util ) +target_link_libraries( ecl_restart_test ecl ) add_test( ecl_restart_test ${EXECUTABLE_OUTPUT_PATH}/ecl_restart_test ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.UNRST ) add_executable( ecl_nnc_export ecl_nnc_export.c ) -target_link_libraries( ecl_nnc_export ecl test_util ) +target_link_libraries( ecl_nnc_export ecl ) add_test (ecl_nnc_export1 ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_export ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE TRUE) add_test (ecl_nnc_export2 ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_export ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/10kcase/TEST10K_FLT_LGR_NNC TRUE) add_test (ecl_nnc_export3 ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_export ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Troll/MSW_LGR/2BRANCHES-CCEWELLPATH-NEW-SCH-TUNED-AR3 TRUE) @@ -25,17 +25,17 @@ add_test (ecl_nnc_export6 ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_export ${PROJECT_SO add_test (ecl_nnc_export7 ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_export ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/TYRIHANS/BASE20150218_MULTFLT FALSE) add_executable( ecl_nnc_export_get_tran ecl_nnc_export_get_tran.c ) -target_link_libraries( ecl_nnc_export_get_tran ecl test_util ) +target_link_libraries( ecl_nnc_export_get_tran ecl ) add_test (ecl_nnc_export_get_tran ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_export_get_tran ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Troll/MSW_LGR/2BRANCHES-CCEWELLPATH-NEW-SCH-TUNED-AR3) add_executable( ecl_util_make_date_shift ecl_util_make_date_shift.c ) -target_link_libraries( ecl_util_make_date_shift ecl test_util ) +target_link_libraries( ecl_util_make_date_shift ecl ) add_test( ecl_util_make_date_shift ${EXECUTABLE_OUTPUT_PATH}/ecl_util_make_date_shift ) add_executable( ecl_sum_case_exists ecl_sum_case_exists.c ) -target_link_libraries( ecl_sum_case_exists ecl test_util ) +target_link_libraries( ecl_sum_case_exists ecl ) add_test( ecl_sum_case_exists ${EXECUTABLE_OUTPUT_PATH}/ecl_sum_case_exists ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/GurbatSummary/missingHeader/ECLIPSE @@ -43,62 +43,61 @@ add_test( ecl_sum_case_exists ${EXECUTABLE_OUTPUT_PATH}/ecl_sum_case_exists add_executable( ecl_grid_lgr_name ecl_grid_lgr_name.c ) -target_link_libraries( ecl_grid_lgr_name ecl test_util ) +target_link_libraries( ecl_grid_lgr_name ecl ) set_target_properties( ecl_grid_lgr_name PROPERTIES COMPILE_FLAGS "-Werror") add_test( ecl_grid_lgr_name ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_lgr_name ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Troll/MSW_LGR/2BRANCHES-CCEWELLPATH-NEW-SCH-TUNED-AR3.EGRID) add_executable( ecl_region ecl_region.c ) -target_link_libraries( ecl_region ecl test_util ) +target_link_libraries( ecl_region ecl ) add_test( ecl_region ${EXECUTABLE_OUTPUT_PATH}/ecl_region ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID ) add_executable( ecl_grid_fwrite ecl_grid_fwrite.c ) -target_link_libraries( ecl_grid_fwrite ecl test_util ) +target_link_libraries( ecl_grid_fwrite ecl ) add_test( ecl_grid_fwrite ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_fwrite ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID ) -add_executable( ecl_grid_cell_contains ecl_grid_cell_contains.c ) -target_link_libraries( ecl_grid_cell_contains ecl test_util ) -add_test( ecl_grid_cell_contains1 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_cell_contains 1 ) -add_test( ecl_grid_cell_contains2 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_cell_contains 2 ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID ) -add_test( ecl_grid_cell_contains3 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_cell_contains 3 ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/FF12/FF12_2013B2.EGRID ) +add_test( ecl_grid_cell_contains2 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_cell_contains ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID ) +add_test( ecl_grid_cell_contains3 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_cell_contains ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/FF12/FF12_2013B2.EGRID ) +add_test( ecl_grid_cell_contains4 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_cell_contains ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Brazil/R3_ICD.EGRID ) -add_test( ecl_grid_cell_contains4 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_cell_contains 4 ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Brazil/R3_ICD.EGRID ) +add_executable( ecl_grid_cell_contains_wellpath ecl_grid_cell_contains_wellpath.c ) +target_link_libraries( ecl_grid_cell_contains_wellpath ecl ) +add_test( ecl_grid_cell_contains_wellpath1 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_cell_contains_wellpath ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/CellContains/model/SMS-0.EGRID ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/CellContains/R_PB-4H.jira ) add_executable( ecl_grid_cell_volume ecl_grid_cell_volume.c ) -target_link_libraries( ecl_grid_cell_volume ecl test_util ) +target_link_libraries( ecl_grid_cell_volume ecl ) add_test( ecl_grid_cell_volume1 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_cell_volume) add_test( ecl_grid_cell_volume2 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_cell_volume ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID ) add_test( ecl_grid_cell_volume3 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_cell_volume ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Heidrun/Summary/FF12_2013B3_CLEAN_RS.EGRID ) add_executable( ecl_region2region ecl_region2region_test.c ) -target_link_libraries( ecl_region2region ecl test_util ) +target_link_libraries( ecl_region2region ecl ) add_test( ecl_region2region ${EXECUTABLE_OUTPUT_PATH}/ecl_region2region ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/R2R/R2R.SMSPEC ) add_executable( ecl_grid_case ecl_grid_case.c ) -target_link_libraries( ecl_grid_case ecl test_util ) +target_link_libraries( ecl_grid_case ecl ) add_test( ecl_grid_case ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_case ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE ) add_executable( ecl_lgr_test ecl_lgr_test.c ) -target_link_libraries( ecl_lgr_test ecl test_util ) +target_link_libraries( ecl_lgr_test ecl ) add_test( ecl_lgr_test1 ${EXECUTABLE_OUTPUT_PATH}/ecl_lgr_test ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/10kcase/TEST10K_FLT_LGR_NNC.EGRID) add_test( ecl_lgr_test2 ${EXECUTABLE_OUTPUT_PATH}/ecl_lgr_test ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/10kcase/TEST10K_FLT_LGR_NNC.GRID) add_test( ecl_lgr_test3 ${EXECUTABLE_OUTPUT_PATH}/ecl_lgr_test ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Troll/MSW_LGR/2BRANCHES-CCEWELLPATH-NEW-SCH-TUNED-AR3.EGRID ) add_executable( ecl_grid_simple ecl_grid_simple.c ) -target_link_libraries( ecl_grid_simple ecl test_util ) +target_link_libraries( ecl_grid_simple ecl ) add_test( ecl_grid_simple ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_simple ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID ) -add_test( ecl_grid_ecl2015_1 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_simple ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Eclipse2015_NNC_BUG/FF15_2015B2_LGRM_RDI15_HIST_RDIREAL1_NOSIM_GRID.EGRID ) add_test( ecl_grid_ecl2015_2 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_simple ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Eclipse2015_NNC_BUG/FF15_2015B2_LGRM_RDI15_HIST_RDIREAL1_20142.EGRID ) add_executable( ecl_grid_export_statoil ecl_grid_export.c ) -target_link_libraries( ecl_grid_export_statoil ecl test_util ) +target_link_libraries( ecl_grid_export_statoil ecl ) add_test( ecl_grid_export_statoil ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_export_statoil ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID ) add_executable( ecl_grid_volume ecl_grid_volume.c ) -target_link_libraries( ecl_grid_volume ecl test_util ) +target_link_libraries( ecl_grid_volume ecl ) add_test( ecl_grid_volume1 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_volume ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE ) add_test( ecl_grid_volume2 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_volume ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/VolumeTest/TEST1 ) add_test( ecl_grid_volume3 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_volume ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/OsebergSyd/Omega/OMEGA-0) @@ -112,7 +111,7 @@ add_test( ecl_grid_volume4 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_volume ${PROJECT_ # add_test( ecl_grid_volume5 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_volume ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Heidrun/Summary/FF12_2013B3_CLEAN_RS) add_executable( ecl_grid_dims ecl_grid_dims.c ) -target_link_libraries( ecl_grid_dims ecl test_util ) +target_link_libraries( ecl_grid_dims ecl ) add_test( ecl_grid_dims0 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_dims ) add_test( ecl_grid_dims1 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_dims ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.INIT ) @@ -124,7 +123,7 @@ add_test( ecl_grid_dims5 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_dims ${PROJECT_SOUR add_executable( ecl_nnc_test ecl_nnc_test.c ) -target_link_libraries( ecl_nnc_test ecl test_util ) +target_link_libraries( ecl_nnc_test ecl ) add_test (ecl_nnc_test1 ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_test ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID ) add_test (ecl_nnc_test2 ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_test ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/10kcase/TEST10K_FLT_LGR_NNC.EGRID ) add_test (ecl_nnc_test3 ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_test ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Troll/MSW_LGR/2BRANCHES-CCEWELLPATH-NEW-SCH-TUNED-AR3.EGRID) @@ -133,21 +132,21 @@ add_test (ecl_nnc_test5 ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_test ${PROJECT_SOURCE add_executable( ecl_layer_statoil ecl_layer_statoil.c ) -target_link_libraries( ecl_layer_statoil ecl test_util ) +target_link_libraries( ecl_layer_statoil ecl ) add_test(ecl_layer_statoil ${EXECUTABLE_OUTPUT_PATH}/ecl_layer_statoil ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Mariner/MARINER.EGRID ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Mariner/faultblock.grdecl) add_executable( ecl_dualp ecl_dualp.c ) -target_link_libraries( ecl_dualp ecl test_util ) +target_link_libraries( ecl_dualp ecl ) add_test( ecl_dualp ${EXECUTABLE_OUTPUT_PATH}/ecl_dualp ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/LGCcase/LGC_TESTCASE2 ) add_executable( ecl_sum_test ecl_sum_test.c ) -target_link_libraries( ecl_sum_test ecl test_util ) +target_link_libraries( ecl_sum_test ecl ) add_test( ecl_sum_test ${EXECUTABLE_OUTPUT_PATH}/ecl_sum_test ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE ) add_executable( ecl_sum_report_step_equal ecl_sum_report_step_equal.c ) -target_link_libraries( ecl_sum_report_step_equal ecl test_util ) +target_link_libraries( ecl_sum_report_step_equal ecl ) add_test( ecl_sum_report_step_equal1 ${EXECUTABLE_OUTPUT_PATH}/ecl_sum_report_step_equal ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Snorre/SNORRE FALSE) add_test( ecl_sum_report_step_equal2 ${EXECUTABLE_OUTPUT_PATH}/ecl_sum_report_step_equal ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE TRUE) add_test( ecl_sum_report_step_equal3 ${EXECUTABLE_OUTPUT_PATH}/ecl_sum_report_step_equal ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/modGurbat/extraMinistep/ECLIPSE TRUE) @@ -156,7 +155,7 @@ add_test( ecl_sum_report_step_equal5 ${EXECUTABLE_OUTPUT_PATH}/ecl_sum_report_st add_test( ecl_sum_report_step_equal6 ${EXECUTABLE_OUTPUT_PATH}/ecl_sum_report_step_equal ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Snorre/SNORRE ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Snorre2/SNORRE2 FALSE) add_executable( ecl_sum_report_step_compatible ecl_sum_report_step_compatible.c ) -target_link_libraries( ecl_sum_report_step_compatible ecl test_util ) +target_link_libraries( ecl_sum_report_step_compatible ecl ) add_test( ecl_sum_report_step_compatible1 ${EXECUTABLE_OUTPUT_PATH}/ecl_sum_report_step_compatible ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Snorre/SNORRE FALSE) add_test( ecl_sum_report_step_compatible2 ${EXECUTABLE_OUTPUT_PATH}/ecl_sum_report_step_compatible ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE TRUE) add_test( ecl_sum_report_step_compatible3 ${EXECUTABLE_OUTPUT_PATH}/ecl_sum_report_step_compatible ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/modGurbat/extraMinistep/ECLIPSE TRUE) @@ -166,34 +165,40 @@ add_test( ecl_sum_report_step_compatible6 ${EXECUTABLE_OUTPUT_PATH}/ecl_sum_repo if (HAVE_UTIL_ABORT_INTERCEPT) add_executable( ecl_fortio ecl_fortio.c ) - target_link_libraries( ecl_fortio ecl test_util ) + target_link_libraries( ecl_fortio ecl ) add_test( ecl_fortio ${EXECUTABLE_OUTPUT_PATH}/ecl_fortio ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.UNRST ) set_property( TEST ecl_fortio PROPERTY LABELS StatoilData) endif() add_executable( ecl_file ecl_file.c ) -target_link_libraries( ecl_file ecl test_util ) +target_link_libraries( ecl_file ecl ) add_test( ecl_file ${EXECUTABLE_OUTPUT_PATH}/ecl_file ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.UNRST ECLIPSE.UNRST) add_executable( ecl_fmt ecl_fmt.c ) -target_link_libraries( ecl_fmt ecl test_util ) +target_link_libraries( ecl_fmt ecl ) add_test( ecl_fmt ${EXECUTABLE_OUTPUT_PATH}/ecl_fmt ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.UNRST ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.DATA) add_executable( ecl_rsthead ecl_rsthead.c ) -target_link_libraries( ecl_rsthead ecl test_util ) +target_link_libraries( ecl_rsthead ecl ) add_test( ecl_rsthead ${EXECUTABLE_OUTPUT_PATH}/ecl_rsthead ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.UNRST ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/DualPoro/DUALPORO.X0005 ) +add_executable( ecl_smspec ecl_smspec.c ) +target_link_libraries( ecl_smspec ecl ) +add_test( ecl_smspec ${EXECUTABLE_OUTPUT_PATH}/ecl_smspec ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.SMSPEC + ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Heidrun/Summary/FF12_2013B3_CLEAN_RS.SMSPEC ) + + add_executable( ecl_rft ecl_rft.c ) -target_link_libraries( ecl_rft ecl test_util ) +target_link_libraries( ecl_rft ecl ) add_test( ecl_rft_rft ${EXECUTABLE_OUTPUT_PATH}/ecl_rft ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.RFT RFT) add_test( ecl_rft_rft_rw ${EXECUTABLE_OUTPUT_PATH}/ecl_rft ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.RFT RFT_RW) add_test( ecl_rft_plt ${EXECUTABLE_OUTPUT_PATH}/ecl_rft ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/RFT/TEST1_1A.RFT PLT) add_test( ecl_rft_plt ${EXECUTABLE_OUTPUT_PATH}/ecl_rft ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/RFT/RFT2.RFT MSW-PLT) add_executable( ecl_grid_copy_statoil ecl_grid_copy_statoil.c ) -target_link_libraries( ecl_grid_copy_statoil ecl test_util ) +target_link_libraries( ecl_grid_copy_statoil ecl ) add_test( ecl_grid_copy_statoil1 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_copy_statoil ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID ) @@ -207,7 +212,7 @@ add_test( ecl_grid_copy_statoil4 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_copy_statoil add_executable( ecl_fault_block_layer_statoil ecl_fault_block_layer_statoil.c ) -target_link_libraries( ecl_fault_block_layer_statoil ecl test_util ) +target_link_libraries( ecl_fault_block_layer_statoil ecl ) add_test( ecl_fault_block_layer_statoil ${EXECUTABLE_OUTPUT_PATH}/ecl_fault_block_layer_statoil ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Mariner/MARINER.EGRID ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Mariner/faultblock.grdecl) @@ -287,5 +292,4 @@ set_property( TEST ecl_grid_copy_statoil4 PROPERTY LABELS StatoilData ) set_property( TEST ecl_layer_statoil PROPERTY LABELS StatoilData ) set_property( TEST ecl_grid_layer_contains1 PROPERTY LABELS StatoilData ) set_property( TEST ecl_grid_layer_contains2 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_grid_ecl2015_1 PROPERTY LABELS StatoilData ) set_property( TEST ecl_grid_ecl2015_2 PROPERTY LABELS StatoilData ) diff --git a/ThirdParty/Ert/libecl/tests/tests.cmake b/ThirdParty/Ert/libecl/tests/tests.cmake index 2665b21a07..9da02ab0f8 100644 --- a/ThirdParty/Ert/libecl/tests/tests.cmake +++ b/ThirdParty/Ert/libecl/tests/tests.cmake @@ -1,95 +1,103 @@ +add_executable( ecl_nnc_geometry ecl_nnc_geometry.c ) +target_link_libraries( ecl_nnc_geometry ecl ) +add_test( ecl_nnc_geometry ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_geometry ) + add_executable( ecl_alloc_grid_dxv_dyv_dzv ecl_alloc_grid_dxv_dyv_dzv.c ) -target_link_libraries( ecl_alloc_grid_dxv_dyv_dzv ecl test_util ) +target_link_libraries( ecl_alloc_grid_dxv_dyv_dzv ecl ) add_test( ecl_alloc_grid_dxv_dyv_dzv ${EXECUTABLE_OUTPUT_PATH}/ecl_alloc_grid_dxv_dyv_dzv ) +add_executable( ecl_alloc_cpgrid ecl_alloc_cpgrid.c ) +target_link_libraries( ecl_alloc_cpgrid ecl ) +add_test( ecl_alloc_cpgrid ${EXECUTABLE_OUTPUT_PATH}/ecl_alloc_cpgrid ) + add_executable( ecl_kw_init ecl_kw_init.c ) -target_link_libraries( ecl_kw_init ecl test_util ) +target_link_libraries( ecl_kw_init ecl ) add_test( ecl_kw_init ${EXECUTABLE_OUTPUT_PATH}/ecl_kw_init ) add_executable( ecl_grid_init_fwrite ecl_grid_init_fwrite.c ) -target_link_libraries( ecl_grid_init_fwrite ecl test_util ) +target_link_libraries( ecl_grid_init_fwrite ecl ) add_test( ecl_grid_init_fwrite ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_init_fwrite ) add_executable( ecl_init_file ecl_init_file.c ) -target_link_libraries( ecl_init_file ecl test_util ) +target_link_libraries( ecl_init_file ecl ) add_test( ecl_init_file ${EXECUTABLE_OUTPUT_PATH}/ecl_kw_init ) add_executable( ecl_kw_fread ecl_kw_fread.c ) -target_link_libraries( ecl_kw_fread ecl test_util ) +target_link_libraries( ecl_kw_fread ecl ) add_test( ecl_kw_fread ${EXECUTABLE_OUTPUT_PATH}/ecl_kw_fread ) add_executable( ecl_valid_basename ecl_valid_basename.c ) -target_link_libraries( ecl_valid_basename ecl test_util ) +target_link_libraries( ecl_valid_basename ecl ) add_test( ecl_valid_basename ${EXECUTABLE_OUTPUT_PATH}/ecl_valid_basename) add_executable( ecl_util_make_date_no_shift ecl_util_make_date_no_shift.c ) -target_link_libraries( ecl_util_make_date_no_shift ecl test_util ) +target_link_libraries( ecl_util_make_date_no_shift ecl ) add_test( ecl_util_make_date_no_shift ${EXECUTABLE_OUTPUT_PATH}/ecl_util_make_date_no_shift ) add_executable( ecl_sum_writer ecl_sum_writer.c ) -target_link_libraries( ecl_sum_writer ecl test_util ) +target_link_libraries( ecl_sum_writer ecl ) add_test( ecl_sum_writer ${EXECUTABLE_OUTPUT_PATH}/ecl_sum_writer ) add_executable( ecl_grid_add_nnc ecl_grid_add_nnc.c ) -target_link_libraries( ecl_grid_add_nnc ecl test_util ) +target_link_libraries( ecl_grid_add_nnc ecl ) add_test( ecl_grid_add_nnc ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_add_nnc ) add_executable( ecl_grid_create ecl_grid_create.c ) -target_link_libraries( ecl_grid_create ecl test_util ) +target_link_libraries( ecl_grid_create ecl ) add_test( ecl_grid_create ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_create ) add_executable( ecl_grid_DEPTHZ ecl_grid_DEPTHZ.c ) -target_link_libraries( ecl_grid_DEPTHZ ecl test_util ) +target_link_libraries( ecl_grid_DEPTHZ ecl ) add_test( ecl_grid_DEPTHZ ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_DEPTHZ ) add_executable( ecl_grid_reset_actnum ecl_grid_reset_actnum.c ) -target_link_libraries( ecl_grid_reset_actnum ecl test_util ) +target_link_libraries( ecl_grid_reset_actnum ecl ) add_test( ecl_grid_reset_actnum ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_reset_actnum ) add_executable( ecl_nnc_info_test ecl_nnc_info_test.c ) -target_link_libraries( ecl_nnc_info_test ecl test_util ) +target_link_libraries( ecl_nnc_info_test ecl ) add_test (ecl_nnc_info_test ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_info_test ) add_executable( ecl_nnc_vector ecl_nnc_vector.c ) -target_link_libraries( ecl_nnc_vector ecl test_util ) +target_link_libraries( ecl_nnc_vector ecl ) add_test(ecl_nnc_vector ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_vector ) add_executable( ecl_kw_grdecl ecl_kw_grdecl.c ) -target_link_libraries( ecl_kw_grdecl ecl test_util ) +target_link_libraries( ecl_kw_grdecl ecl ) add_test( ecl_kw_grdecl ${EXECUTABLE_OUTPUT_PATH}/ecl_kw_grdecl ) add_executable( ecl_kw_equal ecl_kw_equal.c ) -target_link_libraries( ecl_kw_equal ecl test_util ) +target_link_libraries( ecl_kw_equal ecl ) add_test( ecl_kw_equal ${EXECUTABLE_OUTPUT_PATH}/ecl_kw_equal ) add_executable( ecl_kw_cmp_string ecl_kw_cmp_string.c ) -target_link_libraries( ecl_kw_cmp_string ecl test_util ) +target_link_libraries( ecl_kw_cmp_string ecl ) add_test( ecl_kw_cmp_string ${EXECUTABLE_OUTPUT_PATH}/ecl_kw_cmp_string ) add_executable( ecl_util_month_range ecl_util_month_range.c ) -target_link_libraries( ecl_util_month_range ecl test_util ) +target_link_libraries( ecl_util_month_range ecl ) add_test( ecl_util_month_range ${EXECUTABLE_OUTPUT_PATH}/ecl_util_month_range ) if (HAVE_UTIL_ABORT_INTERCEPT) add_executable( ecl_grid_corner ecl_grid_corner.c ) - target_link_libraries( ecl_grid_corner ecl test_util ) + target_link_libraries( ecl_grid_corner ecl ) add_test( ecl_grid_corner ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_corner ) add_executable( ecl_layer ecl_layer.c ) - target_link_libraries( ecl_layer ecl test_util ) + target_link_libraries( ecl_layer ecl ) add_test(ecl_layer ${EXECUTABLE_OUTPUT_PATH}/ecl_layer ) endif() add_executable( ecl_rft_cell ecl_rft_cell.c ) -target_link_libraries( ecl_rft_cell ecl test_util ) +target_link_libraries( ecl_rft_cell ecl ) add_test( ecl_rft_cell ${EXECUTABLE_OUTPUT_PATH}/ecl_rft_cell ) add_executable( ecl_grid_copy ecl_grid_copy.c ) -target_link_libraries( ecl_grid_copy ecl test_util ) +target_link_libraries( ecl_grid_copy ecl ) add_test( ecl_grid_copy ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_copy ) add_executable( ecl_get_num_cpu ecl_get_num_cpu_test.c ) -target_link_libraries( ecl_get_num_cpu ecl test_util ) +target_link_libraries( ecl_get_num_cpu ecl ) add_test( ecl_get_num_cpu ${EXECUTABLE_OUTPUT_PATH}/ecl_get_num_cpu ${PROJECT_SOURCE_DIR}/libecl/tests/data/num_cpu1 ${PROJECT_SOURCE_DIR}/libecl/tests/data/num_cpu2 @@ -97,13 +105,15 @@ add_test( ecl_get_num_cpu ${EXECUTABLE_OUTPUT_PATH}/ecl_get_num_cpu ${PROJECT_SOURCE_DIR}/libecl/tests/data/num_cpu4 ) add_executable( ecl_fault_block_layer ecl_fault_block_layer.c ) -target_link_libraries( ecl_fault_block_layer ecl test_util ) +target_link_libraries( ecl_fault_block_layer ecl ) add_test( ecl_fault_block_layer ${EXECUTABLE_OUTPUT_PATH}/ecl_fault_block_layer ) add_executable( ecl_grid_export ecl_grid_export.c ) -target_link_libraries( ecl_grid_export ecl test_util ) +target_link_libraries( ecl_grid_export ecl ) add_test( ecl_grid_export ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_export ) add_executable( ecl_rst_file ecl_rst_file.c ) -target_link_libraries( ecl_rst_file ecl test_util ) +target_link_libraries( ecl_rst_file ecl ert_util ) add_test( ecl_rst_file ${EXECUTABLE_OUTPUT_PATH}/ecl_rst_file ) + +add_test( ecl_grid_cell_contains1 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_cell_contains ) diff --git a/ThirdParty/Ert/libecl_well/applications/segment_info.c b/ThirdParty/Ert/libecl_well/applications/segment_info.c index 8bd5e305f8..2a445c2637 100644 --- a/ThirdParty/Ert/libecl_well/applications/segment_info.c +++ b/ThirdParty/Ert/libecl_well/applications/segment_info.c @@ -43,6 +43,7 @@ int main(int argc , char ** argv) { well_rseg_loader_type * rseg_loader = well_rseg_loader_alloc(ecl_file_get_global_view(rst_file)); const ecl_kw_type * icon_kw = ecl_file_iget_named_kw( rst_file , ICON_KW , 0 ); const ecl_kw_type * scon_kw = ecl_file_iget_named_kw( rst_file , SCON_KW , 0 ); + const ecl_kw_type * xcon_kw = ecl_file_iget_named_kw( rst_file , XCON_KW , 0 ); const ecl_kw_type * zwel_kw = ecl_file_iget_named_kw( rst_file , ZWEL_KW , 0 ); { @@ -62,7 +63,7 @@ int main(int argc , char ** argv) { if (well_segment_collection_load_from_kw( segments , well_nr , iwel_kw , iseg_kw , rseg_loader , rst_head , load_segment_information , &is_MSW_well)) { well_branch_collection_type * branches = well_branch_collection_alloc(); - well_conn_collection_load_from_kw( connections , iwel_kw , icon_kw , scon_kw , well_nr , rst_head); + well_conn_collection_load_from_kw( connections , iwel_kw , icon_kw , scon_kw, xcon_kw , well_nr , rst_head); well_segment_collection_link( segments ); well_segment_collection_add_branches( segments , branches ); well_segment_collection_add_connections( segments , ECL_GRID_GLOBAL_GRID , connections ); diff --git a/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_branch_collection.h b/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_branch_collection.h index 68d7f05720..850e9166f2 100644 --- a/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_branch_collection.h +++ b/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_branch_collection.h @@ -33,7 +33,7 @@ extern "C" { typedef struct well_branch_collection_struct well_branch_collection_type; - well_branch_collection_type * well_branch_collection_alloc(); + well_branch_collection_type * well_branch_collection_alloc(void); void well_branch_collection_free( well_branch_collection_type * branches ); void well_branch_collection_free__( void * arg ); bool well_branch_collection_has_branch( const well_branch_collection_type * branches , int branch_id); diff --git a/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_conn.h b/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_conn.h index 8869eab9e1..5ae4b1e20c 100644 --- a/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_conn.h +++ b/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_conn.h @@ -53,7 +53,7 @@ extern "C" { bool well_conn_MSW(const well_conn_type * conn); - well_conn_type * well_conn_alloc_from_kw( const ecl_kw_type * icon_kw , const ecl_kw_type * scon_kw , const ecl_rsthead_type * header , int well_nr , int conn_nr); + well_conn_type * well_conn_alloc_from_kw( const ecl_kw_type * icon_kw , const ecl_kw_type * scon_kw , const ecl_kw_type* xcon_kw, const ecl_rsthead_type * header , int well_nr , int conn_nr); well_conn_type * well_conn_alloc_wellhead( const ecl_kw_type * iwel_kw , const ecl_rsthead_type * header , int well_nr); int well_conn_get_i(const well_conn_type * conn); @@ -67,7 +67,18 @@ extern "C" { bool well_conn_equal( const well_conn_type *conn1 , const well_conn_type * conn2); double well_conn_get_connection_factor( const well_conn_type * conn ); - UTIL_IS_INSTANCE_HEADER( well_conn ); + double well_conn_get_oil_rate(const well_conn_type *conn); + double well_conn_get_gas_rate(const well_conn_type *conn); + double well_conn_get_water_rate(const well_conn_type *conn); + double well_conn_get_volume_rate(const well_conn_type *conn); + + double well_conn_get_oil_rate_si(const well_conn_type *conn); + double well_conn_get_gas_rate_si(const well_conn_type *conn); + double well_conn_get_water_rate_si(const well_conn_type *conn); + double well_conn_get_volume_rate_si(const well_conn_type *conn); + + +UTIL_IS_INSTANCE_HEADER( well_conn ); UTIL_SAFE_CAST_HEADER( well_conn ); diff --git a/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_conn_collection.h b/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_conn_collection.h index efbbb7c0c9..fcbf7fc715 100644 --- a/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_conn_collection.h +++ b/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_conn_collection.h @@ -33,7 +33,7 @@ extern "C" { typedef struct well_conn_collection_struct well_conn_collection_type; - well_conn_collection_type * well_conn_collection_alloc(); + well_conn_collection_type * well_conn_collection_alloc(void); void well_conn_collection_free( well_conn_collection_type * wellcc ); void well_conn_collection_free__( void * arg ); int well_conn_collection_get_size( const well_conn_collection_type * wellcc ); @@ -41,7 +41,7 @@ extern "C" { well_conn_type * well_conn_collection_iget(const well_conn_collection_type * wellcc , int index); void well_conn_collection_add( well_conn_collection_type * wellcc , well_conn_type * conn); void well_conn_collection_add_ref( well_conn_collection_type * wellcc , well_conn_type * conn); - int well_conn_collection_load_from_kw( well_conn_collection_type * wellcc , const ecl_kw_type * iwel_kw , const ecl_kw_type * icon_kw , const ecl_kw_type * scon_kw , int iwell , const ecl_rsthead_type * rst_head); + int well_conn_collection_load_from_kw( well_conn_collection_type * wellcc , const ecl_kw_type * iwel_kw , const ecl_kw_type * icon_kw , const ecl_kw_type * scon_kw , const ecl_kw_type * xcon_kw , int iwell , const ecl_rsthead_type * rst_head); UTIL_IS_INSTANCE_HEADER( well_conn_collection ); diff --git a/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_const.h b/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_const.h index 759b00fdc4..41a2ade9f2 100644 --- a/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_const.h +++ b/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_const.h @@ -73,6 +73,12 @@ extern "C" { #define ISEG_OUTLET_INDEX 1 #define ISEG_BRANCH_INDEX 3 +#define XWEL_RES_WRAT_ITEM 1 +#define XWEL_RES_GRAT_ITEM 2 +#define XWEL_RES_ORAT_ITEM 3 +#define XWEL_RESV_ITEM 4 + + #define ICON_IC_INDEX 0 #define ICON_I_INDEX 1 #define ICON_J_INDEX 2 @@ -98,6 +104,10 @@ extern "C" { #define ICON_DEFAULT_DIR_TARGET ICON_DIRZ #define SCON_CF_INDEX 0 + +#define XCON_ORAT_INDEX 0 +#define XCON_WRAT_INDEX 1 +#define XCON_GRAT_INDEX 2 #define XCON_QR_INDEX 49 #define RSEG_LENGTH_INDEX 0 @@ -121,11 +131,20 @@ extern "C" { #define IWEL_GAS_INJECTOR 4 typedef enum { - ERT_UNDOCUMENTED_ZERO = 0, - ERT_PRODUCER = 10, - ERT_WATER_INJECTOR = 22, - ERT_GAS_INJECTOR = 21, - ERT_OIL_INJECTOR = 78 + ERT_UNDOCUMENTED_ZERO = 0, // Deprecated - retained for Resinsight compatibility + ECL_WELL_ZERO = 0, + + ERT_PRODUCER = 1, // Deprecated + ECL_WELL_PRODUCER = 1, + + ERT_OIL_INJECTOR = 2, // Deprecated + ECL_WELL_OIL_INJECTOR = 2, + + ERT_WATER_INJECTOR = 3, // Deprecated + ECL_WELL_WATER_INJECTOR = 3, + + ERT_GAS_INJECTOR = 4, // Deprecated + ECL_WELL_GAS_INJECTOR = 4, } well_type_enum; #ifdef __cplusplus diff --git a/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_segment_collection.h b/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_segment_collection.h index 311ca38580..fd5dafceb7 100644 --- a/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_segment_collection.h +++ b/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_segment_collection.h @@ -36,7 +36,7 @@ extern "C" { typedef struct well_segment_collection_struct well_segment_collection_type; - well_segment_collection_type * well_segment_collection_alloc(); + well_segment_collection_type * well_segment_collection_alloc(void); void well_segment_collection_free(well_segment_collection_type * segment_collection ); int well_segment_collection_get_size( const well_segment_collection_type * segment_collection ); void well_segment_collection_add( well_segment_collection_type * segment_collection , well_segment_type * segment); diff --git a/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_state.h b/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_state.h index 2c126f586e..1afe9eb488 100644 --- a/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_state.h +++ b/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_state.h @@ -39,11 +39,11 @@ extern "C" { #define GLOBAL_GRID_NAME "GLOBAL" // The name assigned to the global grid for name based lookup. typedef struct well_state_struct well_state_type; - - well_state_type * well_state_alloc(const char * well_name , int global_well_nr , bool open, well_type_enum type , int report_nr, time_t valid_from); - well_state_type * well_state_alloc_from_file( ecl_file_type * ecl_file , const ecl_grid_type * grid , int report_step , int well_nr , bool load_segment_information); - well_state_type * well_state_alloc_from_file2( ecl_file_view_type * file_view , const ecl_grid_type * grid , int report_nr , int global_well_nr ,bool load_segment_information); - + + well_state_type * well_state_alloc(const char * well_name , int global_well_nr , bool open, well_type_enum type , int report_nr, time_t valid_from); + well_state_type * well_state_alloc_from_file( ecl_file_type * ecl_file , const ecl_grid_type * grid , int report_step , int well_nr , bool load_segment_information); + well_state_type * well_state_alloc_from_file2( ecl_file_view_type * file_view , const ecl_grid_type * grid , int report_nr , int global_well_nr ,bool load_segment_information); + void well_state_add_connections2( well_state_type * well_state , const ecl_grid_type * grid , ecl_file_view_type * rst_view , @@ -82,6 +82,7 @@ extern "C" { bool well_state_is_open( const well_state_type * well_state ); int well_state_get_well_nr( const well_state_type * well_state ); + const well_conn_type * well_state_get_global_wellhead( const well_state_type * well_state ); const well_conn_type * well_state_iget_wellhead( const well_state_type * well_state , int grid_nr); const well_conn_type * well_state_get_wellhead( const well_state_type * well_state , const char * grid_name); @@ -93,6 +94,12 @@ extern "C" { bool well_state_has_grid_connections( const well_state_type * well_state , const char * grid_name); bool well_state_has_global_connections( const well_state_type * well_state ); + double well_state_get_oil_rate( const well_state_type * well_state ); + double well_state_get_gas_rate( const well_state_type * well_state ); + double well_state_get_water_rate( const well_state_type * well_state); + double well_state_get_volume_rate( const well_state_type * well_state); + + UTIL_IS_INSTANCE_HEADER( well_state ); #ifdef __cplusplus diff --git a/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_ts.h b/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_ts.h index f2395f105b..4b4f0473b7 100644 --- a/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_ts.h +++ b/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_ts.h @@ -37,7 +37,7 @@ extern "C" { well_state_type * well_ts_get_state_from_report( const well_ts_type * well_ts , int report_nr); well_state_type * well_ts_iget_state( const well_ts_type * well_ts , int index); int well_ts_get_size( const well_ts_type * well_ts); - + char * well_ts_get_name( const well_ts_type * well_ts); well_state_type * well_ts_get_first_state( const well_ts_type * well_ts); well_state_type * well_ts_get_last_state( const well_ts_type * well_ts); diff --git a/ThirdParty/Ert/libecl_well/src/CMakeLists.txt b/ThirdParty/Ert/libecl_well/src/CMakeLists.txt index f71887f102..84eacde50a 100644 --- a/ThirdParty/Ert/libecl_well/src/CMakeLists.txt +++ b/ThirdParty/Ert/libecl_well/src/CMakeLists.txt @@ -32,7 +32,7 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ) include_directories( ${libgeometry_src_path} ) -add_library( ecl_well ${LIBRARY_TYPE} ${source_files} ) +add_library( ecl_well ${source_files} ) set_target_properties( ecl_well PROPERTIES VERSION ${ERT_VERSION_MAJOR}.${ERT_VERSION_MINOR} SOVERSION ${ERT_VERSION_MAJOR} ) target_link_libraries( ecl_well ecl ) if (USE_RUNPATH) diff --git a/ThirdParty/Ert/libecl_well/src/well_conn.c b/ThirdParty/Ert/libecl_well/src/well_conn.c index 02f9aba2a5..74e87521b7 100644 --- a/ThirdParty/Ert/libecl_well/src/well_conn.c +++ b/ThirdParty/Ert/libecl_well/src/well_conn.c @@ -50,6 +50,11 @@ struct well_conn_struct { int segment_id; // -1: Ordinary well bool matrix_connection; // k >= nz => fracture (and k -= nz ) double connection_factor; + double oil_rate; + double gas_rate; + double water_rate; + double volume_rate; + }; @@ -102,6 +107,11 @@ static well_conn_type * well_conn_alloc__( int i , int j , int k , double connec else conn->segment_id = segment_id; + conn->water_rate = 0; + conn->gas_rate = 0; + conn->oil_rate = 0; + conn->volume_rate = 0; + return conn; } else { printf("assert-direction failed. dir:%d matrix_connection:%d \n",dir , matrix_connection); @@ -141,6 +151,7 @@ well_conn_type * well_conn_alloc_fracture_MSW( int i , int j , int k , double co */ well_conn_type * well_conn_alloc_from_kw( const ecl_kw_type * icon_kw , const ecl_kw_type * scon_kw , + const ecl_kw_type * xcon_kw , const ecl_rsthead_type * header , int well_nr , int conn_nr ) { @@ -211,9 +222,16 @@ well_conn_type * well_conn_alloc_from_kw( const ecl_kw_type * icon_kw , connection_factor = ecl_kw_iget_as_double(scon_kw , scon_offset + SCON_CF_INDEX); } - { - int segment_id = ecl_kw_iget_int( icon_kw , icon_offset + ICON_SEGMENT_INDEX ) - ECLIPSE_WELL_SEGMENT_OFFSET + WELL_SEGMENT_OFFSET; - conn = well_conn_alloc__(i,j,k,connection_factor,dir,open,segment_id,matrix_connection); + int segment_id = ecl_kw_iget_int( icon_kw , icon_offset + ICON_SEGMENT_INDEX ) - ECLIPSE_WELL_SEGMENT_OFFSET + WELL_SEGMENT_OFFSET; + conn = well_conn_alloc__(i,j,k,connection_factor,dir,open,segment_id,matrix_connection); + + if (xcon_kw) { + const int xcon_offset = header->nxconz * (header->ncwmax * well_nr + conn_nr); + + conn->water_rate = ecl_kw_iget_as_double(xcon_kw, xcon_offset + XCON_WRAT_INDEX); + conn->gas_rate = ecl_kw_iget_as_double(xcon_kw, xcon_offset + XCON_GRAT_INDEX); + conn->oil_rate = ecl_kw_iget_as_double(xcon_kw, xcon_offset + XCON_ORAT_INDEX); + conn->volume_rate = ecl_kw_iget_double(xcon_kw, xcon_offset + XCON_QR_INDEX); } /** @@ -310,3 +328,34 @@ bool well_conn_matrix_connection( const well_conn_type * conn) { return conn->matrix_connection; } +double well_conn_get_oil_rate(const well_conn_type *conn) { + return conn->oil_rate; +} + +double well_conn_get_gas_rate(const well_conn_type *conn) { + return conn->gas_rate; +} + +double well_conn_get_water_rate(const well_conn_type *conn) { + return conn->water_rate; +} + +double well_conn_get_volume_rate(const well_conn_type *conn) { + return conn->volume_rate; +} + +double well_conn_get_oil_rate_si(const well_conn_type *conn) { + return conn->oil_rate; +} + +double well_conn_get_gas_rate_si(const well_conn_type *conn) { + return conn->gas_rate; +} + +double well_conn_get_water_rate_si(const well_conn_type *conn) { + return conn->water_rate; +} + +double well_conn_get_volume_rate_si(const well_conn_type *conn) { + return conn->volume_rate; +} diff --git a/ThirdParty/Ert/libecl_well/src/well_conn_collection.c b/ThirdParty/Ert/libecl_well/src/well_conn_collection.c index ee558d65cb..6277279614 100644 --- a/ThirdParty/Ert/libecl_well/src/well_conn_collection.c +++ b/ThirdParty/Ert/libecl_well/src/well_conn_collection.c @@ -104,6 +104,7 @@ int well_conn_collection_load_from_kw( well_conn_collection_type * wellcc , const ecl_kw_type * iwel_kw , const ecl_kw_type * icon_kw , const ecl_kw_type * scon_kw , + const ecl_kw_type * xcon_kw , int iwell , const ecl_rsthead_type * rst_head) { @@ -112,7 +113,7 @@ int well_conn_collection_load_from_kw( well_conn_collection_type * wellcc , int iconn; for (iconn = 0; iconn < num_connections; iconn++) { - well_conn_type * conn = well_conn_alloc_from_kw( icon_kw , scon_kw , rst_head , iwell , iconn ); + well_conn_type * conn = well_conn_alloc_from_kw( icon_kw , scon_kw, xcon_kw, rst_head , iwell , iconn ); if (conn) well_conn_collection_add( wellcc , conn ); } diff --git a/ThirdParty/Ert/libecl_well/src/well_segment_collection.c b/ThirdParty/Ert/libecl_well/src/well_segment_collection.c index 2724a9e2b4..a919ea0c33 100644 --- a/ThirdParty/Ert/libecl_well/src/well_segment_collection.c +++ b/ThirdParty/Ert/libecl_well/src/well_segment_collection.c @@ -39,7 +39,7 @@ struct well_segment_collection_struct { -well_segment_collection_type * well_segment_collection_alloc() { +well_segment_collection_type * well_segment_collection_alloc(void) { well_segment_collection_type * segment_collection = util_malloc( sizeof * segment_collection ); segment_collection->__segment_storage = vector_alloc_new(); diff --git a/ThirdParty/Ert/libecl_well/src/well_state.c b/ThirdParty/Ert/libecl_well/src/well_state.c index 1a96d02d38..06baf2e8be 100644 --- a/ThirdParty/Ert/libecl_well/src/well_state.c +++ b/ThirdParty/Ert/libecl_well/src/well_state.c @@ -37,6 +37,8 @@ #include #include #include +#include +#include #include #include @@ -169,6 +171,11 @@ struct well_state_struct { bool open; well_type_enum type; bool is_MSW_well; + double oil_rate; + double gas_rate; + double water_rate; + double volume_rate; + ert_ecl_unit_enum unit_system; hash_type * connections; // hash well_segment_collection_type * segments; @@ -201,9 +208,14 @@ well_state_type * well_state_alloc(const char * well_name , int global_well_nr , well_state->segments = well_segment_collection_alloc(); well_state->branches = well_branch_collection_alloc(); well_state->is_MSW_well = false; + well_state->oil_rate = 0; + well_state->gas_rate = 0; + well_state->water_rate = 0; + well_state->volume_rate = 0; + well_state->unit_system = ECL_METRIC_UNITS; /* See documentation of the 'IWEL_UNDOCUMENTED_ZERO' in well_const.h */ - if ((type == ERT_UNDOCUMENTED_ZERO) && open) + if ((type == ECL_WELL_ZERO) && open) util_abort("%s: Invalid type value for open wells.\n",__func__ ); return well_state; } @@ -211,6 +223,69 @@ well_state_type * well_state_alloc(const char * well_name , int global_well_nr , +double well_state_get_oil_rate( const well_state_type * well_state ) { + return well_state->oil_rate; +} + + +double well_state_get_gas_rate( const well_state_type * well_state ) { + return well_state->gas_rate; +} + + +double well_state_get_water_rate( const well_state_type * well_state) { + return well_state->water_rate; +} + +double well_state_get_volume_rate( const well_state_type * well_state) { + return well_state->volume_rate; +} + +double well_state_get_oil_rate_si( const well_state_type * well_state ) { + double conversion_factor = 1; + + if (well_state->unit_system == ECL_METRIC_UNITS) + conversion_factor = 1.0 / ECL_UNITS_TIME_DAY; + else if (well_state->unit_system == ECL_FIELD_UNITS) + conversion_factor = ECL_UNITS_VOLUME_BARREL / ECL_UNITS_TIME_DAY; + else if (well_state->unit_system == ECL_LAB_UNITS) + conversion_factor = ECL_UNITS_VOLUME_MILLI_LITER / ECL_UNITS_TIME_HOUR; + + return well_state->oil_rate * conversion_factor; +} + + +double well_state_get_gas_rate_si( const well_state_type * well_state ) { + double conversion_factor = 1; + + if (well_state->unit_system == ECL_METRIC_UNITS) + conversion_factor = 1.0 / ECL_UNITS_TIME_DAY; + else if (well_state->unit_system == ECL_FIELD_UNITS) + conversion_factor = ECL_UNITS_VOLUME_GAS_FIELD / ECL_UNITS_TIME_DAY; + else if (well_state->unit_system == ECL_LAB_UNITS) + conversion_factor = ECL_UNITS_VOLUME_MILLI_LITER / ECL_UNITS_TIME_HOUR; + + return well_state->gas_rate * conversion_factor; +} + + +double well_state_get_water_rate_si( const well_state_type * well_state) { + double conversion_factor = 1; + + if (well_state->unit_system == ECL_METRIC_UNITS) + conversion_factor = 1.0 / ECL_UNITS_TIME_DAY; + else if (well_state->unit_system == ECL_FIELD_UNITS) + conversion_factor = ECL_UNITS_VOLUME_BARREL / ECL_UNITS_TIME_DAY; + else if (well_state->unit_system == ECL_LAB_UNITS) + conversion_factor = ECL_UNITS_VOLUME_MILLI_LITER / ECL_UNITS_TIME_HOUR; + + return well_state->water_rate * conversion_factor; +} + +double well_state_get_volume_rate_si( const well_state_type * well_state) { + return well_state->volume_rate; +} + void well_state_add_wellhead( well_state_type * well_state , const ecl_rsthead_type * header , const ecl_kw_type * iwel_kw , int well_nr , const char * grid_name , int grid_nr) { well_conn_type * wellhead = well_conn_alloc_wellhead( iwel_kw , header , well_nr ); @@ -222,6 +297,27 @@ void well_state_add_wellhead( well_state_type * well_state , const ecl_rsthead_t } +static bool well_state_add_rates( well_state_type * well_state , + ecl_file_view_type * rst_view , + int well_nr) { + + bool has_xwel_kw = ecl_file_view_has_kw(rst_view, XWEL_KW); + if (has_xwel_kw) { + const ecl_kw_type *xwel_kw = ecl_file_view_iget_named_kw(rst_view, XWEL_KW, 0); + ecl_rsthead_type *header = ecl_rsthead_alloc(rst_view, -1); + int offset = header->nxwelz * well_nr; + + well_state->unit_system = header->unit_system; + well_state->oil_rate = ecl_kw_iget_double(xwel_kw, offset + XWEL_RES_ORAT_ITEM); + well_state->gas_rate = ecl_kw_iget_double(xwel_kw, offset + XWEL_RES_GRAT_ITEM); + well_state->water_rate = ecl_kw_iget_double(xwel_kw, offset + XWEL_RES_WRAT_ITEM); + well_state->volume_rate = ecl_kw_iget_double(xwel_kw, offset + XWEL_RESV_ITEM); + + ecl_rsthead_free(header); + } + return has_xwel_kw; +} + @@ -271,24 +367,24 @@ static int well_state_get_lgr_well_nr( const well_state_type * well_state , cons well_type_enum well_state_translate_ecl_type_int(int int_type) { - well_type_enum type = ERT_UNDOCUMENTED_ZERO; + well_type_enum type = ECL_WELL_ZERO; switch (int_type) { /* See documentation of the 'IWEL_UNDOCUMENTED_ZERO' in well_const.h */ case(IWEL_UNDOCUMENTED_ZERO): - type = ERT_UNDOCUMENTED_ZERO; + type = ECL_WELL_ZERO; break; case(IWEL_PRODUCER): - type = ERT_PRODUCER; + type = ECL_WELL_PRODUCER; break; case(IWEL_OIL_INJECTOR): - type = ERT_OIL_INJECTOR; + type = ECL_WELL_OIL_INJECTOR; break; case(IWEL_GAS_INJECTOR): - type = ERT_GAS_INJECTOR; + type = ECL_WELL_GAS_INJECTOR; break; case(IWEL_WATER_INJECTOR): - type = ERT_WATER_INJECTOR; + type = ECL_WELL_WATER_INJECTOR; break; default: util_abort("%s: Invalid type value %d\n",__func__ , int_type); @@ -321,11 +417,16 @@ static void well_state_add_connections__( well_state_type * well_state , { ecl_kw_type * scon_kw = NULL; - well_conn_collection_type * wellcc = hash_get( well_state->connections , grid_name ); if (ecl_file_view_has_kw( rst_view , SCON_KW)) scon_kw = ecl_file_view_iget_named_kw( rst_view , SCON_KW , 0); - well_conn_collection_load_from_kw( wellcc , iwel_kw , icon_kw , scon_kw , well_nr , header ); + ecl_kw_type * xcon_kw = NULL; + if (ecl_file_view_has_kw( rst_view , XCON_KW)) { + xcon_kw = ecl_file_view_iget_named_kw(rst_view, XCON_KW, 0); + } + + well_conn_collection_type * wellcc = hash_get( well_state->connections , grid_name ); + well_conn_collection_load_from_kw( wellcc , iwel_kw , icon_kw , scon_kw, xcon_kw , well_nr , header ); } ecl_rsthead_free( header ); } @@ -375,6 +476,7 @@ void well_state_add_connections2( well_state_type * well_state , } + bool well_state_add_MSW( well_state_type * well_state , ecl_file_type * rst_file , int well_nr, @@ -462,7 +564,7 @@ well_state_type * well_state_alloc_from_file2( ecl_file_view_type * file_view , { char * name; bool open; - well_type_enum type = ERT_UNDOCUMENTED_ZERO; + well_type_enum type = ECL_WELL_ZERO; { int int_state = ecl_kw_iget_int( global_iwel_kw , iwel_offset + IWEL_STATUS_INDEX ); if (int_state > 0) @@ -488,7 +590,7 @@ well_state_type * well_state_alloc_from_file2( ecl_file_view_type * file_view , if (ecl_file_view_has_kw( file_view , ISEG_KW)) well_state_add_MSW2( well_state , file_view , global_well_nr , load_segment_information); - + well_state_add_rates(well_state, file_view, global_well_nr); } ecl_rsthead_free( global_header ); return well_state; @@ -539,6 +641,13 @@ const well_conn_type * well_state_get_wellhead( const well_state_type * well_sta return NULL; } +const well_conn_type * well_state_get_global_wellhead( const well_state_type * well_state ) { + if (hash_has_key( well_state->name_wellhead , ECL_GRID_GLOBAL_GRID)) + return hash_get( well_state->name_wellhead , ECL_GRID_GLOBAL_GRID ); + else + return NULL; +} + well_type_enum well_state_get_type( const well_state_type * well_state){ return well_state->type; diff --git a/ThirdParty/Ert/libecl_well/src/well_ts.c b/ThirdParty/Ert/libecl_well/src/well_ts.c index 89cdeb2b10..9680131eb1 100644 --- a/ThirdParty/Ert/libecl_well/src/well_ts.c +++ b/ThirdParty/Ert/libecl_well/src/well_ts.c @@ -147,6 +147,9 @@ well_ts_type * well_ts_alloc( const char * well_name ) { return well_ts; } +char * well_ts_get_name( const well_ts_type * well_ts) { + return well_ts->well_name; +} static int well_ts_get_index__( const well_ts_type * well_ts , int report_step , time_t sim_time , bool use_report) { const int size = vector_get_size( well_ts->ts ); @@ -307,6 +310,7 @@ well_state_type * well_ts_get_last_state( const well_ts_type * well_ts) { well_state_type * well_ts_iget_state( const well_ts_type * well_ts , int index) { well_node_type * node = vector_iget( well_ts->ts , index ); + return node->well_state; } diff --git a/ThirdParty/Ert/libecl_well/tests/statoil_tests.cmake b/ThirdParty/Ert/libecl_well/tests/statoil_tests.cmake index 35cbae9e30..85be1f7494 100644 --- a/ThirdParty/Ert/libecl_well/tests/statoil_tests.cmake +++ b/ThirdParty/Ert/libecl_well/tests/statoil_tests.cmake @@ -1,9 +1,9 @@ add_executable( well_state_load well_state_load.c ) -target_link_libraries( well_state_load ecl_well test_util ) +target_link_libraries( well_state_load ecl_well ) set_target_properties( well_state_load PROPERTIES COMPILE_FLAGS "-Werror") add_executable( well_state_load_missing_RSEG well_state_load_missing_RSEG.c ) -target_link_libraries( well_state_load_missing_RSEG ecl_well test_util ) +target_link_libraries( well_state_load_missing_RSEG ecl_well ) set_target_properties( well_state_load_missing_RSEG PROPERTIES COMPILE_FLAGS "-Werror") add_test( well_state_load1 ${EXECUTABLE_OUTPUT_PATH}/well_state_load ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID @@ -29,28 +29,28 @@ add_test( well_state_load_missing_RSEG2 ${EXECUTABLE_OUTPUT_PATH}/well_state_loa add_executable( well_segment_load well_segment_load.c ) -target_link_libraries( well_segment_load ecl_well test_util ) +target_link_libraries( well_segment_load ecl_well ) set_target_properties( well_segment_load PROPERTIES COMPILE_FLAGS "-Werror") add_test( well_segment_load ${EXECUTABLE_OUTPUT_PATH}/well_segment_load ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/MSWcase/MSW_CASE.X0021) add_executable( well_segment_branch_conn_load well_segment_branch_conn_load.c ) -target_link_libraries( well_segment_branch_conn_load ecl_well test_util ) +target_link_libraries( well_segment_branch_conn_load ecl_well ) set_target_properties( well_segment_branch_conn_load PROPERTIES COMPILE_FLAGS "-Werror") add_test( well_segment_branch_conn_load ${EXECUTABLE_OUTPUT_PATH}/well_segment_branch_conn_load ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/MSWcase/MSW_CASE.X0021) add_executable( well_info well_info.c ) -target_link_libraries( well_info ecl_well test_util ) +target_link_libraries( well_info ecl_well ) set_target_properties( well_info PROPERTIES COMPILE_FLAGS "-Werror") add_test( well_info ${EXECUTABLE_OUTPUT_PATH}/well_info ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID ) add_executable( well_conn_CF well_conn_CF.c ) -target_link_libraries( well_conn_CF ecl_well test_util ) +target_link_libraries( well_conn_CF ecl_well ) add_test( well_conn_CF ${EXECUTABLE_OUTPUT_PATH}/well_conn_CF ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.X0060) add_executable( well_conn_load well_conn_load.c ) -target_link_libraries( well_conn_load ecl_well test_util ) +target_link_libraries( well_conn_load ecl_well ) set_target_properties( well_conn_load PROPERTIES COMPILE_FLAGS "-Werror") add_test( well_conn_load1 ${EXECUTABLE_OUTPUT_PATH}/well_conn_load ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.X0030 F) add_test( well_conn_load2 ${EXECUTABLE_OUTPUT_PATH}/well_conn_load ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/10kcase/TEST10K_FLT_LGR_NNC.X0021 F) @@ -60,17 +60,17 @@ add_test( well_conn_load5 ${EXECUTABLE_OUTPUT_PATH}/well_conn_load ${PROJECT_SOU add_test( well_conn_load6 ${EXECUTABLE_OUTPUT_PATH}/well_conn_load ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/0.9.2_LGR/BASE_REF_XY3Z1_T30_WI.X0003 F) add_executable( well_ts well_ts.c ) -target_link_libraries( well_ts ecl_well test_util ) +target_link_libraries( well_ts ecl_well ) add_test( well_ts ${EXECUTABLE_OUTPUT_PATH}/well_ts ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/CO2case/BASE_CASE ) add_executable( well_dualp well_dualp.c ) -target_link_libraries( well_dualp ecl_well test_util ) +target_link_libraries( well_dualp ecl_well ) add_test( well_dualp ${EXECUTABLE_OUTPUT_PATH}/well_dualp ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.UNRST ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/DualPoro/DUALPORO.X0005 ) add_executable( well_lgr_load well_lgr_load.c ) -target_link_libraries( well_lgr_load ecl_well test_util ) +target_link_libraries( well_lgr_load ecl_well ) add_test( well_lgr_load1 ${EXECUTABLE_OUTPUT_PATH}/well_lgr_load ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/0.9.2_LGR/BASE_REF_XY3Z1_T30_WI.EGRID ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/0.9.2_LGR/BASE_REF_XY3Z1_T30_WI.X0003) add_test( well_lgr_load2 ${EXECUTABLE_OUTPUT_PATH}/well_lgr_load ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/AmalgLGRcase/TESTCASE_AMALG_LGR.EGRID ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/AmalgLGRcase/TESTCASE_AMALG_LGR.X0016) diff --git a/ThirdParty/Ert/libecl_well/tests/tests.cmake b/ThirdParty/Ert/libecl_well/tests/tests.cmake index bce5831ece..20dc5381ba 100644 --- a/ThirdParty/Ert/libecl_well/tests/tests.cmake +++ b/ThirdParty/Ert/libecl_well/tests/tests.cmake @@ -1,35 +1,35 @@ add_executable( well_conn_collection well_conn_collection.c ) -target_link_libraries( well_conn_collection ecl_well test_util ) +target_link_libraries( well_conn_collection ecl_well ) set_target_properties( well_conn_collection PROPERTIES COMPILE_FLAGS "-Werror") add_test( well_conn_collection ${EXECUTABLE_OUTPUT_PATH}/well_conn_collection ) add_executable( well_branch_collection well_branch_collection.c ) -target_link_libraries( well_branch_collection ecl_well test_util ) +target_link_libraries( well_branch_collection ecl_well ) set_target_properties( well_branch_collection PROPERTIES COMPILE_FLAGS "-Werror") add_test( well_branch_collection ${EXECUTABLE_OUTPUT_PATH}/well_branch_collection ) add_executable( well_conn well_conn.c ) -target_link_libraries( well_conn ecl_well test_util ) +target_link_libraries( well_conn ecl_well ) set_target_properties( well_conn PROPERTIES COMPILE_FLAGS "-Werror") add_test( well_conn ${EXECUTABLE_OUTPUT_PATH}/well_conn ) add_executable( well_state well_state.c ) -target_link_libraries( well_state ecl_well test_util ) +target_link_libraries( well_state ecl_well ) set_target_properties( well_state PROPERTIES COMPILE_FLAGS "-Werror") add_test( well_state ${EXECUTABLE_OUTPUT_PATH}/well_state ) add_executable( well_segment well_segment.c ) -target_link_libraries( well_segment ecl_well test_util ) +target_link_libraries( well_segment ecl_well ) set_target_properties( well_segment PROPERTIES COMPILE_FLAGS "-Werror") add_test( well_segment ${EXECUTABLE_OUTPUT_PATH}/well_segment ) add_executable( well_segment_conn well_segment_conn.c ) -target_link_libraries( well_segment_conn ecl_well test_util ) +target_link_libraries( well_segment_conn ecl_well ) set_target_properties( well_segment_conn PROPERTIES COMPILE_FLAGS "-Werror") add_test( well_segment_conn ${EXECUTABLE_OUTPUT_PATH}/well_segment_conn ) add_executable( well_segment_collection well_segment_collection.c ) -target_link_libraries( well_segment_collection ecl_well test_util ) +target_link_libraries( well_segment_collection ecl_well ) set_target_properties( well_segment_collection PROPERTIES COMPILE_FLAGS "-Werror") add_test( well_segment_collection ${EXECUTABLE_OUTPUT_PATH}/well_segment_collection ) diff --git a/ThirdParty/Ert/libecl_well/tests/well_conn.c b/ThirdParty/Ert/libecl_well/tests/well_conn.c index 8e52239243..b788d95f7c 100644 --- a/ThirdParty/Ert/libecl_well/tests/well_conn.c +++ b/ThirdParty/Ert/libecl_well/tests/well_conn.c @@ -28,6 +28,29 @@ #include #include +void test_conn_rate(){ + int i = 10; + int j = 5; + int k = 16; + double CF = 0; + bool open = true; + + well_conn_dir_enum dir = well_conn_dirX; + well_conn_type * conn = well_conn_alloc(i,j,k,CF,dir,open); + + test_assert_double_equal(0.0, well_conn_get_oil_rate(conn)); + test_assert_double_equal(0.0, well_conn_get_gas_rate(conn)); + test_assert_double_equal(0.0, well_conn_get_water_rate(conn)); + test_assert_double_equal(0.0, well_conn_get_volume_rate(conn)); + + test_assert_double_equal(0.0, well_conn_get_oil_rate_si(conn)); + test_assert_double_equal(0.0, well_conn_get_gas_rate_si(conn)); + test_assert_double_equal(0.0, well_conn_get_water_rate_si(conn)); + test_assert_double_equal(0.0, well_conn_get_volume_rate_si(conn)); + + well_conn_free( conn ); +} + int main(int argc , char ** argv) { int i = 10; @@ -118,8 +141,7 @@ int main(int argc , char ** argv) { test_assert_false( well_conn_matrix_connection( conn )); well_conn_free( conn ); } - - + test_conn_rate(); } diff --git a/ThirdParty/Ert/libecl_well/tests/well_conn_CF.c b/ThirdParty/Ert/libecl_well/tests/well_conn_CF.c index 2931d862cc..8ff2c0411c 100644 --- a/ThirdParty/Ert/libecl_well/tests/well_conn_CF.c +++ b/ThirdParty/Ert/libecl_well/tests/well_conn_CF.c @@ -32,8 +32,8 @@ #include -void well_conn_test_CF( const ecl_kw_type * iwel_kw , const ecl_kw_type * icon_kw , const ecl_kw_type * scon_kw , const const ecl_rsthead_type * rst_head , int iwell , int iconn, double CF) { - well_conn_type * conn = well_conn_alloc_from_kw( icon_kw , scon_kw , rst_head , iwell , iconn ); +void well_conn_test_CF( const ecl_kw_type * iwel_kw , const ecl_kw_type * icon_kw , const ecl_kw_type * scon_kw, const ecl_kw_type * xcon_kw , const const ecl_rsthead_type * rst_head , int iwell , int iconn, double CF) { + well_conn_type * conn = well_conn_alloc_from_kw( icon_kw , scon_kw, xcon_kw , rst_head , iwell , iconn ); test_assert_double_equal( CF , well_conn_get_connection_factor(conn)); well_conn_free( conn ); } @@ -49,18 +49,19 @@ int main(int argc , char ** argv) { const ecl_kw_type * iwel_kw = ecl_file_iget_named_kw( rst_file , IWEL_KW , 0 ); const ecl_kw_type * icon_kw = ecl_file_iget_named_kw( rst_file , ICON_KW , 0 ); const ecl_kw_type * scon_kw = ecl_file_iget_named_kw( rst_file , SCON_KW , 0 ); + const ecl_kw_type * xcon_kw = 0; - well_conn_test_CF(iwel_kw , icon_kw , scon_kw , rst_head , 0 , 0 , 32.948 ); - well_conn_test_CF(iwel_kw , icon_kw , scon_kw , rst_head , 0 , 1 , 46.825 ); - well_conn_test_CF(iwel_kw , icon_kw , scon_kw , rst_head , 0 , 2 , 51.867 ); + well_conn_test_CF(iwel_kw , icon_kw , scon_kw, xcon_kw, rst_head , 0 , 0 , 32.948 ); + well_conn_test_CF(iwel_kw , icon_kw , scon_kw, xcon_kw , rst_head , 0 , 1 , 46.825 ); + well_conn_test_CF(iwel_kw , icon_kw , scon_kw, xcon_kw , rst_head , 0 , 2 , 51.867 ); - well_conn_test_CF(iwel_kw , icon_kw , scon_kw , rst_head , 1 , 0 , 1.168 ); - well_conn_test_CF(iwel_kw , icon_kw , scon_kw , rst_head , 1 , 1 , 15.071 ); - well_conn_test_CF(iwel_kw , icon_kw , scon_kw , rst_head , 1 , 2 , 6.242 ); + well_conn_test_CF(iwel_kw , icon_kw , scon_kw, xcon_kw , rst_head , 1 , 0 , 1.168 ); + well_conn_test_CF(iwel_kw , icon_kw , scon_kw, xcon_kw , rst_head , 1 , 1 , 15.071 ); + well_conn_test_CF(iwel_kw , icon_kw , scon_kw, xcon_kw , rst_head , 1 , 2 , 6.242 ); - well_conn_test_CF(iwel_kw , icon_kw , scon_kw , rst_head , 2 , 0 , 27.412 ); - well_conn_test_CF(iwel_kw , icon_kw , scon_kw , rst_head , 2 , 1 , 55.195 ); - well_conn_test_CF(iwel_kw , icon_kw , scon_kw , rst_head , 2 , 2 , 18.032 ); + well_conn_test_CF(iwel_kw , icon_kw , scon_kw, xcon_kw , rst_head , 2 , 0 , 27.412 ); + well_conn_test_CF(iwel_kw , icon_kw , scon_kw, xcon_kw , rst_head , 2 , 1 , 55.195 ); + well_conn_test_CF(iwel_kw , icon_kw , scon_kw, xcon_kw , rst_head , 2 , 2 , 18.032 ); ecl_file_close( rst_file ); ecl_rsthead_free( rst_head ); diff --git a/ThirdParty/Ert/libecl_well/tests/well_conn_load.c b/ThirdParty/Ert/libecl_well/tests/well_conn_load.c index 085849ccbc..ec4a8f3d70 100644 --- a/ThirdParty/Ert/libecl_well/tests/well_conn_load.c +++ b/ThirdParty/Ert/libecl_well/tests/well_conn_load.c @@ -49,6 +49,7 @@ int main(int argc , char ** argv) { const ecl_kw_type * iwel_kw = ecl_file_iget_named_kw( rst_file , IWEL_KW , 0 ); const ecl_kw_type * icon_kw = ecl_file_iget_named_kw( rst_file , ICON_KW , 0 ); ecl_kw_type * scon_kw = NULL; + ecl_kw_type * xcon_kw = NULL; bool caseMSW = false; @@ -60,7 +61,7 @@ int main(int argc , char ** argv) { well_conn_collection_type * wellcc_ref = well_conn_collection_alloc(); for (iconn = 0; iconn < num_connections; iconn++) { - well_conn_type * conn = well_conn_alloc_from_kw( icon_kw , scon_kw , rst_head , iwell , iconn ); + well_conn_type * conn = well_conn_alloc_from_kw( icon_kw , scon_kw , xcon_kw, rst_head , iwell , iconn ); test_assert_true( well_conn_is_instance( conn )); test_assert_not_NULL( conn ); @@ -88,7 +89,7 @@ int main(int argc , char ** argv) { int i; test_assert_int_equal( well_conn_collection_get_size( wellcc ) , - well_conn_collection_load_from_kw( wellcc2 , iwel_kw , icon_kw , scon_kw , iwell , rst_head)); + well_conn_collection_load_from_kw( wellcc2 , iwel_kw , icon_kw , scon_kw, xcon_kw, iwell , rst_head)); for (i=0; i < well_conn_collection_get_size( wellcc2 ); i++) { test_assert_true( well_conn_is_instance( well_conn_collection_iget_const( wellcc2 , i ))); diff --git a/ThirdParty/Ert/libecl_well/tests/well_segment_branch_conn_load.c b/ThirdParty/Ert/libecl_well/tests/well_segment_branch_conn_load.c index 784f86ad10..05e71495d3 100644 --- a/ThirdParty/Ert/libecl_well/tests/well_segment_branch_conn_load.c +++ b/ThirdParty/Ert/libecl_well/tests/well_segment_branch_conn_load.c @@ -46,6 +46,7 @@ int main(int argc , char ** argv) { well_rseg_loader_type * rseg_loader = well_rseg_loader_alloc(rst_view); const ecl_kw_type * icon_kw = ecl_file_iget_named_kw( rst_file , ICON_KW , 0 ); const ecl_kw_type * scon_kw = NULL; + const ecl_kw_type * xcon_kw = NULL; test_install_SIGNALS(); test_assert_not_NULL( rst_file ); @@ -54,7 +55,7 @@ int main(int argc , char ** argv) { int well_nr; for (well_nr = 0; well_nr < rst_head->nwells; well_nr++) { well_conn_collection_type * connections = well_conn_collection_alloc(); - well_conn_collection_load_from_kw( connections , iwel_kw , icon_kw , scon_kw , well_nr , rst_head); + well_conn_collection_load_from_kw( connections , iwel_kw , icon_kw , scon_kw, xcon_kw, well_nr , rst_head); { well_segment_collection_type * segments = well_segment_collection_alloc(); bool load_segment_information = true; diff --git a/ThirdParty/Ert/libecl_well/tests/well_state.c b/ThirdParty/Ert/libecl_well/tests/well_state.c index e8a4e94e63..111e858a06 100644 --- a/ThirdParty/Ert/libecl_well/tests/well_state.c +++ b/ThirdParty/Ert/libecl_well/tests/well_state.c @@ -30,19 +30,19 @@ int main(int argc , char ** argv) { test_install_SIGNALS(); - test_assert_int_equal( well_state_translate_ecl_type_int( IWEL_UNDOCUMENTED_ZERO) , ERT_UNDOCUMENTED_ZERO); - test_assert_int_equal( well_state_translate_ecl_type_int( IWEL_PRODUCER) , ERT_PRODUCER); - test_assert_int_equal( well_state_translate_ecl_type_int( IWEL_WATER_INJECTOR) , ERT_WATER_INJECTOR); - test_assert_int_equal( well_state_translate_ecl_type_int( IWEL_GAS_INJECTOR) , ERT_GAS_INJECTOR); - test_assert_int_equal( well_state_translate_ecl_type_int( IWEL_OIL_INJECTOR) , ERT_OIL_INJECTOR); - + test_assert_int_equal( well_state_translate_ecl_type_int( IWEL_UNDOCUMENTED_ZERO) , ECL_WELL_ZERO); + test_assert_int_equal( well_state_translate_ecl_type_int( IWEL_PRODUCER) , ECL_WELL_PRODUCER); + test_assert_int_equal( well_state_translate_ecl_type_int( IWEL_WATER_INJECTOR) , ECL_WELL_WATER_INJECTOR); + test_assert_int_equal( well_state_translate_ecl_type_int( IWEL_GAS_INJECTOR) , ECL_WELL_GAS_INJECTOR); + test_assert_int_equal( well_state_translate_ecl_type_int( IWEL_OIL_INJECTOR) , ECL_WELL_OIL_INJECTOR); + { const char * well_name = "WELL"; int report_nr = 100; int global_well_nr = 67; time_t valid_from = -1; bool open = false; - well_type_enum type = ERT_GAS_INJECTOR; + well_type_enum type = ECL_WELL_GAS_INJECTOR; well_state_type * well_state = well_state_alloc(well_name , global_well_nr , open , type , report_nr , valid_from); test_assert_true( well_state_is_instance( well_state) ); @@ -59,9 +59,13 @@ int main(int argc , char ** argv) { test_assert_false( well_state_has_global_connections( well_state )); test_assert_NULL( well_state_get_grid_connections( well_state , "GRID")); test_assert_false( well_state_has_grid_connections( well_state , "GRID")); - + + test_assert_double_equal( 0.0, well_state_get_oil_rate( well_state )); + test_assert_double_equal( 0.0, well_state_get_gas_rate( well_state )); + test_assert_double_equal( 0.0, well_state_get_water_rate( well_state )); + test_assert_double_equal( 0.0, well_state_get_volume_rate( well_state )); + well_state_free( well_state ); } - exit(0); } diff --git a/ThirdParty/Ert/libecl_well/tests/well_state_load.c b/ThirdParty/Ert/libecl_well/tests/well_state_load.c index d187dfdaf2..9957e3a19d 100644 --- a/ThirdParty/Ert/libecl_well/tests/well_state_load.c +++ b/ThirdParty/Ert/libecl_well/tests/well_state_load.c @@ -43,7 +43,7 @@ int main(int argc , char ** argv) { int report_nr = 100; time_t valid_from = -1; bool open = false; - well_type_enum type = ERT_GAS_INJECTOR; + well_type_enum type = ECL_WELL_GAS_INJECTOR; int global_well_nr = 0; bool load_segment_information = true; ecl_file_view_type * rst_view = ecl_file_get_global_view( rst_file ); diff --git a/ThirdParty/Ert/libecl_well/tests/well_state_load_missing_RSEG.c b/ThirdParty/Ert/libecl_well/tests/well_state_load_missing_RSEG.c index 78ee41b14b..503526232d 100644 --- a/ThirdParty/Ert/libecl_well/tests/well_state_load_missing_RSEG.c +++ b/ThirdParty/Ert/libecl_well/tests/well_state_load_missing_RSEG.c @@ -44,7 +44,7 @@ int main(int argc , char ** argv) { int report_nr = 100; time_t valid_from = -1; bool open = false; - well_type_enum type = ERT_GAS_INJECTOR; + well_type_enum type = ECL_WELL_GAS_INJECTOR; int global_well_nr = 0; bool load_segment_information = false; diff --git a/ThirdParty/Ert/libeclxx/include/ert/ecl/EclFilename.hpp b/ThirdParty/Ert/libeclxx/include/ert/ecl/EclFilename.hpp new file mode 100644 index 0000000000..dafe8176b9 --- /dev/null +++ b/ThirdParty/Ert/libeclxx/include/ert/ecl/EclFilename.hpp @@ -0,0 +1,34 @@ +/* + Copyright (C) 2017 Statoil ASA, Norway. + + This file is part of ERT - Ensemble based Reservoir Tool. + + ERT 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. + + ERT 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 + for more details. +*/ + +#ifndef ERT_ECL_FILEMAME_HPP +#define ERT_ECL_FILEMAME_HPP +#include + +#include + +namespace ERT { + std::string EclFilename( const std::string& base, ecl_file_enum file_type , int report_step, bool fmt_file = false); + std::string EclFilename( const std::string& base, ecl_file_enum file_type , bool fmt_file = false); + + std::string EclFilename( const std::string& path, const std::string& base, ecl_file_enum file_type , int report_step, bool fmt_file = false); + std::string EclFilename( const std::string& path, const std::string& base, ecl_file_enum file_type , bool fmt_file = false); + + ecl_file_enum EclFiletype( const std::string& filename ); +} +#endif diff --git a/ThirdParty/Ert/libeclxx/include/ert/ecl/EclKW.hpp b/ThirdParty/Ert/libeclxx/include/ert/ecl/EclKW.hpp index 07b40bbcfa..d703a71751 100644 --- a/ThirdParty/Ert/libeclxx/include/ert/ecl/EclKW.hpp +++ b/ThirdParty/Ert/libeclxx/include/ert/ecl/EclKW.hpp @@ -28,11 +28,11 @@ #include #include +#include #include #include - namespace ERT { template< typename > struct ecl_type {}; @@ -55,7 +55,7 @@ namespace ERT { class EclKW_ref { public: explicit EclKW_ref( ecl_kw_type* kw ) : m_kw( kw ) { - if( ecl_kw_get_type( kw ) != ecl_type< T >::type ) + if( ecl_type_get_type(ecl_kw_get_data_type( kw )) != ecl_type< T >::type ) throw std::invalid_argument("Type error"); } @@ -77,6 +77,10 @@ namespace ERT { return *static_cast< T* >( ecl_kw_iget_ptr( this->m_kw, i ) ); } + T& operator[](size_t i) { + return *static_cast< T* >( ecl_kw_iget_ptr( this->m_kw, i ) ); + } + const typename std::remove_pointer< T >::type* data() const { using Tp = const typename std::remove_pointer< T >::type*; return static_cast< Tp >( ecl_kw_get_ptr( this->m_kw ) ); @@ -86,6 +90,10 @@ namespace ERT { return this->m_kw; } + void resize(size_t new_size) { + ecl_kw_resize( this->m_kw , new_size ); + } + protected: ecl_kw_type* m_kw = nullptr; }; @@ -95,6 +103,17 @@ inline const char* EclKW_ref< const char* >::at( size_t i ) const { return ecl_kw_iget_char_ptr( this->m_kw, i ); } + +/* + The current implementation of "string" storage in the underlying C + ecl_kw structure does not lend itself to easily implement + operator[]. We have therefor explicitly deleted it here. +*/ + +template<> +const char*& EclKW_ref< const char* >::operator[]( size_t i ) = delete; + + template< typename T > class EclKW : public EclKW_ref< T > { private: @@ -113,7 +132,7 @@ class EclKW : public EclKW_ref< T > { } EclKW( const std::string& kw, int size_ ) : - base( ecl_kw_alloc( kw.c_str(), size_, ecl_type< T >::type ) ) + base( ecl_kw_alloc( kw.c_str(), size_, ecl_type_create_from_type(ecl_type< T >::type) ) ) {} EclKW( const std::string& kw, const std::vector< T >& data ) : diff --git a/ThirdParty/Ert/libeclxx/src/CMakeLists.txt b/ThirdParty/Ert/libeclxx/src/CMakeLists.txt index 23ea7fb1d2..4a108238a8 100644 --- a/ThirdParty/Ert/libeclxx/src/CMakeLists.txt +++ b/ThirdParty/Ert/libeclxx/src/CMakeLists.txt @@ -1,16 +1,18 @@ set( source_files FortIO.cpp Smspec.cpp + EclFilename.cpp ) set( header_files EclKW.hpp FortIO.hpp Smspec.hpp + EclFilename.hpp ) -add_library( eclxx ${LIBRARY_TYPE} ${source_files} ) +add_library( eclxx ${source_files} ) set_target_properties( eclxx PROPERTIES VERSION ${ERT_VERSION_MAJOR}.${ERT_VERSION_MINOR} SOVERSION ${ERT_VERSION_MAJOR}) if (USE_RUNPATH) add_runpath( eclxx ) diff --git a/ThirdParty/Ert/libeclxx/src/EclFilename.cpp b/ThirdParty/Ert/libeclxx/src/EclFilename.cpp new file mode 100644 index 0000000000..225ad52b46 --- /dev/null +++ b/ThirdParty/Ert/libeclxx/src/EclFilename.cpp @@ -0,0 +1,77 @@ +/* + Copyright (C) 2017 Statoil ASA, Norway. + + This file is part of ERT - Ensemble based Reservoir Tool. + + ERT 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. + + ERT 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 + for more details. +*/ + +#include +#include + +#include + +namespace ERT { + +std::string EclFilename( const std::string& path, const std::string& base, ecl_file_enum file_type , int report_step, bool fmt_file) { + char* tmp = ecl_util_alloc_filename( path.c_str(), base.c_str(), file_type, fmt_file , report_step ); + std::string retval = tmp; + free(tmp); + return retval; +} + +std::string EclFilename( const std::string& base, ecl_file_enum file_type , int report_step, bool fmt_file) { + char* tmp = ecl_util_alloc_filename( nullptr, base.c_str(), file_type, fmt_file , report_step ); + std::string retval = tmp; + free(tmp); + return retval; +} + +namespace { + bool require_report_step( ecl_file_enum file_type ) { + if ((file_type == ECL_RESTART_FILE) || (file_type == ECL_SUMMARY_FILE)) + return true; + else + return false; + } +} + +std::string EclFilename( const std::string& path, const std::string& base, ecl_file_enum file_type , bool fmt_file) { + if (require_report_step( file_type )) + throw std::runtime_error("Must use overload with report step for this file type"); + else { + char* tmp = ecl_util_alloc_filename( path.c_str(), base.c_str(), file_type, fmt_file , -1); + std::string retval = tmp; + free(tmp); + return retval; + } +} + + +std::string EclFilename( const std::string& base, ecl_file_enum file_type , bool fmt_file) { + if (require_report_step( file_type )) + throw std::runtime_error("Must use overload with report step for this file type"); + else { + char* tmp = ecl_util_alloc_filename( nullptr , base.c_str(), file_type, fmt_file , -1); + std::string retval = tmp; + free(tmp); + return retval; + } +} + + +ecl_file_enum EclFiletype(const std::string& filename) { + return ecl_util_get_file_type( filename.c_str(), nullptr, nullptr ); +} + +} diff --git a/ThirdParty/Ert/libeclxx/tests/CMakeLists.txt b/ThirdParty/Ert/libeclxx/tests/CMakeLists.txt index fcd01abceb..be233b2ae3 100644 --- a/ThirdParty/Ert/libeclxx/tests/CMakeLists.txt +++ b/ThirdParty/Ert/libeclxx/tests/CMakeLists.txt @@ -1,11 +1,19 @@ add_executable(eclxx_kw eclxx_kw.cpp) -target_link_libraries(eclxx_kw eclxx test_util ert_utilxx) +target_link_libraries(eclxx_kw eclxx ert_utilxx) add_test(eclxx_kw ${EXECUTABLE_OUTPUT_PATH}/eclxx_kw) add_executable(eclxx_fortio eclxx_fortio.cpp) -target_link_libraries(eclxx_fortio eclxx test_util ert_utilxx) +target_link_libraries(eclxx_fortio eclxx ert_utilxx) add_test(eclxx_fortio ${EXECUTABLE_OUTPUT_PATH}/eclxx_fortio) add_executable(eclxx_smspec eclxx_smspec.cpp) -target_link_libraries(eclxx_smspec eclxx test_util ert_utilxx) +target_link_libraries(eclxx_smspec eclxx ert_utilxx) add_test(eclxx_smspec ${EXECUTABLE_OUTPUT_PATH}/eclxx_smspec) + +add_executable(eclxx_filename eclxx_filename.cpp) +target_link_libraries(eclxx_filename eclxx ert_utilxx) +add_test(eclxx_filename ${EXECUTABLE_OUTPUT_PATH}/eclxx_filename) + +add_executable(eclxx_types eclxx_types.cpp) +target_link_libraries(eclxx_types eclxx ert_utilxx) +add_test(eclxx_types ${EXECUTABLE_OUTPUT_PATH}/eclxx_types) diff --git a/ThirdParty/Ert/libeclxx/tests/eclxx_filename.cpp b/ThirdParty/Ert/libeclxx/tests/eclxx_filename.cpp new file mode 100644 index 0000000000..5ad49e6776 --- /dev/null +++ b/ThirdParty/Ert/libeclxx/tests/eclxx_filename.cpp @@ -0,0 +1,67 @@ +/* + Copyright (C) 2017 Statoil ASA, Norway. + + This file is part of ERT - Ensemble based Reservoir Tool. + + ERT 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. + + ERT 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 + for more details. +*/ + +#include +#include + + +void cmp(const char * expected, const std::string& value) { + test_assert_string_equal( expected , value.c_str()); +} + + +int main (int argc, char **argv) { + cmp( "BASE.X0067" , ERT::EclFilename("BASE" , ECL_RESTART_FILE , 67 )); + cmp( "BASE.F0067" , ERT::EclFilename("BASE" , ECL_RESTART_FILE , 67 , true)); + + cmp( "BASE.EGRID" , ERT::EclFilename("BASE" , ECL_EGRID_FILE )); + cmp( "BASE.FEGRID" , ERT::EclFilename("BASE" , ECL_EGRID_FILE , true)); + + cmp( "BASE.EGRID" , ERT::EclFilename("BASE" , ECL_EGRID_FILE , 67)); + cmp( "BASE.FEGRID" , ERT::EclFilename("BASE" , ECL_EGRID_FILE , 67 , true)); + + + try { + ERT::EclFilename("BASE" , ECL_RESTART_FILE ); + test_assert_true( false ); + } catch (...) { + test_assert_true( true ); + } + + + cmp( "PATH/BASE.X0067" , ERT::EclFilename("PATH", "BASE" , ECL_RESTART_FILE , 67 )); + cmp( "PATH/BASE.F0067" , ERT::EclFilename("PATH", "BASE" , ECL_RESTART_FILE , 67 , true)); + + cmp( "PATH/BASE.EGRID" , ERT::EclFilename("PATH", "BASE" , ECL_EGRID_FILE )); + cmp( "PATH/BASE.FEGRID" , ERT::EclFilename("PATH", "BASE" , ECL_EGRID_FILE , true)); + + cmp( "PATH/BASE.EGRID" , ERT::EclFilename("PATH", "BASE" , ECL_EGRID_FILE , 67)); + cmp( "PATH/BASE.FEGRID" , ERT::EclFilename("PATH", "BASE" , ECL_EGRID_FILE , 67 , true)); + + + try { + ERT::EclFilename("PATH", "BASE" , ECL_RESTART_FILE ); + test_assert_true( false ); + } catch (...) { + test_assert_true( true ); + } + + test_assert_int_equal( ECL_EGRID_FILE , ERT::EclFiletype("CASE.EGRID" ) ); + test_assert_int_equal( ECL_RESTART_FILE , ERT::EclFiletype("CASE.F0098") ); + test_assert_int_equal( ECL_UNIFIED_RESTART_FILE , ERT::EclFiletype("CASE.UNRST") ); +} diff --git a/ThirdParty/Ert/libeclxx/tests/eclxx_kw.cpp b/ThirdParty/Ert/libeclxx/tests/eclxx_kw.cpp index 350ce3e49a..3191250797 100644 --- a/ThirdParty/Ert/libeclxx/tests/eclxx_kw.cpp +++ b/ThirdParty/Ert/libeclxx/tests/eclxx_kw.cpp @@ -39,8 +39,15 @@ void test_kw_vector_assign() { test_assert_size_t_equal( kw.size(), vec.size() ); - for( size_t i = 0; i < kw.size(); ++i ) + for( size_t i = 0; i < kw.size(); ++i ) { test_assert_int_equal( kw.at( i ), vec[ i ] ); + test_assert_int_equal( kw[ i ] , vec[ i ] ); + } + + for( size_t i = 0; i < kw.size(); ++i ) { + kw[i] *= 2; + test_assert_int_equal( kw[ i ] , 2*vec[ i ] ); + } } void test_kw_vector_string() { @@ -71,7 +78,7 @@ void test_move_semantics_no_crash() { } void test_exception_assing_ref_wrong_type() { - auto* ptr = ecl_kw_alloc( "XYZ", 1, ECL_INT_TYPE ); + auto* ptr = ecl_kw_alloc( "XYZ", 1, ECL_INT ); try { ERT::EclKW< double > kw( ptr ); @@ -81,10 +88,21 @@ void test_exception_assing_ref_wrong_type() { } } +void test_resize() { + ERT::EclKW< int > kw1( "short", 1 ); + + test_assert_int_equal( kw1.size() , 1 ); + kw1.resize( 100 ); + test_assert_int_equal( kw1.size() , 100 ); +} + + int main (int argc, char **argv) { test_kw_name(); test_kw_vector_assign(); test_kw_vector_string(); test_move_semantics_no_crash(); test_exception_assing_ref_wrong_type(); + test_resize(); } + diff --git a/ThirdParty/Ert/libeclxx/tests/eclxx_types.cpp b/ThirdParty/Ert/libeclxx/tests/eclxx_types.cpp new file mode 100644 index 0000000000..2ecd3add39 --- /dev/null +++ b/ThirdParty/Ert/libeclxx/tests/eclxx_types.cpp @@ -0,0 +1,63 @@ +/* + Copyright (C) 2017 Statoil ASA, Norway. + + This file is part of ERT - Ensemble based Reservoir Tool. + + ERT 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. + + ERT 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 + for more details. +*/ + +#include +#include + + +#include +#include +#include +#include + + +void test_ECL_INT() { + ecl_data_type dt = ECL_INT; + test_assert_int_equal( dt.element_size , sizeof(int) ); + test_assert_int_equal( dt.type , ECL_INT_TYPE ); +} + + +void test_ECL_FLOAT() { + ecl_data_type dt = ECL_FLOAT; + test_assert_int_equal( dt.element_size , sizeof(float) ); + test_assert_int_equal( dt.type , ECL_FLOAT_TYPE ); +} + + +void test_ECL_DOUBLE() { + ecl_data_type dt = ECL_DOUBLE; + test_assert_int_equal( dt.element_size , sizeof(double) ); + test_assert_int_equal( dt.type , ECL_DOUBLE_TYPE ); +} + + +void test_ECL_CHAR() { + ecl_data_type dt = ECL_CHAR; + test_assert_int_equal( dt.element_size , ECL_STRING8_LENGTH + 1 ); + test_assert_int_equal( dt.type , ECL_CHAR_TYPE ); +} + + + +int main(int argc , char ** argv) { + test_ECL_INT(); + test_ECL_FLOAT(); + test_ECL_DOUBLE(); + test_ECL_CHAR(); +} diff --git a/ThirdParty/Ert/libenkf/CMakeLists.txt b/ThirdParty/Ert/libenkf/CMakeLists.txt deleted file mode 100644 index d6f06317db..0000000000 --- a/ThirdParty/Ert/libenkf/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -add_subdirectory( src ) -add_subdirectory( applications/ert_tui ) -if (BUILD_TESTS) - add_subdirectory( tests ) -endif() diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/CMake/config/ert_build_config_file.h.in b/ThirdParty/Ert/libenkf/applications/ert_tui/CMake/config/ert_build_config_file.h.in deleted file mode 100644 index 89829a9a18..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/CMake/config/ert_build_config_file.h.in +++ /dev/null @@ -1,3 +0,0 @@ -#define SITE_CONFIG_FILE "@SITE_CONFIG_FILE@" -#define COMPILE_TIME_STAMP "@COMPILE_TIME_STAMP@" -#define SVN_VERSION "@SVN_VERSION@" diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/CMakeLists.txt b/ThirdParty/Ert/libenkf/applications/ert_tui/CMakeLists.txt deleted file mode 100644 index 10b40fc1f4..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/CMakeLists.txt +++ /dev/null @@ -1,35 +0,0 @@ -include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ) - -set( src_list main.c enkf_tui_main.c enkf_tui_fs.c enkf_tui_ranking.c enkf_tui_misc.c enkf_tui_table.c - enkf_tui_run.c enkf_tui_util.c enkf_tui_init.c enkf_tui_export.c enkf_tui_analysis.c enkf_tui_help.c enkf_tui_simple.c enkf_tui_workflow.c) - -execute_process(COMMAND date "+%Y-%m-%d %H:%M:%S" OUTPUT_VARIABLE BUILD_TIME ) -string(STRIP ${BUILD_TIME} BUILD_TIME) - -find_package(Git) -if(GIT_EXECUTABLE) - execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse HEAD - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - OUTPUT_VARIABLE GIT_COMMIT) - string(STRIP "${GIT_COMMIT}" GIT_COMMIT) -else() - set(GIT_COMMIT) -endif() - -set_source_files_properties( main.c PROPERTIES COMPILE_DEFINITIONS "COMPILE_TIME_STAMP=\"${BUILD_TIME}\";GIT_COMMIT=\"${GIT_COMMIT}\"") - -add_executable( ert_tui ${src_list} ) -target_link_libraries( ert_tui enkf sched rms ecl config job_queue analysis ert_util ) -if (USE_RUNPATH) - add_runpath( ert_tui ) -endif() - -set (destination ${CMAKE_INSTALL_PREFIX}/bin) - -if (INSTALL_ERT) - install(TARGETS ert_tui DESTINATION ${destination}) - if (INSTALL_GROUP) - install(CODE "EXECUTE_PROCESS(COMMAND chgrp ${INSTALL_GROUP} ${destination}/ert_tui)") - install(CODE "EXECUTE_PROCESS(COMMAND chmod g+w ${destination}/ert_tui)") - endif() -endif() diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/ERT.h b/ThirdParty/Ert/libenkf/applications/ert_tui/ERT.h deleted file mode 100644 index 5993a6b4a0..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/ERT.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'ERT.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#define SPLASH_LENGTH 11 -const char * splash_text[SPLASH_LENGTH] = { - " _________________________________ ", - " / \\", - " | ______ ______ _______ |", - " | | ____| | __ \\ |__ __| |", - " | | |__ | |__) | | | |", - " | | __| | _ / | | |", - " | | |____ | | \\ \\ | | |", - " | |______| |_| \\_\\ |_| |", - " | |", - " | Ensemble based Reservoir Tool |", - " \\_________________________________/"}; - - - diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_QC.h b/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_QC.h deleted file mode 100644 index 137de3cb05..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_QC.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'enkf_tui_QC.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENKF_TUI_QC_H -#define ERT_ENKF_TUI_QC_H - - - -void enkf_tui_QC_menu(void * ); - - - -#endif diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_analysis.c b/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_analysis.c deleted file mode 100644 index 577b151a72..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_analysis.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_tui_analysis.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include - - - -void enkf_tui_analysis_scale_observation_std__(void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast(arg); - - double scale_factor = enkf_tui_util_scanf_double_with_lower_limit("Global scaling factor", PROMPT_LEN, 0); - - if (enkf_main_have_obs(enkf_main)) { - enkf_obs_type * observations = enkf_main_get_obs(enkf_main); - enkf_obs_scale_std(observations, scale_factor); - } -} - - - - - - -static void enkf_tui_analysis_update_title( enkf_main_type * enkf_main , menu_type * menu ) { - analysis_config_type * analysis_config = enkf_main_get_analysis_config( enkf_main ); - analysis_module_type * analysis_module = analysis_config_get_active_module( analysis_config ); - char * title = util_alloc_sprintf("Analysis menu [Current module:%s]" , analysis_module_get_name( analysis_module )); - menu_set_title( menu , title ); - free( title ); -} - - -void enkf_tui_analysis_select_module__(void * arg) { - int prompt_len = 50; - arg_pack_type * arg_pack = arg_pack_safe_cast( arg ); - enkf_main_type * enkf_main = arg_pack_iget_ptr( arg_pack , 0 ); - menu_type * menu = arg_pack_iget_ptr( arg_pack , 1 ); - - { - analysis_config_type * analysis_config = enkf_main_get_analysis_config( enkf_main ); - char module_name[256]; - util_printf_prompt("Name module to select" , prompt_len , '=' , "=> "); - scanf("%s", module_name); - if (analysis_config_select_module( analysis_config , module_name )) - enkf_tui_analysis_update_title( enkf_main , menu ); - } -} - - -void enkf_tui_analysis_list_modules__(void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - analysis_config_type * analysis_config = enkf_main_get_analysis_config( enkf_main ); - - printf("Available modules: "); - { - stringlist_type * modules = analysis_config_alloc_module_names( analysis_config ); - stringlist_fprintf( modules , " " , stdout ); - printf("\n"); - stringlist_free( modules ); - } -} - - -void enkf_tui_analysis_reload_module__(void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - analysis_config_type * analysis_config = enkf_main_get_analysis_config( enkf_main ); - analysis_config_reload_module( analysis_config , NULL ); -} - - -void enkf_tui_analysis_update_module__(void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - int prompt_len = 50; - { - analysis_config_type * analysis_config = enkf_main_get_analysis_config( enkf_main ); - analysis_module_type * analysis_module = analysis_config_get_active_module( analysis_config ); - char var_name[256]; - char value[256]; - - util_printf_prompt("Variable to modify" , prompt_len , '=' , "=> "); - scanf("%s", var_name); - { - char * value_prompt = util_alloc_sprintf("New value for %s" , var_name); - util_printf_prompt(value_prompt , prompt_len , '=' , "=> "); - free( value_prompt ); - } - scanf("%s", value); - - if (analysis_module_set_var( analysis_module , var_name , value)) - printf("\'%s\' successfully set to \'%s\' \n",var_name , value); - else - printf("** Variable/type combination: %s/%s not recognized \n", var_name , value); - - } -} - - - - -void enkf_tui_analysis_menu(void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - menu_type * menu = menu_alloc( "Analysis menu" , "Back" , "bB"); - - arg_pack_type * arg_pack = arg_pack_alloc(); - arg_pack_append_ptr( arg_pack , enkf_main ); - arg_pack_append_ptr( arg_pack , menu ); - - { - enkf_tui_analysis_update_title(enkf_main, menu); - - if (enkf_main_have_obs(enkf_main)) { - menu_add_item(menu, "Global scaling of uncertainty", "gG", enkf_tui_analysis_scale_observation_std__, enkf_main, NULL); - menu_add_separator(menu); - } - - menu_add_item(menu, "Select analysis module", "sS", enkf_tui_analysis_select_module__, arg_pack, NULL); - menu_add_item(menu, "List available modules", "lL", enkf_tui_analysis_list_modules__, enkf_main, NULL); - menu_add_item(menu, "Modify analysis module parameters", "mM", enkf_tui_analysis_update_module__, enkf_main, NULL); - menu_add_item(menu, "Reload current module (external only)", "rR", enkf_tui_analysis_reload_module__, enkf_main, NULL); - } - menu_run(menu); - menu_free(menu); - arg_pack_free(arg_pack); -} - diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_analysis.h b/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_analysis.h deleted file mode 100644 index c38c7c93ca..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_analysis.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_tui_analysis.h' is part of ERT - Ensemble based - Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENKF_TUI_ANALYSIS_H -#define ERT_ENKF_TUI_ANALYSIS_H - -void enkf_tui_analysis_menu(void *); - - -#endif - diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_export.c b/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_export.c deleted file mode 100644 index cfe9e0b69b..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_export.c +++ /dev/null @@ -1,687 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_tui_export.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#define PROMPT_LEN 60 - - -void enkf_tui_export_field(const enkf_main_type * enkf_main , field_file_format_type file_type) { - const ensemble_config_type * ensemble_config = enkf_main_get_ensemble_config(enkf_main); - const bool output_transform = true; - const enkf_config_node_type * config_node; - const int last_report = enkf_main_get_history_length( enkf_main ); - int iens1 , iens2 , iens , report_step; - path_fmt_type * export_path; - - config_node = enkf_tui_util_scanf_key(ensemble_config , PROMPT_LEN , FIELD , INVALID_VAR ); - - report_step = util_scanf_int_with_limits("Report step: ", PROMPT_LEN , 0 , last_report); - enkf_tui_util_scanf_iens_range("Realizations members to export(0 - %d)" , enkf_main_get_ensemble_size( enkf_main ) , PROMPT_LEN , &iens1 , &iens2); - - { - char * path_fmt; - util_printf_prompt("Filename to store files in (with %d) in: " , PROMPT_LEN , '=' , "=> "); - path_fmt = util_alloc_stdin_line(); - export_path = path_fmt_alloc_path_fmt( path_fmt ); - free( path_fmt ); - } - - { - enkf_fs_type * fs = enkf_main_tui_get_fs(enkf_main); - enkf_node_type * node = enkf_node_alloc(config_node); - - for (iens = iens1; iens <= iens2; iens++) { - node_id_type node_id = {.report_step = report_step , .iens = iens }; - if (enkf_node_try_load(node , fs , node_id)) { - char * filename = path_fmt_alloc_path( export_path , false , iens); - { - char * path; - util_alloc_file_components(filename , &path , NULL , NULL); - if (path != NULL) { - util_make_path( path ); - free( path ); - } - } - - { - const field_type * field = enkf_node_value_ptr(node); - field_export(field , filename , NULL , file_type , output_transform, NULL); - } - free(filename); - } else - printf("Warning: could not load realization:%d \n", iens); - } - enkf_node_free(node); - } -} - - -void enkf_tui_export_grdecl(void * enkf_main) { - enkf_tui_export_field(enkf_main , ECL_GRDECL_FILE); -} - - - -void enkf_tui_export_roff(void * enkf_main) { - enkf_tui_export_field(enkf_main , RMS_ROFF_FILE); -} - - -void enkf_tui_export_restart_active(void * enkf_main) { - enkf_tui_export_field(enkf_main , ECL_KW_FILE_ACTIVE_CELLS); -} - - -void enkf_tui_export_restart_all(void * enkf_main) { - enkf_tui_export_field(enkf_main , ECL_KW_FILE_ALL_CELLS); -} - - -void enkf_tui_export_gen_data(void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - const ensemble_config_type * ensemble_config = enkf_main_get_ensemble_config(enkf_main); - { - enkf_var_type var_type; - int report_step; - int iens1 , iens2; - const int last_report = enkf_main_get_history_length( enkf_main ); - - const enkf_config_node_type * config_node; - path_fmt_type * file_fmt; - - config_node = enkf_tui_util_scanf_key(ensemble_config , PROMPT_LEN , GEN_DATA , INVALID_VAR); - var_type = enkf_config_node_get_var_type(config_node); - - - report_step = util_scanf_int_with_limits("Report step: ", PROMPT_LEN , 0 , last_report); - enkf_tui_util_scanf_iens_range("Realizations members to export(0 - %d)" , enkf_main_get_ensemble_size( enkf_main ) , PROMPT_LEN , &iens1 , &iens2); - { - char path_fmt[512]; - util_printf_prompt("Filename to store files in (with %d) in: " , PROMPT_LEN , '=' , "=> "); - scanf("%s" , path_fmt); - file_fmt = path_fmt_alloc_path_fmt( path_fmt ); - } - - { - msg_type * msg = msg_alloc("Writing file: " , false); - enkf_fs_type * fs = enkf_main_tui_get_fs(enkf_main); - enkf_node_type * node = enkf_node_alloc(config_node); - gen_data_file_format_type export_type = gen_data_guess_export_type( enkf_node_value_ptr(node) ); - int iens; - - msg_show( msg ); - for (iens = iens1; iens <= iens2; iens++) { - node_id_type node_id = {.report_step = report_step , .iens = iens}; - if (enkf_node_try_load(node , fs, node_id)) { - char * full_path = path_fmt_alloc_path( file_fmt , false , iens); - char * path; - util_alloc_file_components(full_path , &path , NULL , NULL); - if (path != NULL) util_make_path( path ); - - { - const gen_data_type * gen_data = enkf_node_value_ptr(node); - msg_update(msg , full_path); - gen_data_export(gen_data , full_path , export_type , NULL); - } - - free(full_path); - util_safe_free(path); - } - } - enkf_node_free(node); - msg_free( msg , true ); - } - } -} - - - -void enkf_tui_export_profile(void * enkf_main) { - const ensemble_config_type * ensemble_config = enkf_main_get_ensemble_config(enkf_main); - { - const int ens_size = enkf_main_get_ensemble_size( enkf_main ); - int iens1 , iens2; - const int last_report = enkf_main_get_history_length( enkf_main ); - bool * iens_active ; - bool * report_active; - - const enkf_config_node_type * config_node; - int direction; /* 0: i running, 1: j running, 2: k running */ - int total_cells; - int *cell_list; - path_fmt_type * file_fmt; - - config_node = enkf_tui_util_scanf_key(ensemble_config , PROMPT_LEN , FIELD , INVALID_VAR); - iens_active = enkf_tui_util_scanf_alloc_iens_active( ens_size , PROMPT_LEN , &iens1 , &iens2); /* Not used yet ... */ - report_active = enkf_tui_util_scanf_alloc_report_active( last_report , PROMPT_LEN ); - direction = util_scanf_int_with_limits("Give scan direction 0:i 1:j 2:k" , PROMPT_LEN , 0 , 2); - - { - const field_config_type * field_config = enkf_config_node_get_ref( config_node ); - int nx,ny,nz; - int i1,i2,j1,j2,k1,k2; - field_config_get_dims( field_config , &nx , &ny , &nz); - i2 = j2 = k2 = 0; /* Dummy for compiler */ - - /* i1,i2,j1,j2,k1 and k2 should be incluseive */ - switch (direction) { - case(0): - i1 = 0; i2 = nx-1; - enkf_tui_util_scanf_ijk__(field_config , PROMPT_LEN , NULL , &j1 , &k1); - j2 = j1; - k2 = k1; - break; - case(1): - j1 = 0; j2 = ny-1; - enkf_tui_util_scanf_ijk__(field_config , PROMPT_LEN , &i1 , NULL , &k1); - i2 = i1; - k2 = k1; - break; - case(2): - k1 = 0; k2 = nz-1; - enkf_tui_util_scanf_ijk__(field_config , PROMPT_LEN , &i1 , &j1 , NULL); - i2 = i1; - j2 = j1; - break; - default: - util_abort("%s: internal error \n",__func__); - } - total_cells = (i2 - i1 + 1) * (j2 - j1 + 1) * (k2 - k1 + 1); - cell_list = util_calloc(total_cells , sizeof * cell_list ); - { - int cell_index = 0; - int i,j,k; - for (i=i1; i<=i2; i++) - for (j= j1; j <=j2; j++) - for (k=k1; k <= k2; k++) { - cell_list[cell_index] = field_config_active_index(field_config , i,j,k); - cell_index++; - } - } - - file_fmt = path_fmt_scanf_alloc("Give filename to store profiles (with TWO %d specifiers) =>" , 0 , NULL , false); - { - double * profile = util_calloc(total_cells , sizeof * profile ); - int iens , report_step; - enkf_node_type * node = enkf_node_alloc( config_node ); - enkf_fs_type * fs = enkf_main_tui_get_fs(enkf_main); - - for (report_step = 0; report_step <= last_report; report_step++) { - if (report_active[report_step]) { - for (iens = iens1; iens <= iens2; iens++) { - node_id_type node_id = {.report_step = report_step , .iens = iens }; - if (enkf_node_try_load(node , fs, node_id)) { - { - const field_type * field = enkf_node_value_ptr( node ); - int field_index; - for (field_index = 0 ; field_index < total_cells; field_index++) - profile[field_index] = field_iget_double(field , cell_list[field_index]); - { - char * filename = path_fmt_alloc_file(file_fmt , true , report_step , iens); - FILE * stream = util_fopen(filename , "w"); - for (field_index = 0; field_index < total_cells; field_index++) - fprintf(stream, "%d %g\n",field_index , profile[field_index]); - - fclose(stream); - free(filename); - } - } - } else - fprintf(stderr," ** Warning field:%s is missing for member,report: %d,%d \n",enkf_config_node_get_key(config_node) , iens , report_step); - } - } - } - free(iens_active); - free(report_active); - free(profile); - } - } - free(cell_list); - } -} - - - - - - -void enkf_tui_export_cell(void * enkf_main) { - const ensemble_config_type * ensemble_config = enkf_main_get_ensemble_config(enkf_main); - { - const enkf_config_node_type * config_node; - int cell_nr; - - config_node = enkf_tui_util_scanf_key(ensemble_config , PROMPT_LEN , FIELD , INVALID_VAR); - cell_nr = enkf_tui_util_scanf_ijk(enkf_config_node_get_ref(config_node) , PROMPT_LEN); - { - const int ens_size = enkf_main_get_ensemble_size( enkf_main ); - const int last_report = enkf_main_get_history_length( enkf_main ); - int iens1 , iens2; - bool * iens_active = enkf_tui_util_scanf_alloc_iens_active( ens_size , PROMPT_LEN , &iens1 , &iens2); /* Not used yet ... */ - bool * report_active = enkf_tui_util_scanf_alloc_report_active( last_report , PROMPT_LEN); - double * cell_data = util_calloc(ens_size , sizeof * cell_data); - int iens , report_step; /* Observe that iens and report_step loops below should be inclusive.*/ - enkf_node_type * node = enkf_node_alloc( config_node ); - enkf_fs_type * fs = enkf_main_tui_get_fs(enkf_main); - path_fmt_type * file_fmt = path_fmt_scanf_alloc("Give filename to store historgrams (with %d for report step) =>" , 0 , NULL , false); - - - for (report_step = 0; report_step <= last_report; report_step++) { - if (report_active[report_step]) { - node_id_type node_id = {.report_step = report_step , .iens = iens1 }; - if (enkf_node_try_load(node , fs , node_id)) { - for (iens = iens1; iens <= iens2; iens++) { - node_id.iens = iens; - if (enkf_node_try_load(node , fs , node_id )) { - { - const field_type * field = enkf_node_value_ptr( node ); - cell_data[iens] = field_iget_double(field , cell_nr); - } - } else { - fprintf(stderr," ** Warning field:%s is missing for member,report: %d,%d \n",enkf_config_node_get_key(config_node) , iens , report_step); - cell_data[iens] = -1; - } - } - { - char * filename = path_fmt_alloc_file(file_fmt , true , report_step); - FILE * stream = util_fopen(filename , "w"); - for (iens = iens1; iens <= iens2; iens++) - fprintf(stream,"%g\n",cell_data[iens]); - - fclose(stream); - free(filename); - } - } else printf("Skipping report_step:%d \n",report_step); - } - } - free(iens_active); - free(report_active); - free(cell_data); - path_fmt_free(file_fmt); - } - } -} - - - - -void enkf_tui_export_time(void * enkf_main) { - const ensemble_config_type * ensemble_config = enkf_main_get_ensemble_config(enkf_main); - { - const enkf_config_node_type * config_node; - int cell_nr; - - config_node = enkf_tui_util_scanf_key(ensemble_config , PROMPT_LEN , FIELD ,INVALID_VAR); - cell_nr = enkf_tui_util_scanf_ijk(enkf_config_node_get_ref(config_node) , PROMPT_LEN); - { - const int last_report = enkf_main_get_history_length( enkf_main ); - const int step1 = util_scanf_int_with_limits("First report step",PROMPT_LEN , 0 , last_report); - const int step2 = util_scanf_int_with_limits("Last report step",PROMPT_LEN , step1 , last_report); - const int ens_size = enkf_main_get_ensemble_size( enkf_main ); - int iens1 , iens2; - bool * iens_active = enkf_tui_util_scanf_alloc_iens_active( ens_size , PROMPT_LEN , &iens1 , &iens2); /* Not used yet ... */ - double * x, *y; - int iens; /* Observe that iens and report_step loops below should be inclusive.*/ - enkf_node_type * node = enkf_node_alloc( config_node ); - enkf_fs_type * fs = enkf_main_tui_get_fs(enkf_main); - path_fmt_type * file_fmt = path_fmt_scanf_alloc("Give filename to store line (with %d for report iens) =>" , 0 , NULL , false); - - - { - x = util_calloc( (step2 - step1 + 1) , sizeof * x); - y = util_calloc( (step2 - step1 + 1) , sizeof * y); - } - - - for (iens = iens1; iens <= iens2; iens++) { - enkf_tui_util_get_time(fs , config_node , node , cell_nr , step1 , step2 , iens , x ,y); - { - char * filename = path_fmt_alloc_file(file_fmt , true , iens); - FILE * stream = util_fopen(filename , "w"); - int index = 0; - int report_step; - for (report_step = step1; report_step <= step2; report_step++) { - fprintf(stream , "%g %g \n",x[index] , y[index]); - index++; - } - fclose(stream); - free(filename); - } - } - free(iens_active); - free(x); - free(y); - path_fmt_free(file_fmt); - } - } -} - - -/*****************************************************************/ - -void enkf_tui_export_fieldP(void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - const ensemble_config_type * ensemble_config = enkf_main_get_ensemble_config(enkf_main); - const enkf_config_node_type * config_node = enkf_tui_util_scanf_key(ensemble_config , PROMPT_LEN , FIELD , INVALID_VAR ); - int iens1 = 0; - int iens2 = enkf_main_get_ensemble_size( enkf_main ); - const int last_report = enkf_main_get_history_length( enkf_main ); - int report_step = util_scanf_int_with_limits("Report step: ", PROMPT_LEN , 0 , last_report); - double lower_limit = util_scanf_double("Lower limit", PROMPT_LEN); - double upper_limit = util_scanf_double("Upper limit", PROMPT_LEN); - char * export_file; - util_printf_prompt("Filename to store file: " , PROMPT_LEN , '=' , "=> "); - export_file = util_alloc_stdin_line(); - { - enkf_fs_type * fs = enkf_main_tui_get_fs(enkf_main); - enkf_node_type ** ensemble = enkf_node_load_alloc_ensemble( config_node , fs , report_step , iens1 , iens2 ); - enkf_node_type * sum = enkf_node_alloc( config_node ); - int active_ens_size = 0; - int iens; - - enkf_node_clear( sum ); - { - /* OK going low level */ - field_type * sum_field = enkf_node_value_ptr( sum ); - - for (iens = iens1; iens < iens2; iens++) { - if (ensemble[iens - iens1] != NULL) { - field_type * field = enkf_node_value_ptr( ensemble[iens - iens1] ); - field_update_sum( sum_field , field , lower_limit , upper_limit); - active_ens_size++; - } - } - if (active_ens_size > 0) { - field_scale( sum_field , 1.0 / active_ens_size ); - { - char * path; - util_alloc_file_components( export_file , &path , NULL , NULL); - if (path != NULL) { - util_make_path( path ); - free( path ); - } - } - field_export(sum_field , export_file , NULL , RMS_ROFF_FILE , false, NULL); - } else fprintf(stderr,"Warning: no data found \n"); - } - - for (iens = iens1; iens < iens2; iens++) { - if (ensemble[iens - iens1] != NULL) - enkf_node_free( ensemble[iens - iens1] ); - } - - free( ensemble ); - enkf_node_free( sum ); - } - free( export_file ); -} - - -/*****************************************************************/ - - -/** - This is a very simple function for exporting a scalar value for all - member/report steps to a CSV file. The file is characterized by: - - * Missing elements are represented with an empty string. - - * The header strings are quoted with "". - - * End of line is \r\n - - Unfortunately Excel does not seem to recognize the csv format, and - it is necessary to go through a text import wizard in excel. To - import this file you go through the following hoops in excel: - - 1. [Data> - [Import external data> - [Import data> - - 2. Select the file to import from. - - 3. The text import wizard from excel should pop up: - - 1. Select (*) Delimited - press next. - 2. Select delimiter "Comma" - press next. - 3. press finish. - - Finally you are asked where in the excel workbook you want to - insert the data. -*/ - - -#define CSV_NEWLINE "\r\n" -#define CSV_MISSING_VALUE "" -#define CSV_SEP "," - - -void enkf_tui_export_scalar2csv(void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - const ensemble_config_type * ensemble_config = enkf_main_get_ensemble_config(enkf_main); - const enkf_config_node_type * config_node; - char * user_key, *key_index; - - util_printf_prompt("Scalar to export (KEY:INDEX)" , PROMPT_LEN , '=' , "=> "); user_key = util_alloc_stdin_line(); - config_node = ensemble_config_user_get_node( ensemble_config , user_key , &key_index); - if (config_node != NULL) { - int report_step , first_report, last_report; - int iens1 , iens2, iens; - char * csv_file; - - iens2 = enkf_main_get_ensemble_size( enkf_main ) - 1; - iens1 = 0; - first_report = 0; - last_report = enkf_main_get_history_length( enkf_main ); - { - char * path; - char * prompt = util_alloc_sprintf("File to store \'%s\'", user_key); - util_printf_prompt(prompt , PROMPT_LEN , '=' , "=> "); - csv_file = util_alloc_stdin_line(); - - util_alloc_file_components( csv_file , &path , NULL , NULL); - if (path != NULL) { - if (util_entry_exists( path )) { - if (!util_is_directory( path )) { - /* The path component already exists in the filesystem - and it is not a directory - we leave the building. */ - fprintf(stderr,"Sorry: %s already exists - and is not a directory.\n",path); - free(path); - free(csv_file); - free(user_key); - return ; - } - } else { - /* The path does not exist - we make it. */ - enkf_tui_util_msg("Creating new directory: %s\n" , path); - util_make_path( path ); - } - } - free(prompt); - } - { - /* Seriously manual creation of csv file. */ - enkf_fs_type * fs = enkf_main_tui_get_fs(enkf_main); - enkf_node_type * node = enkf_node_alloc( config_node ); - FILE * stream = util_fopen( csv_file , "w"); - msg_type * msg = msg_alloc("Exporting report_step/member: " , false); - node_id_type node_id; - - - /* Header line */ - fprintf(stream , "\"Report step\""); - for (iens = iens1; iens <= iens2; iens++) - fprintf(stream , "%s\"%s(%d)\"" , CSV_SEP , user_key , iens); - fprintf(stream , CSV_NEWLINE); - - msg_show(msg); - for (report_step = first_report; report_step <= last_report; report_step++) { - fprintf(stream , "%6d" , report_step); - node_id.report_step = report_step; - for (iens = iens1; iens <= iens2; iens++) { - double value; - char label[32]; - /* - Have not implemented a choice on forecast/analyzed. Tries - analyzed first, then forecast. - */ - node_id.iens = iens; - sprintf(label , "%03d/%03d" , report_step , iens); - msg_update( msg , label); - - if (enkf_node_user_get( node , fs , key_index , node_id , &value)) - fprintf(stream , "%s%g" , CSV_SEP , value); - else - fprintf(stream , "%s%s" , CSV_SEP , CSV_MISSING_VALUE); - - } - fprintf(stream , CSV_NEWLINE); - } - - msg_free( msg , true ); - enkf_node_free( node ); - fclose(stream); - } - } else - fprintf(stderr,"Sorry - could not find any nodes with key:%s\n",user_key); - - free(user_key); -} - - -#undef CSV_NEWLINE -#undef CSV_MISSING_VALUE -#undef CSV_SEP - -/*****************************************************************/ - -void enkf_tui_export_stat(void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - { - const ensemble_config_type * ensemble_config = enkf_main_get_ensemble_config(enkf_main); - const enkf_config_node_type * config_node; - const int ens_size = enkf_main_get_ensemble_size( enkf_main ); - const int last_report = enkf_main_get_history_length( enkf_main ); - int report_step; - - config_node = enkf_tui_util_scanf_key( ensemble_config , PROMPT_LEN , INVALID , INVALID_VAR ); - report_step = util_scanf_int_with_limits("Report step: ", PROMPT_LEN , 0 , last_report); - { - char * mean_file , * mean_path; - char * std_file , * std_path; - - util_printf_prompt("Filename to store mean in " , PROMPT_LEN , '=' , "=> "); - { - char * tmp = util_alloc_stdin_line(); - char * mean_base , * mean_ext; - util_alloc_file_components( tmp , &mean_path , &mean_base , &mean_ext ); - if (mean_path != NULL) - util_make_path( mean_path ); - mean_file = util_alloc_filename( NULL , mean_base , mean_ext ); - util_safe_free( mean_base ); - util_safe_free( mean_ext ); - free( tmp ); - } - - util_printf_prompt("Filename to store std in " , PROMPT_LEN , '=' , "=> "); - { - char * tmp = util_alloc_stdin_line(); - char * std_base , * std_ext; - util_alloc_file_components( tmp , &std_path , &std_base , &std_ext ); - if (std_path != NULL) - util_make_path( std_path ); - std_file = util_alloc_filename( NULL , std_base , std_ext ); - util_safe_free( std_base ); - util_safe_free( std_ext ); - free( tmp ); - } - - { - enkf_node_type ** ensemble = enkf_main_get_node_ensemble( enkf_main , - enkf_main_tui_get_fs( enkf_main ) , - enkf_config_node_get_key( config_node ) , - report_step ); - enkf_node_type * mean = enkf_node_copyc( ensemble[0] ); - enkf_node_type * std = enkf_node_copyc( ensemble[0] ); - - /* Calculating */ - enkf_main_node_mean( (const enkf_node_type **) ensemble , ens_size , mean ); - enkf_main_node_std( (const enkf_node_type **) ensemble , ens_size , mean , std ); - - { - ecl_write_ftype * ecl_write_func = enkf_node_get_func_pointer( mean ); - ecl_write_func( enkf_node_value_ptr( mean ) , mean_path , mean_file , NULL ); - ecl_write_func( enkf_node_value_ptr( std ) , std_path , std_file , NULL ); - } - - free( ensemble ); - util_safe_free( std_file ); - util_safe_free( std_path ); - util_safe_free( mean_file ); - util_safe_free( mean_path ); - enkf_node_free( mean ); - enkf_node_free( std ); - } - } - } -} - - - - -void enkf_tui_export_menu(void * arg) { - - enkf_main_type * enkf_main = enkf_main_safe_cast(arg); - menu_type * menu = menu_alloc("Export data to other formats" , "Back" , "bB"); - menu_add_item(menu , "Export scalar value to CSV file" , "xX" , enkf_tui_export_scalar2csv , enkf_main , NULL); - menu_add_separator(menu); - menu_add_item(menu , "Export fields to RMS Roff format" , "rR" , enkf_tui_export_roff , enkf_main , NULL); - menu_add_item(menu , "Export fields to ECLIPSE grdecl format" , "gG" , enkf_tui_export_grdecl , enkf_main , NULL); - menu_add_item(menu , "Export fields to ECLIPSE restart format (active cells)" , "aA" , enkf_tui_export_restart_active , enkf_main , NULL); - menu_add_item(menu , "Export fields to ECLIPSE restart format (all cells)" , "lL" , enkf_tui_export_restart_all , enkf_main , NULL); - menu_add_separator(menu); - menu_add_item(menu , "Export P( a =< x < b )" , "sS" , enkf_tui_export_fieldP , enkf_main , NULL); - menu_add_separator(menu); - menu_add_item(menu , "Export cell values to text file(s)" , "cC" , enkf_tui_export_cell , enkf_main , NULL); - menu_add_item(menu , "Export line profile of a field to text file(s)" , "pP" , enkf_tui_export_profile , enkf_main , NULL); - menu_add_item(menu , "Export time development in one cell to text file(s)" , "tT" , enkf_tui_export_time , enkf_main , NULL); - menu_add_separator(menu); - menu_add_item(menu , "Export GEN_DATA/GEN_PARAM to file" , "dD" , enkf_tui_export_gen_data , enkf_main , NULL); - menu_add_separator( menu ); - menu_add_item(menu , "EclWrite mean and std" , "mM" , enkf_tui_export_stat , enkf_main , NULL ); - menu_add_item(menu , "Help" , "hH" , enkf_tui_help_menu_export , enkf_main , NULL ); - menu_run(menu); - menu_free(menu); -} diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_export.h b/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_export.h deleted file mode 100644 index c7aa3021bd..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_export.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_tui_export.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENKF_TUI_EXPORT_H -#define ERT_ENKF_TUI_EXPORT_H - -void enkf_tui_export_menu(void *); - - - -#endif diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_fs.c b/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_fs.c deleted file mode 100644 index e415060278..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_fs.c +++ /dev/null @@ -1,354 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_tui_fs.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - - -void enkf_tui_fs_ls_case(void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - stringlist_type * dirlist = enkf_main_alloc_caselist( enkf_main ); - int idir; - - printf("Available cases: "); - for (idir = 0; idir < stringlist_get_size( dirlist ); idir++) - printf("%s ",stringlist_iget( dirlist , idir )); - - printf("\n"); - stringlist_free( dirlist ); -} - - -void enkf_tui_fs_create_case(void * arg) -{ - int prompt_len = 50; - char new_case[256]; - char * menu_title; - - arg_pack_type * arg_pack = arg_pack_safe_cast( arg ); - enkf_main_type * enkf_main = enkf_main_safe_cast( arg_pack_iget_ptr(arg_pack, 0) ); - menu_type * menu = arg_pack_iget_ptr(arg_pack, 1); - - util_printf_prompt("Name of new case" , prompt_len , '=' , "=> "); - if (fgets(new_case, prompt_len, stdin) != NULL){ - char *newline = strchr(new_case, '\n'); - if (newline) - *newline = 0; - - if(strlen(new_case) != 0) - enkf_main_select_fs( enkf_main , new_case ); - - } - menu_title = util_alloc_sprintf("Manage cases. Current: %s", enkf_main_get_current_fs(enkf_main)); - menu_set_title(menu, menu_title); - free(menu_title); -} - - - -/** - Return NULL if no action should be performed. -*/ -static char * enkf_tui_fs_alloc_existing_case(enkf_main_type * enkf_main , const char * prompt , int prompt_len) { - char * name; - while (true) { - util_printf_prompt(prompt , prompt_len , '=' , "=> "); - name = util_alloc_stdin_line(); - - if (name == NULL) /* The user entered a blank string */ - break; - else { - char * mount_point = enkf_main_alloc_mount_point( enkf_main , name ); - - if (enkf_fs_exists( mount_point )) - break; - else { - printf("** can not find case: \"%s\" \n",name); - free(name); - } - - free( mount_point ); - } - - } - - return name; -} - - - - -void enkf_tui_fs_select_case(void * arg) -{ - int prompt_len = 40; - char * new_case; - char * menu_title; - - arg_pack_type * arg_pack = arg_pack_safe_cast( arg ); - enkf_main_type * enkf_main = enkf_main_safe_cast( arg_pack_iget_ptr(arg_pack, 0) ); - menu_type * menu = arg_pack_iget_ptr(arg_pack, 1); - new_case = enkf_tui_fs_alloc_existing_case( enkf_main , "Name of case" , prompt_len); - if (new_case != NULL) { - enkf_main_select_fs( enkf_main , new_case ); - - menu_title = util_alloc_sprintf("Manage cases. Current: %s", enkf_main_get_current_fs( enkf_main )); - menu_set_title(menu, menu_title); - free(menu_title); - free(new_case); - } -} - - - - - - -static void enkf_tui_fs_copy_ensemble__( - enkf_main_type * enkf_main, - const char * source_case, - const char * target_case, - int report_step_from, - int report_step_to, - bool only_parameters) -{ - msg_type * msg = msg_alloc("Copying: " , false); - ensemble_config_type * config = enkf_main_get_ensemble_config(enkf_main); - int ens_size = enkf_main_get_ensemble_size(enkf_main); - char * ranking_key; - const perm_vector_type * ranking_permutation = NULL; - int * identity_permutation_raw; - ranking_table_type * ranking_table = enkf_main_get_ranking_table( enkf_main ); - - - if (ranking_table_get_size( ranking_table ) > 0) { - util_printf_prompt("Name of ranking to resort by (or blank)" , 50 , '=' , "=> "); - ranking_key = util_alloc_stdin_line(); - if (ranking_table_has_ranking( ranking_table , ranking_key )) - ranking_permutation = ranking_table_get_permutation( ranking_table , ranking_key ); - else { - fprintf(stderr," Sorry: ranking:%s does not exist \n", ranking_key ); - return; - } - } - identity_permutation_raw = util_calloc( ens_size , sizeof * identity_permutation_raw ); - { - int iens; - for (iens =0; iens < ens_size; iens++) - identity_permutation_raw[iens] = iens; - } - - if (ranking_permutation == NULL) - ranking_permutation = perm_vector_alloc(identity_permutation_raw, ens_size); - - - { - /* If the current target_case does not exist it is automatically created by the select_write_dir function */ - enkf_fs_type * src_fs = enkf_main_mount_alt_fs( enkf_main , source_case , false ); - enkf_fs_type * target_fs = enkf_main_mount_alt_fs( enkf_main , target_case , true ); - - stringlist_type * nodes = ensemble_config_alloc_keylist_from_var_type(config, PARAMETER); - - { - int num_nodes = stringlist_get_size(nodes); - msg_show(msg); - for(int i = 0; i < num_nodes; i++) { - const char * key = stringlist_iget(nodes, i); - enkf_config_node_type * config_node = ensemble_config_get_node(config , key); - msg_update(msg , key); - enkf_node_copy_ensemble(config_node, src_fs , target_fs , report_step_from, report_step_to , ens_size , ranking_permutation); - } - } - - enkf_fs_decref( src_fs ); - enkf_fs_decref( target_fs ); - - msg_free(msg , true); - stringlist_free(nodes); - } - free( identity_permutation_raw ); -} - - - - - -void enkf_tui_fs_initialize_case_from_copy(void * arg) -{ - int prompt_len =50; - char * source_case; - int ens_size; - int last_report; - int src_step; - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - - ens_size = enkf_main_get_ensemble_size( enkf_main ); - - - last_report = enkf_main_get_history_length( enkf_main ); - - source_case = enkf_tui_fs_alloc_existing_case( enkf_main , "Initialize from case" , prompt_len); - if (source_case != NULL) { - src_step = util_scanf_int_with_limits("Source report step",prompt_len , 0 , last_report); - enkf_fs_type * source_fs = enkf_main_mount_alt_fs( enkf_main , source_case , false ); - enkf_main_init_current_case_from_existing(enkf_main, source_fs , src_step); - enkf_fs_decref(source_fs); - } - util_safe_free( source_case ); -} - - - -void enkf_tui_fs_copy_ensemble(void * arg) -{ - int prompt_len = 35; - char * source_case; - - int last_report; - int report_step_from; - char * report_step_from_as_char; - int report_step_to; - - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - - source_case = util_alloc_string_copy(enkf_main_get_current_fs( enkf_main )); - last_report = enkf_main_get_history_length( enkf_main ); - - report_step_from_as_char = util_scanf_int_with_limits_return_char("Source report step",prompt_len , 0 , last_report); - if(strlen(report_step_from_as_char) !=0){ - util_sscanf_int(report_step_from_as_char , &report_step_from); - { - util_printf_prompt("Target case" , prompt_len , '=' , "=> "); - char target_case[256]; - - if ( fgets(target_case, prompt_len, stdin)) { - char *newline = strchr(target_case, '\n'); - if (newline) - *newline = 0; - } - - if (strlen(target_case)) { - char * report_step_to_as_char = util_scanf_int_with_limits_return_char("Target report step",prompt_len , 0 , last_report); - if (strlen(report_step_to_as_char)) { - util_sscanf_int(report_step_to_as_char , &report_step_to); - enkf_tui_fs_copy_ensemble__(enkf_main, source_case, target_case, report_step_from, report_step_to, false); - } - free(report_step_to_as_char); - } - } - } - free(source_case); - free(report_step_from_as_char); -} - - - -void enkf_tui_fs_copy_ensemble_of_parameters(void * arg) -{ - int prompt_len = 35; - char * source_case; - - int last_report; - int report_step_from; - char * report_step_from_as_char; - int report_step_to; - - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - - source_case = util_alloc_string_copy(enkf_main_get_current_fs( enkf_main )); - last_report = enkf_main_get_history_length( enkf_main ); - - report_step_from_as_char = util_scanf_int_with_limits_return_char("Source report step",prompt_len , 0 , last_report); - if(strlen(report_step_from_as_char) !=0){ - util_sscanf_int(report_step_from_as_char , &report_step_from); - { - - util_printf_prompt("Target case" , prompt_len , '=' , "=> "); - char target_case[256]; - - if ( fgets(target_case, prompt_len, stdin) ) { - char *newline = strchr(target_case, '\n'); - if (newline) - *newline = 0; - } - - if (strlen(target_case)) { - char * report_step_to_as_char = util_scanf_int_with_limits_return_char("Target report step",prompt_len , 0 , last_report); - if(strlen(report_step_to_as_char) !=0){ - util_sscanf_int(report_step_to_as_char , &report_step_to); - enkf_tui_fs_copy_ensemble__(enkf_main, source_case, target_case, report_step_from, report_step_to, true); - } - free(report_step_to_as_char); - } - } - } - free(source_case); - free(report_step_from_as_char); -} - - -void enkf_tui_fs_menu(void * arg) { - - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - - const char * menu_title = util_alloc_sprintf("Manage cases - current: %s", enkf_main_get_current_fs( enkf_main )); - menu_type * menu = menu_alloc(menu_title , "Back" , "bB"); - - menu_add_item(menu , "List available cases" , "lL" , enkf_tui_fs_ls_case , enkf_main , NULL); - - { - arg_pack_type * arg_pack = arg_pack_alloc(); - arg_pack_append_ptr(arg_pack , enkf_main); - arg_pack_append_ptr(arg_pack , menu); - menu_add_item(menu , "Create and select new case" , "cC" , enkf_tui_fs_create_case, arg_pack , arg_pack_free__); - } - - { - arg_pack_type * arg_pack = arg_pack_alloc(); - arg_pack_append_ptr(arg_pack , enkf_main); - arg_pack_append_ptr(arg_pack , menu); - menu_add_item(menu , "Select case" , "sS" , enkf_tui_fs_select_case, arg_pack , arg_pack_free__); - } - - menu_add_separator(menu); - menu_add_item(menu, "Initialize case from scratch" , "iI" , enkf_tui_init_menu , enkf_main , NULL); - menu_add_item(menu, "Initialize case from existing case" , "aA" , enkf_tui_fs_initialize_case_from_copy , enkf_main , NULL); - - menu_add_separator(menu); - /* Are these two in use??? */ - menu_add_item(menu, "Copy full ensemble to another case", "eE", enkf_tui_fs_copy_ensemble, enkf_main, NULL); - menu_add_item(menu, "Copy ensemble of parameters to another case", "oO", enkf_tui_fs_copy_ensemble_of_parameters, enkf_main, NULL); - menu_add_item(menu , "Help" , "hH" , enkf_tui_help_menu_cases , enkf_main , NULL); - - menu_run(menu); - menu_free(menu); -} - diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_fs.h b/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_fs.h deleted file mode 100644 index 49b8f1efc3..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_fs.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_tui_fs.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENKF_TUI_FS_H -#define ERT_ENKF_TUI_FS_H - -void enkf_tui_fs_menu(void * ); - -#endif diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_help.c b/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_help.c deleted file mode 100644 index 6297ad91aa..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_help.c +++ /dev/null @@ -1,232 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'enkf_tui_QC.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - - -void enkf_tui_help_manual_main( void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - const site_config_type * site_config = enkf_main_get_site_config ( enkf_main ); - const char * manual_url = site_config_get_manual_url( site_config ); - const char * browser = getenv("BROWSER"); - - if (browser == NULL) - browser = site_config_get_default_browser( site_config ); - - { - char * cmd = util_alloc_sprintf("%s %s &" , browser , manual_url); - system(cmd); - free( cmd ); - } -} - -void enkf_tui_help_menu_main(void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - { - menu_type * menu = menu_alloc("Help: Main menu" , "Back" , "bB"); - menu_add_helptext(menu , "Choose the different options from the main menu to read more about the different options."); - menu_add_item(menu , "Open manual (firefox)" , "mM" , enkf_tui_help_manual_main , enkf_main , NULL); - menu_run(menu); - menu_free(menu); - } -} - -void enkf_tui_help_manual_cases( void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - const site_config_type * site_config = enkf_main_get_site_config ( enkf_main ); - const char * manual_url = site_config_get_manual_url( site_config ); - const char * browser = getenv("BROWSER"); - - if (browser == NULL) - browser = site_config_get_default_browser( site_config ); - - { - char * cmd = util_alloc_sprintf("%s %s%s &" , browser , manual_url , "#Manage_cases"); - system(cmd); - free( cmd ); - } -} - -void enkf_tui_help_menu_cases(void * arg) { - - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - menu_type * menu = menu_alloc("Help: Manage cases" , "Back" , "bB"); - menu_add_helptext(menu , "Use this menu to navgate between cases and to initialize cases. A case has to be initialized before it can be used."); - menu_add_item(menu , "Open manual (firefox)" , "mM" , enkf_tui_help_manual_cases , enkf_main , NULL); - menu_run(menu); - menu_free(menu); -} - -void enkf_tui_help_manual_run( void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - const site_config_type * site_config = enkf_main_get_site_config ( enkf_main ); - const char * manual_url = site_config_get_manual_url( site_config ); - const char * browser = getenv("BROWSER"); - - if (browser == NULL) - browser = site_config_get_default_browser( site_config ); - - { - char * cmd = util_alloc_sprintf("%s %s%s &" , browser , manual_url , "#Run_or_restart_experiment"); - system(cmd); - free( cmd ); - } -} - -void enkf_tui_help_menu_run(void * arg) { - - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - menu_type * menu = menu_alloc("Help: Run menu" , "Back" , "bB"); - menu_add_helptext(menu , "This menu is used to do the main work in ERT. The first option, x: Ensemble run: history, will just run the case without any data conditioning. Options r and s will initiate classical enkf runs. The two options i and t invokes the ensemble kalman smoother."); - menu_add_item(menu , "Open manual (firefox)" , "mM" , enkf_tui_help_manual_run , enkf_main , NULL); - menu_run(menu); - menu_free(menu); -} - - -void enkf_tui_help_manual_rank( void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - const site_config_type * site_config = enkf_main_get_site_config ( enkf_main ); - const char * manual_url = site_config_get_manual_url( site_config ); - const char * browser = getenv("BROWSER"); - - if (browser == NULL) - browser = site_config_get_default_browser( site_config ); - - { - char * cmd = util_alloc_sprintf("%s %s%s &" , browser , manual_url , "#Rank_Results"); - system(cmd); - free( cmd ); - } -} - -void enkf_tui_help_menu_rank(void * arg) { - - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - menu_type * menu = menu_alloc("Help: Rank results" , "Back" , "bB"); - menu_add_helptext(menu , "Use this option to rank results after the case has been run."); - menu_add_item(menu , "Open manual (firefox)" , "mM" , enkf_tui_help_manual_rank , enkf_main , NULL); - menu_run(menu); - menu_free(menu); -} - -void enkf_tui_help_manual_export( void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - const site_config_type * site_config = enkf_main_get_site_config ( enkf_main ); - const char * manual_url = site_config_get_manual_url( site_config ); - const char * browser = getenv("BROWSER"); - - if (browser == NULL) - browser = site_config_get_default_browser( site_config ); - - { - char * cmd = util_alloc_sprintf("%s %s%s &" , browser , manual_url , "#Export_data_to_other_formats"); - system(cmd); - free( cmd ); - } -} - -void enkf_tui_help_menu_export(void * arg) { - - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - menu_type * menu = menu_alloc("Help: Export results" , "Back" , "bB"); - menu_add_helptext(menu , "Use this option to export results after the case has been run."); - menu_add_item(menu , "Open manual (firefox)" , "mM" , enkf_tui_help_manual_export , enkf_main , NULL); - menu_run(menu); - menu_free(menu); -} - -void enkf_tui_help_manual_table( void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - const site_config_type * site_config = enkf_main_get_site_config ( enkf_main ); - const char * manual_url = site_config_get_manual_url( site_config ); - const char * browser = getenv("BROWSER"); - - if (browser == NULL) - browser = site_config_get_default_browser( site_config ); - - { - char * cmd = util_alloc_sprintf("%s %s%s &" , browser , manual_url , "#Table_of_results"); - system(cmd); - free( cmd ); - } -} - -void enkf_tui_help_menu_table(void * arg) { - - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - menu_type * menu = menu_alloc("Help: Table of results" , "Back" , "bB"); - menu_add_helptext(menu , "This option can generate a table of results after the case has been run."); - menu_add_item(menu , "Open manual (firefox)" , "mM" , enkf_tui_help_manual_table , enkf_main , NULL); - menu_run(menu); - menu_free(menu); -} - -void enkf_tui_help_manual_misc( void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - const site_config_type * site_config = enkf_main_get_site_config ( enkf_main ); - const char * manual_url = site_config_get_manual_url( site_config ); - const char * browser = getenv("BROWSER"); - - if (browser == NULL) - browser = site_config_get_default_browser( site_config ); - - { - char * cmd = util_alloc_sprintf("%s %s%s &" , browser , manual_url , "#Miscellaneous"); - system(cmd); - free( cmd ); - } -} - -void enkf_tui_help_menu_misc(void * arg) { - - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - menu_type * menu = menu_alloc("Help: Miscellanous" , "Back" , "bB"); - menu_add_helptext(menu , "This option contains miscellaneous options."); - menu_add_item(menu , "Open manual (firefox)" , "mM" , enkf_tui_help_manual_misc , enkf_main , NULL); - menu_run(menu); - menu_free(menu); -} - -void enkf_tui_help_menu_simple(void * arg) { - - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - menu_type * menu = menu_alloc("Help: Simple menu" , "Back" , "bB"); - menu_add_helptext(menu , "The top four options in the simple menu will run eclipse simulations. Option s: Sensitivity run: No data conditioning, will initialize all parameters and run one eclipse simulation for each set of different parameters. e: Assimilation run: EnKF updates, will initialize all parameters and run one eclipse simulation for each set of different parameters. The eclipse simulations will run until the first data time step is encountered and condition on data before continuing. a: Assimilation run: Smoother update, will do one pass of the sensitivity run, then condition the parameters to all the data and rerun all experiments. i: Assimilation run: Iterated smoother [RML-EnKF] will iterate the smoother run several times."); - menu_add_item(menu , "Open manual (firefox)" , "mM" , enkf_tui_help_manual_main , enkf_main , NULL); - menu_run(menu); - menu_free(menu); -} - diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_help.h b/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_help.h deleted file mode 100644 index b9f0a5ec0b..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_help.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'enkf_tui_QC.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENKF_TUI_HELP_H -#define ERT_ENKF_TUI_HELP_H - - - -void enkf_tui_help_menu_main(void * ); -void enkf_tui_help_menu_cases(void * ); -void enkf_tui_help_menu_run(void * ); -void enkf_tui_help_menu_plot(void * ); -void enkf_tui_help_menu_rank(void * ); -void enkf_tui_help_menu_export(void * ); -void enkf_tui_help_menu_table(void * ); -void enkf_tui_help_menu_misc(void * ); -void enkf_tui_help_menu_simple(void * ); -#endif diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_init.c b/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_init.c deleted file mode 100644 index b028caefa7..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_init.c +++ /dev/null @@ -1,140 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_tui_init.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include - - - - -void enkf_tui_init(enkf_main_type * enkf_main, bool all_members , bool all_parameters , bool interval ) { - const int prompt_len = 35; - const ensemble_config_type * ensemble_config = enkf_main_get_ensemble_config(enkf_main); - int ens_size = enkf_main_get_ensemble_size( enkf_main ); - int iens1, iens2; - init_mode_type init_mode = INIT_FORCE; - bool iens_valid = false; - - /* iens2 should be interpreted as __inclusive__ */ - if ( all_members ) { - iens1 = 0; - iens2 = ens_size - 1; - iens_valid = true; - } else { - if( interval ) { - char * iens1char = util_scanf_int_with_limits_return_char("First ensemble member in interval" , prompt_len , 0 , ens_size - 1); - if (strlen(iens1char)) { - util_sscanf_int(iens1char , &iens1); - char * iens2char = util_scanf_int_with_limits_return_char("Second ensemble member in interval" , prompt_len , iens1 , ens_size - 1); - if (strlen(iens2char)) { - util_sscanf_int(iens2char , &iens2); - iens_valid = true; - } - free(iens2char); - } - free(iens1char); - } else { - char * iens1char = util_scanf_int_with_limits_return_char("Initialize ensemble member" , prompt_len , 0 , ens_size - 1); - if (strlen(iens1char)) { - util_sscanf_int(iens1char , &iens1); - iens2 = iens1; - iens_valid = true; - } - free(iens1char); - } - } - - if (iens_valid) { - stringlist_type * param_list = NULL; - if (all_parameters) - param_list = ensemble_config_alloc_keylist_from_var_type( ensemble_config , PARAMETER ); - else { - const enkf_config_node_type * config_node = NULL; - param_list = stringlist_alloc_new(); - config_node = enkf_tui_util_scanf_key(ensemble_config , prompt_len , INVALID , INVALID_VAR); - if( config_node != NULL ) - stringlist_append_copy( param_list , enkf_config_node_get_key(config_node)); - } - - if (param_list != NULL) { - enkf_fs_type * init_fs = enkf_main_tui_get_fs( enkf_main ); - bool_vector_type * iens_mask = bool_vector_alloc( ens_size , false ); - bool_vector_iset_block( iens_mask , iens1 , iens2 - iens1 + 1, true ); - enkf_main_initialize_from_scratch(enkf_main , init_fs , param_list , iens_mask , init_mode); - bool_vector_free( iens_mask ); - stringlist_free( param_list ); - } - } -} - - -static void enkf_tui_init1(void * enkf_main) { - enkf_tui_init(enkf_main, true , true , false); -} - -static void enkf_tui_init2(void * enkf_main) { - enkf_tui_init(enkf_main , true , false , false); -} - -static void enkf_tui_init3(void * enkf_main) { - enkf_tui_init(enkf_main , false , true , false); -} - -static void enkf_tui_init4(void * enkf_main) { - enkf_tui_init(enkf_main , false , false, false); -} - -static void enkf_tui_init5(void * enkf_main) { - enkf_tui_init(enkf_main , false , true, true); -} - -static void enkf_tui_init6(void * enkf_main) { - enkf_tui_init(enkf_main , false , false, true); -} - -void enkf_tui_init_menu(void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast(arg); - - menu_type * menu = menu_alloc("Initialize from scratch" , "Back" , "bB"); - menu_add_item(menu , "Initialize all members/all parameters" , "1" , enkf_tui_init1 , enkf_main , NULL); - menu_add_item(menu , "Initialize all members/one parameter" , "2" , enkf_tui_init2 , enkf_main , NULL); - menu_add_item(menu , "Initialize one member/all parameters" , "3" , enkf_tui_init3 , enkf_main , NULL); - menu_add_item(menu , "Initialize one member/one parameter" , "4" , enkf_tui_init4 , enkf_main , NULL); - menu_add_item(menu , "Initialize interval of ensemble members/all parameters" , "5" , enkf_tui_init5 , enkf_main , NULL); - menu_add_item(menu , "Initialize interval of ensemble members/one parameter" , "6" , enkf_tui_init6 , enkf_main , NULL); - menu_run(menu); - menu_free(menu); - -} diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_init.h b/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_init.h deleted file mode 100644 index 73bc1f78c2..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_init.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_tui_init.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENKF_TUI_INIT_H -#define ERT_ENKF_TUI_INIT_H - - -void enkf_tui_init_menu(void * ); - - -#endif diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_main.c b/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_main.c deleted file mode 100644 index 0741f7c9c0..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_main.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_tui_main.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -/** - This file implements the (text based) user interface in the enkf - system. -*/ - - - -/** - The main loop. -*/ - - - - - -void enkf_tui_main_menu(void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - menu_type * menu = menu_alloc("Main menu" , "Quit" , "qQ"); - - menu_add_item(menu , "Manage cases" , "cC" , enkf_tui_fs_menu , enkf_main , NULL); - menu_add_item(menu , "Run, restart or analyse experiment" , "rR" , enkf_tui_run_menu , enkf_main , NULL); - menu_add_item(menu , "Rank results" , "aA" , enkf_tui_ranking_menu , enkf_main , NULL); - menu_add_item(menu , "Export data to other formats" , "eE" , enkf_tui_export_menu , enkf_main , NULL); - menu_add_item(menu , "Table of results" , "tT" , enkf_tui_table_menu , enkf_main , NULL); - menu_add_item(menu , "Miscellanous" , "mM" , enkf_tui_misc_menu , enkf_main , NULL); - menu_add_item(menu , "Workflows" , "wW" , enkf_tui_workflow_menu , enkf_main , NULL); - menu_add_item(menu , "Help" , "hH" , enkf_tui_help_menu_main , enkf_main , NULL); - menu_add_item(menu , "Simple menu" , "sS" , enkf_tui_simple_menu , enkf_main , NULL); - menu_run(menu); - menu_free(menu); -} - - diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_main.h b/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_main.h deleted file mode 100644 index 0016bb50c4..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_main.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_tui_main.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENKF_INTER_MAIN_H -#define ERT_ENKF_INTER_MAIN_H -#include - - -void enkf_tui_main_menu(void * arg); - - -#endif diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_misc.c b/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_misc.c deleted file mode 100644 index 790cbe26da..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_misc.c +++ /dev/null @@ -1,76 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_tui_misc.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include - -#include -#include - -#include -#include -#include - -#include -#include - -static void enkf_tui_misc_printf_subst_list(void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - - /* These could/should be user input ... */ - int step1 = 0; /* < 0 => no reinitializtion of the dynamic substitutions. */ - int step2 = 10; - int iens = 0; - - enkf_state_type * enkf_state = enkf_main_iget_state( enkf_main , iens ); - enkf_state_printf_subst_list( enkf_state , step1 , step2 ); -} - - -static void enkf_tui_misc_list_jobs(void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - const ext_joblist_type * installed_jobs = enkf_main_get_installed_jobs( enkf_main ); - stringlist_type * job_names = ext_joblist_alloc_list( installed_jobs ); - int job_nr; - stringlist_sort( job_names , NULL ); - printf("================================================================================\n"); - printf("%-30s : Arguments\n" , "Job name"); - printf("--------------------------------------------------------------------------------\n"); - for (job_nr = 0; job_nr < stringlist_get_size( job_names ); job_nr++) { - const ext_job_type * job = ext_joblist_get_job( installed_jobs , stringlist_iget( job_names , job_nr )); - const stringlist_type * arglist = ext_job_get_arglist( job ); - printf("%-30s : " , stringlist_iget( job_names , job_nr )); - if (arglist != NULL) - stringlist_fprintf( arglist , " " , stdout ); - printf("\n"); - } - printf("================================================================================\n"); - stringlist_free( job_names ); -} - - - - -void enkf_tui_misc_menu( void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - menu_type * menu = menu_alloc( "Misceallanous stuff" , "Back" , "bB"); - menu_add_item(menu , "List all \'magic\' <...> strings" , "lL" , enkf_tui_misc_printf_subst_list , enkf_main , NULL); - menu_add_item(menu , "List all available forward model jobs","jJ" , enkf_tui_misc_list_jobs , enkf_main , NULL ); - menu_add_item(menu , "Help","hH" , enkf_tui_help_menu_misc , enkf_main , NULL ); - menu_run(menu); - menu_free(menu); -} diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_misc.h b/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_misc.h deleted file mode 100644 index 0a260649ab..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_misc.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_tui_misc.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENKF_TUI_MISC_H -#define ERT_ENKF_TUI_MISC_H - - -void enkf_tui_misc_menu( void * arg); - - -#endif diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_ranking.c b/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_ranking.c deleted file mode 100644 index d4267c7227..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_ranking.c +++ /dev/null @@ -1,220 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_tui_ranking.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -static void enkf_tui_ranking_make_misfit_ensemble( void * arg) { - arg_pack_type * arg_pack = arg_pack_safe_cast( arg ); - enkf_main_type * enkf_main = arg_pack_iget_ptr( arg_pack , 0 ); - - enkf_fs_type * fs = enkf_main_tui_get_fs(enkf_main); - enkf_obs_type * enkf_obs = enkf_main_get_obs( enkf_main ); - const ensemble_config_type * ensemble_config = enkf_main_get_ensemble_config(enkf_main); - const int history_length = enkf_main_get_history_length( enkf_main ); - const int ens_size = enkf_main_get_ensemble_size( enkf_main ); - - - misfit_ensemble_type * misfit_ensemble = enkf_fs_get_misfit_ensemble( fs ); - misfit_ensemble_initialize( misfit_ensemble , ensemble_config , enkf_obs , fs , ens_size , history_length , false); - { - menu_item_type * obs_item = arg_pack_iget_ptr( arg_pack , 1 ); - menu_item_enable( obs_item ); - } -} - - -static void enkf_tui_ranking_create_obs( void * arg ) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - enkf_obs_type * enkf_obs = enkf_main_get_obs( enkf_main ); - enkf_fs_type * fs = enkf_main_tui_get_fs( enkf_main ); - misfit_ensemble_type * misfit_ensemble = enkf_fs_get_misfit_ensemble( fs ); - - if (!misfit_ensemble_initialized( misfit_ensemble )) { - fprintf(stderr,"Sorry: must initialzie the misfit table first \n"); - return; - } else { - ranking_table_type * ranking_table = enkf_main_get_ranking_table( enkf_main ); - const int history_length = enkf_main_get_history_length( enkf_main ); - const int prompt_len = 50; - const char * prompt1 = "Observations to use for ranking"; - const char * prompt2 = "Name to store ranking under"; - const char * store_prompt = "Name of file to store ranking"; - int step1,step2; - stringlist_type * ranking_keys; - char * obs_keys_input; - char * ranking_key; - char * ranking_file; - util_printf_prompt(prompt1 , prompt_len , '=' , "=> "); - obs_keys_input = util_alloc_stdin_line(); - ranking_keys = enkf_obs_alloc_matching_keylist( enkf_obs , obs_keys_input ); - enkf_tui_util_scanf_report_steps(history_length , prompt_len , &step1 , &step2); - - util_printf_prompt(prompt2 , prompt_len , '=' , "=> "); - ranking_key = util_alloc_stdin_line(); - if (ranking_key == NULL) - ranking_key = util_alloc_string_copy( MISFIT_DEFAULT_RANKING_KEY ); - - util_printf_prompt(store_prompt , prompt_len , '=' , "=> "); - ranking_file = util_alloc_stdin_line(); - - char * report_steps = util_alloc_sprintf("%d-%d", step1, step2); - int_vector_type * steps_vector = string_util_alloc_value_list(report_steps); - - if (stringlist_get_size( ranking_keys ) > 0) { - ranking_table_add_misfit_ranking( ranking_table , misfit_ensemble , ranking_keys , steps_vector, ranking_key ); - ranking_table_display_ranking( ranking_table , ranking_key); - } else - fprintf(stderr,"The input string : \"%s\" did not resolve to any valid observation keys \n", obs_keys_input); - - free(report_steps); - int_vector_free(steps_vector); - free( obs_keys_input ); - stringlist_free( ranking_keys ); - free( ranking_key ); - util_safe_free( ranking_file ); - } -} - - - - -static void enkf_tui_ranking_create_data__( void * arg , bool sort_increasing) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - ranking_table_type * ranking_table = enkf_main_get_ranking_table( enkf_main ); - enkf_fs_type * fs = enkf_main_tui_get_fs( enkf_main ); - ensemble_config_type * ensemble_config = enkf_main_get_ensemble_config( enkf_main ); - time_map_type * time_map = enkf_fs_get_time_map( fs ); - const int prompt_len = 60; - const char * prompt1 = "Data key to use for ranking"; - const char * prompt2 = "Report step of data [Blank: last step]"; - const char * ranking_name = "Name of new ranking"; - - char * user_key; - - util_printf_prompt(prompt1 , prompt_len , '=' , "=> "); - user_key = util_alloc_stdin_line(); - if (user_key != NULL) { - util_printf_prompt( prompt2 , prompt_len , '=' , "=> "); - { - int step = -1; - { - char * step_char = util_alloc_stdin_line(); - - if (step_char == NULL) - step = time_map_get_last_step( time_map ); - else { - util_sscanf_int( step_char , &step ); - free( step_char ); - } - } - - if (step >= 0) { - const enkf_config_node_type * config_node; - char * key_index; - config_node = ensemble_config_user_get_node( ensemble_config , user_key , &key_index); - if (config_node) { - util_printf_prompt(ranking_name , prompt_len , '=' , "=> "); - char * ranking_key = util_alloc_stdin_line(); - if (ranking_key != NULL) { - ranking_table_add_data_ranking( ranking_table , sort_increasing , ranking_key , user_key , key_index , fs , config_node, step ); - ranking_table_display_ranking( ranking_table , ranking_key ); - } - util_safe_free( ranking_key ); - } - } - } - } - util_safe_free( user_key ); -} - -static void enkf_tui_ranking_create_data_increasing( void * arg ) { - enkf_tui_ranking_create_data__( arg , true ); -} - - -static void enkf_tui_ranking_create_data_decreasing( void * arg ) { - enkf_tui_ranking_create_data__( arg , false ); -} - - - -static void enkf_tui_ranking_display( void * arg ) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - ranking_table_type * ranking_table = enkf_main_get_ranking_table( enkf_main ); - - const int prompt_len = 50; - const char * prompt1 = "Ranking to display"; - char * ranking_key; - - util_printf_prompt(prompt1 , prompt_len , '=' , "=> "); - ranking_key = util_alloc_stdin_line(); - if (ranking_key == NULL) - ranking_key = util_alloc_string_copy( MISFIT_DEFAULT_RANKING_KEY); - if (ranking_table_has_ranking( ranking_table , ranking_key)) - ranking_table_display_ranking( ranking_table , ranking_key); - else - fprintf(stderr,"Sorry: could not find ranking key: %s \n", ranking_key ); - - free( ranking_key ); -} - - -void enkf_tui_ranking_menu(void * arg) { - - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - { - menu_type * menu = menu_alloc("Ranking of results" , "Back" , "bB"); - menu_item_type * obs_item; - { - arg_pack_type * arg_pack = arg_pack_alloc(); - arg_pack_append_ptr( arg_pack , enkf_main ); - menu_add_item(menu , "Create/update misfit table" , "cC" , enkf_tui_ranking_make_misfit_ensemble , arg_pack , arg_pack_free__); - menu_add_separator( menu ); - obs_item = menu_add_item(menu , "New observation based ranking" , "nN" , enkf_tui_ranking_create_obs , enkf_main , NULL); - arg_pack_append_ptr( arg_pack , obs_item ); - } - menu_add_item(menu , "New data based ranking (Sort: increasing)" , "iI" , enkf_tui_ranking_create_data_increasing , enkf_main , NULL); - menu_add_item(menu , "New data based ranking (Sort: decreasing)" , "dD" , enkf_tui_ranking_create_data_decreasing , enkf_main , NULL); - menu_add_item(menu , "Show ranking" , "sS" , enkf_tui_ranking_display , enkf_main , NULL); - { - enkf_fs_type * fs = enkf_main_tui_get_fs( enkf_main ); - misfit_ensemble_type * misfit_ensemble = enkf_fs_get_misfit_ensemble( fs ); - if (!misfit_ensemble_initialized( misfit_ensemble )) - menu_item_disable( obs_item ); - } - menu_add_item(menu , "Help" , "hH" , enkf_tui_help_menu_rank , enkf_main , NULL); - menu_run(menu); - menu_free(menu); - } - -} diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_ranking.h b/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_ranking.h deleted file mode 100644 index 36fbed1505..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_ranking.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_tui_ranking.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENKF_TUI_RANKING_H -#define ERT_ENKF_TUI_RANKING_H - - - -void enkf_tui_ranking_menu(void * ); - - - -#endif diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_run.c b/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_run.c deleted file mode 100644 index 025456c7f7..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_run.c +++ /dev/null @@ -1,243 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_tui_run.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - - - - - -void enkf_tui_run_smoother(void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - int ens_size = enkf_main_get_ensemble_size( enkf_main ); - bool_vector_type * iactive = bool_vector_alloc( ens_size , true ); - enkf_fs_type * source_fs = enkf_main_tui_get_fs( enkf_main ); - enkf_main_run_smoother(enkf_main , source_fs , "AUTO-SMOOTHER" , iactive , 0 , true ); - bool_vector_free( iactive ); -} - - - -void enkf_tui_run_iterated_ES(void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - const analysis_config_type * analysis_config = enkf_main_get_analysis_config(enkf_main); - analysis_iter_config_type * iter_config = analysis_config_get_iter_config(analysis_config); - int num_iter = analysis_iter_config_get_num_iterations(iter_config); - enkf_main_run_iterated_ES(enkf_main , num_iter ); -} - - -/** - Experiments will always start with the parameters at time == 0; if - you want to simulate with updated (posterior) parameters, you - ensure that by initializing from a report_step > 0 from an - existing case. - - Prediction part is included if it exists. -*/ - -void enkf_tui_run_exp(void * enkf_main) { - const int ens_size = enkf_main_get_ensemble_size( enkf_main ); - bool_vector_type * iactive = bool_vector_alloc(0,false); - - { - - char * prompt = util_alloc_sprintf("Which realizations to simulate (Ex: 1,3-5) [M to return to menu] : " , ens_size); - char * select_string; - - util_printf_prompt(prompt , PROMPT_LEN , '=' , "=> "); - select_string = util_alloc_stdin_line(); - enkf_tui_util_sscanf_active_list( iactive , select_string , ens_size); - - util_safe_free( select_string ); - free( prompt ); - } - if (bool_vector_count_equal(iactive , true)) - enkf_main_run_tui_exp(enkf_main , iactive ); - - bool_vector_free(iactive); -} - - - -void enkf_tui_run_create_runpath__(void * __enkf_main) { - enkf_main_type * enkf_main = enkf_main_safe_cast(__enkf_main); - const int ens_size = enkf_main_get_ensemble_size( enkf_main ); - bool_vector_type * iactive = bool_vector_alloc(0,false); - - { - char * prompt = util_alloc_sprintf("Which realizations to create[ensemble size:%d] : " , ens_size); - char * select_string; - - util_printf_prompt(prompt , PROMPT_LEN , '=' , "=> "); - select_string = util_alloc_stdin_line(); - enkf_tui_util_sscanf_active_list( iactive , select_string , ens_size ); - - util_safe_free( select_string ); - free( prompt ); - } - enkf_main_create_run_path(enkf_main , iactive , 0 ); - bool_vector_free(iactive); -} - - - -static void enkf_tui_display_load_msg( int iens , const stringlist_type * msg_list ) { - for (int i=0; i < stringlist_get_size( msg_list ); i++) - printf("[%03d] : %s \n", iens , stringlist_iget( msg_list , i )); -} - - -void enkf_tui_run_manual_load__( void * arg ) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - const int ens_size = enkf_main_get_ensemble_size( enkf_main ); - bool_vector_type * iactive = bool_vector_alloc( 0 , false ); - int iter = 0; - - { - char * prompt = util_alloc_sprintf("Which realizations to load (Ex: 1,3-5) [M to return to menu] : [ensemble size:%d] : " , ens_size); - char * select_string; - util_printf_prompt(prompt , PROMPT_LEN , '=' , "=> "); - select_string = util_alloc_stdin_line(); - - enkf_tui_util_sscanf_active_list( iactive , select_string , ens_size ); - util_safe_free( select_string ); - - free( prompt ); - } - - { - const model_config_type * model_config = enkf_main_get_model_config( enkf_main ); - if (model_config_runpath_requires_iter( model_config )) { - const char * prompt = "Which iteration to load from [0...?) : "; - char * input; - bool OK; - util_printf_prompt(prompt , PROMPT_LEN , '=' , "=> "); - - input = util_alloc_stdin_line(); - if (input == NULL) - return; - - OK = util_sscanf_int( input , &iter ); - - free( input ); - if (!OK) - return; - } - } - - - if (bool_vector_count_equal( iactive , true )) { - stringlist_type ** realizations_msg_list = util_calloc( ens_size , sizeof * realizations_msg_list ); - int iens = 0; - for (; iens < ens_size; ++iens) { - realizations_msg_list[iens] = stringlist_alloc_new(); - } - - enkf_main_load_from_forward_model(enkf_main, iter , iactive, realizations_msg_list); - - for (iens = 0; iens < ens_size; ++iens) { - stringlist_type * msg_list = realizations_msg_list[iens]; - if (bool_vector_iget(iactive, iens)) { - if (stringlist_get_size( msg_list )) { - enkf_tui_display_load_msg( iens , msg_list ); - } - } - stringlist_free(msg_list); - } - free(realizations_msg_list); - } - - bool_vector_free( iactive ); -} - - - - - - -/*****************************************************************/ - -void enkf_tui_run_menu(void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - model_config_type * model_config = enkf_main_get_model_config( enkf_main ); - path_fmt_type * runpath_fmt = model_config_get_runpath_fmt( model_config ); - menu_type * menu; - - { - char * title = util_alloc_sprintf("Run menu [case:%s Runpath:%s]" , enkf_main_get_current_fs( enkf_main ) , path_fmt_get_fmt ( runpath_fmt )); - menu = menu_alloc(title , "Back" , "bB"); - free(title); - } - menu_add_item(menu , "Ensemble run: history" , "xX" , enkf_tui_run_exp , enkf_main , NULL); - { - const analysis_config_type * analysis_config = enkf_main_get_analysis_config(enkf_main); - const enkf_obs_type * enkf_obs = enkf_main_get_obs( enkf_main ); - - - menu_item_type * ES_item = menu_add_item(menu , "Integrated smoother update" , "iI" , enkf_tui_run_smoother , enkf_main , NULL); - menu_item_type * it_ES_item = menu_add_item(menu , "Iterated smoother [RML-EnKF]" , "tT" , enkf_tui_run_iterated_ES , enkf_main , NULL); - - if (!analysis_config_get_module_option(analysis_config , ANALYSIS_ITERABLE)) { - menu_item_disable( it_ES_item ); - } else - menu_item_disable( ES_item ); - - if (!enkf_obs_have_obs( enkf_obs )) { - menu_item_disable( it_ES_item ); - menu_item_disable( ES_item ); - } - } - menu_add_separator(menu); - menu_add_item(menu , "Create runpath directories - NO simulation" , "cC" , enkf_tui_run_create_runpath__ , enkf_main , NULL ); - menu_add_item(menu , "Load results manually" , "lL" , enkf_tui_run_manual_load__ , enkf_main , NULL); - menu_add_separator(menu); - { - menu_item_type * analysis_item = menu_add_item(menu , "Analysis menu" , "aA" , enkf_tui_analysis_menu , enkf_main , NULL); - - if (!enkf_main_have_obs( enkf_main )) - menu_item_disable( analysis_item ); - } - menu_add_item(menu , "Help" , "hH" , enkf_tui_help_menu_run , enkf_main , NULL); - menu_run(menu); - menu_free(menu); -} diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_run.h b/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_run.h deleted file mode 100644 index 331aefc993..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_run.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_tui_run.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENKF_TUI_RUN_H -#define ERT_ENKF_TUI_RUN_H - -void enkf_tui_run_menu(void *); -void enkf_tui_run_exp(void *); -void enkf_tui_run_start(void *); -void enkf_tui_run_smoother(void *); -void enkf_tui_run_iterated_ES(void *); - -#endif diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_simple.c b/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_simple.c deleted file mode 100644 index 5e8fd2f5c7..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_simple.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_tui_init.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - - -void enkf_tui_simple_menu(void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast(arg); - menu_type * menu = menu_alloc("Simple menu" , "Quit" , "qQ"); - menu_add_item(menu , "Sensitivity run: No data conditioning" , "sS" , enkf_tui_run_exp , enkf_main , NULL); - const model_config_type * model_config = enkf_main_get_model_config( enkf_main ); - menu_item_type * ES_item = menu_add_item(menu , "Assimilation run: Smoother update" , "aA" , enkf_tui_run_smoother , enkf_main , NULL); - menu_item_type * it_ES_item = menu_add_item(menu , "Assimilation run: Iterated smoother [RML-EnKF]" , "iI" , enkf_tui_run_iterated_ES , enkf_main , NULL); - - if (!model_config_has_history( model_config )) { - menu_item_disable( it_ES_item ); - menu_item_disable( ES_item ); - } - menu_add_separator( menu ); - menu_add_item(menu , "Help" , "hH" , enkf_tui_help_menu_simple , enkf_main , NULL); - menu_add_item(menu , "Advanced menu" , "dD" , enkf_tui_main_menu , enkf_main , NULL); - menu_run(menu); - menu_free(menu); - -} diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_simple.h b/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_simple.h deleted file mode 100644 index 36d612ade7..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_simple.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_tui_main.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENKF_TUI_SIMPLE_H -#define ERT_ENKF_TUI_SIMPLE_H - - -void enkf_tui_simple_menu(void * ); - - -#endif diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_table.c b/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_table.c deleted file mode 100644 index 36fc097a23..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_table.c +++ /dev/null @@ -1,248 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_tui_table.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - - - - - -static void enkf_tui_table__(enkf_main_type * enkf_main , bool gen_kw_table , bool ens_plot) { - const ensemble_config_type * ensemble_config = enkf_main_get_ensemble_config(enkf_main); - enkf_fs_type * fs = enkf_main_tui_get_fs(enkf_main); - const int ens_size = enkf_main_get_ensemble_size( enkf_main ); - const int last_report = enkf_main_get_history_length( enkf_main ); - int iens1, iens2, step1 , step2; - int ikey , num_keys; - int length; - FILE * stream = NULL; - int * index; - char ** user_keys; - char ** index_keys; - double ** data; - bool * active; - enkf_config_node_type ** config_nodes; - enkf_node_type ** nodes; - - const int prompt_len = 50; - const char * keylist_prompt = "Table headings: KEY1:INDEX1 KEY2:INDEX2 ...."; - const char * gen_kw_prompt = "GEN_KW Parameter"; - const char * file_prompt = "File to save in (blank for nothing) "; - - if (gen_kw_table) { - char * key; - enkf_config_node_type * config_node; - util_printf_prompt(gen_kw_prompt , prompt_len , '=' , "=> "); - key = util_alloc_stdin_line(); - if (ensemble_config_has_key( ensemble_config , key )) { - config_node = ensemble_config_get_node( ensemble_config , key ); - if (enkf_config_node_get_impl_type( config_node ) == GEN_KW) { - gen_kw_config_type * gen_kw_config = enkf_config_node_get_ref( config_node ); - num_keys = gen_kw_config_get_data_size( gen_kw_config ); - - user_keys = util_calloc( num_keys , sizeof * user_keys ); - for (int i=0; i < num_keys; i++) - user_keys[i] = gen_kw_config_alloc_user_key( gen_kw_config , i); - - } else { - fprintf(stderr,"wrong type of: %s \n",key); - free( key ); - return; /* going home on invalid input */ - } - } else { - fprintf(stderr,"** warning: do not have key:%s \n", key); - free( key ); - return ; /* going home on invalid input */ - } - free( key ); - } else { - char * input_keys; - util_printf_prompt(keylist_prompt , prompt_len , '=' , "=> "); - input_keys = util_alloc_stdin_line(); - util_split_string(input_keys , " " , &num_keys , &user_keys); - free( input_keys ); - } - - - util_printf_prompt(file_prompt , prompt_len , '=' , "=> "); - { - char * filename = util_alloc_stdin_line( ); - if (filename != NULL) - stream = util_mkdir_fopen( filename , "w"); - free( filename ); - } - - active = util_calloc( num_keys , sizeof * active ); - nodes = util_calloc( num_keys , sizeof * nodes ); - config_nodes = util_calloc( num_keys , sizeof * config_nodes ); - index_keys = util_calloc( num_keys , sizeof * index_keys ); - for (ikey = 0; ikey < num_keys; ikey++) { - config_nodes[ikey] = (enkf_config_node_type *) ensemble_config_user_get_node( ensemble_config , user_keys[ikey] , &index_keys[ikey]); - if (config_nodes[ikey] != NULL) { - nodes[ikey] = enkf_node_alloc( config_nodes[ikey] ); - active[ikey] = true; - } else { - fprintf(stderr,"** Warning: could not lookup node: %s \n",user_keys[ikey]); - nodes[ikey] = NULL; - active[ikey] = false; - } - } - - if (ens_plot) { - iens1 = 0; - iens2 = enkf_main_get_ensemble_size( enkf_main ); - step1 = util_scanf_int_with_limits("report step",prompt_len , 0 , last_report); - step2 = step1 + 1; - length = (iens2 - iens1); - } else { - iens1 = util_scanf_int_with_limits("ensemble member",prompt_len , 0 , ens_size - 1); - iens2 = iens1 + 1; - step1 = 0; - step2 = last_report + 1; - length = (step2 - step1); - } - index = util_calloc( length , sizeof * index ); - data = util_calloc( num_keys , sizeof * data ); - { - int i; - for (i = 0; i < num_keys; i++) - data[i] = util_calloc( length , sizeof * data[i] ); - } - - { - int active_length = 0; - int total_line_count = 0; - double line[num_keys]; - int iens, step; - - for (iens = iens1; iens < iens2; iens ++) { - for (step = step1; step < step2; step++) { - int line_count = 0; - - for (ikey = 0; ikey < num_keys; ikey++) { - if (active[ikey]) { - node_id_type node_id = {.report_step = step, - .iens = iens }; - if (enkf_node_user_get( nodes[ikey] , fs , index_keys[ikey] , node_id , &line[ikey])) - line_count++; - else - line[ikey] = -1; - } - } - - if (line_count > 0) { - for (ikey=0; ikey < num_keys; ikey++) - data[ikey][active_length] = line[ikey]; - index[active_length] = total_line_count; - active_length++; - } - - total_line_count++; - } - } - - if (stream != NULL) { - if (ens_plot) - enkf_util_fprintf_data( index , (const double **) data , "Realization" , (const char **) user_keys , active_length , num_keys , active , true , stream); - else - enkf_util_fprintf_data( index , (const double **) data , "Report-step" , (const char **) user_keys , active_length , num_keys , active , false , stream); - fclose(stream); - } - - printf("\n\n"); - if (ens_plot) - enkf_util_fprintf_data( index , (const double **) data , "Realization" , (const char **) user_keys , active_length , num_keys , active , true , stdout); - else - enkf_util_fprintf_data( index , (const double **) data , "Report-step" , (const char **) user_keys , active_length , num_keys , active , false , stdout); - } - - for (ikey = 0; ikey < num_keys; ikey++) { - if (active[ikey]) - enkf_node_free( nodes[ikey] ); - - free(index_keys[ikey]); - free(user_keys[ikey]); - free(data[ikey]); - } - free( user_keys ); - free( active ); - free( index_keys); - free( data ); - free( nodes ); - free( config_nodes ); -} - - - - - -static void enkf_tui_table_ensemble(void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - enkf_tui_table__(enkf_main , false , true); -} - - -static void enkf_tui_table_GEN_KW_ensemble(void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - enkf_tui_table__(enkf_main , true , true); -} - - -static void enkf_tui_table_time(void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - enkf_tui_table__(enkf_main , false , false); -} - - - - - -void enkf_tui_table_menu(void * arg) { - - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - { - menu_type * menu = menu_alloc("Table of results" , "Back" , "bB"); - menu_add_item(menu , "Ensemble of parameters" , "eE" , enkf_tui_table_ensemble , enkf_main , NULL); - menu_add_item(menu , "GEN_KW ensemble" , "gG" , enkf_tui_table_GEN_KW_ensemble , enkf_main , NULL); - menu_add_item(menu , "Time development of parameters" , "tT" , enkf_tui_table_time , enkf_main , NULL); - menu_add_item(menu , "Help" , "hH" , enkf_tui_help_menu_table , enkf_main , NULL); - menu_run(menu); - menu_free(menu); - } -} diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_table.h b/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_table.h deleted file mode 100644 index 304ee727ab..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_table.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_tui_table.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENKF_TUI_TABLE -#define ERT_ENKF_TUI_TABLE - -void enkf_tui_table_menu(void * ); - -#endif diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_util.c b/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_util.c deleted file mode 100644 index 26a35a9de9..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_util.c +++ /dev/null @@ -1,400 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_tui_util.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - - -/** - This file implements various small utility functions for the (text - based) EnKF user interface. -*/ - - - - - -/** - Very simple function which is in interactive functions. Used to - query the user: - - - Key identifying a field. - - An integer report step. - - Whether we are considering the analyzed state or the forecast. - - The config_node is returned, and in addition the report_step, iens - and analysis_state are returned by reference. It is OK the pass in - NULL for these pointers; in that case the user is not queried for - these values. - - The keyword is checked for existence; but it is not checked whether - the report_step actually exists. If impl_type == INVALID, any - implementation type will be accepted, otherwise we loop until the - keyword is of type impl_type. -*/ - -const enkf_config_node_type * enkf_tui_util_scanf_key(const ensemble_config_type * config , int prompt_len , ert_impl_type impl_type , enkf_var_type var_type) { - char * kw; - bool OK; - const enkf_config_node_type * config_node = NULL; - do { - OK = true; - util_printf_prompt("Keyword" , prompt_len , '=' , "=> "); - kw = util_alloc_stdin_line(); - if(kw==NULL){ - OK = true; - } - else if (ensemble_config_has_key(config , kw)) { - config_node = ensemble_config_get_node(config , kw); - - if (impl_type != INVALID) - if (enkf_config_node_get_impl_type(config_node) != impl_type) - OK = false; - - if (var_type != INVALID_VAR) - if (enkf_config_node_get_var_type(config_node) != var_type) - OK = false; - } else OK = false; - free(kw); - } while (!OK); - return config_node; -} - - -/** - Present the user with the queries: - - First ensemble member ==> - Last ensemble member ===> - - It then allocates (bool *) pointer [0..ens_size-1], where the - interval gven by the user is true (i.e. actve), and the rest is - false. It s the responsiibility of the calling scope to free this. -*/ - - -bool * enkf_tui_util_scanf_alloc_iens_active(int ens_size, int prompt_len , int * _iens1 , int * _iens2) { - bool * iactive = util_calloc(ens_size , sizeof * iactive ); - int iens1 = util_scanf_int_with_limits("First ensemble member" , prompt_len , 0 , ens_size - 1); - int iens2 = util_scanf_int_with_limits("Last ensemble member" , prompt_len , iens1 , ens_size - 1); - int iens; - - for (iens = 0; iens < ens_size; iens++) - iactive[iens] = false; - - for (iens = iens1; iens <= iens2; iens++) - iactive[iens] = true; - - - *_iens1 = iens1; - *_iens2 = iens2; - return iactive; -} - - - -/** - Presents the reader with a prompt, and reads a string containing - two integers separated by a character(s) in the set: " ,-:". If the - user enters a blank string that is interpreted as "all - realizations", and the return variabels are set to: - - iens1 = 0 iens2 = ens_size - 1 - - Will not return before the user has actually presented a valid - string. -*/ - - -void enkf_tui_util_scanf_iens_range(const char * prompt_fmt , int ens_size , int prompt_len , int * iens1 , int * iens2) { - char * prompt = util_alloc_sprintf(prompt_fmt , ens_size - 1); - bool OK = false; - - util_printf_prompt(prompt , prompt_len , '=' , "=> "); - - while (!OK) { - char * input = util_alloc_stdin_line(); - const char * current_ptr = input; - OK = true; - - if (input != NULL) { - current_ptr = util_parse_int(current_ptr , iens1 , &OK); - current_ptr = util_skip_sep(current_ptr , " ,-:" , &OK); - current_ptr = util_parse_int(current_ptr , iens2 , &OK); - - if (!OK) - printf("Failed to parse two integers from: \"%s\". Example: \"0 - 19\" to get the 20 first members.\n",input); - free(input); - } else { - *iens1 = 0; - *iens2 = ens_size - 1; - } - } - free(prompt); -} - - -void enkf_tui_util_scanf_report_steps(int last_report , int prompt_len , int * __step1 , int * __step2) { - char * prompt = util_alloc_sprintf("Report steps (0 - %d)" , last_report); - bool OK = false; - - util_printf_prompt(prompt , prompt_len , '=' , "=> "); - - while (!OK) { - char * input = util_alloc_stdin_line(); - const char * current_ptr = input; - int step1 , step2; - OK = true; - if(input == NULL){ - step1=0; - step2=last_report; - } - else{ - current_ptr = util_parse_int(current_ptr , &step1 , &OK); - current_ptr = util_skip_sep(current_ptr , " ,-:" , &OK); - current_ptr = util_parse_int(current_ptr , &step2 , &OK); - } - if (!OK) - printf("Failed to parse two integers from: \"%s\". Example: \"0 - 19\" to get the 20 first report steps.\n",input); - free(input); - - step1 = util_int_min(step1 , last_report); - step2 = util_int_min(step2 , last_report); - if (step1 > step2) - util_exit("%s: ohh come on - must have a finite interval forward in time - no plots for you.\n",__func__); - *__step1 = step1; - *__step2 = step2; - - } - free(prompt); -} - - - -/** - Similar to enkf_tui_util_scanf_alloc_iens_active(), but based on report steps. -*/ - -bool * enkf_tui_util_scanf_alloc_report_active(int last_step, int prompt_len) { - bool * iactive = util_calloc((last_step + 1) , sizeof * iactive ); - int step1 = util_scanf_int_with_limits("First report step" , prompt_len , 0 , last_step); - int step2 = util_scanf_int_with_limits("Last report step" , prompt_len , step1 , last_step); - int step; - - for (step = 0; step <= last_step; step++) - iactive[step] = false; - - for (step = step1; step <= step2; step++) - iactive[step] = true; - - return iactive; -} - - -/** - This functions reads i,j,k and returns them be reference; if the - reference pointer is NULL, that coordinate is skipped. I.e. - - enkf_tui_util_scanf_ijk__(config , 100 , &i , &j , NULL); - - Will read i and j. If your are interested in all three coordinates - you should use enkf_tui_util_scanf_ijk() which has a more flexible - parser. -*/ - - -void enkf_tui_util_scanf_ijk__(const field_config_type * config, int prompt_len , int *i , int *j , int *k) { - int nx,ny,nz; - - field_config_get_dims(config , &nx , &ny , &nz); - if (i != NULL) (*i) = util_scanf_int_with_limits("Give i-index" , prompt_len , 1 , nx) - 1; - if (j != NULL) (*j) = util_scanf_int_with_limits("Give j-index" , prompt_len , 1 , ny) - 1; - if (k != NULL) (*k) = util_scanf_int_with_limits("Give k-index" , prompt_len , 1 , nz) - 1; -} - - - - -/** - The function reads ijk, but it returns a global 1D index. Observe - that the user is supposed to enter an index starting at one - whichs - is immediately shifted down to become zero based. - - The function will loop until the user has entered ijk corresponding - to an active cell. -*/ - -int enkf_tui_util_scanf_ijk(const field_config_type * config, int prompt_len) { - int global_index; - field_config_scanf_ijk(config , true , "Give (i,j,k) indices" , prompt_len , NULL , NULL , NULL , &global_index); - return global_index; -} - - - - - - - - - -/** - This function runs through all the report steps [step1:step2] for - member iens, and gets the value of the cell 'get_index'. Current - implementation assumes that the config_node/node combination are of - field type - this should be generalized to use the enkf_node_iget() - function. - - The value is returned (by reference) in y, and the corresponding - time (currently report_step) is returned in 'x'. -*/ - - -void enkf_tui_util_get_time(enkf_fs_type * fs , const enkf_config_node_type * config_node, enkf_node_type * node , int get_index , int step1 , int step2 , int iens , double * x , double * y ) { - const char * key = enkf_config_node_get_key(config_node); - int report_step; - int index = 0; - for (report_step = step1; report_step <= step2; report_step++) { - node_id_type node_id = {.report_step = report_step , .iens = iens }; - if (enkf_node_try_load(node , fs , node_id)) { - const field_type * field = enkf_node_value_ptr( node ); - y[index] = field_iget_double(field , get_index); - } else { - fprintf(stderr," ** Warning field:%s is missing for member,report: %d,%d \n",key , iens , report_step); - y[index] = -1; - } - x[index] = report_step; - index++; - } -} - - -int enkf_tui_util_scanf_report_step(int last_report, const char * prompt , int prompt_len) { - int report_step = util_scanf_int_with_limits(prompt , prompt_len , 0 , last_report); - return report_step; -} - -char * enkf_tui_util_scanf_report_step_as_char(int last_report, const char * prompt , int prompt_len) { - char * report_step = util_scanf_int_with_limits_return_char(prompt , prompt_len , 0 , last_report); - return report_step; -} - -int enkf_tui_util_scanf_int_with_default(const char * prompt , int prompt_len , bool * default_used) { - bool OK; - int value; - *default_used = false; - do { - char * input; - - util_printf_prompt(prompt , prompt_len , '=' , "=> "); - input = util_alloc_stdin_line(); - if (input == NULL) { - *default_used = true; - OK = true; - value = -1; - } else { - OK = util_sscanf_int( input , &value ); - free( input ); - } - } while (!OK); - return value; -} - -int enkf_tui_util_scanf_int_with_default_return_to_menu(const char * prompt , int prompt_len , bool * default_used) { - bool OK; - int value; - *default_used = false; - do { - char * input; - - util_printf_prompt(prompt , prompt_len , '=' , "=> "); - input = util_alloc_stdin_line(); - if (input == NULL) { - *default_used = true; - OK = true; - value = -1; - } - else if (strcmp(input,"M")==0 || strcmp(input,"m")==0){ - OK = true; - value = -2; - } - else { - OK = util_sscanf_int( input , &value ); - free( input ); - } - } while (!OK); - return value; -} - -bool enkf_tui_util_sscanf_active_list( bool_vector_type * iactive , const char * select_string , int ens_size ) { - if (select_string == NULL) { - bool_vector_set_default( iactive , true ); - bool_vector_iset( iactive , ens_size - 1 , true ); - return true; - } else { - bool OK; - OK = string_util_init_active_mask( select_string , iactive ); - - if (bool_vector_size( iactive ) < ens_size) - bool_vector_iset( iactive , ens_size - 1 , false ); - - return OK; - } -} - -/** - The limit is not inclusive -*/ -double enkf_tui_util_scanf_double_with_lower_limit(const char * prompt , int prompt_len , double min_value) { - double value; - char * new_prompt = util_alloc_sprintf("%s (greater than %g)" , prompt , min_value ); - do { - value = util_scanf_double(new_prompt , prompt_len); - } while (value <= min_value); - free(new_prompt); - return value; -} - - -/*****************************************************************/ - - -/* Minimum wrapping of vfprintf */ -void enkf_tui_util_msg(const char * fmt , ...) { - va_list ap; - va_start(ap , fmt); - vfprintf(stdout , fmt , ap); - va_end(ap); -} - - diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_util.h b/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_util.h deleted file mode 100644 index 6e74bdbb06..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_util.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_tui_util.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENKF_TUI_UTIL_H -#define ERT_ENKF_TUI_UTIL_H - -#include - -#include -#include -#include -#include -#include - -void enkf_tui_util_scanf_report_steps(int , int , int * , int * ); -const enkf_config_node_type * enkf_tui_util_scanf_key(const ensemble_config_type * , int , ert_impl_type , enkf_var_type); -int enkf_tui_util_scanf_ijk(const field_config_type * , int); -void enkf_tui_util_scanf_ijk__(const field_config_type * , int , int * , int * , int *); -bool * enkf_tui_util_scanf_alloc_report_active(int , int ); -bool * enkf_tui_util_scanf_alloc_iens_active(int , int , int * , int *); -void enkf_tui_util_get_time(enkf_fs_type * , const enkf_config_node_type * , enkf_node_type * , int , int , int , int , double * , double * ); -void enkf_tui_util_scanf_iens_range(const char * , int , int , int * , int * ); -int enkf_tui_util_scanf_report_step(int , const char * , int ); -char * enkf_tui_util_scanf_report_step_as_char(int , const char * , int ); -void enkf_tui_util_msg(const char * , ...); -int enkf_tui_util_scanf_int_with_default(const char * prompt , int prompt_len , bool * default_used); -int enkf_tui_util_scanf_int_with_default_return_to_menu(const char * prompt , int prompt_len , bool * default_used); -double enkf_tui_util_scanf_double_with_lower_limit(const char * prompt , int prompt_len , double min_value); -bool enkf_tui_util_sscanf_active_list( bool_vector_type * iactive , const char * select_string , int ens_size ); -#endif diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_workflow.c b/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_workflow.c deleted file mode 100644 index f4a5a96576..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_workflow.c +++ /dev/null @@ -1,112 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'enkf_tui_workflow.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - - -void enkf_tui_workflow_run( void * arg ) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - { - ert_workflow_list_type * workflow_list = enkf_main_get_workflow_list( enkf_main ); - util_printf_prompt("Name of workflow" , PROMPT_LEN , '=' , "=> "); - { - char * workflow_name = util_alloc_stdin_line(); - if (workflow_name != NULL) { - if (ert_workflow_list_has_workflow( workflow_list , workflow_name )) { - bool runOK = ert_workflow_list_run_workflow_blocking( workflow_list , workflow_name , enkf_main); - if (!runOK) { - printf("Errors in workflow:%s \n", workflow_name ); - printf("-----------------------------------------------------------------\n"); - config_error_fprintf( ert_workflow_list_get_last_error( workflow_list ) , true , stdout); - printf("-----------------------------------------------------------------\n"); - } - } - } - util_safe_free( workflow_name ); - } - } -} - - -void enkf_tui_workflow_load( void * arg ) { - // ... -} - - -void enkf_tui_workflow_list( void * arg ) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - { - ert_workflow_list_type * workflow_list = enkf_main_get_workflow_list( enkf_main ); - stringlist_type * name_list = ert_workflow_list_alloc_namelist( workflow_list ); - - printf("Available workflows: \n"); - { - int i; - for (i=0; i < stringlist_get_size( name_list ); i++) { - if ((i % 5) == 0) - printf("\n "); - else - printf(" "); - - printf("%s", stringlist_iget( name_list , i )); - } - } - stringlist_free( name_list ); - printf("\n\n"); - } -} - - -void enkf_tui_workflow_menu(void * arg) { - enkf_main_type * enkf_main = enkf_main_safe_cast( arg ); - menu_type * menu = menu_alloc("Workflows" , "Back" , "bB"); - - menu_add_item(menu , "Run workflow" , "rR" , enkf_tui_workflow_run , enkf_main , NULL ); - menu_add_item(menu , "Load workflow" , "lL" , enkf_tui_workflow_load , enkf_main , NULL ); - menu_add_item(menu , "List available workflows" , "iI" , enkf_tui_workflow_list , enkf_main , NULL ); - - menu_add_item(menu , "Help" , "hH" , enkf_tui_help_menu_run , enkf_main , NULL); - menu_run(menu); - menu_free(menu); - -} - diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_workflow.h b/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_workflow.h deleted file mode 100644 index fe6cc12720..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/enkf_tui_workflow.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'enkf_tui_workflow.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENKF_TUI_WORKFLOW_H -#define ERT_ENKF_TUI_WORKFLOW_H - -void enkf_tui_workflow_menu(void *); - -#endif diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/ert_tui_const.h b/ThirdParty/Ert/libenkf/applications/ert_tui/ert_tui_const.h deleted file mode 100644 index 4f2981569e..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/ert_tui_const.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'ert_tui_const.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_TUI_CONST -#ifdef __cplusplus -extern "C" { -#endif - -#define PROMPT_LEN 80 - - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/main.c b/ThirdParty/Ert/libenkf/applications/ert_tui/main.c deleted file mode 100644 index e86be1850e..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/main.c +++ /dev/null @@ -1,171 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'main.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - -#define WORKFLOW_OPTION "-wf" - -void text_splash() { - const int usleep_time = 1000; - int i; - { -#include "ERT.h" - printf("\n\n"); - for (i = 0; i < SPLASH_LENGTH; i++) { - printf("%s\n" , splash_text[i]); - util_usleep(usleep_time); - } - printf("\n\n"); - - sleep(1); -#undef SPLASH_LENGTH - } -} - - -/* - GIT_COMMIT and COMPILE_TIME_STAMP are env variables set by the - makefile. Will exit if the config file does not exist. -*/ -void enkf_welcome(const char * config_file) { - if (util_file_exists( config_file )) { - char * abs_path = util_alloc_realpath( config_file ); - char * config_file_msg = util_alloc_sprintf("Configuration file...: %s \n",abs_path); - - /* This will be printed if/when util_abort() is called on a later stage. */ - /* The svn_version and compile_time are added with the functione enkf_main_init_debug(). */ - util_abort_append_version_info(config_file_msg); - - free(config_file_msg); - free(abs_path); - } else util_exit(" ** Sorry: can not locate configuration file: %s \n\n" , config_file); -} - - -void enkf_usage() { - printf("\n"); - printf(" *********************************************************************\n"); - printf(" ** **\n"); - printf(" ** E R T **\n"); - printf(" ** **\n"); - printf(" **-----------------------------------------------------------------**\n"); - printf(" ** You have successfully started the ert program developed at **\n"); - printf(" ** Statoil. Before you can actually start using the program, you **\n"); - printf(" ** must create a configuration file. When the configuration file **\n"); - printf(" ** has been created, you can start the ert application with: **\n"); - printf(" ** **\n"); - printf(" ** bash> ert config_file **\n"); - printf(" ** **\n"); - printf(" ** Instructions on how to create the configuration file can be **\n"); - printf(" ** found at: http://ert.nr.no **\n"); - printf(" *********************************************************************\n"); -} - - - - -static void init_debug( const char * argv0) { - char * git_commit = util_alloc_sprintf("git commit...........: %s \n",GIT_COMMIT); - char * compile_time = util_alloc_sprintf("Compile time.........: %s \n",COMPILE_TIME_STAMP); - - /* This will be printed if/when util_abort() is called on a later stage. */ - util_abort_append_version_info( git_commit ); - util_abort_append_version_info( compile_time ); - - free(git_commit); - free(compile_time); - - util_abort_set_executable( argv0 ); -} - - - -void parse_workflows(int argc , char ** argv , stringlist_type * workflows) { - /* bool workflow_on = false; */ - for (int iarg = 2; iarg < argc; iarg++) { - stringlist_append_copy( workflows , argv[iarg]); - - /*if (strcmp( argv[iarg] , WORKFLOW_OPTION) == 0) - workflow_on = true; - else { - if (workflow_on) - stringlist_append_copy( workflows , argv[iarg]); - else - fprintf(stderr,"**Warning - option:\'%s\' ignored\n",argv[iarg]); - } - */ - } -} - - - - -int main (int argc , char ** argv) { - text_splash(); - init_debug( argv[0] ); - printf("\n"); - printf("Documentation : %s \n","http://ert.nr.no"); - printf("git commit : %s \n",GIT_COMMIT); - printf("compile time : %s \n",COMPILE_TIME_STAMP); - printf("site config : %s \n", site_config_get_location()); - - enkf_main_install_SIGNALS(); /* Signals common to both tui and gui. */ - signal(SIGINT , util_abort_signal); /* Control C - tui only. */ - if (argc < 2) { - enkf_usage(); - exit(1); - } else { - const char * model_config_file = argv[1]; - stringlist_type * workflow_list = stringlist_alloc_new(); - - parse_workflows( argc , argv , workflow_list ); - if ( !(util_entry_readable(model_config_file) && util_is_file(model_config_file)) ) - util_exit("Can not read file %s - exiting \n", model_config_file); - - { - char * abs_config = util_alloc_realpath( model_config_file ); - printf("model config : %s \n\n", abs_config); - free(abs_config); - } - enkf_welcome( model_config_file ); - { - enkf_main_type * enkf_main = enkf_main_bootstrap(model_config_file , true , true); - enkf_main_run_workflows( enkf_main , workflow_list ); - enkf_tui_main_menu(enkf_main); - enkf_main_free(enkf_main); - } - - stringlist_free( workflow_list ); - util_abort_free_version_info(); /* No fucking leaks ... */ - } - exit(0); -} diff --git a/ThirdParty/Ert/libenkf/applications/ert_tui/upgrade_fs104.c b/ThirdParty/Ert/libenkf/applications/ert_tui/upgrade_fs104.c deleted file mode 100644 index 0a96b2a825..0000000000 --- a/ThirdParty/Ert/libenkf/applications/ert_tui/upgrade_fs104.c +++ /dev/null @@ -1,320 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'main.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define BLOCK_FS_DRIVER_INDEX_ID 3002 - - -config_type * create_config( ) { - config_type * config = config_alloc( ); - config_schema_item_type * item; - - item = config_add_schema_item(config , ENSPATH_KEY , true , false); - config_schema_item_set_argc_minmax(item , 1 , 1 , 0 , NULL); - - item = config_add_schema_item(config , NUM_REALIZATIONS_KEY , true , false); - config_schema_item_set_argc_minmax(item , 1 , 1 , 1, (const config_item_types [1]) {CONFIG_INT}); - - item = config_add_schema_item(config , REFCASE_KEY , true , false); - config_schema_item_set_argc_minmax(item , 1 , 1 , 1 , NULL ); - - return config; -} - - -void fskip_block_fs( FILE * stream ) { - util_fread_int( stream ); - util_fread_int( stream ); -} - - -void fskip_block_fs_index( FILE * stream ) { - return; -} - - -char * check_enspath( const char * ens_path , stringlist_type * case_list ) { - char * mount_file = util_alloc_filename( ens_path , "enkf_mount_info" , NULL); - FILE * stream = util_fopen( mount_file , "r"); - int version; - - util_fread_long( stream ); - version = util_fread_int( stream ); - - if (version != 104) - util_exit("This application is only for upgrading fs from version 104\n"); - - { - for (int driver_nr = 0; driver_nr < 5; driver_nr++) { - int driver_id; - util_fread_int( stream ); - - driver_id = util_fread_int( stream ); - if (driver_id == BLOCK_FS_DRIVER_ID) - fskip_block_fs(stream); - else if (driver_id == BLOCK_FS_DRIVER_INDEX_ID) - fskip_block_fs_index(stream); - else - util_abort("%s: sorry can only convert BLOCK_FS cases\n",__func__); - } - } - - { - int num_case = util_fread_int( stream ); - for (int icase = 0; icase < num_case; icase++) { - char * case_name = util_fread_alloc_string( stream ); - stringlist_append_owned_ref( case_list , case_name ); - } - } - - - fclose( stream ); - return mount_file; -} - - - - - -void upgrade_case( int ens_size , const ecl_sum_type * refcase , const char * enspath , const char * case_path , const char * file) { - int num_drivers = 32; - int length = ecl_sum_get_last_report_step( refcase ); - block_fs_type ** fs_list = util_calloc( num_drivers , sizeof * fs_list ); - buffer_type * buffer = buffer_alloc(100); - double_vector_type * vector = double_vector_alloc( 0,0 ); - int driver_nr; - - - for (driver_nr = 0; driver_nr < num_drivers; driver_nr++) { - char * mount_file = util_alloc_sprintf( "%s/%s/mod_%d/%s.mnt" , enspath , case_path , driver_nr , file); - fs_list[driver_nr] = block_fs_mount( mount_file , 32 , 0 , 1 , 1 , true , false ); - free( mount_file ); - } - - { - const ecl_smspec_type * smspec = ecl_sum_get_smspec( refcase ); - int num_params = ecl_smspec_get_params_size( smspec ); - msg_type * msg; - { - char * prefix = util_alloc_sprintf("Upgrading %s/mod_nnn/%s: " , case_path , file ); - msg = msg_alloc( prefix , false ); - free( prefix ); - } - msg_show( msg ); - - for (int i=0; i < num_params; i++) { - const smspec_node_type * smspec_node = ecl_smspec_iget_node( smspec , i ); - const char * gen_key = smspec_node_get_gen_key1( smspec_node ); - { - char * progress = util_alloc_sprintf("%4.1f %s" , i * 100.0 / num_params , "%"); - msg_update( msg , progress ); - free( progress ); - } - if (gen_key != NULL) { - for (int iens = 0; iens < ens_size; iens++) { - block_fs_type * fs = fs_list[ iens % num_drivers ]; - double_vector_reset( vector ); - for (int tstep = 0; tstep <= length; tstep++) { - char * node_key = util_alloc_sprintf("%s.%d.%d" , gen_key , tstep , iens ); - - if (block_fs_has_file( fs , node_key )) { - block_fs_fread_realloc_buffer( fs , node_key , buffer ); - buffer_fskip( buffer , 12 ); - double_vector_iset( vector , tstep , buffer_fread_double( buffer )); - block_fs_unlink_file( fs , node_key ); - } - free( node_key ); - } - - if (double_vector_size( vector ) > 0) { - char * vector_key = util_alloc_sprintf("%s.%d" , gen_key , iens ); - buffer_rewind( buffer ); - buffer_fwrite_time_t( buffer , time(NULL)); - buffer_fwrite_int( buffer , SUMMARY ); - double_vector_buffer_fwrite( vector , buffer ); - - block_fs_fwrite_buffer( fs , vector_key , buffer ); - free( vector_key ); - } - } - } - } - msg_free( msg , false); - } - - double_vector_free( vector ); - buffer_free( buffer ); - for (driver_nr = 0; driver_nr < num_drivers; driver_nr++) { - block_fs_close( fs_list[driver_nr] , true ); - } - free( fs_list ); -} - - -void update_index( int ens_size, int length, const char * ens_path , const char * case_path ) { - char * index_path = util_alloc_sprintf("%s/%s/Index" , ens_path , case_path ); - char * old_path = util_alloc_sprintf("%s/%s" , ens_path , case_path ); - - util_make_path( index_path ); - util_move_file4( "INDEX.data_0" , NULL , old_path , index_path ); - util_move_file4( "INDEX.mnt" , NULL , old_path , index_path ); - - free( old_path ); - - { - char * mount_file = util_alloc_sprintf("%s/INDEX.mnt" , index_path); - block_fs_type * index = block_fs_mount( mount_file , 32 , 0 , 1 , 1 , true , false ); - buffer_type * buffer = buffer_alloc( 512 ); - for (int iens = 0; iens < ens_size; iens++) - for (int tstep = 0; tstep < length; tstep++) { - char * old_key = util_alloc_sprintf("kw_list_%d.%d" , tstep , iens); - char * new_key = util_alloc_sprintf("kw_list.%d.%d" , tstep , iens); - - if (block_fs_has_file( index , old_key )) { - block_fs_fread_realloc_buffer( index , old_key , buffer ); - block_fs_fwrite_buffer( index , new_key , buffer ); - block_fs_unlink_file( index , old_key ); - } - - free( old_key ); - free( new_key ); - } - - free( mount_file ); - block_fs_close( index , true ); - } -} - - -void create_fstab( const char * ens_path , const char * case_path ) { - int num_drivers = 32; - char * mount_point = util_alloc_sprintf("%s/%s" , ens_path , case_path ); - FILE * stream = fs_driver_open_fstab( mount_point , true ); - fs_driver_init_fstab( stream, BLOCK_FS_DRIVER_ID); - - block_fs_driver_create_fs( stream , mount_point , DRIVER_PARAMETER , num_drivers , "mod_%d" , "PARAMETER"); - block_fs_driver_create_fs( stream , mount_point , DRIVER_STATIC , num_drivers , "mod_%d" , "STATIC"); - block_fs_driver_create_fs( stream , mount_point , DRIVER_DYNAMIC_FORECAST , num_drivers , "mod_%d" , "FORECAST"); - block_fs_driver_create_fs( stream , mount_point , DRIVER_DYNAMIC_ANALYZED , num_drivers , "mod_%d" , "ANALYZED"); - block_fs_driver_create_fs( stream , mount_point , DRIVER_INDEX , 1 , "Index" , "INDEX"); - - fclose( stream ); - free( mount_point ); -} - - - - - -int main (int argc , char ** argv) { - enkf_main_install_SIGNALS(); /* Signals common to both tui and gui. */ - signal(SIGINT , util_abort_signal); /* Control C - tui only. */ - enkf_main_init_debug( NULL ); - if (argc != 2) { - printf("Usage: upgrade_fs104 config_file\n"); - exit(1); - } else { - const char * model_config_file = argv[1]; - char * enspath; - int ens_size; - ecl_sum_type * refcase; - { - config_type * config = create_config(); - if (!config_parse( config , model_config_file , "--" , "INCLUDE" , "DEFINE" , CONFIG_UNRECOGNIZED_IGNORE , true )) { - config_fprintf_erors( config , stderr ); - exit(1); - } - - { - char * path; - util_alloc_file_components(model_config_file , &path , NULL , NULL); - if (path != NULL) { - printf("Changing to directory:%s\n" , path); - chdir(path); - } - util_safe_free( path ); - } - - ens_size = config_get_value_as_int( config , NUM_REALIZATIONS_KEY ); - enspath = util_alloc_string_copy( config_get_value( config , ENSPATH_KEY )); - refcase = ecl_sum_fread_alloc_case( config_get_value( config , REFCASE_KEY ) , ":"); - config_free( config ); - } - - { - stringlist_type * case_list = stringlist_alloc_new(); - int ic; - char * mount_file = check_enspath( enspath , case_list ); - - for (ic = 0; ic < stringlist_get_size( case_list ); ic++) { - const char * case_path = stringlist_iget( case_list , ic); - - upgrade_case( ens_size, refcase , enspath , case_path , "FORECAST"); - upgrade_case( ens_size, refcase , enspath , case_path , "ANALYZED"); - - update_index( ens_size, ecl_sum_get_last_report_step( refcase ), enspath , case_path ); - create_fstab( enspath , case_path ); - } - { - FILE * stream = util_fopen( mount_file , "w"); - util_fwrite_long(FS_MAGIC_ID , stream); - util_fwrite_int( 105 , stream); - fclose( stream ); - } - stringlist_free( case_list ); - free( mount_file ); - - } - free( enspath ); - ecl_sum_free( refcase ); - util_abort_free_version_info(); /* No fucking leaks ... */ - } -} diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/README.new_type.h b/ThirdParty/Ert/libenkf/include/ert/enkf/README.new_type.h deleted file mode 100644 index 9fd3d05df7..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/README.new_type.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'README.new_type.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -/** -The two files README.new_type.c and README.new_type_config.c (along -with the corresponding header files) are meant to serve as a -documentation and reference on how to add new object types to the enkf -system. - - -new_type.h -========== -When implementing a new type, the header file should contain a typedef like this: - - typedef struct new_type_struct new_type; - -This typedef means two things: - - 1. The entity "new_type" is to be interpreted as a "struc - new_type_struct". - - 2. We are informing the compiler that a declaration of the struct - new_type_struct will come at a later stage. However for the rest - of the header file we can refer only to "new_type" - -The advantages of this way to do it is that only the existence of -"struct new_type_struct" is exported, the actual implementation is -hidden for other files; it is a bit like making all the data private -in a C++ class. - - _____________________ E X A M P L E _____________________________ - / - | new.h - | ----- - | typedef struct new_struct new_type; - | - | new_type * new_type_alloc(int , const char *); - | double * new_get_data_ref(const new_type *); - | void new_type_free(new_type *); - | - | - | new.c - | ----- - | #include - | #include - | - | struct new_struct { - | double *data; - | } - | - | new_type * new_type_alloc(int size) { - | new_type * new = util_malloc(sizeof * new_type , __func__); - new->date = util_malloc(size * sizeof new->data); - | return new; - | } - | - | double * new_get_data_ref(const new_type * new) { - | return new->data; - | } - | - | - | void new_type_free(new_type * new) { - | free(new->data); - | free(new); - | } - | - | - | other.c - | ------- - | #include - | - | void some_func() { - | new_type * new = new_type_alloc(100 , "Programmer ..."); - | .... - | .... - | new_type_free(new); - | } - \_________________________________________________________________ - -What happen in this little example is the following things: - - 1. In the header file "new.h" we say that an implementation of a - struct new_type_struct will be forthcoming. This struct can - (without the implementation) be referred to as new_type. - - In the header file we also claim that the three functions: - - i new_type * new_type_alloc(int , const chat*); - ii double * new_get_data_ref(const new_type *); - iii void new_type_free(new_type *); - - will be coming. - - 2. In the source file new.c we have the implementation of the struct - new_struct, along with the three functions listed above. - - 3. In the third file, other.c which includes "new.h", we can refer to - the type new_type, and the three functions listed in the - header. However we can *NOT* get to the fields in the struct of - type new_type_struct, i.e. code like: - - .... - new->data[17] = 178.9; - .... - - in "other.c" will *NOT* compile. It will fail with the message - "dereferencing pointer to imcomplete type." - -*/ diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/README.new_type_config.h b/ThirdParty/Ert/libenkf/include/ert/enkf/README.new_type_config.h deleted file mode 100644 index 91963a1c4d..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/README.new_type_config.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'README.new_type_config.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -/** -The two files README.new_type.c and README.new_type_config.c (along -with the corresponding header files) are meant to serve as a -documentation and reference on how to add new object types to the enkf -system. - - -new_type_config.h -========== -*/ diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/active_config.h b/ThirdParty/Ert/libenkf/include/ert/enkf/active_config.h deleted file mode 100644 index da374cffed..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/active_config.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'active_config.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ACTIVE_CONFIG_H -#define ERT_ACTIVE_CONFIG_H - - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/active_list.h b/ThirdParty/Ert/libenkf/include/ert/enkf/active_list.h deleted file mode 100644 index 06b9a1d01b..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/active_list.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'active_list.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ACTIVE_LIST_H -#define ERT_ACTIVE_LIST_H - -#ifdef __cplusplus -extern "C" { -#endif -#include - -#include - - -typedef struct active_list_struct active_list_type; - - active_list_type * active_list_alloc( ); - void active_list_reset(active_list_type * ); - void active_list_add_index(active_list_type * , int); - void active_list_free( active_list_type *); - const int * active_list_get_active(const active_list_type * ); - int active_list_get_active_size(const active_list_type * , int total_size ); - void active_list_set_all_active(active_list_type * ); - void active_list_set_data_size(active_list_type * , int ); - void active_list_free( active_list_type * ); - active_mode_type active_list_get_mode(const active_list_type * ); - void active_list_free__( void * arg ); - active_list_type * active_list_alloc_copy( const active_list_type * src); - void active_list_fprintf( const active_list_type * active_list , const char * dataset_key , const char * key , FILE * stream ); - void active_list_summary_fprintf( const active_list_type * active_list , const char * dataset_key , const char * key , FILE * stream); - bool active_list_iget( const active_list_type * active_list , int index ); - bool active_list_equal( const active_list_type * active_list1 , const active_list_type * active_list2); - void active_list_copy( active_list_type * target , const active_list_type * src); - -UTIL_IS_INSTANCE_HEADER( active_list ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/active_node.h b/ThirdParty/Ert/libenkf/include/ert/enkf/active_node.h deleted file mode 100644 index c8fcc09e7d..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/active_node.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'active_node.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ACTIVE_NODE_H -#define ERT_ACTIVE_NODE_H - - -typedef struct active_var_struct active_var_type; -typedef struct active_obs_struct active_obs_type; - - -typedef void (active_config_destructor_ftype) (void *); /* A destructor for the (node-spesific) object holding inactive/active information. */ - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/analysis_config.h b/ThirdParty/Ert/libenkf/include/ert/enkf/analysis_config.h deleted file mode 100644 index 8c849c1cc3..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/analysis_config.h +++ /dev/null @@ -1,121 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'analysis_config.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#ifndef ERT_ANALYSIS_CONFIG_H -#define ERT_ANALYSIS_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include -#include - -#include -#include - -#include - -#include -#include - - - - -typedef struct analysis_config_struct analysis_config_type; - -analysis_iter_config_type * analysis_config_get_iter_config( const analysis_config_type * config ); -analysis_module_type * analysis_config_get_module( analysis_config_type * config , const char * module_name ); -bool analysis_config_has_module( analysis_config_type * config , const char * module_name ); -void analysis_config_load_internal_module( analysis_config_type * config , const char * symbol_table ); -void analysis_config_load_internal_modules( analysis_config_type * analysis ); -void analysis_config_reload_module( analysis_config_type * config , const char * module_name); -bool analysis_config_get_module_option( const analysis_config_type * config , long flag); -bool analysis_config_load_external_module( analysis_config_type * config , const char * lib_name, const char * user_name); -void analysis_config_load_all_external_modules_from_config ( analysis_config_type * analysis_config, const config_content_type * config); - -stringlist_type * analysis_config_alloc_module_names( analysis_config_type * config ); -const char * analysis_config_get_log_path( const analysis_config_type * config ); -void analysis_config_init( analysis_config_type * analysis , const config_content_type * config); -analysis_config_type * analysis_config_alloc( rng_type * rng ); -void analysis_config_free( analysis_config_type * ); -bool analysis_config_get_merge_observations(const analysis_config_type * ); -double analysis_config_get_alpha(const analysis_config_type * config); -double analysis_config_get_truncation(const analysis_config_type * config); -bool analysis_config_Xbased(const analysis_config_type * config); -bool analysis_config_get_rerun(const analysis_config_type * config); -bool analysis_config_get_random_rotation(const analysis_config_type * config); -int analysis_config_get_rerun_start(const analysis_config_type * config); -bool analysis_config_get_do_local_cross_validation(const analysis_config_type * config); -bool analysis_config_get_force_subspace_dimension(const analysis_config_type * config); -bool analysis_config_get_do_kernel_regression(const analysis_config_type * config); -int analysis_config_get_kernel_function(const analysis_config_type * config); -int analysis_config_get_kernel_param(const analysis_config_type * config); -int analysis_config_get_nfolds_CV(const analysis_config_type * config); -int analysis_config_get_subspace_dimension(const analysis_config_type * config); -bool analysis_config_get_bootstrap(const analysis_config_type * config); -bool analysis_config_get_penalised_press(const analysis_config_type * config); -bool analysis_config_get_do_scaling(const analysis_config_type * config); -void analysis_config_set_rerun(analysis_config_type * config , bool rerun); -void analysis_config_set_rerun_start( analysis_config_type * config , int rerun_start ); -void analysis_config_set_truncation( analysis_config_type * config , double truncation); -void analysis_config_set_alpha( analysis_config_type * config , double alpha); -void analysis_config_set_merge_observations( analysis_config_type * config , bool merge_observations); -void analysis_config_set_nfolds_CV( analysis_config_type * config , int folds); -void analysis_config_set_subspace_dimension( analysis_config_type * config , int dimension); -void analysis_config_set_do_bootstrap( analysis_config_type * config , bool do_bootstrap); -void analysis_config_set_penalised_press( analysis_config_type * config , bool do_pen_press); -void analysis_config_set_log_path(analysis_config_type * config , const char * log_path ); -void analysis_config_set_std_cutoff( analysis_config_type * config , double std_cutoff ); -double analysis_config_get_std_cutoff( const analysis_config_type * config ); -void analysis_config_add_config_items( config_parser_type * config ); -void analysis_config_fprintf_config( analysis_config_type * config , FILE * stream); - -bool analysis_config_select_module( analysis_config_type * config , const char * module_name ); -analysis_module_type * analysis_config_get_active_module( analysis_config_type * config ); -void analysis_config_set_single_node_update(analysis_config_type * config , bool single_node_update); -bool analysis_config_get_single_node_update(const analysis_config_type * config); - -void analysis_config_set_store_PC( analysis_config_type * config , bool store_PC); -bool analysis_config_get_store_PC( const analysis_config_type * config ); -void analysis_config_set_PC_filename( analysis_config_type * config , const char * filename ); -const char * analysis_config_get_PC_filename( const analysis_config_type * config ); -void analysis_config_set_PC_path( analysis_config_type * config , const char * path ); -const char * analysis_config_get_PC_path( const analysis_config_type * config ); -bool analysis_config_have_enough_realisations( const analysis_config_type* config, int realisations, int ensemble_size); -void analysis_config_set_stop_long_running( analysis_config_type * config, bool stop_long_running ); -bool analysis_config_get_stop_long_running( const analysis_config_type * config); -void analysis_config_set_max_runtime( analysis_config_type * config, int max_runtime ); -int analysis_config_get_max_runtime( const analysis_config_type * config ); -const char * analysis_config_get_active_module_name( const analysis_config_type * config ); -bool analysis_config_get_std_scale_correlated_obs( const analysis_config_type * config); -void analysis_config_set_std_scale_correlated_obs( analysis_config_type * config, bool std_scale_correlated_obs); - -double analysis_config_get_global_std_scaling(const analysis_config_type * config); -void analysis_config_set_global_std_scaling(analysis_config_type * config, double global_std_scaling); - - UTIL_IS_INSTANCE_HEADER( analysis_config ); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/analysis_iter_config.h b/ThirdParty/Ert/libenkf/include/ert/enkf/analysis_iter_config.h deleted file mode 100644 index e0a2e007b8..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/analysis_iter_config.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'analysis_iter_config.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ANALYSIS_ITER_CONFIG_H -#define ERT_ANALYSIS_ITER_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -typedef struct analysis_iter_config_struct analysis_iter_config_type; - - void analysis_iter_config_set_num_iterations( analysis_iter_config_type * config , int num_iterations); - int analysis_iter_config_get_num_iterations( const analysis_iter_config_type * config ); - void analysis_iter_config_set_num_retries_per_iteration( analysis_iter_config_type * config , int num_retries); - int analysis_iter_config_get_num_retries_per_iteration( const analysis_iter_config_type * config ); - void analysis_iter_config_set_case_fmt( analysis_iter_config_type * config, const char * case_fmt); - char * analysis_iter_config_get_case_fmt( analysis_iter_config_type * config); - analysis_iter_config_type * analysis_iter_config_alloc(); - void analysis_iter_config_free( analysis_iter_config_type * config ); - const char * analysis_iter_config_iget_case( analysis_iter_config_type * config , int iter); - void analysis_iter_config_add_config_items( config_parser_type * config ); - void analysis_iter_config_init(analysis_iter_config_type * iter_config , const config_content_type * config); - bool analysis_iter_config_case_fmt_set( const analysis_iter_config_type * config ); - bool analysis_iter_config_num_iterations_set( const analysis_iter_config_type * config ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/block_fs_driver.h b/ThirdParty/Ert/libenkf/include/ert/enkf/block_fs_driver.h deleted file mode 100644 index da9bc072e9..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/block_fs_driver.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'block_fs_driver.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_BLOCK_FS_DRIVER_H -#define ERT_BLOCK_FS_DRIVER_H -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include - - typedef struct block_fs_driver_struct block_fs_driver_type; - - - void block_fs_driver_fwrite_mount_info(FILE * stream , fs_driver_enum driver_type , int num_block_fs_drivers); - block_fs_driver_type * block_fs_driver_fread_alloc(const char * root_path , FILE * stream); - bool block_fs_sscanf_key(const char * key , char ** config_key , int * __report_step , int * __iens); - void * block_fs_driver_open(FILE * fstab_stream , const char * mount_point , fs_driver_enum driver_type , bool read_only); - void block_fs_driver_create_fs( FILE * stream , - const char * mount_point , - fs_driver_enum driver_type , - int num_fs , - const char * ens_path_fmt, - const char * filename ); - void block_fs_driver_fskip(FILE * fstab_stream); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/block_obs.h b/ThirdParty/Ert/libenkf/include/ert/enkf/block_obs.h deleted file mode 100644 index 47c8dbfb13..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/block_obs.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'block_obs.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_BLOCK_OBS_H -#define ERT_BLOCK_OBS_H -#ifdef __cplusplus -extern "C" { -#endif -#include - -#include - -#include -#include - -#include -#include -#include -#include -#include - - - -typedef struct block_obs_struct block_obs_type; - - typedef enum { - SOURCE_FIELD = 10, - SOURCE_SUMMARY = 12 - } block_obs_source_type; - - - block_obs_type * block_obs_alloc_complete(const char * obs_label, - block_obs_source_type source_type , - const stringlist_type * summary_keys , - const void * data_config , - const ecl_grid_type * grid , - int size, - const int * i, - const int * j, - const int * k, - const double * obs_value, - const double * obs_std); - - block_obs_type * block_obs_alloc(const char * obs_key, - const void * data_config , - const ecl_grid_type * grid); - - -void block_obs_free( - block_obs_type * block_obs); - - -block_obs_type * block_obs_alloc_from_BLOCK_OBSERVATION(const conf_instance_type * conf_instance, const history_type * history); - -double block_obs_iget_depth( const block_obs_type * block_obs , int index); -int block_obs_iget_i(const block_obs_type * , int index); -int block_obs_iget_j(const block_obs_type * , int index); -int block_obs_iget_k(const block_obs_type * , int index); -int block_obs_get_size(const block_obs_type * ); -void block_obs_iget(const block_obs_type * block_obs, int , double * , double * ); -double block_obs_iget_value(const block_obs_type * block_obs, int index ); -double block_obs_iget_std(const block_obs_type * block_obs, int index ); -void block_obs_iget_ijk(const block_obs_type * block_obs , int block_nr , int * i , int * j , int * k); -double block_obs_iget_data( const block_obs_type * block_obs, const void * state , int iobs , node_id_type node_id ); -double block_obs_iget_std_scaling(const block_obs_type * block_obs, int index ); -void block_obs_update_std_scale(block_obs_type * block_obs, double scale_factor, const active_list_type * active_list); -void block_obs_append_field_obs( block_obs_type * block_obs , int i , int j , int k , double value , double std); -void block_obs_append_summary_obs( block_obs_type * block_obs , int i , int j , int k , const char * sum_key , double value , double std); - -VOID_FREE_HEADER(block_obs); -VOID_GET_OBS_HEADER(block_obs); -UTIL_IS_INSTANCE_HEADER(block_obs); -VOID_MEASURE_HEADER(block_obs); -VOID_USER_GET_OBS_HEADER(block_obs); -VOID_CHI2_HEADER(block_obs); -VOID_UPDATE_STD_SCALE_HEADER(block_obs); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/cases_config.h b/ThirdParty/Ert/libenkf/include/ert/enkf/cases_config.h deleted file mode 100644 index 78915cc31d..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/cases_config.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'cases_config.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_CASES_CONFIG_H -#define ERT_CASES_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif - - -typedef struct cases_config_struct cases_config_type; - - bool cases_config_set_int( cases_config_type * config , const char * var_name, int num_iterations); - int cases_config_get_iteration_number( const cases_config_type * config ); - void cases_config_fwrite( cases_config_type * config , const char * filename ); - void cases_config_fread( cases_config_type * config , const char * filename); - cases_config_type * cases_config_alloc(); - void cases_config_free( cases_config_type * config ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/config_keys.h b/ThirdParty/Ert/libenkf/include/ert/enkf/config_keys.h deleted file mode 100644 index 1e6bd9a9fb..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/config_keys.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'config_keys.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. - */ - - -#ifndef ERT_CONFIG_KEYS_H -#define ERT_CONFIG_KEYS_H -#ifdef __cplusplus -extern "C" { -#endif - -/* These keys are used as options in KEY:VALUE statements */ -#define BASE_SURFACE_KEY "BASE_SURFACE" -#define DEFINE_KEY "DEFINE" -#define DYNAMIC_KEY "DYNAMIC" -#define ECL_FILE_KEY "ECL_FILE" -#define FORWARD_INIT_KEY "FORWARD_INIT" -#define GENERAL_KEY "GENERAL" -#define INCLUDE_KEY "INCLUDE" -#define INIT_FILES_KEY "INIT_FILES" -#define INIT_TRANSFORM_KEY "INIT_TRANSFORM" -#define INPUT_FORMAT_KEY "INPUT_FORMAT" -#define INPUT_TRANSFORM_KEY "INPUT_TRANSFORM" -#define KEY_KEY "KEY" -#define MAX_KEY "MAX" -#define MIN_KEY "MIN" -#define MIN_STD_KEY "MIN_STD" -#define OUTPUT_FILE_KEY "OUTPUT_FILE" -#define OUTPUT_FORMAT_KEY "OUTPUT_FORMAT" -#define OUTPUT_TRANSFORM_KEY "OUTPUT_TRANSFORM" -#define PARAMETER_KEY "PARAMETER" -#define REPORT_STEPS_KEY "REPORT_STEPS" -#define RESULT_FILE_KEY "RESULT_FILE" -#define TEMPLATE_KEY "TEMPLATE" - - -#define ADD_FIXED_LENGTH_SCHEDULE_KW_KEY "ADD_FIXED_LENGTH_SCHEDULE_KW" -#define ANALYSIS_COPY_KEY "ANALYSIS_COPY" -#define ANALYSIS_LOAD_KEY "ANALYSIS_LOAD" -#define ANALYSIS_SET_VAR_KEY "ANALYSIS_SET_VAR" -#define ANALYSIS_SELECT_KEY "ANALYSIS_SELECT" -#define CASE_TABLE_KEY "CASE_TABLE" -#define CONTAINER_KEY "CONTAINER" -#define CUSTOM_KW_KEY "CUSTOM_KW" -#define DATA_FILE_KEY "DATA_FILE" -#define DATA_KW_KEY "DATA_KW" -#define DBASE_TYPE_KEY "DBASE_TYPE" -#define DELETE_RUNPATH_KEY "DELETE_RUNPATH" -#define ECLBASE_KEY "ECLBASE" -#define END_DATE_KEY "END_DATE" -#define ENKF_BOOTSTRAP_KEY "ENKF_BOOTSTRAP" -#define ENKF_PEN_PRESS_KEY "ENKF_PEN_PRESS" -#define ENKF_ALPHA_KEY "ENKF_ALPHA" -#define ENKF_CROSS_VALIDATION_KEY "ENKF_CROSS_VALIDATION" -#define ENKF_CV_FOLDS_KEY "ENKF_CV_FOLDS" -#define ENKF_FORCE_NCOMP_KEY "ENKF_FORCE_NCOMP" -#define ENKF_NCOMP_KEY "ENKF_NCOMP" -#define ENKF_SCALING_KEY "ENKF_SCALING" -#define ENKF_KERNEL_REG_KEY "ENKF_KERNEL_REGRESSION" -#define ENKF_KERNEL_FUNC_KEY "ENKF_KERNEL_FUNCTION" -#define ENKF_KERNEL_PARAM_KEY "ENKF_KERNEL_PARAM" -#define ENKF_LOCAL_CV_KEY "ENKF_LOCAL_CV" -#define ENKF_MERGE_OBSERVATIONS_KEY "ENKF_MERGE_OBSERVATIONS" -#define ENKF_MODE_KEY "ENKF_MODE" -#define ENKF_RERUN_KEY "ENKF_RERUN" -#define ENKF_TRUNCATION_KEY "ENKF_TRUNCATION" -#define ENSPATH_KEY "ENSPATH" -#define ITER_CASE_KEY "ITER_CASE" -#define ITER_COUNT_KEY "ITER_COUNT" -#define ITER_RETRY_COUNT_KEY "ITER_RETRY_COUNT" -#define FIELD_KEY "FIELD" -#define FORWARD_MODEL_KEY "FORWARD_MODEL" -#define GEN_DATA_KEY "GEN_DATA" -#define GEN_KW_KEY "GEN_KW" -#define GEN_KW_TAG_FORMAT_KEY "GEN_KW_TAG_FORMAT" -#define GEN_KW_EXPORT_FILE_KEY "GEN_KW_EXPORT_FILE" -#define GEN_PARAM_KEY "GEN_PARAM" -#define GRID_KEY "GRID" -#define HISTORY_SOURCE_KEY "HISTORY_SOURCE" -#define HOSY_TYPE_KEY "HOST_TYPE" -#define IGNORE_SCHEDULE_KEY "IGNORE_SCHEDULE" -#define INIT_SECTION_KEY "INIT_SECTION" -#define INSTALL_JOB_KEY "INSTALL_JOB" -#define INSTALL_JOB_DIRECTORY_KEY "INSTALL_JOB_DIRECTORY" -#define JOB_SCRIPT_KEY "JOB_SCRIPT" -#define JOBNAME_KEY "JOBNAME" -#define LICENSE_PATH_KEY "LICENSE_PATH" -#define LOAD_SEED_KEY "LOAD_SEED" -#define LOCAL_CONFIG_KEY "LOCAL_CONFIG" -#define LOG_FILE_KEY "LOG_FILE" -#define LOG_LEVEL_KEY "LOG_LEVEL" -#define LSF_QUEUE_KEY "LSF_QUEUE" -#define LSF_RESOURCES_KEY "LSF_RESOURCES" -#define LSF_SERVER_KEY "LSF_SERVER" -#define TORQUE_QUEUE_KEY "TORQUE_QUEUE" -#define MAX_RESAMPLE_KEY "MAX_RESAMPLE" -#define MAX_RUNNING_LOCAL_KEY "MAX_RUNNING_LOCAL" -#define MAX_RUNNING_LSF_KEY "MAX_RUNNING_LSF" -#define MAX_RUNNING_RSH_KEY "MAX_RUNNING_RSH" -#define MAX_SUBMIT_KEY "MAX_SUBMIT" -#define NUM_REALIZATIONS_KEY "NUM_REALIZATIONS" -#define MIN_REALIZATIONS_KEY "MIN_REALIZATIONS" -#define OBS_CONFIG_KEY "OBS_CONFIG" -#define PLOT_PATH_KEY "PLOT_PATH" -#define PRE_CLEAR_RUNPATH_KEY "PRE_CLEAR_RUNPATH" -#define QUEUE_SYSTEM_KEY "QUEUE_SYSTEM" -#define QUEUE_OPTION_KEY "QUEUE_OPTION" -#define QC_PATH_KEY "QC_PATH" -#define QC_WORKFLOW_KEY "QC_WORKFLOW" -#define HOOK_WORKFLOW_KEY "HOOK_WORKFLOW" -#define REFCASE_KEY "REFCASE" -#define REFCASE_LIST_KEY "REFCASE_LIST" -#define RERUN_START_KEY "RERUN_START" -#define RSH_COMMAND_KEY "RSH_COMMAND" -#define RSH_HOST_KEY "RSH_HOST" -#define RUNPATH_FILE_KEY "RUNPATH_FILE" -#define RUNPATH_KEY "RUNPATH" -#define ITER_RUNPATH_KEY "ITER_RUNPATH" -#define RERUN_PATH_KEY "RERUN_PATH" -#define RUN_TEMPLATE_KEY "RUN_TEMPLATE" -#define RFT_CONFIG_KEY "RFT_CONFIG" -#define RFTPATH_KEY "RFTPATH" -#define SCHEDULE_FILE_KEY "SCHEDULE_FILE" -#define SCHEDULE_PREDICTION_FILE_KEY "SCHEDULE_PREDICTION_FILE" -#define SETENV_KEY "SETENV" -#define STATIC_KW_KEY "ADD_STATIC_KW" -#define STD_CUTOFF_KEY "STD_CUTOFF" -#define SUMMARY_KEY "SUMMARY" -#define SURFACE_KEY "SURFACE" -#define UPDATE_LOG_PATH_KEY "UPDATE_LOG_PATH" -#define UPDATE_PATH_KEY "UPDATE_PATH" -#define SINGLE_NODE_UPDATE_KEY "SINGLE_NODE_UPDATE" -#define STORE_SEED_KEY "STORE_SEED" -#define UMASK_KEY "UMASK" -#define WORKFLOW_JOB_DIRECTORY_KEY "WORKFLOW_JOB_DIRECTORY" -#define LOAD_WORKFLOW_KEY "LOAD_WORKFLOW" -#define LOAD_WORKFLOW_JOB_KEY "LOAD_WORKFLOW_JOB" -#define STOP_LONG_RUNNING_KEY "STOP_LONG_RUNNING" -#define MAX_RUNTIME_KEY "MAX_RUNTIME" -#define TIME_MAP_KEY "TIME_MAP" -#define EXT_JOB_SEARCH_PATH_KEY "EXT_JOB_SEARCH_PATH" -#define STD_SCALE_CORRELATED_OBS_KEY "STD_SCALE_CORRELATED_OBS" - -#define CONFIG_BOOL_STRING( var ) (var) ? "TRUE" : "FALSE" - - - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/config_parser.h b/ThirdParty/Ert/libenkf/include/ert/enkf/config_parser.h deleted file mode 100644 index 4df730dcf4..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/config_parser.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'config_parser.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_CONFIG_PARSER_H -#define ERT_CONFIG_PARSER_H - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/container.h b/ThirdParty/Ert/libenkf/include/ert/enkf/container.h deleted file mode 100644 index 215c6f0969..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/container.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'container.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_CONTAINER_H -#define ERT_CONTAINER_H - -#ifdef __cplusplus -extern "C" { -#endif -#include - - - typedef struct container_struct container_type; - - void container_add_node(container_type * container , void * child_node ); - const void * container_iget_node(const container_type * container , int index); - int container_get_size( const container_type * container ); - void container_assert_size( const container_type * container ); - - VOID_ALLOC_HEADER(container); - VOID_FREE_HEADER(container); - UTIL_IS_INSTANCE_HEADER(container); - UTIL_SAFE_CAST_HEADER_CONST(container); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/container_config.h b/ThirdParty/Ert/libenkf/include/ert/enkf/container_config.h deleted file mode 100644 index ed0399345c..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/container_config.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'container_config.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_CONTAINER_CONFIG_H -#define ERT_CONTAINER_CONFIG_H - - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - - typedef struct container_config_struct container_config_type; - - - container_config_type * container_config_alloc( const char * key ); - void container_config_free( container_config_type * container ); - void container_config_add_node( container_config_type * container, const enkf_config_node_type * config_node); - const char * container_config_iget_key( const container_config_type * container_config , int index); - const void * container_config_iget_node(const container_config_type * container_config , int index); - int container_config_get_size( const container_config_type * container_config ); - - UTIL_IS_INSTANCE_HEADER(container_config); - UTIL_SAFE_CAST_HEADER_CONST(container_config); - GET_DATA_SIZE_HEADER(container); - VOID_GET_DATA_SIZE_HEADER(container); - VOID_CONFIG_FREE_HEADER(container); - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/custom_kw.h b/ThirdParty/Ert/libenkf/include/ert/enkf/custom_kw.h deleted file mode 100644 index f8282cd830..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/custom_kw.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef ERT_CUSTOM_KW_H -#define ERT_CUSTOM_KW_H -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include - -#include -#include - -#include -#include -#include - - typedef struct custom_kw_struct custom_kw_type; - - custom_kw_type * custom_kw_alloc(const custom_kw_config_type * config); - void custom_kw_free(custom_kw_type * custom_kw); - custom_kw_config_type * custom_kw_get_config(const custom_kw_type * custom_kw); - const stringlist_type * custom_kw_get_data(const custom_kw_type * custom_kw); - bool custom_kw_key_is_null(const custom_kw_type * custom_kw, char * key); - double custom_kw_iget_as_double(const custom_kw_type * custom_kw, int index); - const char * custom_kw_iget_as_string(const custom_kw_type * custom_kw, int index); - void custom_kw_set_string(custom_kw_type * custom_kw, const char * key, const char * value); - void custom_kw_set_double(custom_kw_type * custom_kw, const char * key, double value); - - bool custom_kw_fload(custom_kw_type * custom_kw, const char * filename); - bool custom_kw_forward_load(custom_kw_type * custom_kw, const char * ecl_file, const forward_load_context_type * load_context); - - bool custom_kw_write_to_buffer(const custom_kw_type * custom_kw, buffer_type * buffer, int report_step); - void custom_kw_read_from_buffer(const custom_kw_type * custom_kw, buffer_type * buffer, enkf_fs_type * fs, int report_step); - void custom_kw_ecl_write(const custom_kw_type * custom_kw, const char * run_path, const char * base_file, void * filestream); - void custom_kw_serialize(const custom_kw_type * custom_kw, node_id_type node_id, const active_list_type * active_list, matrix_type * A, int row_offset, int column); - void custom_kw_deserialize(custom_kw_type * custom_kw, node_id_type node_id, const active_list_type * active_list, const matrix_type * A, int row_offset , int column); - - - UTIL_SAFE_CAST_HEADER(custom_kw); - UTIL_SAFE_CAST_HEADER_CONST(custom_kw); - VOID_USER_GET_HEADER(custom_kw); - VOID_ALLOC_HEADER(custom_kw); - VOID_FREE_HEADER(custom_kw); - VOID_FORWARD_LOAD_HEADER(custom_kw) - VOID_FLOAD_HEADER(custom_kw) - VOID_ECL_WRITE_HEADER(custom_kw); - VOID_READ_FROM_BUFFER_HEADER(custom_kw); - VOID_WRITE_TO_BUFFER_HEADER(custom_kw); - VOID_SERIALIZE_HEADER(custom_kw) - VOID_DESERIALIZE_HEADER(custom_kw) -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/custom_kw_config.h b/ThirdParty/Ert/libenkf/include/ert/enkf/custom_kw_config.h deleted file mode 100644 index e532807d1f..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/custom_kw_config.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef ERT_CUSTOM_KW_CONFIG_H -#define ERT_CUSTOM_KW_CONFIG_H -#ifdef __cplusplus -extern "C" { -#endif -#include - -#include -#include -#include -#include - -#include -#include -#include - - typedef struct custom_kw_config_struct custom_kw_config_type; - - custom_kw_config_type * custom_kw_config_alloc_empty(const char * key, const char * result_file, const char * output_file); - custom_kw_config_type * custom_kw_config_alloc_with_definition(const char * key, const hash_type * definition); - void custom_kw_config_free(custom_kw_config_type * config); - const char * custom_kw_config_get_name(const custom_kw_config_type * config); - char * custom_kw_config_get_result_file(const custom_kw_config_type * config); - char * custom_kw_config_get_output_file(const custom_kw_config_type * config); - bool custom_kw_config_parse_result_file(custom_kw_config_type * config, const char * result_file, stringlist_type * result); - void custom_kw_config_serialize(const custom_kw_config_type * config, stringlist_type * config_set); - void custom_kw_config_deserialize(custom_kw_config_type * config, stringlist_type * config_set); - bool custom_kw_config_has_key(const custom_kw_config_type * config, const char * key); - bool custom_kw_config_key_is_double(const custom_kw_config_type * config, const char * key); - int custom_kw_config_index_of_key(const custom_kw_config_type * config, const char * key); - int custom_kw_config_size(const custom_kw_config_type * config); - stringlist_type * custom_kw_config_get_keys(const custom_kw_config_type * config); - - - UTIL_IS_INSTANCE_HEADER(custom_kw_config); - UTIL_SAFE_CAST_HEADER(custom_kw_config); - UTIL_SAFE_CAST_HEADER_CONST(custom_kw_config); - VOID_FREE_HEADER(custom_kw_config) - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/custom_kw_config_set.h b/ThirdParty/Ert/libenkf/include/ert/enkf/custom_kw_config_set.h deleted file mode 100644 index b99ca9c9b8..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/custom_kw_config_set.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef ERT_CUSTOM_KW_CONFIG_SET_H -#define ERT_CUSTOM_KW_CONFIG_SET_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include - - typedef struct custom_kw_config_set_struct custom_kw_config_set_type; - - custom_kw_config_set_type * custom_kw_config_set_alloc(); - custom_kw_config_set_type * custom_kw_config_set_alloc_from_file(const char * filename); - void custom_kw_config_set_free(custom_kw_config_set_type * set); - void custom_kw_config_set_add_config(custom_kw_config_set_type * set, const custom_kw_config_type * config); - void custom_kw_config_set_update_config(custom_kw_config_set_type * set, custom_kw_config_type * config); - void custom_kw_config_set_reset(custom_kw_config_set_type * set); - stringlist_type * custom_kw_config_set_get_keys_alloc(custom_kw_config_set_type * set); - void custom_kw_config_set_fwrite(custom_kw_config_set_type * set, const char * filename); - bool custom_kw_config_set_fread(custom_kw_config_set_type * set, const char * filename); - - UTIL_IS_INSTANCE_HEADER(custom_kw_config_set); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/data_ranking.h b/ThirdParty/Ert/libenkf/include/ert/enkf/data_ranking.h deleted file mode 100644 index a85e90fea7..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/data_ranking.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'data_ranking.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_DATA_RANKING_H -#define ERT_DATA_RANKING_H - -#ifdef __cplusplus -extern "C" { -#endif -#include -#include - -#include -#include - -#include - - typedef struct data_ranking_struct data_ranking_type; - - UTIL_IS_INSTANCE_HEADER( data_ranking ); - UTIL_SAFE_CAST_HEADER(data_ranking); - - const perm_vector_type * data_ranking_get_permutation( const data_ranking_type * data_ranking ); - data_ranking_type * data_ranking_alloc( bool sort_increasing , int ens_size , const char * user_key , const char * key_index , enkf_fs_type * fs , const enkf_config_node_type * config_node , int step ); - void data_ranking_free__( void * arg ); - void data_ranking_display( const data_ranking_type * data_ranking , FILE * stream); - -#ifdef __cplusplus -} -#endif -#endif - - - - - diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/ecl_config.h b/ThirdParty/Ert/libenkf/include/ert/enkf/ecl_config.h deleted file mode 100644 index a8270d2c47..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/ecl_config.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'ecl_config.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ECL_CONFIG_H -#define ERT_ECL_CONFIG_H -#ifdef __cplusplus -extern "C" { -#endif -#include - -#include -#include - -#include -#include - -#include -#include -#include - -#include - -#include - - - typedef struct ecl_config_struct ecl_config_type; - - const char * ecl_config_get_data_file(const ecl_config_type * ); - void ecl_config_set_data_file( ecl_config_type * ecl_config , const char * data_file); - ui_return_type * ecl_config_validate_data_file(const ecl_config_type * ecl_config, const char * data_file); - - void ecl_config_set_schedule_file(ecl_config_type * ecl_config, const char * schedule_file, const char * schedule_target_file); - ui_return_type * ecl_config_validate_schedule_file(const ecl_config_type * ecl_config , const char * schedule_file); - const char * ecl_config_get_schedule_file( const ecl_config_type * ecl_config ); - const char * ecl_config_get_schedule_target(const ecl_config_type * ); - bool ecl_config_has_schedule( const ecl_config_type * ecl_config ); - - void ecl_config_set_eclbase( ecl_config_type * ecl_config , const char * eclbase_fmt ); - ui_return_type * ecl_config_validate_eclbase( const ecl_config_type * ecl_config , const char * eclbase_fmt ); - const path_fmt_type * ecl_config_get_eclbase_fmt(const ecl_config_type * ); - - void ecl_config_set_init_section( ecl_config_type * ecl_config , const char * input_init_section ); - ui_return_type * ecl_config_validate_init_section( const ecl_config_type * ecl_config , const char * input_init_section ); - const char * ecl_config_get_init_section(const ecl_config_type * ecl_config); - const char * ecl_config_get_equil_init_file(const ecl_config_type * ); - bool ecl_config_has_init_section( const ecl_config_type * ecl_config ); - - - void ecl_config_set_grid( ecl_config_type * ecl_config , const char * grid_file ); - const char * ecl_config_get_gridfile( const ecl_config_type * ecl_config ); - ecl_grid_type * ecl_config_get_grid(const ecl_config_type * ); - ui_return_type * ecl_config_validate_grid( const ecl_config_type * ecl_config , const char * grid_file ); - - bool ecl_config_load_refcase( ecl_config_type * ecl_config , const char * refcase); - ui_return_type * ecl_config_validate_refcase( const ecl_config_type * ecl_config , const char * refcase ); - const ecl_sum_type * ecl_config_get_refcase(const ecl_config_type * ecl_config); - bool ecl_config_has_refcase( const ecl_config_type * ecl_config ); - ecl_refcase_list_type * ecl_config_get_refcase_list( const ecl_config_type * ecl_config ); - - /*****************************************************************/ - - void ecl_config_static_kw_init( ecl_config_type * ecl_config , const config_content_type * config ); - bool ecl_config_active( const ecl_config_type * config ); - time_t ecl_config_get_end_date( const ecl_config_type * ecl_config ); - time_t ecl_config_get_start_date( const ecl_config_type * ecl_config ); - - const char * ecl_config_get_schedule_prediction_file( const ecl_config_type * ecl_config ); - void ecl_config_set_schedule_prediction_file( ecl_config_type * ecl_config , const char * schedule_prediction_file ); - sched_file_type * ecl_config_get_sched_file(const ecl_config_type * ); - - - int ecl_config_get_num_cpu( const ecl_config_type * ecl_config ); - void ecl_config_init( ecl_config_type * ecl_config , const config_content_type * config); - void ecl_config_free( ecl_config_type *); - bool ecl_config_include_static_kw(const ecl_config_type * , const char * ); - void ecl_config_add_static_kw(ecl_config_type *, const char *); - ecl_io_config_type * ecl_config_get_io_config(const ecl_config_type * ); - - bool ecl_config_get_formatted(const ecl_config_type * ); - bool ecl_config_get_unified_restart(const ecl_config_type * ); - bool ecl_config_get_unified_summary(const ecl_config_type * ); - int ecl_config_get_num_restart_files(const ecl_config_type * ); - int ecl_config_get_last_history_restart( const ecl_config_type * ); - bool ecl_config_can_restart( const ecl_config_type * ecl_config ); - void ecl_config_assert_restart( const ecl_config_type * ecl_config ); - const char * ecl_config_get_eclbase( const ecl_config_type * ecl_config ); - const char * ecl_config_get_refcase_name( const ecl_config_type * ecl_config); - void ecl_config_clear_static_kw( ecl_config_type * ecl_config ); - stringlist_type * ecl_config_get_static_kw_list( const ecl_config_type * ecl_config ); - void ecl_config_fprintf_config( const ecl_config_type * ecl_config , FILE * stream ); - ecl_config_type * ecl_config_alloc( ); - void ecl_config_add_config_items( config_parser_type * config ); - const char * ecl_config_get_depth_unit( const ecl_config_type * ecl_config ); - const char * ecl_config_get_pressure_unit( const ecl_config_type * ecl_config ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/ecl_refcase_list.h b/ThirdParty/Ert/libenkf/include/ert/enkf/ecl_refcase_list.h deleted file mode 100644 index 22627d7b31..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/ecl_refcase_list.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'ecl_refcase_list.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#ifndef ERT_ECL_REFCASE_LIST_H -#define ERT_ECL_REFCASE_LIST_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - - - typedef struct ecl_refcase_list_struct ecl_refcase_list_type; - - ecl_refcase_list_type * ecl_refcase_list_alloc( ); - void ecl_refcase_list_free( ecl_refcase_list_type * refcase_list ); - - bool ecl_refcase_list_has_default( ecl_refcase_list_type * refcase_list ); - const ecl_sum_type * ecl_refcase_list_get_default( ecl_refcase_list_type * refcase_list ); - bool ecl_refcase_list_set_default( ecl_refcase_list_type * refcase_list , const char * default_case); - int ecl_refcase_list_get_size(ecl_refcase_list_type * refcase_list ); - int ecl_refcase_list_add_matching( ecl_refcase_list_type * refcase_list , const char * glob_string); - int ecl_refcase_list_add_case( ecl_refcase_list_type * refcase_list , const char * case_name); - const char * ecl_refcase_list_iget_pathcase( ecl_refcase_list_type * refcase_list , int index); - const ecl_sum_type * ecl_refcase_list_iget_case( ecl_refcase_list_type * refcase_list , int index); - const ecl_sum_type * ecl_refcase_list_get_case( ecl_refcase_list_type * refcase_list , const char * case_name); - bool ecl_refcase_list_has_case( ecl_refcase_list_type * refcase_list , const char * case_name); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf.h b/ThirdParty/Ert/libenkf/include/ert/enkf/enkf.h deleted file mode 100644 index 280430db55..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#define SPLASH_LENGTH 8 -const char *splash_text[SPLASH_LENGTH] = { -" 8888888888 888 d8P 8888888888", -" 888 888 d8P 888 ", -" 888 888 d8P 888 ", -" 8888888 88888b. 888d88K 8888888 ", -" 888 888 '88b 8888888b 888 ", -" 888 888 888 888 Y88b 888 ", -" 888 888 888 888 Y88b 888 ", -" 8888888888 888 888 888 Y88b 888 "}; - diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_analysis.h b/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_analysis.h deleted file mode 100644 index 294f441fee..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_analysis.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_analysis.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#ifndef ERT_ENKF_ANALYSIS_H -#define ERT_ENKF_ANALYSIS_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include -#include - -#include - - - -void enkf_analysis_fprintf_obs_summary(const obs_data_type * obs_data , - const meas_data_type * meas_data , - const int_vector_type * step_list , - const char * ministep_name , - FILE * stream ); - -void enkf_analysis_deactivate_outliers(obs_data_type * obs_data , - meas_data_type * meas_data , - double std_cutoff , - double alpha, - bool verbose); - -void enkf_analysis_deactivate_std_zero(obs_data_type * obs_data , - meas_data_type * meas_data, - bool verbose); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_config_node.h b/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_config_node.h deleted file mode 100644 index 12e7929666..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_config_node.h +++ /dev/null @@ -1,233 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_config_node.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENKF_CONFIG_NODE_H -#define ERT_ENKF_CONFIG_NODE_H -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include - -#include - -#include -#include -#include -#include -#include - - typedef void (config_free_ftype) (void *); - typedef int (get_data_size_ftype) (const void *); - typedef void (config_fprintf_ftype) (const void * , enkf_var_type , FILE * ); - - typedef struct enkf_config_node_struct enkf_config_node_type; - typedef struct enkf_node_struct enkf_node_type; - - - bool enkf_config_node_has_vector( const enkf_config_node_type * node , enkf_fs_type * fs , int iens); - bool enkf_config_node_has_node( const enkf_config_node_type * node , enkf_fs_type * fs , node_id_type node_id); - bool enkf_config_node_vector_storage( const enkf_config_node_type * config_node); - - enkf_config_node_type * enkf_config_node_new_GEN_PARAM( const char * key , bool forward_init); - enkf_config_node_type * enkf_config_node_new_GEN_DATA( const char * key , bool forward_init); - enkf_config_node_type * enkf_config_node_new_custom_kw(const char * key, const char * result_file, const char * output_file); - enkf_config_node_type * enkf_config_node_new_defined_custom_kw(const char * key, const hash_type * definition); - - void enkf_config_node_update_min_std( enkf_config_node_type * config_node , const char * min_std_file ); - - enkf_config_node_type * enkf_config_node_alloc_GEN_PARAM( const char * node_key , - bool forward_init , - gen_data_file_format_type input_format , - gen_data_file_format_type output_format , - const char * init_file_fmt , - const char * ert_outfile_fmt); - - - enkf_config_node_type * enkf_config_node_alloc_GEN_DATA_state( const char * key, - bool forward_init , - gen_data_file_format_type input_format, - gen_data_file_format_type output_format, - const char * init_file_fmt , - const char * template_ecl_file , - const char * template_data_key , - const char * enkf_outfile_fmt , - const char * enkf_infile_fmt , - const char * min_std_file); - - - - enkf_config_node_type * enkf_config_node_alloc_GEN_DATA_result( const char * key , - gen_data_file_format_type input_format, - const char * enkf_infile_fmt ); - - - - - void enkf_config_node_update_GEN_PARAM( enkf_config_node_type * config_node, - gen_data_file_format_type input_format, - gen_data_file_format_type output_format, - const char * init_file_fmt , - const char * template_ecl_file , - const char * template_data_key , - const char * enkf_outfile_fmt , - const char * min_std_file); - - - void enkf_config_node_update_GEN_DATA_result( enkf_config_node_type * config_node, - gen_data_file_format_type input_format, - const char * enkf_infile_fmt ); - - - void enkf_config_node_update_GEN_DATA_state( enkf_config_node_type * config_node, - gen_data_file_format_type input_format, - gen_data_file_format_type output_format, - const char * init_file_fmt , - const char * template_ecl_file , - const char * template_data_key , - const char * enkf_outfile_fmt , - const char * enkf_infile_fmt , - const char * min_std_file); - - - enkf_config_node_type * enkf_config_node_new_surface( const char * key , bool forward_init); - - - void enkf_config_node_update_surface( enkf_config_node_type * config_node , - const char * base_surface , - const char * init_file_fmt , - const char * output_file , - const char * min_std_file ); - - - void enkf_config_node_update_gen_kw( enkf_config_node_type * config_node , - const char * enkf_outfile_fmt , /* The include file created by ERT for the forward model. */ - const char * template_file , - const char * parameter_file , - const char * min_std_file , - const char * init_file_fmt ); - - void enkf_config_node_update_custom_kw(enkf_config_node_type * config_node, const char * result_file, const char * output_file); - - - enkf_config_node_type * enkf_config_node_alloc(enkf_var_type , - ert_impl_type , - bool , - const char * , - const char * , - const char * , - const char * , - void * ); - - - enkf_config_node_type * enkf_config_node_alloc_summary( const char * key , load_fail_type load_fail); - - - void enkf_config_node_update_state_field( enkf_config_node_type * config_node , int truncation , double value_min , double value_max ); - - - void enkf_config_node_update_parameter_field( enkf_config_node_type * config_node , - const char * enkf_outfile_fmt , - const char * init_file_fmt , - const char * min_std_file , - int truncation , double value_min , double value_max , - const char * init_transform , - const char * output_transform ); - - - void enkf_config_node_update_general_field( enkf_config_node_type * config_node , - const char * enkf_outfile_fmt , - const char * enkf_infile_fmt , - const char * init_file_fmt , - const char * min_std_file , - int truncation , - double value_min , - double value_max , - const char * init_transform , - const char * input_transform , - const char * output_transform ); - - - -/*****************************************************************/ - - enkf_config_node_type * enkf_config_node_new_gen_kw( const char * key , const char * tag_fmt , bool forward_init); - enkf_config_node_type * enkf_config_node_alloc_field( const char * key , ecl_grid_type * ecl_grid, field_trans_table_type * trans_table, bool forward_init); - bool enkf_config_node_is_valid( const enkf_config_node_type * config_node ); - int enkf_config_node_get_data_size( const enkf_config_node_type * node , int report_step); - char * enkf_config_node_alloc_infile(const enkf_config_node_type * , int ); - char * enkf_config_node_alloc_outfile(const enkf_config_node_type * , int ); - int enkf_config_node_get_num_obs( const enkf_config_node_type * config_node ); - int enkf_config_node_load_obs( const enkf_config_node_type * config_node , enkf_obs_type * enkf_obs ,const char * key_index , int obs_count , time_t * sim_time , double * y , double * std); - const stringlist_type * enkf_config_node_get_obs_keys(const enkf_config_node_type *); - void enkf_config_node_add_obs_key(enkf_config_node_type * , const char * ); - void enkf_config_node_clear_obs_keys(enkf_config_node_type * config_node); - void enkf_config_node_free(enkf_config_node_type * ); - bool enkf_config_node_include_type(const enkf_config_node_type * , int ); - int enkf_config_node_get_serial_size(enkf_config_node_type *, int *); - bool enkf_config_node_include_type(const enkf_config_node_type * , int); - ert_impl_type enkf_config_node_get_impl_type(const enkf_config_node_type *); - enkf_var_type enkf_config_node_get_var_type(const enkf_config_node_type *); - void * enkf_config_node_get_ref(const enkf_config_node_type * ); - const char * enkf_config_node_get_key(const enkf_config_node_type * ); - void enkf_config_node_init_internalization(enkf_config_node_type * ); - void enkf_config_node_set_min_std( enkf_config_node_type * config_node , enkf_node_type * min_std ); - const char * enkf_config_node_get_min_std_file( const enkf_config_node_type * config_node ); - const char * enkf_config_node_get_enkf_outfile( const enkf_config_node_type * conifg_node ); - const char * enkf_config_node_get_enkf_infile( const enkf_config_node_type * config_node ); - const char * enkf_config_node_get_init_file_fmt( const enkf_config_node_type * config_node ); - char * enkf_config_node_alloc_initfile( const enkf_config_node_type * node , const char * path , int iens); - - void enkf_config_node_set_internalize(enkf_config_node_type * node, int report_step); - bool enkf_config_node_internalize(const enkf_config_node_type * node, int report_step); - - void enkf_config_node_fprintf_config( const enkf_config_node_type * config_node , FILE * stream ); - enkf_config_node_type * enkf_config_node_container_iget( const enkf_config_node_type * node , int index); - int enkf_config_node_container_size( const enkf_config_node_type * node ); - - enkf_config_node_type * enkf_config_node_new_container( const char * key ); - void enkf_config_node_update_container( enkf_config_node_type * config_node , const enkf_config_node_type * child_node); - const char * enkf_config_node_iget_container_key( const enkf_config_node_type * config_node , int index); - /* - The enkf_node_free() function declaration is in the enkf_config_node.h header, - because the enkf_config_node needs to know how to free the min_std node. - */ - void enkf_node_free(enkf_node_type *enkf_node); - const enkf_node_type * enkf_config_node_get_min_std( const enkf_config_node_type * config_node ); - - bool enkf_config_node_use_forward_init(const enkf_config_node_type * config_node); - void enkf_config_node_set_forward_init(enkf_config_node_type * config_node, bool forward_init); - - /*****************************************************************/ - - void enkf_config_node_add_GEN_DATA_config_schema( config_parser_type * config ); - void enkf_config_node_add_CUSTOM_KW_config_schema( config_parser_type * config ); - void enkf_config_node_add_GEN_PARAM_config_schema( config_parser_type * config ); - enkf_config_node_type * enkf_config_node_alloc_GEN_PARAM_from_config( const config_content_node_type * config_node ); - enkf_config_node_type * enkf_config_node_alloc_GEN_DATA_from_config( const config_content_node_type * node ); - -UTIL_IS_INSTANCE_HEADER( enkf_config_node ); -UTIL_SAFE_CAST_HEADER(enkf_config_node); -VOID_FREE_HEADER(enkf_config_node); -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_config_private.h b/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_config_private.h deleted file mode 100644 index 511a05ed50..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_config_private.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_config_private.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -struct enkf_config_struct { - int ens_size; - hash_type *config_hash; - hash_type *obs_hash; - bool endian_swap; - path_fmt_type *run_path; - int Nwells; - char **well_list; -}; diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_defaults.h b/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_defaults.h deleted file mode 100644 index 472d24750a..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_defaults.h +++ /dev/null @@ -1,297 +0,0 @@ -/** - This file contains verious default values which are compiled into - the enkf executable. Everytime you add something here you should - ask yourself: - - * Can we determine this automagically. - * Should the user be required to enter this information. - -*/ - -#ifndef ERT_ENKF_DEFAULT -#define ERT_ENKF_DEFAULT -#include - -#define DEFAULT_RUNPATH_KEY "DEFAULT_RUNPATH" -#define RERUN_RUNPATH_KEY "DEFAULT_RERUN_PATH" - - -/** - The format string used when creating "search-strings" which should - be replaced in the gen_kw template files - MUST contain one %s - placeholder which will be replaced with the parameter name. -*/ -#define DEFAULT_GEN_KW_TAG_FORMAT "<%s>" - - -/** - Default file name for export file for GEN_KW parameters -*/ -#define DEFAULT_GEN_KW_EXPORT_FILE "parameters.txt" - - -/** - The format string used when creating search strings from user input - with the 'DATA_KW' keyword. The format string must contain one '%s' - placeholder which will be replaced with the user supplied key; can - be just '%s' which means no ERT induced transformations. - - Example: - ------- - DATA_KW KEY1 VALUE1 - - DATA_KW_FORMAT = [<%s>] - - In this case all occurences of '[]' will be replaced with - 'VALUE1'. The DATA_KW_TAG_FORMAT used on user supplied tag keys can - in principle be different from the internal format, but this can of - course be confusing. The internal format is hard linked to job - description files, and can not easily be changed. -*/ - -//#define DEFAULT_DATA_KW_TAG_FORMAT "<%s>" - - -/** - This is the format used for tagging the internal variables like - IENS, and ECLBASE. These values are written into the various job - description files, care should therefor be taken before changing - the value of this variable. It is not user modifiable, and can only - be changed by recompiling. - -*/ -#define INTERNAL_DATA_KW_TAG_FORMAT "<%s>" - - - - -#define DEFAULT_DBASE_TYPE "BLOCK_FS" - -/** - The default number of block_fs instances allocated. -*/ -#define ENKF_DEFAULT_NUM_BLOCK_FS_DRIVERS 32 - - -/* Eclipse IO related stuff */ -#define DEFAULT_FORMATTED false -#define DEFAULT_UNIFIED false - - - -/* - Where the history is coming from - default value for config item: - HISTORY_SOURCE Observe that the function: - model_config_set_history_source() does currently not handle a - default value different from SCHEDULE. -*/ -#define DEFAULT_HISTORY_SOURCE REFCASE_HISTORY - - -#define DEFAULT_MAX_SUBMIT 2 /* The number of times to resubmit - default value for config item: MAX_SUBMIT */ -#define DEFAULT_MAX_INTERNAL_SUBMIT 1 /** Attached to keyword : MAX_RETRY */ - - -#define DEFAULT_LOG_LEVEL 1 -#define DEFAULT_LOG_FILE "log" - - - -/* - Defaults for the EnKF analysis. The analysis_config object is - instantiated with these values. -*/ -#define DEFAULT_ENKF_MODE ENKF_STANDARD -#define DEFAULT_NCOMP 1 -#define DEFAULT_ENKF_TRUNCATION 0.99 -#define DEFAULT_ENKF_ALPHA 1.50 /* Should be raised ?? */ -#define DEFAULT_ENKF_STD_CUTOFF 1e-6 -#define DEFAULT_MERGE_OBSERVATIONS false -#define DEFAULT_RERUN false -#define DEFAULT_RERUN_START 0 -#define DEFAULT_UPDATE_LOG_PATH "update_log" -#define DEFAULT_CV_NFOLDS 10 -#define DEFAULT_ENKF_SCALING true -#define DEFAULT_ENKF_KERNEL_REG false -#define DEFAULT_ENKF_KERNEL_FUNC 1 /*Default is the Gaussian */ -#define DEFAULT_ENKF_KERNEL_PARAM 1 /*Scale by the maximum value in the distance matrix */ -#define DEFAULT_ENKF_CV false -#define DEFAULT_ENKF_BOOTSTRAP false -#define DEFAULT_ENKF_PEN_PRESS false -#define DEFAULT_ENKF_FORCE_NCOMP false -#define DEFAULT_UPDATE_RESULTS false -#define DEFAULT_SINGLE_NODE_UPDATE false -#define DEFAULT_ANALYSIS_MODULE "STD_ENKF" -#define DEFAULT_ANALYSIS_NUM_ITERATIONS 4 -#define DEFAULT_ANALYSIS_ITER_CASE "ITERATED_ENSEMBLE_SMOOTHER%d" -#define DEFAULT_ANALYSIS_ITER_RUNPATH "Simulations/Real%d" -#define DEFAULT_ANALYSIS_MIN_REALISATIONS 0 // 0: No lower limit -#define DEFAULT_ANALYSIS_STOP_LONG_RUNNING false -#define DEFAULT_MAX_RUNTIME 0 -#define DEFAULT_ITER_RETRY_COUNT 4 - - -/* Default directories. */ -#define DEFAULT_QC_PATH "QC" -#define DEFAULT_REPORT_PATH "reports" -#define DEFAULT_PLOT_PATH "plots" -#define DEFAULT_RUNPATH "simulations/realization%d" -#define DEFAULT_ENSPATH "storage" -#define DEFAULT_RFTPATH "rft" -#define DEFAULT_PLOT_REFCASE true -#define DEFAULT_REPORT_LARGE false -#define DEFAULT_REPORT_TIMEOUT 120 - -#define DEFAULT_PRE_CLEAR_RUNPATH false - -#define DEFAULT_PLOT_WIDTH 1024 -#define DEFAULT_PLOT_HEIGHT 768 -#define DEFAULT_PLOT_ERRORBAR_MAX 25 -#define DEFAULT_PLOT_ERRORBAR false -#define DEFAULT_IMAGE_TYPE "png" -#define DEFAULT_PLOT_DRIVER "PLPLOT" -#define DEFAULT_IMAGE_VIEWER "/usr/bin/display" -#define DEFAULT_PLOT_LOGY false - -#define DEFAULT_STORE_PC true -#define DEFAULT_PC_FILENAME "PC_%04d-%04d-%s" -#define DEFAULT_PC_PATH "PC" - -#define SUMMARY_KEY_JOIN_STRING ":" -#define USER_KEY_JOIN_STRING ":" - -#define DEFAULT_WORKFLOW_VERBOSE false - -/* - Some #define symbols used when saving configuration files. -*/ -#define CONFIG_OPTION_FORMAT " %s:%s" -#define CONFIG_FLOAT_OPTION_FORMAT " %s:%g" -#define CONFIG_KEY_FORMAT "%-24s" -#define CONFIG_VALUE_FORMAT " %-32s" -#define CONFIG_FLOAT_FORMAT " %32.4f" /* One size - fits all :-) */ -#define CONFIG_INT_FORMAT " %32d" /* One size - fits all :-) */ -#define CONFIG_SHORT_VALUE_FORMAT " %-12s" -#define CONFIG_ENDVALUE_FORMAT " %-32s\n" -#define CONFIG_COMMENT_FORMAT "-- %s\n" -#define CONFIG_COMMENTLINE_FORMAT "----------------------------------------------------------------------\n" - - - -/* The magic string used to signal that *ALL* static keywords should be included. */ -#define DEFAULT_ALL_STATIC_KW "ERT_ALL" -#define NUM_STATIC_KW 56 - -/* - The whole thing is defined as one literal - just because I don't - understand C-linkage. -*/ -#define DEFAULT_STATIC_KW (const char *[NUM_STATIC_KW]) { \ - "ACAQ", \ - "ACAQNUM", \ - "DOUBHEAD", \ - "ENDSOL", \ - "HIDDEN", \ - "IAAQ", \ - "ICAQ", \ - "ICAQNUM", \ - "ICON", \ - "IGRP", \ - "ILBR", \ - "ILBS", \ - "INTEHEAD", \ - "ISEG", \ - "ISTHG", \ - "ISTHW", \ - "IWEL", \ - "LOGIHEAD", \ - "PRESSURE", \ - "RS", \ - "RSEG", \ - "RV", \ - "SAAQ", \ - "SCAQ", \ - "SCAQNUM", \ - "SCON", \ - "SGAS", \ - "SGRP", \ - "STARTSOL", \ - "SWAT", \ - "SWEL", \ - "XAAQ", \ - "XCON", \ - "XGRP", \ - "XWEL", \ - "ZGRP", \ - "ZWEL", \ - "ENDLGR", \ - "LGR", \ - "LGRHEADD", \ - "LGRHEADI", \ - "LGRHEADQ", \ - "LGRNAMES", \ - "EOWC" , \ - "IOWC" , \ - "OWC" , \ - "ZNODE" , \ - "INODE" , \ - "RNODE" , \ - "LGWEL" , \ - "IBRAN" , \ - "INOBR" , \ - "RBRAN" , \ - "PRESROCC", \ - "REGDIMS" , \ - "THRESHPR"} - - - -/* - The string added at the beginning and end of string which should be - replaced with the template parser. -*/ - -#define DEFAULT_START_TAG "<" -#define DEFAULT_END_TAG ">" - -#define DEFAULT_MANUAL_URL "http://ert.nr.no/ert/index.php/User_Manual" -#define DEFAULT_BROWSER "firefox" - -/*****************************************************************/ - -#define DEFAULT_VAR_DIR "/tmp/ert/var/run/ert" - -/*****************************************************************/ -/* file system spesific defaults. */ - -/** - Name of the default case. -*/ - -#define CASE_LOG "case-log" -#define CURRENT_CASE "current" -#define DEFAULT_CASE "default" -#define CURRENT_CASE_FILE "current_case" - -#define DEFAULT_PLAIN_NODE_PARAMETER_PATH "tstep/%04d/mem%03d/Parameter" -#define DEFAULT_PLAIN_NODE_STATIC_PATH "tstep/%04d/mem%03d/Static" -#define DEFAULT_PLAIN_NODE_DYNAMIC_FORECAST_PATH "tstep/%04d/mem%03d/Forecast" -#define DEFAULT_PLAIN_NODE_DYNAMIC_ANALYZED_PATH "tstep/%04d/mem%03d/Analyzed" -#define DEFAULT_PLAIN_NODE_INDEX_PATH "tstep/%04d/mem%03d/Index" - -#define DEFAULT_PLAIN_VECTOR_PARAMETER_PATH "vectors/mem%03d/Parameter" -#define DEFAULT_PLAIN_VECTOR_STATIC_PATH "vectors/mem%03d/Static" -#define DEFAULT_PLAIN_VECTOR_DYNAMIC_FORECAST_PATH "vectors/mem%03d/Forecast" -#define DEFAULT_PLAIN_VECTOR_DYNAMIC_ANALYZED_PATH "vectors/mem%03d/Analyzed" -#define DEFAULT_PLAIN_VECTOR_INDEX_PATH "vectors/mem%03d/Index" - - -#define DEFAULT_CASE_PATH "%s/files" // mountpoint -#define DEFAULT_CASE_MEMBER_PATH "%s/mem%03d/files" // mountpoint/member -#define DEFAULT_CASE_TSTEP_PATH "%s/%04d/files" // mountpoint/tstep -#define DEFAULT_CASE_TSTEP_MEMBER_PATH "%s/%04d/mem%03d/files" // mountpoint/tstep/member -// mountpoint = ENSPATH/case - - - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_fs.h b/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_fs.h deleted file mode 100644 index 1dbe607810..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_fs.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_fs.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENKF_FS_H -#define ERT_ENKF_FS_H -#ifdef __cplusplus -extern "C" { -#endif -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - const char * enkf_fs_get_mount_point( const enkf_fs_type * fs ); - const char * enkf_fs_get_root_path( const enkf_fs_type * fs ); - const char * enkf_fs_get_case_name( const enkf_fs_type * fs ); - bool enkf_fs_is_read_only(const enkf_fs_type * fs); - void enkf_fs_fsync( enkf_fs_type * fs ); - void enkf_fs_add_index_node(enkf_fs_type * , int , int , const char * , enkf_var_type, ert_impl_type); - - enkf_fs_type * enkf_fs_get_ref( enkf_fs_type * fs ); - int enkf_fs_decref( enkf_fs_type * fs ); - int enkf_fs_incref( enkf_fs_type * fs ); - int enkf_fs_get_refcount( const enkf_fs_type * fs ); - enkf_fs_type * enkf_fs_mount( const char * path ); - bool enkf_fs_update_disk_version(const char * mount_point , int src_version , int target_version); - int enkf_fs_disk_version(const char * mount_point ); - int enkf_fs_get_version104( const char * path ); - void enkf_fs_fwrite_node(enkf_fs_type * enkf_fs , buffer_type * buffer , const char * node_key, enkf_var_type var_type, - int report_step , int iens); - - void enkf_fs_fwrite_vector(enkf_fs_type * enkf_fs , - buffer_type * buffer , - const char * node_key, - enkf_var_type var_type, - int iens); - - bool enkf_fs_exists( const char * mount_point ); - - void enkf_fs_fread_node(enkf_fs_type * enkf_fs , buffer_type * buffer , - const char * node_key , enkf_var_type var_type , - int report_step , int iens); - - void enkf_fs_fread_vector(enkf_fs_type * enkf_fs , buffer_type * buffer , - const char * node_key , - enkf_var_type var_type , - int iens); - - - bool enkf_fs_has_vector(enkf_fs_type * enkf_fs , const char * node_key , enkf_var_type var_type , int iens); - bool enkf_fs_has_node(enkf_fs_type * enkf_fs , const char * node_key , enkf_var_type var_type , int report_step , int iens); - - void enkf_fs_debug_fprintf( const enkf_fs_type * fs); - - enkf_fs_type * enkf_fs_create_fs( const char * mount_point , fs_driver_impl driver_id , void * arg, bool mount); - - char * enkf_fs_alloc_case_filename( const enkf_fs_type * fs , const char * input_name); - char * enkf_fs_alloc_case_member_filename( const enkf_fs_type * fs , int iens , const char * input_name); - char * enkf_fs_alloc_case_tstep_filename( const enkf_fs_type * fs , int tstep , const char * input_name); - char * enkf_fs_alloc_case_tstep_member_filename( const enkf_fs_type * fs , int tstep , int iens , const char * input_name); - - FILE * enkf_fs_open_case_tstep_member_file( const enkf_fs_type * fs , const char * input_name , int tstep , int iens , const char * mode); - FILE * enkf_fs_open_case_file( const enkf_fs_type * fs , const char * input_name , const char * mode); - FILE * enkf_fs_open_case_tstep_file( const enkf_fs_type * fs , const char * input_name , int tstep , const char * mode); - FILE * enkf_fs_open_case_member_file( const enkf_fs_type * fs , const char * input_name , int iens , const char * mode); - - FILE * enkf_fs_open_excase_tstep_member_file( const enkf_fs_type * fs , const char * input_name , int tstep , int iens); - FILE * enkf_fs_open_excase_file( const enkf_fs_type * fs , const char * input_name); - FILE * enkf_fs_open_excase_tstep_file( const enkf_fs_type * fs , const char * input_name , int tstep ); - FILE * enkf_fs_open_excase_member_file( const enkf_fs_type * fs , const char * input_name , int iens ); - - time_map_type * enkf_fs_alloc_readonly_time_map( const char * mount_point ); - state_map_type * enkf_fs_alloc_readonly_state_map( const char * mount_point ); - summary_key_set_type * enkf_fs_alloc_readonly_summary_key_set( const char * mount_point ); - state_map_type * enkf_fs_get_state_map( const enkf_fs_type * fs ); - time_map_type * enkf_fs_get_time_map( const enkf_fs_type * fs ); - cases_config_type * enkf_fs_get_cases_config( const enkf_fs_type * fs); - misfit_ensemble_type * enkf_fs_get_misfit_ensemble( const enkf_fs_type * fs ); - summary_key_set_type * enkf_fs_get_summary_key_set( const enkf_fs_type * fs ); - custom_kw_config_set_type * enkf_fs_get_custom_kw_config_set( const enkf_fs_type * fs ); - - void enkf_fs_increase_write_count(enkf_fs_type * fs); - void enkf_fs_decrease_write_count(enkf_fs_type * fs); - int enkf_fs_get_write_count(const enkf_fs_type * fs); - - - UTIL_SAFE_CAST_HEADER( enkf_fs ); - UTIL_IS_INSTANCE_HEADER( enkf_fs ); - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_fs_type.h b/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_fs_type.h deleted file mode 100644 index 1192ad60ea..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_fs_type.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_fs_type.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENKF_FS_TYPES_H -#define ERT_ENKF_FS_TYPES_H -typedef struct enkf_fs_struct enkf_fs_type; -#endif - diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_macros.h b/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_macros.h deleted file mode 100644 index 8a7103279a..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_macros.h +++ /dev/null @@ -1,355 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_macros.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENKF_MACROS_H -#define ERT_ENKF_MACROS_H -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - - - - - -/*****************************************************************/ - -#define VOID_CONFIG_FREE(prefix) void prefix ## _config_free__(void *void_arg) { prefix ## _config_free((prefix ## _config_type *) void_arg); } -#define VOID_CONFIG_FREE_HEADER(prefix) void prefix ## _config_free__(void *); - -/*****************************************************************/ - -#define GET_DATA_SIZE(prefix) int prefix ## _config_get_data_size (const prefix ## _config_type *arg) { return arg->data_size; } -#define GET_DATA_SIZE_HEADER(prefix) int prefix ## _config_get_data_size (const prefix ## _config_type *arg); - -#define VOID_GET_DATA_SIZE(prefix) int prefix ## _config_get_data_size__ (const void * arg) {\ - const prefix ## _config_type * config = prefix ## _config_safe_cast_const( arg ); \ - return prefix ## _config_get_data_size( config ); \ -} -#define VOID_GET_DATA_SIZE_HEADER(prefix) int prefix ## _config_get_data_size__ (const void * arg); - -/*****************************************************************/ - - - -#define VOID_ALLOC(prefix) \ -void * prefix ## _alloc__(const void *void_config) { \ - const prefix ## _config_type * config = prefix ## _config_safe_cast_const( void_config ); \ - return prefix ## _alloc(config); \ -} - -#define VOID_ALLOC_HEADER(prefix) void * prefix ## _alloc__(const void *); - -/*****************************************************************/ - -#define VOID_HAS_DATA(prefix) \ - bool prefix ##_has_data__(const void * void_arg , int report_step) { \ - const prefix ## _type * arg = prefix ## _safe_cast_const( void_arg ); \ - return prefix ## _has_data(arg , report_step); \ -} - -#define VOID_HAS_DATA_HEADER(prefix) bool prefix ##_has_data__(const void * , int); - -/*****************************************************************/ -#define VOID_WRITE_TO_BUFFER(prefix) \ - bool prefix ## _write_to_buffer__(const void * void_arg , buffer_type * buffer , int report_step) { \ - const prefix ## _type * arg = prefix ## _safe_cast_const( void_arg ); \ - return prefix ## _write_to_buffer(arg , buffer , report_step); \ -} - - -#define VOID_READ_FROM_BUFFER(prefix) \ - void prefix ## _read_from_buffer__(void * void_arg , buffer_type * buffer , enkf_fs_type * fs, int report_step) { \ - prefix ## _type * arg = prefix ## _safe_cast( void_arg ); \ - prefix ## _read_from_buffer(arg , buffer , fs, report_step); \ -} - -#define VOID_WRITE_TO_BUFFER_HEADER(prefix) bool prefix ## _write_to_buffer__(const void * , buffer_type * , int); -#define VOID_READ_FROM_BUFFER_HEADER(prefix) void prefix ## _read_from_buffer__(void * , buffer_type * , enkf_fs_type * , int); - -#define VOID_FLOAD(prefix) \ -bool prefix ## _fload__(void * void_arg , const char * filename) { \ - prefix ## _type * arg = prefix ## _safe_cast( void_arg ); \ - return prefix ## _fload(arg , filename); \ -} -#define VOID_FLOAD_HEADER(prefix) bool prefix ## _fload__(void * , const char * ); - - -/*****************************************************************/ - -#define VOID_ECL_WRITE(prefix) \ -void prefix ## _ecl_write__(const void * void_arg , const char * path , const char * file , void * filestream) { \ - const prefix ## _type * arg = prefix ## _safe_cast_const( void_arg ); \ - prefix ## _ecl_write(arg , path , file , filestream); \ -} - -#define VOID_ECL_WRITE_HEADER(prefix) void prefix ## _ecl_write__(const void * , const char * , const char * , void *); - -/*****************************************************************/ - -#define VOID_FORWARD_LOAD(prefix) \ -bool prefix ## _forward_load__(void * void_arg , const char * ecl_file , const forward_load_context_type * load_context) { \ - prefix ## _type * arg = prefix ## _safe_cast( void_arg ); \ - return prefix ## _forward_load(arg , ecl_file , load_context); \ -} - -#define VOID_FORWARD_LOAD_HEADER(prefix) bool prefix ## _forward_load__(void * , const char * , const forward_load_context_type * load_context); - - /*****************************************************************/ - -#define VOID_FORWARD_LOAD_VECTOR(prefix) \ - bool prefix ## _forward_load_vector__(void * void_arg , const char * ecl_file , const forward_load_context_type * load_context, const int_vector_type * time_index) { \ - prefix ## _type * arg = prefix ## _safe_cast( void_arg ); \ - return prefix ## _forward_load_vector(arg , ecl_file ,load_context , time_index); \ -} - -#define VOID_FORWARD_LOAD_VECTOR_HEADER(prefix) bool prefix ## _forward_load_vector__(void * , const char * , const forward_load_context_type * load_context, const int_vector_type * time_index); - - -/*****************************************************************/ - -#define VOID_FREE(prefix) \ -void prefix ## _free__(void * void_arg) { \ - prefix ## _type * arg = prefix ## _safe_cast( void_arg ); \ - prefix ## _free( arg ); \ -} - -#define VOID_FREE_HEADER(prefix) void prefix ## _free__(void * ); - - -/*****************************************************************/ - -#define VOID_USER_GET(prefix) \ -bool prefix ## _user_get__(void * void_arg , const char * key , int report_step , double * value) { \ - prefix ## _type * arg = prefix ## _safe_cast( void_arg ); \ - return prefix ## _user_get(arg , key , report_step, value); \ -} - -#define VOID_USER_GET_HEADER(prefix) bool prefix ## _user_get__(void * , const char * , int, double *); - - -/*****************************************************************/ - -#define VOID_USER_GET_VECTOR(prefix) \ -void prefix ## _user_get_vector__(void * void_arg , const char * key , double_vector_type * value) { \ - prefix ## _type * arg = prefix ## _safe_cast( void_arg ); \ - prefix ## _user_get_vector(arg , key , value); \ -} - -#define VOID_USER_GET_VECTOR_HEADER(prefix) void prefix ## _user_get_vector__(void * , const char * , double_vector_type *); - -/*****************************************************************/ - -#define VOID_USER_GET_OBS(prefix) \ -void prefix ## _user_get__(void * void_arg , const char * key , double * value, double * std, bool * valid) { \ - prefix ## _user_get((prefix ## _type *) void_arg , key , value , std , valid); \ -} - -#define VOID_USER_GET_OBS_HEADER(prefix) void prefix ## _user_get__(void * , const char * , double * , double * , bool *); - - -/*****************************************************************/ - -#define VOID_FREE_DATA(prefix) \ -void prefix ## _free_data__(void * void_arg) { \ - prefix ## _type * arg = prefix ## _safe_cast( void_arg ); \ - prefix ## _free_data( arg ); \ -} - -#define VOID_FREE_DATA_HEADER(prefix) void prefix ## _free_data__(void * ); - -/*****************************************************************/ - -#define VOID_COPY(prefix) \ -void prefix ## _copy__(const void * void_src, void * void_target) { \ - const prefix ## _type * src = prefix ## _safe_cast_const( void_src ); \ - prefix ## _type * target = prefix ## _safe_cast( void_target ); \ - prefix ## _copy( src , target ); \ -} -#define VOID_COPY_HEADER(prefix) void prefix ## _copy__(const void * , void * ); - -/*****************************************************************/ - - -#define CONFIG_GET_ECL_KW_NAME(prefix) const char * prefix ## _config_get_ecl_kw_name(const prefix ## _config_type * config) { return config->ecl_kw_name; } -#define CONFIG_GET_ECL_KW_NAME_HEADER(prefix) const char * prefix ## _config_get_ecl_kw_name(const prefix ## _config_type * ) - - -/*****************************************************************/ - -#define VOID_SERIALIZE(prefix) \ - void prefix ## _serialize__(const void *void_arg, node_id_type node_id , const active_list_type * active_list , matrix_type * A , int row_offset , int column) { \ - const prefix ## _type *arg = prefix ## _safe_cast_const( void_arg ); \ - prefix ## _serialize (arg , node_id , active_list , A , row_offset , column); \ -} -#define VOID_SERIALIZE_HEADER(prefix) void prefix ## _serialize__(const void * , node_id_type , const active_list_type * , matrix_type * , int , int); - - -#define VOID_DESERIALIZE(prefix) \ - void prefix ## _deserialize__(void *void_arg, node_id_type node_id , const active_list_type * active_list , const matrix_type * A , int row_offset , int column) { \ - prefix ## _type *arg = prefix ## _safe_cast( void_arg ); \ - prefix ## _deserialize (arg , node_id , active_list , A , row_offset , column); \ -} -#define VOID_DESERIALIZE_HEADER(prefix) void prefix ## _deserialize__(void * , node_id_type , const active_list_type * , const matrix_type * , int , int); - - - - -/*****************************************************************/ - -#define VOID_INITIALIZE(prefix) \ - bool prefix ## _initialize__(void *void_arg, int iens , const char * init_file, rng_type * rng) { \ - prefix ## _type *arg = prefix ## _safe_cast(void_arg); \ - return prefix ## _initialize (arg , iens , init_file , rng); \ -} -#define VOID_INITIALIZE_HEADER(prefix) bool prefix ## _initialize__(void *, int , const char * , rng_type * ); - -/*****************************************************************/ - -#define VOID_SET_INFLATION(prefix) \ -void prefix ## _set_inflation__( void * void_inflation , const void * void_std , const void * void_min_std) { \ - prefix ## _set_inflation( prefix ## _safe_cast( void_inflation ) , prefix ## _safe_cast_const( void_std ) , prefix ## _safe_cast_const( void_min_std )); \ -} -#define VOID_SET_INFLATION_HEADER(prefix) void prefix ## _set_inflation__( void * void_inflation , const void * void_std , const void * void_min_std ); - - -/*****************************************************************/ - -#define VOID_GET_OBS(prefix) \ -void prefix ## _get_observations__(const void * void_arg , obs_data_type * obs_data, enkf_fs_type * fs, int report_step , const active_list_type * __active_list) { \ - prefix ## _get_observations((prefix ## _type *) void_arg , obs_data , fs, report_step , __active_list); \ -} - -#define VOID_GET_OBS_HEADER(prefix) void prefix ## _get_observations__(const void * , obs_data_type * , enkf_fs_type *, int , const active_list_type * ) - -/*****************************************************************/ - -#define VOID_MEASURE(obs_prefix, state_prefix) \ -void obs_prefix ## _measure__(const void * void_obs , const void * void_state , node_id_type node_id , meas_data_type * meas_data , const active_list_type * __active_list) { \ - const obs_prefix ## _type * obs = obs_prefix ## _safe_cast_const( void_obs ); \ - const state_prefix ## _type * state = state_prefix ## _safe_cast_const( void_state ); \ - obs_prefix ## _measure(obs , state , node_id , meas_data , __active_list); \ -} - -#define VOID_MEASURE_UNSAFE(obs_prefix, state_prefix) \ -void obs_prefix ## _measure__(const void * void_obs , const void * state , node_id_type node_id , meas_data_type * meas_data , const active_list_type * __active_list) { \ - const obs_prefix ## _type * obs = obs_prefix ## _safe_cast_const( void_obs ); \ - obs_prefix ## _measure(obs , state , node_id , meas_data , __active_list); \ -} - - -#define VOID_MEASURE_HEADER(obs_prefix) void obs_prefix ## _measure__(const void * , const void * , node_id_type , meas_data_type * , const active_list_type *) - -/*****************************************************************/ - -#define VOID_UPDATE_STD_SCALE(prefix)\ -void prefix ## _update_std_scale__( void * void_obs , double std_multiplier , const active_list_type * active_list) { \ - prefix ## _type * obs = prefix ## _safe_cast( void_obs ); \ - prefix ## _update_std_scale( obs , std_multiplier , active_list ); \ -} - -#define VOID_UPDATE_STD_SCALE_HEADER(prefix) void prefix ## _update_std_scale__(void * void_obs , double std_multiplier , const active_list_type * active_list); - -/*****************************************************************/ - -#define VOID_CHI2(obs_prefix, state_prefix) \ - double obs_prefix ## _chi2__(const void * void_obs , const void * void_state, node_id_type node_id) { \ - const obs_prefix ## _type * obs = obs_prefix ## _safe_cast_const( void_obs ); \ - return obs_prefix ## _chi2(obs , void_state , node_id); \ -} - -#define VOID_CHI2_HEADER(obs_prefix) double obs_prefix ## _chi2__(const void * , const void *, node_id_type); - - -/*****************************************************************/ - -#define VOID_TRUNCATE(prefix) void prefix ## _truncate__(void * void_arg) { prefix ## _truncate( (prefix ## _type *) void_arg); } -#define VOID_TRUNCATE_HEADER(prefix) void prefix ## _truncate__(void * ) - -/*****************************************************************/ -#define VOID_SCALE(prefix) void prefix ## _scale__(void * void_arg , double scale_factor) { prefix ## _scale( prefix ## _safe_cast( void_arg ) , scale_factor ); } -#define VOID_SCALE_HEADER(prefix) void prefix ## _scale__(void * , double ); - -/*****************************************************************/ - -#define VOID_CLEAR(prefix) void prefix ## _clear__(void * void_arg) { prefix ## _clear( prefix ## _safe_cast( void_arg )); } -#define VOID_CLEAR_HEADER(prefix) void prefix ## _clear__(void * ) - -/*****************************************************************/ - - -#define VOID_ISQRT(prefix) void prefix ## _isqrt__(void * void_arg) { prefix ## _isqrt( prefix ## _safe_cast( void_arg )); } -#define VOID_ISQRT_HEADER(prefix) void prefix ## _isqrt__(void * ) - -/*****************************************************************/ - -#define VOID_IADD(prefix) void prefix ## _iadd__( void * void_arg , const void * void_delta ) { \ - prefix ## _iadd( prefix ## _safe_cast( void_arg ) , prefix ## _safe_cast_const( void_delta ) ); \ -} - -#define VOID_IADD_HEADER(prefix) void prefix ## _iadd__( void * void_arg , const void * void_delta ); - -/*****************************************************************/ - -#define VOID_IMUL(prefix) void prefix ## _imul__( void * void_arg , const void * void_delta ) { \ - prefix ## _imul( prefix ## _safe_cast( void_arg ) , prefix ## _safe_cast_const( void_delta ) ); \ -} - -#define VOID_IMUL_HEADER(prefix) void prefix ## _imul__( void * void_arg , const void * void_delta ); - -/*****************************************************************/ - -#define VOID_IADDSQR(prefix) void prefix ## _iaddsqr__( void * void_arg , const void * void_delta ) { \ - prefix ## _iaddsqr( prefix ## _safe_cast( void_arg ) , prefix ## _safe_cast_const( void_delta ) ); \ -} - -#define VOID_IADDSQR_HEADER(prefix) void prefix ## _iaddsqr__( void * void_arg , const void * void_delta ); - -/*****************************************************************/ - -#define CONFIG_GET_ENSFILE(prefix) const char * prefix ## _config_get_ensfile_ref(const prefix ## _config_type * config) { return config->ensfile; } -#define CONFIG_GET_ECLFILE(prefix) const char * prefix ## _config_get_eclfile_ref(const prefix ## _config_type * config) { return config->eclfile; } -#define CONFIG_GET_ENSFILE_HEADER(prefix) const char * prefix ## _config_get_ensfile_ref(const prefix ## _config_type * ) -#define CONFIG_GET_ECLFILE_HEADER(prefix) const char * prefix ## _config_get_eclfile_ref(const prefix ## _config_type * ) - -/*****************************************************************/ - -#define VOID_IGET(prefix) double prefix ## _iget__(const void * void_arg, int index) { return prefix ## _iget((const prefix ## _type *) void_arg , index); } -#define VOID_IGET_HEADER(prefix) double prefix ## _iget__(const void * , int ) - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_main.h b/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_main.h deleted file mode 100644 index 0b777abea7..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_main.h +++ /dev/null @@ -1,328 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_main.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENKF_MAIN_H -#define ERT_ENKF_MAIN_H -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - /*****************************************************************/ - - typedef struct enkf_main_struct enkf_main_type; - ui_return_type * enkf_main_set_eclbase( enkf_main_type * enkf_main , const char * eclbase_fmt); - ui_return_type * enkf_main_set_data_file( enkf_main_type * enkf_main , const char * data_file ); - void enkf_main_set_user_config_file( enkf_main_type * enkf_main , const char * user_config_file ); - const char * enkf_main_get_user_config_file( const enkf_main_type * enkf_main ); - void enkf_main_set_rft_config_file( enkf_main_type * enkf_main , const char * rft_config_file ); - const char * enkf_main_get_rft_config_file( const enkf_main_type * enkf_main ); - bool enkf_main_get_pre_clear_runpath( const enkf_main_type * enkf_main ); - void enkf_main_set_pre_clear_runpath( enkf_main_type * enkf_main , bool pre_clear_runpath); - bool enkf_main_set_refcase( enkf_main_type * enkf_main , const char * refcase_path); - ui_return_type * enkf_main_validata_refcase( const enkf_main_type * enkf_main , const char * refcase_path); - - ert_templates_type * enkf_main_get_templates( enkf_main_type * enkf_main ); - void enkf_main_set_log_file( enkf_main_type * enkf_main , const char * log_file ); - const char * enkf_main_get_log_file( const enkf_main_type * enkf_main ); - void enkf_main_set_log_level( enkf_main_type * enkf_main , int log_level ); - int enkf_main_get_log_level( const enkf_main_type * enkf_main ); - - member_config_type * enkf_main_iget_member_config(const enkf_main_type * enkf_main , int iens); - void enkf_main_del_unused_static(enkf_main_type * , int ); - const char * enkf_main_get_data_file(const enkf_main_type * ); - const char ** enkf_main_get_well_list_ref(const enkf_main_type * , int *); - - - bool enkf_main_get_endian_swap(const enkf_main_type * ); - bool enkf_main_get_fmt_file(const enkf_main_type * ); - bool enkf_main_has_key(const enkf_main_type * , const char *); - void enkf_main_add_gen_kw(enkf_main_type * , const char * ); - void enkf_main_add_type(enkf_main_type * , const char * , enkf_var_type , ert_impl_type , const char * , const void *); - void enkf_main_add_type0(enkf_main_type * , const char * , int , enkf_var_type , ert_impl_type ); - void enkf_main_add_well(enkf_main_type * , const char * , int , const char ** ); - void enkf_main_analysis(enkf_main_type * ); - void enkf_main_free(enkf_main_type * ); - void enkf_main_exit(enkf_main_type * enkf_main); - void enkf_main_init_eclipse(enkf_main_type * , int , int ); - void enkf_main_init_run( enkf_main_type * enkf_main, const ert_run_context_type * run_context , init_mode_type init_mode); - void enkf_main_load_ecl_init_mt(enkf_main_type * enkf_main , int ); - void enkf_main_load_ecl_complete_mt(enkf_main_type *); - void enkf_main_iload_ecl_mt(enkf_main_type *enkf_main , int ); - - bool enkf_main_UPDATE(enkf_main_type * enkf_main , const int_vector_type * step_list, enkf_fs_type * source_fs, enkf_fs_type * target_fs , int target_step , run_mode_type run_mode); - bool enkf_main_smoother_update(enkf_main_type * enkf_main , enkf_fs_type * source_fs, enkf_fs_type * target_fs); - void enkf_main_create_run_path(enkf_main_type * enkf_main , const bool_vector_type * iactive , int iter); - int enkf_main_run_simple_step( enkf_main_type* enkf_main, bool_vector_type* iactive, init_mode_type init_mode, int iter ); - - void enkf_main_run_tui_exp(enkf_main_type * enkf_main , - bool_vector_type * iactive); - - - void enkf_main_run_smoother(enkf_main_type * enkf_main , enkf_fs_type * source_fs, const char * target_fs_name , bool_vector_type * iactive , int iter , bool rerun); - void enkf_main_run_iterated_ES(enkf_main_type * enkf_main, int num_iterations); - void enkf_main_set_data_kw(enkf_main_type * , const char * , const char *); - void enkf_main_set_state_run_path(const enkf_main_type * , int ); - void enkf_main_set_state_eclbase(const enkf_main_type * , int ); - void enkf_main_interactive_set_runpath__(void * ); - enkf_main_type * enkf_main_bootstrap(const char * model_config, bool strict, bool verbose); - void enkf_main_create_new_config( const char * config_file , const char * storage_path , const char * dbase_type , int num_realizations); - - enkf_node_type ** enkf_main_get_node_ensemble(const enkf_main_type * enkf_main , enkf_fs_type * src_fs , const char * key , int report_step); - void enkf_main_node_mean( const enkf_node_type ** ensemble , int ens_size , enkf_node_type * mean ); - void enkf_main_node_std( const enkf_node_type ** ensemble , int ens_size , const enkf_node_type * mean , enkf_node_type * std); - - ert_impl_type enkf_main_impl_type(const enkf_main_type *, const char * ); - enkf_state_type * enkf_main_iget_state(const enkf_main_type * , int ); - enkf_state_type ** enkf_main_get_ensemble( enkf_main_type * enkf_main); - const enkf_state_type ** enkf_main_get_ensemble_const( const enkf_main_type * enkf_main); - - const enkf_config_node_type * enkf_main_get_config_node(const enkf_main_type * , const char *); - const sched_file_type * enkf_main_get_sched_file(const enkf_main_type *); - ranking_table_type * enkf_main_get_ranking_table( const enkf_main_type * enkf_main ); - ecl_config_type * enkf_main_get_ecl_config(const enkf_main_type * enkf_main); - ensemble_config_type * enkf_main_get_ensemble_config(const enkf_main_type * enkf_main); - int enkf_main_get_ensemble_size( const enkf_main_type * enkf_main ); - int enkf_main_get_history_length( const enkf_main_type * ); - bool enkf_main_has_prediction( const enkf_main_type * ); - //const enkf_sched_type * enkf_main_get_enkf_sched(const enkf_main_type *); - model_config_type * enkf_main_get_model_config( const enkf_main_type * ); - local_config_type * enkf_main_get_local_config( const enkf_main_type * enkf_main ); - plot_config_type * enkf_main_get_plot_config( const enkf_main_type * enkf_main ); - void enkf_main_load_obs( enkf_main_type * enkf_main , const char * obs_config_file , bool clear_existing); - enkf_obs_type * enkf_main_get_obs(const enkf_main_type * ); - bool enkf_main_have_obs( const enkf_main_type * enkf_main ); - analysis_config_type * enkf_main_get_analysis_config(const enkf_main_type * ); - - void * enkf_main_get_enkf_config_node_type(const ensemble_config_type *, const char *); - void enkf_main_set_field_config_iactive(const ensemble_config_type *, int); - const char * enkf_main_get_image_viewer(const enkf_main_type * ); - const char * enkf_main_get_plot_driver(const enkf_main_type * enkf_main ); - const char * enkf_main_get_image_type(const enkf_main_type * enkf_main); - - - - - void enkf_main_list_users( set_type * users , const char * executable ); - const ext_joblist_type * enkf_main_get_installed_jobs( const enkf_main_type * enkf_main ); - - subst_list_type * enkf_main_get_data_kw( const enkf_main_type * enkf_main ); - void enkf_main_clear_data_kw( enkf_main_type * enkf_main ); - site_config_type * enkf_main_get_site_config( const enkf_main_type * enkf_main ); - void enkf_main_resize_ensemble( enkf_main_type * enkf_main , int new_ens_size ); - void enkf_main_get_observations( const enkf_main_type * enkf_main, const char * user_key , int obs_count , time_t * obs_time , double * y , double * std); - int enkf_main_get_observation_count( const enkf_main_type * enkf_main, const char * user_key ); - - keep_runpath_type enkf_main_iget_keep_runpath( const enkf_main_type * enkf_main , int iens ); - void enkf_main_iset_keep_runpath( enkf_main_type * enkf_main , int iens , keep_runpath_type keep_runpath); - - /*****************************************************************/ - void enkf_main_install_SIGNALS(void); - const char * enkf_main_get_SVN_VERSION( void ); - const char * enkf_main_get_COMPILE_TIME( void ); - void enkf_main_del_node(enkf_main_type * enkf_main , const char * key); - void enkf_main_add_node(enkf_main_type * enkf_main, enkf_config_node_type * enkf_config_node); - void enkf_main_update_node( enkf_main_type * enkf_main , const char * key ); - int_vector_type * enkf_main_update_alloc_step_list( const enkf_main_type * enkf_main , int load_start , int step2 , int stride); - - hook_manager_type * enkf_main_get_hook_manager( const enkf_main_type * enkf_main ); - - void enkf_main_get_PC( const matrix_type * S, - const matrix_type * dObs, - double truncation , - int ncomp , - matrix_type * PC , - matrix_type * PC_obs, - double_vector_type * singular_values); - - - void enkf_main_fprintf_PC(const char * filename , - matrix_type * PC , - matrix_type * PC_obs); - - - void enkf_main_set_verbose( enkf_main_type * enkf_main , bool verbose); - bool enkf_main_get_verbose( const enkf_main_type * enkf_main ); - - ert_workflow_list_type * enkf_main_get_workflow_list( enkf_main_type * enkf_main ); - void enkf_main_run_workflows( enkf_main_type * enkf_main , const stringlist_type * workflows); - bool enkf_main_run_workflow( enkf_main_type * enkf_main , const char * workflow); - - enkf_main_type * enkf_main_alloc_empty( ); - - rng_config_type * enkf_main_get_rng_config( const enkf_main_type * enkf_main ); - void enkf_main_rng_init( enkf_main_type * enkf_main); - - - char * enkf_main_alloc_abs_path_to_init_file(const enkf_main_type * enkf_main, const enkf_config_node_type * enkf_config_node); - - bool enkf_main_export_field(const enkf_main_type * enkf_main, - const char * kw, - const char * path, - bool_vector_type * iactive, - field_file_format_type file_type, - int report_step); - - bool enkf_main_export_field_with_fs(const enkf_main_type * enkf_main, - const char * kw, - const char * path, - bool_vector_type * iactive, - field_file_format_type file_type, - int report_step, - enkf_fs_type * fs); - - - void enkf_main_load_from_forward_model_with_fs(enkf_main_type * enkf_main, int iter , bool_vector_type * iactive, stringlist_type ** realizations_msg_list, enkf_fs_type * fs); - void enkf_main_load_from_forward_model(enkf_main_type * enkf_main, int iter , bool_vector_type * iactive, stringlist_type ** realizations_msg_list); - void enkf_main_load_from_forward_model_from_gui(enkf_main_type * enkf_main, int iter , bool_vector_type * iactive, enkf_fs_type * fs); - - void enkf_main_rank_on_observations(enkf_main_type * enkf_main, - const char * ranking_key, - const stringlist_type * obs_ranking_keys, - const int_vector_type * steps); - - - - void enkf_main_rank_on_data(enkf_main_type * enkf_main, - const char * ranking_key, - const char * data_key, - bool sort_increasing, - int step); - - - void enkf_main_export_ranking(enkf_main_type * enkf_main, const char * ranking_key, const char * ranking_file); - - - - - - - - /********* File System / Case Management ********** - Implementation: enkf_main_manage_fs.c */ - - - bool enkf_main_case_is_current(const enkf_main_type * enkf_main , const char * case_path); - char * enkf_main_read_alloc_current_case_name(const enkf_main_type * enkf_main); - stringlist_type * enkf_main_alloc_caselist( const enkf_main_type * enkf_main ); - void enkf_main_set_case_table( enkf_main_type * enkf_main , const char * case_table_file ); - - void enkf_main_initialize_from_scratch(enkf_main_type * enkf_main , - enkf_fs_type * init_fs, - const stringlist_type * param_list , - const bool_vector_type * iens_mask , - init_mode_type init_mode); - - void enkf_main_init_current_case_from_existing(enkf_main_type * enkf_main, - enkf_fs_type * source_case_fs, - int source_report_step); - - void enkf_main_init_current_case_from_existing_custom(enkf_main_type * enkf_main, - enkf_fs_type * source_case_fs, - int source_report_step, - stringlist_type * node_list, - bool_vector_type * iactive); - - - void enkf_main_init_case_from_existing(const enkf_main_type * enkf_main, - enkf_fs_type * source_case_fs, - int source_report_step, - enkf_fs_type * target_case); - - void enkf_main_init_case_from_existing_custom(const enkf_main_type * enkf_main, - enkf_fs_type * source_case_fs, - int source_report_step, - enkf_fs_type * target_case, - stringlist_type * node_list, - bool_vector_type * iactive); - - bool enkf_main_case_is_initialized( const enkf_main_type * enkf_main , - const char * case_name , - bool_vector_type * __mask); - - bool enkf_main_is_initialized( const enkf_main_type * enkf_main ,bool_vector_type * __mask); - - char * enkf_main_alloc_mount_point( const enkf_main_type * enkf_main , const char * case_path); - enkf_fs_type * enkf_main_get_fs(const enkf_main_type * ); - enkf_fs_type * enkf_main_tui_get_fs(const enkf_main_type * ); - enkf_fs_type * enkf_main_job_get_fs(const enkf_main_type * ); - enkf_fs_type * enkf_main_get_fs_ref(const enkf_main_type * enkf_main); - const char * enkf_main_get_current_fs( const enkf_main_type * enkf_main ); - enkf_fs_type * enkf_main_mount_alt_fs(const enkf_main_type * enkf_main , const char * case_path , bool create); - void enkf_main_set_fs( enkf_main_type * enkf_main , enkf_fs_type * fs , const char * case_path ); - void enkf_main_user_select_fs(enkf_main_type * enkf_main , const char * case_path ); - void enkf_main_select_fs( enkf_main_type * enkf_main , const char * case_path ); - bool enkf_main_fs_exists(const enkf_main_type * enkf_main, const char * input_case); - const char * enkf_main_get_mount_root( const enkf_main_type * enkf_main); - - - state_map_type * enkf_main_alloc_readonly_state_map( const enkf_main_type * enkf_main , const char * case_path); - time_map_type * enkf_main_alloc_readonly_time_map( const enkf_main_type * enkf_main , const char * case_path ); - - runpath_list_type * enkf_main_get_runpath_list( const enkf_main_type * enkf_main ); - ert_run_context_type * enkf_main_alloc_ert_run_context_ENSEMBLE_EXPERIMENT(const enkf_main_type * enkf_main , enkf_fs_type * fs , bool_vector_type * iactive , int iter); - ert_init_context_type * enkf_main_alloc_ert_init_context(const enkf_main_type * enkf_main , enkf_fs_type * fs, const bool_vector_type * iactive , init_mode_type init_mode , int iter); - - -UTIL_SAFE_CAST_HEADER(enkf_main); -UTIL_IS_INSTANCE_HEADER(enkf_main); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_main_jobs.h b/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_main_jobs.h deleted file mode 100644 index b57353ca4e..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_main_jobs.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_main_jobs.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ENKF_MAIN_JOBS_H -#define ENKF_MAIN_JOBS_H - -#ifdef __cplusplus -extern "C" { -#endif - - -void * enkf_main_select_case_JOB( void * self , const stringlist_type * args); -void * enkf_main_create_case_JOB( void * self , const stringlist_type * args); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_main_update.h b/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_main_update.h deleted file mode 100644 index e7e3e9d919..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_main_update.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_main_update.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENKF_MAIN_UPDATE -#define ERT_ENKF_MAIN_UPDATE - -#include - -void enkf_main_update(enkf_main_type * enkf_main , int step1 , int step2); - - - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_node.h b/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_node.h deleted file mode 100644 index e1d52b207b..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_node.h +++ /dev/null @@ -1,199 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_node.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENKF_NODE_H -#define ERT_ENKF_NODE_H -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -/**********************************/ - - - typedef void (serialize_ftype) (const void * , node_id_type , const active_list_type * , matrix_type * , int , int); - typedef void (deserialize_ftype) ( void * , node_id_type , const active_list_type * , const matrix_type * , int , int); - - - - - typedef void (ecl_write_ftype) (const void * , /* Node object */ - const char * , /* Directory to write to. */ - const char * , /* Filename - can be NULL. */ - void * ); /* fortio or FILE inistance for writing elements in restart files. */ - - typedef bool (fload_ftype) ( void * , const char *); - typedef void (read_from_buffer_ftype) ( void * , buffer_type * , enkf_fs_type * , int); - typedef bool (write_to_buffer_ftype) (const void * , buffer_type * , int); - typedef bool (has_data_ftype) (const void * , int); - - - typedef void (set_inflation_ftype) (void * , - const void * , /* Node object with the ensemble standard deviation. */ - const void * ); /* Node object with the minimum standard deviation - supplied by the user. */ - - - typedef void (user_get_vector_ftype) (void * , const char * , double_vector_type *); - typedef bool (user_get_ftype) (void * , const char * , int , double *); - typedef void * (alloc_ftype) (const void *); - typedef bool (initialize_ftype) ( void * , int , const char * , rng_type * ); - typedef bool (forward_load_ftype) (void * , const char * , const forward_load_context_type *); - typedef bool (forward_load_vector_ftype) (void * , const char * , const forward_load_context_type *, const int_vector_type *); - typedef void (realloc_data_ftype) (void * ); - typedef void (free_data_ftype) (void * ); - typedef void (node_free_ftype) ( void *); - typedef void (clear_ftype) ( void *); - typedef void (node_copy_ftype) (const void * , void *); - typedef void (isqrt_ftype) ( void *); - typedef void (scale_ftype) ( void * , double); - typedef void (iadd_ftype) ( void * , const void *); - typedef void (imul_ftype) ( void * , const void *); - typedef void (iaddsqr_ftype) ( void * , const void *); - typedef void (ensemble_mulX_vector_ftype) ( void * , int , const void ** , const double *); - - - typedef enum {alloc_func = 0, - ecl_write_func = 1, - forward_load_func = 2, - fread_func = 3, - fwrite_func = 4, - copy_func = 5, - initialize_func = 6, - free_func = 7, - free_data_func = 8, - clear_serial_state_func = 9, - serialize = 10, - deserialize = 11} node_function_type; - - - typedef void (enkf_node_ftype1) (enkf_node_type *); - typedef void (enkf_node_ftype_NEW) (enkf_node_type * , arg_pack_type * ); - - - bool enkf_node_user_get_vector( enkf_node_type * enkf_node , enkf_fs_type * fs , const char * key , int iens , double_vector_type * values); - bool enkf_node_user_get_no_id(enkf_node_type * enkf_node , enkf_fs_type * fs , const char * key , int report_step, int iens, double * value); - bool enkf_node_user_get(enkf_node_type * , enkf_fs_type * , const char * , node_id_type , double * ); - enkf_node_type * enkf_node_deep_alloc(const enkf_config_node_type * config); - enkf_node_type * enkf_node_alloc(const enkf_config_node_type *); - enkf_node_type * enkf_node_copyc(const enkf_node_type * ); - /* - The enkf_node_free() function declaration is in the enkf_config_node.h header, - because the enkf_config_node needs to know how to free the min_std node. - - void enkf_node_free(enkf_node_type *enkf_node); - */ - - bool enkf_node_forward_init(enkf_node_type * enkf_node , const char * run_path , int iens); - bool enkf_node_has_data( enkf_node_type * enkf_node , enkf_fs_type * fs , node_id_type node_id); - //void enkf_node_free_data(enkf_node_type * ); - void enkf_node_free__(void *); - void enkf_initialize(enkf_node_type * , int); - bool enkf_node_include_type(const enkf_node_type * , int ); - void * enkf_node_value_ptr(const enkf_node_type * ); - ert_impl_type enkf_node_get_impl_type(const enkf_node_type * ); - enkf_var_type enkf_node_get_var_type(const enkf_node_type * ); - bool enkf_node_use_forward_init( const enkf_node_type * enkf_node ); - void enkf_node_clear_serial_state(enkf_node_type * ); - void enkf_node_serialize(enkf_node_type * enkf_node , enkf_fs_type * fs , node_id_type node_id , const active_list_type * active_list , matrix_type * A , int row_offset , int column); - void enkf_node_deserialize(enkf_node_type *enkf_node , enkf_fs_type * fs , node_id_type node_id , const active_list_type * active_list , const matrix_type * A , int row_offset , int column); - - bool enkf_node_forward_load_vector(enkf_node_type *enkf_node , const forward_load_context_type * load_context , const int_vector_type * time_index); - bool enkf_node_forward_load (enkf_node_type *, const forward_load_context_type * load_context); - void enkf_node_ecl_write (const enkf_node_type *, const char * , void * , int); - bool enkf_node_initialize(enkf_node_type *enkf_node , int , rng_type * ); - void enkf_node_printf(const enkf_node_type *); - bool enkf_node_fwrite (enkf_node_type * , FILE * stream, bool , int , int); - void enkf_node_clear (enkf_node_type *); - void enkf_node_fread (enkf_node_type * , FILE * stream , int , int); - - void enkf_node_copy_ensemble(const enkf_config_node_type * config_node , - enkf_fs_type * src_case, - enkf_fs_type * target_case , - int report_step_from, /* src state */ - int report_step_to , /* target state */ - int ens_size, - const perm_vector_type * permutations); - - void enkf_node_copy(const enkf_config_node_type * config_node , - enkf_fs_type * src_case , - enkf_fs_type * target_case , - node_id_type src_id , - node_id_type target_id ); - enkf_node_type ** enkf_node_load_alloc_ensemble( const enkf_config_node_type * config_node , enkf_fs_type * fs , - int report_step , int iens1 , int iens2 ); - enkf_node_type * enkf_node_load_alloc( const enkf_config_node_type * config_node , enkf_fs_type * fs , node_id_type node_id); - bool enkf_node_fload( enkf_node_type * enkf_node , const char * filename ); - void enkf_node_load(enkf_node_type * enkf_node , enkf_fs_type * fs , node_id_type node_id ); - void enkf_node_load_vector( enkf_node_type * enkf_node , enkf_fs_type * fs , int iens); - bool enkf_node_store(enkf_node_type * enkf_node , enkf_fs_type * fs , bool force_vectors , node_id_type node_id); - bool enkf_node_store_vector(enkf_node_type *enkf_node , enkf_fs_type * fs , int iens ); - bool enkf_node_try_load(enkf_node_type *enkf_node , enkf_fs_type * fs , node_id_type node_id); - bool enkf_node_try_load_vector(enkf_node_type *enkf_node , enkf_fs_type * fs , int iens ); - bool enkf_node_exists( enkf_node_type *enkf_node , enkf_fs_type * fs , int report_step , int iens); - bool enkf_node_vector_storage( const enkf_node_type * node ); - enkf_node_type * enkf_node_alloc_shared_container(const enkf_config_node_type * config, hash_type * node_hash); - enkf_node_type * enkf_node_alloc_private_container(const enkf_config_node_type * config); -/*****************************************************************/ -/* Function callbacks */ -ecl_write_ftype * enkf_node_get_func_pointer( const enkf_node_type * node ); - - - -void enkf_node_set_inflation( enkf_node_type * inflation , const enkf_node_type * std , const enkf_node_type * min_std); -void enkf_node_sqrt(enkf_node_type *enkf_node); -void enkf_node_scale(enkf_node_type * , double ); -void enkf_node_iadd(enkf_node_type * , const enkf_node_type * ); -void enkf_node_iaddsqr(enkf_node_type * , const enkf_node_type * ); -void enkf_node_imul(enkf_node_type * , const enkf_node_type * ); -const enkf_config_node_type * enkf_node_get_config(const enkf_node_type * ); -const char * enkf_config_node_get_infile(const enkf_config_node_type * ); -const char * enkf_node_get_key(const enkf_node_type * ); -const char * enkf_node_get_swapfile(const enkf_node_type *); -bool enkf_node_has_func(const enkf_node_type * , node_function_type ); -bool enkf_node_internalize(const enkf_node_type * , int ); - -void enkf_node_upgrade_file_103( const char * path , const char * file , ert_impl_type impl_type , int perc_complete , msg_type * msg); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_obs.h b/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_obs.h deleted file mode 100644 index fd23a65269..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_obs.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_obs.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENKF_OBS_H -#define ERT_ENKF_OBS_H -#ifdef __cplusplus -extern "C" { -#endif -#include - -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - - bool enkf_obs_have_obs( const enkf_obs_type * enkf_obs ); - enkf_obs_type * enkf_obs_alloc( const history_type * history , - time_map_type * external_time_map , - const ecl_grid_type * grid , - const ecl_sum_type * refcase, - ensemble_config_type * ensemble_config ); - - void enkf_obs_free( enkf_obs_type * enkf_obs); - - obs_vector_type * enkf_obs_iget_vector(const enkf_obs_type * obs, int index); - obs_vector_type * enkf_obs_get_vector(const enkf_obs_type * , const char * ); - void enkf_obs_add_obs_vector(enkf_obs_type * enkf_obs, - const obs_vector_type * vector); - - bool enkf_obs_load(enkf_obs_type * enkf_obs, - const char * config_file, - double std_cutoff); - void enkf_obs_clear( enkf_obs_type * enkf_obs ); - - void enkf_obs_get_obs_and_measure_node( const enkf_obs_type * enkf_obs, - enkf_fs_type * fs, - const local_obsdata_node_type * obs_node , - const int_vector_type * ens_active_list , - meas_data_type * meas_data, - obs_data_type * obs_data); - - - void enkf_obs_get_obs_and_measure_data(const enkf_obs_type * enkf_obs, - enkf_fs_type * fs, - const local_obsdata_type * local_obsdata , - const int_vector_type * ens_active_list , - meas_data_type * meas_data, - obs_data_type * obs_data); - - - stringlist_type * enkf_obs_alloc_typed_keylist( enkf_obs_type * enkf_obs , obs_impl_type ); - hash_type * enkf_obs_alloc_data_map(enkf_obs_type * enkf_obs); - - const obs_vector_type * enkf_obs_user_get_vector(const enkf_obs_type * obs , const char * full_key, char ** index_key ); - bool enkf_obs_has_key(const enkf_obs_type * , const char * ); - int enkf_obs_get_size( const enkf_obs_type * obs ); - - hash_iter_type * enkf_obs_alloc_iter( const enkf_obs_type * enkf_obs ); - - stringlist_type * enkf_obs_alloc_keylist(enkf_obs_type * enkf_obs ); - stringlist_type * enkf_obs_alloc_matching_keylist(const enkf_obs_type * enkf_obs , const char * input_string); - time_t enkf_obs_iget_obs_time(const enkf_obs_type * enkf_obs , int report_step); - void enkf_obs_scale_std(enkf_obs_type * enkf_obs, double scale_factor); - void enkf_obs_local_scale_std( const enkf_obs_type * enkf_obs , const local_obsdata_type * local_obsdata, double scale_factor); - void enkf_obs_add_local_nodes_with_data(const enkf_obs_type * enkf_obs , local_obsdata_type * local_obs , enkf_fs_type *fs , const bool_vector_type * ens_mask); - double enkf_obs_scale_correlated_std(const enkf_obs_type * enkf_obs , enkf_fs_type * fs , const int_vector_type * ens_active_list , const local_obsdata_type * local_obsdata); - local_obsdata_type * enkf_obs_alloc_all_active_local_obs( const enkf_obs_type * enkf_obs , const char * key); - - UTIL_IS_INSTANCE_HEADER( enkf_obs ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_plot_data.h b/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_plot_data.h deleted file mode 100644 index d1e619a1b9..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_plot_data.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'enkf_plot_data.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#ifndef ERT_ENKF_PLOT_DATA_H -#define ERT_ENKF_PLOT_DATA_H - -#ifdef __cplusplus -extern "C" { -#endif -#include - -#include -#include - -#include -#include -#include -#include - - typedef struct enkf_plot_data_struct enkf_plot_data_type; - - enkf_plot_data_type * enkf_plot_data_alloc( const enkf_config_node_type * config_node ); - void enkf_plot_data_free( enkf_plot_data_type * plot_data ); - void enkf_plot_data_load( enkf_plot_data_type * plot_data , - enkf_fs_type * fs , - const char * user_key , - const bool_vector_type * input_mask); - int enkf_plot_data_get_size( const enkf_plot_data_type * plot_data ); - enkf_plot_tvector_type * enkf_plot_data_iget( const enkf_plot_data_type * plot_data , int index); - - UTIL_IS_INSTANCE_HEADER( enkf_plot_data ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_plot_gen_kw.h b/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_plot_gen_kw.h deleted file mode 100644 index 6819d0464e..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_plot_gen_kw.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'enkf_plot_gen_kw.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#ifndef ERT_ENKF_PLOT_GEN_KW_H -#define ERT_ENKF_PLOT_GEN_KW_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -#include -#include - - typedef struct enkf_plot_gen_kw_struct enkf_plot_gen_kw_type; - - enkf_plot_gen_kw_type * enkf_plot_gen_kw_alloc( const enkf_config_node_type * enkf_config_node); - void enkf_plot_gen_kw_free( enkf_plot_gen_kw_type * gen_kw ); - int enkf_plot_gen_kw_get_size( const enkf_plot_gen_kw_type * gen_kw ); - enkf_plot_gen_kw_vector_type * enkf_plot_gen_kw_iget( const enkf_plot_gen_kw_type * vector , int index); - void enkf_plot_gen_kw_load( enkf_plot_gen_kw_type * gen_kw , - enkf_fs_type * fs , - bool transform_data , - int report_step , - const bool_vector_type * input_mask); - - const char * enkf_plot_gen_kw_iget_key( const enkf_plot_gen_kw_type * plot_gen_kw, int index); - int enkf_plot_gen_kw_get_keyword_count( const enkf_plot_gen_kw_type * gen_kw ); - bool enkf_plot_gen_kw_should_use_log_scale(const enkf_plot_gen_kw_type * gen_kw , int index); - - UTIL_IS_INSTANCE_HEADER( enkf_plot_gen_kw ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_plot_gen_kw_vector.h b/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_plot_gen_kw_vector.h deleted file mode 100644 index 8e659306e0..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_plot_gen_kw_vector.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'enkf_plot_gen_kw.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#ifndef ERT_ENKF_PLOT_GEN_KW_VECTOR_H -#define ERT_ENKF_PLOT_GEN_KW_VECTOR_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include - - typedef struct enkf_plot_gen_kw_vector_struct enkf_plot_gen_kw_vector_type; - - enkf_plot_gen_kw_vector_type * enkf_plot_gen_kw_vector_alloc( const enkf_config_node_type * config_node , int iens ); - void enkf_plot_gen_kw_vector_free( enkf_plot_gen_kw_vector_type * vector ); - int enkf_plot_gen_kw_vector_get_size( const enkf_plot_gen_kw_vector_type * vector ); - void enkf_plot_gen_kw_vector_reset( enkf_plot_gen_kw_vector_type * vector ); - void enkf_plot_gen_kw_vector_load( enkf_plot_gen_kw_vector_type * vector , enkf_fs_type * fs , bool transform_data , int report_step ); - void * enkf_plot_gen_kw_vector_load__( void * arg ); - double enkf_plot_gen_kw_vector_iget( const enkf_plot_gen_kw_vector_type * vector , int index); - - UTIL_IS_INSTANCE_HEADER( enkf_plot_gen_kw_vector ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_plot_gendata.h b/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_plot_gendata.h deleted file mode 100644 index d2a4ecd16a..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_plot_gendata.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'enkf_plot_gendata.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENKF_PLOT_GENDATA_H -#define ERT_ENKF_PLOT_GENDATA_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include -#include -#include -#include - - - -typedef struct enkf_plot_gendata_struct enkf_plot_gendata_type; - -enkf_plot_gendata_type * enkf_plot_gendata_alloc( const enkf_config_node_type * enkf_config_node); -enkf_plot_gendata_type * enkf_plot_gendata_alloc_from_obs_vector( const obs_vector_type * obs_vector ); -void enkf_plot_gendata_free( enkf_plot_gendata_type * data ); -int enkf_plot_gendata_get_size( const enkf_plot_gendata_type * data ); -enkf_plot_genvector_type * enkf_plot_gendata_iget( const enkf_plot_gendata_type * plot_data , int index); -void enkf_plot_gendata_load( enkf_plot_gendata_type * plot_data , - enkf_fs_type * fs , - int report_step , - const bool_vector_type * input_mask); - -double_vector_type * enkf_plot_gendata_get_min_values(enkf_plot_gendata_type * plot_data); -double_vector_type * enkf_plot_gendata_get_max_values(enkf_plot_gendata_type * plot_data); - - -UTIL_IS_INSTANCE_HEADER( enkf_plot_gendata ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_plot_genvector.h b/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_plot_genvector.h deleted file mode 100644 index 0cf27d665c..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_plot_genvector.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'enkf_plot_genvector.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENKF_PLOT_GENVECTOR_H -#define ERT_ENKF_PLOT_GENVECTOR_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include - -typedef struct enkf_plot_genvector_struct enkf_plot_genvector_type; - -enkf_plot_genvector_type * enkf_plot_genvector_alloc( const enkf_config_node_type * enkf_config_node , int iens); -void enkf_plot_genvector_free( enkf_plot_genvector_type * vector ); -int enkf_plot_genvector_get_size( const enkf_plot_genvector_type * vector ); -void enkf_plot_genvector_reset( enkf_plot_genvector_type * vector ); - void * enkf_plot_genvector_load__( void * arg ); -double enkf_plot_genvector_iget( const enkf_plot_genvector_type * vector , int index); - -UTIL_IS_INSTANCE_HEADER( enkf_plot_genvector ); - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_plot_tvector.h b/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_plot_tvector.h deleted file mode 100644 index c23f1ddf7a..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_plot_tvector.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'enkf_plot_tvector.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#ifndef ERT_ENKF_PLOT_TVECTOR_H -#define ERT_ENKF_PLOT_TVECTOR_H - -#ifdef __cplusplus -extern "C" { -#endif -#include -#include - -#include - -#include -#include -#include - - typedef struct enkf_plot_tvector_struct enkf_plot_tvector_type; - - UTIL_SAFE_CAST_HEADER( enkf_plot_tvector ); - UTIL_IS_INSTANCE_HEADER( enkf_plot_tvector ); - - - - void enkf_plot_tvector_reset( enkf_plot_tvector_type * plot_tvector ); - enkf_plot_tvector_type * enkf_plot_tvector_alloc( const enkf_config_node_type * config_node , int iens); - void enkf_plot_tvector_load( enkf_plot_tvector_type * plot_tvector , enkf_fs_type * fs , const char * user_key ); - void * enkf_plot_tvector_load__( void * arg ); - void enkf_plot_tvector_free( enkf_plot_tvector_type * plot_tvector ); - void enkf_plot_tvector_iset( enkf_plot_tvector_type * plot_tvector , int index , time_t time , double value); - - int enkf_plot_tvector_size( const enkf_plot_tvector_type * plot_tvector ); - double enkf_plot_tvector_iget_value( const enkf_plot_tvector_type * plot_tvector , int index); - time_t enkf_plot_tvector_iget_time( const enkf_plot_tvector_type * plot_tvector , int index); - bool enkf_plot_tvector_iget_active( const enkf_plot_tvector_type * plot_tvector , int index); - bool enkf_plot_tvector_all_active( const enkf_plot_tvector_type * plot_tvector ); - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_serialize.h b/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_serialize.h deleted file mode 100644 index 5db999ac9a..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_serialize.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_serialize.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENKF_SERIALIZE_H -#define ERT_ENKF_SERIALIZE_H -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include - -#include - -#include - - - - -void enkf_matrix_serialize(const void * __node_data , - int node_size , - ecl_type_enum node_type , - const active_list_type * __active_list , - matrix_type * A, - int row_offset, - int column); - - -void enkf_matrix_deserialize(void * __node_data , - int node_size , - ecl_type_enum node_type , - const active_list_type * __active_list , - const matrix_type * A, - int row_offset, - int column); - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_state.h b/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_state.h deleted file mode 100644 index ff07ed04ff..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_state.h +++ /dev/null @@ -1,134 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_state.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENKF_STATE_H -#define ERT_ENKF_STATE_H -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include -#include -#include -#include -#include - - -#include - -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -typedef struct enkf_state_struct enkf_state_type; - - bool enkf_state_get_pre_clear_runpath( const enkf_state_type * enkf_state ); - void enkf_state_set_pre_clear_runpath( enkf_state_type * enkf_state , bool pre_clear_runpath ); - - keep_runpath_type enkf_state_get_keep_runpath( const enkf_state_type * enkf_state ); - void enkf_state_set_keep_runpath( enkf_state_type * enkf_state , keep_runpath_type keep_runpath); - keep_runpath_type member_config_get_keep_runpath(const member_config_type * member_config); - //void * enkf_state_complete_forward_model__(void * arg ); - void * enkf_state_load_from_forward_model_mt( void * arg ); - void enkf_state_initialize(enkf_state_type * enkf_state , enkf_fs_type * fs, const stringlist_type * param_list , init_mode_type init_mode); - void enkf_state_fread(enkf_state_type * , enkf_fs_type * fs , int , int ); - void enkf_state_swapout_node(const enkf_state_type * , const char *); - void enkf_state_swapin_node(const enkf_state_type * , const char *); - void enkf_state_iset_eclpath(enkf_state_type * , int , const char *); - enkf_node_type * enkf_state_get_node(const enkf_state_type * , const char * ); - bool enkf_state_has_node(const enkf_state_type * enkf_state , const char * node_key); - void enkf_state_del_node(enkf_state_type * , const char * ); - void enkf_state_load_ecl_summary(enkf_state_type * , bool , int ); - void * enkf_state_run_eclipse__(void * ); - void * enkf_state_start_forward_model__(void * ); - - int enkf_state_load_from_forward_model(enkf_state_type * enkf_state , - run_arg_type * run_arg , - stringlist_type * msg_list); - - int enkf_state_forward_init(enkf_state_type * enkf_state , - run_arg_type * run_arg); - - void enkf_state_init_eclipse(enkf_state_type *enkf_state, const run_arg_type * run_arg ); - - enkf_state_type * enkf_state_alloc(int , - rng_type * main_rng , - const char * casename , - bool pre_clear_runpath, - keep_runpath_type , - model_config_type * , - ensemble_config_type * , - const site_config_type * , - const ecl_config_type * , - ert_templates_type * templates, - subst_list_type * parent_subst); - void enkf_state_update_node( enkf_state_type * enkf_state , const char * node_key ); - void enkf_state_update_jobname( enkf_state_type * enkf_state ); - void enkf_state_update_eclbase( enkf_state_type * enkf_state ); - void enkf_state_add_node(enkf_state_type * , const char * , const enkf_config_node_type * ); - enkf_node_type * enkf_state_get_or_create_node(enkf_state_type * enkf_state, const enkf_config_node_type * config_node); - void enkf_state_load_ecl_restart(enkf_state_type * , bool , int ); - void enkf_state_sample(enkf_state_type * , int); - void enkf_state_fwrite(const enkf_state_type * , enkf_fs_type * fs , int , int ); - void enkf_state_ens_read( enkf_state_type * , const char * , int); - void enkf_state_ecl_write(enkf_state_type *, const run_arg_type * run_arg , enkf_fs_type * fs); - void enkf_state_free(enkf_state_type * ); - void enkf_state_apply(enkf_state_type * , enkf_node_ftype1 * , int ); - void enkf_state_serialize(enkf_state_type * , size_t); - void enkf_state_set_iens(enkf_state_type * , int ); - int enkf_state_get_iens(const enkf_state_type * ); - member_config_type *enkf_state_get_member_config(const enkf_state_type * enkf_state); - const char * enkf_state_get_run_path(const enkf_state_type * ); - const char * enkf_state_get_eclbase( const enkf_state_type * enkf_state ); - void enkf_state_printf_subst_list(enkf_state_type * enkf_state , int step1 , int step2); - - rng_type * enkf_state_get_rng( const enkf_state_type * enkf_state ); - unsigned int enkf_state_get_random( enkf_state_type * enkf_state ); - run_status_type enkf_state_get_simple_run_status(const enkf_state_type * state); - void enkf_state_add_subst_kw(enkf_state_type * enkf_state , const char * kw , const char * value , const char * doc_string); - subst_list_type * enkf_state_get_subst_kw( enkf_state_type * enkf_state ); - -/******************************************************************/ -/* Forward model callbacks: */ - -bool enkf_state_complete_forward_modelOK__(void * arg ); -bool enkf_state_complete_forward_modelRETRY__(void * arg ); -bool enkf_state_complete_forward_modelEXIT__(void * arg ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_types.h b/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_types.h deleted file mode 100644 index fdef2ec2a2..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_types.h +++ /dev/null @@ -1,253 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_types.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENKF_TYPES_H -#define ERT_ENKF_TYPES_H -#ifdef __cplusplus -extern "C" { -#endif - - - - - -/* - This enum signals the three different states a "cell" in - observation/data node can be in: - - ACTIVE: The cell is active and should be used/updated in EnKF - analysis. - - LOCAL_INACTIVE: The cell is not included in the current local - analysis ministep - - DEACTIVATED: The cell has been deactivated by the functionality - deactivating outliers. - -*/ - -typedef enum { ACTIVE = 1, - LOCAL_INACTIVE = 2, /* Not active in current local update scheme. */ - DEACTIVATED = 3, /* Deactivaed due to to small overlap, or... */ - MISSING = 4} active_type; /* Set as missing by the forward model. */ - - - -/* - The enkf_var_type enum defines logical groups of variables. All - variables in the same group, i.e. 'parameter' are typically treated - in the same manner. So the reason for creating this type is to be - able to say for instance: "Load all dynamic_state variables". - - Observe that these are used as bitmask's, i.e. the numerical values - must be a power of 2 series. -*/ - -typedef enum {INVALID_VAR = 0 , /* */ - PARAMETER = 1 , /* A parameter which is updated with enkf: PORO , MULTFLT , ..*/ - DYNAMIC_STATE = 2 , /* Dynamic data which are needed for a restart - i.e. pressure and saturations. */ - DYNAMIC_RESULT = 4 , /* Dynamic results which are NOT needed for a restart - i.e. well rates. */ - INDEX_STATE = 16 } /* Index data - enum value is used for storage classification */ -enkf_var_type; - - - -typedef enum { DEFAULT_KEEP = 0, /* Remove for enkf assimilation - keep for ensemble experiments. */ - EXPLICIT_DELETE = 1, /* Remove unconditionally */ - EXPLICIT_KEEP = 2} /* keep unconditionally */ -keep_runpath_type; - - - - - -/* - ert_impl_type are the actual node implementation types. Observe - that one ert_impl_type can be used in several ways as - enkf_var_type. For instance the pressure is implemented with a - field, and behaves as a dynamic_state variable, on the other hand - the permeability is also implemented as a field, but this is a - parameter. - - These correspond to implementation types. The numbers are on disk, - and should **NOT BE UPDATED**. The ERT_MIN_TYPE and MAX_TYPE - identifiers are needed for the block_fs_driver. -*/ - - - -typedef enum {INVALID = 0 , - IMPL_TYPE_OFFSET = 100 , - FIELD = 104 , /* WELL has been removed */ - GEN_KW = 107 , /* RELPERM has been removed & HAVANA_FAULT */ - CUSTOM_KW = 108 , - SUMMARY = 110 , /* TPGZONE has been removed */ - GEN_DATA = 113 , /* PILOT_POINT has been removed */ - SURFACE = 114 , - CONTAINER = 115 } ert_impl_type; - - - -/* - Should update the functions enkf_types_get_impl_name() and - enkf_types_get_impl_type__() when this enum is updated. - In addition to enkf_config_add_type(). -*/ - - - - - -typedef enum { REPORT_STEP_INCOMPATIBLE = 1, - LOAD_FAILURE = 2} enkf_fw_load_result_enum; - - - - - - - /** - These are 2^n bitmasks. - */ - -typedef enum { TRUNCATE_NONE = 0, - TRUNCATE_MIN = 1, - TRUNCATE_MAX = 2 } truncation_type; - - - - -/** - This enum is used to differentiate between different types of - run. The point is that depending on this mode we can be more or - less restrictive on the amount of input we require from the user. - - In mode enkf_assimlation ( which is the default ), we require quite - a lot of info, whereas in the case screening_experiment we require - less. - - screening_experiment: - - SIZE - - RUNPATH - - ECLBASE - - SCHEDULE_FILE - - DATA_FILE - - FORWARD_MODEL. - - ensemble_experiment: - - ENSPATH - - INIT_FILE (or estimation of EQUIL) - - enkf_assmilation: - - RESULT_PATH - -*/ - -typedef enum { //ENKF_ASSIMILATION = 1, - ENSEMBLE_EXPERIMENT = 2, - SMOOTHER_UPDATE = 4 , - INIT_ONLY = 8 } run_mode_type; - - -#define ENKF_RUN_ENUM_DEFS {.value = 1 , .name = "ENKF_ASSIMILATION"}, \ - {.value = 2 , .name = "ENSEMBLE_EXPERIMENT"} - -#define ENKF_RUN_ENUM_SIZE 2 - - - -/** - This enum enumerates the different types of inflation which should - be used. Observe that the actual variable used is not en enum - instance, but rather an ordinary integer which is in general a sum - of of the values listed in this enum. -*/ - - - typedef enum { NO_INFLATION = 0, - SCALAR_INFLATION = 1, - LOCAL_INFLATION = 2} inflation_mode_type; - - - - typedef enum { JOB_NOT_STARTED = 0, - JOB_SUBMITTED = 1, // This implies that it has been submitted to the internal queue system; we don't know if it is actually running or not. - JOB_RUN_FAILURE = 2, - JOB_LOAD_FAILURE = 3, - JOB_RUN_OK = 4 } run_status_type; - - -/*****************************************************************/ - -/** - This enum is used when we are setting up the dependencies between - observations and variables. The modes all_active and inactive are - sufficient information, for the values partly active we need - additional information. - - The same type is used both for variables (PRESSURE/PORO/MULTZ/...) - and for observations. -*/ - -typedef enum { - ALL_ACTIVE = 1, /* The variable/observation is fully active, i.e. all cells/all faults/all .. */ - INACTIVE = 2, /* Fully inactive */ - PARTLY_ACTIVE = 3 /* Partly active - must supply additonal type spesific information on what is active.*/ -} active_mode_type; - - - typedef struct { - int report_step; - int iens; - } node_id_type; - - - -/*****************************************************************/ -/* Possible transitions: */ - typedef enum { - STATE_UNDEFINED = 1, - STATE_INITIALIZED = 2, - STATE_HAS_DATA = 4, - STATE_LOAD_FAILURE = 8, - STATE_PARENT_FAILURE = 16 - } realisation_state_enum; - - - typedef enum { - INIT_NONE = 0, - INIT_CONDITIONAL = 1, - INIT_FORCE = 2 - } init_mode_type; - - - -typedef struct enkf_obs_struct enkf_obs_type; - - - - -const char * enkf_types_get_var_name(enkf_var_type var_type); -ert_impl_type enkf_types_get_impl_type(const char * ); -const char * enkf_types_get_impl_name(ert_impl_type ); -ert_impl_type enkf_types_check_impl_type(const char * ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_util.h b/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_util.h deleted file mode 100644 index 32130b5436..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/enkf_util.h +++ /dev/null @@ -1,349 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_util.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENKF_UTIL_H -#define ERT_ENKF_UTIL_H -#ifdef __cplusplus -extern "C" { -#endif -#include -#include -#include - -#include -#include - -#include - -#include - -/*****************************************************************/ - -/** - These math functions assume that the underlying data implementation - is double or float - will NOT work for fields. -*/ - - - -#define SQR_FUNC(prefix) \ -void prefix ## _isqr(void * void_arg) { \ -prefix ## _type *arg = (prefix ## _type *) void_arg;\ -const int data_size = prefix ## _config_get_data_size(arg->config); \ -int i; \ -for (i=0; i < data_size; i++) \ - arg->data[i] = arg->data[i]*arg->data[i]; \ -} -#define SQR_FUNC_VOID_HEADER(prefix) void prefix ## _isqr(void * ) -#define SQR_FUNC_HEADER(prefix) void prefix ## _isqr(prefix ## _type *) -#define SQR_FUNC_SCALAR(prefix) void prefix ## _isqr(void * void_arg) { scalar_isqr(((prefix ## _type *) void_arg)->scalar); } - - -/*****************************************************************/ - -#define SQRT_FUNC(prefix) \ -void prefix ## _isqrt(void * void_arg) { \ -prefix ## _type *arg = (prefix ## _type *) void_arg;\ -const int data_size = prefix ## _config_get_data_size(arg->config); \ -int i; \ -for (i=0; i < data_size; i++) \ - arg->data[i] = sqrt(arg->data[i]); \ -} -#define SQRT_FUNC_VOID_HEADER(prefix) void prefix ## _isqrt(void * ) -#define SQRT_FUNC_HEADER(prefix) void prefix ## _isqrt(prefix ## _type* ) -#define SQRT_FUNC_SCALAR(prefix) void prefix ## _isqrt(void * void_arg) { scalar_isqrt(((prefix ## _type *) void_arg)->scalar); } - - -/*****************************************************************/ - -#define SCALE_FUNC(prefix) \ -void prefix ## _iscale(void *void_arg , double scale_factor) { \ -prefix ## _type *arg = (prefix ## _type *) void_arg; \ -const int data_size = prefix ## _config_get_data_size(arg->config); \ -int i; \ -for (i=0; i < data_size; i++) \ - arg->data[i] *= scale_factor; \ -} -#define SCALE_FUNC_SCALAR(prefix) void prefix ## _iscale(void * void_arg, double scale_factor) { scalar_iscale(((prefix ## _type *) void_arg)->scalar , scale_factor); } -#define SCALE_FUNC_VOID_HEADER(prefix) void prefix ## _iscale(void * , double) -#define SCALE_FUNC_HEADER(prefix) void prefix ## _iscale(prefix ## _type * , double) - -/*****************************************************************/ - -#define RESET_FUNC(prefix) \ -void prefix ## _ireset(void *void_arg) { \ -prefix ## _type *arg = (prefix ## _type *) void_arg; \ -const int data_size = prefix ## _config_get_data_size(arg->config); \ -int i; \ -for (i=0; i < data_size; i++) \ - arg->data[i] = 0; \ -} -#define RESET_FUNC_SCALAR(prefix) void prefix ## _ireset(void * void_arg) { scalar_ireset(((prefix ## _type *) void_arg)->scalar); } -#define RESET_FUNC_VOID_HEADER(prefix) void prefix ## _ireset(void *) -#define RESET_FUNC_HEADER(prefix) void prefix ## _ireset(prefix ## _type *) - -/*****************************************************************/ - -#define ADD_FUNC(prefix) \ -void prefix ## _iadd(void *void_arg , const void *void_delta) { \ - prefix ## _type *arg = (prefix ## _type *) void_arg; \ -const prefix ## _type *delta = (const prefix ## _type *) void_delta; \ -const prefix ## _config_type *config = arg->config; \ -const int data_size = prefix ## _config_get_data_size(arg->config); \ -int i; \ -if (config != delta->config) { \ - fprintf(stderr,"%s:two object have different config objects - aborting \n",__func__);\ - abort(); \ -} \ -for (i=0; i < data_size; i++) \ - arg->data[i] += delta->data[i]; \ -} - -#define ADD_FUNC_SCALAR(prefix) void prefix ## _iadd(void *void_arg, const void * void_factor) { scalar_iadd( ((prefix ## _type *) void_arg)->scalar , (( const prefix ## _type *) void_factor)->scalar); } -#define ADD_FUNC_VOID_HEADER(prefix) void prefix ## _iadd(void * , const void *) -#define ADD_FUNC_HEADER(prefix) void prefix ## _iadd(prefix ## _type * , const prefix ## _type *) -/*****************************************************************/ - -#define MUL_ADD_FUNC(prefix) \ -void prefix ## _imul_add(void *void_arg , double scale_factor , const void *void_delta) { \ - prefix ## _type *arg = (prefix ## _type *) void_arg; \ -const prefix ## _type *delta = (const prefix ## _type *) void_delta; \ -const prefix ## _config_type *config = arg->config; \ -const int data_size = prefix ## _config_get_data_size(arg->config); \ -int i; \ -if (config != delta->config) { \ - fprintf(stderr,"%s:two object have different config objects - aborting \n",__func__);\ - abort(); \ -} \ -for (i=0; i < data_size; i++) \ - arg->data[i] += scale_factor * delta->data[i]; \ -} - -#define MUL_ADD_FUNC_SCALAR(prefix) void prefix ## _imul_add(void *void_arg, double scale_factor , const void * void_factor) { scalar_imul_add( ((prefix ## _type *) void_arg)->scalar , scale_factor , (( const prefix ## _type *) void_factor)->scalar); } -#define MUL_ADD_FUNC_VOID_HEADER(prefix) void prefix ## _imul_add(void * , double , const void *) -#define MUL_ADD_FUNC_HEADER(prefix) void prefix ## _imul_add(prefix ## _type* , double , const prefix ## _type *) - -/*****************************************************************/ - -#define SUB_FUNC(prefix) \ -void prefix ## _isub(void *void_arg , const void *void_diff) { \ - prefix ## _type *arg = (prefix ## _type *) void_arg; \ -const prefix ## _type *diff = (const prefix ## _type *) void_diff; \ -const prefix ## _config_type *config = arg->config; \ -const int data_size = prefix ## _config_get_data_size(arg->config); \ -int i; \ -if (config != diff->config) { \ - fprintf(stderr,"%s:two object have different config objects - aborting \n",__func__);\ - abort(); \ -} \ -for (i=0; i < data_size; i++) \ - arg->data[i] -= diff->data[i]; \ -} - -#define SUB_FUNC_SCALAR(prefix) void prefix ## _isub(void *void_arg, const void * void_factor) { scalar_isub( ((prefix ## _type *) void_arg)->scalar , (( const prefix ## _type *) void_factor)->scalar); } -#define SUB_FUNC_VOID_HEADER(prefix) void prefix ## _isub(void * , const void *) -#define SUB_FUNC_HEADER(prefix) void prefix ## _isub(prefix ## _type * , const prefix ## _type*) -/*****************************************************************/ - -#define MUL_FUNC(prefix) \ -void prefix ## _imul(void *void_arg , const void *void_factor) { \ - prefix ## _type *arg = (prefix ## _type *) void_arg; \ -const prefix ## _type *factor = (const prefix ## _type *) void_factor; \ -const prefix ## _config_type *config = arg->config; \ -const int data_size = prefix ## _config_get_data_size(arg->config); \ -int i; \ -if (config != factor->config) { \ - fprintf(stderr,"%s:two object have different config objects - aborting \n",__func__);\ - abort(); \ -} \ -for (i=0; i < data_size; i++) \ - arg->data[i] *= factor->data[i]; \ -} -#define MUL_FUNC_SCALAR(prefix) void prefix ## _imul(void *void_arg, const void * void_factor) { scalar_imul( ((prefix ## _type *) void_arg)->scalar , (( const prefix ## _type *) void_factor)->scalar); } -#define MUL_FUNC_VOID_HEADER(prefix) void prefix ## _imul(void * , const void *) -#define MUL_FUNC_HEADER(prefix) void prefix ## _imul(prefix ## _type * , const prefix ## _type*) - -/*****************************************************************/ - -#define ADDSQR_FUNC(prefix) \ -void prefix ## _iaddsqr(void *void_arg , const void *void_delta) { \ - prefix ## _type *arg = (prefix ## _type *) void_arg; \ -const prefix ## _type *delta = (const prefix ## _type *) void_delta; \ -const prefix ## _config_type *config = arg->config; \ -const int data_size = prefix ## _config_get_data_size(arg->config); \ -int i; \ -if (config != delta->config) { \ - fprintf(stderr,"%s:two object have different config objects - aborting \n",__func__);\ - abort(); \ -} \ -for (i=0; i < data_size; i++) \ - arg->data[i] += delta->data[i] * delta->data[i]; \ -} -#define ADDSQR_FUNC_SCALAR(prefix) void prefix ## _iaddsqr(void *void_arg, const void * void_factor) { scalar_iaddsqr( ((prefix ## _type *) void_arg)->scalar , (( const prefix ## _type *) void_factor)->scalar); } -#define ADDSQR_FUNC_VOID_HEADER(prefix) void prefix ## _iaddsqr(void * , const void *) -#define ADDSQR_FUNC_HEADER(prefix) void prefix ## _iaddsqr(prefix ## _type * , const prefix ## _type *) - - - -#define MATH_OPS(prefix) \ -SQR_FUNC (prefix) \ -SQRT_FUNC (prefix) \ -SCALE_FUNC (prefix) \ -ADD_FUNC (prefix) \ -ADDSQR_FUNC (prefix) \ -SUB_FUNC (prefix) \ -MUL_FUNC (prefix) \ -MUL_ADD_FUNC(prefix) - -#define MATH_OPS_SCALAR(prefix) \ -SQR_FUNC_SCALAR (prefix) \ -SQRT_FUNC_SCALAR (prefix) \ -SCALE_FUNC_SCALAR (prefix) \ -ADD_FUNC_SCALAR (prefix) \ -ADDSQR_FUNC_SCALAR (prefix) \ -SUB_FUNC_SCALAR (prefix) \ -MUL_FUNC_SCALAR (prefix) \ -MUL_ADD_FUNC_SCALAR(prefix) - - - -#define MATH_OPS_VOID_HEADER(prefix) \ -SQR_FUNC_VOID_HEADER (prefix); \ -SQRT_FUNC_VOID_HEADER (prefix); \ -SCALE_FUNC_VOID_HEADER (prefix); \ -ADD_FUNC_VOID_HEADER (prefix); \ -ADDSQR_FUNC_VOID_HEADER (prefix); \ -SUB_FUNC_VOID_HEADER (prefix); \ -MUL_FUNC_VOID_HEADER (prefix); \ -MUL_ADD_FUNC_VOID_HEADER(prefix) - -#define MATH_OPS_HEADER(prefix) \ -SQR_FUNC_HEADER (prefix); \ -SQRT_FUNC_HEADER (prefix); \ -SCALE_FUNC_HEADER (prefix); \ -ADD_FUNC_HEADER (prefix); \ -ADDSQR_FUNC_HEADER (prefix); \ -SUB_FUNC_HEADER (prefix); \ -MUL_FUNC_HEADER (prefix); \ -MUL_ADD_FUNC_HEADER(prefix) - -/*****************************************************************/ - -#define ENSEMBLE_MULX_VECTOR(prefix) \ -void prefix ## _ensemble_mulX_vector(prefix ## _type *new , int ens_size , const prefix ## _type ** prefix ## _ensemble , const double *X_vector) { \ - int iens; \ - prefix ## _clear(new); \ - for (iens=0; iens < ens_size; iens++) \ - prefix ## _imul_add(new , X_vector[iens] , prefix ## _ensemble[iens]);\ -} -#define ENSEMBLE_MULX_VECTOR_HEADER(prefix) void prefix ## _ensemble_mulX_vector(prefix ## _type *, int , const prefix ## _type ** , const double *); - - -#define ENSEMBLE_MULX_VECTOR_VOID(prefix) \ -void prefix ## _ensemble_mulX_vector__(void *new , int ens_size , const void ** prefix ## _ensemble , const double *X_vector) { \ - prefix ## _ensemble_mulX_vector((prefix ## _type *) new , ens_size , (const prefix ## _type **) prefix ## _ensemble , X_vector); \ -} - -#define ENSEMBLE_MULX_VECTOR_VOID_HEADER(prefix) void prefix ## _ensemble_mulX_vector__(void * , int , const void ** , const double *); - -/*****************************************************************/ - -#define ALLOC_STATS_SCALAR(prefix) \ -void prefix ## _alloc_stats(const prefix ## _type ** ensemble , int ens_size , prefix ## _type ** _mean , prefix ## _type ** _std) { \ - int iens; \ - prefix ## _type * mean = prefix ## _copyc(ensemble[0]); \ - prefix ## _type * std = prefix ## _copyc(ensemble[0]); \ - prefix ## _clear(mean); \ - prefix ## _clear(std); \ - for (iens = 0; iens < ens_size; iens++) { \ - prefix ## _output_transform(ensemble[iens]); \ - prefix ## _iadd(mean , ensemble[iens]); \ - prefix ## _iaddsqr(std , ensemble[iens]); \ - } \ - prefix ## _iscale(mean , 1.0 / ens_size); \ - prefix ## _iscale(std , 1.0 / ens_size); \ - { \ - prefix ## _type * tmp = prefix ## _copyc(mean); \ - prefix ## _isqr(tmp); \ - prefix ## _imul_add(std , -1.0 , tmp); \ - prefix ## _free(tmp); \ - } \ - prefix ## _isqrt(std); \ - *_mean = mean; \ - *_std = std; \ -} - - - - -#define ALLOC_STATS(prefix) \ -void prefix ## _alloc_stats(const prefix ## _type ** ensemble , int ens_size , prefix ## _type ** _mean , prefix ## _type ** _std) { \ - int iens; \ - prefix ## _type * mean = prefix ## _copyc(ensemble[0]); \ - prefix ## _type * std = prefix ## _copyc(ensemble[0]); \ - prefix ## _clear(mean); \ - prefix ## _clear(std); \ - for (iens = 0; iens < ens_size; iens++) { \ - prefix ## _iadd(mean , ensemble[iens]); \ - prefix ## _iaddsqr(std , ensemble[iens]); \ - } \ - prefix ## _iscale(mean , 1.0 / ens_size); \ - prefix ## _iscale(std , 1.0 / ens_size); \ - { \ - prefix ## _type * tmp = prefix ## _copyc(mean); \ - prefix ## _isqr(tmp); \ - prefix ## _imul_add(std , -1.0 , tmp); \ - prefix ## _free(tmp); \ - } \ - prefix ## _isqrt(std); \ - if (_mean != NULL) *_mean = mean; \ - if (_std != NULL) *_std = std; \ -} - - - -#define ALLOC_STATS_HEADER(prefix) void prefix ## _alloc_stats(const prefix ## _type ** , int , prefix ## _type ** , prefix ## _type ** ); -/*****************************************************************/ - - - -void enkf_util_truncate(void * , int , ecl_type_enum , void * , void *); -void enkf_util_rand_stdnormal_vector(int , double *, rng_type * rng); -double enkf_util_rand_normal(double , double , rng_type * rng); -void enkf_util_fwrite_target_type(FILE * , ert_impl_type); -void enkf_util_assert_buffer_type(buffer_type * buffer, ert_impl_type target_type); -void enkf_util_randperm( int * , int, rng_type * rng); - - //char * enkf_util_scanf_alloc_filename(const char * , int ); -void enkf_util_fprintf_data(const int * , const double ** , const char * , const char ** , int , int , const bool * , bool , FILE * stream); - -char * enkf_util_alloc_tagged_string(const char * ); -char * enkf_util_alloc_detagged_string( const char * tagged_string); -int enkf_util_compare_keys( const char * key1 , const char * key2 ); -int enkf_util_compare_keys__( const void * __key1 , const void * __key2 ); - -///* These #defines are used in the enkf_util_scanf_alloc_filename function. */ -//#define EXISTING_FILE 1 -//#define NEW_FILE 2 -//#define AUTO_MKDIR 4 - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/ensemble_config.h b/ThirdParty/Ert/libenkf/include/ert/enkf/ensemble_config.h deleted file mode 100644 index 332f0cac21..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/ensemble_config.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'ensemble_config.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_ENSEMBLE_CONFIG_H -#define ERT_ENSEMBLE_CONFIG_H -#ifdef __cplusplus -extern "C" { -#endif -#include - -#include -#include - -#include -#include - -#include -#include - -#include -#include -#include -#include -#include - - - -typedef struct ensemble_config_struct ensemble_config_type; - - void ensemble_config_set_refcase( ensemble_config_type * ensemble_config , const ecl_sum_type * refcase); - void ensemble_config_set_gen_kw_format( ensemble_config_type * ensemble_config , const char * gen_kw_format_string); - const char * ensemble_config_get_gen_kw_format( const ensemble_config_type * ensemble_config ); - enkf_config_node_type * ensemble_config_add_container( ensemble_config_type * ensemble_config , const char * key); - enkf_config_node_type * ensemble_config_add_surface( ensemble_config_type * ensemble_config , const char * key , bool forward_init); - - void ensemble_config_add_node( ensemble_config_type * ensemble_config , enkf_config_node_type * node); - enkf_config_node_type * ensemble_config_add_gen_data( ensemble_config_type * config , const char * key , bool dynamic , bool forward_init); - enkf_config_node_type * ensemble_config_add_summary(ensemble_config_type * ensemble_config , const char * key, load_fail_type load_fail); - enkf_config_node_type * ensemble_config_add_summary_observation(ensemble_config_type * ensemble_config , const char * key, load_fail_type load_fail); - enkf_config_node_type * ensemble_config_add_gen_kw( ensemble_config_type * config , const char * key , bool forward_init); - enkf_config_node_type * ensemble_config_add_custom_kw(ensemble_config_type * config, const char * key, const char * result_file, const char * output_file); - enkf_config_node_type * ensemble_config_add_defined_custom_kw(ensemble_config_type * config, const char * key, const hash_type * definition); - void ensemble_config_update_custom_kw_config(ensemble_config_type * config, custom_kw_config_set_type * config_set); - enkf_config_node_type * ensemble_config_add_field( ensemble_config_type * config , const char * key , ecl_grid_type * ecl_grid , bool forward_init); - int ensemble_config_get_observations( const ensemble_config_type * config , enkf_obs_type * enkf_obs , const char * user_key , int obs_count , - time_t * obs_time , double * y , double * std); - void ensemble_config_clear_obs_keys(ensemble_config_type * ensemble_config); - void ensemble_config_add_obs_key(ensemble_config_type * , const char * , const char * ); - const enkf_config_node_type * ensemble_config_user_get_node(const ensemble_config_type * , const char * , char **); - ert_impl_type ensemble_config_impl_type(const ensemble_config_type *, const char * ); - enkf_var_type ensemble_config_var_type(const ensemble_config_type *, const char * ); - void ensemble_config_init(ensemble_config_type * ensemble_config , const config_content_type * config , ecl_grid_type * grid , const ecl_sum_type * refcase); - void ensemble_config_free(ensemble_config_type * ); - bool ensemble_config_has_key(const ensemble_config_type * , const char * ); - bool ensemble_config_has_impl_type(const ensemble_config_type * config, const ert_impl_type impl_type); - bool ensemble_config_have_forward_init( const ensemble_config_type * ensemble_config ); - - void ensemble_config_del_node(ensemble_config_type * , const char * ); - void ensemble_config_add_config_items(config_parser_type * ); - - void ensemble_config_init_GEN_PARAM( ensemble_config_type * ensemble_config , const config_content_type * config ); - - enkf_config_node_type * ensemble_config_get_node(const ensemble_config_type * , const char * ); - enkf_config_node_type * ensemble_config_get_or_create_summary_node(ensemble_config_type * ensemble_config, const char * key); - stringlist_type * ensemble_config_alloc_keylist(const ensemble_config_type *); - stringlist_type * ensemble_config_alloc_keylist_from_var_type(const ensemble_config_type * , int var_mask); - stringlist_type * ensemble_config_alloc_keylist_from_impl_type(const ensemble_config_type *, ert_impl_type); - bool ensemble_config_iget_keep_runpath(const ensemble_config_type * , int ); - ensemble_config_type * ensemble_config_alloc( ); - void ensemble_config_fprintf_config( ensemble_config_type * ensemble_config , FILE * stream ); - const summary_key_matcher_type * ensemble_config_get_summary_key_matcher(const ensemble_config_type * ensemble_config); - int ensemble_config_get_size(const ensemble_config_type * ensemble_config ); - - - UTIL_IS_INSTANCE_HEADER( ensemble_config ); - UTIL_SAFE_CAST_HEADER( ensemble_config ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/ert_init_context.h b/ThirdParty/Ert/libenkf/include/ert/enkf/ert_init_context.h deleted file mode 100644 index 3160782d91..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/ert_init_context.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - Copyright (C) 2016 Statoil ASA, Norway. - - The file 'ert_init_context.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_INIT_CONTEXT_H -#define ERT_INIT_CONTEXT_H -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include - -#include -#include -#include - -typedef struct ert_init_context_struct ert_init_context_type; - - stringlist_type * ert_init_context_alloc_runpath_list(const bool_vector_type * iactive , path_fmt_type * runpath_fmt , subst_list_type * subst_list , int iter); - char * ert_init_context_alloc_runpath( int iens , path_fmt_type * runpath_fmt , subst_list_type * subst_list , int iter); - - ert_init_context_type * ert_init_context_alloc(enkf_fs_type * init_fs , const bool_vector_type * iactive , - path_fmt_type * runpath_fmt , - subst_list_type * subst_list , - init_mode_type init_mode , - int iter); - - void ert_init_context_free( ert_init_context_type * ); - int ert_init_context_get_size( const ert_init_context_type * context ); - init_mode_type ert_init_context_get_init_mode( const ert_init_context_type * context ); - bool_vector_type * ert_init_context_get_iactive( const ert_init_context_type * context ); - int ert_init_context_get_iter( const ert_init_context_type * context ); - run_arg_type * ert_init_context_iget_arg( const ert_init_context_type * context , int index); - run_arg_type * ert_init_context_iens_get_arg( const ert_init_context_type * context , int iens); - - - UTIL_IS_INSTANCE_HEADER( ert_init_context ); - - -#ifdef __cplusplus -} -#endif -#endif - - diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/ert_log.h b/ThirdParty/Ert/libenkf/include/ert/enkf/ert_log.h deleted file mode 100644 index f6819fd1bf..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/ert_log.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'ert_log.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERTLOG_H -#define ERTLOG_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include - -void ert_log_init_log(int log_level,const char * log_file_name, bool verbose); -void ert_log_add_fmt_message(int message_level , FILE * dup_stream , const char * fmt , ...); -void ert_log_add_message(int message_level , FILE * dup_stream , char* message, bool free_message); -void ert_log_add_message_py(int message_level, char* message); -void ert_log_close(); -bool ert_log_is_open(); -int ert_log_get_log_level(); -const char * ert_log_get_filename(); -log_type * ert_log_get_logh(); -void ert_log_open_empty(); - -#ifdef __cplusplus -} -#endif -#endif // ERTLOG_H diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/ert_run_context.h b/ThirdParty/Ert/libenkf/include/ert/enkf/ert_run_context.h deleted file mode 100644 index 7442c378db..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/ert_run_context.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'ert_run_context.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_RUN_CONTEXT_H -#define ERT_RUN_CONTEXT_H -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include - -#include -#include -#include - -typedef struct ert_run_context_struct ert_run_context_type; - - stringlist_type * ert_run_context_alloc_runpath_list(const bool_vector_type * iactive , path_fmt_type * runpath_fmt , subst_list_type * subst_list , int iter); - char * ert_run_context_alloc_runpath( int iens , path_fmt_type * runpath_fmt , subst_list_type * subst_list , int iter); - ert_run_context_type * ert_run_context_alloc_ENSEMBLE_EXPERIMENT(enkf_fs_type * fs , - bool_vector_type * iactive , - path_fmt_type * runpath_fmt , - subst_list_type * subst_list , - int iter); - - - ert_run_context_type * ert_run_context_alloc_SMOOTHER_RUN(enkf_fs_type * simulate_fs , enkf_fs_type * target_update_fs , - bool_vector_type * iactive , - path_fmt_type * runpath_fmt , - subst_list_type * subst_list , - int iter); - void ert_run_context_set_init_fs(ert_run_context_type * context, enkf_fs_type * init_fs); - void ert_run_context_set_result_fs(ert_run_context_type * context, enkf_fs_type * result_fs); - void ert_run_context_set_update_target_fs(ert_run_context_type * context, enkf_fs_type * update_target_fs); - - void ert_run_context_free( ert_run_context_type * ); - int ert_run_context_get_size( const ert_run_context_type * context ); - run_mode_type ert_run_context_get_mode( const ert_run_context_type * context ); - bool_vector_type * ert_run_context_get_iactive( const ert_run_context_type * context ); - int ert_run_context_get_iter( const ert_run_context_type * context ); - int ert_run_context_get_step1( const ert_run_context_type * context ); - int ert_run_context_get_step2( const ert_run_context_type * context ); - int ert_run_context_get_load_start( const ert_run_context_type * context ); - run_arg_type * ert_run_context_iget_arg( const ert_run_context_type * context , int index); - run_arg_type * ert_run_context_iens_get_arg( const ert_run_context_type * context , int iens); - void ert_run_context_deactivate_realization( ert_run_context_type * context , int iens); - - enkf_fs_type * ert_run_context_get_init_fs(const ert_run_context_type * run_context); - enkf_fs_type * ert_run_context_get_result_fs(const ert_run_context_type * run_context); - enkf_fs_type * ert_run_context_get_update_target_fs(const ert_run_context_type * run_context); - - UTIL_IS_INSTANCE_HEADER( ert_run_context ); - - -#ifdef __cplusplus -} -#endif -#endif - - diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/ert_template.h b/ThirdParty/Ert/libenkf/include/ert/enkf/ert_template.h deleted file mode 100644 index 3b2d4aeb91..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/ert_template.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'ert_template.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_TEMPLATE_H -#define ERT_TEMPLATE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include -#include - -typedef struct ert_template_struct ert_template_type; -typedef struct ert_templates_struct ert_templates_type; - - -stringlist_type * ert_templates_alloc_list( ert_templates_type * ert_templates); -ert_template_type * ert_template_alloc( const char * template_file , const char * target_file, subst_list_type * parent_subst) ; -void ert_template_free( ert_template_type * ert_tamplete ); -void ert_template_instantiate( ert_template_type * ert_template , const char * path , const subst_list_type * arg_list ); -void ert_template_add_arg( ert_template_type * ert_template , const char * key , const char * value ); -void ert_template_free__(void * arg); - -void ert_templates_clear( ert_templates_type * ert_templates ); -ert_template_type * ert_templates_get_template( ert_templates_type * ert_templates , const char * key); - -ert_templates_type * ert_templates_alloc(subst_list_type * parent_subst); -void ert_templates_free( ert_templates_type * ert_templates ); -ert_template_type * ert_templates_add_template( ert_templates_type * ert_templates , const char * key , const char * template_file , const char * target_file , const char * arg_string); -void ert_templates_instansiate( ert_templates_type * ert_templates , const char * path , const subst_list_type * arg_list); -void ert_templates_del_template( ert_templates_type * ert_templates , const char * key); - -const char * ert_template_get_template_file( const ert_template_type * ert_template); -const char * ert_template_get_target_file( const ert_template_type * ert_template); -const char * ert_template_get_args_as_string( const ert_template_type * ert_template ); -void ert_templates_fprintf_config( const ert_templates_type * ert_templates , FILE * stream ); -void ert_templates_init( ert_templates_type * templates , const config_content_type * config ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/ert_test_context.h b/ThirdParty/Ert/libenkf/include/ert/enkf/ert_test_context.h deleted file mode 100644 index 4dfacef55d..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/ert_test_context.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'ert_test_context.h' is part of ERT - Ensemble based - Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_TEST_CONTEXT_H -#define ERT_TEST_CONTEXT_H - -#include - -#include - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct ert_test_context_struct ert_test_context_type; - -void ert_test_context_set_store( ert_test_context_type * test_context , bool store); -ert_test_context_type * ert_test_context_alloc( const char * test_name , const char * model_config); -ert_test_context_type * ert_test_context_alloc_python( const char * test_name , const char * model_config); -void ert_test_context_free( ert_test_context_type * test_context ); -enkf_main_type * ert_test_context_get_main( ert_test_context_type * test_context ); -bool ert_test_context_install_workflow_job( ert_test_context_type * test_context , const char * job_name , const char * job_file); -bool ert_test_context_run_worklow_job( ert_test_context_type * test_context , const char * job_name, const stringlist_type * args); -void ert_test_context_fwrite_workflow_job( FILE * stream , const char * job_name , const stringlist_type * args); -bool ert_test_context_install_workflow( ert_test_context_type * test_context , const char * workflow_name , const char * workflow_file); -bool ert_test_context_run_worklow( ert_test_context_type * test_context , const char * workflow_name); -const char * ert_test_context_get_cwd( const ert_test_context_type * test_context ); - -UTIL_IS_INSTANCE_HEADER( ert_test_context ); - -#ifdef __cplusplus -} -#endif - -#endif - - diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/ert_workflow_list.h b/ThirdParty/Ert/libenkf/include/ert/enkf/ert_workflow_list.h deleted file mode 100644 index cc861a1b3f..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/ert_workflow_list.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'ert_workflow_list.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_WORKFLOW_LIST_H -#define ERT_WORKFLOW_LIST_H - - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include -#include -#include - -#include -#include - - - typedef struct ert_workflow_list_struct ert_workflow_list_type; - - workflow_type * ert_workflow_list_get_workflow(ert_workflow_list_type * workflow_list , const char * workflow_name ); - workflow_type * ert_workflow_list_add_workflow( ert_workflow_list_type * workflow_list , const char * workflow_file , const char * workflow_name); - void ert_workflow_list_free( ert_workflow_list_type * workflow_list ); - ert_workflow_list_type * ert_workflow_list_alloc( const subst_list_type * subst_list ); - void ert_workflow_list_add_jobs_in_directory( ert_workflow_list_type * workflow_list , const char * path ); - void ert_workflow_list_add_job( ert_workflow_list_type * workflow_list , const char * job_name , const char * config_file ); - bool ert_workflow_list_has_job( const ert_workflow_list_type * workflow_list , const char * job_name); - const workflow_job_type * ert_workflow_list_get_job( const ert_workflow_list_type * workflow_list , const char * job_name); - stringlist_type * ert_workflow_list_get_job_names(const ert_workflow_list_type * workflow_list); - void ert_workflow_list_add_alias( ert_workflow_list_type * workflow_list , const char * real_name , const char * alias); - void ert_workflow_list_add_config_items( config_parser_type * config ); - void ert_workflow_list_init( ert_workflow_list_type * workflow_list , config_content_type * config ); - bool ert_workflow_list_run_workflow(ert_workflow_list_type * workflow_list, const char * workflow_name , void * self); - bool ert_workflow_list_run_workflow__(ert_workflow_list_type * workflow_list, workflow_type * workflow, bool verbose , void * self); - bool ert_workflow_list_has_workflow(ert_workflow_list_type * workflow_list , const char * workflow_name ); - stringlist_type * ert_workflow_list_alloc_namelist( ert_workflow_list_type * workflow_list ); - const config_error_type * ert_workflow_list_get_last_error( const ert_workflow_list_type * workflow_list); - void ert_workflow_list_set_verbose( ert_workflow_list_type * workflow_list , bool verbose); - bool ert_workflow_list_run_workflow_blocking(ert_workflow_list_type * workflow_list , const char * workflow_name , void * self); - const subst_list_type * ert_workflow_list_get_context(const ert_workflow_list_type * workflow_list); - int ert_workflow_list_get_size( const ert_workflow_list_type * workflow_list); - - - UTIL_IS_INSTANCE_HEADER( ert_workflow_list ); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/field.h b/ThirdParty/Ert/libenkf/include/ert/enkf/field.h deleted file mode 100644 index c2d1c3c8bc..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/field.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'field.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_FIELD_H -#define ERT_FIELD_H -#ifdef __cplusplus -extern "C" { -#endif -#include - -#include -#include - -#include -#include -#include -#include -#include - -/* Typedef field_type moved to field_config.h */ - - void field_scale(field_type * field, double scale_factor); - int field_get_global_index(const field_type * , int , int , int ); - void field_ijk_set(field_type * , int , int , int , const void * ); - void field_indexed_set(field_type * field, ecl_type_enum , int , const int * , const void * ); - void field_indexed_add(field_type * field, ecl_type_enum , int , const int * , const void * ); - double field_iget_double(const field_type * , int ); - double field_ijk_get_double(const field_type * field, int , int , int ); - float field_iget_float(const field_type * , int ); - float field_ijk_get_float(const field_type * field, int , int , int ); - void field_ijk_get(const field_type * , int , int , int , void *); - bool field_ijk_valid(const field_type * , int , int , int ); - void field_ijk_get_if_valid(const field_type * , int , int , int , void * , bool *); - void field_ecl_write1D_fortio(const field_type * , fortio_type *); - void field_ecl_write3D_fortio(const field_type * , fortio_type *, const char *); - void field_ROFF_export(const field_type * , const char * , const char *); - void field_copy_ecl_kw_data(field_type * , const ecl_kw_type * ); - field_type * field_alloc_shared(const field_config_type * , void * , int ); - void field_free(field_type *); - void field_get_dims(const field_type *, int *, int *, int *); - bool field_fload_keep_inactive(field_type * field , const char * filename); - bool field_fload_auto(field_type * , const char * , bool); - bool field_fload_rms(field_type * field , const char * filename, bool keep_inactive); - void field_export3D(const field_type * , void *, bool, ecl_type_enum , void *, const char *); - void field_export(const field_type * , const char * , fortio_type * , field_file_format_type , bool, const char *); - field_type * field_copyc(const field_type *); - bool field_cmp(const field_type * , const field_type * ); - - double * field_indexed_get_alloc(const field_type *, int, const int *); - void field_inplace_output_transform(field_type * field); - - void field_iscale(field_type * , double ); - void field_isqrt(field_type *); - void field_isqr(field_type *); - void field_iaddsqr(field_type * , const field_type *); - void field_iadd(field_type * , const field_type *); - void field_imul_add(field_type * , double , const field_type *); - ecl_kw_type * field_alloc_ecl_kw_wrapper(const field_type * ); - void field_update_sum(field_type * sum , field_type * field , double lower_limit , double upper_limit); - void field_upgrade_103(const char * filename); - - UTIL_IS_INSTANCE_HEADER(field); - UTIL_SAFE_CAST_HEADER_CONST(field); - VOID_ALLOC_HEADER(field); - VOID_FREE_HEADER(field); - VOID_COPY_HEADER (field); - VOID_INITIALIZE_HEADER(field); - VOID_ECL_WRITE_HEADER (field); - VOID_FORWARD_LOAD_HEADER(field); - VOID_USER_GET_HEADER(field); - VOID_READ_FROM_BUFFER_HEADER(field); - VOID_WRITE_TO_BUFFER_HEADER(field); - VOID_SERIALIZE_HEADER(field); - VOID_DESERIALIZE_HEADER(field); - VOID_CLEAR_HEADER(field); - VOID_SET_INFLATION_HEADER(field); - VOID_IMUL_HEADER(field); - VOID_IADD_HEADER(field); - VOID_IADDSQR_HEADER(field); - VOID_SCALE_HEADER(field); - VOID_ISQRT_HEADER(field); - VOID_FLOAD_HEADER(field); - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/field_common.h b/ThirdParty/Ert/libenkf/include/ert/enkf/field_common.h deleted file mode 100644 index 5cac48ff7d..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/field_common.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'field_common.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_FIELD_COMMON_H -#define ERT_FIELD_COMMON_H - -/* - Contains some headers which both field.c and field_config.c need - - split like this to avoid circular dependencies. -*/ - - - -typedef struct field_config_struct field_config_type; -typedef struct field_struct field_type; - -field_type * field_alloc(const field_config_type * ); -bool field_fload(field_type * , const char * ); - - - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/field_config.h b/ThirdParty/Ert/libenkf/include/ert/enkf/field_config.h deleted file mode 100644 index 801ef97ca2..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/field_config.h +++ /dev/null @@ -1,202 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'field_config.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_FIELD_CONFIG_H -#define ERT_FIELD_CONFIG_H -#ifdef __cplusplus -extern "C" { -#endif -#include -#include - -#include -#include -#include - -#include -#include - -#include - -#include -#include -#include -#include -#include -#include - - -/** - This is purely a convenience structure used during initialization, - to denote which arguments are required and, which should be - defualted. - -*/ - -typedef enum { - ECLIPSE_RESTART = 1, - ECLIPSE_PARAMETER = 2, - GENERAL = 3 -} field_type_enum; - - -/** - The field_file_format_type denotes different ways to store a - field. Unfortunately the different elements in the enum definition - have somewhat different properties: - - - 1. ecl_kw_file is for input - either pack or unpacked. - - 2. ecl_kw_file_active_cells / ecl_kw_file_all_cells are for output. - - 3. Except for ecl_restart_file all formats are for A FILE (with a - filename), more or less assuming that this field is the only - content in the file, whereas ecl_restart_file is for a restart - block, and not a file. - - This has some slightly unlogical consequences: - - 1. The enum has 'file_format' in the name, but ecl_restart_file - is not a file. - - 2. The functions which guess/determine a file type can not return - all possible values of the enum. - - 3. Treatment is not symmetric for input/output. - -*/ - - - - -typedef enum { UNDEFINED_FORMAT = 0, - RMS_ROFF_FILE = 1, - ECL_KW_FILE = 2, /* ecl_kw format either packed (i.e. active cells) *or* all cells - used when reading from file. */ - ECL_KW_FILE_ACTIVE_CELLS = 3, /* ecl_kw format, only active cells - used writing to file. */ - ECL_KW_FILE_ALL_CELLS = 4, /* ecl_kw_format, all cells - used when writing to file. */ - ECL_GRDECL_FILE = 5, - ECL_FILE = 6, /* Assumes packed on export. */ - FILE_FORMAT_NULL = 7} field_file_format_type; /* Used when the guess functions are given NULL to check -should never be read. */ - - -/* active_cells currently not really implemented */ - - - - - -void field_config_update_state_field( field_config_type * config, int truncation, double min_value , double max_value); - - -void field_config_update_parameter_field( field_config_type * config , int truncation, double min_value , double max_value, - field_file_format_type export_format , - const char * init_transform , const char * output_transform ); - - -void field_config_update_general_field( field_config_type * config , int truncation, double min_value , double max_value, - field_file_format_type export_format , /* This can be guessed with the field_config_default_export_format( ecl_file ) function. */ - const char * init_transform , - const char * input_transform , - const char * output_transform ); - - -field_config_type * field_config_alloc_empty( const char * ecl_kw_name , ecl_grid_type * ecl_grid , field_trans_table_type * trans_table, bool global_size ); - - -void field_config_get_ijk( const field_config_type * config , int active_index , int *i , int * j , int * k); -field_type * field_config_get_min_std( const field_config_type * field_config ); -const char * field_config_default_extension(field_file_format_type , bool ); -bool field_config_write_compressed(const field_config_type * ); -field_file_format_type field_config_guess_file_type(const char * ); -field_file_format_type field_config_manual_file_type(const char * , bool); -ecl_type_enum field_config_get_ecl_type(const field_config_type * ); -rms_type_enum field_config_get_rms_type(const field_config_type * ); -void field_config_get_dims(const field_config_type * , int * , int * , int *); -int field_config_get_nx(const field_config_type * config ); -int field_config_get_ny(const field_config_type * config ); -int field_config_get_nz(const field_config_type * config ); -void field_config_free(field_config_type *); -int field_config_get_volume(const field_config_type * ); -int field_config_get_data_size_from_grid(const field_config_type * config); -void field_config_set_ecl_kw_name(field_config_type * , const char * ); -void field_config_set_ecl_type(field_config_type * , ecl_type_enum ); -void field_config_set_eclfile(field_config_type * , const char * ); -const bool * field_config_get_iactive(const field_config_type * ); -int field_config_get_byte_size(const field_config_type * ); -int field_config_get_sizeof_ctype(const field_config_type * ); -int field_config_active_index(const field_config_type * , int , int , int ); -int field_config_global_index(const field_config_type * , int , int , int ); -void field_config_get_ijk(const field_config_type * , int , int * , int * , int *); -bool field_config_ijk_valid(const field_config_type * , int , int , int ); -bool field_config_ijk_active(const field_config_type * config , int i , int j , int k); -bool field_config_active_cell(const field_config_type * , int , int , int); -char * field_config_alloc_init_file(const field_config_type * , int ); -field_file_format_type field_config_get_export_format(const field_config_type * ); -field_file_format_type field_config_get_import_format(const field_config_type * ); -void field_config_set_all_active(field_config_type * ); -void field_config_set_key(field_config_type * , const char *); -void field_config_enkf_OFF(field_config_type * ); -bool field_config_enkf_mode(const field_config_type * config); -void field_config_scanf_ijk(const field_config_type * , bool , const char * , int , int * , int * , int * , int *); -const char * field_config_get_key(const field_config_type * ); -bool field_config_keep_inactive_cells(const field_config_type *); -field_func_type * field_config_get_init_transform(const field_config_type * ); -field_func_type * field_config_get_output_transform(const field_config_type * ); -field_func_type * field_config_get_input_transform(const field_config_type * ); - //void field_config_set_output_transform(field_config_type * config , field_func_type * ); -bool field_config_is_valid( const field_config_type * field_config ); -void field_config_assert_binary( const field_config_type * , const field_config_type * , const char * ); -void field_config_assert_unary( const field_config_type * , const char * ); -void field_config_activate(field_config_type * , active_mode_type , void * ); - -const char * field_config_get_init_transform_name( const field_config_type * field_config ); -const char * field_config_get_input_transform_name( const field_config_type * field_config ); -const char * field_config_get_output_transform_name( const field_config_type * field_config ); - -void field_config_set_truncation(field_config_type * , int , double , double ); -int field_config_get_truncation_mode(const field_config_type * config ); -double field_config_get_truncation_min( const field_config_type * config ); -double field_config_get_truncation_max( const field_config_type * config ); -ecl_grid_type * field_config_get_grid(const field_config_type * ); -const char * field_config_get_grid_name( const field_config_type * ); - - int field_config_parse_user_key(const field_config_type * config, const char * index_key , int *i , int *j , int *k); - bool field_config_parse_user_key__( const char * index_key , int *i , int *j , int *k); - -field_file_format_type field_config_default_export_format(const char * filename); -const char * field_config_get_input_transform_name( const field_config_type * field_config ) ; -const char * field_config_get_output_transform_name( const field_config_type * field_config ) ; -const char * field_config_get_init_transform_name( const field_config_type * field_config ) ; - -void field_config_fprintf_config( const field_config_type * config , enkf_var_type var_type , const char * outfile , const char * infile , - const char * min_std_file , FILE * stream); - - - -/*Generated headers */ - UTIL_IS_INSTANCE_HEADER(field_config); -UTIL_SAFE_CAST_HEADER(field_config); -UTIL_SAFE_CAST_HEADER_CONST(field_config); -CONFIG_GET_ECL_KW_NAME_HEADER(field); -VOID_FREE_HEADER(field_config); -VOID_GET_DATA_SIZE_HEADER(field); -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/field_trans.h b/ThirdParty/Ert/libenkf/include/ert/enkf/field_trans.h deleted file mode 100644 index c235edc1ae..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/field_trans.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'field_trans.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_FIELD_TRANS_H -#define ERT_FIELD_TRANS_H -#ifdef __cplusplus -extern "C" { -#endif -#include -#include - - -typedef float (field_func_type) ( float ); -typedef struct field_trans_table_struct field_trans_table_type; - - -void field_trans_table_fprintf(const field_trans_table_type * , FILE * ); -void field_trans_table_free(field_trans_table_type * ); -void field_trans_table_add(field_trans_table_type * , const char * , const char * , field_func_type * ); -field_trans_table_type * field_trans_table_alloc(); -bool field_trans_table_has_key(field_trans_table_type * , const char * ); -field_func_type * field_trans_table_lookup(field_trans_table_type * , const char * ); - - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/forward_load_context.h b/ThirdParty/Ert/libenkf/include/ert/enkf/forward_load_context.h deleted file mode 100644 index 991c06917f..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/forward_load_context.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - Copyright (C) 2016 Statoil ASA, Norway. - - The file 'forward_load_context.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_FORWARD_LOAD_CONTEXT_H -#define ERT_FORWARD_LOAD_CONTEXT_H - -#ifdef __cplusplus -extern "C" { -#endif -#include -#include - -#include -#include - -#include -#include -#include - - typedef struct forward_load_context_struct forward_load_context_type; - - bool forward_load_context_accept_messages( const forward_load_context_type * load_context ); - void forward_load_context_add_message( forward_load_context_type * load_context , const char * message ); - void forward_load_context_update_result( forward_load_context_type * load_context , int flags); - int forward_load_context_get_result( const forward_load_context_type * load_context ); - forward_load_context_type * forward_load_context_alloc( const run_arg_type * run_arg , bool load_summary , const ecl_config_type * ecl_config , const char * eclbase, stringlist_type * messages); - void forward_load_context_free( forward_load_context_type * load_context ); - const ecl_sum_type * forward_load_context_get_ecl_sum( const forward_load_context_type * load_context); - const ecl_file_type * forward_load_context_get_restart_file( const forward_load_context_type * load_context); - int forward_load_context_get_report_step( const forward_load_context_type * load_context); - int forward_load_context_get_iens( const forward_load_context_type * load_context); - const run_arg_type * forward_load_context_get_run_arg( const forward_load_context_type * load_context ); - const char * forward_load_context_get_run_path( const forward_load_context_type * load_context ); - int forward_load_context_get_load_step(const forward_load_context_type * load_context); - enkf_fs_type * forward_load_context_get_result_fs( const forward_load_context_type * load_context ); - bool forward_load_context_load_restart_file( forward_load_context_type * load_context , int report_step ); - void forward_load_context_select_step( forward_load_context_type * load_context , int report_step); - - UTIL_IS_INSTANCE_HEADER( forward_load_context ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/fs_driver.h b/ThirdParty/Ert/libenkf/include/ert/enkf/fs_driver.h deleted file mode 100644 index 28f1bfc359..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/fs_driver.h +++ /dev/null @@ -1,241 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'fs_driver.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_FS_DRIVER_H -#define ERT_FS_DRIVER_H -#ifdef __cplusplus -extern "C" { -#endif -#include -#include - -#include -#include - -#define FS_MAGIC_ID 123998L -#define FSTAB_FILE "ert_fstab" -#define CURRENT_FS_VERSION 107 -#define MIN_SUPPORTED_FS_VERSION 105 - -/** - Version history: - - 0 : - - - File system version | First svn version | Last svn version - -------------------------------------------------------------------------- - 100 | | 1799 - 101 | 1810 | 1886 - 102 | 1887/1902 | 1996 - 103 | 1997 | - | 2047: sqlite added | 2125 - 104 | 2127 | - | 2140: block_fs_index added - | 2190: started to distribute ert binary internally - 105 | 3918 | - 106 | Git ~ Desember 2015 - 107 | Git ~ September 2017 - ------------------------------------------------------------------------- - - - Version: 100 - ------------ - First version with subdirectories for different cases. - - - - Version: 101 - ------------ - Have changed the format for storing static keywords. Instead of a - directory with numbered files in them, the keywords get an integer - appended: - - INTEHEAD/0 ==> INTEHEAD_0 - - The actual changing of keyword is done in the function - __realloc_static_kw() in enkf_state.c. - - - - Version: 102 - ------------ - Have removed the type spesific plain drivers, now it is only - plain_driver and plain_driver index. The special functionality for - parameters/static/dynamic is now implemented at the enkf_fs level. - The upgrade from 101 only involves the mount info and the - implementation, the actual stored files are not touched by this - upgrade. - - - - Version: 103 - ------------ - Have changed the reading/writing to go through the buffer - type. This should simplify introducing other drivers than the - simple plain file based driver. - - The upgrade to version is 103 is quite extensive - all node types - have specific _103_ functions. The xxx_fread() and xxx_fwrite() - functions were removed in svn:2046. - - A very experimental version of the sqlite driver was added in - svn:2047. When (if ??) this stabilizes it should probably lead to - an upgrade to version 104. - - At the very last checkin of this version the fs prototypes also - changed to use (const enkf_config_node_type *) instances instead of - (const char * ) for the main key. - - - - Version: 104 - ------------ - In this version the treatment of read_xx and write_xx drivers has - changed. There are no longer separate read_xx and write_xx drivers, - instead the drivers have internal state which differentiates - between read and write. - - The block_fs driver is added - and reasonably stabilized in this - version. - - - Observe that all the upgrade functions were removed at svn:3305. - - - Version 104B - ------------ - Vector storage; each case is a seperate enkf_fs instance. Current - is stored with a symlink. Read about 104 -> 104B fuckup in the - function upgrade104B() in fs_driver.c - - - Version: 105 - ------------ - Using time_map to store time information; common to all members in - ensemble. - - - Version: 106 - ------------ - - Dropped drivers for storing STATIC eclipse keywords. The upgrade - from version 105 to 106 happens silently; the only thing happening - is that the information about the static driver is ignored when - reading the mount map. An older version of ert - with - CURRENT_VERSION == 105 can also read a VERSION == 106 filesystem - with a minor backport and some default heuristics. - - - Version: 107 - ------------ - - Using UTC instead of localtime throughout the code. This implies - that the timemaps written to disk with old versions have time_t - values corresponding to localtime, whereas everything now is - expected to be in utc. - - If we detect a filesystem with version below 107 we stop the - program. If a refcase is supplied the user is given a suggested - commandline to perform an inplace upgrade. -*/ - - - - - typedef struct fs_driver_struct fs_driver_type; - - typedef void (save_kwlist_ftype) (void * , int , int , buffer_type * buffer); /* Functions used to load/store restart_kw_list instances. */ - typedef void (load_kwlist_ftype) (void * , int , int , buffer_type * buffer); - - typedef void (load_node_ftype) (void * driver, const char * , int , int , buffer_type * ); - typedef void (save_node_ftype) (void * driver, const char * , int , int , buffer_type * ); - typedef void (unlink_node_ftype) (void * driver, const char * , int , int ); - typedef bool (has_node_ftype) (void * driver, const char * , int , int ); - - typedef void (load_vector_ftype) (void * driver, const char * , int , buffer_type * ); - typedef void (save_vector_ftype) (void * driver, const char * , int , buffer_type * ); - typedef void (unlink_vector_ftype) (void * driver, const char * , int ); - typedef bool (has_vector_ftype) (void * driver, const char * , int ); - - typedef void (fsync_driver_ftype) (void * driver); - typedef void (free_driver_ftype) (void * driver); - - -/** - The fs_driver_type contains a number of function pointers - and a type_id used for run-time cast checking. - - The fs_driver_type is never actually used, but the point is that - all drivers must implement the fs driver "interface". In practice - this is done by including the macro FS_DRIVER_FIELDS *at the start* - of the definition of another driver, i.e. the simplest actually - working driver, the plain_driver is implemented like this: - - struct plain_driver_struct { - FS_DRIVER_FIELDS - int plain_driver_id; - path_fmt_type * path; - } - - -*/ - - - -#define FS_DRIVER_FIELDS \ -load_node_ftype * load_node; \ -save_node_ftype * save_node; \ -has_node_ftype * has_node; \ -unlink_node_ftype * unlink_node; \ -load_vector_ftype * load_vector; \ -save_vector_ftype * save_vector; \ -has_vector_ftype * has_vector; \ -unlink_vector_ftype * unlink_vector; \ -free_driver_ftype * free_driver; \ -fsync_driver_ftype * fsync_driver; \ -int type_id - - - - -struct fs_driver_struct { - FS_DRIVER_FIELDS; -}; - - - - /*****************************************************************/ - - void fs_driver_init(fs_driver_type * ); - void fs_driver_assert_cast(const fs_driver_type * ); - fs_driver_type * fs_driver_safe_cast(void * ); - - void fs_driver_init_fstab( FILE * stream, fs_driver_impl driver_id ); - char * fs_driver_alloc_fstab_file( const char * path ); - FILE * fs_driver_open_fstab( const char * path , bool create); - fs_driver_impl fs_driver_fread_type( FILE * stream ); - void fs_driver_assert_magic( FILE * stream ); - void fs_driver_assert_version( FILE * stream , const char * mount_point); - int fs_driver_fread_version( FILE * stream ); - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/fs_types.h b/ThirdParty/Ert/libenkf/include/ert/enkf/fs_types.h deleted file mode 100644 index 7f34d0519f..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/fs_types.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'fs_types.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_FS_TYPES_H -#define ERT_FS_TYPES_H - - - -/* - The various driver implementations - this goes on disk all over the - place, and the numbers should be considered SET IN STONE. When a new - driver is added the switch statement in the enkf_fs_mount() function - must be updated. -*/ - -// Version from ~ svn:3720 -//typedef enum { -// INVALID_DRIVER_ID = 0, -// PLAIN_DRIVER_INDEX_ID = 1001, -// PLAIN_DRIVER_STATIC_ID = 1002, /* Depreceated */ -// PLAIN_DRIVER_DYNAMIC_ID = 1003, /* Depreceated */ -// PLAIN_DRIVER_PARAMETER_ID = 1004, /* Depreceated */ -// PLAIN_DRIVER_ID = 1005, -// BLOCK_FS_DRIVER_ID = 3001, -// BLOCK_FS_DRIVER_INDEX_ID = 3002 } fs_driver_impl; - - -typedef enum { - INVALID_DRIVER_ID = 0, - PLAIN_DRIVER_ID = 1005, - BLOCK_FS_DRIVER_ID = 3001} fs_driver_impl; - - - - - - -/* - The categories of drivers. To reduce the risk of programming - error (or at least to detect it ...), there should be no overlap - between these ID's and the ID's of the actual implementations - above. The same comment about permanent storage applies to these - numbers as well. -*/ - -typedef enum { - DRIVER_PARAMETER = 1, - DRIVER_STATIC = 2, // Driver static is no longer in use since December 2015 - but it must be retained here for old mount files on disk. - DRIVER_INDEX = 4, // DRIVER_DYNAMIC = 3; removed at svn ~ 3720. - DRIVER_DYNAMIC_FORECAST = 5, - DRIVER_DYNAMIC_ANALYZED = 6 // Driver DYNAMIC_ANALYZED is no longer in use since April 2016 - but it must be retained here for old mount files on disk. -} fs_driver_enum; - - - - - -fs_driver_impl fs_types_lookup_string_name(const char * driver_name); -const char * fs_types_get_driver_name(fs_driver_enum driver_type); -bool fs_types_valid( fs_driver_enum driver_type); - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/gen_common.h b/ThirdParty/Ert/libenkf/include/ert/enkf/gen_common.h deleted file mode 100644 index 906310391c..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/gen_common.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'gen_common.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_GEN_COMMON_H -#define ERT_GEN_COMMON_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include - -void * gen_common_fscanf_alloc(const char * , ecl_type_enum , int * ); -void * gen_common_fread_alloc(const char * , ecl_type_enum , int * ); -void * gen_common_fload_alloc(const char * , gen_data_file_format_type , ecl_type_enum , ecl_type_enum * , int * ); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/gen_data.h b/ThirdParty/Ert/libenkf/include/ert/enkf/gen_data.h deleted file mode 100644 index ff9ff3a5fe..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/gen_data.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'gen_data.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_GEN_DATA_H -#define ERT_GEN_DATA_H -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include - -void gen_data_assert_size( gen_data_type * gen_data , int size , int report_step); -bool gen_data_forward_load(gen_data_type * gen_data , const char * ecl_file , const forward_load_context_type * load_context); -void gen_data_free(gen_data_type * ); -double gen_data_iget_double(const gen_data_type * , int ); -gen_data_config_type * gen_data_get_config(const gen_data_type * ); -const bool_vector_type * gen_data_get_forward_mask( const gen_data_type * gen_data ); -int gen_data_get_size(const gen_data_type * ); -double gen_data_iget_double(const gen_data_type * , int ); -void gen_data_export(const gen_data_type * gen_data , const char * full_path , gen_data_file_format_type export_type , fortio_type * fortio); -void gen_data_export_data(const gen_data_type * gen_data , double_vector_type * export_data); -gen_data_file_format_type gen_data_guess_export_type( const gen_data_type * gen_data ); -const char * gen_data_get_key( const gen_data_type * gen_data); -void gen_data_upgrade_103(const char * filename); -int gen_data_get_size( const gen_data_type * gen_data ); -void gen_data_copy_to_double_vector(const gen_data_type * gen_data , double_vector_type * vector); -bool gen_data_fload_with_report_step( gen_data_type * gen_data , const char * filename , const forward_load_context_type * load_context); - -UTIL_SAFE_CAST_HEADER(gen_data); -UTIL_SAFE_CAST_HEADER_CONST(gen_data); -VOID_USER_GET_HEADER(gen_data); -VOID_ALLOC_HEADER(gen_data); -VOID_FREE_HEADER(gen_data); -VOID_COPY_HEADER (gen_data); -VOID_ECL_WRITE_HEADER(gen_data); -VOID_FORWARD_LOAD_HEADER(gen_data); -VOID_INITIALIZE_HEADER(gen_data); -VOID_READ_FROM_BUFFER_HEADER(gen_data); -VOID_WRITE_TO_BUFFER_HEADER(gen_data); -VOID_SERIALIZE_HEADER(gen_data) -VOID_DESERIALIZE_HEADER(gen_data) -VOID_SET_INFLATION_HEADER(gen_data); -VOID_CLEAR_HEADER(gen_data); -VOID_IMUL_HEADER(gen_data); -VOID_IADD_HEADER(gen_data); -VOID_IADDSQR_HEADER(gen_data); -VOID_SCALE_HEADER(gen_data); -VOID_ISQRT_HEADER(gen_data); -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/gen_data_common.h b/ThirdParty/Ert/libenkf/include/ert/enkf/gen_data_common.h deleted file mode 100644 index 4668c25bde..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/gen_data_common.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'gen_data_common.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_GEN_DATA_COMMON_H -#define ERT_GEN_DATA_COMMON_H - -/* - Contains some headers which both gen_data.c and gen_data_config.c need - - split like this to avoid circular dependencies. -*/ - - -typedef struct gen_data_config_struct gen_data_config_type; -typedef struct gen_data_struct gen_data_type; - -gen_data_type * gen_data_alloc(const gen_data_config_type * ); -bool gen_data_fload(gen_data_type * , const char * ); - - - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/gen_data_config.h b/ThirdParty/Ert/libenkf/include/ert/enkf/gen_data_config.h deleted file mode 100644 index 2ef3e1e955..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/gen_data_config.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'gen_data_config.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_GEN_DATA_CONFIG_H -#define ERT_GEN_DATA_CONFIG_H -#ifdef __cplusplus -extern "C" { -#endif -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - -typedef enum { GEN_DATA_UNDEFINED = 0, - ASCII = 1, /* The file is ASCII file with a vector of numbers formatted with "%g". */ - ASCII_TEMPLATE = 2, /* The data is inserted into a user defined template file. */ - BINARY_DOUBLE = 3, /* The data is in a binary file with doubles. */ - BINARY_FLOAT = 4} /* The data is in a binary file with floats. */ - gen_data_file_format_type; - - bool gen_data_config_is_dynamic( const gen_data_config_type * config ); - void gen_data_config_load_active( gen_data_config_type * config , enkf_fs_type * fs, int report_step , bool force_load); - bool gen_data_config_valid_result_format(const char * result_file_fmt); - bool gen_data_config_set_template( gen_data_config_type * config , const char * template_ecl_file , const char * template_data_key ); - - bool gen_data_config_has_active_mask( const gen_data_config_type * config , enkf_fs_type * fs , int report_step); - - /* - Observe that the format ASCII_template can *NOT* be used for - loading files. - */ - gen_data_config_type * gen_data_config_alloc_GEN_PARAM( const char * key , gen_data_file_format_type output_format , gen_data_file_format_type input_format); - gen_data_config_type * gen_data_config_alloc_GEN_DATA_result( const char * key , gen_data_file_format_type input_format); - gen_data_config_type * gen_data_config_alloc_GEN_DATA_state( const char * key , gen_data_file_format_type output_format , gen_data_file_format_type input_format); - void gen_data_config_set_ens_size( gen_data_config_type * config , int ens_size ); - gen_data_file_format_type gen_data_config_get_input_format ( const gen_data_config_type * ); - gen_data_file_format_type gen_data_config_get_output_format ( const gen_data_config_type * ); - ecl_type_enum gen_data_config_get_internal_type(const gen_data_config_type * ); - gen_data_config_type * gen_data_config_alloc_with_options(const char * key , bool , const stringlist_type *); - void gen_data_config_free(gen_data_config_type * ); - int gen_data_config_get_initial_size( const gen_data_config_type * config ); - void gen_data_config_assert_size(gen_data_config_type * , int , int); - const bool_vector_type * gen_data_config_get_active_mask( const gen_data_config_type * config ); - void gen_data_config_update_active(gen_data_config_type * config , const forward_load_context_type * load_context , const bool_vector_type * data_mask); - const bool * gen_data_config_get_iactive(const gen_data_config_type * ); - void gen_data_config_ecl_write(const gen_data_config_type * , const char * , char * ); - void gen_data_config_get_template_data( const gen_data_config_type * , char ** , int * , int * , int *); - gen_data_config_type * gen_data_config_fscanf_alloc(const char * ); - const char * gen_data_config_get_key( const gen_data_config_type * config); - int gen_data_config_get_byte_size( const gen_data_config_type * config , int report_step); - int gen_data_config_get_data_size( const gen_data_config_type * config , int report_step); - gen_data_file_format_type gen_data_config_check_format( const void * format_string ); - - void gen_data_config_set_active_report_steps_from_string( gen_data_config_type *config , const char * range_string); - const int_vector_type * gen_data_config_get_active_report_steps( const gen_data_config_type *config); - int gen_data_config_iget_report_step( const gen_data_config_type *config , int index); - void gen_data_config_add_report_step( gen_data_config_type * config , int report_step); - bool gen_data_config_has_report_step( const gen_data_config_type * config , int report_step); - int gen_data_config_num_report_step( const gen_data_config_type * config ); - const char * gen_data_config_get_template_file( const gen_data_config_type * config ); - const char * gen_data_config_get_template_key( const gen_data_config_type * config ); - void gen_data_config_fprintf_config( const gen_data_config_type * config , enkf_var_type var_type , const char * outfile , const char * infile , - const char * min_std_file , FILE * stream); - - UTIL_IS_INSTANCE_HEADER(gen_data_config); - UTIL_SAFE_CAST_HEADER(gen_data_config); - UTIL_SAFE_CAST_HEADER_CONST(gen_data_config); - VOID_FREE_HEADER(gen_data_config) - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/gen_kw.h b/ThirdParty/Ert/libenkf/include/ert/enkf/gen_kw.h deleted file mode 100644 index 92911a7a6a..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/gen_kw.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'gen_kw.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_GEN_KW_H -#define ERT_GEN_KW_H -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include -#include -#include -#include -#include - - - -void gen_kw_output_transform(gen_kw_type * ); -void gen_kw_get_output_data(const gen_kw_type * , double * ); -const double * gen_kw_get_output_ref(const gen_kw_type * ); -const double * gen_kw_get_data_ref(const gen_kw_type * ); - //void gen_kw_get_data(const gen_kw_type * , double * ); - -void gen_kw_free(gen_kw_type *); -int gen_kw_data_size( gen_kw_type * ); -double gen_kw_data_iget( gen_kw_type * , int , bool ); -void gen_kw_data_iset( gen_kw_type * , int , double ); -void gen_kw_data_set_vector( gen_kw_type * gen_kw, const double_vector_type * values ); -double gen_kw_data_get( gen_kw_type * , const char * , bool ); -void gen_kw_data_set( gen_kw_type *, const char *, double ); -bool gen_kw_data_has_key( gen_kw_type *, const char *); -void gen_kw_ens_write(const gen_kw_type * , const char *); -void gen_kw_ens_read(gen_kw_type * , const char *); -void gen_kw_truncate(gen_kw_type * ); -gen_kw_type * gen_kw_alloc_mean(int , const gen_kw_type **); -const char * gen_kw_get_name(const gen_kw_type * , int ); -void gen_kw_filter_file(const gen_kw_type * , const char * ); -void gen_kw_export(const gen_kw_type * , int * , char ***, double **); -void gen_kw_upgrade_103( const char * filename ); -char * gen_kw_alloc_user_key(const gen_kw_config_type * , const char * , int ); -void gen_kw_set_subst_parent(gen_kw_type * gen_kw , const subst_list_type * parent_subst); -void gen_kw_ecl_write_template(const gen_kw_type * gen_kw , const char * file_name); - - -UTIL_SAFE_CAST_HEADER(gen_kw); -UTIL_SAFE_CAST_HEADER_CONST(gen_kw); -ALLOC_STATS_HEADER(gen_kw) -VOID_ECL_WRITE_HEADER (gen_kw) -VOID_COPY_HEADER (gen_kw); -VOID_INITIALIZE_HEADER(gen_kw); -VOID_FREE_HEADER (gen_kw); - //MATH_OPS_VOID_HEADER(gen_kw); -VOID_ALLOC_HEADER(gen_kw); -VOID_ECL_WRITE_HEADER(gen_kw); -VOID_USER_GET_HEADER(gen_kw); -VOID_WRITE_TO_BUFFER_HEADER(gen_kw); -VOID_READ_FROM_BUFFER_HEADER(gen_kw); -VOID_FLOAD_HEADER(gen_kw); -VOID_CLEAR_HEADER(gen_kw); -VOID_SERIALIZE_HEADER(gen_kw) -VOID_DESERIALIZE_HEADER(gen_kw) -VOID_IADD_HEADER(gen_kw); -VOID_IMUL_HEADER(gen_kw); -VOID_SCALE_HEADER(gen_kw); -VOID_IADDSQR_HEADER(gen_kw); -VOID_ISQRT_HEADER(gen_kw); -VOID_SET_INFLATION_HEADER(gen_kw); -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/gen_kw_common.h b/ThirdParty/Ert/libenkf/include/ert/enkf/gen_kw_common.h deleted file mode 100644 index f9a7db39f4..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/gen_kw_common.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'gen_kw_common.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_GEN_KW_COMMON_H -#define ERT_GEN_KW_COMMON_H - -/* - Contains some headers which both gen_kw.c and gen_kw_config.c need - - split like this to avoid circular dependencies. -*/ - - -typedef struct gen_kw_config_struct gen_kw_config_type; -typedef struct gen_kw_struct gen_kw_type; - -gen_kw_type * gen_kw_alloc(const gen_kw_config_type * ); -bool gen_kw_fload(gen_kw_type * , const char *); - - - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/gen_kw_config.h b/ThirdParty/Ert/libenkf/include/ert/enkf/gen_kw_config.h deleted file mode 100644 index d8a55f73b5..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/gen_kw_config.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'gen_kw_config.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_GEN_KW_CONFIG_H -#define ERT_GEN_KW_CONFIG_H -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include -#include - -#include -#include -#include - - -bool gen_kw_config_is_valid( const gen_kw_config_type * config ); -void gen_kw_config_fprintf_config( const gen_kw_config_type * config , const char * outfile , const char * min_std_file , FILE * stream ); -void gen_kw_config_set_parameter_file( gen_kw_config_type * config , const char * parameter_file ); -const char * gen_kw_config_get_parameter_file( const gen_kw_config_type * config ); -char * gen_kw_config_alloc_initfile( const gen_kw_config_type * gen_kw_config , int iens ); -void gen_kw_config_set_init_file_fmt( gen_kw_config_type * config , const char * init_file_fmt ); -const char * gen_kw_config_get_key(const gen_kw_config_type * config ); -const char * gen_kw_config_get_template_file(const gen_kw_config_type * ); -void gen_kw_config_free(gen_kw_config_type *); -double gen_kw_config_transform(const gen_kw_config_type * , int index, double x); -bool gen_kw_config_should_use_log_scale(const gen_kw_config_type * config, int index); -int gen_kw_config_get_data_size(const gen_kw_config_type * ); -const char * gen_kw_config_iget_name(const gen_kw_config_type * , int ); -const char * gen_kw_config_get_tagged_name(const gen_kw_config_type * , int ); -stringlist_type * gen_kw_config_alloc_name_list( const gen_kw_config_type * config); -int gen_kw_config_get_index(const gen_kw_config_type * , const char * ); -char * gen_kw_config_alloc_user_key(const gen_kw_config_type * config , int kw_nr); -const char * gen_kw_config_get_init_file_fmt( const gen_kw_config_type * config ); -void gen_kw_config_set_template_file( gen_kw_config_type * config , const char * template_file ); -gen_kw_config_type * gen_kw_config_alloc_empty( const char * key , const char * tag_fmt ); -void gen_kw_config_update( gen_kw_config_type * config , const char * template_file , const char * parameter_file); -void gen_kw_config_update_tag_format(gen_kw_config_type * config , const char * tag_format); - -UTIL_SAFE_CAST_HEADER_CONST( gen_kw_config ); -UTIL_SAFE_CAST_HEADER(gen_kw_config); -VOID_FREE_HEADER(gen_kw_config); -VOID_GET_DATA_SIZE_HEADER(gen_kw); -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/gen_obs.h b/ThirdParty/Ert/libenkf/include/ert/enkf/gen_obs.h deleted file mode 100644 index a4a11d6608..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/gen_obs.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'gen_obs.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_GEN_OBS_H -#define ERT_GEN_OBS_H - -#include -#include -#include -#include -#include - -typedef struct gen_obs_struct gen_obs_type; - -gen_obs_type * gen_obs_alloc(gen_data_config_type * config , const char * obs_key , const char * , double , double , const char * , const char * , const char * ); -void gen_obs_user_get_with_data_index(const gen_obs_type * gen_obs , const char * index_key , double * value , double * std , bool * valid); - -void gen_obs_update_std_scale(gen_obs_type * gen_obs, double std_multiplier , const active_list_type * active_list); -int gen_obs_get_size(const gen_obs_type * gen_obs); -double gen_obs_iget_std(const gen_obs_type * gen_obs, int index); -double gen_obs_iget_value(const gen_obs_type * gen_obs, int index); -double gen_obs_iget_std_scaling(const gen_obs_type * gen_obs, int index); -int gen_obs_get_obs_index(const gen_obs_type * gen_obs, int index); -void gen_obs_load_observation(gen_obs_type * gen_obs, const char * obs_file); -void gen_obs_set_scalar( gen_obs_type * gen_obs , double scalar_value , double scalar_std); -void gen_obs_attach_data_index( gen_obs_type * gen_obs , const int_vector_type * data_index ); -void gen_obs_load_data_index( gen_obs_type * obs , const char * data_index_file); -void gen_obs_parse_data_index( gen_obs_type * obs , const char * data_index_string); - - - - -VOID_CHI2_HEADER(gen_obs); -UTIL_IS_INSTANCE_HEADER(gen_obs); -VOID_FREE_HEADER(gen_obs); -VOID_GET_OBS_HEADER(gen_obs); -VOID_MEASURE_HEADER(gen_obs); -VOID_USER_GET_OBS_HEADER(gen_obs); -VOID_UPDATE_STD_SCALE_HEADER(gen_obs); - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/hook_manager.h b/ThirdParty/Ert/libenkf/include/ert/enkf/hook_manager.h deleted file mode 100644 index 81e910f11a..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/hook_manager.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'hook_manager.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#ifndef ERT_HOOK_MANAGER_H -#define ERT_HOOK_MANAGER_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include -#include -#include - - typedef struct hook_manager_struct hook_manager_type; - - hook_manager_type * hook_manager_alloc(ert_workflow_list_type * workflow_list); - void hook_manager_free(); - - void hook_manager_init( hook_manager_type * hook_manager , const config_content_type * config); - void hook_manager_add_config_items( config_parser_type * config ); - - runpath_list_type * hook_manager_get_runpath_list( hook_manager_type * hook_manager ); - void hook_manager_export_runpath_list( const hook_manager_type * hook_manager ); - void hook_manager_set_runpath_list_file( hook_manager_type * hook_manager , const char * path, const char * filename); - const char * hook_manager_get_runpath_list_file(const hook_manager_type * hook_manager); - void hook_manager_run_workflows( const hook_manager_type * hook_manager , hook_run_mode_enum run_mode , void * self); - - const hook_workflow_type * hook_manager_iget_hook_workflow(const hook_manager_type * hook_manager, int index); - int hook_manager_get_size(const hook_manager_type * hook_manager); - - /*****************************************************************/ - /* Deprecated stuff */ - /*****************************************************************/ - bool hook_manager_run_post_hook_workflow( const hook_manager_type * hook_manager , void * self); - - void hook_manager_set_path( hook_manager_type * hook_manager , const char * path); - bool hook_manager_has_post_hook_workflow( const hook_manager_type * hook_manager ); - const hook_workflow_type * hook_manager_get_post_hook_workflow( const hook_manager_type * hook_manager ); - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/hook_workflow.h b/ThirdParty/Ert/libenkf/include/ert/enkf/hook_workflow.h deleted file mode 100644 index 9ff642583e..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/hook_workflow.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA, Norway. - - The file 'hook_workflow.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#ifndef ERT_HOOK_WORKFLOW_H -#define ERT_HOOK_WORKFLOW_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include - -#include - - - typedef enum {PRE_SIMULATION = 0, - POST_SIMULATION = 1} hook_run_mode_enum; - - typedef struct hook_workflow_struct hook_workflow_type; - - - hook_workflow_type * hook_workflow_alloc( workflow_type * workflow , hook_run_mode_enum run_mode); - void hook_workflow_free(hook_workflow_type * hook_workflow); - void hook_workflow_free__( void * arg ); - - - workflow_type * hook_workflow_get_workflow( const hook_workflow_type * hook_workflow ); - bool hook_workflow_run_workflow(const hook_workflow_type * hook_workflow, ert_workflow_list_type * workflow_list, void * self); - hook_run_mode_enum hook_workflow_get_run_mode( const hook_workflow_type * hook_workflow ); - - hook_run_mode_enum hook_workflow_run_mode_from_name( const char * run_mode ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/local_config.h b/ThirdParty/Ert/libenkf/include/ert/enkf/local_config.h deleted file mode 100644 index 25f73c9e56..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/local_config.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'local_config.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_LOCAL_CONFIG_H -#define ERT_LOCAL_CONFIG_H - -#include - -#include - -#include - -#include -#include -#include -#include - - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct local_config_struct local_config_type; - -local_config_type * local_config_alloc( ); -void local_config_clear( local_config_type * local_config ); -void local_config_free( local_config_type * local_config ); -local_ministep_type * local_config_alloc_ministep( local_config_type * local_config , const char * key, analysis_module_type* analysis_module ); -local_ministep_type * local_config_alloc_ministep_copy( local_config_type * local_config , const char * src_key , const char * new_key); -void local_config_set_default_updatestep( local_config_type * local_config , local_updatestep_type * update_step ); -local_updatestep_type * local_config_get_updatestep( const local_config_type * local_config ); -local_ministep_type * local_config_get_ministep( const local_config_type * local_config , const char * key); -void local_config_set_updatestep(local_config_type * local_config, int step1 , int step2 , const char * key); -void local_config_summary_fprintf( const local_config_type * local_config , const char * config_file); -local_obsdata_type * local_config_alloc_obsdata( local_config_type * local_config , const char * obsdata_name ); -bool local_config_has_obsdata( const local_config_type * local_config , const char * obsdata_name); -local_dataset_type * local_config_alloc_dataset( local_config_type * local_config , const char * key ); -bool local_config_has_dataset( const local_config_type * local_config , const char * key); -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/local_context.h b/ThirdParty/Ert/libenkf/include/ert/enkf/local_context.h deleted file mode 100644 index 7bc72b3a30..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/local_context.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'local_context.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#ifndef ERT_LOCAL_CONTEXT_H -#define ERT_LOCAL_CONTEXT_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include -#include -#include - -#include -#include -#include - -#define GLOBAL_GRID "GLOBAL_GRID" - - typedef struct local_context_struct local_context_type; - - - local_context_type * local_context_alloc( const ecl_grid_type * ecl_grid ); - void local_context_free( local_context_type * context ); - - ecl_region_type * local_context_get_ecl_region( local_context_type * context , const char * region_name); - void local_context_create_ecl_region( local_context_type * context , const char * grid_name , const char * region_name , bool preselect ); - - void local_context_load_file( local_context_type * context , const char * filename , const char * file_key ); - ecl_file_type * local_context_get_file( local_context_type * context , const char * file_key ); - - void local_context_add_polygon( local_context_type * context , const char * polygon_name); - geo_polygon_type * local_context_get_polygon( local_context_type * context , const char * polygon_name ); - void local_context_load_polygon( local_context_type * context , const char * polygon_name , const char * polygon_file); - - void local_context_load_surface( local_context_type * context , const char * surface_name , const char * surface_file); - geo_surface_type * local_context_get_surface( local_context_type * context , const char * surface_name ); - - void local_context_create_surface_region( local_context_type * context , const char * surface_name , const char * region_name , bool preselect ); - geo_region_type * local_context_get_surface_region( local_context_type * context , const char * region_name); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/local_dataset.h b/ThirdParty/Ert/libenkf/include/ert/enkf/local_dataset.h deleted file mode 100644 index c7dd92fc6a..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/local_dataset.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'local_dataset.h' is part of ERT - Ensemble based - Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_LOCAL_DATASET_H -#define ERT_LOCAL_DATASET_H - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct local_dataset_struct local_dataset_type; - -local_dataset_type * local_dataset_alloc_copy( local_dataset_type * src_dataset , const char * copy_name ); -local_dataset_type * local_dataset_alloc( const char * name ); -void local_dataset_free( local_dataset_type * dataset ); -void local_dataset_free__( void * arg ); -void local_dataset_add_node(local_dataset_type * dataset, const char *node_key); -void local_dataset_del_node( local_dataset_type * dataset , const char * node_key); -void local_dataset_clear( local_dataset_type * dataset); -const char * local_dataset_get_name( const local_dataset_type * dataset); -void local_dataset_fprintf( const local_dataset_type * dataset , FILE * stream); -void local_dataset_summary_fprintf( const local_dataset_type * dataset , FILE * stream); -active_list_type * local_dataset_get_node_active_list(const local_dataset_type * dataset , const char * node_key ); -stringlist_type * local_dataset_alloc_keys( const local_dataset_type * dataset ); -int local_dataset_get_size( const local_dataset_type * dataset ); -void local_dataset_del_node( local_dataset_type * dataset , const char * node_key); -void local_dataset_clear( local_dataset_type * dataset); -bool local_dataset_has_key(const local_dataset_type * dataset, const char * key); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/local_ministep.h b/ThirdParty/Ert/libenkf/include/ert/enkf/local_ministep.h deleted file mode 100644 index cedad78346..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/local_ministep.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'local_ministep.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_LOCAL_MINISTEP_H -#define ERT_LOCAL_MINISTEP_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include - -#include -#include -#include -#include - -typedef struct local_ministep_struct local_ministep_type; - -local_ministep_type * local_ministep_alloc(const char * name, analysis_module_type* analysis_module); -void local_ministep_free(local_ministep_type * ministep); -void local_ministep_free__(void * arg); -void local_ministep_add_obs(local_ministep_type * ministep, const char * obs_key); -active_list_type * local_ministep_get_node_active_list(const local_ministep_type * ministep , const char * node_key ); -hash_iter_type * local_ministep_alloc_dataset_iter( const local_ministep_type * ministep ); -stringlist_type * local_ministep_alloc_data_keys( const local_ministep_type * ministep ); -bool local_ministep_has_data_key(const local_ministep_type * ministep , const char * key); -local_ministep_type * local_ministep_alloc_copy( const local_ministep_type * src , const char * name); -void local_ministep_del_obs( local_ministep_type * ministep , const char * obs_key); -void local_ministep_del_node( local_ministep_type * ministep , const char * node_key); -const char * local_ministep_get_name( const local_ministep_type * ministep ); -void local_ministep_clear_nodes( local_ministep_type * ministep); -void local_ministep_clear_observations( local_ministep_type * ministep); -void local_ministep_fprintf( const local_ministep_type * ministep , FILE * stream ); -void local_ministep_summary_fprintf( const local_ministep_type * ministep , FILE * stream); -void local_ministep_add_dataset( local_ministep_type * ministep , const local_dataset_type * dataset); -void local_ministep_add_obsdata( local_ministep_type * ministep , local_obsdata_type * obsdata); -void local_ministep_add_obsdata_node( local_ministep_type * ministep , local_obsdata_node_type * obsdatanode); -local_obsdata_type * local_ministep_get_obsdata(const local_ministep_type * ministep); -local_dataset_type * local_ministep_get_dataset( const local_ministep_type * ministep, const char * dataset_name); -bool local_ministep_has_dataset( const local_ministep_type * ministep, const char * dataset_name); -int local_ministep_get_num_dataset( const local_ministep_type * ministep ); -bool local_ministep_has_analysis_module( const local_ministep_type * ministep ); -analysis_module_type* local_ministep_get_analysis_module( const local_ministep_type * ministep ); - -UTIL_SAFE_CAST_HEADER(local_ministep); -UTIL_IS_INSTANCE_HEADER(local_ministep); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/local_obsdata.h b/ThirdParty/Ert/libenkf/include/ert/enkf/local_obsdata.h deleted file mode 100644 index 9517d513f0..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/local_obsdata.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'local_obsdata.h' - - ERT 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. - - ERT 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 - for more details. -*/ -#ifndef ERT_LOCAL_OBSDATA_H -#define ERT_LOCAL_OBSDATA_H - -#ifdef __cplusplus -extern "C" { -#endif -#include - -#include - -#include - -typedef struct local_obsdata_struct local_obsdata_type; - - void local_obsdata_free__( void * arg); - bool local_obsdata_has_node( const local_obsdata_type * data , const char * key); - local_obsdata_type * local_obsdata_alloc_copy( const local_obsdata_type * src, const char * target_key); - local_obsdata_type * local_obsdata_alloc( const char * name ); - void local_obsdata_free( local_obsdata_type * data ); - int local_obsdata_get_size( const local_obsdata_type * data ); - bool local_obsdata_add_node( local_obsdata_type * data , local_obsdata_node_type * node ); - local_obsdata_node_type * local_obsdata_iget( const local_obsdata_type * data , int index); - local_obsdata_type * local_obsdata_alloc_wrapper( local_obsdata_node_type * node ); - const char * local_obsdata_get_name( const local_obsdata_type * data); - local_obsdata_node_type * local_obsdata_get( const local_obsdata_type * data , const char * key); - void local_obsdata_clear( local_obsdata_type * data ); - void local_obsdata_del_node( local_obsdata_type * data , const char * key); - void local_obsdata_reset_tstep_list( local_obsdata_type * data , const int_vector_type * step_list); - active_list_type * local_obsdata_get_node_active_list(const local_obsdata_type * obsdata , const char * obs_key ); - void local_obsdata_fprintf( const local_obsdata_type * obsdata , FILE * stream ); - void local_obsdata_summary_fprintf( const local_obsdata_type * obsdata , FILE * stream); - -UTIL_IS_INSTANCE_HEADER( local_obsdata ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/local_obsdata_node.h b/ThirdParty/Ert/libenkf/include/ert/enkf/local_obsdata_node.h deleted file mode 100644 index ab1bd33c19..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/local_obsdata_node.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'local_obsdata_node.h' - - ERT 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. - - ERT 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 - for more details. -*/ -#ifndef ERT_LOCAL_OBSDATA_NODE_H -#define ERT_LOCAL_OBSDATA_NODE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include - - - typedef struct local_obsdata_node_struct local_obsdata_node_type; - - local_obsdata_node_type * local_obsdata_node_alloc( const char * obs_key , bool all_timestep_active ); - local_obsdata_node_type * local_obsdata_node_alloc_copy( const local_obsdata_node_type * src); - const char * local_obsdata_node_get_key( const local_obsdata_node_type * node ); - void local_obsdata_node_free( local_obsdata_node_type * node ); - void local_obsdata_node_free__( void * arg ); - active_list_type * local_obsdata_node_get_active_list( const local_obsdata_node_type * node ); - void local_obsdata_node_copy_active_list( local_obsdata_node_type * node , const active_list_type * active_list); - void local_obsdata_node_add_tstep( local_obsdata_node_type * node, int tstep); - void local_obsdata_node_add_range( local_obsdata_node_type * node, int step1, int step2); - - bool local_obsdata_node_tstep_active( const local_obsdata_node_type * node , int tstep ); - bool local_obsdata_node_all_timestep_active( const local_obsdata_node_type * node); - bool local_obsdata_node_has_tstep( const local_obsdata_node_type * node , int tstep); - void local_obsdata_node_reset_tstep_list( local_obsdata_node_type * node , const int_vector_type * step_list); - void local_obsdata_node_set_all_timestep_active( local_obsdata_node_type * node, bool flag); - - UTIL_IS_INSTANCE_HEADER( local_obsdata_node ); - UTIL_SAFE_CAST_HEADER( local_obsdata_node ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/local_updatestep.h b/ThirdParty/Ert/libenkf/include/ert/enkf/local_updatestep.h deleted file mode 100644 index a56de59c75..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/local_updatestep.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'local_updatestep.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_LOCAL_UPDATESTEP_H -#define ERT_LOCAL_UPDATESTEP_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -typedef struct local_updatestep_struct local_updatestep_type; - -local_updatestep_type * local_updatestep_alloc( const char * name ); -void local_updatestep_free__(void * arg); -void local_updatestep_add_ministep( local_updatestep_type * updatestep , local_ministep_type * ministep); -local_ministep_type * local_updatestep_iget_ministep( const local_updatestep_type * updatestep , int index); -local_obsdata_type * local_updatestep_iget_obsdata( const local_updatestep_type * updatestep , int index); -int local_updatestep_get_num_ministep( const local_updatestep_type * updatestep ); -local_updatestep_type * local_updatestep_alloc_copy( const local_updatestep_type * src , const char * name ); -void local_updatestep_fprintf( const local_updatestep_type * updatestep , FILE * stream); -const char * local_updatestep_get_name( const local_updatestep_type * updatestep ); -bool local_updatestep_has_data_key( const local_updatestep_type * update_step , const char * key); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/meas_data.h b/ThirdParty/Ert/libenkf/include/ert/enkf/meas_data.h deleted file mode 100644 index 9a7e12b234..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/meas_data.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'meas_data.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_MEAS_DATA_H -#define ERT_MEAS_DATA_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include -#include -#include -#include - -typedef struct meas_data_struct meas_data_type; -typedef struct meas_block_struct meas_block_type; - -UTIL_IS_INSTANCE_HEADER( meas_data ); -UTIL_SAFE_CAST_HEADER( meas_block ); - -bool meas_block_iens_active( const meas_block_type * meas_block , int iens); -void meas_block_iset( meas_block_type * meas_block , int iens , int iobs , double value); -double meas_block_iget( const meas_block_type * meas_block , int iens , int iobs); -double meas_block_iget_ens_mean( meas_block_type * meas_block , int iobs ); -double meas_block_iget_ens_std( meas_block_type * meas_block , int iobs); -void meas_block_deactivate( meas_block_type * meas_block , int iobs ); -bool meas_block_iget_active( const meas_block_type * meas_block , int iobs); -void meas_data_fprintf( const meas_data_type * matrix , FILE * stream); - -void meas_data_reset(meas_data_type * ); - meas_data_type * meas_data_alloc( const bool_vector_type * ens_mask); -void meas_data_free(meas_data_type * ); -void meas_data_add(meas_data_type * , int , double ); -matrix_type * meas_data_allocS(const meas_data_type * matrix); -int meas_data_get_active_obs_size( const meas_data_type * matrix ); -void meas_data_deactivate(meas_data_type * meas_data, int index); -int meas_data_get_active_ens_size( const meas_data_type * meas_data ); -int meas_data_get_nrobs( const meas_data_type * meas_data ); -meas_block_type * meas_data_add_block( meas_data_type * matrix , const char * obs_key , int report_step , int obs_size); -int meas_data_get_num_blocks( const meas_data_type * meas_block ); -meas_block_type * meas_data_iget_block( const meas_data_type * matrix , int block_mnr); -const meas_block_type * meas_data_iget_block_const( const meas_data_type * matrix , int block_nr ); -int meas_block_get_total_obs_size( const meas_block_type * meas_block ); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/member_config.h b/ThirdParty/Ert/libenkf/include/ert/enkf/member_config.h deleted file mode 100644 index 64386e99d2..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/member_config.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'member_config.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_MEMBER_CONFIG_H -#define ERT_MEMBER_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include - -#include - -#include -#include -#include -#include - - - -typedef struct member_config_struct member_config_type; - - const char * member_config_get_jobname( const member_config_type * member_config ); - void member_config_set_keep_runpath(member_config_type * member_config , keep_runpath_type keep_runpath); - keep_runpath_type member_config_get_keep_runpath(const member_config_type * member_config); - int member_config_get_iens( const member_config_type * member_config ); - const char * member_config_update_jobname(member_config_type * member_config , const char * jobname_fmt , const subst_list_type * subst_list); - const char * member_config_update_eclbase(member_config_type * member_config , const ecl_config_type * ecl_config , const subst_list_type * subst_list); - void member_config_free(member_config_type * member_config) ; - const char * member_config_get_eclbase( const member_config_type * member_config ); - const char * member_config_get_casename( const member_config_type * member_config ); - - bool member_config_pre_clear_runpath(const member_config_type * member_config); - void member_config_set_pre_clear_runpath(member_config_type * member_config , bool pre_clear_runpath); - - - member_config_type * member_config_alloc(int iens , - const char * casename , - bool pre_clear_runpath , - keep_runpath_type keep_runpath , - const ecl_config_type * ecl_config , - const ensemble_config_type * ensemble_config); - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/misfit_ensemble.h b/ThirdParty/Ert/libenkf/include/ert/enkf/misfit_ensemble.h deleted file mode 100644 index e6ed2ebcd0..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/misfit_ensemble.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'misfit_table.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_MISFIT_ENSEMBLE_H -#define ERT_MISFIT_ENSEMBLE_H - -#include - - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include - -#define MISFIT_DEFAULT_RANKING_KEY "DEFAULT" -#include - - - - void misfit_ensemble_fread( misfit_ensemble_type * misfit_ensemble , FILE * stream ); - void misfit_ensemble_clear( misfit_ensemble_type * table); - misfit_ensemble_type * misfit_ensemble_alloc( ); - void misfit_ensemble_free( misfit_ensemble_type * table ); - void misfit_ensemble_fwrite( const misfit_ensemble_type * misfit_ensemble , FILE * stream); - bool misfit_ensemble_initialized( const misfit_ensemble_type * misfit_ensemble ); - - void misfit_ensemble_initialize( misfit_ensemble_type * misfit_ensemble , - const ensemble_config_type * ensemble_config , - const enkf_obs_type * enkf_obs , - enkf_fs_type * fs , - int ens_size , - int history_length, - bool force_init); - - void misfit_ensemble_set_ens_size( misfit_ensemble_type * misfit_ensemble , int ens_size); - int misfit_ensemble_get_ens_size( const misfit_ensemble_type * misfit_ensemble ); - - misfit_member_type * misfit_ensemble_iget_member( const misfit_ensemble_type * table , int iens); - - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/misfit_ensemble_typedef.h b/ThirdParty/Ert/libenkf/include/ert/enkf/misfit_ensemble_typedef.h deleted file mode 100644 index 2c5adff7bf..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/misfit_ensemble_typedef.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef ERT_MISFIT_ENSEMBLE_TYPEDEF_H -#define ERT_MISFIT_ENSEMBLE_TYPEDEF_H - -typedef struct misfit_ensemble_struct misfit_ensemble_type; - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/misfit_member.h b/ThirdParty/Ert/libenkf/include/ert/enkf/misfit_member.h deleted file mode 100644 index 72d11ec372..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/misfit_member.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'misfit_member.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_MISFIT_MEMBER_H -#define ERT_MISFIT_MEMBER_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include - - typedef struct misfit_member_struct misfit_member_type; - misfit_ts_type * misfit_member_get_ts( const misfit_member_type * member , const char * obs_key ); - bool misfit_member_has_ts( const misfit_member_type * member , const char * obs_key ); - misfit_member_type * misfit_member_fread_alloc( FILE * stream ); - void misfit_member_fwrite( const misfit_member_type * node , FILE * stream ); - void misfit_member_update( misfit_member_type * node , const char * obs_key , int history_length , int iens , const double ** work_chi2); - void misfit_member_free__( void * node ); - misfit_member_type * misfit_member_alloc(int iens); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/misfit_ranking.h b/ThirdParty/Ert/libenkf/include/ert/enkf/misfit_ranking.h deleted file mode 100644 index 447ddfed3e..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/misfit_ranking.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'misfit_ranking.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_MISFIT_RANKING_H -#define ERT_MISFIT_RANKING_H - -#include -#include -#include - -#include -#include -#include - - -#ifdef __cplusplus -extern "C" { -#endif - - typedef struct misfit_ranking_struct misfit_ranking_type; - - UTIL_IS_INSTANCE_HEADER( misfit_ranking ); - UTIL_SAFE_CAST_HEADER( misfit_ranking ); - - void misfit_ranking_fprintf( const misfit_ranking_type * misfit_ranking , const char * filename); - void misfit_ranking_display( const misfit_ranking_type * misfit_ranking , FILE * stream); - misfit_ranking_type * misfit_ranking_alloc(const misfit_ensemble_type * ensemble , const stringlist_type * sort_keys , const int_vector_type * steps, const char * ranking_key); - void misfit_ranking_free( misfit_ranking_type * misfit_ranking ); - void misfit_ranking_free__( void * arg ); - const perm_vector_type * misfit_ranking_get_permutation( const misfit_ranking_type * misfit_ranking ); - void misfit_ranking_iset_invalid( misfit_ranking_type * misfit_ranking , int iens ); - void misfit_ranking_iset( misfit_ranking_type * misfit_ranking , int iens , hash_type * obs_hash , double total_misfit); - void misfit_ranking_init_sort( misfit_ranking_type * misfit_ranking ); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/misfit_ts.h b/ThirdParty/Ert/libenkf/include/ert/enkf/misfit_ts.h deleted file mode 100644 index ad3994045a..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/misfit_ts.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'misfit_ts.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#ifndef ERT_MISFIT_TS_H -#define ERT_MISFIT_TS_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - - typedef struct misfit_ts_struct misfit_ts_type; - - - void misfit_ts_fwrite( const misfit_ts_type * misfit_ts , FILE * stream ); - double misfit_ts_eval( const misfit_ts_type * ts , const int_vector_type * steps ); - misfit_ts_type * misfit_ts_alloc(int history_length); - misfit_ts_type * misfit_ts_fread_alloc( FILE * stream ); - void misfit_ts_free__( void * vector ); - void misfit_ts_iset( misfit_ts_type * vector , int time_index , double value ); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/model_config.h b/ThirdParty/Ert/libenkf/include/ert/enkf/model_config.h deleted file mode 100644 index 6f07abb516..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/model_config.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'model_config.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_MODEL_CONFIG_H -#define ERT_MODEL_CONFIG_H -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include -#include - -#include -#include - -#include -#include - -#include -#include - -#include - -#include -#include -#include - - typedef struct model_config_struct model_config_type; - - const char * model_config_get_jobname_fmt( const model_config_type * model_config ); - void model_config_set_jobname_fmt( model_config_type * model_config , const char * jobname_fmt); - const char * model_config_get_case_table_file( const model_config_type * model_config ); - void model_config_set_case_table( model_config_type * model_config , int ens_size , const char * case_table_file ); - void model_config_set_enspath( model_config_type * model_config , const char * enspath); - void model_config_set_rftpath( model_config_type * model_config , const char * rftpath); - void model_config_set_dbase_type( model_config_type * model_config , const char * dbase_type_string); - void * model_config_get_dbase_args( const model_config_type * model_config ); - const char * model_config_get_enspath( const model_config_type * model_config); - const char * model_config_get_rftpath( const model_config_type * model_config); - fs_driver_impl model_config_get_dbase_type(const model_config_type * model_config ); - const ecl_sum_type * model_config_get_refcase( const model_config_type * model_config ); - void model_config_init_internalization( model_config_type * ); - void model_config_set_internalize_state( model_config_type * , int ); - void model_config_set_load_state( model_config_type * , int ); - int model_config_get_history_length(const model_config_type * ); - bool model_config_has_prediction(const model_config_type * ); - bool model_config_has_history(const model_config_type * config); - int model_config_get_last_history_restart(const model_config_type * ); - time_map_type * model_config_get_external_time_map( const model_config_type * config); - void model_config_init(model_config_type * model_config , const config_content_type * , int ens_size , const ext_joblist_type * , int , const sched_file_type * , const ecl_sum_type * refcase); - void model_config_free(model_config_type *); - bool model_config_runpath_requires_iter( const model_config_type * model_config ); - path_fmt_type * model_config_get_runpath_fmt(const model_config_type * ); - history_type * model_config_get_history(const model_config_type * ); - forward_model_type * model_config_get_forward_model( const model_config_type * ); - bool model_config_internalize_state( const model_config_type *, int ); - bool model_config_load_state( const model_config_type *, int ); - const char * model_config_iget_casename( const model_config_type * model_config , int index); - //void model_config_set_max_resample( model_config_type * model_config , int max_resample ); - //int model_config_get_max_resample(const model_config_type * model_config ); - void model_config_set_max_internal_submit(model_config_type * config, int max_resample); - int model_config_get_max_internal_submit( const model_config_type * config ); - bool model_config_select_runpath( model_config_type * model_config , const char * path_key); - void model_config_add_runpath( model_config_type * model_config , const char * path_key , const char * fmt ); - const char * model_config_get_runpath_as_char( const model_config_type * model_config ); - history_source_type model_config_get_history_source( const model_config_type * model_config ); - void model_config_set_refcase( model_config_type * model_config , const ecl_sum_type * refcase ); - void model_config_fprintf_config( const model_config_type * model_config , int ens_size ,FILE * stream ); - model_config_type * model_config_alloc(); - bool model_config_select_history( model_config_type * model_config , history_source_type source_type, const sched_file_type * schede_file , const ecl_sum_type * refcase); - void model_config_set_runpath(model_config_type * model_config , const char * fmt); - void model_config_set_gen_kw_export_file( model_config_type * model_config, const char * file_name); - const char * model_config_get_gen_kw_export_file( const model_config_type * model_config); - - UTIL_IS_INSTANCE_HEADER( model_config); - -#ifdef __cplusplus -} -#endif -#endif - - diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/obs_data.h b/ThirdParty/Ert/libenkf/include/ert/enkf/obs_data.h deleted file mode 100644 index 7d250fc2ef..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/obs_data.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'obs_data.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_OBS_DATA_H -#define ERT_OBS_DATA_H -#ifdef __cplusplus -extern "C" { -#endif -#include -#include - -#include -#include -#include - -#include -#include - -typedef struct obs_data_struct obs_data_type; -typedef struct obs_block_struct obs_block_type; - -active_type obs_block_iget_active_mode( const obs_block_type * obs_block , int iobs); -const char * obs_data_iget_keyword( const obs_data_type * obs_data , int index ); -double obs_data_iget_value( const obs_data_type * obs_data , int index ); -double obs_data_iget_std( const obs_data_type * obs_data , int index ); -active_type obs_data_iget_active_mode( const obs_data_type * obs_data , int index ); -void obs_block_deactivate( obs_block_type * obs_block , int iobs , bool verbose , const char * msg); -int obs_block_get_size( const obs_block_type * obs_block ); -void obs_block_iset( obs_block_type * obs_block , int iobs , double value , double std); -void obs_block_iset_missing( obs_block_type * obs_block , int iobs ); - -double obs_block_iget_std( const obs_block_type * obs_block , int iobs); -double obs_block_iget_value( const obs_block_type * obs_block , int iobs); -bool obs_block_iget_active( const obs_block_type * obs_block , int iobs); - - -obs_block_type * obs_data_iget_block( obs_data_type * obs_data , int index ); -const obs_block_type * obs_data_iget_block_const( const obs_data_type * obs_data , int block_nr); -obs_block_type * obs_data_get_block( obs_data_type * obs_data , const char * obs_key ); -obs_block_type * obs_data_add_block( obs_data_type * obs_data , const char * obs_key , int obs_size , matrix_type * error_covar , bool error_covar_owner); - -obs_data_type * obs_data_alloc(double global_std_scaling); -void obs_data_free(obs_data_type *); -void obs_data_reset(obs_data_type * obs_data); -matrix_type * obs_data_allocD(const obs_data_type * obs_data , const matrix_type * E , const matrix_type * S); -matrix_type * obs_data_allocR(const obs_data_type * obs_data ); -matrix_type * obs_data_allocdObs(const obs_data_type * obs_data ); -//matrix_type * obs_data_alloc_innov(const obs_data_type * obs_data , const meas_data_type * meas_data , int active_size); -matrix_type * obs_data_allocE(const obs_data_type * obs_data , rng_type * rng , int active_ens_size); -matrix_type * obs_data_allocE_non_centred(const obs_data_type * obs_data , rng_type * rng , int ens_size); - void obs_data_scale(const obs_data_type * obs_data , matrix_type *S , matrix_type *E , matrix_type *D , matrix_type *R , matrix_type * O); -void obs_data_scale_kernel(const obs_data_type * obs_data , matrix_type *S , matrix_type *E , matrix_type *D , double *dObs); -void obs_data_fprintf(const obs_data_type * , FILE *); -void obs_data_iget_value_std(const obs_data_type * obs_data , int index , double * value , double * std); -int obs_data_get_active_size(const obs_data_type * obs_data ); -int obs_data_get_total_size( const obs_data_type * obs_data ); -int obs_data_get_num_blocks( const obs_data_type * obs_data ); -const char * obs_block_get_key( const obs_block_type * obs_block) ; -double obs_data_iget_value( const obs_data_type * obs_data , int total_index ); -double obs_data_iget_std( const obs_data_type * obs_data , int total_index ); - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/obs_vector.h b/ThirdParty/Ert/libenkf/include/ert/enkf/obs_vector.h deleted file mode 100644 index 2c1224a3aa..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/obs_vector.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'obs_vector.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_OBS_VECTOR_H -#define ERT_OBS_VECTOR_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include -#include - -#include - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - - typedef void (obs_free_ftype) (void *); - typedef void (obs_get_ftype) (const void * , obs_data_type * , enkf_fs_type *, int , const active_list_type * ); - typedef void (obs_meas_ftype) (const void * , const void *, node_id_type , meas_data_type * , const active_list_type * ); - typedef void (obs_user_get_ftype) (void * , const char * , double * , double * , bool *); - typedef void (obs_update_std_scale_ftype) (void * , double , const active_list_type * ); - typedef double (obs_chi2_ftype) (const void * , const void *, node_id_type ); - - typedef enum { GEN_OBS = 1, - SUMMARY_OBS = 2, - BLOCK_OBS = 3} obs_impl_type; - - typedef struct obs_vector_struct obs_vector_type; - - - void obs_vector_clear_nodes( obs_vector_type * obs_vector ); - void obs_vector_del_node(obs_vector_type * obs_vector , int index); - void obs_vector_free(obs_vector_type * ); - int obs_vector_get_num_active(const obs_vector_type * ); - bool obs_vector_iget_active(const obs_vector_type * , int ); - void obs_vector_iget_observations(const obs_vector_type * , int , obs_data_type * , const active_list_type * active_list, enkf_fs_type * fs); - bool obs_vector_has_data( const obs_vector_type * obs_vector , const bool_vector_type * active_mask , enkf_fs_type * fs); - void obs_vector_measure(const obs_vector_type * , enkf_fs_type * fs, int report_step , const int_vector_type * ens_active_list , meas_data_type * , const active_list_type * active_list); - const char * obs_vector_get_state_kw(const obs_vector_type * ); - const char * obs_vector_get_key(const obs_vector_type * ); - obs_impl_type obs_vector_get_impl_type(const obs_vector_type * ); - int obs_vector_get_active_report_step(const obs_vector_type * ); - const int_vector_type * obs_vector_get_step_list(const obs_vector_type * vector); - void obs_vector_user_get(const obs_vector_type * obs_vector , const char * index_key , int report_step , double * value , double * std , bool * valid); - int obs_vector_get_next_active_step(const obs_vector_type * , int ); - void * obs_vector_iget_node(const obs_vector_type * , int ); - obs_vector_type * obs_vector_alloc_from_GENERAL_OBSERVATION(const conf_instance_type * , time_map_type * obs_time , const ensemble_config_type * ); - void obs_vector_load_from_SUMMARY_OBSERVATION(obs_vector_type * obs_vector , const conf_instance_type * , time_map_type * obs_time , ensemble_config_type * ); - bool obs_vector_load_from_HISTORY_OBSERVATION(obs_vector_type * obs_vector , const conf_instance_type * , time_map_type * obs_time , const history_type * , ensemble_config_type * , double std_cutoff ); - obs_vector_type * obs_vector_alloc_from_BLOCK_OBSERVATION(const conf_instance_type * , const ecl_grid_type * grid , time_map_type * obs_time , const ecl_sum_type * refcase , ensemble_config_type * ); - void obs_vector_set_config_node(obs_vector_type * , const enkf_config_node_type * ); - obs_vector_type * obs_vector_alloc(obs_impl_type obs_type , const char * obs_key , enkf_config_node_type * config_node, int num_reports); - void obs_vector_scale_std(obs_vector_type * obs_vector, const local_obsdata_node_type * local_node , double std_multiplier); - void obs_vector_install_node(obs_vector_type * obs_vector , int obs_index , void * node ); - - double obs_vector_chi2(const obs_vector_type * , enkf_fs_type * , node_id_type node_id); - - void obs_vector_ensemble_chi2(const obs_vector_type * obs_vector , - enkf_fs_type * fs, - bool_vector_type * valid , - int step1 , int step2 , - int iens1 , int iens2 , - double ** chi2); - - double obs_vector_total_chi2(const obs_vector_type * , enkf_fs_type * , int ); - void obs_vector_ensemble_total_chi2(const obs_vector_type * , enkf_fs_type * , int , double * ); - enkf_config_node_type * obs_vector_get_config_node(const obs_vector_type * ); - const char * obs_vector_get_obs_key( const obs_vector_type * obs_vector); - local_obsdata_node_type * obs_vector_alloc_local_node(const obs_vector_type * obs_vector); - - - - UTIL_IS_INSTANCE_HEADER(obs_vector); - UTIL_SAFE_CAST_HEADER(obs_vector); - VOID_FREE_HEADER(obs_vector); - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/pca_plot_data.h b/ThirdParty/Ert/libenkf/include/ert/enkf/pca_plot_data.h deleted file mode 100644 index d758e78473..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/pca_plot_data.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'pca_plot_data.h' - - ERT 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. - - ERT 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 - for more details. -*/ -#ifndef ERT_PCA_PLOT_DATA_H -#define ERT_PCA_PLOT_DATA_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -#include - - typedef struct pca_plot_data_struct pca_plot_data_type; - - pca_plot_data_type * pca_plot_data_alloc( const char * name , const matrix_type * PC, const matrix_type * PC_obs, const double_vector_type * singular_values); - const double_vector_type * pca_plot_data_get_singular_values( const pca_plot_data_type * plot_data ); - void pca_plot_data_free( pca_plot_data_type * plot_data ); - const pca_plot_vector_type * pca_plot_data_iget_vector( const pca_plot_data_type * plot_data , int ivec); - int pca_plot_data_get_size( const pca_plot_data_type * plot_data ); - const char * pca_plot_data_get_name( const pca_plot_data_type * plot_data ); - int pca_plot_data_get_ens_size( const pca_plot_data_type * plot_data ); - void pca_plot_data_free__( void * arg ); - - UTIL_IS_INSTANCE_HEADER( pca_plot_data ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/pca_plot_vector.h b/ThirdParty/Ert/libenkf/include/ert/enkf/pca_plot_vector.h deleted file mode 100644 index 21ff2b4e65..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/pca_plot_vector.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'pca_plot_vector.h' - - ERT 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. - - ERT 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 - for more details. -*/ -#ifndef ERT_PCA_PLOT_VECTOR_H -#define ERT_PCA_PLOT_VECTOR_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - - typedef struct pca_plot_vector_struct pca_plot_vector_type; - - pca_plot_vector_type * pca_plot_vector_alloc( int component , const matrix_type * PC, const matrix_type * PC_obs, const double_vector_type * singular_values); - - void pca_plot_vector_free( pca_plot_vector_type * plot_vector ); - bool pca_plot_assert_input( const matrix_type * PC, const matrix_type * PC_obs , const double_vector_type * singular_values); - void pca_plot_vector_free__( void * arg ); - double pca_plot_vector_get_obs_value( const pca_plot_vector_type * vector ); - double pca_plot_vector_get_singular_value( const pca_plot_vector_type * vector ); - double pca_plot_vector_iget_sim_value( const pca_plot_vector_type * vector , int sim_index); - int pca_plot_vector_get_size( const pca_plot_vector_type * vector ); - - UTIL_IS_INSTANCE_HEADER( pca_plot_vector ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/plain_driver.h b/ThirdParty/Ert/libenkf/include/ert/enkf/plain_driver.h deleted file mode 100644 index b66774e9e9..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/plain_driver.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'plain_driver.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_PLAIN_DRIVER_H -#define ERT_PLAIN_DRIVER_H - -#include -#include - -#include - -typedef struct plain_driver_struct plain_driver_type; - -void plain_driver_create_fs( FILE * stream , fs_driver_enum driver_type , const char * node_fmt , const char * vector_fmt); -void * plain_driver_open(FILE * fstab_stream , const char * path); -void plain_driver_fskip(FILE * fstab_stream ); - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/plain_driver_obs.h b/ThirdParty/Ert/libenkf/include/ert/enkf/plain_driver_obs.h deleted file mode 100644 index cc7987bd15..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/plain_driver_obs.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'plain_driver_obs.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_PLAIN_DRIVER_OBS_H -#define ERT_PLAIN_DRIVER_OBS_H -#ifdef __cplusplus -extern "C" { -#endif -#include - -typedef struct plain_driver_obs_struct plain_driver_obs_type; - -plain_driver_obs_type * plain_driver_obs_fread_alloc(const char * , FILE * ); - void * plain_driver_obs_alloc(const char * , const char *); -void plain_driver_obs_README(const char * ); -void plain_driver_obs_fwrite_mount_info(FILE * stream , const char * ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/plot_config.h b/ThirdParty/Ert/libenkf/include/ert/enkf/plot_config.h deleted file mode 100644 index 27f7fd0e72..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/plot_config.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'plot_config.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_PLOT_CONFIG_H -#define ERT_PLOT_CONFIG_H - -#include -#include - - -typedef struct plot_config_struct plot_config_type; - -void plot_config_set_path(plot_config_type * plot_config , const char * plot_path); -const char * plot_config_get_path(const plot_config_type * plot_config ); -void plot_config_free( plot_config_type * plot_config); -plot_config_type * plot_config_alloc_default(); -void plot_config_init(plot_config_type * plot_config , const config_content_type * config ); -void plot_config_add_config_items( config_parser_type * config ); - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/ranking_common.h b/ThirdParty/Ert/libenkf/include/ert/enkf/ranking_common.h deleted file mode 100644 index d9e423dccb..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/ranking_common.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'ranking_common.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_RANKING_COMMON_H -#define ERT_RANKING_COMMON_H -#include - -#define INVALID_RANKING_VALUE INFINITY - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/ranking_table.h b/ThirdParty/Ert/libenkf/include/ert/enkf/ranking_table.h deleted file mode 100644 index 5b2753fd7d..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/ranking_table.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'ranking_table.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#ifndef ERT_RANKING_TABLE_H -#define ERT_RANKING_TABLE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include - -#include - - typedef struct ranking_table_struct ranking_table_type; - - void ranking_table_set_ens_size( ranking_table_type * table, int ens_size); - ranking_table_type * ranking_table_alloc( ) ; - void ranking_table_free( ranking_table_type * table ); - - void ranking_table_add_data_ranking( ranking_table_type * ranking_table , - bool sort_increasing , - const char * ranking_key , - const char * user_key , - const char * key_index , - enkf_fs_type * fs , - const enkf_config_node_type * config_node , - int step); - - bool ranking_table_has_ranking( const ranking_table_type * ranking_table , const char * ranking_key ); - bool ranking_table_display_ranking( const ranking_table_type * ranking_table , const char * ranking_key ); - bool ranking_table_fwrite_ranking( const ranking_table_type * ranking_table , const char * ranking_key, const char * filename ); - - void ranking_table_add_misfit_ranking( ranking_table_type * ranking_table , - const misfit_ensemble_type * misfit_ensemble , - const stringlist_type * obs_keys , - const int_vector_type * steps, - const char * ranking_key); - - - int ranking_table_get_size( const ranking_table_type * ranking_table ); - const perm_vector_type * ranking_table_get_permutation( const ranking_table_type * ranking_table , const char * ranking_key); - -#ifdef __cplusplus -} -#endif - - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/rng_config.h b/ThirdParty/Ert/libenkf/include/ert/enkf/rng_config.h deleted file mode 100644 index 695be37e12..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/rng_config.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'rng_config.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_RNG_CONFIG_H -#define ERT_RNG_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include -#include - -typedef struct rng_config_struct rng_config_type; - - void rng_config_fprintf_config( rng_config_type * rng_config , FILE * stream ); - void rng_config_init( rng_config_type * rng_config , config_content_type * config ); - void rng_config_set_type( rng_config_type * rng_config , rng_alg_type type); - rng_alg_type rng_config_get_type(const rng_config_type * rng_config ); - const char * rng_config_get_seed_load_file( const rng_config_type * rng_config ); - void rng_config_set_seed_load_file( rng_config_type * rng_config , const char * seed_load_file); - const char * rng_config_get_seed_store_file( const rng_config_type * rng_config ); - void rng_config_set_seed_store_file( rng_config_type * rng_config , const char * seed_store_file); - rng_config_type * rng_config_alloc( ); - void rng_config_free( rng_config_type * rng); - void rng_config_add_config_items( config_parser_type * config ); - rng_type * rng_config_alloc_init_rng( const rng_config_type * rng_config); - void rng_config_init_rng(const rng_config_type * rng_config, rng_type * rng ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/run_arg.h b/ThirdParty/Ert/libenkf/include/ert/enkf/run_arg.h deleted file mode 100644 index 246e14062b..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/run_arg.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'run_arg.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_RUN_ARG_H -#define ERT_RUN_ARG_H -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -#include -#include -#include - - - -UTIL_SAFE_CAST_HEADER( run_arg ); -UTIL_IS_INSTANCE_HEADER( run_arg ); - - - run_arg_type * run_arg_alloc_ENSEMBLE_EXPERIMENT(enkf_fs_type * fs , int iens , int iter , const char * runpath); - run_arg_type * run_arg_alloc_INIT_ONLY(enkf_fs_type * init_fs , int iens , int iter , const char * runpath); - run_arg_type * run_arg_alloc_SMOOTHER_RUN(enkf_fs_type * simulate_fs , enkf_fs_type * update_target_fs , int iens , int iter , const char * runpath); - - int run_arg_get_step1( const run_arg_type * run_arg ); - int run_arg_get_step2( const run_arg_type * run_arg ); - run_mode_type run_arg_get_run_mode( const run_arg_type * run_arg ); - int run_arg_get_load_start( const run_arg_type * run_arg ); - int run_arg_get_iens( const run_arg_type * run_arg ); - int run_arg_get_iter( const run_arg_type * run_arg ); - void run_arg_increase_submit_count( run_arg_type * run_arg ); - void run_arg_set_queue_index( run_arg_type * run_arg , int queue_index); - - void run_arg_free(run_arg_type * run_arg); - void run_arg_free__(void * arg); - const char * run_arg_get_runpath( const run_arg_type * run_arg); - void run_arg_complete_run(run_arg_type * run_arg); - run_status_type run_arg_get_run_status( const run_arg_type * run_arg ); - - int run_arg_get_queue_index( const run_arg_type * run_arg ); - bool run_arg_is_submitted( const run_arg_type * run_arg ); - - bool run_arg_can_retry( const run_arg_type * run_arg ); - - run_status_type run_arg_get_run_status( const run_arg_type * run_arg); - void run_arg_set_run_status( run_arg_type * run_arg , run_status_type run_status); - - enkf_fs_type * run_arg_get_init_fs(const run_arg_type * run_arg); - enkf_fs_type * run_arg_get_update_target_fs(const run_arg_type * run_arg); - enkf_fs_type * run_arg_get_result_fs(const run_arg_type * run_arg); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/run_arg_type.h b/ThirdParty/Ert/libenkf/include/ert/enkf/run_arg_type.h deleted file mode 100644 index 18bdd51f67..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/run_arg_type.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - Copyright (C) 2016 Statoil ASA, Norway. - - The file 'run_arg_type.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_RUN_ARG_TYPE_H -#define ERT_RUN_ARG_TYPE_H - -typedef struct run_arg_struct run_arg_type; - -#endif - diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/runpath_list.h b/ThirdParty/Ert/libenkf/include/ert/enkf/runpath_list.h deleted file mode 100644 index bf053e37d2..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/runpath_list.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - The file 'runpath_list.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_RUNPATH_LIST_H -#define ERT_RUNPATH_LIST_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define RUNPATH_LIST_DEFAULT_LINE_FMT "%03d %s %s %03d\n" - - - typedef struct runpath_list_struct runpath_list_type; - - void runpath_list_free( runpath_list_type * list ); - runpath_list_type * runpath_list_alloc(const char * export_file ); - int runpath_list_size( const runpath_list_type * list ); - void runpath_list_add( runpath_list_type * list , int iens , int iter, const char * runpath , const char * basename); - void runpath_list_clear( runpath_list_type * list ); - int runpath_list_iget_iens( runpath_list_type * list , int index); - int runpath_list_iget_iter( runpath_list_type * list , int index); - char * runpath_list_iget_runpath( runpath_list_type * list , int index); - char * runpath_list_iget_basename( runpath_list_type * list , int index); - void runpath_list_set_line_fmt( runpath_list_type * list , const char * line_fmt ); - const char * runpath_list_get_line_fmt( const runpath_list_type * list ); - void runpath_list_fprintf( runpath_list_type * list); - const char * runpath_list_get_export_file( const runpath_list_type * list ); - void runpath_list_set_export_file( runpath_list_type * list , const char * export_file ); - - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/scalar_config.h b/ThirdParty/Ert/libenkf/include/ert/enkf/scalar_config.h deleted file mode 100644 index 08f94d08b0..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/scalar_config.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'scalar_config.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_SCALAR_CONFIG_H -#define ERT_SCALAR_CONFIG_H -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include - -typedef struct scalar_config_struct scalar_config_type; - - - -scalar_config_type * scalar_config_alloc_empty(int); -void scalar_config_free(scalar_config_type *); -const char * scalar_config_get_ensfile_ref(const scalar_config_type * ); -const char * scalar_config_get_eclfile_ref(const scalar_config_type * ); -void scalar_config_transform(const scalar_config_type * , const double * , double *); -double scalar_config_transform_item(const scalar_config_type *, double, int); -void scalar_config_fscanf_line(scalar_config_type * , int , FILE * ); -int scalar_config_get_active_size(const scalar_config_type *); - -SAFE_CAST_HEADER(scalar_config) -GET_DATA_SIZE_HEADER(scalar); -VOID_FREE_HEADER(scalar_config); -GET_ACTIVE_LIST_HEADER(scalar); -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/site_config.h b/ThirdParty/Ert/libenkf/include/ert/enkf/site_config.h deleted file mode 100644 index 1e3c893d56..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/site_config.h +++ /dev/null @@ -1,107 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'site_config.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_SITE_CONFIG_H -#define ERT_SITE_CONFIG_H -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include - -#include -#include - -#include -#include -#include - - -typedef struct site_config_struct site_config_type; - - const char * site_config_get_location(); - - bool site_config_has_job_script( const site_config_type * site_config ); - const char * site_config_get_manual_url( const site_config_type * site_config ); - void site_config_set_manual_url( site_config_type * site_config , const char * manual_url ); - const char * site_config_get_default_browser( const site_config_type * site_config ); - void site_config_set_default_browser( site_config_type * site_config , const char * default_browser ); - - const char * site_config_get_license_root_path( const site_config_type * site_config ); - void site_config_set_license_root_path( site_config_type * site_config , const char * license_root_path); - void site_config_init_user_mode( site_config_type * site_config ); - - void site_config_set_num_cpu( site_config_type * site_config , int num_cpu ); - void site_config_update_lsf_request(site_config_type * , const forward_model_type *); - bool site_config_init(site_config_type * site_config , const config_content_type * config); - void site_config_free(site_config_type *); - ext_joblist_type * site_config_get_installed_jobs( const site_config_type * ); - job_queue_type * site_config_get_job_queue( const site_config_type * ); - void site_config_set_ens_size( site_config_type * site_config , int ens_size ); - - void site_config_set_max_running_lsf( site_config_type * site_config , int max_running_lsf); - int site_config_get_max_running_lsf( const site_config_type * site_config ); - void site_config_set_max_running_rsh( site_config_type * site_config , int max_running_rsh); - int site_config_get_max_running_rsh( const site_config_type * site_config); - void site_config_set_max_running_local( site_config_type * site_config , int max_running_local); - int site_config_get_max_running_local( const site_config_type * site_config ); - void site_config_setenv( site_config_type * site_config , const char * variable, const char * value); - hash_type * site_config_get_env_hash( const site_config_type * site_config ); - void site_config_clear_env( site_config_type * site_config ); - void site_config_clear_pathvar( site_config_type * site_config ); - stringlist_type * site_config_get_path_variables( const site_config_type * site_config ); - stringlist_type * site_config_get_path_values( const site_config_type * site_config ); - - void site_config_clear_rsh_host_list( site_config_type * site_config ); - hash_type * site_config_get_rsh_host_list( const site_config_type * site_config ); - void site_config_add_rsh_host( site_config_type * site_config , const char * rsh_host , int max_running); - - void site_config_set_lsf_queue( site_config_type * site_config , const char * lsf_queue); - const char * site_config_get_lsf_queue( const site_config_type * site_config ); - void site_config_set_lsf_request( site_config_type * site_config , const char * lsf_request); - const char * site_config_get_lsf_request( const site_config_type * site_config ); - - const char * site_config_get_job_queue_name( const site_config_type * site_config ); - void site_config_set_job_queue( site_config_type * site_config , const char * queue_name ); - - void site_config_set_rsh_command( site_config_type * site_config , const char * rsh_command); - const char * site_config_get_rsh_command( const site_config_type * site_config ); - void site_config_set_ext_job_search_path(site_config_type * site_config, bool search_path); - - - bool site_config_set_job_script( site_config_type * site_config , const char * job_script ); - const char * site_config_get_job_script( const site_config_type * site_config ); - - void site_config_set_max_submit( site_config_type * site_config , int max_submit ); - int site_config_get_max_submit(const site_config_type * site_config ); - - bool site_config_queue_is_running( const site_config_type * site_config ); - int site_config_install_job(site_config_type * site_config , const char * job_name , const char * install_file); - bool site_config_del_job( site_config_type * site_config , const char * job_name ); - - void site_config_set_umask( site_config_type * site_config , mode_t umask); - mode_t site_config_get_umask( const site_config_type * site_config ); - - site_config_type * site_config_alloc_empty(); - void site_config_add_config_items( config_parser_type * config , bool site_mode); -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/state_map.h b/ThirdParty/Ert/libenkf/include/ert/enkf/state_map.h deleted file mode 100644 index 49a7a378a4..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/state_map.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - The file 'state_map.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_STATE_MAP_H -#define ERT_STATE_MAP_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include - - typedef struct state_map_struct state_map_type; - - - state_map_type * state_map_alloc( ); - state_map_type * state_map_fread_alloc( const char * filename ); - state_map_type * state_map_fread_alloc_readonly( const char * filename ); - state_map_type * state_map_alloc_copy( state_map_type * map ); - bool state_map_is_readonly(const state_map_type * state_map); - void state_map_free( state_map_type * map ); - int state_map_get_size( state_map_type * map); - realisation_state_enum state_map_iget( state_map_type * map , int index); - void state_map_update_undefined( state_map_type * map , int index , realisation_state_enum new_state); - void state_map_update_matching( state_map_type * map , int index , int state_mask , realisation_state_enum new_state); - void state_map_iset( state_map_type * map ,int index , realisation_state_enum state); - bool state_map_equal( state_map_type * map1 , state_map_type * map2); - void state_map_fwrite( state_map_type * map , const char * filename); - bool state_map_fread( state_map_type * map , const char * filename); - void state_map_select_matching( state_map_type * map , bool_vector_type * select_target , int select_mask); - void state_map_deselect_matching( state_map_type * map , bool_vector_type * select_target , int select_mask); - void state_map_set_from_inverted_mask(state_map_type * map, const bool_vector_type *mask , realisation_state_enum state); - void state_map_set_from_mask(state_map_type * map, const bool_vector_type *mask , realisation_state_enum state); - int state_map_count_matching( state_map_type * state_map , int mask); - bool state_map_legal_transition( realisation_state_enum state1 , realisation_state_enum state2); - - UTIL_IS_INSTANCE_HEADER( state_map ); - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/summary.h b/ThirdParty/Ert/libenkf/include/ert/enkf/summary.h deleted file mode 100644 index 8f90d0f0ca..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/summary.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'summary.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_SUMMARY_H -#define ERT_SUMMARY_H -#include - -#include -#include - -#include -#include -#include - - - - - - -double summary_get(const summary_type * summary, int report_step ); -bool summary_active_value( double value ); - -VOID_HAS_DATA_HEADER(summary); -UTIL_SAFE_CAST_HEADER(summary); -UTIL_SAFE_CAST_HEADER_CONST(summary); -VOID_ALLOC_HEADER(summary); -VOID_FREE_HEADER(summary); -VOID_COPY_HEADER(summary); -VOID_FORWARD_LOAD_HEADER(summary); -VOID_FORWARD_LOAD_VECTOR_HEADER(summary); -VOID_USER_GET_HEADER(summary); -VOID_USER_GET_VECTOR_HEADER(summary); -VOID_WRITE_TO_BUFFER_HEADER(summary); -VOID_READ_FROM_BUFFER_HEADER(summary); -VOID_SERIALIZE_HEADER(summary) -VOID_DESERIALIZE_HEADER(summary) -VOID_SET_INFLATION_HEADER(summary); -VOID_CLEAR_HEADER(summary); - -VOID_IADD_HEADER(summary); -VOID_SCALE_HEADER(summary); -VOID_IMUL_HEADER(summary); -VOID_IADDSQR_HEADER(summary); -VOID_ISQRT_HEADER(summary); -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/summary_config.h b/ThirdParty/Ert/libenkf/include/ert/enkf/summary_config.h deleted file mode 100644 index 4b107ec58e..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/summary_config.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'summary_config.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_SUMMARY_CONFIG_H -#define ERT_SUMMARY_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include - -#include -#include - -#include - -/* - How should the run system handle a load problem of a summary - variable. Observe that the numerical enum values are actually used - - they should be listed with the most strict mode having the - numerically largest value. -*/ - - -typedef enum { LOAD_FAIL_SILENT = 0, // We just try to load - and if it is not there we do not care at all. - LOAD_FAIL_WARN = 2, // If the key can not be found we will print a warning on stdout - but the run will still be flagged as successfull. - LOAD_FAIL_EXIT = 4 } // The data is deemed important - and we let the run fail if this data can not be found. - load_fail_type; - - - - typedef struct summary_config_struct summary_config_type; - typedef struct summary_struct summary_type; - - void summary_config_update_load_fail_mode( summary_config_type * config , load_fail_type load_fail); - void summary_config_set_load_fail_mode( summary_config_type * config , load_fail_type load_fail); - load_fail_type summary_config_get_load_fail_mode( const summary_config_type * config); - void summary_config_update_required( summary_config_type * config , bool required ); - bool summary_config_get_vector_storage( const summary_config_type * config); - ecl_smspec_var_type summary_config_get_var_type(summary_config_type * , const ecl_sum_type * ecl_sum); - const char * summary_config_get_var(const summary_config_type * ); - void summary_config_set_obs_config_file(summary_config_type * , const char * ); - const char * summary_config_get_config_txt_file_ref(const summary_config_type * ); - summary_config_type * summary_config_alloc(const char * , bool vector_storage , load_fail_type load_fail); - void summary_config_free(summary_config_type * ); - int summary_config_get_active_mask(const summary_config_type *); - int summary_config_get_var_index(const summary_config_type * , const char * ); - const char ** summary_config_get_var_list_ref(const summary_config_type *); - void summary_config_add_var(summary_config_type * , const char * ); - bool summary_config_has_var(const summary_config_type * , const char * ); - void summary_config_summarize(const summary_config_type * ); - void summary_config_add_obs_key(summary_config_type * , const char * ); - int summary_config_get_byte_size(const summary_config_type * ); - - UTIL_IS_INSTANCE_HEADER(summary_config); - UTIL_SAFE_CAST_HEADER(summary_config); - UTIL_SAFE_CAST_HEADER_CONST(summary_config); - GET_DATA_SIZE_HEADER(summary); - VOID_GET_DATA_SIZE_HEADER(summary); - VOID_CONFIG_FREE_HEADER(summary); - - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/summary_key_matcher.h b/ThirdParty/Ert/libenkf/include/ert/enkf/summary_key_matcher.h deleted file mode 100644 index c82d14f3e4..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/summary_key_matcher.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef ERT_SUMMARY_KEY_MATCHER_H -#define ERT_SUMMARY_KEY_MATCHER_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include - - typedef struct summary_key_matcher_struct summary_key_matcher_type; - - summary_key_matcher_type * summary_key_matcher_alloc(); - void summary_key_matcher_free(summary_key_matcher_type * matcher); - int summary_key_matcher_get_size(const summary_key_matcher_type * matcher); - void summary_key_matcher_add_summary_key(summary_key_matcher_type * matcher, const char * summary_key); - bool summary_key_matcher_match_summary_key(const summary_key_matcher_type * matcher, const char * summary_key); - bool summary_key_matcher_summary_key_is_required(const summary_key_matcher_type * matcher, const char * summary_key); - stringlist_type * summary_key_matcher_get_keys(const summary_key_matcher_type * matcher); - - UTIL_IS_INSTANCE_HEADER( summary_key_matcher ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/summary_key_set.h b/ThirdParty/Ert/libenkf/include/ert/enkf/summary_key_set.h deleted file mode 100644 index 7b167cda8c..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/summary_key_set.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef ERT_SUMMARY_KEY_SET_H -#define ERT_SUMMARY_KEY_SET_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include - - typedef struct summary_key_set_struct summary_key_set_type; - - summary_key_set_type * summary_key_set_alloc(); - summary_key_set_type * summary_key_set_alloc_from_file(const char * filename, bool read_only); - void summary_key_set_free(summary_key_set_type * set); - int summary_key_set_get_size(summary_key_set_type * set); - bool summary_key_set_add_summary_key(summary_key_set_type * set, const char * summary_key); - bool summary_key_set_has_summary_key(summary_key_set_type * set, const char * summary_key); - stringlist_type * summary_key_set_alloc_keys(summary_key_set_type * set); - bool summary_key_set_is_read_only(const summary_key_set_type * set); - - void summary_key_set_fwrite(summary_key_set_type * set, const char * filename); - bool summary_key_set_fread(summary_key_set_type * set, const char * filename); - - - - UTIL_IS_INSTANCE_HEADER( summary_key_set ); - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/summary_obs.h b/ThirdParty/Ert/libenkf/include/ert/enkf/summary_obs.h deleted file mode 100644 index 3d36b1bfce..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/summary_obs.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'summary_obs.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_SUMMARY_OBS_H -#define ERT_SUMMARY_OBS_H - -#ifdef __cplusplus -extern "C" { -#endif -#include - -#include - -#include - -#include -#include -#include -#include -#include -#include - - -#define AUTO_CORRF_EXP "EXP" -#define AUTO_CORRF_GAUSS "GAUSS" - - -typedef struct summary_obs_struct summary_obs_type; - -typedef double (auto_corrf_ftype) ( double , double ); - - -void summary_obs_free( - summary_obs_type * summary_obs); - -summary_obs_type * summary_obs_alloc( - const char * summary_key, - const char * obs_key , - double value , - double std, - const char * auto_corrf_name , - double auto_corrf_param); - - - double summary_obs_get_value( const summary_obs_type * summary_obs ); - double summary_obs_get_std( const summary_obs_type * summary_obs ); - double summary_obs_get_std_scaling( const summary_obs_type * summary_obs ); - -auto_corrf_ftype * summary_obs_get_auto_corrf( const summary_obs_type * summary_obs ); -double summary_obs_get_auto_corrf_param( const summary_obs_type * summary_obs ); - -bool summary_obs_default_used( - const summary_obs_type * summary_obs, - int restart_nr); - -const char * summary_obs_get_summary_key( - const summary_obs_type * summary_obs); - -summary_obs_type * summary_obs_alloc_from_HISTORY_OBSERVATION( - const conf_instance_type * conf_instance, - const history_type * history); - -summary_obs_type * summary_obs_alloc_from_SUMMARY_OBSERVATION( - const conf_instance_type * conf_instance, - const history_type * history); - -void summary_obs_set(summary_obs_type * , double , double ); - -void summary_obs_update_std_scale(summary_obs_type * summary_obs, double std_multiplier , const active_list_type * active_list); - -VOID_FREE_HEADER(summary_obs); -VOID_GET_OBS_HEADER(summary_obs); -VOID_MEASURE_HEADER(summary_obs); -UTIL_IS_INSTANCE_HEADER(summary_obs); -VOID_USER_GET_OBS_HEADER(summary_obs); -VOID_CHI2_HEADER(summary_obs); -VOID_UPDATE_STD_SCALE_HEADER(summary_obs); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/surface.h b/ThirdParty/Ert/libenkf/include/ert/enkf/surface.h deleted file mode 100644 index 62be08f030..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/surface.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'surface.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_SURFACE_H -#define ERT_SURFACE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - - typedef struct surface_struct surface_type; - - UTIL_SAFE_CAST_HEADER(surface); - UTIL_SAFE_CAST_HEADER_CONST(surface); - VOID_ALLOC_HEADER(surface); - VOID_FREE_HEADER(surface); - VOID_ECL_WRITE_HEADER(surface); - VOID_COPY_HEADER(surface); - VOID_USER_GET_HEADER(surface); - VOID_WRITE_TO_BUFFER_HEADER(surface); - VOID_READ_FROM_BUFFER_HEADER(surface); - VOID_SERIALIZE_HEADER(surface); - VOID_DESERIALIZE_HEADER(surface); - VOID_SET_INFLATION_HEADER(surface); - VOID_CLEAR_HEADER(surface); - VOID_IADD_HEADER(surface); - VOID_SCALE_HEADER(surface); - VOID_IMUL_HEADER(surface); - VOID_IADDSQR_HEADER(surface); - VOID_ISQRT_HEADER(surface); - VOID_INITIALIZE_HEADER(surface); - VOID_FLOAD_HEADER(surface); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/surface_config.h b/ThirdParty/Ert/libenkf/include/ert/enkf/surface_config.h deleted file mode 100644 index 73fb0e88b6..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/surface_config.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'surface_config.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_SURFACE_CONFIG_H -#define ERT_SURFACE_CONFIG_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include - - typedef struct surface_config_struct surface_config_type; - - void surface_config_ecl_write( const surface_config_type * config , const char * filename , const double * zcoord); - const geo_surface_type * surface_config_get_base_surface( const surface_config_type * config ); - void surface_config_free( surface_config_type * config ); - int surface_config_get_data_size(const surface_config_type * config ); - surface_config_type * surface_config_alloc_empty( ); - void surface_config_set_base_surface( surface_config_type * config , const char * base_surface ); - - UTIL_SAFE_CAST_HEADER(surface_config); - UTIL_SAFE_CAST_HEADER_CONST(surface_config); - GET_DATA_SIZE_HEADER(surface); - VOID_GET_DATA_SIZE_HEADER(surface); - VOID_CONFIG_FREE_HEADER(surface); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/time_map.h b/ThirdParty/Ert/libenkf/include/ert/enkf/time_map.h deleted file mode 100644 index 239482484b..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/time_map.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - The file 'time_map.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#ifndef ERT_TIME_MAP_H -#define ERT_TIME_MAP_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include -#include - -#include - -typedef struct time_map_struct time_map_type; - - UTIL_SAFE_CAST_HEADER( time_map ); - UTIL_IS_INSTANCE_HEADER( time_map ); - - bool time_map_try_summary_update( time_map_type * map , const ecl_sum_type * ecl_sum); - bool time_map_try_update( time_map_type * map , int step , time_t time); - bool time_map_attach_refcase( time_map_type * time_map , const ecl_sum_type * refcase); - bool time_map_has_refcase( const time_map_type * time_map ); - bool time_map_is_strict( const time_map_type * time_map ); - void time_map_set_strict( time_map_type * time_map , bool strict); - void time_map_clear( time_map_type * map ); - bool time_map_equal( const time_map_type * map1 , const time_map_type * map2); - time_map_type * time_map_alloc( ); - void time_map_free( time_map_type * map ); - bool time_map_update( time_map_type * map , int step , time_t time); - bool time_map_summary_update( time_map_type * map , const ecl_sum_type * ecl_sum); - time_t time_map_iget( time_map_type * map , int step ); - void time_map_fwrite( time_map_type * map , const char * filename); - void time_map_fread( time_map_type * map , const char * filename); - bool time_map_fscanf(time_map_type * map , const char * filename); - double time_map_iget_sim_days( time_map_type * map , int step ); - int time_map_get_last_step( time_map_type * map); - int time_map_get_size( time_map_type * map); - time_t time_map_get_start_time( time_map_type * map); - time_t time_map_get_end_time( time_map_type * map); - double time_map_get_end_days( time_map_type * map); - bool time_map_is_readonly( const time_map_type * tm); - time_map_type * time_map_fread_alloc_readonly( const char * filename); - int_vector_type * time_map_alloc_index_map( time_map_type * map , const ecl_sum_type * ecl_sum ); - int time_map_lookup_time( time_map_type * map , time_t time); - int time_map_lookup_days( time_map_type * map , double sim_days); - int time_map_lookup_time_with_tolerance( time_map_type * map , time_t time , int seconds_before_tolerance, int seconds_after_tolerance); - void time_map_summary_upgrade107( time_map_type * map , const ecl_sum_type * ecl_sum); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/include/ert/enkf/trans_func.h b/ThirdParty/Ert/libenkf/include/ert/enkf/trans_func.h deleted file mode 100644 index 1d0b9e7507..0000000000 --- a/ThirdParty/Ert/libenkf/include/ert/enkf/trans_func.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'trans_func.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_TRANS_FUNC_H -#define ERT_TRANS_FUNC_H -#ifdef __cplusplus -extern "C" { -#endif -#include -#include - -#include - -#include - - -typedef struct trans_func_struct trans_func_type; -typedef double (transform_ftype) (double , const arg_pack_type *); -typedef bool (validate_ftype) (const trans_func_type * ); - -trans_func_type * trans_func_fscanf_alloc( FILE * stream, const char * filename ); -double trans_func_eval( const trans_func_type * trans_func , double x); - -void trans_func_free( trans_func_type * trans_func ); -void trans_func_iset_double_param(trans_func_type * trans_func , int param_index , double value ); -bool trans_func_set_double_param( trans_func_type * trans_func , const char * param_name , double value ); -void trans_func_iset_int_param(trans_func_type * trans_func , int param_index , int value ); -bool trans_func_set_int_param( trans_func_type * trans_func , const char * param_name , int value ); -bool trans_func_use_log_scale(const trans_func_type * trans_func ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libenkf/src/CMakeLists.txt b/ThirdParty/Ert/libenkf/src/CMakeLists.txt deleted file mode 100644 index 37d82b8cb8..0000000000 --- a/ThirdParty/Ert/libenkf/src/CMakeLists.txt +++ /dev/null @@ -1,239 +0,0 @@ -set( source_files - time_map.c - rng_config.c - trans_func.c - enkf_types.c - enkf_obs.c - obs_data.c - block_obs.c - enkf_config_node.c - field_config.c - field.c - enkf_state.c - enkf_util.c - enkf_node.c - gen_kw_config.c - gen_kw.c - enkf_fs.c - fs_driver.c - meas_data.c - summary_obs.c - summary.c - summary_config.c - gen_data_config.c - gen_data.c - gen_common.c - gen_obs.c - enkf_serialize.c - ecl_config.c - enkf_defaults.c - ensemble_config.c - model_config.c - site_config.c - active_list.c - obs_vector.c - field_trans.c - plain_driver.c - local_ministep.c - local_updatestep.c - container_config.c - container.c - local_context.c - local_config.c - analysis_config.c - misfit_ensemble.c - misfit_member.c - misfit_ts.c - data_ranking.c - misfit_ranking.c - ranking_table.c - fs_types.c - block_fs_driver.c - plot_config.c - ert_template.c - member_config.c - enkf_analysis.c - enkf_main.c - local_dataset.c - surface.c - surface_config.c - enkf_plot_data.c - enkf_plot_tvector.c - enkf_plot_gendata.c - enkf_plot_genvector.c - enkf_plot_gen_kw.c - enkf_plot_gen_kw_vector.c - hook_manager.c - hook_workflow.c - runpath_list.c - ert_workflow_list.c - analysis_iter_config.c - enkf_main_jobs.c - ecl_refcase_list.c - local_obsdata_node.c - local_obsdata.c - pca_plot_data.c - pca_plot_vector.c - state_map.c - cases_config.c - state_map.c - summary_key_set.c - summary_key_matcher.c - ert_test_context.c - ert_log.c - run_arg.c - ert_run_context.c - ert_init_context.c - custom_kw.c - custom_kw_config.c - custom_kw_config_set.c - forward_load_context.c -) - -set( header_files - time_map.h - rng_config.h - enkf_analysis.h - enkf_fs_type.h - trans_func.h - enkf_obs.h - obs_data.h - enkf_config_node.h - block_obs.h - field_config.h - field.h - enkf_macros.h - enkf_state.h - enkf_util.h - enkf_main.h - enkf_main_jobs.h - enkf_node.h - enkf_fs.h - gen_kw_config.h - gen_kw.h - enkf_types.h - fs_driver.h - meas_data.h - summary_obs.h - summary_config.h - summary_config.h - gen_data_config.h - gen_data.h - gen_common.h - gen_obs.h - fs_types.h - enkf_serialize.h - plain_driver.h - ecl_config.h - ensemble_config.h - model_config.h - site_config.h - active_list.h - obs_vector.h - field_trans.h - plain_driver.h - local_ministep.h - container.h - local_updatestep.h - local_config.h - analysis_config.h - misfit_ensemble.h - misfit_ensemble_typedef.h - misfit_ts.h - misfit_member.h - data_ranking.h - ranking_table.h - ranking_common.h - misfit_ranking.h - block_fs_driver.h - field_common.h - gen_kw_common.h - gen_data_common.h - plot_config.h - ert_template.h - member_config.h - enkf_defaults.h - container_config.h - local_dataset.h - surface.h - surface_config.h - local_context.h - enkf_plot_data.h - enkf_plot_tvector.h - enkf_plot_gendata.h - enkf_plot_genvector.h - enkf_plot_gen_kw.h - enkf_plot_gen_kw_vector.h - hook_manager.h - runpath_list.h - ert_workflow_list.h - analysis_iter_config.h - ecl_refcase_list.h - local_obsdata_node.h - local_obsdata.h - pca_plot_data.h - pca_plot_vector.h - state_map.h - summary_key_set.h - summary_key_matcher.h - cases_config.h - state_map.h - ert_test_context.h - ert_log.h - run_arg.h - run_arg_type.h - ert_run_context.h - ert_init_context.h - custom_kw.h - custom_kw_config.h - custom_kw_config_set.h - forward_load_context.h -) - - -add_library( enkf ${LIBRARY_TYPE} ${source_files} ) -set_target_properties( enkf PROPERTIES VERSION ${ERT_VERSION_MAJOR}.${ERT_VERSION_MINOR} SOVERSION ${ERT_VERSION_MAJOR} ) - -set( STATOIL_SITE_CONFIG /project/res/etc/ERT/site-config) -if (STATOIL_TESTDATA_ROOT) - set( SITE_CONFIG_FILE ${STATOIL_SITE_CONFIG} CACHE FILEPATH "Path to global ERT Configuration file") -else() - if (EXISTS ${STATOIL_SITE_CONFIG}) - set( SITE_CONFIG_FILE ${STATOIL_SITE_CONFIG}) - else() - set( SITE_CONFIG_FILE "${PROJECT_SOURCE_DIR}/share/site-config") - endif() -endif() - -set_source_files_properties( site_config.c PROPERTIES COMPILE_DEFINITIONS "SITE_CONFIG_FILE=\"${SITE_CONFIG_FILE}\"") - -target_link_libraries( enkf ecl sched analysis rms config job_queue ) - -if (USE_RUNPATH) - add_runpath( enkf ) -endif() - -if(ERT_MAC) - add_custom_target(ert_share_symlinking ALL - COMMENT "Symlinking to the development share directory." - COMMAND ln -sfh ${PROJECT_SOURCE_DIR}/share ${PROJECT_BINARY_DIR}/share - ) - -else() - add_custom_target(ert_share_symlinking ALL - COMMENT "Symlinking to the development share directory." - COMMAND ln -sf -t ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR}/share - ) -endif() - -#----------------------------------------------------------------- -if (INSTALL_ERT) - install(TARGETS enkf DESTINATION ${CMAKE_INSTALL_LIBDIR}) - foreach(header ${header_files}) - install(FILES ../include/ert/enkf/${header} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/enkf) - endforeach() -endif() - -#----------------------------------------------------------------- - - diff --git a/ThirdParty/Ert/libenkf/src/README.new_config_draft b/ThirdParty/Ert/libenkf/src/README.new_config_draft deleted file mode 100644 index 0576ff4591..0000000000 --- a/ThirdParty/Ert/libenkf/src/README.new_config_draft +++ /dev/null @@ -1,251 +0,0 @@ --- QUEUE_SYSTEM prevails, but becomes a class. --- --- This is a singleton class. I.e., it can only have --- one instance. --- --- Example: -QUEUE_SYSTEM xHydro_LSF -{ - TYPE = LSF; - MAX_JOBS = 10; -}; - - - - --- SUBSTITUTION takes over for DATA_KW. --- Adding support for arbitrary files --- and keys. Adding support for sourced --- file. --- --- Example A: -SUBSTITUTION my_own_hack -{ - FILENAME = "my_magic_file.txt"; - KEY = ""; - VALUE = "SVADAFRANZ_"; -}; - --- Example B: -SUBSTITUTION your_hack -{ - FILENAME = ; - KEY = "__SVADAFRANZ__"; - VALUE = ; -}; - --- Example C: -SUBSTITUTION our_hack -{ - FILENAME = "our_file.txt"; - KEY = "__INSERT_HERE__"; - SOURCE_FILE = "the_data.txt"; - -}; - - - --- JOB takes over for INSTALL_JOB. --- --- Example: -JOB STEINFYSIKK -{ - PLATFORM_EXE i386 - { - EXE = "/bin/old/bein.exe"; - }; - - - PLATFORM_EXE x86_64 - { - EXE = "/bin/x86_64/bein.exe"; - }; - - - PLATFORM_EXE ia64 - { - EXE = "/bin/ia64/bein.exe"; - - -- Special arguments and env for this platform. - ARGUMENTS = "-finn -olje -some funky special stuff"; - SETENV F_UMFTENDIAN { VALUE = "special"; }; - }; - - - ARGUMENTS = "-finn -olje"; - - STDIN = ""; - STDOUT = "steinfysikk.stdout"; - - LSF_RESOURCES = "det skal gå snabbt!"; - -}; - - - --- SIMULATION_WORKFLOW takes over for FORWARD_MODEL --- --- "Simulation workflow" might be more instructive? --- Not 100% sure though... --- --- Example: -SIMULATION_WORKFLOW = "RELPERM ECLIPSE100 STEINFYSIKK"; - - - --- SIMULATION_SCHEDULE takes over for ENKF_SCHED_FILE. --- --- This is a singleton class. I.e., it can only have --- one instance. --- --- Example: -SIMULATION_SCHEDULE my_schedule -{ - SEGMENT A - { - START = 0; - END = 10; - STRIDE = 5; - UPDATE = ENKF; - SIMULATION_WORKFLOW = "ECLIPSE100 ROCKPHYSICS SEISMIC"; - }; - - - SEGMENT B - { - START = 10; - END = 100; - - -- Use smoother for this interval - UPDATE = ENKS; - }; - - - SEGMENT C - { - START = 100; - END = 200; - UPDATE = NO; - }; - -}; - - - - --- PARAMETER_COLLECTION takes over for GEN_KW. --- --- Example: -PARAMETER_COLLECTION my_big_collection -{ - -- All the parameters in the collection - -- subsitutes into the TEMPLATE_FILE. - TEMPLATE_FILE = "templates/my_template.txt"; - - - -- File produced in the simulation folder. - TARGET_FILE = "my_output.txt"; - - - SCALAR foo - { - -- The key in my_template to subsitute. - -- This shold probably default to - -- __INSTANCE_NAME__ or . - TEMPLATE_KEY = ""; - - - -- Prior distribution can not be used - -- with MAX, MIN, TRANSFER_FUNCTION - -- and PRIOR_SAMPLES. - PRIOR_DISTRIBUTION = "LOGUNIF 0 1"; - }; - - - -- This parameter behaves like the old GEN_KW, - -- but reads input from a user provided file - -- and subsitutes a key different from name. - SCALAR bar - { - TEMPLATE_KEY = "__MAGIC__"; - - -- The file user_provided_realizations.txt shall - -- contain ascii doubles, one per line. - PRIOR_SAMPLES = "user_provided_realizations.txt"; - TRANSFER_FUNCTION = LOG10; - MAX = 100; - MIN = 1; - }; - - -- User provided covariance matrix. - -- - -- Note that we cannot use this if not all - -- parameters are sampled internally! - -- COVARIANCE_MATRIX = "my_covmat.txt"; -}; - - --- PARAMETER takes over for GEN_PARAM and --- FIELD * PARAMETER. --- --- Example A, subsituting FIELD * PARAMETER. -PARAMETER poro -{ - -- Need to have either: - -- 1. ECL_OUTPUT and KEYWORD (for FIELD * PARAMETER) - -- or - -- 2. TEMPLATE_FILE and KEY (for GEN_PARAM). - ECL_OUTPUT = GRDECL; - KEYWORD = "PORO"; - TARGET_FILE = "PORO.GRDECL"; - PRIOR_SAMPLES = "poro-%d.grdecl"; -}; --- Example B, subsituting FIELD * PARAMETER -PARAMETER permx -{ - ECL_OUTPUT = "ECLBIN"; - KEYWORD = "PERMX"; - TARGET_FILE = "PERMX.BIN"; - PRIOR_SAMPLES = "permx-%d.roff"; -}; --- Example C, subsituting GEN_PARAM. -PARAMETER surf -{ - TEMPLATE_FILE = "my_surf_template.txt"; - KEY = "__REPLACE_THIS__"; - TARGET_FILE = "surface.roff"; - PRIOR_SAMPLES = "surf-%d.txt"; -}; - - --- STATE takes over for FIELD * DYNAMIC --- and SUMMARY. --- --- Example A, replacing FIELD * DYNAMIC. -STATE pres -{ - ECL_SOURCE = RESTART; - KEYWORD = PRESSURE; - MIN = 100; - -- Specify UPDATE_SPACE instead of - -- input and output transform. - UPDATE_SPACE = LOG10; -}; --- Example B, replacing SUMMARY. -STATE region_pressure; -{ - ECL_SOURCE = SUMMARY; - KEYWORD = RPR:10; - -- Need to think about how this affects observations.. - UPDATE_SPACE = LOG10; -}; - - - -SUMMARY_OBSERVATION foobar -{ - KEY = WOPR:P1; - RESTARTS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; - VALUES = [0, 0, 0, 1, 1, 1, 1, 1, 1, 1]; - ERRORS = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; -} diff --git a/ThirdParty/Ert/libenkf/src/README.new_type.c b/ThirdParty/Ert/libenkf/src/README.new_type.c deleted file mode 100644 index d7547500c1..0000000000 --- a/ThirdParty/Ert/libenkf/src/README.new_type.c +++ /dev/null @@ -1,343 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'README.new_type.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -/** -The two files README.new_type.c and README.new_type_config.c (along -with the corresponding header files) are meant to serve as a -documentation and reference on how to add new object types to the enkf -system. - -The enkf object system is based on the enkf_node_type as a sort of -abstract class, this object has a void pointer which will point to the -actual data instance (i.e. for instance an instance of the type -"new_type" implemented here), along with several function pointers to -manipulate the data object. - - _______________________________________ _______________________________ - | enkf_node_type instance | | | - | ------------------------------------- | | Actual data , e.g. a field or | - | * void * data |-------------->| a multiplier. | - | * Function pointers to manipulate | |_______________________________| - | data | - | * Something more - not relevant here | - |_______________________________________| - - -The enkf_node object can contain pointers to all types of objects. - - - - - - - -new_type.c (should read README.new_type.h first). -========== -For all the enkf objects we have split the member spesific data, and -the configuration information in two different files (objects): - - ______________ - | | - _________________| Config |_______________ - | | information | | - | /|______________|\ | - | / | \ | - | / | \ | - | / | | | - | | | | | - _|__ __|_ _|__ _|__ _|__ - | | | | | | | | | | - | 01 | | 02 | | 03 | | 04 | | 05 | - |____| |____| |____| |____| |____| - - -The figure shows an ensemble of 5 members (of some type); they all -have a pointer to a common configuration object. The thought behind -this is that all members should share configuration information, -i.e. for instance all the members in a permeability field should have -the same active/inactive cells, all the relperm instances should use -the same relperm model e.t.c. This file is about implementing the data -members, i.e. the small boxes. The implementation of the config -object, is discussed in README.new_type_config.c. - - -1. alloc_ftype: new_type * new_type_alloc(const new_type_config *); - -------------------------------------------- - - This function takes a pointer to a config object of the right type - (i.e. new_type_config_type in this case), reads the required - configuration information from this object, and returns a new new_type - instance. - - -2. ecl_write_ftype: void new_type_ecl_write(const new_type * , const char *); - -------------------------------------------------------------------------- - This function takes a const pointer to a new_type instance, along - with a filename. The function should write eclipse data to the - filename specified in the second argument. - - - -3. fread_ftype: void new_type_fread(new_type * , FILE * ); - ------------------------------------------------ - This function should take a pointer to a new_type object, and a - stream opened for reading as input, and then read in data for the - object from disk. - - -4. fwrite_ftype: void new_type_fwrite(new_type * , FILE * ); - ------------------------------------------------ - This function should take a pointer to a new_type object, and a - stream opened for writing as input, and then write the data from - the object to disk. The two functions instances fread_ftype - and - fwrite_ftype must of course match, but apart from that they are - quite free. - - -5. copyc_ftype: new_type * new_type_copyc(const new_type *); - --------------------------------------------------------------- - This function takes a const pointer to a new_type instance. A new - new_type copy instance with identical data is created. The two - instance share config object. - - -6. initialize_ftype: void new_type_initialize(new_type * , int); - ------------------------------------------------------------ - This function takes a pointer to a new_type instance, and a an - ensemble number as input; it should then initialize the data of - the new_type object - this can either be done by sampling a random - number according to some distribution, by reading in input from an - external program or by calling an external program (i.e. RMS). - - -7. serialize_ftype: int (const new_type * , int , size_t , double * , size_t , size_t , bool *); - -------------------------------------------------------------------------------------------- - This one is a bit tricky ... The enkf_state object, holding among - others things instances of new_type * can be illustrated as this: - - - -------------- - | enkf_state | - ============== ---------------- - | PRESSURE |-------->| Pressure data| - |------------| ---------------- - | New_type |---| - -------------- | ----------------- - | multz | |-------->| new_type data | - -------------- ----------------- - | - | -------------- - |------>| multz data | - -------------- - - The key point of this figure is that the various data we want to - update with enkf are at random locations in memory. To be able to - do the - A' = AX - - matrix multiplication we must assemble this data in a long - vector. That is what is meant by serializing. The serialize - routine is so complicated for (at least) two reasons: - - o We can allocate a certain amount of memory, and then the - serialize routines should continue until the available memory - is exhausted, update and the resume. - - o For efficiency reasons a "funny" stride should be used. - - - -8. deserialize_ftype: int new_type_deserialize(new_type * , int , size_t , const double * , size_t , size_t); - --------------------------------------------------------------------------------------------------------- - This is "just" the opposite of serialize, take data back after the - update (matrix multiplication). - - -9. free_ftype: void new_type_free(new_type *); - ------------------------------------------- - This function should free all the memory used by the new_type - instance. Observe that the config pointer should be left alone, - that will be collected elsewhere. - -10. free_data_ftype: void new_type_free_data(new_type *); - ----------------------------------------------------- - This function should free the data of the new_type instance, but - retain the new_type holding structure. This function is called - after an instance has swapped to disk. - -11. realloc_data_ftype: void (new_type *); - -------------------------------------------------------------- - This function is the "opposite" of function number 10, i.e. it - is to reallocate memory to hold the actual data. - - -12. ensemble_fprintf_results_ftype * fprintf_results - -------------------------------------------------------------- - This function is used to print the reuslts in a formatted nice way. Only - applicable for variables with small amounts of data, like gen_kw. - -13. ecl_load_ftype: void (new_type * , const char * run_path , const char * eclbase, const ecl_sum_type , int report_step) - ----------------------------------------------------------------- - This function is used to load ECLIPSE results from a complete - forward simulation. Observe that the restart data are not loaded - through this interface, and that the summary datka get an - ecl_sum_type * instance for convenience. If you want to add a new - which should be loaded from a eclipse directory, you must manage - with the run_path ankd ecl_base input. - - -Now - since the enkf_node objects can point to arbitrary types of -object the data pointer is a void pointer, and the function pointer -expect (void *) as input, instead of pointers to e.g. new_type -instances. To cast from the typed functions listed above, to functions -accepting (void *) there are several utility functions, i.e. the macro -VOID_ECL_WRITE() will create a void * version of the XXX_ecl_write() -function: - -The macro call: VOID_ECL_WRITE(new_type) will generate the following code: - - void new_type_ecl_write__(void *__new_type) { - new_type_ecl_write( (new_type *) __new_type); - } - -And the macro VOID_ECL_WRITE_HEADER(new_type) will generate the -corresponding header. These (void) functions are the ones used when -initializing the function pointers in the enkf_node object. For -instance for registering the new_type object in the enkf_node -implementation (function: enkf_node_alloc_empty) - -.... -.... -case(NEW_TYPE): - node->alloc = new_type_alloc__; - node->fwrite_f = new_type_fwrite__; - ... - -*/ - - - -/* -OK - here comes the implementation: -*/ - -/* - These are standard header files needed by almost any C-program: -*/ -#include -#include -#include -#include - -/* - Lots of small utility functions for: memory handling, string - handling and file handling. Implemented in the libutil library. -*/ -#include - - -/* - Lots of (ugly) C-macros to generate anonymous versions of the various - functions listed above. -*/ -#include - - -/* - This file contains several enum typedefs, the most important one in - this context is the ert_impl_type; the NEW_TYPE should be added to - this (at the end). -*/ -#include - - -/* - The header file for the actual new_type object. -*/ -#include - - - -/* - These two #define statements, along with the macros found in - enkf_debug.h allow for some simple run_time checks of the various - casts. Observe that the header file enkf_debug.h is included from - the current directory; it is *not* installed in an include/ - directory. -*/ -#define TARGET_TYPE NEW_TYPE /* The variable type in this file - according to the ert_impl_type classification */ -#define DEBUG /* We want debugging */ -#include "enkf_debug.h" - - - -/* - Here comes the new_type_struct defintion: -*/ - -struct new_type_struct { - DEBUG_DECLARE - const new_type_config_type *config; - - 1: scalar_type *scalar; - 2: double *data; -}; - -/* - Observe the following properties of the struct: - - 1. The statement DEBUG_DECLARE inserts a variable __impl_type as the - first element of the struct (if debugging is enabled) with - #define DBEUG. This should be the first element in the struct. - - 2. The struct contains a pointer to a new_type_config_type object; - this pointer is const, as the new_type instances are not allowed - to write the configuration information (it is shared among many - instances), only read it. - - 3. The actual data is stored in either a scalar instance, or just as - double * data. (1: and 2: is *NOT* some new funny C-syntax). - - The scalar_type object is described further down. If use of - scalar_type is not appropriate, you must store the data in some - other way. There are no formal rules to this, but if you stick to - the suggested "double *data;" convention suggested above, you - will get several macros for algebraic manipulation (adding, - scaling, squaring +++) of new_type instances for free. - - Hence - it is *strongly* recommended to use either: - - scalar_type * scalar; - - or - - double * data; - - to hold the actual data. -*/ - - -/* -scalar_type -=========== -This type is implemented in scalar.c / scalar_config.c. -*/ - - - - diff --git a/ThirdParty/Ert/libenkf/src/README.obs b/ThirdParty/Ert/libenkf/src/README.obs deleted file mode 100644 index 96e7c8443b..0000000000 --- a/ThirdParty/Ert/libenkf/src/README.obs +++ /dev/null @@ -1,52 +0,0 @@ -/** - -Observations/measurements are handled by three different (toplevel) -objects: - - -obs_node_type -------------- -This object contians qualitative information about the observations, -i.e. when they are active, what is the error of the observations, what -type they are, and how to measure them. The obs_node_type object -contains the two function pointers: - - get_obs : void (const void* , int , * obs_data_type) - measure : void (const void * , const voide * , meas_vector_type) - -The first of these, get_obs, is used to load/get the actual -observation, that can typically be to get an historical rate from the -history; the data is pushed onto an instance of obs_data_type. measure -on the other is used to extract information from the ensemble state, -i.e. measure for instance a simulated rate or a pressure, and push the -data onto a meas_vector_type instance. - -Several obs_node instances are collected in the enkf_obs type, which -is mostly a hash table of obs_node instances. - -The obs_node_type lives through the whole simulation, this in contrast -to the two other data types involved in the process. - - -obs_data_type -------------- -This data type is used to store all the observation AT ONE -TIMESTEP. New observations are just added with a obs_data_add(), and -the structure grows as necessary. Before the next timestep, the -obs_data_type instance is reset. - - -meas_vector_type / meas_matrix_type ------------------------------------ -This data type is used in the same way as the obs_data_type, for -measurements. When an eclipse integration is complete the -obs_node->measure function is called, and the measurements are pushed -onto the meas_vector. (The whole ensemble corresponds to meas_matrix_type). - - -Analysis --------- -Observe that the analysis step ONLY involves a meas_matrix_type -instance and an obs_data instance. - ------------------------------------------------------------------ diff --git a/ThirdParty/Ert/libenkf/src/README.paths b/ThirdParty/Ert/libenkf/src/README.paths deleted file mode 100644 index 8048a837b0..0000000000 --- a/ThirdParty/Ert/libenkf/src/README.paths +++ /dev/null @@ -1,25 +0,0 @@ -The enkf program uses an object call path_fmt_type to store/configure -various paths and filenames (The path_fmt_type is implemented in the -libutil library). For instance the main configuration file must -contain a line like this: - - RUNPATH /tmp/Eclipse/tmpdir_%04d - -This is actually a format string, so when we want to get/make a -directory for an eclipse simulation, the %04d is replaced with the -actual ensemble member. Usage example: - -/* This is common to all members in the ensemble */ -path_fmt_type * run_path_fmt = path_fmt_alloc_directory_fmt("/tmp/Eclipse/tmpdir_%04d" , true); -... -... -/* For a spesific member: */ -{ - char * run_path = path_fmt_alloc_path(run_path_fmt , iens); - -} - - - - - diff --git a/ThirdParty/Ert/libenkf/src/active_list.c b/ThirdParty/Ert/libenkf/src/active_list.c deleted file mode 100644 index 6836db3e89..0000000000 --- a/ThirdParty/Ert/libenkf/src/active_list.c +++ /dev/null @@ -1,234 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'active_list.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include - -#include -#include - -#include -#include -#include - - -/** - This file implements a small structure used to denote which - elements of a node/observation which is active. At the lowest level - the active elements in a node is just a list of integers. This - list of integers, with som extra twists is what is implemented - here. - - All the xxx_config objects have a pointer to an active_list - instance. This pointer is passed to the enkf_serialize / - enkf_deserialize routines. - - Observe that for the (very important!!) special case that all - elements are active the (int *) pointer should not be accessed, and - the code here is free to return NULL. - - -Example -------- - -Consider a situation where faults number 0,4 and 5 should be active in -a fault object. Then the code will be like: - - - .... - active_list_reset(multflt_config->active_list); - active_list_add_index(multflt_config->active_list , 0); - active_list_add_index(multflt_config->active_list , 4); - active_list_add_index(multflt_config->active_list , 5); - .... - - When this fault object is serialized/deserialized only the elements - 0,4,5 are updated. -*/ - - -#define ACTIVE_LIST_TYPE_ID 66109 - -struct active_list_struct { - UTIL_TYPE_ID_DECLARATION; - active_mode_type mode; /* ALL_ACTIVE | INACTIVE | PARTLY_ACTIVE */ - int_vector_type *index_list; /* A list of active indices - if data_size == active_size this can be NULL. */ -}; - -/*****************************************************************/ - - -static UTIL_SAFE_CAST_FUNCTION(active_list , ACTIVE_LIST_TYPE_ID) -UTIL_IS_INSTANCE_FUNCTION( active_list , ACTIVE_LIST_TYPE_ID) - - - - -/** - The newly created active_list default to setting all indices actiove. -*/ -active_list_type * active_list_alloc( ) { - active_list_type * active_list = util_malloc(sizeof * active_list); - UTIL_TYPE_ID_INIT( active_list , ACTIVE_LIST_TYPE_ID ); - active_list->index_list = int_vector_alloc(0 , -1); - active_list->mode = ALL_ACTIVE; - return active_list; -} - - -active_list_type * active_list_alloc_copy( const active_list_type * src) { - active_list_type * new = active_list_alloc( ); - new->mode = src->mode; - int_vector_free( new->index_list ) ; - new->index_list = int_vector_alloc_copy( src->index_list ); - return new; -} - - -void active_list_copy( active_list_type * target , const active_list_type * src) { - target->mode = src->mode; - int_vector_memcpy( target->index_list , src->index_list); -} - - -void active_list_free( active_list_type * active_list ) { - int_vector_free(active_list->index_list); - free(active_list); -} - - - -void active_list_free__( void * arg ) { - active_list_type * active_list = active_list_safe_cast ( arg ); - active_list_free(active_list); -} - - - - - -/* - Setting the counter back to zero - i.e. a call to - active_list_reset() will mean that we have *NO* active elements. -*/ -void active_list_reset(active_list_type * active_list) { - int_vector_reset( active_list->index_list ); -} - - -/** - Appends a new index to the current list of active indices, and - setting the mode to PARTLY_ACTIVE. -*/ -void active_list_add_index(active_list_type * active_list, int new_index) { - active_list->mode = PARTLY_ACTIVE; - int_vector_append( active_list->index_list , new_index ); -} - - - - - - - - -/** - When mode == PARTLY_ACTIVE the active_list instance knows the size - of the active set; if the mode is INACTIVE 0 will be returned and - if the mode is ALL_ACTIVE the input parameter @total_size will be - passed back to calling scope. -*/ - - -int active_list_get_active_size(const active_list_type * active_list, int total_size) { - int active_size; - switch( active_list->mode ) { - case PARTLY_ACTIVE: - active_size = int_vector_size( active_list->index_list ); - break; - case INACTIVE: - active_size = 0; - break; - case ALL_ACTIVE: - active_size = total_size; - break; - default: - util_abort("%s: internal fuckup \n",__func__); - active_size = -1; - } - return active_size; -} - - -active_mode_type active_list_get_mode(const active_list_type * active_list) { - return active_list->mode; -} - - - -/** - This will return a (const int *) pointer to the active indices. IFF - (mode == INACTIVE || mode == ALL_ACTIVE) it will instead just - return NULL. In that case it is the responsability of the calling - scope to not dereference the NULL pointer. -*/ - -const int * active_list_get_active(const active_list_type * active_list) { - if (active_list->mode == PARTLY_ACTIVE) - return int_vector_get_const_ptr( active_list->index_list ); - else - return NULL; -} - - -bool active_list_iget( const active_list_type * active_list , int index ) { - if (active_list->mode == ALL_ACTIVE) - return true; - else if (active_list->mode == INACTIVE) - return false; - else - return int_vector_iget( active_list->index_list , index ); -} - -void active_list_summary_fprintf( const active_list_type * active_list , const char *dataset_key, const char *key , FILE * stream) { - int number_of_active = int_vector_size( active_list->index_list ); - if (active_list->mode == ALL_ACTIVE){ - fprintf(stream , "NUMBER OF ACTIVE:%d,STATUS:%s,", number_of_active, "ALL_ACTIVE"); - } - else if (active_list->mode == PARTLY_ACTIVE){ - fprintf(stream , "NUMBER OF ACTIVE:%d,STATUS:%s,", number_of_active, "PARTLY_ACTIVE"); - } - else - fprintf(stream , "NUMBER OF ACTIVE:%d,STATUS:%s,", number_of_active, "INACTIVE"); -} - - - -bool active_list_equal( const active_list_type * active_list1 , const active_list_type * active_list2) { - if (active_list1 == active_list2) - return true; - else { - if (active_list1->mode != active_list2->mode) - return false; - else { - if (active_list1->mode == PARTLY_ACTIVE) - return int_vector_equal( active_list1->index_list , active_list2->index_list); - else - return true; - } - } -} diff --git a/ThirdParty/Ert/libenkf/src/active_node.c b/ThirdParty/Ert/libenkf/src/active_node.c deleted file mode 100644 index b1434610db..0000000000 --- a/ThirdParty/Ert/libenkf/src/active_node.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'active_node.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include -#include -#include - -/** - This file implements the two most basic objects used in the mapping - of active/inactive observations and variables. One of these nodes - contains the information necessary to activate/deactivate one - variable/observation. -*/ - - -/** - This struct implements the holding information for the - activation/deactivation of one variable. -*/ - -struct active_var_struct { - const enkf_config_node_type * config_node; /* The enkf_config_node instance this is all about - pointer to *shared* resource. */ - active_mode_type active_mode; - void * active_config; /* An object (type depending on datatype of config_node) used to hold info abourt partly active variable. - Owned by this object. If active_mode == all_active or active_mode == inactive, this can be NULL. */ - active_config_destructor_ftype * free_active_config; /* Destructor for the active_config object, can be NULL if that object is NULL. */ -}; - - - -/** - Similar to active_var_struct, but for observations. -*/ -struct active_obs_struct { - const obs_vector_type * obs_vector; /* The obs_node instance this is all about - pointer to *shared* resource. */ - active_mode_type active_mode; - void * active_config; /* An object (type depending on datatype of obs_node) used to hold info abourt partly active variable. - Owned by this object. If active_mode == all_active or active_mode == inactive, this can be NULL. */ - active_config_destructor_ftype * free_active_config; /* Destructor for the active_config object, can be NULL if that object is NULL. */ -}; - - - - diff --git a/ThirdParty/Ert/libenkf/src/analysis_config.c b/ThirdParty/Ert/libenkf/src/analysis_config.c deleted file mode 100644 index f5c8200df3..0000000000 --- a/ThirdParty/Ert/libenkf/src/analysis_config.c +++ /dev/null @@ -1,718 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'analysis_config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -#include - -#include -#include -#include -#include -#include - - -#define ANALYSIS_CONFIG_TYPE_ID 64431306 - -struct analysis_config_struct { - UTIL_TYPE_ID_DECLARATION; - hash_type * analysis_modules; - analysis_module_type * analysis_module; - char * log_path; /* Points to directory with update logs. */ - bool merge_observations; /* When observing from time1 to time2 - should ALL observations in between be used? */ - bool rerun; /* Should we rerun the simulator when the parameters have been updated? */ - int rerun_start; /* When rerunning - from where should we start? */ - - double overlap_alpha; - double std_cutoff; - - char * PC_filename; - char * PC_path; - bool store_PC; - bool single_node_update; /* When creating the default ALL_ACTIVE local configuration. */ - rng_type * rng; - analysis_iter_config_type * iter_config; - int min_realisations; - bool stop_long_running; - bool std_scale_correlated_obs; - int max_runtime; - double global_std_scaling; -}; - - - - -UTIL_IS_INSTANCE_FUNCTION( analysis_config , ANALYSIS_CONFIG_TYPE_ID ) - -/*****************************************************************/ -/* - -Interacting with modules ------------------------- - -The modules which are included in the build must be installed/loaded with a -hard-coded call to analysis_config_load_internal_module(). External modules -are loaded with the config statement: - - ANALYSIS_LOAD ModuleName libfile - -Where 'ModuleName is the name you want to use to refer to the module, and -libfile is the name of the library file which implements the analysis -module[1]. - -It is possible to create a copy of an analysis module under a different -name, this can be convenient when trying out the same algorithm with -different parameter settings. I.e. based on the built in module STD_ENKF we -can create two copies with high and low truncation respectively: - - ANALYSIS_COPY STD_ENKF ENKF_HIGH_TRUNCATION - ANALYSIS_COPY STD_ENKF ENKF_LOW_TRUNCATION - -The copy operation does not differentiate between external and internal -modules. When a module has been loaded you can set internal parameters for -the module with the config command: - - ANALYSIS_SET_VAR ModuleName VariableName Value - -The module will be called with a function for setting variables which gets -the VariableName and value parameters as input; if the module recognizes -VariableName and Value is of the right type the module should set the -internal variable accordingly. If the module does not recognize the -variable name a warning will be printed on stderr, but no further action. - -The actual analysis module to use is selected with the statement: - -ANALYSIS_SELECT ModuleName - -[1] The libfile argument should include the '.so' extension, and can - optionally contain a path component. The libfile will be passed directly to - the dlopen() library call, this implies that normal runtime linking - conventions apply - i.e. you have three options: - - 1. The library name is given with a full path. - 2. The library is in a standard location for shared libraries. - 3. The library is in one of the directories mentioned in the - LD_LIBRARY_PATH environment variable. - -*/ - - -/*****************************************************************/ - -bool analysis_config_have_enough_realisations( const analysis_config_type * config , int realisations, int ensemble_size) { - if (config->min_realisations > 0) { - /* A value > 0 has been set in the config; compare with this value. */ - return realisations >= config->min_realisations; - } - else { - return realisations >= ensemble_size; - } -} - -void analysis_config_set_stop_long_running( analysis_config_type * config, bool stop_long_running ) { - config->stop_long_running = stop_long_running; -} - -bool analysis_config_get_stop_long_running( const analysis_config_type * config) { - return config->stop_long_running; -} - -bool analysis_config_get_std_scale_correlated_obs( const analysis_config_type * config) { - return config->std_scale_correlated_obs; -} - -void analysis_config_set_std_scale_correlated_obs( analysis_config_type * config, bool std_scale_correlated_obs) { - config->std_scale_correlated_obs = std_scale_correlated_obs; -} - -double analysis_config_get_global_std_scaling(const analysis_config_type * config) { - return config->global_std_scaling; -} - -void analysis_config_set_global_std_scaling(analysis_config_type * config, double global_std_scaling) { - config->global_std_scaling = global_std_scaling; -} - -int analysis_config_get_max_runtime( const analysis_config_type * config ) { - return config->max_runtime; -} - -void analysis_config_set_max_runtime( analysis_config_type * config, int max_runtime ) { - config->max_runtime = max_runtime; -} - -static void analysis_config_set_min_realisations( analysis_config_type * config , int min_realisations) { - config->min_realisations = min_realisations; -} - -void analysis_config_set_alpha( analysis_config_type * config , double alpha) { - config->overlap_alpha = alpha; -} - -stringlist_type * analysis_config_alloc_module_names( analysis_config_type * config ) { - return hash_alloc_stringlist( config->analysis_modules ); -} - - -double analysis_config_get_alpha(const analysis_config_type * config) { - return config->overlap_alpha; -} - -void analysis_config_set_store_PC( analysis_config_type * config , bool store_PC) { - config->store_PC = store_PC; -} - -bool analysis_config_get_store_PC( const analysis_config_type * config ) { - return config->store_PC; -} - -void analysis_config_set_PC_filename( analysis_config_type * config , const char * filename ) { - config->PC_filename = util_realloc_string_copy( config->PC_filename , filename ); -} - -const char * analysis_config_get_PC_filename( const analysis_config_type * config ) { - return config->PC_filename; -} - - -void analysis_config_set_PC_path( analysis_config_type * config , const char * path ) { - config->PC_path = util_realloc_string_copy( config->PC_path , path ); -} - -const char * analysis_config_get_PC_path( const analysis_config_type * config ) { - return config->PC_path; -} - -void analysis_config_set_std_cutoff( analysis_config_type * config , double std_cutoff ) { - config->std_cutoff = std_cutoff; -} - -double analysis_config_get_std_cutoff(const analysis_config_type * config) { - return config->std_cutoff; -} - - -void analysis_config_set_log_path(analysis_config_type * config , const char * log_path ) { - config->log_path = util_realloc_string_copy(config->log_path , log_path); -} - - -/** - Will in addition create the path. -*/ -const char * analysis_config_get_log_path( const analysis_config_type * config ) { - util_make_path( config->log_path ); - return config->log_path; -} - - - -void analysis_config_set_rerun_start( analysis_config_type * config , int rerun_start ) { - config->rerun_start = rerun_start; -} - -void analysis_config_set_rerun(analysis_config_type * config , bool rerun) { - config->rerun = rerun; -} - -bool analysis_config_get_rerun(const analysis_config_type * config) { - return config->rerun; -} - -void analysis_config_set_single_node_update(analysis_config_type * config , bool single_node_update) { - config->single_node_update = single_node_update; -} - -bool analysis_config_get_single_node_update(const analysis_config_type * config) { - return config->single_node_update; -} - - -int analysis_config_get_rerun_start(const analysis_config_type * config) { - return config->rerun_start; -} - - -void analysis_config_set_merge_observations( analysis_config_type * config , bool merge_observations) { - config->merge_observations = merge_observations; -} - - - -/*****************************************************************/ - -void analysis_config_load_internal_module( analysis_config_type * config , - const char * symbol_table ) { - analysis_module_type * module = analysis_module_alloc_internal( config->rng , symbol_table ); - if (module != NULL) - hash_insert_hash_owned_ref( config->analysis_modules , analysis_module_get_name( module ) , module , analysis_module_free__ ); - else - fprintf(stderr,"** Warning: failed to load module %s from %s.\n", analysis_module_get_name( module ) , symbol_table); -} - - -void analysis_config_load_all_external_modules_from_config ( analysis_config_type * analysis, const config_content_type * config) { - - if (config_content_has_item( config, ANALYSIS_LOAD_KEY)) { - const config_content_item_type * load_item = config_content_get_item( config , ANALYSIS_LOAD_KEY ); - for (int i=0; i < config_content_item_get_size( load_item ); i++) { - const config_content_node_type * load_node = config_content_item_iget_node( load_item , i ); - const char * user_name = config_content_node_iget( load_node , 0 ); - const char * lib_name = config_content_node_iget( load_node , 1 ); - - analysis_config_load_external_module( analysis , lib_name , user_name); - } - } -} - - -bool analysis_config_load_external_module( analysis_config_type * config , - const char * lib_name, - const char * user_name) { - analysis_module_type * module = analysis_module_alloc_external( config->rng , lib_name ); - if (module != NULL) { - if (user_name) - analysis_module_set_name(module, user_name); - hash_insert_hash_owned_ref( config->analysis_modules , analysis_module_get_name( module ) , module , analysis_module_free__ ); - return true; - } else { - fprintf(stderr,"** Warning: failed to load module from %s.\n",lib_name); - return false; - } -} - - -void analysis_config_add_module_copy( analysis_config_type * config , - const char * src_name , - const char * target_name) { - const analysis_module_type * src_module = analysis_config_get_module( config , src_name ); - analysis_module_type * target_module; - - if (analysis_module_internal( src_module )) { - const char * symbol_table = analysis_module_get_table_name( src_module ); - target_module = analysis_module_alloc_internal( config->rng , symbol_table ); - } else { - const char * lib_name = analysis_module_get_lib_name( src_module ); - target_module = analysis_module_alloc_external( config->rng , lib_name ); - } - - hash_insert_hash_owned_ref( config->analysis_modules , target_name , target_module , analysis_module_free__ ); - analysis_module_set_name( target_module , target_name ); -} - - - -/* - If module_name == NULL we will reload the current module. Unloading - modules is based on the dlclose() system call; internally the - dlopen() / dlclose() systems implements a reference counting to the - shared objects, i.e. if you have several modules defined in the same - shared library the dlclose() call will not unload the module - completely, and a subsequent dlopen() call will be satisfied by the - stale shared objects still mapped. Practically this means that: - - * Internal modules (all in libanalysis.so) can not be reloaded. - - * Modules which have been involved in copy operations, either as - source or target can not be reloaded. -*/ - -void analysis_config_reload_module( analysis_config_type * config , const char * module_name) { - analysis_module_type * module; - if (module_name != NULL) - module = analysis_config_get_module( config , module_name ); - else - module = config->analysis_module; - - if (!analysis_module_internal( module )) { - char * user_name = util_alloc_string_copy(analysis_module_get_name( module )); - char * lib_name = util_alloc_string_copy(analysis_module_get_lib_name( module )); - - bool is_current = false; - if (module == config->analysis_module) { - config->analysis_module = NULL; - is_current = true; - } - - hash_del( config->analysis_modules , user_name ); - analysis_config_load_external_module( config , user_name , lib_name ); - if (is_current) - analysis_config_select_module( config , user_name ); - - free( lib_name ); - free( user_name ); - } else - fprintf(stderr,"** Warning: Internal modules can not be reloaded.\n"); -} - - -analysis_module_type * analysis_config_get_module( analysis_config_type * config , const char * module_name ) { - return hash_get( config->analysis_modules , module_name ); -} - -bool analysis_config_has_module(analysis_config_type * config , const char * module_name) { - return hash_has_key( config->analysis_modules , module_name ); -} - -bool analysis_config_get_module_option( const analysis_config_type * config , long flag) { - if (config->analysis_module) - return analysis_module_check_option(config->analysis_module , flag); - else - return false; -} - - -bool analysis_config_select_module( analysis_config_type * config , const char * module_name ) { - if (analysis_config_has_module( config , module_name )) { - analysis_module_type * module = analysis_config_get_module( config , module_name ); - - if (analysis_module_check_option( module , ANALYSIS_ITERABLE)) { - if (analysis_config_get_single_node_update( config )) { - fprintf(stderr," ** Warning: the module:%s requires the setting \"SINGLE_NODE_UPDATE FALSE\" in the config file.\n" , module_name); - fprintf(stderr," ** the module has NOT been selected. \n"); - return false; - } - } - - config->analysis_module = module; - return true; - } else { - if (config->analysis_module == NULL) - util_abort("%s: sorry module:%s does not exist - and no module currently selected\n",__func__ , module_name); - else - fprintf(stderr , "** Warning: analysis module:%s does not exist - current selection unchanged:%s\n", - module_name , - analysis_module_get_name( config->analysis_module )); - return false; - } -} - - -analysis_module_type * analysis_config_get_active_module( analysis_config_type * config ) { - return config->analysis_module; -} - - -const char * analysis_config_get_active_module_name( const analysis_config_type * config ) { - if (config->analysis_module) - return analysis_module_get_name( config->analysis_module ); - else - return NULL; -} - - - -/*****************************************************************/ - - -void analysis_config_load_internal_modules( analysis_config_type * config ) { - analysis_config_load_internal_module( config , "STD_ENKF"); - analysis_config_load_internal_module( config , "NULL_ENKF"); - analysis_config_load_internal_module( config , "SQRT_ENKF"); - analysis_config_load_internal_module( config , "CV_ENKF"); - analysis_config_load_internal_module( config , "BOOTSTRAP_ENKF"); - analysis_config_load_internal_module( config , "FWD_STEP_ENKF"); - analysis_config_select_module( config , DEFAULT_ANALYSIS_MODULE); -} - -/** - The analysis_config object is instantiated with the default values - for enkf_defaults.h -*/ - -void analysis_config_init( analysis_config_type * analysis , const config_content_type * config ) { - if (config_content_has_item( config , UPDATE_LOG_PATH_KEY )) - analysis_config_set_log_path( analysis , config_content_get_value( config , UPDATE_LOG_PATH_KEY )); - - if (config_content_has_item( config , STD_CUTOFF_KEY )) - analysis_config_set_std_cutoff( analysis , config_content_get_value_as_double( config , STD_CUTOFF_KEY )); - - if (config_content_has_item( config , ENKF_ALPHA_KEY )) - analysis_config_set_alpha( analysis , config_content_get_value_as_double( config , ENKF_ALPHA_KEY )); - - if (config_content_has_item( config , ENKF_MERGE_OBSERVATIONS_KEY )) - analysis_config_set_merge_observations( analysis , config_content_get_value_as_bool( config , ENKF_MERGE_OBSERVATIONS_KEY )); - - if (config_content_has_item( config , ENKF_RERUN_KEY )) - analysis_config_set_rerun( analysis , config_content_get_value_as_bool( config , ENKF_RERUN_KEY )); - - if (config_content_has_item( config , SINGLE_NODE_UPDATE_KEY )) - analysis_config_set_single_node_update( analysis , config_content_get_value_as_bool( config , SINGLE_NODE_UPDATE_KEY )); - - if (config_content_has_item( config , STD_SCALE_CORRELATED_OBS_KEY )) - analysis_config_set_std_scale_correlated_obs( analysis , config_content_get_value_as_bool( config , STD_SCALE_CORRELATED_OBS_KEY )); - - if (config_content_has_item( config , RERUN_START_KEY )) - analysis_config_set_rerun_start( analysis , config_content_get_value_as_int( config , RERUN_START_KEY )); - - if (config_content_has_item( config , MIN_REALIZATIONS_KEY )) { - - config_content_node_type * config_content = config_content_get_value_node(config , MIN_REALIZATIONS_KEY); - char * min_realizations_string = config_content_node_alloc_joined_string(config_content, " "); - - int num_realizations = config_content_get_value_as_int(config, NUM_REALIZATIONS_KEY); - int min_realizations = DEFAULT_ANALYSIS_MIN_REALISATIONS; - double percent = 0.0; - if (util_sscanf_percent(min_realizations_string, &percent)) { - - min_realizations = num_realizations * percent/100; - } else { - bool min_realizations_int_exists = util_sscanf_int(min_realizations_string, &min_realizations); - if (!min_realizations_int_exists) - fprintf(stderr, "Method %s: failed to read integer value for MIN_REALIZATIONS_KEY\n", __func__); - } - - if (min_realizations > num_realizations) - min_realizations = num_realizations; - - analysis_config_set_min_realisations(analysis, min_realizations); - free(min_realizations_string); - } - - if (config_content_has_item( config , STOP_LONG_RUNNING_KEY )) - analysis_config_set_stop_long_running( analysis , config_content_get_value_as_bool( config , STOP_LONG_RUNNING_KEY )); - - if (config_content_has_item( config, MAX_RUNTIME_KEY)) { - analysis_config_set_max_runtime( analysis, config_content_get_value_as_int( config, MAX_RUNTIME_KEY )); - } - - - /* Loading external modules */ - analysis_config_load_all_external_modules_from_config(analysis, config); - - - /* Reload/copy modules. */ - { - if (config_content_has_item( config , ANALYSIS_COPY_KEY )) { - const config_content_item_type * copy_item = config_content_get_item( config , ANALYSIS_COPY_KEY ); - for (int i=0; i < config_content_item_get_size( copy_item ); i++) { - const config_content_node_type * copy_node = config_content_item_iget_node( copy_item , i ); - const char * src_name = config_content_node_iget( copy_node , 0 ); - const char * target_name = config_content_node_iget( copy_node , 1 ); - - analysis_config_add_module_copy( analysis , src_name , target_name); - } - } - } - - - /* Setting variables for analysis modules */ - { - if (config_content_has_item( config , ANALYSIS_SET_VAR_KEY )) { - const config_content_item_type * assign_item = config_content_get_item( config , ANALYSIS_SET_VAR_KEY ); - for (int i=0; i < config_content_item_get_size( assign_item ); i++) { - const config_content_node_type * assign_node = config_content_item_iget_node( assign_item , i ); - - const char * module_name = config_content_node_iget( assign_node , 0 ); - const char * var_name = config_content_node_iget( assign_node , 1 ); - analysis_module_type * module = analysis_config_get_module( analysis , module_name ); - { - char * value = NULL; - - for (int j=2; j < config_content_node_get_size( assign_node ); j++) { - const char * config_value = config_content_node_iget( assign_node , j ); - if (value == NULL) - value = util_alloc_string_copy( config_value ); - else { - value = util_strcat_realloc( value , " " ); - value = util_strcat_realloc( value , config_value ); - } - } - - analysis_module_set_var( module , var_name , value ); - free( value ); - } - } - } - } - - if (config_content_has_item( config, ANALYSIS_SELECT_KEY )) - analysis_config_select_module( analysis , config_content_get_value( config , ANALYSIS_SELECT_KEY )); - - analysis_iter_config_init( analysis->iter_config , config ); -} - - - -bool analysis_config_get_merge_observations(const analysis_config_type * config) { - return config->merge_observations; -} - - -analysis_iter_config_type * analysis_config_get_iter_config( const analysis_config_type * config ) { - return config->iter_config; -} - - -void analysis_config_free(analysis_config_type * config) { - analysis_iter_config_free( config->iter_config ); - hash_free( config->analysis_modules ); - free( config->log_path ); - free( config->PC_filename ); - free( config->PC_path ); - free( config ); -} - - - -analysis_config_type * analysis_config_alloc( rng_type * rng ) { - analysis_config_type * config = util_malloc( sizeof * config ); - UTIL_TYPE_ID_INIT( config , ANALYSIS_CONFIG_TYPE_ID ); - - config->log_path = NULL; - config->PC_filename = NULL; - config->PC_path = NULL; - - analysis_config_set_alpha( config , DEFAULT_ENKF_ALPHA ); - analysis_config_set_std_cutoff( config , DEFAULT_ENKF_STD_CUTOFF ); - analysis_config_set_merge_observations( config , DEFAULT_MERGE_OBSERVATIONS ); - analysis_config_set_rerun( config , DEFAULT_RERUN ); - analysis_config_set_rerun_start( config , DEFAULT_RERUN_START ); - analysis_config_set_single_node_update( config , DEFAULT_SINGLE_NODE_UPDATE ); - analysis_config_set_log_path( config , DEFAULT_UPDATE_LOG_PATH); - - analysis_config_set_store_PC( config , DEFAULT_STORE_PC ); - analysis_config_set_PC_filename( config , DEFAULT_PC_FILENAME ); - analysis_config_set_PC_path( config , DEFAULT_PC_PATH ); - analysis_config_set_min_realisations( config , DEFAULT_ANALYSIS_MIN_REALISATIONS ); - analysis_config_set_stop_long_running( config , DEFAULT_ANALYSIS_STOP_LONG_RUNNING ); - analysis_config_set_max_runtime( config , DEFAULT_MAX_RUNTIME ); - - config->analysis_module = NULL; - config->analysis_modules = hash_alloc(); - config->rng = rng; - config->iter_config = analysis_iter_config_alloc(); - config->std_scale_correlated_obs = false; - config->global_std_scaling = 1.0; - return config; -} - - - -/*****************************************************************/ -/* - Keywords for the analysis - all optional. The analysis_config object - is instantiated with defaults from enkf_defaults.h -*/ - -void analysis_config_add_config_items( config_parser_type * config ) { - config_schema_item_type * item; - - config_add_key_value( config , ENKF_ALPHA_KEY , false , CONFIG_FLOAT); - config_add_key_value( config , STD_CUTOFF_KEY , false , CONFIG_FLOAT); - config_add_key_value( config , ENKF_MERGE_OBSERVATIONS_KEY , false , CONFIG_BOOL); - config_add_key_value( config , SINGLE_NODE_UPDATE_KEY , false , CONFIG_BOOL); - config_add_key_value( config , ENKF_CROSS_VALIDATION_KEY , false , CONFIG_BOOL); - config_add_key_value( config , ENKF_LOCAL_CV_KEY , false , CONFIG_BOOL); - config_add_key_value( config , ENKF_PEN_PRESS_KEY , false , CONFIG_BOOL); - config_add_key_value( config , ENKF_SCALING_KEY , false , CONFIG_BOOL); - config_add_key_value( config , ENKF_KERNEL_REG_KEY , false , CONFIG_BOOL); - config_add_key_value( config , ENKF_KERNEL_FUNC_KEY , false , CONFIG_INT); - config_add_key_value( config , ENKF_KERNEL_PARAM_KEY , false , CONFIG_INT); - config_add_key_value( config , ENKF_FORCE_NCOMP_KEY , false , CONFIG_BOOL); - config_add_key_value( config , ENKF_NCOMP_KEY , false , CONFIG_INT); - config_add_key_value( config , ENKF_CV_FOLDS_KEY , false , CONFIG_INT); - config_add_key_value( config , ENKF_RERUN_KEY , false , CONFIG_BOOL); - config_add_key_value( config , RERUN_START_KEY , false , CONFIG_INT); - config_add_key_value( config , UPDATE_LOG_PATH_KEY , false , CONFIG_STRING); - config_add_key_value( config , MIN_REALIZATIONS_KEY , false , CONFIG_STRING ); - config_add_key_value( config , MAX_RUNTIME_KEY , false , CONFIG_INT ); - config_add_key_value( config , STD_SCALE_CORRELATED_OBS_KEY, false , CONFIG_BOOL ); - - item = config_add_key_value( config , STOP_LONG_RUNNING_KEY, false, CONFIG_BOOL ); - stringlist_type * child_list = stringlist_alloc_new(); - stringlist_append_ref(child_list, MIN_REALIZATIONS_KEY); - config_schema_item_set_required_children_on_value(item , "TRUE" , child_list); - stringlist_free(child_list); - - config_add_key_value( config , ANALYSIS_SELECT_KEY , false , CONFIG_STRING); - - item = config_add_schema_item( config , ANALYSIS_LOAD_KEY , false ); - config_schema_item_set_argc_minmax( item , 2 , 2); - - item = config_add_schema_item( config , ANALYSIS_COPY_KEY , false ); - config_schema_item_set_argc_minmax( item , 2 , 2); - - - item = config_add_schema_item( config , ANALYSIS_SET_VAR_KEY , false ); - config_schema_item_set_argc_minmax( item , 3 , CONFIG_DEFAULT_ARG_MAX); - analysis_iter_config_add_config_items( config ); -} - - - -void analysis_config_fprintf_config( analysis_config_type * config , FILE * stream) { - fprintf( stream , CONFIG_COMMENTLINE_FORMAT ); - fprintf( stream , CONFIG_COMMENT_FORMAT , "Here comes configuration information related to the EnKF analysis."); - - - if (config->merge_observations != DEFAULT_MERGE_OBSERVATIONS) { - fprintf( stream , CONFIG_KEY_FORMAT , ENKF_MERGE_OBSERVATIONS_KEY); - fprintf( stream , CONFIG_ENDVALUE_FORMAT , CONFIG_BOOL_STRING( config->merge_observations )); - } - - - if (config->std_cutoff != DEFAULT_ENKF_STD_CUTOFF) { - fprintf( stream , CONFIG_KEY_FORMAT , STD_CUTOFF_KEY ); - fprintf( stream , CONFIG_FLOAT_FORMAT , config->std_cutoff ); - fprintf( stream , "\n"); - } - - if (config->overlap_alpha != DEFAULT_ENKF_ALPHA ) { - fprintf( stream , CONFIG_KEY_FORMAT , ENKF_ALPHA_KEY ); - fprintf( stream , CONFIG_FLOAT_FORMAT , config->overlap_alpha ); - fprintf( stream , "\n"); - } - - if (config->single_node_update != DEFAULT_SINGLE_NODE_UPDATE) { - fprintf( stream , CONFIG_KEY_FORMAT , SINGLE_NODE_UPDATE_KEY); - fprintf( stream , CONFIG_ENDVALUE_FORMAT , CONFIG_BOOL_STRING( config->single_node_update )); - } - - if (config->rerun) { - fprintf( stream , CONFIG_KEY_FORMAT , ENKF_RERUN_KEY); - fprintf( stream , CONFIG_ENDVALUE_FORMAT , CONFIG_BOOL_STRING( config->rerun )); - } - - if (config->rerun_start != DEFAULT_RERUN_START) { - fprintf( stream , CONFIG_KEY_FORMAT , RERUN_START_KEY); - fprintf( stream , CONFIG_INT_FORMAT , config->rerun_start ); - fprintf( stream , "\n"); - } - - if (config->log_path != NULL) { - fprintf( stream , CONFIG_KEY_FORMAT , UPDATE_LOG_PATH_KEY); - fprintf( stream , CONFIG_ENDVALUE_FORMAT , config->log_path ); - } - - fprintf(stream , "\n\n"); -} - - - diff --git a/ThirdParty/Ert/libenkf/src/analysis_iter_config.c b/ThirdParty/Ert/libenkf/src/analysis_iter_config.c deleted file mode 100644 index b269ca447d..0000000000 --- a/ThirdParty/Ert/libenkf/src/analysis_iter_config.c +++ /dev/null @@ -1,131 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'analysis_iter_config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include -#include - -#include -#include - -#include - -#include -#include -#include - - -struct analysis_iter_config_struct { - char * case_fmt; - stringlist_type * storage; - int num_iterations; - int num_iter_tries; - bool case_set; - bool num_iterations_set; -}; - - -void analysis_iter_config_set_num_iterations( analysis_iter_config_type * config , int num_iterations) { - config->num_iterations = num_iterations; - config->num_iterations_set = true; -} - -int analysis_iter_config_get_num_iterations( const analysis_iter_config_type * config ) { - return config->num_iterations; -} - -bool analysis_iter_config_num_iterations_set( const analysis_iter_config_type * config ) { - return config->num_iterations_set; -} - - -void analysis_iter_config_set_num_retries_per_iteration( analysis_iter_config_type * config , int num_iter_tries) { - config->num_iter_tries = num_iter_tries; -} - -int analysis_iter_config_get_num_retries_per_iteration( const analysis_iter_config_type * config ) { - return config->num_iter_tries; -} - - -void analysis_iter_config_set_case_fmt( analysis_iter_config_type * config , const char * case_fmt) { - config->case_fmt = util_realloc_string_copy( config->case_fmt , case_fmt ); - config->case_set = true; -} - - -bool analysis_iter_config_case_fmt_set( const analysis_iter_config_type * config ) { - return config->case_set; -} - - -char * analysis_iter_config_get_case_fmt( analysis_iter_config_type * config) { - return config->case_fmt; -} - - -analysis_iter_config_type * analysis_iter_config_alloc() { - analysis_iter_config_type * config = util_malloc( sizeof * config ); - config->case_fmt = NULL; - analysis_iter_config_set_case_fmt( config, DEFAULT_ANALYSIS_ITER_CASE); - config->storage = stringlist_alloc_new(); - analysis_iter_config_set_num_iterations( config , DEFAULT_ANALYSIS_NUM_ITERATIONS ); - analysis_iter_config_set_num_retries_per_iteration(config, DEFAULT_ITER_RETRY_COUNT); - - config->num_iterations_set = false; - config->case_set = false; - return config; -} - -void analysis_iter_config_free( analysis_iter_config_type * config ) { - util_safe_free( config->case_fmt ); - stringlist_free( config->storage ); - util_safe_free( config ); -} - - -const char * analysis_iter_config_iget_case( analysis_iter_config_type * config , int iter) { - if (config->case_fmt != NULL) { - char * fs_case = util_alloc_sprintf( config->case_fmt , iter ); - stringlist_append_owned_ref( config->storage , fs_case); - return fs_case; - } else - return NULL; -} - - -void analysis_iter_config_add_config_items( config_parser_type * config ) { - config_add_key_value( config , ITER_CASE_KEY , false , CONFIG_STRING); - config_add_key_value( config , ITER_COUNT_KEY , false , CONFIG_INT); - config_add_key_value( config , ITER_RETRY_COUNT_KEY , false , CONFIG_INT); -} - - -void analysis_iter_config_init(analysis_iter_config_type * iter_config , const config_content_type * config) { - if (config_content_has_item( config , ITER_CASE_KEY )) - analysis_iter_config_set_case_fmt( iter_config , config_content_get_value( config , ITER_CASE_KEY )); - - if (config_content_has_item( config , ITER_COUNT_KEY )) - analysis_iter_config_set_num_iterations( iter_config , config_content_get_value_as_int( config , ITER_COUNT_KEY )); - - if (config_content_has_item( config , ITER_RETRY_COUNT_KEY )) - analysis_iter_config_set_num_retries_per_iteration( iter_config , config_content_get_value_as_int( config , ITER_RETRY_COUNT_KEY )); -} - - diff --git a/ThirdParty/Ert/libenkf/src/block_fs_driver.c b/ThirdParty/Ert/libenkf/src/block_fs_driver.c deleted file mode 100644 index f22eb6e5ab..0000000000 --- a/ThirdParty/Ert/libenkf/src/block_fs_driver.c +++ /dev/null @@ -1,511 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'block_fs_driver.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - - -typedef struct bfs_struct bfs_type; -typedef struct bfs_config_struct bfs_config_type; - -struct bfs_config_struct { - int fsync_interval; - double fragmentation_limit; - bool read_only; - bool preload; - int block_size; - int max_cache_size; - bool bfs_lock; -}; - - -#define BFS_TYPE_ID 5510643 - -struct bfs_struct { - UTIL_TYPE_ID_DECLARATION; - /*-----------------------------------------------------------------*/ - /* New variables */ - block_fs_type * block_fs; - char * mountfile; // The full path to the file mounted by the block_fs layer - including extension. - - const bfs_config_type * config; -}; - - - -struct block_fs_driver_struct { - FS_DRIVER_FIELDS; - int __id; - int num_fs; - bfs_config_type * config; - - // New variables - bfs_type ** fs_list; -}; - -/*****************************************************************/ - -bfs_config_type * bfs_config_alloc( fs_driver_enum driver_type , bool read_only, bool bfs_lock) { - const int PARAMETER_blocksize = 64; - const int DYNAMIC_blocksize = 64; - const int DEFAULT_blocksize = 64; - - const bool PARAMETER_preload = false; - const bool DYNAMIC_preload = true; - const bool DEFAULT_preload = false; - - const int max_cache_size = 512; - const int fsync_interval = 10; /* An fsync() call is issued for every 10'th write. */ - const double fragmentation_limit = 1.0; /* 1.0 => NO defrag is run. */ - - { - bfs_config_type * config = util_malloc( sizeof * config ); - config->max_cache_size = max_cache_size; - config->fsync_interval = fsync_interval; - config->fragmentation_limit = fragmentation_limit; - config->read_only = read_only; - config->bfs_lock = bfs_lock; - - switch (driver_type) { - case( DRIVER_PARAMETER ): - config->block_size = PARAMETER_blocksize; - config->preload = PARAMETER_preload; - break; - case(DRIVER_DYNAMIC_FORECAST): - config->block_size = DYNAMIC_blocksize; - config->preload = DYNAMIC_preload; - break; - default: - config->block_size = DEFAULT_blocksize; - config->preload = DEFAULT_preload; - } - return config; - } -} - -void bfs_config_free( bfs_config_type * config ) { - free( config ); -} - -/*****************************************************************/ - -static UTIL_SAFE_CAST_FUNCTION(bfs , BFS_TYPE_ID); - -static void bfs_close( bfs_type * bfs ) { - if (bfs->block_fs != NULL) - block_fs_close( bfs->block_fs , false); - free( bfs->mountfile ); - free( bfs ); -} - - -static void * bfs_close__( void * arg ) { - bfs_type * bfs = ( bfs_type * ) arg; - bfs_close( bfs ); - - return NULL; -} - -static bfs_type * bfs_alloc( const bfs_config_type * config ) { - bfs_type * fs = util_malloc( sizeof * fs ); - UTIL_TYPE_ID_INIT( fs , BFS_TYPE_ID ); - fs->config = config; - - // New init - fs->mountfile = NULL; - - return fs; -} - - -static bfs_type * bfs_alloc_new( const bfs_config_type * config , char * mountfile) { - bfs_type * bfs = bfs_alloc( config ); - - bfs->mountfile = mountfile; // Warning pattern break: This is allocated in external scope; and the bfs takes ownership. - return bfs; -} - - -static void bfs_mount( bfs_type * bfs) { - const bfs_config_type * config = bfs->config; - bfs->block_fs = block_fs_mount( bfs->mountfile , - config->block_size , - config->max_cache_size , - config->fragmentation_limit , - config->fsync_interval , - config->preload , - config->read_only, - config->bfs_lock); -} - - -static void * bfs_mount__( void * arg ) { - bfs_type * bfs = bfs_safe_cast( arg ); - bfs_mount( bfs ); - //printf("."); - //fflush( stdout ); - return NULL; -} - - - - -static void bfs_fsync( bfs_type * bfs ) { - block_fs_fsync( bfs->block_fs ); -} - - - -/*****************************************************************/ - - -static void block_fs_driver_assert_cast(block_fs_driver_type * block_fs_driver) { - if (block_fs_driver->__id != BLOCK_FS_DRIVER_ID) - util_abort("%s: internal error - cast failed - aborting \n",__func__); -} - - -static block_fs_driver_type * block_fs_driver_safe_cast( void * __driver) { - block_fs_driver_type * driver = (block_fs_driver_type *) __driver; - block_fs_driver_assert_cast(driver); - return driver; -} - -static char * block_fs_driver_alloc_node_key( const block_fs_driver_type * driver , const char * node_key , int report_step , int iens) { - char * key = util_alloc_sprintf("%s.%d.%d" , node_key , report_step , iens); - return key; -} - - -static char * block_fs_driver_alloc_vector_key( const block_fs_driver_type * driver , const char * node_key , int iens) { - char * key = util_alloc_sprintf("%s.%d" , node_key , iens); - return key; -} - -/** - This function will take an input string, and try to to parse it as - string.int.int, where string is the normal enkf key, and the two - integers are report_step and ensemble number respectively. The - storage for the enkf_key is allocated here in this function, and - must be freed by the calling scope. - - If the parsing fails the function will return false, and *config_key - will be set to NULL; in this case the report_step and iens poinyers - will not be touched. -*/ - -bool block_fs_sscanf_key(const char * key , char ** config_key , int * __report_step , int * __iens) { - char ** tmp; - int num_items; - - *config_key = NULL; - util_split_string(key , "." , &num_items , &tmp); /* The key can contain additional '.' - can not use sscanf(). */ - if (num_items >= 3) { - int report_step , iens; - if (util_sscanf_int(tmp[num_items - 2] , &report_step) && util_sscanf_int(tmp[num_items - 1] , &iens)) { - /* OK - all is hunkadory */ - *__report_step = report_step; - *__iens = iens; - *config_key = util_alloc_joined_string((const char **) tmp , num_items - 2 , "."); /* This must bee freed by the calling scope */ - util_free_stringlist( tmp , num_items ); - return true; - } else - /* Failed to parse the two last items as integers. */ - return false; - } else - /* Did not have at least three items. */ - return false; -} - - - - -static bfs_type * block_fs_driver_get_fs( block_fs_driver_type * driver , int iens ) { - int phase = (iens % driver->num_fs); - - return driver->fs_list[phase]; -} - - - -static void block_fs_driver_load_node(void * _driver , const char * node_key , int report_step , int iens , buffer_type * buffer) { - block_fs_driver_type * driver = block_fs_driver_safe_cast( _driver ); - { - char * key = block_fs_driver_alloc_node_key( driver , node_key , report_step , iens ); - bfs_type * bfs = block_fs_driver_get_fs( driver , iens ); - - block_fs_fread_realloc_buffer( bfs->block_fs , key , buffer); - - free( key ); - } -} - - -static void block_fs_driver_load_vector(void * _driver , const char * node_key , int iens , buffer_type * buffer) { - block_fs_driver_type * driver = block_fs_driver_safe_cast( _driver ); - { - char * key = block_fs_driver_alloc_vector_key( driver , node_key , iens ); - bfs_type * bfs = block_fs_driver_get_fs( driver , iens ); - - block_fs_fread_realloc_buffer( bfs->block_fs , key , buffer); - free( key ); - } -} - -/*****************************************************************/ - -static void block_fs_driver_save_node(void * _driver , const char * node_key , int report_step , int iens , buffer_type * buffer) { - block_fs_driver_type * driver = (block_fs_driver_type *) _driver; - block_fs_driver_assert_cast(driver); - { - char * key = block_fs_driver_alloc_node_key( driver , node_key , report_step , iens ); - bfs_type * bfs = block_fs_driver_get_fs( driver , iens ); - block_fs_fwrite_buffer( bfs->block_fs , key , buffer); - free( key ); - } -} - - -static void block_fs_driver_save_vector(void * _driver , const char * node_key , int iens , buffer_type * buffer) { - block_fs_driver_type * driver = (block_fs_driver_type *) _driver; - block_fs_driver_assert_cast(driver); - { - char * key = block_fs_driver_alloc_vector_key( driver , node_key , iens ); - bfs_type * bfs = block_fs_driver_get_fs( driver , iens ); - block_fs_fwrite_buffer( bfs->block_fs , key , buffer); - free( key ); - } -} - -/*****************************************************************/ - -void block_fs_driver_unlink_node(void * _driver , const char * node_key , int report_step , int iens ) { - block_fs_driver_type * driver = (block_fs_driver_type *) _driver; - block_fs_driver_assert_cast(driver); - { - char * key = block_fs_driver_alloc_node_key( driver , node_key , report_step , iens ); - bfs_type * bfs = block_fs_driver_get_fs( driver , iens ); - block_fs_unlink_file( bfs->block_fs , key ); - free( key ); - } -} - -void block_fs_driver_unlink_vector(void * _driver , const char * node_key , int iens ) { - block_fs_driver_type * driver = (block_fs_driver_type *) _driver; - block_fs_driver_assert_cast(driver); - { - char * key = block_fs_driver_alloc_vector_key( driver , node_key , iens ); - bfs_type * bfs = block_fs_driver_get_fs( driver , iens ); - block_fs_unlink_file( bfs->block_fs , key ); - free( key ); - } -} - - -/*****************************************************************/ - -bool block_fs_driver_has_node(void * _driver , const char * node_key , int report_step , int iens ) { - block_fs_driver_type * driver = (block_fs_driver_type *) _driver; - block_fs_driver_assert_cast(driver); - { - char * key = block_fs_driver_alloc_node_key( driver , node_key , report_step , iens ); - bfs_type * bfs = block_fs_driver_get_fs( driver , iens ); - bool has_node = block_fs_has_file( bfs->block_fs , key ); - free( key ); - return has_node; - } -} - - -bool block_fs_driver_has_vector(void * _driver , const char * node_key , int iens ) { - block_fs_driver_type * driver = (block_fs_driver_type *) _driver; - block_fs_driver_assert_cast(driver); - { - char * key = block_fs_driver_alloc_vector_key( driver , node_key , iens ); - bfs_type * bfs = block_fs_driver_get_fs( driver , iens ); - bool has_node = block_fs_has_file( bfs->block_fs , key ); - free( key ); - return has_node; - } -} - -/*****************************************************************/ - - - - - - - - - -void block_fs_driver_free(void *_driver) { - block_fs_driver_type * driver = block_fs_driver_safe_cast( _driver ); - { - int driver_nr; - thread_pool_type * tp = thread_pool_alloc( 4 , true); - for (driver_nr = 0; driver_nr < driver->num_fs; driver_nr++) - thread_pool_add_job( tp , bfs_close__ , driver->fs_list[driver_nr] ); - - thread_pool_join( tp ); - thread_pool_free( tp ); - } - bfs_config_free( driver->config ); - free( driver->fs_list ); - free(driver); -} - - - -static void block_fs_driver_fsync( void * _driver ) { - block_fs_driver_type * driver = (block_fs_driver_type *) _driver; - block_fs_driver_assert_cast(driver); - - { - int driver_nr; - block_fs_driver_type * driver = block_fs_driver_safe_cast(_driver); - for (driver_nr = 0; driver_nr < driver->num_fs; driver_nr++) - bfs_fsync( driver->fs_list[driver_nr] ); - } -} - - -static block_fs_driver_type * block_fs_driver_alloc(int num_fs) { - block_fs_driver_type * driver = util_malloc(sizeof * driver ); - { - fs_driver_type * fs_driver = (fs_driver_type *) driver; - fs_driver_init(fs_driver); - } - driver->load_node = block_fs_driver_load_node; - driver->save_node = block_fs_driver_save_node; - driver->unlink_node = block_fs_driver_unlink_node; - driver->has_node = block_fs_driver_has_node; - - driver->load_vector = block_fs_driver_load_vector; - driver->save_vector = block_fs_driver_save_vector; - driver->unlink_vector = block_fs_driver_unlink_vector; - driver->has_vector = block_fs_driver_has_vector; - - driver->free_driver = block_fs_driver_free; - driver->fsync_driver = block_fs_driver_fsync; - driver->__id = BLOCK_FS_DRIVER_ID; - driver->num_fs = num_fs; - - driver->fs_list = util_calloc( driver->num_fs , sizeof * driver->fs_list ); - return driver; -} - - - - -static void * block_fs_driver_alloc_new( fs_driver_enum driver_type , bool read_only , int num_fs , const char * mountfile_fmt, bool block_level_lock ) { - block_fs_driver_type * driver = block_fs_driver_alloc( num_fs); - driver->config = bfs_config_alloc( driver_type , read_only, block_level_lock ); - { - for (int ifs = 0; ifs < driver->num_fs; ifs++) - driver->fs_list[ifs] = bfs_alloc_new( driver->config , util_alloc_sprintf( mountfile_fmt , ifs) ); - } - return driver; -} - - -static void block_fs_driver_mount( block_fs_driver_type * driver ) { - thread_pool_type * tp = thread_pool_alloc( 4 , true ); - - for (int ifs = 0; ifs < driver->num_fs; ifs++) - thread_pool_add_job( tp , bfs_mount__ , driver->fs_list[ ifs ]); - - thread_pool_join( tp ); - thread_pool_free( tp ); -} - - - - - -/*****************************************************************/ - -void block_fs_driver_create_fs( FILE * stream , - const char * mount_point , - fs_driver_enum driver_type , - int num_fs , - const char * ens_path_fmt, - const char * filename ) { - - util_fwrite_int(driver_type , stream ); - util_fwrite_int(num_fs , stream ); - { - char * mountfile_fmt = util_alloc_sprintf("%s%c%s.mnt" , ens_path_fmt , UTIL_PATH_SEP_CHAR , filename ); - util_fwrite_string( mountfile_fmt , stream ); - free( mountfile_fmt ); - } - - for (int ifs = 0; ifs < num_fs; ifs++) { - char * path_fmt = util_alloc_sprintf("%s%c%s" , mount_point , UTIL_PATH_SEP_CHAR , ens_path_fmt); - char * ens_path = util_alloc_sprintf(path_fmt , ifs); - - util_make_path( ens_path ); - - free( path_fmt ); - free( ens_path ); - } - -} - - -/* - @path should contain both elements called root_path and case_path in - the block_fs_driver_create() function. -*/ - -void * block_fs_driver_open(FILE * fstab_stream , const char * mount_point , fs_driver_enum driver_type , bool read_only) { - int num_fs = util_fread_int( fstab_stream ); - char * tmp_fmt = util_fread_alloc_string( fstab_stream ); - char * mountfile_fmt = util_alloc_sprintf("%s%c%s" , mount_point , UTIL_PATH_SEP_CHAR , tmp_fmt ); - const bool block_level_lock = false; - - block_fs_driver_type * driver = block_fs_driver_alloc_new( driver_type , read_only , num_fs , mountfile_fmt, block_level_lock ); - - block_fs_driver_mount( driver ); - - free( tmp_fmt ); - free( mountfile_fmt ); - return driver; -} - - -void block_fs_driver_fskip(FILE * fstab_stream) { - util_fskip_int( fstab_stream ); - { - char * tmp_fmt = util_fread_alloc_string( fstab_stream ); - free( tmp_fmt ); - } -} diff --git a/ThirdParty/Ert/libenkf/src/block_obs.c b/ThirdParty/Ert/libenkf/src/block_obs.c deleted file mode 100644 index 61a6c4adea..0000000000 --- a/ThirdParty/Ert/libenkf/src/block_obs.c +++ /dev/null @@ -1,466 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'block_obs.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -/** - See the overview documentation of the observation system in enkf_obs.c -*/ -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define BLOCK_OBS_TYPE_ID 661098 -#define POINT_OBS_TYPE_ID 778196 - - -typedef struct { - UTIL_TYPE_ID_DECLARATION; - block_obs_source_type source_type; - int i; - int j; - int k; - int active_index; - double value; - double std; - double std_scaling; - char * sum_key; -} point_obs_type; - -static UTIL_SAFE_CAST_FUNCTION(point_obs , POINT_OBS_TYPE_ID); - - -struct block_obs_struct { - UTIL_TYPE_ID_DECLARATION; - char * obs_key; /** A user provided label for the observation. */ - vector_type * point_list; - const ecl_grid_type * grid; - const void * data_config; - block_obs_source_type source_type; -}; - - -static UTIL_SAFE_CAST_FUNCTION_CONST(block_obs , BLOCK_OBS_TYPE_ID); -static UTIL_SAFE_CAST_FUNCTION(block_obs , BLOCK_OBS_TYPE_ID); -UTIL_IS_INSTANCE_FUNCTION(block_obs , BLOCK_OBS_TYPE_ID); - - -/*****************************************************************/ - - - - - -static point_obs_type * point_obs_alloc( block_obs_source_type source_type , int i , int j , int k , int active_index , const char * sum_key , double value , double std) { - point_obs_type * point_obs = util_malloc( sizeof * point_obs ); - UTIL_TYPE_ID_INIT( point_obs , POINT_OBS_TYPE_ID ); - - point_obs->source_type = source_type; - point_obs->i = i; - point_obs->j = j; - point_obs->k = k; - point_obs->active_index = active_index; - point_obs->value = value; - point_obs->std = std; - point_obs->sum_key = util_alloc_string_copy( sum_key ); - point_obs->std_scaling = 1.0; - - return point_obs; -} - - - - - - -static void point_obs_free( point_obs_type * point_obs ) { - util_safe_free( point_obs->sum_key ); - free( point_obs ); -} - -static void point_obs_free__( void * arg ) { - point_obs_type * point_obs = point_obs_safe_cast( arg ); - point_obs_free( point_obs ); -} - - - -static double point_obs_iget_data( const point_obs_type * point_obs , const void * state , int iobs , node_id_type node_id) { - if (point_obs->source_type == SOURCE_FIELD) { - const field_type * field = field_safe_cast_const( state ); - return field_iget_double(field , point_obs->active_index); - } else if (point_obs->source_type == SOURCE_SUMMARY) { - const container_type * container = container_safe_cast_const( state ); - const summary_type * summary = summary_safe_cast_const( container_iget_node( container , iobs )); - return summary_get( summary , node_id.report_step ); - } else { - util_abort("%s: unknown source type: %d \n",__func__, point_obs->source_type ); - return -1; - } -} - - -/*****************************************************************/ - - -static const point_obs_type * block_obs_iget_point_const( const block_obs_type * block_obs , int index) { - return vector_iget_const( block_obs->point_list , index ); -} - - -static point_obs_type * block_obs_iget_point( const block_obs_type * block_obs , int index) { - return vector_iget( block_obs->point_list , index ); -} - - -static void block_obs_validate_ijk( const ecl_grid_type * grid , int size, const int * i , const int * j , const int * k) { - int l; - for (l = 0; l < size; l++) { - if (ecl_grid_ijk_valid(grid , i[l] , j[l] , k[l])) { - int active_index = ecl_grid_get_active_index3( grid , i[l] , j[l] , k[l]); - if (active_index < 0) - util_abort("%s: sorry: cell:(%d,%d,%d) is not active - can not observe it. \n",__func__ , i[l]+1 , j[l]+1 , k[l]+1); - - } else - util_abort("%s: sorry: cell (%d,%d,%d) is outside valid range: \n",__func__ , i[l]+1 , j[l]+1 , k[l]+1); - } -} - - -static void block_obs_append_point( block_obs_type * block_obs , point_obs_type * point) { - if (point->source_type == block_obs->source_type) - vector_append_owned_ref(block_obs->point_list , point , point_obs_free__); - else - util_abort("%s: fatal internal error - mixing points with different source type in one block_obs instance.\n",__func__); -} - - -void block_obs_append_field_obs( block_obs_type * block_obs , int i , int j , int k , double value , double std) { - int active_index = ecl_grid_get_active_index3( block_obs->grid , i , j , k ); - point_obs_type * point_obs = point_obs_alloc( SOURCE_FIELD , i , j , k , active_index , NULL , value , std); - block_obs_append_point( block_obs , point_obs ); -} - - -void block_obs_append_summary_obs( block_obs_type * block_obs , int i , int j , int k , const char * sum_key , double value , double std) { - int active_index = ecl_grid_get_active_index3( block_obs->grid , i , j , k ); - point_obs_type * point_obs = point_obs_alloc( SOURCE_SUMMARY , i , j , k , active_index , sum_key , value , std); - block_obs_append_point( block_obs , point_obs ); -} - - -block_obs_type * block_obs_alloc(const char * obs_key, - const void * data_config , - const ecl_grid_type * grid) { - - if (!(field_config_is_instance( data_config ) || container_config_is_instance( data_config ))) - return NULL; - - { - block_obs_type * block_obs = util_malloc(sizeof * block_obs); - UTIL_TYPE_ID_INIT( block_obs , BLOCK_OBS_TYPE_ID ); - - block_obs->obs_key = util_alloc_string_copy(obs_key); - block_obs->data_config = data_config; - block_obs->point_list = vector_alloc_new(); - block_obs->grid = grid; - - if (field_config_is_instance( data_config )) - block_obs->source_type = SOURCE_FIELD; - else - block_obs->source_type = SOURCE_SUMMARY; - - return block_obs; - } -} - - - -/** - The input vectors i,j,k should contain offset zero values. -*/ -block_obs_type * block_obs_alloc_complete(const char * obs_key, - block_obs_source_type source_type , - const stringlist_type * summary_keys , - const void * data_config , - const ecl_grid_type * grid , - int size, - const int * i, - const int * j, - const int * k, - const double * obs_value, - const double * obs_std) -{ - block_obs_validate_ijk( grid , size , i,j,k); - { - block_obs_type * block_obs = block_obs_alloc( obs_key , data_config , grid ); - if (block_obs) { - for (int l=0; l < size; l++) { - - if (source_type == SOURCE_SUMMARY) { - const char * sum_key = stringlist_iget( summary_keys , l ); - block_obs_append_summary_obs( block_obs , i[l] , j[l] , k[l] , sum_key , obs_value[l] , obs_std[l]); - } else - block_obs_append_field_obs( block_obs , i[l] , j[l] , k[l] , obs_value[l] , obs_std[l]); - - } - return block_obs; - } else { - util_abort("%s: internal error - block_obs_alloc() returned NULL \n",__func__); - return NULL; - } - } -} - - - -void block_obs_free( block_obs_type * block_obs) { - vector_free( block_obs->point_list ); - free(block_obs->obs_key); - free(block_obs); -} - - - - - - - -void block_obs_get_observations(const block_obs_type * block_obs, obs_data_type * obs_data, enkf_fs_type * fs, int report_step , const active_list_type * __active_list) { - int i; - int obs_size = block_obs_get_size( block_obs ); - int active_size = active_list_get_active_size( __active_list , obs_size); - active_mode_type active_mode = active_list_get_mode( __active_list ); - obs_block_type * obs_block = obs_data_add_block( obs_data , block_obs->obs_key , obs_size , NULL , false ); - - if (active_mode == ALL_ACTIVE) { - for (i=0; i < obs_size; i++) { - const point_obs_type * point_obs = block_obs_iget_point_const( block_obs , i ); - obs_block_iset(obs_block , i , point_obs->value , point_obs->std * point_obs->std_scaling ); - } - } else if (active_mode == PARTLY_ACTIVE) { - const int * active_list = active_list_get_active( __active_list ); - for (i =0 ; i < active_size; i++) { - int iobs = active_list[i]; - const point_obs_type * point_obs = block_obs_iget_point_const( block_obs , i ); - obs_block_iset(obs_block , iobs , point_obs->value , point_obs->std * point_obs->std_scaling ); - } - } -} - - -static void block_obs_assert_data( const block_obs_type * block_obs , const void * state ) { - if (block_obs->source_type == SOURCE_FIELD) { - if (!field_is_instance( state )) - util_abort("%s: state data is not of type FIELD - aborting \n",__func__); - } else if (block_obs->source_type == SOURCE_SUMMARY) { - if (!container_is_instance( state )) - util_abort("%s: state data is not of type CONTAINER - aborting \n",__func__); - } -} - - -double block_obs_iget_data( const block_obs_type * block_obs, const void * state , int iobs , node_id_type node_id ) { - const point_obs_type * point_obs = block_obs_iget_point_const( block_obs , iobs ); - return point_obs_iget_data( point_obs , state , iobs , node_id); -} - - - -void block_obs_measure(const block_obs_type * block_obs, const void * state , node_id_type node_id , meas_data_type * meas_data , const active_list_type * __active_list) { - block_obs_assert_data( block_obs , state ); - { - int obs_size = block_obs_get_size( block_obs ); - int active_size = active_list_get_active_size( __active_list , obs_size ); - meas_block_type * meas_block = meas_data_add_block( meas_data , block_obs->obs_key , node_id.report_step , obs_size ); - int iobs; - - active_mode_type active_mode = active_list_get_mode( __active_list ); - if (active_mode == ALL_ACTIVE) { - for (iobs=0; iobs < obs_size; iobs++) { - double value = block_obs_iget_data( block_obs , state , iobs , node_id ); - meas_block_iset( meas_block , node_id.iens , iobs , value ); - } - } else if (active_mode == PARTLY_ACTIVE) { - const int * active_list = active_list_get_active( __active_list ); - for (int i =0 ; i < active_size; i++) { - iobs = active_list[i]; - { - double value = block_obs_iget_data( block_obs , state , iobs , node_id); - meas_block_iset( meas_block , node_id.iens , i , value ); - } - } - } - } -} - - - -double block_obs_chi2(const block_obs_type * block_obs, const void * state, node_id_type node_id) { - double sum_chi2 = 0; - int obs_size = block_obs_get_size( block_obs ); - block_obs_assert_data(block_obs, state); - - for (int i=0; i < obs_size; i++) { - const point_obs_type * point_obs = block_obs_iget_point_const( block_obs , i ); - double sim_value = point_obs_iget_data( point_obs , state , i, node_id ); - double x = (sim_value - point_obs->value) / point_obs->std; - sum_chi2 += x*x; - } - return sum_chi2; -} - - - - -/** - The index is into the the number of active cells which are observed by this observation. -*/ -void block_obs_iget(const block_obs_type * block_obs, int index , double *value , double * std) { - const point_obs_type * point_obs = block_obs_iget_point_const( block_obs , index ); - *value = point_obs->value; - *std = point_obs->std; -} - -double block_obs_iget_value(const block_obs_type * block_obs, int index ){ - const point_obs_type * point_obs = block_obs_iget_point_const( block_obs , index ); - return point_obs->value; -} - -double block_obs_iget_std(const block_obs_type * block_obs, int index ){ - const point_obs_type * point_obs = block_obs_iget_point_const( block_obs , index ); - return point_obs->std; -} - -double block_obs_iget_std_scaling(const block_obs_type * block_obs, int index ){ - const point_obs_type * point_obs = block_obs_iget_point_const( block_obs , index ); - return point_obs->std_scaling; -} - - -void block_obs_user_get(const block_obs_type * block_obs , const char * index_key , double *value , double * std, bool * valid) { - int i,j,k; - - *valid = false; - if (field_config_parse_user_key__( index_key , &i , &j , &k)) { - int obs_size = block_obs_get_size( block_obs ); - int active_index = ecl_grid_get_active_index3(block_obs->grid , i,j,k); - int l = 0; - /* iterating through all the cells the observation is observing. */ - - while (!(*valid) && l < obs_size) { - const point_obs_type * point_obs = block_obs_iget_point_const( block_obs , l); - if (point_obs->active_index == active_index) { - *value = point_obs->value; - *std = point_obs->std; - *valid = true; - } - l++; - } - } -} - - - - -int block_obs_iget_i(const block_obs_type * block_obs, int index) { - const point_obs_type * point_obs = block_obs_iget_point_const( block_obs , index); - return point_obs->i; -} - -int block_obs_iget_j(const block_obs_type * block_obs, int index) { - const point_obs_type * point_obs = block_obs_iget_point_const( block_obs , index); - return point_obs->j; -} - -int block_obs_iget_k(const block_obs_type * block_obs, int index) { - const point_obs_type * point_obs = block_obs_iget_point_const( block_obs , index); - return point_obs->k; -} - -double block_obs_iget_depth( const block_obs_type * block_obs , int index) { - const point_obs_type * point_obs = block_obs_iget_point_const( block_obs , index); - return ecl_grid_get_cdepth3( block_obs->grid , point_obs->i , point_obs->j ,point_obs->k); -} - -/* - Returns by reference i,j,k for observation point nr block_nr. -*/ - -void block_obs_iget_ijk(const block_obs_type * block_obs , int block_nr , int * i , int * j , int * k) { - const point_obs_type * point_obs = block_obs_iget_point_const( block_obs , block_nr ); - *i = point_obs->i; - *j = point_obs->j; - *k = point_obs->k; -} - - -int block_obs_get_size(const block_obs_type * block_obs) { - return vector_get_size( block_obs->point_list ); -} - -void block_obs_update_std_scale(block_obs_type * block_obs, double scale_factor, const active_list_type * active_list) { - int obs_size = block_obs_get_size( block_obs ); - if (active_list_get_mode( active_list ) == ALL_ACTIVE) { - for (int i = 0; i < obs_size; i++) { - point_obs_type * point_observation = block_obs_iget_point( block_obs , i ); - point_observation->std_scaling = scale_factor; - } - } else { - const int * active_index = active_list_get_active( active_list ); - int size = active_list_get_active_size( active_list , obs_size ); - for (int i=0; i < size; i++) { - int obs_index = active_index[i]; - point_obs_type * point_observation = block_obs_iget_point( block_obs , obs_index ); - point_observation->std_scaling = scale_factor; - } - } -} - - - - - - -/*****************************************************************/ - -VOID_FREE(block_obs) -VOID_GET_OBS(block_obs) -VOID_MEASURE_UNSAFE(block_obs , data) // The cast of data field is not checked - that is done in block_obs_measure(). -VOID_USER_GET_OBS(block_obs) -VOID_CHI2(block_obs , field) -VOID_UPDATE_STD_SCALE(block_obs) diff --git a/ThirdParty/Ert/libenkf/src/cases_config.c b/ThirdParty/Ert/libenkf/src/cases_config.c deleted file mode 100644 index 7a3c594d37..0000000000 --- a/ThirdParty/Ert/libenkf/src/cases_config.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'cases_config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include -#include - -#include -#include - -#include - -#include -#include -#include - - -struct cases_config_struct { - int iteration_number; -}; - - -cases_config_type * cases_config_alloc( ) { - cases_config_type * config = util_malloc( sizeof * config ); - config->iteration_number = 0; - return config; -} - - -static void cases_config_set_iteration_number( cases_config_type * config , int num_iterations) { - config->iteration_number = num_iterations; -} - -int cases_config_get_iteration_number( const cases_config_type * config ) { - return config->iteration_number; -} - -bool cases_config_set_int( cases_config_type * cases_config , const char * var_name , int value) { - bool name_recognized = true; - if (strcmp( var_name , "iteration_number") == 0) - cases_config_set_iteration_number(cases_config, value); - else - name_recognized = false; - - return name_recognized; -} - - - -void cases_config_fwrite( cases_config_type * config , const char * filename ) { - FILE * stream = util_mkdir_fopen(filename , "w"); - int iteration_no = cases_config_get_iteration_number(config); - util_fwrite_int( iteration_no , stream ); - fclose( stream ); -} - -void cases_config_fread( cases_config_type * config , const char * filename) { - if (util_file_exists( filename )) { - FILE * stream = util_fopen( filename , "r"); - int iteration_number = util_fread_int( stream ); - cases_config_set_iteration_number(config,iteration_number); - fclose( stream ); - } -} - - -void cases_config_free( cases_config_type * config ) { - free( config ); -} - diff --git a/ThirdParty/Ert/libenkf/src/container.c b/ThirdParty/Ert/libenkf/src/container.c deleted file mode 100644 index 671a061f4e..0000000000 --- a/ThirdParty/Ert/libenkf/src/container.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'container.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include -#include -#include - -struct container_struct { - int __type_id; - const container_config_type * config; - vector_type * nodes; -}; - - - -container_type * container_alloc( const container_config_type * config ) { - container_type * container = util_malloc( sizeof * container ); - UTIL_TYPE_ID_INIT( container , CONTAINER ); - container->config = config; - container->nodes = vector_alloc_new(); - return container; -} - - -void container_free( container_type * container ) { - vector_free( container->nodes ); - free( container ); -} - -void container_add_node(container_type * container , void * child_node ) { - vector_append_ref( container->nodes , child_node ); -} - -const void * container_iget_node(const container_type * container , int index) { - return vector_iget_const( container->nodes , index ); -} - -int container_get_size( const container_type * container ) { - return vector_get_size( container->nodes ); -} - -void container_assert_size( const container_type * container ) { - if (vector_get_size( container->nodes ) != container_config_get_size( container->config )) - util_abort("%s: container size mismatch. Current:%d Config:%d \n",__func__ , container_get_size( container ) , container_config_get_size( container->config )); -} - - -/******************************************************************/ -/* Anonumously generated functions used by the enkf_node object */ -/******************************************************************/ - -UTIL_IS_INSTANCE_FUNCTION(container , CONTAINER) -UTIL_SAFE_CAST_FUNCTION(container , CONTAINER) -UTIL_SAFE_CAST_FUNCTION_CONST(container , CONTAINER) -VOID_ALLOC(container) -VOID_FREE(container) - - - - - - - diff --git a/ThirdParty/Ert/libenkf/src/container_config.c b/ThirdParty/Ert/libenkf/src/container_config.c deleted file mode 100644 index 50d37243c9..0000000000 --- a/ThirdParty/Ert/libenkf/src/container_config.c +++ /dev/null @@ -1,76 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'container_config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include - -#include -#include - -#include -#include - -#define CONTAINER_CONFIG_TYPE_ID 51330852 - -struct container_config_struct { - UTIL_TYPE_ID_DECLARATION; - vector_type * nodes; -}; - -UTIL_IS_INSTANCE_FUNCTION(container_config , CONTAINER_CONFIG_TYPE_ID); - -container_config_type * container_config_alloc( const char * key ) { - container_config_type * container = util_malloc( sizeof * container ); - UTIL_TYPE_ID_INIT( container , CONTAINER_CONFIG_TYPE_ID ); - container->nodes = vector_alloc_new(); - return container; -} - - - -void container_config_free( container_config_type * container_config ) { - vector_free( container_config->nodes ); - free( container_config ); -} - - -void container_config_add_node( container_config_type * container_config , const enkf_config_node_type * config_node) { - vector_append_ref( container_config->nodes , config_node ); -} - -const void * container_config_iget_node(const container_config_type * container_config , int index) { - return vector_iget_const( container_config->nodes , index ); -} - -int container_config_get_size( const container_config_type * container_config ) { - return vector_get_size( container_config->nodes ); -} - - -int container_config_get_data_size( const container_config_type * container_config ) { - util_exit("%s: not implemented \n",__func__); - return 0; -} - - -/*****************************************************************/ - -UTIL_SAFE_CAST_FUNCTION(container_config , CONTAINER_CONFIG_TYPE_ID) -UTIL_SAFE_CAST_FUNCTION_CONST(container_config , CONTAINER_CONFIG_TYPE_ID) -VOID_GET_DATA_SIZE(container) -VOID_CONFIG_FREE(container) - diff --git a/ThirdParty/Ert/libenkf/src/custom_kw.c b/ThirdParty/Ert/libenkf/src/custom_kw.c deleted file mode 100644 index ab44db926c..0000000000 --- a/ThirdParty/Ert/libenkf/src/custom_kw.c +++ /dev/null @@ -1,149 +0,0 @@ -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - - -struct custom_kw_struct { - int __type_id; - custom_kw_config_type * config; - /* Thin config object - mainly contains filename for remote load */ - stringlist_type * data; /* Actual storage - will be casted to double or float on use. */ -}; - - -custom_kw_type * custom_kw_alloc(const custom_kw_config_type * config) { - custom_kw_type * custom_kw = util_malloc(sizeof * custom_kw); - custom_kw->config = (custom_kw_config_type *) config; - custom_kw->data = stringlist_alloc_new(); - - stringlist_type * keys = custom_kw_config_get_keys(custom_kw->config); - for(int index = 0; index < stringlist_get_size(keys); index++) { - const char * key = stringlist_iget(keys, index); - if(custom_kw_config_key_is_double(custom_kw->config, key)) { - custom_kw_set_double(custom_kw, key, 0.0); - } else { - custom_kw_set_string(custom_kw, key, ""); - } - } - - custom_kw->__type_id = CUSTOM_KW; - return custom_kw; -} - -void custom_kw_free(custom_kw_type * custom_kw) { - stringlist_free(custom_kw->data); - free(custom_kw); -} - -const stringlist_type * custom_kw_get_data(const custom_kw_type * custom_kw) { - return custom_kw->data; -} - -bool custom_kw_key_is_null(const custom_kw_type * custom_kw, char * key) { - int index = custom_kw_config_index_of_key(custom_kw->config, key); - return stringlist_iget(custom_kw->data, index) == NULL; -} - - -void custom_kw_set_double(custom_kw_type * custom_kw, const char * key, double value) { - char value_as_string[128]; - sprintf(value_as_string, "%26.100f", value); - custom_kw_set_string(custom_kw, key, value_as_string); -} - - -void custom_kw_set_string(custom_kw_type * custom_kw, const char * key, const char * value) { - int index = custom_kw_config_index_of_key(custom_kw->config, key); - stringlist_iset_copy(custom_kw->data, index, value); -} - - -double custom_kw_iget_as_double(const custom_kw_type * custom_kw, int index) { - double value; - - util_sscanf_double(stringlist_iget(custom_kw->data, index), & value); - return value; -} - -const char * custom_kw_iget_as_string(const custom_kw_type * custom_kw, int index) { - return stringlist_iget(custom_kw->data, index); -} - -custom_kw_config_type * custom_kw_get_config(const custom_kw_type * custom_kw) { - return custom_kw->config; -} - -bool custom_kw_fload(custom_kw_type * custom_kw, const char * filename) { - return custom_kw_config_parse_result_file(custom_kw->config, filename, custom_kw->data); -} - -bool custom_kw_forward_load(custom_kw_type * custom_kw, const char * ecl_file, const forward_load_context_type * load_context) { - return custom_kw_fload(custom_kw, ecl_file); -} - -bool custom_kw_write_to_buffer(const custom_kw_type * custom_kw, buffer_type * buffer, int report_step) { - stringlist_buffer_fwrite(custom_kw->data, buffer); - return true; -} - -void custom_kw_read_from_buffer(const custom_kw_type * custom_kw, buffer_type * buffer, enkf_fs_type * fs, int report_step) { - stringlist_buffer_fread(custom_kw->data, buffer); -} - -void custom_kw_ecl_write(const custom_kw_type * custom_kw, const char * run_path, const char * base_file, void * filestream) { - //printf("CustomKW ecl_write\n"); -} - -void custom_kw_serialize(const custom_kw_type * custom_kw, node_id_type node_id, const active_list_type * active_list, matrix_type * A, int row_offset, int column) { - printf("CustomKW serialize\n"); -} - -void custom_kw_deserialize(custom_kw_type * custom_kw, node_id_type node_id, const active_list_type * active_list, const matrix_type * A, int row_offset, int column) { - printf("CustomKW deserialize\n"); -} - -/******************************************************************/ -/* Anonumously generated functions used by the enkf_node object */ -/******************************************************************/ -UTIL_SAFE_CAST_FUNCTION_CONST(custom_kw, CUSTOM_KW) - -UTIL_SAFE_CAST_FUNCTION(custom_kw, CUSTOM_KW) - -VOID_ALLOC(custom_kw) - -VOID_FREE(custom_kw) - -VOID_FORWARD_LOAD(custom_kw) - -VOID_FLOAD(custom_kw) - -VOID_ECL_WRITE(custom_kw) - -VOID_READ_FROM_BUFFER(custom_kw); - -VOID_WRITE_TO_BUFFER(custom_kw); - -VOID_SERIALIZE(custom_kw) - -VOID_DESERIALIZE(custom_kw) diff --git a/ThirdParty/Ert/libenkf/src/custom_kw_config.c b/ThirdParty/Ert/libenkf/src/custom_kw_config.c deleted file mode 100644 index d606bf4233..0000000000 --- a/ThirdParty/Ert/libenkf/src/custom_kw_config.c +++ /dev/null @@ -1,304 +0,0 @@ -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include - -#include - - -#define CUSTOM_KW_CONFIG_ID 90051933 - -struct custom_kw_config_struct { - UTIL_TYPE_ID_DECLARATION; - char * name; - char * result_file; - char * output_file; - - hash_type * custom_keys; - hash_type * custom_key_types; /* True if float */ - bool undefined; - char * key_definition_file; - - pthread_rwlock_t rw_lock; -}; - - -custom_kw_config_type * custom_kw_config_alloc_empty(const char * key, const char * result_file, const char * output_file) { - custom_kw_config_type * custom_kw_config = util_malloc(sizeof * custom_kw_config); - UTIL_TYPE_ID_INIT(custom_kw_config, CUSTOM_KW_CONFIG_ID); - - custom_kw_config->name = NULL; - custom_kw_config->result_file = util_alloc_string_copy(result_file); - custom_kw_config->output_file = util_alloc_string_copy(output_file); - custom_kw_config->name = util_alloc_string_copy(key); - custom_kw_config->undefined = true; - custom_kw_config->key_definition_file = NULL; - - custom_kw_config->custom_keys = hash_alloc(); - custom_kw_config->custom_key_types = hash_alloc(); //types: 0 if string, 1 if double - pthread_rwlock_init(& custom_kw_config->rw_lock, NULL); - - return custom_kw_config; -} - - -custom_kw_config_type * custom_kw_config_alloc_with_definition(const char * key, const hash_type * definition) { - custom_kw_config_type * custom_kw_config = custom_kw_config_alloc_empty(key, NULL, NULL); - - stringlist_type * keys = hash_alloc_stringlist((hash_type *) definition); - - for(int index = 0; index < stringlist_get_size(keys); index++) { - const char * definition_key = stringlist_iget_copy(keys, index); - int type_value = hash_get_int(definition, definition_key); - - if(type_value < 0 || type_value > 1) { - fprintf(stderr ,"[%s] Warning: Value type not 0 or 1 for key: '%s', defaulting to string!\n", __func__, key); - type_value = 0; - } - hash_insert_int(custom_kw_config->custom_keys, definition_key, index); - hash_insert_int(custom_kw_config->custom_key_types, definition_key, type_value); - } - - custom_kw_config->undefined = false; - custom_kw_config->key_definition_file = util_alloc_string_copy("custom definition"); - - stringlist_free(keys); - - return custom_kw_config; -} - - -void custom_kw_config_free(custom_kw_config_type * config) { - util_safe_free(config->name); - util_safe_free(config->result_file); - util_safe_free(config->output_file); - util_safe_free(config->key_definition_file); - - hash_free(config->custom_keys); - hash_free(config->custom_key_types); - - pthread_rwlock_destroy(& config->rw_lock); - - free(config); -} - -static void custom_kw_config_reset__(custom_kw_config_type * config) { - config->undefined = true; - hash_clear(config->custom_keys); - hash_clear(config->custom_key_types); - util_safe_free(config->key_definition_file); - config->key_definition_file = NULL; -} - -void custom_kw_config_serialize(const custom_kw_config_type * config, stringlist_type * config_set) { - pthread_rwlock_t * rw_lock = (pthread_rwlock_t *)& config->rw_lock; - pthread_rwlock_rdlock(rw_lock); - { - stringlist_clear(config_set); - - stringlist_type * configured_keys = custom_kw_config_get_keys(config); - - for (int i = 0; i < stringlist_get_size(configured_keys); i++) { - const char * key = stringlist_iget(configured_keys, i); - bool double_type = custom_kw_config_key_is_double(config, key); - int index = custom_kw_config_index_of_key(config, key); - char buffer[256]; - - sprintf(buffer, "%s %d %d", key, index, double_type); - stringlist_append_copy(config_set, buffer); - } - - stringlist_free(configured_keys); - - } - pthread_rwlock_unlock(rw_lock); -} - -void custom_kw_config_deserialize(custom_kw_config_type * config, stringlist_type * config_set) { - pthread_rwlock_wrlock(& config->rw_lock); - { - custom_kw_config_reset__(config); - - for (int i = 0; i < stringlist_get_size(config_set); i++) { - const char * items = stringlist_iget(config_set, i); - - char key[128]; - int index; - int is_double; - - int count = sscanf(items, "%s %d %d", key, &index, &is_double); - - if (count == 3) { - hash_insert_int(config->custom_keys, key, index); - hash_insert_int(config->custom_key_types, key, is_double); - } else - util_abort("%s: internal error - deserialize failed\n",__func__); - } - config->undefined = false; - config->key_definition_file = util_alloc_string_copy("from storage"); //Todo: Handle this differently? - } - pthread_rwlock_unlock(& config->rw_lock); -} - -int custom_kw_config_size(const custom_kw_config_type * config) { - return hash_get_size(config->custom_keys); -} - -const char * custom_kw_config_get_name(const custom_kw_config_type * config) { - return config->name; -} - -char * custom_kw_config_get_result_file(const custom_kw_config_type * config) { - return config->result_file; -} - -char * custom_kw_config_get_output_file(const custom_kw_config_type * config) { - return config->output_file; -} - -bool custom_kw_config_has_key(const custom_kw_config_type * config, const char * key) { - return hash_has_key(config->custom_keys, key); -} - -bool custom_kw_config_key_is_double(const custom_kw_config_type * config, const char * key) { - return hash_get_int(config->custom_key_types, key) == 1; -} - -int custom_kw_config_index_of_key(const custom_kw_config_type * config, const char * key) { - return hash_get_int(config->custom_keys, key); -} - -stringlist_type * custom_kw_config_get_keys(const custom_kw_config_type * config) { - return hash_alloc_stringlist(config->custom_keys); -} - -static bool custom_kw_config_setup__(custom_kw_config_type * config, const char * result_file) { - FILE * stream = util_fopen__(result_file, "r"); - if (stream != NULL) { - bool read_ok = true; - config->key_definition_file = util_alloc_string_copy(result_file); - - int counter = 0; - char key[128]; - char value[128]; - int read_count; - while ((read_count = fscanf(stream, "%s %s", key, value)) != EOF) { - if (read_count == 1) { - fprintf(stderr ,"[%s] Warning: Key: '%s:%s' is missing value in file: '%s'\n", __func__, config->name, key, result_file); - read_ok = false; - break; - } - - if (custom_kw_config_has_key(config, key)) { - fprintf(stderr ,"[%s] Warning: Key: '%s:%s' already defined!\n", __func__, config->name, key); - } else { - hash_insert_int(config->custom_keys, key, counter++); - hash_insert_int(config->custom_key_types, key, util_sscanf_double(value, NULL)); - } - } - - fclose(stream); - return read_ok; - } - return false; -} - -static bool custom_kw_config_read_data__(const custom_kw_config_type * config, const char * result_file, stringlist_type * result) { - FILE * stream = util_fopen__(result_file, "r"); - if (stream != NULL) { - bool read_ok = true; - - stringlist_clear(result); - stringlist_iset_ref(result, hash_get_size(config->custom_keys) - 1, NULL); - hash_type * read_keys = hash_alloc(); - - char key[128]; - char value[128]; - int read_count; - while ((read_count = fscanf(stream, "%s %s", key, value)) != EOF) { - if (read_count == 1) { - fprintf(stderr ,"[%s] Warning: Key: '%s:%s' missing value in file: %s!\n", __func__, config->name, key, result_file); - read_ok = false; - break; - } - - if (custom_kw_config_has_key(config, key)) { - if (hash_has_key(read_keys, key)) { - fprintf(stderr ,"[%s] Warning: Key: '%s:%s' has appeared multiple times. Only the last occurrence will be used!\n", __func__, config->name, key); - } - - hash_insert_int(read_keys, key, 1); - int index = custom_kw_config_index_of_key(config, key); - stringlist_iset_copy(result, index, value); - - } else { - fprintf(stderr ,"[%s] Warning: Key: '%s:%s' not in the available set. Ignored!\n", __func__, config->name, key); - } - } - - fclose(stream); - - if (read_ok) { - read_ok = hash_key_list_compare(read_keys, config->custom_keys); - } - - return read_ok; - } - return false; -} - -bool custom_kw_config_parse_result_file(custom_kw_config_type * config, const char * result_file, stringlist_type * result) { - bool read_ok = true; - - // if config->result_file is NULL then the CustomKWConfig was made dynamically - // for storing data manually and not as part of a forward model output. - if(config->result_file != NULL) { - pthread_rwlock_wrlock(&config->rw_lock); - if (config->undefined) { - read_ok = custom_kw_config_setup__(config, result_file); - if (read_ok) { - config->undefined = false; - } - } - pthread_rwlock_unlock(&config->rw_lock); - - if (read_ok) { - read_ok = custom_kw_config_read_data__(config, result_file, result); - } - } - - return read_ok; -} - - - -/*****************************************************************/ - -UTIL_IS_INSTANCE_FUNCTION(custom_kw_config, CUSTOM_KW_CONFIG_ID) - -UTIL_SAFE_CAST_FUNCTION(custom_kw_config, CUSTOM_KW_CONFIG_ID) - -UTIL_SAFE_CAST_FUNCTION_CONST(custom_kw_config, CUSTOM_KW_CONFIG_ID) - - - -/*****************************************************************/ - -VOID_FREE(custom_kw_config) diff --git a/ThirdParty/Ert/libenkf/src/custom_kw_config_set.c b/ThirdParty/Ert/libenkf/src/custom_kw_config_set.c deleted file mode 100644 index 681ebe379c..0000000000 --- a/ThirdParty/Ert/libenkf/src/custom_kw_config_set.c +++ /dev/null @@ -1,143 +0,0 @@ -#define _GNU_SOURCE /* Must define this to get access to pthread_rwlock_t */ - -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - - -#define CUSTOM_KW_CONFIG_SET_TYPE_ID 701622133 - -struct custom_kw_config_set_struct { - UTIL_TYPE_ID_DECLARATION; - hash_type * config_set; - pthread_rwlock_t rw_lock; -}; - - -UTIL_IS_INSTANCE_FUNCTION(custom_kw_config_set, CUSTOM_KW_CONFIG_SET_TYPE_ID) - - -custom_kw_config_set_type * custom_kw_config_set_alloc() { - custom_kw_config_set_type * set = util_malloc(sizeof * set); - UTIL_TYPE_ID_INIT(set, CUSTOM_KW_CONFIG_SET_TYPE_ID); - set->config_set = hash_alloc(); - pthread_rwlock_init(& set->rw_lock, NULL); - return set; -} - -custom_kw_config_set_type * custom_kw_config_set_alloc_from_file(const char * filename) { - custom_kw_config_set_type * set = custom_kw_config_set_alloc(); - custom_kw_config_set_fread(set, filename); - return set; -} - -void custom_kw_config_set_free(custom_kw_config_set_type * set) { - hash_free(set->config_set); - free(set); -} - -void custom_kw_config_set_add_config(custom_kw_config_set_type * set, const custom_kw_config_type * config) { - pthread_rwlock_wrlock(& set->rw_lock); - { - const char * name = custom_kw_config_get_name(config); - - if (!hash_has_key(set->config_set, name)) { - stringlist_type * stringlist = stringlist_alloc_new(); - hash_insert_hash_owned_ref(set->config_set, name, stringlist, stringlist_free__); - } - - stringlist_type * formatted_keys = (stringlist_type *) hash_get(set->config_set, name); - custom_kw_config_serialize(config, formatted_keys); - - } - pthread_rwlock_unlock(& set->rw_lock); -} - -void custom_kw_config_set_update_config(custom_kw_config_set_type * set, custom_kw_config_type * config) { - pthread_rwlock_rdlock(& set->rw_lock); - { - const char * name = custom_kw_config_get_name(config); - - if(!hash_has_key(set->config_set, name)) { - printf("[%s] Warning: The key:'%s' is not part of this set. Ignored!\n", __func__, name); - } else { - stringlist_type * formatted_keys = (stringlist_type *) hash_get(set->config_set, name); - custom_kw_config_deserialize(config, formatted_keys); - } - } - pthread_rwlock_unlock(& set->rw_lock); -} - - -void custom_kw_config_set_reset(custom_kw_config_set_type * set) { - pthread_rwlock_wrlock(& set->rw_lock); - { - hash_clear(set->config_set); - } - pthread_rwlock_unlock(& set->rw_lock); -} - -stringlist_type * custom_kw_config_set_get_keys_alloc(custom_kw_config_set_type * set) { - return hash_alloc_stringlist(set->config_set); -} - -void custom_kw_config_set_fwrite(custom_kw_config_set_type * set, const char * filename) { - pthread_rwlock_rdlock(& set->rw_lock); - { - FILE * stream = util_mkdir_fopen(filename, "w"); - if (stream) { - stringlist_type * keys = hash_alloc_stringlist(set->config_set); - stringlist_fwrite(keys, stream); - - for (int i = 0; i < stringlist_get_size(keys); i++) { - const char * key = stringlist_iget(keys, i); - stringlist_type * formatted_keys = (stringlist_type *) hash_get(set->config_set, key); - stringlist_fwrite(formatted_keys, stream); - } - - stringlist_free(keys); - fclose(stream); - } else { - util_abort("%s: failed to open: %s for writing \n", __func__, filename); - } - } - pthread_rwlock_unlock(& set->rw_lock); -} - - -bool custom_kw_config_set_fread(custom_kw_config_set_type * set, const char * filename) { - bool file_exists = false; - - pthread_rwlock_wrlock(& set->rw_lock); - { - hash_clear(set->config_set); - - if (util_file_exists(filename)) { - FILE * stream = util_fopen(filename, "r"); - if (stream) { - stringlist_type * key_set = stringlist_fread_alloc(stream); - - for (int i = 0; i < stringlist_get_size(key_set); i++) { - const char * key = stringlist_iget(key_set, i); - stringlist_type * config_keys = stringlist_fread_alloc(stream); - hash_insert_hash_owned_ref(set->config_set, key, config_keys, stringlist_free__); - } - stringlist_free(key_set); - fclose(stream); - } else { - util_abort("%s: failed to open: %s for reading \n", __func__, filename); - } - file_exists = true; - } - } - pthread_rwlock_unlock(& set->rw_lock); - return file_exists; -} diff --git a/ThirdParty/Ert/libenkf/src/data_ranking.c b/ThirdParty/Ert/libenkf/src/data_ranking.c deleted file mode 100644 index 366c230c80..0000000000 --- a/ThirdParty/Ert/libenkf/src/data_ranking.c +++ /dev/null @@ -1,151 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'data_ranking.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - - -#define DATA_RANKING_TYPE_ID 71420672 - -struct data_ranking_struct { - UTIL_TYPE_ID_DECLARATION; - int ens_size; - double_vector_type * data_ensemble; - perm_vector_type * sort_permutation; - bool_vector_type * valid; - char * user_key; - bool sort_increasing; -}; - - -UTIL_SAFE_CAST_FUNCTION( data_ranking , DATA_RANKING_TYPE_ID ) -UTIL_IS_INSTANCE_FUNCTION( data_ranking , DATA_RANKING_TYPE_ID ); - - -void data_ranking_free( data_ranking_type * ranking ) { - double_vector_free( ranking->data_ensemble ); - bool_vector_free( ranking->valid ); - - if (ranking->sort_permutation) - perm_vector_free( ranking->sort_permutation ); - - util_safe_free( ranking->user_key ); - free( ranking ); -} - - - - - -static void data_ranking_init(data_ranking_type * ranking , - enkf_fs_type * fs , - const enkf_config_node_type * config_node, - const char * key_index , - int step) { - - enkf_node_type * enkf_node = enkf_node_alloc( config_node ); - int iens; - for (iens = 0; iens < ranking->ens_size; iens++) { - - double value; - node_id_type node_id = {.report_step = step , - .iens = iens }; - - if (enkf_node_user_get( enkf_node , fs , key_index , node_id , &value)) { - double_vector_iset( ranking->data_ensemble , iens , value ); - bool_vector_iset( ranking->valid , iens , true ); - } - } - - if (ranking->sort_increasing) - ranking->sort_permutation = double_vector_alloc_sort_perm( ranking->data_ensemble ); - else - ranking->sort_permutation = double_vector_alloc_rsort_perm( ranking->data_ensemble ); - - enkf_node_free( enkf_node ); -} - - - -data_ranking_type * data_ranking_alloc( bool sort_increasing , int ens_size , const char * user_key , const char * key_index , enkf_fs_type * fs , const enkf_config_node_type * config_node , int step) { - data_ranking_type * ranking = util_malloc( sizeof * ranking ); - UTIL_TYPE_ID_INIT( ranking , DATA_RANKING_TYPE_ID ); - ranking->ens_size = ens_size; - ranking->sort_increasing = sort_increasing; - - if (ranking->sort_increasing) - ranking->data_ensemble = double_vector_alloc( ens_size , INFINITY); // To ensure it comes last when sorting - else - ranking->data_ensemble = double_vector_alloc( ens_size , -INFINITY); // To ensure it comes last when sorting - - ranking->valid = bool_vector_alloc( ens_size , false ); - ranking->sort_permutation = NULL; - ranking->user_key = util_alloc_string_copy( user_key ); - - data_ranking_init( ranking , fs , config_node , key_index , step ); - return ranking; -} - - - -void data_ranking_free__( void * arg) { - data_ranking_type * ranking = data_ranking_safe_cast( arg ); - data_ranking_free( ranking ); -} - - -const perm_vector_type * data_ranking_get_permutation( const data_ranking_type * data_ranking ) { - return data_ranking->sort_permutation; -} - - -void data_ranking_display( const data_ranking_type * data_ranking , FILE * stream) { - const int ens_size = data_ranking->ens_size; - const perm_vector_type * permutations = data_ranking->sort_permutation; - - { - int i; - fprintf(stream,"\n\n"); - fprintf(stream," # Realization %12s\n" , data_ranking->user_key); - fprintf(stream,"----------------------------------\n"); - for (i = 0; i < ens_size; i++) { - int iens = perm_vector_iget( permutations , i ); - if (bool_vector_iget( data_ranking->valid , iens)) - fprintf(stream,"%3d %3d %14.3f\n",i,iens,double_vector_iget(data_ranking->data_ensemble , iens)); - - } - fprintf(stream,"----------------------------------\n"); - } -} diff --git a/ThirdParty/Ert/libenkf/src/dependencies b/ThirdParty/Ert/libenkf/src/dependencies deleted file mode 100644 index cb79581d6c..0000000000 --- a/ThirdParty/Ert/libenkf/src/dependencies +++ /dev/null @@ -1,71 +0,0 @@ -enkf_tui_fs.o : enkf_tui_fs.c enkf_tui_fs.h enkf_tui_util.o enkf_tui_init.o enkf_main.o enkf_types.o enkf_fs.o -summary_obs.o : summary_obs.c summary_obs.h obs_data.o meas_matrix.o summary.o active_list.o -enkf_fs.o : enkf_fs.c enkf_fs.h enkf_defaults.o enkf_node.o basic_driver.o fs_types.o ecl_static_kw.o plain_driver_index.o plain_driver.o sqlite3_driver.o block_fs_driver.o block_fs_driver_index.o -local_updatestep.o : local_updatestep.c local_updatestep.h local_ministep.o enkf_macros.h -enkf_config_node.o : enkf_config_node.c enkf_config_node.h enkf_types.o enkf_macros.h field_config.o gen_data_config.o gen_kw_config.o summary_config.o -enkf_tui_util.o : enkf_tui_util.c enkf_tui_util.h enkf_node.o field.o field_config.o enkf_state.o ensemble_config.o enkf_types.o -enkf_defaults.o : enkf_defaults.c enkf_defaults.h -gen_data.o : gen_data.c gen_data.h enkf_serialize.o enkf_types.o enkf_macros.h enkf_util.o gen_data_config.o gen_data_common.h gen_common.o -block_fs_driver_index.o : block_fs_driver_index.c block_fs_driver_index.h fs_types.o basic_driver.o -field_obs.o : field_obs.c field_obs.h enkf_util.o field_config.o obs_data.o meas_vector.o field_config.o field.o active_list.o -enkf_tui_init.o : enkf_tui_init.c enkf_tui_init.h enkf_main.o enkf_sched.o enkf_types.o enkf_tui_util.o enkf_state.o enkf_node.o enkf_fs.o ensemble_config.o -block_fs_driver.o : block_fs_driver.c block_fs_driver.h fs_types.o basic_driver.o enkf_types.o -enkf_tui_ranking.o : enkf_tui_ranking.c enkf_tui_ranking.h enkf_main.o enkf_obs.o enkf_tui_util.o -enkf_main.o : enkf_main.c enkf_main.h enkf_config_node.o enkf_types.o obs_data.o meas_matrix.o enkf_state.o enkf_obs.o enkf_fs.o enkf_serialize.o enkf_sched.o ecl_config.o ensemble_config.o model_config.o site_config.o active_config.o enkf_analysis.o local_ministep.o local_updatestep.o local_config.o misfit_table.o plot_config.o ert_template.o enkf_defaults.o -plain_driver_common.o : plain_driver_common.c plain_driver_common.h enkf_types.o enkf_node.o -gen_data_active.o : gen_data_active.c gen_data_active.h enkf_macros.h -active_node.o : active_node.c active_node.h enkf_types.o enkf_config_node.o ensemble_config.o obs_vector.o -enkf_sched.o : enkf_sched.c enkf_sched.h enkf_types.o enkf_defaults.o -summary.o : summary.c summary.h enkf_macros.h enkf_util.o summary_config.o enkf_types.o enkf_util.o enkf_serialize.o -enkf_types.o : enkf_types.c enkf_types.h -plain_driver.o : plain_driver.c plain_driver.h fs_types.o basic_driver.o plain_driver_index.o plain_driver_common.o enkf_node.o -model_config.o : model_config.c model_config.h enkf_sched.o enkf_types.o plain_driver.o fs_types.o enkf_defaults.o -fs_types.o : fs_types.c fs_types.h -site_config.o : site_config.c site_config.h -ert_template.o : ert_template.c ert_template.h -misfit_table.o : misfit_table.c misfit_table.h enkf_obs.o enkf_fs.o -field_active.o : field_active.c field_active.h enkf_macros.h active_list.o -enkf_obs.o : enkf_obs.c enkf_obs.h summary_obs.o field_obs.o enkf_fs.o obs_vector.o enkf_state.o local_ministep.o local_config.o -enkf_state.o : enkf_state.c enkf_state.h enkf_node.o enkf_types.o ecl_static_kw.o field.o field_config.o gen_kw.o summary.o enkf_fs.o basic_driver.o ensemble_config.o model_config.o site_config.o ecl_config.o ert_template.o -active_config.o : active_config.c active_config.h enkf_types.o ensemble_config.o enkf_obs.o active_node.o -ensemble_config.o : ensemble_config.c ensemble_config.h enkf_config_node.o enkf_types.o field_config.o gen_data_config.o meas_matrix.o enkf_types.o enkf_fs.o gen_kw_config.o summary.o summary_config.o gen_data.o pilot_point_config.o gen_data_config.o gen_data_config.o field_trans.o -field_trans.o : field_trans.c field_trans.h -sqlite3_driver.o : sqlite3_driver.c sqlite3_driver.h sqlite3.o basic_driver.o fs_types.o enkf_config_node.o -field_config.o : field_config.c field_config.h enkf_types.o enkf_macros.h field_active.o active_list.o field_trans.o field_common.h -obs_vector.o : obs_vector.c obs_vector.h enkf_fs.o summary_obs.o field_obs.o gen_obs.o ensemble_config.o active_list.o -enkf_tui_export.o : enkf_tui_export.c enkf_tui_export.h enkf_main.o field.o field_config.o enkf_state.o enkf_fs.o enkf_tui_util.o field_config.o gen_data.o -enkf_tui_table.o : enkf_tui_table.c enkf_tui_table.h enkf_main.o enkf_tui_plot.o enkf_tui_fs.o enkf_obs.o field_obs.o field_config.o obs_vector.o enkf_tui_util.o ensemble_config.o gen_kw_config.o -enkf_tui_main.o : enkf_tui_main.c enkf_tui_main.h enkf_tui_run.o enkf_tui_export.o enkf_tui_plot.o enkf_tui_table.o enkf_tui_fs.o enkf_tui_ranking.o enkf_tui_misc.o enkf_main.o enkf_sched.o -enkf_util.o : enkf_util.c enkf_util.h enkf_defaults.o -main.o : main.c enkf_fs.o enkf_main.o enkf_types.o enkf_sched.o enkf_tui_main.o ERT.h -scalar.o : scalar.c scalar.h enkf_types.o scalar_config.o enkf_util.o enkf_serialize.o -pilot_point_config.o : pilot_point_config.c pilot_point_config.h enkf_types.o enkf_macros.h scalar_config.o -enkf_tui_plot.o : enkf_tui_plot.c enkf_tui_plot.h enkf_main.o enkf_tui_fs.o enkf_obs.o field_obs.o gen_obs.o field_config.o obs_vector.o enkf_tui_util.o ensemble_config.o enkf_state.o gen_kw_config.o enkf_defaults.o plot_config.o -summary_config.o : summary_config.c summary_config.h enkf_types.o enkf_util.o enkf_macros.h active_list.o -meas_matrix.o : meas_matrix.c meas_matrix.h meas_vector.o -gen_data_config.o : gen_data_config.c gen_data_config.h enkf_macros.h enkf_types.o gen_data_common.h gen_data_active.o active_list.o -active_list.o : active_list.c active_list.h enkf_macros.h -gen_kw.o : gen_kw.c gen_kw.h enkf_types.o enkf_util.o scalar.o enkf_macros.h gen_kw_common.h gen_kw_config.o -gen_obs.o : gen_obs.c gen_obs.h enkf_util.o enkf_types.o enkf_macros.h meas_vector.o obs_data.o gen_data.o gen_common.o gen_obs_active.o active_list.o -meas_vector.o : meas_vector.c meas_vector.h enkf_util.o -scalar_config.o : scalar_config.c scalar_config.h enkf_util.o enkf_macros.h trans_func.o active_list.o -enkf_tui_run.o : enkf_tui_run.c enkf_tui_run.h enkf_main.o enkf_fs.o enkf_sched.o ensemble_config.o enkf_analysis.o enkf_tui_util.o enkf_tui_fs.o -enkf_serialize.o : enkf_serialize.c enkf_serialize.h enkf_types.o active_list.o -sqlite3.o : sqlite3.c sqlite3.h -gen_obs_active.o : gen_obs_active.c gen_obs_active.h enkf_macros.h -basic_driver.o : basic_driver.c basic_driver.h fs_types.o -enkf_node.o : enkf_node.c enkf_node.h enkf_config_node.o field.o summary.o ecl_static_kw.o gen_kw.o gen_data.o enkf_serialize.o -ecl_config.o : ecl_config.c ecl_config.h enkf_util.o enkf_defaults.o -trans_func.o : trans_func.c trans_func.h -gen_common.o : gen_common.c gen_common.h gen_data_config.o -local_config.o : local_config.c local_config.h local_ministep.o local_updatestep.o -obs_data.o : obs_data.c obs_data.h enkf_util.o meas_matrix.o -plain_driver_index.o : plain_driver_index.c plain_driver_index.h fs_types.o plain_driver_common.o basic_driver.o -field.o : field.c field.h field_config.o enkf_serialize.o -plot_config.o : plot_config.c plot_config.h enkf_defaults.o -ecl_static_kw.o : ecl_static_kw.c ecl_static_kw.h enkf_util.o enkf_macros.h -local_ministep.o : local_ministep.c local_ministep.h active_list.o enkf_macros.h -enkf_tui_misc.o : enkf_tui_misc.c enkf_tui_misc.h enkf_types.o enkf_main.o enkf_state.o -enkf_analysis.o : enkf_analysis.c enkf_analysis.h meas_matrix.o obs_data.o analysis_config.o enkf_util.o -gen_kw_config.o : gen_kw_config.c gen_kw_config.h enkf_util.o enkf_macros.h trans_func.o scalar_config.o enkf_defaults.o gen_kw_common.h -analysis_config.o : analysis_config.c analysis_config.h enkf_types.o enkf_defaults.o diff --git a/ThirdParty/Ert/libenkf/src/ecl_config.c b/ThirdParty/Ert/libenkf/src/ecl_config.c deleted file mode 100644 index a0a9f2b6d4..0000000000 --- a/ThirdParty/Ert/libenkf/src/ecl_config.c +++ /dev/null @@ -1,1012 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'ecl_config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. - */ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -/** - This file implements a struct which holds configuration information - needed to run ECLIPSE. - - Pointers to the fields in this structure are passed on to e.g. the - enkf_state->shared_info object, but this struct is the *OWNER* of - this information, and hence responsible for booting and deleting - these objects. - - Observe that the distinction of what goes in model_config, and what - goes in ecl_config is not entirely clear. - */ - -struct ecl_config_struct -{ - ecl_io_config_type * io_config; /* This struct contains information of whether the eclipse files should be formatted|unified|endian_fliped */ - path_fmt_type * eclbase; /* A path_fmt instance with one %d specifer which will be used for eclbase - members will allocate private eclbase; i.e. updates will not be reflected. */ - sched_file_type * sched_file; /* Will only contain the history - if predictions are active the member_config objects will have a private sched_file instance. */ - hash_type * fixed_length_kw; /* Set of user-added SCHEDULE keywords with fixed length. */ - bool include_all_static_kw; /* If true all static keywords are stored.*/ - set_type * static_kw_set; /* Minimum set of static keywords which must be included to make valid restart files. */ - stringlist_type * user_static_kw; - char * data_file; /* Eclipse data file. */ - time_t start_date; /* The start date of the ECLIPSE simulation - parsed from the data_file. */ - time_t end_date; /* An optional date value which can be used to check if the ECLIPSE simulation has been 'long enough'. */ - ecl_refcase_list_type * refcase_list; - ecl_grid_type * grid; /* The grid which is active for this model. */ - char * schedule_prediction_file; /* Name of schedule prediction file - observe that this is internally handled as a gen_kw node. */ - char * schedule_target_file; /* File name to write schedule info to */ - char * input_init_section; /* File name for ECLIPSE (EQUIL) initialisation - can be NULL if the user has not supplied INIT_SECTION. */ - char * init_section; /* Equal to the full path of input_init_section IFF input_init_section points to an existing file - otherwise equal to input_init_section. */ - int last_history_restart; - bool can_restart; /* Have we found the tag in the data file? */ - int num_cpu; /* We should parse the ECLIPSE data file and determine how many cpus this eclipse file needs. */ - ert_ecl_unit_enum unit_system; /* Either metric, field or lab */ -}; - -/*****************************************************************/ - -/** - With this function we try to determine whether ECLIPSE is active - for this case, i.e. if ECLIPSE is part of the forward model. This - should ideally be inferred from the FORWARD model, but what we do - here is just to check if the core field ->eclbase and ->data_file - have been set. If they are both equal to NULL we assume that - ECLIPSE is not active and return false, otherwise we return true. - */ - -bool ecl_config_active(const ecl_config_type * config) -{ - if ((config->eclbase == NULL )&& (config->data_file == NULL)) - return false; - else - return true; -} - - /** - Could look up the sched_file instance directly - because the - ecl_config will never be the owner of a file with predictions. - */ - -int ecl_config_get_last_history_restart(const ecl_config_type * ecl_config) -{ - return ecl_config->last_history_restart; -} - -bool ecl_config_can_restart(const ecl_config_type * ecl_config) -{ - return ecl_config->can_restart; -} - -void ecl_config_assert_restart(const ecl_config_type * ecl_config) -{ - if (!ecl_config_can_restart(ecl_config)) - { - fprintf(stderr, "** Warning - tried to restart case which is not properly set up for restart.\n"); - fprintf(stderr, "** Need in datafile and INIT_SECTION keyword in config file.\n"); - util_exit("%s: exiting \n", __func__); - } -} - -ui_return_type * ecl_config_validate_data_file(const ecl_config_type * ecl_config, const char * data_file) { - if (util_file_exists(data_file)) - return ui_return_alloc(UI_RETURN_OK); - else { - ui_return_type * ui_return = ui_return_alloc(UI_RETURN_FAIL); - char * error_msg = util_alloc_sprintf("File not found:%s" , data_file); - ui_return_add_error(ui_return , error_msg); - free( error_msg ); - return ui_return; - } -} - - -void ecl_config_set_data_file(ecl_config_type * ecl_config, const char * data_file) { - ecl_config->data_file = util_realloc_string_copy(ecl_config->data_file, data_file); - { - FILE * stream = util_fopen(ecl_config->data_file, "r"); - basic_parser_type * parser = basic_parser_alloc(NULL, NULL, NULL, NULL, "--", "\n"); - char * init_tag = enkf_util_alloc_tagged_string("INIT"); - - ecl_config->can_restart = basic_parser_fseek_string(parser, stream, init_tag, false, true); - - free(init_tag); - basic_parser_free(parser); - fclose(stream); - } - ecl_config->start_date = ecl_util_get_start_date(ecl_config->data_file); - ecl_config->num_cpu = ecl_util_get_num_cpu(ecl_config->data_file); - ecl_config->unit_system = ecl_util_get_unit_set(ecl_config->data_file); -} - - -const char * ecl_config_get_data_file(const ecl_config_type * ecl_config) -{ - return ecl_config->data_file; -} - -time_t ecl_config_get_start_date(const ecl_config_type * ecl_config) -{ - return ecl_config->start_date; -} - -time_t ecl_config_get_end_date(const ecl_config_type * ecl_config) -{ - return ecl_config->end_date; -} - -static void ecl_config_set_end_date(ecl_config_type * ecl_config, time_t end_date) -{ - ecl_config->end_date = end_date; -} - -int ecl_config_get_num_cpu(const ecl_config_type * ecl_config) -{ - return ecl_config->num_cpu; -} - -const char * ecl_config_get_schedule_prediction_file(const ecl_config_type * ecl_config) -{ - return ecl_config->schedule_prediction_file; -} - -/** - Observe: The real schedule prediction functionality is implemented - as a special GEN_KW node in ensemble_config. - */ - -void ecl_config_set_schedule_prediction_file(ecl_config_type * ecl_config, const char * schedule_prediction_file) -{ - ecl_config->schedule_prediction_file = util_realloc_string_copy(ecl_config->schedule_prediction_file, schedule_prediction_file); -} - -const char * ecl_config_get_schedule_file(const ecl_config_type * ecl_config) -{ - if (ecl_config->sched_file != NULL ) - return sched_file_iget_filename(ecl_config->sched_file, 0); - else - return NULL ; -} - -bool ecl_config_has_schedule(const ecl_config_type * ecl_config) -{ - if (ecl_config->sched_file == NULL ) - return false; - else - return true; -} - -bool ecl_config_has_init_section(const ecl_config_type * ecl_config) -{ - if (ecl_config->init_section == NULL ) - return false; - else - return true; -} - - - -ui_return_type * ecl_config_validate_schedule_file(const ecl_config_type * ecl_config , const char * schedule_file) { - if ((ecl_config->start_date != -1) && (util_file_exists(schedule_file))) - return ui_return_alloc(UI_RETURN_OK); - else { - ui_return_type * ui_return = ui_return_alloc(UI_RETURN_FAIL); - - if (ecl_config->start_date == -1) - ui_return_add_error(ui_return, "You must set the ECLIPSE datafile before you can set the SCHEDULE file."); - - if (!util_file_exists(schedule_file)) { - char * error_msg = util_alloc_sprintf("SCHEDULE file:%s not found" , schedule_file); - ui_return_add_error(ui_return , error_msg); - free(error_msg); - } - - return ui_return; - } -} - - -/** - Observe: This function makes a hard assumption that the - ecl_config->start_date has already been set. (And should not be - changed either ...) -*/ - -void ecl_config_set_schedule_file(ecl_config_type * ecl_config, const char * schedule_file, const char * schedule_target_file) -{ - if (schedule_target_file) - ecl_config->schedule_target_file = util_alloc_string_copy(schedule_target_file); - else { - char * base; /* The schedule target file will be without any path component */ - char * ext; - util_alloc_file_components(schedule_file, NULL, &base, &ext); - ecl_config->schedule_target_file = util_alloc_filename(NULL, base, ext); - free(ext); - free(base); - } - - ecl_config->sched_file = sched_file_alloc(ecl_config->start_date); - sched_file_parse(ecl_config->sched_file, schedule_file); - ecl_config->last_history_restart = sched_file_get_num_restart_files(ecl_config->sched_file) - 1; /* We keep track of this - so we can stop assimilation at the end of history */ - - { - hash_iter_type * iter = hash_iter_alloc(ecl_config->fixed_length_kw); - while (!hash_iter_is_complete(iter)) { - const char * key = hash_iter_get_next_key(iter); - int length = hash_get_int(ecl_config->fixed_length_kw, key); - - sched_file_add_fixed_length_kw(ecl_config->sched_file, key, length); - } - hash_iter_free(iter); - } -} - - - -void ecl_config_add_fixed_length_schedule_kw(ecl_config_type * ecl_config, const char * kw, int length) -{ - hash_insert_int(ecl_config->fixed_length_kw, kw, length); - if (ecl_config->sched_file != NULL ) - sched_file_add_fixed_length_kw(ecl_config->sched_file, kw, length); - -} - - -ui_return_type * ecl_config_validate_eclbase(const ecl_config_type * ecl_config, const char * eclbase_fmt) { - if (ecl_util_valid_basename_fmt(eclbase_fmt)) - return ui_return_alloc(UI_RETURN_OK); - else { - ui_return_type * ui_return = ui_return_alloc(UI_RETURN_FAIL); - { - char * error_msg = util_alloc_sprintf("The format string: %s was invalid as ECLBASE format", eclbase_fmt); - ui_return_add_error(ui_return, error_msg); - free(error_msg); - } - ui_return_add_help(ui_return , "The eclbase format must have all characters in the same case,"); - ui_return_add_help(ui_return , "in addition it can contain a %d specifier which will be"); - ui_return_add_help(ui_return , "with the realization number."); - - return ui_return; - } -} - -/** - The value of eclbase is in addition internalized in each enkf_state - object, i.e. the _set routine must be called from enkf_main, and - call enkf_state_update_eclbase() afterwards. - */ - -void ecl_config_set_eclbase(ecl_config_type * ecl_config, const char * eclbase_fmt) -{ - if (ecl_config->eclbase != NULL ) - path_fmt_free(ecl_config->eclbase); - ecl_config->eclbase = path_fmt_alloc_path_fmt(eclbase_fmt); -} - - -/** - Observe that this function returns a (char *) - corresponding to - the argument used when calling the ecl_config_set_eclbase() - function, and not a path_fmt instance. - */ - -const char * ecl_config_get_eclbase(const ecl_config_type * ecl_config) -{ - return path_fmt_get_fmt(ecl_config->eclbase); -} - -/** - Can be called with @refcase == NULL - which amounts to clearing the - current refcase. -*/ -bool ecl_config_load_refcase(ecl_config_type * ecl_config, const char * refcase) -{ - return ecl_refcase_list_set_default(ecl_config->refcase_list, refcase); -} - - -ui_return_type * ecl_config_validate_refcase( const ecl_config_type * ecl_config , const char * refcase) { - if (ecl_sum_case_exists( refcase )) - return ui_return_alloc( UI_RETURN_OK ); - else { - ui_return_type * ui_return = ui_return_alloc( UI_RETURN_FAIL ); - char * error_msg = util_alloc_sprintf( "Could not load summary case from:%s \n",refcase); - ui_return_add_error( ui_return , error_msg ); - free( error_msg ); - return ui_return; - } -} - - -/** - Will return NULL if no refcase is set. - */ -const char * ecl_config_get_refcase_name(const ecl_config_type * ecl_config) -{ - const ecl_sum_type * refcase = ecl_refcase_list_get_default(ecl_config->refcase_list); - if (refcase == NULL ) - return NULL ; - else - return ecl_sum_get_case(refcase); - -} - -/** - This function will clear the list of static keywords supplied by - the user. The default built in keywords are not touched. - */ - -void ecl_config_clear_static_kw(ecl_config_type * ecl_config) -{ - ecl_config->include_all_static_kw = false; - stringlist_clear(ecl_config->user_static_kw); -} - -/** - Returns a stringlist of the user-defined static keywords. - */ -stringlist_type * ecl_config_get_static_kw_list(const ecl_config_type * ecl_config) -{ - return ecl_config->user_static_kw; -} - - /* The semantic regarding INIT_SECTION is as follows: - - 1. If the INIT_SECTION points to an existing file - the - ecl_config->input_init_section is set to the absolute path of - this file. - - 2. If the INIT_SECTION points to a not existing file: - - a. We assert that INIT_SECTION points to a pure filename, - i.e. /some/path/which/does/not/exist is NOT accepted. In - the case the input argument contain a path a error message - will be printed on stderr and the ->init_section will not - be set. - b. The ecl_config->input_init_section is set to point to this - file. - c. WE TRUST THE USER TO SUPPLY CONTENT (THROUGH SOME FUNKY - FORWARD MODEL) IN THE RUNPATH. This can unfortunately not - be checked/verified before the ECLIPSE simulation fails. - - - The INIT_SECTION keyword and in the datafile (checked with - ecl_config->can_restart) interplay as follows: - - - CASE | INIT_SECTION | | OK ? - --------------------------------------------- - 0 | Present | Present | Yes - 1 | Not Present | Present | No - 2 | Present | Not present| No - 3 | Not Present | Not present| Yes - --------------------------------------------- - - - Case 0: This is the most flexible case, which can do arbitrary - restart. - - Case 1: In this case the datafile will contain a tag, we - we do not have the info to replace that tag with for - initialisation, and ECLIPSE will fail. Strictly speaking this - case can actually restart, but that is not enough - we let - this case fail hard. - - Case 2: We have some INIT_SECTION infor, but no tag in he - datafile to update. If the datafile has embedded - initialisation info this case will work for init; but it is - logically flawed, and not accepted. Currently only a warning. - - Case 3: This case has just the right amount of information for - initialisation, but it is 'consistently unable' to restart. - -*/ - -ui_return_type * ecl_config_validate_init_section(const ecl_config_type * ecl_config, const char * input_init_section) { - if (ecl_config->can_restart) - return ui_return_alloc( UI_RETURN_OK ); - else { - ui_return_type * ui_return = ui_return_alloc(UI_RETURN_FAIL); - ui_return_add_error( ui_return , "The tag was not found in datafile - can not set INIT_SECTION keyword\n"); - return ui_return; - } -} - - -void ecl_config_set_init_section(ecl_config_type * ecl_config, const char * input_init_section) { - if (ecl_config->can_restart) { - /* The tag is set. */ - ecl_config->input_init_section = util_realloc_string_copy(ecl_config->input_init_section, input_init_section); /* input_init_section = path/to/init_section */ - if (util_file_exists(ecl_config->input_init_section)) - { /* init_section = $CWD/path/to/init_section */ - util_safe_free(ecl_config->init_section); - ecl_config->init_section = util_alloc_realpath(input_init_section); - } - else - { - char * path; - - util_alloc_file_components(ecl_config->input_init_section, &path, NULL, NULL ); - if (path != NULL ) - fprintf(stderr, - "** Warning: %s: When INIT_SECTION:%s points to a non-existing file - you can not have any path components.\n", - __func__, input_init_section); - else - ecl_config->init_section = util_alloc_string_copy(input_init_section); - - util_safe_free(path); - } - } - else - /* - The tag is not set - we can not utilize the - input_init_section info, and we just ignore it. - */ - fprintf(stderr, - "** Warning: tag was not found in datafile - can not utilize INIT_SECTION keyword - ignored.\n"); -} - - -/** - This just returns the string which has been set with the - ecl_config_set_init_section() function, whereas the - ecl_config_get_equil_init_file() function will return the absolute - path to the init_section (if it exists). - */ - -const char * ecl_config_get_init_section(const ecl_config_type * ecl_config) -{ - return ecl_config->input_init_section; -} - -const char * ecl_config_get_equil_init_file(const ecl_config_type * ecl_config) -{ - return ecl_config->init_section; -} - - -static void ecl_config_init_static_kw(ecl_config_type * ecl_config) -{ - int i; - for (i = 0; i < NUM_STATIC_KW; i++) - set_add_key(ecl_config->static_kw_set, DEFAULT_STATIC_KW - [i]); -} - -ecl_config_type * ecl_config_alloc() -{ - ecl_config_type * ecl_config = util_malloc(sizeof *ecl_config); - - ecl_config->io_config = ecl_io_config_alloc(DEFAULT_FORMATTED, DEFAULT_UNIFIED, DEFAULT_UNIFIED); - ecl_config->fixed_length_kw = hash_alloc(); - ecl_config->eclbase = NULL; - ecl_config->include_all_static_kw = false; - ecl_config->static_kw_set = set_alloc_empty(); - ecl_config->user_static_kw = stringlist_alloc_new(); - ecl_config->num_cpu = 1; /* This must get a valid default in case no ECLIPSE datafile is provided. */ - ecl_config->unit_system = ERT_ECL_METRIC_UNITS; - ecl_config->data_file = NULL; - ecl_config->input_init_section = NULL; - ecl_config->init_section = NULL; - ecl_config->grid = NULL; - ecl_config->can_restart = false; - ecl_config->start_date = -1; - ecl_config->end_date = -1; - ecl_config->sched_file = NULL; - ecl_config->schedule_prediction_file = NULL; - ecl_config->schedule_target_file = NULL; - ecl_config->refcase_list = ecl_refcase_list_alloc(); - - ecl_config_init_static_kw(ecl_config); - - return ecl_config; -} - -void ecl_config_init(ecl_config_type * ecl_config, const config_content_type * config) -{ - if (config_content_has_item(config, ECLBASE_KEY)) { - ui_return_type * ui_return = ecl_config_validate_eclbase(ecl_config, config_content_iget(config, ECLBASE_KEY, 0, 0)); - if (ui_return_get_status(ui_return) == UI_RETURN_OK) - ecl_config_set_eclbase(ecl_config, config_content_iget(config, ECLBASE_KEY, 0, 0)); - else - util_abort("%s: failed to set eclbase format. Error:%s\n", __func__ , ui_return_get_last_error(ui_return)); - ui_return_free(ui_return); - } - - if (config_content_has_item(config, DATA_FILE_KEY)) - { - ui_return_type * ui_return = ecl_config_validate_data_file(ecl_config, config_content_iget(config, DATA_FILE_KEY, 0, 0)); - if (ui_return_get_status( ui_return ) == UI_RETURN_OK) - ecl_config_set_data_file( ecl_config, config_content_iget(config, DATA_FILE_KEY, 0, 0) ); - else - util_abort("%s: problem setting ECLIPSE data file\n",__func__ , ui_return_get_last_error(ui_return)); - - ui_return_free(ui_return); - } - - if (config_content_has_item(config, SCHEDULE_FILE_KEY)) { - const char * schedule_target_file = config_content_safe_iget(config, SCHEDULE_FILE_KEY, 0, 1); - if (schedule_target_file) { - ui_return_type * ui_return_sched_target_file = ecl_config_validate_schedule_file(ecl_config, schedule_target_file); - if (!ui_return_get_status(ui_return_sched_target_file) == UI_RETURN_OK) { - util_abort("%s: failed to set target schedule file. Error:%s\n",__func__ , ui_return_get_last_error(ui_return_sched_target_file)); - } - ui_return_free(ui_return_sched_target_file); - } - - ui_return_type * ui_return = ecl_config_validate_schedule_file(ecl_config, config_content_iget(config, SCHEDULE_FILE_KEY, 0, 0)); - if (ui_return_get_status(ui_return) == UI_RETURN_OK) - ecl_config_set_schedule_file(ecl_config, config_content_iget(config, SCHEDULE_FILE_KEY, 0, 0), schedule_target_file); - else - util_abort("%s: failed to set schedule file. Error:%s\n",__func__ , ui_return_get_last_error(ui_return)); - - ui_return_free(ui_return); - } - - if (config_content_has_item(config, GRID_KEY)) { - const char * grid_file = config_content_iget(config, GRID_KEY, 0, 0); - ui_return_type * ui_return = ecl_config_validate_grid( ecl_config , grid_file); - if (ui_return_get_status(ui_return) == UI_RETURN_OK) - ecl_config_set_grid(ecl_config, grid_file ); - else - util_abort("%s: failed to set grid file:%s Error:%s \n",__func__ , grid_file , ui_return_get_last_error(ui_return)); - - ui_return_free( ui_return ); - } - - - if (config_content_has_item(config, ADD_FIXED_LENGTH_SCHEDULE_KW_KEY)) - { - int iocc; - for (iocc = 0; iocc < config_content_get_occurences(config, ADD_FIXED_LENGTH_SCHEDULE_KW_KEY); iocc++) - ecl_config_add_fixed_length_schedule_kw(ecl_config, - config_content_iget(config, ADD_FIXED_LENGTH_SCHEDULE_KW_KEY, iocc, 0), - config_content_iget_as_int(config, ADD_FIXED_LENGTH_SCHEDULE_KW_KEY, iocc, 1)); - } - - if (config_content_has_item(config, REFCASE_KEY)) - { - const char * refcase_path = config_content_get_value_as_path(config, REFCASE_KEY); - if (!ecl_config_load_refcase(ecl_config, refcase_path)) - fprintf(stderr, "** Warning: loading refcase:%s failed \n", refcase_path); - } - - if (config_content_has_item(config, REFCASE_LIST_KEY)) - { - config_content_item_type * item = config_content_get_item(config, REFCASE_LIST_KEY); - int i; - for (i = 0; i < config_content_item_get_size(item); i++) - { - config_content_node_type * node = config_content_item_iget_node(item, i); - int j; - for (j = 0; j < config_content_node_get_size(node); j++) - { - const char * case_glob = config_content_node_iget_as_path(node, j); - ecl_refcase_list_add_matching(ecl_config->refcase_list, case_glob); - } - } - } - - if (config_content_has_item(config, INIT_SECTION_KEY)) - ecl_config_set_init_section(ecl_config, config_content_get_value(config, INIT_SECTION_KEY)); - else if (ecl_config->can_restart) - /** - This is a hard error - the datafile contains , however - the config file does NOT contain INIT_SECTION, i.e. we have - no information to fill in for the section. This case - will not be able to initialize an ECLIPSE model, and that is - broken behaviour. - */ - util_exit("Sorry: when the datafile contains the config file MUST have the INIT_SECTION keyword. \n"); - - /* - The user has not supplied a INIT_SECTION keyword whatsoever, - this essentially means that we can not restart - because: - - 1. The EQUIL section must be inlined in the DATAFILE without any - special markup. - - 2. ECLIPSE will fail hard if the datafile contains both an EQUIL - section and a restart statement, and when we have not marked - the EQUIL section specially with the INIT_SECTION keyword it - is impossible for ERT to dynamically change between a - datafile with initialisation and a datafile for restart. - - IFF the user has no intentitions of any form of restart, this is - perfectly legitemate. - */ - if (config_content_has_item(config, END_DATE_KEY)) - { - const char * date_string = config_content_get_value(config, END_DATE_KEY); - time_t end_date; - if (util_sscanf_date_utc(date_string, &end_date)) - ecl_config_set_end_date(ecl_config, end_date); - else - fprintf(stderr, "** WARNING **: Failed to parse %s as a date - should be in format dd/mm/yyyy \n", date_string); - } -} - -void ecl_config_free(ecl_config_type * ecl_config) -{ - ecl_io_config_free(ecl_config->io_config); - if (ecl_config->eclbase != NULL ) - path_fmt_free(ecl_config->eclbase); - - set_free(ecl_config->static_kw_set); - stringlist_free(ecl_config->user_static_kw); - util_safe_free(ecl_config->data_file); - if (ecl_config->sched_file != NULL ) - sched_file_free(ecl_config->sched_file); - - util_safe_free(ecl_config->schedule_target_file); - hash_free(ecl_config->fixed_length_kw); - - util_safe_free(ecl_config->input_init_section); - util_safe_free(ecl_config->init_section); - util_safe_free(ecl_config->schedule_prediction_file); - - if (ecl_config->grid != NULL ) - ecl_grid_free(ecl_config->grid); - - ecl_refcase_list_free(ecl_config->refcase_list); - - free(ecl_config); -} - -/** - This function adds a keyword to the list of restart keywords wich - are included. Observe that ecl_util_escape_kw() is called prior to - adding it. - - The kw __ALL__ is magic; and will result in a request to store all - static kewyords. This wastes disk-space, but might be beneficial - when debugging. - */ - -void ecl_config_add_static_kw(ecl_config_type * ecl_config, const char * _kw) -{ - if (strcmp(_kw, DEFAULT_ALL_STATIC_KW) == 0) - ecl_config->include_all_static_kw = true; - else - { - char * kw = util_alloc_string_copy(_kw); - ecl_util_escape_kw(kw); - if (!stringlist_contains(ecl_config->user_static_kw, kw)) - stringlist_append_owned_ref(ecl_config->user_static_kw, kw); - } -} - -/** - This function checks whether the static kw should be - included. Observe that it is __assumed__ that ecl_util_escape_kw() - has already been called on the kw. - */ - -bool ecl_config_include_static_kw(const ecl_config_type * ecl_config, const char * kw) -{ - if (ecl_config->include_all_static_kw) - return true; - else - { - if (set_has_key(ecl_config->static_kw_set, kw)) - return true; - else - return stringlist_contains(ecl_config->user_static_kw, kw); - } -} - -ecl_grid_type * ecl_config_get_grid(const ecl_config_type * ecl_config) -{ - return ecl_config->grid; -} - -const char * ecl_config_get_gridfile(const ecl_config_type * ecl_config) -{ - if (ecl_config->grid == NULL ) - return NULL ; - else - return ecl_grid_get_name(ecl_config->grid); -} - -/** - The ecl_config object isolated supports run-time changing of the - grid, however this does not (in general) apply to the system as a - whole. Other objects which internalize pointers (i.e. field_config - objects) to an ecl_grid_type instance will be left with dangling - pointers; and things will probably die an ugly death. So - changing - grid runtime should be done with extreme care. -*/ - -void ecl_config_set_grid(ecl_config_type * ecl_config, const char * grid_file) -{ - if (ecl_config->grid != NULL ) - ecl_grid_free(ecl_config->grid); - ecl_config->grid = ecl_grid_alloc(grid_file); -} - -ui_return_type * ecl_config_validate_grid( const ecl_config_type * ecl_config , const char * grid_file ) { - ui_return_type * ui_return; - if (util_file_exists( grid_file )) { - ecl_file_enum file_type = ecl_util_get_file_type( grid_file , NULL , NULL ); - if ((file_type == ECL_EGRID_FILE) || (file_type == ECL_GRID_FILE)) - ui_return = ui_return_alloc( UI_RETURN_OK ); - else { - ui_return = ui_return_alloc( UI_RETURN_FAIL ); - ui_return_add_error( ui_return , "Input argument is not a GRID/EGRID file"); - } - } else { - ui_return = ui_return_alloc( UI_RETURN_FAIL ); - ui_return_add_error( ui_return , "Input argument does not exist."); - } - return ui_return; -} - - - -ecl_refcase_list_type * ecl_config_get_refcase_list(const ecl_config_type * ecl_config) -{ - return ecl_config->refcase_list; -} - -const ecl_sum_type * ecl_config_get_refcase(const ecl_config_type * ecl_config) -{ - return ecl_refcase_list_get_default(ecl_config->refcase_list); -} - -bool ecl_config_has_refcase(const ecl_config_type * ecl_config) -{ - const ecl_sum_type * refcase = ecl_config_get_refcase(ecl_config); - if (refcase) - return true; - else - return false; -} - -ecl_io_config_type * ecl_config_get_io_config(const ecl_config_type * ecl_config) -{ - return ecl_config->io_config; -} - -const path_fmt_type * ecl_config_get_eclbase_fmt(const ecl_config_type * ecl_config) -{ - return ecl_config->eclbase; -} - -sched_file_type * ecl_config_get_sched_file(const ecl_config_type * ecl_config) -{ - return ecl_config->sched_file; -} - - -const char * ecl_config_get_schedule_target(const ecl_config_type * ecl_config) -{ - return ecl_config->schedule_target_file; -} - -int ecl_config_get_num_restart_files(const ecl_config_type * ecl_config) -{ - return sched_file_get_num_restart_files(ecl_config->sched_file); -} - -bool ecl_config_get_formatted(const ecl_config_type * ecl_config) -{ - return ecl_io_config_get_formatted(ecl_config->io_config); -} -bool ecl_config_get_unified_restart(const ecl_config_type * ecl_config) -{ - return ecl_io_config_get_unified_restart(ecl_config->io_config); -} -bool ecl_config_get_unified_summary(const ecl_config_type * ecl_config) -{ - return ecl_io_config_get_unified_summary(ecl_config->io_config); -} - -void ecl_config_static_kw_init(ecl_config_type * ecl_config, const config_content_type * config) -{ - if (config_content_has_item( config , STATIC_KW_KEY)) { - const config_content_item_type * content_item = config_content_get_item(config, STATIC_KW_KEY); - int j; - for (j = 0; j < config_content_item_get_size(content_item); j++) { - const config_content_node_type * content_node = config_content_item_iget_node(content_item, j); - int k; - for (k = 0; k < config_content_node_get_size(content_node); k++) - ecl_config_add_static_kw(ecl_config, config_content_node_iget(content_node, k)); - } - } -} - -void ecl_config_add_config_items(config_parser_type * config) -{ - config_schema_item_type * item; - - item = config_add_schema_item(config, SCHEDULE_FILE_KEY, false); - config_schema_item_set_argc_minmax(item, 1, 2); - config_schema_item_iset_type(item, 0, CONFIG_EXISTING_PATH); - /* - Observe that SCHEDULE_PREDICTION_FILE - which is implemented as a - GEN_KW is added in ensemble_config.c - */ - - item = config_add_schema_item(config, IGNORE_SCHEDULE_KEY, false); - config_schema_item_set_argc_minmax(item, 1, 1); - config_schema_item_iset_type(item, 0, CONFIG_BOOL); - - item = config_add_schema_item(config, ECLBASE_KEY, false); - config_schema_item_set_argc_minmax(item, 1, 1); - - item = config_add_schema_item(config, DATA_FILE_KEY, false); - config_schema_item_set_argc_minmax(item, 1, 1); - config_schema_item_iset_type(item, 0, CONFIG_EXISTING_PATH); - - item = config_add_schema_item(config, STATIC_KW_KEY, false); - config_schema_item_set_argc_minmax(item, 1, CONFIG_DEFAULT_ARG_MAX); - - item = config_add_schema_item(config, ADD_FIXED_LENGTH_SCHEDULE_KW_KEY, false); - config_schema_item_set_argc_minmax(item, 2, 2); - config_schema_item_iset_type(item, 1, CONFIG_INT); - - item = config_add_schema_item(config, REFCASE_KEY, false); - config_schema_item_set_argc_minmax(item, 1, 1); - config_schema_item_iset_type(item, 0, CONFIG_PATH); - - item = config_add_schema_item(config, REFCASE_LIST_KEY, false); - config_schema_item_set_default_type(item, CONFIG_PATH); - - item = config_add_schema_item(config, GRID_KEY, false); - config_schema_item_set_argc_minmax(item, 1, 1); - config_schema_item_iset_type(item, 0, CONFIG_EXISTING_PATH); - - item = config_add_schema_item(config, INIT_SECTION_KEY, false); - config_schema_item_set_argc_minmax(item, 1, 1); - config_schema_item_iset_type(item, 0, CONFIG_PATH); - config_add_alias(config, INIT_SECTION_KEY, "EQUIL_INIT_FILE"); - - item = config_add_schema_item(config, END_DATE_KEY, false); - config_schema_item_set_argc_minmax(item, 1, 1); -} - -void ecl_config_fprintf_config(const ecl_config_type * ecl_config, FILE * stream) -{ - fprintf(stream, CONFIG_COMMENTLINE_FORMAT); - fprintf(stream, CONFIG_COMMENT_FORMAT, "Here comes configuration information related to the ECLIPSE model."); - - fprintf(stream, CONFIG_KEY_FORMAT, DATA_FILE_KEY); - fprintf(stream, CONFIG_ENDVALUE_FORMAT, ecl_config->data_file); - - fprintf(stream, CONFIG_KEY_FORMAT, SCHEDULE_FILE_KEY); - fprintf(stream, CONFIG_ENDVALUE_FORMAT, sched_file_iget_filename(ecl_config->sched_file, 0)); - - fprintf(stream, CONFIG_KEY_FORMAT, ECLBASE_KEY); - fprintf(stream, CONFIG_ENDVALUE_FORMAT, path_fmt_get_fmt(ecl_config->eclbase)); - - if (ecl_config->include_all_static_kw) - { - fprintf(stream, CONFIG_KEY_FORMAT, STATIC_KW_KEY); - fprintf(stream, CONFIG_ENDVALUE_FORMAT, DEFAULT_ALL_STATIC_KW); - } - { - int size = stringlist_get_size(ecl_config->user_static_kw); - if (size > 0) - { - int i; - fprintf(stream, CONFIG_KEY_FORMAT, STATIC_KW_KEY); - for (i = 0; i < size; i++) - if (i < (size - 1)) - fprintf(stream, CONFIG_VALUE_FORMAT, stringlist_iget(ecl_config->user_static_kw, i)); - else - fprintf(stream, CONFIG_ENDVALUE_FORMAT, stringlist_iget(ecl_config->user_static_kw, i)); - } - } - - /* - if (ecl_config->refcase != NULL) { - fprintf( stream , CONFIG_KEY_FORMAT , REFCASE_KEY ); - fprintf( stream , CONFIG_ENDVALUE_FORMAT , ecl_config_get_refcase_name( ecl_config )); - } - */ - - if (ecl_config->grid != NULL ) - { - fprintf(stream, CONFIG_KEY_FORMAT, GRID_KEY); - fprintf(stream, CONFIG_ENDVALUE_FORMAT, ecl_config_get_gridfile(ecl_config)); - } - - if (ecl_config->schedule_prediction_file != NULL ) - { - fprintf(stream, CONFIG_KEY_FORMAT, SCHEDULE_PREDICTION_FILE_KEY); - fprintf(stream, CONFIG_ENDVALUE_FORMAT, ecl_config_get_schedule_prediction_file(ecl_config)); - } - - if (ecl_config->init_section != NULL ) - { - fprintf(stream, CONFIG_KEY_FORMAT, INIT_SECTION_KEY); - fprintf(stream, CONFIG_ENDVALUE_FORMAT, ecl_config_get_init_section(ecl_config)); - } - - { - hash_iter_type * iter = hash_iter_alloc(ecl_config->fixed_length_kw); - while (!hash_iter_is_complete(iter)) - { - const char * kw = hash_iter_get_next_key(iter); - int length = hash_get_int(ecl_config->fixed_length_kw, kw); - - fprintf(stream, CONFIG_KEY_FORMAT, ADD_FIXED_LENGTH_SCHEDULE_KW_KEY); - fprintf(stream, CONFIG_VALUE_FORMAT, kw); - fprintf(stream, CONFIG_INT_FORMAT, length); - fprintf(stream, "\n"); - - } - hash_iter_free(iter); - } - - fprintf(stream, "\n\n"); -} - -/* Units as specified in the ECLIPSE technical manual */ -const char * ecl_config_get_depth_unit(const ecl_config_type * ecl_config) -{ - switch(ecl_config->unit_system) { - case ERT_ECL_METRIC_UNITS: - return "M"; - case ERT_ECL_FIELD_UNITS: - return "FT"; - case ERT_ECL_LAB_UNITS: - return "CM"; - default: - util_abort("%s: unit system enum value:%d not recognized \n",__func__ , ecl_config->unit_system); - return NULL; - } -} - - -const char * ecl_config_get_pressure_unit(const ecl_config_type * ecl_config) -{ - switch(ecl_config->unit_system) { - case ERT_ECL_METRIC_UNITS: - return "BARSA"; - case ERT_ECL_FIELD_UNITS: - return "PSIA"; - case ERT_ECL_LAB_UNITS: - return "ATMA"; - default: - util_abort("%s: unit system enum value:%d not recognized \n",__func__ , ecl_config->unit_system); - return NULL; - } -} diff --git a/ThirdParty/Ert/libenkf/src/ecl_refcase_list.c b/ThirdParty/Ert/libenkf/src/ecl_refcase_list.c deleted file mode 100644 index 9e2e599729..0000000000 --- a/ThirdParty/Ert/libenkf/src/ecl_refcase_list.c +++ /dev/null @@ -1,397 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'ecl_refcase_list.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -#include -#include -#include -#include - -#include - -#include - - -/* - This file implements a quite simple collection of ecl_sum instances, - with the following twists: - - o The default case is special in several ways: - - - It is added with the ecl_refcase_list_set_default() function. - - - The default case is always the first case, i.e. iget(0) will - return the default case. - - - When setting the default we verify that it can be loaded, and - the thing fails if not. That is in contrast to the other cases - where the actual summary loading is lazy and on demand. - - o The collection has an internal dictionary which ensures that the - same case is not added twice. - - o When calling iget( ) the default case will come as index 0, and - the remaining cases will come in util_strcmp_int() ordering. - - o Observe that the functions in this module return NULL quite - liberally: - - - If you have added a case which does not exist you will get - NULL when you (at a later stage) try to access the ecl_sum - instance. - - - If you ask for the default case before one has been set you - will get NULL. - */ - - -#define SUM_PAIR_TYPE_ID 665109971 - -typedef struct sum_pair_struct { - UTIL_TYPE_ID_DECLARATION; - char * case_name; // This should be (path)/basename - no extension - ecl_sum_type * ecl_sum; -} sum_pair_type; - - - -struct ecl_refcase_list_struct { - sum_pair_type * default_case; - hash_type * case_dict; - vector_type * case_list; /* This is created, and sorted, on demand when we do indexed lookup of cases. */ - bool sorted; -}; - -/*****************************************************************/ - - - -static sum_pair_type * sum_pair_alloc( const char * case_name , bool strict_load) { - ecl_sum_type * ecl_sum = NULL; - char * path = NULL; - char * basename = NULL; - - util_alloc_file_components( case_name , &path , &basename , NULL); - if (basename != NULL) { - char * use_case = util_alloc_filename( path , basename , NULL); - if (strict_load) - ecl_sum = ecl_sum_fread_alloc_case( use_case , ":"); - - util_safe_free( path ); - free( basename ); - if (strict_load && (ecl_sum == NULL)) { - free( use_case ); - return NULL; - } - - - { - sum_pair_type * pair = util_malloc( sizeof * pair ); - UTIL_TYPE_ID_INIT( pair , SUM_PAIR_TYPE_ID ); - pair->case_name = use_case; - pair->ecl_sum = ecl_sum; - return pair; - } - } else { - util_safe_free( path ); - util_safe_free( basename ); - return NULL; - } -} - - -static UTIL_SAFE_CAST_FUNCTION( sum_pair , SUM_PAIR_TYPE_ID ); -static UTIL_SAFE_CAST_FUNCTION_CONST( sum_pair , SUM_PAIR_TYPE_ID ); - -const ecl_sum_type * sum_pair_get_ecl_sum( sum_pair_type * sum_pair ) { - if (sum_pair->ecl_sum == NULL) - sum_pair->ecl_sum = ecl_sum_fread_alloc_case( sum_pair->case_name , ":"); - return sum_pair->ecl_sum; -} - - -static void sum_pair_free( sum_pair_type * sum_pair ) { - free( sum_pair->case_name ); - if (sum_pair->ecl_sum != NULL) - ecl_sum_free( sum_pair->ecl_sum ); - free( sum_pair ); -} - - -static void sum_pair_free__( void * arg ) { - sum_pair_type * pair = sum_pair_safe_cast( arg ); - sum_pair_free( pair ); -} - - - - -static int sum_pair_cmp( const void * arg1 , const void * arg2) { - const sum_pair_type * pair1 = sum_pair_safe_cast_const( arg1 ); - const sum_pair_type * pair2 = sum_pair_safe_cast_const( arg2 ); - - return util_strcmp_int( pair1->case_name , pair2->case_name ); -} - -/*****************************************************************/ - - -ecl_refcase_list_type * ecl_refcase_list_alloc( ) { - ecl_refcase_list_type * refcase_list = util_malloc( sizeof * refcase_list ); - refcase_list->default_case = NULL; - refcase_list->case_list = vector_alloc_new(); - refcase_list->case_dict = hash_alloc(); - refcase_list->sorted = false; - return refcase_list; -} - - - -void ecl_refcase_list_free( ecl_refcase_list_type * refcase_list ) { - vector_free( refcase_list->case_list ); - hash_free( refcase_list->case_dict ); - free( refcase_list ); -} - - - -const ecl_sum_type * ecl_refcase_list_get_default( ecl_refcase_list_type * refcase_list ) { - const ecl_sum_type * return_value = NULL; - if (refcase_list->default_case) - return_value = sum_pair_get_ecl_sum( refcase_list->default_case ); - - return return_value; -} - - -bool ecl_refcase_list_has_default( ecl_refcase_list_type * refcase_list ) { - if (refcase_list->default_case) - return true; - else - return false; -} - - -static void ecl_refcase_list_del_default( ecl_refcase_list_type * refcase_list ) { - sum_pair_type * default_pair = refcase_list->default_case; - if (default_pair) { - hash_del( refcase_list->case_dict , default_pair->case_name ); - refcase_list->default_case = NULL; - } -} - - -/* - If a valid refcase has been set already, and this fails, nothing happens. -*/ - -bool ecl_refcase_list_set_default( ecl_refcase_list_type * refcase_list , const char * default_case) { - - if (default_case) { - sum_pair_type * default_pair = sum_pair_alloc( default_case , true ); - if (default_pair) { - ecl_refcase_list_del_default( refcase_list ); - refcase_list->default_case = default_pair; - - hash_insert_hash_owned_ref( refcase_list->case_dict , default_pair->case_name , default_pair , sum_pair_free__); - refcase_list->sorted = false; - return true; - } else - return false; - } else { - ecl_refcase_list_del_default( refcase_list ); - return true; - } -} - - - - -/** - Will sort the list and remove all elements which can not be loaded. -*/ - -static void ecl_refcase_list_assert_clean( ecl_refcase_list_type * refcase_list ) { - if (!refcase_list->sorted) { - vector_free( refcase_list->case_list ); - refcase_list->case_list = vector_alloc_new(); - - { - stringlist_type * tmp_list = hash_alloc_stringlist( refcase_list->case_dict ); - sum_pair_type * default_case = refcase_list->default_case; - int i; - - for (i =0; i < stringlist_get_size( tmp_list ); i++) { - const char * casename = stringlist_iget( tmp_list , i ); - bool normal_case = true; - - if (default_case && util_string_equal( casename , default_case->case_name)) - normal_case = false; - - if (normal_case) { - sum_pair_type * pair = hash_get( refcase_list->case_dict , casename); - const ecl_sum_type * ecl_sum = sum_pair_get_ecl_sum( pair ); - - if (ecl_sum) - vector_append_ref( refcase_list->case_list , pair); - else - hash_del( refcase_list->case_dict , casename ); - - } - } - stringlist_free( tmp_list ); - } - - vector_sort( refcase_list->case_list , sum_pair_cmp ); - refcase_list->sorted = true; - } -} - - -static sum_pair_type * ecl_refcase_list_get_pair( ecl_refcase_list_type * refcase_list , const char * case_name) { - ecl_refcase_list_assert_clean( refcase_list ); - { - if (hash_has_key( refcase_list->case_dict , case_name)) - return hash_get( refcase_list->case_dict , case_name ); - else - return NULL; - } -} - - -static sum_pair_type * ecl_refcase_list_iget_pair( ecl_refcase_list_type * refcase_list , int index) { - ecl_refcase_list_assert_clean( refcase_list ); - { - int index_offset = refcase_list->default_case ? 1 : 0; - index -= index_offset; - - if (index < 0) - return refcase_list->default_case; - else - return vector_safe_iget( refcase_list->case_list , index); - } -} - - -int ecl_refcase_list_get_size(ecl_refcase_list_type * refcase_list ) { - ecl_refcase_list_assert_clean( refcase_list ); - { - int size = hash_get_size( refcase_list->case_dict ); - return size; - } -} - - - -const ecl_sum_type * ecl_refcase_list_iget_case( ecl_refcase_list_type * refcase_list , int index) { - sum_pair_type * pair = ecl_refcase_list_iget_pair( refcase_list , index ); - if (pair) - return sum_pair_get_ecl_sum( pair ); - else - return NULL; -} - - -const ecl_sum_type * ecl_refcase_list_get_case( ecl_refcase_list_type * refcase_list , const char * case_name) { - sum_pair_type * pair = ecl_refcase_list_get_pair( refcase_list , case_name ); - if (pair) - return sum_pair_get_ecl_sum( pair ); - else - return NULL; -} - - -bool ecl_refcase_list_has_case( ecl_refcase_list_type * refcase_list , const char * case_name) { - const sum_pair_type * pair = ecl_refcase_list_get_pair( refcase_list , case_name ); - if (pair) - return true; - else - return false; -} - - - -const char * ecl_refcase_list_iget_pathcase( ecl_refcase_list_type * refcase_list , int index) { - const ecl_sum_type * ecl_sum = ecl_refcase_list_iget_case( refcase_list , index ); - if (ecl_sum) - return ecl_sum_get_case( ecl_sum ); - else - return NULL; -} - - - -int ecl_refcase_list_add_case( ecl_refcase_list_type * refcase_list , const char * case_name) { - sum_pair_type * pair = sum_pair_alloc( case_name , false ); - if (pair) { - if (hash_has_key( refcase_list->case_dict , pair->case_name)) { - sum_pair_free( pair ); - return 0; - } else { - hash_insert_hash_owned_ref( refcase_list->case_dict , pair->case_name , pair , sum_pair_free__); - refcase_list->sorted = false; - return 1; - } - } else - return 0; -} - -/* - The glob_string pattern must (for all practical purposes) end in an - explicit extension: - - - If it ends without an extension there will be zero mathces. It - - it ends with a '*' there will be a hell-of-a-lot of duplicate - matches. - - If the input glob string does not have an explicit extension we add - .*SMSPEC for the matching purpose. -*/ - - -int ecl_refcase_list_add_matching( ecl_refcase_list_type * refcase_list , const char * __glob_string) { - int count = 0; - char * glob_string; - - { - char * glob_ext; - util_alloc_file_components( __glob_string , NULL , NULL , &glob_ext); - if (glob_ext == NULL) - glob_string = util_alloc_filename(NULL , __glob_string , "*SMSPEC"); - else { - glob_string = util_alloc_string_copy( __glob_string ); - free( glob_ext ); - } - } - - { - stringlist_type * case_list = stringlist_alloc_new(); - int i; - stringlist_select_matching( case_list , glob_string ); - for (i=0; i < stringlist_get_size( case_list ); i++) { - count += ecl_refcase_list_add_case( refcase_list , stringlist_iget( case_list , i ) ); - } - stringlist_free( case_list ); - } - - free( glob_string ); - return count; -} - diff --git a/ThirdParty/Ert/libenkf/src/enkf_analysis.c b/ThirdParty/Ert/libenkf/src/enkf_analysis.c deleted file mode 100644 index 44a10d143f..0000000000 --- a/ThirdParty/Ert/libenkf/src/enkf_analysis.c +++ /dev/null @@ -1,190 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_analysis.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include - - - - - - -/*****************************************************************/ - -void enkf_analysis_fprintf_obs_summary(const obs_data_type * obs_data , const meas_data_type * meas_data , const int_vector_type * step_list , const char * ministep_name , FILE * stream ) { - const char * float_fmt = "%15.3f"; - fprintf(stream , "===============================================================================================================================\n"); - fprintf(stream , "Report step...: %04d",int_vector_iget( step_list , 0)); - if (int_vector_size( step_list ) == 1) - fprintf(stream , "\n"); - else - fprintf(stream , " - %04d \n",int_vector_get_last( step_list )); - - - fprintf(stream , "Ministep......: %s \n",ministep_name); - fprintf(stream , "-------------------------------------------------------------------------------------------------------------------------------\n"); - { - char * obs_fmt = util_alloc_sprintf(" %%-3d : %%-32s %s +/- %s" , float_fmt , float_fmt); - char * sim_fmt = util_alloc_sprintf(" %s +/- %s \n" , float_fmt , float_fmt); - - fprintf(stream , " Observed history | Simulated data \n"); - fprintf(stream , "-------------------------------------------------------------------------------------------------------------------------------\n"); - - { - int block_nr; - int obs_count = 1; /* Only for printing */ - for (block_nr =0; block_nr < obs_data_get_num_blocks( obs_data ); block_nr++) { - const obs_block_type * obs_block = obs_data_iget_block_const( obs_data , block_nr); - meas_block_type * meas_block = meas_data_iget_block( meas_data , block_nr ); - const char * obs_key = obs_block_get_key( obs_block ); - - for (int iobs = 0; iobs < obs_block_get_size( obs_block ); iobs++) { - active_type active_mode = obs_block_iget_active_mode( obs_block , iobs ); - if ((active_mode == MISSING) || (active_mode == LOCAL_INACTIVE)) - continue; - else { - const char * print_key; - if (iobs == 0) - print_key = obs_key; - else - print_key = " ..."; - - fprintf(stream , obs_fmt , obs_count , print_key , obs_block_iget_value( obs_block , iobs ) , obs_block_iget_std( obs_block , iobs )); - - if (active_mode == ACTIVE) - fprintf(stream , " Active |"); - else if (active_mode == DEACTIVATED) - fprintf(stream , " Inactive |"); - else if (active_mode == LOCAL_INACTIVE) - fprintf(stream , " |"); - else if (active_mode == MISSING) - fprintf(stream , " |"); - else - util_abort("%s: enum_value:%d not handled - internal error\n" , __func__ , active_mode); - - if (active_mode == MISSING) - fprintf(stream , " Missing\n"); - else if (active_mode == LOCAL_INACTIVE) - fprintf(stream , " Deactivated - local updates\n"); - else - fprintf(stream , sim_fmt, meas_block_iget_ens_mean( meas_block , iobs ) , meas_block_iget_ens_std( meas_block , iobs )); - - obs_count++; - } - } - } - } - - free( obs_fmt ); - free( sim_fmt ); - } - fprintf(stream , "===============================================================================================================================\n"); - fprintf(stream , "\n\n\n"); -} - - - - -void enkf_analysis_deactivate_outliers(obs_data_type * obs_data , meas_data_type * meas_data , double std_cutoff , double alpha, bool verbose) { - for (int block_nr =0; block_nr < obs_data_get_num_blocks( obs_data ); block_nr++) { - obs_block_type * obs_block = obs_data_iget_block( obs_data , block_nr); - meas_block_type * meas_block = meas_data_iget_block( meas_data , block_nr ); - - { - int iobs; - for (iobs =0; iobs < meas_block_get_total_obs_size( meas_block ); iobs++) { - if (meas_block_iget_active( meas_block , iobs )) { - double ens_std = meas_block_iget_ens_std( meas_block , iobs ); - if (ens_std <= std_cutoff) { - /* - De activated because the ensemble has to small - variation for this particular measurement. - */ - obs_block_deactivate( obs_block , iobs , verbose , "No ensemble variation"); - meas_block_deactivate( meas_block , iobs ); - } else { - double ens_mean = meas_block_iget_ens_mean( meas_block , iobs ); - double obs_std = obs_block_iget_std( obs_block , iobs ); - double obs_value = obs_block_iget_value( obs_block , iobs ); - double innov = obs_value - ens_mean; - - /* - Deactivated because the distance between the observed data - and the ensemble prediction is to large. Keeping these - outliers will lead to numerical problems. - */ - - if (fabs( innov ) > alpha * (ens_std + obs_std)) { - obs_block_deactivate(obs_block , iobs , verbose , "No overlap"); - meas_block_deactivate(meas_block , iobs); - } - } - } - } - } - } -} - -void enkf_analysis_deactivate_std_zero(obs_data_type * obs_data , meas_data_type * meas_data , bool verbose) { - - for (int block_nr =0; block_nr < obs_data_get_num_blocks( obs_data ); block_nr++) { - obs_block_type * obs_block = obs_data_iget_block( obs_data , block_nr); - meas_block_type * meas_block = meas_data_iget_block( meas_data , block_nr ); - - { - int iobs; - for (iobs =0; iobs < meas_block_get_total_obs_size( meas_block ); iobs++) { - if (meas_block_iget_active( meas_block , iobs )) { - double ens_std = meas_block_iget_ens_std( meas_block , iobs ); - if (ens_std <= 0.0) { - /* - De activated because the ensemble has to small - variation for this particular measurement. - */ - obs_block_deactivate( obs_block , iobs , verbose , "No ensemble variation"); - meas_block_deactivate( meas_block , iobs ); - } - } - } - } - } -} - - - - - - - - - diff --git a/ThirdParty/Ert/libenkf/src/enkf_config_node.c b/ThirdParty/Ert/libenkf/src/enkf_config_node.c deleted file mode 100644 index 47d760f1b2..0000000000 --- a/ThirdParty/Ert/libenkf/src/enkf_config_node.c +++ /dev/null @@ -1,1039 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_config_node.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define ENKF_CONFIG_NODE_TYPE_ID 776104 - -struct enkf_config_node_struct { - UTIL_TYPE_ID_DECLARATION; - ert_impl_type impl_type; - enkf_var_type var_type; - bool vector_storage; - bool forward_init; /* Should the (parameter) node be initialized by loading results from the Forward model? */ - - bool_vector_type * internalize; /* Should this node be internalized - observe that question of what to internalize is MOSTLY handled at a higher level - without consulting this variable. Can be NULL. */ - stringlist_type * obs_keys; /* Keys of observations which observe this node. */ - char * key; - path_fmt_type * init_file_fmt; /* Format used to create files for initialization. */ - path_fmt_type * enkf_infile_fmt; /* Format used to load in file from forward model - one %d (if present) is replaced with report_step. */ - path_fmt_type * enkf_outfile_fmt; /* Name of file which is written by EnKF, and read by the forward model. */ - void * data; /* This points to the config object of the actual implementation. */ - enkf_node_type * min_std; - char * min_std_file; - - vector_type * container_nodes; - /*****************************************************************/ - /* Function pointers to methods working on the underlying config object. */ - get_data_size_ftype * get_data_size; /* Function pointer to ask the underlying config object of the size - i.e. number of elements. */ - config_free_ftype * freef; -}; - - -UTIL_IS_INSTANCE_FUNCTION( enkf_config_node , ENKF_CONFIG_NODE_TYPE_ID ) - - -static bool enkf_config_node_has_container(const enkf_config_node_type * node , enkf_fs_type * fs , node_id_type node_id) { - bool has_container = true; - for (int inode=0; inode < vector_get_size( node->container_nodes ); inode++) { - enkf_config_node_type * child_node = vector_iget( node->container_nodes , inode ); - bool has_child; - if (child_node->vector_storage) - has_child = enkf_config_node_has_vector( child_node , fs , node_id.iens ); - else - has_child = enkf_config_node_has_node( child_node , fs , node_id ); - - if (!has_child) { - has_container = false; - break; - } - } - return has_container; -} - - - -bool enkf_config_node_has_node( const enkf_config_node_type * node , enkf_fs_type * fs , node_id_type node_id) { - if (node->impl_type == CONTAINER) - return enkf_config_node_has_container( node , fs , node_id ); - else - return enkf_fs_has_node( fs , node->key , node->var_type , node_id.report_step , node_id.iens ); -} - - -bool enkf_config_node_has_vector( const enkf_config_node_type * node , enkf_fs_type * fs , int iens) { - bool has_vector = enkf_fs_has_vector( fs , node->key , node->var_type , iens ); - return has_vector; -} - - - -static enkf_config_node_type * enkf_config_node_alloc__(enkf_var_type var_type, ert_impl_type impl_type, const char * key, bool forward_init) { - enkf_config_node_type * node = util_malloc( sizeof *node ); - UTIL_TYPE_ID_INIT( node , ENKF_CONFIG_NODE_TYPE_ID ); - node->forward_init = forward_init; - node->var_type = var_type; - node->impl_type = impl_type; - node->key = util_alloc_string_copy( key ); - node->container_nodes = vector_alloc_new(); - node->vector_storage = false; - - node->init_file_fmt = NULL; - node->enkf_infile_fmt = NULL; - node->enkf_outfile_fmt = NULL; - node->internalize = NULL; - node->data = NULL; - node->obs_keys = stringlist_alloc_new(); - node->min_std = NULL; - node->min_std_file = NULL; - - node->get_data_size = NULL; - node->freef = NULL; - - switch(impl_type) { - case(FIELD): - node->freef = field_config_free__; - node->get_data_size = field_config_get_data_size__; - break; - case(GEN_KW): - node->freef = gen_kw_config_free__; - node->get_data_size = gen_kw_config_get_data_size__; - break; - case(CUSTOM_KW): - node->freef = custom_kw_config_free__; - node->get_data_size = NULL; - break; - case(SUMMARY): - node->vector_storage = true; - node->freef = summary_config_free__; - node->get_data_size = summary_config_get_data_size__; - break; - case(GEN_DATA): - node->freef = gen_data_config_free__; - node->get_data_size = NULL; - break; - case(SURFACE): - node->freef = surface_config_free__; - node->get_data_size = surface_config_get_data_size__; - break; - case(CONTAINER): - node->freef = container_config_free__; - node->get_data_size = container_config_get_data_size__; - break; - default: - util_abort("%s : invalid implementation type: %d - aborting \n",__func__ , impl_type); - } - return node; -} - - -bool enkf_config_node_vector_storage( const enkf_config_node_type * config_node) { - return config_node->vector_storage; -} - -/** - Requires that enkf_outfile_fmt (i.e. the name of the file produced - by ERT) is set to a non NULL value; in addition to the type - specific validation in gen_kw_config_is_valid(). -*/ - -static bool enkf_config_node_is_valid_GEN_KW( const enkf_config_node_type * config_node ) { - bool valid = gen_kw_config_is_valid( config_node->data ); - valid = (valid && (config_node->enkf_outfile_fmt != NULL)); - - return valid; -} - - -static bool enkf_config_node_is_valid_FIELD( const enkf_config_node_type * config_node ) { - bool valid = false; - if ( config_node->var_type != INVALID_VAR ) - valid = field_config_is_valid( config_node->data ); - - - return valid; -} - - -static bool enkf_config_node_is_valid_GEN_DATA( const enkf_config_node_type * config_node ) { - bool valid = gen_kw_config_is_valid( config_node->data ); - valid = (valid && (config_node->enkf_outfile_fmt != NULL)); - - return valid; -} - - - - - -bool enkf_config_node_is_valid( const enkf_config_node_type * config_node ) { - bool valid = false; - - switch(config_node->impl_type) { - case(FIELD): - valid = enkf_config_node_is_valid_FIELD( config_node ); - break; - case(SUMMARY): - valid = true; - break; - case(GEN_KW): - valid = enkf_config_node_is_valid_GEN_KW( config_node ); - break; - case(GEN_DATA): - valid = enkf_config_node_is_valid_GEN_DATA( config_node ); - break; - default: - util_abort("%s: - what the fuXX - internal bug. \n",__func__); - } - - return valid; -} - -void enkf_config_node_update_min_std( enkf_config_node_type * config_node , const char * min_std_file ) { - if (!util_string_equal( config_node->min_std_file , min_std_file )) { - /* The current min_std_file and the new input are different, and - the min_std node must be cleared. */ - if (config_node->min_std != NULL) { - enkf_node_free( config_node->min_std ); - config_node->min_std = NULL; - free( config_node->min_std_file ); - } - } - config_node->min_std_file = util_realloc_string_copy( config_node->min_std_file , min_std_file ); - if (config_node->min_std_file != NULL) { - config_node->min_std = enkf_node_alloc( config_node ); - enkf_node_fload( config_node->min_std , min_std_file ); - } -} - - -static void enkf_config_node_update( enkf_config_node_type * config_node , - const char * initfile_fmt , - const char * enkf_outfile_fmt , - const char * enkf_infile_fmt , - const char * min_std_file ) { - - config_node->init_file_fmt = path_fmt_realloc_path_fmt( config_node->init_file_fmt , initfile_fmt ); - config_node->enkf_infile_fmt = path_fmt_realloc_path_fmt( config_node->enkf_infile_fmt , enkf_infile_fmt ); - config_node->enkf_outfile_fmt = path_fmt_realloc_path_fmt( config_node->enkf_outfile_fmt , enkf_outfile_fmt ); - enkf_config_node_update_min_std( config_node , min_std_file ); -} - - - - -enkf_config_node_type * enkf_config_node_alloc(enkf_var_type var_type, - ert_impl_type impl_type, - bool forward_init , - const char * key , - const char * init_file_fmt , - const char * enkf_outfile_fmt , - const char * enkf_infile_fmt , - void * data) { - - enkf_config_node_type * node = enkf_config_node_alloc__( var_type , impl_type , key , forward_init); - enkf_config_node_update( node , init_file_fmt, enkf_outfile_fmt , enkf_infile_fmt , NULL ); - node->data = data; - return node; -} - - - - - -void enkf_config_node_update_gen_kw( enkf_config_node_type * config_node , - const char * enkf_outfile_fmt , /* The include file created by ERT for the forward model. */ - const char * template_file , - const char * parameter_file , - const char * min_std_file , - const char * init_file_fmt ) { - - /* 1: Update the low level gen_kw_config stuff. */ - gen_kw_config_update( config_node->data , template_file , parameter_file ); - - /* 2: Update the stuff which is owned by the upper-level enkf_config_node instance. */ - enkf_config_node_update( config_node , init_file_fmt , enkf_outfile_fmt , NULL , min_std_file); -} - - -void enkf_config_node_update_custom_kw(enkf_config_node_type * config_node, const char * result_file, const char * output_file) { - enkf_config_node_update(config_node, NULL, output_file, result_file, NULL); -} - -/** - This will create a new gen_kw_config instance which is NOT yet - valid. -*/ -enkf_config_node_type * enkf_config_node_new_gen_kw( const char * key , const char * tag_fmt , bool forward_init) { - enkf_config_node_type * config_node = enkf_config_node_alloc__( PARAMETER , GEN_KW , key , forward_init); - config_node->data = gen_kw_config_alloc_empty( key , tag_fmt ); - return config_node; -} - -enkf_config_node_type * enkf_config_node_new_custom_kw(const char * key, const char * result_file, const char * output_file) { - enkf_config_node_type * config_node = enkf_config_node_alloc__(DYNAMIC_RESULT, CUSTOM_KW, key, false); - config_node->data = custom_kw_config_alloc_empty(key, result_file, output_file); - return config_node; -} - -enkf_config_node_type * enkf_config_node_new_defined_custom_kw(const char * key, const hash_type * definition) { - enkf_config_node_type * config_node = enkf_config_node_alloc__(DYNAMIC_RESULT, CUSTOM_KW, key, false); - config_node->data = custom_kw_config_alloc_with_definition(key, definition); - return config_node; -} - -enkf_config_node_type * enkf_config_node_new_surface( const char * key , bool forward_init) { - enkf_config_node_type * config_node = enkf_config_node_alloc__( PARAMETER , SURFACE , key , forward_init); - config_node->data = surface_config_alloc_empty( ); - return config_node; -} - - -void enkf_config_node_update_surface( enkf_config_node_type * config_node , const char * base_surface, const char * init_file_fmt , const char * output_file , const char * min_std_file ) { - - /* 1: Update the data owned by the surface node. */ - surface_config_set_base_surface( config_node->data , base_surface ); - - /* 2: Update the stuff which is owned by the upper-level enkf_config_node instance. */ - enkf_config_node_update( config_node , init_file_fmt , output_file , NULL , min_std_file); -} - - -/*****************************************************************/ - -enkf_config_node_type * enkf_config_node_alloc_summary( const char * key , load_fail_type load_fail) { - enkf_config_node_type * config_node = enkf_config_node_alloc__( DYNAMIC_RESULT , SUMMARY , key , false); - config_node->data = summary_config_alloc( key , config_node->vector_storage , load_fail ); - return config_node; -} - - - - -enkf_config_node_type * enkf_config_node_alloc_GEN_PARAM( const char * node_key , - bool forward_init , - gen_data_file_format_type input_format , - gen_data_file_format_type output_format , - const char * init_file_fmt , - const char * ert_outfile_fmt) { - - - enkf_config_node_type * config_node = enkf_config_node_alloc__( PARAMETER , GEN_DATA , node_key , forward_init ); - config_node->data = gen_data_config_alloc_GEN_PARAM( node_key , output_format , input_format); - - enkf_config_node_update( config_node , /* Generic update - needs the format settings from the special.*/ - init_file_fmt , - ert_outfile_fmt , - NULL , - NULL ); - - return config_node; -} - - - - -enkf_config_node_type * enkf_config_node_alloc_GEN_DATA_result( const char * key , - gen_data_file_format_type input_format, - const char * enkf_infile_fmt ) { - - enkf_config_node_type * config_node = enkf_config_node_alloc__( DYNAMIC_RESULT , GEN_DATA , key , false); - config_node->data = gen_data_config_alloc_GEN_DATA_result( key , input_format ); - - enkf_config_node_update( config_node , /* Generic update - needs the format settings from the special.*/ - NULL , - NULL , - enkf_infile_fmt , - NULL ); - - return config_node; -} - - -enkf_config_node_type * enkf_config_node_alloc_GEN_DATA_state( const char * key, - bool forward_init , - gen_data_file_format_type input_format, - gen_data_file_format_type output_format, - const char * init_file_fmt , - const char * template_ecl_file , - const char * template_data_key , - const char * enkf_outfile_fmt , - const char * enkf_infile_fmt , - const char * min_std_file) { - - if (gen_data_config_valid_result_format( enkf_infile_fmt )) { - enkf_config_node_type * config_node = enkf_config_node_alloc__( DYNAMIC_STATE , GEN_DATA , key , forward_init); - config_node->data = gen_data_config_alloc_GEN_DATA_state( key , output_format , input_format ); - - enkf_config_node_update(config_node , /* Generic update - needs the format settings from the special.*/ - init_file_fmt , - enkf_outfile_fmt , - enkf_infile_fmt, - min_std_file); - - return config_node; - } else { - fprintf(stderr, "** ERROR: The RESULT_FILE setting for %s is invalid - must have an embedded %%d - and be a relative path.\n" , key ); - return NULL; - } -} - - - -/*****************************************************************/ - -enkf_config_node_type * enkf_config_node_new_container( const char * key ) { - enkf_config_node_type * config_node = enkf_config_node_alloc__( INVALID , CONTAINER , key , false); - config_node->data = container_config_alloc( key ); - return config_node; -} - -void enkf_config_node_update_container( enkf_config_node_type * config_node , const enkf_config_node_type * child_node) { - vector_append_ref( config_node->container_nodes , child_node ); - container_config_add_node( config_node->data , child_node ); -} - -const char * enkf_config_node_iget_container_key( const enkf_config_node_type * config_node , int index) { - const enkf_config_node_type * child_node = vector_iget_const( config_node->container_nodes , index ); - return child_node->key; -} - - -/*****************************************************************/ - -/** - This will create a new gen_kw_config instance which is NOT yet - valid. Mainly support code for the GUI. -*/ -enkf_config_node_type * enkf_config_node_alloc_field( const char * key , ecl_grid_type * ecl_grid, field_trans_table_type * trans_table, bool forward_init) { - enkf_config_node_type * config_node = enkf_config_node_alloc__( INVALID , FIELD , key , forward_init); - config_node->data = field_config_alloc_empty( key , ecl_grid , trans_table, false ); - return config_node; -} - - - -/** - This is for dynamic ECLIPSE fields like PRESSURE and SWAT; they - only have truncation as possible parameters. -*/ -void enkf_config_node_update_state_field( enkf_config_node_type * config_node , int truncation , double value_min , double value_max ) { - config_node->var_type = DYNAMIC_STATE; - field_config_update_state_field( config_node->data , truncation , value_min , value_max ); - enkf_config_node_update( config_node , NULL , NULL , NULL , NULL ); -} - - - -void enkf_config_node_update_parameter_field( enkf_config_node_type * config_node , - const char * enkf_outfile_fmt , - const char * init_file_fmt , - const char * min_std_file , - int truncation , double value_min , double value_max , - const char * init_transform , - const char * output_transform ) { - - field_file_format_type export_format = field_config_default_export_format( enkf_outfile_fmt ); /* Purely based on extension, recognizes ROFF and GRDECL, the rest will be ecl_kw format. */ - field_config_update_parameter_field( config_node->data , truncation , value_min , value_max , - export_format , - init_transform , - output_transform ); - config_node->var_type = PARAMETER; - enkf_config_node_update( config_node , init_file_fmt , enkf_outfile_fmt , NULL , min_std_file); -} - - - - - -/*****************************************************************/ - - -void enkf_config_node_update_general_field( enkf_config_node_type * config_node , - const char * enkf_outfile_fmt , - const char * enkf_infile_fmt , - const char * init_file_fmt , - const char * min_std_file , - int truncation , - double value_min , - double value_max , - const char * init_transform , - const char * input_transform , - const char * output_transform ) { - - - field_file_format_type export_format = field_config_default_export_format( enkf_outfile_fmt ); /* Purely based on extension, recognizes ROFF and GRDECL, the rest will be ecl_kw format. */ - { - enkf_var_type var_type; - if (enkf_infile_fmt == NULL) - var_type = PARAMETER; - else { - if (enkf_outfile_fmt == NULL) - var_type = DYNAMIC_RESULT; /* Probably not very realistic */ - else - var_type = DYNAMIC_STATE; - } - config_node->var_type = var_type; - } - field_config_update_general_field( config_node->data , - truncation , value_min , value_max , - export_format , - init_transform , - input_transform , - output_transform ); - - enkf_config_node_update( config_node , init_file_fmt , enkf_outfile_fmt , enkf_infile_fmt, min_std_file); -} - - - - - - -/*****************************************************************/ - - -enkf_config_node_type * enkf_config_node_container_iget( const enkf_config_node_type * node , int index) { - return vector_iget( node->container_nodes , index ); -} - -int enkf_config_node_container_size( const enkf_config_node_type * node ) { - return vector_get_size( node->container_nodes ); -} - - -/*****************************************************************/ - -/** - Invokes the get_data_size() function of the underlying node object. -*/ - -int enkf_config_node_get_data_size( const enkf_config_node_type * node , int report_step) { - if (node->impl_type == GEN_DATA) - return gen_data_config_get_data_size( node->data , report_step); - else - return node->get_data_size( node->data ); -} - -void enkf_config_node_free(enkf_config_node_type * node) { - /* Freeing the underlying node object. */ - if (node->freef != NULL) node->freef(node->data); - free(node->key); - stringlist_free(node->obs_keys); - - if (node->enkf_infile_fmt != NULL) - path_fmt_free( node->enkf_infile_fmt ); - - if (node->enkf_outfile_fmt != NULL) - path_fmt_free( node->enkf_outfile_fmt ); - - if (node->init_file_fmt != NULL) - path_fmt_free( node->init_file_fmt ); - - if (node->internalize != NULL) - bool_vector_free( node->internalize ); - - if (node->min_std != NULL) - enkf_node_free( node->min_std ); - - vector_free( node->container_nodes ); - free(node); -} - - - -const enkf_node_type * enkf_config_node_get_min_std( const enkf_config_node_type * config_node ) { - return config_node->min_std; -} - -const char * enkf_config_node_get_min_std_file( const enkf_config_node_type * config_node ) { - return config_node->min_std_file; -} - - -const char * enkf_config_node_get_enkf_outfile( const enkf_config_node_type * config_node ) { - return path_fmt_get_fmt( config_node->enkf_outfile_fmt ); -} - -const char * enkf_config_node_get_enkf_infile( const enkf_config_node_type * config_node ) { - return path_fmt_get_fmt( config_node->enkf_infile_fmt ); -} - -const char * enkf_config_node_get_init_file_fmt( const enkf_config_node_type * config_node) -{ - return path_fmt_get_fmt( config_node->init_file_fmt ); -} - -void enkf_config_node_set_min_std( enkf_config_node_type * config_node , enkf_node_type * min_std ) { - if (config_node->min_std != NULL) - enkf_node_free( config_node->min_std ); - - config_node->min_std = min_std; -} - - -void enkf_config_node_set_internalize(enkf_config_node_type * node, int report_step) { - ert_impl_type impl_type = enkf_config_node_get_impl_type( node ); - if (impl_type == CONTAINER) { - int inode; - int container_size = enkf_config_node_container_size( node ); - for (inode = 0; inode < container_size; inode++) { - enkf_config_node_type * child_node = enkf_config_node_container_iget( node , inode ); - enkf_config_node_set_internalize( child_node , report_step ); - } - } else { - if (node->internalize == NULL) - node->internalize = bool_vector_alloc( 0 , false ); - bool_vector_iset( node->internalize , report_step , true); - } -} - - -void enkf_config_node_init_internalization(enkf_config_node_type * node) { - if (node->internalize != NULL) - bool_vector_reset( node->internalize ); -} - - -/* Query function: */ -bool enkf_config_node_internalize(const enkf_config_node_type * node, int report_step) { - if (node->internalize == NULL) - return false; - else - return bool_vector_safe_iget( node->internalize , report_step); /* Will return default value if report_step is beyond size. */ -} - - - -/** - This is the filename used when loading from a completed forward - model. -*/ - -char * enkf_config_node_alloc_infile(const enkf_config_node_type * node , int report_step) { - if (node->enkf_infile_fmt != NULL) - return path_fmt_alloc_path(node->enkf_infile_fmt , false , report_step); - else - return NULL; -} - - -char * enkf_config_node_alloc_outfile(const enkf_config_node_type * node , int report_step) { - if (node->enkf_outfile_fmt != NULL) - return path_fmt_alloc_path(node->enkf_outfile_fmt , false , report_step); - else - return NULL; -} - -/* - The path argument is used when the function is during forward_model - based initialisation. -*/ - -char * enkf_config_node_alloc_initfile( const enkf_config_node_type * node , const char * path , int iens) { - if (node->init_file_fmt == NULL) - return NULL; - else { - char * file = path_fmt_alloc_file( node->init_file_fmt , false , iens ); - if (util_is_abs_path( file )) - return file; - else { - char * full_path = util_alloc_filename( path , file , NULL ); - free( file ); - return full_path; - } - } -} - - - - -void * enkf_config_node_get_ref(const enkf_config_node_type * node) { - return node->data; -} - - - -bool enkf_config_node_include_type(const enkf_config_node_type * config_node , int mask) { - - enkf_var_type var_type = config_node->var_type; - if (var_type & mask) - return true; - else - return false; - -} - - -bool enkf_config_node_use_forward_init(const enkf_config_node_type * config_node) { - return config_node->forward_init; -} - - -ert_impl_type enkf_config_node_get_impl_type(const enkf_config_node_type *config_node) { - return config_node->impl_type; -} - - -enkf_var_type enkf_config_node_get_var_type(const enkf_config_node_type *config_node) { - return config_node->var_type; -} - - -const char * enkf_config_node_get_key(const enkf_config_node_type * config_node) { return config_node->key; } - - -const stringlist_type * enkf_config_node_get_obs_keys(const enkf_config_node_type *config_node) { - return config_node->obs_keys; -} - - -int enkf_config_node_get_num_obs( const enkf_config_node_type * config_node ) { - return stringlist_get_size( config_node->obs_keys ); -} - - -/** - This checks the index_key - and sums up over all the time points of the observation. -*/ - -int enkf_config_node_load_obs( const enkf_config_node_type * config_node , enkf_obs_type * enkf_obs ,const char * key_index , int obs_count , time_t * _sim_time , double * _y , double * _std) { - ert_impl_type impl_type = enkf_config_node_get_impl_type(config_node); - int num_obs = 0; - int iobs; - - for (iobs = 0; iobs < stringlist_get_size( config_node->obs_keys ); iobs++) { - obs_vector_type * obs_vector = enkf_obs_get_vector( enkf_obs , stringlist_iget( config_node->obs_keys , iobs)); - - int report_step = -1; - while (true) { - report_step = obs_vector_get_next_active_step( obs_vector , report_step); - if (report_step == -1) break; - { - bool valid; - double value , std1; - - /** - The user index used when calling the user_get function on the - gen_obs data type is different depending on whether is called with a - data context user_key (as here) or with a observation context - user_key (as when plotting an observation plot). See more - documentation of the function gen_obs_user_get_data_index(). - */ - - if (impl_type == GEN_DATA) - gen_obs_user_get_with_data_index( obs_vector_iget_node( obs_vector , report_step ) , key_index , &value , &std1 , &valid); - else - obs_vector_user_get( obs_vector , key_index , report_step , &value , &std1 , &valid); - - if (valid) { - if (obs_count > 0) { - _sim_time[num_obs] = enkf_obs_iget_obs_time( enkf_obs , report_step ); - _y[num_obs] = value; - _std[num_obs] = std1; - } - num_obs++; - } - } - } - } - - /* Sorting the observations in time order. */ - if (obs_count > 0) { - double_vector_type * y = double_vector_alloc_shared_wrapper( 0 , 0 , _y , obs_count ); - double_vector_type * std = double_vector_alloc_shared_wrapper( 0 , 0 , _std , obs_count ); - time_t_vector_type * sim_time = time_t_vector_alloc_shared_wrapper( 0 , 0 , _sim_time , obs_count ); - perm_vector_type * sort_perm = time_t_vector_alloc_sort_perm( sim_time ); - - time_t_vector_permute( sim_time , sort_perm ); - double_vector_permute( y , sort_perm ); - double_vector_permute( std , sort_perm ); - - free( sort_perm ); - double_vector_free( y ); - double_vector_free( std ); - time_t_vector_free( sim_time ); - } - return num_obs; -} - - - -void enkf_config_node_add_obs_key(enkf_config_node_type * config_node , const char * obs_key) { - if (!stringlist_contains(config_node->obs_keys , obs_key)) - stringlist_append_copy(config_node->obs_keys , obs_key); -} - - -void enkf_config_node_clear_obs_keys(enkf_config_node_type * config_node) { - stringlist_clear( config_node->obs_keys ); -} - -/*****************************************************************/ - - - -void enkf_config_node_fprintf_config( const enkf_config_node_type * config_node , FILE * stream ) { - switch( config_node->impl_type) { - case(GEN_KW): - fprintf( stream , CONFIG_KEY_FORMAT , GEN_KW_KEY ); - fprintf( stream , CONFIG_VALUE_FORMAT , config_node->key ); - gen_kw_config_fprintf_config( config_node->data , path_fmt_get_fmt( config_node->enkf_outfile_fmt ) , config_node->min_std_file , stream ); - break; - case(FIELD): - fprintf( stream , CONFIG_KEY_FORMAT , FIELD_KEY ); - fprintf( stream , CONFIG_VALUE_FORMAT , config_node->key ); - field_config_fprintf_config( config_node->data , - config_node->var_type , - path_fmt_get_fmt( config_node->enkf_outfile_fmt ) , - path_fmt_get_fmt( config_node->enkf_infile_fmt ) , - config_node->min_std_file , - stream ); - break; - case(GEN_DATA): - - if (config_node->var_type == PARAMETER) - fprintf( stream , CONFIG_KEY_FORMAT , GEN_PARAM_KEY ); - else - fprintf( stream , CONFIG_KEY_FORMAT , GEN_DATA_KEY ); - - gen_data_config_fprintf_config( config_node->data , - config_node->var_type , - path_fmt_get_fmt( config_node->enkf_outfile_fmt ) , - path_fmt_get_fmt( config_node->enkf_infile_fmt ) , - config_node->min_std_file , - stream ); - break; - default: - util_abort("%s: internal error - function can not store configuration for: %s variables. \n",__func__ , enkf_types_get_impl_name( config_node->impl_type) ); - } - fprintf( stream , "\n"); -} -/*****************************************************************/ - -void enkf_config_node_add_GEN_PARAM_config_schema( config_parser_type * config ) { - config_schema_item_type * item; - item = config_add_schema_item(config , GEN_PARAM_KEY , false ); - config_schema_item_set_argc_minmax(item , 2 , CONFIG_DEFAULT_ARG_MAX); -} - - -void enkf_config_node_add_GEN_DATA_config_schema( config_parser_type * config ) { - config_schema_item_type * item; - item = config_add_schema_item(config , GEN_DATA_KEY , false ); - config_schema_item_set_argc_minmax(item , 1 , CONFIG_DEFAULT_ARG_MAX); -} - -void enkf_config_node_add_CUSTOM_KW_config_schema(config_parser_type * config){ - config_schema_item_type * item = config_add_schema_item(config, CUSTOM_KW_KEY, false); - config_schema_item_set_argc_minmax(item, 2, 3); - config_schema_item_iset_type(item, 0, CONFIG_STRING); - config_schema_item_iset_type(item, 1, CONFIG_PATH); - config_schema_item_iset_type(item, 2, CONFIG_PATH); -} - -enkf_config_node_type * enkf_config_node_alloc_GEN_DATA_from_config( const config_content_node_type * node ) { - enkf_config_node_type * config_node = NULL; - const char * node_key = config_content_node_iget( node , 0 ); - { - hash_type * options = hash_alloc(); - - config_content_node_init_opt_hash( node , options , 1 ); - { - gen_data_file_format_type input_format = gen_data_config_check_format( hash_safe_get( options , INPUT_FORMAT_KEY)); - gen_data_file_format_type output_format = gen_data_config_check_format( hash_safe_get( options , OUTPUT_FORMAT_KEY)); - const char * init_file_fmt = hash_safe_get( options , INIT_FILES_KEY); - const char * ecl_file = hash_safe_get( options , ECL_FILE_KEY); - const char * template = hash_safe_get( options , TEMPLATE_KEY); - const char * data_key = hash_safe_get( options , KEY_KEY); - const char * result_file = hash_safe_get( options , RESULT_FILE_KEY); - const char * min_std_file = hash_safe_get( options , MIN_STD_KEY); - const char * forward_string = hash_safe_get( options , FORWARD_INIT_KEY ); - const char * report_steps_string = hash_safe_get( options , REPORT_STEPS_KEY ); - int_vector_type * report_steps = int_vector_alloc(0,0); - bool forward_init = false; - bool valid_input = true; - - if (input_format == GEN_DATA_UNDEFINED) - valid_input = false; - - if (!gen_data_config_valid_result_format( result_file )) { - fprintf(stderr, "** ERROR: The RESULT_FILE:%s setting for %s is invalid - must have an embedded %%d - and be a relative path.\n" , result_file , node_key ); - valid_input = false; - } - - if (report_steps_string) { - if (!string_util_update_active_list( report_steps_string , report_steps )) { - valid_input = false; - fprintf(stderr,"** ERROR: The REPORT_STEPS:%s attribute was not valid.\n",report_steps_string); - } - } else { - fprintf(stderr,"** ERROR: As of July 2014 the GEN_DATA keywords must have a REPORT_STEPS:xxxx \n"); - fprintf(stderr," attribute to indicate which report step(s) you want to load data \n"); - fprintf(stderr," from. By requiring the user to enter this information in advance\n"); - fprintf(stderr," it is easier for ERT for to check that the results are valid, and\n"); - fprintf(stderr," handle errors with the GEN_DATA results gracefully.\n"); - fprintf(stderr," \n"); - fprintf(stderr," You can list several report steps separated with ',' and ranges with '-' \n"); - fprintf(stderr," but observe that spaces is NOT ALLOWED. \n"); - fprintf(stderr," \n"); - fprintf(stderr," - load from report step 100: REPORT_STEPS:100 \n"); - fprintf(stderr," - load from report steps 10, 20 and 30-40 REPORT_STEPS:10,20,30-40 \n"); - fprintf(stderr," \n"); - fprintf(stderr," The GEN_DATA keyword: %s will be ignored\n",node_key); - valid_input = false; - } - - if (valid_input) { - - if (forward_string) { - if (!util_sscanf_bool( forward_string , &forward_init)) - fprintf(stderr,"** Warning: parsing %s as bool failed - using FALSE \n",forward_string); - } - - if ((init_file_fmt == NULL) && - (ecl_file == NULL) && - (result_file != NULL)) - config_node = enkf_config_node_alloc_GEN_DATA_result( node_key , input_format , result_file); - else if ((init_file_fmt != NULL) && - (ecl_file != NULL) && - (result_file != NULL)) - config_node = enkf_config_node_alloc_GEN_DATA_state( node_key , - forward_init , - input_format , - output_format , - init_file_fmt , - template , - data_key , - ecl_file , - result_file , - min_std_file); - - { - gen_data_config_type * gen_data_config = enkf_config_node_get_ref( config_node ); - - if (template) - gen_data_config_set_template( gen_data_config , template , data_key); - - for (int i=0; i < int_vector_size( report_steps ); i++) { - int report_step = int_vector_iget( report_steps , i ); - gen_data_config_add_report_step( gen_data_config , report_step); - enkf_config_node_set_internalize( config_node , report_step ); - } - } - } - - int_vector_free( report_steps ); - } - hash_free( options ); - } - - return config_node; -} - - -enkf_config_node_type * enkf_config_node_alloc_GEN_PARAM_from_config( const config_content_node_type * node ) { - enkf_config_node_type * config_node = NULL; - const char * node_key = config_content_node_iget( node , 0 ); - const char * ecl_file = config_content_node_iget( node , 1 ); - { - hash_type * options = hash_alloc(); - - config_content_node_init_opt_hash( node , options , 2 ); - { - gen_data_file_format_type input_format = gen_data_config_check_format( hash_safe_get( options , INPUT_FORMAT_KEY)); - gen_data_file_format_type output_format = gen_data_config_check_format( hash_safe_get( options , OUTPUT_FORMAT_KEY)); - const char * init_file_fmt = hash_safe_get( options , INIT_FILES_KEY); - const char * template = hash_safe_get( options , TEMPLATE_KEY); - const char * data_key = hash_safe_get( options , KEY_KEY); - const char * min_std_file = hash_safe_get( options , MIN_STD_KEY); - const char * forward_string = hash_safe_get( options , FORWARD_INIT_KEY ); - bool forward_init = false; - bool valid_input = true; - - - if (input_format == GEN_DATA_UNDEFINED) - valid_input = false; - - if (input_format == ASCII_TEMPLATE) - valid_input = false; - - if (output_format == GEN_DATA_UNDEFINED) - valid_input = false; - - if (init_file_fmt == NULL) - valid_input = false; - - if (valid_input) { - - if (forward_string) { - if (!util_sscanf_bool( forward_string , &forward_init)) - fprintf(stderr,"** Warning: parsing %s as bool failed - using FALSE \n",forward_string); - } - - config_node = enkf_config_node_alloc_GEN_PARAM( node_key , forward_init , input_format , output_format , init_file_fmt , ecl_file); - - if (template) { - bool template_set_ok = gen_data_config_set_template( enkf_config_node_get_ref( config_node ) , template , data_key); - if (!template_set_ok) - fprintf(stderr,"** Warning: the template settings were not applied correctly - ignored\n"); - } - - if (min_std_file) - enkf_config_node_update_min_std( config_node , min_std_file ); - - } - } - hash_free( options ); - } - return config_node; -} - - -/*****************************************************************/ -UTIL_SAFE_CAST_FUNCTION( enkf_config_node , ENKF_CONFIG_NODE_TYPE_ID) -VOID_FREE(enkf_config_node) diff --git a/ThirdParty/Ert/libenkf/src/enkf_defaults.c b/ThirdParty/Ert/libenkf/src/enkf_defaults.c deleted file mode 100644 index f8647b2ac3..0000000000 --- a/ThirdParty/Ert/libenkf/src/enkf_defaults.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_defaults.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include - -/** - Currently no code here - but the way DEFAULT_STATIC_KW is implemented - is dang ugly. Should be compiled. -*/ diff --git a/ThirdParty/Ert/libenkf/src/enkf_fs.c b/ThirdParty/Ert/libenkf/src/enkf_fs.c deleted file mode 100644 index 6074363d42..0000000000 --- a/ThirdParty/Ert/libenkf/src/enkf_fs.c +++ /dev/null @@ -1,1058 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_fs.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/** - - About storage in the EnKF system - ================================ - - The system for storage in the EnKF system is quite complicated, maybe too - complicated. The reason the system is so complex is (at least) twofold: - - 1. It is a goal that it should be relatively easy to write new - systems (i.e. drivers) for storage. The current suite of - drivers (plain_driver_xx) are based on normal (compressed) - fread() and fwrite() system calls. But with the current - implementation one could write e.g. a MySQL based driver for - storage without touching(??) the rest of the EnKF code. - - 2. The parameters / static restart data / dynamic restart data - have very different storage characteristics. By splitting the - storage up in different drivers we can write drivers which are - specialized for the different types of data. - - - The interface - ------------- - - The unit of storage in the enkf_fs system is one enkf_node instance. The - interface between the storage system and the rest of the EnKF system is - through the enkf_fs functions: - - enkf_fs_fread_node() - enkf_fs_has_node() - enkf_fs_fwrite_node() - enkf_fs_unlink_node() - not implemented yet. - - - So all these functions (partly except enkf_fs_has_node()) work on a enkf_node - instance, and in addition they take the following input: - - - iens : ensemble member number - - report_step : the report_step number we are interested in - - state : whether we are considering an analyzed node or a forecast. - - In addition to the functions enkf_fs_fread_node() and enkf_fs_fwrite_node() there - are higher level functions enkf_fs_fread_alloc_ensemble() to load an ensemble of - nodes and enkf_fs_fread_alloc_ts() to load a time series of nodes. The driver can - implement these functions (to get a performance gain when loading many nodes). It - is not necceasry to implement these functions, the enkf_fs layer has simple - functions doing repeated calls to the enkf_fs_fread_node() function. - - - The drivers - ----------- - - The enkf_fs layer does not self implement the functions to read and write - nodes. Instead what happens is: - - 1. We determine the type of the node (static/dynamic/parameter), and select - the appropriate driver. - - 2. The appropriate driver is called to implement e.g. the fread_node - functions. - - The different types of data have different characteristcs, which the driver is - implemented to support. The characteristics the drivers support are the - following: - - - dynamic driver - -------------- - This is the simplest driver, all data is stored both in a forecast version and - an analyzed version. - - - parameter driver - ---------------- - This driver utilizes that parameters do not change during the forward model, - i.e. (analyzed , t) = (forecast , t - 1). So, only one version of the data is - actually stored; if you ask for the forecast you just get the data from the - previous report_step. - To support spin-ups and such the driver will actually go backwards in - report_time all the way until a node is found on disk. - - - static driver - ------------- - Like the parameter driver this also only stores one version od the data, - however in addition it has to query the node for a ID to support multiply - occuring keywords in ECLIPSE restart files. - - Currently only the plain_driver_xxx family has been implemented. Observe that - there is no dependencies between the drivers, it is perfectly possible to - implement a new driver for storage of static datat only. (There is probably a - large amount of static data which is common both between members and for - several consecutive report steps; utilizing that one could write a static - driver which was admittedly slower, but leaner on the storage.) - - The drivers are allocated prior to allocating the enkf_fs instance, and - pointers are passed in when allocating the enkf_fs instance. - - - Mounting the filesystem - ----------------------- - - Mounting the filesystem - cool ehh?? Anyway, the important point is - that the moment ensemble information has hit the filesystem later - versions of the enkf program must support exactly that lay-out, - those drivers+++. To ensure this I see two possibilities: - - 1. We can freeze the filesystem drivers, and the layout on disk - indefinetly. - - 2. We can store the information needed to bootstrap the drivers, - according to the current layout on disk, in the - filesystem. I.e. something like a '/etc/fstab' file. - - We have chosen the second alternative. Currently this implemented as - follows: - - 1. In main() we query for the file {root-path}/enkf_mount_info. If - that file does not exists it is created by calls to the - selected drivers xxxx_fwrite_mount_info() functions. - - 2. enkf_fs_mount() is called with the enkf_mount_info as input. - - The enkf_mount_info file (BINARY) consists of four records (one for - each driver, including the index). The format of each record is: - - DRIVER_CATEGORY DRIVER_ID INFO - int int void * - - The driver category should be one of the four integer values in - fs_driver_type (fs_types.h) and DRIVER_ID is one the integer - values in fs_driver_impl. The last void * data is whatever - (serialized) info the driver needs to bootstrap. This info is - written by the drivers xxxx_fwrite_mount_info() function, and it is - used when the driver is allocated with xxxx_fread_alloc(). - - The different drivers can be in arbitrary order in the - enkf_mount_info file, but when four records are read it checks that - all drivers have been initialized, and aborts if that is not the - case. - - If the enkf_mount_info file is deleted you (might) be fucked. It - is currently 'protected' with chomd a-w - but that is of course not - foolprof. -*/ - - - - -/** - Observe the following convention: the initial ensemble at report - step 0 is supposed to be analyzed. If we ask for the forecast at - report_step 0, we should get the analyzed value. -*/ - - -#define ENKF_FS_TYPE_ID 1089763 -#define ENKF_MOUNT_MAP "enkf_mount_info" -#define SUMMARY_KEY_SET_FILE "summary-key-set" -#define TIME_MAP_FILE "time-map" -#define STATE_MAP_FILE "state-map" -#define MISFIT_ENSEMBLE_FILE "misfit-ensemble" -#define CASE_CONFIG_FILE "case_config" -#define CUSTOM_KW_CONFIG_SET_FILE "custom_kw_config_set" - -struct enkf_fs_struct { - UTIL_TYPE_ID_DECLARATION; - char * case_name; - char * root_path; - char * mount_point; // mount_point = root_path / case_name; the mount_point is the fundamental INPUT. - - char * lock_file; - int lock_fd; - - fs_driver_type * dynamic_forecast; - fs_driver_type * parameter; - fs_driver_type * index ; - - bool read_only; /* Whether this filesystem has been mounted read-only. */ - time_map_type * time_map; - cases_config_type * cases_config; - state_map_type * state_map; - summary_key_set_type * summary_key_set; - misfit_ensemble_type * misfit_ensemble; - custom_kw_config_set_type * custom_kw_config_set; - /* - The variables below here are for storing arbitrary files within - the enkf_fs storage directory, but not as serialized enkf_nodes. - */ - path_fmt_type * case_fmt; - path_fmt_type * case_member_fmt; - path_fmt_type * case_tstep_fmt; - path_fmt_type * case_tstep_member_fmt; - - int refcount; - int writecount; -}; - - -/*****************************************************************/ - - -UTIL_SAFE_CAST_FUNCTION( enkf_fs , ENKF_FS_TYPE_ID) -UTIL_IS_INSTANCE_FUNCTION( enkf_fs , ENKF_FS_TYPE_ID) - -static void enkf_fs_umount( enkf_fs_type * fs ); - -int enkf_fs_incref( enkf_fs_type * fs ) { - fs->refcount++; - return fs->refcount; -} - - -int enkf_fs_decref( enkf_fs_type * fs ) { - int refcount; - fs->refcount--; - refcount = fs->refcount; - - if (fs->refcount < 0) - util_abort("%s: internal fuckup. The filesystem refcount:%d is < 0 \n",__func__ , fs->refcount); - - if (refcount == 0) - enkf_fs_umount( fs ); - - return refcount; -} - - -int enkf_fs_get_refcount( const enkf_fs_type * fs ) { - return fs->refcount; -} - - -enkf_fs_type * enkf_fs_get_ref( enkf_fs_type * fs ) { - enkf_fs_incref( fs ); - return fs; -} - - -static enkf_fs_type * enkf_fs_alloc_empty( const char * mount_point ) { - enkf_fs_type * fs = util_malloc(sizeof * fs ); - UTIL_TYPE_ID_INIT( fs , ENKF_FS_TYPE_ID ); - fs->time_map = time_map_alloc( ); - fs->cases_config = cases_config_alloc(); - fs->state_map = state_map_alloc(); - fs->summary_key_set = summary_key_set_alloc(); - fs->custom_kw_config_set = custom_kw_config_set_alloc(); - fs->misfit_ensemble = misfit_ensemble_alloc(); - fs->index = NULL; - fs->parameter = NULL; - fs->dynamic_forecast = NULL; - fs->read_only = true; - fs->mount_point = util_alloc_string_copy( mount_point ); - fs->refcount = 0; - fs->writecount = 0; - fs->lock_fd = 0; - - if (mount_point == NULL) - util_abort("%s: fatal internal error: mount_point == NULL \n",__func__); - { - char ** path_tmp; - int path_len; - - util_path_split( fs->mount_point , &path_len , &path_tmp); - fs->case_name = util_alloc_string_copy( path_tmp[path_len - 1]); - fs->root_path = util_alloc_joined_string( (const char **) path_tmp , path_len , UTIL_PATH_SEP_STRING); - fs->lock_file = util_alloc_filename( fs->mount_point , fs->case_name , "lock"); - - if (util_try_lockf( fs->lock_file , S_IWUSR + S_IWGRP , &fs->lock_fd)) { - fs->read_only = false; - } else { - fprintf(stderr," Another program has already opened filesystem read-write - this instance will be UNSYNCRONIZED read-only. Cross your fingers ....\n"); - fs->read_only = true; - } - - util_free_stringlist( path_tmp , path_len ); - } - return fs; -} - - - - -static int enkf_fs_fread_fs_version__(FILE * stream) { - int version; - long fs_tag = util_fread_long( stream ); - if (fs_tag == FS_MAGIC_ID) - version = util_fread_int(stream); - else - version = 0; - return version; -} - - -/** - -1 : No mount map found. - 0 : Old mount map without version info. - x : Actual version info. -*/ - -static int enkf_fs_get_fs_version__(const char * config_file) { - int version = -1; - if (util_file_exists(config_file)) { - FILE * stream = util_fopen(config_file , "r"); - version = enkf_fs_fread_fs_version__(stream); - fclose(stream); - } - return version; -} - -/** - Function written to look for old (version <= 104) mount info maps. -*/ - -int enkf_fs_get_version104( const char * path ) { - char * config_file = util_alloc_filename( path , ENKF_MOUNT_MAP, NULL); - int version = enkf_fs_get_fs_version__( config_file ); - free( config_file ); - return version; -} - - - - - - - -/*****************************************************************/ - - -static void enkf_fs_init_path_fmt( enkf_fs_type * fs) { - /* - Installing the path_fmt instances for the storage of arbitrary files. - */ - fs->case_fmt = path_fmt_alloc_directory_fmt( DEFAULT_CASE_PATH ); - fs->case_member_fmt = path_fmt_alloc_directory_fmt( DEFAULT_CASE_MEMBER_PATH ); - fs->case_tstep_fmt = path_fmt_alloc_directory_fmt( DEFAULT_CASE_TSTEP_PATH ); - fs->case_tstep_member_fmt = path_fmt_alloc_directory_fmt( DEFAULT_CASE_TSTEP_MEMBER_PATH ); - -} - - -static void enkf_fs_create_plain_fs( FILE * stream , void * arg) { - - plain_driver_create_fs( stream , DRIVER_PARAMETER , DEFAULT_PLAIN_NODE_PARAMETER_PATH , DEFAULT_PLAIN_VECTOR_PARAMETER_PATH); - plain_driver_create_fs( stream , DRIVER_DYNAMIC_FORECAST , DEFAULT_PLAIN_NODE_DYNAMIC_FORECAST_PATH , DEFAULT_PLAIN_VECTOR_DYNAMIC_FORECAST_PATH); - plain_driver_create_fs( stream , DRIVER_INDEX , DEFAULT_PLAIN_NODE_INDEX_PATH , DEFAULT_PLAIN_VECTOR_INDEX_PATH ); - -} - - - -static void enkf_fs_create_block_fs( FILE * stream , int num_drivers , const char * mount_point , void * arg) { - - block_fs_driver_create_fs( stream , mount_point , DRIVER_PARAMETER , num_drivers , "Ensemble/mod_%d" , "PARAMETER"); - block_fs_driver_create_fs( stream , mount_point , DRIVER_DYNAMIC_FORECAST , num_drivers , "Ensemble/mod_%d" , "FORECAST"); - block_fs_driver_create_fs( stream , mount_point , DRIVER_INDEX , 1 , "Index" , "INDEX"); - -} - - -static void enkf_fs_assign_driver( enkf_fs_type * fs , fs_driver_type * driver , fs_driver_enum driver_type ) { - switch(driver_type) { - case(DRIVER_PARAMETER): - fs->parameter = driver; - break; - case(DRIVER_DYNAMIC_FORECAST): - fs->dynamic_forecast = driver; - break; - case(DRIVER_INDEX): - fs->index = driver; - break; - case(DRIVER_STATIC): - util_abort("%s: internal error - should not assign a STATIC driver \n",__func__); - break; - case(DRIVER_DYNAMIC_ANALYZED): - util_abort("%s: internal error - should not assign a DYNAMIC_ANALYZED driver \n",__func__); - break; - } -} - - -static enkf_fs_type * enkf_fs_mount_block_fs( FILE * fstab_stream , const char * mount_point ) { - enkf_fs_type * fs = enkf_fs_alloc_empty( mount_point ); - - { - while (true) { - fs_driver_enum driver_type; - if (fread( &driver_type , sizeof driver_type , 1 , fstab_stream) == 1) { - if (fs_types_valid( driver_type )) { - fs_driver_type * driver = block_fs_driver_open( fstab_stream , mount_point , driver_type , fs->read_only); - enkf_fs_assign_driver( fs , driver , driver_type ); - } else - block_fs_driver_fskip( fstab_stream ); - } else - break; - } - } - - return fs; -} - - - - -static enkf_fs_type * enkf_fs_mount_plain( FILE * fstab_stream , const char * mount_point ) { - enkf_fs_type * fs = enkf_fs_alloc_empty( mount_point ); - { - while (true) { - fs_driver_enum driver_type; - if (fread( &driver_type , sizeof driver_type , 1 , fstab_stream) == 1) { - if (fs_types_valid( driver_type )) { - fs_driver_type * driver = plain_driver_open( fstab_stream , mount_point ); - enkf_fs_assign_driver( fs , driver , driver_type ); - } else - plain_driver_fskip( fstab_stream ); - - } else - break; - } - } - return fs; -} - - - -enkf_fs_type * enkf_fs_create_fs( const char * mount_point, fs_driver_impl driver_id , void * arg , bool mount) { - const int num_drivers = 32; - FILE * stream = fs_driver_open_fstab( mount_point , true ); - if (stream != NULL) { - fs_driver_init_fstab( stream, driver_id); - { - switch( driver_id ) { - case( BLOCK_FS_DRIVER_ID ): - enkf_fs_create_block_fs( stream , num_drivers , mount_point , arg ); - break; - case( PLAIN_DRIVER_ID ): - enkf_fs_create_plain_fs( stream , arg ); - break; - default: - util_abort("%s: Invalid driver_id value:%d \n",__func__ , driver_id ); - } - } - fclose( stream ); - } - - if (mount) - return enkf_fs_mount( mount_point ); - else - return NULL; -} - - -static void enkf_fs_fsync_time_map( enkf_fs_type * fs ) { - char * filename = enkf_fs_alloc_case_filename( fs , TIME_MAP_FILE ); - time_map_fwrite( fs->time_map , filename ); - free( filename ); -} - - -static void enkf_fs_fread_time_map( enkf_fs_type * fs ) { - char * filename = enkf_fs_alloc_case_filename( fs , TIME_MAP_FILE ); - time_map_fread( fs->time_map , filename ); - free( filename ); -} - - -static void enkf_fs_fsync_cases_config( enkf_fs_type * fs ) { - char * filename = enkf_fs_alloc_case_filename( fs , CASE_CONFIG_FILE ); - cases_config_fwrite( fs->cases_config , filename ); - free( filename ); -} - -static void enkf_fs_fsync_state_map( enkf_fs_type * fs ) { - char * filename = enkf_fs_alloc_case_filename( fs , STATE_MAP_FILE ); - state_map_fwrite( fs->state_map , filename ); - free( filename ); -} - -static void enkf_fs_fsync_summary_key_set( enkf_fs_type * fs ) { - char * filename = enkf_fs_alloc_case_filename( fs , SUMMARY_KEY_SET_FILE ); - summary_key_set_fwrite( fs->summary_key_set , filename ); - free( filename ); -} - -static void enkf_fs_fsync_custom_kw_config_set( enkf_fs_type * fs ) { - char * filename = enkf_fs_alloc_case_filename(fs, CUSTOM_KW_CONFIG_SET_FILE); - custom_kw_config_set_fwrite(fs->custom_kw_config_set, filename ); - free( filename ); -} - -static void enkf_fs_fread_cases_config( enkf_fs_type * fs ) { - char * filename = enkf_fs_alloc_case_filename( fs , CASE_CONFIG_FILE ); - cases_config_fread( fs->cases_config , filename ); - free( filename ); -} - - -static void enkf_fs_fread_state_map( enkf_fs_type * fs ) { - char * filename = enkf_fs_alloc_case_filename( fs , STATE_MAP_FILE ); - state_map_fread( fs->state_map , filename ); - free( filename ); -} - -static void enkf_fs_fread_summary_key_set( enkf_fs_type * fs ) { - char * filename = enkf_fs_alloc_case_filename( fs , SUMMARY_KEY_SET_FILE ); - summary_key_set_fread( fs->summary_key_set , filename ); - free( filename ); -} - -static void enkf_fs_fread_custom_kw_config_set(enkf_fs_type * fs) { - char * filename = enkf_fs_alloc_case_filename(fs, CUSTOM_KW_CONFIG_SET_FILE); - custom_kw_config_set_fread(fs->custom_kw_config_set, filename); - free( filename ); -} - -state_map_type * enkf_fs_alloc_readonly_state_map( const char * mount_point ) { - path_fmt_type * path_fmt = path_fmt_alloc_directory_fmt( DEFAULT_CASE_PATH ); - char * filename = path_fmt_alloc_file( path_fmt , false , mount_point , STATE_MAP_FILE); - - state_map_type * state_map = state_map_fread_alloc_readonly( filename ); - - path_fmt_free( path_fmt ); - free( filename ); - return state_map; -} - -summary_key_set_type * enkf_fs_alloc_readonly_summary_key_set( const char * mount_point ) { - path_fmt_type * path_fmt = path_fmt_alloc_directory_fmt( DEFAULT_CASE_PATH ); - char * filename = path_fmt_alloc_file( path_fmt , false , mount_point , SUMMARY_KEY_SET_FILE); - - summary_key_set_type * summary_key_set = summary_key_set_alloc_from_file( filename, true ); - - path_fmt_free( path_fmt ); - free( filename ); - return summary_key_set; -} - -time_map_type * enkf_fs_alloc_readonly_time_map( const char * mount_point ) { - path_fmt_type * path_fmt = path_fmt_alloc_directory_fmt( DEFAULT_CASE_PATH ); - char * filename = path_fmt_alloc_file( path_fmt , false , mount_point , TIME_MAP_FILE); - - time_map_type * time_map = time_map_fread_alloc_readonly( filename ); - - path_fmt_free( path_fmt ); - free( filename ); - return time_map; -} - - - -static void enkf_fs_fread_misfit( enkf_fs_type * fs ) { - FILE * stream = enkf_fs_open_excase_file( fs , MISFIT_ENSEMBLE_FILE ); - if (stream != NULL) { - misfit_ensemble_fread( fs->misfit_ensemble , stream ); - fclose( stream ); - } -} - - -static void enkf_fs_fwrite_misfit( enkf_fs_type * fs ) { - if (misfit_ensemble_initialized( fs->misfit_ensemble )) { - FILE * stream = enkf_fs_open_case_file( fs , MISFIT_ENSEMBLE_FILE , "w"); - misfit_ensemble_fwrite( fs->misfit_ensemble , stream ); - fclose( stream ); - } -} - - - -int enkf_fs_disk_version(const char * mount_point ) { - int disk_version = -1; - FILE * stream = fs_driver_open_fstab( mount_point , false ); - if (stream) { - disk_version = fs_driver_fread_version( stream ); - fclose( stream ); - } - return disk_version; -} - - -bool enkf_fs_update_disk_version(const char * mount_point , int src_version , int target_version) { - if (enkf_fs_disk_version( mount_point ) == src_version) { - char * fstab_file = fs_driver_alloc_fstab_file( mount_point ); - FILE * stream = util_fopen( fstab_file , "r+"); - - fseek( stream , 0L, SEEK_SET ); - fs_driver_assert_magic( stream ); - util_fwrite_int( target_version , stream ); - - fclose( stream ); - free( fstab_file ); - - return true; - } else - return false; -} - - -enkf_fs_type * enkf_fs_mount( const char * mount_point ) { - FILE * stream = fs_driver_open_fstab( mount_point , false ); - - if (stream != NULL) { - enkf_fs_type * fs = NULL; - fs_driver_assert_magic( stream ); - fs_driver_assert_version( stream , mount_point ); - { - fs_driver_impl driver_id = util_fread_int( stream ); - - switch( driver_id ) { - case( BLOCK_FS_DRIVER_ID ): - fs = enkf_fs_mount_block_fs( stream , mount_point); - break; - case( PLAIN_DRIVER_ID ): - fs = enkf_fs_mount_plain( stream , mount_point ); - break; - default: - util_abort("%s: unrecognized driver_id:%d \n",__func__ , driver_id ); - } - } - fclose( stream ); - enkf_fs_init_path_fmt( fs ); - enkf_fs_fread_time_map( fs ); - enkf_fs_fread_cases_config( fs ); - enkf_fs_fread_state_map( fs ); - enkf_fs_fread_summary_key_set( fs ); - enkf_fs_fread_custom_kw_config_set( fs ); - enkf_fs_fread_misfit( fs ); - - enkf_fs_get_ref( fs ); - return fs; - } - return NULL; -} - - -bool enkf_fs_exists( const char * mount_point ) { - bool exists = false; - - FILE * stream = fs_driver_open_fstab( mount_point , false ); - if (stream != NULL) { - exists = true; - fclose( stream ); - } - - return exists; -} - - - - -/*****************************************************************/ - - - -static void enkf_fs_free_driver(fs_driver_type * driver) { - driver->free_driver(driver); -} - - -static void enkf_fs_umount( enkf_fs_type * fs ) { - if (!fs->read_only) { - enkf_fs_fsync( fs ); - enkf_fs_fwrite_misfit( fs ); - } - - { - int refcount = fs->refcount; - if (refcount == 0) { - enkf_fs_free_driver( fs->dynamic_forecast ); - enkf_fs_free_driver( fs->parameter ); - enkf_fs_free_driver( fs->index ); - - if (fs->lock_fd > 0) { - close( fs->lock_fd ); // Closing the lock_file file descriptor - and releasing the lock. - util_unlink_existing( fs->lock_file ); - } - - util_safe_free( fs->case_name ); - util_safe_free( fs->root_path ); - util_safe_free(fs->lock_file); - util_safe_free( fs->mount_point ); - path_fmt_free( fs->case_fmt ); - path_fmt_free( fs->case_member_fmt ); - path_fmt_free( fs->case_tstep_fmt ); - path_fmt_free( fs->case_tstep_member_fmt ); - - custom_kw_config_set_free( fs->custom_kw_config_set ); - state_map_free( fs->state_map ); - summary_key_set_free(fs->summary_key_set); - time_map_free( fs->time_map ); - cases_config_free( fs->cases_config ); - misfit_ensemble_free( fs->misfit_ensemble ); - free( fs ); - } else - util_abort("%s: internal fuckup - tried to umount a filesystem with refcount:%d\n",__func__ , refcount); - } -} - - - - - -static void * enkf_fs_select_driver(enkf_fs_type * fs , enkf_var_type var_type, const char * key) { - void * driver = NULL; - switch (var_type) { - case(PARAMETER): - driver = fs->parameter; - break; - case(DYNAMIC_RESULT): - driver = fs->dynamic_forecast; - break; - case(DYNAMIC_STATE): - driver = fs->dynamic_forecast; - break; - default: - util_abort("%s: fatal internal error - could not determine enkf_fs driver for object:%s[integer type:%d] - aborting.\n",__func__, key , var_type); - } - return driver; -} - - - -/*****************************************************************/ -/* Exported functions for enkf_node instances . */ - - -static void enkf_fs_fsync_driver( fs_driver_type * driver ) { - if (driver->fsync_driver != NULL) - driver->fsync_driver( driver ); -} - - - -void enkf_fs_fsync( enkf_fs_type * fs ) { - enkf_fs_fsync_driver( fs->parameter ); - enkf_fs_fsync_driver( fs->dynamic_forecast ); - enkf_fs_fsync_driver( fs->index ); - - enkf_fs_fsync_time_map( fs ); - enkf_fs_fsync_cases_config( fs) ; - enkf_fs_fsync_state_map( fs ); - enkf_fs_fsync_summary_key_set( fs ); - enkf_fs_fsync_custom_kw_config_set(fs); -} - - - - -void enkf_fs_fread_node(enkf_fs_type * enkf_fs , buffer_type * buffer , - const char * node_key , - enkf_var_type var_type , - int report_step, - int iens) { - - fs_driver_type * driver = enkf_fs_select_driver(enkf_fs , var_type , node_key ); - if (var_type == PARAMETER) - /* Parameters are *ONLY* stored at report_step == 0 */ - report_step = 0; - - buffer_rewind( buffer ); - driver->load_node(driver , node_key , report_step , iens , buffer); -} - - -void enkf_fs_fread_vector(enkf_fs_type * enkf_fs , buffer_type * buffer , - const char * node_key , - enkf_var_type var_type , - int iens) { - - fs_driver_type * driver = enkf_fs_select_driver(enkf_fs , var_type , node_key ); - - buffer_rewind( buffer ); - driver->load_vector(driver , node_key , iens , buffer); -} - - - -bool enkf_fs_has_node(enkf_fs_type * enkf_fs , const char * node_key , enkf_var_type var_type , int report_step , int iens) { - fs_driver_type * driver = fs_driver_safe_cast(enkf_fs_select_driver(enkf_fs , var_type , node_key)); - return driver->has_node(driver , node_key , report_step , iens ); -} - - -bool enkf_fs_has_vector(enkf_fs_type * enkf_fs , const char * node_key , enkf_var_type var_type , int iens ) { - fs_driver_type * driver = fs_driver_safe_cast(enkf_fs_select_driver(enkf_fs , var_type , node_key)); - return driver->has_vector(driver , node_key , iens ); -} - -void enkf_fs_fwrite_node(enkf_fs_type * enkf_fs , buffer_type * buffer , const char * node_key, enkf_var_type var_type, - int report_step , int iens ) { - if (enkf_fs->read_only) - util_abort("%s: attempt to write to read_only filesystem mounted at:%s - aborting. \n",__func__ , enkf_fs->mount_point); - - - if ((var_type == PARAMETER) && (report_step > 0)) - util_abort("%s: Parameters can only be saved for report_step = 0 %s:%d\n", __func__ , node_key , report_step); - { - void * _driver = enkf_fs_select_driver(enkf_fs , var_type , node_key); - { - fs_driver_type * driver = fs_driver_safe_cast(_driver); - driver->save_node(driver , node_key , report_step , iens , buffer); - } - } -} - - -void enkf_fs_fwrite_vector(enkf_fs_type * enkf_fs , buffer_type * buffer , const char * node_key, enkf_var_type var_type, - int iens ) { - if (enkf_fs->read_only) - util_abort("%s: attempt to write to read_only filesystem mounted at:%s - aborting. \n",__func__ , enkf_fs->mount_point); - { - void * _driver = enkf_fs_select_driver(enkf_fs , var_type , node_key); - { - fs_driver_type * driver = fs_driver_safe_cast(_driver); - driver->save_vector(driver , node_key , iens , buffer); - } - } -} - - - - -/*****************************************************************/ - - - - - -/*****************************************************************/ - -const char * enkf_fs_get_mount_point( const enkf_fs_type * fs ) { - return fs->mount_point; -} - -const char * enkf_fs_get_root_path( const enkf_fs_type * fs ) { - return fs->root_path; -} - -const char * enkf_fs_get_case_name( const enkf_fs_type * fs ) { - return fs->case_name; -} - - -bool enkf_fs_is_read_only(const enkf_fs_type * fs) { - return fs->read_only; -} - -void enkf_fs_set_writable(enkf_fs_type * fs, bool writable) { - fs->read_only = !writable; -} - -void enkf_fs_debug_fprintf( const enkf_fs_type * fs) { - printf("-----------------------------------------------------------------\n"); - printf("fs...................: %p \n",fs ); - printf("Mount point..........: %s \n",fs->mount_point ); - printf("Dynamic forecast.....: %p \n",fs->dynamic_forecast ); - printf("Parameter............: %p \n",fs->parameter ); - printf("Index................: %p \n",fs->index ); - printf("-----------------------------------------------------------------\n"); -} - - - - -/*****************************************************************/ -/* write_dir / read_dir confusion. */ - -char * enkf_fs_alloc_case_filename( const enkf_fs_type * fs , const char * input_name) { - char * filename = path_fmt_alloc_file( fs->case_fmt , false , fs->mount_point , input_name); - return filename; -} - - -char * enkf_fs_alloc_case_member_filename( const enkf_fs_type * fs , int iens , const char * input_name) { - char * filename = path_fmt_alloc_file( fs->case_member_fmt , false , fs->mount_point , iens , input_name); - return filename; -} - - -char * enkf_fs_alloc_case_tstep_filename( const enkf_fs_type * fs , int tstep , const char * input_name) { - char * filename = path_fmt_alloc_file( fs->case_tstep_fmt , false , fs->mount_point , tstep , input_name); - return filename; -} - -char * enkf_fs_alloc_case_tstep_member_filename( const enkf_fs_type * fs , int tstep , int iens , const char * input_name) { - char * filename = path_fmt_alloc_file( fs->case_tstep_member_fmt , false , fs->mount_point , tstep , iens , input_name); - return filename; -} - - - -FILE * enkf_fs_open_case_file( const enkf_fs_type * fs , const char * input_name , const char * mode) { - char * filename = enkf_fs_alloc_case_filename( fs , input_name ); - FILE * stream = util_mkdir_fopen( filename , mode ); - free( filename ); - return stream; -} - - -FILE * enkf_fs_open_case_member_file( const enkf_fs_type * fs , const char * input_name , int iens , const char * mode) { - char * filename = enkf_fs_alloc_case_member_filename( fs , iens , input_name ); - FILE * stream = util_mkdir_fopen( filename , mode ); - free( filename ); - return stream; -} - - -FILE * enkf_fs_open_case_tstep_file( const enkf_fs_type * fs , const char * input_name , int tstep , const char * mode) { - char * filename = enkf_fs_alloc_case_tstep_filename( fs , tstep , input_name ); - FILE * stream = util_mkdir_fopen( filename , mode ); - free( filename ); - return stream; -} - - -FILE * enkf_fs_open_case_tstep_member_file( const enkf_fs_type * fs , const char * input_name , int tstep , int iens , const char * mode) { - char * filename = enkf_fs_alloc_case_tstep_member_filename( fs , tstep , iens , input_name ); - FILE * stream = util_mkdir_fopen( filename , mode ); - free( filename ); - return stream; -} - -/*****************************************************************/ -/* - The open_exXXX functions will return NULL if the file does not - already exist. These functions can only be used to open with 'r' - mode. -*/ - - - -static FILE * enkf_fs_open_exfile( const char * filename ) { - if (util_file_exists(filename)) - return util_fopen( filename , "r"); - else - return NULL; -} - -FILE * enkf_fs_open_excase_file( const enkf_fs_type * fs , const char * input_name ) { - char * filename = enkf_fs_alloc_case_filename( fs , input_name ); - FILE * stream = enkf_fs_open_exfile( filename ); - free( filename ); - return stream; -} - - -FILE * enkf_fs_open_excase_member_file( const enkf_fs_type * fs , const char * input_name , int iens ) { - char * filename = enkf_fs_alloc_case_member_filename( fs , iens , input_name ); - FILE * stream = enkf_fs_open_exfile( filename ); - free( filename ); - return stream; -} - - -FILE * enkf_fs_open_excase_tstep_file( const enkf_fs_type * fs , const char * input_name , int tstep ) { - char * filename = enkf_fs_alloc_case_tstep_filename( fs , tstep , input_name ); - FILE * stream = enkf_fs_open_exfile( filename ); - free( filename ); - return stream; -} - - -FILE * enkf_fs_open_excase_tstep_member_file( const enkf_fs_type * fs , const char * input_name , int tstep , int iens ) { - char * filename = enkf_fs_alloc_case_tstep_member_filename( fs , tstep , iens , input_name ); - FILE * stream = enkf_fs_open_exfile( filename ); - free( filename ); - return stream; -} - -/*****************************************************************/ - -time_map_type * enkf_fs_get_time_map( const enkf_fs_type * fs ) { - return fs->time_map; -} - -cases_config_type * enkf_fs_get_cases_config( const enkf_fs_type * fs) { - return fs->cases_config; -} - -state_map_type * enkf_fs_get_state_map( const enkf_fs_type * fs ) { - return fs->state_map; -} - -summary_key_set_type * enkf_fs_get_summary_key_set( const enkf_fs_type * fs ) { - return fs->summary_key_set; -} - -custom_kw_config_set_type * enkf_fs_get_custom_kw_config_set(const enkf_fs_type * fs) { - return fs->custom_kw_config_set; -} - -misfit_ensemble_type * enkf_fs_get_misfit_ensemble( const enkf_fs_type * fs ) { - return fs->misfit_ensemble; -} - -void enkf_fs_increase_write_count(enkf_fs_type * fs) { - fs->writecount = fs->writecount + 1; -} - -void enkf_fs_decrease_write_count(enkf_fs_type * fs) { - fs->writecount = fs->writecount - 1; -} - -int enkf_fs_get_write_count(const enkf_fs_type * fs) { - return fs->writecount; -} - diff --git a/ThirdParty/Ert/libenkf/src/enkf_main.c b/ThirdParty/Ert/libenkf/src/enkf_main.c deleted file mode 100644 index 0c732e64d9..0000000000 --- a/ThirdParty/Ert/libenkf/src/enkf_main.c +++ /dev/null @@ -1,3303 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - The file 'enkf_main.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define HAVE_THREAD_POOL 1 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/**/ - -/** - This object should contain **everything** needed to run a enkf - simulation. A way to wrap up all available information/state and - pass it around. An attempt has been made to collect various pieces - of related information together in a couple of objects - (model_config, ecl_config, site_config and ensemble_config). When - it comes to these holding objects the following should be observed: - - 1. It not always obvious where a piece of information should be - stored, i.e. the grid is a property of the model, however it is - an eclipse grid, and hence also belongs to eclipse - configuration?? [In this case ecl_config wins out.] - - 2. The information stored in these objects is typically passed on - to the enkf_state object, where it is used. - - 3. At enkf_state level it is not really consequent - in some cases - the enkf_state object takes a scalar copy (i.e. keep_runpath), - and in other cases only a pointer down to the underlying - enkf_main object is taken. In the former case it is no way to - change global behaviour by modifying the enkf_main objects. - - In the enkf_state object the fields of the member_config, - ecl_config, site_config and ensemble_config objects are mixed - and matched into other small holding objects defined in - enkf_state.c. - -*/ - -#define ENKF_MAIN_ID 8301 - -struct enkf_main_struct { - UTIL_TYPE_ID_DECLARATION; - enkf_fs_type * dbase; /* The internalized information. */ - - ensemble_config_type * ensemble_config; /* The config objects for the various enkf nodes.*/ - hook_manager_type * hook_manager; - model_config_type * model_config; - ecl_config_type * ecl_config; - site_config_type * site_config; - analysis_config_type * analysis_config; - local_config_type * local_config; /* Holding all the information about local analysis. */ - ert_templates_type * templates; /* Run time templates */ - plot_config_type * plot_config; /* Information about plotting. */ - rng_config_type * rng_config; - rng_type * rng; - ert_workflow_list_type * workflow_list; - ranking_table_type * ranking_table; - - /*---------------------------*/ /* Variables related to substitution. */ - subst_func_pool_type * subst_func_pool; - subst_list_type * subst_list; /* A parent subst_list instance - common to all ensemble members. */ - /*-------------------------*/ - - int_vector_type * keep_runpath; /* HACK: This is only used in the initialization period - afterwards the data is held by the enkf_state object. */ - bool pre_clear_runpath; /* HACK: This is only used in the initialization period - afterwards the data is held by the enkf_state object. */ - - char * site_config_file; - char * user_config_file; - char * rft_config_file; /* File giving the configuration to the RFTwells*/ - enkf_obs_type * obs; - enkf_state_type ** ensemble; /* The ensemble ... */ - int ens_size; /* The size of the ensemble */ - bool verbose; -}; - - - - -/*****************************************************************/ - -void enkf_main_init_internalization( enkf_main_type * , run_mode_type ); -void enkf_main_update_local_updates( enkf_main_type * enkf_main); -static void enkf_main_close_fs( enkf_main_type * enkf_main ); -static void enkf_main_init_fs( enkf_main_type * enkf_main ); -static void enkf_main_user_select_initial_fs(enkf_main_type * enkf_main ); - -/*****************************************************************/ - -UTIL_SAFE_CAST_FUNCTION(enkf_main , ENKF_MAIN_ID) -UTIL_IS_INSTANCE_FUNCTION(enkf_main , ENKF_MAIN_ID) - -analysis_config_type * enkf_main_get_analysis_config(const enkf_main_type * enkf_main) { - return enkf_main->analysis_config; -} - -bool enkf_main_get_pre_clear_runpath( const enkf_main_type * enkf_main ) { - return enkf_state_get_pre_clear_runpath( enkf_main->ensemble[0] ); -} - -void enkf_main_set_pre_clear_runpath( enkf_main_type * enkf_main , bool pre_clear_runpath) { - const int ens_size = enkf_main_get_ensemble_size( enkf_main ); - int iens; - for (iens = 0; iens < ens_size; iens++) - enkf_state_set_pre_clear_runpath( enkf_main->ensemble[iens] , pre_clear_runpath ); -} - - -bool enkf_main_set_refcase( enkf_main_type * enkf_main , const char * refcase_path) { - bool set_refcase = ecl_config_load_refcase( enkf_main->ecl_config , refcase_path ); - - model_config_set_refcase( enkf_main->model_config , ecl_config_get_refcase( enkf_main->ecl_config )); - ensemble_config_set_refcase( enkf_main->ensemble_config , ecl_config_get_refcase( enkf_main->ecl_config )); - - return set_refcase; -} - - -ui_return_type * enkf_main_validata_refcase( const enkf_main_type * enkf_main , const char * refcase_path) { - return ecl_config_validate_refcase( enkf_main->ecl_config , refcase_path ); -} - - -ui_return_type * enkf_main_set_eclbase( enkf_main_type * enkf_main , const char * eclbase_fmt) { - ui_return_type * ui_return = ecl_config_validate_eclbase( enkf_main->ecl_config , eclbase_fmt); - if (ui_return_get_status(ui_return) == UI_RETURN_OK) { - ecl_config_set_eclbase( enkf_main->ecl_config , eclbase_fmt ); - for (int iens = 0; iens < enkf_main->ens_size; iens++) - enkf_state_update_eclbase(enkf_main->ensemble[iens]); - } - return ui_return; -} - -void enkf_main_init_jobname( enkf_main_type * enkf_main) { - for (int iens = 0; iens < enkf_main->ens_size; iens++) - enkf_state_update_jobname( enkf_main->ensemble[iens] ); -} - - -void enkf_main_set_jobname( enkf_main_type * enkf_main , const char * jobname_fmt) { - model_config_set_jobname_fmt( enkf_main->model_config , jobname_fmt ); - enkf_main_init_jobname( enkf_main ); -} - -void enkf_main_set_user_config_file( enkf_main_type * enkf_main , const char * user_config_file ) { - enkf_main->user_config_file = util_realloc_string_copy( enkf_main->user_config_file , user_config_file ); -} - -void enkf_main_set_rft_config_file( enkf_main_type * enkf_main , const char * rft_config_file ) { - enkf_main->rft_config_file = util_realloc_string_copy( enkf_main->rft_config_file , rft_config_file ); -} - -void enkf_main_set_site_config_file( enkf_main_type * enkf_main , const char * site_config_file ) { - enkf_main->site_config_file = util_realloc_string_copy( enkf_main->site_config_file , site_config_file ); -} - -const char * enkf_main_get_user_config_file( const enkf_main_type * enkf_main ) { - return enkf_main->user_config_file; -} - -const char * enkf_main_get_site_config_file( const enkf_main_type * enkf_main ) { - return enkf_main->site_config_file; -} - -const char * enkf_main_get_rft_config_file( const enkf_main_type * enkf_main ) { - return enkf_main->rft_config_file; -} - -ensemble_config_type * enkf_main_get_ensemble_config(const enkf_main_type * enkf_main) { - return enkf_main->ensemble_config; -} - -site_config_type * enkf_main_get_site_config( const enkf_main_type * enkf_main ) { - return enkf_main->site_config; -} - - -subst_list_type * enkf_main_get_data_kw( const enkf_main_type * enkf_main ) { - return enkf_main->subst_list; -} - - -local_config_type * enkf_main_get_local_config( const enkf_main_type * enkf_main ) { - return enkf_main->local_config; -} - -model_config_type * enkf_main_get_model_config( const enkf_main_type * enkf_main ) { - return enkf_main->model_config; -} - -plot_config_type * enkf_main_get_plot_config( const enkf_main_type * enkf_main ) { - return enkf_main->plot_config; -} - -ranking_table_type * enkf_main_get_ranking_table( const enkf_main_type * enkf_main ) { - return enkf_main->ranking_table; -} - -ecl_config_type *enkf_main_get_ecl_config(const enkf_main_type * enkf_main) { - return enkf_main->ecl_config; -} - -int enkf_main_get_history_length( const enkf_main_type * enkf_main) { - return model_config_get_last_history_restart( enkf_main->model_config); -} - -bool enkf_main_has_prediction( const enkf_main_type * enkf_main ) { - return model_config_has_prediction( enkf_main->model_config ); -} - - - -enkf_obs_type * enkf_main_get_obs(const enkf_main_type * enkf_main) { - return enkf_main->obs; -} - - -bool enkf_main_have_obs( const enkf_main_type * enkf_main ) { - return enkf_obs_have_obs( enkf_main->obs ); -} - - - -hook_manager_type * enkf_main_get_hook_manager( const enkf_main_type * enkf_main ) { - return enkf_main->hook_manager; -} - - - -void enkf_main_alloc_obs( enkf_main_type * enkf_main ) { - enkf_main->obs = enkf_obs_alloc( model_config_get_history(enkf_main->model_config), - model_config_get_external_time_map(enkf_main->model_config), - ecl_config_get_grid( enkf_main->ecl_config ), - ecl_config_get_refcase( enkf_main->ecl_config ) , - enkf_main->ensemble_config ); -} - -void enkf_main_load_obs( enkf_main_type * enkf_main , const char * obs_config_file , bool clear_existing) { - if (clear_existing) - enkf_obs_clear( enkf_main->obs ); - - if (enkf_obs_load(enkf_main->obs , - obs_config_file , - analysis_config_get_std_cutoff(enkf_main->analysis_config))) { - enkf_main_update_local_updates( enkf_main ); - } else - fprintf(stderr,"** Warning: failed to load observation data from: %s \n",obs_config_file); -} - - -/** - This function should be called when a new data_file has been set. -*/ - -static void enkf_main_update_num_cpu( enkf_main_type * enkf_main ) { - /** - This is how the number of CPU's are passed on to the forward models: - */ - { - char * num_cpu_key = enkf_util_alloc_tagged_string( "NUM_CPU" ); - char * num_cpu_string = util_alloc_sprintf( "%d" , ecl_config_get_num_cpu( enkf_main->ecl_config )); - - subst_list_append_owned_ref( enkf_main->subst_list , num_cpu_key , num_cpu_string , NULL ); - free( num_cpu_key ); - } -} - - -ui_return_type * enkf_main_set_data_file( enkf_main_type * enkf_main , const char * data_file ) { - ui_return_type * ui_return = ecl_config_validate_data_file( enkf_main->ecl_config , data_file ); - if (ui_return_get_status(ui_return) == UI_RETURN_OK) { - ecl_config_set_data_file( enkf_main->ecl_config , data_file ); - enkf_main_update_num_cpu( enkf_main ); - } - return ui_return; -} - - - -static void enkf_main_free_ensemble( enkf_main_type * enkf_main ) { - if (enkf_main->ensemble != NULL) { - const int ens_size = enkf_main->ens_size; - int i; - for (i=0; i < ens_size; i++) - enkf_state_free( enkf_main->ensemble[i] ); - free(enkf_main->ensemble); - enkf_main->ensemble = NULL; - } -} - - -void enkf_main_free(enkf_main_type * enkf_main){ - if (enkf_main->rng != NULL) - rng_free( enkf_main->rng ); - rng_config_free( enkf_main->rng_config ); - - if (enkf_main->obs) - enkf_obs_free(enkf_main->obs); - - ranking_table_free( enkf_main->ranking_table ); - enkf_main_free_ensemble( enkf_main ); - enkf_main_close_fs( enkf_main ); - ert_log_close(); - - analysis_config_free(enkf_main->analysis_config); - ecl_config_free(enkf_main->ecl_config); - model_config_free( enkf_main->model_config); - - - hook_manager_free( enkf_main->hook_manager ); - site_config_free( enkf_main->site_config); - ensemble_config_free( enkf_main->ensemble_config ); - - local_config_free( enkf_main->local_config ); - - ert_workflow_list_free( enkf_main->workflow_list ); - - - int_vector_free( enkf_main->keep_runpath ); - plot_config_free( enkf_main->plot_config ); - ert_templates_free( enkf_main->templates ); - - subst_func_pool_free( enkf_main->subst_func_pool ); - subst_list_free( enkf_main->subst_list ); - util_safe_free( enkf_main->user_config_file ); - util_safe_free( enkf_main->site_config_file ); - util_safe_free( enkf_main->rft_config_file ); - free(enkf_main); -} - - - -void enkf_main_exit(enkf_main_type * enkf_main) { - enkf_main_free( enkf_main ); - exit(0); -} - - -/*****************************************************************/ - - - -/** - This function returns a (enkf_node_type ** ) pointer, which points - to all the instances with the same keyword, i.e. - - enkf_main_get_node_ensemble(enkf_main , "PRESSURE"); - - Will return an ensemble of pressure nodes. Observe that apart from - the list of pointers, *now new storage* is allocated, all the - pointers point in to the underlying enkf_node instances under the - enkf_main / enkf_state objects. Consequently there is no designated - free() function to match this, just free() the result. - - Example: - - enkf_node_type ** pressure_nodes = enkf_main_get_node_ensemble(enkf_main , "PRESSURE"); - - Do something with the pressure nodes ... - - free(pressure_nodes); - -*/ - -enkf_node_type ** enkf_main_get_node_ensemble(const enkf_main_type * enkf_main , enkf_fs_type * src_fs, const char * key , int report_step) { - const int ens_size = enkf_main_get_ensemble_size( enkf_main ); - enkf_node_type ** node_ensemble = util_calloc(ens_size , sizeof * node_ensemble ); - node_id_type node_id = {.report_step = report_step , - .iens = -1 }; - int iens; - - - for (iens = 0; iens < ens_size; iens++) { - node_ensemble[iens] = enkf_state_get_node(enkf_main->ensemble[iens] , key); - node_id.iens = iens; - enkf_node_load( node_ensemble[iens] , src_fs , node_id); - } - return node_ensemble; -} - -/*****************************************************************/ - - - - -enkf_state_type * enkf_main_iget_state(const enkf_main_type * enkf_main , int iens) { - return enkf_main->ensemble[iens]; -} - - -member_config_type * enkf_main_iget_member_config(const enkf_main_type * enkf_main , int iens) { - return enkf_state_get_member_config( enkf_main->ensemble[iens] ); -} - - - -void enkf_main_node_mean( const enkf_node_type ** ensemble , int ens_size , enkf_node_type * mean ) { - int iens; - enkf_node_clear( mean ); - for (iens = 0; iens < ens_size; iens++) - enkf_node_iadd( mean , ensemble[iens] ); - - enkf_node_scale( mean , 1.0 / ens_size ); -} - - -/** - This function calculates the node standard deviation from the - ensemble. The mean can be NULL, in which case it is assumed that - the mean has already been shifted away from the ensemble. -*/ - - -void enkf_main_node_std( const enkf_node_type ** ensemble , int ens_size , const enkf_node_type * mean , enkf_node_type * std) { - int iens; - enkf_node_clear( std ); - for (iens = 0; iens < ens_size; iens++) - enkf_node_iaddsqr( std , ensemble[iens] ); - enkf_node_scale(std , 1.0 / ens_size ); - - if (mean != NULL) { - enkf_node_scale( std , -1 ); - enkf_node_iaddsqr( std , mean ); - enkf_node_scale( std , -1 ); - } - - enkf_node_sqrt( std ); -} - - -void enkf_main_inflate_node(enkf_main_type * enkf_main , enkf_fs_type * src_fs , enkf_fs_type * target_fs , int report_step , const char * key , const enkf_node_type * min_std) { - int ens_size = enkf_main_get_ensemble_size(enkf_main); - enkf_node_type ** ensemble = enkf_main_get_node_ensemble( enkf_main , src_fs , key , report_step ); // Was ANALYZED - enkf_node_type * mean = enkf_node_copyc( ensemble[0] ); - enkf_node_type * std = enkf_node_copyc( ensemble[0] ); - int iens; - - /* Shifting away the mean */ - enkf_main_node_mean( (const enkf_node_type **) ensemble , ens_size , mean ); - enkf_node_scale( mean , -1 ); - for (iens = 0; iens < ens_size; iens++) - enkf_node_iadd( ensemble[iens] , mean ); - enkf_node_scale( mean , -1 ); - - /*****************************************************************/ - /* - Now we have the ensemble represented as a mean and an ensemble of - deviations from the mean. This is the form suitable for actually - doing the inflation. - */ - { - enkf_node_type * inflation = enkf_node_copyc( ensemble[0] ); - enkf_node_set_inflation( inflation , std , min_std ); - - for (iens = 0; iens < ens_size; iens++) - enkf_node_imul( ensemble[iens] , inflation ); - - enkf_node_free( inflation ); - } - - /* Add the mean back in - and store the updated node to disk.*/ - for (iens = 0; iens < ens_size; iens++) { - node_id_type node_id = {.report_step = report_step , .iens = iens }; - enkf_node_iadd( ensemble[iens] , mean ); - enkf_node_store( ensemble[iens] , target_fs , true , node_id); - } - - enkf_node_free( mean ); - enkf_node_free( std ); - free( ensemble ); -} - - - -/** - Denne burde istedet loope gjennom noklene fra use_count - direkte. -*/ - -void enkf_main_inflate(enkf_main_type * enkf_main , enkf_fs_type * src_fs , enkf_fs_type * target_fs , int report_step , hash_type * use_count) { - stringlist_type * keys = ensemble_config_alloc_keylist_from_var_type( enkf_main->ensemble_config , PARAMETER + DYNAMIC_STATE); - - for (int ikey = 0; ikey < stringlist_get_size( keys ); ikey++) { - const char * key = stringlist_iget( keys , ikey ); - if (hash_get_counter(use_count , key) > 0) { - const enkf_config_node_type * config_node = ensemble_config_get_node( enkf_main->ensemble_config , key ); - const enkf_node_type * min_std = enkf_config_node_get_min_std( config_node ); - - if (min_std != NULL) - enkf_main_inflate_node(enkf_main , src_fs , target_fs , report_step , key , min_std ); - - } - } - stringlist_free( keys ); -} - - - - -static int __get_active_size(const ensemble_config_type * ensemble_config , enkf_fs_type * fs , const char * key, int report_step , const active_list_type * active_list) { - const enkf_config_node_type * config_node = ensemble_config_get_node( ensemble_config , key ); - /** - This is very awkward; the problem is that for the GEN_DATA - type the config object does not really own the size. Instead - the size is pushed (on load time) from gen_data instances to - the gen_data_config instance. Therefor we have to assert - that at least one gen_data instance has been loaded (and - consequently updated the gen_data_config instance) before we - query for the size. - */ - { - if (enkf_config_node_get_impl_type( config_node ) == GEN_DATA) { - enkf_node_type * node = enkf_node_alloc( config_node ); - node_id_type node_id = {.report_step = report_step , - .iens = 0 }; - - enkf_node_load( node , fs , node_id ); - enkf_node_free( node ); - } - } - - { - active_mode_type active_mode = active_list_get_mode( active_list ); - int active_size; - if (active_mode == INACTIVE) - active_size = 0; - else if (active_mode == ALL_ACTIVE) - active_size = enkf_config_node_get_data_size( config_node , report_step ); - else if (active_mode == PARTLY_ACTIVE) - active_size = active_list_get_active_size( active_list , -1 ); - else { - util_abort("%s: internal error .. \n",__func__); - active_size = -1; /* Compiler shut up */ - } - return active_size; - } -} - - -/*****************************************************************/ -/** - Helper struct used to pass information to the multithreaded - serialize / deserialize functions. -*/ - -typedef struct { - enkf_fs_type * src_fs; - enkf_fs_type * target_fs; - enkf_state_type ** ensemble; - int iens1; /* Inclusive lower limit. */ - int iens2; /* NOT inclusive upper limit. */ - const char * key; - int report_step; - int target_step; - run_mode_type run_mode; - int row_offset; - const active_list_type * active_list; - matrix_type * A; - const int_vector_type * iens_active_index; -} serialize_info_type; - - -static void serialize_node( enkf_fs_type * fs , - enkf_state_type ** ensemble , - const char * key , - int iens , - int report_step , - int row_offset , - int column, - const active_list_type * active_list, - matrix_type * A) { - - enkf_node_type * node = enkf_state_get_node( ensemble[iens] , key); - node_id_type node_id = {.report_step = report_step, .iens = iens }; - enkf_node_serialize( node , fs , node_id , active_list , A , row_offset , column); -} - - -static void * serialize_nodes_mt( void * arg ) { - serialize_info_type * info = (serialize_info_type *) arg; - int iens; - for (iens = info->iens1; iens < info->iens2; iens++) { - int column = int_vector_iget( info->iens_active_index , iens); - if (column >= 0) - serialize_node( info->src_fs , - info->ensemble , - info->key , - iens , - info->report_step , - info->row_offset , - column, - info->active_list , - info->A ); - } - return NULL; -} - - -static void enkf_main_serialize_node( const char * node_key , - const active_list_type * active_list , - int row_offset , - thread_pool_type * work_pool , - serialize_info_type * serialize_info) { - - /* Multithreaded serializing*/ - const int num_cpu_threads = thread_pool_get_max_running( work_pool ); - int icpu; - - thread_pool_restart( work_pool ); - for (icpu = 0; icpu < num_cpu_threads; icpu++) { - serialize_info[icpu].key = node_key; - serialize_info[icpu].active_list = active_list; - serialize_info[icpu].row_offset = row_offset; - - thread_pool_add_job( work_pool , serialize_nodes_mt , &serialize_info[icpu]); - } - thread_pool_join( work_pool ); -} - - - -/** - The return value is the number of rows in the serialized - A matrix. -*/ - -static int enkf_main_serialize_dataset( const ensemble_config_type * ens_config , - const local_dataset_type * dataset , - int report_step, - hash_type * use_count , - int * active_size , - int * row_offset, - thread_pool_type * work_pool, - serialize_info_type * serialize_info) { - - matrix_type * A = serialize_info->A; - stringlist_type * update_keys = local_dataset_alloc_keys( dataset ); - const int num_kw = stringlist_get_size( update_keys ); - int ens_size = matrix_get_columns( A ); - int current_row = 0; - - for (int ikw=0; ikw < num_kw; ikw++) { - const char * key = stringlist_iget(update_keys , ikw); - enkf_config_node_type * config_node = ensemble_config_get_node( ens_config , key ); - if ((serialize_info[0].run_mode == SMOOTHER_UPDATE) && (enkf_config_node_get_var_type( config_node ) != PARAMETER)) { - /* We have tried to serialize a dynamic node when we are - smoother update mode; that does not make sense and we just - continue. */ - active_size[ikw] = 0; - continue; - } else { - const active_list_type * active_list = local_dataset_get_node_active_list( dataset , key ); - enkf_fs_type * src_fs = serialize_info->src_fs; - active_size[ikw] = __get_active_size( ens_config , src_fs , key , report_step , active_list ); - row_offset[ikw] = current_row; - - { - int matrix_rows = matrix_get_rows( A ); - if ((active_size[ikw] + current_row) > matrix_rows) - matrix_resize( A , matrix_rows + 2 * active_size[ikw] , ens_size , true ); - } - - if (active_size[ikw] > 0) { - enkf_main_serialize_node( key , active_list , row_offset[ikw] , work_pool , serialize_info ); - current_row += active_size[ikw]; - } - } - } - matrix_shrink_header( A , current_row , ens_size ); - stringlist_free( update_keys ); - return matrix_get_rows( A ); -} - -static void deserialize_node( enkf_fs_type * fs, - enkf_state_type ** ensemble , - const char * key , - int iens, - int target_step , - int row_offset , - int column, - const active_list_type * active_list, - matrix_type * A) { - - enkf_node_type * node = enkf_state_get_node( ensemble[iens] , key); - node_id_type node_id = { .report_step = target_step , .iens = iens }; - enkf_node_deserialize(node , fs , node_id , active_list , A , row_offset , column); - state_map_update_undefined(enkf_fs_get_state_map(fs) , iens , STATE_INITIALIZED); -} - - - -static void * deserialize_nodes_mt( void * arg ) { - serialize_info_type * info = (serialize_info_type *) arg; - int iens; - for (iens = info->iens1; iens < info->iens2; iens++) { - int column = int_vector_iget( info->iens_active_index , iens ); - if (column >= 0) - deserialize_node( info->target_fs , info->ensemble , info->key , iens , info->target_step , info->row_offset , column, info->active_list , info->A ); - } - return NULL; -} - - -static void enkf_main_deserialize_dataset( ensemble_config_type * ensemble_config , - const local_dataset_type * dataset , - const int * active_size , - const int * row_offset , - serialize_info_type * serialize_info , - thread_pool_type * work_pool ) { - - int num_cpu_threads = thread_pool_get_max_running( work_pool ); - stringlist_type * update_keys = local_dataset_alloc_keys( dataset ); - for (int i = 0; i < stringlist_get_size( update_keys ); i++) { - const char * key = stringlist_iget(update_keys , i); - enkf_config_node_type * config_node = ensemble_config_get_node( ensemble_config , key ); - if ((serialize_info[0].run_mode == SMOOTHER_UPDATE) && (enkf_config_node_get_var_type( config_node ) != PARAMETER)) - /* - We have tried to serialize a dynamic node when we are in - smoother update mode; that does not make sense and we just - continue. - */ - continue; - else { - if (active_size[i] > 0) { - const active_list_type * active_list = local_dataset_get_node_active_list( dataset , key ); - - { - /* Multithreaded */ - int icpu; - thread_pool_restart( work_pool ); - for (icpu = 0; icpu < num_cpu_threads; icpu++) { - serialize_info[icpu].key = key; - serialize_info[icpu].active_list = active_list; - serialize_info[icpu].row_offset = row_offset[i]; - - thread_pool_add_job( work_pool , deserialize_nodes_mt , &serialize_info[icpu]); - } - thread_pool_join( work_pool ); - } - } - } - } - stringlist_free( update_keys ); -} - - -static void serialize_info_free( serialize_info_type * serialize_info ) { - free( serialize_info ); -} - -static serialize_info_type * serialize_info_alloc( enkf_fs_type * src_fs, - enkf_fs_type * target_fs , - const int_vector_type * iens_active_index , - int target_step , - enkf_state_type ** ensemble , - run_mode_type run_mode , - int report_step , - matrix_type * A , - int num_cpu_threads ) { - - serialize_info_type * serialize_info = util_calloc( num_cpu_threads , sizeof * serialize_info ); - int ens_size = int_vector_size(iens_active_index); - int icpu; - int iens_offset = 0; - for (icpu = 0; icpu < num_cpu_threads; icpu++) { - serialize_info[icpu].iens_active_index = iens_active_index; - serialize_info[icpu].run_mode = run_mode; - serialize_info[icpu].src_fs = src_fs; - serialize_info[icpu].target_fs = target_fs; - serialize_info[icpu].target_step = target_step; - serialize_info[icpu].ensemble = ensemble; - serialize_info[icpu].report_step = report_step; - serialize_info[icpu].A = A; - serialize_info[icpu].iens1 = iens_offset; - serialize_info[icpu].iens2 = iens_offset + (ens_size - iens_offset) / (num_cpu_threads - icpu); - iens_offset = serialize_info[icpu].iens2; - } - serialize_info[num_cpu_threads - 1].iens2 = ens_size; - return serialize_info; -} - -static module_info_type * enkf_main_module_info_alloc( const local_ministep_type* ministep, - const obs_data_type * obs_data, - const local_dataset_type * dataset , - const local_obsdata_type * local_obsdata , - int * active_size , - int * row_offset) -{ - // Create and initialize the module_info instance. - module_info_type * module_info = module_info_alloc(local_ministep_get_name(ministep)); - - { /* Init data blocks in module_info */ - stringlist_type * update_keys = local_dataset_alloc_keys( dataset ); - const int num_kw = stringlist_get_size( update_keys ); - module_data_block_vector_type * module_data_block_vector = module_info_get_data_block_vector(module_info); - - for (int ikw=0; ikw < num_kw; ikw++) { - const char * key = stringlist_iget(update_keys , ikw); - const active_list_type * active_list = local_dataset_get_node_active_list( dataset , key ); - const module_data_block_type * data_block = module_data_block_alloc( key, active_list_get_active(active_list), row_offset[ikw], active_size[ikw] ); - module_data_block_vector_add_data_block(module_data_block_vector, data_block); - } - stringlist_free( update_keys ); - } - - - { /* Init obs blocks in module_info */ - module_obs_block_vector_type * module_obs_block_vector = module_info_get_obs_block_vector ( module_info ); - int current_row = 0; - for (int block_nr = 0; block_nr < local_obsdata_get_size( local_obsdata ); block_nr++) { - const obs_block_type * obs_block = obs_data_iget_block_const( obs_data , block_nr); - int total_size = obs_block_get_size(obs_block); - local_obsdata_node_type * node = local_obsdata_iget ( local_obsdata, block_nr ); - const char * key = local_obsdata_node_get_key ( node ); - const active_list_type * active_list = local_obsdata_node_get_active_list( node ); - int n_active = active_list_get_active_size(active_list, total_size); - module_obs_block_type * module_obs_block = module_obs_block_alloc(key, active_list_get_active(active_list), current_row, n_active); - module_obs_block_vector_add_obs_block ( module_obs_block_vector, module_obs_block ); - current_row += n_active; - } - } - - return module_info; -} - -static void enkf_main_module_info_free( module_info_type * module_info ) { - free( module_info ); -} - -void enkf_main_fprintf_PC(const char * filename , - matrix_type * PC , - matrix_type * PC_obs) { - - FILE * stream = util_mkdir_fopen(filename , "w"); - const int num_PC = matrix_get_rows( PC ); - const int ens_size = matrix_get_columns( PC ); - int ipc,iens; - - for (ipc = 0; ipc < num_PC; ipc++) - fprintf(stream , "%10.6f " , matrix_iget( PC_obs , ipc , 0)); - fprintf(stream , "\n"); - - for (iens = 0; iens < ens_size; iens++) { - for (ipc = 0; ipc < num_PC; ipc++) - fprintf(stream ,"%10.6f " , matrix_iget( PC , ipc, iens )); - fprintf(stream , "\n"); - } - fclose( stream ); -} - - -void enkf_main_get_PC( const matrix_type * S, - const matrix_type * dObs, - double truncation , - int ncomp , - matrix_type * PC , - matrix_type * PC_obs , - double_vector_type * singular_values) { - - enkf_linalg_get_PC( S , dObs , truncation , ncomp , PC , PC_obs , singular_values); -} - - - - - - - -static void assert_matrix_size(const matrix_type * m , const char * name , int rows , int columns) { - if (m) { - if (!matrix_check_dims(m , rows , columns)) - util_abort("%s: matrix mismatch %s:[%d,%d] - expected:[%d, %d]", __func__ , name , matrix_get_rows(m) , matrix_get_columns(m) , rows , columns); - } else - util_abort("%s: matrix:%s is NULL \n",__func__ , name); -} - -static void assert_size_equal(int ens_size , const bool_vector_type * ens_mask) { - if (bool_vector_size( ens_mask ) != ens_size) - util_abort("%s: fundamental inconsistency detected. Total ens_size:%d mask_size:%d \n",__func__ , ens_size , bool_vector_size( ens_mask )); -} - - -static void enkf_main_analysis_update( enkf_main_type * enkf_main , - enkf_fs_type * target_fs , - const bool_vector_type * ens_mask , - int target_step , - hash_type * use_count, - run_mode_type run_mode , - int step1 , - int step2 , - const local_ministep_type * ministep , - const meas_data_type * forecast , - obs_data_type * obs_data) { - - const int cpu_threads = 4; - const int matrix_start_size = 250000; - thread_pool_type * tp = thread_pool_alloc( cpu_threads , false ); - int active_ens_size = meas_data_get_active_ens_size( forecast ); - int active_size = obs_data_get_active_size( obs_data ); - matrix_type * X = matrix_alloc( active_ens_size , active_ens_size ); - matrix_type * S = meas_data_allocS( forecast ); - matrix_type * R = obs_data_allocR( obs_data ); - matrix_type * dObs = obs_data_allocdObs( obs_data ); - matrix_type * A = matrix_alloc( matrix_start_size , active_ens_size ); - matrix_type * E = NULL; - matrix_type * D = NULL; - matrix_type * localA = NULL; - int_vector_type * iens_active_index = bool_vector_alloc_active_index_list(ens_mask , -1); - - analysis_module_type * module = analysis_config_get_active_module( enkf_main->analysis_config ); - if ( local_ministep_has_analysis_module (ministep)) - module = local_ministep_get_analysis_module (ministep); - - assert_matrix_size(X , "X" , active_ens_size , active_ens_size); - assert_matrix_size(S , "S" , active_size , active_ens_size); - assert_matrix_size(R , "R" , active_size , active_size); - assert_size_equal( enkf_main_get_ensemble_size( enkf_main ) , ens_mask ); - - if (analysis_module_check_option( module , ANALYSIS_NEED_ED)) { - E = obs_data_allocE( obs_data , enkf_main->rng , active_ens_size ); - D = obs_data_allocD( obs_data , E , S ); - - assert_matrix_size( E , "E" , active_size , active_ens_size); - assert_matrix_size( D , "D" , active_size , active_ens_size); - } - - if (analysis_module_check_option( module , ANALYSIS_SCALE_DATA)) - obs_data_scale( obs_data , S , E , D , R , dObs ); - - if (analysis_module_check_option( module , ANALYSIS_USE_A) || analysis_module_check_option(module , ANALYSIS_UPDATE_A)) - localA = A; - - /*****************************************************************/ - - analysis_module_init_update( module , ens_mask , S , R , dObs , E , D ); - { - hash_iter_type * dataset_iter = local_ministep_alloc_dataset_iter( ministep ); - serialize_info_type * serialize_info = serialize_info_alloc( target_fs, //src_fs - we have already copied the parameters from the src_fs to the target_fs - target_fs , - iens_active_index, - target_step , - enkf_main_get_ensemble( enkf_main ) , - run_mode , - step2 , - A , - cpu_threads); - - - // Store PC: - if (analysis_config_get_store_PC( enkf_main->analysis_config )) { - double truncation = -1; - int ncomp = active_ens_size - 1; - matrix_type * PC = matrix_alloc(1,1); - matrix_type * PC_obs = matrix_alloc(1,1); - double_vector_type * singular_values = double_vector_alloc(0,0); - local_obsdata_type * obsdata = local_ministep_get_obsdata( ministep ); - const char * obsdata_name = local_obsdata_get_name( obsdata ); - - enkf_main_get_PC( S , dObs , truncation , ncomp , PC , PC_obs , singular_values); - { - char * filename = util_alloc_sprintf(analysis_config_get_PC_filename( enkf_main->analysis_config ) , step1 , step2 , obsdata_name); - char * full_path = util_alloc_filename( analysis_config_get_PC_path( enkf_main->analysis_config) , filename , NULL ); - - enkf_main_fprintf_PC( full_path , PC , PC_obs); - - free( full_path ); - free( filename ); - } - matrix_free( PC ); - matrix_free( PC_obs ); - double_vector_free( singular_values ); - } - - if (localA == NULL) - analysis_module_initX( module , X , NULL , S , R , dObs , E , D ); - - - while (!hash_iter_is_complete( dataset_iter )) { - const char * dataset_name = hash_iter_get_next_key( dataset_iter ); - const local_dataset_type * dataset = local_ministep_get_dataset( ministep , dataset_name ); - if (local_dataset_get_size( dataset )) { - int * active_size = util_calloc( local_dataset_get_size( dataset ) , sizeof * active_size ); - int * row_offset = util_calloc( local_dataset_get_size( dataset ) , sizeof * row_offset ); - local_obsdata_type * local_obsdata = local_ministep_get_obsdata( ministep ); - - enkf_main_serialize_dataset( enkf_main->ensemble_config , dataset , step2 , use_count , active_size , row_offset , tp , serialize_info); - module_info_type * module_info = enkf_main_module_info_alloc(ministep, obs_data, dataset, local_obsdata, active_size , row_offset); - - if (analysis_module_check_option( module , ANALYSIS_UPDATE_A)){ - if (analysis_module_check_option( module , ANALYSIS_ITERABLE)){ - analysis_module_updateA( module , localA , S , R , dObs , E , D , module_info ); - } - else - analysis_module_updateA( module , localA , S , R , dObs , E , D , module_info ); - } - else { - if (analysis_module_check_option( module , ANALYSIS_USE_A)){ - analysis_module_initX( module , X , localA , S , R , dObs , E , D ); - } - - matrix_inplace_matmul_mt2( A , X , tp ); - } - - // The deserialize also calls enkf_node_store() functions. - enkf_main_deserialize_dataset( enkf_main_get_ensemble_config( enkf_main ) , dataset , active_size , row_offset , serialize_info , tp); - - free( active_size ); - free( row_offset ); - enkf_main_module_info_free( module_info ); - } - } - hash_iter_free( dataset_iter ); - serialize_info_free( serialize_info ); - } - analysis_module_complete_update( module ); - - - /*****************************************************************/ - - int_vector_free(iens_active_index); - matrix_safe_free( E ); - matrix_safe_free( D ); - matrix_free( S ); - matrix_free( R ); - matrix_free( dObs ); - matrix_free( X ); - matrix_free( A ); -} - - - -// Opens and returns a log file. A subroutine of enkf_main_UPDATE. -static FILE * enkf_main_log_step_list(enkf_main_type * enkf_main, const int_vector_type * step_list) { - const char * log_path = analysis_config_get_log_path(enkf_main->analysis_config); - char * log_file; - if (int_vector_size(step_list) == 1) - log_file = util_alloc_sprintf("%s%c%04d", log_path, UTIL_PATH_SEP_CHAR, int_vector_iget(step_list, 0)); - else - log_file = util_alloc_sprintf("%s%c%04d-%04d", log_path, UTIL_PATH_SEP_CHAR, int_vector_iget(step_list, 0), - int_vector_get_last(step_list)); - FILE * log_stream = util_fopen(log_file, "w"); - - free(log_file); - return log_stream; -} - - -/** - * This is THE ENKF update function. It should only be called from enkf_main_UPDATE. - */ -static void enkf_main_update__(enkf_main_type * enkf_main, const int_vector_type * step_list, enkf_fs_type * source_fs, - enkf_fs_type * target_fs, int target_step, run_mode_type run_mode, state_map_type * source_state_map, - const analysis_config_type * analysis_config, const local_updatestep_type * updatestep, - const int total_ens_size) -{ - /* - Observations and measurements are collected in these temporary - structures. obs_data is a precursor for the 'd' vector, and - meas_data is a precursor for the 'S' matrix'. - - The reason for going via these temporary structures is to support - deactivating observations which should not be used in the update - process. - */ - bool_vector_type * ens_mask = bool_vector_alloc(total_ens_size, false); - state_map_select_matching(source_state_map, ens_mask, STATE_HAS_DATA); - - double global_std_scaling = analysis_config_get_global_std_scaling(analysis_config); - obs_data_type * obs_data = obs_data_alloc(global_std_scaling); - meas_data_type * meas_data = meas_data_alloc(ens_mask); - - - int_vector_type * ens_active_list = bool_vector_alloc_active_list(ens_mask); - - /* Copy all the parameter nodes from source case to target case; - nodes which are updated will be fetched from the new target - case, and nodes which are not updated will be manually copied - over there. - */ - if (target_fs != source_fs) { - stringlist_type * param_keys = ensemble_config_alloc_keylist_from_var_type(enkf_main->ensemble_config, PARAMETER); - for (int i = 0; i < stringlist_get_size(param_keys); i++) { - const char * key = stringlist_iget(param_keys, i); - enkf_config_node_type * config_node = ensemble_config_get_node(enkf_main->ensemble_config, key); - enkf_node_type * data_node = enkf_node_alloc(config_node); - for (int j = 0; j < int_vector_size(ens_active_list); j++) { - node_id_type node_id = { .iens = int_vector_iget(ens_active_list, j), .report_step = 0 }; - enkf_node_load(data_node, source_fs, node_id); - enkf_node_store(data_node, target_fs, false, node_id); - } - enkf_node_free(data_node); - } - stringlist_free(param_keys); - } - - FILE * log_stream = enkf_main_log_step_list(enkf_main, step_list); - - int current_step = int_vector_get_last(step_list); - hash_type * use_count = hash_alloc(); - - /* Looping over local analysis ministep */ - for (int ministep_nr = 0; ministep_nr < local_updatestep_get_num_ministep(updatestep); ministep_nr++) { - local_ministep_type * ministep = local_updatestep_iget_ministep(updatestep, ministep_nr); - local_obsdata_type * obsdata = local_ministep_get_obsdata(ministep); - - obs_data_reset(obs_data); - meas_data_reset(meas_data); - - /* - Temporarily we will just force the timestep from the input - argument onto the obsdata instance; in the future the - obsdata should hold it's own here. - */ - local_obsdata_reset_tstep_list(obsdata, step_list); - - if (analysis_config_get_std_scale_correlated_obs(enkf_main->analysis_config)) { - double scale_factor = enkf_obs_scale_correlated_std(enkf_main->obs, source_fs, ens_active_list, obsdata); - ert_log_add_fmt_message(1, NULL, "Scaling standard deviation in obdsata set:%s with %g", - local_obsdata_get_name(obsdata), scale_factor); - } - - enkf_obs_get_obs_and_measure_data(enkf_main->obs, source_fs, obsdata, ens_active_list, meas_data, obs_data); - int_vector_free(ens_active_list); - - - double alpha = analysis_config_get_alpha(enkf_main->analysis_config); - double std_cutoff = analysis_config_get_std_cutoff(enkf_main->analysis_config); - enkf_analysis_deactivate_outliers(obs_data, meas_data, std_cutoff, alpha, enkf_main->verbose); - - if (enkf_main->verbose) - enkf_analysis_fprintf_obs_summary(obs_data, meas_data, step_list, local_ministep_get_name(ministep), stdout); - enkf_analysis_fprintf_obs_summary(obs_data, meas_data, step_list, local_ministep_get_name(ministep), log_stream); - - if ((obs_data_get_active_size(obs_data) > 0) && (meas_data_get_active_obs_size(meas_data) > 0)) - enkf_main_analysis_update(enkf_main, - target_fs, - ens_mask, - target_step, - use_count, - run_mode, - int_vector_get_first(step_list), - current_step, - ministep, - meas_data, - obs_data); - else if (target_fs != source_fs) - ert_log_add_fmt_message(1, stderr, "No active observations/parameters for MINISTEP: %s.", - local_ministep_get_name(ministep)); - } - fclose(log_stream); - - obs_data_free(obs_data); - meas_data_free(meas_data); - - enkf_main_inflate(enkf_main, source_fs, target_fs, current_step, use_count); - hash_free(use_count); - - state_map_type * target_state_map = enkf_fs_get_state_map(target_fs); - - if (target_state_map != source_state_map) { - state_map_set_from_inverted_mask(target_state_map, ens_mask, STATE_PARENT_FAILURE); - state_map_set_from_mask(target_state_map, ens_mask, STATE_INITIALIZED); - enkf_fs_fsync(target_fs); - } - - bool_vector_free( ens_mask); -} - - -/** - * This is T H E EnKF update routine. - */ -bool enkf_main_UPDATE(enkf_main_type * enkf_main , const int_vector_type * step_list, enkf_fs_type * source_fs , enkf_fs_type * target_fs , int target_step , run_mode_type run_mode) { - /* - If merge_observations is true all observations in the time - interval [step1+1,step2] will be used, otherwise only the last - observation at step2 will be used. - */ - - state_map_type * source_state_map = enkf_fs_get_state_map( source_fs ); - const analysis_config_type * analysis_config = enkf_main_get_analysis_config( enkf_main ); - const int active_ens_size = state_map_count_matching( source_state_map , STATE_HAS_DATA ); - const int total_ens_size = enkf_main_get_ensemble_size(enkf_main); - - // exit if not enough realisations - if (!analysis_config_have_enough_realisations(analysis_config , active_ens_size, total_ens_size)) { - fprintf(stderr,"** ERROR ** There are %d active realisations left, which is less than the minimum specified - stopping assimilation.\n" , - active_ens_size ); - return false; - } - - local_config_type * local_config = enkf_main->local_config; - const local_updatestep_type * updatestep = local_config_get_updatestep( local_config ); - - // exit if multi step update - if ((local_updatestep_get_num_ministep( updatestep ) > 1) && - (analysis_config_get_module_option( analysis_config , ANALYSIS_ITERABLE))) { - util_exit("** ERROR: Can not combine iterable modules with multi step updates - sorry\n"); - } - - enkf_main_update__(enkf_main, - step_list, - source_fs, - target_fs, - target_step, - run_mode, - source_state_map, - analysis_config, - updatestep, - total_ens_size); - - return true; -} - - - - - - -static bool enkf_main_smoother_update__(enkf_main_type * enkf_main , const int_vector_type * step_list , enkf_fs_type * source_fs, enkf_fs_type * target_fs) { - return enkf_main_UPDATE( enkf_main , step_list , source_fs , target_fs , 0 , SMOOTHER_UPDATE ); -} - - -bool enkf_main_smoother_update(enkf_main_type * enkf_main , enkf_fs_type * source_fs, enkf_fs_type * target_fs) { - int stride = 1; - int step2; - time_map_type * time_map = enkf_fs_get_time_map( source_fs ); - int_vector_type * step_list; - bool update_done; - - step2 = time_map_get_last_step( time_map ); - if (step2 < 0) - step2 = model_config_get_last_history_restart( enkf_main->model_config ); - - step_list = enkf_main_update_alloc_step_list( enkf_main , 0 , step2 , stride); - update_done = enkf_main_smoother_update__( enkf_main , step_list , source_fs, target_fs ); - int_vector_free( step_list ); - - return update_done; -} - - -static void enkf_main_monitor_job_queue ( const enkf_main_type * enkf_main) { - analysis_config_type * analysis_config = enkf_main_get_analysis_config( enkf_main ); - if (analysis_config_get_stop_long_running(analysis_config)) { - job_queue_type * job_queue = site_config_get_job_queue(enkf_main->site_config); - - bool cont = true; - while (cont) { - //Check if minimum number of realizations have run, and if so, kill the rest after a certain time - if (analysis_config_have_enough_realisations(analysis_config, job_queue_get_num_complete(job_queue), enkf_main_get_ensemble_size(enkf_main))) { - job_queue_set_auto_job_stop_time(job_queue); - cont = false; - } - - //Check if all possible successes satisfies the minimum number of realizations threshold. If not so, it is time to give up - int possible_successes = job_queue_get_num_running(job_queue) + - job_queue_get_num_waiting(job_queue) + - job_queue_get_num_pending(job_queue) + - job_queue_get_num_complete(job_queue); - - - if (analysis_config_have_enough_realisations(analysis_config, possible_successes, enkf_main_get_ensemble_size(enkf_main))) { - cont = false; - } - - if (cont) { - util_usleep(10000); - } - } - } -} - - - -void enkf_main_isubmit_job( enkf_main_type * enkf_main , run_arg_type * run_arg ) { - const ecl_config_type * ecl_config = enkf_main_get_ecl_config( enkf_main ); - enkf_state_type * enkf_state = enkf_main->ensemble[ run_arg_get_iens(run_arg) ]; - const member_config_type * member_config = enkf_state_get_member_config( enkf_state ); - const site_config_type * site_config = enkf_main_get_site_config( enkf_main ); - const char * job_script = site_config_get_job_script( site_config ); - job_queue_type * job_queue = site_config_get_job_queue( site_config ); - const char * run_path = run_arg_get_runpath( run_arg ); - - // The job_queue_node will take ownership of this arg_pack; and destroy it when - // the job_queue_node is discarded. - arg_pack_type * callback_arg = arg_pack_alloc(); - - /* - Prepare the job and submit it to the queue - */ - arg_pack_append_ptr( callback_arg , enkf_state ); - arg_pack_append_ptr( callback_arg , run_arg ); - - { - int queue_index = job_queue_add_job( job_queue , - job_script , - enkf_state_complete_forward_modelOK__ , - enkf_state_complete_forward_modelRETRY__ , - enkf_state_complete_forward_modelEXIT__, - callback_arg , - ecl_config_get_num_cpu( ecl_config ), - run_path , - member_config_get_jobname( member_config ) , - 1, - (const char *[1]) { run_path } ); - - run_arg_set_queue_index( run_arg , queue_index ); - run_arg_increase_submit_count( run_arg ); - } - -} - -void * enkf_main_icreate_run_path( enkf_main_type * enkf_main, run_arg_type * run_arg){ - enkf_state_type * enkf_state = enkf_main->ensemble[ run_arg_get_iens(run_arg) ]; - { - runpath_list_type * runpath_list = hook_manager_get_runpath_list( enkf_main->hook_manager ); - runpath_list_add( runpath_list , - run_arg_get_iens( run_arg ), - run_arg_get_iter( run_arg ), - run_arg_get_runpath( run_arg ), - enkf_state_get_eclbase( enkf_state )); - } - enkf_state_init_eclipse( enkf_state , run_arg ); - return NULL; -} - - -static void * enkf_main_create_run_path__( enkf_main_type * enkf_main, - const ert_init_context_type * init_context) { - - const bool_vector_type * iactive = ert_init_context_get_iactive(init_context); - const int active_ens_size = util_int_min( bool_vector_size( iactive ) , enkf_main_get_ensemble_size( enkf_main )); - int iens; - for (iens = 0; iens < active_ens_size; iens++) { - if (bool_vector_iget(iactive , iens)) { - run_arg_type * run_arg = ert_init_context_iens_get_arg( init_context , iens); - enkf_main_icreate_run_path(enkf_main, run_arg); - } - } - return NULL; -} - -void enkf_main_create_run_path(enkf_main_type * enkf_main , const bool_vector_type * iactive , int iter) { - init_mode_type init_mode = INIT_CONDITIONAL; - - enkf_main_init_internalization(enkf_main , init_mode); - { - stringlist_type * param_list = ensemble_config_alloc_keylist_from_var_type( enkf_main->ensemble_config , PARAMETER ); - enkf_main_initialize_from_scratch(enkf_main , - enkf_main_get_fs( enkf_main ), - param_list , - iactive, - init_mode); - stringlist_free( param_list ); - } - - - { - ert_init_context_type * init_context = enkf_main_alloc_ert_init_context( enkf_main , - enkf_main_get_fs( enkf_main ), - iactive , - init_mode , - iter ); - enkf_main_create_run_path__( enkf_main , init_context ); - ert_init_context_free( init_context ); - } - - - /* - The runpath_list is written to disk here, when all the simulation - folders have been created and filled with content. The - runpath_list instance is owned and managed by the hook manager; - could say that the responsability for writing that data should be - with the hook_manager? - */ - - { - runpath_list_type * runpath_list = hook_manager_get_runpath_list(enkf_main->hook_manager ); - runpath_list_fprintf( runpath_list ); - } -} - - - -void * enkf_main_isubmit_job__( void * arg ) { - arg_pack_type * arg_pack = arg_pack_safe_cast( arg ); - enkf_main_type * enkf_main = enkf_main_safe_cast( arg_pack_iget_ptr( arg_pack , 0 )); - run_arg_type * run_arg = run_arg_safe_cast( arg_pack_iget_ptr( arg_pack , 1)); - - enkf_main_isubmit_job( enkf_main , run_arg ); - return NULL; -} - - - - - -static void enkf_main_submit_jobs__( enkf_main_type * enkf_main , - const ert_run_context_type * run_context , - thread_pool_type * submit_threads, - arg_pack_type ** arg_pack_list) { - { - int iens; - const bool_vector_type * iactive = ert_run_context_get_iactive( run_context ); - const int active_ens_size = util_int_min( bool_vector_size( iactive ) , enkf_main_get_ensemble_size( enkf_main )); - - for (iens = 0; iens < active_ens_size; iens++) { - if (bool_vector_iget(iactive , iens)) { - run_arg_type * run_arg = ert_run_context_iens_get_arg( run_context , iens); - arg_pack_type * arg_pack = arg_pack_list[iens]; - - arg_pack_append_ptr( arg_pack , enkf_main ); - arg_pack_append_ptr( arg_pack , run_arg); - - run_arg_set_run_status( run_arg, JOB_SUBMITTED ); - thread_pool_add_job(submit_threads , enkf_main_isubmit_job__ , arg_pack); - } - } - } -} - - -void enkf_main_submit_jobs( enkf_main_type * enkf_main , - const ert_run_context_type * run_context) { - - int ens_size = enkf_main_get_ensemble_size( enkf_main ); - arg_pack_type ** arg_pack_list = util_malloc( ens_size * sizeof * arg_pack_list ); - thread_pool_type * submit_threads = thread_pool_alloc( 4 , true ); - runpath_list_type * runpath_list = hook_manager_get_runpath_list( enkf_main->hook_manager ); - int iens; - for (iens = 0; iens < ens_size; iens++) - arg_pack_list[iens] = arg_pack_alloc( ); - - runpath_list_clear( runpath_list ); - enkf_main_submit_jobs__(enkf_main , run_context , submit_threads , arg_pack_list); - - /* - After this join all directories/files for the simulations - have been set up correctly, and all the jobs have been added - to the job_queue manager. - */ - - thread_pool_join(submit_threads); - thread_pool_free(submit_threads); - - for (iens = 0; iens < ens_size; iens++) - arg_pack_free( arg_pack_list[iens] ); - free( arg_pack_list ); -} - - - -/** - The function will return number of non-failing jobs. -*/ - - -static int enkf_main_run_step(enkf_main_type * enkf_main , - ert_run_context_type * run_context) { - - if (ert_run_context_get_step1(run_context)) - ecl_config_assert_restart( enkf_main_get_ecl_config( enkf_main ) ); - - { - int job_size , iens; - bool verbose_queue = enkf_main->verbose; - const int active_ens_size = util_int_min( bool_vector_size( ert_run_context_get_iactive( run_context )) , enkf_main_get_ensemble_size( enkf_main )); - - state_map_deselect_matching( enkf_fs_get_state_map( ert_run_context_get_init_fs( run_context )) , - ert_run_context_get_iactive( run_context ), STATE_LOAD_FAILURE | STATE_PARENT_FAILURE); - - ert_log_add_fmt_message( 1 , NULL , "===================================================================", false); - - job_size = bool_vector_count_equal( ert_run_context_get_iactive(run_context) , true ); - { - job_queue_type * job_queue = site_config_get_job_queue(enkf_main->site_config); - job_queue_manager_type * queue_manager = job_queue_manager_alloc( job_queue ); - bool restart_queue = true; - - /* Start the queue */ - if (site_config_has_job_script( enkf_main->site_config )) - job_queue_manager_start_queue( queue_manager , job_size , verbose_queue , restart_queue); - else - util_exit("No job script specified, can not start any jobs. Use the key JOB_SCRIPT in the config file\n"); - - - enkf_main_submit_jobs( enkf_main , run_context ); - - - job_queue_submit_complete( job_queue ); - ert_log_add_message( 1 , NULL , "All jobs submitted to internal queue - waiting for completion" , false); - - int max_runtime = analysis_config_get_max_runtime(enkf_main_get_analysis_config( enkf_main )); - job_queue_set_max_job_duration(job_queue, max_runtime); - enkf_main_monitor_job_queue( enkf_main ); - - job_queue_manager_wait( queue_manager ); - job_queue_manager_free( queue_manager ); - } - - - /* This should be carefully checked for the situation where only a - subset (with offset > 0) of realisations are simulated. */ - - int totalOK = 0; - int totalFailed = 0; - for (iens = 0; iens < active_ens_size; iens++) { - if (bool_vector_iget(ert_run_context_get_iactive(run_context) , iens)) { - run_arg_type * run_arg = ert_run_context_iens_get_arg( run_context , iens ); - run_status_type run_status = run_arg_get_run_status( run_arg ); - - if ((run_status == JOB_LOAD_FAILURE) || (run_status == JOB_RUN_FAILURE)) { - ert_run_context_deactivate_realization(run_context, iens); - totalFailed++; - } - else { - totalOK++; - } - } - } - - enkf_fs_fsync( ert_run_context_get_result_fs( run_context ) ); - if (totalFailed == 0) - ert_log_add_fmt_message( 1 , NULL , "All jobs complete and data loaded."); - - - return totalOK; - } -} - -/** - The special value stride == 0 means to just include step2. -*/ -int_vector_type * enkf_main_update_alloc_step_list( const enkf_main_type * enkf_main , int load_start , int step2 , int stride) { - int_vector_type * step_list = int_vector_alloc( 0 , 0 ); - - if (step2 < load_start) - util_abort("%s: fatal internal error: Tried to make step list %d ... %d \n",__func__ , load_start , step2); - - if (stride == 0) - int_vector_append( step_list , step2 ); - else { - int step = util_int_max( 1 , load_start ); - while (true) { - int_vector_append( step_list , step ); - - if (step == step2) - break; - else { - step += stride; - if (step >= step2) { - int_vector_append( step_list , step2 ); - break; - } - } - - } - } - return step_list; -} - - - - -void * enkf_main_get_enkf_config_node_type(const ensemble_config_type * ensemble_config, const char * key){ - enkf_config_node_type * config_node_type = ensemble_config_get_node(ensemble_config, key); - return enkf_config_node_get_ref(config_node_type); -} - - -/** - This function will initialize the necessary enkf_main structures - before a run. Currently this means: - - 1. Set the enkf_sched instance - either by loading from file or - by using the default. - - 2. Set up the configuration of what should be internalized. - -*/ - - -void enkf_main_init_run( enkf_main_type * enkf_main, const ert_run_context_type * run_context, init_mode_type init_mode) { - enkf_main_init_internalization(enkf_main , ert_run_context_get_mode( run_context )); - { - stringlist_type * param_list = ensemble_config_alloc_keylist_from_var_type( enkf_main->ensemble_config , PARAMETER ); - enkf_main_initialize_from_scratch(enkf_main , - ert_run_context_get_init_fs( run_context ), - param_list , - ert_run_context_get_iactive( run_context ), - init_mode); - stringlist_free( param_list ); - } -} - - - - -void enkf_main_run_tui_exp(enkf_main_type * enkf_main , - bool_vector_type * iactive) { - - int active_before = bool_vector_count_equal(iactive, true); - hook_manager_type * hook_manager = enkf_main_get_hook_manager(enkf_main); - ert_run_context_type * run_context; - init_mode_type init_mode = INIT_CONDITIONAL; - int iter = 0; - - run_context = enkf_main_alloc_ert_run_context_ENSEMBLE_EXPERIMENT(enkf_main , - enkf_main_get_fs( enkf_main ) , - iactive , - iter ); - enkf_main_init_run( enkf_main , run_context , init_mode); - enkf_main_create_run_path( enkf_main , iactive , iter ); - hook_manager_run_workflows(hook_manager, PRE_SIMULATION, enkf_main); - enkf_main_run_step(enkf_main , run_context); - - int active_after = bool_vector_count_equal(iactive, true); - if (active_after == active_before) - hook_manager_run_workflows(hook_manager, POST_SIMULATION, enkf_main); - - ert_run_context_free( run_context ); -} - - - - -int enkf_main_run_simple_step(enkf_main_type * enkf_main , bool_vector_type * iactive , init_mode_type init_mode, int iter) { - ert_run_context_type * run_context = enkf_main_alloc_ert_run_context_ENSEMBLE_EXPERIMENT( enkf_main , - enkf_main_get_fs( enkf_main ) , - iactive , - iter ); - enkf_main_init_run( enkf_main , run_context , init_mode); - int successful_realizations = enkf_main_run_step( enkf_main , run_context ); - ert_run_context_free( run_context ); - - return successful_realizations; -} - - - -void enkf_main_run_smoother(enkf_main_type * enkf_main , enkf_fs_type * source_fs, const char * target_fs_name , bool_vector_type * iactive , int iter , bool rerun) { - analysis_config_type * analysis_config = enkf_main_get_analysis_config( enkf_main ); - if (!analysis_config_get_module_option( analysis_config , ANALYSIS_ITERABLE)) { - if (enkf_main_run_simple_step( enkf_main , iactive , INIT_CONDITIONAL, iter)) { - hook_manager_type * hook_manager = enkf_main_get_hook_manager(enkf_main); - hook_manager_run_workflows(hook_manager, POST_SIMULATION, enkf_main); - } - - { - enkf_fs_type * target_fs = enkf_main_mount_alt_fs( enkf_main , target_fs_name , true ); - bool update_done = enkf_main_smoother_update( enkf_main , source_fs , target_fs ); - - if (rerun) { - if (update_done) { - enkf_main_set_fs( enkf_main , target_fs , target_fs_name); - if (enkf_main_run_simple_step(enkf_main , iactive , INIT_NONE, iter + 1)) { - hook_manager_type * hook_manager = enkf_main_get_hook_manager(enkf_main); - hook_manager_run_workflows(hook_manager, POST_SIMULATION, enkf_main); - } - } else - fprintf(stderr,"** Warning: the analysis update failed - no rerun started.\n"); - } - enkf_fs_decref( target_fs ); - - } - } else - fprintf(stderr,"** ERROR: The normal smoother should not be combined with an iterable analysis module\n"); -} - - -static bool enkf_main_run_simulation_and_postworkflow(enkf_main_type * enkf_main, ert_run_context_type * run_context) { - bool ret = true; - analysis_config_type * analysis_config = enkf_main_get_analysis_config(enkf_main); - - int active_after_step = enkf_main_run_step(enkf_main , run_context); - if (analysis_config_have_enough_realisations(analysis_config, active_after_step, enkf_main_get_ensemble_size(enkf_main))) { - hook_manager_type * hook_manager = enkf_main_get_hook_manager(enkf_main); - hook_manager_run_workflows(hook_manager, POST_SIMULATION, enkf_main); - } else { - fprintf(stderr,"Simulation in iteration %d failed, stopping Iterated Ensemble Smoother\n", ert_run_context_get_iter( run_context )); - ret = false; - } - - return ret; -} - - -static bool enkf_main_run_analysis(enkf_main_type * enkf_main, enkf_fs_type * source_fs ,const char * target_fs_name, int iteration_number) { - bool updateOK = false; - analysis_config_type * analysis_config = enkf_main_get_analysis_config(enkf_main); - analysis_module_type * analysis_module = analysis_config_get_active_module(analysis_config); - int pre_iteration_number = analysis_module_get_int(analysis_module, "ITER"); - - if (target_fs_name == NULL){ - fprintf(stderr,"Sorry: the updated ensemble will overwrite the current case in the iterated ensemble smoother."); - printf("Running analysis on case %s, target case is %s\n", enkf_main_get_current_fs(enkf_main), enkf_main_get_current_fs(enkf_main)); - updateOK = enkf_main_smoother_update(enkf_main, source_fs, enkf_main_get_fs(enkf_main)); - } else { - enkf_fs_type * target_fs = enkf_main_mount_alt_fs(enkf_main , target_fs_name , true ); - updateOK = enkf_main_smoother_update(enkf_main, source_fs , target_fs); - enkf_fs_decref( target_fs ); - } - - int post_iteration_number = analysis_module_get_int(analysis_module, "ITER"); - - if (post_iteration_number <= pre_iteration_number) - updateOK = false; - - if (updateOK) { - enkf_fs_type * target_fs = enkf_main_mount_alt_fs(enkf_main , target_fs_name , true ); - cases_config_set_int(enkf_fs_get_cases_config(target_fs), "iteration_number", iteration_number+1); - enkf_fs_decref( target_fs ); - } - - return updateOK; -} - - -void enkf_main_run_iterated_ES(enkf_main_type * enkf_main, int num_iterations_to_run) { - const analysis_config_type * analysis_config = enkf_main_get_analysis_config(enkf_main); - - if (analysis_config_get_module_option( analysis_config , ANALYSIS_ITERABLE)) { - const int ens_size = enkf_main_get_ensemble_size(enkf_main); - bool_vector_type * iactive = bool_vector_alloc(ens_size , true); - enkf_fs_type * current_case = enkf_main_get_fs( enkf_main ); - analysis_iter_config_type * iter_config = analysis_config_get_iter_config(analysis_config); - int current_iteration = 0; - const char * initial_case_name = analysis_iter_config_iget_case( iter_config , current_iteration ); - - if (!util_string_equal( initial_case_name , enkf_fs_get_case_name( current_case ))) { - enkf_fs_type * initial_case = enkf_main_mount_alt_fs( enkf_main , initial_case_name , true); - enkf_main_init_case_from_existing(enkf_main, current_case, 0, initial_case); // ANALYZED argument removed. - enkf_main_set_fs( enkf_main , initial_case , NULL ); - enkf_fs_decref( initial_case ); - } - - { //Iteration 0 - ert_run_context_type * run_context = NULL; - enkf_main_init_run(enkf_main , run_context , INIT_CONDITIONAL ); - enkf_main_run_simulation_and_postworkflow(enkf_main, run_context); - ert_run_context_free( run_context ); - } - - { // Iteration 1 - num_iterations [iteration 1, num iterations] - int num_retries_per_iteration = analysis_iter_config_get_num_retries_per_iteration(iter_config); - int num_tries = 0; - enkf_fs_type * source_fs = enkf_main_get_fs( enkf_main ); - current_iteration = 1; - - while ((current_iteration <= num_iterations_to_run) && (num_tries < num_retries_per_iteration)) { - ert_run_context_type * run_context = NULL; - - const char * target_fs_name = analysis_iter_config_iget_case( iter_config , current_iteration ); - - if (enkf_main_run_analysis(enkf_main, source_fs, target_fs_name, current_iteration)) { - enkf_main_select_fs(enkf_main, target_fs_name); - if (!enkf_main_run_simulation_and_postworkflow(enkf_main, run_context )) - break; - num_tries = 0; - ++current_iteration; - } else { - fprintf(stderr, "\nAnalysis failed, rerunning simulation on changed initial parameters\n"); - enkf_fs_type * target_fs = enkf_main_mount_alt_fs( enkf_main , target_fs_name , false ); - enkf_main_init_current_case_from_existing(enkf_main, target_fs, 0); // ANALYZED argument removed - enkf_fs_decref(target_fs); - ++num_tries; - - if (!enkf_main_run_simulation_and_postworkflow(enkf_main, run_context )) - //if (!enkf_main_run_simulation_and_postworkflow(enkf_main, current_iteration-1, iactive)) - break; - } - - ert_run_context_free( run_context ); - } - } - - bool_vector_free(iactive); - } else - fprintf(stderr,"** ERROR: The current analysis module:%s can not be used for iterations \n", analysis_config_get_active_module_name( analysis_config )); -} - - -ert_run_context_type * enkf_main_alloc_ert_run_context_ENSEMBLE_EXPERIMENT(const enkf_main_type * enkf_main , enkf_fs_type * fs , bool_vector_type * iactive , int iter) { - return ert_run_context_alloc_ENSEMBLE_EXPERIMENT( fs , iactive , model_config_get_runpath_fmt( enkf_main->model_config ) , enkf_main->subst_list , iter ); -} - -ert_init_context_type * enkf_main_alloc_ert_init_context(const enkf_main_type * enkf_main , enkf_fs_type * fs, const bool_vector_type * iactive , init_mode_type init_mode , int iter) { - return ert_init_context_alloc( fs, iactive , model_config_get_runpath_fmt( enkf_main->model_config ) , enkf_main->subst_list , init_mode , iter ); -} - - - - -/** - This function creates a local_config file corresponding to the - default 'ALL_ACTIVE' configuration. We eat our own dogshit around - here... -*/ - -void enkf_main_create_all_active_config( const enkf_main_type * enkf_main) { - - - bool single_node_update = analysis_config_get_single_node_update( enkf_main->analysis_config ); - local_config_type * local_config = enkf_main->local_config; - local_config_clear( local_config ); - { - local_updatestep_type * default_step = local_config_get_updatestep(local_config); - local_ministep_type * ministep = local_config_alloc_ministep( local_config , "ALL_ACTIVE", NULL); - local_obsdata_type * obsdata = local_config_alloc_obsdata(local_config, "ALL_OBS"); - local_dataset_type * all_active_dataset = local_config_alloc_dataset(local_config, "ALL_DATA"); - - local_updatestep_add_ministep( default_step , ministep ); - - /* Adding all observation keys */ - { - hash_iter_type * obs_iter = enkf_obs_alloc_iter( enkf_main->obs ); - while ( !hash_iter_is_complete(obs_iter) ) { - const char * obs_key = hash_iter_get_next_key( obs_iter ); - local_obsdata_node_type * obsdata_node = local_obsdata_node_alloc( obs_key , true ); - local_obsdata_add_node(obsdata, obsdata_node ); - } - local_ministep_add_obsdata(ministep, obsdata); - hash_iter_free( obs_iter ); - } - - /* Adding all node which can be updated. */ - { - stringlist_type * keylist = ensemble_config_alloc_keylist_from_var_type( enkf_main->ensemble_config , PARAMETER); - int i; - for (i = 0; i < stringlist_get_size( keylist ); i++) { - const char * key = stringlist_iget( keylist , i); - bool add_node = true; - - /* - Make sure the funny GEN_KW instance masquerading as - SCHEDULE_PREDICTION_FILE is not added to the soup. - */ - if (util_string_equal(key , "PRED")) - add_node = false; - - - if (add_node) { - if (single_node_update) { - local_dataset_type * this_dataset = local_config_alloc_dataset(local_config, key); - local_dataset_add_node(this_dataset, key); - local_ministep_add_dataset(ministep, this_dataset); - } - local_dataset_add_node(all_active_dataset, key); - } - } - stringlist_free( keylist); - } - if (!single_node_update) - local_ministep_add_dataset(ministep, all_active_dataset); - - } -} - - - - -static void enkf_main_init_user_config( const enkf_main_type * enkf_main , config_parser_type * config ) { - config_schema_item_type * item; - - /*****************************************************************/ - /* config_add_schema_item(): */ - /* */ - /* 1. boolean - required? */ - /*****************************************************************/ - - ert_workflow_list_add_config_items( config ); - plot_config_add_config_items( config ); - analysis_config_add_config_items( config ); - ensemble_config_add_config_items( config ); - ecl_config_add_config_items( config ); - rng_config_add_config_items( config ); - - /*****************************************************************/ - /* Required keywords from the ordinary model_config file */ - - item = config_add_schema_item(config , CASE_TABLE_KEY , false ); - config_schema_item_set_argc_minmax(item , 1 , 1); - config_schema_item_iset_type( item , 0 , CONFIG_EXISTING_PATH ); - - config_add_key_value( config , LOG_LEVEL_KEY , false , CONFIG_INT); - config_add_key_value( config , LOG_FILE_KEY , false , CONFIG_STRING); - - config_add_key_value(config , MAX_RESAMPLE_KEY , false , CONFIG_INT); - - - item = config_add_schema_item(config , NUM_REALIZATIONS_KEY , true ); - config_schema_item_set_argc_minmax(item , 1 , 1); - config_schema_item_iset_type( item , 0 , CONFIG_INT ); - config_add_alias(config , NUM_REALIZATIONS_KEY , "SIZE"); - config_add_alias(config , NUM_REALIZATIONS_KEY , "NUM_REALISATIONS"); - config_install_message(config , "SIZE" , "** Warning: \'SIZE\' is depreceated - use \'NUM_REALIZATIONS\' instead."); - - - /*****************************************************************/ - /* Optional keywords from the model config file */ - - item = config_add_schema_item( config , RUN_TEMPLATE_KEY , false ); - config_schema_item_set_argc_minmax(item , 2 , CONFIG_DEFAULT_ARG_MAX ); - config_schema_item_iset_type( item , 0 , CONFIG_EXISTING_PATH ); - - config_add_key_value(config , RUNPATH_KEY , false , CONFIG_STRING); - - item = config_add_schema_item(config , ENSPATH_KEY , false ); - config_schema_item_set_argc_minmax(item , 1 , 1 ); - - item = config_add_schema_item( config , JOBNAME_KEY , false ); - config_schema_item_set_argc_minmax(item , 1 , 1 ); - - item = config_add_schema_item(config , DBASE_TYPE_KEY , false ); - config_schema_item_set_argc_minmax(item , 1, 1 ); - config_schema_item_set_common_selection_set(item , 2 , (const char *[2]) {"PLAIN" , "BLOCK_FS"}); - - item = config_add_schema_item(config , FORWARD_MODEL_KEY , false ); - config_schema_item_set_argc_minmax(item , 1 , CONFIG_DEFAULT_ARG_MAX); - - item = config_add_schema_item(config , DATA_KW_KEY , false ); - config_schema_item_set_argc_minmax(item , 2 , 2); - - config_add_key_value(config , PRE_CLEAR_RUNPATH_KEY , false , CONFIG_BOOL); - - item = config_add_schema_item(config , DELETE_RUNPATH_KEY , false ); - config_schema_item_set_argc_minmax(item , 1 , CONFIG_DEFAULT_ARG_MAX); - - item = config_add_schema_item(config , OBS_CONFIG_KEY , false ); - config_schema_item_set_argc_minmax(item , 1 , 1 ); - config_schema_item_iset_type( item , 0 , CONFIG_EXISTING_PATH ); - - config_add_key_value(config , TIME_MAP_KEY , false , CONFIG_EXISTING_PATH); - - item = config_add_schema_item(config , RFT_CONFIG_KEY , false ); - config_schema_item_set_argc_minmax(item , 1 , 1 ); - config_schema_item_iset_type( item , 0 , CONFIG_EXISTING_PATH ); - - item = config_add_schema_item(config , RFTPATH_KEY , false ); - config_schema_item_set_argc_minmax(item , 1 , 1 ); - - item = config_add_schema_item(config, GEN_KW_EXPORT_FILE_KEY, false ); - config_schema_item_set_argc_minmax(item , 1 , 1 ); - - item = config_add_schema_item(config , LOCAL_CONFIG_KEY , false ); - config_schema_item_set_argc_minmax(item , 1 , 1 ); - config_schema_item_iset_type( item , 0 , CONFIG_EXISTING_PATH ); - - { - stringlist_type * refcase_dep = stringlist_alloc_argv_ref( (const char *[1]) { REFCASE_KEY } , 1); - - item = config_add_schema_item(config , HISTORY_SOURCE_KEY , false ); - config_schema_item_set_argc_minmax(item , 1 , 1); - config_schema_item_set_common_selection_set(item , 3 , (const char *[3]) {"SCHEDULE" , "REFCASE_SIMULATED" , "REFCASE_HISTORY"}); - config_schema_item_set_required_children_on_value(item , "REFCASE_SIMULATED" , refcase_dep); - config_schema_item_set_required_children_on_value(item , "REFCASE_HISTORY" , refcase_dep); - - stringlist_free(refcase_dep); - } - - hook_manager_add_config_items( config ); -} - - -keep_runpath_type enkf_main_iget_keep_runpath( const enkf_main_type * enkf_main , int iens ) { - return enkf_state_get_keep_runpath( enkf_main->ensemble[iens] ); -} - -void enkf_main_iset_keep_runpath( enkf_main_type * enkf_main , int iens , keep_runpath_type keep_runpath) { - enkf_state_set_keep_runpath( enkf_main->ensemble[iens] , keep_runpath); -} - -void enkf_main_set_verbose( enkf_main_type * enkf_main , bool verbose) { - enkf_main->verbose = verbose; -} - - -bool enkf_main_get_verbose( const enkf_main_type * enkf_main ) { - return enkf_main->verbose; -} - -/** - Observe that this function parses and TEMPORARILY stores the keep_runpath - information ion the enkf_main object. This is subsequently passed on the - enkf_state members, and the functions enkf_main_iget_keep_runpath() and - enkf_main_iset_keep_runpath() act on the enkf_state objects, and not on the - internal keep_runpath field of the enkf_main object (what a fxxxing mess). -*/ - - -void enkf_main_parse_keep_runpath(enkf_main_type * enkf_main , const char * delete_runpath_string , int ens_size ) { - - int i; - for (i = 0; i < ens_size; i++) - int_vector_iset( enkf_main->keep_runpath , i , DEFAULT_KEEP); - - { - int_vector_type * active_list = string_util_alloc_active_list(delete_runpath_string); - - for (i = 0; i < int_vector_size( active_list ); i++) - int_vector_iset( enkf_main->keep_runpath , int_vector_iget( active_list , i ) , EXPLICIT_DELETE); - - int_vector_free( active_list ); - } -} - - - -/** - There is NO tagging anymore - if the user wants tags - the user - supplies the key __WITH__ tags. -*/ -void enkf_main_add_data_kw(enkf_main_type * enkf_main , const char * key , const char * value) { - subst_list_append_copy( enkf_main->subst_list , key , value , "Supplied by the user in the configuration file."); -} - - -void enkf_main_data_kw_fprintf_config( const enkf_main_type * enkf_main , FILE * stream ) { - for (int i = 0; i < subst_list_get_size( enkf_main->subst_list ); i++) { - fprintf(stream , CONFIG_KEY_FORMAT , DATA_KW_KEY ); - fprintf(stream , CONFIG_VALUE_FORMAT , subst_list_iget_key( enkf_main->subst_list , i )); - fprintf(stream , CONFIG_ENDVALUE_FORMAT , subst_list_iget_value( enkf_main->subst_list , i )); - } -} - - -void enkf_main_clear_data_kw( enkf_main_type * enkf_main ) { - subst_list_clear( enkf_main->subst_list ); -} - -static void enkf_main_add_subst_kw( enkf_main_type * enkf_main , const char * key , const char * value, const char * help_text , bool insert_copy) { - char * tagged_key = util_alloc_sprintf( INTERNAL_DATA_KW_TAG_FORMAT , key ); - - if (insert_copy) - subst_list_append_owned_ref( enkf_main->subst_list , tagged_key , util_alloc_string_copy( value ), help_text); - else - subst_list_append_ref( enkf_main->subst_list , tagged_key , value , help_text); - - free(tagged_key); -} - - -static void enkf_main_init_hook_manager( enkf_main_type * enkf_main , config_content_type * config ) { - hook_manager_init( enkf_main->hook_manager , config ); -} - -static void enkf_main_init_subst_list( enkf_main_type * enkf_main ) { - /* Here we add the functions which should be available for string substitution operations. */ - subst_func_pool_add_func( enkf_main->subst_func_pool , "EXP" , "exp" , subst_func_exp , false , 1 , 1 , NULL); - subst_func_pool_add_func( enkf_main->subst_func_pool , "LOG" , "log" , subst_func_log , false , 1 , 1 , NULL); - subst_func_pool_add_func( enkf_main->subst_func_pool , "POW10" , "Calculates 10^x" , subst_func_pow10 , false , 1 , 1 , NULL); - subst_func_pool_add_func( enkf_main->subst_func_pool , "ADD" , "Adds arguments" , subst_func_add , true , 1 , 0 , NULL); - subst_func_pool_add_func( enkf_main->subst_func_pool , "MUL" , "Multiplies arguments" , subst_func_mul , true , 1 , 0 , NULL); - subst_func_pool_add_func( enkf_main->subst_func_pool , "RANDINT" , "Returns a random integer - 32 bit" , subst_func_randint , false , 0 , 0 , enkf_main->rng); - subst_func_pool_add_func( enkf_main->subst_func_pool , "RANDFLOAT" , "Returns a random float 0-1." , subst_func_randfloat , false , 0 , 0 , enkf_main->rng); - - /** - Allocating the parent subst_list instance. This will (should ...) - be the top level subst instance for all substitions in the ert - program. - - All the functions available or only installed in this - subst_list. - - The key->value replacements installed in this instance are - key,value pairs which are: - - o Common to all ensemble members. - - o Constant in time. - */ - - - /* Installing the functions. */ - subst_list_insert_func( enkf_main->subst_list , "EXP" , "__EXP__"); - subst_list_insert_func( enkf_main->subst_list , "LOG" , "__LOG__"); - subst_list_insert_func( enkf_main->subst_list , "POW10" , "__POW10__"); - subst_list_insert_func( enkf_main->subst_list , "ADD" , "__ADD__"); - subst_list_insert_func( enkf_main->subst_list , "MUL" , "__MUL__"); - subst_list_insert_func( enkf_main->subst_list , "RANDINT" , "__RANDINT__"); - subst_list_insert_func( enkf_main->subst_list , "RANDFLOAT" , "__RANDFLOAT__"); -} - - - -enkf_main_type * enkf_main_alloc_empty( ) { - enkf_main_type * enkf_main = util_malloc(sizeof * enkf_main); - UTIL_TYPE_ID_INIT(enkf_main , ENKF_MAIN_ID); - ert_log_open_empty(); - enkf_main->ensemble = NULL; - enkf_main->user_config_file = NULL; - enkf_main->site_config_file = NULL; - enkf_main->rft_config_file = NULL; - enkf_main->local_config = NULL; - enkf_main->rng = NULL; - enkf_main->ens_size = 0; - enkf_main->keep_runpath = int_vector_alloc( 0 , DEFAULT_KEEP ); - enkf_main->rng_config = rng_config_alloc( ); - enkf_main->site_config = site_config_alloc_empty(); - enkf_main->ensemble_config = ensemble_config_alloc(); - enkf_main->ecl_config = ecl_config_alloc(); - enkf_main->plot_config = plot_config_alloc_default(); - enkf_main->ranking_table = ranking_table_alloc( 0 ); - enkf_main->obs = NULL; - enkf_main->model_config = model_config_alloc( ); - enkf_main->local_config = local_config_alloc( ); - - enkf_main_rng_init( enkf_main ); - enkf_main->subst_func_pool = subst_func_pool_alloc( ); - enkf_main->subst_list = subst_list_alloc( enkf_main->subst_func_pool ); - enkf_main->templates = ert_templates_alloc( enkf_main->subst_list ); - enkf_main->workflow_list = ert_workflow_list_alloc( enkf_main->subst_list ); - enkf_main->hook_manager = hook_manager_alloc( enkf_main->workflow_list ); - enkf_main->analysis_config = analysis_config_alloc( enkf_main->rng ); - - enkf_main_init_subst_list( enkf_main ); - enkf_main_set_verbose( enkf_main , true ); - enkf_main_init_fs( enkf_main ); - return enkf_main; -} - - - - - -static void enkf_main_install_data_kw( enkf_main_type * enkf_main , hash_type * config_data_kw) { - /* - Installing the DATA_KW keywords supplied by the user - these are - at the very top level, so they can reuse everything defined later. - */ - if (config_data_kw) { - hash_iter_type * iter = hash_iter_alloc(config_data_kw); - const char * key = hash_iter_get_next_key(iter); - while (key != NULL) { - enkf_main_add_data_kw( enkf_main , key , hash_get( config_data_kw , key )); - key = hash_iter_get_next_key(iter); - } - hash_iter_free(iter); - } -} - - - -static void enkf_main_install_common_data_kw( enkf_main_type * enkf_main ) { - /* - Installing the based (key,value) pairs which are common to all - ensemble members, and independent of time. - */ - char * cwd = util_alloc_cwd(); - char * date_string = util_alloc_date_stamp_utc(); - const char * num_cpu_string = "1"; - - enkf_main_add_subst_kw( enkf_main , "CWD" , cwd , "The current working directory we are running from - the location of the config file." , true); - enkf_main_add_subst_kw( enkf_main , "CONFIG_PATH" , cwd , "The current working directory we are running from - the location of the config file." , true); - enkf_main_add_subst_kw( enkf_main , "DATE" , date_string , "The current date." , true); - enkf_main_add_subst_kw( enkf_main , "NUM_CPU" , num_cpu_string , "The number of CPU used for one forward model." , true ); - enkf_main_add_subst_kw( enkf_main , "RUNPATH_FILE" , hook_manager_get_runpath_list_file( enkf_main->hook_manager ) , "The name of a file with a list of run directories." , true); - - free( cwd ); - free( date_string ); -} - - - -runpath_list_type * enkf_main_get_runpath_list( const enkf_main_type * enkf_main ) { - return hook_manager_get_runpath_list( enkf_main->hook_manager ); -} - - -/** - This function will resize the enkf_main->ensemble vector, - allocating or freeing enkf_state instances as needed. -*/ - - -void enkf_main_resize_ensemble( enkf_main_type * enkf_main , int new_ens_size ) { - int iens; - - /* No change */ - if (new_ens_size == enkf_main->ens_size) - return ; - - ranking_table_set_ens_size( enkf_main->ranking_table , new_ens_size ); - /* Tell the site_config object (i.e. the queue drivers) about the new ensemble size: */ - site_config_set_ens_size( enkf_main->site_config , new_ens_size ); - - - /* The ensemble is shrinking. */ - if (new_ens_size < enkf_main->ens_size) { - /*1: Free all ensemble members which go out of scope. */ - for (iens = new_ens_size; iens < enkf_main->ens_size; iens++) - enkf_state_free( enkf_main->ensemble[iens] ); - - /*2: Shrink the ensemble pointer. */ - enkf_main->ensemble = util_realloc(enkf_main->ensemble , new_ens_size * sizeof * enkf_main->ensemble ); - enkf_main->ens_size = new_ens_size; - return; - } - - - /* The ensemble is expanding */ - if (new_ens_size > enkf_main->ens_size) { - /*1: Grow the ensemble pointer. */ - enkf_main->ensemble = util_realloc(enkf_main->ensemble , new_ens_size * sizeof * enkf_main->ensemble ); - - /*2: Allocate the new ensemble members. */ - for (iens = enkf_main->ens_size; iens < new_ens_size; iens++) - - /* Observe that due to the initialization of the rng - this function is currently NOT thread safe. */ - enkf_main->ensemble[iens] = enkf_state_alloc(iens, - enkf_main->rng , - model_config_iget_casename( enkf_main->model_config , iens ) , - enkf_main->pre_clear_runpath , - int_vector_safe_iget( enkf_main->keep_runpath , iens) , - enkf_main->model_config , - enkf_main->ensemble_config , - enkf_main->site_config , - enkf_main->ecl_config , - enkf_main->templates , - enkf_main->subst_list); - enkf_main->ens_size = new_ens_size; - return; - } - - util_abort("%s: something is seriously broken - should NOT be here .. \n",__func__); -} - - -void enkf_main_add_node(enkf_main_type * enkf_main, enkf_config_node_type * enkf_config_node) { - for (int iens = 0; iens < enkf_main_get_ensemble_size(enkf_main); iens++) { - - enkf_state_add_node(enkf_main->ensemble[iens], enkf_config_node_get_key(enkf_config_node), enkf_config_node); - } -} - - - -void enkf_main_update_node( enkf_main_type * enkf_main , const char * key ) { - int iens; - for (iens = 0; iens < enkf_main->ens_size; iens++) - enkf_state_update_node( enkf_main->ensemble[iens] , key ); -} - - - - - - - - - - - - - - -/******************************************************************/ - -/** - SCHEDULE_PREDICTION_FILE. - - The SCHEDULE_PREDICTION_FILE is implemented as a GEN_KW instance, - with some twists. Observe the following: - - 1. The SCHEDULE_PREDICTION_FILE is added to the ensemble_config - as a GEN_KW node with key 'PRED'. - - 2. The target file is set equal to the initial prediction file - (i.e. the template in this case), NOT including any path - components. - -*/ - - -void enkf_main_set_schedule_prediction_file__( enkf_main_type * enkf_main , const char * template_file , const char * parameters , const char * min_std , const char * init_file_fmt) { - const char * key = "PRED"; - /* - First remove/delete existing PRED node if it is already installed. - */ - if (ensemble_config_has_key( enkf_main->ensemble_config , key)) - enkf_main_del_node( enkf_main , key ); - - if (template_file != NULL) { - char * target_file; - bool forward_init = false; - enkf_config_node_type * config_node = ensemble_config_add_gen_kw( enkf_main->ensemble_config , key , forward_init); - { - char * base; - char * ext; - util_alloc_file_components( template_file , NULL , &base , &ext); - target_file = util_alloc_filename(NULL , base , ext ); - util_safe_free( base ); - util_safe_free( ext ); - } - enkf_config_node_update_gen_kw( config_node , target_file , template_file , parameters , min_std , init_file_fmt ); - free( target_file ); - ecl_config_set_schedule_prediction_file( enkf_main->ecl_config , template_file ); - } -} - - -void enkf_main_set_schedule_prediction_file( enkf_main_type * enkf_main , const char * schedule_prediction_file) { - enkf_main_set_schedule_prediction_file__(enkf_main , schedule_prediction_file , NULL , NULL , NULL ); -} - - -const char * enkf_main_get_schedule_prediction_file( const enkf_main_type * enkf_main ) { - return ecl_config_get_schedule_prediction_file( enkf_main->ecl_config ); -} - - - -/*****************************************************************/ - -static void enkf_main_init_data_kw( enkf_main_type * enkf_main , config_content_type * config ) { - { - const subst_list_type * define_list = config_content_get_define_list( config ); - for (int i=0; i < subst_list_get_size( define_list ); i++) { - const char * key = subst_list_iget_key( define_list , i ); - const char * value = subst_list_iget_value( define_list , i ); - enkf_main_add_data_kw( enkf_main , key , value ); - } - } - - if (config_content_has_item( config , DATA_KW_KEY)) { - config_content_item_type * data_item = config_content_get_item( config , DATA_KW_KEY ); - hash_type * data_kw = config_content_item_alloc_hash(data_item , true); - enkf_main_install_data_kw( enkf_main , data_kw ); - hash_free( data_kw ); - } - - enkf_main_install_common_data_kw( enkf_main ); -} - - - - - -/*****************************************************************/ - - -rng_config_type * enkf_main_get_rng_config( const enkf_main_type * enkf_main ) { - return enkf_main->rng_config; -} - - -void enkf_main_rng_init( enkf_main_type * enkf_main) { - if (enkf_main->rng != NULL) - rng_config_init_rng(enkf_main->rng_config, enkf_main->rng); - else - enkf_main->rng = rng_config_alloc_init_rng( enkf_main->rng_config ); -} - - -void enkf_main_update_local_updates( enkf_main_type * enkf_main) { - const enkf_obs_type * enkf_obs = enkf_main_get_obs( enkf_main ); - if (enkf_obs_have_obs( enkf_obs )) { - /* First create the default ALL_ACTIVE configuration. */ - enkf_main_create_all_active_config( enkf_main ); - } -} - -static char * __enkf_main_alloc_user_config_file(const enkf_main_type * enkf_main, bool base_only) { - char * base_name; - char * extension; - util_alloc_file_components(enkf_main_get_user_config_file(enkf_main), NULL, &base_name, &extension); - - char * config_file; - if (base_only) { - config_file = util_alloc_filename(NULL, base_name, NULL);; - } else { - config_file = util_alloc_filename(NULL, base_name, extension); - } - - free(base_name); - free(extension); - return config_file; -} - -static hash_type *__enkf_main_alloc_predefined_kw_map(const enkf_main_type *enkf_main) { - char * config_file_base = __enkf_main_alloc_user_config_file(enkf_main, true); - char * config_file = __enkf_main_alloc_user_config_file(enkf_main, false); - hash_type * pre_defined_kw_map = hash_alloc(); - - hash_insert_string(pre_defined_kw_map, "", config_file); - hash_insert_string(pre_defined_kw_map, "", config_file_base); - - free( config_file ) ; - free( config_file_base ); - return pre_defined_kw_map; -} - - -/** - Observe that the site-config initializations starts with chdir() to - the location of the site_config_file; this ensures that the - site_config can contain relative paths to job description files and - scripts. -*/ - - -static void enkf_main_bootstrap_site(enkf_main_type * enkf_main , const char * site_config_file) { - if (site_config_file != NULL) { - if (!util_file_exists(site_config_file)) util_exit("%s: can not locate site configuration file:%s \n",__func__ , site_config_file); - config_parser_type * config = config_alloc(); - site_config_add_config_items( config , true ); - { - config_content_type * content = config_parse(config , site_config_file , "--" , INCLUDE_KEY , DEFINE_KEY , NULL, CONFIG_UNRECOGNIZED_WARN , false); - if (config_content_is_valid( content )) { - site_config_init( enkf_main->site_config , content ); - analysis_config_load_all_external_modules_from_config(enkf_main->analysis_config, content); - ert_workflow_list_init( enkf_main->workflow_list , content ); - } else { - config_error_type * errors = config_content_get_errors( content ); - fprintf(stderr , "** ERROR: Parsing site configuration file:%s failed \n\n" , site_config_file); - config_error_fprintf( errors , true , stderr ); - exit(1); - } - config_content_free( content ); - } - config_free( config ); - } -} - - -/** - This function boots everything needed for running a EnKF - application. Very briefly it can be summarized as follows: - - 1. A large config object is initalized with all the possible - keywords we are looking for. - - 2. All the config files are parsed in one go. - - 3. The various objects are build up by reading from the config - object. - - 4. The resulting enkf_main object contains *EVERYTHING* - (whoaha...) - - - Observe that the function will start with chdir() to the directory - containing the configuration file, so that all subsequent file - references are relative to the location of the configuration - file. This also applies if the command_line argument given is a - symlink. - - - If the parameter @strict is set to false a configuration with some - missing parameters will validate; this is to support bootstrapping - from a minimal configuration created by the GUI. The parameters - which become optional in a non-strict mode are: - - FORWARD_MODEL - DATA_FILE - SCHEDULE_FILE - ECLBASE - -*/ - - -/** - It is possible to pass NULL as the model_config argument, in that - case only the site config file will be parsed. The purpose of this - is mainly to be able to test that the site config file is valid. -*/ - - -enkf_main_type * enkf_main_bootstrap(const char * _model_config, bool strict , bool verbose) { - const char * site_config = site_config_get_location(); - char * model_config = NULL; - enkf_main_type * enkf_main; /* The enkf_main object is allocated when the config parsing is completed. */ - - if (_model_config) { - { - char * path; - char * base; - char * ext; - if (util_is_link( _model_config )) { /* The command line argument given is a symlink - we start by changing to */ - /* the real location of the configuration file. */ - char * realpath = util_alloc_link_target( _model_config ); - util_alloc_file_components(realpath , &path , &base , &ext); - free( realpath ); - } else - util_alloc_file_components(_model_config , &path , &base , &ext); - - if (path != NULL) { - if (util_chdir(path) != 0) - util_abort("%s: failed to change directory to: %s : %s \n",__func__ , path , strerror(errno)); - - if (verbose) - printf("Changing to directory ...................: %s \n",path); - - if (ext != NULL) - model_config = util_alloc_filename( NULL , base , ext ); - else - model_config = util_alloc_string_copy( base ); - } else - model_config = util_alloc_string_copy(_model_config); - - util_safe_free( path ); - util_safe_free( base ); - util_safe_free( ext ); - } - - if (!util_file_exists(model_config)) - util_exit("%s: can not locate user configuration file:%s \n",__func__ , model_config); - } - - - { - config_parser_type * config; - config_content_type * content; - enkf_main = enkf_main_alloc_empty( ); - enkf_main_set_verbose( enkf_main , verbose ); - enkf_main_bootstrap_site( enkf_main , site_config); - - if (model_config) { - enkf_main_set_site_config_file( enkf_main , site_config ); - enkf_main_set_user_config_file( enkf_main , model_config ); - - config = config_alloc(); - enkf_main_init_user_config( enkf_main , config ); - site_config_add_config_items( config , false ); - site_config_init_user_mode( enkf_main->site_config ); - - { - hash_type *pre_defined_kw_map = __enkf_main_alloc_predefined_kw_map(enkf_main); - content = config_parse(config , model_config , "--" , INCLUDE_KEY , DEFINE_KEY , pre_defined_kw_map, CONFIG_UNRECOGNIZED_WARN , true); - hash_free(pre_defined_kw_map); - } - - if (!config_content_is_valid( content )) { - config_error_type * errors = config_content_get_errors( content ); - config_error_fprintf( errors , true , stderr ); - exit(1); - } - - site_config_init( enkf_main->site_config , content ); /* <---- model_config : second pass. */ - - /*****************************************************************/ - /* - OK - now we have parsed everything - and we are ready to start - populating the enkf_main object. - */ - - - - - { - char * log_file; - int log_level = DEFAULT_LOG_LEVEL; - if(config_content_has_item( content , LOG_LEVEL_KEY)) - log_level = config_content_get_value_as_int(content , LOG_LEVEL_KEY); - - if (config_content_has_item( content , LOG_FILE_KEY)) - log_file = util_alloc_string_copy( config_content_get_value(content , LOG_FILE_KEY)); - else - log_file = util_alloc_filename( NULL , enkf_main->user_config_file , "log"); - - ert_log_init_log(log_level, log_file , enkf_main->verbose); - - free( log_file ); - } - - /* - Initializing the various 'large' sub config objects. - */ - rng_config_init( enkf_main->rng_config , content ); - enkf_main_rng_init( enkf_main ); /* Must be called before the ensmeble is created. */ - - enkf_main_init_subst_list( enkf_main ); - ert_workflow_list_init( enkf_main->workflow_list , content ); - - analysis_config_load_internal_modules( enkf_main->analysis_config ); - analysis_config_init( enkf_main->analysis_config , content ); - ecl_config_init( enkf_main->ecl_config , content ); - plot_config_init( enkf_main->plot_config , content ); - - ensemble_config_init( enkf_main->ensemble_config , content , ecl_config_get_grid( enkf_main->ecl_config ) , ecl_config_get_refcase( enkf_main->ecl_config) ); - - model_config_init( enkf_main->model_config , - content , - enkf_main_get_ensemble_size( enkf_main ), - site_config_get_installed_jobs(enkf_main->site_config) , - ecl_config_get_last_history_restart( enkf_main->ecl_config ), - ecl_config_get_sched_file(enkf_main->ecl_config) , - ecl_config_get_refcase( enkf_main->ecl_config )); - - enkf_main_init_hook_manager( enkf_main , content ); - enkf_main_init_data_kw( enkf_main , content ); - enkf_main_update_num_cpu( enkf_main ); - { - if (config_content_has_item( content , SCHEDULE_PREDICTION_FILE_KEY )) { - const config_content_item_type * pred_item = config_content_get_item( content , SCHEDULE_PREDICTION_FILE_KEY ); - config_content_node_type * pred_node = config_content_item_get_last_node( pred_item ); - const char * template_file = config_content_node_iget_as_path( pred_node , 0 ); - { - hash_type * opt_hash = hash_alloc(); - config_content_node_init_opt_hash( pred_node , opt_hash , 1 ); - - const char * parameters = hash_safe_get( opt_hash , "PARAMETERS" ); - const char * min_std = hash_safe_get( opt_hash , "MIN_STD" ); - const char * init_files = hash_safe_get( opt_hash , "INIT_FILES" ); - - enkf_main_set_schedule_prediction_file__( enkf_main , template_file , parameters , min_std , init_files ); - hash_free( opt_hash ); - } - } - } - - - /*****************************************************************/ - /** - By default the simulation directories are left intact when - the simulations re complete, but using the keyword - DELETE_RUNPATH you can request (some of) the directories to - be wiped after the simulations are complete. - */ - { - { - char * delete_runpath_string = NULL; - int ens_size = config_content_get_value_as_int(content , NUM_REALIZATIONS_KEY); - - if (config_content_has_item(content , DELETE_RUNPATH_KEY)) - delete_runpath_string = config_content_alloc_joined_string(content , DELETE_RUNPATH_KEY , ""); - - enkf_main_parse_keep_runpath( enkf_main , delete_runpath_string , ens_size ); - - util_safe_free( delete_runpath_string ); - } - - /* This is really in the wrong place ... */ - { - enkf_main->pre_clear_runpath = DEFAULT_PRE_CLEAR_RUNPATH; - if (config_content_has_item(content , PRE_CLEAR_RUNPATH_KEY)) - enkf_main->pre_clear_runpath = config_content_get_value_as_bool( content , PRE_CLEAR_RUNPATH_KEY); - } - - ecl_config_static_kw_init( enkf_main->ecl_config , content ); - - /* Installing templates */ - ert_templates_init( enkf_main->templates , content ); - - - { - const char * rft_config_file = NULL; - if (config_content_has_item(content , RFT_CONFIG_KEY)) - rft_config_file = config_content_iget(content , RFT_CONFIG_KEY , 0,0); - - enkf_main_set_rft_config_file( enkf_main , rft_config_file ); - } - - - /*****************************************************************/ - enkf_main_user_select_initial_fs( enkf_main ); - - /* Adding ensemble members */ - enkf_main_resize_ensemble( enkf_main , config_content_iget_as_int(content , NUM_REALIZATIONS_KEY , 0 , 0) ); - - /*****************************************************************/ - - /* Loading observations */ - enkf_main_alloc_obs(enkf_main); - if (config_content_has_item(content , OBS_CONFIG_KEY)) { - const char * obs_config_file = config_content_iget(content , OBS_CONFIG_KEY , 0,0); - enkf_main_load_obs( enkf_main , obs_config_file , true ); - } - - } - config_content_free( content ); - config_free(config); - } - enkf_main_init_jobname( enkf_main ); - free( model_config ); - } - return enkf_main; -} - - - - -/** - This function creates a minimal configuration file, with a few - parameters (a bit arbitrary) parameters read from (typically) a GUI - configuration dialog. - - The set of parameters written by this function is _NOT_ a minimum - set to generate a valid configuration. -*/ - -void enkf_main_create_new_config( const char * config_file , const char * storage_path , const char * dbase_type , int num_realizations) { - - FILE * stream = util_mkdir_fopen( config_file , "w" ); - - fprintf(stream , CONFIG_KEY_FORMAT , ENSPATH_KEY); - fprintf(stream , CONFIG_ENDVALUE_FORMAT , storage_path ); - - fprintf(stream , CONFIG_KEY_FORMAT , DBASE_TYPE_KEY); - fprintf(stream , CONFIG_ENDVALUE_FORMAT , dbase_type); - - fprintf(stream , CONFIG_KEY_FORMAT , NUM_REALIZATIONS_KEY); - fprintf(stream , CONFIG_INT_FORMAT , num_realizations); - fprintf(stream , "\n"); - - fclose( stream ); - - printf("Have created configuration file: %s \n",config_file ); -} - - - - - - - - -/** - First deleting all the nodes - then the configuration. -*/ - -void enkf_main_del_node(enkf_main_type * enkf_main , const char * key) { - const int ens_size = enkf_main_get_ensemble_size( enkf_main ); - int iens; - for (iens = 0; iens < ens_size; iens++) - enkf_state_del_node(enkf_main->ensemble[iens] , key); - ensemble_config_del_node(enkf_main->ensemble_config , key); -} - - - -int enkf_main_get_ensemble_size( const enkf_main_type * enkf_main ) { - return enkf_main->ens_size; -} - - -enkf_state_type ** enkf_main_get_ensemble( enkf_main_type * enkf_main) { - return enkf_main->ensemble; -} - - -const enkf_state_type ** enkf_main_get_ensemble_const( const enkf_main_type * enkf_main) { - return (const enkf_state_type **) enkf_main->ensemble; -} - - - -/** - In this function we initialize the variables which control - which nodes are internalized (i.e. loaded from the forward - simulation and stored in the enkf_fs 'database'). The system is - based on two-levels: - - * Should we store the state? This is goverened by the variable - model_config->internalize_state. If this is true we will - internalize all nodes which have enkf_var_type = {dynamic_state , - static_state}. In the same way the variable - model_config->internalize_results governs whether the dynamic - results (i.e. summary variables in ECLIPSE speak) should be - internalized. - - * In addition we have fine-grained control in the enkf_config_node - objects where we can explicitly say that, altough we do not want - to internalize the full state, we want to internalize e.g. the - pressure field. - - * All decisions on internalization are based on a per report step - basis. - - The user-space API for manipulating this is (extremely) - limited. What is implemented here is the following: - - 1. We internalize the initial dynamic state. - - 2. For all the end-points in the current enkf_sched instance we - internalize the state. - - 3. store_results is set to true for all report steps irrespective - of run_mode. - - 4. We iterate over all the observations, and ensure that the - observed nodes (i.e. the pressure for an RFT) are internalized - (irrespective of whether they are of type dynamic_state or - dynamic_result). - - Observe that this cascade can result in some nodes, i.e. a rate we - are observing, to be marked for internalization several times - - that is no problem. - - ----- - - For performance reason model_config contains the bool vector - __load_eclipse_restart; if it is true the ECLIPSE restart state is - loaded from disk, otherwise no loading is performed. This implies - that if we do not want to internalize the full state but for - instance the pressure (i.e. for an RFT) we must set the - __load_state variable for the actual report step to true. For this - reason calls enkf_config_node_internalize() must be accompanied by - calls to model_config_set_load_state|results() - this is ensured - when using this function to manipulate the configuration of - internalization. - -*/ - - -void enkf_main_init_internalization( enkf_main_type * enkf_main , run_mode_type run_mode ) { - /* Clearing old internalize flags. */ - model_config_init_internalization( enkf_main->model_config ); - - /* Internalizing the initial state. */ - model_config_set_internalize_state( enkf_main->model_config , 0); - - - /* Make sure we internalize at all observation times.*/ - { - hash_type * map = enkf_obs_alloc_data_map(enkf_main->obs); - hash_iter_type * iter = hash_iter_alloc(map); - const char * obs_key = hash_iter_get_next_key(iter); - - while (obs_key != NULL) { - obs_vector_type * obs_vector = enkf_obs_get_vector( enkf_main->obs , obs_key ); - enkf_config_node_type * data_node = obs_vector_get_config_node( obs_vector ); - int active_step = -1; - do { - active_step = obs_vector_get_next_active_step( obs_vector , active_step ); - if (active_step >= 0) { - enkf_config_node_set_internalize( data_node , active_step ); - { - enkf_var_type var_type = enkf_config_node_get_var_type( data_node ); - if (var_type == DYNAMIC_STATE) - model_config_set_load_state( enkf_main->model_config , active_step); - } - } - } while (active_step >= 0); - obs_key = hash_iter_get_next_key(iter); - } - hash_iter_free(iter); - hash_free(map); - } -} - - - - -/*****************************************************************/ - - - - - - -const ext_joblist_type * enkf_main_get_installed_jobs( const enkf_main_type * enkf_main ) { - return site_config_get_installed_jobs( enkf_main->site_config ); -} - - - -/*****************************************************************/ - -void enkf_main_get_observations( const enkf_main_type * enkf_main, const char * user_key , int obs_count , time_t * obs_time , double * y , double * std) { - ensemble_config_get_observations( enkf_main->ensemble_config , enkf_main->obs , user_key , obs_count , obs_time , y , std); -} - - -int enkf_main_get_observation_count( const enkf_main_type * enkf_main, const char * user_key ) { - return ensemble_config_get_observations( enkf_main->ensemble_config , enkf_main->obs , user_key , 0 , NULL , NULL , NULL); -} - - - -void enkf_main_log_fprintf_config( const enkf_main_type * enkf_main , FILE * stream ) { - fprintf( stream , CONFIG_COMMENTLINE_FORMAT ); - fprintf( stream , CONFIG_COMMENT_FORMAT , "Here comes configuration information about the ERT logging."); - fprintf( stream , CONFIG_KEY_FORMAT , LOG_FILE_KEY ); - fprintf( stream , CONFIG_ENDVALUE_FORMAT , ert_log_get_filename()); - - if (ert_log_get_log_level() != DEFAULT_LOG_LEVEL) { - fprintf(stream , CONFIG_KEY_FORMAT , LOG_LEVEL_KEY ); - fprintf(stream , CONFIG_INT_FORMAT , ert_log_get_log_level()); - fprintf(stream , "\n"); - } - - fprintf(stream , "\n"); - fprintf(stream , "\n"); -} - - -void enkf_main_install_SIGNALS(void) { - util_install_signals(); -} - - - - -ert_templates_type * enkf_main_get_templates( enkf_main_type * enkf_main ) { - return enkf_main->templates; -} - - - -/*****************************************************************/ - - -void enkf_main_fprintf_runpath_config( const enkf_main_type * enkf_main , FILE * stream ) { - fprintf(stream , CONFIG_KEY_FORMAT , PRE_CLEAR_RUNPATH_KEY ); - fprintf(stream , CONFIG_ENDVALUE_FORMAT , CONFIG_BOOL_STRING( enkf_state_get_pre_clear_runpath( enkf_main->ensemble[0] ))); - - { - bool del_comma = false; - - - for (int iens = 0; iens < enkf_main->ens_size; iens++) { - keep_runpath_type keep_runpath = enkf_main_iget_keep_runpath( enkf_main , iens ); - if (keep_runpath == EXPLICIT_DELETE) { - if (!del_comma) { - fprintf(stream , CONFIG_KEY_FORMAT , DELETE_RUNPATH_KEY ); - fprintf(stream , CONFIG_INT_FORMAT , iens); - del_comma = true; - } else { - fprintf(stream , ","); - fprintf(stream , CONFIG_INT_FORMAT , iens); - } - } - } - fprintf(stream , "\n"); - } -} - - - -/*****************************************************************/ - -ert_workflow_list_type * enkf_main_get_workflow_list( enkf_main_type * enkf_main ) { - return enkf_main->workflow_list; -} - -bool enkf_main_run_workflow( enkf_main_type * enkf_main , const char * workflow ) { - ert_workflow_list_type * workflow_list = enkf_main_get_workflow_list( enkf_main ); - if (ert_workflow_list_has_workflow( workflow_list , workflow)){ - return ert_workflow_list_run_workflow_blocking( workflow_list , workflow , enkf_main); - } - else{ - return false; - } -} - - -void enkf_main_run_workflows( enkf_main_type * enkf_main , const stringlist_type * workflows) { - int iw; - for (iw = 0; iw < stringlist_get_size( workflows ); iw++) - enkf_main_run_workflow( enkf_main , stringlist_iget( workflows , iw )); -} - - -void enkf_main_load_from_forward_model_from_gui(enkf_main_type * enkf_main, int iter , bool_vector_type * iactive, enkf_fs_type * fs){ - const int ens_size = enkf_main_get_ensemble_size( enkf_main ); - stringlist_type ** realizations_msg_list = util_calloc( ens_size , sizeof * realizations_msg_list ); - for (int iens = 0; iens < ens_size; ++iens) - realizations_msg_list[iens] = stringlist_alloc_new(); - - enkf_main_load_from_forward_model_with_fs(enkf_main, iter , iactive, realizations_msg_list, fs); - - for (int iens = 0; iens < ens_size; ++iens) - stringlist_free( realizations_msg_list[iens] ); - - free(realizations_msg_list); -} - -void enkf_main_load_from_forward_model(enkf_main_type * enkf_main, int iter , bool_vector_type * iactive, stringlist_type ** realizations_msg_list){ - enkf_fs_type * fs = enkf_main_get_fs( enkf_main ); - enkf_main_load_from_forward_model_with_fs(enkf_main, iter, iactive, realizations_msg_list, fs); -} - - -void enkf_main_load_from_forward_model_with_fs(enkf_main_type * enkf_main, int iter , bool_vector_type * iactive, stringlist_type ** realizations_msg_list, enkf_fs_type * fs) { - - const int ens_size = enkf_main_get_ensemble_size( enkf_main ); - int result[ens_size]; - model_config_type * model_config = enkf_main->model_config; - - ert_run_context_type * run_context = ert_run_context_alloc_ENSEMBLE_EXPERIMENT( fs , iactive , model_config_get_runpath_fmt( model_config ) , enkf_main->subst_list , iter ); - arg_pack_type ** arg_list = util_calloc( ens_size , sizeof * arg_list ); - thread_pool_type * tp = thread_pool_alloc( 4 , true ); /* num_cpu - HARD coded. */ - - int iens = 0; - for (; iens < ens_size; ++iens) { - result[iens] = 0; - arg_pack_type * arg_pack = arg_pack_alloc(); - arg_list[iens] = arg_pack; - - if (bool_vector_iget(iactive, iens)) { - enkf_state_type * enkf_state = enkf_main_iget_state( enkf_main , iens ); - arg_pack_append_ptr( arg_pack , enkf_state); /* 0: enkf_state*/ - arg_pack_append_ptr( arg_pack , ert_run_context_iens_get_arg( run_context , iens )); /* 1: run_arg */ - arg_pack_append_ptr(arg_pack, realizations_msg_list[iens]); /* 2: List of interactive mode messages. */ - arg_pack_append_bool( arg_pack, true ); /* 3: Manual load */ - arg_pack_append_ptr(arg_pack, &result[iens]); /* 4: Result */ - thread_pool_add_job( tp , enkf_state_load_from_forward_model_mt , arg_pack); - } - } - - thread_pool_join( tp ); - thread_pool_free( tp ); - printf("\n"); - - for (iens = 0; iens < ens_size; ++iens) { - if (bool_vector_iget(iactive, iens)) { - if (result[iens] & LOAD_FAILURE) - fprintf(stderr, "** Warning: Function %s: Realization %d load failure\n", __func__, iens); - else if (result[iens] & REPORT_STEP_INCOMPATIBLE) - fprintf(stderr, "** Warning: Function %s: Reliazation %d report step incompatible\n", __func__, iens); - } - arg_pack_free(arg_list[iens]); - } - free( arg_list ); - ert_run_context_free( run_context ); -} - - - -char * enkf_main_alloc_abs_path_to_init_file(const enkf_main_type * enkf_main, const enkf_config_node_type * config_node) { - model_config_type * model_config = enkf_main_get_model_config(enkf_main); - char * runpath = NULL; - char * path_to_init_file = NULL; - char * abs_path_to_init_file = NULL; - bool forward_init = enkf_config_node_use_forward_init(config_node); - - if (forward_init) { - path_fmt_type * runpath_fmt = model_config_get_runpath_fmt(model_config); - runpath = path_fmt_alloc_path(runpath_fmt , false , 0, 0); /* Replace first %d with iens, if a second %d replace with iter */ - path_to_init_file = enkf_config_node_alloc_initfile(config_node, runpath, 0); - } else - path_to_init_file = enkf_config_node_alloc_initfile(config_node, NULL, 0); - - if (path_to_init_file) - abs_path_to_init_file = util_alloc_abs_path(path_to_init_file); - - if (abs_path_to_init_file && !util_file_exists(abs_path_to_init_file)) { - free(abs_path_to_init_file); - abs_path_to_init_file = NULL; - } - - if (runpath) - free(runpath); - if (path_to_init_file) - free(path_to_init_file); - - return abs_path_to_init_file; -} - - -bool enkf_main_export_field(const enkf_main_type * enkf_main, - const char * kw, - const char * path, - bool_vector_type * iactive, - field_file_format_type file_type, - int report_step) -{ - enkf_fs_type * fs = enkf_main_get_fs(enkf_main); - bool result = enkf_main_export_field_with_fs(enkf_main, kw, path, iactive, file_type, report_step, fs); - return result; -} - - - - -bool enkf_main_export_field_with_fs(const enkf_main_type * enkf_main, - const char * kw, - const char * path, - bool_vector_type * iactive, - field_file_format_type file_type, - int report_step, - enkf_fs_type * fs) { - - bool ret = false; - if (util_int_format_count(path) < 1) { - printf("EXPORT FIELD: There must be a %%d in the file name\n"); - return ret; - } - - const ensemble_config_type * ensemble_config = enkf_main_get_ensemble_config(enkf_main); - const enkf_config_node_type * config_node = NULL; - bool node_found = false; - - if (ensemble_config_has_key(ensemble_config, kw)) { - config_node = ensemble_config_get_node(ensemble_config, kw); - if (config_node && enkf_config_node_get_impl_type(config_node) == FIELD) { - node_found = true; - } else - printf("Did not find a FIELD %s node\n", kw); - } else - printf("Ensemble config does not have key %s\n", kw); - - if (node_found) { - enkf_node_type * node = NULL; - - char * init_file = enkf_main_alloc_abs_path_to_init_file(enkf_main, config_node); - if (init_file) - printf("init_file found: \"%s\", exporting initial value for inactive cells\n", init_file); - else - printf("no init_file found, exporting 0 or fill value for inactive cells\n"); - - int iens; - for (iens = 0; iens < bool_vector_size(iactive); ++iens) { - if (bool_vector_iget(iactive, iens)) { - node_id_type node_id = {.report_step = report_step , .iens = iens }; - node = enkf_state_get_node(enkf_main->ensemble[iens] , kw); - if (node) { - if (enkf_node_try_load(node , fs , node_id)) { - path_fmt_type * export_path = path_fmt_alloc_path_fmt( path ); - char * filename = path_fmt_alloc_path( export_path , false , iens); - path_fmt_free(export_path); - - { - char * path; - util_alloc_file_components(filename , &path , NULL , NULL); - if (path != NULL) { - util_make_path( path ); - free( path ); - } - } - - { - const field_type * field = enkf_node_value_ptr(node); - const bool output_transform = true; - field_export(field , filename , NULL , file_type , output_transform, init_file); - ret = true; - } - free(filename); - } else - printf("%s : enkf_node_try_load returned returned false \n", __func__); - } else - printf("%s : enkf_state_get_node returned NULL for parameters %d, %s \n", __func__, iens, kw); - } - } - if (init_file) - free(init_file); - } - - - if (ret) - printf("Successful export of FIELD %s\n", kw); - else - printf("Errors during export of FIELD %s\n", kw); - - return ret; -} - - -void enkf_main_rank_on_observations(enkf_main_type * enkf_main, - const char * ranking_key, - const stringlist_type * obs_ranking_keys, - const int_vector_type * steps) { - - enkf_fs_type * fs = enkf_main_get_fs(enkf_main); - const enkf_obs_type * enkf_obs = enkf_main_get_obs( enkf_main ); - const ensemble_config_type * ensemble_config = enkf_main_get_ensemble_config(enkf_main); - const int history_length = enkf_main_get_history_length( enkf_main ); - const int ens_size = enkf_main_get_ensemble_size( enkf_main ); - - misfit_ensemble_type * misfit_ensemble = enkf_fs_get_misfit_ensemble( fs ); - misfit_ensemble_initialize( misfit_ensemble , ensemble_config , enkf_obs , fs , ens_size , history_length, false); - - ranking_table_type * ranking_table = enkf_main_get_ranking_table( enkf_main ); - - ranking_table_add_misfit_ranking( ranking_table , misfit_ensemble , obs_ranking_keys , steps , ranking_key ); - ranking_table_display_ranking( ranking_table , ranking_key); -} - - - -void enkf_main_rank_on_data(enkf_main_type * enkf_main, - const char * ranking_key, - const char * data_key, - bool sort_increasing, - int step) { - - ranking_table_type * ranking_table = enkf_main_get_ranking_table( enkf_main ); - ensemble_config_type * ensemble_config = enkf_main_get_ensemble_config( enkf_main ); - enkf_fs_type * fs = enkf_main_get_fs(enkf_main); - char * key_index; - - const enkf_config_node_type * config_node = ensemble_config_user_get_node( ensemble_config , data_key , &key_index); - if (config_node) { - ranking_table_add_data_ranking( ranking_table , sort_increasing , ranking_key , data_key , key_index , fs , config_node, step ); - ranking_table_display_ranking( ranking_table , ranking_key ); - } else { - fprintf(stderr,"** No data found for key %s\n", data_key); - } -} - - -void enkf_main_export_ranking(enkf_main_type * enkf_main, const char * ranking_key, const char * ranking_file) { - ranking_table_type * ranking_table = enkf_main_get_ranking_table( enkf_main ); - ranking_table_fwrite_ranking(ranking_table, ranking_key, ranking_file); -} - - -#include "enkf_main_manage_fs.c" diff --git a/ThirdParty/Ert/libenkf/src/enkf_main_jobs.c b/ThirdParty/Ert/libenkf/src/enkf_main_jobs.c deleted file mode 100644 index 6718e2be54..0000000000 --- a/ThirdParty/Ert/libenkf/src/enkf_main_jobs.c +++ /dev/null @@ -1,552 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'enkf_main_jobs.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include - -#include -#include -#include - -#include -#include -#include -#include - - - -static bool_vector_type * alloc_iactive_vector_from_range(const stringlist_type * range, int startindex, int endindex, int ens_size) { - bool_vector_type * iactive; - int range_list_size = stringlist_get_size(range); - if ((range_list_size > startindex) && (range_list_size >= endindex)) { - char * arg_string = stringlist_alloc_joined_substring( range, startindex, endindex, ""); - iactive = bool_vector_alloc(ens_size, false); - string_util_update_active_mask( arg_string, iactive ); - free ( arg_string ); - } else { - iactive = bool_vector_alloc(ens_size, true); - } - return iactive; -} - -void enkf_main_jobs_sleep(){ - while(true){ - printf("Hi from internal \n"); - sleep(1); - } -} - -void * enkf_main_exit_JOB(void * self , const stringlist_type * args ) { - enkf_main_type * enkf_main = enkf_main_safe_cast( self ); - enkf_main_exit( enkf_main ); - return NULL; -} - - -/** - This job is purely added to make sure we have a job in the - internal-gui/config subdirectory. As soon as there is a real job - there; this can be removed. -*/ - -void * enkf_main_dummy_JOB(void * self , const stringlist_type * args ) { - return NULL; -} - - - - - -void * enkf_main_ensemble_run_JOB( void * self , const stringlist_type * args ) { - enkf_main_type * enkf_main = enkf_main_safe_cast( self ); - int ens_size = enkf_main_get_ensemble_size( enkf_main ); - bool_vector_type * iactive = alloc_iactive_vector_from_range(args, 0, stringlist_get_size(args), ens_size); - - bool_vector_iset( iactive , ens_size - 1 , true ); - enkf_main_run_tui_exp( enkf_main , iactive); - bool_vector_free(iactive); - return NULL; -} - - -static void * enkf_main_smoother_JOB__( void * self , int iter , const stringlist_type * args ) { - enkf_main_type * enkf_main = enkf_main_safe_cast( self ); - int ens_size = enkf_main_get_ensemble_size( enkf_main ); - bool_vector_type * iactive = bool_vector_alloc( ens_size , true ); - bool valid = true; - const char * target_case = stringlist_iget( args , 0 ); - enkf_fs_type * source_fs = enkf_main_job_get_fs( enkf_main ); - //Argument 2: Rerun. Default false. - bool rerun = (stringlist_get_size(args) >= 2) ? stringlist_iget_as_bool(args, 1, &valid) : false; - - if (!valid) { - fprintf(stderr, "** Warning: Function %s : Second argument must be a bool value. Exiting job\n", __func__); - return NULL; - } - enkf_main_run_smoother( enkf_main , source_fs , target_case , iactive , iter , rerun); - bool_vector_free( iactive ); - return NULL; -} - - -void * enkf_main_smoother_JOB( void * self , const stringlist_type * args ) { - return enkf_main_smoother_JOB__( self, 0 , args ); -} - - -void * enkf_main_smoother_with_iter_JOB( void * self , const stringlist_type * args ) { - int iter; - stringlist_type * sub_args = stringlist_alloc_shallow_copy_with_limits( args , 1 , stringlist_get_size( args ) - 1); - util_sscanf_int( stringlist_iget(args , 0 ) , &iter ); - - enkf_main_smoother_JOB__( self , iter , sub_args ); - - stringlist_free( sub_args ); - return NULL; -} - - - -void * enkf_main_iterated_smoother_JOB( void * self , const stringlist_type * args ) { - enkf_main_type * enkf_main = enkf_main_safe_cast( self ); - const analysis_config_type * analysis_config = enkf_main_get_analysis_config(enkf_main); - analysis_iter_config_type * iter_config = analysis_config_get_iter_config(analysis_config); - int num_iter = analysis_iter_config_get_num_iterations(iter_config); - - enkf_main_run_iterated_ES( enkf_main , num_iter); - return NULL; -} - - -void * enkf_main_select_module_JOB( void * self , const stringlist_type * args ) { - enkf_main_type * enkf_main = enkf_main_safe_cast( self ); - analysis_config_type * analysis_config = enkf_main_get_analysis_config( enkf_main ); - - analysis_config_select_module( analysis_config , stringlist_iget( args , 0 )); - - return NULL; -} - - -void * enkf_main_scale_obs_std_JOB(void * self, const stringlist_type * args ) { - enkf_main_type * enkf_main = enkf_main_safe_cast( self ); - - double scale_factor; - if (util_sscanf_double(stringlist_iget(args, 0), &scale_factor)) { - analysis_config_type * analysis_config = enkf_main_get_analysis_config( enkf_main ); - analysis_config_set_global_std_scaling( analysis_config , scale_factor ); - } - return NULL; -} - -/*****************************************************************/ - -/* - Will create the new case if it does not exist. -*/ -void * enkf_main_select_case_JOB( void * self , const stringlist_type * args) { - enkf_main_type * enkf_main = enkf_main_safe_cast( self ); - const char * new_case = stringlist_iget( args , 0 ); - enkf_main_select_fs( enkf_main , new_case ); - return NULL; -} - - -void * enkf_main_create_case_JOB( void * self , const stringlist_type * args) { - enkf_main_type * enkf_main = enkf_main_safe_cast( self ); - const char * new_case = stringlist_iget( args , 0 ); - enkf_fs_type * fs = enkf_main_mount_alt_fs( enkf_main , new_case , true ); - enkf_fs_decref( fs ); - return NULL; -} - - - -void * enkf_main_init_case_from_existing_JOB( void * self , const stringlist_type * args) { - enkf_main_type * enkf_main = enkf_main_safe_cast( self ); - - const char * source_case = stringlist_iget( args , 0 ); - enkf_fs_type * source_fs = enkf_main_mount_alt_fs( enkf_main , source_case , true ); - { - enkf_fs_type * target_fs; - - if (stringlist_get_size(args) > 1) { - const char * current_case = enkf_main_get_current_fs(enkf_main); - const char * target_case = stringlist_iget( args , 1 ); - if (0 != strcmp(current_case, target_case)) { - target_fs = enkf_main_mount_alt_fs( enkf_main , target_case , true ); - } else - target_fs = enkf_fs_get_ref( enkf_main_job_get_fs(enkf_main) ); // Using get_ref so that we can unconditionally call decref() further down. - } else - target_fs = enkf_fs_get_ref( enkf_main_job_get_fs(enkf_main) ); // Using get_ref so that we can unconditionally call decref() further down. - - enkf_main_init_case_from_existing(enkf_main, source_fs, 0, target_fs); // Removed ANALYZED argument - enkf_fs_decref(target_fs); - } - enkf_fs_decref(source_fs); - - return NULL; -} - - -/*****************************************************************/ - -static void * enkf_main_load_results_JOB__( enkf_main_type * enkf_main , int iter , const stringlist_type * args) { - bool_vector_type * iactive = alloc_iactive_vector_from_range(args, 0, stringlist_get_size(args), enkf_main_get_ensemble_size(enkf_main)); - int ens_size = enkf_main_get_ensemble_size(enkf_main); - stringlist_type ** realizations_msg_list = util_calloc(ens_size, sizeof * realizations_msg_list); - for (int iens = 0; iens < ens_size; ++iens) - realizations_msg_list[iens] = stringlist_alloc_new(); - - enkf_main_load_from_forward_model(enkf_main, iter , iactive, realizations_msg_list); - - for (int iens = 0; iens < ens_size; ++iens) { - stringlist_type * msg = realizations_msg_list[iens]; - if (stringlist_get_size(msg)) { - int msg_count = 0; - for (; msg_count < stringlist_get_size(msg); ++msg_count) - fprintf(stderr, "** Warning: Function %s : Load of realization number %d returned the following warning: %s\n", __func__, iens, stringlist_iget(msg, msg_count)); - } - stringlist_free(msg); - } - - free(realizations_msg_list); - bool_vector_free(iactive); - return NULL; -} - - -void * enkf_main_load_results_JOB( void * self , const stringlist_type * args) { - enkf_main_type * enkf_main = enkf_main_safe_cast( self ); - int iter = 0; - { - const model_config_type * model_config = enkf_main_get_model_config( enkf_main ); - if (model_config_runpath_requires_iter( model_config )) - fprintf(stderr,"**Warning: the runpath format:%s requires an iteration number - using default:0. Use the job: LOAD_RESULT_ITER instead.\n" , model_config_get_runpath_as_char( model_config )); - } - return enkf_main_load_results_JOB__(enkf_main , iter , args ); -} - - -void * enkf_main_load_results_iter_JOB( void * self , const stringlist_type * args) { - enkf_main_type * enkf_main = enkf_main_safe_cast( self ); - stringlist_type * iens_args = stringlist_alloc_shallow_copy_with_limits( args , 1 , stringlist_get_size( args ) - 1); - int iter; - - util_sscanf_int( stringlist_iget( args , 0 ) , &iter); - enkf_main_load_results_JOB__(enkf_main , iter , iens_args ); - stringlist_free( iens_args ); - - return NULL; -} - - -/*****************************************************************/ - -static void enkf_main_jobs_export_field(const enkf_main_type * enkf_main, const stringlist_type * args, field_file_format_type file_type) { - const char * field = stringlist_iget(args, 0); - const char * file_name = stringlist_iget(args, 1); - int report_step = 0; - util_sscanf_int(stringlist_iget(args,2), &report_step); - - bool_vector_type * iactive = alloc_iactive_vector_from_range(args, 4, stringlist_get_size(args), enkf_main_get_ensemble_size(enkf_main)); - enkf_main_export_field(enkf_main,field, file_name, iactive, file_type, report_step ) ; - bool_vector_free(iactive); -} - - - -void * enkf_main_export_field_JOB(void * self, const stringlist_type * args) { - const char * file_name = stringlist_iget(args, 1); - field_file_format_type file_type = field_config_default_export_format(file_name); - - if ((RMS_ROFF_FILE == file_type) || (ECL_GRDECL_FILE == file_type)) { - enkf_main_type * enkf_main = enkf_main_safe_cast( self ); - enkf_main_jobs_export_field(enkf_main, args, file_type); - } else - printf("EXPORT_FIELD filename argument: File extension must be either .roff or .grdecl\n"); - - return NULL; -} - -void * enkf_main_export_field_to_RMS_JOB(void * self, const stringlist_type * args) { - enkf_main_type * enkf_main = enkf_main_safe_cast( self ); - enkf_main_jobs_export_field(enkf_main, args, RMS_ROFF_FILE); - return NULL; -} - -void * enkf_main_export_field_to_ECL_JOB(void * self, const stringlist_type * args) { - enkf_main_type * enkf_main = enkf_main_safe_cast( self ); - enkf_main_jobs_export_field(enkf_main, args, ECL_GRDECL_FILE); - return NULL; -} - - -/*****************************************************************/ - -void * enkf_main_rank_on_observations_JOB(void * self, const stringlist_type * args) { - enkf_main_type * enkf_main = enkf_main_safe_cast( self ); - const char * ranking_name = stringlist_iget(args, 0); - - bool step_arguments = false; - bool obs_arguments = false; - int delimiter = 0; - { - delimiter = stringlist_find_first(args, "|"); - if (delimiter > -1) { - step_arguments = (delimiter > 1) ? true : false; - obs_arguments = (stringlist_get_size(args) > delimiter + 1) ? true : false; - } else if (stringlist_get_size(args) > 1) { - step_arguments = true; - delimiter = stringlist_get_size(args); - } - } - - int_vector_type * steps_vector = NULL; - { - char * report_steps = NULL; - - if (step_arguments) - report_steps = stringlist_alloc_joined_substring(args, 1, delimiter, ","); - else - report_steps = util_alloc_sprintf("0-%d", enkf_main_get_history_length(enkf_main)); - - steps_vector = string_util_alloc_value_list(report_steps); - - free(report_steps); - } - - - stringlist_type * obs_ranking_keys = NULL; - { - char * obs_key_char = NULL; - if (obs_arguments) - obs_key_char = stringlist_alloc_joined_substring( args , delimiter+1 , stringlist_get_size(args) , " "); - - enkf_obs_type * enkf_obs = enkf_main_get_obs(enkf_main); - obs_ranking_keys = enkf_obs_alloc_matching_keylist( enkf_obs , obs_key_char ); - - if ((obs_arguments) && (stringlist_get_size(obs_ranking_keys) == 0)) { - fprintf(stderr,"The input string : \"%s\" did not resolve to any valid observation keys. Job not started\n", obs_key_char); - return NULL; - } - - if (obs_arguments) - free(obs_key_char); - } - - - enkf_main_rank_on_observations(enkf_main, ranking_name, obs_ranking_keys, steps_vector); - - stringlist_free(obs_ranking_keys); - int_vector_free(steps_vector); - return NULL; -} - - -void * enkf_main_rank_on_data_JOB(void * self, const stringlist_type * args) { - enkf_main_type * enkf_main = enkf_main_safe_cast( self ); - const char * ranking_name = stringlist_iget(args, 0); - const char * data_key = stringlist_iget(args, 1); - bool valid = true; - bool sort_increasing = stringlist_iget_as_bool(args, 2, &valid); - - if (!valid) { - fprintf(stderr,"** Third argument \"sort increasing\" not recognized as bool value, job not started\n"); - return NULL; - } - - int report_step = (stringlist_get_size(args) > 3) ? stringlist_iget_as_int(args, 3, &valid) : enkf_main_get_history_length(enkf_main) ; - if (!valid) { - fprintf(stderr,"** Fourth argument \"step\" not recognized as integer value, job not started\n"); - return NULL; - } - - if (report_step < 0) { - fprintf(stderr,"** Negative report step, job not started\n"); - return NULL; - } - - enkf_main_rank_on_data(enkf_main, ranking_name, data_key, sort_increasing, report_step); - return NULL; -} - - -void * enkf_main_export_ranking_JOB(void * self, const stringlist_type * args) { - enkf_main_type * enkf_main = enkf_main_safe_cast( self ); - const char * ranking_name = stringlist_iget(args, 0); - const char * ranking_file = stringlist_iget(args, 1); - - enkf_main_export_ranking(enkf_main, ranking_name, ranking_file); - return NULL; -} - -void * enkf_main_init_misfit_table_JOB(void * self, const stringlist_type * args) { - enkf_main_type * enkf_main = enkf_main_safe_cast( self ); - int history_length = enkf_main_get_history_length(enkf_main); - enkf_obs_type * enkf_obs = enkf_main_get_obs(enkf_main); - int ens_size = enkf_main_get_ensemble_size(enkf_main); - enkf_fs_type * fs = enkf_main_job_get_fs(enkf_main); - bool force_update = true; - const ensemble_config_type * ensemble_config = enkf_main_get_ensemble_config(enkf_main); - - - misfit_ensemble_type * misfit_ensemble = enkf_fs_get_misfit_ensemble( fs ); - misfit_ensemble_initialize( misfit_ensemble , ensemble_config , enkf_obs , fs , ens_size , history_length, force_update); - - return NULL; -} - - - - -static void enkf_main_export_runpath_file(enkf_main_type * enkf_main, - const int_vector_type * realizations, - const int_vector_type * iterations) { - - ecl_config_type * ecl_config = enkf_main_get_ecl_config(enkf_main); - const model_config_type * model_config = enkf_main_get_model_config(enkf_main); - const char * basename_fmt = ecl_config_get_eclbase(ecl_config); - const char * runpath_fmt = model_config_get_runpath_as_char(model_config); - const hook_manager_type * hook_manager = enkf_main_get_hook_manager( enkf_main ); - - runpath_list_type * runpath_list = runpath_list_alloc( hook_manager_get_runpath_list_file( hook_manager )); - - for (int iter = 0; iter < int_vector_size(iterations); ++iter) { - for (int iens = 0; iens < int_vector_size(realizations); ++iens) { - int iter_value = int_vector_iget(iterations, iter); - int iens_value = int_vector_iget(realizations, iens); - char * basename; - char * runpath; - - if (basename_fmt) - basename = util_alloc_sprintf(basename_fmt, iens_value); - else - basename = util_alloc_sprintf("--%d", iens_value); - - if (model_config_runpath_requires_iter(model_config)) - runpath = util_alloc_sprintf(runpath_fmt, iens_value, iter_value); - else - runpath = util_alloc_sprintf(runpath_fmt, iens_value); - - runpath_list_add(runpath_list, iens_value, iter_value, runpath, basename); - - free(basename); - free(runpath); - } - } - runpath_list_fprintf(runpath_list); - runpath_list_free(runpath_list); -} - - - - -void * enkf_main_export_runpath_file_JOB(void * self, const stringlist_type * args) { - enkf_main_type * enkf_main = enkf_main_safe_cast( self ); - int ensemble_size = enkf_main_get_ensemble_size(enkf_main); - analysis_config_type * analysis_config = enkf_main_get_analysis_config(enkf_main); - analysis_iter_config_type * iter_config = analysis_config_get_iter_config(analysis_config); - int num_iterations = analysis_iter_config_get_num_iterations(iter_config); - const model_config_type * model_config = enkf_main_get_model_config(enkf_main); - int_vector_type * realizations = int_vector_alloc(1, 0); - int_vector_init_range(realizations, 0, ensemble_size, 1); - int_vector_type * iterations = int_vector_alloc(1, 0); - - - if (stringlist_get_size(args) > 0) { - int offset = 0; - while (true) { - if (offset == stringlist_get_size( args )) - break; - if (0 == strcmp("|" , stringlist_iget( args, offset ))) - break; - ++offset; - } - - if (0 != strcmp("*", stringlist_iget(args,0))) { - char * range_str = stringlist_alloc_joined_substring( args, 0, offset, ""); - string_util_init_value_list(range_str, realizations); - free(range_str); - } - - if ((offset < stringlist_get_size(args)) && model_config_runpath_requires_iter(model_config)) { - if (0 == strcmp("*", stringlist_iget(args, (offset+1)))) - int_vector_init_range(iterations, 0, num_iterations, 1); - else { - char * range_str = stringlist_alloc_joined_substring( args, offset+1, stringlist_get_size(args), ""); - string_util_init_value_list(range_str, iterations); - free(range_str); - } - } - } - - enkf_main_export_runpath_file(enkf_main, realizations, iterations); - - int_vector_free(realizations); - int_vector_free(iterations); - - return NULL; -} - - - -void * enkf_main_std_scale_correlated_obs_JOB(void * self, const stringlist_type * args) { - - if (stringlist_get_size(args) > 0) { - enkf_main_type * enkf_main = enkf_main_safe_cast( self ); - int ensemble_size = enkf_main_get_ensemble_size(enkf_main); - enkf_fs_type * fs = enkf_main_job_get_fs( enkf_main ); - enkf_obs_type * obs = enkf_main_get_obs( enkf_main ); - int_vector_type * realizations = int_vector_alloc(1, 0); - local_obsdata_type * obsdata = local_obsdata_alloc( "OBS-JOB" ); - - int_vector_init_range(realizations, 0, ensemble_size, 1); - - for (int iarg = 0; iarg < stringlist_get_size(args); iarg++) { - const char * arg_key = stringlist_iget( args , iarg ); - stringlist_type * key_list = enkf_obs_alloc_matching_keylist(obs, arg_key); - for (int iobs=0; iobs < stringlist_get_size( key_list ); iobs++) { - const char * obs_key = stringlist_iget( key_list , iobs); - const obs_vector_type * obs_vector = enkf_obs_get_vector(obs, obs_key); - local_obsdata_add_node( obsdata , obs_vector_alloc_local_node(obs_vector) ); - } - stringlist_free( key_list ); - } - - if (local_obsdata_get_size(obsdata) > 0) - enkf_obs_scale_correlated_std(obs, fs, realizations, obsdata ); - - local_obsdata_free( obsdata ); - } - - return NULL; -} - - -void * enkf_main_analysis_update_JOB( void * self , const stringlist_type * args) { - enkf_main_type * enkf_main = enkf_main_safe_cast( self ); - enkf_fs_type * source_fs = enkf_main_mount_alt_fs( enkf_main , stringlist_iget(args , 0 ) , false); - enkf_fs_type * target_fs = enkf_main_mount_alt_fs( enkf_main , stringlist_iget(args , 1 ) , true); - - enkf_main_smoother_update( enkf_main , source_fs , target_fs); - - enkf_fs_decref( source_fs ); - enkf_fs_decref( target_fs ); - return NULL; -} - diff --git a/ThirdParty/Ert/libenkf/src/enkf_main_manage_fs.c b/ThirdParty/Ert/libenkf/src/enkf_main_manage_fs.c deleted file mode 100644 index e5961ac895..0000000000 --- a/ThirdParty/Ert/libenkf/src/enkf_main_manage_fs.c +++ /dev/null @@ -1,683 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_main_manage_fs.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - - -/* - This small function is here only to make sure that the main - enkf_main.c file does not contain any explicit mention of the - dbase member. -*/ - -static void enkf_main_init_fs( enkf_main_type * enkf_main ) { - enkf_main->dbase = NULL; -} - - - -bool enkf_main_case_is_current(const enkf_main_type * enkf_main , const char * case_path) { - char * mount_point = enkf_main_alloc_mount_point( enkf_main , case_path ); - const char * current_mount_point = NULL; - bool is_current; - - if (enkf_main->dbase != NULL) - current_mount_point = enkf_fs_get_mount_point( enkf_main->dbase ); - - is_current = util_string_equal( mount_point , current_mount_point ); - free( mount_point ); - return is_current; -} - -static bool enkf_main_current_case_file_exists( const enkf_main_type * enkf_main) { - const char * ens_path = model_config_get_enspath( enkf_main->model_config); - char * current_case_file = util_alloc_filename(ens_path, CURRENT_CASE_FILE, NULL); - bool exists = util_file_exists(current_case_file); - free(current_case_file); - return exists; -} - -char* enkf_main_read_alloc_current_case_name(const enkf_main_type * enkf_main) { - char * current_case = NULL; - const char * ens_path = model_config_get_enspath( enkf_main->model_config); - char * current_case_file = util_alloc_filename(ens_path, CURRENT_CASE_FILE, NULL); - if (enkf_main_current_case_file_exists(enkf_main)) { - FILE * stream = util_fopen( current_case_file , "r"); - current_case = util_fscanf_alloc_token(stream); - util_fclose(stream); - } else { - util_abort("%s: File: storage/current_case not found, aborting! \n",__func__); - } - free(current_case_file); - return current_case; -} - - - - - -stringlist_type * enkf_main_alloc_caselist( const enkf_main_type * enkf_main ) { - stringlist_type * case_list = stringlist_alloc_new( ); - { - const char * ens_path = model_config_get_enspath( enkf_main->model_config ); - DIR * ens_dir = opendir( ens_path ); - if (ens_dir != NULL) { - int ens_fd = dirfd( ens_dir ); - if (ens_fd != -1) { - struct dirent * dp; - do { - dp = readdir( ens_dir ); - if (dp != NULL) { - if (!(util_string_equal( dp->d_name , ".") || util_string_equal(dp->d_name , ".."))) { - if (!util_string_equal( dp->d_name , CURRENT_CASE_FILE)) { - char * full_path = util_alloc_filename( ens_path , dp->d_name , NULL); - if (util_is_directory( full_path )) - stringlist_append_copy( case_list , dp->d_name ); - free( full_path); - } - } - } - } while (dp != NULL); - } - } - closedir( ens_dir ); - } - return case_list; -} - - -void enkf_main_set_case_table( enkf_main_type * enkf_main , const char * case_table_file ) { - model_config_set_case_table( enkf_main->model_config , enkf_main->ens_size , case_table_file ); -} - - - -static void * enkf_main_initialize_from_scratch_mt(void * void_arg) { - arg_pack_type * arg_pack = arg_pack_safe_cast( void_arg ); - enkf_main_type * enkf_main = arg_pack_iget_ptr( arg_pack , 0); - enkf_fs_type * init_fs = arg_pack_iget_ptr( arg_pack , 1); - const stringlist_type * param_list = arg_pack_iget_const_ptr( arg_pack , 2 ); - int iens = arg_pack_iget_int( arg_pack , 3 ); - init_mode_type init_mode = arg_pack_iget_int( arg_pack , 4 ); - enkf_state_type * state = enkf_main_iget_state( enkf_main , iens); - enkf_state_initialize( state , init_fs , param_list , init_mode); - return NULL; -} - -void enkf_main_initialize_from_scratch(enkf_main_type * enkf_main , enkf_fs_type * init_fs , const stringlist_type * param_list ,const bool_vector_type * iens_mask , init_mode_type init_mode) { - int num_cpu = 4; - int ens_size = enkf_main_get_ensemble_size( enkf_main ); - thread_pool_type * tp = thread_pool_alloc( num_cpu , true ); - arg_pack_type ** arg_list = util_calloc( ens_size , sizeof * arg_list ); - int i; - int iens; - - for (iens = 0; iens < ens_size; iens++) { - arg_list[iens] = arg_pack_alloc(); - if (bool_vector_safe_iget(iens_mask , iens)) { - arg_pack_append_ptr( arg_list[iens] , enkf_main ); - arg_pack_append_ptr( arg_list[iens] , init_fs ); - arg_pack_append_const_ptr( arg_list[iens] , param_list ); - arg_pack_append_int( arg_list[iens] , iens ); - arg_pack_append_int( arg_list[iens] , init_mode ); - - thread_pool_add_job( tp , enkf_main_initialize_from_scratch_mt , arg_list[iens]); - } - } - thread_pool_join( tp ); - for (i = 0; i < ens_size; i++){ - arg_pack_free( arg_list[i] ); - } - free( arg_list ); - thread_pool_free( tp ); -} - - - - -static void enkf_main_copy_ensemble( const enkf_main_type * enkf_main, - enkf_fs_type * source_case_fs, - int source_report_step, - enkf_fs_type * target_case_fs, - int target_report_step, - const bool_vector_type * iens_mask, - const char * ranking_key , /* It is OK to supply NULL - but if != NULL it must exist */ - const stringlist_type * node_list) { - - const int ens_size = enkf_main_get_ensemble_size( enkf_main ); - state_map_type * target_state_map = enkf_fs_get_state_map(target_case_fs); - - { - int * ranking_permutation; - int inode , src_iens; - - if (ranking_key != NULL) { - ranking_table_type * ranking_table = enkf_main_get_ranking_table( enkf_main ); - ranking_permutation = (int *) ranking_table_get_permutation( ranking_table , ranking_key ); - } else { - ranking_permutation = util_calloc( ens_size , sizeof * ranking_permutation ); - for (src_iens = 0; src_iens < ens_size; src_iens++) - ranking_permutation[src_iens] = src_iens; - } - - for (inode =0; inode < stringlist_get_size( node_list ); inode++) { - enkf_config_node_type * config_node = ensemble_config_get_node( enkf_main_get_ensemble_config(enkf_main) , stringlist_iget( node_list , inode )); - for (src_iens = 0; src_iens < enkf_main_get_ensemble_size( enkf_main ); src_iens++) { - if (bool_vector_safe_iget(iens_mask , src_iens)) { - int target_iens = ranking_permutation[src_iens]; - node_id_type src_id = {.report_step = source_report_step , .iens = src_iens }; - node_id_type target_id = {.report_step = target_report_step , .iens = target_iens }; - - /* The copy is careful ... */ - if (enkf_config_node_has_node( config_node , source_case_fs , src_id)) - enkf_node_copy( config_node , - source_case_fs , target_case_fs , - src_id , target_id ); - - if (0 == target_report_step) - state_map_iset(target_state_map, target_iens, STATE_INITIALIZED); - } - } - } - - if (ranking_permutation == NULL) - free( ranking_permutation ); - } -} - - - -void enkf_main_init_current_case_from_existing(enkf_main_type * enkf_main, - enkf_fs_type * source_case_fs, - int source_report_step) { - - enkf_fs_type * current_fs = enkf_main_get_fs(enkf_main); - - enkf_main_init_case_from_existing(enkf_main, - source_case_fs, - source_report_step, - current_fs); - -} - - -void enkf_main_init_current_case_from_existing_custom(enkf_main_type * enkf_main, - enkf_fs_type * source_case_fs, - int source_report_step, - stringlist_type * node_list, - bool_vector_type * iactive) { - - enkf_fs_type * current_fs = enkf_main_get_fs(enkf_main); - - enkf_main_init_case_from_existing_custom(enkf_main, - source_case_fs, - source_report_step, - current_fs, - node_list, - iactive); - -} - - -void enkf_main_init_case_from_existing(const enkf_main_type * enkf_main, - enkf_fs_type * source_case_fs, - int source_report_step, - enkf_fs_type * target_case_fs ) { - - stringlist_type * param_list = ensemble_config_alloc_keylist_from_var_type( enkf_main_get_ensemble_config(enkf_main) , PARAMETER ); /* Select only paramters - will fail for GEN_DATA of type DYNAMIC_STATE. */ - int target_report_step = 0; - bool_vector_type * iactive = bool_vector_alloc( 0 , true ); - - enkf_main_copy_ensemble(enkf_main, - source_case_fs, - source_report_step, - target_case_fs, - target_report_step, - iactive, - NULL, - param_list); - - - enkf_fs_fsync(target_case_fs); - - bool_vector_free(iactive); - stringlist_free(param_list); -} - - -void enkf_main_init_case_from_existing_custom(const enkf_main_type * enkf_main, - enkf_fs_type * source_case_fs, - int source_report_step, - enkf_fs_type * target_case_fs, - stringlist_type * node_list, - bool_vector_type * iactive) { - - int target_report_step = 0; - - enkf_main_copy_ensemble(enkf_main, - source_case_fs, - source_report_step, - target_case_fs, - target_report_step, - iactive, - NULL, - node_list); - - enkf_fs_fsync(target_case_fs); -} - - - - -/** - This function will go through the filesystem and check that we have - initial data for all parameters and all realizations. If the second - argument mask is different from NULL, the function will only - consider the realizations for which mask is true (if mask == NULL - all realizations will be checked). -*/ - -static bool enkf_main_case_is_initialized__( const enkf_main_type * enkf_main , enkf_fs_type * fs , bool_vector_type * __mask) { - stringlist_type * parameter_keys = ensemble_config_alloc_keylist_from_var_type( enkf_main->ensemble_config , PARAMETER ); - bool_vector_type * mask; - bool initialized = true; - int ikey = 0; - if (__mask != NULL) - mask = __mask; - else - mask = bool_vector_alloc(0 , true ); - - while ((ikey < stringlist_get_size( parameter_keys )) && (initialized)) { - const enkf_config_node_type * config_node = ensemble_config_get_node( enkf_main->ensemble_config , stringlist_iget( parameter_keys , ikey) ); - int iens = 0; - do { - if (bool_vector_safe_iget( mask , iens)) { - node_id_type node_id = {.report_step = 0 , .iens = iens }; - initialized = enkf_config_node_has_node( config_node , fs , node_id); - } - iens++; - } while ((iens < enkf_main->ens_size) && (initialized)); - ikey++; - } - - stringlist_free( parameter_keys ); - if (__mask == NULL) - bool_vector_free( mask ); - return initialized; -} - - - -bool enkf_main_case_is_initialized( const enkf_main_type * enkf_main , const char * case_name , bool_vector_type * __mask) { - enkf_fs_type * fs = enkf_main_mount_alt_fs(enkf_main , case_name , false ); - if (fs) { - bool initialized = enkf_main_case_is_initialized__(enkf_main , fs , __mask); - enkf_fs_decref( fs ); - return initialized; - } else - return false; -} - - - -bool enkf_main_is_initialized( const enkf_main_type * enkf_main , bool_vector_type * __mask) { - return enkf_main_case_is_initialized__(enkf_main , enkf_main->dbase , __mask); -} - - -static void update_case_log(enkf_main_type * enkf_main , const char * case_path) { - /* : Update a small text file with the name of the host currently - running ert, the pid number of the process, the active case - and when it started. - - If the previous shutdown was unclean the file will be around, - and we will need the info from the previous invocation which - is in the file. For that reason we open with mode 'a' instead - of 'w'. - */ - - const char * ens_path = model_config_get_enspath( enkf_main->model_config); - - { - int buffer_size = 256; - char * current_host = util_alloc_filename( ens_path , CASE_LOG , NULL ); - FILE * stream = util_fopen( current_host , "a"); - - fprintf(stream , "CASE:%-16s " , case_path ); - fprintf(stream , "PID:%-8d " , getpid()); - { - char hostname[buffer_size]; - gethostname( hostname , buffer_size ); - fprintf(stream , "HOST:%-16s " , hostname ); - } - - - { - int year,month,day,hour,minute,second; - time_t now = time( NULL ); - - util_set_datetime_values_utc( now , &second , &minute , &hour , &day , &month , &year ); - - fprintf(stream , "TIME:%02d/%02d/%4d-%02d.%02d.%02d\n" , day , month , year , hour , minute , second); - } - fclose( stream ); - free( current_host ); - } -} - - - -static void enkf_main_write_current_case_file( const enkf_main_type * enkf_main, const char * case_path) { - const char * ens_path = model_config_get_enspath( enkf_main->model_config); - const char * base = CURRENT_CASE_FILE; - char * current_case_file = util_alloc_filename(ens_path , base, NULL); - FILE * stream = util_fopen( current_case_file , "w"); - fprintf(stream, "%s", case_path); - util_fclose(stream); - free(current_case_file); -} - - -static void enkf_main_gen_data_special( enkf_main_type * enkf_main , enkf_fs_type * fs ) { - stringlist_type * gen_data_keys = ensemble_config_alloc_keylist_from_impl_type( enkf_main->ensemble_config , GEN_DATA); - for (int i=0; i < stringlist_get_size( gen_data_keys ); i++) { - enkf_config_node_type * config_node = ensemble_config_get_node( enkf_main->ensemble_config , stringlist_iget( gen_data_keys , i)); - gen_data_config_type * gen_data_config = enkf_config_node_get_ref( config_node ); - - if (gen_data_config_is_dynamic( gen_data_config )) - gen_data_config_set_ens_size( gen_data_config , enkf_main->ens_size ); - - } - stringlist_free( gen_data_keys ); -} - - -static void enkf_main_update_current_case( enkf_main_type * enkf_main , const char * case_path /* Can be NULL */) { - if (!case_path) - case_path = enkf_fs_get_case_name( enkf_main_get_fs(enkf_main) ); - - enkf_main_write_current_case_file(enkf_main, case_path); - update_case_log(enkf_main , case_path); - - enkf_main_gen_data_special( enkf_main , enkf_main_get_fs( enkf_main )); - enkf_main_add_subst_kw( enkf_main , "ERT-CASE" , enkf_main_get_current_fs( enkf_main ) , "Current case" , true ); - enkf_main_add_subst_kw( enkf_main , "ERTCASE" , enkf_main_get_current_fs( enkf_main ) , "Current case" , true ); -} - - - -static void enkf_main_create_fs( const enkf_main_type * enkf_main , const char * case_path ) { - char * new_mount_point = enkf_main_alloc_mount_point( enkf_main , case_path ); - - enkf_fs_create_fs( new_mount_point, - model_config_get_dbase_type( enkf_main->model_config ) , - model_config_get_dbase_args( enkf_main->model_config ) , - false ); - - free( new_mount_point ); -} - - -const char * enkf_main_get_mount_root( const enkf_main_type * enkf_main) { - return model_config_get_enspath( enkf_main->model_config); -} - - - -char * enkf_main_alloc_mount_point( const enkf_main_type * enkf_main , const char * case_path) { - char * mount_point; - if (util_is_abs_path( case_path )) - mount_point = util_alloc_string_copy( case_path ); - else - mount_point = util_alloc_filename( model_config_get_enspath( enkf_main->model_config) , case_path , NULL); - return mount_point; -} - -/* - Return a weak reference - i.e. the refcount is not increased. -*/ -enkf_fs_type * enkf_main_get_fs(const enkf_main_type * enkf_main) { - return enkf_main->dbase; -} - -enkf_fs_type * enkf_main_tui_get_fs(const enkf_main_type * enkf_main) { - return enkf_main->dbase; -} - -enkf_fs_type * enkf_main_job_get_fs(const enkf_main_type * enkf_main) { - return enkf_main->dbase; -} - - -enkf_fs_type * enkf_main_get_fs_ref(const enkf_main_type * enkf_main) { - return enkf_fs_get_ref( enkf_main->dbase ); -} - - -const char * enkf_main_get_current_fs( const enkf_main_type * enkf_main ) { - return enkf_fs_get_case_name( enkf_main->dbase ); -} - - - -/* - This function will return a valid enkf_fs instance; either just a - pointer to the current enkf_main->dbase, or alternatively it will - create a brand new fs instance. Because we do not really know whether - a new instance has been created or not resource handling becomes - slightly non trivial: - - - 1. When calling scope is finished with the enkf_fs instance it - must call enkf_fs_decref(); the enkf_fs_decref() function will - close the filesystem and free all resources when the reference - count has reached zero. -*/ - - -enkf_fs_type * enkf_main_mount_alt_fs(const enkf_main_type * enkf_main , const char * case_path , bool create) { - if (enkf_main_case_is_current( enkf_main , case_path )) { - // Fast path - we just return a reference to the currently selected case; - // with increased refcount. - enkf_fs_incref( enkf_main->dbase ); - return enkf_main->dbase; - } else { - // We have asked for an alterantive fs - must mount and possibly create that first. - enkf_fs_type * new_fs = NULL; - if (case_path != NULL) { - char * new_mount_point = enkf_main_alloc_mount_point( enkf_main , case_path ); - - if (!enkf_fs_exists( new_mount_point )) { - if (create) - enkf_main_create_fs( enkf_main , case_path ); - } - - new_fs = enkf_fs_mount( new_mount_point ); - if (new_fs) { - const model_config_type * model_config = enkf_main_get_model_config( enkf_main ); - const ecl_sum_type * refcase = model_config_get_refcase( model_config ); - - if (refcase) { - time_map_type * time_map = enkf_fs_get_time_map( new_fs ); - if (time_map_attach_refcase( time_map , refcase)) - time_map_set_strict( time_map , false ); - else - ert_log_add_fmt_message(1 , stderr , "Warning mismatch between refcase:%s and existing case:%s" , ecl_sum_get_case( refcase ) , new_mount_point); - } - } - - free( new_mount_point ); - } - return new_fs; - } -} - - -static void enkf_main_update_summary_config_from_fs__(enkf_main_type * enkf_main, enkf_fs_type * fs) { - ensemble_config_type * ensemble_config = enkf_main_get_ensemble_config(enkf_main); - summary_key_set_type * summary_key_set = enkf_fs_get_summary_key_set(fs); - stringlist_type * keys = summary_key_set_alloc_keys(summary_key_set); - - for(int i = 0; i < stringlist_get_size(keys); i++) { - const char * key = stringlist_iget(keys, i); - ensemble_config_add_summary(ensemble_config, key, LOAD_FAIL_SILENT); - } - stringlist_free( keys ); -} - - -static void enkf_main_update_custom_kw_config_from_fs__(enkf_main_type * enkf_main, enkf_fs_type * fs) { - ensemble_config_type * ensemble_config = enkf_main_get_ensemble_config(enkf_main); - custom_kw_config_set_type * custom_kw_config_set = enkf_fs_get_custom_kw_config_set(fs); - - ensemble_config_update_custom_kw_config(ensemble_config, custom_kw_config_set); -} - - -/** - The enkf_fs instances employ a simple reference counting - scheme. The main point with this system is to avoid opening the - full timesystem more than necessary (this is quite compute - intensive). This is essentially achieved by: - - 1. Create new fs instances by using the function - enkf_main_mount_alt_fs() - depending on the input arguments - this will either create a new enkf_fs instance or it will - just return a pointer to currently open fs instance; with an - increased refcount. - - 2. When you are finished with working with filesystem pointer - call enkf_fs_unmount() - this will reduce the refcount with - one, and eventually discard the complete datastructure when - the refcount has reached zero. - - 3. By using the function enkf_main_get_fs() / - enkf_fs_get_weakref() you get a pointer to the current fs - instance WITHOUT INCREASING THE REFCOUNT. This means that - scope calling one of these functions does not get any - ownership to the enkf_fs instance. - - The enkf_main instance will take ownership of the enkf_fs instance; - this implies that the calling scope must have proper ownership of - the fs instance which is passed in. The return value from - enkf_main_get_fs() can NOT be used as input to this function; this - is not checked for in any way - but the crash will be horrible if - this is not adhered to. -*/ - -void enkf_main_set_fs( enkf_main_type * enkf_main , enkf_fs_type * fs , const char * case_path /* Can be NULL */) { - if (enkf_main->dbase != fs) { - enkf_fs_incref( fs ); - - if (enkf_main->dbase) - enkf_fs_decref(enkf_main->dbase); - - enkf_main->dbase = fs; - enkf_main_update_current_case(enkf_main, case_path); - - enkf_main_update_summary_config_from_fs__(enkf_main, fs); - enkf_main_update_custom_kw_config_from_fs__(enkf_main, fs); - } -} - - - -void enkf_main_select_fs( enkf_main_type * enkf_main , const char * case_path ) { - if (enkf_main_case_is_current( enkf_main , case_path )) - return; /* We have tried to select the currently selected case - just return. */ - else { - enkf_fs_type * new_fs = enkf_main_mount_alt_fs( enkf_main , case_path , true ); - if (enkf_main->dbase == new_fs) - util_abort("%s : return reference to current FS in situation where that should not happen.\n",__func__); - - if (new_fs != NULL) - enkf_main_set_fs( enkf_main , new_fs , case_path); - else { - const char * ens_path = model_config_get_enspath( enkf_main->model_config ); - util_exit("%s: select filesystem %s:%s failed \n",__func__ , ens_path , case_path ); - } - enkf_fs_decref( new_fs ); - } -} - - -static void enkf_main_user_select_initial_fs(enkf_main_type * enkf_main) { - const char * ens_path = model_config_get_enspath( enkf_main->model_config); - int root_version = enkf_fs_get_version104( ens_path ); - if (root_version == -1 || root_version == 105) { - char * current_mount_point = util_alloc_filename( ens_path , CURRENT_CASE , NULL); - - if (enkf_main_current_case_file_exists(enkf_main)) { - char * current_case = enkf_main_read_alloc_current_case_name(enkf_main); - enkf_main_select_fs(enkf_main, current_case); - free (current_case); - } else if (enkf_fs_exists( current_mount_point ) && util_is_link( current_mount_point )) { - /*If the current_case file does not exists, but the 'current' symlink does we use readlink to - get hold of the actual target before calling the enkf_main_select_fs() function. We then - write the current_case file and delete the symlink.*/ - char * target_case = util_alloc_atlink_target( ens_path , CURRENT_CASE ); - enkf_main_select_fs( enkf_main , target_case ); - unlink(current_mount_point); - enkf_main_write_current_case_file(enkf_main, target_case); - free( target_case ); - } else - enkf_main_select_fs( enkf_main , DEFAULT_CASE ); // Selecting (a new) default case - - free( current_mount_point ); - } else { - fprintf(stderr,"Sorry: the filesystem located in %s must be upgraded before the current ERT version can read it.\n" , ens_path); - exit(1); - } -} - - -bool enkf_main_fs_exists(const enkf_main_type * enkf_main, const char * input_case){ - bool exists = false; - char * new_mount_point = enkf_main_alloc_mount_point( enkf_main , input_case); - if(enkf_fs_exists( new_mount_point )) - exists = true; - - free( new_mount_point ); - return exists; -} - - - -state_map_type * enkf_main_alloc_readonly_state_map( const enkf_main_type * enkf_main , const char * case_path) { - char * mount_point = enkf_main_alloc_mount_point( enkf_main , case_path ); - state_map_type * state_map = enkf_fs_alloc_readonly_state_map( mount_point ); - free( mount_point ); - return state_map; -} - - - -time_map_type * enkf_main_alloc_readonly_time_map( const enkf_main_type * enkf_main , const char * case_path ) { - char * mount_point = enkf_main_alloc_mount_point( enkf_main , case_path ); - time_map_type * time_map = enkf_fs_alloc_readonly_time_map( mount_point ); - free( mount_point ); - return time_map; -} - - -void enkf_main_close_fs( enkf_main_type * enkf_main ) { - if (enkf_main->dbase != NULL) - enkf_fs_decref( enkf_main->dbase ); -} - diff --git a/ThirdParty/Ert/libenkf/src/enkf_main_update.c b/ThirdParty/Ert/libenkf/src/enkf_main_update.c deleted file mode 100644 index bff4eb8ee8..0000000000 --- a/ThirdParty/Ert/libenkf/src/enkf_main_update.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_main_update.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include - -/** - This file implements functions related to updating the state. The - really low level functions related to the analysis is implemented - in enkf_analysis.h. - - This file only implements code for updating, and not any data - structures. -*/ - -#include "enkf_main_struct.h" - - diff --git a/ThirdParty/Ert/libenkf/src/enkf_node.c b/ThirdParty/Ert/libenkf/src/enkf_node.c deleted file mode 100644 index b6dd09781e..0000000000 --- a/ThirdParty/Ert/libenkf/src/enkf_node.c +++ /dev/null @@ -1,1071 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_node.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/** - A small illustration (says more than thousand words ...) of how the - enkf_node, enkf_config_node, field[1] and field_config[1] objects - are linked. - - - ================ - | | o----------- - | ================ | ===================== - | | | o-------- | | - | | ================ |-------------> | | - | | | | | | enkf_config_node | - | | | | | | | - ===| | enkf_node | o------ | | - o | | | | | - | ===| | ===================== - | o | | o - | | ================ | - | | o | - | \ | | - | \ | | - | | | | - | | | | - | | | | - | | | | - \|/ | | | - ======|======|== \|/ - | \|/ | | o----------- - | ==========|===== | ===================== - | | \|/ | o-------- | | - | | ================ |-------------> | | - | | | | | | field_config | - | | | | | | | - ===| | field | o------ | | - | | | | | - === | | ===================== - | | - ================ - - - To summarize in words: - - * The enkf_node object is an abstract object, which again contains - a spesific enkf_object, like e.g. the field objects shown - here. In general we have an ensemble of enkf_node objects. - - * The enkf_node objects contain a pointer to a enkf_config_node - object. - - * The enkf_config_node object contains a pointer to the spesific - config object, i.e. field_config in this case. - - * All the field objects contain a pointer to a field_config object. - - - [1]: field is just an example, and could be replaced with any of - the enkf object types. -*/ - -/*-----------------------------------------------------------------*/ - -/** - A note on memory - ================ - - The enkf_nodes can consume large amounts of memory, and for large - models/ensembles we have a situation where not all the - members/fields can be in memory simultanouesly - such low-memory - situations are not really supported at the moment, but we have - implemented some support for such problems: - - o All enkf objects should have a xxx_realloc_data() function. This - function should be implemented in such a way that it is always - safe to call, i.e. if the object already has allocated data the - function should just return. - - o All enkf objects should implement a xxx_free_data() - function. This function free the data of the object, and set the - data pointer to NULL. - - - The following 'rules' apply to the memory treatment: - ---------------------------------------------------- - - o Functions writing to memory can always be called, and it is their - responsibility to allocate memory before actually writing on it. The - writer functions are: - - enkf_node_initialize() - enkf_node_fread() - enkf_node_forward_load() - - These functions should all start with a call to - enkf_node_ensure_memory(). The (re)allocation of data is done at - the enkf_node level, and **NOT** in the low level object - (altough that is where it is eventually done of course). - - o When it comes to functions reading memory it is a bit more - tricky. It could be that if the functions are called without - memory, that just means that the object is not active or - something (and the function should just return). On the other - hand trying to read a NULL pointer does indicate that program - logic is not fully up to it? And should therefor maybe be - punished? - - o The only memory operation which is exported to 'user-space' - (i.e. the enkf_state object) is enkf_node_free_data(). - -*/ - - -/** - Keeeping track of node state. - ============================= - - To keep track of the state of the node's data (actually the data of - the contained enkf_object, i.e. a field) we have three higly - internal variables __state, __modified , __iens, and - __report_step. These three variables are used/updated in the - following manner: - - - - 1. The nodes are created with (modified, report_step, state, iens) == - (true , -1 , undefined , -1). - - 2. After initialization we set: report_step -> 0 , state -> - analyzed, modified -> true, iens -> -1 - - 3. After load (both from ensemble and ECLIPSE). We set modified -> - false, and report_step, state and iens according to the load - arguments. - - 4. After deserialize (i.e. update) we set modified -> true. - - 5. After write (to ensemble) we set in the same way as after load. - - 6. After free_data we invalidate according to the newly allocated - status. - - 7. In the ens_load routine we check if modified == false and the - report_step and state arguments agree with the current - values. IN THAT CASE WE JUST RETURN WITHOUT ACTUALLY HITTING - THE FILESYSTEM. This performance gain is the main point of the - whole excercise. -*/ - - - - -struct enkf_node_struct { - alloc_ftype * alloc; - ecl_write_ftype * ecl_write; - forward_load_ftype * forward_load; - forward_load_vector_ftype * forward_load_vector; - free_data_ftype * free_data; - user_get_ftype * user_get; - user_get_vector_ftype * user_get_vector; - set_inflation_ftype * set_inflation; - fload_ftype * fload; - has_data_ftype * has_data; - - serialize_ftype * serialize; - deserialize_ftype * deserialize; - read_from_buffer_ftype * read_from_buffer; - write_to_buffer_ftype * write_to_buffer; - initialize_ftype * initialize; - node_free_ftype * freef; - clear_ftype * clear; - node_copy_ftype * copy; - scale_ftype * scale; - iadd_ftype * iadd; - imul_ftype * imul; - isqrt_ftype * isqrt; - iaddsqr_ftype * iaddsqr; - - /******************************************************************/ - bool vector_storage; - char *node_key; /* The (hash)key this node is identified with. */ - void *data; /* A pointer to the underlying enkf_object, i.e. gen_kw_type instance, or a field_type instance or ... */ - const enkf_config_node_type *config; /* A pointer to a enkf_config_node instance (which again cointans a pointer to the config object of data). */ - /*****************************************************************/ - - vector_type *container_nodes; -}; - - -const enkf_config_node_type * enkf_node_get_config(const enkf_node_type * node) { - return node->config; -} - - -bool enkf_node_vector_storage( const enkf_node_type * node ) { - return node->vector_storage; -} - - -/*****************************************************************/ - -/* - All the function pointers REALLY should be in the config object ... -*/ - - -#define FUNC_ASSERT(func) if (func == NULL) util_abort("%s: function handler: %s not registered for node:%s - aborting\n",__func__ , #func , enkf_node->node_key); - - - - -void enkf_node_alloc_domain_object(enkf_node_type * node) { - if (node->data != NULL) - node->freef( node->data ); - node->data = node->alloc(enkf_config_node_get_ref(node->config)); -} - - - - -enkf_node_type * enkf_node_copyc(const enkf_node_type * enkf_node) { - FUNC_ASSERT(enkf_node->copy); - { - const enkf_node_type * src = enkf_node; - enkf_node_type * target; - target = enkf_node_alloc(src->config); - src->copy( src->data , target->data ); /* Calling the low level copy function */ - return target; - } -} - - - -bool enkf_node_include_type(const enkf_node_type * enkf_node, int mask) { - return enkf_config_node_include_type(enkf_node->config , mask); -} - - -ert_impl_type enkf_node_get_impl_type(const enkf_node_type * enkf_node) { - return enkf_config_node_get_impl_type(enkf_node->config); -} - - -enkf_var_type enkf_node_get_var_type(const enkf_node_type * enkf_node) { - return enkf_config_node_get_var_type(enkf_node->config); -} - -bool enkf_node_use_forward_init( const enkf_node_type * enkf_node ) { - return enkf_config_node_use_forward_init( enkf_node->config ); -} - - - -void * enkf_node_value_ptr(const enkf_node_type * enkf_node) { - return enkf_node->data; -} - - - -/** - This function calls the node spesific ecl_write function. IF the - ecl_file of the (node == NULL) *ONLY* the path is sent to the node - spesific file. -*/ - -void enkf_node_ecl_write(const enkf_node_type *enkf_node , const char *path , void * filestream , int report_step) { - if (enkf_node->ecl_write != NULL) { - char * node_eclfile = enkf_config_node_alloc_outfile(enkf_node->config , report_step); /* Will return NULL if the node does not have any outfile format. */ - /* - If the node does not have a outfile (i.e. ecl_file), the - ecl_write function will be called with file argument NULL. It - is then the responsability of the low-level implementation to - do "the right thing". - */ - enkf_node->ecl_write(enkf_node->data , path , node_eclfile , filestream); - util_safe_free( node_eclfile ); - } -} - - - -/** - This function takes a string - key - as input an calls a node - specific function to look up one scalar based on that key. The key - is always a string, but the the type of content will vary for the - different objects. For a field, the key will be a string of "i,j,k" - for a cell. - - If the user has asked for something which does not exist the - function SHOULD NOT FAIL; it should return false and set the *value - to 0. -*/ - - -bool enkf_node_user_get(enkf_node_type * enkf_node , enkf_fs_type * fs , const char * key , node_id_type node_id , double * value) { - return enkf_node_user_get_no_id( enkf_node , fs , key , node_id.report_step , node_id.iens , value ); -} - -bool enkf_node_user_get_no_id(enkf_node_type * enkf_node , enkf_fs_type * fs , const char * key , int report_step, int iens, double * value) { - node_id_type node_id = {.report_step = report_step , .iens = iens}; - bool loadOK; - FUNC_ASSERT( enkf_node->user_get ); - { - loadOK = enkf_node_try_load( enkf_node , fs , node_id); - - if (loadOK) - return enkf_node->user_get(enkf_node->data , key , report_step, value); - else { - *value = 0; - return false; - } - } -} - -bool enkf_node_user_get_vector( enkf_node_type * enkf_node , enkf_fs_type * fs , const char * key , int iens , double_vector_type * values) { - if (enkf_node->vector_storage) { - if (enkf_node_try_load_vector( enkf_node , fs , iens )) { - enkf_node->user_get_vector( enkf_node->data , key , values); - return true; - } else - return false; - } else { - util_abort("%s: internal error - function should only be called by nodes with vector storage.\n",__func__); - return false; - } -} - - - -bool enkf_node_fload( enkf_node_type * enkf_node , const char * filename ) { - FUNC_ASSERT( enkf_node->fload ); - return enkf_node->fload( enkf_node->data , filename ); -} - - - -/** - This function loads (internalizes) ECLIPSE results, the ecl_file - instance with restart data, and the ecl_sum instance with summary - data must already be loaded by the calling function. - - IFF the enkf_node has registered a filename to load from, that is - passed to the specific load function, otherwise the run_path is sent - to the load function. - - If the node does not have a forward_load function, the function just - returns. -*/ - - -bool enkf_node_forward_load(enkf_node_type *enkf_node , const forward_load_context_type * load_context) { - bool loadOK; - FUNC_ASSERT(enkf_node->forward_load); - { - if (enkf_node_get_impl_type(enkf_node) == SUMMARY) - /* Fast path for loading summary data. */ - loadOK = enkf_node->forward_load(enkf_node->data , NULL , load_context); - else { - char * input_file = enkf_config_node_alloc_infile(enkf_node->config , forward_load_context_get_load_step( load_context )); - - if (input_file != NULL) { - char * file = util_alloc_filename( forward_load_context_get_run_path( load_context ) , input_file , NULL); - loadOK = enkf_node->forward_load(enkf_node->data , file , load_context); - free(file); - } else - loadOK = enkf_node->forward_load(enkf_node->data , NULL , load_context); - - util_safe_free( input_file ); - } - } - return loadOK; -} - - -bool enkf_node_forward_init(enkf_node_type * enkf_node , const char * run_path , int iens) { - char * init_file = enkf_config_node_alloc_initfile( enkf_node->config , run_path , iens ); - bool init = enkf_node->initialize(enkf_node->data , iens , init_file, NULL); - util_safe_free( init_file ); - return init; -} - - - -bool enkf_node_forward_load_vector(enkf_node_type *enkf_node , const forward_load_context_type * load_context , const int_vector_type * time_index) { - bool loadOK; - FUNC_ASSERT(enkf_node->forward_load_vector); - loadOK = enkf_node->forward_load_vector(enkf_node->data , NULL , load_context , time_index); - - return loadOK; -} - - - - - - -/** - This function compares the internal __report_step with the input - report_step, and return true if they are equal. It is used in the - calling scope to discard static nodes which are no longer in use. -*/ - - - -static bool enkf_node_store_buffer( enkf_node_type * enkf_node , enkf_fs_type * fs , int report_step , int iens) { - FUNC_ASSERT(enkf_node->write_to_buffer); - { - bool data_written; - buffer_type * buffer = buffer_alloc( 100 ); - const enkf_config_node_type * config_node = enkf_node_get_config( enkf_node ); - buffer_fwrite_time_t( buffer , time(NULL)); - data_written = enkf_node->write_to_buffer(enkf_node->data , buffer , report_step ); - if (data_written) { - const char * node_key = enkf_config_node_get_key( config_node ); - enkf_var_type var_type = enkf_config_node_get_var_type( config_node ); - - if (enkf_node->vector_storage) - enkf_fs_fwrite_vector( fs , buffer , node_key , var_type , iens ); - else - enkf_fs_fwrite_node( fs , buffer , node_key , var_type , report_step , iens ); - - } - buffer_free( buffer ); - return data_written; - } -} - -bool enkf_node_store_vector(enkf_node_type *enkf_node , enkf_fs_type * fs , int iens ) { - return enkf_node_store_buffer( enkf_node , fs , -1 , iens ); -} - - - -bool enkf_node_store(enkf_node_type * enkf_node , enkf_fs_type * fs , bool force_vectors , node_id_type node_id) { - if (enkf_node->vector_storage) { - if (force_vectors) - return enkf_node_store_vector( enkf_node , fs , node_id.iens ); - else - return false; - } else { - if (node_id.report_step == 0) { - ert_impl_type impl_type = enkf_node_get_impl_type(enkf_node); - if (impl_type == SUMMARY) - return false; /* For report step == 0 the summary data is just garbage. */ - } - - return enkf_node_store_buffer( enkf_node , fs , node_id.report_step , node_id.iens ); - } -} - - - -/** - This function will load a node from the filesystem if it is - available; if not it will just return false. - - The state argument can be 'both' - in which case it will first try - the analyzed, and then subsequently the forecast before giving up - and returning false. If the function returns true with state == - 'both' it is no way to determine which version was actually loaded. -*/ - -bool enkf_node_try_load(enkf_node_type *enkf_node , enkf_fs_type * fs , node_id_type node_id) { - if (enkf_node_has_data( enkf_node , fs , node_id)) { - enkf_node_load( enkf_node , fs , node_id); - return true; - } else - return false; -} - - -static void enkf_node_buffer_load( enkf_node_type * enkf_node , enkf_fs_type * fs , int report_step , int iens) { - FUNC_ASSERT(enkf_node->read_from_buffer); - { - buffer_type * buffer = buffer_alloc( 100 ); - const enkf_config_node_type * config_node = enkf_node_get_config( enkf_node ); - const char * node_key = enkf_config_node_get_key( config_node ); - enkf_var_type var_type = enkf_config_node_get_var_type( config_node ); - - if (enkf_node->vector_storage) - enkf_fs_fread_vector( fs , buffer , node_key , var_type , iens ); - else - enkf_fs_fread_node( fs , buffer , node_key , var_type , report_step , iens ); - - buffer_fskip_time_t( buffer ); - enkf_node->read_from_buffer(enkf_node->data , buffer , fs , report_step ); - buffer_free( buffer ); - } -} - - - - -void enkf_node_load_vector( enkf_node_type * enkf_node , enkf_fs_type * fs , int iens ) { - enkf_node_buffer_load( enkf_node , fs , -1 , iens ); -} - - - -static void enkf_node_load_container( enkf_node_type * enkf_node , enkf_fs_type * fs , node_id_type node_id ) { - for (int inode=0; inode < vector_get_size( enkf_node->container_nodes ); inode++) { - enkf_node_type * child_node = vector_iget( enkf_node->container_nodes , inode ); - enkf_node_load( child_node , fs , node_id ); - } -} - - -void enkf_node_load(enkf_node_type * enkf_node , enkf_fs_type * fs , node_id_type node_id) { - if (enkf_node_get_impl_type(enkf_node) == CONTAINER) - enkf_node_load_container( enkf_node , fs , node_id ); - else { - if (enkf_node->vector_storage) - enkf_node_load_vector( enkf_node , fs , node_id.iens ); - else - /* Normal load path */ - enkf_node_buffer_load( enkf_node , fs , node_id.report_step, node_id.iens ); - } -} - - -bool enkf_node_try_load_vector(enkf_node_type *enkf_node , enkf_fs_type * fs , int iens ) { - if (enkf_config_node_has_vector( enkf_node->config , fs , iens)) { - enkf_node_load_vector( enkf_node , fs , iens ); - return true; - } else - return false; -} - - - - - -/* - In the case of nodes with vector storage this function - will load the entire vector. -*/ - -enkf_node_type * enkf_node_load_alloc( const enkf_config_node_type * config_node , enkf_fs_type * fs , node_id_type node_id) { - if (enkf_config_node_vector_storage( config_node )) { - if (enkf_config_node_has_vector( config_node , fs , node_id.iens)) { - enkf_node_type * node = enkf_node_alloc( config_node ); - enkf_node_load( node , fs , node_id ); - return node; - } else { - util_abort("%s: could not load vector:%s from iens:%d\n",__func__ , enkf_config_node_get_key( config_node ), - node_id.iens ); - return NULL; - } - } else { - if (enkf_config_node_has_node( config_node , fs , node_id)) { - enkf_node_type * node = enkf_node_alloc( config_node ); - enkf_node_load( node , fs , node_id ); - return node; - } else { - util_abort("%s: Could not load node: key:%s iens:%d report:%d \n", - __func__ , - enkf_config_node_get_key( config_node ) , - node_id.iens , node_id.report_step ); - return NULL; - } - } -} - - - -void enkf_node_copy(const enkf_config_node_type * config_node , - enkf_fs_type * src_case, - enkf_fs_type * target_case, - node_id_type src_id , - node_id_type target_id) { - - enkf_node_type * enkf_node = enkf_node_load_alloc(config_node, src_case , src_id); - - - /* Hack to ensure that size is set for the gen_data instances. - This sneeks low level stuff into a high level scope. BAD. */ - { - ert_impl_type impl_type = enkf_node_get_impl_type( enkf_node ); - if (impl_type == GEN_DATA) { - /* Read the size at report_step_from */ - gen_data_type * gen_data = enkf_node_value_ptr( enkf_node ); - int size = gen_data_get_size( gen_data ); - - /* Enforce the size at report_step_to */ - gen_data_assert_size( gen_data , size , target_id.report_step); - } - } - - enkf_node_store(enkf_node, target_case , true , target_id ); - enkf_node_free(enkf_node); -} - -bool enkf_node_has_data( enkf_node_type * enkf_node , enkf_fs_type * fs , node_id_type node_id) { - if (enkf_node->vector_storage) { - FUNC_ASSERT(enkf_node->has_data); - { - int report_step = node_id.report_step; - int iens = node_id.iens; - - // Try to load the vector. - if (enkf_config_node_has_vector( enkf_node->config , fs , iens )) { - enkf_node_load_vector( enkf_node , fs , iens); - - // The vector is loaded. Check if we have the report_step/state asked for: - return enkf_node->has_data( enkf_node->data , report_step ); - } else - return false; - } - } else - return enkf_config_node_has_node( enkf_node->config , fs , node_id ); -} - - -/** - Copy an ensemble of nodes. Note that the limits are inclusive. -*/ - -void enkf_node_copy_ensemble(const enkf_config_node_type * config_node , - enkf_fs_type * src_case , - enkf_fs_type * target_case , - int report_step_from, /* src state */ - int report_step_to , /* target state */ - int ens_size, - const perm_vector_type * permutations) { - - node_id_type src_id = {.report_step = report_step_from , .iens = 0 }; - node_id_type target_id = {.report_step = report_step_to , .iens = 0 }; - - for(int iens_from = 0; iens_from < ens_size; iens_from++) { - int iens_to; - if (permutations == NULL) - iens_to = iens_from; - else - iens_to = perm_vector_iget(permutations, iens_from); - - src_id.iens = iens_from; - target_id.iens = iens_to; - - enkf_node_copy(config_node , src_case , target_case , src_id , target_id ); - } -} - - - -enkf_node_type ** enkf_node_load_alloc_ensemble( const enkf_config_node_type * config_node , enkf_fs_type * fs , - int report_step , int iens1 , int iens2) { - enkf_node_type ** ensemble = util_calloc( (iens2 - iens1) , sizeof * ensemble ); - for (int iens = iens1; iens < iens2; iens++) { - node_id_type node_id = {.report_step = report_step , .iens = iens }; - ensemble[iens - iens1] = NULL; - ensemble[iens - iens1] = enkf_node_load_alloc(config_node , fs , node_id); - } - - return ensemble; -} - - - - -void enkf_node_serialize(enkf_node_type *enkf_node , enkf_fs_type * fs, node_id_type node_id , - const active_list_type * active_list , matrix_type * A , int row_offset , int column) { - - FUNC_ASSERT(enkf_node->serialize); - enkf_node_load( enkf_node , fs , node_id); - enkf_node->serialize(enkf_node->data , node_id , active_list , A , row_offset , column); - -} - - - -void enkf_node_deserialize(enkf_node_type *enkf_node , enkf_fs_type * fs , node_id_type node_id, - const active_list_type * active_list , const matrix_type * A , int row_offset , int column) { - - FUNC_ASSERT(enkf_node->deserialize); - enkf_node->deserialize(enkf_node->data , node_id , active_list , A , row_offset , column); - enkf_node_store( enkf_node , fs , true , node_id ); -} - - - -void enkf_node_set_inflation( enkf_node_type * inflation , const enkf_node_type * std , const enkf_node_type * min_std) { - { - enkf_node_type * enkf_node = inflation; - FUNC_ASSERT(enkf_node->set_inflation); - } - inflation->set_inflation( inflation->data , std->data , min_std->data ); -} - - -void enkf_node_sqrt(enkf_node_type *enkf_node) { - FUNC_ASSERT(enkf_node->isqrt); - enkf_node->isqrt(enkf_node->data); -} - - -void enkf_node_scale(enkf_node_type *enkf_node , double scale_factor) { - FUNC_ASSERT(enkf_node->scale); - enkf_node->scale(enkf_node->data , scale_factor); -} - - -void enkf_node_iadd(enkf_node_type *enkf_node , const enkf_node_type * delta_node) { - FUNC_ASSERT(enkf_node->iadd); - enkf_node->iadd(enkf_node->data , delta_node->data); -} - - -void enkf_node_iaddsqr(enkf_node_type *enkf_node , const enkf_node_type * delta_node) { - FUNC_ASSERT(enkf_node->iaddsqr); - enkf_node->iaddsqr(enkf_node->data , delta_node->data); -} - - -void enkf_node_imul(enkf_node_type *enkf_node , const enkf_node_type * delta_node) { - FUNC_ASSERT(enkf_node->imul); - enkf_node->imul(enkf_node->data , delta_node->data); -} - - - -/** - The return value is whether any initialization has actually taken - place. If the function returns false it is for instance not - necessary to internalize anything. -*/ - -bool enkf_node_initialize(enkf_node_type *enkf_node, int iens , rng_type * rng) { - if (enkf_node_use_forward_init( enkf_node )) - return false; // This node will be initialized by loading results from the forward model. - else { - if (enkf_node->initialize != NULL) { - char * init_file = enkf_config_node_alloc_initfile( enkf_node->config , NULL , iens ); - bool init = enkf_node->initialize(enkf_node->data , iens , init_file, rng); - util_safe_free( init_file ); - return init; - } else - return false; /* No init performed */ - } -} - - - - -void enkf_node_clear(enkf_node_type *enkf_node) { - FUNC_ASSERT(enkf_node->clear); - enkf_node->clear(enkf_node->data); -} - - -void enkf_node_free(enkf_node_type *enkf_node) { - if (enkf_node->freef != NULL) - enkf_node->freef(enkf_node->data); - free(enkf_node->node_key); - vector_free(enkf_node->container_nodes); - free(enkf_node); -} - - -void enkf_node_free__(void *void_node) { - enkf_node_free((enkf_node_type *) void_node); -} - -const char * enkf_node_get_key(const enkf_node_type * enkf_node) { - return enkf_node->node_key; -} - - -#undef FUNC_ASSERT - - - -/*****************************************************************/ - - - -/* Manual inheritance - .... */ -static enkf_node_type * enkf_node_alloc_empty(const enkf_config_node_type *config ) { - const char *node_key = enkf_config_node_get_key(config); - ert_impl_type impl_type = enkf_config_node_get_impl_type(config); - enkf_node_type * node = util_malloc(sizeof * node ); - node->vector_storage = enkf_config_node_vector_storage( config ); - node->config = config; - node->node_key = util_alloc_string_copy(node_key); - node->data = NULL; - node->container_nodes = vector_alloc_new( ); - - /* - Start by initializing all function pointers to NULL. - */ - node->alloc = NULL; - node->ecl_write = NULL; - node->forward_load = NULL; - node->forward_load_vector = NULL; - node->copy = NULL; - node->initialize = NULL; - node->freef = NULL; - node->free_data = NULL; - node->user_get = NULL; - node->user_get_vector = NULL; - node->fload = NULL; - node->read_from_buffer = NULL; - node->write_to_buffer = NULL; - node->serialize = NULL; - node->deserialize = NULL; - node->clear = NULL; - node->set_inflation = NULL; - node->has_data = NULL; - - /* Math operations: */ - node->iadd = NULL; - node->scale = NULL; - node->isqrt = NULL; - node->iaddsqr = NULL; - node->imul = NULL; - - switch (impl_type) { - case(CONTAINER): - node->alloc = container_alloc__; - node->freef = container_free__; - break; - case(GEN_KW): - node->alloc = gen_kw_alloc__; - node->ecl_write = gen_kw_ecl_write__; - node->copy = gen_kw_copy__; - node->initialize = gen_kw_initialize__; - node->freef = gen_kw_free__; - node->user_get = gen_kw_user_get__; - node->write_to_buffer = gen_kw_write_to_buffer__; - node->read_from_buffer = gen_kw_read_from_buffer__; - node->serialize = gen_kw_serialize__; - node->deserialize = gen_kw_deserialize__; - node->clear = gen_kw_clear__; - node->iadd = gen_kw_iadd__; - node->scale = gen_kw_scale__; - node->iaddsqr = gen_kw_iaddsqr__; - node->imul = gen_kw_imul__; - node->isqrt = gen_kw_isqrt__; - node->set_inflation = gen_kw_set_inflation__; - node->fload = gen_kw_fload__; - break; - case(CUSTOM_KW): - node->alloc = custom_kw_alloc__; - node->freef = custom_kw_free__; - node->forward_load = custom_kw_forward_load__; - node->fload = custom_kw_fload__; - node->ecl_write = custom_kw_ecl_write__; - node->write_to_buffer = custom_kw_write_to_buffer__; - node->read_from_buffer = custom_kw_read_from_buffer__; - node->serialize = custom_kw_serialize__; - node->deserialize = custom_kw_deserialize__; - break; - case(SUMMARY): - node->forward_load = summary_forward_load__; - node->forward_load_vector = summary_forward_load_vector__; - node->alloc = summary_alloc__; - node->copy = summary_copy__; - node->freef = summary_free__; - node->user_get = summary_user_get__; - node->user_get_vector = summary_user_get_vector__; - node->read_from_buffer = summary_read_from_buffer__; - node->write_to_buffer = summary_write_to_buffer__; - node->serialize = summary_serialize__; - node->deserialize = summary_deserialize__; - node->clear = summary_clear__; - node->has_data = summary_has_data__; - /* - node->iadd = summary_iadd__; - node->scale = summary_scale__; - node->iaddsqr = summary_iaddsqr__; - node->imul = summary_imul__; - node->isqrt = summary_isqrt__; - */ - break; - case(SURFACE): - node->initialize = surface_initialize__; - node->ecl_write = surface_ecl_write__; - node->alloc = surface_alloc__; - node->copy = surface_copy__; - node->freef = surface_free__; - node->user_get = surface_user_get__; - node->read_from_buffer = surface_read_from_buffer__; - node->write_to_buffer = surface_write_to_buffer__; - node->serialize = surface_serialize__; - node->deserialize = surface_deserialize__; - node->clear = surface_clear__; - node->iadd = surface_iadd__; - node->scale = surface_scale__; - node->iaddsqr = surface_iaddsqr__; - node->imul = surface_imul__; - node->isqrt = surface_isqrt__; - node->fload = surface_fload__; - break; - case(FIELD): - node->alloc = field_alloc__; - node->ecl_write = field_ecl_write__; - node->forward_load = field_forward_load__; - node->copy = field_copy__; - node->initialize = field_initialize__; - node->freef = field_free__; - node->user_get = field_user_get__; - node->read_from_buffer = field_read_from_buffer__; - node->write_to_buffer = field_write_to_buffer__; - node->serialize = field_serialize__; - node->deserialize = field_deserialize__; - - node->clear = field_clear__; - node->set_inflation = field_set_inflation__; - node->iadd = field_iadd__; - node->scale = field_scale__; - node->iaddsqr = field_iaddsqr__; - node->imul = field_imul__; - node->isqrt = field_isqrt__; - node->fload = field_fload__; - break; - case(GEN_DATA): - node->alloc = gen_data_alloc__; - node->initialize = gen_data_initialize__; - node->copy = gen_data_copy__; - node->freef = gen_data_free__; - node->ecl_write = gen_data_ecl_write__; - node->forward_load = gen_data_forward_load__; - node->user_get = gen_data_user_get__; - node->read_from_buffer = gen_data_read_from_buffer__; - node->write_to_buffer = gen_data_write_to_buffer__; - node->serialize = gen_data_serialize__; - node->deserialize = gen_data_deserialize__; - node->set_inflation = gen_data_set_inflation__; - - node->clear = gen_data_clear__; - node->iadd = gen_data_iadd__; - node->scale = gen_data_scale__; - node->iaddsqr = gen_data_iaddsqr__; - node->imul = gen_data_imul__; - node->isqrt = gen_data_isqrt__; - //node->fload = gen_data_fload__; - break; - default: - util_abort("%s: implementation type: %d unknown - all hell is loose - aborting \n",__func__ , impl_type); - } - return node; -} - - - -#define CASE_SET(type , func) case(type): has_func = (func != NULL); break; -bool enkf_node_has_func(const enkf_node_type * node , node_function_type function_type) { - bool has_func = false; - switch (function_type) { - CASE_SET(alloc_func , node->alloc); - CASE_SET(ecl_write_func , node->ecl_write); - CASE_SET(forward_load_func , node->forward_load); - CASE_SET(copy_func , node->copy); - CASE_SET(initialize_func , node->initialize); - CASE_SET(free_func , node->freef); - default: - fprintf(stderr,"%s: node_function_identifier: %d not recognized - aborting \n",__func__ , function_type); - } - return has_func; -} -#undef CASE_SET - - - -enkf_node_type * enkf_node_alloc(const enkf_config_node_type * config) { - enkf_node_type * node = enkf_node_alloc_empty(config); - enkf_node_alloc_domain_object(node); - return node; -} - - - - - -static void enkf_node_container_add_node( enkf_node_type * node , const enkf_node_type * child_node , bool shared) { - if (shared) - vector_append_ref( node->container_nodes , child_node ); - else - vector_append_owned_ref( node->container_nodes , child_node, enkf_node_free__ ); -} - -static enkf_node_type * enkf_node_alloc_container(const enkf_config_node_type * config, hash_type * node_hash , bool shared) { - enkf_node_type * container_node = enkf_node_alloc( config ); - { - for (int i=0; i < enkf_config_node_container_size( config ); i++) { - const enkf_config_node_type * child_config = enkf_config_node_container_iget( config , i ); - enkf_node_type * child_node; - - if (shared) - child_node = hash_get( node_hash , enkf_config_node_get_key( child_config )); - else - child_node = enkf_node_alloc( child_config ); - - enkf_node_container_add_node( container_node , child_node , shared); - container_add_node( enkf_node_value_ptr( container_node ) , enkf_node_value_ptr( child_node )); - } - } - return container_node; -} - -enkf_node_type * enkf_node_alloc_shared_container(const enkf_config_node_type * config, hash_type * node_hash) { - return enkf_node_alloc_container( config , node_hash , true ); -} - - -enkf_node_type * enkf_node_alloc_private_container(const enkf_config_node_type * config) { - return enkf_node_alloc_container( config , NULL , false ); -} - -enkf_node_type * enkf_node_deep_alloc(const enkf_config_node_type * config) { - if (enkf_config_node_get_impl_type( config ) == CONTAINER) { - enkf_node_type * container = enkf_node_alloc_container( config , NULL , false ); - container_assert_size( enkf_node_value_ptr( container )); - return container; - } else - return enkf_node_alloc( config ); -} - - - -bool enkf_node_internalize(const enkf_node_type * node, int report_step) { - return enkf_config_node_internalize( node->config , report_step ); -} - - -/*****************************************************************/ - - -ecl_write_ftype * enkf_node_get_func_pointer( const enkf_node_type * node ) { - return node->ecl_write; -} diff --git a/ThirdParty/Ert/libenkf/src/enkf_obs.c b/ThirdParty/Ert/libenkf/src/enkf_obs.c deleted file mode 100644 index cb9bcdae2e..0000000000 --- a/ThirdParty/Ert/libenkf/src/enkf_obs.c +++ /dev/null @@ -1,1248 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_obs.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - -The observation system ----------------------- - -The observation system in the EnKF code is a three layer system. At -the the top is the enkf_obs_type. The enkf_main object contains one -enkf_obs instance which has internalized ALL the observation data. In -enkf_obs the the data is internalized in a hash table, where the keys -in the table are the keys used the observation file. - -The next level is the obs_vector type which is a vector of length -num_report_steps. Each element in this vector can either point a -spesific observation instance (which actually contains the data), or -be NULL, if the observation is not active at this report step. In -addition the obs_vector contains function pointers to manipulate the -observation data at the lowest level. - -At the lowest level we have specific observation instances, -field_obs, summary_obs and gen_obs. These instances contain the actual -data. - -To summarize we can say: - - 1. enkf_obs has ALL the observation data. - - 2. obs_vector has the full time series for one observation key, - i.e. all the watercuts in well P2. - - 3. field_obs/gen_obs/summary_obs instances contain the actual - observed data for one (logical) observation and one report step. - - -In the following example we have two observations - - WWCT:OP1 The water cut in well OP1. This is an observation which is - active for many report steps, at the lowest level it is - implemented as summary_obs. - - RFT_P2 This is an RFT test for one well. Only active at one report - step, implemented at the lowest level as a field_obs instance. - - - In the example below there are in total five report steps, hence all - the obs_vector instances have five 'slots'. If there is no active - observation for a particular report step, the corresponding pointer - in the obs_vector instance is NULL. - - - - _____________________ _____________________ - / enkf_obs \ - | | - | | - | obs_hash: {"WWCT:OP1" , "RFT_P2"} | - | | | | - | | | | - \________________|___________|________________________/ - | | - | | - | | - | \--------------------------------------------------------------\ - | | - | | - \|/ | - |--- obs_vector: WWCT:OP1 -----------------------------------------------------| | - | Function pointers: -------- -------- -------- -------- -------- | | - | Pointing to the | | | | | | | | | | | | - | underlying | NULL | | X | | X | | NULL | | X | | | - | implementation in the | | | | | | | | | | | | | | | - | summary_obs object. -------- ---|---- ---|---- -------- ---|---- | | - |---------------------------------------|---------|-------------------|--------| | - | | | | - \|/ | | | - |-- summary_obs -| | \|/ | - | Value: 0.56.. | | |-- summary_obs -| | - | std : 0.15.. | | | Value: 0.70.. | | - |----------------| | | std : 0.25.. | | - | |----------------| | - \|/ | - |-- summary_obs -| | - | Value: 0.62.. | | - | std : 0.12.. | | - |----------------| | - | - | - | - The observation WWCT:OP1 is an observation of summary type, and the | - obs_vector contains pointers to summary_obs instances; along with | - function pointers to manipulate the summary_obs instances. The | - observation is not active for report steps 0 and 3, so for these | - report steps the obse vector has a NULL pointer. | - | - | - | - | - | - | - |--- obs_vector: RFT_P2 -------------------------------------------------------| | - | Function pointers: -------- -------- -------- -------- -------- | | - | Pointing to the | | | | | | | | | | |<---------------/ - | underlying | NULL | | NULL | | NULL | | X | | NULL | | - | implementation in the | | | | | | | | | | | | - | field_obs object. -------- -------- -------- ---|---- -------- | - |-----------------------------------------------------------|------------------| - | - | - \|/ - |-- field_obs -----------------------------------| - | i = 25 , j = 16, k = 10, value = 278, std = 10 | - | i = 25 , j = 16, k = 11, value = 279, std = 10 | - | i = 25 , j = 16, k = 12, value = 279, std = 10 | - | i = 25 , j = 17, k = 12, value = 281, std = 10 | - | i = 25 , j = 18, k = 12, value = 282, std = 10 | - |------------------------------------------------| - - - The observation RFT_P2 is an RFT observation which is only active at - one report step, i.e. 4/5 pointers in the obs_vector are just NULL - pointers. The actual observation(s) are stored in a field_obs - instance. - - */ - - -/** -TODO - - This static function header shall be removed when the - configuration is unified.... -*/ -static conf_class_type * enkf_obs_get_obs_conf_class(); - - - -////////////////////////////////////////////////////////////////////////////////////// - - -#define ENKF_OBS_TYPE_ID 637297 -struct enkf_obs_struct { - UTIL_TYPE_ID_DECLARATION; - /** A hash of obs_vector_types indexed by user provided keys. */ - vector_type * obs_vector; - hash_type * obs_hash; - time_map_type * obs_time; /* For fast lookup of report_step -> obs_time */ - - bool valid; - /* Several shared resources - can generally be NULL*/ - const history_type * history; /* A shared (not owned by enkf_obs) reference to the history object - used when - adding HISTORY observations. */ - const ecl_sum_type * refcase; - const ecl_grid_type * grid; - time_map_type * external_time_map; - ensemble_config_type * ensemble_config; -}; - - - - -////////////////////////////////////////////////////////////////////////////////////// - - -static void enkf_obs_iset_obs_time(enkf_obs_type * enkf_obs , int report_step, time_t obs_time) { - time_map_update( enkf_obs->obs_time , report_step , obs_time); -} - - -static int enkf_obs_get_last_restart( const enkf_obs_type * enkf_obs ) { - return time_map_get_size( enkf_obs->obs_time ) - 1; -} - -UTIL_IS_INSTANCE_FUNCTION( enkf_obs , ENKF_OBS_TYPE_ID ) - -enkf_obs_type * enkf_obs_alloc( const history_type * history , - time_map_type * external_time_map , - const ecl_grid_type * grid , - const ecl_sum_type * refcase, - ensemble_config_type * ensemble_config ) -{ - enkf_obs_type * enkf_obs = util_malloc(sizeof * enkf_obs); - UTIL_TYPE_ID_INIT( enkf_obs , ENKF_OBS_TYPE_ID ); - enkf_obs->obs_hash = hash_alloc(); - enkf_obs->obs_vector = vector_alloc_new(); - enkf_obs->obs_time = time_map_alloc(); - - enkf_obs->history = history; - enkf_obs->refcase = refcase; - enkf_obs->grid = grid; - enkf_obs->ensemble_config = ensemble_config; - enkf_obs->external_time_map = external_time_map; - enkf_obs->valid = false; - - /* Initialize obs time: */ - { - if (enkf_obs->history) { - int last_report = history_get_last_restart( enkf_obs->history ); - int step; - for (step =0; step <= last_report; step++) { - time_t obs_time = history_get_time_t_from_restart_nr( enkf_obs->history , step ); - enkf_obs_iset_obs_time( enkf_obs , step , obs_time ); - } - enkf_obs->valid = true; - } else { - if (enkf_obs->external_time_map) { - int last_report = time_map_get_size( enkf_obs->external_time_map ) - 1; - int step; - for (step =0; step <= last_report; step++) { - time_t obs_time = time_map_iget( enkf_obs->external_time_map , step ); - enkf_obs_iset_obs_time( enkf_obs , step , obs_time ); - } - enkf_obs->valid = true; - } - } - } - - return enkf_obs; -} - - - -bool enkf_obs_have_obs( const enkf_obs_type * enkf_obs ) { - if (vector_get_size( enkf_obs->obs_vector ) > 0) - return true; - else - return false; -} - - -void enkf_obs_free(enkf_obs_type * enkf_obs) { - hash_free(enkf_obs->obs_hash); - vector_free( enkf_obs->obs_vector ); - time_map_free( enkf_obs->obs_time ); - free(enkf_obs); -} - - - - -time_t enkf_obs_iget_obs_time(const enkf_obs_type * enkf_obs , int report_step) { - return time_map_iget( enkf_obs->obs_time , report_step ); -} - - - - - -/** - Observe that the obs_vector can be NULL - in which it is of course not added. -*/ -void enkf_obs_add_obs_vector(enkf_obs_type * enkf_obs, - const obs_vector_type * vector) -{ - - if (vector != NULL) { - const char * obs_key = obs_vector_get_key( vector ); - if (hash_has_key(enkf_obs->obs_hash , obs_key)) - util_abort("%s: Observation with key:%s already added.\n",__func__ , obs_key); - - hash_insert_ref(enkf_obs->obs_hash , obs_key , vector ); - vector_append_owned_ref( enkf_obs->obs_vector , vector , obs_vector_free__); - } -} - - -bool enkf_obs_has_key(const enkf_obs_type * obs , const char * key) { - return hash_has_key(obs->obs_hash , key); -} - -obs_vector_type * enkf_obs_get_vector(const enkf_obs_type * obs, const char * key) { - return hash_get(obs->obs_hash , key); -} - -obs_vector_type * enkf_obs_iget_vector(const enkf_obs_type * obs, int index) { - return vector_iget( obs->obs_vector , index ); -} - -int enkf_obs_get_size( const enkf_obs_type * obs ) { - return vector_get_size( obs->obs_vector ); -} - - - -static void enkf_obs_get_obs_and_measure_summary(const enkf_obs_type * enkf_obs, - obs_vector_type * obs_vector , - enkf_fs_type * fs, - const local_obsdata_node_type * obs_node , - const int_vector_type * ens_active_list , - meas_data_type * meas_data, - obs_data_type * obs_data, - double_vector_type * obs_value , - double_vector_type * obs_std) { - - const active_list_type * active_list = local_obsdata_node_get_active_list( obs_node ); - - matrix_type * error_covar = NULL; - int active_count = 0; - int last_step = -1; - int step = -1; - - /*1: Determine which report_steps have active observations; and collect the observed values. */ - double_vector_reset( obs_std ); - double_vector_reset( obs_value ); - - while (true) { - step = obs_vector_get_next_active_step( obs_vector , step ); - if (step < 0) - break; - - if (local_obsdata_node_tstep_active(obs_node, step)) { - if (obs_vector_iget_active( obs_vector , step ) && active_list_iget( active_list , 0 /* Index into the scalar summary observation */)) { - { - const summary_obs_type * summary_obs = obs_vector_iget_node( obs_vector , step ); - double_vector_iset( obs_std , active_count , summary_obs_get_std( summary_obs ) * summary_obs_get_std_scaling( summary_obs )); - double_vector_iset( obs_value , active_count , summary_obs_get_value( summary_obs )); - last_step = step; - } - active_count++; - } - } - } - - - if (active_count > 0) { - /*2: Estimate a covariance matrix. */ - auto_corrf_ftype * auto_corrf; - double auto_corrf_param; - { - const summary_obs_type * summary_obs = obs_vector_iget_node( obs_vector , last_step ); - auto_corrf = summary_obs_get_auto_corrf( summary_obs ); - auto_corrf_param = summary_obs_get_auto_corrf_param( summary_obs ); - } - - if ((active_count > 1) && (auto_corrf != NULL)) { - int i,j; - error_covar = matrix_alloc( active_count , active_count ); /* Will be freed by the obs_block instance. */ - for (i = 0; i < active_count; i++) { - for (j=0; j <= i; j++) { - double covar = sqrt( double_vector_iget( obs_std , i ) * double_vector_iget( obs_std , j )); - double delta_t = enkf_obs_iget_obs_time( enkf_obs , i ) - enkf_obs_iget_obs_time( enkf_obs , j ); - double corr = auto_corrf(delta_t / (24.00 * 3600) , auto_corrf_param ); - - matrix_iset(error_covar , i , j , covar * corr ); - if (i != j) - matrix_iset(error_covar , j , i , covar * corr ); - } - } - - } - - - /* - 3: Fill up the obs_block and meas_block structures with this - time-aggregated summary observation. Passing in the error_covar - matrix (which can be NULL) to the obs_block instance. - */ - - { - obs_block_type * obs_block = obs_data_add_block( obs_data , obs_vector_get_obs_key( obs_vector ) , active_count , error_covar , true); - meas_block_type * meas_block = meas_data_add_block( meas_data, obs_vector_get_obs_key( obs_vector ) , last_step , active_count ); - enkf_node_type * work_node = enkf_node_alloc( obs_vector_get_config_node( obs_vector )); - - for (int i=0; i < active_count; i++) - obs_block_iset( obs_block , i , double_vector_iget( obs_value , i) , double_vector_iget( obs_std , i )); - - active_count = 0; - step = -1; - while (true) { - step = obs_vector_get_next_active_step( obs_vector , step ); - if (step < 0) - break; - - if (local_obsdata_node_tstep_active(obs_node, step)) { - if (obs_vector_iget_active( obs_vector , step ) && active_list_iget( active_list , 0 /* Index into the scalar summary observation */)) { - for (int iens_index = 0; iens_index < int_vector_size( ens_active_list ); iens_index++) { - - const int iens = int_vector_iget( ens_active_list , iens_index ); - node_id_type node_id = {.report_step = step, - .iens = iens}; - - enkf_node_load( work_node , fs , node_id ); - - meas_block_iset(meas_block , - iens , active_count , - summary_get( enkf_node_value_ptr( work_node ) , node_id.report_step )); - - } - active_count++; - } - } - } - enkf_node_free( work_node ); - } - } -} - -void enkf_obs_get_obs_and_measure_node( const enkf_obs_type * enkf_obs, - enkf_fs_type * fs, - const local_obsdata_node_type * obs_node , - const int_vector_type * ens_active_list , - meas_data_type * meas_data, - obs_data_type * obs_data) { - - const char * obs_key = local_obsdata_node_get_key( obs_node ); - obs_vector_type * obs_vector = hash_get( enkf_obs->obs_hash , obs_key ); - obs_impl_type obs_type = obs_vector_get_impl_type( obs_vector ); - - if ((obs_type == SUMMARY_OBS)) { //&& ((end_step - start_step) > 1)) - double_vector_type * work_value = double_vector_alloc( 0 , -1 ); - double_vector_type * work_std = double_vector_alloc( 0 , -1 ); - - enkf_obs_get_obs_and_measure_summary( enkf_obs , - obs_vector , - fs , - obs_node , - ens_active_list , - meas_data , - obs_data , - work_value, - work_std); - - double_vector_free( work_value ); - double_vector_free( work_std ); - } else { - int report_step = -1; - while (true) { - report_step = obs_vector_get_next_active_step( obs_vector , report_step ); - if (report_step < 0) - break; - - if (local_obsdata_node_tstep_active(obs_node, report_step)) { - if (obs_vector_iget_active(obs_vector , report_step)) { /* The observation is active for this report step. */ - const active_list_type * active_list = local_obsdata_node_get_active_list( obs_node ); - obs_vector_iget_observations(obs_vector , report_step , obs_data , active_list, fs); /* Collect the observed data in the obs_data instance. */ - obs_vector_measure(obs_vector , fs , report_step , ens_active_list , meas_data , active_list); - } - } - } - } -} - - - -/* - This will append observations and simulated responses from - report_step to obs_data and meas_data. - Call obs_data_reset and meas_data_reset on obs_data and meas_data - if you want to use fresh instances. -*/ - -void enkf_obs_get_obs_and_measure_data(const enkf_obs_type * enkf_obs, - enkf_fs_type * fs, - const local_obsdata_type * local_obsdata , - const int_vector_type * ens_active_list , - meas_data_type * meas_data, - obs_data_type * obs_data) { - - - int iobs; - for (iobs = 0; iobs < local_obsdata_get_size( local_obsdata ); iobs++) { - const local_obsdata_node_type * obs_node = local_obsdata_iget( local_obsdata , iobs ); - enkf_obs_get_obs_and_measure_node( enkf_obs , - fs , - obs_node , - ens_active_list , - meas_data , - obs_data); - } -} - - - - -void enkf_obs_clear( enkf_obs_type * enkf_obs ) { - hash_clear( enkf_obs->obs_hash ); - vector_clear( enkf_obs->obs_vector ); - ensemble_config_clear_obs_keys(enkf_obs->ensemble_config); -} - - - - - -/* - Adding inverse observation keys to the enkf_nodes; can be called - several times. -*/ - - -static void enkf_obs_update_keys( enkf_obs_type * enkf_obs ) { - /* First clear all existing observation keys. */ - ensemble_config_clear_obs_keys( enkf_obs->ensemble_config ); - - /* Add new observation keys. */ - { - hash_type * map = enkf_obs_alloc_data_map(enkf_obs); - hash_iter_type * iter = hash_iter_alloc(map); - const char * obs_key = hash_iter_get_next_key(iter); - while (obs_key != NULL) { - const char * state_kw = hash_get(map , obs_key); - ensemble_config_add_obs_key(enkf_obs->ensemble_config , state_kw , obs_key); - obs_key = hash_iter_get_next_key(iter); - } - hash_iter_free(iter); - hash_free(map); - } -} - - - -/** - This function will load an observation configuration from the - observation file @config_file. - - If called several times during one invocation the function will - start by clearing the current content. -*/ - - - -bool enkf_obs_load(enkf_obs_type * enkf_obs , - const char * config_file, - double std_cutoff) { - - if (enkf_obs->valid) { - int last_report = enkf_obs_get_last_restart( enkf_obs ); - conf_class_type * enkf_conf_class = enkf_obs_get_obs_conf_class(); - conf_instance_type * enkf_conf = conf_instance_alloc_from_file(enkf_conf_class, "enkf_conf", config_file); - - if(conf_instance_validate(enkf_conf) == false) - util_abort("Can not proceed with this configuration.\n"); - - /** Handle HISTORY_OBSERVATION instances. */ - { - stringlist_type * hist_obs_keys = conf_instance_alloc_list_of_sub_instances_of_class_by_name(enkf_conf, "HISTORY_OBSERVATION"); - int num_hist_obs = stringlist_get_size(hist_obs_keys); - - for (int hist_obs_nr = 0; hist_obs_nr < num_hist_obs; hist_obs_nr++) { - const char * obs_key = stringlist_iget(hist_obs_keys, hist_obs_nr); - if (enkf_obs->history) { - const conf_instance_type * hist_obs_conf = conf_instance_get_sub_instance_ref(enkf_conf, obs_key); - obs_vector_type * obs_vector; - enkf_config_node_type * config_node; - config_node = ensemble_config_add_summary_observation( enkf_obs->ensemble_config , obs_key , LOAD_FAIL_WARN ); - if (config_node != NULL) { - obs_vector = obs_vector_alloc( SUMMARY_OBS , obs_key , ensemble_config_get_node( enkf_obs->ensemble_config , obs_key ), last_report); - if (obs_vector != NULL) { - if (obs_vector_load_from_HISTORY_OBSERVATION(obs_vector , - hist_obs_conf , - enkf_obs->obs_time , - enkf_obs->history , - enkf_obs->ensemble_config, - std_cutoff )) { - enkf_obs_add_obs_vector(enkf_obs, obs_vector); - } else { - fprintf(stderr,"** Could not load historical data for observation:%s - ignored\n",obs_key); - obs_vector_free( obs_vector ); - } - } - } else - fprintf(stderr,"** Warning: summary:%s does not exist - observation:%s not added. \n", obs_key , obs_key); - } else - fprintf(stderr,"** Warning: no history object registered - observation:%s is ignored\n",obs_key); - } - - stringlist_free(hist_obs_keys); - } - - - - /** Handle SUMMARY_OBSERVATION instances. */ - { - stringlist_type * sum_obs_keys = conf_instance_alloc_list_of_sub_instances_of_class_by_name(enkf_conf, "SUMMARY_OBSERVATION"); - int num_sum_obs = stringlist_get_size(sum_obs_keys); - - - for(int sum_obs_nr = 0; sum_obs_nr < num_sum_obs; sum_obs_nr++) { - const char * obs_key = stringlist_iget(sum_obs_keys, sum_obs_nr); - const conf_instance_type * sum_obs_conf = conf_instance_get_sub_instance_ref(enkf_conf, obs_key); - const char * sum_key = conf_instance_get_item_value_ref( sum_obs_conf , "KEY" ); - obs_vector_type * obs_vector; - enkf_config_node_type * config_node; - - config_node = ensemble_config_add_summary_observation( enkf_obs->ensemble_config , sum_key , LOAD_FAIL_WARN ); - if (config_node != NULL) { - obs_vector = obs_vector_alloc( SUMMARY_OBS , obs_key , ensemble_config_get_node( enkf_obs->ensemble_config , sum_key ), last_report); - if (obs_vector != NULL) { - obs_vector_load_from_SUMMARY_OBSERVATION(obs_vector , sum_obs_conf , enkf_obs->obs_time , enkf_obs->ensemble_config); - enkf_obs_add_obs_vector(enkf_obs, obs_vector); - } - } else - fprintf(stderr,"** Warning: summary key:%s does not exist - observation key:%s not added.\n", sum_key , obs_key); - } - stringlist_free(sum_obs_keys); - } - - - /** Handle BLOCK_OBSERVATION instances. */ - { - stringlist_type * block_obs_keys = conf_instance_alloc_list_of_sub_instances_of_class_by_name(enkf_conf, "BLOCK_OBSERVATION"); - int num_block_obs = stringlist_get_size(block_obs_keys); - - for(int block_obs_nr = 0; block_obs_nr < num_block_obs; block_obs_nr++) - { - const char * obs_key = stringlist_iget(block_obs_keys, block_obs_nr); - const conf_instance_type * block_obs_conf = conf_instance_get_sub_instance_ref(enkf_conf, obs_key); - obs_vector_type * obs_vector = obs_vector_alloc_from_BLOCK_OBSERVATION(block_obs_conf , enkf_obs->grid , enkf_obs->obs_time , enkf_obs->refcase , enkf_obs->ensemble_config); - if (obs_vector != NULL) - enkf_obs_add_obs_vector(enkf_obs, obs_vector); - } - stringlist_free(block_obs_keys); - } - - - /** Handle GENERAL_OBSERVATION instances. */ - { - stringlist_type * block_obs_keys = conf_instance_alloc_list_of_sub_instances_of_class_by_name(enkf_conf, "GENERAL_OBSERVATION"); - int num_block_obs = stringlist_get_size(block_obs_keys); - - for(int block_obs_nr = 0; block_obs_nr < num_block_obs; block_obs_nr++) - { - const char * obs_key = stringlist_iget(block_obs_keys, block_obs_nr); - const conf_instance_type * gen_obs_conf = conf_instance_get_sub_instance_ref(enkf_conf, obs_key); - - obs_vector_type * obs_vector = obs_vector_alloc_from_GENERAL_OBSERVATION(gen_obs_conf , enkf_obs->obs_time , enkf_obs->ensemble_config); - if (obs_vector != NULL) - enkf_obs_add_obs_vector(enkf_obs, obs_vector); - } - stringlist_free(block_obs_keys); - } - - - conf_instance_free(enkf_conf ); - conf_class_free( enkf_conf_class); - - enkf_obs_update_keys( enkf_obs ); - return true; - } else - return false; -} - - - - - - - static conf_class_type * enkf_obs_get_obs_conf_class( void ) { - const char * enkf_conf_help = "An instance of the class ENKF_CONFIG shall contain neccessary infomation to run the enkf."; - conf_class_type * enkf_conf_class = conf_class_alloc_empty("ENKF_CONFIG", true , false , enkf_conf_help); - conf_class_set_help(enkf_conf_class, enkf_conf_help); - - - - /** Create and insert HISTORY_OBSERVATION class. */ - { - const char * help_class_history_observation = "The class HISTORY_OBSERVATION is used to condition on a time series from the production history. The name of the an instance is used to define the item to condition on, and should be in summary.x syntax. E.g., creating a HISTORY_OBSERVATION instance with name GOPR:P4 conditions on GOPR for group P4."; - - conf_class_type * history_observation_class = conf_class_alloc_empty("HISTORY_OBSERVATION", false , false, help_class_history_observation); - - conf_item_spec_type * item_spec_error_mode = conf_item_spec_alloc("ERROR_MODE", true, DT_STR , "The string ERROR_MODE gives the error mode for the observation."); - conf_item_spec_type * item_spec_auto_corrf_param = conf_item_spec_alloc("AUTO_CORRF_PARAM", false, DT_FLOAT , "A parameter passed to the auto correlation function."); - const char * help_item_spec_auto_corrf = "The name of the auto correlation function used for smoother updates."; - conf_item_spec_type * item_spec_auto_corrf = conf_item_spec_alloc("AUTO_CORRF", false , DT_STR , help_item_spec_auto_corrf); - conf_item_spec_add_restriction( item_spec_auto_corrf , AUTO_CORRF_EXP); - conf_item_spec_add_restriction( item_spec_auto_corrf , AUTO_CORRF_GAUSS); - - - conf_item_spec_add_restriction(item_spec_error_mode, "REL"); - conf_item_spec_add_restriction(item_spec_error_mode, "ABS"); - conf_item_spec_add_restriction(item_spec_error_mode, "RELMIN"); - conf_item_spec_set_default_value(item_spec_error_mode, "RELMIN"); - - conf_item_spec_type * item_spec_error = conf_item_spec_alloc("ERROR", true, DT_POSFLOAT , "The positive floating number ERROR gives the standard deviation (ABS) or the relative uncertainty (REL/RELMIN) of the observations."); - conf_item_spec_set_default_value(item_spec_error, "0.10"); - - conf_item_spec_type * item_spec_error_min = conf_item_spec_alloc("ERROR_MIN", true, DT_POSFLOAT , "The positive floating point number ERROR_MIN gives the minimum value for the standard deviation of the observation when RELMIN is used."); - conf_item_spec_set_default_value(item_spec_error_min, "0.10"); - - conf_class_insert_owned_item_spec(history_observation_class, item_spec_error_mode); - conf_class_insert_owned_item_spec(history_observation_class, item_spec_error); - conf_class_insert_owned_item_spec(history_observation_class, item_spec_error_min); - conf_class_insert_owned_item_spec(history_observation_class, item_spec_auto_corrf); - conf_class_insert_owned_item_spec(history_observation_class, item_spec_auto_corrf_param); - - /** Sub class segment. */ - { - const char * help_class_segment = "The class SEGMENT is used to fine tune the error model."; - conf_class_type * segment_class = conf_class_alloc_empty("SEGMENT", false , false, help_class_segment); - - conf_item_spec_type * item_spec_start_segment = conf_item_spec_alloc("START", true, DT_INT, "The first restart in the segment."); - conf_item_spec_type * item_spec_stop_segment = conf_item_spec_alloc("STOP", true, DT_INT, "The last restart in the segment."); - - conf_item_spec_type * item_spec_error_mode_segment = conf_item_spec_alloc("ERROR_MODE", true, DT_STR , "The string ERROR_MODE gives the error mode for the observation."); - conf_item_spec_add_restriction(item_spec_error_mode_segment, "REL"); - conf_item_spec_add_restriction(item_spec_error_mode_segment, "ABS"); - conf_item_spec_add_restriction(item_spec_error_mode_segment, "RELMIN"); - conf_item_spec_set_default_value(item_spec_error_mode_segment, "RELMIN"); - - conf_item_spec_type * item_spec_error_segment = conf_item_spec_alloc("ERROR", true, DT_POSFLOAT , "The positive floating number ERROR gives the standard deviation (ABS) or the relative uncertainty (REL/RELMIN) of the observations."); - conf_item_spec_set_default_value(item_spec_error_segment, "0.10"); - - conf_item_spec_type * item_spec_error_min_segment = conf_item_spec_alloc("ERROR_MIN", true, DT_POSFLOAT , "The positive floating point number ERROR_MIN gives the minimum value for the standard deviation of the observation when RELMIN is used."); - conf_item_spec_set_default_value(item_spec_error_min_segment, "0.10"); - - - conf_class_insert_owned_item_spec(segment_class, item_spec_start_segment); - conf_class_insert_owned_item_spec(segment_class, item_spec_stop_segment); - conf_class_insert_owned_item_spec(segment_class, item_spec_error_mode_segment); - conf_class_insert_owned_item_spec(segment_class, item_spec_error_segment); - conf_class_insert_owned_item_spec(segment_class, item_spec_error_min_segment); - - conf_class_insert_owned_sub_class(history_observation_class, segment_class); - } - - conf_class_insert_owned_sub_class(enkf_conf_class, history_observation_class); - } - - - - /** Create and insert SUMMARY_OBSERVATION class. */ - { - const char * help_class_summary_observation = "The class SUMMARY_OBSERVATION can be used to condition on any observation whos simulated value is written to the summary file."; - conf_class_type * summary_observation_class = conf_class_alloc_empty("SUMMARY_OBSERVATION", false , false, help_class_summary_observation); - - const char * help_item_spec_value = "The floating point number VALUE gives the observed value."; - conf_item_spec_type * item_spec_value = conf_item_spec_alloc("VALUE", true, DT_FLOAT , help_item_spec_value); - - const char * help_item_spec_error = "The positive floating point number ERROR is the standard deviation of the observed value."; - conf_item_spec_type * item_spec_error = conf_item_spec_alloc("ERROR", true, DT_POSFLOAT ,help_item_spec_error ); - - const char * help_item_spec_date = "The DATE item gives the observation time as the date date it occured. Format is dd/mm/yyyy."; - conf_item_spec_type * item_spec_date = conf_item_spec_alloc("DATE", false, DT_DATE , help_item_spec_date); - - const char * help_item_spec_days = "The DAYS item gives the observation time as days after simulation start."; - conf_item_spec_type * item_spec_days = conf_item_spec_alloc("DAYS", false, DT_POSFLOAT , help_item_spec_days); - - const char * help_item_spec_hours = "The HOURS item gives the observation time as hours after simulation start."; - conf_item_spec_type * item_spec_hours = conf_item_spec_alloc("HOURS", false, DT_POSFLOAT , help_item_spec_hours); - - const char * help_item_spec_restart = "The RESTART item gives the observation time as the ECLIPSE restart nr."; - conf_item_spec_type * item_spec_restart = conf_item_spec_alloc("RESTART", false, DT_POSINT , help_item_spec_restart); - - const char * help_item_spec_sumkey = "The string SUMMARY_KEY is used to look up the simulated value in the summary file. It has the same format as the summary.x program, e.g. WOPR:P4"; - conf_item_spec_type * item_spec_sumkey = conf_item_spec_alloc("KEY", true, DT_STR , help_item_spec_sumkey); - - conf_item_spec_type * item_spec_error_min = conf_item_spec_alloc("ERROR_MIN", true, DT_POSFLOAT , - "The positive floating point number ERROR_MIN gives the minimum value for the standard deviation of the observation when RELMIN is used."); - conf_item_spec_type * item_spec_error_mode = conf_item_spec_alloc("ERROR_MODE", true, DT_STR , "The string ERROR_MODE gives the error mode for the observation."); - - conf_item_spec_add_restriction(item_spec_error_mode, "REL"); - conf_item_spec_add_restriction(item_spec_error_mode, "ABS"); - conf_item_spec_add_restriction(item_spec_error_mode, "RELMIN"); - conf_item_spec_set_default_value(item_spec_error_mode, "ABS"); - conf_item_spec_set_default_value(item_spec_error_min, "0.10"); - - conf_class_insert_owned_item_spec(summary_observation_class, item_spec_value); - conf_class_insert_owned_item_spec(summary_observation_class, item_spec_error); - conf_class_insert_owned_item_spec(summary_observation_class, item_spec_date); - conf_class_insert_owned_item_spec(summary_observation_class, item_spec_days); - conf_class_insert_owned_item_spec(summary_observation_class, item_spec_hours); - conf_class_insert_owned_item_spec(summary_observation_class, item_spec_restart); - conf_class_insert_owned_item_spec(summary_observation_class, item_spec_sumkey); - conf_class_insert_owned_item_spec(summary_observation_class, item_spec_error_mode); - conf_class_insert_owned_item_spec(summary_observation_class, item_spec_error_min); - - /** Create a mutex on DATE, DAYS and RESTART. */ - conf_item_mutex_type * time_mutex = conf_class_new_item_mutex(summary_observation_class , true , false); - - conf_item_mutex_add_item_spec(time_mutex , item_spec_date); - conf_item_mutex_add_item_spec(time_mutex , item_spec_days); - conf_item_mutex_add_item_spec(time_mutex , item_spec_hours); - conf_item_mutex_add_item_spec(time_mutex , item_spec_restart); - conf_item_mutex_add_item_spec(time_mutex , item_spec_days ); - - conf_class_insert_owned_sub_class(enkf_conf_class, summary_observation_class); - } - - - - /** Create and insert BLOCK_OBSERVATION class. */ - { - const char * help_class_block_observation = "The class BLOCK_OBSERVATION can be used to condition on an observation whos simulated values are block/cell values of a field, e.g. RFT tests."; - conf_class_type * block_observation_class = conf_class_alloc_empty("BLOCK_OBSERVATION", false , false, help_class_block_observation); - - const char * help_item_spec_field = "The item FIELD gives the observed field. E.g., ECLIPSE fields such as PRESSURE, SGAS or any user defined fields such as PORO or PERMX."; - conf_item_spec_type * item_spec_field = conf_item_spec_alloc("FIELD", true , DT_STR , help_item_spec_field); - - const char * help_item_spec_date = "The DATE item gives the observation time as the date date it occured. Format is dd/mm/yyyy."; - conf_item_spec_type * item_spec_date = conf_item_spec_alloc("DATE", false, DT_DATE , help_item_spec_date); - - const char * help_item_spec_days = "The DAYS item gives the observation time as days after simulation start."; - conf_item_spec_type * item_spec_days = conf_item_spec_alloc("DAYS", false, DT_POSFLOAT , help_item_spec_days); - - const char * help_item_spec_hours = "The HOURS item gives the observation time as hours after simulation start."; - conf_item_spec_type * item_spec_hours = conf_item_spec_alloc("HOURS", false, DT_POSFLOAT , help_item_spec_hours); - - const char * help_item_spec_restart = "The RESTART item gives the observation time as the ECLIPSE restart nr."; - conf_item_spec_type * item_spec_restart = conf_item_spec_alloc("RESTART", false, DT_POSINT , help_item_spec_restart); - - conf_item_spec_type * item_spec_source = conf_item_spec_alloc("SOURCE", false, DT_STR , "The simulated data can be taken from the field or summary keys."); - - - conf_item_spec_add_restriction(item_spec_source, "FIELD"); - conf_item_spec_add_restriction(item_spec_source, "SUMMARY"); - conf_item_spec_set_default_value(item_spec_source, "FIELD"); - - conf_class_insert_owned_item_spec(block_observation_class, item_spec_source); - conf_class_insert_owned_item_spec(block_observation_class, item_spec_field); - conf_class_insert_owned_item_spec(block_observation_class, item_spec_date); - conf_class_insert_owned_item_spec(block_observation_class, item_spec_days); - conf_class_insert_owned_item_spec(block_observation_class, item_spec_restart); - conf_class_insert_owned_item_spec(block_observation_class, item_spec_hours); - /** Create a mutex on DATE, DAYS and RESTART. */ - { - conf_item_mutex_type * time_mutex = conf_class_new_item_mutex(block_observation_class , true , false); - conf_item_mutex_add_item_spec(time_mutex, item_spec_date); - conf_item_mutex_add_item_spec(time_mutex, item_spec_days); - conf_item_mutex_add_item_spec(time_mutex, item_spec_restart); - conf_item_mutex_add_item_spec(time_mutex, item_spec_hours); - } - - /** Create and insert the sub class OBS. */ - { - const char * help_class_obs = "The class OBS is used to specify a single observed point."; - conf_class_type * obs_class = conf_class_alloc_empty("OBS", true , false, help_class_obs); - - const char * help_item_i = "The item I gives the I index of the block observation."; - conf_item_spec_type * item_spec_i = conf_item_spec_alloc("I", true, DT_POSINT , help_item_i); - - const char * help_item_j = "The item J gives the J index of the block observation."; - conf_item_spec_type * item_spec_j = conf_item_spec_alloc("J", true, DT_POSINT, help_item_j); - - const char * help_item_k = "The item K gives the K index of the block observation."; - conf_item_spec_type * item_spec_k = conf_item_spec_alloc("K", true, DT_POSINT, help_item_k); - - const char * help_item_spec_value = "The floating point number VALUE gives the observed value."; - conf_item_spec_type * item_spec_value = conf_item_spec_alloc("VALUE", true, DT_FLOAT , help_item_spec_value); - - const char * help_item_spec_error = "The positive floating point number ERROR is the standard deviation of the observed value."; - conf_item_spec_type * item_spec_error = conf_item_spec_alloc("ERROR", true, DT_POSFLOAT , help_item_spec_error); - - conf_item_spec_type * item_spec_error_mode = conf_item_spec_alloc("ERROR_MODE", true, DT_STR , "The string ERROR_MODE gives the error mode for the observation."); - - conf_item_spec_type * item_spec_error_min = conf_item_spec_alloc("ERROR_MIN", true, DT_POSFLOAT , - "The positive floating point number ERROR_MIN gives the minimum value for the standard deviation of the observation when RELMIN is used."); - - conf_item_spec_add_restriction(item_spec_error_mode, "REL"); - conf_item_spec_add_restriction(item_spec_error_mode, "ABS"); - conf_item_spec_add_restriction(item_spec_error_mode, "RELMIN"); - conf_item_spec_set_default_value(item_spec_error_mode, "ABS"); - conf_item_spec_set_default_value(item_spec_error_min, "0.10" ); - - conf_class_insert_owned_item_spec(obs_class, item_spec_i); - conf_class_insert_owned_item_spec(obs_class, item_spec_j); - conf_class_insert_owned_item_spec(obs_class, item_spec_k); - conf_class_insert_owned_item_spec(obs_class, item_spec_value); - conf_class_insert_owned_item_spec(obs_class, item_spec_error); - conf_class_insert_owned_item_spec(obs_class, item_spec_error_mode); - conf_class_insert_owned_item_spec(obs_class, item_spec_error_min); - - conf_class_insert_owned_sub_class(block_observation_class, obs_class); - } - - conf_class_insert_owned_sub_class(enkf_conf_class, block_observation_class); - } - - /** Create and insert class for general observations. */ - { - const char * help_item_spec_restart = "The RESTART item gives the observation time as the ECLIPSE restart nr."; - const char * help_item_spec_field = "The item DATA gives the observed GEN_DATA instance."; - const char * help_item_spec_date = "The DATE item gives the observation time as the date date it occured. Format is dd/mm/yyyy."; - const char * help_item_spec_days = "The DAYS item gives the observation time as days after simulation start."; - const char * help_item_spec_hours = "The HOURS item gives the observation time as hours after simulation start."; - - conf_class_type * gen_obs_class = conf_class_alloc_empty("GENERAL_OBSERVATION" , false , false, "The class general_observation is used for general observations"); - - conf_item_spec_type * item_spec_field = conf_item_spec_alloc("DATA", true, DT_STR , help_item_spec_field); - conf_item_spec_type * item_spec_date = conf_item_spec_alloc("DATE", false, DT_DATE , help_item_spec_date); - conf_item_spec_type * item_spec_days = conf_item_spec_alloc("DAYS", false, DT_POSFLOAT , help_item_spec_days); - conf_item_spec_type * item_spec_hours = conf_item_spec_alloc("HOURS", false, DT_POSFLOAT , help_item_spec_hours); - conf_item_spec_type * item_spec_restart = conf_item_spec_alloc("RESTART", false, DT_POSINT , help_item_spec_restart); - conf_item_spec_type * item_spec_error_covar = conf_item_spec_alloc("ERROR_COVAR", false, DT_FILE , "Name of file containing error-covariance as formatted matrix - no header"); - - conf_class_insert_owned_item_spec(gen_obs_class, item_spec_error_covar); - conf_class_insert_owned_item_spec(gen_obs_class, item_spec_field); - conf_class_insert_owned_item_spec(gen_obs_class, item_spec_date); - conf_class_insert_owned_item_spec(gen_obs_class, item_spec_days); - conf_class_insert_owned_item_spec(gen_obs_class, item_spec_hours); - conf_class_insert_owned_item_spec(gen_obs_class, item_spec_restart); - /** Create a mutex on DATE, DAYS and RESTART. */ - { - conf_item_mutex_type * time_mutex = conf_class_new_item_mutex(gen_obs_class , true , false); - - conf_item_mutex_add_item_spec(time_mutex, item_spec_date); - conf_item_mutex_add_item_spec(time_mutex, item_spec_days); - conf_item_mutex_add_item_spec(time_mutex, item_spec_hours); - conf_item_mutex_add_item_spec(time_mutex, item_spec_restart); - } - - { - conf_item_spec_type * item_spec_obs_file = conf_item_spec_alloc("OBS_FILE" , false , DT_FILE , "The name of an (ascii) file with observation values."); - conf_item_spec_type * item_spec_value = conf_item_spec_alloc("VALUE" , false , DT_FLOAT , "One scalar observation value."); - conf_item_spec_type * item_spec_error = conf_item_spec_alloc("ERROR" , false , DT_FLOAT , "One scalar observation error."); - conf_item_mutex_type * value_mutex = conf_class_new_item_mutex( gen_obs_class , true , false); - conf_item_mutex_type * value_error_mutex = conf_class_new_item_mutex( gen_obs_class , false , true); - - conf_class_insert_owned_item_spec(gen_obs_class , item_spec_obs_file); - conf_class_insert_owned_item_spec(gen_obs_class , item_spec_value); - conf_class_insert_owned_item_spec(gen_obs_class , item_spec_error); - - - /* If the observation is in terms of VALUE - we must also have ERROR. - The conf system does not (currently ??) enforce this dependency. */ - - conf_item_mutex_add_item_spec( value_mutex , item_spec_value); - conf_item_mutex_add_item_spec( value_mutex , item_spec_obs_file); - - conf_item_mutex_add_item_spec( value_error_mutex , item_spec_value); - conf_item_mutex_add_item_spec( value_error_mutex , item_spec_error); - } - - - /* - The default is that all the elements in DATA are observed, but - we can restrict ourselves to a list of indices, with either the - INDEX_LIST or INDEX_FILE keywords. - */ - { - conf_item_spec_type * item_spec_index_list = conf_item_spec_alloc("INDEX_LIST" , false , DT_STR , "A list of indicies - possibly with ranges which should be observed in the target field."); - conf_item_spec_type * item_spec_index_file = conf_item_spec_alloc("INDEX_FILE" , false , DT_FILE , "An ASCII file containing a list of indices which should be observed in the target field."); - conf_item_mutex_type * index_mutex = conf_class_new_item_mutex( gen_obs_class , false , false); - - conf_class_insert_owned_item_spec(gen_obs_class, item_spec_index_list); - conf_class_insert_owned_item_spec(gen_obs_class, item_spec_index_file); - conf_item_mutex_add_item_spec(index_mutex , item_spec_index_list); - conf_item_mutex_add_item_spec(index_mutex , item_spec_index_file); - } - - conf_class_insert_owned_sub_class(enkf_conf_class, gen_obs_class); - } - - - return enkf_conf_class; -} - - - -/** - Allocates a stringlist of obs target keys which correspond to - summary observations, these are then added to the state vector in - enkf_main. -*/ -stringlist_type * enkf_obs_alloc_typed_keylist(enkf_obs_type * enkf_obs , obs_impl_type obs_type) { - stringlist_type * vars = stringlist_alloc_new(); - hash_iter_type * iter = hash_iter_alloc(enkf_obs->obs_hash); - const char * key = hash_iter_get_next_key(iter); - while ( key != NULL) { - obs_vector_type * obs_vector = hash_get( enkf_obs->obs_hash , key); - if (obs_vector_get_impl_type(obs_vector) == obs_type) - stringlist_append_copy(vars , key); - key = hash_iter_get_next_key(iter); - } - hash_iter_free(iter); - return vars; -} - - -obs_impl_type enkf_obs_get_type(const enkf_obs_type * enkf_obs , const char * key) { - obs_vector_type * obs_vector = hash_get( enkf_obs->obs_hash , key); - return obs_vector_get_impl_type(obs_vector); -} - -/** - */ - -stringlist_type * enkf_obs_alloc_matching_keylist(const enkf_obs_type * enkf_obs , const char * input_string) { - stringlist_type * obs_keys = hash_alloc_stringlist( enkf_obs->obs_hash ); - - if (input_string) { - stringlist_type * matching_keys = stringlist_alloc_new(); - char ** input_keys; - int num_keys; - - - util_split_string( input_string , " " , &num_keys , &input_keys); - for (int i=0; i < num_keys; i++) { - bool key_found = false; - - const char * input_key = input_keys[i]; - for (int j = 0; j < stringlist_get_size( obs_keys ); j++) { - const char * obs_key = stringlist_iget( obs_keys , j); - - if (util_string_match( obs_key , input_key)) { - if (!stringlist_contains( matching_keys , obs_key )) - stringlist_append_copy( matching_keys , obs_key); - key_found = true; - } - } - } - util_free_stringlist( input_keys , num_keys ); - stringlist_free( obs_keys ); - return matching_keys; - } else { - return obs_keys; - } -} - - -stringlist_type * enkf_obs_alloc_keylist(enkf_obs_type * enkf_obs ) { - stringlist_type * vars = stringlist_alloc_new(); - hash_iter_type * iter = hash_iter_alloc(enkf_obs->obs_hash); - const char * key = hash_iter_get_next_key(iter); - while ( key != NULL) { - stringlist_append_copy(vars , key); - key = hash_iter_get_next_key(iter); - } - hash_iter_free(iter); - return vars; -} - -/** - This function allocates a hash table which looks like this: - - {"OBS_KEY1": "STATE_KEY1", "OBS_KEY2": "STATE_KEY2", "OBS_KEY3": "STATE_KEY3", ....} - - where "OBS_KEY" represents the keys in the enkf_obs hash, and the - value they are pointing at are the enkf_state keywords they are - measuring. For instance if we have an observation with key "RFT_1A" - the entry in the table will be: ... "RFT_1A": "PRESSURE", .. - since an RFT observation observes the pressure. - - Let us consider the watercut in a well. Then the state_kw will - typically be WWCT:P1 for a well named 'P1'. Let us assume that this - well is observed both as a normal HISTORY observation from - SCHEDULE, and from two separator tests, called S1 and S2. Then the - hash table will look like this: - - "WWCT:P1": "WWCT:P1", - "S1" : "WWCT:P1", - "S2" : "WWCT:P1" - - - I.e. there are three different observations keys, all observing the - same state_kw. -*/ - - - -hash_type * enkf_obs_alloc_data_map(enkf_obs_type * enkf_obs) -{ - hash_type * map = hash_alloc(); - hash_iter_type * iter = hash_iter_alloc(enkf_obs->obs_hash); - const char * key = hash_iter_get_next_key(iter); - while ( key != NULL) { - obs_vector_type * obs_vector = hash_get( enkf_obs->obs_hash , key); - hash_insert_ref( map , key , obs_vector_get_state_kw(obs_vector)); - key = hash_iter_get_next_key(iter); - } - hash_iter_free( iter ); - return map; -} - - -hash_iter_type * enkf_obs_alloc_iter( const enkf_obs_type * enkf_obs ) { - return hash_iter_alloc(enkf_obs->obs_hash); -} - - - - - -/** - This function takes a string like this: "PRESSURE:1,4,7" - it - splits the string on ":" and tries to lookup a config object with - that key. For the general string A:B:C:D it will try consecutively - the keys: A, A:B, A:B:C, A:B:C:D. If a config object is found it is - returned, otherwise NULL is returned. - - The last argument is the pointer to a string which will be updated - with the node-spesific part of the full key. So for instance with - the example "PRESSURE:1,4,7", the index_key will contain - "1,4,7". If the full full_key is used to find an object index_key - will be NULL, that also applies if no object is found. -*/ - - - -const obs_vector_type * enkf_obs_user_get_vector(const enkf_obs_type * obs , const char * full_key, char ** index_key ) { - const obs_vector_type * vector = NULL; - char ** key_list; - int keys; - int key_length = 1; - int offset; - - *index_key = NULL; - util_split_string(full_key , ":" , &keys , &key_list); - while (vector == NULL && key_length <= keys) { - char * current_key = util_alloc_joined_string( (const char **) key_list , key_length , ":"); - if (enkf_obs_has_key(obs , current_key)) - vector = enkf_obs_get_vector(obs , current_key); - else - key_length++; - offset = strlen( current_key ); - free( current_key ); - } - if (vector != NULL) { - if (offset < strlen( full_key )) - *index_key = util_alloc_string_copy(&full_key[offset+1]); - } - - util_free_stringlist(key_list , keys); - return vector; -} - -/*****************************************************************/ - - -void enkf_obs_scale_std(enkf_obs_type * enkf_obs, double scale_factor) { - local_obsdata_type * local_obs = enkf_obs_alloc_all_active_local_obs( enkf_obs , "ALL-OBS"); - enkf_obs_local_scale_std( enkf_obs , local_obs , scale_factor ); - local_obsdata_free( local_obs ); -} - - -void enkf_obs_local_scale_std( const enkf_obs_type * enkf_obs , const local_obsdata_type * local_obsdata, double scale_factor) { - int num_nodes = local_obsdata_get_size( local_obsdata ); - int node_nr; - for (node_nr = 0; node_nr < num_nodes; node_nr++) { - const local_obsdata_node_type * node = local_obsdata_iget( local_obsdata , node_nr ); - obs_vector_type * obs_vector = enkf_obs_get_vector( enkf_obs , local_obsdata_node_get_key( node )); - obs_vector_scale_std( obs_vector , node , scale_factor ); - } -} - - -double enkf_obs_scale_correlated_std(const enkf_obs_type * enkf_obs , enkf_fs_type * fs , const int_vector_type * ens_active_list , const local_obsdata_type * local_obsdata) { - bool_vector_type * ens_mask = int_vector_alloc_mask( ens_active_list ); - meas_data_type * meas_data = meas_data_alloc( ens_mask ); - obs_data_type * obs_data = obs_data_alloc( 1.0 ); - double scale_factor = 1.0; - - enkf_obs_get_obs_and_measure_data( enkf_obs , fs , local_obsdata , ens_active_list , meas_data , obs_data ); - { - matrix_type * S = meas_data_allocS( meas_data ); - if (S) { - double truncation = 0.95; - int num_PC; - - obs_data_scale( obs_data , S , NULL , NULL , NULL , NULL ); - num_PC = enkf_linalg_num_PC( S , truncation ); - scale_factor = sqrt( obs_data_get_active_size( obs_data ) / num_PC ); - - matrix_free( S ); - enkf_obs_local_scale_std( enkf_obs , local_obsdata , scale_factor ); - } - } - meas_data_free( meas_data ); - obs_data_free( obs_data ); - bool_vector_free( ens_mask ); - return scale_factor; -} - - - -void enkf_obs_add_local_nodes_with_data(const enkf_obs_type * enkf_obs , local_obsdata_type * local_obs , enkf_fs_type *fs , const bool_vector_type * ens_mask) { - hash_iter_type * iter = hash_iter_alloc(enkf_obs->obs_hash); - while ( !hash_iter_is_complete( iter ) ) { - const char * key = hash_iter_get_next_key(iter); - obs_vector_type * obs_vector = hash_get( enkf_obs->obs_hash , key); - - if (obs_vector_has_data( obs_vector , ens_mask , fs )) { - local_obsdata_node_type * node = obs_vector_alloc_local_node( obs_vector ); - local_obsdata_add_node( local_obs , node ); - } - - } - hash_iter_free(iter); -} - - - -local_obsdata_type * enkf_obs_alloc_all_active_local_obs( const enkf_obs_type * enkf_obs , const char * key) { - local_obsdata_type * local_obs = local_obsdata_alloc( key ); - { - hash_iter_type * iter = hash_iter_alloc(enkf_obs->obs_hash); - while ( !hash_iter_is_complete( iter ) ) { - const char * key = hash_iter_get_next_key(iter); - obs_vector_type * obs_vector = hash_get( enkf_obs->obs_hash , key); - local_obsdata_node_type * node = obs_vector_alloc_local_node( obs_vector ); - local_obsdata_add_node( local_obs , node ); - } - hash_iter_free(iter); - } - return local_obs; -} - - - - diff --git a/ThirdParty/Ert/libenkf/src/enkf_plot_data.c b/ThirdParty/Ert/libenkf/src/enkf_plot_data.c deleted file mode 100644 index 45432ce28e..0000000000 --- a/ThirdParty/Ert/libenkf/src/enkf_plot_data.c +++ /dev/null @@ -1,151 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'enkf_plot_data.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - - -#define ENKF_PLOT_DATA_TYPE_ID 3331063 - -struct enkf_plot_data_struct { - UTIL_TYPE_ID_DECLARATION; - const enkf_config_node_type * config_node; - int size; - enkf_plot_tvector_type ** ensemble; - arg_pack_type ** work_arg; -}; - - - -static void enkf_plot_data_resize( enkf_plot_data_type * plot_data , int new_size ) { - if (new_size != plot_data->size) { - int iens; - - if (new_size < plot_data->size) { - for (iens = new_size; iens < plot_data->size; iens++) { - enkf_plot_tvector_free( plot_data->ensemble[iens] ); - arg_pack_free( plot_data->work_arg[iens] ); - } - } - - plot_data->ensemble = util_realloc( plot_data->ensemble , new_size * sizeof * plot_data->ensemble); - plot_data->work_arg = util_realloc( plot_data->work_arg , new_size * sizeof * plot_data->work_arg); - - if (new_size > plot_data->size) { - for (iens = plot_data->size; iens < new_size; iens++) { - plot_data->ensemble[iens] = enkf_plot_tvector_alloc( plot_data->config_node , iens); - plot_data->work_arg[iens] = arg_pack_alloc(); - } - } - plot_data->size = new_size; - } -} - - -static void enkf_plot_data_reset( enkf_plot_data_type * plot_data ) { - int iens; - for (iens = 0; iens < plot_data->size; iens++) { - enkf_plot_tvector_reset( plot_data->ensemble[iens] ); - arg_pack_clear( plot_data->work_arg[iens] ); - } -} - - -void enkf_plot_data_free( enkf_plot_data_type * plot_data ) { - int iens; - for (iens = 0; iens < plot_data->size; iens++) { - enkf_plot_tvector_free( plot_data->ensemble[iens] ); - arg_pack_free( plot_data->work_arg[iens]); - } - free( plot_data->work_arg ); - free( plot_data->ensemble ); - free( plot_data ); -} - -UTIL_IS_INSTANCE_FUNCTION( enkf_plot_data , ENKF_PLOT_DATA_TYPE_ID ) - - -enkf_plot_data_type * enkf_plot_data_alloc( const enkf_config_node_type * config_node ) { - enkf_plot_data_type * plot_data = util_malloc( sizeof * plot_data); - UTIL_TYPE_ID_INIT( plot_data , ENKF_PLOT_DATA_TYPE_ID ); - plot_data->config_node = config_node; - plot_data->size = 0; - plot_data->ensemble = NULL; - plot_data->work_arg = NULL; - return plot_data; -} - -enkf_plot_tvector_type * enkf_plot_data_iget( const enkf_plot_data_type * plot_data , int index) { - return plot_data->ensemble[index]; -} - - -int enkf_plot_data_get_size( const enkf_plot_data_type * plot_data ) { - return plot_data->size; -} - - - - -void enkf_plot_data_load( enkf_plot_data_type * plot_data , - enkf_fs_type * fs , - const char * index_key , - const bool_vector_type * input_mask) { - state_map_type * state_map = enkf_fs_get_state_map( fs ); - int ens_size = state_map_get_size( state_map ); - bool_vector_type * mask; - - if (input_mask) - mask = bool_vector_alloc_copy( input_mask ); - else - mask = bool_vector_alloc( ens_size , false ); - state_map_select_matching( state_map , mask , STATE_HAS_DATA ); - - enkf_plot_data_resize( plot_data , ens_size ); - enkf_plot_data_reset( plot_data ); - { - const int num_cpu = 4; - thread_pool_type * tp = thread_pool_alloc( num_cpu , true ); - for (int iens = 0; iens < ens_size ; iens++) { - if (bool_vector_iget( mask , iens)) { - enkf_plot_tvector_type * vector = enkf_plot_data_iget( plot_data , iens ); - arg_pack_type * work_arg = plot_data->work_arg[iens]; - - arg_pack_append_ptr( work_arg , vector ); - arg_pack_append_ptr( work_arg , fs ); - arg_pack_append_const_ptr( work_arg , index_key ); - - thread_pool_add_job( tp , enkf_plot_tvector_load__ , work_arg ); - } - } - thread_pool_join( tp ); - thread_pool_free( tp ); - } - bool_vector_free( mask ); -} - - diff --git a/ThirdParty/Ert/libenkf/src/enkf_plot_gen_kw.c b/ThirdParty/Ert/libenkf/src/enkf_plot_gen_kw.c deleted file mode 100644 index db066c9f75..0000000000 --- a/ThirdParty/Ert/libenkf/src/enkf_plot_gen_kw.c +++ /dev/null @@ -1,147 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'enkf_plot_gen_kw.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - - -#define ENKF_PLOT_GEN_KW_TYPE_ID 88362063 - -struct enkf_plot_gen_kw_struct { - UTIL_TYPE_ID_DECLARATION; - const enkf_config_node_type * config_node; - int size; /* Number of ensembles. */ - enkf_plot_gen_kw_vector_type ** ensemble; /* One vector for each ensemble. */ -}; - - -UTIL_IS_INSTANCE_FUNCTION( enkf_plot_gen_kw , ENKF_PLOT_GEN_KW_TYPE_ID ) - - -enkf_plot_gen_kw_type * enkf_plot_gen_kw_alloc( const enkf_config_node_type * config_node ) { - if (enkf_config_node_get_impl_type( config_node ) == GEN_KW) { - enkf_plot_gen_kw_type * plot_gen_kw = util_malloc( sizeof * plot_gen_kw ); - UTIL_TYPE_ID_INIT( plot_gen_kw , ENKF_PLOT_GEN_KW_TYPE_ID ); - plot_gen_kw->config_node = config_node; - plot_gen_kw->size = 0; - plot_gen_kw->ensemble = NULL; - return plot_gen_kw; - } - else { - return NULL; - } -} - - -void enkf_plot_gen_kw_free( enkf_plot_gen_kw_type * plot_gen_kw ) { - int iens; - for (iens = 0 ; iens < plot_gen_kw->size ; ++iens) { - enkf_plot_gen_kw_vector_free( plot_gen_kw->ensemble[iens] ); - } - free( plot_gen_kw ); -} - - -int enkf_plot_gen_kw_get_size( const enkf_plot_gen_kw_type * plot_gen_kw ) { - return plot_gen_kw->size; -} - -enkf_plot_gen_kw_vector_type * enkf_plot_gen_kw_iget( const enkf_plot_gen_kw_type * plot_gen_kw , int iens) { - if ((iens < 0) || (iens >= plot_gen_kw->size)) - util_abort("%s: index:%d invalid. Valid interval: [0,%d>.\n",__func__ , iens , plot_gen_kw->size); - - return plot_gen_kw->ensemble[iens]; -} - - -static void enkf_plot_gen_kw_resize( enkf_plot_gen_kw_type * plot_gen_kw , int new_size ) { - if (new_size != plot_gen_kw->size) { - int iens; - - if (new_size < plot_gen_kw->size) { - for (iens = new_size; iens < plot_gen_kw->size; iens++) { - enkf_plot_gen_kw_vector_free( plot_gen_kw->ensemble[iens] ); - } - } - - plot_gen_kw->ensemble = util_realloc( plot_gen_kw->ensemble , new_size * sizeof * plot_gen_kw->ensemble); - - if (new_size > plot_gen_kw->size) { - for (iens = plot_gen_kw->size; iens < new_size; iens++) { - plot_gen_kw->ensemble[iens] = enkf_plot_gen_kw_vector_alloc( plot_gen_kw->config_node , iens ); - } - } - plot_gen_kw->size = new_size; - } -} - - - -void enkf_plot_gen_kw_load( enkf_plot_gen_kw_type * plot_gen_kw, - enkf_fs_type * fs, - bool transform_data , - int report_step, - const bool_vector_type * input_mask ) { - - state_map_type * state_map = enkf_fs_get_state_map( fs ); - int ens_size = state_map_get_size( state_map ); - bool_vector_type * mask; - - if (input_mask) - mask = bool_vector_alloc_copy( input_mask ); - else - mask = bool_vector_alloc( ens_size , true ); - - enkf_plot_gen_kw_resize( plot_gen_kw , ens_size ); - { - int iens; - for (iens = 0; iens < ens_size; ++iens) { - if (bool_vector_iget( mask , iens)) { - enkf_plot_gen_kw_vector_type * vector = enkf_plot_gen_kw_iget( plot_gen_kw , iens ); - enkf_plot_gen_kw_vector_load( vector , fs , transform_data , report_step ); - } - } - } -} - - - -const char * enkf_plot_gen_kw_iget_key( const enkf_plot_gen_kw_type * plot_gen_kw, int index) { - const gen_kw_config_type * gen_kw_config = enkf_config_node_get_ref( plot_gen_kw->config_node ); - return gen_kw_config_iget_name( gen_kw_config , index ); -} - -int enkf_plot_gen_kw_get_keyword_count( const enkf_plot_gen_kw_type * gen_kw ){ - const gen_kw_config_type * gen_kw_config = enkf_config_node_get_ref( gen_kw->config_node ); - return gen_kw_config_get_data_size(gen_kw_config); -} - -bool enkf_plot_gen_kw_should_use_log_scale(const enkf_plot_gen_kw_type * gen_kw , int index) { - const gen_kw_config_type * gen_kw_config = enkf_config_node_get_ref( gen_kw->config_node ); - return gen_kw_config_should_use_log_scale(gen_kw_config, index); -} diff --git a/ThirdParty/Ert/libenkf/src/enkf_plot_gen_kw_vector.c b/ThirdParty/Ert/libenkf/src/enkf_plot_gen_kw_vector.c deleted file mode 100644 index 59a1090659..0000000000 --- a/ThirdParty/Ert/libenkf/src/enkf_plot_gen_kw_vector.c +++ /dev/null @@ -1,96 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'enkf_plot_gen_kw_vector.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - - -#define ENKF_PLOT_GEN_KW_VECTOR_TYPE_ID 88362064 - -struct enkf_plot_gen_kw_vector_struct { - UTIL_TYPE_ID_DECLARATION; - int iens; - double_vector_type * data; - const enkf_config_node_type * config_node; -}; - - -UTIL_IS_INSTANCE_FUNCTION( enkf_plot_gen_kw_vector , ENKF_PLOT_GEN_KW_VECTOR_TYPE_ID ) - - -enkf_plot_gen_kw_vector_type * enkf_plot_gen_kw_vector_alloc( const enkf_config_node_type * config_node , int iens ) { - enkf_plot_gen_kw_vector_type * vector = util_malloc( sizeof * vector ); - UTIL_TYPE_ID_INIT( vector , ENKF_PLOT_GEN_KW_VECTOR_TYPE_ID ); - vector->config_node = config_node; - vector->data = double_vector_alloc(0,0); - vector->iens = iens; - return vector; -} - - -void enkf_plot_gen_kw_vector_free( enkf_plot_gen_kw_vector_type * vector ) { - double_vector_free( vector->data ); - free( vector ); -} - - -int enkf_plot_gen_kw_vector_get_size( const enkf_plot_gen_kw_vector_type * vector ) { - return double_vector_size( vector->data ); -} - -double enkf_plot_gen_kw_vector_iget( const enkf_plot_gen_kw_vector_type * vector , int index ) { - return double_vector_iget( vector->data , index ); -} - - -void enkf_plot_gen_kw_vector_reset( enkf_plot_gen_kw_vector_type * vector ) { - double_vector_reset( vector->data ); -} - - -void enkf_plot_gen_kw_vector_load( enkf_plot_gen_kw_vector_type * vector , enkf_fs_type * fs , bool transform_data , int report_step ) { - enkf_plot_gen_kw_vector_reset( vector ); - { - node_id_type node_id = { .report_step = report_step , - .iens = vector->iens }; - - enkf_node_type * data_node = enkf_node_alloc( vector->config_node ); - - if (enkf_node_try_load( data_node , fs , node_id )) { - gen_kw_type * gen_kw = enkf_node_value_ptr( data_node ); - int n_kw = gen_kw_data_size( gen_kw ); - int i_kw; - - for (i_kw = 0 ; i_kw < n_kw ; ++i_kw) { - double_vector_append(vector->data , gen_kw_data_iget( gen_kw , i_kw , transform_data ) ); - } - } - - enkf_node_free( data_node ); - } -} diff --git a/ThirdParty/Ert/libenkf/src/enkf_plot_gendata.c b/ThirdParty/Ert/libenkf/src/enkf_plot_gendata.c deleted file mode 100644 index d0fddf5207..0000000000 --- a/ThirdParty/Ert/libenkf/src/enkf_plot_gendata.c +++ /dev/null @@ -1,203 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'enkf_plot_gendata.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include -#include -#include - - -#include -#include -#include -#include - -#include -#include -#include -#include - - -#define ENKF_PLOT_GENDATA_TYPE_ID 377626666 - -struct enkf_plot_gendata_struct { - UTIL_TYPE_ID_DECLARATION; - int size; - const enkf_config_node_type * enkf_config_node; - enkf_plot_genvector_type ** ensemble; - arg_pack_type ** work_arg; - double_vector_type * max_values; - double_vector_type * min_values; -}; - -UTIL_IS_INSTANCE_FUNCTION( enkf_plot_gendata , ENKF_PLOT_GENDATA_TYPE_ID ) - -enkf_plot_gendata_type * enkf_plot_gendata_alloc( const enkf_config_node_type * enkf_config_node ) { - if (enkf_config_node_get_impl_type(enkf_config_node) == GEN_DATA ){ - enkf_plot_gendata_type * data = util_malloc(sizeof * data); - UTIL_TYPE_ID_INIT (data , ENKF_PLOT_GENDATA_TYPE_ID); - data->size = 0; - data->enkf_config_node = enkf_config_node; - data->work_arg = NULL; - data->ensemble = NULL; - - data->max_values = NULL; - data->min_values = NULL; - return data; - } else { - return NULL; - } - -} - - -enkf_plot_gendata_type * enkf_plot_gendata_alloc_from_obs_vector( const obs_vector_type * obs_vector ){ - return enkf_plot_gendata_alloc(obs_vector_get_config_node(obs_vector)); -} - -void enkf_plot_gendata_free( enkf_plot_gendata_type * data ){ - for (int iens = 0; iens < data->size; iens++) { - arg_pack_free( data->work_arg[iens] ); - enkf_plot_genvector_free( data->ensemble[iens] ); - } - - free( data->work_arg ); - free( data->ensemble ); - free( data ); - -} - -int enkf_plot_gendata_get_size( const enkf_plot_gendata_type * data ){ - return data->size; -} - -enkf_plot_genvector_type * enkf_plot_gendata_iget( const enkf_plot_gendata_type * plot_data , int index){ - if(index >=0 && index < plot_data->size){ - return plot_data->ensemble[index]; - } else { - return NULL; - } -} - -static void enkf_plot_gendata_resize( enkf_plot_gendata_type * plot_gendata , int new_size ){ - if (new_size != plot_gendata->size) { - int iens; - - if (new_size < plot_gendata->size) { - for (iens = new_size; iens < plot_gendata->size; iens++) { - enkf_plot_genvector_free( plot_gendata->ensemble[iens] ); - arg_pack_free( plot_gendata->work_arg[iens] ); - } - } - - plot_gendata->ensemble = util_realloc( plot_gendata->ensemble , new_size * sizeof * plot_gendata->ensemble); - plot_gendata->work_arg = util_realloc( plot_gendata->work_arg , new_size * sizeof * plot_gendata->work_arg); - - if (new_size > plot_gendata->size) { - for (iens = plot_gendata->size; iens < new_size; iens++) { - plot_gendata->ensemble[iens] = enkf_plot_genvector_alloc( plot_gendata->enkf_config_node , iens ); - plot_gendata->work_arg[iens] = arg_pack_alloc(); - } - } - plot_gendata->size = new_size; - } -} - -static void enkf_plot_gendata_reset( enkf_plot_gendata_type * plot_gendata , int report_step){ - int iens; - for (iens = 0; iens < plot_gendata->size; iens++){ - arg_pack_clear( plot_gendata->work_arg[iens] ); - } -} - - - -void enkf_plot_gendata_load( enkf_plot_gendata_type * plot_data , - enkf_fs_type * fs , - int report_step , - const bool_vector_type * input_mask){ - - state_map_type * state_map = enkf_fs_get_state_map( fs ); - int ens_size = state_map_get_size( state_map ); - bool_vector_type * mask; - - if (input_mask) - mask = bool_vector_alloc_copy( input_mask ); - else - mask = bool_vector_alloc( ens_size , false ); - - state_map_select_matching( state_map , mask , STATE_HAS_DATA ); - - enkf_plot_gendata_resize( plot_data , ens_size ); - enkf_plot_gendata_reset( plot_data , report_step ); - - { - const int num_cpu = 4; - thread_pool_type * tp = thread_pool_alloc( num_cpu , true ); - for (int iens = 0; iens < ens_size ; iens++) { - if (bool_vector_iget( mask , iens)) { - enkf_plot_genvector_type * vector = enkf_plot_gendata_iget( plot_data , iens ); - arg_pack_type * work_arg = plot_data->work_arg[iens]; - - arg_pack_append_ptr( work_arg , vector ); - arg_pack_append_ptr( work_arg , fs ); - arg_pack_append_int( work_arg , report_step); - - thread_pool_add_job( tp , enkf_plot_genvector_load__ , work_arg ); - } - } - thread_pool_join( tp ); - thread_pool_free( tp ); - } - - bool_vector_free( mask ); - -} - -void enkf_plot_gendata_find_min_max_values__(enkf_plot_gendata_type * plot_data){ - for (int iens = 0; iens < plot_data->size; iens++){ - enkf_plot_genvector_type * vector = enkf_plot_gendata_iget(plot_data, iens); - int size = enkf_plot_genvector_get_size(vector); - if(iens == 0) { - plot_data->min_values = double_vector_alloc(size, DBL_MAX); - plot_data->max_values = double_vector_alloc(size, -DBL_MAX); - } - for(int index = 0; index < size; index++){ - double value = enkf_plot_genvector_iget(vector, index); - double_vector_iset(plot_data->min_values, index, util_double_min(double_vector_iget(plot_data->min_values, index), value)); - double_vector_iset(plot_data->max_values, index, util_double_max(double_vector_iget(plot_data->max_values, index), value)); - } - } -} - -double_vector_type * enkf_plot_gendata_get_min_values(enkf_plot_gendata_type * plot_data) { - if(plot_data->min_values == NULL) { - enkf_plot_gendata_find_min_max_values__(plot_data); - } - return plot_data->min_values; -} - - - -double_vector_type * enkf_plot_gendata_get_max_values(enkf_plot_gendata_type * plot_data) { - if(plot_data->max_values == NULL) { - enkf_plot_gendata_find_min_max_values__(plot_data); - } - return plot_data->max_values; -} diff --git a/ThirdParty/Ert/libenkf/src/enkf_plot_genvector.c b/ThirdParty/Ert/libenkf/src/enkf_plot_genvector.c deleted file mode 100644 index 346d7b49b3..0000000000 --- a/ThirdParty/Ert/libenkf/src/enkf_plot_genvector.c +++ /dev/null @@ -1,95 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'enkf_plot_genvector.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include - - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#define ENKF_PLOT_GENVECTOR_TYPE_ID 66862669 - -struct enkf_plot_genvector_struct { - UTIL_TYPE_ID_DECLARATION; - int iens; - double_vector_type * data; - const enkf_config_node_type * config_node; -}; - -UTIL_IS_INSTANCE_FUNCTION( enkf_plot_genvector , ENKF_PLOT_GENVECTOR_TYPE_ID ) - -enkf_plot_genvector_type * enkf_plot_genvector_alloc( const enkf_config_node_type * config_node , int iens){ - enkf_plot_genvector_type * vector = util_malloc( sizeof * vector ); - UTIL_TYPE_ID_INIT( vector , ENKF_PLOT_GENVECTOR_TYPE_ID ); - vector->config_node = config_node; - vector->data = double_vector_alloc(0,0); - vector->iens = iens; - return vector; - -} - -void enkf_plot_genvector_free( enkf_plot_genvector_type * vector ){ - double_vector_free(vector->data); - free(vector); -} - -int enkf_plot_genvector_get_size( const enkf_plot_genvector_type * vector ){ - return double_vector_size( vector->data ); -} - - -double enkf_plot_genvector_iget( const enkf_plot_genvector_type * vector , int index){ - return double_vector_iget( vector->data , index ); -} - - -void enkf_plot_genvector_load( enkf_plot_genvector_type * vector , enkf_fs_type * fs , int report_step ) { - enkf_node_type * work_node = enkf_node_alloc( vector->config_node ); - - node_id_type node_id = { .report_step = report_step , - .iens = vector->iens }; - - if (enkf_node_try_load( work_node , fs , node_id )) { - gen_data_type * node = enkf_node_value_ptr( work_node ); - gen_data_copy_to_double_vector( node , vector->data ); - - } - enkf_node_free( work_node ); -} - - -void * enkf_plot_genvector_load__( void * arg ){ - arg_pack_type * arg_pack = arg_pack_safe_cast( arg ); - enkf_plot_genvector_type * vector = arg_pack_iget_ptr( arg_pack , 0); - enkf_fs_type * fs = arg_pack_iget_ptr( arg_pack , 1 ); - int report_step = arg_pack_iget_int( arg_pack , 2 ); - - enkf_plot_genvector_load( vector , fs , report_step ); - return NULL; - -} diff --git a/ThirdParty/Ert/libenkf/src/enkf_plot_tvector.c b/ThirdParty/Ert/libenkf/src/enkf_plot_tvector.c deleted file mode 100644 index 10f8e83109..0000000000 --- a/ThirdParty/Ert/libenkf/src/enkf_plot_tvector.c +++ /dev/null @@ -1,181 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'enkf_plot_tvector.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include -#include -#include - -#define ENKF_PLOT_TVECTOR_ID 6111861 - -struct enkf_plot_tvector_struct { - UTIL_TYPE_ID_DECLARATION; - double_vector_type * data; - double_vector_type * work; - time_t_vector_type * time; - bool_vector_type * mask; - const enkf_config_node_type * config_node; - int iens; - bool summary_mode; -}; - - - -UTIL_SAFE_CAST_FUNCTION( enkf_plot_tvector , ENKF_PLOT_TVECTOR_ID ) -UTIL_IS_INSTANCE_FUNCTION( enkf_plot_tvector , ENKF_PLOT_TVECTOR_ID ) - - - -void enkf_plot_tvector_reset( enkf_plot_tvector_type * plot_tvector ) { - double_vector_reset( plot_tvector->data ); - time_t_vector_reset( plot_tvector->time ); - bool_vector_reset( plot_tvector->mask ); -} - - -enkf_plot_tvector_type * enkf_plot_tvector_alloc( const enkf_config_node_type * config_node , int iens) { - enkf_plot_tvector_type * plot_tvector = util_malloc( sizeof * plot_tvector); - UTIL_TYPE_ID_INIT( plot_tvector , ENKF_PLOT_TVECTOR_ID ); - - plot_tvector->data = double_vector_alloc( 0 , 0 ); - plot_tvector->time = time_t_vector_alloc(-1 , 0); - plot_tvector->mask = bool_vector_alloc( false , 0 ); - plot_tvector->work = double_vector_alloc(0,0); - plot_tvector->iens = iens; - - plot_tvector->config_node = config_node; - if (enkf_config_node_get_impl_type( config_node ) == SUMMARY) - plot_tvector->summary_mode = true; - else - plot_tvector->summary_mode = false; - - return plot_tvector; -} - - -void enkf_plot_tvector_free( enkf_plot_tvector_type * plot_tvector ) { - double_vector_free( plot_tvector->data ); - double_vector_free( plot_tvector->work ); - time_t_vector_free( plot_tvector->time ); - bool_vector_free( plot_tvector->mask ); -} - - -bool enkf_plot_tvector_all_active( const enkf_plot_tvector_type * plot_tvector ) { - bool all_active = true; - for (int i=0; i < bool_vector_size( plot_tvector->mask ); i++) - all_active = all_active && bool_vector_iget(plot_tvector->mask , i ); - - return all_active; -} - - -int enkf_plot_tvector_size( const enkf_plot_tvector_type * plot_tvector ) { - return bool_vector_size( plot_tvector->mask ); -} - - -void enkf_plot_tvector_iset( enkf_plot_tvector_type * plot_tvector , int index , time_t time , double value) { - time_t_vector_iset( plot_tvector->time , index , time ); - bool active_value = true; - - /* This is to handle holes in the summary vector storage. */ - if (plot_tvector->summary_mode && !summary_active_value( value )) - active_value = false; - - if (active_value) { - double_vector_iset( plot_tvector->data , index , value ); - bool_vector_iset( plot_tvector->mask , index , true ); - } else - bool_vector_iset( plot_tvector->mask , index , false ); - -} - - - -double enkf_plot_tvector_iget_value( const enkf_plot_tvector_type * plot_tvector , int index) { - return double_vector_iget( plot_tvector->data , index); -} - -time_t enkf_plot_tvector_iget_time( const enkf_plot_tvector_type * plot_tvector , int index) { - return time_t_vector_iget( plot_tvector->time , index); -} - -bool enkf_plot_tvector_iget_active( const enkf_plot_tvector_type * plot_tvector , int index) { - return bool_vector_iget( plot_tvector->mask , index ); -} - - - - - - -void enkf_plot_tvector_load( enkf_plot_tvector_type * plot_tvector , - enkf_fs_type * fs , - const char * index_key) { - - time_map_type * time_map = enkf_fs_get_time_map( fs ); - int step1 = 0; - int step2 = time_map_get_last_step( time_map ); - enkf_node_type * work_node = enkf_node_alloc( plot_tvector->config_node ); - - if (enkf_node_vector_storage( work_node )) { - bool has_data = enkf_node_user_get_vector(work_node , fs , index_key , plot_tvector->iens , plot_tvector->work); - - if(has_data) { - for (int step = 0; step < time_map_get_size(time_map); step++) - enkf_plot_tvector_iset( plot_tvector , - step , - time_map_iget( time_map , step ) , - double_vector_iget( plot_tvector->work , step )); - } - } else { - int step; - node_id_type node_id = {.iens = plot_tvector->iens, - .report_step = 0 }; - - for (step = step1 ; step <= step2; step++) { - double value; - node_id.report_step = step; - - if (enkf_node_user_get(work_node , fs , index_key , node_id , &value)) { - enkf_plot_tvector_iset( plot_tvector , - step , - time_map_iget( time_map , step ) , - value ); - } - } - } - enkf_node_free( work_node ); -} - - -void * enkf_plot_tvector_load__( void * arg ) { - arg_pack_type * arg_pack = arg_pack_safe_cast( arg ); - enkf_plot_tvector_type * tvector = arg_pack_iget_ptr( arg_pack , 0 ); - enkf_fs_type * fs = arg_pack_iget_ptr( arg_pack , 1 ); - const char * index_key = arg_pack_iget_ptr( arg_pack , 2 ); - - enkf_plot_tvector_load( tvector , fs , index_key ); - return NULL; -} - diff --git a/ThirdParty/Ert/libenkf/src/enkf_serialize.c b/ThirdParty/Ert/libenkf/src/enkf_serialize.c deleted file mode 100644 index 3532e8e03a..0000000000 --- a/ThirdParty/Ert/libenkf/src/enkf_serialize.c +++ /dev/null @@ -1,276 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_serialize.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -#include - -#include -#include -#include - -/** This is heavy shit ... */ - - -/** - This file handles serialization and deserialization of the - enkf_nodes. This is at the very core of the EnKF update - algorithm. The final update step is written: - - A' = XA - - i.e. it is linear algeabra, and we need(?) to write the various - objects in the form of an ensemble matrix, this is the process we - call serialization. Then the linear algebra update is performed, - and afterwards we must read the data back from the ensemble matrix - to the enkf_node object, this is deserialization. - - - - - =============== =============== - | PORO-1 | | PORO-2 | - |-------------- Member 2 |-------------- - | | ======== | | - | P0 ... P10 | Member 1 | | P0 ... P10 | - =============== ======== | =============== - /|\ | ----- /|\ - | | | | - | \|/ \|/ | - | | - | [ P0 P0 ] | - | [ P1 P1 ] | - ------------------>[ P2 P2 ]<------------------- - [ P3 P3 ] - [ P4 P4 ] - [ ] ============== - [ R1 R1 ] | RELPERM-2 | - ============== ------>[ R2 R2 ]<----------->|------------| - | RELPERM-1 | | [ R3 R3 ] | | - |------------|<---- [ ] | R0 ... R5 | - | | [ F2 F2 ] ============== - | R0 ... R5 | ---->[ F3 F3 ] - ============== | [ F4 F4 ]<----- - | [ F6 F6 ] | - | | - | | ============== - | | | FAULT-1 | - | ----------->|------------| - ============== | | | - | FAULT-1 | | | F0 ... F6 | - |------------|<------ ============== - | | - | F0 ... F6 | - ============== - - - -This figure shows the following: - - 1. Three different nodes called PORO, RELPERM and FAULT - respectively. The PORO node consists of eleven elements (P0 - ... P10), whereas the RELPERM and FAULT nodes contain six and - seven elements. - - 2. The ensemble consists of two members (i.e. there is PORO-1 and - PORO-2.). - - 3. The members have been serialized into a a large vector where - everything comes ordered. Observe that *NOT* all elements from the - members have been inserted into the large vector, i.e. for the - PORO fields we only have elements P0 .. P4; this is because (for - some reason) not all elements were active. - - -Each of the enkf_node functions have their own xxx_serialize and -xxx_deserialize functions, however these functions SHOULD call the -enkf_serialize() and enkf_deserialize() functions in this -file. (Rolling your own serialize / deserialize functions at the -lowest level is a SERIOUS CRIME.) - -The illustration above shows three different enkf_node objects which -have been COMPLETELY serialized. One of the reasons the code is so -complex is that it is supposed to handle situations where the serial -vector is to small to hold everything, and repeated calls to serialize -& deserialize must be performed to complete the thing. - - -About stride -============ -In the enkf update the ensemble matrix A is just that - a matrix, -however in this elegant high-level language it is of course -implemented as one long linear vector. The matrix is implemented such -that the 'member-direction' is fastest running index. Consider the -following ensemble matrix, consisting of five ensemble members: - - - - - - Member 5 - Member 2 -- | - | | - | | -Member 1 ---- | | - | | | - \|/ \|/ \|/ - [ P0 P0 P0 P0 P0 ] - [ P1 P1 P1 P1 P1 ] - [ P2 P2 P2 P2 P2 ] - [ P3 P3 P3 P3 P3 ] - [ R0 R0 R0 R0 R0 ] - A = [ R1 R1 R1 R1 R1 ] - [ R2 R2 R2 R2 R2 ] - [ F0 F0 F0 F0 F0 ] - [ F1 F1 F1 F1 F1 ] - [ F2 F2 F2 F2 F2 ] - [ F3 F3 F3 F3 F3 ] - - -The in memory the matrix will look like this: - - - Member 2 - | - ______________|______________ - / | \ - | | | - ______________|______________|______________|______________ - / | | | \ - | | | | | - | | | | | - \|/ \|/ \|/ \|/ \|/ ........... - A =[ P0 P0 P0 P0 P0 P1 P1 P1 P1 P1 P2 P2 P2 P2 P2 P3 P3 P3 P3 P3 R0 R0 R0 R0 R0 R1 R1 R1 R1 R1 R2 R2 R2 R2 R2 F0 F0 F0 F0 F0 F1 F1 F1 F1 F1 F2 F2 F2 F2 F2 F3 F3 F3 F3 F3 ...] - /|\ X1 /|\ X2 /|\ /|\ /|\ ........ - | | | | | - | | | | | - \______________|______________|______________|______________/ - | | | - | | | - \______________|______________/ - | - | - Member 1 - -The stride in the serial_vector_type object is the number of elements -between consecutive elements in the same member, i.e. it is five in -the vector above. (Starting at e.g. P0 for member three (marked with -X1 in the figure), P1 for the same member is five elements down in the -vector (marked with X2 above)). Now - that was clear ehhh? - -*****************************************************************/ - - - -/* - It will be very costly to make it thread-safe if we manipulate the - shape of the A matrix from here. -*/ - - -void enkf_matrix_serialize(const void * __node_data , - int node_size , - ecl_type_enum node_type , - const active_list_type * __active_list , - matrix_type * A , - int row_offset, - int column) { - - int active_size; - const int * active_list = active_list_get_active( __active_list ); - active_size = active_list_get_active_size( __active_list , node_size); - - if (node_type == ECL_DOUBLE_TYPE) { - const double * node_data = (const double *) __node_data; - if (active_size == node_size) /** All elements active */ - matrix_set_many_on_column( A , row_offset , node_size , node_data , column); - else { - int row_index; - int node_index; - for (row_index = 0; row_index < active_size; row_index++) { - node_index = active_list[ row_index ]; - matrix_iset( A , row_index + row_offset , column , node_data[node_index] ); - } - } - } else if (node_type == ECL_FLOAT_TYPE) { - const float * node_data = (const float *) __node_data; - int row_index; - if (active_size == node_size) {/** All elements active */ - for (row_index = 0; row_index < node_size; row_index++) - matrix_iset( A , row_index + row_offset , column , node_data[ row_index ]); /* Must have float -> double conversion; can not use memcpy() based approach */ - } else { - int row_index; - int node_index; - for (row_index = 0; row_index < active_size; row_index++) { - node_index = active_list[ row_index ]; - matrix_iset( A , row_index + row_offset , column , node_data[node_index] ); - } - } - } else - util_abort("%s: internal error: trying to serialize unserializable type:%s \n",__func__ , ecl_util_get_type_name( node_type )); -} - - -void enkf_matrix_deserialize(void * __node_data , - int node_size , - ecl_type_enum node_type , - const active_list_type * __active_list , - const matrix_type * A, - int row_offset, - int column) { - - int active_size; - const int * active_list = active_list_get_active( __active_list ); - active_size = active_list_get_active_size( __active_list , node_size ); - - if (node_type == ECL_DOUBLE_TYPE) { - double * node_data = (double *) __node_data; - - if (active_size == node_size) { /** All elements active */ - int row_index; - for (row_index = 0; row_index < active_size; row_index++) - node_data[row_index] = matrix_iget( A , row_index + row_offset , column); - } else { - int row_index; - int node_index; - for (row_index = 0; row_index < active_size; row_index++) { - node_index = active_list[ row_index ]; - node_data[node_index] = matrix_iget( A , row_index + row_offset , column); - } - } - - } else if (node_type == ECL_FLOAT_TYPE) { - float * node_data = (float *) __node_data; - - if (active_size == node_size) { /** All elements active */ - int row_index; - for (row_index = 0; row_index < active_size; row_index++) - node_data[row_index] = matrix_iget( A , row_index + row_offset , column); - } else { - int row_index; - int node_index; - for (row_index = 0; row_index < active_size; row_index++) { - node_index = active_list[ row_index ]; - node_data[node_index] = matrix_iget( A , row_index + row_offset , column); - } - } - } else - util_abort("%s: internal error: trying to serialize unserializable type:%s \n",__func__ , ecl_util_get_type_name( node_type )); -} - diff --git a/ThirdParty/Ert/libenkf/src/enkf_state.c b/ThirdParty/Ert/libenkf/src/enkf_state.c deleted file mode 100644 index 5ec0baa4a1..0000000000 --- a/ThirdParty/Ert/libenkf/src/enkf_state.c +++ /dev/null @@ -1,1650 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_state.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define ENKF_STATE_TYPE_ID 78132 - - - - - -/** - This struct contains various objects which the enkf_state needs - during operation, which the enkf_state_object *DOES NOT* own. The - struct only contains pointers to objects owned by (typically) the - enkf_main object. - - If the enkf_state object writes to any of the objects in this - struct that can be considered a serious *BUG*. - - The elements in this struct should not change during the - application lifetime? -*/ - -typedef struct shared_info_struct { - model_config_type * model_config; /* .... */ - ext_joblist_type * joblist; /* The list of external jobs which are installed - and *how* they should be run (with Python code) */ - job_queue_type * job_queue; /* The queue handling external jobs. (i.e. LSF / TORQUE / rsh / local / ... )*/ - const site_config_type * site_config; - ert_templates_type * templates; - const ecl_config_type * ecl_config; -} shared_info_type; - - - - - - -/*****************************************************************/ - -struct enkf_state_struct { - UTIL_TYPE_ID_DECLARATION; - hash_type * node_hash; - subst_list_type * subst_list; /* This a list of key - value pairs which are used in a search-replace - operation on the ECLIPSE data file. Will at least contain the key INIT" - - which will describe initialization of ECLIPSE (EQUIL or RESTART).*/ - ensemble_config_type * ensemble_config; /* The config nodes for the enkf_node objects contained in node_hash. */ - - shared_info_type * shared_info; /* Pointers to shared objects which is needed by the enkf_state object (read only). */ - member_config_type * my_config; /* Private config information for this member; not updated during a simulation. */ - rng_type * rng; -}; - -/*****************************************************************/ - - -static UTIL_SAFE_CAST_FUNCTION( enkf_state , ENKF_STATE_TYPE_ID ) - - -static shared_info_type * shared_info_alloc(const site_config_type * site_config , model_config_type * model_config, const ecl_config_type * ecl_config , ert_templates_type * templates) { - shared_info_type * shared_info = util_malloc(sizeof * shared_info ); - - shared_info->joblist = site_config_get_installed_jobs( site_config ); - shared_info->job_queue = site_config_get_job_queue( site_config ); - shared_info->site_config = site_config; - shared_info->model_config = model_config; - shared_info->templates = templates; - shared_info->ecl_config = ecl_config; - return shared_info; -} - - -static void shared_info_free(shared_info_type * shared_info) { - /** - Adding something here is a BUG - this object does - not own anything. - */ - free( shared_info ); -} - - - - - -/*****************************************************************/ -/** Helper classes complete - starting on the enkf_state proper object. */ -/*****************************************************************/ - -void enkf_state_initialize(enkf_state_type * enkf_state , enkf_fs_type * fs , const stringlist_type * param_list, init_mode_type init_mode) { - if (init_mode != INIT_NONE) { - int iens = enkf_state_get_iens( enkf_state ); - state_map_type * state_map = enkf_fs_get_state_map( fs ); - realisation_state_enum current_state = state_map_iget(state_map, iens); - if ((current_state == STATE_PARENT_FAILURE) && (init_mode != INIT_FORCE)) - return; - else { - for (int ip = 0; ip < stringlist_get_size(param_list); ip++) { - enkf_node_type * param_node = enkf_state_get_node(enkf_state, stringlist_iget(param_list, ip)); - node_id_type node_id = { .report_step = 0, .iens = iens }; - bool has_data = enkf_node_has_data(param_node, fs, node_id); - - if ((init_mode == INIT_FORCE) || (has_data == false) || (current_state == STATE_LOAD_FAILURE)) { - if (enkf_node_initialize(param_node, iens, enkf_state->rng)) - enkf_node_store(param_node, fs, true, node_id); - } - } - state_map_update_matching(state_map , iens , STATE_UNDEFINED | STATE_LOAD_FAILURE , STATE_INITIALIZED); - enkf_fs_fsync(fs); - } - } -} - - - - - - - -/* - void enkf_state_set_iens(enkf_state_type * enkf_state , int iens) { - enkf_state->my_iens = iens; - } -*/ - -int enkf_state_get_iens(const enkf_state_type * enkf_state) { - return member_config_get_iens( enkf_state->my_config ); -} - -member_config_type * enkf_state_get_member_config(const enkf_state_type * enkf_state) { - return enkf_state->my_config; -} - - - -subst_list_type * enkf_state_get_subst_list( enkf_state_type * enkf_state ) { - return enkf_state->subst_list; -} - -void enkf_state_add_subst_kw(enkf_state_type * enkf_state , const char * kw , const char * value , const char * doc_string) { - char * tagged_key = util_alloc_sprintf( INTERNAL_DATA_KW_TAG_FORMAT , kw ); - subst_list_append_owned_ref(enkf_state->subst_list , tagged_key , util_alloc_string_copy(value) , doc_string); - free(tagged_key); -} - - - - - -/** - This function must be called each time the eclbase_fmt has been - updated. -*/ - -void enkf_state_update_eclbase( enkf_state_type * enkf_state ) { - const char * eclbase = member_config_update_eclbase( enkf_state->my_config , enkf_state->shared_info->ecl_config , enkf_state->subst_list); - const char * casename = member_config_get_casename( enkf_state->my_config ); /* Mostly NULL */ - { - enkf_state_add_subst_kw(enkf_state , "ECL_BASE" , eclbase , NULL); - enkf_state_add_subst_kw(enkf_state , "ECLBASE" , eclbase , NULL); - - if (casename == NULL) - enkf_state_add_subst_kw( enkf_state , "CASE" , eclbase , NULL); /* No CASE_TABLE loaded - using the eclbase as default. */ - else - enkf_state_add_subst_kw( enkf_state , "CASE" , casename , NULL); - } -} - - -void enkf_state_update_jobname( enkf_state_type * enkf_state ) { - member_config_update_jobname( enkf_state->my_config , - model_config_get_jobname_fmt( enkf_state->shared_info->model_config ) , - enkf_state->subst_list); -} - - -/** - Sets all the static subst keywords which will not change during the simulation. -*/ -static void enkf_state_set_static_subst_kw(enkf_state_type * enkf_state) { - - { - int iens = member_config_get_iens( enkf_state->my_config ); - char * iens_s = util_alloc_sprintf("%d" , iens); - char * iens4_s = util_alloc_sprintf("%04d" , iens); - char * iensp1_s = util_alloc_sprintf("%d" , iens + 1); - - enkf_state_add_subst_kw(enkf_state , "IENS" , iens_s , NULL); - enkf_state_add_subst_kw(enkf_state , "IENSP1" , iensp1_s , NULL); - enkf_state_add_subst_kw(enkf_state , "IENS4" , iens4_s , NULL); - - free(iensp1_s); - free(iens_s); - free(iens4_s); - } - enkf_state_update_eclbase( enkf_state ); -} - - -static void enkf_state_add_nodes( enkf_state_type * enkf_state, const ensemble_config_type * ensemble_config) { - stringlist_type * container_keys = stringlist_alloc_new(); - stringlist_type * keylist = ensemble_config_alloc_keylist(ensemble_config); - int keys = stringlist_get_size(keylist); - - // 1: Add all regular nodes - for (int ik = 0; ik < keys; ik++) { - const char * key = stringlist_iget(keylist, ik); - const enkf_config_node_type * config_node = ensemble_config_get_node(ensemble_config , key); - if (enkf_config_node_get_impl_type( config_node ) == CONTAINER) { - stringlist_append_ref( container_keys , key ); - } else - enkf_state_add_node(enkf_state , key , config_node); - } - - // 2: Add container nodes - must ensure that all other nodes have - // been added already (this implies that containers of containers - // will be victim of hash retrieval order problems .... - - for (int ik = 0; ik < stringlist_get_size( container_keys ); ik++) { - const char * key = stringlist_iget(container_keys, ik); - const enkf_config_node_type * config_node = ensemble_config_get_node(ensemble_config , key); - enkf_state_add_node( enkf_state , key , config_node ); - } - - stringlist_free(keylist); - stringlist_free( container_keys ); -} - - -/** - This variable is on a per-instance basis, but that is not really - supported. The exported functionality applies to all realizations. -*/ - -bool enkf_state_get_pre_clear_runpath( const enkf_state_type * enkf_state ) { - return member_config_pre_clear_runpath( enkf_state->my_config ); -} - - -void enkf_state_set_pre_clear_runpath( enkf_state_type * enkf_state , bool pre_clear_runpath ) { - member_config_set_pre_clear_runpath( enkf_state->my_config , pre_clear_runpath ); -} - - - -enkf_state_type * enkf_state_alloc(int iens, - rng_type * main_rng , - const char * casename , - bool pre_clear_runpath , - keep_runpath_type keep_runpath , - model_config_type * model_config, - ensemble_config_type * ensemble_config, - const site_config_type * site_config, - const ecl_config_type * ecl_config, - - ert_templates_type * templates, - subst_list_type * subst_parent) { - - enkf_state_type * enkf_state = util_malloc(sizeof *enkf_state ); - UTIL_TYPE_ID_INIT( enkf_state , ENKF_STATE_TYPE_ID ); - - enkf_state->ensemble_config = ensemble_config; - enkf_state->shared_info = shared_info_alloc(site_config , model_config , ecl_config , templates); - - enkf_state->node_hash = hash_alloc(); - enkf_state->subst_list = subst_list_alloc( subst_parent ); - enkf_state->rng = rng_alloc( rng_get_type( main_rng ) , INIT_DEFAULT ); - rng_rng_init( enkf_state->rng , main_rng ); /* <- Not thread safe */ - /* - The user MUST specify an INIT_FILE, and for the first timestep the - tag in the data file will be replaced by an - - INCLDUE - EQUIL_INIT_FILE - - statement. When considering the possibility of estimating EQUIL this - require a real understanding of the treatment of paths: - - * If not estimating the EQUIL contacts, all members should use the - same init_file. To ensure this the user must specify the ABSOLUTE - PATH to a file containing initialization information. - - * If the user is estimating initial contacts, the INIT_FILE must - point to the ecl_file of the EQUIL keyword, this must be a pure - filename without any path component (as it will be generated by - the EnKF program, and placed in the run_path directory). We could - let the EnKF program use the ecl_file of the EQUIL keyword if it - is present. - - The key is actually initialized in the - enkf_state_set_dynamic_subst_kw() function. - */ - - /** - Adding all the subst_kw keywords here, with description. Listing - all of them here in one go guarantees that we have control over - the ordering (which is interesting because the substititions are - done in a cascade like fashion). The user defined keywords are - added first, so that these can refer to the built in keywords. - */ - - enkf_state_add_subst_kw(enkf_state , "RUNPATH" , "---" , "The absolute path of the current forward model instance. "); - enkf_state_add_subst_kw(enkf_state , "IENS" , "---" , "The realisation number for this realization."); - enkf_state_add_subst_kw(enkf_state , "IENS4" , "---" , "The realization number for this realization - formated with %04d."); - enkf_state_add_subst_kw(enkf_state , "ECLBASE" , "---" , "The ECLIPSE basename for this realization."); - enkf_state_add_subst_kw(enkf_state , "ECL_BASE" , "---" , "Depreceated - use ECLBASE instead."); - enkf_state_add_subst_kw(enkf_state , "SMSPEC" , "---" , "The ECLIPSE SMSPEC file for this realization."); - enkf_state_add_subst_kw(enkf_state , "TSTEP1" , "---" , "The initial report step for this simulation."); - enkf_state_add_subst_kw(enkf_state , "TSTEP2" , "---" , "The final report step for this simulation."); - enkf_state_add_subst_kw(enkf_state , "TSTEP1_04" , "---" , "The initial report step for this simulation - formated with %04d."); - enkf_state_add_subst_kw(enkf_state , "TSTEP2_04" , "---" , "The final report step for this simulation - formated withh %04d."); - enkf_state_add_subst_kw(enkf_state , "RESTART_FILE1" , "---" , "The ECLIPSE restart file this simulation starts with."); - enkf_state_add_subst_kw(enkf_state , "RESTART_FILE2" , "---" , "The ECLIPSE restart file this simulation should end with."); - enkf_state_add_subst_kw(enkf_state , "RANDINT" , "---" , "Random integer value (depreceated: use __RANDINT__() instead)."); - enkf_state_add_subst_kw(enkf_state , "RANDFLOAT" , "---" , "Random float value (depreceated: use __RANDFLOAT__() instead)."); - enkf_state_add_subst_kw(enkf_state , "INIT" , "---" , "The code which will be inserted at the tag"); - if (casename != NULL) - enkf_state_add_subst_kw(enkf_state , "CASE" , casename , "The casename for this realization - as loaded from the CASE_TABLE file."); - else - enkf_state_add_subst_kw(enkf_state , "CASE" , "---" , "The casename for this realization - similar to ECLBASE."); - - enkf_state->my_config = member_config_alloc( iens , casename , pre_clear_runpath , keep_runpath , ecl_config , ensemble_config); - enkf_state_set_static_subst_kw( enkf_state ); - enkf_state_add_nodes( enkf_state , ensemble_config ); - - return enkf_state; -} - - - - -bool enkf_state_has_node(const enkf_state_type * enkf_state , const char * node_key) { - bool has_node = hash_has_key(enkf_state->node_hash , node_key); - return has_node; -} - - - -/** - The enkf_state inserts a reference to the node object. The - enkf_state object takes ownership of the node object, i.e. it will - free it when the game is over. - - Observe that if the node already exists the existing node will be - removed (freed and so on ... ) from the enkf_state object before - adding the new; this was previously considered a run-time error. -*/ - - -void enkf_state_add_node(enkf_state_type * enkf_state , const char * node_key , const enkf_config_node_type * config) { - if (enkf_state_has_node(enkf_state , node_key)) - enkf_state_del_node( enkf_state , node_key ); /* Deleting the old instance (if we had one). */ - { - enkf_node_type *enkf_node; - if (enkf_config_node_get_impl_type( config ) == CONTAINER) - enkf_node = enkf_node_alloc_shared_container( config , enkf_state->node_hash ); - else - enkf_node = enkf_node_alloc( config ); - - hash_insert_hash_owned_ref(enkf_state->node_hash , node_key , enkf_node, enkf_node_free__); - - /* Setting the global subst list so that the GEN_KW templates can contain e.g. and . */ - if (enkf_node_get_impl_type( enkf_node ) == GEN_KW) - gen_kw_set_subst_parent( enkf_node_value_ptr( enkf_node ) , enkf_state->subst_list ); - } -} - - -enkf_node_type * enkf_state_get_or_create_node(enkf_state_type * enkf_state, const enkf_config_node_type * config_node) { - const char * key = enkf_config_node_get_key(config_node); - if(!enkf_state_has_node(enkf_state, key)) { - enkf_state_add_node(enkf_state, key, config_node); - } - return enkf_state_get_node(enkf_state, key); -} - - - -void enkf_state_update_node( enkf_state_type * enkf_state , const char * node_key ) { - const enkf_config_node_type * config_node = ensemble_config_get_node( enkf_state->ensemble_config , node_key ); - if (!enkf_state_has_node( enkf_state , node_key)) - enkf_state_add_node( enkf_state , node_key , config_node ); /* Add a new node */ - else { - bool modified = true; /* ehhhh? */ - - if (modified) - enkf_state_add_node( enkf_state , node_key , config_node ); - } -} - - -const char * enkf_state_get_eclbase( const enkf_state_type * enkf_state ) { - return member_config_get_eclbase( enkf_state->my_config ); -} - - - - -static void enkf_state_log_GEN_DATA_load( const enkf_node_type * enkf_node , int report_step , forward_load_context_type * load_context) { - if (forward_load_context_accept_messages(load_context)) { - char * load_file = enkf_config_node_alloc_infile(enkf_node_get_config( enkf_node ) , report_step); - int data_size = gen_data_get_size( enkf_node_value_ptr( enkf_node )); - char * msg = util_alloc_sprintf("Loaded GEN_DATA:%s instance for step:%d from file:%s size:%d" , - enkf_node_get_key( enkf_node ) , - report_step , - load_file , - data_size); - - forward_load_context_add_message(load_context, msg); - - free( msg ); - free( load_file ); - } -} - - -static void enkf_state_log_custom_kw_load(const enkf_node_type * enkf_node, int report_step, forward_load_context_type * load_context) { - if (forward_load_context_accept_messages(load_context)) { - char * load_file = enkf_config_node_alloc_infile(enkf_node_get_config(enkf_node), report_step); - char * msg = util_alloc_sprintf("Loaded CUSTOM_KW: %s instance for step: %d from file: %s", - enkf_node_get_key(enkf_node), - report_step, - load_file); - - forward_load_context_add_message(load_context, msg); - - free(msg); - free(load_file); - } -} - -static bool enkf_state_report_step_compatible(const enkf_state_type * enkf_state, const ecl_sum_type * ecl_sum_simulated) { - bool ret = true; - - const model_config_type * model_config = enkf_state->shared_info->model_config; - const ecl_sum_type * ecl_sum_reference = model_config_get_refcase(model_config); - - if (ecl_sum_reference) //Can be NULL - ret = ecl_sum_report_step_compatible(ecl_sum_reference, ecl_sum_simulated); - - return ret; -} - - -static int_vector_type * __enkf_state_get_time_index(enkf_fs_type * result_fs, const ecl_sum_type * summary) { - time_map_type * time_map = enkf_fs_get_time_map( result_fs ); - time_map_summary_update( time_map , summary ); - return time_map_alloc_index_map( time_map , summary ); -} - - -/* - * Check if there are summary keys in the ensemble config that is not found in Eclipse. If this is the case, AND we - * have observations for this key, we have a problem. Otherwise, just print a message to the log. - */ -static void enkf_state_check_for_missing_eclipse_summary_data(const summary_key_matcher_type * matcher, const ecl_smspec_type * smspec, - const enkf_state_type * enkf_state, forward_load_context_type * load_context, const int iens ) { - - stringlist_type * keys = summary_key_matcher_get_keys(matcher); - - for (int i = 0; i < stringlist_get_size(keys); i++) { - - const char *key = stringlist_iget(keys, i); - - if (ecl_smspec_has_general_var(smspec, key) || !summary_key_matcher_summary_key_is_required(matcher, key)) - continue; - - if (!ensemble_config_has_key(enkf_state->ensemble_config, key)) - continue; - - const enkf_config_node_type *config_node = ensemble_config_get_node(enkf_state->ensemble_config, key); - if (enkf_config_node_get_num_obs(config_node) == 0) { - ert_log_add_fmt_message(3, NULL, "[%03d:----] Unable to find Eclipse data for summary key: %s, but have no observations either, so will continue.", - iens, key); - } else { - ert_log_add_fmt_message(1, NULL, "[%03d:----] Unable to find Eclipse data for summary key: %s, but have observation for this, job will fail.", - iens, key); - forward_load_context_update_result(load_context, LOAD_FAILURE); - if (forward_load_context_accept_messages(load_context)) { - char *msg = util_alloc_sprintf("Failed to load vector: %s", key); - forward_load_context_add_message(load_context, msg); - free(msg); - } - } - } - - stringlist_free(keys); -} - -static bool enkf_state_internalize_dynamic_eclipse_results(enkf_state_type * enkf_state , - forward_load_context_type * load_context , - const model_config_type * model_config) { - - bool load_summary = ensemble_config_has_impl_type(enkf_state->ensemble_config, SUMMARY); - const run_arg_type * run_arg = forward_load_context_get_run_arg( load_context ); - const summary_key_matcher_type * matcher = ensemble_config_get_summary_key_matcher(enkf_state->ensemble_config); - int matcher_size = summary_key_matcher_get_size(matcher); - - if (load_summary || matcher_size > 0) { - int load_start = run_arg_get_load_start( run_arg ); - - if (load_start == 0) { /* Do not attempt to load the "S0000" summary results. */ - load_start++; - } - - { - /* Looking for summary files on disk, and loading them. */ - const ecl_sum_type * summary = forward_load_context_get_ecl_sum( load_context ); - enkf_fs_type * result_fs = run_arg_get_result_fs( run_arg ); - /** OK - now we have actually loaded the ecl_sum instance, or ecl_sum == NULL. */ - if (summary) { - int_vector_type * time_index = __enkf_state_get_time_index(result_fs, summary); - - /* - Now there are two related / conflicting(?) systems for - checking summary time consistency, both internally in the - time_map and also through the - enkf_state_report_step_compatible() function. - */ - - /*Check the loaded summary against the reference ecl_sum_type */ - if (!enkf_state_report_step_compatible(enkf_state, summary)) - forward_load_context_update_result(load_context, REPORT_STEP_INCOMPATIBLE); - - - /* The actual loading internalizing - from ecl_sum -> enkf_node. */ - const int iens = member_config_get_iens( enkf_state->my_config ); - const int step2 = ecl_sum_get_last_report_step( summary ); /* Step2 is just taken from the number of steps found in the summary file. */ - - int_vector_iset_block( time_index , 0 , load_start , -1 ); - int_vector_resize( time_index , step2 + 1); - - const ecl_smspec_type * smspec = ecl_sum_get_smspec(summary); - - for(int i = 0; i < ecl_smspec_num_nodes(smspec); i++) { - const smspec_node_type * smspec_node = ecl_smspec_iget_node(smspec, i); - const char * key = smspec_node_get_gen_key1(smspec_node); - - if(summary_key_matcher_match_summary_key(matcher, key)) { - summary_key_set_type * key_set = enkf_fs_get_summary_key_set(result_fs); - summary_key_set_add_summary_key(key_set, key); - - enkf_config_node_type * config_node = ensemble_config_get_or_create_summary_node(enkf_state->ensemble_config, key); - enkf_node_type * node = enkf_state_get_or_create_node(enkf_state, config_node); - - enkf_node_try_load_vector( node , result_fs , iens ); // Ensure that what is currently on file is loaded before we update. - - enkf_node_forward_load_vector( node , load_context , time_index); - enkf_node_store_vector( node , result_fs , iens ); - } - } - - int_vector_free( time_index ); - - /* - Check if some of the specified keys are missing from the Eclipse data, and if there are observations for them. That is a problem. - */ - enkf_state_check_for_missing_eclipse_summary_data(matcher, smspec, enkf_state, load_context, iens); - - return true; - } else { - fprintf(stderr , "** Warning: could not load ECLIPSE summary data from %s - this will probably fail later ...\n" , run_arg_get_runpath( run_arg )); - return false; - } - } - } else { - return true; - } -} - - - - - - -static void enkf_state_internalize_custom_kw(enkf_state_type * enkf_state, - forward_load_context_type * load_context , - const model_config_type * model_config) { - - member_config_type * my_config = enkf_state->my_config; - const int iens = member_config_get_iens( my_config ); - stringlist_type * custom_kw_keys = ensemble_config_alloc_keylist_from_impl_type(enkf_state->ensemble_config, CUSTOM_KW); - const run_arg_type * run_arg = forward_load_context_get_run_arg( load_context ); - enkf_fs_type * result_fs = run_arg_get_result_fs(run_arg); - const int report_step = 0; - - custom_kw_config_set_type * config_set = enkf_fs_get_custom_kw_config_set(result_fs); - custom_kw_config_set_reset(config_set); - - for (int ikey=0; ikey < stringlist_get_size(custom_kw_keys); ikey++) { - const char* custom_kw_key = stringlist_iget(custom_kw_keys, ikey); - enkf_node_type * node = enkf_state_get_node(enkf_state, custom_kw_key); - - if (enkf_node_vector_storage(node)) { - util_abort("%s: Vector storage not correctly implemented for CUSTOM_KW\n", __func__); - } else { - if (enkf_node_internalize(node, report_step)) { - if (enkf_node_has_func(node, forward_load_func)) { - if (enkf_node_forward_load(node, load_context)) { - node_id_type node_id = {.report_step = report_step, .iens = iens }; - - enkf_node_store(node, result_fs, false, node_id); - - const enkf_config_node_type * config_node = enkf_node_get_config(node); - const custom_kw_config_type * custom_kw_config = (custom_kw_config_type*) enkf_config_node_get_ref(config_node); - custom_kw_config_set_add_config(config_set, custom_kw_config); - enkf_state_log_custom_kw_load(node, report_step, load_context); - } else { - forward_load_context_update_result(load_context, LOAD_FAILURE); - ert_log_add_fmt_message(1, stderr, "[%03d:%04d] Failed load data for CUSTOM_KW node: %s.", iens , report_step, enkf_node_get_key(node)); - - if (forward_load_context_accept_messages(load_context)) { - char * msg = util_alloc_sprintf("Failed to load: %s at step: %d", enkf_node_get_key(node), report_step); - forward_load_context_add_message(load_context , msg); - free( msg ); - } - } - } - } - } - } - - stringlist_free(custom_kw_keys); -} - - - -static void enkf_state_internalize_GEN_DATA(enkf_state_type * enkf_state , - forward_load_context_type * load_context , - const model_config_type * model_config , - int last_report) { - { - member_config_type * my_config = enkf_state->my_config; - const int iens = member_config_get_iens( my_config ); - stringlist_type * keylist_GEN_DATA = ensemble_config_alloc_keylist_from_impl_type(enkf_state->ensemble_config , GEN_DATA ); - const run_arg_type * run_arg = forward_load_context_get_run_arg( load_context ); - enkf_fs_type * result_fs = run_arg_get_result_fs( run_arg ); - - for (int ikey=0; ikey < stringlist_get_size( keylist_GEN_DATA ); ikey++) { - enkf_node_type * node = enkf_state_get_node( enkf_state , stringlist_iget( keylist_GEN_DATA , ikey)); - - for (int report_step = run_arg_get_load_start( run_arg ); report_step <= last_report; report_step++) { - if (enkf_node_internalize(node , report_step)) { - - if (enkf_node_has_func(node , forward_load_func)) { - forward_load_context_select_step(load_context, report_step); - if (enkf_node_forward_load(node , load_context )) { - node_id_type node_id = {.report_step = report_step , - .iens = iens }; - - enkf_node_store( node , result_fs, false , node_id ); - enkf_state_log_GEN_DATA_load( node , report_step , load_context); - } else { - forward_load_context_update_result(load_context, LOAD_FAILURE); - ert_log_add_fmt_message(1 , stderr , "[%03d:%04d] Failed load data for GEN_DATA node:%s.",iens , report_step , enkf_node_get_key( node )); - - if (forward_load_context_accept_messages(load_context)) { - char * msg = util_alloc_sprintf("Failed to load: %s at step:%d" , enkf_node_get_key( node ) , report_step); - forward_load_context_add_message(load_context, msg); - free( msg ); - } - } - } - } - } - } - stringlist_free( keylist_GEN_DATA ); - } -} - - -/** - This function loads the STATE from a forward simulation. In ECLIPSE - speak that means to load the solution vectors (PRESSURE/SWAT/..) - and the necessary static keywords. - - When the state has been loaded it goes straight to disk. -*/ - -static void enkf_state_internalize_eclipse_state(enkf_state_type * enkf_state , - forward_load_context_type * load_context, - const model_config_type * model_config , - int report_step , - bool store_vectors) { - - shared_info_type * shared_info = enkf_state->shared_info; - const ecl_config_type * ecl_config = shared_info->ecl_config; - const run_arg_type * run_arg = forward_load_context_get_run_arg( load_context ); - enkf_fs_type * result_fs = run_arg_get_result_fs( run_arg ); - if (ecl_config_active( ecl_config ) && model_config_internalize_state( model_config , report_step )) { - member_config_type * my_config = enkf_state->my_config; - const int iens = member_config_get_iens( my_config ); - const bool internalize_state = model_config_internalize_state( model_config , report_step ); - - forward_load_context_load_restart_file( load_context , report_step); - - /******************************************************************/ - /** - Starting on the enkf_node_forward_load() function calls. This - is where the actual loading is done. Observe that this loading - might involve other load functions than the ones used for - loading PRESSURE++ from ECLIPSE restart files (e.g. for - loading seismic results..) - */ - - { - hash_iter_type * iter = hash_iter_alloc(enkf_state->node_hash); - while ( !hash_iter_is_complete(iter) ) { - enkf_node_type * enkf_node = hash_iter_get_next_value(iter); - if (enkf_node_get_var_type(enkf_node) == DYNAMIC_STATE && - enkf_node_get_impl_type(enkf_node) == FIELD) { - - bool internalize_kw = internalize_state; - if (!internalize_kw) - internalize_kw = enkf_node_internalize(enkf_node , report_step); - - if (internalize_kw) { - if (enkf_node_has_func(enkf_node , forward_load_func)) { - if (enkf_node_forward_load(enkf_node , load_context)) { - node_id_type node_id = {.report_step = report_step , - .iens = iens }; - - enkf_node_store( enkf_node , result_fs, store_vectors , node_id ); - } else { - forward_load_context_update_result(load_context, LOAD_FAILURE); - ert_log_add_fmt_message( 1 , NULL , "[%03d:%04d] Failed load data for FIELD node:%s.",iens , report_step , enkf_node_get_key( enkf_node )); - - if (forward_load_context_accept_messages(load_context)) { - char * msg = util_alloc_sprintf("Failed to load: %s at step:%d" , enkf_node_get_key( enkf_node ) , report_step); - forward_load_context_add_message(load_context, msg); - free( msg ); - } - } - } - } - } - } - hash_iter_free(iter); - } - } -} - - - -static forward_load_context_type * enkf_state_alloc_load_context( const enkf_state_type * state , run_arg_type * run_arg, stringlist_type * messages) { - bool load_summary = ensemble_config_has_impl_type(state->ensemble_config, SUMMARY); - if (!load_summary) { - const summary_key_matcher_type * matcher = ensemble_config_get_summary_key_matcher(state->ensemble_config); - load_summary = (summary_key_matcher_get_size(matcher) > 0); - } - - { - forward_load_context_type * load_context; - const ecl_config_type * ecl_config = state->shared_info->ecl_config; - const char * eclbase = enkf_state_get_eclbase( state ); - - load_context = forward_load_context_alloc( run_arg, - load_summary, - ecl_config , - eclbase, - messages ); - return load_context; - } -} - - -/** - This function loads the results from a forward simulations from report_step1 - to report_step2. The details of what to load are in model_config and the - spesific nodes for special cases. - - Will mainly be called at the end of the forward model, but can also - be called manually from external scope. -*/ - - -static int enkf_state_internalize_results(enkf_state_type * enkf_state , run_arg_type * run_arg , stringlist_type * msg_list) { - model_config_type * model_config = enkf_state->shared_info->model_config; - forward_load_context_type * load_context = enkf_state_alloc_load_context( enkf_state , run_arg , msg_list); - int report_step; - - /* - The timing information - i.e. mainly what is the last report step - in these results are inferred from the loading of summary results, - hence we must load the summary results first. - */ - - enkf_state_internalize_dynamic_eclipse_results(enkf_state , - load_context , - model_config); - { - enkf_fs_type * result_fs = run_arg_get_result_fs( run_arg ); - int last_report = time_map_get_last_step( enkf_fs_get_time_map( result_fs )); - if (last_report < 0) - last_report = model_config_get_last_history_restart( enkf_state->shared_info->model_config); - - /* Ensure that the last step is internalized? */ - model_config_set_internalize_state( model_config , last_report); - - for (report_step = run_arg_get_load_start( run_arg ); report_step <= last_report; report_step++) { - bool store_vectors = (report_step == last_report) ? true : false; - if (model_config_load_state( model_config , report_step)) - enkf_state_internalize_eclipse_state(enkf_state , - load_context , - model_config , - report_step , - store_vectors); - } - - enkf_state_internalize_GEN_DATA(enkf_state , load_context , model_config , last_report); - enkf_state_internalize_custom_kw(enkf_state, load_context , model_config); - } - - - int result = forward_load_context_get_result(load_context); - forward_load_context_free( load_context ); - return result; -} - - -int enkf_state_forward_init(enkf_state_type * enkf_state , - run_arg_type * run_arg) { - - int result = 0; - if (run_arg_get_step1(run_arg) == 0) { - int iens = enkf_state_get_iens( enkf_state ); - hash_iter_type * iter = hash_iter_alloc( enkf_state->node_hash ); - while ( !hash_iter_is_complete(iter) ) { - enkf_node_type * node = hash_iter_get_next_value(iter); - if (enkf_node_use_forward_init(node)) { - enkf_fs_type * result_fs = run_arg_get_result_fs( run_arg ); - node_id_type node_id = {.report_step = 0 , - .iens = iens }; - - - /* - Will not reinitialize; i.e. it is essential that the - forward model uses the state given from the stored - instance, and not from the current run of e.g. RMS. - */ - - if (!enkf_node_has_data( node , result_fs , node_id)) { - if (enkf_node_forward_init(node , run_arg_get_runpath( run_arg ) , iens )) - enkf_node_store( node , result_fs , false , node_id ); - else { - char * init_file = enkf_config_node_alloc_initfile( enkf_node_get_config( node ) , run_arg_get_runpath(run_arg) , iens ); - - if (init_file && !util_file_exists( init_file )) - fprintf(stderr,"File not found: %s - failed to initialize node: %s\n", init_file , enkf_node_get_key( node )); - else - fprintf(stderr,"Failed to initialize node: %s\n", enkf_node_get_key( node )); - - util_safe_free( init_file ); - result |= LOAD_FAILURE; - } - } - - } - } - hash_iter_free( iter ); - } - return result; -} - - - -int enkf_state_load_from_forward_model(enkf_state_type * enkf_state , - run_arg_type * run_arg , - stringlist_type * msg_list) { - - int result = 0; - - if (ensemble_config_have_forward_init( enkf_state->ensemble_config )) - result |= enkf_state_forward_init( enkf_state , run_arg ); - - result |= enkf_state_internalize_results( enkf_state , run_arg , msg_list ); - { - state_map_type * state_map = enkf_fs_get_state_map( run_arg_get_result_fs( run_arg ) ); - int iens = member_config_get_iens( enkf_state->my_config ); - if (result & LOAD_FAILURE) - state_map_iset( state_map , iens , STATE_LOAD_FAILURE); - else - state_map_iset( state_map , iens , STATE_HAS_DATA); - } - - return result; -} - - -/** - Observe that this does not return the loadOK flag; it will load as - good as it can all the data it should, and be done with it. -*/ - -void * enkf_state_load_from_forward_model_mt( void * arg ) { - arg_pack_type * arg_pack = arg_pack_safe_cast( arg ); - enkf_state_type * enkf_state = enkf_state_safe_cast(arg_pack_iget_ptr( arg_pack , 0 )); - run_arg_type * run_arg = arg_pack_iget_ptr( arg_pack , 1 ); - stringlist_type * msg_list = arg_pack_iget_ptr( arg_pack , 2 ); - bool manual_load = arg_pack_iget_bool( arg_pack , 3 ); - int * result = arg_pack_iget_ptr( arg_pack , 4 ); - int iens = run_arg_get_iens( run_arg ); - - if (manual_load) - state_map_update_undefined(enkf_fs_get_state_map( run_arg_get_result_fs(run_arg) ) , iens , STATE_INITIALIZED); - - *result = enkf_state_load_from_forward_model( enkf_state , run_arg , msg_list ); - if (*result & REPORT_STEP_INCOMPATIBLE) { - // If refcase has been used for observations: crash and burn. - fprintf(stderr,"** Warning the timesteps in refcase and current simulation are not in accordance - something wrong with schedule file?\n"); - *result -= REPORT_STEP_INCOMPATIBLE; - } - - if (manual_load) { - printf("."); - fflush(stdout); - } - return NULL; -} - - - - - - - -/** - This function writes out all the files needed by an ECLIPSE simulation, this - includes the restart file, and the various INCLUDE files corresponding to - parameteres estimated by EnKF. - - The writing of restart file is delegated to enkf_state_write_restart_file(). -*/ - -void enkf_state_ecl_write(enkf_state_type * enkf_state, const run_arg_type * run_arg , enkf_fs_type * fs) { - { - /** - This iteration manipulates the hash (thorugh the enkf_state_del_node() call) - - ----------------------------------------------------------------------------------------- - T H I S W I L L D E A D L O C K I F T H E H A S H _ I T E R A P I I S U S E D. - ----------------------------------------------------------------------------------------- - */ - - const shared_info_type * shared_info = enkf_state->shared_info; - const model_config_type * model_config = shared_info->model_config; - int iens = enkf_state_get_iens( enkf_state ); - const char * base_name = model_config_get_gen_kw_export_file(model_config); - char * export_file_name = util_alloc_filename( run_arg_get_runpath( run_arg ) , base_name , NULL); - FILE * export_file = util_mkdir_fopen(export_file_name, "w"); - - - const int num_keys = hash_get_size(enkf_state->node_hash); - char ** key_list = hash_alloc_keylist(enkf_state->node_hash); - int ikey; - - for (ikey = 0; ikey < num_keys; ikey++) { - if (true) { - enkf_node_type * enkf_node = hash_get(enkf_state->node_hash , key_list[ikey]); - bool forward_init = enkf_node_use_forward_init( enkf_node ); - - if ((run_arg_get_step1(run_arg) == 0) && (forward_init)) { - node_id_type node_id = {.report_step = 0, - .iens = iens }; - - if (enkf_node_has_data( enkf_node , fs , node_id)) - enkf_node_ecl_write(enkf_node , run_arg_get_runpath( run_arg ) , export_file , run_arg_get_step1(run_arg)); - } else - enkf_node_ecl_write(enkf_node , run_arg_get_runpath( run_arg ) , export_file , run_arg_get_step1(run_arg)); - } - } - util_free_stringlist(key_list , num_keys); - - fclose(export_file); - free(export_file_name); - } -} - - -/** - This function takes a report_step and a analyzed|forecast state as - input; the enkf_state instance is set accordingly and written to - disk. -*/ - - -void enkf_state_fwrite(const enkf_state_type * enkf_state , enkf_fs_type * fs , int mask , int report_step ) { - const member_config_type * my_config = enkf_state->my_config; - const int num_keys = hash_get_size(enkf_state->node_hash); - char ** key_list = hash_alloc_keylist(enkf_state->node_hash); - int ikey; - - for (ikey = 0; ikey < num_keys; ikey++) { - enkf_node_type * enkf_node = hash_get(enkf_state->node_hash , key_list[ikey]); - if (enkf_node_include_type(enkf_node , mask)) { - node_id_type node_id = {.report_step = report_step , .iens = member_config_get_iens( my_config ) }; - enkf_node_store( enkf_node, fs , true , node_id ); - } - } - util_free_stringlist(key_list , num_keys); -} - - -void enkf_state_fread(enkf_state_type * enkf_state , enkf_fs_type * fs , int mask , int report_step ) { - const member_config_type * my_config = enkf_state->my_config; - const int num_keys = hash_get_size(enkf_state->node_hash); - char ** key_list = hash_alloc_keylist(enkf_state->node_hash); - int ikey; - - for (ikey = 0; ikey < num_keys; ikey++) { - enkf_node_type * enkf_node = hash_get(enkf_state->node_hash , key_list[ikey]); - if (enkf_node_include_type(enkf_node , mask)) { - node_id_type node_id = {.report_step = report_step , - .iens = member_config_get_iens( my_config )}; - bool forward_init = enkf_node_use_forward_init( enkf_node ); - if (forward_init) - enkf_node_try_load(enkf_node , fs , node_id ); - else - enkf_node_load(enkf_node , fs , node_id); - } - } - util_free_stringlist(key_list , num_keys); -} - - -/** - This function will load all the nodes listed in the current - restart_kw_list; in addition to all other variable of type - DYNAMIC_STATE. Observe that for DYNAMIC state nodes it will try - firt analyzed state and then forecast state. -*/ - - -static void enkf_state_fread_state_nodes(enkf_state_type * enkf_state , enkf_fs_type * fs , int report_step ) { - const member_config_type * my_config = enkf_state->my_config; - const int iens = member_config_get_iens( my_config ); - - /* - First pass - load all the STATIC nodes. It is essential to use - the restart_kw_list when loading static nodes, otherwise static - nodes which were only present at e.g. step == 0 will create - problems: (They are in the enkf_state hash table because they - were seen at step == 0, but have not been seen subesquently and - the loading fails.) - */ - - /* Second pass - DYNAMIC state nodes. */ - { - const int num_keys = hash_get_size(enkf_state->node_hash); - char ** key_list = hash_alloc_keylist(enkf_state->node_hash); - int ikey; - - for (ikey = 0; ikey < num_keys; ikey++) { - enkf_node_type * enkf_node = hash_get(enkf_state->node_hash , key_list[ikey]); - enkf_var_type var_type = enkf_node_get_var_type( enkf_node ); - node_id_type node_id = {.report_step = report_step , - .iens = iens }; - - if (var_type == DYNAMIC_STATE) { - /* - Here the enkf_node_try_load() function is used NOT because we accept - that the node is not present, but because the try_fread() - function accepts the BOTH state type. - */ - if (!enkf_node_try_load(enkf_node , fs , node_id)) - util_abort("%s: failed to load node:%s report_step:%d iens:%d \n",__func__ , key_list[ikey] , report_step , iens ); - } - } - util_free_stringlist(key_list , num_keys); - } -} - - - -/** - This is a special function which is only used to load the initial - state of dynamic_state nodes. It checks if the enkf_config_node has - set a valid value for input_file, in that case that means we should - also have an internalized representation of it, otherwise it will - just return (i.e. for PRESSURE / SWAT). -*/ - -static void enkf_state_fread_initial_state(enkf_state_type * enkf_state , enkf_fs_type * fs) { - const member_config_type * my_config = enkf_state->my_config; - const int num_keys = hash_get_size(enkf_state->node_hash); - char ** key_list = hash_alloc_keylist(enkf_state->node_hash); - int ikey; - - for (ikey = 0; ikey < num_keys; ikey++) { - enkf_node_type * enkf_node = hash_get(enkf_state->node_hash , key_list[ikey]); - if (enkf_node_get_var_type(enkf_node) == DYNAMIC_STATE) { - const enkf_config_node_type * config_node = enkf_node_get_config( enkf_node ); - - /* Just checked for != NULL */ - char * load_file = enkf_config_node_alloc_infile( config_node , 0); - if (load_file != NULL) { - node_id_type node_id = {.report_step = 0 , - .iens = member_config_get_iens( my_config ) }; - enkf_node_load(enkf_node , fs , node_id); - } - - util_safe_free( load_file ); - } - } - util_free_stringlist(key_list , num_keys); -} - - -void enkf_state_free_nodes(enkf_state_type * enkf_state, int mask) { - const int num_keys = hash_get_size(enkf_state->node_hash); - char ** key_list = hash_alloc_keylist(enkf_state->node_hash); - int ikey; - - for (ikey = 0; ikey < num_keys; ikey++) { - enkf_node_type * enkf_node = hash_get(enkf_state->node_hash , key_list[ikey]); - if (enkf_node_include_type(enkf_node , mask)) - enkf_state_del_node(enkf_state , enkf_node_get_key(enkf_node)); - } - util_free_stringlist(key_list , num_keys); -} - - - - - - -void enkf_state_free(enkf_state_type *enkf_state) { - rng_free( enkf_state->rng ); - hash_free(enkf_state->node_hash); - subst_list_free(enkf_state->subst_list); - member_config_free(enkf_state->my_config); - shared_info_free(enkf_state->shared_info); - free(enkf_state); -} - - - -enkf_node_type * enkf_state_get_node(const enkf_state_type * enkf_state , const char * node_key) { - if (hash_has_key(enkf_state->node_hash , node_key)) { - enkf_node_type * enkf_node = hash_get(enkf_state->node_hash , node_key); - return enkf_node; - } else { - util_abort("%s: node:[%s] not found in state object - aborting.\n",__func__ , node_key); - return NULL; /* Compiler shut up */ - } -} - - - -void enkf_state_del_node(enkf_state_type * enkf_state , const char * node_key) { - if (hash_has_key(enkf_state->node_hash , node_key)) - hash_del(enkf_state->node_hash , node_key); - else - fprintf(stderr,"%s: tried to remove node:%s which is not in state - internal error?? \n",__func__ , node_key); -} - - -/** - This function will set all the subst_kw key=value pairs which - change with report step. -*/ - -static void enkf_state_set_dynamic_subst_kw__(enkf_state_type * enkf_state , const char * run_path , int step1 , int step2) { - const ecl_config_type * ecl_config = enkf_state->shared_info->ecl_config; - const bool fmt_file = ecl_config_get_formatted( ecl_config ); - - - if (run_path != NULL) { - /** Make absolutely sure the path available as is absolute. */ - char * abs_runpath = util_alloc_realpath( run_path ); - enkf_state_add_subst_kw(enkf_state , "RUNPATH" , abs_runpath , NULL); - free( abs_runpath ); - } - - - /* Time step */ - { - char * step1_s = util_alloc_sprintf("%d" , step1); - char * step2_s = util_alloc_sprintf("%d" , step2); - char * step1_s04 = util_alloc_sprintf("%04d" , step1); - char * step2_s04 = util_alloc_sprintf("%04d" , step2); - - enkf_state_add_subst_kw(enkf_state , "TSTEP1" , step1_s , NULL); - enkf_state_add_subst_kw(enkf_state , "TSTEP2" , step2_s , NULL); - enkf_state_add_subst_kw(enkf_state , "TSTEP1_04" , step1_s04 , NULL); - enkf_state_add_subst_kw(enkf_state , "TSTEP2_04" , step2_s04 , NULL); - - free(step1_s); - free(step2_s); - free(step1_s04); - free(step2_s04); - } - - - /* Restart file names and RESTART keyword in datafile. */ - { - const char * eclbase = member_config_get_eclbase( enkf_state->my_config ); - if (eclbase != NULL) { - { - char * restart_file1 = ecl_util_alloc_filename(NULL , eclbase , ECL_RESTART_FILE , fmt_file , step1); - char * restart_file2 = ecl_util_alloc_filename(NULL , eclbase , ECL_RESTART_FILE , fmt_file , step2); - - enkf_state_add_subst_kw(enkf_state , "RESTART_FILE1" , restart_file1 , NULL); - enkf_state_add_subst_kw(enkf_state , "RESTART_FILE2" , restart_file2 , NULL); - - free(restart_file1); - free(restart_file2); - } - - if (step1 > 0) { - char * data_initialize = util_alloc_sprintf("RESTART\n \'%s\' %d /\n" , eclbase , step1); - enkf_state_add_subst_kw(enkf_state , "INIT" , data_initialize , NULL); - free(data_initialize); - } - } - } - - /** - The magic string: - */ - if (step1 == 0) { - const char * init_file = ecl_config_get_equil_init_file(ecl_config); - if (init_file != NULL) { - char * tmp_include = util_alloc_sprintf("INCLUDE\n \'%s\' /\n",init_file); - enkf_state_add_subst_kw(enkf_state , "INIT" , tmp_include , NULL); - free(tmp_include); - } /* - if init_file == NULL that means the user has not supplied the INIT_SECTION keyword, - and the EQUIL (or whatever) info to initialize the model is inlined in the datafile. - */ - } - - - { - /** - Adding keys for and - these are only - added for backwards compatibility, should be replaced with - prober function callbacks. - */ - char * randint_value = util_alloc_sprintf( "%u" , rng_forward( enkf_state->rng )); - char * randfloat_value = util_alloc_sprintf( "%12.10f" , rng_get_double( enkf_state->rng )); - - enkf_state_add_subst_kw( enkf_state , "RANDINT" , randint_value , NULL); - enkf_state_add_subst_kw( enkf_state , "RANDFLOAT" , randfloat_value , NULL); - - free( randint_value ); - free( randfloat_value ); - } -} - -static void enkf_state_set_dynamic_subst_kw(enkf_state_type * enkf_state , const run_arg_type * run_arg ) { - enkf_state_set_dynamic_subst_kw__( enkf_state , run_arg_get_runpath( run_arg ) , run_arg_get_step1( run_arg ) , run_arg_get_step2( run_arg )); -} - - - -void enkf_state_printf_subst_list(enkf_state_type * enkf_state , int step1 , int step2) { - int ikw; - const char * fmt_string = "%-16s %-40s :: %s\n"; - printf("\n\n"); - printf(fmt_string , "Key" , "Current value" , "Description"); - printf("------------------------------------------------------------------------------------------------------------------------\n"); - if (step1 >= 0) - enkf_state_set_dynamic_subst_kw__(enkf_state , NULL , step1 , step2 ); - - for (ikw = 0; ikw < subst_list_get_size( enkf_state->subst_list ); ikw++) { - const char * key = subst_list_iget_key( enkf_state->subst_list , ikw); - const char * value = subst_list_iget_value( enkf_state->subst_list , ikw); - const char * desc = subst_list_iget_doc_string( enkf_state->subst_list , ikw ); - - if (value != NULL) - printf(fmt_string , key , value , desc); - else - printf(fmt_string , key , "[Not set]" , desc); - } - printf("------------------------------------------------------------------------------------------------------------------------\n"); - -} - - - - -/** - init_step : The parameters are loaded from this EnKF/report step. - report_step1 : The simulation should start from this report step; - dynamic data are loaded from this step. - report_step2 : The simulation should stop at this report step. (unless run_mode == ENSEMBLE_PREDICTION - where it just runs til end.) - - For a normal EnKF run we well have init_step == report_step1, but - in the case where we want rerun from the beginning with updated - parameters, they will be different. If init_step != report_step1, - it is required that report_step1 == 0; otherwise the dynamic data - will become completely inconsistent. We just don't allow that! -*/ - - -void enkf_state_init_eclipse(enkf_state_type *enkf_state, const run_arg_type * run_arg ) { - const member_config_type * my_config = enkf_state->my_config; - const ecl_config_type * ecl_config = enkf_state->shared_info->ecl_config; - { - if (member_config_pre_clear_runpath( my_config )) - util_clear_directory( run_arg_get_runpath( run_arg ) , true , false ); - - util_make_path(run_arg_get_runpath( run_arg )); - { - if (ecl_config_get_schedule_target( ecl_config ) != NULL) { - - char * schedule_file_target = util_alloc_filename(run_arg_get_runpath( run_arg ) , ecl_config_get_schedule_target( ecl_config ) , NULL); - char * schedule_file_target_path = util_split_alloc_dirname(schedule_file_target); - util_make_path(schedule_file_target_path); - free(schedule_file_target_path); - - sched_file_fprintf( ecl_config_get_sched_file( ecl_config ) , schedule_file_target); - - free(schedule_file_target); - } - } - - - /** - For reruns of various kinds the parameters and the state are - generally loaded from different timesteps: - */ - { - enkf_fs_type * init_fs = run_arg_get_init_fs( run_arg ); - /* Loading parameter information: loaded from timestep: run_arg->init_step_parameters. */ - enkf_state_fread(enkf_state , init_fs , PARAMETER , 0); - - - /* Loading state information: loaded from timestep: run_arg->step1 */ - if (run_arg_get_step1(run_arg) == 0) - enkf_state_fread_initial_state(enkf_state , init_fs); - else - enkf_state_fread_state_nodes( enkf_state , init_fs , run_arg_get_step1(run_arg)); - - enkf_state_set_dynamic_subst_kw( enkf_state , run_arg ); - ert_templates_instansiate( enkf_state->shared_info->templates , run_arg_get_runpath( run_arg ) , enkf_state->subst_list ); - enkf_state_ecl_write( enkf_state , run_arg , init_fs); - - if (member_config_get_eclbase( my_config ) != NULL) { - - /* Writing the ECLIPSE data file. */ - if (ecl_config_get_data_file( ecl_config ) != NULL) { - char * data_file = ecl_util_alloc_filename(run_arg_get_runpath( run_arg ) , member_config_get_eclbase( my_config ) , ECL_DATA_FILE , true , -1); - subst_list_filter_file(enkf_state->subst_list , ecl_config_get_data_file(ecl_config) , data_file); - free( data_file ); - } - } - } - member_config_get_jobname( my_config ); - mode_t umask = site_config_get_umask(enkf_state->shared_info->site_config); - - - /* This is where the job script is created */ - forward_model_python_fprintf( model_config_get_forward_model( enkf_state->shared_info->model_config ) , - run_arg_get_runpath( run_arg ) , - enkf_state->subst_list, - umask); - } -} - - - - - - - -bool enkf_state_complete_forward_modelOK__(void * arg ); -bool enkf_state_complete_forward_modelEXIT__(void * arg ); -bool enkf_state_complete_forward_modelRETRY__(void * arg ); - - -/** - This function is called when: - - 1. The external queue system has said that everything is OK; BUT - the ert layer failed to load all the data. - - 2. The external queue system has seen the job fail. - - The parameter and state variables will be resampled before - retrying. And all random elements in templates+++ will be - resampled. -*/ - - - -static void enkf_state_internal_retry(enkf_state_type * enkf_state , run_arg_type * run_arg , bool load_failure) { - const member_config_type * my_config = enkf_state->my_config; - const shared_info_type * shared_info = enkf_state->shared_info; - const int iens = member_config_get_iens( my_config ); - - if (load_failure) - ert_log_add_fmt_message( 1 , NULL , "[%03d:%04d - %04d] Failed to load all data.",iens , run_arg_get_step1(run_arg) , run_arg_get_step2(run_arg)); - else - ert_log_add_fmt_message( 1 , NULL , "[%03d:%04d - %04d] Forward model failed.",iens, run_arg_get_step1(run_arg) , run_arg_get_step2(run_arg)); - - if (run_arg_can_retry( run_arg ) ) { - ert_log_add_fmt_message( 1 , NULL , "[%03d] Resampling and resubmitting realization." ,iens); - { - /* Reinitialization of the nodes */ - stringlist_type * init_keys = ensemble_config_alloc_keylist_from_var_type( enkf_state->ensemble_config , DYNAMIC_STATE + PARAMETER ); - for (int ikey=0; ikey < stringlist_get_size( init_keys ); ikey++) { - enkf_node_type * node = enkf_state_get_node( enkf_state , stringlist_iget( init_keys , ikey) ); - enkf_node_initialize( node , iens , enkf_state->rng ); - } - stringlist_free( init_keys ); - } - - enkf_state_init_eclipse( enkf_state , run_arg ); /* Possibly clear the directory and do a FULL rewrite of ALL the necessary files. */ - job_queue_iset_external_restart( shared_info->job_queue , run_arg_get_queue_index(run_arg) ); /* Here we inform the queue system that it should pick up this job and try again. */ - run_arg_increase_submit_count( run_arg ); - } -} - - - - - - - - - - - -static void enkf_state_clear_runpath( const enkf_state_type * enkf_state , run_arg_type * run_arg) { - const member_config_type * my_config = enkf_state->my_config; - keep_runpath_type keep_runpath = member_config_get_keep_runpath( my_config ); - - bool unlink_runpath; - if (keep_runpath == DEFAULT_KEEP) - unlink_runpath = false; /* For experiments the default is to keep the directories around. */ - else { - /* We have explcitly set a value for the keep_runpath variable - with either KEEP_RUNAPTH or DELETE_RUNPATH. */ - if (keep_runpath == EXPLICIT_KEEP) - unlink_runpath = false; - else if (keep_runpath == EXPLICIT_DELETE) - unlink_runpath = true; - else { - util_abort("%s: internal error \n",__func__); - unlink_runpath = false; /* Compiler .. */ - } - } - - if (unlink_runpath) - util_clear_directory(run_arg_get_runpath( run_arg ) , true , true); -} - - -/** - Observe that if run_arg == false, this routine will return with - job_completeOK == true, that might be a bit misleading. - - Observe that if an internal retry is performed, this function will - be called several times - MUST BE REENTRANT. -*/ - -static bool enkf_state_complete_forward_modelOK(enkf_state_type * enkf_state , run_arg_type * run_arg) { - const member_config_type * my_config = enkf_state->my_config; - const int iens = member_config_get_iens( my_config ); - int result; - - - /** - The queue system has reported that the run is OK, i.e. it has - completed and produced the targetfile it should. We then check - in this scope whether the results can be loaded back; if that - is OK the final status is updated, otherwise: restart. - */ - ert_log_add_fmt_message( 2 , NULL , "[%03d:%04d-%04d] Forward model complete - starting to load results." , iens , run_arg_get_step1(run_arg), run_arg_get_step2(run_arg)); - result = enkf_state_load_from_forward_model(enkf_state , run_arg , NULL); - - if (result & REPORT_STEP_INCOMPATIBLE) { - // If refcase has been used for observations: crash and burn. - fprintf(stderr,"** Warning the timesteps in refcase and current simulation are not in accordance - something wrong with schedule file?\n"); - result -= REPORT_STEP_INCOMPATIBLE; - } - - - if (result == 0) { - /* - The loading succeded - so this is a howling success! We set - the main status to JOB_QUEUE_ALL_OK and inform the queue layer - about the success. In addition we set the simple status - (should be avoided) to JOB_RUN_OK. - */ - run_arg_set_run_status( run_arg , JOB_RUN_OK); - ert_log_add_fmt_message( 2 , NULL , "[%03d:%04d-%04d] Results loaded successfully." , iens , run_arg_get_step1(run_arg), run_arg_get_step2(run_arg)); - - enkf_state_clear_runpath( enkf_state , run_arg ); - run_arg_complete_run(run_arg); /* free() on runpath */ - } - - return (result == 0) ? true : false; -} - - -bool enkf_state_complete_forward_modelOK__(void * arg ) { - arg_pack_type * arg_pack = arg_pack_safe_cast( arg ); - enkf_state_type * enkf_state = enkf_state_safe_cast( arg_pack_iget_ptr( arg_pack , 0 )); - run_arg_type * run_arg = run_arg_safe_cast( arg_pack_iget_ptr( arg_pack , 1 )); - - return enkf_state_complete_forward_modelOK( enkf_state , run_arg); -} - - - -static bool enkf_state_complete_forward_model_EXIT_handler__(enkf_state_type * enkf_state , run_arg_type * run_arg , bool is_retry) { - const member_config_type * my_config = enkf_state->my_config; - const int iens = member_config_get_iens( my_config ); - /* - The external queue system has said that the job failed - we - might give it another try from this scope, possibly involving a - resampling. - */ - - if (is_retry) { - if (run_arg_can_retry(run_arg)) { - enkf_state_internal_retry(enkf_state, run_arg , false); - return true; - } else { - return false; - } - } else { - ert_log_add_fmt_message( 1, NULL, "[%03d:%04d-%04d] FAILED COMPLETELY.", iens, run_arg_get_step1(run_arg), run_arg_get_step2(run_arg)); - - if (run_arg_get_run_status(run_arg) != JOB_LOAD_FAILURE) - run_arg_set_run_status( run_arg , JOB_RUN_FAILURE); - - state_map_type * state_map = enkf_fs_get_state_map(run_arg_get_result_fs( run_arg )); - int iens = member_config_get_iens(enkf_state->my_config); - state_map_iset(state_map, iens, STATE_LOAD_FAILURE); - return false; - } -} - -static bool enkf_state_complete_forward_model_EXIT_handler(void * arg, bool allow_retry ) { - arg_pack_type * arg_pack = arg_pack_safe_cast( arg ); - - enkf_state_type * enkf_state = enkf_state_safe_cast( arg_pack_iget_ptr( arg_pack , 0 ) ); - run_arg_type * run_arg = run_arg_safe_cast( arg_pack_iget_ptr( arg_pack , 1 ) ); - - return enkf_state_complete_forward_model_EXIT_handler__( enkf_state , run_arg , allow_retry ); -} - - -bool enkf_state_complete_forward_modelEXIT__(void * arg ) { - return enkf_state_complete_forward_model_EXIT_handler(arg, false ); -} - -bool enkf_state_complete_forward_modelRETRY__(void * arg ) { - return enkf_state_complete_forward_model_EXIT_handler(arg, true ); -} - - - -/*****************************************************************/ - - -rng_type * enkf_state_get_rng( const enkf_state_type * enkf_state ) { - return enkf_state->rng; -} - -unsigned int enkf_state_get_random( enkf_state_type * enkf_state ) { - return rng_forward( enkf_state->rng ); -} - - - -void enkf_state_set_keep_runpath( enkf_state_type * enkf_state , keep_runpath_type keep_runpath) { - member_config_set_keep_runpath( enkf_state->my_config , keep_runpath); -} - - -keep_runpath_type enkf_state_get_keep_runpath( const enkf_state_type * enkf_state ) { - return member_config_get_keep_runpath( enkf_state->my_config ); -} - diff --git a/ThirdParty/Ert/libenkf/src/enkf_types.c b/ThirdParty/Ert/libenkf/src/enkf_types.c deleted file mode 100644 index d010cbfc96..0000000000 --- a/ThirdParty/Ert/libenkf/src/enkf_types.c +++ /dev/null @@ -1,144 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_types.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include - -#include - - -/*****************************************************************/ - - -const char * enkf_types_get_var_name(enkf_var_type var_type) { - switch(var_type) { - case(INVALID): - return "INVALID"; - break; - case PARAMETER: - return "PARAMETER"; - break; - case DYNAMIC_STATE: - return "DYNAMIC_STATE"; - break; - case DYNAMIC_RESULT: - return "DYNAMIC_RESULT"; - break; - default: - util_abort("%s: internal error - unrecognized var type: %d - aborting \n",__func__ , var_type); - return NULL; - } -} - - - -const char * enkf_types_get_impl_name(ert_impl_type impl_type) { - switch(impl_type) { - case(INVALID): - return "INVALID"; - break; - case FIELD: - return "FIELD"; - break; - case GEN_KW: - return "GEN_KW"; - break; - case SUMMARY: - return "SUMMARY"; - break; - case GEN_DATA: - return "GEN_DATA"; - break; - default: - util_abort("%s: internal error - unrecognized implementation type: %d - aborting \n",__func__ , impl_type); - return NULL; - } -} - - - -#define if_strcmp(s) if (strcmp(impl_type_string , #s) == 0) impl_type = s -static ert_impl_type enkf_types_get_impl_type__(const char * impl_type_string) { - ert_impl_type impl_type; - if_strcmp(SUMMARY); - else if_strcmp(FIELD); - else if_strcmp(GEN_KW); - else if_strcmp(GEN_DATA); - else impl_type = INVALID; - return impl_type; -} -#undef if_strcmp - - -ert_impl_type enkf_types_get_impl_type(const char * __impl_type_string) { - char * impl_type_string = util_alloc_string_copy(__impl_type_string); - util_strupr(impl_type_string); - ert_impl_type impl_type = enkf_types_get_impl_type__(impl_type_string); - if (impl_type == INVALID) - util_abort("%s: enkf_type: %s not recognized - aborting \n",__func__ , __impl_type_string); - - free(impl_type_string); - return impl_type; -} - - -/* - This will return INVALIID if given an invalid - input string - not fail. -*/ - -ert_impl_type enkf_types_check_impl_type(const char * impl_type_string) { - return enkf_types_get_impl_type__(impl_type_string); -} - - -/*****************************************************************/ -/* - These two functions update the truncation variable to ensure that - it applies truncate_min and truncate_max respectively. The somewhat - involved implementation is to ensure that the functions can be - called many times. -*/ - - -void enkf_types_set_truncate_min(truncation_type * __trunc) { - truncation_type trunc = *__trunc; - - if (!(trunc & TRUNCATE_MIN)) - trunc += TRUNCATE_MIN; - - *__trunc = trunc; -} - - -void enkf_types_set_truncate_max(truncation_type * __trunc) { - truncation_type trunc = *__trunc; - - if (!(trunc & TRUNCATE_MAX)) - trunc += TRUNCATE_MAX; - - *__trunc = trunc; -} - - - - - diff --git a/ThirdParty/Ert/libenkf/src/enkf_util.c b/ThirdParty/Ert/libenkf/src/enkf_util.c deleted file mode 100644 index bcd43dd87d..0000000000 --- a/ThirdParty/Ert/libenkf/src/enkf_util.c +++ /dev/null @@ -1,369 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'enkf_util.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include -#include - - - - -double enkf_util_rand_normal(double mean , double std , rng_type * rng) { - const double pi = 3.141592653589; - double R1 = rng_get_double( rng ); - double R2 = rng_get_double( rng ); - - return mean + std * sqrt(-2.0 * log(R1)) * cos(2.0 * pi * R2); -} - -void enkf_util_rand_stdnormal_vector(int size , double *R, rng_type * rng) { - int i; - for (i = 0; i < size; i++) - R[i] = enkf_util_rand_normal(0.0 , 1.0 , rng); -} - -/** - Vector containing a random permutation of the integers 1,...,size -*/ - -void enkf_util_randperm( int * P , int size , rng_type * rng) { - int k, tmp; - - for (k = 0; k < size; k++) - P[k] = k; - - while (size > 1) { - k = rng_get_int( rng , size ); - size--; - tmp = P[size]; - P[size] = P[k]; - P[k] = tmp; - } -} - - - -/*****************************************************************/ - -#define TRUNCATE(type , void_data , size , min_ptr , max_ptr) \ -{ \ - type * data = (type *) void_data; \ - type min_value = *((type *) min_ptr); \ - type max_value = *((type *) max_ptr); \ - int i; \ - for (i=0; i < size; i++) { \ - if (data[i] < min_value) \ - data[i] = min_value; \ - else if (data[i] > max_value) \ - data[i] = max_value; \ - } \ -} - -void enkf_util_truncate(void * void_data , int size , ecl_type_enum ecl_type , void * min_ptr , void *max_ptr) { - if (ecl_type == ECL_DOUBLE_TYPE) - TRUNCATE(double , void_data , size , min_ptr , max_ptr) - else if (ecl_type == ECL_FLOAT_TYPE) - TRUNCATE(float , void_data , size , min_ptr , max_ptr) - else if (ecl_type == ECL_INT_TYPE) - TRUNCATE(int , void_data , size , min_ptr , max_ptr) - else - util_abort("%s: unrecognized type - aborting \n",__func__); -} -#undef TRUNCATE - - - - -void enkf_util_assert_buffer_type(buffer_type * buffer, ert_impl_type target_type) { - ert_impl_type file_type; - file_type = buffer_fread_int(buffer); - if (file_type != target_type) - util_abort("%s: wrong target type in file (expected:%d got:%d) - aborting \n",__func__ , target_type , file_type); - -} - - -void enkf_util_fread_assert_target_type_from_buffer(char ** ptr , ert_impl_type target_type) { - ert_impl_type file_type; - util_fread_from_buffer( &file_type , sizeof file_type , 1 , ptr); - if (file_type != target_type) - util_abort("%s: wrong target type in file (expected:%d got:%d) - aborting \n",__func__ , target_type , file_type); -} - - -void enkf_util_fwrite_target_type(FILE * stream , ert_impl_type target_type) { - util_fwrite_int(target_type , stream); -} - - -/* -size_t util_copy_strided_vector(const void * _src, size_t src_size , int src_stride , void * _target , int target_stride , size_t target_size , int type_size , bool * complete) { - const char * src = (const char *) _src; - char * target = (char *) _target; - - size_t src_index; - size_t target_index = 0; - - for (src_index = 0; src_index < src_size; src_index++) { - size_t src_adress = src_index * type_size * src_stride; - size_t target_adress = target_index * type_size * target_stride; - memcpy(&target[target_adress] , &src[src_adress] , type_size); - target_index++; - if (target_index == target_size) { - if (src_index < (src_size - 1)) *complete = false; - break; - } - } - return target_index; -} - -*/ - - - -/** - Prompts the user for a filename, and reads the filename from - stdin. - - If the parameter 'auto_mkdir' is true, the path part of the - filename is created automagically. If 'must_exist' is true, the - function will loop until the user gives an existing filename. - - The filename given by the user is returned - it is the - responibility of the calling scope to free this memory. - - The options parameter is an integer, which is a sum of the - following alternatives: - - EXISTING_FILE = 1 - NEW_FILE = 2 - AUTO_MKDIR = 4 -*/ - -//char * enkf_util_scanf_alloc_filename(const char * prompt , int options) { -// if ((options & EXISTING_FILE) && (options & NEW_FILE)) -// util_abort("%s: internal error - asking for both new and existing file - impossible \n", __func__); -// { -// bool OK = true; -// char * _path; -// char file[1024]; -// do { -// printf("%s",prompt); -// scanf("%s" , file); -// util_alloc_file_components(file , &_path , NULL , NULL); -// if (_path != NULL) { -// if (!util_is_directory(_path)) -// if (options & AUTO_MKDIR) -// util_make_path(_path); -// free(_path); -// } -// -// if ((options & EXISTING_FILE) && (!util_file_exists(file))) -// OK = false; -// else if ((options & NEW_FILE) && (util_file_exists(file))) -// OK = false; -// -// } while (!OK); -// return util_alloc_string_copy(file); -// } -//} - - - -/** - This function prints the entries in data to a file. - - data is assumed to be num_colums pointers to double vectors of length num_rows. - Note that this is not the conventional C style naming. - - If summarize is true, the mean and standard deviation of each column will be printed. -*/ -#define PRINT_LINE(n,c,stream) { int _i; for (_i = 0; _i < (n); _i++) fputc(c , stream); fprintf(stream,"\n"); } -void enkf_util_fprintf_data(const int * index_column , const double ** data, const char * index_name , const char ** column_names, int num_rows, int num_columns, const bool * active , - bool summarize, FILE * stream) { - const int float_width = 9; - const int float_precision = 4; - - int * width = util_calloc((num_columns + 1) , sizeof * width ); - int total_width; - - double * mean = util_calloc(num_columns , sizeof * mean ); - double * stddev = util_calloc(num_columns , sizeof * stddev); - - /* Check the column_names. */ - for(int column_nr = 0; column_nr < num_columns; column_nr++) - { - if (column_names[column_nr] == NULL) - util_abort("%s: Trying to dereference NULL pointer.\n", __func__); - } - - /* Calculate the width of each column and the total width. */ - width[0] = strlen(index_name) + 1; - total_width = width[0]; - for (int column_nr = 0; column_nr < num_columns; column_nr++) { - if (active[column_nr]) { - if(column_names[column_nr] != NULL) - width[column_nr + 1] = util_int_max(strlen(column_names[column_nr]), 2 * float_width + 5) + 1; /* Must accomodate A +/- B */ - width[column_nr + 1] += ( 1 - (width[column_nr + 1] & 1)); /* Ensure odd length */ - total_width += width[column_nr + 1] + 1; - } - } - - /* Calculate the mean and std dev of each column. */ - for(int column_nr = 0; column_nr < num_columns; column_nr++) { - if (active[column_nr]) { - mean [column_nr] = util_double_vector_mean( num_rows, data[column_nr]); - stddev[column_nr] = util_double_vector_stddev(num_rows, data[column_nr]); - } - } - - { - util_fprintf_string(index_name , width[0] - 1 , true , stream); fprintf(stream , "|"); - for (int column_nr = 0; column_nr < num_columns; column_nr++) { - if (active[column_nr]) { - util_fprintf_string(column_names[column_nr] , width[column_nr + 1] , center_pad , stream); - fprintf(stream , "|"); - } - } - fprintf(stream , "\n"); - PRINT_LINE(total_width , '=' , stream); - - - if(summarize) - { - util_fprintf_string("Mean" , width[0] - 1 , true , stream); - fprintf(stream , "|"); - { - for (int column_nr = 0; column_nr < num_columns; column_nr++) { - if (active[column_nr]) { - int w = (width[column_nr + 1] - 5) / 2; - util_fprintf_double(mean[column_nr] , w , float_precision , 'g' , stream); - fprintf(stream , " +/- "); - util_fprintf_double(stddev[column_nr] , w , float_precision , 'g' , stream); - fprintf(stream , "|"); - } - } - fprintf(stream , "\n"); - } - PRINT_LINE(total_width , '-' , stream); - } - - - for (int row_nr = 0; row_nr < num_rows; row_nr++) { - util_fprintf_int(index_column[row_nr], width[0] - 1 , stream); /* This +1 is not general */ - fprintf(stream , "|"); - - for (int column_nr = 0; column_nr < num_columns; column_nr++) { - if (active[column_nr]) { - util_fprintf_double(data[column_nr][row_nr] , width[column_nr + 1] , float_precision , 'g' , stream); - fprintf(stream , "|"); - } - } - fprintf(stream , "\n"); - } - PRINT_LINE(total_width , '=' , stream); - } - - free(stddev); - free(mean); - free(width); -} -#undef PRINT_LINE - - -char * enkf_util_alloc_tagged_string(const char * s) { - return util_alloc_sprintf("%s%s%s" , DEFAULT_START_TAG , s , DEFAULT_END_TAG); -} - -char * enkf_util_alloc_detagged_string( const char * tagged_string) { - const char * s = &tagged_string[ strlen( DEFAULT_START_TAG ) ]; - return util_alloc_substring_copy( s , 0 , strlen( s ) - strlen( DEFAULT_END_TAG )); -} - - - - -/** - This function will compare two (key) strings. The function is - intended to be used when sorting observation keys in summary tables - of misfit. First the string is split on ':' - then the subsequent - sorting is as follows: - - 1. The number of items is compared, with fewer items coming first. - - 2. A normal string compare is performed on the second item. - - 3. A normal string compare on the first item. - - 4. A normal string compare of the input key. - - The main point of this whole complexity is what is the items 2 & 3; - this will guarantee that the different summary keys related to the - same well, i.e. WWCT:OP1, WGOR:OP_1 and WBHP:OP_1 will come - together. - -*/ - - -int enkf_util_compare_keys( const char * key1 , const char * key2 ) { - int cmp; - { - stringlist_type * items1 = stringlist_alloc_from_split( key1 , SUMMARY_KEY_JOIN_STRING ); - stringlist_type * items2 = stringlist_alloc_from_split( key2 , SUMMARY_KEY_JOIN_STRING ); - - /* 1: Compare number of items. */ - cmp = stringlist_get_size( items1 ) - stringlist_get_size( items2 ); - if (cmp == 0) { - /* 2: String compare on second item */ - if (stringlist_get_size( items1 ) >= 2) - cmp = strcmp( stringlist_iget( items1 , 1) , stringlist_iget( items2 , 1)); - } - - /* 3: String compare on first item */ - if (cmp == 0) - cmp = strcmp( stringlist_iget( items1 , 0) , stringlist_iget( items2 , 0)); - - /* String compare of the whole god damn thing. */ - if (cmp == 0) - cmp = strcmp( key1 , key2 ); - - stringlist_free( items2 ); - stringlist_free( items1 ); - } - return cmp; -} - - -int enkf_util_compare_keys__( const void * __key1 , const void * __key2 ) { - const char * key1 = (const char *) __key1; - const char * key2 = (const char *) __key2; - - return enkf_util_compare_keys( key1 , key2 ); -} - - diff --git a/ThirdParty/Ert/libenkf/src/ensemble_config.c b/ThirdParty/Ert/libenkf/src/ensemble_config.c deleted file mode 100644 index 974c0cfd4a..0000000000 --- a/ThirdParty/Ert/libenkf/src/ensemble_config.c +++ /dev/null @@ -1,1002 +0,0 @@ -/* - copyright (c) 2011 statoil asa, norway. - - the file 'ensemble_config.c' is part of ert - ensemble based reservoir tool. - - ert 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. - - ert 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 - for more details. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include /* must have rw locking on the config_nodes ... */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define ENSEMBLE_CONFIG_TYPE_ID 8825306 - -struct ensemble_config_struct { - UTIL_TYPE_ID_DECLARATION; - pthread_mutex_t mutex; - char * gen_kw_format_string; /* format string used when creating gen_kw search/replace strings. */ - hash_type * config_nodes; /* a hash of enkf_config_node instances - which again conatin pointers to e.g. field_config objects. */ - field_trans_table_type * field_trans_table; /* a table of the transformations which are available to apply on fields. */ - const ecl_sum_type * refcase; /* a ecl_sum reference instance - can be null (not owned by the ensemble - config). is only used to check that summary keys are valid when adding. */ - bool have_forward_init; - summary_key_matcher_type * summary_key_matcher; -}; - - -UTIL_IS_INSTANCE_FUNCTION( ensemble_config , ENSEMBLE_CONFIG_TYPE_ID ) -UTIL_SAFE_CAST_FUNCTION( ensemble_config , ENSEMBLE_CONFIG_TYPE_ID ) - - -/** - setting the format string used to 'mangle' the string in the gen_kw - template files. consider the following example: - - parameter file - -------------- - multpv logunif 0.0001 0.10 - - - template file - ------------- - box - 1 10 1 10 1 5 / - - multpv 500*__multpv__ - - here the parameter file defines a parameter named 'multpv', and the - template file uses the marker string '__multpv__' which should be - replaced with a numerical value. for the current example the - gen_kw_format_string should have the value '__%s__'. - - there are no rules for the format string, but it _must_ contain a - '%s' placeholder which will be replaced with the parameter name - (this is not checked for). the function call creating a search - string from a parameter name is: - - tagged_string = util_alloc_sprintf( gen_kw_format_string , parameter_name ); - -*/ - -void ensemble_config_set_gen_kw_format( ensemble_config_type * ensemble_config , const char * gen_kw_format_string) { - if (!util_string_equal( gen_kw_format_string , ensemble_config->gen_kw_format_string)) { - stringlist_type * gen_kw_keys = ensemble_config_alloc_keylist_from_impl_type( ensemble_config , GEN_KW ); - int i; - ensemble_config->gen_kw_format_string = util_realloc_string_copy( ensemble_config->gen_kw_format_string , gen_kw_format_string ); - for (i=0; i < stringlist_get_size( gen_kw_keys ); i++) { - enkf_config_node_type * config_node = ensemble_config_get_node( ensemble_config , stringlist_iget( gen_kw_keys , i )); - gen_kw_config_update_tag_format( enkf_config_node_get_ref( config_node ) , gen_kw_format_string ); - } - stringlist_free( gen_kw_keys ); - } -} - - -const char * ensemble_config_get_gen_kw_format( const ensemble_config_type * ensemble_config ) { - return ensemble_config->gen_kw_format_string; -} - - -void ensemble_config_set_refcase( ensemble_config_type * ensemble_config , const ecl_sum_type * refcase) { - ensemble_config->refcase = refcase; -} - - - - -ensemble_config_type * ensemble_config_alloc( ) { - ensemble_config_type * ensemble_config = util_malloc(sizeof * ensemble_config ); - - UTIL_TYPE_ID_INIT( ensemble_config , ENSEMBLE_CONFIG_TYPE_ID ); - ensemble_config->config_nodes = hash_alloc(); - ensemble_config->field_trans_table = field_trans_table_alloc(); - ensemble_config->refcase = NULL; - ensemble_config->gen_kw_format_string = util_alloc_string_copy( DEFAULT_GEN_KW_TAG_FORMAT ); - ensemble_config->have_forward_init = false; - ensemble_config->summary_key_matcher = summary_key_matcher_alloc(); - pthread_mutex_init( &ensemble_config->mutex , NULL); - - return ensemble_config; -} - - - -void ensemble_config_free(ensemble_config_type * ensemble_config) { - hash_free( ensemble_config->config_nodes ); - field_trans_table_free( ensemble_config->field_trans_table ); - summary_key_matcher_free(ensemble_config->summary_key_matcher); - free( ensemble_config->gen_kw_format_string ); - free( ensemble_config ); -} - - - - - - - -ert_impl_type ensemble_config_impl_type(const ensemble_config_type *ensemble_config, const char * ecl_kw_name) { - ert_impl_type impl_type = INVALID; - - if (hash_has_key(ensemble_config->config_nodes , ecl_kw_name)) { - enkf_config_node_type * node = hash_get(ensemble_config->config_nodes , ecl_kw_name); - impl_type = enkf_config_node_get_impl_type(node); - } else - util_abort("%s: internal error: asked for implementation type of unknown node:%s \n",__func__ , ecl_kw_name); - - return impl_type; -} - - -enkf_var_type ensemble_config_var_type(const ensemble_config_type *ensemble_config, const char * ecl_kw_name) { - enkf_var_type var_type = INVALID_VAR; - - if (hash_has_key(ensemble_config->config_nodes , ecl_kw_name)) { - enkf_config_node_type * node = hash_get(ensemble_config->config_nodes , ecl_kw_name); - var_type = enkf_config_node_get_var_type(node); - } else - util_abort("%s: internal error: asked for implementation type of unknown node:%s \n",__func__ , ecl_kw_name); - - return var_type; -} - - - -bool ensemble_config_has_key(const ensemble_config_type * ensemble_config , const char * key) { - return hash_has_key( ensemble_config->config_nodes , key); -} - - - -enkf_config_node_type * ensemble_config_get_node(const ensemble_config_type * ensemble_config, const char * key) { - if (hash_has_key(ensemble_config->config_nodes , key)) { - enkf_config_node_type * node = hash_get(ensemble_config->config_nodes , key); - return node; - } else { - util_abort("%s: ens node:\"%s\" does not exist \n",__func__ , key); - return NULL; /* compiler shut up */ - } -} - -enkf_config_node_type * ensemble_config_get_or_create_summary_node(ensemble_config_type * ensemble_config, const char * key) { - if (!hash_has_key(ensemble_config->config_nodes , key)) { - ensemble_config_add_summary(ensemble_config, key, LOAD_FAIL_SILENT); - } - - return ensemble_config_get_node(ensemble_config, key); -} - -/** - this will remove the config node indexed by key, it will use the - function hash_safe_del(), which is thread_safe, and will not fail - if the node has already been removed from the hash. - - however - it is extremely important to ensure that all storage - nodes (which point to the config nodes) have been deleted before - calling this function. that is only assured by using - enkf_main_del_node(). -*/ - - -void ensemble_config_del_node(ensemble_config_type * ensemble_config, const char * key) { - hash_safe_del(ensemble_config->config_nodes , key); -} - - -bool ensemble_config_have_forward_init( const ensemble_config_type * ensemble_config ) { - return ensemble_config->have_forward_init; -} - -void ensemble_config_add_node( ensemble_config_type * ensemble_config , enkf_config_node_type * node) { - if (node) { - const char * key = enkf_config_node_get_key( node ); - if (ensemble_config_has_key(ensemble_config , key)) - util_abort("%s: a configuration object:%s has already been added - aborting \n",__func__ , key); - - hash_insert_hash_owned_ref(ensemble_config->config_nodes , key , node , enkf_config_node_free__); - ensemble_config->have_forward_init |= enkf_config_node_use_forward_init( node ); - } else - util_abort("%s: internal error - tried to add NULL node to ensemble configuration \n",__func__); -} - - - - - -void ensemble_config_add_obs_key(ensemble_config_type * ensemble_config , const char * key, const char * obs_key) { - enkf_config_node_type * config_node = hash_get(ensemble_config->config_nodes , key); - enkf_config_node_add_obs_key(config_node , obs_key); -} - - -void ensemble_config_clear_obs_keys(ensemble_config_type * ensemble_config) { - hash_iter_type * iter = hash_iter_alloc( ensemble_config->config_nodes ); - while (!hash_iter_is_complete( iter )) { - enkf_config_node_type * config_node = hash_iter_get_next_value( iter ); - enkf_config_node_clear_obs_keys( config_node ); - } - hash_iter_free( iter ); -} - - - - - - -void ensemble_config_add_config_items(config_parser_type * config) { - config_schema_item_type * item; - - /** - the two fault types are just added to the config object only to - be able to print suitable messages before exiting. - */ - - item = config_add_schema_item(config , "HAVANA_FAULT" , false ); - config_schema_item_set_argc_minmax(item , 2 , 2); - - item = config_add_schema_item(config , "MULTFLT" , false ); - config_schema_item_set_argc_minmax(item , 3 , 3 ); - config_schema_item_iset_type( item , 2 , CONFIG_EXISTING_PATH ); - - - /*****************************************************************/ - - - item = config_add_schema_item(config , GEN_KW_KEY , false ); - config_schema_item_set_argc_minmax(item , 4 , 6); - config_schema_item_iset_type( item , 1 , CONFIG_EXISTING_PATH ); - config_schema_item_iset_type( item , 3 , CONFIG_EXISTING_PATH ); - - - - item = config_add_key_value( config , GEN_KW_TAG_FORMAT_KEY , false , CONFIG_STRING); - item = config_add_schema_item(config , SCHEDULE_PREDICTION_FILE_KEY , false ); - /* scedhule_prediction_file filename */ - config_schema_item_set_argc_minmax(item , 1 , 3 ); - config_schema_item_iset_type( item , 0 , CONFIG_EXISTING_PATH ); - - - - enkf_config_node_add_GEN_PARAM_config_schema( config ); - enkf_config_node_add_GEN_DATA_config_schema( config ); - enkf_config_node_add_CUSTOM_KW_config_schema( config ); - - item = config_add_schema_item(config , SUMMARY_KEY , false ); /* can have several summary keys on each line. */ - config_schema_item_set_argc_minmax(item , 1 , CONFIG_DEFAULT_ARG_MAX); - - item = config_add_schema_item(config , CONTAINER_KEY , false ); /* can have several summary keys on each line. */ - config_schema_item_set_argc_minmax(item , 2 , CONFIG_DEFAULT_ARG_MAX); - - item = config_add_schema_item( config , SURFACE_KEY , false ); - config_schema_item_set_argc_minmax(item , 4 , 5 ); - - /* - the way config info is entered for fields is unfortunate because - it is difficult/impossible to let the config system handle run - time validation of the input. - */ - - item = config_add_schema_item(config , FIELD_KEY , false ); - config_schema_item_set_argc_minmax(item , 2 , CONFIG_DEFAULT_ARG_MAX); - config_schema_item_add_required_children(item , GRID_KEY); /* if you are using a field - you must have a grid. */ -} - - - -/* - The var type parameter is determined by inspecting the - combination of input parameters. It is possible to specify an - invalid input combination; that should be identified with a call - to gen_data_config_is_valid() in the calling scope. - - - PARAMETER: init_file_fmt != NULL - enkf_outfile_fmt != NULL - enkf_infile_fmt == NULL - - DYNAMIC_STATE: init_file_fmt != NULL - enkf_outfile_fmt != NULL - enkf_infile_fmt != NULL - - DYNAMIC_RESULT: init_file_fmt == NULL - enkf_outfile_fmt == NULL - enkf_infile_fmt != NULL - -*/ - -void ensemble_config_init_GEN_DATA( ensemble_config_type * ensemble_config , const config_content_type * config) { - if (config_content_has_item(config , GEN_DATA_KEY)) { - const config_content_item_type * item = config_content_get_item( config , GEN_DATA_KEY ); - int i; - for (i=0; i < config_content_item_get_size(item); i++) { - const config_content_node_type * node = config_content_item_iget_node( item , i ); - enkf_config_node_type * config_node = enkf_config_node_alloc_GEN_DATA_from_config( node ); - if (config_node) - ensemble_config_add_node( ensemble_config , config_node ); - - } - } -} - - -void ensemble_config_init_GEN_PARAM( ensemble_config_type * ensemble_config , const config_content_type * config) { - /* gen_param - should be unified with the gen_data*/ - if (config_content_has_item(config , GEN_PARAM_KEY)) { - const config_content_item_type * item = config_content_get_item( config , GEN_PARAM_KEY ); - for (int i=0; i < config_content_item_get_size(item); i++) { - const config_content_node_type * node = config_content_item_iget_node( item , i ); - enkf_config_node_type * config_node = enkf_config_node_alloc_GEN_PARAM_from_config( node ); - if (config_node) - ensemble_config_add_node( ensemble_config , config_node ); - - } - } -} - - -void ensemble_config_init_GEN_KW( ensemble_config_type * ensemble_config , const config_content_type * config ) { - if (config_content_has_item(config , GEN_KW_KEY)) { - const config_content_item_type * gen_kw_item = config_content_get_item( config , GEN_KW_KEY ); - int i; - for (i=0; i < config_content_item_get_size( gen_kw_item ); i++) { - config_content_node_type * node = config_content_item_iget_node( gen_kw_item , i ); - - const char * key = config_content_node_iget( node , 0 ); - const char * template_file = config_content_node_iget_as_path( node , 1 ); - const char * enkf_outfile = config_content_node_iget( node , 2 ); - const char * parameter_file = config_content_node_iget_as_path( node , 3 ); - hash_type * opt_hash = hash_alloc(); - - config_content_node_init_opt_hash( node , opt_hash , 4 ); - { - const char * forward_string = hash_safe_get( opt_hash , FORWARD_INIT_KEY ); - enkf_config_node_type * config_node; - bool forward_init = false; - - if (forward_string) { - if (!util_sscanf_bool( forward_string , &forward_init)) - fprintf(stderr,"** Warning: parsing %s as bool failed - using FALSE \n",forward_string); - } - - config_node = ensemble_config_add_gen_kw( ensemble_config , key , forward_init); - enkf_config_node_update_gen_kw( config_node , - enkf_outfile , - template_file , - parameter_file , - hash_safe_get( opt_hash , MIN_STD_KEY ) , - hash_safe_get( opt_hash , INIT_FILES_KEY)); - } - hash_free( opt_hash ); - } - } -} - -void ensemble_config_init_CUSTOM_KW(ensemble_config_type * ensemble_config, const config_content_type * config) { - if (config_content_has_item(config, CUSTOM_KW_KEY)) { - const config_content_item_type * custom_kw_item = config_content_get_item(config, CUSTOM_KW_KEY); - - for (int i = 0; i < config_content_item_get_size(custom_kw_item); i++) { - config_content_node_type * node = config_content_item_iget_node(custom_kw_item, i); - - const char * key = config_content_node_iget(node, 0); - const char * result_file = config_content_node_iget_as_path(node, 1); - const char * output_file = NULL; - - if(config_content_node_get_size(node) > 2) { - output_file = config_content_node_iget_as_path(node, 2); - } - - enkf_config_node_type * config_node = ensemble_config_add_custom_kw(ensemble_config, key, result_file, output_file); - enkf_config_node_update_custom_kw(config_node, result_file, output_file); - enkf_config_node_set_internalize(config_node, 0); - } - } -} - -void ensemble_config_init_SURFACE( ensemble_config_type * ensemble_config , const config_content_type * config ) { - if (config_content_has_item(config , SURFACE_KEY)) { - const config_content_item_type * item = config_content_get_item( config , SURFACE_KEY ); - int i; - for (i=0; i < config_content_item_get_size( item ); i++) { - const config_content_node_type * node = config_content_item_iget_node( item , i ); - const char * key = config_content_node_iget( node , 0 ); - { - hash_type * options = hash_alloc(); /* INIT_FILE: OUTPUT_FILE: BASE_SURFACE: */ - - config_content_node_init_opt_hash( node , options , 1 ); - { - const char * init_file_fmt = hash_safe_get( options , INIT_FILES_KEY ); - const char * output_file = hash_safe_get( options , OUTPUT_FILE_KEY); - const char * base_surface = hash_safe_get( options , BASE_SURFACE_KEY); - const char * min_std_file = hash_safe_get( options , MIN_STD_KEY); - const char * forward_string = hash_safe_get( options , FORWARD_INIT_KEY ); - bool forward_init = false; - - if (forward_string) { - if (!util_sscanf_bool( forward_string , &forward_init)) - fprintf(stderr,"** Warning: parsing %s as bool failed - using FALSE \n",forward_string); - } - - if ((init_file_fmt == NULL) || (output_file == NULL) || (base_surface == NULL)) { - fprintf(stderr,"** error: when entering a surface you must provide arguments:\n"); - fprintf(stderr,"** %s:/path/to/input/files%%d \n",INIT_FILES_KEY); - fprintf(stderr,"** %s:name_of_output_file\n", OUTPUT_FILE_KEY); - fprintf(stderr,"** %s:base_surface_file\n",BASE_SURFACE_KEY); - exit(1); - } - - { - enkf_config_node_type * config_node = ensemble_config_add_surface( ensemble_config , key , forward_init); - enkf_config_node_update_surface( config_node , base_surface , init_file_fmt , output_file , min_std_file ); - } - } - hash_free( options ); - } - } - } -} - - -void ensemble_config_init_SUMMARY( ensemble_config_type * ensemble_config , const config_content_type * config , const ecl_sum_type * refcase) { - if (config_content_has_item(config , SUMMARY_KEY)) { - const config_content_item_type * item = config_content_get_item( config , SUMMARY_KEY ); - int i; - for (i=0; i < config_content_item_get_size( item ); i++) { - const config_content_node_type * node = config_content_item_iget_node( item , i ); - int j; - for (j= 0; j < config_content_node_get_size( node ); j++) { - const char * key = config_content_node_iget( node , j ); - summary_key_matcher_add_summary_key(ensemble_config->summary_key_matcher, key); - - if (util_string_has_wildcard( key )) { - //todo: DEPRECATED. In the Future the matcher should take care of this. - if (ensemble_config->refcase != NULL) { - int k; - stringlist_type * keys = stringlist_alloc_new ( ); - - ecl_sum_select_matching_general_var_list( ensemble_config->refcase , key , keys ); /* expanding the wildcard notation with help of the refcase. */ - for (k=0; k < stringlist_get_size( keys ); k++) - ensemble_config_add_summary(ensemble_config , stringlist_iget(keys , k) , LOAD_FAIL_SILENT ); - - stringlist_free( keys ); - } - } else - ensemble_config_add_summary(ensemble_config , key , LOAD_FAIL_SILENT); - } - } - } -} - - -void ensemble_config_init_FIELD( ensemble_config_type * ensemble_config , const config_content_type * config , ecl_grid_type * grid) { - if (config_content_has_item(config , FIELD_KEY)) { - const config_content_item_type * item = config_content_get_item( config , FIELD_KEY ); - int i; - for (i=0; i < config_content_item_get_size( item ); i++) { - const config_content_node_type * node = config_content_item_iget_node( item , i ); - const char * key = config_content_node_iget( node , 0 ); - const char * var_type_string = config_content_node_iget( node , 1 ); - enkf_config_node_type * config_node; - - { - hash_type * options = hash_alloc(); - - int truncation = TRUNCATE_NONE; - double value_min = -1; - double value_max = -1; - - config_content_node_init_opt_hash( node , options , 2 ); - if (hash_has_key( options , MIN_KEY)) { - truncation |= TRUNCATE_MIN; - value_min = atof(hash_get( options , MIN_KEY)); - } - - if (hash_has_key( options , MAX_KEY)) { - truncation |= TRUNCATE_MAX; - value_max = atof(hash_get( options , MAX_KEY)); - } - - - if (strcmp(var_type_string , DYNAMIC_KEY) == 0) { - config_node = ensemble_config_add_field( ensemble_config , key , grid , false); - enkf_config_node_update_state_field( config_node , truncation , value_min , value_max ); - } else if (strcmp(var_type_string , PARAMETER_KEY) == 0) { - const char * ecl_file = config_content_node_iget( node , 2 ); - const char * init_file_fmt = hash_safe_get( options , INIT_FILES_KEY ); - const char * init_transform = hash_safe_get( options , INIT_TRANSFORM_KEY ); - const char * output_transform = hash_safe_get( options , OUTPUT_TRANSFORM_KEY ); - const char * min_std_file = hash_safe_get( options , MIN_STD_KEY ); - const char * forward_string = hash_safe_get( options , FORWARD_INIT_KEY ); - bool forward_init = false; - - if (forward_string) { - if (!util_sscanf_bool( forward_string , &forward_init)) - fprintf(stderr,"** Warning: parsing %s as bool failed - using FALSE \n",forward_string); - } - config_node = ensemble_config_add_field( ensemble_config , key , grid , forward_init); - enkf_config_node_update_parameter_field( config_node, - ecl_file , - init_file_fmt , - min_std_file , - truncation , - value_min , - value_max , - init_transform , - output_transform ); - } else if (strcmp(var_type_string , GENERAL_KEY) == 0) { - /* General - not really interesting .. */ - const char * ecl_file = config_content_node_iget( node , 2 ); - const char * enkf_infile = config_content_node_iget( node , 3 ); - const char * init_file_fmt = hash_safe_get( options , INIT_FILES_KEY ); - const char * init_transform = hash_safe_get( options , INIT_TRANSFORM_KEY ); - const char * output_transform = hash_safe_get( options , OUTPUT_TRANSFORM_KEY ); - const char * input_transform = hash_safe_get( options , INPUT_TRANSFORM_KEY ); - const char * min_std_file = hash_safe_get( options , MIN_STD_KEY ); - const char * forward_string = hash_safe_get( options , FORWARD_INIT_KEY ); - bool forward_init = false; - - if (forward_string) { - if (!util_sscanf_bool( forward_string , &forward_init)) - fprintf(stderr,"** Warning: parsing %s as bool failed - using FALSE \n",forward_string); - } - - config_node = ensemble_config_add_field( ensemble_config , key , grid , forward_init); - enkf_config_node_update_general_field( config_node, - ecl_file , - enkf_infile , - init_file_fmt , - min_std_file , - truncation , value_min , value_max , - init_transform , - input_transform , - output_transform); - - - } else - util_abort("%s: field type: %s is not recognized\n",__func__ , var_type_string); - - hash_free( options ); - } - } - } -} - - - -/** - observe that if the user has not given a refcase with the refcase - key the refcase pointer will be NULL. in that case it will be - impossible to use wildcards when expanding summary variables. -*/ - -void ensemble_config_init(ensemble_config_type * ensemble_config , const config_content_type * config , ecl_grid_type * grid, const ecl_sum_type * refcase) { - int i; - ensemble_config_set_refcase( ensemble_config , refcase ); - - if (config_content_has_item( config , GEN_KW_TAG_FORMAT_KEY)) { - ensemble_config_set_gen_kw_format( ensemble_config , config_content_iget( config , GEN_KW_TAG_FORMAT_KEY , 0 , 0 )); - } - - ensemble_config_init_GEN_PARAM( ensemble_config , config ); - ensemble_config_init_GEN_DATA( ensemble_config , config ); - ensemble_config_init_CUSTOM_KW(ensemble_config, config); - ensemble_config_init_GEN_KW(ensemble_config , config ); - ensemble_config_init_SURFACE( ensemble_config , config ); - - ensemble_config_init_SUMMARY( ensemble_config , config , refcase ); - - ensemble_config_init_FIELD( ensemble_config , config , grid ); - - - /* Containers - this must come last, to ensure that the other nodes have been added. */ - { - for (i=0; i < config_content_get_occurences(config , CONTAINER_KEY ); i++) { - const stringlist_type * container_kw_list = config_content_iget_stringlist_ref(config , CONTAINER_KEY , i); - const char * container_key = stringlist_iget( container_kw_list , 0 ); - enkf_config_node_type * container_node = ensemble_config_add_container( ensemble_config , container_key ); - - for (int j= 1; j < stringlist_get_size( container_kw_list ); j++) { - const char * child_key = stringlist_iget( container_kw_list , j); - enkf_config_node_update_container( container_node , ensemble_config_get_node( ensemble_config , child_key )); - } - } - } - - /*****************************************************************/ -} - -/** - this function takes a string like this: "pressure:1,4,7" - it - splits the string on ":" and tries to lookup a config object with - that key. for the general string a:b:c:d it will try consecutively - the keys: a, a:b, a:b:c, a:b:c:d. if a config object is found it is - returned, otherwise NULL is returned. - - the last argument is the pointer to a string which will be updated - with the node-spesific part of the full key. so for instance with - the example "pressure:1,4,7", the index_key will contain - "1,4,7". if the full full_key is used to find an object index_key - will be NULL, that also applies if no object is found. -*/ - - -const enkf_config_node_type * ensemble_config_user_get_node(const ensemble_config_type * config , const char * full_key, char ** index_key ) { - const enkf_config_node_type * node = NULL; - char ** key_list; - int keys; - int key_length = 1; - int offset; - - *index_key = NULL; - util_split_string(full_key , USER_KEY_JOIN_STRING , &keys , &key_list); - while (node == NULL && key_length <= keys) { - char * current_key = util_alloc_joined_string( (const char **) key_list , key_length , USER_KEY_JOIN_STRING ); - if (ensemble_config_has_key(config , current_key)) - node = ensemble_config_get_node(config , current_key); - else - key_length++; - offset = strlen( current_key ); - free( current_key ); - } - if (node != NULL) { - if (offset < strlen( full_key )) - *index_key = util_alloc_string_copy(&full_key[offset+1]); - } - - util_free_stringlist(key_list , keys); - return node; -} - - - -stringlist_type * ensemble_config_alloc_keylist(const ensemble_config_type * config) { - return hash_alloc_stringlist( config->config_nodes ); -} - - -/** - observe that var_type here is an integer - naturally written as a - sum of enkf_var_type values: - - ensemble_config_alloc_keylist_from_var_type( config , parameter + dynamic_state); - -*/ - -stringlist_type * ensemble_config_alloc_keylist_from_var_type(const ensemble_config_type * config , int var_mask) { - stringlist_type * key_list = stringlist_alloc_new(); - hash_iter_type * iter = hash_iter_alloc(config->config_nodes); - - while (!hash_iter_is_complete( iter )) { - const char * key = hash_iter_get_next_key(iter); - enkf_var_type var_type = enkf_config_node_get_var_type( hash_get(config->config_nodes , key)); - - if (var_type & var_mask) - stringlist_append_copy( key_list , key ); - } - hash_iter_free(iter); - - return key_list; -} - - - -stringlist_type * ensemble_config_alloc_keylist_from_impl_type(const ensemble_config_type * config , ert_impl_type impl_type) { - stringlist_type * key_list = stringlist_alloc_new(); - hash_iter_type * iter = hash_iter_alloc(config->config_nodes); - while (!hash_iter_is_complete( iter )) { - const char * key = hash_iter_get_next_key(iter); - if (enkf_config_node_get_impl_type( hash_get(config->config_nodes , key)) == impl_type) - stringlist_append_copy( key_list , key ); - - } - hash_iter_free(iter); - return key_list; -} - - -bool ensemble_config_has_impl_type(const ensemble_config_type * config, const ert_impl_type impl_type) { - bool ret = false; - hash_iter_type * iter = hash_iter_alloc(config->config_nodes); - while (!hash_iter_is_complete( iter )) { - const char * key = hash_iter_get_next_key(iter); - if (enkf_config_node_get_impl_type( hash_get(config->config_nodes , key)) == impl_type) { - ret = true; - break; - } - } - hash_iter_free(iter); - return ret; -} - - - - - -/** - this function will look up the user_key in the ensemble_config. if - the corresponding config_node can not be found 0 will be returned, - otherwise enkf_config_node functions will be invoked. -*/ - - -int ensemble_config_get_observations( const ensemble_config_type * config , enkf_obs_type * enkf_obs , const char * user_key , int obs_count , time_t * obs_time , double * y , double * std) { - int num_obs = 0; - char * index_key; - const enkf_config_node_type * config_node = ensemble_config_user_get_node( config , user_key , &index_key); - if (config_node != NULL) { - num_obs = enkf_config_node_load_obs( config_node , enkf_obs , index_key , obs_count , obs_time , y , std); - util_safe_free( index_key ); - } - return num_obs; -} - - -/*****************************************************************/ - - -/* - the ensemble_config_add_xxx() functions below will create a new xxx - instance and add it to the ensemble_config; the return value from - the functions is the newly created config_node instances. - - the newly created enkf_config_node instances are __not__ fully - initialized, and a subsequent call to enkf_config_node_update_xxx() - is essential for proper operation. -*/ - -enkf_config_node_type * ensemble_config_add_field( ensemble_config_type * config , const char * key , ecl_grid_type * ecl_grid , bool forward_init) { - enkf_config_node_type * config_node = enkf_config_node_alloc_field( key , ecl_grid , config->field_trans_table , forward_init); - ensemble_config_add_node( config , config_node ); - return config_node; -} - - -enkf_config_node_type * ensemble_config_add_gen_kw( ensemble_config_type * config , const char * key , bool forward_init) { - enkf_config_node_type * config_node = enkf_config_node_new_gen_kw( key , config->gen_kw_format_string , forward_init); - ensemble_config_add_node( config , config_node ); - return config_node; -} - -enkf_config_node_type * ensemble_config_add_custom_kw(ensemble_config_type * config, const char * key, const char * result_file, const char * output_file) { - enkf_config_node_type * config_node = enkf_config_node_new_custom_kw(key, result_file, output_file); - ensemble_config_add_node(config, config_node); - return config_node; -} - -enkf_config_node_type * ensemble_config_add_defined_custom_kw(ensemble_config_type * config, const char * key, const hash_type * definition) { - enkf_config_node_type * config_node = enkf_config_node_new_defined_custom_kw(key, definition); - ensemble_config_add_node(config, config_node); - return config_node; -} - - - -void ensemble_config_update_custom_kw_config(ensemble_config_type * config, custom_kw_config_set_type * config_set) { - stringlist_type * keys = custom_kw_config_set_get_keys_alloc(config_set); - - for(int i = 0; i < stringlist_get_size(keys); i++) { - const char * key = stringlist_iget(keys, i); - if(!ensemble_config_has_key(config, key)) { - ensemble_config_add_custom_kw(config, key, NULL, NULL); - printf("[%s] CustomKW key: '%s' not in ensemble! Adding from storage.\n", __func__, key); - } - - enkf_config_node_type * config_node = ensemble_config_get_node(config, key); - custom_kw_config_type * custom_kw_config = (custom_kw_config_type*) enkf_config_node_get_ref(config_node); - - custom_kw_config_set_update_config(config_set, custom_kw_config); - } - - stringlist_free(keys); -} - - -/** - this function ensures that object contains a node with 'key' and - type == summary. - - if the @refcase pointer is different from NULL the key will be - validated. keys which do not exist in the refcase will be ignored, - a warning will be printed on stderr and the function will return - NULL. -*/ - -enkf_config_node_type * ensemble_config_add_summary(ensemble_config_type * ensemble_config , const char * key , load_fail_type load_fail) { - enkf_config_node_type * config_node = NULL; - - if (hash_has_key(ensemble_config->config_nodes, key)) { - config_node = hash_get(ensemble_config->config_nodes, key); - if (enkf_config_node_get_impl_type( config_node ) != SUMMARY) { - util_abort("%s: ensemble key:%s already exists - but it is not of summary type\n",__func__ , key); - } - - summary_config_type * summary_config = enkf_config_node_get_ref( config_node ); - summary_config_update_load_fail_mode( summary_config , load_fail ); - - } else { - config_node = enkf_config_node_alloc_summary( key , load_fail); - ensemble_config_add_node(ensemble_config , config_node ); - } - - return config_node; -} - -enkf_config_node_type * ensemble_config_add_summary_observation(ensemble_config_type * ensemble_config , const char * key , load_fail_type load_fail) { - enkf_config_node_type * config_node = ensemble_config_add_summary(ensemble_config, key, load_fail); - - summary_key_matcher_add_summary_key(ensemble_config->summary_key_matcher, key); - - return config_node; -} - - -enkf_config_node_type * ensemble_config_add_surface( ensemble_config_type * ensemble_config , const char * key , bool forward_init) { - enkf_config_node_type * config_node = enkf_config_node_new_surface( key , forward_init ); - ensemble_config_add_node( ensemble_config , config_node ); - return config_node; -} - - -/* - If key == NULL the function will create a random key. -*/ -enkf_config_node_type * ensemble_config_add_container( ensemble_config_type * ensemble_config , const char * key) { - char * local_key = (char *) key; - bool random_key = false; - if (key == NULL) { - local_key = util_calloc( 11 , sizeof * local_key ); - sprintf(local_key , "%ld" , random() % 10000000 ); - random_key = true; - } - - { - enkf_config_node_type * config_node = enkf_config_node_new_container( local_key ); - ensemble_config_add_node( ensemble_config , config_node ); - if (random_key) - free( local_key ); - return config_node; - } -} - - -const summary_key_matcher_type * ensemble_config_get_summary_key_matcher(const ensemble_config_type * ensemble_config) { - return ensemble_config->summary_key_matcher; -} - -/*****************************************************************/ - -void ensemble_config_fprintf_config( ensemble_config_type * ensemble_config , FILE * stream ) { - fprintf( stream , CONFIG_COMMENTLINE_FORMAT ); - fprintf( stream , CONFIG_COMMENT_FORMAT , "Here comes configuration information about the uncertain parameters and response variables in use."); - - fprintf( stream , CONFIG_KEY_FORMAT , GEN_KW_TAG_FORMAT_KEY ); - fprintf( stream , CONFIG_ENDVALUE_FORMAT , ensemble_config->gen_kw_format_string); - - - /* Writing GEN_KW nodes. */ - { - stringlist_type * gen_kw_keys = ensemble_config_alloc_keylist_from_impl_type( ensemble_config , GEN_KW ); - stringlist_sort( gen_kw_keys , NULL ); - for (int i=0; i < stringlist_get_size( gen_kw_keys ); i++) { - const enkf_config_node_type * config_node = ensemble_config_get_node( ensemble_config , stringlist_iget( gen_kw_keys , i)); - enkf_config_node_fprintf_config( config_node , stream ); - } - if (stringlist_get_size( gen_kw_keys ) > 0) - fprintf(stream , "\n"); - stringlist_free( gen_kw_keys ); - } - - - /* Writing FIELD nodes. */ - { - stringlist_type * field_keys = ensemble_config_alloc_keylist_from_impl_type( ensemble_config , FIELD ); - stringlist_sort( field_keys , NULL ); - for (int i=0; i < stringlist_get_size( field_keys ); i++) { - const enkf_config_node_type * config_node = ensemble_config_get_node( ensemble_config , stringlist_iget( field_keys , i)); - enkf_config_node_fprintf_config( config_node , stream ); - } - if (stringlist_get_size( field_keys ) > 0) - fprintf(stream , "\n"); - stringlist_free( field_keys ); - } - - - /* Writing SUMMARY nodes. */ - { - stringlist_type * summary_keys = ensemble_config_alloc_keylist_from_impl_type( ensemble_config , SUMMARY ); - stringlist_sort( summary_keys , NULL ); - for (int i=0; i < stringlist_get_size( summary_keys ); i++) { - if (i == 0) - fprintf(stream , CONFIG_KEY_FORMAT , SUMMARY_KEY); - else if ((i % 8) == 0) { - fprintf(stream , "\n"); - fprintf(stream , CONFIG_KEY_FORMAT , SUMMARY_KEY); - } - fprintf(stream , CONFIG_SHORT_VALUE_FORMAT , stringlist_iget( summary_keys , i )); - } - fprintf(stream , "\n"); - stringlist_free( summary_keys ); - } - fprintf(stream , "\n"); - - - /* Writing GEN_DATA nodes. */ - { - stringlist_type * gen_data_keys = ensemble_config_alloc_keylist_from_impl_type( ensemble_config , GEN_DATA ); - stringlist_sort( gen_data_keys , NULL ); - for (int i=0; i < stringlist_get_size( gen_data_keys ); i++) { - const enkf_config_node_type * config_node = ensemble_config_get_node( ensemble_config , stringlist_iget( gen_data_keys , i)); - enkf_config_node_fprintf_config( config_node , stream ); - } - stringlist_free( gen_data_keys ); - } - fprintf(stream , "\n\n"); -} - - - -int ensemble_config_get_size(const ensemble_config_type * ensemble_config ) { - return hash_get_size( ensemble_config->config_nodes ); -} diff --git a/ThirdParty/Ert/libenkf/src/ert_init_context.c b/ThirdParty/Ert/libenkf/src/ert_init_context.c deleted file mode 100644 index 472f6508fb..0000000000 --- a/ThirdParty/Ert/libenkf/src/ert_init_context.c +++ /dev/null @@ -1,154 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'ert_init_context.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - - -#define ERT_INIT_CONTEXT_TYPE_ID 555341328 - - -struct ert_init_context_struct { - UTIL_TYPE_ID_DECLARATION; - vector_type * run_args; - bool_vector_type * iactive; // This can be updated .... - init_mode_type init_mode; - int iter; - int_vector_type * iens_map; - -}; - - - - -char * ert_init_context_alloc_runpath( int iens , path_fmt_type * runpath_fmt , subst_list_type * subst_list , int iter) { - char * runpath; - { - char * first_pass = path_fmt_alloc_path(runpath_fmt , false , iens, iter); /* 1: Replace first %d with iens, if a second %d replace with iter */ - - if (subst_list) - runpath = subst_list_alloc_filtered_string( subst_list , first_pass ); /* 2: Filter out various magic strings like and . */ - else - runpath = util_alloc_string_copy( first_pass ); - - free( first_pass ); - } - return runpath; -} - - -stringlist_type * ert_init_context_alloc_runpath_list(const bool_vector_type * iactive , path_fmt_type * runpath_fmt , subst_list_type * subst_list , int iter) { - stringlist_type * runpath_list = stringlist_alloc_new(); - for (int iens = 0; iens < bool_vector_size( iactive ); iens++) { - - if (bool_vector_iget( iactive , iens )) - stringlist_append_owned_ref( runpath_list , ert_init_context_alloc_runpath(iens , runpath_fmt , subst_list , iter)); - else - stringlist_append_ref( runpath_list , NULL ); - - } - return runpath_list; -} - - -static ert_init_context_type * ert_init_context_alloc1(const bool_vector_type * iactive , init_mode_type init_mode, int iter) { - ert_init_context_type * context = util_malloc( sizeof * context ); - UTIL_TYPE_ID_INIT( context , ERT_INIT_CONTEXT_TYPE_ID ); - - context->iactive = bool_vector_alloc_copy( iactive ); - context->iens_map = bool_vector_alloc_active_index_list( iactive , -1 ); - context->run_args = vector_alloc_new(); - context->init_mode = init_mode; - context->iter = iter; - - return context; -} - -ert_init_context_type * ert_init_context_alloc(enkf_fs_type * init_fs , const bool_vector_type * iactive , - path_fmt_type * runpath_fmt , - subst_list_type * subst_list , - init_mode_type init_mode , - int iter) { - - ert_init_context_type * context = ert_init_context_alloc1( iactive , init_mode , iter ); - { - stringlist_type * runpath_list = ert_init_context_alloc_runpath_list( iactive , runpath_fmt , subst_list , iter ); - for (int iens = 0; iens < bool_vector_size( iactive ); iens++) { - if (bool_vector_iget( iactive , iens )) { - run_arg_type * arg = run_arg_alloc_INIT_ONLY( init_fs , iens , iter , stringlist_iget( runpath_list , iens)); - vector_append_owned_ref( context->run_args , arg , run_arg_free__); - } - } - stringlist_free( runpath_list ); - } - return context; -} - - - - -UTIL_IS_INSTANCE_FUNCTION( ert_init_context , ERT_INIT_CONTEXT_TYPE_ID ); - - - -void ert_init_context_free( ert_init_context_type * context ) { - - vector_free( context->run_args ); - bool_vector_free( context->iactive ); - int_vector_free( context->iens_map ); - free( context ); -} - - -int ert_init_context_get_size( const ert_init_context_type * context ) { - return vector_get_size( context->run_args ); -} - - - -init_mode_type ert_init_context_get_init_mode( const ert_init_context_type * context ) { - return context->init_mode; -} - - -bool_vector_type * ert_init_context_get_iactive( const ert_init_context_type * context ) { - return context->iactive; -} - - -run_arg_type * ert_init_context_iget_arg( const ert_init_context_type * context , int index) { - return vector_iget( context->run_args , index ); -} - - -run_arg_type * ert_init_context_iens_get_arg( const ert_init_context_type * context , int iens) { - int index = int_vector_iget( context->iens_map , iens ); - if (index >= 0) - return vector_iget( context->run_args , index ); - else - return NULL; -} diff --git a/ThirdParty/Ert/libenkf/src/ert_log.c b/ThirdParty/Ert/libenkf/src/ert_log.c deleted file mode 100644 index 629415f538..0000000000 --- a/ThirdParty/Ert/libenkf/src/ert_log.c +++ /dev/null @@ -1,113 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'ert_log.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include - -#include - -#include -#include - - -static log_type * logh = NULL; /* Handle to an open log file. */ - -/** - * The logging uses log_level to determine if an incoming message is to be included in the log. - * A high log_level setting will include more messages. - */ -void ert_log_init_log( int log_level , const char * log_file_name, bool verbose){ - logh = log_open( NULL , DEFAULT_LOG_LEVEL ); - - log_set_level(logh, log_level); - if (log_file_name) - log_reopen( logh , log_file_name); - - if (verbose) - printf("Activity will be logged to ..............: %s \n",log_get_filename( logh )); - log_add_message(logh , 1 , NULL , "ert configuration loaded" , false); -} - -void ert_log_add_message_py(int message_level, char* message){ - ert_log_add_message(message_level, NULL, message, false); -} - -/** - * Adding a message with a given message_level. A low message_level means "more important", as only messages with - * message_level below the configured log_level will be included. - */ -void ert_log_add_message(int message_level , FILE * dup_stream , char* message, bool free_message) { - if(logh==NULL) - ert_log_init_log(1,NULL,true); - log_add_message(logh, message_level, dup_stream, message, free_message); -} - -/** - * Adding a message with a given message_level. A low message_level means "more important", as only messages with - * message_level below the configured log_level will be included. - */ -void ert_log_add_fmt_message(int message_level , FILE * dup_stream , const char * fmt , ...) { - if (log_include_message(logh,message_level)) { - char * message; - va_list ap; - va_start(ap , fmt); - message = util_alloc_sprintf_va( fmt , ap ); - log_add_message( logh , message_level , dup_stream , message , true); - va_end(ap); - } -} - -void ert_log_close(){ - if (log_is_open( logh )) - log_add_message( logh , false , NULL , "Exiting ert application normally - all is fine(?)" , false); - log_close( logh ); - logh = NULL; -} - -bool ert_log_is_open(){ - if(logh==NULL) - return false; - return log_is_open(logh); -} - -void ert_log_set_log_level(int log_level){ - if(logh==NULL) - ert_log_init_log(1,NULL,true); - log_set_level(logh, log_level); -} - -int ert_log_get_log_level(){ - if(logh==NULL) - ert_log_init_log(1,NULL,true); - return log_get_level(logh); -} - -const char * ert_log_get_filename() { - if(logh==NULL) - ert_log_init_log(1,NULL,true); - return log_get_filename(logh); -} - -log_type * ert_log_get_logh() { - if(logh==NULL) - ert_log_init_log(1,NULL,true); - return logh; -} - -void ert_log_open_empty(){ - logh = log_open(NULL, DEFAULT_LOG_LEVEL); -} diff --git a/ThirdParty/Ert/libenkf/src/ert_run_context.c b/ThirdParty/Ert/libenkf/src/ert_run_context.c deleted file mode 100644 index 655de27048..0000000000 --- a/ThirdParty/Ert/libenkf/src/ert_run_context.c +++ /dev/null @@ -1,278 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'ert_run_context.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - - -#define ERT_RUN_CONTEXT_TYPE_ID 55534132 - - -struct ert_run_context_struct { - UTIL_TYPE_ID_DECLARATION; - vector_type * run_args; - - // Observe that the iactive mask is a shared reference which has - // lifetime longer than the ert_run_context instance. When - // simulations have failed elements in the iactive vector can be set - // to false during runtime. - bool_vector_type * iactive; - run_mode_type run_mode; - int iter; - int step1; - int step2; - int load_start; - int_vector_type * iens_map; - - enkf_fs_type * init_fs; - enkf_fs_type * result_fs; - enkf_fs_type * update_target_fs; -}; - - - - -char * ert_run_context_alloc_runpath( int iens , path_fmt_type * runpath_fmt , subst_list_type * subst_list , int iter) { - char * runpath; - { - char * first_pass = path_fmt_alloc_path(runpath_fmt , false , iens, iter); /* 1: Replace first %d with iens, if a second %d replace with iter */ - - if (subst_list) - runpath = subst_list_alloc_filtered_string( subst_list , first_pass ); /* 2: Filter out various magic strings like and . */ - else - runpath = util_alloc_string_copy( first_pass ); - - free( first_pass ); - } - return runpath; -} - - -stringlist_type * ert_run_context_alloc_runpath_list(const bool_vector_type * iactive , path_fmt_type * runpath_fmt , subst_list_type * subst_list , int iter) { - stringlist_type * runpath_list = stringlist_alloc_new(); - for (int iens = 0; iens < bool_vector_size( iactive ); iens++) { - - if (bool_vector_iget( iactive , iens )) - stringlist_append_owned_ref( runpath_list , ert_run_context_alloc_runpath(iens , runpath_fmt , subst_list , iter)); - else - stringlist_append_ref( runpath_list , NULL ); - - } - return runpath_list; -} - - -static ert_run_context_type * ert_run_context_alloc(bool_vector_type * iactive , run_mode_type run_mode , enkf_fs_type * init_fs , enkf_fs_type * result_fs , enkf_fs_type * update_target_fs , int iter) { - ert_run_context_type * context = util_malloc( sizeof * context ); - UTIL_TYPE_ID_INIT( context , ERT_RUN_CONTEXT_TYPE_ID ); - - context->iactive = iactive; - context->iens_map = bool_vector_alloc_active_index_list( iactive , -1 ); - context->run_args = vector_alloc_new(); - context->run_mode = run_mode; - context->iter = iter; - ert_run_context_set_init_fs(context, init_fs); - ert_run_context_set_result_fs(context, result_fs); - ert_run_context_set_update_target_fs(context, update_target_fs); - - context->step1 = 0; - context->step2 = 0; - return context; -} - - -ert_run_context_type * ert_run_context_alloc_ENSEMBLE_EXPERIMENT(enkf_fs_type * fs , bool_vector_type * iactive , - path_fmt_type * runpath_fmt , - subst_list_type * subst_list , - int iter) { - - ert_run_context_type * context = ert_run_context_alloc( iactive , ENSEMBLE_EXPERIMENT , fs , fs , NULL , iter); - { - stringlist_type * runpath_list = ert_run_context_alloc_runpath_list( iactive , runpath_fmt , subst_list , iter ); - for (int iens = 0; iens < bool_vector_size( iactive ); iens++) { - if (bool_vector_iget( iactive , iens )) { - run_arg_type * arg = run_arg_alloc_ENSEMBLE_EXPERIMENT( fs , iens , iter , stringlist_iget( runpath_list , iens)); - vector_append_owned_ref( context->run_args , arg , run_arg_free__); - } - } - stringlist_free( runpath_list ); - } - return context; -} - - - -ert_run_context_type * ert_run_context_alloc_SMOOTHER_RUN(enkf_fs_type * simulate_fs , enkf_fs_type * target_update_fs , - bool_vector_type * iactive , - path_fmt_type * runpath_fmt , - subst_list_type * subst_list , - int iter) { - - ert_run_context_type * context = ert_run_context_alloc( iactive , SMOOTHER_UPDATE , simulate_fs , simulate_fs , target_update_fs , iter); - { - stringlist_type * runpath_list = ert_run_context_alloc_runpath_list( iactive , runpath_fmt , subst_list , iter ); - for (int iens = 0; iens < bool_vector_size( iactive ); iens++) { - if (bool_vector_iget( iactive , iens )) { - run_arg_type * arg = run_arg_alloc_SMOOTHER_RUN( simulate_fs , target_update_fs , iens , iter , stringlist_iget( runpath_list , iens)); - vector_append_owned_ref( context->run_args , arg , run_arg_free__); - } - } - stringlist_free( runpath_list ); - } - return context; -} - - - - -UTIL_IS_INSTANCE_FUNCTION( ert_run_context , ERT_RUN_CONTEXT_TYPE_ID ); - - - -void ert_run_context_free( ert_run_context_type * context ) { - if (context->result_fs) { - enkf_fs_decrease_write_count(context->result_fs); - } - - if (context->update_target_fs) { - enkf_fs_decrease_write_count(context->update_target_fs); - } - - vector_free( context->run_args ); - int_vector_free( context->iens_map ); - free( context ); -} - - -int ert_run_context_get_size( const ert_run_context_type * context ) { - return vector_get_size( context->run_args ); -} - - - -run_mode_type ert_run_context_get_mode( const ert_run_context_type * context ) { - return context->run_mode; -} - - - - - -int ert_run_context_get_iter( const ert_run_context_type * context ) { - return context->iter; -} - -int ert_run_context_get_step1( const ert_run_context_type * context ) { - return context->step1; -} - - -int ert_run_context_get_load_start( const ert_run_context_type * context ) { - if (context->step1 == 0) - return 1; - else - return context->step1; -} - - -int ert_run_context_get_step2( const ert_run_context_type * context ) { - return context->step2; -} - - -bool_vector_type * ert_run_context_get_iactive( const ert_run_context_type * context ) { - return context->iactive; -} - - -run_arg_type * ert_run_context_iget_arg( const ert_run_context_type * context , int index) { - return vector_iget( context->run_args , index ); -} - - -run_arg_type * ert_run_context_iens_get_arg( const ert_run_context_type * context , int iens) { - int index = int_vector_iget( context->iens_map , iens ); - if (index >= 0) - return vector_iget( context->run_args , index ); - else - return NULL; -} - -enkf_fs_type * ert_run_context_get_init_fs(const ert_run_context_type * run_context) { - if (run_context->init_fs) - return run_context->init_fs; - else { - util_abort("%s: internal error - tried to access run_context->init_fs when init_fs == NULL\n",__func__); - return NULL; - } -} - - -enkf_fs_type * ert_run_context_get_result_fs(const ert_run_context_type * run_context) { - if (run_context->result_fs) - return run_context->result_fs; - else { - util_abort("%s: internal error - tried to access run_context->result_fs when result_fs == NULL\n",__func__); - return NULL; - } -} - - -enkf_fs_type * ert_run_context_get_update_target_fs(const ert_run_context_type * run_context) { - if (run_context->update_target_fs) - return run_context->update_target_fs; - else { - util_abort("%s: internal error - tried to access run_context->update_target_fs when update_target_fs == NULL\n",__func__); - return NULL; - } -} - -void ert_run_context_set_init_fs(ert_run_context_type * context, enkf_fs_type * init_fs) { - context->init_fs = (init_fs) ? init_fs : NULL; -} - -void ert_run_context_set_result_fs(ert_run_context_type * context, enkf_fs_type * result_fs) { - if (result_fs) { - context->result_fs = result_fs; - enkf_fs_increase_write_count(result_fs); - } else - context->result_fs = NULL; -} - -void ert_run_context_set_update_target_fs(ert_run_context_type * context, enkf_fs_type * update_target_fs) { - if (update_target_fs) { - context->update_target_fs = update_target_fs; - enkf_fs_increase_write_count(update_target_fs); - } else - context->update_target_fs = NULL; -} - - - -void ert_run_context_deactivate_realization( ert_run_context_type * context , int iens) { - bool_vector_iset( context->iactive , iens , false ); -} diff --git a/ThirdParty/Ert/libenkf/src/ert_template.c b/ThirdParty/Ert/libenkf/src/ert_template.c deleted file mode 100644 index 408ebe6820..0000000000 --- a/ThirdParty/Ert/libenkf/src/ert_template.c +++ /dev/null @@ -1,258 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'ert_template.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - - -#define ERT_TEMPLATE_TYPE_ID 7731963 -#define ERT_TEMPLATES_TYPE_ID 6677330 - -/* Singular - one template. */ -struct ert_template_struct { - UTIL_TYPE_ID_DECLARATION; - template_type * template; - char * target_file; -}; - - - -/* Plural - many templates. */ -struct ert_templates_struct { - UTIL_TYPE_ID_DECLARATION; - subst_list_type * parent_subst; - hash_type * templates; -}; - - - -void ert_template_set_target_file( ert_template_type * ert_template , const char * target_file ) { - ert_template->target_file = util_realloc_string_copy( ert_template->target_file , target_file ); -} - - -void ert_template_set_template_file( ert_template_type * ert_template , const char * template_file ) { - template_set_template_file( ert_template->template , template_file ); -} - - -const char * ert_template_get_template_file( const ert_template_type * ert_template) { - return template_get_template_file( ert_template->template ); -} - -const char * ert_template_get_target_file( const ert_template_type * ert_template) { - return ert_template->target_file; -} - -const char * ert_template_get_args_as_string( const ert_template_type * ert_template ) { - return template_get_args_as_string( ert_template->template ); -} - - - -ert_template_type * ert_template_alloc( const char * template_file , const char * target_file , subst_list_type * parent_subst) { - ert_template_type * template = util_malloc( sizeof * template); - UTIL_TYPE_ID_INIT(template , ERT_TEMPLATE_TYPE_ID); - template->template = template_alloc( template_file , false , parent_subst); /* The templates are instantiated with internalize_template == false; - this means that substitutions are performed on the filename of the - template itself .*/ - - template->target_file = NULL; - ert_template_set_target_file( template , target_file ); - return template; -} - - -void ert_template_free( ert_template_type * template ) { - util_safe_free( template->target_file ); - template_free( template->template ); - free( template ); -} - - -void ert_template_instantiate( ert_template_type * template , const char * path , const subst_list_type * arg_list) { - char * target_file = util_alloc_filename( path , template->target_file , NULL ); - template_instantiate( template->template , target_file , arg_list , true ); - free( target_file ); -} - - -void ert_template_add_arg( ert_template_type * template , const char * key , const char * value ) { - template_add_arg( template->template , key , value ); -} - -void ert_template_set_args_from_string( ert_template_type * template, const char * arg_string ) { - template_clear_args( template->template ); - template_add_args_from_string( template->template , arg_string ); -} - - -UTIL_SAFE_CAST_FUNCTION( ert_template , ERT_TEMPLATE_TYPE_ID ) - -void ert_template_free__(void * arg) { - ert_template_free( ert_template_safe_cast( arg )); -} - - -static void ert_template_fprintf_config( const ert_template_type * template , FILE * stream ) { - fprintf(stream , CONFIG_KEY_FORMAT , RUN_TEMPLATE_KEY ); - fprintf(stream , CONFIG_VALUE_FORMAT , ert_template_get_template_file( template )); - fprintf(stream , CONFIG_VALUE_FORMAT , template->target_file ); - { - const char * arg_string = ert_template_get_args_as_string( template ); - if (arg_string != NULL) - fprintf(stream , CONFIG_ENDVALUE_FORMAT , arg_string ); - else - fprintf(stream , "\n"); - } -} - - -/*****************************************************************/ - - -ert_templates_type * ert_templates_alloc( subst_list_type * parent_subst ) { - ert_templates_type * templates = util_malloc( sizeof * templates ); - UTIL_TYPE_ID_INIT( templates , ERT_TEMPLATES_TYPE_ID ); - templates->templates = hash_alloc(); - templates->parent_subst = parent_subst; - return templates; -} - - -void ert_templates_free( ert_templates_type * ert_templates ) { - hash_free( ert_templates->templates ); - free( ert_templates ); -} - - -void ert_templates_del_template( ert_templates_type * ert_templates , const char * key) { - hash_del( ert_templates->templates , key ); -} - - -ert_template_type * ert_templates_add_template( ert_templates_type * ert_templates , const char * key , const char * template_file , const char * target_file, const char * arg_string) { - ert_template_type * template = ert_template_alloc( template_file , target_file , ert_templates->parent_subst); - ert_template_set_args_from_string( template , arg_string ); /* Arg_string can be NULL */ - - /** - If key == NULL the function will generate a key after the following algorithm: - - 1. It tries with the basename of the template file. - 2. It tries with the basename of the template file, and a counter. - */ - - if (key == NULL) { - char * new_key = NULL; - char * base_name; - int counter = 1; - util_alloc_file_components( template_file , NULL , &base_name , NULL); - do { - if (counter == 1) - new_key = util_realloc_string_copy( new_key , base_name ); - else - new_key = util_realloc_sprintf( new_key , "%s.%d" , base_name , counter ); - counter++; - } while (hash_has_key( ert_templates->templates , new_key)); - hash_insert_hash_owned_ref( ert_templates->templates , new_key , template , ert_template_free__); - free( new_key ); - free( base_name ); - } else - hash_insert_hash_owned_ref( ert_templates->templates , key , template , ert_template_free__); - - return template; -} - - -void ert_templates_instansiate( ert_templates_type * ert_templates , const char * path , const subst_list_type * arg_list) { - hash_iter_type * iter = hash_iter_alloc( ert_templates->templates ); - while (!hash_iter_is_complete( iter )) { - ert_template_type * ert_template = hash_iter_get_next_value( iter ); - ert_template_instantiate( ert_template , path , arg_list); - } - hash_iter_free( iter ); -} - - - -void ert_templates_clear( ert_templates_type * ert_templates ) { - hash_clear( ert_templates->templates ); -} - -ert_template_type * ert_templates_get_template( ert_templates_type * ert_templates , const char * key) { - return hash_get( ert_templates->templates , key ); -} - -stringlist_type * ert_templates_alloc_list( ert_templates_type * ert_templates) { - return hash_alloc_stringlist( ert_templates->templates ); -} - - -void ert_templates_init( ert_templates_type * templates , const config_content_type * config ) { - if (config_content_has_item( config , RUN_TEMPLATE_KEY)) { - const config_content_item_type * template_item = config_content_get_item( config , RUN_TEMPLATE_KEY ); - for (int i=0; i < config_content_item_get_size( template_item ); i++) { - config_content_node_type * template_node = config_content_item_iget_node( template_item , i ); - const char * template_file = config_content_node_iget_as_path(template_node , 0 ); - const char * target_file = config_content_node_iget( template_node , 1 ); - - ert_template_type * template = ert_templates_add_template( templates , NULL , template_file , target_file , NULL); - - for (int iarg = 2; iarg < config_content_node_get_size( template_node ); iarg++) { - char * key , *value; - const char * key_value = config_content_node_iget( template_node , iarg ); - util_binary_split_string( key_value , "=:" , true , &key , &value); - - if (value != NULL) - ert_template_add_arg( template ,key , value ); - else - fprintf(stderr,"** Warning - failed to parse argument:%s as key:value - ignored \n",config_content_iget( config , "RUN_TEMPLATE" , i , iarg )); - - free( key ); - util_safe_free( value ); - } - } - } -} - - -void ert_templates_fprintf_config( const ert_templates_type * ert_templates , FILE * stream ) { - if (hash_get_size( ert_templates->templates ) > 0 ) { - fprintf( stream , CONFIG_COMMENTLINE_FORMAT ); - fprintf( stream , CONFIG_COMMENT_FORMAT , "Here comes configuration information about RUN-TIME templates instantiated by ERT."); - - { - hash_iter_type * iter = hash_iter_alloc( ert_templates->templates ); - while( !hash_iter_is_complete( iter )) { - const char * key = hash_iter_get_next_key( iter ); - const ert_template_type * template = hash_get( ert_templates->templates , key ); - ert_template_fprintf_config( template , stream ); - } - hash_iter_free( iter ); - } - fprintf( stream , "\n\n" ); - } -} diff --git a/ThirdParty/Ert/libenkf/src/ert_test_context.c b/ThirdParty/Ert/libenkf/src/ert_test_context.c deleted file mode 100644 index faeac2f0b3..0000000000 --- a/ThirdParty/Ert/libenkf/src/ert_test_context.c +++ /dev/null @@ -1,183 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'ert_test_context.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - - -#define ERT_TEST_CONTEXT_TYPE_ID 99671055 -struct ert_test_context_struct { - UTIL_TYPE_ID_DECLARATION; - enkf_main_type * enkf_main; - test_work_area_type * work_area; - rng_type * rng; -}; - - -UTIL_IS_INSTANCE_FUNCTION( ert_test_context , ERT_TEST_CONTEXT_TYPE_ID ) - - -static ert_test_context_type * ert_test_context_alloc__( const char * test_name , const char * model_config , bool python_mode) { - ert_test_context_type * test_context = util_malloc( sizeof * test_context ); - UTIL_TYPE_ID_INIT( test_context , ERT_TEST_CONTEXT_TYPE_ID ); - - /* - This environment variable is set to ensure that test context will - parse the correct files when loading site config. - */ - if (python_mode) - setenv("ERT_UI_MODE" , "gui" , 1); - else - setenv("ERT_UI_MODE" , "tui" , 1); - - - if (util_file_exists(model_config)) { - test_context->work_area = test_work_area_alloc(test_name); - test_work_area_set_store( test_context->work_area , false ); - test_work_area_copy_parent_content(test_context->work_area , model_config ); - { - char * config_file = util_split_alloc_filename( model_config ); - test_context->enkf_main = enkf_main_bootstrap(config_file , true , false ); - free( config_file ); - } - test_context->rng = rng_alloc( MZRAN , INIT_DEV_URANDOM ); - } else { - test_context->enkf_main = NULL; - test_context->work_area = NULL; - test_context->rng = NULL; - } - return test_context; -} - -ert_test_context_type * ert_test_context_alloc( const char * test_name , const char * model_config) { - return ert_test_context_alloc__( test_name , model_config , false ); -} - - -ert_test_context_type * ert_test_context_alloc_python( const char * test_name , const char * model_config) { - return ert_test_context_alloc__( test_name , model_config , true ); -} - - - -enkf_main_type * ert_test_context_get_main( ert_test_context_type * test_context ) { - return test_context->enkf_main; -} - - -const char * ert_test_context_get_cwd( const ert_test_context_type * test_context ) { - return test_work_area_get_cwd( test_context->work_area ); -} - - - -void ert_test_context_free( ert_test_context_type * test_context ) { - - if (test_context->enkf_main) - enkf_main_free( test_context->enkf_main ); - - if (test_context->work_area) - test_work_area_free( test_context->work_area ); - - if (test_context->rng) - rng_free( test_context->rng ); - - free( test_context ); -} - - -bool ert_test_context_install_workflow_job( ert_test_context_type * test_context , const char * job_name , const char * job_file) { - if (util_file_exists( job_file )) { - enkf_main_type * enkf_main = ert_test_context_get_main( test_context ); - ert_workflow_list_type * workflow_list = enkf_main_get_workflow_list( enkf_main ); - ert_workflow_list_add_job( workflow_list , job_name , job_file ); - return ert_workflow_list_has_job( workflow_list , job_name ); - } else - return false; -} - - -bool ert_test_context_install_workflow( ert_test_context_type * test_context , const char * workflow_name , const char * workflow_file) { - if (util_file_exists( workflow_file )) { - enkf_main_type * enkf_main = ert_test_context_get_main( test_context ); - ert_workflow_list_type * workflow_list = enkf_main_get_workflow_list( enkf_main ); - ert_workflow_list_add_workflow( workflow_list , workflow_file , workflow_name ); - return ert_workflow_list_has_workflow( workflow_list , workflow_name); - } else - return false; -} - - -void ert_test_context_fwrite_workflow_job( FILE * stream , const char * job_name , const stringlist_type * args) { - fprintf(stream , "%s " , job_name); - stringlist_fprintf(args , " ", stream); - fprintf(stream , "\n"); -} - - -bool ert_test_context_run_worklow( ert_test_context_type * test_context , const char * workflow_name) { - enkf_main_type * enkf_main = ert_test_context_get_main( test_context ); - ert_workflow_list_type * workflow_list = enkf_main_get_workflow_list( enkf_main ); - - if (ert_workflow_list_has_workflow( workflow_list , workflow_name )){ - bool result = ert_workflow_list_run_workflow_blocking( workflow_list , workflow_name , enkf_main ); - return result; - } - else{ - return false; - } -} - - - -bool ert_test_context_run_worklow_job( ert_test_context_type * test_context , const char * job_name, const stringlist_type * args) { - enkf_main_type * enkf_main = ert_test_context_get_main( test_context ); - ert_workflow_list_type * workflow_list = enkf_main_get_workflow_list( enkf_main ); - - if (ert_workflow_list_has_job( workflow_list , job_name )) { - bool status; - { - char * workflow = util_alloc_sprintf("WORKFLOW-%06d" , rng_get_int( test_context->rng , 1000000)); - { - FILE * stream = util_fopen( workflow , "w"); - ert_test_context_fwrite_workflow_job( stream , job_name , args ); - fclose(stream); - } - ert_test_context_install_workflow( test_context , workflow , workflow); - status = ert_test_context_run_worklow( test_context , workflow ); - free(workflow); - } - return status; - } else - return false; -} - - -void ert_test_context_set_store( ert_test_context_type * test_context , bool store) { - test_work_area_set_store( test_context->work_area , store ); -} diff --git a/ThirdParty/Ert/libenkf/src/ert_users.c b/ThirdParty/Ert/libenkf/src/ert_users.c deleted file mode 100644 index 5458fcbddf..0000000000 --- a/ThirdParty/Ert/libenkf/src/ert_users.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'ert_users.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include - - -int main (int argc , char ** argv) { - char hostname[256]; - const char * executable = argv[1]; - - gethostname( hostname , 255 ); - printf("%s : " , hostname); - { - set_type * user_set = set_alloc_empty(); - enkf_main_list_users( user_set , executable ); - - if (set_get_size( user_set ) > 0) - set_fprintf(user_set , " " , stdout ); - else - printf("No users."); - - printf("\n"); - - set_free( user_set ); - } -} - - - - diff --git a/ThirdParty/Ert/libenkf/src/ert_workflow_list.c b/ThirdParty/Ert/libenkf/src/ert_workflow_list.c deleted file mode 100644 index ca78f76bc0..0000000000 --- a/ThirdParty/Ert/libenkf/src/ert_workflow_list.c +++ /dev/null @@ -1,365 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'ert_workflow_list.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include - - -#define ERT_WORKFLOW_LIST_TYPE_ID 8856275 - -struct ert_workflow_list_struct { - UTIL_TYPE_ID_DECLARATION; - stringlist_type * path_list; - hash_type * workflows; - hash_type * alias_map; - workflow_joblist_type * joblist; - const subst_list_type * context; - const config_error_type * last_error; - bool verbose; -}; - - - -ert_workflow_list_type * ert_workflow_list_alloc(const subst_list_type * context) { - ert_workflow_list_type * workflow_list = util_malloc( sizeof * workflow_list ); - UTIL_TYPE_ID_INIT( workflow_list , ERT_WORKFLOW_LIST_TYPE_ID ); - workflow_list->path_list = stringlist_alloc_new(); - workflow_list->workflows = hash_alloc(); - workflow_list->alias_map = hash_alloc(); - workflow_list->joblist = workflow_joblist_alloc(); - workflow_list->context = context; - workflow_list->last_error = NULL; - ert_workflow_list_set_verbose( workflow_list , DEFAULT_WORKFLOW_VERBOSE ); - return workflow_list; -} - - - -UTIL_IS_INSTANCE_FUNCTION( ert_workflow_list , ERT_WORKFLOW_LIST_TYPE_ID ) - -void ert_workflow_list_set_verbose( ert_workflow_list_type * workflow_list , bool verbose) { - workflow_list->verbose = verbose; -} - - -const subst_list_type * ert_workflow_list_get_context(const ert_workflow_list_type * workflow_list) { - return workflow_list->context; -} - -void ert_workflow_list_free( ert_workflow_list_type * workflow_list ) { - hash_free( workflow_list->workflows ); - hash_free( workflow_list->alias_map ); - stringlist_free( workflow_list->path_list ); - workflow_joblist_free( workflow_list->joblist ); - free( workflow_list ); -} - - - -workflow_type * ert_workflow_list_add_workflow( ert_workflow_list_type * workflow_list , const char * workflow_file , const char * workflow_name) { - if (util_file_exists( workflow_file )) { - workflow_type * workflow = workflow_alloc( workflow_file , workflow_list->joblist ); - char * name; - - if (workflow_name == NULL) - util_alloc_file_components( workflow_file , NULL , &name , NULL ); - else - name = (char *) workflow_name; - - - hash_insert_hash_owned_ref( workflow_list->workflows , name , workflow , workflow_free__); - if (hash_has_key( workflow_list->alias_map , name)) - hash_del( workflow_list->alias_map , name); - - if (workflow_name == NULL) - free( name ); - - return workflow; - } else - return NULL; -} - - - -void ert_workflow_list_add_alias( ert_workflow_list_type * workflow_list , const char * real_name , const char * alias) { - if (!util_string_equal( real_name , alias)) - hash_insert_ref( workflow_list->alias_map , alias , real_name ); -} - - -void ert_workflow_list_add_job( ert_workflow_list_type * workflow_list , const char * job_name , const char * config_file ) { - char * name = (char *) job_name; - - if (job_name == NULL) - util_alloc_file_components( config_file , NULL , &name , NULL ); - - if (!workflow_joblist_add_job_from_file( workflow_list->joblist , name , config_file )) - fprintf(stderr,"** Warning: failed to add workflow job:%s from:%s \n",name , config_file ); - - if (job_name == NULL) - free(name); -} - - -bool ert_workflow_list_has_job( const ert_workflow_list_type * workflow_list , const char * job_name) { - return workflow_joblist_has_job( workflow_list->joblist , job_name ); -} - - -const workflow_job_type * ert_workflow_list_get_job( const ert_workflow_list_type * workflow_list , const char * job_name) { - return workflow_joblist_get_job(workflow_list->joblist, job_name); -} - -/** - This function will create the most specific matching filename - corresponding to the @root_name input. I.e. it will look for - filename in this order: - - ROOT@X.Y.Z, ROOT@X.Y, ROOT@X, ROOT - - And return the first name corresponding to an existing file. If no - file can be found the function will return NULL. -*/ - -static char * ert_workflow_list_alloc_version_name( const char * path , const char * root_name ) { - char * full_path = util_alloc_sprintf( "%s%s%s@%d.%d.%s" , path , UTIL_PATH_SEP_STRING , root_name , - version_get_major_ert_version(), - version_get_minor_ert_version(), - version_get_micro_ert_version()); - if (util_is_file( full_path )) - return full_path; - else - free( full_path ); - - /*****************************************************************/ - - full_path = util_alloc_sprintf( "%s%s%s@%d.%d" , path , UTIL_PATH_SEP_STRING , root_name , - version_get_major_ert_version(), - version_get_minor_ert_version()); - - if (util_is_file( full_path )) - return full_path; - else - free( full_path ); - - /*****************************************************************/ - - full_path = util_alloc_sprintf( "%s%s%s@%d" , path , UTIL_PATH_SEP_STRING , root_name , - version_get_major_ert_version()); - - if (util_is_file( full_path )) - return full_path; - else - free( full_path ); - - - /*****************************************************************/ - - full_path = util_alloc_sprintf( "%s%s%s" , path , UTIL_PATH_SEP_STRING , root_name); - - if (util_is_file( full_path )) - return full_path; - else - free( full_path ); - - return NULL; -} - - - -void ert_workflow_list_add_jobs_in_directory( ert_workflow_list_type * workflow_list , const char * path ) { - DIR * dirH = opendir( path ); - set_type * names = set_alloc( 0 , NULL ); - if (dirH) { - while (true) { - struct dirent * entry = readdir( dirH ); - if (entry != NULL) { - if ((strcmp(entry->d_name , ".") != 0) && (strcmp(entry->d_name , "..") != 0)) { - char * root_name, * version; - util_binary_split_string( entry->d_name , "@" , false , &root_name , &version); - if (!set_has_key( names , root_name)) { - char * full_path = ert_workflow_list_alloc_version_name( path , root_name ); - - if (full_path) { - set_add_key( names , root_name ); - if (ert_log_is_open()) - ert_log_add_message( 1 , NULL , util_alloc_sprintf("Adding workflow job:%s " , full_path ), true); - - ert_workflow_list_add_job( workflow_list , root_name , full_path ); - } - - free( full_path ); - } - free( root_name ); - free( version ); - } - } else - break; - } - closedir( dirH ); - } else - fprintf(stderr, "** Warning: failed to open workflow/jobs directory: %s\n", path); - - set_free( names ); -} - - -stringlist_type * ert_workflow_list_get_job_names(const ert_workflow_list_type * workflow_list) { - return workflow_joblist_get_job_names(workflow_list->joblist); -} - - -void ert_workflow_list_init( ert_workflow_list_type * workflow_list , config_content_type * config ) { - /* Adding jobs */ - { - if (config_content_has_item( config , WORKFLOW_JOB_DIRECTORY_KEY)) { - const config_content_item_type * jobpath_item = config_content_get_item( config , WORKFLOW_JOB_DIRECTORY_KEY); - for (int i=0; i < config_content_item_get_size( jobpath_item ); i++) { - config_content_node_type * path_node = config_content_item_iget_node( jobpath_item , i ); - - for (int j=0; j < config_content_node_get_size( path_node ); j++) - ert_workflow_list_add_jobs_in_directory( workflow_list , config_content_node_iget_as_abspath( path_node , j ) ); - } - } - } - - { - if (config_content_has_item( config , LOAD_WORKFLOW_JOB_KEY)) { - const config_content_item_type * job_item = config_content_get_item( config , LOAD_WORKFLOW_JOB_KEY); - for (int i=0; i < config_content_item_get_size( job_item ); i++) { - config_content_node_type * job_node = config_content_item_iget_node( job_item , i ); - const char * config_file = config_content_node_iget_as_path( job_node , 0 ); - const char * job_name = config_content_node_safe_iget( job_node , 1 ); - ert_workflow_list_add_job( workflow_list , job_name , config_file); - } - } - } - - - /* Adding workflows */ - { - if (config_content_has_item( config , LOAD_WORKFLOW_KEY)) { - const config_content_item_type * workflow_item = config_content_get_item( config , LOAD_WORKFLOW_KEY); - for (int i=0; i < config_content_item_get_size( workflow_item ); i++) { - config_content_node_type * workflow_node = config_content_item_iget_node( workflow_item , i ); - const char * workflow_file = config_content_node_iget_as_path( workflow_node , 0 ); - const char * workflow_name = config_content_node_safe_iget( workflow_node , 1 ); - - ert_workflow_list_add_workflow( workflow_list , workflow_file , workflow_name ); - } - } - } -} - - -void ert_workflow_list_add_config_items( config_parser_type * config ) { - config_schema_item_type * item = config_add_schema_item( config , WORKFLOW_JOB_DIRECTORY_KEY , false ); - config_schema_item_set_argc_minmax(item , 1 , 1 ); - config_schema_item_iset_type( item , 0 , CONFIG_PATH ); - - item = config_add_schema_item( config , LOAD_WORKFLOW_KEY , false ); - config_schema_item_set_argc_minmax(item , 1 , 2 ); - config_schema_item_iset_type( item , 0 , CONFIG_EXISTING_PATH ); - - item = config_add_schema_item( config , LOAD_WORKFLOW_JOB_KEY , false ); - config_schema_item_set_argc_minmax(item , 1 , 2 ); - config_schema_item_iset_type( item , 0 , CONFIG_EXISTING_PATH ); -} - - - -workflow_type * ert_workflow_list_get_workflow(ert_workflow_list_type * workflow_list , const char * workflow_name ) { - const char * lookup_name = workflow_name; - - if (hash_has_key( workflow_list->alias_map , workflow_name)) - lookup_name = hash_get( workflow_list->alias_map , workflow_name ); - - return hash_get( workflow_list->workflows , lookup_name ); -} - -bool ert_workflow_list_has_workflow(ert_workflow_list_type * workflow_list , const char * workflow_name ) { - return - hash_has_key( workflow_list->workflows , workflow_name ) || - hash_has_key( workflow_list->alias_map , workflow_name); -} - - -bool ert_workflow_list_run_workflow__(ert_workflow_list_type * workflow_list, workflow_type * workflow, bool verbose , void * self) { - bool runOK = workflow_run( workflow, self , verbose , workflow_list->context); - if (runOK) - workflow_list->last_error = NULL; - else - workflow_list->last_error = workflow_get_last_error( workflow ); - - return runOK; -} - - -bool ert_workflow_list_run_workflow_blocking(ert_workflow_list_type * workflow_list , const char * workflow_name , void * self) { - workflow_type * workflow = ert_workflow_list_get_workflow( workflow_list , workflow_name ); - bool result = ert_workflow_list_run_workflow__( workflow_list, workflow , workflow_list->verbose , self); - return result; -} - - -bool ert_workflow_list_run_workflow(ert_workflow_list_type * workflow_list, const char * workflow_name , void * self) { - workflow_type * workflow = ert_workflow_list_get_workflow( workflow_list , workflow_name ); - return ert_workflow_list_run_workflow__( workflow_list, workflow , workflow_list->verbose , self); -} - - -/*****************************************************************/ - -stringlist_type * ert_workflow_list_alloc_namelist( ert_workflow_list_type * workflow_list ) { - return hash_alloc_stringlist( workflow_list->workflows ); -} - - -const config_error_type * ert_workflow_list_get_last_error( const ert_workflow_list_type * workflow_list) { - return workflow_list->last_error; -} - - -int ert_workflow_list_get_size( const ert_workflow_list_type * workflow_list) { - return hash_get_size( workflow_list->workflows ) + hash_get_size( workflow_list->alias_map); -} diff --git a/ThirdParty/Ert/libenkf/src/field.c b/ThirdParty/Ert/libenkf/src/field.c deleted file mode 100644 index 5fa6eccdb9..0000000000 --- a/ThirdParty/Ert/libenkf/src/field.c +++ /dev/null @@ -1,1564 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'field.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - - -GET_DATA_SIZE_HEADER(field); - - -/*****************************************************************/ - -/** - The field data type contains for "something" which is distributed - over the full grid, i.e. permeability or pressure. All configuration - information is stored in the config object, which is of type - field_config_type. Observe the following: - - * The field **only** contains the active cells - the config object - has a reference to actnum information. - - * The data is stored in a char pointer; the real underlying data can - be (at least) of the types int, float and double. -*/ - -struct field_struct { - int __type_id; - const field_config_type * config; /* The field config object - containing information of active cells++ */ - bool private_config; - char *data; /* The actual storage for the field - suitabley casted to int/float/double on use*/ - - bool shared_data; /* If the data is shared - i.e. managed (xalloc & free) from another scope. */ - int shared_byte_size; /* The size of the shared buffer (if it is shared). */ - char *export_data; /* IFF an output transform should be applied this pointer will hold the transformed data. */ - char *__data; /* IFF an output transform, this pointer will hold the original data during the transform and export. */ -}; - - - -#define EXPORT_MACRO \ -{ \ - int nx,ny,nz; \ - field_config_get_dims(field->config , &nx , &ny , &nz); \ - int i,j,k; \ - for (k=0; k < nz; k++) { \ - for (j=0; j < ny; j++) { \ - for (i=0; i < nx; i++) { \ - bool active_cell = field_config_active_cell(config, i, j, k); \ - bool use_initial_value = false; \ - \ - if (init_file && !active_cell) \ - use_initial_value = true; \ - \ - int source_index = 0; \ - if (use_initial_value) \ - source_index = field_config_global_index(config , i , j , k); \ - else \ - source_index = field_config_active_index(config, i, j, k); \ - \ - int target_index; \ - if (rms_index_order) \ - target_index = rms_util_global_index_from_eclipse_ijk(nx,ny,nz,i,j,k); \ - else \ - target_index = i + j * nx + k* nx*ny; \ - \ - if (use_initial_value) \ - target_data[target_index] = initial_src_data[source_index]; \ - else if (active_cell) \ - target_data[target_index] = src_data[source_index]; \ - else \ - memcpy(&target_data[target_index] , fill_value , sizeof_ctype_target); \ - } \ - } \ - } \ -} \ - - -void field_export3D(const field_type * field , - void *_target_data , - bool rms_index_order , - ecl_type_enum target_type , - void *fill_value, - const char * init_file) { - - const field_config_type * config = field->config; - ecl_type_enum ecl_type = field_config_get_ecl_type( config ); - int sizeof_ctype_target = ecl_util_get_sizeof_ctype(target_type); - - field_type * initial_field = NULL; - field_config_type * initial_field_config = NULL; - if (init_file) { - ecl_grid_type * grid = field_config_get_grid(config); - bool global_size = true; - initial_field_config = field_config_alloc_empty(field_config_get_key(config), grid, NULL, global_size); - initial_field = field_alloc(initial_field_config); - - field_fload_keep_inactive(initial_field, init_file); - } - - switch(ecl_type) { - case(ECL_DOUBLE_TYPE): - { - const double * src_data = (const double *) field->data; - const double * initial_src_data = initial_field ? (const double *) initial_field->data : NULL; - - if (target_type == ECL_FLOAT_TYPE) { - float *target_data = (float *) _target_data; - EXPORT_MACRO; - } else if (target_type == ECL_DOUBLE_TYPE) { - double *target_data = (double *) _target_data; - EXPORT_MACRO; - } else { - fprintf(stderr,"%s: double field can only export to double/float\n",__func__); - abort(); - } - } - break; - case(ECL_FLOAT_TYPE): - { - const float * src_data = (const float *) field->data; - const float * initial_src_data = initial_field ? (const float *) initial_field->data : NULL; - if (target_type == ECL_FLOAT_TYPE) { - float *target_data = (float *) _target_data; - EXPORT_MACRO; - } else if (target_type == ECL_DOUBLE_TYPE) { - double *target_data = (double *) _target_data; - EXPORT_MACRO; - } else { - fprintf(stderr,"%s: float field can only export to double/float\n",__func__); - abort(); - } - } - break; - case(ECL_INT_TYPE): - { - const int * src_data = (const int *) field->data; - const int * initial_src_data = initial_field ? (const int *) initial_field->data : NULL; - if (target_type == ECL_FLOAT_TYPE) { - float *target_data = (float *) _target_data; - EXPORT_MACRO; - } else if (target_type == ECL_DOUBLE_TYPE) { - double *target_data = (double *) _target_data; - EXPORT_MACRO; - } else if (target_type == ECL_INT_TYPE) { - int *target_data = (int *) _target_data; - EXPORT_MACRO; - } else { - fprintf(stderr,"%s: int field can only export to int/double/float\n",__func__); - abort(); - } - } - break; - default: - fprintf(stderr,"%s: Sorry field has unexportable type ... \n",__func__); - break; - } - - if (initial_field) { - field_config_free(initial_field_config); - field_free(initial_field); - } -} -#undef EXPORT_MACRO - - -/*****************************************************************/ -#define IMPORT_MACRO \ -{ \ - int i,j,k; \ - int nx,ny,nz; \ - field_config_get_dims(field->config , &nx , &ny , &nz); \ - for (k=0; k < nz; k++) { \ - for (j=0; j < ny; j++) { \ - for (i=0; i < nx; i++) { \ - int target_index = keep_inactive_cells ? field_config_global_index(config, i, j, k) : field_config_active_index(config, i, j, k); \ - \ - if (target_index >= 0) { \ - int source_index; \ - if (rms_index_order) \ - source_index = rms_util_global_index_from_eclipse_ijk(nx,ny,nz,i,j,k); \ - else \ - source_index = i + j * nx + k* nx*ny; \ - \ - target_data[target_index] = src_data[source_index] ; \ - } \ - } \ - } \ - } \ -} \ - - - -/** - The main function of the field_import3D and field_export3D - functions are to skip the inactive cells (field_import3D) and - distribute inactive cells (field_export3D). - When the flag keep_inactive_cells is set for field_import3D, - the values for the inactive cells are kept. The field argument - must have been allocated with flag global_size = true for this - to work. - When field_export3D is called with argument INIT_FILE, the - exported values for inactive cells are read from the INIT_FILE. - - In addition we can reorganize input/output according to the - RMS Roff index convention, and also perform float <-> double - conversions. - - Observe that these functions only import/export onto memory - buffers, the actual reading and writing of files is done in other - functions (calling these). -*/ - -static void field_import3D(field_type * field , - const void *_src_data , - bool rms_index_order , - bool keep_inactive_cells, - ecl_type_enum src_type) { - const field_config_type * config = field->config; - ecl_type_enum ecl_type = field_config_get_ecl_type(config); - - switch(ecl_type) { - case(ECL_DOUBLE_TYPE): - { - double * target_data = (double *) field->data; - if (src_type == ECL_FLOAT_TYPE) { - float *src_data = (float *) _src_data; - IMPORT_MACRO; - } else if (src_type == ECL_DOUBLE_TYPE) { - double *src_data = (double *) _src_data; - IMPORT_MACRO; - } else if (src_type == ECL_INT_TYPE) { - int *src_data = (int *) _src_data; - IMPORT_MACRO; - } else { - fprintf(stderr,"%s: double field can only import from int/double/float\n",__func__); - abort(); - } - } - break; - case(ECL_FLOAT_TYPE): - { - float * target_data = (float *) field->data; - if (src_type == ECL_FLOAT_TYPE) { - float *src_data = (float *) _src_data; - IMPORT_MACRO; - } else if (src_type == ECL_DOUBLE_TYPE) { - double *src_data = (double *) _src_data; - IMPORT_MACRO; - } else if (src_type == ECL_INT_TYPE) { - int *src_data = (int *) _src_data; - IMPORT_MACRO; - } else { - fprintf(stderr,"%s: double field can only import from int/double/float\n",__func__); - abort(); - } - } - break; - case(ECL_INT_TYPE): - { - int * target_data = (int *) field->data; - if (src_type == ECL_INT_TYPE) { - int *src_data = (int *) _src_data; - IMPORT_MACRO; - } else { - fprintf(stderr,"%s: int field can only import from int\n",__func__); - abort(); - } - } - break; - default: - fprintf(stderr,"%s: Sorry field has unimportable type ... \n",__func__); - break; - } -} -#undef IMPORT_MACRO - - -/*****************************************************************/ - -#define CLEAR_MACRO(d,s) { int k; for (k=0; k < (s); k++) (d)[k] = 0; } -void field_clear(field_type * field) { - const ecl_type_enum ecl_type = field_config_get_ecl_type(field->config); - const int data_size = field_config_get_data_size(field->config ); - - switch (ecl_type) { - case(ECL_DOUBLE_TYPE): - { - double * data = (double *) field->data; - CLEAR_MACRO(data , data_size); - break; - } - case(ECL_FLOAT_TYPE): - { - float * data = (float *) field->data; - CLEAR_MACRO(data , data_size); - break; - } - case(ECL_INT_TYPE): - { - int * data = (int *) field->data; - CLEAR_MACRO(data , data_size); - break; - } - default: - util_abort("%s: not implemeneted for data_type: %d \n",__func__ , ecl_type); - } -} -#undef CLEAR_MACRO - - - - -static field_type * __field_alloc(const field_config_type * field_config , void * shared_data , int shared_byte_size) { - field_type * field = util_malloc(sizeof *field); - field->config = field_config; - field->private_config = false; - if (shared_data == NULL) { - field->shared_data = false; - field->data = util_calloc(field_config_get_byte_size(field->config) , sizeof * field->data ); - } else { - field->data = shared_data; - field->shared_data = true; - field->shared_byte_size = shared_byte_size; - if (shared_byte_size < field_config_get_byte_size(field->config)) - util_abort("%s: the shared buffer is to small to hold the input field - aborting \n",__func__); - - } - field->export_data = NULL; /* This NULL is checked for in the revert_output_transform() */ - field->__type_id = FIELD; - return field; -} - - - -field_type * field_alloc(const field_config_type * field_config) { - return __field_alloc(field_config , NULL , 0); -} - - -field_type * field_alloc_shared(const field_config_type * field_config, void * shared_data , int shared_byte_size) { - return __field_alloc(field_config , shared_data , shared_byte_size); -} - - - -void field_copy(const field_type *src , field_type * target ) { - if (src->config == target->config) - memcpy(target->data , src->data , field_config_get_byte_size(src->config)); - else - util_abort("%s: instances do not share config \n",__func__); -} - - - -void field_read_from_buffer(field_type * field , buffer_type * buffer, enkf_fs_type * fs, int report_step) { - int byte_size = field_config_get_byte_size( field->config ); - enkf_util_assert_buffer_type(buffer , FIELD); - buffer_fread_compressed(buffer , buffer_get_remaining_size( buffer ) , field->data , byte_size); -} - - - -static void * __field_alloc_3D_data(const field_type * field , - int data_size , - bool rms_index_order , - ecl_type_enum ecl_type , - ecl_type_enum target_type, - const char * init_file) { - void * data = util_calloc(data_size , ecl_util_get_sizeof_ctype(target_type) ); - if (ecl_type == ECL_DOUBLE_TYPE) { - double fill; - if (rms_index_order) - fill = RMS_INACTIVE_DOUBLE; - else - fill = 0; - field_export3D(field , data , rms_index_order , target_type , &fill, init_file); - } else if (ecl_type == ECL_FLOAT_TYPE) { - float fill; - if (rms_index_order) - fill = RMS_INACTIVE_FLOAT; - else - fill = 0; - field_export3D(field , data , rms_index_order , target_type , &fill, init_file); - } else if (ecl_type == ECL_INT_TYPE) { - int fill; - if (rms_index_order) - fill = RMS_INACTIVE_INT; - else - fill = 0; - field_export3D(field , data , rms_index_order , target_type , &fill, init_file); - } else - util_abort("%s: trying to export type != int/float/double - aborting \n",__func__); - return data; -} - - -/** - A general comment about writing fields to disk: - - The writing of fields to disk can be done in **MANY** different ways: - - o The native function field_fwrite() will save the field in the - format most suitable for use with enkf. This function will only - save the active cells, and compress the field if the variable - write_compressed is true. Most of the configuration information - is with the field_config object, and not saved with the field. - - o Export as ECLIPSE input. This again has three subdivisions: - - * The function field_ecl_grdecl_export() will write the field to - disk in a format suitable for ECLIPSE INCLUDE statements. This - means that both active and inactive cells are written, with a - zero fill for the inactive. If the argument init_file is set, - the value for the inactive cells are read from this file. - - * The functions field_xxxx_fortio() writes the field in the - ECLIPSE restart format. The function field_ecl_write3D_fortio() - writes all the cells - with zero filling for inactive - cells. This is suitable for IMPORT of e.g. PORO. - - The function field_ecl_write1D_fortio() will write only the - active cells in an ECLIPSE restart file. This is suitable for - e.g. the pressure. - - Observe that the function field_ecl_write() should get config - information and automatically select the right way to export to - eclipse format. - - o Export in RMS ROFF format. -*/ - - - -/** - This function exports *one* field instance to the rms_file - instance. It is the responsibility of the field_ROFF_export() - function to initialize and close down the rms_file instance. -*/ - -static void field_ROFF_export__(const field_type * field , rms_file_type * rms_file, const char * init_file) { - const int data_size = field_config_get_volume(field->config); - const ecl_type_enum target_type = field_config_get_ecl_type(field->config); /* Could/should in principle be input */ - const ecl_type_enum ecl_type = field_config_get_ecl_type(field->config); - - void *data = __field_alloc_3D_data(field , data_size , true , ecl_type , target_type, init_file); - rms_tagkey_type * data_key = rms_tagkey_alloc_complete("data" , data_size , rms_util_convert_ecl_type(target_type) , data , true); - rms_tag_fwrite_parameter(field_config_get_ecl_kw_name(field->config) , data_key , rms_file_get_FILE(rms_file)); - rms_tagkey_free(data_key); - free(data); -} - - -static rms_file_type * field_init_ROFF_export(const field_type * field, const char * filename) { - rms_file_type * rms_file = rms_file_alloc(filename , false); - rms_file_fopen_w(rms_file); - rms_file_init_fwrite(rms_file , "parameter"); /* Version / byteswap ++ */ - { - int nx,ny,nz; - field_config_get_dims(field->config , &nx , &ny , &nz); - rms_tag_fwrite_dimensions(nx , ny , nz , rms_file_get_FILE(rms_file)); /* Dimension header */ - } - return rms_file; -} - - -static void field_complete_ROFF_export(const field_type * field , rms_file_type * rms_file) { - rms_file_complete_fwrite(rms_file); - rms_file_fclose(rms_file); - rms_file_free(rms_file); -} - - - - -/** - This function exports the data of a field as a parameter to an RMS - roff file. The export process is divided in three parts: - - 1. The rms_file is opened, and initialized with some basic data - for dimensions++ - 2. The field is written to file. - 3. The file is completed / closed. - - The reason for doing it like this is that it should be easy to - export several fields (of the same dimension+++) with repeated - calls to 2 (i.e. field_ROFF_export__()) - that is currently not - implemented. -*/ - -void field_ROFF_export(const field_type * field , const char * export_filename, const char * init_file) { - rms_file_type * rms_file = field_init_ROFF_export(field , export_filename); - field_ROFF_export__(field , rms_file, init_file); /* Should now be possible to several calls to field_ROFF_export__() */ - field_complete_ROFF_export(field , rms_file); -} - - - -bool field_write_to_buffer(const field_type * field , buffer_type * buffer , int report_step) { - int byte_size = field_config_get_byte_size( field->config ); - buffer_fwrite_int( buffer , FIELD ); - buffer_fwrite_compressed( buffer , field->data , byte_size ); - return true; -} - - - -void field_ecl_write1D_fortio(const field_type * field , fortio_type * fortio) { - const int data_size = field_config_get_data_size(field->config ); - const ecl_type_enum ecl_type = field_config_get_ecl_type(field->config); - - ecl_kw_fwrite_param_fortio(fortio , field_config_get_ecl_kw_name(field->config), ecl_type , data_size , field->data); -} - - -void field_ecl_write3D_fortio(const field_type * field , fortio_type * fortio, const char * init_file ) { - const int data_size = field_config_get_volume(field->config); - const ecl_type_enum target_type = field_config_get_ecl_type(field->config); /* Could/should in principle be input */ - const ecl_type_enum ecl_type = field_config_get_ecl_type(field->config); - void *data = __field_alloc_3D_data(field , data_size , false ,ecl_type , target_type, init_file); - - ecl_kw_fwrite_param_fortio(fortio , field_config_get_ecl_kw_name(field->config), ecl_type , data_size , data); - free(data); -} - - -static ecl_kw_type * field_alloc_ecl_kw_wrapper__(const field_type * field, void * data) { - const int data_size = field_config_get_volume(field->config); - const ecl_type_enum target_type = field_config_get_ecl_type(field->config); /* Could/should in principle be input */ - - ecl_kw_type * ecl_kw = ecl_kw_alloc_new_shared(field_config_get_ecl_kw_name(field->config) , data_size , target_type , data); - - return ecl_kw; -} - - -void field_ecl_grdecl_export(const field_type * field , FILE * stream, const char * init_file) { - const int data_size = field_config_get_volume(field->config); - const ecl_type_enum target_type = field_config_get_ecl_type(field->config); /* Could/should in principle be input */ - const ecl_type_enum ecl_type = field_config_get_ecl_type(field->config); - void *data = __field_alloc_3D_data(field , data_size , false , ecl_type , target_type, init_file ); - ecl_kw_type * ecl_kw = field_alloc_ecl_kw_wrapper__(field , data); - ecl_kw_fprintf_grdecl(ecl_kw , stream); - ecl_kw_free(ecl_kw); - free(data); -} - - -/** - This allocates a ecl_kw instance representing the field. The - size/header/type are copied from the field. whereas the data is - *SHARED* with the field->data. - - The ecl_kw instance knows that the data is only shared, and it is - safe to call ecl_kw_free() on it. -*/ - -ecl_kw_type * field_alloc_ecl_kw_wrapper(const field_type * field) { - ecl_kw_type * ecl_kw = field_alloc_ecl_kw_wrapper__(field , field->data); - return ecl_kw; -} - - -static void field_apply(field_type * field , field_func_type * func) { - field_config_assert_unary(field->config , __func__); - { - const int data_size = field_config_get_data_size( field->config ); - const ecl_type_enum ecl_type = field_config_get_ecl_type(field->config); - - if (ecl_type == ECL_FLOAT_TYPE) { - float * data = (float *) field->data; - for (int i=0; i < data_size; i++) - data[i] = func(data[i]); - } else if (ecl_type == ECL_DOUBLE_TYPE) { - double * data = (double *) field->data; - for (int i=0; i < data_size; i++) - data[i] = func(data[i]); - } - } -} - - -static bool field_check_finite( const field_type * field) { - const int data_size = field_config_get_data_size( field->config ); - const ecl_type_enum ecl_type = field_config_get_ecl_type(field->config); - bool ok = true; - - if (ecl_type == ECL_FLOAT_TYPE) { - float * data = (float *) field->data; - for (int i=0; i < data_size; i++) - if (!isfinite( data[i] )) - ok = false; - } else if (ecl_type == ECL_DOUBLE_TYPE) { - double * data = (double *) field->data; - for (int i=0; i < data_size; i++) - if (!isfinite( data[i] )) - ok = false; - } - return ok; -} - - - -void field_inplace_output_transform(field_type * field ) { - field_func_type * output_transform = field_config_get_output_transform(field->config); - if (output_transform != NULL) - field_apply(field , output_transform); -} - - - -#define TRUNCATE_MACRO(s , d , t , min , max) \ -for (int i=0; i < s; i++) { \ - if ( t & TRUNCATE_MIN ) \ - if (d[i] < min) \ - d[i] = min; \ - if ( t & TRUNCATE_MAX ) \ - if (d[i] > max) \ - d[i] = max; \ -} - - -static void field_apply_truncation(field_type * field) { - truncation_type truncation = field_config_get_truncation_mode( field->config ); - if (truncation != TRUNCATE_NONE) { - double min_value = field_config_get_truncation_min( field->config ); - double max_value = field_config_get_truncation_max( field->config ); - - const int data_size = field_config_get_data_size(field->config ); - const ecl_type_enum ecl_type = field_config_get_ecl_type(field->config); - if (ecl_type == ECL_FLOAT_TYPE) { - float * data = (float *) field->data; - TRUNCATE_MACRO(data_size , data , truncation , min_value , max_value); - } else if (ecl_type == ECL_DOUBLE_TYPE) { - double * data = (double *) field->data; - TRUNCATE_MACRO(data_size , data , truncation , min_value , max_value); - } else - util_abort("%s: Field type not supported for truncation \n",__func__); - } -} - - -/** - Does both the explicit output transform *AND* the truncation. -*/ - -static void field_output_transform(field_type * field) { - field_func_type * output_transform = field_config_get_output_transform(field->config); - truncation_type truncation = field_config_get_truncation_mode( field->config ); - if ((output_transform != NULL) || (truncation != TRUNCATE_NONE)) { - field->export_data = util_alloc_copy(field->data , field_config_get_byte_size(field->config) ); - field->__data = field->data; /* Storing a pointer to the original data. */ - field->data = field->export_data; - - if (output_transform != NULL) - field_inplace_output_transform(field); - - field_apply_truncation(field); - } -} - - -static void field_revert_output_transform(field_type * field) { - if (field->export_data != NULL) { - free(field->export_data); - field->export_data = NULL; - field->data = field->__data; /* Recover the original pointer. */ - } -} - - -/** - This is the generic "export field to eclipse" function. It will - check up the config object to determine how to export the field, - and then call the appropriate function. The alternatives are: - - * Restart format - only active cells (field_ecl_write1D_fortio). - * Restart format - all cells (field_ecl_write3D_fortio). - * GRDECL format (field_ecl_grdecl_export) - - Observe that the output transform is hooked in here, that means - that if you call e.g. the ROFF export function directly, the output - transform will *NOT* be applied. -*/ - -void field_export(const field_type * __field, - const char * file , - fortio_type * restart_fortio , - field_file_format_type file_type, - bool output_transform, - const char * init_file) { - field_type * field = (field_type *) __field; /* Net effect is no change ... but */ - - if (output_transform) field_output_transform(field); - { - - /* Writes the field to in ecl_kw format to a new file. */ - if ((file_type == ECL_KW_FILE_ALL_CELLS) || (file_type == ECL_KW_FILE_ACTIVE_CELLS)) { - fortio_type * fortio; - bool fmt_file = false; /* For formats which support both formatted and unformatted output this is hardwired to unformatted. */ - - fortio = fortio_open_writer(file , fmt_file , ECL_ENDIAN_FLIP); - - if (file_type == ECL_KW_FILE_ALL_CELLS) - field_ecl_write3D_fortio(field , fortio, init_file); - else - field_ecl_write1D_fortio(field , fortio); - - fortio_fclose(fortio); - } else if (file_type == ECL_GRDECL_FILE) { - /* Writes the field to a new grdecl file. */ - FILE * stream = util_mkdir_fopen(file , "w"); - field_ecl_grdecl_export(field , stream, init_file); - fclose(stream); - } else if (file_type == RMS_ROFF_FILE) - /* Roff export */ - field_ROFF_export(field , file, init_file); - else if (file_type == ECL_FILE) - /* This entry point is used by the ecl_write() function to write to an ALREADY OPENED eclipse restart file. */ - field_ecl_write1D_fortio( field , restart_fortio); - else - util_abort("%s: internal error file_type = %d - aborting \n",__func__ , file_type); - } - if (output_transform) field_revert_output_transform(field); -} - - -/** - Observe that the output transform is hooked in here, that means - that if you call e.g. the ROFF export function directly, the output - transform will *NOT* be applied. - - Observe that the output transform is done one a copy of the data - - not in place. When the export is complete the field->data will be - unchanged. -*/ - -void field_ecl_write(const field_type * field , const char * run_path , const char * file , void * filestream) { - field_file_format_type export_format = field_config_get_export_format(field->config); - - if (export_format == ECL_FILE) { - fortio_type * restart_fortio = fortio_safe_cast(filestream); - field_export(field , NULL , restart_fortio , export_format , true, NULL); - } - else { - char * full_path = util_alloc_filename( run_path , file , NULL); - if (util_is_link(full_path)) { - util_unlink_existing(full_path); - } - field_export(field , full_path , NULL , export_format , true, NULL); - free( full_path ); - } -} - - - -bool field_initialize(field_type *field , int iens , const char * init_file , rng_type * rng) { - bool ret = false; - if (init_file) { - if (field_fload(field , init_file )) { - field_func_type * init_transform = field_config_get_init_transform(field->config); - /* - Doing the input transform - observe that this is done inplace on - the data, not as the output transform which is done on a copy of - prior to export. - */ - if (init_transform) { - field_apply(field , init_transform); - if (!field_check_finite( field )) - util_exit("Sorry: after applying the init transform field:%s contains nan/inf or similar malformed values.\n" , field_config_get_key( field->config )); - } - ret = true; - } - } - - return ret; -} - - -void field_free(field_type *field) { - if (!field->shared_data) { - free(field->data); - field->data = NULL; - } - free(field); -} - - - -void field_serialize(const field_type * field , node_id_type node_id , const active_list_type * active_list , matrix_type * A , int row_offset , int column) { - const field_config_type *config = field->config; - const int data_size = field_config_get_data_size(config ); - ecl_type_enum ecl_type = field_config_get_ecl_type(config); - - enkf_matrix_serialize( field->data , data_size , ecl_type , active_list , A , row_offset , column); -} - - -void field_deserialize(field_type * field , node_id_type node_id , const active_list_type * active_list , const matrix_type * A , int row_offset , int column) { - const field_config_type *config = field->config; - const int data_size = field_config_get_data_size(config ); - ecl_type_enum ecl_type = field_config_get_ecl_type(config); - - enkf_matrix_deserialize( field->data , data_size , ecl_type , active_list , A , row_offset , column); -} - -static int __get_index(const field_type * field, int i, int j, int k) { - return field_config_keep_inactive_cells(field->config) ? field_config_global_index(field->config , i , j , k) : field_config_active_index(field->config , i , j , k); -} - - -void field_ijk_get(const field_type * field , int i , int j , int k , void * value) { - int index = __get_index(field, i, j, k); - int sizeof_ctype = field_config_get_sizeof_ctype(field->config); - memcpy(value , &field->data[index * sizeof_ctype] , sizeof_ctype); -} - - - -double field_ijk_get_double(const field_type * field, int i , int j , int k) { - int index = __get_index(field, i, j, k); - return field_iget_double( field , index ); -} - - -float field_ijk_get_float(const field_type * field, int i , int j , int k) { - int index = __get_index(field, i, j, k); - return field_iget_float( field , index ); -} - - -/** - Takes an active or global index as input, and returns a double. -*/ -double field_iget_double(const field_type * field , int index) { - ecl_type_enum ecl_type = field_config_get_ecl_type(field->config); - int sizeof_ctype = field_config_get_sizeof_ctype(field->config); - char buffer[8]; /* Enough to hold one double */ - memcpy(buffer , &field->data[index * sizeof_ctype] , sizeof_ctype); - if ( ecl_type == ECL_DOUBLE_TYPE ) - return *((double *) buffer); - else if (ecl_type == ECL_FLOAT_TYPE) { - double double_value; - float float_value; - - float_value = *((float *) buffer); - double_value = float_value; - - return double_value; - } else { - util_abort("%s: failed - wrong internal type \n",__func__); - return -1; - } -} - - -/** - Takes an active or global index as input, and returns a double. -*/ -float field_iget_float(const field_type * field , int index) { - ecl_type_enum ecl_type = field_config_get_ecl_type(field->config); - int sizeof_ctype = field_config_get_sizeof_ctype(field->config); - char buffer[8]; /* Enough to hold one double */ - memcpy(buffer , &field->data[index * sizeof_ctype] , sizeof_ctype); - if ( ecl_type == ECL_FLOAT_TYPE ) - return *((float *) buffer); - else if (ecl_type == ECL_DOUBLE_TYPE) { - double double_value; - float float_value; - - double_value = *((double *) buffer); - float_value = double_value; - - return float_value; - } else { - util_abort("%s: failed - wrong internal type \n",__func__); - return -1; - } -} - - - - -double field_iget(const field_type * field, int index) { - return field_iget_double(field , index); -} - - - -void field_ijk_set(field_type * field , int i , int j , int k , const void * value) { - int index = __get_index(field, i, j, k); - int sizeof_ctype = field_config_get_sizeof_ctype(field->config); - memcpy(&field->data[index * sizeof_ctype] , value , sizeof_ctype); -} - - -#define INDEXED_UPDATE_MACRO(t,s,n,index,add) \ -{ \ - int i; \ - if (add) \ - for (i=0; i < (n); i++) \ - (t)[index[i]] += (s)[i]; \ - else \ - for (i=0; i < (n); i++) \ - (t)[index[i]] = (s)[i]; \ -} - - - -static void field_indexed_update(field_type * field, ecl_type_enum src_type , int len , const int * index_list , const void * value , bool add) { - ecl_type_enum target_type = field_config_get_ecl_type(field->config); - - switch (target_type) { - case(ECL_FLOAT_TYPE): - { - float * field_data = (float *) field->data; - if (src_type == ECL_DOUBLE_TYPE) { - double * src_data = (double *) value; - INDEXED_UPDATE_MACRO(field_data , src_data , len , index_list , add); - } else if (src_type == ECL_FLOAT_TYPE) { - float * src_data = (float *) value; - INDEXED_UPDATE_MACRO(field_data , src_data , len , index_list , add); - } else - util_abort("%s both existing field - and indexed values must be float / double - aborting\n",__func__); - } - break; - case(ECL_DOUBLE_TYPE): - { - double * field_data = (double *) field->data; - if (src_type == ECL_DOUBLE_TYPE) { - double * src_data = (double *) value; - INDEXED_UPDATE_MACRO(field_data , src_data , len , index_list , add); - } else if (src_type == ECL_FLOAT_TYPE) { - float * src_data = (float *) value; - INDEXED_UPDATE_MACRO(field_data , src_data , len , index_list , add); - } else - util_abort("%s both existing field - and indexed values must be float / double - aborting\n",__func__); - } - break; - default: - util_abort("%s existing field must be of type float/double - aborting \n",__func__); - } -} - - -void field_indexed_set(field_type * field, ecl_type_enum src_type , int len , const int * index_list , const void * value) { - field_indexed_update(field , src_type , len , index_list , value , false); -} - - -void field_indexed_add(field_type * field, ecl_type_enum src_type , int len , const int * index_list , const void * value) { - field_indexed_update(field , src_type , len , index_list , value , true); -} - - - -double * field_indexed_get_alloc(const field_type * field, int len, const int * index_list) -{ - double * export_data = util_calloc(len , sizeof * export_data); - ecl_type_enum src_type = field_config_get_ecl_type(field->config); - - if(src_type == ECL_DOUBLE_TYPE) { - /* double -> double */ - double * field_data = (double *) field->data; - for (int i=0; i double */ - float * field_data = (float *) field->data; - for (int i=0; i=0) - return true; - else - return false; -} - - -void field_ijk_get_if_valid(const field_type * field , int i , int j , int k , void * value , bool * valid) { - int index = __get_index(field, i, j, k); - if (index >=0) { - *valid = true; - field_ijk_get(field , i , j , k , value); - } else - *valid = false; -} - - -int field_get_active_index(const field_type * field , int i , int j , int k) { - return field_config_active_index(field->config , i , j , k); -} - -int field_get_global_index(const field_type * field , int i , int j , int k) { - return field_config_global_index(field->config , i , j , k); -} - - - -/** - Copying data from a (PACKED) ecl_kw instance down to a fields data. -*/ - -void field_copy_ecl_kw_data(field_type * field , const ecl_kw_type * ecl_kw) { - const field_config_type * config = field->config; - const int data_size = field_config_get_data_size(config ); - ecl_type_enum field_type = field_config_get_ecl_type(field->config); - ecl_type_enum kw_type = ecl_kw_get_type(ecl_kw); - - if (data_size != ecl_kw_get_size(ecl_kw)) { - fprintf(stderr,"\n"); - fprintf(stderr," ** Fatal error - the number of active cells has changed \n"); - fprintf(stderr," ** Grid:%s has %d active cells. \n",field_config_get_grid_name( config ) , data_size); - fprintf(stderr," ** %s loaded from file has %d active cells.\n",field_config_get_key(config), ecl_kw_get_size(ecl_kw)); - fprintf(stderr," ** MINPV / MINPVV problem?? \n"); - util_abort("%s: Aborting \n",__func__ ); - } - - ecl_util_memcpy_typed_data(field->data , ecl_kw_get_void_ptr(ecl_kw) , field_type , kw_type , ecl_kw_get_size(ecl_kw)); -} - - - -/*****************************************************************/ - -bool field_fload_rms(field_type * field , const char * filename, bool keep_inactive) { - { - FILE * stream = util_fopen__( filename , "r"); - if (!stream) - return false; - - fclose( stream ); - } - - { - const char * key = field_config_get_ecl_kw_name(field->config); - ecl_type_enum ecl_type; - rms_file_type * rms_file = rms_file_alloc(filename , false); - rms_tagkey_type * data_tag; - if (field_config_enkf_mode(field->config)) - data_tag = rms_file_fread_alloc_data_tagkey(rms_file , "parameter" , "name" , key); - else { - /** - Setting the key - purely to support converting between - different types of files, without knowing the key. A usable - feature - but not really well defined. - */ - - rms_tag_type * rms_tag = rms_file_fread_alloc_tag(rms_file , "parameter" , NULL , NULL); - const char * parameter_name = rms_tag_get_namekey_name(rms_tag); - field_config_set_key( (field_config_type *) field->config , parameter_name ); - data_tag = rms_tagkey_copyc( rms_tag_get_key(rms_tag , "data") ); - rms_tag_free(rms_tag); - } - - ecl_type = rms_tagkey_get_ecl_type(data_tag); - if (rms_tagkey_get_size(data_tag) != field_config_get_volume(field->config)) - util_abort("%s: trying to import rms_data_tag from:%s with wrong size - aborting \n",__func__ , filename); - - field_import3D(field , rms_tagkey_get_data_ref(data_tag) , true , keep_inactive, ecl_type); - rms_tagkey_free(data_tag); - rms_file_free(rms_file); - } - return true; -} - - - -static bool field_fload_ecl_kw(field_type * field , const char * filename, bool keep_inactive) { - const char * key = field_config_get_ecl_kw_name(field->config); - ecl_kw_type * ecl_kw = NULL; - - { - bool fmt_file; - - if (ecl_util_fmt_file( filename , &fmt_file)) { - fortio_type * fortio = fortio_open_reader(filename , fmt_file , ECL_ENDIAN_FLIP); - if (fortio) { - ecl_kw_fseek_kw(key , true , true , fortio); - ecl_kw = ecl_kw_fread_alloc( fortio ); - fortio_fclose(fortio); - - if (field_config_get_volume(field->config) == ecl_kw_get_size(ecl_kw)) - field_import3D(field , ecl_kw_get_void_ptr(ecl_kw) , false , keep_inactive, ecl_kw_get_type(ecl_kw)); - else - /* Keyword is already packed - e.g. from a restart file. Size is - verified in the _copy function.*/ - field_copy_ecl_kw_data(field , ecl_kw); - - ecl_kw_free(ecl_kw); - return true; - } - } else - util_abort("%s: could not determine formatted/unformatted status of file:%s \n",filename); - } - return false; -} - - - -/* No type translation possible */ -static bool field_fload_ecl_grdecl(field_type * field , const char * filename, bool keep_inactive ) { - const char * key = field_config_get_ecl_kw_name(field->config); - int size = field_config_get_volume(field->config); - ecl_type_enum ecl_type = field_config_get_ecl_type(field->config); - ecl_kw_type * ecl_kw = NULL; - { - FILE * stream = util_fopen__(filename , "r"); - if (stream) { - if (ecl_kw_grdecl_fseek_kw(key , false , stream)) - ecl_kw = ecl_kw_fscanf_alloc_grdecl_data(stream , size , ecl_type); - else - util_exit("%s: Can not locate %s keyword in %s \n",__func__ , key , filename); - fclose(stream); - - field_import3D(field , ecl_kw_get_void_ptr(ecl_kw) , false , keep_inactive, ecl_kw_get_type(ecl_kw)); - ecl_kw_free(ecl_kw); - return true; - } - } - return false; -} - - - - -bool field_fload_typed(field_type * field , const char * filename , field_file_format_type file_type, bool keep_inactive) { - bool loadOK = false; - switch (file_type) { - case(RMS_ROFF_FILE): - loadOK = field_fload_rms(field , filename, keep_inactive ); - break; - case(ECL_KW_FILE): - loadOK = field_fload_ecl_kw(field , filename, keep_inactive ); - break; - case(ECL_GRDECL_FILE): - loadOK = field_fload_ecl_grdecl(field , filename, keep_inactive); - break; - default: - util_abort("%s: file_type:%d not recognized - aborting \n",__func__ , file_type); - } - return loadOK; -} - - -static bool field_fload_custom__(field_type * field , const char * filename , bool keep_inactive) { - if (util_file_readable( filename )) { - field_file_format_type file_type = field_config_guess_file_type( filename ); - if (file_type == UNDEFINED_FORMAT) - file_type = field_config_manual_file_type(filename , true); - - return field_fload_typed(field , filename , file_type, keep_inactive); - } else - return false; -} - - -bool field_fload(field_type * field , const char * filename) { - bool keep_inactive = false; - return field_fload_custom__(field, filename, keep_inactive); -} - - -bool field_fload_keep_inactive(field_type * field , const char * filename) { - bool keep_inactive = true; - return field_fload_custom__(field , filename , keep_inactive); -} - - -bool field_fload_auto(field_type * field , const char * filename, bool keep_inactive ) { - field_file_format_type file_type = field_config_guess_file_type(filename); - return field_fload_typed(field , filename , file_type, keep_inactive); -} - - - -/** - This function compares two fields, and return true if they are - equal. Observe that the config comparison is done with plain - pointer comparison, i.e. the actual content of the config objects - is not compared. If the two fields point to different config - objects, the comparision will fail immediately - without checking the - content of the fields. -*/ - -bool field_cmp(const field_type * f1 , const field_type * f2) { - if (f1->config != f2->config) { - fprintf(stderr,"The two fields have different config objects - and the comparison fails trivially.\n"); - return false; - } else { - const int byte_size = field_config_get_byte_size(f1->config); - if (memcmp( f1->data , f2->data , byte_size) != 0) - return false; - else - return true; - } -} - - -/*****************************************************************/ - - - - -/** - This function loads a field from a complete forward run. The - original implementation is to load e.g. pressure and saturations - from a block of restart data. Current implementation can only - handle that, but in principle other possibilities should be - possible. - - Observe that forward_load loads from a (already loaded) restart_block, - and not from a file. -*/ - - -static bool field_forward_load(field_type * field , - const char * ecl_file_name , - const forward_load_context_type * load_context) { - bool keep_inactive = false; - bool loadOK = true; - field_file_format_type import_format = field_config_get_import_format(field->config); - - if (import_format == ECL_FILE) { - const ecl_file_type * restart_file = forward_load_context_get_restart_file( load_context ); - if (restart_file != NULL) { - ecl_kw_type * field_kw = ecl_file_iget_named_kw(restart_file , field_config_get_ecl_kw_name(field->config) , 0); - field_copy_ecl_kw_data(field , field_kw); - } else - loadOK = false; - //util_abort("%s: fatal error when loading: %s - no restart information has been loaded \n",__func__ , field_config_get_key( field->config )); - } else - /* Loading from unique file - currently this only applies to the modelerror implementation. */ - field_fload_typed(field , ecl_file_name , import_format, keep_inactive); - - - if (loadOK) { - field_func_type * input_transform = field_config_get_input_transform(field->config); - /* The input transform is done in-place. */ - if (input_transform != NULL) - field_apply(field , input_transform); - - } - return loadOK; -} - - - -void field_get_dims(const field_type * field, int *nx, int *ny , int *nz) { - field_config_get_dims(field->config , nx , ny ,nz); -} - - - - - - - - -void field_iadd(field_type * field1, const field_type * field2) { - field_config_assert_binary(field1->config , field2->config , __func__); - { - const int data_size = field_config_get_data_size( field1->config ); - const ecl_type_enum ecl_type = field_config_get_ecl_type( field1->config ); - int i; - - if (ecl_type == ECL_FLOAT_TYPE) { - float * data1 = (float *) field1->data; - const float * data2 = (const float *) field2->data; - for (i = 0; i < data_size; i++) - data1[i] += data2[i]; - } else if (ecl_type == ECL_DOUBLE_TYPE) { - double * data1 = (double *) field1->data; - const double * data2 = (const double *) field2->data; - for (i = 0; i < data_size; i++) - data1[i] += data2[i]; - } - } -} - - -void field_imul(field_type * field1, const field_type * field2) { - field_config_assert_binary(field1->config , field2->config , __func__); - { - const int data_size = field_config_get_data_size(field1->config ); - const ecl_type_enum ecl_type = field_config_get_ecl_type(field1->config); - int i; - - if (ecl_type == ECL_FLOAT_TYPE) { - float * data1 = (float *) field1->data; - const float * data2 = (const float *) field2->data; - for (i = 0; i < data_size; i++) - data1[i] *= data2[i]; - } else if (ecl_type == ECL_DOUBLE_TYPE) { - double * data1 = (double *) field1->data; - const double * data2 = (const double *) field2->data; - for (i = 0; i < data_size; i++) - data1[i] *= data2[i]; - } - } -} - - -void field_iaddsqr(field_type * field1, const field_type * field2) { - field_config_assert_binary(field1->config , field2->config , __func__); - { - const int data_size = field_config_get_data_size(field1->config ); - const ecl_type_enum ecl_type = field_config_get_ecl_type(field1->config); - int i; - - if (ecl_type == ECL_FLOAT_TYPE) { - float * data1 = (float *) field1->data; - const float * data2 = (const float *) field2->data; - for (i = 0; i < data_size; i++) - data1[i] += data2[i] * data2[i]; - } else if (ecl_type == ECL_DOUBLE_TYPE) { - double * data1 = (double *) field1->data; - const double * data2 = (const double *) field2->data; - for (i = 0; i < data_size; i++) - data1[i] += data2[i] * data2[i]; - } - } -} - - -void field_scale(field_type * field, double scale_factor) { - field_config_assert_unary(field->config, __func__); - { - const int data_size = field_config_get_data_size(field->config ); - const ecl_type_enum ecl_type = field_config_get_ecl_type(field->config); - int i; - - if (ecl_type == ECL_FLOAT_TYPE) { - float * data = (float *) field->data; - for (i = 0; i < data_size; i++) - data[i] *= scale_factor; - } else if (ecl_type == ECL_DOUBLE_TYPE) { - double * data = (double *) field->data; - for (i = 0; i < data_size; i++) - data[i] *= scale_factor; - } - } -} - - -static inline float __sqr(float x) { return x*x; } - -void field_isqr(field_type * field) { - field_apply(field , __sqr); -} - - -void field_isqrt(field_type * field) { - field_apply(field , sqrtf); -} - -void field_imul_add(field_type * field1 , double factor , const field_type * field2) { - field_config_assert_binary(field1->config , field2->config , __func__); - { - const int data_size = field_config_get_data_size(field1->config ); - const ecl_type_enum ecl_type = field_config_get_ecl_type(field1->config); - int i; - - if (ecl_type == ECL_FLOAT_TYPE) { - float * data1 = (float *) field1->data; - const float * data2 = (const float *) field2->data; - for (i = 0; i < data_size; i++) - data1[i] += factor * data2[i]; - } else if (ecl_type == ECL_DOUBLE_TYPE) { - double * data1 = (double *) field1->data; - const double * data2 = (const double *) field2->data; - for (i = 0; i < data_size; i++) - data1[i] += factor * data2[i]; - } - } -} - - -void field_update_sum(field_type * sum , field_type * field , double lower_limit , double upper_limit) { - field_output_transform( field ); - { - const int data_size = field_config_get_data_size(field->config ); - const ecl_type_enum ecl_type = field_config_get_ecl_type(field->config); - int i; - - if (ecl_type == ECL_FLOAT_TYPE) { - float * data = (float *) field->data; - float * sum_data = (float *) sum->data; - for (i = 0; i < data_size; i++) { - if (data[i] >= lower_limit) - if (data[i] < upper_limit) - sum_data[i] += 1; - } - } else if (ecl_type == ECL_DOUBLE_TYPE) { - double * data = (double *) field->data; - double * sum_data = (double *) sum->data; - for (i = 0; i < data_size; i++) { - if (data[i] >= lower_limit) - if (data[i] < upper_limit) - sum_data[i] += 1; - } - } - } - field_revert_output_transform( field ); -} - - - -/** - Here, index_key is i a tree digit string with the i, j and k indicies of - the requested block separated by comma. E.g., 1,1,1. - - The string is supposed to contain indices in the range [1...nx] , - [1..ny] , [1...nz], they are immediately converted to C-based zero - offset indices. -*/ -bool field_user_get(const field_type * field, const char * index_key, int report_step , double * value) -{ - const bool internal_value = false; - bool valid; - int i,j,k; - int parse_user_key = field_config_parse_user_key(field->config , index_key , &i, &j , &k); - - - if (parse_user_key == 0) { - int active_index = field_config_active_index(field->config , i,j,k); - *value = field_iget_double(field, active_index); - valid = true; - } else { - if (parse_user_key == 1) - fprintf(stderr,"Failed to parse \"%s\" as three integers \n",index_key); - else if (parse_user_key == 2) - fprintf(stderr," ijk: %d , %d, %d is invalid \n",i+1 , j + 1 , k + 1); - else if (parse_user_key == 3) - fprintf(stderr," ijk: %d , %d, %d is an inactive cell. \n",i+1 , j + 1 , k + 1); - else - util_abort("%s: internal error -invalid value:%d \n",__func__ , parse_user_key); - *value = 0.0; - valid = false; - } - - if (!internal_value && valid) { - field_func_type * output_transform = field_config_get_output_transform(field->config); - if (output_transform != NULL) - *value = output_transform( *value ); - /* Truncation - ignored for now */ - } - return valid; -} - - - -#define INFLATE(inf,std,min) \ -{ \ - for (int i=0; i < data_size; i++) { \ - if (std_data[i] > 0) \ - inflation_data[i] = util_float_max( 1.0 , min_std_data[i] / std_data[i]); \ - else \ - inflation_data[i] = 1.0; \ - } \ -} - - -void field_set_inflation(field_type * inflation , const field_type * std , const field_type * min_std) { - const field_config_type * config = inflation->config; - ecl_type_enum ecl_type = field_config_get_ecl_type( config ); - const int data_size = field_config_get_data_size( config ); - - if (ecl_type == ECL_FLOAT_TYPE) { - float * inflation_data = (float *) inflation->data; - const float * std_data = (const float *) std->data; - const float * min_std_data = (const float *) min_std->data; - - INFLATE(inflation_data , std_data , min_std_data ); - - } else if (ecl_type == ECL_DOUBLE_TYPE) { - double * inflation_data = (double *) inflation->data; - const double * std_data = (const double *) std->data; - const double * min_std_data = (const double *) min_std->data; - - INFLATE(inflation_data , std_data , min_std_data ); - } -} -#undef INFLATE - - - -/******************************************************************/ -/* Anonumously generated functions used by the enkf_node object */ -/******************************************************************/ - -/* - These two functions assume float/double storage; will not work with - field which is internally based on char *. - - MATH_OPS(field) -*/ -UTIL_SAFE_CAST_FUNCTION(field , FIELD) -UTIL_SAFE_CAST_FUNCTION_CONST(field , FIELD) -UTIL_IS_INSTANCE_FUNCTION(field , FIELD) -VOID_ALLOC(field) -VOID_FREE(field) -VOID_ECL_WRITE (field) -VOID_FORWARD_LOAD(field) -VOID_COPY (field) -VOID_INITIALIZE(field); -VOID_USER_GET(field) -VOID_READ_FROM_BUFFER(field) -VOID_WRITE_TO_BUFFER(field) -VOID_CLEAR(field) -VOID_SERIALIZE(field) -VOID_DESERIALIZE(field) -VOID_SET_INFLATION(field) -VOID_IADD(field) -VOID_SCALE(field) -VOID_IADDSQR(field) -VOID_IMUL(field) -VOID_ISQRT(field) -VOID_FLOAD(field) diff --git a/ThirdParty/Ert/libenkf/src/field_config.c b/ThirdParty/Ert/libenkf/src/field_config.c deleted file mode 100644 index 70ca4244a2..0000000000 --- a/ThirdParty/Ert/libenkf/src/field_config.c +++ /dev/null @@ -1,1047 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'field_config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include - -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -/** - About transformations and truncations - ------------------------------------- - - The values of the fields data can be automagically manipulated through two methods: - - * You can specify a min and a max value which will serve as truncation. - - * You can specify transformation functions which are applied to the field as follows: - - init_transform: This function is applied to the field when the - field is loaded the first time, i.e. initialized. It is *NOT* - applied under subsequent loads of dynamic fields during the - execution. - - output_transform: This function is applied to the field before it - is exported to eclipse. - - input_transform: This function is applied each time a field is - loaded in from the forward model; i.e. this transformation - applies to dynamic fields. - - - - _______________________________ ___ - / \ /|\ - | Forward model (i.e. ECLIPSE) | | - | generates dynamic fields like | | - | PRESSURE and SATURATIONS | | - \_______________________________/ | This code is run - | | every time a field - | | is loaded FROM the - \|/ | forward model into - | | EnKF. - ________|_________ | - / \ | - | Input transform | | - \__________________/ | - | | - | | - \|/ | - | | - ________________|__________________ _\|/_ -_______________ ___________ / \ - \ / \ | The internal representation | - Geo Modelling | | init- | | of the field. This (should) | - creates a |==>===============>==| transform |===>===| be a normally distributed | - realization | | | | variable suitable for updates | -_______________/ \___________/ | with EnKF. | - \___________________________________/ ___ -|<---- This path is ONLY executed during INIT ------->| | /|\ - Observe that there is no truncation \|/ | - on load. _________|__________ | - / \ | This code is run - | Output transform | | every time a field - \____________________/ | is exported from - | | enkf to the forward - \|/ | model - i.e. ECLIPSE. - _________|__________ | - / \ | - | Truncate min/max | | - \____________________/ | - | | - \|/ | - _________|__________ | - / \ | - | FORWARD MODEL | | - \____________________/ _\|/_ - - - - - - -*/ - -/*Observe the following convention: - - global_index: [0 , nx*ny*nz) - active_index: [0 , nactive) -*/ - -#define FIELD_CONFIG_ID 78269 - -struct field_config_struct { - UTIL_TYPE_ID_DECLARATION; - - char * ecl_kw_name; /* Name/key ... */ - int data_size , nx,ny,nz; /* The number of elements in the three directions. */ - bool keep_inactive_cells; /* Whether the data contains only active cells or active and inactive cells */ - ecl_grid_type * grid; /* A shared reference to the grid this field is defined on. */ - bool private_grid; - - int truncation; /* How the field should be trunacted before exporting for simulation, and for the inital import. OR'd combination of truncation_type from enkf_types.h*/ - double min_value; /* The min value used in truncation. */ - double max_value; /* The maximum value used in truncation. */ - - field_file_format_type export_format; - field_file_format_type import_format; - int sizeof_ctype; - ecl_type_enum internal_ecl_type; - ecl_type_enum export_ecl_type; - bool __enkf_mode; /* See doc of functions field_config_set_key() / field_config_enkf_OFF() */ - bool write_compressed; - - field_type_enum type; - field_type * min_std; - /*****************************************************************/ - field_trans_table_type * trans_table; /* Internalize a (pointer to) a table of the available transformation functions. */ - field_func_type * output_transform; /* Function to apply to the data before they are exported - NULL: no transform. */ - field_func_type * init_transform; /* Function to apply on the data when they are loaded the first time - i.e. initialized. NULL : no transform*/ - field_func_type * input_transform; /* Function to apply on the data when they are loaded from the forward model - i.e. for dynamic data. */ - - char * output_transform_name; - char * init_transform_name; - char * input_transform_name; -}; - - -UTIL_IS_INSTANCE_FUNCTION(field_config , FIELD_CONFIG_ID) - -/*****************************************************************/ - - -void field_config_set_ecl_kw_name(field_config_type * config , const char * ecl_kw_name) { - config->ecl_kw_name = util_realloc_string_copy(config->ecl_kw_name , ecl_kw_name); -} - - - -void field_config_set_ecl_type(field_config_type * config , ecl_type_enum ecl_type) { - config->internal_ecl_type = ecl_type; - config->sizeof_ctype = ecl_util_get_sizeof_ctype(ecl_type); -} - - - -static const char * field_config_file_type_string(field_file_format_type file_type) { - switch (file_type) { - case(RMS_ROFF_FILE): - return "Binary ROFF file from RMS"; - break; - case(ECL_KW_FILE): - return "ECLIPSE file in restart format"; - break; - case(ECL_KW_FILE_ALL_CELLS): - return "ECLIPSE file in restart format (all cells)"; - break; - case(ECL_KW_FILE_ACTIVE_CELLS): - return "ECLIPSE file in restart format (active cells)"; - break; - case(ECL_GRDECL_FILE): - return "ECLIPSE file in grdecl format"; - break; - default: - fprintf(stderr,"%s: invalid file type \n",__func__); - abort(); - } -} - - - -/** - This function takes a field_file_format_type variable, and returns - a string containing a default extension for files of this type. For - ecl_kw_file it will return NULL, i.e. no default extension. - - rms_roff_file => ROFF - ecl_grdecl_file => GRDECL - ecl_kw_file_xxx => NULL - - It will return UPPERCASE or lowercase depending on the value of the - second argument. -*/ - - -const char * field_config_default_extension(field_file_format_type file_type, bool upper_case) { - if (file_type == RMS_ROFF_FILE) { - if (upper_case) - return "ROFF"; - else - return "roff"; - } else if (file_type == ECL_GRDECL_FILE) { - if (upper_case) - return "GRDECL"; - else - return "grdecl"; - } else - return NULL; -} - - - - -static bool field_config_valid_file_type(field_file_format_type file_type, bool import) { - if (import) { - if (file_type == RMS_ROFF_FILE || file_type == ECL_KW_FILE || file_type == ECL_GRDECL_FILE) - return true; - else - return false; - } else { - if (file_type == RMS_ROFF_FILE || file_type == ECL_KW_FILE_ACTIVE_CELLS || file_type == ECL_KW_FILE_ALL_CELLS || file_type == ECL_GRDECL_FILE) - return true; - else - return false; - } -} - - -field_file_format_type field_config_default_export_format(const char * filename) { - field_file_format_type export_format = FILE_FORMAT_NULL; - if (filename != NULL) { - export_format = ECL_KW_FILE_ALL_CELLS; /* Suitable for PERMX/PORO/... ; when this export format is - used IMPORT must be used in the datafile instead of - INCLUDE. This gives faster ECLIPSE startup time, but is - (unfortunately) quite unstandard. */ - - char * extension; - util_alloc_file_components(filename , NULL,NULL,&extension); - if (extension != NULL) { - util_strupr(extension); - if (strcmp(extension , "GRDECL") == 0) - export_format = ECL_GRDECL_FILE; - else if (strcmp(extension , "ROFF") == 0) - export_format = RMS_ROFF_FILE; - - free(extension); - } - - } - return export_format; -} - - - - - - -/** - This function prompts the user for a file type. - - If the parameter 'import' is true we provide the alternative - ecl_kw_file (in that case the program itself will determine - whether) the file contains all cells (i.e. PERMX) or only active - cells (i.e. pressure). - - If the parameter 'import' is false the user must specify whether we - are considering all cells, or only active cells. -*/ - -field_file_format_type field_config_manual_file_type(const char * prompt , bool import) { - int int_file_type; - printf("\n%s\n",prompt); - printf("----------------------------------------------------------------\n"); - printf(" %3d: %s.\n" , RMS_ROFF_FILE , field_config_file_type_string(RMS_ROFF_FILE)); - if (import) - printf(" %3d: %s.\n" , ECL_KW_FILE , field_config_file_type_string(ECL_KW_FILE)); - else { - printf(" %3d: %s.\n" , ECL_KW_FILE_ACTIVE_CELLS , field_config_file_type_string(ECL_KW_FILE_ACTIVE_CELLS)); - printf(" %3d: %s.\n" , ECL_KW_FILE_ALL_CELLS , field_config_file_type_string(ECL_KW_FILE_ALL_CELLS)); - } - printf(" %3d: %s.\n" , ECL_GRDECL_FILE , field_config_file_type_string(ECL_GRDECL_FILE)); - printf("----------------------------------------------------------------\n"); - do { - int_file_type = util_scanf_int("" , 2); - if (!field_config_valid_file_type(int_file_type, import)) - int_file_type = UNDEFINED_FORMAT; - } while(int_file_type == UNDEFINED_FORMAT); - return int_file_type; -} - - - - -/** -This function takes in a filename and tries to guess the type of the -file. It can determine the following three types of files: - - ecl_kw_file: This is a file containg ecl_kw instances in the form found - in eclipse restart files. - - rms_roff_file: An rms roff file - obviously. - - ecl_grdecl_file: This is a file containing a parameter of the form - found in eclipse grid declaration files, i.e. formatted, one - keyword and all elements (active and not). - - The latter test is the weakest. Observe that the function will - happily return unkown_file if none of these types are recognized, - i.e. it is *essential* to check the return value. - -*/ -field_file_format_type field_config_guess_file_type(const char * filename ) { - bool fmt_file = util_fmt_bit8(filename ); - FILE * stream = util_fopen(filename , "r"); - fortio_type * fortio = fortio_alloc_FILE_wrapper(NULL , ECL_ENDIAN_FLIP , fmt_file , false , stream); - field_file_format_type file_type; - - if (ecl_kw_is_kw_file(fortio)) - file_type = ECL_KW_FILE; - else if (rms_file_is_roff(stream)) - file_type = RMS_ROFF_FILE; - else if (ecl_kw_is_grdecl_file(stream)) /* This is the weakest test - and should be last in a cascading if / else hierarchy. */ - file_type = ECL_GRDECL_FILE; - else - file_type = UNDEFINED_FORMAT; /* MUST Check on this return value */ - - fortio_free_FILE_wrapper( fortio ); - fclose(stream); - return file_type; -} - - - -field_type * field_config_get_min_std( const field_config_type * field_config ) { - return field_config->min_std; -} - - -field_file_format_type field_config_get_export_format(const field_config_type * field_config) { - return field_config->export_format; -} - -field_file_format_type field_config_get_import_format(const field_config_type * field_config) { - return field_config->import_format; -} - -/** - Will return the name of the init_transform function, or NULL if no - init_transform function has been registered. -*/ - - -const char * field_config_get_init_transform_name( const field_config_type * field_config ) { - return field_config->init_transform_name; -} - -const char * field_config_get_input_transform_name( const field_config_type * field_config ) { - return field_config->input_transform_name; -} - -const char * field_config_get_output_transform_name( const field_config_type * field_config ) { - return field_config->output_transform_name; -} - - -/** - IFF the @private_grid parameter is true, the field_config instance - will take ownership of grid, i.e. freeing it in - field_config_free(). - - The field_config object exports a field_config_set_grid() function, - but that is actually quite misleading. If this function is called - during a run there are many other dependencies which must also be - updated, which are not handled. -*/ - - -void field_config_set_grid(field_config_type * config, ecl_grid_type * grid , bool private_grid) { - if ((config->private_grid) && (config->grid != NULL)) - ecl_grid_free( config->grid ); - - config->grid = grid; - config->private_grid = private_grid; - - ecl_grid_get_dims(grid , &config->nx , &config->ny , &config->nz , NULL); - config->data_size = field_config_get_data_size_from_grid(config); -} - - - - -const char * field_config_get_grid_name( const field_config_type * config) { - return ecl_grid_get_name( config->grid ); -} - - - -/* - The return value from this function is hardly usable. -*/ -field_config_type * field_config_alloc_empty( const char * ecl_kw_name , ecl_grid_type * ecl_grid , field_trans_table_type * trans_table, bool keep_inactive_cells ) { - - field_config_type * config = util_malloc(sizeof *config); - UTIL_TYPE_ID_INIT( config , FIELD_CONFIG_ID); - - config->keep_inactive_cells = keep_inactive_cells; - config->ecl_kw_name = util_alloc_string_copy( ecl_kw_name ); - config->private_grid = false; - config->__enkf_mode = true; - config->grid = NULL; - config->write_compressed = true; - - config->output_transform = NULL; - config->input_transform = NULL; - config->init_transform = NULL; - config->output_transform_name = NULL; - config->input_transform_name = NULL; - config->init_transform_name = NULL; - - config->truncation = TRUNCATE_NONE; - config->min_std = NULL; - config->trans_table = trans_table; - - field_config_set_grid(config , ecl_grid , false); /* The grid is (currently) set on allocation and can NOT be updated afterwards. */ - field_config_set_ecl_type( config , ECL_FLOAT_TYPE ); /* This is the internal type - currently not exported any API to change it. */ - return config; -} - - - - -static void field_config_set_init_transform( field_config_type * config , const char * __init_transform_name ) { - const char * init_transform_name = NULL; - if (field_trans_table_has_key( config->trans_table , __init_transform_name)) - init_transform_name = __init_transform_name; - else if (__init_transform_name != NULL) { - fprintf(stderr , "Sorry: the field transformation function:%s is not recognized \n\n",__init_transform_name); - field_trans_table_fprintf(config->trans_table , stderr); - util_exit("Exiting ... \n"); - } - - config->init_transform_name = util_realloc_string_copy( config->init_transform_name , init_transform_name ); - if (init_transform_name != NULL) - config->init_transform = field_trans_table_lookup( config->trans_table , init_transform_name); - else - config->init_transform = NULL; -} - - -static void field_config_set_output_transform( field_config_type * config , const char * __output_transform_name ) { - const char * output_transform_name = NULL; - if (field_trans_table_has_key( config->trans_table , __output_transform_name)) - output_transform_name = __output_transform_name; - else if (__output_transform_name) { - fprintf(stderr , "Sorry: the field transformation function:%s is not recognized \n\n",__output_transform_name); - field_trans_table_fprintf(config->trans_table , stderr); - util_exit("Exiting ... \n"); - } - - config->output_transform_name = util_realloc_string_copy( config->output_transform_name , output_transform_name ); - if (output_transform_name != NULL) - config->output_transform = field_trans_table_lookup( config->trans_table , output_transform_name); - else - config->output_transform = NULL; -} - - -static void field_config_set_input_transform( field_config_type * config , const char * __input_transform_name ) { - const char * input_transform_name = NULL; - if (field_trans_table_has_key( config->trans_table , __input_transform_name)) - input_transform_name = __input_transform_name; - else if (__input_transform_name != NULL) { - fprintf(stderr , "Sorry: the field transformation function:%s is not recognized \n\n",__input_transform_name); - field_trans_table_fprintf(config->trans_table , stderr); - util_exit("Exiting ... \n"); - } - - - config->input_transform_name = util_realloc_string_copy( config->input_transform_name , input_transform_name ); - if (input_transform_name != NULL) - config->input_transform = field_trans_table_lookup( config->trans_table , input_transform_name); - else - config->input_transform = NULL; -} - - - -void field_config_update_state_field( field_config_type * config, int truncation, double min_value , double max_value) { - field_config_set_truncation( config ,truncation , min_value , max_value ); - config->type = ECLIPSE_RESTART; - - /* Setting all the defaults for state_fields, i.e. PRESSURE / SGAS / SWAT ... */ - config->import_format = ECL_FILE; - config->export_format = ECL_FILE; - - field_config_set_output_transform( config , NULL ); - field_config_set_input_transform( config , NULL ); - field_config_set_init_transform( config , NULL ); -} - - - - -void field_config_update_parameter_field( field_config_type * config , int truncation, double min_value , double max_value, - field_file_format_type export_format , /* This can be guessed with the field_config_default_export_format( ecl_file ) function. */ - const char * init_transform , const char * output_transform ) { - field_config_set_truncation( config , truncation , min_value , max_value ); - config->type = ECLIPSE_PARAMETER; - - config->export_format = export_format; - config->import_format = UNDEFINED_FORMAT; /* Guess from filename when loading. */ - - config->input_transform = NULL; - - field_config_set_input_transform( config , NULL ); - field_config_set_init_transform( config , init_transform ); - field_config_set_output_transform( config , output_transform ); -} - - -void field_config_update_general_field( field_config_type * config , int truncation, double min_value , double max_value, - field_file_format_type export_format , /* This can be guessed with the field_config_default_export_format( ecl_file ) function. */ - const char * init_transform , - const char * input_transform , - const char * output_transform ) { - field_config_set_truncation( config , truncation , min_value , max_value ); - config->type = GENERAL; - - config->export_format = export_format; - config->import_format = UNDEFINED_FORMAT; /* Guess from filename when loading. */ - - field_config_set_input_transform( config , input_transform ); - field_config_set_init_transform( config , init_transform ); - field_config_set_output_transform( config , output_transform ); -} - - -/** - Requirements: - - ECLIPSE_PARAMETER: export_format != UNDEFINED_FORMAT - - ECLIPSE_RESTART : Validation can be finalized at the enkf_config_node level. - - GENERAL : export_format != UNDEFINED_FORMAT -*/ - -bool field_config_is_valid( const field_config_type * field_config ) { - bool valid = true; - - switch( field_config->type ) { - case ECLIPSE_PARAMETER: - if (field_config->export_format == UNDEFINED_FORMAT) - valid = false; - break; - case ECLIPSE_RESTART: - break; - case GENERAL: - if (field_config->export_format == UNDEFINED_FORMAT) - valid = false; - break; - default: - util_abort("%s: internal fuckup \n",__func__); - } - return valid; - -} - - -field_type_enum field_config_get_type( const field_config_type * config) { - return config->type; -} - - -/* - Observe that the indices are zero-based, in contrast to those used - by eclipse which are based on one. - - This function will return an index in the interval: [0...nactive), - and -1 if i,j,k correspond to an inactive cell. -*/ - - -inline int field_config_active_index(const field_config_type * config , int i , int j , int k) { - return ecl_grid_get_active_index3( config->grid , i,j,k); -} - -inline int field_config_global_index(const field_config_type * config, int i, int j, int k) { - return ecl_grid_get_global_index3( config->grid , i,j,k); -} - - -/** - This function checks that i,j,k are in the intervals [0..nx), - [0..ny) and [0..nz). It does *NOT* check if the corresponding - index is active. -*/ - -bool field_config_ijk_valid(const field_config_type * config , int i , int j , int k) { - return ecl_grid_ijk_valid(config->grid , i,j,k); -} - - -/** - This function checks that i,j,k are in the intervals [0..nx), - [0..ny) and [0..nz) AND that the corresponding cell is active. If - the function returns false it is impossible to differentiate - between (i,j,k) values which are out of bounds and an inactive - cell. -*/ - -bool field_config_ijk_active(const field_config_type * config , int i , int j , int k) { - if (ecl_grid_ijk_valid(config->grid , i,j,k)) { - int active_index = ecl_grid_get_active_index3( config->grid , i , j , k); - - if (active_index >= 0) - return true; - else - return false; - } else - return false; -} - - - - -void field_config_get_ijk( const field_config_type * config , int active_index , int *i , int * j , int * k) { - ecl_grid_get_ijk1A( config->grid , active_index , i,j,k); -} - - -bool field_config_write_compressed(const field_config_type * config) { return config->write_compressed; } - - - -void field_config_set_truncation(field_config_type * config , int truncation, double min_value, double max_value) { - config->truncation = truncation; - config->min_value = min_value; - config->max_value = max_value; -} - - - - -int field_config_get_truncation_mode(const field_config_type * config ) { - return config->truncation; -} - -double field_config_get_truncation_min( const field_config_type * config ) { - return config->min_value; -} - -double field_config_get_truncation_max( const field_config_type * config ) { - return config->max_value; -} - - - -void field_config_free(field_config_type * config) { - util_safe_free(config->ecl_kw_name); - util_safe_free(config->input_transform_name); - util_safe_free(config->output_transform_name); - util_safe_free(config->init_transform_name); - if ((config->private_grid) && (config->grid != NULL)) ecl_grid_free( config->grid ); - free(config); -} - - - -int field_config_get_volume(const field_config_type * config) { - return config->nx * config->ny * config->nz; -} - - - -rms_type_enum field_config_get_rms_type(const field_config_type * config) { - return rms_util_convert_ecl_type(config->internal_ecl_type); -} - - - -ecl_type_enum field_config_get_ecl_type(const field_config_type * config) { - return config->internal_ecl_type; -} - - - -int field_config_get_data_size_from_grid(const field_config_type * config) { - return config->keep_inactive_cells ? ecl_grid_get_global_size(config->grid) : ecl_grid_get_active_size(config->grid); -} - -int field_config_get_byte_size(const field_config_type * config) { - int num_cells = field_config_get_data_size_from_grid(config); - return num_cells * config->sizeof_ctype; -} - - -int field_config_get_sizeof_ctype(const field_config_type * config) { return config->sizeof_ctype; } - - - -/** - Returns true / false whether a cell is active. -*/ -bool field_config_active_cell(const field_config_type * config , int i , int j , int k) { - int active_index = field_config_active_index(config , i,j,k); - if (active_index >= 0) - return true; - else - return false; -} - - - - void field_config_get_dims(const field_config_type * config , int *nx , int *ny , int *nz) { - *nx = config->nx; - *ny = config->ny; - *nz = config->nz; -} - - -int field_config_get_nx(const field_config_type * config ) { - return config->nx; -} - -int field_config_get_ny(const field_config_type * config ) { - return config->ny; -} - -int field_config_get_nz(const field_config_type * config ) { - return config->nz; -} - - - - - -/** - This function reads a string with i,j,k from the user. All - characters in the constant sep_set are allowed to separate the - integers. The function will loop until: - - * Three integers have been succesfully parsed. - * All numbers are in the (1-nx,1-ny,1-nz) intervals. - * IFF active_only - only active cells wll be allowed. - - i,j,k and global_index are returned by reference. All pointers can - be NULL, if you are not interested. An invald global_index is - returned as -1 (if active_only == false). - - Observe that the user is expected to enter numbers in the interval - [1..nx],[1..ny],[1..nz], but internaly they are immediately - converted to zero offset. -*/ - - -void field_config_scanf_ijk(const field_config_type * config , bool active_only , const char * _prompt , int prompt_len , int *_i , int *_j , int *_k , int * _global_index) { - const char * sep_set = " ,.:"; - char * prompt = util_alloc_sprintf("%s (%d,%d,%d)" , _prompt , config->nx , config->ny , config->nz); - bool OK; - int i,j,k,global_index; - global_index = -1; /* Keep the compiler happy. */ - - do { - char *input; - const char *current_ptr; - util_printf_prompt(prompt , prompt_len , '=' , "=> "); - input = util_alloc_stdin_line(); - - - i = -1; - j = -1; - k = -1; - - OK = true; - current_ptr = input; - current_ptr = util_parse_int(current_ptr , &i , &OK); - current_ptr = util_skip_sep(current_ptr , sep_set , &OK); - current_ptr = util_parse_int(current_ptr , &j , &OK); - current_ptr = util_skip_sep(current_ptr , sep_set , &OK); - current_ptr = util_parse_int(current_ptr , &k , &OK); - if (OK) - if (current_ptr[0] != '\0') OK = false; /* There was something more at the end */ - - /* Now we have three valid integers. */ - - if (OK) { - if (i <= 0 || i > config->nx) OK = false; - if (j <= 0 || j > config->ny) OK = false; - if (k <= 0 || k > config->nz) OK = false; - i--; j--; k--; - } - /* Now we have three integers in the right interval. */ - - - if (OK) { - global_index = field_config_active_index(config , i,j,k); - if (active_only) { - if (global_index < 0) { - OK = false; - printf("Sorry the point: (%d,%d,%d) corresponds to an inactive cell\n" , i + 1 , j+ 1 , k + 1); - } - } - } - free(input); - } while (!OK); - - if (_i != NULL) *_i = i; - if (_j != NULL) *_j = j; - if (_k != NULL) *_k = k; - if (_global_index != NULL) *_global_index = global_index; - - free(prompt); -} - - - - -/** - The field_config and field objects are mainly written for use in - the enkf application. In that setting a field instance is *NOT* - allowed to write on it's field_config object. - - However, when used in a stand-alone application, i.e. in the - field_convert program, it is desirable for the field object to be - allowed to write to / update the field_config object. In an attempt - to make this reasonably safe you must first call - field_config_enkf_OFF() to signal that you know what you are doing. - - After you have called field_config_enkf_OFF() you can subsequently - call field_config_set_key() to change the key of the field_config - object. This will typically be interesting when an unknown file is - loaded. - - Currently only the roff loader supports set operations on the - key. Also it is essential to observe that this will break **HARD** - is the file contains several parameters - so maybe this whole thing - is stupid? -*/ - - -void field_config_set_key(field_config_type * config , const char *key) { - if (config->__enkf_mode) - util_abort("%s: internal error - must call field_config_enkf_OFF() prior to calling: %s()\n",__func__ , __func__); - /* - Should be locked to protect against concurrent access. - */ - config->ecl_kw_name = util_realloc_string_copy(config->ecl_kw_name , key); -} - -const char * field_config_get_key(const field_config_type * field_config) { - return field_config->ecl_kw_name; -} - -bool field_config_keep_inactive_cells(const field_config_type * config) { - return config->keep_inactive_cells; -} - -void field_config_enkf_OFF(field_config_type * config) { - if (config->__enkf_mode) - fprintf(stderr , "** Warning: turning off EnKF mode for field:%s - you better know what you are doing! **\n",config->ecl_kw_name); - config->__enkf_mode = false; -} - - -bool field_config_enkf_mode(const field_config_type * config) { return config->__enkf_mode; } - - -field_func_type * field_config_get_output_transform(const field_config_type * config) { - return config->output_transform; -} - -field_func_type * field_config_get_input_transform(const field_config_type * config) { - return config->input_transform; -} - -field_func_type * field_config_get_init_transform(const field_config_type * config) { - return config->init_transform; -} - - -/* - This function asserts that a unary function can be applied - to the field - i.e. that the underlying data_type is ecl_float or ecl_double. -*/ -void field_config_assert_unary( const field_config_type * field_config , const char * caller) { - const ecl_type_enum ecl_type = field_config_get_ecl_type(field_config); - if (ecl_type == ECL_FLOAT_TYPE || ecl_type == ECL_DOUBLE_TYPE) - return; - else - util_abort("%s: error in:%s unary functions can only be applied on fields of type ecl_float / ecl_double \n",__func__ , caller); -} - - -/* - Asserts that two fields can be combined in a binary operation. -*/ -void field_config_assert_binary( const field_config_type * config1 , const field_config_type * config2 , const char * caller) { - field_config_assert_unary(config1 , caller); - const ecl_type_enum ecl_type1 = config1->internal_ecl_type; - const ecl_type_enum ecl_type2 = config2->internal_ecl_type; - const int size1 = config1->data_size; - const int size2 = config2->data_size; - - if ((ecl_type1 == ecl_type2) && (size1 == size2)) - return; - else - util_abort("%s: fields not equal enough - failure in:%s \n",__func__ , caller); -} - - - - - - -/** - Parses a string of the type "1,5,6", and returns the indices i,j,k - by reference. The return value of the function as a whole is - whether the string constitutes a valid cell: - - 0: All is OK. - 1: The string could not pe parsed to three valid integers. - 2: ijk are not in the grid. - 3: ijk correspond to an inactive cell. - - In cases 2 & 3 the i,j,k are valid (in the string-parsing sense). - The input string is assumed to have offset one, and the return - values (by reference) are offset zero. -*/ - - -bool field_config_parse_user_key__( const char * index_key , int *i , int *j , int *k) { - int length; - { - int_vector_type * indices = string_util_alloc_value_list( index_key ); - length = int_vector_size( indices ); - - if (length == 3) { - *i = int_vector_iget( indices , 0) - 1; - *j = int_vector_iget( indices , 1) - 1; - *k = int_vector_iget( indices , 2) - 1; - } - - int_vector_free( indices ); - } - if (length == 3) - return true; - else - return false; -} - - - -int field_config_parse_user_key(const field_config_type * config, const char * index_key , int *i , int *j , int *k) { - int return_value = 0; - - if (field_config_parse_user_key__( index_key , i , j , k)) { - if(field_config_ijk_valid(config, *i, *j, *k)) { - int active_index = field_config_active_index(config , *i,*j,*k); - if (active_index < 0) - return_value = 3; /* ijk corresponds to an inactive cell. */ - } else - return_value = 2; /* ijk is outside the grid. */ - } else - return_value = 1; /* Could not be parsed to three integers. */ - - return return_value; -} - - - -ecl_grid_type * field_config_get_grid(const field_config_type * config) { return config->grid; } - - -void field_config_fprintf_config( const field_config_type * config , - enkf_var_type var_type , - const char * outfile , - const char * infile , - const char * min_std_file , - FILE * stream) { - - if (var_type == PARAMETER) { - fprintf( stream , CONFIG_VALUE_FORMAT , PARAMETER_KEY ); - fprintf( stream , CONFIG_VALUE_FORMAT , outfile ); - } else { - if (true) - /* This is an ECLIPSE dynamic field. */ - fprintf( stream , CONFIG_VALUE_FORMAT , DYNAMIC_KEY ); - else { - /* Dynamic fields which are not ECLIPSE solution fields - not really very well supported. */ - fprintf( stream , CONFIG_VALUE_FORMAT , GENERAL_KEY ); - fprintf( stream , CONFIG_VALUE_FORMAT , outfile ); - fprintf( stream , CONFIG_VALUE_FORMAT , infile ); - } - } - - if (config->init_transform != NULL) - fprintf( stream , CONFIG_OPTION_FORMAT , INIT_TRANSFORM_KEY , config->init_transform_name ); - - if (config->output_transform != NULL) - fprintf( stream , CONFIG_OPTION_FORMAT , OUTPUT_TRANSFORM_KEY , config->output_transform_name ); - - if (config->input_transform != NULL) - fprintf( stream , CONFIG_OPTION_FORMAT , INPUT_TRANSFORM_KEY , config->input_transform_name ); - - if (min_std_file != NULL) - fprintf( stream , CONFIG_OPTION_FORMAT , MIN_STD_KEY , min_std_file ); - - if (config->truncation & TRUNCATE_MIN) - fprintf( stream , CONFIG_FLOAT_OPTION_FORMAT , MIN_KEY , config->min_value ); - - if (config->truncation & TRUNCATE_MAX) - fprintf( stream , CONFIG_FLOAT_OPTION_FORMAT , MAX_KEY , config->max_value ); -} - - -/*****************************************************************/ -UTIL_SAFE_CAST_FUNCTION(field_config , FIELD_CONFIG_ID) -UTIL_SAFE_CAST_FUNCTION_CONST(field_config , FIELD_CONFIG_ID) -CONFIG_GET_ECL_KW_NAME(field); -GET_DATA_SIZE(field) -VOID_GET_DATA_SIZE(field) -VOID_FREE(field_config) - - diff --git a/ThirdParty/Ert/libenkf/src/field_convert.c b/ThirdParty/Ert/libenkf/src/field_convert.c deleted file mode 100644 index 6530ea9008..0000000000 --- a/ThirdParty/Ert/libenkf/src/field_convert.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'field_convert.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include - - -void usage(const char * cmd) { - printf("%s: GRID_FILE OUTPATH field1 field2 field3 ....\n",cmd); - exit(1); -} - - -int main(int argc , char ** argv) { - if (argc < 4) usage(argv[0]); - { - const char * grid_file = argv[1]; - const char * out_path = argv[2]; - const char ** file_list = (const char **) &argv[3]; - int num_files = argc - 3; - int ifile; - field_file_format_type file_type; - - ecl_grid_type * ecl_grid = ecl_grid_alloc(grid_file , true); - field_config_type *field_config = field_config_alloc_dynamic("XX" , NULL , NULL , ecl_grid); - field_type * field = field_alloc(field_config); - field_config_enkf_OFF(field_config); - - util_make_path(out_path); - file_type = field_config_manual_file_type("Export files to type: " , false); - printf("num_files:%d \n",num_files); - for (ifile = 0; ifile < num_files; ifile++) { - char * base_name; - char * target_file; - util_alloc_file_components(file_list[ifile] , NULL , &base_name , NULL); - target_file = util_alloc_filename(out_path , base_name , field_config_default_extension(file_type , true)); - field_fload(field , file_list[ifile] , true); - printf("Converting: %s -> %s \n",file_list[ifile] , target_file); - field_export(field , target_file , file_type); - free(target_file); - free(base_name); - } - - - field_free(field); - field_config_free(field_config); - ecl_grid_free(ecl_grid); - } - - -} diff --git a/ThirdParty/Ert/libenkf/src/field_test.c b/ThirdParty/Ert/libenkf/src/field_test.c deleted file mode 100644 index 93fca096c8..0000000000 --- a/ThirdParty/Ert/libenkf/src/field_test.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'field_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - - - -int main (int argc , char **argv) { - const char * config_file = "../../librms/src/Testing/PERMX_%d"; - const char *EGRID_file = "../../librms/src/Testing/GRANE.EGRID"; - int nx , ny , nz , active_size; - - field_config_type * field_config; - field_type * field1 , *field2; - - ecl_grid_type * ecl_grid = ecl_grid_alloc(EGRID_file , true); - ecl_grid_get_dims(ecl_grid , &nx , &ny , &nz , &active_size); - - - field_config = field_config_alloc_parameter("PERMX" , nx , ny , nz , active_size , ecl_grid_get_index_map_ref(ecl_grid) , 0 , load_unique , 1 , (const char **) &config_file); - field1 = field_alloc(field_config); - field2 = field_alloc(field_config); - - field_fload(field1 , "../../librms/src/Testing/PERMX_1" , true); - field_ROFF_export(field1 , "Testing/PERMX_1"); - - field_fload(field2 , "Testing/PERMX_1" , true); - field_ROFF_export(field2 , "Testing/PERMX_2"); - - if (field_cmp(field1 , field2)) - printf("EQUAL\n"); - else - printf("DIFFERENT\n"); - - - field_config_free(field_config); - ecl_grid_free(ecl_grid); -} diff --git a/ThirdParty/Ert/libenkf/src/field_trans.c b/ThirdParty/Ert/libenkf/src/field_trans.c deleted file mode 100644 index 0ce78f84ec..0000000000 --- a/ThirdParty/Ert/libenkf/src/field_trans.c +++ /dev/null @@ -1,289 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'field_trans.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -/* - This file implements a number of functions used for init and output - transformations of fields. The prototype for these functions is very - simple: "one float in - one float out". - - It is mainly implemented in this file, so that it will be easy to - adde new transformation functions without diving into the the full - field / field_config complexity. - - Documentation on how to add a new transformation function is at the - bottom of the file. -*/ -#include -#include -#include - -#include -#include - -#include -/*****************************************************************/ - -struct field_trans_table_struct { - bool case_sensitive; - hash_type * function_table; -}; - - - -typedef struct { - char * key; - char * description; - field_func_type * func; -} field_func_node_type; - -/*****************************************************************/ - -static field_func_node_type * field_func_node_alloc(const char * key , const char * description , field_func_type * func) { - field_func_node_type * node = util_malloc( sizeof * node ); - - node->key = util_alloc_string_copy( key ); - node->description = util_alloc_string_copy( description ); - node->func = func; - - return node; -} - - -static void field_func_node_free(field_func_node_type * node) { - free(node->key); - util_safe_free( node->description ); - free(node); -} - - -static void field_func_node_free__(void * node) { - field_func_node_free( (field_func_node_type *) node); -} - - -static void field_func_node_fprintf(const field_func_node_type * node , FILE * stream) { - if (node->description != NULL) - fprintf(stream , "%16s: %s \n",node->key , node->description); - else - fprintf(stream , "%16s: No description \n",node->key ); -} - - - - - - -/*****************************************************************/ - -void field_trans_table_add(field_trans_table_type * table , const char * _key , const char * description , field_func_type * func) { - char * key; - - if (table->case_sensitive) - key = util_alloc_string_copy( _key ); - else - key = util_alloc_strupr_copy( _key ); - - { - field_func_node_type * node = field_func_node_alloc( key , description , func ); - hash_insert_hash_owned_ref(table->function_table , key , node , field_func_node_free__); - } - free(key); -} - - -void field_trans_table_fprintf(const field_trans_table_type * table , FILE * stream) { - hash_iter_type * iter = hash_iter_alloc(table->function_table); - const char * key = hash_iter_get_next_key(iter); - fprintf(stream,"==========================================================================================\n"); - fprintf(stream,"Available transformations: \n"); - while (key != NULL) { - field_func_node_type * func_node = hash_get(table->function_table , key); - field_func_node_fprintf(func_node , stream); - key = hash_iter_get_next_key(iter); - } - fprintf(stream,"==========================================================================================\n"); - hash_iter_free(iter); -} - - - -/* - This function takes a key input, and returns a pointer to the - corresponding function. The function will fail if the key is not - recognized. -*/ - - -field_func_type * field_trans_table_lookup(field_trans_table_type * table , const char * _key) { - field_func_type * func; - char * key; - - if (table->case_sensitive) - key = util_alloc_string_copy(_key); - else - key = util_alloc_strupr_copy(_key); - - if (hash_has_key(table->function_table , key)) { - field_func_node_type * func_node = hash_get(table->function_table , key); - func = func_node->func; - } else { - fprintf(stderr , "Sorry: the field transformation function:%s is not recognized \n\n",key); - field_trans_table_fprintf(table , stderr); - util_exit("Exiting ... \n"); - func = NULL; /* Compiler shut up. */ - } - free( key ); - return func; -} - - -/** - Will return false if _key == NULL -*/ -bool field_trans_table_has_key(field_trans_table_type * table , const char * _key) { - bool has_key = false; - - if (_key != NULL) { - char * key; - if (table->case_sensitive) - key = util_alloc_string_copy(_key); - else - key = util_alloc_strupr_copy(_key); - - has_key = hash_has_key( table->function_table , key); - free(key); - } - - return has_key; -} - - -void field_trans_table_free(field_trans_table_type * table ) { - hash_free( table->function_table ); - free( table ); -} - - - - -/*****************************************************************/ -/*****************************************************************/ -/* Here comes the actual functions. To add a new function: */ -/* */ -/* 1. Write the function - as a float in - float out. */ -/* 2. Register the function in field_trans_table_alloc(). */ -/* */ -/*****************************************************************/ - -/*****************************************************************/ -/* Rubakumar specials: start */ -#define PERMX_MEAN 100 -#define PERMX_STD 1 - -#define PERMZ_MEAN 100 -#define PERMZ_STD 1 - -#define PORO_MEAN 100 -#define PORO_STD 1 - - -static float normalize(float x , float mean , float std) { - return (x - mean) / std; -} - -static float denormalize(float x , float mean , float std) { - return (x * std) + mean; -} - -static float normalize_permx(float x) { - return normalize(x , PERMX_MEAN , PERMX_STD); -} - -static float denormalize_permx(float x) { - return denormalize(x , PERMX_MEAN , PERMX_STD); -} - -static float normalize_permz(float x) { - return normalize(x , PERMZ_MEAN , PERMZ_STD); -} - -static float denormalize_permz(float x) { - return denormalize(x , PERMZ_MEAN , PERMZ_STD); -} - -static float normalize_poro(float x) { - return normalize(x , PORO_MEAN , PORO_STD); -} - -static float denormalize_poro(float x) { - return denormalize(x , PORO_MEAN , PORO_STD); -} - -/* Rubakumar specials: end */ -/*****************************************************************/ - - -static float field_trans_pow10(float x) { - return powf(10.0 , x); -} - - -static float trunc_pow10f(float x) { - return util_float_max(powf(10.0 , x) , 0.001); -} - -#define LN_SHIFT 0.0000001 -static float field_trans_ln0( float x ) { - return logf( x + LN_SHIFT ); -} - -static float field_trans_exp0( float x ) { - return expf( x ) - LN_SHIFT; -} -#undef LN_SHIFT - - - -field_trans_table_type * field_trans_table_alloc() { - field_trans_table_type * table = util_malloc( sizeof * table); - table->function_table = hash_alloc(); - field_trans_table_add( table , "POW10" , "This function will raise x to the power of 10: y = 10^x." , field_trans_pow10); - field_trans_table_add( table , "TRUNC_POW10" , "This function will raise x to the power of 10 - and truncate lower values at 0.001." , trunc_pow10f); - field_trans_table_add( table , "LOG" , "This function will take the NATURAL logarithm of x: y = ln(x)" , logf); - field_trans_table_add( table , "LN" , "This function will take the NATURAL logarithm of x: y = ln(x)" , logf); - field_trans_table_add( table , "LOG10" , "This function will take the log10 logarithm of x: y = log10(x)" , log10f); - field_trans_table_add( table , "EXP" , "This function will calculate y = exp(x) " , expf); - field_trans_table_add( table , "LN0" , "This function will calculate y = ln(x + 0.000001)" , field_trans_ln0); - field_trans_table_add( table , "EXP0" , "This function will calculate y = exp(x) - 0.000001" , field_trans_exp0); - - //----------------------------------------------------------------- - // Rubakumar specials: - field_trans_table_add( table , "NORMALIZE_PERMX" , "..." , normalize_permx); - field_trans_table_add( table , "DENORMALIZE_PERMX" , "..." , denormalize_permx); - - field_trans_table_add( table , "NORMALIZE_PERMZ" , "..." , normalize_permz); - field_trans_table_add( table , "DENORMALIZE_PERMZ" , "..." , denormalize_permz); - - field_trans_table_add( table , "NORMALIZE_PORO" , "..." , normalize_poro); - field_trans_table_add( table , "DENORMALIZE_PORO" , "..." , denormalize_poro); - //----------------------------------------------------------------- - - table->case_sensitive = false; - return table; -} - diff --git a/ThirdParty/Ert/libenkf/src/forward_load_context.c b/ThirdParty/Ert/libenkf/src/forward_load_context.c deleted file mode 100644 index 7ccf65892a..0000000000 --- a/ThirdParty/Ert/libenkf/src/forward_load_context.c +++ /dev/null @@ -1,269 +0,0 @@ -/* - Copyright (C) 2016 Statoil ASA, Norway. - - The file 'forward_load_context.c.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -#include -#include -#include -#include - - -#define FORWARD_LOAD_CONTEXT_TYPE_ID 644239127 - -struct forward_load_context_struct { - UTIL_TYPE_ID_DECLARATION; - // Everyuthing can be NULL here ... - when created from gen_data. - - ecl_sum_type * ecl_sum; - ecl_file_type * restart_file; - const run_arg_type * run_arg; - char * eclbase; - const ecl_config_type * ecl_config; // Can be NULL - - int step1; - int step2; - stringlist_type * messages; // This is managed by external scope - can be NULL - - - /* The variables below are updated during the load process. */ - int load_step; - int load_result; -}; - -UTIL_IS_INSTANCE_FUNCTION( forward_load_context , FORWARD_LOAD_CONTEXT_TYPE_ID) - - - -static void forward_load_context_load_ecl_sum(forward_load_context_type * load_context) { - ecl_sum_type * summary = NULL; - - if (ecl_config_active( load_context->ecl_config )) { - const run_arg_type * run_arg = forward_load_context_get_run_arg(load_context); - const char * run_path = run_arg_get_runpath( run_arg ); - const char * eclbase = load_context->eclbase; - - const bool fmt_file = ecl_config_get_formatted(load_context->ecl_config); - char * header_file = ecl_util_alloc_exfilename(run_path , eclbase , ECL_SUMMARY_HEADER_FILE , fmt_file , -1); - char * unified_file = ecl_util_alloc_exfilename(run_path , eclbase , ECL_UNIFIED_SUMMARY_FILE , fmt_file , -1); - stringlist_type * data_files = stringlist_alloc_new(); - - /* Should we load from a unified summary file, or from several non-unified files? */ - if (unified_file != NULL) - /* Use unified file: */ - stringlist_append_ref( data_files , unified_file); - else { - /* Use several non unified files. */ - /* Bypassing the query to model_config_load_results() */ - int report_step = run_arg_get_load_start( run_arg ); - if (report_step == 0) - report_step++; // Ignore looking for the .S0000 summary file (it does not exist). - while (true) { - char * summary_file = ecl_util_alloc_exfilename(run_arg_get_runpath( run_arg ) , eclbase , ECL_SUMMARY_FILE , fmt_file , report_step); - - if (summary_file != NULL) - stringlist_append_owned_ref( data_files , summary_file); - else - /* - We stop the loading at first 'hole' in the series of summary files; - the internalize layer must report failure if we are missing data. - */ - break; - - report_step++; - } - } - - if ((header_file != NULL) && (stringlist_get_size(data_files) > 0)) { - summary = ecl_sum_fread_alloc(header_file , data_files , SUMMARY_KEY_JOIN_STRING ); - { - time_t end_time = ecl_config_get_end_date( load_context->ecl_config ); - if (end_time > 0) { - if (ecl_sum_get_end_time( summary ) < end_time) { - /* The summary vector was shorter than expected; we interpret this as - a simulation failure and discard the current summary instance. */ - - if (forward_load_context_accept_messages(load_context)) { - int end_day,end_month,end_year; - int sum_day,sum_month,sum_year; - - util_set_date_values_utc( end_time , &end_day , &end_month , &end_year ); - util_set_date_values_utc( ecl_sum_get_end_time( summary ) , &sum_day , &sum_month , &sum_year ); - { - char * msg = util_alloc_sprintf("Summary ended at %02d/%02d/%4d - expected at least END_DATE: %02d/%02d/%4d" , - sum_day , sum_month , sum_year , - end_day , end_month , end_year ); - forward_load_context_add_message( load_context , msg ); - free( msg ); - } - } - - } - ecl_sum_free( summary ); - summary = NULL; - } - } - } - stringlist_free( data_files ); - util_safe_free( header_file ); - util_safe_free( unified_file ); - } - - if (summary) - load_context->ecl_sum = summary; - else - forward_load_context_update_result(load_context, LOAD_FAILURE); -} - - - - -forward_load_context_type * forward_load_context_alloc( const run_arg_type * run_arg , bool load_summary , const ecl_config_type * ecl_config , const char * eclbase , stringlist_type * messages) { - forward_load_context_type * load_context = util_malloc( sizeof * load_context ); - UTIL_TYPE_ID_INIT( load_context , FORWARD_LOAD_CONTEXT_TYPE_ID ); - - load_context->ecl_sum = NULL; - load_context->restart_file = NULL; - load_context->run_arg = run_arg; - load_context->load_step = -1; // Invalid - must call forward_load_context_select_step() - load_context->load_result = 0; - load_context->messages = messages; - load_context->ecl_config = ecl_config; - load_context->eclbase = util_alloc_string_copy( eclbase ); - - if (load_summary) - forward_load_context_load_ecl_sum(load_context); - - return load_context; -} - - - -bool forward_load_context_accept_messages( const forward_load_context_type * load_context ) { - if (load_context->messages) - return true; - else - return false; -} - - -/* - The messages can be NULL; in which case the message is completely ignored. -*/ - -void forward_load_context_add_message( forward_load_context_type * load_context , const char * message ) { - if (load_context->messages) - stringlist_append_copy( load_context->messages , message ); -} - - -int forward_load_context_get_result( const forward_load_context_type * load_context ) { - return load_context->load_result; -} - -void forward_load_context_update_result( forward_load_context_type * load_context , int flags) { - load_context->load_result |= flags; -} - - -void forward_load_context_free( forward_load_context_type * load_context ) { - if (load_context->restart_file) - ecl_file_close( load_context->restart_file ); - - if (load_context->ecl_sum) - ecl_sum_free( load_context->ecl_sum ); - - util_safe_free( load_context->eclbase ); - free( load_context ); -} - -bool forward_load_context_load_restart_file( forward_load_context_type * load_context, int report_step) { - if (load_context->ecl_config) { - const bool unified = ecl_config_get_unified_restart( load_context->ecl_config ); - if (unified) - util_abort("%s: sorry - unified restart files are not supported \n",__func__); - - forward_load_context_select_step(load_context, report_step); - { - const bool fmt_file = ecl_config_get_formatted( load_context->ecl_config ); - char * filename = ecl_util_alloc_exfilename( run_arg_get_runpath(load_context->run_arg) , - load_context->eclbase, - ECL_RESTART_FILE , - fmt_file , - load_context->load_step ); - - if (load_context->restart_file) - ecl_file_close( load_context->restart_file ); - load_context->restart_file = NULL; - - if (filename) { - load_context->restart_file = ecl_file_open( filename , 0 ); - free(filename); - } - - if (load_context->restart_file) - return true; - else - return false; - } - } else { - util_abort("%s: internal error - tried to load restart with load_context with ecl_config==NULL \n",__func__); - return false; - } -} - - - - -const ecl_sum_type * forward_load_context_get_ecl_sum( const forward_load_context_type * load_context) { - return load_context->ecl_sum; -} - -const ecl_file_type * forward_load_context_get_restart_file( const forward_load_context_type * load_context) { - return load_context->restart_file; -} - -const run_arg_type * forward_load_context_get_run_arg( const forward_load_context_type * load_context ) { - return load_context->run_arg; -} - -const char * forward_load_context_get_run_path( const forward_load_context_type * load_context ) { - return run_arg_get_runpath( load_context->run_arg ); -} - - -enkf_fs_type * forward_load_context_get_result_fs( const forward_load_context_type * load_context ) { - return run_arg_get_result_fs( load_context->run_arg ); -} - - -void forward_load_context_select_step( forward_load_context_type * load_context , int report_step) { - load_context->load_step = report_step; -} - -int forward_load_context_get_load_step(const forward_load_context_type * load_context) { - if (load_context->load_step < 0) - util_abort("%s: this looks like an internal error - missing call to forward_load_context_select_step() \n",__func__); - - return load_context->load_step; -} - - - - diff --git a/ThirdParty/Ert/libenkf/src/fs_driver.c b/ThirdParty/Ert/libenkf/src/fs_driver.c deleted file mode 100644 index ed1c95aefd..0000000000 --- a/ThirdParty/Ert/libenkf/src/fs_driver.c +++ /dev/null @@ -1,162 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'fs_driver.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include - -#include -#include - -/* - The underlying base types (abstract - with no accompanying - implementation); these two type ID's are not exported outside this - file. They are not stored to disk, and only used in an attempt - yo verify run-time casts. -*/ -#define FS_DRIVER_ID 10 - - -/*****************************************************************/ -/* This fs driver implemenatition is common to both dynamic and - parameter info. */ - -void fs_driver_init(fs_driver_type * driver) { - driver->type_id = FS_DRIVER_ID; - - driver->load_node = NULL; - driver->save_node = NULL; - driver->has_node = NULL; - driver->unlink_node = NULL; - - driver->load_vector = NULL; - driver->save_vector = NULL; - driver->has_vector = NULL; - driver->unlink_vector = NULL; - - driver->free_driver = NULL; - driver->fsync_driver = NULL; -} - -void fs_driver_assert_cast(const fs_driver_type * driver) { - if (driver->type_id != FS_DRIVER_ID) - util_abort("%s: internal error - incorrect cast() - aborting \n" , __func__); -} - - -fs_driver_type * fs_driver_safe_cast(void * __driver) { - fs_driver_type * driver = (fs_driver_type *) __driver; - if (driver->type_id != FS_DRIVER_ID) - util_abort("%s: runtime cast failed. \n",__func__); - return driver; -} - -/*****************************************************************/ - - -void fs_driver_init_fstab( FILE * stream, fs_driver_impl driver_id) { - util_fwrite_long( FS_MAGIC_ID , stream ); - util_fwrite_int ( CURRENT_FS_VERSION , stream ); - util_fwrite_int ( driver_id , stream ); -} - - - -/** - Will open fstab stream and return it. The semantics with respect to - existing/not existnig fstab file depends on the value of the - @create parameter: - - @create = True: If the fstab file exists the function will return - NULL, otherwise it will return a stream opened for writing to the - fstab file. - - @create = False: If the fstab file exists the the function will - return a stream opened for reading of the fstab file, otherwise - it will return NULL. - -*/ - -char * fs_driver_alloc_fstab_file( const char * path ) { - return util_alloc_filename( path , "ert_fstab" , NULL); -} - - -FILE * fs_driver_open_fstab( const char * path , bool create) { - FILE * stream = NULL; - char * fstab_file = fs_driver_alloc_fstab_file( path ); - if (create) - util_make_path( path ); - - if (util_file_exists( fstab_file ) != create) { - if (create) - stream = util_fopen( fstab_file , "w"); - else - stream = util_fopen( fstab_file , "r"); - } - free( fstab_file ); - return stream; -} - - -void fs_driver_assert_magic( FILE * stream ) { - long fs_magic = util_fread_long( stream ); - if (fs_magic != FS_MAGIC_ID) - util_abort("%s: WTF - fstab magic marker incorrect \n",__func__); -} - - - -void fs_driver_assert_version( FILE * stream , const char * mount_point) { - int file_version = util_fread_int( stream ); - - if (file_version < MIN_SUPPORTED_FS_VERSION ) - util_exit("%s: The file system you are trying to access is created with a very old version of ert - sorry.\n",__func__); - - if (file_version > CURRENT_FS_VERSION) - util_exit("%s: The file system you are trying to access has been created with a newer version of ert - sorry.\n",__func__); - - if (file_version < CURRENT_FS_VERSION) { - if ((file_version == 105) && (CURRENT_FS_VERSION == 106)) - fprintf(stderr,"%s: The file system you are accessing has been written with an older version of ert - STATIC information ignored. \n",__func__); - else - util_exit("%s: The file system you are trying to access has been created with an old version of ert - sorry.\n",__func__); - } - - -} - - -fs_driver_impl fs_driver_fread_type( FILE * stream ) { - fs_driver_impl impl = util_fread_int( stream ); - return impl; -} - - -int fs_driver_fread_version( FILE * stream ) { - long fs_magic = util_fread_long( stream ); - if (fs_magic != FS_MAGIC_ID) - return -1; - else { - int file_version = util_fread_int( stream ); - return file_version; - } -} - - -/*****************************************************************/ - - diff --git a/ThirdParty/Ert/libenkf/src/fs_types.c b/ThirdParty/Ert/libenkf/src/fs_types.c deleted file mode 100644 index 454e726bc1..0000000000 --- a/ThirdParty/Ert/libenkf/src/fs_types.c +++ /dev/null @@ -1,73 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'fs_types.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -#include - -#include - - - -fs_driver_impl fs_types_lookup_string_name(const char * driver_name) { - if (strcmp(driver_name , "PLAIN") == 0) - return PLAIN_DRIVER_ID; - else if (strcmp(driver_name , "BLOCK_FS") == 0) - return BLOCK_FS_DRIVER_ID; - else { - util_abort("%s: could not determine driver type for input:%s \n",__func__ , driver_name); - return INVALID_DRIVER_ID; - } -} - - - -const char * fs_types_get_driver_name(fs_driver_enum driver_type) { - switch( driver_type ) { - case(DRIVER_PARAMETER): - return "PARAMETER"; - break; - case(DRIVER_DYNAMIC_FORECAST): - return "FORECAST"; - break; - case(DRIVER_INDEX): - return "INDEX"; - break; - default: - util_abort("%s: driver_id:%d not recognized. \n",__func__ , driver_type ); - return NULL; - } -} - - -/* - The driver type DRIVER_STATIC has been removed completely as of - December 2015, but there will still be many mount map files with - this enum value around on disk. This function is a minor convenience - to handle that. - - The driver type DRIVER_DYNAMIC_ANALYZED was removed ~april 2016. -*/ - -bool fs_types_valid( fs_driver_enum driver_type) { - if ((driver_type == DRIVER_STATIC) || (driver_type == DRIVER_DYNAMIC_ANALYZED)) - return false; - else - return true; -} diff --git a/ThirdParty/Ert/libenkf/src/gen_common.c b/ThirdParty/Ert/libenkf/src/gen_common.c deleted file mode 100644 index f7a45852c7..0000000000 --- a/ThirdParty/Ert/libenkf/src/gen_common.c +++ /dev/null @@ -1,139 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'gen_common.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include - -#include -#include - -#include -#include - -/** - This file implements some (very basic) functionality which is used - by both the gen_data and gen_obs objects. -*/ - - -void * gen_common_fscanf_alloc(const char * file , ecl_type_enum load_type , int * size) { - FILE * stream = util_fopen(file , "r"); - int sizeof_ctype = ecl_util_get_sizeof_ctype(load_type); - int buffer_elements = *size; - int current_size = 0; - int fscanf_return = 1; /* To keep the compiler happy .*/ - void * buffer; - - if (buffer_elements == 0) - buffer_elements = 100; - - buffer = util_calloc( buffer_elements , sizeof_ctype ); - { - do { - if (load_type == ECL_FLOAT_TYPE) { - float * float_buffer = (float *) buffer; - fscanf_return = fscanf(stream , "%g" , &float_buffer[current_size]); - } else if (load_type == ECL_DOUBLE_TYPE) { - double * double_buffer = (double *) buffer; - fscanf_return = fscanf(stream , "%lg" , &double_buffer[current_size]); - } else if (load_type == ECL_INT_TYPE) { - int * int_buffer = (int *) buffer; - fscanf_return = fscanf(stream , "%d" , &int_buffer[current_size]); - } else - util_abort("%s: god dammit - internal error \n",__func__); - - if (fscanf_return == 1) - current_size += 1; - - if (current_size == buffer_elements) { - buffer_elements *= 2; - buffer = util_realloc( buffer , buffer_elements * sizeof_ctype ); - } - } while (fscanf_return == 1); - } - if (fscanf_return != EOF) - util_abort("%s: scanning of %s terminated before EOF was reached -- fix your file.\n" , __func__ , file); - - fclose(stream); - *size = current_size; - return buffer; -} - - - -void * gen_common_fread_alloc(const char * file , ecl_type_enum load_type , int * size) { - const int max_read_size = 100000; - FILE * stream = util_fopen(file , "r"); - int sizeof_ctype = ecl_util_get_sizeof_ctype(load_type); - int read_size = 4096; /* Shot in the wild */ - int current_size = 0; - int buffer_elements; - int fread_return; - char * buffer; - - - buffer_elements = read_size; - buffer = util_calloc( buffer_elements , sizeof_ctype ); - { - do { - fread_return = fread( &buffer[ current_size * sizeof_ctype] , sizeof_ctype , read_size , stream); - current_size += fread_return; - - if (!feof(stream)) { - /* Allocate more elements. */ - if (current_size == buffer_elements) { - read_size *= 2; - read_size = util_int_min(read_size , max_read_size); - buffer_elements += read_size; - buffer = util_realloc( buffer , buffer_elements * sizeof_ctype ); - } else - util_abort("%s: internal error ?? \n",__func__); - } - } while (!feof(stream)); - } - *size = current_size; - return buffer; -} - - -/* - If the load_format is binary_float or binary_double, the ASCII_type - is *NOT* consulted. The load_type is set to float/double depending - on what was actually used when the data was loaded. -*/ - -void * gen_common_fload_alloc(const char * file , gen_data_file_format_type load_format , ecl_type_enum ASCII_type , ecl_type_enum * load_type , int * size) { - void * buffer = NULL; - - if (load_format == ASCII) { - *load_type = ASCII_type; - buffer = gen_common_fscanf_alloc(file , ASCII_type , size); - } else if (load_format == BINARY_FLOAT) { - *load_type = ECL_FLOAT_TYPE; - buffer = gen_common_fread_alloc(file , ECL_FLOAT_TYPE , size); - } else if (load_format == BINARY_DOUBLE) { - *load_type = ECL_DOUBLE_TYPE; - buffer = gen_common_fread_alloc(file , ECL_DOUBLE_TYPE , size); - } else - util_abort("%s: trying to load with unsupported format:%s... \n" , load_format); - - return buffer; -} diff --git a/ThirdParty/Ert/libenkf/src/gen_data.c b/ThirdParty/Ert/libenkf/src/gen_data.c deleted file mode 100644 index 2d593ebb3b..0000000000 --- a/ThirdParty/Ert/libenkf/src/gen_data.c +++ /dev/null @@ -1,728 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'gen_data.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -/** - The file implements a general data type which can be used to update - arbitrary data which the EnKF system has *ABSOLUTELY NO IDEA* of - how is organised; how it should be used in the forward model and so - on. Similarly to the field objects, the gen_data objects can be - treated both as parameters and as dynamic data. - - Whether the forward_load function should be called (i.e. it is dynamic - data) is determined at the enkf_node level, and no busissiness of - the gen_data implementation. -*/ - - - - -struct gen_data_struct { - int __type_id; - gen_data_config_type * config; /* Thin config object - mainly contains filename for remote load */ - char * data; /* Actual storage - will be casted to double or float on use. */ - int current_report_step; /* Need this to look up the correct size in the config object. */ - bool_vector_type * active_mask; /* Mask of active/not active - loaded from a "_active" file created by the forward model. Not used when used as parameter*/ -}; - - - -void gen_data_assert_size( gen_data_type * gen_data , int size , int report_step) { - gen_data_config_assert_size(gen_data->config , size , report_step); - gen_data->current_report_step = report_step; -} - -gen_data_config_type * gen_data_get_config(const gen_data_type * gen_data) { return gen_data->config; } - -int gen_data_get_size( const gen_data_type * gen_data ) { - return gen_data_config_get_data_size( gen_data->config , gen_data->current_report_step ); -} - -/** - It is a bug to call this before some function has set the size. -*/ -void gen_data_realloc_data(gen_data_type * gen_data) { - int byte_size = gen_data_config_get_byte_size(gen_data->config , gen_data->current_report_step ); - gen_data->data = util_realloc(gen_data->data , byte_size ); -} - - - -gen_data_type * gen_data_alloc(const gen_data_config_type * config) { - gen_data_type * gen_data = util_malloc(sizeof * gen_data); - gen_data->config = (gen_data_config_type *) config; - gen_data->data = NULL; - gen_data->__type_id = GEN_DATA; - gen_data->active_mask = bool_vector_alloc( 0 , true ); - gen_data->current_report_step = -1; /* God - if you ever read this .... */ - return gen_data; -} - - -void gen_data_copy(const gen_data_type * src , gen_data_type * target) { - if (src->config == target->config) { - target->current_report_step = src->current_report_step; - - if (src->data != NULL) { - int byte_size = gen_data_config_get_byte_size( src->config , src->current_report_step ); - target->data = util_realloc_copy(target->data , src->data , byte_size ); - } - } else - util_abort("%s: do not share config object \n",__func__); -} - - - -void gen_data_free(gen_data_type * gen_data) { - util_safe_free(gen_data->data); - bool_vector_free( gen_data->active_mask ); - free(gen_data); -} - - - - -/** - Observe that this function writes parameter size to disk, that is - special. The reason is that the config object does not know the - size (on allocation). - - The function currently writes an empty file (with only a report - step and a size == 0) in the case where it does not have data. This - is controlled by the value of the variable write_zero_size; if this - is changed to false some semantics in the load code must be - changed. -*/ - - -bool gen_data_write_to_buffer(const gen_data_type * gen_data , buffer_type * buffer , int report_step) { - const bool write_zero_size = true; /* true:ALWAYS write a file false:only write files with size > 0. */ - { - bool write = write_zero_size; - int size = gen_data_config_get_data_size( gen_data->config , report_step ); - if (size > 0) - write = true; - - if (write) { - int byte_size = gen_data_config_get_byte_size( gen_data->config , report_step ); - buffer_fwrite_int( buffer , GEN_DATA ); - buffer_fwrite_int( buffer , size ); - buffer_fwrite_int( buffer , report_step); /* Why the heck do I need to store this ???? It was a mistake ...*/ - - buffer_fwrite_compressed( buffer , gen_data->data , byte_size); - return true; - } else - return false; /* When false is returned - the (empty) file will be removed */ - } -} - - - -void gen_data_read_from_buffer(gen_data_type * gen_data , buffer_type * buffer , enkf_fs_type * fs, int report_step) { - int size; - enkf_util_assert_buffer_type(buffer , GEN_DATA); - size = buffer_fread_int(buffer); - buffer_fskip_int( buffer ); /* Skipping report_step from the buffer - was a mistake to store it - I think ... */ - { - size_t byte_size = size * ecl_util_get_sizeof_ctype( gen_data_config_get_internal_type ( gen_data->config )); - size_t compressed_size = buffer_get_remaining_size( buffer ); - gen_data->data = util_realloc( gen_data->data , byte_size ); - buffer_fread_compressed( buffer , compressed_size , gen_data->data , byte_size ); - } - gen_data_assert_size( gen_data , size , report_step ); - - if (gen_data_config_is_dynamic(gen_data->config)) { - gen_data_config_load_active( gen_data->config , fs, report_step , false ); - } -} - - - - - - - - -void gen_data_serialize(const gen_data_type * gen_data , node_id_type node_id , const active_list_type * active_list , matrix_type * A , int row_offset , int column) { - const gen_data_config_type *config = gen_data->config; - const int data_size = gen_data_config_get_data_size( gen_data->config , gen_data->current_report_step ); - ecl_type_enum ecl_type = gen_data_config_get_internal_type( config ); - - enkf_matrix_serialize( gen_data->data , data_size , ecl_type , active_list , A , row_offset , column ); -} - - -void gen_data_deserialize(gen_data_type * gen_data , node_id_type node_id , const active_list_type * active_list , const matrix_type * A , int row_offset , int column) { - { - const gen_data_config_type *config = gen_data->config; - const int data_size = gen_data_config_get_data_size( gen_data->config , gen_data->current_report_step ); - ecl_type_enum ecl_type = gen_data_config_get_internal_type(config); - - enkf_matrix_deserialize( gen_data->data , data_size , ecl_type , active_list , A , row_offset , column); - } -} - - - - -/* - This function sets the data field of the gen_data instance after the - data has been loaded from file. -*/ - -static void gen_data_set_data__(gen_data_type * gen_data , int size, const forward_load_context_type * load_context, ecl_type_enum load_type , const void * data) { - gen_data_assert_size(gen_data , size, forward_load_context_get_load_step( load_context )); - if (gen_data_config_is_dynamic( gen_data->config )) - gen_data_config_update_active( gen_data->config , load_context , gen_data->active_mask); - - gen_data_realloc_data(gen_data); - - if (size > 0) { - ecl_type_enum internal_type = gen_data_config_get_internal_type( gen_data->config ); - int byte_size = ecl_util_get_sizeof_ctype( internal_type ) * size ; - - if (load_type == internal_type) - memcpy(gen_data->data , data , byte_size ); - else { - if (load_type == ECL_FLOAT_TYPE) - util_float_to_double((double *) gen_data->data , data , size); - else - util_double_to_float((float *) gen_data->data , data , size); - } - } -} - - - -static bool gen_data_fload_active__(gen_data_type * gen_data, const char * filename, int size) { - /* - Look for file @filename_active - if that file is found it is - interpreted as a an active|inactive mask created by the forward - model. - - The file is assumed to be an ASCII file with integers, 0 - indicates inactive elements and 1 active elements. The file - should of course be as long as @filename. - - If the file is not found the gen_data->active_mask is set to - all-true (i.e. the default true value is invoked). - */ - bool file_exists = false; - if (gen_data_config_is_dynamic( gen_data->config )) { - bool_vector_reset( gen_data->active_mask ); - bool_vector_iset( gen_data->active_mask , size - 1, true ); - { - char * active_file = util_alloc_sprintf("%s_active" , filename ); - if (util_file_exists( active_file )) { - file_exists = true; - FILE * stream = util_fopen( active_file , "r"); - int active_int; - for (int index=0; index < size; index++) { - if (fscanf( stream , "%d" , &active_int) == 1) { - if (active_int == 1) - bool_vector_iset( gen_data->active_mask , index , true); - else if (active_int == 0) - bool_vector_iset( gen_data->active_mask , index , false); - else - util_abort("%s: error when loading active mask from:%s only 0 and 1 allowed \n",__func__ , active_file); - } else - util_abort("%s: error when loading active mask from:%s - file not long enough.\n",__func__ , active_file ); - } - fclose( stream ); - } - free( active_file ); - } - } - return file_exists; -} - - -/** - This functions loads data from file. Observe that there is *NO* - header information in this file - the size is determined by seeing - how much can be successfully loaded. - - The file is loaded with the gen_common_fload_alloc() function, and - can be in formatted ASCII or binary_float / binary_double. - - When the read is complete it is checked/verified with the config - object that this file was as long as the others we have loaded for - other members; it is perfectly OK for the file to not exist. In - which case a size of zero is set, for this report step. - - Return value is whether file was found or was empty - - might have to check this in calling scope. -*/ - -bool gen_data_fload_with_report_step( gen_data_type * gen_data , const char * filename , const forward_load_context_type * load_context) { - bool file_exists = util_file_exists(filename); - void * buffer = NULL; - ecl_type_enum load_type; - - if ( file_exists ) { - ecl_type_enum internal_type = gen_data_config_get_internal_type(gen_data->config); - gen_data_file_format_type input_format = gen_data_config_get_input_format( gen_data->config ); - int size = 0; - buffer = gen_common_fload_alloc( filename , input_format , internal_type , &load_type , &size); - if (size > 0) { - gen_data_fload_active__(gen_data, filename, size); - } else { - bool_vector_reset( gen_data->active_mask ); - } - gen_data_set_data__(gen_data , size , load_context , load_type , buffer ); - util_safe_free(buffer); - } - return file_exists; -} - - - - - -bool gen_data_forward_load(gen_data_type * gen_data , const char * ecl_file , const forward_load_context_type * load_context) { - return gen_data_fload_with_report_step( gen_data , ecl_file , load_context); -} - - - -/** - This function initializes the parameter. This is based on loading a - file. The name of the file is derived from a path_fmt instance - owned by the config object. Observe that there is *NO* header - information in this file. We just read floating point numbers until - we reach EOF. - - When the read is complete it is checked/verified with the config - object that this file was as long as the files we have loaded for - other members. - - If gen_data_config_alloc_initfile() returns NULL that means that - the gen_data instance does not have any init function - that is OK. -*/ - - - -bool gen_data_initialize(gen_data_type * gen_data , int iens , const char * init_file , rng_type * rng) { - bool ret = false; - if (init_file) { - forward_load_context_type * load_context = forward_load_context_alloc( NULL , false , NULL , NULL , NULL ); - - forward_load_context_select_step(load_context, 0); - if (!gen_data_fload_with_report_step(gen_data , init_file , load_context)) - util_abort("%s: could not find file:%s \n",__func__ , init_file); - ret = true; - - forward_load_context_free( load_context ); - } - return ret; -} - - - - -static void gen_data_ecl_write_ASCII(const gen_data_type * gen_data , const char * file , gen_data_file_format_type export_format) { - FILE * stream = util_fopen(file , "w"); - char * template_buffer; - int template_data_offset, template_buffer_size , template_data_skip; - - if (export_format == ASCII_TEMPLATE) { - gen_data_config_get_template_data( gen_data->config , &template_buffer , &template_data_offset , &template_buffer_size , &template_data_skip); - util_fwrite( template_buffer , 1 , template_data_offset , stream , __func__); - } - - { - ecl_type_enum internal_type = gen_data_config_get_internal_type(gen_data->config); - const int size = gen_data_config_get_data_size( gen_data->config , gen_data->current_report_step ); - int i; - if (internal_type == ECL_FLOAT_TYPE) { - float * float_data = (float *) gen_data->data; - for (i=0; i < size; i++) - fprintf(stream , "%g\n",float_data[i]); - } else if (internal_type == ECL_DOUBLE_TYPE) { - double * double_data = (double *) gen_data->data; - for (i=0; i < size; i++) - fprintf(stream , "%lg\n",double_data[i]); - } else - util_abort("%s: internal error - wrong type \n",__func__); - } - - if (export_format == ASCII_TEMPLATE) { - int new_offset = template_data_offset + template_data_skip; - util_fwrite( &template_buffer[new_offset] , 1 , template_buffer_size - new_offset , stream , __func__); - } - fclose(stream); -} - - - -static void gen_data_ecl_write_binary(const gen_data_type * gen_data , const char * file , ecl_type_enum export_type) { - FILE * stream = util_fopen(file , "w"); - int sizeof_ctype = ecl_util_get_sizeof_ctype( export_type ); - util_fwrite( gen_data->data , sizeof_ctype , gen_data_config_get_data_size( gen_data->config , gen_data->current_report_step) , stream , __func__); - fclose(stream); -} - - -gen_data_file_format_type gen_data_guess_export_type( const gen_data_type * gen_data ) { - gen_data_file_format_type export_type = gen_data_config_get_output_format( gen_data->config ); - if (export_type == GEN_DATA_UNDEFINED) - export_type = gen_data_config_get_input_format( gen_data->config ); - - if (export_type == GEN_DATA_UNDEFINED) - util_abort("%s: both input_format and output_format are set to UNDEFINED \n",__func__); - return export_type; -} - - -void gen_data_export(const gen_data_type * gen_data , const char * full_path , gen_data_file_format_type export_type , fortio_type * fortio) { - switch (export_type) { - case(ASCII): - gen_data_ecl_write_ASCII(gen_data , full_path , export_type); - break; - case(ASCII_TEMPLATE): - gen_data_ecl_write_ASCII(gen_data , full_path , export_type); - break; - case(BINARY_DOUBLE): - gen_data_ecl_write_binary(gen_data , full_path , ECL_DOUBLE_TYPE); - break; - case(BINARY_FLOAT): - gen_data_ecl_write_binary(gen_data , full_path , ECL_FLOAT_TYPE); - break; - default: - util_abort("%s: internal error - export type is not set.\n",__func__); - } -} - -/** - It is the enkf_node layer which knows whether the node actually - has any data to export. If it is not supposed to write data to the - forward model, i.e. it is of enkf_type 'dynamic_result' that is - signaled down here with eclfile == NULL. -*/ - - -void gen_data_ecl_write(const gen_data_type * gen_data , const char * run_path , const char * eclfile , void * filestream) { - if (eclfile != NULL) { - char * full_path = util_alloc_filename( run_path , eclfile , NULL); - - gen_data_file_format_type export_type = gen_data_config_get_output_format( gen_data->config ); - gen_data_export( gen_data , full_path , export_type , filestream ); - free( full_path ); - } -} - - -static void gen_data_assert_index(const gen_data_type * gen_data, int index) { - int current_size = gen_data_config_get_data_size( gen_data->config , gen_data->current_report_step ); - if ((index < 0) || (index >= current_size )) - util_abort("%s: index:%d invalid. Valid range: [0,%d) \n",__func__ , index , current_size); -} - - -double gen_data_iget_double(const gen_data_type * gen_data, int index) { - gen_data_assert_index(gen_data , index); - { - ecl_type_enum internal_type = gen_data_config_get_internal_type(gen_data->config); - if (internal_type == ECL_DOUBLE_TYPE) { - double * data = (double *) gen_data->data; - return data[index]; - } else { - float * data = (float *) gen_data->data; - return data[index]; - } - } -} - - -void gen_data_export_data(const gen_data_type * gen_data , double_vector_type * export_data) { - ecl_type_enum internal_type = gen_data_config_get_internal_type(gen_data->config); - if (internal_type == ECL_DOUBLE_TYPE) - double_vector_memcpy_from_data( export_data , (const double *) gen_data->data , gen_data_get_size( gen_data )); - else { - double_vector_reset( export_data ); - float * float_data = (float *) gen_data->data; - for (int i = 0; i < gen_data_get_size( gen_data ); i++) - double_vector_iset( export_data , i , float_data[i]); - } -} - - - -/** - The filesystem will (currently) store gen_data instances which do - not hold any data. Therefor it will be quite common to enter this - function with an empty instance, we therefor just set valid => - false, and return silently in that case. -*/ - -bool gen_data_user_get(const gen_data_type * gen_data, const char * index_key, int report_step , double * value) -{ - int index; - *value = 0.0; - - if (index_key != NULL) { - if (util_sscanf_int(index_key , &index)) { - if (index < gen_data_config_get_data_size( gen_data->config , gen_data->current_report_step )) { - *value = gen_data_iget_double( gen_data , index ); - return true; - } - } - } - - return false; -} - - -const char * gen_data_get_key( const gen_data_type * gen_data) { - return gen_data_config_get_key( gen_data->config ); -} - - -void gen_data_clear( gen_data_type * gen_data ) { - const gen_data_config_type * config = gen_data->config; - ecl_type_enum internal_type = gen_data_config_get_internal_type( config ); - const int data_size = gen_data_config_get_data_size( gen_data->config , gen_data->current_report_step ); - - if (internal_type == ECL_FLOAT_TYPE) { - float * data = (float * ) gen_data->data; - for (int i = 0; i < data_size; i++) - data[i] = 0; - } else if (internal_type == ECL_DOUBLE_TYPE) { - double * data = (double * ) gen_data->data; - for (int i = 0; i < data_size; i++) - data[i] = 0; - } -} - - - -void gen_data_isqrt(gen_data_type * gen_data) { - const int data_size = gen_data_config_get_data_size( gen_data->config , gen_data->current_report_step ); - const ecl_type_enum internal_type = gen_data_config_get_internal_type(gen_data->config); - - if (internal_type == ECL_FLOAT_TYPE) { - float * data = (float *) gen_data->data; - for (int i=0; i < data_size; i++) - data[i] = sqrtf( data[i] ); - } else if (internal_type == ECL_DOUBLE_TYPE) { - double * data = (double *) gen_data->data; - for (int i=0; i < data_size; i++) - data[i] = sqrt( data[i] ); - } -} - - - - -void gen_data_iadd(gen_data_type * gen_data1, const gen_data_type * gen_data2) { - //gen_data_config_assert_binary(gen_data1->config , gen_data2->config , __func__); - { - const int data_size = gen_data_config_get_data_size( gen_data1->config , gen_data1->current_report_step ); - const ecl_type_enum internal_type = gen_data_config_get_internal_type(gen_data1->config); - int i; - - if (internal_type == ECL_FLOAT_TYPE) { - float * data1 = (float *) gen_data1->data; - const float * data2 = (const float *) gen_data2->data; - for (i = 0; i < data_size; i++) - data1[i] += data2[i]; - } else if (internal_type == ECL_DOUBLE_TYPE) { - double * data1 = (double *) gen_data1->data; - const double * data2 = (const double *) gen_data2->data; - for (i = 0; i < data_size; i++) { - data1[i] += data2[i]; - } - } - } -} - - -void gen_data_imul(gen_data_type * gen_data1, const gen_data_type * gen_data2) { - //gen_data_config_assert_binary(gen_data1->config , gen_data2->config , __func__); - { - const int data_size = gen_data_config_get_data_size( gen_data1->config , gen_data1->current_report_step ); - const ecl_type_enum internal_type = gen_data_config_get_internal_type(gen_data1->config); - int i; - - if (internal_type == ECL_FLOAT_TYPE) { - float * data1 = (float *) gen_data1->data; - const float * data2 = (const float *) gen_data2->data; - for (i = 0; i < data_size; i++) - data1[i] *= data2[i]; - } else if (internal_type == ECL_DOUBLE_TYPE) { - double * data1 = (double *) gen_data1->data; - const double * data2 = (const double *) gen_data2->data; - for (i = 0; i < data_size; i++) - data1[i] *= data2[i]; - } - } -} - - -void gen_data_iaddsqr(gen_data_type * gen_data1, const gen_data_type * gen_data2) { - //gen_data_config_assert_binary(gen_data1->config , gen_data2->config , __func__); - { - const int data_size = gen_data_config_get_data_size( gen_data1->config , gen_data1->current_report_step ); - const ecl_type_enum internal_type = gen_data_config_get_internal_type(gen_data1->config); - int i; - - if (internal_type == ECL_FLOAT_TYPE) { - float * data1 = (float *) gen_data1->data; - const float * data2 = (const float *) gen_data2->data; - for (i = 0; i < data_size; i++) - data1[i] += data2[i] * data2[i]; - } else if (internal_type == ECL_DOUBLE_TYPE) { - double * data1 = (double *) gen_data1->data; - const double * data2 = (const double *) gen_data2->data; - for (i = 0; i < data_size; i++) - data1[i] += data2[i] * data2[i]; - } - } -} - - -void gen_data_scale(gen_data_type * gen_data, double scale_factor) { - //gen_data_config_assert_unary(gen_data->config, __func__); - { - const int data_size = gen_data_config_get_data_size( gen_data->config , gen_data->current_report_step ); - const ecl_type_enum internal_type = gen_data_config_get_internal_type(gen_data->config); - int i; - - if (internal_type == ECL_FLOAT_TYPE) { - float * data = (float *) gen_data->data; - for (i = 0; i < data_size; i++) - data[i] *= scale_factor; - } else if (internal_type == ECL_DOUBLE_TYPE) { - double * data = (double *) gen_data->data; - for (i = 0; i < data_size; i++) - data[i] *= scale_factor; - } - } -} - - -const bool_vector_type * gen_data_get_forward_mask( const gen_data_type * gen_data ) { - return gen_data_config_get_active_mask( gen_data->config ); -} - -void gen_data_copy_to_double_vector(const gen_data_type * gen_data , double_vector_type * vector){ - const ecl_type_enum internal_type = gen_data_config_get_internal_type(gen_data->config); - int size = gen_data_get_size( gen_data ); - if (internal_type == ECL_FLOAT_TYPE) { - float * data = (float *) gen_data->data; - double_vector_reset(vector); - for (int i = 0; i < size; i++){ - double_vector_append(vector , data[i]); - } - } else if (internal_type == ECL_DOUBLE_TYPE) { - double * data = (double *) gen_data->data; - double_vector_memcpy_from_data( vector , data , size ); - } - - -} - -#define INFLATE(inf,std,min) \ -{ \ - for (int i=0; i < data_size; i++) { \ - if (std_data[i] > 0) \ - inflation_data[i] = util_float_max( 1.0 , min_std_data[i] / std_data[i]); \ - else \ - inflation_data[i] = 1.0; \ - } \ -} - - -/** - If the size changes during the simulation this will go 100% belly - up. -*/ - -void gen_data_set_inflation(gen_data_type * inflation , const gen_data_type * std , const gen_data_type * min_std) { - const gen_data_config_type * config = inflation->config; - ecl_type_enum ecl_type = gen_data_config_get_internal_type( config ); - const int data_size = gen_data_config_get_data_size( std->config , std->current_report_step ); - - if (ecl_type == ECL_FLOAT_TYPE) { - float * inflation_data = (float *) inflation->data; - const float * std_data = (const float *) std->data; - const float * min_std_data = (const float *) min_std->data; - - INFLATE(inflation_data , std_data , min_std_data ); - - } else { - double * inflation_data = (double *) inflation->data; - const double * std_data = (const double *) std->data; - const double * min_std_data = (const double *) min_std->data; - - INFLATE(inflation_data , std_data , min_std_data ); - } -} -#undef INFLATE - - -/******************************************************************/ -/* Anonumously generated functions used by the enkf_node object */ -/******************************************************************/ -UTIL_SAFE_CAST_FUNCTION_CONST(gen_data , GEN_DATA) -UTIL_SAFE_CAST_FUNCTION(gen_data , GEN_DATA) -VOID_USER_GET(gen_data) -VOID_ALLOC(gen_data) -VOID_FREE(gen_data) -VOID_COPY (gen_data) -VOID_INITIALIZE(gen_data) -VOID_ECL_WRITE(gen_data) -VOID_FORWARD_LOAD(gen_data) -VOID_READ_FROM_BUFFER(gen_data); -VOID_WRITE_TO_BUFFER(gen_data); -VOID_SERIALIZE(gen_data) -VOID_DESERIALIZE(gen_data) -VOID_SET_INFLATION(gen_data) -VOID_CLEAR(gen_data) -VOID_SCALE(gen_data) -VOID_IMUL(gen_data) -VOID_IADD(gen_data) -VOID_IADDSQR(gen_data) -VOID_ISQRT(gen_data) diff --git a/ThirdParty/Ert/libenkf/src/gen_data_config.c b/ThirdParty/Ert/libenkf/src/gen_data_config.c deleted file mode 100644 index a37139a78b..0000000000 --- a/ThirdParty/Ert/libenkf/src/gen_data_config.c +++ /dev/null @@ -1,653 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'gen_data_config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -/** - About deactivating by the forward model - --------------------------------------- - - For the gen_data instances the forward model has the capability to - deactivate elements in a gen_data vector. This is implemented in - the function gen_data_ecl_load which will look for a file with - extension "_data" and then activate / deactivate elements - accordingly. -*/ - - - - -#define GEN_DATA_CONFIG_ID 90051 -struct gen_data_config_struct { - UTIL_TYPE_ID_DECLARATION; - char * key; /* The key this gen_data instance is known under - needed for debugging. */ - ecl_type_enum internal_type; /* The underlying type (float | double) of the data in the corresponding gen_data instances. */ - char * template_file; - char * template_buffer; /* Buffer containing the content of the template - read and internalized at boot time. */ - char * template_key; - int template_data_offset; /* The offset into the template buffer before the data should come. */ - int template_data_skip; /* The length of data identifier in the template.*/ - int template_buffer_size; /* The total size (bytes) of the template buffer .*/ - gen_data_file_format_type input_format; /* The format used for loading gen_data instances when the forward model has completed *AND* for loading the initial files.*/ - gen_data_file_format_type output_format; /* The format used when gen_data instances are written to disk for the forward model. */ - int_vector_type * data_size_vector; /* Data size, i.e. number of elements , indexed with report_step */ - int_vector_type * active_report_steps; /* The report steps where we expect to load data for this instance. */ - pthread_mutex_t update_lock; - /*****************************************************************/ - /* All the fields below this line are related to the capability of - the forward model to deactivate elements in a gen_data - instance. See documentation above. - */ - bool dynamic; - enkf_fs_type * last_read_fs; /* NBNB This will be NULL in the case of instances which are used as parameters. */ - int ens_size; - bool mask_modified; - bool_vector_type * active_mask; - int active_report_step; -}; - - -/*****************************************************************/ - -UTIL_IS_INSTANCE_FUNCTION(gen_data_config , GEN_DATA_CONFIG_ID) -UTIL_SAFE_CAST_FUNCTION(gen_data_config , GEN_DATA_CONFIG_ID) -UTIL_SAFE_CAST_FUNCTION_CONST(gen_data_config , GEN_DATA_CONFIG_ID) - -gen_data_file_format_type gen_data_config_get_input_format ( const gen_data_config_type * config) { return config->input_format; } -gen_data_file_format_type gen_data_config_get_output_format( const gen_data_config_type * config) { return config->output_format; } - - -ecl_type_enum gen_data_config_get_internal_type(const gen_data_config_type * config) { - return config->internal_type; -} - - -/** - If current_size as queried from config->data_size_vector == -1 - (i.e. not set); we seek through -*/ - -int gen_data_config_get_data_size__( const gen_data_config_type * config , int report_step) { - int current_size = int_vector_safe_iget( config->data_size_vector , report_step ); - return current_size; -} - -int gen_data_config_get_data_size( const gen_data_config_type * config , int report_step) { - int current_size = gen_data_config_get_data_size__(config , report_step); - if (current_size < 0) - util_abort("%s: Size not set for object:%s report_step:%d - internal error: \n",__func__ , config->key , report_step); - return current_size; -} - - - -int gen_data_config_get_initial_size( const gen_data_config_type * config ) { - int initial_size = int_vector_safe_iget( config->data_size_vector , 0); - if (initial_size < 0) - initial_size = 0; - - return initial_size; -} - - - -int gen_data_config_get_byte_size( const gen_data_config_type * config , int report_step) { - int byte_size = gen_data_config_get_data_size( config , report_step ) * ecl_util_get_sizeof_ctype( config->internal_type ); - return byte_size; -} - - - -static void gen_data_config_reset_template( gen_data_config_type * config ) { - util_safe_free( config->template_buffer ); - util_safe_free( config->template_key ); - util_safe_free( config->template_file ); - - config->template_file = NULL; - config->template_buffer = NULL; - config->template_key = NULL; - config->template_data_offset = 0; - config->template_data_skip = 0; - config->template_buffer_size = 0; -} - - - -static gen_data_config_type * gen_data_config_alloc( const char * key , bool dynamic ) { - gen_data_config_type * config = util_malloc(sizeof * config ); - UTIL_TYPE_ID_INIT( config , GEN_DATA_CONFIG_ID); - - config->key = util_alloc_string_copy( key ); - - config->template_file = NULL; - config->template_key = NULL; - config->template_buffer = NULL; - gen_data_config_reset_template( config ); - - config->internal_type = ECL_DOUBLE_TYPE; - config->input_format = GEN_DATA_UNDEFINED; - config->output_format = GEN_DATA_UNDEFINED; - config->data_size_vector = int_vector_alloc( 0 , -1 ); /* The default value: -1 - indicates "NOT SET" */ - config->active_report_steps= int_vector_alloc( 0 , 0 ); - config->active_mask = bool_vector_alloc(0 , true ); /* Elements are explicitly set to FALSE - this MUST default to true. */ - config->active_report_step = -1; - config->ens_size = -1; - config->last_read_fs = NULL; - config->dynamic = dynamic; - pthread_mutex_init( &config->update_lock , NULL ); - - - return config; -} - -gen_data_config_type * gen_data_config_alloc_GEN_PARAM( const char * key , gen_data_file_format_type output_format , gen_data_file_format_type input_format) { - gen_data_config_type * config = gen_data_config_alloc( key , false ); - - if (input_format == ASCII_TEMPLATE) - util_abort("%s: Sorry can not use INPUT_FORMAT:ASCII_TEMPLATE\n",__func__); - - if (output_format == GEN_DATA_UNDEFINED || input_format == GEN_DATA_UNDEFINED) - util_abort("%s: Sorry must specify valid values for both input and output format\n",__func__); - - config->output_format = output_format; - config->input_format = input_format; - return config; -} - - -gen_data_config_type * gen_data_config_alloc_GEN_DATA_result( const char * key , gen_data_file_format_type input_format) { - gen_data_config_type * config = gen_data_config_alloc( key , true ); - - if (input_format == ASCII_TEMPLATE) - util_abort("%s: Sorry can not use INPUT_FORMAT:ASCII_TEMPLATE\n",__func__); - - if (input_format == GEN_DATA_UNDEFINED) - util_abort("%s: Sorry must specify valid values for input format.\n",__func__); - - config->input_format = input_format; - return config; -} - -gen_data_config_type * gen_data_config_alloc_GEN_DATA_state( const char * key , gen_data_file_format_type output_format , gen_data_file_format_type input_format) { - gen_data_config_type * config = gen_data_config_alloc( key , true ); - - if (input_format == ASCII_TEMPLATE) - util_abort("%s: Sorry can not use INPUT_FORMAT:ASCII_TEMPLATE\n",__func__); - - if (output_format == GEN_DATA_UNDEFINED || input_format == GEN_DATA_UNDEFINED) - util_abort("%s: Sorry must specify valid values for both input and output format\n",__func__); - - config->output_format = output_format; - config->input_format = input_format; - return config; -} - - -const bool_vector_type * gen_data_config_get_active_mask( const gen_data_config_type * config ) { - if (config->dynamic) - return config->active_mask; - else - return NULL; /* GEN_PARAM instance will never be deactivated by the forward model. */ -} - - - - - -bool gen_data_config_set_template( gen_data_config_type * config , const char * template_ecl_file , const char * template_data_key ) { - char * template_buffer = NULL; - bool template_valid = true; - int template_buffer_size; - - if (template_ecl_file) { - if (util_file_readable( template_ecl_file )) { - template_buffer = util_fread_alloc_file_content( template_ecl_file , &template_buffer_size); - if (template_data_key) { - if (strstr(template_buffer , template_data_key) == NULL) - template_valid = false; - } - } else - template_valid = false; - } - - if (template_valid) { - - gen_data_config_reset_template(config); - if (template_ecl_file != NULL) { - char *data_ptr; - config->template_buffer = template_buffer; - config->template_buffer_size = template_buffer_size; - if (template_data_key != NULL) { - data_ptr = strstr(config->template_buffer , template_data_key); - if (data_ptr == NULL) - util_abort("%s: template:%s can not be used - could not find data key:%s \n",__func__ , template_ecl_file , template_data_key); - else { - config->template_data_offset = data_ptr - config->template_buffer; - config->template_data_skip = strlen( template_data_key ); - } - } else { /* We are using a template without a template_data_key - the - data is assumed to come at the end of the template. */ - config->template_data_offset = strlen( config->template_buffer ); - config->template_data_skip = 0; - } - - config->template_file = util_realloc_string_copy( config->template_file , template_ecl_file ); - config->template_key = util_realloc_string_copy( config->template_key , template_data_key ); - - if (config->output_format != ASCII_TEMPLATE) - fprintf(stderr,"**WARNING: The template settings will ignored for key:%s - use OUTPUT_FORMAT:ASCII_TEMPLATE to get template behaviour\n", config->key); - } - - } - return template_valid; -} - - -const char * gen_data_config_get_template_file( const gen_data_config_type * config ) { - return config->template_file; -} - -const char * gen_data_config_get_template_key( const gen_data_config_type * config ) { - return config->template_key; -} - - - - - - - - - -/** - This function takes a string representation of one of the - gen_data_file_format_type values, and returns the corresponding - integer value. - - Will return gen_data_undefined if the string is not recognized, - calling scope must check on this return value. -*/ - - -gen_data_file_format_type gen_data_config_check_format( const void * format_string ) { - gen_data_file_format_type type = GEN_DATA_UNDEFINED; - - if (format_string != NULL) { - - if (strcmp(format_string , "ASCII") == 0) - type = ASCII; - else if (strcmp(format_string , "ASCII_TEMPLATE") == 0) - type = ASCII_TEMPLATE; - else if (strcmp(format_string , "BINARY_DOUBLE") == 0) - type = BINARY_DOUBLE; - else if (strcmp(format_string , "BINARY_FLOAT") == 0) - type = BINARY_FLOAT; - - } - - return type; -} - - -/** - The valid options are: - - INPUT_FORMAT:(ASCII|ASCII_TEMPLATE|BINARY_DOUBLE|BINARY_FLOAT) - OUTPUT_FORMAT:(ASCII|ASCII_TEMPLATE|BINARY_DOUBLE|BINARY_FLOAT) - TEMPLATE:/some/template/file - KEY: - ECL_FILE: Forward model> (In the case of gen_param - this is extracted in the calling scope). - RESULT_FILE: - -*/ - - - - -void gen_data_config_free(gen_data_config_type * config) { - int_vector_free( config->data_size_vector ); - int_vector_free( config->active_report_steps ); - - util_safe_free( config->key ); - util_safe_free( config->template_buffer ); - util_safe_free( config->template_file ); - util_safe_free( config->template_key ); - bool_vector_free( config->active_mask ); - - free(config); -} - - - - -/** - This function gets a size (from a gen_data) instance, and verifies - that the size agrees with the currently stored size and - report_step. If the report_step is new we just record the new info, - otherwise it will break hard. -*/ - - -/** - Does not work properly with: - - 1. keep_run_path - the load_file will be left hanging around - and loaded again and again. - 2. Doing forward several steps - how to (time)index the files? - -*/ - - -void gen_data_config_assert_size(gen_data_config_type * config , int data_size, int report_step) { - pthread_mutex_lock( &config->update_lock ); - { - int current_size = int_vector_safe_iget( config->data_size_vector , report_step ); - if (current_size < 0) { - int_vector_iset( config->data_size_vector , report_step , data_size ); - current_size = data_size; - } - - if (current_size != data_size) { - util_abort("%s: Size mismatch when loading:%s from file - got %d elements - expected:%d [report_step:%d] \n", - __func__ , - gen_data_config_get_key( config ), - data_size , - current_size , - report_step); - } - } - pthread_mutex_unlock( &config->update_lock ); -} - -/** - When the forward model is creating results for GEN_DATA instances, - it can optionally signal that not all elements in the gen_data - should be active (i.e. the forward model failed in some way); that - is handled through this function. When all ensemble members have - called this function the mask config->active_mask should be true - ONLY for the elements which are true for all members. - - This MUST be called after gen_data_config_assert_size(). -*/ - -void gen_data_config_update_active(gen_data_config_type * config, const forward_load_context_type * load_context, const bool_vector_type * data_mask) { - pthread_mutex_lock( &config->update_lock ); - { - int report_step = forward_load_context_get_load_step( load_context ); - if ( int_vector_iget( config->data_size_vector , report_step ) > 0) { - if (config->active_report_step != report_step) { - /* This is the first ensemeble member loading for this - particular report_step. */ - bool_vector_reset( config->active_mask ); - bool_vector_iset( config->active_mask , int_vector_iget( config->data_size_vector , report_step ) - 1 , true ); - config->mask_modified = true; - } - - { - int i; - for (i=0; i < bool_vector_size( data_mask ); i++) { - if (!bool_vector_iget( data_mask , i )) { - bool_vector_iset( config->active_mask , i , false ); - config->mask_modified = true; - } - } - } - - if (config->mask_modified) { - /** - The global mask has been modified after the last load; - i.e. we update the on-disk representation. - */ - char * filename = util_alloc_sprintf("%s_active" , config->key ); - FILE * stream = enkf_fs_open_case_tstep_file( forward_load_context_get_result_fs( load_context ) , - filename , - report_step , - "w"); - - bool_vector_fwrite( config->active_mask , stream ); - - fclose( stream ); - free( filename ); - config->mask_modified = false; - } - } - config->active_report_step = report_step; - } - pthread_mutex_unlock( &config->update_lock ); -} - - -bool gen_data_config_has_active_mask( const gen_data_config_type * config , enkf_fs_type * fs , int report_step) { - bool has_mask; - { - char * filename = util_alloc_sprintf("%s_active" , config->key ); - FILE * stream = enkf_fs_open_excase_tstep_file( fs , filename , report_step); - - if (stream == NULL) - has_mask = false; - else { - has_mask = true; - fclose( stream ); - } - - free( filename ); - } - return has_mask; -} - - -/** - This function will load an active map from the enkf_fs filesystem. -*/ -void gen_data_config_load_active( gen_data_config_type * config , enkf_fs_type * fs, int report_step , bool force_load) { - if (!config->dynamic) - return; /* This is used as a GEN_PARAM instance - and the loading of mask is not an option. */ - - { - bool fs_changed = false; - if (fs != config->last_read_fs) { - config->last_read_fs = fs; - fs_changed = true; - } - - pthread_mutex_lock( &config->update_lock ); - { - if ( force_load || (int_vector_iget( config->data_size_vector , report_step ) > 0)) { - if (config->active_report_step != report_step || fs_changed) { - char * filename = util_alloc_sprintf("%s_active" , config->key ); - FILE * stream = enkf_fs_open_excase_tstep_file( fs , filename , report_step); - - if (stream != NULL) { - bool_vector_fread( config->active_mask , stream ); - fclose( stream ); - } else { - int gen_data_size = int_vector_safe_iget( config->data_size_vector, report_step ); - if (gen_data_size < 0) { - fprintf(stderr,"** Fatal internal error in function:%s \n",__func__); - fprintf(stderr,"\n"); - fprintf(stderr," 1: The active mask file:%s was not found \n",filename); - fprintf(stderr," 2: The size of the gen_data vectors has not been set\n"); - fprintf(stderr,"\n"); - fprintf(stderr,"We can not create a suitable active_mask. Code should call gen_data_config_has_active_mask()\n\n"); - - util_abort("%s: fatal internal error - could not create a suitable active_mask \n",__func__); - } else { - fprintf(stdout,"** Info: could not locate active data elements file %s, filling active vector with true all elements active \n",filename); - bool_vector_reset( config->active_mask ); - bool_vector_iset( config->active_mask, gen_data_size - 1, true); - } - } - free( filename ); - } - } - config->active_report_step = report_step; - } - pthread_mutex_unlock( &config->update_lock ); - } -} - -int gen_data_config_num_report_step( const gen_data_config_type * config ) { - return int_vector_size( config->active_report_steps ); -} - -bool gen_data_config_has_report_step( const gen_data_config_type * config , int report_step) { - return int_vector_contains_sorted( config->active_report_steps , report_step ); -} - -void gen_data_config_add_report_step( gen_data_config_type * config , int report_step) { - if (config->dynamic) { - if (!gen_data_config_has_report_step( config , report_step)) { - int_vector_append( config->active_report_steps , report_step ); - int_vector_sort( config->active_report_steps ); - } - } -} - -int gen_data_config_iget_report_step( const gen_data_config_type *config , int index) { - return int_vector_iget( config->active_report_steps , index ); -} - -void gen_data_config_set_active_report_steps_from_string( gen_data_config_type *config , const char * range_string) { - if (config->dynamic) { - int_vector_reset( config->active_report_steps ); - string_util_update_active_list(range_string , config->active_report_steps ); - } -} - - -const int_vector_type * gen_data_config_get_active_report_steps( const gen_data_config_type *config) { - return config->active_report_steps; -} - -void gen_data_config_set_ens_size( gen_data_config_type * config , int ens_size) { - config->ens_size = ens_size; -} - - -bool gen_data_config_is_dynamic( const gen_data_config_type * config ) { - return config->dynamic; -} - -void gen_data_config_get_template_data( const gen_data_config_type * config , - char ** template_buffer , - int * template_data_offset , - int * template_buffer_size , - int * template_data_skip) { - - *template_buffer = config->template_buffer; - *template_data_offset = config->template_data_offset; - *template_buffer_size = config->template_buffer_size; - *template_data_skip = config->template_data_skip; - -} - - -bool gen_data_config_valid_result_format(const char * result_file_fmt) { - if (result_file_fmt) { - if (util_is_abs_path( result_file_fmt )) - return false; - else { - if (util_int_format_count(result_file_fmt) == 1) - return true; - else - return false; - } - } else - return false; -} - - -const char * gen_data_config_get_key( const gen_data_config_type * config) { - return config->key; -} - -static const char * gen_data_config_format_name( gen_data_file_format_type format_type) { - switch (format_type ) { - case GEN_DATA_UNDEFINED: - return "UNDEFINED"; - break; - case ASCII: - return "ASCII"; - break; - case ASCII_TEMPLATE: - return "ASCII_TEMPLATE"; - break; - case BINARY_FLOAT: - return "BINARY_FLOAT"; - break; - case BINARY_DOUBLE: - return "BINARY_DOUBLE"; - break; - default: - util_abort("%s: What the f.. \n",__func__); - return NULL; - } -} - - -void gen_data_config_fprintf_config( const gen_data_config_type * config , enkf_var_type var_type , const char * outfile , const char * infile , - const char * min_std_file , FILE * stream) { - if (var_type == PARAMETER) - fprintf( stream , CONFIG_VALUE_FORMAT , outfile ); - else - fprintf( stream , CONFIG_OPTION_FORMAT , ECL_FILE_KEY , outfile ); - - if (min_std_file != NULL) - fprintf( stream , CONFIG_OPTION_FORMAT , MIN_STD_KEY , min_std_file ); - - if (config->template_file != NULL) - fprintf( stream , CONFIG_OPTION_FORMAT , TEMPLATE_KEY , config->template_file ); - - if (config->template_key != NULL) - fprintf( stream , CONFIG_OPTION_FORMAT , KEY_KEY , config->template_key ); - - if (infile != NULL) - fprintf( stream , CONFIG_OPTION_FORMAT , RESULT_FILE_KEY , infile ); - - if (config->input_format != GEN_DATA_UNDEFINED) - fprintf( stream , CONFIG_OPTION_FORMAT , INPUT_FORMAT_KEY , gen_data_config_format_name( config->input_format )); - - if (config->output_format != GEN_DATA_UNDEFINED) - fprintf( stream , CONFIG_OPTION_FORMAT , OUTPUT_FORMAT_KEY , gen_data_config_format_name( config->output_format )); -} - - - -/*****************************************************************/ - -VOID_FREE(gen_data_config) diff --git a/ThirdParty/Ert/libenkf/src/gen_kw.c b/ThirdParty/Ert/libenkf/src/gen_kw.c deleted file mode 100644 index 2399da9b97..0000000000 --- a/ThirdParty/Ert/libenkf/src/gen_kw.c +++ /dev/null @@ -1,501 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'gen_kw.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include - -GET_DATA_SIZE_HEADER(gen_kw); - - -struct gen_kw_struct { - int __type_id; - const gen_kw_config_type * config; - double * data; - subst_list_type * subst_list; -}; - -/*****************************************************************/ - - - -void gen_kw_free(gen_kw_type *gen_kw) { - util_safe_free( gen_kw->data ); - subst_list_free( gen_kw->subst_list ); - free(gen_kw); -} - - - - - -gen_kw_type * gen_kw_alloc(const gen_kw_config_type * config) { - gen_kw_type * gen_kw = util_malloc(sizeof *gen_kw ); - gen_kw->__type_id = GEN_KW; - gen_kw->config = config; - gen_kw->subst_list = subst_list_alloc( NULL ); - gen_kw->data = util_calloc( gen_kw_config_get_data_size( config ) , sizeof * gen_kw->data ); - return gen_kw; -} - - -void gen_kw_clear(gen_kw_type * gen_kw) { - int i; - for (i=0; i < gen_kw_config_get_data_size( gen_kw->config ); i++) - gen_kw->data[i] = 0.0; -} - - - -void gen_kw_copy(const gen_kw_type * src , gen_kw_type * target) { - if (src->config == target->config) { - int buffer_size = gen_kw_config_get_data_size( src->config ) * sizeof src->data; - memcpy( target->data , src->data , buffer_size ); - } else - util_abort("%s: two elements do not share config object \n",__func__); -} - - - -int gen_kw_data_size( gen_kw_type * gen_kw ) { - return gen_kw_config_get_data_size( gen_kw->config ); -} - - - -double gen_kw_data_iget( gen_kw_type * gen_kw, int index , bool do_transform ) -{ - double value; - int size = gen_kw_config_get_data_size( gen_kw->config ); - if (( index < 0 ) || ( index >= size )) - util_abort( "%s: index:%d invalid. Valid interval: [0,%d>.\n" , __func__ , index , size ); - - if (do_transform) { - value = gen_kw_config_transform(gen_kw->config, index, gen_kw->data[index]); - } - else { - value = gen_kw->data[index]; - } - - return value; -} - - -void gen_kw_data_set_vector( gen_kw_type * gen_kw, const double_vector_type * values ) { - int size = gen_kw_config_get_data_size( gen_kw->config ); - if (size == double_vector_size( values )) { - for (int index = 0; index < size; index++) - gen_kw->data[index] = double_vector_iget( values , index); - } else - util_abort( "%s: Invalid size for vector:%d gen_Kw:%d \n",__func__ , double_vector_size( values ) , size); -} - - - -void gen_kw_data_iset( gen_kw_type * gen_kw, int index , double value ) -{ - int size = gen_kw_config_get_data_size( gen_kw->config ); - if (( index < 0 ) || ( index >= size )) - util_abort( "%s: index:%d invalid. Valid interval: [0,%d>.\n" , __func__ , index , size ); - - gen_kw->data[index] = value; -} - - -double gen_kw_data_get( gen_kw_type * gen_kw, const char * subkey, bool do_transform ) -{ - int index = gen_kw_config_get_index(gen_kw->config, subkey); - return gen_kw_data_iget(gen_kw, index, do_transform); -} - -void gen_kw_data_set( gen_kw_type * gen_kw, const char * subkey, double value ) -{ - int index = gen_kw_config_get_index(gen_kw->config, subkey); - return gen_kw_data_iset(gen_kw, index, value); -} - - -bool gen_kw_data_has_key( gen_kw_type * gen_kw, const char * subkey ) -{ - int index = gen_kw_config_get_index(gen_kw->config, subkey); - bool has_key = ((0 <= index) && (gen_kw_data_size(gen_kw) > index))? true : false; - return has_key; -} - -bool gen_kw_write_to_buffer(const gen_kw_type *gen_kw , buffer_type * buffer, int report_step) { - const int data_size = gen_kw_config_get_data_size( gen_kw->config ); - buffer_fwrite_int( buffer , GEN_KW ); - buffer_fwrite(buffer , gen_kw->data , sizeof *gen_kw->data , data_size); - return true; -} - - - - -/** - As of 17/03/09 (svn 1811) MULTFLT has been depreceated, and GEN_KW - has been inserted as a 'drop-in-replacement'. This implies that - existing storage labeled with implemantation type 'MULTFLT' should - be silently 'upgraded' to 'GEN_KW'. -*/ - - -#define MULTFLT 102 -void gen_kw_read_from_buffer(gen_kw_type * gen_kw , buffer_type * buffer, enkf_fs_type * fs, int report_step) { - const int data_size = gen_kw_config_get_data_size( gen_kw->config ); - ert_impl_type file_type; - file_type = buffer_fread_int(buffer); - if ((file_type == GEN_KW) || (file_type == MULTFLT)) - buffer_fread(buffer , gen_kw->data , sizeof *gen_kw->data , data_size); -} -#undef MULTFLT - - -void gen_kw_truncate(gen_kw_type * gen_kw) { - return ; -} - - - -bool gen_kw_initialize(gen_kw_type *gen_kw , int iens , const char * init_file , rng_type * rng ) { - if (!init_file && !rng) - util_abort("%s internal error: both init_file and rng are NULL", __func__); - - bool ret = false; - - if (init_file) - ret = gen_kw_fload(gen_kw , init_file ); - else { - const double mean = 0.0; /* Mean and std are hardcoded - the variability should be in the transformation. */ - const double std = 1.0; - const int data_size = gen_kw_config_get_data_size( gen_kw->config ); - int i; - - for (i=0; i < data_size; i++) - gen_kw->data[i] = enkf_util_rand_normal(mean , std , rng); - - ret = true; - } - return ret; -} - - - - - -void gen_kw_serialize(const gen_kw_type *gen_kw , node_id_type node_id , const active_list_type * active_list , matrix_type * A , int row_offset , int column) { - const int data_size = gen_kw_config_get_data_size( gen_kw->config ); - enkf_matrix_serialize( gen_kw->data , data_size , ECL_DOUBLE_TYPE , active_list , A , row_offset , column); -} - - -void gen_kw_deserialize(gen_kw_type *gen_kw , node_id_type node_id , const active_list_type * active_list , const matrix_type * A , int row_offset , int column) { - const int data_size = gen_kw_config_get_data_size( gen_kw->config ); - enkf_matrix_deserialize( gen_kw->data , data_size , ECL_DOUBLE_TYPE , active_list , A , row_offset , column); -} - - - -void gen_kw_filter_file(const gen_kw_type * gen_kw , const char * target_file) { - const char * template_file = gen_kw_config_get_template_file(gen_kw->config); - if (template_file != NULL) { - const int size = gen_kw_config_get_data_size(gen_kw->config ); - int ikw; - - for (ikw = 0; ikw < size; ikw++) { - const char * key = gen_kw_config_get_tagged_name(gen_kw->config , ikw); - subst_list_append_owned_ref(gen_kw->subst_list , key , util_alloc_sprintf("%g" , gen_kw_config_transform( gen_kw->config , ikw , gen_kw->data[ikw] )) , NULL); - } - - /* - If the target_file already exists as a symbolic link the - symbolic link is removed before creating the target file. The is - to ensure against existing symlinks pointing to a common file - outside the realization root. - */ - if (util_is_link( target_file )) - remove( target_file ); - - subst_list_filter_file( gen_kw->subst_list , template_file , target_file); - } else - util_abort("%s: internal error - tried to filter gen_kw instance without template file.\n",__func__); -} - - -void gen_kw_write_export_file(const gen_kw_type * gen_kw, FILE * filestream) { - const int size = gen_kw_config_get_data_size(gen_kw->config ); - int ikw; - - for (ikw = 0; ikw < size; ++ikw) { - const char * key = gen_kw_config_get_key(gen_kw->config); - const char * parameter = gen_kw_config_iget_name(gen_kw->config , ikw); - int width = 60 - (strlen(key) + strlen(parameter) + 1); - double transformed_value = gen_kw_config_transform( gen_kw->config , ikw , gen_kw->data[ikw] ); - { - char * print_string = util_alloc_sprintf("%s:%s %g\n", key, parameter, width, transformed_value); - fprintf(filestream, "%s", print_string); - free( print_string ); - } - - if (gen_kw_config_should_use_log_scale(gen_kw->config, ikw)) { - double log_transformed_value = log10(transformed_value); - char * print_log_string = util_alloc_sprintf("LOG10_%s:%s %g\n", key, parameter, width, log_transformed_value); - fprintf(filestream, "%s", print_log_string); - free( print_log_string ); - } - } -} - -void gen_kw_ecl_write_template(const gen_kw_type * gen_kw , const char * file_name){ - gen_kw_filter_file(gen_kw , file_name); -} - - -void gen_kw_ecl_write(const gen_kw_type * gen_kw , const char * run_path , const char * base_file , void * filestream) { - if (fortio_is_instance(filestream)) { - util_abort("%s: Called with fortio instance, aborting\n", __func__); - } else { - if (filestream) - gen_kw_write_export_file(gen_kw, filestream); - { - char * target_file; - if (run_path) - target_file = util_alloc_filename( run_path , base_file , NULL); - else - target_file = util_alloc_string_copy( base_file ); - - gen_kw_filter_file(gen_kw , target_file); - - free( target_file ); - } - } -} - - - -const char * gen_kw_get_name(const gen_kw_type * gen_kw, int kw_nr) { - return gen_kw_config_iget_name(gen_kw->config , kw_nr); -} - - -/** - This function will load values for gen_kw instance from file. The - file should be formatted as either: - - ------- - Value1 - Value2 - Value3 - .... - ValueN - ------- - - Or - - ------------ - Key3 Value3 - Key5 Value5 - Key1 Value1 - ..... - ------------ - - I.e. you can either just dump in all the numbers in one long - vector, or you can interlace numbers and keys. In the latter case - the ordering is arbitrary. - - Observe the following: - - 1. All values must be specified. - 2. The values are in the N(0,1) domain, i.e. the untransformed variables. - -*/ - -bool gen_kw_fload(gen_kw_type * gen_kw , const char * filename) { - FILE * stream = util_fopen__( filename , "r"); - if (stream) { - const int size = gen_kw_config_get_data_size(gen_kw->config ); - bool readOK = true; - - /* First try reading all the data as one long vector. */ - { - int index = 0; - while ((index < size) && readOK) { - double value; - if (fscanf(stream,"%lg" , &value) == 1) - gen_kw->data[index] = value; - else - readOK = false; - index++; - } - } - - /* - OK - rewind and try again with interlaced key + value - pairs. Observe that we still require that ALL the elements in the - gen_kw instance are set, i.e. it is not allowed to read only some - of the keywords; but the ordering is not relevant. - - The code will be fooled (and give undefined erronous results) if - the same key appears several times. Be polite! - */ - - if (!readOK) { - int counter = 0; - readOK = true; - util_fseek( stream , 0 , SEEK_SET ); - - while ((counter < size) && readOK) { - char key[128]; - double value; - int fscanf_return = fscanf(stream , "%s %lg" , key , &value); - - if (fscanf_return == 2) { - int index = gen_kw_config_get_index(gen_kw->config , key); - if (index >= 0) - gen_kw->data[index] = value; - else - util_abort("%s: key:%s not recognized as part of GEN_KW instance - error when reading file:%s \n",__func__ , key , filename); - counter++; - } else { - util_abort("%s: failed to read (key,value) pair at line:%d in file:%s \n",__func__ , util_get_current_linenr( stream ) , filename); - readOK = false; - } - } - } - - if (!readOK) - util_abort("%s: failed loading from file:%s \n",__func__ , filename); - - fclose(stream); - return true; - } else - return false; -} - - - -/** - Will return 0.0 on invalid input, and set valid -> false. It is the - responsibility of the calling scope to check valid. -*/ -bool gen_kw_user_get(const gen_kw_type * gen_kw, const char * key , int report_step , double * value) { - int index = gen_kw_config_get_index(gen_kw->config , key); - - if (index >= 0) { - *value = gen_kw_config_transform(gen_kw->config , index , gen_kw->data[ index ] ); - return true; - } else { - *value = 0.0; - fprintf(stderr,"** Warning:could not lookup key:%s in gen_kw instance \n",key); - return false; - } -} - - -void gen_kw_set_subst_parent(gen_kw_type * gen_kw , const subst_list_type * subst_parent) { - subst_list_set_parent( gen_kw->subst_list , subst_parent ); -} - - -void gen_kw_set_inflation(gen_kw_type * inflation , const gen_kw_type * std , const gen_kw_type * min_std) { - const int data_size = gen_kw_config_get_data_size(std->config ); - const double * std_data = std->data; - const double * min_std_data = min_std->data; - double * inflation_data = inflation->data; - - { - for (int i=0; i < data_size; i++) { - if (std_data[i] > 0) - inflation_data[i] = util_double_max( 1.0 , min_std_data[i] / std_data[i]); - else - inflation_data[i] = 1; - } - } -} - - -void gen_kw_iadd( gen_kw_type * gen_kw , const gen_kw_type * delta) { - const int data_size = gen_kw_config_get_data_size( gen_kw->config ); - for(int i=0; i < data_size; i++) - gen_kw->data[i] += delta->data[i]; -} - -void gen_kw_iaddsqr( gen_kw_type * gen_kw , const gen_kw_type * delta) { - const int data_size = gen_kw_config_get_data_size( gen_kw->config ); - for(int i=0; i < data_size; i++) - gen_kw->data[i] += (delta->data[i] * delta->data[i]); -} - -void gen_kw_imul( gen_kw_type * gen_kw , const gen_kw_type * delta) { - const int data_size = gen_kw_config_get_data_size( gen_kw->config ); - for(int i=0; i < data_size; i++) - gen_kw->data[i] *= delta->data[i]; -} - -void gen_kw_scale( gen_kw_type * gen_kw , double scale_factor) { - const int data_size = gen_kw_config_get_data_size( gen_kw->config ); - for(int i=0; i < data_size; i++) - gen_kw->data[i] *= scale_factor; -} - -void gen_kw_isqrt( gen_kw_type * gen_kw ) { - const int data_size = gen_kw_config_get_data_size( gen_kw->config ); - for(int i=0; i < data_size; i++) - gen_kw->data[i] = sqrt( gen_kw->data[i] ); -} - - -/******************************************************************/ -/* Anonumously generated functions used by the enkf_node object */ -/******************************************************************/ -UTIL_SAFE_CAST_FUNCTION(gen_kw , GEN_KW); -UTIL_SAFE_CAST_FUNCTION_CONST(gen_kw , GEN_KW); -VOID_ALLOC(gen_kw); -VOID_INITIALIZE(gen_kw); -VOID_COPY(gen_kw) -VOID_FREE(gen_kw) -VOID_ECL_WRITE(gen_kw) -VOID_USER_GET(gen_kw) -VOID_WRITE_TO_BUFFER(gen_kw) -VOID_READ_FROM_BUFFER(gen_kw) -VOID_SERIALIZE(gen_kw) -VOID_DESERIALIZE(gen_kw) -VOID_SET_INFLATION(gen_kw) -VOID_CLEAR(gen_kw) -VOID_IADD(gen_kw) -VOID_SCALE(gen_kw) -VOID_IMUL(gen_kw) -VOID_IADDSQR(gen_kw) -VOID_ISQRT(gen_kw) -VOID_FLOAD(gen_kw) diff --git a/ThirdParty/Ert/libenkf/src/gen_kw_config.c b/ThirdParty/Ert/libenkf/src/gen_kw_config.c deleted file mode 100644 index 65c475d09e..0000000000 --- a/ThirdParty/Ert/libenkf/src/gen_kw_config.c +++ /dev/null @@ -1,327 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'gen_kw_config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#define GEN_KW_CONFIG_TYPE_ID 550761 -#define GEN_KW_PARAMETER_TYPE_ID 886201 - - -typedef struct { - UTIL_TYPE_ID_DECLARATION; - char * name; - char * tagged_name; - trans_func_type * trans_func; -} gen_kw_parameter_type; - - - -struct gen_kw_config_struct { - UTIL_TYPE_ID_DECLARATION; - char * key; - vector_type * parameters; /* Vector of gen_kw_parameter_type instances. */ - char * template_file; - char * parameter_file; - const char * tag_fmt; /* Pointer to the tag_format owned by the ensemble config object. */ -}; - - -/*****************************************************************/ - -UTIL_SAFE_CAST_FUNCTION( gen_kw_parameter , GEN_KW_PARAMETER_TYPE_ID ) -UTIL_SAFE_CAST_FUNCTION_CONST( gen_kw_parameter , GEN_KW_PARAMETER_TYPE_ID ) - - -UTIL_SAFE_CAST_FUNCTION( gen_kw_config , GEN_KW_CONFIG_TYPE_ID ) -UTIL_SAFE_CAST_FUNCTION_CONST( gen_kw_config , GEN_KW_CONFIG_TYPE_ID ) - -static void gen_kw_parameter_update_tagged_name( gen_kw_parameter_type * parameter , const char * tag_fmt) { - if (tag_fmt != NULL) - parameter->tagged_name = util_realloc_sprintf( parameter->tagged_name , tag_fmt , parameter->name ); -} - - -static gen_kw_parameter_type * gen_kw_parameter_alloc( const char * parameter_name , const char * tag_fmt ) { - gen_kw_parameter_type * parameter = util_malloc( sizeof * parameter ); - UTIL_TYPE_ID_INIT( parameter , GEN_KW_PARAMETER_TYPE_ID); - parameter->name = util_alloc_string_copy( parameter_name ); - parameter->tagged_name = NULL; - parameter->trans_func = NULL; - gen_kw_parameter_update_tagged_name( parameter , tag_fmt ); - return parameter; -} - - -static void gen_kw_parameter_free( gen_kw_parameter_type * parameter ) { - util_safe_free( parameter->name ); - util_safe_free( parameter->tagged_name ); - if (parameter->trans_func != NULL) - trans_func_free( parameter->trans_func ); - free( parameter ); -} - - -static void gen_kw_parameter_free__( void * __parameter ) { - gen_kw_parameter_type * parameter = gen_kw_parameter_safe_cast( __parameter ); - gen_kw_parameter_free( parameter ); -} - - -static void gen_kw_parameter_set_trans_func( gen_kw_parameter_type * parameter , trans_func_type * trans_func ) { - if (parameter->trans_func != NULL) - trans_func_free( parameter->trans_func ); - parameter->trans_func = trans_func; -} - - - -/*****************************************************************/ - - -const char * gen_kw_config_get_template_file(const gen_kw_config_type * config) { - return config->template_file; -} - - -/* - The input template file must point to an existing file. -*/ -void gen_kw_config_set_template_file( gen_kw_config_type * config , const char * template_file ) { - if (template_file != NULL) { - if (!util_file_exists(template_file)) - util_abort("%s: the template_file:%s does not exist - aborting.\n",__func__ , template_file); - } - - config->template_file = util_realloc_string_copy( config->template_file , template_file ); -} - - - -void gen_kw_config_set_parameter_file( gen_kw_config_type * config , const char * parameter_file ) { - config->parameter_file = util_realloc_string_copy( config->parameter_file , parameter_file ); - vector_clear( config->parameters ); - if (parameter_file != NULL) { - FILE * stream = util_fopen(parameter_file , "r"); - - while (true) { - char parameter_name[256]; - int fscanf_return; - - fscanf_return = fscanf(stream , "%s" , parameter_name); - if (fscanf_return == 1) { - gen_kw_parameter_type * parameter = gen_kw_parameter_alloc( parameter_name , config->tag_fmt); - trans_func_type * trans_func = trans_func_fscanf_alloc( stream, parameter_file ); - gen_kw_parameter_set_trans_func( parameter , trans_func ); - - vector_append_owned_ref( config->parameters , parameter , gen_kw_parameter_free__ ); - } else - break; /* OK - we are ate EOF. */ - } - - fclose( stream ); - } -} - - - - -const char * gen_kw_config_get_parameter_file( const gen_kw_config_type * config ) { - return config->parameter_file; -} - - -/** - Unfortunately the GUI makes it necessary(??) to be able to create - halfways initialized gen_kw_config objects; and we then have to be - able to query the gen_kw_config object if it is valid. Observe that - some of the required config information will be owned by the - enkf_config_node itself, this function should therefor NOT be - called directly, only through the enkf_config_node_is_valid() - function. - - Requirements: - ------------- - * template_file != NULL - * parameter_file != NULL (this means that the special schedule_prediction_file keyword will be invalid). - -*/ - -bool gen_kw_config_is_valid( const gen_kw_config_type * config ) { - if (config->template_file != NULL && config->parameter_file != NULL) - return true; - else - return false; -} - - -/** - A call to gen_kw_config_update_tag_format() must be called - afterwards, otherwise all tagged strings will just be NULL. -*/ -gen_kw_config_type * gen_kw_config_alloc_empty( const char * key , const char * tag_fmt ) { - gen_kw_config_type *gen_kw_config = util_malloc(sizeof *gen_kw_config); - UTIL_TYPE_ID_INIT(gen_kw_config , GEN_KW_CONFIG_TYPE_ID); - - gen_kw_config->key = NULL; - gen_kw_config->template_file = NULL; - gen_kw_config->parameter_file = NULL; - gen_kw_config->parameters = vector_alloc_new(); - gen_kw_config->tag_fmt = tag_fmt; - gen_kw_config->key = util_alloc_string_copy( key ); - - return gen_kw_config; -} - - - -void gen_kw_config_update( gen_kw_config_type * config , const char * template_file , const char * parameter_file ) { - gen_kw_config_set_template_file( config , template_file); - gen_kw_config_set_parameter_file( config , parameter_file ); -} - - - -double gen_kw_config_transform(const gen_kw_config_type * config , int index, double x) { - const gen_kw_parameter_type * parameter = vector_iget_const( config->parameters , index ); - return trans_func_eval( parameter->trans_func , x); -} - -bool gen_kw_config_should_use_log_scale(const gen_kw_config_type * config, int index) { - const gen_kw_parameter_type * parameter = vector_iget_const( config->parameters , index ); - return trans_func_use_log_scale( parameter->trans_func); -} - -void gen_kw_config_free(gen_kw_config_type * gen_kw_config) { - util_safe_free( gen_kw_config->key ); - util_safe_free( gen_kw_config->template_file ); - util_safe_free( gen_kw_config->parameter_file ); - - vector_free( gen_kw_config->parameters ); - free(gen_kw_config); -} - - - -int gen_kw_config_get_data_size(const gen_kw_config_type * gen_kw_config) { - return vector_get_size(gen_kw_config->parameters); -} - - - -const char * gen_kw_config_get_key(const gen_kw_config_type * config ) { - return config->key; -} - - -char * gen_kw_config_alloc_user_key(const gen_kw_config_type * config , int kw_nr) { - char * user_key = util_alloc_sprintf("%s:%s" , config->key ,gen_kw_config_iget_name( config , kw_nr )); - return user_key; -} - - -const char * gen_kw_config_iget_name(const gen_kw_config_type * config, int kw_nr) { - const gen_kw_parameter_type * parameter = vector_iget( config->parameters , kw_nr ); - return parameter->name; -} - - - - -const char * gen_kw_config_get_tagged_name(const gen_kw_config_type * config, int kw_nr) { - const gen_kw_parameter_type * parameter = vector_iget( config->parameters , kw_nr ); - return parameter->tagged_name; -} - - -void gen_kw_config_update_tag_format(gen_kw_config_type * config , const char * tag_format) { - int i; - - config->tag_fmt = tag_format; - for (i=0; i < vector_get_size( config->parameters ); i++) - gen_kw_parameter_update_tagged_name( vector_iget( config->parameters , i ) , config->tag_fmt); -} - - -stringlist_type * gen_kw_config_alloc_name_list( const gen_kw_config_type * config ) { - - stringlist_type * name_list = stringlist_alloc_new(); - int i; - for (i=0; i < vector_get_size( config->parameters ); i++) { - const gen_kw_parameter_type * parameter = vector_iget_const( config->parameters , i ); - stringlist_append_ref( name_list , parameter->name ); /* If the underlying parameter goes out scope - whom bang .. */ - } - - return name_list; -} - - - - - -/** - Will return -1 if the index is invalid. -*/ -int gen_kw_config_get_index(const gen_kw_config_type * config , const char * key) { - const int size = gen_kw_config_get_data_size(config); - bool have_key = false; - int index = 0; - - while (index < size && !have_key) { - const gen_kw_parameter_type * parameter = vector_iget_const( config->parameters , index ); - if (strcmp(parameter->name , key) == 0) - have_key = true; - else - index++; - } - - if (have_key) - return index; - else - return -1; -} - - - -void gen_kw_config_fprintf_config( const gen_kw_config_type * config , const char * outfile , const char * min_std_file , FILE * stream ) { - fprintf(stream , CONFIG_VALUE_FORMAT , config->template_file ); - fprintf(stream , CONFIG_VALUE_FORMAT , outfile ); - fprintf(stream , CONFIG_VALUE_FORMAT , config->parameter_file ); - - if (min_std_file != NULL) - fprintf( stream , CONFIG_OPTION_FORMAT , MIN_STD_KEY , min_std_file); - -} - - -/*****************************************************************/ - -VOID_FREE(gen_kw_config) -VOID_GET_DATA_SIZE(gen_kw) diff --git a/ThirdParty/Ert/libenkf/src/gen_obs.c b/ThirdParty/Ert/libenkf/src/gen_obs.c deleted file mode 100644 index f7045be338..0000000000 --- a/ThirdParty/Ert/libenkf/src/gen_obs.c +++ /dev/null @@ -1,510 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'gen_obs.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -/** - See the overview documentation of the observation system in - enkf_obs.c -*/ -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -/** - This file implemenets a structure for general observations. A - general observation is just a vector of numbers - where EnKF has no - understanding whatsover of the type of these data. The actual data - is supposed to be found in a file. - - Currently it can only observe gen_data instances - but that should - be generalized. -*/ - -/* - The std_scaling field of the xxx_obs structure can be used to scale - the standard deviation used for the observations, either to support - workflows with multiple data assimilation or to reduce the effect of - observation correlations. - - When querying for the observation standard deviation using - gen_obs_iget_std() the user input value of standard deviation will - be returned, whereas when the function gen_obs_measure() is used the - std_scaling will be incorporated in the result. -*/ - -#define GEN_OBS_TYPE_ID 77619 - -struct gen_obs_struct { - UTIL_TYPE_ID_DECLARATION; - int obs_size; /* This is the total size of the observation vector. */ - int * data_index_list; /* The indexes which are observed in the corresponding gen_data instance - of length obs_size. */ - bool observe_all_data; /* Flag which indiactes whether all data in the gen_data instance should be observed - in that case we must do a size comparizon-check at use time. */ - - double * obs_data; /* The observed data. */ - double * obs_std; /* The observed standard deviation. */ - double * std_scaling; /* Scaling factor for the standard deviation */ - - char * obs_key; /* The key this observation is held by - in the enkf_obs structur (only for debug messages). */ - gen_data_file_format_type obs_format; /* The format, i.e. ASCII, binary_double or binary_float, of the observation file. */ - matrix_type * error_covar; - gen_data_config_type * data_config; -}; - -/******************************************************************/ - - -static UTIL_SAFE_CAST_FUNCTION_CONST(gen_obs , GEN_OBS_TYPE_ID) -static UTIL_SAFE_CAST_FUNCTION(gen_obs , GEN_OBS_TYPE_ID) - -void gen_obs_free(gen_obs_type * gen_obs) { - util_safe_free(gen_obs->obs_data); - util_safe_free(gen_obs->obs_std); - util_safe_free(gen_obs->data_index_list); - util_safe_free(gen_obs->obs_key); - util_safe_free(gen_obs->std_scaling); - if (gen_obs->error_covar != NULL) - matrix_free( gen_obs->error_covar ); - - free(gen_obs); -} - - -static double IGET_SCALED_STD(const gen_obs_type * gen_obs, int index) { - return gen_obs->obs_std[index] * gen_obs->std_scaling[index]; -} - - -/** - This function loads the actual observations from disk, and - initializes the obs_data and obs_std pointers with the - observations. It also sets the obs_size field of the gen_obs - instance. - - The file with observations should be a long vector of 2N elements, - where the first N elements are data values, and the last N values - are the corresponding standard deviations. - - The file is loaded with the gen_common_fload_alloc() function, and - can be in formatted ASCII or binary_float / binary_double. Observe - that there is *NO* header information in this file. -*/ - - -static void gen_obs_set_data(gen_obs_type * gen_obs, int buffer_size , const double * buffer) { - gen_obs->obs_size = buffer_size / 2; - gen_obs->obs_data = util_realloc(gen_obs->obs_data , gen_obs->obs_size * sizeof * gen_obs->obs_data ); - gen_obs->obs_std = util_realloc(gen_obs->obs_std , gen_obs->obs_size * sizeof * gen_obs->obs_std ); - gen_obs->std_scaling = util_realloc(gen_obs->std_scaling , gen_obs->obs_size * sizeof * gen_obs->std_scaling ); - gen_obs->data_index_list = util_realloc(gen_obs->data_index_list , gen_obs->obs_size * sizeof * gen_obs->data_index_list ); - { - int iobs; - double * double_buffer = (double * ) buffer; - for (iobs = 0; iobs < gen_obs->obs_size; iobs++) { - gen_obs->obs_data[iobs] = double_buffer[2*iobs]; - gen_obs->obs_std[iobs] = double_buffer[2*iobs + 1]; - gen_obs->std_scaling[iobs] = 1.0; - gen_obs->data_index_list[iobs] = iobs; - - } - } -} - - -void gen_obs_load_observation(gen_obs_type * gen_obs, const char * obs_file) { - ecl_type_enum load_type; - void * buffer; - int buffer_size = 0; - buffer = gen_common_fload_alloc(obs_file , gen_obs->obs_format , ECL_DOUBLE_TYPE , &load_type , &buffer_size); - - /** Ensure that the data is of type double. */ - if (load_type == ECL_FLOAT_TYPE) { - double * double_data = util_calloc(gen_obs->obs_size , sizeof * double_data ); - util_float_to_double(double_data , (const float *) buffer , buffer_size); - free(buffer); - buffer = double_data; - } - - gen_obs_set_data( gen_obs , buffer_size , buffer ); - free(buffer); -} - - - -void gen_obs_set_scalar( gen_obs_type * gen_obs , double scalar_value , double scalar_std) { - double buffer[2] = { scalar_value , scalar_std }; - gen_obs_set_data( gen_obs , 2 , buffer ); -} - -void gen_obs_attach_data_index( gen_obs_type * obs , const int_vector_type * data_index ) { - util_safe_free( obs->data_index_list ); - obs->data_index_list = int_vector_alloc_data_copy( data_index ); - obs->observe_all_data = false; -} - - -void gen_obs_load_data_index( gen_obs_type * obs , const char * data_index_file) { - /* Parsing an a file with integers. */ - util_safe_free( obs->data_index_list ); - obs->data_index_list = gen_common_fscanf_alloc( data_index_file , ECL_INT_TYPE , &obs->obs_size); - obs->observe_all_data = false; -} - - -void gen_obs_parse_data_index( gen_obs_type * obs , const char * data_index_string) { - /* Parsing a string of the type "1,3,5,9-100,200,202,300-1000" */ - int_vector_type * index_list = string_util_alloc_active_list( data_index_string ); - int_vector_shrink( index_list ); - gen_obs_attach_data_index( obs , index_list ); - int_vector_free( index_list ); -} - - - -gen_obs_type * gen_obs_alloc__(gen_data_config_type * data_config , const char * obs_key) { - gen_obs_type * obs = util_malloc(sizeof * obs); - UTIL_TYPE_ID_INIT( obs , GEN_OBS_TYPE_ID ); - obs->obs_data = NULL; - obs->obs_std = NULL; - obs->std_scaling = NULL; - obs->data_index_list = NULL; - obs->obs_format = ASCII; /* Hardcoded for now. */ - obs->obs_key = util_alloc_string_copy( obs_key ); - obs->data_config = data_config; - obs->observe_all_data = true; - obs->error_covar = NULL; - return obs; -} - - -/** - data_index_file is the name of a file with indices which should be - observed, data_inde_string is the same, in the form of a - "1,2,3,4-10, 17,19,22-100" string. Only one of these items can be - != NULL. If both are NULL it is assumed that all the indices of the - gen_data instance should be observed. - - @error_covar_file is the name of file which contains a matrix of - error-covariance. The file data will be read with the function - matrix_fscanf_data(), i.e. it should consist of formatted - numbers. Since the matrix is symmetric it does not matter whether - it is represented in row-major or column-major order; newlines for - pretty reading can be inserted but are not necessary. - - The error_covar_file should contain NO header information. -*/ - - -gen_obs_type * gen_obs_alloc(gen_data_config_type * data_config , const char * obs_key , const char * obs_file , double scalar_value , double scalar_error , const char * data_index_file , const char * data_index_string , const char * error_covar_file) { - gen_obs_type * obs = gen_obs_alloc__( data_config , obs_key ); - if (obs_file) - gen_obs_load_observation(obs , obs_file ); /* The observation data is loaded - and internalized at boot time - even though it might not be needed for a long time. */ - else - gen_obs_set_scalar( obs , scalar_value , scalar_error ); - - - if (data_index_file) - gen_obs_load_data_index( obs , data_index_file ); - else if (data_index_string) - gen_obs_parse_data_index( obs , data_index_string ); - - - if (error_covar_file != NULL) { - FILE * stream = util_fopen( error_covar_file , "r"); - - obs->error_covar = matrix_alloc( obs->obs_size , obs->obs_size ); - matrix_fscanf_data( obs->error_covar , false , stream ); - - fclose( stream ); - } else - obs->error_covar = NULL; - - return obs; -} - - - -static void gen_obs_assert_data_size(const gen_obs_type * gen_obs, const gen_data_type * gen_data) { - if (gen_obs->observe_all_data) { - int data_size = gen_data_get_size( gen_data ); - if (gen_obs->obs_size != data_size) - util_abort("%s: size mismatch: Observation: %s:%d Data: %s:%d \n" , __func__ , gen_obs->obs_key , gen_obs->obs_size , gen_data_get_key( gen_data ) , data_size); - - } - /* - Else the user has explicitly entered indices to observe in the - gen_data instances, and we just have to trust them (however the - gen_data_iget() does a range check. - */ -} - - -double gen_obs_chi2(const gen_obs_type * gen_obs , const gen_data_type * gen_data, node_id_type node_id) { - gen_obs_assert_data_size(gen_obs , gen_data); - { - const bool_vector_type * forward_model_active = gen_data_config_get_active_mask( gen_obs->data_config ); - double sum_chi2 = 0; - for (int iobs = 0; iobs < gen_obs->obs_size; iobs++) { - int data_index = gen_obs->data_index_list[iobs]; - if (forward_model_active && (bool_vector_iget( forward_model_active , data_index ) == false)) - continue; /* Forward model has deactivated this index - just continue. */ - { - double d = gen_data_iget_double( gen_data , data_index); - double x = (d - gen_obs->obs_data[iobs]) / gen_obs->obs_std[iobs]; - sum_chi2 += x*x; - } - } - return sum_chi2; - } -} - - - -void gen_obs_measure(const gen_obs_type * gen_obs , const gen_data_type * gen_data , node_id_type node_id , meas_data_type * meas_data, const active_list_type * __active_list) { - gen_obs_assert_data_size(gen_obs , gen_data); - { - int active_size = active_list_get_active_size( __active_list , gen_obs->obs_size ); - meas_block_type * meas_block = meas_data_add_block( meas_data , gen_obs->obs_key , node_id.report_step , active_size ); - active_mode_type active_mode = active_list_get_mode( __active_list ); - const bool_vector_type * forward_model_active = gen_data_config_get_active_mask( gen_obs->data_config ); - - int iobs; - if (active_mode == ALL_ACTIVE) { - for (iobs = 0; iobs < gen_obs->obs_size; iobs++) { - int data_index = gen_obs->data_index_list[iobs] ; - - if (forward_model_active != NULL) { - if (!bool_vector_iget( forward_model_active , data_index )) - continue; /* Forward model has deactivated this index - just continue. */ - } - - meas_block_iset( meas_block , node_id.iens , iobs , gen_data_iget_double( gen_data , data_index )); - } - } else if ( active_mode == PARTLY_ACTIVE) { - const int * active_list = active_list_get_active( __active_list ); - int index; - - for (index = 0; index < active_size; index++) { - iobs = active_list[ index ]; - int data_index = gen_obs->data_index_list[iobs] ; - if (forward_model_active != NULL) { - if (!bool_vector_iget( forward_model_active , data_index )) - continue; /* Forward model has deactivated this index - just continue. */ - } - meas_block_iset( meas_block , node_id.iens , index , gen_data_iget_double( gen_data , gen_obs->data_index_list[iobs] )); - } - } - } -} - - - -void gen_obs_get_observations(gen_obs_type * gen_obs , obs_data_type * obs_data, enkf_fs_type * fs, int report_step , const active_list_type * __active_list) { - const bool_vector_type * forward_model_active = NULL; - if (gen_data_config_has_active_mask( gen_obs->data_config , fs, report_step)) { - gen_data_config_load_active( gen_obs->data_config , fs, report_step , true); - forward_model_active = gen_data_config_get_active_mask( gen_obs->data_config ); - } - - { - int iobs; - active_mode_type active_mode = active_list_get_mode( __active_list ); - obs_block_type * obs_block = obs_data_add_block( obs_data , gen_obs->obs_key , gen_obs->obs_size , NULL , false); - - if (active_mode == ALL_ACTIVE) { - for (iobs = 0; iobs < gen_obs->obs_size; iobs++) - obs_block_iset( obs_block , iobs , gen_obs->obs_data[iobs] , IGET_SCALED_STD( gen_obs , iobs )); - - /* Setting some of the elements as missing, i.e. deactivated by the forward model. */ - if (forward_model_active != NULL) { - for (iobs = 0; iobs < gen_obs->obs_size; iobs++) { - int data_index = gen_obs->data_index_list[ iobs ]; - if (!bool_vector_iget( forward_model_active , data_index )) - obs_block_iset_missing( obs_block , iobs ); - } - } - } else if (active_mode == PARTLY_ACTIVE) { - const int * active_list = active_list_get_active( __active_list ); - int active_size = active_list_get_active_size( __active_list , gen_obs->obs_size); - int index; - - for (index = 0; index < active_size; index++) { - iobs = active_list[index]; - obs_block_iset( obs_block , iobs , gen_obs->obs_data[iobs] , IGET_SCALED_STD( gen_obs , iobs )); - { - int data_index = gen_obs->data_index_list[ iobs ]; - if ((forward_model_active != NULL) && (!bool_vector_iget( forward_model_active , data_index ))) - obs_block_iset_missing( obs_block , iobs ); - } - } - } - } -} - - - -/** - In general the gen_obs observation vector can be smaller than the - gen_data field it is observing, i.e. we can have a situation like - this: - - Data Obs - ---- --- - - [ 6.0 ] ----\ - [ 2.0 ] \---> [ 6.3 ] - [ 3.0 ] ---------> [ 2.8 ] - [ 2.0 ] /---> [ 4.3 ] - [ 4.5 ] ----/ - - The situation here is as follows: - - 1. We have a gen data vector with five elements. - - 2. We have an observation vector of three elements, which observes - three of the elements in the gen_data vector, in this particular - case the data_index_list of the observation equals: [0 , 2 , 4]. - - Now when we want to look at the match of observation quality of the - last element in the observation vector it would be natural to use - the user_get key: "obs_key:2" - however this is an observation of - data element number 4, i.e. as seen from data context (when adding - observations to an ensemble plot) the natural indexing would be: - "data_key:4". - - - The function gen_obs_user_get_with_data_index() will do the - translation from data based indexing to observation based indexing, i.e. - - gen_obs_user_get_with_data_index("4") - - will do an inverse lookup of the '4' and further call - - gen_obs_user_get("2") - -*/ - - -void gen_obs_user_get(const gen_obs_type * gen_obs , const char * index_key , double * value , double * std , bool * valid) { - int index; - *valid = false; - - if (util_sscanf_int( index_key , &index)) { - if ((index >= 0) && (index < gen_obs->obs_size)) { - *valid = true; - *value = gen_obs->obs_data[ index ]; - *std = gen_obs->obs_std[ index ]; - } - } -} - - - -void gen_obs_user_get_with_data_index(const gen_obs_type * gen_obs , const char * index_key , double * value , double * std , bool * valid) { - if (gen_obs->observe_all_data) - /* The observation and data vectors are equally long - no reverse lookup necessary. */ - gen_obs_user_get(gen_obs , index_key , value , std , valid); - else { - *valid = false; - int data_index; - if (util_sscanf_int( index_key , &data_index )) { - int obs_index = 0; - do { - if (gen_obs->data_index_list[ obs_index ] == data_index) - /* Found it - will use the 'obs_index' value. */ - break; - - obs_index++; - } while (obs_index < gen_obs->obs_size); - if (obs_index < gen_obs->obs_size) { /* The reverse lookup succeeded. */ - *valid = true; - *value = gen_obs->obs_data[ obs_index ]; - *std = gen_obs->obs_std[ obs_index ]; - } - } - } -} - -void gen_obs_update_std_scale(gen_obs_type * gen_obs, double std_multiplier, const active_list_type * active_list) { - if (active_list_get_mode( active_list ) == ALL_ACTIVE) { - for (int i = 0; i < gen_obs->obs_size; i++) - gen_obs->std_scaling[i] = std_multiplier; - } else { - const int * active_index = active_list_get_active( active_list ); - int size = active_list_get_active_size( active_list , gen_obs->obs_size ); - for (int i=0; i < size; i++) { - int obs_index = active_index[i]; - gen_obs->std_scaling[ obs_index ] = std_multiplier; - } - } -} - - - -int gen_obs_get_size(const gen_obs_type * gen_obs){ - return gen_obs->obs_size; -} - -double gen_obs_iget_std(const gen_obs_type * gen_obs, int index){ - return gen_obs->obs_std[index]; -} - -double gen_obs_iget_std_scaling(const gen_obs_type * gen_obs, int index) { - return gen_obs->std_scaling[index]; -} - - -double gen_obs_iget_value(const gen_obs_type * gen_obs, int index){ - return gen_obs->obs_data[index]; -} - -int gen_obs_get_obs_index(const gen_obs_type * gen_obs, int index){ - if(index < 0 || index >= gen_obs->obs_size){ - util_abort("[Gen_Obs] Index out of bounds %d [0, %d]", index, gen_obs->obs_size - 1); - } - - if (gen_obs->observe_all_data){ - return index; - } else { - return gen_obs->data_index_list[index]; - } -} - - - -/*****************************************************************/ -UTIL_IS_INSTANCE_FUNCTION(gen_obs , GEN_OBS_TYPE_ID) -VOID_FREE(gen_obs) -VOID_GET_OBS(gen_obs) -VOID_MEASURE(gen_obs , gen_data) -VOID_USER_GET_OBS(gen_obs) -VOID_CHI2(gen_obs , gen_data) -VOID_UPDATE_STD_SCALE(gen_obs) diff --git a/ThirdParty/Ert/libenkf/src/gen_test.c b/ThirdParty/Ert/libenkf/src/gen_test.c deleted file mode 100644 index 6418c70160..0000000000 --- a/ThirdParty/Ert/libenkf/src/gen_test.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'gen_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include - - - - -int main(int argc , char **argv) { -} diff --git a/ThirdParty/Ert/libenkf/src/hook_manager.c b/ThirdParty/Ert/libenkf/src/hook_manager.c deleted file mode 100644 index ab994e206b..0000000000 --- a/ThirdParty/Ert/libenkf/src/hook_manager.c +++ /dev/null @@ -1,250 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'hook_manager.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include - -#define HOOK_MANAGER_NAME "HOOK MANAGER" -#define RUNPATH_LIST_FILE ".ert_runpath_list" -#define QC_WORKFLOW_NAME "QC WORKFLOW" -#define RUN_MODE_PRE_SIMULATION_NAME "PRE_SIMULATION" -#define RUN_MODE_POST_SIMULATION_NAME "POST_SIMULATION" - -struct hook_manager_struct { - vector_type * hook_workflow_list; /* vector of hook_workflow_type instances */ - runpath_list_type * runpath_list; - ert_workflow_list_type * workflow_list; - hash_type * input_context; - - - /* Deprecated stuff */ - hook_workflow_type * post_hook_workflow; /* This is the good old QC workflow, kept for backward compatibility, obsolete */ -}; - -hook_manager_type * hook_manager_alloc( ert_workflow_list_type * workflow_list ) { - hook_manager_type * hook_manager = util_malloc( sizeof * hook_manager ); - hook_manager->hook_workflow_list = vector_alloc_new(); - - hook_manager->workflow_list = workflow_list; - - hook_manager->runpath_list = runpath_list_alloc( NULL ); - hook_manager_set_runpath_list_file( hook_manager, NULL, RUNPATH_LIST_FILE ); - - hook_manager->input_context = hash_alloc(); - - return hook_manager; -} - - -void hook_manager_free( hook_manager_type * hook_manager ) { - runpath_list_free( hook_manager->runpath_list ); - vector_free( hook_manager->hook_workflow_list ); - hash_free( hook_manager->input_context ); - free( hook_manager ); -} - - - -void hook_manager_add_input_context( hook_manager_type * hook_manager, const char * key , const char * value) { - hash_insert_hash_owned_ref(hook_manager->input_context, key, util_alloc_string_copy(value), free); -} - - - -runpath_list_type * hook_manager_get_runpath_list( hook_manager_type * hook_manager ) { - return hook_manager->runpath_list; -} - - -static void hook_manager_add_workflow( hook_manager_type * hook_manager , const char * workflow_name , hook_run_mode_enum run_mode) { - if (ert_workflow_list_has_workflow( hook_manager->workflow_list , workflow_name) ){ - workflow_type * workflow = ert_workflow_list_get_workflow( hook_manager->workflow_list , workflow_name); - hook_workflow_type * hook = hook_workflow_alloc( workflow , run_mode ); - vector_append_owned_ref(hook_manager->hook_workflow_list, hook , hook_workflow_free__); - } - else { - fprintf(stderr, "** Warning: While hooking workflow: %s not recognized among the list of loaded workflows.", workflow_name); - } -} - - - -void hook_manager_init( hook_manager_type * hook_manager , const config_content_type * config_content) { - - /* Old stuff explicitly prefixed with QC */ - { - if (config_content_has_item( config_content , QC_WORKFLOW_KEY)) { - char * workflow_name; - const char * file_name = config_content_get_value_as_path(config_content , QC_WORKFLOW_KEY); - util_alloc_file_components( file_name , NULL , &workflow_name , NULL ); - workflow_type * workflow = ert_workflow_list_add_workflow( hook_manager->workflow_list , file_name , workflow_name); - if (workflow != NULL) { - hook_workflow_type * hook = hook_workflow_alloc( workflow , POST_SIMULATION ); - vector_append_owned_ref(hook_manager->hook_workflow_list, hook , hook_workflow_free__); - } - } - } - - - - if (config_content_has_item( config_content , HOOK_WORKFLOW_KEY)) { - for (int ihook = 0; ihook < config_content_get_occurences(config_content , HOOK_WORKFLOW_KEY); ihook++) { - const char * workflow_name = config_content_iget( config_content , HOOK_WORKFLOW_KEY, ihook , 0 ); - hook_run_mode_enum run_mode = hook_workflow_run_mode_from_name(config_content_iget(config_content , HOOK_WORKFLOW_KEY , ihook , 1)); - hook_manager_add_workflow( hook_manager , workflow_name , run_mode ); - } - } - - - if (config_content_has_item( config_content , RUNPATH_FILE_KEY)) - hook_manager_set_runpath_list_file( hook_manager, NULL, config_content_get_value( config_content , RUNPATH_FILE_KEY)); -} - - - -void hook_manager_add_config_items( config_parser_type * config ) { - config_schema_item_type * item; - - /* Old stuff - explicitly prefixed with QC. */ - { - item = config_add_schema_item( config , QC_PATH_KEY , false ); - config_schema_item_set_argc_minmax(item , 1 , 1 ); - config_install_message( config , QC_PATH_KEY , "The \'QC_PATH\' keyword is ignored."); - - - item = config_add_schema_item( config , QC_WORKFLOW_KEY , false ); - config_schema_item_set_argc_minmax(item , 1 , 1 ); - config_schema_item_iset_type( item , 0 , CONFIG_EXISTING_PATH ); - - config_install_message( config , QC_WORKFLOW_KEY , "The \'QC_WORKFLOW\' keyword is deprecated - use \'HOOK_WORKFLOW\' instead"); - } - - item = config_add_schema_item( config , HOOK_WORKFLOW_KEY , false ); - config_schema_item_set_argc_minmax(item , 2 , 2 ); - config_schema_item_iset_type( item , 0 , CONFIG_STRING ); - config_schema_item_iset_type( item , 1 , CONFIG_STRING ); - { - char ** argv = util_malloc( 2 * sizeof * argv ); - - argv[0] = RUN_MODE_PRE_SIMULATION_NAME; - argv[1] = RUN_MODE_POST_SIMULATION_NAME; - config_schema_item_set_indexed_selection_set(item, 1, 2, (const char **) argv); - - free( argv ); - } - - item = config_add_schema_item( config , RUNPATH_FILE_KEY , false ); - config_schema_item_set_argc_minmax(item , 1 , 1 ); -} - - -void hook_manager_export_runpath_list( const hook_manager_type * hook_manager ) { - runpath_list_fprintf( hook_manager->runpath_list ); -} - -const char * hook_manager_get_runpath_list_file( const hook_manager_type * hook_manager) { - return runpath_list_get_export_file( hook_manager->runpath_list ); -} - -static void hook_manager_set_runpath_list_file__( hook_manager_type * hook_manager , const char * runpath_list_file) { - runpath_list_set_export_file( hook_manager->runpath_list , runpath_list_file ); -} - -void hook_manager_set_runpath_list_file( hook_manager_type * hook_manager , const char * basepath, const char * filename) { - if (filename && util_is_abs_path( filename )) - hook_manager_set_runpath_list_file__( hook_manager , filename ); - else { - const char * file = RUNPATH_LIST_FILE; - - if (filename != NULL) - file = filename; - - char * file_with_path_prefix = NULL; - if (basepath != NULL) { - file_with_path_prefix = util_alloc_filename(basepath, file, NULL); - } - else - file_with_path_prefix = util_alloc_string_copy(file); - - { - char * absolute_path = util_alloc_abs_path(file_with_path_prefix); - hook_manager_set_runpath_list_file__( hook_manager , absolute_path ); - free( absolute_path ); - } - - free(file_with_path_prefix); - } -} - - -void hook_manager_run_workflows( const hook_manager_type * hook_manager , hook_run_mode_enum run_mode , void * self ) -{ - bool verbose = false; - for (int i=0; i < vector_get_size( hook_manager->hook_workflow_list ); i++) { - hook_workflow_type * hook_workflow = vector_iget( hook_manager->hook_workflow_list , i ); - if (hook_workflow_get_run_mode(hook_workflow) == run_mode) { - workflow_type * workflow = hook_workflow_get_workflow( hook_workflow ); - workflow_run( workflow, self , verbose , ert_workflow_list_get_context( hook_manager->workflow_list )); - /* - The workflow_run function will return a bool to indicate - success/failure, and in the case of error the function - workflow_get_last_error() can be used to get a config_error - object. - */ - } - } -} - -const hook_workflow_type * hook_manager_iget_hook_workflow(const hook_manager_type * hook_manager, int index){ - return vector_iget(hook_manager->hook_workflow_list, index); -} - -int hook_manager_get_size(const hook_manager_type * hook_manager){ - return vector_get_size(hook_manager->hook_workflow_list); -} - - -/*****************************************************************/ -/* Deprecated stuff */ -/*****************************************************************/ - - - -bool hook_manager_run_post_hook_workflow( const hook_manager_type * hook_manager , void * self) { - const char * export_file = runpath_list_get_export_file( hook_manager->runpath_list ); - if (!util_file_exists( export_file )) - fprintf(stderr,"** Warning: the file:%s with a list of runpath directories was not found - workflow will probably fail.\n" , export_file); - - return hook_workflow_run_workflow(hook_manager->post_hook_workflow, hook_manager->workflow_list, self); -} - - - diff --git a/ThirdParty/Ert/libenkf/src/hook_workflow.c b/ThirdParty/Ert/libenkf/src/hook_workflow.c deleted file mode 100644 index 3910a82d75..0000000000 --- a/ThirdParty/Ert/libenkf/src/hook_workflow.c +++ /dev/null @@ -1,99 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA, Norway. - - The file 'hook_workflow.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -#include -#include -#include - -#include - -#include - -#include -#include - -#define RUN_MODE_PRE_SIMULATION_NAME "PRE_SIMULATION" -#define RUN_MODE_POST_SIMULATION_NAME "POST_SIMULATION" - -#define HOOK_WORKFLOW_TYPE_ID 7321780 - -struct hook_workflow_struct { - UTIL_TYPE_ID_DECLARATION; - hook_run_mode_enum run_mode; - workflow_type * workflow; -}; - - -static UTIL_SAFE_CAST_FUNCTION( hook_workflow , HOOK_WORKFLOW_TYPE_ID); - -hook_workflow_type * hook_workflow_alloc( workflow_type * workflow , hook_run_mode_enum run_mode ) { - hook_workflow_type * hook_workflow = util_malloc( sizeof * hook_workflow ); - UTIL_TYPE_ID_INIT( hook_workflow , HOOK_WORKFLOW_TYPE_ID); - hook_workflow->run_mode = run_mode; - hook_workflow->workflow = workflow; - return hook_workflow; -} - -void hook_workflow_free( hook_workflow_type * hook_workflow ) { - free( hook_workflow ); -} - -void hook_workflow_free__( void * arg ) { - hook_workflow_type * hook_workflow = hook_workflow_safe_cast( arg ); - hook_workflow_free( hook_workflow ); -} - - - -workflow_type* hook_workflow_get_workflow( const hook_workflow_type * hook_workflow ) { - return hook_workflow->workflow; -} - - -bool hook_workflow_run_workflow( const hook_workflow_type * hook_workflow, ert_workflow_list_type * workflow_list, void * self) { - bool verbose = false; - if (hook_workflow->workflow != NULL ) { - bool result = ert_workflow_list_run_workflow__( workflow_list, hook_workflow->workflow , verbose , self); - return result; - } - else - return false; -} - - -hook_run_mode_enum hook_workflow_run_mode_from_name( const char * run_mode ) { - hook_run_mode_enum mode; - if (strcmp( run_mode , RUN_MODE_PRE_SIMULATION_NAME) == 0) - mode = PRE_SIMULATION; - else if (strcmp( run_mode , RUN_MODE_POST_SIMULATION_NAME) == 0) - mode = POST_SIMULATION; - else { - util_abort("%s: unrecognized run mode :%s \n",__func__ , run_mode); - mode = -1; /* Dummy */ - } - return mode; -} - - -hook_run_mode_enum hook_workflow_get_run_mode( const hook_workflow_type * hook_workflow ){ - return hook_workflow->run_mode; -} - diff --git a/ThirdParty/Ert/libenkf/src/local_config.c b/ThirdParty/Ert/libenkf/src/local_config.c deleted file mode 100644 index 256216f5a9..0000000000 --- a/ThirdParty/Ert/libenkf/src/local_config.c +++ /dev/null @@ -1,298 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'local_config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include -#include - -#include -#include - -#include -#include - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/******************************************************************/ - -/* - - +-------------------------- local_updatestep_type ---------------------------------------+ - | | - | | - | +----------------- local_ministep_type --------------------------------------+ | - | | | | - | | / +--- local_dataset_type ---+ | | - | | | | PRESSURE | | | - | | | | SWAT | | | - | | | | SGAS | | | - | | | +--------------------------+ | | - | | +-- local_obsset_type ---+ | | | - | | | WWCT:OP_2 | | +--- local_dataset_type ---+ | | - | | | WGOR:OP_1 | | | MULTFLT1 | | | - | | | RFT:WELL1 | <------| | MULTFLT2 | | | - | | | RFT:WELL3 | | | MULTFLT3 | | | - | | | WWCT:WELLX | | +--------------------------+ | | - | | +------------------------+ | | | - | | | +--- local_dataset_type ---+ | | - | | | | RELPERM1 | | | - | | | | RELPERM2 | | | - | | | | RELPERM3 | | | - | | \ +--------------------------+ | | - | | | | - | +----------------------------------------------------------------------------+ | - | | - | | - | +----------------- local_ministep_type --------------------------------------+ | - | | | | - | | / +--- local_dataset_type ---+ | | - | | +-- local_obsset_type ---+ | | PERMX PORO | | | - | | | 4D Seismic | | | PRESSURE SWAT | | | - | | | Gravimetri | | | SGAS | | | - | | | | <------| +--------------------------+ | | - | | | | | | | - | | | | | +--- local_dataset_type ---+ | | - | | +------------------------+ | | MULTFLT1 | | | - | | | | MULTFLT2 | | | - | | | | MULTFLT3 | | | - | | \ +--------------------------+ | | - | | | | - | +----------------------------------------------------------------------------+ | - | | - +----------------------------------------------------------------------------------------+ - -This figure illustrates the different objects when configuring local -analysis: - -local_updatestep_type: This is is the top level configuration of the - updating at one timestep. In principle you can have different - updatestep configurations at the different timesteps, but it will - typically be identical for all the time steps. Observe that the - update at one time step can typically conist of several enkf - updates, this is handled by using several local_ministep. - -local_ministep_type: The ministep defines a collection of observations - and state/parameter variables which are mutually dependant on - eachother and should be updated together. The local_ministep will - consist of *ONE* local_obsset of observations, and one or more - local_dataset of data which should be updated. - -local_obsset_type: This is a collection of observation data; there is - exactly one local_obsset for each local_ministep. - -local_dataset_type: This is a collection of data/parameters which - should be updated together in the EnKF updating. - - -How the local_dataset_type is configured is quite important for the -core EnKF updating: - - 1. All the members in one local_dataset instance are serialized and - packed in the A-matrix together; i.e. in the example above the - parameters RELPERM1,RELPERM2 and RELPERM3 are updated in one go. - - 2. When using the standard EnKF the X matrix is calculated using - the actual data vectors, and the results will be identical if we - use one large local_dataset instance or several small. However - when using more advanced techniques where the A matrix is used - explicitly when calculating the update this will matter. - - 3. If you have not entered a local configuration explicitly the - default ALL_ACTIVE local configuration will be used. -*/ - - -struct local_config_struct { - local_updatestep_type * default_updatestep; /* A default report step returned if no particular report step has been installed for this time index. */ - hash_type * updatestep_storage; /* These three hash tables are the 'holding area' for the local_updatestep, */ - hash_type * ministep_storage; /* local_ministep instances. */ - hash_type * dataset_storage; - hash_type * obsdata_storage; -}; - - -/** - Instances of local_updatestep and local_ministep are allocated from - the local_config object, and then subsequently manipulated from the calling scope. -*/ - -static local_updatestep_type * local_config_alloc_updatestep( local_config_type * local_config , const char * key ) { - local_updatestep_type * updatestep = local_updatestep_alloc( key ); - hash_insert_hash_owned_ref( local_config->updatestep_storage , key , updatestep , local_updatestep_free__); - return updatestep; -} - - - -void local_config_clear( local_config_type * local_config ) { - local_config->default_updatestep = NULL; - hash_clear( local_config->updatestep_storage ); - hash_clear( local_config->ministep_storage ); - hash_clear( local_config->dataset_storage ); - hash_clear( local_config->obsdata_storage ); - local_config->default_updatestep = local_config_alloc_updatestep(local_config, "DEFAULT"); -} - - - - -local_config_type * local_config_alloc( ) { - local_config_type * local_config = util_malloc( sizeof * local_config ); - - local_config->default_updatestep = NULL; - local_config->updatestep_storage = hash_alloc(); - local_config->ministep_storage = hash_alloc(); - local_config->dataset_storage = hash_alloc(); - local_config->obsdata_storage = hash_alloc(); - - local_config_clear( local_config ); - return local_config; -} - - -void local_config_free(local_config_type * local_config) { - hash_free( local_config->updatestep_storage ); - hash_free( local_config->ministep_storage); - hash_free( local_config->dataset_storage); - hash_free( local_config->obsdata_storage); - free( local_config ); -} - -local_ministep_type * local_config_alloc_ministep( local_config_type * local_config , const char * key, analysis_module_type* analysis_module) { - local_ministep_type * ministep = local_ministep_alloc( key, analysis_module ); - hash_insert_hash_owned_ref( local_config->ministep_storage , key , ministep , local_ministep_free__); - return ministep; -} - -local_obsdata_type * local_config_alloc_obsdata( local_config_type * local_config , const char * obsdata_name ) { - if (local_config_has_obsdata(local_config, obsdata_name)) - util_abort("%s: tried to add existing obsdata node key:%s \n",__func__ , obsdata_name); - - local_obsdata_type * obsdata = local_obsdata_alloc( obsdata_name ); - hash_insert_hash_owned_ref( local_config->obsdata_storage , obsdata_name , obsdata , local_obsdata_free__); - return obsdata; -} - -bool local_config_has_obsdata( const local_config_type * local_config , const char * key) { - return hash_has_key( local_config->obsdata_storage , key ); -} - - -local_dataset_type * local_config_alloc_dataset( local_config_type * local_config , const char * key ) { - if (local_config_has_dataset(local_config, key)) - util_abort("%s: tried to add existing dataset node key:%s \n",__func__ , key); - - local_dataset_type * dataset = local_dataset_alloc( key ); - hash_insert_hash_owned_ref( local_config->dataset_storage , key , dataset , local_dataset_free__); - return dataset; -} - -bool local_config_has_dataset( const local_config_type * local_config , const char * key) { - return hash_has_key( local_config->dataset_storage , key ); -} - - -local_dataset_type * local_config_alloc_dataset_copy( local_config_type * local_config , const char * src_key , const char * target_key) { - local_dataset_type * src_dataset = hash_get( local_config->dataset_storage , src_key ); - local_dataset_type * copy_dataset = local_dataset_alloc_copy( src_dataset , target_key ); - - hash_insert_hash_owned_ref( local_config->dataset_storage , target_key , copy_dataset , local_dataset_free__); - return copy_dataset; -} - - -local_obsdata_type * local_config_alloc_obsdata_copy( local_config_type * local_config , const char * src_key , const char * target_key) { - local_obsdata_type * src_obsdata = hash_get( local_config->obsdata_storage , src_key ); - local_obsdata_type * copy_obsdata = local_obsdata_alloc_copy( src_obsdata , target_key ); - - hash_insert_hash_owned_ref( local_config->obsdata_storage , target_key , copy_obsdata , local_obsdata_free__); - return copy_obsdata; -} - - -local_ministep_type * local_config_get_ministep( const local_config_type * local_config , const char * key) { - local_ministep_type * ministep = hash_get( local_config->ministep_storage , key ); - return ministep; -} - - -local_obsdata_type * local_config_get_obsdata( const local_config_type * local_config , const char * key) { - local_obsdata_type * obsdata = hash_get( local_config->obsdata_storage , key ); - return obsdata; -} - -local_dataset_type * local_config_get_dataset( const local_config_type * local_config , const char * key) { - local_dataset_type * dataset = hash_get( local_config->dataset_storage , key ); - return dataset; -} - -local_ministep_type * local_config_alloc_ministep_copy( local_config_type * local_config , const char * src_key , const char * new_key) { - local_ministep_type * src_step = hash_get( local_config->ministep_storage , src_key ); - local_ministep_type * new_step = local_ministep_alloc_copy( src_step , new_key ); - hash_insert_hash_owned_ref( local_config->ministep_storage , new_key , new_step , local_ministep_free__); - return new_step; -} - - - -local_updatestep_type * local_config_get_updatestep( const local_config_type * local_config) { - local_updatestep_type * updatestep = local_config->default_updatestep; - - if (updatestep == NULL) - util_exit("%s: fatal error. No report step information for step:%d - and no default \n",__func__ , index); - - return updatestep; -} - - -void local_config_summary_fprintf( const local_config_type * local_config , const char * config_file) { - - FILE * stream = util_mkdir_fopen( config_file , "w"); - - const local_updatestep_type * updatestep = local_config_get_updatestep( local_config ); // There is only one update step, the default - { - hash_iter_type * hash_iter = hash_iter_alloc( local_config->ministep_storage ); - - while (!hash_iter_is_complete( hash_iter )) { - const local_ministep_type * ministep = hash_iter_get_next_value( hash_iter ); - - fprintf(stream , "UPDATE_STEP:%s,", local_updatestep_get_name(updatestep)); - - local_ministep_summary_fprintf( ministep , stream); - - } - - hash_iter_free( hash_iter ); - } - - fclose( stream ); -} diff --git a/ThirdParty/Ert/libenkf/src/local_context.c b/ThirdParty/Ert/libenkf/src/local_context.c deleted file mode 100644 index bb2ac13648..0000000000 --- a/ThirdParty/Ert/libenkf/src/local_context.c +++ /dev/null @@ -1,132 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'local_context.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include - -#include -#include - -#include -#include -#include - -#include - -#include - -struct local_context_struct { - hash_type * ecl_regions; - hash_type * files; - hash_type * polygons; - hash_type * grids; - hash_type * surfaces; - hash_type * surface_regions; -}; - - - -local_context_type * local_context_alloc( const ecl_grid_type * ecl_grid ) { - local_context_type * context = util_malloc( sizeof * context ); - context->surface_regions = hash_alloc(); - context->ecl_regions = hash_alloc(); - context->files = hash_alloc(); - context->polygons = hash_alloc(); - context->grids = hash_alloc(); - context->surfaces = hash_alloc(); - - hash_insert_ref( context->grids , GLOBAL_GRID , ecl_grid ); - return context; -} - - -void local_context_free( local_context_type * context) { - hash_free( context->ecl_regions ); - hash_free( context->files ); - hash_free( context->polygons ); - hash_free( context->grids ); - hash_free( context->surfaces ); - hash_free( context->surface_regions ); -} - - - -ecl_region_type * local_context_get_ecl_region( local_context_type * context , const char * region_name) { - return hash_get( context->ecl_regions , region_name ); -} - -void local_context_create_ecl_region( local_context_type * context , const char * grid_name , const char * region_name , bool preselect ) { - ecl_grid_type * grid = hash_get( context->grids , grid_name); - ecl_region_type * new_region = ecl_region_alloc( grid , preselect ); - hash_insert_hash_owned_ref( context->ecl_regions , region_name , new_region , ecl_region_free__ ); -} - -/*************************/ - -geo_region_type * local_context_get_surface_region( local_context_type * context , const char * region_name) { - return hash_get( context->surface_regions , region_name ); -} - -void local_context_create_surface_region( local_context_type * context , const char * surface_name , const char * region_name , bool preselect ) { - geo_surface_type * base_surface = hash_get( context->surfaces , surface_name ); - geo_region_type * new_region = geo_region_alloc( geo_surface_get_pointset( base_surface ) , preselect ); - hash_insert_hash_owned_ref( context->surface_regions , region_name , new_region , geo_region_free__ ); -} - -/*************************/ - -void local_context_load_file( local_context_type * context , const char * filename , const char * file_key ) { - ecl_file_type * ecl_file = ecl_file_open( filename , 0); - hash_insert_hash_owned_ref( context->files , file_key , ecl_file , ecl_file_free__); -} - - -ecl_file_type * local_context_get_file( local_context_type * context , const char * file_key ) { - return hash_get( context->files , file_key ); -} - -/*************************/ - -static void local_context_add_polygon__( local_context_type * context , const char * polygon_name , geo_polygon_type * polygon) { - hash_insert_hash_owned_ref( context->polygons , polygon_name , polygon , geo_polygon_free__); -} - -void local_context_add_polygon( local_context_type * context , const char * polygon_name ) { - geo_polygon_type * polygon = geo_polygon_alloc( polygon_name ); - local_context_add_polygon__(context , polygon_name , polygon ); -} - -void local_context_load_polygon( local_context_type * context , const char * polygon_name , const char * polygon_file) { - geo_polygon_type * polygon = geo_polygon_fload_alloc_irap( polygon_file ); - hash_insert_hash_owned_ref( context->polygons , polygon_name , polygon , geo_polygon_free__); -} - - -geo_polygon_type * local_context_get_polygon( local_context_type * context , const char * polygon_name ) { - return hash_get( context->polygons , polygon_name ); -} - -/*************************/ - -void local_context_load_surface( local_context_type * context , const char * surface_name , const char * surface_file) { - geo_surface_type * surface = geo_surface_fload_alloc_irap( surface_file , true ); - hash_insert_hash_owned_ref( context->surfaces , surface_name , surface , geo_surface_free__); -} - -geo_surface_type * local_context_get_surface( local_context_type * context , const char * surface_name) { - return hash_get( context->surfaces , surface_name ); -} diff --git a/ThirdParty/Ert/libenkf/src/local_dataset.c b/ThirdParty/Ert/libenkf/src/local_dataset.c deleted file mode 100644 index a6f44bb4a3..0000000000 --- a/ThirdParty/Ert/libenkf/src/local_dataset.c +++ /dev/null @@ -1,137 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'local_dataset.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include - -#include -#include - -#include -#include -#include -#include -#include - - -#define LOCAL_DATASET_TYPE_ID 6615409 - -struct local_dataset_struct { - UTIL_TYPE_ID_DECLARATION; - char * name; - hash_type * nodes; /* A hash table indexed by node keys - each element is an active_list instance. */ -}; - - - -UTIL_SAFE_CAST_FUNCTION(local_dataset , LOCAL_DATASET_TYPE_ID) -UTIL_IS_INSTANCE_FUNCTION(local_dataset , LOCAL_DATASET_TYPE_ID) - - -local_dataset_type * local_dataset_alloc( const char * name ) { - local_dataset_type * dataset = util_malloc( sizeof * dataset); - - UTIL_TYPE_ID_INIT( dataset , LOCAL_DATASET_TYPE_ID ); - dataset->nodes = hash_alloc(); - dataset->name = util_alloc_string_copy( name ); - - return dataset; -} - -local_dataset_type * local_dataset_alloc_copy( local_dataset_type * src_dataset , const char * copy_name ) { - local_dataset_type * copy_dataset = local_dataset_alloc( copy_name ); - hash_iter_type * node_iter = hash_iter_alloc( src_dataset->nodes ); - - while (!hash_iter_is_complete( node_iter )) { - const char * key = hash_iter_get_next_key( node_iter ); - active_list_type * active_list = active_list_alloc_copy( hash_get( src_dataset->nodes , key ) ); - hash_insert_hash_owned_ref( copy_dataset->nodes , key , active_list , active_list_free__); - } - - hash_iter_free( node_iter ); - return copy_dataset; -} - - -void local_dataset_free( local_dataset_type * dataset ) { - util_safe_free(dataset->name); - hash_free( dataset->nodes ); - free( dataset ); -} - -void local_dataset_free__( void * arg ) { - local_dataset_type * local_dataset = local_dataset_safe_cast( arg ); - local_dataset_free( local_dataset ); -} - -const char * local_dataset_get_name( const local_dataset_type * dataset) { - return dataset->name; -} - - - -void local_dataset_add_node(local_dataset_type * dataset, const char *node_key) { - if (hash_has_key( dataset->nodes , node_key )) - util_abort("%s: tried to add existing node key:%s \n",__func__ , node_key); - - hash_insert_hash_owned_ref( dataset->nodes , node_key , active_list_alloc( ALL_ACTIVE ) , active_list_free__); -} - -bool local_dataset_has_key(const local_dataset_type * dataset, const char * key) { - return hash_has_key( dataset->nodes , key ); -} - - -void local_dataset_del_node( local_dataset_type * dataset , const char * node_key) { - hash_del( dataset->nodes , node_key ); -} - - -void local_dataset_clear( local_dataset_type * dataset) { - hash_clear( dataset->nodes ); -} - - -active_list_type * local_dataset_get_node_active_list(const local_dataset_type * dataset , const char * node_key ) { - return hash_get( dataset->nodes , node_key ); /* Fails hard if you do not have the key ... */ -} - -stringlist_type * local_dataset_alloc_keys( const local_dataset_type * dataset ) { - return hash_alloc_stringlist( dataset->nodes ); -} - -void local_dataset_summary_fprintf( const local_dataset_type * dataset , FILE * stream) { -{ - hash_iter_type * data_iter = hash_iter_alloc( dataset->nodes ); - while (!hash_iter_is_complete( data_iter )) { - const char * data_key = hash_iter_get_next_key( data_iter ); - fprintf(stream , "NAME OF DATA:%s,", data_key ); - - active_list_type * active_list = hash_get( dataset->nodes , data_key ); - active_list_summary_fprintf( active_list , local_dataset_get_name(dataset) , data_key , stream); - } - hash_iter_free( data_iter ); - } -} - - -int local_dataset_get_size( const local_dataset_type * dataset ) { - return hash_get_size( dataset->nodes ); -} - diff --git a/ThirdParty/Ert/libenkf/src/local_ministep.c b/ThirdParty/Ert/libenkf/src/local_ministep.c deleted file mode 100644 index 500ee47eaa..0000000000 --- a/ThirdParty/Ert/libenkf/src/local_ministep.c +++ /dev/null @@ -1,274 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'local_ministep.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - -/** - This file implements a 'ministep' configuration for active / - inactive observations and parameters for ONE enkf update. Observe - that the updating at one report step can consist of several - socalled ministeps, i.e. first the northern part of the field with - the relevant observations, and then the southern part. - - The implementation, in local_ministep_type, is quite simple, it - only contains the keys for the observations and nodes, with an - accompanying pointer to an active_list instance which denotes the - active indices. Observe that this implementation offers no access - to the internals of the underlying enkf_node / obs_node objects. -*/ - - -#define LOCAL_MINISTEP_TYPE_ID 661066 - - - - -struct local_ministep_struct { - UTIL_TYPE_ID_DECLARATION; - char * name; /* A name used for this ministep - string is also used as key in a hash table holding this instance. */ - hash_type * datasets; /* A hash table of local_dataset_type instances - indexed by the name of the datasets. */ - local_obsdata_type * observations; - analysis_module_type * analysis_module; -}; - - -/** - Observe there is no link between the instances here and the real - observations/nodes (apart from the key in the hash). -*/ - -UTIL_SAFE_CAST_FUNCTION(local_ministep , LOCAL_MINISTEP_TYPE_ID) -UTIL_IS_INSTANCE_FUNCTION(local_ministep , LOCAL_MINISTEP_TYPE_ID) - -local_ministep_type * local_ministep_alloc(const char * name, analysis_module_type* analysis_module) { - local_ministep_type * ministep = util_malloc( sizeof * ministep ); - - ministep->name = util_alloc_string_copy( name ); - - char* obsdata_name = "OBSDATA_"; - char* result = malloc(strlen(obsdata_name)+strlen(name)+1); - strcpy(result, obsdata_name); - strcat(result, name); - ministep->observations = local_obsdata_alloc(result); - - - ministep->datasets = hash_alloc(); - ministep->analysis_module = analysis_module; - UTIL_TYPE_ID_INIT( ministep , LOCAL_MINISTEP_TYPE_ID); - - return ministep; -} - - -local_ministep_type * local_ministep_alloc_copy( const local_ministep_type * src , const char * name) { - //local_ministep_type * new = local_ministep_alloc( name ); - //{ - // hash_iter_type * obs_iter = hash_iter_alloc( src->observations ); - // while (!hash_iter_is_complete( obs_iter )) { - // const char * obs_key = hash_iter_get_next_key( obs_iter ); - // active_list_type * active_list_copy = active_list_alloc_copy( hash_get( src->observations , obs_key) ); - // hash_insert_hash_owned_ref( new->observations , obs_key , active_list_copy , active_list_free__); - // } - //} - // - //{ - // hash_iter_type * nodeset_iter = hash_iter_alloc( src->datasets ); - // while (!hash_iter_is_complete( nodeset_iter )) { - // const char * nodeset_key = hash_iter_get_next_key( nodeset_iter ); - // local_nodeset_type * new_nodeset = local_nodeset_alloc_copy( hash_get( src->datasets , nodeset_key )); - // hash_insert_ref( new->datasets , nodeset_key , new_nodeset ); - // } - //} - // - //return new; - return NULL; -} - - - -void local_ministep_free(local_ministep_type * ministep) { - free(ministep->name); - hash_free( ministep->datasets ); - local_obsdata_free(ministep->observations); - free( ministep ); -} - - -void local_ministep_free__(void * arg) { - local_ministep_type * ministep = local_ministep_safe_cast( arg ); - local_ministep_free( ministep ); -} - - - - - -/** - When adding observations and update nodes here observe the following: - - 1. The thing will fail hard if you try to add a node/obs which is - already in the hash table. - - 2. The newly added elements will be assigned an active_list - instance with mode ALL_ACTIVE. -*/ - - - -void local_ministep_add_dataset( local_ministep_type * ministep , const local_dataset_type * dataset) { - hash_insert_ref( ministep->datasets , local_dataset_get_name( dataset ) , dataset ); -} - -void local_ministep_add_obsdata( local_ministep_type * ministep , local_obsdata_type * obsdata) { - if (ministep->observations == NULL) - ministep->observations = obsdata; - else { // Add nodes from input observations to existing observations - int iobs; - for (iobs = 0; iobs < local_obsdata_get_size( obsdata ); iobs++) { - local_obsdata_node_type * obs_node = local_obsdata_iget( obsdata , iobs ); - local_obsdata_node_type * new_node = local_obsdata_node_alloc_copy(obs_node); - local_ministep_add_obsdata_node(ministep, new_node); - } - } -} - -void local_ministep_add_obsdata_node( local_ministep_type * ministep , local_obsdata_node_type * obsdatanode) { - local_obsdata_type * obsdata = local_ministep_get_obsdata(ministep); - local_obsdata_add_node(obsdata, obsdatanode); -} - -bool local_ministep_has_dataset( const local_ministep_type * ministep, const char * dataset_name) { - return hash_has_key( ministep->datasets, dataset_name ); -} - -int local_ministep_get_num_dataset( const local_ministep_type * ministep ) { - return hash_get_size( ministep->datasets ); -} - -local_dataset_type * local_ministep_get_dataset( const local_ministep_type * ministep, const char * dataset_name) { - return hash_get( ministep->datasets, dataset_name ); -} - -local_obsdata_type * local_ministep_get_obsdata( const local_ministep_type * ministep ) { - return ministep->observations; -} - -const char * local_ministep_get_name( const local_ministep_type * ministep ) { - return ministep->name; -} - -/*****************************************************************/ - -hash_iter_type * local_ministep_alloc_dataset_iter( const local_ministep_type * ministep ) { - return hash_iter_alloc( ministep->datasets ); -} - -/*****************************************************************/ - -/* - The keys referenced in the local_ministep_alloc_data_keys() and - local_ministep_has_data_key() are the underlying *enkf_node* keys - - not the keys used to index the local_datasets managed by this - local_ministep. -*/ - -stringlist_type * local_ministep_alloc_data_keys( const local_ministep_type * ministep ) { - stringlist_type * keys = stringlist_alloc_new(); - { - hash_iter_type * dataset_iter = hash_iter_alloc( ministep->datasets ); - while (!hash_iter_is_complete( dataset_iter )) { - const local_dataset_type * dataset = hash_iter_get_next_value( dataset_iter ); - stringlist_type * node_keys = local_dataset_alloc_keys( dataset ); - for (int i=0; i < stringlist_get_size( node_keys ); i++) { - const char * data_key = stringlist_iget( node_keys , i ); - if (!stringlist_contains(keys , data_key )) - stringlist_append_copy( keys , data_key ); - } - stringlist_free( node_keys ); - } - hash_iter_free( dataset_iter ); - } - return keys; -} - - -bool local_ministep_has_data_key(const local_ministep_type * ministep , const char * key) { - bool has_key = false; - { - hash_iter_type * dataset_iter = hash_iter_alloc( ministep->datasets ); - - while (true) { - const local_dataset_type * dataset = hash_iter_get_next_value( dataset_iter ); - if (dataset) { - if (local_dataset_has_key( dataset , key)) { - has_key = true; - break; - } - } else - break; - } - - hash_iter_free( dataset_iter ); - } - return has_key; -} - -bool local_ministep_has_analysis_module( const local_ministep_type * ministep){ - return ministep->analysis_module != NULL; -} - -analysis_module_type* local_ministep_get_analysis_module( const local_ministep_type * ministep ){ - return ministep->analysis_module; -} - -void local_ministep_summary_fprintf( const local_ministep_type * ministep , FILE * stream) { - - fprintf(stream , "MINISTEP:%s,", ministep->name); - - { - /* Dumping all the DATASET instances. */ - { - hash_iter_type * dataset_iter = hash_iter_alloc( ministep->datasets ); - while (!hash_iter_is_complete( dataset_iter )) { - const local_dataset_type * dataset = hash_iter_get_next_value( dataset_iter ); - local_dataset_summary_fprintf(dataset, stream); - } - hash_iter_free( dataset_iter ); - } - - /* Only one OBSDATA */ - local_obsdata_type * obsdata = local_ministep_get_obsdata(ministep); - local_obsdata_summary_fprintf( obsdata , stream); - fprintf(stream, "\n"); - } -} - - diff --git a/ThirdParty/Ert/libenkf/src/local_obsdata.c b/ThirdParty/Ert/libenkf/src/local_obsdata.c deleted file mode 100644 index 4b20d242f8..0000000000 --- a/ThirdParty/Ert/libenkf/src/local_obsdata.c +++ /dev/null @@ -1,165 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'local_obsdata.c' - - ERT 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. - - ERT 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 - for more details. -*/ -#include - -#include -#include -#include -#include - -#include -#include - - -#define LOCAL_OBSDATA_TYPE_ID 86331309 - -struct local_obsdata_struct { - UTIL_TYPE_ID_DECLARATION; - hash_type * nodes_map; - vector_type * nodes_list; - char * name; -}; - - - -UTIL_IS_INSTANCE_FUNCTION( local_obsdata , LOCAL_OBSDATA_TYPE_ID ) -static UTIL_SAFE_CAST_FUNCTION( local_obsdata , LOCAL_OBSDATA_TYPE_ID ) - -local_obsdata_type * local_obsdata_alloc( const char * name) { - local_obsdata_type * data = util_malloc( sizeof * data ); - UTIL_TYPE_ID_INIT( data , LOCAL_OBSDATA_TYPE_ID ); - data->nodes_list = vector_alloc_new(); - data->nodes_map = hash_alloc(); - data->name = util_alloc_string_copy( name ); - return data; -} - - - -local_obsdata_type * local_obsdata_alloc_wrapper( local_obsdata_node_type * node ) { - local_obsdata_type * data = local_obsdata_alloc( local_obsdata_node_get_key( node )); - local_obsdata_add_node( data , node ); - return data; -} - - -local_obsdata_type * local_obsdata_alloc_copy( const local_obsdata_type * src, const char * target_key) { - local_obsdata_type * target = local_obsdata_alloc( target_key ); - int i; - for (i=0; i < local_obsdata_get_size( src ); i++ ) { - const local_obsdata_node_type * src_node = local_obsdata_iget( src , i ); - local_obsdata_node_type * target_node = local_obsdata_node_alloc_copy( src_node ); - local_obsdata_add_node( target , target_node ); - } - return target; -} - - - -void local_obsdata_free( local_obsdata_type * data ) { - vector_free( data->nodes_list ); - hash_free( data->nodes_map ); - free( data->name ); - free( data ); -} - -void local_obsdata_free__( void * arg) { - local_obsdata_type * data = local_obsdata_safe_cast( arg ); - return local_obsdata_free( data ); -} - - -const char * local_obsdata_get_name( const local_obsdata_type * data) { - return data->name; -} - - -int local_obsdata_get_size( const local_obsdata_type * data ) { - return vector_get_size( data->nodes_list ); -} - -/* - The @data instance will assume ownership of the node; i.e. calling - scope should NOT call local_obsdata_node_free(). -*/ - -bool local_obsdata_add_node( local_obsdata_type * data , local_obsdata_node_type * node ) { - const char * key = local_obsdata_node_get_key( node ); - if (local_obsdata_has_node(data , key)) - return false; - else { - vector_append_owned_ref( data->nodes_list , node , local_obsdata_node_free__ ); - hash_insert_ref( data->nodes_map , key , node ); - return true; - } -} - - void local_obsdata_del_node( local_obsdata_type * data , const char * key) { - local_obsdata_node_type * node = local_obsdata_get( data , key ); - int index = vector_find( data->nodes_list , node ); - - hash_del( data->nodes_map , key ); - vector_idel( data->nodes_list , index ); -} - - - void local_obsdata_clear( local_obsdata_type * data ) { - hash_clear( data->nodes_map ); - vector_clear( data->nodes_list ); - } - - -local_obsdata_node_type * local_obsdata_iget( const local_obsdata_type * data , int index) { - return vector_iget( data->nodes_list , index ); -} - - -local_obsdata_node_type * local_obsdata_get( const local_obsdata_type * data , const char * key) { - return hash_get( data->nodes_map , key ); -} - - -bool local_obsdata_has_node( const local_obsdata_type * data , const char * key) { - return hash_has_key( data->nodes_map , key ); -} - -void local_obsdata_reset_tstep_list( local_obsdata_type * data , const int_vector_type * step_list) { - int i; - for (i=0; i < local_obsdata_get_size( data ); i++ ) { - local_obsdata_node_type * node = local_obsdata_iget( data , i ); - local_obsdata_node_reset_tstep_list(node, step_list); - } -} - -active_list_type * local_obsdata_get_node_active_list(const local_obsdata_type * obsdata , const char * obs_key ) { - local_obsdata_node_type * obsdata_node = local_obsdata_get( obsdata , obs_key ); - active_list_type * active_list = local_obsdata_node_get_active_list( obsdata_node ); - return active_list; -} - -void local_obsdata_summary_fprintf( const local_obsdata_type * obsdata , FILE * stream) { - - fprintf(stream , "LOCAL OBSDATA NAME:%s,LOCAL OBSDATA SIZE:%d,", local_obsdata_get_name(obsdata), local_obsdata_get_size(obsdata) ); - - int i; - for (i = 0; i < local_obsdata_get_size( obsdata ); i++ ) { - local_obsdata_node_type * node = local_obsdata_iget( obsdata , i ); - const char * obs_key = local_obsdata_node_get_key(node); - fprintf(stream , "OBSERVATION:%s,", obs_key ); - } -} diff --git a/ThirdParty/Ert/libenkf/src/local_obsdata_node.c b/ThirdParty/Ert/libenkf/src/local_obsdata_node.c deleted file mode 100644 index ba4e207212..0000000000 --- a/ThirdParty/Ert/libenkf/src/local_obsdata_node.c +++ /dev/null @@ -1,174 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'local_obsdata_node.c' - - ERT 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. - - ERT 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 - for more details. -*/ -#include - -#include -#include -#include - -#include - -#define LOCAL_OBSDATA_NODE_TYPE_ID 84441309 - -struct local_obsdata_node_struct { - UTIL_TYPE_ID_DECLARATION; - char * obs_key; - active_list_type * active_list; - int_vector_type * tstep_list; - bool all_timestep_active; -}; - - - -UTIL_IS_INSTANCE_FUNCTION( local_obsdata_node , LOCAL_OBSDATA_NODE_TYPE_ID ) -UTIL_SAFE_CAST_FUNCTION( local_obsdata_node , LOCAL_OBSDATA_NODE_TYPE_ID ) - -static local_obsdata_node_type * local_obsdata_node_alloc__( const char * obs_key , bool all_timestep_active) { - local_obsdata_node_type * node = util_malloc( sizeof * node ); - UTIL_TYPE_ID_INIT( node , LOCAL_OBSDATA_NODE_TYPE_ID ); - node->obs_key = util_alloc_string_copy( obs_key ); - node->active_list = NULL; - node->tstep_list = NULL; - node->all_timestep_active = all_timestep_active; - return node; -} - - -local_obsdata_node_type * local_obsdata_node_alloc( const char * obs_key , bool all_timestep_active ) { - local_obsdata_node_type * node = local_obsdata_node_alloc__(obs_key , all_timestep_active); - - node->active_list = active_list_alloc( ); - node->tstep_list = int_vector_alloc(0,0); - - return node; -} - - -local_obsdata_node_type * local_obsdata_node_alloc_copy( const local_obsdata_node_type * src) { - local_obsdata_node_type * target = local_obsdata_node_alloc__( src->obs_key , src->all_timestep_active ); - - target->active_list = active_list_alloc_copy( src->active_list ); - target->tstep_list = int_vector_alloc_copy( src->tstep_list ); - - return target; -} - - - -void local_obsdata_node_copy_active_list( local_obsdata_node_type * node , const active_list_type * active_list) { - active_list_copy( node->active_list , active_list ); -} - - -const char * local_obsdata_node_get_key( const local_obsdata_node_type * node ) { - return node->obs_key; -} - - - -void local_obsdata_node_free( local_obsdata_node_type * node ) { - if (node->active_list) - active_list_free( node->active_list ); - - if (node->tstep_list) - int_vector_free( node->tstep_list ); - - free( node->obs_key ); - free( node ); -} - - - -void local_obsdata_node_free__( void * arg ) { - local_obsdata_node_type * node = local_obsdata_node_safe_cast( arg ); - local_obsdata_node_free( node ); -} - - -active_list_type * local_obsdata_node_get_active_list( const local_obsdata_node_type * node ) { - return node->active_list; -} - - -bool local_obsdata_node_tstep_active( const local_obsdata_node_type * node , int tstep ) { - if (node->all_timestep_active) - return true; - else - return local_obsdata_node_has_tstep( node , tstep ); -} - - - -/* - This a temporarary function to support the change local_obsset -> - local_obsdata; should eventually be removed. -*/ - -void local_obsdata_node_reset_tstep_list( local_obsdata_node_type * node , const int_vector_type * step_list) { - int_vector_free(node->tstep_list); - node->tstep_list = int_vector_alloc_copy( step_list ); - node->all_timestep_active = false; -} - - -bool local_obsdata_node_all_timestep_active( const local_obsdata_node_type * node) { - return node->all_timestep_active; -} - -/** - Observe that this function check for explicitly added timestep, - i.e. if the all_timestep_active flag is set to true this will - return false. -*/ - -bool local_obsdata_node_has_tstep( const local_obsdata_node_type * node , int tstep) { - const int_vector_type * tstep_list = node->tstep_list; - if (int_vector_index_sorted( tstep_list , tstep) == -1) - return false; - else - return true; -} - - -void local_obsdata_node_add_tstep( local_obsdata_node_type * node, int tstep) { - if (!local_obsdata_node_has_tstep( node , tstep)) { - - if (int_vector_size( node->tstep_list )) { - int last = int_vector_get_last( node->tstep_list ); - int_vector_append( node->tstep_list , tstep ); - if (tstep < last) - int_vector_sort( node->tstep_list); - } else - int_vector_append( node->tstep_list , tstep ); - - node->all_timestep_active = false; - } -} - - - - -void local_obsdata_node_add_range( local_obsdata_node_type * node, int step1 , int step2) { - int tstep; - for (tstep = step1; tstep <= step2; tstep++) - local_obsdata_node_add_tstep( node , tstep ); -} - -void local_obsdata_node_set_all_timestep_active( local_obsdata_node_type * node, bool flag) { - node->all_timestep_active = flag; -} diff --git a/ThirdParty/Ert/libenkf/src/local_updatestep.c b/ThirdParty/Ert/libenkf/src/local_updatestep.c deleted file mode 100644 index ba0f8eba19..0000000000 --- a/ThirdParty/Ert/libenkf/src/local_updatestep.c +++ /dev/null @@ -1,118 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'local_updatestep.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include -#include -#include - -/** - One enkf update is described/configured by the data structure in - local_ministep.c. This file implements a local report_step, which - is a collection of ministeps - in many cases a local_updatestep will - only consist of one single local_ministep; but in principle it can - contain several. -*/ - -#define LOCAL_UPDATESTEP_TYPE_ID 77159 - -struct local_updatestep_struct { - UTIL_TYPE_ID_DECLARATION; - char * name; - vector_type * ministep; -}; - - - -UTIL_SAFE_CAST_FUNCTION(local_updatestep , LOCAL_UPDATESTEP_TYPE_ID) - - -local_updatestep_type * local_updatestep_alloc( const char * name ) { - local_updatestep_type * updatestep = util_malloc( sizeof * updatestep ); - - UTIL_TYPE_ID_INIT( updatestep , LOCAL_UPDATESTEP_TYPE_ID ); - updatestep->name = util_alloc_string_copy( name ); - updatestep->ministep = vector_alloc_new(); - - return updatestep; -} - - -bool local_updatestep_has_data_key( const local_updatestep_type * update_step , const char * key) { - bool has_key = false; - for (int i = 0; i < vector_get_size( update_step->ministep ); i++) { - const local_ministep_type * ministep = vector_iget_const( update_step->ministep , i ); - if (local_ministep_has_data_key(ministep, key)) - has_key = true; - } - return has_key; -} - -/** - Observe that use_count values are not copied. -*/ -local_updatestep_type * local_updatestep_alloc_copy( const local_updatestep_type * src , const char * name ) { - local_updatestep_type * new = local_updatestep_alloc( name ); - for (int i = 0; i < vector_get_size(src->ministep ); i++) - local_updatestep_add_ministep( new , vector_iget( src->ministep , i) ); - return new; -} - - -void local_updatestep_free( local_updatestep_type * updatestep) { - free( updatestep->name ); - vector_free( updatestep->ministep ); - free( updatestep ); -} - - -void local_updatestep_free__(void * arg) { - local_updatestep_type * updatestep = local_updatestep_safe_cast( arg ); - local_updatestep_free( updatestep ); -} - - -void local_updatestep_add_ministep( local_updatestep_type * updatestep , local_ministep_type * ministep) { - vector_append_ref( updatestep->ministep , ministep ); /* Observe that the vector takes NO ownership */ -} - - - -local_ministep_type * local_updatestep_iget_ministep( const local_updatestep_type * updatestep , int index) { - return vector_iget( updatestep->ministep , index ); -} - - -local_obsdata_type * local_updatestep_iget_obsdata( const local_updatestep_type * updatestep , int index) { - return local_ministep_get_obsdata( vector_iget( updatestep->ministep , index ) ); -} - - -int local_updatestep_get_num_ministep( const local_updatestep_type * updatestep) { - return vector_get_size( updatestep->ministep ); -} - -const char * local_updatestep_get_name( const local_updatestep_type * updatestep ) { - return updatestep->name; -} - - diff --git a/ThirdParty/Ert/libenkf/src/meas_data.c b/ThirdParty/Ert/libenkf/src/meas_data.c deleted file mode 100644 index 7abdf6b182..0000000000 --- a/ThirdParty/Ert/libenkf/src/meas_data.c +++ /dev/null @@ -1,451 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'meas_data.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -/** - See the file README.obs for ducumentation of the varios datatypes - involved with observations/measurement/+++. -*/ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -#define MEAS_BLOCK_TYPE_ID 661936407 -#define MEAS_DATA_TYPE_ID 561000861 - - -struct meas_data_struct { - UTIL_TYPE_ID_DECLARATION; - int active_ens_size; - vector_type * data; - pthread_mutex_t data_mutex; - hash_type * blocks; - bool_vector_type * ens_mask; -}; - - -struct meas_block_struct { - UTIL_TYPE_ID_DECLARATION; - int active_ens_size; - int obs_size; - int ens_stride; - int obs_stride; - int data_size; - char * obs_key; - double * data; - bool * active; - bool stat_calculated; - const bool_vector_type * ens_mask; - int_vector_type * index_map; -}; - - -UTIL_SAFE_CAST_FUNCTION( meas_block , MEAS_BLOCK_TYPE_ID ) - - -/** - Observe that meas_block instance must be allocated with a correct - value for obs_size; it can not grow during use, and it does also - not count the number of elements added. - - Observe that the input argument @obs_size should be the total size - of the observation; if parts of the observation have been excluded - due to local analysis it should still be included in the @obs_size - value. -*/ - -meas_block_type * meas_block_alloc( const char * obs_key , const bool_vector_type * ens_mask , int obs_size) { - meas_block_type * meas_block = util_malloc( sizeof * meas_block ); - UTIL_TYPE_ID_INIT( meas_block , MEAS_BLOCK_TYPE_ID ); - meas_block->active_ens_size = bool_vector_count_equal( ens_mask , true ); - meas_block->ens_mask = ens_mask; - meas_block->obs_size = obs_size; - meas_block->obs_key = util_alloc_string_copy( obs_key ); - meas_block->data = util_calloc( (meas_block->active_ens_size + 2) * obs_size , sizeof * meas_block->data ); - meas_block->active = util_calloc( obs_size , sizeof * meas_block->active ); - meas_block->ens_stride = 1; - meas_block->obs_stride = meas_block->active_ens_size + 2; - meas_block->data_size = (meas_block->active_ens_size + 2) * obs_size; - meas_block->index_map = bool_vector_alloc_active_index_list( meas_block->ens_mask , -1); - { - int i; - for (i=0; i < obs_size; i++) - meas_block->active[i] = false; - } - meas_block->stat_calculated = false; - return meas_block; -} - -static void meas_block_fprintf( const meas_block_type * meas_block , FILE * stream) { - int iens; - int iobs; - for (iobs = 0; iobs < meas_block->obs_size; iobs++) { - for (iens = 0; iens < meas_block->active_ens_size; iens++) { - int index = iens * meas_block->ens_stride + iobs * meas_block->obs_stride; - fprintf(stream , " %10.2f ", meas_block->data[ index ]); - } - fprintf(stream , "\n"); - } -} - - -void meas_block_free( meas_block_type * meas_block ) { - free( meas_block->obs_key ); - free( meas_block->data ); - free( meas_block->active ); - int_vector_free( meas_block->index_map ); - free( meas_block ); -} - - -static void meas_block_free__( void * arg ) { - meas_block_type * meas_block = meas_block_safe_cast( arg ); - meas_block_free( meas_block ); -} - - - -static void meas_block_initS( const meas_block_type * meas_block , matrix_type * S, int * __obs_offset) { - int obs_offset = *__obs_offset; - for (int iobs =0; iobs < meas_block->obs_size; iobs++) { - if (meas_block->active[iobs]) { - for (int iens =0; iens < meas_block->active_ens_size; iens++) { - int obs_index = iens * meas_block->ens_stride + iobs* meas_block->obs_stride; - - matrix_iset( S , obs_offset, iens , meas_block->data[ obs_index ]); - } - obs_offset++; - } - } - *__obs_offset = obs_offset; -} - -bool meas_block_iens_active( const meas_block_type * meas_block , int iens) { - return bool_vector_iget( meas_block->ens_mask , iens); -} - - -/* -static void meas_data_assign_block( meas_block_type * target_block , const meas_block_type * src_block , int target_iens , int src_iens ) { - int iobs; - for (iobs =0; iobs < target_block->obs_size; iobs++) { - int target_index = target_iens * target_block->ens_stride + iobs * target_block->obs_stride; - int src_index = src_iens * src_block->ens_stride + iobs * src_block->obs_stride; - target_block->data[ target_index ] = src_block->data[ src_index ]; - } - target_block->stat_calculated = false; -} -*/ - -static void meas_block_calculate_ens_stats( meas_block_type * meas_block ) { - bool include_inactive = true; - int iobs , iens; - for (iobs =0; iobs < meas_block->obs_size; iobs++) { - if (meas_block->active[iobs] || include_inactive) { - double M1 = 0; - double M2 = 0; - for (iens =0; iens < meas_block->active_ens_size; iens++) { - int index = iens * meas_block->ens_stride + iobs * meas_block->obs_stride; - M1 += meas_block->data[ index ]; - M2 += meas_block->data[ index ] * meas_block->data[ index ]; - } - { - int mean_index = (meas_block->active_ens_size + 0) * meas_block->ens_stride + iobs * meas_block->obs_stride; - int std_index = (meas_block->active_ens_size + 1) * meas_block->ens_stride + iobs * meas_block->obs_stride; - double mean = M1 / meas_block->active_ens_size; - double var = M2 / meas_block->active_ens_size - mean * mean; - meas_block->data[ mean_index ] = mean; - meas_block->data[ std_index ] = sqrt( util_double_max( 0.0 , var)); - } - } - } - meas_block->stat_calculated = true; -} - - -static void meas_block_assert_ens_stat( meas_block_type * meas_block ) { - if (!meas_block->stat_calculated) - meas_block_calculate_ens_stats( meas_block ); -} - - -static void meas_block_assert_iens_active( const meas_block_type * meas_block , int iens) { - if (!bool_vector_iget( meas_block->ens_mask , iens )) - util_abort("%s: fatal error - trying to access inactive ensemble member:%d \n",__func__ , iens); -} - - -void meas_block_iset( meas_block_type * meas_block , int iens , int iobs , double value) { - meas_block_assert_iens_active( meas_block , iens ); - { - int active_iens = int_vector_iget( meas_block->index_map , iens ); - int index = active_iens * meas_block->ens_stride + iobs * meas_block->obs_stride; - meas_block->data[ index ] = value; - if (!meas_block->active[ iobs ]) - meas_block->active[ iobs ] = true; - - meas_block->stat_calculated = false; - } -} - - -double meas_block_iget( const meas_block_type * meas_block , int iens , int iobs) { - meas_block_assert_iens_active( meas_block , iens ); - { - int active_iens = int_vector_iget( meas_block->index_map , iens ); - int index = active_iens * meas_block->ens_stride + iobs * meas_block->obs_stride; - return meas_block->data[ index ]; - } -} - - -static int meas_block_get_active_obs_size( const meas_block_type * meas_block ) { - int obs_size = 0; - int i; - - for (i=0; i < meas_block->obs_size; i++) - if (meas_block->active[i]) - obs_size++; - - return obs_size; -} - - -double meas_block_iget_ens_std( meas_block_type * meas_block , int iobs) { - meas_block_assert_ens_stat( meas_block ); - { - int std_index = (meas_block->active_ens_size + 1) * meas_block->ens_stride + iobs * meas_block->obs_stride; - return meas_block->data[ std_index ]; - } -} - - -double meas_block_iget_ens_mean( meas_block_type * meas_block , int iobs) { - meas_block_assert_ens_stat( meas_block ); - { - int mean_index = meas_block->active_ens_size * meas_block->ens_stride + iobs * meas_block->obs_stride; - return meas_block->data[ mean_index ]; - } -} - - -bool meas_block_iget_active( const meas_block_type * meas_block , int iobs) { - return meas_block->active[ iobs ]; -} - - -void meas_block_deactivate( meas_block_type * meas_block , int iobs ) { - if (meas_block->active[ iobs ]) - meas_block->active[ iobs ] = false; - meas_block->stat_calculated = false; -} - - -int meas_block_get_total_obs_size( const meas_block_type * meas_block ) { - return meas_block->obs_size; -} - - -int meas_block_get_active_ens_size( const meas_block_type * meas_block ) { - return meas_block->active_ens_size; -} - - -int meas_block_get_total_ens_size( const meas_block_type * meas_block ) { - return bool_vector_size( meas_block->ens_mask ); -} - - - - - - -/*****************************************************************/ - -UTIL_IS_INSTANCE_FUNCTION( meas_data , MEAS_DATA_TYPE_ID ) - -meas_data_type * meas_data_alloc( const bool_vector_type * ens_mask ) { - meas_data_type * meas = util_malloc(sizeof * meas ); - UTIL_TYPE_ID_INIT( meas , MEAS_DATA_TYPE_ID ); - - meas->data = vector_alloc_new(); - meas->blocks = hash_alloc(); - meas->ens_mask = bool_vector_alloc_copy( ens_mask ); - meas->active_ens_size = bool_vector_count_equal( ens_mask , true ); - pthread_mutex_init( &meas->data_mutex , NULL ); - - return meas; -} - - - -void meas_data_free(meas_data_type * matrix) { - vector_free( matrix->data ); - hash_free( matrix->blocks ); - bool_vector_free( matrix->ens_mask ); - free( matrix ); -} - - - -void meas_data_reset(meas_data_type * matrix) { - hash_clear( matrix->blocks ); - vector_clear( matrix->data ); /* Will dump and discard all the meas_block instances. */ -} - - -/* - The obs_key is not alone unique over different report steps. -*/ -static char * meas_data_alloc_key( const char * obs_key , int report_step) { - return util_alloc_sprintf( "%s-%d" , obs_key , report_step ); -} - -/** - The code actually adding new blocks to the vector must be run in single-thread mode. -*/ - -meas_block_type * meas_data_add_block( meas_data_type * matrix , const char * obs_key , int report_step , int obs_size) { - char * lookup_key = meas_data_alloc_key( obs_key , report_step ); - pthread_mutex_lock( &matrix->data_mutex ); - { - if (!hash_has_key( matrix->blocks , lookup_key )) { - meas_block_type * new_block = meas_block_alloc(obs_key , matrix->ens_mask , obs_size); - vector_append_owned_ref( matrix->data , new_block , meas_block_free__ ); - hash_insert_ref( matrix->blocks , lookup_key , new_block ); - } - } - pthread_mutex_unlock( &matrix->data_mutex ); - free( lookup_key ); - return vector_get_last( matrix->data ); -} - - -/* - Observe that the key should compare with the keys created by meas_data_alloc_key(). -*/ -bool meas_data_has_block( const meas_data_type * matrix , const char * lookup_key) { - return hash_has_key( matrix->blocks , lookup_key); -} - -meas_block_type * meas_data_get_block( const meas_data_type * matrix , const char * lookup_key) { - return hash_get( matrix->blocks , lookup_key ); -} - - -meas_block_type * meas_data_iget_block( const meas_data_type * matrix , int block_nr) { - return vector_iget( matrix->data , block_nr); -} - - -const meas_block_type * meas_data_iget_block_const( const meas_data_type * matrix , int block_nr) { - return vector_iget_const( matrix->data , block_nr); -} - - -int meas_data_get_active_obs_size( const meas_data_type * matrix ) { - int obs_size = 0; - - for (int block_nr = 0; block_nr < vector_get_size( matrix->data ); block_nr++) { - const meas_block_type * meas_block = vector_iget_const( matrix->data , block_nr); - obs_size += meas_block_get_active_obs_size( meas_block ); - } - - return obs_size; -} - - - -/* - Observe that this can return NULL is there is no data/observations. -*/ - -matrix_type * meas_data_allocS(const meas_data_type * matrix) { - int obs_offset = 0; - matrix_type * S = matrix_alloc( meas_data_get_active_obs_size( matrix ) , matrix->active_ens_size); - if (S) { - for (int block_nr = 0; block_nr < vector_get_size( matrix->data ); block_nr++) { - const meas_block_type * meas_block = vector_iget_const( matrix->data , block_nr); - meas_block_initS( meas_block , S , &obs_offset); - } - - matrix_set_name( S , "S"); - matrix_assert_finite( S ); - } - return S; -} - - - -int meas_data_get_nrobs( const meas_data_type * meas_data ) { - return -1; -} - - -int meas_data_get_active_ens_size( const meas_data_type * meas_data ) { - return meas_data->active_ens_size; -} - - -int meas_data_get_total_ens_size( const meas_data_type * meas_data ) { - return bool_vector_size( meas_data->ens_mask ); -} - - -int meas_data_get_num_blocks( const meas_data_type * meas_data ) { - return vector_get_size( meas_data->data ); -} - - - -/* -void meas_data_assign_vector(meas_data_type * target_matrix, const meas_data_type * src_matrix , int target_index , int src_index) { - if (target_matrix->active_ens_size != src_matrix->active_ens_size) - util_abort("%s: size mismatch \n",__func__); - - for (int block_nr = 0; block_nr < vector_get_size( target_matrix->data ); block_nr++) { - meas_block_type * target_block = meas_data_iget_block( target_matrix , block_nr ); - const meas_block_type * src_block = meas_data_iget_block_const( src_matrix , block_nr ); - - meas_data_assign_block( target_block , src_block , target_index , src_index ); - } -} -*/ - - - -void meas_data_fprintf( const meas_data_type * matrix , FILE * stream ) { - fprintf(stream , "-----------------------------------------------------------------\n"); - for (int block_nr = 0; block_nr < vector_get_size( matrix->data ); block_nr++) { - const meas_block_type * block = meas_data_iget_block_const( matrix , block_nr ); - meas_block_fprintf( block , stream ); - fprintf(stream , "\n"); - } - fprintf(stream , "-----------------------------------------------------------------\n"); -} diff --git a/ThirdParty/Ert/libenkf/src/member_config.c b/ThirdParty/Ert/libenkf/src/member_config.c deleted file mode 100644 index 1fefd908ec..0000000000 --- a/ThirdParty/Ert/libenkf/src/member_config.c +++ /dev/null @@ -1,174 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'member_config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include - - -/** - This struct contains information which is private to this - member. It is initialized at object boot time, and (typically) not - changed during the simulation. [In principle it could change during - the simulation, but the current API does not support that.] -*/ - - -struct member_config_struct { - int iens; /* The ensemble member number of this member. */ - char * casename; /* The name of this case - will mostly be NULL. */ - keep_runpath_type keep_runpath; /* Should the run-path directory be left around (for this member)*/ - bool pre_clear_runpath; /* Should the runpath directory be cleared before starting? */ - char * jobname; /* The jobname used for this job when submitting to the queue system. */ - char * eclbase; /* The ECLBASE string used for simulations of this member. */ -}; - - -/*****************************************************************/ -/* - Observe that there is a potential for conflict between the fields - pre_clear_runpath and keep_runpath when running normal EnKF. If both - are set to true the former will win. -*/ - - - -/******************************************************************/ -/** Implementation of the member_config struct. All of this implementation - is private - however some of it is exported through the enkf_state object, - and it should be perfectly safe to export more of it. -*/ - - -const char * member_config_update_jobname(member_config_type * member_config , const char * jobname_fmt , const subst_list_type * subst_list) { - if (jobname_fmt != NULL) { - util_safe_free( member_config->jobname ); - { - char * tmp = util_alloc_sprintf( jobname_fmt , member_config->iens); - member_config->jobname = subst_list_alloc_filtered_string( subst_list , tmp ); - free( tmp ); - } - } - return member_config->jobname; -} - - - -const char * member_config_update_eclbase(member_config_type * member_config , const ecl_config_type * ecl_config , const subst_list_type * subst_list) { - util_safe_free( member_config->eclbase ); - { - const path_fmt_type * eclbase_fmt = ecl_config_get_eclbase_fmt(ecl_config); - if (eclbase_fmt != NULL) { - { - char * tmp = path_fmt_alloc_path(eclbase_fmt , false , member_config->iens); - member_config->eclbase = subst_list_alloc_filtered_string( subst_list , tmp ); - free( tmp ); - } - } - } - - return member_config->eclbase; -} - - -int member_config_get_iens( const member_config_type * member_config ) { - return member_config->iens; -} - - - -void member_config_free(member_config_type * member_config) { - util_safe_free(member_config->eclbase); - util_safe_free(member_config->casename ); - free(member_config); -} - - - -void member_config_set_keep_runpath(member_config_type * member_config , keep_runpath_type keep_runpath) { - member_config->keep_runpath = keep_runpath; -} - - -keep_runpath_type member_config_get_keep_runpath(const member_config_type * member_config) { - return member_config->keep_runpath; -} - -bool member_config_pre_clear_runpath(const member_config_type * member_config) { - return member_config->pre_clear_runpath; -} - - -void member_config_set_pre_clear_runpath(member_config_type * member_config , bool pre_clear_runpath) { - member_config->pre_clear_runpath = pre_clear_runpath; -} - - - - - -const char * member_config_get_eclbase( const member_config_type * member_config ) { - return member_config->eclbase; -} - - -const char * member_config_get_jobname( const member_config_type * member_config ) { - if (member_config->jobname != NULL) - return member_config->jobname; - else { - if (member_config->eclbase != NULL) - return member_config->eclbase; - else { - util_abort("%s: sorry can not submit JOB - must specify name with JOBNAME or ECLBASE config keys\n",__func__); - return NULL; - } - } -} - - -const char * member_config_get_casename( const member_config_type * member_config ) { - return member_config->casename; -} - - -member_config_type * member_config_alloc(int iens , - const char * casename , - bool pre_clear_runpath , - keep_runpath_type keep_runpath , - const ecl_config_type * ecl_config , - const ensemble_config_type * ensemble_config) { - - - member_config_type * member_config = util_malloc( sizeof * member_config ); - member_config->casename = util_alloc_string_copy( casename ); - member_config->iens = iens; /* Can only be changed in the allocater. */ - member_config->eclbase = NULL; - member_config->jobname = NULL; - member_config->pre_clear_runpath = pre_clear_runpath; - member_config_set_keep_runpath(member_config , keep_runpath); - return member_config; -} diff --git a/ThirdParty/Ert/libenkf/src/migrate_bfs.c b/ThirdParty/Ert/libenkf/src/migrate_bfs.c deleted file mode 100644 index 5a01ace37b..0000000000 --- a/ThirdParty/Ert/libenkf/src/migrate_bfs.c +++ /dev/null @@ -1,131 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'migrate_bfs.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include -#include - - - -static void migrate_file( const char * src_case, int num_src_drivers , const char * target_case, int num_target_drivers, const char * file, int block_size , msg_type * msg) { - block_fs_type ** target_fs = util_calloc( num_target_drivers , sizeof * target_fs ); - int itarget; - for (itarget = 0; itarget < num_target_drivers; itarget++) { - char * path = util_alloc_sprintf("%s/mod_%d" , target_case , itarget ); - char * mount_file = util_alloc_sprintf("%s/mod_%d/%s.mnt" , target_case , itarget , file ); - util_make_path( path ); - - target_fs[itarget] = block_fs_mount( mount_file , 16 , 0 , 1.0, 0 , false , false ); - free( mount_file ); - free( path ); - } - - { - int isrc; - buffer_type * buffer = buffer_alloc(1024); - for (isrc = 0; isrc < num_src_drivers; isrc++) { - char * mount_file = util_alloc_sprintf("%s/mod_%d/%s.mnt" , src_case , isrc , file ); - block_fs_type * src_fs = block_fs_mount( mount_file , 16 , 1024 , 1.0 , 0 , true , true ); - vector_type * file_list = block_fs_alloc_filelist( src_fs , NULL , NO_SORT , false ); - int ifile; - msg_update( msg , mount_file ); - for (ifile = 0; ifile < vector_get_size( file_list ); ifile++) { - const file_node_type * node = vector_iget_const( file_list , ifile ); - const char * filename = file_node_get_filename( node ); - int report_step , iens; - char * key; - if (block_fs_sscanf_key( filename , &key , &report_step , &iens )) { - block_fs_fread_realloc_buffer( src_fs , filename , buffer); - block_fs_fwrite_buffer( target_fs[(iens % num_target_drivers)] , filename , buffer ); - free( key ); - } else - util_abort("%s: All hell is loose - failed to parse:%s \n",__func__ , filename); - } - - vector_free( file_list ); - block_fs_close(src_fs , false); - } - buffer_free( buffer ); - } - - - for (itarget = 0; itarget < num_target_drivers; itarget++) - block_fs_close( target_fs[itarget] , false); - free( target_fs ); -} - - -static void copy_index( const char * src_case , const char * target_case) { - char * mount_src = util_alloc_filename(src_case , "INDEX" , "mnt"); - char * mount_target = util_alloc_filename(target_case , "INDEX" , "mnt"); - char * data_src = util_alloc_filename(src_case , "INDEX" , "data_0"); - char * data_target = util_alloc_filename(target_case , "INDEX" , "data_0"); - - util_copy_file( mount_src , mount_target ); - util_copy_file( data_src , data_target ); - - free( mount_src ); - free( mount_target ); - free( data_src ); - free( data_target ); -} - - -static void usage() { - printf("Use:\n"); - printf("bash%% migrate_bfs case\n"); - exit(1); -} - -int main(int argc, char ** argv) { - int num_src_drivers = 10; - int num_target_drivers = 32; - if (argc != 4) - usage(); - - { - char * src_path = argv[1] ; - char * target_path = argv[2] ; - char * dir = argv[3] ; - - util_make_path( target_path ); - if (util_same_file( src_path , target_path)) { - fprintf(stderr,"The two directories:%s and %s point to the same location \n" , src_path , target_path ); - exit(1); - } - - { - char * src_case = util_alloc_sprintf("%s/%s" , src_path , dir ); - char * target_case = util_alloc_sprintf("%s/%s" , target_path , dir ); - - msg_type * msg = msg_alloc("Copying from: " , false); - msg_show( msg ); - migrate_file(src_case , num_src_drivers , target_case , num_target_drivers , "ANALYZED" , 32 , msg); - migrate_file(src_case , num_src_drivers , target_case , num_target_drivers , "FORECAST" , 32 , msg); - migrate_file(src_case , num_src_drivers , target_case , num_target_drivers , "PARAMETER" , 32 , msg); - migrate_file(src_case , num_src_drivers , target_case , num_target_drivers , "STATIC" , 32 , msg); - copy_index( src_case , target_case ); - free( src_case); - free( target_case ); - msg_free( msg , true ); - } - } -} diff --git a/ThirdParty/Ert/libenkf/src/misfit_ensemble.c b/ThirdParty/Ert/libenkf/src/misfit_ensemble.c deleted file mode 100644 index 0ade82b860..0000000000 --- a/ThirdParty/Ert/libenkf/src/misfit_ensemble.c +++ /dev/null @@ -1,249 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'misfit_ensemble.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - - -/** - This file implements a type misfit_ensemble which is used to rank the - different realization according to various criteria. - - The top level datastructure in this file is the misfit_ensemble, and - that is the only exported datatype, but in addition there are the - misfit_member which is the misfit for one ensemble member, and - misfit_ts which is the misfit for one ensemble member / one - observation key. -*/ - - - - - -#define MISFIT_ENSEMBLE_TYPE_ID 441066 - -struct misfit_ensemble_struct { - UTIL_TYPE_ID_DECLARATION; - bool initialized; - int history_length; - vector_type * ensemble; /* Vector of misfit_member_type instances - one for each ensemble member. */ -}; - - -/*****************************************************************/ - -static double ** __2d_malloc(int rows , int columns) { - double ** d = util_calloc( rows , sizeof * d ); - for (int i =0; i < rows; i++) - d[i] = util_calloc( columns , sizeof * d[i]); - return d; -} - -static void __2d_free(double ** d , int rows) { - for (int i =0; i < rows; i++) - free(d[i]); - free(d); -} - - -void misfit_ensemble_initialize( misfit_ensemble_type * misfit_ensemble , - const ensemble_config_type * ensemble_config , - const enkf_obs_type * enkf_obs , - enkf_fs_type * fs , - int ens_size , - int history_length, - bool force_init) { - - if (force_init || !misfit_ensemble->initialized) { - misfit_ensemble_clear( misfit_ensemble ); - - msg_type * msg = msg_alloc("Evaluating misfit for observation: " , false); - double ** chi2_work = __2d_malloc( history_length + 1 , ens_size ); - bool_vector_type * iens_valid = bool_vector_alloc( ens_size , true ); - - hash_iter_type * obs_iter = enkf_obs_alloc_iter( enkf_obs ); - const char * obs_key = hash_iter_get_next_key( obs_iter ); - - misfit_ensemble->history_length = history_length; - misfit_ensemble_set_ens_size( misfit_ensemble , ens_size ); - - msg_show( msg ); - while (obs_key != NULL) { - obs_vector_type * obs_vector = enkf_obs_get_vector( enkf_obs , obs_key ); - msg_update( msg , obs_key ); - - bool_vector_reset( iens_valid ); - bool_vector_iset( iens_valid , ens_size - 1 , true ); - obs_vector_ensemble_chi2( obs_vector , - fs , - iens_valid , - 0 , - misfit_ensemble->history_length, - 0 , - ens_size , - chi2_work); - - /** - Internalizing the results from the chi2_work table into the misfit structure. - */ - for (int iens = 0; iens < ens_size; iens++) { - misfit_member_type * node = misfit_ensemble_iget_member( misfit_ensemble , iens ); - if (bool_vector_iget( iens_valid , iens)) - misfit_member_update( node , obs_key , misfit_ensemble->history_length , iens , (const double **) chi2_work); - } - obs_key = hash_iter_get_next_key( obs_iter ); - } - - bool_vector_free( iens_valid ); - msg_free(msg , true ); - hash_iter_free( obs_iter ); - - __2d_free( chi2_work , misfit_ensemble->history_length + 1); - misfit_ensemble->initialized = true; - } -} - - -void misfit_ensemble_fwrite( const misfit_ensemble_type * misfit_ensemble , FILE * stream ) { - int ens_size = vector_get_size( misfit_ensemble->ensemble); - util_fwrite_int( misfit_ensemble->history_length , stream ); - util_fwrite_int( vector_get_size( misfit_ensemble->ensemble ) , stream); - - /* Writing the nodes - one for each ensemble member */ - { - int iens; - for (iens = 0; iens < ens_size; iens++) - misfit_member_fwrite( vector_iget( misfit_ensemble->ensemble , iens ) , stream ); - } - -} - - - - -/** - Observe that the object is NOT in a valid state when leaving this function, - must finalize in either misfit_ensemble_alloc() or misfit_ensemble_fread_alloc(). -*/ - -static misfit_ensemble_type * misfit_ensemble_alloc_empty() { - misfit_ensemble_type * table = util_malloc( sizeof * table ); - - table->initialized = false; - table->ensemble = vector_alloc_new(); - - return table; -} - - -/** - This funcion is a feeble attempt at allowing the ensemble size to - change runtime. If the new ensemble size is larger than the current - ensemble size ALL the currently internalized misfit information is - dropped on the floor; if the the ensemble is shrinked only the the - last elements of the misfit table are discarded (NOT exactly battle-tested). - -*/ -void misfit_ensemble_set_ens_size( misfit_ensemble_type * misfit_ensemble , int ens_size) { - int iens; - if (ens_size > vector_get_size( misfit_ensemble->ensemble )) { - /* The new ensemble is larger than what we have currently internalized, - we drop everything and add empty misfit_member instances. */ - vector_clear( misfit_ensemble->ensemble ); - for (iens = 0; iens < ens_size; iens++) - vector_append_owned_ref( misfit_ensemble->ensemble , misfit_member_alloc( iens ) , misfit_member_free__); - - } else - /* We shrink the vector by removing the last elements. */ - vector_shrink( misfit_ensemble->ensemble , ens_size); -} - - -void misfit_ensemble_fread( misfit_ensemble_type * misfit_ensemble , FILE * stream ) { - misfit_ensemble_clear( misfit_ensemble ); - { - int ens_size; - - misfit_ensemble->history_length = util_fread_int( stream ); - ens_size = util_fread_int( stream ); - misfit_ensemble_set_ens_size( misfit_ensemble , ens_size ); - { - for (int iens = 0; iens < ens_size; iens++) { - misfit_member_type * node = misfit_member_fread_alloc( stream ); - vector_iset_owned_ref( misfit_ensemble->ensemble , iens , node , misfit_member_free__); - } - } - - } -} - - - -misfit_ensemble_type * misfit_ensemble_alloc( ) { - misfit_ensemble_type * table = misfit_ensemble_alloc_empty( ); - return table; -} - - - -misfit_member_type * misfit_ensemble_iget_member( const misfit_ensemble_type * table , int iens) { - return vector_iget( table->ensemble , iens); -} - - - - -void misfit_ensemble_clear( misfit_ensemble_type * table) { - vector_clear( table->ensemble ); - table->initialized = false; -} - - -void misfit_ensemble_free(misfit_ensemble_type * table ) { - vector_free( table->ensemble ); - free( table ); -} - - -bool misfit_ensemble_initialized( const misfit_ensemble_type * misfit_ensemble ) { - return misfit_ensemble->initialized; -} - - -/*****************************************************************/ - - -int misfit_ensemble_get_ens_size( const misfit_ensemble_type * misfit_ensemble ) { - return vector_get_size( misfit_ensemble->ensemble ); -} diff --git a/ThirdParty/Ert/libenkf/src/misfit_member.c b/ThirdParty/Ert/libenkf/src/misfit_member.c deleted file mode 100644 index 90afdc20c3..0000000000 --- a/ThirdParty/Ert/libenkf/src/misfit_member.c +++ /dev/null @@ -1,122 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'misfit_member.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -#include -#include -#include - -#include - - -#define MISFIT_MEMBER_TYPE_ID 541066 - -struct misfit_member_struct { - UTIL_TYPE_ID_DECLARATION; - int my_iens; - hash_type *obs; /* hash table of misfit_ts_type instances - indexed by observation keys. The structure - of this hash table is duplicated for each ensemble member.*/ -}; - - - -static UTIL_SAFE_CAST_FUNCTION(misfit_member , MISFIT_MEMBER_TYPE_ID); - - -static void misfit_member_free( misfit_member_type * node ) { - hash_free( node->obs ); - free( node ); -} - - -void misfit_member_free__( void * node ) { - misfit_member_free( misfit_member_safe_cast( node )); -} - - -misfit_member_type * misfit_member_alloc(int iens) { - misfit_member_type * node = util_malloc( sizeof * node ); - UTIL_TYPE_ID_INIT( node , MISFIT_MEMBER_TYPE_ID); - node->my_iens = iens; - node->obs = hash_alloc(); - return node; -} - - -static void misfit_member_install_vector( misfit_member_type * node , const char * key , misfit_ts_type * vector ) { - hash_insert_hash_owned_ref( node->obs, key , vector , misfit_ts_free__ ); -} - - -static misfit_ts_type * misfit_member_safe_get_vector( misfit_member_type * node , const char * obs_key , int history_length) { - if (!hash_has_key( node->obs , obs_key )) - misfit_member_install_vector(node , obs_key , misfit_ts_alloc( history_length ) ); - return hash_get( node->obs , obs_key ); -} - - -misfit_ts_type * misfit_member_get_ts( const misfit_member_type * node , const char * obs_key ) { - return hash_get( node->obs , obs_key ); -} - -bool misfit_member_has_ts( const misfit_member_type * node , const char * obs_key ) { - return hash_has_key( node->obs , obs_key ); -} - - -void misfit_member_update( misfit_member_type * node , const char * obs_key , int history_length , int iens , const double ** work_chi2) { - misfit_ts_type * vector = misfit_member_safe_get_vector( node , obs_key , history_length ); - for (int step = 0; step <= history_length; step++) - misfit_ts_iset( vector , step , work_chi2[step][iens]); -} - - -void misfit_member_fwrite( const misfit_member_type * node , FILE * stream) { - util_fwrite_int( node->my_iens , stream); - util_fwrite_int( hash_get_size( node->obs ) , stream); - { - hash_iter_type * obs_iter = hash_iter_alloc( node->obs ); - while ( !hash_iter_is_complete( obs_iter )) { - const char * key = hash_iter_get_next_key( obs_iter ); - misfit_ts_type * misfit_ts = hash_get( node->obs , key ); - util_fwrite_string( key , stream ); - misfit_ts_fwrite( misfit_ts , stream); - } - hash_iter_free( obs_iter ); - } -} - - -misfit_member_type * misfit_member_fread_alloc( FILE * stream ) { - int my_iens = util_fread_int( stream ); - misfit_member_type * node = misfit_member_alloc( my_iens ); - int hash_size = util_fread_int( stream ); - { - int iobs; - for (iobs = 0; iobs < hash_size; iobs++) { - char * key = util_fread_alloc_string( stream ); - misfit_ts_type * misfit_ts = misfit_ts_fread_alloc( stream ); - misfit_member_install_vector( node , key , misfit_ts ); - free( key ); - } - } - return node; -} - diff --git a/ThirdParty/Ert/libenkf/src/misfit_ranking.c b/ThirdParty/Ert/libenkf/src/misfit_ranking.c deleted file mode 100644 index 1b49ff16a7..0000000000 --- a/ThirdParty/Ert/libenkf/src/misfit_ranking.c +++ /dev/null @@ -1,254 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'misfit_ranking.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -/** - This struct contains the misfits & sort keys for one particular - misfit_ranking. I.e. all the RFT measurements. -*/ - - - -#define MISFIT_RANKING_TYPE_ID 671108 - -struct misfit_ranking_struct { - UTIL_TYPE_ID_DECLARATION; - vector_type * ensemble; /* An ensemble of hash instances. Each hash instance is populated like this: hash_insert_double(hash , "WGOR" , 1.09); */ - double_vector_type * total; /* An enemble of total misfit values (for this misfit_ranking). */ - perm_vector_type * sort_permutation; /* This is how the ens members should be permuted to be sorted under this misfit_ranking. */ - int ens_size; -}; - -UTIL_SAFE_CAST_FUNCTION( misfit_ranking , MISFIT_RANKING_TYPE_ID ) -UTIL_IS_INSTANCE_FUNCTION( misfit_ranking , MISFIT_RANKING_TYPE_ID) - -void misfit_ranking_display( const misfit_ranking_type * misfit_ranking , FILE * stream) { - const int ens_size = double_vector_size( misfit_ranking->total ); - const perm_vector_type * permutations = misfit_ranking->sort_permutation; - hash_type * obs_hash = NULL; - { - // The ensemble vector can contain invalid nodes with NULL. - int index = 0; - while ((obs_hash == NULL) && (index < vector_get_size( misfit_ranking->ensemble))) { - obs_hash = vector_iget( misfit_ranking->ensemble , index ); - index++; - } - if (obs_hash == NULL) { - fprintf(stderr,"Sorry: no valid results loaded for this misfit_ranking - returning\n"); - return; - } - } - - { - int i; - double summed_up = 0.0; - stringlist_type * obs_keys = hash_alloc_stringlist( obs_hash ); - int num_obs = stringlist_get_size( obs_keys ); - int num_obs_total = num_obs * ens_size; // SHould not count failed/missing members ... - - fprintf(stream,"\n\n"); - fprintf(stream," # Realization Normalized misfit Total misfit\n"); - fprintf(stream,"-------------------------------------------------------\n"); - for (i = 0; i < ens_size; i++) { - int iens = perm_vector_iget( permutations, i ); - double total_misfit = double_vector_iget( misfit_ranking->total , iens ); - double normalized_misfit = sqrt(total_misfit / num_obs_total); - summed_up = summed_up+total_misfit; - fprintf(stream,"%3d %3d %10.3f %10.3f \n",i,iens,normalized_misfit,total_misfit); - } - - { - double normalized_summed_up = sqrt(summed_up / (num_obs_total * ens_size)); - fprintf(stream," All %10.3f %10.3f \n",normalized_summed_up,summed_up); - } - fprintf(stream,"-------------------------------------------------------\n"); - } - -} - - - -void misfit_ranking_fprintf( const misfit_ranking_type * misfit_ranking , const char * filename) { - FILE * stream = util_mkdir_fopen( filename , "w"); - const int ens_size = misfit_ranking->ens_size; - const perm_vector_type * permutations = misfit_ranking->sort_permutation; - double summed_up = 0.0; - { - // All this whitespace is finely tuned and highly significant .... - const char * key_fmt = " %18s "; - const char * value_fmt = " %10.3f %8.3f"; - const char * start_fmt = " %2d %3d %7.3f %8.3f"; - - hash_type * obs_hash = vector_iget( misfit_ranking->ensemble , 0); - stringlist_type * obs_keys = hash_alloc_stringlist( obs_hash ); - int num_obs = stringlist_get_size( obs_keys ); - int iobs; - int num_obs_total = num_obs * ens_size; - - stringlist_sort( obs_keys , enkf_util_compare_keys__ ); - fprintf(stream , " Overall "); - for (iobs =0; iobs < num_obs; iobs++) - fprintf(stream , key_fmt , stringlist_iget( obs_keys , iobs )); - - fprintf(stream , "\n"); - fprintf(stream , " # Realization Norm Total"); - for (iobs =0; iobs < num_obs; iobs++) - fprintf(stream , " Norm Total"); - - fprintf(stream , "\n"); - for (int i = 0; i < ens_size; i++) { - int iens = perm_vector_iget( permutations , i ); - hash_type * obs_hash = vector_iget( misfit_ranking->ensemble , iens ); - double total_value = double_vector_iget( misfit_ranking->total , iens ); - double normalized_misfit = sqrt(total_value / num_obs_total); - summed_up = summed_up+total_value; - fprintf(stream , start_fmt , i , iens , normalized_misfit , total_value); - for (iobs =0; iobs < num_obs; iobs++){ - double single_value = hash_get_double( obs_hash , stringlist_iget( obs_keys , iobs )); - double single_value_normalized = sqrt(single_value / (num_obs_total)); - fprintf(stream , value_fmt , single_value_normalized , single_value); - } - fprintf(stream , "\n"); - } - double summed_up_normalized = sqrt(summed_up / (num_obs_total * ens_size)); - fprintf(stream , " All %7.3f %8.3f" , summed_up_normalized , summed_up); - for (iobs = 0; iobs < num_obs; iobs++){ - double single_value_summed_up = 0.0; - for (int i = 0; i < ens_size; i++) { - single_value_summed_up = single_value_summed_up + hash_get_double( obs_hash , stringlist_iget( obs_keys , iobs )); - } - double single_value_summed_up_normalized=sqrt(single_value_summed_up / (num_obs_total * ens_size)); - fprintf(stream , value_fmt , single_value_summed_up_normalized , single_value_summed_up); - } - fprintf(stream , "\n"); - } - fclose( stream ); -} - - -static misfit_ranking_type * misfit_ranking_alloc_empty( int ens_size ) { - misfit_ranking_type * misfit_ranking = util_malloc( sizeof * misfit_ranking ); - UTIL_TYPE_ID_INIT( misfit_ranking , MISFIT_RANKING_TYPE_ID ); - misfit_ranking->sort_permutation = NULL; - misfit_ranking->ensemble = vector_alloc_new(); - misfit_ranking->total = double_vector_alloc( 0 , INVALID_RANKING_VALUE ); - misfit_ranking->ens_size = ens_size; - return misfit_ranking; -} - - -/** - Step and step2 are inclusive. The time direction is flattened. -*/ - -misfit_ranking_type * misfit_ranking_alloc(const misfit_ensemble_type * misfit_ensemble , const stringlist_type * sort_keys , const int_vector_type * steps, const char * ranking_key) { - const int ens_size = misfit_ensemble_get_ens_size( misfit_ensemble ); - int iens; - misfit_ranking_type * ranking = misfit_ranking_alloc_empty(ens_size); - - for (iens = 0; iens < ens_size; iens++) { - const misfit_member_type * misfit_member = misfit_ensemble_iget_member( misfit_ensemble , iens ); /* Lookup in the master ensemble. */ - - { - double iens_valid = true; - double total = 0; - hash_type * obs_hash = hash_alloc(); - for (int ikey = 0; ikey < stringlist_get_size( sort_keys ); ikey++) { - const char * obs_key = stringlist_iget( sort_keys , ikey ); - if (misfit_member_has_ts( misfit_member , obs_key )) { - misfit_ts_type * ts = misfit_member_get_ts( misfit_member , obs_key ); - double value = misfit_ts_eval( ts , steps ); /* Sum up the misfit for this key - and these timesteps. */ - hash_insert_double( obs_hash , obs_key , value); - total += value; - } else - iens_valid = true; - } - if (iens_valid) - misfit_ranking_iset( ranking , iens , obs_hash , total ); - else - misfit_ranking_iset_invalid( ranking , iens ); - } - } - ranking->sort_permutation = double_vector_alloc_sort_perm( ranking->total ); - - return ranking; -} - - - - - -void misfit_ranking_free( misfit_ranking_type * misfit_ranking ) { - vector_free( misfit_ranking->ensemble ); - double_vector_free( misfit_ranking->total ); - - if (misfit_ranking->sort_permutation) - perm_vector_free( misfit_ranking->sort_permutation ); - - free( misfit_ranking ); -} - - - -void misfit_ranking_free__( void * arg ) { - misfit_ranking_type * misfit_ranking = misfit_ranking_safe_cast( arg ); - misfit_ranking_free( misfit_ranking ); -} - - - -void misfit_ranking_iset( misfit_ranking_type * misfit_ranking , int iens , hash_type * obs_hash , double total_misfit) { - if (iens > vector_get_size(misfit_ranking->ensemble)) - vector_grow_NULL( misfit_ranking->ensemble , iens ); - - if (obs_hash != NULL) - vector_iset_owned_ref( misfit_ranking->ensemble , iens , obs_hash , hash_free__ ); - else - vector_iset_ref( misfit_ranking->ensemble , iens , NULL ); - - double_vector_iset( misfit_ranking->total , iens , total_misfit ); -} - - -void misfit_ranking_iset_invalid( misfit_ranking_type * misfit_ranking , int iens ) { - misfit_ranking_iset( misfit_ranking , iens , NULL , INVALID_RANKING_VALUE ); -} - - -const perm_vector_type * misfit_ranking_get_permutation( const misfit_ranking_type * misfit_ranking ) { - return misfit_ranking->sort_permutation; -} diff --git a/ThirdParty/Ert/libenkf/src/misfit_ts.c b/ThirdParty/Ert/libenkf/src/misfit_ts.c deleted file mode 100644 index e0b4655387..0000000000 --- a/ThirdParty/Ert/libenkf/src/misfit_ts.c +++ /dev/null @@ -1,100 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'misfit_ts.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include -#include -#include - -#include - - -#define MISFIT_TS_TYPE_ID 641066 - -struct misfit_ts_struct { - UTIL_TYPE_ID_DECLARATION; - double_vector_type * data; /* A double vector of length 'history_length' with actual misfit values. */ -}; - -static UTIL_SAFE_CAST_FUNCTION(misfit_ts , MISFIT_TS_TYPE_ID); - -/******************************************************************/ -/* - Implementation of the misfit_ts type. Contains the full - timeseries of misfit for one member/one observation key. -*/ - -misfit_ts_type * misfit_ts_alloc(int history_length) { - misfit_ts_type * misfit_ts = util_malloc( sizeof * misfit_ts ); - UTIL_TYPE_ID_INIT(misfit_ts , MISFIT_TS_TYPE_ID); - - if (history_length > 0) - misfit_ts->data = double_vector_alloc( history_length + 1 , 0 ); - else - misfit_ts->data = NULL; /* Used by the xxx_fread_alloc() function below. */ - - return misfit_ts; -} - - -misfit_ts_type * misfit_ts_fread_alloc( FILE * stream ) { - misfit_ts_type * misfit_ts = misfit_ts_alloc( 0 ); - if (misfit_ts->data == NULL) - misfit_ts->data = double_vector_fread_alloc( stream ); - return misfit_ts; -} - - -void misfit_ts_fwrite( const misfit_ts_type * misfit_ts , FILE * stream ) { - double_vector_fwrite( misfit_ts->data , stream ); -} - - - - -static void misfit_ts_free( misfit_ts_type * misfit_ts) { - double_vector_free( misfit_ts->data ); - free( misfit_ts ); -} - - -void misfit_ts_free__( void * vector ) { - misfit_ts_free( misfit_ts_safe_cast( vector )); -} - - - - -void misfit_ts_iset( misfit_ts_type * vector , int time_index , double value ) { - double_vector_iset( vector->data , time_index , value ); -} - -/** Step2 is inclusive - what a fucking mess. */ -double misfit_ts_eval( const misfit_ts_type * vector , const int_vector_type * steps) { - double misfit_sum = 0; - int step; - - for (int i = 0; i < int_vector_size(steps); ++i) { - step = int_vector_iget(steps, i); - misfit_sum += double_vector_iget(vector->data , step ); - } - - return misfit_sum; -} - diff --git a/ThirdParty/Ert/libenkf/src/model_config.c b/ThirdParty/Ert/libenkf/src/model_config.c deleted file mode 100644 index 9891449ef4..0000000000 --- a/ThirdParty/Ert/libenkf/src/model_config.c +++ /dev/null @@ -1,636 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'model_config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include - -/** - This struct contains configuration which is specific to this - particular model/run. Such of the information is actually accessed - directly through the enkf_state object; but this struct is the - owner of the information, and responsible for allocating/freeing - it. - - Observe that the distinction of what goes in model_config, and what - goes in ecl_config is not entirely clear; ECLIPSE is unfortunately - not (yet ??) exactly 'any' reservoir simulator in this context. - -*/ - - -/* - The runpath format is governed by a hash table where new runpaths - are added with model_config_add_runpath() and then current runpath - is selected with model_config_select_runpath(). However this - implementation is quite different from the way manipulation of the - runpath is exposed to the user: The runpath is controlled through - the RUNPATH config key (key DEFAULT_RUNPATH_KEY in the hash table) - This semantically predefined runpath is the only option visible to the user. - */ - -#define MODEL_CONFIG_TYPE_ID 661053 -struct model_config_struct { - UTIL_TYPE_ID_DECLARATION; - stringlist_type * case_names; /* A list of "iens -> name" mappings - can be NULL. */ - char * case_table_file; - forward_model_type * forward_model; /* The forward_model - as loaded from the config file. Each enkf_state object internalizes its private copy of the forward_model. */ - time_map_type * external_time_map; - history_type * history; /* The history object. */ - path_fmt_type * current_runpath; /* path_fmt instance for runpath - runtime the call gets arguments: (iens, report_step1 , report_step2) - i.e. at least one %d must be present.*/ - char * current_path_key; - hash_type * runpath_map; - char * jobname_fmt; /* Format string with one '%d' for the jobname - can be NULL in which case the eclbase name will be used. */ - char * enspath; - char * rftpath; - fs_driver_impl dbase_type; - bool has_prediction; - int max_internal_submit; /* How many times to retry if the load fails. */ - history_source_type history_source; - const ecl_sum_type * refcase; /* A pointer to the refcase - can be NULL. Observe that this ONLY a pointer - to the ecl_sum instance owned and held by the ecl_config object. */ - char * gen_kw_export_file_name; - - /** The results are always loaded. */ - bool_vector_type * internalize_state; /* Should the (full) state be internalized (at this report_step). */ - bool_vector_type * __load_eclipse_restart; /* Internal variable: is it necessary to load the state? */ -}; - - - -const char * model_config_get_jobname_fmt( const model_config_type * model_config ) { - return model_config->jobname_fmt; -} - -void model_config_set_jobname_fmt( model_config_type * model_config , const char * jobname_fmt) { - model_config->jobname_fmt = util_realloc_string_copy( model_config->jobname_fmt , jobname_fmt ); -} - - -path_fmt_type * model_config_get_runpath_fmt(const model_config_type * model_config) { - return model_config->current_runpath; -} - -const char * model_config_get_runpath_as_char( const model_config_type * model_config ) { - return path_fmt_get_fmt( model_config->current_runpath ); -} - -bool model_config_runpath_requires_iter( const model_config_type * model_config ) { - if (util_int_format_count( model_config_get_runpath_as_char( model_config)) > 1 ) - return true; - else - return false; -} - - -const char * model_config_get_case_table_file( const model_config_type * model_config ) { - return model_config->case_table_file; -} - -void model_config_set_case_table( model_config_type * model_config , int ens_size , const char * case_table_file ) { - if (model_config->case_table_file != NULL) { /* Clear the current selection */ - free( model_config->case_table_file ); - stringlist_free( model_config->case_names ); - - model_config->case_table_file = NULL; - model_config->case_names = NULL; - } - - if (case_table_file != NULL) { - bool atEOF = false; - char casename[128]; - int case_size = 0; - FILE * stream = util_fopen( case_table_file , "r"); - model_config->case_names = stringlist_alloc_new(); - while (!atEOF) { - if (fscanf( stream , "%s" , casename) == 1) { - stringlist_append_copy( model_config->case_names , casename ); - case_size++; - } else - atEOF = true; - } - fclose( stream ); - - if (case_size < ens_size) { - for (int i = case_size; i < ens_size; i++) - stringlist_append_owned_ref( model_config->case_names , util_alloc_sprintf("case_%04d" , i)); - fprintf(stderr, "** Warning: mismatch between NUM_REALIZATIONS:%d and size of CASE_TABLE:%d - using \'case_nnnn\' for the last cases %d.\n", ens_size , case_size , ens_size - case_size); - } else if (case_size > ens_size) - fprintf(stderr, "** Warning: mismatch between NUM_REALIZATIONS:%d and CASE_TABLE:%d - only the %d realizations will be used.\n", ens_size , case_size , ens_size); - - } -} - - -void model_config_add_runpath( model_config_type * model_config , const char * path_key , const char * fmt) { - path_fmt_type * path_fmt = path_fmt_alloc_directory_fmt( fmt ); - hash_insert_hash_owned_ref( model_config->runpath_map , path_key , path_fmt , path_fmt_free__ ); -} - - -/* - If the path_key does not exists it will return false and stay - silent. -*/ - -bool model_config_select_runpath( model_config_type * model_config , const char * path_key) { - if (hash_has_key( model_config->runpath_map , path_key )) { - model_config->current_runpath = hash_get( model_config->runpath_map , path_key ); - model_config->current_path_key = util_realloc_string_copy( model_config->current_path_key , path_key); - return true; - } else { - if (model_config->current_runpath != NULL) // OK - we already have a valid selection - stick to that and return False. - return false; - else { - util_abort("%s: path_key:%s does not exist - and currently no valid runpath selected \n",__func__ , path_key); - return false; - } - } -} - - -void model_config_set_runpath(model_config_type * model_config , const char * fmt) { - if (model_config->current_path_key) { - model_config_add_runpath(model_config , model_config->current_path_key , fmt); - model_config_select_runpath( model_config , model_config->current_path_key ); - } else - util_abort("%s: current path has not been set \n",__func__); -} - - - -void model_config_set_gen_kw_export_file( model_config_type * model_config, const char * file_name) { - model_config->gen_kw_export_file_name = util_realloc_string_copy( model_config->gen_kw_export_file_name , file_name ); -} - -const char * model_config_get_gen_kw_export_file( const model_config_type * model_config) { - return model_config->gen_kw_export_file_name; -} - - - - void model_config_set_enspath( model_config_type * model_config , const char * enspath) { - model_config->enspath = util_realloc_string_copy( model_config->enspath , enspath ); - } - - void model_config_set_rftpath( model_config_type * model_config , const char * rftpath) { - model_config->rftpath = util_realloc_string_copy( model_config->rftpath , rftpath ); - } - - void model_config_set_dbase_type( model_config_type * model_config , const char * dbase_type_string) { - model_config->dbase_type = fs_types_lookup_string_name( dbase_type_string ); - if (model_config->dbase_type == INVALID_DRIVER_ID) - util_abort("%s: did not recognize driver_type:%s \n",__func__ , dbase_type_string); - } - - - const char * model_config_get_enspath( const model_config_type * model_config) { - return model_config->enspath; - } - -const char * model_config_get_rftpath( const model_config_type * model_config) { - return model_config->rftpath; -} - -fs_driver_impl model_config_get_dbase_type(const model_config_type * model_config ) { - return model_config->dbase_type; -} - -const ecl_sum_type * model_config_get_refcase( const model_config_type * model_config ) { - return model_config->refcase; -} - -void * model_config_get_dbase_args( const model_config_type * model_config ) { - return NULL; -} - - -void model_config_set_refcase( model_config_type * model_config , const ecl_sum_type * refcase ) { - model_config->refcase = refcase; -} - - -history_source_type model_config_get_history_source( const model_config_type * model_config ) { - return model_config->history_source; -} - - - -void model_config_select_schedule_history( model_config_type * model_config , const sched_file_type * sched_file) { - if (model_config->history != NULL) - history_free( model_config->history ); - - if (sched_file != NULL) { - model_config->history = history_alloc_from_sched_file( SUMMARY_KEY_JOIN_STRING , sched_file); - model_config->history_source = SCHEDULE; - } else - util_abort("%s: internal error - trying to select HISTORY_SOURCE:SCHEDULE - but no Schedule file has been loaded.\n",__func__); -} - - -void model_config_select_refcase_history( model_config_type * model_config , const ecl_sum_type * refcase , bool use_history) { - if (model_config->history != NULL) - history_free( model_config->history ); - - if (refcase != NULL) { - model_config->history = history_alloc_from_refcase( refcase , use_history ); - model_config->history_source = SCHEDULE; - } else - util_abort("%s: internal error - trying to load history from REFCASE - but no REFCASE has been loaded.\n",__func__); -} - - -int model_config_get_max_internal_submit( const model_config_type * config ) { - return config->max_internal_submit; -} - -void model_config_set_max_internal_submit( model_config_type * model_config , int max_resample ) { - model_config->max_internal_submit = max_resample; -} - - -UTIL_IS_INSTANCE_FUNCTION( model_config , MODEL_CONFIG_TYPE_ID) - -model_config_type * model_config_alloc() { - model_config_type * model_config = util_malloc(sizeof * model_config ); - /** - There are essentially three levels of initialisation: - - 1. Initialize to NULL / invalid. - 2. Initialize with default values. - 3. Initialize with user supplied values. - - */ - UTIL_TYPE_ID_INIT(model_config , MODEL_CONFIG_TYPE_ID); - model_config->case_names = NULL; - model_config->enspath = NULL; - model_config->rftpath = NULL; - model_config->dbase_type = INVALID_DRIVER_ID; - model_config->current_runpath = NULL; - model_config->current_path_key = NULL; - model_config->case_table_file = NULL; - model_config->history = NULL; - model_config->jobname_fmt = NULL; - model_config->forward_model = NULL; - model_config->external_time_map = NULL; - model_config->internalize_state = bool_vector_alloc( 0 , false ); - model_config->__load_eclipse_restart = bool_vector_alloc( 0 , false ); - model_config->history_source = HISTORY_SOURCE_INVALID; - model_config->runpath_map = hash_alloc(); - model_config->gen_kw_export_file_name = NULL; - model_config->refcase = NULL; - - model_config_set_enspath( model_config , DEFAULT_ENSPATH ); - model_config_set_rftpath( model_config , DEFAULT_RFTPATH ); - model_config_set_dbase_type( model_config , DEFAULT_DBASE_TYPE ); - model_config_set_max_internal_submit( model_config , DEFAULT_MAX_INTERNAL_SUBMIT); - model_config_add_runpath( model_config , DEFAULT_RUNPATH_KEY , DEFAULT_RUNPATH); - model_config_select_runpath( model_config , DEFAULT_RUNPATH_KEY ); - model_config_set_gen_kw_export_file(model_config, DEFAULT_GEN_KW_EXPORT_FILE); - - return model_config; -} - - -bool model_config_select_history( model_config_type * model_config , history_source_type source_type, const sched_file_type * sched_file , const ecl_sum_type * refcase) { - bool selectOK = false; - - if (source_type == SCHEDULE && sched_file != NULL) { - model_config_select_schedule_history( model_config , sched_file ); - selectOK = true; - } - - if (((source_type == REFCASE_HISTORY) || (source_type == REFCASE_SIMULATED)) && refcase != NULL) { - if (source_type == REFCASE_HISTORY) - model_config_select_refcase_history( model_config , refcase , true); - else - model_config_select_refcase_history( model_config , refcase , false); - selectOK = true; - } - - return selectOK; -} - - -static bool model_config_select_any_history( model_config_type * model_config , const sched_file_type * sched_file , const ecl_sum_type * refcase) { - bool selectOK = false; - - if (sched_file != NULL) { - model_config_select_schedule_history( model_config , sched_file ); - selectOK = true; - } else if ( refcase != NULL ) { - model_config_select_refcase_history( model_config , refcase , true); - selectOK = true; - } - - return selectOK; -} - - - - -void model_config_init(model_config_type * model_config , - const config_content_type * config , - int ens_size , - const ext_joblist_type * joblist , - int last_history_restart , - const sched_file_type * sched_file , - const ecl_sum_type * refcase) { - - model_config->forward_model = forward_model_alloc( joblist ); - model_config_set_refcase( model_config , refcase ); - - - if (config_content_has_item( config , FORWARD_MODEL_KEY )) { - char * config_string = config_content_alloc_joined_string( config , FORWARD_MODEL_KEY , " "); - forward_model_parse_init( model_config->forward_model , config_string ); - free(config_string); - } - - if (config_content_has_item( config, RUNPATH_KEY)) { - model_config_add_runpath( model_config , DEFAULT_RUNPATH_KEY , config_content_get_value(config , RUNPATH_KEY) ); - model_config_select_runpath( model_config , DEFAULT_RUNPATH_KEY ); - } - - { - history_source_type source_type = DEFAULT_HISTORY_SOURCE; - - if (config_content_has_item( config , HISTORY_SOURCE_KEY)) { - const char * history_source = config_content_iget(config , HISTORY_SOURCE_KEY, 0,0); - source_type = history_get_source_type( history_source ); - } - - if (!model_config_select_history( model_config , source_type , sched_file , refcase )) - if (!model_config_select_history( model_config , DEFAULT_HISTORY_SOURCE , sched_file , refcase )) - if (!model_config_select_any_history( model_config , sched_file , refcase)) - fprintf(stderr,"** Warning:: Do not have enough information to select a history source \n"); - - } - - if (model_config->history != NULL) { - int num_restart = model_config_get_last_history_restart(model_config); - bool_vector_iset( model_config->internalize_state , num_restart - 1 , false ); - bool_vector_iset( model_config->__load_eclipse_restart , num_restart - 1 , false ); - } - - if (config_content_has_item( config , TIME_MAP_KEY)) { - const char * filename = config_content_get_value_as_path( config , TIME_MAP_KEY); - time_map_type * time_map = time_map_alloc(); - if (time_map_fscanf( time_map , filename)) - model_config->external_time_map = time_map; - else { - time_map_free( time_map ); - fprintf(stderr,"** ERROR: Loading external time map from:%s failed \n", filename); - } - } - - - - /* - The full treatment of the SCHEDULE_PREDICTION_FILE keyword is in - the ensemble_config file, because the functionality is implemented - as (quite) plain GEN_KW instance. Here we just check if it is - present or not. - */ - - if (config_content_has_item(config , SCHEDULE_PREDICTION_FILE_KEY)) - model_config->has_prediction = true; - else - model_config->has_prediction = false; - - - if (config_content_has_item(config , CASE_TABLE_KEY)) - model_config_set_case_table( model_config , ens_size , config_content_iget( config , CASE_TABLE_KEY , 0,0)); - - if (config_content_has_item( config , ENSPATH_KEY)) - model_config_set_enspath( model_config , config_content_get_value(config , ENSPATH_KEY)); - - if (config_content_has_item( config , JOBNAME_KEY)) - model_config_set_jobname_fmt( model_config , config_content_get_value(config , JOBNAME_KEY)); - - if (config_content_has_item( config , RFTPATH_KEY)) - model_config_set_rftpath( model_config , config_content_get_value(config , RFTPATH_KEY)); - - if (config_content_has_item( config , DBASE_TYPE_KEY)) - model_config_set_dbase_type( model_config , config_content_get_value(config , DBASE_TYPE_KEY)); - - if (config_content_has_item( config , MAX_RESAMPLE_KEY)) - model_config_set_max_internal_submit( model_config , config_content_get_value_as_int( config , MAX_RESAMPLE_KEY )); - - - { - const char * export_file_name; - if (config_content_has_item( config , GEN_KW_EXPORT_FILE_KEY)) - export_file_name = config_content_get_value(config, GEN_KW_EXPORT_FILE_KEY); - else - export_file_name = DEFAULT_GEN_KW_EXPORT_FILE; - - model_config_set_gen_kw_export_file(model_config, export_file_name); - } -} - - -const char * model_config_iget_casename( const model_config_type * model_config , int index) { - if (model_config->case_names == NULL) - return NULL; - else - return stringlist_iget( model_config->case_names , index ); -} - - - -void model_config_free(model_config_type * model_config) { - free( model_config->enspath ); - free( model_config->rftpath ); - util_safe_free( model_config->jobname_fmt ); - util_safe_free( model_config->case_table_file ); - util_safe_free( model_config->current_path_key); - util_safe_free( model_config->gen_kw_export_file_name); - - if (model_config->history) - history_free(model_config->history); - - if (model_config->forward_model) - forward_model_free(model_config->forward_model); - - if (model_config->external_time_map) - time_map_free( model_config->external_time_map ); - - - bool_vector_free(model_config->internalize_state); - bool_vector_free(model_config->__load_eclipse_restart); - hash_free(model_config->runpath_map); - - if (model_config->case_names) - stringlist_free( model_config->case_names ); - free(model_config); -} - - - -bool model_config_has_history(const model_config_type * config) { - if (config->history != NULL) - return true; - else - return false; -} - - -history_type * model_config_get_history(const model_config_type * config) { - return config->history; -} - -/** - Will be NULL unless the user has explicitly loaded an external time - map with the TIME_MAP config option. -*/ - -time_map_type * model_config_get_external_time_map( const model_config_type * config) { - return config->external_time_map; -} - -int model_config_get_last_history_restart(const model_config_type * config) { - if (config->history) - return history_get_last_restart( config->history ); - else { - if (config->external_time_map) - return time_map_get_last_step( config->external_time_map); - else { - fprintf(stderr,"** Warning: Trying to get the last restart number - no history/time_map object has been registered.\n"); - return 0; - } - } -} - - -bool model_config_has_prediction(const model_config_type * config) { - return config->has_prediction; -} - - -forward_model_type * model_config_get_forward_model( const model_config_type * config) { - return config->forward_model; -} - - -/*****************************************************************/ - -/* Setting everything back to the default value: false. */ -void model_config_init_internalization( model_config_type * config ) { - bool_vector_reset(config->internalize_state); - bool_vector_reset(config->__load_eclipse_restart); -} - - -/** - This function sets the internalize_state flag to true for - report_step. Because of the coupling to the __load_eclipse_restart variable - this function can __ONLY__ be used to set internalize to true. -*/ - -void model_config_set_internalize_state( model_config_type * config , int report_step) { - bool_vector_iset(config->internalize_state , report_step , true); - bool_vector_iset(config->__load_eclipse_restart , report_step , true); -} - - -void model_config_set_load_state( model_config_type * config , int report_step) { - bool_vector_iset(config->__load_eclipse_restart , report_step , true); -} - - - -/* Query functions. */ - -bool model_config_internalize_state( const model_config_type * config , int report_step) { - return bool_vector_iget(config->internalize_state , report_step); -} - -/*****************************************************************/ - -bool model_config_load_state( const model_config_type * config , int report_step) { - return bool_vector_iget(config->__load_eclipse_restart , report_step); -} - - - - - -void model_config_fprintf_config( const model_config_type * model_config , int ens_size , FILE * stream ) { - fprintf( stream , CONFIG_COMMENTLINE_FORMAT ); - fprintf( stream , CONFIG_COMMENT_FORMAT , "Here comes configuration information related to this model."); - - if (model_config->case_table_file != NULL) { - fprintf( stream , CONFIG_KEY_FORMAT , CASE_TABLE_KEY ); - fprintf( stream , CONFIG_ENDVALUE_FORMAT , model_config->case_table_file ); - } - fprintf( stream , CONFIG_KEY_FORMAT , FORWARD_MODEL_KEY); - forward_model_fprintf( model_config->forward_model , stream ); - - fprintf( stream , CONFIG_KEY_FORMAT , RUNPATH_KEY ); - fprintf( stream , CONFIG_ENDVALUE_FORMAT , path_fmt_get_fmt( model_config->current_runpath )); - - fprintf( stream , CONFIG_KEY_FORMAT , ENSPATH_KEY ); - fprintf( stream , CONFIG_ENDVALUE_FORMAT , model_config->enspath ); - - fprintf( stream , CONFIG_KEY_FORMAT , RFTPATH_KEY ); - fprintf( stream , CONFIG_ENDVALUE_FORMAT , model_config->rftpath ); - - fprintf( stream , CONFIG_KEY_FORMAT , MAX_RESAMPLE_KEY ); - { - char max_retry_string[16]; - sprintf( max_retry_string , "%d" ,model_config->max_internal_submit); - fprintf( stream , CONFIG_ENDVALUE_FORMAT , max_retry_string); - } - - fprintf(stream , CONFIG_KEY_FORMAT , HISTORY_SOURCE_KEY); - fprintf(stream , CONFIG_ENDVALUE_FORMAT , history_get_source_string( model_config->history_source )); - - fprintf(stream , CONFIG_KEY_FORMAT , NUM_REALIZATIONS_KEY); - fprintf(stream , CONFIG_INT_FORMAT , ens_size); - fprintf(stream , "\n\n"); - -} diff --git a/ThirdParty/Ert/libenkf/src/obs_data.c b/ThirdParty/Ert/libenkf/src/obs_data.c deleted file mode 100644 index 0e2f0bd758..0000000000 --- a/ThirdParty/Ert/libenkf/src/obs_data.c +++ /dev/null @@ -1,762 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'obs_data.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -/** -See the file README.obs for ducumentation of the varios datatypes -involved with observations/measurement/+++. - - -The file contains two different variables holding the number of -observations, nrobs_total and nrobs_active. The first holds the total -number of observations at this timestep, and the second holds the -number of active measurements at this timestep; the inactive -measurements have been deactivated the obs_data_deactivate_outliers() -function. - -The flow is as follows: - - 1. All the observations have been collected in an obs_data instance, - and all the corresponding measurements of the state have been - collected in a meas_data instance - we are ready for analysis. - - 2. The functions meas_data_alloc_stats() is called to calculate - the ensemble mean and std of all the measurements. - - 3. The function obs_data_deactivate_outliers() is called to compare - the ensemble mean and std with the observations, in the case of - outliers the number obs_active flag of the obs_data instance is - set to false. - - 4. The remaining functions (and matrices) now refer to the number of - active observations, however the "raw" observations found in the - obs_data instance are in a vector with nrobs_total observations; - i.e. we must handle two indices and two total lengths. A bit - messy. - - -Variables of size nrobs_total: ------------------------------- - o obs->value / obs->std / obs->obs_active - o meanS , innov, stdS - - -variables of size nrobs_active: -------------------------------- -Matrices: S, D, E and various internal variables. -*/ - - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - -#define OBS_BLOCK_TYPE_ID 995833 - -struct obs_block_struct { - UTIL_TYPE_ID_DECLARATION; - char * obs_key; - int size; - double * value; - double * std; - - active_type * active_mode; - int active_size; - matrix_type * error_covar; - bool error_covar_owner; /* If true the error_covar matrix is free'd when construction of the R matrix is complete. */ - double global_std_scaling; -}; - - - -struct obs_data_struct { - vector_type * data; /* vector with obs_block instances. */ - double global_std_scaling; -}; - - - -static UTIL_SAFE_CAST_FUNCTION(obs_block , OBS_BLOCK_TYPE_ID ) - -obs_block_type * obs_block_alloc( const char * obs_key , int obs_size , matrix_type * error_covar , bool error_covar_owner, double global_std_scaling) { - obs_block_type * obs_block = util_malloc( sizeof * obs_block ); - - UTIL_TYPE_ID_INIT( obs_block , OBS_BLOCK_TYPE_ID ); - obs_block->size = obs_size; - obs_block->obs_key = util_alloc_string_copy( obs_key ); - obs_block->value = util_calloc( obs_size , sizeof * obs_block->value ); - obs_block->std = util_calloc( obs_size , sizeof * obs_block->std ); - obs_block->active_mode = util_calloc( obs_size , sizeof * obs_block->active_mode ); - obs_block->error_covar = error_covar; - obs_block->error_covar_owner = error_covar_owner; - obs_block->global_std_scaling = global_std_scaling; - { - for (int iobs = 0; iobs < obs_size; iobs++) - obs_block->active_mode[iobs] = LOCAL_INACTIVE; - } - obs_block->active_size = 0; - return obs_block; -} - - - -void obs_block_free( obs_block_type * obs_block ) { - free( obs_block->obs_key ); - free( obs_block->value ); - free( obs_block->std ); - free( obs_block->active_mode ); - free( obs_block ); -} - - -static void obs_block_free__( void * arg ) { - obs_block_type * obs_block = obs_block_safe_cast( arg ); - obs_block_free( obs_block ); -} - - -static void obs_block_fprintf( const obs_block_type * obs_block , FILE * stream ) { - for (int iobs=0; iobs < obs_block->size; iobs++) - fprintf(stream , "[ %12.5f +/- %12.5f ] \n" , obs_block->value[iobs] , obs_block->std[iobs]); -} - - -void obs_block_deactivate( obs_block_type * obs_block , int iobs , bool verbose , const char * msg) { - if (obs_block->active_mode[ iobs ] == ACTIVE) { - if (verbose) - printf("Deactivating: %s(%d) : %s \n",obs_block->obs_key , iobs , msg); - obs_block->active_mode[ iobs ] = DEACTIVATED; - obs_block->active_size--; - } -} - - -const char * obs_block_get_key( const obs_block_type * obs_block) { return obs_block->obs_key; } - -void obs_block_iset( obs_block_type * obs_block , int iobs , double value , double std) { - obs_block->value[ iobs ] = value; - obs_block->std[ iobs ] = std; - if (obs_block->active_mode[ iobs ] != ACTIVE) { - obs_block->active_mode[iobs] = ACTIVE; - obs_block->active_size++; - } -} - -void obs_block_iset_missing( obs_block_type * obs_block , int iobs ) { - if (obs_block->active_mode[ iobs ] == ACTIVE) - obs_block->active_size--; - obs_block->active_mode[iobs] = MISSING; -} - - -double obs_block_iget_std( const obs_block_type * obs_block , int iobs) { - return obs_block->std[ iobs ] * obs_block->global_std_scaling; -} - - -double obs_block_iget_value( const obs_block_type * obs_block , int iobs) { - return obs_block->value[ iobs ]; -} - - -active_type obs_block_iget_active_mode( const obs_block_type * obs_block , int iobs) { - return obs_block->active_mode[ iobs ]; -} - - - -int obs_block_get_size( const obs_block_type * obs_block ) { - return obs_block->size; -} - - -int obs_block_get_active_size( const obs_block_type * obs_block ) { - return obs_block->active_size; -} - - - - -/*Function that sets each element of the scaling factor equal to 1 divided by the prior standard deviation (from the - obs_data input file. -*/ -static void obs_block_init_scaling( const obs_block_type * obs_block , double * scale_factor , int * __obs_offset) { - int obs_offset = *__obs_offset; - int iobs; - for (iobs =0; iobs < obs_block->size; iobs++) { - if (obs_block->active_mode[iobs] == ACTIVE) { - scale_factor[ obs_offset ] = 1.0 / obs_block_iget_std(obs_block, iobs); - obs_offset++; - } - } - *__obs_offset = obs_offset; -} - - -/* -static void obs_block_init_innov( const obs_block_type * obs_block , const meas_block_type * meas_block , matrix_type * innov , int * __obs_offset) { - int obs_offset = *__obs_offset; - int iobs; - for (iobs =0; iobs < obs_block->size; iobs++) { - if (obs_block->active_mode[iobs] == ACTIVE) { - matrix_iset( innov , obs_offset , 0 , obs_block->value[ iobs ] - meas_block_iget_ens_mean( meas_block , iobs )); - obs_offset++; - } - } - *__obs_offset = obs_offset; -} -*/ - -static void obs_block_initdObs( const obs_block_type * obs_block , matrix_type * dObs , int * __obs_offset) { - int obs_offset = *__obs_offset; - int iobs; - for (iobs =0; iobs < obs_block->size; iobs++) { - if (obs_block->active_mode[iobs] == ACTIVE) { - matrix_iset( dObs , obs_offset , 0 , obs_block->value[ iobs ]); - matrix_iset( dObs , obs_offset , 1 , obs_block->std[ iobs ]); - obs_offset++; - } - } - *__obs_offset = obs_offset; -} - - - - - - -static void obs_block_initR( const obs_block_type * obs_block , matrix_type * R, int * __obs_offset) { - int obs_offset = *__obs_offset; - if (obs_block->error_covar == NULL) { - int iobs; - int iactive = 0; - for (iobs =0; iobs < obs_block->size; iobs++) { - if (obs_block->active_mode[iobs] == ACTIVE) { - double var = obs_block_iget_std(obs_block, iobs) * obs_block_iget_std(obs_block, iobs); - matrix_iset_safe(R , obs_offset + iactive, obs_offset + iactive, var); - iactive++; - } - } - } else { - int row_active = 0; /* We have a covar matrix */ - for (int row = 0; row < obs_block->size; row++) { - if (obs_block->active_mode[row] == ACTIVE) { - int col_active = 0; - for (int col = 0; col < obs_block->size; col++) { - if (obs_block->active_mode[col] == ACTIVE) { - matrix_iset_safe(R , obs_offset + row_active , obs_offset + col_active , matrix_iget( obs_block->error_covar , row , col )); - col_active++; - } - } - row_active++; - } - } - } - - *__obs_offset = obs_offset + obs_block->active_size; - if ((obs_block->error_covar_owner) && (obs_block->error_covar != NULL)) - matrix_free( obs_block->error_covar ); -} - - - -static void obs_block_initE( const obs_block_type * obs_block , matrix_type * E, const double * pert_var , int * __obs_offset) { - int ens_size = matrix_get_columns( E ); - int obs_offset = *__obs_offset; - int iobs; - for (iobs =0; iobs < obs_block->size; iobs++) { - if (obs_block->active_mode[iobs] == ACTIVE) { - double factor = obs_block_iget_std(obs_block, iobs) * sqrt( ens_size / pert_var[ obs_offset ]); - for (int iens = 0; iens < ens_size; iens++) - matrix_imul(E , obs_offset , iens , factor ); - - obs_offset++; - } - } - - *__obs_offset = obs_offset; -} - - -static void obs_block_initE_non_centred( const obs_block_type * obs_block , matrix_type * E, int * __obs_offset) { - int ens_size = matrix_get_columns( E ); - int obs_offset = *__obs_offset; - int iobs; - for (iobs =0; iobs < obs_block->size; iobs++) { - if (obs_block->active_mode[iobs] == ACTIVE) { - double factor = obs_block_iget_std(obs_block, iobs); - for (int iens = 0; iens < ens_size; iens++) - matrix_imul(E , obs_offset , iens , factor ); - - obs_offset++; - } - } - - *__obs_offset = obs_offset; -} - - - -static void obs_block_initD( const obs_block_type * obs_block , matrix_type * D, int * __obs_offset) { - int ens_size = matrix_get_columns( D ); - int obs_offset = *__obs_offset; - int iobs; - for (iobs =0; iobs < obs_block->size; iobs++) { - if (obs_block->active_mode[iobs] == ACTIVE) { - for (int iens = 0; iens < ens_size; iens++) - matrix_iadd(D , obs_offset , iens , obs_block->value[ iobs ]); - - obs_offset++; - } - } - - *__obs_offset = obs_offset; -} - - -/*****************************************************************/ - - -obs_data_type * obs_data_alloc(double global_std_scaling) { - obs_data_type * obs_data = util_malloc(sizeof * obs_data ); - obs_data->data = vector_alloc_new(); - obs_data->global_std_scaling = global_std_scaling; - obs_data_reset(obs_data); - return obs_data; -} - - - -void obs_data_reset(obs_data_type * obs_data) { - vector_clear( obs_data->data ); -} - - -obs_block_type * obs_data_add_block( obs_data_type * obs_data , const char * obs_key , int obs_size , matrix_type * error_covar, bool error_covar_owner) { - obs_block_type * new_block = obs_block_alloc( obs_key , obs_size , error_covar , error_covar_owner, obs_data->global_std_scaling); - vector_append_owned_ref( obs_data->data , new_block , obs_block_free__ ); - return new_block; -} - - -obs_block_type * obs_data_iget_block( obs_data_type * obs_data , int index ) { - return vector_iget( obs_data->data , index); -} - - -const obs_block_type * obs_data_iget_block_const( const obs_data_type * obs_data , int index ) { - return vector_iget_const( obs_data->data , index ); -} - - -void obs_data_free(obs_data_type * obs_data) { - vector_free( obs_data->data ); - free(obs_data); -} - - - -matrix_type * obs_data_allocE(const obs_data_type * obs_data , rng_type * rng , int active_ens_size ) { - double *pert_mean , *pert_var; - matrix_type * E; - int iens, iobs_active; - int active_obs_size = obs_data_get_active_size( obs_data ); - - E = matrix_alloc( active_obs_size , active_ens_size); - - pert_mean = util_calloc(active_obs_size , sizeof * pert_mean ); - pert_var = util_calloc(active_obs_size , sizeof * pert_var ); - { - double * tmp = util_calloc( active_obs_size * active_ens_size , sizeof * tmp ); - int i,j; - int k = 0; - - enkf_util_rand_stdnormal_vector(active_obs_size * active_ens_size , tmp , rng); - for (j=0; j < active_ens_size; j++) { - for (i=0; i < active_obs_size; i++) { - matrix_iset( E , i , j , tmp[k]); - k++; - } - } - free(tmp); - } - - for (iobs_active = 0; iobs_active < active_obs_size; iobs_active++) { - pert_mean[iobs_active] = 0; - pert_var[iobs_active] = 0; - } - - for (iens = 0; iens < active_ens_size; iens++) - for (iobs_active = 0; iobs_active < active_obs_size; iobs_active++) - pert_mean[iobs_active] += matrix_iget(E , iobs_active , iens); - - - for (iobs_active = 0; iobs_active < active_obs_size; iobs_active++) - pert_mean[iobs_active] /= active_ens_size; - - for (iens = 0; iens < active_ens_size; iens++) { - for (iobs_active = 0; iobs_active < active_obs_size; iobs_active++) { - double tmp; - matrix_iadd(E , iobs_active , iens , -pert_mean[iobs_active]); - tmp = matrix_iget(E , iobs_active , iens); - pert_var[iobs_active] += tmp * tmp; - } - } - - /* - The actual observed data are not accessed before this last block. - */ - { - int obs_offset = 0; - for (int block_nr = 0; block_nr < vector_get_size( obs_data->data ); block_nr++) { - const obs_block_type * obs_block = vector_iget_const( obs_data->data , block_nr); - obs_block_initE( obs_block , E , pert_var , &obs_offset); - } - } - - free(pert_mean); - free(pert_var); - - matrix_set_name( E , "E"); - matrix_assert_finite( E ); - return E; -} - - -/* Function that returns a matrix of independent, normal distributed random vector having mean zero, - and variance (covariance) specified in the input (obs_data) file. NOTICE THE DIFFERENCE WITH allocE, WHERE THE - RETURNED MATRIX IS CENTRED -*/ - - -matrix_type * obs_data_allocE_non_centred(const obs_data_type * obs_data , rng_type * rng , int ens_size) { - matrix_type * E; - int active_size = obs_data_get_active_size( obs_data ); - E = matrix_alloc( active_size , ens_size); - - { - double * tmp = util_calloc( active_size * ens_size , sizeof * tmp ); - int i,j; - int k = 0; - - enkf_util_rand_stdnormal_vector(active_size * ens_size , tmp , rng); - for (j=0; j < ens_size; j++) { - for (i=0; i < active_size; i++) { - matrix_iset( E , i , j , tmp[k]); - k++; - } - } - free(tmp); - } - - - /* - The actual observed data are not accessed before this last block. - */ - { - int obs_offset = 0; - for (int block_nr = 0; block_nr < vector_get_size( obs_data->data ); block_nr++) { - const obs_block_type * obs_block = vector_iget_const( obs_data->data , block_nr); - obs_block_initE_non_centred( obs_block , E , &obs_offset); - } - } - - - matrix_set_name( E , "E"); - matrix_assert_finite( E ); - return E; -} - -matrix_type * obs_data_allocD(const obs_data_type * obs_data , const matrix_type * E , const matrix_type * S) { - matrix_type * D = matrix_alloc_copy( E ); - matrix_inplace_sub( D , S ); - - { - int obs_offset = 0; - for (int block_nr = 0; block_nr < vector_get_size( obs_data->data ); block_nr++) { - const obs_block_type * obs_block = vector_iget_const( obs_data->data , block_nr); - obs_block_initD( obs_block , D , &obs_offset); - } - } - - matrix_set_name( D , "D"); - matrix_assert_finite( D ); - return D; -} - - - - -matrix_type * obs_data_allocR(const obs_data_type * obs_data) { - int active_size = obs_data_get_active_size( obs_data ); - matrix_type * R = matrix_alloc( active_size , active_size ); - { - int obs_offset = 0; - for (int block_nr = 0; block_nr < vector_get_size( obs_data->data ); block_nr++) { - const obs_block_type * obs_block = vector_iget_const( obs_data->data , block_nr); - obs_block_initR( obs_block , R , &obs_offset); - } - } - - matrix_set_name( R , "R"); - matrix_assert_finite( R ); - return R; -} - -/* -matrix_type * obs_data_alloc_innov(const obs_data_type * obs_data , const meas_data_type * meas_data , int active_size) { - matrix_type * innov = matrix_alloc( active_size , 1 ); - { - int obs_offset = 0; - for (int block_nr = 0; block_nr < vector_get_size( obs_data->data ); block_nr++) { - const obs_block_type * obs_block = vector_iget_const( obs_data->data , block_nr ); - const meas_block_type * meas_block = meas_data_iget_block_const( meas_data , block_nr ); - - obs_block_init_innov( obs_block , meas_block , innov , &obs_offset); - } - } - return innov; -} -*/ - -matrix_type * obs_data_allocdObs(const obs_data_type * obs_data ) { - int active_size = obs_data_get_active_size( obs_data ); - matrix_type * dObs = matrix_alloc( active_size , 2 ); - { - int obs_offset = 0; - for (int block_nr = 0; block_nr < vector_get_size( obs_data->data ); block_nr++) { - const obs_block_type * obs_block = vector_iget_const( obs_data->data , block_nr ); - - obs_block_initdObs( obs_block , dObs , &obs_offset); - } - } - return dObs; -} - - -static void obs_data_scale_matrix__(matrix_type * m , const double * scale_factor) { - const int rows = matrix_get_rows( m ); - const int columns = matrix_get_columns( m ); - int i, j; - - for (i = 0; i < columns; i++) - for (j = 0; j < rows; j++) - matrix_imul(m , j,i, scale_factor[j]); - -} - - -static void obs_data_scale_Rmatrix__( matrix_type * R , const double * scale_factor) { - int nrobs_active = matrix_get_rows( R ); - - /* Scale the error covariance matrix*/ - for (int i=0; i < nrobs_active; i++) - for (int j=0; j < nrobs_active; j++) - matrix_imul(R , i , j , scale_factor[i] * scale_factor[j]); -} - - -static double * obs_data_alloc_scale_factor(const obs_data_type * obs_data ) { - int nrobs_active = obs_data_get_active_size( obs_data ); - double * scale_factor = util_calloc(nrobs_active , sizeof * scale_factor ); - int obs_offset = 0; - for (int block_nr = 0; block_nr < vector_get_size( obs_data->data ); block_nr++) { - const obs_block_type * obs_block = vector_iget_const( obs_data->data , block_nr ); - - /* Init. the scaling factor ( 1/std(dObs) ) */ - obs_block_init_scaling( obs_block , scale_factor , &obs_offset); - } - - return scale_factor; -} - - -void obs_data_scale_matrix(const obs_data_type * obs_data , matrix_type * matrix) { - double * scale_factor = obs_data_alloc_scale_factor( obs_data ); - obs_data_scale_matrix__( matrix , scale_factor ); - free( scale_factor ); -} - - -void obs_data_scale_Rmatrix(const obs_data_type * obs_data , matrix_type * R) { - double * scale_factor = obs_data_alloc_scale_factor( obs_data ); - obs_data_scale_Rmatrix__( R , scale_factor ); - free( scale_factor ); -} - - -void obs_data_scale(const obs_data_type * obs_data , matrix_type *S , matrix_type *E , matrix_type *D , matrix_type *R , matrix_type * dObs) { - double * scale_factor = obs_data_alloc_scale_factor( obs_data ); - - /* Scale the forecasted data so that they (in theory) have the same variance - (if the prior distribution for the observation errors is correct) */ - obs_data_scale_matrix__( S , scale_factor ); - - /* Scale the combined data matrix: D = DObs + E - S, where DObs is the iobs_active times ens_size matrix where - each column contains a copy of the observed data - */ - if (D != NULL) - obs_data_scale_matrix__( D , scale_factor ); - - /* Same with E (used for low rank representation of the error covariance matrix*/ - if (E != NULL) - obs_data_scale_matrix__( E , scale_factor ); - - if (dObs != NULL) - obs_data_scale_matrix__( dObs , scale_factor ); - - if (R != NULL) - obs_data_scale_Rmatrix__(R , scale_factor); - - free(scale_factor); -} - - -void obs_data_scale_kernel(const obs_data_type * obs_data , matrix_type *S , matrix_type *E , matrix_type *D , double *dObs) { - const int nrobs_active = matrix_get_rows( S ); - const int ens_size = matrix_get_columns( S ); - double * scale_factor = util_calloc(nrobs_active , sizeof * scale_factor ); - int iens, iobs_active; - - { - int obs_offset = 0; - for (int block_nr = 0; block_nr < vector_get_size( obs_data->data ); block_nr++) { - const obs_block_type * obs_block = vector_iget_const( obs_data->data , block_nr ); - - /* Init. the scaling factor ( 1/std(dObs) ) */ - obs_block_init_scaling( obs_block , scale_factor , &obs_offset); - } - } - - - for (iens = 0; iens < ens_size; iens++) { - for (iobs_active = 0; iobs_active < nrobs_active; iobs_active++) { - - /* Scale the forecasted data so that they (in theory) have the same variance - (if the prior distribution for the observation errors is correct) */ - matrix_imul(S , iobs_active , iens , scale_factor[iobs_active]); - - if (D != NULL) - /* Scale the combined data matrix: D = DObs + E - S, where DObs is the iobs_active times ens_size matrix where - each column contains a copy of the observed data - */ - matrix_imul(D , iobs_active , iens , scale_factor[iobs_active]); - - if (E != NULL) - /* Same with E (used for low rank representation of the error covariance matrix*/ - matrix_imul(E , iobs_active , iens , scale_factor[iobs_active]); - } - } - - /* Scale the vector of observed data*/ - if (dObs != NULL) { - for (iobs_active = 0; iobs_active < nrobs_active; iobs_active++) - dObs[iobs_active] *= scale_factor[iobs_active]; - } - - - free(scale_factor); -} - - - - -int obs_data_get_active_size( const obs_data_type * obs_data ) { - int active_size = 0; - for (int block_nr = 0; block_nr < vector_get_size( obs_data->data ); block_nr++) { - const obs_block_type * obs_block = vector_iget_const( obs_data->data , block_nr ); - active_size += obs_block->active_size; - } - - return active_size; -} - - -int obs_data_get_num_blocks( const obs_data_type * obs_data ) { - return vector_get_size( obs_data->data ); -} - - - -int obs_data_get_total_size( const obs_data_type * obs_data ) { - int total_size = 0; - for (int block_nr = 0; block_nr < vector_get_size( obs_data->data ); block_nr++) { - const obs_block_type * obs_block = vector_iget_const( obs_data->data , block_nr ); - total_size += obs_block->size; - } - return total_size; -} - - -static const obs_block_type * obs_data_lookup_block( const obs_data_type * obs_data, int total_index , int * block_offset) { - if (total_index < obs_data_get_total_size( obs_data )) { - const obs_block_type * obs_block; - int total_offset = 0; - int block_index = 0; - int block_size; - - - while (true) { - obs_block = vector_iget_const( obs_data->data , block_index ); - block_size = obs_block->size; - if ((block_size + total_offset) > total_index) - break; - - total_offset += block_size; - block_index++; - } - *block_offset = total_offset; - return obs_block; - } else { - util_abort("%s: could not lookup obs-block \n",__func__); - return NULL; - } -} - - -double obs_data_iget_value( const obs_data_type * obs_data , int total_index ) { - int total_offset; - const obs_block_type * obs_block = obs_data_lookup_block( obs_data , total_index , &total_offset ); - return obs_block_iget_value( obs_block , total_index - total_offset ); -} - - -double obs_data_iget_std( const obs_data_type * obs_data , int total_index ) { - int total_offset; - const obs_block_type * obs_block = obs_data_lookup_block( obs_data , total_index , &total_offset ); - return obs_block_iget_std( obs_block , total_index - total_offset ); -} - - -void obs_data_fprintf( const obs_data_type * obs_data , FILE * stream) { - fprintf(stream , "\n"); - for (int block_nr = 0; block_nr < vector_get_size( obs_data->data ); block_nr++) { - const obs_block_type * obs_block = vector_iget_const( obs_data->data , block_nr ); - obs_block_fprintf( obs_block , stream ); - } - fprintf(stream , "\n"); -} diff --git a/ThirdParty/Ert/libenkf/src/obs_vector.c b/ThirdParty/Ert/libenkf/src/obs_vector.c deleted file mode 100644 index e0717177e2..0000000000 --- a/ThirdParty/Ert/libenkf/src/obs_vector.c +++ /dev/null @@ -1,1121 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'obs_vector.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -/** - See the overview documentation of the observation system in enkf_obs.c -*/ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define OBS_VECTOR_TYPE_ID 120086 - -struct obs_vector_struct { - UTIL_TYPE_ID_DECLARATION; - obs_free_ftype *freef; /* Function used to free an observation node. */ - obs_get_ftype *get_obs; /* Function used to build the 'd' vector. */ - obs_meas_ftype *measure; /* Function used to measure on the state, and add to to the S matrix. */ - obs_user_get_ftype *user_get; /* Function to get an observation based on KEY:INDEX input from user.*/ - obs_chi2_ftype *chi2; /* Function to evaluate chi-squared for an observation. */ - obs_update_std_scale_ftype *update_std_scale; /* Function to scale the standard deviation with a given factor */ - - vector_type * nodes; - char * obs_key; /* The key this observation vector has in the enkf_obs layer. */ - enkf_config_node_type * config_node; /* The config_node of the node type we are observing - shared reference */ - obs_impl_type obs_type; - int num_active; /* The total number of timesteps where this observation is active (i.e. nodes[ ] != NULL) */ - int_vector_type * step_list; -}; - - -UTIL_IS_INSTANCE_FUNCTION(obs_vector , OBS_VECTOR_TYPE_ID) -UTIL_SAFE_CAST_FUNCTION(obs_vector , OBS_VECTOR_TYPE_ID) - -/*****************************************************************/ - - -static void obs_vector_prefer_RESTART_warning() { - fprintf(stderr," -------------------------------------------------------------------------------\n"); - fprintf(stderr," Warning: For GEN_OBS observations it is highly recommended to use the RESTART \n"); - fprintf(stderr," keyword to denote the time of the observation. The RESTART value \n"); - fprintf(stderr," should be matched with the report step embedded as part of the \n"); - fprintf(stderr," GEN_DATA result file created by the forward model. \n"); - fprintf(stderr,"\n"); - fprintf(stderr," In the future use OF DATE and DAYS will not be possible for GEN_OBS \n"); - fprintf(stderr," -------------------------------------------------------------------------------\n"); - fprintf(stderr,"\n"); - fprintf(stderr,"\n"); -} - - - -static int __conf_instance_get_restart_nr(const conf_instance_type * conf_instance, const char * obs_key , time_map_type * time_map , bool prefer_restart) { - int obs_restart_nr = -1; /* To shut up compiler warning. */ - - if(conf_instance_has_item(conf_instance, "RESTART")) { - obs_restart_nr = conf_instance_get_item_value_int(conf_instance, "RESTART"); - if (obs_restart_nr > time_map_get_last_step( time_map)) - util_abort("%s: Observation %s occurs at restart %i, but history file has only %i restarts.\n", __func__, obs_key, obs_restart_nr, time_map_get_last_step( time_map )); - } else { - time_t obs_time = time_map_get_start_time( time_map ); - - if(conf_instance_has_item(conf_instance, "DATE")) { - obs_time = conf_instance_get_item_value_time_t(conf_instance, "DATE" ); - if (prefer_restart) - obs_vector_prefer_RESTART_warning(); - } else if (conf_instance_has_item(conf_instance, "DAYS")) { - double days = conf_instance_get_item_value_double(conf_instance, "DAYS"); - util_inplace_forward_days_utc( &obs_time , days ); - if (prefer_restart) - obs_vector_prefer_RESTART_warning(); - } else if (conf_instance_has_item(conf_instance, "HOURS")) { - double hours = conf_instance_get_item_value_double(conf_instance, "HOURS"); - util_inplace_forward_seconds_utc( &obs_time , hours * 3600 ); - if (prefer_restart) - obs_vector_prefer_RESTART_warning(); - } else - util_abort("%s: Internal error. Invalid conf_instance?\n", __func__); - - obs_restart_nr = time_map_lookup_time_with_tolerance( time_map , obs_time , 30 , 30 ); - } - if (obs_restart_nr < 0) - util_abort("%s: Failed to look up restart nr correctly \n",__func__); - - return obs_restart_nr; -} - - - -/*****************************************************************/ - - -static void obs_vector_resize(obs_vector_type * vector , int new_size) { - int current_size = vector_get_size( vector->nodes ); - int i; - - for (i=current_size; i < new_size; i++) - vector_append_ref( vector->nodes , NULL); - -} - - -obs_vector_type * obs_vector_alloc(obs_impl_type obs_type , const char * obs_key , enkf_config_node_type * config_node, int num_reports) { - obs_vector_type * vector = util_malloc(sizeof * vector ); - - UTIL_TYPE_ID_INIT( vector , OBS_VECTOR_TYPE_ID); - vector->freef = NULL; - vector->measure = NULL; - vector->get_obs = NULL; - vector->user_get = NULL; - vector->chi2 = NULL; - vector->update_std_scale = NULL; - vector->step_list = int_vector_alloc(0,0); - - switch (obs_type) { - case(SUMMARY_OBS): - vector->freef = summary_obs_free__; - vector->measure = summary_obs_measure__; - vector->get_obs = summary_obs_get_observations__; - vector->user_get = summary_obs_user_get__; - vector->chi2 = summary_obs_chi2__; - vector->update_std_scale = summary_obs_update_std_scale__; - break; - case(BLOCK_OBS): - vector->freef = block_obs_free__; - vector->measure = block_obs_measure__; - vector->get_obs = block_obs_get_observations__; - vector->user_get = block_obs_user_get__; - vector->chi2 = block_obs_chi2__; - vector->update_std_scale = block_obs_update_std_scale__; - break; - case(GEN_OBS): - vector->freef = gen_obs_free__; - vector->measure = gen_obs_measure__; - vector->get_obs = gen_obs_get_observations__; - vector->user_get = gen_obs_user_get__; - vector->chi2 = gen_obs_chi2__; - vector->update_std_scale = gen_obs_update_std_scale__; - break; - default: - util_abort("%s: internal error - obs_type:%d not recognized \n",__func__ , obs_type); - } - - vector->obs_type = obs_type; - vector->config_node = config_node; - vector->obs_key = util_alloc_string_copy( obs_key ); - vector->num_active = 0; - vector->nodes = vector_alloc_new(); - obs_vector_resize(vector , num_reports + 1); /* +1 here ?? Ohh - these +/- problems. */ - - return vector; -} - -obs_impl_type obs_vector_get_impl_type(const obs_vector_type * obs_vector) { - return obs_vector->obs_type; -} - - -/** - This is the key for the enkf_node which this observation is - 'looking at'. I.e. if this observation is an RFT pressure - measurement, this function will return "PRESSURE". -*/ - -const char * obs_vector_get_state_kw(const obs_vector_type * obs_vector) { - return enkf_config_node_get_key( obs_vector->config_node ); -} - - -const char * obs_vector_get_key(const obs_vector_type * obs_vector) { - return obs_vector->obs_key; -} - - -enkf_config_node_type * obs_vector_get_config_node(const obs_vector_type * obs_vector) { - return obs_vector->config_node; -} - - - -void obs_vector_free(obs_vector_type * obs_vector) { - vector_free( obs_vector->nodes ); - free(obs_vector->obs_key); - int_vector_free(obs_vector->step_list); - free(obs_vector); -} - - -static void obs_vector_assert_node_type( const obs_vector_type * obs_vector , const void * node ) { - bool type_OK; - switch (obs_vector->obs_type) { - case(SUMMARY_OBS): - type_OK = summary_obs_is_instance( node ); - break; - case(BLOCK_OBS): - type_OK = block_obs_is_instance( node ); - break; - case(GEN_OBS): - type_OK = gen_obs_is_instance( node ); - break; - default: - util_abort("%s: Error in type check: \n",__func__); - type_OK = false; - } - if (!type_OK) - util_abort("%s: Type mismatch when trying to add observation node to observation vector \n",__func__); -} - - - - -void obs_vector_del_node(obs_vector_type * obs_vector , int index) { - if (vector_iget_const( obs_vector->nodes , index ) != NULL) { - vector_iset_ref( obs_vector->nodes , index , NULL); /* Clear current content. */ - obs_vector->num_active--; - } -} - -/** - This function will clear (and free) all the summary_obs / gen_obs / - field_obs instances which have been installed in the vector; - however the vector itself is retained with keys, function pointers - and so on. -*/ - -void obs_vector_clear_nodes( obs_vector_type * obs_vector ) { - vector_clear( obs_vector->nodes ); - obs_vector->num_active = 0; -} - - - -void obs_vector_install_node(obs_vector_type * obs_vector , int index , void * node) { - obs_vector_assert_node_type( obs_vector , node ); - { - if (vector_iget_const( obs_vector->nodes , index ) == NULL) { - obs_vector->num_active++; - int_vector_append( obs_vector->step_list , index ); - int_vector_sort( obs_vector->step_list ); - } - - vector_iset_owned_ref( obs_vector->nodes , index , node , obs_vector->freef ); - } -} - -/** - Observe that @summary_key is the key used to look up the - corresponding simulated value in the ensemble, and not the - observation key - the two can be different. -*/ - -static void obs_vector_add_summary_obs( obs_vector_type * obs_vector , int obs_index , const char * summary_key , const char * obs_key , double value , double std , const char * auto_corrf_name , double auto_corrf_param) { - summary_obs_type * summary_obs = summary_obs_alloc( summary_key , obs_key , value , std , auto_corrf_name , auto_corrf_param); - obs_vector_install_node( obs_vector , obs_index , summary_obs ); -} - - -/*****************************************************************/ - -int obs_vector_get_num_active(const obs_vector_type * vector) { - return vector->num_active; -} - - -/** - IFF - only one - report step is active this function will return - that report step. If more than report step is active, the function - is ambiguous, and will fail HARD. Check with get_num_active first! -*/ - -int obs_vector_get_active_report_step(const obs_vector_type * vector) { - if (vector->num_active == 1) { - int active_step = -1; - int i; - for (i=0; i < vector_get_size(vector->nodes); i++) { - void * obs_node = vector_iget( vector->nodes , i); - if (obs_node != NULL) { - if (active_step >= 0) - util_abort("%s: internal error - mismatch in obs_vector->nodes and obs_vector->num_active \n",__func__); - active_step = i; - } - } - if (active_step < 0) - util_abort("%s: internal error - mismatch in obs_vector->nodes and obs_vector->num_active \n",__func__); - - return active_step; - } else { - util_abort("%s: when calling this function the number of active report steps MUST BE 1 - you had: %d \n",__func__ , vector->num_active); - return 0; /* Comiler shut up. */ - } -} - - -const int_vector_type * obs_vector_get_step_list(const obs_vector_type * vector) { - return vector->step_list; -} - - -bool obs_vector_iget_active(const obs_vector_type * vector, int index) { - /* We accept this ... */ - if (index >= vector_get_size( vector->nodes )) - return false; - - { - void * obs_data = vector_iget( vector->nodes , index ); - if (obs_data != NULL) - return true; - else - return false; - } -} - - -/* - Will happily return NULL if index is not active. -*/ -void * obs_vector_iget_node(const obs_vector_type * vector, int index) { - return vector_iget( vector->nodes , index ); -} - - - - -void obs_vector_user_get(const obs_vector_type * obs_vector , const char * index_key , int report_step , double * value , double * std , bool * valid) { - void * obs_node = obs_vector_iget_node( obs_vector , report_step ); - obs_vector->user_get(obs_node , index_key , value , std , valid); -} - -/* - This function returns the next active (i.e. node != NULL) report - step, starting with 'prev_step + 1'. If no more active steps are - found, it will return -1. -*/ - -int obs_vector_get_next_active_step(const obs_vector_type * obs_vector , int prev_step) { - if (prev_step >= (vector_get_size(obs_vector->nodes) - 1)) - return -1; - else { - int size = vector_get_size( obs_vector->nodes ); - int next_step = prev_step + 1; - while (( next_step < size) && (obs_vector_iget_node(obs_vector , next_step) == NULL)) - next_step++; - - if (next_step == size) - return -1; /* No more active steps. */ - else - return next_step; - } -} - - -int obs_vector_get_last_active_step(const obs_vector_type * obs_vector) { - int step = vector_get_size( obs_vector->nodes ) - 1; - while (true) { - const void * obs_node = vector_iget_const( obs_vector->nodes , step ); - if (obs_node) - break; - - step--; - if (step < 0) - break; - } - return step; -} - - - -/*****************************************************************/ -/** - All the obs_vector_load_from_XXXX() functions can safely return - NULL, in which case no observation is added to enkf_obs observation - hash table. -*/ - - -void obs_vector_load_from_SUMMARY_OBSERVATION(obs_vector_type * obs_vector , const conf_instance_type * conf_instance , time_map_type * obs_time , ensemble_config_type * ensemble_config) { - if(!conf_instance_is_of_class(conf_instance, "SUMMARY_OBSERVATION")) - util_abort("%s: internal error. expected \"SUMMARY_OBSERVATION\" instance, got \"%s\".\n", - __func__, conf_instance_get_class_name_ref(conf_instance) ); - - { - double obs_value = conf_instance_get_item_value_double(conf_instance, "VALUE" ); - double obs_error = conf_instance_get_item_value_double(conf_instance, "ERROR" ); - double min_error = conf_instance_get_item_value_double(conf_instance, "ERROR_MIN"); - const char * error_mode = conf_instance_get_item_value_ref( conf_instance, "ERROR_MODE"); - const char * sum_key = conf_instance_get_item_value_ref( conf_instance, "KEY" ); - const char * obs_key = conf_instance_get_name_ref(conf_instance); - int obs_restart_nr = __conf_instance_get_restart_nr(conf_instance , obs_key , obs_time , false); - - if (obs_restart_nr == 0) { - int day,month,year; - time_t start_time = time_map_iget( obs_time , 0 ); - util_set_date_values_utc( start_time , &day , &month , &year); - - fprintf(stderr,"** ERROR: It is unfortunately not possible to use summary observations from the\n"); - fprintf(stderr," start of the simulation. Problem with observation:%s at %02d/%02d/%4d\n",obs_key , day,month,year); - exit(1); - } - { - if (strcmp( error_mode , "REL") == 0) - obs_error *= obs_value; - else if (strcmp( error_mode , "RELMIN") == 0) - obs_error = util_double_max( min_error , obs_error * obs_value ); - - obs_vector_add_summary_obs( obs_vector , obs_restart_nr , sum_key , obs_key , obs_value , obs_error , NULL , 0); - } - } -} - - - - -obs_vector_type * obs_vector_alloc_from_GENERAL_OBSERVATION(const conf_instance_type * conf_instance , time_map_type * obs_time , const ensemble_config_type * ensemble_config) { - if(!conf_instance_is_of_class(conf_instance, "GENERAL_OBSERVATION")) - util_abort("%s: internal error. expected \"GENERAL_OBSERVATION\" instance, got \"%s\".\n", - __func__, conf_instance_get_class_name_ref(conf_instance) ); - const char * obs_key = conf_instance_get_name_ref(conf_instance); - const char * state_kw = conf_instance_get_item_value_ref( conf_instance, "DATA" ); - if (ensemble_config_has_key( ensemble_config , state_kw )) { - const char * obs_key = conf_instance_get_name_ref(conf_instance); - int obs_restart_nr = __conf_instance_get_restart_nr(conf_instance , obs_key , obs_time , true); - const char * index_file = NULL; - const char * index_list = NULL; - const char * obs_file = NULL; - const char * error_covar_file = NULL; - - if (conf_instance_has_item(conf_instance , "INDEX_FILE")) - index_file = conf_instance_get_item_value_ref( conf_instance, "INDEX_FILE" ); - - if (conf_instance_has_item(conf_instance , "INDEX_LIST")) - index_list = conf_instance_get_item_value_ref( conf_instance, "INDEX_LIST" ); - - if (conf_instance_has_item(conf_instance , "OBS_FILE")) - obs_file = conf_instance_get_item_value_ref( conf_instance, "OBS_FILE" ); - - if (conf_instance_has_item(conf_instance , "ERROR_COVAR")) - error_covar_file = conf_instance_get_item_value_ref( conf_instance, "ERROR_COVAR" ); - - { - obs_vector_type * obs_vector = NULL; - const enkf_config_node_type * config_node = ensemble_config_get_node( ensemble_config , state_kw); - - if (enkf_config_node_get_impl_type(config_node) == GEN_DATA) { - double scalar_error = -1; - double scalar_value = -1; - gen_obs_type * gen_obs ; - const gen_data_config_type * config = enkf_config_node_get_ref( config_node ); - - if (gen_data_config_has_report_step( config , obs_restart_nr)) { - obs_vector = obs_vector_alloc( GEN_OBS , obs_key , ensemble_config_get_node(ensemble_config , state_kw ), time_map_get_last_step( obs_time )); - if (conf_instance_has_item(conf_instance , "VALUE")) { - scalar_value = conf_instance_get_item_value_double(conf_instance , "VALUE"); - scalar_error = conf_instance_get_item_value_double(conf_instance , "ERROR"); - } - - /** The config system has ensured that we have either OBS_FILE or (VALUE and ERROR). */ - gen_obs = gen_obs_alloc( enkf_config_node_get_ref( config_node ) , obs_key , obs_file , scalar_value , scalar_error , index_file , index_list , error_covar_file); - obs_vector_install_node( obs_vector , obs_restart_nr , gen_obs ); - } else - fprintf(stderr,"** ERROR: The GEN_DATA node:%s is not configured to load from report step:%d - the observation:%s will be ignored\n", state_kw , obs_restart_nr , obs_key); - } else { - ert_impl_type impl_type = enkf_config_node_get_impl_type(config_node); - fprintf(stderr,"** ERROR: %s: %s has implementation type:\'%s\' - expected:\'%s\' - observation:%s ignored.\n", - __func__ , state_kw , enkf_types_get_impl_name(impl_type) , enkf_types_get_impl_name(GEN_DATA) , obs_key); - } - return obs_vector; - - } - } else { - fprintf(stderr,"** Warning the ensemble key:%s does not exist - observation:%s not added \n", state_kw , obs_key); - return NULL; - } -} - - - -// Should check the refcase for key - if it is != NULL. - -bool obs_vector_load_from_HISTORY_OBSERVATION(obs_vector_type * obs_vector , - const conf_instance_type * conf_instance , - time_map_type * obs_time , - const history_type * history , - ensemble_config_type * ensemble_config, - double std_cutoff ) { - - if(!conf_instance_is_of_class(conf_instance, "HISTORY_OBSERVATION")) - util_abort("%s: internal error. expected \"HISTORY_OBSERVATION\" instance, got \"%s\".\n",__func__, conf_instance_get_class_name_ref(conf_instance) ); - - { - bool initOK = false; - int size , restart_nr; - double_vector_type * value = double_vector_alloc(0,0); - double_vector_type * std = double_vector_alloc(0,0); - bool_vector_type * valid = bool_vector_alloc(0 , false); - - /* The auto_corrf parameters can not be "segmentized" */ - double auto_corrf_param = -1; - const char * auto_corrf_name = NULL; - - - double error = conf_instance_get_item_value_double(conf_instance, "ERROR" ); - double error_min = conf_instance_get_item_value_double(conf_instance, "ERROR_MIN" ); - const char * error_mode = conf_instance_get_item_value_ref( conf_instance, "ERROR_MODE"); - const char * sum_key = conf_instance_get_name_ref( conf_instance ); - - if(conf_instance_has_item(conf_instance, "AUTO_CORRF")) { - auto_corrf_name = conf_instance_get_item_value_ref( conf_instance , "AUTO_CORRF"); - auto_corrf_param = conf_instance_get_item_value_double(conf_instance, "AUTO_CORRF_PARAM"); - if(conf_instance_has_item(conf_instance, "AUTO_CORRF_PARAM")) - auto_corrf_param = conf_instance_get_item_value_double(conf_instance, "AUTO_CORRF_PARAM"); - else - util_abort("%s: When specifying AUTO_CORRF you must also give a vlaue for AUTO_CORRF_PARAM",__func__); - } - - - // Get time series data from history object and allocate - size = time_map_get_last_step( obs_time ); - if (history_init_ts( history , sum_key , value , valid )) { - - // Create the standard deviation vector - if(strcmp(error_mode, "ABS") == 0) { - for( restart_nr = 0; restart_nr < size; restart_nr++) - double_vector_iset( std , restart_nr , error ); - } else if(strcmp(error_mode, "REL") == 0) { - for( restart_nr = 0; restart_nr < size; restart_nr++) - double_vector_iset( std , restart_nr , error * abs( double_vector_iget( value , restart_nr ))); - } else if(strcmp(error_mode, "RELMIN") == 0) { - for(restart_nr = 0; restart_nr < size; restart_nr++) { - double tmp_std = util_double_max( error_min , error * abs( double_vector_iget( value , restart_nr ))); - double_vector_iset( std , restart_nr , tmp_std); - } - } else - util_abort("%s: Internal error. Unknown error mode \"%s\"\n", __func__, error_mode); - - - // Handle SEGMENTs which can be used to customize the observation error. */ - { - stringlist_type * segment_keys = conf_instance_alloc_list_of_sub_instances_of_class_by_name(conf_instance, "SEGMENT"); - stringlist_sort( segment_keys , NULL ); - - int num_segments = stringlist_get_size(segment_keys); - - for(int segment_nr = 0; segment_nr < num_segments; segment_nr++) - { - const char * segment_name = stringlist_iget(segment_keys, segment_nr); - const conf_instance_type * segment_conf = conf_instance_get_sub_instance_ref(conf_instance, segment_name); - - int start = conf_instance_get_item_value_int( segment_conf, "START" ); - int stop = conf_instance_get_item_value_int( segment_conf, "STOP" ); - double error_segment = conf_instance_get_item_value_double(segment_conf, "ERROR" ); - double error_min_segment = conf_instance_get_item_value_double(segment_conf, "ERROR_MIN" ); - const char * error_mode_segment = conf_instance_get_item_value_ref( segment_conf, "ERROR_MODE"); - - if(start < 0) - { - printf("%s: WARNING - Segment out of bounds. Truncating start of segment to 0.\n", __func__); - start = 0; - } - - if(stop >= size) - { - printf("%s: WARNING - Segment out of bounds. Truncating end of segment to %d.\n", __func__, size - 1); - stop = size -1; - } - - if(start > stop) - { - printf("%s: WARNING - Segment start after stop. Truncating end of segment to %d.\n", __func__, start ); - stop = start; - } - - // Create the standard deviation vector - if(strcmp(error_mode_segment, "ABS") == 0) { - for( restart_nr = start; restart_nr <= stop; restart_nr++) - double_vector_iset( std , restart_nr , error_segment) ; - } else if(strcmp(error_mode_segment, "REL") == 0) { - for( restart_nr = start; restart_nr <= stop; restart_nr++) - double_vector_iset( std , restart_nr , error_segment * abs(double_vector_iget( value , restart_nr))); - } else if(strcmp(error_mode_segment, "RELMIN") == 0) { - for(restart_nr = start; restart_nr <= stop ; restart_nr++) { - double tmp_std = util_double_max( error_min_segment , error_segment * abs( double_vector_iget( value , restart_nr ))); - double_vector_iset( std , restart_nr , tmp_std); - } - } else - util_abort("%s: Internal error. Unknown error mode \"%s\"\n", __func__, error_mode); - } - stringlist_free(segment_keys); - } - - - /* - This is where the summary observations are finally added. - */ - for (restart_nr = 0; restart_nr < size; restart_nr++) { - if (bool_vector_safe_iget( valid , restart_nr)) { - if (double_vector_iget( std , restart_nr) > std_cutoff) { - obs_vector_add_summary_obs( obs_vector , restart_nr , sum_key , sum_key , - double_vector_iget( value ,restart_nr) , double_vector_iget( std , restart_nr ) , - auto_corrf_name , auto_corrf_param); - } else - fprintf(stderr,"** Warning: to small observation error in observation %s:%d - ignored. \n", sum_key , restart_nr); - } - } - initOK = true; - } - double_vector_free(std); - double_vector_free(value); - bool_vector_free(valid); - return initOK; - } -} - -void obs_vector_scale_std(obs_vector_type * obs_vector, const local_obsdata_node_type * local_node , double std_multiplier) { - const active_list_type * active_list = local_obsdata_node_get_active_list( local_node ); - int tstep = -1; - - while (true) { - tstep = obs_vector_get_next_active_step( obs_vector , tstep ); - if (tstep < 0) - break; - - if (local_obsdata_node_tstep_active(local_node, tstep)) { - void * observation = obs_vector_iget_node(obs_vector, tstep); - if (observation) - obs_vector->update_std_scale(observation, std_multiplier , active_list); - } - } - -} - - -static const char * __summary_kw( const char * field_name ) { - if (strcmp( field_name , "PRESSURE") == 0) - return "BPR"; - else if (strcmp( field_name , "SWAT") == 0) - return "BSWAT"; - else if (strcmp( field_name , "SGAS") == 0) - return "BSGAS"; - else { - util_abort("%s: sorry - could not \'translate\' field:%s to block summary variable\n",__func__ , field_name); - return NULL; - } -} - - -obs_vector_type * obs_vector_alloc_from_BLOCK_OBSERVATION(const conf_instance_type * conf_instance , - const ecl_grid_type * grid , - time_map_type * obs_time , - const ecl_sum_type * refcase , - ensemble_config_type * ensemble_config) { - - if(!conf_instance_is_of_class(conf_instance, "BLOCK_OBSERVATION")) - util_abort("%s: internal error. expected \"BLOCK_OBSERVATION\" instance, got \"%s\".\n", - __func__, conf_instance_get_class_name_ref(conf_instance) ); - - block_obs_source_type source_type = SOURCE_SUMMARY; - const char * obs_label = conf_instance_get_name_ref(conf_instance); - const char * source_string = conf_instance_get_item_value_ref(conf_instance , "SOURCE"); - const char * field_name = conf_instance_get_item_value_ref(conf_instance , "FIELD"); - const char * sum_kw = NULL; - bool OK = true; - - if (strcmp(source_string , "FIELD") == 0) { - source_type = SOURCE_FIELD; - if (!ensemble_config_has_key( ensemble_config , field_name)) { - OK = false; - fprintf(stderr,"** Warning the ensemble key:%s does not exist - observation:%s not added \n", field_name , obs_label); - } - } else if (strcmp( source_string , "SUMMARY") == 0) { - source_type = SOURCE_SUMMARY; - sum_kw = __summary_kw( field_name ); - } else - util_abort("%s: internal error \n",__func__); - - if (OK) { - obs_vector_type * obs_vector = NULL; - int size = time_map_get_last_step( obs_time ); - int obs_restart_nr ; - - stringlist_type * summary_keys = stringlist_alloc_new(); - stringlist_type * obs_pt_keys = conf_instance_alloc_list_of_sub_instances_of_class_by_name(conf_instance, "OBS"); - int num_obs_pts = stringlist_get_size(obs_pt_keys); - - double * obs_value = util_calloc(num_obs_pts , sizeof * obs_value); - double * obs_std = util_calloc(num_obs_pts , sizeof * obs_std ); - int * obs_i = util_calloc(num_obs_pts , sizeof * obs_i ); - int * obs_j = util_calloc(num_obs_pts , sizeof * obs_j ); - int * obs_k = util_calloc(num_obs_pts , sizeof * obs_k ); - - obs_restart_nr = __conf_instance_get_restart_nr(conf_instance , obs_label , obs_time , false); - - /** Build the observation. */ - for(int obs_pt_nr = 0; obs_pt_nr < num_obs_pts; obs_pt_nr++) { - const char * obs_key = stringlist_iget(obs_pt_keys, obs_pt_nr); - const conf_instance_type * obs_instance = conf_instance_get_sub_instance_ref(conf_instance, obs_key); - const char * error_mode = conf_instance_get_item_value_ref(obs_instance, "ERROR_MODE"); - double error = conf_instance_get_item_value_double(obs_instance, "ERROR"); - double value = conf_instance_get_item_value_double(obs_instance, "VALUE"); - double min_error = conf_instance_get_item_value_double(obs_instance, "ERROR_MIN"); - - if (strcmp( error_mode , "REL") == 0) - error *= value; - else if (strcmp( error_mode , "RELMIN") == 0) - error = util_double_max( error * value , min_error ); - - obs_value[obs_pt_nr] = value; - obs_std [obs_pt_nr] = error; - - /** - The input values i,j,k come from the user, and are offset 1. They - are immediately shifted with -1 to become C-based offset zero. - */ - obs_i[obs_pt_nr] = conf_instance_get_item_value_int( obs_instance, "I") - 1; - obs_j[obs_pt_nr] = conf_instance_get_item_value_int( obs_instance, "J") - 1; - obs_k[obs_pt_nr] = conf_instance_get_item_value_int( obs_instance, "K") - 1; - - if (source_type == SOURCE_SUMMARY) { - char * summary_key = smspec_alloc_block_ijk_key( SUMMARY_KEY_JOIN_STRING , sum_kw , - obs_i[obs_pt_nr] + 1 , - obs_j[obs_pt_nr] + 1 , - obs_k[obs_pt_nr] + 1 ); - - stringlist_append_owned_ref( summary_keys , summary_key ); - } - } - - - if (source_type == SOURCE_FIELD) { - const enkf_config_node_type * config_node = ensemble_config_get_node( ensemble_config , field_name); - const field_config_type * field_config = enkf_config_node_get_ref( config_node ); - block_obs_type * block_obs = block_obs_alloc_complete(obs_label, source_type , NULL , field_config , grid , num_obs_pts, obs_i, obs_j, obs_k, obs_value, obs_std); - - if (block_obs != NULL) { - obs_vector = obs_vector_alloc( BLOCK_OBS , obs_label , ensemble_config_get_node(ensemble_config , field_name), size ); - obs_vector_install_node( obs_vector , obs_restart_nr , block_obs); - } - } else if (source_type == SOURCE_SUMMARY) { - OK = true; - if (refcase != NULL) { - for (int i=0; i < stringlist_get_size( summary_keys ); i++) { - const char * sum_key = stringlist_iget( summary_keys , i ); - if (!ecl_sum_has_key(refcase , sum_key)) { - /* - If the - */ - fprintf(stderr,"** Warning missing summary %s for cell: (%d,%d,%d) in refcase - make sure that \"BPR %d %d %d\" is included in ECLIPSE summary specification \n" , - sum_key , obs_i[i]+1 , obs_j[i]+1 , obs_k[i]+1 , obs_i[i]+1 , obs_j[i]+1 , obs_k[i]+1 ); - //OK = false; - } - } - } - if (OK) { - // We can create the container node and add the summary nodes. - enkf_config_node_type * container_config = ensemble_config_add_container( ensemble_config , NULL ); - - for (int i=0; i < stringlist_get_size( summary_keys ); i++) { - const char * sum_key = stringlist_iget( summary_keys , i ); - enkf_config_node_type * child_node = ensemble_config_add_summary_observation( ensemble_config , sum_key , LOAD_FAIL_WARN ); - enkf_config_node_update_container( container_config , child_node ); - } - - { - block_obs_type * block_obs = block_obs_alloc_complete(obs_label, source_type , summary_keys , enkf_config_node_get_ref(container_config) , - grid , num_obs_pts, obs_i, obs_j, obs_k, obs_value, obs_std); - if (block_obs != NULL) { - obs_vector = obs_vector_alloc( BLOCK_OBS , obs_label , container_config, size ); - obs_vector_install_node( obs_vector , obs_restart_nr , block_obs); - } - } - } - } else - util_abort("%s: invalid source value \n",__func__); - - free(obs_value); - free(obs_std); - free(obs_i); - free(obs_j); - free(obs_k); - stringlist_free(obs_pt_keys); - stringlist_free(summary_keys); - - return obs_vector; - } else { - fprintf(stderr,"** Warning the ensemble key:%s does not exist - observation:%s not added \n", field_name , obs_label); - return NULL; - } -} -/*****************************************************************/ - -void obs_vector_iget_observations(const obs_vector_type * obs_vector, int report_step , obs_data_type * obs_data, const active_list_type * active_list, enkf_fs_type * fs) { - void * obs_node = vector_iget( obs_vector->nodes , report_step ); - if ( obs_node != NULL) - obs_vector->get_obs(obs_node , obs_data , fs, report_step , active_list); -} - - -void obs_vector_measure(const obs_vector_type * obs_vector , - enkf_fs_type * fs , - int report_step , - const int_vector_type * ens_active_list , - meas_data_type * meas_data , - const active_list_type * active_list) { - - void * obs_node = vector_iget( obs_vector->nodes , report_step ); - if ( obs_node != NULL ) { - enkf_node_type * enkf_node = enkf_node_deep_alloc( obs_vector->config_node ); - - node_id_type node_id = { .report_step = report_step , - .iens = 0 }; - - for (int active_iens_index =0; active_iens_index < int_vector_size( ens_active_list ); active_iens_index++) { - node_id.iens = int_vector_iget( ens_active_list , active_iens_index ); - - enkf_node_load(enkf_node , fs , node_id); - obs_vector->measure(obs_node , enkf_node_value_ptr(enkf_node) , node_id , meas_data , active_list); - } - - enkf_node_free( enkf_node ); - } -} - - -static bool obs_vector_has_data_at_report_step( const obs_vector_type * obs_vector , const bool_vector_type * active_mask , enkf_fs_type * fs, int report_step) { - void * obs_node = vector_iget( obs_vector->nodes , report_step ); - if ( obs_node ) { - node_id_type node_id = {.report_step = report_step }; - for (int iens = 0; iens < bool_vector_size( active_mask ); iens++) { - if (bool_vector_iget( active_mask , iens)) { - node_id.iens = iens; - if (! enkf_config_node_has_node(obs_vector->config_node , fs , node_id )) - return false; - } - } - } - - /* - Will return true unconditionally if we do not have observation data at this report step; - or alternatively if the active_mask is all false. - */ - return true; -} - - -/* - The has_vector_data() function will only check that we have a vector - stored, and not the actual length of the vector. This means we can - be fooled if the stored vector is shorter than what the observation - requires. - - Should ideally check that the vector is long enough, but that - requires changes in the enkf_node api for vector storage. -*/ - -static bool obs_vector_has_vector_data( const obs_vector_type * obs_vector , const bool_vector_type * active_mask , enkf_fs_type * fs) { - bool has_data = true; - int iens = 0; - - while (true) { - const enkf_config_node_type * data_config = obs_vector->config_node; - if (bool_vector_iget( active_mask , iens )) { - if (!enkf_config_node_has_vector(data_config , fs , iens)) { - has_data = false; - break; - } - } - iens++; - if (iens >= bool_vector_size( active_mask )) - break; - } - - return has_data; -} - - - -bool obs_vector_has_data( const obs_vector_type * obs_vector , const bool_vector_type * active_mask , enkf_fs_type * fs) { - const enkf_config_node_type * data_config = obs_vector->config_node; - if (enkf_config_node_vector_storage( data_config )) - return obs_vector_has_vector_data( obs_vector , active_mask , fs ); - else { - for (int report_step = 0; report_step < vector_get_size( obs_vector->nodes ); report_step++) { - if (!obs_vector_has_data_at_report_step( obs_vector , active_mask , fs, report_step)) - return false; - } - return true; - } -} - - - -/*****************************************************************/ -/** Here comes many different functions for misfit calculations. */ - -/** - This is the lowest level function: - - * It is checked that the obs_vector is active for the actual report - step; if it is not active 0.0 is returned without any further - ado. - - * It is assumed the enkf_node_instance contains valid data for this - report_step. This is not checked in this function, and is the - responsability of the calling scope. - - * The underlying chi2 function will do a type-check of node - and - fail hard if it is not correct. - -*/ - - -static double obs_vector_chi2__(const obs_vector_type * obs_vector , int report_step , const enkf_node_type * node, node_id_type node_id) { - void * obs_node = vector_iget( obs_vector->nodes , report_step ); - - if ( obs_node != NULL) - return obs_vector->chi2( obs_node , enkf_node_value_ptr( node ), node_id); - else - return 0.0; /* Observation not active for this report step. */ - -} - - - - - -double obs_vector_chi2(const obs_vector_type * obs_vector , enkf_fs_type * fs , node_id_type node_id) { - enkf_node_type * enkf_node = enkf_node_alloc( obs_vector->config_node ); - double chi2 = 0; - - if (enkf_node_try_load( enkf_node , fs , node_id)) - chi2 = obs_vector_chi2__(obs_vector , node_id.report_step , enkf_node , node_id); - - enkf_node_free( enkf_node ); - return chi2; -} - - - - -/** - This function will evaluate the chi2 for the ensemble members - [iens1,iens2) and report steps [step1,step2). - - Observe that the chi2 pointer is assumed to be allocated for the - complete ensemble, altough this function only operates on part of - it. -*/ - - -//This will not work for container observations ..... - -void obs_vector_ensemble_chi2(const obs_vector_type * obs_vector , - enkf_fs_type * fs, - bool_vector_type * valid , - int step1 , - int step2 , - int iens1 , - int iens2 , - double ** chi2) { - - int step; - enkf_node_type * enkf_node = enkf_node_alloc( obs_vector->config_node ); - node_id_type node_id; - for (step = step1; step <= step2; step++) { - int iens; - node_id.report_step = step; - { - void * obs_node = vector_iget( obs_vector->nodes , step); - - if (obs_node == NULL) { - for (iens = iens1; iens < iens2; iens++) - chi2[step][iens] = 0; - } else { - for (iens = iens1; iens < iens2; iens++) { - node_id.iens = iens; - if (enkf_node_try_load( enkf_node , fs , node_id)) - chi2[step][iens] = obs_vector_chi2__(obs_vector , step , enkf_node , node_id); - else { - chi2[step][iens] = 0; - // Missing data - this member will be marked as invalid in the misfit calculations. - bool_vector_iset( valid , iens , false ); - } - } - } - } - } - enkf_node_free( enkf_node ); -} - - - -/** - This function will evaluate the total chi2 for one ensemble member - (i.e. sum over report steps). -*/ - - -double obs_vector_total_chi2(const obs_vector_type * obs_vector , enkf_fs_type * fs , int iens) { - int report_step; - double sum_chi2 = 0; - enkf_node_type * enkf_node = enkf_node_deep_alloc( obs_vector->config_node ); - node_id_type node_id = {.report_step = 0, .iens = iens }; - - for (report_step = 0; report_step < vector_get_size( obs_vector->nodes ); report_step++) { - if (vector_iget(obs_vector->nodes , report_step) != NULL) { - node_id.report_step = report_step; - - if (enkf_node_try_load( enkf_node , fs , node_id)) - sum_chi2 += obs_vector_chi2__(obs_vector , report_step , enkf_node, node_id); - - } - } - enkf_node_free( enkf_node ); - return sum_chi2; -} - - -/** - This function will sum up all timesteps of the obs_vector, for all ensemble members. -*/ - -void obs_vector_ensemble_total_chi2(const obs_vector_type * obs_vector , enkf_fs_type * fs , int ens_size , double * sum_chi2) { - const bool verbose = true; - msg_type * msg; - int report_step; - int iens; - char * msg_text = NULL; - - for (iens = 0; iens < ens_size; iens++) - sum_chi2[iens] = 0; - - if (verbose) { - msg = msg_alloc("Observation: " , false); - msg_show(msg); - } - - { - node_id_type node_id = {.report_step = 0, .iens = iens }; - enkf_node_type * enkf_node = enkf_node_alloc( obs_vector->config_node ); - for (report_step = 0; report_step < vector_get_size( obs_vector->nodes); report_step++) { - if (verbose) { - msg_text = util_realloc_sprintf( msg_text , "%s[%03d]" , obs_vector->obs_key , report_step); - msg_update(msg , msg_text); - } - if (vector_iget(obs_vector->nodes , report_step) != NULL) { - node_id.report_step = report_step; - for (iens = 0; iens < ens_size; iens++) { - node_id.iens = iens; - - if (enkf_node_try_load( enkf_node , fs , node_id)) - sum_chi2[iens] += obs_vector_chi2__(obs_vector , report_step , enkf_node, node_id); - - } - } - } - enkf_node_free( enkf_node ); - } - - if (verbose) { - msg_free(msg , true); - util_safe_free( msg_text ); - } -} - -const char * obs_vector_get_obs_key( const obs_vector_type * obs_vector) { - return obs_vector->obs_key; -} - - -local_obsdata_node_type * obs_vector_alloc_local_node(const obs_vector_type * obs_vector) { - local_obsdata_node_type * obs_node = local_obsdata_node_alloc( obs_vector->obs_key , false ); - local_obsdata_node_reset_tstep_list(obs_node, obs_vector->step_list ); - return obs_node; -} - - -/*****************************************************************/ - - -VOID_FREE(obs_vector) - diff --git a/ThirdParty/Ert/libenkf/src/pca_plot_data.c b/ThirdParty/Ert/libenkf/src/pca_plot_data.c deleted file mode 100644 index ef9b33df20..0000000000 --- a/ThirdParty/Ert/libenkf/src/pca_plot_data.c +++ /dev/null @@ -1,107 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - The file 'pca_plot_data.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include - -#include -#include -#include -#include - -#include -#include - -#define PCA_PLOT_DATA_TYPE_ID 61442098 - -struct pca_plot_data_struct { - UTIL_TYPE_ID_DECLARATION; - char * name; - vector_type * pca_vectors; - double_vector_type * singular_values; - int ens_size; -}; - - -UTIL_IS_INSTANCE_FUNCTION( pca_plot_data , PCA_PLOT_DATA_TYPE_ID ) -static UTIL_SAFE_CAST_FUNCTION( pca_plot_data , PCA_PLOT_DATA_TYPE_ID ) - -static void pca_plot_data_add_vectors(pca_plot_data_type * plot_data , const matrix_type * PC , const matrix_type * PC_obs, const double_vector_type * singular_values) { - int component; - for (component = 0; component < matrix_get_rows( PC ); component++) { - pca_plot_vector_type * vector = pca_plot_vector_alloc( component , PC , PC_obs , singular_values); - vector_append_owned_ref( plot_data->pca_vectors , vector , pca_plot_vector_free__); - } -} - - -pca_plot_data_type * pca_plot_data_alloc( const char * name, - const matrix_type * PC , - const matrix_type * PC_obs, - const double_vector_type * singular_values) { - pca_plot_data_type * plot_data = NULL; - - if (pca_plot_assert_input( PC , PC_obs , singular_values)) { - plot_data = util_malloc( sizeof * plot_data ); - UTIL_TYPE_ID_INIT( plot_data , PCA_PLOT_DATA_TYPE_ID ); - plot_data->name = util_alloc_string_copy( name ); - plot_data->pca_vectors = vector_alloc_new(); - plot_data->ens_size = matrix_get_columns( PC ); - plot_data->singular_values = double_vector_alloc_copy( singular_values ); - pca_plot_data_add_vectors( plot_data , PC , PC_obs , singular_values); - } - return plot_data; -} - - - - - -void pca_plot_data_free( pca_plot_data_type * plot_data ) { - vector_free( plot_data->pca_vectors ); - double_vector_free( plot_data->singular_values ); - free( plot_data->name ); - free( plot_data ); -} - -void pca_plot_data_free__( void * arg ) { - pca_plot_data_type * plot_data = pca_plot_data_safe_cast( arg ); - pca_plot_data_free( plot_data ); -} - -int pca_plot_data_get_size( const pca_plot_data_type * plot_data ) { - return vector_get_size( plot_data->pca_vectors ); -} - - -int pca_plot_data_get_ens_size( const pca_plot_data_type * plot_data ) { - return plot_data->ens_size; -} - -const pca_plot_vector_type * pca_plot_data_iget_vector( const pca_plot_data_type * plot_data , int ivec) { - return vector_iget_const( plot_data->pca_vectors , ivec ); -} - - -const char * pca_plot_data_get_name( const pca_plot_data_type * plot_data ) { - return plot_data->name; -} - - -const double_vector_type * pca_plot_data_get_singular_values( const pca_plot_data_type * plot_data ) { - return plot_data->singular_values; -} diff --git a/ThirdParty/Ert/libenkf/src/pca_plot_vector.c b/ThirdParty/Ert/libenkf/src/pca_plot_vector.c deleted file mode 100644 index b6f497d942..0000000000 --- a/ThirdParty/Ert/libenkf/src/pca_plot_vector.c +++ /dev/null @@ -1,108 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - The file 'pca_plot_vector.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include - -#include -#include -#include - -#include - -#define PCA_PLOT_VECTOR_TYPE_ID 61743098 - -struct pca_plot_vector_struct { - UTIL_TYPE_ID_DECLARATION; - int size; - double singular_value; - double obs_value; - double * sim_data; -}; - - -UTIL_IS_INSTANCE_FUNCTION( pca_plot_vector , PCA_PLOT_VECTOR_TYPE_ID ) -static UTIL_SAFE_CAST_FUNCTION( pca_plot_vector , PCA_PLOT_VECTOR_TYPE_ID ) - -bool pca_plot_assert_input( const matrix_type * PC, const matrix_type * PC_obs, const double_vector_type * singular_values) { - if ((matrix_get_rows(PC) == matrix_get_rows( PC_obs )) && - (matrix_get_columns(PC_obs) == 1) && - (double_vector_size( singular_values ) >= matrix_get_rows(PC))) - return true; - else - return false; -} - -static void pca_plot_vector_init_data( pca_plot_vector_type * plot_vector , int component, const matrix_type * PC , const matrix_type * PC_obs, const double_vector_type * singular_values) { - int iens; - - for (iens = 0; iens < matrix_get_columns( PC ); iens++) - plot_vector->sim_data[iens] = matrix_iget( PC, component , iens ); - - plot_vector->obs_value = matrix_iget( PC_obs , component , 0 ); - plot_vector->singular_value = double_vector_iget( singular_values , component ); -} - -pca_plot_vector_type * pca_plot_vector_alloc( int component , - const matrix_type * PC , - const matrix_type * PC_obs, - const double_vector_type * singular_values) { - pca_plot_vector_type * plot_vector = NULL; - - if (pca_plot_assert_input( PC , PC_obs , singular_values ) && (component < matrix_get_rows( PC ))) { - - plot_vector = util_malloc( sizeof * plot_vector ); - UTIL_TYPE_ID_INIT( plot_vector , PCA_PLOT_VECTOR_TYPE_ID ); - plot_vector->obs_value = matrix_iget( PC_obs , component , 0 ); - plot_vector->size = matrix_get_columns( PC ); - plot_vector->sim_data = util_calloc( plot_vector->size , sizeof * plot_vector->sim_data ); - pca_plot_vector_init_data( plot_vector , component , PC , PC_obs , singular_values); - } - - return plot_vector; -} - - - -void pca_plot_vector_free( pca_plot_vector_type * plot_vector ) { - free( plot_vector->sim_data ); - free( plot_vector ); -} - - -void pca_plot_vector_free__( void * arg ) { - pca_plot_vector_type * vector = pca_plot_vector_safe_cast( arg ); - pca_plot_vector_free( vector ); -} - - -int pca_plot_vector_get_size( const pca_plot_vector_type * vector ) { - return vector->size; -} - -double pca_plot_vector_get_obs_value( const pca_plot_vector_type * vector ) { - return vector->obs_value; -} - -double pca_plot_vector_get_singular_value( const pca_plot_vector_type * vector ) { - return vector->singular_value; -} - - -double pca_plot_vector_iget_sim_value( const pca_plot_vector_type * vector , int sim_index) { - return vector->sim_data[ sim_index ]; -} diff --git a/ThirdParty/Ert/libenkf/src/plain_driver.c b/ThirdParty/Ert/libenkf/src/plain_driver.c deleted file mode 100644 index 56e738617e..0000000000 --- a/ThirdParty/Ert/libenkf/src/plain_driver.c +++ /dev/null @@ -1,273 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'plain_driver.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include - - -/** - The actual path to a stored node can be divided in three parts: - - - /some/path/in/the/filesystem/CurrentDirectory/%03d/mem%03d/Analyzed/%s - |<--------- 1 ------------->|<----- 2 ------>|<-------- 3 ---------->| - - 1: This is root path of the enkf_fs filesystem. This is the path - specified with the ENS_PATH configuration variable in the - enkf_config system. - - 2: The "directory" is a sub indexing under the root path. Typicall - use of this is to differentiate between the enkf assimalition, - various forward runs, smoother solutions and so on. - - 3. The part with the %d variables in is the final storage - hierarchy, where the first the replacement (%d,%d,%s) -> - (report_step , iens, key) is done on run_time. - -*/ - - -struct plain_driver_struct { - FS_DRIVER_FIELDS; - int __id; - path_fmt_type * node_path; - path_fmt_type * vector_path; - /* ---------------------------*/ - char * mount_point; - char * node_fmt; - char * vector_fmt; -}; - - - -static void plain_driver_assert_cast(plain_driver_type * plain_driver) { - if (plain_driver->__id != PLAIN_DRIVER_ID) - util_abort("%s: internal error - cast failed - aborting \n",__func__); -} - - -static plain_driver_type * plain_driver_safe_cast( void * __driver) { - plain_driver_type * driver = (plain_driver_type *) __driver; - plain_driver_assert_cast(driver); - return driver; -} - - -static void plain_driver_load_node(void * _driver , const char * node_key, int report_step , int iens , buffer_type * buffer) { - plain_driver_type * driver = plain_driver_safe_cast( _driver ); - { - char * filename = path_fmt_alloc_file(driver->node_path , false , report_step , iens , node_key); - - buffer_fread_realloc( buffer , filename ); - free(filename); - } -} - - -static void plain_driver_load_vector(void * _driver , const char * node_key, int iens , buffer_type * buffer) { - plain_driver_type * driver = plain_driver_safe_cast( _driver ); - { - char * filename = path_fmt_alloc_file(driver->vector_path , false , iens , node_key); - - buffer_fread_realloc( buffer , filename ); - free(filename); - } -} - - - - -static void plain_driver_save_node(void * _driver , const char * node_key , int report_step , int iens , buffer_type * buffer) { - plain_driver_type * driver = (plain_driver_type *) _driver; - plain_driver_assert_cast(driver); - { - char * filename = path_fmt_alloc_file(driver->node_path , true , report_step , iens , node_key); - buffer_store( buffer , filename ); - free(filename); - } -} - - -static void plain_driver_save_vector(void * _driver , const char * node_key , int iens , buffer_type * buffer) { - plain_driver_type * driver = (plain_driver_type *) _driver; - plain_driver_assert_cast(driver); - { - char * filename = path_fmt_alloc_file(driver->vector_path , true , iens , node_key); - buffer_store( buffer , filename ); - free(filename); - } -} - - - -void plain_driver_unlink_node(void * _driver , const char * node_key , int report_step , int iens ) { - plain_driver_type * driver = (plain_driver_type *) _driver; - plain_driver_assert_cast(driver); - { - char * filename = path_fmt_alloc_file(driver->node_path , true , report_step , iens , node_key ); - util_unlink_existing(filename); - free(filename); - } -} - -void plain_driver_unlink_vector(void * _driver , const char * node_key , int iens ) { - plain_driver_type * driver = (plain_driver_type *) _driver; - plain_driver_assert_cast(driver); - { - char * filename = path_fmt_alloc_file(driver->vector_path , true , iens , node_key ); - util_unlink_existing(filename); - free(filename); - } -} - - -/** - Observe that the semantics is fundamentally different between - plain_driver_paramater_has_node, and plain_driver_load_node: - - * When (trying to) load a node the function will try previous report steps - all the way back to the first report step. - - * The has_node function will _not_ go back to earlier report steps, but - instead return false if the report_step we ask for is not present. -*/ - -bool plain_driver_has_node(void * _driver , const char * node_key , int report_step , int iens ) { - plain_driver_type * driver = (plain_driver_type *) _driver; - plain_driver_assert_cast(driver); - { - bool has_node; - char * filename = path_fmt_alloc_file(driver->node_path , true , report_step , iens , node_key); - if (util_file_exists(filename)) - has_node = true; - else - has_node = false; - free(filename); - return has_node; - } -} - - -bool plain_driver_has_vector(void * _driver , const char * node_key , int iens ) { - plain_driver_type * driver = (plain_driver_type *) _driver; - plain_driver_assert_cast(driver); - { - bool has_node; - char * filename = path_fmt_alloc_file(driver->vector_path , true , iens , node_key); - if (util_file_exists(filename)) - has_node = true; - else - has_node = false; - free(filename); - return has_node; - } -} - - - - -void plain_driver_free(void *_driver) { - plain_driver_type * driver = (plain_driver_type *) _driver; - plain_driver_assert_cast(driver); - - path_fmt_free(driver->node_path); - path_fmt_free(driver->vector_path); - - free( driver->vector_fmt ); - free( driver->node_fmt ); - util_safe_free( driver->mount_point ); - free(driver); -} - - - - -/** - The driver takes a copy of the path object, i.e. it can be deleted - in the calling scope after calling plain_driver_alloc(). - - This is where the various function pointers are initialized. -*/ - -void * plain_driver_alloc(const char * mount_point , const char * node_fmt, const char * vector_fmt) { - plain_driver_type * driver = util_malloc(sizeof * driver ); - { - fs_driver_type * fs_driver = (fs_driver_type *) driver; - fs_driver_init(fs_driver); - } - - driver->load_node = plain_driver_load_node; - driver->save_node = plain_driver_save_node; - driver->unlink_node = plain_driver_unlink_node; - driver->has_node = plain_driver_has_node; - - driver->load_vector = plain_driver_load_vector; - driver->save_vector = plain_driver_save_vector; - driver->unlink_vector = plain_driver_unlink_vector; - driver->has_vector = plain_driver_has_vector; - - driver->fsync_driver = NULL; - driver->free_driver = plain_driver_free; - driver->mount_point = util_alloc_string_copy( mount_point ); - driver->node_fmt = util_alloc_sprintf( "%s%c%s" , mount_point , UTIL_PATH_SEP_CHAR , node_fmt ); - driver->vector_fmt = util_alloc_sprintf( "%s%c%s" , mount_point , UTIL_PATH_SEP_CHAR , vector_fmt ); - - driver->node_path = path_fmt_alloc_directory_fmt( driver->node_fmt ); - driver->vector_path = path_fmt_alloc_directory_fmt( driver->vector_fmt ); - driver->__id = PLAIN_DRIVER_ID; - return driver; -} - - -void plain_driver_create_fs( FILE * stream , fs_driver_enum driver_type , const char * node_fmt , const char * vector_fmt) { - util_fwrite_int(driver_type , stream ); - util_fwrite_string(node_fmt , stream); - util_fwrite_string(vector_fmt , stream); -} - - -/** - The two integers from the mount info have already been read at the enkf_fs level. -*/ -void * plain_driver_open(FILE * fstab_stream , const char * mount_point) { - char * node_fmt = util_fread_alloc_string( fstab_stream ); - char * vector_fmt = util_fread_alloc_string( fstab_stream ); - plain_driver_type * driver = plain_driver_alloc( mount_point , node_fmt , vector_fmt ); - free(node_fmt); - free(vector_fmt); - return driver; -} - - - -void plain_driver_fskip(FILE * fstab_stream ) { - char * node_fmt = util_fread_alloc_string( fstab_stream ); - char * vector_fmt = util_fread_alloc_string( fstab_stream ); - free(node_fmt); - free(vector_fmt); -} diff --git a/ThirdParty/Ert/libenkf/src/plain_driver_obs.c b/ThirdParty/Ert/libenkf/src/plain_driver_obs.c deleted file mode 100644 index e6029d0324..0000000000 --- a/ThirdParty/Ert/libenkf/src/plain_driver_obs.c +++ /dev/null @@ -1,186 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'plain_driver_obs.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include -#include -#include - - - -struct plain_driver_obs_struct { - BASIC_OBS_DRIVER_FIELDS; - int __id; - path_fmt_type * path; /* With one embedded %d format character which is replaced with report_step on runtime. */ -}; - - - - - - - -static plain_driver_obs_type * plain_driver_obs_safe_cast(void * _driver) { - plain_driver_obs_type * driver = (plain_driver_obs_type *) _driver; - - if (driver->__id != PLAIN_DRIVER_OBS_ID) - util_abort("%s: internal error - cast failed - aborting \n",__func__); - - return driver; -} - - - - -static char * plain_driver_obs_alloc_filename(const plain_driver_obs_type * driver , int report_step , const char * key, bool auto_mkdir) { - return path_fmt_alloc_file(driver->path , auto_mkdir , report_step , key); -} - - - -void plain_driver_obs_load_node(void * _driver , int report_step , obs_node_type * node) { - plain_driver_obs_type * driver = plain_driver_obs_safe_cast(_driver); - { - char * filename = plain_driver_obs_alloc_filename(driver , report_step , obs_node_get_key(node) , false); - FILE * stream = util_fopen(filename , "r"); - - obs_node_fread(node , stream , report_step); - - fclose(stream); - free(filename); - } -} - - -void plain_driver_obs_unlink_node(void * _driver , int report_step , obs_node_type * node) { - plain_driver_obs_type * driver = plain_driver_obs_safe_cast(_driver); - { - char * filename = plain_driver_obs_alloc_filename(driver , report_step , obs_node_get_key(node) , false); - util_unlink_existing(filename); - free(filename); - } -} - - -void plain_driver_obs_save_node(void * _driver , int report_step , obs_node_type * node) { - plain_driver_obs_type * driver = plain_driver_obs_safe_cast(_driver); - { - char * filename = plain_driver_obs_alloc_filename(driver , report_step , obs_node_get_key(node) , true); - FILE * stream = util_fopen(filename , "w"); - bool data_written = obs_node_fwrite(node , stream , report_step); - fclose(stream); - if (!data_written) - util_unlink_existing( filename ); /* remove empty files. */ - free(filename); - } -} - - -/** - Return true if we have a on-disk representation of the node. -*/ - -bool plain_driver_obs_has_node(void * _driver , int report_step , const char * key) { - plain_driver_obs_type * driver = plain_driver_obs_safe_cast(_driver); - { - bool has_node; - char * filename = plain_driver_obs_alloc_filename(driver , report_step , key , false); - if (util_file_exists(filename)) - has_node = true; - else - has_node = false; - free(filename); - return has_node; - } -} - - - - -void plain_driver_obs_free(void *_driver) { - plain_driver_obs_type * driver = plain_driver_obs_safe_cast(_driver); - path_fmt_free(driver->path); - free(driver); -} - - - -void plain_driver_obs_README(const char * root_path) { - char * README_file = util_alloc_full_path(root_path , "README.txt"); - util_make_path(root_path); - { - FILE * stream = util_fopen(README_file , "w"); - fprintf(stream,"This is the root directory of the EnKF ensemble filesystem. All files contain one enkf_node \n"); - fprintf(stream,"instance. The files are binary, and compressed with zlib (util_fwrite_compressed).\n"); - fclose(stream); - } - free(README_file); -} - - -/* - The driver takes a copy of the path object, i.e. it can be deleted - in the calling scope after calling plain_driver_obs_alloc(). -*/ -void * plain_driver_obs_alloc(const char * root_path , const char * obs_path ) { - plain_driver_obs_type * driver = util_malloc(sizeof * driver ); - driver->load = plain_driver_obs_load_node; - driver->save = plain_driver_obs_save_node; - driver->has_node = plain_driver_obs_has_node; - driver->free_driver = plain_driver_obs_free; - driver->unlink_node = plain_driver_obs_unlink_node; - { - char *path; - - if (root_path != NULL) - path = util_alloc_full_path(root_path , obs_path); - else - path = util_alloc_string_copy(obs_path); - - driver->path = path_fmt_alloc_directory_fmt( path ); - free(path); - } - driver->__id = PLAIN_DRIVER_OBS_ID; - { - basic_obs_driver_type * basic_driver = (basic_obs_driver_type *) driver; - basic_obs_driver_init(basic_driver); - return basic_driver; - } -} - - -void plain_driver_obs_fwrite_mount_info(FILE * stream , const char * obs_fmt ) { - util_fwrite_int(OBS_DRIVER , stream); - util_fwrite_int(PLAIN_DRIVER_OBS_ID , stream); - util_fwrite_string(obs_fmt , stream); - -} - -/** - The two integers from the mount info have already been read at the enkf_fs level. -*/ -plain_driver_obs_type * plain_driver_obs_fread_alloc(const char * root_path , FILE * stream) { - char * obs_fmt = util_fread_alloc_string( stream ); - plain_driver_obs_type * driver = plain_driver_obs_alloc(root_path , obs_fmt); - free(obs_fmt); - return driver; -} - diff --git a/ThirdParty/Ert/libenkf/src/plot_config.c b/ThirdParty/Ert/libenkf/src/plot_config.c deleted file mode 100644 index 4cc95171f2..0000000000 --- a/ThirdParty/Ert/libenkf/src/plot_config.c +++ /dev/null @@ -1,73 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'plot_config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include - -#include - -#include -#include - -#include -#include -#include - -/** - Struct holding basic information used when plotting. -*/ - -struct plot_config_struct { - char * plot_path; /* All the plots will be saved as xxxx files in this directory. */ -}; - -void plot_config_set_path(plot_config_type * plot_config , const char * plot_path) { - plot_config->plot_path = util_realloc_string_copy(plot_config->plot_path , plot_path); -} - -const char * plot_config_get_path(const plot_config_type * plot_config ) { - return plot_config->plot_path; -} - -void plot_config_free( plot_config_type * plot_config) { - free(plot_config->plot_path); - free(plot_config); -} - - -/** - The plot_config object is instantiated with the default values from enkf_defaults.h -*/ -plot_config_type * plot_config_alloc_default() { - plot_config_type * info = util_malloc( sizeof * info ); - info->plot_path = NULL; - plot_config_set_path(info , DEFAULT_PLOT_PATH ); - return info; -} - - -void plot_config_init(plot_config_type * plot_config , const config_content_type * config ) { - if (config_content_has_item( config , PLOT_PATH_KEY)) - plot_config_set_path( plot_config , config_content_get_value( config , PLOT_PATH_KEY )); -} - - -void plot_config_add_config_items( config_parser_type * config ) { - config_add_key_value(config , PLOT_PATH_KEY , false , CONFIG_STRING); -} - - diff --git a/ThirdParty/Ert/libenkf/src/ranking_table.c b/ThirdParty/Ert/libenkf/src/ranking_table.c deleted file mode 100644 index f7801c0474..0000000000 --- a/ThirdParty/Ert/libenkf/src/ranking_table.c +++ /dev/null @@ -1,163 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'ranking_table.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - - -#define RANKING_TABLE_TYPE_ID 78420651 - -struct ranking_table_struct { - UTIL_TYPE_ID_DECLARATION; - int ens_size; // Will not really handle ensemble resize events - hash_type * ranking_table; -}; - - - -void ranking_table_free( ranking_table_type * table ) { - hash_free( table->ranking_table ); - free( table ); -} - - - -void ranking_table_set_ens_size( ranking_table_type * table, int ens_size) { - table->ens_size = ens_size; -} - -ranking_table_type * ranking_table_alloc( int ens_size ) { - ranking_table_type * table = util_malloc( sizeof * table ); - table->ranking_table = hash_alloc(); - return table; -} - - -void ranking_table_add_data_ranking( ranking_table_type * ranking_table , bool sort_increasing , const char * ranking_key , const char * user_key , const char * key_index , - enkf_fs_type * fs , const enkf_config_node_type * config_node , int step) { - - data_ranking_type * ranking = data_ranking_alloc( sort_increasing , ranking_table->ens_size , user_key , key_index , fs , config_node , step ); - hash_insert_hash_owned_ref( ranking_table->ranking_table , ranking_key , ranking, data_ranking_free__ ); -} - - - -void ranking_table_add_misfit_ranking( ranking_table_type * ranking_table , const misfit_ensemble_type * misfit_ensemble , const stringlist_type * obs_keys , const int_vector_type * steps , const char * ranking_key) { - misfit_ranking_type * ranking = misfit_ranking_alloc( misfit_ensemble , obs_keys , steps , ranking_key ); - hash_insert_hash_owned_ref( ranking_table->ranking_table , ranking_key , ranking , misfit_ranking_free__ ); -} - - - -bool ranking_table_has_ranking( const ranking_table_type * ranking_table , const char * ranking_key ) { - return hash_has_key( ranking_table->ranking_table , ranking_key ); -} - - -int ranking_table_get_size( const ranking_table_type * ranking_table ) { - return hash_get_size( ranking_table->ranking_table ); -} - - - -bool ranking_table_display_ranking( const ranking_table_type * ranking_table , const char * ranking_key ) { - if (hash_has_key( ranking_table->ranking_table , ranking_key)) { - void * ranking = hash_get( ranking_table->ranking_table , ranking_key ); - - if (data_ranking_is_instance( ranking )) { - data_ranking_type * data_ranking = data_ranking_safe_cast( ranking ); - data_ranking_display( data_ranking , stdout ); - } else if (misfit_ranking_is_instance( ranking )) { - misfit_ranking_type * misfit_ranking = misfit_ranking_safe_cast( ranking ); - misfit_ranking_display( misfit_ranking , stdout ); - } else - util_abort("%s: internal error \n",__func__); - - - return true; - } else - return false; -} - - -bool ranking_table_fwrite_ranking( const ranking_table_type * ranking_table , const char * ranking_key, const char * filename ) { - if (hash_has_key( ranking_table->ranking_table , ranking_key)) { - void * ranking = hash_get( ranking_table->ranking_table , ranking_key ); - - FILE * file = util_mkdir_fopen(filename, "w"); - - if (data_ranking_is_instance( ranking )) { - data_ranking_type * data_ranking = data_ranking_safe_cast( ranking ); - data_ranking_display( data_ranking , file ); - } else if (misfit_ranking_is_instance( ranking )) { - misfit_ranking_type * misfit_ranking = misfit_ranking_safe_cast( ranking ); - misfit_ranking_display( misfit_ranking , file ); - } else - util_abort("%s: internal error \n",__func__); - - util_fclose(file); - - return true; - } else - return false; -} - - - - -const perm_vector_type * ranking_table_get_permutation( const ranking_table_type * ranking_table , const char * ranking_key) { - if (hash_has_key( ranking_table->ranking_table , ranking_key)) { - void * ranking = hash_get( ranking_table->ranking_table , ranking_key ); - - if (data_ranking_is_instance( ranking )) { - data_ranking_type * data_ranking = data_ranking_safe_cast( ranking ); - return data_ranking_get_permutation( data_ranking ); - } else if (misfit_ranking_is_instance( ranking )) { - misfit_ranking_type * misfit_ranking = misfit_ranking_safe_cast( ranking ); - return misfit_ranking_get_permutation( misfit_ranking ); - } else { - util_abort("%s: internal error \n"); - return NULL; - } - - } else - return NULL; -} - - - - diff --git a/ThirdParty/Ert/libenkf/src/readme.overview b/ThirdParty/Ert/libenkf/src/readme.overview deleted file mode 100644 index 5b3c3dff52..0000000000 --- a/ThirdParty/Ert/libenkf/src/readme.overview +++ /dev/null @@ -1,55 +0,0 @@ -The EnKF functionality is organized in xxx libraries with different -functionalities. The different libraries depend on eachother, and the -libraries must be built in correct order. The dependencies is as -follows: - -libhash : -libutil : libhash -libecl : libhash libutil -librms : libecl libutil libhash -libsched : libecl linutil libhash -libenkf : libecl libsched librm linutil libhash - - -libhash: This library implements the classes hash_type, set_type and - list_type. - -libutil: This library is a collection utility routines. Observe that - this library only implements routines, and not statefull - objects. - -libecl: This library implements functions for reading/writing ECLIPSE - restart/summary/init/grid files. - -libsched: This library implements a basic SCHEDULE file parser. - -librms: This library implements (basic) reader and writer for binary - RMS ROFF files. - -libenkf: This library implements various high level objects for EnKF - functionality. - ------------------------------------------------------------------ - -All the makefiles start with the statement: - -include "path_config" - -The file path_config is *not* under version control, this is on -purpose because every user can/should have a private confiiguration of -paths. The file path_config should define make-variables for the -location of all the libraries, this is an example of a valid -path-config file: - - LIBHASH_HOME = /h/a152128/EnKF/EnKF/libhash - LIBUTIL_HOME = /h/a152128/EnKF/EnKF/libutil - LIBSCHED_HOME = /h/a152128/EnKF/EnKF/libsched - LIBRMS_HOME = /h/a152128/EnKF/EnKF/librms - LIBECL_HOME = /h/a152128/EnKF/EnKF/libecl - LIBENKF_HOME = /h/a152128/EnKF/EnKF/libenkf - -In this example all libraries have a common path prefix, that is not -a requirement. - - - diff --git a/ThirdParty/Ert/libenkf/src/rng_config.c b/ThirdParty/Ert/libenkf/src/rng_config.c deleted file mode 100644 index b5a0af25ea..0000000000 --- a/ThirdParty/Ert/libenkf/src/rng_config.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'rng_config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include - -#include -#include -#include -#include - -#include -#include - -#include -#include -#include - - -struct rng_config_struct { - rng_alg_type type; - char * seed_load_file; /* NULL: Do not store the seed. */ - char * seed_store_file; /* NULL: Do not load a seed from file. */ -}; - - - -void rng_config_set_type( rng_config_type * rng_config , rng_alg_type type) { - rng_config->type = type; -} - -rng_alg_type rng_config_get_type(const rng_config_type * rng_config ) { - return rng_config->type; -} - -const char * rng_config_get_seed_load_file( const rng_config_type * rng_config ) { - return rng_config->seed_load_file; -} - -void rng_config_set_seed_load_file( rng_config_type * rng_config , const char * seed_load_file) { - rng_config->seed_load_file = util_realloc_string_copy( rng_config->seed_load_file , seed_load_file); -} - -const char * rng_config_get_seed_store_file( const rng_config_type * rng_config ) { - return rng_config->seed_store_file; -} - -void rng_config_set_seed_store_file( rng_config_type * rng_config , const char * seed_store_file) { - rng_config->seed_store_file = util_realloc_string_copy( rng_config->seed_store_file , seed_store_file); -} - - -rng_config_type * rng_config_alloc( ) { - rng_config_type * rng_config = util_malloc( sizeof * rng_config); - - rng_config_set_type( rng_config , MZRAN ); /* Only type ... */ - rng_config->seed_store_file = NULL; - rng_config->seed_load_file = NULL; - - return rng_config; -} - - - -void rng_config_free( rng_config_type * rng) { - util_safe_free( rng->seed_load_file ); - util_safe_free( rng->seed_store_file ); - free( rng ); -} - -rng_type * rng_config_init_rng__(const rng_config_type * rng_config, rng_type * rng) { - const char * seed_load = rng_config_get_seed_load_file( rng_config ); - const char * seed_store = rng_config_get_seed_store_file( rng_config ); - - if (seed_load != NULL) { - if (util_file_exists( seed_load)) - rng_load_state( rng , seed_load ); - else { - /* - In the special case that seed_load == seed_store; we accept a - seed_load argument pointing to a non-existant file. - */ - if (seed_store) { - if (util_string_equal( seed_store , seed_load)) - rng_init( rng , INIT_DEV_URANDOM ); - else - util_abort("%s: tried to load random seed from non-existing file:%s \n",__func__ , seed_load); - } - } - } else - rng_init( rng , INIT_DEV_URANDOM ); - - - if (seed_store != NULL) - rng_save_state( rng , seed_store ); - - return rng; -} - -rng_type * rng_config_alloc_init_rng( const rng_config_type * rng_config ) { - rng_type * rng = rng_alloc(rng_config_get_type(rng_config) , INIT_DEFAULT); - return rng_config_init_rng__(rng_config, rng); -} - - -void rng_config_init_rng( const rng_config_type * rng_config, rng_type * rng ) { - rng_config_init_rng__(rng_config, rng); -} - - - -/*****************************************************************/ - -void rng_config_add_config_items( config_parser_type * config ) { - config_schema_item_type * item; - - item= config_add_schema_item( config , STORE_SEED_KEY , false); - config_schema_item_set_argc_minmax(item , 1 , 1 ); - config_schema_item_iset_type( item , 0 , CONFIG_PATH ); - - item = config_add_schema_item( config , LOAD_SEED_KEY , false ); - config_schema_item_set_argc_minmax(item , 1 , 1 ); - config_schema_item_iset_type( item , 0 , CONFIG_PATH ); -} - - -void rng_config_init( rng_config_type * rng_config , config_content_type * config ) { - if (config_content_has_item( config , STORE_SEED_KEY )) - rng_config_set_seed_store_file( rng_config , config_content_iget(config , STORE_SEED_KEY ,0,0)); - - if (config_content_has_item( config , LOAD_SEED_KEY )) - rng_config_set_seed_load_file( rng_config , config_content_iget(config , LOAD_SEED_KEY ,0,0)); -} - - -void rng_config_fprintf_config( rng_config_type * rng_config , FILE * stream ) { - if (rng_config->seed_load_file != NULL) { - fprintf( stream , CONFIG_KEY_FORMAT , LOAD_SEED_KEY ); - fprintf( stream , CONFIG_ENDVALUE_FORMAT , rng_config->seed_load_file); - } - - if (rng_config->seed_store_file != NULL) { - fprintf( stream , CONFIG_KEY_FORMAT , STORE_SEED_KEY ); - fprintf( stream , CONFIG_ENDVALUE_FORMAT , rng_config->seed_store_file); - } -} diff --git a/ThirdParty/Ert/libenkf/src/run_arg.c b/ThirdParty/Ert/libenkf/src/run_arg.c deleted file mode 100644 index e873aef6af..0000000000 --- a/ThirdParty/Ert/libenkf/src/run_arg.c +++ /dev/null @@ -1,250 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'run_arg.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include -#include - -#include -#include -#include - - -#define RUN_ARG_TYPE_ID 66143287 -#define INVALID_QUEUE_INDEX -99 - - -struct run_arg_struct { - UTIL_TYPE_ID_DECLARATION; - int iens; - int max_internal_submit; /* How many times the enkf_state object should try to resubmit when the queueu has said everything is OK - but the load fails. */ - int num_internal_submit; - int load_start; /* When loading back results - start at this step. */ - int step1; /* The forward model is integrated: step1 -> step2 */ - int step2; - int iter; - char * run_path; /* The currently used runpath - is realloced / freed for every step. */ - run_mode_type run_mode; /* What type of run this is */ - int queue_index; /* The job will in general have a different index in the queue than the iens number. */ - - enkf_fs_type * init_fs; - enkf_fs_type * result_fs; - enkf_fs_type * update_target_fs; - - /******************************************************************/ - /* Return value - set by the called routine!! */ - run_status_type run_status; -}; - - -UTIL_SAFE_CAST_FUNCTION( run_arg , RUN_ARG_TYPE_ID ) -UTIL_IS_INSTANCE_FUNCTION( run_arg , RUN_ARG_TYPE_ID ) - - -static run_arg_type * run_arg_alloc(enkf_fs_type * init_fs , - enkf_fs_type * result_fs , - enkf_fs_type * update_target_fs , - int iens , - run_mode_type run_mode , - int step1 , - int step2 , - int iter , - const char * runpath) { - if ((result_fs != NULL) && (result_fs == update_target_fs)) - util_abort("%s: internal error - can not have result_fs == update_target_fs \n",__func__); - { - run_arg_type * run_arg = util_malloc(sizeof * run_arg ); - UTIL_TYPE_ID_INIT(run_arg , RUN_ARG_TYPE_ID); - - run_arg->init_fs = init_fs; - run_arg->result_fs = result_fs; - run_arg->update_target_fs = update_target_fs; - - run_arg->iens = iens; - run_arg->run_mode = run_mode; - run_arg->step1 = step1; - run_arg->step2 = step2; - run_arg->iter = iter; - run_arg->run_path = util_alloc_abs_path( runpath ); - run_arg->num_internal_submit = 0; - run_arg->queue_index = INVALID_QUEUE_INDEX; - run_arg->run_status = JOB_NOT_STARTED; - - if (step1 == 0) - run_arg->load_start = 1; - else - run_arg->load_start = step1; - - return run_arg; - } -} - - - - - -run_arg_type * run_arg_alloc_ENSEMBLE_EXPERIMENT(enkf_fs_type * fs , int iens , int iter , const char * runpath) { - return run_arg_alloc(fs , fs , NULL , iens , ENSEMBLE_EXPERIMENT , 0 , 0 , iter , runpath); -} - - -run_arg_type * run_arg_alloc_INIT_ONLY(enkf_fs_type * init_fs , int iens , int iter , const char * runpath) { - return run_arg_alloc(init_fs , NULL , NULL , iens , INIT_ONLY , 0 , 0 , iter , runpath); -} - - -run_arg_type * run_arg_alloc_SMOOTHER_RUN(enkf_fs_type * simulate_fs , enkf_fs_type * update_target_fs , int iens , int iter , const char * runpath) { - return run_arg_alloc(simulate_fs , simulate_fs , update_target_fs , iens , ENSEMBLE_EXPERIMENT , 0 , 0 , iter , runpath); -} - - - -void run_arg_free(run_arg_type * run_arg) { - util_safe_free(run_arg->run_path); - free(run_arg); -} - - -void run_arg_free__(void * arg) { - run_arg_type * run_arg = run_arg_safe_cast( arg ); - run_arg_free( run_arg ); -} - - -void run_arg_complete_run(run_arg_type * run_arg) { - if (run_arg->run_status == JOB_RUN_OK) { - util_safe_free(run_arg->run_path); - run_arg->run_path = NULL; - } -} - - - -void run_arg_increase_submit_count( run_arg_type * run_arg ) { - run_arg->num_internal_submit++; -} - - -void run_arg_set_queue_index( run_arg_type * run_arg , int queue_index) { - if (run_arg->queue_index == INVALID_QUEUE_INDEX) - run_arg->queue_index = queue_index; - else - util_abort("%s: attempt to reset run_arg->queue_index. These objects should not be recycled\n",__func__); -} - - - -const char * run_arg_get_runpath( const run_arg_type * run_arg) { - return run_arg->run_path; -} - - - - -int run_arg_get_iter( const run_arg_type * run_arg ) { - return run_arg->iter; -} - - -int run_arg_get_iens( const run_arg_type * run_arg ) { - return run_arg->iens; -} - - -int run_arg_get_load_start( const run_arg_type * run_arg ) { - return run_arg->load_start; -} - - -int run_arg_get_step2( const run_arg_type * run_arg ) { - return run_arg->step2; -} - -bool run_arg_can_retry( const run_arg_type * run_arg ) { - if (run_arg->num_internal_submit < run_arg->max_internal_submit) - return true; - else - return false; -} - - -int run_arg_get_step1( const run_arg_type * run_arg ) { - return run_arg->step1; -} - - -run_mode_type run_arg_get_run_mode( const run_arg_type * run_arg ) { - return run_arg->run_mode; -} - - -int run_arg_get_queue_index( const run_arg_type * run_arg ) { - if (run_arg->queue_index == INVALID_QUEUE_INDEX) - util_abort("%s: sorry internal error - asking for the queue_index in a not-initialized run_arg object.\n" , __func__); - - return run_arg->queue_index; -} - -bool run_arg_is_submitted( const run_arg_type * run_arg ) { - if (run_arg->queue_index == INVALID_QUEUE_INDEX) - return false; - else - return true; -} - - -run_status_type run_arg_get_run_status( const run_arg_type * run_arg) { - return run_arg->run_status; -} - - -void run_arg_set_run_status( run_arg_type * run_arg , run_status_type run_status) { - run_arg->run_status = run_status; -} - - - -enkf_fs_type * run_arg_get_init_fs(const run_arg_type * run_arg) { - if (run_arg->init_fs) - return run_arg->init_fs; - else { - util_abort("%s: internal error - tried to access run_arg->init_fs when init_fs == NULL\n",__func__); - return NULL; - } -} - - -enkf_fs_type * run_arg_get_result_fs(const run_arg_type * run_arg) { - if (run_arg->result_fs) - return run_arg->result_fs; - else { - util_abort("%s: internal error - tried to access run_arg->result_fs when result_fs == NULL\n",__func__); - return NULL; - } -} - - -enkf_fs_type * run_arg_get_update_target_fs(const run_arg_type * run_arg) { - if (run_arg->update_target_fs) - return run_arg->update_target_fs; - else { - util_abort("%s: internal error - tried to access run_arg->update_target_fs when update_target_fs == NULL\n",__func__); - return NULL; - } -} diff --git a/ThirdParty/Ert/libenkf/src/runpath_list.c b/ThirdParty/Ert/libenkf/src/runpath_list.c deleted file mode 100644 index 75e621231d..0000000000 --- a/ThirdParty/Ert/libenkf/src/runpath_list.c +++ /dev/null @@ -1,236 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - The file 'runpath_list.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include -#include -#include - -#include -#include -#include - -#include - -typedef struct runpath_node_struct runpath_node_type; - - -struct runpath_list_struct { - pthread_rwlock_t lock; - vector_type * list; - char * line_fmt; // Format string : Values are in the order: (iens , runpath , basename) - char * export_file; -}; - - -#define RUNPATH_NODE_TYPE_ID 661400541 -struct runpath_node_struct { - UTIL_TYPE_ID_DECLARATION; - int iens; - int iter; - char * runpath; - char * basename; -}; - - -/*****************************************************************/ - - UTIL_SAFE_CAST_FUNCTION( runpath_node , RUNPATH_NODE_TYPE_ID ) - UTIL_SAFE_CAST_FUNCTION_CONST( runpath_node , RUNPATH_NODE_TYPE_ID ) - - static runpath_node_type * runpath_node_alloc( int iens, int iter, const char * runpath , const char * basename) { - runpath_node_type * node = util_malloc( sizeof * node ); - UTIL_TYPE_ID_INIT( node , RUNPATH_NODE_TYPE_ID ); - - node->iens = iens; - node->iter = iter; - node->runpath = util_alloc_string_copy( runpath ); - node->basename = util_alloc_string_copy( basename ); - - return node; - } - - -static void runpath_node_free( runpath_node_type * node ) { - free(node->basename); - free(node->runpath); - free(node); -} - - -static void runpath_node_free__( void * arg ) { - runpath_node_type * node = runpath_node_safe_cast( arg ); - runpath_node_free( node ); -} - - -/* - The comparison is first based on iteration number and then on iens. -*/ - -static int runpath_node_cmp( const void * arg1 , const void * arg2) { - const runpath_node_type * node1 = runpath_node_safe_cast_const( arg1 ); - const runpath_node_type * node2 = runpath_node_safe_cast_const( arg2 ); - { - if (node1->iter > node2->iter) - return 1; - else if (node1->iter < node2->iter) - return -1; - else { - /* Iteration number is the same */ - if (node1->iens > node2->iens) - return 1; - else if (node1->iens < node2->iens) - return -1; - else - return 0; - } - } -} - - -static void runpath_node_fprintf( const runpath_node_type * node , const char * line_fmt , FILE * stream) { - fprintf(stream , line_fmt , node->iens, node->runpath , node->basename, node->iter); -} - - -/*****************************************************************/ - - -runpath_list_type * runpath_list_alloc(const char * export_file) { - runpath_list_type * list = util_malloc( sizeof * list ); - list->list = vector_alloc_new(); - list->line_fmt = NULL; - list->export_file = util_alloc_string_copy( export_file ); - pthread_rwlock_init( &list->lock , NULL ); - return list; -} - - -void runpath_list_free( runpath_list_type * list ) { - vector_free( list->list ); - util_safe_free( list->line_fmt ); - util_safe_free( list->export_file); - free( list ); -} - - -int runpath_list_size( const runpath_list_type * list ) { - return vector_get_size( list->list ); -} - - -void runpath_list_add( runpath_list_type * list , int iens , int iter, const char * runpath , const char * basename) { - runpath_node_type * node = runpath_node_alloc( iens , iter, runpath , basename ); - - pthread_rwlock_wrlock( &list->lock ); - { - vector_append_owned_ref( list->list , node , runpath_node_free__ ); - } - pthread_rwlock_unlock( &list->lock ); -} - - -void runpath_list_clear( runpath_list_type * list ) { - pthread_rwlock_wrlock( &list->lock ); - { - vector_clear( list->list ); - } - pthread_rwlock_unlock( &list->lock ); -} - -/*****************************************************************/ - -void runpath_list_set_line_fmt( runpath_list_type * list , const char * line_fmt ) { - list->line_fmt = util_realloc_string_copy( list->line_fmt , line_fmt ); -} - - -const char * runpath_list_get_line_fmt( const runpath_list_type * list ) { - if (list->line_fmt == NULL) - return RUNPATH_LIST_DEFAULT_LINE_FMT; - else - return list->line_fmt; -} - -/*****************************************************************/ - - -static const runpath_node_type * runpath_list_iget_node__( const runpath_list_type * list , int index) { - return vector_iget_const( list->list , index ); -} - - - -static const runpath_node_type * runpath_list_iget_node( runpath_list_type * list , int index) { - const runpath_node_type * node; - { - pthread_rwlock_rdlock( &list->lock ); - node = runpath_list_iget_node__( list , index ); - pthread_rwlock_unlock( &list->lock ); - } - return node; -} - - -int runpath_list_iget_iens( runpath_list_type * list , int index) { - const runpath_node_type * node = runpath_list_iget_node( list , index ); - return node->iens; -} - -int runpath_list_iget_iter( runpath_list_type * list , int index) { - const runpath_node_type * node = runpath_list_iget_node( list , index ); - return node->iter; -} - - -char * runpath_list_iget_runpath( runpath_list_type * list , int index) { - const runpath_node_type * node = runpath_list_iget_node( list , index ); - return node->runpath; -} - -char * runpath_list_iget_basename( runpath_list_type * list , int index) { - const runpath_node_type * node = runpath_list_iget_node( list , index ); - return node->basename; -} - -void runpath_list_fprintf(runpath_list_type * list ) { - pthread_rwlock_rdlock( &list->lock ); - { - FILE * stream = util_mkdir_fopen( list->export_file , "w"); - const char * line_fmt = runpath_list_get_line_fmt( list ); - int index; - vector_sort( list->list , runpath_node_cmp ); - for (index =0; index < vector_get_size( list->list ); index++) { - const runpath_node_type * node = runpath_list_iget_node__( list , index ); - runpath_node_fprintf( node , line_fmt , stream ); - } - fclose( stream ); - } - pthread_rwlock_unlock( &list->lock ); -} - - -const char * runpath_list_get_export_file( const runpath_list_type * list ) { - return list->export_file; -} - - -void runpath_list_set_export_file( runpath_list_type * list , const char * export_file ) { - list->export_file = util_realloc_string_copy( list->export_file , export_file ); -} diff --git a/ThirdParty/Ert/libenkf/src/scalar_config.c b/ThirdParty/Ert/libenkf/src/scalar_config.c deleted file mode 100644 index 27ff8c09ef..0000000000 --- a/ThirdParty/Ert/libenkf/src/scalar_config.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'scalar_config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include - -#define SCALAR_CONFIG_TYPE_ID 877065 - -struct scalar_config_struct { - UTIL_TYPE_ID_DECLARATION; - int data_size; - active_list_type * active_list; - - trans_func_type ** transform; -}; - - - - -scalar_config_type * scalar_config_alloc_empty(int size) { - scalar_config_type *scalar_config = util_malloc(sizeof *scalar_config); - UTIL_TYPE_ID_INIT( scalar_config , SCALAR_CONFIG_TYPE_ID ); - scalar_config->data_size = size; - scalar_config->active_list = active_list_alloc( ); - - scalar_config->transform = util_calloc(scalar_config->data_size , sizeof * scalar_config->transform ); - return scalar_config; -} - - - -void scalar_config_transform(const scalar_config_type * config , const double * input_data , double *output_data) { - int index; - for (index = 0; index < config->data_size; index++) - output_data[index] = trans_func_eval( config->transform[index] , input_data[index] ); -} - - - - - - -void scalar_config_fscanf_line(scalar_config_type * config , int line_nr , FILE * stream) { - config->transform[line_nr] = trans_func_fscanf_alloc( stream ); -} - - - -void scalar_config_free(scalar_config_type * scalar_config) { - int i; - active_list_free(scalar_config->active_list); - for (i=0; i < scalar_config->data_size; i++) - trans_func_free( scalar_config->transform[i] ); - - util_safe_free( scalar_config->transform ); - free(scalar_config); -} - - - -/*****************************************************************/ - -SAFE_CAST(scalar_config , SCALAR_CONFIG_TYPE_ID) -GET_DATA_SIZE(scalar); -GET_ACTIVE_LIST(scalar); -VOID_FREE(scalar_config); diff --git a/ThirdParty/Ert/libenkf/src/site_config.c b/ThirdParty/Ert/libenkf/src/site_config.c deleted file mode 100644 index a5054adfdb..0000000000 --- a/ThirdParty/Ert/libenkf/src/site_config.c +++ /dev/null @@ -1,1015 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'site_config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. - */ - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -/** - This struct contains information which is specific to the site - where this enkf instance is running. Pointers to the fields in this - structure are passed on to e.g. the enkf_state->shared_info object, - but this struct is the *OWNER* of this information, and hence - responsible for booting and deleting these objects. - - The settings held by the site_config object are by default set in - the site-wide configuration file, but they can also be overridden - in the users configuration file. This makes both parsing, - validating and also storing the configuration information a bit - more tricky: - - Parsing: - -------- - When parsing the user configuration file all settings are optional, - that means that the required validation of the config system, can - not be used, instead every get must be preceeded by: - - if (config_content_has_item(config , KEY)) ... - - Furthermore everything is done twice; first with config as a - site-config instance, and later as user-config instance. - - - Saving: - ------- - A setting which originates from the site_config file should not be - stored in the user's config file, but additions/overrides from the - user's config file should of course be saved. This is 'solved' with - many fields having a xxx_site duplicate, where the xxx_site is only - updated during the initial parsing of the site-config file; when - the flag user_mode is set to true the xxx_site fields are not - updated. When saving only fields which are different from their - xxx_site counterpart are stored. - */ - -#define LSF_DRIVER_NAME "LSF" -#define LOCAL_DRIVER_NAME "LOCAL" -#define RSH_DRIVER_NAME "RSH" -#define TORQUE_DRIVER_NAME "TORQUE" - -struct site_config_struct { - ext_joblist_type * joblist; /* The list of external jobs which have been installed. - These jobs will be the parts of the forward model. */ - hash_type * env_variables_user; /* The environment variables set in the user config file. */ - hash_type * env_variables_site; /* The environment variables set in site_config file - not exported. */ - - mode_t umask; - - char * license_root_path; /* The license_root_path value set by the user. */ - char * license_root_path_site; /* The license_root_path value set by the site. */ - char * __license_root_path; /* The license_root_path value actually used - includes a user/pid subdirectory. */ - - hash_type * path_variables_site; /* We store this so we can roll back when all user settings are cleared. */ - stringlist_type * path_variables_user; /* We can update the same path variable several times - i.e. it can not be a hash table. */ - stringlist_type * path_values_user; - - int max_running_lsf_site; - char * lsf_queue_name_site; - char * lsf_request_site; - - int max_running_rsh_site; - char * rsh_command_site; - - int max_running_local_site; - - job_driver_type driver_type; - job_driver_type driver_type_site; - int max_submit; - int max_submit_site; - char * job_script; - char * job_script_site; - - char * manual_url; - char * default_browser; - - queue_driver_type * current_driver; - hash_type * queue_drivers; - - job_queue_type * job_queue; /* The queue instance which will run the external jobs. */ - bool user_mode; - bool search_path; -}; - -void site_config_set_umask(site_config_type * site_config, mode_t new_mask) { - umask(new_mask); - site_config->umask = new_mask; -} - -mode_t site_config_get_umask(const site_config_type * site_config) { - return site_config->umask; -} - -static void site_config_add_queue_driver(site_config_type * site_config, const char * driver_name, queue_driver_type * driver) { - hash_insert_hash_owned_ref(site_config->queue_drivers, driver_name, driver, queue_driver_free__); -} - -static bool site_config_has_queue_driver(const site_config_type * site_config, const char * driver_name) { - return hash_has_key(site_config->queue_drivers, driver_name); -} - -queue_driver_type * site_config_get_queue_driver(const site_config_type * site_config, const char * driver_name) { - return hash_get(site_config->queue_drivers, driver_name); -} - -static void site_config_create_queue_drivers(site_config_type * site_config) { - site_config_add_queue_driver(site_config, LSF_DRIVER_NAME, queue_driver_alloc_LSF(NULL, NULL, NULL)); - site_config_add_queue_driver(site_config, TORQUE_DRIVER_NAME, queue_driver_alloc_TORQUE()); - site_config_add_queue_driver(site_config, RSH_DRIVER_NAME, queue_driver_alloc_RSH(NULL, NULL)); - site_config_add_queue_driver(site_config, LOCAL_DRIVER_NAME, queue_driver_alloc_local()); -} - -static void site_config_set_queue_option(site_config_type * site_config, const char * driver_name, const char * option_key, const char * option_value) { - if (site_config_has_queue_driver(site_config, driver_name)) { - queue_driver_type * driver = site_config_get_queue_driver(site_config, driver_name); - if (!queue_driver_set_option(driver, option_key, option_value)) - fprintf(stderr, "** Warning: Option:%s or its value is not recognized by driver:%s- ignored \n", option_key, driver_name); - } else - fprintf(stderr, "** Warning: Driver:%s not recognized - ignored \n", driver_name); -} - -/** - This site_config object is not really ready for prime time. - */ -site_config_type * site_config_alloc_empty() { - site_config_type * site_config = util_malloc(sizeof * site_config); - - site_config->joblist = ext_joblist_alloc(); - site_config->queue_drivers = hash_alloc(); - - site_config->lsf_queue_name_site = NULL; - site_config->lsf_request_site = NULL; - site_config->rsh_command_site = NULL; - site_config->license_root_path = NULL; - site_config->license_root_path_site = NULL; - site_config->__license_root_path = NULL; - site_config->job_script = NULL; - site_config->job_script_site = NULL; - site_config->manual_url = NULL; - site_config->default_browser = NULL; - site_config->user_mode = false; - site_config->driver_type = NULL_DRIVER; - - site_config->job_queue = job_queue_alloc(DEFAULT_MAX_SUBMIT, "OK", "STATUS", "ERROR"); - site_config->env_variables_user = hash_alloc(); - site_config->env_variables_site = hash_alloc(); - - site_config->path_variables_user = stringlist_alloc_new(); - site_config->path_values_user = stringlist_alloc_new(); - site_config->path_variables_site = hash_alloc(); - - /* Some hooops to get the current umask. */ - site_config->umask = umask(0); - site_config_set_umask(site_config, site_config->umask); - site_config_set_manual_url(site_config, DEFAULT_MANUAL_URL); - site_config_set_default_browser(site_config, DEFAULT_BROWSER); - site_config_set_max_submit(site_config, DEFAULT_MAX_SUBMIT); - site_config->search_path = false; - return site_config; -} - -const char * site_config_get_license_root_path(const site_config_type * site_config) { - return site_config->license_root_path; -} - -/** - Observe that this variable can not "really" be set to different - values during a simulation, when creating ext_job instances they - will store a pointer to this variable on creation, if the variable - is later changed they will be left with a dangling copy. That is - not particularly elegant, however it should nonetheless work. - */ - -void site_config_set_license_root_path(site_config_type * site_config, const char * license_root_path) { - util_make_path(license_root_path); - { - char * full_license_root_path = util_alloc_realpath(license_root_path); - { - /** - Appending /user/pid to the license root path. Everything - including the pid is removed when exiting (gracefully ...). - - Dangling license directories after a crash can just be removed. - */ - site_config->license_root_path = util_realloc_string_copy(site_config->license_root_path, full_license_root_path); - site_config->__license_root_path = util_realloc_sprintf(site_config->__license_root_path, "%s%c%s%c%d", full_license_root_path, UTIL_PATH_SEP_CHAR, getenv("USER"), UTIL_PATH_SEP_CHAR, getpid()); - - if (!site_config->user_mode) - site_config->license_root_path_site = util_realloc_string_copy(site_config->license_root_path_site, full_license_root_path); - } - free(full_license_root_path); - } -} - -void site_config_init_user_mode(site_config_type * site_config) { - site_config->user_mode = true; -} - -/** - Will return 0 if the job is added correctly, and a non-zero (not - documented ...) error code if the job is not added. - */ - -int site_config_install_job(site_config_type * site_config, const char * job_name, const char * install_file) { - ext_job_type * new_job = ext_job_fscanf_alloc(job_name, site_config->__license_root_path, site_config->user_mode, install_file, site_config->search_path); - if (new_job != NULL) { - ext_joblist_add_job(site_config->joblist, job_name, new_job); - return 0; - } else - return 1; /* Some undocumented error condition - the job is NOT added. */ -} - -/** - Will NOT remove shared jobs. - */ -bool site_config_del_job(site_config_type * site_config, const char * job_name) { - return ext_joblist_del_job(site_config->joblist, job_name); -} - -static void site_config_add_jobs(site_config_type * site_config, const config_content_type * config) { - if (config_content_has_item(config, INSTALL_JOB_KEY)) { - const config_content_item_type * content_item = config_content_get_item(config, INSTALL_JOB_KEY); - int num_jobs = config_content_item_get_size(content_item); - for (int job_nr = 0; job_nr < num_jobs; job_nr++) { - config_content_node_type * node = config_content_item_iget_node(content_item, job_nr); - const char * job_key = config_content_node_iget(node, 0); - const char * description_file = config_content_node_iget_as_abspath(node, 1); - - site_config_install_job(site_config, job_key, description_file); - } - } - if (config_content_has_item(config, INSTALL_JOB_DIRECTORY_KEY)) { - const config_content_item_type * content_item = config_content_get_item(config, INSTALL_JOB_DIRECTORY_KEY); - int num_dirs = config_content_item_get_size(content_item); - for (int dir_nr = 0; dir_nr < num_dirs; dir_nr++) { - config_content_node_type * node = config_content_item_iget_node(content_item, dir_nr); - const char * directory = config_content_node_iget_as_abspath(node, 0); - - ext_joblist_add_jobs_in_directory(site_config->joblist , directory, site_config->__license_root_path, site_config->user_mode, site_config->search_path ); - } - } - -} - -hash_type * site_config_get_env_hash(const site_config_type * site_config) { - return site_config->env_variables_user; -} - -/** - Will only return the user-set variables. The variables set in the - site config are hidden. - */ - -stringlist_type * site_config_get_path_variables(const site_config_type * site_config) { - return site_config->path_variables_user; -} - -stringlist_type * site_config_get_path_values(const site_config_type * site_config) { - return site_config->path_values_user; -} - -/** - Observe that the value inserted in the internal hash tables is the - interpolated value returned from util_interp_setenv(), where $VAR - expressions have been expanded. - */ - -void site_config_setenv(site_config_type * site_config, const char * variable, const char * __value) { - const char * value = util_interp_setenv(variable, __value); - - if (site_config->user_mode) { - /* In the table meant for user-export we store the literal $var strings. */ - hash_insert_hash_owned_ref(site_config->env_variables_user, variable, util_alloc_string_copy(__value), free); - - if (!hash_has_key(site_config->env_variables_site, variable)) - hash_insert_ref(site_config->env_variables_site, variable, NULL); /* We insert a NULL so we can recover a unsetenv() in _clear_env(). */ - } else - hash_insert_hash_owned_ref(site_config->env_variables_site, variable, util_alloc_string_copy(value), free); -} - -/** - Clears all the environment variables set by the user. This is done - is follows: - - 1. Iterate through the table config->env_variables_user and call - unsetenv() on all of them - - 2. Iterate through the table config->env_variables_site and call - setenv() on all of them. - - This way the environment should be identical to what it is after - the site parsing is completed. - */ - - -void site_config_clear_env(site_config_type * site_config) { - /* 1: Clearing the user_set variables. */ - { - hash_iter_type * hash_iter = hash_iter_alloc(site_config->env_variables_user); - while (!hash_iter_is_complete(hash_iter)) { - const char * var = hash_iter_get_next_key(hash_iter); - util_unsetenv(var); - } - hash_iter_free(hash_iter); - hash_clear(site_config->env_variables_user); - } - - - /* 2: Recovering the site_set variables. */ - { - hash_iter_type * hash_iter = hash_iter_alloc(site_config->env_variables_site); - while (!hash_iter_is_complete(hash_iter)) { - const char * var = hash_iter_get_next_key(hash_iter); - const char * value = hash_get(site_config->env_variables_site, var); - util_interp_setenv(var, value); /* Will call unsetenv if value == NULL */ - } - hash_iter_free(hash_iter); - } -} - -void site_config_clear_pathvar(site_config_type * site_config) { - stringlist_clear(site_config->path_variables_user); - stringlist_clear(site_config->path_values_user); - { - /* Recover the original values. */ - hash_iter_type * hash_iter = hash_iter_alloc(site_config->path_variables_site); - while (!hash_iter_is_complete(hash_iter)) { - const char * var = hash_iter_get_next_key(hash_iter); - const char * site_value = hash_get(site_config->path_variables_site, var); - - if (site_value == NULL) - util_unsetenv(var); - else - util_setenv(var, site_value); - } - } -} - -void site_config_update_pathvar(site_config_type * site_config, const char * pathvar, const char * value) { - if (site_config->user_mode) { - stringlist_append_copy(site_config->path_variables_user, pathvar); - stringlist_append_copy(site_config->path_values_user, value); - - if (!hash_has_key(site_config->path_variables_site, pathvar)) - hash_insert_ref(site_config->path_variables_site, pathvar, NULL); /* This path variable has not been touched in the - site_config. We store a NULL, so can roll back - (i.e. call unsetenv()). */ - } - util_update_path_var(pathvar, value, false); -} - -static void site_config_select_job_driver(site_config_type * site_config, const char * driver_name) { - queue_driver_type * driver = site_config_get_queue_driver(site_config, driver_name); - site_config->current_driver = driver; - job_queue_set_driver(site_config->job_queue, site_config->current_driver); -} - -/** - These functions can be called repeatedly if you should want to - change driver characteristics run-time. - */ -static void site_config_select_LOCAL_job_queue(site_config_type * site_config) { - site_config_select_job_driver(site_config, LOCAL_DRIVER_NAME); -} - -static void site_config_select_RSH_job_queue(site_config_type * site_config) { - site_config_select_job_driver(site_config, RSH_DRIVER_NAME); -} - -static void site_config_select_LSF_job_queue(site_config_type * site_config) { - site_config_select_job_driver(site_config, LSF_DRIVER_NAME); -} - -static void site_config_select_TORQUE_job_queue(site_config_type * site_config) { - site_config_select_job_driver(site_config, TORQUE_DRIVER_NAME); -} - -/*****************************************************************/ - -/*****************************************************************/ -static int site_config_get_queue_max_running_option(queue_driver_type * driver) { - const char * max_running_string = queue_driver_get_option(driver, MAX_RUNNING); - int max_running = 0; - if(!util_sscanf_int(max_running_string, &max_running)) { - fprintf(stderr, "** Warning: String:%s for max_running is not parsable as int, using 0\n", max_running_string); - } - return max_running; -} - - -static void site_config_set_queue_max_running_option(site_config_type * site_config, const char* driver_name, int max_running) { - char* max_running_string = util_alloc_sprintf("%d", max_running); - site_config_set_queue_option(site_config, driver_name, MAX_RUNNING, max_running_string); - free(max_running_string); -} - -void site_config_set_max_running_lsf(site_config_type * site_config, int max_running_lsf) { - site_config_set_queue_max_running_option(site_config, LSF_DRIVER_NAME, max_running_lsf); - if (!site_config->user_mode) - site_config->max_running_lsf_site = max_running_lsf; -} - -int site_config_get_max_running_lsf(const site_config_type * site_config) { - queue_driver_type * lsf_driver = site_config_get_queue_driver(site_config, LSF_DRIVER_NAME); - return site_config_get_queue_max_running_option(lsf_driver); -} - -void site_config_set_max_running_rsh(site_config_type * site_config, int max_running_rsh) { - site_config_set_queue_max_running_option(site_config, RSH_DRIVER_NAME, max_running_rsh); - - if (!site_config->user_mode) - site_config->max_running_rsh_site = max_running_rsh; -} - -int site_config_get_max_running_rsh(const site_config_type * site_config) { - queue_driver_type * rsh_driver = site_config_get_queue_driver(site_config, RSH_DRIVER_NAME); - return site_config_get_queue_max_running_option(rsh_driver); -} - -void site_config_set_max_running_local(site_config_type * site_config, int max_running_local) { - site_config_set_queue_max_running_option(site_config, LOCAL_DRIVER_NAME, max_running_local); - - if (!site_config->user_mode) - site_config->max_running_local_site = max_running_local; -} - -int site_config_get_max_running_local(const site_config_type * site_config) { - queue_driver_type * local_driver = site_config_get_queue_driver(site_config, LOCAL_DRIVER_NAME); - return site_config_get_queue_max_running_option(local_driver); -} - -/*****************************************************************/ - -/*****************************************************************/ - -void site_config_clear_rsh_host_list(site_config_type * site_config) { - queue_driver_type * rsh_driver = site_config_get_queue_driver(site_config, RSH_DRIVER_NAME); - queue_driver_set_option(rsh_driver, RSH_CLEAR_HOSTLIST, NULL); -} - -hash_type * site_config_get_rsh_host_list(const site_config_type * site_config) { - queue_driver_type * rsh_driver = site_config_get_queue_driver(site_config, RSH_DRIVER_NAME); - return (hash_type *) queue_driver_get_option(rsh_driver, RSH_HOSTLIST); -} - -void site_config_add_rsh_host_from_string(site_config_type * site_config, const char * host_string) { - queue_driver_type * rsh_driver = site_config_get_queue_driver(site_config, RSH_DRIVER_NAME); - queue_driver_set_option(rsh_driver, RSH_HOST, host_string); -} - -void site_config_add_rsh_host(site_config_type * site_config, const char * rsh_host, int max_running) { - char * host_max_running = util_alloc_sprintf("%s:%d", rsh_host, max_running); - site_config_add_rsh_host_from_string(site_config, host_max_running); - free(host_max_running); -} - -void site_config_set_rsh_command(site_config_type * site_config, const char * rsh_command) { - queue_driver_type * rsh_driver = site_config_get_queue_driver(site_config, RSH_DRIVER_NAME); - queue_driver_set_option(rsh_driver, RSH_CMD, rsh_command); -} - -const char * site_config_get_rsh_command(const site_config_type * site_config) { - queue_driver_type * rsh_driver = site_config_get_queue_driver(site_config, RSH_DRIVER_NAME); - return queue_driver_get_option(rsh_driver, RSH_CMD); -} - -/*****************************************************************/ - -void site_config_set_lsf_queue(site_config_type * site_config, const char * lsf_queue) { - queue_driver_type * lsf_driver = site_config_get_queue_driver(site_config, LSF_DRIVER_NAME); - if (!site_config->user_mode) - site_config->lsf_queue_name_site = util_realloc_string_copy(site_config->lsf_queue_name_site, lsf_queue); - - queue_driver_set_option(lsf_driver, LSF_QUEUE, lsf_queue); -} - -const char * site_config_get_lsf_queue(const site_config_type * site_config) { - queue_driver_type * lsf_driver = site_config_get_queue_driver(site_config, LSF_DRIVER_NAME); - return queue_driver_get_option(lsf_driver, LSF_QUEUE); -} - -void site_config_set_lsf_server(site_config_type * site_config, const char * lsf_server) { - queue_driver_type * lsf_driver = site_config_get_queue_driver(site_config, LSF_DRIVER_NAME); - queue_driver_set_option(lsf_driver, LSF_SERVER, lsf_server); -} - -void site_config_set_lsf_request(site_config_type * site_config, const char * lsf_request) { - queue_driver_type * lsf_driver = site_config_get_queue_driver(site_config, LSF_DRIVER_NAME); - queue_driver_set_option(lsf_driver, LSF_RESOURCE, lsf_request); - if (!site_config->user_mode) - site_config->lsf_request_site = util_realloc_string_copy(site_config->lsf_request_site, lsf_request); -} - -const char * site_config_get_lsf_request(const site_config_type * site_config) { - queue_driver_type * lsf_driver = site_config_get_queue_driver(site_config, LSF_DRIVER_NAME); - return queue_driver_get_option(lsf_driver, LSF_RESOURCE); -} - -/*****************************************************************/ - - -const char * site_config_get_queue_name(const site_config_type * site_config) { - return queue_driver_get_name(site_config->current_driver); -} - -static void site_config_set_job_queue__(site_config_type * site_config, job_driver_type driver_type) { - site_config->driver_type = driver_type; - if (site_config->job_queue != NULL) { - switch (driver_type) { - case(LSF_DRIVER): - site_config_select_LSF_job_queue(site_config); - break; - case(TORQUE_DRIVER): - site_config_select_TORQUE_job_queue(site_config); - break; - case(RSH_DRIVER): - site_config_select_RSH_job_queue(site_config); - break; - case(LOCAL_DRIVER): - site_config_select_LOCAL_job_queue(site_config); - break; - default: - util_abort("%s: internal error \n", __func__); - } - } - if (!site_config->user_mode) - site_config->driver_type_site = driver_type; -} - -bool site_config_queue_is_running(const site_config_type * site_config) { - return job_queue_is_running(site_config->job_queue); -} - -/** - The job_script might be a relative path, and the cwd changes during - execution, i.e. it is essential to get hold of the full path. -*/ - -bool site_config_set_job_script(site_config_type * site_config, const char * job_script) { - if (util_is_executable(job_script)) { - char * job_script_full_path = util_alloc_realpath(job_script); - { - site_config->job_script = util_realloc_string_copy(site_config->job_script, job_script_full_path); - if (!site_config->user_mode) - site_config->job_script_site = util_realloc_string_copy(site_config->job_script_site, site_config->job_script); - } - free(job_script_full_path); - return true; - } else - return false; -} - - -bool site_config_has_job_script( const site_config_type * site_config ) { - if (site_config->job_script) - return true; - else - return false; -} - - -const char * site_config_get_job_script(const site_config_type * site_config) { - return site_config->job_script; -} - -const char * site_config_get_manual_url(const site_config_type * site_config) { - return site_config->manual_url; -} - -void site_config_set_manual_url(site_config_type * site_config, const char * manual_url) { - site_config->manual_url = util_realloc_string_copy(site_config->manual_url, manual_url); -} - -const char * site_config_get_default_browser(const site_config_type * site_config) { - return site_config->default_browser; -} - -void site_config_set_default_browser(site_config_type * site_config, const char * default_browser) { - site_config->default_browser = util_realloc_string_copy(site_config->default_browser, default_browser); -} - -void site_config_set_max_submit(site_config_type * site_config, int max_submit) { - site_config->max_submit = max_submit; - if (!site_config->user_mode) - site_config->max_submit_site = max_submit; - job_queue_set_max_submit(site_config->job_queue, max_submit); -} - -int site_config_get_max_submit(const site_config_type * site_config) { - return job_queue_get_max_submit(site_config->job_queue); -} - -static void site_config_install_job_queue(site_config_type * site_config) { - /* - All the various driver options are set, unconditionally of which - driver is actually selected in the end. - */ - if (site_config->driver_type != NULL_DRIVER) - site_config_set_job_queue__(site_config, site_config->driver_type); -} - -void site_config_init_env(site_config_type * site_config, const config_content_type * config) { - { - if (config_content_has_item( config , SETENV_KEY)) { - config_content_item_type * setenv_item = config_content_get_item(config, SETENV_KEY); - int i; - for (i = 0; i < config_content_item_get_size(setenv_item); i++) { - const config_content_node_type * setenv_node = config_content_item_iget_node(setenv_item, i); - const char * var = config_content_node_iget(setenv_node, 0); - const char * value = config_content_node_iget(setenv_node, 1); - - site_config_setenv(site_config, var, value); - } - } - } - - { - if (config_content_has_item( config , UPDATE_PATH_KEY)) { - config_content_item_type * path_item = config_content_get_item(config, UPDATE_PATH_KEY); - int i; - for (i = 0; i < config_content_item_get_size(path_item); i++) { - const config_content_node_type * path_node = config_content_item_iget_node(path_item, i); - const char * path = config_content_node_iget(path_node, 0); - const char * value = config_content_node_iget(path_node, 1); - - site_config_update_pathvar(site_config, path, value); - } - } - } -} - -/** - This function will be called twice, first when the config instance - is an internalization of the site-wide configuration file, and - secondly when config is an internalisation of the user's - configuration file. The @user_config parameter will be true in the - latter case. - */ - - -bool site_config_init(site_config_type * site_config, const config_content_type * config) { - site_config_add_jobs(site_config, config); - site_config_init_env(site_config, config); - - /* - When LSF is used several enviroment variables must be set (by the - site wide file) - i.e. the calls to SETENV must come first. - */ - if (!site_config->user_mode) - site_config_create_queue_drivers(site_config); - - /* - Set the umask for all file creation. A value of '0' will ensure - that all files and directories are created with 'equal rights' - for everyone - might be handy if you are helping someone... The - default statoil value is 0022, i.e. write access is removed from - group and others. - - The string is supposed to be in OCTAL representation (without any - prefix characters). - */ - - if (config_content_has_item(config, UMASK_KEY)) { - const char * string_mask = config_content_get_value(config, UMASK_KEY); - mode_t umask_value; - if (util_sscanf_octal_int(string_mask, &umask_value)) - site_config_set_umask(site_config, umask_value); - else - util_abort("%s: failed to parse:\"%s\" as a valid octal literal \n", __func__, string_mask); - } - - if (config_content_has_item(config, MAX_SUBMIT_KEY)) - site_config_set_max_submit(site_config, config_content_get_value_as_int(config, MAX_SUBMIT_KEY)); - - - /* LSF options */ - { - if (config_content_has_item(config, LSF_QUEUE_KEY)) - site_config_set_lsf_queue(site_config, config_content_get_value(config, LSF_QUEUE_KEY)); - - if (config_content_has_item(config, LSF_RESOURCES_KEY)) { - char * lsf_resource_request = config_content_alloc_joined_string(config, LSF_RESOURCES_KEY, " "); - site_config_set_lsf_request(site_config, lsf_resource_request); - free(lsf_resource_request); - } - - if (config_content_has_item(config, MAX_RUNNING_LSF_KEY)) - site_config_set_max_running_lsf(site_config, config_content_get_value_as_int(config, MAX_RUNNING_LSF_KEY)); - - if (config_content_has_item(config, LSF_SERVER_KEY)) - site_config_set_lsf_server(site_config, config_content_get_value(config, LSF_SERVER_KEY)); - } - - - /* RSH options */ - { - if (config_content_has_item(config, RSH_COMMAND_KEY)) - site_config_set_rsh_command(site_config, config_content_get_value(config, RSH_COMMAND_KEY)); - - if (config_content_has_item(config, MAX_RUNNING_RSH_KEY)) - site_config_set_max_running_rsh(site_config, config_content_get_value_as_int(config, MAX_RUNNING_RSH_KEY)); - - /* Parsing the "host1:4" strings. */ - if (config_content_has_item( config , RSH_HOST_KEY)) { - stringlist_type * rsh_host_list = config_content_alloc_complete_stringlist(config, RSH_HOST_KEY); - int i; - for (i = 0; i < stringlist_get_size(rsh_host_list); i++) - site_config_add_rsh_host_from_string(site_config, stringlist_iget(rsh_host_list, i)); - - stringlist_free(rsh_host_list); - } - } - - - if (config_content_has_item(config, QUEUE_SYSTEM_KEY)) { - job_driver_type driver_type; - { - const char * queue_system = config_content_get_value(config, QUEUE_SYSTEM_KEY); - if (strcmp(queue_system, LSF_DRIVER_NAME) == 0) { - driver_type = LSF_DRIVER; - } else if (strcmp(queue_system, RSH_DRIVER_NAME) == 0) - driver_type = RSH_DRIVER; - else if (strcmp(queue_system, LOCAL_DRIVER_NAME) == 0) - driver_type = LOCAL_DRIVER; - else if (strcmp(queue_system, TORQUE_DRIVER_NAME) == 0) - driver_type = TORQUE_DRIVER; - else { - util_abort("%s: queue system :%s not recognized \n", __func__, queue_system); - driver_type = NULL_DRIVER; - } - } - site_config_set_job_queue__(site_config, driver_type); - } - - /* Parsing local options */ - if (config_content_has_item(config, MAX_RUNNING_LOCAL_KEY)) - site_config_set_max_running_local(site_config, config_content_iget_as_int(config, MAX_RUNNING_LOCAL_KEY, 0, 0)); - - if (config_content_has_item(config, JOB_SCRIPT_KEY)) - site_config_set_job_script(site_config, config_content_get_value_as_abspath(config, JOB_SCRIPT_KEY)); - - if (config_content_has_item(config, LICENSE_PATH_KEY)) - site_config_set_license_root_path(site_config, config_content_get_value_as_abspath(config, LICENSE_PATH_KEY)); - - site_config_install_job_queue(site_config); - - if (config_content_has_item(config, EXT_JOB_SEARCH_PATH_KEY)){ - site_config_set_ext_job_search_path(site_config, config_content_get_value_as_bool(config, EXT_JOB_SEARCH_PATH_KEY)); - } - - - /* Setting QUEUE_OPTIONS */ - { - int i; - for (i = 0; i < config_content_get_occurences(config, QUEUE_OPTION_KEY); i++) { - const stringlist_type * tokens = config_content_iget_stringlist_ref(config, QUEUE_OPTION_KEY, i); - const char * driver_name = stringlist_iget(tokens, 0); - const char * option_key = stringlist_iget(tokens, 1); - char * option_value = stringlist_alloc_joined_substring(tokens, 2, stringlist_get_size(tokens), " "); - /* - If it is desirable to keep the exact number of spaces in the - option_value it should be quoted with "" in the configuration - file. - */ - site_config_set_queue_option(site_config, driver_name, option_key, option_value); - free( option_value ); - } - } - return true; -} - -void site_config_set_ext_job_search_path(site_config_type * site_config, bool search_path){ - site_config->search_path = search_path; -} - - -void site_config_free(site_config_type * site_config) { - ext_joblist_free(site_config->joblist); - job_queue_free(site_config->job_queue); - - hash_free(site_config->queue_drivers); - - stringlist_free(site_config->path_variables_user); - stringlist_free(site_config->path_values_user); - hash_free(site_config->path_variables_site); - - hash_free(site_config->env_variables_site); - hash_free(site_config->env_variables_user); - - if (site_config->__license_root_path != NULL) - util_clear_directory(site_config->__license_root_path, true, true); - - util_safe_free(site_config->manual_url); - util_safe_free(site_config->default_browser); - util_safe_free(site_config->license_root_path); - util_safe_free(site_config->license_root_path_site); - util_safe_free(site_config->__license_root_path); - util_safe_free(site_config->job_script); - util_safe_free(site_config->job_script_site); - util_safe_free(site_config->rsh_command_site); - util_safe_free(site_config->lsf_queue_name_site); - util_safe_free(site_config->lsf_request_site); - free(site_config); -} - -ext_joblist_type * site_config_get_installed_jobs(const site_config_type * site_config) { - return site_config->joblist; -} - -job_queue_type * site_config_get_job_queue(const site_config_type * site_config) { - return site_config->job_queue; -} - -void site_config_set_ens_size(site_config_type * site_config, int ens_size) { - //job_queue_set_size( site_config->job_queue , ens_size ); -} - -/*****************************************************************/ - - -void site_config_add_queue_config_items(config_parser_type * config, bool site_mode) { - config_schema_item_type * item = config_add_schema_item(config, QUEUE_SYSTEM_KEY, site_mode); - config_schema_item_set_argc_minmax(item, 1, 1); - { - - stringlist_type * lsf_dep = stringlist_alloc_argv_ref((const char *[2]) { - "LSF_QUEUE", "MAX_RUNNING_LSF" - }, 2); - - stringlist_type * rsh_dep = stringlist_alloc_argv_ref((const char *[3]) { - "RSH_HOST", "RSH_COMMAND", "MAX_RUNNING_RSH" - }, 2); - - stringlist_type * local_dep = stringlist_alloc_argv_ref((const char *[1]) { - "MAX_RUNNING_LOCAL" - }, 1); - - if (site_mode) { - - config_schema_item_set_common_selection_set(item, 3, (const char *[3]) { - LSF_DRIVER_NAME, LOCAL_DRIVER_NAME, RSH_DRIVER_NAME - }); - config_schema_item_set_required_children_on_value(item, LSF_DRIVER_NAME, lsf_dep); - config_schema_item_set_required_children_on_value(item, RSH_DRIVER_NAME, rsh_dep); - config_schema_item_set_required_children_on_value(item, LOCAL_DRIVER_NAME, local_dep); - } - - stringlist_free(lsf_dep); - stringlist_free(rsh_dep); - stringlist_free(local_dep); - } - - item = config_add_schema_item(config, MAX_SUBMIT_KEY, false); - config_schema_item_set_argc_minmax(item, 1, 1); - config_schema_item_iset_type(item, 0, CONFIG_INT); -} - -void site_config_add_config_items(config_parser_type * config, bool site_mode) { - config_schema_item_type * item; - ert_workflow_list_add_config_items(config); - site_config_add_queue_config_items(config, site_mode); - - - /* - You can set environment variables which will be applied to the - run-time environment. Can unfortunately not use constructions - like PATH=$PATH:/some/new/path, use the UPDATE_PATH function instead. - */ - item = config_add_schema_item(config, SETENV_KEY, false); - config_schema_item_set_argc_minmax(item, 2, 2); - config_schema_item_set_envvar_expansion(item, false); /* Do not expand $VAR expressions (that is done in util_interp_setenv()). */ - - item = config_add_schema_item(config, UMASK_KEY, false); - config_schema_item_set_argc_minmax(item, 1, 1); - - /** - UPDATE_PATH LD_LIBRARY_PATH /path/to/some/funky/lib - - Will prepend "/path/to/some/funky/lib" at the front of LD_LIBRARY_PATH. - */ - item = config_add_schema_item(config, UPDATE_PATH_KEY, false); - config_schema_item_set_argc_minmax(item, 2, 2); - config_schema_item_set_envvar_expansion(item, false); /* Do not expand $VAR expressions (that is done in util_interp_setenv()). */ - - if (!site_mode) { - item = config_add_schema_item(config, LICENSE_PATH_KEY, false); - config_schema_item_set_argc_minmax(item, 1, 1); - config_schema_item_iset_type(item, 0, CONFIG_PATH); - } - - - /*****************************************************************/ - /* Items related to running jobs with lsf/rsh/local ... */ - - /* These must be set IFF QUEUE_SYSTEM == LSF */ - item = config_add_schema_item(config, LSF_QUEUE_KEY, false); - config_schema_item_set_argc_minmax(item, 1, 1); - - item = config_add_schema_item(config, LSF_RESOURCES_KEY, false); - config_schema_item_set_argc_minmax(item, 1, CONFIG_DEFAULT_ARG_MAX); - - item = config_add_schema_item(config, MAX_RUNNING_LSF_KEY, false); - config_schema_item_set_argc_minmax(item, 1, 1); - config_schema_item_iset_type(item, 0, CONFIG_INT); - - item = config_add_schema_item(config, LSF_SERVER_KEY, false); - config_schema_item_set_argc_minmax(item, 1, 1); - - /* These must be set IFF QUEUE_SYSTEM == RSH */ - if (!site_mode) - config_add_schema_item(config, RSH_HOST_KEY, false); /* Only added when user parse. */ - item = config_add_schema_item(config, RSH_COMMAND_KEY, false); - config_schema_item_set_argc_minmax(item, 1, 1); - config_schema_item_iset_type(item, 0, CONFIG_EXECUTABLE); - - item = config_add_schema_item(config, MAX_RUNNING_RSH_KEY, false); - config_schema_item_set_argc_minmax(item, 1, 1); - config_schema_item_iset_type(item, 0, CONFIG_INT); - - /* These must be set IFF QUEUE_SYSTEM == LOCAL */ - item = config_add_schema_item(config, MAX_RUNNING_LOCAL_KEY, false); - config_schema_item_set_argc_minmax(item, 1, 1); - config_schema_item_iset_type(item, 0, CONFIG_INT); - - - /*****************************************************************/ - item = config_add_schema_item(config, QUEUE_OPTION_KEY, false); - config_schema_item_set_argc_minmax(item, 3, CONFIG_DEFAULT_ARG_MAX); - - item = config_add_schema_item(config, JOB_SCRIPT_KEY, false); - config_schema_item_set_argc_minmax(item, 1, 1); - config_schema_item_iset_type(item, 0, CONFIG_EXISTING_PATH); - - item = config_add_schema_item(config, INSTALL_JOB_KEY, false); - config_schema_item_set_argc_minmax(item, 2, 2); - config_schema_item_iset_type(item, 1, CONFIG_EXISTING_PATH); - - item = config_add_schema_item(config, INSTALL_JOB_DIRECTORY_KEY, false); - config_schema_item_set_argc_minmax(item, 1, 1); - config_schema_item_iset_type(item, 0, CONFIG_PATH); - - item = config_add_schema_item( config , ANALYSIS_LOAD_KEY , false ); - config_schema_item_set_argc_minmax( item , 2 , 2); -} - -const char * site_config_get_location() { - const char * site_config = NULL; - - #ifdef SITE_CONFIG_FILE - site_config = SITE_CONFIG_FILE; - #endif - - const char * env_site_config = getenv("ERT_SITE_CONFIG"); - - if(env_site_config != NULL) { - if (util_file_exists(env_site_config)) { - site_config = env_site_config; - } else { - fprintf(stderr, "The environment variable ERT_SITE_CONFIG points to non-existing file: %s - ignored\n", env_site_config); - } - } - - if (site_config == NULL) { - fprintf(stderr, "**WARNING** main enkf_config file is not set. Use environment variable \"ERT_SITE_CONFIG\" - or recompile.\n"); - } - - return site_config; -} diff --git a/ThirdParty/Ert/libenkf/src/state_map.c b/ThirdParty/Ert/libenkf/src/state_map.c deleted file mode 100644 index dbe51e7b85..0000000000 --- a/ThirdParty/Ert/libenkf/src/state_map.c +++ /dev/null @@ -1,285 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - The file 'state_map.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#define _GNU_SOURCE /* Must define this to get access to pthread_rwlock_t */ -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - - -#define STATE_MAP_TYPE_ID 500672132 - -struct state_map_struct { - UTIL_TYPE_ID_DECLARATION; - int_vector_type * state; - pthread_rwlock_t rw_lock; - bool read_only; -}; - - -UTIL_IS_INSTANCE_FUNCTION( state_map , STATE_MAP_TYPE_ID ) - - -state_map_type * state_map_alloc( ) { - state_map_type * map = util_malloc( sizeof * map ); - UTIL_TYPE_ID_INIT( map , STATE_MAP_TYPE_ID ); - map->state = int_vector_alloc( 0 , STATE_UNDEFINED ); - pthread_rwlock_init( &map->rw_lock , NULL); - map->read_only = false; - return map; -} - - -state_map_type * state_map_fread_alloc( const char * filename ) { - state_map_type * map = state_map_alloc(); - if (util_file_exists( filename )) { - FILE * stream = util_fopen( filename , "r"); - int_vector_fread( map->state , stream ); - fclose( stream ); - } - return map; -} - -state_map_type * state_map_fread_alloc_readonly( const char * filename ) { - state_map_type * map = state_map_fread_alloc(filename); - map->read_only = true; - return map; -} - - -state_map_type * state_map_alloc_copy( state_map_type * map ) { - state_map_type * copy = state_map_alloc(); - pthread_rwlock_rdlock( &map->rw_lock ); - { - int_vector_memcpy( copy->state , map->state ); - } - pthread_rwlock_unlock( &map->rw_lock ); - return copy; -} - - -void state_map_free( state_map_type * map ) { - int_vector_free( map->state ); - free( map ); -} - - -int state_map_get_size( state_map_type * map) { - int size; - pthread_rwlock_rdlock( &map->rw_lock ); - { - size = int_vector_size( map->state ); - } - pthread_rwlock_unlock( &map->rw_lock ); - return size; -} - - -bool state_map_equal( state_map_type * map1 , state_map_type * map2) { - bool equal = true; - pthread_rwlock_rdlock( &map1->rw_lock ); - pthread_rwlock_rdlock( &map2->rw_lock ); - { - if (int_vector_size( map1->state) != int_vector_size( map2->state)) - equal = false; - - if (equal) - equal = int_vector_equal( map1->state , map2->state ); - } - pthread_rwlock_unlock( &map1->rw_lock ); - pthread_rwlock_unlock( &map2->rw_lock ); - return equal; -} - - -realisation_state_enum state_map_iget( state_map_type * map , int index) { - realisation_state_enum state; - pthread_rwlock_rdlock( &map->rw_lock ); - { - state = int_vector_safe_iget( map->state , index ); - } - pthread_rwlock_unlock( &map->rw_lock ); - return state; -} - -bool state_map_legal_transition( realisation_state_enum state1 , realisation_state_enum state2) { - int target_mask = 0; - - if (state1 == STATE_UNDEFINED) - target_mask = STATE_INITIALIZED | STATE_PARENT_FAILURE; - else if (state1 == STATE_INITIALIZED) - target_mask = STATE_LOAD_FAILURE | STATE_HAS_DATA | STATE_INITIALIZED | STATE_PARENT_FAILURE; - else if (state1 == STATE_HAS_DATA) - target_mask = STATE_INITIALIZED | STATE_LOAD_FAILURE | STATE_HAS_DATA | STATE_PARENT_FAILURE; - else if (state1 == STATE_LOAD_FAILURE) - target_mask = STATE_HAS_DATA | STATE_INITIALIZED | STATE_LOAD_FAILURE; - else if (state1 == STATE_PARENT_FAILURE) - target_mask = STATE_INITIALIZED | STATE_PARENT_FAILURE; - - if (state2 & target_mask) - return true; - else - return false; -} - -static void state_map_assert_writable( const state_map_type * map) { - if (map->read_only) - util_abort("%s: tried to modify read_only state_map - aborting \n",__func__); -} - -static void state_map_iset__( state_map_type * map , int index , realisation_state_enum new_state) { - realisation_state_enum current_state = int_vector_safe_iget( map->state , index ); - - if (state_map_legal_transition( current_state , new_state )) - int_vector_iset( map->state , index , new_state); - else - util_abort("%s: illegal state transition for realisation:%d %d -> %d \n" , __func__ , index , current_state , new_state ); -} - -void state_map_iset( state_map_type * map ,int index , realisation_state_enum state) { - state_map_assert_writable(map); - pthread_rwlock_wrlock( &map->rw_lock ); - { - state_map_iset__( map , index , state ); - } - pthread_rwlock_unlock( &map->rw_lock ); -} - - -void state_map_update_matching( state_map_type * map , int index , int state_mask , realisation_state_enum new_state) { - realisation_state_enum current_state = state_map_iget( map , index ); - if (current_state & state_mask) - state_map_iset( map , index , new_state ); -} - - -void state_map_update_undefined( state_map_type * map , int index , realisation_state_enum new_state) { - state_map_update_matching( map , index , STATE_UNDEFINED , new_state ); -} - - - - -void state_map_fwrite( state_map_type * map , const char * filename) { - pthread_rwlock_rdlock( &map->rw_lock ); - { - FILE * stream = util_mkdir_fopen( filename , "w"); - if (stream) { - int_vector_fwrite( map->state , stream ); - fclose( stream ); - } else - util_abort("%s: failed to open:%s for writing \n",__func__ , filename ); - } - pthread_rwlock_unlock( &map->rw_lock ); -} - - - -bool state_map_fread( state_map_type * map , const char * filename) { - bool file_exists = false; - pthread_rwlock_wrlock( &map->rw_lock ); - { - if (util_file_exists( filename )) { - FILE * stream = util_fopen( filename , "r"); - if (stream) { - int_vector_fread( map->state , stream ); - fclose( stream ); - } else - util_abort("%s: failed to open:%s for reading \n",__func__ , filename ); - file_exists = true; - } else - int_vector_reset( map->state ); - } - pthread_rwlock_unlock( &map->rw_lock ); - return file_exists; -} - - -static void state_map_select_matching__( state_map_type * map , bool_vector_type * select_target , int select_mask , bool select) { - state_map_assert_writable(map); - pthread_rwlock_rdlock( &map->rw_lock ); - { - { - const int * map_ptr = int_vector_get_ptr( map->state ); - int size = util_int_min(int_vector_size( map->state ), bool_vector_size(select_target)); - for (int i=0; i < size; i++) { - int state_value = map_ptr[i]; - if (state_value & select_mask) - bool_vector_iset( select_target , i , select); - } - } - pthread_rwlock_unlock( &map->rw_lock ); - } -} - - -void state_map_select_matching( state_map_type * map , bool_vector_type * select_target , int select_mask) { - state_map_select_matching__(map , select_target , select_mask , true ); -} - - - - void state_map_deselect_matching( state_map_type * map , bool_vector_type * select_target , int select_mask) { - state_map_select_matching__(map , select_target , select_mask , false ); -} - - -static void state_map_set_from_mask__( state_map_type * map , const bool_vector_type * mask , realisation_state_enum state, bool invert) { - const bool * mask_ptr = bool_vector_get_ptr(mask); - for (int i=0; i < bool_vector_size( mask); i++) { - if (mask_ptr[i] != invert) - state_map_iset(map , i , state); - } -} - -void state_map_set_from_inverted_mask( state_map_type * state_map , const bool_vector_type * mask , realisation_state_enum state) { - state_map_set_from_mask__(state_map , mask , state , true); -} - -void state_map_set_from_mask( state_map_type * state_map , const bool_vector_type * mask , realisation_state_enum state) { - state_map_set_from_mask__(state_map , mask , state , false); -} - -bool state_map_is_readonly(const state_map_type * state_map) { - return state_map->read_only; -} - - -int state_map_count_matching( state_map_type * state_map , int mask) { - int count = 0; - pthread_rwlock_rdlock( &state_map->rw_lock ); - { - const int * map_ptr = int_vector_get_ptr(state_map->state); - for (int i=0; i < int_vector_size( state_map->state ); i++) { - int state_value = map_ptr[i]; - if (state_value & mask) - count++; - } - } - pthread_rwlock_unlock(&state_map->rw_lock); - return count; - } - diff --git a/ThirdParty/Ert/libenkf/src/summary.c b/ThirdParty/Ert/libenkf/src/summary.c deleted file mode 100644 index bf43462bd9..0000000000 --- a/ThirdParty/Ert/libenkf/src/summary.c +++ /dev/null @@ -1,427 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'summary.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/*****************************************************************/ - -#define SUMMARY_UNDEF -9999 - -struct summary_struct { - int __type_id; /* Only used for run_time checking. */ - bool vector_storage; - summary_config_type * config; /* Can not be NULL - var_type is set on first load. */ - double * data; /* Size is always one - but what the fuck ... */ - double_vector_type * data_vector; -}; - - -/*****************************************************************/ - - - -static double SUMMARY_GET_VALUE( const summary_type * summary , int report_step) { - if (summary->vector_storage) { - return double_vector_iget( summary->data_vector , report_step ); - } else - return summary->data[0]; -} - - -static void SUMMARY_SET_VALUE( summary_type * summary , int report_step , double value) { - if (summary->vector_storage) { - double_vector_iset( summary->data_vector , report_step , value); - } else - summary->data[0] = value; -} - -/*****************************************************************/ - - - -void summary_clear(summary_type * summary) { - const int data_size = summary_config_get_data_size( summary->config ); - for (int k=0; k < data_size; k++) - summary->data[k] = 0; - - double_vector_reset( summary->data_vector ); -} - - -summary_type * summary_alloc(const summary_config_type * summary_config) { - summary_type * summary = util_malloc(sizeof *summary ); - summary->__type_id = SUMMARY; - summary->vector_storage = summary_config_get_vector_storage( summary_config ); - summary->config = (summary_config_type *) summary_config; - summary->data_vector = double_vector_alloc(0 , SUMMARY_UNDEF); - { - const int data_size = summary_config_get_data_size( summary_config ); - summary->data = util_calloc( data_size , sizeof * summary->data ); - } - return summary; -} - - - -bool summary_active_value( double value ) { - - if (value == SUMMARY_UNDEF) - return false; - - return true; -} - - -void summary_copy(const summary_type *src , summary_type * target) { - if (src->config == target->config) { - const int data_size = summary_config_get_data_size( src->config ); - for (int k=0; k < data_size; k++) - target->data[k] = src->data[k]; - - double_vector_memcpy( target->data_vector , src->data_vector ); - } else - util_abort("%s: do not share config objects \n",__func__); -} - - - - -void summary_read_from_buffer(summary_type * summary , buffer_type * buffer, enkf_fs_type * fs, int report_step) { - enkf_util_assert_buffer_type( buffer , SUMMARY ); - if (summary->vector_storage) { - double_vector_buffer_fread( summary->data_vector , buffer ); - } else { - int size = summary_config_get_data_size( summary->config ); - buffer_fread( buffer , summary->data , sizeof * summary->data , size); - } -} - - -bool summary_write_to_buffer(const summary_type * summary , buffer_type * buffer, int report_step) { - buffer_fwrite_int( buffer , SUMMARY ); - if (summary->vector_storage) { - double_vector_buffer_fwrite( summary->data_vector , buffer ); - } else { - int size = summary_config_get_data_size( summary->config ); - buffer_fwrite( buffer , summary->data , sizeof * summary->data , size); - } - return true; -} - - -bool summary_has_data( const summary_type * summary , int report_step) { - if (summary->vector_storage) { - return (double_vector_size( summary->data_vector ) > report_step) ? true : false; - } else - return true; -} - - -void summary_free(summary_type *summary) { - double_vector_free( summary->data_vector ); - free(summary->data); - free(summary); -} - - - - - - -void summary_serialize(const summary_type * summary , node_id_type node_id , const active_list_type * active_list , matrix_type * A , int row_offset , int column) { - double value = SUMMARY_GET_VALUE( summary , node_id.report_step ); - enkf_matrix_serialize( &value , 1 , ECL_DOUBLE_TYPE , active_list , A , row_offset , column); -} - - -void summary_deserialize(summary_type * summary , node_id_type node_id , const active_list_type * active_list , const matrix_type * A , int row_offset , int column) { - double value; - enkf_matrix_deserialize( &value , 1 , ECL_DOUBLE_TYPE , active_list , A , row_offset , column); - SUMMARY_SET_VALUE( summary , node_id.report_step , value ); -} - - -double summary_get(const summary_type * summary, int report_step) { - return SUMMARY_GET_VALUE( summary , report_step ); -} - - -bool summary_user_get(const summary_type * summary , const char * index_key , int report_step , double * value) { - if (summary->vector_storage) { - if (double_vector_size( summary->data_vector ) > report_step) { - *value = double_vector_iget( summary->data_vector , report_step); - return true; - } else { - *value = -1; - return false; - } - - } else { - *value = summary->data[0]; - return true; - } -} - - - -void summary_user_get_vector(const summary_type * summary , const char * index_key , double_vector_type * value) { - if (summary->vector_storage) { - double_vector_memcpy( value , summary->data_vector); - } else - util_abort("%s: internal error - should not call the %s function when not using vector storage \n",__func__ , __func__); -} - - - -/** - There are three typical reasons why the node data can not be loaded: - - 1. The ecl_sum instance is equal to NULL. - 2. The ecl_sum instance does not have the report step we are asking for. - 3. The ecl_sum instance does not have the variable we are asking for. - - In the two first cases the function will return false, ultimately - signaling that the simulation has failed. In the last case we check - the required flag of the variable, and if this is set to false we - return true. This is done because this is a typical situation for - e.g. a well which has not yet opened. -*/ - -bool summary_forward_load(summary_type * summary , const char * ecl_file_name , const forward_load_context_type * load_context) { - bool loadOK = false; - double load_value; - int report_step = forward_load_context_get_load_step( load_context ); - const ecl_sum_type * ecl_sum = forward_load_context_get_ecl_sum( load_context ); - if (ecl_sum != NULL) { - const char * var_key = summary_config_get_var(summary->config); - load_fail_type load_fail_action = summary_config_get_load_fail_mode(summary->config ); - - /* Check if the ecl_sum instance has this report step. */ - if (ecl_sum_has_report_step( ecl_sum , report_step )) { - int last_report_index = ecl_sum_iget_report_end( ecl_sum , report_step ); - - if (ecl_sum_has_general_var(ecl_sum , var_key)) { - load_value = ecl_sum_get_general_var(ecl_sum , last_report_index ,var_key ); - loadOK = true; - } else { - load_value = 0; - /* - The summary object does not have this variable - probably - meaning that it is a well/group which has not yet - opened. When required == false we do not signal load - failure in this situation. - - If the user has misspelled the name, we will go through - the whole simulation without detecting that error. - */ - if (load_fail_action == LOAD_FAIL_EXIT) - loadOK = false; - else { - loadOK = true; - if (load_fail_action == LOAD_FAIL_WARN) - fprintf(stderr,"** WARNING ** Failed summary:%s does not have key:%s \n",ecl_sum_get_case( ecl_sum ) , var_key); - } - } - } else { - load_value = 0; - if (report_step == 0) - loadOK = true; - /* - We do not signal load failure if we do not have the S0000 - summary file - which does not contain any useful information - anyway. - - Hmmm - there is a "if (report_step > 0)" check in the - enkf_state_internalize_x() function as well. - */ - else { - if (load_fail_action == LOAD_FAIL_EXIT) - loadOK = false; - else { - loadOK = true; - if (load_fail_action == LOAD_FAIL_WARN) - fprintf(stderr,"** WARNING ** Failed summary:%s does not have report_step:%d \n",ecl_sum_get_case( ecl_sum ) , report_step); - } - } - } - } - - if (loadOK) - SUMMARY_SET_VALUE( summary , report_step , load_value ); - - return loadOK; -} - - - -bool summary_forward_load_vector(summary_type * summary , - const char * ecl_file_name , - const forward_load_context_type * load_context , - const int_vector_type * time_index) { - bool loadOK = false; - - if (summary->vector_storage) { - const ecl_sum_type * ecl_sum = forward_load_context_get_ecl_sum( load_context ); - if (ecl_sum != NULL) { - const char * var_key = summary_config_get_var(summary->config); - load_fail_type load_fail_action = summary_config_get_load_fail_mode(summary->config ); - bool normal_load = false; - - - if (load_fail_action != LOAD_FAIL_EXIT) { - /* - The load will always ~succeed - but if we do not have the data; - we will fill the vector with zeros. - */ - - if (!ecl_sum_has_general_var(ecl_sum , var_key)) { - for (int step = 0; step < int_vector_size( time_index ); step++) { - int summary_step = int_vector_iget( time_index , step ); - if (summary_step >= 0) - double_vector_iset( summary->data_vector , summary_step , 0); - } - loadOK = true; - - if (load_fail_action == LOAD_FAIL_WARN) - fprintf(stderr,"** WARNING ** Failed summary:%s does not have key:%s \n",ecl_sum_get_case( ecl_sum ) , var_key); - } else - normal_load = true; - - } - - - if (normal_load) { - int key_index = ecl_sum_get_general_var_params_index( ecl_sum , var_key ); - - for (int store_index = 0; store_index < int_vector_size( time_index ); store_index++) { - int summary_index = int_vector_iget( time_index , store_index ); - - if (summary_index >= 0) { - if (ecl_sum_has_report_step( ecl_sum , summary_index )) { - int last_ministep_index = ecl_sum_iget_report_end( ecl_sum , summary_index ); - double_vector_iset( summary->data_vector , store_index , ecl_sum_iget(ecl_sum , last_ministep_index , key_index )); - } - } - - } - loadOK = true; - } - } - } - - - return loadOK; -} - - - - - - -/* - -Commented out in the preparation for vector storage. - -void summary_set_inflation(summary_type * inflation , const summary_type * std , const summary_type * min_std) { - int size = 1; - for (int i = 0; i < size; i++) - inflation->data[i] = util_double_max( 1.0 , min_std->data[i] / std->data[i]); -} - - -void summary_iadd( summary_type * summary , const summary_type * delta) { - int size = 1; - for (int i = 0; i < size; i++) - summary->data[i] += delta->data[i]; -} - - -void summary_iaddsqr( summary_type * summary , const summary_type * delta) { - int size = 1; - for (int i = 0; i < size; i++) - summary->data[i] += delta->data[i] * delta->data[i]; -} - - -void summary_imul( summary_type * summary , const summary_type * delta) { - int size = 1; - for (int i = 0; i < size; i++) - summary->data[i] *= delta->data[i]; -} - -void summary_scale( summary_type * summary , double scale_factor) { - int size = 1; - for (int i = 0; i < size; i++) - summary->data[i] *= scale_factor; -} - -void summary_isqrt( summary_type * summary ) { - int size = 1; - for (int i = 0; i < size; i++) - summary->data[i] = sqrt( summary->data[i] ); -} -*/ - - - - -/******************************************************************/ -/* Anonumously generated functions used by the enkf_node object */ -/******************************************************************/ -UTIL_SAFE_CAST_FUNCTION(summary , SUMMARY) -UTIL_SAFE_CAST_FUNCTION_CONST(summary , SUMMARY) -VOID_ALLOC(summary) -VOID_FREE(summary) -VOID_COPY (summary) -VOID_FORWARD_LOAD(summary) -VOID_FORWARD_LOAD_VECTOR(summary) -VOID_USER_GET(summary) -VOID_USER_GET_VECTOR(summary) -VOID_WRITE_TO_BUFFER(summary) -VOID_READ_FROM_BUFFER(summary) -VOID_SERIALIZE(summary) -VOID_DESERIALIZE(summary) -VOID_CLEAR(summary) -VOID_HAS_DATA(summary) -/* -VOID_SET_INFLATION(summary) -VOID_IADD(summary) -VOID_SCALE(summary) -VOID_IMUL(summary) -VOID_IADDSQR(summary) -VOID_ISQRT(summary) -*/ diff --git a/ThirdParty/Ert/libenkf/src/summary_config.c b/ThirdParty/Ert/libenkf/src/summary_config.c deleted file mode 100644 index 061fcb5dfc..0000000000 --- a/ThirdParty/Ert/libenkf/src/summary_config.c +++ /dev/null @@ -1,142 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'summary_config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include -#include -#include - - -#define SUMMARY_CONFIG_TYPE_ID 63106 - -struct summary_config_struct { - int __type_id; - bool vector_storage; - load_fail_type load_fail; - ecl_smspec_var_type var_type; /* The type of the variable - according to ecl_summary nomenclature. */ - char * var; /* This is ONE variable of summary.x format - i.e. WOPR:OP_2, RPR:4, ... */ - set_type * obs_set; /* Set of keys (which fit in enkf_obs) which are observations of this node. */ -}; - - -/*****************************************************************/ - -UTIL_IS_INSTANCE_FUNCTION(summary_config , SUMMARY_CONFIG_TYPE_ID) - -const char * summary_config_get_var(const summary_config_type * config) { - return config->var; -} - - -ecl_smspec_var_type summary_config_get_var_type(summary_config_type * config , const ecl_sum_type * ecl_sum) { - return config->var_type; -} - - -bool summary_config_get_vector_storage( const summary_config_type * config) { - return config->vector_storage; -} - - -load_fail_type summary_config_get_load_fail_mode( const summary_config_type * config) { - return config->load_fail; -} - -/** - Unfortunately it is a bit problematic to set the required flag to - TRUE for well and group variables because they do not exist in the - summary results before the well has actually opened, i.e. for a - partial summary case the results will not be there, and the loader - will incorrectly(?) signal failure. -*/ - -void summary_config_set_load_fail_mode( summary_config_type * config , load_fail_type load_fail) { - if ((config->var_type == ECL_SMSPEC_WELL_VAR) || (config->var_type == ECL_SMSPEC_GROUP_VAR)) - // For well and group variables load_fail will be LOAD_FAIL_SILENT anyway. - config->load_fail = LOAD_FAIL_SILENT; - else - config->load_fail = load_fail; -} - - -/** - This can only be used to increase the load_fail strictness. -*/ - -void summary_config_update_load_fail_mode( summary_config_type * config , load_fail_type load_fail) { - if (load_fail > config->load_fail) - summary_config_set_load_fail_mode( config , load_fail ); -} - - -summary_config_type * summary_config_alloc(const char * var , bool vector_storage , load_fail_type load_fail) { - summary_config_type * config = util_malloc(sizeof *config ); - config->__type_id = SUMMARY_CONFIG_TYPE_ID; - config->var = util_alloc_string_copy( var ); - config->var_type = ecl_smspec_identify_var_type( var ); - config->obs_set = set_alloc_empty(); - config->vector_storage = vector_storage; - summary_config_set_load_fail_mode( config , load_fail); - return config; -} - - -void summary_config_add_obs_key(summary_config_type * config, const char * obs_key) { - set_add_key(config->obs_set , obs_key); -} - - - -void summary_config_free(summary_config_type * config) { - free(config->var); - set_free(config->obs_set); - free(config); -} - - - -int summary_config_get_byte_size(const summary_config_type * config) { - return sizeof(double); -} - - -int summary_config_get_data_size( const summary_config_type * config) { - return 1; -} - - - - - - -/*****************************************************************/ -UTIL_SAFE_CAST_FUNCTION(summary_config , SUMMARY_CONFIG_TYPE_ID) -UTIL_SAFE_CAST_FUNCTION_CONST(summary_config , SUMMARY_CONFIG_TYPE_ID) -VOID_GET_DATA_SIZE(summary) -VOID_CONFIG_FREE(summary) - diff --git a/ThirdParty/Ert/libenkf/src/summary_key_matcher.c b/ThirdParty/Ert/libenkf/src/summary_key_matcher.c deleted file mode 100644 index 3e7e4dcdbf..0000000000 --- a/ThirdParty/Ert/libenkf/src/summary_key_matcher.c +++ /dev/null @@ -1,77 +0,0 @@ -#include - -#include -#include - -#include -#include -#include -#include - -#include - - - -#define SUMMARY_KEY_MATCHER_TYPE_ID 700672137 - -struct summary_key_matcher_struct { - UTIL_TYPE_ID_DECLARATION; - hash_type * key_set; -}; - - -UTIL_IS_INSTANCE_FUNCTION( summary_key_matcher , SUMMARY_KEY_MATCHER_TYPE_ID ) - - -summary_key_matcher_type * summary_key_matcher_alloc() { - summary_key_matcher_type * matcher = util_malloc(sizeof * matcher); - UTIL_TYPE_ID_INIT( matcher , SUMMARY_KEY_MATCHER_TYPE_ID); - matcher->key_set = hash_alloc(); - return matcher; -} - -void summary_key_matcher_free(summary_key_matcher_type * matcher) { - hash_free(matcher->key_set); - free(matcher); -} - -int summary_key_matcher_get_size(const summary_key_matcher_type * matcher) { - return hash_get_size( matcher->key_set ); -} - -void summary_key_matcher_add_summary_key(summary_key_matcher_type * matcher, const char * summary_key) { - if(!hash_has_key(matcher->key_set, summary_key)) { - hash_insert_int(matcher->key_set, summary_key, !util_string_has_wildcard(summary_key)); - } -} - -bool summary_key_matcher_match_summary_key(const summary_key_matcher_type * matcher, const char * summary_key) { - stringlist_type * keys = hash_alloc_stringlist(matcher->key_set); - bool has_key = false; - - for (int i = 0; i < stringlist_get_size(keys); i++) { - const char * pattern = stringlist_iget(keys, i); - if(util_fnmatch(pattern, summary_key) == 0) { - has_key = true; - break; - } - } - - stringlist_free(keys); - - return has_key; -} - -stringlist_type * summary_key_matcher_get_keys(const summary_key_matcher_type * matcher) { - return hash_alloc_stringlist(matcher->key_set); -} - -bool summary_key_matcher_summary_key_is_required(const summary_key_matcher_type * matcher, const char * summary_key) { - bool is_required = false; - - if(!util_string_has_wildcard(summary_key) && hash_has_key(matcher->key_set, summary_key)) { - is_required = (bool) hash_get_int(matcher->key_set, summary_key); - } - - return is_required; -} \ No newline at end of file diff --git a/ThirdParty/Ert/libenkf/src/summary_key_set.c b/ThirdParty/Ert/libenkf/src/summary_key_set.c deleted file mode 100644 index 97a6d4de93..0000000000 --- a/ThirdParty/Ert/libenkf/src/summary_key_set.c +++ /dev/null @@ -1,170 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - The file 'state_map.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#define _GNU_SOURCE /* Must define this to get access to pthread_rwlock_t */ -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - - -#define SUMMARY_KEY_SET_TYPE_ID 700672133 - -struct summary_key_set_struct { - UTIL_TYPE_ID_DECLARATION; - hash_type * key_set; - pthread_rwlock_t rw_lock; - bool read_only; -}; - - -UTIL_IS_INSTANCE_FUNCTION( summary_key_set , SUMMARY_KEY_SET_TYPE_ID ) - - -summary_key_set_type * summary_key_set_alloc() { - summary_key_set_type * set = util_malloc(sizeof * set); - UTIL_TYPE_ID_INIT( set , SUMMARY_KEY_SET_TYPE_ID); - set->key_set = hash_alloc(); - pthread_rwlock_init( &set->rw_lock , NULL); - set->read_only = false; - return set; -} - -summary_key_set_type * summary_key_set_alloc_from_file(const char * filename, bool read_only) { - summary_key_set_type * set = summary_key_set_alloc(); - summary_key_set_fread(set, filename); - set->read_only = read_only; - return set; -} - -void summary_key_set_free(summary_key_set_type * set) { - hash_free(set->key_set); - free(set); -} - -int summary_key_set_get_size(summary_key_set_type * set) { - int size; - pthread_rwlock_rdlock( &set->rw_lock ); - { - size = hash_get_size( set->key_set ); - } - pthread_rwlock_unlock( &set->rw_lock ); - return size; -} - - -bool summary_key_set_add_summary_key(summary_key_set_type * set, const char * summary_key) { - bool writable_and_non_existent = true; - - pthread_rwlock_wrlock( &set->rw_lock); - { - - if(hash_has_key(set->key_set, summary_key)) { - writable_and_non_existent = false; - } - - if(set->read_only) { - writable_and_non_existent = false; - } - - if(writable_and_non_existent) { - hash_insert_int(set->key_set, summary_key, 1); - } - } - pthread_rwlock_unlock( &set->rw_lock ); - - return writable_and_non_existent; -} - -bool summary_key_set_has_summary_key(summary_key_set_type * set, const char * summary_key) { - bool has_key = false; - - pthread_rwlock_rdlock( &set->rw_lock ); - { - has_key = hash_has_key(set->key_set, summary_key); - } - pthread_rwlock_unlock( &set->rw_lock ); - - return has_key; -} - -stringlist_type * summary_key_set_alloc_keys(summary_key_set_type * set) { - stringlist_type * keys; - - pthread_rwlock_rdlock( &set->rw_lock ); - { - keys = hash_alloc_stringlist(set->key_set); - } - pthread_rwlock_unlock( &set->rw_lock ); - - return keys; -} - - -bool summary_key_set_is_read_only(const summary_key_set_type * set) { - return set->read_only; -} - -void summary_key_set_fwrite(summary_key_set_type * set, const char * filename) { - pthread_rwlock_rdlock( &set->rw_lock ); - { - FILE * stream = util_mkdir_fopen(filename , "w"); - if (stream) { - stringlist_type * keys = hash_alloc_stringlist(set->key_set); - stringlist_fwrite(keys, stream); - stringlist_free(keys); - fclose( stream ); - } else { - util_abort("%s: failed to open: %s for writing \n", __func__, filename); - } - } - pthread_rwlock_unlock( &set->rw_lock ); -} - -bool summary_key_set_fread(summary_key_set_type * set, const char * filename) { - bool file_exists = false; - pthread_rwlock_wrlock( &set->rw_lock ); - { - hash_clear(set->key_set); - - if (util_file_exists(filename)) { - FILE * stream = util_fopen(filename, "r"); - if (stream) { - stringlist_type * key_set = stringlist_fread_alloc(stream); - - for (int i = 0; i < stringlist_get_size(key_set); i++) { - hash_insert_int(set->key_set, stringlist_iget(key_set, i), 1); - } - stringlist_free(key_set); - fclose( stream ); - } else { - util_abort("%s: failed to open: %s for reading \n",__func__ , filename ); - } - file_exists = true; - } - } - pthread_rwlock_unlock( &set->rw_lock ); - return file_exists; -} diff --git a/ThirdParty/Ert/libenkf/src/summary_obs.c b/ThirdParty/Ert/libenkf/src/summary_obs.c deleted file mode 100644 index 933090a57a..0000000000 --- a/ThirdParty/Ert/libenkf/src/summary_obs.c +++ /dev/null @@ -1,228 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'summary_obs.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -/** - See the overview documentation of the observation system in enkf_obs.c -*/ -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - - -#define SUMMARY_OBS_TYPE_ID 66103 -#define OBS_SIZE 1 - -struct summary_obs_struct { - UTIL_TYPE_ID_DECLARATION; - char * summary_key; /** The observation, in summary.x syntax, e.g. GOPR:FIELD. */ - char * obs_key; - - double value; /** Observation value. */ - double std; /** Standard deviation of observation. */ - double std_scaling; - - auto_corrf_ftype * auto_corrf; - double auto_corrf_param; -}; - - - -static double auto_corrf_exp( double tlag , double param ) { - return exp(-fabs(tlag) / param ); -} - -static double auto_corrf_gauss( double tlag , double param ) { - double x = tlag / param; - return exp(-0.5 * x * x); -} - - - -static auto_corrf_ftype * summary_obs_lookup_auto_corrf( const char * fname ) { - if (fname == NULL) - return NULL; - else { - if (strcmp( fname , AUTO_CORRF_EXP) == 0) - return auto_corrf_exp; - else if (strcmp( fname , AUTO_CORRF_GAUSS) == 0) - return auto_corrf_gauss; - else { - util_abort("%s: correlation function:%s not recognized \n",__func__ , fname); - return NULL; /* Compiler shut up. */ - } - } -} - - - - -/** - This function allocates a summary_obs instance. The summary_key - string should be of the format used by the summary.x program. - E.g., WOPR:P4 would condition on WOPR in well P4. - - Observe that this format is currently *not* checked before the actual - observation time. - - TODO - Should check summary_key on alloc. -*/ -summary_obs_type * summary_obs_alloc(const char * summary_key, - const char * obs_key , - double value , - double std , - const char * auto_corrf_name , - double auto_corrf_param) { - - summary_obs_type * obs = util_malloc(sizeof * obs ); - UTIL_TYPE_ID_INIT( obs , SUMMARY_OBS_TYPE_ID ) - - obs->summary_key = util_alloc_string_copy( summary_key ); - obs->obs_key = util_alloc_string_copy( obs_key ); - obs->value = value; - obs->std = std; - obs->std_scaling = 1.0; - obs->auto_corrf = summary_obs_lookup_auto_corrf( auto_corrf_name ); - obs->auto_corrf_param = auto_corrf_param; - - return obs; -} - - -static UTIL_SAFE_CAST_FUNCTION_CONST(summary_obs , SUMMARY_OBS_TYPE_ID); -static UTIL_SAFE_CAST_FUNCTION(summary_obs , SUMMARY_OBS_TYPE_ID); -UTIL_IS_INSTANCE_FUNCTION(summary_obs , SUMMARY_OBS_TYPE_ID); - - -void summary_obs_free(summary_obs_type * summary_obs) { - free(summary_obs->summary_key); - free(summary_obs->obs_key); - free(summary_obs); -} - - - - - -auto_corrf_ftype * summary_obs_get_auto_corrf( const summary_obs_type * summary_obs ) { - return summary_obs->auto_corrf; -} - -double summary_obs_get_auto_corrf_param( const summary_obs_type * summary_obs ) { - return summary_obs->auto_corrf_param; -} - - - - - -const char * summary_obs_get_summary_key(const summary_obs_type * summary_obs) -{ - return summary_obs->summary_key; -} - - -/** - Hardcodes an assumption that the size of summary data|observations - is always one; i.e. PARTLY_ACTIVE and ALL_ACTIVE are treated in the - same manner. -*/ -void summary_obs_get_observations(const summary_obs_type * summary_obs, - obs_data_type * obs_data, - enkf_fs_type * fs, - int report_step , - const active_list_type * __active_list) { - - int active_size = active_list_get_active_size( __active_list , OBS_SIZE ); - if (active_size == 1) { - obs_block_type * obs_block = obs_data_add_block( obs_data , summary_obs->obs_key , OBS_SIZE , NULL , false); - obs_block_iset( obs_block , 0 , summary_obs->value , summary_obs->std * summary_obs->std_scaling); - } -} - - - -void summary_obs_measure(const summary_obs_type * obs, const summary_type * summary, node_id_type node_id , meas_data_type * meas_data , const active_list_type * __active_list) { - int active_size = active_list_get_active_size( __active_list , OBS_SIZE ); - if (active_size == 1) { - meas_block_type * meas_block = meas_data_add_block( meas_data , obs->obs_key , node_id.report_step , active_size ); - meas_block_iset( meas_block , node_id.iens , 0 , summary_get(summary, node_id.report_step )); - } -} - - - -double summary_obs_chi2(const summary_obs_type * obs, - const summary_type * summary, - node_id_type node_id) { - double x = (summary_get(summary , node_id.report_step) - obs->value) / obs->std; - return x*x; -} - - - -void summary_obs_user_get(const summary_obs_type * summary_obs , const char * index_key , double * value , double * std, bool * valid) { - *valid = true; - *value = summary_obs->value; - *std = summary_obs->std; -} - - - -double summary_obs_get_value( const summary_obs_type * summary_obs ) { - return summary_obs->value; -} - -double summary_obs_get_std( const summary_obs_type * summary_obs ) { - return summary_obs->std; -} - -double summary_obs_get_std_scaling( const summary_obs_type * summary_obs ) { - return summary_obs->std_scaling; -} - - -void summary_obs_update_std_scale(summary_obs_type * summary_obs, double std_multiplier , const active_list_type * active_list) { - if (active_list_get_mode( active_list ) == ALL_ACTIVE) - summary_obs->std_scaling = std_multiplier; - else { - int size = active_list_get_active_size( active_list , OBS_SIZE ); - if (size > 0) - summary_obs->std_scaling = std_multiplier; - } -} - - -/*****************************************************************/ - -VOID_FREE(summary_obs) -VOID_GET_OBS(summary_obs) -VOID_USER_GET_OBS(summary_obs) -VOID_MEASURE(summary_obs , summary) -VOID_CHI2(summary_obs , summary) -VOID_UPDATE_STD_SCALE(summary_obs); diff --git a/ThirdParty/Ert/libenkf/src/surface.c b/ThirdParty/Ert/libenkf/src/surface.c deleted file mode 100644 index 38b225a4e0..0000000000 --- a/ThirdParty/Ert/libenkf/src/surface.c +++ /dev/null @@ -1,230 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'surface.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - - -/*****************************************************************/ - - -struct surface_struct { - int __type_id; /* Only used for run_time checking. */ - surface_config_type * config; /* Can not be NULL - var_type is set on first load. */ - double * data; /* Size is always one - but what the fuck ... */ -}; - - - - -void surface_clear(surface_type * surface) { - const int data_size = surface_config_get_data_size( surface->config ); - for (int k=0; k < data_size; k++) - surface->data[k] = 0; -} - -bool surface_fload( surface_type * surface , const char * filename ) { - bool ret = false; - if (filename) { - const geo_surface_type * base_surface = surface_config_get_base_surface( surface->config ); - ret = geo_surface_fload_irap_zcoord( base_surface , filename , surface->data ); - } - return ret; -} - - - -bool surface_initialize(surface_type *surface , int iens , const char * filename , rng_type * rng) { - return surface_fload(surface , filename ); -} - - -surface_type * surface_alloc(const surface_config_type * surface_config) { - surface_type * surface = util_malloc(sizeof *surface); - surface->__type_id = SURFACE; - surface->config = (surface_config_type *) surface_config; - { - const int data_size = surface_config_get_data_size( surface_config ); - surface->data = util_calloc( data_size , sizeof * surface->data ); - } - return surface; -} - - - - -void surface_copy(const surface_type *src , surface_type * target) { - if (src->config == target->config) { - const int data_size = surface_config_get_data_size( src->config ); - for (int k=0; k < data_size; k++) - target->data[k] = src->data[k]; - } else - util_abort("%s: do not share config objects \n",__func__); -} - - - - -void surface_read_from_buffer(surface_type * surface , buffer_type * buffer, enkf_fs_type * fs, int report_step) { - int size = surface_config_get_data_size( surface->config ); - enkf_util_assert_buffer_type( buffer , SURFACE ); - buffer_fread( buffer , surface->data , sizeof * surface->data , size); -} - - - - - - -bool surface_write_to_buffer(const surface_type * surface , buffer_type * buffer, int report_step) { - int size = surface_config_get_data_size( surface->config ); - buffer_fwrite_int( buffer , SURFACE ); - buffer_fwrite( buffer , surface->data , sizeof * surface->data , size); - return true; -} - - -void surface_free(surface_type *surface) { - free(surface->data); - free(surface); -} - - - - -void surface_serialize(const surface_type * surface , node_id_type node_id , const active_list_type * active_list , matrix_type * A , int row_offset , int column) { - const surface_config_type *config = surface->config; - const int data_size = surface_config_get_data_size(config ); - - enkf_matrix_serialize( surface->data , data_size , ECL_DOUBLE_TYPE , active_list , A , row_offset , column); -} - - - -void surface_deserialize(surface_type * surface , node_id_type node_id , const active_list_type * active_list , const matrix_type * A , int row_offset , int column) { - const surface_config_type *config = surface->config; - const int data_size = surface_config_get_data_size(config ); - - enkf_matrix_deserialize( surface->data , data_size , ECL_DOUBLE_TYPE , active_list , A , row_offset , column); -} - - -void surface_ecl_write(const surface_type * surface , const char * run_path , const char * base_file , void * filestream) { - char * target_file = util_alloc_filename( run_path , base_file , NULL); - surface_config_ecl_write( surface->config , target_file , surface->data ); - free( target_file ); -} - - -bool surface_user_get(const surface_type * surface , const char * index_key , int report_step , double * value) { - const int data_size = surface_config_get_data_size( surface->config ); - int index; - - *value = 0.0; - - if (util_sscanf_int( index_key , &index)) - if ((index >= 0) && (index < data_size)) { - *value = surface->data[index]; - return true; - } - - // Not valid - return false; -} - - - -void surface_set_inflation(surface_type * inflation , const surface_type * std , const surface_type * min_std) { - int size = 1; - for (int i = 0; i < size; i++) - inflation->data[i] = util_double_max( 1.0 , min_std->data[i] / std->data[i]); -} - - -void surface_iadd( surface_type * surface , const surface_type * delta) { - int size = 1; - for (int i = 0; i < size; i++) - surface->data[i] += delta->data[i]; -} - - -void surface_iaddsqr( surface_type * surface , const surface_type * delta) { - int size = 1; - for (int i = 0; i < size; i++) - surface->data[i] += delta->data[i] * delta->data[i]; -} - - -void surface_imul( surface_type * surface , const surface_type * delta) { - int size = 1; - for (int i = 0; i < size; i++) - surface->data[i] *= delta->data[i]; -} - -void surface_scale( surface_type * surface , double scale_factor) { - int size = 1; - for (int i = 0; i < size; i++) - surface->data[i] *= scale_factor; -} - -void surface_isqrt( surface_type * surface ) { - int size = 1; - for (int i = 0; i < size; i++) - surface->data[i] = sqrt( surface->data[i] ); -} - - - - - -/******************************************************************/ -/* Anonumously generated functions used by the enkf_node object */ -/******************************************************************/ -UTIL_SAFE_CAST_FUNCTION(surface , SURFACE) -UTIL_SAFE_CAST_FUNCTION_CONST(surface , SURFACE) -VOID_ALLOC(surface) -VOID_FREE(surface) -VOID_ECL_WRITE(surface) -VOID_COPY(surface) -VOID_USER_GET(surface) -VOID_WRITE_TO_BUFFER(surface) -VOID_READ_FROM_BUFFER(surface) -VOID_SERIALIZE(surface) -VOID_DESERIALIZE(surface) -VOID_INITIALIZE(surface) -VOID_SET_INFLATION(surface) -VOID_CLEAR(surface) -VOID_IADD(surface) -VOID_SCALE(surface) -VOID_IMUL(surface) -VOID_IADDSQR(surface) -VOID_ISQRT(surface) -VOID_FLOAD(surface) diff --git a/ThirdParty/Ert/libenkf/src/surface_config.c b/ThirdParty/Ert/libenkf/src/surface_config.c deleted file mode 100644 index 0d494f056a..0000000000 --- a/ThirdParty/Ert/libenkf/src/surface_config.c +++ /dev/null @@ -1,81 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'surface_config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include - -#include - -#include -#include -#include - -#define SURFACE_CONFIG_TYPE_ID 853317 - -struct surface_config_struct { - UTIL_TYPE_ID_DECLARATION; - geo_surface_type * base_surface; -}; - - - -surface_config_type * surface_config_alloc_empty( ) { - surface_config_type * config = util_malloc( sizeof * config ); - UTIL_TYPE_ID_INIT( config , SURFACE_CONFIG_TYPE_ID ); - config->base_surface = NULL; - return config; -} - - - -void surface_config_free( surface_config_type * config ) { - if (config->base_surface != NULL) - geo_surface_free( config->base_surface ); - - free( config ); -} - - -void surface_config_set_base_surface( surface_config_type * config , const char * base_surface ) { - if (config->base_surface != NULL) - geo_surface_free( config->base_surface ); - config->base_surface = geo_surface_fload_alloc_irap( base_surface , false ); -} - - -const geo_surface_type * surface_config_get_base_surface( const surface_config_type * config ) { - return config->base_surface; -} - - -int surface_config_get_data_size( const surface_config_type * config ) { - return geo_surface_get_size( config->base_surface ); -} - -void surface_config_ecl_write( const surface_config_type * config , const char * filename , const double * zcoord) { - geo_surface_fprintf_irap_external_zcoord( config->base_surface , filename , zcoord ); -} - - -/*****************************************************************/ -UTIL_SAFE_CAST_FUNCTION(surface_config , SURFACE_CONFIG_TYPE_ID) -UTIL_SAFE_CAST_FUNCTION_CONST(surface_config , SURFACE_CONFIG_TYPE_ID) -VOID_GET_DATA_SIZE(surface) -VOID_CONFIG_FREE(surface) - - diff --git a/ThirdParty/Ert/libenkf/src/test.c b/ThirdParty/Ert/libenkf/src/test.c deleted file mode 100644 index bf1d8fd9c8..0000000000 --- a/ThirdParty/Ert/libenkf/src/test.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - - -int main(void) { -} - - - diff --git a/ThirdParty/Ert/libenkf/src/time_map.c b/ThirdParty/Ert/libenkf/src/time_map.c deleted file mode 100644 index 4c7e37fdaf..0000000000 --- a/ThirdParty/Ert/libenkf/src/time_map.c +++ /dev/null @@ -1,714 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - The file 'time_map.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#define _GNU_SOURCE /* Must define this to get access to pthread_rwlock_t */ -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include - -#define DEFAULT_TIME -1 - -static time_t time_map_iget__( const time_map_type * map , int step ); -static void time_map_update_abort( time_map_type * map , int step , time_t time); -static void time_map_summary_update_abort( time_map_type * map , const ecl_sum_type * ecl_sum); - -#define TIME_MAP_TYPE_ID 7751432 -struct time_map_struct { - UTIL_TYPE_ID_DECLARATION; - time_t_vector_type * map; - pthread_rwlock_t rw_lock; - bool modified; - bool read_only; - bool strict; - const ecl_sum_type * refcase; -}; - - -UTIL_SAFE_CAST_FUNCTION( time_map , TIME_MAP_TYPE_ID ) -UTIL_IS_INSTANCE_FUNCTION( time_map , TIME_MAP_TYPE_ID ) - - -time_map_type * time_map_alloc( ) { - time_map_type * map = util_malloc( sizeof * map ); - UTIL_TYPE_ID_INIT( map , TIME_MAP_TYPE_ID ); - - map->map = time_t_vector_alloc(0 , DEFAULT_TIME ); - map->modified = false; - map->read_only = false; - map->strict = true; - map->refcase = NULL; - pthread_rwlock_init( &map->rw_lock , NULL); - return map; -} - -bool time_map_is_strict( const time_map_type * time_map ){ - return time_map->strict; -} - -/** - The refcase will only be attached if it is consistent with the - current time map; we will accept attaching a refcase which is - shorter than the current case. -*/ -bool time_map_attach_refcase( time_map_type * time_map , const ecl_sum_type * refcase) { - bool attach_ok = true; - pthread_rwlock_rdlock( &time_map->rw_lock ); - - { - int step; - int max_step = util_int_min( time_map_get_size(time_map) , ecl_sum_get_last_report_step( refcase ) + 1); - - for (step = 0; step < max_step; step++) { - time_t current_time = time_map_iget__( time_map , step ); - time_t sim_time = ecl_sum_get_report_time( refcase , step ); - - if (current_time != sim_time) { - attach_ok = false; - break; - } - } - - if (attach_ok) - time_map->refcase = refcase; - } - pthread_rwlock_unlock( &time_map->rw_lock ); - - return attach_ok; -} - -bool time_map_has_refcase( const time_map_type * time_map ) { - if (time_map->refcase) - return true; - else - return false; -} - - -void time_map_set_strict( time_map_type * time_map , bool strict) { - time_map->strict = strict; -} - - -time_map_type * time_map_fread_alloc_readonly( const char * filename) { - time_map_type * tm = time_map_alloc(); - - if (util_file_exists(filename)) - time_map_fread( tm , filename ); - tm->read_only = true; - - return tm; -} - - -bool time_map_fscanf(time_map_type * map , const char * filename) { - bool fscanf_ok = true; - if (util_is_file( filename )) { - time_t_vector_type * time_vector = time_t_vector_alloc(0,0); - - { - FILE * stream = util_fopen(filename , "r"); - time_t last_date = 0; - while (true) { - char date_string[128]; - if (fscanf(stream , "%s" , date_string) == 1) { - time_t date; - if (util_sscanf_date_utc(date_string , &date)) { - if (date > last_date) - time_t_vector_append( time_vector , date ); - else { - fprintf(stderr,"** ERROR: The dates in %s must be in stricly increasing order\n",filename); - fscanf_ok = false; - break; - } - } else { - fprintf(stderr,"** ERROR: The string \'%s\' was not correctly parsed as a date (format: DD/MM/YYYY) ",date_string); - fscanf_ok = false; - break; - } - last_date = date; - } else - break; - } - fclose( stream ); - - if (fscanf_ok) { - int i; - time_map_clear( map ); - for (i=0; i < time_t_vector_size( time_vector ); i++) - time_map_update( map , i , time_t_vector_iget( time_vector , i )); - } - - } - time_t_vector_free( time_vector ); - } else - fscanf_ok = false; - - return fscanf_ok; -} - - -bool time_map_equal( const time_map_type * map1 , const time_map_type * map2) { - return time_t_vector_equal( map1->map , map2->map ); -} - - -void time_map_free( time_map_type * map ) { - time_t_vector_free( map->map ); - free( map ); -} - - -bool time_map_is_readonly( const time_map_type * tm) { - return tm->read_only; -} - - - -/** - Must hold the write lock. When a refcase is supplied we gurantee - that all values written into the map agree with the refcase - values. However the time map is not preinitialized with the refcase - values. -*/ - -static bool time_map_update__( time_map_type * map , int step , time_t update_time) { - bool updateOK = true; - time_t current_time = time_t_vector_safe_iget( map->map , step); - - if (current_time == DEFAULT_TIME) { - if (map->refcase) { - if (step <= ecl_sum_get_last_report_step( map->refcase )) { - time_t ref_time = ecl_sum_get_report_time( map->refcase , step ); - - if (ref_time != update_time) { - updateOK = false; - ert_log_add_message( 1 , NULL , "Tried to load data where report step/data is incompatible with refcase - ignored" , false); - } - } - } - } else if (current_time != update_time) - updateOK = false; - - - if (updateOK) { - map->modified = true; - time_t_vector_iset( map->map , step , update_time ); - } - - return updateOK; -} - - -static bool time_map_summary_update__( time_map_type * map , const ecl_sum_type * ecl_sum) { - bool updateOK = true; - int first_step = ecl_sum_get_first_report_step( ecl_sum ); - int last_step = ecl_sum_get_last_report_step( ecl_sum ); - int step; - - for (step = first_step; step <= last_step; step++) { - if (ecl_sum_has_report_step(ecl_sum , step)) { - time_t sim_time = ecl_sum_get_report_time( ecl_sum , step ); - - updateOK = (updateOK && time_map_update__( map , step , sim_time )); - } - } - - updateOK = (updateOK && time_map_update__(map , 0 , ecl_sum_get_start_time( ecl_sum ))); - return updateOK; -} - - -static time_t time_map_iget__( const time_map_type * map , int step ) { - return time_t_vector_safe_iget( map->map , step ); -} - - -/*****************************************************************/ - -double time_map_iget_sim_days( time_map_type * map , int step ) { - double days; - - pthread_rwlock_rdlock( &map->rw_lock ); - { - time_t start_time = time_map_iget__( map , 0 ); - time_t sim_time = time_map_iget__( map , step ); - - if (sim_time >= start_time) - days = 1.0 * (sim_time - start_time) / (3600 * 24); - else - days = -1; - } - pthread_rwlock_unlock( &map->rw_lock ); - - return days; -} - - -time_t time_map_iget( time_map_type * map , int step ) { - time_t t; - - pthread_rwlock_rdlock( &map->rw_lock ); - t = time_map_iget__( map , step ); - pthread_rwlock_unlock( &map->rw_lock ); - - return t; -} - -static void time_map_assert_writable( const time_map_type * map) { - if (map->read_only) - util_abort("%s: attempt to modify read-only time-map. \n",__func__); -} - - -/** - Observe that the locking is opposite of the function name; i.e. - the time_map_fwrite() function reads the time_map and takes the - read lock, whereas the time_map_fread() function takes the write - lock. -*/ - -void time_map_fwrite( time_map_type * map , const char * filename ) { - pthread_rwlock_rdlock( &map->rw_lock ); - { - if (map->modified) { - FILE * stream = util_mkdir_fopen(filename , "w"); - time_t_vector_fwrite( map->map , stream ); - fclose( stream ); - } - map->modified = false; - } - pthread_rwlock_unlock( &map->rw_lock ); -} - - -void time_map_fread( time_map_type * map , const char * filename) { - time_map_assert_writable( map ); - pthread_rwlock_wrlock( &map->rw_lock ); - { - if (util_file_exists( filename )) { - FILE * stream = util_fopen( filename , "r"); - time_t_vector_type * file_map = time_t_vector_fread_alloc( stream ); - - for (int step=0; step < time_t_vector_size( file_map ); step++) - time_map_update__( map , step , time_t_vector_iget( file_map , step )); - - time_t_vector_free( file_map ); - fclose( stream ); - } - } - pthread_rwlock_unlock( &map->rw_lock ); - time_map_get_last_step( map ); - map->modified = false; -} - - - - - -/* - Observe that the return value from this function is an inclusive - value; i.e. it should be permissible to ask for results at this report - step. -*/ - -int time_map_get_last_step( time_map_type * map) { - int last_step; - - pthread_rwlock_rdlock( &map->rw_lock ); - last_step = time_t_vector_size( map->map ) - 1; - pthread_rwlock_unlock( &map->rw_lock ); - - return last_step; -} - -int time_map_get_size( time_map_type * map) { - return time_map_get_last_step( map ) + 1; -} - -time_t time_map_get_start_time( time_map_type * map) { - return time_map_iget( map , 0 ); -} - - -time_t time_map_get_end_time( time_map_type * map) { - int last_step = time_map_get_last_step( map ); - return time_map_iget( map , last_step ); -} - -double time_map_get_end_days( time_map_type * map) { - int last_step = time_map_get_last_step( map ); - return time_map_iget_sim_days( map , last_step ); -} - -/*****************************************************************/ - - -bool time_map_update( time_map_type * map , int step , time_t time) { - bool updateOK = time_map_try_update( map , step , time ); - if (!updateOK) { - if (map->strict) - time_map_update_abort(map , step , time); - else - ert_log_add_message(1 , NULL , "Report step/true time inconsistency - data will be ignored" , false); - } - return updateOK; -} - - -bool time_map_try_update( time_map_type * map , int step , time_t time) { - bool updateOK; - time_map_assert_writable( map ); - pthread_rwlock_wrlock( &map->rw_lock ); - { - updateOK = time_map_update__( map , step , time ); - } - pthread_rwlock_unlock( &map->rw_lock ); - return updateOK; -} - - - -bool time_map_summary_update( time_map_type * map , const ecl_sum_type * ecl_sum) { - bool updateOK = time_map_try_summary_update( map , ecl_sum ); - - if (!updateOK) { - if (map->strict) - time_map_summary_update_abort( map , ecl_sum ); - else - ert_log_add_message(1 , NULL , "Report step/true time inconsistency - data will be ignored" , false); - } - - return updateOK; -} - - -bool time_map_try_summary_update( time_map_type * map , const ecl_sum_type * ecl_sum) { - bool updateOK; - - time_map_assert_writable( map ); - pthread_rwlock_wrlock( &map->rw_lock ); - { - updateOK = time_map_summary_update__( map , ecl_sum ); - } - pthread_rwlock_unlock( &map->rw_lock ); - - return updateOK; -} - - -int time_map_lookup_time( time_map_type * map , time_t time) { - int index = -1; - pthread_rwlock_rdlock( &map->rw_lock ); - { - int current_index = 0; - while (true) { - if (current_index >= time_t_vector_size( map->map )) - break; - - if (time_map_iget__( map , current_index ) == time) { - index = current_index; - break; - } - - current_index++; - } - } - pthread_rwlock_unlock( &map->rw_lock ); - return index; -} - -static bool time_map_valid_time__(const time_map_type * map , time_t time) { - if (time_t_vector_size( map->map ) > 0) { - if ((time >= time_map_iget__(map , 0)) && - (time <= time_map_iget__(map , time_t_vector_size( map->map ) - 1))) - return true; - else - return false; - } else - return false; -} - - - -int time_map_lookup_time_with_tolerance( time_map_type * map , time_t time , int seconds_before_tolerance, int seconds_after_tolerance) { - int nearest_index = -1; - pthread_rwlock_rdlock( &map->rw_lock ); - { - if (time_map_valid_time__( map , time )) { - time_t nearest_diff = 999999999999; - int current_index = 0; - while (true) { - time_t diff = time - time_map_iget__( map , current_index ); - if (diff == 0) { - nearest_index = current_index; - break; - } - - if (abs(diff) < nearest_diff) { - bool inside_tolerance = true; - if (seconds_after_tolerance >= 0) { - if (diff >= seconds_after_tolerance) - inside_tolerance = false; - } - - if (seconds_before_tolerance >= 0) { - if (diff <= -seconds_before_tolerance) - inside_tolerance = false; - } - - if (inside_tolerance) { - nearest_diff = diff; - nearest_index = current_index; - } - } - - current_index++; - - if (current_index >= time_t_vector_size( map->map )) - break; - } - } - } - pthread_rwlock_unlock( &map->rw_lock ); - return nearest_index; -} - - - -int time_map_lookup_days( time_map_type * map , double sim_days) { - int index = -1; - pthread_rwlock_rdlock( &map->rw_lock ); - { - if (time_t_vector_size( map->map ) > 0) { - time_t time = time_map_iget__(map , 0 ); - util_inplace_forward_days_utc( &time , sim_days ); - index = time_map_lookup_time( map , time ); - } - } - pthread_rwlock_unlock( &map->rw_lock ); - return index; -} - - -void time_map_clear( time_map_type * map ) { - time_map_assert_writable( map ); - pthread_rwlock_wrlock( &map->rw_lock ); - { - time_t_vector_reset( map->map ); - map->modified = true; - } - pthread_rwlock_unlock( &map->rw_lock ); -} - - -/* - This is a function specifically written to upgrade an on-disk - time_map which is using localtime (fs_version <= 106) to a utc based - time_map (fs_version >= 107). -*/ - -void time_map_summary_upgrade107( time_map_type * map , const ecl_sum_type * ecl_sum) { - int first_step = ecl_sum_get_first_report_step( ecl_sum ); - int last_step = ecl_sum_get_last_report_step( ecl_sum ); - - time_t_vector_resize( map->map , last_step + 1); - time_t_vector_iset_block( map->map , 0 , first_step , DEFAULT_TIME); - for (int step=first_step; step <= last_step; step++) { - if (ecl_sum_has_report_step(ecl_sum , step)) { - time_t sim_time = ecl_sum_get_report_time( ecl_sum , step ); - time_t_vector_iset( map->map , step , sim_time); - } - } - map->modified = true; -} - - -/*****************************************************************/ - -static void time_map_update_abort( time_map_type * map , int step , time_t time) { - time_t current_time = time_map_iget__( map , step ); - int current[3]; - int new[3]; - - util_set_date_values_utc( current_time , ¤t[0] , ¤t[1] , ¤t[2]); - util_set_date_values_utc( time , &new[0] , &new[1] , &new[2]); - - util_abort("%s: time mismatch for step:%d New: %02d/%02d/%04d existing: %02d/%02d/%04d \n",__func__ , step , - new[0] , new[1] , new[2] , - current[0] , current[1] , current[2]); -} - - -static void time_map_summary_update_abort( time_map_type * map , const ecl_sum_type * ecl_sum) { - /* - If the normal summary update fails we just play through all - time steps to pinpoint exactly the step where the update fails. - */ - - int first_step = ecl_sum_get_first_report_step( ecl_sum ); - int last_step = ecl_sum_get_last_report_step( ecl_sum ); - int step; - - for (step = first_step; step <= last_step; step++) { - if (ecl_sum_has_report_step(ecl_sum , step)) { - time_t time = ecl_sum_get_report_time( ecl_sum , step ); - - if (map->refcase) { - if (ecl_sum_get_last_report_step( ecl_sum ) >= step) { - time_t ref_time = ecl_sum_get_report_time( map->refcase , step ); - if (ref_time != time) { - int ref[3]; - int new[3]; - - util_set_date_values_utc( time , &new[0] , &new[1] , &new[2]); - util_set_date_values_utc( ref_time , &ref[0] , &ref[1] , &ref[2]); - - fprintf(stderr," Time mismatch for step:%d New: %02d/%02d/%04d refcase: %02d/%02d/%04d \n", step , - new[0] , new[1] , new[2] , - ref[0] , ref[1] , ref[2]); - } - } - } - - { - time_t current_time = time_map_iget__( map , step ); - int current[3]; - int new[3]; - - util_set_date_values_utc( current_time , ¤t[0] , ¤t[1] , ¤t[2]); - util_set_date_values_utc( time , &new[0] , &new[1] , &new[2]); - - fprintf(stderr,"Time mismatch for step:%d New: %02d/%02d/%04d existing: %02d/%02d/%04d \n",step , - new[0] , new[1] , new[2] , - current[0] , current[1] , current[2]); - } - } - } - - util_abort("%s: inconsistency when updating time map \n",__func__); -} - - - -/*****************************************************************/ - - -/* - This function creates an integer index mapping from the time map - into the summary case. In general the time <-> report step mapping - of the summary data should coincide exactly with the one maintained - in the time_map, however we allow extra timesteps in the summary - instance. The extra timesteps will be ignored, holes in the summary - timestep is not allowed - that will lead to a hard crash. - - time map Summary - ------------------------------------------------- - 0: 01/01/2000 <------- 0: 01/01/2000 - - 1: 01/02/2000 <------- 1: 01/02/2000 - - 2: 01/03/2000 <-\ 2: 02/02/2000 (Ignored) - \ - \-- 3: 01/03/2000 - - 3: 01/04/2000 <------- 4: 01/04/2000 - - - index_map = { 0 , 1 , 3 , 4 } - - Observe that the time_map_update_summary() must be called prior to - calling this function, to ensure that the time_map is sufficiently - long. If timesteps are missing from the summary case we crash hard: - - - time map Summary - ------------------------------------------------- - 0: 01/01/2000 <------- 0: 01/01/2000 - - 1: 01/02/2000 <------- 1: 01/02/2000 - - 2: 01/03/2000 ## ERROR -> util_abort() - - 3: 01/04/2000 <------- 2: 01/04/2000 - -*/ - - - -int_vector_type * time_map_alloc_index_map( time_map_type * map , const ecl_sum_type * ecl_sum ) { - int_vector_type * index_map = int_vector_alloc(0 , -1 ); - pthread_rwlock_rdlock( &map->rw_lock ); - { - int time_map_index = 0; - int sum_index = 0; - - while (true) { - time_t map_time = time_map_iget__( map , time_map_index); - if (map_time == DEFAULT_TIME) - break; - - { - time_t sum_time; - - while (true) { - sum_time = ecl_sum_get_report_time( ecl_sum , sum_index ); - - if (sum_time > map_time) { - int day,month,year; - util_set_date_values_utc( map_time , &day , &month , &year); - util_abort("%s: The eclipse summary cases is missing data for date:%02d/%02d/%4d - aborting\n", __func__ , day , month , year); - } else if (sum_time < map_time) { - sum_index++; - if (sum_index > ecl_sum_get_last_report_step( ecl_sum )) - break; - } else - break; - - } - - if (sum_time == map_time) - int_vector_iset( index_map , time_map_index , sum_index); - else { - ert_log_add_message(1 , NULL , "Inconsistency in time_map - data will be ignored" , false); - break; - } - - - time_map_index++; - if (time_map_index == time_map_get_size( map )) - break; - - } - } - } - pthread_rwlock_unlock( &map->rw_lock ); - - return index_map; -} - - - diff --git a/ThirdParty/Ert/libenkf/src/trans_errf.m b/ThirdParty/Ert/libenkf/src/trans_errf.m deleted file mode 100644 index f88965d8ad..0000000000 --- a/ThirdParty/Ert/libenkf/src/trans_errf.m +++ /dev/null @@ -1,3 +0,0 @@ -function y = trans_errf(x , min , max , skewness , width) - -y = min + (max - min) * 0.5*(1 + erf((x + skewness)/(width * sqrt(2.0)))); diff --git a/ThirdParty/Ert/libenkf/src/trans_func.c b/ThirdParty/Ert/libenkf/src/trans_func.c deleted file mode 100644 index bb6dbe499d..0000000000 --- a/ThirdParty/Ert/libenkf/src/trans_func.c +++ /dev/null @@ -1,416 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'trans_func.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include - -#include -#include -#include - -#include - - - - - - -struct trans_func_struct { - char * name; /* The name this function is registered as. */ - arg_pack_type * params; /* The parameter values registered for this function. */ - transform_ftype * func; /* A pointer to the actual transformation function. */ - validate_ftype * validate; /* A pointer to a a function which can be used to validate the parameters - can be NULL. */ - stringlist_type * param_names; /* A list of the parameter names. */ - bool use_log; -}; - - - - - - -/** - Width = 1 => uniform - Width > 1 => unimodal peaked - Width < 1 => bimoal peaks - - - Skewness < 0 => shifts towards the left - Skewness = 0 => symmetric - Skewness > 0 => Shifts towards the right - - The width is a relavant scale for the value of skewness. -*/ - -static double trans_errf(double x, const arg_pack_type * arg) { - double min = arg_pack_iget_double(arg , 0); - double max = arg_pack_iget_double(arg , 1); - double skewness = arg_pack_iget_double(arg , 2); - double width = arg_pack_iget_double(arg , 3); - double y; - - y = 0.5*(1 + erf((x + skewness)/(width * sqrt(2.0)))); - return min + y * (max - min); -} - - - - -static double trans_const(double x , const arg_pack_type * arg) { - return arg_pack_iget_double(arg , 0); -} - - -static double trans_raw(double x , const arg_pack_type * arg) { - return x; -} - - - -/* Observe that the argument of the shift should be "+" */ -static double trans_derrf(double x , const arg_pack_type * arg) { - int steps = arg_pack_iget_int(arg , 0); - double min = arg_pack_iget_double(arg , 1); - double max = arg_pack_iget_double(arg , 2); - double skewness = arg_pack_iget_double(arg , 3); - double width = arg_pack_iget_double(arg , 4); - double y; - - y = floor( steps * 0.5*(1 + erf((x + skewness)/(width * sqrt(2.0)))) / (steps - 1) ); - return min + y * (max - min); -} - - - - - -static double trans_unif(double x , const arg_pack_type * arg) { - double y; - double min = arg_pack_iget_double(arg , 0); - double max = arg_pack_iget_double(arg , 1); - y = 0.5*(1 + erf(x/sqrt(2.0))); /* 0 - 1 */ - return y * (max - min) + min; -} - - - -static double trans_dunif(double x , const arg_pack_type * arg) { - double y; - int steps = arg_pack_iget_int(arg , 0); - double min = arg_pack_iget_double(arg , 1); - double max = arg_pack_iget_double(arg , 2); - - y = 0.5*(1 + erf(x/sqrt(2.0))); /* 0 - 1 */ - return (floor( y * steps) / (steps - 1)) * (max - min) + min; -} - - - - -static double trans_normal(double x , const arg_pack_type * arg) { - double mu , std; - mu = arg_pack_iget_double(arg , 0 ); - std = arg_pack_iget_double(arg , 1 ); - return x * std + mu; -} - - -static double trans_truncated_normal(double x , const arg_pack_type * arg) { - double mu , std , min , max; - - mu = arg_pack_iget_double(arg , 0 ); - std = arg_pack_iget_double(arg , 1 ); - min = arg_pack_iget_double(arg , 2 ); - max = arg_pack_iget_double(arg , 3 ); - - { - double y = x * std + mu; - util_clamp_double( &y , min , max ); - return y; - } -} - - - - -static double trans_lognormal(double x, const arg_pack_type * arg) { - double mu, std; - mu = arg_pack_iget_double(arg , 0 ); /* The expectation of log( y ) */ - std = arg_pack_iget_double(arg , 1 ); - return exp(x * std + mu); -} - - - -/** - Used to sample values between min and max - BUT it is the logarithm - of y which is uniformly distributed. Relates to the uniform - distribution in the same manner as the lognormal distribution - relates to the normal distribution. -*/ -static double trans_logunif(double x , const arg_pack_type * arg) { - double log_min = log(arg_pack_iget_double(arg , 0)); - double log_max = log(arg_pack_iget_double(arg , 1)); - double log_y; - { - double tmp = 0.5*(1 + erf(x/sqrt(2.0))); /* 0 - 1 */ - log_y = log_min + tmp * (log_max - log_min); /* Shift according to max / min */ - } - return exp(log_y); -} - - - -/*****************************************************************/ - -static trans_func_type * trans_func_alloc_empty( const char * func_name ) { - trans_func_type * trans_func = util_malloc( sizeof * trans_func ); - - - trans_func->params = arg_pack_alloc(); - trans_func->func = NULL; - trans_func->validate = NULL; - trans_func->name = util_alloc_string_copy( func_name ); - trans_func->param_names = stringlist_alloc_new(); - trans_func->use_log = false; - - return trans_func; -} - - -const char * trans_func_get_name( const trans_func_type * trans_func ) { - return trans_func->name; -} - - -const stringlist_type * trans_func_get_param_names( const trans_func_type * trans_func ) { - return trans_func->param_names; -} - -node_ctype trans_func_iget_param_ctype( const trans_func_type * trans_func , int param_index) { - return arg_pack_iget_ctype( trans_func->params , param_index); -} - - -void trans_func_iset_double_param(trans_func_type * trans_func , int param_index , double value ) { - if (arg_pack_iget_ctype( trans_func->params , param_index) == CTYPE_DOUBLE_VALUE) - arg_pack_iset_double( trans_func->params , param_index , value ); - else - util_abort("%s: type mismatch - the does not expect double as argument:%d \n",__func__ , param_index ); -} - -/** - Return true if the _set operation suceeded (i.e. the name was - recognized), and false otherwise. -*/ -bool trans_func_set_double_param( trans_func_type * trans_func , const char * param_name , double value ) { - int param_index = stringlist_find_first( trans_func->param_names , param_name); - if (param_index >= 0) { - arg_pack_iset_double( trans_func->params , param_index , value ); - return true; - } else - return false; -} - - -void trans_func_iset_int_param(trans_func_type * trans_func , int param_index , int value ) { - if (arg_pack_iget_ctype( trans_func->params , param_index) == CTYPE_INT_VALUE) - arg_pack_iset_int( trans_func->params , param_index , value ); - else - util_abort("%s: type mismatch - the does not expect int as argument:%d \n",__func__ , param_index ); -} - -/** - Return true if the _set operation suceeded (i.e. the name was - recognized), and false otherwise. -*/ -bool trans_func_set_int_param( trans_func_type * trans_func , const char * param_name , int value ) { - int param_index = stringlist_find_first( trans_func->param_names , param_name); - if (param_index >= 0) { - arg_pack_iset_int( trans_func->params , param_index , value ); - return true; - } else - return false; -} - - - -void trans_func_free( trans_func_type * trans_func ) { - stringlist_free( trans_func->param_names ); - arg_pack_free( trans_func->params ); - util_safe_free( trans_func->name ); - free( trans_func ); -} - - - - -/** - It is import to append all the parameters (with arbitrary values), - to ensure that the arg_pack registers the right type. -*/ - - -trans_func_type * trans_func_alloc( const char * func_name ) { - trans_func_type * trans_func = trans_func_alloc_empty( func_name ); - { - if (util_string_equal(func_name , "NORMAL")) { - stringlist_append_ref( trans_func->param_names , "MEAN"); - stringlist_append_ref( trans_func->param_names , "STD" ); - arg_pack_append_double( trans_func->params , 0 ); - arg_pack_append_double( trans_func->params , 0 ); - trans_func->func = trans_normal; - } - - if (util_string_equal( func_name , "LOGNORMAL")) { - stringlist_append_ref( trans_func->param_names , "MEAN"); - stringlist_append_ref( trans_func->param_names , "STD" ); - arg_pack_append_double( trans_func->params , 0 ); - arg_pack_append_double( trans_func->params , 0 ); - trans_func->func = trans_lognormal; - trans_func->use_log = true; - } - - if (util_string_equal( func_name , "TRUNCATED_NORMAL")) { - stringlist_append_ref( trans_func->param_names , "MEAN"); - stringlist_append_ref( trans_func->param_names , "STD" ); - stringlist_append_ref( trans_func->param_names , "MIN"); - stringlist_append_ref( trans_func->param_names , "MAX" ); - - arg_pack_append_double( trans_func->params , 0 ); - arg_pack_append_double( trans_func->params , 0 ); - arg_pack_append_double( trans_func->params , 0 ); - arg_pack_append_double( trans_func->params , 0 ); - trans_func->func = trans_truncated_normal; - } - - - if (util_string_equal( func_name , "UNIFORM")) { - stringlist_append_ref( trans_func->param_names , "MIN"); - stringlist_append_ref( trans_func->param_names , "MAX" ); - arg_pack_append_double( trans_func->params , 0 ); - arg_pack_append_double( trans_func->params , 0 ); - trans_func->func = trans_unif; - } - - - if (util_string_equal( func_name , "DUNIF")) { - stringlist_append_ref( trans_func->param_names , "STEPS"); - stringlist_append_ref( trans_func->param_names , "MIN"); - stringlist_append_ref( trans_func->param_names , "MAX" ); - arg_pack_append_int( trans_func->params , 0 ); - arg_pack_append_double( trans_func->params , 0 ); - arg_pack_append_double( trans_func->params , 0 ); - - trans_func->func = trans_dunif; - } - - - if (util_string_equal( func_name , "ERRF")) { - stringlist_append_ref( trans_func->param_names , "MIN"); - stringlist_append_ref( trans_func->param_names , "MAX" ); - stringlist_append_ref( trans_func->param_names , "SKEWNESS"); - stringlist_append_ref( trans_func->param_names , "WIDTH" ); - arg_pack_append_double( trans_func->params , 0 ); - arg_pack_append_double( trans_func->params , 0 ); - arg_pack_append_double( trans_func->params , 0 ); - arg_pack_append_double( trans_func->params , 0 ); - - trans_func->func = trans_errf; - } - - - if (util_string_equal( func_name , "DERRF")) { - stringlist_append_ref( trans_func->param_names , "STEPS"); - stringlist_append_ref( trans_func->param_names , "MIN"); - stringlist_append_ref( trans_func->param_names , "MAX" ); - stringlist_append_ref( trans_func->param_names , "SKEWNESS"); - stringlist_append_ref( trans_func->param_names , "WIDTH" ); - arg_pack_append_int( trans_func->params , 0 ); - arg_pack_append_double( trans_func->params , 0 ); - arg_pack_append_double( trans_func->params , 0 ); - arg_pack_append_double( trans_func->params , 0 ); - arg_pack_append_double( trans_func->params , 0 ); - - trans_func->func = trans_derrf; - } - - - if (util_string_equal( func_name , "LOGUNIF")) { - stringlist_append_ref( trans_func->param_names , "MIN"); - stringlist_append_ref( trans_func->param_names , "MAX" ); - - arg_pack_append_double( trans_func->params , 0 ); - arg_pack_append_double( trans_func->params , 0 ); - trans_func->func = trans_logunif; - trans_func->use_log = true; - } - - - if (util_string_equal( func_name , "CONST")) { - stringlist_append_ref( trans_func->param_names , "VALUE"); - arg_pack_append_double( trans_func->params , 0 ); - trans_func->func = trans_const; - } - - - if (util_string_equal( func_name , "RAW")) { - trans_func->func = trans_raw; - } - - - if (trans_func->func == NULL) - util_exit("%s: Sorry: function name:%s not recognized \n",__func__ , func_name); - } - return trans_func; -} - - - -double trans_func_eval( const trans_func_type * trans_func , double x) { - double y = trans_func->func( x , trans_func->params ); - return y; -} - -bool trans_func_use_log_scale(const trans_func_type * trans_func) { - return trans_func->use_log; -} - - - -trans_func_type * trans_func_fscanf_alloc( FILE * stream, const char * filename ) { - trans_func_type * trans_func; - char * func_name; - - func_name = util_fscanf_alloc_token(stream); - - - if (func_name == NULL) { - fprintf(stderr,"Problem at file:line: %s:%d \n", filename, util_get_current_linenr( stream )); - util_abort("%s: could not locate name of transformation - aborting \n",__func__); - } - - trans_func = trans_func_alloc( func_name ); - arg_pack_fscanf( trans_func->params , stream, filename ); - - free( func_name ); - return trans_func; -} - diff --git a/ThirdParty/Ert/libenkf/src/trans_test.m b/ThirdParty/Ert/libenkf/src/trans_test.m deleted file mode 100644 index 83ff575003..0000000000 --- a/ThirdParty/Ert/libenkf/src/trans_test.m +++ /dev/null @@ -1,12 +0,0 @@ -%% This is matlab file used to test/vizualize the various -%% distributions in trans_func.c - -N = 100000; -x = random('normal',0 , 1 , N ,1); - - - -y = trans_errf(x , 0.1 , 15 , -3 , 2.0); - -disp(sprintf(' = %g' , mean(y))); -hist(y , sqrt(N)) diff --git a/ThirdParty/Ert/libenkf/tests/CMakeLists.txt b/ThirdParty/Ert/libenkf/tests/CMakeLists.txt deleted file mode 100644 index 4f220dc920..0000000000 --- a/ThirdParty/Ert/libenkf/tests/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -include( tests.cmake ) -if (STATOIL_TESTDATA_ROOT) - include( statoil_tests.cmake ) -endif() diff --git a/ThirdParty/Ert/libenkf/tests/data/config/analysis_load_config b/ThirdParty/Ert/libenkf/tests/data/config/analysis_load_config deleted file mode 100644 index 657ba148c3..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/analysis_load_config +++ /dev/null @@ -1 +0,0 @@ -NUM_REALIZATIONS 3 diff --git a/ThirdParty/Ert/libenkf/tests/data/config/analysis_load_site_config b/ThirdParty/Ert/libenkf/tests/data/config/analysis_load_site_config deleted file mode 100644 index c7be2f143e..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/analysis_load_site_config +++ /dev/null @@ -1,2 +0,0 @@ -ANALYSIS_LOAD RML_ENKF_SITE_CONFIG1 rml_enkf.so -ANALYSIS_LOAD RML_ENKF_SITE_CONFIG2 rml_enkf.so diff --git a/ThirdParty/Ert/libenkf/tests/data/config/ert_report_list b/ThirdParty/Ert/libenkf/tests/data/config/ert_report_list deleted file mode 100644 index 270780b1f1..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/ert_report_list +++ /dev/null @@ -1,3 +0,0 @@ -REPORT_TIMEOUT 167 - -REPORT_LARGE TRUE \ No newline at end of file diff --git a/ThirdParty/Ert/libenkf/tests/data/config/forward/ert/FAULT_TEMPLATE b/ThirdParty/Ert/libenkf/tests/data/config/forward/ert/FAULT_TEMPLATE deleted file mode 100644 index de1f12ca5b..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/forward/ert/FAULT_TEMPLATE +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ThirdParty/Ert/libenkf/tests/data/config/forward/ert/MULTFLT.TXT b/ThirdParty/Ert/libenkf/tests/data/config/forward/ert/MULTFLT.TXT deleted file mode 100644 index c193c48528..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/forward/ert/MULTFLT.TXT +++ /dev/null @@ -1 +0,0 @@ -MULTFLT NORMAL 0 1 diff --git a/ThirdParty/Ert/libenkf/tests/data/config/forward/ert/config_GEN_KW_false b/ThirdParty/Ert/libenkf/tests/data/config/forward/ert/config_GEN_KW_false deleted file mode 100644 index d66f17444a..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/forward/ert/config_GEN_KW_false +++ /dev/null @@ -1,8 +0,0 @@ -JOBNAME Job%d -RUNPATH simulations/run%d -NUM_REALIZATIONS 1 - -ENSPATH Storage -JOB_SCRIPT script.sh - -GEN_KW MULTFLT FAULT_TEMPLATE MULTFLT.INC MULTFLT.TXT INIT_FILES:MULTFLT_INIT diff --git a/ThirdParty/Ert/libenkf/tests/data/config/forward/ert/config_GEN_KW_true b/ThirdParty/Ert/libenkf/tests/data/config/forward/ert/config_GEN_KW_true deleted file mode 100644 index cd6b539bbb..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/forward/ert/config_GEN_KW_true +++ /dev/null @@ -1,10 +0,0 @@ -JOBNAME Job%d -RUNPATH simulations/run%d -NUM_REALIZATIONS 1 - -ENSPATH Storage -JOB_SCRIPT script.sh - -GEN_KW MULTFLT FAULT_TEMPLATE MULTFLT.INC MULTFLT.TXT INIT_FILES:MULTFLT_INIT FORWARD_INIT:TRUE - - diff --git a/ThirdParty/Ert/libenkf/tests/data/config/forward/ert/config_GEN_PARAM_false b/ThirdParty/Ert/libenkf/tests/data/config/forward/ert/config_GEN_PARAM_false deleted file mode 100644 index 4454bbab15..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/forward/ert/config_GEN_PARAM_false +++ /dev/null @@ -1,9 +0,0 @@ -JOBNAME Job%d -RUNPATH simulations/run%d -NUM_REALIZATIONS 1 - -ENSPATH Storage -JOB_SCRIPT script.sh - - -GEN_PARAM PARAM PARAM.INC INIT_FILES:PARAM_INIT INPUT_FORMAT:ASCII OUTPUT_FORMAT:ASCII \ No newline at end of file diff --git a/ThirdParty/Ert/libenkf/tests/data/config/forward/ert/config_GEN_PARAM_true b/ThirdParty/Ert/libenkf/tests/data/config/forward/ert/config_GEN_PARAM_true deleted file mode 100644 index 6ba8d1c4f4..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/forward/ert/config_GEN_PARAM_true +++ /dev/null @@ -1,10 +0,0 @@ -JOBNAME Job%d -RUNPATH simulations/run%d -NUM_REALIZATIONS 1 - -ENSPATH Storage -JOB_SCRIPT script.sh - - -GEN_PARAM PARAM PARAM.INC INIT_FILES:PARAM_INIT INPUT_FORMAT:ASCII OUTPUT_FORMAT:ASCII FORWARD_INIT:TRUE - diff --git a/ThirdParty/Ert/libenkf/tests/data/config/forward/ert/script.sh b/ThirdParty/Ert/libenkf/tests/data/config/forward/ert/script.sh deleted file mode 100644 index 2f92a600cf..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/forward/ert/script.sh +++ /dev/null @@ -1 +0,0 @@ -# Completlely stupid - an executable must be present for the testing. diff --git a/ThirdParty/Ert/libenkf/tests/data/config/gen_kw_logarithmic/FAULT_TEMPLATE b/ThirdParty/Ert/libenkf/tests/data/config/gen_kw_logarithmic/FAULT_TEMPLATE deleted file mode 100644 index de1f12ca5b..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/gen_kw_logarithmic/FAULT_TEMPLATE +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ThirdParty/Ert/libenkf/tests/data/config/gen_kw_logarithmic/FAULT_TEMPLATE2 b/ThirdParty/Ert/libenkf/tests/data/config/gen_kw_logarithmic/FAULT_TEMPLATE2 deleted file mode 100644 index bb7d23f1dd..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/gen_kw_logarithmic/FAULT_TEMPLATE2 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ThirdParty/Ert/libenkf/tests/data/config/gen_kw_logarithmic/MULTFLT.TXT b/ThirdParty/Ert/libenkf/tests/data/config/gen_kw_logarithmic/MULTFLT.TXT deleted file mode 100644 index ec7d5e43ed..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/gen_kw_logarithmic/MULTFLT.TXT +++ /dev/null @@ -1 +0,0 @@ -MULTFLT LOGUNIF 0.0001 0.01 diff --git a/ThirdParty/Ert/libenkf/tests/data/config/gen_kw_logarithmic/MULTFLT2.TXT b/ThirdParty/Ert/libenkf/tests/data/config/gen_kw_logarithmic/MULTFLT2.TXT deleted file mode 100644 index d2f6e43865..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/gen_kw_logarithmic/MULTFLT2.TXT +++ /dev/null @@ -1 +0,0 @@ -MULTFLT2 LOGUNIF 0.0000001 0.00001 diff --git a/ThirdParty/Ert/libenkf/tests/data/config/gen_kw_logarithmic/config_GEN_KW_logarithmic b/ThirdParty/Ert/libenkf/tests/data/config/gen_kw_logarithmic/config_GEN_KW_logarithmic deleted file mode 100644 index 8075af97a6..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/gen_kw_logarithmic/config_GEN_KW_logarithmic +++ /dev/null @@ -1,9 +0,0 @@ -JOBNAME Job%d -RUNPATH simulations/run%d -NUM_REALIZATIONS 1 - -ENSPATH Storage -JOB_SCRIPT script.sh - -GEN_KW MULTFLT FAULT_TEMPLATE MULTFLT.INC MULTFLT.TXT -GEN_KW MULTFLT2 FAULT_TEMPLATE2 MULTFLT2.INC MULTFLT2.TXT diff --git a/ThirdParty/Ert/libenkf/tests/data/config/gen_kw_logarithmic/script.sh b/ThirdParty/Ert/libenkf/tests/data/config/gen_kw_logarithmic/script.sh deleted file mode 100644 index 2f92a600cf..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/gen_kw_logarithmic/script.sh +++ /dev/null @@ -1 +0,0 @@ -# Completlely stupid - an executable must be present for the testing. diff --git a/ThirdParty/Ert/libenkf/tests/data/config/gen_kw_plot/Parameters.txt b/ThirdParty/Ert/libenkf/tests/data/config/gen_kw_plot/Parameters.txt deleted file mode 100644 index ba7f5b2386..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/gen_kw_plot/Parameters.txt +++ /dev/null @@ -1,5 +0,0 @@ -PARAM1 CONST 100 -PARAM2 UNIFORM 0 1 -PARAM3 LOGUNIF 0.001 1000 -PARAM4 LOGNORMAL 0.25 100 - diff --git a/ThirdParty/Ert/libenkf/tests/data/config/gen_kw_plot/Template.tmpl b/ThirdParty/Ert/libenkf/tests/data/config/gen_kw_plot/Template.tmpl deleted file mode 100644 index ff8e16240d..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/gen_kw_plot/Template.tmpl +++ /dev/null @@ -1 +0,0 @@ --- Template; not used \ No newline at end of file diff --git a/ThirdParty/Ert/libenkf/tests/data/config/gen_kw_plot/config b/ThirdParty/Ert/libenkf/tests/data/config/gen_kw_plot/config deleted file mode 100644 index f043581fe5..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/gen_kw_plot/config +++ /dev/null @@ -1,2 +0,0 @@ -NUM_REALIZATIONS 25 -GEN_KW GEN_KW Template.tmpl Target.inc Parameters.txt \ No newline at end of file diff --git a/ThirdParty/Ert/libenkf/tests/data/config/rng b/ThirdParty/Ert/libenkf/tests/data/config/rng deleted file mode 100644 index ad8ee50cb1..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/rng +++ /dev/null @@ -1,6 +0,0 @@ -NUM_REALIZATIONS 25 -STORE_SEED seed2 -LOAD_SEED seed2 - --- The settings below here are artifacts which should not be necessary ... -JOB_SCRIPT script.sh diff --git a/ThirdParty/Ert/libenkf/tests/data/config/runpath_list/ARGECHO_JOB b/ThirdParty/Ert/libenkf/tests/data/config/runpath_list/ARGECHO_JOB deleted file mode 100644 index 9cd8129c85..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/runpath_list/ARGECHO_JOB +++ /dev/null @@ -1,2 +0,0 @@ -INTERNAL FALSE -EXECUTABLE arg_echo.sh diff --git a/ThirdParty/Ert/libenkf/tests/data/config/runpath_list/ARGECHO_WF b/ThirdParty/Ert/libenkf/tests/data/config/runpath_list/ARGECHO_WF deleted file mode 100644 index 2eef71ca9b..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/runpath_list/ARGECHO_WF +++ /dev/null @@ -1 +0,0 @@ -ARGECHO_JOB runpath_list.txt \ No newline at end of file diff --git a/ThirdParty/Ert/libenkf/tests/data/config/runpath_list/arg_echo.sh b/ThirdParty/Ert/libenkf/tests/data/config/runpath_list/arg_echo.sh deleted file mode 100644 index e7fffa0c13..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/runpath_list/arg_echo.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -echo $1 > $2 diff --git a/ThirdParty/Ert/libenkf/tests/data/config/runpath_list/config b/ThirdParty/Ert/libenkf/tests/data/config/runpath_list/config deleted file mode 100644 index ded46130bb..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/runpath_list/config +++ /dev/null @@ -1,5 +0,0 @@ -RUNPATH_FILE runpath/runpath-file.txt -NUM_REALIZATIONS 10 - -LOAD_WORKFLOW_JOB ARGECHO_JOB -LOAD_WORKFLOW ARGECHO_WF diff --git a/ThirdParty/Ert/libenkf/tests/data/config/script.sh b/ThirdParty/Ert/libenkf/tests/data/config/script.sh deleted file mode 100644 index de495719f7..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/script.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -#Dummy script \ No newline at end of file diff --git a/ThirdParty/Ert/libenkf/tests/data/config/test_context/FAULT_TEMPLATE b/ThirdParty/Ert/libenkf/tests/data/config/test_context/FAULT_TEMPLATE deleted file mode 100644 index de1f12ca5b..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/test_context/FAULT_TEMPLATE +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ThirdParty/Ert/libenkf/tests/data/config/test_context/MULTFLT.TXT b/ThirdParty/Ert/libenkf/tests/data/config/test_context/MULTFLT.TXT deleted file mode 100644 index c193c48528..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/test_context/MULTFLT.TXT +++ /dev/null @@ -1 +0,0 @@ -MULTFLT NORMAL 0 1 diff --git a/ThirdParty/Ert/libenkf/tests/data/config/test_context/config b/ThirdParty/Ert/libenkf/tests/data/config/test_context/config deleted file mode 100644 index 7e702c6b14..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/test_context/config +++ /dev/null @@ -1,11 +0,0 @@ -JOBNAME Job%d -RUNPATH simulations/run%d -NUM_REALIZATIONS 1 - -ENSPATH Storage -JOB_SCRIPT script.sh - -GEN_KW MULTFLT FAULT_TEMPLATE MULTFLT.INC MULTFLT.TXT INIT_FILES:MULTFLT_INIT FORWARD_INIT:TRUE - - -SUMMARY RPR:8 diff --git a/ThirdParty/Ert/libenkf/tests/data/config/test_context/script.sh b/ThirdParty/Ert/libenkf/tests/data/config/test_context/script.sh deleted file mode 100644 index 2f92a600cf..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/test_context/script.sh +++ /dev/null @@ -1 +0,0 @@ -# Completlely stupid - an executable must be present for the testing. diff --git a/ThirdParty/Ert/libenkf/tests/data/config/test_context/wf_job b/ThirdParty/Ert/libenkf/tests/data/config/test_context/wf_job deleted file mode 100644 index ed3a5838fb..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/test_context/wf_job +++ /dev/null @@ -1,5 +0,0 @@ -INTERNAL True -FUNCTION enkf_main_select_case_JOB -MIN_ARG 1 -MAX_ARG 1 -ARG_TYPE 0 STRING diff --git a/ThirdParty/Ert/libenkf/tests/data/config/test_context/wf_job_fail b/ThirdParty/Ert/libenkf/tests/data/config/test_context/wf_job_fail deleted file mode 100644 index b8d5206384..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/config/test_context/wf_job_fail +++ /dev/null @@ -1,5 +0,0 @@ -INTERNAL True -FUNCTION unknown_function__ -MIN_ARG 1 -MAX_ARG 1 -ARG_TYPE 0 STRING diff --git a/ThirdParty/Ert/libenkf/tests/data/ensemble/GEN_PARAM b/ThirdParty/Ert/libenkf/tests/data/ensemble/GEN_PARAM deleted file mode 100644 index 8f2fdaa749..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/ensemble/GEN_PARAM +++ /dev/null @@ -1 +0,0 @@ -GEN_PARAM GP GP.txt INIT_FILES:GP/GP.txt INPUT_FORMAT:ASCII OUTPUT_FORMAT:ASCII \ No newline at end of file diff --git a/ThirdParty/Ert/libenkf/tests/data/workflow_jobs/CONF1 b/ThirdParty/Ert/libenkf/tests/data/workflow_jobs/CONF1 deleted file mode 100644 index c42a844b29..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/workflow_jobs/CONF1 +++ /dev/null @@ -1,5 +0,0 @@ -INTERNAL True -FUNCTION util_malloc -MIN_ARG 1 -MAX_ARG 1 -ARG_TYPE 0 FLOAT diff --git a/ThirdParty/Ert/libenkf/tests/data/workflow_jobs/CONF2 b/ThirdParty/Ert/libenkf/tests/data/workflow_jobs/CONF2 deleted file mode 100644 index f07a3cc4ab..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/workflow_jobs/CONF2 +++ /dev/null @@ -1,2 +0,0 @@ -This should not be loaded; -instead the CONF2@1 should be loaded in testing. \ No newline at end of file diff --git a/ThirdParty/Ert/libenkf/tests/data/workflow_jobs/CONF2@1 b/ThirdParty/Ert/libenkf/tests/data/workflow_jobs/CONF2@1 deleted file mode 100644 index c42a844b29..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/workflow_jobs/CONF2@1 +++ /dev/null @@ -1,5 +0,0 @@ -INTERNAL True -FUNCTION util_malloc -MIN_ARG 1 -MAX_ARG 1 -ARG_TYPE 0 FLOAT diff --git a/ThirdParty/Ert/libenkf/tests/data/workflow_jobs/CONF3@1.2.3 b/ThirdParty/Ert/libenkf/tests/data/workflow_jobs/CONF3@1.2.3 deleted file mode 100644 index c42a844b29..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/workflow_jobs/CONF3@1.2.3 +++ /dev/null @@ -1,5 +0,0 @@ -INTERNAL True -FUNCTION util_malloc -MIN_ARG 1 -MAX_ARG 1 -ARG_TYPE 0 FLOAT diff --git a/ThirdParty/Ert/libenkf/tests/data/workflow_jobs/CONF4@1.2.0 b/ThirdParty/Ert/libenkf/tests/data/workflow_jobs/CONF4@1.2.0 deleted file mode 100644 index c42a844b29..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/workflow_jobs/CONF4@1.2.0 +++ /dev/null @@ -1,5 +0,0 @@ -INTERNAL True -FUNCTION util_malloc -MIN_ARG 1 -MAX_ARG 1 -ARG_TYPE 0 FLOAT diff --git a/ThirdParty/Ert/libenkf/tests/data/workflow_jobs/CONF5@1.2 b/ThirdParty/Ert/libenkf/tests/data/workflow_jobs/CONF5@1.2 deleted file mode 100644 index c42a844b29..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/workflow_jobs/CONF5@1.2 +++ /dev/null @@ -1,5 +0,0 @@ -INTERNAL True -FUNCTION util_malloc -MIN_ARG 1 -MAX_ARG 1 -ARG_TYPE 0 FLOAT diff --git a/ThirdParty/Ert/libenkf/tests/data/workflow_jobs/CONF5@1.2.0 b/ThirdParty/Ert/libenkf/tests/data/workflow_jobs/CONF5@1.2.0 deleted file mode 100644 index b138beb40a..0000000000 --- a/ThirdParty/Ert/libenkf/tests/data/workflow_jobs/CONF5@1.2.0 +++ /dev/null @@ -1 +0,0 @@ -Wrong .... diff --git a/ThirdParty/Ert/libenkf/tests/enkf_active_list.c b/ThirdParty/Ert/libenkf/tests/enkf_active_list.c deleted file mode 100644 index 9e647d0d85..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_active_list.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_active_list.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include - -#include - - - -int main(int argc , char ** argv) { - active_list_type * active_list1 = active_list_alloc( ); - active_list_type * active_list2 = active_list_alloc( ); - - - test_assert_true( active_list_is_instance( active_list1 )); - - test_assert_true( active_list_equal( active_list1 , active_list2 )); - - active_list_add_index( active_list1 , 11 ); - test_assert_false(active_list_equal( active_list1 , active_list2 )); - - active_list_add_index( active_list1 , 12 ); - test_assert_false(active_list_equal( active_list1 , active_list2 )); - - active_list_add_index( active_list2 , 11 ); - test_assert_false(active_list_equal( active_list1 , active_list2 )); - - active_list_add_index( active_list2 , 12 ); - test_assert_true(active_list_equal( active_list1 , active_list2 )); - - active_list_add_index( active_list2 , 13 ); - test_assert_false(active_list_equal( active_list1 , active_list2 )); - - active_list_add_index( active_list1 , 13 ); - test_assert_true(active_list_equal( active_list1 , active_list2 )); - - active_list_add_index( active_list2 , 27 ); - test_assert_false(active_list_equal( active_list1 , active_list2 )); - active_list_copy( active_list1 , active_list2 ); - test_assert_true(active_list_equal( active_list1 , active_list2 )); - - active_list_free( active_list1 ); - active_list_free( active_list2 ); - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_analysis_config.c b/ThirdParty/Ert/libenkf/tests/enkf_analysis_config.c deleted file mode 100644 index fcf0d40e7a..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_analysis_config.c +++ /dev/null @@ -1,198 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_analysis_config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -#include -#include - - -analysis_config_type * create_analysis_config() { - rng_type * rng = rng_alloc( MZRAN , INIT_DEFAULT ); - analysis_config_type * ac = analysis_config_alloc( rng ); - return ac; -} - - -void test_create() { - analysis_config_type * ac = create_analysis_config( ); - test_assert_true( analysis_config_is_instance( ac ) ); - analysis_config_free( ac ); -} - - -void test_min_realizations(const char * num_realizations_str, const char * min_realizations_str, int min_realizations_expected_needed) { - test_work_area_type * work_area = test_work_area_alloc("test_min_realizations_string"); - - { - FILE * config_file_stream = util_mkdir_fopen("config_file", "w"); - test_assert_not_NULL(config_file_stream); - - fputs(num_realizations_str, config_file_stream); - fputs(min_realizations_str, config_file_stream); - fclose(config_file_stream); - - config_parser_type * c = config_alloc(); - config_schema_item_type * item = config_add_schema_item(c , NUM_REALIZATIONS_KEY , true ); - config_schema_item_set_default_type(item, CONFIG_INT); - config_schema_item_set_argc_minmax( item , 1 , 1); - - item = config_add_schema_item(c , MIN_REALIZATIONS_KEY , false ); - config_schema_item_set_argc_minmax( item , 1 , 2); - { - config_content_type * content = config_parse(c , "config_file" , "--" , NULL , NULL , NULL , false , true ); - test_assert_true(config_content_is_valid(content)); - - analysis_config_type * ac = create_analysis_config( ); - analysis_config_init(ac, content); - - int num_realizations = config_content_get_value_as_int(content, NUM_REALIZATIONS_KEY); - test_assert_false(analysis_config_have_enough_realisations(ac, min_realizations_expected_needed - 1, num_realizations )); - test_assert_true(analysis_config_have_enough_realisations(ac, min_realizations_expected_needed, num_realizations )); - test_assert_true(analysis_config_have_enough_realisations(ac, min_realizations_expected_needed + 1, num_realizations )); - analysis_config_free( ac ); - config_content_free( content ); - config_free( c ); - } - } - - test_work_area_free(work_area); -} - - -void test_have_enough_realisations_defaulted( ) { - analysis_config_type * ac = create_analysis_config( ); - int ensemble_size = 20; - - // min_realizations not set, should then require 20 (ensemble_size) - test_assert_false( analysis_config_have_enough_realisations( ac , 0, ensemble_size )); - test_assert_false( analysis_config_have_enough_realisations( ac , 10, ensemble_size )); - test_assert_true( analysis_config_have_enough_realisations( ac , 20, ensemble_size )); - - analysis_config_free( ac ); -} - - -void test_current_module_options() { - analysis_config_type * ac = create_analysis_config( ); - test_assert_NULL( analysis_config_get_active_module( ac )); - analysis_config_load_internal_module(ac , "STD_ENKF"); - - test_assert_false( analysis_config_get_module_option( ac , ANALYSIS_SCALE_DATA)); - test_assert_true(analysis_config_select_module(ac , "STD_ENKF")); - test_assert_false( analysis_config_select_module(ac , "DOES_NOT_EXIST")); - - test_assert_true( analysis_module_is_instance( analysis_config_get_active_module( ac ))); - test_assert_true( analysis_config_get_module_option( ac , ANALYSIS_SCALE_DATA)); - test_assert_false( analysis_config_get_module_option( ac , ANALYSIS_ITERABLE)); - analysis_config_free( ac ); -} - -void test_stop_long_running( ) { - analysis_config_type * ac = create_analysis_config( ); - test_assert_bool_equal( false , analysis_config_get_stop_long_running( ac ) ); - analysis_config_set_stop_long_running( ac , true ); - test_assert_bool_equal( true , analysis_config_get_stop_long_running( ac ) ); - analysis_config_free( ac ); -} - -void test_min_realizations_percent() { - { - const char * num_realizations_str = "NUM_REALIZATIONS 80\n"; - const char * min_realizations_str = "MIN_REALIZATIONS 10%\n"; - int min_realizations_expected_needed = 8; - test_min_realizations(num_realizations_str, min_realizations_str, min_realizations_expected_needed); - } - { - const char * num_realizations_str = "NUM_REALIZATIONS 8\n"; - const char * min_realizations_str = "MIN_REALIZATIONS 50%\n"; - int min_realizations_expected_needed = 4; - test_min_realizations(num_realizations_str, min_realizations_str, min_realizations_expected_needed ); - } - { - const char * num_realizations_str = "NUM_REALIZATIONS 8\n"; - const char * min_realizations_str = "MIN_REALIZATIONS 100%\n"; - int min_realizations_expected_needed = 8; - test_min_realizations(num_realizations_str, min_realizations_str, min_realizations_expected_needed ); - } - { - const char * num_realizations_str = "NUM_REALIZATIONS 8\n"; - const char * min_realizations_str = "MIN_REALIZATIONS 10%\n"; - int min_realizations_expected_needed = 8; // Expect 8 because 10 % of 8 will be calculated to zero. - test_min_realizations(num_realizations_str, min_realizations_str, min_realizations_expected_needed ); - } -} - -void test_min_realizations_number() { - { - const char * num_realizations_str = "NUM_REALIZATIONS 80\n"; - const char * min_realizations_str = "MIN_REALIZATIONS 0\n"; - int min_realizations_expected_needed = 80; - test_min_realizations(num_realizations_str, min_realizations_str, min_realizations_expected_needed); - } - { - const char * num_realizations_str = "NUM_REALIZATIONS 900\n"; - int min_realizations_expected_needed = 900; // Nothing specified, expect NUM_REALIZATIONS - test_min_realizations(num_realizations_str, "", min_realizations_expected_needed); - } - { - const char * num_realizations_str = "NUM_REALIZATIONS 900\n"; - const char * min_realizations_str = "MIN_REALIZATIONS 10 \n"; - int min_realizations_expected_needed = 10; - test_min_realizations(num_realizations_str, min_realizations_str, min_realizations_expected_needed); - } - { - const char * num_realizations_str = "NUM_REALIZATIONS 80\n"; - const char * min_realizations_str = "MIN_REALIZATIONS 50\n"; - int min_realizations_expected_needed = 50; - test_min_realizations(num_realizations_str, min_realizations_str, min_realizations_expected_needed); - } - { - const char * num_realizations_str = "NUM_REALIZATIONS 80\n"; - const char * min_realizations_str = "MIN_REALIZATIONS 80\n"; - int min_realizations_expected_needed = 80; - test_min_realizations(num_realizations_str, min_realizations_str, min_realizations_expected_needed); - } - { - const char * num_realizations_str = "NUM_REALIZATIONS 80\n"; - const char * min_realizations_str = "MIN_REALIZATIONS 100\n"; - int min_realizations_expected_needed = 80; - test_min_realizations(num_realizations_str, min_realizations_str, min_realizations_expected_needed); - } -} - -int main(int argc , char ** argv) { - test_create(); - test_have_enough_realisations_defaulted(); - test_min_realizations_percent(); - test_min_realizations_number(); - test_current_module_options(); - test_stop_long_running(); - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_analysis_config_analysis_load.c b/ThirdParty/Ert/libenkf/tests/enkf_analysis_config_analysis_load.c deleted file mode 100644 index 361e8fd1b6..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_analysis_config_analysis_load.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'enkf_analysis_config_analysis_load.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include -#include -#include - -#include -#include - -#include -#include - -int main(int argc , const char ** argv) { - util_install_signals(); - { - const char * config_file = argv[1]; - - ert_test_context_type * test_context = ert_test_context_alloc("AnalysisLoadFromSiteConfig" , config_file); - enkf_main_type * enkf_main = ert_test_context_get_main(test_context); - - test_assert_true(analysis_config_has_module(enkf_main_get_analysis_config(enkf_main), "RML_ENKF_SITE_CONFIG1")); - analysis_module_type * analysis_module = analysis_config_get_module(enkf_main_get_analysis_config(enkf_main), "RML_ENKF_SITE_CONFIG1"); - test_assert_string_equal(analysis_module_get_name(analysis_module), "RML_ENKF_SITE_CONFIG1"); - - test_assert_true(analysis_config_has_module(enkf_main_get_analysis_config(enkf_main), "RML_ENKF_SITE_CONFIG2")); - analysis_module_type * analysis_module2 = analysis_config_get_module(enkf_main_get_analysis_config(enkf_main), "RML_ENKF_SITE_CONFIG2"); - test_assert_string_equal(analysis_module_get_name(analysis_module2), "RML_ENKF_SITE_CONFIG2"); - - ert_test_context_free(test_context); - } -} - - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_analysis_config_ext_module.c b/ThirdParty/Ert/libenkf/tests/enkf_analysis_config_ext_module.c deleted file mode 100644 index 57b4fd6eb0..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_analysis_config_ext_module.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_analysis_config_ext_module.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include - - -void test_load_external_module( analysis_config_type * ac , const char * user_name , const char * lib_name) { - test_assert_true( analysis_config_load_external_module(ac , lib_name , user_name )); -} - - - -int main(int argc , char ** argv) { - rng_type * rng = rng_alloc(MZRAN , INIT_DEFAULT); - analysis_config_type * analysis_config = analysis_config_alloc(rng); - - for (int i = 1; i < argc; i+= 2) { - const char * user_name = argv[i]; - const char * lib_name = argv[i + 1]; - test_load_external_module( analysis_config , user_name , lib_name ); - } - - analysis_config_free(analysis_config); - rng_free( rng ); - exit(0); -} - - - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_analysis_update_job.c b/ThirdParty/Ert/libenkf/tests/enkf_analysis_update_job.c deleted file mode 100644 index 45e4b74955..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_analysis_update_job.c +++ /dev/null @@ -1,99 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_analysis_update_job.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - - -void test_update_default(const char * config_file , const char * job_file) { - ert_test_context_type * test_context = ert_test_context_alloc("AnalysisJob0" , config_file); - - stringlist_type * args = stringlist_alloc_new(); - test_assert_true( ert_test_context_install_workflow_job( test_context , "JOB" , job_file )); - test_assert_true( ert_test_context_run_worklow_job( test_context , "JOB" , args) ); - stringlist_free( args ); - - ert_test_context_free( test_context ); -} - - -void test_update_new_case(const char * config_file , const char * job_file) { - ert_test_context_type * test_context = ert_test_context_alloc("AnalysisJob1" , config_file); - - stringlist_type * args = stringlist_alloc_new(); - stringlist_append_copy( args , "NewCase" ); - ert_test_context_install_workflow_job( test_context , "JOB" , job_file ); - test_assert_true( ert_test_context_run_worklow_job( test_context , "JOB" , args) ); - stringlist_free( args ); - - ert_test_context_free( test_context ); -} - - -void test_update_new_case_step(const char * config_file , const char * job_file) { - ert_test_context_type * test_context = ert_test_context_alloc("AnalysisJob2" , config_file); - - stringlist_type * args = stringlist_alloc_new(); - stringlist_append_copy( args , "NewCase" ); - stringlist_append_copy( args , "20" ); - ert_test_context_install_workflow_job( test_context , "JOB" , job_file ); - test_assert_true( ert_test_context_run_worklow_job( test_context , "JOB" , args) ); - stringlist_free( args ); - - ert_test_context_free( test_context ); -} - - -void test_update_new_case_step_selected(const char * config_file , const char * job_file) { - ert_test_context_type * test_context = ert_test_context_alloc("AnalysisJob2" , config_file ); - - stringlist_type * args = stringlist_alloc_new(); - stringlist_append_copy( args , "NewCase" ); - stringlist_append_copy( args , "20" ); - stringlist_append_copy( args , "10" ); - stringlist_append_copy( args , ",20" ); - stringlist_append_copy( args , ",30-50" ); - ert_test_context_install_workflow_job( test_context , "JOB" , job_file ); - test_assert_true( ert_test_context_run_worklow_job( test_context , "JOB" , args) ); - stringlist_free( args ); - - ert_test_context_free( test_context ); -} - - - -int main(int argc , char ** argv) { - const char * config_file = argv[1]; - const char * job_file = argv[2]; - - test_update_default( config_file , job_file); - test_update_new_case( config_file , job_file ); - test_update_new_case_step( config_file , job_file ); - test_update_new_case_step_selected( config_file , job_file ); - - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_block_obs.c b/ThirdParty/Ert/libenkf/tests/enkf_block_obs.c deleted file mode 100644 index 774470a7ff..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_block_obs.c +++ /dev/null @@ -1,79 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'enkf_plot_blockdata.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include - -#include - -#include - -#include -#include -#include - - -void test_create_invalid_data(ecl_grid_type * grid) { - void * data_config = NULL; - test_assert_NULL(block_obs_alloc( "ObsKey" , data_config , grid )); -} - - - -void test_create_from_field(ecl_grid_type * grid) { - field_config_type * field_config = field_config_alloc_empty( "PRESSURE" , grid , NULL, false ); - block_obs_type * block_obs = block_obs_alloc( "ObsKey" , field_config , grid ); - - test_assert_true( block_obs_is_instance( block_obs )); - test_assert_int_equal(0 , block_obs_get_size( block_obs )); - block_obs_append_field_obs( block_obs , 10 , 12 , 8 , 100 , 25); - test_assert_int_equal(1 , block_obs_get_size( block_obs )); - block_obs_append_field_obs( block_obs , 10 , 12 , 9 , 100 , 25); - test_assert_int_equal(2 , block_obs_get_size( block_obs )); - block_obs_free( block_obs ); - field_config_free( field_config ); -} - - -void test_create_from_summary(ecl_grid_type * grid) { - container_config_type * container_config = container_config_alloc( "Container"); - block_obs_type * block_obs = block_obs_alloc( "ObsKey" , container_config , grid ); - - test_assert_true( block_obs_is_instance( block_obs )); - test_assert_int_equal(0 , block_obs_get_size( block_obs )); - - - block_obs_append_summary_obs( block_obs , 10 , 12 , 8 , "BPR:111,13,9" , 100 , 25); - test_assert_int_equal(1 , block_obs_get_size( block_obs )); - block_obs_append_summary_obs( block_obs , 10 , 12 , 9 , "BPR:11,13,10" , 100 , 25); - test_assert_int_equal(2 , block_obs_get_size( block_obs )); - block_obs_free( block_obs ); - - container_config_free( container_config ); -} - - - -int main (int argc , char ** argv) { - ecl_grid_type * grid = ecl_grid_alloc( argv[1] ); - { - test_create_invalid_data( grid ); - test_create_from_field(grid); - test_create_from_summary( grid); - } - ecl_grid_free( grid ); - exit(0); -} diff --git a/ThirdParty/Ert/libenkf/tests/enkf_cases_config.c b/ThirdParty/Ert/libenkf/tests/enkf_cases_config.c deleted file mode 100644 index 8063c00f41..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_cases_config.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_cases_config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include -#include - -#include - - -void test_create_get_set_and_get() { - cases_config_type * cases_config = cases_config_alloc( ); - test_assert_int_equal( 0, cases_config_get_iteration_number( cases_config ) ); - cases_config_set_int( cases_config , "iteration_number" , 12); - test_assert_int_equal( 12, cases_config_get_iteration_number( cases_config ) ); - cases_config_fwrite( cases_config , "TEST_CASES_CONFIG" ); - cases_config_fread( cases_config , "TEST_CASES_CONFIG" ); - cases_config_free( cases_config ); -} - -int main(int argc , char ** argv) { - test_create_get_set_and_get(); - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_config_node.c b/ThirdParty/Ert/libenkf/tests/enkf_config_node.c deleted file mode 100644 index ecec479dfe..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_config_node.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'enkf_config_node.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include - -#include - -#include -#include - - - - -int main(int argc , char ** argv) { - exit(0); -} diff --git a/ThirdParty/Ert/libenkf/tests/enkf_ecl_config.c b/ThirdParty/Ert/libenkf/tests/enkf_ecl_config.c deleted file mode 100644 index 39bdcfc341..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_ecl_config.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_ecl_config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include - -#include -#include - -int main(int argc , char ** argv) { - ecl_config_type * ecl_config = ecl_config_alloc(); - - if (argc == 2) { - test_assert_true(ecl_config_load_refcase( ecl_config , argv[1])); - - ecl_refcase_list_type * refcase_list = ecl_config_get_refcase_list( ecl_config ); - test_assert_int_equal( ecl_refcase_list_get_size( refcase_list ) , 1 ); - { - const ecl_sum_type * iget0 = ecl_refcase_list_iget_case( refcase_list , 0 ); - const ecl_sum_type * def = ecl_refcase_list_get_default( refcase_list ); - - test_assert_ptr_equal( iget0 , def ); - test_assert_string_equal( argv[1] , ecl_sum_get_case( def )); - test_assert_string_equal( ecl_refcase_list_iget_pathcase( refcase_list , 0) , ecl_sum_get_case( def )); - - } - } - test_assert_false(ecl_config_load_refcase( ecl_config , "DOES_NOT_EXIST" )); - test_assert_true(ecl_config_load_refcase( ecl_config , NULL )); - - - - ecl_config_free( ecl_config ); - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_ecl_config_config.c b/ThirdParty/Ert/libenkf/tests/enkf_ecl_config_config.c deleted file mode 100644 index f108cb14fc..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_ecl_config_config.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_ecl_config_config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -#include -#include - -int main(int argc , char ** argv) { - util_install_signals(); - { - const char * config_file = argv[1]; - ecl_config_type * ecl_config = ecl_config_alloc(); - ecl_refcase_list_type * refcase_list = ecl_config_get_refcase_list( ecl_config ); - { - config_parser_type * config = config_alloc(); - config_content_type * content; - - ecl_config_add_config_items( config ); - content = config_parse( config , config_file , "--" , NULL , NULL , NULL , CONFIG_UNRECOGNIZED_WARN , true); - - test_assert_true( config_content_is_valid( content )); - ecl_config_init( ecl_config , content ); - - config_content_free( content ); - config_free( config ); - } - - test_assert_true( ecl_config_has_refcase( ecl_config )); - test_assert_int_equal( ecl_refcase_list_get_size( refcase_list) , 17); - - ecl_config_free( ecl_config ); - } - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_enkf_config_node_gen_data.c b/ThirdParty/Ert/libenkf/tests/enkf_enkf_config_node_gen_data.c deleted file mode 100644 index 512762187a..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_enkf_config_node_gen_data.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_enkf_config_node_gen_data.c' is part of ERT - - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include - -#include - - -void test_create() { - enkf_config_node_type * node = enkf_config_node_alloc_GEN_PARAM("key" , false, ASCII , ASCII , "init%d" , "out.txt"); - enkf_config_node_free( node ); -} - - - -int main( int argc , char **argv ) { - test_create(); - exit(0); -} diff --git a/ThirdParty/Ert/libenkf/tests/enkf_ensemble.c b/ThirdParty/Ert/libenkf/tests/enkf_ensemble.c deleted file mode 100644 index 9979c1ce04..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_ensemble.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_ensemble.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -#include - -#include -#include - - - - - - - -int main(int argc , char ** argv) { - ensemble_config_type * ensemble = ensemble_config_alloc(); - ensemble_config_free( ensemble ); - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_ensemble_GEN_PARAM.c b/ThirdParty/Ert/libenkf/tests/enkf_ensemble_GEN_PARAM.c deleted file mode 100644 index d6d884ab35..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_ensemble_GEN_PARAM.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_ensemble_GEN_PARAM.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -#include - -#include -#include - - - - - - - -int main(int argc , char ** argv) { - const char * config_file = argv[1]; - config_parser_type * config = config_alloc(); - config_content_type * content; - ensemble_config_type * ensemble = ensemble_config_alloc(); - - enkf_config_node_add_GEN_PARAM_config_schema( config ); - - content = config_parse( config , config_file , "--" , NULL , NULL , NULL , CONFIG_UNRECOGNIZED_WARN , true ); - test_assert_true( config_content_is_valid( content ) ); - - ensemble_config_init_GEN_PARAM( ensemble, content ); - - config_content_free( content ); - config_free( config ); - ensemble_config_free( ensemble ); - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_ensemble_config.c b/ThirdParty/Ert/libenkf/tests/enkf_ensemble_config.c deleted file mode 100644 index c4d3ca0d52..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_ensemble_config.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_gen_data_config_parse.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include -#include -#include -#include - -#include "ert/util/build_config.h" - -#include -#include - -#include - -void add_NULL_node( void * arg) { - ensemble_config_type * ens_config = ensemble_config_safe_cast( arg ); - ensemble_config_add_node( ens_config , NULL ); -} - - - -void test_abort_on_add_NULL() { - ensemble_config_type * ensemble_config = ensemble_config_alloc(); - - test_assert_true( ensemble_config_is_instance( ensemble_config )); - test_assert_util_abort("ensemble_config_add_node" , add_NULL_node , ensemble_config ); - - ensemble_config_free( ensemble_config ); -} - - -int main( int argc , char ** argv) { - test_abort_on_add_NULL(); - exit(0); -} diff --git a/ThirdParty/Ert/libenkf/tests/enkf_ert_run_context.c b/ThirdParty/Ert/libenkf/tests/enkf_ert_run_context.c deleted file mode 100644 index 6a8abf09b3..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_ert_run_context.c +++ /dev/null @@ -1,126 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'ert_run_context.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include - -#include -#include -#include - -#include -#include -#include - -void test_create() { - bool_vector_type * iactive = bool_vector_alloc(10,true); - bool_vector_iset( iactive , 6 , false ); - bool_vector_iset( iactive , 8 , false ); - { - enkf_fs_type * init_fs = NULL; - subst_list_type * subst_list = subst_list_alloc( NULL ); - path_fmt_type * runpath_fmt = path_fmt_alloc_directory_fmt("/tmp/path/%04d"); - ert_init_context_type * context = ert_init_context_alloc( init_fs , iactive , runpath_fmt , subst_list , INIT_CONDITIONAL , 13 ); - - test_assert_true( ert_init_context_is_instance( context )); - test_assert_int_equal( 8 , ert_init_context_get_size( context )); - - { - run_arg_type * run_arg0 = ert_init_context_iget_arg( context , 0 ); - - test_assert_int_equal( 13 , run_arg_get_iter( run_arg0 )); - test_assert_string_equal( "/tmp/path/0000" , run_arg_get_runpath( run_arg0 )); - - test_assert_true( run_arg_is_instance( run_arg0 )); - } - ert_init_context_free( context ); - path_fmt_free( runpath_fmt ); - } - bool_vector_free( iactive ); -} - - -void test_create_ENSEMBLE_EXPERIMENT() { - bool_vector_type * iactive = bool_vector_alloc(10,true); - bool_vector_iset( iactive , 0 , false ); - bool_vector_iset( iactive , 8 , false ); - { - subst_list_type * subst_list = subst_list_alloc( NULL ); - path_fmt_type * runpath_fmt = path_fmt_alloc_directory_fmt("/tmp/path/%04d/%d"); - enkf_fs_type * fs = NULL; - ert_run_context_type * context = ert_run_context_alloc_ENSEMBLE_EXPERIMENT( fs, iactive , runpath_fmt , subst_list , 7 ); - - test_assert_true( ert_run_context_is_instance( context )); - test_assert_int_equal( 8 , ert_run_context_get_size( context )); - - { - run_arg_type * run_arg0 = ert_run_context_iens_get_arg( context , 0 ); - run_arg_type * run_arg2 = ert_run_context_iens_get_arg( context , 2 ); - run_arg_type * run_argi = ert_run_context_iget_arg( context , 1 ); - - test_assert_NULL( run_arg0 ); - test_assert_true( run_arg_is_instance( run_argi )); - test_assert_ptr_equal( run_arg2 , run_argi); - } - - { - run_arg_type * run_arg1 = ert_run_context_iget_arg( context , 1 ); - - test_assert_int_equal( 7 , run_arg_get_iter( run_arg1 )); - test_assert_string_equal( "/tmp/path/0002/7" , run_arg_get_runpath( run_arg1 )); - - test_assert_true( run_arg_is_instance( run_arg1 )); - } - ert_run_context_free( context ); - path_fmt_free( runpath_fmt ); - subst_list_free( subst_list ); - } - bool_vector_free( iactive ); -} - - - - -void test_iactive_update() { - bool_vector_type * iactive = bool_vector_alloc(10,true); - { - subst_list_type * subst_list = subst_list_alloc( NULL ); - path_fmt_type * runpath_fmt = path_fmt_alloc_directory_fmt("/tmp/path/%04d/%d"); - enkf_fs_type * fs = NULL; - ert_run_context_type * context = ert_run_context_alloc_ENSEMBLE_EXPERIMENT( fs, iactive , runpath_fmt , subst_list , 7 ); - - ert_run_context_deactivate_realization( context , 0 ); - ert_run_context_deactivate_realization( context , 5 ); - ert_run_context_deactivate_realization( context , 9 ); - - ert_run_context_free( context ); - path_fmt_free( runpath_fmt ); - subst_list_free( subst_list ); - } - test_assert_int_equal( bool_vector_count_equal( iactive , true ) , 7 ); - test_assert_false( bool_vector_iget( iactive , 0 )); - test_assert_false( bool_vector_iget( iactive , 5 )); - test_assert_false( bool_vector_iget( iactive , 9 )); - bool_vector_free( iactive ); -} - - -int main( int argc , char ** argv) { - test_create(); - test_create_ENSEMBLE_EXPERIMENT(); - test_iactive_update(); - exit(0); -} diff --git a/ThirdParty/Ert/libenkf/tests/enkf_ert_test_context.c b/ThirdParty/Ert/libenkf/tests/enkf_ert_test_context.c deleted file mode 100644 index fcf97ab688..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_ert_test_context.c +++ /dev/null @@ -1,153 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'enkf_ert_test_context.c' is part of ERT - Ensemble based - Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - - - -#include -#include - - - - -void test_create_invalid(const char * config_file) { - char * cwd0 = util_alloc_cwd(); - ert_test_context_type * test_context = ert_test_context_alloc("CREATE_CONTEXT" , config_file ); - test_assert_true( ert_test_context_is_instance( test_context )); - test_assert_NULL( ert_test_context_get_main( test_context )); - { - char * cwd1 = util_alloc_cwd(); - test_assert_string_equal(cwd1 , cwd0); - free( cwd1 ); - } - free( cwd0 ); - ert_test_context_free( test_context ); -} - - - -void test_create_valid( const char * config_file ) { - char * cwd0 = util_alloc_cwd(); - ert_test_context_type * test_context = ert_test_context_alloc("CREATE_CONTEXT" , config_file ); - test_assert_true( ert_test_context_is_instance( test_context )); - test_assert_true( enkf_main_is_instance( ert_test_context_get_main( test_context ))); - { - char * cwd1 = util_alloc_cwd(); - test_assert_string_not_equal(cwd1 , cwd0); - free( cwd1 ); - } - free( cwd0 ); - ert_test_context_free( test_context ); -} - - - -void test_install_job( const char * config_file, const char * job_file_OK , const char * job_file_ERROR) { - ert_test_context_type * test_context = ert_test_context_alloc("CREATE_CONTEXT_JOB" , config_file ); - - test_assert_false( ert_test_context_install_workflow_job( test_context , "JOB" , "File/does/not/exist")); - test_assert_false( ert_test_context_install_workflow_job( test_context , "ERROR" , job_file_ERROR)); - test_assert_true( ert_test_context_install_workflow_job( test_context , "OK" , job_file_OK)); - - ert_test_context_free( test_context ); -} - - - -void test_run_workflow_job( const char * config_file , const char * job_file ) { - ert_test_context_type * test_context = ert_test_context_alloc("CREATE_CONTEXT_JOB" , config_file ); - stringlist_type * args0 = stringlist_alloc_new( ); - stringlist_type * args1 = stringlist_alloc_new( ); - - stringlist_append_ref( args1 , "NewCase"); - test_assert_false( ert_test_context_run_worklow_job( test_context , "NO-this-does-not-exist" , args1)); - ert_test_context_install_workflow_job( test_context , "JOB" , job_file ); - - test_assert_false( ert_test_context_run_worklow_job( test_context , "JOB" , args0)); - test_assert_true( ert_test_context_run_worklow_job( test_context , "JOB" , args1)); - - stringlist_free( args0 ); - stringlist_free( args1 ); - ert_test_context_free( test_context ); -} - - -void test_install_workflow( const char * config_file , const char * job_file ) { - ert_test_context_type * test_context = ert_test_context_alloc("INSTALL_WORKFLOW" , config_file ); - const char * wf_file = "WFLOW"; - - ert_test_context_install_workflow_job( test_context , "JOB" , job_file ); - { - FILE * stream = util_fopen( wf_file , "w"); - stringlist_type * args = stringlist_alloc_new( ); - stringlist_append_ref( args , "NewCase"); - ert_test_context_fwrite_workflow_job( stream , "JOB" , args); - stringlist_free( args ); - fclose( stream ); - } - test_assert_true( ert_test_context_install_workflow( test_context , "WFLOW" , wf_file )); - ert_test_context_free( test_context ); -} - - -void test_run_workflow(const char * config_file , const char * job_file) { - ert_test_context_type * test_context = ert_test_context_alloc("INSTALL_WORKFLOW" , config_file ); - test_assert_false( ert_test_context_run_worklow( test_context , "No-does.not.exist")); - - ert_test_context_install_workflow_job( test_context , "JOB" , job_file ); - { - FILE * stream1 = util_fopen( "WFLOW1", "w"); - FILE * stream2 = util_fopen( "WFLOW2", "w"); - stringlist_type * args = stringlist_alloc_new( ); - ert_test_context_fwrite_workflow_job( stream1 , "JOB" , args); - stringlist_append_ref( args , "NewCase"); - ert_test_context_fwrite_workflow_job( stream2 , "JOB" , args); - - stringlist_free( args ); - fclose( stream1 ); - fclose( stream2 ); - } - test_assert_true( ert_test_context_install_workflow( test_context , "WFLOW1" , "WFLOW1")); - test_assert_true( ert_test_context_install_workflow( test_context , "WFLOW2" , "WFLOW2")); - - test_assert_true( ert_test_context_run_worklow( test_context , "WFLOW2")); - test_assert_false( ert_test_context_run_worklow( test_context , "WFLOW1")); - - ert_test_context_free( test_context ); -} - - - - - - -int main( int argc , char ** argv) { - char * config_file = argv[1]; - char * wf_job_fileOK = argv[2]; - char * wf_job_fileERROR = argv[3]; - - test_create_invalid( "DoesNotExist" ); - test_create_valid( config_file ); - test_install_job( config_file , wf_job_fileOK, wf_job_fileERROR ); - test_install_workflow( config_file , wf_job_fileOK); - test_run_workflow( config_file , wf_job_fileOK); - test_run_workflow_job( config_file , wf_job_fileOK); -} - - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_ert_workflow_list.c b/ThirdParty/Ert/libenkf/tests/enkf_ert_workflow_list.c deleted file mode 100644 index b6ea0e583d..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_ert_workflow_list.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'enkf_ert_workflow_list.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include -#include - -#include - - - -void test_create_workflow_list() { - ert_workflow_list_type * wf_list = ert_workflow_list_alloc( NULL ); - test_assert_true( ert_workflow_list_is_instance( wf_list )); - ert_workflow_list_free( wf_list ); -} - - - -void test_add_alias( const char * job) { - test_work_area_type * work_area = test_work_area_alloc( "workflow_list/alias" ); - ert_workflow_list_type * wf_list = ert_workflow_list_alloc( NULL ); - ert_workflow_list_add_job( wf_list , "JOB" , job ); - - { - FILE * stream = util_fopen("WF1" , "w"); - fprintf(stream , "SCALE_STD 0.25\n"); - fclose(stream); - } - - - { - FILE * stream = util_fopen("WF2" , "w"); - fprintf(stream , "SCALE_STD 0.25\n"); - fclose(stream); - } - - test_assert_true( workflow_is_instance( ert_workflow_list_add_workflow( wf_list , "WF1" , "WF"))); - test_assert_int_equal( 1 , ert_workflow_list_get_size( wf_list )); - test_assert_false( ert_workflow_list_has_workflow( wf_list , "WF1")); - test_assert_true( ert_workflow_list_has_workflow( wf_list , "WF")); - - ert_workflow_list_add_alias( wf_list , "WF" , "alias"); - test_assert_int_equal( 2 , ert_workflow_list_get_size( wf_list )); - test_assert_true( ert_workflow_list_has_workflow( wf_list , "WF")); - test_assert_true( ert_workflow_list_has_workflow( wf_list , "alias")); - test_assert_true( workflow_is_instance( ert_workflow_list_get_workflow( wf_list , "WF"))); - test_assert_true( workflow_is_instance( ert_workflow_list_get_workflow( wf_list , "alias"))); - - test_assert_true( workflow_is_instance( ert_workflow_list_add_workflow( wf_list , "WF2" , "WF"))); - test_assert_int_equal( 2 , ert_workflow_list_get_size( wf_list )); - test_assert_true( ert_workflow_list_has_workflow( wf_list , "WF")); - test_assert_true( ert_workflow_list_has_workflow( wf_list , "alias")); - test_assert_true( workflow_is_instance( ert_workflow_list_get_workflow( wf_list , "WF"))); - test_assert_true( workflow_is_instance( ert_workflow_list_get_workflow( wf_list , "alias"))); - - test_work_area_free( work_area ); -} - - -int main(int argc , char ** argv) { - const char * job = argv[1]; - test_create_workflow_list(); - test_add_alias(job); - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_export_field_test.c b/ThirdParty/Ert/libenkf/tests/enkf_export_field_test.c deleted file mode 100644 index c3fd8a3373..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_export_field_test.c +++ /dev/null @@ -1,135 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_export_field_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - - - -void test_export_field(ert_test_context_type * test_context , const char * job_name , const char * job_file) { - - test_assert_true( ert_test_context_install_workflow_job( test_context , job_name , job_file )); - { - stringlist_type * args = stringlist_alloc_new(); - - stringlist_append_copy(args, "PERMZ"); - stringlist_append_copy(args, "TEST_EXPORT/test_export_field/PermZ%d.grdecl"); - stringlist_append_copy(args, "0"); - stringlist_append_copy(args, "FORECAST"); - stringlist_append_copy(args, "0, 2"); - - test_assert_true( ert_test_context_run_worklow_job( test_context , job_name , args) ); - stringlist_free( args ); - } - test_assert_true( util_file_exists("TEST_EXPORT/test_export_field/PermZ0.grdecl") ); - test_assert_true( util_file_exists("TEST_EXPORT/test_export_field/PermZ2.grdecl") ); -} - - -void job_file_export_field_ecl_grdecl(ert_test_context_type * test_context , const char * job_name , const char * job_file) { - ert_test_context_install_workflow_job( test_context , job_name , job_file ); - { - stringlist_type * args = stringlist_alloc_new(); - - stringlist_append_copy(args, "PERMX"); - stringlist_append_copy(args, "TEST_EXPORT/test_export_field_ecl_grdecl/PermX%d.grdecl"); - stringlist_append_copy(args, "0"); - stringlist_append_copy(args, "ANALYZED"); - test_assert_true( ert_test_context_run_worklow_job( test_context , job_name , args) ); - - stringlist_clear(args); - stringlist_append_copy(args, "PERMZ"); - stringlist_append_copy(args, "TEST_EXPORT/test_export_field_ecl_grdecl/PermZ%d"); - stringlist_append_copy(args, "0"); - stringlist_append_copy(args, "FORECAST"); - stringlist_append_copy(args, "0-1"); - test_assert_true( ert_test_context_run_worklow_job( test_context , job_name , args) ); - - - test_assert_true(util_file_exists("TEST_EXPORT/test_export_field_ecl_grdecl/PermX0.grdecl")); - test_assert_true(util_file_exists("TEST_EXPORT/test_export_field_ecl_grdecl/PermX1.grdecl")); - test_assert_true(util_file_exists("TEST_EXPORT/test_export_field_ecl_grdecl/PermX2.grdecl")); - - test_assert_true(util_file_exists("TEST_EXPORT/test_export_field_ecl_grdecl/PermZ0")); - test_assert_true(util_file_exists("TEST_EXPORT/test_export_field_ecl_grdecl/PermZ1")); - - stringlist_free( args ); - } -} - - -void job_file_export_field_rms_roff(ert_test_context_type * test_context , const char * job_name , const char * job_file) { - test_assert_true( ert_test_context_install_workflow_job( test_context , job_name , job_file ) ); - { - stringlist_type * args = stringlist_alloc_new(); - - stringlist_append_copy(args, "PERMZ"); - stringlist_append_copy(args, "TEST_EXPORT/test_export_field_rms_roff/PermZ%d"); - stringlist_append_copy(args, "0"); - stringlist_append_copy(args, "ANALYZED"); - test_assert_true( ert_test_context_run_worklow_job( test_context , job_name , args) ); - - stringlist_clear(args); - stringlist_append_copy(args, "PERMX"); - stringlist_append_copy(args, "TEST_EXPORT/test_export_field_rms_roff/PermX%d.roff"); - stringlist_append_copy(args, "0"); - stringlist_append_copy(args, "FORECAST"); - test_assert_true( ert_test_context_run_worklow_job( test_context , job_name , args) ); - - test_assert_true(util_file_exists("TEST_EXPORT/test_export_field_rms_roff/PermZ0")); - test_assert_true(util_file_exists("TEST_EXPORT/test_export_field_rms_roff/PermZ1")); - test_assert_true(util_file_exists("TEST_EXPORT/test_export_field_rms_roff/PermZ2")); - - test_assert_true(util_file_exists("TEST_EXPORT/test_export_field_rms_roff/PermX0.roff")); - test_assert_true(util_file_exists("TEST_EXPORT/test_export_field_rms_roff/PermX1.roff")); - test_assert_true(util_file_exists("TEST_EXPORT/test_export_field_rms_roff/PermX2.roff")); - - stringlist_free( args ); - } -} - - - -int main(int argc , const char ** argv) { - enkf_main_install_SIGNALS(); - - const char * config_file = argv[1]; - const char * job_file_export_field = argv[2]; - const char * job_file_export_field_ecl_grdecl = argv[3]; - const char * job_file_export_field_rms_roff = argv[4]; - - ert_test_context_type * test_context = ert_test_context_alloc("ExportFieldsJobs" , config_file); - enkf_main_type * enkf_main = ert_test_context_get_main( test_context ); - - enkf_main_select_fs( enkf_main , "default" ); - { - test_export_field(test_context, "JOB1" , job_file_export_field); - test_export_field(test_context, "JOB2" , job_file_export_field_ecl_grdecl); - test_export_field(test_context, "JOB3" , job_file_export_field_rms_roff); - } - ert_test_context_free( test_context ); - exit(0); -} diff --git a/ThirdParty/Ert/libenkf/tests/enkf_export_inactive_cells.c b/ThirdParty/Ert/libenkf/tests/enkf_export_inactive_cells.c deleted file mode 100644 index 73b8022f43..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_export_inactive_cells.c +++ /dev/null @@ -1,204 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'enkf_export_inactive_cells.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -#include - -#include -#include -#include -#include - - - - -void check_exported_data(const char * exported_file, - const char * init_file, - field_file_format_type file_type, - const field_config_type * field_config, - const field_type * field, - int nx, - int ny, - int nz) { - - FILE * original_stream = NULL; - ecl_kw_type * kw_original = NULL; - FILE * exported_stream = NULL; - ecl_kw_type * kw_exported = NULL; - field_type * exported_field = NULL; - field_config_type * exported_field_config = NULL; - - { - if (init_file) { - original_stream = util_fopen( init_file , "r"); - kw_original = ecl_kw_fscanf_alloc_grdecl_dynamic( original_stream , field_config_get_key(field_config) , ECL_DOUBLE_TYPE ); - } - - if (ECL_GRDECL_FILE == file_type) { - exported_stream = util_fopen( exported_file , "r"); - kw_exported = ecl_kw_fscanf_alloc_grdecl_dynamic( exported_stream , field_config_get_key(field_config) , ECL_DOUBLE_TYPE ); - } else if (RMS_ROFF_FILE == file_type) { - ecl_grid_type * grid = field_config_get_grid(field_config); - exported_field_config = field_config_alloc_empty(field_config_get_key(field_config), grid, NULL, true); - exported_field = field_alloc(exported_field_config); - - bool keep_inactive = true; - field_fload_rms(exported_field, exported_file, keep_inactive); - } - } - - - { - int k, j, i = 0; - - for (k=0; k < nz; k++) { - for (j=0; j < ny; j++) { - for (i=0; i < nx; i++) { - bool active = field_config_active_cell(field_config, i, j, k); - double field_value = active ? field_ijk_get_double(field, i, j, k) : 0.0; - int global_index = field_config_global_index(field_config , i , j , k); - double exported_value = 0.0; - if (ECL_GRDECL_FILE == file_type) - exported_value = ecl_kw_iget_as_double(kw_exported, global_index); - else if (RMS_ROFF_FILE == file_type) { - exported_value = field_ijk_get_double(exported_field, i, j, k); - } - double initial_value = init_file ? ecl_kw_iget_as_double(kw_original, global_index) : 0.0; - - if (active) - test_assert_double_equal(field_value, exported_value); - else if (init_file) - test_assert_double_equal(initial_value, exported_value); - else if (file_type == RMS_ROFF_FILE) - test_assert_double_equal(RMS_INACTIVE_DOUBLE, exported_value); - else - test_assert_double_equal(0.0, exported_value); - } - } - } - } - - - if (init_file) { - util_fclose(original_stream); - ecl_kw_free(kw_original); - } - - if (ECL_GRDECL_FILE == file_type) { - util_fclose(exported_stream); - ecl_kw_free(kw_exported); - } else - field_free(exported_field); -} - - - -void forward_initialize_node(enkf_main_type * enkf_main, const char * init_file, enkf_node_type * field_node) { - { - const int ens_size = enkf_main_get_ensemble_size( enkf_main ); - bool_vector_type * iactive = bool_vector_alloc(0, false); - bool_vector_iset( iactive , ens_size - 1 , true ); - - enkf_main_create_run_path(enkf_main , iactive , 0); - bool_vector_free(iactive); - } - - { - int iens = 0; - enkf_state_type * state = enkf_main_iget_state( enkf_main , iens ); - enkf_fs_type * fs = enkf_main_get_fs(enkf_main); - run_arg_type * run_arg = run_arg_alloc_ENSEMBLE_EXPERIMENT( fs , 0 ,0 , "simulations/run0"); - - enkf_state_forward_init( state , run_arg); - } -} - - - -int main(int argc , char ** argv) { - enkf_main_install_SIGNALS(); - - const char * config_file = argv[1]; - const char * init_file = argv[2]; - const char * key = "PORO"; - int iens = 0; - - ert_test_context_type * test_context = ert_test_context_alloc("ExportInactiveCellsTest" , config_file); - enkf_main_type * enkf_main = ert_test_context_get_main(test_context); - enkf_fs_type * fs = enkf_main_get_fs(enkf_main); - const ensemble_config_type * ensemble_config = enkf_main_get_ensemble_config(enkf_main); - const enkf_config_node_type * config_node = ensemble_config_get_node(ensemble_config , key); - const field_config_type * field_config = enkf_config_node_get_ref( config_node ); - enkf_state_type * state = enkf_main_iget_state( enkf_main , iens ); - enkf_node_type * field_node = enkf_state_get_node( state , key ); - field_type * field = enkf_node_value_ptr(field_node); - - { - forward_initialize_node(enkf_main, init_file, field_node); - node_id_type node_id = {.report_step = 0 , .iens = iens }; - test_assert_true(enkf_node_try_load(field_node , fs , node_id)); - field_scale(field, 3.0); - } - - int nx,ny,nz; - field_config_get_dims(field_config , &nx , &ny , &nz); - const char * export_file_grdecl = "my_test_dir/exported_field_test_file_grdecl"; - const char * export_file_roff = "my_test_dir/exported_field_test_file_roff"; - field_file_format_type file_type; - - char * found_init_file = enkf_main_alloc_abs_path_to_init_file(enkf_main, config_node); - { - file_type = ECL_GRDECL_FILE; - field_export(field, export_file_grdecl, NULL, file_type, false, found_init_file); - check_exported_data(export_file_grdecl, init_file, file_type, field_config, field, nx, ny, nz); - } - { - file_type = RMS_ROFF_FILE; - field_export(field, export_file_roff, NULL, file_type, false, found_init_file); - check_exported_data(export_file_roff, init_file, file_type, field_config, field, nx, ny, nz); - } - - free(found_init_file); - found_init_file = NULL; - { - file_type = ECL_GRDECL_FILE; - field_export(field, export_file_grdecl, NULL, file_type, false, found_init_file); - check_exported_data(export_file_grdecl, found_init_file, file_type, field_config, field, nx, ny, nz); - } - { - file_type = RMS_ROFF_FILE; - field_export(field, export_file_roff, NULL, file_type, false, found_init_file); - check_exported_data(export_file_roff, found_init_file, file_type, field_config, field, nx, ny, nz); - } - - - - ert_test_context_free(test_context); - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_forward_init_FIELD.c b/ThirdParty/Ert/libenkf/tests/enkf_forward_init_FIELD.c deleted file mode 100644 index b046029ca6..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_forward_init_FIELD.c +++ /dev/null @@ -1,155 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_forward_init_FIELD.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - - -void create_runpath(enkf_main_type * enkf_main, int iter) { - const int ens_size = enkf_main_get_ensemble_size( enkf_main ); - bool_vector_type * iactive = bool_vector_alloc(0,false); - - bool_vector_iset( iactive , ens_size - 1 , true ); - enkf_main_create_run_path(enkf_main , iactive , iter); - bool_vector_free(iactive); -} - - - -int main(int argc , char ** argv) { - enkf_main_install_SIGNALS(); - const char * root_path = argv[1]; - const char * config_file = argv[2]; - const char * init_file = argv[3]; - const char * forward_init_string = argv[4]; - test_work_area_type * work_area = test_work_area_alloc(config_file ); - test_work_area_copy_directory_content( work_area , root_path ); - test_work_area_install_file( work_area , init_file ); - { - bool forward_init; - bool strict = true; - enkf_main_type * enkf_main; - - test_assert_true( util_sscanf_bool( forward_init_string , &forward_init)); - - util_clear_directory( "Storage" , true , true ); - enkf_main = enkf_main_bootstrap( config_file , strict , true ); - { - enkf_state_type * state = enkf_main_iget_state( enkf_main , 0 ); - enkf_node_type * field_node = enkf_state_get_node( state , "PORO" ); - { - const enkf_config_node_type * field_config_node = enkf_node_get_config( field_node ); - char * init_file1 = enkf_config_node_alloc_initfile( field_config_node , NULL , 0); - char * init_file2 = enkf_config_node_alloc_initfile( field_config_node , "/tmp", 0); - - test_assert_bool_equal( enkf_config_node_use_forward_init( field_config_node ) , forward_init ); - test_assert_string_equal( init_file1 , "petro.grdecl"); - test_assert_string_equal( init_file2 , "/tmp/petro.grdecl"); - - free( init_file1 ); - free( init_file2 ); - } - - test_assert_bool_equal( enkf_node_use_forward_init( field_node ) , forward_init ); - if (forward_init) - test_assert_bool_not_equal( enkf_node_initialize( field_node , 0 , enkf_state_get_rng( state )) , forward_init); - // else hard_failure() - } - test_assert_bool_equal( forward_init, ensemble_config_have_forward_init( enkf_main_get_ensemble_config( enkf_main ))); - - if (forward_init) { - enkf_state_type * state = enkf_main_iget_state( enkf_main , 0 ); - enkf_fs_type * fs = enkf_main_get_fs( enkf_main ); - enkf_node_type * field_node = enkf_state_get_node( state , "PORO" ); - run_arg_type * run_arg = run_arg_alloc_ENSEMBLE_EXPERIMENT( fs , 0 ,0 , "simulations/run0"); - node_id_type node_id = {.report_step = 0 , - .iens = 0 }; - - create_runpath( enkf_main, 0 ); - test_assert_true( util_is_directory( "simulations/run0" )); - - { - int result; - stringlist_type * msg_list = stringlist_alloc_new(); - - - test_assert_false( enkf_node_has_data( field_node , fs, node_id )); - - util_unlink_existing( "simulations/run0/petro.grdecl" ); - - test_assert_false(enkf_node_forward_init(field_node, "simulations/run0", 0)); - result = enkf_state_forward_init(state, run_arg); - test_assert_true(LOAD_FAILURE & result); - - result = 0; - { - enkf_fs_type * fs = enkf_main_get_fs(enkf_main); - state_map_type * state_map = enkf_fs_get_state_map(fs); - state_map_iset(state_map, 0, STATE_INITIALIZED); - } - result = enkf_state_load_from_forward_model(state, run_arg , msg_list); - stringlist_free(msg_list); - test_assert_true(LOAD_FAILURE & result); - } - - - util_copy_file( init_file , "simulations/run0/petro.grdecl"); - { - int result; - stringlist_type * msg_list = stringlist_alloc_new(); - - test_assert_true( enkf_node_forward_init( field_node , "simulations/run0" , 0)); - result = enkf_state_forward_init( state , run_arg); - test_assert_int_equal( result, 0 ); - result = enkf_state_load_from_forward_model( state , run_arg , msg_list ); - - stringlist_free( msg_list ); - test_assert_int_equal(result , 0); - - { - double value; - test_assert_true( enkf_node_user_get( field_node , fs , "5,5,5" , node_id , &value)); - test_assert_double_equal( 0.28485405445 , value); - } - } - util_clear_directory( "simulations" , true , true ); - create_runpath( enkf_main, 0 ); - test_assert_true( util_is_directory( "simulations/run0" )); - test_assert_true( util_is_file( "simulations/run0/PORO.grdecl" )); - test_assert_true( enkf_node_fload( field_node , "simulations/run0/PORO.grdecl")); - { - double value; - test_assert_true( enkf_node_user_get( field_node , fs , "4,4,4" , node_id , &value)); - test_assert_double_equal( 0.130251303315 , value); - } - util_clear_directory( "simulations" , true , true ); - run_arg_free( run_arg ); - } - enkf_main_free( enkf_main ); - } -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_forward_init_GEN_KW.c b/ThirdParty/Ert/libenkf/tests/enkf_forward_init_GEN_KW.c deleted file mode 100644 index 5806bfce4b..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_forward_init_GEN_KW.c +++ /dev/null @@ -1,163 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_forward_init_GEN_KW.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - - -void create_runpath(enkf_main_type * enkf_main, int iter ) { - const int ens_size = enkf_main_get_ensemble_size( enkf_main ); - bool_vector_type * iactive = bool_vector_alloc(0,false); - - bool_vector_iset( iactive , ens_size - 1 , true ); - enkf_main_create_run_path(enkf_main , iactive , iter); - bool_vector_free(iactive); -} - - -int main(int argc , char ** argv) { - enkf_main_install_SIGNALS(); - const char * root_path = argv[1]; - const char * config_file = argv[2]; - const char * forward_init_string = argv[3]; - test_work_area_type * work_area = test_work_area_alloc(config_file ); - test_work_area_copy_directory_content( work_area , root_path ); - { - bool forward_init; - bool strict = true; - enkf_main_type * enkf_main; - - test_assert_true( util_sscanf_bool( forward_init_string , &forward_init)); - - util_clear_directory( "Storage" , true , true ); - enkf_main = enkf_main_bootstrap( config_file , strict , true ); - { - enkf_state_type * state = enkf_main_iget_state( enkf_main , 0 ); - enkf_node_type * gen_kw_node = enkf_state_get_node( state , "MULTFLT" ); - { - const enkf_config_node_type * gen_kw_config_node = enkf_node_get_config( gen_kw_node ); - char * init_file1 = enkf_config_node_alloc_initfile( gen_kw_config_node , NULL , 0); - char * init_file2 = enkf_config_node_alloc_initfile( gen_kw_config_node , "/tmp", 0); - - test_assert_bool_equal( enkf_config_node_use_forward_init( gen_kw_config_node ) , forward_init ); - test_assert_string_equal( init_file1 , "MULTFLT_INIT"); - test_assert_string_equal( init_file2 , "/tmp/MULTFLT_INIT"); - - free( init_file1 ); - free( init_file2 ); - } - - test_assert_bool_equal( enkf_node_use_forward_init( gen_kw_node ) , forward_init ); - if (forward_init) - test_assert_bool_not_equal( enkf_node_initialize( gen_kw_node , 0 , enkf_state_get_rng( state )) , forward_init); - // else hard_failure() - } - test_assert_bool_equal( forward_init, ensemble_config_have_forward_init( enkf_main_get_ensemble_config( enkf_main ))); - - if (forward_init) { - enkf_state_type * state = enkf_main_iget_state( enkf_main , 0 ); - enkf_fs_type * fs = enkf_main_get_fs( enkf_main ); - run_arg_type * run_arg = run_arg_alloc_ENSEMBLE_EXPERIMENT( fs , 0 , 0 , "simulations/run0"); - enkf_node_type * gen_kw_node = enkf_state_get_node( state , "MULTFLT" ); - node_id_type node_id = {.report_step = 0 , - .iens = 0 }; - - create_runpath( enkf_main, 0 ); - test_assert_true( util_is_directory( "simulations/run0" )); - - { - int error; - stringlist_type * msg_list = stringlist_alloc_new(); - bool_vector_type * iactive = bool_vector_alloc( enkf_main_get_ensemble_size( enkf_main ) , true); - - test_assert_false( enkf_node_has_data( gen_kw_node , fs, node_id )); - util_unlink_existing( "simulations/run0/MULTFLT_INIT" ); - - - test_assert_false( enkf_node_forward_init( gen_kw_node , "simulations/run0" , 0 )); - error = enkf_state_forward_init( state , run_arg ); - test_assert_true(LOAD_FAILURE & error); - - { - enkf_fs_type * fs = enkf_main_get_fs( enkf_main ); - state_map_type * state_map = enkf_fs_get_state_map(fs); - state_map_iset(state_map , 0 , STATE_INITIALIZED); - } - error = enkf_state_load_from_forward_model( state , run_arg , msg_list ); - stringlist_free( msg_list ); - bool_vector_free( iactive ); - test_assert_true(LOAD_FAILURE & error); - } - - - - { - FILE * stream = util_fopen("simulations/run0/MULTFLT_INIT" , "w"); - fprintf(stream , "123456.0\n" ); - fclose( stream ); - } - - { - int error; - stringlist_type * msg_list = stringlist_alloc_new(); - - test_assert_true( enkf_node_forward_init( gen_kw_node , "simulations/run0" , 0 )); - error = enkf_state_forward_init( state , run_arg ); - test_assert_int_equal(0, error); - error = enkf_state_load_from_forward_model( state , run_arg , msg_list ); - - stringlist_free( msg_list ); - test_assert_int_equal(0, error); - - { - double value; - test_assert_true( enkf_node_user_get( gen_kw_node , fs , "MULTFLT" , node_id , &value)); - test_assert_double_equal( 123456.0 , value); - } - } - - test_assert_true( util_is_file ("simulations/run0/parameters.txt")); //Export of gen kw params - - util_clear_directory( "simulations" , true , true ); - create_runpath( enkf_main, 0 ); - test_assert_true( util_is_directory( "simulations/run0" )); - test_assert_true( util_is_file( "simulations/run0/MULTFLT.INC" )); - { - FILE * stream = util_fopen("simulations/run0/MULTFLT.INC" , "r"); - double value; - fscanf(stream , "%lg" , &value); - fclose( stream ); - test_assert_double_equal( 123456.0 , value); - } - util_clear_directory( "simulations" , true , true ); - run_arg_free( run_arg ); - } - enkf_main_free( enkf_main ); - } - test_work_area_free( work_area ); -} diff --git a/ThirdParty/Ert/libenkf/tests/enkf_forward_init_GEN_PARAM.c b/ThirdParty/Ert/libenkf/tests/enkf_forward_init_GEN_PARAM.c deleted file mode 100644 index f29e0cab78..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_forward_init_GEN_PARAM.c +++ /dev/null @@ -1,154 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_forward_init_GEN_PARAM.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - - -void create_runpath(enkf_main_type * enkf_main, int iter ) { - const int ens_size = enkf_main_get_ensemble_size( enkf_main ); - bool_vector_type * iactive = bool_vector_alloc(0,false); - - bool_vector_iset( iactive , ens_size - 1 , true ); - enkf_main_create_run_path(enkf_main , iactive , iter); - bool_vector_free(iactive); -} - - - -int main(int argc , char ** argv) { - enkf_main_install_SIGNALS(); - const char * root_path = argv[1]; - const char * config_file = argv[2]; - const char * forward_init_string = argv[3]; - test_work_area_type * work_area = test_work_area_alloc(config_file ); - test_work_area_copy_directory_content( work_area , root_path ); - { - bool forward_init; - bool strict = true; - enkf_main_type * enkf_main; - - test_assert_true( util_sscanf_bool( forward_init_string , &forward_init)); - - util_clear_directory( "Storage" , true , true ); - enkf_main = enkf_main_bootstrap( config_file , strict , true ); - { - enkf_state_type * state = enkf_main_iget_state( enkf_main , 0 ); - enkf_node_type * gen_param_node = enkf_state_get_node( state , "PARAM" ); - { - const enkf_config_node_type * gen_param_config_node = enkf_node_get_config( gen_param_node ); - char * init_file1 = enkf_config_node_alloc_initfile( gen_param_config_node , NULL , 0); - char * init_file2 = enkf_config_node_alloc_initfile( gen_param_config_node , "/tmp", 0); - - test_assert_bool_equal( enkf_config_node_use_forward_init( gen_param_config_node ) , forward_init ); - test_assert_string_equal( init_file1 , "PARAM_INIT"); - test_assert_string_equal( init_file2 , "/tmp/PARAM_INIT"); - - free( init_file1 ); - free( init_file2 ); - } - - test_assert_bool_equal( enkf_node_use_forward_init( gen_param_node ) , forward_init ); - if (forward_init) - test_assert_bool_not_equal( enkf_node_initialize( gen_param_node , 0 , enkf_state_get_rng( state )) , forward_init); - // else hard_failure() - } - test_assert_bool_equal( forward_init, ensemble_config_have_forward_init( enkf_main_get_ensemble_config( enkf_main ))); - - if (forward_init) { - enkf_state_type * state = enkf_main_iget_state( enkf_main , 0 ); - enkf_fs_type * fs = enkf_main_get_fs( enkf_main ); - run_arg_type * run_arg = run_arg_alloc_ENSEMBLE_EXPERIMENT( fs , 0 , 0 , "simulations/run0"); - enkf_node_type * gen_param_node = enkf_state_get_node( state , "PARAM" ); - node_id_type node_id = {.report_step = 0 , - .iens = 0}; - - create_runpath( enkf_main, 0 ); - test_assert_true( util_is_directory( "simulations/run0" )); - - test_assert_false( enkf_node_has_data( gen_param_node , fs, node_id )); - util_unlink_existing( "simulations/run0/PARAM_INIT" ); - - { - FILE * stream = util_fopen("simulations/run0/PARAM_INIT" , "w"); - fprintf(stream , "0\n1\n2\n3\n" ); - fclose( stream ); - } - - { - int error; - stringlist_type * msg_list = stringlist_alloc_new(); - - test_assert_true( enkf_node_forward_init( gen_param_node , "simulations/run0" , 0 )); - - error = enkf_state_forward_init( state , run_arg ); - test_assert_int_equal(0, error); - { - enkf_fs_type * fs = enkf_main_get_fs( enkf_main ); - state_map_type * state_map = enkf_fs_get_state_map(fs); - state_map_iset(state_map , 0 , STATE_INITIALIZED); - } - error = enkf_state_load_from_forward_model( state , run_arg , msg_list ); - - stringlist_free( msg_list ); - test_assert_int_equal(0, error); - - { - double value; - test_assert_true( enkf_node_user_get( gen_param_node , fs , "0" , node_id , &value)); - test_assert_double_equal( 0 , value); - - test_assert_true( enkf_node_user_get( gen_param_node , fs , "1" , node_id , &value)); - test_assert_double_equal( 1 , value); - - test_assert_true( enkf_node_user_get( gen_param_node , fs , "2" , node_id , &value)); - test_assert_double_equal( 2 , value); - } - } - util_clear_directory( "simulations" , true , true ); - create_runpath( enkf_main, 0 ); - test_assert_true( util_is_directory( "simulations/run0" )); - test_assert_true( util_is_file( "simulations/run0/PARAM.INC" )); - { - FILE * stream = util_fopen("simulations/run0/PARAM.INC" , "r"); - double v0,v1,v2,v3; - fscanf(stream , "%lg %lg %lg %lg" , &v0,&v1,&v2,&v3); - fclose( stream ); - test_assert_double_equal( 0 , v0); - test_assert_double_equal( 1 , v1); - test_assert_double_equal( 2 , v2); - test_assert_double_equal( 3 , v3); - } - util_clear_directory( "simulations" , true , true ); - run_arg_free( run_arg ); - } - enkf_main_free( enkf_main ); - } - test_work_area_free( work_area ); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_forward_init_SURFACE.c b/ThirdParty/Ert/libenkf/tests/enkf_forward_init_SURFACE.c deleted file mode 100644 index 92fe420906..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_forward_init_SURFACE.c +++ /dev/null @@ -1,161 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_forward_init_SURFACE.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -void create_runpath(enkf_main_type * enkf_main, int iter ) { - const int ens_size = enkf_main_get_ensemble_size( enkf_main ); - bool_vector_type * iactive = bool_vector_alloc(0,false); - - bool_vector_iset( iactive , ens_size - 1 , true ); - enkf_main_create_run_path(enkf_main , iactive , iter); - bool_vector_free(iactive); -} - - - -int main(int argc , char ** argv) { - enkf_main_install_SIGNALS(); - const char * root_path = argv[1]; - const char * config_file = argv[2]; - const char * init_file = argv[3]; - const char * forward_init_string = argv[4]; - test_work_area_type * work_area = test_work_area_alloc(config_file ); - - test_work_area_copy_directory_content( work_area , root_path ); - test_work_area_install_file( work_area , init_file ); - { - - bool forward_init; - bool strict = true; - enkf_main_type * enkf_main; - - test_assert_true( util_sscanf_bool( forward_init_string , &forward_init)); - - util_clear_directory( "Storage" , true , true ); - enkf_main = enkf_main_bootstrap( config_file , strict , true ); - { - enkf_state_type * state = enkf_main_iget_state( enkf_main , 0 ); - enkf_node_type * surface_node = enkf_state_get_node( state , "SURFACE" ); - { - const enkf_config_node_type * surface_config_node = enkf_node_get_config( surface_node ); - char * init_file1 = enkf_config_node_alloc_initfile( surface_config_node , NULL , 0); - char * init_file2 = enkf_config_node_alloc_initfile( surface_config_node , "/tmp", 0); - - test_assert_bool_equal( enkf_config_node_use_forward_init( surface_config_node ) , forward_init ); - test_assert_string_equal( init_file1 , "Surface.irap"); - test_assert_string_equal( init_file2 , "/tmp/Surface.irap"); - - free( init_file1 ); - free( init_file2 ); - } - - test_assert_bool_equal( enkf_node_use_forward_init( surface_node ) , forward_init ); - if (forward_init) - test_assert_bool_not_equal( enkf_node_initialize( surface_node , 0 , enkf_state_get_rng( state )) , forward_init); - // else hard_failure() - } - test_assert_bool_equal( forward_init, ensemble_config_have_forward_init( enkf_main_get_ensemble_config( enkf_main ))); - - if (forward_init) { - enkf_state_type * state = enkf_main_iget_state( enkf_main , 0 ); - enkf_fs_type * fs = enkf_main_get_fs( enkf_main ); - run_arg_type * run_arg = run_arg_alloc_ENSEMBLE_EXPERIMENT( fs , 0 ,0 , "simulations/run0"); - enkf_node_type * surface_node = enkf_state_get_node( state , "SURFACE" ); - node_id_type node_id = {.report_step = 0 , - .iens = 0 }; - - create_runpath( enkf_main, 0 ); - test_assert_true( util_is_directory( "simulations/run0" )); - - { - int error; - stringlist_type * msg_list = stringlist_alloc_new(); - - - test_assert_false( enkf_node_has_data( surface_node , fs, node_id )); - - util_unlink_existing( "simulations/run0/Surface.irap" ); - - test_assert_false( enkf_node_forward_init( surface_node , "simulations/run0" , 0 )); - error = enkf_state_forward_init( state , run_arg ); - test_assert_true(LOAD_FAILURE & error); - - { - enkf_fs_type * fs = enkf_main_get_fs(enkf_main); - state_map_type * state_map = enkf_fs_get_state_map(fs); - state_map_iset(state_map, 0, STATE_INITIALIZED); - } - error = enkf_state_load_from_forward_model(state, run_arg , msg_list); - stringlist_free( msg_list ); - test_assert_true(LOAD_FAILURE & error); - } - - - util_copy_file( init_file , "simulations/run0/Surface.irap"); - { - int error; - stringlist_type * msg_list = stringlist_alloc_new(); - - - test_assert_true( enkf_node_forward_init( surface_node , "simulations/run0" , 0 )); - error = enkf_state_forward_init( state , run_arg ); - test_assert_int_equal(0, error); - error = enkf_state_load_from_forward_model( state , run_arg , msg_list ); - stringlist_free( msg_list ); - test_assert_int_equal(0, error); - - { - double value; - test_assert_true( enkf_node_user_get( surface_node , fs , "0" , node_id , &value)); - test_assert_double_equal( 2735.7461 , value); - - test_assert_true( enkf_node_user_get( surface_node , fs , "5" , node_id , &value)); - test_assert_double_equal( 2737.0122 , value); - } - } - util_clear_directory( "simulations" , true , true ); - create_runpath( enkf_main, 0 ); - test_assert_true( util_is_directory( "simulations/run0" )); - test_assert_true( util_is_file( "simulations/run0/SURFACE.INC" )); - test_assert_true( enkf_node_fload( surface_node , "simulations/run0/SURFACE.INC")); - { - double value; - test_assert_true( enkf_node_user_get( surface_node , fs , "0" , node_id , &value)); - test_assert_double_equal( 2735.7461 , value); - - test_assert_true( enkf_node_user_get( surface_node , fs , "5" , node_id , &value)); - test_assert_double_equal( 2737.0122 , value); - } - util_clear_directory( "simulations" , true , true ); - } - enkf_main_free( enkf_main ); - } -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_forward_init_transform.c b/ThirdParty/Ert/libenkf/tests/enkf_forward_init_transform.c deleted file mode 100644 index d1cb969763..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_forward_init_transform.c +++ /dev/null @@ -1,115 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_forward_init_transform.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include -#include - - - - - - -void create_runpath(enkf_main_type * enkf_main, int iter ) { - const int ens_size = enkf_main_get_ensemble_size( enkf_main ); - bool_vector_type * iactive = bool_vector_alloc(0,false); - - bool_vector_iset( iactive , ens_size - 1 , true ); - enkf_main_create_run_path(enkf_main , iactive , iter); - bool_vector_free(iactive); -} - - -bool check_original_exported_data_equal(const enkf_node_type * field_node) { - FILE * original_stream = util_fopen( "petro.grdecl" , "r"); - ecl_kw_type * kw_original = ecl_kw_fscanf_alloc_grdecl_dynamic( original_stream , "PORO" , ECL_DOUBLE_TYPE ); - - enkf_node_ecl_write(field_node, "tmp", NULL, 0); - FILE * exported_stream = util_fopen( "tmp/PORO.grdecl" , "r"); - ecl_kw_type * kw_exported = ecl_kw_fscanf_alloc_grdecl_dynamic( exported_stream , "PORO" , ECL_DOUBLE_TYPE ); - - bool ret = ecl_kw_numeric_equal(kw_original, kw_exported, 1e-5 , 1e-5); - - util_fclose(original_stream); - util_fclose(exported_stream); - ecl_kw_free(kw_original); - ecl_kw_free(kw_exported); - - return ret; -} - - -int main(int argc , char ** argv) { - enkf_main_install_SIGNALS(); - const char * root_path = argv[1]; - const char * config_file = argv[2]; - const char * init_file = argv[3]; - const char * forward_init_string = argv[4]; - - test_work_area_type * work_area = test_work_area_alloc(config_file ); - test_work_area_copy_directory_content( work_area , root_path ); - test_work_area_install_file( work_area , init_file ); - test_work_area_set_store(work_area, true); - - bool strict = true; - enkf_main_type * enkf_main = enkf_main_bootstrap( config_file , strict , true ); - enkf_fs_type * init_fs = enkf_main_get_fs(enkf_main); - enkf_state_type * state = enkf_main_iget_state( enkf_main , 0 ); - run_arg_type * run_arg = run_arg_alloc_ENSEMBLE_EXPERIMENT( init_fs , 0 ,0 , "simulations/run0"); - enkf_node_type * field_node = enkf_state_get_node( state , "PORO" ); - - bool forward_init; - test_assert_true( util_sscanf_bool( forward_init_string , &forward_init)); - test_assert_bool_equal( enkf_node_use_forward_init( field_node ) , forward_init ); - test_assert_bool_equal( forward_init, ensemble_config_have_forward_init( enkf_main_get_ensemble_config( enkf_main ))); - - util_clear_directory( "Storage" , true , true ); - - create_runpath( enkf_main, 0 ); - test_assert_true( util_is_directory( "simulations/run0" )); - - if (forward_init) - util_copy_file( init_file , "simulations/run0/petro.grdecl"); - - { - bool_vector_type * iactive = bool_vector_alloc( enkf_main_get_ensemble_size(enkf_main) , true); - int error; - stringlist_type * msg_list = stringlist_alloc_new(); - error = enkf_state_load_from_forward_model( state , run_arg , msg_list ); - stringlist_free( msg_list ); - bool_vector_free( iactive ); - test_assert_int_equal(error, 0); - } - - test_assert_true(check_original_exported_data_equal(field_node)); - - run_arg_free( run_arg ); - enkf_main_free(enkf_main); - test_work_area_free(work_area); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_forward_load_context.c b/ThirdParty/Ert/libenkf/tests/enkf_forward_load_context.c deleted file mode 100644 index 0163e2f330..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_forward_load_context.c +++ /dev/null @@ -1,132 +0,0 @@ -/* - Copyright (C) 2016 Statoil ASA, Norway. - - The file 'forward_load_context.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include - -#include -#include - - -void test_update_result() { - forward_load_context_type * load_context = forward_load_context_alloc( NULL , false , NULL , NULL , NULL); - test_assert_int_equal( forward_load_context_get_result( load_context ) , 0 ); - forward_load_context_update_result( load_context , 1 ); - test_assert_int_equal( forward_load_context_get_result( load_context ) , 1 ); - - forward_load_context_update_result( load_context , 1 ); - test_assert_int_equal( forward_load_context_get_result( load_context ) , 1 ); - - forward_load_context_update_result( load_context , 2 ); - test_assert_int_equal( forward_load_context_get_result( load_context ) , 3 ); - - forward_load_context_update_result( load_context , 5 ); - test_assert_int_equal( forward_load_context_get_result( load_context ) , 7 ); - - forward_load_context_free( load_context ); -} - -void test_create() { - forward_load_context_type * load_context = forward_load_context_alloc( NULL , false , NULL , NULL , NULL); - test_assert_true( forward_load_context_is_instance( load_context )); - forward_load_context_free( load_context ); -} - -void test_load_restart1() { - run_arg_type * run_arg = run_arg_alloc_ENSEMBLE_EXPERIMENT(NULL , 0 , 0 , "run"); - ecl_config_type * ecl_config = ecl_config_alloc( ); - forward_load_context_type * load_context = forward_load_context_alloc( run_arg , false , ecl_config , "BASE" , NULL ); - - test_assert_false( forward_load_context_load_restart_file( load_context , 10 )); - - forward_load_context_free( load_context ); - ecl_config_free( ecl_config ); - run_arg_free( run_arg ); -} - - -void make_restart_mock( const char * path , const char * eclbase , int report_step) { - char * filename = ecl_util_alloc_filename( path , eclbase , ECL_RESTART_FILE , false , report_step ); - ecl_kw_type * kw = ecl_kw_alloc( "KW" , 100 , ECL_FLOAT_TYPE); - fortio_type * f = fortio_open_writer( filename , false , true ); - ecl_kw_fwrite( kw , f ); - fortio_fclose( f ); - ecl_kw_free( kw ); - free( filename ); -} - -void test_load_restart2() { - test_work_area_type * work_area = test_work_area_alloc("forward_load"); - { - run_arg_type * run_arg = run_arg_alloc_ENSEMBLE_EXPERIMENT(NULL , 0 , 0 , "run"); - ecl_config_type * ecl_config = ecl_config_alloc( ); - forward_load_context_type * load_context = forward_load_context_alloc( run_arg , false , ecl_config , "BASE" , NULL ); - util_make_path("run"); - make_restart_mock( "run" , "BASE" , 1 ); - make_restart_mock( "run" , "BASE" , 3 ); - - test_assert_false( forward_load_context_load_restart_file( load_context , 0 )); - test_assert_true( forward_load_context_load_restart_file( load_context , 1 )); - test_assert_false( forward_load_context_load_restart_file( load_context , 2 )); - test_assert_true( forward_load_context_load_restart_file( load_context , 3 )); - - forward_load_context_free( load_context ); - ecl_config_free( ecl_config ); - run_arg_free( run_arg ); - } - test_work_area_free( work_area ); -} - - - -void test_add_message() { - { - forward_load_context_type * load_context = forward_load_context_alloc( NULL , false , NULL , NULL , NULL); - forward_load_context_add_message( load_context , "MESSAGE" ); - test_assert_false( forward_load_context_accept_messages( load_context )); - forward_load_context_free( load_context ); - } - - { - stringlist_type * message_list = stringlist_alloc_new( ); - forward_load_context_type * load_context = forward_load_context_alloc( NULL , false , NULL , NULL , message_list ); - - test_assert_true( forward_load_context_accept_messages( load_context )); - forward_load_context_add_message( load_context , "MESSAGE1" ); - forward_load_context_add_message( load_context , "MESSAGE2" ); - forward_load_context_free( load_context ); - - test_assert_int_equal( 2 , stringlist_get_size( message_list )); - test_assert_string_equal( stringlist_iget( message_list , 0 ) , "MESSAGE1" ); - test_assert_string_equal( stringlist_iget( message_list , 1 ) , "MESSAGE2" ); - stringlist_free( message_list ); - } -} - - - - -int main(int argc , char ** argv) { - util_install_signals(); - test_create(); - test_load_restart1(); - test_load_restart2(); - test_add_message(); - test_update_result(); - exit(0); -} diff --git a/ThirdParty/Ert/libenkf/tests/enkf_fs.c b/ThirdParty/Ert/libenkf/tests/enkf_fs.c deleted file mode 100644 index 9447bc8c16..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_fs.c +++ /dev/null @@ -1,158 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_fs.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "ert/util/build_config.h" - -#include -#include -#include -#include - - -typedef struct -{ - pthread_mutex_t mutex1; - pthread_mutex_t mutex2; -} shared_data; - -static shared_data* data = NULL; - -void test_mount() { - test_work_area_type * work_area = test_work_area_alloc("enkf_fs/mount"); - - test_assert_false( enkf_fs_exists( "mnt" )); - test_assert_NULL( enkf_fs_create_fs("mnt" , BLOCK_FS_DRIVER_ID , NULL , false)); - test_assert_true( enkf_fs_exists( "mnt" )); - { - enkf_fs_type * fs = enkf_fs_mount( "mnt" ); - test_assert_true( util_file_exists("mnt/mnt.lock")); - test_assert_true( enkf_fs_is_instance( fs )); - enkf_fs_decref( fs ); - test_assert_false( util_file_exists("mnt/mnt.lock")); - } - { - enkf_fs_type * fs = enkf_fs_create_fs( "mnt2" , BLOCK_FS_DRIVER_ID , NULL , true); - test_assert_true( enkf_fs_is_instance( fs )); - enkf_fs_decref( fs ); - } - - - test_work_area_free( work_area ); -} - -void test_refcount() { - test_work_area_type * work_area = test_work_area_alloc("enkf_fs/refcount"); - - enkf_fs_create_fs("mnt" , BLOCK_FS_DRIVER_ID , NULL , false); - { - enkf_fs_type * fs = enkf_fs_mount( "mnt" ); - test_assert_int_equal( 1 , enkf_fs_get_refcount( fs )); - enkf_fs_decref( fs ); - } - test_work_area_free( work_area ); -} - -void createFS() { - - pthread_mutex_lock(&data->mutex1); - pid_t pid = fork(); - - if (pid == 0) { - enkf_fs_type * fs_false = enkf_fs_mount( "mnt" ); - test_assert_false(enkf_fs_is_read_only(fs_false)); - test_assert_true( util_file_exists("mnt/mnt.lock")); - pthread_mutex_unlock(&data->mutex1); - pthread_mutex_lock(&data->mutex2); - enkf_fs_decref( fs_false ); - pthread_mutex_unlock(&data->mutex2); - exit(0); - } -} - -void test_fwrite_readonly( void * arg ) { - enkf_fs_type * fs = enkf_fs_safe_cast( arg ); - /* - The arguments here are completely bogus; the important thing is - that this fwrite call should be intercepted by a util_abort() - call (which is again intercepted by the testing function) before - the argument are actually accessed. - */ - enkf_fs_fwrite_node( fs , NULL , "KEY" , PARAMETER , 100 , 1 ); -} - -void initialise_shared() -{ - // place our shared data in shared memory - int prot = PROT_READ | PROT_WRITE; -#ifdef __linux - int flags = MAP_SHARED | MAP_ANONYMOUS; -#elif __APPLE__ - int flags = MAP_SHARED | MAP_ANON; -#endif - - data = mmap(NULL, sizeof(shared_data), prot, flags, -1, 0); - assert(data); - - // initialise mutex so it works properly in shared memory - pthread_mutexattr_t attr; - pthread_mutexattr_init(&attr); - pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED); - pthread_mutex_init(&data->mutex1, &attr); - pthread_mutex_init(&data->mutex2, &attr); -} - -/* - This test needs to fork off a seperate process to test the cross-process file locking. -*/ -void test_read_only2() { - initialise_shared(); - test_work_area_type * work_area = test_work_area_alloc("enkf_fs/read_only2"); - enkf_fs_create_fs("mnt" , BLOCK_FS_DRIVER_ID , NULL , false); - pthread_mutex_lock(&data->mutex2); - createFS(); - pthread_mutex_lock(&data->mutex1); - { - enkf_fs_type * fs_false = enkf_fs_mount( "mnt" ); - test_assert_true(enkf_fs_is_read_only(fs_false)); - test_assert_util_abort( "enkf_fs_fwrite_node" , test_fwrite_readonly , fs_false ); - enkf_fs_decref( fs_false ); - } - pthread_mutex_unlock(&data->mutex2); - pthread_mutex_unlock(&data->mutex1); - pthread_mutex_lock(&data->mutex2); - test_work_area_free( work_area ); - pthread_mutex_unlock(&data->mutex2); - munmap(data, sizeof(data)); -} - -int main(int argc, char ** argv) { - test_mount(); - test_refcount(); - test_read_only2(); - exit(0); -} diff --git a/ThirdParty/Ert/libenkf/tests/enkf_gen_data_config.c b/ThirdParty/Ert/libenkf/tests/enkf_gen_data_config.c deleted file mode 100644 index cb6049e650..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_gen_data_config.c +++ /dev/null @@ -1,373 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_gen_data_config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include -#include -#include -#include - -#include "ert/util/build_config.h" - -#include -#include -#include -#include -#include -#include -#include -#include - - -void test_report_steps_param() { - - gen_data_config_type * config = gen_data_config_alloc_GEN_PARAM("KEY" , ASCII , ASCII); - test_assert_false( gen_data_config_is_dynamic( config )); - test_assert_int_equal( 0 , gen_data_config_num_report_step( config )); - test_assert_false( gen_data_config_has_report_step( config , 0 )); - - /* Add to parameter should fail. */ - gen_data_config_add_report_step( config , 10 ); - test_assert_int_equal( 0 , gen_data_config_num_report_step( config )); - test_assert_false( gen_data_config_has_report_step( config , 10 )); - - /* Add to parameter should fail. */ - gen_data_config_set_active_report_steps_from_string( config , "0-9,100"); - test_assert_int_equal( 0 , gen_data_config_num_report_step( config )); - test_assert_false( gen_data_config_has_report_step( config , 10 )); - - - gen_data_config_free( config ); -} - - -void test_report_steps_dynamic() { - gen_data_config_type * config = gen_data_config_alloc_GEN_DATA_result("KEY" , ASCII); - test_assert_true( gen_data_config_is_dynamic( config )); - test_assert_int_equal( 0 , gen_data_config_num_report_step( config )); - test_assert_false( gen_data_config_has_report_step( config , 0 )); - - gen_data_config_add_report_step( config , 10 ); - test_assert_int_equal( 1 , gen_data_config_num_report_step( config )); - test_assert_true( gen_data_config_has_report_step( config , 10 )); - test_assert_int_equal( gen_data_config_iget_report_step( config , 0 ) , 10); - - gen_data_config_add_report_step( config , 10 ); - test_assert_int_equal( 1 , gen_data_config_num_report_step( config )); - test_assert_true( gen_data_config_has_report_step( config , 10 )); - - - gen_data_config_add_report_step( config , 5 ); - test_assert_int_equal( 2 , gen_data_config_num_report_step( config )); - test_assert_true( gen_data_config_has_report_step( config , 10 )); - test_assert_int_equal( gen_data_config_iget_report_step( config , 0 ) , 5); - test_assert_int_equal( gen_data_config_iget_report_step( config , 1 ) , 10); - - { - const int_vector_type * active_steps = gen_data_config_get_active_report_steps( config ); - - test_assert_int_equal( int_vector_iget( active_steps , 0 ) , 5); - test_assert_int_equal( int_vector_iget( active_steps , 1 ) , 10); - } - - gen_data_config_set_active_report_steps_from_string( config , "0-3,7-10,100"); // 0,1,2,3,7,8,9,10,100 - test_assert_int_equal( 9 , gen_data_config_num_report_step( config )); - test_assert_int_equal( 0 , gen_data_config_iget_report_step( config , 0 )); - test_assert_int_equal( 3 , gen_data_config_iget_report_step( config , 3)); - test_assert_int_equal( 9 , gen_data_config_iget_report_step( config , 6)); - test_assert_int_equal( 100 , gen_data_config_iget_report_step( config , 8)); - - gen_data_config_free( config ); -} - - -void test_gendata_fload(const char * filename) { - test_work_area_type * work_area = test_work_area_alloc( "test_gendata_fload"); - gen_data_config_type * config = gen_data_config_alloc_GEN_DATA_result("KEY" , ASCII); - gen_data_type * gen_data = gen_data_alloc(config); - - const char * cwd = test_work_area_get_cwd(work_area); - enkf_fs_type * write_fs = enkf_fs_create_fs(cwd, BLOCK_FS_DRIVER_ID, NULL , true); - run_arg_type * run_arg = run_arg_alloc_ENSEMBLE_EXPERIMENT(write_fs , 0,0,"path"); - forward_load_context_type * load_context = forward_load_context_alloc( run_arg , false , NULL , NULL , NULL); - forward_load_context_select_step(load_context , 0 ); - gen_data_fload_with_report_step(gen_data, filename , load_context); - int data_size = gen_data_config_get_data_size(config, 0); - test_assert_true(data_size > 0); - enkf_fs_decref( write_fs ); - - gen_data_free(gen_data); - gen_data_config_free( config ); - test_work_area_free(work_area); - run_arg_free( run_arg ); - forward_load_context_free( load_context ); -} - - -void test_gendata_fload_empty_file(const char * filename) { - test_work_area_type * work_area = test_work_area_alloc( "test_gendata_fload_empty_file" ); - gen_data_config_type * config = gen_data_config_alloc_GEN_DATA_result("KEY" , ASCII); - gen_data_type * gen_data = gen_data_alloc(config); - const char * cwd = test_work_area_get_cwd(work_area); - enkf_fs_type * write_fs = enkf_fs_create_fs(cwd, BLOCK_FS_DRIVER_ID, NULL , true); - run_arg_type * run_arg = run_arg_alloc_ENSEMBLE_EXPERIMENT(write_fs , 0,0,"path"); - forward_load_context_type * load_context = forward_load_context_alloc( run_arg , false , NULL , NULL , NULL); - - forward_load_context_select_step(load_context , 0 ); - gen_data_fload_with_report_step(gen_data, filename, load_context); - int data_size = gen_data_config_get_data_size(config, 0); - test_assert_true(data_size == 0); - enkf_fs_decref( write_fs ); - - gen_data_free(gen_data); - gen_data_config_free( config ); - test_work_area_free(work_area); - run_arg_free( run_arg ); - forward_load_context_free( load_context ); -} - - -void test_result_format() { - test_assert_true( gen_data_config_valid_result_format("path/file%d/extra")); - test_assert_true( gen_data_config_valid_result_format("file%04d")); - test_assert_false( gen_data_config_valid_result_format("/path/file%04d")); - - test_assert_false( gen_data_config_valid_result_format("/path/file%s")); - test_assert_false( gen_data_config_valid_result_format("/path/file")); - test_assert_false( gen_data_config_valid_result_format("/path/file%f")); - - test_assert_false( gen_data_config_valid_result_format(NULL)); -} - - -void alloc_invalid_io_format1( void * arg) { - gen_data_config_type * config = gen_data_config_alloc_GEN_DATA_result("KEY" , ASCII_TEMPLATE ); - gen_data_config_free( config ); -} - - -void alloc_invalid_io_format2( void * arg) { - gen_data_config_type * config = gen_data_config_alloc_GEN_DATA_state("KEY" , GEN_DATA_UNDEFINED , ASCII); - gen_data_config_free( config ); -} - - -void alloc_invalid_io_format3( void *arg) { - gen_data_config_type * config = gen_data_config_alloc_GEN_PARAM("KEY" , ASCII , ASCII_TEMPLATE ); - gen_data_config_free( config ); -} - - - -void test_set_invalid_format() { - test_assert_util_abort( "gen_data_config_alloc_GEN_DATA_result" , alloc_invalid_io_format1 , NULL); - test_assert_util_abort( "gen_data_config_alloc_GEN_DATA_state" , alloc_invalid_io_format2 , NULL); - test_assert_util_abort( "gen_data_config_alloc_GEN_PARAM" , alloc_invalid_io_format3 , NULL); -} - - -void test_format_check() { - test_assert_int_equal( GEN_DATA_UNDEFINED , gen_data_config_check_format( NULL )); - test_assert_int_equal( GEN_DATA_UNDEFINED , gen_data_config_check_format("Error?")); - test_assert_int_equal( ASCII , gen_data_config_check_format("ASCII")); - test_assert_int_equal( ASCII_TEMPLATE , gen_data_config_check_format("ASCII_TEMPLATE")); - test_assert_int_equal( BINARY_DOUBLE , gen_data_config_check_format("BINARY_DOUBLE")); - test_assert_int_equal( BINARY_FLOAT , gen_data_config_check_format("BINARY_FLOAT")); -} - - -void test_set_template_invalid() { - test_work_area_type * work_area = test_work_area_alloc("GEN_DATA_SET_TEMPLATE_INVALID"); - gen_data_config_type * config = gen_data_config_alloc_GEN_PARAM("KEY" , ASCII , ASCII); - - test_assert_false( gen_data_config_set_template( config , "does/not/exist" , NULL ) ); - - { - FILE * stream = util_fopen("template.txt" , "w"); - fprintf(stream , "Header1\n\nHeader2\n"); - fclose( stream ); - - gen_data_config_set_template( config , "template.txt" , ""); - test_assert_string_equal( "template.txt" , gen_data_config_get_template_file( config )); - test_assert_string_equal( "" , gen_data_config_get_template_key( config )); - - - { - char * buffer; - int data_offset , buffer_size , data_skip; - gen_data_config_get_template_data( config , &buffer , &data_offset , &buffer_size , &data_skip); - - test_assert_string_equal( buffer , "Header1\n\nHeader2\n"); - test_assert_int_equal( data_offset , 8 ); - test_assert_int_equal( buffer_size , 22 ); - test_assert_int_equal( data_skip , 5 ); - } - } - - - { - FILE * stream = util_fopen("template2.txt" , "w"); - fprintf(stream , "Template XYZ - lots of shit .... \n"); - fclose( stream ); - - test_assert_false( gen_data_config_set_template( config , "template2.txt" , "")); - - test_assert_string_equal( "template.txt" , gen_data_config_get_template_file( config )); - test_assert_string_equal( "" , gen_data_config_get_template_key( config )); - { - char * buffer; - int data_offset , buffer_size , data_skip; - gen_data_config_get_template_data( config , &buffer , &data_offset , &buffer_size , &data_skip); - - test_assert_string_equal( buffer , "Header1\n\nHeader2\n"); - test_assert_int_equal( data_offset , 8 ); - test_assert_int_equal( buffer_size , 22 ); - test_assert_int_equal( data_skip , 5 ); - } - } - - gen_data_config_free( config ); - test_work_area_free( work_area ); -} - - - -void test_set_template() { - test_work_area_type * work_area = test_work_area_alloc("GEN_DATA_SET_TEMPLATE"); - { - gen_data_config_type * config = gen_data_config_alloc_GEN_PARAM("KEY" , ASCII , ASCII); - - test_assert_true( gen_data_config_set_template( config , NULL , NULL ) ); - test_assert_NULL( gen_data_config_get_template_file( config )); - test_assert_NULL( gen_data_config_get_template_key( config )); - - { - char * buffer; - int data_offset , buffer_size , data_skip; - gen_data_config_get_template_data( config , &buffer , &data_offset , &buffer_size , &data_skip); - - test_assert_NULL( buffer ); - test_assert_int_equal( data_offset , 0 ); - test_assert_int_equal( buffer_size , 0 ); - test_assert_int_equal( data_skip , 0 ); - } - - - { - FILE * stream = util_fopen("template.txt" , "w"); - fprintf(stream , "Header\n"); - fclose( stream ); - - test_assert_true( gen_data_config_set_template( config , "template.txt" , NULL )); - test_assert_string_equal( "template.txt" , gen_data_config_get_template_file( config )); - test_assert_NULL( gen_data_config_get_template_key( config )); - - - { - char * buffer; - int data_offset , buffer_size , data_skip; - gen_data_config_get_template_data( config , &buffer , &data_offset , &buffer_size , &data_skip); - - test_assert_string_equal( buffer , "Header\n"); - test_assert_int_equal( data_offset , 7 ); - test_assert_int_equal( buffer_size , 7 ); - test_assert_int_equal( data_skip , 0 ); - } - } - - { - FILE * stream = util_fopen("template.txt" , "w"); - fprintf(stream , "Header1\n\nHeader2\n"); - fclose( stream ); - - gen_data_config_set_template( config , "template.txt" , ""); - test_assert_string_equal( "template.txt" , gen_data_config_get_template_file( config )); - test_assert_string_equal( "" , gen_data_config_get_template_key( config )); - - - { - char * buffer; - int data_offset , buffer_size , data_skip; - gen_data_config_get_template_data( config , &buffer , &data_offset , &buffer_size , &data_skip); - - test_assert_string_equal( buffer , "Header1\n\nHeader2\n"); - test_assert_int_equal( data_offset , 8 ); - test_assert_int_equal( buffer_size , 22 ); - test_assert_int_equal( data_skip , 5 ); - } - } - - - gen_data_config_set_template( config , NULL , NULL ); - test_assert_NULL( gen_data_config_get_template_file( config )); - test_assert_NULL( gen_data_config_get_template_key( config )); - - { - char * buffer; - int data_offset , buffer_size , data_skip; - gen_data_config_get_template_data( config , &buffer , &data_offset , &buffer_size , &data_skip); - - test_assert_NULL( buffer ); - test_assert_int_equal( data_offset , 0 ); - test_assert_int_equal( buffer_size , 0 ); - test_assert_int_equal( data_skip , 0 ); - } - - - test_assert_true( gen_data_config_set_template( config , NULL , "KEY")); - test_assert_NULL( gen_data_config_get_template_file( config )); - test_assert_NULL( gen_data_config_get_template_key( config )); - - { - char * buffer; - int data_offset , buffer_size , data_skip; - gen_data_config_get_template_data( config , &buffer , &data_offset , &buffer_size , &data_skip); - - test_assert_NULL( buffer ); - test_assert_int_equal( data_offset , 0 ); - test_assert_int_equal( buffer_size , 0 ); - test_assert_int_equal( data_skip , 0 ); - } - - - gen_data_config_free( config ); - } - test_work_area_free( work_area ); -} - - -int main(int argc , char ** argv) { - - const char * gendata_file = argv[1]; - const char * gendata_file_empty = argv[2]; - util_install_signals(); - - test_report_steps_param(); - test_report_steps_dynamic(); - test_result_format(); - test_set_template(); - test_set_template_invalid(); - test_set_invalid_format(); - test_format_check(); - test_gendata_fload(gendata_file); - test_gendata_fload_empty_file(gendata_file_empty); - - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_gen_data_config_parse.c b/ThirdParty/Ert/libenkf/tests/enkf_gen_data_config_parse.c deleted file mode 100644 index 2d9de2ba9e..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_gen_data_config_parse.c +++ /dev/null @@ -1,253 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_gen_data_config_parse.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include -#include - - -enkf_config_node_type * parse_alloc_GEN_PARAM( const char * config_string , bool parse_valid) { - config_parser_type * config = config_alloc(); - enkf_config_node_type * enkf_config_node = NULL; - - enkf_config_node_add_GEN_PARAM_config_schema( config ); - { - FILE * stream = util_fopen("config.txt" , "w"); - fprintf(stream , config_string); - fclose( stream ); - } - - { - config_content_type * content = config_parse( config , "config.txt" , "--" , NULL , NULL , NULL , CONFIG_UNRECOGNIZED_IGNORE , true); - - test_assert_bool_equal( parse_valid , config_content_is_valid( content )); - if (parse_valid) { - const config_content_item_type * config_item = config_content_get_item( content , GEN_PARAM_KEY ); - const config_content_node_type * config_node = config_content_item_iget_node( config_item , 0 ); - - enkf_config_node = enkf_config_node_alloc_GEN_PARAM_from_config( config_node ); - } - config_content_free( content ); - config_free( config ); - } - return enkf_config_node; -} - - - - - -void test_parse_gen_param() { - test_work_area_type * work_area = test_work_area_alloc("GEN_PARAM_parse"); - - // Parse error: missing eclfile - { - enkf_config_node_type * config_node = parse_alloc_GEN_PARAM( "GEN_PARAM KEY\n" , false); - test_assert_NULL( config_node ); - } - - // Missing all required KEY: arguments - { - enkf_config_node_type * config_node = parse_alloc_GEN_PARAM( "GEN_PARAM KEY ECLFILE\n" , true); - test_assert_NULL( config_node ); - } - - - // OUTPUT_FORMAT: Is incorrectly spelled - { - enkf_config_node_type * config_node = parse_alloc_GEN_PARAM( "GEN_PARAM KEY ECLFILE INIT_FILES:XXX INPUT_FORMAT:ASCII OutPutFOrmat:ASCII\n" , true); - test_assert_NULL( config_node ); - } - - - // OUTPUT_FORMAT: ASCII is incorrectly spelled - { - enkf_config_node_type * config_node = parse_alloc_GEN_PARAM( "GEN_PARAM KEY ECLFILE INIT_FILES:XXX INPUT_FORMAT:ASCII OUTPUT_FORMAT:ASCI\n" , true); - test_assert_NULL( config_node ); - } - - // Invalid value for INPUT_FORMAT - { - enkf_config_node_type * config_node = parse_alloc_GEN_PARAM( "GEN_PARAM KEY ECLFILE INIT_FILES:XXX INPUT_FORMAT:ASCII_TEMPLATE OUTPUT_FORMAT:ASCII\n" , true); - test_assert_NULL( config_node ); - } - - - // Correct - { - enkf_config_node_type * config_node = parse_alloc_GEN_PARAM( "GEN_PARAM KEY ECLFILE INPUT_FORMAT:BINARY_DOUBLE OUTPUT_FORMAT:ASCII INIT_FILES:INIT%%d\n" , true); - - test_assert_string_equal( "ECLFILE" , enkf_config_node_get_enkf_outfile( config_node )); - test_assert_NULL( enkf_config_node_get_enkf_infile( config_node )); - test_assert_string_equal( "INIT%d" , enkf_config_node_get_init_file_fmt( config_node )); - test_assert_int_equal( PARAMETER , enkf_config_node_get_var_type( config_node )); - { - gen_data_config_type * gen_data_config = enkf_config_node_get_ref( config_node ); - test_assert_int_equal( BINARY_DOUBLE , gen_data_config_get_input_format( gen_data_config )); - test_assert_int_equal( ASCII , gen_data_config_get_output_format( gen_data_config )); - } - - enkf_config_node_free( config_node ); - } - - test_work_area_free( work_area ); -} - - - -enkf_config_node_type * parse_alloc_GEN_DATA_result( const char * config_string , bool parse_valid) { - config_parser_type * config = config_alloc(); - enkf_config_node_type * enkf_config_node = NULL; - - enkf_config_node_add_GEN_DATA_config_schema( config ); - { - FILE * stream = util_fopen("config.txt" , "w"); - fprintf(stream , config_string); - fclose( stream ); - } - { - config_content_type * content = config_parse( config , "config.txt" , "--" , NULL , NULL , NULL , CONFIG_UNRECOGNIZED_IGNORE , true); - test_assert_bool_equal( parse_valid ,config_content_is_valid( content ) ); - if (parse_valid) { - const config_content_item_type * config_item = config_content_get_item( content , GEN_DATA_KEY ); - const config_content_node_type * config_node = config_content_item_iget_node( config_item , 0 ); - - enkf_config_node = enkf_config_node_alloc_GEN_DATA_from_config( config_node ); - } - - config_content_free( content ); - config_free( config ); - } - return enkf_config_node; -} - - - -void test_parse_gen_data_result() { - test_work_area_type * work_area = test_work_area_alloc("GEN_DATA_RESULT_parse"); - // Parse error: missing KEY - { - enkf_config_node_type * config_node = parse_alloc_GEN_DATA_result( "GEN_DATA\n" , false); - test_assert_NULL( config_node ); - } - - // Validation error: missing INPUT_FORMAT: - { - enkf_config_node_type * config_node = parse_alloc_GEN_DATA_result( "GEN_DATA GEN_DATA_KEY RESULT_FILE:Results%%d REPORT_STEPS:10 \n" , true); - test_assert_NULL( config_node ); - } - - - // Validation error: Invalid INPUT_FORMAT: - { - enkf_config_node_type * config_node = parse_alloc_GEN_DATA_result( "GEN_DATA GEN_DATA_KEY RESULT_FILE:Results%%d INPUT_FORMAT:AsCiiiiii REPORT_STEPS:10 \n" , true); - test_assert_NULL( config_node ); - } - - - // Validation error: missing RESULT_FILE: - { - enkf_config_node_type * config_node = parse_alloc_GEN_DATA_result( "GEN_DATA GEN_DATA_KEY INPUT_FORMAT:ASCII REPORT_STEPS:10 \n" , true); - test_assert_NULL( config_node ); - } - - - // Validation error: Invalid RESULT_FILE: - { - enkf_config_node_type * config_node = parse_alloc_GEN_DATA_result( "GEN_DATA GEN_DATA_KEY RESULT_FILE:Results INPUT_FORMAT:ASCII REPORT_STEPS:10 \n" , true); - test_assert_NULL( config_node ); - } - - // Validation error: Missing REPORT_STEPS: - { - enkf_config_node_type * config_node = parse_alloc_GEN_DATA_result( "GEN_DATA GEN_DATA_KEY RESULT_FILE:Results%%d INPUT_FORMAT:ASCII \n" , true); - test_assert_NULL( config_node ); - } - - // Validation error: Invalid REPORT_STEPS - { - enkf_config_node_type * config_node = parse_alloc_GEN_DATA_result( "GEN_DATA GEN_DATA_KEY RESULT_FILE:Results%%d INPUT_FORMAT:ASCII REPORT_STEPS:XXX\n" , true); - test_assert_NULL( config_node ); - } - - // Valid - { - enkf_config_node_type * config_node = parse_alloc_GEN_DATA_result( "GEN_DATA GEN_DATA_KEY RESULT_FILE:Results%%d INPUT_FORMAT:ASCII REPORT_STEPS:10,20,30\n" , true); - test_assert_true( enkf_config_node_is_instance( config_node )); - - test_assert_string_equal( "Results%d" , enkf_config_node_get_enkf_infile( config_node )); - test_assert_NULL( enkf_config_node_get_init_file_fmt( config_node )); - test_assert_NULL( enkf_config_node_get_enkf_outfile( config_node )); - test_assert_int_equal( DYNAMIC_RESULT , enkf_config_node_get_var_type( config_node )); - { - gen_data_config_type * gen_data_config = enkf_config_node_get_ref( config_node ); - test_assert_int_equal( ASCII , gen_data_config_get_input_format( gen_data_config )); - test_assert_int_equal( GEN_DATA_UNDEFINED , gen_data_config_get_output_format( gen_data_config )); - - test_assert_int_equal( 3 , gen_data_config_num_report_step( gen_data_config )); - test_assert_int_equal( 10 , gen_data_config_iget_report_step( gen_data_config , 0 )); - test_assert_int_equal( 30 , gen_data_config_iget_report_step( gen_data_config , 2 )); - - - test_assert_true( gen_data_config_has_report_step( gen_data_config , 10 )); - test_assert_true( gen_data_config_has_report_step( gen_data_config , 20 )); - test_assert_true( gen_data_config_has_report_step( gen_data_config , 30 )); - - test_assert_false( gen_data_config_has_report_step( gen_data_config , 05 )); - test_assert_false( gen_data_config_has_report_step( gen_data_config , 15 )); - test_assert_false( gen_data_config_has_report_step( gen_data_config , 25 )); - test_assert_false( gen_data_config_has_report_step( gen_data_config , 35 )); - - } - test_assert_true( enkf_config_node_internalize( config_node , 10 )); - test_assert_true( enkf_config_node_internalize( config_node , 20 )); - test_assert_true( enkf_config_node_internalize( config_node , 30 )); - - test_assert_false( enkf_config_node_internalize( config_node , 05 )); - test_assert_false( enkf_config_node_internalize( config_node , 15 )); - test_assert_false( enkf_config_node_internalize( config_node , 25 )); - test_assert_false( enkf_config_node_internalize( config_node , 35 )); - - enkf_config_node_free( config_node ); - } - - test_work_area_free( work_area ); -} - - - - -int main(int argc , char ** argv) { - test_parse_gen_param(); - test_parse_gen_data_result(); - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_gen_obs_load.c b/ThirdParty/Ert/libenkf/tests/enkf_gen_obs_load.c deleted file mode 100644 index 1b84af5f34..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_gen_obs_load.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_gen_obs_load.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - - - -void test_obs_check_report_steps(const char * config_file ) { - ert_test_context_type * test_context = ert_test_context_alloc( "GEN_OBS" , config_file ); - enkf_main_type * enkf_main = ert_test_context_get_main( test_context ); - enkf_obs_type * obs = enkf_main_get_obs( enkf_main ); - - test_assert_true( enkf_obs_has_key( obs , "GEN_OBS10")); - test_assert_true( enkf_obs_has_key( obs , "GEN_OBS20")); - test_assert_false( enkf_obs_has_key( obs , "GEN_OBS30")); - - ert_test_context_free( test_context ); -} - - - - - - -int main(int argc , char ** argv) { - const char * config_file = argv[1]; - - test_obs_check_report_steps( config_file ); - -} - - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_hook_manager_test.c b/ThirdParty/Ert/libenkf/tests/enkf_hook_manager_test.c deleted file mode 100644 index 742d2f86de..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_hook_manager_test.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_ecl_config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. - */ -#include -#include -#include -#include - -int main(int argc, char ** argv) { - - ert_workflow_list_type * list = NULL; - hook_manager_type * hook_manager = hook_manager_alloc(list); - - char * expected_path = util_alloc_abs_path(".ert_runpath_list"); - test_assert_string_equal(expected_path, hook_manager_get_runpath_list_file(hook_manager)); - free(expected_path); - - hook_manager_set_runpath_list_file(hook_manager, "Folder", NULL); - expected_path = util_alloc_abs_path("Folder/.ert_runpath_list"); - test_assert_string_equal(expected_path, hook_manager_get_runpath_list_file(hook_manager)); - free(expected_path); - - hook_manager_set_runpath_list_file(hook_manager, "Folder", "thefilename.txt"); - expected_path = util_alloc_abs_path("Folder/thefilename.txt"); - test_assert_string_equal(expected_path, hook_manager_get_runpath_list_file(hook_manager)); - free(expected_path); - - hook_manager_set_runpath_list_file(hook_manager, "/tmp/ouagadogo", "thefilename.txt"); - test_assert_string_equal("/tmp/ouagadogo/thefilename.txt", hook_manager_get_runpath_list_file(hook_manager)); - - hook_manager_free(hook_manager); - - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_iter_config.c b/ThirdParty/Ert/libenkf/tests/enkf_iter_config.c deleted file mode 100644 index 3f297eb8e4..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_iter_config.c +++ /dev/null @@ -1,105 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_iter_config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include - -#include -#include -#include -#include - -#include -#include -#include - - -#define TMP_PATH "/tmp" -char * create_config_file( const char * enspath_fmt , const char * runpath_fmt , int iter_count) { - char * config_file = util_alloc_tmp_file(TMP_PATH , "iter-config" , false); - FILE * stream = util_fopen( config_file , "w"); - fprintf(stream , "%s %s\n" , ITER_CASE_KEY , enspath_fmt); - fprintf(stream , "%s %d\n" , ITER_COUNT_KEY , iter_count); - fclose( stream ); - return config_file; -} - - - -void test_set() { - analysis_iter_config_type * iter_config = analysis_iter_config_alloc(); - - test_assert_false( analysis_iter_config_case_fmt_set( iter_config )); - analysis_iter_config_set_case_fmt( iter_config , "case%d"); - test_assert_true( analysis_iter_config_case_fmt_set( iter_config )); - - test_assert_false( analysis_iter_config_num_iterations_set( iter_config )); - analysis_iter_config_set_num_iterations( iter_config , 77 ); - test_assert_true( analysis_iter_config_num_iterations_set( iter_config )); - - test_assert_int_equal( analysis_iter_config_get_num_retries_per_iteration(iter_config), 4); - analysis_iter_config_set_num_retries_per_iteration(iter_config , 10 ); - test_assert_int_equal( analysis_iter_config_get_num_retries_per_iteration(iter_config), 10); - - - analysis_iter_config_free( iter_config ); -} - - - - -int main(int argc , char ** argv) { - const char * enspath_fmt = "iter%d"; - const char * runpath_fmt = "run/iter%d/real%d"; - const int iter_count = 10; - char * config_file = create_config_file( enspath_fmt , runpath_fmt , iter_count); - - - config_parser_type * config = config_alloc(); - config_content_type * content; - analysis_iter_config_add_config_items( config ); - - content = config_parse( config , config_file , NULL , NULL , NULL , NULL , CONFIG_UNRECOGNIZED_ERROR , true); - test_assert_true( config_content_is_valid( content) ); - - test_assert_true( config_content_has_item( content , ITER_CASE_KEY )); - test_assert_true( config_content_has_item( content , ITER_COUNT_KEY )); - - { - analysis_iter_config_type * iter_config = analysis_iter_config_alloc(); - char itercase[50]; - sprintf(itercase,DEFAULT_ANALYSIS_ITER_CASE,5); - test_assert_string_equal( analysis_iter_config_iget_case( iter_config , 5) , itercase ); - analysis_iter_config_init( iter_config , content ); - - test_assert_int_equal( analysis_iter_config_get_num_iterations( iter_config ) , iter_count ); - test_assert_string_equal( analysis_iter_config_iget_case( iter_config , 5) , "iter5"); - - analysis_iter_config_free( iter_config ); - } - remove( config_file ); - free( config_file ); - config_content_free( content ); - config_free( config ); - - test_set(); - exit(0); -} diff --git a/ThirdParty/Ert/libenkf/tests/enkf_local_obsdata.c b/ThirdParty/Ert/libenkf/tests/enkf_local_obsdata.c deleted file mode 100644 index 594f08ac6e..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_local_obsdata.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_local_obsdata.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include - -#include -#include - - -void test_wrapper() { - local_obsdata_node_type * node = local_obsdata_node_alloc("KEY" , true); - local_obsdata_type * data = local_obsdata_alloc_wrapper( node ); - test_assert_true( local_obsdata_is_instance( data )); - test_assert_int_equal( 1 , local_obsdata_get_size( data )); - test_assert_ptr_equal( node , local_obsdata_iget( data , 0 )); - test_assert_true( local_obsdata_has_node( data , "KEY" )); - test_assert_false( local_obsdata_has_node( data , "KEYX" )); - test_assert_string_equal( local_obsdata_node_get_key( node ) , local_obsdata_get_name( data )); - local_obsdata_free( data ); -} - - -int main(int argc , char ** argv) { - local_obsdata_type * obsdata; - - obsdata = local_obsdata_alloc( "KEY"); - test_assert_true( local_obsdata_is_instance( obsdata )); - test_assert_int_equal( 0 , local_obsdata_get_size( obsdata )); - test_assert_string_equal( "KEY" , local_obsdata_get_name( obsdata )); - - { - local_obsdata_node_type * obsnode = local_obsdata_node_alloc( "KEY" , true); - test_assert_true( local_obsdata_add_node( obsdata , obsnode ) ); - test_assert_false( local_obsdata_add_node( obsdata , obsnode ) ); - test_assert_int_equal( 1 , local_obsdata_get_size( obsdata )); - test_assert_ptr_equal( obsnode , local_obsdata_iget( obsdata , 0)); - } - - local_obsdata_free( obsdata ); - - test_wrapper(); - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_local_obsdata_node.c b/ThirdParty/Ert/libenkf/tests/enkf_local_obsdata_node.c deleted file mode 100644 index a5d1d43622..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_local_obsdata_node.c +++ /dev/null @@ -1,103 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_local_obsdata_node.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include - -#include -#include - - -void test_content( local_obsdata_node_type * node ) { - const active_list_type * active_list = local_obsdata_node_get_active_list( node ); - - test_assert_not_NULL( active_list ); - test_assert_true( active_list_is_instance( active_list )); - - { - active_list_type * new_active_list = active_list_alloc( ); - - active_list_add_index( new_active_list , 1098 ); - - test_assert_false( active_list_equal( new_active_list , local_obsdata_node_get_active_list( node ))); - local_obsdata_node_copy_active_list( node , new_active_list ); - test_assert_true( active_list_equal( new_active_list , local_obsdata_node_get_active_list( node ))); - - } - { - - - local_obsdata_node_add_tstep( node , 20 ); - local_obsdata_node_add_tstep( node , 10 ); - local_obsdata_node_add_tstep( node , 10 ); // Second add - ignored - - test_assert_false( local_obsdata_node_tstep_active(node, 5)); - test_assert_true( local_obsdata_node_tstep_active(node, 10)); - test_assert_true( local_obsdata_node_tstep_active(node, 20)); - test_assert_true( local_obsdata_node_has_tstep( node , 10 )); - test_assert_true( local_obsdata_node_has_tstep( node , 20 )); - test_assert_false( local_obsdata_node_has_tstep( node , 15 )); - - - local_obsdata_node_add_range( node , 5 , 7 ); - test_assert_true( local_obsdata_node_tstep_active(node, 5)); - test_assert_true( local_obsdata_node_tstep_active(node, 7)); - } - -} - -void test_all_active() { - local_obsdata_node_type * node = local_obsdata_node_alloc( "KEY" , true); - - test_assert_true( local_obsdata_node_all_timestep_active( node )); - test_assert_true( local_obsdata_node_tstep_active( node , 0 )); - test_assert_true( local_obsdata_node_tstep_active( node , 10 )); - test_assert_true( local_obsdata_node_tstep_active( node , 20 )); - - local_obsdata_node_free( node ); -} - - - - - - -int main(int argc , char ** argv) { - const char * obs_key = "1234"; - - { - local_obsdata_node_type * node = local_obsdata_node_alloc( obs_key , true); - - test_assert_true( local_obsdata_node_is_instance( node )); - test_assert_string_equal( obs_key , local_obsdata_node_get_key( node )); - test_content( node ); - local_obsdata_node_free( node ); - } - - { - void * node = local_obsdata_node_alloc( obs_key ,true ); - local_obsdata_node_free__( node ); - } - test_all_active(); - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_magic_string_in_workflows.c b/ThirdParty/Ert/libenkf/tests/enkf_magic_string_in_workflows.c deleted file mode 100644 index 88bc0a14fd..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_magic_string_in_workflows.c +++ /dev/null @@ -1,77 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'enkf_magic_string_in_workflows.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include - - -void test_magic_strings( ert_test_context_type * test_context ) { - enkf_main_type * enkf_main = ert_test_context_get_main( test_context ); - test_assert_true( ert_test_context_run_worklow( test_context , "MAGIC_PRINT") ); - test_assert_true( util_file_exists( "magic-list.txt") ); - - { - FILE * stream = util_fopen("magic-list.txt" , "r"); - char string[128]; - - fscanf( stream , "%s" , string); - test_assert_string_equal( string , enkf_fs_get_case_name( enkf_main_get_fs( enkf_main ))); - - fscanf( stream , "%s" , string); - test_assert_string_equal( string , "MagicAllTheWayToWorkFlow"); - - fclose( stream ); - } -} - - -void test_has_job(ert_test_context_type * test_context ) { - enkf_main_type * enkf_main = ert_test_context_get_main( test_context ); - ert_workflow_list_type * workflows = enkf_main_get_workflow_list( enkf_main ); - test_assert_true( ert_workflow_list_has_job( workflows , "MAGIC_PRINT" )); -} - - -int main( int argc , char ** argv) { - const char * model_config = argv[1]; - ert_test_context_type * test_context = ert_test_context_alloc( "MAGIC-STRINGS" , model_config); - enkf_main_type * enkf_main = ert_test_context_get_main( test_context ); - - { - test_has_job( test_context ); - - enkf_main_select_fs(enkf_main , "default"); - test_assert_string_equal( "default" , enkf_fs_get_case_name( enkf_main_get_fs( enkf_main ))); - test_magic_strings( test_context ); - - enkf_main_select_fs(enkf_main , "extraCase"); - test_assert_string_equal( "extraCase" , enkf_fs_get_case_name( enkf_main_get_fs( enkf_main ))); - test_magic_strings( test_context ); - } - ert_test_context_free( test_context ); -} diff --git a/ThirdParty/Ert/libenkf/tests/enkf_main.c b/ThirdParty/Ert/libenkf/tests/enkf_main.c deleted file mode 100644 index 32db707aad..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_main.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_main.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - - - - -void test_case_initialized() { - test_work_area_type * work_area = test_work_area_alloc("enkf_main_case_initialized" ); - { - enkf_main_type * enkf_main = enkf_main_alloc_empty(); - model_config_type * model_config = enkf_main_get_model_config(enkf_main); - const char * new_case = "fs/case"; - char * mount_point = util_alloc_sprintf("%s/%s" , model_config_get_enspath(model_config) , new_case); - enkf_fs_create_fs(mount_point , BLOCK_FS_DRIVER_ID , NULL , false); - - test_assert_false(enkf_main_case_is_initialized(enkf_main , "does/not/exist" , NULL)); - test_assert_true(enkf_main_case_is_initialized(enkf_main , new_case , NULL)); - - enkf_main_free(enkf_main); - } - test_work_area_free(work_area); -} - - - -void test_create() { - enkf_main_type * enkf_main = enkf_main_alloc_empty(); - test_assert_true( enkf_main_is_instance( enkf_main ) ); - enkf_main_free( enkf_main ); -} - - - -int main(int argc , char ** argv) { - util_install_signals(); - test_create(); - test_case_initialized(); - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_main_fs.c b/ThirdParty/Ert/libenkf/tests/enkf_main_fs.c deleted file mode 100644 index ce01664b83..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_main_fs.c +++ /dev/null @@ -1,124 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_main_fs.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include -#include - -#include -#include -#include -#include -#include - - - - - - - -int main(int argc, char ** argv) { - const char * config_file = argv[1]; - test_work_area_type * work_area = test_work_area_alloc( "enkf_main_fs" ); - char * model_config; - util_alloc_file_components( config_file , NULL , &model_config , NULL); - test_work_area_copy_parent_content( work_area , config_file ); - { - enkf_main_type * enkf_main = enkf_main_bootstrap( model_config , false , false ); - - enkf_main_select_fs( enkf_main , "enkf"); - test_assert_true( enkf_main_case_is_current( enkf_main , "enkf")); - test_assert_false( enkf_main_case_is_current( enkf_main , "default_fs")); - test_assert_false( enkf_main_case_is_current( enkf_main , "does_not_exist")); - - test_assert_int_equal( 1 , enkf_fs_get_refcount( enkf_main_get_fs( enkf_main ))); - { - enkf_fs_type * fs_ref = enkf_main_get_fs_ref( enkf_main ); - test_assert_int_equal( 2 , enkf_fs_get_refcount( enkf_main_get_fs( enkf_main ))); - enkf_fs_decref( fs_ref ); - test_assert_int_equal( 1 , enkf_fs_get_refcount( enkf_main_get_fs( enkf_main ))); - } - - { - state_map_type * map1 = enkf_fs_get_state_map( enkf_main_get_fs( enkf_main )); - state_map_type * map2 = enkf_main_alloc_readonly_state_map(enkf_main , "enkf"); - test_assert_true(state_map_equal( map1 , map2 )); - state_map_free( map2 ); - } - { - enkf_fs_type * fs1 = enkf_main_mount_alt_fs( enkf_main , "default" , false ); - enkf_fs_type * fs2 = enkf_main_mount_alt_fs( enkf_main , "enkf" , false ); - - test_assert_int_equal( 2 , enkf_fs_get_refcount( enkf_main_get_fs( enkf_main ))); - test_assert_int_equal( 2 , enkf_fs_get_refcount( fs2 )); - test_assert_int_equal( 1 , enkf_fs_get_refcount( fs1 )); - - enkf_fs_decref( fs1 ); - enkf_fs_decref( fs2 ); - } - - { - enkf_fs_type * enkf_fs = enkf_main_mount_alt_fs( enkf_main , "enkf" , false ); - - enkf_main_select_fs( enkf_main , "default"); - test_assert_int_equal( 1 , enkf_fs_get_refcount( enkf_main_get_fs( enkf_main ))); - enkf_fs_decref( enkf_fs ); - } - - { - enkf_fs_type * default_fs = enkf_main_mount_alt_fs( enkf_main , "default" , false ); - - test_assert_int_equal( 2 , enkf_fs_get_refcount( enkf_main_get_fs( enkf_main ))); - enkf_main_select_fs( enkf_main , "default"); - test_assert_int_equal( 2 , enkf_fs_get_refcount( enkf_main_get_fs( enkf_main ))); - enkf_fs_decref( default_fs ); - test_assert_int_equal( 1 , enkf_fs_get_refcount( enkf_main_get_fs( enkf_main ))); - } - /*****************************************************************/ - { - enkf_fs_type * fs = enkf_main_mount_alt_fs( enkf_main , "default" , false ); - test_assert_int_equal( 2 , enkf_fs_get_refcount( enkf_main_get_fs( enkf_main ))); - - enkf_main_set_fs( enkf_main , fs , NULL ); - enkf_fs_decref( fs ); - test_assert_int_equal( 1 , enkf_fs_get_refcount( enkf_main_get_fs( enkf_main ))); - } - { - enkf_fs_type * fs = enkf_main_mount_alt_fs( enkf_main , "enkf" , false ); - enkf_fs_type * current = enkf_main_mount_alt_fs( enkf_main , "default" , false ); - - test_assert_int_equal( 2 , enkf_fs_get_refcount( current )); - test_assert_int_equal( 1 , enkf_fs_get_refcount( fs)); - enkf_main_set_fs( enkf_main , fs , NULL); - test_assert_int_equal( 2 , enkf_fs_get_refcount( fs)); - test_assert_int_equal( 1 , enkf_fs_get_refcount( current )); - - enkf_fs_decref( current ); - enkf_fs_decref( fs); - } - - - - - test_assert_int_equal( 1 , enkf_fs_get_refcount( enkf_main_get_fs( enkf_main ))); - enkf_main_free( enkf_main ); - } - test_work_area_free( work_area ); - exit(0); -} diff --git a/ThirdParty/Ert/libenkf/tests/enkf_main_fs_current_file_test.c b/ThirdParty/Ert/libenkf/tests/enkf_main_fs_current_file_test.c deleted file mode 100644 index 4f39d32cfe..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_main_fs_current_file_test.c +++ /dev/null @@ -1,96 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_main_fs_current_file_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include -#include - -#include -#include -#include -#include - -void test_current_file_not_present_symlink_present(const char * model_config) { - test_assert_true(util_file_exists("Storage/enkf")); - util_make_slink("enkf", "Storage/current" ); - enkf_main_type * enkf_main = enkf_main_bootstrap( model_config , false , false ); - test_assert_true( enkf_main_case_is_current( enkf_main , "enkf")); - test_assert_false(util_file_exists("Storage/current")); - test_assert_true(util_file_exists("Storage/current_case")); - char * current_case = enkf_main_read_alloc_current_case_name(enkf_main); - test_assert_string_equal(current_case, "enkf"); - free(current_case); - enkf_main_free(enkf_main); -} - -void test_current_file_present(const char * model_config) { - test_assert_true(util_file_exists("Storage/current_case")); - enkf_main_type * enkf_main = enkf_main_bootstrap( model_config , false , false ); - test_assert_true( enkf_main_case_is_current( enkf_main , "enkf")); - test_assert_false(util_file_exists("Storage/current")); - char * current_case = enkf_main_read_alloc_current_case_name(enkf_main); - test_assert_string_equal(current_case, "enkf"); - free(current_case); - enkf_main_free(enkf_main); -} - - -void test_change_case(const char * model_config) { - enkf_main_type * enkf_main = enkf_main_bootstrap( model_config , false , false ); - enkf_main_select_fs( enkf_main , "default"); - test_assert_true( enkf_main_case_is_current( enkf_main , "default")); - test_assert_false( enkf_main_case_is_current(enkf_main , "enkf")); - { - char * current_case = enkf_main_read_alloc_current_case_name(enkf_main); - test_assert_string_equal(current_case, "default"); - free(current_case); - } - - enkf_main_select_fs( enkf_main , "enkf"); - test_assert_true( enkf_main_case_is_current( enkf_main , "enkf")); - test_assert_false( enkf_main_case_is_current(enkf_main , "default")); - { - char * current_case = enkf_main_read_alloc_current_case_name(enkf_main); - test_assert_string_equal(current_case, "enkf"); - free(current_case); - } - - enkf_fs_type * enkf_fs = enkf_main_mount_alt_fs( enkf_main , "default" , false ); - enkf_main_select_fs( enkf_main , "default"); - test_assert_true( enkf_main_case_is_current( enkf_main , "default")); - enkf_fs_decref( enkf_fs ); - enkf_main_free(enkf_main); -} - -int main(int argc, char ** argv) { - const char * config_file = argv[1]; - test_work_area_type * work_area = test_work_area_alloc( "enkf_main_fs_current_file_test" ); - test_work_area_set_store(work_area, true); - char * model_config; - util_alloc_file_components( config_file , NULL , &model_config , NULL); - test_work_area_copy_parent_content( work_area , config_file ); - - test_current_file_not_present_symlink_present(model_config); - test_current_file_present(model_config); - test_change_case(model_config); - - free(model_config); - test_work_area_free( work_area ); - exit(0); -} diff --git a/ThirdParty/Ert/libenkf/tests/enkf_meas_data.c b/ThirdParty/Ert/libenkf/tests/enkf_meas_data.c deleted file mode 100644 index a1b7268996..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_meas_data.c +++ /dev/null @@ -1,85 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_meas_data.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include "ert/util/build_config.h" - -#include -#include -#include -#include - -#include - - - -void meas_block_iset_abort(void * arg) { - meas_block_type * block = meas_block_safe_cast( arg ); - meas_block_iset( block , 0 , 0 , 100); -} - - -void meas_block_iget_abort(void * arg) { - meas_block_type * block = meas_block_safe_cast( arg ); - meas_block_iget( block , 0 , 0 ); -} - - - -void create_test() { - int_vector_type * ens_active_list = int_vector_alloc(0 , false); - bool_vector_type * ens_mask; - int_vector_append( ens_active_list , 10 ); - int_vector_append( ens_active_list , 20 ); - int_vector_append( ens_active_list , 30 ); - - ens_mask = int_vector_alloc_mask(ens_active_list); - { - meas_data_type * meas_data = meas_data_alloc( ens_mask ); - test_assert_int_equal( 3 , meas_data_get_active_ens_size( meas_data )); - - { - meas_block_type * block = meas_data_add_block(meas_data , "OBS" , 10 , 10); - - meas_block_iset(block , 10 , 0 , 100); - test_assert_double_equal( 100 , meas_block_iget( block , 10 , 0 )); - - test_assert_bool_equal( true , meas_block_iens_active( block , 10 )); - test_assert_bool_equal( false , meas_block_iens_active( block , 11 )); - - test_assert_util_abort( "meas_block_assert_iens_active" , meas_block_iset_abort , block); - test_assert_util_abort( "meas_block_assert_iens_active" , meas_block_iget_abort , block); - } - meas_data_free( meas_data ); - } - - - bool_vector_free( ens_mask ); - int_vector_free( ens_active_list ); -} - - - -int main(int argc , char ** argv) { - create_test(); - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_model_config.c b/ThirdParty/Ert/libenkf/tests/enkf_model_config.c deleted file mode 100644 index 5354e83a6c..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_model_config.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_model_config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include - -#include - - -void test_create() { - model_config_type * model_config = model_config_alloc(); - test_assert_true( model_config_is_instance( model_config)); - model_config_free( model_config ); -} - - -void test_runpath() { - model_config_type * model_config = model_config_alloc(); - model_config_add_runpath(model_config , "KEY" , "RunPath%d"); - model_config_add_runpath(model_config , "KEY2" , "2-RunPath%d"); - test_assert_true( model_config_select_runpath(model_config , "KEY")); - test_assert_false( model_config_select_runpath(model_config , "KEYX")); - test_assert_string_equal("RunPath%d" , model_config_get_runpath_as_char(model_config)); - - model_config_set_runpath( model_config , "PATH%d"); - test_assert_string_equal("PATH%d" , model_config_get_runpath_as_char(model_config)); - test_assert_true( model_config_select_runpath(model_config , "KEY2")); - test_assert_string_equal("2-RunPath%d" , model_config_get_runpath_as_char(model_config)); - test_assert_true( model_config_select_runpath(model_config , "KEY")); - test_assert_string_equal("PATH%d" , model_config_get_runpath_as_char(model_config)); - - test_assert_false( model_config_runpath_requires_iter( model_config )); - model_config_set_runpath( model_config , "iens%d/iter%d" ); - test_assert_true( model_config_runpath_requires_iter( model_config )); - - model_config_free( model_config ); -} - - -int main(int argc , char ** argv) { - test_create(); - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_obs_fs.c b/ThirdParty/Ert/libenkf/tests/enkf_obs_fs.c deleted file mode 100644 index a5050d3e08..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_obs_fs.c +++ /dev/null @@ -1,124 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'enkf_obs_fs.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include - -#include -#include - -#include -#include -#include -#include -#include - - -void testS( ert_test_context_type * test_context ) { - { - enkf_main_type * enkf_main = ert_test_context_get_main( test_context ); - enkf_obs_type * enkf_obs = enkf_main_get_obs( enkf_main ); - enkf_fs_type * fs = enkf_main_get_fs( enkf_main ); - int_vector_type * active_list = int_vector_alloc(0,0); - obs_data_type * obs_data = obs_data_alloc(1.0); - local_obsdata_type * obs_set = local_obsdata_alloc( "KEY" ); - bool_vector_type * ens_mask; - meas_data_type * meas_data; - - - for (int i= 0; i < enkf_main_get_ensemble_size( enkf_main); i++) - int_vector_append( active_list , i ); - ens_mask = int_vector_alloc_mask( active_list); - - obs_data = obs_data_alloc(1.0); - meas_data = meas_data_alloc( ens_mask ); - - enkf_obs_add_local_nodes_with_data( enkf_obs , obs_set , fs , ens_mask ); - enkf_obs_get_obs_and_measure_data( enkf_obs , fs , obs_set, active_list , meas_data , obs_data); - - { - FILE * stream = util_fopen("analysis/Smatrix" , "r"); - matrix_type * S = meas_data_allocS( meas_data ); - matrix_type * S0 = matrix_fread_alloc( stream ); - - test_assert_true( matrix_equal( S0 , S )); - - matrix_free( S ); - matrix_free( S0 ); - fclose( stream ); - } - int_vector_free( active_list ); - meas_data_free( meas_data ); - obs_data_free( obs_data ); - local_obsdata_free( obs_set ); - bool_vector_free( ens_mask ); - } -} - - - -void test_iget(ert_test_context_type * test_context) { - enkf_main_type * enkf_main = ert_test_context_get_main( test_context ); - enkf_obs_type * enkf_obs = enkf_main_get_obs( enkf_main ); - - test_assert_int_equal( 32 , enkf_obs_get_size( enkf_obs ) ); - for (int iobs = 0; iobs < enkf_obs_get_size( enkf_obs ); iobs++) { - obs_vector_type * vec1 = enkf_obs_iget_vector( enkf_obs , iobs ); - obs_vector_type * vec2 = enkf_obs_get_vector( enkf_obs , obs_vector_get_key( vec1 )); - - test_assert_ptr_equal( vec1 , vec2 ); - } -} - - -void test_container( ert_test_context_type * test_context ) { - enkf_config_node_type * config_node = enkf_config_node_new_container( "CONTAINER" ); - enkf_config_node_type * wwct1_node = enkf_config_node_alloc_summary( "WWCT:OP_1" , LOAD_FAIL_SILENT); - enkf_config_node_type * wwct2_node = enkf_config_node_alloc_summary( "WWCT:OP_2" , LOAD_FAIL_SILENT); - enkf_config_node_type * wwct3_node = enkf_config_node_alloc_summary( "WWCT:OP_3" , LOAD_FAIL_SILENT); - - - enkf_config_node_update_container( config_node , wwct1_node ); - enkf_config_node_update_container( config_node , wwct2_node ); - enkf_config_node_update_container( config_node , wwct3_node ); - { - enkf_node_type * container = enkf_node_deep_alloc( config_node ); - enkf_node_free( container ); - } - - - enkf_config_node_free( wwct3_node ); - enkf_config_node_free( wwct2_node ); - enkf_config_node_free( wwct1_node ); - enkf_config_node_free( config_node ); -} - - -int main(int argc , char ** argv) { - util_install_signals(); - { - const char * config_file = argv[1]; - ert_test_context_type * test_context = ert_test_context_alloc( "ENKF_OBS_FS" , config_file ); - { - testS( test_context ); - test_iget( test_context ); - test_container( test_context ); - } - ert_test_context_free( test_context ); - exit(0); - } -} diff --git a/ThirdParty/Ert/libenkf/tests/enkf_obs_tests.c b/ThirdParty/Ert/libenkf/tests/enkf_obs_tests.c deleted file mode 100644 index b317cb42d8..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_obs_tests.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_enkf_obs_tests.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. - */ - -#include - -#include -#include - -#include -#include -#include -#include - - -int main(int argc, char ** argv) { - history_type * history = NULL; - time_map_type * external_time_map = NULL; - ecl_grid_type * grid = NULL; - ensemble_config_type * ensemble_config = NULL; - ecl_sum_type * refcase = NULL; - - enkf_obs_type * enkf_obs = enkf_obs_alloc(history , external_time_map , grid , refcase , ensemble_config); - - obs_vector_type * obs_vector = obs_vector_alloc(SUMMARY_OBS, "WWCT", NULL, 2); - summary_obs_type * summary_obs1 = summary_obs_alloc( "SummaryKey" , "ObservationKey" , 43.2, 2.0 , AUTO_CORRF_EXP, 42); - obs_vector_install_node( obs_vector , 0 , summary_obs1 ); - - summary_obs_type * summary_obs2 = summary_obs_alloc( "SummaryKey2" , "ObservationKey2" , 4.2, 0.1 , AUTO_CORRF_EXP, 42); - obs_vector_install_node( obs_vector , 1 , summary_obs2 ); - - obs_vector_type * obs_vector2 = obs_vector_alloc(SUMMARY_OBS, "WWCT2", NULL, 2); - summary_obs_type * summary_obs3 = summary_obs_alloc( "SummaryKey" , "ObservationKey" , 43.2, 2.0 , AUTO_CORRF_EXP, 42); - obs_vector_install_node( obs_vector2 , 0 , summary_obs3 ); - - summary_obs_type * summary_obs4 = summary_obs_alloc( "SummaryKey2" , "ObservationKey2" , 4.2, 0.1 , AUTO_CORRF_EXP, 42); - obs_vector_install_node( obs_vector2 , 1 , summary_obs4 ); - - enkf_obs_add_obs_vector(enkf_obs, obs_vector); - enkf_obs_add_obs_vector(enkf_obs, obs_vector2); - - enkf_obs_scale_std(enkf_obs, 3.3); - - enkf_obs_free(enkf_obs); - - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_obs_vector.c b/ThirdParty/Ert/libenkf/tests/enkf_obs_vector.c deleted file mode 100644 index c2d2a773d2..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_obs_vector.c +++ /dev/null @@ -1,85 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA, Norway. - - The file 'enkf_obs_vector.c' is part of ERT - Ensemble based - Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - - - -void test_create(enkf_config_node_type * config_node ) { - obs_vector_type * obs_vector = obs_vector_alloc( SUMMARY_OBS , "OBS" , config_node , 100 ); - test_assert_true( obs_vector_is_instance( obs_vector )); - { - const int_vector_type * step_list = obs_vector_get_step_list( obs_vector ); - - { - summary_obs_type * obs_node = summary_obs_alloc( "FOPT" , "FOPT" , 10 , 1 , NULL , 0); - obs_vector_install_node( obs_vector , 10 , obs_node ); - test_assert_int_equal( 1 , int_vector_size( step_list )); - test_assert_int_equal( 10 , int_vector_iget( step_list , 0)); - } - - { - summary_obs_type * obs_node = summary_obs_alloc( "FOPT" , "FOPT" , 10 , 1 , NULL , 0); - obs_vector_install_node( obs_vector , 10 , obs_node ); - test_assert_int_equal( 1 , int_vector_size( step_list )); - test_assert_int_equal( 10 , int_vector_iget( step_list , 0)); - } - - { - summary_obs_type * obs_node = summary_obs_alloc( "FOPT" , "FOPT" , 10 , 1 , NULL , 0); - obs_vector_install_node( obs_vector , 5 , obs_node ); - test_assert_int_equal( 2 , int_vector_size( step_list )); - test_assert_int_equal( 5 , int_vector_iget( step_list , 0)); - test_assert_int_equal( 10 , int_vector_iget( step_list , 1)); - } - - { - summary_obs_type * obs_node = summary_obs_alloc( "FOPT" , "FOPT" , 10 , 1 , NULL , 0); - obs_vector_install_node( obs_vector , 15 , obs_node ); - test_assert_int_equal( 3 , int_vector_size( step_list )); - test_assert_int_equal( 5 , int_vector_iget( step_list , 0)); - test_assert_int_equal( 10 , int_vector_iget( step_list , 1)); - test_assert_int_equal( 15 , int_vector_iget( step_list , 2)); - } - } - obs_vector_free( obs_vector ); -} - - - -int main(int argc , char ** argv) { - enkf_config_node_type * config_node = enkf_config_node_alloc_summary("FOPR" , LOAD_FAIL_EXIT); - { - test_create( config_node ); - } - enkf_config_node_free( config_node ); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_obs_vector_fs.c b/ThirdParty/Ert/libenkf/tests/enkf_obs_vector_fs.c deleted file mode 100644 index 6a93801605..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_obs_vector_fs.c +++ /dev/null @@ -1,116 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'enkf_obs_vector_fs.c' is part of ERT - Ensemble based - Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - - -void test_valid_obs_vector( enkf_main_type * enkf_main , const char * obs_key) { - enkf_fs_type * fs = enkf_main_get_fs(enkf_main); - enkf_obs_type * enkf_obs = enkf_main_get_obs( enkf_main ); - obs_vector_type * obs_vector = enkf_obs_get_vector( enkf_obs , obs_key ); - bool_vector_type * active_mask = bool_vector_alloc( enkf_main_get_ensemble_size( enkf_main ) , true); - - test_assert_true( obs_vector_has_data( obs_vector , active_mask , fs )); - bool_vector_free( active_mask ); -} - - -/* - This test will modify the enkf_obs container with invalid data; must - be the last test. -*/ - -void test_invalid_obs_vector( enkf_main_type * enkf_main , const char * obs_key) { - enkf_fs_type * fs = enkf_main_get_fs(enkf_main); - enkf_obs_type * enkf_obs = enkf_main_get_obs( enkf_main ); - obs_vector_type * obs_vector = enkf_obs_get_vector( enkf_obs , obs_key ); - bool_vector_type * active_mask = bool_vector_alloc( enkf_main_get_ensemble_size( enkf_main ) , true); - - test_assert_false( obs_vector_has_data( obs_vector , active_mask , fs )); - bool_vector_free( active_mask ); -} - - -void test_container( ert_test_context_type * test_context ) { - enkf_main_type * enkf_main = ert_test_context_get_main( test_context ); - enkf_obs_type * enkf_obs = enkf_main_get_obs( enkf_main ); - obs_vector_type * rft_obs = enkf_obs_get_vector( enkf_obs , "RFT_TEST"); - enkf_fs_type * fs = enkf_main_get_fs( enkf_main ); - bool_vector_type * active_mask = bool_vector_alloc( enkf_main_get_ensemble_size( enkf_main ) , true ); - - test_assert_true( obs_vector_has_data( rft_obs , active_mask , fs )); - bool_vector_free( active_mask ); -} - - - -void test_measure( ert_test_context_type * test_context ) { - enkf_main_type * enkf_main = ert_test_context_get_main( test_context ); - enkf_fs_type * fs = enkf_main_get_fs( enkf_main ); - enkf_obs_type * enkf_obs = enkf_main_get_obs( enkf_main ); - obs_vector_type * rft_obs = enkf_obs_get_vector( enkf_obs , "RFT_TEST"); - int_vector_type * ens_active_list = int_vector_alloc(0,0); - active_list_type * active_list = active_list_alloc( ); - meas_data_type * meas_data_RFT; - - for (int i=0; i < enkf_main_get_ensemble_size( enkf_main ); i++) - int_vector_append( ens_active_list , i ); - - { - bool_vector_type * ens_mask; - ens_mask = int_vector_alloc_mask( ens_active_list ); - meas_data_RFT = meas_data_alloc( ens_mask ); - bool_vector_free( ens_mask ); - } - - obs_vector_measure( rft_obs , fs , 20 , ens_active_list , meas_data_RFT , active_list ); - - int_vector_free( ens_active_list ); - active_list_free( active_list ); - meas_data_free( meas_data_RFT ); -} - - - - -int main(int argc , char ** argv) { - const char * config_file = argv[1]; - ert_test_context_type * context = ert_test_context_alloc( "OBS_VECTOR_FS" , config_file); - enkf_main_type * enkf_main = ert_test_context_get_main( context ); - - { - test_valid_obs_vector( enkf_main , "WWCT:OP_3"); - test_container( context ); - test_measure( context ); - test_invalid_obs_vector( enkf_main , "GOPT:OP"); - } - ert_test_context_free( context ); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_pca_plot.c b/ThirdParty/Ert/libenkf/tests/enkf_pca_plot.c deleted file mode 100644 index 71790def4a..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_pca_plot.c +++ /dev/null @@ -1,133 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_pca_plot.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include - -#include -#include -#include - -#include -#include - - - -pca_plot_data_type * create_data() { - matrix_type * PC = matrix_alloc( 3 , 10); - matrix_type * PC_obs = matrix_alloc( 3 , 1 ); - double_vector_type * singular_values = double_vector_alloc(3 , 1); - - pca_plot_data_type * data = pca_plot_data_alloc("KEY" , PC , PC_obs , singular_values); - - double_vector_free( singular_values ); - matrix_free( PC ); - matrix_free( PC_obs ); - return data; -} - - - -void test_create_data() { - matrix_type * PC = matrix_alloc( 3 , 10); - matrix_type * PC_obs = matrix_alloc( 3 , 1 ); - double_vector_type * singular_values = double_vector_alloc(3 , 1); - { - pca_plot_data_type * data = pca_plot_data_alloc("KEY" , PC , PC_obs , singular_values); - test_assert_true( pca_plot_data_is_instance( data )); - test_assert_int_equal( 3 , pca_plot_data_get_size( data )); - test_assert_int_equal( 10 , pca_plot_data_get_ens_size( data )); - test_assert_string_equal( "KEY" , pca_plot_data_get_name( data )); - pca_plot_data_free( data ); - } - matrix_resize( PC , 4 , 10 , false); - test_assert_NULL( pca_plot_data_alloc( "KEY" , PC , PC_obs , singular_values)); - - matrix_resize( PC_obs , 3 , 2 , false); - test_assert_NULL( pca_plot_data_alloc( "KEY" , PC , PC_obs , singular_values)); - - double_vector_free( singular_values ); - matrix_free( PC ); - matrix_free( PC_obs ); -} - - - -void test_create_vector() { - matrix_type * PC = matrix_alloc( 3 , 10); - matrix_type * PC_obs = matrix_alloc( 3 , 1 ); - double_vector_type * singular_values = double_vector_alloc(3 , 1); - - { - pca_plot_vector_type * vector = pca_plot_vector_alloc(0 , PC , PC_obs, singular_values); - test_assert_true( pca_plot_vector_is_instance( vector )); - pca_plot_vector_free( vector ); - } - - double_vector_free( singular_values ); - matrix_free( PC ); - matrix_free( PC_obs ); -} - - -void test_get_vector() { - pca_plot_data_type * data = create_data(); - test_assert_true( pca_plot_vector_is_instance( pca_plot_data_iget_vector( data , 0 ))); - pca_plot_data_free( data ); -} - - -void test_content() { - rng_type * rng = rng_alloc(MZRAN , INIT_DEFAULT); - matrix_type * PC = matrix_alloc( 3 , 10); - matrix_type * PC_obs = matrix_alloc( 3 , 1 ); - double_vector_type * singular_values = double_vector_alloc(3 , 1); - matrix_random_init( PC , rng ); - matrix_random_init( PC_obs , rng ); - { - pca_plot_data_type * data = pca_plot_data_alloc("KEY" , PC , PC_obs, singular_values); - for (int i=0; i < matrix_get_rows( PC ); i++) { - const pca_plot_vector_type * vector = pca_plot_data_iget_vector( data , i ); - - test_assert_double_equal( matrix_iget( PC_obs , i , 0) , - pca_plot_vector_get_obs_value( vector ) ); - - test_assert_double_equal( double_vector_iget( singular_values , i), - pca_plot_vector_get_singular_value( vector ) ); - - for (int j=0; j < matrix_get_columns( PC ); j++) - test_assert_double_equal( matrix_iget( PC , i , j ) , pca_plot_vector_iget_sim_value( vector , j )); - - test_assert_int_equal( matrix_get_columns( PC ) , pca_plot_vector_get_size( vector )); - - } - pca_plot_data_free( data ); - } - - double_vector_free( singular_values ); - matrix_free( PC ); - matrix_free( PC_obs ); -} - - -int main(int argc , char ** argv) { - test_create_data(); - test_create_vector(); - test_get_vector(); - test_content(); - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_plot_data.c b/ThirdParty/Ert/libenkf/tests/enkf_plot_data.c deleted file mode 100644 index dc0ecab891..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_plot_data.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_plot_data.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include - - - -void test_create() { - enkf_plot_data_type * plot_data = enkf_plot_data_alloc( NULL ); - test_assert_true( enkf_plot_data_is_instance( plot_data )); - test_assert_int_equal( 0 , enkf_plot_data_get_size( plot_data )); - enkf_plot_data_free( plot_data ); -} - - - -int main(int argc , char ** argv) { - test_create(); -} diff --git a/ThirdParty/Ert/libenkf/tests/enkf_plot_data_fs.c b/ThirdParty/Ert/libenkf/tests/enkf_plot_data_fs.c deleted file mode 100644 index 88ac6b6aa6..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_plot_data_fs.c +++ /dev/null @@ -1,125 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_plot_data_fs.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#include -#include -#include - -#include -#include - -#include -#include -#include - - - -void test_load_GEN_KW( enkf_main_type * enkf_main , const char * key , const char * index_key) { - ensemble_config_type * ensemble_config = enkf_main_get_ensemble_config( enkf_main ); - const enkf_config_node_type * config_node = ensemble_config_get_node( ensemble_config , key ); - enkf_plot_data_type * plot_data = enkf_plot_data_alloc( config_node ); - - { - enkf_fs_type * enkf_fs = enkf_main_mount_alt_fs( enkf_main , "enkf" , true ); - - enkf_plot_data_load( plot_data , enkf_fs , index_key , NULL ); - test_assert_int_equal( 25 , enkf_plot_data_get_size( plot_data )); - { - enkf_plot_tvector_type * plot_vector = enkf_plot_data_iget( plot_data , 10 ); - test_assert_true( enkf_plot_tvector_is_instance( plot_vector )); - test_assert_int_equal( 63 , enkf_plot_tvector_size( plot_vector )); - - test_assert_true( enkf_plot_tvector_iget_active( plot_vector , 0 )); - test_assert_true( enkf_plot_tvector_iget_active( plot_vector , 10 )); - test_assert_true( enkf_plot_tvector_iget_active( plot_vector , 20 )); - test_assert_true( enkf_plot_tvector_iget_active( plot_vector , 30 )); - - test_assert_false( enkf_plot_tvector_iget_active( plot_vector , 1 )); - test_assert_false( enkf_plot_tvector_iget_active( plot_vector , 11 )); - test_assert_false( enkf_plot_tvector_iget_active( plot_vector , 21 )); - test_assert_false( enkf_plot_tvector_iget_active( plot_vector , 31 )); - } - enkf_fs_decref( enkf_fs ); - } - enkf_plot_data_free( plot_data ); -} - - - -void test_load_summary( enkf_main_type * enkf_main , const char * summary_key) { - ensemble_config_type * ensemble_config = enkf_main_get_ensemble_config( enkf_main ); - const enkf_config_node_type * config_node = ensemble_config_get_node( ensemble_config , summary_key ); - enkf_plot_data_type * plot_data = enkf_plot_data_alloc( config_node ); - - { - enkf_fs_type * enkf_fs = enkf_main_mount_alt_fs( enkf_main , "enkf" , true ); - enkf_plot_data_load( plot_data , enkf_fs , NULL , NULL ); - test_assert_int_equal( 25 , enkf_plot_data_get_size( plot_data )); - { - enkf_plot_tvector_type * plot_vector = enkf_plot_data_iget( plot_data , 10 ); - test_assert_true( enkf_plot_tvector_is_instance( plot_vector )); - test_assert_false( enkf_plot_tvector_iget_active( plot_vector , 0 )); - test_assert_int_equal( 63 , enkf_plot_tvector_size( plot_vector )); - } - enkf_fs_decref( enkf_fs ); - } - - { - enkf_fs_type * enkf_fs = enkf_main_mount_alt_fs( enkf_main , "default" , true ); - enkf_plot_data_load( plot_data , enkf_fs , NULL , NULL ); - test_assert_int_equal( 25 , enkf_plot_data_get_size( plot_data )); - { - enkf_plot_tvector_type * plot_vector = enkf_plot_data_iget( plot_data , 0 ); - test_assert_true( enkf_plot_tvector_is_instance( plot_vector )); - test_assert_false( enkf_plot_tvector_iget_active( plot_vector , 0 )); - test_assert_int_equal( 63 , enkf_plot_tvector_size( plot_vector )); - - plot_vector = enkf_plot_data_iget( plot_data , 1 ); - test_assert_true( enkf_plot_tvector_is_instance( plot_vector )); - test_assert_int_equal( 0 , enkf_plot_tvector_size( plot_vector )); - } - enkf_fs_decref( enkf_fs ); - } - enkf_plot_data_free( plot_data ); -} - - - - - -int main(int argc, char ** argv) { - util_install_signals(); - { - const char * config_file = argv[1]; - test_work_area_type * work_area = test_work_area_alloc( "enkf_main_fs" ); - char * model_config; - util_alloc_file_components( config_file , NULL , &model_config , NULL); - test_work_area_set_store( work_area , true ); - test_work_area_copy_parent_content( work_area , config_file ); - { - enkf_main_type * enkf_main = enkf_main_bootstrap( model_config , false , false ); - - test_load_summary(enkf_main , "WWCT:OP_3"); - test_load_GEN_KW( enkf_main , "MULTFLT" , "F3"); - enkf_main_free( enkf_main ); - } - test_work_area_free( work_area ); - exit(0); - } -} diff --git a/ThirdParty/Ert/libenkf/tests/enkf_plot_gen_kw.c b/ThirdParty/Ert/libenkf/tests/enkf_plot_gen_kw.c deleted file mode 100644 index 0471ec8ec2..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_plot_gen_kw.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'enkf_plot_gen_kw.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include - -#include - -#include -#include -#include - -void test_create_invalid() { - enkf_config_node_type * config_node = enkf_config_node_alloc_summary( "WWCT" , LOAD_FAIL_SILENT); - enkf_plot_gen_kw_type * gen_kw = enkf_plot_gen_kw_alloc( config_node ); - - test_assert_NULL( gen_kw ); - enkf_config_node_free( config_node ); -} - - -void test_create() { - enkf_config_node_type * config_node = enkf_config_node_new_gen_kw( "GEN_KW" , DEFAULT_GEN_KW_TAG_FORMAT, false); - - { - enkf_plot_gen_kw_type * gen_kw = enkf_plot_gen_kw_alloc( config_node ); - test_assert_true( enkf_plot_gen_kw_is_instance( gen_kw )); - test_assert_int_equal( 0 , enkf_plot_gen_kw_get_size( gen_kw )); - enkf_plot_gen_kw_free( gen_kw ); - } - - enkf_config_node_free( config_node ); -} - - - - -int main( int argc , char ** argv) { - test_create(); - test_create_invalid(); - exit(0); -} diff --git a/ThirdParty/Ert/libenkf/tests/enkf_plot_gen_kw_fs.c b/ThirdParty/Ert/libenkf/tests/enkf_plot_gen_kw_fs.c deleted file mode 100644 index 4dba59071d..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_plot_gen_kw_fs.c +++ /dev/null @@ -1,80 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'enkf_plot_gen_kw_fs.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - - -void test_load(const char * config_file) { - ert_test_context_type * test_context = ert_test_context_alloc( "GEN_KW" , config_file ); - enkf_main_type * enkf_main = ert_test_context_get_main( test_context ); - int ens_size = enkf_main_get_ensemble_size( enkf_main ); - stringlist_type * param_list = stringlist_alloc_new(); - enkf_fs_type * init_fs = enkf_fs_create_fs( "fs" , BLOCK_FS_DRIVER_ID , NULL , true ); - bool_vector_type * iens_mask = bool_vector_alloc( ens_size , true ); - - stringlist_append_ref( param_list , "GEN_KW"); - enkf_main_initialize_from_scratch( enkf_main , init_fs , param_list , iens_mask , INIT_FORCE); - { - ensemble_config_type * ensemble_config = enkf_main_get_ensemble_config( enkf_main ); - enkf_config_node_type * config_node = ensemble_config_get_node( ensemble_config , "GEN_KW"); - enkf_plot_gen_kw_type * plot_gen_kw = enkf_plot_gen_kw_alloc( config_node ); - bool_vector_type * input_mask = bool_vector_alloc( ens_size , true ); - gen_kw_config_type * gen_kw_config = enkf_config_node_get_ref( config_node ); - - enkf_plot_gen_kw_load( plot_gen_kw , init_fs , true , 0 , input_mask ); - - test_assert_int_equal( ens_size , enkf_plot_gen_kw_get_size( plot_gen_kw )); - - test_assert_int_equal(4, enkf_plot_gen_kw_get_keyword_count(plot_gen_kw)); - - { - enkf_plot_gen_kw_vector_type * vector = enkf_plot_gen_kw_iget( plot_gen_kw , 0 ); - for (int i=0; i < enkf_plot_gen_kw_vector_get_size( vector ); i++) - test_assert_string_equal( enkf_plot_gen_kw_iget_key( plot_gen_kw , i ) , gen_kw_config_iget_name( gen_kw_config , i)); - } - bool_vector_free( input_mask ); - } - - bool_vector_free( iens_mask ); - stringlist_free( param_list ); - enkf_fs_decref( init_fs ); - ert_test_context_free( test_context ); -} - - - - - -int main( int argc , char ** argv) { - util_install_signals(); - { - const char * config_file = argv[1]; - test_load( config_file ); - exit(0); - } -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_plot_gen_kw_vector.c b/ThirdParty/Ert/libenkf/tests/enkf_plot_gen_kw_vector.c deleted file mode 100644 index d95bbdf539..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_plot_gen_kw_vector.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'enkf_plot_gen_kw_vector.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include - -#include - -#include -#include -#include - - -void test_create() { - enkf_config_node_type * config_node = enkf_config_node_new_gen_kw( "GEN_KW" , DEFAULT_GEN_KW_TAG_FORMAT, false); - - enkf_plot_gen_kw_vector_type * vector = enkf_plot_gen_kw_vector_alloc( config_node , 0 ); - test_assert_true( enkf_plot_gen_kw_vector_is_instance( vector )); - test_assert_int_equal( 0 , enkf_plot_gen_kw_vector_get_size( vector )); - - enkf_plot_gen_kw_vector_free( vector ); - enkf_config_node_free( config_node ); -} - - - - -int main( int argc , char ** argv) { - test_create(); - exit(0); -} diff --git a/ThirdParty/Ert/libenkf/tests/enkf_plot_gendata.c b/ThirdParty/Ert/libenkf/tests/enkf_plot_gendata.c deleted file mode 100644 index 5185adbbbc..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_plot_gendata.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'enkf_plot_gendata.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include - -#include - -#include - -#include -#include -#include - -void test_create_invalid() { - enkf_config_node_type * config_node = enkf_config_node_alloc_summary( "WWCT" , LOAD_FAIL_SILENT); - obs_vector_type * obs_vector = obs_vector_alloc(SUMMARY_OBS , "OBS" , config_node , 100); - enkf_plot_gendata_type * gen_data = enkf_plot_gendata_alloc_from_obs_vector( obs_vector ); - test_assert_NULL( gen_data ); - enkf_config_node_free( config_node ); - obs_vector_free( obs_vector ); -} - - -void test_create() { - enkf_config_node_type * config_node = enkf_config_node_alloc_GEN_DATA_result( "key" , ASCII , "Result:%d"); - enkf_plot_gendata_type * gen_data = enkf_plot_gendata_alloc( config_node ); - test_assert_true( enkf_plot_gendata_is_instance( gen_data )); - test_assert_int_equal( 0 , enkf_plot_gendata_get_size( gen_data )); - enkf_config_node_free( config_node ); - enkf_plot_gendata_free( gen_data); -} - - - - -int main( int argc , char ** argv) { - test_create(); - test_create_invalid(); - exit(0); -} diff --git a/ThirdParty/Ert/libenkf/tests/enkf_plot_gendata_fs.c b/ThirdParty/Ert/libenkf/tests/enkf_plot_gendata_fs.c deleted file mode 100644 index 29c2745263..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_plot_gendata_fs.c +++ /dev/null @@ -1,96 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'enkf_plot_gendata_fs.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include - -#include - -#include - -#include -#include -#include -#include - - - - -void test_gendata( enkf_main_type * enkf_main , const char * obs_key , int report_step ) { - enkf_obs_type * enkf_obs = enkf_main_get_obs( enkf_main ); - - obs_vector_type * obs_vector = enkf_obs_get_vector( enkf_obs , obs_key); - - { - enkf_plot_gendata_type * gen_data = enkf_plot_gendata_alloc_from_obs_vector( obs_vector ); - - enkf_fs_type * fs = enkf_main_get_fs( enkf_main ); - gen_obs_type * gen_obs = obs_vector_iget_node( obs_vector , report_step ); - - { - - double value; - double std; - bool valid; - gen_obs_user_get_with_data_index(gen_obs , "0" , &value , &std , &valid ); - test_assert_double_equal( 0.143841 , value ); - test_assert_double_equal( 0.0300 , std ); - test_assert_true( valid ); - - } - - enkf_plot_gendata_load(gen_data, fs, report_step, NULL); - - test_assert_int_equal( enkf_main_get_ensemble_size( enkf_main ) , enkf_plot_gendata_get_size( gen_data )); - - { - enkf_plot_genvector_type * vector = enkf_plot_gendata_iget( gen_data , 24); - test_assert_true( enkf_plot_genvector_is_instance( vector )); - test_assert_double_equal( 0.675537 , enkf_plot_genvector_iget( vector , 0 )); - test_assert_double_equal( 0.682635 , enkf_plot_genvector_iget( vector , 1 )); - test_assert_double_equal( 0.616371 , enkf_plot_genvector_iget( vector , 2 )); - - - } - - { - enkf_plot_genvector_type * vector = enkf_plot_gendata_iget( gen_data , 9 ); - test_assert_true( enkf_plot_genvector_is_instance( vector )); - test_assert_double_equal( -0.515033 , enkf_plot_genvector_iget( vector , 0 )); - test_assert_double_equal( -0.507350 , enkf_plot_genvector_iget( vector , 1 )); - test_assert_double_equal( -0.541030 , enkf_plot_genvector_iget( vector , 2 )); - } - - - enkf_plot_gendata_free( gen_data ); - } - - -} - - - -int main( int argc , char ** argv) { - const char * config_file = argv[1]; - util_install_signals(); - ert_test_context_type * test_context = ert_test_context_alloc("GENDATA" , config_file ); - enkf_main_type * enkf_main = ert_test_context_get_main( test_context ); - - test_gendata( enkf_main , "GEN_TIMESHIFT" , 60); - - ert_test_context_free( test_context ); - exit(0); -} diff --git a/ThirdParty/Ert/libenkf/tests/enkf_plot_genvector.c b/ThirdParty/Ert/libenkf/tests/enkf_plot_genvector.c deleted file mode 100644 index b878af563b..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_plot_genvector.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'enkf_plot_genvector.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include - -#include - -#include - -#include -#include -#include -#include - - -void test_create() { - enkf_config_node_type * config_node = enkf_config_node_alloc_GEN_DATA_result( "Key" , ASCII , "Result%d"); - enkf_plot_genvector_type * gen_vector = enkf_plot_genvector_alloc( config_node , 0 ); - test_assert_true( enkf_plot_genvector_is_instance( gen_vector )); - test_assert_int_equal( 0 , enkf_plot_genvector_get_size( gen_vector )); - enkf_config_node_free( config_node ); - enkf_plot_genvector_free(gen_vector); -} - - - - -int main( int argc , char ** argv) { - test_create(); - exit(0); -} diff --git a/ThirdParty/Ert/libenkf/tests/enkf_plot_tvector.c b/ThirdParty/Ert/libenkf/tests/enkf_plot_tvector.c deleted file mode 100644 index 0896f5788b..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_plot_tvector.c +++ /dev/null @@ -1,114 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_plot_tvector.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include - - - -void create_test() { - enkf_config_node_type * config_node = enkf_config_node_alloc_summary("KEY" , LOAD_FAIL_SILENT); - enkf_plot_tvector_type * tvector = enkf_plot_tvector_alloc( config_node , 0 ); - test_assert_true( enkf_plot_tvector_is_instance( tvector )); - enkf_plot_tvector_free( tvector ); -} - - - -void test_iset() { - enkf_config_node_type * config_node = enkf_config_node_alloc_summary("KEY" , LOAD_FAIL_SILENT); - enkf_plot_tvector_type * tvector = enkf_plot_tvector_alloc( config_node , 0 ); - enkf_plot_tvector_iset( tvector , 10 , 0 , 100 ); - - test_assert_int_equal( 11 , enkf_plot_tvector_size( tvector )); - test_assert_time_t_equal( 0 , enkf_plot_tvector_iget_time( tvector , 10 )); - test_assert_double_equal( 100 , enkf_plot_tvector_iget_value( tvector , 10 )); - { - for (int i=0; i < (enkf_plot_tvector_size( tvector ) - 1); i++) - test_assert_false( enkf_plot_tvector_iget_active( tvector , i )); - - test_assert_true( enkf_plot_tvector_iget_active( tvector , 10 )); - } - - enkf_plot_tvector_free( tvector ); -} - - -void test_all_active() { - enkf_config_node_type * config_node = enkf_config_node_alloc_summary("KEY" , LOAD_FAIL_SILENT); - enkf_plot_tvector_type * tvector = enkf_plot_tvector_alloc( config_node , 0); - test_assert_true( enkf_plot_tvector_all_active( tvector )); - - enkf_plot_tvector_iset( tvector , 00 , 0 , 100 ); - test_assert_true( enkf_plot_tvector_all_active( tvector )); - - enkf_plot_tvector_iset( tvector , 1 , 0 , 100 ); - test_assert_true( enkf_plot_tvector_all_active( tvector )); - - enkf_plot_tvector_iset( tvector , 10 , 0 , 100 ); - test_assert_false( enkf_plot_tvector_all_active( tvector )); -} - - - -void test_iget() { - enkf_config_node_type * config_node = enkf_config_node_alloc_summary("KEY" , LOAD_FAIL_SILENT); - enkf_plot_tvector_type * tvector = enkf_plot_tvector_alloc( config_node , 0); - enkf_plot_tvector_iset( tvector , 0 , 0 , 0 ); - enkf_plot_tvector_iset( tvector , 1 , 100 , 10 ); - enkf_plot_tvector_iset( tvector , 2 , 200 , 20 ); - enkf_plot_tvector_iset( tvector , 3 , 300 , 30 ); - enkf_plot_tvector_iset( tvector , 4 , 400 , 40 ); - - enkf_plot_tvector_iset( tvector , 6 , 600 , 60 ); - - - test_assert_int_equal( 7 , enkf_plot_tvector_size( tvector )); - for (int i=0; i < 7; i++) { - if (i == 5) - test_assert_false( enkf_plot_tvector_iget_active( tvector , i )); - else { - test_assert_true( enkf_plot_tvector_iget_active( tvector , i )); - test_assert_time_t_equal( i * 100 , enkf_plot_tvector_iget_time( tvector , i )); - test_assert_double_equal( i * 10 , enkf_plot_tvector_iget_value( tvector , i )); - } - } -} - - - -int main(int argc , char ** argv) { - create_test(); - test_iset(); - test_all_active(); - test_iget(); - - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_refcase_list.c b/ThirdParty/Ert/libenkf/tests/enkf_refcase_list.c deleted file mode 100644 index 7abe9aac96..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_refcase_list.c +++ /dev/null @@ -1,128 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_refcase_list.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include - -#include - - -int main(int argc , char ** argv) { - const char * case1 = argv[1]; - const char * case_glob = argv[2]; - - { - ecl_refcase_list_type * refcase_list = ecl_refcase_list_alloc( ); - - test_assert_false( ecl_refcase_list_has_case( refcase_list , "DoesNotExist" )); - test_assert_NULL( ecl_refcase_list_get_case( refcase_list , "DoesNotExist")); - - test_assert_int_equal( ecl_refcase_list_add_matching( refcase_list , "DoesNotExist") , 0); - ecl_refcase_list_add_case( refcase_list , "DoesNotExist" ); - test_assert_false( ecl_refcase_list_has_case( refcase_list , "DoesNotExist")); - - ecl_refcase_list_add_case( refcase_list , case1 ); - test_assert_true( ecl_refcase_list_has_case( refcase_list , case1)); - - - test_assert_not_NULL( refcase_list ); - test_assert_false( ecl_refcase_list_has_default( refcase_list )); - test_assert_NULL( ecl_refcase_list_get_default( refcase_list )); - - test_assert_false( ecl_refcase_list_set_default( refcase_list , "DoesNotExist")); - test_assert_false( ecl_refcase_list_has_default( refcase_list )); - test_assert_NULL( ecl_refcase_list_get_default( refcase_list )); - test_assert_int_equal( 1 , ecl_refcase_list_get_size( refcase_list )); - - test_assert_true( ecl_refcase_list_set_default( refcase_list , case1)); - test_assert_true( ecl_refcase_list_has_default( refcase_list )); - test_assert_not_NULL( ecl_refcase_list_get_default( refcase_list )); - test_assert_int_equal( 1 , ecl_refcase_list_get_size( refcase_list )); - - test_assert_false( ecl_refcase_list_set_default( refcase_list , "DoesNotExist")); - test_assert_true( ecl_refcase_list_has_default( refcase_list )); - test_assert_not_NULL( ecl_refcase_list_get_default( refcase_list )); - test_assert_int_equal( 1 , ecl_refcase_list_get_size( refcase_list )); - test_assert_NULL( ecl_refcase_list_iget_case( refcase_list , 100)); - - ecl_refcase_list_free( refcase_list ); - } - - { - ecl_refcase_list_type * refcase_list = ecl_refcase_list_alloc( ); - test_assert_int_equal( ecl_refcase_list_add_matching( refcase_list , case_glob ) , 11); - test_assert_int_equal( 11 , ecl_refcase_list_get_size( refcase_list )); - - test_assert_true( ecl_refcase_list_set_default( refcase_list , case1)); - test_assert_true( ecl_refcase_list_has_default( refcase_list )); - test_assert_not_NULL( ecl_refcase_list_get_default( refcase_list )); - test_assert_int_equal( 11 , ecl_refcase_list_get_size( refcase_list )); - - test_assert_int_equal( ecl_refcase_list_add_matching( refcase_list , case_glob ) , 0); - test_assert_int_equal( ecl_refcase_list_add_matching( refcase_list , case_glob ) , 0); - { - const ecl_sum_type * ecl_sum = ecl_refcase_list_iget_case( refcase_list , 0 ); - test_assert_not_NULL( ecl_sum ); - } - test_assert_int_equal( 11 , ecl_refcase_list_get_size( refcase_list )); - - { - stringlist_type * case_list = stringlist_alloc_new( ); - const int N = ecl_refcase_list_get_size( refcase_list ); - int i; - for (i=0; i < N; i++) - stringlist_append_ref( case_list , ecl_refcase_list_iget_pathcase( refcase_list , N - 1 - i )); - - { - bool equal = true; - for (i=0; i < N; i++) - equal = equal && util_string_equal( stringlist_iget( case_list , i ) , ecl_refcase_list_iget_pathcase( refcase_list , i)); - - test_assert_false( equal ); - stringlist_sort( case_list , (string_cmp_ftype *) util_strcmp_int); - - equal = true; - for (i=0; i < N; i++) - equal = equal && util_string_equal( stringlist_iget( case_list , i ) , ecl_refcase_list_iget_pathcase( refcase_list , i)); - test_assert_true( equal ); - } - stringlist_free( case_list ); - } - ecl_refcase_list_add_matching( refcase_list , "DoesNotExist*"); - test_assert_int_equal( 11 , ecl_refcase_list_get_size( refcase_list )); - ecl_refcase_list_free( refcase_list ); - } - - - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_rng.c b/ThirdParty/Ert/libenkf/tests/enkf_rng.c deleted file mode 100644 index 86d430c207..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_rng.c +++ /dev/null @@ -1,130 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_rng.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include - -#include -#include -#include - - -int main(int argc , char ** argv) { - unsigned int rand1,rand2; - { - test_work_area_type * work_area = test_work_area_alloc("enkf-rng-0"); - { - enkf_main_type * enkf_main = enkf_main_alloc_empty(); - enkf_main_resize_ensemble( enkf_main , 10 ); - { - enkf_state_type * state = enkf_main_iget_state( enkf_main , 9 ); - rand1 = enkf_state_get_random( state ); - } - enkf_main_free( enkf_main ); - } - - { - enkf_main_type * enkf_main = enkf_main_alloc_empty(); - enkf_main_resize_ensemble( enkf_main , 10 ); - { - enkf_state_type * state = enkf_main_iget_state( enkf_main , 9 ); - rand2 = enkf_state_get_random( state ); - } - enkf_main_free( enkf_main ); - } - test_assert_uint_not_equal( rand1 , rand2 ); - test_work_area_free( work_area ); - } - - /*****************************************************************/ - - { - test_work_area_type * work_area = test_work_area_alloc("enkf-rng-1" ); - const char * seed_file = "seed"; - { - enkf_main_type * enkf_main = enkf_main_alloc_empty(); - { - rng_config_type * rng_config = enkf_main_get_rng_config( enkf_main ); - rng_config_set_seed_store_file( rng_config , seed_file ); - } - enkf_main_rng_init( enkf_main ); - - enkf_main_resize_ensemble( enkf_main , 10 ); - { - enkf_state_type * state = enkf_main_iget_state( enkf_main , 9 ); - rand1 = enkf_state_get_random( state ); - } - enkf_main_free( enkf_main ); - } - - { - enkf_main_type * enkf_main = enkf_main_alloc_empty(); - { - rng_config_type * rng_config = enkf_main_get_rng_config( enkf_main ); - rng_config_set_seed_load_file( rng_config , seed_file ); - } - enkf_main_rng_init( enkf_main ); - - enkf_main_resize_ensemble( enkf_main , 10 ); - { - enkf_state_type * state = enkf_main_iget_state( enkf_main , 9 ); - rand2 = enkf_state_get_random( state ); - } - enkf_main_free( enkf_main ); - } - test_assert_uint_equal( rand1 , rand2 ); - test_work_area_free( work_area ); - - } - /*****************************************************************/ - { - const char * config_path = argv[1]; - const char * config_file = argv[2]; - test_work_area_type * work_area = test_work_area_alloc("enkf-rng-2" ); - test_work_area_copy_directory_content( work_area , config_path ); - { - enkf_main_type * enkf_main = enkf_main_bootstrap( config_file , true , true ); - enkf_state_type * state = enkf_main_iget_state( enkf_main , 9 ); - rand1 = enkf_state_get_random( state ); - enkf_main_free( enkf_main ); - } - - { - enkf_main_type * enkf_main = enkf_main_bootstrap( config_file , true , true ); - enkf_state_type * state = enkf_main_iget_state( enkf_main , 9 ); - rand2 = enkf_state_get_random( state ); - enkf_main_free( enkf_main ); - } - test_assert_uint_equal( rand1 , rand2 ); - - { - enkf_main_type * enkf_main = enkf_main_bootstrap( config_file , true , true ); - enkf_state_type * state = enkf_main_iget_state( enkf_main , 9 ); - rand2 = enkf_state_get_random( state ); - enkf_main_free( enkf_main ); - } - test_assert_uint_equal( rand1 , rand2 ); - test_work_area_free( work_area ); - } - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_run_arg.c b/ThirdParty/Ert/libenkf/tests/enkf_run_arg.c deleted file mode 100644 index cd38319e6d..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_run_arg.c +++ /dev/null @@ -1,158 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'ert_run_context.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include - -#include "ert/util/build_config.h" - -#include -#include -#include -#include -#include - -#include -#include -#include - - -void call_get_queue_index( void * arg ) { - run_arg_type * run_arg = run_arg_safe_cast( arg ); - run_arg_get_queue_index( run_arg ); -} - -void call_set_queue_index( void * arg ) { - run_arg_type * run_arg = run_arg_safe_cast( arg ); - run_arg_set_queue_index( run_arg , 88 ); -} - - -void test_queue_index() { - test_work_area_type * test_area = test_work_area_alloc("run_arg/ENS"); - { - enkf_fs_type * fs = enkf_fs_create_fs("sim" , BLOCK_FS_DRIVER_ID , NULL , true); - run_arg_type * run_arg = run_arg_alloc_ENSEMBLE_EXPERIMENT(fs , 0 , 6 , "path"); - - test_assert_false( run_arg_is_submitted( run_arg ) ); - test_assert_util_abort("run_arg_get_queue_index" , call_get_queue_index , run_arg ); - - run_arg_set_queue_index(run_arg, 78); - test_assert_true( run_arg_is_submitted( run_arg ) ); - test_assert_int_equal( 78 , run_arg_get_queue_index( run_arg )); - - test_assert_util_abort("run_arg_set_queue_index" , call_set_queue_index , run_arg ); - run_arg_free( run_arg ); - enkf_fs_decref( fs ); - } - test_work_area_free( test_area ); -} - -void call_get_result_fs( void * arg ) { - run_arg_type * run_arg = run_arg_safe_cast( arg ); - run_arg_get_result_fs( run_arg ); -} - - -void call_get_update_target_fs( void * arg ) { - run_arg_type * run_arg = run_arg_safe_cast( arg ); - run_arg_get_update_target_fs( run_arg ); -} - - - -void test_SMOOTHER_RUN( ) { - test_work_area_type * test_area = test_work_area_alloc("run_arg/SMOOTHER"); - { - enkf_fs_type * sim_fs = enkf_fs_create_fs("sim" , BLOCK_FS_DRIVER_ID , NULL , true); - enkf_fs_type * target_fs = enkf_fs_create_fs("target" , BLOCK_FS_DRIVER_ID , NULL , true); - run_arg_type * run_arg = run_arg_alloc_SMOOTHER_RUN(sim_fs , target_fs , 0 , 6 , "path"); - test_assert_true( run_arg_is_instance( run_arg )); - test_assert_ptr_equal( run_arg_get_init_fs( run_arg ) , sim_fs ); - test_assert_ptr_equal( run_arg_get_result_fs( run_arg ) , sim_fs ); - test_assert_ptr_equal( run_arg_get_update_target_fs( run_arg ) , target_fs ); - run_arg_free( run_arg ); - - enkf_fs_decref( sim_fs ); - enkf_fs_decref( target_fs ); - } - test_work_area_free( test_area ); -} - - -void alloc_invalid_run_arg(void *arg) { - test_work_area_type * test_area = test_work_area_alloc("run_arg/invalid"); - { - enkf_fs_type * fs = enkf_fs_create_fs("fs" , BLOCK_FS_DRIVER_ID , NULL , true); - run_arg_type * run_arg = run_arg_alloc_SMOOTHER_RUN(fs , fs , 0 , 6 , "path"); // This should explode ... - run_arg_free( run_arg ); - enkf_fs_decref( fs ); - } - test_work_area_free( test_area ); -} - - -void test_invalid_update_on_self( ) { - test_assert_util_abort( "run_arg_alloc" , alloc_invalid_run_arg , NULL); -} - - -void test_INIT_ONLY( ) { - test_work_area_type * test_area = test_work_area_alloc("run_arg/INIT"); - { - enkf_fs_type * init_fs = enkf_fs_create_fs("sim" , BLOCK_FS_DRIVER_ID , NULL , true); - - run_arg_type * run_arg = run_arg_alloc_INIT_ONLY(init_fs , 0 , 6 , "path"); - test_assert_true( run_arg_is_instance( run_arg )); - test_assert_ptr_equal( run_arg_get_init_fs( run_arg ) , init_fs ); - - test_assert_util_abort( "run_arg_get_result_fs" , call_get_result_fs , run_arg ); - test_assert_util_abort( "run_arg_get_update_target_fs" , call_get_update_target_fs , run_arg ); - run_arg_free( run_arg ); - - enkf_fs_decref( init_fs ); - } - test_work_area_free( test_area ); -} - - -void test_ENSEMBLE_EXPERIMENT( ) { - test_work_area_type * test_area = test_work_area_alloc("run_arg/ENS"); - { - enkf_fs_type * fs = enkf_fs_create_fs("sim" , BLOCK_FS_DRIVER_ID , NULL , true); - - run_arg_type * run_arg = run_arg_alloc_ENSEMBLE_EXPERIMENT(fs , 0 , 6 , "path"); - test_assert_true( run_arg_is_instance( run_arg )); - - test_assert_ptr_equal( run_arg_get_init_fs( run_arg ) , fs ); - test_assert_ptr_equal( run_arg_get_result_fs( run_arg ) , fs ); - test_assert_util_abort( "run_arg_get_update_target_fs" , call_get_update_target_fs , run_arg ); - - run_arg_free( run_arg ); - enkf_fs_decref( fs ); - } - test_work_area_free( test_area ); -} - - -int main(int argc , char ** argv) { - test_queue_index(); - test_SMOOTHER_RUN(); - test_INIT_ONLY(); - test_ENSEMBLE_EXPERIMENT(); - test_invalid_update_on_self(); - exit(0); -} diff --git a/ThirdParty/Ert/libenkf/tests/enkf_runpath_list.c b/ThirdParty/Ert/libenkf/tests/enkf_runpath_list.c deleted file mode 100644 index 95fcf9c937..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_runpath_list.c +++ /dev/null @@ -1,155 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_runpath_list.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -void * add_pathlist( void * arg ) { - arg_pack_type * arg_pack = arg_pack_safe_cast( arg ); - runpath_list_type * list = arg_pack_iget_ptr( arg_pack , 0 ); - int offset = arg_pack_iget_int( arg_pack , 1 ); - int bs = arg_pack_iget_int( arg_pack , 2 ); - - int i; - for (i=0; i < bs; i++) - runpath_list_add( list , i + offset , 0, "Path" , "Basename"); - - return NULL; -} - -void test_runpath_list() { - runpath_list_type * list = runpath_list_alloc("DefaultFile"); - - test_assert_int_equal( runpath_list_size( list ) , 0 ); - - runpath_list_add( list , 3 , 0, "path" , "base"); - runpath_list_add( list , 2 , 0, "path" , "base"); - runpath_list_add( list , 1 , 0, "path" , "base"); - - runpath_list_add( list , 3 , 1, "path" , "base"); - runpath_list_add( list , 2 , 1, "path" , "base"); - runpath_list_add( list , 1 , 1, "path" , "base"); - - test_assert_int_equal( runpath_list_size( list ) , 6 ); - test_assert_int_equal( runpath_list_iget_iens( list , 0 ) , 3 ); - test_assert_int_equal( runpath_list_iget_iens( list , 2 ) , 1 ); - test_assert_int_equal( runpath_list_iget_iter( list , 3 ) , 1 ); - - runpath_list_clear( list ); - test_assert_int_equal( runpath_list_size( list ) , 0 ); - - test_assert_string_equal( runpath_list_get_line_fmt( list ) , RUNPATH_LIST_DEFAULT_LINE_FMT ); - { - const char * other_line = "%d %s %s"; - runpath_list_set_line_fmt( list , other_line ); - test_assert_string_equal( runpath_list_get_line_fmt( list ) , other_line ); - } - runpath_list_set_line_fmt( list , NULL ); - test_assert_string_equal( runpath_list_get_line_fmt( list ) , RUNPATH_LIST_DEFAULT_LINE_FMT ); - - { - const int block_size = 100; - const int threads = 100; - thread_pool_type * tp = thread_pool_alloc( threads , true ); - int it; - - for (it = 0; it < threads; it++) { - int iens_offset = it * block_size; - arg_pack_type * arg_pack = arg_pack_alloc(); - - arg_pack_append_ptr( arg_pack , list ); - arg_pack_append_int( arg_pack , iens_offset ); - arg_pack_append_int( arg_pack , block_size ); - - thread_pool_add_job( tp , add_pathlist , arg_pack ); - } - thread_pool_join( tp ); - test_assert_int_equal( runpath_list_size( list ) , block_size * threads ); - - { - test_work_area_type * work_area = test_work_area_alloc("enkf_runpath_list" ); - runpath_list_fprintf( list ); - { - int file_iens; - int file_iter; - char file_path[256]; - char file_base[256]; - int iens; - FILE * stream = util_fopen( runpath_list_get_export_file(list) , "r"); - for (iens = 0; iens < threads * block_size; iens++) { - int fscanf_return = fscanf( stream , "%d %s %s %d" , &file_iens , file_path , file_base, &file_iter); - test_assert_int_equal(fscanf_return, 4 ); - test_assert_int_equal( file_iens , iens ); - test_assert_int_equal( file_iter , 0 ); - } - fclose( stream ); - } - test_work_area_free( work_area ); - } - } - runpath_list_free( list ); -} - - - -void test_config( const char * config_file ) { - ert_test_context_type * test_context = ert_test_context_alloc( "RUNPATH_FILE" , config_file ); - enkf_main_type * enkf_main = ert_test_context_get_main( test_context ); - hook_manager_type * hook_manager = enkf_main_get_hook_manager( enkf_main ); - - ert_test_context_run_worklow( test_context , "ARGECHO_WF"); - { - FILE * stream = util_fopen("runpath_list.txt" , "r"); - char runpath_file[256]; - fscanf(stream , "%s" , runpath_file ); - fclose( stream ); - test_assert_string_equal( runpath_file , hook_manager_get_runpath_list_file( hook_manager )); - } - - ert_test_context_free( test_context ); -} - - -void test_filename() { - runpath_list_type * list = runpath_list_alloc("DefaultFile"); - test_assert_string_equal( "DefaultFile" , runpath_list_get_export_file(list)); - runpath_list_set_export_file( list , "/tmp/file.txt"); - test_assert_string_equal( "/tmp/file.txt" , runpath_list_get_export_file(list)); - runpath_list_free( list ); -} - -int main(int argc , char ** argv) { - util_install_signals(); - { - test_runpath_list(); - test_config( argv[1] ); - test_filename(); - exit(0); - } -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_scale_correlated_std.c b/ThirdParty/Ert/libenkf/tests/enkf_scale_correlated_std.c deleted file mode 100644 index 59fd2aa401..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_scale_correlated_std.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA, Norway. - - The file 'enkf_scale_correlated_std.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include - - - - -void test_scaling( ert_test_context_type * test_context , int nobs, const char** obs_keys ) { - stringlist_type * args = stringlist_alloc_new(); - for (int iobs=0; iobs < nobs; iobs++) - stringlist_append_ref( args , obs_keys[iobs]); - - test_assert_true( ert_test_context_run_worklow_job( test_context , "STD_SCALE" , args) ); - stringlist_free( args ); -} - - - -int main(int argc , const char ** argv) { - const char * config_file = argv[1]; - const char * workflow_job_file = argv[2]; - enkf_main_install_SIGNALS(); - { - ert_test_context_type * test_context = ert_test_context_alloc("std_scale_test" , config_file); - - ert_test_context_install_workflow_job( test_context , "STD_SCALE" , workflow_job_file ); - test_scaling(test_context , 1 , ( const char *[1] ) {"WWCT:OP_1"}); - test_scaling(test_context , 2 , ( const char *[2] ) {"WWCT:OP_1", "WWCT:OP_2"}); - test_scaling(test_context , 8 , ( const char *[8] ) {"RPR2_1", "RPR2_2","RPR2_3","RPR2_4","RPR2_5","RPR2_6","RPR2_7","RPR2_8"}); - - ert_test_context_free( test_context ); - } - exit(0); -} diff --git a/ThirdParty/Ert/libenkf/tests/enkf_select_case_job.c b/ThirdParty/Ert/libenkf/tests/enkf_select_case_job.c deleted file mode 100644 index 20e19df57b..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_select_case_job.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_select_case_job.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - - -int main(int argc , const char ** argv) { - enkf_main_install_SIGNALS(); - - const char * config_file = argv[1]; - const char * select_case_job = argv[2]; - - ert_test_context_type * test_context = ert_test_context_alloc("SELECT_CASE" , config_file ); - - test_assert_true( ert_test_context_install_workflow_job( test_context , "SELECT_CASE" , select_case_job)); - { - enkf_main_type * enkf_main = ert_test_context_get_main( test_context ); - stringlist_type * args = stringlist_alloc_new(); - stringlist_append_copy( args , "OtherCase"); - - test_assert_string_not_equal( "OtherCase" , enkf_main_get_current_fs( enkf_main )); - ert_test_context_run_worklow_job( test_context , "SELECT_CASE" , args); - test_assert_true( ert_test_context_run_worklow_job( test_context , "SELECT_CASE" , args) ); - test_assert_string_equal( "OtherCase" , enkf_main_get_current_fs( enkf_main )); - - stringlist_free( args ); - } - ert_test_context_free( test_context ); - exit(0); -} diff --git a/ThirdParty/Ert/libenkf/tests/enkf_site_config.c b/ThirdParty/Ert/libenkf/tests/enkf_site_config.c deleted file mode 100644 index c709d49b6d..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_site_config.c +++ /dev/null @@ -1,122 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_site_config.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include - - -#include - - - - -#define INCLUDE_KEY "INCLUDE" -#define DEFINE_KEY "DEFINE" - - -void test_empty() { - site_config_type * site_config = site_config_alloc_empty(); - site_config_free( site_config ); -} - - -void test_init(const char * config_file) { - site_config_type * site_config = site_config_alloc_empty(); - config_parser_type * config = config_alloc(); - config_content_type * content; - - site_config_add_config_items( config , true ); - content = config_parse(config , config_file , "--" , INCLUDE_KEY , DEFINE_KEY , NULL , CONFIG_UNRECOGNIZED_WARN , true); - if (!config_content_is_valid(content)) { - config_error_type * errors = config_content_get_errors( content ); - config_error_fprintf( errors , true , stderr ); - test_assert_true( false ); - } - - if (!site_config_init( site_config , content )) { - printf("Loading site_config from config failed\n"); - test_assert_true( false ); - } - - config_content_free( content ); - config_free( config ); - site_config_free( site_config ); -} - - -void test_job_script() { - test_work_area_type * test_area = test_work_area_alloc("site-config"); - { - site_config_type * site_config = site_config_alloc_empty(); - test_assert_false( site_config_has_job_script( site_config )); - - test_assert_false( site_config_set_job_script( site_config , "/does/not/exist" )); - test_assert_false( site_config_has_job_script( site_config )); - - { - FILE * job_script = util_fopen("Script.sh" , "w"); - fclose( job_script ); - } - test_assert_false( site_config_set_job_script( site_config , "Script.sh" )); - test_assert_false( site_config_has_job_script( site_config )); - chmod("Script.sh" , S_IRWXU ); - test_assert_true( site_config_set_job_script( site_config , "Script.sh" )); - test_assert_true( site_config_has_job_script( site_config )); - - test_assert_false( site_config_set_job_script( site_config , "DoesNotExits")); - test_assert_true( site_config_has_job_script( site_config )); - { - char * full_path = util_alloc_realpath( "Script.sh" ); - test_assert_string_equal( full_path , site_config_get_job_script( site_config)); - free( full_path ); - } - site_config_free( site_config ); - } - test_work_area_free( test_area ); -} - - - -int main(int argc , char ** argv) { - const char * site_config_file = argv[1]; - - util_install_signals(); - - test_empty(); - test_init( site_config_file ); - test_job_script(); - - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_state_manual_load_test.c b/ThirdParty/Ert/libenkf/tests/enkf_state_manual_load_test.c deleted file mode 100644 index c9a7cb9a02..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_state_manual_load_test.c +++ /dev/null @@ -1,79 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_state_manual_load_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - - -int test_load_manually_to_new_case(enkf_main_type * enkf_main) { - int result = 0; - int iens = 0; - int iter = 0; - const char * casename = "new_case"; - enkf_main_select_fs( enkf_main , casename ); - - - enkf_fs_type * fs = enkf_main_get_fs( enkf_main ); - run_arg_type * run_arg = run_arg_alloc_ENSEMBLE_EXPERIMENT(fs , iens , iter , "simulations/run0"); - { - arg_pack_type * arg_pack = arg_pack_alloc(); - arg_pack_append_ptr( arg_pack , enkf_main_iget_state(enkf_main, 0)); - arg_pack_append_ptr( arg_pack , run_arg ); - arg_pack_append_owned_ptr( arg_pack , stringlist_alloc_new() , stringlist_free__); - arg_pack_append_bool( arg_pack, true ); - arg_pack_append_ptr( arg_pack, &result ); - - enkf_state_load_from_forward_model_mt(arg_pack); - arg_pack_free(arg_pack); - } - - return result; -} - - - - -int main(int argc , char ** argv) { - enkf_main_install_SIGNALS(); - const char * root_path = argv[1]; - const char * config_file = argv[2]; - - test_work_area_type * work_area = test_work_area_alloc(config_file); - test_work_area_copy_directory_content( work_area , root_path ); - { - bool strict = true; - enkf_main_type * enkf_main = enkf_main_bootstrap( config_file , strict , true ); - - test_assert_int_equal( 0 , test_load_manually_to_new_case(enkf_main)); - - enkf_main_free( enkf_main ); - } - test_work_area_free(work_area); - - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_state_map.c b/ThirdParty/Ert/libenkf/tests/enkf_state_map.c deleted file mode 100644 index b94c80f3dd..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_state_map.c +++ /dev/null @@ -1,368 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_state_map.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include - - -void create_test() { - state_map_type * state_map = state_map_alloc(); - test_assert_true( state_map_is_instance( state_map )); - test_assert_int_equal( 0 , state_map_get_size( state_map )); - test_assert_false( state_map_is_readonly( state_map )); - state_map_free( state_map ); -} - -void get_test( ) { - state_map_type * state_map = state_map_alloc(); - test_assert_int_equal( STATE_UNDEFINED , state_map_iget( state_map , 0 )); - test_assert_int_equal( STATE_UNDEFINED , state_map_iget( state_map , 100 )); - state_map_free( state_map ); -} - -void set_test( ) { - state_map_type * state_map = state_map_alloc(); - state_map_iset( state_map , 0 , STATE_INITIALIZED ); - test_assert_int_equal( STATE_INITIALIZED , state_map_iget( state_map , 0 )); - - state_map_iset( state_map , 100 , STATE_INITIALIZED ); - test_assert_int_equal( STATE_INITIALIZED , state_map_iget( state_map , 100 )); - - test_assert_int_equal( STATE_UNDEFINED , state_map_iget( state_map , 50 )); - test_assert_int_equal( 101 , state_map_get_size( state_map )); - state_map_free( state_map ); -} - - -void load_empty_test() { - state_map_type * state_map = state_map_fread_alloc( "File/does/not/exists" ); - test_assert_true( state_map_is_instance( state_map )); - test_assert_int_equal( 0 , state_map_get_size( state_map )); - state_map_free( state_map ); -} - - -void test_equal() { - state_map_type * state_map1 = state_map_alloc(); - state_map_type * state_map2 = state_map_alloc(); - - test_assert_true( state_map_equal( state_map1 , state_map2 )); - for (int i =0; i < 25; i++) { - state_map_iset( state_map1 , i , STATE_INITIALIZED ); - state_map_iset( state_map2 , i , STATE_INITIALIZED ); - } - test_assert_true( state_map_equal( state_map1 , state_map2 )); - - state_map_iset( state_map2 , 15 , STATE_HAS_DATA ); - test_assert_false( state_map_equal( state_map1 , state_map2 )); - state_map_iset( state_map2 , 15 , STATE_LOAD_FAILURE ); - state_map_iset( state_map2 , 15 , STATE_INITIALIZED ); - test_assert_true( state_map_equal( state_map1 , state_map2 )); - - state_map_iset( state_map2 , 150 , STATE_INITIALIZED ); - test_assert_false( state_map_equal( state_map1 , state_map2 )); -} - - -void test_copy() { - state_map_type * state_map = state_map_alloc(); - state_map_iset( state_map , 0 , STATE_INITIALIZED ); - state_map_iset( state_map , 100 , STATE_INITIALIZED ); - { - state_map_type * copy = state_map_alloc_copy( state_map ); - test_assert_true( state_map_equal( copy , state_map )); - - state_map_iset( state_map , 10 , STATE_INITIALIZED ); - test_assert_false( state_map_equal( copy , state_map )); - - state_map_free( copy ); - } - state_map_free( state_map ); -} - - -void test_io( ) { - test_work_area_type * work_area = test_work_area_alloc( "enkf-state-map" ); - { - state_map_type * state_map = state_map_alloc(); - state_map_type * copy1 , *copy2; - state_map_iset( state_map , 0 , STATE_INITIALIZED ); - state_map_iset( state_map , 100 , STATE_INITIALIZED ); - state_map_fwrite( state_map , "map"); - - copy1 = state_map_fread_alloc( "map" ); - test_assert_true( state_map_equal( state_map , copy1 )); - - copy2 = state_map_alloc(); - test_assert_true( state_map_fread( copy2 , "map" ) ); - test_assert_true( state_map_equal( state_map , copy2 )); - - state_map_iset( copy2 , 67 , STATE_INITIALIZED ); - test_assert_false(state_map_equal( state_map , copy2 )); - - state_map_fread( copy2 , "map"); - test_assert_true( state_map_equal( state_map , copy2 )); - - test_assert_false(state_map_fread( copy2 , "DoesNotExist")); - test_assert_int_equal( 0 , state_map_get_size( copy2 )); - } - test_work_area_free( work_area ); -} - - - -void test_update_undefined( ) { - state_map_type * map = state_map_alloc( ); - - state_map_iset( map , 10 , STATE_INITIALIZED ); - test_assert_int_equal( STATE_UNDEFINED , state_map_iget( map , 5 ) ); - test_assert_int_equal( STATE_INITIALIZED , state_map_iget( map , 10 ) ); - - state_map_update_undefined( map , 5 , STATE_INITIALIZED ); - test_assert_int_equal( STATE_INITIALIZED , state_map_iget( map , 5 ) ); - - state_map_update_undefined( map , 10 , STATE_INITIALIZED ); - test_assert_int_equal( STATE_INITIALIZED , state_map_iget( map , 10 ) ); - - state_map_free( map ); -} - - -void test_update_matching( ) { - state_map_type * map = state_map_alloc( ); - - state_map_iset( map , 10 , STATE_INITIALIZED ); - state_map_iset( map , 3 , STATE_PARENT_FAILURE ); - test_assert_int_equal( STATE_UNDEFINED , state_map_iget( map , 5 ) ); - test_assert_int_equal( STATE_INITIALIZED , state_map_iget( map , 10 ) ); - - state_map_update_matching( map , 5 , STATE_UNDEFINED | STATE_LOAD_FAILURE , STATE_INITIALIZED ); - state_map_update_matching( map , 10 , STATE_UNDEFINED | STATE_LOAD_FAILURE , STATE_INITIALIZED ); - state_map_update_matching( map , 3 , STATE_UNDEFINED | STATE_LOAD_FAILURE , STATE_INITIALIZED ); - - test_assert_int_equal( STATE_INITIALIZED , state_map_iget( map , 5 ) ); - test_assert_int_equal( STATE_INITIALIZED , state_map_iget( map , 10 ) ); - test_assert_int_equal( STATE_PARENT_FAILURE , state_map_iget( map , 3 ) ); - - state_map_update_undefined( map , 10 , STATE_INITIALIZED ); - test_assert_int_equal( STATE_INITIALIZED , state_map_iget( map , 10 ) ); - - state_map_free( map ); -} - - -void test_select_matching( ) { - state_map_type * map = state_map_alloc( ); - bool_vector_type * mask1 = bool_vector_alloc(21 , false); - bool_vector_type * mask2 = bool_vector_alloc(1000 , true); - - state_map_iset( map , 10 , STATE_INITIALIZED ); - state_map_iset( map , 10 , STATE_HAS_DATA ); - state_map_iset( map , 20 , STATE_INITIALIZED ); - state_map_select_matching( map , mask1 , STATE_HAS_DATA | STATE_INITIALIZED ); - state_map_select_matching( map , mask2 , STATE_HAS_DATA | STATE_INITIALIZED ); - - for (int i=0; i < bool_vector_size( mask1 ); i++) { - if (i==10) - test_assert_true( bool_vector_iget( mask1 , i )); - else if (i== 20) - test_assert_true( bool_vector_iget( mask1 , i )); - else { - test_assert_false( bool_vector_iget( mask1 , i )); - test_assert_true( bool_vector_iget( mask2 , i )); - } - } - - state_map_iset( map , 50 , STATE_INITIALIZED ); - state_map_select_matching( map , mask1 , STATE_HAS_DATA | STATE_INITIALIZED ); - test_assert_int_equal(bool_vector_size( mask1 ), 21); - - bool_vector_free( mask1 ); - bool_vector_free( mask2 ); - state_map_free( map ); -} - - -void test_deselect_matching( ) { - state_map_type * map = state_map_alloc( ); - bool_vector_type * mask1 = bool_vector_alloc(0 , false); - bool_vector_type * mask2 = bool_vector_alloc(1000 , true); - - state_map_iset( map , 10 , STATE_INITIALIZED ); - state_map_iset( map , 10 , STATE_HAS_DATA ); - state_map_iset( map , 20 , STATE_INITIALIZED ); - state_map_deselect_matching( map , mask1 , STATE_HAS_DATA | STATE_INITIALIZED ); - state_map_deselect_matching( map , mask2 , STATE_HAS_DATA | STATE_INITIALIZED ); - - test_assert_int_equal( state_map_get_size( map ) , bool_vector_size( mask1 )); - - for (int i=0; i < bool_vector_size( mask1 ); i++) { - if (i==10) - test_assert_false( bool_vector_iget( mask1 , i )); - else if (i== 20) - test_assert_false( bool_vector_iget( mask2 , i )); - else { - test_assert_false( bool_vector_iget( mask1 , i )); - test_assert_true( bool_vector_iget( mask2 , i )); - } - } - - bool_vector_free( mask1 ); - bool_vector_free( mask2 ); - state_map_free( map ); -} - - -void test_set_from_mask() { - int i; - state_map_type * map1 = state_map_alloc(); - state_map_type * map2 = state_map_alloc(); - bool_vector_type * mask = bool_vector_alloc(0, false); - bool_vector_iset(mask , 10 , true); - bool_vector_iset(mask , 20 , true); - - state_map_set_from_mask(map1 , mask , STATE_INITIALIZED); - state_map_set_from_inverted_mask(map2 , mask , STATE_INITIALIZED); - test_assert_int_equal(21 , state_map_get_size(map1)); - test_assert_int_equal(21 , state_map_get_size(map2)); - for (i = 0; i < state_map_get_size(map1); i++) { - if (i == 10 || i== 20) { - test_assert_int_equal( STATE_INITIALIZED , state_map_iget( map1 , i) ); - test_assert_int_equal( STATE_UNDEFINED , state_map_iget(map2 , i)); - } - else { - test_assert_int_equal(STATE_UNDEFINED , state_map_iget(map1 , i )); - test_assert_int_equal( STATE_INITIALIZED , state_map_iget(map2 , i)); - } - - - } -} - - -void test_count_matching() { - state_map_type * map1 = state_map_alloc(); - state_map_iset(map1 , 10 , STATE_INITIALIZED ); - - state_map_iset(map1 , 15 , STATE_INITIALIZED ); - state_map_iset(map1 , 15 , STATE_HAS_DATA ); - - state_map_iset(map1 , 16 , STATE_INITIALIZED ); - state_map_iset(map1 , 16 , STATE_HAS_DATA ); - state_map_iset(map1 , 16 , STATE_LOAD_FAILURE ); - - test_assert_int_equal( 1 , state_map_count_matching( map1 , STATE_HAS_DATA)); - test_assert_int_equal( 2 , state_map_count_matching( map1 , STATE_HAS_DATA | STATE_LOAD_FAILURE)); - test_assert_int_equal( 3 , state_map_count_matching( map1 , STATE_HAS_DATA | STATE_LOAD_FAILURE | STATE_INITIALIZED)); - - state_map_free( map1 ); -} - -// Probably means that the target should be explicitly set to -// undefined before workflows which automatically change case. -void test_transitions() { - - test_assert_false( state_map_legal_transition(STATE_UNDEFINED , STATE_UNDEFINED )); - test_assert_true( state_map_legal_transition(STATE_UNDEFINED , STATE_INITIALIZED )); - test_assert_false( state_map_legal_transition(STATE_UNDEFINED , STATE_HAS_DATA )); - test_assert_false( state_map_legal_transition(STATE_UNDEFINED , STATE_LOAD_FAILURE )); - test_assert_true( state_map_legal_transition(STATE_UNDEFINED , STATE_PARENT_FAILURE )); - - test_assert_false( state_map_legal_transition(STATE_INITIALIZED , STATE_UNDEFINED )); - test_assert_true( state_map_legal_transition(STATE_INITIALIZED , STATE_INITIALIZED )); - test_assert_true( state_map_legal_transition(STATE_INITIALIZED , STATE_HAS_DATA )); - test_assert_true( state_map_legal_transition(STATE_INITIALIZED , STATE_LOAD_FAILURE )); - test_assert_true( state_map_legal_transition(STATE_INITIALIZED , STATE_PARENT_FAILURE )); // Should maybe false - if the commenta baove is taken into account. - - test_assert_false( state_map_legal_transition(STATE_HAS_DATA , STATE_UNDEFINED )); - test_assert_true( state_map_legal_transition(STATE_HAS_DATA , STATE_INITIALIZED )); - test_assert_true( state_map_legal_transition(STATE_HAS_DATA , STATE_HAS_DATA )); - test_assert_true( state_map_legal_transition(STATE_HAS_DATA , STATE_LOAD_FAILURE )); - test_assert_true( state_map_legal_transition(STATE_HAS_DATA , STATE_PARENT_FAILURE )); // Rerun - - test_assert_false( state_map_legal_transition(STATE_LOAD_FAILURE , STATE_UNDEFINED )); - test_assert_true( state_map_legal_transition(STATE_LOAD_FAILURE , STATE_INITIALIZED )); - test_assert_true( state_map_legal_transition(STATE_LOAD_FAILURE , STATE_HAS_DATA )); - test_assert_true( state_map_legal_transition(STATE_LOAD_FAILURE , STATE_LOAD_FAILURE )); - test_assert_false( state_map_legal_transition(STATE_LOAD_FAILURE , STATE_PARENT_FAILURE )); - - test_assert_false( state_map_legal_transition(STATE_PARENT_FAILURE , STATE_UNDEFINED )); - test_assert_true( state_map_legal_transition(STATE_PARENT_FAILURE , STATE_INITIALIZED )); - test_assert_false( state_map_legal_transition(STATE_PARENT_FAILURE , STATE_HAS_DATA )); - test_assert_false( state_map_legal_transition(STATE_PARENT_FAILURE , STATE_LOAD_FAILURE )); - test_assert_true( state_map_legal_transition(STATE_PARENT_FAILURE , STATE_PARENT_FAILURE )); -} - - - -void test_readonly() { - { - state_map_type * map1 = state_map_fread_alloc_readonly("FileDoesNotExist"); - - test_assert_true(state_map_is_instance(map1)); - test_assert_int_equal(0 , state_map_get_size( map1 )); - test_assert_true( state_map_is_readonly( map1 )); - state_map_free(map1); - } - { - test_work_area_type * work_area = test_work_area_alloc("state-map"); - state_map_type * map1 = state_map_alloc(); - - state_map_iset(map1 , 5 , STATE_INITIALIZED); - state_map_iset(map1 , 9 , STATE_INITIALIZED); - - state_map_fwrite(map1 , "map1"); - { - state_map_type * map2 = state_map_fread_alloc_readonly("map1"); - - test_assert_true(state_map_equal(map1 , map2)); - state_map_free(map2); - } - test_work_area_free( work_area ); - state_map_free(map1); - } -} - - -int main(int argc , char ** argv) { - create_test(); - get_test(); - set_test(); - load_empty_test(); - test_equal(); - test_copy(); - test_io(); - test_update_undefined( ); - test_select_matching(); - test_count_matching(); - test_transitions(); - test_readonly(); - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_state_report_step_compatible.c b/ThirdParty/Ert/libenkf/tests/enkf_state_report_step_compatible.c deleted file mode 100644 index 038fde60b0..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_state_report_step_compatible.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_state_report_step_compatible.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - - -bool check_ecl_sum_compatible(const enkf_main_type * enkf_main) -{ - stringlist_type * msg_list = stringlist_alloc_new(); - enkf_state_type * state = enkf_main_iget_state( enkf_main , 0 ); - enkf_fs_type * fs = enkf_main_get_fs( enkf_main ); - run_arg_type * run_arg = run_arg_alloc_ENSEMBLE_EXPERIMENT(fs , 0 , 0 , "simulations/run0"); - - state_map_type * state_map = enkf_fs_get_state_map(fs); - state_map_iset(state_map, 0, STATE_INITIALIZED); - - int error = enkf_state_load_from_forward_model( state , run_arg , msg_list ); - - - stringlist_free( msg_list ); - return (REPORT_STEP_INCOMPATIBLE & error) ? false : true; -} - - - -int main(int argc , char ** argv) { - enkf_main_install_SIGNALS(); - const char * root_path = argv[1]; - const char * config_file = argv[2]; - const char * compatible_str = argv[3]; - bool check_compatible; - - test_assert_true( util_sscanf_bool( compatible_str , &check_compatible)); - - test_work_area_type * work_area = test_work_area_alloc(config_file ); - test_work_area_copy_directory_content( work_area , root_path ); - - bool strict = true; - enkf_main_type * enkf_main = enkf_main_bootstrap( config_file , strict , true ); - - - test_assert_bool_equal(check_compatible , check_ecl_sum_compatible(enkf_main)); - - enkf_main_free( enkf_main ); - test_work_area_free(work_area); -} diff --git a/ThirdParty/Ert/libenkf/tests/enkf_state_skip_summary_load_test.c b/ThirdParty/Ert/libenkf/tests/enkf_state_skip_summary_load_test.c deleted file mode 100644 index 09a19290fa..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_state_skip_summary_load_test.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_state_no_summary_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - - -bool check_ecl_sum_loaded(const enkf_main_type * enkf_main) -{ - enkf_fs_type * fs = enkf_main_get_fs( enkf_main ); - stringlist_type * msg_list = stringlist_alloc_new(); - enkf_state_type * state1 = enkf_main_iget_state( enkf_main , 0 ); - run_arg_type * run_arg1 = run_arg_alloc_ENSEMBLE_EXPERIMENT( fs , 0 , 0 , "simulations/run0"); - enkf_state_type * state2 = enkf_main_iget_state( enkf_main , 1 ); - run_arg_type * run_arg2 = run_arg_alloc_ENSEMBLE_EXPERIMENT( fs , 0 , 0 , "simulations/run1"); - - - state_map_type * state_map = enkf_fs_get_state_map(fs); - state_map_iset(state_map, 0, STATE_INITIALIZED); - - int error = enkf_state_load_from_forward_model( state1 , run_arg1 , msg_list ); - - - state_map_iset(state_map, 1, STATE_INITIALIZED); - error = enkf_state_load_from_forward_model( state2 , run_arg2 , msg_list ); - - stringlist_free( msg_list ); - return (0 == error); -} - - - -int main(int argc , char ** argv) { - enkf_main_install_SIGNALS(); - const char * root_path = argv[1]; - const char * config_file = argv[2]; - - test_work_area_type * work_area = test_work_area_alloc(config_file ); - test_work_area_copy_directory_content( work_area , root_path ); - - bool strict = true; - enkf_main_type * enkf_main = enkf_main_bootstrap( config_file , strict , true ); - - test_assert_true( check_ecl_sum_loaded(enkf_main) ); - - enkf_main_free( enkf_main ); - test_work_area_free(work_area); -} diff --git a/ThirdParty/Ert/libenkf/tests/enkf_time_map.c b/ThirdParty/Ert/libenkf/tests/enkf_time_map.c deleted file mode 100644 index 04daccbceb..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_time_map.c +++ /dev/null @@ -1,398 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_time_map.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include "ert/util/build_config.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include - -void ecl_test( const char * ecl_case ) { - ecl_sum_type * ecl_sum = ecl_sum_fread_alloc_case( ecl_case , ":"); - time_t start_time = ecl_sum_get_start_time( ecl_sum ); - time_t end_time = ecl_sum_get_end_time( ecl_sum ); - time_map_type * ecl_map = time_map_alloc( ); - - test_assert_true( time_map_summary_update( ecl_map , ecl_sum ) ); - test_assert_true( time_map_summary_update( ecl_map , ecl_sum ) ); - - test_assert_time_t_equal( time_map_get_start_time( ecl_map ) , start_time ); - test_assert_time_t_equal( time_map_get_end_time( ecl_map ) , end_time ); - test_assert_double_equal( time_map_get_end_days( ecl_map ) , ecl_sum_get_sim_length( ecl_sum )); - - time_map_clear( ecl_map ); - time_map_update( ecl_map , 1 , 256 ); - time_map_set_strict( ecl_map , false ); - test_assert_false( time_map_summary_update( ecl_map , ecl_sum )); - - time_map_free( ecl_map ); - ecl_sum_free( ecl_sum ); -} - - -static void map_update( void * arg ) { - vector_type * arg_vector = vector_safe_cast( arg ); - time_map_type * tmap = vector_iget( arg_vector , 0 ); - ecl_sum_type * sum = vector_iget( arg_vector , 1 ); - - time_map_summary_update( tmap , sum ); -} - - - -void test_inconsistent_summary( const char * case1, const char * case2) { - ecl_sum_type * ecl_sum1 = ecl_sum_fread_alloc_case( case1 , ":"); - ecl_sum_type * ecl_sum2 = ecl_sum_fread_alloc_case( case2 , ":"); - - time_map_type * ecl_map = time_map_alloc( ); - - test_assert_true( time_map_summary_update( ecl_map , ecl_sum1 ) ); - { - vector_type * arg = vector_alloc_new(); - vector_append_ref( arg , ecl_map ); - vector_append_ref( arg , ecl_sum2 ); - test_assert_util_abort("time_map_summary_update_abort" , map_update , arg); - vector_free( arg ); - } - - time_map_free( ecl_map ); - ecl_sum_free( ecl_sum1 ); - ecl_sum_free( ecl_sum2 ); -} - -static void alloc_index_map( void * arg) { - arg_pack_type * arg_pack = arg_pack_safe_cast( arg ); - time_map_type * map = arg_pack_iget_ptr( arg_pack , 0 ); - ecl_sum_type * sum = arg_pack_iget_ptr( arg_pack , 1 ); - - time_map_alloc_index_map( map , sum ); -} - - - -void test_refcase( const char * refcase_name , const char * case1, const char * case2 , const char * case3 , const char * case4) { - ecl_sum_type * refcase = ecl_sum_fread_alloc_case( refcase_name , ":"); - ecl_sum_type * ecl_sum1 = ecl_sum_fread_alloc_case( case1 , ":"); - ecl_sum_type * ecl_sum2 = ecl_sum_fread_alloc_case( case2 , ":"); - ecl_sum_type * ecl_sum3 = ecl_sum_fread_alloc_case( case3 , ":"); - ecl_sum_type * ecl_sum4 = ecl_sum_fread_alloc_case( case4 , ":"); - - { - time_map_type * ecl_map = time_map_alloc( ); - test_assert_false( time_map_has_refcase( ecl_map )); - test_assert_true( time_map_attach_refcase( ecl_map , refcase ) ); - test_assert_true( time_map_has_refcase( ecl_map )); - time_map_free( ecl_map ); - } - - - { - time_map_type * ecl_map = time_map_alloc( ); - time_map_attach_refcase( ecl_map , refcase ); - test_assert_true( time_map_summary_update( ecl_map , ecl_sum1 ) ); - } - - { - time_map_type * ecl_map = time_map_alloc( ); - - time_map_set_strict( ecl_map , false ); - time_map_attach_refcase( ecl_map , refcase ); - - test_assert_false( time_map_summary_update( ecl_map , ecl_sum2 ) ); - test_assert_int_equal( 25 , time_map_get_size( ecl_map )); - test_assert_true( time_map_summary_update( ecl_map , ecl_sum1 ) ); - test_assert_int_equal( 63 , time_map_get_size( ecl_map )); - } - - { - time_map_type * ecl_map = time_map_alloc( ); - test_assert_true( time_map_summary_update( ecl_map , ecl_sum2 ) ); - test_assert_false( time_map_attach_refcase( ecl_map , refcase )); - } - - - { - test_work_area_type * work_area = test_work_area_alloc( "time_map/attach_short_refcase"); - { - time_map_type * ecl_map = time_map_alloc( ); - test_assert_true( time_map_summary_update( ecl_map , refcase ) ); - test_assert_true( time_map_update( ecl_map , ecl_sum_get_last_report_step( refcase ) + 1 , ecl_sum_get_end_time( refcase ) + 100 )); - test_assert_true( time_map_update( ecl_map , ecl_sum_get_last_report_step( refcase ) + 2 , ecl_sum_get_end_time( refcase ) + 200 )); - test_assert_true( time_map_update( ecl_map , ecl_sum_get_last_report_step( refcase ) + 3 , ecl_sum_get_end_time( refcase ) + 300 )); - time_map_fwrite( ecl_map , "time_map"); - time_map_free( ecl_map ); - } - { - time_map_type * ecl_map = time_map_alloc( ); - time_map_fread(ecl_map , "time_map"); - test_assert_true( time_map_attach_refcase( ecl_map , refcase ) ); - time_map_free( ecl_map ); - } - test_work_area_free( work_area ); - } - - - - ecl_sum_free( refcase ); - ecl_sum_free( ecl_sum1 ); - ecl_sum_free( ecl_sum2 ); - ecl_sum_free( ecl_sum3 ); - ecl_sum_free( ecl_sum4 ); -} - - -void test_index_map( const char * case1, const char * case2 , const char * case3 , const char * case4) { - ecl_sum_type * ecl_sum1 = ecl_sum_fread_alloc_case( case1 , ":"); - ecl_sum_type * ecl_sum2 = ecl_sum_fread_alloc_case( case2 , ":"); - ecl_sum_type * ecl_sum3 = ecl_sum_fread_alloc_case( case3 , ":"); - ecl_sum_type * ecl_sum4 = ecl_sum_fread_alloc_case( case4 , ":"); - - time_map_type * ecl_map = time_map_alloc( ); - - { - int_vector_type * index_map = time_map_alloc_index_map( ecl_map , ecl_sum1 ); - test_assert_int_equal( int_vector_size( index_map ) , 0); - int_vector_free( index_map ); - } - - test_assert_true( time_map_summary_update( ecl_map , ecl_sum1 ) ); - { - int_vector_type * index_map = time_map_alloc_index_map( ecl_map , ecl_sum1 ); - int i; - for (i=0; i < int_vector_size( index_map ); i++) - test_assert_int_equal( i , int_vector_iget( index_map , i )); - - test_assert_int_equal( int_vector_size( index_map ) , ecl_sum_get_last_report_step( ecl_sum1) + 1); - int_vector_free( index_map ); - } - - /* case2 has an extra tstep in the middle of the case. */ - time_map_set_strict( ecl_map , false ); - test_assert_false( time_map_summary_update( ecl_map , ecl_sum2 ) ); - { - int_vector_type * index_map = time_map_alloc_index_map( ecl_map , ecl_sum2 ); - test_assert_int_equal( int_vector_size( index_map ) , ecl_sum_get_last_report_step( ecl_sum2)); - test_assert_int_equal( int_vector_iget( index_map , 24) , 24); - test_assert_int_equal( int_vector_iget( index_map , 25) , 26); - int_vector_free( index_map ); - } - - - /* case3 has an extra tstep in the middle, and ends prematurely */ - test_assert_false( time_map_summary_update( ecl_map , ecl_sum3 ) ); - { - int_vector_type * index_map = time_map_alloc_index_map( ecl_map , ecl_sum3 ); - test_assert_int_equal( int_vector_size( index_map ) , ecl_sum_get_last_report_step( ecl_sum3)); - int_vector_free( index_map ); - } - - - /* case4 has a missing tstep in the middle - that is not handled; and we abort */ - test_assert_false( time_map_summary_update( ecl_map , ecl_sum4 ) ); - { - arg_pack_type * arg = arg_pack_alloc(); - arg_pack_append_ptr( arg , ecl_map ); - arg_pack_append_ptr( arg , ecl_sum4 ); - - test_assert_util_abort( "time_map_alloc_index_map" , alloc_index_map , arg); - arg_pack_free( arg ); - } - - - - time_map_free( ecl_map ); - ecl_sum_free( ecl_sum1 ); - ecl_sum_free( ecl_sum2 ); - ecl_sum_free( ecl_sum3 ); - ecl_sum_free( ecl_sum4 ); -} - - -void simple_test() { - time_map_type * time_map = time_map_alloc( ); - test_work_area_type * work_area = test_work_area_alloc("enkf_time_map" ); - const char * mapfile = "map"; - - time_map_set_strict( time_map , false ); - test_assert_true( time_map_update( time_map , 0 , 100 ) ); - test_assert_true( time_map_update( time_map , 1 , 200 ) ); - test_assert_true( time_map_update( time_map , 1 , 200 ) ); - test_assert_false( time_map_update( time_map , 1 , 250 ) ); - - test_assert_true( time_map_equal( time_map , time_map ) ); - time_map_fwrite( time_map , mapfile); - { - time_map_type * time_map2 = time_map_alloc( ); - - test_assert_false( time_map_equal( time_map , time_map2 ) ); - time_map_fread( time_map2 , mapfile ); - test_assert_true( time_map_equal( time_map , time_map2 ) ); - time_map_free( time_map2 ); - } - { - time_t mtime1 = util_file_mtime( mapfile ); - sleep(2); - time_map_fwrite( time_map , mapfile); - - test_assert_time_t_equal( mtime1 , util_file_mtime( mapfile ) ); - time_map_update( time_map , 2 , 300 ); - time_map_fwrite( time_map , mapfile); - test_assert_time_t_not_equal( mtime1 , util_file_mtime( mapfile ) ); - } - test_work_area_free( work_area ); -} - - -static void simple_update(void * arg) { - time_map_type * tmap = time_map_safe_cast( arg ); - - time_map_update( tmap , 0 , 101 ); -} - - - -void simple_test_inconsistent() { - time_map_type * time_map = time_map_alloc( ); - - test_assert_true( time_map_update( time_map , 0 , 100 ) ); - time_map_set_strict( time_map , false ); - test_assert_false( time_map_update( time_map , 0 , 101 ) ); - - time_map_set_strict( time_map , true ); - test_assert_util_abort( "time_map_update_abort" , simple_update , time_map ); - - time_map_free( time_map ); -} - - - -#define MAP_SIZE 10000 - -void * update_time_map( void * arg ) { - time_map_type * time_map = time_map_safe_cast( arg ); - int i; - for (i=0; i < MAP_SIZE; i++) - time_map_update( time_map , i , i ); - - test_assert_int_equal( MAP_SIZE , time_map_get_size( time_map )); - return NULL; -} - - -void thread_test() { - time_map_type * time_map = time_map_alloc( ); - test_assert_false( time_map_is_readonly( time_map )); - { - int pool_size = 1000; - thread_pool_type * tp = thread_pool_alloc( pool_size/2 , true ); - - thread_pool_add_job( tp , update_time_map , time_map ); - - thread_pool_join(tp); - thread_pool_free(tp); - } - { - int i; - for (i=0; i < MAP_SIZE; i++) - test_assert_true( time_map_iget( time_map , i ) == i ); - } - time_map_free( time_map ); -} - - - -void test_read_only() { - test_work_area_type * work_area = test_work_area_alloc("time-map"); - { - time_map_type * tm = time_map_alloc( ); - - test_assert_true( time_map_is_instance( tm )); - test_assert_true( time_map_is_strict( tm )); - test_assert_false( time_map_is_readonly( tm )); - - time_map_update( tm , 0 , 0 ); - time_map_update( tm , 1 , 10 ); - time_map_update( tm , 2 , 20 ); - - time_map_fwrite( tm , "case/files/time-map" ); - time_map_free( tm ); - } - { - time_map_type * tm = time_map_fread_alloc_readonly( "case/files/time-map"); - test_assert_time_t_equal( 0 , time_map_iget( tm , 0 )); - test_assert_time_t_equal( 10 , time_map_iget( tm , 1 )); - test_assert_time_t_equal( 20 , time_map_iget( tm , 2 )); - test_assert_int_equal( 3 , time_map_get_size( tm )); - time_map_free( tm ); - } - { - time_map_type * tm = enkf_fs_alloc_readonly_time_map( "case" ); - test_assert_time_t_equal( 0 , time_map_iget( tm , 0 )); - test_assert_time_t_equal( 10 , time_map_iget( tm , 1 )); - test_assert_time_t_equal( 20 , time_map_iget( tm , 2 )); - test_assert_int_equal( 3 , time_map_get_size( tm )); - time_map_free( tm ); - } - { - time_map_type * tm = time_map_fread_alloc_readonly( "DoesNotExist"); - test_assert_true( time_map_is_instance( tm )); - test_assert_true( time_map_is_readonly( tm )); - test_assert_int_equal(0 , time_map_get_size( tm )); - time_map_free( tm ); - } - test_work_area_free( work_area ); -} - - -int main(int argc , char ** argv) { - - enkf_main_install_SIGNALS(); - ert_log_init_log(0 , NULL , false ); // Make sure there will be no logging. - - if (argc == 1) { - simple_test(); - simple_test_inconsistent(); - thread_test(); - } else { - ecl_test( argv[1] ); - test_inconsistent_summary( argv[1] , argv[2]); - test_index_map(argv[1] , argv[2] , argv[3] , argv[4]); - test_refcase( argv[1] , argv[1] , argv[2] , argv[3] , argv[4]); - } - - test_read_only(); - - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/enkf_umask_config_test.c b/ThirdParty/Ert/libenkf/tests/enkf_umask_config_test.c deleted file mode 100644 index afa61e0833..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_umask_config_test.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - Copyright (C) 2016 Statoil ASA, Norway. - - This file is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - - - -int main(int argc , char ** argv) { - enkf_main_install_SIGNALS(); - - const char * config_file = argv[1]; - ert_test_context_type * test_context = ert_test_context_alloc("VerifyJobsFileTest" , config_file); - enkf_main_type * enkf_main = ert_test_context_get_main(test_context); - - { - const int ens_size = enkf_main_get_ensemble_size( enkf_main ); - bool_vector_type * iactive = bool_vector_alloc(0, false); - bool_vector_iset( iactive , ens_size - 1 , true ); - - enkf_main_create_run_path(enkf_main , iactive , 0); - bool_vector_free(iactive); - } - - const char * filename = util_alloc_filename(ert_test_context_get_cwd(test_context), - "simulations/run0/jobs.py", NULL); - const char * jobs_file_content = util_fread_alloc_file_content(filename, NULL); - - test_assert_true (strstr(jobs_file_content, "umask = 0022") != NULL); - test_assert_false (strstr(jobs_file_content, "umask = 0023") != NULL); - test_assert_false (strstr(jobs_file_content, "umask = 0032") != NULL); - test_assert_false (strstr(jobs_file_content, "umask = 0122") != NULL); - test_assert_false (strstr(jobs_file_content, "umask = 1022") != NULL); - - ert_test_context_free(test_context); - exit(0); -} diff --git a/ThirdParty/Ert/libenkf/tests/enkf_workflow_job_test.c b/ThirdParty/Ert/libenkf/tests/enkf_workflow_job_test.c deleted file mode 100644 index d924dc0440..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_workflow_job_test.c +++ /dev/null @@ -1,494 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_workflow_job_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include - - -ert_test_context_type * create_context( const char * config_file, const char * name ) { - ert_test_context_type * test_context = ert_test_context_alloc(name , config_file); - test_assert_not_NULL(test_context); - return test_context; -} - -void test_create_case_job(ert_test_context_type * test_context, const char * job_name , const char * job_file) { - stringlist_type * args = stringlist_alloc_new(); - stringlist_append_copy( args , "newly_created_case"); - test_assert_true( ert_test_context_install_workflow_job( test_context , job_name , job_file )); - test_assert_true( ert_test_context_run_worklow_job( test_context , job_name , args) ); - - char * new_case = util_alloc_filename( "storage" , "newly_created_case" , NULL); - test_assert_true(util_is_directory(new_case)); - free(new_case); - - stringlist_free( args ); -} - - -void test_init_case_job(ert_test_context_type * test_context, const char * job_name , const char * job_file) { - stringlist_type * args = stringlist_alloc_new(); - enkf_main_type * enkf_main = ert_test_context_get_main(test_context); - - test_assert_true( ert_test_context_install_workflow_job( test_context , "JOB" , job_file ) ); - - //Test init current case from existing - { - enkf_fs_type * cur_fs = enkf_main_mount_alt_fs( enkf_main , "new_current_case" , true ); - enkf_main_select_fs(enkf_main, "new_current_case"); - - test_assert_ptr_not_equal(cur_fs , enkf_main_get_fs( enkf_main )); - - stringlist_append_copy( args, "default"); //case to init from - test_assert_true( ert_test_context_run_worklow_job( test_context , "JOB" , args) ); - - enkf_fs_decref(cur_fs); - } - - { - const char * current_case = enkf_main_get_current_fs( enkf_main ); - test_assert_string_equal(current_case, "new_current_case"); - test_assert_true(enkf_fs_has_node(enkf_main_get_fs(enkf_main), "PERMZ", PARAMETER, 0, 0)); // This had state = ANALYZED; might be unfixable. - - enkf_fs_type * default_fs = enkf_main_mount_alt_fs( enkf_main , "default" , true ); - state_map_type * default_state_map = enkf_fs_get_state_map(default_fs); - state_map_type * current_state_map = enkf_fs_get_state_map(enkf_main_get_fs(enkf_main)); - test_assert_int_equal(state_map_get_size(default_state_map), state_map_get_size(current_state_map)); - enkf_fs_decref(default_fs); - } - - - //Test init case from existing case: - stringlist_clear(args); - stringlist_append_copy(args, "default"); //case to init from - stringlist_append_copy(args, "new_not_current_case"); - test_assert_true( ert_test_context_run_worklow_job( test_context , "JOB" , args) ); - { - enkf_fs_type * fs = enkf_main_mount_alt_fs(enkf_main, "new_not_current_case", true); - test_assert_not_NULL( fs ); - test_assert_true( enkf_fs_has_node(fs, "PERMZ", PARAMETER, 0, 0)); // This had state = ANALYZED; might be unfixable. - - enkf_fs_type * default_fs = enkf_main_mount_alt_fs( enkf_main , "default" , true ); - state_map_type * default_state_map = enkf_fs_get_state_map(default_fs); - state_map_type * new_state_map = enkf_fs_get_state_map(fs); - test_assert_int_equal(state_map_get_size(default_state_map), state_map_get_size(new_state_map)); - enkf_fs_decref(fs); - } - - stringlist_free( args ); -} - - -void test_load_results_job(ert_test_context_type * test_context , const char * job_name , const char * job_file) { - stringlist_type * args = stringlist_alloc_new(); - ert_test_context_install_workflow_job( test_context , job_name , job_file ); - stringlist_append_copy( args , "0"); - stringlist_append_copy( args , ","); - stringlist_append_copy( args , "1"); - test_assert_true( ert_test_context_run_worklow_job( test_context , job_name , args) ); - stringlist_free( args ); -} - - -void test_load_results_iter_job(ert_test_context_type * test_context , const char * job_name , const char * job_file) { - - stringlist_type * args = stringlist_alloc_new(); - ert_test_context_install_workflow_job( test_context , job_name , job_file ); - stringlist_append_copy( args , "0"); - stringlist_append_copy( args , "0"); - stringlist_append_copy( args , ","); - stringlist_append_copy( args , "1"); - test_assert_true( ert_test_context_run_worklow_job( test_context , job_name , args) ); - stringlist_free( args ); -} - - -void test_rank_realizations_on_observations_job(ert_test_context_type * test_context , const char * job_name , const char * job_file) { - stringlist_type * args = stringlist_alloc_new(); - ert_test_context_install_workflow_job( test_context , job_name , job_file ); - - stringlist_append_copy( args , "NameOfObsRanking1"); - stringlist_append_copy( args , "|"); - stringlist_append_copy( args , "WOPR:*"); - test_assert_true( ert_test_context_run_worklow_job( test_context , job_name , args) ); - - stringlist_clear(args); - stringlist_append_copy( args , "NameOfObsRanking2"); - stringlist_append_copy( args, "1-5"); - stringlist_append_copy( args, "55"); - stringlist_append_copy( args , "|"); - stringlist_append_copy( args , "WWCT:*"); - stringlist_append_copy( args , "WOPR:*"); - test_assert_true( ert_test_context_run_worklow_job( test_context , job_name , args) ); - - stringlist_clear(args); - stringlist_append_copy( args , "NameOfObsRanking3"); - stringlist_append_copy( args, "5"); - stringlist_append_copy( args, "55"); - stringlist_append_copy( args, "|"); - test_assert_true( ert_test_context_run_worklow_job( test_context , job_name , args) ); - - stringlist_clear(args); - stringlist_append_copy( args , "NameOfObsRanking4"); - stringlist_append_copy( args, "1,3,5-10"); - stringlist_append_copy( args, "55"); - test_assert_true( ert_test_context_run_worklow_job( test_context , job_name , args) ); - - stringlist_clear(args); - stringlist_append_copy( args , "NameOfObsRanking5"); - test_assert_true( ert_test_context_run_worklow_job( test_context , job_name , args) ); - - stringlist_clear(args); - stringlist_append_copy( args , "NameOfObsRanking6"); - stringlist_append_copy( args, "|"); - stringlist_append_copy( args , "UnrecognizableObservation"); - test_assert_true( ert_test_context_run_worklow_job( test_context , job_name , args) ); - - stringlist_free( args ); -} - - -void test_rank_realizations_on_data_job(ert_test_context_type * test_context , const char * job_name , const char * job_file) { - stringlist_type * args = stringlist_alloc_new(); - ert_test_context_install_workflow_job( test_context , job_name , job_file ); - - stringlist_append_copy( args , "NameOfDataRanking"); - stringlist_append_copy( args , "PORO:1,2,3"); - stringlist_append_copy( args , "false"); - stringlist_append_copy( args , "0"); - test_assert_true( ert_test_context_run_worklow_job( test_context , job_name , args) ); - - stringlist_clear(args); - stringlist_append_copy( args , "NameOfDataRanking2"); - stringlist_append_copy( args , "PORO:1,2,3"); - stringlist_append_copy( args , "false"); - test_assert_true( ert_test_context_run_worklow_job( test_context , job_name , args) ); - - stringlist_free( args ); -} - -void test_export_ranking(ert_test_context_type * test_context , const char * job_name , const char * job_file) { - stringlist_type * args = stringlist_alloc_new(); - ert_test_context_install_workflow_job( test_context , job_name , job_file ); - - stringlist_append_copy( args , "NameOfDataRanking"); - stringlist_append_copy( args , "/tmp/fileToSaveDataRankingIn.txt"); - test_assert_true( ert_test_context_run_worklow_job( test_context , job_name , args) ); - - stringlist_clear(args); - stringlist_append_copy( args , "NameOfObsRanking1"); - stringlist_append_copy( args , "/tmp/fileToSaveObservationRankingIn1.txt"); - test_assert_true( ert_test_context_run_worklow_job( test_context , job_name , args) ); - - stringlist_clear(args); - stringlist_append_copy( args , "NameOfObsRanking6"); - stringlist_append_copy( args , "/tmp/fileToSaveObservationRankingIn6.txt"); - test_assert_true( ert_test_context_run_worklow_job( test_context , job_name , args) ); - - stringlist_free( args ); -} - - -void test_init_misfit_table(ert_test_context_type * test_context , const char * job_name , const char * job_file) { - stringlist_type * args = stringlist_alloc_new(); - ert_test_context_install_workflow_job( test_context , job_name , job_file ); - - enkf_main_type * enkf_main = ert_test_context_get_main(test_context); - enkf_fs_type * fs = enkf_main_get_fs(enkf_main); - - misfit_ensemble_type * misfit_ensemble = enkf_fs_get_misfit_ensemble( fs ); - test_assert_false(misfit_ensemble_initialized(misfit_ensemble)); - - test_assert_true( ert_test_context_run_worklow_job( test_context , job_name , args) ); - - test_assert_true(misfit_ensemble_initialized(misfit_ensemble)); - - stringlist_free( args ); -} - - - - -static void test_export_runpath_file(ert_test_context_type * test_context, - const char * job_name, - const char * job_file, - stringlist_type * args, - int_vector_type * iens_values, - int_vector_type * iter_values) { - - ert_test_context_install_workflow_job( test_context , job_name , job_file ); - test_assert_true( ert_test_context_run_worklow_job( test_context , job_name , args) ); - - { - const enkf_main_type * enkf_main = ert_test_context_get_main(test_context); - hook_manager_type * hook_manager = enkf_main_get_hook_manager( enkf_main ); - const char * runpath_file_name = hook_manager_get_runpath_list_file(hook_manager); - - ecl_config_type * ecl_config = enkf_main_get_ecl_config(enkf_main); - const model_config_type * model_config = enkf_main_get_model_config(enkf_main); - const char * base_fmt = ecl_config_get_eclbase(ecl_config); - const char * runpath_fmt = model_config_get_runpath_as_char(model_config); - - test_assert_true(util_file_exists(runpath_file_name)); - FILE * file = util_fopen(runpath_file_name, "r"); - - int file_iens = 0; - char file_path[256]; - char file_base[256]; - int file_iter = 0; - char * cwd = util_alloc_cwd(); - int counter = 0; - int iens_index = 0; - int iter_index = 0; - - while (4 == fscanf( file , "%d %s %s %d" , &file_iens , file_path , file_base, &file_iter)) { - ++ counter; - - test_assert_true(int_vector_size(iens_values) >= iens_index+1); - test_assert_true(int_vector_size(iter_values) >= iter_index+1); - - int iens = int_vector_iget(iens_values, iens_index); - int iter = int_vector_iget(iter_values, iter_index); - - test_assert_int_equal(file_iens, iens); - test_assert_int_equal(file_iter, iter); - - char * base = util_alloc_sprintf("--%d", iens); - if (base_fmt && (util_int_format_count(base_fmt) == 1)) - base = util_alloc_sprintf(base_fmt, iens); - - test_assert_string_equal(base, file_base); - - char * runpath = ""; - if (util_int_format_count(runpath_fmt) == 1) - runpath = util_alloc_sprintf(runpath_fmt, iens); - else if (util_int_format_count(runpath_fmt) == 2) - runpath = util_alloc_sprintf(runpath_fmt, iens,iter); - - test_assert_string_equal(runpath, file_path); - - if (iens_index+1 < int_vector_size(iens_values)) - ++iens_index; - else if ((iens_index+1 == int_vector_size(iens_values))) { - ++iter_index; - iens_index = 0; - } - - free(base); - free(runpath); - } - - int linecount = int_vector_size(iens_values) * int_vector_size(iter_values); - test_assert_int_equal(linecount, counter); - free(cwd); - fclose(file); - } -} - - - -void test_export_runpath_files(const char * config_file, - const char * config_file_iterations, - const char * job_file_export_runpath) { - - stringlist_type * args = stringlist_alloc_new(); - const char * job_name = "export_job"; - - ert_test_context_type * test_context_iterations = create_context( config_file_iterations, "enkf_workflow_job_test_export_runpath_iter" ); - - { - int_vector_type * iens_values = int_vector_alloc(5,0); - const int iens[5] = {0,1,2,3,4}; - int_vector_set_many(iens_values, 0, &iens[0], 5); - int_vector_type * iter_values = int_vector_alloc(1,0); - - test_export_runpath_file(test_context_iterations, job_name, job_file_export_runpath, args, iens_values, iter_values); - - int_vector_free(iens_values); - int_vector_free(iter_values); - } - { - stringlist_append_copy( args, "0-2"); //realization range - - int_vector_type * iens_values = int_vector_alloc(3,0); - const int iens[] = {0,1,2}; - int_vector_set_many(iens_values, 0, &iens[0], 3); - int_vector_type * iter_values = int_vector_alloc(1,0); - - test_export_runpath_file(test_context_iterations, job_name, job_file_export_runpath, args, iens_values, iter_values); - - int_vector_free(iens_values); - int_vector_free(iter_values); - - stringlist_clear(args); - } - { - stringlist_append_copy( args, "0,3-5"); //realization range - - int_vector_type * iens_values = int_vector_alloc(4,0); - const int iens[] = {0,3,4,5}; - int_vector_set_many(iens_values, 0, &iens[0], 4); - int_vector_type * iter_values = int_vector_alloc(1,0); - - test_export_runpath_file(test_context_iterations, job_name, job_file_export_runpath, args, iens_values, iter_values); - - int_vector_free(iens_values); - int_vector_free(iter_values); - - stringlist_clear(args); - } - { - stringlist_append_copy( args, "1-2"); //realization range - stringlist_append_copy( args, "|"); //delimiter - stringlist_append_copy( args, "1-3"); //iteration range - - int_vector_type * iens_values = int_vector_alloc(2,0); - int iens[] = {1,2}; - int_vector_set_many(iens_values, 0, &iens[0], 2); - int_vector_type * iter_values = int_vector_alloc(3,0); - int iter[] = {1,2,3}; - int_vector_set_many(iter_values, 0, &iter[0], 3); - - test_export_runpath_file(test_context_iterations, job_name, job_file_export_runpath, args, iens_values, iter_values); - - int_vector_free(iens_values); - int_vector_free(iter_values); - - stringlist_clear(args); - } - { - stringlist_append_copy( args, "*"); //realization range - stringlist_append_copy( args, "|"); //delimiter - stringlist_append_copy( args, "*"); //iteration range - - int_vector_type * iens_values = int_vector_alloc(5,0); - int iens[] = {0,1,2,3,4}; - int_vector_set_many(iens_values, 0, &iens[0], 5); - int_vector_type * iter_values = int_vector_alloc(4,0); - int iter[] = {0,1,2,3}; - int_vector_set_many(iter_values, 0, &iter[0], 4); - - test_export_runpath_file(test_context_iterations, job_name, job_file_export_runpath, args, iens_values, iter_values); - - int_vector_free(iens_values); - int_vector_free(iter_values); - - stringlist_clear(args); - } - - ert_test_context_free(test_context_iterations); - ert_test_context_type * test_context = create_context( config_file, "enkf_workflow_job_test_export_runpath" ); - - { - int_vector_type * iens_values = int_vector_alloc(1,0); - int_vector_init_range(iens_values, 0, 25, 1); - int_vector_type * iter_values = int_vector_alloc(1,0); - - test_export_runpath_file(test_context, job_name, job_file_export_runpath, args, iens_values, iter_values); - - int_vector_free(iens_values); - int_vector_free(iter_values); - - stringlist_clear(args); - } - { - stringlist_append_copy( args, "1-3"); //realization range - - int_vector_type * iens_values = int_vector_alloc(3,0); - int iens[] = {1,2,3}; - int_vector_set_many(iens_values, 0, &iens[0], 3); - int_vector_type * iter_values = int_vector_alloc(1,0); - - test_export_runpath_file(test_context, job_name, job_file_export_runpath, args, iens_values, iter_values); - - int_vector_free(iens_values); - int_vector_free(iter_values); - - stringlist_clear(args); - } - { - stringlist_append_copy( args, "1,2"); //realization range - stringlist_append_copy( args, "|"); //delimiter - stringlist_append_copy( args, "1-3"); //iteration range - - int_vector_type * iens_values = int_vector_alloc(2,0); - int iens[] = {1,2}; - int_vector_set_many(iens_values, 0, &iens[0], 2); - int_vector_type * iter_values = int_vector_alloc(1,0); - - test_export_runpath_file(test_context, job_name, job_file_export_runpath, args, iens_values, iter_values); - - int_vector_free(iens_values); - int_vector_free(iter_values); - - stringlist_clear(args); - } - - - ert_test_context_free(test_context); - - - stringlist_free( args ); -} - - - - - -int main(int argc , const char ** argv) { - enkf_main_install_SIGNALS(); - - const char * config_file = argv[1]; - const char * config_file_iterations = argv[2]; - const char * job_file_create_case = argv[3]; - const char * job_file_init_case_job = argv[4]; - const char * job_file_load_results = argv[5]; - const char * job_file_load_results_iter = argv[6]; - const char * job_file_observation_ranking = argv[7]; - const char * job_file_data_ranking = argv[8]; - const char * job_file_ranking_export = argv[9]; - const char * job_file_init_misfit_table = argv[10]; - const char * job_file_export_runpath = argv[11]; - - - ert_test_context_type * test_context = create_context( config_file, "enkf_workflow_job_test" ); - { - test_create_case_job(test_context, "JOB1" , job_file_create_case); - test_init_case_job(test_context, "JOB2", job_file_init_case_job); - test_load_results_job(test_context, "JOB3" , job_file_load_results); - test_load_results_iter_job( test_context, "JOB4" , job_file_load_results_iter ); - test_init_misfit_table(test_context, "JOB5" , job_file_init_misfit_table); - test_rank_realizations_on_observations_job(test_context, "JOB6" , job_file_observation_ranking); - test_rank_realizations_on_data_job(test_context , "JOB7" , job_file_data_ranking); - test_export_ranking(test_context, "JOB8" , job_file_ranking_export); - } - ert_test_context_free( test_context ); - - test_export_runpath_files(config_file, config_file_iterations, job_file_export_runpath); - - exit(0); -} diff --git a/ThirdParty/Ert/libenkf/tests/enkf_workflow_job_test_version.c b/ThirdParty/Ert/libenkf/tests/enkf_workflow_job_test_version.c deleted file mode 100644 index d60e2c799c..0000000000 --- a/ThirdParty/Ert/libenkf/tests/enkf_workflow_job_test_version.c +++ /dev/null @@ -1,80 +0,0 @@ -/* - Copyright (C) 2016 Statoil ASA, Norway. - - The file 'enkf_workflow_job_test_version.c' is part of ERT - - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -/* - These version functions are overrideed here to get a consistent - version mapping. -*/ - -int version_get_major_ert_version( ) { - return 1; -} - - -int version_get_minor_ert_version( ) { - return 2; -} - - -const char* version_get_micro_ert_version( ) { - return "3"; -} - - -void test_version() { - test_assert_int_equal( version_get_major_ert_version( ) , 1 ); - test_assert_int_equal( version_get_minor_ert_version( ) , 2 ); - test_assert_string_equal( version_get_micro_ert_version( ) , "3" ); -} - - -int main(int argc , const char ** argv) { - enkf_main_install_SIGNALS(); - test_version( ); - { - const char * path = argv[1]; - ert_workflow_list_type * workflows = ert_workflow_list_alloc( NULL ); - ert_workflow_list_add_jobs_in_directory( workflows , path ); - - // The CONF1 only exists as default - unversioned - test_assert_true( ert_workflow_list_has_job( workflows , "CONF1")); - - // The CONF2 exists as the default - which is invalid and will not load, - // and CONF2@1 - which should load. - test_assert_false( ert_workflow_list_has_job( workflows , "CONF2@1")); - test_assert_true( ert_workflow_list_has_job( workflows , "CONF2")); - - // The CONF3 only exists as a fully versioned CONF3@1.2.3 - which should load. - test_assert_true( ert_workflow_list_has_job( workflows , "CONF3")); - - // The CONF4 only exists as a fully versioned CONF4@1.2.0 - which should not load. - test_assert_false( ert_workflow_list_has_job( workflows , "CONF4")); - - // The CONF5 exists as a fully versioned CONF5@1.2.0 - which should not load and - // CONF@1.2 which should load. - test_assert_true( ert_workflow_list_has_job( workflows , "CONF5")); - - ert_workflow_list_free( workflows ); - } - exit(0); -} diff --git a/ThirdParty/Ert/libenkf/tests/gen_kw_logarithmic_test.c b/ThirdParty/Ert/libenkf/tests/gen_kw_logarithmic_test.c deleted file mode 100644 index 2747b91a2c..0000000000 --- a/ThirdParty/Ert/libenkf/tests/gen_kw_logarithmic_test.c +++ /dev/null @@ -1,110 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'gen_kw_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - - - -void test_write_gen_kw_export_file(enkf_main_type * enkf_main) -{ - enkf_state_type * state = enkf_main_iget_state( enkf_main , 0 ); - test_assert_not_NULL(state); - enkf_node_type * enkf_node = enkf_state_get_node( state , "MULTFLT" ); - enkf_node_type * enkf_node2 = enkf_state_get_node( state , "MULTFLT2" ); - test_assert_not_NULL(enkf_node); - test_assert_not_NULL(enkf_node2); - test_assert_true(enkf_node_get_impl_type(enkf_node) == GEN_KW); - test_assert_true(enkf_node_get_impl_type(enkf_node2) == GEN_KW); - - gen_kw_type * gen_kw = enkf_node_value_ptr(enkf_node); - gen_kw_type * gen_kw2 = enkf_node_value_ptr(enkf_node2); - - - { - rng_type * rng = rng_alloc( MZRAN , INIT_DEFAULT ); - const enkf_config_node_type * config = enkf_node_get_config(enkf_node); - const int data_size = enkf_config_node_get_data_size( config, 0 ); - const double mean = 0.0; /* Mean and std are hardcoded - the variability should be in the transformation. */ - const double std = 1.0; - - for (int i=0; i < data_size; ++i) { - double random_number = enkf_util_rand_normal(mean , std , rng); - gen_kw_data_iset(gen_kw, i, random_number); - gen_kw_data_iset(gen_kw2, i, random_number); - } - - rng_free(rng); - } - - - { - enkf_fs_type * init_fs = enkf_main_get_fs( enkf_main ); - run_arg_type * run_arg = run_arg_alloc_INIT_ONLY( init_fs , 0 ,0 , "simulations/run0"); - enkf_state_ecl_write(state, run_arg , init_fs); - test_assert_true(util_file_exists("simulations/run0/parameters.txt")); - run_arg_free( run_arg ); - } - - - { - int buffer_size = 0; - char * file_content = util_fread_alloc_file_content("simulations/run0/parameters.txt", &buffer_size); - - stringlist_type * token_list = stringlist_alloc_from_split(file_content, " \n"); - double value = stringlist_iget_as_double(token_list, 5, NULL); - - test_assert_true(value > 0.0); //Verify precision - test_assert_true(NULL != strstr(file_content, "LOG10_")); //Verify log entry - - stringlist_free(token_list); - free(file_content); - } -} - - - -int main(int argc , char ** argv) { - const char * config_file = argv[1]; - ert_test_context_type * test_context = ert_test_context_alloc("gen_kw_logarithmic_test" , config_file ); - enkf_main_type * enkf_main = ert_test_context_get_main(test_context); - - test_assert_not_NULL(enkf_main); - - test_write_gen_kw_export_file(enkf_main); - - ert_test_context_free( test_context ); - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/gen_kw_test.c b/ThirdParty/Ert/libenkf/tests/gen_kw_test.c deleted file mode 100644 index fdf5e677bd..0000000000 --- a/ThirdParty/Ert/libenkf/tests/gen_kw_test.c +++ /dev/null @@ -1,134 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'gen_kw_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include "ert/util/build_config.h" - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - - - -void test_send_fortio_to_gen_kw_ecl_write(void * arg) { - enkf_main_type * enkf_main = arg; - test_assert_not_NULL(enkf_main); - fortio_type * fortio = fortio_open_writer("my_new_file", false, ECL_ENDIAN_FLIP); - test_assert_not_NULL(fortio); - - enkf_state_type * state = enkf_main_iget_state( enkf_main , 0 ); - test_assert_not_NULL(state); - enkf_node_type * enkf_node = enkf_state_get_node( state , "MULTFLT" ); - test_assert_not_NULL(enkf_node); - const enkf_config_node_type * config_node = enkf_node_get_config(enkf_node); - test_assert_not_NULL(config_node); - - if (GEN_KW == enkf_config_node_get_impl_type(config_node)) { - const char * dummy_path = "dummy_path"; - enkf_node_ecl_write(enkf_node, dummy_path, fortio, 0); - } -} - - -void test_write_gen_kw_export_file(enkf_main_type * enkf_main) -{ - test_assert_not_NULL(enkf_main); - enkf_fs_type * init_fs = enkf_main_get_fs( enkf_main ); - enkf_state_type * state = enkf_main_iget_state( enkf_main , 0 ); - run_arg_type * run_arg = run_arg_alloc_INIT_ONLY( init_fs , 0 ,0 , "simulations/run0"); - test_assert_not_NULL(state); - enkf_node_type * enkf_node = enkf_state_get_node( state , "MULTFLT" ); - - test_assert_not_NULL(enkf_node); - const enkf_config_node_type * config_node = enkf_node_get_config(enkf_node); - test_assert_not_NULL(config_node); - - if (GEN_KW == enkf_config_node_get_impl_type(config_node)) { - enkf_state_ecl_write(state, run_arg , init_fs); - test_assert_true(util_file_exists("simulations/run0/parameters.txt")); - } - run_arg_free( run_arg ); -} - - - -static void read_erroneous_gen_kw_file( void * arg) { - vector_type * arg_vector = vector_safe_cast( arg ); - gen_kw_config_type * gen_kw_config = vector_iget( arg_vector, 0 ); - const char * filename = vector_iget( arg, 1 ); - gen_kw_config_set_parameter_file(gen_kw_config, filename); -} - - -void test_read_erroneous_gen_kw_file() { - const char * parameter_filename = "MULTFLT_with_errors.txt"; - const char * tmpl_filename = "MULTFLT.tmpl"; - - { - FILE * stream = util_fopen(parameter_filename, "w"); - const char * data = util_alloc_sprintf("MULTFLT1 NORMAL 0\nMULTFLT2 RAW\nMULTFLT3 NORMAL 0"); - util_fprintf_string(data, 30, true, stream); - util_fclose(stream); - - FILE * tmpl_stream = util_fopen(tmpl_filename, "w"); - const char * tmpl_data = util_alloc_sprintf(" \n"); - util_fprintf_string(tmpl_data, 30, true, tmpl_stream); - util_fclose(tmpl_stream); - } - - gen_kw_config_type * gen_kw_config = gen_kw_config_alloc_empty("MULTFLT", "<%s>"); - vector_type * arg = vector_alloc_new(); - vector_append_ref( arg , gen_kw_config ); - vector_append_ref(arg, parameter_filename); - - test_assert_util_abort("arg_pack_fscanf", read_erroneous_gen_kw_file, arg); - - vector_free(arg); - gen_kw_config_free(gen_kw_config); -} - - -int main(int argc , char ** argv) { - const char * config_file = argv[1]; - ert_test_context_type * test_context = ert_test_context_alloc("gen_kw_test" , config_file ); - enkf_main_type * enkf_main = ert_test_context_get_main(test_context); - test_assert_not_NULL(enkf_main); - - test_write_gen_kw_export_file(enkf_main); - test_assert_util_abort("gen_kw_ecl_write", test_send_fortio_to_gen_kw_ecl_write, enkf_main); - test_read_erroneous_gen_kw_file(); - - ert_test_context_free( test_context ); - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/obs_vector_tests.c b/ThirdParty/Ert/libenkf/tests/obs_vector_tests.c deleted file mode 100644 index 33485d7c0d..0000000000 --- a/ThirdParty/Ert/libenkf/tests/obs_vector_tests.c +++ /dev/null @@ -1,244 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'enkf_obs_vector_tests.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. - */ - -#include -#include -#include -#include - -#include "ert/enkf/gen_obs.h" - -bool alloc_strippedparameters_noerrors() { - obs_vector_type * obs_vector = obs_vector_alloc(SUMMARY_OBS, "WHAT", NULL, 0); - obs_vector_free(obs_vector); - return true; -} - -/*******Summary obs tests*******************/ -bool scale_std_summary_nodata_no_errors() { - obs_vector_type * obs_vector = obs_vector_alloc(SUMMARY_OBS, "WHAT", NULL, 0); - local_obsdata_node_type * local_node = obs_vector_alloc_local_node( obs_vector ); - obs_vector_scale_std(obs_vector, local_node , 2.0); - obs_vector_free(obs_vector); - local_obsdata_node_free( local_node ); - return true; -} - -bool scale_std_summarysingleobservation_no_errors() { - obs_vector_type * obs_vector = obs_vector_alloc(SUMMARY_OBS, "WHAT", NULL, 1); - summary_obs_type * summary_obs = summary_obs_alloc("SummaryKey", "ObservationKey", 43.2, 2.0, AUTO_CORRF_EXP, 42); - obs_vector_install_node(obs_vector, 0, summary_obs); - test_assert_double_equal(2.0, summary_obs_get_std(summary_obs)); - test_assert_double_equal(1.0, summary_obs_get_std_scaling(summary_obs)); - - { - local_obsdata_node_type * local_node = obs_vector_alloc_local_node( obs_vector ); - obs_vector_scale_std(obs_vector, local_node , 2.0); - local_obsdata_node_free( local_node ); - } - test_assert_double_equal(2.0, summary_obs_get_std_scaling(summary_obs)); - - obs_vector_free(obs_vector); - return true; -} - -bool scale_std_summarymanyobservations_no_errors() { - int num_observations = 100; - double scaling_factor = 1.456; - - obs_vector_type * obs_vector = obs_vector_alloc(SUMMARY_OBS, "WHAT", NULL, num_observations); - - test_assert_bool_equal(0, obs_vector_get_num_active(obs_vector)); - - summary_obs_type * observations[num_observations]; - for (int i = 0; i < num_observations; i++) { - summary_obs_type * summary_obs = summary_obs_alloc("SummaryKey", "ObservationKey", 43.2, i, AUTO_CORRF_EXP, 42); - obs_vector_install_node(obs_vector, i, summary_obs); - observations[i] = summary_obs; - } - - for (int i = 0; i < num_observations; i++) { - summary_obs_type * before_scale = observations[i]; - test_assert_double_equal(i, summary_obs_get_std(before_scale)); - } - - test_assert_bool_equal(num_observations, obs_vector_get_num_active(obs_vector)); - { - local_obsdata_node_type * local_node = obs_vector_alloc_local_node( obs_vector ); - obs_vector_scale_std(obs_vector, local_node , scaling_factor); - local_obsdata_node_free( local_node ); - } - for (int i = 0; i < num_observations; i++) { - summary_obs_type * after_scale = observations[i]; - test_assert_double_equal(scaling_factor, summary_obs_get_std_scaling(after_scale)); - } - - obs_vector_free(obs_vector); - return true; -} - -/************ Block obs tests *****************************************************/ - -bool scale_std_block_nodata_no_errors() { - obs_vector_type * obs_vector = obs_vector_alloc(BLOCK_OBS, "WHAT", NULL, 0); - local_obsdata_node_type * local_node = obs_vector_alloc_local_node( obs_vector ); - obs_vector_scale_std(obs_vector, local_node , 2.0); - local_obsdata_node_free( local_node ); - obs_vector_free(obs_vector); - return true; -} - -block_obs_type * create_block_obs(ecl_grid_type * grid, int size, double value, double std_dev) { - field_config_type * field_config = field_config_alloc_empty( "PRESSURE" , grid , NULL, false ); - int * i = util_calloc(size, sizeof * i); - int * j = util_calloc(size, sizeof * j); - int * k = util_calloc(size, sizeof * k); - double * obs_value = util_calloc(size, sizeof * obs_value); - double * obs_std = util_calloc(size, sizeof * obs_std); - - for (int num = 0; num < size; num++) { - obs_value[num] = value; - obs_std[num] = std_dev; - i[num] = num; - j[num] = num; - k[num] = num; - } - - block_obs_type * block_obs = block_obs_alloc_complete("Label", SOURCE_FIELD, NULL, field_config , grid, size, i, j, k, obs_value, obs_std); - - free(i); - free(j); - free(k); - free(obs_value); - free(obs_std); - field_config_free( field_config ); - - return block_obs; -} - -bool scale_std_block100observations_no_errors() { - int num_observations = 100; - int num_points = 10; - - obs_vector_type * obs_vector = obs_vector_alloc(BLOCK_OBS, "WHAT", NULL, num_observations); - ecl_grid_type * grid = ecl_grid_alloc_rectangular(num_points, num_points, num_points, 1.0, 1.0, 1.0, NULL); - - double scale_factor = 3.3; - double obs_value = 44; - double obs_std = 3.2; - - block_obs_type * observations[num_observations]; - - for (int i = 0; i < num_observations; i++) { - block_obs_type * block_obs = create_block_obs(grid, num_points, obs_value, obs_std); - obs_vector_install_node(obs_vector, i, block_obs); - observations[i] = block_obs; - } - - for (int i = 0; i < num_observations; i++) { - for (int point_nr = 0; point_nr < num_points; point_nr++) { - double value, std; - block_obs_iget(observations[i], point_nr, &value, &std); - test_assert_double_equal(obs_value, value); - test_assert_double_equal(obs_std, std); - } - } - - { - local_obsdata_node_type * local_node = obs_vector_alloc_local_node( obs_vector ); - obs_vector_scale_std(obs_vector, local_node , scale_factor); - local_obsdata_node_free( local_node ); - } - - for (int i = 0; i < num_observations; i++) { - for (int point_nr = 0; point_nr < num_points; point_nr++) { - double value, std; - block_obs_iget(observations[i], point_nr, &value, &std); - test_assert_double_equal(obs_value, value); - test_assert_double_equal(obs_std , std); - test_assert_double_equal(scale_factor , block_obs_iget_std_scaling( observations[i] , point_nr)); - } - } - - ecl_grid_free(grid); - obs_vector_free(obs_vector); - return true; -} - -/*************Gen obs tests************************************************/ - -bool scale_std_gen_nodata_no_errors() { - obs_vector_type * obs_vector = obs_vector_alloc(GEN_OBS, "WHAT", NULL, 0); - local_obsdata_node_type * local_node = obs_vector_alloc_local_node( obs_vector ); - obs_vector_scale_std(obs_vector, local_node , 2.0); - obs_vector_free(obs_vector); - local_obsdata_node_free( local_node ); - return true; -} - -bool scale_std_gen_withdata_no_errors() { - int num_observations = 100; - double value = 42; - double std_dev = 2.2; - double multiplier = 3.4; - - obs_vector_type * obs_vector = obs_vector_alloc(GEN_OBS, "WHAT", NULL, num_observations); - - gen_obs_type * observations[num_observations]; - for (int i = 0; i < num_observations; i++) { - gen_obs_type * gen_obs = gen_obs_alloc(NULL, "WWCT-GEN", NULL, value, std_dev, NULL, NULL, NULL); - obs_vector_install_node(obs_vector, i, gen_obs); - observations[i] = gen_obs; - } - - { - local_obsdata_node_type * local_node = obs_vector_alloc_local_node( obs_vector ); - obs_vector_scale_std(obs_vector, local_node , multiplier); - local_obsdata_node_free( local_node ); - } - - for (int i = 0; i < num_observations; i++) { - char * index_key = util_alloc_sprintf("%d", 0); - double value_new, std_new; - bool valid; - gen_obs_user_get_with_data_index(observations[i], index_key, &value_new, &std_new, &valid); - test_assert_double_equal(std_dev , std_new); - test_assert_double_equal(value, value_new); - test_assert_double_equal(multiplier , gen_obs_iget_std_scaling( observations[i] , 0 )); - free(index_key); - } - - obs_vector_free(obs_vector); - return true; -} - -int main(int argc, char ** argv) { - test_assert_bool_equal(alloc_strippedparameters_noerrors(), true); - test_assert_bool_equal(scale_std_summary_nodata_no_errors(), true); - test_assert_bool_equal(scale_std_summarysingleobservation_no_errors(), true); - test_assert_bool_equal(scale_std_summarymanyobservations_no_errors(), true); - - test_assert_bool_equal(scale_std_block_nodata_no_errors(), true); - test_assert_bool_equal(scale_std_block100observations_no_errors(), true); - - test_assert_bool_equal(scale_std_gen_nodata_no_errors(), true); - test_assert_bool_equal(scale_std_gen_withdata_no_errors(), true); - - exit(0); -} - diff --git a/ThirdParty/Ert/libenkf/tests/statoil_tests.cmake b/ThirdParty/Ert/libenkf/tests/statoil_tests.cmake deleted file mode 100644 index de6baa0cf4..0000000000 --- a/ThirdParty/Ert/libenkf/tests/statoil_tests.cmake +++ /dev/null @@ -1,220 +0,0 @@ -add_executable( enkf_site_config enkf_site_config.c ) -target_link_libraries( enkf_site_config enkf test_util ) -add_test( enkf_site_config ${EXECUTABLE_OUTPUT_PATH}/enkf_site_config /project/res/etc/ERT/site-config) - -add_executable( enkf_gen_data_config enkf_gen_data_config.c ) -target_link_libraries( enkf_gen_data_config enkf test_util ) -add_test( enkf_gen_data_config ${EXECUTABLE_OUTPUT_PATH}/enkf_gen_data_config - ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/gendata_test/RFT_E-3H_21 - ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/gendata_test/RFT_E-3H_21_empty) - -add_executable( enkf_block_obs enkf_block_obs.c ) -target_link_libraries( enkf_block_obs enkf test_util ) -add_test( enkf_block_obs ${EXECUTABLE_OUTPUT_PATH}/enkf_block_obs ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID) - -add_executable( enkf_obs_fs enkf_obs_fs.c ) -target_link_libraries( enkf_obs_fs enkf test_util ) -add_test( enkf_obs_fs ${EXECUTABLE_OUTPUT_PATH}/enkf_obs_fs ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/obs_testing/config ) - -add_executable( enkf_magic_string_in_workflows enkf_magic_string_in_workflows.c ) -target_link_libraries( enkf_magic_string_in_workflows enkf test_util ) -add_test( enkf_magic_string_in_workflows ${EXECUTABLE_OUTPUT_PATH}/enkf_magic_string_in_workflows ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/with_data/config ) - -add_executable( enkf_obs_vector_fs enkf_obs_vector_fs.c ) -target_link_libraries( enkf_obs_vector_fs enkf test_util ) -add_test( enkf_obs_vector_fs ${EXECUTABLE_OUTPUT_PATH}/enkf_obs_vector_fs ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/obs_testing/config ) - -add_executable( enkf_plot_data_fs enkf_plot_data_fs.c ) -target_link_libraries( enkf_plot_data_fs enkf test_util ) -add_test( enkf_plot_data_fs ${EXECUTABLE_OUTPUT_PATH}/enkf_plot_data_fs ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/plotData/config ) - -add_executable( enkf_time_map enkf_time_map.c ) -target_link_libraries( enkf_time_map enkf test_util ) -add_test( enkf_time_map1 ${EXECUTABLE_OUTPUT_PATH}/enkf_time_map ) -add_test( enkf_time_map2 ${EXECUTABLE_OUTPUT_PATH}/enkf_time_map ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE - ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/ModifiedSummary/EXTRA_TSTEP - ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/ModifiedSummary/SHORT - ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/ModifiedSummary/MISSING_TSTEP ) - -add_executable( enkf_main_fs enkf_main_fs.c ) -target_link_libraries( enkf_main_fs enkf test_util ) -add_test( enkf_main_fs ${EXECUTABLE_OUTPUT_PATH}/enkf_main_fs ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/plotData/config ) - -add_executable( enkf_main_fs_current_file_test enkf_main_fs_current_file_test.c ) -target_link_libraries( enkf_main_fs_current_file_test enkf test_util ) -add_test( enkf_main_fs_current_file_test ${EXECUTABLE_OUTPUT_PATH}/enkf_main_fs_current_file_test ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/plotData/config ) - -add_executable( enkf_scale_correlated_std enkf_scale_correlated_std.c ) -target_link_libraries( enkf_scale_correlated_std enkf test_util ) -add_test( enkf_scale_correlated_std ${EXECUTABLE_OUTPUT_PATH}/enkf_scale_correlated_std - ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/with_data/config - ${PROJECT_SOURCE_DIR}/share/workflows/jobs/internal/config/STD_SCALE_CORRELATED_OBS ) - -add_executable( enkf_plot_gendata_fs enkf_plot_gendata_fs.c ) -target_link_libraries( enkf_plot_gendata_fs enkf test_util ) -add_test( enkf_plot_gendata_fs ${EXECUTABLE_OUTPUT_PATH}/enkf_plot_gendata_fs - ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/with_GEN_DATA/config ) - -add_test( enkf_state_report_step_compatible_TRUE - ${EXECUTABLE_OUTPUT_PATH}/enkf_state_report_step_compatible ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/ecl_sum_compatible_true config_ecl_sum_compatible_true TRUE) - -add_test( enkf_state_report_step_compatible_FALSE - ${EXECUTABLE_OUTPUT_PATH}/enkf_state_report_step_compatible ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/ecl_sum_compatible_false config_ecl_sum_compatible_false FALSE) - - -#----------------------------------------------------------------- - -add_executable( enkf_state_manual_load_test enkf_state_manual_load_test.c ) -target_link_libraries( enkf_state_manual_load_test enkf test_util ) -add_test( enkf_state_manual_load_test ${EXECUTABLE_OUTPUT_PATH}/enkf_state_manual_load_test ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/ecl_sum_compatible_true config_ecl_sum_compatible_true) - -#----------------------------------------------------------------- - - -add_executable( enkf_state_skip_summary_load_test enkf_state_skip_summary_load_test.c ) -target_link_libraries( enkf_state_skip_summary_load_test enkf test_util ) - -add_test( enkf_state_summary_vars_present - ${EXECUTABLE_OUTPUT_PATH}/enkf_state_skip_summary_load_test ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/ecl_summary_vars_config config_summary_vars) - -add_test( enkf_state_no_summary_vars_present - ${EXECUTABLE_OUTPUT_PATH}/enkf_state_skip_summary_load_test ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/ecl_no_summary_vars_config config_no_summary_vars) - - -#----------------------------------------------------------------- - - -add_executable( enkf_export_field_test enkf_export_field_test.c ) -target_link_libraries( enkf_export_field_test enkf test_util ) - -add_test( enkf_export_field_test - ${EXECUTABLE_OUTPUT_PATH}/enkf_export_field_test ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/export_fields/config - ${PROJECT_SOURCE_DIR}/share/workflows/jobs/internal/config/EXPORT_FIELD - ${PROJECT_SOURCE_DIR}/share/workflows/jobs/internal/config/EXPORT_FIELD_ECL_GRDECL - ${PROJECT_SOURCE_DIR}/share/workflows/jobs/internal/config/EXPORT_FIELD_RMS_ROFF) - - - -add_executable( enkf_workflow_job_test enkf_workflow_job_test.c ) -target_link_libraries( enkf_workflow_job_test enkf test_util ) - -add_test( enkf_workflow_job_test - ${EXECUTABLE_OUTPUT_PATH}/enkf_workflow_job_test ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/with_data/config - ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/enkf_state_runpath/config_runpath_multiple_iterations - ${PROJECT_SOURCE_DIR}/share/workflows/jobs/internal-tui/config/CREATE_CASE - ${PROJECT_SOURCE_DIR}/share/workflows/jobs/internal-tui/config/INIT_CASE_FROM_EXISTING - ${PROJECT_SOURCE_DIR}/share/workflows/jobs/internal/config/LOAD_RESULTS - ${PROJECT_SOURCE_DIR}/share/workflows/jobs/internal/config/LOAD_RESULTS_ITER - ${PROJECT_SOURCE_DIR}/share/workflows/jobs/internal/config/OBSERVATION_RANKING - ${PROJECT_SOURCE_DIR}/share/workflows/jobs/internal/config/DATA_RANKING - ${PROJECT_SOURCE_DIR}/share/workflows/jobs/internal/config/EXPORT_RANKING - ${PROJECT_SOURCE_DIR}/share/workflows/jobs/internal/config/INIT_MISFIT_TABLE - ${PROJECT_SOURCE_DIR}/share/workflows/jobs/internal/config/EXPORT_RUNPATH) - -#----------------------------------------------------------------- - -add_executable( enkf_forward_init_SURFACE enkf_forward_init_SURFACE.c ) -target_link_libraries( enkf_forward_init_SURFACE enkf test_util ) - -add_test( enkf_forward_init_SURFACE_TRUE - ${EXECUTABLE_OUTPUT_PATH}/enkf_forward_init_SURFACE - ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/forward_init/surface config_surface_true - ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/forward_init/surface/Surface.irap - TRUE) - -add_test( enkf_forward_init_SURFACE_FALSE - ${EXECUTABLE_OUTPUT_PATH}/enkf_forward_init_SURFACE - ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/forward_init/surface config_surface_false - ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/forward_init/surface/Surface.irap - FALSE) - -#----------------------------------------------------------------- - -add_executable( enkf_forward_init_FIELD enkf_forward_init_FIELD.c ) -target_link_libraries( enkf_forward_init_FIELD enkf test_util ) - -add_test( enkf_forward_init_FIELD_TRUE - ${EXECUTABLE_OUTPUT_PATH}/enkf_forward_init_FIELD - ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/forward_init/field config_field_true - ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/forward_init/field/petro.grdecl - TRUE) - -add_test( enkf_forward_init_FIELD_FALSE - ${EXECUTABLE_OUTPUT_PATH}/enkf_forward_init_FIELD - ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/forward_init/field config_field_false - ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/forward_init/field/petro.grdecl - FALSE) - -#----------------------------------------------------------------- - -add_executable( enkf_forward_init_transform enkf_forward_init_transform.c ) -target_link_libraries( enkf_forward_init_transform enkf test_util ) - -add_test( enkf_forward_init_transform_TRUE - ${EXECUTABLE_OUTPUT_PATH}/enkf_forward_init_transform - ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/transform transform_forward_init_true - ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/transform/petro.grdecl - TRUE) - -add_test( enkf_forward_init_transform_FALSE - ${EXECUTABLE_OUTPUT_PATH}/enkf_forward_init_transform - ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/transform transform_forward_init_false - ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/transform/petro.grdecl - FALSE) - -#----------------------------------------------------------------- - -add_executable( enkf_export_inactive_cells enkf_export_inactive_cells.c ) -target_link_libraries( enkf_export_inactive_cells enkf test_util ) - -add_test( enkf_export_inactive_cells - ${EXECUTABLE_OUTPUT_PATH}/enkf_export_inactive_cells - ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/export_inactive_cells/config - ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/export_inactive_cells/petro.grdecl) - -#----------------------------------------------------------------- - -add_executable( enkf_refcase_list enkf_refcase_list.c ) -target_link_libraries( enkf_refcase_list enkf test_util ) -add_test( enkf_refcase_list ${EXECUTABLE_OUTPUT_PATH}/enkf_refcase_list ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat*/ECLIPSE) -add_test( enkf_refcase_list2 ${EXECUTABLE_OUTPUT_PATH}/enkf_refcase_list ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat*/ECLIPSE.*) -set_property( TEST enkf_refcase_list PROPERTY LABELS StatoilData ) -set_property( TEST enkf_refcase_list2 PROPERTY LABELS StatoilData ) - -add_executable( enkf_ecl_config enkf_ecl_config.c ) -target_link_libraries( enkf_ecl_config enkf test_util ) -add_test( enkf_ecl_config1 ${EXECUTABLE_OUTPUT_PATH}/enkf_ecl_config ) -add_test( enkf_ecl_config2 ${EXECUTABLE_OUTPUT_PATH}/enkf_ecl_config ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE) -set_property( TEST enkf_ecl_config2 PROPERTY LABELS StatoilData ) - -add_executable( enkf_ecl_config_config enkf_ecl_config_config.c ) -target_link_libraries( enkf_ecl_config_config enkf test_util ) -add_test( enkf_ecl_config_config ${EXECUTABLE_OUTPUT_PATH}/enkf_ecl_config_config ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/ecl_config ) -set_property( TEST enkf_ecl_config_config PROPERTY LABELS StatoilData ) - -set_property( TEST enkf_plot_data_fs PROPERTY LABELS StatoilData ) -set_property( TEST enkf_time_map2 PROPERTY LABELS StatoilData ) -set_property( TEST enkf_site_config PROPERTY LABELS StatoilData ) -set_property( TEST enkf_state_report_step_compatible_TRUE PROPERTY LABELS StatoilData ) -set_property( TEST enkf_state_report_step_compatible_FALSE PROPERTY LABELS StatoilData ) -set_property( TEST enkf_forward_init_SURFACE_FALSE PROPERTY LABELS StatoilData ) -set_property( TEST enkf_forward_init_SURFACE_TRUE PROPERTY LABELS StatoilData ) -set_property( TEST enkf_forward_init_FIELD_FALSE PROPERTY LABELS StatoilData ) -set_property( TEST enkf_forward_init_FIELD_TRUE PROPERTY LABELS StatoilData ) -set_property( TEST enkf_forward_init_transform_TRUE PROPERTY LABELS StatoilData ) -set_property( TEST enkf_forward_init_transform_FALSE PROPERTY LABELS StatoilData ) -set_property( TEST enkf_main_fs PROPERTY LABELS StatoilData ) -set_property( TEST enkf_state_summary_vars_present PROPERTY LABELS StatoilData ) -set_property( TEST enkf_state_no_summary_vars_present PROPERTY LABELS StatoilData ) -set_property( TEST enkf_export_field_test PROPERTY LABELS StatoilData ) -set_property( TEST enkf_workflow_job_test PROPERTY LABELS StatoilData ) -set_property( TEST enkf_main_fs_current_file_test PROPERTY LABELS StatoilData ) -set_property( TEST enkf_state_manual_load_test PROPERTY LABELS StatoilData ) -set_property( TEST enkf_block_obs PROPERTY LABELS StatoilData ) -set_property( TEST enkf_plot_gendata_fs PROPERTY LABELS StatoilData ) -set_property( TEST enkf_export_inactive_cells PROPERTY LABELS StatoilData ) -set_property( TEST enkf_obs_fs PROPERTY LABELS StatoilData ) -set_property( TEST enkf_obs_vector_fs PROPERTY LABELS StatoilData ) -set_property( TEST enkf_magic_string_in_workflows PROPERTY LABELS StatoilData ) -set_property( TEST enkf_gen_data_config PROPERTY LABELS StatoilData ) -set_property( TEST enkf_scale_correlated_std PROPERTY LABELS StatoilData ) \ No newline at end of file diff --git a/ThirdParty/Ert/libenkf/tests/tests.cmake b/ThirdParty/Ert/libenkf/tests/tests.cmake deleted file mode 100644 index 422545a549..0000000000 --- a/ThirdParty/Ert/libenkf/tests/tests.cmake +++ /dev/null @@ -1,254 +0,0 @@ -add_executable( enkf_runpath_list enkf_runpath_list.c ) -target_link_libraries( enkf_runpath_list enkf test_util ) -add_test( enkf_runpath_list ${EXECUTABLE_OUTPUT_PATH}/enkf_runpath_list ${CMAKE_CURRENT_SOURCE_DIR}/data/config/runpath_list/config ) - -add_executable( enkf_plot_tvector enkf_plot_tvector.c ) -target_link_libraries( enkf_plot_tvector enkf test_util ) -add_test( enkf_plot_tvector ${EXECUTABLE_OUTPUT_PATH}/enkf_plot_tvector) - -add_executable( enkf_plot_data enkf_plot_data.c ) -target_link_libraries( enkf_plot_data enkf test_util ) -add_test( enkf_plot_data ${EXECUTABLE_OUTPUT_PATH}/enkf_plot_data) - -add_executable( enkf_ert_run_context enkf_ert_run_context.c ) -target_link_libraries( enkf_ert_run_context enkf test_util ) -add_test( enkf_ert_run_context ${EXECUTABLE_OUTPUT_PATH}/enkf_ert_run_context) - -add_executable( enkf_run_arg enkf_run_arg.c ) -target_link_libraries( enkf_run_arg enkf test_util ) -add_test( enkf_run_arg ${EXECUTABLE_OUTPUT_PATH}/enkf_run_arg) - -add_executable( enkf_gen_obs_load enkf_gen_obs_load.c ) -target_link_libraries( enkf_gen_obs_load enkf test_util ) -add_test( enkf_gen_obs_load ${EXECUTABLE_OUTPUT_PATH}/enkf_gen_obs_load ${PROJECT_SOURCE_DIR}/test-data/local/config/gen_data/config ) - -add_executable( enkf_gen_data_config_parse enkf_gen_data_config_parse.c ) -target_link_libraries( enkf_gen_data_config_parse enkf test_util ) -add_test( enkf_gen_data_config_parse ${EXECUTABLE_OUTPUT_PATH}/enkf_gen_data_config_parse) - -add_executable( enkf_enkf_config_node_gen_data enkf_enkf_config_node_gen_data.c ) -target_link_libraries( enkf_enkf_config_node_gen_data enkf test_util ) -add_test( enkf_enkf_config_node_gen_data ${EXECUTABLE_OUTPUT_PATH}/enkf_enkf_config_node_gen_data) - - -add_executable( enkf_ert_workflow_list enkf_ert_workflow_list.c ) -target_link_libraries( enkf_ert_workflow_list enkf test_util ) -add_test( enkf_ert_workflow_list ${EXECUTABLE_OUTPUT_PATH}/enkf_ert_workflow_list ${PROJECT_SOURCE_DIR}/share/workflows/jobs/internal/config/SCALE_STD) - - -add_executable( enkf_obs_vector enkf_obs_vector.c ) -target_link_libraries( enkf_obs_vector enkf test_util ) -add_test( enkf_obs_vector ${EXECUTABLE_OUTPUT_PATH}/enkf_obs_vector ) - - - - -add_executable( enkf_ensemble_config enkf_ensemble_config.c ) -target_link_libraries( enkf_ensemble_config enkf test_util ) -add_test( enkf_ensemble_config ${EXECUTABLE_OUTPUT_PATH}/enkf_ensemble_config) - -add_executable( enkf_pca_plot enkf_pca_plot.c ) -target_link_libraries( enkf_pca_plot enkf test_util) -add_test( enkf_pca_plot ${EXECUTABLE_OUTPUT_PATH}/enkf_pca_plot) - -add_executable( enkf_cases_config enkf_cases_config.c ) -target_link_libraries( enkf_cases_config enkf test_util ) -add_test( enkf_cases_config ${EXECUTABLE_OUTPUT_PATH}/enkf_cases_config ) - -add_executable( enkf_analysis_config enkf_analysis_config.c ) -target_link_libraries( enkf_analysis_config enkf test_util ) -add_test( enkf_analysis_config ${EXECUTABLE_OUTPUT_PATH}/enkf_analysis_config) - -add_executable( enkf_analysis_config_ext_module enkf_analysis_config_ext_module.c ) -target_link_libraries( enkf_analysis_config_ext_module enkf test_util ) - -ert_module_name( VAR_RML rml_enkf ${LIBRARY_OUTPUT_PATH} ) -add_test( enkf_analysis_config_ext_module ${EXECUTABLE_OUTPUT_PATH}/enkf_analysis_config_ext_module - rml_enkf ${VAR_RML} ) - -add_executable( enkf_analysis_config_analysis_load enkf_analysis_config_analysis_load.c ) -target_link_libraries( enkf_analysis_config_analysis_load enkf test_util) -add_test( enkf_analysis_config_analysis_load ${EXECUTABLE_OUTPUT_PATH}/enkf_analysis_config_analysis_load ${CMAKE_CURRENT_SOURCE_DIR}/data/config/analysis_load_config) -set_property( TEST enkf_analysis_config_analysis_load PROPERTY ENVIRONMENT "ERT_SITE_CONFIG=${CMAKE_CURRENT_SOURCE_DIR}/data/config/analysis_load_site_config" ) - -add_executable( enkf_local_obsdata_node enkf_local_obsdata_node.c ) -target_link_libraries( enkf_local_obsdata_node enkf test_util) -add_test( enkf_local_obsdata_node ${EXECUTABLE_OUTPUT_PATH}/enkf_local_obsdata_node ) - -add_executable( enkf_local_obsdata enkf_local_obsdata.c ) -target_link_libraries( enkf_local_obsdata enkf test_util) -add_test( enkf_local_obsdata ${EXECUTABLE_OUTPUT_PATH}/enkf_local_obsdata ) - -add_executable( enkf_active_list enkf_active_list.c ) -target_link_libraries( enkf_active_list enkf test_util) -add_test( enkf_active_list ${EXECUTABLE_OUTPUT_PATH}/enkf_active_list ) - -add_executable( enkf_main enkf_main.c ) -target_link_libraries( enkf_main enkf test_util ) -add_test( enkf_main ${EXECUTABLE_OUTPUT_PATH}/enkf_main ) - -add_executable( enkf_fs enkf_fs.c ) -target_link_libraries( enkf_fs enkf test_util ) -add_test( enkf_fs ${EXECUTABLE_OUTPUT_PATH}/enkf_fs ) - -add_executable( enkf_workflow_job_test_version enkf_workflow_job_test_version.c ) -target_link_libraries( enkf_workflow_job_test_version enkf test_util ) -add_test( enkf_workflow_job_test_version ${EXECUTABLE_OUTPUT_PATH}/enkf_workflow_job_test_version - ${CMAKE_CURRENT_SOURCE_DIR}/data/workflow_jobs ) - - -add_executable( enkf_ert_test_context enkf_ert_test_context.c ) -target_link_libraries( enkf_ert_test_context enkf test_util ) -add_test( enkf_ert_test_context ${EXECUTABLE_OUTPUT_PATH}/enkf_ert_test_context - ${CMAKE_CURRENT_SOURCE_DIR}/data/config/test_context/config - ${CMAKE_CURRENT_SOURCE_DIR}/data/config/test_context/wf_job - ${CMAKE_CURRENT_SOURCE_DIR}/data/config/test_context/wf_job_fail) - - - -add_executable( enkf_plot_gen_kw enkf_plot_gen_kw.c ) -target_link_libraries( enkf_plot_gen_kw enkf test_util ) -add_test( enkf_plot_gen_kw ${EXECUTABLE_OUTPUT_PATH}/enkf_plot_gen_kw ) - -add_executable( enkf_plot_gen_kw_vector enkf_plot_gen_kw_vector.c ) -target_link_libraries( enkf_plot_gen_kw_vector enkf test_util ) -add_test( enkf_plot_gen_kw_vector ${EXECUTABLE_OUTPUT_PATH}/enkf_plot_gen_kw_vector ) - -add_executable( enkf_plot_gen_kw_fs enkf_plot_gen_kw_fs.c ) -target_link_libraries( enkf_plot_gen_kw_fs enkf test_util ) -add_test( enkf_plot_gen_kw_fs ${EXECUTABLE_OUTPUT_PATH}/enkf_plot_gen_kw_fs ${CMAKE_CURRENT_SOURCE_DIR}/data/config/gen_kw_plot/config ) - -add_executable( enkf_plot_genvector enkf_plot_genvector.c ) -target_link_libraries( enkf_plot_genvector enkf test_util ) -add_test( enkf_plot_genvector ${EXECUTABLE_OUTPUT_PATH}/enkf_plot_genvector ) - -add_executable( enkf_plot_gendata enkf_plot_gendata.c ) -target_link_libraries( enkf_plot_gendata enkf test_util ) -add_test( enkf_plot_gendata ${EXECUTABLE_OUTPUT_PATH}/enkf_plot_gendata ) - -add_executable( enkf_config_node enkf_config_node.c ) -target_link_libraries( enkf_config_node enkf test_util ) -add_test( enkf_config_node ${EXECUTABLE_OUTPUT_PATH}/enkf_config_node ) - - -#----------------------------------------------------------------- - -add_executable( gen_kw_test gen_kw_test.c ) -target_link_libraries( gen_kw_test enkf test_util ) - -add_test( gen_kw_test - ${EXECUTABLE_OUTPUT_PATH}/gen_kw_test - ${CMAKE_CURRENT_SOURCE_DIR}/data/config/forward/ert/config_GEN_KW_true) - - -add_executable( gen_kw_logarithmic_test gen_kw_logarithmic_test.c ) -target_link_libraries( gen_kw_logarithmic_test enkf test_util ) - -add_test( gen_kw_logarithmic_test - ${EXECUTABLE_OUTPUT_PATH}/gen_kw_logarithmic_test - ${CMAKE_CURRENT_SOURCE_DIR}/data/config/gen_kw_logarithmic/config_GEN_KW_logarithmic) - - - -#----------------------------------------------------------------- - -add_executable( enkf_forward_init_GEN_KW enkf_forward_init_GEN_KW.c ) -target_link_libraries( enkf_forward_init_GEN_KW enkf test_util ) - -add_test( enkf_forward_init_GEN_KW_TRUE - ${EXECUTABLE_OUTPUT_PATH}/enkf_forward_init_GEN_KW - ${CMAKE_CURRENT_SOURCE_DIR}/data/config/forward/ert config_GEN_KW_true TRUE) - -add_test( enkf_forward_init_GEN_KW_FALSE - ${EXECUTABLE_OUTPUT_PATH}/enkf_forward_init_GEN_KW - ${CMAKE_CURRENT_SOURCE_DIR}/data/config/forward/ert config_GEN_KW_false FALSE) - - -#----------------------------------------------------------------- - -add_executable( enkf_state_report_step_compatible enkf_state_report_step_compatible.c ) -target_link_libraries( enkf_state_report_step_compatible enkf test_util ) - - - - -add_executable( enkf_select_case_job enkf_select_case_job.c ) -target_link_libraries( enkf_select_case_job enkf test_util ) - -add_test( enkf_select_case_job - ${EXECUTABLE_OUTPUT_PATH}/enkf_select_case_job - ${PROJECT_SOURCE_DIR}/test-data/local/snake_oil/snake_oil.ert - ${PROJECT_SOURCE_DIR}/share/workflows/jobs/internal-tui/config/SELECT_CASE) - - -#----------------------------------------------------------------- - - -add_executable( enkf_forward_init_GEN_PARAM enkf_forward_init_GEN_PARAM.c ) -target_link_libraries( enkf_forward_init_GEN_PARAM enkf test_util ) - -add_test( enkf_forward_init_GEN_PARAM_TRUE - ${EXECUTABLE_OUTPUT_PATH}/enkf_forward_init_GEN_PARAM - ${CMAKE_CURRENT_SOURCE_DIR}/data/config/forward/ert config_GEN_PARAM_true TRUE) - -add_test( enkf_forward_init_GEN_PARAM_FALSE - ${EXECUTABLE_OUTPUT_PATH}/enkf_forward_init_GEN_PARAM - ${CMAKE_CURRENT_SOURCE_DIR}/data/config/forward/ert config_GEN_PARAM_false FALSE) - - -add_executable( enkf_umask_config_test enkf_umask_config_test.c ) -target_link_libraries( enkf_umask_config_test enkf test_util ) - -add_test( enkf_umask_config_test - ${EXECUTABLE_OUTPUT_PATH}/enkf_umask_config_test - ${PROJECT_SOURCE_DIR}/test-data/local/simple_config/config_umask) - -#----------------------------------------------------------------- - -add_executable( enkf_iter_config enkf_iter_config.c ) -target_link_libraries( enkf_iter_config enkf test_util ) -add_test( enkf_iter_config ${EXECUTABLE_OUTPUT_PATH}/enkf_iter_config ) - - -add_executable( enkf_model_config enkf_model_config.c ) -target_link_libraries( enkf_model_config enkf test_util ) -add_test( enkf_model_config ${EXECUTABLE_OUTPUT_PATH}/enkf_model_config ) - -add_executable( enkf_rng enkf_rng.c ) -target_link_libraries( enkf_rng enkf test_util ) -add_test( enkf_rng ${EXECUTABLE_OUTPUT_PATH}/enkf_rng ${CMAKE_CURRENT_SOURCE_DIR}/data/config rng) - -add_executable( enkf_forward_load_context enkf_forward_load_context.c ) -target_link_libraries( enkf_forward_load_context enkf test_util ) -add_test( enkf_forward_load_context ${EXECUTABLE_OUTPUT_PATH}/enkf_forward_load_context ${CMAKE_CURRENT_SOURCE_DIR}/data/config forward_load_context) - - -add_executable( enkf_hook_manager_test enkf_hook_manager_test.c ) -target_link_libraries( enkf_hook_manager_test enkf test_util ) -add_test( enkf_hook_manager_test ${EXECUTABLE_OUTPUT_PATH}/enkf_hook_manager_test ) - -add_executable(enkf_obs_tests enkf_obs_tests.c) -target_link_libraries(enkf_obs_tests enkf test_util ) -add_test(enkf_obs_tests ${EXECUTABLE_OUTPUT_PATH}/enkf_obs_tests) - -add_executable(obs_vector_tests obs_vector_tests.c) -target_link_libraries(obs_vector_tests enkf test_util ) -add_test(obs_vector_tests ${EXECUTABLE_OUTPUT_PATH}/obs_vector_tests) - - -add_executable( enkf_state_map enkf_state_map.c ) -target_link_libraries( enkf_state_map enkf test_util ) -add_test( enkf_state_map ${EXECUTABLE_OUTPUT_PATH}/enkf_state_map ) - - -add_executable( enkf_meas_data enkf_meas_data.c ) -target_link_libraries( enkf_meas_data enkf test_util ) -add_test( enkf_meas_data ${EXECUTABLE_OUTPUT_PATH}/enkf_meas_data ) - -add_executable( enkf_ensemble_GEN_PARAM enkf_ensemble_GEN_PARAM.c ) -target_link_libraries( enkf_ensemble_GEN_PARAM enkf test_util ) -add_test( enkf_ensemble_GEN_PARAM ${EXECUTABLE_OUTPUT_PATH}/enkf_ensemble_GEN_PARAM ${CMAKE_CURRENT_SOURCE_DIR}/data/ensemble/GEN_PARAM ) - -add_executable( enkf_ensemble enkf_ensemble.c ) -target_link_libraries( enkf_ensemble enkf test_util ) -add_test( enkf_ensemble ${EXECUTABLE_OUTPUT_PATH}/enkf_ensemble ) diff --git a/ThirdParty/Ert/libert_util/CMakeLists.txt b/ThirdParty/Ert/libert_util/CMakeLists.txt index 5ce48cab2d..d7eabe992a 100644 --- a/ThirdParty/Ert/libert_util/CMakeLists.txt +++ b/ThirdParty/Ert/libert_util/CMakeLists.txt @@ -5,3 +5,6 @@ if (BUILD_TESTS) add_subdirectory( tests ) endif() +if (BUILD_APPLICATIONS) + add_subdirectory( applications ) +endif() diff --git a/ThirdParty/Ert/libert_util/applications/CMakeLists.txt b/ThirdParty/Ert/libert_util/applications/CMakeLists.txt new file mode 100644 index 0000000000..9bd1440c95 --- /dev/null +++ b/ThirdParty/Ert/libert_util/applications/CMakeLists.txt @@ -0,0 +1,3 @@ +if (HAVE_PTHREAD) + add_subdirectory( block_fs ) +endif() diff --git a/ThirdParty/Ert/libert_util/applications/block_fs/CMakeLists.txt b/ThirdParty/Ert/libert_util/applications/block_fs/CMakeLists.txt new file mode 100644 index 0000000000..39b891f041 --- /dev/null +++ b/ThirdParty/Ert/libert_util/applications/block_fs/CMakeLists.txt @@ -0,0 +1,18 @@ +add_executable( bls bls.c ) + +target_link_libraries( bls ert_util ) + +if (USE_RUNPATH) + add_runpath( bls ) +endif() + + +set (destination ${CMAKE_INSTALL_PREFIX}/bin) +if (INSTALL_ERT) + install(TARGETS bls DESTINATION ${destination}) + if (INSTALL_GROUP) + install(CODE "EXECUTE_PROCESS(COMMAND chgrp ${INSTALL_GROUP} ${destination}/bls)") + install(CODE "EXECUTE_PROCESS(COMMAND chmod g+w ${destination}/bls)") + endif() +endif() + diff --git a/ThirdParty/Ert/libert_util/applications/block_fs/bcp.c b/ThirdParty/Ert/libert_util/applications/block_fs/bcp.c new file mode 100644 index 0000000000..34a0e4a7f0 --- /dev/null +++ b/ThirdParty/Ert/libert_util/applications/block_fs/bcp.c @@ -0,0 +1,85 @@ +/* + Copyright (C) 2011 Statoil ASA, Norway. + + The file 'bcp.c' is part of ERT - Ensemble based Reservoir Tool. + + ERT 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. + + ERT 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 + for more details. +*/ + +#include +#include +#include +#include +#include + + +static void install_SIGNALS(void) { + signal(SIGSEGV , util_abort_signal); /* Segmentation violation, i.e. overwriting memory ... */ + signal(SIGINT , util_abort_signal); /* Control C */ + signal(SIGTERM , util_abort_signal); /* If killing the program with SIGTERM (the default kill signal) you will get a backtrace. Killing with SIGKILL (-9) will not give a backtrace.*/ +} + + +static void usage() { + printf("Usage: \n\n"); + printf("bcp src.mnt target.mnt file \n"); + exit(1); +} + + + +int main(int argc , char ** argv) { + install_SIGNALS(); + if (argc < 4) + usage(); + { + const char * src_mount = argv[1]; + const char * target_mount = argv[2]; + if (block_fs_is_mount(src_mount)) { + const char * pattern = NULL; + int iarg; + + for (iarg = 3; iarg < argc; iarg++) { + if (argv[iarg][0] == '-') { + /** OK - this is an option .. */ + } + else pattern = argv[iarg]; + } + + { + block_fs_type * src_fs = block_fs_mount(src_mount , 1 , 0 , 1 , 0 , false , true ); + block_fs_type * target_fs = block_fs_mount(target_mount , 1 , 0 , 1 , 0 , false , false ); + vector_type * files = block_fs_alloc_filelist( src_fs , pattern , NO_SORT , false ); + buffer_type * buffer = buffer_alloc( 1024 ); + { + int i; + msg_type * msg = msg_alloc("Copying :" , false); + msg_show( msg ); + for (i=0; i < vector_get_size( files ); i++) { + const user_file_node_type * node = vector_iget_const( files , i ); + const char * filename = user_file_node_get_filename( node ); + msg_update( msg , filename ); + block_fs_fread_realloc_buffer( src_fs , filename , buffer ); + block_fs_fwrite_buffer( target_fs , filename , buffer ); + } + msg_free( msg , true ); + } + buffer_free( buffer ); + vector_free( files ); + block_fs_close( target_fs , true); + block_fs_close( src_fs , false ); + } + } else + fprintf(stderr,"The files:%s/%s does not seem to be a block_fs mount files.\n" , src_mount , target_mount); + } +} diff --git a/ThirdParty/Ert/libert_util/applications/block_fs/bfs_extract.c b/ThirdParty/Ert/libert_util/applications/block_fs/bfs_extract.c new file mode 100644 index 0000000000..dfeb07220b --- /dev/null +++ b/ThirdParty/Ert/libert_util/applications/block_fs/bfs_extract.c @@ -0,0 +1,100 @@ +/* + Copyright (C) 2011 Statoil ASA, Norway. + + The file 'bfs_extract.c' is part of ERT - Ensemble based Reservoir Tool. + + ERT 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. + + ERT 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 + for more details. +*/ + +#include +#include +#include +#include +#include + +/*****************************************************************/ +/* + This program is used to extract individual files from a block_fs + file. +*/ + + + + +void install_SIGNALS(void) { + signal(SIGSEGV , util_abort_signal); /* Segmentation violation, i.e. overwriting memory ... */ + signal(SIGINT , util_abort_signal); /* Control C */ + signal(SIGTERM , util_abort_signal); /* If killing the enkf program with SIGTERM (the default kill signal) you will get a backtrace. Killing with SIGKILL (-9) will not give a backtrace.*/ +} + + +static void usage() { + fprintf(stderr,"\nThis program is used to extract individual files from a block_fs\n"); + fprintf(stderr,"file. The arguments to the program are:\n"); + fprintf(stderr,"\n"); + fprintf(stderr," 1. The block_fs mount file.\n"); + fprintf(stderr," 2. The name of directory (need not exist) where the extracted files will be put.\n"); + fprintf(stderr," 3. A list of files to extract - this can contain wildcards, but they MUST be \n"); + fprintf(stderr," quoted to avoid expansion by the shell.\n"); + fprintf(stderr,"\n"); + fprintf(stderr,"Example:\n\n"); + fprintf(stderr," bash%% bfs_extract block_fs_file.mnt DOGFolder \'DOG*\'\n\n"); + fprintf(stderr,"This will extract all files starting with \'DOG\' to folder \'DOGFolder\'.\n\n"); + exit(1); +} + + +int main(int argc , char ** argv) { + install_SIGNALS(); + if (argc < 3) + usage(); + { + + const char * mount_file = argv[1]; + if (block_fs_is_mount(mount_file)) { + const char * target_path = argv[2]; + int iarg; + if (!util_is_directory( target_path )) { + if (util_file_exists( target_path )) + util_exit("The target:%s already exists - but it is not a directory.\n"); + else + util_make_path( target_path ); + } + { + block_fs_type * block_fs = block_fs_mount(mount_file , 1 , 0 , 1 , 0 , false , true ); + buffer_type * buffer = buffer_alloc(1024); + msg_type * msg = msg_alloc("Extracting: " , false); + msg_show( msg ); + + for (iarg = 3; iarg < argc; iarg++) { + vector_type * files = block_fs_alloc_filelist( block_fs , argv[iarg] , NO_SORT , false ); + { + int i; + for (i=0; i < vector_get_size( files ); i++) { + const user_file_node_type * node = vector_iget_const( files , i ); + const char * filename = user_file_node_get_filename( node ); + const char * target_file = util_alloc_filename( target_path , filename , NULL ); + msg_update( msg , filename ); + block_fs_fread_realloc_buffer( block_fs , filename , buffer ); + buffer_store( buffer , target_file ); + } + } + vector_free( files ); + } + block_fs_close( block_fs , false ); + msg_free( msg , true ); + } + } else + fprintf(stderr,"The file:%s does not seem to be a block_fs mount file.\n" , mount_file); + } +} diff --git a/ThirdParty/Ert/libert_util/applications/block_fs/block_fs_test.c b/ThirdParty/Ert/libert_util/applications/block_fs/block_fs_test.c new file mode 100644 index 0000000000..e40f45510a --- /dev/null +++ b/ThirdParty/Ert/libert_util/applications/block_fs/block_fs_test.c @@ -0,0 +1,221 @@ +#include +#include +#include +#include +#include +#include + + +typedef enum { + WRITE_FILE = 1, + DELETE_FILE = 2, + CHECK = 3, + ROTATE = 4 +} test_action_enum; + +#define WRITE_FILE_STRING "WRITE_FILE" +#define DELETE_FILE_STRING "DELETE_FILE" +#define CHECK_STRING "CHECK" +#define ROATATE_STRING "ROTATE" + + +typedef struct { + test_action_enum action; + char * filename; + int length; +} action_node_type; + + +action_node_type * action_node_alloc_new() { + action_node_type * node = util_malloc( sizeof * node ); + node->filename = NULL; + return node; +} + +void action_node_free(action_node_type * node) { + util_safe_free( node->filename ); + free( node ); +} + +void action_node_update(action_node_type * node, test_action_enum action , char * filename) { + util_safe_free( node->filename ); + node->filename = filename; /* Node takes ownership of filename. */ + node->action = action; +} + + +void apply_delete_file( const action_node_type * node , block_fs_type * fs , const char * file_path) { + if (block_fs_has_file( fs , node->filename)) { + char * filename = util_alloc_filename( file_path , node->filename , NULL ); + block_fs_unlink_file( fs , node->filename ); + unlink( filename ); + free( filename ); + } +} + +void apply_check( block_fs_type * fs , const char * file_path ) { + char * buffer1 = NULL; + char * buffer2 = NULL; + + int current_size = 0; + vector_type * files = block_fs_alloc_filelist( fs , NULL , NO_SORT , false ); + int i; + for (i=0; i < vector_get_size( files ); i++) { + const user_file_node_type * node = vector_iget_const( files , i ); + int size = user_file_node_get_data_size( node ); + if (size > current_size) { + current_size = size; + buffer1 = util_realloc( buffer1 , current_size ); + buffer2 = util_realloc( buffer2 , current_size ); + } + block_fs_fread_file( fs , user_file_node_get_filename( node ) , buffer1 ); + { + char * filename = util_alloc_filename( file_path , user_file_node_get_filename( node ) , NULL); + FILE * stream = util_fopen( filename , "r"); + util_fread( buffer2 , 1 , size , stream , __func__); + fclose( stream ); + free( filename ); + } + if (memcmp( buffer1 , buffer2 , size ) != 0) + fprintf(stderr,"Fatal error ..\n"); + } + vector_free( files ); + free( buffer1 ); + free( buffer2 ); + printf("CHeck OK \n"); +} + + +void apply_write_file( const action_node_type * node , block_fs_type * fs , const char * file_path) { + const int short_min = 128; + const int short_max = 256; + const int long_min = 4096; + const int long_max = 32000; + const double p_short = 0.75; + int length; + + + { + int min,max; + double R = rand() * 1.0 / RAND_MAX; + if (R < p_short) { + min = short_min; + max = short_max; + } else { + min = long_min; + max = long_max; + } + length = min + (rand() % (max - min + 1)); + } + { + char * buffer = util_malloc( length * sizeof * buffer ); + int i; + for (i=0; i < length; i++) + buffer[i] = rand() % 256; + block_fs_fwrite_file( fs , node->filename , buffer , length); + { + char * filename = util_alloc_filename( file_path , node->filename , NULL ); + FILE * stream = util_fopen( filename , "w"); + util_fwrite( buffer , 1 , length , stream , __func__ ); + fclose( stream ); + free(filename); + } + free( buffer ); + } +} + + + +void apply( const action_node_type ** action_list , int action_length, block_fs_type * fs , const char * file_path) { + int i; + for (i=0; i < action_length; i++) { + const action_node_type * node = action_list[i]; + switch( node->action) { + case WRITE_FILE: + apply_write_file( node , fs , file_path ); + break; + case DELETE_FILE: + apply_delete_file( node , fs , file_path ); + break; + case CHECK: + apply_check( fs , file_path ); + break; + case ROTATE: + block_fs_rotate( fs , 0.00 ); + break; + default: + util_abort("Unrecognized enum value:%d \n", node->action ); + } + } +} + + +int main(int argc, char ** argv) { + + const char * test_path = "/tmp/block_fs"; + const char * file_fmt = "file_%04d"; + char * file_path = util_alloc_filename( test_path , "files" , NULL ); + char * test_mnt = util_alloc_filename( test_path , "FORECAST" , "mnt"); + char * test_log = util_alloc_filename( test_path , "test" , "log"); + + const int test_run = 10; + const int block_size = 1000; + const int max_files = 1000; + + const int fs_block_size = 32; + const int cache_size = 2048; + const float frag_limit = 0.25; + const int fsync_interval = 100; + const bool preload = false; + int run = 0; + + block_fs_type * block_fs = block_fs_mount( test_mnt , fs_block_size , cache_size , frag_limit , fsync_interval , preload , false ); + + action_node_type ** action_list = util_malloc( block_size * sizeof * action_list ); + { + int i; + for (i=0; i < block_size; i++) { + action_list[i] = action_node_alloc_new( ); + } + } + + while ( run < test_run) { + int action_nr = 0; + + run++; + while (action_nr < (block_size - 2)) { + char * filename = NULL; + int R = rand() % 3; + if (R == 0) { + /* Delete file */ + filename = util_alloc_sprintf( file_fmt , rand() % max_files ); + action_node_update( action_list[ action_nr ] , DELETE_FILE , filename ); + } else { + /* Create file */ + filename = util_alloc_sprintf( file_fmt , rand() % max_files ); + action_node_update( action_list[ action_nr ] , WRITE_FILE , filename ); + } + + action_nr++; + } + action_node_update( action_list[ block_size - 2] , ROTATE , NULL); + action_node_update( action_list[ block_size - 1] , CHECK , NULL); + + apply( (const action_node_type **) action_list , block_size , block_fs , file_path ); + //fprintf_log( log_stream , action_list , block_size ); + printf("*"); fflush( stdout ); + } + + { + int i; + for (i=0; i < block_size; i++) + action_node_free( action_list[i] ); + + } + free( action_list ); + block_fs_close( block_fs , true); + + free( file_path ); + free( test_mnt ); + free( test_log ); +} diff --git a/ThirdParty/Ert/libert_util/applications/block_fs/bls.c b/ThirdParty/Ert/libert_util/applications/block_fs/bls.c new file mode 100644 index 0000000000..ed1376b6ba --- /dev/null +++ b/ThirdParty/Ert/libert_util/applications/block_fs/bls.c @@ -0,0 +1,77 @@ +/* + Copyright (C) 2011 Statoil ASA, Norway. + + The file 'bls.c' is part of ERT - Ensemble based Reservoir Tool. + + ERT 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. + + ERT 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 + for more details. +*/ + +#include + +#include +#include +#include + + +void install_SIGNALS(void) { + signal(SIGSEGV , util_abort_signal); /* Segmentation violation, i.e. overwriting memory ... */ + signal(SIGINT , util_abort_signal); /* Control C */ + signal(SIGTERM , util_abort_signal); /* If killing the enkf program with SIGTERM (the default kill signal) you will get a backtrace. Killing with SIGKILL (-9) will not give a backtrace.*/ +} + + +static int usage( void ) { + fprintf(stderr,"\n"); + fprintf(stderr,"Usage:\n\n"); + fprintf(stderr," bash%% bls BLOCK_FILE.mnt \n\n"); + fprintf(stderr,"Will list all elements in BLOCK_FILE matching pattern - remember to quote wildcards.\n"); + exit(1); +} + + +int main(int argc , char ** argv) { + install_SIGNALS(); + if (argc == 1) + usage(); + { + const char * mount_file = argv[1]; + if (block_fs_is_mount(mount_file)) { + block_fs_sort_type sort_mode = OFFSET_SORT; + const char * pattern = NULL; + int iarg; + + for (iarg = 2; iarg < argc; iarg++) { + if (argv[iarg][0] == '-') { + /** OK - this is an option .. */ + } + else + pattern = argv[iarg]; + } + + { + block_fs_type * block_fs = block_fs_mount(mount_file , 1 , 0 , 1 , 0 , false , true , false); + vector_type * files = block_fs_alloc_filelist( block_fs , pattern , sort_mode , false ); + { + int i; + for (i=0; i < vector_get_size( files ); i++) { + const user_file_node_type * node = vector_iget_const( files , i ); + printf("%-40s %10d %ld \n",user_file_node_get_filename( node ), user_file_node_get_data_size( node ) , user_file_node_get_node_offset( node )); + } + } + vector_free( files ); + block_fs_close( block_fs , false ); + } + } else + fprintf(stderr,"The file:%s does not seem to be a block_fs mount file.\n" , mount_file); + } +} diff --git a/ThirdParty/Ert/libert_util/applications/block_fs/brm.c b/ThirdParty/Ert/libert_util/applications/block_fs/brm.c new file mode 100644 index 0000000000..45aa2278c5 --- /dev/null +++ b/ThirdParty/Ert/libert_util/applications/block_fs/brm.c @@ -0,0 +1,73 @@ +/* + Copyright (C) 2011 Statoil ASA, Norway. + + The file 'brm.c' is part of ERT - Ensemble based Reservoir Tool. + + ERT 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. + + ERT 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 + for more details. +*/ + +#include +#include +#include +#include +#include + + +void install_SIGNALS(void) { + signal(SIGSEGV , util_abort_signal); /* Segmentation violation, i.e. overwriting memory ... */ + signal(SIGINT , util_abort_signal); /* Control C */ + signal(SIGTERM , util_abort_signal); /* If killing the enkf program with SIGTERM (the default kill signal) you will get a backtrace. Killing with SIGKILL (-9) will not give a backtrace.*/ +} + + +int main(int argc , char ** argv) { + install_SIGNALS(); + const char * mount_file = argv[1]; + if (block_fs_is_mount(mount_file)) { + block_fs_sort_type sort_mode = OFFSET_SORT; + const char * pattern = NULL; + int iarg; + + for (iarg = 2; iarg < argc; iarg++) { + if (argv[iarg][0] == '-') { + /** OK - this is an option .. */ + } + else pattern = argv[iarg]; + } + + { + block_fs_type * block_fs = block_fs_mount(mount_file , 1 , 0 , 1 , 0 , false , false ); + vector_type * files = block_fs_alloc_filelist( block_fs , pattern , sort_mode , false ); + { + int i; + msg_type * msg = msg_alloc("Deleting file: " , false); + msg_show( msg ); + //for (i=0; i < vector_get_size( files ); i++) { + // const user_file_node_type * node = vector_iget_const( files , i ); + // printf("%-40s %10d %ld \n",user_file_node_get_filename( node ), user_file_node_get_data_size( node ) , user_file_node_get_node_offset( node )); + //} + + for (i=0; i < vector_get_size( files ); i++) { + const user_file_node_type * node = vector_iget_const( files , i ); + msg_update( msg , user_file_node_get_filename( node ) ); + block_fs_unlink_file( block_fs , user_file_node_get_filename( node )); + } + msg_free( msg , true ); + printf("Final fragmentation: %5.2f \n", block_fs_get_fragmentation( block_fs )); + } + vector_free( files ); + block_fs_close( block_fs , false ); + } + } else + fprintf(stderr,"The file:%s does not seem to be a block_fs mount file.\n" , mount_file); +} diff --git a/ThirdParty/Ert/libert_util/applications/block_fs/brot.c b/ThirdParty/Ert/libert_util/applications/block_fs/brot.c new file mode 100644 index 0000000000..c6a752e506 --- /dev/null +++ b/ThirdParty/Ert/libert_util/applications/block_fs/brot.c @@ -0,0 +1,41 @@ +/* + Copyright (C) 2011 Statoil ASA, Norway. + + The file 'brot.c' is part of ERT - Ensemble based Reservoir Tool. + + ERT 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. + + ERT 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 + for more details. +*/ + +#include +#include +#include +#include +#include + + +void install_SIGNALS(void) { + signal(SIGSEGV , util_abort_signal); /* Segmentation violation, i.e. overwriting memory ... */ + signal(SIGINT , util_abort_signal); /* Control C */ + signal(SIGTERM , util_abort_signal); /* If killing the enkf program with SIGTERM (the default kill signal) you will get a backtrace. Killing with SIGKILL (-9) will not give a backtrace.*/ +} + + +int main(int argc , char ** argv) { + install_SIGNALS(); + const char * mount_file = argv[1]; + if (block_fs_is_mount(mount_file)) { + block_fs_type * block_fs = block_fs_mount(mount_file , 1 , 0 , 1 , 0 , false , false ); + block_fs_rotate( block_fs , 0.00 ); + block_fs_close( block_fs , false ); + } +} diff --git a/ThirdParty/Ert/libert_util/include/ert/util/ert_api_config.h.in b/ThirdParty/Ert/libert_util/include/ert/util/ert_api_config.h.in index 5dfd4b0cc4..11b43d6b19 100644 --- a/ThirdParty/Ert/libert_util/include/ert/util/ert_api_config.h.in +++ b/ThirdParty/Ert/libert_util/include/ert/util/ert_api_config.h.in @@ -15,6 +15,6 @@ #cmakedefine ERT_TIME_T_64BIT_ACCEPT_PRE1970 #cmakedefine ERT_WINDOWS_LFS #cmakedefine ERT_HAVE_PING - +#cmakedefine PING_CMD "@PING_PATH@" diff --git a/ThirdParty/Ert/libert_util/include/ert/util/hash.h b/ThirdParty/Ert/libert_util/include/ert/util/hash.h index 0183094615..dcc862f0cc 100644 --- a/ThirdParty/Ert/libert_util/include/ert/util/hash.h +++ b/ThirdParty/Ert/libert_util/include/ert/util/hash.h @@ -37,8 +37,8 @@ UTIL_SAFE_CAST_HEADER_CONST(hash); void hash_lock (hash_type * ); void hash_unlock(hash_type * ); -hash_type * hash_alloc(); -hash_type * hash_alloc_unlocked(); +hash_type * hash_alloc(void); +hash_type * hash_alloc_unlocked(void); void hash_iter_complete(hash_type * ); void hash_free(hash_type *); void hash_free__(void *); diff --git a/ThirdParty/Ert/libert_util/include/ert/util/matrix.h b/ThirdParty/Ert/libert_util/include/ert/util/matrix.h index 40277eba89..cdbcc26640 100644 --- a/ThirdParty/Ert/libert_util/include/ert/util/matrix.h +++ b/ThirdParty/Ert/libert_util/include/ert/util/matrix.h @@ -77,6 +77,7 @@ typedef struct matrix_struct matrix_type; void matrix_pretty_fprint(const matrix_type * matrix , const char * name , const char * fmt , FILE * stream); void matrix_pretty_fprint_submat(const matrix_type * matrix , const char * name , const char * fmt , FILE * stream, int m, int M, int n, int N); matrix_type * matrix_alloc(int rows, int columns); + matrix_type * matrix_alloc_identity(int dim); matrix_type * matrix_safe_alloc(int rows, int columns); bool matrix_resize(matrix_type * matrix , int rows , int columns , bool copy_content); bool matrix_safe_resize(matrix_type * matrix , int rows , int columns , bool copy_content); diff --git a/ThirdParty/Ert/libert_util/include/ert/util/stepwise.h b/ThirdParty/Ert/libert_util/include/ert/util/stepwise.h index b70c0921c4..f1eb0a4f21 100644 --- a/ThirdParty/Ert/libert_util/include/ert/util/stepwise.h +++ b/ThirdParty/Ert/libert_util/include/ert/util/stepwise.h @@ -11,7 +11,7 @@ extern "C" { typedef struct stepwise_struct stepwise_type; - stepwise_type * stepwise_alloc1(int nsample, int nvar, rng_type * rng); + stepwise_type * stepwise_alloc1(int nsample, int nvar, rng_type * rng, const matrix_type* St, const matrix_type* Et); stepwise_type * stepwise_alloc0(rng_type * rng); void stepwise_free( stepwise_type * stepwise); diff --git a/ThirdParty/Ert/libert_util/include/ert/util/stringlist.h b/ThirdParty/Ert/libert_util/include/ert/util/stringlist.h index 3441488aaf..143fa42739 100644 --- a/ThirdParty/Ert/libert_util/include/ert/util/stringlist.h +++ b/ThirdParty/Ert/libert_util/include/ert/util/stringlist.h @@ -40,7 +40,7 @@ typedef int ( string_cmp_ftype) (const void * , const void *); stringlist_type * stringlist_alloc_deep_copy_with_offset(const stringlist_type * src , int offset); stringlist_type * stringlist_alloc_deep_copy( const stringlist_type * src ); - stringlist_type * stringlist_alloc_new(); + stringlist_type * stringlist_alloc_new(void); void stringlist_free__(void * ); void stringlist_free(stringlist_type *); void stringlist_clear(stringlist_type * ); diff --git a/ThirdParty/Ert/libert_util/include/ert/util/struct_vector.h b/ThirdParty/Ert/libert_util/include/ert/util/struct_vector.h index 58a9804966..79f56ffe18 100644 --- a/ThirdParty/Ert/libert_util/include/ert/util/struct_vector.h +++ b/ThirdParty/Ert/libert_util/include/ert/util/struct_vector.h @@ -26,14 +26,18 @@ extern "C" { typedef struct struct_vector_struct struct_vector_type; - +typedef int ( struct_vector_cmp_ftype ) (const void * , const void *); struct_vector_type * struct_vector_alloc( int element_size ); void struct_vector_free( struct_vector_type * struct_vector ); int struct_vector_get_size( const struct_vector_type * struct_vector ); void struct_vector_append( struct_vector_type * struct_vector , void * value); void struct_vector_iget( const struct_vector_type * struct_vector , int index , void * value); + void * struct_vector_iget_ptr( const struct_vector_type * struct_vector , int index); void struct_vector_reset( struct_vector_type * struct_vector ); + void struct_vector_reserve( struct_vector_type * struct_vector , int reserve_size); + void * struct_vector_get_data( const struct_vector_type * struct_vector ); + void struct_vector_sort( struct_vector_type * struct_vector , struct_vector_cmp_ftype * cmp); UTIL_IS_INSTANCE_HEADER( struct_vector ); diff --git a/ThirdParty/Ert/libert_util/include/ert/util/test_util.h b/ThirdParty/Ert/libert_util/include/ert/util/test_util.h index 8c68dbe8f8..131ef67735 100644 --- a/ThirdParty/Ert/libert_util/include/ert/util/test_util.h +++ b/ThirdParty/Ert/libert_util/include/ert/util/test_util.h @@ -26,6 +26,7 @@ extern "C" { #include #include +#include #include #if defined(__APPLE__) @@ -123,6 +124,11 @@ extern "C" { void test_install_SIGNALS(void); + jmp_buf * util_abort_test_jump_buffer(); + void test_util_addr2line(); + void test_assert_util_abort(const char * function_name , void call_func (void *) , void * arg); + + #ifdef __cplusplus } #endif diff --git a/ThirdParty/Ert/libert_util/include/ert/util/test_util_abort.h b/ThirdParty/Ert/libert_util/include/ert/util/test_util_abort.h deleted file mode 100644 index 2a2ad843ff..0000000000 --- a/ThirdParty/Ert/libert_util/include/ert/util/test_util_abort.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA, Norway. - - The file 'test_util_abort.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -/* - This header is purely a convenience header - it is not installed. -*/ - -#ifndef ERT_TEST_UTIL_ABORT -#define ERT_TEST_UTIL_ABORT - -#ifdef __cplusplus -extern "C" { -#endif - -#include - - jmp_buf * util_abort_test_jump_buffer(); - void test_util_addr2line(); - void test_assert_util_abort(const char * function_name , void call_func (void *) , void * arg); - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/ThirdParty/Ert/libert_util/include/ert/util/type_macros.h b/ThirdParty/Ert/libert_util/include/ert/util/type_macros.h index b9d8cf5c26..21b680eab3 100644 --- a/ThirdParty/Ert/libert_util/include/ert/util/type_macros.h +++ b/ThirdParty/Ert/libert_util/include/ert/util/type_macros.h @@ -44,17 +44,17 @@ extern "C" { -#define UTIL_IS_INSTANCE_FUNCTION(type , TYPE_ID) \ -bool type ## _is_instance( const void * __arg ) { \ - if (__arg == NULL) \ - return false; \ - else { \ - const type ## _type * arg = (type ## _type *) __arg; \ - if ( arg->__type_id == TYPE_ID) \ - return true; \ - else \ - return false; \ - } \ +#define UTIL_IS_INSTANCE_FUNCTION(type , TYPE_ID) \ +bool type ## _is_instance( const void * __arg ) { \ + if (__arg == NULL) \ + return false; \ + else { \ + const type ## _type * arg = (const type ## _type * ) __arg; \ + if ( arg->__type_id == TYPE_ID) \ + return true; \ + else \ + return false; \ + } \ } diff --git a/ThirdParty/Ert/libert_util/include/ert/util/util.h b/ThirdParty/Ert/libert_util/include/ert/util/util.h index f59281475a..d8a134d8d1 100644 --- a/ThirdParty/Ert/libert_util/include/ert/util/util.h +++ b/ThirdParty/Ert/libert_util/include/ert/util/util.h @@ -101,7 +101,7 @@ typedef enum {left_pad = 0, //#define UTIL_CXX_MALLOC(var , num_elm) (typeof (var)) util_malloc( (num_elm) * sizeof var) void util_bitmask_on(int * , int ); - char * util_get_timezone(); + char * util_get_timezone(void); time_t util_make_datetime_utc(int , int , int , int , int , int ); void util_fprintf_date_utc(time_t , FILE * ); time_t util_make_date_utc(int , int , int); @@ -119,7 +119,7 @@ typedef enum {left_pad = 0, bool util_file_older( const char * file , time_t t0); char * util_alloc_date_string_utc( time_t t ); - char * util_alloc_date_stamp_utc( ); + char * util_alloc_date_stamp_utc( void ); double util_pow10(double x); bool util_char_in(char c, int , const char *); @@ -134,7 +134,7 @@ typedef enum {left_pad = 0, bool util_sscanf_date_utc(const char * , time_t *); bool util_sscanf_isodate(const char * , time_t *); bool util_sscanf_percent(const char * string, double * value); - char * util_alloc_stdin_line(); + char * util_alloc_stdin_line(void); char * util_realloc_stdin_line(char * ); bool util_is_executable(const char * ); bool util_entry_exists( const char * entry ); @@ -174,7 +174,7 @@ typedef enum {left_pad = 0, bool util_ftruncate(FILE * stream , long size); void util_usleep( unsigned long micro_seconds ); - void util_yield(); + void util_yield(void); char * util_blocking_alloc_stdin_line(unsigned long ); int util_roundf( float x ); @@ -288,12 +288,14 @@ typedef enum {left_pad = 0, void util_fread_from_buffer(void * , size_t , size_t , char ** ); - unsigned int util_clock_seed( ); + unsigned int util_clock_seed( void ); void util_fread_dev_random(int , char * ); void util_fread_dev_urandom(int , char * ); bool util_string_isspace(const char * s); - char * util_alloc_dump_filename(); + char * util_alloc_dump_filename(void); + void util_abort_test_set_intercept_function(const char *); + bool util_addr2line_lookup(const void *, char **, char **, int *); void util_exit(const char * fmt , ...); void util_install_signals(void); void util_update_signals(void); @@ -374,12 +376,12 @@ typedef enum {left_pad = 0, bool util_files_equal( const char * file1 , const char * file2 ); double util_kahan_sum(const double *data, size_t N); bool util_double_approx_equal( double d1 , double d2); - bool util_double_approx_equal__( double d1 , double d2, double epsilon); - bool util_float_approx_equal__( float d1 , float d2, float epsilon); + bool util_double_approx_equal__( double d1 , double d2, double rel_eps, double abs_eps); + bool util_float_approx_equal__( float d1 , float d2, float rel_eps, float abs_eps); int util_fnmatch( const char * pattern , const char * string ); void util_time_utc( time_t * t , struct tm * ts ); - char ** util_alloc_PATH_list(); + char ** util_alloc_PATH_list(void); char * util_alloc_PATH_executable(const char * executable ); char * util_isscanf_alloc_envvar( const char * string , int env_index ); void util_setenv( const char * variable , const char * value); @@ -493,7 +495,7 @@ const char * util_enum_iget( int index , int size , const util_enum_element_type void util_abort__(const char * file , const char * function , int line , const char * fmt , ...); void util_abort_signal(int ); void util_abort_append_version_info(const char * ); -void util_abort_free_version_info(); +void util_abort_free_version_info(void); void util_abort_set_executable( const char * argv0 ); diff --git a/ThirdParty/Ert/libert_util/include/ert/util/vector.h b/ThirdParty/Ert/libert_util/include/ert/util/vector.h index fe3f53e964..415e9f4f9d 100644 --- a/ThirdParty/Ert/libert_util/include/ert/util/vector.h +++ b/ThirdParty/Ert/libert_util/include/ert/util/vector.h @@ -32,7 +32,7 @@ extern "C" { typedef struct vector_struct vector_type; - vector_type * vector_alloc_new(); + vector_type * vector_alloc_new(void); void vector_grow_NULL( vector_type * vector , int new_size ); vector_type * vector_alloc_NULL_initialized( int size ); diff --git a/ThirdParty/Ert/libert_util/src/CMakeLists.txt b/ThirdParty/Ert/libert_util/src/CMakeLists.txt index ec6cbde855..e2a9d9c228 100644 --- a/ThirdParty/Ert/libert_util/src/CMakeLists.txt +++ b/ThirdParty/Ert/libert_util/src/CMakeLists.txt @@ -33,6 +33,7 @@ set(source_files ert_version.c struct_vector.c perm_vector.c + test_util.c ) set(header_files @@ -71,10 +72,9 @@ set(header_files buffer_string.h perm_vector.h ert_version.h + test_util.h ) -set( test_source test_util.c ) -set( test_headers test_util.h ) # Add compile time variable values to ert_version.c @@ -161,12 +161,7 @@ if (ERT_BUILD_CXX) list( APPEND header_files test_util.hpp ) endif() -add_library( ert_util ${LIBRARY_TYPE} ${source_files} ) -if (BUILD_TESTS) - add_library( test_util ${LIBRARY_TYPE} ${test_source} ) - target_link_libraries( test_util ert_util ) - set_target_properties( test_util PROPERTIES VERSION ${ERT_VERSION_MAJOR}.${ERT_VERSION_MINOR} SOVERSION ${ERT_VERSION_MAJOR} ) -endif() +add_library( ert_util ${source_files} ) message(STATUS "Linking with: ${ERT_EXTERNAL_UTIL_LIBS}") set_target_properties( ert_util PROPERTIES VERSION ${ERT_VERSION_MAJOR}.${ERT_VERSION_MINOR} SOVERSION ${ERT_VERSION_MAJOR} ) diff --git a/ThirdParty/Ert/libert_util/src/matrix.c b/ThirdParty/Ert/libert_util/src/matrix.c index 8f0c169869..1734d67133 100644 --- a/ThirdParty/Ert/libert_util/src/matrix.c +++ b/ThirdParty/Ert/libert_util/src/matrix.c @@ -277,6 +277,16 @@ matrix_type * matrix_safe_alloc(int rows, int columns) { return matrix_alloc__( rows , columns , true ); } +matrix_type * matrix_alloc_identity(int dim) { + if (dim < 1) + util_abort("%s: identity matrix must have positive size. \n",__func__); + + matrix_type * idty = matrix_alloc(dim, dim); + for (int i = 0; i < dim; ++i) + matrix_iset(idty, i, i, 1); + return idty; +} + /*****************************************************************/ /** diff --git a/ThirdParty/Ert/libert_util/src/matrix_blas.c b/ThirdParty/Ert/libert_util/src/matrix_blas.c index d4d2d6c37b..2ac5438433 100644 --- a/ThirdParty/Ert/libert_util/src/matrix_blas.c +++ b/ThirdParty/Ert/libert_util/src/matrix_blas.c @@ -181,7 +181,7 @@ void matrix_dgemm(matrix_type *C , const matrix_type *A , const matrix_type * B util_abort("%s: matrix size mismatch between B and C \n",__func__); } - if (!ldc >= util_int_max(1 , m)) { + if (ldc < util_int_max(1 , m)) { dgemm_debug(C,A,B,transA , transB); fprintf(stderr,"Tried to capture blas message: \"** On entry to DGEMM parameter 13 had an illegal value\"\n"); fprintf(stderr,"m:%d ldc:%d ldc should be >= max(1,%d) \n",m,ldc,m); diff --git a/ThirdParty/Ert/libert_util/src/stepwise.c b/ThirdParty/Ert/libert_util/src/stepwise.c index 86a91fb12b..8f7556730f 100644 --- a/ThirdParty/Ert/libert_util/src/stepwise.c +++ b/ThirdParty/Ert/libert_util/src/stepwise.c @@ -18,7 +18,6 @@ struct stepwise_struct { matrix_type * X0; // Externally supplied data. matrix_type * E0; // Externally supplied data. matrix_type * Y0; - bool data_owner; // Does the stepwise estimator own the data matrices X0 and Y0? matrix_type * beta; // Quantities estimated by the stepwise algorithm double Y_mean; @@ -37,11 +36,11 @@ static double stepwise_estimate__( stepwise_type * stepwise , bool_vector_type * matrix_type * Y; double y_mean = 0; - int nvar = matrix_get_columns( stepwise->X0 ); - int nsample = matrix_get_rows( stepwise->X0 ); + int ncols = matrix_get_columns( stepwise->X0 ); + int nrows = matrix_get_rows( stepwise->X0 ); - nsample = bool_vector_count_equal( active_rows , true ); - nvar = bool_vector_count_equal( stepwise->active_set , true ); + int nsample = bool_vector_count_equal( active_rows , true ); + int nvar = bool_vector_count_equal( stepwise->active_set , true ); matrix_set( stepwise->beta , 0 ); // It is essential to make sure that old finite values in the beta0 vector do not hang around. @@ -54,7 +53,7 @@ static double stepwise_estimate__( stepwise_type * stepwise , bool_vector_type * should be used for regression, versus which should be used for validation (@active_rows). */ - if ((nsample < matrix_get_rows( stepwise->X0 )) || (nvar < matrix_get_columns( stepwise->X0 ))) { + if ((nsample < nrows) || (nvar < ncols)) { X = matrix_alloc( nsample , nvar ); E = matrix_alloc( nsample , nvar ); Y = matrix_alloc( nsample , 1); @@ -63,10 +62,10 @@ static double stepwise_estimate__( stepwise_type * stepwise , bool_vector_type * int icol,irow; // Running over all values. int arow,acol; // Running over active values. arow = 0; - for (irow = 0; irow < matrix_get_rows( stepwise->X0 ); irow++) { + for (irow = 0; irow < nrows; irow++) { if (bool_vector_iget( active_rows , irow )) { acol = 0; - for (icol = 0; icol < matrix_get_columns( stepwise->X0 ); icol++) { + for (icol = 0; icol < ncols; icol++) { if (bool_vector_iget( stepwise->active_set , icol )) { matrix_iset( X , arow , acol , matrix_iget( stepwise->X0 , irow , icol )); matrix_iset( E , arow , acol , matrix_iget( stepwise->E0 , irow , icol )); @@ -111,7 +110,7 @@ static double stepwise_estimate__( stepwise_type * stepwise , bool_vector_type * { int ivar,avar; avar = 0; - for (ivar = 0; ivar < matrix_get_columns( stepwise->X0 ); ivar++) { + for (ivar = 0; ivar < ncols; ivar++) { if (bool_vector_iget( stepwise->active_set , ivar )) { matrix_iset( stepwise->beta , ivar , 0 , matrix_iget( beta , avar , 0)); avar++; @@ -336,7 +335,6 @@ stepwise_type * stepwise_alloc0( rng_type * rng) { stepwise->Y0 = NULL; stepwise->beta = NULL; stepwise->active_set = NULL; - stepwise->data_owner = true; stepwise->X_mean = NULL; stepwise->X_norm = NULL; stepwise->Y_mean = 0.0; @@ -347,40 +345,27 @@ stepwise_type * stepwise_alloc0( rng_type * rng) { -stepwise_type * stepwise_alloc1( int nsample , int nvar, rng_type * rng) { +stepwise_type * stepwise_alloc1( int nsample , int nvar, rng_type * rng, const matrix_type* St, const matrix_type* Et) { stepwise_type * stepwise = stepwise_alloc__( nsample , nvar , rng); stepwise->rng = rng; - stepwise->X0 = matrix_alloc( nsample , nvar ); - stepwise->E0 = matrix_alloc( nsample , nvar ); - stepwise->Y0 = matrix_alloc( nsample , 1 ); - stepwise->data_owner = true; + stepwise->X0 = matrix_alloc_copy(St); // It would be nice to get rid of these copies, but due to data race it is not possible at the moment + stepwise->E0 = matrix_alloc_copy(Et); + stepwise->Y0 = NULL; //matrix_alloc( nsample , 1 ); return stepwise; } void stepwise_set_Y0( stepwise_type * stepwise , matrix_type * Y) { - if (stepwise->Y0 != NULL) { - matrix_free( stepwise->Y0 ); - } - stepwise->Y0 = Y; } void stepwise_set_X0( stepwise_type * stepwise , matrix_type * X) { - if (stepwise->X0 != NULL) - matrix_free( stepwise->X0 ); - - stepwise->X0 = X; } void stepwise_set_E0( stepwise_type * stepwise , matrix_type * E) { - if (stepwise->E0 != NULL) - matrix_free( stepwise->E0 ); - - stepwise->E0 = E; } @@ -454,7 +439,6 @@ void stepwise_free( stepwise_type * stepwise ) { matrix_free( stepwise->beta ); - if (stepwise->X_mean != NULL) matrix_free( stepwise->X_mean ); @@ -463,13 +447,10 @@ void stepwise_free( stepwise_type * stepwise ) { matrix_free( stepwise->X_norm ); + matrix_free( stepwise->X0 ); + matrix_free( stepwise->E0 ); + matrix_free( stepwise->Y0 ); - if (stepwise->data_owner) { - matrix_free( stepwise->X0 ); - matrix_free( stepwise->E0 ); - matrix_free( stepwise->Y0 ); - } free( stepwise ); - } diff --git a/ThirdParty/Ert/libert_util/src/struct_vector.c b/ThirdParty/Ert/libert_util/src/struct_vector.c index a60dd086b2..9f17b8e0c0 100644 --- a/ThirdParty/Ert/libert_util/src/struct_vector.c +++ b/ThirdParty/Ert/libert_util/src/struct_vector.c @@ -1,19 +1,19 @@ /* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'struct_vector.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. + Copyright (C) 2014 Statoil ASA, Norway. + + The file 'struct_vector.c' is part of ERT - Ensemble based Reservoir Tool. + + ERT 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. + + ERT 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 + for more details. */ #include @@ -30,7 +30,7 @@ struct struct_vector_struct { int size; int element_size; int alloc_size; - + char * data; }; @@ -43,6 +43,12 @@ static void struct_vector_resize( struct_vector_type * struct_vector , int new_a } +void struct_vector_reserve( struct_vector_type * struct_vector , int reserve_size) { + if (reserve_size > struct_vector->alloc_size) + struct_vector_resize( struct_vector , reserve_size ); +} + + struct_vector_type * struct_vector_alloc( int element_size ) { if (element_size <= 0) { @@ -57,9 +63,9 @@ struct_vector_type * struct_vector_alloc( int element_size ) { vector->alloc_size = 0; vector->element_size = element_size; vector->data = NULL; - + struct_vector_resize( vector , 10 ); - + return vector; } } @@ -88,6 +94,10 @@ void struct_vector_append( struct_vector_type * struct_vector , void * value) { } +void * struct_vector_get_data( const struct_vector_type * struct_vector ) { + return struct_vector->data; +} + void struct_vector_iget( const struct_vector_type * struct_vector , int index , void * value) { if (index < struct_vector->size) { @@ -98,7 +108,21 @@ void struct_vector_iget( const struct_vector_type * struct_vector , int index , } +void * struct_vector_iget_ptr( const struct_vector_type * struct_vector , int index ) { + if (index < struct_vector->size) { + size_t offset = index * struct_vector->element_size; + return &struct_vector->data[offset]; + } else + util_abort("%s: fatal error - invalid index:%d size:%d\n",__func__ , index , struct_vector->size); + return NULL; +} + void struct_vector_reset( struct_vector_type * struct_vector ) { struct_vector->size = 0; } + + +void struct_vector_sort( struct_vector_type * struct_vector , struct_vector_cmp_ftype * cmp) { + qsort(struct_vector->data , struct_vector->size , struct_vector->element_size , cmp); +} diff --git a/ThirdParty/Ert/libert_util/src/test_util.c b/ThirdParty/Ert/libert_util/src/test_util.c index 269dbf331d..760f37d9af 100644 --- a/ThirdParty/Ert/libert_util/src/test_util.c +++ b/ThirdParty/Ert/libert_util/src/test_util.c @@ -29,7 +29,7 @@ #include #include #include - +#include void test_error_exit( const char * fmt , ...) { char * s; @@ -229,7 +229,7 @@ void test_assert_mem_not_equal__( const void * p1 , const void * p2 , size_t byt bool test_check_double_equal( double d1 , double d2) { const double tolerance = 1e-5; - return util_double_approx_equal__( d1 , d2 , tolerance ); + return util_double_approx_equal__( d1 , d2 , tolerance , 0); } @@ -246,7 +246,7 @@ void test_assert_double_not_equal__( double d1 , double d2, const char * file , bool test_check_float_equal( float d1 , float d2) { const float tolerance = 1e-4; - return util_float_approx_equal__( d1 , d2 , tolerance ); + return util_float_approx_equal__( d1 , d2 , tolerance , 0); } @@ -287,12 +287,6 @@ void test_install_SIGNALS(void) { #ifdef HAVE_BACKTRACE #include -#include - - bool util_addr2line_lookup(const void * bt_addr , char ** func_name , char ** file_name , int * line_nr); - jmp_buf * util_abort_test_jump_buffer(); - void util_abort_test_set_intercept_function(const char * function); - void test_util_addr2line() { @@ -315,12 +309,6 @@ void test_util_addr2line() { } - - - - - - void test_assert_util_abort(const char * function_name , void call_func (void *) , void * arg) { bool util_abort_intercepted = false; @@ -343,6 +331,27 @@ void test_assert_util_abort(const char * function_name , void call_func (void *) } } +#else + +/* + These are non-functional stubs. +*/ + +bool util_addr2line_lookup(const void * bt_addr , char ** func_name , char ** file_name , int * line_nr) +{ + return false; +} + +jmp_buf * util_abort_test_jump_buffer() +{ + return NULL; +} + +void util_abort_test_set_intercept_function(const char * function) +{ + return; +} + #endif diff --git a/ThirdParty/Ert/libert_util/src/test_work_area.c b/ThirdParty/Ert/libert_util/src/test_work_area.c index f9010eaf91..2ca36ac7c9 100644 --- a/ThirdParty/Ert/libert_util/src/test_work_area.c +++ b/ThirdParty/Ert/libert_util/src/test_work_area.c @@ -137,8 +137,9 @@ static test_work_area_type * test_work_area_alloc__(const char * prefix , const work_area->original_cwd = util_alloc_cwd(); work_area->cwd = test_cwd; work_area->change_dir = change_dir; - if (change_dir) - util_chdir( work_area->cwd ); + if (change_dir ) + if(util_chdir( work_area->cwd ) != 0) + util_abort("%s: Failed to move into temporary directory: %s", __func__, test_cwd); test_work_area_set_store( work_area , DEFAULT_STORE); diff --git a/ThirdParty/Ert/libert_util/src/type_vector_functions.c b/ThirdParty/Ert/libert_util/src/type_vector_functions.c index b7f0c60c21..8aab49197b 100644 --- a/ThirdParty/Ert/libert_util/src/type_vector_functions.c +++ b/ThirdParty/Ert/libert_util/src/type_vector_functions.c @@ -70,7 +70,7 @@ bool double_vector_approx_equal( const double_vector_type * v1 , const double_ve double d1 = double_vector_iget( v1 , i ); double d2 = double_vector_iget( v2 , i ); - if (!util_double_approx_equal__(d1 , d2 , epsilon)) + if (!util_double_approx_equal__(d1 , d2 , epsilon, 0.0)) equal = false; } } else diff --git a/ThirdParty/Ert/libert_util/src/util.c b/ThirdParty/Ert/libert_util/src/util.c index a55265b0dd..d0eaa9ce84 100644 --- a/ThirdParty/Ert/libert_util/src/util.c +++ b/ThirdParty/Ert/libert_util/src/util.c @@ -363,39 +363,52 @@ double util_kahan_sum(const double *data, size_t N) { } -bool util_float_approx_equal__( float d1 , float d2, float epsilon) { - if (d1 == d2) +bool util_float_approx_equal__( float d1 , float d2, float rel_eps, float abs_eps) { + if ((fabsf(d1) + fabsf(d2)) == 0) return true; else { - float diff = fabs(d1 - d2); - float sum = fabs(d1) + fabs(d2); - - if ((diff / sum) < epsilon) - return true; - else + float diff = fabsf(d1 - d2); + if ((abs_eps > 0) && (diff > abs_eps)) return false; + { + float sum = fabsf(d1) + fabsf(d2); + float rel_diff = diff / sum; + + if ((rel_eps > 0) && (rel_diff > rel_eps)) + return false; + } + return true; } } -bool util_double_approx_equal__( double d1 , double d2, double epsilon) { - if (d1 == d2) +/* + If an epsilon value is identically equal to zero that comparison + will be ignored. +*/ + +bool util_double_approx_equal__( double d1 , double d2, double rel_eps, double abs_eps) { + if ((fabs(d1) + fabs(d2)) == 0) return true; else { double diff = fabs(d1 - d2); - double sum = fabs(d1) + fabs(d2); - - if ((diff / sum) < epsilon) - return true; - else + if ((abs_eps > 0) && (diff > abs_eps)) return false; + { + double sum = fabs(d1) + fabs(d2); + double rel_diff = diff / sum; + + if ((rel_eps > 0) && (rel_diff > rel_eps)) + return false; + } + return true; } } bool util_double_approx_equal( double d1 , double d2) { double epsilon = 1e-6; - return util_double_approx_equal__( d1 , d2 , epsilon ); + return util_double_approx_equal__( d1 , d2 , epsilon , 0.0 ); } diff --git a/ThirdParty/Ert/libert_util/src/util_abort_gnu.c b/ThirdParty/Ert/libert_util/src/util_abort_gnu.c index 19084fcc1e..c595f3fe46 100644 --- a/ThirdParty/Ert/libert_util/src/util_abort_gnu.c +++ b/ThirdParty/Ert/libert_util/src/util_abort_gnu.c @@ -75,7 +75,7 @@ static bool util_addr2line_lookup__(const void * bt_addr , char ** func_name , c } /* 2: Parse stdout output */ - { + if (util_file_exists( stdout_file )) { bool at_eof; FILE * stream = util_fopen(stdout_file , "r"); char * tmp_fname = util_fscanf_alloc_line(stream , &at_eof); @@ -293,7 +293,7 @@ void util_abort__(const char * file , const char * function , int line , const c } fprintf(stderr, "\nSee file: %s for more details of the crash.\nSetting the environment variable \"ERT_SHOW_BACKTRACE\" will show the backtrace on stderr.\n", filename); } - + chmod(filename, 00644); // -rw-r--r-- free(filename); } @@ -304,4 +304,3 @@ void util_abort__(const char * file , const char * function , int line , const c /*****************************************************************/ - diff --git a/ThirdParty/Ert/libert_util/src/util_spawn.c b/ThirdParty/Ert/libert_util/src/util_spawn.c index 3c871b0229..2e9c11109c 100644 --- a/ThirdParty/Ert/libert_util/src/util_spawn.c +++ b/ThirdParty/Ert/libert_util/src/util_spawn.c @@ -66,7 +66,13 @@ pid_t util_spawn(const char *executable, int argc, const char **argv, const char pthread_mutex_lock( &spawn_mutex ); { - int spawn_status = posix_spawn(&pid , executable, &file_actions, NULL, __argv, environ); + int spawn_status; + if (util_is_executable(executable)) { // the executable is in current directory or an absolute path + spawn_status = posix_spawn(&pid, executable, &file_actions, NULL, __argv, environ); + } else { // Try to find executable in path + spawn_status = posix_spawnp(&pid, executable, &file_actions, NULL, __argv, environ); + } + if (spawn_status != 0) util_abort("%s: failed to spawn external command: \'%s\': %s \n", __func__, executable, strerror(spawn_status)); } diff --git a/ThirdParty/Ert/libert_util/tests/CMakeLists.txt b/ThirdParty/Ert/libert_util/tests/CMakeLists.txt index 33f9d5db2c..2142cab296 100644 --- a/ThirdParty/Ert/libert_util/tests/CMakeLists.txt +++ b/ThirdParty/Ert/libert_util/tests/CMakeLists.txt @@ -1,200 +1,196 @@ -# This should be a space separated list of up to three servers which -# will be tried out when testing the util_ping() functionality. The -# list of servers should behave like this: -# -# 1. First server - this should be an existing server which should return true. -# 2. This should be an invalid hostname - should return false. -# 3. This should be an valid host which does not answer ping - i.e currently off? -set(PING_SERVERS "" CACHE STRING "List of servers for testing ping") - - link_directories( ${ERT_BINARY_DIR}/libert_util/src ) add_executable( test_thread_pool test_thread_pool.c ) -target_link_libraries( test_thread_pool ert_util test_util ) -add_test( test_thread_pool valgrind --error-exitcode=1 --tool=memcheck ${EXECUTABLE_OUTPUT_PATH}/test_thread_pool ) +target_link_libraries( test_thread_pool ert_util ) + +find_library( VALGRIND NAMES valgr ) +if (VALGRIND) + add_test( test_thread_pool valgrind --error-exitcode=1 --tool=memcheck ${EXECUTABLE_OUTPUT_PATH}/test_thread_pool ) +else() + add_test( test_thread_pool ${EXECUTABLE_OUTPUT_PATH}/test_thread_pool ) +endif() add_executable( ert_util_matrix ert_util_matrix.c ) -target_link_libraries( ert_util_matrix ert_util test_util ) +target_link_libraries( ert_util_matrix ert_util ) add_test( ert_util_matrix ${EXECUTABLE_OUTPUT_PATH}/ert_util_matrix ) if (ERT_HAVE_LAPACK) add_executable( ert_util_matrix_lapack ert_util_matrix_lapack.c ) - target_link_libraries( ert_util_matrix_lapack ert_util test_util ) + target_link_libraries( ert_util_matrix_lapack ert_util ) add_test( ert_util_matrix_lapack ${EXECUTABLE_OUTPUT_PATH}/ert_util_matrix_lapack ) add_executable( ert_util_matrix_stat ert_util_matrix_stat.c ) - target_link_libraries( ert_util_matrix_stat ert_util test_util ) + target_link_libraries( ert_util_matrix_stat ert_util ) add_test( ert_util_matrix_stat ${EXECUTABLE_OUTPUT_PATH}/ert_util_matrix_stat ) endif() add_executable( ert_util_subst_list ert_util_subst_list.c ) -target_link_libraries( ert_util_subst_list ert_util test_util ) +target_link_libraries( ert_util_subst_list ert_util ) add_test( ert_util_subst_list ${EXECUTABLE_OUTPUT_PATH}/ert_util_subst_list ) add_executable( ert_util_buffer ert_util_buffer.c ) -target_link_libraries( ert_util_buffer ert_util test_util ) +target_link_libraries( ert_util_buffer ert_util ) add_test( ert_util_buffer ${EXECUTABLE_OUTPUT_PATH}/ert_util_buffer ) add_executable( ert_util_statistics ert_util_statistics.c ) -target_link_libraries( ert_util_statistics ert_util test_util ) +target_link_libraries( ert_util_statistics ert_util ) add_test( ert_util_statistics ${EXECUTABLE_OUTPUT_PATH}/ert_util_statistics ) add_executable( ert_util_copy_file ert_util_copy_file.c ) -target_link_libraries( ert_util_copy_file ert_util test_util ) +target_link_libraries( ert_util_copy_file ert_util ) add_test( ert_util_copy_file ${EXECUTABLE_OUTPUT_PATH}/ert_util_copy_file ${EXECUTABLE_OUTPUT_PATH}/ert_util_copy_file ) add_executable( ert_util_filename ert_util_filename.c ) -target_link_libraries( ert_util_filename ert_util test_util ) +target_link_libraries( ert_util_filename ert_util ) add_test( ert_util_filename ${EXECUTABLE_OUTPUT_PATH}/ert_util_filename ) add_executable( ert_util_sscan_test ert_util_sscan_test.c ) -target_link_libraries( ert_util_sscan_test ert_util test_util ) +target_link_libraries( ert_util_sscan_test ert_util ) add_test( ert_util_sscan_test ${EXECUTABLE_OUTPUT_PATH}/ert_util_sscan_test ) add_executable( ert_util_string_util ert_util_string_util.c ) -target_link_libraries( ert_util_string_util ert_util test_util ) +target_link_libraries( ert_util_string_util ert_util ) add_test( ert_util_string_util ${EXECUTABLE_OUTPUT_PATH}/ert_util_string_util ) add_executable( ert_util_vector_test ert_util_vector_test.c ) -target_link_libraries( ert_util_vector_test ert_util test_util ) +target_link_libraries( ert_util_vector_test ert_util ) add_test( ert_util_vector_test ${EXECUTABLE_OUTPUT_PATH}/ert_util_vector_test ) add_executable( ert_util_cwd_test ert_util_cwd_test.c ) -target_link_libraries( ert_util_cwd_test ert_util test_util ) +target_link_libraries( ert_util_cwd_test ert_util ) add_test( ert_util_cwd_test ${EXECUTABLE_OUTPUT_PATH}/ert_util_cwd_test ${CMAKE_CURRENT_BINARY_DIR}) add_executable( ert_util_relpath_test ert_util_relpath_test.c ) -target_link_libraries( ert_util_relpath_test ert_util test_util ) +target_link_libraries( ert_util_relpath_test ert_util ) add_test( ert_util_relpath_test ${EXECUTABLE_OUTPUT_PATH}/ert_util_relpath_test ) add_executable( ert_util_path_stack_test ert_util_path_stack_test.c ) -target_link_libraries( ert_util_path_stack_test ert_util test_util ) +target_link_libraries( ert_util_path_stack_test ert_util ) add_test( ert_util_path_stack_test ${EXECUTABLE_OUTPUT_PATH}/ert_util_path_stack_test ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) add_executable( ert_util_PATH_test ert_util_PATH_test.c ) -target_link_libraries( ert_util_PATH_test ert_util test_util ) +target_link_libraries( ert_util_PATH_test ert_util ) add_test( ert_util_PATH_test ${EXECUTABLE_OUTPUT_PATH}/ert_util_PATH_test ) add_executable( ert_util_strcat_test ert_util_strcat_test.c ) -target_link_libraries( ert_util_strcat_test ert_util test_util ) +target_link_libraries( ert_util_strcat_test ert_util ) add_test( ert_util_strcat_test ${EXECUTABLE_OUTPUT_PATH}/ert_util_strcat_test ) add_executable( ert_util_sprintf_escape ert_util_sprintf_escape.c ) -target_link_libraries( ert_util_sprintf_escape ert_util test_util ) +target_link_libraries( ert_util_sprintf_escape ert_util ) add_test( ert_util_sprintf_escape ${EXECUTABLE_OUTPUT_PATH}/ert_util_sprintf_escape ) add_executable( ert_util_stringlist_test ert_util_stringlist_test.c ) -target_link_libraries( ert_util_stringlist_test ert_util test_util ) +target_link_libraries( ert_util_stringlist_test ert_util ) add_test( ert_util_stringlist_test ${EXECUTABLE_OUTPUT_PATH}/ert_util_stringlist_test ) add_executable( ert_util_realpath ert_util_realpath.c ) -target_link_libraries( ert_util_realpath ert_util test_util ) +target_link_libraries( ert_util_realpath ert_util ) add_test( ert_util_realpath ${EXECUTABLE_OUTPUT_PATH}/ert_util_realpath ) add_executable( ert_util_hash_test ert_util_hash_test.c ) -target_link_libraries( ert_util_hash_test ert_util test_util ) +target_link_libraries( ert_util_hash_test ert_util ) add_test( ert_util_hash_test ${EXECUTABLE_OUTPUT_PATH}/ert_util_hash_test ) add_executable( ert_util_binary_split ert_util_binary_split.c ) -target_link_libraries( ert_util_binary_split ert_util test_util ) +target_link_libraries( ert_util_binary_split ert_util ) add_test( ert_util_binary_split ${EXECUTABLE_OUTPUT_PATH}/ert_util_binary_split ) add_executable( ert_util_logh ert_util_logh.c ) -target_link_libraries( ert_util_logh ert_util test_util ) +target_link_libraries( ert_util_logh ert_util ) add_test( ert_util_logh ${EXECUTABLE_OUTPUT_PATH}/ert_util_logh ) add_executable( ert_util_rng ert_util_rng.c ) -target_link_libraries( ert_util_rng ert_util test_util ) +target_link_libraries( ert_util_rng ert_util ) add_test( ert_util_rng ${EXECUTABLE_OUTPUT_PATH}/ert_util_rng ) add_executable( ert_util_time_interval ert_util_time_interval.c ) -target_link_libraries( ert_util_time_interval ert_util test_util ) +target_link_libraries( ert_util_time_interval ert_util ) add_test( ert_util_time_interval ${EXECUTABLE_OUTPUT_PATH}/ert_util_time_interval ) add_executable( ert_util_before_after ert_util_before_after.c ) -target_link_libraries( ert_util_before_after ert_util test_util ) +target_link_libraries( ert_util_before_after ert_util ) add_test( ert_util_before_after ${EXECUTABLE_OUTPUT_PATH}/ert_util_before_after ) add_executable( ert_util_approx_equal ert_util_approx_equal.c ) -target_link_libraries( ert_util_approx_equal ert_util test_util ) +target_link_libraries( ert_util_approx_equal ert_util ) add_test( ert_util_approx_equal ${EXECUTABLE_OUTPUT_PATH}/ert_util_approx_equal ) -if (PING_PATH) +if (ERT_HAVE_PING) add_executable( ert_util_ping ert_util_ping.c ) - target_link_libraries( ert_util_ping ert_util test_util ) - add_test( ert_util_ping ${EXECUTABLE_OUTPUT_PATH}/ert_util_ping ${PING_SERVERS}) + target_link_libraries( ert_util_ping ert_util ) + add_test( ert_util_ping ${EXECUTABLE_OUTPUT_PATH}/ert_util_ping) endif() add_executable( ert_util_file_readable ert_util_file_readable.c ) -target_link_libraries( ert_util_file_readable ert_util test_util ) +target_link_libraries( ert_util_file_readable ert_util ) add_test( ert_util_file_readable ${EXECUTABLE_OUTPUT_PATH}/ert_util_file_readable ${FILE_READABLE_SERVERS}) add_executable( ert_util_type_vector_functions ert_util_type_vector_functions.c ) -target_link_libraries( ert_util_type_vector_functions ert_util test_util ) +target_link_libraries( ert_util_type_vector_functions ert_util ) add_test( ert_util_type_vector_functions ${EXECUTABLE_OUTPUT_PATH}/ert_util_type_vector_functions) add_executable( ert_util_ui_return ert_util_ui_return.c ) -target_link_libraries( ert_util_ui_return ert_util test_util ) +target_link_libraries( ert_util_ui_return ert_util ) add_test( ert_util_ui_return ${EXECUTABLE_OUTPUT_PATH}/ert_util_ui_return ) add_executable( ert_util_clamp ert_util_clamp.c ) -target_link_libraries( ert_util_clamp ert_util test_util ) +target_link_libraries( ert_util_clamp ert_util ) add_test( ert_util_clamp ${EXECUTABLE_OUTPUT_PATH}/ert_util_clamp ) add_executable( ert_util_strstr_int_format ert_util_strstr_int_format.c ) -target_link_libraries( ert_util_strstr_int_format ert_util test_util ) +target_link_libraries( ert_util_strstr_int_format ert_util ) add_test( ert_util_strstr_int_format ${EXECUTABLE_OUTPUT_PATH}/ert_util_strstr_int_format ) add_executable( ert_util_parent_path ert_util_parent_path.c ) -target_link_libraries( ert_util_parent_path ert_util test_util ) +target_link_libraries( ert_util_parent_path ert_util ) add_test( ert_util_parent_path ${EXECUTABLE_OUTPUT_PATH}/ert_util_parent_path) add_executable( ert_util_alloc_file_components ert_util_alloc_file_components.c ) -target_link_libraries( ert_util_alloc_file_components ert_util test_util ) +target_link_libraries( ert_util_alloc_file_components ert_util ) add_test( ert_util_alloc_file_components ${EXECUTABLE_OUTPUT_PATH}/ert_util_alloc_file_components) add_executable( ert_util_work_area ert_util_work_area.c ) -target_link_libraries( ert_util_work_area ert_util test_util ) +target_link_libraries( ert_util_work_area ert_util ) add_test( NAME ert_util_work_area COMMAND ${EXECUTABLE_OUTPUT_PATH}/ert_util_work_area data2/file1 ${CMAKE_CURRENT_SOURCE_DIR}/data2/file2 data2 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) add_executable( ert_util_arg_pack ert_util_arg_pack.c) set_target_properties( ert_util_arg_pack PROPERTIES COMPILE_FLAGS "-Werror") -target_link_libraries( ert_util_arg_pack ert_util test_util ) +target_link_libraries( ert_util_arg_pack ert_util ) add_test( ert_util_arg_pack ${EXECUTABLE_OUTPUT_PATH}/ert_util_arg_pack) if (HAVE_BACKTRACE) add_executable( ert_util_abort_gnu_tests ert_util_abort_gnu_tests.c) - target_link_libraries( ert_util_abort_gnu_tests ert_util test_util) + target_link_libraries( ert_util_abort_gnu_tests ert_util ) add_test( ert_util_abort_gnu_tests ${EXECUTABLE_OUTPUT_PATH}/ert_util_abort_gnu_tests) add_executable( ert_util_addr2line ert_util_addr2line.c ) - target_link_libraries( ert_util_addr2line ert_util test_util ) + target_link_libraries( ert_util_addr2line ert_util ) add_test( ert_util_addr2line ${EXECUTABLE_OUTPUT_PATH}/ert_util_addr2line) endif() if (HAVE_UTIL_ABORT_INTERCEPT) add_executable( ert_util_block_fs ert_util_block_fs.c) - target_link_libraries( ert_util_block_fs ert_util test_util) + target_link_libraries( ert_util_block_fs ert_util ) add_test( ert_util_block_fs ${EXECUTABLE_OUTPUT_PATH}/ert_util_block_fs) add_executable( ert_util_struct_vector ert_util_struct_vector.c ) - target_link_libraries( ert_util_struct_vector ert_util test_util ) + target_link_libraries( ert_util_struct_vector ert_util ) add_test( ert_util_struct_vector ${EXECUTABLE_OUTPUT_PATH}/ert_util_struct_vector ) add_executable( ert_util_type_vector_test ert_util_type_vector_test.c ) - target_link_libraries( ert_util_type_vector_test ert_util test_util ) + target_link_libraries( ert_util_type_vector_test ert_util ) add_test( ert_util_type_vector_test ${EXECUTABLE_OUTPUT_PATH}/ert_util_type_vector_test ) endif() if (ERT_HAVE_SPAWN) add_executable( ert_util_spawn ert_util_spawn.c ) - target_link_libraries( ert_util_spawn ert_util test_util ) + target_link_libraries( ert_util_spawn ert_util ) add_test( ert_util_spawn ${EXECUTABLE_OUTPUT_PATH}/ert_util_spawn) endif() diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_abort_gnu_tests.c b/ThirdParty/Ert/libert_util/tests/ert_util_abort_gnu_tests.c index c8f91affce..923240054f 100644 --- a/ThirdParty/Ert/libert_util/tests/ert_util_abort_gnu_tests.c +++ b/ThirdParty/Ert/libert_util/tests/ert_util_abort_gnu_tests.c @@ -1,4 +1,4 @@ -/* +/* * File: ert_util_abort_gnu_tests.c * Author: kflik * @@ -9,7 +9,6 @@ #include #include #include -#include void test_assert_util_abort(const char * function_name , void (void *) , void * arg); diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_addr2line.c b/ThirdParty/Ert/libert_util/tests/ert_util_addr2line.c index c621a3b332..5aa62222c0 100644 --- a/ThirdParty/Ert/libert_util/tests/ert_util_addr2line.c +++ b/ThirdParty/Ert/libert_util/tests/ert_util_addr2line.c @@ -1,19 +1,19 @@ /* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'ert_util_addr2line.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. + Copyright (C) 2012 Statoil ASA, Norway. + + The file 'ert_util_addr2line.c' is part of ERT - Ensemble based Reservoir Tool. + + ERT 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. + + ERT 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 + for more details. */ #include #include @@ -23,7 +23,6 @@ #include #include #include -#include @@ -32,15 +31,15 @@ void test_lookup(bool valid_address, bool change_cwd) { const char * func = __func__; int line; const int max_bt = 50; - void *bt_addr[max_bt]; + void *bt_addr[max_bt]; int size; char * func_name , * file_name; int line_nr; - + line = __LINE__ + 2; - size = backtrace(bt_addr , max_bt); + size = backtrace(bt_addr , max_bt); test_assert_int_equal( size , 4 ); - + if (change_cwd) { char * cwd = util_alloc_cwd(); util_chdir("/tmp"); @@ -80,14 +79,14 @@ int main( int argc , char ** argv) { char * path; char * name; char * dot_name; - /* + /* This bisaaarre hoopsing is to be able to emulate the situation where addr2line can not find the executable; this behaviour is invoked when change_cwd is set to true in the test_lookup() - call. + call. */ util_alloc_file_components( argv[0] , &path , &name, NULL); - + util_chdir(path); dot_name = util_alloc_sprintf("./%s" , name); util_spawn_blocking(dot_name, 0, NULL, NULL, NULL); @@ -96,13 +95,13 @@ int main( int argc , char ** argv) { printf("Testing internal lookup ....\n"); test_lookup(true, false); test_lookup(false , false); - + test_lookup(true, true); test_lookup(false , true); - + printf("Testing external lookup ....\n"); - test_util_addr2line(); - + test_util_addr2line(); + exit(0); } } diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_matrix.c b/ThirdParty/Ert/libert_util/tests/ert_util_matrix.c index ac6492f36c..c3c47a0953 100644 --- a/ThirdParty/Ert/libert_util/tests/ert_util_matrix.c +++ b/ThirdParty/Ert/libert_util/tests/ert_util_matrix.c @@ -28,8 +28,6 @@ #include #include #include -#include - void test_resize() { @@ -96,54 +94,6 @@ void test_dims() { } -void test_det4() { - matrix_type * m = matrix_alloc(4 , 4 ); - rng_type * rng = rng_alloc(MZRAN , INIT_DEV_URANDOM ); - for (int i=0; i < 10; i++) { - matrix_random_init( m , rng ); - { - double det4 = matrix_det4( m ); - double det = matrix_det( m ); - - test_assert_double_equal( det , det4 ); - } - } - - matrix_free( m ); - rng_free( rng ); -} - - -void test_det3() { - matrix_type * m = matrix_alloc(3 , 3 ); - rng_type * rng = rng_alloc(MZRAN , INIT_DEV_URANDOM ); - matrix_random_init( m , rng ); - - { - double det3 = matrix_det3( m ); - double det = matrix_det( m ); - - test_assert_double_equal( det , det3 ); - } - - matrix_free( m ); - rng_free( rng ); -} - - -void test_det2() { - matrix_type * m = matrix_alloc(2,2); - rng_type * rng = rng_alloc(MZRAN , INIT_DEV_URANDOM ); - matrix_random_init( m , rng ); - { - double det2 = matrix_det2( m ); - double det = matrix_det( m ); - - test_assert_double_equal( det , det2 ); - } - matrix_free( m ); - rng_free( rng ); -} void test_readwrite() { @@ -283,9 +233,7 @@ int main( int argc , char ** argv) { test_resize(); test_column_equal(); test_dims(); - test_det2(); - test_det3(); - test_det4(); + test_readwrite(); test_diag_std(); test_masked_copy(); diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_ping.c b/ThirdParty/Ert/libert_util/tests/ert_util_ping.c index 52cd1e16ff..4910a11dcb 100644 --- a/ThirdParty/Ert/libert_util/tests/ert_util_ping.c +++ b/ThirdParty/Ert/libert_util/tests/ert_util_ping.c @@ -30,13 +30,5 @@ int main( int argc , char ** argv) { test_assert_true( util_ping("127.0.0.1" )); test_assert_false( util_ping("does.not.exist")); - if (argc > 1) { - stringlist_type * server_list = stringlist_alloc_from_split( argv[1] , " "); - int is ; - for (is = 0; is < stringlist_get_size( server_list ); is++) { - test_assert_true( util_ping( stringlist_iget( server_list , is ))); - } - } - exit(0); } diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_spawn.c b/ThirdParty/Ert/libert_util/tests/ert_util_spawn.c index 6eb35f7f43..219eee6e96 100644 --- a/ThirdParty/Ert/libert_util/tests/ert_util_spawn.c +++ b/ThirdParty/Ert/libert_util/tests/ert_util_spawn.c @@ -38,6 +38,8 @@ void make_script(const char * name , const char * stdout_msg, const char * stder fclose( stream ); util_addmode_if_owner( name , S_IRUSR + S_IWUSR + S_IXUSR + S_IRGRP + S_IWGRP + S_IXGRP + S_IROTH + S_IXOTH); /* u:rwx g:rwx o:rx */ + + usleep(100000); // Seems to be required to ensure that the script is actually found on disk. NFS? } @@ -94,7 +96,7 @@ void * test_spawn_redirect__( void * path ) { if (script_status == 0) break; else if (script_status == 127) - usleep(100000); // Seems to be required to ensure that the script is actually found on disk. + test_error_exit("Spawn failed, cannot find executable: %s\n", script); else test_assert_int_equal( status , 0 ); } else diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_sscan_test.c b/ThirdParty/Ert/libert_util/tests/ert_util_sscan_test.c index 20269d60ab..9efb21d4ec 100644 --- a/ThirdParty/Ert/libert_util/tests/ert_util_sscan_test.c +++ b/ThirdParty/Ert/libert_util/tests/ert_util_sscan_test.c @@ -79,7 +79,6 @@ void test_date(time_t expected , const char * date_string, bool expected_return) void test_scan_iso_date() { time_t expected = util_make_date_utc(10, 11 , 2011); - time_t parsed; test_date( expected , "2011-11-10", true); test_assert_false( util_sscanf_isodate( "2017.10.07" , NULL )); diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_struct_vector.c b/ThirdParty/Ert/libert_util/tests/ert_util_struct_vector.c index 6e863d0b9f..67a7347964 100644 --- a/ThirdParty/Ert/libert_util/tests/ert_util_struct_vector.c +++ b/ThirdParty/Ert/libert_util/tests/ert_util_struct_vector.c @@ -38,6 +38,8 @@ void test_create() { struct_vector_type * struct_vector = struct_vector_alloc( sizeof d ); test_assert_true( struct_vector_is_instance( struct_vector )); test_assert_int_equal( struct_vector_get_size( struct_vector ) , 0 ); + struct_vector_reserve( struct_vector , 1000 ); + test_assert_int_equal( struct_vector_get_size( struct_vector ) , 0 ); struct_vector_free( struct_vector ); } @@ -59,7 +61,9 @@ void test_append_iget() { struct_vector_append( struct_vector , &d1 ); test_assert_int_equal( struct_vector_get_size( struct_vector ) , 1 ); - + struct_vector_reserve( struct_vector , 0 ); + test_assert_int_equal( struct_vector_get_size( struct_vector ) , 1 ); + test_assert_false( d1.x == d2.x ); test_assert_false( d1.y == d2.y ); test_assert_false( d1.z == d2.z ); @@ -69,6 +73,13 @@ void test_append_iget() { test_assert_true( d1.y == d2.y ); test_assert_true( d1.z == d2.z ); + { + struct test_struct * d = struct_vector_get_data( struct_vector ); + struct test_struct d3 = d[0]; + test_assert_true( d1.x == d3.x ); + test_assert_true( d1.y == d3.y ); + test_assert_true( d1.z == d3.z ); + } struct_vector_reset( struct_vector ); test_assert_int_equal( struct_vector_get_size( struct_vector ) , 0 ); @@ -77,9 +88,53 @@ void test_append_iget() { +int cmp( const void * _d1, const void * _d2) { + const struct test_struct * d1 = (const struct test_struct *) _d1; + const struct test_struct * d2 = (const struct test_struct *) _d2; + + return d1->x - d2->x; +} + + +int rcmp( const void * _d1, const void * _d2) { + return cmp(_d2 , _d1); +} + + + +void test_sort() { + struct test_struct d; + struct_vector_type * struct_vector = struct_vector_alloc( sizeof d ); + for (int i = 0; i < 10; i++) { + struct test_struct d = {.x = 9 - i, + .y = 9 - i, + .z = 9 - i }; + struct_vector_append( struct_vector , &d ); + } + struct_vector_sort( struct_vector , cmp ); + for (int i = 0; i < 9; i++) { + struct test_struct d1; + struct test_struct d2; + struct_vector_iget( struct_vector , i ,&d1 ); + struct_vector_iget( struct_vector , i + 1,&d2 ); + test_assert_true( cmp(&d1 , &d2) <= 0); + } + + struct_vector_sort( struct_vector , rcmp ); + for (int i = 0; i < 9; i++) { + struct test_struct d1; + struct test_struct d2; + struct_vector_iget( struct_vector , i ,&d1 ); + struct_vector_iget( struct_vector , i + 1,&d2 ); + test_assert_true( cmp(&d1 , &d2) >= 0); + } +} + + int main(int argc , char ** argv) { test_create(); test_create_invalid(); test_append_iget(); + test_sort(); } diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_type_vector_test.c b/ThirdParty/Ert/libert_util/tests/ert_util_type_vector_test.c index b75768b500..e5bc248634 100644 --- a/ThirdParty/Ert/libert_util/tests/ert_util_type_vector_test.c +++ b/ThirdParty/Ert/libert_util/tests/ert_util_type_vector_test.c @@ -21,7 +21,6 @@ #include #include #include -#include void assert_equal( bool equal ) { if (!equal) diff --git a/ThirdParty/Ert/libert_utilxx/src/CMakeLists.txt b/ThirdParty/Ert/libert_utilxx/src/CMakeLists.txt index a82f5ee1d5..9ff4095fa7 100644 --- a/ThirdParty/Ert/libert_utilxx/src/CMakeLists.txt +++ b/ThirdParty/Ert/libert_utilxx/src/CMakeLists.txt @@ -8,7 +8,7 @@ set( header_files ) -add_library( ert_utilxx ${LIBRARY_TYPE} ${source_files} ) +add_library( ert_utilxx ${source_files} ) set_target_properties( ert_utilxx PROPERTIES VERSION ${ERT_VERSION_MAJOR}.${ERT_VERSION_MINOR} SOVERSION ${ERT_VERSION_MAJOR}) if (USE_RUNPATH) add_runpath( ert_utilxx ) diff --git a/ThirdParty/Ert/libert_utilxx/tests/CMakeLists.txt b/ThirdParty/Ert/libert_utilxx/tests/CMakeLists.txt index ce609df250..e9cd19572e 100644 --- a/ThirdParty/Ert/libert_utilxx/tests/CMakeLists.txt +++ b/ThirdParty/Ert/libert_utilxx/tests/CMakeLists.txt @@ -1,7 +1,7 @@ add_executable(ert_util_unique_ptr ert_util_unique_ptr.cpp ) -target_link_libraries(ert_util_unique_ptr test_util ert_util) +target_link_libraries(ert_util_unique_ptr ert_util) add_test(ert_util_unique_ptr ${EXECUTABLE_OUTPUT_PATH}/ert_util_unique_ptr) add_executable(ert_util_test_area_xx ert_util_test_area_xx.cpp ) -target_link_libraries(ert_util_test_area_xx test_util ert_utilxx) +target_link_libraries(ert_util_test_area_xx ert_utilxx) add_test(ert_util_test_area_xx ${EXECUTABLE_OUTPUT_PATH}/ert_util_test_area_xx) diff --git a/ThirdParty/Ert/libgeometry/include/ert/geometry/geo_pointset.h b/ThirdParty/Ert/libgeometry/include/ert/geometry/geo_pointset.h index ae5ce596bf..7e549e6852 100644 --- a/ThirdParty/Ert/libgeometry/include/ert/geometry/geo_pointset.h +++ b/ThirdParty/Ert/libgeometry/include/ert/geometry/geo_pointset.h @@ -30,7 +30,6 @@ typedef struct geo_pointset_struct geo_pointset_type; geo_pointset_type * geo_pointset_alloc( bool external_z ); void geo_pointset_free( geo_pointset_type * pointset ); - void geo_pointset_add_xy( geo_pointset_type * pointset , double x , double y); void geo_pointset_add_xyz( geo_pointset_type * pointset , double x , double y, double z); int geo_pointset_get_size( const geo_pointset_type * pointset ); void geo_pointset_iget_xy( const geo_pointset_type * pointset , int index , double * x , double * y); diff --git a/ThirdParty/Ert/libgeometry/include/ert/geometry/geo_surface.h b/ThirdParty/Ert/libgeometry/include/ert/geometry/geo_surface.h index 35fe213e3c..a6707372a0 100644 --- a/ThirdParty/Ert/libgeometry/include/ert/geometry/geo_surface.h +++ b/ThirdParty/Ert/libgeometry/include/ert/geometry/geo_surface.h @@ -29,12 +29,14 @@ extern "C" { typedef struct geo_surface_struct geo_surface_type; + bool geo_surface_equal_header( const geo_surface_type * surface1 , const geo_surface_type * surface2 ); bool geo_surface_equal( const geo_surface_type * surface1 , const geo_surface_type * surface2); void geo_surface_free( geo_surface_type * geo_surface ); void geo_surface_free__( void * arg); geo_pointset_type * geo_surface_get_pointset( const geo_surface_type * surface ); geo_surface_type * geo_surface_fload_alloc_irap( const char * filename , bool loadz); + geo_surface_type * geo_surface_alloc_new( int nx, int ny, double xinc, double yinc, double xstart, double ystart, double angle ); bool geo_surface_fload_irap_zcoord( const geo_surface_type * surface, const char * filename, double *zlist); double geo_surface_iget_zvalue(const geo_surface_type * surface, int index); int geo_surface_get_size( const geo_surface_type * surface ); @@ -42,6 +44,7 @@ extern "C" { void geo_surface_fprintf_irap_external_zcoord( const geo_surface_type * surface, const char * filename , const double * zcoord); int geo_surface_get_nx( const geo_surface_type * surface ); int geo_surface_get_ny( const geo_surface_type * surface ); + void geo_surface_iget_xy( const geo_surface_type* surface, int index, double* x, double* y); #ifdef __cplusplus } diff --git a/ThirdParty/Ert/libgeometry/src/CMakeLists.txt b/ThirdParty/Ert/libgeometry/src/CMakeLists.txt index 181eaeecef..c33a248603 100644 --- a/ThirdParty/Ert/libgeometry/src/CMakeLists.txt +++ b/ThirdParty/Ert/libgeometry/src/CMakeLists.txt @@ -1,7 +1,7 @@ set( source_files geo_surface.c geo_util.c geo_pointset.c geo_region.c geo_polygon.c geo_polygon_collection.c) set( header_files geo_surface.h geo_util.h geo_pointset.h geo_region.h geo_polygon.h geo_polygon_collection.h) -add_library( ert_geometry ${LIBRARY_TYPE} ${source_files} ) +add_library( ert_geometry ${source_files} ) set_target_properties( ert_geometry PROPERTIES VERSION ${ERT_VERSION_MAJOR}.${ERT_VERSION_MINOR} SOVERSION ${ERT_VERSION_MAJOR}) target_link_libraries( ert_geometry ert_util ) if (USE_RUNPATH) diff --git a/ThirdParty/Ert/libgeometry/src/geo_pointset.c b/ThirdParty/Ert/libgeometry/src/geo_pointset.c index fd85df2ae5..32eaa2ea2d 100644 --- a/ThirdParty/Ert/libgeometry/src/geo_pointset.c +++ b/ThirdParty/Ert/libgeometry/src/geo_pointset.c @@ -83,35 +83,18 @@ void geo_pointset_memcpy( const geo_pointset_type * src, geo_pointset_type * tar } } -void geo_pointset_add_xy( geo_pointset_type * pointset , double x , double y) { - if (!pointset->internal_z) { - if (pointset->size == pointset->alloc_size) - geo_pointset_resize( pointset , 1 + pointset->alloc_size * 2); - - pointset->xcoord[ pointset->size ] = x; - pointset->ycoord[ pointset->size ] = y; - - pointset->size++; - } else - util_abort("%s: can not use function %s for pointsets with internal z.\n",__func__ , __func__); -} - - void geo_pointset_add_xyz( geo_pointset_type * pointset , double x , double y, double z) { - if (pointset->internal_z) { - if (pointset->size == pointset->alloc_size) - geo_pointset_resize( pointset , 1 + pointset->alloc_size * 2); + if (pointset->size == pointset->alloc_size) + geo_pointset_resize( pointset , 1 + pointset->alloc_size * 2); - pointset->xcoord[ pointset->size ] = x; - pointset->ycoord[ pointset->size ] = y; - pointset->zcoord[ pointset->size ] = z; + pointset->xcoord[ pointset->size ] = x; + pointset->ycoord[ pointset->size ] = y; + if (pointset->internal_z) + pointset->zcoord[ pointset->size ] = z; - pointset->size++; - } else - util_abort("%s: can not use function %s for pointsets with internal z.\n",__func__ , __func__); + pointset->size++; } - void geo_pointset_free( geo_pointset_type * pointset ) { free( pointset->xcoord ); free( pointset->ycoord ); @@ -241,5 +224,3 @@ void geo_pointset_isqrt( geo_pointset_type * pointset ) { for (index = 0; index < pointset->size; index++) pointset->zcoord[index] = sqrt(pointset->zcoord[index]); } - - diff --git a/ThirdParty/Ert/libgeometry/src/geo_surface.c b/ThirdParty/Ert/libgeometry/src/geo_surface.c index e272c0039c..7d9b443c77 100644 --- a/ThirdParty/Ert/libgeometry/src/geo_surface.c +++ b/ThirdParty/Ert/libgeometry/src/geo_surface.c @@ -60,31 +60,6 @@ static void geo_surface_copy_header( const geo_surface_type * src , geo_surface_ } } - -/* -static int geo_surface_cornerindex( const geo_surface_type * geo_surface , int cell_ix , int cell_iy) { - return (geo_surface->nx + 1) * cell_iy + cell_ix; -} - - -static void geo_surface_init_cells( geo_surface_type * geo_surface ) { - int ix,iy; - geo_surface->cells = util_malloc( geo_surface->nx * geo_surface->ny * sizeof * geo_surface->cells , __func__); - for (iy = 0; iy < geo_surface->ny; iy++) { - for (ix = 0; ix < geo_surface->nx; ix++) { - int cell_index = iy * geo_surface->nx + ix; - - geo_surface->cells[ cell_index ].index_list[0] = geo_surface_cornerindex( geo_surface , ix , iy ); - geo_surface->cells[ cell_index ].index_list[1] = geo_surface_cornerindex( geo_surface , ix + 1 , iy ); - geo_surface->cells[ cell_index ].index_list[2] = geo_surface_cornerindex( geo_surface , ix + 1 , iy + 1); - geo_surface->cells[ cell_index ].index_list[3] = geo_surface_cornerindex( geo_surface , ix , iy + 1); - - } - } -} -*/ - - static geo_surface_type * geo_surface_alloc_empty( bool internal_z ) { geo_surface_type * surface = util_malloc( sizeof * surface ); UTIL_TYPE_ID_INIT( surface , GEO_SURFACE_TYPE_ID ) @@ -109,35 +84,27 @@ static void geo_surface_init_regular( geo_surface_type * surface , const double int z_index = ix*zstride_nx + iy*zstride_ny; geo_pointset_add_xyz( surface->pointset , x,y, zcoord[ z_index ]); } else - geo_pointset_add_xy( surface->pointset , x , y ); + geo_pointset_add_xyz( surface->pointset , x , y, 0 ); } } } static bool geo_surface_fscanf_zcoord( const geo_surface_type * surface , FILE * stream , double * zcoord) { - bool OK = false; int index = 0; while (true) { if (fscanf(stream , "%lg" , &zcoord[index]) == 1) index++; else - /* File is too short */ - break; + return false; // File is too short if (index == surface->nx * surface->ny) { double extra_value; int fscanf_return = fscanf( stream , "%lg" , &extra_value); - - /* Check that there is not more data dangling at the end of the file. */ - if (fscanf_return == EOF) - OK = true; - break; + return (fscanf_return == EOF); // no more data dangling at the end of the file. } } - - return OK; } @@ -196,6 +163,30 @@ void geo_surface_fprintf_irap_external_zcoord( const geo_surface_type * surface, geo_surface_fprintf_irap__( surface , filename , zcoord ); } +geo_surface_type * geo_surface_alloc_new( int nx, int ny, + double xinc, double yinc, + double xstart, double ystart, + double angle ) { + geo_surface_type * surface = geo_surface_alloc_empty( true ); + + surface->origo[0] = xstart; + surface->origo[1] = ystart; + surface->rot_angle = angle * __PI / 180.0; + surface->nx = nx; + surface->ny = ny; + + surface->vec1[0] = xinc * cos( surface->rot_angle ) ; + surface->vec1[1] = xinc * sin( surface->rot_angle ) ; + + surface->vec2[0] = -yinc * sin( surface->rot_angle ) ; + surface->vec2[1] = yinc * cos( surface->rot_angle ); + + surface->cell_size[0] = xinc; + surface->cell_size[1] = yinc; + geo_surface_init_regular( surface, NULL ); + return surface; +} + static void geo_surface_fload_irap_header( geo_surface_type * surface, FILE * stream ) { int const996; @@ -351,6 +342,12 @@ geo_pointset_type * geo_surface_get_pointset( const geo_surface_type * surface ) return surface->pointset; } +void geo_surface_iget_xy( const geo_surface_type* surface, int index, double* x, double* y) { + const geo_pointset_type* pointset = geo_surface_get_pointset(surface); + geo_pointset_iget_xy(pointset, index, x, y); +} + + int geo_surface_get_size( const geo_surface_type * surface ) { return geo_pointset_get_size( surface->pointset ); diff --git a/ThirdParty/Ert/libgeometry/tests/CMakeLists.txt b/ThirdParty/Ert/libgeometry/tests/CMakeLists.txt index 9a39bd4e17..3547148055 100644 --- a/ThirdParty/Ert/libgeometry/tests/CMakeLists.txt +++ b/ThirdParty/Ert/libgeometry/tests/CMakeLists.txt @@ -1,18 +1,18 @@ add_executable( geo_util_xlines geo_util_xlines.c ) -target_link_libraries( geo_util_xlines ert_geometry test_util ) +target_link_libraries( geo_util_xlines ert_geometry ) add_test( geo_util_xlines ${EXECUTABLE_OUTPUT_PATH}/geo_util_xlines ) add_executable( geo_polygon geo_polygon.c ) -target_link_libraries( geo_polygon ert_geometry test_util ) +target_link_libraries( geo_polygon ert_geometry ) add_test( geo_polygon ${EXECUTABLE_OUTPUT_PATH}/geo_polygon ) add_executable( geo_polygon_collection geo_polygon_collection.c ) -target_link_libraries( geo_polygon_collection ert_geometry test_util ) +target_link_libraries( geo_polygon_collection ert_geometry ) add_test( geo_polygon_collection ${EXECUTABLE_OUTPUT_PATH}/geo_polygon_collection ) if (STATOIL_TESTDATA_ROOT) add_executable( geo_surface geo_surface.c ) - target_link_libraries( geo_surface ert_geometry test_util ) + target_link_libraries( geo_surface ert_geometry ) add_test( geo_surface ${EXECUTABLE_OUTPUT_PATH}/geo_surface ${PROJECT_SOURCE_DIR}/test-data/Statoil/Geometry/Surface.irap diff --git a/ThirdParty/Ert/libgeometry/tests/geo_surface.c b/ThirdParty/Ert/libgeometry/tests/geo_surface.c index 6069b66a81..2d8e53e9de 100644 --- a/ThirdParty/Ert/libgeometry/tests/geo_surface.c +++ b/ThirdParty/Ert/libgeometry/tests/geo_surface.c @@ -1,19 +1,19 @@ /* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'geo_surface.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. + Copyright (C) 2013 Statoil ASA, Norway. + + The file 'geo_surface.c' is part of ERT - Ensemble based Reservoir Tool. + + ERT 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. + + ERT 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 + for more details. */ #include #include @@ -30,33 +30,45 @@ void test_load(const char * input_file , const char * broken_file) { geo_surface_type * surface = geo_surface_fload_alloc_irap( input_file , false ); double * data = util_calloc( geo_surface_get_size( surface ) , sizeof * data ); - + test_assert_true( geo_surface_fload_irap_zcoord( surface , input_file , data )); test_assert_false( geo_surface_fload_irap_zcoord( surface , "/does/not/exist" , data )); test_assert_false( geo_surface_fload_irap_zcoord( surface , broken_file , data )); - free( data ); geo_surface_free( surface ); } - void test_fprintf(const char * input_file ) { geo_surface_type * surface1 = geo_surface_fload_alloc_irap( input_file , true ); test_work_area_type * work_area = test_work_area_alloc( "SURFACE-FPRINTF" ); - + geo_surface_fprintf_irap( surface1 , "surface/test/surface.irap"); { geo_surface_type * surface2 = geo_surface_fload_alloc_irap( "surface/test/surface.irap" , true ); - + test_assert_true( geo_surface_equal( surface1 , surface2 )); - + geo_surface_free( surface2 ); } test_work_area_free( work_area ); geo_surface_free( surface1 ); } +void test_create_new( const char * input_file) { + geo_surface_type * surface = geo_surface_alloc_new( 260, 511, 50.0, 50.0, + 444230.0, 6809537.0, + -30.0); + test_assert_true(geo_surface_get_nx (surface) == 260); + test_assert_true(geo_surface_get_ny (surface) == 511); + test_assert_true(geo_surface_get_size(surface) == 511*260); + + geo_surface_type * surirap = geo_surface_fload_alloc_irap( input_file , true ); + test_assert_true( geo_surface_equal_header( surface, surirap ) ); + + geo_surface_free( surirap ); + geo_surface_free( surface ); +} int main( int argc , char ** argv) { @@ -65,6 +77,6 @@ int main( int argc , char ** argv) { test_load( input_file , broken_file1 ); test_fprintf( input_file ); - + test_create_new( input_file ); exit( 0 ); } diff --git a/ThirdParty/Ert/libjob_queue/CMakeLists.txt b/ThirdParty/Ert/libjob_queue/CMakeLists.txt deleted file mode 100644 index 9ea4540853..0000000000 --- a/ThirdParty/Ert/libjob_queue/CMakeLists.txt +++ /dev/null @@ -1,37 +0,0 @@ -set( HAVE_LSF_LIBRARY OFF ) - -set( ERT_LSF_LIB_PATH "" CACHE FILEPATH "Path to search for the LSF libraries" ) -set( ERT_LSF_INCLUDE_PATH "" CACHE FILEPATH "Path to search for the LSF header files" ) - -find_path( LSF_HEADER_PATH lsf/lsf.h - PATHS ${ERT_LSF_INCLUDE_PATH}) - -find_library( LSF_LIBRARY NAMES lsf PATHS ${ERT_LSF_LIB_PATH}) - - - -if (LSF_HEADER_PATH) - if (LSF_LIBRARY) - set( HAVE_LSF_LIBRARY ON ) - endif() -endif() - - -if (HAVE_LSF_LIBRARY) - include_directories( ${LSF_HEADER_PATH} ) - add_definitions( -DHAVE_LSF_LIBRARY ) - message(STATUS "Found LSF as ${LSF_HEADER_PATH} and ${LSF_LIBRARY}") -else() - message(STATUS "LSF not found") -endif() - -add_subdirectory( src ) -if (BUILD_APPLICATIONS) - add_subdirectory( applications ) -endif() - -if (BUILD_TESTS) - add_subdirectory( tests ) -endif() - - diff --git a/ThirdParty/Ert/libjob_queue/applications/CMakeLists.txt b/ThirdParty/Ert/libjob_queue/applications/CMakeLists.txt deleted file mode 100644 index 94693ed1a1..0000000000 --- a/ThirdParty/Ert/libjob_queue/applications/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -if (HAVE_LSF_LIBRARY) - add_executable( block_node block_node.c ) - target_link_libraries( block_node job_queue ert_util) - if (USE_RUNPATH) - add_runpath( block_node ) - endif() - - install(TARGETS block_node DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) -endif() diff --git a/ThirdParty/Ert/libjob_queue/applications/block_node.c b/ThirdParty/Ert/libjob_queue/applications/block_node.c deleted file mode 100644 index 21e5ebbb85..0000000000 --- a/ThirdParty/Ert/libjob_queue/applications/block_node.c +++ /dev/null @@ -1,284 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'block_node.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -#define BLOCK_COMMAND "/project/res/bin/block-job" -#define STATOIL_LSF_REQUEST "select[cs && x86_64Linux]" - - - -static lsf_driver_type * lsf_driver; -static vector_type * job_pool; -static hash_type * nodes; - - -typedef struct { - lsf_job_type * lsf_job; - stringlist_type * hostlist; - bool running; - bool block_job; -} block_job_type; - - -typedef struct { - int target; - int current; -} count_pair_type; - - -count_pair_type * count_pair_alloc() { - count_pair_type * pair = util_malloc( sizeof * pair ); - pair->target = 0; - pair->current = 0; - return pair; -} - - - - -block_job_type * block_job_alloc() { - block_job_type * job = util_malloc( sizeof * job ); - - job->lsf_job = NULL; - job->running = false; - job->block_job = false; - job->hostlist = stringlist_alloc_new(); - - return job; -} - - -void block_job_free( block_job_type * block_job ) { - stringlist_free( block_job->hostlist ); - if (block_job->lsf_job) - lsf_job_free( block_job->lsf_job ); - - free( block_job ); -} - - -const char * block_job_get_hostname( const block_job_type * block_job ) { - return stringlist_iget( block_job->hostlist , 0 ); -} - - - -void update_job_status( block_job_type * job ) { - if (!job->running) { - int lsf_status = lsf_driver_get_job_status_lsf( lsf_driver , job->lsf_job ); - if (lsf_status == JOB_STAT_RUN) { - lsf_job_export_hostnames( job->lsf_job , job->hostlist ); - { - int ihost; - for (ihost = 0; ihost < stringlist_get_size( job->hostlist ); ihost++) { - const char * host = stringlist_iget( job->hostlist , ihost ); - if (hash_has_key( nodes, host)) { /* This is one of the instances which should be left running. */ - count_pair_type * pair = hash_get( nodes , host); - if (pair->current < pair->target) { - pair->current += 1; - job->block_job = true; - } - } - } - } - job->running = true; - } - } -} - - - -/*****************************************************************/ - - - -void add_jobs( int chunk_size) { - int i; - char * cwd = util_alloc_cwd(); - for (i=0; i < chunk_size; i++) { - block_job_type * job = block_job_alloc(); - job->lsf_job = lsf_driver_submit_job(lsf_driver , BLOCK_COMMAND , 1 , cwd , "BLOCK" , 0 , NULL ); - vector_append_ref( job_pool , job ); - } - free( cwd ); -} - - -void update_pool_status( bool *all_blocked , int * pending) { - int i; - int pend_count = 0; - *all_blocked = true; - - for (i=0; i < vector_get_size( job_pool ); i++) { - block_job_type * job = vector_iget( job_pool , i ); - update_job_status( job ); - - if (!job->running) - pend_count++; - } - - { - hash_iter_type * iter = hash_iter_alloc( nodes ); - while (!hash_iter_is_complete( iter )) { - const char * hostname = hash_iter_get_next_key( iter ); - const count_pair_type * count = hash_get( nodes , hostname ); - if (count->current < count->target) - *all_blocked = false; - } - } - *pending = pend_count; -} - - -void print_status() { - int total_running = 0; - int total_pending = 0; - for (int i=0; i < vector_get_size( job_pool ); i++) { - block_job_type * job = vector_iget( job_pool , i ); - if (job->running) - total_running += 1; - else - total_pending += 1; - } - printf("Running:%3d Pending: %3d Blocks active: ",total_running , total_pending); - { - hash_iter_type * iter = hash_iter_alloc( nodes ); - while (!hash_iter_is_complete( iter )) { - const char * hostname = hash_iter_get_next_key( iter ); - const count_pair_type * count = hash_get( nodes , hostname ); - printf("%s %d/%d ",hostname , count->current , count->target); - } - printf("\n"); - hash_iter_free( iter ); - } -} - - -void block_node_exit( int signal ) { - int job_nr; - - print_status(); - for (job_nr = 0; job_nr < vector_get_size( job_pool ); job_nr++) { - block_job_type * job = vector_iget( job_pool , job_nr ); - - if (job->block_job) { - printf("Job:%ld is running on host: ", lsf_job_get_jobnr( job->lsf_job )); - stringlist_fprintf( job->hostlist , " " , stdout ); - printf("\n"); - } else - lsf_driver_kill_job( lsf_driver , job->lsf_job ); - - block_job_free( job ); - } - printf("Remember to kill these jobs when the BLOCK is no longer needed\n"); - if (signal != 0) - exit(0); -} - - -int main( int argc, char ** argv) { - if (argc == 1) - util_exit("block_node node1 node2 node3:2 \n"); - - /* Initialize lsf environment */ - util_setenv( "LSF_BINDIR" , "/prog/LSF/9.1/linux2.6-glibc2.3-x86_64/bin" ); - util_setenv( "LSF_LINDIR" , "/prog/LSF/9.1/linux2.6-glibc2.3-x86_64/lib" ); - util_setenv( "XLSF_UIDDIR" , "/prog/LSF/9.1/linux2.6-glibc2.3-x86_64/lib/uid" ); - util_setenv( "LSF_SERVERDIR" , "/prog/LSF/9.1/linux2.6-glibc2.3-x86_64/etc"); - util_setenv( "LSF_ENVDIR" , "/prog/LSF/conf"); - - util_update_path_var( "PATH" , "/prog/LSF/9.1/linux2.6-glibc2.3-x86_64/bin" , false); - util_update_path_var( "LD_LIBRARY_PATH" , "/prog/LSF/9.1/linux2.6-glibc2.3-x86_64/lib" , false); - - - lsf_driver = lsf_driver_alloc(); - if (lsf_driver_get_submit_method( lsf_driver ) != LSF_SUBMIT_INTERNAL) - util_exit("Sorry - the block_node program must be invoked on a proper LSF node \n"); - - { - - int iarg; - int total_blocked_target = 0; - nodes = hash_alloc(); - for (iarg = 1; iarg < argc; iarg++) { - char *node_name; - int num_slots; - - { - char * num_slots_string; - util_binary_split_string( argv[iarg] , ":" , true , &node_name , &num_slots_string); - if (num_slots_string) - util_sscanf_int( num_slots_string , &num_slots); - else - num_slots = 1; - } - - if (!hash_has_key( nodes , node_name)) - hash_insert_hash_owned_ref( nodes , node_name , count_pair_alloc() , free); - - { - count_pair_type * pair = hash_get( nodes , node_name); - pair->target += num_slots; - } - total_blocked_target += num_slots; - } - - signal(SIGINT , block_node_exit ); - { - const int sleep_time = 5; - const int chunk_size = 10; /* We submit this many at a time. */ - const int max_pool_size = 1000; /* The absolute total maximum of jobs we will submit. */ - - bool cont = true; - int pending = 0; - bool all_blocked; - job_pool = vector_alloc_new(); - - while (cont) { - printf("[Ctrl-C to give up] "); fflush( stdout ); - if (cont) sleep( sleep_time ); - if (pending == 0) { - if (vector_get_size( job_pool ) < max_pool_size) - add_jobs( chunk_size ); - } - - update_pool_status( &all_blocked , &pending); - print_status(); - - if (all_blocked) - cont = false; - } - if (!all_blocked) - printf("Sorry - failed to block all the nodes \n"); - - block_node_exit( 0 ); - hash_free( nodes ); - } - } -} diff --git a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/ext_job.h b/ThirdParty/Ert/libjob_queue/include/ert/job_queue/ext_job.h deleted file mode 100644 index d8f79e6a02..0000000000 --- a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/ext_job.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'ext_job.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_EXT_JOB_H -#define ERT_EXT_JOB_H -#ifdef __cplusplus -extern "C" { -#endif -#include - -#include -#include -#include - -typedef struct ext_job_struct ext_job_type; - - -const char * ext_job_get_help_text( const ext_job_type * job ); -void ext_job_set_help_text( ext_job_type * job , const char * help_text); - -void ext_job_fprintf_config(const ext_job_type * ext_job , const char * fmt , FILE * stream); -ext_job_type * ext_job_alloc_copy(const ext_job_type * ); -ext_job_type * ext_job_alloc(const char * , const char * license_root_path , bool private_job); - const char * ext_job_get_name(const ext_job_type * ); -void ext_job_free(ext_job_type * ) ; -void ext_job_free__(void * ); -void ext_job_add_environment(ext_job_type *, const char * , const char * ) ; -void ext_job_save( const ext_job_type * ext_job ); -void ext_job_fprintf(const ext_job_type * , FILE * stream ); -void ext_job_set_private_arg(ext_job_type * , const char * , const char * ); - -void ext_job_set_argc(ext_job_type * , const char ** , int); -void ext_job_python_fprintf(const ext_job_type * , FILE * , const subst_list_type *); -ext_job_type * ext_job_fscanf_alloc(const char * , const char * , bool private_job , const char *, bool search_path); -const stringlist_type * ext_job_get_arglist( const ext_job_type * ext_job ); -bool ext_job_is_shared( const ext_job_type * ext_job ); -bool ext_job_is_private( const ext_job_type * ext_job ); - -void ext_job_set_executable(ext_job_type * ext_job, const char * executable_abs, const char * executable_input, bool search_path); -const char * ext_job_get_executable(const ext_job_type * ext_job); - - - -void ext_job_set_config_file(ext_job_type * ext_job, const char * config_file); -const char * ext_job_get_config_file(const ext_job_type * ext_job); -void ext_job_set_target_file(ext_job_type * ext_job, const char * target_file); -const char * ext_job_get_target_file(const ext_job_type * ext_job); -void ext_job_set_start_file(ext_job_type * ext_job, const char * start_file); -const char * ext_job_get_start_file(const ext_job_type * ext_job); -void ext_job_set_name(ext_job_type * ext_job, const char * name); -const char * ext_job_get_name(const ext_job_type * ext_job); -void ext_job_set_lsf_request(ext_job_type * ext_job, const char * lsf_request); -const char * ext_job_get_lsf_request(const ext_job_type * ext_job); -void ext_job_set_stdin_file(ext_job_type * ext_job, const char * stdin_file); -const char * ext_job_get_stdin_file(const ext_job_type * ext_job); -void ext_job_set_stdout_file(ext_job_type * ext_job, const char * stdout_file); -const char * ext_job_get_stdout_file(const ext_job_type * ext_job); -void ext_job_set_stderr_file(ext_job_type * ext_job, const char * stderr_file); -const char * ext_job_get_stderr_file(const ext_job_type * ext_job); -void ext_job_set_max_running( ext_job_type * ext_job , int max_running); -int ext_job_get_max_running( const ext_job_type * ext_job ); -void ext_job_set_max_running_minutes( ext_job_type * ext_job , int max_running_minutes); -int ext_job_get_max_running_minutes( const ext_job_type * ext_job ); -void ext_job_add_environment(ext_job_type *ext_job , const char * key , const char * value); -void ext_job_clear_environment( ext_job_type * ext_job ); -hash_type * ext_job_get_environment( ext_job_type * ext_job ); -int ext_job_set_private_args_from_string( ext_job_type * ext_job , const char * arg_string ); -const char * ext_job_get_private_args_as_string( ext_job_type * ext_job ); -//const char * ext_job_get_arglist_as_string( ext_job_type * ext_job ); -//void ext_job_set_arglist_from_string( ext_job_type * ext_job , const char * argv_string ); - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/ext_joblist.h b/ThirdParty/Ert/libjob_queue/include/ert/job_queue/ext_joblist.h deleted file mode 100644 index 6babf5fb6c..0000000000 --- a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/ext_joblist.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'ext_joblist.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_EXT_JOBLIST_H -#define ERT_EXT_JOBLIST_H -#ifdef __cplusplus -extern "C" { -#endif -#include - -#include -#include -#include - -#include - - -typedef struct ext_joblist_struct ext_joblist_type; - -ext_joblist_type * ext_joblist_alloc(); -void ext_joblist_free(ext_joblist_type * ); -void ext_joblist_add_job(ext_joblist_type * joblist , const char * name , ext_job_type * new_job); -ext_job_type * ext_joblist_get_job(const ext_joblist_type * , const char * ); -ext_job_type * ext_joblist_get_job_copy(const ext_joblist_type * , const char * ); -//void ext_joblist_python_fprintf(const ext_joblist_type * , const stringlist_type * , const char * , const subst_list_type *); -bool ext_joblist_has_job(const ext_joblist_type * , const char * ); -stringlist_type * ext_joblist_alloc_list( const ext_joblist_type * joblist); -bool ext_joblist_del_job( ext_joblist_type * joblist , const char * job_name ); -void ext_joblist_add_jobs_in_directory(ext_joblist_type * joblist , const char * path, const char * license_root_path, bool user_mode, bool search_path ); - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/forward_model.h b/ThirdParty/Ert/libjob_queue/include/ert/job_queue/forward_model.h deleted file mode 100644 index 6068e64cd1..0000000000 --- a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/forward_model.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'forward_model.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_FORWARD_MODEL_H -#define ERT_FORWARD_MODEL_H -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include -#include - -#include - -typedef struct forward_model_struct forward_model_type ; - - - stringlist_type * forward_model_alloc_joblist( const forward_model_type * forward_model ); - const ext_joblist_type * forward_model_get_joblist(const forward_model_type * ); - void forward_model_clear( forward_model_type * forward_model ); - void forward_model_fprintf(const forward_model_type * , FILE * ); - forward_model_type * forward_model_alloc(const ext_joblist_type * ext_joblist); - void forward_model_parse_init(forward_model_type * forward_model , const char * input_string ); - void forward_model_python_fprintf(const forward_model_type * , const char * , const subst_list_type * , mode_t umask); - void forward_model_free( forward_model_type * ); - forward_model_type * forward_model_alloc_copy(const forward_model_type * forward_model); - void forward_model_iset_job_arg( forward_model_type * forward_model , int job_index , const char * arg , const char * value); - ext_job_type * forward_model_iget_job( forward_model_type * forward_model , int index); - int forward_model_get_length( const forward_model_type * forward_model ); - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/job_list.h b/ThirdParty/Ert/libjob_queue/include/ert/job_queue/job_list.h deleted file mode 100644 index 8193e7a50c..0000000000 --- a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/job_list.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA, Norway. - - The file 'job_node.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_JOB_LIST_H -#define ERT_JOB_LIST_H - - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include -#include - - -typedef struct job_list_struct job_list_type; - - job_list_type * job_list_alloc(); - void job_list_free( job_list_type * job_list ); - int job_list_get_size( const job_list_type * job_list ); - void job_list_add_job( job_list_type * job_list , job_queue_node_type * job_node ); - job_queue_node_type * job_list_iget_job( const job_list_type * job_list , int queue_index); - void job_list_reset( job_list_type * job_list ); - void job_list_get_wrlock( job_list_type * list); - void job_list_get_rdlock( job_list_type * list); - void job_list_reader_wait( job_list_type * list, int usleep_time1, int usleep_time2); - void job_list_unlock( job_list_type * list); - - UTIL_SAFE_CAST_HEADER( job_list ); - UTIL_IS_INSTANCE_HEADER( job_list ); - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/job_node.h b/ThirdParty/Ert/libjob_queue/include/ert/job_queue/job_node.h deleted file mode 100644 index b657bba84b..0000000000 --- a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/job_node.h +++ /dev/null @@ -1,122 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA, Norway. - - The file 'job_node.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_JOB_NODE_H -#define ERT_JOB_NODE_H - - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -/** - This struct holds the job_queue information about one job. Observe - the following: - - 1. This struct is purely static - i.e. it is invisible outside of - this file-scope. - - 2. Typically the driver would like to store some additional - information, i.e. the PID of the running process for the local - driver; that is stored in a (driver specific) struct under the - field job_data. - - 3. If the driver detects that a job has failed it leaves an EXIT - file, the exit status is (currently) not reliably transferred - back to to the job_queue layer. - -*/ - -typedef bool (job_callback_ftype) (void *); -typedef struct job_queue_node_struct job_queue_node_type; - - - bool job_queue_node_status_transition( job_queue_node_type * node , job_queue_status_type * status , job_status_type new_status); - bool job_queue_node_status_confirmed_running(job_queue_node_type * node); - submit_status_type job_queue_node_submit( job_queue_node_type * node , job_queue_status_type * status , queue_driver_type * driver); - void job_queue_node_free_error_info( job_queue_node_type * node ); - void job_queue_node_fscanf_EXIT( job_queue_node_type * node ); - void job_queue_node_clear_error_info(job_queue_node_type * node); - void job_queue_node_clear(job_queue_node_type * node); - void job_queue_node_free_data(job_queue_node_type * node); - job_queue_node_type * job_queue_node_alloc( const char * job_name , - const char * run_path , - const char * run_cmd , - int argc , - const char ** argv , - int num_cpu , - const char * ok_file, - const char * status_file, - const char * exit_file, - job_callback_ftype * done_callback, - job_callback_ftype * retry_callback, - job_callback_ftype * exit_callback, - void * callback_arg); - - - job_queue_node_type * job_queue_node_alloc_simple( const char * job_name , - const char * run_path , - const char * run_cmd , - int argc , - const char ** argv ); - - bool job_queue_node_kill( job_queue_node_type * node , job_queue_status_type * status , queue_driver_type * driver); - void job_queue_node_free(job_queue_node_type * node); - job_status_type job_queue_node_get_status(const job_queue_node_type * node); - void job_queue_node_free_driver_data( job_queue_node_type * node , queue_driver_type * driver); - void job_queue_node_restart( job_queue_node_type * node , job_queue_status_type * status); - bool job_queue_node_update_status( job_queue_node_type * node , job_queue_status_type * status , queue_driver_type * driver); - - const char * job_queue_node_get_run_path( const job_queue_node_type * node); - const char * job_queue_node_get_name( const job_queue_node_type * node); - int job_queue_node_get_submit_attempt( const job_queue_node_type * node); - void job_queue_node_reset_submit_attempt( job_queue_node_type * node); - const char * job_queue_node_get_failed_job( const job_queue_node_type * node); - const char * job_queue_node_get_error_reason( const job_queue_node_type * node); - const char * job_queue_node_get_stderr_capture( const job_queue_node_type * node); - const char * job_queue_node_get_stderr_file( const job_queue_node_type * node); - - time_t job_queue_node_get_sim_start( const job_queue_node_type * node ); - time_t job_queue_node_get_sim_end( const job_queue_node_type * node ); - time_t job_queue_node_get_submit_time( const job_queue_node_type * node ); - double job_queue_node_time_since_sim_start( const job_queue_node_type * node ) ; - void job_queue_node_set_max_confirmation_wait_time( job_queue_node_type * node, time_t time ); - - const char * job_queue_node_get_ok_file( const job_queue_node_type * node); - const char * job_queue_node_get_status_file( const job_queue_node_type * node); - const char * job_queue_node_get_exit_file( const job_queue_node_type * node); - - bool job_queue_node_run_DONE_callback( job_queue_node_type * node ); - bool job_queue_node_run_RETRY_callback( job_queue_node_type * node ); - void job_queue_node_run_EXIT_callback( job_queue_node_type * node ); - int job_queue_node_get_queue_index( const job_queue_node_type * node ); - void job_queue_node_set_queue_index( job_queue_node_type * node , int queue_index); - - void * job_queue_node_get_driver_data( job_queue_node_type * node ); - - UTIL_IS_INSTANCE_HEADER( job_queue_node ); - UTIL_SAFE_CAST_HEADER( job_queue_node ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/job_queue.h b/ThirdParty/Ert/libjob_queue/include/ert/job_queue/job_queue.h deleted file mode 100644 index 48d2df4179..0000000000 --- a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/job_queue.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'job_queue.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_JOB_QUEUE_H -#define ERT_JOB_QUEUE_H -#ifdef __cplusplus -extern "C" { -#endif -#include -#include - -#include - -#include -#include - - - typedef struct job_queue_struct job_queue_type; - - - void job_queue_submit_complete( job_queue_type * queue ); - job_driver_type job_queue_get_driver_type( const job_queue_type * queue ); - void job_queue_set_driver(job_queue_type * queue , queue_driver_type * driver); - bool job_queue_has_driver(const job_queue_type * queue ); - //void job_queue_set_size( job_queue_type * job_queue , int size ); - void job_queue_set_runpath_fmt(job_queue_type * , const path_fmt_type * ); - job_queue_type * job_queue_alloc( int , const char * ok_file , const char * status_file, const char * exit_file); - void job_queue_free(job_queue_type *); - - int job_queue_add_job(job_queue_type * , - const char * run_cmd , - job_callback_ftype * done_callback, - job_callback_ftype * retry_callback, - job_callback_ftype * exit_callback, - void * callback_arg , - int num_cpu , - const char * , - const char * , - int argc , - const char ** argv ); - - bool job_queue_accept_jobs(const job_queue_type * queue); - void job_queue_reset(job_queue_type * queue); - void job_queue_run_jobs(job_queue_type * queue, int num_total_run, bool verbose); - void job_queue_run_jobs_threaded(job_queue_type * queue , int num_total_run, bool verbose); - void * job_queue_run_jobs__(void * ); - void job_queue_start_manager_thread( job_queue_type * job_queue , pthread_t * queue_thread , int job_size , bool verbose); - - job_status_type job_queue_iget_job_status(job_queue_type * , int ); - - int job_queue_iget_status_summary( const job_queue_type * queue , job_status_type status); - time_t job_queue_iget_sim_start( job_queue_type * queue, int job_index); - time_t job_queue_iget_sim_end( job_queue_type * queue, int job_index); - time_t job_queue_iget_submit_time( job_queue_type * queue, int job_index); - void job_queue_iset_max_confirm_wait_time( job_queue_type * queue, int job_index, time_t time ); - - void job_queue_set_max_job_duration(job_queue_type * queue, int max_duration_seconds); - int job_queue_get_max_job_duration(const job_queue_type * queue); - void job_queue_set_job_stop_time(job_queue_type * queue, time_t time); - time_t job_queue_get_job_stop_time(const job_queue_type * queue); - void job_queue_set_auto_job_stop_time(job_queue_type * queue); - bool job_queue_kill_job( job_queue_type * queue , int job_index); - bool job_queue_is_running( const job_queue_type * queue ); - void job_queue_set_max_submit( job_queue_type * job_queue , int max_submit ); - int job_queue_get_max_submit(const job_queue_type * job_queue ); - bool job_queue_get_open(const job_queue_type * job_queue); - bool job_queue_get_pause( const job_queue_type * job_queue ); - void job_queue_set_pause_on( job_queue_type * job_queue); - void job_queue_set_pause_off( job_queue_type * job_queue); - bool job_queue_start_user_exit( job_queue_type * queue); - bool job_queue_get_user_exit( const job_queue_type * queue); - void * job_queue_iget_job_data( job_queue_type * job_queue , int job_nr ); - - int job_queue_get_active_size( const job_queue_type * queue ); - int job_queue_get_num_callback( const job_queue_type * queue); - int job_queue_get_num_running( const job_queue_type * queue); - int job_queue_get_num_pending( const job_queue_type * queue); - int job_queue_get_num_waiting( const job_queue_type * queue); - int job_queue_get_num_complete( const job_queue_type * queue); - int job_queue_get_num_failed( const job_queue_type * queue); - int job_queue_get_num_killed( const job_queue_type * queue); - void * job_queue_iget_driver_data( job_queue_type * queue , int job_index); - const char * job_queue_iget_failed_job( job_queue_type * queue , int job_index); - const char * job_queue_iget_error_reason( job_queue_type * queue , int job_index); - const char * job_queue_iget_stderr_capture( job_queue_type * queue , int job_index); - const char * job_queue_iget_stderr_file( job_queue_type * queue , int job_index); - const char * job_queue_iget_run_path( job_queue_type * queue , int job_index); - void job_queue_iset_external_restart(job_queue_type * queue , int job_index); - job_queue_node_type * job_queue_iget_job( job_queue_type * job_queue , int job_nr ); - bool job_queue_has_driver(const job_queue_type * queue ); - job_queue_node_type * job_queue_iget_node(job_queue_type * queue , int job_index); - int job_queue_get_max_running( const job_queue_type * queue ); - - UTIL_SAFE_CAST_HEADER( job_queue ); - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/job_queue_manager.h b/ThirdParty/Ert/libjob_queue/include/ert/job_queue/job_queue_manager.h deleted file mode 100644 index eb2ee80be1..0000000000 --- a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/job_queue_manager.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'job_queue.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_JOB_QUEUE_MANAGER_H -#define ERT_JOB_QUEUE_MANAGER_H -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include - -typedef struct job_queue_manager_struct job_queue_manager_type; - - job_queue_manager_type * job_queue_manager_alloc( job_queue_type * job_queue ); - void job_queue_manager_free( job_queue_manager_type * manager ); - void job_queue_manager_start_queue( job_queue_manager_type * manager , int num_total_run , bool verbose , bool reset_queue); - bool job_queue_manager_try_wait( job_queue_manager_type * manager , int timeout_seconds); - void job_queue_manager_wait( job_queue_manager_type * manager); - int job_queue_manager_get_num_running( const job_queue_manager_type * manager); - int job_queue_manager_get_num_success( const job_queue_manager_type * manager); - int job_queue_manager_get_num_waiting( const job_queue_manager_type * manager); - int job_queue_manager_get_num_failed( const job_queue_manager_type * manager); - bool job_queue_manager_is_running( const job_queue_manager_type * manager); - - bool job_queue_manager_job_success( const job_queue_manager_type * manager , int job_index); - bool job_queue_manager_job_complete( const job_queue_manager_type * manager , int job_index); - bool job_queue_manager_job_waiting( const job_queue_manager_type * manager , int job_index); - bool job_queue_manager_job_running( const job_queue_manager_type * manager , int job_index); - bool job_queue_manager_job_failed( const job_queue_manager_type * manager , int job_index); - - job_status_type job_queue_manager_iget_job_status(const job_queue_manager_type * manager, int job_index); - - UTIL_IS_INSTANCE_HEADER( job_queue_manager ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/job_queue_status.h b/ThirdParty/Ert/libjob_queue/include/ert/job_queue/job_queue_status.h deleted file mode 100644 index f962a58082..0000000000 --- a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/job_queue_status.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA, Norway. - - The file 'job_status_test.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_JOB_QUEUE_STATUS_H -#define ERT_JOB_QUEUE_STATUS_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - - typedef struct job_queue_status_struct job_queue_status_type; - - job_queue_status_type * job_queue_status_alloc(); - void job_queue_status_free( job_queue_status_type * status ); - int job_queue_status_get_count( job_queue_status_type * status , job_status_type status_type); - void job_queue_status_clear( job_queue_status_type * status ); - void job_queue_status_inc( job_queue_status_type * status_count , job_status_type status_type); - bool job_queue_status_transition( job_queue_status_type * status_count , job_status_type src_status , job_status_type target_status); - int job_queue_status_get_total_count( const job_queue_status_type * status ); - - UTIL_IS_INSTANCE_HEADER( job_queue_status ); - UTIL_SAFE_CAST_HEADER( job_queue_status ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/local_driver.h b/ThirdParty/Ert/libjob_queue/include/ert/job_queue/local_driver.h deleted file mode 100644 index ca178097f8..0000000000 --- a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/local_driver.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'local_driver.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_LOCAL_DRIVER_H -#define ERT_LOCAL_DRIVER_H -#ifdef __cplusplus -extern "C" { -#endif - -#include - - typedef struct local_driver_struct local_driver_type; - typedef struct local_job_struct local_job_type; - - - void * local_driver_alloc(); - - - void * local_driver_submit_job(void * __driver , - const char * submit_cmd , - int num_cpu , - const char * run_path , - const char * job_name , - int argc, - const char ** argv ); - void local_driver_kill_job(void * __driver , void * __job); - void local_driver_free__(void * __driver ); - job_status_type local_driver_get_job_status(void * __driver , void * __job); - void local_driver_free_job(void * __job); - void local_driver_init_option_list(stringlist_type * option_list); - - - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/lsb.h b/ThirdParty/Ert/libjob_queue/include/ert/job_queue/lsb.h deleted file mode 100644 index be5d70509e..0000000000 --- a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/lsb.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'lsb.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - -#ifndef ERT_LSB_H -#define ERT_LSB_H - - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include - -#include - - typedef struct lsb_struct lsb_type; - - - lsb_type * lsb_alloc(); - void lsb_free( lsb_type * lsb); - bool lsb_ready( const lsb_type * lsb); - - int lsb_initialize( const lsb_type * lsb); - int lsb_submitjob( const lsb_type * lsb , struct submit * , struct submitReply *); - int lsb_killjob( const lsb_type * lsb , int lsf_jobnr); - int lsb_openjob( const lsb_type * lsb , int lsf_jobnr); - struct jobInfoEnt * lsb_readjob( const lsb_type * lsb ); - int lsb_closejob( const lsb_type * lsb ); - char * lsb_sys_msg( const lsb_type * lsb ); - stringlist_type * lsb_get_error_list( const lsb_type * lsb ); - - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/lsf_driver.h b/ThirdParty/Ert/libjob_queue/include/ert/job_queue/lsf_driver.h deleted file mode 100644 index 1b7fcfd54c..0000000000 --- a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/lsf_driver.h +++ /dev/null @@ -1,107 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'lsf_driver.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_LSF_DRIVER_H -#define ERT_LSF_DRIVER_H -#ifdef __cplusplus -extern "C" { -#endif -#include - -#include - - -/* - The options supported by the LSF driver. -*/ -#define LSF_QUEUE "LSF_QUEUE" -#define LSF_RESOURCE "LSF_RESOURCE" -#define LSF_SERVER "LSF_SERVER" -#define LSF_RSH_CMD "LSF_RSH_CMD" // This option is set to DEFAULT_RSH_CMD at driver creation. -#define LSF_LOGIN_SHELL "LSF_LOGIN_SHELL" // Not fully implemented yet -#define LSF_BSUB_CMD "BSUB_CMD" -#define LSF_BJOBS_CMD "BJOBS_CMD" -#define LSF_BKILL_CMD "BKILL_CMD" -#define LSF_DEBUG_OUTPUT "DEBUG_OUTPUT" -#define LSF_SUBMIT_SLEEP "SUBMIT_SLEEP" -#define LSF_EXCLUDE_HOST "EXCLUDE_HOST" - -#define LOCAL_LSF_SERVER "LOCAL" -#define NULL_LSF_SERVER "NULL" -#define DEFAULT_SUBMIT_SLEEP "0" - - typedef enum { - LSF_SUBMIT_INVALID = 0, - LSF_SUBMIT_INTERNAL = 1, - LSF_SUBMIT_LOCAL_SHELL = 2, - LSF_SUBMIT_REMOTE_SHELL = 3 - } lsf_submit_method_enum; - - -typedef struct lsf_driver_struct lsf_driver_type; -typedef struct lsf_job_struct lsf_job_type; - - void lsf_job_export_hostnames( const lsf_job_type * job , stringlist_type * hostlist); - void lsf_job_free(lsf_job_type * job); - long lsf_job_get_jobnr( const lsf_job_type * job ); - - void * lsf_driver_alloc( ); - stringlist_type * lsf_driver_alloc_cmd(lsf_driver_type * driver , - const char * run_path , - const char * job_name , - const char * submit_cmd , - int num_cpu , - int job_argc, - const char ** job_argv); - - void * lsf_driver_submit_job(void * __driver , - const char * submit_cmd , - int num_cpu , - const char * run_path , - const char * job_name , - int argc, - const char ** argv ); - job_status_type lsf_driver_convert_status( int lsf_status ); - void lsf_driver_blacklist_node(void * __driver , void * __job ); - void lsf_driver_kill_job(void * __driver , void * __job ); - void lsf_driver_free__(void * __driver ); - void lsf_driver_free( lsf_driver_type * driver ); - job_status_type lsf_driver_get_job_status(void * __driver , void * __job); - int lsf_driver_get_job_status_lsf(void * __driver , void * __job); - void lsf_driver_free_job(void * __job); - void lsf_driver_display_info( void * __driver , void * __job); - void lsf_driver_set_bjobs_refresh_interval( lsf_driver_type * driver , int refresh_interval); - - void lsf_driver_add_exclude_hosts( lsf_driver_type * driver , const char * excluded); - lsf_submit_method_enum lsf_driver_get_submit_method( const lsf_driver_type * driver ); - - bool lsf_driver_has_option( const void * __driver , const char * option_key); - const void * lsf_driver_get_option( const void * __driver , const char * option_key); - bool lsf_driver_set_option( void * __driver , const char * option_key , const void * value); - void lsf_driver_init_option_list(stringlist_type * option_list); - int lsf_job_parse_bsub_stdout(const char * bsub_cmd, const char * stdout_file); - const char * lsf_job_write_bjobs_to_file(const char * bjobs_cmd, lsf_driver_type * driver, const long jobid); - - stringlist_type * lsf_job_alloc_parse_hostnames(const char* fname); - UTIL_SAFE_CAST_HEADER( lsf_driver ); - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/lsf_job_stat.h b/ThirdParty/Ert/libjob_queue/include/ert/job_queue/lsf_job_stat.h deleted file mode 100644 index c6c9ed3725..0000000000 --- a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/lsf_job_stat.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'lsf_driver.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifdef HAVE_LSF_LIBRARY -#include -#else -#define JOB_STAT_NULL 0 -#define JOB_STAT_PEND 1 -#define JOB_STAT_SSUSP 0x08 -#define JOB_STAT_USUSP 0x10 -#define JOB_STAT_PSUSP 0x02 -#define JOB_STAT_RUN 0x04 -#define JOB_STAT_EXIT 0x20 -#define JOB_STAT_DONE 0x40 -#define JOB_STAT_PDONE 0x80 -#define JOB_STAT_UNKWN 0x10000 -#endif diff --git a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/queue_driver.h b/ThirdParty/Ert/libjob_queue/include/ert/job_queue/queue_driver.h deleted file mode 100644 index ff436f8dbb..0000000000 --- a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/queue_driver.h +++ /dev/null @@ -1,142 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'queue_driver.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. - */ - -#ifndef ERT_QUEUE_DRIVER_H -#define ERT_QUEUE_DRIVER_H -#ifdef __cplusplus -extern "C" { -#endif - -#include - - typedef enum { - NULL_DRIVER = 0, - LSF_DRIVER = 1, - LOCAL_DRIVER = 2, - RSH_DRIVER = 3, - TORQUE_DRIVER = 4 - } job_driver_type; - -#define JOB_DRIVER_ENUM_DEFS \ -{.value = 0 , .name = "NULL_DRIVER"}, \ -{.value = 1 , .name = "LSF_DRIVER"}, \ -{.value = 2 , .name = "LOCAL_DRIVER"}, \ -{.value = 3 , .name = "RSH_DRIVER"}, \ -{.value = 4 , .name = "TORQUE_DRIVER"} - -#define JOB_DRIVER_ENUM_SIZE 5 - - /* - The options supported by the base queue_driver. - */ -#define MAX_RUNNING "MAX_RUNNING" - - - typedef enum { - JOB_QUEUE_NOT_ACTIVE = 1, /* This value is used in external query routines - for jobs which are (currently) not active. */ - //JOB_QUEUE_LOADING = 2, /* This value is used by external routines. Not used in the libjob_queue implementation. */ - JOB_QUEUE_WAITING = 4, /* A node which is waiting in the internal queue. */ - JOB_QUEUE_SUBMITTED = 8, /* Internal status: It has has been submitted - the next status update will (should) place it as pending or running. */ - JOB_QUEUE_PENDING = 16, /* A node which is pending - a status returned by the external system. I.e LSF */ - JOB_QUEUE_RUNNING = 32, /* The job is running */ - JOB_QUEUE_DONE = 64, /* The job is done - but we have not yet checked if the target file is produced */ - JOB_QUEUE_EXIT = 128, /* The job has exited - check attempts to determine if we retry or go to complete_fail */ - //JOB_QUEUE_RUN_OK = 256, /* The job has completed - and all checks performed by the queue layer indicate success. */ - //JOB_QUEUE_RUN_FAIL = 512, /* The job has completed - but the queue system has detected that it has failed. */ - //JOB_QUEUE_ALL_OK = 1024, /* The job has loaded OK - observe that it is the calling scope which will set the status to this. */ - //JOB_QUEUE_ALL_FAIL = 2048, /* The job has failed completely - the calling scope must set this status. */ - JOB_QUEUE_IS_KILLED = 4096, /* The job has been killed, following a JOB_QUEUE_DO_KILL*/ - JOB_QUEUE_DO_KILL = 8192, /* The the job should be killed, either due to user request, or automated measures - the job can NOT be restarted. */ - JOB_QUEUE_SUCCESS = 16384, - JOB_QUEUE_RUNNING_CALLBACK = 32768, - JOB_QUEUE_FAILED = 65536, - JOB_QUEUE_DO_KILL_NODE_FAILURE = 131072 /* LSF will attempt to blacklist the nodes that failed this job */ - } job_status_type; - -#define JOB_QUEUE_MAX_STATE 13 - - /* - All jobs which are in the status set defined by - JOB_QUEUE_CAN_RESTART can be restarted based on external - user-input. It is OK to try to restart a job which is not in this - state - basically nothing should happen. - */ -#define JOB_QUEUE_CAN_RESTART (JOB_QUEUE_FAILED + JOB_QUEUE_IS_KILLED + JOB_QUEUE_SUCCESS) - - - /* - These are the jobs which can be killed. It is OK to try to kill a - job which is not in this state, the only thing happening is that the - function job_queue_kill_simulation() wil return false. - */ -#define JOB_QUEUE_CAN_KILL (JOB_QUEUE_WAITING + JOB_QUEUE_RUNNING + JOB_QUEUE_PENDING + JOB_QUEUE_SUBMITTED + JOB_QUEUE_DO_KILL + JOB_QUEUE_DO_KILL_NODE_FAILURE) - -#define JOB_QUEUE_WAITING_STATUS (JOB_QUEUE_WAITING + JOB_QUEUE_PENDING) - -#define JOB_QUEUE_CAN_UPDATE_STATUS (JOB_QUEUE_RUNNING + JOB_QUEUE_PENDING + JOB_QUEUE_SUBMITTED) - -#define JOB_QUEUE_COMPLETE_STATUS (JOB_QUEUE_IS_KILLED + JOB_QUEUE_SUCCESS + JOB_QUEUE_FAILED) - - - typedef struct queue_driver_struct queue_driver_type; - - typedef void * (submit_job_ftype) (void * data, const char * cmd, int num_cpu, const char * run_path, const char * job_name, int argc, const char ** argv); - typedef void (blacklist_node_ftype) (void *, void *); - typedef void (kill_job_ftype) (void *, void *); - typedef job_status_type(get_status_ftype) (void *, void *); - typedef void (free_job_ftype) (void *); - typedef void (free_queue_driver_ftype) (void *); - typedef bool (set_option_ftype) (void *, const char*, const void *); - typedef const void * (get_option_ftype) (const void *, const char *); - typedef bool (has_option_ftype) (const void *, const char *); - typedef void (init_option_list_ftype) (stringlist_type *); - - - queue_driver_type * queue_driver_alloc_RSH(const char * rsh_cmd, const hash_type * rsh_hostlist); - queue_driver_type * queue_driver_alloc_LSF(const char * queue_name, const char * resource_request, const char * remote_lsf_server); - queue_driver_type * queue_driver_alloc_TORQUE(); - queue_driver_type * queue_driver_alloc_local(); - queue_driver_type * queue_driver_alloc(job_driver_type type); - - void * queue_driver_submit_job(queue_driver_type * driver, const char * run_cmd, int num_cpu, const char * run_path, const char * job_name, int argc, const char ** argv); - void queue_driver_free_job(queue_driver_type * driver, void * job_data); - void queue_driver_blacklist_node(queue_driver_type * driver, void * job_data); - void queue_driver_kill_job(queue_driver_type * driver, void * job_data); - job_status_type queue_driver_get_status(queue_driver_type * driver, void * job_data); - - const char * queue_driver_get_name(const queue_driver_type * driver); - - bool queue_driver_set_option(queue_driver_type * driver, const char * option_key, const void * value); - const void * queue_driver_get_option(queue_driver_type * driver, const char * option_key); - void queue_driver_init_option_list(queue_driver_type * driver, stringlist_type * option_list); - - void queue_driver_free(queue_driver_type * driver); - void queue_driver_free__(void * driver); - const char * queue_driver_type_enum_iget(int index, int * value); - - typedef enum {SUBMIT_OK = 0 , - SUBMIT_JOB_FAIL = 1 , /* Typically no more attempts. */ - SUBMIT_DRIVER_FAIL = 2 , /* The driver would not take the job - for whatever reason?? */ - SUBMIT_QUEUE_CLOSED = 3 } /* The queue is currently not accepting more jobs - either (temporarilty) - because of pause or it is going down. */ submit_status_type; - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/rsh_driver.h b/ThirdParty/Ert/libjob_queue/include/ert/job_queue/rsh_driver.h deleted file mode 100644 index 2f9f7d9669..0000000000 --- a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/rsh_driver.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'rsh_driver.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_RSH_DRIVER_H -#define ERT_RSH_DRIVER_H -#ifdef __cplusplus -extern "C" { -#endif -#include - -#define RSH_HOST "RSH_HOST" -#define RSH_HOSTLIST "RSH_HOSTLIST" -#define RSH_CMD "RSH_CMD" -#define RSH_CLEAR_HOSTLIST "RSH_CLEAR_HOSTLIST" - - typedef struct rsh_driver_struct rsh_driver_type; - typedef struct rsh_job_struct rsh_job_type; - - void rsh_driver_add_host(rsh_driver_type * , const char * , int ); - void * rsh_driver_alloc( ); - - void * rsh_driver_submit_job(void * __driver , - const char * submit_cmd , - int num_cpu , - const char * run_path , - const char * job_name , - int argc, - const char ** argv ); - void rsh_driver_kill_job(void * __driver , void * __job); - void rsh_driver_free__(void * __driver ); - job_status_type rsh_driver_get_job_status(void * __driver , void * __job); - void rsh_driver_free_job(void * __job); - - - bool rsh_driver_set_option( void * __driver, const char * option_key , const void * value ); - const void * rsh_driver_get_option( const void * __driver , const char * option_key); - void rsh_driver_init_option_list(stringlist_type * option_list); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/torque_driver.h b/ThirdParty/Ert/libjob_queue/include/ert/job_queue/torque_driver.h deleted file mode 100644 index e18c7df8e5..0000000000 --- a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/torque_driver.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'torque_driver.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. - */ -#ifndef TORQUE_DRIVER_H -#define TORQUE_DRIVER_H - -#ifdef __cplusplus -extern "C" { -#endif -#include - -#include -#include - - /* - The options supported by the Torque driver. - */ -#define TORQUE_QSUB_CMD "QSUB_CMD" -#define TORQUE_QSTAT_CMD "QSTAT_CMD" -#define TORQUE_QDEL_CMD "QDEL_CMD" -#define TORQUE_QUEUE "QUEUE" -#define TORQUE_NUM_CPUS_PER_NODE "NUM_CPUS_PER_NODE" -#define TORQUE_NUM_NODES "NUM_NODES" -#define TORQUE_KEEP_QSUB_OUTPUT "KEEP_QSUB_OUTPUT" -#define TORQUE_CLUSTER_LABEL "CLUSTER_LABEL" -#define TORQUE_JOB_PREFIX_KEY "JOB_PREFIX" -#define TORQUE_SUBMIT_SLEEP "SUBMIT_SLEEP" -#define TORQUE_DEBUG_OUTPUT "DEBUG_OUTPUT" - -#define TORQUE_DEFAULT_QSUB_CMD "qsub" -#define TORQUE_DEFAULT_QSTAT_CMD "qstat" -#define TORQUE_DEFAULT_QDEL_CMD "qdel" -#define TORQUE_DEFAULT_SUBMIT_SLEEP "0" - - - typedef struct torque_driver_struct torque_driver_type; - typedef struct torque_job_struct torque_job_type; - - - void * torque_driver_alloc(); - - - void * torque_driver_submit_job(void * __driver, - const char * submit_cmd, - int num_cpu, - const char * run_path, - const char * job_name, - int argc, - const char ** argv); - - void torque_driver_kill_job(void * __driver, void * __job); - void torque_driver_free__(void * __driver); - void torque_driver_free(torque_driver_type * driver); - job_status_type torque_driver_get_job_status(void * __driver, void * __job); - void torque_driver_free_job(void * __job); - void torque_driver_set_qstat_refresh_interval(torque_driver_type * driver, int refresh_interval); - - const void * torque_driver_get_option(const void * __driver, const char * option_key); - bool torque_driver_set_option(void * __driver, const char * option_key, const void * value); - void torque_driver_init_option_list(stringlist_type * option_list); - - void torque_job_create_submit_script(const char * run_path, const char * submit_cmd, int argc, const char ** job_argv); - int torque_driver_get_submit_sleep( const torque_driver_type * driver ); - FILE * torque_driver_get_debug_stream( const torque_driver_type * driver ); - - - UTIL_SAFE_CAST_HEADER(torque_driver); - -#ifdef __cplusplus -} -#endif - -#endif /* TORQUE_DRIVER_H */ - diff --git a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/workflow.h b/ThirdParty/Ert/libjob_queue/include/ert/job_queue/workflow.h deleted file mode 100644 index f6b3f7eb98..0000000000 --- a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/workflow.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'workflow.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_WORKFLOW_H -#define ERT_WORKFLOW_H - - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include - -#include -#include - - typedef struct workflow_struct workflow_type; - - const config_error_type * workflow_get_last_error( const workflow_type * workflow); - workflow_type * workflow_alloc( const char * src_file , workflow_joblist_type * joblist); - bool workflow_run( workflow_type * workflow, void * self , bool verbose , const subst_list_type * context); - void workflow_free( workflow_type * workflow ); - void workflow_free__( void * arg ); - - int workflow_get_stack_size( const workflow_type * workflow ); - void * workflow_iget_stack_ptr( const workflow_type * workflow , int index); - void * workflow_pop_stack( workflow_type * workflow ); - - int workflow_size( const workflow_type * workflow); - const workflow_job_type * workflow_iget_job( const workflow_type * workflow, int index); - stringlist_type * workflow_iget_arguments( const workflow_type * workflow, int index); - bool workflow_try_compile( workflow_type * script , const subst_list_type * context); - UTIL_IS_INSTANCE_HEADER( workflow ); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/workflow_job.h b/ThirdParty/Ert/libjob_queue/include/ert/job_queue/workflow_job.h deleted file mode 100644 index 6168beb2d0..0000000000 --- a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/workflow_job.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'workflow_job.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_WORKFLOW_JOB_H -#define ERT_WORKFLOW_JOB_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - - - typedef void * (workflow_job_ftype) (void * self , const stringlist_type * arg ); - typedef struct workflow_job_struct workflow_job_type; - - const char * workflow_job_get_name( const workflow_job_type * workflow_job ); - bool workflow_job_internal( const workflow_job_type * workflow_job ); - config_parser_type * workflow_job_alloc_config(); - workflow_job_type * workflow_job_alloc(const char * name , bool internal); - void workflow_job_free( workflow_job_type * workflow_job ); - void workflow_job_free__( void * arg); - void workflow_job_set_executable( workflow_job_type * workflow_job , const char * executable ); - workflow_job_type * workflow_job_config_alloc( const char * name , config_parser_type * config , const char * config_file); - - void workflow_job_update_config_compiler( const workflow_job_type * workflow_job , config_parser_type * config_compiler ); - void workflow_job_set_executable( workflow_job_type * workflow_job , const char * executable); - char * workflow_job_get_executable( workflow_job_type * workflow_job); - - void workflow_job_set_internal_script( workflow_job_type * workflow_job , const char * script_path); - char* workflow_job_get_internal_script_path( const workflow_job_type * workflow_job); - bool workflow_job_is_internal_script( const workflow_job_type * workflow_job); - - void workflow_job_set_function( workflow_job_type * workflow_job , const char * function); - char * workflow_job_get_function( workflow_job_type * workflow_job); - void workflow_job_set_module( workflow_job_type * workflow_job , const char * module); - char * workflow_job_get_module( workflow_job_type * workflow_job); - void * workflow_job_run( const workflow_job_type * job, void * self , bool verbose , const stringlist_type * arg); - - int workflow_job_get_min_arg( const workflow_job_type * workflow_job ); - int workflow_job_get_max_arg( const workflow_job_type * workflow_job ); - config_item_types workflow_job_iget_argtype( const workflow_job_type * workflow_job, int index); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/workflow_joblist.h b/ThirdParty/Ert/libjob_queue/include/ert/job_queue/workflow_joblist.h deleted file mode 100644 index e8d37af18e..0000000000 --- a/ThirdParty/Ert/libjob_queue/include/ert/job_queue/workflow_joblist.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'workflow_joblist.h' is part of ERT - Ensemble based - Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - - - -#ifndef ERT_WORKFLOW_JOBLIST_H -#define ERT_WORKFLOW_JOBLIST_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -typedef struct workflow_joblist_struct workflow_joblist_type; - - workflow_joblist_type * workflow_joblist_alloc(); - void workflow_joblist_free( workflow_joblist_type * joblist); - const workflow_job_type * workflow_joblist_get_job( const workflow_joblist_type * joblist , const char * job_name); - void workflow_joblist_add_job( workflow_joblist_type * joblist , const workflow_job_type * job); - bool workflow_joblist_add_job_from_file( workflow_joblist_type * joblist , const char * job_name , const char * config_file ); - config_parser_type * workflow_joblist_get_compiler( const workflow_joblist_type * joblist ); - config_parser_type * workflow_joblist_get_job_config( const workflow_joblist_type * joblist ); - bool workflow_joblist_has_job( const workflow_joblist_type * joblist , const char * job_name); - stringlist_type * workflow_joblist_get_job_names(const workflow_joblist_type * joblist); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libjob_queue/src/CMakeLists.txt b/ThirdParty/Ert/libjob_queue/src/CMakeLists.txt deleted file mode 100644 index 4332edbc83..0000000000 --- a/ThirdParty/Ert/libjob_queue/src/CMakeLists.txt +++ /dev/null @@ -1,30 +0,0 @@ -#configure_file (${CMAKE_CURRENT_SOURCE_DIR}/CMake/include/libjob_queue_build_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/libjob_queue_build_config.h) - - -set(source_files job_queue_status.c forward_model.c queue_driver.c job_queue.c job_node.c job_list.c local_driver.c rsh_driver.c torque_driver.c ext_job.c ext_joblist.c workflow_job.c workflow.c workflow_joblist.c job_queue_manager.c) -set(header_files job_queue.h queue_driver.h local_driver.h job_node.h job_list.h rsh_driver.h torque_driver.h ext_job.h ext_joblist.h forward_model.h workflow_job.h workflow.h workflow_joblist.h job_queue_manager.h) -set_property(SOURCE rsh_driver.c PROPERTY COMPILE_FLAGS "-Wno-error") - -list( APPEND source_files lsf_driver.c) -list( APPEND header_files lsf_driver.h) - -if (HAVE_LSF_LIBRARY) - list( APPEND source_files lsb.c) - list( APPEND header_files lsb.h) -endif() - -add_library( job_queue SHARED ${source_files} ) -set_target_properties( job_queue PROPERTIES VERSION ${ERT_VERSION_MAJOR}.${ERT_VERSION_MINOR} SOVERSION ${ERT_VERSION_MAJOR} ) -target_link_libraries( job_queue config ert_util ) -if (USE_RUNPATH) - add_runpath( job_queue ) -endif() - -target_link_libraries( job_queue dl ) - -if (INSTALL_ERT) - install(TARGETS job_queue DESTINATION ${CMAKE_INSTALL_LIBDIR}) - foreach(header ${header_files}) - install(FILES ../include/ert/job_queue/${header} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/ert/job_queue) - endforeach() -endif() diff --git a/ThirdParty/Ert/libjob_queue/src/ext_job.c b/ThirdParty/Ert/libjob_queue/src/ext_job.c deleted file mode 100644 index 29772ffcb1..0000000000 --- a/ThirdParty/Ert/libjob_queue/src/ext_job.c +++ /dev/null @@ -1,985 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'ext_job.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -/* - About arguments - --------------- - How a job is run is defined in terms of the following variables: - - o stdout_file / stdin_file / stderr_file - o arglist - o .... - - These variables will then contain string values from when the job - configuration is read in, for example this little job - - STDOUT my_stdout - STDERR my_stderr - ARGLIST my_job_input my_job_output - - stdout & stderr are redirected to the files 'my_stdout' and - 'my_stderr' respectively, and when invoked with an exec() call the - job is given the argumentlist: - - my_job_input my_job_output - - This implies that _every_time_ this job is invoked the argumentlist - will be identical; that is clearly quite limiting! To solve this we - have the possibility of performing string substitutions on the - strings in the job defintion prior to executing the job, this is - handled with the privat_args substitutions. The definition for a - copy-file job: - - - EXECUTABLE /bin/cp - ARGLIST - - - This can then be invoked several times, with different key=value - arguments for the SRC_FILE and TARGET_FILE: - - - COPY_FILE(SRC_FILE = file1 , TARGET_FILE = /tmp/file1) - COPY_FILE(SRC_FILE = file2 , TARGET_FILE = /tmp/file2) - -*/ - - - -/* - - -jobList = [ - {"executable" : None, - "environment" : {"LM_LICENSE_PATH" : "1700@osl001lic.hda.hydro.com:1700@osl002lic.hda.hydro.com:1700@osl003lic.hda.hydro.com", - "F_UFMTENDIAN" : "big"}, - "target_file":"222", - "argList" : [], - "stdout" : "eclipse.stdout", - "stderr" : "eclipse.stdout", - "stdin" : "eclipse.stdin"}] -*/ - - -#define EXT_JOB_TYPE_ID 763012 - - -struct ext_job_struct { - UTIL_TYPE_ID_DECLARATION; - char * name; - char * executable; - char * target_file; - char * error_file; /* Job has failed if this is present. */ - char * start_file; /* Will not start if not this file is present */ - char * stdout_file; - char * stdin_file; - char * stderr_file; - char * license_path; /* If this is NULL - it will be unrestricted ... */ - char * license_root_path; - char * config_file; - int max_running; /* 0 means unlimited. */ - int max_running_minutes; /* The maximum number of minutes this job is allowed to run - 0: unlimited. */ - subst_list_type * private_args; /* A substitution list of input arguments which is performed before the external substitutions - - these are the arguments supplied as key=value pairs in the forward model call. */ - char * private_args_string; - char * argv_string; - stringlist_type * argv; /* This should *NOT* start with the executable */ - hash_type * environment; - hash_type * default_mapping; - char * help_text; - - bool private_job; /* Can the current user/delete this job? (private_job == true) means the user can edit it. */ - bool __valid; /* Temporary variable consulted during the bootstrap - when the ext_job is completely initialized this should NOT be consulted anymore. */ -}; - - -static UTIL_SAFE_CAST_FUNCTION( ext_job , EXT_JOB_TYPE_ID) - - - - - - - -static ext_job_type * ext_job_alloc__(const char * name , const char * license_root_path , bool private_job) { - ext_job_type * ext_job = util_malloc(sizeof * ext_job ); - - UTIL_TYPE_ID_INIT( ext_job , EXT_JOB_TYPE_ID); - ext_job->name = util_alloc_string_copy( name ); - ext_job->license_root_path = util_alloc_string_copy( license_root_path ); - ext_job->executable = NULL; - ext_job->stdout_file = NULL; - ext_job->target_file = NULL; - ext_job->error_file = NULL; - ext_job->start_file = NULL; - ext_job->stdin_file = NULL; - ext_job->stderr_file = NULL; - ext_job->environment = hash_alloc(); - ext_job->default_mapping = hash_alloc(); - ext_job->argv = stringlist_alloc_new(); - ext_job->argv_string = NULL; - ext_job->__valid = true; - ext_job->license_path = NULL; - ext_job->config_file = NULL; - ext_job->max_running = 0; /* 0 means unlimited. */ - ext_job->max_running_minutes = 0; /* 0 means unlimited. */ - ext_job->private_job = private_job; /* If private_job == true the job is user editable. */ - ext_job->help_text = NULL; - ext_job->private_args_string = NULL; - - /* - ext_job->private_args is set explicitly in the ext_job_alloc() - and ext_job_alloc_copy() functions. - */ - return ext_job; -} - - -const char * ext_job_get_help_text( const ext_job_type * job ) { - if (job->help_text != NULL) - return job->help_text; - else - return "No help text installed for this job."; -} - - -void ext_job_set_help_text( ext_job_type * job , const char * help_text) { - job->help_text = util_realloc_string_copy( job->help_text , help_text ); -} - -/* - Exported function - must have name != NULL. Observe that the - instance returned from this function is not really usable for - anything. - - Should probably define a minium set of parameters which must be set - before the job is in a valid initialized state. -*/ - -ext_job_type * ext_job_alloc(const char * name , const char * license_root_path , bool private_job) { - ext_job_type * ext_job = ext_job_alloc__(name , license_root_path , private_job); - ext_job->private_args = subst_list_alloc( NULL ); - return ext_job; -} - - - - -ext_job_type * ext_job_alloc_copy(const ext_job_type * src_job) { - ext_job_type * new_job = ext_job_alloc__( src_job->name , src_job->license_root_path , true /* All copies are by default private jobs. */); - - new_job->config_file = util_alloc_string_copy(src_job->config_file); - new_job->executable = util_alloc_string_copy(src_job->executable); - new_job->target_file = util_alloc_string_copy(src_job->target_file); - new_job->error_file = util_alloc_string_copy(src_job->error_file); - new_job->start_file = util_alloc_string_copy(src_job->start_file); - new_job->stdout_file = util_alloc_string_copy(src_job->stdout_file); - new_job->stdin_file = util_alloc_string_copy(src_job->stdin_file); - new_job->stderr_file = util_alloc_string_copy(src_job->stderr_file); - new_job->license_path = util_alloc_string_copy(src_job->license_path); - - ext_job_set_help_text( new_job , src_job->help_text ); - - new_job->max_running_minutes = src_job->max_running_minutes; - new_job->max_running = src_job->max_running; - new_job->private_args = subst_list_alloc_deep_copy( src_job->private_args ); - - /* Copying over all the keys in the environment hash table */ - { - hash_iter_type * iter = hash_iter_alloc( src_job->environment ); - const char * key = hash_iter_get_next_key(iter); - while (key != NULL) { - char * value = hash_get( src_job->environment , key); - hash_insert_hash_owned_ref( new_job->environment , key , util_alloc_string_copy(value) , free); - key = hash_iter_get_next_key(iter); - } - hash_iter_free(iter); - } - - - /* The default mapping. */ - { - hash_iter_type * iter = hash_iter_alloc( src_job->default_mapping ); - const char * key = hash_iter_get_next_key(iter); - while (key != NULL) { - char * value = hash_get( src_job->default_mapping , key); - hash_insert_hash_owned_ref( new_job->default_mapping , key , util_alloc_string_copy(value) , free); - key = hash_iter_get_next_key(iter); - } - hash_iter_free(iter); - } - - - - stringlist_deep_copy( new_job->argv , src_job->argv ); - - return new_job; -} - - - - -void ext_job_free(ext_job_type * ext_job) { - free(ext_job->name); - util_safe_free(ext_job->executable); - util_safe_free(ext_job->stdout_file); - util_safe_free(ext_job->stdin_file); - util_safe_free(ext_job->target_file); - util_safe_free(ext_job->error_file); - util_safe_free(ext_job->stderr_file); - util_safe_free(ext_job->license_path); - util_safe_free(ext_job->license_root_path); - util_safe_free(ext_job->config_file); - util_safe_free(ext_job->argv_string); - util_safe_free(ext_job->help_text); - util_safe_free(ext_job->private_args_string); - - hash_free( ext_job->default_mapping); - hash_free( ext_job->environment ); - stringlist_free(ext_job->argv); - subst_list_free( ext_job->private_args ); - free(ext_job); -} - -void ext_job_free__(void * __ext_job) { - ext_job_free ( ext_job_safe_cast(__ext_job) ); -} - - -static void __update_mode( const char * filename , mode_t add_mode) { - util_addmode_if_owner( filename , add_mode); -} - - -/** - The license_path = - - root_license_path / job_name / job_name - -*/ - -static void ext_job_init_license_control(ext_job_type * ext_job) { - if (ext_job->license_path == NULL) { - ext_job->license_path = util_alloc_sprintf("%s%c%s" , ext_job->license_root_path , UTIL_PATH_SEP_CHAR , ext_job->name ); - util_make_path( ext_job->license_path ); - printf("License for %s in %s \n",ext_job->name , ext_job->license_path); - } -} - - - -void ext_job_set_max_time( ext_job_type * ext_job , int max_time ) { - ext_job->max_running_minutes = max_time; -} - - - -/** - @executable parameter: - The raw executable is either - - an absolute path read directly from config - - an absolute path constructed from the relative path from config - with the assumption that the path was a relative path from the - location of the job description file to the executable. - - @executable_raw parameter: - The raw executable as read from config, unprocessed. - - This method have the following logic: - - @executable exists: - We store the full path as the executable field of the job; and - try to update the mode of the full_path executable to make sure it - is executable. - - @executable does not exist, but @executable_raw exists: - We have found an executable relative to the current working - directory. This is deprecated behaviour, support will later be - removed. Suggest new path to executable to user, relative to job - description file and do a recursive call to this method, using - the absolute path as @executable parameter - - @executable does not exist, @executable_raw does not exist and - is an absolute path: - Write error message - - @executable does not exist, @executable_raw does not exist and - is a relative path: - Search trough the PATH variable to try to locate the executable. - If found, do a recursive call to this method, using the absolute path - as @executable parameter - -*/ - -void ext_job_set_executable(ext_job_type * ext_job, const char * executable_abs, const char * executable_input,bool search_path) { - - if (util_file_exists(executable_abs)) { - /* - The @executable parameter points to an existing file; we store - the full path as the executable field of the job; we also try - to update the mode of the full_path executable to make sure it - is executable. - */ - char * full_path = util_alloc_realpath( executable_abs ); - __update_mode( full_path , S_IRUSR + S_IWUSR + S_IXUSR + S_IRGRP + S_IWGRP + S_IXGRP + S_IROTH + S_IXOTH); /* u:rwx g:rwx o:rx */ - ext_job->executable = util_realloc_string_copy(ext_job->executable , full_path); - free( full_path ); - } else if (util_file_exists(executable_input)) { - /* - This "if" case means that we have found an executable relative - to the current working directory. This is deprecated behaviour, - support will be removed - */ - char * full_path = util_alloc_abs_path(executable_input); - const char * job_description_file = ext_job_get_config_file(ext_job); - char * path_to_job_descr_file = util_split_alloc_dirname(job_description_file); - char * new_relative_path_to_exe = util_alloc_rel_path(path_to_job_descr_file, full_path); - char * relative_config_file = util_alloc_rel_path(NULL , ext_job->config_file); - - fprintf(stderr,"/----------------------------------------------------------------\n"); - fprintf(stderr,"| ** WARNING ** \n"); - fprintf(stderr,"|\n"); - fprintf(stderr,"| The convention for locating the executable in a forward model \n"); - fprintf(stderr,"| job has changed. When using a relative path in the EXECUTABLE \n"); - fprintf(stderr,"| setting in the job description file, the path will be interpreted\n"); - fprintf(stderr,"| relative to the location of the job description file. \n"); - fprintf(stderr,"|\n"); - fprintf(stderr,"| The job:\'%s\' will temporarilty continue to work in the \n",ext_job->name); - fprintf(stderr,"| present form, but it is recommended to update: \n"); - fprintf(stderr,"|\n"); - fprintf(stderr,"| 1. Open the file:%s in an editor \n",relative_config_file); - fprintf(stderr,"|\n"); - fprintf(stderr,"| 2. Change the EXECUTABLE line to: \n"); - fprintf(stderr,"|\n"); - fprintf(stderr,"| EXECUTABLE %s \n" , new_relative_path_to_exe); - fprintf(stderr,"|\n"); - fprintf(stderr,"| The main advantage with this change in behaviour is that the\n"); - fprintf(stderr,"| job description file and the executable can be relocated.\n"); - fprintf(stderr,"\\----------------------------------------------------------------\n\n"); - - ext_job_set_executable(ext_job, full_path, NULL, search_path); - - free(new_relative_path_to_exe); - free(path_to_job_descr_file); - free(full_path); - free(relative_config_file); - - } else if (util_is_abs_path( executable_input )) { - /* If you have given an absolute path (i.e. starting with '/' to - a non existing job we mark it as invalid - no possibility to - provide context replacement afterwards. The job will be - discarded by the calling scope. - */ - fprintf(stderr , "** Warning: the executable:%s can not be found,\n" - " job:%s will not be available.\n" , executable_abs , ext_job->name ); - ext_job->__valid = false; - } else { - if (search_path){ - /* Go through the PATH variable to try to locate the executable. */ - char * path_executable = util_alloc_PATH_executable( executable_input ); - - if (path_executable != NULL) { - ext_job_set_executable( ext_job , path_executable, NULL, search_path ); - free( path_executable ); - } else { - /* We take the chance that user will supply a valid subst key for this later; - if the final executable is not an actually executable file when exporting the - job from ext_job_python_fprintf() a big warning will be written on stderr. - */ - fprintf(stderr , "** Warning: Unable to locate the executable %s for job %s.\n" - " Path to executable must be relative to the job description file, or an absolute path.\n" - " Please update job EXECUTABLE for job %s. \n" , executable_abs , ext_job->name, ext_job->name); - ext_job->__valid = false; - } - } else { - ext_job->executable = util_realloc_string_copy(ext_job->executable , executable_input); - } - } - - /* - If in the end we do not have execute rights to the executable : - discard the job. - */ - if (ext_job->executable != NULL) { - if (util_file_exists(executable_abs)) { - if (!util_is_executable( ext_job->executable )) { - fprintf(stderr , "** You do not have execute rights to:%s - job will not be available.\n" , ext_job->executable); - ext_job->__valid = false; /* Mark the job as NOT successfully installed - the ext_job - instance will later be freed and discarded. */ - } - } - } -} - - - -/** - Observe that this does NOT reread the ext_job instance from the new - config_file. -*/ - - -/*****************************************************************/ -/* Scalar set and get functions */ - -void ext_job_set_config_file(ext_job_type * ext_job, const char * config_file) { - ext_job->config_file = util_realloc_string_copy(ext_job->config_file , config_file); -} - -const char * ext_job_get_config_file(const ext_job_type * ext_job) { - return ext_job->config_file; -} - -void ext_job_set_target_file(ext_job_type * ext_job, const char * target_file) { - ext_job->target_file = util_realloc_string_copy(ext_job->target_file , target_file); -} - -const char * ext_job_get_target_file(const ext_job_type * ext_job) { - return ext_job->target_file; -} - -void ext_job_set_error_file(ext_job_type * ext_job, const char * error_file) { - ext_job->error_file = util_realloc_string_copy(ext_job->error_file , error_file); -} - -const char * ext_job_get_error_file(const ext_job_type * ext_job) { - return ext_job->error_file; -} - -const char * ext_job_get_executable(const ext_job_type * ext_job) { - return ext_job->executable; -} - -void ext_job_set_start_file(ext_job_type * ext_job, const char * start_file) { - ext_job->start_file = util_realloc_string_copy(ext_job->start_file , start_file); -} - -const char * ext_job_get_start_file(const ext_job_type * ext_job) { - return ext_job->start_file; -} - -void ext_job_set_name(ext_job_type * ext_job, const char * name) { - ext_job->name = util_realloc_string_copy(ext_job->name , name); -} - -const char * ext_job_get_name(const ext_job_type * ext_job) { - return ext_job->name; -} -void ext_job_set_stdin_file(ext_job_type * ext_job, const char * stdin_file) { - ext_job->stdin_file = util_realloc_string_copy(ext_job->stdin_file , stdin_file); -} - -const char * ext_job_get_stdin_file(const ext_job_type * ext_job) { - return ext_job->stdin_file; -} - -void ext_job_set_stdout_file(ext_job_type * ext_job, const char * stdout_file) { - ext_job->stdout_file = util_realloc_string_copy(ext_job->stdout_file , stdout_file); -} - -const char * ext_job_get_stdout_file(const ext_job_type * ext_job) { - return ext_job->stdout_file; -} - -void ext_job_set_stderr_file(ext_job_type * ext_job, const char * stderr_file) { - ext_job->stderr_file = util_realloc_string_copy(ext_job->stderr_file , stderr_file); -} - -const char * ext_job_get_stderr_file(const ext_job_type * ext_job) { - return ext_job->stderr_file; -} - -void ext_job_set_max_running( ext_job_type * ext_job , int max_running) { - ext_job->max_running = max_running; - if (max_running > 0) - ext_job_init_license_control( ext_job ); -} - -int ext_job_get_max_running( const ext_job_type * ext_job ) { - return ext_job->max_running; -} - -void ext_job_set_max_running_minutes( ext_job_type * ext_job , int max_running_minutes) { - ext_job->max_running_minutes = max_running_minutes; -} - -int ext_job_get_max_running_minutes( const ext_job_type * ext_job ) { - return ext_job->max_running_minutes; -} - -/*****************************************************************/ - -void ext_job_set_private_arg(ext_job_type * ext_job, const char * key , const char * value) { - subst_list_append_copy( ext_job->private_args , key , value , NULL); -} - -void ext_job_add_environment(ext_job_type *ext_job , const char * key , const char * value) { - hash_insert_hash_owned_ref( ext_job->environment , key , util_alloc_string_copy( value ) , free); -} - - -void ext_job_clear_environment( ext_job_type * ext_job ) { - hash_clear( ext_job->environment ); -} - -hash_type * ext_job_get_environment( ext_job_type * ext_job ) { - return ext_job->environment; -} - - -/*****************************************************************/ - - -static char * __alloc_filtered_string( const char * src_string , const subst_list_type * private_args, const subst_list_type * global_args) { - char * tmp1 = subst_list_alloc_filtered_string( private_args , src_string ); /* internal filtering first */ - char * tmp2; - - if (global_args != NULL) { - tmp2 = subst_list_alloc_filtered_string( global_args , tmp1 ); /* Global filtering. */ - free( tmp1 ); - } else - tmp2 = tmp1; - - return tmp2; - -} - -static void __fprintf_string(FILE * stream , const char * s , const subst_list_type * private_args, const subst_list_type * global_args) { - char * filtered_string = __alloc_filtered_string(s , private_args , global_args ); - fprintf(stream , "\"%s\"" , filtered_string ); - free( filtered_string ); -} - - -static void __fprintf_python_string(FILE * stream , const char * id , const char * value, const subst_list_type * private_args, const subst_list_type * global_args) { - fprintf(stream , "\"%s\" : " , id); - if (value == NULL) - fprintf(stream,"None"); - else - __fprintf_string(stream , value , private_args , global_args); -} - - -static void __fprintf_init_python_list( FILE * stream , const char * id ) { - fprintf(stream , "\"%s\" : " , id); - fprintf(stream,"["); -} - -static void __fprintf_close_python_list( FILE * stream ) { - fprintf(stream,"]"); -} - - - - - -static void __fprintf_python_hash(FILE * stream , const char * id , hash_type * hash, const subst_list_type * private_args, const subst_list_type * global_args) { - fprintf(stream , "\"%s\" : " , id); - int hash_size = hash_get_size(hash); - if (hash_size > 0) { - int counter = 0; - fprintf(stream,"{"); - hash_iter_type * iter = hash_iter_alloc(hash); - const char * key = hash_iter_get_next_key(iter); - while (key != NULL) { - const char * value = hash_get(hash , key); - - fprintf(stream,"\"%s\" : " , key); - __fprintf_string(stream , value , private_args , global_args); - - if (counter < (hash_size - 1)) - fprintf(stream,","); - - key = hash_iter_get_next_key(iter); - } - fprintf(stream,"}"); - } else - fprintf(stream , "None"); -} - - -static void __fprintf_python_int( FILE * stream , const char * key , int value) { - if (value > 0) - fprintf(stream , "\"%s\" : %d" , key , value); - else - fprintf(stream , "\"%s\" : None" , key); -} - - -static void __end_line(FILE * stream) { - fprintf(stream,",\n"); -} - - -static void __indent(FILE * stream, int indent) { - int i; - for (i = 0; i < indent; i++) - fprintf(stream," "); -} - - -/* - This is special cased to support the default mapping. -*/ - -static void ext_job_fprintf_python_argList( const ext_job_type * ext_job , FILE * stream , const subst_list_type * global_args) { - __fprintf_init_python_list( stream , "argList" ); - { - for (int index = 0; index < stringlist_get_size( ext_job->argv ); index++) { - const char * src_string = stringlist_iget( ext_job->argv , index ); - char * filtered_string = __alloc_filtered_string(src_string , ext_job->private_args , global_args ); - if (hash_has_key( ext_job->default_mapping , filtered_string )) - filtered_string = util_realloc_string_copy( filtered_string , hash_get( ext_job->default_mapping , filtered_string )); - - fprintf(stream , "\"%s\"" , filtered_string ); - if (index < (stringlist_get_size( ext_job->argv) - 1)) - fprintf(stream , "," ); - - free( filtered_string ); - } - } - __fprintf_close_python_list( stream ); -} - - - -void ext_job_python_fprintf(const ext_job_type * ext_job, FILE * stream, const subst_list_type * global_args) { - fprintf(stream," {"); - { - __indent(stream, 0); __fprintf_python_string(stream , "name" , ext_job->name , ext_job->private_args , NULL); __end_line(stream); - __indent(stream, 2); __fprintf_python_string(stream , "executable" , ext_job->executable , ext_job->private_args, global_args); __end_line(stream); - __indent(stream, 2); __fprintf_python_string(stream , "target_file" , ext_job->target_file , ext_job->private_args, global_args); __end_line(stream); - __indent(stream, 2); __fprintf_python_string(stream , "error_file" , ext_job->error_file , ext_job->private_args, global_args); __end_line(stream); - __indent(stream, 2); __fprintf_python_string(stream , "start_file" , ext_job->start_file , ext_job->private_args, global_args); __end_line(stream); - __indent(stream, 2); __fprintf_python_string(stream , "stdout" , ext_job->stdout_file , ext_job->private_args, global_args); __end_line(stream); - __indent(stream, 2); __fprintf_python_string(stream , "stderr" , ext_job->stderr_file , ext_job->private_args, global_args); __end_line(stream); - __indent(stream, 2); __fprintf_python_string(stream , "stdin" , ext_job->stdin_file , ext_job->private_args, global_args); __end_line(stream); - __indent(stream, 2); ext_job_fprintf_python_argList(ext_job , stream , global_args); __end_line(stream); - __indent(stream, 2); __fprintf_python_hash(stream , "environment" , ext_job->environment , ext_job->private_args, global_args); __end_line(stream); - __indent(stream, 2); __fprintf_python_string(stream , "license_path" , ext_job->license_path , ext_job->private_args, global_args); __end_line(stream); - __indent(stream, 2); __fprintf_python_int( stream , "max_running_minutes" , ext_job->max_running_minutes ); __end_line(stream); - __indent(stream, 2); __fprintf_python_int( stream , "max_running" , ext_job->max_running ); __end_line(stream); - } - fprintf(stream,"}"); -} - - -#define PRINT_KEY_STRING( stream , key , value ) \ -if (value != NULL) \ -{ \ - fprintf(stream , "%16s ", key); \ - fprintf(stream , "%s\n" , value); \ -} - - -#define PRINT_KEY_INT( stream , key , value ) \ -if (value != 0) \ -{ \ - fprintf(stream , "%16s ", key); \ - fprintf(stream , "%d\n" , value); \ -} - - -/** - Observe that the job will save itself to the internalized - config_file; if you wish to save to some other place you must call - ext_job_set_config_file() first. -*/ - -void ext_job_save( const ext_job_type * ext_job ) { - FILE * stream = util_mkdir_fopen( ext_job->config_file , "w" ); - - PRINT_KEY_STRING( stream , "EXECUTABLE" , ext_job->executable); - PRINT_KEY_STRING( stream , "STDIN" , ext_job->stdin_file); - PRINT_KEY_STRING( stream , "STDERR" , ext_job->stderr_file); - PRINT_KEY_STRING( stream , "STDOUT" , ext_job->stdout_file); - PRINT_KEY_STRING( stream , "TARGET_FILE" , ext_job->target_file); - PRINT_KEY_STRING( stream , "START_FILE" , ext_job->start_file); - PRINT_KEY_STRING( stream , "ERROR_FILE" , ext_job->error_file); - PRINT_KEY_INT( stream , "MAX_RUNNING" , ext_job->max_running); - PRINT_KEY_INT( stream , "MAX_RUNNING_MINUTES" , ext_job->max_running_minutes); - - if (stringlist_get_size( ext_job->argv ) > 0) { - fprintf(stream , "%16s" , "ARGLIST"); - stringlist_fprintf( ext_job->argv , " " , stream ); - fprintf(stream , "\n"); - } - if (hash_get_size( ext_job->environment ) > 0) { - hash_iter_type * hash_iter = hash_iter_alloc( ext_job->environment ); - while (!hash_iter_is_complete( hash_iter )) { - const char * key = hash_iter_get_next_key( hash_iter ); - fprintf(stream, "%16s %16s %s\n" , "ENV" , key , (const char *) hash_get( ext_job->environment , key )); - } - hash_iter_free( hash_iter ); - } - fclose( stream ); -} - -#undef PRINT_KEY_STRING -#undef PRINT_KEY_INT - - - -void ext_job_fprintf(const ext_job_type * ext_job , FILE * stream) { - fprintf(stream , "%s", ext_job->name); - if (subst_list_get_size( ext_job->private_args ) > 0) { - fprintf(stream , "("); - subst_list_fprintf(ext_job->private_args , stream); - fprintf(stream , ")"); - } - fprintf(stream , " "); -} - - -/** - The format variable @fmt should contain two '%s' placeholders - - one for the job name, and one for the job description file. -*/ - -void ext_job_fprintf_config(const ext_job_type * ext_job , const char * fmt , FILE * stream) { - fprintf(stream , fmt , ext_job->name , ext_job->config_file ); -} - - - - - - -ext_job_type * ext_job_fscanf_alloc(const char * name , const char * license_root_path , bool private_job , const char * config_file, bool search_path) { - { - mode_t target_mode = S_IRUSR + S_IWUSR + S_IRGRP + S_IWGRP + S_IROTH; /* u+rw g+rw o+r */ - __update_mode( config_file , target_mode ); - } - - if (util_entry_readable( config_file)) { - ext_job_type * ext_job = NULL; - config_parser_type * config = config_alloc( ); - - { - config_schema_item_type * item; - item = config_add_schema_item(config , "MAX_RUNNING" , false ); config_schema_item_set_argc_minmax(item , 1 , 1 ); config_schema_item_iset_type( item , 0 , CONFIG_INT ); - item = config_add_schema_item(config , "STDIN" , false ); config_schema_item_set_argc_minmax(item , 1 , 1 ); - item = config_add_schema_item(config , "STDOUT" , false ); config_schema_item_set_argc_minmax(item , 1 , 1 ); - item = config_add_schema_item(config , "STDERR" , false ); config_schema_item_set_argc_minmax(item , 1 , 1 ); - item = config_add_schema_item(config , "EXECUTABLE" , true ); config_schema_item_set_argc_minmax(item , 1 , 1 ); config_schema_item_iset_type(item, 0, CONFIG_PATH); - item = config_add_schema_item(config , "TARGET_FILE" , false ); config_schema_item_set_argc_minmax(item , 1 , 1 ); - item = config_add_schema_item(config , "ERROR_FILE" , false ); config_schema_item_set_argc_minmax(item , 1 , 1 ); - item = config_add_schema_item(config , "START_FILE" , false ); config_schema_item_set_argc_minmax(item , 1 , 1 ); - item = config_add_schema_item(config , "ENV" , false ); config_schema_item_set_argc_minmax(item , 2 , 2 ); - item = config_add_schema_item(config , "DEFAULT" , false ); config_schema_item_set_argc_minmax(item , 2 , 2 ); - item = config_add_schema_item(config , "ARGLIST" , false ); config_schema_item_set_argc_minmax(item , 1 , CONFIG_DEFAULT_ARG_MAX ); - item = config_add_schema_item(config , "MAX_RUNNING_MINUTES" , false ); config_schema_item_set_argc_minmax(item , 1 , 1 ); config_schema_item_iset_type( item , 0 , CONFIG_INT ); - } - config_add_alias(config , "EXECUTABLE" , "PORTABLE_EXE"); - - { - config_content_type * content = config_parse(config , config_file , "--" , NULL , NULL , NULL , CONFIG_UNRECOGNIZED_WARN , true); - if (config_content_is_valid( content )) { - ext_job = ext_job_alloc(name , license_root_path , private_job); - ext_job_set_config_file( ext_job , config_file ); - - - if (config_content_has_item(content , "STDIN")) ext_job_set_stdin_file(ext_job , config_content_iget(content , "STDIN" , 0,0)); - if (config_content_has_item(content , "STDOUT")) ext_job_set_stdout_file(ext_job , config_content_iget(content , "STDOUT" , 0,0)); - if (config_content_has_item(content , "STDERR")) ext_job_set_stderr_file(ext_job , config_content_iget(content , "STDERR" , 0,0)); - if (config_content_has_item(content , "ERROR_FILE")) ext_job_set_error_file(ext_job , config_content_iget(content , "ERROR_FILE" , 0,0)); - if (config_content_has_item(content , "TARGET_FILE")) ext_job_set_target_file(ext_job , config_content_iget(content , "TARGET_FILE" , 0,0)); - if (config_content_has_item(content , "START_FILE")) ext_job_set_start_file(ext_job , config_content_iget(content , "START_FILE" , 0,0)); - if (config_content_has_item(content , "MAX_RUNNING")) ext_job_set_max_running(ext_job , config_content_iget_as_int(content , "MAX_RUNNING" , 0,0)); - if (config_content_has_item(content , "MAX_RUNNING_MINUTES")) ext_job_set_max_time(ext_job , config_content_iget_as_int(content , "MAX_RUNNING_MINUTES" , 0,0)); - - - { - const char * executable = config_content_get_value_as_abspath(content , "EXECUTABLE"); - const char * executable_raw = config_content_iget(content , "EXECUTABLE" , 0,0); - ext_job_set_executable(ext_job , executable, executable_raw, search_path); - } - - - { - if (config_content_has_item( content , "ARGLIST")) { - config_content_node_type * arg_node = config_content_get_value_node( content , "ARGLIST"); - int i; - for (i=0; i < config_content_node_get_size( arg_node ); i++) - stringlist_append_copy( ext_job->argv , config_content_node_iget( arg_node , i )); - } - } - - - /** - The code assumes that the hash tables are valid, can not be NULL: - */ - { - if (config_content_has_item( content , "ENV")) { - const config_content_item_type * env_item = config_content_get_item( content , "ENV" ); - for (int ivar = 0; ivar < config_content_item_get_size( env_item ); ivar++) { - const config_content_node_type * env_node = config_content_item_iget_node( env_item , ivar ); - for (int i=0; i < config_content_node_get_size( env_node ); i+= 2) { - const char * key = config_content_node_iget( env_node , i ); - const char * value = config_content_node_iget( env_node , i + 1); - hash_insert_hash_owned_ref( ext_job->environment, key , util_alloc_string_copy( value ) , free); - } - } - } - } - - /* Default mappings; these are used to set values in the argList - which have not been supplied by the calling context. */ - { - if (config_content_has_item( content , "DEFAULT")) { - const config_content_item_type * default_item = config_content_get_item( content , "DEFAULT"); - for (int ivar = 0; ivar < config_content_item_get_size( default_item ); ivar++) { - const config_content_node_type * default_node = config_content_item_iget_node( default_item , ivar ); - for (int i=0; i < config_content_node_get_size( default_node ); i+= 2) { - const char * key = config_content_node_iget( default_node , i ); - const char * value = config_content_node_iget( default_node , i + 1); - hash_insert_hash_owned_ref( ext_job->default_mapping, key , util_alloc_string_copy( value ) , free); - } - } - } - } - - if (!ext_job->__valid) { - /* - Something NOT OK (i.e. EXECUTABLE now); free the job instance and return NULL: - */ - ext_job_free( ext_job ); - ext_job = NULL; - fprintf(stderr,"** Warning: job: \'%s\' not available ... \n", name ); - } - } else { - config_error_type * error = config_content_get_errors( content ); - config_error_fprintf( error , true , stderr ); - fprintf(stderr,"** Warning: job: \'%s\' not available ... \n", name ); - } - config_content_free( content ); - } - config_free(config); - - return ext_job; - } else { - fprintf(stderr,"** Warning: you do not have permission to read file:\'%s\' - job:%s not available. \n", config_file , name); - return NULL; - } -} - - -const stringlist_type * ext_job_get_arglist( const ext_job_type * ext_job ) { - return ext_job->argv; -} - - -/** - -*/ - -//const char * ext_job_get_arglist_as_string( ext_job_type * ext_job ) { -// if (stringlist_get_size( ext_job->argv ) == 0) -// return NULL; -// else { -// const char * sep = " "; -// int argc = stringlist_get_size( ext_job->argv ); -// int i; -// buffer_type * buffer = buffer_alloc( 512 ); -// for (i = 0; i < argc; i++) { -// const char * arg = stringlist_iget( ext_job->argv , i ); -// bool quote = false; -// if (strchr(arg , ' ') != NULL) -// quote = true; -// -// if (quote) -// buffer_fwrite_char( buffer , ' ' ); -// buffer_fwrite_char_ptr( buffer , arg ); -// if (quote) -// buffer_fwrite_char( buffer , ' ' ); -// -// if (i < (argc - 1)) -// buffer_fwrite_char_ptr( buffer , sep ); -// -// buffer_fwrite_char( buffer , '\0'); -// util_safe_free(ext_job->argv_string); -// ext_job->argv_string = buffer_alloc_data_copy( buffer ); -// buffer_free( buffer ); -// -// return ext_job->argv_string; -// } -//} -// -// -//void ext_job_set_arglist_from_string( ext_job_type * ext_job , const char * argv_string ) { -// parser_type * parser = parser_alloc(" " , "\"" , NULL , NULL , NULL , NULL ); -// stringlist_free( ext_job->argv ); -// ext_job->argv = parser_tokenize_buffer( parser , argv_string , true ); -// parser_free( parser ); -//} - - -const char * ext_job_get_private_args_as_string( ext_job_type * ext_job ) { - util_safe_free( ext_job->private_args_string ); - ext_job->private_args_string = subst_list_alloc_string_representation( ext_job->private_args ); - return ext_job->private_args_string; -} - - -/** - Set the internal arguments of the job based on an input string - @arg_string which is of the form: - - key1=value1, key2=value2 , key3=value3 - - The internal private argument list is cleared before adding these - arguments. -*/ - -int ext_job_set_private_args_from_string( ext_job_type * ext_job , const char * arg_string ) { - subst_list_clear( ext_job->private_args ); - return subst_list_add_from_string( ext_job->private_args , arg_string , true ); -} - - - -bool ext_job_is_shared( const ext_job_type * ext_job ) { - return !ext_job->private_job; -} - -bool ext_job_is_private( const ext_job_type * ext_job ) { - return ext_job->private_job; -} - - -#undef ASSERT_TOKENS diff --git a/ThirdParty/Ert/libjob_queue/src/ext_joblist.c b/ThirdParty/Ert/libjob_queue/src/ext_joblist.c deleted file mode 100644 index b14464bfb5..0000000000 --- a/ThirdParty/Ert/libjob_queue/src/ext_joblist.c +++ /dev/null @@ -1,183 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'ext_joblist.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - - -//#define MODULE_NAME "jobs.py" -//#define JOBLIST_NAME "jobList" - - -/** - About the 'license' system: - --------------------------- - - There is a simple possibility to limit the number of jobs which are - running in parallell. It works like this: - - 1. For the joblist as a whole a license_path is created. This - license path should contain both a uid and pid of the current - process. This ensures that: - - a. The license count is per user and per ert instance. - b. Each ert instance starts with a fresh license count. A - license path, and license files left dangling after unclean - shutdown can just be removed. - - 2. For each job in the joblist a subdirectory is created under the - license_path. - - 3. For each job a license_file is created, and for each time a new - instance is checked out a hard_link to this license_file is - created - i.e. the number of checked out licenses is a - hard_link count (-1). - - Step three here is implemented by the job_dispatch script - actually running the jobs. - - It is essential that the license_root_path is on a volume which is - accessible from all the nodes which will run jobs. Using e.g. /tmp - as license_root_path will fail HARD. - -*/ - - - -/*****************************************************************/ - -struct ext_joblist_struct { - hash_type * jobs; -}; - - - - -ext_joblist_type * ext_joblist_alloc( ) { - ext_joblist_type * joblist = util_malloc( sizeof * joblist ); - joblist->jobs = hash_alloc(); - return joblist; -} - - -void ext_joblist_free(ext_joblist_type * joblist) { - hash_free(joblist->jobs); - free(joblist); -} - - -void ext_joblist_add_job(ext_joblist_type * joblist , const char * name , ext_job_type * new_job) { - hash_insert_hash_owned_ref(joblist->jobs , name , new_job , ext_job_free__); -} - - -ext_job_type * ext_joblist_get_job(const ext_joblist_type * joblist , const char * job_name) { - if (hash_has_key(joblist->jobs , job_name)) - return hash_get(joblist->jobs , job_name); - else { - util_abort("%s: asked for job:%s which does not exist\n",__func__ , job_name); - return NULL; - } -} - - -ext_job_type * ext_joblist_get_job_copy(const ext_joblist_type * joblist , const char * job_name) { - if (hash_has_key(joblist->jobs , job_name)) - return ext_job_alloc_copy(hash_get(joblist->jobs , job_name)); - else { - util_abort("%s: asked for job:%s which does not exist\n",__func__ , job_name); - return NULL; - } -} - - -bool ext_joblist_has_job(const ext_joblist_type * joblist , const char * job_name) { - return hash_has_key(joblist->jobs , job_name); -} - - -stringlist_type * ext_joblist_alloc_list( const ext_joblist_type * joblist) { - return hash_alloc_stringlist( joblist->jobs ); -} - - -/** - Will attempt to remove the job @job_name from the joblist; if the - job is marked as a shared_job (i.e. installed centrally) the user - is not allowed to delete it. In this case the function will fail - silently. - - Returns true if the job is actually removed, and false otherwise. -*/ - -bool ext_joblist_del_job( ext_joblist_type * joblist , const char * job_name ) { - ext_job_type * job = ext_joblist_get_job( joblist , job_name ); - if (!ext_job_is_shared( job )) { - hash_del( joblist->jobs , job_name ); - return true; - } else - return false; -} - - -hash_type * ext_joblist_get_jobs( const ext_joblist_type * joblist ) { - return joblist->jobs; -} - -void ext_joblist_add_jobs_in_directory(ext_joblist_type * joblist , const char * path, const char * license_root_path, bool user_mode, bool search_path ) { - DIR * dirH = opendir( path ); - if (dirH) { - while (true) { - struct dirent * entry = readdir( dirH ); - if (entry != NULL) { - if ((strcmp(entry->d_name , ".") != 0) && (strcmp(entry->d_name , "..") != 0)) { - char * full_path = util_alloc_filename( path , entry->d_name , NULL ); - if (util_is_file( full_path )) { - ext_job_type * new_job = ext_job_fscanf_alloc(entry->d_name, license_root_path, user_mode, full_path, search_path); - if (new_job != NULL) { - ext_joblist_add_job(joblist, entry->d_name, new_job); - } - else{ - fprintf(stderr," Failed to add forward model job: %s \n",full_path); - } - } - free( full_path ); - } - } else - break; - } - closedir( dirH ); - } else - fprintf(stderr, "** Warning: failed to open jobs directory: %s\n", path); -} - - - diff --git a/ThirdParty/Ert/libjob_queue/src/forward_model.c b/ThirdParty/Ert/libjob_queue/src/forward_model.c deleted file mode 100644 index 6dc51f14d4..0000000000 --- a/ThirdParty/Ert/libjob_queue/src/forward_model.c +++ /dev/null @@ -1,259 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'forward_model.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - - -/** - This file implements a 'forward-model' object. I -*/ - -struct forward_model_struct { - vector_type * jobs; /* The actual jobs in this forward model. */ - const ext_joblist_type * ext_joblist; /* This is the list of external jobs which have been installed - which we can choose from. */ -}; - -#define DEFAULT_JOB_MODULE "jobs.py" -#define DEFAULT_JOBLIST_NAME "jobList" - - - - -forward_model_type * forward_model_alloc(const ext_joblist_type * ext_joblist) { - forward_model_type * forward_model = util_malloc( sizeof * forward_model ); - - forward_model->jobs = vector_alloc_new(); - forward_model->ext_joblist = ext_joblist; - - return forward_model; -} - - -/** - Allocates and returns a stringlist with all the names in the - current forward_model. -*/ -stringlist_type * forward_model_alloc_joblist( const forward_model_type * forward_model ) { - stringlist_type * names = stringlist_alloc_new( ); - int i; - for (i=0; i < vector_get_size( forward_model->jobs ); i++) { - const ext_job_type * job = vector_iget_const( forward_model->jobs , i); - stringlist_append_ref( names , ext_job_get_name( job )); - } - - return names; -} - - -/** - This function adds the job named 'job_name' to the forward model. The return - value is the newly created ext_job instance. This can be used to set private - arguments for this job. -*/ - -ext_job_type * forward_model_add_job(forward_model_type * forward_model , const char * job_name) { - ext_job_type * new_job = ext_joblist_get_job_copy(forward_model->ext_joblist , job_name); - vector_append_owned_ref( forward_model->jobs , new_job , ext_job_free__); - return new_job; -} - - - -/** - This function is used to set private argument values to jobs in the - forward model (i.e. the argument values passed in with KEY=VALUE - pairs in the defining (). - - The use of 'index' to get the job is unfortunate , however one - forward model can contain several instances of the same job, it is - therefor not possible to use name based lookup. -*/ - -void forward_model_iset_job_arg( forward_model_type * forward_model , int job_index , const char * arg , const char * value) { - ext_job_type * job = vector_iget( forward_model->jobs , job_index ); - ext_job_set_private_arg(job , arg , value); -} - - -void forward_model_clear( forward_model_type * forward_model ) { - vector_clear( forward_model->jobs ); -} - - - -void forward_model_free( forward_model_type * forward_model) { - vector_free( forward_model->jobs ); - free(forward_model); -} - - - - -/** - this function takes an input string of the type: - - job1 job2 job3(arg1 = value1, arg2 = value2, arg3= value3) - - and creates a forward model of it. observe the following rules: - - * if the function takes private arguments it is not allowed with space - between the end of the function name and the opening parenthesis. - -*/ - - -void forward_model_parse_init(forward_model_type * forward_model , const char * input_string ) { - //tokenizer_type * tokenizer_alloc(" " , "\'\"" , ",=()" , null , null , null); - //stringlist_type * tokens = tokenizer_buffer( tokenizer , input_string , true); - //stringlist_free( tokens ); - //tokenizer_free( tokenizer ); - - char * p1 = (char *) input_string; - while (true) { - ext_job_type * current_job; - char * job_name; - int job_index; - { - int job_length = strcspn(p1 , " ("); /* scanning until we meet ' ' or '(' */ - job_name = util_alloc_substring_copy(p1 , 0 , job_length); - p1 += job_length; - } - job_index = vector_get_size( forward_model->jobs ); - current_job = forward_model_add_job(forward_model , job_name); - - if (*p1 == '(') { /* the function has arguments. */ - int arg_length = strcspn(p1 , ")"); - if (arg_length == strlen(p1)) - util_abort("%s: paranthesis not terminated for job:%s \n",__func__ , job_name); - { - char * arg_string = util_alloc_substring_copy((p1 + 1) , 0 , arg_length - 1); - ext_job_set_private_args_from_string( current_job , arg_string ); - p1 += (1 + arg_length); - free( arg_string ); - } - } - /*****************************************************************/ - /* At this point we are done with the parsing - the rest of the - code in this while { } construct is only to check that the - input is well formed. */ - - { - int space_length = strspn(p1 , " "); - p1 += space_length; - if (*p1 == '(') - /* detected lonesome '(' */ - util_abort("%s: found space between job:%s and \'(\' - aborting \n",__func__ , job_name); - } - - /* - now p1 should point at the next character after the job, - or after the ')' if the job has arguments. - */ - - free(job_name); - if (*p1 == '\0') /* we have parsed the whole string. */ - break; - - } -} - - - -/*****************************************************************/ - -/* - the name of the pyton module - and the variable in the module, - used when running the remote jobs. -*/ - -void forward_model_python_fprintf(const forward_model_type * forward_model , - const char * path, - const subst_list_type * global_args, - mode_t umask) { - char * module_file = util_alloc_filename(path , DEFAULT_JOB_MODULE , NULL); - FILE * stream = util_fopen(module_file , "w"); - int i; - - fprintf(stream , "%s = [" , DEFAULT_JOBLIST_NAME); - for (i=0; i < vector_get_size(forward_model->jobs); i++) { - const ext_job_type * job = vector_iget_const(forward_model->jobs , i); - ext_job_python_fprintf(job , stream , global_args); - if (i < (vector_get_size( forward_model->jobs ) - 1)) - fprintf(stream,",\n"); - } - fprintf(stream , "]\n"); - fprintf(stream, "umask = %04o\n", umask); - fclose(stream); - free(module_file); -} - -#undef DEFAULT_JOB_MODULE -#undef DEFAULT_JOBLIST_NAME - - - - -forward_model_type * forward_model_alloc_copy(const forward_model_type * forward_model) { - int ijob; - forward_model_type * new; - - new = forward_model_alloc(forward_model->ext_joblist ); - for (ijob = 0; ijob < vector_get_size(forward_model->jobs); ijob++) { - const ext_job_type * job = vector_iget_const( forward_model->jobs , ijob); - vector_append_owned_ref( new->jobs , ext_job_alloc_copy( job ) , ext_job_free__); - } - - return new; -} - -ext_job_type * forward_model_iget_job( forward_model_type * forward_model , int index) { - return vector_iget( forward_model->jobs , index ); -} - - - -void forward_model_fprintf(const forward_model_type * forward_model , FILE * stream) { - int ijob; - fprintf(stream , " "); - for (ijob = 0; ijob < vector_get_size(forward_model->jobs); ijob++) { - ext_job_fprintf( vector_iget(forward_model->jobs , ijob) , stream); - fprintf(stream , " "); - } - fprintf(stream , "\n"); -} - - -const ext_joblist_type * forward_model_get_joblist(const forward_model_type * forward_model) { - return forward_model->ext_joblist; -} - -int forward_model_get_length( const forward_model_type * forward_model ) { - return vector_get_size( forward_model->jobs ); -} diff --git a/ThirdParty/Ert/libjob_queue/src/job_list.c b/ThirdParty/Ert/libjob_queue/src/job_list.c deleted file mode 100644 index 0c8b1b4fab..0000000000 --- a/ThirdParty/Ert/libjob_queue/src/job_list.c +++ /dev/null @@ -1,150 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA, Norway. - - The file 'job_list.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#define _GNU_SOURCE /* Must define this to get access to pthread_rwlock_t */ -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - - -#define JOB_LIST_TYPE_ID 8154222 - -struct job_list_struct { - UTIL_TYPE_ID_DECLARATION; - int active_size; - int alloc_size; - job_queue_node_type ** jobs; - pthread_rwlock_t lock; -}; - - -UTIL_IS_INSTANCE_FUNCTION( job_list , JOB_LIST_TYPE_ID ) -UTIL_SAFE_CAST_FUNCTION( job_list , JOB_LIST_TYPE_ID ) - -job_list_type * job_list_alloc() { - job_list_type * job_list = util_malloc( sizeof * job_list ); - UTIL_TYPE_ID_INIT( job_list , JOB_LIST_TYPE_ID ); - job_list->active_size = 0; - job_list->alloc_size = 0; - job_list->jobs = NULL; - pthread_rwlock_init( &job_list->lock , NULL); - return job_list; -} - - -void job_list_reset( job_list_type * job_list ) { - int queue_index; - for (queue_index = 0; queue_index < job_list->active_size; queue_index++) { - job_queue_node_type * node = job_list_iget_job( job_list , queue_index ); - job_queue_node_free( node ); - job_list->jobs[queue_index] = NULL; - } - job_list->active_size = 0; -} - - -int job_list_get_size( const job_list_type * job_list ) { - return job_list->active_size; -} - - -/* - This takes ownership to the job node instance. -*/ -void job_list_add_job( job_list_type * job_list , job_queue_node_type * job_node ) { - if (job_list->alloc_size == job_list->active_size) { - -#ifdef QUEUE_DEBUG - int new_alloc_size = job_list->alloc_size + 1; - job_queue_node_type ** new_jobs = util_malloc( sizeof * new_jobs * new_alloc_size ); - memcpy( new_jobs , job_list->jobs , sizeof * new_jobs * job_list->active_size ); - free( job_list->jobs ); - job_list->jobs = new_jobs; -#else - int new_alloc_size = util_int_max( 16 , job_list->alloc_size * 2); - job_list->jobs = util_realloc( job_list->jobs , sizeof * job_list->jobs * new_alloc_size ); -#endif - - job_list->alloc_size = new_alloc_size; - } - - { - int queue_index = job_list_get_size( job_list ); - job_queue_node_set_queue_index(job_node, queue_index ); - job_list->jobs[queue_index] = job_node; - } - job_list->active_size++; - -} - - -job_queue_node_type * job_list_iget_job( const job_list_type * job_list , int queue_index) { - if (queue_index >= 0 && queue_index < job_list->active_size) - return job_list->jobs[queue_index]; - else { - util_abort("%s: invalid queue_index:%d Valid range: [0,%d) \n",__func__ , queue_index , queue_index); - return NULL; - } -} - - -void job_list_free( job_list_type * job_list ) { - if (job_list->alloc_size > 0) { - job_list_reset( job_list ); - free( job_list->jobs ); - } - free( job_list ); -} - - - -void job_list_get_wrlock( job_list_type * list) { - pthread_rwlock_wrlock( &list->lock ); -} - -void job_list_get_rdlock( job_list_type * list) { - pthread_rwlock_rdlock( &list->lock ); -} - - -void job_list_unlock( job_list_type * list) { - pthread_rwlock_unlock( &list->lock ); -} - - -void job_list_reader_wait( job_list_type * list, int usleep_time1, int usleep_time2) { - if (pthread_rwlock_tryrdlock( &list->lock ) == 0) { - // Seems to be no writers waiting - take a short sleep and return. - pthread_rwlock_unlock( &list->lock ); - usleep( usleep_time1 ); - } else - // A writer already has the lock - let more writers get access; sleep longer. - usleep( usleep_time2 ); - -} diff --git a/ThirdParty/Ert/libjob_queue/src/job_node.c b/ThirdParty/Ert/libjob_queue/src/job_node.c deleted file mode 100644 index ab9312d2cf..0000000000 --- a/ThirdParty/Ert/libjob_queue/src/job_node.c +++ /dev/null @@ -1,626 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA, Norway. - - The file 'job_node.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#define _GNU_SOURCE /* Must define this to get access to pthread_rwlock_t */ -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#define JOB_QUEUE_NODE_TYPE_ID 3315299 -#define INVALID_QUEUE_INDEX -999 - -struct job_queue_node_struct { - UTIL_TYPE_ID_DECLARATION; - int num_cpu; /* How many cpu's will this job need - the driver is free to ignore if not relevant. */ - char *run_cmd; /* The path to the actual executable. */ - char *exit_file; /* The queue will look for the occurence of this file to detect a failure. */ - char *ok_file; /* The queue will look for this file to verify that the job was OK - can be NULL - in which case it is ignored. */ - char *status_file; /* The queue will look for this file to verify that the job is running or has run. */ - char *job_name; /* The name of the job. */ - char *run_path; /* Where the job is run - absolute path. */ - job_callback_ftype *done_callback; - job_callback_ftype *retry_callback; /* To determine if job can be retried */ - job_callback_ftype *exit_callback; /* Callback to perform any cleanup */ - void *callback_arg; - int argc; /* The number of commandline arguments to pass when starting the job. */ - char **argv; /* The commandline arguments. */ - int queue_index; - - /*-----------------------------------------------------------------*/ - char *failed_job; /* Name of the job (in the chain) which has failed. */ - char *error_reason; /* The error message from the failed job. */ - char *stderr_capture; - char *stderr_file; /* Name of the file containing stderr information. */ - /*-----------------------------------------------------------------*/ - - int submit_attempt; /* Which attempt is this ... */ - job_status_type job_status; /* The current status of the job. */ - bool confirmed_running;/* Set to true if file status_file has been detected written. */ - pthread_mutex_t data_mutex; /* Protecting the access to the job_data pointer. */ - void *job_data; /* Driver specific data about this job - fully handled by the driver. */ - time_t submit_time; /* When was the job added to job_queue - the FIRST TIME. */ - time_t sim_start; /* When did the job change status -> RUNNING - the LAST TIME. */ - time_t sim_end ; /* When did the job finish successfully */ - time_t max_confirm_wait;/* Max waiting between sim_start and confirmed_running is 2 minutes */ -}; - - - -void job_queue_node_free_error_info( job_queue_node_type * node ) { - util_safe_free(node->error_reason); - util_safe_free(node->stderr_capture); - util_safe_free(node->stderr_file); - util_safe_free(node->failed_job); -} - - - -/* - When the job script has detected failure it will create a "EXIT" - file in the runpath directory; this function will inspect the EXIT - file and determine which job has failed, the reason the job script - has given to fail the job (typically missing TARGET_FILE) and - capture the stderr from the job. - - The file is XML formatted: - - ------------------------------------------------ - - - Name of job - Reason why the job failed - - Capture of stderr from the job, can typically be - a multiline string. - - - ------------------------------------------------ - - This format is written by the dump_EXIT_file() function in the - job_dispatch.py script. -*/ - -/* - This extremely half-assed XML "parsing" should of course be kept a - secret... -*/ - -static char * __alloc_tag_content( const char * xml_buffer , const char * tag) { - char * open_tag = util_alloc_sprintf("<%s>" , tag); - char * close_tag = util_alloc_sprintf("" , tag); - - char * start_ptr = strstr( xml_buffer , open_tag ); - char * end_ptr = strstr( xml_buffer , close_tag ); - char * tag_content = NULL; - - if ((start_ptr != NULL) && (end_ptr != NULL)) { - int length; - start_ptr += strlen(open_tag); - - length = end_ptr - start_ptr; - tag_content = util_alloc_substring_copy( start_ptr , 0 , length ); - } - - free( open_tag ); - free( close_tag ); - return tag_content; -} - - - - -/** - This code is meant to capture which of the jobs has failed; why it - has failed and the stderr stream of the failing job. Depending on - the failure circumstances the EXIT file might not be around. -*/ - -void job_queue_node_fscanf_EXIT( job_queue_node_type * node ) { - job_queue_node_free_error_info( node ); - if (node->exit_file) { - if (util_file_exists( node->exit_file )) { - char * xml_buffer = util_fread_alloc_file_content( node->exit_file, NULL); - - node->failed_job = __alloc_tag_content( xml_buffer , "job" ); - node->error_reason = __alloc_tag_content( xml_buffer , "reason" ); - node->stderr_capture = __alloc_tag_content( xml_buffer , "stderr"); - node->stderr_file = __alloc_tag_content( xml_buffer , "stderr_file"); - - free( xml_buffer ); - } else - node->failed_job = util_alloc_sprintf("EXIT file:%s not found - load failure?" , node->exit_file); - } -} - - - - - - -UTIL_IS_INSTANCE_FUNCTION( job_queue_node , JOB_QUEUE_NODE_TYPE_ID ) -UTIL_SAFE_CAST_FUNCTION( job_queue_node , JOB_QUEUE_NODE_TYPE_ID ) - - - -int job_queue_node_get_queue_index( const job_queue_node_type * node ) { - if (node->queue_index == INVALID_QUEUE_INDEX) - util_abort("%s: internal error: asked for not-yet-initialized node->queue_index\n",__func__); - return node->queue_index; -} - -void job_queue_node_set_queue_index( job_queue_node_type * node , int queue_index) { - if (node->queue_index == INVALID_QUEUE_INDEX) - node->queue_index = queue_index; - else - util_abort("%s: internal error: atteeempt to reset queue_index \n",__func__); -} - - -/* - The error information is retained even after the job has completed - completely, so that calling scope can ask for it - that is the - reason there are separate free() and clear functions for the error related fields. -*/ - -void job_queue_node_free_data(job_queue_node_type * node) { - util_safe_free( node->job_name ); - util_safe_free( node->exit_file ); - util_safe_free( node->ok_file ); - util_safe_free( node->run_cmd ); - util_free_stringlist( node->argv , node->argc ); - - if (node->job_data != NULL) - util_abort("%s: internal error - driver spesific job data has not been freed - will leak.\n",__func__); -} - - -void job_queue_node_free(job_queue_node_type * node) { - job_queue_node_free_data(node); - job_queue_node_free_error_info(node); - util_safe_free(node->run_path); - - // Since the type of the callback_arg is void* it should maybe be - // registered with a private destructor - or the type should be - // changed to arg_pack? - if (arg_pack_is_instance( node->callback_arg )) - arg_pack_free( node->callback_arg ); - - free(node); -} - - -job_status_type job_queue_node_get_status(const job_queue_node_type * node) { - return node->job_status; -} - - - - - - -/******************************************************************/ -/* - These four functions all require that the caller has aquired the - data lock before entering. -*/ - - - - - -void job_queue_node_reset_submit_attempt( job_queue_node_type * node) { - node->submit_attempt = 0; -} - -int job_queue_node_get_submit_attempt( const job_queue_node_type * node) { - return node->submit_attempt; -} - - - - - - - - - -job_queue_node_type * job_queue_node_alloc_simple( const char * job_name , - const char * run_path , - const char * run_cmd , - int argc , - const char ** argv) { - return job_queue_node_alloc( job_name , run_path , run_cmd , argc , argv , 1, NULL , NULL, NULL, NULL, NULL, NULL, NULL); -} - - -job_queue_node_type * job_queue_node_alloc( const char * job_name , - const char * run_path , - const char * run_cmd , - int argc , - const char ** argv, - int num_cpu, - const char * ok_file, - const char * status_file, - const char * exit_file, - job_callback_ftype * done_callback, - job_callback_ftype * retry_callback, - job_callback_ftype * exit_callback, - void * callback_arg) { - - if (util_is_directory( run_path )) { - job_queue_node_type * node = util_malloc(sizeof * node ); - - UTIL_TYPE_ID_INIT( node , JOB_QUEUE_NODE_TYPE_ID ); - { - /* The data initialized in this block should *NEVER* change. */ - node->job_name = util_alloc_string_copy( job_name ); - - if (util_is_abs_path(run_path)) - node->run_path = util_alloc_string_copy( run_path ); - else - node->run_path = util_alloc_realpath( run_path ); - - node->run_cmd = util_alloc_string_copy( run_cmd ); - node->argc = argc; - node->argv = util_alloc_stringlist_copy( argv , argc ); - node->num_cpu = num_cpu; - - if (ok_file) - node->ok_file = util_alloc_filename(node->run_path , ok_file , NULL); - else - node->ok_file = NULL; - - if (status_file) - node->status_file = util_alloc_filename(node->run_path , status_file , NULL); - else - node->status_file = NULL; - node->confirmed_running = false; - - if (exit_file) - node->exit_file = util_alloc_filename(node->run_path , exit_file , NULL); - else - node->exit_file = NULL; - - node->exit_callback = exit_callback; - node->retry_callback = retry_callback; - node->done_callback = done_callback; - node->callback_arg = callback_arg; - } - { - node->error_reason = NULL; - node->stderr_capture = NULL; - node->stderr_file = NULL; - node->failed_job = NULL; - } - { - node->job_status = JOB_QUEUE_NOT_ACTIVE; - node->queue_index = INVALID_QUEUE_INDEX; - node->submit_attempt = 0; - node->job_data = NULL; /* The allocation is run in single thread mode - we assume. */ - node->sim_start = 0; - node->sim_end = 0; - node->submit_time = time( NULL ); - node->max_confirm_wait= 60*2; /* 2 minutes before we consider job dead. */ - } - - pthread_mutex_init( &node->data_mutex , NULL ); - return node; - } else - return NULL; -} - - -const char * job_queue_node_get_error_reason( const job_queue_node_type * node) { - return node->error_reason; -} - -const char * job_queue_node_get_stderr_capture( const job_queue_node_type * node) { - return node->stderr_capture; -} - - -const char * job_queue_node_get_stderr_file( const job_queue_node_type * node) { - return node->stderr_file; -} - - -const char * job_queue_node_get_exit_file( const job_queue_node_type * node) { - return node->exit_file; -} - - -const char * job_queue_node_get_ok_file( const job_queue_node_type * node) { - return node->ok_file; -} - -const char * job_queue_node_get_status_file( const job_queue_node_type * node) { - return node->status_file; -} - -const char * job_queue_node_get_run_path( const job_queue_node_type * node) { - return node->run_path; -} - -const char * job_queue_node_get_name( const job_queue_node_type * node) { - return node->job_name; -} - -const char * job_queue_node_get_failed_job( const job_queue_node_type * node) { - return node->failed_job; -} - - -time_t job_queue_node_get_sim_start( const job_queue_node_type * node ) { - return node->sim_start; -} - - -time_t job_queue_node_get_sim_end( const job_queue_node_type * node ) { - return node->sim_end; -} - -time_t job_queue_node_get_submit_time( const job_queue_node_type * node ) { - return node->submit_time; -} - -double job_queue_node_time_since_sim_start (const job_queue_node_type * node ) { - return util_difftime_seconds( node->sim_start , time(NULL)); -} - -bool job_queue_node_run_DONE_callback( job_queue_node_type * node ) { - bool OK = true; - if (node->done_callback) - OK = node->done_callback( node->callback_arg ); - - return OK; -} - - -bool job_queue_node_run_RETRY_callback( job_queue_node_type * node ) { - bool retry = false; - if (node->retry_callback) - retry = node->retry_callback( node->callback_arg ); - - return retry; -} - - -void job_queue_node_run_EXIT_callback( job_queue_node_type * node ) { - if (node->exit_callback) - node->exit_callback( node->callback_arg ); -} - -static void job_queue_node_set_status(job_queue_node_type * node , job_status_type new_status) { - if (new_status != node->job_status) { - node->job_status = new_status; - - /* - We record sim start when the node is in state JOB_QUEUE_WAITING - to be sure that we do not miss the start time completely for - very fast jobs which are registered in the state - JOB_QUEUE_RUNNING. - */ - if (new_status == JOB_QUEUE_WAITING) - node->sim_start = time( NULL ); - - if (new_status == JOB_QUEUE_RUNNING) - node->sim_start = time( NULL ); - - if (new_status == JOB_QUEUE_SUCCESS) - node->sim_end = time( NULL ); - - if (new_status == JOB_QUEUE_FAILED) - job_queue_node_fscanf_EXIT( node ); - - } -} - - -submit_status_type job_queue_node_submit( job_queue_node_type * node , job_queue_status_type * status , queue_driver_type * driver) { - submit_status_type submit_status; - pthread_mutex_lock( &node->data_mutex ); - { - void * job_data = queue_driver_submit_job( driver, - node->run_cmd, - node->num_cpu, - node->run_path, - node->job_name, - node->argc, - (const char **) node->argv); - if (job_data != NULL) { - job_status_type old_status = node->job_status; - job_status_type new_status = JOB_QUEUE_SUBMITTED; - - node->job_data = job_data; - node->submit_attempt++; - /* - The status JOB_QUEUE_SUBMITTED is internal, and not - exported anywhere. The job_queue_update_status() will - update this to PENDING or RUNNING at the next call. The - important difference between SUBMITTED and WAITING is - that SUBMITTED have job_data != NULL and the - job_queue_node free function must be called on it. - */ - submit_status = SUBMIT_OK; - job_queue_node_set_status( node , new_status); - job_queue_status_transition(status, old_status, new_status); - } else - /* - In this case the status of the job itself will be - unmodified; i.e. it will still be WAITING, and a new attempt - to submit it will be performed in the next round. - */ - submit_status = SUBMIT_DRIVER_FAIL; - } - pthread_mutex_unlock( &node->data_mutex ); - return submit_status; -} - -static bool job_queue_node_status_update_confirmed_running__(job_queue_node_type * node) { - if (node->confirmed_running) - return true; - - if (!node->status_file) { - node->confirmed_running = true; - return true; - } - - if (util_file_exists(node->status_file)) - node->confirmed_running = true; - return node->confirmed_running; -} - -// if status = running, and current_time > sim_start + max_confirm_wait -// (usually 2 min), check if job is confirmed running (status_file exists). -// If not confirmed, set job to JOB_QUEUE_FAILED. -bool job_queue_node_update_status( job_queue_node_type * node , job_queue_status_type * status , queue_driver_type * driver ) { - bool status_change = false; - pthread_mutex_lock(&node->data_mutex); - { - if (node->job_data) { - job_status_type current_status = job_queue_node_get_status(node); - - bool confirmed = job_queue_node_status_update_confirmed_running__(node); - - if ((current_status & JOB_QUEUE_RUNNING) && !confirmed) { - // it's running, but not confirmed running. - double runtime = job_queue_node_time_since_sim_start(node); - if (runtime >= node->max_confirm_wait) { - // max_confirm_wait has passed since sim_start without success; the job is dead - job_status_type new_status = JOB_QUEUE_DO_KILL_NODE_FAILURE; - status_change = job_queue_status_transition(status, current_status, new_status); - job_queue_node_set_status(node, new_status); - } - } - current_status = job_queue_node_get_status(node); - if (current_status & JOB_QUEUE_CAN_UPDATE_STATUS) { - job_status_type new_status = queue_driver_get_status( driver , node->job_data); - status_change = job_queue_status_transition(status , current_status , new_status); - job_queue_node_set_status(node,new_status); - } - } - } - pthread_mutex_unlock( &node->data_mutex ); - return status_change; -} - -bool job_queue_node_status_transition( job_queue_node_type * node , job_queue_status_type * status , job_status_type new_status) { - bool status_change; - pthread_mutex_lock( &node->data_mutex ); - { - job_status_type old_status = job_queue_node_get_status( node ); - status_change = job_queue_status_transition(status , old_status, new_status); - - if (status_change) - job_queue_node_set_status( node , new_status ); - } - pthread_mutex_unlock( &node->data_mutex ); - return status_change; -} - -void job_queue_node_set_max_confirmation_wait_time(job_queue_node_type * node, time_t time) { - node->max_confirm_wait = time; -} - - -bool job_queue_node_status_confirmed_running(job_queue_node_type * node) { - return node->confirmed_running; -} - - -bool job_queue_node_kill( job_queue_node_type * node , job_queue_status_type * status , queue_driver_type * driver) { - bool result = false; - pthread_mutex_lock( &node->data_mutex ); - { - job_status_type current_status = job_queue_node_get_status( node ); - if (current_status & JOB_QUEUE_CAN_KILL) { - /* - If the job is killed before it is even started no driver - specific job data has been assigned; we therefor must check - the node->job_data pointer before entering. - */ - if (node->job_data) { - queue_driver_kill_job( driver , node->job_data ); - queue_driver_free_job( driver , node->job_data ); - node->job_data = NULL; - } - job_queue_status_transition(status, current_status, JOB_QUEUE_IS_KILLED); - job_queue_node_set_status( node , JOB_QUEUE_IS_KILLED); - result = true; - } - } - pthread_mutex_unlock( &node->data_mutex ); - return result; -} - - -/* - This frees the storage allocated by the driver - the storage - allocated by the queue layer is retained. - - In the case of jobs which are first marked as successfull by the - queue layer, and then subsequently set to status EXIT by the - DONE_callback this function will be called twice; i.e. we must - protect against a double free. -*/ - -void job_queue_node_free_driver_data( job_queue_node_type * node , queue_driver_type * driver) { - pthread_mutex_lock( &node->data_mutex ); - { - if (node->job_data != NULL) - queue_driver_free_job( driver , node->job_data ); - node->job_data = NULL; - } - pthread_mutex_unlock( &node->data_mutex ); -} - - -/* - This returns a pointer to a very internal datastructure; used by the - Job class in Python which interacts directly with the driver - implementation. This is too low level, and the whole Driver / Job - implementation in Python should be changed to only expose the higher - level queue class. -*/ - -void * job_queue_node_get_driver_data( job_queue_node_type * node ) { - return node->job_data; -} - - -void job_queue_node_restart( job_queue_node_type * node , job_queue_status_type * status) { - pthread_mutex_lock( &node->data_mutex ); - { - job_status_type current_status = job_queue_node_get_status( node ); - job_queue_status_transition(status, current_status, JOB_QUEUE_WAITING); - job_queue_node_set_status( node , JOB_QUEUE_WAITING); - job_queue_node_reset_submit_attempt(node); - } - pthread_mutex_unlock( &node->data_mutex ); -} diff --git a/ThirdParty/Ert/libjob_queue/src/job_queue.c b/ThirdParty/Ert/libjob_queue/src/job_queue.c deleted file mode 100644 index f24aa0cf2f..0000000000 --- a/ThirdParty/Ert/libjob_queue/src/job_queue.c +++ /dev/null @@ -1,1357 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'job_queue.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#define _GNU_SOURCE /* Must define this to get access to pthread_rwlock_t */ -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - - -/** - - The running of external jobs is handled thruogh an abstract - job_queue implemented in this file; the job_queue then contains a - 'driver' which actually runs the job. All drivers must support the - following functions - - submit: This will submit a job, and return a pointer to a - newly allocated queue_job instance. - - clean: This will clear up all resources used by the job. - - abort: This will stop the job, and then call clean. - - status: This will get the status of the job. - - - When calling the various driver functions the queue layer needs to - dereference the driver structures, i.e. to get access to the - driver->submit_jobs function. This is currently (rather clumsily?? - implemented like this): - - When implementing a driver the driver struct MUST start like - this: - - struct some_driver { - UTIL_TYPE_ID_DECLARATION - QUEUE_DRIVER_FUNCTIONS - .... - .... - } - - The function allocating a driver instance will just return a - (void *) however in the queue layer the driver is stored as a - queue_driver_type instance which is a struct like this: - - struct queue_driver_struct { - UTIL_TYPE_ID_DECLARATION - QUEUE_DRIVER_FIELDS - } - - I.e. it only contains the pointers common to all the driver - implementations. When calling a driver function the spesific - driver will cast to it's datatype. - - Observe that this library also contains the files ext_joblist and - ext_job, those files implement a particular way of dispatching - external jobs in a series; AFTER THEY HAVE BEEN SUBMITTED. So seen - from the this scope those files do not provide any particluar - functionality; there is no compile-time dependencies either. -*/ - - - -/* - Some words about status - ======================= - - The status of a particular job is given by the job_status field of - the job_queue_node_type, the possible values are given by the enum - job_status_type, defined in queue_driver.h. - - To actually __GET__ the status of a job we use the driver->status() - function which will invoke a driver specific function and return the - new status. - - 1. The driver->status() function is invoked by the - job_queue_update_status() function. This should be invoked by - the same thread as is running the main queue management in - job_queue_run_jobs(). - - - 2. The actual change of status is handled by the function - job_queue_change_node_status(); arbitrary assignments of the - type job->status = new_status is STRICTLY ILLEGAL. - - - 3. When external functions query about the status of a particular - job they get the status value currently stored (i.e. cached) in - the job_node; external scope can NOT initiate a - driver->status() function call. - - This might result in external scope getting a outdated status - - live with it. - - - 4. The name 'status' indicates that this is read-only property; - that is actually not the case. In the main manager function - job_queue_run_jobs() action is taken based on the value of the - status field, and to initiate certain action on jobs the queue - system (and also external scope) can explicitly set the status - of a job (by using the job_queue_change_node_status() function). - - The most promiment example of this is when we want to run a - certain job again, that is achieved with: - - job_queue_node_change_status( queue , node , JOB_QUEUE_WAITING ); - - When the queue manager subsequently finds the job with status - 'JOB_QUEUE_WAITING' it will (re)submit this job. -*/ - - - -/* - Communicating success/failure between the job_script and the job_queue: - ======================================================================= - - The system for communicatin success/failure between the queue system - (i.e. this file) and the job script is quite elaborate. There are - essentially three problems which make this complicated: - - 1. The exit status of the jobs is NOT reliably captured - the job - might very well fail without us detecing it with the exit - status. - - 2. Syncronizing of disks can be quite slow, so altough a job has - completede successfully the files we expect to find might not - present. - - 3. There is layer upon layer here - this file scope (i.e. the - internal queue_system) spawns external jobs in the form of a job - script. This script again spawns a series of real external jobs - like e.g. ECLIPSE and RMS. The job_script does not reliably - capture the exit status of the external programs. - - - The approach to this is as follows: - - 1. If the job (i.e. the job script) finishes with a failure status - we communicate the failure back to the calling scope with no - more ado. - - 2. When a job has finished (seemingly OK) we try hard to determine - whether the job has failed or not. This is based on the - following tests: - - a) If the job has produced an EXIT file it has failed. - - b) If the job has produced an OK file it has succeeded. - - c) If neither EXIT nor OK files have been produced we spin for a - while waiting for one of the files, if none turn up we will - eventually mark the job as failed. - -*/ - - - - - -/** - This struct holds the job_queue information about one job. Observe - the following: - - 1. This struct is purely static - i.e. it is invisible outside of - this file-scope. - - 2. Typically the driver would like to store some additional - information, i.e. the PID of the running process for the local - driver; that is stored in a (driver specific) struct under the - field job_data. - - 3. If the driver detects that a job has failed it leaves an EXIT - file, the exit status is (currently) not reliably transferred - back to to the job_queue layer. - -*/ - -/*****************************************************************/ - -#define JOB_QUEUE_TYPE_ID 665210 - -struct job_queue_struct { - UTIL_TYPE_ID_DECLARATION; - job_list_type * job_list; - job_queue_status_type * status; - char * exit_file; /* The queue will look for the occurence of this file to detect a failure. */ - char * ok_file; /* The queue will look for this file to verify that the job was OK - can be NULL - in which case it is ignored. */ - char * status_file; /* The queue will look for this file to verify that the job is running or has run. If not, ok_file is ignored. */ - queue_driver_type * driver; /* A pointer to a driver instance (LSF|LOCAL|RSH) which actually 'does it'. */ - - bool open; /* True if the queue has been reset and is ready for use, false if the queue has been used and not reset */ - bool user_exit; /* If there comes an external signal to abondond the whole thing user_exit will be set to true, and things start to dwindle down. */ - bool running; - bool pause_on; - bool submit_complete; - - int max_submit; /* The maximum number of submit attempts for one job. */ - int max_ok_wait_time; /* Seconds to wait for an OK file - when the job itself has said all OK. */ - int max_duration; /* Maximum allowed time for a job to run, 0 = unlimited */ - time_t stop_time; /* A job is only allowed to run until this time. 0 = no time set, ignore stop_time */ - unsigned long usleep_time; /* The sleep time before checking for updates. */ - pthread_mutex_t run_mutex; /* This mutex is used to ensure that ONLY one thread is executing the job_queue_run_jobs(). */ - thread_pool_type * work_pool; -}; - - - - - - -/* - Must hold on to: - - 1. A write lock for the job node. - 3. A read lock for the job_list - -*/ -static bool job_queue_change_node_status(job_queue_type * queue , job_queue_node_type * node , job_status_type new_status) { - return job_queue_node_status_transition( node , queue->status , new_status ); -} - - - - -/*****************************************************************/ - - - - - - - -/** - Observe that this function should only query the driver for state - change when the job is currently in one of the states: - - JOB_QUEUE_WAITING || JOB_QUEUE_PENDING || JOB_QUEUE_RUNNING - - The other state transitions are handled by the job_queue itself, - without consulting the driver functions. -*/ - -/* - Will return true if there is any status change. Must already hold - on to joblist readlock -*/ - -static bool job_queue_update_status(job_queue_type * queue ) { - bool update = false; - int ijob; - - for (ijob = 0; ijob < job_list_get_size( queue->job_list ); ijob++) { - job_queue_node_type * node = job_list_iget_job( queue->job_list , ijob ); - bool node_update = job_queue_node_update_status( node , queue->status , queue->driver ); - if (node_update) - update = true; - } - return update; -} - -/* - Must hold on to joblist readlock -*/ - -static submit_status_type job_queue_submit_job(job_queue_type * queue , int queue_index) { - submit_status_type submit_status; - if (queue->user_exit || queue->pause_on) - submit_status = SUBMIT_QUEUE_CLOSED; /* The queue is currently not accepting more jobs. */ - else { - { - job_queue_node_type * node = job_list_iget_job( queue->job_list , queue_index ); - submit_status = job_queue_node_submit( node , queue->status , queue->driver ); - } - } - return submit_status; -} - - - - - - - - - -/** - Will return the number of jobs with status @status. - - #include - - printf("Running jobs...: %03d \n", job_queue_iget_status_summary( queue , JOB_QUEUE_RUNNING )); - printf("Waiting jobs:..: %03d \n", job_queue_iget_status_summary( queue , JOB_QUEUE_WAITING )); - - Observe that if this function is called repeatedly the status might change between - calls, with the consequence that the total number of jobs does not add up - properly. The handles itself autonomously so as long as the return value from this - function is only used for information purposes this does not matter. Alternatively - the function job_queue_export_status_summary(), which does proper locking, can be - used. -*/ - -int job_queue_iget_status_summary( const job_queue_type * queue , job_status_type status) { - return job_queue_status_get_count(queue->status, status); -} - -int job_queue_get_num_callback( const job_queue_type * queue) { - return job_queue_iget_status_summary( queue , JOB_QUEUE_RUNNING_CALLBACK ); -} - -int job_queue_get_num_running( const job_queue_type * queue) { - return job_queue_iget_status_summary( queue , JOB_QUEUE_RUNNING ); -} - -int job_queue_get_num_pending( const job_queue_type * queue) { - return job_queue_iget_status_summary( queue , JOB_QUEUE_PENDING ); -} - -int job_queue_get_num_waiting( const job_queue_type * queue) { - return job_queue_iget_status_summary( queue , JOB_QUEUE_WAITING ); -} - -int job_queue_get_num_complete( const job_queue_type * queue) { - return job_queue_iget_status_summary( queue , JOB_QUEUE_SUCCESS ); -} - -int job_queue_get_num_failed( const job_queue_type * queue) { - return job_queue_iget_status_summary( queue , JOB_QUEUE_FAILED ); -} - -int job_queue_get_num_killed( const job_queue_type * queue) { - return job_queue_iget_status_summary( queue , JOB_QUEUE_IS_KILLED ); -} - -int job_queue_get_active_size( const job_queue_type * queue ) { - return job_list_get_size( queue->job_list ); -} - -void job_queue_set_max_job_duration(job_queue_type * queue, int max_duration_seconds) { - queue->max_duration = max_duration_seconds; -} - -int job_queue_get_max_job_duration(const job_queue_type * queue) { - return queue->max_duration; -} - -void job_queue_set_job_stop_time(job_queue_type * queue, time_t time) { - queue->stop_time = time; -} - -time_t job_queue_get_job_stop_time(const job_queue_type * queue) { - return queue->stop_time; -} - -void job_queue_set_auto_job_stop_time(job_queue_type * queue) { - time_t sum_run_time_succeded_jobs = 0; - int num_succeded_jobs = 0; - - for (int i = 0; i < job_list_get_size( queue->job_list ); i++) { - if (job_queue_iget_job_status(queue,i) == JOB_QUEUE_SUCCESS) { - sum_run_time_succeded_jobs += difftime(job_queue_iget_sim_end(queue, i), job_queue_iget_sim_start(queue, i)); - num_succeded_jobs++; - } - } - - if (num_succeded_jobs > 0) { - time_t avg_run_time_succeded_jobs = sum_run_time_succeded_jobs / num_succeded_jobs; - time_t stop_time = time(NULL) + (avg_run_time_succeded_jobs * 0.25); - job_queue_set_job_stop_time(queue, stop_time); - } -} - -/** - Observe that jobs with status JOB_QUEUE_WAITING can also be killed; for those - jobs the kill should be interpreted as "Forget about this job for now and set - the status JOB_QUEUE_IS_KILLED", however it is important that we not call - the driver->kill() function on it because the job slot will have no data - (i.e. LSF jobnr), and the driver->kill() function will fail if presented with - such a job. - - Only jobs which have a status matching "JOB_QUEUE_CAN_KILL" can be - killed; if the job is not in a killable state the function will do - nothing. This includes trying to kill a job which is not even - found. - - Observe that jobs (slots) with status JOB_QUEUE_NOT_ACTIVE can NOT be - meaningfully killed; that is because these jobs have not yet been submitted - to the queue system, and there is not yet established a mapping between - external id and queue_index. - - Must hold on to joblist:read lock. -*/ - -static bool job_queue_kill_job_node( job_queue_type * queue , job_queue_node_type * node) { - bool result = job_queue_node_kill( node , queue->status , queue->driver ); - return result; -} - -#define ASSIGN_LOCKED_ATTRIBUTE( var , func , ...) \ -job_list_get_rdlock( queue->job_list ); \ -{ \ - job_queue_node_type * node = job_list_iget_job( queue->job_list , job_index ); \ - var = func(__VA_ARGS__); \ -} \ -job_list_unlock( queue->job_list ); - - - -bool job_queue_kill_job( job_queue_type * queue , int job_index) { - bool result; - ASSIGN_LOCKED_ATTRIBUTE( result , job_queue_kill_job_node , queue , node); - return result; -} - - -time_t job_queue_iget_sim_start( job_queue_type * queue, int job_index) { - time_t sim_start; - ASSIGN_LOCKED_ATTRIBUTE( sim_start , job_queue_node_get_sim_start , node ); - return sim_start; -} - - -time_t job_queue_iget_sim_end( job_queue_type * queue, int job_index) { - time_t sim_end; - ASSIGN_LOCKED_ATTRIBUTE( sim_end , job_queue_node_get_sim_end , node ); - return sim_end; -} - - -time_t job_queue_iget_submit_time( job_queue_type * queue, int job_index) { - time_t submit_time; - ASSIGN_LOCKED_ATTRIBUTE( submit_time , job_queue_node_get_submit_time , node ); - return submit_time; -} - -const char * job_queue_iget_run_path( job_queue_type * queue , int job_index) { - const char * run_path; - ASSIGN_LOCKED_ATTRIBUTE(run_path, job_queue_node_get_run_path, node ); - return run_path; -} - - -const char * job_queue_iget_failed_job( job_queue_type * queue , int job_index) { - const char * failed_job; - ASSIGN_LOCKED_ATTRIBUTE(failed_job, job_queue_node_get_failed_job, node ); - return failed_job; -} - - -const char * job_queue_iget_error_reason( job_queue_type * queue , int job_index) { - const char * error_reason; - ASSIGN_LOCKED_ATTRIBUTE(error_reason, job_queue_node_get_error_reason, node ); - return error_reason; -} - - -const char * job_queue_iget_stderr_capture( job_queue_type * queue , int job_index) { - const char * stderr_capture; - ASSIGN_LOCKED_ATTRIBUTE(stderr_capture, job_queue_node_get_stderr_capture, node ); - return stderr_capture; -} - - -const char * job_queue_iget_stderr_file( job_queue_type * queue , int job_index) { - const char * stderr_file; - ASSIGN_LOCKED_ATTRIBUTE(stderr_file, job_queue_node_get_stderr_file, node ); - return stderr_file; -} - - - -job_status_type job_queue_iget_job_status( job_queue_type * queue , int job_index) { - job_status_type job_status; - ASSIGN_LOCKED_ATTRIBUTE(job_status, job_queue_node_get_status , node ); - return job_status; -} - - -void job_queue_iset_max_confirm_wait_time(job_queue_type * queue, int job_index, time_t time) { - job_list_get_rdlock( queue->job_list ); - { - job_queue_node_type * node = job_list_iget_job( queue->job_list , job_index ); - job_queue_node_set_max_confirmation_wait_time( node, time ); - } - job_list_unlock( queue->job_list ); -} - - - - -/** - The external scope asks the queue to restart the the job; we reset - the submit counter to zero. This function should typically be used - in combination with resampling, however that is the responsability - of the calling scope. -*/ - -void job_queue_iset_external_restart(job_queue_type * queue , int job_index) { - job_list_get_rdlock( queue->job_list ); - { - job_queue_node_type * node = job_list_iget_job( queue->job_list , job_index ); - job_queue_node_restart(node,queue->status); - } - job_list_unlock( queue->job_list ); -} - - -/** - The queue system has said that the job completed OK, however the - external scope failed to load all the results and are using this - function to inform the queue system that the job has indeed - failed. The queue system will then either retry the job, or switch - status to JOB_QUEUE_RUN_FAIL. - - - This is a bit dangerous beacuse the queue system has said that the - job was all hunkadory, and freed the driver related resources - attached to the job; it is therefor essential that the - JOB_QUEUE_EXIT code explicitly checks the status of the job node's - driver specific data before dereferencing. -*/ - -void job_queue_iset_external_fail(job_queue_type * queue , int job_index) { - job_list_get_rdlock( queue->job_list ); - { - job_queue_node_type * node = job_list_iget_job( queue->job_list , job_index ); - job_queue_node_status_transition(node,queue->status,JOB_QUEUE_EXIT); - } - job_list_unlock( queue->job_list ); -} - - -/* - This returns a pointer to a very internal datastructure; used by the - Job class in Python which interacts directly with the driver - implementation. This is too low level, and the whole Driver / Job - implementation in Python should be changed to only expose the higher - level queue class. -*/ - -void * job_queue_iget_driver_data( job_queue_type * queue , int job_index) { - void * driver_data; - ASSIGN_LOCKED_ATTRIBUTE(driver_data, job_queue_node_get_driver_data , node ); - return driver_data; -} - - - - -static void job_queue_update_spinner( int * phase ) { - const char * spinner = "-\\|/"; - int spinner_length = strlen( spinner ); - - printf("%c\b" , spinner[ (*phase % spinner_length) ]); - fflush(stdout); - (*phase) += 1; -} - - -static void job_queue_print_summary(job_queue_type *queue, bool status_change ) { - const char * status_fmt = "Waiting: %3d Pending: %3d Running: %3d Checking/Loading: %3d Failed: %3d Complete: %3d [ ]\b\b"; - int string_length = 105; - - if (status_change) { - for (int i=0; i < string_length; i++) - printf("\b"); - - { - int waiting = job_queue_status_get_count( queue->status , JOB_QUEUE_WAITING ); - int pending = job_queue_status_get_count( queue->status , JOB_QUEUE_PENDING ); - - /* - EXIT and DONE are included in "xxx_running", because the target - file has not yet been checked. - */ - int running = job_queue_status_get_count( queue->status , JOB_QUEUE_RUNNING ) + - job_queue_status_get_count( queue->status , JOB_QUEUE_DONE ) + - job_queue_status_get_count( queue->status , JOB_QUEUE_EXIT ); - int complete = job_queue_status_get_count( queue->status , JOB_QUEUE_SUCCESS ); - int failed = job_queue_status_get_count( queue->status , JOB_QUEUE_FAILED ) + - job_queue_status_get_count( queue->status , JOB_QUEUE_IS_KILLED ); - int loading = job_queue_status_get_count( queue->status , JOB_QUEUE_RUNNING_CALLBACK ); - - printf(status_fmt , waiting , pending , running , loading , failed , complete); - } - } -} - - - - - -/** - This function goes through all the nodes and call finalize on - them. What about jobs which were NOT in a CAN_KILL state when the - killing was done, i.e. jobs which are in one of the intermediate - load like states?? They -*/ - -void job_queue_reset(job_queue_type * queue) { - job_list_get_wrlock( queue->job_list ); - job_list_reset( queue->job_list ); - job_list_unlock( queue->job_list ); - job_queue_status_clear(queue->status); - - /* - Be ready for the next run - */ - queue->submit_complete = false; - queue->pause_on = false; - queue->user_exit = false; - queue->open = true; - queue->stop_time = 0; -} - - -bool job_queue_is_running( const job_queue_type * queue ) { - return queue->running; -} - - -static void job_queue_user_exit__( job_queue_type * queue ) { - int queue_index; - for (queue_index = 0; queue_index < job_list_get_size( queue->job_list ); queue_index++) { - job_queue_node_type * node = job_list_iget_job( queue->job_list , queue_index ); - - if (JOB_QUEUE_CAN_KILL & job_queue_node_get_status(node)) - job_queue_node_status_transition(node,queue->status,JOB_QUEUE_DO_KILL); - } -} - - -static bool job_queue_check_node_status_files( const job_queue_type * job_queue , job_queue_node_type * node) { - const char * exit_file = job_queue_node_get_exit_file( node ); - if ((exit_file != NULL) && util_file_exists(exit_file)) - return false; /* It has failed. */ - else { - const char * ok_file = job_queue_node_get_ok_file( node ); - if (ok_file == NULL) - return true; /* If the ok-file has not been set we just return true immediately. */ - else { - int ok_sleep_time = 1; /* Time to wait between checks for OK|EXIT file. */ - int total_wait_time = 0; - - while (true) { - if (util_file_exists( ok_file )) { - return true; - break; - } else { - if (total_wait_time < job_queue->max_ok_wait_time) { - sleep( ok_sleep_time ); - total_wait_time += ok_sleep_time; - } else { - /* We have waited long enough - this does not seem to give any OK file. */ - return false; - break; - } - } - } - } - } -} - - -static void * job_queue_run_DONE_callback( void * arg ) { - arg_pack_type * arg_pack = arg_pack_safe_cast( arg ); - job_queue_type * job_queue = arg_pack_iget_ptr( arg_pack , 0 ); - int queue_index = arg_pack_iget_int( arg_pack , 1 ); - job_list_get_rdlock( job_queue->job_list ); - { - job_queue_node_type * node = job_list_iget_job( job_queue->job_list , queue_index ); - bool OK = job_queue_check_node_status_files( job_queue , node ); - - if (OK) - OK = job_queue_node_run_DONE_callback( node ); - - if (OK) - job_queue_change_node_status( job_queue , node , JOB_QUEUE_SUCCESS ); - else - job_queue_change_node_status( job_queue , node , JOB_QUEUE_EXIT ); - - job_queue_node_free_driver_data( node , job_queue->driver ); - } - job_list_unlock(job_queue->job_list ); - arg_pack_free( arg_pack ); - return NULL; -} - -static void job_queue_handle_DONE( job_queue_type * queue , job_queue_node_type * node) { - job_queue_change_node_status(queue , node , JOB_QUEUE_RUNNING_CALLBACK ); - { - arg_pack_type * arg_pack = arg_pack_alloc(); - arg_pack_append_ptr( arg_pack , queue ); - arg_pack_append_int( arg_pack , job_queue_node_get_queue_index(node)); - thread_pool_add_job( queue->work_pool , job_queue_run_DONE_callback , arg_pack ); - } -} - - -static void * job_queue_run_EXIT_callback( void * arg ) { - arg_pack_type * arg_pack = arg_pack_safe_cast( arg ); - job_queue_type * job_queue = arg_pack_iget_ptr( arg_pack , 0 ); - int queue_index = arg_pack_iget_int( arg_pack , 1 ); - - job_list_get_rdlock( job_queue->job_list ); - { - job_queue_node_type * node = job_list_iget_job( job_queue->job_list , queue_index ); - - if (job_queue_node_get_submit_attempt( node ) < job_queue->max_submit) - job_queue_change_node_status( job_queue , node , JOB_QUEUE_WAITING ); /* The job will be picked up for antother go. */ - else { - bool retry = job_queue_node_run_RETRY_callback( node ); - - if (retry) { - /* OK - we have invoked the retry_callback() - and that has returned true; - giving this job a brand new start. */ - job_queue_node_reset_submit_attempt( node ); - job_queue_change_node_status(job_queue , node , JOB_QUEUE_WAITING); - } else { - // It's time to call it a day - - job_queue_node_run_EXIT_callback( node ); - job_queue_change_node_status(job_queue , node , JOB_QUEUE_FAILED); - } - } - job_queue_node_free_driver_data( node , job_queue->driver ); - } - job_list_unlock(job_queue->job_list ); - arg_pack_free( arg_pack ); - - return NULL; -} - - -static void * job_queue_run_DO_KILL_callback( void * arg ) { - arg_pack_type * arg_pack = arg_pack_safe_cast( arg ); - job_queue_type * job_queue = arg_pack_iget_ptr( arg_pack , 0 ); - int queue_index = arg_pack_iget_int( arg_pack , 1 ); - - job_list_get_rdlock( job_queue->job_list ); - { - job_queue_node_type * node = job_list_iget_job( job_queue->job_list , queue_index ); - job_queue_node_free_driver_data( node , job_queue->driver ); - - // It's time to call it a day - job_queue_node_run_EXIT_callback( node ); - job_queue_change_node_status(job_queue, node, JOB_QUEUE_IS_KILLED); - } - job_list_unlock(job_queue->job_list ); - arg_pack_free( arg_pack ); - return NULL; -} - -static void job_queue_handle_DO_KILL_NODE_FAILURE(job_queue_type * queue, job_queue_node_type * node) { - queue_driver_blacklist_node( queue->driver, node ); - job_queue_change_node_status(queue, node, JOB_QUEUE_DO_KILL); -} - -static void job_queue_handle_DO_KILL( job_queue_type * queue , job_queue_node_type * node) { - job_queue_kill_job_node(queue, node); - job_queue_change_node_status(queue , node , JOB_QUEUE_RUNNING_CALLBACK ); - { - arg_pack_type * arg_pack = arg_pack_alloc(); - arg_pack_append_ptr( arg_pack , queue ); - arg_pack_append_int( arg_pack , job_queue_node_get_queue_index(node)); - thread_pool_add_job( queue->work_pool , job_queue_run_DO_KILL_callback , arg_pack ); - } -} - -static void job_queue_handle_EXIT( job_queue_type * queue , job_queue_node_type * node) { - job_queue_change_node_status(queue , node , JOB_QUEUE_RUNNING_CALLBACK ); - { - arg_pack_type * arg_pack = arg_pack_alloc(); - arg_pack_append_ptr( arg_pack , queue ); - arg_pack_append_int( arg_pack , job_queue_node_get_queue_index(node)); - thread_pool_add_job( queue->work_pool , job_queue_run_EXIT_callback , arg_pack ); - } -} - - - -/*****************************************************************/ - -static void job_queue_check_expired(job_queue_type * queue) { - if ((job_queue_get_max_job_duration(queue) <= 0) && (job_queue_get_job_stop_time(queue) <= 0)) - return; - - for (int i = 0; i < job_list_get_size( queue->job_list ); i++) { - job_queue_node_type * node = job_list_iget_job( queue->job_list , i ); - - if (job_queue_node_get_status(node) == JOB_QUEUE_RUNNING) { - time_t now = time(NULL); - if ( job_queue_get_max_job_duration(queue) > 0) { - double elapsed = difftime(now, job_queue_node_get_sim_start( node )); - if (elapsed > job_queue_get_max_job_duration(queue)) - job_queue_change_node_status(queue, node, JOB_QUEUE_DO_KILL); - } - if (job_queue_get_job_stop_time(queue) > 0) { - if (now >= job_queue_get_job_stop_time(queue)) - job_queue_change_node_status(queue, node, JOB_QUEUE_DO_KILL); - } - } - } -} - -bool job_queue_get_open(const job_queue_type * job_queue) { - return job_queue->open; -} - -void job_queue_check_open(job_queue_type* queue) { - if (!job_queue_get_open(queue)) - util_abort("%s: queue not open and not ready for use; method job_queue_reset must be called before using the queue - aborting\n", __func__ ); -} - -bool job_queue_accept_jobs(const job_queue_type * queue) { - if (queue->user_exit) - return false; - - return queue->open; -} - - -/** - If the total number of jobs is not known in advance the job_queue_run_jobs - function can be called with @num_total_run == 0. In that case it is paramount - to call the function job_queue_submit_complete() whan all jobs have been submitted. - - Observe that this function is assumed to have ~exclusive access to - the jobs array; meaning that: - - 1. The jobs array is read without taking a reader lock. - - 2. Other functions accessing the jobs array concurrently must - take a read lock. - - 3. This function should be the *only* function modifying - the jobs array, and that is done *with* the write lock. - -*/ - -void job_queue_run_jobs(job_queue_type * queue , int num_total_run, bool verbose) { - int trylock = pthread_mutex_trylock( &queue->run_mutex ); - if (trylock != 0) - util_abort("%s: another thread is already running the queue_manager\n",__func__); - else if (!queue->user_exit) { - /* OK - we have got an exclusive lock to the run_jobs code. */ - - //Check if queue is open. Fails hard if not open - job_queue_check_open(queue); - - /* - The number of threads in the thread pool running callbacks. Memory consumption can - potentially be quite high while running the DONE callback - should therefor not use - too many threads. - */ - const int NUM_WORKER_THREADS = 4; - queue->work_pool = thread_pool_alloc( NUM_WORKER_THREADS , true ); - { - bool new_jobs = false; - bool cont = true; - int phase = 0; - - queue->running = true; - do { - bool local_user_exit = false; - job_list_get_rdlock( queue->job_list ); - /*****************************************************************/ - if (queue->user_exit) {/* An external thread has called the job_queue_user_exit() function, and we should kill - all jobs, do some clearing up and go home. Observe that we will go through the - queue handling codeblock below ONE LAST TIME before exiting. */ - job_queue_user_exit__( queue ); - local_user_exit = true; - } - - job_queue_check_expired(queue); - - /*****************************************************************/ - { - bool update_status = job_queue_update_status( queue ); - if (verbose) { - if (update_status || new_jobs) - job_queue_print_summary(queue , update_status ); - job_queue_update_spinner( &phase ); - } - - - { - int num_complete = job_queue_status_get_count(queue->status, JOB_QUEUE_SUCCESS) + - job_queue_status_get_count(queue->status, JOB_QUEUE_FAILED) + - job_queue_status_get_count(queue->status, JOB_QUEUE_IS_KILLED); - - if ((num_total_run > 0) && (num_total_run == num_complete)) - /* The number of jobs completed is equal to the number - of jobs we have said we want to run; so we are finished. - */ - cont = false; - else { - if (num_total_run == 0) { - /* We have not informed about how many jobs we will - run. To check if we are complete we perform the two - tests: - - 1. All the jobs which have been added with - job_queue_add_job() have completed. - - 2. The user has used job_queue_complete_submit() - to signal that no more jobs will be forthcoming. - */ - if ((num_complete == job_list_get_size( queue->job_list )) && queue->submit_complete) - cont = false; - } - } - } - - if (cont) { - /* Submitting new jobs */ - int max_submit = 5; /* This is the maximum number of jobs submitted in one while() { ... } below. - Only to ensure that the waiting time before a status update is not too long. */ - int total_active = job_queue_status_get_count(queue->status, JOB_QUEUE_PENDING) + job_queue_status_get_count(queue->status, JOB_QUEUE_RUNNING); - int num_submit_new; - - { - int max_running = job_queue_get_max_running( queue ); - if (max_running > 0) - num_submit_new = util_int_min( max_submit , max_running - total_active ); - else - /* - If max_running == 0 that should be interpreted as no limit; i.e. the queue layer will - attempt to send an unlimited number of jobs to the driver - the driver can reject the jobs. - */ - num_submit_new = util_int_min( max_submit , job_queue_status_get_count(queue->status, JOB_QUEUE_WAITING)); - } - - new_jobs = false; - if (job_queue_status_get_count(queue->status, JOB_QUEUE_WAITING) > 0) /* We have waiting jobs at all */ - if (num_submit_new > 0) /* The queue can allow more running jobs */ - new_jobs = true; - - if (new_jobs) { - int submit_count = 0; - int queue_index = 0; - - while ((queue_index < job_list_get_size( queue->job_list )) && (num_submit_new > 0)) { - job_queue_node_type * node = job_list_iget_job( queue->job_list , queue_index ); - if (job_queue_node_get_status(node) == JOB_QUEUE_WAITING) { - { - submit_status_type submit_status = job_queue_submit_job(queue , queue_index); - - if (submit_status == SUBMIT_OK) { - num_submit_new--; - submit_count++; - } else if ((submit_status == SUBMIT_DRIVER_FAIL) || (submit_status == SUBMIT_QUEUE_CLOSED)) - break; - } - } - queue_index++; - } - } - - - { - /* - Checking for complete / exited / overtime jobs - */ - int queue_index; - for (queue_index = 0; queue_index < job_list_get_size( queue->job_list ); queue_index++) { - job_queue_node_type * node = job_list_iget_job( queue->job_list , queue_index ); - - switch (job_queue_node_get_status(node)) { - case(JOB_QUEUE_DONE): - job_queue_handle_DONE(queue, node); - break; - case(JOB_QUEUE_EXIT): - job_queue_handle_EXIT(queue, node); - break; - case(JOB_QUEUE_DO_KILL_NODE_FAILURE): - job_queue_handle_DO_KILL_NODE_FAILURE(queue, node); - break; - case(JOB_QUEUE_DO_KILL): - job_queue_handle_DO_KILL(queue, node); - break; - default: - break; - } - - - } - } - } else - /* print an updated status to stdout before exiting. */ - if (verbose) - job_queue_print_summary(queue , true); - } - job_list_unlock( queue->job_list ); - if (local_user_exit) - cont = false; /* This is how we signal that we want to get out . */ - else { - util_yield(); - job_list_reader_wait( queue->job_list , queue->usleep_time , 8 * queue->usleep_time); - } - } while ( cont ); - } - if (verbose) - printf("\n"); - thread_pool_join( queue->work_pool ); - thread_pool_free( queue->work_pool ); - } - - /* - Set the queue's "open" flag to false to signal that the queue is - not ready to be used in a new job_queue_run_jobs or - job_queue_add_job method call as it has not been reset yet. Not - resetting the queue here implies that the queue object is still - available for queries after this method has finished - */ - queue->open = false; - queue->running = false; - pthread_mutex_unlock( &queue->run_mutex ); -} - - - - - -void * job_queue_run_jobs__(void * __arg_pack) { - arg_pack_type * arg_pack = arg_pack_safe_cast(__arg_pack); - job_queue_type * queue = arg_pack_iget_ptr(arg_pack , 0); - int num_total_run = arg_pack_iget_int(arg_pack , 1); - bool verbose = arg_pack_iget_bool(arg_pack , 2); - - job_queue_run_jobs(queue , num_total_run , verbose); - arg_pack_free( arg_pack ); - return NULL; -} - - -void job_queue_start_manager_thread( job_queue_type * job_queue , pthread_t * queue_thread , int job_size , bool verbose) { - - arg_pack_type * queue_args = arg_pack_alloc(); /* This arg_pack will be freed() in the job_que_run_jobs__() */ - arg_pack_append_ptr(queue_args , job_queue); - arg_pack_append_int(queue_args , job_size); - arg_pack_append_bool(queue_args , verbose); - - job_queue->running = true; - pthread_create( queue_thread , NULL , job_queue_run_jobs__ , queue_args); -} - - - - -/** - The most flexible use scenario is as follows: - - 1. The job_queue_run_jobs() is run by one thread. - 2. Jobs are added asyncronously with job_queue_add_job() from othread threads(s). - - - Unfortunately it does not work properly (i.e. Ctrl-C breaks) to use a Python - thread to invoke the job_queue_run_jobs() function; and this function is - mainly a workaround around that problem. The function will create a new - thread and run job_queue_run_jobs() in that thread; the calling thread will - just return. - - No reference is retained to the thread actually running the - job_queue_run_jobs() function. -*/ - - -void job_queue_run_jobs_threaded(job_queue_type * queue , int num_total_run, bool verbose) { - pthread_t queue_thread; - job_queue_start_manager_thread( queue , &queue_thread , num_total_run , verbose ); - pthread_detach( queue_thread ); /* Signal that the thread resources should be cleaned up when - the thread has exited. */ -} - - - -/*****************************************************************/ -/* Adding new jobs - it is complicated ... */ - - -/** - This initializes the non-driver-spesific fields of a job, i.e. the - name, runpath and so on, and sets the job->status == - JOB_QUEUE_WAITING. This status means the job is ready to be - submitted proper to one of the drivers (when a slot is ready). - When submitted the job will get (driver specific) job_data != NULL - and status SUBMITTED. -*/ - - - - -int job_queue_add_job(job_queue_type * queue , - const char * run_cmd , - job_callback_ftype * done_callback, - job_callback_ftype * retry_callback, - job_callback_ftype * exit_callback, - void * callback_arg , - int num_cpu , - const char * run_path , - const char * job_name , - int argc , - const char ** argv) { - - - if (job_queue_accept_jobs(queue)) { - int queue_index; - job_queue_node_type * node = job_queue_node_alloc( job_name , - run_path , - run_cmd , - argc , - argv , - num_cpu , - queue->ok_file , - queue->status_file , - queue->exit_file, - done_callback , - retry_callback , - exit_callback , - callback_arg ); - if (node) { - job_list_get_wrlock( queue->job_list ); - { - job_list_add_job( queue->job_list , node ); - queue_index = job_queue_node_get_queue_index(node); - job_queue_change_node_status(queue , node , JOB_QUEUE_WAITING); - } - job_list_unlock( queue->job_list ); - return queue_index; /* Handle used by the calling scope. */ - } else { - char * cwd = util_alloc_cwd(); - util_abort("%s: failed to create job %s in path: %s cwd:%s \n",__func__ , job_name , run_path , cwd); - return -1; - } - } else - return -1; -} - - -UTIL_SAFE_CAST_FUNCTION( job_queue , JOB_QUEUE_TYPE_ID) - - -/** - Observe that the job_queue returned by this function is NOT ready - for use; a driver must be set explicitly with a call to - job_queue_set_driver() first. -*/ - -job_queue_type * job_queue_alloc(int max_submit , - const char * ok_file , - const char * status_file , - const char * exit_file ) { - - - - job_queue_type * queue = util_malloc(sizeof * queue ); - UTIL_TYPE_ID_INIT( queue , JOB_QUEUE_TYPE_ID); - queue->usleep_time = 250000; /* 1000000 : 1 second */ - queue->max_ok_wait_time = 60; - queue->max_duration = 0; - queue->stop_time = 0; - queue->max_submit = max_submit; - queue->driver = NULL; - queue->ok_file = util_alloc_string_copy( ok_file ); - queue->exit_file = util_alloc_string_copy( exit_file ); - queue->status_file = util_alloc_string_copy( status_file ); - queue->open = true; - queue->user_exit = false; - queue->pause_on = false; - queue->running = false; - queue->submit_complete = false; - queue->work_pool = NULL; - queue->job_list = job_list_alloc( ); - queue->status = job_queue_status_alloc( ); - - pthread_mutex_init( &queue->run_mutex , NULL ); - - return queue; -} - - -/** - When the job_queue_run_jobs() has been called with @total_num_jobs - == 0 that means that the total number of jobs to run is not known - in advance. In that case it is essential to signal the queue when - we will not submit any more jobs, so that it can finalize and - return. That is done with the function job_queue_submit_complete() -*/ - -void job_queue_submit_complete( job_queue_type * queue ){ - queue->submit_complete = true; -} - - - -/** - The calling scope must retain a handle to the current driver and - free it. Should (in principle) be possible to change driver on a - running system whoaaa. Will read and update the max_running value - from the driver. -*/ - -void job_queue_set_driver(job_queue_type * queue , queue_driver_type * driver) { - queue->driver = driver; -} - - -bool job_queue_has_driver(const job_queue_type * queue ) { - if (queue->driver == NULL) - return false; - else - return true; -} - - -void job_queue_set_max_submit( job_queue_type * job_queue , int max_submit ) { - job_queue->max_submit = max_submit; -} - - -int job_queue_get_max_submit(const job_queue_type * job_queue ) { - return job_queue->max_submit; -} - - -/** - Returns true if the queue is currently paused, which means that no - more jobs are submitted. -*/ - -bool job_queue_get_pause( const job_queue_type * job_queue ) { - return job_queue->pause_on; -} - - -void job_queue_set_pause_on( job_queue_type * job_queue) { - job_queue->pause_on = true; -} - - -void job_queue_set_pause_off( job_queue_type * job_queue) { - job_queue->pause_on = false; -} - -/* - An external thread sets the user_exit flag to true, then - subsequently the thread managing the queue will see this, and close - down the queue. Will check that the queue is actually running before - setting the user_exit flag. If the queue does not change to running - state within a timeout limit the user_exit flag is not set, and the - function return false. -*/ - -bool job_queue_start_user_exit( job_queue_type * queue) { - if (!queue->user_exit) { - int timeout_limit = 10 * 1000000; // 10 seconds - int usleep_time = 100000; // 0.1 second - int total_sleep = 0; - - while (true) { - if (queue->running) { - queue->user_exit = true; - break; - } - usleep( usleep_time ); - total_sleep += usleep_time; - - if (total_sleep > timeout_limit) - break; - } - } - return queue->user_exit; -} - -bool job_queue_get_user_exit( const job_queue_type * queue) { - return queue->user_exit; -} - -void job_queue_free(job_queue_type * queue) { - util_safe_free( queue->ok_file ); - util_safe_free( queue->exit_file ); - job_list_free( queue->job_list ); - job_queue_status_free( queue->status ); - free(queue); -} - - - - - - -int job_queue_get_max_running_option(queue_driver_type * driver) { - char * max_running_string = (char*)queue_driver_get_option(driver, MAX_RUNNING); - int max_running; - if (!util_sscanf_int(max_running_string, &max_running)) { - fprintf(stderr, "%s: Unable to parse option MAX_RUNNING with value %s to an int", __func__, max_running_string); - } - return max_running; -} - - -void job_queue_set_max_running_option(queue_driver_type * driver, int max_running) { - char * max_running_string = util_alloc_sprintf("%d", max_running); - queue_driver_set_option(driver, MAX_RUNNING, max_running_string); - free(max_running_string); -} - - -/** - Observe that if the max number of running jobs is decreased, - nothing will be done to reduce the number of jobs currently - running; but no more jobs will be submitted until the number of - running has fallen below the new limit. - - The updated value will also be pushed down to the current driver. - - NOTE: These next three *max_running functions should not be used, rather - use the set_option feature, with MAX_RUNNING. They are (maybe) used by python - therefore not removed. -*/ -int job_queue_get_max_running( const job_queue_type * queue ) { - return job_queue_get_max_running_option(queue->driver); -} - -void job_queue_set_max_running( job_queue_type * queue , int max_running ) { - job_queue_set_max_running_option(queue->driver, max_running); -} diff --git a/ThirdParty/Ert/libjob_queue/src/job_queue_manager.c b/ThirdParty/Ert/libjob_queue/src/job_queue_manager.c deleted file mode 100644 index eeede2c8fb..0000000000 --- a/ThirdParty/Ert/libjob_queue/src/job_queue_manager.c +++ /dev/null @@ -1,182 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'job_queue_manager.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#define _GNU_SOURCE /* Must define this to get access to pthread_rwlock_t */ -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#define JOB_QUEUE_MANAGER_TYPE_ID 81626006 - - - -struct job_queue_manager_struct { - UTIL_TYPE_ID_DECLARATION; - pthread_t queue_thread; - job_queue_type * job_queue; -}; - - -UTIL_IS_INSTANCE_FUNCTION( job_queue_manager , JOB_QUEUE_MANAGER_TYPE_ID ) - - -job_queue_manager_type * job_queue_manager_alloc( job_queue_type * job_queue ) { - job_queue_manager_type * manager = util_malloc( sizeof * manager ); - UTIL_TYPE_ID_INIT( manager , JOB_QUEUE_MANAGER_TYPE_ID ); - manager->job_queue = job_queue; - return manager; -} - - -void job_queue_manager_free( job_queue_manager_type * manager) { - free( manager ); -} - - -void job_queue_manager_start_queue( job_queue_manager_type * manager , int num_total_run , bool verbose , bool reset_queue) { - if (reset_queue) - job_queue_reset( manager->job_queue ); - - job_queue_start_manager_thread( manager->job_queue , &manager->queue_thread , num_total_run , verbose ); -} - - - -void job_queue_manager_wait( job_queue_manager_type * manager) { - pthread_join( manager->queue_thread , NULL ); -} - - -bool job_queue_manager_try_wait( job_queue_manager_type * manager , int timeout_seconds) { - struct timespec ts; - time_t timeout_time = time( NULL ); - - util_inplace_forward_seconds_utc(&timeout_time , timeout_seconds ); - ts.tv_sec = timeout_time; - ts.tv_nsec = 0; - -#ifdef HAVE_TIMEDJOIN - { - int join_return = pthread_timedjoin_np( manager->queue_thread , NULL , &ts); /* Wait for the main thread to complete. */ - if (join_return == 0) - return true; - else - return false; - } -#else - while(true) { - if (pthread_kill(manager->queue_thread, 0) == 0){ - util_yield(); - } else { - return true; - } - - time_t now = time(NULL); - - if(util_difftime_seconds(now, timeout_time) <= 0) { - return false; - } - } - -#endif -} - - - -bool job_queue_manager_is_running( const job_queue_manager_type * manager) { - return job_queue_is_running( manager->job_queue ); -} - - -int job_queue_manager_get_num_waiting( const job_queue_manager_type * manager) { - return job_queue_get_num_waiting( manager->job_queue ); -} - - -int job_queue_manager_get_num_running( const job_queue_manager_type * manager) { - return job_queue_get_num_running( manager->job_queue ); -} - - -int job_queue_manager_get_num_success( const job_queue_manager_type * manager) { - return job_queue_get_num_complete( manager->job_queue ); -} - -int job_queue_manager_get_num_failed( const job_queue_manager_type * manager) { - return job_queue_get_num_failed( manager->job_queue ); -} - - - -bool job_queue_manager_job_complete( const job_queue_manager_type * manager , int job_index) { - job_status_type status = job_queue_iget_job_status( manager->job_queue , job_index ); - if (status & JOB_QUEUE_COMPLETE_STATUS) - return true; - else - return false; -} - - -bool job_queue_manager_job_waiting( const job_queue_manager_type * manager , int job_index) { - job_status_type status = job_queue_iget_job_status( manager->job_queue , job_index ); - if (status & JOB_QUEUE_WAITING_STATUS) - return true; - else - return false; -} - -bool job_queue_manager_job_running( const job_queue_manager_type * manager , int job_index) { - job_status_type status = job_queue_iget_job_status( manager->job_queue , job_index ); - if (status == JOB_QUEUE_RUNNING) - return true; - else - return false; -} - - -bool job_queue_manager_job_failed( const job_queue_manager_type * manager , int job_index) { - job_status_type status = job_queue_iget_job_status( manager->job_queue , job_index ); - if (status == JOB_QUEUE_FAILED) - return true; - else - return false; -} - - -bool job_queue_manager_job_success( const job_queue_manager_type * manager , int job_index) { - job_status_type status = job_queue_iget_job_status( manager->job_queue , job_index ); - if (status == JOB_QUEUE_SUCCESS) - return true; - else - return false; -} - -job_status_type job_queue_manager_iget_job_status(const job_queue_manager_type * manager, int job_index) { - return job_queue_iget_job_status(manager->job_queue, job_index); -} - diff --git a/ThirdParty/Ert/libjob_queue/src/job_queue_status.c b/ThirdParty/Ert/libjob_queue/src/job_queue_status.c deleted file mode 100644 index f557e2b5ee..0000000000 --- a/ThirdParty/Ert/libjob_queue/src/job_queue_status.c +++ /dev/null @@ -1,142 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA, Norway. - - The file 'job_status_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include - -#include -#include - -#include -#include - -#define JOB_QUEUE_STATUS_TYPE_ID 777620306 - -struct job_queue_status_struct { - UTIL_TYPE_ID_DECLARATION; - int status_list[JOB_QUEUE_MAX_STATE]; - pthread_mutex_t update_mutex; -}; - -static const int status_index[] = { JOB_QUEUE_NOT_ACTIVE , // Initial, allocated job state, job not added - controlled by job_queue - JOB_QUEUE_WAITING , // The job is ready to be started - controlled by job_queue - JOB_QUEUE_SUBMITTED , // Job is submitted to driver - temporary state - controlled by job_queue - JOB_QUEUE_PENDING , // Job is pending, before actual execution - controlled by queue_driver - JOB_QUEUE_RUNNING , // Job is executing - controlled by queue_driver - JOB_QUEUE_DONE , // Job is done (successful or not), temporary state - controlled/returned by by queue_driver - JOB_QUEUE_EXIT , // Job is done, with exit status != 0, temporary state - controlled/returned by by queue_driver - JOB_QUEUE_IS_KILLED , // Job has been killed, due to JOB_QUEUE_DO_KILL, FINAL STATE - controlled by job_queue - JOB_QUEUE_DO_KILL , // User / queue system has requested killing of job - controlled by job_queue / external scope - JOB_QUEUE_SUCCESS , // All good, comes after JOB_QUEUE_DONE, with additional checks, FINAL STATE - controlled by job_queue - JOB_QUEUE_RUNNING_CALLBACK, // Temporary state, while running requested callbacks after an ended job - controlled by job_queue - JOB_QUEUE_FAILED , // Job has failed, no more retries, FINAL STATE - JOB_QUEUE_DO_KILL_NODE_FAILURE // Job has failed, node should be blacklisted - }; - -static int STATUS_INDEX( job_status_type status ) { - int index = 0; - - while (true) { - if (status_index[index] == status) - return index; - - index++; - if (index == JOB_QUEUE_MAX_STATE) - util_abort("%s: failed to get index from status:%d \n",__func__ , status); - } -} - - -UTIL_IS_INSTANCE_FUNCTION( job_queue_status , JOB_QUEUE_STATUS_TYPE_ID ) -UTIL_SAFE_CAST_FUNCTION( job_queue_status , JOB_QUEUE_STATUS_TYPE_ID ) - - -job_queue_status_type * job_queue_status_alloc() { - job_queue_status_type * status = util_malloc( sizeof * status ); - UTIL_TYPE_ID_INIT( status , JOB_QUEUE_STATUS_TYPE_ID ); - pthread_mutex_init( &status->update_mutex , NULL ); - job_queue_status_clear( status ); - return status; -} - - -void job_queue_status_free( job_queue_status_type * status ) { - free( status ); -} - - -void job_queue_status_clear( job_queue_status_type * status ) { - int index; - for (index = 0; index < JOB_QUEUE_MAX_STATE; index++) - status->status_list[ index ] = 0; -} - - -int job_queue_status_get_count( job_queue_status_type * status_count , job_status_type status_type) { - int index = STATUS_INDEX( status_type ); - int count; - - count = status_count->status_list[index]; - - return count; -} - - -void job_queue_status_inc( job_queue_status_type * status_count , job_status_type status_type) { - int index = STATUS_INDEX( status_type ); - - pthread_mutex_lock( &status_count->update_mutex ); - { - int count = status_count->status_list[index]; - status_count->status_list[index] = count + 1; - } - pthread_mutex_unlock( &status_count->update_mutex ); -} - - -static void job_queue_status_dec( job_queue_status_type * status_count , job_status_type status_type) { - int index = STATUS_INDEX( status_type ); - - pthread_mutex_lock( &status_count->update_mutex ); - { - int count = status_count->status_list[index]; - status_count->status_list[index] = count - 1; - } - pthread_mutex_unlock( &status_count->update_mutex ); -} - - -/* - The important point is that each individual ++ and -- operation is - atomic, if the different status counts do not add up perfectly at - all times that is ok. -*/ -bool job_queue_status_transition(job_queue_status_type * status_count, job_status_type src_status, - job_status_type target_status) { - if (src_status == target_status) - return false; - job_queue_status_dec( status_count, src_status ); - job_queue_status_inc( status_count, target_status ); - return true; -} - - -int job_queue_status_get_total_count( const job_queue_status_type * status ) { - int total_count = 0; - for (int index = 0; index < JOB_QUEUE_MAX_STATE; index++) - total_count += status->status_list[ index ]; - return total_count; -} diff --git a/ThirdParty/Ert/libjob_queue/src/local_driver.c b/ThirdParty/Ert/libjob_queue/src/local_driver.c deleted file mode 100644 index 52a16d5a64..0000000000 --- a/ThirdParty/Ert/libjob_queue/src/local_driver.c +++ /dev/null @@ -1,202 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'local_driver.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - - -struct local_job_struct { - UTIL_TYPE_ID_DECLARATION; - bool active; - job_status_type status; - pthread_t run_thread; - pid_t child_process; -}; - - -#define LOCAL_DRIVER_TYPE_ID 66196305 -#define LOCAL_JOB_TYPE_ID 63056619 - -struct local_driver_struct { - UTIL_TYPE_ID_DECLARATION; - pthread_attr_t thread_attr; - pthread_mutex_t submit_lock; -}; - -/*****************************************************************/ - - -static UTIL_SAFE_CAST_FUNCTION( local_driver , LOCAL_DRIVER_TYPE_ID ) -UTIL_SAFE_CAST_FUNCTION( local_job , LOCAL_JOB_TYPE_ID ) - - -local_job_type * local_job_alloc() { - local_job_type * job; - job = util_malloc(sizeof * job ); - UTIL_TYPE_ID_INIT( job , LOCAL_JOB_TYPE_ID ); - job->active = false; - job->status = JOB_QUEUE_WAITING; - return job; -} - -void local_job_free(local_job_type * job) { - if (job->active) { - /* Thread clean up */ - } - free(job); -} - - - -job_status_type local_driver_get_job_status(void * __driver, void * __job) { - if (__job == NULL) - /* The job has not been registered at all ... */ - return JOB_QUEUE_NOT_ACTIVE; - else { - local_job_type * job = local_job_safe_cast( __job ); - return job->status; - } -} - - - -void local_driver_free_job( void * __job ) { - local_job_type * job = local_job_safe_cast( __job ); - local_job_free(job); -} - - -void local_driver_kill_job( void * __driver , void * __job) { - local_job_type * job = local_job_safe_cast( __job ); - - if (job->active) { - pthread_cancel( job->run_thread ); - } - - kill( job->child_process , SIGTERM ); -} - - -void * submit_job_thread__(void * __arg) { - arg_pack_type *arg_pack = arg_pack_safe_cast(__arg); - const char *executable = arg_pack_iget_const_ptr(arg_pack, 0); - /* - The arg_pack contains a run_path field as the second argument, - it has therefor been left here as a comment: - - const char * run_path = arg_pack_iget_const_ptr(arg_pack , 1); - */ - int argc = arg_pack_iget_int(arg_pack, 2); - char **argv = arg_pack_iget_ptr(arg_pack, 3); - local_job_type *job = arg_pack_iget_ptr(arg_pack, 4); - - { - int wait_status; - job->child_process = util_spawn(executable, argc, (const char**) argv, NULL, NULL); - util_free_stringlist(argv, argc); - arg_pack_free(arg_pack); - waitpid(job->child_process, &wait_status, 0); - } - - job->status = JOB_QUEUE_DONE; - job->active = false; - pthread_exit(NULL); - return NULL; -} - - - -void * local_driver_submit_job(void * __driver , - const char * submit_cmd , - int num_cpu , /* Ignored */ - const char * run_path , - const char * job_name , - int argc , - const char ** argv ) { - local_driver_type * driver = local_driver_safe_cast( __driver ); - { - local_job_type * job = local_job_alloc(); - arg_pack_type * arg_pack = arg_pack_alloc(); - arg_pack_append_const_ptr( arg_pack , submit_cmd); - arg_pack_append_const_ptr( arg_pack , run_path ); - arg_pack_append_int( arg_pack , argc ); - arg_pack_append_ptr( arg_pack , util_alloc_stringlist_copy( argv , argc )); /* Due to conflict with threads and python GC we take a local copy. */ - arg_pack_append_ptr( arg_pack , job ); - - pthread_mutex_lock( &driver->submit_lock ); - job->active = true; - job->status = JOB_QUEUE_RUNNING; - - if (pthread_create( &job->run_thread , &driver->thread_attr , submit_job_thread__ , arg_pack) != 0) - util_abort("%s: failed to create run thread - aborting \n",__func__); - - pthread_mutex_unlock( &driver->submit_lock ); - return job; - } -} - - - -void local_driver_free(local_driver_type * driver) { - pthread_attr_destroy ( &driver->thread_attr ); - free(driver); - driver = NULL; -} - - -void local_driver_free__(void * __driver) { - local_driver_type * driver = local_driver_safe_cast( __driver ); - local_driver_free( driver ); -} - - -void * local_driver_alloc() { - local_driver_type * local_driver = util_malloc(sizeof * local_driver ); - UTIL_TYPE_ID_INIT( local_driver , LOCAL_DRIVER_TYPE_ID); - pthread_mutex_init( &local_driver->submit_lock , NULL ); - pthread_attr_init( &local_driver->thread_attr ); - pthread_attr_setdetachstate( &local_driver->thread_attr , PTHREAD_CREATE_DETACHED ); - - return local_driver; -} - - -bool local_driver_set_option( void * __driver , const char * option_key , const void * value){ - return false; -} - -void local_driver_init_option_list(stringlist_type * option_list) { - //No options specific for local driver; do nothing -} - -#undef LOCAL_DRIVER_ID -#undef LOCAL_JOB_ID - -/*****************************************************************/ - diff --git a/ThirdParty/Ert/libjob_queue/src/lsb.c b/ThirdParty/Ert/libjob_queue/src/lsb.c deleted file mode 100644 index e9f1f0f252..0000000000 --- a/ThirdParty/Ert/libjob_queue/src/lsb.c +++ /dev/null @@ -1,207 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'lsb.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -/* - This file implements a very small wrapper structure around the - lsb_xxxx() functions from the libbat.so shared library which are - used to submit, monitor and control simulations with LSF. - - Loading and initializing the lsf libraries is quite painful, in an - attempt to reduce unecessary dependencies the lsf libraries are - loaded with dlopen() in the lsb_alloc() function below. This means - that the libjob_queue.so shared library can be loaded without access - to the lsf libraries. -*/ - -#include -#include - -#include - -#include -#include - -#include - - - -typedef int (lsb_submit_ftype) ( struct submit * , struct submitReply *); -typedef int (lsb_openjobinfo_ftype) (int , char * , char * , char * , char * , int); -typedef struct jobInfoEnt * (lsb_readjobinfo_ftype) (int * ); -typedef int (lsb_closejobinfo_ftype) ( ); -typedef int (lsb_forcekilljob_ftype) ( int ); -typedef int (lsb_init_ftype) ( char * ); -typedef char * (lsb_sysmsg_ftype) ( ); - - - -struct lsb_struct { - lsb_submit_ftype * submit; - lsb_openjobinfo_ftype * open_job; - lsb_readjobinfo_ftype * read_job; - lsb_closejobinfo_ftype * close_job; - lsb_forcekilljob_ftype * kill_job; - lsb_init_ftype * lsb_init; - lsb_sysmsg_ftype * sys_msg; - - stringlist_type * error_list; - void * lib_bat; - void * lib_nsl; - void * lib_lsf; - bool ready; -}; - - - -static void * lsb_dlsym( lsb_type * lsb , const char * function_name ) { - void * function = dlsym( lsb->lib_bat , function_name ); - if (!function) { - lsb->ready = false; - stringlist_append_owned_ref( lsb->error_list , util_alloc_sprintf( "Failed to locate symbol:%s dlerror:%s" , function_name , dlerror())); - } - - return function; -} - - -void * lsb_dlopen( lsb_type * lsb , const char * lib_name) { - void * lib_handle = dlopen( lib_name , RTLD_NOW | RTLD_GLOBAL); - if (!lib_handle) { - lsb->ready = false; - stringlist_append_owned_ref( lsb->error_list , util_alloc_sprintf("dlopen(%s) - failed:%s \n" , lib_name , dlerror())); - } - return lib_handle; -} - -/* - The following environment variables must be set (at some stage) before - LSF will work properly: - - LSF_BINDIR $LSF_HOME/bin - LSF_LIBDIR $LSF_HOME/lib - XLSF_UIDDIR $LSF_HOME/lib/uid - LSF_SERVERDIR $LSF_HOME/etc - LSF_ENVDIR /prog/LSF/conf - - The runtime linker must locate the libnsl, libbat and liblsf - libraries using whatever method it usually does. If the loading - fails the lsb object will get the ->ready flag set to false, and the - lsf_driver will discard the lsb instance (and hopefully use shell - commands to perform job management). -*/ - -lsb_type * lsb_alloc() { - lsb_type * lsb = util_malloc( sizeof * lsb ); - lsb->ready = true; - lsb->error_list = stringlist_alloc_new(); - - lsb->lib_nsl = lsb_dlopen(lsb , "libnsl.so" ); - lsb->lib_lsf = lsb_dlopen(lsb , "liblsf.so" ); - lsb->lib_bat = lsb_dlopen(lsb , "libbat.so"); - - if (lsb->lib_bat) { - lsb->submit = (lsb_submit_ftype *) lsb_dlsym( lsb , "lsb_submit"); - lsb->open_job = (lsb_openjobinfo_ftype *) lsb_dlsym( lsb , "lsb_openjobinfo"); - lsb->read_job = (lsb_readjobinfo_ftype *) lsb_dlsym( lsb , "lsb_readjobinfo"); - lsb->close_job = (lsb_closejobinfo_ftype *) lsb_dlsym( lsb , "lsb_closejobinfo"); - lsb->kill_job = (lsb_forcekilljob_ftype *) lsb_dlsym( lsb , "lsb_forcekilljob"); - lsb->lsb_init = (lsb_init_ftype *) lsb_dlsym( lsb , "lsb_init"); - lsb->sys_msg = (lsb_sysmsg_ftype *) lsb_dlsym( lsb , "lsb_sysmsg"); - } - - return lsb; -} - - - -void lsb_free( lsb_type * lsb) { - stringlist_free( lsb->error_list ); - - if (lsb->lib_nsl) - dlclose( lsb->lib_nsl ); - - if (lsb->lib_lsf) - dlclose( lsb->lib_lsf ); - - if (lsb->lib_bat) - dlclose( lsb->lib_bat ); - - free( lsb ); -} - - - -bool lsb_ready( const lsb_type * lsb) { - return lsb->ready; -} - -stringlist_type * lsb_get_error_list( const lsb_type * lsb ) { - return lsb->error_list; -} - - -/*****************************************************************/ - -int lsb_initialize( const lsb_type * lsb) { - /* - The environment variable LSF_ENVDIR must be set to point the - directory containing LSF configuration information, the whole - thing will crash and burn if this is not properly set. - */ - if ( lsb->lsb_init(NULL) != 0 ) { - - fprintf(stderr,"LSF_ENVDIR: "); - if (getenv("LSF_ENVDIR") != NULL) - fprintf(stderr,"%s\n", getenv("LSF_ENVDIR")); - else - fprintf(stderr, "not set\n"); - - util_abort("%s failed to initialize LSF environment : %s \n",__func__ , lsb->sys_msg() ); - } - return 0; -} - - -int lsb_submitjob( const lsb_type * lsb , struct submit * submit_data, struct submitReply * reply_data) { - return lsb->submit( submit_data , reply_data ); -} - - -int lsb_killjob( const lsb_type * lsb , int lsf_jobnr) { - return lsb->kill_job(lsf_jobnr); -} - - -int lsb_openjob( const lsb_type * lsb , int lsf_jobnr) { - return lsb->open_job(lsf_jobnr , NULL , NULL , NULL , NULL , ALL_JOB); -} - - -int lsb_closejob( const lsb_type * lsb) { - return lsb->close_job(); -} - -char * lsb_sys_msg( const lsb_type * lsb) { - return lsb->sys_msg(); -} - - -struct jobInfoEnt * lsb_readjob( const lsb_type * lsb ) { - struct jobInfoEnt * job_info = lsb->read_job( NULL ); - return job_info; -} diff --git a/ThirdParty/Ert/libjob_queue/src/lsf_driver.c b/ThirdParty/Ert/libjob_queue/src/lsf_driver.c deleted file mode 100644 index 3b7ab58caf..0000000000 --- a/ThirdParty/Ert/libjob_queue/src/lsf_driver.c +++ /dev/null @@ -1,1181 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'lsf_driver.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -#ifdef HAVE_LSF_LIBRARY -#include -#endif - - - - -/** - Documentation/examples of programming towards the lsf libraries can - be found in /prog/LSF/7.0/misc/examples -*/ - - -/* - How to call the lsf commands bsub/bjobs/bkill: - ---------------------------------------------- - - The commands to submit, monitor and modify LSF jobs are available - through library calls through the lsf library. This is a good - solution which works well. - - Unfortunately only quite few of the workstations in Statoil are - "designated LSF machines", meaning that they are allowed to talk to - the LIM servers, to be able to use the low-level lsb_xxx() function - calls the host making the calls must configured (by an LSF - administrator) to be a LSF client. - - The lsf_driver can either make use of the proper lsf library calls - (lsb_submit(), lsb_openjobinfo(), ...) or alternatively it can issue - ssh calls to an external LSF_SERVER and call up the bsub/bkill/bjob - executables on the remote server. - - All the functions with 'library' in the name are based on library - calls, and the functions with 'shell' in the name are based on - external functions (the actual calls are through the - util_spawn() function). - - By default the driver will use the library, but if a value is - provided with the LSF_SERVER option, the shell based functions will - be used. Internally this is goverened by the boolean flag - 'use_library_calls'. - - Even though you only intend to submit through the shell commands - bsub / bjobs / bkill the build process still requires access to the - lsf headers and the lsf library; that is probably not optimal. - - - Remote login shell - ------------------ - - When submitting with LSF the job will inherit the current - environment on the submitting host, and not read the users login - files on the remote host where the job is actually executed. E.g. in - situations where submitting host and executing host are - e.g. different operating system versions this might be - unfortunate. The '-L @shell' switch can used with bsub to force lsf - to source schell specific input files prior to executing your - job. This can be achieved with the LSF_LOGIN_SHELL option: - - lsf_driver_set_option( driver , LSF_LOGIN_SHELL , "/bin/csh" ); - -*/ - - - - - -#define LSF_DRIVER_TYPE_ID 10078365 -#define LSF_JOB_TYPE_ID 9963900 -#define BJOBS_REFRESH_TIME 10 -#define MAX_ERROR_COUNT 100 -#define SUBMIT_ERROR_SLEEP 2 -#define DEFAULT_RSH_CMD "/usr/bin/ssh" -#define DEFAULT_BSUB_CMD "bsub" -#define DEFAULT_BJOBS_CMD "bjobs" -#define DEFAULT_BKILL_CMD "bkill" - - - -struct lsf_job_struct { - UTIL_TYPE_ID_DECLARATION; - long int lsf_jobnr; - int num_exec_host; - char **exec_host; - char * lsf_jobnr_char; /* Used to look up the job status in the bjobs_cache hash table */ -}; - - - -struct lsf_driver_struct { - UTIL_TYPE_ID_DECLARATION; - char * queue_name; - char * resource_request; - stringlist_type * exclude_hosts; - char * login_shell; - pthread_mutex_t submit_lock; - - lsf_submit_method_enum submit_method; - int submit_sleep; - - int error_count; - int max_error_count; - int submit_error_sleep; - - /*-----------------------------------------------------------------*/ - /* Fields used by the lsf library functions */ -#ifdef HAVE_LSF_LIBRARY - struct submit lsf_request; - struct submitReply lsf_reply; - lsb_type * lsb; -#endif - - /*-----------------------------------------------------------------*/ - /* Fields used by the shell based functions */ - bool debug_output; - int bjobs_refresh_interval; - time_t last_bjobs_update; - hash_type * my_jobs; /* A hash table of all jobs submitted by this ERT instance - - to ensure that we do not check status of old jobs in e.g. ZOMBIE status. */ - hash_type * status_map; - hash_type * bjobs_cache; /* The output of calling bjobs is cached in this table. */ - pthread_mutex_t bjobs_mutex; /* Only one thread should update the bjobs_chache table. */ - char * remote_lsf_server; - char * rsh_cmd; - char * bsub_cmd; - char * bjobs_cmd; - char * bkill_cmd; -}; - - - - -/*****************************************************************/ - -UTIL_SAFE_CAST_FUNCTION( lsf_driver , LSF_DRIVER_TYPE_ID) -static UTIL_SAFE_CAST_FUNCTION_CONST( lsf_driver , LSF_DRIVER_TYPE_ID) -static UTIL_SAFE_CAST_FUNCTION( lsf_job , LSF_JOB_TYPE_ID) - -lsf_job_type * lsf_job_alloc() { - lsf_job_type * job; - job = util_malloc(sizeof * job); - job->num_exec_host = 0; - job->exec_host = NULL; - - job->lsf_jobnr = 0; - job->lsf_jobnr_char = NULL; - UTIL_TYPE_ID_INIT( job , LSF_JOB_TYPE_ID); - return job; -} - - - -void lsf_job_free(lsf_job_type * job) { - util_safe_free(job->lsf_jobnr_char); - util_free_stringlist(job->exec_host , job->num_exec_host); - free(job); -} - - -void lsf_job_export_hostnames( const lsf_job_type * job , stringlist_type * hostlist) { - int host_nr; - - stringlist_clear( hostlist ); - for (host_nr = 0; host_nr < job->num_exec_host; host_nr++) - stringlist_append_copy( hostlist , job->exec_host[ host_nr ]); -} - - -long lsf_job_get_jobnr( const lsf_job_type * job ) { - return job->lsf_jobnr; -} - -int lsf_job_parse_bsub_stdout(const char * bsub_cmd, const char * stdout_file) { - int jobid = 0; - if ((util_file_exists(stdout_file)) && (util_file_size(stdout_file) > 0)) { - FILE * stream = util_fopen(stdout_file , "r"); - if (util_fseek_string(stream , "<" , true , true)) { - char * jobid_string = util_fscanf_alloc_upto(stream , ">" , false); - if (jobid_string != NULL) { - util_sscanf_int( jobid_string , &jobid); - free( jobid_string ); - } - } - fclose( stream ); - - if (jobid == 0) { - char * file_content = util_fread_alloc_file_content( stdout_file , NULL ); - fprintf(stderr,"Failed to get lsf job id from file: %s \n",stdout_file ); - fprintf(stderr,"bsub command : %s \n",bsub_cmd ); - fprintf(stderr,"%s\n", file_content); - free( file_content ); - util_abort("%s: \n",__func__); - } - } - return jobid; -} - -/** - * Assumes fname points to a file with content "hname1:hname2:hname3" as written by lsf_job_write_bjobs_to_file - */ -stringlist_type * lsf_job_alloc_parse_hostnames(const char* fname) { - FILE *stream = util_fopen(fname, "r"); - - bool at_eof = false; - while (!at_eof) { - char * line = util_fscanf_alloc_line(stream, &at_eof); - if (line != NULL) { - stringlist_type * hosts = stringlist_alloc_from_split(line, ":"); // bjobs uses : as std. delimiter - - for (int i = 0; i < stringlist_get_size(hosts); i++) { - const char * host = stringlist_iget(hosts, i); - stringlist_type * h = stringlist_alloc_from_split(host, "*"); - stringlist_iset_copy(hosts, i, stringlist_iget(h, stringlist_get_size(h) - 1)); // hostname 4*be-lsf01 -> be-lsf01 - stringlist_free(h); - } - - free(line); - fclose(stream); - return hosts; - } - } - fclose(stream); - return stringlist_alloc_new(); -} - -const char* lsf_job_write_bjobs_to_file(const char * bjobs_cmd, lsf_driver_type * driver, const long jobid) { - // will typically run "bjobs -noheader -o 'EXEC_HOST' jobid" - - const char * noheader = "-noheader"; - const char * fields = "EXEC_HOST"; - const char * cmd = util_alloc_sprintf("%s %s -o '%s' %d", bjobs_cmd, noheader, fields, jobid); - - const char * tmp_file = util_alloc_tmp_file("/tmp", "ert_job_exec_host", true); - - if (driver->submit_method == LSF_SUBMIT_REMOTE_SHELL) { - char ** argv = util_calloc(2, sizeof *argv); - argv[0] = driver->remote_lsf_server; - argv[1] = cmd; - util_spawn_blocking(driver->rsh_cmd, 2, (const char **) argv, tmp_file, NULL); - free(argv); - } else if (driver->submit_method == LSF_SUBMIT_LOCAL_SHELL) { - char ** argv = util_calloc(1, sizeof *argv); - argv[0] = ""; - util_spawn_blocking(cmd, 1, (const char **) argv, tmp_file, NULL); - } - free(cmd); - return tmp_file; -} - - -static void lsf_driver_internal_error( const lsf_driver_type * driver ) { - fprintf(stderr , "\n\n"); - fprintf(stderr , "*****************************************************************\n"); - fprintf(stderr , "** The LSF driver can be configured and used in many different **\n"); - fprintf(stderr , "** ways. The important point is how we choose to submit: **\n"); - fprintf(stderr , "** **\n"); - fprintf(stderr , "** 1. Using the lsf library calls **\n"); - fprintf(stderr , "** 2. Using the bsub/bjobs/bkill commands locally **\n"); - fprintf(stderr , "** 3. Using the bsub/bjobs/bkill commands through ssh **\n"); - fprintf(stderr , "** **\n"); - fprintf(stderr , "** To chose between these three alternatives you set the remote**\n"); - fprintf(stderr , "** server with the lsf_driver_set_option() function. Passing **\n"); - fprintf(stderr , "** the value NULL will give alternative 1, passing the special **\n"); - fprintf(stderr , "** string \'%s\' will give alternative 2, and any other **\n",LOCAL_LSF_SERVER); - fprintf(stderr , "** value will submit through that host using ssh. **\n"); - fprintf(stderr , "** **\n"); - fprintf(stderr , "** The ability to submit thorugh lsf library calls must be **\n"); - fprintf(stderr , "** compiled in by defining the symbol \'HAVE_LSF_LIBRARY\' when **\n"); - fprintf(stderr , "** compiling. **\n"); - fprintf(stderr , "** **\n"); -#ifdef HAVE_LSF_LIBRARY - fprintf(stderr , "** This lsf driver has support for using lsf library calls. **\n"); -#else - fprintf(stderr , "** This lsf driver does NOT have support for using lsf **\n"); - fprintf(stderr , "** library calls; but you have tried to submit without setting **\n"); - fprintf(stderr , "** a value for LSF_SERVER. Set this and try again. **\n"); -#endif - fprintf(stderr , "*****************************************************************\n\n"); - exit(1); -} - - - -static void lsf_driver_assert_submit_method( const lsf_driver_type * driver ) { - if (driver->submit_method == LSF_SUBMIT_INVALID) { - lsf_driver_internal_error(driver); - } -} - - - - - -stringlist_type * lsf_driver_alloc_cmd(lsf_driver_type * driver , - const char * lsf_stdout , - const char * job_name , - const char * submit_cmd , - int num_cpu , - int job_argc, - const char ** job_argv) { - - stringlist_type * argv = stringlist_alloc_new(); - char * num_cpu_string = util_alloc_sprintf("%d" , num_cpu); - char * quoted_resource_request = NULL; - - /* - The resource request string contains spaces, and when passed - through the shell it must be protected with \"..\"; this applies - when submitting to a remote lsf server with ssh. However when - submitting to the local workstation using a bsub command the - command will be invoked with the util_spawn() command - and no - shell is involved. In this latter case we must avoid the \"...\" - quoting. - */ - - { - stringlist_type * select_list = stringlist_alloc_new(); - if (stringlist_get_size(driver->exclude_hosts) > 0) { - for (int i = 0; i < stringlist_get_size(driver->exclude_hosts); i++) { - char * exclude_host = util_alloc_sprintf("hname!='%s'", stringlist_iget(driver->exclude_hosts, i)); - stringlist_append_owned_ref(select_list, exclude_host); - } - } - - char * excludes_string = NULL; - char * req = ""; - char * resreq = NULL; - - if (stringlist_get_size(select_list) > 0) { - excludes_string = stringlist_alloc_joined_string(select_list, " && "); - if (driver->resource_request != NULL) { - resreq = util_alloc_string_copy(driver->resource_request); - util_string_tr(resreq, ']', ' '); // remove "]" from "select[A && B] - excludes_string = stringlist_alloc_joined_string(select_list, " && "); - req = util_alloc_sprintf("%s && %s]", resreq, excludes_string); - } else { - req = util_alloc_sprintf("select[%s]", excludes_string); - } - } else { - if (driver->resource_request != NULL) { - resreq = util_alloc_string_copy(driver->resource_request); - req = util_alloc_sprintf("%s", resreq); - } - } - if (resreq) - free(resreq); - - if (driver->submit_method == LSF_SUBMIT_REMOTE_SHELL) - quoted_resource_request = util_alloc_sprintf("\"%s\"", req); - else - quoted_resource_request = util_alloc_string_copy(req); - - free(req); - if (excludes_string) - free(excludes_string); - stringlist_free(select_list); - } - - if (driver->submit_method == LSF_SUBMIT_REMOTE_SHELL) - stringlist_append_ref( argv , driver->bsub_cmd); - - stringlist_append_ref( argv , "-o" ); - stringlist_append_copy( argv , lsf_stdout ); - if (driver->queue_name != NULL) { - stringlist_append_ref( argv , "-q" ); - stringlist_append_ref( argv , driver->queue_name ); - } - stringlist_append_ref( argv , "-J" ); - stringlist_append_ref( argv , job_name ); - stringlist_append_ref( argv , "-n" ); - stringlist_append_copy( argv , num_cpu_string ); - - if (quoted_resource_request != NULL) { - stringlist_append_ref( argv , "-R"); - stringlist_append_copy( argv , quoted_resource_request ); - } - - if (driver->login_shell != NULL) { - stringlist_append_ref( argv , "-L"); - stringlist_append_ref( argv , driver->login_shell ); - } - - stringlist_append_ref( argv , submit_cmd); - { - int iarg; - for (iarg = 0; iarg < job_argc; iarg++) - stringlist_append_ref( argv , job_argv[ iarg ]); - } - free( num_cpu_string ); - util_safe_free( quoted_resource_request ); - return argv; -} - - -/** - * Submit internal job (LSF_SUBMIT_INTERNAL) using system calls instead of - * invoking shell commands. This method only works when actually called from - * an LSF node. - * - * Note that this method does not support the EXCLUDE_HOST configuration option. - */ -static int lsf_driver_submit_internal_job( lsf_driver_type * driver , - const char * lsf_stdout , - const char * job_name , - const char * submit_cmd , - int num_cpu , - int argc, - const char ** argv) { - -#ifdef HAVE_LSF_LIBRARY - char * command; - { - buffer_type * command_buffer = buffer_alloc( 256 ); - buffer_strcat( command_buffer , submit_cmd ); - for (int iarg = 0; iarg < argc; iarg++) { - buffer_strcat( command_buffer , " "); - buffer_strcat( command_buffer , argv[ iarg ]); - } - command = buffer_get_data( command_buffer ); - buffer_free_container( command_buffer ); - } - - { - int options = SUB_JOB_NAME + SUB_OUT_FILE; - - if (driver->queue_name != NULL) - options += SUB_QUEUE; - - if (driver->resource_request != NULL) - options += SUB_RES_REQ; - - if (driver->login_shell != NULL) - options += SUB_LOGIN_SHELL; - - driver->lsf_request.options = options; - } - - driver->lsf_request.resReq = driver->resource_request; - driver->lsf_request.loginShell = driver->login_shell; - driver->lsf_request.queue = driver->queue_name; - driver->lsf_request.jobName = (char *) job_name; - driver->lsf_request.outFile = (char *) lsf_stdout; - driver->lsf_request.command = command; - driver->lsf_request.numProcessors = num_cpu; - - { - int lsf_jobnr = lsb_submitjob( driver->lsb , &driver->lsf_request , &driver->lsf_reply ); - free( command ); /* I trust the lsf layer is finished with the command? */ - if (lsf_jobnr <= 0) - fprintf(stderr,"%s: ** Warning: lsb_submit() failed: %s \n",__func__ , lsb_sys_msg( driver->lsb )); - - return lsf_jobnr; - } -#else - lsf_driver_internal_error( driver ); - return -1; -#endif -} - - - -static int lsf_driver_submit_shell_job(lsf_driver_type * driver , - const char * lsf_stdout , - const char * job_name , - const char * submit_cmd , - int num_cpu , - int job_argc, - const char ** job_argv) { - int job_id; - char * tmp_file = util_alloc_tmp_file("/tmp" , "enkf-submit" , true); - - { - stringlist_type * remote_argv = lsf_driver_alloc_cmd( driver , lsf_stdout , job_name , submit_cmd , num_cpu , job_argc , job_argv); - - if (driver->submit_method == LSF_SUBMIT_REMOTE_SHELL) { - char ** argv = util_calloc( 2 , sizeof * argv ); - argv[0] = driver->remote_lsf_server; - argv[1] = stringlist_alloc_joined_string( remote_argv , " "); - - if (driver->debug_output) - printf("Submitting: %s %s %s \n",driver->rsh_cmd , argv[0] , argv[1]); - - util_spawn_blocking(driver->rsh_cmd, 2, (const char **) argv, tmp_file, NULL); - - free( argv[1] ); - free( argv ); - } else if (driver->submit_method == LSF_SUBMIT_LOCAL_SHELL) { - char ** argv = stringlist_alloc_char_ref( remote_argv ); - - if (driver->debug_output) { - printf("Submitting: %s ",driver->bsub_cmd); - stringlist_fprintf(remote_argv , " " , stdout); - printf("\n"); - } - util_spawn_blocking(driver->bsub_cmd, stringlist_get_size( remote_argv), (const char **) argv, tmp_file, tmp_file); - free( argv ); - } - - stringlist_free( remote_argv ); - } - - job_id = lsf_job_parse_bsub_stdout(driver->bsub_cmd , tmp_file); - util_unlink_existing( tmp_file ); - free(tmp_file); - return job_id; -} - - - -static int lsf_driver_get_status__(lsf_driver_type * driver , const char * status, const char * job_id) { - if (hash_has_key( driver->status_map , status)) - return hash_get_int( driver->status_map , status); - else { - util_exit("The lsf_status:%s for job:%s is not recognized; call your LSF administrator - sorry :-( \n", status , job_id); - return -1; - } -} - - - -static void lsf_driver_update_bjobs_table(lsf_driver_type * driver) { - char * tmp_file = util_alloc_tmp_file("/tmp" , "enkf-bjobs" , true); - - if (driver->submit_method == LSF_SUBMIT_REMOTE_SHELL) { - char ** argv = util_calloc( 2 , sizeof * argv); - argv[0] = driver->remote_lsf_server; - argv[1] = util_alloc_sprintf("%s -a" , driver->bjobs_cmd); - util_spawn_blocking(driver->rsh_cmd, 2, (const char **) argv, tmp_file, NULL); - free( argv[1] ); - free( argv ); - } else if (driver->submit_method == LSF_SUBMIT_LOCAL_SHELL) { - char ** argv = util_calloc( 1 , sizeof * argv); - argv[0] = "-a"; - util_spawn_blocking(driver->bjobs_cmd, 1, (const char **) argv, tmp_file, NULL); - free( argv ); - } - - { - char user[32]; - char status[16]; - FILE *stream = util_fopen(tmp_file , "r");; - bool at_eof = false; - hash_clear(driver->bjobs_cache); - util_fskip_lines(stream , 1); - while (!at_eof) { - char * line = util_fscanf_alloc_line(stream , &at_eof); - if (line != NULL) { - int job_id_int; - - if (sscanf(line , "%d %s %s", &job_id_int , user , status) == 3) { - char * job_id = util_alloc_sprintf("%d" , job_id_int); - - if (hash_has_key( driver->my_jobs , job_id )) /* Consider only jobs submitted by this ERT instance - not old jobs lying around from the same user. */ - hash_insert_int(driver->bjobs_cache , job_id , lsf_driver_get_status__( driver , status , job_id)); - - free(job_id); - } - free(line); - } - } - fclose(stream); - } - util_unlink_existing(tmp_file); - free(tmp_file); -} - - - -static int lsf_driver_get_job_status_libary(void * __driver , void * __job) { - if (__job == NULL) - /* the job has not been registered at all ... */ - return JOB_QUEUE_NOT_ACTIVE; - else { - int status; - lsf_driver_type * driver = lsf_driver_safe_cast( __driver ); -#ifdef HAVE_LSF_LIBRARY - lsf_job_type * job = lsf_job_safe_cast( __job ); - if (lsb_openjob( driver->lsb , job->lsf_jobnr) != 1) { - /* - Failed to get information about the job - we boldly assume - the following situation has occured: - - 1. The job is running happily along. - 2. The lsf deamon is not responding for a long time. - 3. The job finishes, and is eventually expired from the LSF job database. - 4. The lsf deamon answers again - but can not find the job... - - */ - fprintf(stderr,"Warning: failed to get status information for job:%ld - assuming it is finished. \n", job->lsf_jobnr); - status = JOB_QUEUE_DONE; - } else { - struct jobInfoEnt *job_info = lsb_readjob( driver->lsb ); - if (job->num_exec_host == 0) { - job->num_exec_host = job_info->numExHosts; - job->exec_host = util_alloc_stringlist_copy( (const char **) job_info->exHosts , job->num_exec_host); - } - status = job_info->status; - lsb_closejob(driver->lsb); - } -#else - lsf_driver_internal_error( driver ); - /* the above function calls exit(), so this value is never returned */ - status = JOB_QUEUE_FAILED; -#endif - - return status; - } -} - - - - -static int lsf_driver_get_job_status_shell(void * __driver , void * __job) { - int status = JOB_STAT_NULL; - - if (__job != NULL) { - lsf_job_type * job = lsf_job_safe_cast( __job ); - lsf_driver_type * driver = lsf_driver_safe_cast( __driver ); - - { - /** - Updating the bjobs_table of the driver involves a significant change in - the internal state of the driver; that is semantically a bit - unfortunate because this is clearly a get() function; to protect - against concurrent updates of this table we use a mutex. - */ - pthread_mutex_lock( &driver->bjobs_mutex ); - { - if (difftime(time(NULL) , driver->last_bjobs_update) > driver->bjobs_refresh_interval) { - lsf_driver_update_bjobs_table(driver); - driver->last_bjobs_update = time( NULL ); - } - } - pthread_mutex_unlock( &driver->bjobs_mutex ); - - - if (hash_has_key( driver->bjobs_cache , job->lsf_jobnr_char) ) - status = hash_get_int(driver->bjobs_cache , job->lsf_jobnr_char); - else - /* - It might be running - but since job != NULL it is at least in the queue system. - */ - status = JOB_STAT_PEND; - - } - } - - return status; -} - - -job_status_type lsf_driver_convert_status( int lsf_status ) { - job_status_type job_status; - switch (lsf_status) { - case JOB_STAT_NULL: - job_status = JOB_QUEUE_NOT_ACTIVE; - break; - case JOB_STAT_PEND: - job_status = JOB_QUEUE_PENDING; - break; - case JOB_STAT_SSUSP: - job_status = JOB_QUEUE_RUNNING; - break; - case JOB_STAT_USUSP: - job_status = JOB_QUEUE_RUNNING; - break; - case JOB_STAT_PSUSP: - job_status = JOB_QUEUE_RUNNING; - break; - case JOB_STAT_RUN: - job_status = JOB_QUEUE_RUNNING; - break; - case JOB_STAT_DONE: - job_status = JOB_QUEUE_DONE; - break; - case JOB_STAT_EXIT: - job_status = JOB_QUEUE_EXIT; - break; - case JOB_STAT_UNKWN: // Have lost contact with one of the daemons. - job_status = JOB_QUEUE_EXIT; - break; - case JOB_STAT_DONE + JOB_STAT_PDONE: // = 192. JOB_STAT_PDONE: the job had a - // post-execution script which completed - // successfully. - job_status = JOB_QUEUE_DONE; - break; - default: - job_status = JOB_QUEUE_NOT_ACTIVE; - util_abort("%s: unrecognized lsf status code:%d \n",__func__ , lsf_status ); - } - return job_status; -} - - -int lsf_driver_get_job_status_lsf(void * __driver , void * __job) { - int lsf_status; - lsf_driver_type * driver = lsf_driver_safe_cast( __driver ); - - if (driver->submit_method == LSF_SUBMIT_INTERNAL) - lsf_status = lsf_driver_get_job_status_libary(__driver , __job); - else - lsf_status = lsf_driver_get_job_status_shell(__driver , __job); - - return lsf_status; -} - - - -job_status_type lsf_driver_get_job_status(void * __driver , void * __job) { - int lsf_status = lsf_driver_get_job_status_lsf( __driver , __job ); - return lsf_driver_convert_status( lsf_status ); -} - - - - -void lsf_driver_free_job(void * __job) { - lsf_job_type * job = lsf_job_safe_cast( __job ); - lsf_job_free(job); -} - -static void lsf_driver_node_failure(lsf_driver_type * driver, long lsf_job_id) { - fprintf(stderr, "%s attempting to blacklist nodes for job id %d.\n", __func__, lsf_job_id); - - { - const char * fname = lsf_job_write_bjobs_to_file(driver->bsub_cmd, driver, lsf_job_id); - stringlist_type * hosts = lsf_job_alloc_parse_hostnames(fname); - const char* hostnames = stringlist_alloc_joined_string(hosts, ", "); - fprintf(stderr, "%s blacklisting nodes %s.\n", __func__, hostnames); - - lsf_driver_add_exclude_hosts(driver, hostnames); - - util_free(hostnames); - stringlist_free(hosts); - util_free(fname); - } - -} - -void lsf_driver_blacklist_node(void * __driver, void * __job) { - lsf_driver_type * driver = lsf_driver_safe_cast(__driver); - lsf_job_type * job = lsf_job_safe_cast(__job); - long lsf_job_id = lsf_job_get_jobnr(job); - lsf_driver_node_failure(driver, lsf_job_id); -} - - -void lsf_driver_kill_job(void * __driver , void * __job) { - lsf_driver_type * driver = lsf_driver_safe_cast( __driver ); - lsf_job_type * job = lsf_job_safe_cast( __job ); - { - if (driver->submit_method == LSF_SUBMIT_INTERNAL) { -#ifdef HAVE_LSF_LIBRARY - lsb_killjob( driver->lsb , job->lsf_jobnr); -#else - lsf_driver_internal_error( driver ); -#endif - } else { - if (driver->submit_method == LSF_SUBMIT_REMOTE_SHELL) { - char ** argv = util_calloc( 2, sizeof * argv ); - argv[0] = driver->remote_lsf_server; - argv[1] = util_alloc_sprintf("%s %s" , driver->bkill_cmd , job->lsf_jobnr_char); - - util_spawn_blocking(driver->rsh_cmd, 2, (const char **) argv, NULL, NULL); - - free( argv[1] ); - free( argv ); - } else if (driver->submit_method == LSF_SUBMIT_LOCAL_SHELL) { - util_spawn_blocking(driver->bkill_cmd, 1, (const char **) &job->lsf_jobnr_char, NULL, NULL); - } - } - } -} - - - - - -void * lsf_driver_submit_job(void * __driver , - const char * submit_cmd , - int num_cpu , - const char * run_path , - const char * job_name , - int argc, - const char ** argv ) { - lsf_driver_type * driver = lsf_driver_safe_cast( __driver ); - lsf_driver_assert_submit_method( driver ); - { - lsf_job_type * job = lsf_job_alloc(); - usleep( driver->submit_sleep ); - - { - char * lsf_stdout = util_alloc_filename(run_path , job_name , "LSF-stdout"); - lsf_submit_method_enum submit_method = driver->submit_method; - pthread_mutex_lock( &driver->submit_lock ); - - if (driver->debug_output) - printf("LSF DRIVER submitting using method:%d \n",submit_method); - - if (submit_method == LSF_SUBMIT_INTERNAL) { - if (stringlist_get_size(driver->exclude_hosts) > 0) - printf("WARNING: EXCLUDE_HOST is not supported with submit method LSF_SUBMIT_INTERNAL"); - job->lsf_jobnr = lsf_driver_submit_internal_job( driver , lsf_stdout , job_name , submit_cmd , num_cpu , argc, argv); - } else { - job->lsf_jobnr = lsf_driver_submit_shell_job( driver , lsf_stdout , job_name , submit_cmd , num_cpu , argc, argv); - job->lsf_jobnr_char = util_alloc_sprintf("%ld" , job->lsf_jobnr); - hash_insert_ref( driver->my_jobs , job->lsf_jobnr_char , NULL ); - } - - pthread_mutex_unlock( &driver->submit_lock ); - free( lsf_stdout ); - } - - if (job->lsf_jobnr > 0) - return job; - else { - /* - The submit failed - the queue system shall handle - NULL return values. - */ - driver->error_count++; - - if (driver->error_count >= driver->max_error_count) - util_exit("Maximum number of submit errors exceeded - giving up\n"); - else { - fprintf(stderr,"** ERROR ** Failed when submitting to LSF - will try again.\n"); - usleep( driver->submit_error_sleep ); - } - - lsf_job_free(job); - return NULL; - } - } -} - - - -void lsf_driver_free(lsf_driver_type * driver ) { - util_safe_free(driver->login_shell); - util_safe_free(driver->queue_name); - util_safe_free(driver->resource_request ); - util_safe_free(driver->remote_lsf_server ); - util_safe_free(driver->rsh_cmd ); - stringlist_free(driver->exclude_hosts); - free( driver->bkill_cmd ); - free( driver->bjobs_cmd ); - free( driver->bsub_cmd ); - - hash_free(driver->status_map); - hash_free(driver->bjobs_cache); - hash_free(driver->my_jobs); - -#ifdef HAVE_LSF_LIBRARY - if (driver->lsb != NULL) - lsb_free( driver->lsb ); -#endif - - free(driver); - driver = NULL; -} - -void lsf_driver_free__(void * __driver ) { - lsf_driver_type * driver = lsf_driver_safe_cast( __driver ); - lsf_driver_free( driver ); -} - - -static void lsf_driver_set_queue( lsf_driver_type * driver, const char * queue ) { - driver->queue_name = util_realloc_string_copy( driver->queue_name , queue); -} - - -static void lsf_driver_set_login_shell( lsf_driver_type * driver, const char * login_shell ) { - driver->login_shell = util_realloc_string_copy( driver->login_shell , login_shell); -} - -static void lsf_driver_set_rsh_cmd( lsf_driver_type * driver , const char * rsh_cmd) { - driver->rsh_cmd = util_realloc_string_copy( driver->rsh_cmd , rsh_cmd ); -} - -static void lsf_driver_set_bsub_cmd( lsf_driver_type * driver , const char * bsub_cmd) { - driver->bsub_cmd = util_realloc_string_copy( driver->bsub_cmd , bsub_cmd ); -} - -static void lsf_driver_set_bjobs_cmd( lsf_driver_type * driver , const char * bjobs_cmd) { - driver->bjobs_cmd = util_realloc_string_copy( driver->bjobs_cmd , bjobs_cmd ); -} - -static void lsf_driver_set_bkill_cmd( lsf_driver_type * driver , const char * bkill_cmd) { - driver->bkill_cmd = util_realloc_string_copy( driver->bkill_cmd , bkill_cmd ); -} - -#ifdef HAVE_LSF_LIBRARY -static void lsf_driver_set_internal_submit( lsf_driver_type * driver) { - /* No remote server has been set - assuming we can issue proper library calls. */ - /* The BSUB_QUEUE variable must NOT be set when using the shell - function, because then stdout is redirected and read. */ - - util_setenv("BSUB_QUIET" , "yes"); - driver->submit_method = LSF_SUBMIT_INTERNAL; - util_safe_free( driver->remote_lsf_server ); - driver->remote_lsf_server = NULL; -} -#endif - -static void lsf_driver_set_remote_server( lsf_driver_type * driver , const char * remote_server) { - if (remote_server == NULL) { -#ifdef HAVE_LSF_LIBRARY - if (driver->lsb) - lsf_driver_set_internal_submit( driver ); - else - lsf_driver_set_remote_server( driver , LOCAL_LSF_SERVER ); // If initializing the lsb layer failed we try the local shell commands. -#endif - } else { - driver->remote_lsf_server = util_realloc_string_copy( driver->remote_lsf_server , remote_server ); - util_unsetenv( "BSUB_QUIET" ); - { - char * tmp_server = util_alloc_strupr_copy( remote_server ); - - if (strcmp(tmp_server , LOCAL_LSF_SERVER) == 0) - driver->submit_method = LSF_SUBMIT_LOCAL_SHELL; - else if (strcmp(tmp_server , NULL_LSF_SERVER) == 0) // We trap the special string 'NULL' and call again with a true NULL pointer. - lsf_driver_set_remote_server( driver , NULL); - else - driver->submit_method = LSF_SUBMIT_REMOTE_SHELL; - - free( tmp_server ); - } - } -} - -void lsf_driver_add_exclude_hosts(lsf_driver_type * driver, const char * excluded) { - stringlist_type * host_list = stringlist_alloc_from_split(excluded, ", "); - for (int i = 0; i < stringlist_get_size(host_list); i++) { - const char * excluded = stringlist_iget(host_list, i); - if (!stringlist_contains(driver->exclude_hosts, excluded)) - stringlist_append_copy(driver->exclude_hosts, excluded); - } -} - -lsf_submit_method_enum lsf_driver_get_submit_method( const lsf_driver_type * driver ) { - return driver->submit_method; -} - - -static bool lsf_driver_set_debug_output( lsf_driver_type * driver , const char * arg) { - bool debug_output; - bool OK = util_sscanf_bool( arg , &debug_output); - if (OK) - driver->debug_output = debug_output; - - return OK; -} - - -static bool lsf_driver_set_submit_sleep( lsf_driver_type * driver , const char * arg) { - double submit_sleep; - bool OK = util_sscanf_double( arg , &submit_sleep); - if (OK) - driver->submit_sleep = (int) (1000000 * submit_sleep); - - return OK; -} - - - -/*****************************************************************/ -/* Generic functions for runtime manipulation of options. - - LSF_SERVER - LSF_QUEUE - LSF_RESOURCE -*/ - -bool lsf_driver_set_option( void * __driver , const char * option_key , const void * value) { - lsf_driver_type * driver = lsf_driver_safe_cast( __driver ); - bool has_option = true; - { - if (strcmp( LSF_RESOURCE , option_key ) == 0) - driver->resource_request = util_realloc_string_copy( driver->resource_request , value ); - else if (strcmp( LSF_SERVER , option_key) == 0) - lsf_driver_set_remote_server( driver , value ); - else if (strcmp( LSF_QUEUE , option_key) == 0) - lsf_driver_set_queue( driver , value ); - else if (strcmp( LSF_LOGIN_SHELL , option_key) == 0) - lsf_driver_set_login_shell( driver , value ); - else if (strcmp( LSF_RSH_CMD , option_key) == 0) - lsf_driver_set_rsh_cmd( driver , value ); - else if (strcmp( LSF_BSUB_CMD , option_key) == 0) - lsf_driver_set_bsub_cmd( driver , value ); - else if (strcmp( LSF_BJOBS_CMD , option_key) == 0) - lsf_driver_set_bjobs_cmd( driver , value ); - else if (strcmp( LSF_BKILL_CMD , option_key) == 0) - lsf_driver_set_bkill_cmd( driver , value ); - else if (strcmp( LSF_DEBUG_OUTPUT , option_key) == 0) - lsf_driver_set_debug_output( driver , value ); - else if (strcmp( LSF_SUBMIT_SLEEP , option_key) == 0) - lsf_driver_set_submit_sleep( driver , value ); - else if (strcmp( LSF_EXCLUDE_HOST , option_key) == 0) - lsf_driver_add_exclude_hosts( driver , value ); - else - has_option = false; - } - return has_option; -} - - -const void * lsf_driver_get_option( const void * __driver , const char * option_key) { - const lsf_driver_type * driver = lsf_driver_safe_cast_const( __driver ); - { - if (strcmp( LSF_RESOURCE , option_key ) == 0) - return driver->resource_request; - else if (strcmp( LSF_SERVER , option_key ) == 0) - return driver->remote_lsf_server; - else if (strcmp( LSF_QUEUE , option_key ) == 0) - return driver->queue_name; - else if (strcmp( LSF_LOGIN_SHELL , option_key ) == 0) - return driver->login_shell; - else if (strcmp( LSF_RSH_CMD , option_key ) == 0) - return driver->rsh_cmd; - else if (strcmp( LSF_BJOBS_CMD , option_key ) == 0) - return driver->bjobs_cmd; - else if (strcmp( LSF_BSUB_CMD , option_key ) == 0) - return driver->bsub_cmd; - else if (strcmp( LSF_BKILL_CMD , option_key ) == 0) - return driver->bkill_cmd; - else { - util_abort("%s: option_id:%s not recognized for LSF driver \n",__func__ , option_key); - return NULL; - } - } -} - - - -bool lsf_driver_has_option( const void * __driver , const char * option_key) { - return false; -} - -void lsf_driver_init_option_list(stringlist_type * option_list) { - stringlist_append_ref(option_list, LSF_QUEUE); - stringlist_append_ref(option_list, LSF_RESOURCE); - stringlist_append_ref(option_list, LSF_SERVER); - stringlist_append_ref(option_list, LSF_RSH_CMD); - stringlist_append_ref(option_list, LSF_LOGIN_SHELL); - stringlist_append_ref(option_list, LSF_BSUB_CMD); - stringlist_append_ref(option_list, LSF_BJOBS_CMD); - stringlist_append_ref(option_list, LSF_BKILL_CMD); -} - - - -/*****************************************************************/ - -/* - Observe that this driver IS not properly initialized when returning - from this function, the option interface must be used to set the - keys: -*/ - -void lsf_driver_set_bjobs_refresh_interval( lsf_driver_type * driver , int refresh_interval) { - driver->bjobs_refresh_interval = refresh_interval; -} - - -static void lsf_driver_lib_init( lsf_driver_type * lsf_driver ) { -#ifdef HAVE_LSF_LIBRARY - memset(&lsf_driver->lsf_request , 0 , sizeof (lsf_driver->lsf_request)); - lsf_driver->lsf_request.beginTime = 0; - lsf_driver->lsf_request.termTime = 0; - lsf_driver->lsf_request.numProcessors = 1; - lsf_driver->lsf_request.maxNumProcessors = 1; - { - int i; - for (i=0; i < LSF_RLIM_NLIMITS; i++) - lsf_driver->lsf_request.rLimits[i] = DEFAULT_RLIMIT; - } - lsf_driver->lsf_request.options2 = 0; - - lsf_driver->lsb = lsb_alloc(); - if (lsb_ready(lsf_driver->lsb)) - lsb_initialize(lsf_driver->lsb); - else { - lsb_free( lsf_driver->lsb ); - lsf_driver->lsb = NULL; - } -#endif -} - - - -static void lsf_driver_shell_init( lsf_driver_type * lsf_driver ) { - lsf_driver->last_bjobs_update = time( NULL ); - lsf_driver->bjobs_cache = hash_alloc(); - lsf_driver->my_jobs = hash_alloc(); - lsf_driver->status_map = hash_alloc(); - lsf_driver->bsub_cmd = NULL; - lsf_driver->bjobs_cmd = NULL; - lsf_driver->bkill_cmd = NULL; - - - hash_insert_int(lsf_driver->status_map , "PEND" , JOB_STAT_PEND); - hash_insert_int(lsf_driver->status_map , "SSUSP" , JOB_STAT_SSUSP); - hash_insert_int(lsf_driver->status_map , "PSUSP" , JOB_STAT_PSUSP); - hash_insert_int(lsf_driver->status_map , "USUSP" , JOB_STAT_USUSP); - hash_insert_int(lsf_driver->status_map , "RUN" , JOB_STAT_RUN); - hash_insert_int(lsf_driver->status_map , "EXIT" , JOB_STAT_EXIT); - hash_insert_int(lsf_driver->status_map , "ZOMBI" , JOB_STAT_EXIT); /* The ZOMBI status does not seem to be available from the api. */ - hash_insert_int(lsf_driver->status_map , "DONE" , JOB_STAT_DONE); - hash_insert_int(lsf_driver->status_map , "PDONE" , JOB_STAT_PDONE); /* Post-processor is done. */ - hash_insert_int(lsf_driver->status_map , "UNKWN" , JOB_STAT_UNKWN); /* Uncertain about this one */ - pthread_mutex_init( &lsf_driver->bjobs_mutex , NULL ); -} - - - -void * lsf_driver_alloc( ) { - lsf_driver_type * lsf_driver = util_malloc(sizeof * lsf_driver ); - UTIL_TYPE_ID_INIT( lsf_driver , LSF_DRIVER_TYPE_ID); - lsf_driver->submit_method = LSF_SUBMIT_INVALID; - lsf_driver->login_shell = NULL; - lsf_driver->queue_name = NULL; - lsf_driver->remote_lsf_server = NULL; - lsf_driver->rsh_cmd = NULL; - lsf_driver->resource_request = NULL; - lsf_driver->error_count = 0; - lsf_driver->max_error_count = MAX_ERROR_COUNT; - lsf_driver->submit_error_sleep = SUBMIT_ERROR_SLEEP * 1000000; - lsf_driver->exclude_hosts = stringlist_alloc_new(); - lsf_driver_set_bjobs_refresh_interval( lsf_driver , BJOBS_REFRESH_TIME ); - pthread_mutex_init( &lsf_driver->submit_lock , NULL ); - - lsf_driver_lib_init( lsf_driver ); - lsf_driver_shell_init( lsf_driver ); - - lsf_driver_set_option( lsf_driver , LSF_SERVER , NULL ); - lsf_driver_set_option( lsf_driver , LSF_RSH_CMD , DEFAULT_RSH_CMD ); - lsf_driver_set_option( lsf_driver , LSF_BSUB_CMD , DEFAULT_BSUB_CMD ); - lsf_driver_set_option( lsf_driver , LSF_BJOBS_CMD , DEFAULT_BJOBS_CMD ); - lsf_driver_set_option( lsf_driver , LSF_BKILL_CMD , DEFAULT_BKILL_CMD ); - lsf_driver_set_option( lsf_driver , LSF_DEBUG_OUTPUT , "FALSE"); - lsf_driver_set_option( lsf_driver , LSF_SUBMIT_SLEEP , DEFAULT_SUBMIT_SLEEP); - return lsf_driver; -} - - -/*****************************************************************/ - diff --git a/ThirdParty/Ert/libjob_queue/src/queue_driver.c b/ThirdParty/Ert/libjob_queue/src/queue_driver.c deleted file mode 100644 index e171ba5bb0..0000000000 --- a/ThirdParty/Ert/libjob_queue/src/queue_driver.c +++ /dev/null @@ -1,390 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'queue_driver.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. - */ - -#include -#include - -#include - -#include -#include -#include -#include -#include - - -/** - This file implements the datatype queue_driver_type which is an - abstract datatype for communicating with a subsystem for - communcating with other low-level systems for running external - jobs. The job_queue instance, which will handle a queue of jobs, - interacts with the jobs through a queue_driver instance. - - The queue_driver type is a quite small datastructure which "wraps" - and underlying specific driver instance; examples of specific - driver instances are the lsf_driver which communicates with the LSF - system and the local_driver which runs jobs directly on the current - workstation. The queue_driver type contains essentially three - different types of fields: - - 1. Functions pointers for manipulating the jobs, and the state of - the low-level driver. - - 2. An opaque (i.e. void *) pointer to the state of the low level - driver. This will be passed as first argument to all the - function pointers, e.g. like the "self" in Python methods. - - 3. Some data fields which are common to all driver types. - - */ - -#define QUEUE_DRIVER_ID 86516032 - -struct queue_driver_struct { - UTIL_TYPE_ID_DECLARATION; - /* - Function pointers - pointing to low level functions in the implementations of - e.g. lsf_driver. - */ - submit_job_ftype * submit; - free_job_ftype * free_job; - kill_job_ftype * kill_job; - blacklist_node_ftype * blacklist_node; - get_status_ftype * get_status; - free_queue_driver_ftype * free_driver; - set_option_ftype * set_option; - get_option_ftype * get_option; - has_option_ftype * has_option; - init_option_list_ftype * init_options; - - void * data; /* Driver specific data - passed as first argument to the driver functions above. */ - - /* - Generic data - common to all driver types. - */ - char * name; /* String name of driver. */ - job_driver_type driver_type; /* Enum value for driver. */ - char * max_running_string; - int max_running; /* Possible to maintain different max_running values for different - drivers; the value 0 is interpreted as no limit - i.e. the queue layer - will (try) to send an unlimited number of jobs to the driver. */ - -}; - - - -/*****************************************************************/ - - -/*****************************************************************/ - -void queue_driver_set_max_running(queue_driver_type * driver, int max_running) { - driver->max_running_string = util_realloc_sprintf(driver->max_running_string,"%d", max_running); - driver->max_running = max_running; -} - -int queue_driver_get_max_running(const queue_driver_type * driver) { - return driver->max_running; -} - -const char * queue_driver_get_name(const queue_driver_type * driver) { - return driver->name; -} - - -static bool queue_driver_set_generic_option__(queue_driver_type * driver, const char * option_key, const void * value) { - bool option_set = true; - { - if (strcmp(MAX_RUNNING, option_key) == 0) { - int max_running_int = 0; - if (util_sscanf_int(value, &max_running_int)) { - queue_driver_set_max_running(driver, max_running_int); - option_set = true; - } - else - option_set = false; - } else - option_set = false; - } - return option_set; -} - -static void * queue_driver_get_generic_option__(queue_driver_type * driver, const char * option_key) { - if (strcmp(MAX_RUNNING, option_key) == 0) { - return driver->max_running_string; - } else { - util_abort("%s: driver:%s does not support generic option %s\n", __func__, driver->name, option_key); - return NULL; - } -} - -static bool queue_driver_has_generic_option__(queue_driver_type * driver, const char * option_key) { - if (strcmp(MAX_RUNNING, option_key) == 0) - return true; - else - return false; -} - -/** - Set option - can also be used to perform actions - not only setting - of parameters. There is no limit :-) - */ -bool queue_driver_set_option(queue_driver_type * driver, const char * option_key, const void * value) { - if (queue_driver_set_generic_option__(driver, option_key, value)) { - return true; - } else if (driver->set_option != NULL) - /* The actual low level set functions can not fail! */ - return driver->set_option(driver->data, option_key, value); - else { - util_abort("%s: driver:%s does not support run time setting of options\n", __func__, driver->name); - return false; - } - return false; -} - - -/** - Observe that after the driver instance has been allocated it does - NOT support modification of the common fields, only the data owned - by the specific low level driver, i.e. the LSF data, can be - modified runtime. - - The driver returned from the queue_driver_alloc_empty() function is - NOT properly initialized and NOT ready for use. - */ - -static queue_driver_type * queue_driver_alloc_empty() { - queue_driver_type * driver = util_malloc(sizeof * driver); - UTIL_TYPE_ID_INIT(driver, QUEUE_DRIVER_ID); - driver->driver_type = NULL_DRIVER; - driver->submit = NULL; - driver->get_status = NULL; - driver->kill_job = NULL; - driver->free_job = NULL; - driver->free_driver = NULL; - driver->get_option = NULL; - driver->set_option = NULL; - driver->has_option = NULL; - driver->name = NULL; - driver->data = NULL; - driver->max_running_string = NULL; - driver->init_options = NULL; - - queue_driver_set_generic_option__(driver, MAX_RUNNING, "0"); - - return driver; -} - -static UTIL_SAFE_CAST_FUNCTION(queue_driver, QUEUE_DRIVER_ID) - - -/** - The driver created in this function has all the function pointers - correctly initialized; but no options have been set. I.e. unless - the driver in question needs no options (e.g. the LOCAL driver) the - returned driver will NOT be ready for use. - */ - - -queue_driver_type * queue_driver_alloc(job_driver_type type) { - queue_driver_type * driver = queue_driver_alloc_empty(); - driver->driver_type = type; - switch (type) { - case LSF_DRIVER: - driver->submit = lsf_driver_submit_job; - driver->get_status = lsf_driver_get_job_status; - driver->blacklist_node = lsf_driver_blacklist_node; - driver->kill_job = lsf_driver_kill_job; - driver->free_job = lsf_driver_free_job; - driver->free_driver = lsf_driver_free__; - driver->set_option = lsf_driver_set_option; - driver->get_option = lsf_driver_get_option; - driver->has_option = lsf_driver_has_option; - driver->name = util_alloc_string_copy("LSF"); - driver->init_options = lsf_driver_init_option_list; - driver->data = lsf_driver_alloc(); - break; - case LOCAL_DRIVER: - driver->submit = local_driver_submit_job; - driver->get_status = local_driver_get_job_status; - driver->blacklist_node = NULL; - driver->kill_job = local_driver_kill_job; - driver->free_job = local_driver_free_job; - driver->free_driver = local_driver_free__; - driver->name = util_alloc_string_copy("local"); - driver->init_options = local_driver_init_option_list; - driver->data = local_driver_alloc(); - break; - case RSH_DRIVER: - driver->submit = rsh_driver_submit_job; - driver->get_status = rsh_driver_get_job_status; - driver->blacklist_node = NULL; - driver->kill_job = rsh_driver_kill_job; - driver->free_job = rsh_driver_free_job; - driver->free_driver = rsh_driver_free__; - driver->set_option = rsh_driver_set_option; - driver->get_option = rsh_driver_get_option; - driver->name = util_alloc_string_copy("RSH"); - driver->init_options = rsh_driver_init_option_list; - driver->data = rsh_driver_alloc(); - break; - case TORQUE_DRIVER: - driver->submit = torque_driver_submit_job; - driver->get_status = torque_driver_get_job_status; - driver->blacklist_node = NULL; - driver->kill_job = torque_driver_kill_job; - driver->free_job = torque_driver_free_job; - driver->free_driver = torque_driver_free__; - driver->set_option = torque_driver_set_option; - driver->get_option = torque_driver_get_option; - driver->name = util_alloc_string_copy("TORQUE"); - driver->init_options = torque_driver_init_option_list; - driver->data = torque_driver_alloc(); - break; - default: - util_abort("%s: unrecognized driver type:%d \n", __func__, type); - } - - queue_driver_set_generic_option__(driver, MAX_RUNNING, "0"); - return driver; -} - - -/*****************************************************************/ - -bool queue_driver_has_option(queue_driver_type * driver, const char * option_key) { - if (driver->has_option != NULL) - return driver->has_option(driver, option_key); - else - return false; -} - -/*****************************************************************/ - -const void * queue_driver_get_option(queue_driver_type * driver, const char * option_key) { - if (queue_driver_has_generic_option__(driver, option_key)) { - return queue_driver_get_generic_option__(driver, option_key); - } else if (driver->get_option != NULL) - /* The actual low level set functions can not fail! */ - return driver->get_option(driver->data, option_key); - else { - util_abort("%s: driver:%s does not support run time reading of options\n", __func__, driver->name); - return NULL; - } - return NULL; -} - -/*****************************************************************/ - -void queue_driver_init_option_list(queue_driver_type * driver, stringlist_type * option_list) { - //Add options common for all driver types - stringlist_append_ref(option_list, MAX_RUNNING); - - //Add options for the specific driver type - if (driver->init_options) - driver->init_options(option_list); - else - util_abort("%s: driver:%s does not support run time reading of options\n", __func__, driver->name); - } - - -queue_driver_type * queue_driver_alloc_LSF(const char * queue_name, const char * resource_request, const char * remote_lsf_server) { - queue_driver_type * driver = queue_driver_alloc(LSF_DRIVER); - - queue_driver_set_option(driver, LSF_QUEUE, queue_name); - queue_driver_set_option(driver, LSF_RESOURCE, resource_request); - queue_driver_set_option(driver, LSF_SERVER, remote_lsf_server); - - return driver; -} - -queue_driver_type * queue_driver_alloc_TORQUE() { - queue_driver_type * driver = queue_driver_alloc(TORQUE_DRIVER); - return driver; -} - -queue_driver_type * queue_driver_alloc_RSH(const char * rsh_cmd, const hash_type * rsh_hostlist) { - queue_driver_type * driver = queue_driver_alloc(RSH_DRIVER); - - queue_driver_set_option(driver, RSH_HOSTLIST, rsh_hostlist); - queue_driver_set_option(driver, RSH_CMD, rsh_cmd); - - return driver; -} - -queue_driver_type * queue_driver_alloc_local() { - queue_driver_type * driver = queue_driver_alloc(LOCAL_DRIVER); - - /* No options set for the local driver. */ - - return driver; -} - -/* These are the functions used by the job_queue layer. */ - -void * queue_driver_submit_job(queue_driver_type * driver, const char * run_cmd, int num_cpu, const char * run_path, const char * job_name, int argc, const char ** argv) { - return driver->submit(driver->data, run_cmd, num_cpu, run_path, job_name, argc, argv); -} - -void queue_driver_free_job(queue_driver_type * driver, void * job_data) { - driver->free_job(job_data); -} - -void queue_driver_blacklist_node(queue_driver_type * driver, void * job_data) { - if (driver->driver_type == LSF_DRIVER) - driver->blacklist_node(driver->data, job_data); -} - -void queue_driver_kill_job(queue_driver_type * driver, void * job_data) { - driver->kill_job(driver->data, job_data); -} - -job_status_type queue_driver_get_status(queue_driver_type * driver, void * job_data) { - job_status_type status = driver->get_status(driver->data, job_data); - return status; -} - -void queue_driver_free_driver(queue_driver_type * driver) { - driver->free_driver(driver->data); -} - -/*****************************************************************/ - -void queue_driver_free(queue_driver_type * driver) { - queue_driver_free_driver(driver); - util_safe_free(driver->name); - util_safe_free(driver->max_running_string); - free(driver); -} - -void queue_driver_free__(void * driver) { - queue_driver_type * queue_driver = queue_driver_safe_cast(driver); - queue_driver_free(queue_driver); -} - - -/*****************************************************************/ - -/* Small functions to support enum introspection. */ - -const char * queue_driver_type_enum_iget(int index, int * value) { - - return util_enum_iget(index, JOB_DRIVER_ENUM_SIZE, (const util_enum_element_type []) { - JOB_DRIVER_ENUM_DEFS - }, value); -} diff --git a/ThirdParty/Ert/libjob_queue/src/rsh_driver.c b/ThirdParty/Ert/libjob_queue/src/rsh_driver.c deleted file mode 100644 index 5e6aa9d609..0000000000 --- a/ThirdParty/Ert/libjob_queue/src/rsh_driver.c +++ /dev/null @@ -1,484 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'rsh_driver.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include - - -#include -#include -#include - -#include -#include - - - - - - -struct rsh_job_struct { - UTIL_TYPE_ID_DECLARATION; - bool active; /* Means that it allocated - not really in use */ - job_status_type status; - pthread_t run_thread; - const char * host_name; /* Currently not set */ - char * run_path; -}; - - - -typedef struct { - char * host_name; - int max_running; /* How many can the host handle. */ - int running; /* How many are currently running on the host (goverened by this driver instance that is). */ - pthread_mutex_t host_mutex; -} rsh_host_type; - - - -#define RSH_DRIVER_TYPE_ID 44963256 -#define RSH_JOB_TYPE_ID 63256701 - - -struct rsh_driver_struct { - UTIL_TYPE_ID_DECLARATION; - pthread_mutex_t submit_lock; - pthread_attr_t thread_attr; - char * rsh_command; - int num_hosts; - int last_host_index; - rsh_host_type **host_list; - hash_type *__host_hash; /* Stupid redundancy ... */ -}; - - - -/******************************************************************/ -static UTIL_SAFE_CAST_FUNCTION_CONST( rsh_driver , RSH_DRIVER_TYPE_ID ) -static UTIL_SAFE_CAST_FUNCTION( rsh_driver , RSH_DRIVER_TYPE_ID ) -static UTIL_SAFE_CAST_FUNCTION( rsh_job , RSH_JOB_TYPE_ID ) - - - -/** - If the host is for some reason not available, NULL should be - returned. Will also return NULL if some funny guy tries to allocate - with max_running <= 0. -*/ - -static rsh_host_type * rsh_host_alloc(const char * host_name , int max_running) { - if (max_running > 0) { - struct addrinfo * result; - if (getaddrinfo(host_name , NULL , NULL , &result) == 0) { - rsh_host_type * host = util_malloc(sizeof * host ); - - host->host_name = util_alloc_string_copy(host_name); - host->max_running = max_running; - host->running = 0; - pthread_mutex_init( &host->host_mutex , NULL ); - - freeaddrinfo( result ); - return host; - } else { - fprintf(stderr,"** Warning: could not locate server: %s \n",host_name); - return NULL; - } - } else - return NULL; -} - - - -static void rsh_host_free(rsh_host_type * rsh_host) { - free(rsh_host->host_name); - free(rsh_host); -} - - -static bool rsh_host_available(rsh_host_type * rsh_host) { - bool available; - - pthread_mutex_lock( &rsh_host->host_mutex ); - { - available = false; - if ((rsh_host->max_running - rsh_host->running) > 0) { // The host has free slots() - bool ping_ok = true; -#ifdef ERT_HAVE_PING - ping_ok = util_ping( rsh_host->host_name ); -#endif - if (ping_ok) { // The host answers to ping() - available = true; - rsh_host->running++; - } - } - } - pthread_mutex_unlock( &rsh_host->host_mutex ); - - return available; -} - - - - - -static void rsh_host_submit_job(rsh_host_type * rsh_host , rsh_job_type * job, const char * rsh_cmd , const char * submit_cmd , int num_cpu , int job_argc , const char ** job_argv) { - /* - Observe that this job has already been added to the running jobs - in the rsh_host_available function. - */ - int argc = job_argc + 2; - const char ** argv = util_malloc( argc * sizeof * argv ); - - argv[0] = rsh_host->host_name; - argv[1] = submit_cmd; - { - int iarg; - for (iarg = 0; iarg < job_argc; iarg++) - argv[iarg + 2] = job_argv[iarg]; - } - - util_spawn_blocking(rsh_cmd, argc, argv, NULL, NULL); /* This call is blocking. */ - job->status = JOB_QUEUE_DONE; - - pthread_mutex_lock( &rsh_host->host_mutex ); - rsh_host->running--; - pthread_mutex_unlock( &rsh_host->host_mutex ); - free( argv ); -} - - -/* - static const char * rsh_host_get_hostname(const rsh_host_type * host) { return host->host_name; } -*/ - - - -static void * rsh_host_submit_job__(void * __arg_pack) { - arg_pack_type * arg_pack = arg_pack_safe_cast(__arg_pack); - char * rsh_cmd = arg_pack_iget_ptr(arg_pack , 0); - rsh_host_type * rsh_host = arg_pack_iget_ptr(arg_pack , 1); - char * submit_cmd = arg_pack_iget_ptr(arg_pack , 2); - int num_cpu = arg_pack_iget_int(arg_pack , 3); - int argc = arg_pack_iget_int(arg_pack , 4); - const char ** argv = arg_pack_iget_ptr(arg_pack , 5); - rsh_job_type * job = arg_pack_iget_ptr(arg_pack , 6); - - rsh_host_submit_job(rsh_host , job , rsh_cmd , submit_cmd , num_cpu , argc , argv); - pthread_exit( NULL ); - arg_pack_free( arg_pack ); -} - - - - - -/*****************************************************************/ - - -/*****************************************************************/ - - - - -rsh_job_type * rsh_job_alloc(const char * run_path) { - rsh_job_type * job; - job = util_malloc(sizeof * job ); - job->active = false; - job->status = JOB_QUEUE_WAITING; - job->run_path = util_alloc_string_copy(run_path); - UTIL_TYPE_ID_INIT( job , RSH_JOB_TYPE_ID ); - return job; -} - - - -void rsh_job_free(rsh_job_type * job) { - free(job->run_path); - free(job); -} - - - - -job_status_type rsh_driver_get_job_status(void * __driver , void * __job) { - if (__job == NULL) - /* The job has not been registered at all ... */ - return JOB_QUEUE_NOT_ACTIVE; - else { - rsh_job_type * job = rsh_job_safe_cast( __job ); - { - if (job->active == false) { - util_abort("%s: internal error - should not query status on inactive jobs \n" , __func__); - return JOB_QUEUE_NOT_ACTIVE; /* Dummy to shut up compiler */ - } else - return job->status; - } - } -} - - - -void rsh_driver_free_job( void * __job ) { - rsh_job_type * job = rsh_job_safe_cast( __job ); - rsh_job_free(job); -} - - - -void rsh_driver_kill_job(void * __driver ,void * __job) { - rsh_job_type * job = rsh_job_safe_cast( __job ); - if (job->active) - pthread_cancel( job->run_thread ); - rsh_job_free( job ); -} - - - -void * rsh_driver_submit_job(void * __driver, - const char * submit_cmd , - int num_cpu , /* Ignored */ - const char * run_path , - const char * job_name , - int argc, - const char ** argv ) { - - rsh_driver_type * driver = rsh_driver_safe_cast( __driver ); - rsh_job_type * job = NULL; - { - /* - command is freed in the start_routine() function - */ - pthread_mutex_lock( &driver->submit_lock ); - { - rsh_host_type * host = NULL; - int ihost; - int host_index = 0; - - if (driver->num_hosts == 0) - util_abort("%s: fatal error - no hosts added to the rsh driver.\n",__func__); - - for (ihost = 0; ihost < driver->num_hosts; ihost++) { - host_index = (ihost + driver->last_host_index) % driver->num_hosts; - if (rsh_host_available(driver->host_list[host_index])) { - host = driver->host_list[host_index]; - break; - } - } - driver->last_host_index = (host_index + 1) % driver->num_hosts; - - if (host != NULL) { - /* A host is available */ - arg_pack_type * arg_pack = arg_pack_alloc(); /* The arg_pack is freed() in the rsh_host_submit_job__() function. - freeing it here is dangerous, because we might free it before the - thread-called function is finished with it. */ - - job = rsh_job_alloc(run_path); - - arg_pack_append_ptr(arg_pack , driver->rsh_command); - arg_pack_append_ptr(arg_pack , host); - arg_pack_append_ptr(arg_pack , (char *) submit_cmd); - arg_pack_append_int(arg_pack , num_cpu ); - arg_pack_append_int(arg_pack , argc ); - arg_pack_append_ptr(arg_pack , argv ); - arg_pack_append_ptr(arg_pack , job); - - { - int pthread_return_value = pthread_create( &job->run_thread , &driver->thread_attr , rsh_host_submit_job__ , arg_pack); - if (pthread_return_value != 0) - util_abort("%s failed to create thread ERROR:%d \n", __func__ , pthread_return_value); - } - job->status = JOB_QUEUE_RUNNING; - job->active = true; - } - } - pthread_mutex_unlock( &driver->submit_lock ); - } - return job; -} - - -void rsh_driver_clear_host_list( rsh_driver_type * driver ) { - int ihost; - for (ihost =0; ihost < driver->num_hosts; ihost++) - rsh_host_free(driver->host_list[ihost]); - util_safe_free(driver->host_list); - - driver->num_hosts = 0; - driver->host_list = NULL; - driver->last_host_index = 0; -} - - -void rsh_driver_free(rsh_driver_type * driver) { - rsh_driver_clear_host_list( driver ); - pthread_attr_destroy ( &driver->thread_attr ); - util_safe_free(driver->rsh_command ); - hash_free( driver->__host_hash ); - free(driver); - driver = NULL; -} - - -void rsh_driver_free__(void * __driver) { - rsh_driver_type * driver = rsh_driver_safe_cast( __driver ); - rsh_driver_free( driver ); -} - - -void rsh_driver_set_host_list( rsh_driver_type * rsh_driver , const hash_type * rsh_host_list) { - rsh_driver_clear_host_list( rsh_driver ); - if (rsh_host_list != NULL) { - hash_iter_type * hash_iter = hash_iter_alloc( rsh_host_list ); - while (!hash_iter_is_complete( hash_iter )) { - const char * host = hash_iter_get_next_key( hash_iter ); - int max_running = hash_get_int( rsh_host_list , host ); - rsh_driver_add_host(rsh_driver , host , max_running); - } - if (rsh_driver->num_hosts == 0) - util_abort("%s: failed to add any valid RSH hosts - aborting.\n",__func__); - } -} - - - - -/** - -*/ - -void * rsh_driver_alloc( ) { - rsh_driver_type * rsh_driver = util_malloc( sizeof * rsh_driver ); - UTIL_TYPE_ID_INIT( rsh_driver , RSH_DRIVER_TYPE_ID ); - pthread_mutex_init( &rsh_driver->submit_lock , NULL ); - pthread_attr_init( &rsh_driver->thread_attr ); - pthread_attr_setdetachstate( &rsh_driver->thread_attr , PTHREAD_CREATE_DETACHED ); - - /** - To simplify the Python wrapper it is possible to pass in NULL as - rsh_host_list pointer, and then subsequently add hosts with - rsh_driver_add_host(). - */ - rsh_driver->num_hosts = 0; - rsh_driver->host_list = NULL; - rsh_driver->last_host_index = 0; - rsh_driver->rsh_command = NULL; - rsh_driver->__host_hash = hash_alloc(); - return rsh_driver; -} - - - -void rsh_driver_add_host(rsh_driver_type * rsh_driver , const char * hostname , int host_max_running) { - rsh_host_type * new_host = rsh_host_alloc(hostname , host_max_running); /* Could in principle update an existing node if the host name is old. */ - if (new_host != NULL) { - rsh_driver->num_hosts++; - rsh_driver->host_list = util_realloc(rsh_driver->host_list , rsh_driver->num_hosts * sizeof * rsh_driver->host_list ); - rsh_driver->host_list[(rsh_driver->num_hosts - 1)] = new_host; - } -} - - -/** - Hostname should be a string as host:max_running, the ":max_running" - part is optional, and will default to 1. -*/ - -void rsh_driver_add_host_from_string(rsh_driver_type * rsh_driver , const char * hostname) { - int host_max_running; - char ** tmp; - char * host; - int tokens; - - util_split_string( hostname , ":" , &tokens , &tmp); - if (tokens > 1) { - if (!util_sscanf_int( tmp[tokens - 1] , &host_max_running)) - util_abort("%s: failed to parse out integer from: %s \n",__func__ , hostname); - host = util_alloc_joined_string((const char **) tmp , tokens - 1 , ":"); - } else - host = util_alloc_string_copy( tmp[0] ); - rsh_driver_add_host( rsh_driver , host , host_max_running ); - - util_free_stringlist( tmp , tokens ); - free( host ); -} - - - - -bool rsh_driver_set_option( void * __driver , const char * option_key , const void * value ) { - rsh_driver_type * driver = rsh_driver_safe_cast( __driver ); - bool has_option = true; - { - if (strcmp(RSH_HOST , option_key) == 0) /* Add one host - value should be hostname:max */ - rsh_driver_add_host_from_string( driver , value ); - else if (strcmp(RSH_HOSTLIST , option_key) == 0) { /* Set full host list - value should be hash of integers. */ - if (value != NULL) { - const hash_type * hash_value = hash_safe_cast_const( value ); - rsh_driver_set_host_list( driver , hash_value ); - } - } else if (strcmp( RSH_CLEAR_HOSTLIST , option_key) == 0) - /* Value is not considered - this is an action, and not a _set operation. */ - rsh_driver_set_host_list( driver , NULL ); - else if (strcmp( RSH_CMD , option_key) == 0) - driver->rsh_command = util_realloc_string_copy( driver->rsh_command , value ); - else - has_option = false; - } - return has_option; -} - - -const void * rsh_driver_get_option( const void * __driver , const char * option_key ) { - const rsh_driver_type * driver = rsh_driver_safe_cast_const( __driver ); - { - if (strcmp( RSH_CMD , option_key ) == 0) - return driver->rsh_command; - else if (strcmp( RSH_HOSTLIST , option_key) == 0) { - int ihost; - hash_clear( driver->__host_hash ); - for (ihost = 0; ihost < driver->num_hosts; ihost++) { - rsh_host_type * host = driver->host_list[ ihost ]; - hash_insert_int( driver->__host_hash , host->host_name , host->max_running); - } - return driver->__host_hash; - } else { - util_abort("%s: get not implemented fro option_id:%s for rsh \n",__func__ , option_key ); - return NULL; - } - } -} - - -void rsh_driver_init_option_list(stringlist_type * option_list) { - stringlist_append_ref(option_list, RSH_HOST); - stringlist_append_ref(option_list, RSH_HOSTLIST); - stringlist_append_ref(option_list, RSH_CMD); - stringlist_append_ref(option_list, RSH_CLEAR_HOSTLIST); -} - -#undef RSH_JOB_ID - -/*****************************************************************/ - diff --git a/ThirdParty/Ert/libjob_queue/src/torque_driver.c b/ThirdParty/Ert/libjob_queue/src/torque_driver.c deleted file mode 100644 index d3ccc15438..0000000000 --- a/ThirdParty/Ert/libjob_queue/src/torque_driver.c +++ /dev/null @@ -1,519 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'torque_driver.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. - */ -#include -#include -#include - -#include -#include - -#include - - -#define TORQUE_DRIVER_TYPE_ID 34873653 -#define TORQUE_JOB_TYPE_ID 12312312 - - -struct torque_driver_struct { - UTIL_TYPE_ID_DECLARATION; - char * queue_name; - char * qsub_cmd; - char * qstat_cmd; - char * qdel_cmd; - char * num_cpus_per_node_char; - char * job_prefix; - char * num_nodes_char; - bool keep_qsub_output; - int num_cpus_per_node; - int num_nodes; - char * cluster_label; - int submit_sleep; - FILE * debug_stream; -}; - -struct torque_job_struct { - UTIL_TYPE_ID_DECLARATION; - long int torque_jobnr; - char * torque_jobnr_char; -}; - -UTIL_SAFE_CAST_FUNCTION(torque_driver, TORQUE_DRIVER_TYPE_ID); - -static UTIL_SAFE_CAST_FUNCTION_CONST(torque_driver, TORQUE_DRIVER_TYPE_ID) -static UTIL_SAFE_CAST_FUNCTION(torque_job, TORQUE_JOB_TYPE_ID) - -void * torque_driver_alloc() { - torque_driver_type * torque_driver = util_malloc(sizeof * torque_driver); - UTIL_TYPE_ID_INIT(torque_driver, TORQUE_DRIVER_TYPE_ID); - - torque_driver->queue_name = NULL; - torque_driver->qsub_cmd = NULL; - torque_driver->qstat_cmd = NULL; - torque_driver->qdel_cmd = NULL; - torque_driver->num_cpus_per_node_char = NULL; - torque_driver->num_nodes_char = NULL; - torque_driver->keep_qsub_output = false; - torque_driver->num_cpus_per_node = 1; - torque_driver->num_nodes = 1; - torque_driver->cluster_label = NULL; - torque_driver->job_prefix = NULL; - torque_driver->debug_stream = NULL; - - torque_driver_set_option(torque_driver, TORQUE_QSUB_CMD, TORQUE_DEFAULT_QSUB_CMD); - torque_driver_set_option(torque_driver, TORQUE_QSTAT_CMD, TORQUE_DEFAULT_QSTAT_CMD); - torque_driver_set_option(torque_driver, TORQUE_QDEL_CMD, TORQUE_DEFAULT_QDEL_CMD); - torque_driver_set_option(torque_driver, TORQUE_NUM_CPUS_PER_NODE, "1"); - torque_driver_set_option(torque_driver, TORQUE_NUM_NODES, "1"); - torque_driver_set_option(torque_driver, TORQUE_SUBMIT_SLEEP, TORQUE_DEFAULT_SUBMIT_SLEEP); - - return torque_driver; -} - -static void torque_driver_set_debug_output(torque_driver_type * driver, const char * debug_file) { - if (driver->debug_stream) - fclose( driver->debug_stream ); - - if (debug_file) - driver->debug_stream = util_mkdir_fopen( debug_file , "w"); - else - driver->debug_stream = NULL; -} - - -static void torque_driver_set_qsub_cmd(torque_driver_type * driver, const char * qsub_cmd) { - driver->qsub_cmd = util_realloc_string_copy(driver->qsub_cmd, qsub_cmd); -} - -static void torque_driver_set_qstat_cmd(torque_driver_type * driver, const char * qstat_cmd) { - driver->qstat_cmd = util_realloc_string_copy(driver->qstat_cmd, qstat_cmd); -} - -static void torque_driver_set_qdel_cmd(torque_driver_type * driver, const char * qdel_cmd) { - driver->qdel_cmd = util_realloc_string_copy(driver->qdel_cmd, qdel_cmd); -} - -static void torque_driver_set_queue_name(torque_driver_type * driver, const char * queue_name) { - driver->queue_name = util_realloc_string_copy(driver->queue_name, queue_name); -} - -static bool torque_driver_set_submit_sleep(torque_driver_type * driver, const char* submit_sleep) { - double seconds_sleep; - if (util_sscanf_double( submit_sleep , &seconds_sleep)) { - driver->submit_sleep = (int) (seconds_sleep * 1000000); - return true; - } else - return false; -} - - -static bool torque_driver_set_num_nodes(torque_driver_type * driver, const char* num_nodes_char) { - int num_nodes = 0; - if (util_sscanf_int(num_nodes_char, &num_nodes)) { - driver->num_nodes = num_nodes; - driver->num_nodes_char = util_realloc_string_copy(driver->num_nodes_char, num_nodes_char); - return true; - } else { - return false; - } -} - -static bool torque_driver_set_keep_qsub_output(torque_driver_type * driver, const char* keep_output_bool_as_char) { - bool keep_output_parsed; - - if (util_sscanf_bool(keep_output_bool_as_char, &keep_output_parsed)) { - driver->keep_qsub_output = keep_output_parsed; - return true; - } else { - return false; - } -} - -static void torque_driver_set_job_prefix(torque_driver_type * driver, const char * job_prefix){ - driver->job_prefix = util_realloc_string_copy( driver->job_prefix , job_prefix); -} - -static void torque_driver_set_cluster_label(torque_driver_type * driver, const char* cluster_label) { - driver->cluster_label = util_realloc_string_copy(driver->cluster_label, cluster_label); -} - -static bool torque_driver_set_num_cpus_per_node(torque_driver_type * driver, const char* num_cpus_per_node_char) { - int num_cpus_per_node = 0; - if (util_sscanf_int(num_cpus_per_node_char, &num_cpus_per_node)) { - driver->num_cpus_per_node = num_cpus_per_node; - driver->num_cpus_per_node_char = util_realloc_string_copy(driver->num_cpus_per_node_char, num_cpus_per_node_char); - return true; - } else { - return false; - } -} - -bool torque_driver_set_option(void * __driver, const char * option_key, const void * value) { - torque_driver_type * driver = torque_driver_safe_cast(__driver); - bool option_set = true; - { - if (strcmp(TORQUE_QSUB_CMD, option_key) == 0) - torque_driver_set_qsub_cmd(driver, value); - else if (strcmp(TORQUE_QSTAT_CMD, option_key) == 0) - torque_driver_set_qstat_cmd(driver, value); - else if (strcmp(TORQUE_QDEL_CMD, option_key) == 0) - torque_driver_set_qdel_cmd(driver, value); - else if (strcmp(TORQUE_QUEUE, option_key) == 0) - torque_driver_set_queue_name(driver, value); - else if (strcmp(TORQUE_NUM_CPUS_PER_NODE, option_key) == 0) - option_set = torque_driver_set_num_cpus_per_node(driver, value); - else if (strcmp(TORQUE_NUM_NODES, option_key) == 0) - option_set = torque_driver_set_num_nodes(driver, value); - else if (strcmp(TORQUE_KEEP_QSUB_OUTPUT, option_key) == 0) - option_set = torque_driver_set_keep_qsub_output(driver, value); - else if (strcmp(TORQUE_CLUSTER_LABEL, option_key) == 0) - torque_driver_set_cluster_label(driver, value); - else if (strcmp(TORQUE_JOB_PREFIX_KEY, option_key) == 0) - torque_driver_set_job_prefix(driver, value); - else if (strcmp(TORQUE_DEBUG_OUTPUT, option_key) == 0) - torque_driver_set_debug_output(driver, value); - else if (strcmp(TORQUE_SUBMIT_SLEEP, option_key) == 0) - option_set = torque_driver_set_submit_sleep(driver, value); - else - option_set = false; - } - return option_set; -} - -const void * torque_driver_get_option(const void * __driver, const char * option_key) { - const torque_driver_type * driver = torque_driver_safe_cast_const(__driver); - { - if (strcmp(TORQUE_QSUB_CMD, option_key) == 0) - return driver->qsub_cmd; - else if (strcmp(TORQUE_QSTAT_CMD, option_key) == 0) - return driver->qstat_cmd; - else if (strcmp(TORQUE_QDEL_CMD, option_key) == 0) - return driver->qdel_cmd; - else if (strcmp(TORQUE_QUEUE, option_key) == 0) - return driver->queue_name; - else if (strcmp(TORQUE_NUM_CPUS_PER_NODE, option_key) == 0) - return driver->num_cpus_per_node_char; - else if (strcmp(TORQUE_NUM_NODES, option_key) == 0) - return driver->num_nodes_char; - else if (strcmp(TORQUE_KEEP_QSUB_OUTPUT, option_key) == 0) - return driver->keep_qsub_output ? "1" : "0"; - else if (strcmp(TORQUE_CLUSTER_LABEL, option_key) == 0) - return driver->cluster_label; - else if(strcmp(TORQUE_JOB_PREFIX_KEY, option_key) == 0) - return driver->job_prefix; - else { - util_abort("%s: option_id:%s not recognized for TORQUE driver \n", __func__, option_key); - return NULL; - } - } -} - -void torque_driver_init_option_list(stringlist_type * option_list) { - stringlist_append_ref(option_list, TORQUE_QSUB_CMD); - stringlist_append_ref(option_list, TORQUE_QSTAT_CMD); - stringlist_append_ref(option_list, TORQUE_QDEL_CMD); - stringlist_append_ref(option_list, TORQUE_QUEUE); - stringlist_append_ref(option_list, TORQUE_NUM_CPUS_PER_NODE); - stringlist_append_ref(option_list, TORQUE_NUM_NODES); - stringlist_append_ref(option_list, TORQUE_KEEP_QSUB_OUTPUT); - stringlist_append_ref(option_list, TORQUE_CLUSTER_LABEL); - stringlist_append_ref(option_list, TORQUE_JOB_PREFIX_KEY); -} - -torque_job_type * torque_job_alloc() { - torque_job_type * job; - job = util_malloc(sizeof * job); - job->torque_jobnr_char = NULL; - job->torque_jobnr = 0; - UTIL_TYPE_ID_INIT(job, TORQUE_JOB_TYPE_ID); - - return job; -} - -stringlist_type * torque_driver_alloc_cmd(torque_driver_type * driver, - const char * job_name, - const char * submit_script) { - - - stringlist_type * argv = stringlist_alloc_new(); - - if (driver->keep_qsub_output) { - stringlist_append_ref(argv, "-k"); - stringlist_append_ref(argv, "oe"); - } - - { - char * resource_string; - if (driver->cluster_label) - resource_string = util_alloc_sprintf("nodes=%d:%s:ppn=%d", driver->num_nodes, driver->cluster_label, driver->num_cpus_per_node); - else - resource_string = util_alloc_sprintf("nodes=%d:ppn=%d", driver->num_nodes, driver->num_cpus_per_node); - - stringlist_append_ref(argv, "-l"); - stringlist_append_copy(argv, resource_string); - free(resource_string); - } - - if (driver->queue_name != NULL) { - stringlist_append_ref(argv, "-q"); - stringlist_append_ref(argv, driver->queue_name); - } - - if (job_name != NULL) { - stringlist_append_ref(argv, "-N"); - stringlist_append_ref(argv, job_name); - } - - stringlist_append_ref(argv, submit_script); - - return argv; -} - -static void torque_debug(torque_driver_type * driver , const char * fmt , ...) { - if (driver->debug_stream) { - { - va_list ap; - va_start(ap , fmt); - vfprintf(driver->debug_stream , fmt , ap ); - va_end(ap); - } - fprintf(driver->debug_stream , "\n"); - fsync( fileno(driver->debug_stream) ); - } -} - - -static int torque_job_parse_qsub_stdout(const torque_driver_type * driver, const char * stdout_file) { - int jobid; - { - FILE * stream = util_fopen(stdout_file, "r"); - char * jobid_string = util_fscanf_alloc_upto(stream, ".", false); - - if (jobid_string == NULL || !util_sscanf_int(jobid_string, &jobid)) { - - char * file_content = util_fread_alloc_file_content(stdout_file, NULL); - fprintf(stderr, "Failed to get torque job id from file: %s \n", stdout_file); - fprintf(stderr, "qsub command : %s \n", driver->qsub_cmd); - fprintf(stderr, "File content: [%s]\n", file_content); - free(file_content); - util_exit("%s: \n", __func__); - } - free(jobid_string); - fclose(stream); - } - return jobid; -} - -void torque_job_create_submit_script(const char * script_filename, const char * submit_cmd, int argc, const char ** job_argv) { - if (submit_cmd == NULL) { - util_abort("%s: cannot create submit script, because there is no executing commmand specified.", __func__); - } - - FILE* script_file = util_fopen(script_filename, "w"); - fprintf(script_file, "#!/bin/sh\n"); - - fprintf(script_file, "%s", submit_cmd); - for (int i = 0; i < argc; i++) { - - fprintf(script_file, " %s", job_argv[i]); - } - - util_fclose(script_file); -} - - -static int torque_driver_submit_shell_job(torque_driver_type * driver, - const char * run_path, - const char * job_name, - const char * submit_cmd, - int num_cpu, - int job_argc, - const char ** job_argv) { - - usleep( driver->submit_sleep ); - { - int job_id; - char * tmp_file = util_alloc_tmp_file("/tmp", "enkf-submit", true); - char * script_filename = util_alloc_filename(run_path, "qsub_script", "sh"); - torque_job_create_submit_script(script_filename, submit_cmd, job_argc, job_argv); - { - int p_units_from_driver = driver->num_cpus_per_node * driver->num_nodes; - if (num_cpu > p_units_from_driver) { - util_abort("%s: Error in config, job's config requires %d processing units, but config says %s: %d, and %s: %d, which multiplied becomes: %d \n", - __func__, num_cpu, TORQUE_NUM_CPUS_PER_NODE, driver->num_cpus_per_node, TORQUE_NUM_NODES, driver->num_nodes, p_units_from_driver); - } - { - stringlist_type * remote_argv = torque_driver_alloc_cmd(driver, job_name, script_filename); - char ** argv = stringlist_alloc_char_ref(remote_argv); - util_spawn_blocking(driver->qsub_cmd, stringlist_get_size(remote_argv), (const char **) argv, tmp_file, NULL); - free(argv); - stringlist_free(remote_argv); - } - } - - job_id = torque_job_parse_qsub_stdout(driver, tmp_file); - - util_unlink_existing(tmp_file); - free(tmp_file); - - return job_id; - } -} - -void torque_job_free(torque_job_type * job) { - - util_safe_free(job->torque_jobnr_char); - free(job); -} - -void torque_driver_free_job(void * __job) { - - torque_job_type * job = torque_job_safe_cast(__job); - torque_job_free(job); -} - -void * torque_driver_submit_job(void * __driver, - const char * submit_cmd, - int num_cpu, - const char * run_path, - const char * job_name, - int argc, - const char ** argv) { - torque_driver_type * driver = torque_driver_safe_cast(__driver); - torque_job_type * job = torque_job_alloc(); - - torque_debug( driver , "Submitting job in:%s" , run_path); - { - char * local_job_name = NULL; - if (driver->job_prefix) - local_job_name = util_alloc_sprintf("%s%s",driver->job_prefix, job_name); - else - local_job_name = util_alloc_string_copy( job_name ); - - job->torque_jobnr = torque_driver_submit_shell_job(driver, run_path, local_job_name, submit_cmd, num_cpu, argc, argv); - job->torque_jobnr_char = util_alloc_sprintf("%ld", job->torque_jobnr); - - torque_debug( driver , "Job:%s Id:%d" , run_path , job->torque_jobnr); - free(local_job_name); - } - - if (job->torque_jobnr > 0) - return job; - else { - /* - The submit failed - the queue system shall handle - NULL return values. - */ - torque_job_free(job); - return NULL; - } -} - -static char* torque_driver_get_qstat_status(torque_driver_type * driver, char * jobnr_char) { - char * status = util_malloc(sizeof (char)*2); - char * tmp_file = util_alloc_tmp_file("/tmp", "enkf-qstat", true); - - { - char ** argv = util_calloc(1, sizeof * argv); - argv[0] = jobnr_char; - - util_spawn_blocking(driver->qstat_cmd, 1, (const char **) argv, tmp_file, NULL); - free(argv); - } - - FILE *stream = util_fopen(tmp_file, "r"); - bool at_eof = false; - util_fskip_lines(stream, 2); - char * line = util_fscanf_alloc_line(stream, &at_eof); - fclose(stream); - - if (line != NULL) { - char job_id_full_string[32]; - if (sscanf(line, "%s %*s %*s %*s %s %*s", job_id_full_string, status) == 2) { - char *dotPtr = strchr(job_id_full_string, '.'); - int dotPosition = dotPtr - job_id_full_string; - char* job_id_as_char_ptr = util_alloc_substring_copy(job_id_full_string, 0, dotPosition); - if (strcmp(job_id_as_char_ptr, jobnr_char) != 0) { - util_abort("%s: Job id input (%d) does not match the one found by qstat (%d)\n", __func__, jobnr_char, job_id_as_char_ptr); - } - free(job_id_as_char_ptr); - } - free(line); - } else { - util_abort("%s: Unable to read qstat's output line number 3 from file: %s", __func__, tmp_file); - } - - util_unlink_existing(tmp_file); - free(tmp_file); - - return status; -} - -job_status_type torque_driver_get_job_status(void * __driver, void * __job) { - torque_driver_type * driver = torque_driver_safe_cast(__driver); - torque_job_type * job = torque_job_safe_cast(__job); - char * status = torque_driver_get_qstat_status(driver, job->torque_jobnr_char); - int result = JOB_QUEUE_FAILED; - if (strcmp(status, "R") == 0) { - result = JOB_QUEUE_RUNNING; - } else if (strcmp(status, "E") == 0) { - result = JOB_QUEUE_DONE; - } else if (strcmp(status, "C") == 0) { - result = JOB_QUEUE_DONE; - } else if (strcmp(status, "Q") == 0) { - result = JOB_QUEUE_PENDING; - } else { - util_abort("%s: Unknown status found (%s), expecting one of R, E, C and Q.\n", __func__, status); - } - free(status); - - return result; -} - -void torque_driver_kill_job(void * __driver, void * __job) { - - torque_driver_type * driver = torque_driver_safe_cast(__driver); - torque_job_type * job = torque_job_safe_cast(__job); - util_spawn_blocking(driver->qdel_cmd, 1, (const char **) &job->torque_jobnr_char, NULL, NULL); -} - -void torque_driver_free(torque_driver_type * driver) { - torque_driver_set_debug_output(driver, NULL); - util_safe_free(driver->queue_name); - free(driver->qdel_cmd); - free(driver->qstat_cmd); - free(driver->qsub_cmd); - free(driver->num_cpus_per_node_char); - free(driver->num_nodes_char); - if (driver->job_prefix) - free(driver->job_prefix); - - free(driver); -} - -void torque_driver_free__(void * __driver) { - torque_driver_type * driver = torque_driver_safe_cast(__driver); - torque_driver_free(driver); -} - -int torque_driver_get_submit_sleep( const torque_driver_type * driver ) { - return driver->submit_sleep; -} - -FILE * torque_driver_get_debug_stream( const torque_driver_type * driver ) { - return driver->debug_stream; -} diff --git a/ThirdParty/Ert/libjob_queue/src/workflow.c b/ThirdParty/Ert/libjob_queue/src/workflow.c deleted file mode 100644 index c0c132ed81..0000000000 --- a/ThirdParty/Ert/libjob_queue/src/workflow.c +++ /dev/null @@ -1,265 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'workflow.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#define CMD_TYPE_ID 66153 -#define WORKFLOW_TYPE_ID 6762081 -#define WORKFLOW_COMMENT_STRING "--" -#define WORKFLOW_INCLUDE "INCLUDE" - -typedef struct cmd_struct cmd_type; - -struct cmd_struct { - UTIL_TYPE_ID_DECLARATION; - const workflow_job_type * workflow_job; - stringlist_type * arglist; -}; - - - - -struct workflow_struct { - UTIL_TYPE_ID_DECLARATION; - time_t compile_time; - bool compiled; - char * src_file; - vector_type * cmd_list; - workflow_joblist_type * joblist; - config_error_type * last_error; - vector_type * stack; -}; - -/*****************************************************************/ - - -static cmd_type * cmd_alloc( const workflow_job_type * workflow_job , const stringlist_type * arglist) { - cmd_type * cmd = util_malloc( sizeof * cmd ); - UTIL_TYPE_ID_INIT(cmd , CMD_TYPE_ID ); - cmd->workflow_job = workflow_job; - cmd->arglist = stringlist_alloc_deep_copy( arglist ); - return cmd; -} - -static UTIL_SAFE_CAST_FUNCTION( cmd , CMD_TYPE_ID ); - -static void cmd_free( cmd_type * cmd ){ - stringlist_free( cmd->arglist ); - free( cmd ); -} - -static void cmd_free__( void * arg ) { - cmd_type * cmd = cmd_safe_cast( arg ); - cmd_free( cmd ); -} - -/*****************************************************************/ - -static void workflow_add_cmd( workflow_type * workflow , cmd_type * cmd ) { - vector_append_owned_ref( workflow->cmd_list , cmd , cmd_free__ ); -} - - -static void workflow_clear( workflow_type * workflow ) { - vector_clear( workflow->cmd_list ); -} - -static void workflow_store_error( workflow_type * workflow , const config_error_type * error) { - if (workflow->last_error) - config_error_free( workflow->last_error ); - - if (error) - workflow->last_error = config_error_alloc_copy( error ); - else - workflow->last_error = NULL; -} - - - - -bool workflow_try_compile( workflow_type * script , const subst_list_type * context) { - if (util_file_exists( script->src_file )) { - const char * src_file = script->src_file; - char * tmp_file = NULL; - bool update = false; - if (context != NULL) { - tmp_file = util_alloc_tmp_file("/tmp" , "ert-workflow" , false ); - update = subst_list_filter_file( context , script->src_file , tmp_file ); - if (update) { - script->compiled = false; - src_file = tmp_file; - } else { - remove( tmp_file ); - free( tmp_file ); - tmp_file = NULL; - } - } - - { - time_t src_mtime = util_file_mtime( script->src_file ); - if (script->compiled) { - if (util_difftime_seconds( src_mtime , script->compile_time ) > 0 ) - return true; - else { - // Script has been compiled succesfully, but then changed afterwards. - // We try to recompile; if that fails we are left with 'nothing'. - } - } - } - - { - // Try to compile - config_parser_type * config_compiler = workflow_joblist_get_compiler( script->joblist ); - script->compiled = false; - workflow_clear( script ); - { - config_content_type * content = config_parse( config_compiler , src_file , WORKFLOW_COMMENT_STRING , WORKFLOW_INCLUDE , NULL , NULL , CONFIG_UNRECOGNIZED_ERROR , true ); - - if (config_content_is_valid( content )) { - int cmd_line; - for (cmd_line = 0; cmd_line < config_content_get_size(content); cmd_line++) { - const config_content_node_type * node = config_content_iget_node( content , cmd_line ); - const char * jobname = config_content_node_get_kw( node ); - const workflow_job_type * job = workflow_joblist_get_job( script->joblist , jobname ); - cmd_type * cmd = cmd_alloc( job , config_content_node_get_stringlist( node )); - - workflow_add_cmd( script , cmd ); - } - script->compiled = true; - } else - workflow_store_error( script , config_content_get_errors( content )); - - config_content_free( content ); - } - } - - if (tmp_file != NULL) { - if (script->compiled) - remove( tmp_file ); - free( tmp_file ); - } - } - - // It is legal to remove the script after successfull compilation but - // then the context will not be applied at subsequent invocations. - return script->compiled; -} - - -bool workflow_run(workflow_type * workflow, void * self , bool verbose , const subst_list_type * context) { - vector_clear( workflow->stack ); - workflow_try_compile( workflow , context); - - if (workflow->compiled) { - int icmd; - for (icmd = 0; icmd < vector_get_size( workflow->cmd_list ); icmd++) { - const cmd_type * cmd = vector_iget_const( workflow->cmd_list , icmd ); - void * return_value = workflow_job_run( cmd->workflow_job, self , verbose , cmd->arglist ); - vector_push_front_ref( workflow->stack , return_value ); - } - return true; - } else - return false; -} - -int workflow_get_stack_size( const workflow_type * workflow ) { - return vector_get_size( workflow->stack ); -} - - -void * workflow_iget_stack_ptr( const workflow_type * workflow , int index) { - return vector_iget( workflow->stack , index ); -} - - -void * workflow_pop_stack( workflow_type * workflow ) { - return vector_pop_front( workflow->stack); -} - - - -workflow_type * workflow_alloc( const char * src_file , workflow_joblist_type * joblist) { - workflow_type * script = util_malloc( sizeof * script ); - UTIL_TYPE_ID_INIT( script , WORKFLOW_TYPE_ID ); - - script->src_file = util_alloc_string_copy( src_file ); - script->joblist = joblist; - script->cmd_list = vector_alloc_new(); - script->compiled = false; - script->last_error = NULL; - script->stack = vector_alloc_new(); - - workflow_try_compile( script , NULL ); - return script; -} - - -static UTIL_SAFE_CAST_FUNCTION( workflow , WORKFLOW_TYPE_ID ) -UTIL_IS_INSTANCE_FUNCTION( workflow , WORKFLOW_TYPE_ID) - -void workflow_free( workflow_type * workflow ) { - free( workflow->src_file ); - vector_free( workflow->cmd_list ); - vector_free( workflow->stack ); - - if (workflow->last_error) - config_error_free( workflow->last_error ); - - free( workflow ); -} - - -void workflow_free__( void * arg ) { - workflow_type * workflow = workflow_safe_cast( arg ); - workflow_free( workflow ); -} - - -const config_error_type * workflow_get_last_error( const workflow_type * workflow) { - return workflow->last_error; -} - -int workflow_size(const workflow_type * workflow) { - return vector_get_size( workflow->cmd_list ); -} - -const workflow_job_type * workflow_iget_job( const workflow_type * workflow, int index) { - const cmd_type * cmd = vector_iget_const( workflow->cmd_list , index ); - return cmd->workflow_job; -} - -stringlist_type * workflow_iget_arguments( const workflow_type * workflow, int index) { - const cmd_type * cmd = vector_iget_const( workflow->cmd_list , index ); - return cmd->arglist; -} diff --git a/ThirdParty/Ert/libjob_queue/src/workflow_job.c b/ThirdParty/Ert/libjob_queue/src/workflow_job.c deleted file mode 100644 index 63e985b581..0000000000 --- a/ThirdParty/Ert/libjob_queue/src/workflow_job.c +++ /dev/null @@ -1,409 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'workflow_job.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include - - -/* The default values are interepreted as no limit. */ -#define DEFAULT_INTERNAL false - - -#define MIN_ARG_KEY "MIN_ARG" -#define MAX_ARG_KEY "MAX_ARG" -#define ARG_TYPE_KEY "ARG_TYPE" -#define INTERNAL_KEY "INTERNAL" -#define MODULE_KEY "MODULE" -#define FUNCTION_KEY "FUNCTION" -#define SCRIPT_KEY "SCRIPT" -#define EXECUTABLE_KEY "EXECUTABLE" - -#define NULL_STRING "NULL" -#define WORKFLOW_JOB_STRING_TYPE "STRING" -#define WORKFLOW_JOB_INT_TYPE "INT" -#define WORKFLOW_JOB_FLOAT_TYPE "FLOAT" -#define WORKFLOW_JOB_BOOL_TYPE "BOOL" - -#define WORKFLOW_JOB_TYPE_ID 614441 - - -struct workflow_job_struct { - UTIL_TYPE_ID_DECLARATION; - bool internal; - int min_arg; - int max_arg; - int_vector_type * arg_types; // Should contain values from the config_item_types enum in config.h. - char * executable; - char * internal_script_path; - char * module; - char * function; - char * name; - void * lib_handle; - workflow_job_ftype * dl_func; - bool valid; -}; - - -bool workflow_job_internal( const workflow_job_type * workflow_job ) { - return workflow_job->internal; -} - -const char * workflow_job_get_name( const workflow_job_type * workflow_job ) { - return workflow_job->name; -} - - -config_parser_type * workflow_job_alloc_config() { - config_parser_type * config = config_alloc(); - { - config_schema_item_type * item; - - item = config_add_schema_item( config , MIN_ARG_KEY , false ); - config_schema_item_set_argc_minmax( item , 1 , 1 ); - config_schema_item_iset_type( item , 0 , CONFIG_INT ); - - item = config_add_schema_item( config , MAX_ARG_KEY , false ); - config_schema_item_set_argc_minmax( item , 1 , 1 ); - config_schema_item_iset_type( item , 0 , CONFIG_INT ); - - item = config_add_schema_item( config , ARG_TYPE_KEY , false ); - config_schema_item_set_argc_minmax( item , 2 , 2 ); - config_schema_item_iset_type( item , 0 , CONFIG_INT ); - config_schema_item_set_indexed_selection_set( item , 1 , 4 , (const char *[4]) {WORKFLOW_JOB_STRING_TYPE , WORKFLOW_JOB_INT_TYPE , WORKFLOW_JOB_FLOAT_TYPE, WORKFLOW_JOB_BOOL_TYPE}); - - /*****************************************************************/ - item = config_add_schema_item( config , EXECUTABLE_KEY , false ); - config_schema_item_set_argc_minmax( item , 1 , 1 ); - config_schema_item_iset_type( item , 0 , CONFIG_PATH ); - - /*****************************************************************/ - item = config_add_schema_item( config , SCRIPT_KEY , false ); - config_schema_item_set_argc_minmax( item , 1 , 1 ); - config_schema_item_iset_type( item , 0 , CONFIG_PATH ); - - /*---------------------------------------------------------------*/ - - item = config_add_schema_item( config , FUNCTION_KEY , false ); - config_schema_item_set_argc_minmax( item , 1 , 1); - - item = config_add_schema_item( config , MODULE_KEY , false ); - config_schema_item_set_argc_minmax( item , 1 , 1); - /*****************************************************************/ - - item = config_add_schema_item( config , INTERNAL_KEY , false ); - config_schema_item_set_argc_minmax( item , 1 , 1); - config_schema_item_iset_type( item , 0 , CONFIG_BOOL); - } - return config; -} - - - -static UTIL_SAFE_CAST_FUNCTION(workflow_job , WORKFLOW_JOB_TYPE_ID ); - -void workflow_job_update_config_compiler( const workflow_job_type * workflow_job , config_parser_type * config_compiler ) { - config_schema_item_type * item = config_add_schema_item( config_compiler , workflow_job->name , false ); - /* - Ensure that the arg_types mapping is at least as large as the - max_arg value. The arg_type vector will be left padded with - CONFIG_STRING values. - */ - { - int iarg; - config_schema_item_set_argc_minmax( item , workflow_job->min_arg , workflow_job->max_arg ); - for (iarg = 0; iarg < int_vector_size( workflow_job->arg_types ); iarg++) - config_schema_item_iset_type( item , iarg , int_vector_iget( workflow_job->arg_types , iarg )); - } -} - - -workflow_job_type * workflow_job_alloc( const char * name , bool internal ) { - workflow_job_type * workflow_job = util_malloc( sizeof * workflow_job ); - UTIL_TYPE_ID_INIT( workflow_job , WORKFLOW_JOB_TYPE_ID ); - workflow_job->internal = internal; // this can not be changed run-time. - workflow_job->min_arg = CONFIG_DEFAULT_ARG_MIN; - workflow_job->max_arg = CONFIG_DEFAULT_ARG_MAX; - workflow_job->arg_types = int_vector_alloc( 0 , CONFIG_STRING ); - - workflow_job->executable = NULL; - workflow_job->internal_script_path = NULL; - workflow_job->module = NULL; - workflow_job->function = NULL; - - if (name == NULL) - util_abort("%s: trying to create workflow_job with name == NULL - illegal\n",__func__); - else - workflow_job->name = util_alloc_string_copy( name ); - - workflow_job->valid = false; - - return workflow_job; -} - - -void workflow_job_set_executable( workflow_job_type * workflow_job , const char * executable ) { - workflow_job->executable = util_realloc_string_copy( workflow_job->executable , executable ); -} - -char* workflow_job_get_executable( workflow_job_type * workflow_job) { - return workflow_job->executable; -} - -void workflow_job_set_internal_script( workflow_job_type * workflow_job , const char * script_path ) { - workflow_job->internal_script_path = util_realloc_string_copy( workflow_job->internal_script_path , script_path ); -} - -char* workflow_job_get_internal_script_path( const workflow_job_type * workflow_job) { - return workflow_job->internal_script_path; -} - -bool workflow_job_is_internal_script( const workflow_job_type * workflow_job) { - return workflow_job->internal && workflow_job->internal_script_path != NULL; -} - -void workflow_job_set_module( workflow_job_type * workflow_job , const char * module) { - if (strcmp(module ,NULL_STRING) == 0) - module = NULL; - - workflow_job->module = util_realloc_string_copy( workflow_job->module , module ); -} - -char * workflow_job_get_module( workflow_job_type * workflow_job) { - return workflow_job->module; -} - -void workflow_job_set_function( workflow_job_type * workflow_job , const char * function) { - workflow_job->function = util_realloc_string_copy( workflow_job->function , function ); -} - -char * workflow_job_get_function( workflow_job_type * workflow_job) { - return workflow_job->function; -} - -void workflow_job_iset_argtype( workflow_job_type * workflow_job , int iarg , config_item_types type) { - if (type == CONFIG_STRING || type == CONFIG_INT || type == CONFIG_FLOAT || type == CONFIG_BOOL) - int_vector_iset( workflow_job->arg_types , iarg , type ); -} - -void workflow_job_set_min_arg( workflow_job_type * workflow_job , int min_arg) { - workflow_job->min_arg = min_arg; -} - -void workflow_job_set_max_arg( workflow_job_type * workflow_job , int max_arg) { - workflow_job->max_arg = max_arg; -} - -int workflow_job_get_min_arg( const workflow_job_type * workflow_job ) { - return workflow_job->min_arg; -} - -int workflow_job_get_max_arg( const workflow_job_type * workflow_job ) { - return workflow_job->max_arg; -} - -config_item_types workflow_job_iget_argtype( const workflow_job_type * workflow_job, int index) { - return int_vector_safe_iget( workflow_job->arg_types , index ); -} - - - -static void workflow_job_iset_argtype_string( workflow_job_type * workflow_job , int iarg , const char * arg_type) { - config_item_types type = CONFIG_INVALID; - - if (strcmp( arg_type , WORKFLOW_JOB_STRING_TYPE) == 0) - type = CONFIG_STRING; - else if (strcmp( arg_type , WORKFLOW_JOB_INT_TYPE) == 0) - type = CONFIG_INT; - else if (strcmp( arg_type , WORKFLOW_JOB_FLOAT_TYPE) == 0) - type = CONFIG_FLOAT; - else if (strcmp( arg_type , WORKFLOW_JOB_BOOL_TYPE) == 0) - type = CONFIG_BOOL; - - if (type != CONFIG_INVALID) - workflow_job_iset_argtype( workflow_job , iarg , type ); - -} - - -static void workflow_job_validate_internal( workflow_job_type * workflow_job ) { - if (workflow_job->executable == NULL) { - if ((workflow_job->internal_script_path == NULL) && (workflow_job->function != NULL)) { - workflow_job->lib_handle = dlopen( workflow_job->module , RTLD_NOW ); - if (workflow_job->lib_handle != NULL) { - workflow_job->dl_func = (workflow_job_ftype *) dlsym( workflow_job->lib_handle , workflow_job->function ); - if (workflow_job->dl_func != NULL) - workflow_job->valid = true; - else - fprintf(stderr,"Failed to load symbol:%s Error:%s \n",workflow_job->function , dlerror()); - } else { - if (workflow_job->module != NULL) - fprintf(stderr,"Failed to load module:%s Error:%s \n",workflow_job->module , dlerror()); - } - } else if ((workflow_job->internal_script_path != NULL) && (workflow_job->function == NULL)) { - workflow_job->valid = true; - } else { - fprintf(stderr, "Must have function != NULL or internal_script != NULL for internal jobs"); - } - } else { - fprintf(stderr, "Must have executable == NULL for internal jobs\n"); - } -} - - -static void workflow_job_validate_external( workflow_job_type * workflow_job ) { - if (workflow_job->executable != NULL) { - if (util_is_executable( workflow_job->executable ) && - (workflow_job->module == workflow_job->function) && - (workflow_job->module == NULL)) - workflow_job->valid = true; - } -} - - - -static void workflow_job_validate( workflow_job_type * workflow_job ) { - if (workflow_job->internal) - workflow_job_validate_internal( workflow_job ); - else - workflow_job_validate_external( workflow_job ); -} - - - - -workflow_job_type * workflow_job_config_alloc( const char * name , config_parser_type * config , const char * config_file) { - workflow_job_type * workflow_job = NULL; - config_content_type * content = config_parse( config , config_file , "--", NULL , NULL , NULL , CONFIG_UNRECOGNIZED_WARN , true); - if (config_content_is_valid( content )) { - bool internal = DEFAULT_INTERNAL; - if (config_content_has_item( content , INTERNAL_KEY)) - internal = config_content_iget_as_bool( content , INTERNAL_KEY , 0 , 0 ); - - { - workflow_job = workflow_job_alloc( name , internal ); - - if (config_content_has_item( content , MIN_ARG_KEY)) - workflow_job_set_min_arg( workflow_job , config_content_iget_as_int( content , MIN_ARG_KEY , 0 , 0 )); - - if (config_content_has_item( content , MAX_ARG_KEY)) - workflow_job_set_max_arg( workflow_job , config_content_iget_as_int( content , MAX_ARG_KEY , 0 , 0 )); - - { - int i; - for (i=0; i < config_content_get_occurences( content , ARG_TYPE_KEY); i++) { - int iarg = config_content_iget_as_int( content , ARG_TYPE_KEY , i , 0 ); - const char * arg_type = config_content_iget( content , ARG_TYPE_KEY , i , 1 ); - - workflow_job_iset_argtype_string( workflow_job , iarg , arg_type ); - } - } - - if (config_content_has_item( content , MODULE_KEY)) - workflow_job_set_module( workflow_job , config_content_get_value( content , MODULE_KEY)); // Could be a pure so name; or a full path ..... Like executable - - if (config_content_has_item( content , FUNCTION_KEY)) - workflow_job_set_function( workflow_job , config_content_get_value( content , FUNCTION_KEY)); - - if (config_content_has_item( content , EXECUTABLE_KEY)) - workflow_job_set_executable( workflow_job , config_content_get_value_as_abspath( content , EXECUTABLE_KEY)); - - if (config_content_has_item( content , SCRIPT_KEY)) { - workflow_job_set_internal_script( workflow_job , config_content_get_value_as_abspath( content , SCRIPT_KEY)); - } - - workflow_job_validate( workflow_job ); - - if (!workflow_job->valid) { - workflow_job_free( workflow_job ); - workflow_job = NULL; - } - } - } - config_content_free( content ); - return workflow_job; -} - - - - -void workflow_job_free( workflow_job_type * workflow_job ) { - util_safe_free( workflow_job->module ); - util_safe_free( workflow_job->function ); - util_safe_free( workflow_job->executable ); - int_vector_free( workflow_job->arg_types ); - free( workflow_job->name ); - free( workflow_job ); -} - - -void workflow_job_free__( void * arg) { - workflow_job_type * workflow_job = workflow_job_safe_cast( arg ); - workflow_job_free( workflow_job ); -} - -/* - The workflow job can return an arbitrary (void *) pointer. It is the - calling scopes responsability to interpret this object correctly. If - the the workflow job allocates storage the calling scope must - discard it. -*/ - -static void * workflow_job_run_internal( const workflow_job_type * job, void * self , bool verbose , const stringlist_type * arg) { - return job->dl_func( self , arg ); -} - - -static void * workflow_job_run_external( const workflow_job_type * job, bool verbose , const stringlist_type * arg) { - char ** argv = stringlist_alloc_char_copy( arg ); - - util_spawn_blocking(job->executable, stringlist_get_size(arg), (const char **) argv, NULL, NULL); - - if (argv != NULL) { - int i; - for (i=0; i < stringlist_get_size( arg ); i++) - free( argv[i] ); - free( argv ); - } - return NULL; -} - -/* This is the old C way and will only be used from the TUI */ -void * workflow_job_run( const workflow_job_type * job, void * self , bool verbose , const stringlist_type * arg) { - if (job->internal) { - if (workflow_job_is_internal_script(job)) { - fprintf(stderr, "*** Can not run internal script workflow jobs using this method: workflow_job_run()\n"); - return NULL; - } else { - return workflow_job_run_internal( job, self, verbose, arg ); - } - } else { - return workflow_job_run_external( job, verbose, arg ); - } -} diff --git a/ThirdParty/Ert/libjob_queue/src/workflow_joblist.c b/ThirdParty/Ert/libjob_queue/src/workflow_joblist.c deleted file mode 100644 index 23806cc81a..0000000000 --- a/ThirdParty/Ert/libjob_queue/src/workflow_joblist.c +++ /dev/null @@ -1,99 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'workflow_joblist.c' is part of ERT - Ensemble based - Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include -#include -#include - -#include - -#include -#include - - -struct workflow_joblist_struct { - config_parser_type * workflow_compiler; - config_parser_type * job_config; - - hash_type * joblist; -}; - - -workflow_joblist_type * workflow_joblist_alloc( ) { - workflow_joblist_type * joblist = util_malloc( sizeof * joblist ); - - joblist->job_config = workflow_job_alloc_config(); - joblist->workflow_compiler = config_alloc(); - joblist->joblist = hash_alloc(); - - return joblist; -} - - -void workflow_joblist_free( workflow_joblist_type * joblist) { - config_free( joblist->job_config ); - config_free( joblist->workflow_compiler ); - hash_free( joblist->joblist ); - free( joblist ); -} - - -const workflow_job_type * workflow_joblist_get_job( const workflow_joblist_type * joblist , const char * job_name) { - return hash_get( joblist->joblist , job_name ); -} - - -void workflow_joblist_add_job( workflow_joblist_type * joblist , const workflow_job_type * job) { - hash_insert_hash_owned_ref( joblist->joblist , workflow_job_get_name( job ) , job , workflow_job_free__ ); - workflow_job_update_config_compiler( job , joblist->workflow_compiler ); -} - - -bool workflow_joblist_has_job( const workflow_joblist_type * joblist , const char * job_name) { - workflow_job_type * job = hash_safe_get(joblist->joblist, job_name); - return (NULL != job); -} - -bool workflow_joblist_add_job_from_file( workflow_joblist_type * joblist , const char * job_name , const char * config_file ) { - workflow_job_type * job = workflow_job_config_alloc( job_name , joblist->job_config , config_file ); - if (job) { - workflow_joblist_add_job( joblist , job ); - return true; - } else - return false; -} - - -config_parser_type * workflow_joblist_get_compiler( const workflow_joblist_type * joblist ) { - return joblist->workflow_compiler; -} - - -config_parser_type * workflow_joblist_get_job_config( const workflow_joblist_type * joblist ) { - return joblist->job_config; -} - -stringlist_type * workflow_joblist_get_job_names(const workflow_joblist_type * joblist) { - return hash_alloc_stringlist(joblist->joblist); -} diff --git a/ThirdParty/Ert/libjob_queue/tests/CMakeLists.txt b/ThirdParty/Ert/libjob_queue/tests/CMakeLists.txt deleted file mode 100644 index 873cc1a515..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/CMakeLists.txt +++ /dev/null @@ -1,87 +0,0 @@ -add_executable( job_status_test job_status_test.c ) -add_executable( job_loadOK job_loadOK.c ) -add_executable( job_loadFail job_loadFail.c ) -add_executable( job_node_test job_node_test.c ) -add_executable( job_list_test job_list_test.c ) -add_executable( create_file create_file.c ) -add_executable( job_workflow_test job_workflow_test.c ) -add_executable( job_lsf_parse_bsub_stdout job_lsf_parse_bsub_stdout.c ) -add_executable( job_lsf_exclude_hosts_test job_lsf_exclude_hosts_test.c ) - -target_link_libraries( job_status_test job_queue test_util ) -target_link_libraries( job_workflow_test job_queue test_util ) -target_link_libraries( create_file job_queue test_util ) -target_link_libraries( job_loadOK job_queue test_util ) -target_link_libraries( job_loadFail job_queue test_util ) -target_link_libraries( job_lsf_parse_bsub_stdout job_queue test_util) -target_link_libraries( job_node_test job_queue test_util) -target_link_libraries( job_list_test job_queue test_util) -target_link_libraries( job_lsf_exclude_hosts_test job_queue util ) - -add_test( job_status_test ${EXECUTABLE_OUTPUT_PATH}/job_status_test) -add_test( job_lsf_parse_bsub_stdout ${EXECUTABLE_OUTPUT_PATH}/job_lsf_parse_bsub_stdout ) - -add_test( job_workflow_test ${EXECUTABLE_OUTPUT_PATH}/job_workflow_test ${EXECUTABLE_OUTPUT_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/data/internal_job) - -add_test( job_loadOK1 ${EXECUTABLE_OUTPUT_PATH}/job_loadOK ${CMAKE_CURRENT_SOURCE_DIR}/data/internalOK) -add_test( job_loadOK2 ${EXECUTABLE_OUTPUT_PATH}/job_loadOK ${CMAKE_CURRENT_SOURCE_DIR}/data/externalOK) -add_test( job_loadOK3 ${EXECUTABLE_OUTPUT_PATH}/job_loadOK ${CMAKE_CURRENT_SOURCE_DIR}/data/internalOK ${CMAKE_CURRENT_SOURCE_DIR}/data/externalOK) - -add_test( job_loadFail1 ${EXECUTABLE_OUTPUT_PATH}/job_loadFail ${CMAKE_CURRENT_SOURCE_DIR}/data/internalFail) -add_test( job_loadFail2 ${EXECUTABLE_OUTPUT_PATH}/job_loadFail ${CMAKE_CURRENT_SOURCE_DIR}/data/externalFail) -add_test( job_loadFail3 ${EXECUTABLE_OUTPUT_PATH}/job_loadFail ${CMAKE_CURRENT_SOURCE_DIR}/data/internalFail ${CMAKE_CURRENT_SOURCE_DIR}/data/externalFail) - -add_test( job_node_test ${EXECUTABLE_OUTPUT_PATH}/job_node_test) -add_test( job_list_test valgrind --leak-check=full --error-exitcode=1 ${EXECUTABLE_OUTPUT_PATH}/job_list_test) -add_test( job_lsf_exclude_hosts_test ${EXECUTABLE_OUTPUT_PATH}/job_lsf_exclude_hosts_test ${EXECUTABLE_OUTPUT_PATH}/job_program NULL LOCAL) - -add_executable( job_program_output job_program_output.c ) -target_link_libraries( job_program_output ert_util test_util) - -add_executable( job_queue_test job_job_queue_test.c ) -target_link_libraries( job_queue_test job_queue test_util ) -add_test( job_queue_test ${EXECUTABLE_OUTPUT_PATH}/job_queue_test ${EXECUTABLE_OUTPUT_PATH}/job_program_output ) - -add_executable( job_queue_stress_task job_queue_stress_task.c ) -target_link_libraries( job_queue_stress_task ert_util ) - -add_executable( job_queue_stress_test job_queue_stress_test.c ) -target_link_libraries( job_queue_stress_test job_queue test_util ) -add_test( job_queue_stress_test ${EXECUTABLE_OUTPUT_PATH}/job_queue_stress_test ${EXECUTABLE_OUTPUT_PATH}/job_queue_stress_task False) -add_test( job_queue_user_exit ${EXECUTABLE_OUTPUT_PATH}/job_queue_stress_test ${EXECUTABLE_OUTPUT_PATH}/job_queue_stress_task True) - -add_executable( job_queue_timeout_test job_queue_timeout_test.c ) -target_link_libraries( job_queue_timeout_test job_queue test_util ) -add_test( job_queue_timeout_test ${EXECUTABLE_OUTPUT_PATH}/job_queue_timeout_test ${EXECUTABLE_OUTPUT_PATH}/job_queue_stress_task) - -add_executable( job_queue_driver_test job_queue_driver_test.c ) -target_link_libraries( job_queue_driver_test job_queue test_util ) -add_test( job_queue_driver_test ${EXECUTABLE_OUTPUT_PATH}/job_queue_driver_test ) - - -if (ERT_LSF_SUBMIT_TEST) - include( lsf_tests.cmake ) -endif() - - -add_executable( job_torque_test job_torque_test.c ) -target_link_libraries( job_torque_test job_queue ert_util test_util ) -add_test( job_torque_test ${EXECUTABLE_OUTPUT_PATH}/job_torque_test ) - -add_executable( job_queue_manager job_queue_manager.c ) -target_link_libraries( job_queue_manager job_queue ert_util test_util ) -add_test( job_queue_manager ${EXECUTABLE_OUTPUT_PATH}/job_queue_manager ) - -file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/data/qsub_emulators/ DESTINATION ${EXECUTABLE_OUTPUT_PATH}) - -add_executable( job_torque_submit_test job_torque_submit_test.c ) -target_link_libraries( job_torque_submit_test job_queue ert_util test_util ) -add_test(NAME job_torque_submit_test WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH} COMMAND ${EXECUTABLE_OUTPUT_PATH}/job_torque_submit_test dummyparam) -set_property(TEST job_torque_submit_test PROPERTY ENVIRONMENT “setenv PATH ${EXECUTABLE_OUTPUT_PATH}:$PATH”) - - -add_executable( ext_joblist_test ext_joblist_test.c ) -target_link_libraries( ext_joblist_test job_queue test_util ) -add_test( ext_joblist_test ${EXECUTABLE_OUTPUT_PATH}/ext_joblist_test ${CMAKE_CURRENT_SOURCE_DIR}/data/jobs/util ${CMAKE_CURRENT_SOURCE_DIR}) -set_property(TEST ext_joblist_test PROPERTY LABELS StatoilData ) - diff --git a/ThirdParty/Ert/libjob_queue/tests/create_file.c b/ThirdParty/Ert/libjob_queue/tests/create_file.c deleted file mode 100644 index fbba657756..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/create_file.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'create_file.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include - - -int main( int argc , char ** argv) { - char * filename = argv[1]; - int value = atoi( argv[2] ); - FILE * stream = fopen( filename , "w"); - fprintf(stream , "%d\n", value ); - fclose( stream ); -} diff --git a/ThirdParty/Ert/libjob_queue/tests/data/externalFail b/ThirdParty/Ert/libjob_queue/tests/data/externalFail deleted file mode 100644 index 0f53d812c3..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/data/externalFail +++ /dev/null @@ -1,5 +0,0 @@ -INTERNAL False -MIN_ARG 1 -MAX_ARG 2 -ARG_TYPE 0 STRING -ARG_TYPE 1 INT diff --git a/ThirdParty/Ert/libjob_queue/tests/data/externalOK b/ThirdParty/Ert/libjob_queue/tests/data/externalOK deleted file mode 100644 index 67dec0bef2..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/data/externalOK +++ /dev/null @@ -1,6 +0,0 @@ -INTERNAL False -EXECUTABLE /usr/bin/python -MIN_ARG 1 -MAX_ARG 2 -ARG_TYPE 0 STRING -ARG_TYPE 1 INT diff --git a/ThirdParty/Ert/libjob_queue/tests/data/external_job b/ThirdParty/Ert/libjob_queue/tests/data/external_job deleted file mode 100644 index 5b39223101..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/data/external_job +++ /dev/null @@ -1,5 +0,0 @@ -EXECUTABLE /private/joaho/ERT/git/ert/build/bin/create_file -ARG_TYPE 0 STRING -ARG_TYPE 1 INT -MIN_ARG 2 -MAX_ARG 2 \ No newline at end of file diff --git a/ThirdParty/Ert/libjob_queue/tests/data/internalFail b/ThirdParty/Ert/libjob_queue/tests/data/internalFail deleted file mode 100644 index 40686fc1d5..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/data/internalFail +++ /dev/null @@ -1,6 +0,0 @@ -INTERNAL True -MODULE NULL -MIN_ARG 1 -MAX_ARG 2 -ARG_TYPE 0 STRING -ARG_TYPE 1 INT diff --git a/ThirdParty/Ert/libjob_queue/tests/data/internalOK b/ThirdParty/Ert/libjob_queue/tests/data/internalOK deleted file mode 100644 index 6252998faa..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/data/internalOK +++ /dev/null @@ -1,7 +0,0 @@ -INTERNAL True -MODULE NULL -FUNCTION workflow_job_alloc -MIN_ARG 1 -MAX_ARG 2 -ARG_TYPE 0 STRING -ARG_TYPE 1 INT diff --git a/ThirdParty/Ert/libjob_queue/tests/data/internal_job b/ThirdParty/Ert/libjob_queue/tests/data/internal_job deleted file mode 100644 index 2c86544a44..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/data/internal_job +++ /dev/null @@ -1,5 +0,0 @@ -INTERNAL True -FUNCTION read_file -ARG_TYPE 0 STRING -MIN_ARG 1 -MAX_ARG 1 diff --git a/ThirdParty/Ert/libjob_queue/tests/data/jobs/util/COPY_FILE b/ThirdParty/Ert/libjob_queue/tests/data/jobs/util/COPY_FILE deleted file mode 100644 index 9867a28978..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/data/jobs/util/COPY_FILE +++ /dev/null @@ -1,2 +0,0 @@ -EXECUTABLE /bin/cp -ARGLIST diff --git a/ThirdParty/Ert/libjob_queue/tests/data/jobs/util/REPLACE b/ThirdParty/Ert/libjob_queue/tests/data/jobs/util/REPLACE deleted file mode 100644 index 79e5f19b01..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/data/jobs/util/REPLACE +++ /dev/null @@ -1,6 +0,0 @@ -STDOUT replace.stdout -STDERR replace.stderr - -EXECUTABLE /project/res/x86_64_RH_4/bin/replace.x -ARGLIST - diff --git a/ThirdParty/Ert/libjob_queue/tests/data/jobs/util/STORE_FILE b/ThirdParty/Ert/libjob_queue/tests/data/jobs/util/STORE_FILE deleted file mode 100644 index 0bdb3d3b68..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/data/jobs/util/STORE_FILE +++ /dev/null @@ -1,5 +0,0 @@ -STDOUT store_file.stdout -STDERR store_file.stderr - -EXECUTABLE ../../../Scripts/store_file.py -ARGLIST diff --git a/ThirdParty/Ert/libjob_queue/tests/data/jobs/util/SYMLINK b/ThirdParty/Ert/libjob_queue/tests/data/jobs/util/SYMLINK deleted file mode 100644 index 72ebb65a7c..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/data/jobs/util/SYMLINK +++ /dev/null @@ -1,6 +0,0 @@ -STDERR SYMLINK.stderr -STDOUT SYMLINK.stdout - -EXECUTABLE /bin/ln -ARGLIST -sf - diff --git a/ThirdParty/Ert/libjob_queue/tests/data/qsub_emulators/qdel b/ThirdParty/Ert/libjob_queue/tests/data/qsub_emulators/qdel deleted file mode 100644 index 513e57d5da..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/data/qsub_emulators/qdel +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -echo "#!/bin/sh" > qstat -echo "echo \"Job id Name User Time Use S Queue\"" >> qstat -echo "echo \"------------------------- ---------------- --------------- -------- - -----\"" >> qstat -echo "echo \"1612427.st-lcmm ...130getupdates fama 00:00:01 E normal\"" >> qstat \ No newline at end of file diff --git a/ThirdParty/Ert/libjob_queue/tests/data/qsub_emulators/qstat b/ThirdParty/Ert/libjob_queue/tests/data/qsub_emulators/qstat deleted file mode 100644 index 47ae34dc9b..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/data/qsub_emulators/qstat +++ /dev/null @@ -1 +0,0 @@ -Content will be piped into this file \ No newline at end of file diff --git a/ThirdParty/Ert/libjob_queue/tests/data/qsub_emulators/qsub b/ThirdParty/Ert/libjob_queue/tests/data/qsub_emulators/qsub deleted file mode 100644 index 43ddcb8568..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/data/qsub_emulators/qsub +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -echo 1612427.greier.og.greier -echo "#!/bin/sh" > qstat -echo "echo \"Job id Name User Time Use S Queue\"" >> qstat -echo "echo \"------------------------- ---------------- --------------- -------- - -----\"" >> qstat -echo "echo \"1612427.st-lcmm ...130getupdates fama 00:00:01 R normal\"" >> qstat \ No newline at end of file diff --git a/ThirdParty/Ert/libjob_queue/tests/ext_joblist_test.c b/ThirdParty/Ert/libjob_queue/tests/ext_joblist_test.c deleted file mode 100644 index 5dfdc9848b..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/ext_joblist_test.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'ext_joblist_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -void load_job_directory(ext_joblist_type * joblist , const char * path, const char * license_root_path) { - bool user_mode = false; - ext_joblist_add_jobs_in_directory(joblist , path, license_root_path, user_mode, true ); - test_assert_true( ext_joblist_has_job(joblist, "SYMLINK")); -} - -int main( int argc , char ** argv) { - int status = 0; - ext_joblist_type * joblist = ext_joblist_alloc(); - load_job_directory(joblist , argv[1], argv[2] ); - ext_joblist_free(joblist); - exit( status ); -} diff --git a/ThirdParty/Ert/libjob_queue/tests/job_job_queue_test.c b/ThirdParty/Ert/libjob_queue/tests/job_job_queue_test.c deleted file mode 100644 index a24e5afcd6..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/job_job_queue_test.c +++ /dev/null @@ -1,491 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'job_queue_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. - */ -#include -#include -#include - -#include -#include -#include - -#include -#include - -#include -#include - -void submit_jobs_to_queue(job_queue_type * queue, test_work_area_type * work_area, char * executable_to_run, int number_of_jobs, int number_of_slowjobs, char* sleep_short, char* sleep_long) { - int submitted_slowjobs = 0; - for (int i = 0; i < number_of_jobs; i++) { - char * runpath = util_alloc_sprintf("%s/%s_%d", test_work_area_get_cwd(work_area), "job", i); - util_make_path(runpath); - - char * sleeptime = sleep_short; - if (submitted_slowjobs < number_of_slowjobs) { - sleeptime = sleep_long; - submitted_slowjobs++; - } - - job_queue_add_job(queue, executable_to_run, NULL, NULL, NULL, NULL, 1, runpath, "Testjob", 2, (const char *[2]) {runpath, sleeptime}); - free(runpath); - } - test_assert_int_equal( number_of_jobs , job_queue_get_active_size(queue) ); -} - -void monitor_job_queue(job_queue_type * queue, int max_job_duration, time_t stop_time, int min_realizations) { - if (min_realizations > 0) { - while (true) { - util_usleep(100); - - //Check if minimum number of realizations have run, and if so, kill the rest after a certain time - if ((job_queue_get_num_complete(queue) >= min_realizations)) { - job_queue_set_max_job_duration(queue, max_job_duration); - job_queue_set_job_stop_time(queue, stop_time); - break; - } - } - } -} - - - -void run_jobs_with_time_limit_test(char * executable_to_run, int number_of_jobs, int number_of_slowjobs, char * sleep_short, char * sleep_long, int max_sleep) { - test_work_area_type * work_area = test_work_area_alloc("job_queue"); - job_queue_type * queue = job_queue_alloc(number_of_jobs, "OK.status", "STATUS", "ERROR"); - - queue_driver_type * driver = queue_driver_alloc_local(); - job_queue_set_driver(queue, driver); - job_queue_set_max_job_duration(queue, max_sleep); - - submit_jobs_to_queue(queue, work_area, executable_to_run, number_of_jobs, number_of_slowjobs, sleep_short, sleep_long); - - job_queue_run_jobs(queue, number_of_jobs, false); - - test_assert_int_equal(number_of_jobs - number_of_slowjobs, job_queue_get_num_complete(queue)); - test_assert_int_equal(number_of_slowjobs, job_queue_get_num_killed(queue)); - - test_assert_bool_equal(false, job_queue_get_open(queue)); - job_queue_reset(queue); - test_assert_bool_equal(true, job_queue_get_open(queue)); - - test_assert_int_equal(0, job_queue_get_num_complete(queue)); - - job_queue_free(queue); - queue_driver_free(driver); - test_work_area_free(work_area); -} - - -void run_and_monitor_jobs(char * executable_to_run, - int number_of_jobs , - int max_job_duration, - time_t stop_time, - int min_realizations, - int min_completed, - int max_completed , - int interval_between_jobs) { - - test_work_area_type * work_area = test_work_area_alloc("job_queue"); - job_queue_type * queue = job_queue_alloc(number_of_jobs, "OK.status", "STATUS", "ERROR"); - job_queue_manager_type * queue_manager = job_queue_manager_alloc( queue ); - queue_driver_type * driver = queue_driver_alloc_local(); - - job_queue_set_driver(queue, driver); - - - int job_run_time = 0; - - for (int i = 0; i < number_of_jobs; i++) { - char * runpath = util_alloc_sprintf("%s/%s_%d", test_work_area_get_cwd(work_area), "job", i); - char * sleeptime = util_alloc_sprintf("%d", job_run_time); - - util_make_path(runpath); - job_queue_add_job(queue, executable_to_run, NULL, NULL, NULL, NULL, 1, runpath, "Testjob", 2, (const char *[2]) {runpath, sleeptime}); - job_run_time += interval_between_jobs; - - free(sleeptime); - free(runpath); - } - job_queue_submit_complete(queue); - job_queue_manager_start_queue(queue_manager,0,false,false); - monitor_job_queue( queue , max_job_duration , stop_time , min_realizations ); - job_queue_manager_wait(queue_manager); - - printf("Completed: %d <= %d <= %d ?\n",min_completed , job_queue_get_num_complete(queue) , max_completed); - test_assert_true(job_queue_get_num_complete(queue) >= min_completed); - test_assert_true(job_queue_get_num_complete(queue) <= max_completed); - - test_assert_int_equal(number_of_jobs - job_queue_get_num_complete( queue ) , job_queue_get_num_killed(queue)); - test_assert_bool_equal(false, job_queue_get_open(queue)); - job_queue_reset(queue); - test_assert_bool_equal(true, job_queue_get_open(queue)); - test_assert_int_equal(0, job_queue_get_num_complete(queue)); - - job_queue_free(queue); - queue_driver_free(driver); - job_queue_manager_free( queue_manager ); - test_work_area_free(work_area); -} - -void run_jobs_time_limit_multithreaded(char * executable_to_run, int number_of_jobs, int number_of_slowjobs, char * sleep_short, char * sleep_long, int max_sleep) { - test_work_area_type * work_area = test_work_area_alloc("job_queue"); - - - job_queue_type * queue = job_queue_alloc(number_of_jobs, "OK.status", "STATUS", "ERROR"); - queue_driver_type * driver = queue_driver_alloc_local(); - job_queue_set_driver(queue, driver); - job_queue_set_max_job_duration(queue, max_sleep); - - arg_pack_type * arg_pack = arg_pack_alloc(); - arg_pack_append_ptr(arg_pack, queue); - arg_pack_append_int(arg_pack, 0); - arg_pack_append_bool(arg_pack, false); - - thread_pool_type * pool = thread_pool_alloc(1, true); - thread_pool_add_job(pool, job_queue_run_jobs__, arg_pack); - - submit_jobs_to_queue(queue, work_area, executable_to_run, number_of_jobs, number_of_slowjobs, sleep_short, sleep_long); - - job_queue_submit_complete(queue); - thread_pool_join(pool); - thread_pool_free(pool); - - test_assert_int_equal(number_of_jobs - number_of_slowjobs, job_queue_get_num_complete(queue)); - test_assert_int_equal(number_of_slowjobs, job_queue_get_num_killed(queue)); - test_assert_bool_equal(false, job_queue_get_open(queue)); - job_queue_reset(queue); - test_assert_bool_equal(true, job_queue_get_open(queue)); - test_assert_int_equal(0, job_queue_get_num_complete(queue)); - - job_queue_free(queue); - queue_driver_free(driver); - test_work_area_free(work_area); -} - -void test1(char ** argv) { - printf("001: Running JobQueueRunJobs_ReuseQueue_AllOk\n"); - - int number_of_jobs = 20; - int number_of_queue_reuse = 10; - - test_work_area_type * work_area = test_work_area_alloc("job_queue"); - - job_queue_type * queue = job_queue_alloc(number_of_jobs, "OK.status", "STATUS", "ERROR"); - queue_driver_type * driver = queue_driver_alloc_local(); - job_queue_set_driver(queue, driver); - - for (int j = 0; j < number_of_queue_reuse; j++) { - submit_jobs_to_queue(queue, work_area, argv[1], number_of_jobs, 0, "0", "0"); - - job_queue_run_jobs(queue, number_of_jobs, false); - - test_assert_int_equal(number_of_jobs, job_queue_get_num_complete(queue)); - test_assert_bool_equal(false, job_queue_get_open(queue)); - job_queue_reset(queue); - test_assert_bool_equal(true, job_queue_get_open(queue)); - test_assert_int_equal(0, job_queue_get_num_complete(queue)); - } - job_queue_free(queue); - queue_driver_free(driver); - test_work_area_free(work_area); - -} - -void test2(char ** argv) { - printf("002: Running JobQueueRunJobs_ReuseQueueWithStopTime_AllOk\n"); - - int number_of_jobs = 3; - int number_of_slow_jobs = 2; - int number_of_queue_reuse = 3; - - test_work_area_type * work_area = test_work_area_alloc("job_queue"); - - job_queue_type * queue = job_queue_alloc(number_of_jobs, "OK.status", "STATUS", "ERROR"); - queue_driver_type * driver = queue_driver_alloc_local(); - job_queue_set_driver(queue, driver); - - for (int j = 0; j < number_of_queue_reuse; j++) { - submit_jobs_to_queue(queue, work_area, argv[1], number_of_jobs, number_of_slow_jobs, "1", "5"); - - job_queue_run_jobs(queue, number_of_jobs, false); - time_t current_time = time(NULL); - job_queue_set_job_stop_time(queue, current_time); - - test_assert_int_equal(number_of_jobs, job_queue_get_num_complete(queue)); - test_assert_bool_equal(false, job_queue_get_open(queue)); - job_queue_reset(queue); - test_assert_bool_equal(true, job_queue_get_open(queue)); - test_assert_int_equal(0, job_queue_get_num_complete(queue)); - } - job_queue_free(queue); - queue_driver_free(driver); - test_work_area_free(work_area); - -} - - -void test3(char ** argv) { - printf("003: Running JobQueueSetStopTime_StopTimeEarly_MinRealisationsAreRun\n"); - - //Use stop_time to to stop jobs after min_realizations are finished - int number_of_jobs = 10; - int min_realizations = 5; - int num_expected_completed = 5; - int max_duration_time = 0; - int interval_between_jobs = 2; - time_t stoptime = time( NULL ); - - run_and_monitor_jobs(argv[1], number_of_jobs , max_duration_time, stoptime, min_realizations, num_expected_completed, num_expected_completed , interval_between_jobs); -} - -void test4(char ** argv) { - printf("004: Running JobQueueSetMaxDuration_Duration5Seconds_KillsAllJobsWithDurationMoreThan5Seconds\n"); - run_jobs_with_time_limit_test(argv[1], 100, 23, "1", "100", 5); -} - - -void test5(char ** argv) { - printf("005: Running JobQueueSetStopTime_StopTimeLate_AllRealisationsAreRun\n"); - - //Use stop_time to to stop jobs after min_realizations are finished - int number_of_jobs = 10; - int min_realizations = 5; - int num_expected_completed = 10; - int max_duration_time = 0; - int interval_between_jobs = 0; - time_t currenttime; - time(¤ttime); - time_t stoptime = currenttime + 15; - run_and_monitor_jobs(argv[1], number_of_jobs , max_duration_time, stoptime, min_realizations, num_expected_completed, num_expected_completed , interval_between_jobs); -} - -void test6(char ** argv) { - printf("006: Running JobQueueSetStopTimeAndMaxDuration_MaxDurationShort_StopTimeLong_MinRealisationsAreRun\n"); - - int number_of_jobs = 10; - int min_realizations = 1; - int num_expected_completed = 1; - int max_duration_time = 1; - int interval_between_jobs = 2; - time_t currenttime; - time(¤ttime); - time_t stoptime = currenttime + 10; - run_and_monitor_jobs(argv[1], number_of_jobs , max_duration_time, stoptime, min_realizations, num_expected_completed, number_of_jobs , interval_between_jobs); - -} - -void test7(char ** argv) { - printf("007: Running JobQueueSetStopTimeAndMaxDuration_MaxDurationLong_StopTimeEarly_MinRealisationsAreRun\n"); - - int number_of_jobs = 10; - int min_realizations = 1; - int num_expected_completed = 1; - int max_duration_time = 10; - int interval_between_jobs = 2; - time_t currenttime; - time(¤ttime); - time_t stoptime = currenttime + 1; - run_and_monitor_jobs(argv[1], number_of_jobs , max_duration_time, stoptime, min_realizations, num_expected_completed, num_expected_completed , interval_between_jobs); -} - -void test8(char ** argv) { - printf("008: Running JobQueueSetMaxDurationAfterMinRealizations_MaxDurationShort_OnlyMinRealizationsAreRun\n"); - - // Must have one job completed, the rest are then killed due to the max_duration_time gets exceeded. - int number_of_jobs = 10; - int min_realizations = 1; - int num_expected_completed = 1; - int max_duration_time = 1; - int interval_between_jobs = 2; - time_t currenttime = 0; - - run_and_monitor_jobs(argv[1], number_of_jobs , max_duration_time, currenttime, min_realizations, num_expected_completed, 3 , interval_between_jobs); -} - -void test9(char ** argv) { - printf("009: Running JobQueueSetMaxDurationAfterMinRealizations_MaxDurationLooong_AllRealizationsAreRun\n"); - - // Min realizations is 1, but the max running time exceeds the time used by any of the jobs, so all run to completion - int number_of_jobs = 10; - int min_realizations = 1; - int num_expected_completed = 10; - int max_duration_time = 12; - int interval_between_jobs = 1; - time_t currenttime = 0; - run_and_monitor_jobs(argv[1], number_of_jobs , max_duration_time, currenttime, min_realizations, num_expected_completed, num_expected_completed , interval_between_jobs); -} - - -void test10(char ** argv) { - printf("010: Running JobQueueSetMaxDurationAfterMinRealizations_MaxDurationSemiLong_MoreThanMinRealizationsAreRun\n"); - - int number_of_jobs = 10; - int min_realizations = 3; - int max_duration_time = 7; - int interval_between_jobs = 2; - time_t currenttime = 0; - run_and_monitor_jobs(argv[1], number_of_jobs , max_duration_time, currenttime, min_realizations, min_realizations , number_of_jobs , interval_between_jobs); -} - -void test11(char ** argv) { - printf("011: Running JobQueueSetMaxDurationAfterMinRealizations_MaxDurationShortButMinRealizationsIsAll_AllRealizationsAreRun\n"); - - // Min is 10, so all run to completion - int number_of_jobs = 10; - int min_realizations = 10; - int num_expected_completed = 10; - int max_duration_time = 1; - int interval_between_jobs = 0; - time_t currenttime = 0; - run_and_monitor_jobs(argv[1], number_of_jobs , max_duration_time, currenttime, min_realizations, num_expected_completed, num_expected_completed , interval_between_jobs); -} - -void test12(char ** argv) { - printf("012: Running JobQueueSetMaxDuration_DurationZero_AllRealisationsAreRun\n"); - run_jobs_with_time_limit_test(argv[1], 10, 0, "1", "100", 0); // 0 as limit means no limit*/ -} - -void test13(char ** argv) { - printf("013: Running JobQueueSetMaxDurationRunJobsLoopInThread_Duration5Seconds_KillsAllJobsWithDurationMoreThan5Seconds\n"); - run_jobs_time_limit_multithreaded(argv[1], 100, 23, "1", "100", 5); -} - -void test14(char ** argv) { - printf("014: Running JobQueueSetAutoStopTime_ThreeQuickJobs_AutoStopTimeKillsTheRest\n"); - - int number_of_jobs = 10; - - test_work_area_type * work_area = test_work_area_alloc("job_queue"); - job_queue_type * queue = job_queue_alloc(number_of_jobs, "OK.status", "STATUS", "ERROR"); - queue_driver_type * driver = queue_driver_alloc_local(); - job_queue_manager_type * queue_manager = job_queue_manager_alloc( queue ); - job_queue_set_driver(queue, driver); - - - int number_of_slowjobs = 7; - int number_of_fastjobs = number_of_jobs - number_of_slowjobs; - char * sleep_short = "0"; - char * sleep_long = "100"; - submit_jobs_to_queue(queue, work_area, argv[1], number_of_jobs, number_of_slowjobs, sleep_short, sleep_long); - job_queue_submit_complete(queue); - job_queue_manager_start_queue( queue_manager , 10 , false , false); - - /* - The jobs are distributed with some very fast, and some quite - long. Here we busy wait until all the fast ones have completed and - then we calculate a stop for the remaining jobs with the - job_queue_set_auto_job_stop_time() function. - */ - - while (true) { - int num_complete = job_queue_get_num_complete(queue); - if (num_complete == number_of_fastjobs) - break; - util_usleep( 100000 ); - } - - job_queue_set_auto_job_stop_time(queue); - job_queue_manager_wait(queue_manager); - - - test_assert_int_equal(number_of_jobs - number_of_slowjobs, job_queue_get_num_complete(queue)); - test_assert_int_equal(number_of_slowjobs, job_queue_get_num_killed(queue)); - - test_assert_bool_equal(false, job_queue_get_open(queue)); - job_queue_reset(queue); - test_assert_bool_equal(true, job_queue_get_open(queue)); - - test_assert_int_equal(0, job_queue_get_num_complete(queue)); - - job_queue_manager_free( queue_manager ); - job_queue_free(queue); - queue_driver_free(driver); - test_work_area_free(work_area); -} - -void test15(char ** argv) { - printf("015: Running JobQueueSetAutoStopTime_NoJobsAreFinished_AutoStopDoesNothing\n"); - - int number_of_jobs = 10; - - test_work_area_type * work_area = test_work_area_alloc("job_queue"); - job_queue_type * queue = job_queue_alloc(number_of_jobs, "OK.status", "STATUS", "ERROR"); - queue_driver_type * driver = queue_driver_alloc_local(); - job_queue_set_driver(queue, driver); - - char * sleep_long = "100"; - - submit_jobs_to_queue(queue, work_area, argv[1], number_of_jobs, number_of_jobs, "0", sleep_long); - - job_queue_set_auto_job_stop_time(queue); - - test_assert_int_equal(0, job_queue_get_num_complete(queue)); - test_assert_bool_equal(true, job_queue_get_open(queue)); - - job_queue_free(queue); - queue_driver_free(driver); - test_work_area_free(work_area); -} - -void test16(char ** argv) { - printf("016: Running JobQueueSetAutoStopTime_AllJobsAreFinished_AutoStopDoesNothing\n"); - - int number_of_jobs = 10; - test_work_area_type * work_area = test_work_area_alloc("job_queue"); - job_queue_type * queue = job_queue_alloc(number_of_jobs, "OK.status", "STATUS", "ERROR"); - - queue_driver_type * driver = queue_driver_alloc_local(); - job_queue_set_driver(queue, driver); - - submit_jobs_to_queue(queue, work_area, argv[1], number_of_jobs, 0, "0", "0"); - - job_queue_run_jobs(queue, number_of_jobs, false); - - test_assert_int_equal(number_of_jobs, job_queue_get_num_complete(queue)); - test_assert_bool_equal(false, job_queue_get_open(queue)); - job_queue_reset(queue); - test_assert_bool_equal(true, job_queue_get_open(queue)); - test_assert_int_equal(0, job_queue_get_num_complete(queue)); - job_queue_free(queue); - queue_driver_free(driver); - test_work_area_free(work_area); -} - - -int main(int argc, char ** argv) { - util_install_signals(); - - test1(argv); - test2(argv); - test3(argv); - test4(argv); - test5(argv); - test6(argv); - test7(argv); - test8(argv); - test9(argv); - test10(argv); - test11(argv); - test12(argv); - test13(argv); - test14(argv); - test15(argv); - test16(argv); - - exit(0); -} diff --git a/ThirdParty/Ert/libjob_queue/tests/job_list_test.c b/ThirdParty/Ert/libjob_queue/tests/job_list_test.c deleted file mode 100644 index 5859623adb..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/job_list_test.c +++ /dev/null @@ -1,80 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA, Norway. - - The file 'job_node_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include - -#include "ert/util/build_config.h" - -#include -#include -#include - -#include -#include - - -void test_create() { - job_list_type * list = job_list_alloc(); - test_assert_true( job_list_is_instance( list )); - test_assert_int_equal( 0 , job_list_get_size( list )); - job_list_free( list ); -} - - - -void call_add_job( void * arg ) { - arg_pack_type * arg_pack = arg_pack_safe_cast( arg ); - job_list_type * job_list = arg_pack_iget_ptr( arg_pack , 0 ); - job_queue_node_type * node = arg_pack_iget_ptr( arg_pack , 1 ); - job_list_add_job( job_list , node ); -} - - -void call_iget_job( void * arg ) { - job_list_type * job_list = job_list_safe_cast( arg ); - job_list_iget_job( job_list , 10); -} - - - -void test_add_job() { - job_list_type * list = job_list_alloc(); - job_queue_node_type * node = job_queue_node_alloc_simple("name" , "/tmp" , "/bin/ls" , 0 , NULL); - job_list_add_job( list , node ); - test_assert_int_equal( job_list_get_size( list ) , 1 ); - test_assert_int_equal( job_queue_node_get_queue_index(node) , 0 ); - test_assert_ptr_equal( node , job_list_iget_job(list , 0)); - { - arg_pack_type * arg_pack = arg_pack_alloc( ); - arg_pack_append_ptr( arg_pack , list ); - arg_pack_append_ptr( arg_pack , node ); - test_assert_util_abort("job_queue_node_set_queue_index", call_add_job, arg_pack ); - arg_pack_free( arg_pack ); - } - test_assert_util_abort("job_list_iget_job", call_iget_job, list); - job_list_reset( list ); - test_assert_int_equal( 0 , job_list_get_size( list )); - job_list_free( list ); -} - - -int main( int argc , char ** argv) { - util_install_signals(); - test_create(); - test_add_job(); -} diff --git a/ThirdParty/Ert/libjob_queue/tests/job_loadFail.c b/ThirdParty/Ert/libjob_queue/tests/job_loadFail.c deleted file mode 100644 index a2e5c20d28..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/job_loadFail.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'job_loadFail.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include - -#include - -#include - - - -bool loadConfig(config_parser_type * config , const char * config_file, config_parser_type * config_compiler) { - bool OK = false; - workflow_job_type * cmd = workflow_job_config_alloc( "NAME" , config , config_file); - - if (cmd != NULL) { - OK = true; - workflow_job_update_config_compiler( cmd , config_compiler ); - workflow_job_free( cmd ); - } - - return OK; -} - - - -int main( int argc , char ** argv) { - int status = 0; - { - config_parser_type * config = workflow_job_alloc_config(); - config_parser_type * config_compiler = config_alloc(); - int iarg; - bool OK = true; - - for (iarg = 1; iarg < argc; iarg++) - OK = OK && (loadConfig( config , argv[iarg] , config_compiler ) == false); - - if (!OK) - status = 1; - - config_free(config_compiler); - config_free(config); - } - exit( status ); -} diff --git a/ThirdParty/Ert/libjob_queue/tests/job_loadOK.c b/ThirdParty/Ert/libjob_queue/tests/job_loadOK.c deleted file mode 100644 index 2e15a636e5..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/job_loadOK.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'job_loadOK.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include - -#include - -#include - - - -bool loadConfig(config_parser_type * config , const char * config_file , config_parser_type * config_compiler) { - bool OK = false; - workflow_job_type * cmd = workflow_job_config_alloc( "NAME" , config , config_file); - - if (cmd != NULL) { - OK = true; - workflow_job_update_config_compiler( cmd , config_compiler ); - workflow_job_free( cmd ); - } - - return OK; -} - - - -int main( int argc , char ** argv) { - int status = 0; - { - config_parser_type * config = workflow_job_alloc_config(); - config_parser_type * config_compiler = config_alloc(); - int iarg; - bool OK = true; - - for (iarg = 1; iarg < argc; iarg++) - OK = OK && loadConfig( config , argv[iarg] , config_compiler); - - if (!OK) - status = 1; - - config_free(config_compiler); - config_free(config); - } - exit( status ); -} diff --git a/ThirdParty/Ert/libjob_queue/tests/job_lsb.c b/ThirdParty/Ert/libjob_queue/tests/job_lsb.c deleted file mode 100644 index efd340ce4a..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/job_lsb.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'job_lsb.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include - -#include - -#include - -/* - This test should ideally be run twice in two different environments; - with and without dlopen() access to the lsf libraries. -*/ - -int main( int argc , char ** argv) { - lsb_type * lsb = lsb_alloc(); - - test_assert_not_NULL( lsb ); - if (!lsb_ready(lsb)) { - const stringlist_type * error_list = lsb_get_error_list( lsb ); - stringlist_fprintf(error_list , "\n", stdout); - } - - if (dlopen( "libbat.so" , RTLD_NOW | RTLD_GLOBAL)) - test_assert_true( lsb_ready( lsb )); - else - test_assert_false( lsb_ready( lsb )); - - lsb_free( lsb ); - exit(0); -} diff --git a/ThirdParty/Ert/libjob_queue/tests/job_lsf_exclude_hosts_test.c b/ThirdParty/Ert/libjob_queue/tests/job_lsf_exclude_hosts_test.c deleted file mode 100644 index 634f0392aa..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/job_lsf_exclude_hosts_test.c +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (C) 2016 Statoil ASA, Norway. - * - * This file is part of ERT - Ensemble based Reservoir Tool. - * - * ERT 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. - * - * ERT 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 - * for more details. - */ - -#include -#include -#include - -#include -#include - -#include -#include - -void test_submit(lsf_driver_type * driver, const char * cmd) { - { - char * node1 = "enern"; - char * node2 = "toern"; - char * node3 = "tre-ern.statoil.org"; - char * black1 = util_alloc_sprintf("hname!='%s'", node1); - char * black2 = util_alloc_sprintf("hname!='%s'", node2); - char * black3 = util_alloc_sprintf("hname!='%s'", node3); - char * select = util_alloc_sprintf("select[%s && %s && %s]", black1, black2, black3); - - lsf_driver_add_exclude_hosts(driver, node1); - lsf_driver_add_exclude_hosts(driver, node2); - lsf_driver_add_exclude_hosts(driver, node3); - - { - stringlist_type * argv = lsf_driver_alloc_cmd(driver, "", "NAME", "bsub", 1, 0, NULL); - if (!stringlist_contains(argv, select)) { - printf("%s lsf_driver_alloc_cmd argv does not contain %s\n", __func__, select); - printf("%s lsf_driver_alloc_cmd was %s\n", __func__, stringlist_alloc_joined_string(argv, " ")); - exit(1); - } - } - } -} - -void test_bjobs_parse_hosts() { - const char* full_hostnames = "hname1:4*hname2:13*st-rst666-01-42.st.example.org:1*hname4:hname5\n"; - const char* hostnames = "hname1:hname2:st-rst666-01-42.st.example.org:hname4:hname5"; - stringlist_type * expected = stringlist_alloc_from_split(hostnames,":"); - if (stringlist_get_size(expected) != 5) { - printf("Even expected has wrong size.\n"); - exit(1); - } - - const char * fname = util_alloc_tmp_file("/tmp", "ert_job_exec_host", true); - - FILE * fptr; - fptr = fopen(fname, "w"); - fprintf(fptr, full_hostnames); // : is std bjobs delimiter - fclose(fptr); - - stringlist_type * hosts = lsf_job_alloc_parse_hostnames(fname); - - if (!stringlist_equal(expected, hosts)) { - printf("hosts differ: expected [%s] got [%s]\n", - stringlist_alloc_joined_string(expected, ":"), - stringlist_alloc_joined_string(hosts, ":")); - exit(1); - } - - util_unlink_existing(fname); - free(fname); - stringlist_free( hosts ); -} - -int main(int argc, char ** argv) { - lsf_driver_type * driver = lsf_driver_alloc(); - test_submit(driver, argv[1]); - lsf_driver_free(driver); - test_bjobs_parse_hosts(); - exit(0); -} diff --git a/ThirdParty/Ert/libjob_queue/tests/job_lsf_library_submit_test.c b/ThirdParty/Ert/libjob_queue/tests/job_lsf_library_submit_test.c deleted file mode 100644 index f834ebfdf4..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/job_lsf_library_submit_test.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'job_lsf_submit_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include - -#include -#include - -#include -#include - - - -void test_submit(lsf_driver_type * driver, const char * cmd) { - assert( lsf_driver_set_option(driver , LSF_DEBUG_OUTPUT , "TRUE" ) ); - assert( LSF_SUBMIT_INTERNAL == lsf_driver_get_submit_method( driver )); - { - char * run_path = util_alloc_cwd(); - lsf_job_type * job = lsf_driver_submit_job( driver , cmd , 1 , run_path , "NAME" , 0 , NULL ); - assert( job ); - { - { - int lsf_status = lsf_driver_get_job_status_lsf( driver , job ); - assert( (lsf_status == JOB_STAT_RUN) || (lsf_status == JOB_STAT_PEND) ); - } - - lsf_driver_kill_job( driver , job ); - lsf_driver_set_bjobs_refresh_interval( driver , 0 ); - sleep(1); - - { - int lsf_status = lsf_driver_get_job_status_lsf( driver , job ); - assert( lsf_status == JOB_STAT_EXIT); - } - } - - free( run_path ); - } -} - - - -int main( int argc , char ** argv) { - lsf_driver_type * driver = lsf_driver_alloc(); - test_submit(driver , argv[1]); - lsf_driver_free( driver ); - exit(0); -} diff --git a/ThirdParty/Ert/libjob_queue/tests/job_lsf_parse_bsub_stdout.c b/ThirdParty/Ert/libjob_queue/tests/job_lsf_parse_bsub_stdout.c deleted file mode 100644 index a60c8551a7..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/job_lsf_parse_bsub_stdout.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA, Norway. - - The file 'job_lsf_submit_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include - - -#include "ert/util/build_config.h" - -#include -#include -#include - -#include - - -void test_empty_file() { - const char * stdout_file = "bsub_empty"; - { - FILE * stream = util_fopen(stdout_file , "w"); - fclose( stream ); - } - test_assert_int_equal( lsf_job_parse_bsub_stdout("bsub" , stdout_file ) , 0); -} - - -void test_OK() { - const char * stdout_file = "bsub_OK"; - { - FILE * stream = util_fopen(stdout_file , "w"); - fprintf(stream , "Job <12345> is submitted to default queue .\n"); - fclose( stream ); - } - test_assert_int_equal( lsf_job_parse_bsub_stdout("bsub" , stdout_file ) , 12345); -} - - -void test_file_does_not_exist() { - test_assert_int_equal( lsf_job_parse_bsub_stdout("bsub" , "does/not/exist") , 0); -} - - - -void parse_invalid( void * arg ) { - const char * filename = (const char*) arg; - lsf_job_parse_bsub_stdout("bsub" , filename); -} - - -void test_parse_fail_abort() { - const char * stdout_file = "bsub_abort"; - { - FILE * stream = util_fopen(stdout_file , "w"); - fprintf(stream , "Job 12345 is submitted to default queue .\n"); - fclose( stream ); - } - test_assert_util_abort( "lsf_job_parse_bsub_stdout" , parse_invalid , (void *) stdout_file ); -} - - -int main(int argc, char ** argv) { - test_work_area_type * work_area = test_work_area_alloc( "bsub_parse_stdout"); - { - test_empty_file(); - test_file_does_not_exist( ); - test_OK(); - test_parse_fail_abort(); - } - test_work_area_free( work_area ); -} - - diff --git a/ThirdParty/Ert/libjob_queue/tests/job_lsf_remote_submit_test.c b/ThirdParty/Ert/libjob_queue/tests/job_lsf_remote_submit_test.c deleted file mode 100644 index 8d1aab392a..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/job_lsf_remote_submit_test.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'job_lsf_submit_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include - -#include -#include - -#include -#include - - -void test_submit(lsf_driver_type * driver , const char * server , const char * bsub_cmd , const char * bjobs_cmd , const char * bkill_cmd , const char * cmd) { - - test_assert_true( lsf_driver_set_option(driver , LSF_DEBUG_OUTPUT , "TRUE" ) ); - test_assert_true( lsf_driver_set_option(driver , LSF_SERVER , server ) ); - - if (bsub_cmd != NULL) - test_assert_true( lsf_driver_set_option(driver , LSF_BSUB_CMD , server )); - - if (bjobs_cmd != NULL) - test_assert_true( lsf_driver_set_option(driver , LSF_BJOBS_CMD , server ) ); - - if (bkill_cmd != NULL) - test_assert_true( lsf_driver_set_option(driver , LSF_BKILL_CMD , server )); - - { - char * run_path = util_alloc_cwd(); - lsf_job_type * job = lsf_driver_submit_job( driver , cmd , 1 , run_path , "NAME" , 0 , NULL ); - if (job) { - { - int lsf_status = lsf_driver_get_job_status_lsf( driver , job ); - if (!((lsf_status == JOB_STAT_RUN) || (lsf_status == JOB_STAT_PEND))) - test_error_exit("Got lsf_status:%d expected: %d or %d \n",lsf_status , JOB_STAT_RUN , JOB_STAT_PEND); - } - - lsf_driver_kill_job( driver , job ); - lsf_driver_set_bjobs_refresh_interval( driver , 0 ); - sleep(2); - - { - int lsf_status = 0; - for(int i=0; i < 10; i++){ - lsf_status = lsf_driver_get_job_status_lsf( driver , job ); - if (lsf_status != JOB_STAT_EXIT){ - sleep(2); - }else{ - break; - } - } - if (lsf_status != JOB_STAT_EXIT) - test_error_exit("Got lsf_status:%d expected: %d \n",lsf_status , JOB_STAT_EXIT ); - } - } else - test_error_exit("lsf_driver_submit_job() returned NULL \n"); - - - free( run_path ); - } -} - - -int main( int argc , char ** argv) { - util_install_signals(); - { - int iarg; - lsf_driver_type * driver = lsf_driver_alloc(); - - for (iarg = 2; iarg < argc; iarg++) { - const char * server = argv[iarg]; - printf("Testing lsf server:%s \n",server); - test_submit(driver , server , NULL , NULL , NULL , argv[1]); - } - - lsf_driver_free( driver ); - } - exit(0); -} diff --git a/ThirdParty/Ert/libjob_queue/tests/job_lsf_submit_library_test.c b/ThirdParty/Ert/libjob_queue/tests/job_lsf_submit_library_test.c deleted file mode 100644 index ef327d6df7..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/job_lsf_submit_library_test.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'job_lsf_submit_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include - -#include -#include - -#include -#include - - -void test_submit(lsf_driver_type * driver) { - test_assert_true( lsf_driver_set_option(driver , LSF_DEBUG_OUTPUT , "TRUE" ) ); - test_assert_int_equal( LSF_SUBMIT_INTERNAL , lsf_driver_get_submit_method( driver )); - { - char * run_path = util_alloc_cwd(); - lsf_job_type * job = lsf_driver_submit_job( driver , cmd , 1 , run_path , "NAME" , 0 , NULL ); - if (job) { - { - int lsf_status = lsf_driver_get_job_status_lsf( driver , job ); - if (!((lsf_status == JOB_STAT_RUN) || (lsf_status == JOB_STAT_PEND))) - test_error_exit("Got lsf_status:%d expected: %d or %d \n",lsf_status , JOB_STAT_RUN , JOB_STAT_PEND); - } - - lsf_driver_kill_job( driver , job ); - lsf_driver_set_bjobs_refresh_interval( driver , 0 ); - sleep(1); - - { - int lsf_status = lsf_driver_get_job_status_lsf( driver , job ); - if (lsf_status != JOB_STAT_EXIT) - test_error_exit("Got lsf_status:%d expected: %d \n",lsf_status , JOB_STAT_EXIT ); - } - } else - test_error_exit("lsf_driver_submit_job() returned NULL \n"); - - - free( run_path ); - } -} - - - -int main( int argc , char ** argv) { - lsf_driver_type * driver = lsf_driver_alloc(); - test_submit(driver); - lsf_driver_free( driver ); - exit(0); -} diff --git a/ThirdParty/Ert/libjob_queue/tests/job_lsf_test.c b/ThirdParty/Ert/libjob_queue/tests/job_lsf_test.c deleted file mode 100644 index a4a22b9d99..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/job_lsf_test.c +++ /dev/null @@ -1,95 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'job_lsf_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include - -#include - -#include -#include -#include - - -void test_option(lsf_driver_type * driver , const char * option , const char * value) { - test_assert_true( lsf_driver_set_option( driver , option , value)); - test_assert_string_equal(lsf_driver_get_option( driver , option) , value); -} - - -void test_server(lsf_driver_type * driver , const char * server, lsf_submit_method_enum submit_method) { - lsf_driver_set_option(driver , LSF_SERVER , server ); - test_assert_true( lsf_driver_get_submit_method( driver ) == submit_method ); -} - - -void test_status(int lsf_status , job_status_type job_status) { - test_assert_true( lsf_driver_convert_status( lsf_status ) == job_status); -} - - -/* - This test should ideally be run twice in two different environments; - with and without dlopen() access to the lsf libraries. -*/ - -int main( int argc , char ** argv) { - lsf_driver_type * driver = lsf_driver_alloc(); - - test_option( driver , LSF_BSUB_CMD , "Xbsub"); - test_option( driver , LSF_BJOBS_CMD , "Xbsub"); - test_option( driver , LSF_BKILL_CMD , "Xbsub"); - test_option( driver , LSF_RSH_CMD , "RSH"); - test_option( driver , LSF_LOGIN_SHELL , "shell"); - test_option( driver , LSF_BSUB_CMD , "bsub"); - printf("Options OK\n"); - - { - - lsf_submit_method_enum submit_NULL; - lsb_type * lsb = lsb_alloc(); - if (lsb_ready(lsb)) - submit_NULL = LSF_SUBMIT_INTERNAL; - else - submit_NULL = LSF_SUBMIT_LOCAL_SHELL; - - - test_server( driver , NULL , submit_NULL ); - test_server( driver , "LoCaL" , LSF_SUBMIT_LOCAL_SHELL ); - test_server( driver , "LOCAL" , LSF_SUBMIT_LOCAL_SHELL ); - test_server( driver , "XLOCAL" , LSF_SUBMIT_REMOTE_SHELL ); - test_server( driver , NULL , submit_NULL ); - test_server( driver , "NULL" , submit_NULL ); - test_server( driver , "be-grid01" , LSF_SUBMIT_REMOTE_SHELL ); - printf("Servers OK\n"); - - lsb_free( lsb ); - } - test_status( JOB_STAT_PEND , JOB_QUEUE_PENDING ); - test_status( JOB_STAT_PSUSP , JOB_QUEUE_RUNNING ); - test_status( JOB_STAT_USUSP , JOB_QUEUE_RUNNING ); - test_status( JOB_STAT_SSUSP , JOB_QUEUE_RUNNING ); - test_status( JOB_STAT_RUN , JOB_QUEUE_RUNNING ); - test_status( JOB_STAT_NULL , JOB_QUEUE_NOT_ACTIVE ); - test_status( JOB_STAT_DONE , JOB_QUEUE_DONE ); - test_status( JOB_STAT_EXIT , JOB_QUEUE_EXIT ); - test_status( JOB_STAT_UNKWN , JOB_QUEUE_EXIT ); - test_status( 192 , JOB_QUEUE_DONE ); - printf("Status OK \n"); - - exit(0); -} diff --git a/ThirdParty/Ert/libjob_queue/tests/job_node_test.c b/ThirdParty/Ert/libjob_queue/tests/job_node_test.c deleted file mode 100644 index 02ed8026e8..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/job_node_test.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA, Norway. - - The file 'job_node_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include - -#include "ert/util/build_config.h" - -#include -#include -#include - - -void test_create() { - job_queue_node_type * node = job_queue_node_alloc_simple("name" , "/tmp" , "/bin/ls" , 0 , NULL); - test_assert_true( job_queue_node_is_instance( node )); - job_queue_node_free( node ); -} - - - -void call_get_queue_index( void * arg ) { - job_queue_node_type * node = job_queue_node_safe_cast( arg ); - job_queue_node_get_queue_index( node ); -} - - - - -void test_queue_index() { - job_queue_node_type * node = job_queue_node_alloc_simple( "name" , "/tmp" , "/bin/ls" , 0 , NULL ); - test_assert_util_abort("job_queue_node_get_queue_index" , call_get_queue_index , node ); -} - - -void test_path_does_not_exist() { - job_queue_node_type * node = job_queue_node_alloc_simple( "name" , "does-not-exist" , "/bin/ls" , 0 , NULL); - test_assert_NULL( node ); -} - - -int main( int argc , char ** argv) { - util_install_signals(); - test_create(); - test_queue_index(); - test_path_does_not_exist(); -} diff --git a/ThirdParty/Ert/libjob_queue/tests/job_program.c b/ThirdParty/Ert/libjob_queue/tests/job_program.c deleted file mode 100644 index d57e12a030..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/job_program.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'job_program.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - - -int main( int argc , char ** argv) { - int max_count = 100; - int count = 0; - while (true) { - sleep(1); - count++; - printf("%d/%d \n",count , max_count); - if (count == max_count) - break; - } - exit(0); -} diff --git a/ThirdParty/Ert/libjob_queue/tests/job_program_output.c b/ThirdParty/Ert/libjob_queue/tests/job_program_output.c deleted file mode 100644 index 28cc0ce62a..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/job_program_output.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'job_program.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -int main( int argc , char ** argv) { - int sleep_time; - util_sscanf_int(argv[2], &sleep_time); - sleep(sleep_time); - - char * filename = util_alloc_filename(argv[1], "OK", "status"); - - if (util_file_exists(argv[1])) { - FILE * file = util_fopen(filename, "w"); - fprintf(file, "All good"); - util_fclose(file); - exit(0); - } else - exit(1); -} diff --git a/ThirdParty/Ert/libjob_queue/tests/job_queue_driver_test.c b/ThirdParty/Ert/libjob_queue/tests/job_queue_driver_test.c deleted file mode 100644 index 6f880f9e51..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/job_queue_driver_test.c +++ /dev/null @@ -1,170 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'job_queue_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. - */ -#include -#include - -#include -#include - -#include -#include -#include - -#include -#include - -void job_queue_set_driver_(job_driver_type driver_type) { - job_queue_type * queue = job_queue_alloc(10, "OK", "STATUS", "ERROR"); - queue_driver_type * driver = queue_driver_alloc(driver_type); - test_assert_false(job_queue_has_driver(queue)); - - job_queue_set_driver(queue, driver); - test_assert_true(job_queue_has_driver(queue)); - - job_queue_free(queue); - queue_driver_free(driver); - - -} - -void set_option_max_running_max_running_value_set() { - queue_driver_type * driver_torque = queue_driver_alloc(TORQUE_DRIVER); - test_assert_true(queue_driver_set_option(driver_torque, MAX_RUNNING, "42")); - test_assert_string_equal("42", queue_driver_get_option(driver_torque, MAX_RUNNING)); - queue_driver_free(driver_torque); - - - queue_driver_type * driver_lsf = queue_driver_alloc(LSF_DRIVER); - test_assert_true(queue_driver_set_option(driver_lsf, MAX_RUNNING, "72")); - test_assert_string_equal("72", queue_driver_get_option(driver_lsf, MAX_RUNNING)); - queue_driver_free(driver_lsf); -} - -void set_option_max_running_max_running_option_set() { - queue_driver_type * driver_torque = queue_driver_alloc(TORQUE_DRIVER); - test_assert_true(queue_driver_set_option(driver_torque, MAX_RUNNING, "42")); - test_assert_string_equal("42", queue_driver_get_option(driver_torque, MAX_RUNNING)); - queue_driver_free(driver_torque); - -} - -void set_option_invalid_option_returns_false() { - queue_driver_type * driver_torque = queue_driver_alloc(TORQUE_DRIVER); - test_assert_false(queue_driver_set_option(driver_torque, "MAKS_RUNNING", "42")); - queue_driver_free(driver_torque); -} - -void set_option_invalid_value_returns_false() { - queue_driver_type * driver_torque = queue_driver_alloc(TORQUE_DRIVER); - test_assert_false(queue_driver_set_option(driver_torque, "MAX_RUNNING", "2a")); - queue_driver_free(driver_torque); -} - -void set_option_valid_on_specific_driver_returns_true() { - queue_driver_type * driver_torque = queue_driver_alloc(TORQUE_DRIVER); - test_assert_true(queue_driver_set_option(driver_torque, TORQUE_NUM_CPUS_PER_NODE, "33")); - test_assert_string_equal("33", queue_driver_get_option(driver_torque, TORQUE_NUM_CPUS_PER_NODE)); - queue_driver_free(driver_torque); -} - -void get_driver_option_lists() { - //Torque driver option list - { - queue_driver_type * driver_torque = queue_driver_alloc(TORQUE_DRIVER); - stringlist_type * option_list = stringlist_alloc_new(); - queue_driver_init_option_list(driver_torque, option_list); - - test_assert_true(stringlist_contains(option_list, MAX_RUNNING)); - test_assert_true(stringlist_contains(option_list, TORQUE_QSUB_CMD)); - test_assert_true(stringlist_contains(option_list, TORQUE_QSTAT_CMD)); - test_assert_true(stringlist_contains(option_list, TORQUE_QDEL_CMD)); - test_assert_true(stringlist_contains(option_list, TORQUE_QUEUE)); - test_assert_true(stringlist_contains(option_list, TORQUE_NUM_CPUS_PER_NODE)); - test_assert_true(stringlist_contains(option_list, TORQUE_NUM_NODES)); - test_assert_true(stringlist_contains(option_list, TORQUE_KEEP_QSUB_OUTPUT)); - test_assert_true(stringlist_contains(option_list, TORQUE_CLUSTER_LABEL)); - - stringlist_free(option_list); - queue_driver_free(driver_torque); - } - - //Local driver option list (only general queue_driver options) - { - queue_driver_type * driver_local = queue_driver_alloc(LOCAL_DRIVER); - stringlist_type * option_list = stringlist_alloc_new(); - queue_driver_init_option_list(driver_local, option_list); - - test_assert_true(stringlist_contains(option_list, MAX_RUNNING)); - - stringlist_free(option_list); - queue_driver_free(driver_local); - } - - //Lsf driver option list - { - queue_driver_type * driver_lsf = queue_driver_alloc(LSF_DRIVER); - stringlist_type * option_list = stringlist_alloc_new(); - queue_driver_init_option_list(driver_lsf, option_list); - - test_assert_true(stringlist_contains(option_list, MAX_RUNNING)); - test_assert_true(stringlist_contains(option_list, LSF_QUEUE)); - test_assert_true(stringlist_contains(option_list, LSF_RESOURCE)); - test_assert_true(stringlist_contains(option_list, LSF_SERVER)); - test_assert_true(stringlist_contains(option_list, LSF_RSH_CMD)); - test_assert_true(stringlist_contains(option_list, LSF_LOGIN_SHELL)); - test_assert_true(stringlist_contains(option_list, LSF_BSUB_CMD)); - test_assert_true(stringlist_contains(option_list, LSF_BJOBS_CMD)); - test_assert_true(stringlist_contains(option_list, LSF_BKILL_CMD)); - - stringlist_free(option_list); - queue_driver_free(driver_lsf); - } - - //Rsh driver option list - { - queue_driver_type * driver_rsh = queue_driver_alloc(RSH_DRIVER); - stringlist_type * option_list = stringlist_alloc_new(); - queue_driver_init_option_list(driver_rsh, option_list); - - test_assert_true(stringlist_contains(option_list, MAX_RUNNING)); - test_assert_true(stringlist_contains(option_list, RSH_HOST)); - test_assert_true(stringlist_contains(option_list, RSH_HOSTLIST)); - test_assert_true(stringlist_contains(option_list, RSH_CMD)); - test_assert_true(stringlist_contains(option_list, RSH_CLEAR_HOSTLIST)); - - stringlist_free(option_list); - queue_driver_free(driver_rsh); - } -} - -int main(int argc, char ** argv) { - job_queue_set_driver_(LSF_DRIVER); - job_queue_set_driver_(LOCAL_DRIVER); - job_queue_set_driver_(RSH_DRIVER); - job_queue_set_driver_(TORQUE_DRIVER); - - set_option_max_running_max_running_value_set(); - set_option_max_running_max_running_option_set(); - set_option_invalid_option_returns_false(); - set_option_invalid_value_returns_false(); - - set_option_valid_on_specific_driver_returns_true(); - get_driver_option_lists(); - - exit(0); -} diff --git a/ThirdParty/Ert/libjob_queue/tests/job_queue_manager.c b/ThirdParty/Ert/libjob_queue/tests/job_queue_manager.c deleted file mode 100644 index 98419158c3..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/job_queue_manager.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'job_queue_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. - */ -#include -#include - -#include - -#include -#include - - - - -void test_create() { - job_queue_type * job_queue = job_queue_alloc( 100 , "OK" , "STATUS", "ERROR"); - job_queue_manager_type * manager = job_queue_manager_alloc( job_queue ); - - test_assert_true( job_queue_manager_is_instance( manager )); - - job_queue_manager_free( manager ); - job_queue_free( job_queue ); -} - - - - - - -int main( int argc , char ** argv) { - test_create(); - exit(0); -} - diff --git a/ThirdParty/Ert/libjob_queue/tests/job_queue_stress_task.c b/ThirdParty/Ert/libjob_queue/tests/job_queue_stress_task.c deleted file mode 100644 index b37d97c491..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/job_queue_stress_task.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'job_queue_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include - -#include - - -/* - This is a small test job used by the job_queue_stress_test. The job - does the following: - - 0. Chadir to runpath - 1. Create the file @runfile. - 2. Wait with usleep( @usleep_time ). - 3. Remove the @runfile. - 4. Create new file @OK_file - 5. exit. -*/ - -int main(int argc, char ** argv) { - const char * runpath = argv[1]; - const char * runfile = argv[2]; - const char * OK_file = argv[3]; - - int usleep_time; - - util_chdir( runpath ); - util_sscanf_int( argv[4] , &usleep_time ); - { - FILE * stream = util_fopen( runfile , "w"); - fprintf(stream , "Running ... \n"); - fclose( stream ); - } - usleep( usleep_time ); - util_unlink_existing(runfile); - { - FILE * stream = util_fopen( OK_file , "w"); - fprintf(stream , "OK ... \n"); - fclose( stream ); - } - return 0; -} diff --git a/ThirdParty/Ert/libjob_queue/tests/job_queue_stress_test.c b/ThirdParty/Ert/libjob_queue/tests/job_queue_stress_test.c deleted file mode 100644 index e1a4927def..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/job_queue_stress_test.c +++ /dev/null @@ -1,313 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'job_queue_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. - */ -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -#define JOB_TYPE_ID 77539 -typedef struct { - UTIL_TYPE_ID_DECLARATION; - char * run_path; - bool callback_run; - int queue_index; - int submit_usleep; - int callback_usleep; - int run_usleep; - int argc; - char ** argv; - const char * cmd; -} job_type; - - - -UTIL_SAFE_CAST_FUNCTION( job , JOB_TYPE_ID ) - -job_type * alloc_job( rng_type * rng , const char * cmd) { - const int second = 1000000; - const int submit_min = 0; - const int submit_max = 10 * second; - - const int callback_min = 0.5 * second; - const int callback_max = 2 * second; - - const int run_min = 2 * second; - const int run_max = 10 * second; - - job_type * job = util_malloc( sizeof * job ); - UTIL_TYPE_ID_INIT( job , JOB_TYPE_ID ) - job->callback_run = false; - job->queue_index = -1; - job->submit_usleep = submit_min + rng_get_int( rng , (submit_max - submit_min )); - job->callback_usleep = callback_min + rng_get_int( rng , (callback_max - callback_min )); - job->run_usleep = run_min + rng_get_int( rng , (run_max - run_min )); - job->run_path = util_alloc_sprintf("%08d", rng_get_int(rng , 100000000)); - job->cmd = cmd; - job->argc = 4; - - job->argv = util_malloc( 4 * sizeof * job->argv ); - job->argv[0] = job->run_path; - job->argv[1] = "RUNNING"; - job->argv[2] = "OK"; - job->argv[3] = util_alloc_sprintf("%d", job->run_usleep); - - util_make_path( job->run_path ); - return job; -} - - -job_type ** alloc_jobs( rng_type * rng , int num_jobs , const char * cmd) { - job_type ** jobs = util_malloc( num_jobs * sizeof * jobs ); - for (int i=0; i < num_jobs; i++) { - job_type * job = alloc_job( rng , cmd); - job_safe_cast( job ); - jobs[i] = job; - } - return jobs; -} - - - -bool callback( void * arg ) { - job_type * job = job_safe_cast( arg ); - usleep( job->callback_usleep ); - job->callback_run = true; - return true; -} - - -void * submit_job__( void * arg ) { - arg_pack_type * arg_pack = arg_pack_safe_cast( arg ); - job_type * job = job_safe_cast( arg_pack_iget_ptr( arg_pack , 0 ) ); - job_queue_type * queue = arg_pack_iget_ptr( arg_pack , 1 ); - job->queue_index = job_queue_add_job( queue , job->cmd , callback , NULL , NULL , job , 1 , job->run_path , job->run_path , job->argc , (const char **) job->argv ); - - if (job->queue_index >= 0) - usleep( job->submit_usleep ); - return NULL; -} - - -void submit_jobs( job_queue_type * queue , int num_jobs , job_type ** jobs , thread_pool_type * tp) { - for (int i=0; i < num_jobs; i++) { - job_type * job = jobs[i]; - arg_pack_type * arg = arg_pack_alloc(); - arg_pack_append_ptr( arg , job ); - arg_pack_append_ptr( arg , queue ); - thread_pool_add_job(tp , submit_job__ , arg ); - } -} - - -void check_jobs( int num_jobs , job_type ** jobs ) { - for (int i=0; i < num_jobs; i++) { - job_type * job = jobs[i]; - if (!job->callback_run) - fprintf(stderr,"The callback has not been registered on job:%d/%d \n",i,job->queue_index); - test_assert_true( job->callback_run ); - } -} - - -void * global_status( void * arg ) { - arg_pack_type * arg_pack = arg_pack_safe_cast( arg ); - job_queue_type * job_queue = job_queue_safe_cast( arg_pack_iget_ptr( arg_pack , 0 )); - bool user_exit = arg_pack_iget_bool( arg_pack , 1 ); - bool exit_called = false; - int counter = 0; - int signature = -1; - while (true) { - util_usleep(100000); - - if (job_queue_get_num_complete(job_queue) == job_queue_get_active_size(job_queue)) - break; - - if ((counter % 10) == 0) - printf("Waiting:%03d Running:%03d Callback:%03d Complete:%03d \n", - job_queue_get_num_waiting(job_queue) , - job_queue_get_num_running(job_queue), - job_queue_get_num_callback( job_queue ) , - job_queue_get_num_complete(job_queue)); - - counter++; - - if (user_exit && (job_queue_get_num_complete( job_queue ) >= job_queue_get_active_size(job_queue)/2)) { - - if (job_queue_accept_jobs( job_queue )) { - exit_called = true; - job_queue_start_user_exit( job_queue ); - } - } - - if (exit_called) { - int w = job_queue_get_num_waiting(job_queue); - int r = job_queue_get_num_running(job_queue); - int c = job_queue_get_num_callback( job_queue ); - int f = job_queue_get_num_complete(job_queue); - int new = (w + r*256 + c *256*256 + f *256*256*256); - - if (new == signature) - break; - else - signature = new; - } - } - arg_pack_free( arg_pack ); - return NULL; -} - - -void * status_job__( void * arg ) { - const int usleep_time = 10000; - arg_pack_type * arg_pack = arg_pack_safe_cast( arg ); - job_type * job = job_safe_cast( arg_pack_iget_ptr( arg_pack , 0 ) ); - job_queue_type * queue = arg_pack_iget_ptr( arg_pack , 1 ); - bool user_exit = arg_pack_iget_bool( arg_pack , 2 ); - char * run_file = util_alloc_filename( job->run_path , "RUNNING" , NULL); - - while (true) { - if (job->queue_index >= 0) { - job_status_type status; - if (util_is_file(run_file)) { - status = job_queue_iget_job_status(queue, job->queue_index); - if (util_is_file(run_file)) { - bool status_true = (status == JOB_QUEUE_RUNNING) || (status == JOB_QUEUE_SUBMITTED || (status == JOB_QUEUE_RUNNING_CALLBACK) || (status == JOB_QUEUE_DONE)); - if (!status_true) { - if (user_exit) - status_true = (status == JOB_QUEUE_DO_KILL) || (status == JOB_QUEUE_IS_KILLED || (status == JOB_QUEUE_RUNNING_CALLBACK)); - } - if (!status_true) - fprintf(stderr," Invalid status:%d for job:%d \n",status , job->queue_index ); - test_assert_true( status_true ); - } - } - status = job_queue_iget_job_status(queue, job->queue_index); - if ((status == JOB_QUEUE_SUCCESS) || (status == JOB_QUEUE_IS_KILLED)) - break; - } else { - if (!job_queue_accept_jobs(queue)) - break; - } - - usleep( usleep_time ); - } - - arg_pack_free( arg_pack ); - free( run_file ); - return NULL; -} - - - -void status_jobs( job_queue_type * queue , int num_jobs , bool user_exit , job_type ** jobs , thread_pool_type * tp) { - for (int i=0; i < num_jobs; i++) { - job_type * job = jobs[i]; - arg_pack_type * arg = arg_pack_alloc(); - arg_pack_append_ptr( arg , job ); - arg_pack_append_ptr( arg , queue ); - arg_pack_append_bool( arg , user_exit ); - thread_pool_add_job(tp , status_job__ , arg ); - } - { - arg_pack_type * arg_pack = arg_pack_alloc( ); - - arg_pack_append_ptr( arg_pack , queue ); - arg_pack_append_bool( arg_pack , user_exit ); - thread_pool_add_job( tp , global_status , arg_pack ); - } -} - - -/* - The purpose of this test is to stress the queue system with a - massively multithreaded workload. The test will submit jobs, let - them run and run a callback. The various elements are pimped with - usleep() calls to ensure that all of these actions: - - 1. Submit - 2. Run callback - 3. Check status - - Are performed concurrently. The total runtime of the test should be - ~ 120 seconds. -*/ - - -int main(int argc , char ** argv) { - const int queue_timeout = 180; - const int submit_timeout = 180; - const int status_timeout = 180; - const int number_of_jobs = 50; - const int submit_threads = number_of_jobs / 10 ; - const int status_threads = number_of_jobs + 1; - const char * job = util_alloc_abs_path(argv[1]); - rng_type * rng = rng_alloc( MZRAN , INIT_CLOCK ); - bool user_exit; - test_work_area_type * work_area = test_work_area_alloc("job_queue"); - job_type **jobs = alloc_jobs( rng , number_of_jobs , job); - - job_queue_type * queue = job_queue_alloc(number_of_jobs, "OK", "STATUS", "ERROR"); - queue_driver_type * driver = queue_driver_alloc_local(); - job_queue_manager_type * queue_manager = job_queue_manager_alloc( queue ); - - util_install_signals(); - util_sscanf_bool(argv[2] , &user_exit); - job_queue_set_driver(queue, driver); - job_queue_manager_start_queue(queue_manager, 0, false , true); - - { - thread_pool_type * status_pool = thread_pool_alloc( status_threads , true ); - thread_pool_type * submit_pool = thread_pool_alloc( submit_threads , true ); - - submit_jobs( queue , number_of_jobs , jobs , submit_pool ); - status_jobs( queue , number_of_jobs , user_exit , jobs , status_pool ); - - if (!thread_pool_try_join( submit_pool , submit_timeout )) - util_exit("Joining submit pool failed \n"); - thread_pool_free( submit_pool ); - job_queue_submit_complete(queue); - if (!thread_pool_try_join( status_pool , status_timeout)) - util_exit("Joining status pool failed \n"); - thread_pool_free( status_pool ); - } - - if (!job_queue_manager_try_wait(queue_manager , queue_timeout)) - util_exit("job_queue never completed \n"); - - job_queue_manager_free(queue_manager); - job_queue_free(queue); - if (!user_exit) - check_jobs( number_of_jobs , jobs ); - - queue_driver_free(driver); - test_work_area_free(work_area); - rng_free( rng ); -} diff --git a/ThirdParty/Ert/libjob_queue/tests/job_queue_timeout_test.c b/ThirdParty/Ert/libjob_queue/tests/job_queue_timeout_test.c deleted file mode 100644 index 041bf9314d..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/job_queue_timeout_test.c +++ /dev/null @@ -1,149 +0,0 @@ -/* - Copyright (C) 2016 Statoil ASA, Norway. - - This file is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. - */ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - - -#define JOB_TYPE_ID 77539 -typedef struct -{ - UTIL_TYPE_ID_DECLARATION; - char * run_path; - bool callback_run; - int queue_index; - int submit_usleep; - int callback_usleep; - int run_usleep; - int argc; - char ** argv; - const char * cmd; -} job_type; - -UTIL_SAFE_CAST_FUNCTION(job, JOB_TYPE_ID) - -job_type * alloc_job(int ind, const char * cmd) { - job_type * job = util_malloc(sizeof *job); - UTIL_TYPE_ID_INIT(job, JOB_TYPE_ID) - job->callback_run = false; - job->queue_index = -1; - job->submit_usleep = 0; - job->callback_usleep = 0; - job->run_usleep = 2 * 1000*1000; // 4 sec - job->run_path = util_alloc_sprintf("timeout_test_%d", ind); - job->cmd = cmd; - job->argc = 4; - - job->argv = util_malloc(4 * sizeof *job->argv); - job->argv[0] = job->run_path; - job->argv[1] = "RUNNING"; - job->argv[2] = "OK"; - job->argv[3] = util_alloc_sprintf("%d", job->run_usleep); - - util_make_path(job->run_path); - return job; -} - -job_type ** alloc_jobs(int num_jobs, const char * cmd) { - job_type ** jobs = util_malloc(num_jobs * sizeof *jobs); - for (int i = 0; i < num_jobs; i++) { - job_type * job = alloc_job(i, cmd); - job_safe_cast(job); - jobs[i] = job; - } - return jobs; -} - - -void submit_jobs(job_queue_type * queue, int num_jobs, job_type ** jobs) { - for (int i = 0; i < num_jobs; i++) { - job_type * job = jobs[i]; - - job->queue_index = job_queue_add_job(queue, job->cmd, NULL, NULL, NULL, job, 1, job->run_path, job->run_path, - job->argc, (const char **) job->argv); - } -} - -void check_jobs(int num_jobs, job_type ** jobs) { - for (int i = 0; i < num_jobs; i++) { - job_type * job = jobs[i]; - if (!job->callback_run) - fprintf(stderr, "The callback has not been registered on job:%d/%d \n", i, job->queue_index); - test_assert_true(job->callback_run); - } -} - -int main(int argc, char ** argv) { - setbuf(stdout, NULL); - - const int number_of_jobs = 1; - util_alloc_abs_path(argv[1]); - - const int running_timeout = 0; - const int sec = 1000*1000; - - test_work_area_type * work_area = test_work_area_alloc("job_timeout"); - test_work_area_set_store(work_area, true); - - job_type **jobs = alloc_jobs(number_of_jobs, argv[1]); - - job_queue_type * queue = job_queue_alloc(number_of_jobs, "OK", "DOES_NOT_EXIST", "ERROR"); - queue_driver_type * driver = queue_driver_alloc_local(); - job_queue_manager_type * queue_manager = job_queue_manager_alloc(queue); - - util_install_signals(); - job_queue_set_driver(queue, driver); - job_queue_manager_start_queue(queue_manager, number_of_jobs, false, true); - - { - submit_jobs(queue, number_of_jobs, jobs); - - if (job_queue_get_active_size(queue) > 0) { - job_queue_iset_max_confirm_wait_time(queue, 0, running_timeout); // job 0 - } else { - util_exit("Job failed to be queued!\n"); - } - - usleep(1 * sec); // 1.0 sec - int job_status = job_queue_iget_job_status(queue, 0); - - if (job_status != JOB_QUEUE_IS_KILLED) { - util_exit("Job should have been killed, had status %d != %d\n", job_status, JOB_QUEUE_IS_KILLED); - } - } - if (!job_queue_manager_try_wait(queue_manager, 5 * sec)) - util_exit("job_queue never completed \n"); - job_queue_manager_free(queue_manager); - job_queue_free(queue); - queue_driver_free(driver); - test_work_area_free(work_area); -} diff --git a/ThirdParty/Ert/libjob_queue/tests/job_status_test.c b/ThirdParty/Ert/libjob_queue/tests/job_status_test.c deleted file mode 100644 index 2dca4b664d..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/job_status_test.c +++ /dev/null @@ -1,126 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA, Norway. - - The file 'job_status_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include "ert/util/build_config.h" - -#include -#include -#include -#include - - -void call_get_status( void * arg ) { - job_queue_status_type * job_status = job_queue_status_safe_cast( arg ); - job_queue_status_get_count( job_status , JOB_QUEUE_DONE + JOB_QUEUE_DO_KILL); -} - - - -void test_create() { - job_queue_status_type * status = job_queue_status_alloc(); - test_assert_true( job_queue_status_is_instance( status )); - test_assert_int_equal( job_queue_status_get_count( status , JOB_QUEUE_DONE ) , 0 ); - test_assert_util_abort( "STATUS_INDEX" , call_get_status , status ); - job_queue_status_free( status ); -} - - -void * add_sim( void * arg ) { - job_queue_status_type * job_status = job_queue_status_safe_cast( arg ); - job_queue_status_inc( job_status , JOB_QUEUE_WAITING ); - return NULL; -} - - -void * user_exit( void * arg ) { - job_queue_status_type * job_status = job_queue_status_safe_cast( arg ); - job_queue_status_transition( job_status , JOB_QUEUE_WAITING , JOB_QUEUE_DO_KILL); - return NULL; -} - - -void * user_done( void * arg ) { - job_queue_status_type * job_status = job_queue_status_safe_cast( arg ); - job_queue_status_transition( job_status , JOB_QUEUE_WAITING , JOB_QUEUE_DONE); - return NULL; -} - - - -void test_update() { - int N = 15000; - pthread_t * thread_list = util_malloc( 2*N*sizeof * thread_list); - int num_exit_threads = 0; - int num_done_threads = 0; - job_queue_status_type * status = job_queue_status_alloc(); - - test_assert_int_equal( 0 , job_queue_status_get_total_count( status )); - for (int i=0; i < 2*N; i++) - add_sim( status ); - test_assert_int_equal( 2*N , job_queue_status_get_count( status , JOB_QUEUE_WAITING )); - - { - int i = 0; - while (true) { - int thread_status; - - if ((i % 2) == 0) { - thread_status = pthread_create( &thread_list[i] , NULL , user_exit , status ); - if (thread_status == 0) - num_exit_threads++; - else - break; - } else { - thread_status = pthread_create( &thread_list[i] , NULL , user_done , status ); - if (thread_status == 0) - num_done_threads++; - else - break; - } - - i++; - if (i == N) - break; - } - } - if ((num_done_threads + num_exit_threads) == 0) { - fprintf(stderr, "Hmmm - not a single thread created - very suspicious \n"); - exit(1); - } - - for (int i=0; i < num_done_threads + num_exit_threads; i++) - pthread_join( thread_list[i] , NULL ); - - test_assert_int_equal( 2*N - num_done_threads - num_exit_threads , job_queue_status_get_count( status , JOB_QUEUE_WAITING )); - test_assert_int_equal( num_exit_threads , job_queue_status_get_count( status , JOB_QUEUE_DO_KILL )); - test_assert_int_equal( num_done_threads , job_queue_status_get_count( status , JOB_QUEUE_DONE )); - - test_assert_int_equal( 2*N , job_queue_status_get_total_count( status )); - job_queue_status_free( status ); -} - - -int main( int argc , char ** argv) { - util_install_signals(); - test_create(); - test_update(); -} diff --git a/ThirdParty/Ert/libjob_queue/tests/job_torque_submit_test.c b/ThirdParty/Ert/libjob_queue/tests/job_torque_submit_test.c deleted file mode 100644 index 64785efc18..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/job_torque_submit_test.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'job_torque_submit_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. - */ -#include -#include -#include - -#include -#include - -#include - -void test_submit(torque_driver_type * driver, const char * cmd) { - char * run_path = util_alloc_cwd(); - torque_job_type * job = torque_driver_submit_job(driver, cmd, 1, run_path, "TEST-TORQUE-SUBMIT", 0, NULL); - - if (job != NULL) { - int torque_status = torque_driver_get_job_status(driver, job); - if (!((torque_status == JOB_QUEUE_RUNNING) || (torque_status == JOB_QUEUE_PENDING))) { - test_exit("After start of job, the status is %d, it should have been JOB_QUEUE_RUNNING(%d) or JOB_QUEUE_PENDING (%d). Other statuses are JOB_QUEUE_EXIT(%d) and JOB_QUEUE_FAILED(%d)\n", torque_status, JOB_QUEUE_RUNNING, JOB_QUEUE_PENDING, JOB_QUEUE_EXIT, JOB_QUEUE_FAILED); - } - - torque_driver_kill_job(driver, job); - printf("Waiting 2 seconds"); - for (int i = 0; i < 2; i++) { - printf("."); - fflush(stdout); - sleep(1); - } - printf("\n"); - - torque_status = torque_driver_get_job_status(driver, job); - if (torque_status != JOB_QUEUE_EXIT && torque_status != JOB_QUEUE_DONE) { - exit(1); - test_exit("After kill of job, the status is %d, it should have been JOB_QUEUE_EXIT, which is %d\n", torque_status, JOB_QUEUE_EXIT); - } - } else { - exit(1); - test_exit("Function %s returned null-pointer to job, terminating test.", "torque_driver_submit_job"); - } - - free(run_path); - torque_driver_free_job(job); -} - -void test_submit_nocommand(torque_driver_type * driver) { - test_submit(driver, NULL); -} - -int main(int argc, char ** argv) { - torque_driver_type * driver = torque_driver_alloc(); - if (argc == 1) { - test_submit_nocommand(driver); - } else if (argc == 2) { - test_submit(driver, argv[1]); - } else { - printf("Only accepts zero or one arguments (the job script to run)\n"); - exit(1); - } - printf("Submit, status and kill OK\n"); - torque_driver_free(driver); - - exit(0); -} diff --git a/ThirdParty/Ert/libjob_queue/tests/job_torque_test.c b/ThirdParty/Ert/libjob_queue/tests/job_torque_test.c deleted file mode 100644 index 11f27602b3..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/job_torque_test.c +++ /dev/null @@ -1,129 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'job_lsf_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. - */ -#include -#include -#include - -#include -#include -#include -#include - -void test_option(torque_driver_type * driver, const char * option, const char * value) { - test_assert_true(torque_driver_set_option(driver, option, value)); - test_assert_string_equal(torque_driver_get_option(driver, option), value); -} - -void setoption_setalloptions_optionsset() { - torque_driver_type * driver = torque_driver_alloc(); - - test_option(driver, TORQUE_QSUB_CMD, "XYZaaa"); - test_option(driver, TORQUE_QSTAT_CMD, "xyZfff"); - test_option(driver, TORQUE_QDEL_CMD, "ZZyfff"); - test_option(driver, TORQUE_QUEUE, "superhigh"); - test_option(driver, TORQUE_NUM_CPUS_PER_NODE, "42"); - test_option(driver, TORQUE_NUM_NODES, "36"); - test_option(driver, TORQUE_KEEP_QSUB_OUTPUT, "1"); - test_option(driver, TORQUE_KEEP_QSUB_OUTPUT, "0"); - test_option(driver, TORQUE_CLUSTER_LABEL, "thecluster"); - test_option(driver, TORQUE_JOB_PREFIX_KEY, "coolJob"); - - test_assert_int_equal( 0 , torque_driver_get_submit_sleep(driver)); - test_assert_NULL( torque_driver_get_debug_stream(driver) ); - - test_assert_true( torque_driver_set_option( driver , TORQUE_SUBMIT_SLEEP , "0.25")); - test_assert_int_equal( 250000 , torque_driver_get_submit_sleep(driver)); - - test_assert_true( torque_driver_set_option( driver , TORQUE_DEBUG_OUTPUT , "/tmp/torqueue_debug.txt")); - test_assert_not_NULL( torque_driver_get_debug_stream(driver) ); - - printf("Options OK\n"); - torque_driver_free(driver); -} - -void setoption_set_typed_options_wrong_format_returns_false() { - torque_driver_type * driver = torque_driver_alloc(); - test_assert_false(torque_driver_set_option(driver, TORQUE_NUM_CPUS_PER_NODE, "42.2")); - test_assert_false(torque_driver_set_option(driver, TORQUE_NUM_CPUS_PER_NODE, "fire")); - test_assert_false(torque_driver_set_option(driver, TORQUE_NUM_NODES, "42.2")); - test_assert_false(torque_driver_set_option(driver, TORQUE_NUM_NODES, "fire")); - test_assert_true(torque_driver_set_option(driver, TORQUE_KEEP_QSUB_OUTPUT, "true")); - test_assert_true(torque_driver_set_option(driver, TORQUE_KEEP_QSUB_OUTPUT, "1")); - test_assert_false(torque_driver_set_option(driver, TORQUE_KEEP_QSUB_OUTPUT, "ja")); - test_assert_false(torque_driver_set_option(driver, TORQUE_KEEP_QSUB_OUTPUT, "22")); - test_assert_false(torque_driver_set_option(driver, TORQUE_KEEP_QSUB_OUTPUT, "1.1")); - test_assert_false(torque_driver_set_option(driver, TORQUE_SUBMIT_SLEEP, "X45")); -} - -void getoption_nooptionsset_defaultoptionsreturned() { - torque_driver_type * driver = torque_driver_alloc(); - test_assert_string_equal(torque_driver_get_option(driver, TORQUE_QSUB_CMD), TORQUE_DEFAULT_QSUB_CMD); - test_assert_string_equal(torque_driver_get_option(driver, TORQUE_QSTAT_CMD), TORQUE_DEFAULT_QSTAT_CMD); - test_assert_string_equal(torque_driver_get_option(driver, TORQUE_QDEL_CMD), TORQUE_DEFAULT_QDEL_CMD); - test_assert_string_equal(torque_driver_get_option(driver, TORQUE_KEEP_QSUB_OUTPUT), "0"); - test_assert_string_equal(torque_driver_get_option(driver, TORQUE_NUM_CPUS_PER_NODE), "1"); - test_assert_string_equal(torque_driver_get_option(driver, TORQUE_NUM_NODES), "1"); - test_assert_string_equal(torque_driver_get_option(driver, TORQUE_CLUSTER_LABEL), NULL ); - test_assert_string_equal(torque_driver_get_option(driver, TORQUE_JOB_PREFIX_KEY), NULL); - - printf("Default options OK\n"); - torque_driver_free(driver); -} - -void create_submit_script_script_according_to_input() { - test_work_area_type * work_area = test_work_area_alloc("job_torque_test" ); - const char * script_filename = "qsub_script.sh"; - - { - char ** args = util_calloc(2, sizeof * args); - args[0] = "/tmp/jaja/"; - args[1] = "number2arg"; - torque_job_create_submit_script(script_filename, "job_program.py", 2, (const char **) args); - free( args ); - } - - { - FILE* file_stream = util_fopen(script_filename, "r"); - bool at_eof = false; - - char * line = util_fscanf_alloc_line(file_stream, &at_eof); - test_assert_string_equal("#!/bin/sh", line); - free(line); - - line = util_fscanf_alloc_line(file_stream, &at_eof); - test_assert_string_equal("job_program.py /tmp/jaja/ number2arg", line); - free(line); - - line = util_fscanf_alloc_line(file_stream, &at_eof); - free(line); - test_assert_true(at_eof); - - fclose(file_stream); - } - test_work_area_free( work_area ); -} - - -int main(int argc, char ** argv) { - getoption_nooptionsset_defaultoptionsreturned(); - setoption_setalloptions_optionsset(); - - setoption_set_typed_options_wrong_format_returns_false(); - create_submit_script_script_according_to_input(); - exit(0); -} diff --git a/ThirdParty/Ert/libjob_queue/tests/job_workflow_test.c b/ThirdParty/Ert/libjob_queue/tests/job_workflow_test.c deleted file mode 100644 index 22c8481f43..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/job_workflow_test.c +++ /dev/null @@ -1,182 +0,0 @@ -/* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'job_workflow_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include -#include - - -void create_workflow( const char * workflow_file , const char * tmp_file , int value) { - FILE * stream = util_fopen( workflow_file , "w"); - fprintf(stream , "CREATE_FILE %s %d\n" , tmp_file , value); - fprintf(stream , "READ_FILE %s\n" , tmp_file ); - fclose( stream ); - - printf("Have created:%s \n",workflow_file ); -} - - -void create_error_workflow( const char * workflow_file , const char * tmp_file , int value) { - FILE * stream = util_fopen( workflow_file , "w"); - fprintf(stream , "CREATE_FILE %s %d\n" , tmp_file , value); - fprintf(stream , "XREAD_FILE %s\n" , tmp_file ); - fclose( stream ); - - printf("Have created:%s \n",workflow_file ); -} - - -void * read_file( void * self , const stringlist_type * args) { - printf("Running read_file \n"); - int * value = (int *) self; - FILE * stream = util_fopen(stringlist_iget(args , 0 ) , "r"); - fscanf(stream , "%d" , value ); - fclose( stream ); - { - int * return_value = util_malloc( sizeof * return_value ); - return_value[0] = value[0]; - - return return_value; - } -} - - -static void create_exjob( const char * workflow , const char * bin_path) -{ - FILE * stream = util_fopen( workflow , "w"); - fprintf(stream , "EXECUTABLE \"%s/create_file\"\n" , bin_path); - fprintf(stream , "ARG_TYPE 1 INT\n"); - fprintf(stream , "MIN_ARG 2\n"); - fprintf(stream , "MAX_ARG 2\n"); - fclose(stream); -} - - -void test_has_job(const char * job) { - workflow_joblist_type * joblist = workflow_joblist_alloc(); - - test_assert_false( workflow_joblist_has_job( joblist , "NoNotThis")); - test_assert_true( workflow_joblist_add_job_from_file( joblist , "CREATE_FILE" , job) ); - test_assert_true( workflow_joblist_has_job( joblist , "CREATE_FILE")); - - workflow_joblist_free( joblist ); -} - - -int main( int argc , char ** argv) { - const char * exjob_file = "job"; - const char * bin_path = argv[1]; - const char * internal_workflow = argv[2]; - test_work_area_type * work_area = test_work_area_alloc( "job_workflow_test" ); - - signal(SIGSEGV , util_abort_signal); - create_exjob( exjob_file , bin_path ); - test_has_job( exjob_file ); - { - - int int_value = rand(); - int read_value = 100; - workflow_joblist_type * joblist = workflow_joblist_alloc(); - - if (!workflow_joblist_add_job_from_file( joblist , "CREATE_FILE" , exjob_file)) { - remove( exjob_file ); - test_error_exit("Loading job CREATE_FILE failed\n"); - } else - remove( exjob_file ); - - if (!workflow_joblist_add_job_from_file( joblist , "READ_FILE" , internal_workflow)) - test_error_exit("Loading job READ_FILE failed\n"); - - { - config_parser_type * workflow_compiler = workflow_joblist_get_compiler( joblist ); - if (config_get_schema_size( workflow_compiler ) != 2) - test_error_exit("Config compiler - wrong size \n"); - } - - - { - const char * workflow_file = "workflow"; - const char * tmp_file = "fileX"; - workflow_type * workflow; - - create_workflow( workflow_file , tmp_file , int_value ); - workflow = workflow_alloc(workflow_file , joblist ); - unlink( workflow_file ); - - { - bool runOK; - runOK = workflow_run( workflow , &read_value , false , NULL); - if (runOK) { - if (int_value != read_value) - test_error_exit("Wrong numeric value read back \n"); - - test_assert_int_equal( workflow_get_stack_size( workflow ) , 2 ); - test_assert_not_NULL( workflow_iget_stack_ptr( workflow , 0 ) ); - test_assert_NULL( workflow_iget_stack_ptr( workflow , 1 ) ); - - { - void * return_value = workflow_iget_stack_ptr( workflow , 0 ); - int return_int = *((int *) return_value); - if (int_value != return_int) - test_error_exit("Wrong numeric value read back \n"); - - test_assert_not_NULL( workflow_pop_stack( workflow )); - test_assert_NULL( workflow_pop_stack( workflow )); - test_assert_int_equal( workflow_get_stack_size( workflow ) , 0 ); - - free( return_value ); - - } - } else { - unlink( tmp_file ); - test_error_exit("Workflow did not run\n"); - } - unlink( tmp_file ); - } - } - workflow_joblist_free( joblist ); - - } - { - workflow_joblist_type * joblist = workflow_joblist_alloc(); - const char * workflow_file = "workflow"; - const char * tmp_file = "fileX"; - int read_value; - int int_value = 100; - workflow_type * workflow; - - create_workflow( workflow_file , tmp_file , int_value ); - workflow = workflow_alloc(workflow_file , joblist ); - unlink( workflow_file ); - test_assert_false( workflow_run( workflow , &read_value , false , NULL) ); - test_assert_int_equal( workflow_get_stack_size( workflow ) , 0 ); - } - test_work_area_free( work_area ); - exit(0); -} diff --git a/ThirdParty/Ert/libjob_queue/tests/lsf_tests.cmake b/ThirdParty/Ert/libjob_queue/tests/lsf_tests.cmake deleted file mode 100644 index b7336f97fb..0000000000 --- a/ThirdParty/Ert/libjob_queue/tests/lsf_tests.cmake +++ /dev/null @@ -1,57 +0,0 @@ -# The testing of the lsf submit capabilities is quite troublesome for -# two reasons, and therefor by default disabled: -# -# -# 1. The shell based LSF commands require that user running the -# bsub/bjobs/bxxx command has passwordless ssh configured to log in -# to the lsf server. When the build and testing is run as a common -# 'jenkins' user this becomes difficult. -# -# 2. Submitting through the lsf library requires that the build/test -# server actually is a LIM host; which it typically is not. -# -#----------------------------------------------------------------- -# -# This should be a space separated list of servers which will be -# tried out when testing the LSF submit capability. The test program -# will interpret the special strings 'NULL' and 'LOCAL' as follows: -# -# NULL: Submit using the linked in library functions. -# LOCAL: Submit using shell commands on the current server -# -set(LSF_SERVER "" CACHE STRING "List of LSF servers for testing") - -if (HAVE_LSF_LIBRARY) - add_executable( job_lsf_test job_lsf_test.c ) - target_link_libraries( job_lsf_test job_queue util test_util ) - add_test( job_lsf_test ${EXECUTABLE_OUTPUT_PATH}/job_lsf_test ) -endif() - - - -if (HAVE_LSF_LIBRARY) - add_executable( job_lsb job_lsb.c ) - target_link_libraries( job_lsb job_queue util test_util ) - add_test( job_lsb ${EXECUTABLE_OUTPUT_PATH}/job_lsb ) -endif() - -add_executable( job_lsf_remote_submit_test job_lsf_remote_submit_test.c ) -target_link_libraries( job_lsf_remote_submit_test job_queue util test_util ) - -add_executable( job_lsf_library_submit_test job_lsf_library_submit_test.c ) -target_link_libraries( job_lsf_library_submit_test job_queue util ) - -add_executable( job_program job_program.c ) - -if (LSF_SERVER) - add_test( job_lsf_remote_submit_test ${EXECUTABLE_OUTPUT_PATH}/job_lsf_remote_submit_test ${EXECUTABLE_OUTPUT_PATH}/job_program ${LSF_SERVER} NULL LOCAL) -else() - add_test( job_lsf_remote_submit_test ${EXECUTABLE_OUTPUT_PATH}/job_lsf_remote_submit_test ${EXECUTABLE_OUTPUT_PATH}/job_program NULL LOCAL) -endif() -set_property( TEST job_lsf_remote_submit_test PROPERTY LABELS StatoilData) - -# The test program is installed - actually running the test must be -# handled completely on the outside of this build system. -if (INSTALL_ERT) - install(TARGETS job_program job_lsf_library_submit_test DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) -endif() diff --git a/ThirdParty/Ert/librms/CMakeLists.txt b/ThirdParty/Ert/librms/CMakeLists.txt deleted file mode 100644 index 2e88f5e50d..0000000000 --- a/ThirdParty/Ert/librms/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -add_subdirectory( src ) -if (BUILD_APPLICATIONS) - add_subdirectory( applications ) -endif() - -if (BUILD_TESTS) - add_subdirectory( tests ) -endif() - - diff --git a/ThirdParty/Ert/librms/applications/CMakeLists.txt b/ThirdParty/Ert/librms/applications/CMakeLists.txt deleted file mode 100644 index 48cbff4f02..0000000000 --- a/ThirdParty/Ert/librms/applications/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ -add_executable( rms_extract rms_extract.c ) -add_executable( rms_setname rms_setname.c ) -add_executable( rms_stat rms_stat.c ) -add_executable( rms_test rms_test.c ) -add_executable( tag_list tag_list.c ) - - -set(program_list rms_extract rms_setname rms_stat rms_test tag_list) -foreach(prog ${program_list}) - target_link_libraries( ${prog} rms ecl util ) - if (USE_RUNPATH) - add_runpath( ${prog} ) - endif() - - #----------------------------------------------------------------- - - set (destination ${CMAKE_INSTALL_PREFIX}/bin) - - if (INSTALL_ERT) - install(TARGETS ${prog} DESTINATION ${destination}) - if (INSTALL_GROUP) - install(CODE "EXECUTE_PROCESS(COMMAND chgrp ${INSTALL_GROUP} ${destination}/${prog})") - install(CODE "EXECUTE_PROCESS(COMMAND chmod g+w ${destination}/${prog})") - endif() - endif() -endforeach() diff --git a/ThirdParty/Ert/librms/applications/rms_extract.c b/ThirdParty/Ert/librms/applications/rms_extract.c deleted file mode 100644 index cffd6dad58..0000000000 --- a/ThirdParty/Ert/librms/applications/rms_extract.c +++ /dev/null @@ -1,104 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'rms_extract.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include - -#include -#include -#include - - -void split_name(const char * arg, char **_old_name , char **_new_name) { - char * new_name; - char * old_name; - int i; - int old_name_len = 0; - - for (i=0; i < strlen(arg); i++) { - if (arg[i] == '=') - old_name_len = i; - } - - if (old_name_len > 0) { - old_name = util_alloc_substring_copy(arg , 0 , old_name_len); - new_name = util_alloc_string_copy(&arg[old_name_len + 1]); - } else { - old_name = util_alloc_string_copy(arg); - new_name = old_name; - } - - *_old_name = old_name; - *_new_name = new_name; -} - - - - -int main (int argc , char **argv) { - { - if (argc <= 2) { - fprintf(stderr,"rms_extract.x filename tag1(=new_tag1) tag2 ... \n"); - abort(); - } - } - { - const char * filename = argv[1]; - int i; - rms_tag_type * dim_tag; - rms_file_type *file = rms_file_alloc(filename , false); - printf("Skal laste inn file: %s \n",filename); - rms_file_fread(file); - dim_tag = rms_file_get_dim_tag_ref(file); - - for (i = 2; i < argc; i++) { - char * new_name; - char * old_name; - char * new_file; - - split_name(argv[i] , &old_name , &new_name); - printf("Exctracting %s -> %s \n" , old_name , new_name); fflush(stdout); - new_file = util_alloc_filename(NULL , new_name , "ROFF"); - - { - rms_tag_type * tag; - rms_file_type * out_file = rms_file_alloc(new_file , false); - FILE *stream = rms_file_fopen_w(out_file); - rms_file_init_fwrite(out_file , "parameter"); - rms_tag_fwrite(dim_tag , stream); - - tag = rms_file_get_tag_ref(file , "parameter" , "name" , old_name , true); - rms_tag_fwrite_parameter(new_name, rms_tag_get_datakey(tag) , stream); - rms_file_complete_fwrite(out_file); - fclose(stream); - } - if (new_name == old_name) - free(new_name); - else { - free(new_name); - free(old_name); - } - } - rms_file_free(file); - return 0; - } -} - diff --git a/ThirdParty/Ert/librms/applications/rms_setname.c b/ThirdParty/Ert/librms/applications/rms_setname.c deleted file mode 100644 index b1a250df72..0000000000 --- a/ThirdParty/Ert/librms/applications/rms_setname.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'rms_setname.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include -#include - - -int main (int argc , char **argv) { - int i; - char *name; - int name_length; - argv++; - argc--; - - name = argv[0]; - name_length = strlen(name) + 1; - - argv++; - argc--; - for (i = 0; i < argc; i++) { - rms_file_type *file = rms_file_alloc(argv[i] , false); - rms_tagkey_type *tagkey; - rms_tag_type *tag; - rms_file_fread(file); - - tag = rms_file_get_tag_ref(file , "parameter" , NULL , NULL , true); - tagkey = rms_tag_get_key(tag , "name"); - rms_tagkey_manual_realloc_data(tagkey , name_length); - rms_tagkey_set_data(tagkey , name); - rms_file_fwrite(file , "parameter"); - rms_file_free(file); - } - - return 0; -} - diff --git a/ThirdParty/Ert/librms/applications/rms_stat.c b/ThirdParty/Ert/librms/applications/rms_stat.c deleted file mode 100644 index 770d84176d..0000000000 --- a/ThirdParty/Ert/librms/applications/rms_stat.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'rms_stat.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include -#include - - - -void convert_test(const char * rms_file, const char * ecl_path) { - rms_file_2eclipse(rms_file , ecl_path , false , 1); -} - - -int main (int argc , char **argv) { - char * tagname; - rms_tagkey_type *mean , *std; - rms_tag_type *dim_tag; - bool log_transform = false; - rms_file_type *file; - - if (argc < 4) { - printf("%s: PARAM-NAME file1 file2 file3 .....\n",argv[0]); - exit(1); - } - - - file = rms_file_alloc(argv[2] , false); - tagname = argv[1]; - dim_tag = rms_file_fread_alloc_tag(file , "dimensions" , NULL , NULL); - mean = rms_file_fread_alloc_data_tagkey(file , "parameter" , "name" , tagname); - std = rms_tagkey_copyc(mean); - - rms_file_free_data(file); - rms_stats_mean_std(mean , std , tagname , argc - 2 , (const char **) &argv[2] , log_transform); - - { - char * outfile = malloc(strlen(tagname) + strlen("_stats.ROFF") + 1); - sprintf(outfile , "%s_stats.ROFF" , tagname); - rms_file_set_filename(file , outfile , false); - printf("Statistics collected in: %s \n",outfile); - free(outfile); - } - - { - char * out_tag = malloc(strlen(tagname) + 6); - FILE *stream = rms_file_fopen_w(file); - rms_file_init_fwrite(file , "parameter"); - rms_tag_fwrite(dim_tag , stream); - sprintf(out_tag , "%s.mean" , tagname); rms_tag_fwrite_parameter(out_tag , mean , stream); - sprintf(out_tag , "%s.std" , tagname); rms_tag_fwrite_parameter(out_tag , std , stream); - rms_file_complete_fwrite(file); - fclose(stream); - free(out_tag); - } - - rms_tag_free(dim_tag); - rms_tagkey_free(mean); - rms_tagkey_free(std); - rms_file_free_data(file); - rms_file_free(file); - - exit(1); - - { - const int ens_size = 100; - char **file_list; - double **X; - int i , j; - file_list = malloc(ens_size * sizeof * file_list); - for (i=0; i < ens_size; i++) { - file_list[i] = malloc(100); - sprintf(file_list[i] , "PERMX_%04d.INC" , i + 1); - } - - - X = malloc(ens_size * sizeof *X); - for (i=0; i < ens_size; i++) - X[i] = malloc(ens_size * sizeof *X[i]); - - for (i=0; i < ens_size; i++) - for (j=0; j < ens_size; j++) - X[i][j] = 0; - - for (i=0; i < ens_size; i++) - X[i][i] = 1.0; - - rms_stats_update_ens("Posterior" , "Post2" , (const char **) file_list , "PERMX" , ens_size , (const double **) X); - - for (i=0; i < ens_size; i++) { - free(X[i]); - free(file_list[i]); - } - free(X); - free(file_list); - } - - return 0; -} - diff --git a/ThirdParty/Ert/librms/applications/rms_test.c b/ThirdParty/Ert/librms/applications/rms_test.c deleted file mode 100644 index fea7328777..0000000000 --- a/ThirdParty/Ert/librms/applications/rms_test.c +++ /dev/null @@ -1,100 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'rms_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -#include -#include -#include - - - -void convert_test(const char * rms_file, const char * ecl_path) { - rms_file_2eclipse(rms_file , ecl_path , false , 1); -} - - -int main (int argc , char **argv) { - rms_tagkey_type *mean , *std; - rms_tag_type *dim_tag; - bool log_transform = false; - - rms_file_type *file = rms_file_alloc(argv[1] , false); - dim_tag = rms_file_fread_alloc_tag(file , "dimensions" , NULL , NULL); - mean = rms_file_fread_alloc_data_tagkey(file , "parameter" , "name" , "PERMX"); - std = rms_tagkey_copyc(mean); - - rms_file_free_data(file); - rms_stats_mean_std(mean , std , "PERMX" , argc - 1 , (const char **) &argv[1] , log_transform); - rms_file_set_filename(file , "Stats.ROFF" , false); - - { - FILE *stream = rms_file_fopen_w(file); - rms_file_init_fwrite(file , "parameter"); - rms_tag_fwrite(dim_tag , stream); - rms_tag_fwrite_parameter("mean:PERMX" , mean , stream); - rms_tag_fwrite_parameter("std:PERMX" , std , stream); - rms_file_complete_fwrite(file); - fclose(stream); - } - - rms_tag_free(dim_tag); - rms_tagkey_free(mean); - rms_tagkey_free(std); - rms_file_free_data(file); - rms_file_free(file); - - exit(1); - - { - const int ens_size = 100; - char **file_list; - double **X; - int i , j; - file_list = malloc(ens_size * sizeof * file_list); - for (i=0; i < ens_size; i++) { - file_list[i] = malloc(100); - sprintf(file_list[i] , "PERMX_%04d.INC" , i + 1); - } - - - X = malloc(ens_size * sizeof *X); - for (i=0; i < ens_size; i++) - X[i] = malloc(ens_size * sizeof *X[i]); - - for (i=0; i < ens_size; i++) - for (j=0; j < ens_size; j++) - X[i][j] = 0; - - for (i=0; i < ens_size; i++) - X[i][i] = 1.0; - - rms_stats_update_ens("Posterior" , "Post2" , (const char **) file_list , "PERMX" , ens_size , (const double **) X); - - for (i=0; i < ens_size; i++) { - free(X[i]); - free(file_list[i]); - } - free(X); - free(file_list); - } - - return 0; -} - diff --git a/ThirdParty/Ert/librms/applications/tag_list.c b/ThirdParty/Ert/librms/applications/tag_list.c deleted file mode 100644 index 0f755c1bd1..0000000000 --- a/ThirdParty/Ert/librms/applications/tag_list.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'tag_list.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -#include -#include -#include - - - -int main (int argc , char **argv) { - int i; - - argc--; - argv++; - - for (i = 0; i < argc; i++) { - rms_file_type *file = rms_file_alloc(argv[i] , false); - rms_file_fread(file); - rms_file_fprintf(file , stdout); - rms_file_free(file); - } - - return 0; -} - diff --git a/ThirdParty/Ert/librms/include/ert/rms/rms_export.h b/ThirdParty/Ert/librms/include/ert/rms/rms_export.h deleted file mode 100644 index 67886dcdd8..0000000000 --- a/ThirdParty/Ert/librms/include/ert/rms/rms_export.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'rms_export.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_RMS_EXPORT_H -#define ERT_RMS_EXPORT_H -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - - -void rms_export_roff_from_keyword(const char *filename, ecl_grid_type *ecl_grid, - ecl_kw_type **ecl_kw, int size); - - - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/ThirdParty/Ert/librms/include/ert/rms/rms_file.h b/ThirdParty/Ert/librms/include/ert/rms/rms_file.h deleted file mode 100644 index c8dc136e89..0000000000 --- a/ThirdParty/Ert/librms/include/ert/rms/rms_file.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'rms_file.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_RMS_FILE_H -#define ERT_RMS_FILE_H -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -#include - -typedef struct rms_file_struct rms_file_type; - -void rms_file_2eclipse(const char * rms_file , const char * , bool , int ); -void rms_file_fclose(rms_file_type *); -FILE * rms_file_fopen_r(rms_file_type *rms_file); -FILE * rms_file_fopen_w(rms_file_type *rms_file); -void rms_file_set_filename(rms_file_type * , const char * , bool); -rms_file_type * rms_file_alloc (const char *, bool ); -void rms_file_fread (rms_file_type *); -void rms_file_fwrite (rms_file_type * , const char *); -void rms_file_fprintf (const rms_file_type * , FILE *); -void rms_file_free (rms_file_type *); -void rms_file_free_data (rms_file_type *); -rms_tag_type * rms_file_get_dim_tag_ref(const rms_file_type * ); -rms_tag_type * rms_file_get_tag_ref (const rms_file_type *, const char *, const char *, const char * , bool); -void rms_file_assert_dimensions(const rms_file_type *, int , int , int ); -rms_tag_type * rms_file_fread_alloc_tag(rms_file_type * , const char *, const char *, const char *); -rms_tagkey_type * rms_file_fread_alloc_data_tagkey(rms_file_type * , const char *, const char *, const char *); -void rms_file_complete_fwrite(const rms_file_type *); -void rms_file_init_fwrite(const rms_file_type * , const char *); -void rms_file_get_dims(const rms_file_type * , int * ); -FILE * rms_file_get_FILE(const rms_file_type * ); -void rms_file_add_dimensions(rms_file_type * , int , int , int , bool); -bool rms_file_is_roff(FILE * ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/librms/include/ert/rms/rms_stats.h b/ThirdParty/Ert/librms/include/ert/rms/rms_stats.h deleted file mode 100644 index d9193a5849..0000000000 --- a/ThirdParty/Ert/librms/include/ert/rms/rms_stats.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'rms_stats.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_RMS_STATS_H -#define ERT_RMS_STATS_H -#ifdef __cplusplus -extern "C" { -#endif - -#include - -void rms_stats_mean_std(rms_tagkey_type * , rms_tagkey_type * , const char * , int , const char ** , bool); -void rms_stats_update_ens(const char * , const char *, const char **, const char *, int , const double **); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/librms/include/ert/rms/rms_tag.h b/ThirdParty/Ert/librms/include/ert/rms/rms_tag.h deleted file mode 100644 index c0a42d63eb..0000000000 --- a/ThirdParty/Ert/librms/include/ert/rms/rms_tag.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'rms_tag.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_RMS_TAG_H -#define ERT_RMS_TAG_H -#ifdef __cplusplus -extern "C" { -#endif -#include -#include -#include - -#include - -#include - - - -typedef struct rms_tag_struct rms_tag_type; - -int rms_tag_get_datakey_sizeof_ctype(const rms_tag_type * ); -const char * rms_tag_get_namekey_name(const rms_tag_type * ); -const char * rms_tag_get_name(const rms_tag_type *); -rms_tagkey_type * rms_tag_get_datakey(const rms_tag_type *); -void rms_tag_free(rms_tag_type *); -void rms_tag_free__(void * arg); -rms_tag_type * rms_tag_fread_alloc(FILE *, hash_type *, bool , bool *); -bool rms_tag_name_eq(const rms_tag_type *, const char * , const char *, const char *); -rms_tagkey_type * rms_tag_get_key(const rms_tag_type *, const char *); -void rms_tag_fwrite_filedata(const char * , FILE *stream); -void rms_tag_fwrite_eof(FILE *stream); -void rms_tag_fwrite(const rms_tag_type * , FILE * ); -void rms_tag_fprintf(const rms_tag_type * , FILE * ); -const char * rms_tag_name_ref(const rms_tag_type * ); -rms_tag_type * rms_tag_alloc_dimensions(int , int , int ); -void rms_tag_fwrite_dimensions(int , int , int , FILE *); -void rms_tag_fwrite_parameter(const char *, const rms_tagkey_type *, FILE *); -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/librms/include/ert/rms/rms_tagkey.h b/ThirdParty/Ert/librms/include/ert/rms/rms_tagkey.h deleted file mode 100644 index 821eba8a10..0000000000 --- a/ThirdParty/Ert/librms/include/ert/rms/rms_tagkey.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'rms_tagkey.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_RMS_TAGKEY_H -#define ERT_RMS_TAGKEY_H -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include - -#include - -#include - -typedef struct rms_tagkey_struct rms_tagkey_type; - - -bool rms_tagkey_cmp(const rms_tagkey_type * , const rms_tagkey_type * ); -void rms_tagkey_free(rms_tagkey_type *); -rms_tagkey_type * rms_tagkey_alloc_empty(bool); -rms_tagkey_type * rms_tagkey_alloc_complete(const char * , int , rms_type_enum , const void * , bool); -const char * rms_tagkey_get_name(const rms_tagkey_type *); -rms_type_enum rms_tagkey_get_rms_type(const rms_tagkey_type * ); -ecl_type_enum rms_tagkey_get_ecl_type(const rms_tagkey_type * ); -void rms_tagkey_manual_realloc_data(rms_tagkey_type * , int ); -void rms_tagkey_set_data(rms_tagkey_type * , const void * ); - -bool rms_tagkey_char_eq(const rms_tagkey_type *, const char *); -void rms_tagkey_free_(void *); -void * rms_tagkey_copyc_(const void *); -void rms_tagkey_load(rms_tagkey_type *, bool , FILE *, hash_type *); -void * rms_tagkey_get_data_ref(const rms_tagkey_type *); -void rms_tagkey_fwrite(const rms_tagkey_type * , FILE *); -void rms_tagkey_fprintf(const rms_tagkey_type * , FILE *); -rms_tagkey_type * rms_tagkey_copyc(const rms_tagkey_type *); -int rms_tagkey_get_size(const rms_tagkey_type *); - - -rms_tagkey_type * rms_tagkey_alloc_byteswap(); -rms_tagkey_type * rms_tagkey_alloc_creationDate(); -rms_tagkey_type * rms_tagkey_alloc_filetype(const char * ); -rms_tagkey_type * rms_tagkey_alloc_dim(const char * , int ); -rms_tagkey_type * rms_tagkey_alloc_parameter_name(const char * ); - -void rms_tagkey_assign(rms_tagkey_type * , const rms_tagkey_type *); -void rms_tagkey_apply(rms_tagkey_type * , double (f) (double)); -void rms_tagkey_inplace_log10(rms_tagkey_type * ); -void rms_tagkey_inplace_sqr(rms_tagkey_type *); -void rms_tagkey_inplace_sqrt(rms_tagkey_type *); -void rms_tagkey_inplace_mul(rms_tagkey_type * , const rms_tagkey_type *); -void rms_tagkey_inplace_add(rms_tagkey_type * , const rms_tagkey_type *); -void rms_tagkey_inplace_add_scaled(rms_tagkey_type * , const rms_tagkey_type * , double); -void rms_tagkey_scale(rms_tagkey_type * , double ); -void rms_tagkey_clear(rms_tagkey_type * ); -int rms_tagkey_get_sizeof_ctype(const rms_tagkey_type * ); -void rms_tagkey_max_min(const rms_tagkey_type * , void *, void *); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/librms/include/ert/rms/rms_type.h b/ThirdParty/Ert/librms/include/ert/rms/rms_type.h deleted file mode 100644 index 124b5b4c5c..0000000000 --- a/ThirdParty/Ert/librms/include/ert/rms/rms_type.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'rms_type.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_RMS_TYPE_H -#define ERT_RMS_TYPE_H -#ifdef __cplusplus -extern "C" { -#endif -#include -#include - - -typedef enum rms_type_enum_def rms_type_enum; - -enum rms_type_enum_def {rms_char_type , rms_float_type , rms_double_type , rms_bool_type , rms_byte_type , rms_int_type}; - -/* This *really* should not be exported ... */ - -typedef struct { - rms_type_enum rms_type; - int sizeof_ctype; - -} __rms_type; - -/*****************************************************************/ - -void rms_type_free(void *); -__rms_type * rms_type_alloc(rms_type_enum , int ); -const void * rms_type_copyc(const void * ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/librms/include/ert/rms/rms_util.h b/ThirdParty/Ert/librms/include/ert/rms/rms_util.h deleted file mode 100644 index adf913b24d..0000000000 --- a/ThirdParty/Ert/librms/include/ert/rms/rms_util.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'rms_util.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_RMS_UTIL_H -#define ERT_RMS_UTIL_H -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include - -#include - -#define RMS_INACTIVE_DOUBLE -999.00 -#define RMS_INACTIVE_FLOAT -999.00 -#define RMS_INACTIVE_INT -999 - - -rms_type_enum rms_util_convert_ecl_type(ecl_type_enum ); -int rms_util_global_index_from_eclipse_ijk(int, int, int, int, int, int); -void rms_util_translate_undef(void * , int , int , const void * , const void * ); -void rms_util_set_fortran_data(void *, const void * , int , int , int , int); -void rms_util_read_fortran_data(const void *, void * , int , int , int , int); -void rms_util_fskip_string(FILE *); -int rms_util_fread_strlen(FILE *); -bool rms_util_fread_string(char * , int , FILE *); -void rms_util_fwrite_string(const char * string , FILE *stream); -void rms_util_fwrite_comment(const char * , FILE *); -void rms_util_fwrite_newline(FILE *stream); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/librms/src/CMakeLists.txt b/ThirdParty/Ert/librms/src/CMakeLists.txt deleted file mode 100644 index 606e86e815..0000000000 --- a/ThirdParty/Ert/librms/src/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -set( source_files rms_file.c rms_util.c rms_tag.c rms_type.c rms_tagkey.c rms_stats.c rms_export.c) -set( header_files rms_file.h rms_util.h rms_tag.h rms_type.h rms_tagkey.h rms_stats.h rms_export.h) - -add_library( rms ${LIBRARY_TYPE} ${source_files} ) -set_target_properties( rms PROPERTIES VERSION ${ERT_VERSION_MAJOR}.${ERT_VERSION_MINOR} SOVERSION ${ERT_VERSION_MAJOR} ) -target_link_libraries( rms ecl ) -if (USE_RUNPATH) - add_runpath( rms ) -endif() - - -#----------------------------------------------------------------- -if (INSTALL_ERT) - install(TARGETS rms DESTINATION ${CMAKE_INSTALL_LIBDIR}) - foreach(header ${header_files}) - install(FILES ../include/ert/rms/${header} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/ert/rms) - endforeach() -endif() - diff --git a/ThirdParty/Ert/librms/src/readme.overview b/ThirdParty/Ert/librms/src/readme.overview deleted file mode 100644 index 5b3c3dff52..0000000000 --- a/ThirdParty/Ert/librms/src/readme.overview +++ /dev/null @@ -1,55 +0,0 @@ -The EnKF functionality is organized in xxx libraries with different -functionalities. The different libraries depend on eachother, and the -libraries must be built in correct order. The dependencies is as -follows: - -libhash : -libutil : libhash -libecl : libhash libutil -librms : libecl libutil libhash -libsched : libecl linutil libhash -libenkf : libecl libsched librm linutil libhash - - -libhash: This library implements the classes hash_type, set_type and - list_type. - -libutil: This library is a collection utility routines. Observe that - this library only implements routines, and not statefull - objects. - -libecl: This library implements functions for reading/writing ECLIPSE - restart/summary/init/grid files. - -libsched: This library implements a basic SCHEDULE file parser. - -librms: This library implements (basic) reader and writer for binary - RMS ROFF files. - -libenkf: This library implements various high level objects for EnKF - functionality. - ------------------------------------------------------------------ - -All the makefiles start with the statement: - -include "path_config" - -The file path_config is *not* under version control, this is on -purpose because every user can/should have a private confiiguration of -paths. The file path_config should define make-variables for the -location of all the libraries, this is an example of a valid -path-config file: - - LIBHASH_HOME = /h/a152128/EnKF/EnKF/libhash - LIBUTIL_HOME = /h/a152128/EnKF/EnKF/libutil - LIBSCHED_HOME = /h/a152128/EnKF/EnKF/libsched - LIBRMS_HOME = /h/a152128/EnKF/EnKF/librms - LIBECL_HOME = /h/a152128/EnKF/EnKF/libecl - LIBENKF_HOME = /h/a152128/EnKF/EnKF/libenkf - -In this example all libraries have a common path prefix, that is not -a requirement. - - - diff --git a/ThirdParty/Ert/librms/src/rms_export.c b/ThirdParty/Ert/librms/src/rms_export.c deleted file mode 100644 index 672eb25025..0000000000 --- a/ThirdParty/Ert/librms/src/rms_export.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'rms_export.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include - -#include - -#include -#include - -#include -#include -#include - - -void rms_export_roff_from_keyword(const char *filename, ecl_grid_type *ecl_grid, - ecl_kw_type **ecl_kw, int size) { - - rms_file_type *rms_file; - rms_tagkey_type *data_key; - int nx, ny, nz, active_size; - int i, j, k; - int global_size; - int n; - - ecl_grid_get_dims(ecl_grid, &nx, &ny, &nz, &active_size); - global_size = ecl_grid_get_global_size(ecl_grid); - - rms_file = rms_file_alloc(filename, false); - rms_file_fopen_w(rms_file); - - rms_file_init_fwrite(rms_file , "parameter"); - rms_tag_fwrite_dimensions(nx , ny , nz , rms_file_get_FILE(rms_file)); - - for (n = 0; n < size; n++) { - float *src_data; - float *target_data; - - src_data = (float *) ecl_kw_get_void_ptr(ecl_kw[n]); - target_data = util_calloc(global_size , sizeof * target_data ); - - for (k=0; k < nz; k++) { - for (j=0; j < ny; j++) { - for (i=0; i < nx; i++) { - int index1D; - int index3D; - double fill = RMS_INACTIVE_FLOAT; - /* TODO: - * This currently only supports FLOAT / REAL type. - */ - - index1D = ecl_grid_get_active_index3(ecl_grid, i, j, k); - index3D = rms_util_global_index_from_eclipse_ijk(nx, ny, nz, i, j, k); - - if (index1D >= 0) - target_data[index3D] = src_data[index1D]; - else - memcpy(&target_data[index3D] , &fill, sizeof(float)); - } - } - } - - data_key = rms_tagkey_alloc_complete("data", global_size, - rms_util_convert_ecl_type(ecl_kw_get_type(ecl_kw[n])), target_data, true); - rms_tag_fwrite_parameter(ecl_kw_get_header8(ecl_kw[n]), data_key, - rms_file_get_FILE(rms_file)); - rms_tagkey_free(data_key); - - util_safe_free(target_data); - } - - rms_file_complete_fwrite(rms_file); - rms_file_fclose(rms_file); - rms_file_free(rms_file); - -} diff --git a/ThirdParty/Ert/librms/src/rms_file.c b/ThirdParty/Ert/librms/src/rms_file.c deleted file mode 100644 index 26a4f6aa44..0000000000 --- a/ThirdParty/Ert/librms/src/rms_file.c +++ /dev/null @@ -1,492 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'rms_file.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -/*****************************************************************/ -static const char * rms_ascii_header = "roff-asc"; -static const char * rms_binary_header = "roff-bin"; - -static const char * rms_comment1 = "ROFF file"; -static const char * rms_comment2 = "Creator: RMS - Reservoir Modelling System, version 8.1"; -/* - static const char * rms_parameter_tagname = "parameter"; -*/ - - - - - -struct rms_file_struct { - char * filename; - bool endian_convert; - bool fmt_file; - hash_type * type_map; - vector_type * tag_list; - FILE * stream; -}; - - - -/*****************************************************************/ -/* Pure roff routines */ - - - - -static bool rms_fmt_file(const rms_file_type *rms_file) { - bool fmt_file; - char filetype[9]; - rms_util_fread_string( filetype , 9 , rms_file->stream); - - if (strncmp(filetype , rms_binary_header , 8) == 0) - fmt_file = false; - else if (strncmp(filetype , rms_ascii_header , 8) == 0) - fmt_file = true; - else { - fprintf(stderr,"%s: header : %8s not recognized in file: %s - aborting \n",__func__ , filetype , rms_file->filename); - abort(); - } - return fmt_file; -} - - - -static void rms_file_add_tag(rms_file_type *rms_file , const rms_tag_type *tag) { - vector_append_owned_ref(rms_file->tag_list , tag , rms_tag_free__ ); -} - - -void rms_file_add_dimensions(rms_file_type * rms_file , int nX , int nY , int nZ , bool save) { - if (rms_file_get_tag_ref(rms_file , "dimensions" , NULL , NULL , false) != NULL) { - fprintf(stderr,"%s: dimensions tag already persent in rms_file object - aborting \n",__func__); - abort(); - } - { - rms_tag_type * dim_tag = rms_tag_alloc_dimensions(nX , nY , nZ); - rms_file_add_tag(rms_file , dim_tag); - if (save) - rms_tag_fwrite(dim_tag , rms_file->stream); - } -} - - -rms_tag_type * rms_file_get_tag_ref(const rms_file_type *rms_file , - const char *tagname , - const char *keyname , - const char *keyvalue, bool abort_on_error) { - - rms_tag_type *return_tag = NULL; - bool cont; - { - int index = 0; - while (cont) { - if (index < vector_get_size( rms_file->tag_list )) { - rms_tag_type *tag = vector_iget( rms_file->tag_list , index ); - if (rms_tag_name_eq(tag , tagname , keyname , keyvalue)) { - return_tag = tag; - cont = false; - } else - index++; - } else - cont = false; - } - } - - if (return_tag == NULL && abort_on_error) { - if (keyname != NULL && keyvalue != NULL) - fprintf(stderr,"%s: failed to find tag:%s with key:%s=%s in file:%s - aborting \n",__func__ , tagname , keyname , keyvalue , rms_file->filename); - else - fprintf(stderr,"%s: failed to find tag:%s in file:%s - aborting \n",__func__ , tagname , rms_file->filename); - } - return return_tag; -} - - - - - - -/** - This function allocates and rms_file_type * handle, but it does - not load the file content. -*/ - - -rms_file_type * rms_file_alloc(const char *filename, bool fmt_file) { - rms_file_type *rms_file = malloc(sizeof *rms_file); - rms_file->endian_convert = false; - rms_file->type_map = hash_alloc(); - rms_file->tag_list = vector_alloc_new(); - - hash_insert_hash_owned_ref(rms_file->type_map , "byte" , rms_type_alloc(rms_byte_type , 1) , rms_type_free); - hash_insert_hash_owned_ref(rms_file->type_map , "bool" , rms_type_alloc(rms_bool_type, 1) , rms_type_free); - hash_insert_hash_owned_ref(rms_file->type_map , "int" , rms_type_alloc(rms_int_type , 4) , rms_type_free); - hash_insert_hash_owned_ref(rms_file->type_map , "float" , rms_type_alloc(rms_float_type , 4) , rms_type_free); - hash_insert_hash_owned_ref(rms_file->type_map , "double" , rms_type_alloc(rms_double_type , 8) , rms_type_free); - - hash_insert_hash_owned_ref(rms_file->type_map , "char" , rms_type_alloc(rms_char_type , -1) , rms_type_free); /* Char are a f*** mix of vector and scalar */ - - rms_file->filename = NULL; - rms_file->stream = NULL; - rms_file_set_filename(rms_file , filename , fmt_file); - return rms_file; -} - - - - - - -void rms_file_set_filename(rms_file_type * rms_file , const char *filename , bool fmt_file) { - rms_file->filename = util_realloc_string_copy(rms_file->filename , filename); - rms_file->fmt_file = fmt_file; -} - - - -void rms_file_free_data(rms_file_type * rms_file) { - vector_clear( rms_file->tag_list ); -} - - - -void rms_file_free(rms_file_type * rms_file) { - rms_file_free_data(rms_file); - vector_free( rms_file->tag_list ); - hash_free(rms_file->type_map); - free(rms_file->filename); - free(rms_file); -} - - -static int rms_file_get_dim(const rms_tag_type *tag , const char *dim_name) { - rms_tagkey_type *key = rms_tag_get_key(tag , dim_name); - if (key == NULL) { - fprintf(stderr,"%s: failed to find tagkey:%s aborting \n" , __func__ , dim_name); - abort(); - } - return * (int *) rms_tagkey_get_data_ref(key); -} - - - -void rms_file_assert_dimensions(const rms_file_type *rms_file , int nx , int ny , int nz) { - bool OK = true; - rms_tag_type *tag = rms_file_get_tag_ref(rms_file , "dimensions" , NULL , NULL , true); - OK = (nx == rms_file_get_dim(tag , "nX")); - OK = OK && (ny == rms_file_get_dim(tag , "nY")); - OK = OK && (nz == rms_file_get_dim(tag , "nZ")); - - if (!OK) { - fprintf(stderr,"%s: dimensions on file: %s (%d, %d, %d) did not match with input dimensions (%d,%d,%d) - aborting \n",__func__ , rms_file->filename, - rms_file_get_dim(tag , "nX"), rms_file_get_dim(tag , "nY"), rms_file_get_dim(tag , "nZ"), - nx , ny , nz); - abort(); - } -} - -rms_tag_type * rms_file_get_dim_tag_ref(const rms_file_type * rms_file) { - return rms_file_get_tag_ref(rms_file , "dimensions" , NULL , NULL , true); -} - - -void rms_file_get_dims(const rms_file_type * rms_file , int * dims) { - rms_tag_type *tag = rms_file_get_dim_tag_ref(rms_file); - dims[0] = rms_file_get_dim(tag , "nX"); - dims[1] = rms_file_get_dim(tag , "nY"); - dims[2] = rms_file_get_dim(tag , "nZ"); -} - - -FILE * rms_file_get_FILE(const rms_file_type * rms_file) { return rms_file->stream; } - - -static void rms_file_init_fread(rms_file_type * rms_file) { - - rms_file->fmt_file = rms_fmt_file( rms_file ); - if (rms_file->fmt_file) { - fprintf(stderr,"%s only binary files implemented - aborting \n",__func__); - abort(); - } - /* Skipping two comment lines ... */ - rms_util_fskip_string(rms_file->stream); - rms_util_fskip_string(rms_file->stream); - { - bool eof_tag; - rms_tag_type * filedata_tag = rms_tag_fread_alloc(rms_file->stream , rms_file->type_map , rms_file->endian_convert , &eof_tag); - rms_tagkey_type * byteswap_key = rms_tag_get_key(filedata_tag , "byteswaptest"); - if (byteswap_key == NULL) { - fprintf(stderr,"%s: failed to find filedata/byteswaptest - aborting \n", __func__); - abort(); - } - int byteswap_value = *( int *) rms_tagkey_get_data_ref(byteswap_key); - if (byteswap_value == 1) - rms_file->endian_convert = false; - else - rms_file->endian_convert = true; - rms_tag_free(filedata_tag); - } -} - - - -rms_tag_type * rms_file_fread_alloc_tag(rms_file_type * rms_file , const char *tagname , const char * keyname , const char *keyvalue ) { - rms_tag_type * tag = NULL; - rms_file_fopen_r(rms_file); - { - - bool cont = true; - bool tag_found = false; - long int start_pos = util_ftell(rms_file->stream); - util_fseek(rms_file->stream , 0 , SEEK_SET); - rms_file_init_fread(rms_file); - while (cont) { - bool eof_tag; - rms_tag_type * tmp_tag = rms_tag_fread_alloc(rms_file->stream , rms_file->type_map , rms_file->endian_convert , &eof_tag); - if (rms_tag_name_eq(tmp_tag , tagname , keyname , keyvalue)) { - tag_found = true; - tag = tmp_tag; - } else - rms_tag_free(tmp_tag); - if (tag_found || eof_tag) - cont = false; - } - if (tag == NULL) { - util_fseek(rms_file->stream , start_pos , SEEK_SET); - util_abort("%s: could not find tag: \"%s\" (with %s=%s) in file:%s - aborting.\n",__func__ , tagname , keyname , keyvalue , rms_file->filename); - } - } - rms_file_fclose(rms_file); - return tag; -} - - - -FILE * rms_file_fopen_r(rms_file_type *rms_file) { - rms_file->stream = util_fopen(rms_file->filename , "r"); - return rms_file->stream; -} - - -FILE * rms_file_fopen_w(rms_file_type *rms_file) { - rms_file->stream = util_mkdir_fopen(rms_file->filename , "w"); - return rms_file->stream; -} - -void rms_file_fclose(rms_file_type * rms_file) { - fclose(rms_file->stream); - rms_file->stream = NULL; -} - - -rms_tagkey_type * rms_file_fread_alloc_data_tagkey(rms_file_type * rms_file , const char *tagname , const char * keyname , const char *keyvalue) { - rms_tag_type * tag = rms_file_fread_alloc_tag(rms_file , tagname , keyname , keyvalue); - if (tag != NULL) { - rms_tagkey_type *tagkey = rms_tagkey_copyc( rms_tag_get_key(tag , "data") ); - rms_tag_free(tag); - return tagkey; - } else - return NULL; -} - - - -void rms_file_fread(rms_file_type *rms_file) { - rms_file_fopen_r(rms_file); - rms_file_init_fread(rms_file); - - /* The main read loop */ - { - bool eof_tag = false; - while (!eof_tag) { - rms_tag_type * tag = rms_tag_fread_alloc(rms_file->stream , rms_file->type_map , rms_file->endian_convert , &eof_tag ); - if (!eof_tag) - rms_file_add_tag(rms_file , tag); - else - rms_tag_free(tag); - - } - } - rms_file_fclose(rms_file); -} - - - -/*static */ -void rms_file_init_fwrite(const rms_file_type * rms_file , const char * filetype) { - if (!rms_file->fmt_file) - rms_util_fwrite_string(rms_binary_header , rms_file->stream); - else { - fprintf(stderr,"%s: Sorry only binary writes implemented ... \n",__func__); - rms_util_fwrite_string(rms_ascii_header , rms_file->stream); - } - - rms_util_fwrite_comment(rms_comment1 , rms_file->stream); - rms_util_fwrite_comment(rms_comment2 , rms_file->stream); - rms_tag_fwrite_filedata(filetype , rms_file->stream); -} - - - -void rms_file_complete_fwrite(const rms_file_type * rms_file) { - rms_tag_fwrite_eof(rms_file->stream); -} - - - -void rms_file_fwrite(rms_file_type * rms_file, const char * filetype) { - rms_file_fopen_w(rms_file); - rms_file_init_fwrite(rms_file , filetype ); - - { - int tag_index; - for (tag_index = 0; tag_index < vector_get_size( rms_file->tag_list ); tag_index++) { - const rms_tag_type *tag = vector_iget_const( rms_file->tag_list , tag_index ); - rms_tag_fwrite(tag , rms_file->stream); - } - } - - rms_file_complete_fwrite(rms_file ); - rms_file_fclose(rms_file); -} - - -void rms_file_fprintf(const rms_file_type *rms_file , FILE *stream) { - fprintf(stream , "<%s>\n",rms_file->filename); - { - int tag_index; - for (tag_index = 0; tag_index < vector_get_size( rms_file->tag_list ); tag_index++) { - const rms_tag_type *tag = vector_iget_const( rms_file->tag_list , tag_index ); - rms_tag_fprintf(tag , rms_file->stream); - } - } - fprintf(stream , "\n",rms_file->filename); -} - - - -/* - Hardcoded assumption that the parameter type is float - otherwise this - will break hard. -*/ - -void rms_file_2eclipse(const char * rms_file , const char * ecl_path, bool ecl_fmt_file , int ecl_file_nr) { - char * rms_base_file; - int dims[3] , size; - rms_file_type *file = rms_file_alloc(rms_file , false); - rms_file_fread(file); - rms_file_get_dims(file , dims); - size = dims[0] * dims[1] * dims[2] ; - - util_alloc_file_components(rms_file , NULL , &rms_base_file , NULL); - { - float * ecl_data = malloc(size * sizeof * ecl_data); - int tag_index; - for (tag_index = 0; tag_index < vector_get_size( file->tag_list ); tag_index++) { - rms_tag_type * rms_tag = vector_iget( file->tag_list , tag_index ); - - if (rms_tag_name_eq(rms_tag , "parameter" , NULL , NULL)) { - rms_tagkey_type * rms_tagkey = rms_tag_get_datakey(rms_tag); - const float * data = rms_tagkey_get_data_ref(rms_tagkey); - rms_util_set_fortran_data(ecl_data , data , sizeof * ecl_data , dims[0] , dims[1] , dims[2]); - - { - float rms_undef = -999; - float ecl_undef = 0; - rms_util_translate_undef(ecl_data , size , rms_tagkey_get_sizeof_ctype(rms_tagkey) , &rms_undef , &ecl_undef); - } - - { - const char * tagname = rms_tag_get_namekey_name(rms_tag); - char * ecl_base = malloc(4 + strlen(tagname) + 2); - char * ecl_file; - - sprintf(ecl_base , "%s_%04d" , tagname , ecl_file_nr); - ecl_file = util_alloc_filename(ecl_path , ecl_base , NULL); - if (util_same_file(ecl_file , rms_file)) { - fprintf(stderr,"%s: attempt to overwrite %s -> %s - aborting \n",__func__ , rms_file , ecl_file); - abort(); - } - - ecl_kw_fwrite_param(ecl_file , ecl_fmt_file , tagname , ECL_FLOAT_TYPE , size , ecl_data); - free(ecl_base); - free(ecl_file); - - } - } - } - free(ecl_data); - } - free(rms_base_file); -} - - - -bool rms_file_is_roff(FILE * stream) { - const int len = strlen(rms_comment1); - char *header = malloc(strlen(rms_comment1) + 1); - const long int current_pos = util_ftell(stream); - bool roff_file = false; - - util_fseek(stream , 1 + 1 + 8 , SEEK_CUR); /* Skipping #roff-bin#0# WILL Fail with formatted files */ - rms_util_fread_string(header , len+1 , stream); - if (strncmp(rms_comment1 , header , len) == 0) - roff_file = true; - - util_fseek(stream , current_pos , SEEK_SET); - free(header); - return roff_file; -} - - -/*****************************************************************/ -/* Old hack version: */ - - -void old_rms_roff_load(const char *filename , const char *param_name , float *param) { - const int offset = 327 + strlen(param_name); - int n_read; - int size; - FILE *stream = fopen(filename , "r"); - - util_fseek(stream , offset , SEEK_SET); - fread(&size , 1 , sizeof size , stream); - n_read = fread(param , sizeof *param , size , stream); - - fclose(stream); - if (n_read != size) { - fprintf(stderr,"%s: wanted:%d elements - only read:%d - aborting \n",__func__, size , n_read); - abort(); - } -} diff --git a/ThirdParty/Ert/librms/src/rms_stats.c b/ThirdParty/Ert/librms/src/rms_stats.c deleted file mode 100644 index 0de7946029..0000000000 --- a/ThirdParty/Ert/librms/src/rms_stats.c +++ /dev/null @@ -1,143 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'rms_stats.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -#include - -#include -#include -#include -#include - - - - - -void rms_stats_mean_std(rms_tagkey_type * mean , rms_tagkey_type * std , const char *parameter_name , int files , const char **filelist , bool log_transform) { - int filenr; - double norm = 1.0 / files; - - rms_tagkey_clear(mean); - rms_tagkey_clear(std); - - - printf("Loading: "); - for (filenr = 0; filenr < files; filenr++) { - printf("%s",filelist[filenr]); fflush(stdout); - { - rms_file_type *rms_file = rms_file_alloc(filelist[filenr] , false); - rms_tagkey_type * file_tag = rms_file_fread_alloc_data_tagkey(rms_file, "parameter" , "name" , parameter_name); - - if (log_transform) - rms_tagkey_inplace_log10(file_tag); - - rms_tagkey_inplace_add_scaled(mean , file_tag , norm); - rms_tagkey_inplace_sqr(file_tag); - rms_tagkey_inplace_add_scaled(std , file_tag , norm); - rms_tagkey_free(file_tag); - - rms_file_free(rms_file); - } - { - int j; - for (j = 0; j < strlen(filelist[filenr]); j++) fputc('\b' , stdout); - } - } - printf("\n"); - - { - rms_tagkey_type * mean2; - mean2 = rms_tagkey_copyc(mean); - rms_tagkey_inplace_sqr(mean2); - - rms_tagkey_inplace_add_scaled(std , mean2 , -1.0); - rms_tagkey_inplace_sqrt(std); - rms_tagkey_free(mean2); - } -} - - - -void rms_stats_update_ens(const char *prior_path , const char *posterior_path , const char **file_list , const char *param_name , int ens_size , const double **X) { - int iens , j; - rms_tagkey_type ** prior; - rms_tagkey_type * post ; - rms_tag_type * dim_tag = NULL; - - if (!util_is_directory(posterior_path)) { - fprintf(stderr,"%s: posterior_path:%s does not exist - aborting \n",__func__ , posterior_path); - abort(); - } - - prior = malloc(ens_size * sizeof * prior); - printf("Loading: "); - for (iens = 0; iens < ens_size; iens++) { - char * file_name = util_alloc_filename(prior_path , file_list[iens] , NULL); - printf("%s",file_name); fflush(stdout); - { - rms_file_type * rms_file = rms_file_alloc(file_name , false); - prior[iens] = rms_file_fread_alloc_data_tagkey(rms_file , "parameter" , "name" , param_name); - - if (iens == 0) - dim_tag = rms_file_fread_alloc_tag(rms_file , "dimensions" , NULL , NULL); - - rms_file_free(rms_file); - } - for (j = 0; j < strlen(file_name); j++) fputc('\b' , stdout); - - - free(file_name); - } - printf("\n"); - - printf("Writing: "); - post = rms_tagkey_copyc(prior[0]); - for (iens = 0; iens < ens_size; iens++) { - rms_tagkey_clear(post); - - for (j=0; j < iens; j++) - rms_tagkey_inplace_add_scaled(post , prior[j] , X[iens][j]); - - { - char * file_name = util_alloc_filename(posterior_path , file_list[iens] , NULL); - rms_file_type *file = rms_file_alloc(file_name , false); - FILE *stream = rms_file_fopen_w(file); - - printf("%s",file_name); fflush(stdout); - rms_file_init_fwrite(file , "parameter"); - rms_tag_fwrite(dim_tag , stream); - rms_tag_fwrite_parameter(param_name , post , stream); - rms_file_complete_fwrite(file); - fclose(stream); - rms_file_free(file); - - for (j = 0; j < strlen(file_name); j++) fputc('\b' , stdout); - free(file_name); - } - } - printf("\n"); - - rms_tag_free(dim_tag); - rms_tagkey_free(post); - for (iens = 0; iens < ens_size; iens++) - rms_tagkey_free(prior[iens]); - free(prior); -} - diff --git a/ThirdParty/Ert/librms/src/rms_tag.c b/ThirdParty/Ert/librms/src/rms_tag.c deleted file mode 100644 index 078fc859df..0000000000 --- a/ThirdParty/Ert/librms/src/rms_tag.c +++ /dev/null @@ -1,315 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'rms_tag.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -static const char * rms_eof_tag = "eof"; -static const char * rms_starttag_string = "tag"; -static const char * rms_endtag_string = "endtag"; - - -#define SHARED 0 -#define OWNED_REF 1 -#define COPY 2 - -#define RMS_TAG_TYPE_ID 4431296 - -struct rms_tag_struct { - UTIL_TYPE_ID_DECLARATION; - char * name; - vector_type * key_list; - hash_type * key_hash; /* Hash of tagkey instances */ -}; - -/*****************************************************************/ - - -rms_tag_type * rms_tag_alloc(const char * name) { - rms_tag_type *tag = malloc(sizeof *tag); - UTIL_TYPE_ID_INIT( tag , RMS_TAG_TYPE_ID ) - tag->name = NULL; - tag->key_hash = hash_alloc(); - tag->key_list = vector_alloc_new(); - if (name != NULL) - tag->name = util_alloc_string_copy(name); - return tag; -} - - -static UTIL_SAFE_CAST_FUNCTION( rms_tag , RMS_TAG_TYPE_ID ) - - -void rms_tag_free(rms_tag_type *tag) { - free(tag->name); - hash_free(tag->key_hash); - vector_free(tag->key_list); - free(tag); -} - -void rms_tag_free__(void * arg) { - rms_tag_type * tag = rms_tag_safe_cast( arg ); - rms_tag_free( tag ); -} - - -const char * rms_tag_get_name(const rms_tag_type *tag) { - return tag->name; -} - - - -/*static*/ -void rms_tag_fread_header(rms_tag_type *tag , FILE *stream , bool *eof_tag) { - char *buffer; - *eof_tag = false; - buffer = util_calloc( 4 , sizeof * buffer); - if (rms_util_fread_string(buffer , 4 , stream )) { - if (strcmp(buffer , rms_starttag_string) == 0) { - /* OK */ - { - char *tmp = util_calloc( rms_util_fread_strlen(stream) + 1 , sizeof * tmp); - rms_util_fread_string(tmp , 0 , stream); - tag->name = tmp; - if (strcmp(tag->name , rms_eof_tag) == 0) - *eof_tag = true; - } - } else - util_abort("%s: not at tag - header aborting \n",__func__); - } else - util_abort("%s: not at tag - header aborting \n",__func__); - - free(buffer); -} - - - -/** - This function does a "two-level" comparison. - - 1. tag->name is compared with tagname. - 2. Iff test number one succeeds we go further to step2. The second will always suceed if tagkey_name == NULL. - -*/ - -bool rms_tag_name_eq(const rms_tag_type *tag , const char * tagname , const char *tagkey_name , const char *keyvalue) { - bool eq = false; - if (strcmp(tag->name , tagname) == 0) { - if (tagkey_name != NULL && keyvalue != NULL) { - if (hash_has_key(tag->key_hash , tagkey_name)) { - const rms_tagkey_type *tagkey = hash_get(tag->key_hash , tagkey_name); - eq = rms_tagkey_char_eq(tagkey , keyvalue); - } - } else - eq = true; - } - return eq; -} - - - - -rms_tagkey_type * rms_tag_get_key(const rms_tag_type *tag , const char *keyname) { - if (hash_has_key(tag->key_hash , keyname)) - return hash_get(tag->key_hash, keyname); - else - return NULL; -} - - -rms_tagkey_type * rms_tag_get_datakey(const rms_tag_type *tag) { - return rms_tag_get_key(tag , "data"); -} - - -const char * rms_tag_get_namekey_name(const rms_tag_type * tag) { - rms_tagkey_type * name_key = rms_tag_get_key(tag , "name"); - if (name_key == NULL) - util_abort("%s: no name tagkey defined for this tag - aborting \n",__func__); - - return rms_tagkey_get_data_ref(name_key); -} - - -int rms_tag_get_datakey_sizeof_ctype(const rms_tag_type * tag) { - rms_tagkey_type * data_key = rms_tag_get_key(tag , "data"); - if (data_key == NULL) - util_abort("%s: no data tagkey defined for this tag - aborting \n",__func__); - - return rms_tagkey_get_sizeof_ctype(data_key); -} - - - - - -void rms_tag_add_tagkey(rms_tag_type *tag , const rms_tagkey_type *tagkey, int mem_mode) { - rms_tagkey_type * tagkey_copy; - - switch (mem_mode) { - case(COPY): - tagkey_copy = rms_tagkey_copyc(tagkey); - vector_append_owned_ref( tag->key_list , tagkey_copy , rms_tagkey_free_ ); - hash_insert_ref(tag->key_hash , rms_tagkey_get_name(tagkey_copy) , tagkey_copy); - break; - case(OWNED_REF): - vector_append_owned_ref( tag->key_list , tagkey , rms_tagkey_free_ ); - hash_insert_ref(tag->key_hash , rms_tagkey_get_name(tagkey) , tagkey); - break; - case(SHARED): - vector_append_ref( tag->key_list , tagkey ); - hash_insert_ref(tag->key_hash , rms_tagkey_get_name(tagkey) , tagkey); - break; - } -} - - - -static bool rms_tag_at_endtag(FILE *stream) { - const int init_pos = util_ftell(stream); - bool at_endtag; - char tag[7]; - if (rms_util_fread_string(tag , 7 , stream)) { - if (strcmp(tag , rms_endtag_string) == 0) - at_endtag = true; - else - at_endtag = false; - } else - at_endtag = false; - - if (!at_endtag) - util_fseek(stream , init_pos , SEEK_SET); - return at_endtag; -} - - -void rms_fread_tag(rms_tag_type *tag, FILE *stream , hash_type *type_map , bool endian_convert , bool *at_eof) { - rms_tag_fread_header(tag , stream , at_eof); - if (!*at_eof) { - while (! rms_tag_at_endtag(stream)) { - rms_tagkey_type *tagkey = rms_tagkey_alloc_empty(endian_convert); - rms_tagkey_load(tagkey , endian_convert , stream , type_map); - rms_tag_add_tagkey(tag , tagkey , COPY); - rms_tagkey_free(tagkey); - } - } -} - - - -rms_tag_type * rms_tag_fread_alloc(FILE *stream , hash_type *type_map , bool endian_convert , bool *at_eof) { - rms_tag_type *tag = rms_tag_alloc(NULL); - rms_fread_tag(tag , stream , type_map , endian_convert , at_eof); - return tag; -} - - - -void rms_tag_fwrite(const rms_tag_type * tag , FILE * stream) { - rms_util_fwrite_string("tag" , stream); - rms_util_fwrite_string(tag->name , stream); - { - - int i; - for (i=0; i < vector_get_size( tag->key_list ); i++) { - const rms_tagkey_type * tagkey = vector_iget_const( tag->key_list , i ); - rms_tagkey_fwrite( tagkey , stream); - } - - } - rms_util_fwrite_string("endtag" , stream); -} - - -void rms_tag_fprintf(const rms_tag_type * tag , FILE * stream) { - fprintf(stream , " <%s>\n",tag->name); - { - - int i; - for (i=0; i < vector_get_size( tag->key_list ); i++) { - const rms_tagkey_type * tagkey = vector_iget_const( tag->key_list , i ); - rms_tagkey_fprintf( tagkey , stream); - } - - } - fprintf(stream , " \n",tag->name); -} - - -void rms_tag_fwrite_eof(FILE *stream) { - rms_tag_type * tag = rms_tag_alloc("eof"); - rms_tag_fwrite(tag , stream); - rms_tag_free(tag); -} - - -void rms_tag_fwrite_filedata(const char * filetype, FILE *stream) { - rms_tag_type * tag = rms_tag_alloc("filedata"); - - rms_tag_add_tagkey(tag , rms_tagkey_alloc_byteswap() , OWNED_REF); - rms_tag_add_tagkey(tag , rms_tagkey_alloc_filetype(filetype) , OWNED_REF); - rms_tag_add_tagkey(tag , rms_tagkey_alloc_creationDate() , OWNED_REF); - - rms_tag_fwrite(tag , stream); - rms_tag_free(tag); -} - - -rms_tag_type * rms_tag_alloc_dimensions(int nX , int nY , int nZ) { - rms_tag_type * tag = rms_tag_alloc("dimensions"); - - rms_tag_add_tagkey(tag , rms_tagkey_alloc_dim("nX", nX) , OWNED_REF); - rms_tag_add_tagkey(tag , rms_tagkey_alloc_dim("nY", nY) , OWNED_REF); - rms_tag_add_tagkey(tag , rms_tagkey_alloc_dim("nZ", nZ) , OWNED_REF); - - return tag; -} - - -void rms_tag_fwrite_dimensions(int nX , int nY , int nZ , FILE *stream) { - rms_tag_type * tag = rms_tag_alloc_dimensions(nX , nY , nZ); - rms_tag_fwrite(tag , stream); - rms_tag_free(tag); -} - - -void rms_tag_fwrite_parameter(const char *param_name , const rms_tagkey_type *data_key, FILE *stream) { - rms_tag_type * tag = rms_tag_alloc("parameter"); - - rms_tag_add_tagkey(tag , rms_tagkey_alloc_parameter_name(param_name) , OWNED_REF); - rms_tag_add_tagkey(tag , data_key , SHARED); - rms_tag_fwrite(tag , stream); - rms_tag_free(tag); - -} - - -const char *rms_tag_name_ref(const rms_tag_type * tag) { - return tag->name; -} - - diff --git a/ThirdParty/Ert/librms/src/rms_tagkey.c b/ThirdParty/Ert/librms/src/rms_tagkey.c deleted file mode 100644 index 3e0fb2ccd1..0000000000 --- a/ThirdParty/Ert/librms/src/rms_tagkey.c +++ /dev/null @@ -1,718 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'rms_tagkey.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include - -static const char * rms_array_string = "array"; - -static const char rms_type_names[6][7] = {{"char\0"}, - {"float\0"}, - {"double\0"}, - {"bool\0"}, - {"byte\0"}, - {"int\0"}}; - -static const int rms_type_size[6] = {1 , 4 , 8 , 1 , 1 , 4}; /* */ - - -struct rms_tagkey_struct { - int size; - int sizeof_ctype; - int data_size; - int alloc_size; - rms_type_enum rms_type; - char *name; - void *data; - bool endian_convert; - bool shared_data; -}; - - -/*****************************************************************/ - - - -/*****************************************************************/ - - -static void rms_tagkey_assert_fnum(const rms_tagkey_type * tagkey) { - if (!(tagkey->rms_type == rms_float_type || tagkey->rms_type == rms_double_type)) { - fprintf(stderr,"%s: tried to perform numerical operataion on rms_type: %s invalid/not implemented\n",__func__ , rms_type_names[tagkey->rms_type]); - abort(); - } -} - -static void rms_tagkey_assert_fnum2(const rms_tagkey_type * tagkey1 , const rms_tagkey_type *tagkey2) { - rms_tagkey_assert_fnum(tagkey1); - rms_tagkey_assert_fnum(tagkey2); - if (tagkey1->size != tagkey2->size || tagkey1->rms_type != tagkey2->rms_type) { - fprintf(stderr,"%s: tried to combine tagkey with different size/type - aborting \n",__func__); - abort(); - } -} - - -void rms_tagkey_clear(rms_tagkey_type * tagkey) { - int i; - rms_tagkey_assert_fnum(tagkey); - switch (tagkey->rms_type) { - case(rms_double_type): - { - double *tmp = (double *) tagkey->data; - for (i=0; i < tagkey->size; i++) - tmp[i] = 0; - } - break; - case(rms_float_type): - { - float *tmp = (float *) tagkey->data; - for (i=0; i < tagkey->size; i++) - tmp[i] = 0; - } - break; - default: - fprintf(stderr,"%s: only implemented for rms_double_type and rms_float_type - aborting \n",__func__); - abort(); - } -} - - -void rms_tagkey_apply(rms_tagkey_type * tagkey , double (f) (double)) { -int i; - rms_tagkey_assert_fnum(tagkey); - switch (tagkey->rms_type) { - case(rms_double_type): - { - double *tmp = (double *) tagkey->data; - for (i=0; i < tagkey->size; i++) - tmp[i] = f(tmp[i]); - } - break; - - case(rms_float_type): - { - float *tmp = (float *) tagkey->data; - for (i=0; i < tagkey->size; i++) - tmp[i] = f(tmp[i]); - } - break; - - default: - fprintf(stderr,"%s: only implemented for rms_double_type and rms_float_type - aborting \n",__func__); - abort(); - } -} - - -void rms_tagkey_inplace_sqr(rms_tagkey_type * tagkey) { - int i; - rms_tagkey_assert_fnum(tagkey); - switch (tagkey->rms_type) { - case(rms_double_type): - { - double *tmp = (double *) tagkey->data; - for (i=0; i < tagkey->size; i++) - tmp[i] *= tmp[i]; - } - break; - - case(rms_float_type): - { - float *tmp = (float *) tagkey->data; - for (i=0; i < tagkey->size; i++) - tmp[i] *= tmp[i]; - } - break; - - default: - fprintf(stderr,"%s: only implemented for rms_double_type and rms_float_type - aborting \n",__func__); - abort(); - } -} - - -void rms_tagkey_assign(rms_tagkey_type * new, const rms_tagkey_type *src) { - memcpy(new->data , src->data , new->size * new->sizeof_ctype); -} - - -void rms_tagkey_inplace_log10(rms_tagkey_type * tagkey) { - int i; - rms_tagkey_assert_fnum(tagkey); - switch (tagkey->rms_type) { - case(rms_double_type): - { - double *tmp = (double *) tagkey->data; - for (i=0; i < tagkey->size; i++) - tmp[i] = log10(tmp[i]); - } - break; - - case(rms_float_type): - { - float *tmp = (float *) tagkey->data; - for (i=0; i < tagkey->size; i++) - tmp[i] = log10(tmp[i]); - } - break; - - default: - fprintf(stderr,"%s: only implemented for rms_double_type and rms_float_type - aborting \n",__func__); - abort(); - } -} - - -void rms_tagkey_inplace_sqrt(rms_tagkey_type * tagkey) { - int i; - rms_tagkey_assert_fnum(tagkey); - switch (tagkey->rms_type) { - case(rms_double_type): - { - double *tmp = (double *) tagkey->data; - for (i=0; i < tagkey->size; i++) - tmp[i] = sqrt(util_double_max(0.0 , tmp[i])); - } - break; - - case(rms_float_type): - { - float *tmp = (float *) tagkey->data; - for (i=0; i < tagkey->size; i++) - tmp[i] = sqrtf(util_float_max(0.0 , tmp[i])); - } - break; - - default: - fprintf(stderr,"%s: only implemented for rms_double_type and rms_float_type - aborting \n",__func__); - abort(); - } -} - - -void rms_tagkey_scale(rms_tagkey_type * tagkey , double scale_factor) { - int i; - rms_tagkey_assert_fnum(tagkey); - switch (tagkey->rms_type) { - case(rms_double_type): - { - double *tmp = (double *) tagkey->data; - for (i=0; i < tagkey->size; i++) - tmp[i] *= scale_factor; - } - break; - - case(rms_float_type): - { - float *tmp = (float *) tagkey->data; - for (i=0; i < tagkey->size; i++) - tmp[i] *= scale_factor; - } - break; - - default: - fprintf(stderr,"%s: only implemented for rms_double_type and rms_float_type - aborting \n",__func__); - abort(); - } -} - - -void rms_tagkey_inplace_add(rms_tagkey_type * tagkey , const rms_tagkey_type *delta) { - int i; - rms_tagkey_assert_fnum2(tagkey , delta); - switch (tagkey->rms_type) { - case(rms_double_type): - { - double *tmp1 = (double *) tagkey->data; - const double *tmp2 = (const double *) delta->data; - for (i=0; i < tagkey->size; i++) - tmp1[i] += tmp2[i]; - } - break; - - case(rms_float_type): - { - float *tmp1 = (float *) tagkey->data; - const float *tmp2 = (const float *) delta->data; - for (i=0; i < tagkey->size; i++) - tmp1[i] += tmp2[i]; - } - break; - - default: - fprintf(stderr,"%s: only implemented for rms_double_type and rms_float_type - aborting \n",__func__); - abort(); - } -} - - -void rms_tagkey_inplace_add_scaled(rms_tagkey_type * tagkey , const rms_tagkey_type *delta, double factor) { - int i; - rms_tagkey_assert_fnum2(tagkey , delta); - switch (tagkey->rms_type) { - case(rms_double_type): - { - double *tmp1 = (double *) tagkey->data; - const double *tmp2 = (const double *) delta->data; - for (i=0; i < tagkey->size; i++) - tmp1[i] += tmp2[i] * factor; - } - break; - - case(rms_float_type): - { - float *tmp1 = (float *) tagkey->data; - const float *tmp2 = (const float *) delta->data; - for (i=0; i < tagkey->size; i++) - tmp1[i] += tmp2[i] * factor; - } - break; - - default: - fprintf(stderr,"%s: only implemented for rms_double_type and rms_float_type - aborting \n",__func__); - abort(); - } -} - - -void rms_tagkey_inplace_mul(rms_tagkey_type * tagkey , const rms_tagkey_type *delta) { - int i; - rms_tagkey_assert_fnum2(tagkey , delta); - switch (tagkey->rms_type) { - case(rms_double_type): - { - double *tmp1 = (double *) tagkey->data; - const double *tmp2 = (const double *) delta->data; - for (i=0; i < tagkey->size; i++) - tmp1[i] *= tmp2[i]; - } - break; - - case(rms_float_type): - { - float *tmp1 = (float *) tagkey->data; - const float *tmp2 = (const float *) delta->data; - for (i=0; i < tagkey->size; i++) - tmp1[i] *= tmp2[i]; - } - break; - - default: - fprintf(stderr,"%s: only implemented for rms_double_type and rms_float_type - aborting \n",__func__); - abort(); - } -} - - -#define TAGKEY_MAX_MIN(type) \ -{ \ - type * data = rms_tagkey_get_data_ref(tagkey); \ - type max = -data[0]; \ - type min = data[0]; \ - int i; \ - for (i=1; i < tagkey->size; i++) \ - util_update_ ## type ## _max_min(data[i] , &max , &min); \ - memcpy(_max , &max , tagkey->sizeof_ctype); \ - memcpy(_min , &min , tagkey->sizeof_ctype); \ -} - - - -void rms_tagkey_max_min(const rms_tagkey_type * tagkey , void * _max , void *_min) { - switch (tagkey->rms_type) { - case(rms_float_type): - TAGKEY_MAX_MIN(float); - break; - case(rms_double_type): - TAGKEY_MAX_MIN(double); - break; - case(rms_int_type): - TAGKEY_MAX_MIN(int); - break; - default: - fprintf(stderr,"%s: invalid type for element sum \n",__func__); - abort(); - } -} - -#undef TAGKEY_MAX_MIN - - - - - -void rms_tagkey_free_(void *_tagkey) { - rms_tagkey_type * tagkey = (rms_tagkey_type *) _tagkey; - rms_tagkey_free(tagkey); -} - - -static void rms_tagkey_alloc_data(rms_tagkey_type *tagkey) { - if (!tagkey->shared_data) { - - if (tagkey->data_size > tagkey->alloc_size) { - void *tmp = realloc(tagkey->data , tagkey->data_size); - if (tmp == NULL) { - fprintf(stderr,"%s: failed to allocate: %d bytes of storage - aborting \n",__func__ , tagkey->data_size); - abort(); - } - tagkey->data = tmp; - tagkey->alloc_size = tagkey->data_size; - - } - } -} - - - - -rms_tagkey_type * rms_tagkey_copyc(const rms_tagkey_type *tagkey) { - rms_tagkey_type *new_tagkey = rms_tagkey_alloc_empty(tagkey->endian_convert); - - new_tagkey->alloc_size = 0; - new_tagkey->size = tagkey->size; - new_tagkey->sizeof_ctype = tagkey->sizeof_ctype; - new_tagkey->data_size = tagkey->data_size; - new_tagkey->rms_type = tagkey->rms_type; - new_tagkey->data = NULL; - new_tagkey->shared_data = tagkey->shared_data; - - rms_tagkey_alloc_data(new_tagkey); - memcpy(new_tagkey->data , tagkey->data , tagkey->data_size); - new_tagkey->name = util_alloc_string_copy(tagkey->name); - return new_tagkey; -} - - -void * rms_tagkey_copyc_(const void * _tagkey) { - const rms_tagkey_type * tagkey = (const rms_tagkey_type *) _tagkey; - return rms_tagkey_copyc(tagkey); -} - - -static void rms_tagkey_set_data_size(rms_tagkey_type *tagkey , FILE *stream , int strlen) { - - if (tagkey->rms_type == rms_char_type) { - if (stream != NULL) { - const long int init_pos = util_ftell(stream); - int i; - for (i=0; i < tagkey->size; i++) - rms_util_fskip_string(stream); - tagkey->data_size = util_ftell(stream) - init_pos; - util_fseek(stream , init_pos , SEEK_SET); - } else - tagkey->data_size = strlen + 1; - } else - tagkey->data_size = tagkey->size * tagkey->sizeof_ctype; -} - - - -static void rms_tagkey_fread_data(rms_tagkey_type *tagkey , bool endian_convert , FILE *stream) { - if (tagkey->alloc_size < tagkey->data_size) { - fprintf(stderr,"%s: fatal error buffer to small - aborting \n",__func__); - abort(); - } - - int bytes_read = fread(tagkey->data , 1 , tagkey->data_size , stream); - if (bytes_read != tagkey->data_size) { - fprintf(stderr,"%s: failed to read %d bytes - premature EOF? \n",__func__ , tagkey->data_size); - fprintf(stderr,"%s: tagkey: %s \n",__func__ , tagkey->name); - abort(); - } - if (endian_convert) - if (tagkey->sizeof_ctype > 1) - util_endian_flip_vector(tagkey->data , tagkey->sizeof_ctype , tagkey->size); -} - -void rms_tagkey_manual_realloc_data(rms_tagkey_type * tagkey , int data_size) { - tagkey->data_size = data_size; - rms_tagkey_alloc_data(tagkey); -} - -void rms_tagkey_set_data(rms_tagkey_type * tagkey , const void * data) { - if (tagkey->shared_data) - tagkey->data = (void *) data; - else - memcpy(tagkey->data , data , tagkey->data_size); -} - - - - -static void rms_fread_tagkey_header(rms_tagkey_type *tagkey , FILE *stream, hash_type *type_map) { - bool is_array; - char type_string[7]; - - rms_util_fread_string(type_string , 7 , stream); - if (strcmp(type_string , rms_array_string) == 0) { - is_array = true; - rms_util_fread_string(type_string , 7 , stream); - } else - is_array = false; - - { - __rms_type * rms_t = hash_get(type_map , type_string); - tagkey->rms_type = rms_t->rms_type; - tagkey->sizeof_ctype = rms_t->sizeof_ctype; - } - - tagkey->name = realloc(tagkey->name , rms_util_fread_strlen(stream) + 1); - - rms_util_fread_string(tagkey->name , 0 , stream); - if (is_array) - fread(&tagkey->size , 1 , sizeof tagkey->size, stream); - else - tagkey->size = 1; - rms_tagkey_set_data_size(tagkey , stream , -1); -} - - - -static void rms_fread_realloc_tagkey(rms_tagkey_type *tagkey , bool endian_convert , FILE *stream , hash_type *type_map) { - - rms_fread_tagkey_header(tagkey , stream , type_map); - rms_tagkey_alloc_data(tagkey); - rms_tagkey_fread_data(tagkey , endian_convert , stream); - -} - - - -static void rms_tagkey_fwrite_data(const rms_tagkey_type * tagkey , FILE *stream) { - int elm = fwrite(tagkey->data , 1 , tagkey->data_size , stream); - if (elm != tagkey->data_size) { - fprintf(stderr,"%s: failed to write %d bytes to file [tagkey:%s] - aborting \n",__func__ , tagkey->data_size , tagkey->name); - abort(); - } -} - - -void rms_tagkey_fwrite(const rms_tagkey_type * tagkey , FILE *stream) { - if (tagkey->size > 1) - rms_util_fwrite_string("array" , stream); - rms_util_fwrite_string(rms_type_names[tagkey->rms_type] , stream); - rms_util_fwrite_string(tagkey->name , stream); - if (tagkey->size > 1) { - fwrite(&tagkey->size , sizeof tagkey->size , 1 , stream); - rms_util_fwrite_newline(stream); - } - rms_tagkey_fwrite_data(tagkey , stream); -} - -void rms_tagkey_fprintf(const rms_tagkey_type * tagkey, FILE *stream) { - fprintf(stream," <%s> %6d %s",tagkey->name , tagkey->size , rms_type_names[tagkey->rms_type]); - if (tagkey->size == 1) { - if (tagkey->rms_type == rms_int_type) - fprintf(stream, " = %d ",(( int *) tagkey->data)[0]); - else if (tagkey->rms_type == rms_char_type) - fprintf(stream, " = %s ",( char *) tagkey->data); - } - fprintf(stream,"\n"); -} - - -const char * rms_tagkey_get_name(const rms_tagkey_type *tagkey) { - return tagkey->name; -} - -void * rms_tagkey_get_data_ref(const rms_tagkey_type *tagkey) { - return tagkey->data; -} - - -void rms_tagkey_load(rms_tagkey_type *tagkey , bool endian_convert , FILE *stream, hash_type *type_map) { - rms_fread_realloc_tagkey(tagkey , endian_convert , stream , type_map); -} - - -bool rms_tagkey_char_eq(const rms_tagkey_type *tagkey , const char *keyvalue) { - bool eq = false; - if (tagkey->rms_type == rms_char_type) { - if (strcmp(keyvalue , tagkey->data) == 0) - eq = true; - } - return eq; -} - - -rms_tagkey_type * rms_tagkey_alloc_empty(bool endian_convert) { - - rms_tagkey_type *tagkey = malloc(sizeof *tagkey); - tagkey->alloc_size = 0; - tagkey->data_size = 0; - tagkey->size = 0; - tagkey->name = NULL; - tagkey->data = NULL; - tagkey->endian_convert = endian_convert; - tagkey->shared_data = false; - - return tagkey; - -} - - -static rms_tagkey_type * rms_tagkey_alloc_initialized(const char * name , int size , rms_type_enum rms_type , bool endian_convert) { - rms_tagkey_type *tagkey = rms_tagkey_alloc_empty(endian_convert); - tagkey->size = size; - tagkey->rms_type = rms_type; - tagkey->sizeof_ctype = rms_type_size[rms_type]; - tagkey->data_size = tagkey->size * tagkey->sizeof_ctype; - tagkey->name = util_alloc_string_copy(name); - return tagkey; -} - - -rms_tagkey_type * rms_tagkey_alloc_complete(const char * name , int size , rms_type_enum rms_type , const void * data , bool shared_data) { - rms_tagkey_type * tag = rms_tagkey_alloc_initialized(name , size , rms_type , false); - tag->shared_data = shared_data; - - rms_tagkey_alloc_data(tag); - rms_tagkey_set_data(tag , data); - - return tag; -} - - -int rms_tagkey_get_sizeof_ctype(const rms_tagkey_type * key) { - return key->sizeof_ctype; -} - - -rms_type_enum rms_tagkey_get_rms_type(const rms_tagkey_type * key) { - return key->rms_type; -} - - -ecl_type_enum rms_tagkey_get_ecl_type(const rms_tagkey_type * key) { - ecl_type_enum ecl_type; - switch (key->rms_type) { - case(rms_float_type): - ecl_type = ECL_FLOAT_TYPE; - break; - case(rms_double_type): - ecl_type = ECL_DOUBLE_TYPE; - break; - case(rms_int_type): - ecl_type = ECL_INT_TYPE; - break; - default: - fprintf(stderr,"%s: sorry rms_type: %d not implemented - aborting \n",__func__ , key->rms_type); - abort(); - } - return ecl_type; -} - - - - -void rms_tagkey_free(rms_tagkey_type *tagkey) { - if (tagkey->name != NULL) free(tagkey->name); - - if (!tagkey->shared_data) - if (tagkey->data != NULL) free(tagkey->data); - - free(tagkey); -} - - -rms_tagkey_type * rms_tagkey_alloc_byteswap() { - rms_tagkey_type *tagkey = rms_tagkey_alloc_initialized("byteswaptest" , 1 , rms_int_type , false); - rms_tagkey_alloc_data(tagkey); - ((int *) tagkey->data)[0] = 1; - return tagkey; -} - - -rms_tagkey_type * rms_tagkey_alloc_filetype(const char * filetype) { - rms_tagkey_type *tagkey = rms_tagkey_alloc_initialized("filetype" , 1 , rms_char_type , false); - rms_tagkey_set_data_size(tagkey , NULL , strlen(filetype)); - rms_tagkey_alloc_data(tagkey); - sprintf(tagkey->data , "%s" , filetype); - return tagkey; -} - - -rms_tagkey_type * rms_tagkey_alloc_parameter_name(const char * parameter_name) { - rms_tagkey_type *tagkey = rms_tagkey_alloc_initialized("name" , 1 , rms_char_type , false); - rms_tagkey_set_data_size(tagkey , NULL , strlen(parameter_name)); - rms_tagkey_alloc_data(tagkey); - sprintf(tagkey->data , "%s" , parameter_name); - return tagkey; -} - - -rms_tagkey_type * rms_tagkey_alloc_creationDate() { - const int len = strlen("08/05/2007 08:31:39"); - struct tm ts; - time_t now; - rms_tagkey_type *tagkey = rms_tagkey_alloc_initialized("creationDate" , 1 , rms_char_type , false); - - now = time(NULL); - localtime_r(&now , &ts); - - rms_tagkey_set_data_size(tagkey , NULL , len); - rms_tagkey_alloc_data(tagkey); - sprintf(tagkey->data , "%02d/%02d/%4d %02d:%02d:%02d" , - ts.tm_mday, - ts.tm_mon, - ts.tm_year + 1900, - ts.tm_hour, - ts.tm_min, - ts.tm_sec); - - return tagkey; -} - - -rms_tagkey_type * rms_tagkey_alloc_dim(const char * dim, int value) { - rms_tagkey_type *tagkey = rms_tagkey_alloc_initialized(dim , 1 , rms_int_type , false); - rms_tagkey_alloc_data(tagkey); - ((int *) tagkey->data)[0] = value; - return tagkey; -} - - -int rms_tagkey_get_size(const rms_tagkey_type * tagkey) { return tagkey->size; } - - -/** - This function will compare two tagkeys, and return true if they are - equal. If they differ in size/type/... or other fundamental ways a - false is immediately returned. -*/ - -bool rms_tagkey_cmp(const rms_tagkey_type * tagkey1 , const rms_tagkey_type * tagkey2) { - if (tagkey1->size != tagkey2->size) return false; - if (tagkey1->rms_type != tagkey2->rms_type) return false; - if (memcmp(tagkey1->data , tagkey1->data , tagkey1->size * tagkey1->sizeof_ctype) == 0) - return true; - else - return false; -} diff --git a/ThirdParty/Ert/librms/src/rms_type.c b/ThirdParty/Ert/librms/src/rms_type.c deleted file mode 100644 index 5d3e44a744..0000000000 --- a/ThirdParty/Ert/librms/src/rms_type.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'rms_type.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -/*****************************************************************/ -/* A microscopic (purely internal) type object only used - for storing the hash type_map */ -/*****************************************************************/ - - - - -void rms_type_free(void *rms_t) { - free( (__rms_type *) rms_t); -} - - -static __rms_type * rms_type_set(__rms_type *rms_t , rms_type_enum rms_type , int sizeof_ctype) { - rms_t->rms_type = rms_type; - rms_t->sizeof_ctype = sizeof_ctype; - return rms_t; -} - - -__rms_type * rms_type_alloc(rms_type_enum rms_type, int sizeof_ctype) { - __rms_type *rms_t = malloc(sizeof *rms_t); - rms_type_set(rms_t , rms_type , sizeof_ctype); - return rms_t; -} - - -const void * rms_type_copyc(const void *__rms_t) { - const __rms_type *rms_t = (const __rms_type *) __rms_t; - __rms_type *new_t = rms_type_alloc(rms_t->rms_type , rms_t->sizeof_ctype); - return new_t; -} diff --git a/ThirdParty/Ert/librms/src/rms_util.c b/ThirdParty/Ert/librms/src/rms_util.c deleted file mode 100644 index 16dd6533bd..0000000000 --- a/ThirdParty/Ert/librms/src/rms_util.c +++ /dev/null @@ -1,178 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'rms_util.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include - -#include - -#include - -#include - - - - -/* - This translates from the RMS data layout to "Fortan / ECLIPSE" data - layout. - - RMS: k index is running fastest *AND* backwards. - F90: i is running fastest, and k is running the 'normal' way. - - This function should be *THE ONLY* place in the code where explicit mention - is made to the RMS ordering sequence. -*/ - - -int rms_util_global_index_from_eclipse_ijk(int nx, int ny , int nz , int i , int j , int k) { - return i*ny*nz + j*nz + (nz - k - 1); -} - - - -void rms_util_set_fortran_data(void *_f90_data , const void * _rms_data, int sizeof_ctype , int nx, int ny , int nz) { - char *f90_data = (char *) _f90_data; - const char *rms_data = (const char *) _rms_data; - int i,j,k,rms_index, f90_index; - for (i=0; i < nx; i++) - for (j=0; j < ny; j++) - for (k= 0; k < nz; k++) { - rms_index = rms_util_global_index_from_eclipse_ijk(nx,ny,nz,i,j,k); - f90_index = i + j*nx + k*nx*ny; - memcpy(&f90_data[f90_index * sizeof_ctype] , &rms_data[rms_index * sizeof_ctype] , sizeof_ctype); - } -} - - - -void rms_util_read_fortran_data(const void *_f90_data , void * _rms_data, int sizeof_ctype , int nx, int ny , int nz) { - const char *f90_data = (const char *) _f90_data; - char *rms_data = (char *) _rms_data; - int i,j,k,rms_index, f90_index; - - for (i=0; i < nx; i++) - for (j=0; j < ny; j++) - for (k= 0; k < nz; k++) { - rms_index = rms_util_global_index_from_eclipse_ijk(nx,ny,nz,i,j,k); - f90_index = i + j*nx + k*nx*ny; - memcpy(&rms_data[rms_index * sizeof_ctype] , &f90_data[f90_index * sizeof_ctype] , sizeof_ctype); - } -} - - - -void rms_util_translate_undef(void * _data , int size , int sizeof_ctype , const void * old_undef , const void * new_undef) { - char * data = (char *) _data; - int i; - for (i=0; i < size; i++) { - if (memcmp( &data[i*sizeof_ctype] , old_undef , sizeof_ctype) == 0) - memcpy( &data[i*sizeof_ctype] , new_undef , sizeof_ctype); - } -} - - -void rms_util_fskip_string(FILE *stream) { - char c; - bool cont = true; - while (cont) { - fread(&c , 1 , 1 , stream); - if (c == 0) - cont = false; - } -} - - -int rms_util_fread_strlen(FILE *stream) { - long int init_pos = util_ftell(stream); - int len; - rms_util_fskip_string(stream); - len = util_ftell(stream) - init_pos; - util_fseek(stream , init_pos , SEEK_SET); - return len; -} - - -/* - max_length *includes* the trailing \0. -*/ -bool rms_util_fread_string(char *string , int max_length , FILE *stream) { - bool read_ok = true; - bool cont = true; - long int init_pos = util_ftell(stream); - int pos = 0; - while (cont) { - fread(&string[pos] , sizeof *string , 1 , stream); - if (string[pos] == 0) { - read_ok = true; - cont = false; - } else { - pos++; - if (max_length > 0) { - if (pos == max_length) { - read_ok = false; - util_fseek(stream , init_pos , SEEK_SET); - cont = false; - } - } - } - } - - return read_ok; -} - - -void rms_util_fwrite_string(const char * string , FILE *stream) { - fwrite(string , sizeof * string , strlen(string) , stream); - fputc('\0' , stream); -} - -void rms_util_fwrite_comment(const char * comment , FILE *stream) { - fputc('#' , stream); - fwrite(comment , sizeof * comment , strlen(comment) , stream); - fputc('#' , stream); - fputc('\0' , stream); -} - - -void rms_util_fwrite_newline(FILE *stream) { - return; -} - - -rms_type_enum rms_util_convert_ecl_type(ecl_type_enum ecl_type) { - rms_type_enum rms_type = rms_int_type; /* Shut up the compiler */ - switch (ecl_type) { - case(ECL_INT_TYPE): - rms_type = rms_int_type; - break; - case(ECL_FLOAT_TYPE): - rms_type = rms_float_type; - break; - case(ECL_DOUBLE_TYPE): - rms_type = rms_double_type; - break; - default: - util_abort("%s: Conversion ecl_type -> rms_type not supported for ecl_type:%s \n",__func__ , ecl_util_get_type_name(ecl_type)); - } - return rms_type; -} - - diff --git a/ThirdParty/Ert/librms/tests/CMakeLists.txt b/ThirdParty/Ert/librms/tests/CMakeLists.txt deleted file mode 100644 index 1e296b020f..0000000000 --- a/ThirdParty/Ert/librms/tests/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -if (STATOIL_TESTDATA_ROOT) - - add_executable( rms_file_test rms_file_test.c ) - target_link_libraries( rms_file_test rms test_util ) - - add_test( rms_file_test - ${EXECUTABLE_OUTPUT_PATH}/rms_file_test - ${PROJECT_SOURCE_DIR}/test-data/Statoil/config/rms_file_test/rms_file) - - set_property( TEST rms_file_test PROPERTY LABELS StatoilData ) - -endif() \ No newline at end of file diff --git a/ThirdParty/Ert/librms/tests/rms_file_test.c b/ThirdParty/Ert/librms/tests/rms_file_test.c deleted file mode 100644 index adbdc0ba1e..0000000000 --- a/ThirdParty/Ert/librms/tests/rms_file_test.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASA, Norway. - - The file 'rms_file_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include -#include -#include -#include - -#include -#include - -#include -#include - - - -void test_rms_file_fread_alloc_data_tag(rms_file_type * rms_file) { - rms_tag_type * parameter_tag = rms_file_fread_alloc_tag(rms_file , "parameter" , NULL , NULL); - test_assert_not_NULL(parameter_tag); - test_assert_string_equal("parameter", rms_tag_get_name(parameter_tag)); - rms_tag_free(parameter_tag); -} - - -void test_rms_file_fread_alloc_data_tagkey(rms_file_type *rms_file) { - rms_tagkey_type * name_tagkey = rms_file_fread_alloc_data_tagkey(rms_file , "parameter" , NULL , NULL); - test_assert_not_NULL(name_tagkey); - test_assert_int_equal(rms_float_type, rms_tagkey_get_rms_type(name_tagkey)); - rms_tagkey_free(name_tagkey); -} - - -int main(int argc , char ** argv) { - const char * filename = argv[1]; - rms_file_type * rms_file = rms_file_alloc(filename , false); - test_assert_not_NULL(rms_file); - - test_rms_file_fread_alloc_data_tag(rms_file); - test_rms_file_fread_alloc_data_tagkey(rms_file); - - rms_file_free(rms_file); - exit(0); -} diff --git a/ThirdParty/Ert/libsched/CMakeLists.txt b/ThirdParty/Ert/libsched/CMakeLists.txt deleted file mode 100644 index 3edab07684..0000000000 --- a/ThirdParty/Ert/libsched/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -add_subdirectory( src ) -if (BUILD_APPLICATONS) - add_subdirectory( applications ) -endif() - -if (BUILD_TESTS) - add_subdirectory( tests ) -endif() diff --git a/ThirdParty/Ert/libsched/applications/CMakeLists.txt b/ThirdParty/Ert/libsched/applications/CMakeLists.txt deleted file mode 100644 index 83f41113b9..0000000000 --- a/ThirdParty/Ert/libsched/applications/CMakeLists.txt +++ /dev/null @@ -1,30 +0,0 @@ -link_directories( ${ERT_BINARY_DIR}/libsched/src ) - -include_directories( ${libutil_build_path} ) -include_directories( ${libutil_src_path} ) -include_directories( ${libsched_src_path} ) -include_directories( ${libecl_src_path} ) - -add_executable( sched_summary.x sched_summary.c ) - -set(program_list sched_summary.x) -foreach(prog ${program_list}) - target_link_libraries( ${prog} sched ecl ert_util ) - if (USE_RUNPATH) - add_runpath( ${prog} ) - endif() - #----------------------------------------------------------------- - if (SCHED_INSTALL_PREFIX) - set (destination ${SCHED_INSTALL_PREFIX}/bin) - else() - set (destination bin) - endif() - - if (INSTALL_ERT) - install(TARGETS ${prog} DESTINATION ${destination}) - if (INSTALL_GROUP) - install(CODE "EXECUTE_PROCESS(COMMAND chgrp ${INSTALL_GROUP} ${destination}/${prog})") - install(CODE "EXECUTE_PROCESS(COMMAND chmod g+w ${destination}/${prog})") - endif() - endif() -endforeach() diff --git a/ThirdParty/Ert/libsched/applications/get_well_list.c b/ThirdParty/Ert/libsched/applications/get_well_list.c deleted file mode 100644 index 1d5e9aec4e..0000000000 --- a/ThirdParty/Ert/libsched/applications/get_well_list.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'get_well_list.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -#include -#include - -int main(int argc, char **argv) -{ - if(argc < 2) - { - printf("Usage: get_well_list.x my_sched_file.SCH\n"); - return 0; - } - - int num_wells; - char ** well_list; - - sched_file_type * sched_file = NULL; - history_type * history = NULL; - - - sched_file = sched_file_alloc(-1); - sched_file_parse(sched_file, -1 , argv[1]); - - - history = history_alloc_from_sched_file(sched_file); - - well_list = history_alloc_well_list(history, &num_wells); - - for(int well_nr = 0; well_nr < num_wells; well_nr++) - printf("%s\n", well_list[well_nr]); - - history_free(history); - sched_file_free(sched_file); - util_free_stringlist(well_list, num_wells); - - return 0; -} diff --git a/ThirdParty/Ert/libsched/applications/gruptree_test.c b/ThirdParty/Ert/libsched/applications/gruptree_test.c deleted file mode 100644 index 06fc7eed27..0000000000 --- a/ThirdParty/Ert/libsched/applications/gruptree_test.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'gruptree_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -#include - -int main() -{ - gruptree_type * gruptree = gruptree_alloc(); - gruptree_register_grup(gruptree, "INJE", "FIELD"); - gruptree_register_well(gruptree, "WI1" , "INJE"); - gruptree_register_well(gruptree, "WI2" , "INJE"); - gruptree_register_well(gruptree, "WI3" , "INJE"); - gruptree_register_well(gruptree, "WI4" , "INJE"); - - gruptree_register_grup(gruptree, "PLATA", "FIELD"); - gruptree_register_grup(gruptree, "INJE", "PLATA"); - gruptree_register_grup(gruptree, "PROD", "PLATA"); - gruptree_register_well(gruptree, "WP1", "PROD"); - gruptree_register_well(gruptree, "WP2", "PROD"); - gruptree_register_well(gruptree, "WP3", "PROD"); - gruptree_register_well(gruptree, "WP4", "PROD"); - gruptree_register_well(gruptree, "WP5", "PROD"); - - gruptree_register_grup(gruptree, "PLATB", "FIELD"); - gruptree_register_well(gruptree, "WPB1", "PLATB"); - - gruptree_printf_grup_wells(gruptree, "FIELD"); - gruptree_printf_grup_wells(gruptree, "PLATA"); - gruptree_printf_grup_wells(gruptree, "PLATB"); - gruptree_printf_grup_wells(gruptree, "INJE"); - gruptree_printf_grup_wells(gruptree, "PROD"); - - printf("Letting PLATB be a subgroup of PLATA.\n"); - gruptree_register_grup(gruptree, "PLATB", "PLATA"); - gruptree_register_well(gruptree, "SVADA", "FIELD"); - - gruptree_printf_grup_wells(gruptree, "PLATA"); - gruptree_printf_grup_wells(gruptree, "FIELD"); - - printf("Trying to copy the gruptree...\n"); - gruptree_type * gruptree_cpy = gruptree_copyc(gruptree); - - printf("Freeing the old gruptree..\n"); - gruptree_free(gruptree); - - printf("Trying to access new gruptree..\n"); - gruptree_printf_grup_wells(gruptree_cpy, "FIELD"); - gruptree_printf_grup_wells(gruptree_cpy, "PLATA"); - gruptree_printf_grup_wells(gruptree_cpy, "INJE"); - - printf("Writing gruptree to disk..\n"); - FILE * stream = util_fopen("gruptree_stor.bin", "w"); - gruptree_fwrite(gruptree_cpy, stream); - - printf("Closing stream and free'ing gruptre..\n"); - fclose(stream); - gruptree_free(gruptree_cpy); - - printf("Reading gruptree from disk, hang on to yer helmet..\n"); - stream = util_fopen("gruptree_stor.bin", "r"); - gruptree = gruptree_fread_alloc(stream); - fclose(stream); - - printf("Trying to access new gruptree..\n"); - gruptree_printf_grup_wells(gruptree, "FIELD"); - gruptree_printf_grup_wells(gruptree, "PLATA"); - gruptree_printf_grup_wells(gruptree, "INJE"); - - printf("Cleaning up..\n"); - gruptree_free(gruptree); - - - return 0; -} diff --git a/ThirdParty/Ert/libsched/applications/perturb_history/group_rate.c b/ThirdParty/Ert/libsched/applications/perturb_history/group_rate.c deleted file mode 100644 index 71557b6664..0000000000 --- a/ThirdParty/Ert/libsched/applications/perturb_history/group_rate.c +++ /dev/null @@ -1,220 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'group_rate.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define GROUP_RATE_ID 6681055 - - -struct group_rate_struct { - UTIL_TYPE_ID_DECLARATION; - char * name; - bool producer; - double_vector_type * base_rate; - double_vector_type * shift; - double_vector_type * min_shift; - double_vector_type * max_shift; - stringlist_type * min_shift_string; - stringlist_type * max_shift_string; - sched_phase_enum phase; - const time_t_vector_type * time_vector; - vector_type * well_rates; - const sched_history_type * sched_history; -}; - - - -void group_rate_update_wconhist( group_rate_type * group_rate , sched_kw_wconhist_type * kw, int restart_nr ) { - int well_nr; - for (well_nr = 0; well_nr < vector_get_size( group_rate->well_rates ); well_nr++) { - well_rate_type * well_rate = vector_iget( group_rate->well_rates , well_nr ); - well_rate_update_wconhist( well_rate ,kw , restart_nr ); - } -} - - -void group_rate_update_wconinje( group_rate_type * group_rate , sched_kw_wconinje_type * kw, int restart_nr ) { - int well_nr; - for (well_nr = 0; well_nr < vector_get_size( group_rate->well_rates ); well_nr++) { - well_rate_type * well_rate = vector_iget( group_rate->well_rates , well_nr ); - well_rate_update_wconinje( well_rate ,kw , restart_nr ); - } -} - - - - - -group_rate_type * group_rate_alloc(const sched_history_type * sched_history , const time_t_vector_type * time_vector , const char * name , const char * phase , const char * type_string , const char * filename) { - group_rate_type * group_rate = util_malloc( sizeof * group_rate , __func__); - UTIL_TYPE_ID_INIT( group_rate , GROUP_RATE_ID ); - group_rate->name = util_alloc_string_copy( name ); - group_rate->time_vector = time_vector; - group_rate->shift = double_vector_alloc(0,0); - group_rate->base_rate = double_vector_alloc(0,0); - group_rate->min_shift = double_vector_alloc(0 , 0); - group_rate->max_shift = double_vector_alloc(0 , 0); - group_rate->min_shift_string = stringlist_alloc_new(); - group_rate->max_shift_string = stringlist_alloc_new(); - group_rate->phase = sched_phase_type_from_string( phase ); - group_rate->sched_history = sched_history; - { - if (strcmp( type_string , "INJECTOR") == 0) - group_rate->producer = false; - else if ( strcmp( type_string , "PRODUCER") == 0) - group_rate->producer = true; - } - - fscanf_2ts( time_vector , filename , group_rate->min_shift_string , group_rate->max_shift_string ); - group_rate->well_rates = vector_alloc_new(); - return group_rate; -} - - -void group_rate_init( group_rate_type * group_rate ) { - - for (int iw = 0; iw < vector_get_size( group_rate->well_rates ); iw++) { - const well_rate_type * well_rate = vector_iget( group_rate->well_rates , iw ); - for (int tstep = 0; tstep < well_rate_get_length( well_rate ); tstep++) - double_vector_iadd( group_rate->base_rate , tstep , well_rate_iget_rate( well_rate , tstep )); - } - - for (int i = 0; i < stringlist_get_size( group_rate->min_shift_string ); i++) { - double_vector_iset( group_rate->min_shift , i , sscanfp( double_vector_safe_iget( group_rate->base_rate , i ) , stringlist_iget( group_rate->min_shift_string , i))); - double_vector_iset( group_rate->max_shift , i , sscanfp( double_vector_safe_iget( group_rate->base_rate , i ) , stringlist_iget( group_rate->max_shift_string , i))); - } - -} - - - - - - -static UTIL_SAFE_CAST_FUNCTION( group_rate , GROUP_RATE_ID ); - -void group_rate_free( group_rate_type * group_rate ) { - free( group_rate->name ); - double_vector_free( group_rate->shift ); - double_vector_free( group_rate->base_rate ); - double_vector_free( group_rate->min_shift ); - double_vector_free( group_rate->max_shift ); - vector_free( group_rate->well_rates ); - free( group_rate ); -} - - -void group_rate_free__( void * arg ) { - group_rate_type * group_rate = group_rate_safe_cast( arg ); - group_rate_free( group_rate ); -} - - - -bool group_rate_is_producer( const group_rate_type * group_rate ) { - return group_rate->producer; -} - -sched_phase_enum group_rate_get_phase( const group_rate_type * group_rate ) { - return group_rate->phase; -} - - -const char * group_rate_get_name( const group_rate_type * group_rate ) { - return group_rate->name; -} - - -double_vector_type * group_rate_get_shift( group_rate_type * group_rate ) { - return group_rate->shift; -} - - -void group_rate_add_well_rate( group_rate_type * group_rate , well_rate_type * well_rate) { - if (well_rate_get_phase( well_rate ) == group_rate->phase) { - char * key = util_alloc_sprintf("%s:%s" , well_rate_get_name( well_rate ) , sched_phase_type_string( group_rate->phase )); - vector_append_owned_ref( group_rate->well_rates , well_rate , well_rate_free__ ); - free( key ); - } -} - - - - -void group_rate_sample( group_rate_type * group_rate ) { - int length = time_t_vector_size( group_rate->time_vector ); - double * group_shift = util_malloc( length * sizeof * group_shift , __func__); - int * well_count = util_malloc( length * sizeof * well_count , __func__); - int num_wells = vector_get_size( group_rate->well_rates ); - int i,well_nr; - - for (i = 0; i < length; i++) { - group_shift[i] = 0; - well_count[i] = 0; - } - - for (well_nr=0; well_nr < num_wells; well_nr++) { - well_rate_type * well_rate = vector_iget( group_rate->well_rates , well_nr ); - well_rate_sample_shift( well_rate ); - { - const double * well_shift = double_vector_get_ptr( well_rate_get_shift( well_rate )); - for (i = 0; i < length; i++) { - group_shift[i] += well_shift[i]; - if (well_rate_well_open( well_rate , i )) - well_count[i] += 1; - } - } - } - - { - for (i = 0; i < length; i++) { - if (group_shift[i] > double_vector_iget( group_rate->max_shift , i)) { - double adjustment = -(group_shift[i] - double_vector_iget(group_rate->max_shift , i)) / well_count[i]; - for (well_nr = 0; well_nr < num_wells; well_nr++) { - well_rate_type * well_rate = vector_iget( group_rate->well_rates , well_nr ); - well_rate_ishift( well_rate , i , adjustment ); - } - } else if (group_shift[i] < double_vector_iget( group_rate->min_shift , i )) { - double adjustment = -(group_shift[i] - double_vector_iget(group_rate->min_shift , i)) / well_count[i]; - for (well_nr = 0; well_nr < num_wells; well_nr++) { - well_rate_type * well_rate = vector_iget( group_rate->well_rates , well_nr ); - well_rate_ishift( well_rate , i , adjustment ); - } - } - } - } - - - - free( well_count ); - free( group_shift ); - -} diff --git a/ThirdParty/Ert/libsched/applications/perturb_history/group_rate.h b/ThirdParty/Ert/libsched/applications/perturb_history/group_rate.h deleted file mode 100644 index d38e899909..0000000000 --- a/ThirdParty/Ert/libsched/applications/perturb_history/group_rate.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'group_rate.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_GROUP_RATE_H -#define ERT_GROUP_RATE_H - -#include -#include -#include -#include - -typedef struct group_rate_struct group_rate_type; -group_rate_type * group_rate_alloc(const sched_history_type * sched_history , const time_t_vector_type * time_vector , const char * name , const char * phase, const char * type_string , const char * filename); -void group_rate_free__( void * arg ); -void group_rate_add_well_rate( group_rate_type * group_rate , well_rate_type * well_rate); -sched_phase_enum group_rate_get_phase( const group_rate_type * group_rate ); -void group_rate_sample( group_rate_type * group_rate ); -void group_rate_update_wconhist( group_rate_type * group_rate , sched_kw_wconhist_type * kw, int restart_nr ); -void group_rate_update_wconinje( group_rate_type * group_rate , sched_kw_wconinje_type * kw, int restart_nr ); -bool group_rate_is_producer( const group_rate_type * group_rate ); -void group_rate_init( group_rate_type * group_rate ); - -#endif diff --git a/ThirdParty/Ert/libsched/applications/perturb_history/pert.conf b/ThirdParty/Ert/libsched/applications/perturb_history/pert.conf deleted file mode 100644 index 18f71b015b..0000000000 --- a/ThirdParty/Ert/libsched/applications/perturb_history/pert.conf +++ /dev/null @@ -1,15 +0,0 @@ -DATA_FILE Example_01_base.data -SCHEDULE_FILE target.SCH -TARGET tmp/sched_%d.SCH -NUM_REALIZATIONS 100 -GROUP_RATE GROUP1 OIL PRODUCER GROUP1.min_max - -WELL_RATE GROUP1 OP_1 50 OP1.stat -WELL_RATE GROUP1 OP_2 50 OP1.stat -WELL_RATE GROUP1 OP_3 50 OP1.stat -WELL_RATE GROUP1 OP_4 50 OP1.stat -WELL_RATE GROUP1 OP_5 50 OP1.stat - - - ---GROUP_RATE GROUP WATER GROUP2.min_max diff --git a/ThirdParty/Ert/libsched/applications/perturb_history/pert_util.c b/ThirdParty/Ert/libsched/applications/perturb_history/pert_util.c deleted file mode 100644 index 511761036e..0000000000 --- a/ThirdParty/Ert/libsched/applications/perturb_history/pert_util.c +++ /dev/null @@ -1,186 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'pert_util.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static inline int randint() { - return rand(); -} - - -void rand_dbl(int N , double max , double *R) { - int i; - for (i=0; i < N; i++) - R[i] = randint() * max / RAND_MAX; -} - - -double rand_normal(double mean , double std) { - const double pi = 3.141592653589; - double R[2]; - rand_dbl(2 , 1.0 , R); - return mean + std * sqrt(-2.0 * log(R[0])) * cos(2.0 * pi * R[1]); -} - - -void rand_stdnormal_vector(int size , double *R) { - int i; - for (i = 0; i < size; i++) - R[i] = rand_normal(0.0 , 1.0); -} - - - - -/*****************************************************************/ - -static void set_ts(const time_t_vector_type * time_vector , stringlist_type * stringlist , time_t start_date , time_t end_date , const char * string_value) { - int i; - for (i=0; i < time_t_vector_size( time_vector ); i++) { - time_t t = time_t_vector_iget( time_vector , i ); - if ((t >= start_date) && (t < end_date)) - stringlist_iset_copy( stringlist , i , string_value ); - } -} - -/** - File format: - - * - 12/07/2009 500 577 - 12/07/2009 - 16/09/2009 672 666 - 17/09/2009 - * 100 10% - - - 1. Both dates can be replaced with '*' - which is implied to mean - either the start date, or the end date. - - 2. The formatting of the data strings is 100% NAZI - no spaces - allowed. - - 3. The date intervals are half-open, [date1,date2). - - 4. The date lines can overlap - they are applied in line-order. - - 5. The last float value (i.e. 577 and 666 on the liness above) can - be a percent value; that should indicated with '%' immediately - following the number. The percent number should be in the - interval [0,100]. The bool vector tsp is updated to indicate - whether the data should be interpreted as percent or not. - -*/ - - -static void load_exit( FILE * stream , const char * filename) { - - fprintf(stderr," Something wrong around line:%d of file:%s\n",util_get_current_linenr( stream ) , filename ); - fprintf(stderr," Each line should be:\n date1 - date2 value\nwhere date should be formatted as 12/06/2003. \n"); - exit(1); - -} - - -void fscanf_2ts(const time_t_vector_type * time_vector , const char * filename , stringlist_type * s1 , stringlist_type * s2) { - time_t start_time = time_t_vector_get_first( time_vector ); - time_t end_time = time_t_vector_get_last( time_vector ) + 1; - - { - stringlist_clear( s1 ); - stringlist_clear( s2 ); - for (int i=0; i < time_t_vector_size( time_vector ); i++) { - stringlist_append_ref( s1 , NULL ); - stringlist_append_ref( s2 , NULL ); - } - } - - { - FILE * stream = util_fopen( filename , "r"); - char datestring1[32]; - char datestring2[32]; - char dash; - char value1string[32]; - char value2string[32]; - - while (true) { - int read_count = fscanf(stream , "%s %c %s %s %s" , datestring1 , &dash , datestring2, value1string , value2string); - if (read_count == 5) { - bool OK = true; - time_t t1 = -1; - time_t t2 = -1; - if (util_string_equal( datestring1 , "*")) - t1 = start_time; - else - OK = util_sscanf_date( datestring1 , &t1 ); - - if (util_string_equal( datestring2 , "*")) - t2 = end_time; - else - OK = (OK && util_sscanf_date( datestring2 , &t2 )); - - if (OK) { - set_ts( time_vector , s1 , t1 , t2 , value1string ); - set_ts( time_vector , s2 , t1 , t2 , value2string ); - } else - load_exit( stream , filename ); - - } else { - if (read_count == EOF) - break; - else - load_exit( stream , filename ); - } - } - fclose( stream ); - } -} - - -double sscanfp( double base_value , const char * value_string ) { - double value , parse_value; - char * error_ptr; - - if (value_string == NULL) - return 0; - - parse_value = strtod( value_string , &error_ptr); - if (error_ptr[0] == '%') - value = base_value * parse_value * 0.01; - else { - if (error_ptr[0] == '\0') - value = parse_value; - else { - value = 0; - util_exit("Failed to parse \'%s\' as valid number. \n",value_string ); - } - } - - return value; -} - - -/*****************************************************************/ - - - diff --git a/ThirdParty/Ert/libsched/applications/perturb_history/pert_util.h b/ThirdParty/Ert/libsched/applications/perturb_history/pert_util.h deleted file mode 100644 index aa0a0d41c2..0000000000 --- a/ThirdParty/Ert/libsched/applications/perturb_history/pert_util.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'pert_util.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_PERT_UTIL_H -#define ERT_PERT_UTIL_H -#include -#include -#include -#include - -void rand_dbl(int N , double max , double *R); -double rand_normal(double mean , double std); -void rand_stdnormal_vector(int size , double *R); -void fscanf_2ts(const time_t_vector_type * time_vector , const char * filename , stringlist_type * s1 , stringlist_type * s2); -double sscanfp( double base_value , const char * value_string ); - - -#endif diff --git a/ThirdParty/Ert/libsched/applications/perturb_history/perturb_history.c b/ThirdParty/Ert/libsched/applications/perturb_history/perturb_history.c deleted file mode 100644 index 5fd86a438c..0000000000 --- a/ThirdParty/Ert/libsched/applications/perturb_history/perturb_history.c +++ /dev/null @@ -1,240 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'perturb_history.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/*****************************************************************/ - - -void perturb_wconhist( void * void_kw , int restart_nr , void * arg) { - sched_kw_wconhist_type * kw = sched_kw_wconhist_safe_cast( void_kw ); - { - hash_type * group_hash = hash_safe_cast( arg ); - hash_iter_type * group_iter = hash_iter_alloc( group_hash ); - while (!hash_iter_is_complete( group_iter )) { - group_rate_type * group_rate = hash_iter_get_next_value( group_iter ); - if (group_rate_is_producer( group_rate )) - group_rate_update_wconhist( group_rate , kw , restart_nr ); - } - } -} - - - -void perturb_wconinje( void * void_kw , int restart_nr , void * arg) { - sched_kw_wconinje_type * kw = sched_kw_wconinje_safe_cast( void_kw ); - { - hash_type * group_hash = hash_safe_cast( arg ); - hash_iter_type * group_iter = hash_iter_alloc( group_hash ); - while (!hash_iter_is_complete( group_iter )) { - group_rate_type * group_rate = hash_iter_get_next_value( group_iter ); - if (!group_rate_is_producer( group_rate )) - group_rate_update_wconinje( group_rate , kw , restart_nr ); - } - } -} - - - - -void config_init(config_parser_type * config ) { - config_item_type * item; - - config_add_key_value(config , "NUM_REALIZATIONS" , true , CONFIG_INT ); - config_add_key_value(config , "SCHEDULE_FILE" , true , CONFIG_EXISTING_FILE); - config_add_key_value(config , "DATA_FILE" , true , CONFIG_EXISTING_FILE); - config_add_key_value(config , "TARGET" , true , CONFIG_STRING ); - - - - item = config_add_item( config , "GROUP_RATE" , false , true ); /* Group name as part of parsing */ - config_item_set_argc_minmax(item , 4 , 4 , 4 , (const config_item_types[4]) { CONFIG_STRING, /* Group name */ - CONFIG_STRING , /* Phase */ - CONFIG_STRING , /* PRODUCER / INJECTOR */ - CONFIG_EXISTING_FILE}); /* File with min / max shift */ - config_item_set_indexed_selection_set( item , 1 , 3 , (const char *[3]) { "OIL" , "GAS" , "WATER"}); - config_item_set_indexed_selection_set( item , 2 , 2 , (const char *[2]) { "PRODUCER" , "INJECTOR"}); - - - - item = config_add_item( config , "WELL_RATE" , false , true ); /* Group name as part of parsing */ - config_item_set_argc_minmax(item , 4 , 4 , 4 , (const config_item_types[4]) { CONFIG_STRING, /* GROUP NAME */ - CONFIG_STRING , /* Well name */ - CONFIG_FLOAT , /* Corr_length (days) */ - CONFIG_EXISTING_FILE});/* File with mean , std shift */ -} - - - -void load_groups( const config_parser_type * config , const sched_file_type * sched_file , hash_type * group_rates , const sched_history_type * sched_history , const time_t_vector_type * time_vector ) { - int i; - for (i=0; i < config_get_occurences( config , "GROUP_RATE" ); i++) { - const char * group_name = config_iget( config , "GROUP_RATE" , i , 0 ); - const char * phase_string = config_iget( config , "GROUP_RATE" , i , 1 ); - const char * type_string = config_iget( config , "GROUP_RATE" , i , 2 ); - const char * min_max_file = config_iget( config , "GROUP_RATE" , i , 3 ); - - group_rate_type * group_rate = group_rate_alloc( sched_history , time_vector , group_name , phase_string , type_string , min_max_file ); - hash_insert_hash_owned_ref( group_rates , group_name , group_rate , group_rate_free__); - } - - - - for (i=0; i < config_get_occurences( config , "WELL_RATE" ); i++) { - const char * group_name = config_iget( config , "WELL_RATE" , i , 0 ); - const char * well_name = config_iget( config , "WELL_RATE" , i , 1 ); - double corr_length = config_iget_as_double( config , "WELL_RATE" , i , 2 ); - const char * stat_file = config_iget( config , "WELL_RATE" , i , 3 ); - - well_rate_type * well_rate; - group_rate_type * group_rate = hash_get( group_rates , group_name ); - well_rate = well_rate_alloc( sched_history , time_vector , well_name , corr_length , stat_file , group_rate_get_phase( group_rate) , group_rate_is_producer( group_rate )); - group_rate_add_well_rate( group_rate , well_rate ); - } - - { - hash_iter_type * group_iter = hash_iter_alloc( group_rates ); - while (!hash_iter_is_complete( group_iter )) { - group_rate_type * group_rate = hash_iter_get_next_value( group_iter ); - group_rate_init( group_rate ); - } - hash_iter_free( group_iter ); - } -} - - - - -void sample( hash_type * group_rates ) { - hash_iter_type * group_iter = hash_iter_alloc( group_rates ); - - while (!hash_iter_is_complete( group_iter )) { - group_rate_type * group_rate = hash_iter_get_next_value( group_iter ); - group_rate_sample( group_rate ); - } - - hash_iter_free( group_iter ); -} - -void debug (const time_t_vector_type * time_vector ) { - stringlist_type * s1 = stringlist_alloc_new(); - stringlist_type * s2 = stringlist_alloc_new(); - fscanf_2ts( time_vector , "/d/proj/bg/oseberg2/ressim/aoreln2/2001b/pert_hist/stat/test5/OSB/B-29_OIL.stat" , s1 , s2 ); - - for (int i = 0; i < stringlist_get_size( s1 ); i++) { - util_fprintf_date( time_t_vector_iget( time_vector , i ) , stdout); - printf(" %7s -> %7s \n",stringlist_iget(s1 , i) , stringlist_iget(s2,i)); - } - exit(1); -} - - -int main( int argc , char ** argv ) { - hash_type * group_rates = hash_alloc(); - config_parser_type * config = config_alloc(); - char * config_file; - { - char * config_base; - char * config_ext; - char * run_path; - - if (util_is_link( argv[1] )) { /* The command line argument given is a symlink - we start by changing to */ - /* the real location of the configuration file. */ - char * realpath = util_alloc_link_target( argv[1] ); - util_alloc_file_components(realpath , &run_path , &config_base , &config_ext); - free( realpath ); - } else - util_alloc_file_components( argv[1] , &run_path , &config_base , &config_ext); - - if (run_path != NULL) { - printf("Changing to directory: %s \n",run_path); - if (chdir( run_path) != 0) - util_exit("Hmmmm - failed to change to directory:%s \n",run_path); - } - config_file = util_alloc_filename(NULL , config_base , config_ext); - util_safe_free( config_base ); - util_safe_free( config_ext ); - util_safe_free( run_path ); - } - - config_init( config ); - config_parse(config , config_file , "--" , NULL , "DEFINE" , false , true ); - { - sched_history_type * sched_history = sched_history_alloc(":"); - const char * data_file = config_iget( config , "DATA_FILE" , 0 , 0 ); - const char * sched_file_name = config_iget( config , "SCHEDULE_FILE" , 0 , 0 ); - path_fmt_type * sched_fmt = path_fmt_alloc_path_fmt( config_iget( config , "TARGET" , 0 , 0) ); - const int num_realizations = config_iget_as_int(config , "NUM_REALIZATIONS" , 0 , 0 ); - msg_type * msg = msg_alloc("Creating file: ", false); - - time_t start_date = ecl_util_get_start_date( data_file ); - time_t_vector_type * time_vector; - /* Loading input and creating well/group objects. */ - { - sched_file_type * sched_file = sched_file_parse_alloc( sched_file_name , start_date ); - sched_history_update( sched_history , sched_file ); - - time_vector = sched_file_alloc_time_t_vector( sched_file ); - load_groups( config , sched_file ,group_rates , sched_history , time_vector ); - sched_file_free( sched_file ); - } - - - /* Sampling and creating output */ - { - int i; - msg_show( msg ); - for (i = 0; i < num_realizations; i++) { - //sched_file_type * sched_file = sched_file_alloc_copy( ); - sched_file_type * sched_file = sched_file_parse_alloc( sched_file_name , start_date ); - sample( group_rates ); - sched_file_update( sched_file , WCONHIST , perturb_wconhist , group_rates ); - sched_file_update( sched_file , WCONINJE , perturb_wconinje , group_rates ); - - { - char * new_file = path_fmt_alloc_file(sched_fmt , true , i ); - sched_file_fprintf( sched_file , new_file , false); - msg_update( msg , new_file ); - free( new_file ); - } - sched_file_free( sched_file ); - } - } - msg_free( msg , true ); - sched_history_free( sched_history ); - } - config_free( config ); - hash_free( group_rates ); -} diff --git a/ThirdParty/Ert/libsched/applications/perturb_history/well_rate.c b/ThirdParty/Ert/libsched/applications/perturb_history/well_rate.c deleted file mode 100644 index 788d91b2f1..0000000000 --- a/ThirdParty/Ert/libsched/applications/perturb_history/well_rate.c +++ /dev/null @@ -1,259 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'well_rate.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define WELL_RATE_ID 6681055 - - -struct well_rate_struct { - UTIL_TYPE_ID_DECLARATION; - char * name; - double corr_length; - bool producer; - double_vector_type * shift; - double_vector_type * mean_shift; - double_vector_type * std_shift; - stringlist_type * mean_shift_string; - stringlist_type * std_shift_string; - double_vector_type * rate; - double_vector_type * base_value; - bool_vector_type * percent_std; - sched_phase_enum phase; - const time_t_vector_type * time_vector; - const sched_history_type * sched_history; -}; - - - - - - -void well_rate_update_wconhist( well_rate_type * well_rate , sched_kw_wconhist_type * kw, int restart_nr ) { - double shift = double_vector_iget( well_rate->shift , restart_nr ); - switch (well_rate->phase) { - case(OIL): - sched_kw_wconhist_shift_orat( kw , well_rate->name , shift); - break; - case(GAS): - sched_kw_wconhist_shift_grat( kw , well_rate->name , shift); - break; - case(WATER): - sched_kw_wconhist_shift_wrat( kw , well_rate->name , shift); - break; - } -} - - -void well_rate_update_wconinje( well_rate_type * well_rate , sched_kw_wconinje_type * kw, int restart_nr ) { - sched_kw_wconinje_shift_surface_flow( kw , well_rate->name , double_vector_iget( well_rate->shift , restart_nr )); - return; -} - - - - -/* - a = exp(-(t_i - t_(i-1)) / corr_length) - y(i) = a*y(i - 1) + (1 - a) * N(mean(i) , std(i)) - -*/ - -void well_rate_sample_shift( well_rate_type * well_rate ) { - int size = time_t_vector_size( well_rate->time_vector ); - double * R = util_malloc( size * sizeof * R , __func__); - int i; - rand_stdnormal_vector( size , R ); - for (i=0; i < size; i++) - R[i] = R[i] * double_vector_iget( well_rate->std_shift , i ) + double_vector_iget( well_rate->mean_shift , i ); - - double_vector_iset( well_rate->shift , 0 , R[0]); - - for (i=1; i < size; i++) { - double dt = 1.0 * (time_t_vector_iget( well_rate->time_vector , i ) - time_t_vector_iget( well_rate->time_vector , i - 1)) / (24 * 3600); /* Days */ - double a = exp(-dt / well_rate->corr_length ); - double shift = a * double_vector_iget( well_rate->shift , i - 1 ) + (1 - a) * R[i]; - double base_rate = double_vector_safe_iget( well_rate->base_value , i); - - /* The time series is sampled - irrespective of whether the well is open or not. */ - - if ((shift + base_rate) < 0) - shift = -base_rate; - - if (sched_history_well_open( well_rate->sched_history , well_rate->name , i)) - double_vector_iset( well_rate->shift , i , shift ); - else - double_vector_iset( well_rate->shift , i , 0); - - } - free( R ); -} - -/* - Ensures that the final rate is >= 0; this might lead to a minor - violation of the parent-groups constraints. -*/ - -void well_rate_ishift( well_rate_type * well_rate , int index, double new_shift) { - if (sched_history_well_open( well_rate->sched_history , well_rate->name , index)) { - double base_rate = double_vector_safe_iget( well_rate->base_value , index); - double shift = double_vector_safe_iget( well_rate->shift , index) + new_shift; - - if ((base_rate + shift) < 0) - shift = -base_rate; - double_vector_iset( well_rate->shift , index , shift ); - } -} - - -double well_rate_iget_rate( const well_rate_type * well_rate , int report_step ) { - return double_vector_safe_iget( well_rate->base_value , report_step ); -} - -int well_rate_get_length( const well_rate_type * well_rate ) { - return double_vector_size( well_rate->base_value ); -} - - - -well_rate_type * well_rate_alloc(const sched_history_type * sched_history , const time_t_vector_type * time_vector , const char * name , double corr_length , const char * filename, sched_phase_enum phase, bool producer) { - well_rate_type * well_rate = util_malloc( sizeof * well_rate , __func__); - UTIL_TYPE_ID_INIT( well_rate , WELL_RATE_ID ); - well_rate->name = util_alloc_string_copy( name ); - well_rate->time_vector = time_vector; - well_rate->corr_length = corr_length; - well_rate->shift = double_vector_alloc(0,0); - well_rate->mean_shift = double_vector_alloc(0 , 0); - well_rate->std_shift = double_vector_alloc(0 , 0); - well_rate->mean_shift_string = stringlist_alloc_new(); - well_rate->std_shift_string = stringlist_alloc_new(); - well_rate->base_value = double_vector_alloc(0 , 0); - well_rate->rate = double_vector_alloc(0 , 0); - well_rate->phase = phase; - well_rate->sched_history= sched_history; - well_rate->percent_std = bool_vector_alloc( 0 , false ); - well_rate->producer = producer; - fscanf_2ts( time_vector , filename , well_rate->mean_shift_string , well_rate->std_shift_string); - - { - char * key; - if (well_rate->producer) { - switch(well_rate->phase) { - case (WATER): - key = util_alloc_sprintf("WWPRH%s%s" , sched_history_get_join_string( sched_history ) , well_rate->name ); - break; - case( GAS ): - key = util_alloc_sprintf("WGPRH%s%s" , sched_history_get_join_string( sched_history ) , well_rate->name ); - break; - case( OIL ): - key = util_alloc_sprintf("WOPRH%s%s" , sched_history_get_join_string( sched_history ) , well_rate->name ); - break; - default: - key = NULL; - util_abort("%s: unknown phase identitifier: %d \n",__func__ , well_rate->phase); - } - } else { - switch(well_rate->phase) { - case (WATER): - key = util_alloc_sprintf("WWIRH%s%s" , sched_history_get_join_string( sched_history ) , well_rate->name ); - break; - case( GAS ): - key = util_alloc_sprintf("WGIRH%s%s" , sched_history_get_join_string( sched_history ) , well_rate->name ); - break; - case( OIL ): - key = util_alloc_sprintf("WOIRH%s%s" , sched_history_get_join_string( sched_history ) , well_rate->name ); - break; - default: - util_abort("%s: unknown phase identitifier: %d \n",__func__ , well_rate->phase); - key = NULL; - } - } - - if (sched_history_has_key( sched_history , key)) { - sched_history_init_vector( sched_history , key , well_rate->base_value ); - well_rate_eval_stat( well_rate ); - } else - fprintf(stderr,"** Warning - schedule history does not have key:%s - suspicious?\n", key ); - - free( key ); - } - return well_rate; -} - - -bool well_rate_well_open( const well_rate_type * well_rate , int index ) { - return sched_history_well_open( well_rate->sched_history , well_rate->name , index ); -} - - -void well_rate_eval_stat( well_rate_type * well_rate ) { - for (int i = 0; i < stringlist_get_size( well_rate->mean_shift_string ); i++) { - double mean_shift = sscanfp( double_vector_safe_iget( well_rate->base_value , i ) , stringlist_iget( well_rate->mean_shift_string , i)); - double std_shift = sscanfp( double_vector_safe_iget( well_rate->base_value , i ) , stringlist_iget( well_rate->std_shift_string , i)); - - double_vector_iset( well_rate->mean_shift , i , mean_shift ); - double_vector_iset( well_rate->std_shift , i , std_shift); - } -} - - -static UTIL_SAFE_CAST_FUNCTION( well_rate , WELL_RATE_ID ); - - -void well_rate_free( well_rate_type * well_rate ) { - free( well_rate->name ); - double_vector_free( well_rate->shift ); - double_vector_free( well_rate->mean_shift ); - double_vector_free( well_rate->std_shift ); - double_vector_free( well_rate->base_value ); - bool_vector_free( well_rate->percent_std ); - free( well_rate ); -} - -void well_rate_free__( void * arg ) { - well_rate_type * well_rate = well_rate_safe_cast( arg ); - well_rate_free( well_rate ); -} - - - -sched_phase_enum well_rate_get_phase( const well_rate_type * well_rate ) { - return well_rate->phase; -} - - -const char * well_rate_get_name( const well_rate_type * well_rate ) { - return well_rate->name; -} - - -double_vector_type * well_rate_get_shift( well_rate_type * well_rate ) { - return well_rate->shift; -} diff --git a/ThirdParty/Ert/libsched/applications/perturb_history/well_rate.h b/ThirdParty/Ert/libsched/applications/perturb_history/well_rate.h deleted file mode 100644 index 65ea8cfe56..0000000000 --- a/ThirdParty/Ert/libsched/applications/perturb_history/well_rate.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'well_rate.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_WELL_RATE_H -#define ERT_WELL_RATE_H - -#include -#include -#include -#include -#include -#include - -typedef struct well_rate_struct well_rate_type; -well_rate_type * well_rate_alloc(const sched_history_type * sched_history , - const time_t_vector_type * time_vector , - const char * name , double corr_length , const char * filename, sched_phase_enum phase, bool producer); -void well_rate_free__( void * arg ); -double_vector_type * well_rate_get_shift( well_rate_type * well_rate ); -sched_phase_enum well_rate_get_phase( const well_rate_type * well_rate ); -const char * well_rate_get_name( const well_rate_type * well_rate ); -void well_rate_sample_shift( well_rate_type * well_rate ); -bool well_rate_well_open( const well_rate_type * well_rate , int index ); -void well_rate_ishift( well_rate_type * well_rate ,int index, double new_shift); -void well_rate_update_wconhist( well_rate_type * well_rate , sched_kw_wconhist_type * kw, int restart_nr ); -void well_rate_update_wconinje( well_rate_type * well_rate , sched_kw_wconinje_type * kw, int restart_nr ); -double well_rate_iget_rate( const well_rate_type * well_rate , int report_step ); -int well_rate_get_length( const well_rate_type * well_rate ); -void well_rate_eval_stat( well_rate_type * well_rate ); - -#endif diff --git a/ThirdParty/Ert/libsched/applications/sched_summary.c b/ThirdParty/Ert/libsched/applications/sched_summary.c deleted file mode 100644 index 460305fadc..0000000000 --- a/ThirdParty/Ert/libsched/applications/sched_summary.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_summary.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include - -#include - -#include -#include - - - - - - - -int main (int argc , char ** argv) { - time_t start_time; - if (argc < 3) - util_exit("usage: ECLIPSE.DATA SCHEDULE_FILE ...\n"); - { - const char * data_file = argv[1]; - const char * schedule_file = argv[2]; - start_time = ecl_util_get_start_date( data_file ); - { - sched_history_type * sched_history = sched_history_alloc( ":" ); - sched_file_type * sched_file = sched_file_alloc(start_time); - sched_file_parse(sched_file , schedule_file); - sched_history_update( sched_history , sched_file ); - - { - stringlist_type * key_list = stringlist_alloc_new(); - - for (int iarg=3; iarg < argc; iarg++) { - if( sched_history_has_key( sched_history , argv[iarg] )) - stringlist_append_ref( key_list , argv[iarg]); - else - fprintf(stderr,"** Warning the SCHEDULE file does not contain the key: %s \n",argv[iarg]); - } - - sched_history_fprintf( sched_history , key_list , stdout ); - stringlist_free( key_list ) ; - } - } - } -} diff --git a/ThirdParty/Ert/libsched/applications/sched_test.c b/ThirdParty/Ert/libsched/applications/sched_test.c deleted file mode 100644 index 1aa98b8200..0000000000 --- a/ThirdParty/Ert/libsched/applications/sched_test.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -#include - -#include -#include -#include -#include -#include - - - -int main(int argc, char **argv) -{ - time_t start_time; - start_time = util_make_date(1,1,2000); - start_time = util_make_date(1,1,1988); - sched_file_type * sched_file = sched_file_parse_alloc( argv[1] , start_time); - sched_history_type * sched_history = sched_history_alloc(":"); - sched_history_update( sched_history , sched_file ); - sched_history_install_index( sched_history ); - - sched_history_fprintf_group_structure( sched_history , 300 ); - printf("FOPRH %g \n",sched_history_iget( sched_history , "FOPRH" , 139)); - //printf("GWPRH:AN %g \n",sched_history_iget( sched_history , "GOPRH:AN" , 139)); - //printf("WWIRH:C-1 %g \n",sched_history_iget( sched_history , "WWIRH:C-1" , 139)); - //printf("WOPRH:C-15C %g \n",sched_history_iget( sched_history , "WOPRH:B-6A" , 300)); - //printf("WOPRH:C-15C %g \n",sched_history_iget( sched_history , "WOPRH:B-6A" , 400)); - - sched_history_free( sched_history ); - sched_file_free( sched_file ); -} diff --git a/ThirdParty/Ert/libsched/applications/update_ir.c b/ThirdParty/Ert/libsched/applications/update_ir.c deleted file mode 100644 index 2d6302d4b3..0000000000 --- a/ThirdParty/Ert/libsched/applications/update_ir.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'update_ir.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void scale_injectors(void * void_kw , int report_step , void * arg) { - sched_kw_wconinje_type * kw = sched_kw_wconinje_safe_cast( void_kw ); - hash_type * well_hash = hash_safe_cast( arg ); - hash_iter_type * hash_iter = hash_iter_alloc( well_hash ); - - - while ( !hash_iter_is_complete(hash_iter) ) { - const char * well = hash_iter_get_next_key( hash_iter ); - double scale_factor = hash_get_double( well_hash , well ); - - sched_kw_wconinje_scale_surface_flow(kw , well , scale_factor); - printf("Scaling injector: %s/%g \n",well , scale_factor); - } - hash_iter_free( hash_iter ); -} - - - -static hash_type * parse_multir( const char * multir_file ) { - parser_type * parser = parser_alloc(" \n\t",NULL ,NULL , NULL , NULL , NULL); - stringlist_type * tokens = parser_tokenize_file ( parser , multir_file , true ); - hash_type * hash = hash_alloc(); - int i; - - for (i = 0; i < stringlist_get_size(tokens); i += 2) { - const char * well = stringlist_iget( tokens , i); - const char * multir_st = stringlist_iget( tokens , i + 1); - double multir; - - if (util_sscanf_double( multir_st , &multir)) - hash_insert_double( hash , well , multir); - else - util_abort("%s: failed to parse: %s as double \n",__func__ , multir_st); - - } - stringlist_free( tokens ); - parser_free( parser ); - return hash; -} - - -void install_SIGNALS(void) { - signal(SIGSEGV , util_abort_signal); - signal(SIGINT , util_abort_signal); - signal(SIGKILL , util_abort_signal); -} - - - - -int main(int argc, char **argv) -{ - if(argc < 4) - { - printf("Usage: sched_test.x data_file my_sched_file.SCH update_ir.txt \n"); - return 0; - } - - time_t start_time; - int num_restart_files; - int last_restart_file; - char * data_file = argv[1]; - char * schedule_file = argv[2]; - char * multir_file = argv[3]; - - hash_type * hash; - sched_file_type * sched_file; - - start_time = ecl_util_get_start_date( data_file ); - sched_file = sched_file_parse_alloc( schedule_file , start_time); - unlink( schedule_file ); - hash = parse_multir( multir_file ); - sched_file_update(sched_file , WCONINJE , scale_injectors , hash); - sched_file_fprintf(sched_file , schedule_file ); - sched_file_free( sched_file ); - hash_free( hash ); - - - return 0; -} diff --git a/ThirdParty/Ert/libsched/include/ert/sched/group_history.h b/ThirdParty/Ert/libsched/include/ert/sched/group_history.h deleted file mode 100644 index 2b43b6ee2f..0000000000 --- a/ThirdParty/Ert/libsched/include/ert/sched/group_history.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'group_history.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_GROUP_HISTORY_H -#define ERT_GROUP_HISTORY_H - -#ifdef __cplusplus -extern "C" { -#endif -#include -#include -#include - -typedef struct group_history_struct group_history_type; - - -bool group_history_group_exists( const group_history_type * group_history , int report_step); -group_history_type * group_history_alloc( const char * group_name , const time_t_vector_type * time , int report_step ); -void group_history_free( group_history_type * group_history ); -void group_history_free__( void * arg ); -void group_history_add_child(group_history_type * group_history , void * child_history , const char * child_name , int report_step ); -void group_history_init_child_names( group_history_type * group_history , int report_step , stringlist_type * child_names ); -const char * group_history_get_name( const group_history_type * group_history ); -void group_history_fprintf( const group_history_type * group_history , int report_step , bool recursive , FILE * stream ); - - -double group_history_iget_GOPRH( const void * __group_history , int report_step ); -double group_history_iget_GGPRH( const void * __group_history , int report_step ); -double group_history_iget_GWPRH( const void * __group_history , int report_step ); -double group_history_iget_GWCTH( const void * __group_history , int report_step ); -double group_history_iget_GGORH( const void * __group_history , int report_step ); - -double group_history_iget_GWPTH( const void * __group_history , int report_step ); -double group_history_iget_GOPTH( const void * __group_history , int report_step ); -double group_history_iget_GGPTH( const void * __group_history , int report_step ); - -double group_history_iget( const void * index , int report_step ); - -UTIL_IS_INSTANCE_HEADER( group_history ); - - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libsched/include/ert/sched/group_index.h b/ThirdParty/Ert/libsched/include/ert/sched/group_index.h deleted file mode 100644 index 6bfef0be59..0000000000 --- a/ThirdParty/Ert/libsched/include/ert/sched/group_index.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'group_index.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_GROUP_INDEX_H -#define ERT_GROUP_INDEX_H - -#ifdef __cplusplus -extern "C" { -#endif -#include - -#include - -typedef struct group_index_struct group_index_type; - -group_index_type * group_index_alloc( const char * group_name , const char * variable , const void * state_ptr , sched_history_callback_ftype * func ); -void group_index_free( group_index_type * group_index ); -void group_index_free__( void * arg ); -sched_history_callback_ftype * group_index_get_callback( const group_index_type * group_index ); -const void * group_index_get_state__( const void * index ); -const void * group_index_get_state( const group_index_type * group_index ); -const char * group_index_get_name( const group_index_type * group_index ); -const char * group_index_get_variable( const group_index_type * group_index ); - - - -UTIL_IS_INSTANCE_HEADER( group_index ); -UTIL_SAFE_CAST_HEADER_CONST( group_index ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libsched/include/ert/sched/gruptree.h b/ThirdParty/Ert/libsched/include/ert/sched/gruptree.h deleted file mode 100644 index 3a1344f540..0000000000 --- a/ThirdParty/Ert/libsched/include/ert/sched/gruptree.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'gruptree.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_GRUPTREE_H -#define ERT_GRUPTREE_H -#ifdef __cplusplus -extern "C" { -#endif - -#include - -typedef struct gruptree_struct gruptree_type; - -gruptree_type * gruptree_alloc(); -gruptree_type * gruptree_copyc(const gruptree_type *); -gruptree_type * gruptree_fread_alloc(FILE *); -void gruptree_fwrite(const gruptree_type *, FILE *); -void gruptree_free(gruptree_type *); - - -void gruptree_register_grup(gruptree_type *, const char *, const char *); -void gruptree_register_well(gruptree_type *, const char *, const char *); -bool gruptree_has_grup(const gruptree_type *, const char *); -char ** gruptree_alloc_grup_well_list(gruptree_type *, const char *, int *); -void gruptree_printf_grup_wells(gruptree_type *, const char *); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libsched/include/ert/sched/history.h b/ThirdParty/Ert/libsched/include/ert/sched/history.h deleted file mode 100644 index e35c54ce46..0000000000 --- a/ThirdParty/Ert/libsched/include/ert/sched/history.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'history.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_HISTORY_H -#define ERT_HISTORY_H -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -#include -#include -#include - -#include - -#include - - -typedef enum { - SCHEDULE = 0, - REFCASE_SIMULATED = 1, /* ecl_sum_get_well_var( "WWCT" ); */ - REFCASE_HISTORY = 2, /* ecl_sum_get_well_var( "WWCTH" ); */ - HISTORY_SOURCE_INVALID = 10 -} history_source_type; - - - -typedef struct history_struct history_type; - - history_source_type history_get_source_type( const char * string_source ); - -// Manipulators. - void history_free(history_type *); - history_type * history_alloc_from_sched_file(const char * sep_string , const sched_file_type *); - history_type * history_alloc_from_refcase(const ecl_sum_type * refcase , bool use_h_keywords); - const char * history_get_source_string( history_source_type history_source ); - bool history_init_ts( const history_type * history , const char * summary_key , double_vector_type * value, bool_vector_type * valid); - -// Accessors. - time_t history_get_start_time( const history_type * history ); - int history_get_last_restart(const history_type *); - double history_get_var_from_sum_key(const history_type *, int, const char *, bool *); - double history_get_well_var(const history_type * , int, const char *, const char *, bool *); - double history_get_group_var(const history_type *, int, const char *, const char *, bool *); - void history_alloc_time_series_from_summary_key(const history_type *, const char *, double **, bool **); - time_t history_iget_node_start_time(const history_type *, int); - time_t history_iget_node_end_time(const history_type *, int); - int history_get_restart_nr_from_days(const history_type *, double days); - time_t history_get_time_t_from_restart_nr( const history_type * history , int restart_nr); - int history_get_restart_nr_from_time_t( const history_type * history , time_t time); - - UTIL_IS_INSTANCE_HEADER( history ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libsched/include/ert/sched/sched_blob.h b/ThirdParty/Ert/libsched/include/ert/sched/sched_blob.h deleted file mode 100644 index b7a0b8f9eb..0000000000 --- a/ThirdParty/Ert/libsched/include/ert/sched/sched_blob.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_blob.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_SCHED_BLOB_H -#define ERT_SCHED_BLOB_H -#ifdef __cplusplus -extern "C" { -#endif -#include - -typedef struct sched_blob_struct sched_blob_type; - - -void sched_blob_append_token( sched_blob_type * blob , const char * token ); -sched_blob_type * sched_blob_alloc( ); -void sched_blob_free( sched_blob_type * blob ); -void sched_blob_fprintf( const sched_blob_type * blob , FILE * stream ); -int sched_blob_get_size( const sched_blob_type * blob ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libsched/include/ert/sched/sched_file.h b/ThirdParty/Ert/libsched/include/ert/sched/sched_file.h deleted file mode 100644 index 4a29160b4b..0000000000 --- a/ThirdParty/Ert/libsched/include/ert/sched/sched_file.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_file.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_SCHED_FILE_H -#define ERT_SCHED_FILE_H -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include - -#include -#include - -typedef struct sched_file_struct sched_file_type; -typedef struct sched_block_struct sched_block_type; - - -typedef void (sched_file_callback_ftype)( void * sched_kw , int restart_nr , void * arg); - -void sched_file_add_fixed_length_kw( sched_file_type * sched_file , const char * kw , int length ); -sched_file_type * sched_file_alloc(time_t); -sched_file_type * sched_file_safe_cast(void * ); -void sched_file_free(sched_file_type *); -void sched_file_parse(sched_file_type *, const char *); -void sched_file_parse_append(sched_file_type * , const char * ); -sched_file_type * sched_file_parse_alloc(const char * , time_t); -void sched_file_fprintf_i(const sched_file_type *, int, const char *); -void sched_file_fprintf(const sched_file_type * sched_file, const char * file); - -int sched_file_get_num_restart_files(const sched_file_type *); -int sched_file_get_restart_nr_from_time_t(const sched_file_type *, time_t); -int sched_file_get_restart_nr_from_days(const sched_file_type * , double ); -int sched_file_iget_block_size(const sched_file_type *, int); -int sched_file_time_t_to_restart_file(const sched_file_type *, time_t); - -time_t sched_file_iget_block_start_time(const sched_file_type *, int); -time_t sched_file_iget_block_end_time(const sched_file_type *, int); -double sched_file_iget_block_start_days(const sched_file_type * sched_file, int i); -double sched_file_iget_block_end_days(const sched_file_type * sched_file, int i); -double sched_file_get_sim_days(const sched_file_type * sched_file , int report_step); -time_t sched_file_get_sim_time(const sched_file_type * sched_file , int report_step); - -sched_kw_type * sched_file_ijget_block_kw_ref(const sched_file_type *, int, int); -int sched_file_get_restart_file_from_time_t(const sched_file_type * , time_t ); -void sched_file_summarize(const sched_file_type * , FILE * ); -sched_file_type * sched_file_alloc_copy(const sched_file_type * , bool); -time_t_vector_type * sched_file_alloc_time_t_vector( const sched_file_type * sched_file ); - -void sched_file_update_blocks(sched_file_type * sched_file, int restart1 , int restart2 , sched_kw_type_enum kw_type, sched_file_callback_ftype * callback, void * arg); -void sched_file_update(sched_file_type * sched_file, sched_kw_type_enum kw_type, sched_file_callback_ftype * callback, void * arg); -bool sched_file_well_open( const sched_file_type * sched_file , int restart_nr , const char * well_name ); -const char * sched_file_iget_filename( const sched_file_type * sched_file , int file_nr ); - - -int sched_block_get_size(const sched_block_type * block); -sched_kw_type * sched_block_iget_kw(sched_block_type * block, int i); -sched_block_type * sched_file_iget_block(const sched_file_type * sched_file, int i); - - - -double sched_file_well_wconhist_rate( const sched_file_type * sched_file , - int restart_nr , - const char * well_name); - -double sched_file_well_wconinje_rate( const sched_file_type * sched_file , - int restart_nr , - const char * well_name); - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libsched/include/ert/sched/sched_history.h b/ThirdParty/Ert/libsched/include/ert/sched/sched_history.h deleted file mode 100644 index dfdd35fa53..0000000000 --- a/ThirdParty/Ert/libsched/include/ert/sched/sched_history.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_history.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_SCHED_HISTORY_H -#define ERT_SCHED_HISTORY_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include - -#include - -typedef struct sched_history_struct sched_history_type; - - - time_t sched_history_iget_time_t( const sched_history_type * sched_history , int restart_nr ); - void sched_history_update( sched_history_type * sched_history, const sched_file_type * sched_file ); - sched_history_type * sched_history_alloc( const char * sep_string ); - void sched_history_free( sched_history_type * sched_history ); - double sched_history_iget( const sched_history_type * sched_history , const char * key , int report_step); - void sched_history_init_vector( const sched_history_type * sched_history , const char * key , double_vector_type * value); - void sched_history_fprintf_group_structure( sched_history_type * sched_history , int report_step ); - const char * sched_history_get_join_string( const sched_history_type * sched_history ); - void sched_history_fprintf_index_keys( const sched_history_type * sched_history , FILE * stream ); - bool sched_history_has_key( const sched_history_type * sched_history , const char * key); - void sched_history_fprintf( const sched_history_type * sched_history , const stringlist_type * key_list , FILE * stream); - bool sched_history_well_open( const sched_history_type * sched_history , const char * well_name , int report_step ); - bool sched_history_has_well( const sched_history_type * sched_history , const char * well_name); - bool sched_history_has_group( const sched_history_type * sched_history , const char * group_name); - bool sched_history_group_exists( const sched_history_type * sched_history , const char * group_name , int report_step ); - int sched_history_get_last_history( const sched_history_type * sched_history ); - bool sched_history_open( const sched_history_type * sched_history , const char * key , int report_step); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ThirdParty/Ert/libsched/include/ert/sched/sched_kw.h b/ThirdParty/Ert/libsched/include/ert/sched/sched_kw.h deleted file mode 100644 index 854fb66dd1..0000000000 --- a/ThirdParty/Ert/libsched/include/ert/sched/sched_kw.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_kw.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_SCHED_KW_H -#define ERT_SCHED_KW_H -#ifdef __cplusplus -extern "C" { -#endif -#include -#include -#include - -#include - -#include - -typedef struct sched_kw_struct sched_kw_type; - - - -/*****************************************************************/ - - - - void sched_kw_free__(void *); - const char * sched_kw_get_type_name( const sched_kw_type * sched_kw ); - sched_kw_type_enum sched_kw_get_type(const sched_kw_type *); - sched_kw_type * sched_kw_token_alloc(const stringlist_type * tokens, int * token_index, hash_type * fixed_length_table, bool * foundEND); - void sched_kw_fprintf(const sched_kw_type *, FILE *); - void sched_kw_free(sched_kw_type *); - - sched_kw_type * sched_kw_alloc_copy(const sched_kw_type * ); - sched_kw_type ** sched_kw_split_alloc_DATES(const sched_kw_type *, int *); - time_t sched_kw_get_new_time(const sched_kw_type *, time_t); - char ** sched_kw_alloc_well_list(const sched_kw_type *, int *); - hash_type * sched_kw_alloc_well_obs_hash(const sched_kw_type *); - void sched_kw_alloc_child_parent_list(const sched_kw_type *, char ***, char ***, int *); - void * sched_kw_get_data( sched_kw_type * kw); - const void * sched_kw_get_const_data( const sched_kw_type * kw); - void sched_kw_set_restart_nr( sched_kw_type * kw , int restart_nr); - const char * sched_kw_get_name( const sched_kw_type * kw); - bool sched_kw_has_well( const sched_kw_type * sched_kw , const char * well ); - bool sched_kw_well_open( const sched_kw_type * sched_kw , const char * well ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_compdat.h b/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_compdat.h deleted file mode 100644 index 7bfdd246bb..0000000000 --- a/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_compdat.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_kw_compdat.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_SCHED_KW_COMPDAT_H -#define ERT_SCHED_KW_COMPDAT_H -#include - -#include -#include - -#include - -typedef struct sched_kw_compdat_struct sched_kw_compdat_type; - -sched_kw_compdat_type * sched_kw_compdat_alloc(); -void sched_kw_compdat_free(sched_kw_compdat_type * ); -void sched_kw_compdat_fprintf(const sched_kw_compdat_type * , FILE *); -sched_kw_compdat_type * sched_kw_compdat_fread_alloc(FILE *stream); -void sched_kw_compdat_fwrite(const sched_kw_compdat_type * , FILE *stream); - - -KW_HEADER(compdat) - - -#endif diff --git a/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_dates.h b/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_dates.h deleted file mode 100644 index ffe14ef9e6..0000000000 --- a/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_dates.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_kw_dates.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_SCHED_KW_DATES -#define ERT_SCHED_KW_DATES -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include - -#include - - -typedef struct sched_kw_dates_struct sched_kw_dates_type; - -sched_kw_dates_type * sched_kw_dates_fscanf_alloc(FILE * , bool *, const char * ); -void sched_kw_dates_fprintf(const sched_kw_dates_type * , FILE *); -void sched_kw_dates_free(sched_kw_dates_type * ); -void sched_kw_dates_fwrite(const sched_kw_dates_type * , FILE * ); -sched_kw_dates_type * sched_kw_dates_fread_alloc(FILE * ); - -int sched_kw_dates_get_size(const sched_kw_dates_type *); -sched_kw_dates_type * sched_kw_dates_alloc_from_time_t(time_t ); -time_t sched_kw_dates_iget_date(const sched_kw_dates_type *, int); -/*******************************************************************/ - - - -KW_HEADER(dates) - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_gruptree.h b/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_gruptree.h deleted file mode 100644 index c6b59f26b0..0000000000 --- a/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_gruptree.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_kw_gruptree.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_SCHED_KW_GRUPTREE_H -#define ERT_SCHED_KW_GRUPTREE_H -#ifdef __cplusplus -extern "C" { -#endif -#include - -#include - -#include - -typedef struct sched_kw_gruptree_struct sched_kw_gruptree_type; - -//void sched_kw_gruptree_free (sched_kw_gruptree_type *); -//void sched_kw_gruptree_fprintf (const sched_kw_gruptree_type *, FILE * ); -void sched_kw_gruptree_alloc_child_parent_list(const sched_kw_gruptree_type *, char ***, char ***, int *); -void sched_kw_gruptree_init_child_parent_list( const sched_kw_gruptree_type * kw , stringlist_type * child , stringlist_type * parent); - -/*******************************************************************/ - - - -KW_HEADER(gruptree) - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_include.h b/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_include.h deleted file mode 100644 index 64c23f3a55..0000000000 --- a/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_include.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_kw_include.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_SCHED_KW_INCLUDE_H -#define ERT_SCHED_KW_INCLDUE_H - -#include - -#include - -typedef struct sched_kw_include_struct sched_kw_include_type; - - -sched_kw_include_type * sched_kw_include_fscanf_alloc( FILE *, bool *, const char *); -void sched_kw_include_free(sched_kw_include_type * ); -void sched_kw_include_fprintf(const sched_kw_include_type * , FILE *); -void sched_kw_include_fwrite(const sched_kw_include_type *, FILE *); -sched_kw_include_type * sched_kw_include_fread_alloc( FILE *); - -KW_HEADER(include) - -#endif diff --git a/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_tstep.h b/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_tstep.h deleted file mode 100644 index 492ac80c5f..0000000000 --- a/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_tstep.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_kw_tstep.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_SCHED_KW_TSTEP -#define ERT_SCHED_KW_TSTEP -#ifdef __cplusplus -extern "C" { -#endif -#include - -#include - -#include - -typedef struct sched_kw_tstep_struct sched_kw_tstep_type; - -sched_kw_tstep_type * sched_kw_tstep_fscanf_alloc(FILE *, bool *, const char *); -void sched_kw_tstep_free(sched_kw_tstep_type * ); -void sched_kw_tstep_fprintf(const sched_kw_tstep_type *, FILE *); -void sched_kw_tstep_fwrite(const sched_kw_tstep_type * , FILE *); -sched_kw_tstep_type * sched_kw_tstep_fread_alloc(FILE *); - -int sched_kw_tstep_get_size(const sched_kw_tstep_type *); -sched_kw_tstep_type * sched_kw_tstep_alloc_from_double(double); -double sched_kw_tstep_iget_step(const sched_kw_tstep_type *, int); -time_t sched_kw_tstep_get_new_time(const sched_kw_tstep_type *, time_t); -int sched_kw_tstep_get_length( const sched_kw_tstep_type * kw); - - -/*******************************************************************/ - - - -KW_HEADER(tstep) -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_untyped.h b/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_untyped.h deleted file mode 100644 index c291ae5547..0000000000 --- a/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_untyped.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_kw_untyped.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_SCHED_KW_UNTYPED_H -#define ERT_SCHED_KW_UNTYPED_H -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include - -#include - -typedef struct sched_kw_untyped_struct sched_kw_untyped_type; - -sched_kw_untyped_type * sched_kw_untyped_alloc(const stringlist_type * tokens , int * token_index , int rec_len); -sched_kw_untyped_type * sched_kw_untyped_alloc_empty(const char * , int rec_len); -void sched_kw_untyped_fprintf(const sched_kw_untyped_type *, FILE *); -void sched_kw_untyped_free(sched_kw_untyped_type * ); -sched_kw_untyped_type * sched_kw_untyped_fread_alloc(FILE *); -void sched_kw_untyped_fwrite(const sched_kw_untyped_type * , FILE *); -void sched_kw_untyped_add_line(sched_kw_untyped_type * , const char *, bool); -void sched_kw_untyped_add_tokens( sched_kw_untyped_type * kw , const stringlist_type * tokens); -char ** sched_kw_untyped_iget_entries_alloc(const sched_kw_untyped_type *, int, int *); - -/*******************************************************************/ - -KW_FREE_HEADER(untyped) -KW_FPRINTF_HEADER(untyped) -KW_COPYC_HEADER(untyped) - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_wconhist.h b/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_wconhist.h deleted file mode 100644 index 712178b278..0000000000 --- a/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_wconhist.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_kw_wconhist.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_SCHED_KW_WCONHIST_H -#define ERT_SCHED_KW_WCONHIST_H -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include -#include -#include -#include - -#include -#include - -typedef struct sched_kw_wconhist_struct sched_kw_wconhist_type; -typedef struct wconhist_state_struct wconhist_state_type; - -#define WCONHIST_DEFAULT_STATUS OPEN - -sched_kw_wconhist_type * sched_kw_wconhist_fscanf_alloc( FILE *, bool *, const char *); -void sched_kw_wconhist_free(sched_kw_wconhist_type * ); -void sched_kw_wconhist_fprintf(const sched_kw_wconhist_type * , FILE *); -void sched_kw_wconhist_fwrite(const sched_kw_wconhist_type *, FILE *); -sched_kw_wconhist_type * sched_kw_wconhist_fread_alloc( FILE *); -hash_type * sched_kw_wconhist_alloc_well_obs_hash(const sched_kw_wconhist_type *); -double sched_kw_wconhist_get_orat( sched_kw_wconhist_type * kw , const char * well_name); -void sched_kw_wconhist_scale_orat( sched_kw_wconhist_type * kw , const char * well_name, double factor); -void sched_kw_wconhist_set_surface_flow( sched_kw_wconhist_type * kw , const char * well_name , double orat); -bool sched_kw_wconhist_has_well( const sched_kw_wconhist_type * kw , const char * well_name); -bool sched_kw_wconhist_well_open( const sched_kw_wconhist_type * kw, const char * well_name); -void sched_kw_wconhist_shift_orat( sched_kw_wconhist_type * kw , const char * well_name, double shift_value); -void sched_kw_wconhist_shift_grat( sched_kw_wconhist_type * kw , const char * well_name, double shift_value); -void sched_kw_wconhist_shift_wrat( sched_kw_wconhist_type * kw , const char * well_name, double shift_value); -void sched_kw_wconhist_update_state(const sched_kw_wconhist_type * kw , wconhist_state_type * state , const char * well_name , int report_step ); - -void sched_kw_wconhist_init_well_list( const sched_kw_wconhist_type * kw , stringlist_type * well_list); - - - -void wconhist_state_free__( void * arg ); -wconhist_state_type * wconhist_state_alloc( const time_t_vector_type * time); -void wconhist_state_free( wconhist_state_type * wconhist ); - -double wconhist_state_iget_STAT( const void * state , int report_step ); - //well_status_enum wconhist_state_iget_status( const void * state , int report_step ); -well_cm_enum wconhist_state_iget_WMCTLH( const void * state , int report_step ); -double wconhist_state_iget_WBHPH( const void * state , int report_step ); -double wconhist_state_iget_WOPRH( const void * state , int report_step ); -double wconhist_state_iget_WGPRH( const void * state , int report_step ); -double wconhist_state_iget_WWPRH( const void * state , int report_step ); -double wconhist_state_iget_WWCTH(const void * state , int report_step ); -double wconhist_state_iget_WGORH(const void * state , int report_step ); -double wconhist_state_iget_WOPTH( const void * state , int report_step ); -double wconhist_state_iget_WWPTH( const void * state , int report_step ); -double wconhist_state_iget_WGPTH( const void * state , int report_step ); - -void sched_kw_wconhist_close_state(wconhist_state_type * state , int report_step ); - - -UTIL_SAFE_CAST_HEADER( sched_kw_wconhist ); -/*******************************************************************/ - - - -KW_HEADER(wconhist) - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_wconinj.h b/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_wconinj.h deleted file mode 100644 index f97d855326..0000000000 --- a/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_wconinj.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_kw_wconinj.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_SCHED_KW_WCONINJ_H -#define ERT_SCHED_KW_WCONINJ_H - - -#ifdef __cplusplus -extern "C" { -#endif -#include -#include - -#include -#include - -#include - - -typedef struct sched_kw_wconinj_struct sched_kw_wconinj_type; - - -char ** sched_kw_wconinj_alloc_wells_copy( const sched_kw_wconinj_type * , int * ); - -/*******************************************************************/ - -KW_HEADER(wconinj) - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_wconinje.h b/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_wconinje.h deleted file mode 100644 index 436a56a86a..0000000000 --- a/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_wconinje.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_kw_wconinje.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_SCHED_KW_WCONINJE_H -#define ERT_SCHED_KW_WCONINJE_H - - -#ifdef __cplusplus -extern "C" { -#endif -#include - -#include -#include -#include - -#include -#include - - -typedef struct sched_kw_wconinje_struct sched_kw_wconinje_type; -typedef struct wconinje_state_struct wconinje_state_type; - - -sched_phase_enum sched_kw_wconinje_get_phase( const sched_kw_wconinje_type * kw , const char * well_name); -bool sched_kw_wconinje_well_open( const sched_kw_wconinje_type * kw, const char * well_name); -char ** sched_kw_wconinje_alloc_wells_copy( const sched_kw_wconinje_type * , int * ); - -void sched_kw_wconinje_set_surface_flow( const sched_kw_wconinje_type * kw , const char * well, double surface_flow); -void sched_kw_wconinje_scale_surface_flow( const sched_kw_wconinje_type * kw , const char * well, double factor); -double sched_kw_wconinje_get_surface_flow( const sched_kw_wconinje_type * kw , const char * well); -bool sched_kw_wconinje_has_well( const sched_kw_wconinje_type * , const char * ); -sched_kw_wconinje_type * sched_kw_wconinje_safe_cast( void * arg ); -void sched_kw_wconinje_shift_surface_flow( const sched_kw_wconinje_type * kw , const char * well_name , double delta_surface_flow); -bool sched_kw_wconinje_buffer_fwrite( const sched_kw_wconinje_type * kw , const char * well_name , buffer_type * buffer); -bool sched_kw_wconinje_historical( const sched_kw_wconinje_type * kw ); - -void sched_kw_wconinje_close_state(wconinje_state_type * state , int report_step ); -void sched_kw_wconinje_update_state( const sched_kw_wconinje_type * kw , wconinje_state_type * state , const char * well_name , int report_step ); -void wconinje_state_free__( void * arg ); -wconinje_state_type * wconinje_state_alloc( const char * well_name , const time_t_vector_type * time); -void wconinje_state_free( wconinje_state_type * wconinje ); -double wconinje_state_iget_WGIRH( const void * __state , int report_step ); -double wconinje_state_iget_WWIRH( const void * __state , int report_step ); -void sched_kw_wconinje_init_well_list( const sched_kw_wconinje_type * kw , stringlist_type * well_list); - -/*******************************************************************/ - - - -KW_HEADER(wconinje) - - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_wconinjh.h b/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_wconinjh.h deleted file mode 100644 index 2b4b7d9a64..0000000000 --- a/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_wconinjh.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_kw_wconinjh.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_SCHED_KW_WCONINJH_H -#define ERT_SCHED_KW_WCONINJH_H -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include -#include -#include - -#include -#include - - - -typedef struct sched_kw_wconhist_struct sched_kw_wconinjh_type; -typedef struct wconinjh_state_struct wconinjh_state_type; - -sched_kw_wconinjh_type * sched_kw_wconinjh_fscanf_alloc( FILE *, bool *, const char *); -void sched_kw_wconinjh_free(sched_kw_wconinjh_type * ); -void sched_kw_wconinjh_fprintf(const sched_kw_wconinjh_type * , FILE *); -void sched_kw_wconinjh_fwrite(const sched_kw_wconinjh_type *, FILE *); -sched_kw_wconinjh_type * sched_kw_wconinjh_fread_alloc( FILE *); - -hash_type * sched_kw_wconinjh_alloc_well_obs_hash(const sched_kw_wconinjh_type *); - -void sched_kw_wconinjh_init_well_list( const sched_kw_wconinjh_type * kw , stringlist_type * well_list); -void sched_kw_wconinjh_update_state( const sched_kw_wconinjh_type * kw , wconinjh_state_type * state , const char * well_name , int report_step ); -void wconinjh_state_free__( void * arg ); -wconinjh_state_type * wconinjh_state_alloc( const time_t_vector_type * time); -void wconinjh_state_free( wconinjh_state_type * wconinjh ); -void sched_kw_wconinjh_close_state(wconinjh_state_type * state , int report_step ); - -sched_phase_enum wconinjh_state_iget_phase( const wconinjh_state_type * state , int report_step); -well_status_enum wconinjh_state_iget_status( const wconinjh_state_type * state , int report_step ); - - -double wconinjh_state_iget_WWIRH( const void * __state , int report_step) ; -double wconinjh_state_iget_WGIRH( const void * __state , int report_step) ; -double wconinjh_state_iget_WOIRH( const void * __state , int report_step) ; -double wconinjh_state_iget_WBHPH( const void * __state , int report_step) ; -double wconinjh_state_iget_WTHPH( const void * __state , int report_step) ; -double wconinjh_state_iget_WVPRH( const void * __state , int report_step) ; -int wconinjh_state_iget_vfp_table_nr( const wconinjh_state_type * state , int report_step) ; - -/*******************************************************************/ -KW_HEADER(wconinjh) - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_wconprod.h b/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_wconprod.h deleted file mode 100644 index 4ccd93a02c..0000000000 --- a/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_wconprod.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_kw_wconprod.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_SCHED_KW_WCONPROD_H -#define ERT_SCHED_KW_WCONPROD_H - - -#ifdef __cplusplus -extern "C" { -#endif -#include - - - typedef struct sched_kw_wconprod_struct sched_kw_wconprod_type; - - - char ** sched_kw_wconprod_alloc_wells_copy( const sched_kw_wconprod_type * , int * ); - void sched_kw_wconprod_init_well_list( const sched_kw_wconprod_type * kw , stringlist_type * well_list); - - - -KW_HEADER(wconprod) - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_welspecs.h b/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_welspecs.h deleted file mode 100644 index d07acef2a9..0000000000 --- a/ThirdParty/Ert/libsched/include/ert/sched/sched_kw_welspecs.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_kw_welspecs.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_SCHED_KW_WELSPECS_H -#define ERT_SCHED_KW_WELSPECS_H -#ifdef __cplusplus -extern "C" { -#endif -#include -#include - -#include - -#include - - - -/*************************************************************/ - -typedef struct sched_kw_welspecs_struct sched_kw_welspecs_type; - - - -sched_kw_welspecs_type * sched_kw_welspecs_fscanf_alloc(FILE *, bool *, const char *); -sched_kw_welspecs_type * sched_kw_welspecs_fread_alloc(FILE *); -void sched_kw_welspecs_free(sched_kw_welspecs_type *); -void sched_kw_welspecs_fprintf(const sched_kw_welspecs_type *, FILE *); -void sched_kw_welspecs_fwrite(const sched_kw_welspecs_type *, FILE *); - -void sched_kw_welspecs_alloc_child_parent_list(const sched_kw_welspecs_type *, char ***, char ***, int *); -void sched_kw_welspecs_init_child_parent_list( const sched_kw_welspecs_type * kw , stringlist_type * child , stringlist_type * parent); -/*******************************************************************/ - - - -KW_HEADER(welspecs) - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libsched/include/ert/sched/sched_macros.h b/ThirdParty/Ert/libsched/include/ert/sched/sched_macros.h deleted file mode 100644 index f578e8ac82..0000000000 --- a/ThirdParty/Ert/libsched/include/ert/sched/sched_macros.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_macros.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_SCHED_MACROS_H_ -#define ERT_SCHED_MACROS_H_ - - - -/*********************************** -Macros for "voidifications" of the data handlers. - - - *_IMPL - The implementation - - *_HEADER - Header - - None. - Name. - -***********************************/ - -#define KW_FREE(KW) sched_kw_## KW ##_free__ -#define KW_FPRINTF(KW) sched_kw_## KW ##_fprintf__ -#define KW_COPYC(KW) sched_kw_## KW ##_copyc__ -#define KW_ALLOC(KW) sched_kw_## KW ##_alloc__ - -#define GET_DATA_HANDLERS(DH, KWNAME) \ -DH.token_alloc = KW_ALLOC( KWNAME) ; \ -DH.free = KW_FREE( KWNAME) ; \ -DH.fprintf = KW_FPRINTF( KWNAME) ; \ -DH.copyc = NULL/*KW_ALLOC_COPY(KWNAME)*/ ; - -/*******************************************************************/ - -#define KW_ALLOC_IMPL(KW) \ -void * sched_kw_## KW ##_alloc__(const stringlist_type * tokens , int * token_index ) \ -{ \ - return (void *) sched_kw_## KW ##_alloc(tokens , token_index); \ -} - - -#define KW_FPRINTF_IMPL(KW) \ -void sched_kw_## KW ##_fprintf__(const void * kw, FILE * stream) \ -{ \ - sched_kw_## KW ##_fprintf((const sched_kw_## KW ##_type *) kw, stream); \ -} \ - -#define KW_FREE_IMPL(KW) \ -void sched_kw_## KW ##_free__(void * kw) \ -{ \ - sched_kw_## KW ##_free((sched_kw_## KW ##_type *) kw);\ -} \ - - -#define KW_COPYC_IMPL(KW) \ -void * sched_kw_## KW ##_copyc__(const void * kw) { \ - return sched_kw_ ## KW ## _copyc(kw); \ -} - -#define KW_IMPL(KW) \ -KW_FREE_IMPL(KW) \ -KW_FPRINTF_IMPL(KW) \ -KW_ALLOC_IMPL(KW) \ -KW_COPYC_IMPL(KW) - - - -/*******************************************************************/ - -#define KW_ALLOC_HEADER(KW) \ -void * sched_kw_## KW ##_alloc__(const stringlist_type * tokens , int * token_index) ; \ - -#define KW_COPYC_HEADER(KW) \ -void * sched_kw_## KW ##_copyc__(const void *); \ - -#define KW_FPRINTF_HEADER(KW) \ -void sched_kw_## KW ##_fprintf__(const void *, FILE * ); \ - -#define KW_FREE_HEADER(KW) \ -void sched_kw_## KW ##_free__(void *); \ - -#endif - - -#define KW_HEADER(KW) \ -KW_FREE_HEADER(KW) \ -KW_FPRINTF_HEADER(KW) \ -KW_ALLOC_HEADER(KW) \ -KW_COPYC_HEADER(KW) diff --git a/ThirdParty/Ert/libsched/include/ert/sched/sched_time.h b/ThirdParty/Ert/libsched/include/ert/sched/sched_time.h deleted file mode 100644 index 179b27ed3f..0000000000 --- a/ThirdParty/Ert/libsched/include/ert/sched/sched_time.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_time.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_SCHED_TIME_H -#define ERT_SCHED_TIME_H -#ifdef __cplusplus -extern "C" { -#endif -#include - -typedef struct sched_time_struct sched_time_type; - -sched_time_type * sched_time_alloc( time_t date , double tstep_length , sched_time_enum time_type ); -void sched_time_free( sched_time_type * time_node ); -void sched_time_free__( void * arg ); -time_t sched_time_get_date( const sched_time_type * time_node ); -time_t sched_time_get_type( const sched_time_type * time_node ); -time_t sched_time_get_target( const sched_time_type * time_node , time_t current_time); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libsched/include/ert/sched/sched_types.h b/ThirdParty/Ert/libsched/include/ert/sched/sched_types.h deleted file mode 100644 index a8b7b60cf1..0000000000 --- a/ThirdParty/Ert/libsched/include/ert/sched/sched_types.h +++ /dev/null @@ -1,146 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_types.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_SCHED_TYPES_H -#define ERT_SCHED_TYPES_H -#ifdef __cplusplus -extern "C" { -#endif - -#include - -/** - Contains numerous typedefs for the types used in the sched_kw keywords. -*/ - - -/* - The two (supported) keywords used for time stepping. -*/ - -typedef enum { DATES_TIME = 1, - TSTEP_TIME = 2 } sched_time_enum; - - - -typedef double (sched_history_callback_ftype) (const void * , int); - - - - -typedef enum { INJECTOR = 1, - PRODUCER = 2 } well_state_well_type; - - - -/** - This enum is used for internalizing both the sched_kw_wconhist - keyword, and the sched_kw_wconinje keyword. Observe that the 'AUTO' - mode is only applicable when used in injector context. -*/ - - -typedef enum { DEFAULT = 0, - OPEN = 1, - STOP = 2, - SHUT = 3, - AUTO = 4 } well_status_enum; - - -/** - There is no default injector type. -*/ -typedef enum {WATER = 0 , - GAS = 1 , - OIL = 2 } sched_phase_enum; - - -/** - This enum is used to enumerate the different control modes. Observe - that the enum is used BOTH by the WCONHIST and the WCONINJE - keywords (only the enum value 'RESV' is actually shared between the - two keywords. - - The final element in the enum 'CM_SHUT' is only used internally; that - will never be in the schedule file. -*/ - -typedef enum {RESV = 0, /* Injector || Producer */ - RATE = 1, /* Injector */ - BHP = 2, /* Injector */ - THP = 3, /* Injector */ - GRUP = 4, /* Injector */ - ORAT = 5, /* Producer */ - WRAT = 6, /* Producrer */ - GRAT = 7, /* Producer */ - LRAT = 8, /* Producer */ - CM_SHUT = 100 } well_cm_enum; - - -#define CM_RATE_STRING "RATE" -#define CM_RESV_STRING "RESV" -#define CM_BHP_STRING "BHP" -#define CM_THP_STRING "THP" -#define CM_GRUP_STRING "GRUP" -#define CM_ORAT_STRING "ORAT" -#define CM_WRAT_STRING "WRAT" -#define CM_GRAT_STRING "GRAT" -#define CM_LRAT_STRING "LRAT" - - -/*****************************************************************/ - -#define FIELD_GROUP "FIELD" - -/*****************************************************************/ - - - -typedef enum {NONE = 0, - WCONHIST = 1, - DATES = 2, - COMPDAT = 4, - TSTEP = 8, - TIME = 16, /* Not implemented support */ - WELSPECS = 32, - GRUPTREE = 64, - INCLUDE = 128, - UNTYPED = 256, - WCONINJ = 512, - WCONINJE = 1024, - WCONINJH = 2048, - WCONPROD = 4096, - NUM_SCHED_KW_TYPES = 8192} sched_kw_type_enum; - - -sched_kw_type_enum sched_kw_type_from_string(const char * kw_name); -const char * sched_kw_type_name(sched_kw_type_enum kw_type); - -/*****************************************************************/ -sched_phase_enum sched_phase_type_from_string(const char * type_string); -const char * sched_phase_type_string(sched_phase_enum type); -const char * sched_types_get_status_string(well_status_enum status); -well_status_enum sched_types_get_status_from_string(const char * st_string); - -well_cm_enum sched_types_get_cm_from_string(const char * cm_string , bool wconhist); -const char * sched_types_get_cm_string( well_cm_enum cm ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libsched/include/ert/sched/sched_util.h b/ThirdParty/Ert/libsched/include/ert/sched/sched_util.h deleted file mode 100644 index d7b0171955..0000000000 --- a/ThirdParty/Ert/libsched/include/ert/sched/sched_util.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_util.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_SCHED_UTIL_H -#define ERT_SCHED_UTIL_H -#ifdef __cplusplus -extern "C" { -#endif -#include -#include - -#include - -#define SCHED_KW_DEFAULT_ITEM "*" - -char * sched_util_alloc_line(FILE *, bool *); -void sched_util_parse_line(const char * , int * , char *** , int , bool *); - - -void sched_util_fprintf_int(bool , int , int , FILE *); -void sched_util_fprintf_dbl(bool , double , int , int , FILE *); -double sched_util_atof(const char *); -int sched_util_atoi(const char *); -void sched_util_fprintf_qst(bool , const char * , int , FILE *); -void sched_util_fprintf_tokenlist(int num_token , const char ** token_list , const bool * def); -void sched_util_skip_trailing_tokens( const stringlist_type * tokens , int * __token_index ); -void sched_util_skip_newline( const stringlist_type * tokens , int * __token_index ); -stringlist_type * sched_util_alloc_line_tokens( const stringlist_type * tokens , bool untyped , int num_tokens , int * __token_index); -void sched_util_init_default(const stringlist_type * line_tokens , bool * def); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libsched/include/ert/sched/well_history.h b/ThirdParty/Ert/libsched/include/ert/sched/well_history.h deleted file mode 100644 index 617d4da657..0000000000 --- a/ThirdParty/Ert/libsched/include/ert/sched/well_history.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'well_history.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_WELL_HISTORY -#define ERT_WELL_HISTORY - -#ifdef __cplusplus -extern "C" { -#endif -#include - -#include -#include -#include -#include - -typedef struct well_history_struct well_history_type; - - - - - bool well_history_is_producer( const well_history_type * well_history , int report_step ); - wconhist_state_type * well_history_get_wconhist( well_history_type * well_history ); - well_history_type * well_history_alloc( const char * well_name , const time_t_vector_type * time); - void well_history_free__(void * arg); - void well_history_add_keyword( well_history_type * well_history, const sched_kw_type * sched_kw , int report_step ); - const void * well_history_get_state_ptr( const well_history_type * well_history , sched_kw_type_enum kw_type ); - const char * well_history_get_name( const well_history_type * well_history ); - - sched_kw_type_enum well_history_iget_active_kw( const well_history_type * history , int report_step ); - double well_history_iget( well_index_type * index , int report_step ); - void well_history_set_parent( well_history_type * child_well , int report_step , const group_history_type * parent_group); - group_history_type * well_history_get_parent( well_history_type * child_well , int report_step ); - - bool well_history_well_open( const well_history_type * well_history , int report_step ); - double well_history_iget_WGPRH( const well_history_type * well_history , int report_step ); - double well_history_iget_WOPRH( const well_history_type * well_history , int report_step ); - double well_history_iget_WWPRH( const well_history_type * well_history , int report_step ); - - UTIL_IS_INSTANCE_HEADER( well_history ); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ThirdParty/Ert/libsched/include/ert/sched/well_index.h b/ThirdParty/Ert/libsched/include/ert/sched/well_index.h deleted file mode 100644 index 15c7cd1589..0000000000 --- a/ThirdParty/Ert/libsched/include/ert/sched/well_index.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'well_index.h' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#ifndef ERT_WELL_INDEX_H -#define ERT_WELL_INDEX_H - -#ifdef __cplusplus -extern "C" { -#endif -#include - -#include - -typedef struct well_index_struct well_index_type; - - -well_index_type * well_index_alloc( const char * well_name , const char * variable , const void * state_ptr , sched_kw_type_enum kw_type , sched_history_callback_ftype * func); -void well_index_free( well_index_type * well_index ); -void well_index_free__( void * arg ); -void well_index_add_type( well_index_type * index , sched_kw_type_enum kw_type , sched_history_callback_ftype * func); -sched_history_callback_ftype * well_index_get_callback( const well_index_type * well_index , sched_kw_type_enum kw_type); -const void * well_index_get_state__( const void * index ); -const void * well_index_get_state( const well_index_type * well_index ); -const char * well_index_get_name( const well_index_type * well_index ); -const char * well_index_get_variable( const well_index_type * well_index ); - - -UTIL_IS_INSTANCE_HEADER( well_index ); -UTIL_SAFE_CAST_HEADER_CONST( well_index ); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/ThirdParty/Ert/libsched/src/CMakeLists.txt b/ThirdParty/Ert/libsched/src/CMakeLists.txt deleted file mode 100644 index f98e985b36..0000000000 --- a/ThirdParty/Ert/libsched/src/CMakeLists.txt +++ /dev/null @@ -1,24 +0,0 @@ -set( source_files sched_history.c group_index.c sched_time.c sched_blob.c well_index.c well_history.c group_history.c sched_types.c sched_kw.c sched_file.c sched_kw_untyped.c sched_kw_gruptree.c sched_kw_tstep.c sched_kw_dates.c sched_kw_wconhist.c sched_kw_wconinjh.c sched_kw_welspecs.c sched_util.c history.c sched_kw_wconprod.c sched_kw_wconinj.c sched_kw_wconinje.c sched_kw_compdat.c sched_kw_include.c gruptree.c) - -set( header_files sched_history.h sched_time.h group_index.h sched_blob.h well_index.h group_history.h well_history.h sched_types.h sched_file.h sched_kw.h sched_kw_untyped.h sched_kw_gruptree.h sched_kw_tstep.h sched_kw_dates.h sched_kw_wconhist.h sched_kw_wconinjh.h sched_kw_welspecs.h sched_util.h history.h sched_kw_wconprod.h sched_kw_wconinj.h sched_kw_wconinje.h sched_kw_compdat.h sched_kw_include.h sched_macros.h gruptree.h) - -include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ) -include_directories( ${libutil_build_path} ) -include_directories( ${libutil_src_path} ) - -add_library( sched ${LIBRARY_TYPE} ${source_files} ) -set_target_properties( sched PROPERTIES VERSION ${ERT_VERSION_MAJOR}.${ERT_VERSION_MINOR} SOVERSION ${ERT_VERSION_MAJOR} ) - -target_link_libraries( sched ert_util ecl) -if (USE_RUNPATH) - add_runpath( sched ) -endif() -#----------------------------------------------------------------- -if (INSTALL_ERT) - install(TARGETS sched DESTINATION ${CMAKE_INSTALL_LIBDIR}) - foreach(header ${header_files}) - install(FILES ../include/ert/sched/${header} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/ert/sched) - endforeach() -endif() - - diff --git a/ThirdParty/Ert/libsched/src/group_history.c b/ThirdParty/Ert/libsched/src/group_history.c deleted file mode 100644 index 50adb787bd..0000000000 --- a/ThirdParty/Ert/libsched/src/group_history.c +++ /dev/null @@ -1,391 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'group_history.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - -#define GROUP_HISTORY_TYPE_ID 5100635 - - -struct group_history_struct { - UTIL_TYPE_ID_DECLARATION; - char * group_name; - bool well_group; /* If true this group contains wells, otehrwise it contains other groups. */ - const time_t_vector_type * time; - int start_time; /* At which report step was this group first defined? */ - size_t_vector_type * parent; - size_t_vector_type * children; - vector_type * children_storage; - int __active_step; /* Internal variable to ensure that several repeated calls to add_child / del_child work on the correct child_hash instance. */ -}; - -UTIL_SAFE_CAST_FUNCTION( group_history , GROUP_HISTORY_TYPE_ID ) -UTIL_SAFE_CAST_FUNCTION_CONST( group_history , GROUP_HISTORY_TYPE_ID ) -UTIL_IS_INSTANCE_FUNCTION( group_history , GROUP_HISTORY_TYPE_ID) - -group_history_type * group_history_alloc( const char * group_name , const time_t_vector_type * time , int report_step) { - group_history_type * group_history = util_malloc( sizeof * group_history ); - - UTIL_TYPE_ID_INIT( group_history , GROUP_HISTORY_TYPE_ID ); - - group_history->time = time; - group_history->group_name = util_alloc_string_copy( group_name ); - group_history->children_storage = vector_alloc_new(); - group_history->children = size_t_vector_alloc(0,0); - group_history->start_time = report_step; - /* - We install an empty child hash immediately - so the children - table will never contain NULL. - */ - { - hash_type * child_hash = hash_alloc(); - vector_append_owned_ref( group_history->children_storage , child_hash , hash_free__ ); - size_t_vector_iset_default( group_history->children , 0 , ( size_t ) child_hash ); - } - - - group_history->parent = size_t_vector_alloc(0, ( size_t ) NULL ); - group_history->__active_step = -1; - return group_history; -} - - - -void group_history_free( group_history_type * group_history ) { - vector_free( group_history->children_storage ); - size_t_vector_free( group_history->children ); - size_t_vector_free( group_history->parent ); - - free( group_history->group_name ); - free( group_history ); -} - - -bool group_history_group_exists( const group_history_type * group_history , int report_step) { - if ( report_step >= group_history->start_time) - return true; - else - return false; -} - - - -void group_history_free__( void * arg ){ - group_history_type * group_history = group_history_safe_cast( arg ); - group_history_free( group_history ); -} - - -static void group_history_set_parent( group_history_type * child_group , int report_step , const group_history_type * parent_group) { - size_t_vector_iset_default( child_group->parent , report_step , ( size_t ) parent_group); -} - - -static group_history_type * group_history_get_parent( group_history_type * child_group , int report_step ) { - return (group_history_type *) size_t_vector_safe_iget( child_group->parent , report_step ); -} - - - -static void group_history_ensure_private_child_list(group_history_type * group_history , int report_step) { - if (group_history->__active_step != report_step) { - /* - We wish to modify the child-parent relationships at this - report_step; and the internal flag __active_step tells us that - the current elemement in the children pointer table is not - created at this report step; i.e. we must create a new child - hash instance and install at this report step. - - For each repeated call the input parameter @report_step must - be >= @report_step from the previous call; otherwise things - will break hard. - */ - - hash_type * new_child_hash = hash_alloc(); /* Allocate the new new hash table, - and fill it up with the current list - of children. */ - { - hash_type * old_child_hash = ( hash_type * ) size_t_vector_safe_iget( group_history->children , report_step ); - hash_iter_type * old_iter = hash_iter_alloc( old_child_hash ); - while (!hash_iter_is_complete( old_iter )) { - const char * child_name = hash_iter_get_next_key( old_iter ); - void * child = hash_get( old_child_hash , child_name ); - - hash_insert_ref( new_child_hash , child_name , child ); - } - hash_iter_free( old_iter ); - } - - vector_append_owned_ref( group_history->children_storage , new_child_hash , hash_free__ ); /* Store it in the storge area. */ - size_t_vector_iset_default( group_history->children , report_step , ( size_t ) new_child_hash ); - group_history->__active_step = report_step; - } -} - - -static void group_history_del_child( group_history_type * group_history , const char * child_name , int report_step ) { - group_history_ensure_private_child_list( group_history , report_step ); - { - hash_type * child_hash = (hash_type *) size_t_vector_iget( group_history->children , report_step ); - hash_del( child_hash , child_name ); - } -} - - -void group_history_fprintf(const group_history_type * group_history , int report_step , bool recursive , FILE * stream ) { - fprintf(stream , "\n----------------------------------------------------------------------\n"); - fprintf(stream , "Group: %s \n",group_history->group_name); - - { - hash_type * child_hash = (hash_type *) size_t_vector_safe_iget( group_history->children , report_step ); - hash_iter_type * child_iter = hash_iter_alloc( child_hash ); - int counter = 0; - while (!hash_iter_is_complete( child_iter )) { - - const char * name = hash_iter_get_next_key( child_iter ); - const void * child = hash_get( child_hash , name ); - if ( group_history_is_instance( child )) - fprintf(stream , "%8s(G) ",name); - else - fprintf(stream , "%8s(W) ",name); - counter++; - if ((counter % 4) == 0) - fprintf(stream , "\n"); - - } - fprintf(stream , "\n----------------------------------------------------------------------\n"); - if (recursive) { - hash_iter_restart( child_iter ); - while (!hash_iter_is_complete( child_iter )) { - - const char * name = hash_iter_get_next_key( child_iter ); - const void * child = hash_get( child_hash , name ); - if ( group_history_is_instance( child )) - group_history_fprintf( child , report_step , recursive , stream ); - } - } - hash_iter_free( child_iter ); - } -} - - -void group_history_add_child(group_history_type * group_history , void * child_history , const char * child_name , int report_step ) { - bool well_child = well_history_is_instance( child_history ) ? true : false; - - - /* - If the child is already in a parent-child relationship; the child - must first be orphaned by removing it as a child from parents' child-list. - */ - - { - group_history_type * old_parent; - if (well_child) - old_parent = well_history_get_parent( child_history , report_step ); - else - old_parent = group_history_get_parent( child_history , report_step ); - - if (old_parent != NULL) - group_history_del_child( old_parent , child_name , report_step ); - } - - - group_history_ensure_private_child_list( group_history , report_step ); - /*1: Establishing the child relationship. */ - { - hash_type * child_hash; - child_hash = (hash_type *) size_t_vector_iget( group_history->children , report_step ); /* This should NOT use the safe_iget() function, because we always should work an per-report_step instance. */ - hash_insert_ref( child_hash , child_name , child_history); /* Establish parent -> child link. */ - } - - - /*2: Setting the opposite, i.e. parent <- child relationship. */ - if (well_child) - well_history_set_parent( child_history , report_step , group_history ); - else if (group_history_is_instance( child_history )) - group_history_set_parent( child_history , report_step , group_history ); - -} - - -void group_history_init_child_names( group_history_type * group_history , int report_step , stringlist_type * child_names ) { - stringlist_clear( child_names ); - { - hash_type * child_hash = (hash_type *) size_t_vector_safe_iget( group_history->children , report_step ); /* Get a pointer to child hash instance valid at this report_step. */ - hash_iter_type * child_iter = hash_iter_alloc( child_hash ); - while ( !hash_iter_is_complete( child_iter )) { - const char * child_name = hash_iter_get_next_key( child_iter ); - stringlist_append_copy( child_names , child_name ); - } - hash_iter_free( child_iter ); - } -} - - -const char * group_history_get_name( const group_history_type * group_history ) { - return group_history->group_name; -} - - -/*****************************************************************/ - -double group_history_iget_GOPRH( const void * __group_history , int report_step ) { - const group_history_type * group_history = group_history_safe_cast_const( __group_history ); - { - double GOPRH = 0; - - hash_type * child_hash = (hash_type *) size_t_vector_safe_iget( group_history->children , report_step ); /* Get a pointer to child hash instance valid at this report_step. */ - hash_iter_type * child_iter = hash_iter_alloc( child_hash ); - while ( !hash_iter_is_complete( child_iter )) { - const char * child_name = hash_iter_get_next_key( child_iter ); - const void * child = hash_get( child_hash , child_name ); - if (group_history_is_instance( child )) - GOPRH += group_history_iget_GOPRH( child , report_step ); - else { - double WOPRH = well_history_iget_WOPRH( child , report_step ); - GOPRH += WOPRH; - } - } - hash_iter_free( child_iter ); - - return GOPRH; - } -} - - - -double group_history_iget_GWPRH( const void * __group_history , int report_step ) { - const group_history_type * group_history = group_history_safe_cast_const( __group_history ); - { - double GWPRH = 0; - - hash_type * child_hash = (hash_type *) size_t_vector_safe_iget( group_history->children , report_step ); /* Get a pointer to child hash instance valid at this report_step. */ - hash_iter_type * child_iter = hash_iter_alloc( child_hash ); - while ( !hash_iter_is_complete( child_iter )) { - const char * child_name = hash_iter_get_next_key( child_iter ); - const void * child = hash_get( child_hash , child_name ); - if (group_history_is_instance( child )) - GWPRH += group_history_iget_GWPRH( child , report_step ); - else - GWPRH += well_history_iget_WWPRH( child , report_step ); - } - hash_iter_free( child_iter ); - - return GWPRH; - } -} - - - - -double group_history_iget_GGPRH( const void * __group_history , int report_step ) { - const group_history_type * group_history = group_history_safe_cast_const( __group_history ); - { - double GGPRH = 0; - - hash_type * child_hash = (hash_type *) size_t_vector_safe_iget( group_history->children , report_step ); /* Get a pointer to child hash instance valid at this report_step. */ - hash_iter_type * child_iter = hash_iter_alloc( child_hash ); - while ( !hash_iter_is_complete( child_iter )) { - const char * child_name = hash_iter_get_next_key( child_iter ); - const void * child = hash_get( child_hash , child_name ); - if (group_history_is_instance( child )) - GGPRH += group_history_iget_GGPRH( child , report_step ); - else - GGPRH += well_history_iget_WGPRH( child , report_step ); - } - hash_iter_free( child_iter ); - - return GGPRH; - } -} - - -double group_history_iget_GGPTH( const void * __group_history , int report_step ) { - const group_history_type * group_history = group_history_safe_cast_const( __group_history ); - double GGPTH = 0; - for (int tstep = 1; tstep <= report_step; tstep++) { - double days = (time_t_vector_iget( group_history->time , tstep ) - time_t_vector_iget( group_history->time , tstep - 1)) * 1.0 / 86400 ; - double rate = group_history_iget_GGPRH( __group_history , tstep ); - GGPTH += rate * days; - } - return GGPTH; -} - - -double group_history_iget_GOPTH( const void * __group_history , int report_step ) { - const group_history_type * group_history = group_history_safe_cast_const( __group_history ); - double GOPTH = 0; - for (int tstep = 1; tstep <= report_step; tstep++) { - double days = (time_t_vector_iget( group_history->time , tstep ) - time_t_vector_iget( group_history->time , tstep - 1)) * 1.0 / 86400 ; - double rate = group_history_iget_GOPRH( __group_history , tstep ); - GOPTH += rate * days; - } - return GOPTH; -} - - -double group_history_iget_GWPTH( const void * __group_history , int report_step ) { - const group_history_type * group_history = group_history_safe_cast_const( __group_history ); - double GWPTH = 0; - for (int tstep = 1; tstep <= report_step; tstep++) { - double days = (time_t_vector_iget( group_history->time , tstep ) - time_t_vector_iget( group_history->time , tstep - 1)) * 1.0 / 86400 ; - double rate = group_history_iget_GWPRH( __group_history , tstep ); - GWPTH += rate * days; - } - return GWPTH; -} - - - - -double group_history_iget_GGORH( const void * __group_history , int report_step ) { - double GGPRH = group_history_iget_GGPRH( __group_history , report_step ); - double GOPRH = group_history_iget_GOPRH( __group_history , report_step ); - - return GGPRH / GOPRH; -} - - - -double group_history_iget_GWCTH( const void * __group_history , int report_step ) { - double GWPRH = group_history_iget_GWPRH( __group_history , report_step ); - double GOPRH = group_history_iget_GOPRH( __group_history , report_step ); - - return GWPRH / GOPRH; -} - - - - - - -double group_history_iget( const void * index , int report_step ) { - const group_history_type * group_history = group_index_get_state__( index ); - sched_history_callback_ftype * func = group_index_get_callback( index ); - - return func( group_history , report_step ); -} diff --git a/ThirdParty/Ert/libsched/src/group_index.c b/ThirdParty/Ert/libsched/src/group_index.c deleted file mode 100644 index 1078242c10..0000000000 --- a/ThirdParty/Ert/libsched/src/group_index.c +++ /dev/null @@ -1,102 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'group_index.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include - -#include -#include -#include - -#include -#include - - -#define GROUP_INDEX_TYPE_ID 96580631 - - -struct group_index_struct { - UTIL_TYPE_ID_DECLARATION; - char * group_name; - char * variable; - const void * group_history; - sched_history_callback_ftype * func; -}; - - - - - -UTIL_IS_INSTANCE_FUNCTION( group_index , GROUP_INDEX_TYPE_ID ) -UTIL_SAFE_CAST_FUNCTION_CONST( group_index , GROUP_INDEX_TYPE_ID ) - - -group_index_type * group_index_alloc( const char * group_name , const char * variable , const void * group_history , sched_history_callback_ftype * func ) { - group_index_type * group_index = util_malloc( sizeof * group_index ); - - UTIL_TYPE_ID_INIT( group_index , GROUP_INDEX_TYPE_ID ); - - group_index->func = func; - group_index->group_history = group_history; - group_index->group_name = util_alloc_string_copy( group_name ); - group_index->variable = util_alloc_string_copy( variable ); - - - return group_index; -} - - -void group_index_free( group_index_type * index ) { - free( index->group_name ); - free( index->variable ); - free( index ); -} - - -void group_index_free__( void * arg ) { - group_index_free( (group_index_type *) arg ); -} - - - -sched_history_callback_ftype * group_index_get_callback( const group_index_type * group_index ) { - return group_index->func; -} - - -const char * group_index_get_name( const group_index_type * group_index ) { - return group_index->group_name; -} - -const char * group_index_get_variable( const group_index_type * group_index ) { - return group_index->variable; -} - - - -const void * group_index_get_state( const group_index_type * group_index ) { - return group_index->group_history; -} - - - -const void * group_index_get_state__( const void * index ) { - const group_index_type * group_index = group_index_safe_cast_const( index ); - return group_index_get_state( group_index ); -} - - diff --git a/ThirdParty/Ert/libsched/src/gruptree.c b/ThirdParty/Ert/libsched/src/gruptree.c deleted file mode 100644 index 67da8d5bb7..0000000000 --- a/ThirdParty/Ert/libsched/src/gruptree.c +++ /dev/null @@ -1,546 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'gruptree.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -#include -#include - -#include - - -/* - The gruptree struct is made for internalizing the - GRUPTREE keyword from a schedule section. - - It provides functions which allows for easy - manipulating of, and access to, the tree structure. - - Since the gruptree may change during simulation, - and the changes are usually only given in differences, - i.e. the whole gruptree is NOT restated, we provide a - way to easily create a new gruptree to reflect the changes. - - - - EXAMPLE: - - Schedule file: - ---------------------------- - - SKIPREST - .... - .... - - GRUPTREE - GRPA FIELD/ - GRPB FIELD/ - INJE GRPA/ - / - - TSTEP - 100 / - .... - .... - - GRUPTREE - INJE GRPB / - PROD GRPA / - / - - TSTEP - 200 / - ... - ... - ---------------------------- - - Now, after the first timestep, INJE is no longer - a subgroup of GRPA, but GRPB. However, the rest - of the GRUPTREE at the first time step is still - valid! Note also that a new group PROD has been - added. - - Suppose that you want to create two gruptree's - one for each time step. This can be done as follows. - - - C code: - ---------------------------- - - gruptree_type * tree_one = gruptree_alloc(); - gruptree_register_grup(tree_two, "GRPA", "FIELD"); - gruptree_register_grup(tree_two, "GRPB", "FIELD"); - gruptree_register_grup(tree_two, "INJE", "GRPA"); - - gruptree_type * tree_two = gruptree_copyc(tree_one); - gruptree_register_grup(tree_two, "INJE", "GRPB"); - gruptree_register_grup(tree_two, "PROD", "GRPA"); - - ..... - ..... - - gruptree_free(tree_one); - gruptree_free(tree_two); -*/ - - - -typedef struct grup_struct grup_type; -typedef struct well_struct well_type; - - - -struct grup_struct{ - bool isleaf; - bool isfield; /* Field node can have both wells and grups as children. */ - char * name; - - const grup_type * parent; - hash_type * children; /* If not a leaf grup, pointers to other grups, - if leaf grup, pointers to wells. Special case - for FIELD, which can contain both wells and - grups. */ -}; - - - -struct well_struct{ - char * name; - const grup_type * parent; -}; - - - -struct gruptree_struct{ - hash_type * grups; - hash_type * wells; -}; - - - -/*************************************************************************/ - - - -static grup_type * grup_alloc(const char * name, const grup_type * parent) -{ - grup_type * grup = util_malloc(sizeof * grup); - - grup->isleaf = true; - grup->isfield = false; - grup->name = util_alloc_string_copy(name); - grup->parent = parent; - grup->children = hash_alloc(); - - return grup; -} - - - -static void grup_free(grup_type * grup) -{ - free(grup->name); - hash_free(grup->children); - free(grup); -} - - - -static void grup_free__(void * grup) -{ - grup_free( (grup_type *) grup); -} - - - -static const char * grup_get_parent_name(const grup_type * grup) -{ - if(grup->parent != NULL) - return grup->parent->name; - else - return NULL; -} - - - -static well_type * well_alloc(const char * name, const grup_type * parent) -{ - well_type * well = util_malloc(sizeof * well); - well->name = util_alloc_string_copy(name); - well->parent = parent; - return well; -} - - -static void well_free(well_type * well) -{ - free(well->name); - free(well); -} - - - -static void well_free__(void * well) -{ - well_free( (well_type *) well); -} - - - -static const char * well_get_parent_name(const well_type * well) -{ - return well->parent->name; -} - - - -/** - This function is called recursively ... -*/ -static void gruptree_well_hash_iter__(gruptree_type * gruptree, const char * grupname, hash_type * well_hash) -{ - - if(!hash_has_key(gruptree->grups, grupname)) - util_abort("%s: Internal error - grupname %s is not in hash.\n", __func__, grupname); - - grup_type * grup = hash_get(gruptree->grups, grupname); - if(grup->isfield) - util_abort("%s: Internal error - no support for grups with isfield flag.\n", __func__); - - if(!grup->isleaf) - { - int size = hash_get_size(grup->children); - char ** keylist = hash_alloc_keylist(grup->children); - - for(int i=0; ichildren); - char ** keylist = hash_alloc_keylist(grup->children); - for(int i=0; iwells, keylist[i]); - hash_insert_ref(well_hash, keylist[i], well); - } - util_free_stringlist(keylist, size); - } -} - - - -static gruptree_type * gruptree_alloc_empty() -{ - gruptree_type * gruptree = util_malloc(sizeof * gruptree); - gruptree->grups = hash_alloc(); - gruptree->wells = hash_alloc(); - return gruptree; -} - - - -/*************************************************************************/ - - -gruptree_type * gruptree_alloc() -{ - gruptree_type * gruptree = gruptree_alloc_empty(); - - grup_type * field = grup_alloc("FIELD", NULL); - field->isfield = true; - hash_insert_hash_owned_ref(gruptree->grups, "FIELD", field, grup_free__); - - return gruptree; -} - - - -void gruptree_free(gruptree_type * gruptree) -{ - hash_free(gruptree->grups); - hash_free(gruptree->wells); - free(gruptree); -} - - - -void gruptree_register_grup(gruptree_type * gruptree, const char * name, const char * parent_name) -{ - grup_type * parent; - grup_type * newgrp; - - ////////////////////////////////////////////////////////// - - if(name == NULL) - util_abort("%s: Trying to insert group %s with NULL name - aborting.\n", __func__, name); - if(parent_name == NULL) - util_abort("%s: Trying to insert group %s with NULL parent - aborting.\n", __func__, name); - if(strcmp(name, parent_name) == 0) - util_abort("%s: Trying to insert group %s with itself as parent - aborting.\n", __func__, name); - - if(strcmp(name, "FIELD") == 0) - util_abort("%s: Internal error - insertion of group FIELD is not allowed - aborting.\n", __func__); - - ////////////////////////////////////////////////////////// - - if(!hash_has_key(gruptree->grups, parent_name)) - gruptree_register_grup(gruptree, parent_name, "FIELD"); - - parent = hash_get(gruptree->grups, parent_name); - - if(parent->isleaf && !parent->isfield && hash_get_size(parent->children) > 0) - { - util_abort("%s: Group %s contains wells, cannot contain other groups.\n", __func__, parent_name); - } - - if(hash_has_key(gruptree->grups, name)) - { - newgrp = hash_get(gruptree->grups, name); - hash_del(newgrp->parent->children, name); - - newgrp->parent = parent; - } - else - { - newgrp = grup_alloc(name, parent); - hash_insert_hash_owned_ref(gruptree->grups, name, newgrp, grup_free__); - } - - parent->isleaf = false; - hash_insert_ref(parent->children, name, newgrp); -} - - - -void gruptree_register_well(gruptree_type * gruptree, const char * name, const char * parent_name) -{ - grup_type * parent; - well_type * well; - - if(!hash_has_key(gruptree->grups, parent_name)) - gruptree_register_grup(gruptree, parent_name, "FIELD"); - - parent = hash_get(gruptree->grups, parent_name); - - if(!parent->isleaf && !parent->isfield) - util_abort("%s: Group %s is not FIELD and contains other groups, cannot contain wells.\n", __func__, parent_name); - - if(hash_has_key(gruptree->wells, name)) - { - well = hash_get(gruptree->wells, name); - hash_del(well->parent->children, name); - well->parent = parent; - } - else - { - well = well_alloc(name, parent); - hash_insert_hash_owned_ref(gruptree->wells, name, well, well_free__); - } - hash_insert_ref(well->parent->children, name, well); -} - - - -bool gruptree_has_grup(const gruptree_type * gruptree, const char * grupname) -{ - if(hash_has_key(gruptree->grups, grupname)) - { - return true; - } - else - { - return false; - } -} - - -char ** gruptree_alloc_grup_well_list(gruptree_type * gruptree, const char * grupname, int * num_wells) -{ - char ** well_names; - - if(!hash_has_key(gruptree->grups, grupname)) - util_abort("%s: Group %s is not present in the gruptree.\n", __func__, grupname); - - if(strcmp(grupname, "FIELD") == 0) - { - *num_wells = hash_get_size(gruptree->wells); - well_names = hash_alloc_keylist(gruptree->wells); - } - else - { - hash_type * well_hash = hash_alloc(); - gruptree_well_hash_iter__(gruptree, grupname, well_hash); - - *num_wells = hash_get_size(well_hash); - well_names = hash_alloc_keylist(well_hash); - - hash_free(well_hash); - } - - return well_names; -} - - - -gruptree_type * gruptree_copyc(const gruptree_type * gruptree) -{ - gruptree_type * gruptree_new = gruptree_alloc(); - - { - int num_grups = hash_get_size(gruptree->grups); - char ** grup_list = hash_alloc_keylist(gruptree->grups); - for(int i=0; igrups, grup_list[i]); - gruptree_register_grup(gruptree_new, grup_list[i], grup_get_parent_name(grup)); - } - util_free_stringlist(grup_list, num_grups); - } - - { - int num_wells = hash_get_size(gruptree->wells); - char ** well_list = hash_alloc_keylist(gruptree->wells); - for(int i=0; iwells, well_list[i]); - gruptree_register_well(gruptree_new, well_list[i], well_get_parent_name(well)); - } - util_free_stringlist(well_list, num_wells); - - } - - return gruptree_new; -} - - - -void gruptree_fwrite(const gruptree_type * gruptree, FILE * stream) -{ - { - int num_grups = hash_get_size(gruptree->grups); - char ** grup_list = hash_alloc_keylist(gruptree->grups); - - util_fwrite(&num_grups, sizeof num_grups, 1, stream, __func__); - - for(int i=0; igrups, grup_list[i]); - const char * parent_name = grup_get_parent_name(grup); - - util_fwrite_string(grup_list[i], stream); - util_fwrite_string(parent_name, stream); - } - util_free_stringlist(grup_list, num_grups); - } - - { - int num_wells = hash_get_size(gruptree->wells); - char ** well_list = hash_alloc_keylist(gruptree->wells); - - util_fwrite(&num_wells, sizeof num_wells, 1, stream, __func__); - - for(int i=0; iwells, well_list[i]); - const char * parent_name = well_get_parent_name(well); - util_fwrite_string(well_list[i], stream); - util_fwrite_string(parent_name, stream); - } - util_free_stringlist(well_list, num_wells); - - } - -} - - - -gruptree_type * gruptree_fread_alloc(FILE * stream) -{ - gruptree_type * gruptree = gruptree_alloc(); - { - int num_grups; - util_fread(&num_grups, sizeof num_grups, 1, stream, __func__); - for(int i=0; i - for more details. -*/ - -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - - -#define HISTORY_TYPE_ID 66143109 - -struct history_struct{ - UTIL_TYPE_ID_DECLARATION; - const ecl_sum_type * refcase; /* ecl_sum instance used when the data are taken from a summary instance. Observe that this is NOT owned by history instance.*/ - const sched_file_type * sched_file; /* Not owned. */ - sched_history_type * sched_history; - history_source_type source; -}; - - -history_source_type history_get_source_type( const char * string_source ) { - history_source_type source_type = HISTORY_SOURCE_INVALID; - - if (strcmp( string_source , "REFCASE_SIMULATED") == 0) - source_type = REFCASE_SIMULATED; - else if (strcmp( string_source , "REFCASE_HISTORY") == 0) - source_type = REFCASE_HISTORY; - else if (strcmp( string_source , "SCHEDULE") == 0) - source_type = SCHEDULE; - else - util_abort("%s: Sorry source:%s not recognized\n",__func__ , string_source); - - return source_type; -} - - -const char * history_get_source_string( history_source_type history_source ) { - switch( history_source ) { - case( REFCASE_SIMULATED ): - return "REFCASE_SIMULATED"; - break; - case(REFCASE_HISTORY ): - return "REFCASE_HISTORY"; - break; - case(SCHEDULE ): - return "SCHEDULE"; - break; - default: - util_abort("%s: internal fuck up \n",__func__); - return NULL; - } -} - - -UTIL_IS_INSTANCE_FUNCTION( history , HISTORY_TYPE_ID ) - - -static history_type * history_alloc_empty( ) -{ - history_type * history = util_malloc(sizeof * history); - UTIL_TYPE_ID_INIT( history , HISTORY_TYPE_ID ); - history->refcase = NULL; - history->sched_history = NULL; - history->sched_file = NULL; - return history; -} - - - -/******************************************************************/ -// Exported functions for manipulating history_type. Acess functions further below. - - -void history_free(history_type * history) -{ - if (history->sched_history != NULL) - sched_history_free( history->sched_history ); - - free(history); -} - - -history_type * history_alloc_from_sched_file(const char * sep_string , const sched_file_type * sched_file) -{ - history_type * history = history_alloc_empty( ); - history->sched_file = sched_file; - history->sched_history = sched_history_alloc( sep_string ); - sched_history_update( history->sched_history , sched_file ); - history->source = SCHEDULE; - - return history; -} - - -history_type * history_alloc_from_refcase(const ecl_sum_type * refcase , bool use_h_keywords) { - history_type * history = history_alloc_empty( true ); - - history->refcase = refcase; /* This function does not really do anthing - it just sets the ecl_sum field of the history instance. */ - if (use_h_keywords) - history->source = REFCASE_HISTORY; - else - history->source = REFCASE_SIMULATED; - - return history; -} - - - - - -/******************************************************************/ -// Exported functions for accessing history_type. - - - - -int history_get_last_restart(const history_type * history) { - if (history->refcase != NULL) - return ecl_sum_get_last_report_step( history->refcase); - else - return sched_history_get_last_history( history->sched_history ); -} - - - - - - - - -bool history_init_ts( const history_type * history , const char * summary_key , double_vector_type * value, bool_vector_type * valid) { - bool initOK = false; - - double_vector_reset( value ); - bool_vector_reset( valid ); - bool_vector_set_default( valid , false); - - if (history->source == SCHEDULE) { - - for (int tstep = 0; tstep <= sched_history_get_last_history(history->sched_history); tstep++) { - if (sched_history_open( history->sched_history , summary_key , tstep)) { - initOK = true; - bool_vector_iset( valid , tstep , true ); - double_vector_iset( value , tstep , sched_history_iget( history->sched_history , summary_key , tstep)); - } else - bool_vector_iset( valid , tstep , false ); - } - - - } else { - - char * local_key; - if (history->source == REFCASE_HISTORY) { - /* Must create a new key with 'H' for historical values. */ - const ecl_smspec_type * smspec = ecl_sum_get_smspec( history->refcase ); - const char * join_string = ecl_smspec_get_join_string( smspec ); - ecl_smspec_var_type var_type = ecl_smspec_identify_var_type( summary_key ); - - if ((var_type == ECL_SMSPEC_WELL_VAR) || (var_type == ECL_SMSPEC_GROUP_VAR)) - local_key = util_alloc_sprintf( "%sH%s%s" , - ecl_sum_get_keyword( history->refcase , summary_key ) , - join_string , - ecl_sum_get_wgname( history->refcase , summary_key )); - else if (var_type == ECL_SMSPEC_FIELD_VAR) - local_key = util_alloc_sprintf( "%sH" , ecl_sum_get_keyword( history->refcase , summary_key )); - else - local_key = NULL; // If we try to get historical values of e.g. Region quantities it will fail. - } else - local_key = (char *) summary_key; - - if (local_key) { - if (ecl_sum_has_general_var( history->refcase , local_key )) { - for (int tstep = 0; tstep <= history_get_last_restart(history); tstep++) { - int time_index = ecl_sum_iget_report_end( history->refcase , tstep ); - if (time_index >= 0) { - double_vector_iset( value , tstep , ecl_sum_get_general_var( history->refcase , time_index , local_key )); - bool_vector_iset( valid , tstep , true ); - } else - bool_vector_iset( valid , tstep , false ); /* Did not have this report step */ - } - initOK = true; - } - - if (history->source == REFCASE_HISTORY) - free( local_key ); - } - } - return initOK; -} - - -time_t history_get_start_time( const history_type * history ) { - if (history->source == SCHEDULE) - return sched_history_iget_time_t( history->sched_history , 0); - else - return ecl_sum_get_start_time( history->refcase ); -} - - - -/* Uncertain about the first node - offset problems +++ ?? - Changed to use node_end_time() at svn ~ 2850 - - Changed to sched_history at svn ~2940 -*/ -time_t history_get_time_t_from_restart_nr( const history_type * history , int restart_nr) { - if (history->source == SCHEDULE) - return sched_history_iget_time_t( history->sched_history , restart_nr); - else { - if (restart_nr == 0) - return ecl_sum_get_start_time( history->refcase ); - else - return ecl_sum_get_report_time( history->refcase , restart_nr ); - } -} - - -int history_get_restart_nr_from_time_t( const history_type * history , time_t time) { - if (time == history_get_start_time( history )) - return 0; - else { - if (history->source == SCHEDULE) - return sched_file_get_restart_nr_from_time_t( history->sched_file , time ); - else { - int report_step = ecl_sum_get_report_step_from_time( history->refcase , time ); - if (report_step >= 1) - return report_step; - else { - int mday,year,month; - util_set_date_values_utc( time , &mday , &month , &year); - util_abort("%s: Date: %02d/%02d/%04d does not cooincide with any report time. Aborting.\n", __func__ , mday , month , year); - return -1; - } - } - } -} - - -int history_get_restart_nr_from_days( const history_type * history , double sim_days) { - if (history->source == SCHEDULE) - return sched_file_get_restart_nr_from_days( history->sched_file , sim_days); - else { - int report_step = ecl_sum_get_report_step_from_days( history->refcase , sim_days); - if (report_step >= 1) - return report_step; - else { - util_abort("%s: Days:%g does not cooincide with any report time. Aborting.\n", __func__ , sim_days); - return -1; - } - } -} - - - diff --git a/ThirdParty/Ert/libsched/src/sched_blob.c b/ThirdParty/Ert/libsched/src/sched_blob.c deleted file mode 100644 index 1c1b394924..0000000000 --- a/ThirdParty/Ert/libsched/src/sched_blob.c +++ /dev/null @@ -1,84 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_blob.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -#include -#include -#include - -#include -#include -#include - - - - - -struct sched_blob_struct { - char * buffer; - time_t start_time; - sched_time_type * time_step; /* Either a date into the 'future' - or a TSTEP. This is the end time of the blob.*/ -}; - - - -static void sched_blob_append_buffer( sched_blob_type * blob , const char * new_buffer ) { - blob->buffer = util_strcat_realloc( blob->buffer , new_buffer ); -} - - -void sched_blob_append_token( sched_blob_type * blob , const char * token ) { - char * new_buffer = util_calloc( (strlen(token) + 2) , sizeof * new_buffer ); - sched_blob_append_buffer( blob , new_buffer ); - free( new_buffer ); -} - - - -sched_blob_type * sched_blob_alloc() { - sched_blob_type * blob = util_malloc( sizeof * blob ); - blob->buffer = NULL; - blob->time_step = NULL; - return blob; -} - - -int sched_blob_get_size( const sched_blob_type * blob ) { - if (blob->buffer == NULL) - return 0; - else - return strlen( blob->buffer ); -} - - - -void sched_blob_free( sched_blob_type * blob ) { - util_safe_free( blob->buffer ); - if (blob->time_step != NULL) - sched_time_free( blob->time_step ); - free( blob ); -} - - - - -void sched_blob_fprintf( const sched_blob_type * blob , FILE * stream ) { - fprintf(stream , "%s" , blob->buffer ); -} diff --git a/ThirdParty/Ert/libsched/src/sched_file.c b/ThirdParty/Ert/libsched/src/sched_file.c deleted file mode 100644 index 4a54d02720..0000000000 --- a/ThirdParty/Ert/libsched/src/sched_file.c +++ /dev/null @@ -1,1013 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_file.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -/* This sched_file.c contains code for internalizing an ECLIPSE - schedule file. - - Two structs are defined in this file: - - 1. The sched_file_struct, which can be accessed externaly - through various interface functions. - - 2. The sched_block_struct, which is for internal use. - - The internalization function 'sched_file_parse' splits the ECLIPSE - schedule file into a sequence of 'sched_block_type's, where a single - block contains one or more keywords. Except for the first block, which - is empty per definition, the last keyword in a block will always be - a timing keyword like DATES or TSTEP. Thus, the number of blocks in - the sched_file_struct will always cooincide with the number of - restart files in the ECLIPSE simulation. In order to make this work, - TSTEP and DATES keyword containing multiple data, are split into - a sequence of keywords. - - Note the following: - - 1. This implies that scheduling data after the last timing - keyword is irrelevant. This is similar to how ECLIPSE works. - - 2. Scheduling data after keyword END is ignored, since this - is interpreted as the end of the SCHEDULE section. - -*/ - -#define SCHED_FILE_TYPE_ID 677198 - -struct sched_block_struct { - vector_type * kw_list; /* A list of sched_kw's in the block. */ - time_t block_start_time; - time_t block_end_time; - hash_type * kw_hash; /* Hash table indexed with kw_name - containing vectors of kw instances . */ -}; - - - -struct sched_file_struct { - UTIL_TYPE_ID_DECLARATION; - hash_type * fixed_length_table; /* A hash table of keywords with a fixed length, i.e. not '/' terminated. */ - vector_type * kw_list; - vector_type * kw_list_by_type; - vector_type * blocks; /* A list of chronologically sorted sched_block_type's. */ - stringlist_type * files; /* The name of the files which have been parsed to generate this sched_file instance. */ - time_t start_time; /* The start of the simulation. */ - bool hasEND; -}; - - - -/************************************************************************/ - - - -static sched_block_type * sched_block_alloc_empty() -{ - sched_block_type * block = util_malloc(sizeof * block); - block->kw_list = vector_alloc_new(); - block->kw_hash = hash_alloc(); - return block; -} - - - - - -static void sched_block_free(sched_block_type * block) -{ - vector_free( block->kw_list ); - hash_free( block->kw_hash ); - free(block); -} - - - -static void sched_block_free__(void * block) -{ - sched_block_free( (sched_block_type *) block); -} - - - -static void sched_block_add_kw(sched_block_type * block, const sched_kw_type * kw) -{ - vector_append_ref(block->kw_list , kw ); - if (!hash_has_key( block->kw_hash , sched_kw_get_name( kw ))) - hash_insert_hash_owned_ref( block->kw_hash , sched_kw_get_name( kw ) , vector_alloc_new() , vector_free__); - - { - vector_type * kw_vector = hash_get( block->kw_hash , sched_kw_get_name( kw )); - vector_append_ref( kw_vector , kw ); - } -} - - -sched_kw_type * sched_block_iget_kw(sched_block_type * block, int i) -{ - return vector_iget( block->kw_list , i); -} - - - - - -static void sched_block_fprintf(const sched_block_type * block, FILE * stream) -{ - int i; - for (i=0; i < vector_get_size(block->kw_list); i++) { - const sched_kw_type * sched_kw = vector_iget_const( block->kw_list , i); - sched_kw_fprintf(sched_kw, stream); - } -} - - - -int sched_block_get_size(const sched_block_type * block) -{ - return vector_get_size(block->kw_list); -} - - - - - -static sched_kw_type * sched_block_get_last_kw_ref(sched_block_type * block) -{ - int last_index = vector_get_size( block->kw_list ) - 1; - return sched_block_iget_kw( block , last_index ); -} - - - -static void sched_file_add_block(sched_file_type * sched_file, sched_block_type * block) -{ - vector_append_owned_ref(sched_file->blocks , block , sched_block_free__); -} - - - -sched_block_type * sched_file_iget_block(const sched_file_type * sched_file, int i) -{ - return vector_iget(sched_file->blocks , i); -} - -/** - This is a fucking mess: - - block[0] start_time - start_time - block[1] start_time - time of first report, i.e. X0001 - block[2] X0001 - X0002 - .... - - The reason for this funny convention is to ensure one-to-one index - correspondance between the restart files and the sched_file blocks - (I think ...). -*/ - - - -static void sched_file_build_block_dates(sched_file_type * sched_file) -{ - int num_restart_files = sched_file_get_num_restart_files(sched_file); - time_t curr_time, new_time; - - if(num_restart_files < 1) - util_abort("%s: Error - empty sched_file - aborting.\n", __func__); - - /* Special case for block 0. */ - sched_block_type * sched_block = sched_file_iget_block(sched_file, 0); - sched_block->block_start_time = sched_file->start_time ; - sched_block->block_end_time = sched_file->start_time ; - - curr_time = sched_file->start_time; - for(int i=1; iblock_start_time = curr_time; - - sched_kw_type * timing_kw = sched_block_get_last_kw_ref(sched_block); - new_time = sched_kw_get_new_time(timing_kw, curr_time); - - if(curr_time > new_time) - util_abort("%s: Schedule file contains negative timesteps - aborting.\n",__func__); - - curr_time = new_time; - sched_block->block_end_time = curr_time; - } -} - - - - -/******************************************************************************/ - - - -static void sched_file_add_kw( sched_file_type * sched_file , const sched_kw_type * kw) { - vector_append_owned_ref( sched_file->kw_list , kw , sched_kw_free__); -} - - -static void sched_file_update_index( sched_file_type * sched_file ) { - int ikw; - - - /* By type index */ - { - if (sched_file->kw_list_by_type != NULL) - vector_free( sched_file->kw_list_by_type ); - sched_file->kw_list_by_type = vector_alloc_NULL_initialized( NUM_SCHED_KW_TYPES ); - for (ikw = 0; ikw < vector_get_size( sched_file->kw_list ); ikw++) { - const sched_kw_type * kw = vector_iget_const( sched_file->kw_list , ikw ); - sched_kw_type_enum type = sched_kw_get_type( kw ); - { - vector_type * tmp = vector_iget( sched_file->kw_list_by_type , type ); - - if (tmp == NULL) { - tmp = vector_alloc_new(); - vector_iset_owned_ref( sched_file->kw_list_by_type , type , tmp , vector_free__ ); - } - - vector_append_ref( tmp , kw ); - } - } - } - - - - /* Block based on restart number. */ - { - time_t current_time; - sched_block_type * current_block; - vector_clear( sched_file->blocks ); - - /* - Adding a pseudo block at the start which runs from the start of - time (i.e. EPOCH start 01/01/1970) to simulation start. - */ - current_block = sched_block_alloc_empty( 0 ); - current_block->block_start_time = sched_file->start_time;//-1; /* Need this funny node - hhmmmmmm */ - current_block->block_end_time = sched_file->start_time; - sched_file_add_block( sched_file , current_block ); - - current_block = sched_block_alloc_empty( 0 ); - current_block->block_start_time = sched_file->start_time; - current_time = sched_file->start_time; - - for (ikw = 0; ikw < vector_get_size( sched_file->kw_list ); ikw++) { - const sched_kw_type * kw = vector_iget_const( sched_file->kw_list , ikw ); - sched_kw_type_enum type = sched_kw_get_type( kw ); - { - sched_block_add_kw( current_block , kw ); - if(type == DATES || type == TSTEP || type == TIME) { - /** - Observe that when we enocunter a time-based keyword we do the following: - - 1. Finish the the current block by setting the end_time - field and add this block to the sched_file - structure. - - 2. Create a new block starting at current time. - - ------- - - Blocks are not actually added to the sched_file instance - before they are terminated with a DATES/TSTEP - keyword. This implies that keywords which come after the - last DATES/TSTEP keyword are lost. - */ - - current_time = sched_kw_get_new_time( kw , current_time ); - - /* Finishing off the current block, and adding it to the sched_file. */ - current_block->block_end_time = current_time; - sched_file_add_block( sched_file , current_block ); - - /* Creating a new block - not yet added to the sched_file. */ - current_block = sched_block_alloc_empty( vector_get_size( sched_file->blocks )); - current_block->block_start_time = current_time; - } - } - } - /* - Free the last block, which has not been added to the sched_file - object. - */ - sched_block_free( current_block ); - } -} - - - -void sched_file_add_fixed_length_kw( sched_file_type * sched_file , const char * kw , int length ) { - hash_insert_int( sched_file->fixed_length_table, kw , length ); -} - - - -static void sched_file_init_fixed_length( sched_file_type * sched_file ) { - sched_file_add_fixed_length_kw(sched_file , "NEXTSTEP" , 1); - sched_file_add_fixed_length_kw(sched_file , "RPTSCHED" , 1); - sched_file_add_fixed_length_kw(sched_file , "DRSDT" , 1); - sched_file_add_fixed_length_kw(sched_file , "SKIPREST" , 0); - sched_file_add_fixed_length_kw(sched_file , "NOECHO" , 0); - sched_file_add_fixed_length_kw(sched_file , "ECHO" , 0); - sched_file_add_fixed_length_kw(sched_file , "RPTRST" , 1); - sched_file_add_fixed_length_kw(sched_file , "TUNING" , 3); - sched_file_add_fixed_length_kw(sched_file , "WHISTCTL" , 1); - sched_file_add_fixed_length_kw(sched_file , "TIME" , 1); - sched_file_add_fixed_length_kw(sched_file , "VAPPARS" , 1); - sched_file_add_fixed_length_kw(sched_file , "NETBALAN" , 1); - sched_file_add_fixed_length_kw(sched_file , "WPAVE" , 1); - sched_file_add_fixed_length_kw(sched_file , "VFPTABL" , 1); - sched_file_add_fixed_length_kw(sched_file , "GUIDERAT" , 1); - sched_file_add_fixed_length_kw(sched_file , "MESSAGES" , 1); - sched_file_add_fixed_length_kw(sched_file , "LIFTOPT" , 1); -} - - -sched_file_type * sched_file_alloc(time_t start_time) -{ - sched_file_type * sched_file = util_malloc(sizeof * sched_file); - UTIL_TYPE_ID_INIT( sched_file , SCHED_FILE_TYPE_ID); - sched_file->kw_list = vector_alloc_new(); - sched_file->kw_list_by_type = NULL; - sched_file->blocks = vector_alloc_new(); - sched_file->files = stringlist_alloc_new(); - sched_file->start_time = start_time; - sched_file->fixed_length_table = hash_alloc(); - sched_file->hasEND = false; - sched_file_init_fixed_length( sched_file ); - { - char * fixed_length_file = getenv("SCHEDULE_FIXED_LENGTH"); - if ((fixed_length_file != NULL) && (util_entry_readable( fixed_length_file ))) { - FILE * stream = util_fopen(fixed_length_file , "r"); - char kw[32]; - int len; - bool OK = true; - - do { - if (fscanf(stream , "%s %d" , kw , &len) == 2) - sched_file_add_fixed_length_kw( sched_file , kw , len); - else - OK = false; - } while (OK); - fclose( stream); - } - } - return sched_file; -} - - -UTIL_SAFE_CAST_FUNCTION(sched_file , SCHED_FILE_TYPE_ID); - - -void sched_file_free(sched_file_type * sched_file) -{ - vector_free( sched_file->blocks ); - vector_free( sched_file->kw_list ); - if (sched_file->kw_list_by_type != NULL) - vector_free( sched_file->kw_list_by_type ); - - stringlist_free( sched_file->files ); - hash_free( sched_file->fixed_length_table ); - free(sched_file); -} - - -/** - This function will allocate a time_t_vector instance, which - contains all the time_t values for this schedule_file - starting - with the start_date. -*/ - -time_t_vector_type * sched_file_alloc_time_t_vector( const sched_file_type * sched_file ) { - time_t_vector_type * vector = time_t_vector_alloc(0,0); - int i; - time_t_vector_append( vector , sched_file->start_time ); - for (i=1; i < vector_get_size( sched_file->blocks ); i++) { - const sched_block_type * block = vector_iget_const( sched_file->blocks , i ); - time_t_vector_append( vector , block->block_end_time ); - } - return vector; -} - - -static stringlist_type * sched_file_tokenize( const char * filename ) { - stringlist_type * token_list; - basic_parser_type * parser = basic_parser_alloc(" \t" , /* Splitters */ - "\'\"" , /* Quoters */ - "\n" , /* Specials - splitters which will be kept. */ - "\r" , /* Delete set - these are just deleted. */ - "--" , /* Comment start */ - "\n"); /* Comment end */ - bool strip_quote_marks = false; - token_list = basic_parser_tokenize_file( parser , filename , strip_quote_marks ); - basic_parser_free( parser ); - - return token_list; -} - - -/** - This function parses 'further', i.e typically adding another - schedule file to the sched_file instance. -*/ - -void sched_file_parse_append(sched_file_type * sched_file , const char * filename) { - bool foundEND = false; - stringlist_type * token_list = sched_file_tokenize( filename ); - sched_kw_type * current_kw; - int token_index = 0; - do { - sched_util_skip_newline( token_list , &token_index ); - current_kw = sched_kw_token_alloc(token_list , &token_index , sched_file->fixed_length_table, &foundEND); - if (current_kw != NULL) { - sched_kw_type_enum type = sched_kw_get_type(current_kw); - if (type == DATES || type == TSTEP || type == TIME) { - int i , num_steps; - sched_kw_type ** sched_kw_dates = sched_kw_split_alloc_DATES(current_kw, &num_steps); - sched_kw_free(current_kw); - - for(i=0; ihasEND = true; - - stringlist_append_copy( sched_file->files , filename ); - sched_file_build_block_dates(sched_file); - sched_file_update_index( sched_file ); - stringlist_free( token_list ); -} - - -void sched_file_simple_parse( const char * filename , time_t start_time) { - stringlist_type * token_list = sched_file_tokenize( filename ); - const int num_tokens = stringlist_get_size( token_list ); - int token_index = 0; - do { - sched_kw_type_enum kw_type = sched_kw_type_from_string( stringlist_iget( token_list , token_index )); - if ((kw_type == DATES) || (kw_type == TSTEP)) { - - } - } while( token_index < num_tokens ); - - stringlist_free( token_list ); -} - - - -void sched_file_parse(sched_file_type * sched_file, const char * filename) -{ - /* - Add the first empty pseudo block - this runs from time -infty:start_date. - */ - sched_file_add_block(sched_file , sched_block_alloc_empty()); - sched_file_parse_append( sched_file , filename ); -} - - - -sched_file_type * sched_file_parse_alloc(const char * filename , time_t start_date) { - sched_file_type * sched_file = sched_file_alloc( start_date ); - sched_file_parse(sched_file , filename); - return sched_file; -} - - - -int sched_file_get_num_restart_files(const sched_file_type * sched_file) -{ - return vector_get_size(sched_file->blocks); -} - - - -static void sched_file_fprintf_i__(const sched_file_type * sched_file, int last_restart_file, const char * file , bool addEND) -{ - FILE * stream = util_fopen(file, "w"); - int num_restart_files = sched_file_get_num_restart_files(sched_file); - - - last_restart_file = util_int_min( last_restart_file , num_restart_files - 1); - - if (last_restart_file > num_restart_files) { - util_abort("%s: you asked for restart nr:%d - the last available restart nr is: %d \n",__func__ , last_restart_file , num_restart_files); - /* Must abort here because the calling scope is expecting to find last_restart_file. */ - } - - for(int i=0; i<= last_restart_file; i++) - { - const sched_block_type * sched_block = vector_iget_const( sched_file->blocks , i); - sched_block_fprintf(sched_block, stream); - } - - if (addEND) - fprintf(stream, "END\n"); - - fclose(stream); -} - - -void sched_file_fprintf_i(const sched_file_type * sched_file, int last_restart_file, const char * file) { - sched_file_fprintf_i__( sched_file , last_restart_file , file , true); -} - - -/* Writes the complete schedule file. */ -void sched_file_fprintf(const sched_file_type * sched_file, const char * file) -{ - int num_restart_files = sched_file_get_num_restart_files(sched_file); - sched_file_fprintf_i__( sched_file , num_restart_files - 1 , file , sched_file->hasEND); -} - - - - - -/* - const char * sched_file_get_filename(const sched_file_type * sched_file) { - return sched_file->filename; - } -*/ - - -int sched_file_get_restart_nr_from_time_t(const sched_file_type * sched_file, time_t time) -{ - int num_restart_files = sched_file_get_num_restart_files(sched_file); - for( int i=0; i time) { - int mday,year,month; - util_set_date_values_utc( time , &mday , &month , &year); - util_abort("%s: Date: %02d/%02d/%04d does not cooincide with any report time. Aborting.\n", __func__ , mday , month , year); - } else if (block_end_time == time) - return i; - } - - // If we are here, time did'nt correspond a restart file. Abort. - { - int mday,year,month; - util_set_date_values_utc( time , &mday , &month , &year); - util_abort("%s: Date: %02d/%02d/%04d does not cooincide with any report time. Aborting.\n", __func__ , mday , month , year); - } - return 0; -} - - -/** - This function finds the restart_nr for the a number of days after - simulation start. -*/ - -int sched_file_get_restart_nr_from_days(const sched_file_type * sched_file , double days) { - time_t time = sched_file_iget_block_start_time(sched_file, 0); - util_inplace_forward_days_utc( &time , days); - return sched_file_get_restart_nr_from_time_t(sched_file , time); -} - - - -time_t sched_file_iget_block_start_time(const sched_file_type * sched_file, int i) -{ - sched_block_type * block = sched_file_iget_block(sched_file, i); - return block->block_start_time; -} - - - -time_t sched_file_iget_block_end_time(const sched_file_type * sched_file, int i) -{ - sched_block_type * block = sched_file_iget_block(sched_file, i); - return block->block_end_time; -} - - -double sched_file_iget_block_start_days(const sched_file_type * sched_file, int i) -{ - sched_block_type * block = sched_file_iget_block(sched_file, i); - return util_difftime_days( sched_file->start_time , block->block_start_time ); -} - - -double sched_file_iget_block_end_days(const sched_file_type * sched_file, int i) -{ - sched_block_type * block = sched_file_iget_block(sched_file, i); - return util_difftime_days( sched_file->start_time , block->block_end_time ); -} - - -double sched_file_get_sim_days(const sched_file_type * sched_file , int report_step) { - return sched_file_iget_block_end_days( sched_file , report_step ); -} - - -time_t sched_file_get_sim_time(const sched_file_type * sched_file , int report_step) { - return sched_file_iget_block_end_time( sched_file , report_step ); -} - - -const char * sched_file_iget_filename( const sched_file_type * sched_file , int file_nr ) { - return stringlist_iget( sched_file->files , file_nr ); -} - - - - -int sched_file_iget_block_size(const sched_file_type * sched_file, int block_nr) -{ - sched_block_type * block = sched_file_iget_block(sched_file, block_nr); - return sched_block_get_size(block); -} - - - -sched_kw_type * sched_file_ijget_block_kw_ref(const sched_file_type * sched_file, int block_nr, int kw_nr) -{ - sched_block_type * block = sched_file_iget_block(sched_file, block_nr); - sched_kw_type * sched_kw = sched_block_iget_kw(block, kw_nr); - return sched_kw; -} - - - -static void __sched_file_summarize_line(int restart_nr , time_t start_time , time_t t , FILE * stream) { - double days = util_difftime( start_time , t , NULL , NULL , NULL , NULL) / (24 * 3600); - int mday , month , year; - - util_set_date_values_utc(t , &mday , &month , &year); - fprintf(stream , "%02d/%02d/%04d %7.1f days %04d \n", mday , month , year , days , restart_nr); -} - - - - -void sched_file_summarize(const sched_file_type * sched_file , FILE * stream) { - int len = sched_file_get_num_restart_files(sched_file); - time_t start_time = sched_file_iget_block_start_time(sched_file , 0); - for(int i=1; istart_time); - - for (ikw = 0; ikw < vector_get_size( src->kw_list ); ikw++) { - sched_kw_type * kw = vector_iget( src->kw_list , ikw ); - sched_file_add_kw( target , kw ); - } - - - { - int i; - for (i = 0; i < stringlist_get_size( src->files ); i++) { - if (deep_copy) - stringlist_append_copy( target->files , stringlist_iget(src->files , i)); - else - stringlist_append_ref( target->files , stringlist_iget(src->files , i)); - } - } - - sched_file_update_index( target ); - return target; -} - - -/*****************************************************************/ - - -static void sched_file_update_block(sched_block_type * block , - int restart_nr, - sched_kw_type_enum kw_type , - sched_file_callback_ftype * callback, - void * arg) { - int ikw; - for (ikw = 0; ikw < vector_get_size(block->kw_list); ikw++) { - sched_kw_type * sched_kw = sched_block_iget_kw( block , ikw); - if (sched_kw_get_type( sched_kw ) == kw_type) - callback( sched_kw_get_data( sched_kw) , restart_nr , arg); /* Calling back to 'user-space' to actually do the update. */ - } -} - - - -/** - This function is designed to facilitate 'user-space' update of the - keywords in the schedule file based on callbacks. The function is - called with two report steps, a type ID of the sched_kw type which - should be updated, and a function pointer which will be invoked on - all the relevant keywords. -*/ - - - -void sched_file_update_blocks(sched_file_type * sched_file, - int restart1 , - int restart2 , - sched_kw_type_enum kw_type, - sched_file_callback_ftype * callback, - void * callback_arg) { - - int restart_nr; - if (restart2 > sched_file_get_num_restart_files(sched_file)) - restart2 = sched_file_get_num_restart_files(sched_file) - 1; - - for (restart_nr = restart1; restart_nr <= restart2; restart_nr++) { - sched_block_type * sched_block = sched_file_iget_block( sched_file , restart_nr ); - sched_file_update_block( sched_block , restart_nr , kw_type , callback , callback_arg); - } -} - - - -/** - Update a complete schedule file by using callbacks to - 'user-space'. Say for instance you want to scale up the oilrate in - well P1. This could be achieved with the following code: - - -- This function is written by the user of the library - in a remote scope. - - void increase_orat_callback(void * void_kw , int restart_nr , void * arg) { - double scale_factor = *(( double * ) arg); - sched_kw_wconhist_type * kw = sched_kw_wconhist_safe_cast( void_kw ); - sched_kw_wconhist_scale_orat( wconhist_kw , "P1" , scale_factor); - } - - .... - .... - - sched_file_update(sched_file , WCONHIST , increase_orat_callback , &scale_factor); - - Observe the following about the callback: - - * The sched_kw input argument comes as a void pointer, and an - sched_kw_xxx_safe_cast() function should be used on input to - check. - - * The user-space level does *NOT* have access to the internals - of the sched_kw_xxxx type, so the library must provide - functions for the relevant state modifications. - - * The last argumnt (void * arg) - can of course be anything and - his brother. - -*/ - - -void sched_file_update(sched_file_type * sched_file, - sched_kw_type_enum kw_type, - sched_file_callback_ftype * callback, - void * callback_arg) { - - sched_file_update_blocks(sched_file , 1 , sched_file_get_num_restart_files(sched_file) - 1 , kw_type , callback , callback_arg); - -} - - - -/*****************************************************************/ -/** - This function will count the number of TSTEP / DATES keywords in a - schedule file, without actually internalizing the file. This - function 'should' be used for schedule files which we do not manage - to parse. -*/ - -int sched_file_step_count( const char * filename ) { - stringlist_type * token_list = sched_file_tokenize( filename ); - int token_index = 0; - int step_count = 0; - do { - const char * current_token = stringlist_iget( token_list , token_index ); - sched_kw_type_enum kw_type = sched_kw_type_from_string( current_token ); - - if (kw_type == DATES) { - sched_kw_type * sched_kw = sched_kw_token_alloc( token_list , &token_index , NULL , NULL); - const sched_kw_dates_type * dates_kw = sched_kw_get_data( sched_kw ); - step_count += sched_kw_dates_get_size( dates_kw ); - sched_kw_free( sched_kw ); - } else if (kw_type == TSTEP ) { - sched_kw_type * sched_kw = sched_kw_token_alloc( token_list , &token_index , NULL , NULL); - const sched_kw_tstep_type * tstep_kw = sched_kw_get_data( sched_kw ); - step_count += sched_kw_tstep_get_length( tstep_kw ); - sched_kw_free( sched_kw ); - } else - token_index++; - - } while ( token_index < stringlist_get_size( token_list )); - stringlist_free( token_list ); - return step_count; -} - - -/*****************************************************************/ - - -//void sched_file_merge( const char * filename , time_t start_date , time_t insert_date , bool append_string , const char * insert_string) { -// stringlist_type * token_list = sched_file_tokenize( filename ); -// int token_index = 0; -// int step_count = 0; -// bool has_date = false; -// -// do { -// time_t current_time = start_date; -// const char * current_token = stringlist_iget( token_list , token_index ); -// sched_kw_type_enum kw_type = sched_kw_type_from_string( current_token ); -// -// if ((kw_type == DATES) || (kw_type == TSTEP)) { -// int istep , num_step; -// sched_kw_type * sched_kw = sched_kw_token_alloc( token_list , &token_index , NULL); -// sched_kw_type ** split_kw = sched_kw_split_alloc_DATES( sched_kw , &num_step ); -// -// for (istep = 0; istep < num_step; istep++) { -// if (kw_type == DATES) { -// const sched_kw_dates_type * dates_kw = sched_kw_get_data( sched_kw ); -// current_time = sched_kw_dates_iget_date( dates_kw , 0 ); -// } -// if (current_time == insert_date) { -// /* -// We are currently looking at a DATES keyword EXACTLY at -// the date we should insert at. If append_string == false -// we let the new string go in immediately, otherwise we set -// has_date to true and continue one more time_step (then -// the current_time > insert_date test will kick in). -// */ -// has_date = true; -// if (!append_string) { -// -// } -// } -// } -// sched_kw_free( sched_kw ); -// -// } else -// token_index++; -// -// } while ( token_index < stringlist_get_size( token_list )); -// -//} -// - - -/*****************************************************************/ - - - -/** - Currently ONLY applicable to WCONHIST producers. - - -*/ - -bool sched_file_well_open( const sched_file_type * sched_file , - int restart_nr , - const char * well_name) { - - bool well_found = false; - bool well_open = false; - int block_nr = restart_nr; - while (!well_found && (block_nr >= 0)) { - sched_block_type * block = sched_file_iget_block( sched_file , block_nr ); - - if (hash_has_key( block->kw_hash , "WCONHIST")) { - const vector_type * wconhist_vector = hash_get( block->kw_hash , "WCONHIST"); - int i; - for (i=0; i < vector_get_size( wconhist_vector ); i++) { - const sched_kw_type * kw = vector_iget_const( wconhist_vector , i ); - if (sched_kw_has_well( kw , well_name )) { - well_found = true; - well_open = sched_kw_well_open( kw , well_name ); - } - } - } - - - if (hash_has_key( block->kw_hash , "WCONINJE")) { - const vector_type * wconinje_vector = hash_get( block->kw_hash , "WCONINJE"); - int i; - for (i=0; i < vector_get_size( wconinje_vector ); i++) { - const sched_kw_type * kw = vector_iget_const( wconinje_vector , i ); - if (sched_kw_has_well( kw , well_name )) { - well_found = true; - well_open = sched_kw_well_open( kw , well_name ); - } - } - } - - - - block_nr--; - } - return well_open; -} - - - - - -double sched_file_well_wconhist_rate( const sched_file_type * sched_file , - int restart_nr , - const char * well_name) { - double rate = -1; - bool well_found = false; - int block_nr = restart_nr; - - while (!well_found && (block_nr >= 0)) { - sched_block_type * block = sched_file_iget_block( sched_file , block_nr ); - - if (hash_has_key( block->kw_hash , "WCONHIST")) { - const vector_type * wconhist_vector = hash_get( block->kw_hash , "WCONHIST"); - int i; - for (i=0; i < vector_get_size( wconhist_vector ); i++) { - sched_kw_type * kw = vector_iget( wconhist_vector , i ); - if (sched_kw_has_well( kw , well_name )) { - well_found = true; - rate = sched_kw_wconhist_get_orat( sched_kw_get_data( kw ) , well_name ); - } - } - } - block_nr--; - } - return rate; -} - - - -double sched_file_well_wconinje_rate( const sched_file_type * sched_file , - int restart_nr , - const char * well_name) { - double rate = -1; - bool well_found = false; - int block_nr = restart_nr; - - while (!well_found && (block_nr >= 0)) { - sched_block_type * block = sched_file_iget_block( sched_file , block_nr ); - - if (hash_has_key( block->kw_hash , "WCONINJE")) { - const vector_type * wconhist_vector = hash_get( block->kw_hash , "WCONINJE"); - int i; - for (i=0; i < vector_get_size( wconhist_vector ); i++) { - sched_kw_type * kw = vector_iget( wconhist_vector , i ); - if (sched_kw_has_well( kw , well_name )) { - well_found = true; - rate = sched_kw_wconinje_get_surface_flow( sched_kw_get_data( kw ) , well_name ); - } - } - } - - block_nr--; - } - return rate; -} - diff --git a/ThirdParty/Ert/libsched/src/sched_history.c b/ThirdParty/Ert/libsched/src/sched_history.c deleted file mode 100644 index adb732ca85..0000000000 --- a/ThirdParty/Ert/libsched/src/sched_history.c +++ /dev/null @@ -1,756 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_history.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -struct sched_history_struct { - hash_type * well_history; /* Hash table of well_history_type instances. */ - hash_type * group_history; - time_t_vector_type * time; - hash_type * index; - char * sep_string; - bool_vector_type * historical; /* This is meant to flag whether a certain report_step is "historical", or - if it is in prediction_mode; changing back and forth between the two - modes seem quite broken behaviour, but I guess it is perfectly - legitimate. */ - int last_history_step; /* The last historical report_step (i.e. the total length is 1+ this value). */ -}; - - -#define FIELD_GROUP "FIELD" - - - - - -/*****************************************************************/ - -well_history_type * sched_history_get_well( const sched_history_type * sched_history , const char * well_name ); - - - -static void sched_history_install_well_index( sched_history_type * sched_history , well_index_type * well_index , const char ** var_list , const char * well_name) { - int index = 0; - char * gen_key = NULL; - const char * var = var_list[ index ]; - bool first = true; - - while ( var != NULL ) { - gen_key = util_realloc_sprintf( gen_key , "%s%s%s" , var , sched_history->sep_string , well_name ); - - if (first) { - first = false; - hash_insert_hash_owned_ref( sched_history->index , gen_key , well_index , well_index_free__); - } else - hash_insert_ref( sched_history->index , gen_key , well_index ); - - index++; - var = var_list[ index ]; - } - - if (first) - util_abort("%s: internal error - empty var_list \n",__func__); - free( gen_key ); -} - - - -static void sched_history_install_group_index( sched_history_type * sched_history , group_index_type * group_index , const char ** var_list , const char * group_name) { - int index = 0; - char * gen_key = NULL; - const char * var = var_list[ index ]; - bool first = true; - - while ( var != NULL ) { - gen_key = util_realloc_sprintf( gen_key , "%s%s%s" , var , sched_history->sep_string , group_name ); - - if (first) { - first = false; - hash_insert_hash_owned_ref( sched_history->index , gen_key , group_index , group_index_free__); - } else - hash_insert_ref( sched_history->index , gen_key , group_index ); - - index++; - var = var_list[ index ]; - } - - if (first) - util_abort("%s: internal error - empty var_list \n",__func__); - free( gen_key ); -} - - - - - -#define VAR_LIST(...) (const char *[]) { __VA_ARGS__ , NULL } - -void sched_history_install_index( sched_history_type * sched_history ) { - /*1: Installing well based keys like WOPRH. */ - { - hash_iter_type * well_iter = hash_iter_alloc( sched_history->well_history ); - while (!hash_iter_is_complete( well_iter )) { - const char * well_name = hash_iter_get_next_key( well_iter ); - const well_history_type * well = hash_get( sched_history->well_history , well_name ); - - /* WOPR */ - { - well_index_type * well_index = well_index_alloc( well_name , "WOPRH" , well , WCONHIST , wconhist_state_iget_WOPRH ); - sched_history_install_well_index( sched_history , well_index , VAR_LIST("WOPR" , "WOPRH") , well_name); - } - - - /* WGPR */ - { - well_index_type * well_index = well_index_alloc( well_name , "WGPRH" , well , WCONHIST , wconhist_state_iget_WGPRH ); - sched_history_install_well_index( sched_history , well_index , VAR_LIST("WGPR" , "WGPRH") , well_name); - } - - - /* WWPR */ - { - well_index_type * well_index = well_index_alloc( well_name , "WWPRH" , well , WCONHIST , wconhist_state_iget_WWPRH ); - sched_history_install_well_index( sched_history , well_index , VAR_LIST("WWPR" , "WWPRH") , well_name); - } - - - /* WWCT */ - { - well_index_type * well_index = well_index_alloc( well_name , "WWCTH" , well , WCONHIST , wconhist_state_iget_WWCTH ); - sched_history_install_well_index( sched_history , well_index , VAR_LIST("WWCT" , "WWCTH") , well_name); - } - - /* WGOR */ - { - well_index_type * well_index = well_index_alloc( well_name , "WGORH" , well , WCONHIST , wconhist_state_iget_WGORH ); - sched_history_install_well_index( sched_history , well_index , VAR_LIST("WGOR" , "WGORH") , well_name); - } - - /* WGPT */ - { - well_index_type * well_index = well_index_alloc( well_name , "WGPTH" , well , WCONHIST , wconhist_state_iget_WGPTH ); - sched_history_install_well_index( sched_history , well_index , VAR_LIST("WGPT" , "WGPTH") , well_name); - } - - /* WOPT */ - { - well_index_type * well_index = well_index_alloc( well_name , "WOPTH" , well , WCONHIST , wconhist_state_iget_WOPTH ); - sched_history_install_well_index( sched_history , well_index , VAR_LIST("WOPT" , "WOPTH") , well_name); - } - - /* WWPT */ - { - well_index_type * well_index = well_index_alloc( well_name , "WWPTH" , well , WCONHIST , wconhist_state_iget_WWPTH ); - sched_history_install_well_index( sched_history , well_index , VAR_LIST("WWPT" , "WWPTH") , well_name); - } - - /* STAT */ - { - well_index_type * well_index = well_index_alloc( well_name , "STAT" , well , WCONHIST , wconhist_state_iget_STAT ); - sched_history_install_well_index( sched_history , well_index , VAR_LIST("STAT" ) , well_name); - } - - - /* WWIRH - this can be got from _either_ the WCONINJH keyowrord - or the WCONINJE keyword (provided the latter is in rate - controlled mode. ) */ - { - well_index_type * well_index = well_index_alloc( well_name , "WWIRH" , well , WCONINJH , wconinjh_state_iget_WWIRH ); /* The first type */ - well_index_add_type( well_index , WCONINJE , wconinje_state_iget_WWIRH ); /* The second type */ - sched_history_install_well_index( sched_history , well_index , VAR_LIST("WWIRH" , "WWIR") , well_name); - } - - /* WGIRH - this can be got from _either_ the WCONINJH keyowrord - or the WCONINJE keyword (provided the latter is in rate - controlled mode. ) */ - { - well_index_type * well_index = well_index_alloc( well_name , "WGIRH" , well , WCONINJH , wconinjh_state_iget_WGIRH ); /* The first type */ - well_index_add_type( well_index , WCONINJE , wconinje_state_iget_WGIRH ); /* The second type */ - sched_history_install_well_index( sched_history , well_index , VAR_LIST("WGIRH" , "WGIR") , well_name); - } - } - hash_iter_free( well_iter ); - } - - - - /*2: Installing group based indices */ - { - hash_iter_type * group_iter = hash_iter_alloc( sched_history->group_history ); - while (!hash_iter_is_complete( group_iter )) { - const char * group_name = hash_iter_get_next_key( group_iter ); - const group_history_type * group = hash_get( sched_history->group_history , group_name ); - - /* GOPR */ - { - group_index_type * group_index = group_index_alloc( group_name , "GOPRH" , group , group_history_iget_GOPRH ); - sched_history_install_group_index( sched_history , group_index , VAR_LIST("GOPR" , "GOPRH") , group_name); - } - - /* GGPR */ - { - group_index_type * group_index = group_index_alloc( group_name , "GGPRH" , group , group_history_iget_GGPRH ); - sched_history_install_group_index( sched_history , group_index , VAR_LIST("GGPR" , "GGPRH") , group_name); - } - - /* GWPR */ - { - group_index_type * group_index = group_index_alloc( group_name , "GWPRH" , group , group_history_iget_GWPRH ); - sched_history_install_group_index( sched_history , group_index , VAR_LIST("GWPR" , "GWPRH") , group_name); - } - - /* GWCT */ - { - group_index_type * group_index = group_index_alloc( group_name , "GWCTH" , group , group_history_iget_GWCTH ); - sched_history_install_group_index( sched_history , group_index , VAR_LIST("GWCT" , "GWCTH") , group_name); - } - - /* GGOR */ - { - group_index_type * group_index = group_index_alloc( group_name , "GGORH" , group , group_history_iget_GGORH ); - sched_history_install_group_index( sched_history , group_index , VAR_LIST("GGOR" , "GGORH") , group_name); - } - - /* GOPT */ - { - group_index_type * group_index = group_index_alloc( group_name , "GOPTH" , group , group_history_iget_GOPTH ); - sched_history_install_group_index( sched_history , group_index , VAR_LIST("GOPT" , "GOPTH") , group_name); - } - - /* GGPT */ - { - group_index_type * group_index = group_index_alloc( group_name , "GGPTH" , group , group_history_iget_GGPTH ); - sched_history_install_group_index( sched_history , group_index , VAR_LIST("GGPT" , "GGPTH") , group_name); - } - - /* GWPT */ - { - group_index_type * group_index = group_index_alloc( group_name , "GWPTH" , group , group_history_iget_GWPTH ); - sched_history_install_group_index( sched_history , group_index , VAR_LIST("GWPT" , "GWPTH") , group_name); - } - } - hash_iter_free( group_iter ); - } - - - /*3: Installing field based indices (which is just an alias to the FIELD group); */ - { - const group_history_type * group = hash_get( sched_history->group_history , FIELD_GROUP ); - const char * group_name = FIELD_GROUP; - - /* FWPRH */ - { - group_index_type * group_index = group_index_alloc( group_name , "GWPRH" , group , group_history_iget_GWPRH ); - hash_insert_hash_owned_ref( sched_history->index , "FWPRH" , group_index , group_index_free__ ); - hash_insert_ref( sched_history->index , "FWPR" , group_index); - } - - /* FOPRH */ - { - group_index_type * group_index = group_index_alloc( group_name , "GOPRH" , group , group_history_iget_GOPRH ); - hash_insert_hash_owned_ref( sched_history->index , "FOPRH" , group_index , group_index_free__ ); - hash_insert_ref( sched_history->index , "FOPR" , group_index); - } - - /* FGPRH */ - { - group_index_type * group_index = group_index_alloc( group_name , "GGPRH" , group , group_history_iget_GGPRH ); - hash_insert_hash_owned_ref( sched_history->index , "FGPRH" , group_index , group_index_free__ ); - hash_insert_ref( sched_history->index , "FGPR" , group_index); - } - - /* FWPTH */ - { - group_index_type * group_index = group_index_alloc( group_name , "GWPTH" , group , group_history_iget_GWPTH ); - hash_insert_hash_owned_ref( sched_history->index , "FWPTH" , group_index , group_index_free__ ); - hash_insert_ref( sched_history->index , "FWPT" , group_index); - } - - /* FOPTH */ - { - group_index_type * group_index = group_index_alloc( group_name , "GOPTH" , group , group_history_iget_GOPTH ); - hash_insert_hash_owned_ref( sched_history->index , "FOPTH" , group_index , group_index_free__ ); - hash_insert_ref( sched_history->index , "FOPT" , group_index); - } - - /* FGPTH */ - { - group_index_type * group_index = group_index_alloc( group_name , "GGPTH" , group , group_history_iget_GGPTH ); - hash_insert_hash_owned_ref( sched_history->index , "FGPTH" , group_index , group_index_free__ ); - hash_insert_ref( sched_history->index , "FGPT" , group_index); - } - - /* FGORH */ - { - group_index_type * group_index = group_index_alloc( group_name , "GGORH" , group , group_history_iget_GGORH ); - hash_insert_hash_owned_ref( sched_history->index , "FGORH" , group_index , group_index_free__ ); - hash_insert_ref( sched_history->index , "FGOR" , group_index); - } - - /* FWCTH */ - { - group_index_type * group_index = group_index_alloc( group_name , "GWCTH" , group , group_history_iget_GWCTH ); - hash_insert_hash_owned_ref( sched_history->index , "FWCTH" , group_index , group_index_free__ ); - hash_insert_ref( sched_history->index , "FWCT" , group_index); - } - } -} -#undef VAR_LIST - - - - -double sched_history_iget( const sched_history_type * sched_history , const char * key , int report_step) { - void * index = hash_get( sched_history->index , key ); - if (!bool_vector_safe_iget( sched_history->historical , report_step )) - fprintf(stderr,"** Warning - report step:%d is in the prediction phase - can NOT ask for historical data! \n",report_step); - - if (well_index_is_instance( index )) - return well_history_iget( index , report_step ); - else if (group_index_is_instance( index )) - return group_history_iget( index , report_step ); - else { - util_abort("%s: can not determine internal type of:%s - fatal internal error\n", __func__ , key); - return 0; - } -} - - - - - - -void sched_history_init_vector( const sched_history_type * sched_history , const char * key , double_vector_type * value) { - const bool * historical = bool_vector_get_ptr( sched_history->historical ); - double_vector_reset( value ); - for (int i=0; i < time_t_vector_size( sched_history->time ); i++) { - if (historical[i]) - double_vector_iset( value , i , sched_history_iget( sched_history , key , i)); - else - break; - } -} - - - -static void sched_history_realloc( sched_history_type * sched_history ) { - if (sched_history->well_history != NULL) - hash_free( sched_history->well_history ); - sched_history->well_history = hash_alloc(); - - if (sched_history->group_history != NULL) - hash_free( sched_history->group_history ); - sched_history->group_history = hash_alloc(); - - if (sched_history->historical != NULL) - bool_vector_free( sched_history->historical ); - sched_history->historical = bool_vector_alloc( 0 , true ); - - if (sched_history->time != NULL) - time_t_vector_free(sched_history->time); - sched_history->time = time_t_vector_alloc( 0 , 0 ); - sched_history->last_history_step = 0; -} - - - -time_t sched_history_iget_time_t( const sched_history_type * sched_history , int restart_nr ) { - return time_t_vector_iget( sched_history->time , restart_nr ); -} - - -sched_history_type * sched_history_alloc( const char * sep_string ) { - sched_history_type * sched_history = util_malloc( sizeof * sched_history ); - - sched_history->well_history = NULL; - sched_history->group_history = NULL; - sched_history->time = NULL; - sched_history->historical = NULL; - sched_history->index = hash_alloc(); - sched_history->sep_string = util_alloc_string_copy( sep_string ); - sched_history_realloc( sched_history ); - - return sched_history; -} - - - -void sched_history_free( sched_history_type * sched_history ) { - time_t_vector_free( sched_history->time ); - bool_vector_free( sched_history->historical ); - hash_free( sched_history->well_history ); - hash_free( sched_history->group_history ); - hash_free( sched_history->index ); - free( sched_history->sep_string ); - free( sched_history ); -} - - - -well_history_type * sched_history_get_well( const sched_history_type * sched_history , const char * well_name ) { - return hash_get( sched_history->well_history , well_name ); -} - - -group_history_type * sched_history_get_group( const sched_history_type * sched_history , const char * group_name ) { - return hash_get( sched_history->group_history , group_name ); -} - - - -static void sched_history_add_wells( sched_history_type * sched_history , const sched_kw_welspecs_type * welspecs , const stringlist_type * wells) { - for (int iw = 0; iw < stringlist_get_size( wells ); iw++) { - const char * well = stringlist_iget( wells , iw ); - if (!hash_has_key( sched_history->well_history , well)) - hash_insert_hash_owned_ref( sched_history->well_history , well , well_history_alloc( well , sched_history->time ), well_history_free__ ); - - /* Could possibly extract more information from the welspecs - keyword and update well_history object here, but it does not - seem to contain any more interesting info??? - */ - - } -} - - -static void sched_history_add_group( sched_history_type * sched_history , group_history_type * new_group, group_history_type * parent_group , int report_step ) { - hash_insert_hash_owned_ref( sched_history->group_history , group_history_get_name( new_group ) , new_group , group_history_free__ ); - if (parent_group == NULL) - parent_group = sched_history_get_group( sched_history , FIELD_GROUP ); - - group_history_add_child( parent_group , new_group , group_history_get_name( new_group ) , report_step ); -} - - -/** - Because the FIELD group is added without any parent; it does not - use the standard sched_history_group_add() function. */ - -static void sched_history_add_FIELD_group( sched_history_type * sched_history ) { - group_history_type * field_group = group_history_alloc( FIELD_GROUP , sched_history->time , 0 ); - hash_insert_hash_owned_ref( sched_history->group_history , FIELD_GROUP , field_group , group_history_free__ ); -} - - -void sched_history_fprintf_group_structure( sched_history_type * sched_history , int report_step ) { - group_history_type * field_group = sched_history_get_group( sched_history , FIELD_GROUP ); - group_history_fprintf( field_group , report_step , true ,stdout ); -} - - -static void sched_history_add_groups_gruptree( sched_history_type * sched_history , const sched_kw_gruptree_type * gruptree , int report_step , const stringlist_type * child_groups , const stringlist_type * parent_groups) { - for (int i = 0; i < stringlist_get_size( child_groups ); i++) { - const char * parent_group_name = stringlist_iget( parent_groups , i ); - const char * child_group_name = stringlist_iget( child_groups , i ); - group_history_type * parent_group; - group_history_type * child_group; - - - if (!hash_has_key( sched_history->group_history , parent_group_name )) - sched_history_add_group( sched_history , group_history_alloc( parent_group_name , sched_history->time , report_step) , NULL , report_step ); - parent_group = sched_history_get_group( sched_history , parent_group_name ); - - if (!hash_has_key( sched_history->group_history , child_group_name )) - sched_history_add_group( sched_history , group_history_alloc( child_group_name , sched_history->time , report_step ) , parent_group , report_step ); - child_group = sched_history_get_group( sched_history , child_group_name ); - - group_history_add_child( parent_group , child_group , child_group_name , report_step); - } -} - - -int sched_history_get_last_history( const sched_history_type * sched_history ) { - return sched_history->last_history_step; -} - - -static void sched_history_set_historical( sched_history_type * sched_history , int report_step ) { - bool_vector_iset_default( sched_history->historical , report_step , true ); - sched_history->last_history_step = report_step; -} - - -/** - When new wells are added with the WELSPECS keyword their parent - group is implicitly introduced as the second argument of the - WELSPEC keyword, in addition the GRUPTREE keyword will also - implicitly introduce groups. - - This functions creates group_history objects for all the groups - introduced by the WELSPECS keyword, and attach wells to them (the - input parameters @wells and @groups come driectly from the welspecs - keyword, via the sched_kw_welspecs_init_child_parent_list() - function. -*/ - - -static void sched_history_add_groups_welspecs( sched_history_type * sched_history , const sched_kw_welspecs_type * welspecs , int report_step , const stringlist_type * wells, const stringlist_type * groups) { - for (int i = 0; i < stringlist_get_size( groups ); i++) { - const char * group_name = stringlist_iget( groups , i ); - const char * well_name = stringlist_iget( wells , i ); - well_history_type * well = sched_history_get_well( sched_history , well_name ); - group_history_type * group; - if (!hash_has_key( sched_history->group_history , group_name )) - sched_history_add_group( sched_history , group_history_alloc( group_name , sched_history->time , report_step ) , NULL , report_step ); - - group = sched_history_get_group( sched_history , group_name ); - group_history_add_child( group , well , well_name , report_step); - } -} - - - - -void sched_history_update( sched_history_type * sched_history, const sched_file_type * sched_file ) { - - sched_history_realloc( sched_history ); - sched_history_add_FIELD_group( sched_history ); - { - int block_nr; - stringlist_type * well_list = stringlist_alloc_new(); - stringlist_type * group_list = stringlist_alloc_new(); - - for (block_nr = 0; block_nr < sched_file_get_num_restart_files( sched_file ); block_nr++) { - sched_block_type * block = sched_file_iget_block( sched_file , block_nr ); - int kw_nr; - int report_step = block_nr; - - time_t_vector_iset( sched_history->time , block_nr , sched_file_iget_block_end_time( sched_file , block_nr)); - for (kw_nr = 0; kw_nr < sched_block_get_size( block ); kw_nr++) { - sched_kw_type * kw = sched_block_iget_kw( block , kw_nr ); - sched_kw_type_enum kw_type = sched_kw_get_type( kw ); - - switch( kw_type ) { - case(WCONHIST): - { - const sched_kw_wconhist_type * wconhist = sched_kw_get_data( kw ); - sched_kw_wconhist_init_well_list( wconhist , well_list ); - int iw; - for (iw = 0; iw < stringlist_get_size( well_list ); iw++) { - const char * well_name = stringlist_iget( well_list , iw ); - well_history_type * well_history = sched_history_get_well( sched_history , well_name ); - well_history_add_keyword( well_history , kw , report_step ); - } - } - sched_history_set_historical( sched_history , block_nr ); - break; - case(WCONPROD): /* This is only added to turn the well OFF from WCONHIST behaviour. It is currently not - possible to query the well for anything when it is in WCONPROD state. */ - - { - const sched_kw_wconprod_type * wconprod = sched_kw_get_data( kw ); - sched_kw_wconprod_init_well_list( wconprod , well_list ); - int iw; - for (iw = 0; iw < stringlist_get_size( well_list ); iw++) { - const char * well_name = stringlist_iget( well_list , iw ); - well_history_type * well_history = sched_history_get_well( sched_history , well_name ); - well_history_add_keyword( well_history , kw , report_step); - } - } - bool_vector_iset_default( sched_history->historical , block_nr , false ); - break; - case(WCONINJE): - { - const sched_kw_wconinje_type * wconinje = sched_kw_get_data( kw ); - sched_kw_wconinje_init_well_list( wconinje , well_list ); - int iw; - for (iw = 0; iw < stringlist_get_size( well_list ); iw++) { - const char * well_name = stringlist_iget( well_list , iw ); - well_history_type * well_history = sched_history_get_well( sched_history , well_name ); - well_history_add_keyword( well_history , kw , report_step); - } - if (sched_kw_wconinje_historical( wconinje )) - sched_history_set_historical( sched_history , block_nr ); - } - break; - case(WCONINJH): - /* ... */ - sched_history_set_historical( sched_history , block_nr ); - break; - case(WELSPECS): - { - const sched_kw_welspecs_type * welspecs = sched_kw_get_data( kw ); - sched_kw_welspecs_init_child_parent_list( welspecs , well_list , group_list ); - sched_history_add_wells( sched_history , welspecs , well_list ); - sched_history_add_groups_welspecs( sched_history , welspecs , report_step , well_list , group_list ); - for (int iw = 0; iw < stringlist_get_size( well_list ); iw++) { - const char * well_name = stringlist_iget( well_list , iw ); - well_history_type * well_history = sched_history_get_well( sched_history , well_name ); - well_history_add_keyword( well_history , kw , report_step); - } - } - break; - case(GRUPTREE): - { - const sched_kw_gruptree_type * gruptree = sched_kw_get_data( kw ); - stringlist_type * parent_group_list = group_list; - stringlist_type * child_group_list = well_list; - - sched_kw_gruptree_init_child_parent_list( gruptree , child_group_list , parent_group_list ); - sched_history_add_groups_gruptree( sched_history , gruptree , report_step , well_list , group_list ); - } - break; - default: - /* */ - break; - } - } - } - stringlist_free( well_list ); - stringlist_free( group_list ); - } - sched_history_install_index( sched_history ); -} - - -const char * sched_history_get_join_string( const sched_history_type * sched_history ) { - return sched_history->sep_string; -} - - -bool sched_history_has_well( const sched_history_type * sched_history , const char * well_name) { - return hash_has_key( sched_history->well_history , well_name ); -} - -bool sched_history_has_group( const sched_history_type * sched_history , const char * group_name) { - return hash_has_key( sched_history->group_history , group_name ); -} - -bool sched_history_has_key( const sched_history_type * sched_history , const char * key) { - return hash_has_key( sched_history->index , key ); -} - -bool sched_history_well_open( const sched_history_type * sched_history , const char * well_name , int report_step ) { - const well_history_type * well_history = sched_history_get_well( sched_history , well_name ); - return well_history_well_open( well_history , report_step ); -} - - - -/** - Will take a general key as input, and return the result of - schd_history_well_open() or sched_history_group_exists() - respectively - depending on the type key refers to. -*/ - -bool sched_history_open( const sched_history_type * sched_history , const char * key , int report_step) { - if(hash_has_key(sched_history->index, key)) { - const void * index = hash_get(sched_history->index , key ); - if (well_index_is_instance( index )) { - const well_index_type * well_index = well_index_safe_cast_const( index ); - const char * well_name = well_index_get_name( well_index ); - return sched_history_well_open( sched_history , well_name , report_step); - } else if (group_index_is_instance( index )) { - const group_index_type * group_index = group_index_safe_cast_const( index ); - const char * group_name = group_index_get_name( group_index ); - return sched_history_group_exists( sched_history , group_name , report_step); - } else { - util_abort("%s: - hmm internal fuckup \n",__func__); - return false; - } - } - return false; -} - - - - - -/** - This function checks if the group @group exists (i.e. has been - defined with the GRUPTREE or WELSPECS keyword) at the report_step - @report_step; if the group does not exist in the schedule file - _AT_ALL_ - the function will fail HARD. Use the function - sched_history_has_group() to check if a group is in the schedule - file at all. -*/ - - -bool sched_history_group_exists( const sched_history_type * sched_history , const char * group_name , int report_step ) { - const group_history_type * group_history = sched_history_get_group( sched_history , group_name ); - return group_history_group_exists( group_history , report_step ); -} - - - -void sched_history_fprintf_index_keys( const sched_history_type * sched_history , FILE * stream ) { - hash_iter_type * iter = hash_iter_alloc( sched_history->index ); - int c = 0; - while (!hash_iter_is_complete( iter )) { - fprintf(stream , "%18s" , hash_iter_get_next_key( iter )); - c += 1; - if ((c % 6) == 0) - fprintf(stream , "\n"); - } - hash_iter_free( iter ); -} - - - - -void sched_history_fprintf( const sched_history_type * sched_history , const stringlist_type * key_list , FILE * stream) { - int step = 1; - time_t start_time = time_t_vector_iget( sched_history->time , 0); - int total_length = bool_vector_size( sched_history->historical ); - while (true) { - if (bool_vector_safe_iget( sched_history->historical , step)) { - { - int mday,month,year; - time_t t = time_t_vector_iget( sched_history->time , step ); - double days = (t - start_time) * 1.0 / 86400; - util_set_date_values_utc( t , &mday , &month , &year); - //fprintf(stream , "%02d-%02d-%4d " , mday , month , year ); - fprintf(stream , " %5.0f " , days); - } - - for (int ikey =0; ikey < stringlist_get_size( key_list ); ikey++) - fprintf(stream , "%16.3f " , sched_history_iget( sched_history , stringlist_iget( key_list , ikey) , step)); - - fprintf( stream, "\n"); - } else - break; // We have completed the historical period - and switched to prediction - step++; - - if (step == total_length) - break; - } -} - - diff --git a/ThirdParty/Ert/libsched/src/sched_kw.c b/ThirdParty/Ert/libsched/src/sched_kw.c deleted file mode 100644 index 8ca0a9c182..0000000000 --- a/ThirdParty/Ert/libsched/src/sched_kw.c +++ /dev/null @@ -1,564 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_kw.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -/* - The structure sched_kw_type is used for internalization - of arbitrary keywords in an ECLIPSE schedule file/section. - - Two structs are defined in this file: - - 1. The sched_kw_type, which can be accessed externaly - through various interface functions. - 2. The data_handlers_type, which provides an abstraction - for the data_handling of the various keywords. This - is for internal use only. - - Keywords from the ECLIPSE schedule are divided into three - different groups: - - 1. Fully internalized keywords, e.g. GRUPTREE. - Functions implementing the data_handlers and - more for these keywords are found in separate - files, e.g. sched_kw_gruptree.c. - - 2. Keywords which are known to have a fixed number - of records, but not having a full internal - representation. The number of records for these - keywords are specified in the function - get_fixed_record_length in the file - sched_kw_untyped.c - - 3. Keywords which are not implemented and have a - variable record length. These are handled - automatically by sched_kw_untyped.c. - -*/ - -typedef void * (data_token_alloc_proto) ( const stringlist_type * , int * ); -typedef void (data_free_proto) ( void *); -typedef void (data_fprintf_proto) ( const void *, FILE *); -typedef void * (alloc_copy_proto) ( const void *); - - -struct data_handlers_struct { - data_token_alloc_proto * token_alloc; - data_free_proto * free; - data_fprintf_proto * fprintf; - alloc_copy_proto * copyc; -}; - - -struct sched_kw_struct { - char * kw_name; - sched_kw_type_enum type; - int restart_nr; /* The block nr owning this instance. */ - - - /* Function pointers to work on the data pointer. */ - data_token_alloc_proto * alloc; - data_free_proto * free; - data_fprintf_proto * fprintf; - alloc_copy_proto * copyc; - - void * data; /* A void point pointer to a detailed implementation - i.e. sched_kw_wconhist. */ -}; - - - - - - - - - -/*****************************************************************/ - -/** - Nothing like a little manual inheritance.... -*/ - -static sched_kw_type * sched_kw_alloc_empty( const char * kw_name ) { - sched_kw_type * kw = util_malloc(sizeof * kw); - kw->kw_name = util_alloc_string_copy( kw_name ); - kw->type = sched_kw_type_from_string( kw_name ); - - switch( kw->type ) { - case(WCONHIST): - kw->alloc = sched_kw_wconhist_alloc__; - kw->free = sched_kw_wconhist_free__; - kw->fprintf = sched_kw_wconhist_fprintf__; - kw->copyc = sched_kw_wconhist_copyc__; - break; - case(DATES): - kw->alloc = sched_kw_dates_alloc__; - kw->free = sched_kw_dates_free__; - kw->fprintf = sched_kw_dates_fprintf__; - kw->copyc = sched_kw_dates_copyc__; - break; - case(TSTEP): - kw->alloc = sched_kw_tstep_alloc__; - kw->free = sched_kw_tstep_free__; - kw->fprintf = sched_kw_tstep_fprintf__; - kw->copyc = sched_kw_tstep_copyc__; - break; - case(COMPDAT): - kw->alloc = sched_kw_compdat_alloc__; - kw->free = sched_kw_compdat_free__; - kw->fprintf = sched_kw_compdat_fprintf__; - kw->copyc = sched_kw_compdat_copyc__; - break; - case(WELSPECS): - kw->alloc = sched_kw_welspecs_alloc__; - kw->free = sched_kw_welspecs_free__; - kw->fprintf = sched_kw_welspecs_fprintf__; - kw->copyc = sched_kw_welspecs_copyc__; - break; - case(GRUPTREE): - kw->alloc = sched_kw_gruptree_alloc__; - kw->free = sched_kw_gruptree_free__; - kw->fprintf = sched_kw_gruptree_fprintf__; - kw->copyc = sched_kw_gruptree_copyc__; - break; - case(INCLUDE): - kw->alloc = sched_kw_include_alloc__; - kw->free = sched_kw_include_free__; - kw->fprintf = sched_kw_include_fprintf__; - kw->copyc = sched_kw_include_copyc__; - break; - case(UNTYPED): - /** - Observe that the untyped keyword uses a custom allocator - function, because it needs to get the keyword length as extra - input. - */ - kw->alloc = NULL; - kw->free = sched_kw_untyped_free__; - kw->fprintf = sched_kw_untyped_fprintf__; - kw->copyc = sched_kw_untyped_copyc__; - break; - case(WCONINJ): - kw->alloc = sched_kw_wconinj_alloc__; - kw->free = sched_kw_wconinj_free__; - kw->fprintf = sched_kw_wconinj_fprintf__; - kw->copyc = sched_kw_wconinj_copyc__; - break; - case(WCONINJE): - kw->alloc = sched_kw_wconinje_alloc__; - kw->free = sched_kw_wconinje_free__; - kw->fprintf = sched_kw_wconinje_fprintf__; - kw->copyc = sched_kw_wconinje_copyc__; - break; - case(WCONINJH): - kw->alloc = sched_kw_wconinjh_alloc__; - kw->free = sched_kw_wconinjh_free__; - kw->fprintf = sched_kw_wconinjh_fprintf__; - kw->copyc = sched_kw_wconinjh_copyc__; - break; - case(WCONPROD): - kw->alloc = sched_kw_wconprod_alloc__; - kw->free = sched_kw_wconprod_free__; - kw->fprintf = sched_kw_wconprod_fprintf__; - kw->copyc = sched_kw_wconprod_copyc__; - break; - default: - util_abort("%s: unrecognized type:%d \n",__func__ , kw->type ); - } - return kw; -} - - - - -/* - This tries to check if kw_name is a valid keyword in an ECLIPSE - schedule file. It is essentially based on checking that there are - not more argeuments on the line: - - OK: - ------------------- - RPTSCHED - arg1 arg2 arg2 .... - - - Invalid: - ------------------- - RPTSCHED arg1 arg2 arg3 ... - - Quite naive .... -*/ -static void sched_kw_name_assert(const char * kw_name , FILE * stream) -{ - if(kw_name == NULL) { - fprintf(stderr,"** Parsing SCHEDULE file line-nr: %d \n",util_get_current_linenr(stream)); - util_abort("%s: Internal error - trying to dereference NULL pointer.\n",__func__); - } - - { - bool valid_kw = true; - for (int i = 0; i < strlen(kw_name); i++) - if (isspace(kw_name[i])) - valid_kw = false; - - if (!valid_kw) { - if (stream != NULL) - fprintf(stderr,"** Parsing SCHEDULE file line-nr: %d \n",util_get_current_linenr(stream)); - util_abort("%s: \"%s\" is not a valid schedule kw - aborting.\n",__func__ , kw_name); - } - } -} - - - - -static sched_kw_type ** sched_kw_tstep_split_alloc(const sched_kw_type * sched_kw, int * num_steps) -{ - *num_steps = sched_kw_tstep_get_size(sched_kw->data); - sched_kw_type ** sched_kw_tsteps = util_malloc(*num_steps * sizeof * sched_kw_tsteps); - - for(int i=0; i<*num_steps; i++) { - sched_kw_tsteps[i] = sched_kw_alloc_empty( "TSTEP" ); - double step = sched_kw_tstep_iget_step((const sched_kw_tstep_type *) sched_kw->data, i); - sched_kw_tsteps[i]->data = sched_kw_tstep_alloc_from_double(step); - } - - return sched_kw_tsteps; -} - - - -static sched_kw_type ** sched_kw_dates_split_alloc(const sched_kw_type * sched_kw, int * num_steps) -{ - *num_steps = sched_kw_dates_get_size(sched_kw->data); - sched_kw_type ** sched_kw_dates = util_malloc(*num_steps * sizeof * sched_kw_dates); - - for(int i=0; i<*num_steps; i++) { - sched_kw_dates[i] = sched_kw_alloc_empty( "DATES" ); - time_t date = sched_kw_dates_iget_date((const sched_kw_dates_type *) sched_kw->data, i); - sched_kw_dates[i]->data = sched_kw_dates_alloc_from_time_t(date); - } - return sched_kw_dates; -} -/*****************************************************************/ - - - - - -const char * sched_kw_get_type_name( const sched_kw_type * sched_kw ) { - return sched_kw_type_name( sched_kw->type ); -} - - -sched_kw_type_enum sched_kw_get_type(const sched_kw_type * sched_kw) -{ - return sched_kw->type; -} - - -static void sched_kw_alloc_data( sched_kw_type * kw , const stringlist_type * token_list , int * token_index , hash_type * fixed_length_table) { - if (kw->type == UNTYPED) { - int rec_len = -1; - if (hash_has_key( fixed_length_table , kw->kw_name )) - rec_len = hash_get_int( fixed_length_table , kw->kw_name ); - kw->data = sched_kw_untyped_alloc( token_list , token_index , rec_len ); - } else - kw->data = kw->alloc( token_list , token_index ); -} - - -sched_kw_type * sched_kw_token_alloc(const stringlist_type * token_list, int * token_index, hash_type * fixed_length_table, bool * foundEND) { - if (*token_index >= stringlist_get_size( token_list )) - return NULL; - else { - const char * kw_name = stringlist_iget( token_list , *token_index ); - (*token_index) += 1; - sched_kw_name_assert(kw_name , NULL); - if (strcmp(kw_name,"END") == 0) { - if (foundEND != NULL) - *foundEND = true; - - return NULL; - } else { - sched_kw_type * sched_kw = sched_kw_alloc_empty( kw_name ); - sched_kw->restart_nr = -1; - - sched_util_skip_newline( token_list , token_index ); - sched_kw_alloc_data( sched_kw , token_list , token_index , fixed_length_table); - - return sched_kw; - } - } -} - - -const char * sched_kw_get_name( const sched_kw_type * kw) { return kw->kw_name; } - - - -void sched_kw_set_restart_nr( sched_kw_type * kw , int restart_nr) { - kw->restart_nr = restart_nr; -} - - - -void sched_kw_free(sched_kw_type * sched_kw) -{ - sched_kw->free(sched_kw->data); - free(sched_kw->kw_name); - free(sched_kw); -} - - - -void sched_kw_free__(void * sched_kw_void) -{ - sched_kw_type * sched_kw = (sched_kw_type *) sched_kw_void; - sched_kw_free(sched_kw); -} - - - -/* - This will print the kw in ECLIPSE style formating. -*/ -void sched_kw_fprintf(const sched_kw_type * sched_kw, FILE * stream) -{ - sched_kw->fprintf(sched_kw->data, stream); -} - - - - - - - -/* - This function takes a kw related to timing, such as DATES or TSTEP - and converts it into a series of kw's with one timing event in each - kw. Note that TIME (ECL300 only) is not supported. -*/ -sched_kw_type ** sched_kw_split_alloc_DATES(const sched_kw_type * sched_kw, int * num_steps) -{ - switch(sched_kw_get_type(sched_kw)) - { - case(TSTEP): - return sched_kw_tstep_split_alloc(sched_kw, num_steps); - break; - case(DATES): - return sched_kw_dates_split_alloc(sched_kw, num_steps); - break; - case(TIME): - util_abort("%s: Sorry - no support for TIME kw yet. Please use TSTEP.\n", __func__); - return NULL; - break; - default: - util_abort("%s: Internal error - aborting.\n", __func__); - return NULL; - } -} - - - -time_t sched_kw_get_new_time(const sched_kw_type * sched_kw, time_t curr_time) -{ - time_t new_time = -1; - switch(sched_kw_get_type(sched_kw)) - { - case(TSTEP): - new_time = sched_kw_tstep_get_new_time((const sched_kw_tstep_type *) sched_kw->data, curr_time); - break; - case(DATES): - new_time = sched_kw_dates_iget_date((const sched_kw_dates_type *) sched_kw->data , 0); - break; - case(TIME): - util_abort("%s: Sorry - no support for TIME kw. Please use TSTEP.\n", __func__); - break; - default: - util_abort("%s: Internal error - trying to get time from non-timing kw - aborting.\n", __func__); - break; - } - - return new_time; -} - - - -char ** sched_kw_alloc_well_list(const sched_kw_type * sched_kw, int * num_wells) -{ - switch(sched_kw_get_type(sched_kw)) - { - case(WCONPROD): - return sched_kw_wconprod_alloc_wells_copy( (const sched_kw_wconprod_type *) sched_kw->data , num_wells); - break; - case(WCONINJE): - return sched_kw_wconinje_alloc_wells_copy( (const sched_kw_wconinje_type *) sched_kw->data , num_wells); - break; - case(WCONINJ): - return sched_kw_wconinj_alloc_wells_copy( (const sched_kw_wconinj_type *) sched_kw->data , num_wells); - break; - case(WCONHIST): - { - hash_type * well_obs = sched_kw_wconhist_alloc_well_obs_hash( (sched_kw_wconhist_type *) sched_kw->data); - *num_wells = hash_get_size(well_obs); - char ** well_list = hash_alloc_keylist(well_obs); - hash_free(well_obs); - return well_list; - } - break; - case(WCONINJH): - { - hash_type * well_obs = sched_kw_wconinjh_alloc_well_obs_hash( (sched_kw_wconinjh_type *) sched_kw->data); - *num_wells = hash_get_size(well_obs); - char ** well_list = hash_alloc_keylist(well_obs); - hash_free(well_obs); - return well_list; - } - break; - default: - util_abort("%s: Internal error - trying to get well list from non-well kw - aborting.\n", __func__); - return NULL; - } -} - - - -hash_type * sched_kw_alloc_well_obs_hash(const sched_kw_type * sched_kw) -{ - switch(sched_kw_get_type(sched_kw)) - { - case(WCONHIST): - { - return sched_kw_wconhist_alloc_well_obs_hash( (sched_kw_wconhist_type *) sched_kw->data); - } - case(WCONINJH): - { - return sched_kw_wconinjh_alloc_well_obs_hash( (sched_kw_wconinjh_type *) sched_kw->data); - } - default: - { - util_abort("%s: Internal error - trying to get well observations from non-history kw - aborting.\n", __func__); - return NULL; - } - } -} - - - -void sched_kw_alloc_child_parent_list(const sched_kw_type * sched_kw, char *** children, char *** parents, int * num_pairs) -{ - switch(sched_kw_get_type(sched_kw)) - { - case(GRUPTREE): - { - sched_kw_gruptree_alloc_child_parent_list((sched_kw_gruptree_type *) sched_kw->data, children, parents, num_pairs); - break; - } - case(WELSPECS): - { - sched_kw_welspecs_alloc_child_parent_list((sched_kw_welspecs_type *) sched_kw->data, children, parents, num_pairs); - break; - } - default: - { - util_abort("%s: Internal error - trying to get GRUPTREE from non-gruptre kw - aborting.\n", __func__); - } - } -} - - -/** - Only WCONHIST -*/ - -bool sched_kw_has_well( const sched_kw_type * sched_kw , const char * well ) { - sched_kw_type_enum type = sched_kw_get_type( sched_kw ); - if (type == WCONHIST) - return sched_kw_wconhist_has_well( sched_kw->data , well); - else if (type == WCONINJE) - return sched_kw_wconinje_has_well( sched_kw->data , well); - else - return false; -} - - - -/** - Only WCONHIST & WCONINJE -*/ - -bool sched_kw_well_open( const sched_kw_type * sched_kw , const char * well ) { - sched_kw_type_enum type = sched_kw_get_type( sched_kw ); - if (type == WCONHIST) - return sched_kw_wconhist_well_open( sched_kw->data , well); - else if (type == WCONINJE) - return sched_kw_wconinje_well_open( sched_kw->data , well); - else - return false; -} - - - -sched_kw_type * sched_kw_alloc_copy(const sched_kw_type * src) { - sched_kw_type * target = NULL; - - return target; -} - - -/* - Returns an untyped poiniter to the spesific implementation. Used by - the sched_file_update system. A bit careful with this one... -*/ - -void * sched_kw_get_data( sched_kw_type * kw) { - return kw->data; -} - -const void * sched_kw_get_const_data( const sched_kw_type * kw) { - return kw->data; -} - - diff --git a/ThirdParty/Ert/libsched/src/sched_kw_compdat.c b/ThirdParty/Ert/libsched/src/sched_kw_compdat.c deleted file mode 100644 index f4bd8101cc..0000000000 --- a/ThirdParty/Ert/libsched/src/sched_kw_compdat.c +++ /dev/null @@ -1,306 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_kw_compdat.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - - -#define COMPDAT_NUM_KW 14 -#define SCHED_KW_COMPDAT_ID 771882 - -typedef enum {X, Y , Z , FX , FY} well_dir_type; -#define WELL_DIR_DEFAULT Z -#define WELL_DIR_X_STRING "X" -#define WELL_DIR_Y_STRING "Y" -#define WELL_DIR_Z_STRING "Z" -#define WELL_DIR_FX_STRING "FX" -#define WELL_DIR_FY_STRING "FZ" - - - -typedef enum {OPEN , AUTO , SHUT} comp_state_type; -#define COMP_DEFAULT_STATE OPEN -#define COMP_OPEN_STRING "OPEN" -#define COMP_AUTO_STRING "AUTO" -#define COMP_SHUT_STRING "SHUT" - - - -/* - Structure to hold one line (typically one completed cell) in a compdat section. -*/ - -typedef struct { - char *well; /* Name of well */ - int i,j,k1,k2; /* The i,j,k coordinated of the perforated cell. */ - well_dir_type well_dir; /* Which direction does the well penetrate the grid block */ - comp_state_type state; /* What state is this completion in: AUTO|SHUT|OPEN */ - int sat_table; - double conn_factor; - double well_diameter; - double eff_perm; - double skin_factor; - double D_factor; - double r0; - - /* - def : Read as defaulted, not as defined. - */ - bool def[COMPDAT_NUM_KW]; -} comp_type; - - - -struct sched_kw_compdat_struct { - UTIL_TYPE_ID_DECLARATION; - vector_type * completions; -}; - - - -/** - make_lookup comp_get_state_string comp_get_state_from_string comp_state_type AUTO COMP_AUTO_STRING OPEN COMP_OPEN_STRING SHUT COMP_SHUT_STRING -*/ - - - -static char * comp_get_state_string(comp_state_type state) { - switch(state) { - case(AUTO): - return COMP_AUTO_STRING; - case(OPEN): - return COMP_OPEN_STRING; - case(SHUT): - return COMP_SHUT_STRING; - default: - util_abort("%s: internal error \n",__func__); - return NULL; - } -} - - - -static char * comp_get_dir_string(well_dir_type dir) { - switch(dir) { - case(X): - return WELL_DIR_X_STRING; - case(Y): - return WELL_DIR_Y_STRING; - case(Z): - return WELL_DIR_Z_STRING; - case(FX): - return WELL_DIR_FX_STRING; - case(FY): - return WELL_DIR_FY_STRING; - default: - util_abort("%s: internal fuckup \n",__func__); - return NULL; - } -} - - -static well_dir_type comp_get_well_dir_from_string(const char * well_dir) { - if (strcmp(well_dir , WELL_DIR_X_STRING) == 0) - return X; - else if (strcmp(well_dir , WELL_DIR_Y_STRING) == 0) - return Y; - else if (strcmp(well_dir , WELL_DIR_Z_STRING) == 0) - return Z; - else if (strcmp(well_dir , WELL_DIR_FX_STRING) == 0) - return FX; - else if (strcmp(well_dir , WELL_DIR_FY_STRING) == 0) - return FY; - else { - util_abort("%s: internal fuckup \n",__func__); - return -1; - } -} - - - -static comp_state_type comp_get_state_from_string(const char * state) { - if (strcmp(state , COMP_AUTO_STRING) == 0) - return AUTO; - else if (strcmp(state , COMP_OPEN_STRING) == 0) - return OPEN; - else if (strcmp(state , COMP_SHUT_STRING) == 0) - return SHUT; - else { - util_abort("%s: did not recognize:%s as valid completion state: (%s|%s|%s) \n",__func__ , state , COMP_AUTO_STRING , COMP_OPEN_STRING , COMP_SHUT_STRING); - return -1; - } -} - - - - - - -static void comp_sched_fprintf(const comp_type * comp , FILE *stream) { - fprintf(stream , " "); - sched_util_fprintf_qst(comp->def[0] , comp->well , 8 , stream); - sched_util_fprintf_int(comp->def[1] , comp->i , 4 , stream); - sched_util_fprintf_int(comp->def[2] , comp->j , 4 , stream); - sched_util_fprintf_int(comp->def[3] , comp->k1 , 4 , stream); - sched_util_fprintf_int(comp->def[4] , comp->k2 , 4 , stream); - sched_util_fprintf_qst(comp->def[5] , comp_get_state_string( comp->state ) , 4 , stream); - sched_util_fprintf_int(comp->def[6] , comp->sat_table , 6 , stream); - sched_util_fprintf_dbl(comp->def[7] , comp->conn_factor , 9 , 3 , stream); - sched_util_fprintf_dbl(comp->def[8] , comp->well_diameter , 9 , 3 , stream); - sched_util_fprintf_dbl(comp->def[9] , comp->eff_perm , 9 , 3 , stream); - sched_util_fprintf_dbl(comp->def[10], comp->skin_factor , 9 , 3 , stream); - sched_util_fprintf_dbl(comp->def[11], comp->D_factor , 9 , 3 , stream); - sched_util_fprintf_qst(comp->def[12], comp_get_dir_string( comp->well_dir) , 2 , stream); - sched_util_fprintf_dbl(comp->def[13], comp->r0 , 9 , 3 , stream); - fprintf(stream , " /\n"); -} - - - - -static comp_type * comp_alloc_empty( ) { - comp_type *node = util_malloc(sizeof * node); - node->well = NULL; - return node; -} - - -static comp_type * comp_alloc_from_tokens( const stringlist_type * line_tokens ) { - comp_type * comp = comp_alloc_empty(); - sched_util_init_default( line_tokens , comp->def ); - - - comp->well = util_alloc_string_copy(stringlist_iget( line_tokens , 0)); - comp->i = sched_util_atoi(stringlist_iget( line_tokens , 1)); - comp->j = sched_util_atoi(stringlist_iget( line_tokens , 2)); - comp->k1 = sched_util_atoi(stringlist_iget( line_tokens , 3)); - comp->k2 = sched_util_atoi(stringlist_iget( line_tokens , 4)); - - if (comp->def[5]) - comp->state = COMP_DEFAULT_STATE; - else - comp->state = comp_get_state_from_string( stringlist_iget( line_tokens , 5 )); - - comp->sat_table = sched_util_atoi(stringlist_iget( line_tokens , 6)); - comp->conn_factor = sched_util_atof(stringlist_iget( line_tokens , 7)); - comp->well_diameter = sched_util_atof(stringlist_iget( line_tokens , 8)); - comp->eff_perm = sched_util_atof(stringlist_iget( line_tokens , 9)); - comp->skin_factor = sched_util_atof(stringlist_iget( line_tokens , 10)); - comp->D_factor = sched_util_atof(stringlist_iget( line_tokens , 11)); - - if (comp->def[12]) - comp->well_dir = WELL_DIR_DEFAULT; - else - comp->well_dir = comp_get_well_dir_from_string( stringlist_iget( line_tokens , 12 )); - - comp->r0 = sched_util_atof(stringlist_iget( line_tokens , 13)); - return comp; -} - - - -static void comp_free(comp_type *comp) { - free(comp->well); - free(comp); -} - - -static void comp_free__(void *__comp) { - comp_type *comp = (comp_type *) __comp; - comp_free(comp); -} - - - - - -void sched_kw_compdat_fprintf(const sched_kw_compdat_type *kw , FILE *stream) { - fprintf(stream , "COMPDAT\n"); - { - int index; - for (index = 0; index < vector_get_size( kw->completions ); index++) { - const comp_type * comp = vector_iget_const( kw->completions , index ); - comp_sched_fprintf(comp , stream); - } - } - fprintf(stream , "/\n\n"); -} - - - -sched_kw_compdat_type * sched_kw_compdat_alloc_empty( ) { - sched_kw_compdat_type * kw = util_malloc(sizeof *kw ); - kw->completions = vector_alloc_new(); - UTIL_TYPE_ID_INIT( kw , SCHED_KW_COMPDAT_ID ); - return kw; -} - - -UTIL_SAFE_CAST_FUNCTION( sched_kw_compdat , SCHED_KW_COMPDAT_ID ) - -void sched_kw_compdat_add_comp( sched_kw_compdat_type * kw , comp_type * comp) { - vector_append_owned_ref(kw->completions , comp , comp_free__); -} - - -sched_kw_compdat_type * sched_kw_compdat_alloc(const stringlist_type * tokens , int * token_index ) { - sched_kw_compdat_type * kw = sched_kw_compdat_alloc_empty(); - int eokw = false; - do { - stringlist_type * line_tokens = sched_util_alloc_line_tokens( tokens , false , COMPDAT_NUM_KW , token_index ); - if (line_tokens == NULL) - eokw = true; - else { - comp_type * comp = comp_alloc_from_tokens( line_tokens ); - sched_kw_compdat_add_comp( kw , comp ); - stringlist_free( line_tokens ); - } - } - - while (!eokw); - return kw; -} - - - - - -void sched_kw_compdat_free(sched_kw_compdat_type * kw) { - vector_free(kw->completions); - free(kw); -} - - -sched_kw_compdat_type * sched_kw_compdat_copyc(const sched_kw_compdat_type * kw) { - util_abort("%s: not implemented ... \n",__func__); - return NULL; -} - - -/*****************************************************************/ -KW_IMPL(compdat) - diff --git a/ThirdParty/Ert/libsched/src/sched_kw_dates.c b/ThirdParty/Ert/libsched/src/sched_kw_dates.c deleted file mode 100644 index ed3e8f0806..0000000000 --- a/ThirdParty/Ert/libsched/src/sched_kw_dates.c +++ /dev/null @@ -1,203 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_kw_dates.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include -#include -#include - - -#define DATES_FMT " %d \'%s\' %4d / \n" // The format string used when writing dates the arguments are (day , month_string , year). - - -struct sched_kw_dates_struct { - vector_type * time_list; -}; - - -/*****************************************************************/ - - - -static sched_kw_dates_type * sched_kw_dates_alloc_empty() -{ - sched_kw_dates_type *dates = util_malloc(sizeof *dates); - dates->time_list = vector_alloc_new(); - return dates; -} - - - -static const char * get_month_string_from_int(int month_nr) -{ - switch(month_nr) - { - case(1): return "JAN"; - case(2): return "FEB"; - case(3): return "MAR"; - case(4): return "APR"; - case(5): return "MAY"; - case(6): return "JUN"; - case(7): return "JUL"; - case(8): return "AUG"; - case(9): return "SEP"; - case(10): return "OCT"; - case(11): return "NOV"; - case(12): return "DEC"; - default: - util_abort("%s: Internal error - %i is not a month nr.\n",__func__,month_nr); - return "ERR\0"; - } - -} - - -static time_t parse_time_t(const char * day_string , const char * month_string , const char * year_string) { - int mday , month , year; - time_t time = -1; - - month = ecl_util_get_month_nr(month_string); - if (month < 0) - util_abort("%s: failed to interpret:%s a month name \n",__func__ , month_string ); - - if (util_sscanf_int(day_string , &mday) && util_sscanf_int(year_string , &year)) - time = util_make_date_utc(mday , month , year); - else - util_abort("%s: fatal error when extracting date from:%s %s %s \n", __func__, day_string , month_string , year_string); - - return time; -} - - - - - - - - - -/*****************************************************************/ - - -sched_kw_dates_type * sched_kw_dates_alloc(const stringlist_type * tokens , int * token_index ) { - sched_kw_dates_type * kw = sched_kw_dates_alloc_empty(); - int eokw = false; - do { - stringlist_type * line_tokens = sched_util_alloc_line_tokens( tokens , false, 0 , token_index ); - if (line_tokens == NULL) - eokw = true; - else { - if (stringlist_get_size( line_tokens ) == 3) { - const char * day_string = stringlist_iget( line_tokens , 0 ); - const char * month_string = stringlist_iget( line_tokens , 1 ); - const char * year_string = stringlist_iget( line_tokens , 2 ); - - time_t date = parse_time_t( day_string , month_string , year_string ); - sched_time_type * time_node = sched_time_alloc( date , 0 , DATES_TIME ); - vector_append_owned_ref( kw->time_list , time_node , sched_time_free__ ); - } else { - stringlist_fprintf( line_tokens , " " , stdout ); - util_abort("%s: malformed DATES keyword\n",__func__); - } - stringlist_free( line_tokens ); - } - - } while (!eokw); - return kw; -} - - - - -void sched_kw_dates_fprintf(const sched_kw_dates_type *kw , FILE *stream) { - fprintf(stream,"DATES\n"); - { - int i; - for (i=0; i < vector_get_size( kw->time_list ); i++) { - const sched_time_type * time_node = vector_iget_const( kw->time_list , i ); - if (sched_time_get_type( time_node ) == DATES_TIME) { - time_t date = sched_time_get_date( time_node ); - int day, month, year; - util_set_date_values_utc(date, &day, &month, &year); - fprintf(stream , DATES_FMT , day, get_month_string_from_int(month), year ); - } else - util_abort("%s: internal type fuckup \n",__func__); - } - fprintf(stream , "/\n\n"); - } -} - - - -void sched_kw_dates_free(sched_kw_dates_type * kw) { - vector_free(kw->time_list); - free(kw); -} - - - -int sched_kw_dates_get_size(const sched_kw_dates_type * kw) -{ - return vector_get_size(kw->time_list); -} - - - -sched_kw_dates_type * sched_kw_dates_alloc_from_time_t(time_t date) -{ - sched_kw_dates_type * kw = sched_kw_dates_alloc_empty(); - sched_time_type * time_node = sched_time_alloc( date , 0 , DATES_TIME ); - vector_append_owned_ref(kw->time_list , time_node , sched_time_free__); - return kw; -} - - - -time_t sched_kw_dates_iget_date(const sched_kw_dates_type * kw, int i) -{ - const sched_time_type * time_node = vector_iget_const( kw->time_list , i ); - return sched_time_get_date( time_node ); -} - - - - -sched_kw_dates_type * sched_kw_dates_copyc(const sched_kw_dates_type * kw) { - util_abort("%s: not implemented ... \n",__func__); - return NULL; -} - - - - -/***********************************************************************/ - - - -KW_IMPL(dates) - diff --git a/ThirdParty/Ert/libsched/src/sched_kw_gruptree.c b/ThirdParty/Ert/libsched/src/sched_kw_gruptree.c deleted file mode 100644 index 5352772811..0000000000 --- a/ThirdParty/Ert/libsched/src/sched_kw_gruptree.c +++ /dev/null @@ -1,164 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_kw_gruptree.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include - -#include -#include -#include - -#include -#include -#include - - -struct sched_kw_gruptree_struct -{ - hash_type * gruptree_hash; /* The use of hash implies that the ordering within one GRUPTREE instance is not retained. */ -}; - - - -/***********************************************************************/ - - - -static void sched_kw_gruptree_add_well(sched_kw_gruptree_type * kw , const char * child_group , const char * parent_group) { - hash_insert_string(kw->gruptree_hash, child_group , parent_group); -} - - -static sched_kw_gruptree_type * sched_kw_gruptree_alloc_empty() -{ - sched_kw_gruptree_type * kw = util_malloc(sizeof * kw); - kw->gruptree_hash = hash_alloc(); - - return kw; -}; - - - -/***********************************************************************/ - - -sched_kw_gruptree_type * sched_kw_gruptree_alloc(const stringlist_type * tokens , int * token_index ) { - sched_kw_gruptree_type * kw = sched_kw_gruptree_alloc_empty(); - int eokw = false; - do { - stringlist_type * line_tokens = sched_util_alloc_line_tokens( tokens , false , 0 , token_index ); - if (line_tokens == NULL) - eokw = true; - else { - const char * parent_group = "FIELD"; - const char * child_group = stringlist_iget( line_tokens , 0 ); - if (stringlist_get_size( line_tokens ) == 2) - parent_group = stringlist_iget( line_tokens , 1 ); - - sched_kw_gruptree_add_well(kw , child_group , parent_group ); - - stringlist_free( line_tokens ); - } - - } while (!eokw); - return kw; -} - - - -void sched_kw_gruptree_free(sched_kw_gruptree_type * kw) -{ - hash_free(kw->gruptree_hash); - free(kw); -}; - - -void sched_kw_gruptree_fprintf(const sched_kw_gruptree_type * kw, FILE * stream) -{ - - fprintf(stream, "GRUPTREE\n"); - { - const int num_keys = hash_get_size(kw->gruptree_hash); - char ** child_list = hash_alloc_keylist(kw->gruptree_hash); - int i; - - for (i = 0; i < num_keys; i++) { - const char * parent_name = hash_get_string(kw->gruptree_hash , child_list[i]); - fprintf(stream," '%s' '%s' /\n",child_list[i] , parent_name); - } - util_free_stringlist( child_list , num_keys ); - } - fprintf(stream,"/\n\n"); -}; - - - - -void sched_kw_gruptree_init_child_parent_list( const sched_kw_gruptree_type * kw , stringlist_type * child , stringlist_type * parent) { - stringlist_clear( child ); - stringlist_clear( parent ); - { - hash_iter_type * iter = hash_iter_alloc( kw->gruptree_hash ); - while (!hash_iter_is_complete( iter )) { - const char * child_group = hash_iter_get_next_key( iter ); - const char * parent_group = hash_get_string( kw->gruptree_hash , child_group ); - - stringlist_append_copy( child , child_group ); /* <- The iterator keys go out of scope when hash_iter_free() is called. */ - stringlist_append_ref( parent , parent_group ); - } - hash_iter_free( iter ); - } -} - - - - -void sched_kw_gruptree_alloc_child_parent_list(const sched_kw_gruptree_type * kw, char *** __children, char *** __parents, int * num_pairs) -{ - *num_pairs = hash_get_size(kw->gruptree_hash); - char ** children = hash_alloc_keylist(kw->gruptree_hash); - char ** parents = util_malloc(*num_pairs * sizeof * parents); - - for(int child_nr = 0; child_nr < *num_pairs; child_nr++) - { - parents[child_nr] = util_alloc_string_copy(hash_get_string(kw->gruptree_hash, children[child_nr])); - } - - *__children = children; - *__parents = parents; -} - - - -static sched_kw_gruptree_type * sched_kw_gruptree_copyc(const sched_kw_gruptree_type * src) { - sched_kw_gruptree_type * target = sched_kw_gruptree_alloc_empty(); - hash_iter_type * iter = hash_iter_alloc(src->gruptree_hash); - const char * kw = hash_iter_get_next_key(iter); - while (kw != NULL) { - char * parent_name = hash_get_string(src->gruptree_hash , kw); - hash_insert_string( target->gruptree_hash , kw , parent_name); - kw = hash_iter_get_next_key(iter); - } - hash_iter_free(iter); - return target; -} - - - -/***********************************************************************/ - -KW_IMPL(gruptree) diff --git a/ThirdParty/Ert/libsched/src/sched_kw_include.c b/ThirdParty/Ert/libsched/src/sched_kw_include.c deleted file mode 100644 index 11a58e8dd8..0000000000 --- a/ThirdParty/Ert/libsched/src/sched_kw_include.c +++ /dev/null @@ -1,107 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_kw_include.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - - -/** - This file implemtents support for the INCLUDE keyword in the - SCHEDULE files. Observe that the implementation is extremely - minimal, all it does is: - - 1. Recognize the INCLUDE keyword. - 2. Internalize the string representing the included file. - - It does NOT descent into any recursive parsing. The main reason to - have this support is to let the untyped parser "safely" read up to - the next "/" (that approach ill be completely fooled by path - separators in INCLUDE statements). -*/ - -#define SCHED_KW_INCLUDE_ID 1085006 - - -struct sched_kw_include_struct { - UTIL_TYPE_ID_DECLARATION; - char * include_file; /* The file to include ... */ -}; - - -static sched_kw_include_type * sched_kw_include_alloc_empty() { - sched_kw_include_type * kw = util_malloc( sizeof * kw ); - UTIL_TYPE_ID_INIT(kw , SCHED_KW_INCLUDE_ID); - kw->include_file = NULL; - return kw; -} - - -static void sched_kw_include_set_file( sched_kw_include_type * kw , const char * file) { - kw->include_file = util_alloc_string_copy( file ); -} - - - -sched_kw_include_type * sched_kw_include_alloc(const stringlist_type * tokens , int * token_index ) { - sched_kw_include_type * kw = sched_kw_include_alloc_empty(); - stringlist_type * line_tokens = sched_util_alloc_line_tokens( tokens , false , 0 , token_index ); - if (line_tokens == NULL) - util_abort("%s: fatal error when parsing INCLUDE \n",__func__); - - if (stringlist_get_size( line_tokens ) != 1) - util_abort("%s: fatal error when parsing INCLUDE \n",__func__); - - sched_kw_include_set_file( kw , stringlist_iget( line_tokens , 0 )); - - return kw; -} - - - - -void sched_kw_include_free( sched_kw_include_type * kw ) { - util_safe_free( kw->include_file ); - free( kw ); -} - - -void sched_kw_include_fprintf( const sched_kw_include_type * kw , FILE * stream ) { - fprintf(stream , "INCLUDE\n"); - fprintf(stream , " \'%s\' /\n\n" , kw->include_file); -} - - -sched_kw_include_type * sched_kw_include_copyc( const sched_kw_include_type * kw ) { - sched_kw_include_type * copy = sched_kw_include_alloc_empty(); - sched_kw_include_set_file( copy , kw->include_file ); - return copy; -} - - - -KW_IMPL(include) diff --git a/ThirdParty/Ert/libsched/src/sched_kw_tstep.c b/ThirdParty/Ert/libsched/src/sched_kw_tstep.c deleted file mode 100644 index b9ed608360..0000000000 --- a/ThirdParty/Ert/libsched/src/sched_kw_tstep.c +++ /dev/null @@ -1,151 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_kw_tstep.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include - -#include -#include -#include - - - -struct sched_kw_tstep_struct { - double_vector_type * tstep_list; -}; - - - -/*****************************************************************/ - - -static void sched_kw_tstep_add_tstep( sched_kw_tstep_type * kw, double tstep ) { - double_vector_append( kw->tstep_list , tstep ); -} - - -static void sched_kw_tstep_add_tstep_string( sched_kw_tstep_type * kw, const char * tstep_string) { - double tstep; - if (util_sscanf_double( tstep_string , &tstep )) - sched_kw_tstep_add_tstep(kw , tstep ); - else - util_abort("%s: failed to parse:%s as a floating point number \n",__func__ , tstep_string); -} - - - - - - -static sched_kw_tstep_type * sched_kw_tstep_alloc_empty(){ - sched_kw_tstep_type *tstep = util_malloc(sizeof * tstep ); - tstep->tstep_list = double_vector_alloc(0 , 0); - return tstep; -} - - - -/*****************************************************************/ - -sched_kw_tstep_type * sched_kw_tstep_alloc(const stringlist_type * tokens , int * token_index ) { - sched_kw_tstep_type * kw = sched_kw_tstep_alloc_empty(); - stringlist_type * line_tokens = sched_util_alloc_line_tokens( tokens , false , 0 , token_index ); - - if (line_tokens == NULL) - util_abort("%s: hmmmm - TSTEP keyword without and data \n",__func__); - else { - int i; - - for (i=0; i < stringlist_get_size( line_tokens ); i++) - sched_kw_tstep_add_tstep_string( kw , stringlist_iget( line_tokens , i )); - - stringlist_free( line_tokens ); - } - - return kw; -} - - -void sched_kw_tstep_fprintf(const sched_kw_tstep_type *kw , FILE *stream) { - fprintf(stream,"TSTEP\n "); - { - int i; - for (i=0; i < double_vector_size( kw->tstep_list ); i++) - fprintf(stream, "%7.3f", double_vector_iget( kw->tstep_list , i)); - } - fprintf(stream , " /\n\n"); -} - - - -void sched_kw_tstep_free(sched_kw_tstep_type * kw) { - double_vector_free(kw->tstep_list); - free(kw); -} - - - -int sched_kw_tstep_get_size(const sched_kw_tstep_type * kw) -{ - return double_vector_size(kw->tstep_list); -} - - - -sched_kw_tstep_type * sched_kw_tstep_alloc_from_double(double step) -{ - sched_kw_tstep_type * kw = sched_kw_tstep_alloc_empty(); - double_vector_append( kw->tstep_list , step ); - return kw; -} - -sched_kw_tstep_type * sched_kw_tstep_copyc(const sched_kw_tstep_type * kw) { - util_abort("%s: not implemented ... \n",__func__); - return NULL; -} - - - -double sched_kw_tstep_iget_step(const sched_kw_tstep_type * kw, int i) -{ - return double_vector_iget( kw->tstep_list , i ); -} - - -int sched_kw_tstep_get_length( const sched_kw_tstep_type * kw) { - return double_vector_size( kw->tstep_list ); -} - -time_t sched_kw_tstep_get_new_time(const sched_kw_tstep_type *kw, time_t curr_time) -{ - double step_days = sched_kw_tstep_iget_step(kw , 0); - time_t new_time = curr_time; - util_inplace_forward_days_utc(&new_time, step_days); - return new_time; -} - - -/*****************************************************************/ - -KW_IMPL(tstep) - - diff --git a/ThirdParty/Ert/libsched/src/sched_kw_untyped.c b/ThirdParty/Ert/libsched/src/sched_kw_untyped.c deleted file mode 100644 index 2439d9dc95..0000000000 --- a/ThirdParty/Ert/libsched/src/sched_kw_untyped.c +++ /dev/null @@ -1,184 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_kw_untyped.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include -#include - -#include -#include - - - - -struct sched_kw_untyped_struct { - int rec_len; - char *kw_name; /* The name of the current keyword. */ - char *buffer; /* The content of the keyword is just appended in one char * pointer. */ -}; - - - -/*****************************************************************/ - -//static int get_fixed_record_length(const char * kw_name) -//{ -// -// if( strcmp(kw_name , "RPTSCHED") == 0) { return 1;} -// if( strcmp(kw_name , "DRSDT" ) == 0) { return 1;} -// if( strcmp(kw_name , "SKIPREST") == 0) { return 0;} -// if( strcmp(kw_name , "RPTRST" ) == 0) { return 1;} -// if( strcmp(kw_name , "TUNING" ) == 0) { return 3;} -// if( strcmp(kw_name , "WHISTCTL") == 0) { return 1;} -// if( strcmp(kw_name , "TIME" ) == 0) { return 1;} -// if( strcmp(kw_name , "VAPPARS" ) == 0) { return 1;} -// if( strcmp(kw_name , "NETBALAN") == 0) { return 1;} -// if( strcmp(kw_name , "WPAVE" ) == 0) { return 1;} -// if( strcmp(kw_name , "VFPTABL" ) == 0) { return 1;} -// if( strcmp(kw_name , "GUIDERAT") == 0) { return 1;} -// -// return -1; /* Can not use 0 - because some KW actually have 0 as a valid fixed value. */ -//} - - - -sched_kw_untyped_type * sched_kw_untyped_alloc_empty(const char * kw_name , int rec_len) { - sched_kw_untyped_type * kw = util_malloc(sizeof *kw ); - kw->kw_name = util_alloc_string_copy(kw_name); - kw->rec_len = rec_len; - kw->buffer = NULL; - return kw; -} - - - -/** This is exported for the keywords which are just a minimum extension of untyped. */ -void sched_kw_untyped_add_line(sched_kw_untyped_type * kw , const char *line, bool pad) { - if (pad) { - char * padded_line = util_alloc_sprintf(" %s\n" , line); - kw->buffer = util_strcat_realloc(kw->buffer , padded_line); - free(padded_line); - } else - kw->buffer = util_strcat_realloc(kw->buffer , line); -} - - - -/*****************************************************************/ - - -void sched_kw_untyped_add_tokens( sched_kw_untyped_type * kw , const stringlist_type * line_tokens) { - char * line_buffer = stringlist_alloc_joined_string( line_tokens , " "); - sched_kw_untyped_add_line(kw, line_buffer , true ); - free( line_buffer ); -} - - - - - -sched_kw_untyped_type * sched_kw_untyped_alloc(const stringlist_type * tokens , int * token_index , int rec_len) { - const char * kw_name = NULL; - - /* First part - get hold of the kw name */ - { - int kw_index = (*token_index) - 1; - do { - kw_name = stringlist_iget( tokens , kw_index); - if (util_string_isspace( kw_name )) - kw_name = NULL; /* Try again */ - kw_index--; - } while (kw_name == NULL && (kw_index >= 0)); - - if (kw_name == NULL) - util_abort("%s: internal error - failed to identify untyped kw name \n",__func__); - } - - - { - bool eokw = false; - sched_kw_untyped_type * kw = sched_kw_untyped_alloc_empty( kw_name , rec_len); - int line_nr = 0; - do { - stringlist_type * line_tokens = sched_util_alloc_line_tokens( tokens , true , 0 , token_index ); - line_nr++; - if (line_tokens == NULL) { - eokw = true; - if (line_nr < kw->rec_len) - util_abort("%s: premature end of keyword:%s \n",__func__ , kw_name); - } else { - sched_kw_untyped_add_tokens( kw , line_tokens ); - stringlist_free( line_tokens ); - } - - if (line_nr == kw->rec_len) - eokw = true; - - } while (!eokw); - return kw; - } -} - - - - -void sched_kw_untyped_fprintf(const sched_kw_untyped_type *kw , FILE *stream) { - fprintf(stream , "%s \n" , kw->kw_name); - { - if (kw->buffer != NULL) - fprintf(stream , "%s" , kw->buffer); - - if(kw->rec_len < 0) - fprintf(stream , "/\n\n"); - else - fprintf(stream, "\n\n"); - } -} - - - -void sched_kw_untyped_free(sched_kw_untyped_type * kw) { - util_safe_free(kw->buffer); - free(kw->kw_name); - free(kw); -} - -sched_kw_untyped_type * sched_kw_untyped_copyc(const sched_kw_untyped_type * kw) { - util_abort("%s: not implemented ... \n",__func__); - return NULL; -} - -/*****************************************************************/ - -KW_FREE_IMPL(untyped) -KW_FPRINTF_IMPL(untyped) -KW_COPYC_IMPL(untyped) - - - - - - - - - - diff --git a/ThirdParty/Ert/libsched/src/sched_kw_wconhist.c b/ThirdParty/Ert/libsched/src/sched_kw_wconhist.c deleted file mode 100644 index c5cfe31ed8..0000000000 --- a/ThirdParty/Ert/libsched/src/sched_kw_wconhist.c +++ /dev/null @@ -1,719 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_kw_wconhist.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - - -/* - Define the maximum number of keywords in a WCONHIST record. - Note that this includes wet gas rate, which is only supported - by ECL 300. -*/ - -#define WCONHIST_NUM_KW 11 -#define SCHED_KW_WCONHIST_ID 771054 /* Very random intgere for checking type-cast. */ -#define WCONHIST_TYPE_ID 7752053 - - -typedef struct wconhist_well_struct wconhist_well_type; - - - -struct wconhist_well_struct{ - /* - def: Read as defaulted, not defined! - */ - bool def[WCONHIST_NUM_KW]; - - char * name; - well_status_enum status; - well_cm_enum cmode; - double orat; - double wrat; - double grat; - int vfptable; - double alift; - double thp; - double bhp; - double wgrat; -}; - - - -struct sched_kw_wconhist_struct{ - UTIL_TYPE_ID_DECLARATION; - vector_type * wells; -}; - - -/*****************************************************************/ - -/** - Contains values for ORAT, GRAT, .... for one well for the complete - history; this is orthogonal to the regualar sched_kw_wconhist - keyowrd which contains the same data for all (or at least many ...) - wells at one time instant. -*/ - -struct wconhist_state_struct { - UTIL_TYPE_ID_DECLARATION; - const time_t_vector_type * time; /* Shared vector with the report_step -> time_t mapping .*/ - int_vector_type * state; /* Contains values from the well_status_enum. */ - int_vector_type * cmode; /* Contains values from the well_cm_enum. */ - double_vector_type * oil_rate; - double_vector_type * water_rate; - double_vector_type * gas_rate; - int_vector_type * vfp_table; - double_vector_type * art_lift; - double_vector_type * thp; - double_vector_type * bhp; - double_vector_type * wgas_rate; -}; - - - -/*****************************************************************/ - - - -static wconhist_well_type * wconhist_well_alloc_empty( ) -{ - wconhist_well_type * well = util_malloc(sizeof * well); - well->name = NULL; - well->status = WCONHIST_DEFAULT_STATUS; - return well; -} - - - -static void wconhist_well_free(wconhist_well_type * well) -{ - free(well->name); - free(well); -} - - - -static void wconhist_well_free__(void * well) -{ - wconhist_well_free( (wconhist_well_type *) well); -} - - - -static void wconhist_well_fprintf(const wconhist_well_type * well, FILE * stream) -{ - fprintf(stream, " "); - sched_util_fprintf_qst(well->def[0], well->name , 8, stream); - sched_util_fprintf_qst(well->def[1], sched_types_get_status_string(well->status) , 4, stream); - sched_util_fprintf_qst(well->def[2], sched_types_get_cm_string(well->cmode) , 4, stream); - sched_util_fprintf_dbl(well->def[3], well->orat , 11, 3, stream); - sched_util_fprintf_dbl(well->def[4], well->wrat , 11, 3, stream); - sched_util_fprintf_dbl(well->def[5], well->grat , 11, 3, stream); - sched_util_fprintf_int(well->def[6], well->vfptable , 4 , stream); - sched_util_fprintf_dbl(well->def[7], well->alift , 11, 3, stream); - sched_util_fprintf_dbl(well->def[8], well->thp , 11, 3, stream); - sched_util_fprintf_dbl(well->def[9] , well->bhp , 11, 3, stream); - sched_util_fprintf_dbl(well->def[10], well->wgrat , 11, 3, stream); - fprintf(stream, "/\n"); -} - - - - - - -static wconhist_well_type * wconhist_well_alloc_from_tokens(const stringlist_type * line_tokens ) { - wconhist_well_type * well = wconhist_well_alloc_empty( ); - sched_util_init_default( line_tokens , well->def ); - - well->name = util_alloc_string_copy(stringlist_iget(line_tokens, 0)); - - if(!well->def[1]) - well->status = sched_types_get_status_from_string(stringlist_iget(line_tokens , 1)); - if (well->status == DEFAULT) - well->status = WCONHIST_DEFAULT_STATUS; - - - if(!well->def[2]) - well->cmode = sched_types_get_cm_from_string(stringlist_iget(line_tokens , 2) , true); - - well->orat = sched_util_atof(stringlist_iget(line_tokens , 3)); - well->wrat = sched_util_atof(stringlist_iget(line_tokens , 4)); - well->grat = sched_util_atof(stringlist_iget(line_tokens , 5)); - well->vfptable = sched_util_atoi(stringlist_iget(line_tokens , 6)); - well->alift = sched_util_atof(stringlist_iget(line_tokens , 7)); - well->thp = sched_util_atof(stringlist_iget(line_tokens , 8)); - well->bhp = sched_util_atof(stringlist_iget(line_tokens , 9)); - well->wgrat = sched_util_atof(stringlist_iget(line_tokens , 10)); - - return well; -} - - - - - - -static hash_type * wconhist_well_export_obs_hash(const wconhist_well_type * well) -{ - hash_type * obs_hash = hash_alloc(); - - if(!well->def[3]) - hash_insert_double(obs_hash, "WOPR", well->orat); - - if(!well->def[4]) - hash_insert_double(obs_hash, "WWPR", well->wrat); - - if(!well->def[5]) - hash_insert_double(obs_hash, "WGPR", well->grat); - - if(!well->def[8]) - hash_insert_double(obs_hash, "WTHP", well->thp); - - if(!well->def[9]) - hash_insert_double(obs_hash, "WBHP", well->bhp); - - if(!well->def[10]) - hash_insert_double(obs_hash, "WWGPR", well->wgrat); - - // Water cut. - if(!well->def[3] && !well->def[4]) - { - double wct; - if(well->orat + well->wrat > 0.0) - wct = well->wrat / (well->orat + well->wrat); - else - wct = 0.0; - - hash_insert_double(obs_hash, "WWCT", wct); - } - - // Gas oil ratio. - if(!well->def[3] && !well->def[5]) - { - double gor; - if(well->orat > 0.0) - { - gor = well->grat / well->orat; - hash_insert_double(obs_hash, "WGOR", gor); - } - } - - return obs_hash; -} - - -static void sched_kw_wconhist_add_well( sched_kw_wconhist_type * kw , wconhist_well_type * well) { - vector_append_owned_ref(kw->wells, well, wconhist_well_free__); -} - - - - -static sched_kw_wconhist_type * sched_kw_wconhist_alloc_empty() -{ - sched_kw_wconhist_type * kw = util_malloc(sizeof * kw); - UTIL_TYPE_ID_INIT( kw , SCHED_KW_WCONHIST_ID ); - kw->wells = vector_alloc_new(); - return kw; -} - - - -sched_kw_wconhist_type * sched_kw_wconhist_safe_cast( void * arg ) { - sched_kw_wconhist_type * kw = (sched_kw_wconhist_type * ) arg; - if (kw->__type_id == SCHED_KW_WCONHIST_ID) - return kw; - else { - util_abort("%s: runtime cast failed \n",__func__); - return NULL; - } -} - - - -/***********************************************************************/ - - - -sched_kw_wconhist_type * sched_kw_wconhist_alloc(const stringlist_type * tokens , int * token_index ) { - sched_kw_wconhist_type * kw = sched_kw_wconhist_alloc_empty(); - int eokw = false; - do { - stringlist_type * line_tokens = sched_util_alloc_line_tokens( tokens , false , WCONHIST_NUM_KW , token_index ); - if (line_tokens == NULL) - eokw = true; - else { - wconhist_well_type * well = wconhist_well_alloc_from_tokens( line_tokens ); - sched_kw_wconhist_add_well( kw , well ); - stringlist_free( line_tokens ); - } - - } while (!eokw); - return kw; -} - - -void sched_kw_wconhist_free(sched_kw_wconhist_type * kw) -{ - vector_free(kw->wells); - free(kw); -} - - - -void sched_kw_wconhist_fprintf(const sched_kw_wconhist_type * kw, FILE * stream) -{ - int size = vector_get_size(kw->wells); - - fprintf(stream, "WCONHIST\n"); - for(int i=0; iwells, i); - wconhist_well_fprintf(well, stream); - } - fprintf(stream,"/\n\n"); -} - - -/***********************************************************************/ - - - -hash_type * sched_kw_wconhist_alloc_well_obs_hash(const sched_kw_wconhist_type * kw) -{ - hash_type * well_hash = hash_alloc(); - - int num_wells = vector_get_size(kw->wells); - - for(int well_nr=0; well_nrwells, well_nr); - hash_type * obs_hash = wconhist_well_export_obs_hash(well); - hash_insert_hash_owned_ref(well_hash, well->name, obs_hash, hash_free__); - } - - return well_hash; -} - -sched_kw_wconhist_type * sched_kw_wconhist_copyc(const sched_kw_wconhist_type * kw) { - util_abort("%s: not implemented ... \n",__func__); - return NULL; -} - - - -/***********************************************************************/ -/* Functions exported for the sched_file_update api. */ - - - -/** Will return NULL if the well is not present. */ -static wconhist_well_type * sched_kw_wconhist_get_well( const sched_kw_wconhist_type * kw , const char * well_name) { - int size = vector_get_size(kw->wells); - wconhist_well_type * well = NULL; - int index = 0; - do { - wconhist_well_type * iwell = vector_iget( kw->wells , index); - if (strcmp( well_name , iwell->name ) == 0) - well = iwell; - - index++; - } while ((well == NULL) && (index < size)); - return well; -} - - -/*****************************************************************/ - - -double sched_kw_wconhist_get_orat( sched_kw_wconhist_type * kw , const char * well_name) { - wconhist_well_type * well = sched_kw_wconhist_get_well( kw , well_name ); - if (well != NULL) - return well->orat; - else - return -1; -} - -void sched_kw_wconhist_scale_orat( sched_kw_wconhist_type * kw , const char * well_name, double factor) { - wconhist_well_type * well = sched_kw_wconhist_get_well( kw , well_name ); - if (well != NULL) - well->orat *= factor; -} - -void sched_kw_wconhist_shift_orat( sched_kw_wconhist_type * kw , const char * well_name, double shift_value) { - wconhist_well_type * well = sched_kw_wconhist_get_well( kw , well_name ); - if (well != NULL) { - well->orat += shift_value; - if (well->orat < 0) - well->orat = 0; - } -} - -void sched_kw_wconhist_set_orat( sched_kw_wconhist_type * kw , const char * well_name , double orat) { - wconhist_well_type * well = sched_kw_wconhist_get_well( kw , well_name ); - if (well != NULL) - well->orat = orat; -} - -/*****************************************************************/ -/* WRAT functions */ - -double sched_kw_wconhist_get_wrat( sched_kw_wconhist_type * kw , const char * well_name) { - wconhist_well_type * well = sched_kw_wconhist_get_well( kw , well_name ); - if (well != NULL) - return well->wrat; - else - return -1; -} - -void sched_kw_wconhist_scale_wrat( sched_kw_wconhist_type * kw , const char * well_name, double factor) { - wconhist_well_type * well = sched_kw_wconhist_get_well( kw , well_name ); - if (well != NULL) - well->wrat *= factor; -} - -void sched_kw_wconhist_shift_wrat( sched_kw_wconhist_type * kw , const char * well_name, double shift_value) { - wconhist_well_type * well = sched_kw_wconhist_get_well( kw , well_name ); - if (well != NULL) { - well->wrat += shift_value; - if (well->wrat < 0) - well->wrat = 0; - } -} - -void sched_kw_wconhist_set_wrat( sched_kw_wconhist_type * kw , const char * well_name , double wrat) { - wconhist_well_type * well = sched_kw_wconhist_get_well( kw , well_name ); - if (well != NULL) - well->wrat = wrat; -} - -/*****************************************************************/ -/* GRAT functions */ - -double sched_kw_wconhist_get_grat( sched_kw_wconhist_type * kw , const char * well_name) { - wconhist_well_type * well = sched_kw_wconhist_get_well( kw , well_name ); - if (well != NULL) - return well->grat; - else - return -1; -} - -void sched_kw_wconhist_scale_grat( sched_kw_wconhist_type * kw , const char * well_name, double factor) { - wconhist_well_type * well = sched_kw_wconhist_get_well( kw , well_name ); - if (well != NULL) - well->grat *= factor; -} - -void sched_kw_wconhist_shift_grat( sched_kw_wconhist_type * kw , const char * well_name, double shift_value) { - wconhist_well_type * well = sched_kw_wconhist_get_well( kw , well_name ); - if (well != NULL) { - well->grat += shift_value; - if (well->grat < 0) - well->grat = 0; - } -} - -void sched_kw_wconhist_set_grat( sched_kw_wconhist_type * kw , const char * well_name , double grat) { - wconhist_well_type * well = sched_kw_wconhist_get_well( kw , well_name ); - if (well != NULL) - well->grat = grat; -} - - -/*****************************************************************/ - - -bool sched_kw_wconhist_has_well( const sched_kw_wconhist_type * kw , const char * well_name) { - wconhist_well_type * well = sched_kw_wconhist_get_well( kw , well_name ); - if (well == NULL) - return false; - else - return true; -} - -/** - This keyword checks if the well @well_name is open in this wconhist - instance. The check is quite simple: if the wconhist instance has - this well, and that well has status == OPEN AND a finite rate of at - least one phase - we return true, in ALL other cases we return - false. - - Observe that this function has no possibility to check well-names - +++ - if you ask for a non-existing well you will just get false. -*/ - - -bool sched_kw_wconhist_well_open( const sched_kw_wconhist_type * kw, const char * well_name) { - wconhist_well_type * well = sched_kw_wconhist_get_well( kw , well_name ); - if (well == NULL) - return false; - else { - /* OK - we have the well. */ - if (well->status == OPEN) { - /* The well seems to be open - any rates around? */ - if ((well->orat + well->grat + well->wrat) > 0.0) - return true; - else - return false; - } else - return false; - } -} - -/*****************************************************************/ - - -/** - Will update the input parameter @well_list to contain all the - well_names present in the current sced_kw_wconhist keyword. -*/ - -void sched_kw_wconhist_init_well_list( const sched_kw_wconhist_type * kw , stringlist_type * well_list) { - stringlist_clear( well_list ); - { - int iw; - for (iw = 0; iw < vector_get_size( kw->wells ); iw++) { - const wconhist_well_type * well = vector_iget_const( kw->wells , iw ); - stringlist_append_ref( well_list , well->name ); - } - } -} - - -/*****************************************************************/ - -static UTIL_SAFE_CAST_FUNCTION_CONST( wconhist_state , WCONHIST_TYPE_ID) -static UTIL_SAFE_CAST_FUNCTION( wconhist_state , WCONHIST_TYPE_ID) - - - - -static double well_util_total( const time_t_vector_type * time, const double_vector_type * rate , int report_step ) { - double total = 0; - for (int index = 1; index <= report_step; index++) { - /* It is a HARD assumption that the rate values in @rate are given as volume / day. */ - double days = (time_t_vector_iget( time , index ) - time_t_vector_iget( time , index - 1)) / 86400; - total += days * double_vector_iget( rate , index ); - } - - return total; -} - - -double wconhist_state_iget_WOPTH( const void * state , int report_step ) { - const wconhist_state_type * wconhist_state = wconhist_state_safe_cast_const( state ); - return well_util_total( wconhist_state->time , wconhist_state->oil_rate , report_step ); -} - - -double wconhist_state_iget_WGPTH( const void * state , int report_step ) { - const wconhist_state_type * wconhist_state = wconhist_state_safe_cast_const( state ); - return well_util_total( wconhist_state->time , wconhist_state->gas_rate , report_step ); -} - - -double wconhist_state_iget_WWPTH( const void * state , int report_step ) { - const wconhist_state_type * wconhist_state = wconhist_state_safe_cast_const( state ); - return well_util_total( wconhist_state->time , wconhist_state->water_rate , report_step ); -} - - -/* - Functions implementing the wconhist state; the naming convention - here should follow the one used in summary files, i.e. WOPR to get Oil Production Rate. -*/ - - -double wconhist_state_iget_WBHPH( const void * state , int report_step ) { - const wconhist_state_type * wconhist_state = wconhist_state_safe_cast_const( state ); - return double_vector_safe_iget( wconhist_state->bhp , report_step ); -} - - -double wconhist_state_iget_WOPRH( const void * state , int report_step ) { - const wconhist_state_type * wconhist_state = wconhist_state_safe_cast_const( state ); - return double_vector_safe_iget( wconhist_state->oil_rate , report_step ); -} - - -double wconhist_state_iget_WGPRH( const void * state , int report_step ) { - const wconhist_state_type * wconhist_state = wconhist_state_safe_cast_const( state ); - return double_vector_safe_iget( wconhist_state->gas_rate , report_step ); -} - - -double wconhist_state_iget_WWPRH( const void * state , int report_step ) { - const wconhist_state_type * wconhist_state = wconhist_state_safe_cast_const( state ); - return double_vector_safe_iget( wconhist_state->water_rate , report_step ); -} - - -double wconhist_state_iget_WWCTH( const void * state , int report_step ) { - double WWPR = wconhist_state_iget_WWPRH( state , report_step ); - double WOPR = wconhist_state_iget_WOPRH( state , report_step ); - - return WWPR / ( WWPR + WOPR ); -} - - -double wconhist_state_iget_WGORH(const void * state , int report_step ) { - double WGPR = wconhist_state_iget_WGPRH( state , report_step ); - double WOPR = wconhist_state_iget_WOPRH( state , report_step ); - return WGPR / WOPR; -} - - -/* - Uncertain about this memnonic?? -*/ - -well_cm_enum wconhist_state_iget_WMCTLH( const void * state , int report_step ) { - const wconhist_state_type * wconhist_state = wconhist_state_safe_cast_const( state ); - return int_vector_iget( wconhist_state->cmode , report_step ); -} - - -//well_status_enum wconhist_state_iget_status( const void * state , int report_step ) { - -// All callbacks return double ... should really be an enum value -double wconhist_state_iget_STAT( const void * state , int report_step ) { - const wconhist_state_type * wconhist_state = wconhist_state_safe_cast_const( state ); - return int_vector_iget( wconhist_state->state , report_step ); -} - - - -wconhist_state_type * wconhist_state_alloc( const time_t_vector_type * time) { - wconhist_state_type * wconhist = util_malloc( sizeof * wconhist ); - UTIL_TYPE_ID_INIT( wconhist , WCONHIST_TYPE_ID ); - - wconhist->time = time; - wconhist->state = int_vector_alloc( 0 , WCONHIST_DEFAULT_STATUS ); - wconhist->cmode = int_vector_alloc( 0 , 0 ); - - wconhist->oil_rate = double_vector_alloc( 0 , 0 ); - wconhist->gas_rate = double_vector_alloc( 0 , 0 ); - wconhist->water_rate = double_vector_alloc( 0 , 0 ); - - /* - The vfp_table and art_list keywords have an EXTREMELY ugly - DEFAULT behaviour - it changes as function of time: - - 1. The first occurence of a default value should be interpreted - as a '0'. - - 2. The second occurence of a default value should be interpreted - as 'No change prom previous value' - whatever that was. - - This behaviour is not properly supported in this implementation. - */ - - - wconhist->vfp_table = int_vector_alloc( 0 , 0 ); - wconhist->art_lift = double_vector_alloc( 0 , 0); - - wconhist->thp = double_vector_alloc( 0 , 0 ); - wconhist->bhp = double_vector_alloc( 0 , 0 ); - wconhist->wgas_rate = double_vector_alloc( 0 , 0 ); - - return wconhist; -} - - -void wconhist_state_free( wconhist_state_type * wconhist ) { - int_vector_free( wconhist->state ); - int_vector_free( wconhist->cmode ); - int_vector_free( wconhist->vfp_table ); - - double_vector_free( wconhist->oil_rate ); - double_vector_free( wconhist->gas_rate ); - double_vector_free( wconhist->water_rate ); - double_vector_free( wconhist->art_lift ); - double_vector_free( wconhist->thp ); - double_vector_free( wconhist->bhp ); - double_vector_free( wconhist->wgas_rate ); - - free( wconhist ); -} - - -void wconhist_state_free__( void * arg ) { - wconhist_state_free( wconhist_state_safe_cast( arg )); -} - - - -void sched_kw_wconhist_update_state(const sched_kw_wconhist_type * kw , wconhist_state_type * state , const char * well_name , int report_step ) { - - wconhist_well_type * well = sched_kw_wconhist_get_well( kw , well_name ); - if (well != NULL) { - - int_vector_iset_default( state->state , report_step , well->status ); - int_vector_iset_default( state->cmode , report_step , well->cmode ); - double_vector_iset_default( state->oil_rate , report_step , well->orat ); - double_vector_iset_default( state->water_rate , report_step , well->wrat ); - double_vector_iset_default( state->gas_rate , report_step , well->grat ); - int_vector_iset_default( state->vfp_table , report_step , well->vfptable ); - double_vector_iset_default( state->art_lift , report_step , well->alift ); - double_vector_iset_default( state->thp , report_step , well->thp ); - double_vector_iset_default( state->bhp , report_step , well->bhp ); - double_vector_iset_default( state->wgas_rate , report_step , well->wgrat ); - - } -} - - - -void sched_kw_wconhist_close_state( wconhist_state_type * state , int report_step ) { - int_vector_iset_default( state->state , report_step , SHUT ); /* SHUT or STOP?? This will fuck up a bit when what is actually happening is that the well goes over to - WCONPROD control, because the WCONPROD keyword is not internalized at all; so the well be stuck in this - status. */ - int_vector_iset_default( state->cmode , report_step , CM_SHUT ); - /* - If code ever ends up by querying one of the states below here - there is something wrong. - */ - - double_vector_iset_default( state->oil_rate , report_step , -1); - double_vector_iset_default( state->water_rate , report_step , -1); - double_vector_iset_default( state->gas_rate , report_step , -1); - int_vector_iset_default( state->vfp_table , report_step , -1); - double_vector_iset_default( state->art_lift , report_step , -1); - double_vector_iset_default( state->thp , report_step , -1); - double_vector_iset_default( state->bhp , report_step , -1); - double_vector_iset_default( state->wgas_rate , report_step , -1); - -} - - -KW_IMPL(wconhist) diff --git a/ThirdParty/Ert/libsched/src/sched_kw_wconinj.c b/ThirdParty/Ert/libsched/src/sched_kw_wconinj.c deleted file mode 100644 index fdfb0986b9..0000000000 --- a/ThirdParty/Ert/libsched/src/sched_kw_wconinj.c +++ /dev/null @@ -1,126 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_kw_wconinj.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include - -#include -#include -#include - - - -/** - This file implements a very basic support for the WCONINJ - keyword. It internalizes a list of well names, apart from that all - information is just tucked into a untyped keyword. - - This means that all the functionality which is supported by the - sched_kw_wconinj implementation is asking for well names. - - It is an independent implementation - but the original - implementation is PURE COPY AND PASTE from the WCONPROD - implementation. -*/ - - - - - -struct sched_kw_wconinj_struct { - sched_kw_untyped_type * untyped_kw; - stringlist_type * wells; -}; - - - - - -static sched_kw_wconinj_type * sched_kw_wconinj_alloc_empty(bool alloc_untyped) -{ - sched_kw_wconinj_type * kw = util_malloc(sizeof * kw); - kw->wells = stringlist_alloc_new(); - if (alloc_untyped) - kw->untyped_kw = sched_kw_untyped_alloc_empty("WCONINJ" , -1 /* -1: Variable length keyword */ ); - else - kw->untyped_kw = NULL; - return kw; -} - - - -void sched_kw_wconinj_free(sched_kw_wconinj_type * kw) -{ - stringlist_free(kw->wells); - sched_kw_untyped_free(kw->untyped_kw); -} - - -static void sched_kw_wconinj_add_well(sched_kw_wconinj_type * kw , const char * well) { - stringlist_append_copy(kw->wells , well); -} - - - - - -sched_kw_wconinj_type * sched_kw_wconinj_alloc(const stringlist_type * tokens , int * token_index ) { - sched_kw_wconinj_type * kw = sched_kw_wconinj_alloc_empty( true ); - int eokw = false; - do { - stringlist_type * line_tokens = sched_util_alloc_line_tokens( tokens , false , 0 , token_index ); - if (line_tokens == NULL) - eokw = true; - else { - char * well = util_alloc_dequoted_copy( stringlist_iget( line_tokens , 0 ) ); - sched_kw_wconinj_add_well(kw , well); - sched_kw_untyped_add_tokens(kw->untyped_kw , line_tokens); - stringlist_free( line_tokens ); - free( well ); - } - - } while (!eokw); - return kw; -} - - -void sched_kw_wconinj_fprintf(const sched_kw_wconinj_type * kw , FILE * stream) { - sched_kw_untyped_fprintf( kw->untyped_kw , stream ); -} - - -char ** sched_kw_wconinj_alloc_wells_copy( const sched_kw_wconinj_type * kw , int * num_wells) { - *num_wells = stringlist_get_size( kw->wells ); - return stringlist_alloc_char_copy( kw->wells ); -} - -sched_kw_wconinj_type * sched_kw_wconinj_copyc(const sched_kw_wconinj_type * kw) { - util_abort("%s: not implemented ... \n",__func__); - return NULL; -} - - - -/*****************************************************************/ - -KW_IMPL(wconinj) - diff --git a/ThirdParty/Ert/libsched/src/sched_kw_wconinje.c b/ThirdParty/Ert/libsched/src/sched_kw_wconinje.c deleted file mode 100644 index 767966238f..0000000000 --- a/ThirdParty/Ert/libsched/src/sched_kw_wconinje.c +++ /dev/null @@ -1,526 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_kw_wconinje.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - - -#define DEFAULT_INJECTOR_STATE OPEN - -#define SCHED_KW_WCONINJE_ID 99165 -#define WCONINJE_TYPE_ID 5705235 -#define WCONINJE_NUM_KW 10 -#define ECL_DEFAULT_KW "*" - - -struct sched_kw_wconinje_struct { - int __type_id; - vector_type * wells; /* A vector of wconinje_well_type instances. */ -}; - - - -typedef struct { - bool def[WCONINJE_NUM_KW]; /* Has the item been defaulted? */ - - char * name; /* This does NOT support well_name_root or well list notation. */ - sched_phase_enum injector_type; /* Injecting GAS/WATER/OIL */ - well_status_enum status; /* Well is open/shut/??? */ - well_cm_enum cmode; /* How is the well controlled? */ - double surface_flow; - double reservoir_flow; - double BHP_target; - double THP_target; - int vfp_table_nr; - double vapoil_conc; -} wconinje_well_type; - - - - - -struct wconinje_state_struct { - UTIL_TYPE_ID_DECLARATION; - char * well_name; - const time_t_vector_type * time; - int_vector_type * phase; /* Contains values from sched_phase_enum */ - int_vector_type * state; /* Contains values from the well_status_enum. */ - int_vector_type * cmode; /* Contains values from the well_cm_enum. */ - double_vector_type * surface_flow; - double_vector_type * reservoir_flow; - double_vector_type * bhp_limit; - double_vector_type * thp_limit; - int_vector_type * vfp_table_nr; - double_vector_type * vapoil; -}; - - - - -/*****************************************************************/ -/* Implemeentation of the internal wconinje_well_type data type. */ - - - - - - - - - - -static wconinje_well_type * wconinje_well_alloc_empty() -{ - wconinje_well_type * well = util_malloc(sizeof * well); - well->name = NULL; - return well; -} - - - -static void wconinje_well_free(wconinje_well_type * well) -{ - free(well->name); - free(well); -} - - - -static void wconinje_well_free__(void * well) -{ - wconinje_well_free( (wconinje_well_type *) well); -} - - - - - -static wconinje_well_type * wconinje_well_alloc_from_tokens(const stringlist_type * line_tokens ) { - wconinje_well_type * well = wconinje_well_alloc_empty(); - sched_util_init_default( line_tokens , well->def ); - - well->name = util_alloc_string_copy( stringlist_iget( line_tokens , 0 )); - well->injector_type = sched_phase_type_from_string(stringlist_iget(line_tokens , 1)); - well->cmode = sched_types_get_cm_from_string( stringlist_iget( line_tokens , 3 ) , false); - well->surface_flow = sched_util_atof( stringlist_iget( line_tokens , 4 )); - well->reservoir_flow = sched_util_atof(stringlist_iget(line_tokens , 5 )); - well->BHP_target = sched_util_atof(stringlist_iget(line_tokens , 6 )); - well->THP_target = sched_util_atof( stringlist_iget( line_tokens , 7 )); - well->vfp_table_nr = sched_util_atoi( stringlist_iget( line_tokens , 8)); - well->vapoil_conc = sched_util_atof( stringlist_iget( line_tokens , 9 )); - - well->status = sched_types_get_status_from_string( stringlist_iget( line_tokens , 2 )); - if (well->status == DEFAULT) - well->status = DEFAULT_INJECTOR_STATE; - return well; -} - - - -static void wconinje_well_fprintf(const wconinje_well_type * well, FILE * stream) -{ - fprintf(stream, " "); - sched_util_fprintf_qst(well->def[0], well->name , 8, stream); - sched_util_fprintf_qst(well->def[1], sched_phase_type_string(well->injector_type) , 5, stream); /* 5 ?? */ - sched_util_fprintf_qst(well->def[2], sched_types_get_status_string(well->status) , 4, stream); - sched_util_fprintf_qst(well->def[3], sched_types_get_cm_string(well->cmode) , 4, stream); - sched_util_fprintf_dbl(well->def[4], well->surface_flow , 11, 3, stream); - sched_util_fprintf_dbl(well->def[5], well->reservoir_flow , 11, 3, stream); - sched_util_fprintf_dbl(well->def[6], well->BHP_target , 11, 3, stream); - sched_util_fprintf_dbl(well->def[7], well->THP_target , 11, 3, stream); - sched_util_fprintf_int(well->def[8], well->vfp_table_nr , 4, stream); - sched_util_fprintf_dbl(well->def[9], well->vapoil_conc , 11, 3, stream); - fprintf(stream, "/ \n"); -} - - -/*****************************************************************/ - - - - -static sched_kw_wconinje_type * sched_kw_wconinje_alloc_empty() { - sched_kw_wconinje_type * kw = util_malloc(sizeof * kw); - kw->wells = vector_alloc_new(); - kw->__type_id = SCHED_KW_WCONINJE_ID; - return kw; -} - -sched_kw_wconinje_type * sched_kw_wconinje_safe_cast( void * arg ) { - sched_kw_wconinje_type * kw = (sched_kw_wconinje_type * ) arg; - if (kw->__type_id == SCHED_KW_WCONINJE_ID) - return kw; - else { - util_abort("%s: runtime cast failed \n",__func__); - return NULL; - } -} - - - - -void sched_kw_wconinje_free(sched_kw_wconinje_type * kw) -{ - vector_free( kw->wells ); - free(kw); -} - - -static void sched_kw_wconinje_add_well( sched_kw_wconinje_type * kw , const wconinje_well_type * well) { - vector_append_owned_ref(kw->wells , well , wconinje_well_free__); -} - - - - - -sched_kw_wconinje_type * sched_kw_wconinje_alloc(const stringlist_type * tokens , int * token_index ) { - sched_kw_wconinje_type * kw = sched_kw_wconinje_alloc_empty(); - int eokw = false; - do { - stringlist_type * line_tokens = sched_util_alloc_line_tokens( tokens , false , WCONINJE_NUM_KW , token_index ); - if (line_tokens == NULL) - eokw = true; - else { - wconinje_well_type * well = wconinje_well_alloc_from_tokens( line_tokens ); - sched_kw_wconinje_add_well( kw , well ); - stringlist_free( line_tokens ); - } - } while (!eokw); - return kw; -} - - - -void sched_kw_wconinje_fprintf(const sched_kw_wconinje_type * kw , FILE * stream) { - int size = vector_get_size(kw->wells); - - fprintf(stream, "WCONINJE\n"); - for(int i=0; iwells, i); - wconinje_well_fprintf(well, stream); - } - fprintf(stream,"/\n\n"); -} - - - -char ** sched_kw_wconinje_alloc_wells_copy( const sched_kw_wconinje_type * kw , int * num_wells) { - int size = vector_get_size(kw->wells); - - char ** well_names = util_malloc( size * sizeof * well_names ); - for(int i=0; iwells, i); - well_names[i] = util_alloc_string_copy(well->name); - } - *num_wells = size; - return well_names; -} - - - - -/*****************************************************************/ -/* Functions exporting content to be used with the sched_file_update - api. */ - -/** Will return NULL if the well is not present. */ -static wconinje_well_type * sched_kw_wconinje_get_well( const sched_kw_wconinje_type * kw , const char * well_name) { - int size = vector_get_size(kw->wells); - wconinje_well_type * well = NULL; - int index = 0; - do { - wconinje_well_type * iwell = vector_iget( kw->wells , index); - if (strcmp( well_name , iwell->name ) == 0) - well = iwell; - - index++; - } while ((well == NULL) && (index < size)); - return well; -} - - - -double sched_kw_wconinje_get_surface_flow( const sched_kw_wconinje_type * kw , const char * well_name) { - wconinje_well_type * well = sched_kw_wconinje_get_well( kw , well_name ); - if (well != NULL) - return well->surface_flow; - else - return -1; -} - -void sched_kw_wconinje_scale_surface_flow( const sched_kw_wconinje_type * kw , const char * well_name, double factor) { - wconinje_well_type * well = sched_kw_wconinje_get_well( kw , well_name ); - if (well != NULL) - well->surface_flow *= factor; -} - -void sched_kw_wconinje_set_surface_flow( const sched_kw_wconinje_type * kw , const char * well_name , double surface_flow) { - wconinje_well_type * well = sched_kw_wconinje_get_well( kw , well_name ); - if (well != NULL) - well->surface_flow = surface_flow; -} - - - -void sched_kw_wconinje_shift_surface_flow( const sched_kw_wconinje_type * kw , const char * well_name , double delta_surface_flow) { - wconinje_well_type * well = sched_kw_wconinje_get_well( kw , well_name ); - if (well != NULL) - well->surface_flow += delta_surface_flow; -} - - -sched_phase_enum sched_kw_wconinje_get_phase( const sched_kw_wconinje_type * kw , const char * well_name) { - wconinje_well_type * well = sched_kw_wconinje_get_well( kw , well_name ); - if (well != NULL) - return well->injector_type; - else - return -1; -} - - - -bool sched_kw_wconinje_has_well( const sched_kw_wconinje_type * kw , const char * well_name) { - wconinje_well_type * well = sched_kw_wconinje_get_well( kw , well_name ); - if (well == NULL) - return false; - else - return true; -} - - -sched_kw_wconinje_type * sched_kw_wconinje_copyc(const sched_kw_wconinje_type * kw) { - util_abort("%s: not implemented ... \n",__func__); - return NULL; -} - - -bool sched_kw_wconinje_well_open( const sched_kw_wconinje_type * kw, const char * well_name) { - wconinje_well_type * well = sched_kw_wconinje_get_well( kw , well_name ); - if (well == NULL) - return false; - else { - /* OK - we have the well. */ - - if (well->status == OPEN) { - /* The well seems to be open - any rates around? */ - if (well->surface_flow > 0) - return true; - else - return false; - } else - return false; } -} - -/*****************************************************************/ - - -/*****************************************************************/ - -wconinje_state_type * wconinje_state_alloc( const char * well_name , const time_t_vector_type * time) { - wconinje_state_type * wconinje = util_malloc( sizeof * wconinje); - UTIL_TYPE_ID_INIT( wconinje , WCONINJE_TYPE_ID ); - - wconinje->phase = int_vector_alloc( 0 , 0 ); - wconinje->state = int_vector_alloc( 0 , 0 ); /* Default wconinje state ? */ - wconinje->cmode = int_vector_alloc( 0 , 0 ); /* Default control mode ?? */ - wconinje->surface_flow = double_vector_alloc( 0 , 0 ); - wconinje->reservoir_flow = double_vector_alloc( 0 , 0 ); - wconinje->bhp_limit = double_vector_alloc( 0 , 0 ); - wconinje->thp_limit = double_vector_alloc( 0 , 0 ); - wconinje->vfp_table_nr = int_vector_alloc( 0 , 0 ); - wconinje->vapoil = double_vector_alloc( 0 ,0 ); - wconinje->time = time; - wconinje->well_name = util_alloc_string_copy( well_name ); - - return wconinje; -} - - -static UTIL_SAFE_CAST_FUNCTION( wconinje_state , WCONINJE_TYPE_ID ) -static UTIL_SAFE_CAST_FUNCTION_CONST( wconinje_state , WCONINJE_TYPE_ID ) - -void wconinje_state_free( wconinje_state_type * wconinje ) { - - int_vector_free(wconinje->phase); - int_vector_free(wconinje->state); - int_vector_free(wconinje->cmode); - double_vector_free(wconinje->surface_flow); - double_vector_free(wconinje->reservoir_flow); - double_vector_free(wconinje->bhp_limit); - double_vector_free(wconinje->thp_limit); - int_vector_free(wconinje->vfp_table_nr); - double_vector_free(wconinje->vapoil); - free( wconinje->well_name ); - free( wconinje ); - -} - -void wconinje_state_free__( void * arg ) { - wconinje_state_free( wconinje_state_safe_cast( arg )); -} - - - -/** - This function asks for the historical water injection rate; however - this is the WCONINJE keyword, and it is NOT necessarily meaningful - to query this keyword for that rate. To be meaningfull we check the - following conditions: - - 1. We verify that the well is rate-controlled; then the behaviour - of the well should(??) coincide with that of wells specifed by - the WCONINJH keyword. - - 2. We verify that the injected phase is indeed water. - - If these conditions are not met 0 is returned, AND a warning is - written to stderr. -*/ - -double wconinje_state_iget_WWIRH( const void * __state , int report_step ) { - const wconinje_state_type * state = wconinje_state_safe_cast_const( __state ); - sched_phase_enum phase = int_vector_safe_iget( state->phase , report_step ); - well_cm_enum cmode = int_vector_safe_iget( state->cmode , report_step); - - if (( phase == WATER) && (cmode == RATE)) - return double_vector_safe_iget( state->surface_flow , report_step); - else { - if ( phase != WATER ) - fprintf(stderr,"** Warning you have asked for historical water injection rate in well:%s which is not a water injector.\n", state->well_name); - - if ( cmode != RATE ) - fprintf(stderr,"** Warning you have asked for historical water injection rate in well:%s which is not rate controlled - I have no clue?! \n" , state->well_name); - - return 0; - } -} - -/** - See comment above wconinje_state_get_WWIRH(); -*/ -double wconinje_state_iget_WGIRH( const void * __state , int report_step ) { - const wconinje_state_type * state = wconinje_state_safe_cast_const( __state ); - sched_phase_enum phase = int_vector_safe_iget( state->phase , report_step ); - well_cm_enum cmode = int_vector_safe_iget( state->cmode , report_step); - - if (( phase == GAS) && (cmode == RATE)) - return double_vector_safe_iget( state->surface_flow , report_step); - else { - if ( phase != GAS ) - fprintf(stderr,"** Warning you have asked for historical gas injection rate in well:%s(%d) which is not a gas injector.\n", state->well_name, report_step); - - if ( cmode != RATE ) - fprintf(stderr,"** Warning you have asked for historical gas injection rate in well:%s(%d) which is not rate controlled - I have no clue?! \n" , state->well_name, report_step); - - return 0; - } -} - -/** - Will update the input parameter @well_list to contain all the - well_names present in the current sced_kw_wconhist keyword. -*/ - -void sched_kw_wconinje_init_well_list( const sched_kw_wconinje_type * kw , stringlist_type * well_list) { - stringlist_clear( well_list ); - { - int iw; - for (iw = 0; iw < vector_get_size( kw->wells ); iw++) { - const wconinje_well_type * well = vector_iget_const( kw->wells , iw ); - stringlist_append_ref( well_list , well->name ); - } - } -} - - -/** - For production the WCONHIST keyword will (typically) be used for - the historical period, and WCONPROD for the predicton. This can be - used to differentiate between hisorical period and prediction - period. When it comes to injection things are not so clear; - typically the WCONINJE keyword is used both for prediction and - historical period. - - This function will check if all the wells (at least one) in the - WCONINJE keyword are rate-controlled, if so it is interpreted as - beeing in the historical period. -*/ - -bool sched_kw_wconinje_historical( const sched_kw_wconinje_type * kw ) { - bool historical = false; - int iw; - for (iw = 0; iw < vector_get_size( kw->wells ); iw++) { - const wconinje_well_type * well = vector_iget_const( kw->wells , iw ); - if (well->cmode == RATE) { - historical = true; - break; - } - } - return historical; -} - - - - - -void sched_kw_wconinje_update_state( const sched_kw_wconinje_type * kw , wconinje_state_type * state , const char * well_name , int report_step ) { - wconinje_well_type * well = sched_kw_wconinje_get_well( kw , well_name ); - if (well != NULL) { - int_vector_iset_default(state->phase , report_step , well->injector_type ); - int_vector_iset_default(state->state , report_step , well->status); - int_vector_iset_default(state->cmode , report_step , well->cmode); - double_vector_iset_default(state->surface_flow , report_step , well->surface_flow); - double_vector_iset_default(state->reservoir_flow , report_step , well->reservoir_flow); - double_vector_iset_default(state->bhp_limit , report_step , well->BHP_target); - double_vector_iset_default(state->thp_limit , report_step , well->THP_target); - int_vector_iset_default(state->vfp_table_nr , report_step , well->vfp_table_nr); - double_vector_iset_default(state->vapoil , report_step , well->vapoil_conc); - } -} - - -void sched_kw_wconinje_close_state(wconinje_state_type * state , int report_step ) { - fprintf(stderr,"** Warning: %s not implemented \n",__func__); - //int_vector_iset_default( state->state , report_step , SHUT ); /* SHUT or STOP ?? */ - //double_vector_iset_default(state->injection_rate , report_step , -1 ); - //double_vector_iset_default(state->bhp , report_step , -1 ); - //double_vector_iset_default(state->thp , report_step , -1 ); - //int_vector_iset_default(state->vfp_table_nr , report_step , -1 ); - //double_vector_iset_default(state->vapoil , report_step , -1 ); -} - - - - - -KW_IMPL(wconinje) diff --git a/ThirdParty/Ert/libsched/src/sched_kw_wconinjh.c b/ThirdParty/Ert/libsched/src/sched_kw_wconinjh.c deleted file mode 100644 index 42e954bb03..0000000000 --- a/ThirdParty/Ert/libsched/src/sched_kw_wconinjh.c +++ /dev/null @@ -1,436 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_kw_wconinjh.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#define WCONINJH_TYPE_ID 88163977 -#define WCONINJH_NUM_KW 8 - - -struct sched_kw_wconhist_struct{ - vector_type * wells; -}; - - -typedef struct wconinjh_well_struct wconinjh_well_type; - - - -struct wconinjh_well_struct{ - /* - def: Read as defaulted, not defined! - */ - bool def[WCONINJH_NUM_KW]; - - char * name; - sched_phase_enum inj_phase; - well_status_enum status; - double inj_rate; - double bhp; - double thp; - int vfptable; - double vapdiscon; -}; - - -struct wconinjh_state_struct { - UTIL_TYPE_ID_DECLARATION; - const time_t_vector_type * time; - int_vector_type * phase; /* Contains values from sched_phase_enum */ - int_vector_type * state; /* Contains values from the well_status_enum. */ - double_vector_type * injection_rate; - double_vector_type * bhp; - double_vector_type * thp; - int_vector_type * vfp_table_nr; - double_vector_type * vapoil; -}; - - - -static wconinjh_well_type * wconinjh_well_alloc_empty() -{ - wconinjh_well_type * well = util_malloc(sizeof * well); - well->name = NULL; - return well; -} - - - -static void wconinjh_well_free(wconinjh_well_type * well) -{ - free(well->name); - free(well); -} - - - -static void wconinjh_well_free__(void * well) -{ - wconinjh_well_free( (wconinjh_well_type *) well); -} - - - -/** Will return NULL if the well is not present. */ -static wconinjh_well_type * sched_kw_wconinjh_get_well( const sched_kw_wconinjh_type * kw , const char * well_name) { - int size = vector_get_size(kw->wells); - wconinjh_well_type * well = NULL; - int index = 0; - do { - wconinjh_well_type * iwell = vector_iget( kw->wells , index); - if (strcmp( well_name , iwell->name ) == 0) - well = iwell; - - index++; - } while ((well == NULL) && (index < size)); - return well; -} - - -static void wconinjh_well_fprintf(const wconinjh_well_type * well, FILE * stream) -{ - fprintf(stream, " "); - sched_util_fprintf_qst(well->def[0], well->name , 8 , stream); - sched_util_fprintf_qst(well->def[1], sched_phase_type_string(well->inj_phase) , 5 , stream); - sched_util_fprintf_qst(well->def[2], sched_types_get_status_string(well->status) , 4 , stream); - sched_util_fprintf_dbl(well->def[3], well->inj_rate , 9 , 3 , stream); - sched_util_fprintf_dbl(well->def[4], well->bhp , 9 , 3 , stream); - sched_util_fprintf_dbl(well->def[5], well->thp , 9 , 3 , stream); - sched_util_fprintf_int(well->def[6], well->vfptable , 4 , stream); - sched_util_fprintf_dbl(well->def[7], well->vapdiscon , 9 , 3 , stream); - fprintf(stream, "/\n"); -} - - - - - - - - - -static wconinjh_well_type * wconinjh_well_alloc_from_tokens(const stringlist_type * line_tokens ) { - - wconinjh_well_type * well = wconinjh_well_alloc_empty(); - sched_util_init_default( line_tokens , well->def ); - - well->name = util_alloc_string_copy(stringlist_iget(line_tokens , 0)); - well->inj_phase = sched_phase_type_from_string(stringlist_iget(line_tokens , 1)); - well->status = sched_types_get_status_from_string(stringlist_iget(line_tokens , 2)); - well->inj_rate = sched_util_atof(stringlist_iget(line_tokens , 3)); - well->bhp = sched_util_atof(stringlist_iget(line_tokens , 4)); - well->thp = sched_util_atof(stringlist_iget(line_tokens , 5)); - well->vfptable = sched_util_atoi(stringlist_iget(line_tokens , 6)); - well->vapdiscon = sched_util_atof(stringlist_iget(line_tokens , 7)); - - return well; -} - - - -static hash_type * wconinjh_well_export_obs_hash(const wconinjh_well_type * well) { - hash_type * obs_hash = hash_alloc(); - - if(!well->def[3]) - { - switch(well->inj_phase) - { - case(WATER): - hash_insert_double(obs_hash, "WWIR", well->inj_rate); - break; - case(GAS): - hash_insert_double(obs_hash, "WGIR", well->inj_rate); - break; - case(OIL): - hash_insert_double(obs_hash, "WOIR", well->inj_rate); - break; - default: - break; - } - } - if(!well->def[4]) - hash_insert_double(obs_hash, "WBHP", well->bhp); - if(!well->def[5]) - hash_insert_double(obs_hash, "WTHP", well->thp); - - return obs_hash; -} - - -static void sched_kw_wconinjh_add_well( sched_kw_wconinjh_type * kw , wconinjh_well_type * well) { - vector_append_owned_ref(kw->wells , well , wconinjh_well_free__); -} - - - -static sched_kw_wconinjh_type * sched_kw_wconinjh_alloc_empty() -{ - sched_kw_wconinjh_type * kw = util_malloc(sizeof * kw); - kw->wells = vector_alloc_new(); - return kw; -} - - - -/***********************************************************************/ - - -sched_kw_wconinjh_type * sched_kw_wconinjh_alloc(const stringlist_type * tokens , int * token_index ) { - sched_kw_wconinjh_type * kw = sched_kw_wconinjh_alloc_empty(); - int eokw = false; - do { - stringlist_type * line_tokens = sched_util_alloc_line_tokens( tokens , false, WCONINJH_NUM_KW , token_index ); - if (line_tokens == NULL) - eokw = true; - else { - wconinjh_well_type * well = wconinjh_well_alloc_from_tokens( line_tokens ); - sched_kw_wconinjh_add_well( kw , well ); - stringlist_free( line_tokens ); - } - } while (!eokw); - return kw; -} - - -void sched_kw_wconinjh_free(sched_kw_wconinjh_type * kw) -{ - vector_free(kw->wells); - free(kw); -} - - - -void sched_kw_wconinjh_fprintf(const sched_kw_wconinjh_type * kw, FILE * stream) -{ - int size = vector_get_size(kw->wells); - - fprintf(stream, "WCONINJH\n"); - for(int i=0; iwells, i ); - wconinjh_well_fprintf(well, stream); - } - fprintf(stream,"/\n\n"); -} - - - - -/***********************************************************************/ - - - -hash_type * sched_kw_wconinjh_alloc_well_obs_hash(const sched_kw_wconinjh_type * kw) -{ - hash_type * well_hash = hash_alloc(); - - int num_wells = vector_get_size(kw->wells); - - for(int well_nr=0; well_nrwells, well_nr); - hash_type * obs_hash = wconinjh_well_export_obs_hash(well); - hash_insert_hash_owned_ref(well_hash, well->name, obs_hash, hash_free__); - } - - return well_hash; -} - -sched_kw_wconinjh_type * sched_kw_wconinjh_copyc(const sched_kw_wconinjh_type * kw) { - util_abort("%s: not implemented ... \n",__func__); - return NULL; -} - - -/*****************************************************************/ - -void sched_kw_wconinjh_init_well_list( const sched_kw_wconinjh_type * kw , stringlist_type * well_list) { - stringlist_clear( well_list ); - { - int iw; - for (iw = 0; iw < stringlist_get_size( well_list ); iw++) { - const wconinjh_well_type * well = vector_iget_const( kw->wells , iw ); - stringlist_append_ref( well_list , well->name ); - } - } -} - - - - -/*****************************************************************/ - -wconinjh_state_type * wconinjh_state_alloc( const time_t_vector_type* time) { - wconinjh_state_type * wconinjh = util_malloc( sizeof * wconinjh); - UTIL_TYPE_ID_INIT( wconinjh , WCONINJH_TYPE_ID ); - - wconinjh->time = time; - wconinjh->phase = int_vector_alloc( 0 , 0 ); - wconinjh->state = int_vector_alloc( 0 , 0 ); /* Default wconinjh state ? */ - wconinjh->injection_rate = double_vector_alloc( 0 , 0 ); - wconinjh->bhp = double_vector_alloc( 0 , 0 ); - wconinjh->thp = double_vector_alloc( 0 , 0 ); - wconinjh->vfp_table_nr = int_vector_alloc( 0 , 0 ); - wconinjh->vapoil = double_vector_alloc( 0 ,0 ); - - return wconinjh; -} - -UTIL_SAFE_CAST_FUNCTION( wconinjh_state , WCONINJH_TYPE_ID ) -UTIL_SAFE_CAST_FUNCTION_CONST( wconinjh_state , WCONINJH_TYPE_ID ) - -void wconinjh_state_free( wconinjh_state_type * wconinjh ) { - - int_vector_free( wconinjh->phase ); - int_vector_free( wconinjh->state ); - double_vector_free( wconinjh->injection_rate ); - double_vector_free( wconinjh->bhp ); - double_vector_free( wconinjh->thp ); - int_vector_free( wconinjh->vfp_table_nr ); - double_vector_free( wconinjh->vapoil ); - - free( wconinjh ); -} - - - -void wconinjh_state_free__( void * arg ) { - wconinjh_state_free( wconinjh_state_safe_cast( arg )); -} - - -/** - memnonic ?? -*/ - - -sched_phase_enum wconinjh_state_iget_phase( const wconinjh_state_type * state , int report_step) { - return int_vector_safe_iget( state->phase , report_step ); -} - - -well_status_enum wconinjh_state_iget_status( const wconinjh_state_type * state , int report_step ) { - return int_vector_safe_iget( state->state , report_step ); -} - -/** - Water injection rate - will return 0.0 if inj_phase == GAS. -*/ - -double wconinjh_state_iget_WWIRH( const void * __state , int report_step) { - const wconinjh_state_type * state = wconinjh_state_safe_cast_const( __state ); - if (wconinjh_state_iget_phase( state , report_step ) == WATER) - return double_vector_safe_iget( state->injection_rate , report_step); - else - return 0.0; -} - - -/** - Gas injection rate - will return 0.0 if inj_phase == WATER. -*/ - -double wconinjh_state_iget_WGIRH( const void * __state , int report_step) { - const wconinjh_state_type * state = wconinjh_state_safe_cast_const( __state ); - if (wconinjh_state_iget_phase( state , report_step ) == GAS) - return double_vector_safe_iget( state->injection_rate , report_step); - else - return 0.0; -} - - -/** - OIL injection rate - will return 0.0 if inj_phase == WATER|GAS -*/ - -double wconinjh_state_iget_WOIRH( const void * __state , int report_step) { - const wconinjh_state_type * state = wconinjh_state_safe_cast_const( __state ); - if (wconinjh_state_iget_phase( state , report_step ) == OIL) - return double_vector_safe_iget( state->injection_rate , report_step); - else - return 0.0; -} - - - -double wconinjh_state_iget_WBHPH( const void * __state , int report_step) { - const wconinjh_state_type * state = wconinjh_state_safe_cast_const( __state ); - return double_vector_safe_iget( state->bhp , report_step ); -} - - -double wconinjh_state_iget_WTHPH( const void * __state , int report_step) { - const wconinjh_state_type * state = wconinjh_state_safe_cast_const( __state ); - return double_vector_safe_iget( state->thp , report_step ); -} - -/** Memnonic ??*/ -double wconinjh_state_iget_WVPRH( const void * __state , int report_step) { - const wconinjh_state_type * state = wconinjh_state_safe_cast_const( __state ); - return double_vector_safe_iget( state->vapoil , report_step ); -} - - -int wconinjh_state_iget_vfp_table_nr( const wconinjh_state_type * state , int report_step) { - return int_vector_safe_iget( state->vfp_table_nr , report_step ); -} - - - - -void sched_kw_wconinjh_close_state(wconinjh_state_type * state , int report_step ) { - int_vector_iset_default( state->state , report_step , SHUT ); /* SHUT or STOP ?? */ - double_vector_iset_default(state->injection_rate , report_step , -1 ); - double_vector_iset_default(state->bhp , report_step , -1 ); - double_vector_iset_default(state->thp , report_step , -1 ); - int_vector_iset_default(state->vfp_table_nr , report_step , -1 ); - double_vector_iset_default(state->vapoil , report_step , -1 ); -} - - -void sched_kw_wconinjh_update_state( const sched_kw_wconinjh_type * kw , wconinjh_state_type * state , const char * well_name , int report_step ) { - wconinjh_well_type * well = sched_kw_wconinjh_get_well( kw , well_name ); - if (well != NULL) { - int_vector_iset_default(state->phase , report_step , well->inj_phase ); - int_vector_iset_default(state->state , report_step , well->status ); - double_vector_iset_default(state->injection_rate , report_step , well->inj_rate); - double_vector_iset_default(state->bhp , report_step , well->bhp); - double_vector_iset_default(state->thp , report_step , well->thp); - int_vector_iset_default(state->vfp_table_nr , report_step , well->vfptable); - double_vector_iset_default(state->vapoil , report_step , well->vapdiscon); - } -} - - - - -/***********************************************************************/ -KW_IMPL(wconinjh) diff --git a/ThirdParty/Ert/libsched/src/sched_kw_wconprod.c b/ThirdParty/Ert/libsched/src/sched_kw_wconprod.c deleted file mode 100644 index 07a9549544..0000000000 --- a/ThirdParty/Ert/libsched/src/sched_kw_wconprod.c +++ /dev/null @@ -1,134 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_kw_wconprod.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include - -#include -#include -#include - - - - -/** - This file implements a very basic support for the WCONPROD - keyword. It internalizes a list of well names, apart from that all - information is just tucked into a untyped keyword. - - This means that all the functionality which is sppurted by the - sched_kw_wconprod implementation is asking for well names. -*/ - - - - -struct sched_kw_wconprod_struct { - sched_kw_untyped_type * untyped_kw; - stringlist_type * wells; -}; - - - - - -static sched_kw_wconprod_type * sched_kw_wconprod_alloc_empty(bool alloc_untyped) -{ - sched_kw_wconprod_type * kw = util_malloc(sizeof * kw); - kw->wells = stringlist_alloc_new(); - if (alloc_untyped) - kw->untyped_kw = sched_kw_untyped_alloc_empty("WCONPROD" , -1 /* -1: Variable length keyword */); - else - kw->untyped_kw = NULL; - return kw; -} - - - -void sched_kw_wconprod_free(sched_kw_wconprod_type * kw) -{ - stringlist_free( kw->wells ); - sched_kw_untyped_free(kw->untyped_kw); - free( kw ); -} - - -static void sched_kw_wconprod_add_well(sched_kw_wconprod_type * kw , const char * well) { - stringlist_append_copy(kw->wells , well); -} - - - - - -sched_kw_wconprod_type * sched_kw_wconprod_alloc(const stringlist_type * tokens , int * token_index ) { - sched_kw_wconprod_type * kw = sched_kw_wconprod_alloc_empty( true ); - int eokw = false; - do { - stringlist_type * line_tokens = sched_util_alloc_line_tokens( tokens , true , 0 , token_index ); - if (line_tokens == NULL) - eokw = true; - else { - char * well = util_alloc_dequoted_copy( stringlist_iget( line_tokens , 0 ) ); - sched_kw_wconprod_add_well(kw , well); - sched_kw_untyped_add_tokens(kw->untyped_kw , line_tokens); - stringlist_free( line_tokens ); - free( well ); - } - - } while (!eokw); - return kw; -} - - -void sched_kw_wconprod_fprintf(const sched_kw_wconprod_type * kw , FILE * stream) { - sched_kw_untyped_fprintf( kw->untyped_kw , stream ); -} - - -char ** sched_kw_wconprod_alloc_wells_copy( const sched_kw_wconprod_type * kw , int * num_wells) { - *num_wells = stringlist_get_size( kw->wells ); - return stringlist_alloc_char_copy( kw->wells ); -} - - -sched_kw_wconprod_type * sched_kw_wconprod_copyc(const sched_kw_wconprod_type * kw) { - util_abort("%s: not implemented ... \n",__func__); - return NULL; -} - - -void sched_kw_wconprod_init_well_list( const sched_kw_wconprod_type * kw , stringlist_type * well_list) { - stringlist_clear( well_list ); - { - int iw; - for (iw = 0; iw < stringlist_get_size( kw->wells ); iw++) - stringlist_append_ref( well_list , stringlist_iget( kw->wells , iw) ); - } -} - - - -/*****************************************************************/ - -KW_IMPL(wconprod) - diff --git a/ThirdParty/Ert/libsched/src/sched_kw_welspecs.c b/ThirdParty/Ert/libsched/src/sched_kw_welspecs.c deleted file mode 100644 index c78a8fafda..0000000000 --- a/ThirdParty/Ert/libsched/src/sched_kw_welspecs.c +++ /dev/null @@ -1,507 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_kw_welspecs.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include - - - -/* - TODO - - Create lookup STRING -> ENUM for all types and fix all strcmp! - -*/ - -/* - Define the maximum number of keywords in a WELSPEC record. - Note that this includes FrontSim and ECLIPSE 300 KWs. -*/ -#define WELSPECS_NUM_KW 16 -#define ECL_DEFAULT_KW "*" - - -#define DEFAULT_INFLOW_EQUATION IE_STD -#define DEFAULT_AUTO_SHUT_TYPE AS_SHUT -#define DEFAULT_CROSSFLOW_ABILITY CF_YES -#define DEFAULT_HDSTAT_TYPE HD_SEG - - -struct sched_kw_welspecs_struct -{ - vector_type * welspec_list; -}; - - -/* - See ECLIPSE Reference Manual, section WELSPECS for an explantion of - the members in the welspec_type struct. -*/ - -typedef enum {PH_OIL , PH_WAT , PH_GAS , PH_LIQ} phase_type; -#define PH_OIL_STRING "OIL" -#define PH_WAT_STRING "WATER" -#define PH_GAS_STRING "GAS" -#define PH_LIQ_STRING "LIQ" - - - -typedef enum {IE_STD, IE_NO, IE_RG, IE_YES, IE_PP, IE_GPP} inflow_eq_type; -#define IE_STD_STRING "STD" -#define IE_NO_STRING "NO" -#define IE_RG_STRING "R-G" -#define IE_YES_STRING "YES" -#define IE_PP_STRING "P-P" -#define IE_GPP_STRING "GPP" - - - -typedef enum {AS_STOP, AS_SHUT} auto_shut_type; -#define AS_STOP_STRING "STOP" -#define AS_SHUT_STRING "SHUT" - - - -typedef enum {CF_YES, CF_NO} crossflow_type; -#define CF_YES_STRING "YES" -#define CF_NO_STRING "NO" - -typedef enum {HD_SEG, HD_AVG} hdstat_head_type; -#define HD_SEG_STRING "SEG" -#define HD_AVG_STRING "AVG" - -typedef struct -{ - /* - def : Read as defaulted, not as defined. - */ - bool def[WELSPECS_NUM_KW]; - - char * name; - char * group; - int hh_i; - int hh_j; - double md; - phase_type phase; - double drain_rad; - inflow_eq_type inflow_eq; - auto_shut_type auto_shut; - crossflow_type crossflow; - int pvt_region; - hdstat_head_type hdstat_head; - int fip_region; - char * fs_kw1; - char * fs_kw2; - char * ecl300_kw; -} welspec_type; - - - -static char * get_phase_string(phase_type phase) -{ - switch(phase) - { - case(PH_OIL): - return PH_OIL_STRING; - case(PH_WAT): - return PH_WAT_STRING; - case(PH_GAS): - return PH_GAS_STRING; - case(PH_LIQ): - return PH_LIQ_STRING; - default: - return ECL_DEFAULT_KW; - } -}; - - - -static char * get_inflow_eq_string(inflow_eq_type eq) -{ - switch(eq) - { - case(IE_STD): - return IE_STD_STRING; - case(IE_NO): - return IE_NO_STRING; - case(IE_RG): - return IE_NO_STRING; - case(IE_YES): - return IE_YES_STRING; - case(IE_PP): - return IE_PP_STRING; - case(IE_GPP): - return IE_GPP_STRING; - default: - return ECL_DEFAULT_KW; - } -}; - - - -static char * get_auto_shut_string(auto_shut_type as) -{ - switch(as) - { - case(AS_STOP): - return AS_STOP_STRING; - case(AS_SHUT): - return AS_SHUT_STRING; - default: - return ECL_DEFAULT_KW; - } -}; - - - -static char * get_crossflow_string(crossflow_type cf) -{ - switch(cf) - { - case(CF_YES): - return CF_YES_STRING; - case(CF_NO): - return CF_NO_STRING; - default: - return ECL_DEFAULT_KW; - } -} - - - -static char * get_hdstat_head_string(hdstat_head_type hd) -{ - switch(hd) - { - case(HD_SEG): - return HD_SEG_STRING; - case(HD_AVG): - return HD_AVG_STRING; - default: - return ECL_DEFAULT_KW; - } -}; - - - -static inflow_eq_type get_inflow_eq_from_string(const char * string) -{ - if(strcmp(string , IE_STD_STRING) == 0) - return IE_STD; - else if(strcmp(string, IE_NO_STRING) == 0) - return IE_NO; - else if(strcmp(string, IE_RG_STRING) == 0) - return IE_RG; - else if(strcmp(string, IE_YES_STRING) == 0) - return IE_YES; - else if(strcmp(string, IE_PP_STRING) == 0) - return IE_PP; - else if(strcmp(string, IE_GPP_STRING) == 0) - return IE_GPP; - else if (strcmp(string , SCHED_KW_DEFAULT_ITEM) == 0) - return DEFAULT_INFLOW_EQUATION; - else - util_abort("%s: Inflow equation %s not recognized - aborting.\n",__func__, string); - return IE_STD; -} - - - -/* No default is defined according to the documentation. */ -static phase_type get_phase_from_string(const char * string) -{ - if(strcmp(string , PH_OIL_STRING) == 0) - return PH_OIL; - else if(strcmp(string, PH_WAT_STRING) == 0) - return PH_WAT; - else if(strcmp(string, PH_GAS_STRING) == 0) - return PH_GAS; - else if(strcmp(string, PH_LIQ_STRING) == 0) - return PH_LIQ; - else - util_abort("%s: Phase %s not recognized - aborting.\n",__func__,string); - return 0; -} - - - -static auto_shut_type get_auto_shut_from_string(const char * string) -{ - if(strcmp(string, AS_STOP_STRING) == 0) - return AS_STOP; - else if (strcmp(string,AS_SHUT_STRING) == 0) - return AS_SHUT; - else if (strcmp(string , SCHED_KW_DEFAULT_ITEM) == 0) - return DEFAULT_AUTO_SHUT_TYPE; - else - util_abort("%s: Automatic shut-in mode %s not recognized - aborting.\n",__func__,string); - return 0; -} - - - -static crossflow_type get_crossflow_from_string(const char * string) -{ - if(strcmp(string ,CF_YES_STRING) == 0) - return CF_YES; - else if(strcmp(string,CF_NO_STRING) == 0) - return CF_NO; - else if(strcmp(string,SCHED_KW_DEFAULT_ITEM) == 0) - return DEFAULT_CROSSFLOW_ABILITY; - else - util_abort("%s: Crossflow ability mode %s not recognized - aborting.\n",__func__,string); - return 0; -} - - - -static hdstat_head_type get_hdstat_head_from_string(const char * string) -{ - if(strcmp(string ,HD_SEG_STRING) == 0) - return HD_SEG; - else if(strcmp(string,HD_AVG_STRING) == 0) - return HD_AVG; - else if(strcmp(string,SCHED_KW_DEFAULT_ITEM) == 0) - return DEFAULT_HDSTAT_TYPE; - else - util_abort("%s: Hydrostatic head model %s not recognized - aborting.\n",__func__,string); - return 0; -} - - - -static void welspec_sched_fprintf(const welspec_type * ws, FILE * stream) -{ - fprintf(stream, " "); - sched_util_fprintf_qst(ws->def[0] , ws->name , 8, stream); - sched_util_fprintf_qst(ws->def[1] , ws->group , 8, stream); - sched_util_fprintf_int(ws->def[2] , ws->hh_i , 4, stream); - sched_util_fprintf_int(ws->def[3] , ws->hh_j , 4, stream); - sched_util_fprintf_dbl(ws->def[4] , ws->md , 8, 3, stream); - sched_util_fprintf_qst(ws->def[5] , get_phase_string(ws->phase) , 5, stream); - sched_util_fprintf_dbl(ws->def[6] , ws->drain_rad , 8, 3, stream); - sched_util_fprintf_qst(ws->def[7] , get_inflow_eq_string(ws->inflow_eq) , 3, stream); - sched_util_fprintf_qst(ws->def[8] , get_auto_shut_string(ws->auto_shut) , 4, stream); - sched_util_fprintf_qst(ws->def[9] , get_crossflow_string(ws->crossflow) , 3, stream); - sched_util_fprintf_int(ws->def[10] , ws->pvt_region , 4, stream); - sched_util_fprintf_qst(ws->def[11] , get_hdstat_head_string(ws->hdstat_head) , 3, stream); - sched_util_fprintf_int(ws->def[12] , ws->fip_region , 4, stream); - /* - sched_util_fprintf_qst(ws->def[13] , ws->fs_kw1 , 8, stream); - sched_util_fprintf_qst(ws->def[14] , ws->fs_kw2 , 8, stream); - sched_util_fprintf_qst(ws->def[15] , ws->ecl300_kw , 8, stream); - */ - fprintf(stream,"/\n"); -}; - - - -static welspec_type * welspec_alloc_empty() -{ - welspec_type *ws = util_malloc(sizeof *ws); - - ws->name = NULL; - ws->group = NULL; - ws->fs_kw1 = NULL; - ws->fs_kw2 = NULL; - ws->ecl300_kw = NULL; - - return ws; -} - - - - - - -static void welspec_free(welspec_type * ws) -{ - free(ws->group ); - util_safe_free(ws->fs_kw1 ); - util_safe_free(ws->fs_kw2 ); - util_safe_free(ws->ecl300_kw); - free(ws->name); - free(ws); -}; - - - -static void welspec_free__(void * __ws) -{ - welspec_type * ws = (welspec_type *) __ws; - welspec_free(ws); -}; - - - - -static welspec_type * welspec_alloc_from_tokens(const stringlist_type * line_tokens ) -{ - welspec_type * ws = welspec_alloc_empty(); - sched_util_init_default( line_tokens , ws->def ); - ws->name = util_alloc_string_copy(stringlist_iget( line_tokens , 0)); - - if(ws->def[1]) - ws->group = util_alloc_string_copy("FIELD"); - else - ws->group = util_alloc_string_copy(stringlist_iget( line_tokens , 1 )); - - ws->hh_i = sched_util_atoi(stringlist_iget( line_tokens , 2)); - ws->hh_j = sched_util_atoi(stringlist_iget( line_tokens , 3)); - ws->md = sched_util_atof(stringlist_iget( line_tokens , 4)); - ws->phase = get_phase_from_string(stringlist_iget( line_tokens , 5)); - ws->drain_rad = sched_util_atof(stringlist_iget( line_tokens , 6)); - ws->inflow_eq = get_inflow_eq_from_string(stringlist_iget( line_tokens , 7)); - ws->auto_shut = get_auto_shut_from_string(stringlist_iget( line_tokens , 8)); - ws->crossflow = get_crossflow_from_string(stringlist_iget( line_tokens , 9)); - ws->pvt_region = sched_util_atoi(stringlist_iget( line_tokens , 10)); - ws->hdstat_head = get_hdstat_head_from_string(stringlist_iget( line_tokens , 11)); - ws->fip_region = sched_util_atoi(stringlist_iget( line_tokens , 12)); - - ws->fs_kw1 = util_alloc_string_copy(stringlist_iget( line_tokens , 13)); /* Reserved for use with FRONTSIM */ - ws->fs_kw2 = util_alloc_string_copy(stringlist_iget( line_tokens , 14)); /* Reserved for use with FRONTSIM */ - ws->ecl300_kw = util_alloc_string_copy(stringlist_iget( line_tokens , 15)); /* Could not find this in the dcoumentation ...??? */ - - return ws; -}; - - - - - - -static sched_kw_welspecs_type * sched_kw_welspecs_alloc_empty() -{ - sched_kw_welspecs_type * kw = util_malloc(sizeof * kw ); - kw->welspec_list = vector_alloc_new(); - return kw; -}; - - -static void sched_kw_welspecs_add_well( sched_kw_welspecs_type * kw , const welspec_type * ws) { - vector_append_owned_ref( kw->welspec_list , ws , welspec_free__ ); -} - - -/*****************************************************************************/ - - -sched_kw_welspecs_type * sched_kw_welspecs_alloc(const stringlist_type * tokens , int * token_index ) { - sched_kw_welspecs_type * kw = sched_kw_welspecs_alloc_empty(); - int eokw = false; - do { - stringlist_type * line_tokens = sched_util_alloc_line_tokens( tokens , false , WELSPECS_NUM_KW , token_index ); - if (line_tokens == NULL) - eokw = true; - else { - welspec_type * well = welspec_alloc_from_tokens( line_tokens ); - sched_kw_welspecs_add_well( kw , well ); - stringlist_free( line_tokens ); - } - - } while (!eokw); - return kw; -} - - - - -void sched_kw_welspecs_free(sched_kw_welspecs_type * kw) -{ - vector_free(kw->welspec_list); - free(kw); -}; - - - -void sched_kw_welspecs_fprintf(const sched_kw_welspecs_type * kw, FILE * stream) -{ - fprintf(stream, "WELSPECS\n"); - int i; - for (i=0; i < vector_get_size( kw->welspec_list ); i++) { - const welspec_type * ws = vector_iget_const( kw->welspec_list , i ); - welspec_sched_fprintf(ws, stream); - } - fprintf(stream,"/\n\n"); -}; - - - - -void sched_kw_welspecs_init_child_parent_list( const sched_kw_welspecs_type * kw , stringlist_type * child , stringlist_type * parent) { - stringlist_clear( child ); - stringlist_clear( parent ); - { - for (int i=0; i < vector_get_size( kw->welspec_list ); i++) { - const welspec_type * well = vector_iget_const(kw->welspec_list , i); - stringlist_append_ref( child , well->name ); - - if (!well->def[1]) - stringlist_append_ref( parent , well->group ); - else - stringlist_append_ref( parent , FIELD_GROUP ); - - } - } -} - - - - -void sched_kw_welspecs_alloc_child_parent_list(const sched_kw_welspecs_type * kw, char *** __children, char *** __parents, int * num_pairs) -{ - int num_wells = vector_get_size(kw->welspec_list); - char ** children = util_malloc(num_wells * sizeof * children); - char ** parents = util_malloc(num_wells * sizeof * parents); - - for(int well_nr = 0; well_nr < num_wells; well_nr++) - { - const welspec_type * well = vector_iget_const(kw->welspec_list , well_nr); - children[well_nr] = util_alloc_string_copy(well->name); - if(!well->def[1]) - parents[well_nr] = util_alloc_string_copy(well->group); - else - parents[well_nr] = util_alloc_string_copy("FIELD"); - } - - *num_pairs = num_wells; - *__children = children; - *__parents = parents; -} - - -sched_kw_welspecs_type * sched_kw_welspecs_copyc(const sched_kw_welspecs_type * kw) { - util_abort("%s: not implemented ... \n",__func__); - return NULL; -} - - - -/***********************************************************************/ - -KW_IMPL(welspecs) diff --git a/ThirdParty/Ert/libsched/src/sched_time.c b/ThirdParty/Ert/libsched/src/sched_time.c deleted file mode 100644 index 612baae633..0000000000 --- a/ThirdParty/Ert/libsched/src/sched_time.c +++ /dev/null @@ -1,112 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_time.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include - -#include -#include - -/*****************************************************************/ - -/** - The sched_time_type is an attempt at unifiing the DATES and TSTEP - keywords; they are both related to stepping forward in time. For a - reasonable control over the timestepping we need (at least) two - pieces of information: - - 1. What is true time at the start/end of the current step. - 2. How long is the step. - - The DATES keywords give the true time at the end of the step, - whereas the TSTEP keyword gives the length of the step. -*/ - -#define SCHED_TIME_TYPE_ID 66195407 - -struct sched_time_struct { - UTIL_TYPE_ID_DECLARATION; - time_t date; - double tstep_length; /* Length of TSTEP - in days. */ - sched_time_enum time_type; -}; - - - - -sched_time_type * sched_time_alloc( time_t date , double tstep_length , sched_time_enum time_type ) { - sched_time_type * time_node = util_malloc( sizeof * time_node ); - UTIL_TYPE_ID_INIT( time_node , SCHED_TIME_TYPE_ID ); - time_node->time_type = time_type; - time_node->tstep_length = tstep_length; - time_node->date = date; - - return time_node; -} - -static UTIL_SAFE_CAST_FUNCTION( sched_time , SCHED_TIME_TYPE_ID ) - -void sched_time_free( sched_time_type * time_node ) { - free( time_node ); -} - -void sched_time_free__( void * arg ) { - sched_time_free( sched_time_safe_cast( arg )); -} - - -time_t sched_time_get_date( const sched_time_type * time_node ) { - return time_node->date; -} - - -/** - This function will return the true time at the end of this step, - for a time_node which represents a DATES instance the function will - just return the actual date, for a TSTEP it will step forward - starting at the input @current_time. -*/ - -time_t sched_time_get_target( const sched_time_type * time_node , time_t current_time) { - time_t target; - - switch( time_node->time_type ) { - case( DATES_TIME ): - target = time_node->date; - break; - case( TSTEP_TIME ): - target = current_time; - util_inplace_forward_days_utc( &target , time_node->tstep_length ); - break; - default: - util_abort("%s: invalid time_type value:%d \n",__func__ , time_node->time_type ); - } - - return target; -} - - - -time_t sched_time_get_type( const sched_time_type * time_node ) { - return time_node->time_type; -} - diff --git a/ThirdParty/Ert/libsched/src/sched_types.c b/ThirdParty/Ert/libsched/src/sched_types.c deleted file mode 100644 index 4d98aff14b..0000000000 --- a/ThirdParty/Ert/libsched/src/sched_types.c +++ /dev/null @@ -1,261 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_types.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include - -#include - -#include - -#define SCHED_KW_DEFAULT_ITEM "*" - - -#define TYPE_WATER_STRING "WATER" -#define TYPE_GAS_STRING "GAS" -#define TYPE_OIL_STRING "OIL" - -const char * sched_phase_type_string(sched_phase_enum type) { - switch (type) { - case(WATER): - return TYPE_WATER_STRING; - case(GAS): - return TYPE_GAS_STRING; - case(OIL): - return TYPE_OIL_STRING; - default: - return SCHED_KW_DEFAULT_ITEM; - } -} - -sched_phase_enum sched_phase_type_from_string(const char * type_string) { - if (strcmp(type_string , TYPE_WATER_STRING) == 0) - return WATER; - else if (strcmp(type_string , TYPE_GAS_STRING) == 0) - return GAS; - else if (strcmp(type_string , TYPE_OIL_STRING) == 0) - return OIL; - else { - util_abort("%s: Could not recognize:%s as injector phase. Valid values are: [%s, %s, %s] \n",__func__ , type_string , TYPE_WATER_STRING , TYPE_GAS_STRING , TYPE_OIL_STRING); - return 0; - } -} - - -/*****************************************************************/ - - -#define WCONHIST_STRING "WCONHIST" -#define DATES_STRING "DATES" -#define COMPDAT_STRING "COMPDAT" -#define TSTEP_STRING "TSTEP" -#define TIME_STRING "TIME" -#define WELSPECS_STRING "WELSPECS" -#define GRUPTREE_STRING "GRUPTREE" -#define INCLUDE_STRING "INCLUDE" -#define WCONINJ_STRING "WCONINJ" -#define WCONINJE_STRING "WCONINJE" -#define WCONINJH_STRING "WCONINJH" -#define WCONPROD_STRING "WCONPROD" - -#define UNTYPED_STRING "UNTYPED" - - - - - -/** - This function does a direct translation of a string name to - implementation type - i.e. an enum instance. Observe that - (currently) no case-normalization is performed. -*/ - -sched_kw_type_enum sched_kw_type_from_string(const char * kw_name) -{ - sched_kw_type_enum kw_type = UNTYPED; - - if ( strcmp(kw_name, GRUPTREE_STRING ) == 0) kw_type = GRUPTREE ; - else if( strcmp(kw_name, TSTEP_STRING ) == 0) kw_type = TSTEP ; - else if( strcmp(kw_name, INCLUDE_STRING ) == 0) kw_type = INCLUDE ; - else if( strcmp(kw_name, TIME_STRING ) == 0) kw_type = TIME ; - else if( strcmp(kw_name, DATES_STRING ) == 0) kw_type = DATES ; - else if( strcmp(kw_name, WCONHIST_STRING ) == 0) kw_type = WCONHIST ; - else if( strcmp(kw_name, WELSPECS_STRING ) == 0) kw_type = WELSPECS ; - else if( strcmp(kw_name, WCONINJ_STRING ) == 0) kw_type = WCONINJ ; - else if( strcmp(kw_name, WCONINJE_STRING ) == 0) kw_type = WCONINJE ; - else if( strcmp(kw_name, WCONINJH_STRING ) == 0) kw_type = WCONINJH ; - else if( strcmp(kw_name, WCONPROD_STRING ) == 0) kw_type = WCONPROD ; - else if( strcmp(kw_name, COMPDAT_STRING ) == 0) kw_type = COMPDAT ; - - return kw_type; -} - - -const char * sched_kw_type_name(sched_kw_type_enum kw_type) { - if ( kw_type == GRUPTREE ) return GRUPTREE_STRING ; - else if ( kw_type == TSTEP ) return TSTEP_STRING ; - else if ( kw_type == INCLUDE ) return INCLUDE_STRING ; - else if ( kw_type == TIME ) return TIME_STRING ; - else if ( kw_type == DATES ) return DATES_STRING ; - else if ( kw_type == WCONHIST ) return WCONHIST_STRING ; - else if ( kw_type == WELSPECS ) return WELSPECS_STRING ; - else if ( kw_type == WCONINJ ) return WCONINJ_STRING ; - else if ( kw_type == WCONINJE ) return WCONINJE_STRING ; - else if ( kw_type == WCONINJH ) return WCONINJH_STRING ; - else if ( kw_type == WCONPROD ) return WCONPROD_STRING ; - else if ( kw_type == COMPDAT ) return COMPDAT_STRING ; - - return UNTYPED_STRING; /* Unknown type */ -} - - -/*****************************************************************/ - -#define STATUS_OPEN_STRING "OPEN" -#define STATUS_STOP_STRING "STOP" -#define STATUS_SHUT_STRING "SHUT" -#define STATUS_AUTO_STRING "AUTO" - - -const char * sched_types_get_status_string(well_status_enum status) -{ - switch(status) { - case(OPEN): - return STATUS_OPEN_STRING; - case(STOP): - return STATUS_STOP_STRING; - case(SHUT): - return STATUS_SHUT_STRING; - case(AUTO): - return STATUS_AUTO_STRING; - case(DEFAULT): - return SCHED_KW_DEFAULT_ITEM; - default: - util_abort("%s: invalid status:%d \n",__func__ , status ); - return 0; - } -} - - - -well_status_enum sched_types_get_status_from_string(const char * st_string) -{ - if (strcmp( st_string , SCHED_KW_DEFAULT_ITEM ) == 0) - return DEFAULT; - /* - Must be checked by calling scope whether DEFAULT is a valid - return - and then subsequently apply the correct value. - */ - else if( strcmp(st_string, STATUS_OPEN_STRING) == 0) - return OPEN; - else if( strcmp(st_string, STATUS_STOP_STRING) == 0) - return STOP; - else if( strcmp(st_string, STATUS_SHUT_STRING) == 0) - return SHUT; - else if( strcmp(st_string, STATUS_AUTO_STRING) == 0) - return AUTO; - else - { - util_abort("%s: Could not recognize %s as a well status.\n", __func__, st_string); - return 0; - } -} - - -/*****************************************************************/ - - -const char * sched_types_get_cm_string( well_cm_enum cm ) { - switch(cm) { - case( RESV ): - return CM_RESV_STRING; - break; - case( RATE ): - return CM_RATE_STRING; - break; - case( BHP ): - return CM_BHP_STRING; - break; - case( THP ): - return CM_THP_STRING; - break; - case( GRUP ): - return CM_GRUP_STRING; - break; - case( ORAT ): - return CM_ORAT_STRING; - break; - case( WRAT ): - return CM_WRAT_STRING; - break; - case( GRAT ): - return CM_GRAT_STRING; - break; - case( LRAT ): - return CM_LRAT_STRING; - break; - default: - util_abort("%s: invalid value: %s \n", cm ); - return 0; - } -} - - - - -/** - Must use the strncmp(x,x,4) function for comparison, because - suddenly files with control mode 'GRUP ' appear; and ECLIPSE - appearantly eats that nicely. -*/ - - -well_cm_enum sched_types_get_cm_from_string(const char * cm_string , bool wconhist) -{ - if (wconhist) { - if( strcmp(cm_string, CM_ORAT_STRING) == 0) - return ORAT; - else if(strcmp(cm_string, CM_WRAT_STRING) == 0) - return WRAT; - else if(strcmp(cm_string, CM_GRAT_STRING) == 0) - return GRAT; - else if(strcmp(cm_string, CM_LRAT_STRING) == 0) - return LRAT; - else if(strcmp(cm_string, CM_RESV_STRING) == 0) - return RESV; - else { - util_abort("%s: Could not recognize %s as a control mode.\n", __func__, cm_string); - return 0; - } - } else { - if( strncmp(cm_string, CM_RATE_STRING , 4) == 0) - return RATE; - else if(strncmp(cm_string, CM_RESV_STRING , 4) == 0) - return RESV; - else if(strncmp(cm_string, CM_BHP_STRING , 4) == 0) - return BHP; - else if(strncmp(cm_string, CM_THP_STRING, 4) == 0) - return THP; - else if(strncmp(cm_string, CM_GRUP_STRING , 4) == 0) - return GRUP; - else { - util_abort("%s: Could not recognize \'%s\' as a control mode. Valid values are: [%s, %s, %s, %s, %s] \n", __func__, cm_string, - CM_RATE_STRING , CM_RESV_STRING , CM_BHP_STRING, CM_THP_STRING, CM_GRUP_STRING); - return 0; - } - } -} diff --git a/ThirdParty/Ert/libsched/src/sched_util.c b/ThirdParty/Ert/libsched/src/sched_util.c deleted file mode 100644 index 54667586aa..0000000000 --- a/ThirdParty/Ert/libsched/src/sched_util.c +++ /dev/null @@ -1,359 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'sched_util.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include -#include - -#include -#include - -#include - -/** - This file implements small utility functions used by the rest of - the libsched library. -*/ - - -static const int strip_comment = 1; -static const int strip_space = 2; - - -static char * strip_line_alloc(const char * line) { - const char comment_char = '-'; - const char *space = " \t"; - const int strip_mode = strip_comment + strip_space; - char * new_line = NULL; - int offset, length,pos; - bool cont , quote_on , dash_on; /* The quote_on variable protects againts premature termination based on '/' in path specifications. */ - - /* Strip intial white-space */ - if (strip_mode & strip_space) - offset = strspn(line , space); - else - offset = 0; - - - dash_on = false; - quote_on = false; - cont = true; - length = 0; - if (line[offset] != '\0') { - pos = offset; - do { - if (line[pos] == '\'' || line[pos] == '"') - quote_on = !quote_on; - - if (strip_mode & strip_comment) { - if (!quote_on) { - if (line[pos] == comment_char) { - if (dash_on) { - cont = false; - length = pos - offset - 1; - } else - dash_on = true; - } else - dash_on = false; - } - } - - if (cont) { - if (pos == (strlen(line) - 1)) { - length = pos - offset + 1; - cont = false; - } - } - - if (cont) - pos++; - } while (cont); - - /* - Remove trailing space: - */ - - if (strip_mode & strip_space) { - if (offset + length > 0) { - while (line[offset + length - 1] == ' ') - length--; - } - } - - if (length > 0) - new_line = util_realloc_substring_copy(NULL , &line[offset] , length); - else - new_line = NULL; - - } - - return new_line; -} - - -/*****************************************************************/ - - - -char * sched_util_alloc_line(FILE *stream , bool *at_eof) { - char *tmp_line = util_fscanf_alloc_line(stream , at_eof); - char * line = strip_line_alloc( tmp_line ); - - free(tmp_line); - return line; -} - - - - - - -/** - * We parse up to the terminating '/' - but it is NOT included in the returned string - - The num_tokens variable is only used to fill up with defaults at the end. -*/ -stringlist_type * sched_util_alloc_line_tokens( const stringlist_type * tokens , bool untyped , int num_tokens , int * __token_index ) { - /** First part - identify the right start/end of the token list */ - stringlist_type * line_tokens = NULL; - int token_index = *__token_index; - int token_length = stringlist_get_size( tokens ); - int line_start; - int line_end; - bool at_eokw = false; - { - line_start = token_index; - const char * current_token; - { - bool at_eol = false; - do { - current_token = stringlist_iget( tokens , token_index ); - if (strcmp( current_token , "/" ) == 0) - at_eol = true; - - token_index++; - - // The schedule file is not correctly terminated with a "/". - if (token_index == token_length) - at_eol = true; - - } while (!at_eol); - } - line_end = token_index; - if ((line_end - line_start) == 1) - /* - This line *only* contained a terminating '/'. This marks the - end of the kewyord. - */ - at_eokw = true; - } - - - /* Second part - filling in with defaults+++ */ - if (!at_eokw) { - line_tokens = stringlist_alloc_new( ); - if (untyped) { /* In case of untyped we basically do nothing with the content - even keeping the trailing '/'. */ - int it; - for (it = line_start; it < line_end; it++) { - const char * token = stringlist_iget( tokens , it ); - stringlist_append_copy(line_tokens , token ); - } - } else { - int it; - for (it = line_start; it < (line_end - 1); it++) { - const char * token = stringlist_iget( tokens , it ); - char * dequoted_token = util_alloc_dequoted_copy( token ); - - if (util_string_equal( dequoted_token , SCHED_KW_DEFAULT_ITEM )) /* The item is just '*' */ - stringlist_append_copy(line_tokens , SCHED_KW_DEFAULT_ITEM ); - else { - char repeated_value[32]; - long int items; - if (sscanf(dequoted_token , "%ld*%s" , &items , repeated_value) == 2) { /* It is a '5*8.60' item - i.e. the value 8.60 repeated five times. */ - int counter = 0; - do { - stringlist_append_copy(line_tokens , repeated_value); - counter++; - } while ( counter < items ); - } else { - char * star_ptr = (char *) dequoted_token; - items = strtol(dequoted_token , &star_ptr , 10); /* The item is a repeated default: '5*' */ - if (star_ptr != token && util_string_equal( star_ptr , SCHED_KW_DEFAULT_ITEM )) { - for (int i=0; i < items; i++) - stringlist_append_copy( line_tokens , SCHED_KW_DEFAULT_ITEM ); - } else /* The item is a non-default value. */ - stringlist_append_copy(line_tokens , dequoted_token ); - } - } - free( dequoted_token ); - } - } - } - - - /** Skip trailing garbage */ - sched_util_skip_trailing_tokens( tokens , &token_index ); - sched_util_skip_newline( tokens , &token_index ); - - /* Append default items at the end until we have num_tokens length. */ - if (line_tokens != NULL) { - while (stringlist_get_size( line_tokens ) < num_tokens) - stringlist_append_copy( line_tokens , SCHED_KW_DEFAULT_ITEM ); - } - - *__token_index = token_index; - return line_tokens; -} - - - - -void sched_util_fprintf_default(int width , FILE * stream) { - fprintf(stream , "1*"); - for (int i=0; i < (width - 2); i++) - fputc(' ' , stream); -} - - -/** - All the sched_util_fprintf_xxx() functions start by putting out one - ' ', to ensure against overlapping fields. -*/ - - -void sched_util_fprintf_dbl(bool def, double value , int width , int dec , FILE *stream) { - fputc(' ' , stream); - if (def) - sched_util_fprintf_default( width , stream); - else - util_fprintf_double(value , width , dec , 'f' , stream); -} - - - -void sched_util_fprintf_int(bool def, int value , int width , FILE *stream) { - fputc(' ' , stream); - if (def) { - sched_util_fprintf_default( width , stream); - } else - util_fprintf_int(value , width , stream); -} - - -/* - The formatting is ridicolusly inflexible - don't touch this shit. -*/ - -void sched_util_fprintf_qst(bool def, const char *s , int width , FILE *stream) { - fputc(' ' , stream); - if (def) { - sched_util_fprintf_default( width , stream ); - } else { - for (int i=0; i < (width - strlen(s)); i++) - fputc(' ' , stream); - - fprintf(stream , "\'%s\'" , s); - } -} - - - -/** - The atof / atoi functions accept either 'NULL' or '*' as default - values, in that case numeric 0 is returned. -*/ - -double sched_util_atof(const char *token) { - if (token != NULL) { - double value = 0; - if (!util_string_equal( token , SCHED_KW_DEFAULT_ITEM)) { - if (!util_sscanf_double(token , &value)) - util_abort("%s: failed to parse:\"%s\" as floating point number. \n",__func__ , token); - } - return value; - } else - return 0.0; -} - - - -int sched_util_atoi(const char *token) { - if (token != NULL) { - int value = 0; - if (!util_string_equal( token , SCHED_KW_DEFAULT_ITEM)) { - if (!util_sscanf_int(token , &value)) - util_abort("%s: failed to parse:\"%s\" as integer \n",__func__ , token); - } - return value; - } else - return 0; -} - - - -/* Simple utility function used for debugging. */ -void sched_util_fprintf_tokenlist(int num_token , const char ** token_list , const bool * def) { - int i; - for (i = 0; i < num_token; i++) { - if (def[i]) - fprintf(stdout , " \'*\' " ); - else - fprintf(stdout , " \'%s\' " , token_list[i]); - } - fprintf(stdout , "\n"); -} - - - -/** - This should repeatedly skip tokens until the token_index points to - a newline. Should return with token_index pointing at the first newline character. -*/ - -void sched_util_skip_trailing_tokens( const stringlist_type * tokens , int * __token_index ) { - int token_index = *__token_index; - int len = stringlist_get_size( tokens ); - while ( (token_index < len) && (!stringlist_iequal( tokens , token_index , "\n"))) { - token_index++; - } - *__token_index = token_index; -} - - -void sched_util_skip_newline( const stringlist_type * tokens , int * __token_index ) { - int token_index = *__token_index; - int len = stringlist_get_size( tokens ); - while ( (token_index < len) && (stringlist_iequal( tokens , token_index , "\n"))) { - token_index++; - } - *__token_index = token_index; -} - - - - - -void sched_util_init_default(const stringlist_type * line_tokens , bool * def) { - int i; - for (i = 0; i < stringlist_get_size( line_tokens ); i++) { - if (util_string_equal( stringlist_iget( line_tokens , i ) , SCHED_KW_DEFAULT_ITEM)) - def[i] = true; - else - def[i] = false; - } -} diff --git a/ThirdParty/Ert/libsched/src/tests/sched_test_01.SCH b/ThirdParty/Ert/libsched/src/tests/sched_test_01.SCH deleted file mode 100644 index dd72f07a20..0000000000 --- a/ThirdParty/Ert/libsched/src/tests/sched_test_01.SCH +++ /dev/null @@ -1,2371 +0,0 @@ -SKIPREST - - -GRUPTREE - 'OREI' 'FIELD' / - 'TARB' 'FIELD' / - 'RFTWELLS' 'FIELD' / - 'NESS' 'FIELD' / - 'ORE' 'FIELD' / -/ - -WELSPECS - 'C-21' 'NESS' 21 27 1* 'OIL' 1* 1* 1* 'YES' 1* 1* 1* / -/ - -COMPDAT - 'C-21' 21 27 7 7 'OPEN' 1* 0.010 0.216 0.818 2* 'Y' 8.192 / - 'C-21' 21 27 8 8 'OPEN' 1* 0.037 0.216 3.030 2* 'Y' 8.931 / - 'C-21' 21 27 9 9 'OPEN' 1* 34.630 0.216 2817.208 2* 'Y' 8.436 / - 'C-21' 21 28 9 9 'OPEN' 1* 14.497 0.216 1168.521 2* 'Y' 8.105 / - 'C-21' 21 28 10 10 'OPEN' 1* 42.936 0.216 3544.366 2* 'Y' 8.995 / - 'C-21' 21 28 11 11 'OPEN' 1* 42.429 0.216 3500.982 2* 'Y' 8.977 / - 'C-21' 21 28 12 12 'OPEN' 1* 42.342 0.216 3495.926 2* 'Y' 9.002 / - 'C-21' 21 28 13 13 'OPEN' 1* 29.462 0.216 2431.726 2* 'Y' 8.990 / - 'C-21' 21 28 14 14 'OPEN' 1* 5.991 0.216 486.714 2* 'Y' 8.384 / - 'C-21' 21 28 15 15 'OPEN' 1* 46.367 0.216 3788.829 2* 'Y' 8.601 / - 'C-21' 21 28 16 16 'OPEN' 1* 32.257 0.216 2655.136 2* 'Y' 8.881 / -/ - -WCONHIST - 'C-21' 'OPEN' 'RESV' 1224.545 4.455 160283.364 1* 1* 1* 1* 1* / -/ - -DATES - 26 'OCT' 1993 / -/ - -WCONHIST - 'C-21' 'OPEN' 'RESV' 1387.167 4.833 181534.167 1* 1* 1* 1* 1* / -/ - -DATES - 01 'NOV' 1993 / -/ - -WCONHIST - 'C-21' 'OPEN' 'RESV' 1689.071 7.500 219186.718 1* 1* 1* 1* 1* / -/ - -DATES - 15 'NOV' 1993 / -/ - -WCONHIST - 'C-21' 'OPEN' 'RESV' 1873.813 7.750 242244.937 1* 1* 1* 1* 1* / -/ - -DATES - 01 'DEC' 1993 / -/ - -WCONHIST - 'C-21' 'OPEN' 'RESV' 1884.467 6.933 262115.000 1* 1* 1* 1* 1* / -/ - -DATES - 16 'DEC' 1993 / -/ - -WELSPECS - 'C-18AT2' 'NESS' 37 26 1* 'OIL' 1* 1* 1* 'YES' 1* 1* 1* / -/ - -COMPDAT - 'C-18AT2' 36 26 7 7 'OPEN' 1* 68.922 0.216 5481.595 2* 'X' 7.653 / - 'C-18AT2' 36 26 8 8 'OPEN' 1* 89.467 0.216 7026.742 2* 'X' 7.256 / - 'C-18AT2' 36 26 9 9 'OPEN' 1* 25.025 0.216 1958.073 2* 'X' 7.142 / - 'C-18AT2' 36 27 9 9 'OPEN' 1* 67.656 0.216 5325.417 2* 'X' 7.324 / - 'C-18AT2' 36 27 10 10 'OPEN' 1* 57.636 0.216 4508.869 2* 'X' 7.137 / - 'C-18AT2' 36 27 12 12 'OPEN' 1* 48.558 0.216 3834.346 2* 'Y' 7.423 / - 'C-18AT2' 36 27 13 13 'OPEN' 1* 76.818 0.216 6094.799 2* 'X' 7.574 / - 'C-18AT2' 36 27 14 14 'OPEN' 1* 78.248 0.216 6196.442 2* 'Y' 7.513 / - 'C-18AT2' 36 27 15 15 'OPEN' 1* 18.304 0.216 1476.768 2* 'X' 8.138 / - 'C-18AT2' 35 27 15 15 'OPEN' 1* 52.068 0.216 4153.243 2* 'Y' 7.749 / - 'C-18AT2' 35 27 16 16 'OPEN' 1* 5.124 0.216 404.276 2* 'Y' 7.395 / -/ - -WCONHIST - 'C-18AT2' 'OPEN' 'RESV' 1877.125 72.750 256186.375 1* 1* 1* 1* 1* / - 'C-21' 'OPEN' 'RESV' 1591.000 2.875 217475.000 1* 1* 1* 1* 1* / -/ - -DATES - 24 'DEC' 1993 / -/ - -WCONHIST - 'C-18AT2' 'OPEN' 'RESV' 1787.000 3.500 223750.750 1* 1* 1* 1* 1* / - 'C-21' 'OPEN' 'RESV' 2038.625 3.875 274779.250 1* 1* 1* 1* 1* / -/ - -DATES - 01 'JAN' 1994 / -/ - -WCONHIST - 'C-18AT2' 'OPEN' 'RESV' 1581.258 3.290 199459.420 1* 1* 1* 1* 1* / - 'C-21' 'OPEN' 'RESV' 1124.032 2.226 153597.742 1* 1* 1* 1* 1* / -/ - -DATES - 01 'FEB' 1994 / -/ - -WCONHIST - 'C-18AT2' 'OPEN' 'RESV' 2186.607 2.643 273473.857 1* 1* 1* 1* 1* / - 'C-21' 'OPEN' 'ORAT' 676.000 0.000 76898.000 1* 1* 1* 1* 1* / -/ - -DATES - 01 'MAR' 1994 / -/ - -WCONHIST - 'C-18AT2' 'OPEN' 'RESV' 2348.900 1.400 281540.300 1* 1* 1* 1* 1* / -/ - -DATES - 11 'MAR' 1994 / -/ - -WELSPECS - 'C-22' 'NESS' 25 10 1* 'OIL' 1* 1* 1* 'YES' 1* 1* 1* / -/ - -COMPDAT - 'C-22' 25 11 4 4 'OPEN' 1* 0.006 0.216 0.542 2* 'Y' 10.016 / - 'C-22' 25 11 5 5 'OPEN' 1* 47.218 0.216 3948.662 2* 'Y' 9.529 / - 'C-22' 25 11 6 6 'OPEN' 1* 49.888 0.216 4103.013 2* 'Y' 8.849 / - 'C-22' 25 11 7 7 'OPEN' 1* 44.747 0.216 3779.700 2* 'Y' 9.968 / - 'C-22' 25 11 8 8 'OPEN' 1* 46.326 0.216 3882.668 2* 'Y' 9.625 / - 'C-22' 25 11 9 9 'OPEN' 1* 14.678 0.216 1238.033 2* 'Y' 9.903 / -/ - -WCONHIST - 'C-18AT2' 'OPEN' 'RESV' 1736.429 1.143 214222.810 1* 1* 1* 1* 1* / -/ - -WCONINJH - 'C-22' 'GAS' 'OPEN' 479677.143 4* / -/ - -WEFAC - 'C-22' 0.050 1* / -/ - -DATES - 01 'APR' 1994 / -/ - -WCONHIST - 'C-18AT2' 'OPEN' 'RESV' 1754.233 1.033 222623.866 1* 1* 1* 1* 1* / -/ - -WCONINJH - 'C-22' 'GAS' 'OPEN' 558840.566 4* / -/ - -DATES - 01 'MAY' 1994 / -/ - -WCONHIST - 'C-18AT2' 'OPEN' 'RESV' 1620.290 1.032 203119.097 1* 1* 1* 1* 1* / -/ - -WCONINJH - 'C-22' 'GAS' 'OPEN' 651149.646 4* / -/ - -DATES - 01 'JUN' 1994 / -/ - -WCONHIST - 'C-18AT2' 'OPEN' 'RESV' 882.867 0.667 115927.967 1* 1* 1* 1* 1* / -/ - -WCONINJH - 'C-22' 'GAS' 'OPEN' 243341.733 4* / -/ - -DATES - 01 'JUL' 1994 / -/ - -WCONHIST - 'C-18AT2' 'OPEN' 'RESV' 1886.778 1.111 248306.333 1* 1* 1* 1* 1* / -/ - -WCONINJH - 'C-21' 'OIL' 'OPEN' 792.000 4* / - 'C-22' 'GAS' 'OPEN' 819116.111 4* / -/ - -DATES - 10 'JUL' 1994 / -/ - -WCONHIST - 'C-18AT2' 'OPEN' 'RESV' 1649.136 1.182 223808.136 1* 1* 1* 1* 1* / -/ - -WCONINJH - 'C-22' 'GAS' 'OPEN' 646226.818 4* / -/ - -DATES - 01 'AUG' 1994 / -/ - -WCONHIST - 'C-18AT2' 'OPEN' 'RESV' 1652.355 1.323 222730.581 1* 1* 1* 1* 1* / -/ - -WCONINJH - 'C-22' 'GAS' 'OPEN' 605224.871 4* / -/ - -DATES - 01 'SEP' 1994 / -/ - -WCONHIST - 'C-18AT2' 'OPEN' 'RESV' 1426.167 2.633 193760.133 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 156246.400 5* / -/ - -DATES - 01 'OCT' 1994 / -/ - -WCONHIST - 'C-18AT2' 'OPEN' 'RESV' 766.161 1.968 100942.774 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 18869.387 5* / -/ - -DATES - 01 'NOV' 1994 / -/ - -WCONHIST - 'C-18AT2' 'OPEN' 'RESV' 795.533 2.300 104841.267 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 90.467 5* / -/ - -DATES - 01 'DEC' 1994 / -/ - -WCONHIST - 'C-18AT2' 'OPEN' 'RESV' 0.000 0.000 0.000 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 195342.387 5* / -/ - -DATES - 01 'JAN' 1995 / -/ - -WCONHIST - 'C-18AT2' 'OPEN' 'RESV' 227.484 0.548 29827.323 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-21' 'OIL' 'OPEN' 'RATE' 193.000 4* 140.000 / - 'C-22' 'GAS' 'OPEN' 'RATE' 3.000 5* / -/ - -DATES - 01 'FEB' 1995 / -/ - -WCONHIST - 'C-18AT2' 'OPEN' 'RESV' 68.821 0.571 9703.643 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 99263.250 5* / -/ - -DATES - 01 'MAR' 1995 / -/ - -WCONHIST - 'C-18AT2' 'OPEN' 'RESV' 0.000 0.000 0.000 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 0.000 5* / -/ - -DATES - 05 'MAR' 1995 / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 154601.223 5* / -/ - -DATES - 01 'APR' 1995 / -/ - -WCONHIST - 'C-18AT2' 'OPEN' 'RESV' 80.700 0.067 10955.633 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 334557.733 5* / -/ - -DATES - 01 'MAY' 1995 / -/ - -WCONHIST - 'C-18AT2' 'OPEN' 'RESV' 0.000 0.000 0.000 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 11822.000 5* / -/ - -DATES - 03 'MAY' 1995 / -/ - -WELSPECS - 'C-19' 'NESS' 39 14 1* 'OIL' 1* 1* 1* 'YES' 1* 1* 1* / -/ - -COMPDAT - 'C-19' 35 23 13 13 'OPEN' 1* 229.211 0.216 17591.568 2* 'Y' 6.592 / - 'C-19' 35 23 14 14 'OPEN' 1* 42.518 0.216 3286.223 2* 'Y' 6.786 / - 'C-19' 35 24 15 15 'OPEN' 1* 49.616 0.216 3818.562 2* 'Y' 6.668 / - 'C-19' 35 24 16 16 'OPEN' 1* 148.076 0.216 11340.899 2* 'Y' 6.536 / - 'C-19' 35 25 16 16 'OPEN' 1* 0.164 0.216 12.543 2* 'Y' 6.514 / - 'C-19' 34 25 16 16 'OPEN' 1* 128.420 0.216 9830.735 2* 'Y' 6.523 / - 'C-19' 34 25 15 15 'OPEN' 1* 137.101 0.216 10497.277 2* 'Y' 6.528 / - 'C-19' 34 26 15 15 'OPEN' 1* 71.365 0.216 5444.541 2* 'Y' 6.433 / - 'C-19' 34 26 14 14 'OPEN' 1* 423.367 0.216 32285.266 2* 'Y' 6.421 / - 'C-19' 33 26 14 14 'OPEN' 1* 68.448 0.216 5231.526 2* 'Y' 6.481 / - 'C-19' 33 27 14 14 'OPEN' 1* 36.744 0.216 2805.661 2* 'Y' 6.455 / - 'C-19' 33 27 13 13 'OPEN' 1* 354.667 0.216 27036.137 2* 'Y' 6.411 / - 'C-19' 33 27 12 12 'OPEN' 1* 100.458 0.216 7650.032 2* 'Y' 6.385 / - 'C-19' 33 28 12 12 'OPEN' 1* 207.460 0.216 15797.470 2* 'Y' 6.383 / - 'C-19' 32 28 12 12 'OPEN' 1* 103.805 0.216 7940.809 2* 'Y' 6.504 / - 'C-19' 32 28 11 11 'OPEN' 1* 247.786 0.216 18955.656 2* 'Y' 6.505 / - 'C-19' 32 28 10 10 'OPEN' 1* 15.303 0.216 1169.531 2* 'Y' 6.479 / - 'C-19' 32 29 10 10 'OPEN' 1* 234.073 0.216 17885.273 2* 'Y' 6.473 / - 'C-19' 32 29 9 9 'OPEN' 1* 229.050 0.216 17487.535 2* 'Y' 6.452 / -/ - -WCONHIST - 'C-18AT2' 'OPEN' 'RESV' 724.200 0.400 97579.200 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 1539.000 0.200 217940.000 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 80904.400 5* / -/ - -DATES - 08 'MAY' 1995 / -/ - -WELOPEN - 'C-18AT2' 'SHUT' 5* / -/ - -WCONHIST - 'C-18AT2' 'OPEN' 'RESV' 0.000 0.000 0.000 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 0.000 0.000 0.000 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 1397129.958 5* / -/ - -DATES - 01 'JUN' 1995 / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 1231730.867 5* / -/ - -DATES - 01 'JUL' 1995 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 743.806 0.903 98001.065 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-21' 'OIL' 'OPEN' 'RATE' 185.000 4* 140.000 / - 'C-22' 'GAS' 'OPEN' 'RATE' 1056146.097 5* / -/ - -DATES - 01 'AUG' 1995 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1407.419 1.355 187173.000 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 828277.161 5* / -/ - -DATES - 01 'SEP' 1995 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1508.367 1.533 202018.233 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 1143498.596 5* / -/ - -DATES - 01 'OCT' 1995 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1498.774 3.484 201044.645 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 747797.940 5* / -/ - -DATES - 01 'NOV' 1995 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1793.867 4.967 235738.933 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 6199.333 5* / -/ - -DATES - 01 'DEC' 1995 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1663.613 4.000 213511.581 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 25271.548 5* / -/ - -DATES - 01 'JAN' 1996 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1775.194 4.935 240048.999 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-21' 'OIL' 'OPEN' 'RATE' 631.000 4* 140.000 / - 'C-22' 'GAS' 'OPEN' 'RATE' 140338.484 5* / -/ - -DATES - 01 'FEB' 1996 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1652.724 2.241 222332.586 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 950214.931 5* / -/ - -DATES - 01 'MAR' 1996 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1725.484 9.290 230628.806 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 2084133.706 5* / -/ - -DATES - 01 'APR' 1996 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 526.000 6.167 71888.300 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 1933211.663 5* / -/ - -DATES - 01 'MAY' 1996 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 0.000 0.000 0.000 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 1013670.933 5* / -/ - -DATES - 14 'MAY' 1996 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 274.889 0.333 36549.611 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 1589912.667 5* / -/ - -DATES - 01 'JUN' 1996 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1536.467 2.467 204058.100 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 1554288.467 5* / -/ - -DATES - 01 'JUL' 1996 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1613.581 3.032 218370.516 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-21' 'OIL' 'OPEN' 'RATE' 218.000 4* 140.000 / - 'C-22' 'GAS' 'OPEN' 'RATE' 1235698.871 5* / -/ - -DATES - 01 'AUG' 1996 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1036.452 5.290 139989.097 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 1371492.000 5* / -/ - -DATES - 01 'SEP' 1996 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1251.400 12.300 159855.400 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 1322016.400 5* / -/ - -DATES - 01 'OCT' 1996 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1060.097 9.548 133908.323 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 1416153.194 5* / -/ - -DATES - 01 'NOV' 1996 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 282.067 2.400 38423.667 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 1457440.167 5* / -/ - -DATES - 01 'DEC' 1996 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 913.968 8.290 112852.935 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 1271679.935 5* / -/ - -DATES - 01 'JAN' 1997 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1035.258 4.774 136802.323 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-21' 'WATER' 'OPEN' 'RATE' 30.000 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1639220.968 5* / -/ - -DATES - 01 'FEB' 1997 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1124.571 3.250 144670.929 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 1550006.964 5* / -/ - -DATES - 01 'MAR' 1997 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1175.258 3.323 154152.548 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 1482430.452 5* / -/ - -DATES - 01 'APR' 1997 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 431.567 1.167 59562.733 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 1238856.135 5* / -/ - -DATES - 01 'MAY' 1997 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 0.000 0.000 0.000 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 1466411.577 5* / -/ - -DATES - 27 'MAY' 1997 / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 1364049.800 5* / -/ - -DATES - 01 'JUN' 1997 / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 1101468.800 5* / -/ - -DATES - 01 'JUL' 1997 / -/ - -WCONHIST - 'C-21' 'OPEN' 'ORAT' 218.000 121.000 28240.000 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 1478819.677 5* / -/ - -DATES - 01 'AUG' 1997 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 568.677 0.548 72328.065 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 1380280.839 5* / -/ - -DATES - 01 'SEP' 1997 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1262.267 1.067 165176.733 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 1439918.967 5* / -/ - -DATES - 01 'OCT' 1997 / -/ - -WELSPECS - 'C-5' 'NESS' 13 8 1* 'OIL' 1* 1* 1* 'YES' 1* 1* 1* / -/ - -COMPDAT - 'C-5' 13 8 14 14 'OPEN' 1* 13.245 0.216 1224.200 2* 'Y' 15.284 / - 'C-5' 13 8 15 15 'OPEN' 1* 39.248 0.216 3513.834 2* 'Y' 13.074 / - 'C-5' 13 8 16 16 'OPEN' 1* 38.694 0.216 3553.848 2* 'Y' 14.801 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1429.968 1.065 188085.065 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 11034.381 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1431240.968 5* / -/ - -DATES - 01 'NOV' 1997 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1258.786 1.000 163203.286 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 0.000 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1435134.286 5* / -/ - -DATES - 15 'NOV' 1997 / -/ - -WELSPECS - 'C-13AT2' 'NESS' 19 18 1* 'OIL' 1* 1* 1* 'YES' 1* 1* 1* / -/ - -COMPDAT - 'C-13AT2' 29 34 9 9 'OPEN' 1* 121.326 0.216 9346.453 2* 'X' 6.694 / - 'C-13AT2' 29 35 9 9 'OPEN' 1* 375.257 0.216 28875.219 2* 'X' 6.663 / - 'C-13AT2' 30 35 9 9 'OPEN' 1* 138.022 0.216 10675.971 2* 'X' 6.808 / - 'C-13AT2' 30 35 10 10 'OPEN' 1* 183.016 0.216 14241.644 2* 'X' 6.980 / - 'C-13AT2' 30 35 11 11 'OPEN' 1* 117.303 0.216 9168.256 2* 'X' 7.109 / - 'C-13AT2' 30 36 11 11 'OPEN' 1* 17.959 0.216 1424.767 2* 'X' 7.571 / - 'C-13AT2' 30 36 12 12 'OPEN' 1* 99.268 0.216 7846.105 2* 'X' 7.453 / - 'C-13AT2' 30 36 13 13 'OPEN' 1* 0.017 0.216 1.378 2* 'X' 7.801 / - 'C-13AT2' 31 36 13 13 'OPEN' 1* 0.037 0.216 3.027 2* 'X' 8.661 / - 'C-13AT2' 31 36 14 14 'OPEN' 1* 52.970 0.216 4373.898 2* 'X' 9.006 / - 'C-13AT2' 31 36 15 15 'OPEN' 1* 0.040 0.216 3.353 2* 'X' 9.478 / - 'C-13AT2' 31 36 16 16 'OPEN' 1* 0.045 0.216 3.729 2* 'X' 9.093 / -/ - -WCONHIST - 'C-13AT2' 'OPEN' 'RESV' 0.000 0.000 0.000 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 1574.750 2.062 203144.500 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 1277878.125 5* / -/ - -DATES - 01 'DEC' 1997 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1146.290 2.355 151768.935 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-22' 'GAS' 'OPEN' 'RATE' 913591.742 5* / -/ - -DATES - 01 'JAN' 1998 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1288.792 3.500 175683.082 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 0.572 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1074695.633 5* / -/ - -DATES - 25 'JAN' 1998 / -/ - -WELSPECS - 'C-8T2K' 'NESS' 30 10 1* 'OIL' 1* 1* 1* 'YES' 1* 1* 1* / -/ - -COMPDAT - 'C-8T2K' 31 10 7 7 'OPEN' 1* 6.795 0.216 639.355 2* 'Y' 16.699 / - 'C-8T2K' 31 10 8 8 'OPEN' 1* 0.026 0.216 2.363 2* 'Y' 14.962 / - 'C-8T2K' 31 10 9 9 'OPEN' 1* 26.041 0.216 2400.479 2* 'Y' 15.069 / - 'C-8T2K' 31 11 9 9 'OPEN' 1* 4.488 0.216 435.816 2* 'Z' 19.631 / - 'C-8T2K' 31 11 10 10 'OPEN' 1* 30.057 0.216 2768.771 2* 'Y' 15.019 / - 'C-8T2K' 31 11 11 11 'OPEN' 1* 29.819 0.216 2787.005 2* 'Y' 16.142 / - 'C-8T2K' 31 11 12 12 'OPEN' 1* 29.203 0.216 2762.936 2* 'Y' 17.166 / - 'C-8T2K' 31 11 13 13 'OPEN' 1* 30.673 0.216 2781.058 2* 'Y' 13.895 / - 'C-8T2K' 31 11 14 14 'OPEN' 1* 29.100 0.216 2752.839 2* 'Y' 17.154 / - 'C-8T2K' 31 11 15 15 'OPEN' 1* 29.579 0.216 2764.073 2* 'Y' 16.128 / - 'C-8T2K' 31 11 16 16 'OPEN' 1* 29.467 0.216 2753.624 2* 'Y' 16.129 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1944.714 5.286 265860.567 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 3936.561 5* / - 'C-8T2K' 'GAS' 'OPEN' 'RATE' 378417.286 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 893178.580 5* / -/ - -DATES - 01 'FEB' 1998 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 845.964 2.643 114837.607 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 20041.754 5* / - 'C-8T2K' 'GAS' 'OPEN' 'RATE' 271288.035 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 1000.000 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 859225.321 5* / -/ - -DATES - 01 'MAR' 1998 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 686.613 0.548 84423.806 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 539.029 5* / - 'C-8T2K' 'GAS' 'OPEN' 'RATE' 0.000 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 150693.548 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1025833.516 5* / -/ - -DATES - 01 'APR' 1998 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 786.267 0.700 114509.967 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 395.357 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 258560.001 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 949555.735 5* / -/ - -DATES - 01 'MAY' 1998 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1838.839 9.484 303938.548 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 1510.949 5* / - 'C-8T2K' 'GAS' 'OPEN' 'RATE' 48.065 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 222492.613 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1088516.452 5* / -/ - -DATES - 01 'JUN' 1998 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 3037.091 16.636 590102.320 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 8662.463 5* / - 'C-8T2K' 'GAS' 'OPEN' 'RATE' 149.273 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 269844.182 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1011561.227 5* / -/ - -DATES - 23 'JUN' 1998 / -/ - -WELOPEN - 'C-8T2K' 'SHUT' 5* / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 2992.000 15.000 660209.125 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 0.000 5* / - 'C-8T2K' 'GAS' 'OPEN' 'RATE' 0.000 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 291418.500 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 945577.867 5* / -/ - -DATES - 01 'JUL' 1998 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 2096.968 28.452 511463.355 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 1905.761 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 296592.548 5* / - 'C-21' 'OIL' 'OPEN' 'RATE' 249.000 4* 140.000 / - 'C-22' 'GAS' 'OPEN' 'RATE' 989500.518 5* / -/ - -DATES - 01 'AUG' 1998 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 2014.161 32.355 499951.292 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 373.335 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 355086.097 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1104129.710 5* / -/ - -DATES - 01 'SEP' 1998 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 2393.300 29.333 573772.099 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 5477.893 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 344129.433 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1071732.435 5* / -/ - -DATES - 01 'OCT' 1998 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1663.742 12.806 572738.869 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 12534.623 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 390771.097 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1166055.161 5* / -/ - -DATES - 01 'NOV' 1998 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1243.867 10.400 410035.033 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 10580.132 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 343892.800 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 918766.369 5* / -/ - -DATES - 01 'DEC' 1998 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1218.226 10.516 398008.613 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 6268.938 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 394672.161 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1131794.869 5* / -/ - -DATES - 01 'JAN' 1999 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 669.806 6.290 265957.871 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 14613.365 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 695321.065 5* / - 'C-21' 'WATER' 'OPEN' 'RATE' 261.000 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1108820.841 5* / -/ - -DATES - 01 'FEB' 1999 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 632.679 1.750 219156.250 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 25185.743 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 477539.893 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1161119.179 5* / -/ - -DATES - 01 'MAR' 1999 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1279.839 3.645 454776.097 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 22290.146 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 360616.226 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1204084.645 5* / -/ - -DATES - 01 'APR' 1999 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1223.433 3.600 428480.033 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 25595.163 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 355382.067 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1387249.000 5* / -/ - -DATES - 01 'MAY' 1999 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1176.032 3.387 443610.967 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 28055.677 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 324908.129 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1297890.903 5* / -/ - -DATES - 01 'JUN' 1999 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 604.967 1.633 222805.065 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 12464.191 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 159622.133 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 594618.637 5* / -/ - -DATES - 01 'JUL' 1999 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 754.032 1.806 251992.452 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 39104.203 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 50033.452 5* / - 'C-21' 'GAS' 'OPEN' 'RATE' 56671.000 4* 0.000215135 / - 'C-22' 'GAS' 'OPEN' 'RATE' 1332732.258 5* / -/ - -DATES - 01 'AUG' 1999 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 0.000 0.000 0.000 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 30585.698 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 3580.645 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1130730.613 5* / -/ - -DATES - 01 'SEP' 1999 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 674.700 0.700 240749.333 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 16201.437 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 331169.467 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 768833.669 5* / -/ - -DATES - 01 'OCT' 1999 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 998.065 1.323 329109.355 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 13937.428 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 373573.613 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 844154.353 5* / -/ - -DATES - 01 'NOV' 1999 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1136.933 1.200 390925.767 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 20674.413 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 447641.432 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1001040.765 5* / -/ - -DATES - 01 'DEC' 1999 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1080.839 1.097 403727.065 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 25753.132 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 470490.324 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1017267.228 5* / -/ - -DATES - 01 'JAN' 2000 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1169.323 8.387 425524.034 1* 1* 1* 1* 1* / - 'C-21' 'OPEN' 'ORAT' 115.000 66.000 44716.000 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 52017.197 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 502873.225 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 944509.131 5* / -/ - -DATES - 01 'FEB' 2000 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1084.931 8.966 385280.690 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 48058.918 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 457486.414 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1015348.862 5* / -/ - -DATES - 01 'MAR' 2000 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 405.581 3.194 137765.161 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 46766.333 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 477722.484 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 798971.032 5* / -/ - -DATES - 01 'APR' 2000 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 713.933 6.433 262273.367 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 53853.466 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 483743.234 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 813487.798 5* / -/ - -DATES - 01 'MAY' 2000 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 647.935 5.419 227722.258 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 43736.787 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 460786.646 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 801484.387 5* / -/ - -DATES - 01 'JUN' 2000 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 777.033 4.600 241693.467 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 57244.080 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 448467.100 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 758476.800 5* / -/ - -DATES - 01 'JUL' 2000 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 977.065 4.548 250727.065 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 50720.655 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 492895.807 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 886439.968 5* / -/ - -DATES - 01 'AUG' 2000 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 819.419 4.032 206844.548 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 37957.494 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 503092.291 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 964582.835 5* / -/ - -DATES - 01 'SEP' 2000 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 506.567 2.900 140249.133 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 40924.206 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 414451.167 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 895560.002 5* / -/ - -DATES - 01 'OCT' 2000 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 841.194 5.452 403911.322 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 28618.119 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 538214.452 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 990095.157 5* / -/ - -DATES - 01 'NOV' 2000 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 527.333 1.267 199187.966 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 26082.540 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 513635.435 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 921066.669 5* / -/ - -DATES - 01 'DEC' 2000 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 242.097 0.419 88378.903 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 25390.255 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 521458.544 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 956081.871 5* / -/ - -DATES - 01 'JAN' 2001 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 0.000 0.000 0.000 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 33085.100 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 259986.386 5* / - 'C-21' 'OIL' 'OPEN' 'RATE' 408.000 4* 140.000 / - 'C-22' 'GAS' 'OPEN' 'RATE' 978383.099 5* / -/ - -DATES - 01 'FEB' 2001 / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 48205.999 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 0.000 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1149495.714 5* / -/ - -DATES - 08 'FEB' 2001 / -/ - -WELOPEN - 'C-19' 'SHUT' 0 0 0 2* / -/ - -COMPDAT - 'C-19' 39 14 6 6 'OPEN' 1* 25.266 0.216 1990.187 2* 'Y' 7.346 / - 'C-19' 39 15 6 6 'OPEN' 1* 53.485 0.216 4277.886 2* 'Y' 7.839 / - 'C-19' 39 15 7 7 'OPEN' 1* 104.233 0.216 8176.943 2* 'Y' 7.221 / - 'C-19' 39 15 8 8 'OPEN' 1* 0.338 0.216 26.100 2* 'Y' 6.719 / - 'C-19' 39 16 8 8 'OPEN' 1* 0.087 0.216 6.671 2* 'Y' 6.676 / - 'C-19' 38 16 8 8 'OPEN' 1* 0.131 0.216 10.099 2* 'Y' 6.670 / - 'C-19' 37 18 11 11 'OPEN' 1* 36.701 0.216 2834.485 2* 'Y' 6.765 / - 'C-19' 37 18 12 12 'OPEN' 1* 201.696 0.216 15589.941 2* 'Y' 6.788 / - 'C-19' 37 18 13 13 'OPEN' 1* 32.173 0.216 2482.740 2* 'Y' 6.742 / - 'C-19' 37 19 13 13 'OPEN' 1* 0.094 0.216 7.293 2* 'Y' 6.764 / - 'C-19' 36 19 13 13 'OPEN' 1* 86.499 0.216 6665.573 2* 'Y' 6.703 / - 'C-19' 36 19 14 14 'OPEN' 1* 0.278 0.216 21.410 2* 'Y' 6.649 / - 'C-19' 36 20 14 14 'OPEN' 1* 278.325 0.216 21398.139 2* 'Y' 6.639 / - 'C-19' 36 20 13 13 'OPEN' 1* 218.830 0.216 16861.514 2* 'Y' 6.700 / - 'C-19' 36 21 13 13 'OPEN' 1* 284.727 0.216 21878.511 2* 'Y' 6.624 / - 'C-19' 36 21 12 12 'OPEN' 1* 200.525 0.216 15398.416 2* 'Y' 6.607 / - 'C-19' 36 22 13 13 'OPEN' 1* 38.955 0.216 2991.239 2* 'Y' 6.605 / - 'C-19' 36 22 12 12 'OPEN' 1* 124.228 0.216 9534.560 2* 'Y' 6.593 / - 'C-19' 35 23 13 13 'OPEN' 1* 229.211 0.216 17591.568 2* 'Y' 6.592 / - 'C-19' 35 23 14 14 'OPEN' 1* 42.518 0.216 3286.223 2* 'Y' 6.786 / - 'C-19' 35 24 15 15 'OPEN' 1* 49.616 0.216 3818.562 2* 'Y' 6.668 / - 'C-19' 35 24 16 16 'OPEN' 1* 148.076 0.216 11340.899 2* 'Y' 6.536 / - 'C-19' 35 25 16 16 'OPEN' 1* 0.164 0.216 12.543 2* 'Y' 6.514 / - 'C-19' 34 25 16 16 'OPEN' 1* 128.420 0.216 9830.735 2* 'Y' 6.523 / - 'C-19' 34 25 15 15 'OPEN' 1* 137.101 0.216 10497.277 2* 'Y' 6.528 / - 'C-19' 34 26 15 15 'OPEN' 1* 71.365 0.216 5444.541 2* 'Y' 6.433 / - 'C-19' 34 26 14 14 'OPEN' 1* 423.367 0.216 32285.266 2* 'Y' 6.421 / - 'C-19' 33 26 14 14 'OPEN' 1* 68.448 0.216 5231.526 2* 'Y' 6.481 / - 'C-19' 33 27 14 14 'OPEN' 1* 36.744 0.216 2805.661 2* 'Y' 6.455 / - 'C-19' 33 27 13 13 'OPEN' 1* 354.667 0.216 27036.137 2* 'Y' 6.411 / - 'C-19' 33 27 12 12 'OPEN' 1* 100.458 0.216 7650.032 2* 'Y' 6.385 / - 'C-19' 33 28 12 12 'OPEN' 1* 207.460 0.216 15797.470 2* 'Y' 6.383 / - 'C-19' 32 28 12 12 'OPEN' 1* 103.805 0.216 7940.809 2* 'Y' 6.504 / - 'C-19' 32 28 11 11 'OPEN' 1* 247.786 0.216 18955.656 2* 'Y' 6.505 / - 'C-19' 32 28 10 10 'OPEN' 1* 15.303 0.216 1169.531 2* 'Y' 6.479 / - 'C-19' 32 29 10 10 'OPEN' 1* 234.073 0.216 17885.273 2* 'Y' 6.473 / - 'C-19' 32 29 9 9 'OPEN' 1* 229.050 0.216 17487.535 2* 'Y' 6.452 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 0.000 0.000 0.000 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 48219.119 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1011353.905 5* / -/ - -DATES - 01 'MAR' 2001 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1523.613 3.355 377079.903 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 44450.684 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 57961.419 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 806393.129 5* / -/ - -DATES - 01 'APR' 2001 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 3059.900 7.200 760971.400 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 30528.657 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 354455.933 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 694052.267 5* / -/ - -DATES - 01 'MAY' 2001 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 2687.355 5.452 775058.710 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 42701.446 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 529185.839 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 546850.484 5* / -/ - -DATES - 01 'JUN' 2001 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1218.133 1.533 433342.800 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 24848.297 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 293138.300 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 427921.300 5* / -/ - -DATES - 01 'JUL' 2001 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1113.839 44.581 440213.742 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 31708.122 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 451100.903 5* / - 'C-21' 'WATER' 'OPEN' 'RATE' 166.000 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 797749.744 5* / -/ - -DATES - 01 'AUG' 2001 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1288.387 46.903 718752.871 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 43430.110 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 512932.968 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 697510.258 5* / -/ - -DATES - 01 'SEP' 2001 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1363.800 59.133 705664.433 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 45018.711 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 503202.568 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 706524.433 5* / -/ - -DATES - 01 'OCT' 2001 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1393.355 64.806 745196.839 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 47425.574 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 531249.773 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 665642.871 5* / -/ - -DATES - 01 'NOV' 2001 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1252.133 57.833 642884.867 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 48107.967 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 539024.932 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 697369.600 5* / -/ - -DATES - 01 'DEC' 2001 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1058.065 2.194 425976.549 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 47502.032 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 538549.613 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 630823.806 5* / -/ - -DATES - 01 'JAN' 2002 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1076.516 0.903 537676.194 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 48660.038 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 476819.227 5* / - 'C-21' 'GAS' 'OPEN' 'RATE' 140756.000 4* 0.000215135 / - 'C-22' 'GAS' 'OPEN' 'RATE' 626401.806 5* / -/ - -DATES - 01 'FEB' 2002 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 1183.679 1.036 610370.393 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 36004.610 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 520335.967 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 694726.250 5* / -/ - -DATES - 01 'MAR' 2002 / -/ - -WCONHIST - 'C-19' 'OPEN' 'RESV' 652.720 0.760 340383.720 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 24264.599 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 405655.040 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 458198.200 5* / -/ - -DATES - 26 'MAR' 2002 / -/ - -WELSPECS - 'C-17D' 'NESS' 36 30 1* 'OIL' 1* 1* 1* 'YES' 1* 1* 1* / -/ - -COMPDAT - 'C-17D' 36 30 5 5 'OPEN' 1* 53.414 0.216 4126.272 2* 'Y' 6.772 / - 'C-17D' 36 31 5 5 'OPEN' 1* 7.861 0.216 603.112 2* 'Y' 6.584 / - 'C-17D' 36 31 6 6 'OPEN' 1* 0.075 0.216 5.840 2* 'Y' 7.062 / - 'C-17D' 36 31 7 7 'OPEN' 1* 77.855 0.216 6135.617 2* 'Y' 7.361 / - 'C-17D' 36 31 8 8 'OPEN' 1* 107.452 0.216 8206.291 2* 'Y' 6.460 / - 'C-17D' 37 31 8 8 'OPEN' 1* 15.268 0.216 1165.169 2* 'Y' 6.440 / - 'C-17D' 37 32 7 7 'OPEN' 1* 0.036 0.216 2.753 2* 'Y' 6.525 / - 'C-17D' 37 33 6 6 'OPEN' 1* 144.823 0.216 11093.169 2* 'Y' 6.539 / - 'C-17D' 37 33 5 5 'OPEN' 1* 240.429 0.216 18386.318 2* 'Y' 6.495 / - 'C-17D' 37 34 5 5 'OPEN' 1* 212.427 0.216 16247.310 2* 'Y' 6.499 / - 'C-17D' 37 34 4 4 'OPEN' 1* 47.838 0.216 3651.416 2* 'Y' 6.446 / - 'C-17D' 38 39 6 6 'OPEN' 1* 146.727 0.216 11248.045 2* 'Y' 6.561 / - 'C-17D' 38 40 6 6 'OPEN' 1* 222.667 0.216 17060.746 2* 'Y' 6.547 / - 'C-17D' 37 43 5 5 'OPEN' 1* 37.466 0.216 2867.317 2* 'Y' 6.516 / - 'C-17D' 37 43 4 4 'OPEN' 1* 248.842 0.216 19042.551 2* 'Y' 6.513 / - 'C-17D' 37 44 4 4 'OPEN' 1* 223.144 0.216 17067.840 2* 'Y' 6.501 / - 'C-17D' 37 44 5 5 'OPEN' 1* 122.738 0.216 9415.716 2* 'Y' 6.580 / - 'C-17D' 37 45 5 5 'OPEN' 1* 337.905 0.216 25852.387 2* 'Y' 6.508 / - 'C-17D' 37 45 6 6 'OPEN' 1* 71.841 0.216 5490.406 2* 'Y' 6.479 / - 'C-17D' 37 46 6 6 'OPEN' 1* 207.826 0.216 15880.383 2* 'Y' 6.474 / - 'C-17D' 37 46 5 5 'OPEN' 1* 132.209 0.216 10104.258 2* 'Y' 6.479 / - 'C-17D' 37 47 5 5 'OPEN' 1* 450.314 0.216 34420.406 2* 'Y' 6.483 / - 'C-17D' 37 48 5 5 'OPEN' 1* 253.673 0.216 19399.193 2* 'Y' 6.496 / - 'C-17D' 37 49 5 5 'OPEN' 1* 0.081 0.216 6.202 2* 'Y' 6.481 / - 'C-17D' 37 49 6 6 'OPEN' 1* 0.143 0.216 10.919 2* 'Y' 6.474 / - 'C-17D' 37 50 6 6 'OPEN' 1* 0.154 0.216 11.738 2* 'Y' 6.483 / - 'C-17D' 38 50 6 6 'OPEN' 1* 0.032 0.216 2.461 2* 'Y' 6.446 / - 'C-17D' 38 51 4 4 'OPEN' 1* 0.039 0.216 3.068 2* 'Y' 6.935 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 13.333 12.500 7337.167 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 7.500 0.000 1984.500 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 10823.693 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 4934.500 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 220494.500 5* / -/ - -DATES - 01 'APR' 2002 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 1430.567 80.500 341077.267 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 1053.733 0.967 556946.400 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 32093.420 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 511044.367 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 760140.233 5* / -/ - -DATES - 01 'MAY' 2002 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 1035.935 41.710 377582.516 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 886.968 70.581 446392.193 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 36899.383 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 536468.548 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 691940.644 5* / -/ - -DATES - 01 'JUN' 2002 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 253.200 0.033 83361.100 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 850.300 104.133 574315.567 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 28361.940 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 430408.269 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 531053.567 5* / -/ - -DATES - 01 'JUL' 2002 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 74.581 0.000 21145.871 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 817.258 19.452 486586.675 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 22606.703 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 541137.806 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 0.000 5* / -/ - -DATES - 01 'AUG' 2002 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 0.000 0.000 19.613 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 811.161 11.161 496220.743 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 24811.485 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 630671.839 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 104471.129 5* / -/ - -DATES - 01 'SEP' 2002 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 0.000 0.000 0.000 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 661.133 57.300 412005.767 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 21819.563 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 569409.467 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 233.067 5* / -/ - -DATES - 01 'OCT' 2002 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 399.548 23.677 85037.742 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 723.161 129.548 480822.516 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 20918.064 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 615731.839 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 17718.129 5* / -/ - -DATES - 01 'NOV' 2002 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 290.800 6.300 174601.967 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 574.433 27.933 360413.733 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 11992.711 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 597995.067 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 4186.000 5* / -/ - -DATES - 01 'DEC' 2002 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 423.935 11.387 382036.258 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 813.645 43.194 527662.323 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 27290.653 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 568576.226 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1984.839 5* / -/ - -DATES - 01 'JAN' 2003 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 575.387 35.516 509974.548 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 641.419 78.000 413161.871 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 46915.403 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 610799.452 5* / - 'C-21' 'OIL' 'OPEN' 'RATE' 206.000 4* 140.000 / - 'C-22' 'GAS' 'OPEN' 'RATE' 122928.194 5* / -/ - -DATES - 01 'FEB' 2003 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 156.357 8.393 181800.929 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 830.964 102.143 530429.679 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 55980.850 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 662084.429 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 647112.609 5* / -/ - -DATES - 01 'MAR' 2003 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 0.161 0.000 585.000 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 669.258 85.387 425507.839 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 16919.533 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 653643.387 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 228890.742 5* / -/ - -DATES - 01 'APR' 2003 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 91.100 4.833 65637.933 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 609.367 89.767 430083.932 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 23347.952 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 524380.201 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 0.000 5* / -/ - -DATES - 01 'MAY' 2003 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 100.806 6.710 84103.516 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 522.323 82.581 340785.323 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 28703.622 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 423693.710 5* / -/ - -DATES - 01 'JUN' 2003 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 0.867 0.033 930.767 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 641.133 62.333 438901.933 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 30736.323 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 447400.633 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 15159.700 5* / -/ - -DATES - 01 'JUL' 2003 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 119.806 8.677 126503.548 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 665.710 65.710 387251.839 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 28296.093 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 637559.032 5* / - 'C-21' 'GAS' 'OPEN' 'RATE' 187518.000 4* 0.000215135 / - 'C-22' 'GAS' 'OPEN' 'RATE' 0.000 5* / -/ - -DATES - 01 'AUG' 2003 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 323.290 0.387 129316.000 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 804.839 68.806 600458.613 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 46596.784 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 562862.710 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 592031.903 5* / -/ - -DATES - 01 'SEP' 2003 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 307.400 0.267 150269.300 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 966.367 81.000 730195.570 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 66282.127 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 675212.033 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1091625.233 5* / -/ - -DATES - 01 'OCT' 2003 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 164.806 0.000 63481.226 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 905.129 90.903 824197.484 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 60133.631 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 553955.129 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 905042.353 5* / -/ - -DATES - 01 'NOV' 2003 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 0.000 0.000 0.000 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 1213.000 107.000 1172024.254 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 75595.519 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 1091.938 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1354812.188 5* / -/ - -DATES - 17 'NOV' 2003 / -/ - -WELOPEN - 'C-13AT2' 'SHUT' 0 0 0 2* / -/ - -COMPDAT - 'C-13AT2' 22 27 15 15 'OPEN' 1* 68.994 0.216 5339.784 2* 'Y' 6.824 / - 'C-13AT2' 22 27 16 16 'OPEN' 1* 162.174 0.216 12530.677 2* 'Y' 6.778 / - 'C-13AT2' 22 28 16 16 'OPEN' 1* 31.885 0.216 2467.733 2* 'Y' 6.824 / - 'C-13AT2' 23 28 16 16 'OPEN' 1* 29.573 0.216 2285.517 2* 'Y' 6.784 / - 'C-13AT2' 23 28 15 15 'OPEN' 1* 29.634 0.216 2295.352 2* 'Y' 6.847 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 104.643 0.071 58672.785 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 1079.929 98.786 1082911.929 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 71343.963 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 610784.857 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1431670.429 5* / -/ - -DATES - 01 'DEC' 2003 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 224.355 0.194 104331.742 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 854.097 78.839 594182.839 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 66903.877 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 621793.357 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1041548.161 5* / -/ - -DATES - 01 'JAN' 2004 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 165.839 54.710 126789.097 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 723.452 52.903 368399.258 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 64954.763 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 633223.032 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1037734.550 5* / -/ - -DATES - 01 'FEB' 2004 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 386.483 121.931 279919.725 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 890.138 44.931 488803.519 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 57010.221 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 600900.448 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1172543.413 5* / -/ - -DATES - 01 'MAR' 2004 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 466.194 125.000 432198.418 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 1290.097 88.355 387124.323 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 16226.168 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 609270.387 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1114658.772 5* / -/ - -DATES - 01 'APR' 2004 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 0.000 0.000 0.000 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 1168.067 64.000 435236.300 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 4452.067 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 617182.167 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1386763.400 5* / -/ - -DATES - 01 'MAY' 2004 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 276.581 99.548 218693.065 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 1080.710 58.290 347040.000 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 2285.329 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 614213.194 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1616394.548 5* / -/ - -DATES - 01 'JUN' 2004 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 252.467 78.133 260664.467 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 1006.267 49.733 375247.967 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 355.837 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 650779.167 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1605165.133 5* / -/ - -DATES - 01 'JUL' 2004 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 174.161 54.839 165662.290 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 1128.581 80.194 386713.935 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 147.318 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 657043.226 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1864440.226 5* / -/ - -DATES - 01 'AUG' 2004 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 487.161 146.677 442460.000 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 1057.000 131.871 389415.581 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 24.397 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 650134.226 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1804685.387 5* / -/ - -DATES - 01 'SEP' 2004 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 6.900 2.467 5354.400 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 951.233 127.333 314914.900 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 0.000 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 483098.467 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1158197.367 5* / -/ - -DATES - 01 'OCT' 2004 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 2.500 0.643 2266.143 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 1313.929 130.357 442969.000 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 0.000 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 2463440.714 5* / -/ - -DATES - 15 'OCT' 2004 / -/ - -WELOPEN - 'C-17D' 'SHUT' 0 0 0 2* / -/ - -COMPDAT - 'C-17D' 37 32 7 7 'OPEN' 1* 0.036 0.216 2.753 2* 'Y' 6.525 / - 'C-17D' 37 33 6 6 'OPEN' 1* 144.823 0.216 11093.169 2* 'Y' 6.539 / - 'C-17D' 37 33 5 5 'OPEN' 1* 240.429 0.216 18386.318 2* 'Y' 6.495 / - 'C-17D' 37 34 5 5 'OPEN' 1* 212.427 0.216 16247.310 2* 'Y' 6.499 / - 'C-17D' 37 34 4 4 'OPEN' 1* 47.838 0.216 3651.416 2* 'Y' 6.446 / - 'C-17D' 38 39 6 6 'OPEN' 1* 146.727 0.216 11248.045 2* 'Y' 6.561 / - 'C-17D' 38 40 6 6 'OPEN' 1* 222.667 0.216 17060.746 2* 'Y' 6.547 / - 'C-17D' 37 43 5 5 'OPEN' 1* 37.466 0.216 2867.317 2* 'Y' 6.516 / - 'C-17D' 37 43 4 4 'OPEN' 1* 248.842 0.216 19042.551 2* 'Y' 6.513 / - 'C-17D' 37 44 4 4 'OPEN' 1* 223.144 0.216 17067.840 2* 'Y' 6.501 / - 'C-17D' 37 44 5 5 'OPEN' 1* 122.738 0.216 9415.716 2* 'Y' 6.580 / - 'C-17D' 37 45 5 5 'OPEN' 1* 337.905 0.216 25852.387 2* 'Y' 6.508 / - 'C-17D' 37 45 6 6 'OPEN' 1* 71.841 0.216 5490.406 2* 'Y' 6.479 / - 'C-17D' 37 46 6 6 'OPEN' 1* 207.826 0.216 15880.383 2* 'Y' 6.474 / - 'C-17D' 37 46 5 5 'OPEN' 1* 132.209 0.216 10104.258 2* 'Y' 6.479 / - 'C-17D' 37 47 5 5 'OPEN' 1* 450.314 0.216 34420.406 2* 'Y' 6.483 / - 'C-17D' 37 48 5 5 'OPEN' 1* 253.673 0.216 19399.193 2* 'Y' 6.496 / - 'C-17D' 37 49 5 5 'OPEN' 1* 0.081 0.216 6.202 2* 'Y' 6.481 / - 'C-17D' 37 49 6 6 'OPEN' 1* 0.143 0.216 10.919 2* 'Y' 6.474 / - 'C-17D' 37 50 6 6 'OPEN' 1* 0.154 0.216 11.738 2* 'Y' 6.483 / - 'C-17D' 38 50 6 6 'OPEN' 1* 0.032 0.216 2.461 2* 'Y' 6.446 / - 'C-17D' 38 51 4 4 'OPEN' 1* 0.039 0.216 3.068 2* 'Y' 6.935 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 687.941 150.471 473113.469 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 1230.235 114.235 353778.000 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 130834.529 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1758995.059 5* / -/ - -DATES - 01 'NOV' 2004 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 530.667 199.033 420183.333 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 1163.933 149.600 377031.933 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 25810.140 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 369752.801 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1468401.644 5* / -/ - -DATES - 01 'DEC' 2004 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 11.387 6.290 10531.871 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 289.903 42.290 97046.968 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 67840.581 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 0.000 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1096572.228 5* / -/ - -DATES - 01 'JAN' 2005 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 97.053 83.737 87742.474 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 942.632 134.684 226690.263 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 26636.079 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1519183.579 5* / -/ - -DATES - 20 'JAN' 2005 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 125.583 109.500 113940.750 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 1081.667 167.500 300570.833 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 0.000 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 1300000.000 1* 600.000 3* / - 'C-22' 'GAS' 'OPEN' 'RATE' 562529.918 5* / -/ - -DATES - 01 'FEB' 2005 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 1.071 1.107 1109.821 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 1087.679 179.750 395600.714 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 28442.948 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 1282130.357 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 524656.248 5* / -/ - -DATES - 01 'MAR' 2005 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 554.226 166.387 649349.935 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 1173.774 169.548 576941.903 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 65629.595 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 1258322.258 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 0.000 5* / -/ - -DATES - 01 'APR' 2005 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 67.633 16.600 94114.333 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 1194.467 160.567 556157.433 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 60492.032 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 1249630.767 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 400465.133 5* / -/ - -DATES - 01 'MAY' 2005 / -/ - -WCONHIST - 'C-17D' 'OPEN' 'RESV' 7.290 1.290 2866.710 1* 1* 1* 1* 1* / - 'C-19' 'OPEN' 'RESV' 997.097 153.097 611673.452 1* 1* 1* 1* 1* / -/ - -WCONINJE - 'C-5' 'GAS' 'OPEN' 'RATE' 53075.411 5* / - 'C-13AT2' 'GAS' 'OPEN' 'RATE' 1242915.290 5* / - 'C-22' 'GAS' 'OPEN' 'RATE' 1766845.006 5* / -/ - -DATES - 01 'JUN' 2005 / -/ - -END diff --git a/ThirdParty/Ert/libsched/src/tests/sched_test_02.SCH b/ThirdParty/Ert/libsched/src/tests/sched_test_02.SCH deleted file mode 100644 index 6832f7b691..0000000000 --- a/ThirdParty/Ert/libsched/src/tests/sched_test_02.SCH +++ /dev/null @@ -1,24 +0,0 @@ -GRUPTREE - FOO FIELD / -/ - - -WCONHIST - 'OP_1' 'OPEN' 'ORAT' 7996.000 4.000 1.46402E+006 5* / - 'OP_2' 'OPEN' 'ORAT' 7998.000 2.000 1461075.000 5* / -/ - -DATES - 11 'JAN' 2000 / -/ - -WCONHIST - 'OP_3' 'OPEN' 'ORAT' 7999.000 1.000 1471824.000 5* / - 'OP_4' 'SHUT' 'ORAT' 2451.000 4252.000 453703.000 5* / - 'OP_5' 'SHUT' 'ORAT' 1186.000 6814.000 206655.000 5* / -/ - -DATES - 10 'FEB' 2000 / - 20 'FEB' 2000 / -/ diff --git a/ThirdParty/Ert/libsched/src/tests/sched_test_04.SCH b/ThirdParty/Ert/libsched/src/tests/sched_test_04.SCH deleted file mode 100644 index dd589e8574..0000000000 --- a/ThirdParty/Ert/libsched/src/tests/sched_test_04.SCH +++ /dev/null @@ -1,175 +0,0 @@ -SKIPREST - -RPTSCHED - RESTART=2 / - --- SET 'NO RESOLUTION' OPTION -DRSDT - 0 / - --- WELL SPECIFICATION DATA --- --- WELL GROUP LOCATION BHP PI --- NAME NAME I J DEPTH DEFN --- m -WELSPECS - 'WWI1' 'G' 1 1 -1 'WATER' / - 'WP1' 'G' 30 30 -1 'OIL' / -/ - - --- COMPLETION SPECIFICATION DATA --- --- WELL -LOCATION- OPEN/ SAT CONN WELL --- NAME I J K1 K2 SHUT TAB FACT DIAM --- m2 -COMPDAT - 'WWI1' 1 1 1 5 'OPEN' 0 -1 0.5 -1 0 0 / - 'WP1' 30 30 1 5 'OPEN' 0 -1 0.5 -1 0 0 / -/ - --- PRODUCTION WELL CONTROLS --- --- WELL OPEN/ CNTL OIL WATER GAS LIQU RES BHP.TARGET --- NAME SHUT MODE RATE RATE RATE RATE RATE PRESS --- sm3/day sm3/day sm3/day sm3/day rm3/day bar - --- USED IF THE WELL IS CONTROLED BY THE OIL RATE -WCONPROD - 'WP1' 'OPEN' 'LRAT' 3* 2000 1* 30 0 0 0 / --- 'WP2' 'OPEN' 'ORAT' 2000 4* 30 0 0 0 / --- 'WP3' 'OPEN' 'ORAT' 2000 4* 30 0 0 0 / --- 'WP4' 'OPEN' 'ORAT' 2000 4* 30 0 0 0 / -/ - --- INJECTION WELL CONTROLS --- --- WELL INJ OPEN/ CNTL FLOW BHP.TARGET --- NAME TYPE SHUT MODE RATE PRESS --- sm3/day bar -WCONINJE - 'WWI1' 'WAT' 'SHUT' 'RATE' 6000 1* 400 / -/ - - -RPTRST -BASIC=2 / - -DATES - 1 'FEB' 2004 / -/ ---END0001 - - -DATES - 1 'APR' 2005 / -/ ---END0002 - - -COMPDAT - 'WWI1' 1 1 1 5 'OPEN' 0 -1 0.5 -1 0 0 / - 'WP1' 30 30 1 5 'OPEN' 0 -1 0.5 -1 0 0 / -/ - - -WCONPROD - 'WP1' 'OPEN' 'LRAT' 3* 5500 1* 30 0 0 0 / - / -WCONINJE - 'WWI1' 'WAT' 'OPEN' 'RATE' 6000 1* 400 / -/ - - ---TSTEP ---5*91.3125 / ---456.5625 / -DATES - 1 'JUL' 2006 / -/ - ---END0003 - -COMPDAT - 'WWI1' 1 1 1 5 'OPEN' 0 -1 0.5 -1 0 0 / - 'WP1' 30 30 1 5 'OPEN' 0 -1 0.5 -1 0 0 / -/ - - ---TSTEP ---5*91.3125 / ---456.5625 / -DATES - 1 'OCT' 2007 / -/ ---END0004 - -COMPDAT - 'WWI1' 1 1 1 5 'OPEN' 0 -1 0.5 -1 0 0 / - 'WP1' 30 30 1 5 'OPEN' 0 -1 0.5 -1 0 0 / -/ - - ---TSTEP ---5*91.3125 / ---456.5625 / -DATES - 1 'JAN' 2009 / -/ ---END0005 - -COMPDAT - 'WWI1' 1 1 1 5 'OPEN' 0 -1 0.5 -1 0 0 / - 'WP1' 30 30 1 5 'OPEN' 0 -1 0.5 -1 0 0 / -/ - - ---TSTEP ---5*91.3125 / ---456.5625 / -DATES - 1 'APR' 2010 / -/ ---END0006 - -COMPDAT - 'WWI1' 1 1 1 5 'OPEN' 0 -1 0.5 -1 0 0 / - 'WP1' 30 30 1 5 'OPEN' 0 -1 0.5 -1 0 0 / -/ - - ---TSTEP ---91.3125 / ---456.5625 / -DATES - 1 'JUL' 2011 / -/ ---END0007 - -COMPDAT - 'WWI1' 1 1 1 5 'OPEN' 0 -1 0.5 -1 0 0 / - 'WP1' 30 30 1 5 'OPEN' 0 -1 0.5 -1 0 0 / -/ - ---TSTEP ---91.3125 / ---456.5625 / - -DATES - 1 'OCT' 2012 / -/ ---END0008 - -COMPDAT - 'WWI1' 1 1 1 5 'OPEN' 0 -1 0.5 -1 0 0 / - 'WP1' 30 30 1 5 'OPEN' 0 -1 0.5 -1 0 0 / -/ - ---TSTEP ---91.3125 / -DATES - 1 'JAN' 2013 / -/ ---END0009 - -END diff --git a/ThirdParty/Ert/libsched/src/well_history.c b/ThirdParty/Ert/libsched/src/well_history.c deleted file mode 100644 index 41f673a9dd..0000000000 --- a/ThirdParty/Ert/libsched/src/well_history.c +++ /dev/null @@ -1,309 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'well_history.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - - -#define WELL_HISTORY_TYPE_ID 44431872 - - - /** - The following paradigm applies to the schedule files: - - o It is based on keywords which will apply until the next - occurence of the same keyword. - - o It is naturaly organized in blocks delimited by DATES / TSTEP - keywords. - - - Example - ------- - - DATES - 1 'JAN' 2000 / - - WCONHIST - 'OP_1' 'OPEN' 'ORAT' 7996.000 4.000 1.46402E+006 5* / - / - - DATES - 1 'FEB' 2000 / - - <--- What is the oil rate here? - - DATES - 1 'MAR' 2000 / - - - END - - - In this example an historical oil production rate of 7996 is - specified for immediately following the DATES keyword at - 1. 'JAN' - but what is the oil production rate at 15.th of - February? The point is that the 7996 rate applies until it is - set again, i.e. the DATES / TSTEP are not that suitable as block - units. - - - To support this behaviour the vector types from vector_template.c - are well suited; setting the default with - e.g. double_vector_set_default() will ascertain that the default - value is returned for all subsequent gets from the vector beyond - the set length. (That was clear ....) - -*/ - - - -struct well_history_struct { - UTIL_TYPE_ID_DECLARATION; - char * well_name; - int_vector_type * kw_type; /* This enum should be one of: NONE(default), WCONHIST , WCONINJE and WCONINJH (sched_kw_type_enum in sched_types.h). */ - size_t_vector_type * active_state; /* Contains pointer to the currently active of the xxx_state objects. The size_t_vector instance is abused to store pointer values (i.e. addresses). */ - wconhist_state_type * wconhist_state; - wconinje_state_type * wconinje_state; - wconinjh_state_type * wconinjh_state; - size_t_vector_type * parent; - bool_vector_type * well_open; -}; - - - -UTIL_SAFE_CAST_FUNCTION( well_history , WELL_HISTORY_TYPE_ID ) -static UTIL_SAFE_CAST_FUNCTION_CONST( well_history , WELL_HISTORY_TYPE_ID ) -UTIL_IS_INSTANCE_FUNCTION( well_history , WELL_HISTORY_TYPE_ID) - - -well_history_type * well_history_alloc( const char * well_name , const time_t_vector_type * time) { - well_history_type * well_history = util_malloc( sizeof * well_history ); - UTIL_TYPE_ID_INIT( well_history , WELL_HISTORY_TYPE_ID ); - well_history->well_name = util_alloc_string_copy( well_name ); - well_history->kw_type = int_vector_alloc(0 , NONE); - well_history->wconhist_state = wconhist_state_alloc( time ); - well_history->wconinje_state = wconinje_state_alloc( well_name , time ); - well_history->wconinjh_state = wconinjh_state_alloc( time ); - well_history->active_state = size_t_vector_alloc(0 , 0); - well_history->parent = size_t_vector_alloc(0 , 0); - well_history->well_open = bool_vector_alloc( 0 , false ); - return well_history; - } - - - -void well_history_set_parent( well_history_type * child_well , int report_step , const group_history_type * parent_group) { - size_t_vector_iset_default( child_well->parent , report_step , ( size_t ) parent_group); -} - -group_history_type * well_history_get_parent( well_history_type * child_well , int report_step ) { - return (group_history_type *) size_t_vector_safe_iget( child_well->parent , report_step ); -} - -void well_history_free( well_history_type * well_history ) { - free( well_history->well_name ); - int_vector_free( well_history->kw_type ); - wconhist_state_free( well_history->wconhist_state ); - wconinjh_state_free( well_history->wconinjh_state ); - wconinje_state_free( well_history->wconinje_state ); - size_t_vector_free( well_history->active_state ); - bool_vector_free( well_history->well_open ); - size_t_vector_free( well_history->parent ); - free( well_history ); -} - - -void well_history_free__( void * arg ) { - well_history_free( well_history_safe_cast( arg )); -} - - - - /*****************************************************************/ - - - - void well_history_add_keyword( well_history_type * well_history, const sched_kw_type * sched_kw , int report_step ) { - sched_kw_type_enum new_type = sched_kw_get_type( sched_kw ); - sched_kw_type_enum current_type = int_vector_safe_iget( well_history->kw_type , report_step ); - - if ((new_type != current_type) && (current_type != NONE)) { - /* - The well is changing type and we must "close" the current - status first. - */ - switch( current_type ) { - case( WCONHIST ): - sched_kw_wconhist_close_state( well_history->wconhist_state , report_step ); - break; - case( WCONINJH): - sched_kw_wconinjh_close_state( well_history->wconinjh_state , report_step ); - break; - case( WCONINJE): - sched_kw_wconinje_close_state( well_history->wconinje_state , report_step ); - break; - default: - break; - } - } - - int_vector_iset_default( well_history->kw_type , report_step , new_type ); - switch( new_type ) { - case(WCONHIST): - size_t_vector_iset_default( well_history->active_state , report_step , ( long ) well_history->wconhist_state ); - bool_vector_iset_default( well_history->well_open , report_step , sched_kw_wconhist_well_open( sched_kw_get_const_data( sched_kw ) , well_history->well_name )); - sched_kw_wconhist_update_state(sched_kw_get_const_data( sched_kw ) , well_history->wconhist_state , well_history->well_name , report_step ); - break; - case(WCONINJH): - size_t_vector_iset_default( well_history->active_state , report_step , ( long ) well_history->wconinjh_state ); - sched_kw_wconinjh_update_state(sched_kw_get_const_data( sched_kw ) , well_history->wconinjh_state , well_history->well_name , report_step ); - break; - case(WCONINJE): - size_t_vector_iset_default( well_history->active_state , report_step , ( long ) well_history->wconinje_state ); - bool_vector_iset_default( well_history->well_open , report_step , sched_kw_wconinje_well_open( sched_kw_get_const_data( sched_kw ) , well_history->well_name )); - sched_kw_wconinje_update_state(sched_kw_get_const_data( sched_kw ) , well_history->wconinje_state , well_history->well_name , report_step ); - break; - default: - break; - // Nothing wrong with this (I think) ?? - } - } - -/*****************************************************************/ - -wconhist_state_type * well_history_get_wconhist( well_history_type * well_history ) { - return well_history->wconhist_state; -} - -/*****************************************************************/ - - -sched_kw_type_enum well_history_iget_active_kw( const well_history_type * well_history , int report_step ) { - return int_vector_safe_iget( well_history->kw_type , report_step ); -} - - -const void * well_history_get_state_ptr( const well_history_type * well_history , sched_kw_type_enum kw_type ) { - switch( kw_type ) { - case(WCONHIST): - return well_history->wconhist_state; - break; - case(WCONINJH): - return well_history->wconinjh_state; - break; - case(WCONINJE): - return well_history->wconinje_state; - break; - default: - util_abort("%s: non-handled enum value \n",__func__); - return NULL; - } -} - - -const char * well_history_get_name( const well_history_type * well_history ) { - return well_history->well_name; -} - - -bool well_history_well_open( const well_history_type * well_history , int report_step ) { - return bool_vector_safe_iget( well_history->well_open , report_step ); -} - - - - - -double well_history_iget( well_index_type * index , int report_step ) { - const well_history_type * well_history = well_history_safe_cast_const( well_index_get_state( index )); - sched_kw_type_enum current_type = int_vector_safe_iget( well_history->kw_type , report_step ); - sched_history_callback_ftype * func = well_index_get_callback( index , current_type ); - - if (func != NULL) { - void * state_ptr = (void *) size_t_vector_safe_iget( well_history->active_state , report_step ); - return func( state_ptr , report_step ); - } else - return 0; /* Quite polite - just returning 0 for funny requests. */ -} - - - - -double well_history_iget_WOPRH( const well_history_type * well_history , int report_step ) { - sched_kw_type_enum current_type = int_vector_safe_iget( well_history->kw_type , report_step ); - if (current_type == WCONHIST) { - void * state_ptr = (void *) size_t_vector_safe_iget( well_history->active_state , report_step ); - return wconhist_state_iget_WOPRH( state_ptr , report_step ); - } else - return 0; /* If it is not in WCONHIST state we return 0 with no further ado. */ -} - - -double well_history_iget_WWPRH( const well_history_type * well_history , int report_step ) { - sched_kw_type_enum current_type = int_vector_safe_iget( well_history->kw_type , report_step ); - if (current_type == WCONHIST) { - void * state_ptr = (void *) size_t_vector_safe_iget( well_history->active_state , report_step ); - return wconhist_state_iget_WWPRH( state_ptr , report_step ); - } else - return 0; /* If it is not in WCONHIST state we return 0 with no further ado. */ -} - - -double well_history_iget_WGPRH( const well_history_type * well_history , int report_step ) { - sched_kw_type_enum current_type = int_vector_safe_iget( well_history->kw_type , report_step ); - if (current_type == WCONHIST) { - void * state_ptr = (void *) size_t_vector_safe_iget( well_history->active_state , report_step ); - return wconhist_state_iget_WGPRH( state_ptr , report_step ); - } else - return 0; /* If it is not in WCONHIST state we return 0 with no further ado. */ -} - - -bool well_history_is_producer( const well_history_type * well_history , int report_step ) { - bool producer = false; - sched_kw_type_enum current_type = int_vector_safe_iget( well_history->kw_type , report_step ); - switch( current_type ) { - case( WCONHIST ): - producer = true; - break; - case( WCONINJE) : - producer = false; - break; - case( WCONINJH ): - producer = false; - break; - default: - util_abort("%s: --- \n",__func__); - } - return producer; -} diff --git a/ThirdParty/Ert/libsched/src/well_index.c b/ThirdParty/Ert/libsched/src/well_index.c deleted file mode 100644 index d7d35a54e5..0000000000 --- a/ThirdParty/Ert/libsched/src/well_index.c +++ /dev/null @@ -1,129 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'well_index.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include - -#include -#include -#include - -#include -#include - - -#define WELL_INDEX_TYPE_ID 99780634 - -struct well_index_struct { - UTIL_TYPE_ID_DECLARATION; - const void * state_ptr; - char * well_name; - char * variable; /* Because many variables can be accessed both as eg WOPRH and WOPR the - variable might not match the name used when looking up this index. The - variable field should always contain the true historical (i.e. xxxxH) - variable, as that is the most correct way to access the values of the - schedule file. */ - int_vector_type * kw_type; - size_t_vector_type * func; -}; - - - - - -UTIL_IS_INSTANCE_FUNCTION( well_index , WELL_INDEX_TYPE_ID ) -UTIL_SAFE_CAST_FUNCTION_CONST( well_index , WELL_INDEX_TYPE_ID ) - - - -void well_index_add_type( well_index_type * index , sched_kw_type_enum kw_type , sched_history_callback_ftype * func) { - int_vector_append( index->kw_type , kw_type ); - size_t_vector_append( index->func , ( size_t ) func ); -} - - - -well_index_type * well_index_alloc( const char * well_name , const char * variable , const void * state_ptr , sched_kw_type_enum kw_type , sched_history_callback_ftype * func ) { - well_index_type * well_index = util_malloc( sizeof * well_index ); - - UTIL_TYPE_ID_INIT( well_index , WELL_INDEX_TYPE_ID ); - - well_index->well_name = util_alloc_string_copy( well_name ); - well_index->variable = util_alloc_string_copy( variable ); - well_index->kw_type = int_vector_alloc( 0 , 0 ); - well_index->func = size_t_vector_alloc( 0 , 0 ); - well_index->state_ptr = state_ptr; - - well_index_add_type( well_index , kw_type , func ); - return well_index; -} - - -void well_index_free( well_index_type * index ) { - size_t_vector_free( index->func ); - int_vector_free( index->kw_type ); - free( index->well_name ); - free( index->variable ); - free( index ); -} - - -void well_index_free__( void * arg ) { - well_index_free( (well_index_type *) arg ); -} - -const char * well_index_get_name( const well_index_type * well_index ) { - return well_index->well_name; -} - -const char * well_index_get_variable( const well_index_type * well_index ) { - return well_index->variable; -} - - - - -sched_history_callback_ftype * well_index_get_callback( const well_index_type * well_index , sched_kw_type_enum kw_type) { - sched_history_callback_ftype * func = NULL; - int iindex = 0; - while (true) { - if (int_vector_iget( well_index->kw_type , iindex) == kw_type) { - func = ( sched_history_callback_ftype *) size_t_vector_iget( well_index->func , iindex ); - break; - } - - - iindex++; - if (iindex == int_vector_size( well_index->kw_type )) - break; - } - - return func; -} - - - -const void * well_index_get_state( const well_index_type * well_index ) { - return well_index->state_ptr; -} - - - -const void * well_index_get_state__( const void * index ) { - const well_index_type * well_index = well_index_safe_cast_const( index ); - return well_index_get_state( well_index ); -} diff --git a/ThirdParty/Ert/libsched/tests/CMakeLists.txt b/ThirdParty/Ert/libsched/tests/CMakeLists.txt deleted file mode 100644 index 24d27ba2e2..0000000000 --- a/ThirdParty/Ert/libsched/tests/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -#add_executable( sched_load sched_load.c ) -#target_link_libraries( sched_load sched test_util ) -#add_test( sched_load ${EXECUTABLE_OUTPUT_PATH}/sched_load ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Heidrun/Schedule.sch ) - -#add_executable( sched_tokenize sched_tokenize.c ) -#target_link_libraries( sched_tokenize sched test_util ) -#add_test( sched_tokenize ${EXECUTABLE_OUTPUT_PATH}/sched_tokenize ${CMAKE_CURRENT_SOURCE_DIR}/test-data/token_test1 ) - -if (STATOIL_TESTDATA_ROOT) - add_executable( sched_history_summary sched_history_summary.c ) - target_link_libraries( sched_history_summary sched test_util ) - add_test( sched_history_summary1 ${EXECUTABLE_OUTPUT_PATH}/sched_history_summary ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE ) - add_test( sched_history_summary2 ${EXECUTABLE_OUTPUT_PATH}/sched_history_summary ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Snorre/SNORRE ) - - #set_property( TEST sched_load PROPERTY LABELS StatoilData) - set_property( TEST sched_history_summary1 PROPERTY LABELS StatoilData) - set_property( TEST sched_history_summary2 PROPERTY LABELS StatoilData) -endif() diff --git a/ThirdParty/Ert/libsched/tests/sched_history_summary.c b/ThirdParty/Ert/libsched/tests/sched_history_summary.c deleted file mode 100644 index 6f94d38d36..0000000000 --- a/ThirdParty/Ert/libsched/tests/sched_history_summary.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'sched_history_summary.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT 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. - - ERT 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 - for more details. -*/ - -#include - -#include - -#include - -#include - - - -int main(int argc, char **argv) { - char * sum_case = argv[1]; - ecl_sum_type * refcase = ecl_sum_fread_alloc_case( sum_case , ":" ); - history_type * hist_h = history_alloc_from_refcase( refcase , true ); - history_type * hist_sim = history_alloc_from_refcase( refcase , false ); - - test_assert_true( history_is_instance( hist_h ) ); - test_assert_true( history_is_instance( hist_sim ) ); - test_assert_int_equal( history_get_last_restart( hist_sim ) , ecl_sum_get_last_report_step( refcase ) ); - test_assert_int_equal( history_get_last_restart( hist_h ) , ecl_sum_get_last_report_step( refcase ) ); - - { - double_vector_type * value_sim = double_vector_alloc(0 , 0); - double_vector_type * value_h = double_vector_alloc(0 , 0); - bool_vector_type * valid_sim = bool_vector_alloc( 0 , false ); - bool_vector_type * valid_h = bool_vector_alloc( 0 , false ); - - test_assert_true( history_init_ts( hist_sim , "FOPT" , value_sim , valid_sim )); - test_assert_true( history_init_ts( hist_h , "FOPT" , value_h , valid_h )); - { - int step; - for (step = 1; step < ecl_sum_get_last_report_step( refcase ); step++) { - test_assert_true( bool_vector_iget( valid_sim , step )); - test_assert_true( bool_vector_iget( valid_h , step )); - { - int time_index = ecl_sum_iget_report_end( refcase , step ); - test_assert_double_equal( ecl_sum_get_general_var( refcase , time_index , "FOPT" ) , double_vector_iget( value_sim , step )); - test_assert_double_equal( ecl_sum_get_general_var( refcase , time_index , "FOPTH" ) , double_vector_iget( value_h , step )); - } - } - } - bool_vector_free( valid_sim ); - bool_vector_free( valid_h ); - - double_vector_free( value_sim ); - double_vector_free( value_h ); - } - - - history_free( hist_h ); - history_free( hist_sim ); - ecl_sum_free( refcase ); - exit(0); -} diff --git a/ThirdParty/Ert/python/CMakeLists.txt b/ThirdParty/Ert/python/CMakeLists.txt index 661c1ba6fb..291b431b70 100644 --- a/ThirdParty/Ert/python/CMakeLists.txt +++ b/ThirdParty/Ert/python/CMakeLists.txt @@ -1,39 +1,21 @@ -include(cmake/find_python_module.cmake) -include(cmake/python_module_versions.cmake) # finds version +install( DIRECTORY cmake DESTINATION share ) -FIND_PACKAGE(PythonInterp 2.7) -if (NOT DEFINED PYTHON_EXECUTABLE) - message("Python2.7 interpreter not found - Python wrappers not enabled") - return() -endif() +set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules") +include(init_python) +init_python( 2.7 ) -python_module(numpy 1.7.1) +find_python_package(numpy 1.7.1 ${PYTHON_INSTALL_PREFIX}) if (NOT DEFINED PY_numpy) - message("numpy module not found - Python wrappers not enabled") + message(WARNING "numpy module not found - Python wrappers not enabled") + set( BUILD_PYTHON OFF PARENT_SCOPE ) return() endif() -if (ERT_BUILD_GUI) - python_module(PyQt4 4.8.0) - if(NOT DEFINED PY_PyQt4) - message(SEND_ERROR "Cannot build GUI without PyQt4") - endif() - python_module( matplotlib 1.2.0 ) - python_module( pandas 0.15.1 ) - python_module( scipy 0.16.1 ) -endif() - -if (EXISTS "/etc/debian_version") - set( PYTHON_PACKAGE_PATH "dist-packages") -else() - set( PYTHON_PACKAGE_PATH "site-packages") -endif() -set(PYTHON_INSTALL_PREFIX "lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/${PYTHON_PACKAGE_PATH}" CACHE STRING "Subdirectory to install Python modules in") - - if (BUILD_TESTS) add_subdirectory( tests ) endif() add_subdirectory( python ) + + diff --git a/ThirdParty/Ert/python/README b/ThirdParty/Ert/python/README index 6fd7d377d9..10154c0b78 100644 --- a/ThirdParty/Ert/python/README +++ b/ThirdParty/Ert/python/README @@ -4,4 +4,4 @@ Python. More detailed documentation of the wrapping can be found in -docs/devel.txt. +doc/devel.txt. diff --git a/ThirdParty/Ert/python/cmake/Modules/add_python_package.cmake b/ThirdParty/Ert/python/cmake/Modules/add_python_package.cmake new file mode 100644 index 0000000000..9d1527d309 --- /dev/null +++ b/ThirdParty/Ert/python/cmake/Modules/add_python_package.cmake @@ -0,0 +1,40 @@ +function(add_python_package target package_path source_files install_package) + + set(build_files "") + + foreach (file ${source_files} ) + string(SUBSTRING ${file} 0 1 first_char) + string(SUBSTRING ${file} 1 1 second_char) + if (first_char STREQUAL "/" OR second_char STREQUAL ":") + set( source_file ${file} ) + set( build_file ${file} ) + file(RELATIVE_PATH file ${CMAKE_CURRENT_BINARY_DIR} ${file}) + set(dependent_target) + else() + set( source_file ${CMAKE_CURRENT_SOURCE_DIR}/${file} ) + set( build_file ${PROJECT_BINARY_DIR}/${package_path}/${file} ) + set(dependent_target DEPENDS ${source_file}) + endif() + if("$ENV{DESTDIR}" STREQUAL "") + set( install_file ${CMAKE_INSTALL_PREFIX}/${package_path}/${file} ) + else() + set( install_file $ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/${package_path}/${file} ) + endif() + + add_custom_command( + OUTPUT ${build_file} + COMMAND ${PYTHON_EXECUTABLE} + ARGS ${PROJECT_BINARY_DIR}/bin/cmake_pyc ${source_file} ${build_file} + ${dependent_target}) + + list(APPEND build_files ${build_file} ) + + if (install_package) + install(FILES ${build_file} DESTINATION ${CMAKE_INSTALL_PREFIX}/${package_path}) + install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_BINARY_DIR}/bin/cmake_pyc_file ${install_file})") + endif() + + endforeach() + add_custom_target( ${target} ALL DEPENDS ${build_files}) + +endfunction() diff --git a/ThirdParty/Ert/python/cmake/Modules/add_python_test.cmake b/ThirdParty/Ert/python/cmake/Modules/add_python_test.cmake new file mode 100644 index 0000000000..26583c5090 --- /dev/null +++ b/ThirdParty/Ert/python/cmake/Modules/add_python_test.cmake @@ -0,0 +1,38 @@ +# This macro will create a ctest based on the supplied TEST_CLASS. The +# TEST_CLASS argument should correspond to a valid Python path, i.e. +# +# >> import ${TEST_CLASS} +# +# should work. The actual test is by running a small test script which +# will invoke normal Python test discovery functionality. This is a +# macro, and relevant variables must be crrectly set in calling scope +# before it is invoked: +# +# PYTHON_TEST_RUNNER: Path to executable which will load the testcase +# given by ${TEST_CLASS} and run it. +# +# +# CTEST_PYTHONPATH: Normal colon separated path variable, should at +# least include the binary root directory of the current python +# installation, but can in addition contain the path to +# additional packages. The PYTHON_TEST_RUNNER should inspect the +# $CTEST_PYTHONPATH environment variable and update sys.path +# accordingly. + +macro( addPythonTest TEST_CLASS ) + set(TEST_NAME ${TEST_CLASS}) + + add_test(NAME ${TEST_NAME} + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/${PYTHON_INSTALL_PREFIX}" + COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_BINARY_DIR}/bin/ctest_run_python ${TEST_CLASS} ) + + set(oneValueArgs LABELS) + cmake_parse_arguments(TEST_OPTIONS "" "${oneValueArgs}" "" ${ARGN}) + if(TEST_OPTIONS_LABELS) + set_property(TEST ${TEST_NAME} PROPERTY LABELS "Python:${TEST_OPTIONS_LABELS}") + else() + set_property(TEST ${TEST_NAME} PROPERTY LABELS "Python") + endif() + + set_property(TEST ${TEST_NAME} PROPERTY ENVIRONMENT "CTEST_PYTHONPATH=${CTEST_PYTHONPATH}") +endmacro( ) diff --git a/ThirdParty/Ert/python/cmake/Modules/find_python_package.cmake b/ThirdParty/Ert/python/cmake/Modules/find_python_package.cmake new file mode 100644 index 0000000000..9cfd68f6aa --- /dev/null +++ b/ThirdParty/Ert/python/cmake/Modules/find_python_package.cmake @@ -0,0 +1,63 @@ +# try import python module, if success, check its version, store as PY_module. +# the module is imported as-is, hence the case (e.g. PyQt4) must be correct. +function(find_python_package_version package) + set(PY_VERSION_ACCESSOR "__version__") + set(PY_package_name ${package}) + + if(${package} MATCHES "PyQt4") + set(PY_package_name "PyQt4.Qt") + set(PY_VERSION_ACCESSOR "PYQT_VERSION_STR") + endif() + + execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" "import os.path; import inspect; import ${PY_package_name} as py_m; print(\"%s;%s\" % (py_m.${PY_VERSION_ACCESSOR} , os.path.dirname(os.path.dirname(inspect.getfile(py_m)))))" + RESULT_VARIABLE _${package}_fail# error code 0 if success + OUTPUT_VARIABLE stdout_output # major.minor.patch + ERROR_VARIABLE stderr_output + OUTPUT_STRIP_TRAILING_WHITESPACE) + + if(NOT _${package}_fail) + list(GET stdout_output 0 version) + set(PY_${package} ${version}) # local scope, for message + set(PY_${package} ${version} PARENT_SCOPE) + + list(GET stdout_output 1 path) + set(PY_${package}_PATH ${path}) # local scope, for message + set(PY_${package}_PATH ${path} PARENT_SCOPE) + endif() +endfunction() + + +# If we find the correct module and new enough version, set PY_package, where +# "package" is the given argument to the version we found else, display warning +# and do not set any variables. +function(find_python_package package version python_prefix) + + if (CMAKE_PREFIX_PATH) + set( ORG_PYTHONPATH $ENV{PYTHONPATH} ) + foreach ( PREFIX_PATH ${CMAKE_PREFIX_PATH} ) + set(THIS_PYTHONPATH "${PREFIX_PATH}/${python_prefix}") + set(ENV{PYTHONPATH} "${THIS_PYTHONPATH}:${ORG_PYTHONPATH}") + find_python_package_version(${package}) + if (DEFINED PY_${package}) + if (${PY_${package}_PATH} STREQUAL ${THIS_PYTHONPATH}) + set(CTEST_PYTHONPATH "${PY_${package}_PATH}:${CTEST_PYTHONPATH}" PARENT_SCOPE) + endif() + break( ) + endif() + endforeach() + set(ENV{PYTHONPATH} ${ORG_PYTHONPATH}) + else() + find_python_package_version(${package}) + endif() + + if(NOT DEFINED PY_${package}) + message("Could not find Python package " ${package}) + elseif(${PY_${package}} VERSION_LESS ${version}) + message(WARNING "Python package ${package} too old. " + "Wanted ${version}, found ${PY_${package}}") + else() + message(STATUS "Found ${package}. ${PY_${package}} >= ${version} in ${PY_${package}_PATH}") + set(PY_${package} ${version} PARENT_SCOPE) + set(PY_${package}_PATH ${PY_${package}_PATH} PARENT_SCOPE) + endif() +endfunction() diff --git a/ThirdParty/Ert/python/cmake/Modules/init_python.cmake b/ThirdParty/Ert/python/cmake/Modules/init_python.cmake new file mode 100644 index 0000000000..414879259c --- /dev/null +++ b/ThirdParty/Ert/python/cmake/Modules/init_python.cmake @@ -0,0 +1,175 @@ +# This macro will initialize the current cmake session for Python. The +# macro starts by looking for the Python interpreter of correct +# version. When a Python interepreter of the correct version has been +# located the macro will continue to set variables, load other cmake +# modules and generate scripts to be used in the remaining part of the +# cmake process. +# +# Variables which will be set: +# ---------------------------- +# +# PYTHON_INSTALL_PREFIX: All python packages will be located in +# ${GLOBAL_PREFIX}/${PYTHON_INSTALL_PREFIX} - this applies both +# when searching for dependencies and when installing. +# +# CTEST_PYTHONPATH: Normal ':' separated path variables which is +# passed to the test runner. Should contain the PYTHONPATH to +# all third party packages which are not in the default search +# path. The CTEST_PYTHONPATH variable will be updated by the +# python_package( ) function when searching for third party +# packages. +# +# +# New functions/macros which will be available: +# --------------------------------------------- +# +# add_python_package( ): This function will copy python source files +# to the build directory, 'compile' them and set up installation. +# +# +# add_python_test( ): Set up a test based on invoking a Python test +# class with a small python executable front end. +# +# find_python_package( ): Will search for a python package. +# +# +# New scripts generated: +# ---------------------- +# +# +# cmake_pyc: Small script which will run in-place Python compilation +# of a directory tree recursively. +# +# cmake_pyc_file: Small script which will compile one python file. +# +# ctest_run_python: Small script which will invoke one Python test class. +# +# All the generated scripts will be located in ${PROJECT_BINARY_DIR}/bin. +# +# +# Downstream projects should use this as: +# +# include( init_python ) +# init_python( 2.7 ) +# ... + +macro(init_python target_version) + + FIND_PACKAGE(PythonInterp) + if (NOT DEFINED PYTHON_EXECUTABLE) + message(WARNING "Python interpreter not found - Python wrappers not enabled") + set( BUILD_PYTHON OFF PARENT_SCOPE ) + return() + endif() + + if (NOT "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}" STREQUAL "${target_version}") + message(WARNING "Need Python version ${target_version}, found version: ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} - Python wrappers not enabled") + set( BUILD_PYTHON OFF PARENT_SCOPE ) + return() + endif() + + if (EXISTS "/etc/debian_version") + set( PYTHON_PACKAGE_PATH "dist-packages") + else() + set( PYTHON_PACKAGE_PATH "site-packages") + endif() + + set(PYTHON_INSTALL_PREFIX "lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/${PYTHON_PACKAGE_PATH}" CACHE STRING "Subdirectory to install Python modules in") + set(CTEST_PYTHONPATH ${PROJECT_BINARY_DIR}/${PYTHON_INSTALL_PREFIX}) + configure_python_env( ) + include(add_python_test) + include(find_python_package) + include(add_python_package) +endmacro() + + + +# The function configure_python_env( ) will generate three small +# Python scripts which will be located in ${PROJECT_BINARY_DIR}/bin +# and will be used when 'compiling' and testing Python code. The +# function will be called from the init_python() macro. + +function( configure_python_env ) + +FILE(WRITE "${PROJECT_BINARY_DIR}/bin/ctest_run_python" +"import sys +import os +from unittest import TextTestRunner + + +def runTestCase(tests, verbosity=0): + test_result = TextTestRunner(verbosity=verbosity).run(tests) + + if len(test_result.errors) or len(test_result.failures): + test_result.printErrors() + sys.exit(1) + + +def update_path(): + for path in os.environ['CTEST_PYTHONPATH'].split(':'): + sys.path.insert(0 , path) + + +if __name__ == '__main__': + update_path( ) + from ecl.test import ErtTestRunner + + for test_class in sys.argv[1:]: + tests = ErtTestRunner.getTestsFromTestClass(test_class) + + # Set verbosity to 2 to see which test method in a class that fails. + runTestCase(tests, verbosity=0) +") + +#----------------------------------------------------------------- + +FILE(WRITE "${PROJECT_BINARY_DIR}/bin/cmake_pyc" +" +import py_compile +import os +import os.path +import sys +import shutil + + +src_file = sys.argv[1] +target_file = sys.argv[2] + +(target_path , tail) = os.path.split( target_file ) +if not os.path.exists( target_path ): + try: + os.makedirs( target_path ) + except: + # When running make with multiple processes there might be a + # race to create this directory. + pass + +shutil.copyfile( src_file , target_file ) +shutil.copystat( src_file , target_file ) +try: + py_compile.compile( target_file , doraise = True) +except Exception as error: + sys.exit('py_compile(%s) failed:%s' % (target_file , error)) +") + +#----------------------------------------------------------------- + +FILE(WRITE "${PROJECT_BINARY_DIR}/bin/cmake_pyc_file" +" +import py_compile +import os +import sys +import os.path + +# Small 'python compiler' used in the build system for ert. + +for file in sys.argv[1:]: + try: + py_compile.compile( file , doraise = True ) + except Exception as error: + sys.exit('py_compile(%s) failed:%s' % (file , error)) +") + + + +endfunction() \ No newline at end of file diff --git a/ThirdParty/Ert/python/cmake/find_python_module.cmake b/ThirdParty/Ert/python/cmake/find_python_module.cmake deleted file mode 100644 index a0218650b3..0000000000 --- a/ThirdParty/Ert/python/cmake/find_python_module.cmake +++ /dev/null @@ -1,27 +0,0 @@ -# Found from: github user ivansafrin -# -# Find if a Python module is installed -# Found at http://www.cmake.org/pipermail/cmake/2011-January/041666.html -# To use do: find_python_module(PyQt4 REQUIRED) -function(find_python_module module) - string(TOUPPER ${module} module_upper) - if(NOT PY_${module_upper}) - if(ARGC GREATER 1 AND ARGV1 STREQUAL "REQUIRED") - set(${module}_FIND_REQUIRED TRUE) - endif() - # A module's location is usually a directory, but for binary modules - # it's a .so file. - execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" - "import re, ${module}; print(re.compile('/__init__.py.*').sub('',${module}.__file__))" - RESULT_VARIABLE _${module}_status - OUTPUT_VARIABLE _${module}_location - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) - - if(NOT _${module}_status) - set(PY_${module_upper} ${_${module}_location} CACHE STRING - "Location of Python module ${module}") - endif() - endif(NOT PY_${module_upper}) - find_package_handle_standard_args(PY_${module} DEFAULT_MSG PY_${module_upper}) -endfunction(find_python_module) diff --git a/ThirdParty/Ert/python/cmake/python_module_versions.cmake b/ThirdParty/Ert/python/cmake/python_module_versions.cmake deleted file mode 100644 index e34f9f8407..0000000000 --- a/ThirdParty/Ert/python/cmake/python_module_versions.cmake +++ /dev/null @@ -1,40 +0,0 @@ -# try import python module, if success, check its version, store as PY_module. -# the module is imported as-is, hence the case (e.g. PyQt4) must be correct. -function(python_module_version module) - set(PY_VERSION_ACCESSOR "__version__") - set(PY_module_name ${module}) - - if(${module} MATCHES "PyQt4") - set(PY_module_name "PyQt4.Qt") - set(PY_VERSION_ACCESSOR "PYQT_VERSION_STR") - endif() - - execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" "import ${PY_module_name} as py_m; print(py_m.${PY_VERSION_ACCESSOR})" - RESULT_VARIABLE _${module}_fail# error code 0 if success - OUTPUT_VARIABLE _${module}_version# major.minor.patch - ERROR_VARIABLE stderr_output - OUTPUT_STRIP_TRAILING_WHITESPACE) - - if(NOT _${module}_fail) - set(PY_${module} ${_${module}_version})# local scope, for message - set(PY_${module} ${_${module}_version} PARENT_SCOPE) - endif() -endfunction() - - -# If we find the correct module and new enough version, set PY_package, where -# "package" is the given argument to the version we found else, display warning -# and do not set any variables. -function(python_module package version) - python_module_version(${package}) - - if(NOT DEFINED PY_${package}) - message("Could not find Python module " ${package}) - elseif(${PY_${package}} VERSION_LESS ${version}) - message(WARNING "Python module ${package} too old. " - "Wanted ${version}, found ${PY_${package}}") - else() - message(STATUS "Found ${package}. ${PY_${package}} >= ${version}") - set(PY_${package} ${version} PARENT_SCOPE) - endif() -endfunction() diff --git a/ThirdParty/Ert/python/python/CMakeLists.txt b/ThirdParty/Ert/python/python/CMakeLists.txt index bf7bce2091..c6d592545b 100644 --- a/ThirdParty/Ert/python/python/CMakeLists.txt +++ b/ThirdParty/Ert/python/python/CMakeLists.txt @@ -1,8 +1,5 @@ +configure_file(test_env.py.in ${PROJECT_BINARY_DIR}/${PYTHON_INSTALL_PREFIX}/test_env.py ) + add_subdirectory(cwrap) -add_subdirectory( ert ) -if (BUILD_ERT) - if (ERT_BUILD_GUI) - add_subdirectory( ert_gui ) - endif() -endif() +add_subdirectory( ecl ) add_subdirectory( bin ) diff --git a/ThirdParty/Ert/python/python/bin/CMakeLists.txt b/ThirdParty/Ert/python/python/bin/CMakeLists.txt new file mode 100644 index 0000000000..0410f2a073 --- /dev/null +++ b/ThirdParty/Ert/python/python/bin/CMakeLists.txt @@ -0,0 +1,24 @@ +if (BUILD_ERT) + set(application_list + ert_tcp_server + ertshell + ert_upgrade_fs107 + ) + foreach(prog ${application_list} ) + file(COPY ${prog} DESTINATION ${EXECUTABLE_OUTPUT_PATH}) + endforeach() +endif() + + + +if (INSTALL_ERT) + set (destination ${CMAKE_INSTALL_PREFIX}/bin) + foreach(prog ${application_list} ) + install(PROGRAMS ${prog} DESTINATION ${destination}) + if (INSTALL_GROUP) + install(CODE "EXECUTE_PROCESS(COMMAND chgrp ${INSTALL_GROUP} ${destination}/${prog})") + install(CODE "EXECUTE_PROCESS(COMMAND chmod g+w ${destination}/${prog})") + endif() + endforeach() +endif() + diff --git a/ThirdParty/Ert/python/python/bin/ert_tcp_server b/ThirdParty/Ert/python/python/bin/ert_tcp_server new file mode 100644 index 0000000000..caa75d9da7 --- /dev/null +++ b/ThirdParty/Ert/python/python/bin/ert_tcp_server @@ -0,0 +1,53 @@ +#!/usr/bin/env python +import argparse +import socket +import sys + +from ert.server.ertrpcserver import ErtRPCServer + +default_port = 0 + +parser = argparse.ArgumentParser() + +parser.add_argument("--port", type=int, default=default_port, dest="port") +parser.add_argument("--host", default=socket.gethostname(), dest="host") +parser.add_argument("--localhost", default=False, action="store_true", dest="localhost") +parser.add_argument("--log-file", default="ert-server.log", dest="log_file") +parser.add_argument("--log-level", type=int, default=1, dest="log_level") +parser.add_argument("config_file") + +args = parser.parse_args() + +config_file = args.config_file +port = args.port +log_level = args.log_level + + +# By default the server will bind with the publicly available hostname +# socket.gethostname() - meaning that clients can connect from +# anywhere, but by using the --localhost switch the server can be +# instructed to only accept connections from localhost. +# +# On some computers the socket.gethostname() will not include the +# domain name; that will not work and we exit the server and ask the +# user to supply the full hostname using --host. + +if args.localhost: + host = "localhost" +else: + host = args.host + if host.count(".") == 0: + sys.exit("Sorry - could not determine FQDN for server - use the --host option to supply.") + +server = ErtRPCServer(config_file, host, port, log_requests=log_level > 1, verbose_queue=True) + +try: + print("ERT Server running on port: %d at host: %s" % (server.port, host)) + server.start() +except KeyboardInterrupt: + try: + server.stop() + print("ERT Server 'smoothly' killed the running jobs") + except Exception as e: + print("Unable to stop server 'gracefully'!") + raise e diff --git a/ThirdParty/Ert/python/python/bin/ert_upgrade_fs107 b/ThirdParty/Ert/python/python/bin/ert_upgrade_fs107 new file mode 100644 index 0000000000..4374b5dcfc --- /dev/null +++ b/ThirdParty/Ert/python/python/bin/ert_upgrade_fs107 @@ -0,0 +1,76 @@ +#!/usr/bin/env python +import sys +import os +import os.path + +from ert.config import ConfigParser, ContentTypeEnum, UnrecognizedEnum +from ert.enkf import TimeMap,EnkfFs +from ert.ecl import EclSum + +#TimeMap._upgrade107 = + + +def parse(config_file): + parser = ConfigParser( ) + item = parser.add("REFCASE", False ) + item.iset_type(0 , ContentTypeEnum.CONFIG_PATH ) + + item = parser.add("ENSPATH" , False ) + item.iset_type(0 , ContentTypeEnum.CONFIG_EXISTING_PATH ) + + content = parser.parse( config_file , unrecognized = UnrecognizedEnum.CONFIG_UNRECOGNIZED_IGNORE ) + if "REFCASE" in content: + refcase = EclSum( content.getValue( "REFCASE" )) + else: + refcase = None + + if "ENSPATH" in content: + path = content["ENSPATH"] + enspath = path[0].getPath( ) + else: + enspath = "storage" + + + return enspath , refcase + + +def upgrade(ens_path, refcase): + for case in os.listdir( ens_path ): + full_case = os.path.join( ens_path , case ) + if os.path.isdir( full_case ): + version = EnkfFs.diskVersion( full_case ) + try: + version = EnkfFs.diskVersion( full_case ) + except IOError: + print "The case:%s was ignored" % full_case + continue + + if version < 105: + print "Very old case: %s ignored - you should probably delete this" % full_case + continue + + if version < 107: + print "Upgrading %s to version 107" % full_case + + time_map_file = os.path.join( full_case , "files/time-map") + if os.path.isfile( time_map_file ): + time_map = TimeMap( time_map_file) + assert( isinstance( refcase , EclSum )) + time_map.upgrade107( refcase ) + time_map.fwrite( time_map_file ) + else: + print "No time-map file found" + + EnkfFs.updateVersion( full_case, version , 107 ) + fs = EnkfFs( full_case ) + + +if len(sys.argv) != 2: + sys.exit("Script must have exactly one argument: config_file") + +config_file = sys.argv[1] +ens_path , refcase = parse( config_file ) +if refcase: + print "Upgrading storage:%s with refcase:%s" % (ens_path , refcase.case ) +upgrade( ens_path , refcase ) + diff --git a/ThirdParty/Ert/python/python/bin/ertshell b/ThirdParty/Ert/python/python/bin/ertshell new file mode 100644 index 0000000000..e8d53e0a63 --- /dev/null +++ b/ThirdParty/Ert/python/python/bin/ertshell @@ -0,0 +1,35 @@ +#!/usr/bin/env python +import os +from PyQt4.QtGui import QApplication +import sys + +import ert_gui +from ert_gui.ertwidgets import resourceIcon +from ert_gui.shell import ErtShell +from ert_gui.tools import HelpCenter + + +if __name__ == '__main__': + if os.getenv("ERT_SHARE_PATH"): + ert_share_path = os.getenv("ERT_SHARE_PATH") + else: + ert_share_path = os.path.realpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../../share")) + + ert_gui.ertwidgets.img_prefix = ert_share_path + "/gui/img/" + + help_center = HelpCenter("ERT") + help_center.setHelpLinkPrefix(os.getenv("ERT_SHARE_PATH") + "/gui/help/") + + + app = QApplication(sys.argv) + app.setWindowIcon(resourceIcon("application/window_icon_cutout")) + + ert_shell = ErtShell() + if len(sys.argv) > 1: + ert_shell.onecmd('load_config %s' % sys.argv[1]) + + if len(sys.argv) > 2: + for workflow in sys.argv[2:]: + ert_shell.onecmd('workflows run %s' % workflow) + + ert_shell.cmdloop() \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/cwrap/CMakeLists.txt b/ThirdParty/Ert/python/python/cwrap/CMakeLists.txt index e90512619f..a6b98b1b08 100644 --- a/ThirdParty/Ert/python/python/cwrap/CMakeLists.txt +++ b/ThirdParty/Ert/python/python/cwrap/CMakeLists.txt @@ -3,12 +3,8 @@ set(PYTHON_SOURCES basecclass.py basecenum.py basecvalue.py - cclass.py - cenum.py cfile.py clib.py - cnamespace.py - cwrap.py metacwrap.py prototype.py ) diff --git a/ThirdParty/Ert/python/python/cwrap/__init__.py b/ThirdParty/Ert/python/python/cwrap/__init__.py index 34c7c75f67..027cab1f70 100644 --- a/ThirdParty/Ert/python/python/cwrap/__init__.py +++ b/ThirdParty/Ert/python/python/cwrap/__init__.py @@ -18,22 +18,11 @@ The cwrap package contains several small utility modules to simplify the process of interacting with a C library: - cenum: This module contains a function 'create_enum()' which can - internalize enum symbols with the corresponding values in the - calling scope. The enum symbols are not part of the shared - library as such, and the working of create_enum() requires a - special function for 'enum-introspection' to be available in the - shared library. - clib: This module contains the function load() which will load a shared library using the ctypes.CDLL(); the function has facilities for trying several different names when loading the library. - cwrap: This module contains support for a Python <-> C type map. The - whole type mapping in the ert python bindings is based on this - module. - cfile: This module implemenets the class CFILE which can be used to extract the underlying FILE pointer from a Python filehandle, to facilitate use of Python filehandles for functions expecting a @@ -53,18 +42,11 @@ from .basecenum import BaseCEnum from .basecvalue import BaseCValue -from .cclass import CClass -from .cenum import create_enum from .cfile import CFILE from .clib import load, lib_name -from .cnamespace import CNamespace - -from .cwrap import CWrapper, CWrapperNameSpace, CWrapError - from .metacwrap import MetaCWrap from .prototype import REGISTERED_TYPES, Prototype, PrototypeError -__all__ = ['BaseCClass', 'BaseCEnum', 'BaseCValue', 'CClass', 'CFILE', - 'CNamespace', 'CWrapper', 'CWrapperNameSpace', 'CWrapError', +__all__ = ['BaseCClass', 'BaseCEnum', 'BaseCValue', 'CFILE', 'MetaCWrap', 'Prototype', 'load', 'lib_name'] diff --git a/ThirdParty/Ert/python/python/cwrap/basecclass.py b/ThirdParty/Ert/python/python/cwrap/basecclass.py index 5f65f8821b..306a8375bd 100644 --- a/ThirdParty/Ert/python/python/cwrap/basecclass.py +++ b/ThirdParty/Ert/python/python/cwrap/basecclass.py @@ -14,17 +14,20 @@ # See the GNU General Public License at # for more details. +from __future__ import (absolute_import, division, + print_function, unicode_literals) + +import six + import ctypes from .metacwrap import MetaCWrap -from .cnamespace import CNamespace +@six.add_metaclass(MetaCWrap) class BaseCClass(object): - __metaclass__ = MetaCWrap - namespaces = {} def __init__(self, c_pointer, parent=None, is_reference=False): - if c_pointer == 0 or c_pointer is None: + if not c_pointer: raise ValueError("Must have a valid (not null) pointer value!") if c_pointer < 0: @@ -42,13 +45,11 @@ def __new__(cls, *more, **kwargs): return obj + def _address(self): + return self.__c_pointer - @classmethod - def cNamespace(cls): - """ @rtype: CNamespace """ - if cls not in BaseCClass.namespaces: - BaseCClass.namespaces[cls] = CNamespace(cls.__name__) - return BaseCClass.namespaces[cls] + def _ad_str(self): + return 'at 0x%x' % self._address() @classmethod def from_param(cls, c_class_object): @@ -109,7 +110,7 @@ def __eq__(self, other): if isinstance(other, BaseCClass): return self.__c_pointer == other.__c_pointer else: - return super(BaseCClass , self).__eq__(other) + return super(BaseCClass , self) == other def __hash__(self): # Similar to last resort comparison; this returns the hash of the @@ -119,13 +120,20 @@ def __hash__(self): def free(self): raise NotImplementedError("A BaseCClass requires a free method implementation!") + def _create_repr(self, args = ''): + """Representation on the form (e.g.) 'EclFile(...) at 0x1729'.""" + return "{0}({1}) {2}".format(self.__class__.__name__, args, self._ad_str()) + + def __repr__(self): + """Representation on the form (e.g.) 'EclFile(...) at 0x1729'.""" + return self._create_repr() def __del__(self): if self.free is not None: if not self.__is_reference: # Important to check the c_pointer; in the case of failed object creation # we can have a Python object with c_pointer == None. - if self.__c_pointer > 0: + if self.__c_pointer: self.free() def _invalidateCPointer(self): diff --git a/ThirdParty/Ert/python/python/cwrap/basecenum.py b/ThirdParty/Ert/python/python/cwrap/basecenum.py index a8dbb36528..b86e1b0d64 100644 --- a/ThirdParty/Ert/python/python/cwrap/basecenum.py +++ b/ThirdParty/Ert/python/python/cwrap/basecenum.py @@ -14,13 +14,15 @@ # See the GNU General Public License at # for more details. +from __future__ import absolute_import, division, print_function, unicode_literals + +import six + import ctypes from .metacwrap import MetaCWrap -from .cwrap import CWrapper - +@six.add_metaclass(MetaCWrap) class BaseCEnum(object): - __metaclass__ = MetaCWrap enum_namespace = {} def __init__(self, *args, **kwargs): @@ -49,6 +51,7 @@ def from_param(cls, c_class_object): @classmethod def addEnum(cls, name, value): + name = str(name) if not isinstance(value, int): raise ValueError("Value must be an integer!") @@ -82,6 +85,12 @@ def __hash__(self): def __str__(self): return self.name + def __repr__(self): + cn = self.__class__.__name__ + na = self.name + va = self.value + return '%s(name = "%s", value = %s)' % (cn, na, va) + def __add__(self, other): self.__assertOtherIsSameType(other) value = self.value + other.value @@ -158,7 +167,3 @@ def populateEnum(cls, library, enum_provider_function): else: break - @classmethod - def registerEnum(cls, library, enum_name): - cwrapper = CWrapper(library) - cwrapper.registerType(enum_name, cls) diff --git a/ThirdParty/Ert/python/python/cwrap/basecvalue.py b/ThirdParty/Ert/python/python/cwrap/basecvalue.py index f5711c5a63..2c9f582792 100644 --- a/ThirdParty/Ert/python/python/cwrap/basecvalue.py +++ b/ThirdParty/Ert/python/python/cwrap/basecvalue.py @@ -14,13 +14,18 @@ # See the GNU General Public License at # for more details. -from ctypes import pointer, c_long, c_int, c_bool, c_float, c_double, c_byte, \ - c_short, c_char, c_ubyte, c_ushort, c_uint, c_ulong +from __future__ import (absolute_import, division, + print_function, unicode_literals) + +import six + +from ctypes import (pointer, c_long, c_int, c_bool, c_float, c_double, c_byte, + c_short, c_char, c_ubyte, c_ushort, c_uint, c_ulong) from .metacwrap import MetaCWrap +@six.add_metaclass(MetaCWrap) class BaseCValue(object): - __metaclass__ = MetaCWrap DATA_TYPE = None LEGAL_TYPES = [c_byte, c_ubyte, c_short, c_ushort, c_int, c_uint, c_long, c_ulong, c_bool, c_char, c_float, c_double] diff --git a/ThirdParty/Ert/python/python/cwrap/cclass.py b/ThirdParty/Ert/python/python/cwrap/cclass.py deleted file mode 100644 index 2e4ddf980c..0000000000 --- a/ThirdParty/Ert/python/python/cwrap/cclass.py +++ /dev/null @@ -1,122 +0,0 @@ -# Copyright (C) 2016 Statoil ASA, Norway. -# -# This file is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -import ctypes - - -class CClass(object): - """ - Base class used by all the classes wrapping a C 'class'. - All Python classes which wrap a C 'class', like e.g. the - ecl_kw_type structure, need a from_param() classmethod which is - used to 'translate' between the python object and the pointer to - corresponding underlying C structure. The CClass class contains an - implementation of such a from_param() method; all Python classes - which wrap a C 'class' should inherit from this class. - Python objects are managed with garbage collection, whereas the C - structures which are wrapped must be managed manually. Users of - the ert Python wrappers should assume 100% normal Python memory - management, and /NOT/ take any special care due to the fact that - the underlying C datastructures must be managed manually. This is - achieved, but in the wrapping layer some care must be taken. - - - Each of the Python classes is centered around an opaque handle - to the underlying C object; the c_ptr. This handle is passed - as a 'self' argument when calling the C functions. - - When a Python object goes out of scope the __del__() method is - called, and this method can be used to call the xxx_free() - method of the underlying C object. - There are essentially two categories of C objects; either objects - which are created with a xxxx_alloc() call - these objects should - be destroyed when they go out scope. The other class of objects - are references which are managed by another (container) class, - e.g. an ecl_kw instance might be managed by an ecl_file - container. In the case of of references the C object should not - bee freed when the Python object goes out of scope, on the other - hand we must ascertain that the container does /NOT/ go out of - scope as long the child reference exists, otherwise the object - will be destroyed under the reference. - The handling of references and objects is performed with the - init_cref() and init_cobj() methods below: - - init_cref(): This method will store a 'pointer' to the Python - container managing the reference. This will ensure that the - container is not recycle prematurely. Consider the example: - def load_poro( base ): - file = ecl.EclFile( "%s.INIT" % base ) - poro = file["PORO"][0] - return poro - poro = load_poro( "CASE" ) - - In this example the scope of the 'file' object is limited to - the 'load_poro' function, whereas the poro keyword object is - returned to the calling scope. If we did not take care to - store a pointer to the file container that would be destroyed - when returning from the load_poro function, and the poro - object would be invalid. - When a reference, like the poro variable in the example is - destroyed no cleanup is performed on the underlying C - storage, and the init_cref() method sets the cfree function - pointer to None. - - init_cobj(): This method is used for 'self-managed' objects, - when the Python object goes out of scope the underlying C - object should be destroyed as well. This is achieved by - storing a function pointer to the xxxx_free() function of the - C object. - - """ - c_ptr = None - cfree = None - parent = None - - @classmethod - def from_param( cls, obj ): - if obj is None: - return ctypes.c_void_p() - else: - return ctypes.c_void_p(obj.c_ptr) - - @classmethod - def asPythonObject( cls, c_ptr, cfree): - assert cfree is not None - obj = cls() - obj.init_cobj(c_ptr, cfree) - return obj - - @classmethod - def asPythonReference( cls, c_ptr, parent ): - obj = cls() - obj.init_cref(c_ptr, parent) - return obj - - - def init_cref(self, c_ptr, parent): - self.c_ptr = c_ptr - self.parent = parent - self.cfree = None - - - def init_cobj( self, c_ptr, cfree): - self.c_ptr = c_ptr - self.parent = None - self.cfree = cfree - - - def __del__(self): - if self.cfree: - # Important to check the c_ptr; in the case of failed object creation - # we can have a Python object with c_ptr == None. - if self.c_ptr: - self.cfree(self) diff --git a/ThirdParty/Ert/python/python/cwrap/cenum.py b/ThirdParty/Ert/python/python/cwrap/cenum.py deleted file mode 100644 index 7aec0a9e7c..0000000000 --- a/ThirdParty/Ert/python/python/cwrap/cenum.py +++ /dev/null @@ -1,112 +0,0 @@ -# Copyright (C) 2016 Statoil ASA, Norway. -# -# This file is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -""" -Convenience module for loading enum symbols and values. -""" - -from __future__ import print_function -import ctypes -import sys - - -def make_enum(name, attributes): - class cls(object): - pass - - cls.__name__ = name - cls.enum_names = [] - for key in attributes.keys(): - setattr(cls, key, attributes[key]) - cls.enum_names.append(key) - - return cls - - -def create_enum( lib, func_name, enum_name, name_space=None): - """ - Create and insert enum values as integer constants. - This function is based on iteratively querying the C library for - symbol name and enum value for an enum. The @lib argument should - be a ctypes libhandle, i.e. the return value from a CDLL() - call. The @func_name argument should be the name (i.e. a string) - of a C-function in the library which can provide symbol name and - numerical value for the elements in an enum. - For an enum definition like: - enum my_enum { - INVALID = 0, - VALUE1 = 1, - VALUE2 = 2 - } - The @func_name function in @lib should return - 'INVALID' , 0 - 'VALUE1' , 1 - 'VALUE2' , 2 - for index arguments 0,1 and 2 respectively. The symbols are - installed in the dictionary @dict[1], so after the enum above has - been internalized the dict scope will have symols like: - INVALID = 0 - VALUE1 = 1 - VALUE2 = 2 - - The @dict dictionary should typically be the globals() dictionary - from the calling scope. In addition to updating the @dict - dictionary with enum defintions a dictionary of name -> value - mappings will be returned. - The ecl_util.h header file contains the following emum definition: - typedef enum { ECL_OTHER_FILE = 0 , - ECL_RESTART_FILE = 1 , - ECL_UNIFIED_RESTART_FILE = 2 , - ECL_SUMMARY_FILE = 4 , - ECL_UNIFIED_SUMMARY_FILE = 8 , - ECL_SUMMARY_HEADER_FILE = 16 , - ECL_GRID_FILE = 32 , - ECL_EGRID_FILE = 64 , - ECL_INIT_FILE = 128 , - ECL_RFT_FILE = 256 , - ECL_DATA_FILE = 512 } ecl_file_enum; - In the ecl_util.py module this enum is loaded as: - file_enum = create_enum( libecl.lib , "ecl_util_file_enum_iget" , "ecl_file_enum" , globals()) - This will install the symbols ECL_OTHER_FILE, ECL_RESTART_FILE, - ... , ECL_DATA_FILE in the global namespace of the calling module - and in additional return a dictionary with the same mapping: - for enum_elm in file_enum.keys(): - print('%s -> %d' % ( enum_elm , file_enum[ enum_elm ] )) - """ - - try: - func = getattr(lib, func_name) - except AttributeError: - sys.exit("Could not find enum description function:%s - can not load enum:%s." % (func_name, enum_name)) - - func.restype = ctypes.c_char_p - func.argtypes = [ctypes.c_int, ctypes.POINTER(ctypes.c_int)] - enum = {} - index = 0 - while True: - value = ctypes.c_int() - name = func(index, ctypes.byref(value)) - if name: - if name_space: - name_space[name] = value.value - enum[name] = value.value - index += 1 - else: - break - enum = make_enum(enum_name, enum) - if name_space: - name_space[enum_name] = enum - return enum diff --git a/ThirdParty/Ert/python/python/cwrap/cfile.py b/ThirdParty/Ert/python/python/cwrap/cfile.py index 69344bd165..4b46d420f9 100644 --- a/ThirdParty/Ert/python/python/cwrap/cfile.py +++ b/ThirdParty/Ert/python/python/cwrap/cfile.py @@ -15,7 +15,8 @@ # for more details. import ctypes -from .prototype import Prototype +import six +from .prototype import Prototype, PrototypeError from .basecclass import BaseCClass class CFILE(BaseCClass): @@ -54,7 +55,7 @@ def __init__(self, py_file): If the supplied argument is not of type py_file the function will raise a TypeException. - Examples: ert.ecl.ecl_kw.EclKW.fprintf_grdecl() + Examples: ecl.ecl.ecl_kw.EclKW.fprintf_grdecl() """ c_ptr = self._as_file(py_file) try: diff --git a/ThirdParty/Ert/python/python/cwrap/clib.py b/ThirdParty/Ert/python/python/cwrap/clib.py index 44018a4dfe..2c24cb43fb 100644 --- a/ThirdParty/Ert/python/python/cwrap/clib.py +++ b/ThirdParty/Ert/python/python/cwrap/clib.py @@ -17,13 +17,13 @@ Observe that to ensure that all libraries are loaded through the same code path, all required libraries should be loaded explicitly through -the use of import statements; i.e. the ert.geo package requires the +the use of import statements; i.e. the ecl.geo package requires the libert_util librarary, to ensure that the correct version of the libert_util.so library file is loaded we should manually load that first as: - import ert.util - GEO_LIB = ert.load("libert_geometry") + import ecl.util + GEO_LIB = ecl.load("libert_geometry") Otherwise the standard operating system dependency resolve code will be invoked when loading libert_geometry, and that could in principle @@ -83,7 +83,7 @@ def load( lib, so_version = None, path = None): try: dll = ctypes.CDLL(lib_file , ctypes.RTLD_GLOBAL) return dll - except Exception, exc: + except Exception as exc: error = exc error_msg = "\nFailed to load shared library:%s\n\ndlopen() error: %s\n" % (lib , error) diff --git a/ThirdParty/Ert/python/python/cwrap/cnamespace.py b/ThirdParty/Ert/python/python/cwrap/cnamespace.py deleted file mode 100644 index e6daca95d4..0000000000 --- a/ThirdParty/Ert/python/python/cwrap/cnamespace.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (C) 2016 Statoil ASA, Norway. -# -# This file is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -class CNamespace(object): - def __init__(self, name): - object.__setattr__(self, "_name", name) - object.__setattr__(self, "_functions", {}) - - def __str__(self): - return "%s wrapper" % self._name - - def __setitem__(self, key, value): - self.__setValue(key, value) - - - def __getitem__(self, item): - return self._functions[item] - - def __setattr__(self, key, value): - self.__setValue(key, value) - - def __setValue(self, key, value): - assert not hasattr(self, key), "The namespace %s already contains a function named %s!" % (self._name, key) - - self._functions[key] = value - object.__setattr__(self, key, value) diff --git a/ThirdParty/Ert/python/python/cwrap/cwrap.py b/ThirdParty/Ert/python/python/cwrap/cwrap.py deleted file mode 100644 index 3be9b41476..0000000000 --- a/ThirdParty/Ert/python/python/cwrap/cwrap.py +++ /dev/null @@ -1,216 +0,0 @@ -# Copyright (C) 2016 Statoil ASA, Norway. -# -# This file is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -""" -Module implementing type map between C types and Python classes. -The prototype_pattern is a major regexp which is used to set the -correct restype and argtypes attributes of the function objects. -""" - -from __future__ import print_function -import ctypes -import re -import sys -import inspect - -from .basecclass import BaseCClass -from .basecvalue import BaseCValue -from .prototype import REGISTERED_TYPES - - - -prototype_pattern = "(?P[a-zA-Z][a-zA-Z0-9_*]*) +(?P[a-zA-Z]\w*) *[(](?P[a-zA-Z0-9_*, ]*)[)]" - -def isBoundMethod(func, bound_to_class=None): - if bound_to_class is None: - return hasattr(func, "__self__") - else: - return hasattr(func, "__self__") and issubclass(func.__self__, bound_to_class) - - -class CWrapError(Exception): - pass - -class CWrapper: - # Observe that registered_types is a class attribute, shared - # between all CWrapper instances. - registered_types = {} - pattern = re.compile(prototype_pattern) - - def __init__(self, lib): - self.__lib = lib - - @classmethod - def registerType(cls, type_name, value): - """Register a type against a legal ctypes type or a callable (or class)""" - # if type_name in cls.registered_types: - # print("Type %s already exists!" % type_name) - cls.registered_types[type_name] = value - - @classmethod - def registerObjectType(cls, type_name, base_c_class): - """ - Automatically registers a class type with object and reference versions. - For example: - string_list -> StringList - string_list_ref -> StringList.createCReference - string_list_obj -> StringList.createPythonObject - @type type_name: str - @type base_c_class: BaseCClass - """ - assert issubclass(base_c_class, BaseCClass) - - cls.registerType(type_name, base_c_class) - cls.registerType("%s_ref" % type_name, base_c_class.createCReference) - cls.registerType("%s_obj" % type_name, base_c_class.createPythonObject) - - - @classmethod - def registerDefaultTypes(cls): - """Registers the default available types for prototyping.""" - cls.registerType("void", None) - cls.registerType("void*", ctypes.c_void_p) - cls.registerType("uint", ctypes.c_uint) - cls.registerType("uint*", ctypes.POINTER(ctypes.c_uint)) - cls.registerType("int", ctypes.c_int) - cls.registerType("int*", ctypes.POINTER(ctypes.c_int)) - cls.registerType("int64", ctypes.c_int64) - cls.registerType("int64*", ctypes.POINTER(ctypes.c_int64)) - cls.registerType("size_t", ctypes.c_size_t) - cls.registerType("size_t*", ctypes.POINTER(ctypes.c_size_t)) - cls.registerType("bool", ctypes.c_bool) - cls.registerType("bool*", ctypes.POINTER(ctypes.c_bool)) - cls.registerType("long", ctypes.c_long) - cls.registerType("long*", ctypes.POINTER(ctypes.c_long)) - cls.registerType("char", ctypes.c_char) - cls.registerType("char*", ctypes.c_char_p) - cls.registerType("char**", ctypes.POINTER(ctypes.c_char_p)) - cls.registerType("float", ctypes.c_float) - cls.registerType("float*", ctypes.POINTER(ctypes.c_float)) - cls.registerType("double", ctypes.c_double) - cls.registerType("double*", ctypes.POINTER(ctypes.c_double)) - - - def __parseType(self, type_name): - """Convert a prototype definition type from string to a ctypes legal type.""" - type_name = type_name.strip() - - if type_name in CWrapper.registered_types: - return CWrapper.registered_types[type_name] - elif type_name in REGISTERED_TYPES: - return REGISTERED_TYPES[type_name].type_class_or_function - else: - return getattr(ctypes, type_name) - - - def prototype(self, prototype, lib=None): - """ - Defines the return type and arguments for a C-function - prototype expects a string formatted like this: - "type functionName(type, ... ,type)" - where type is a type available to ctypes - Some type are automatically converted: - int -> c_int - long -> c_long - char -> c_char_p - bool -> c_int - void -> None - double -> c_double - float -> c_float - There are also pointer versions of these: - long* -> POINTER(c_long) - bool* -> POINTER(c_int) - double* -> POINTER(c_double) - char* -> c_char_p - ... - In addition, user register types are recognized and any type - registered as a reference to BaseCClass createCReference and - createPythonObject are treated as pointers and converted - automatically. - """ - - match = re.match(CWrapper.pattern, prototype) - if not match: - raise CWrapError("Illegal prototype definition: %s\n" % prototype) - else: - restype = match.groupdict()["return"] - function_name = match.groupdict()["function"] - arguments = match.groupdict()["arguments"].split(",") - - try: - func = getattr(self.__lib, function_name) - except AttributeError: - raise CWrapError("Can not find function: %s in library: %s" % (function_name , self.__lib)) - - return_type = self.__parseType(restype) - - if inspect.isclass(return_type) and issubclass(return_type, BaseCClass): - sys.stderr.write("BaseCClass can not be used as a return type in prototype definition: %s\n" % prototype) - sys.stderr.write(" Correct return type may be: %s_ref or %s_obj" % (restype, restype)) - return None - - func.restype = return_type - - if inspect.isclass(return_type): - if issubclass(return_type, BaseCValue): - self.setReturnBehavior(func, return_type) - else: - pass # Use default behavior for BaseCEnum and ctypes classes - elif callable(return_type): - if isBoundMethod(return_type, BaseCClass) or not isBoundMethod(return_type): - self.setReturnBehavior(func, return_type) - else: - pass #Methods bound to anything else than BaseCClass - else: - if return_type is not None: - raise CWrapError("Unknown return type: %s" % return_type) - - if len(arguments) == 1 and arguments[0].strip() == "": - func.argtypes = [] - else: - argtypes = [self.__parseType(arg) for arg in arguments] - if len(argtypes) == 1 and argtypes[0] is None: - argtypes = [] - func.argtypes = argtypes - - return func - - @staticmethod - def setReturnBehavior(func, return_type): - if inspect.isclass(return_type) and issubclass(return_type, BaseCValue): - func.restype = return_type.type() - else: - func.restype = ctypes.c_void_p - - def returnFunction(result, func, arguments): - return return_type(result) - - func.errcheck = returnFunction - - def printTypes(self): - for ctype in self.registered_types.keys(): - print('%16s -> %s' % (ctype, self.registered_types[ctype])) - - -class CWrapperNameSpace: - def __init__( self, name ): - self.name = name - - def __str__(self): - return "%s wrapper" % self.name - - -CWrapper.registerDefaultTypes() diff --git a/ThirdParty/Ert/python/python/cwrap/metacwrap.py b/ThirdParty/Ert/python/python/cwrap/metacwrap.py index 73e86b35ba..52ccb970ce 100644 --- a/ThirdParty/Ert/python/python/cwrap/metacwrap.py +++ b/ThirdParty/Ert/python/python/cwrap/metacwrap.py @@ -14,10 +14,14 @@ # See the GNU General Public License at # for more details. +from __future__ import (absolute_import, division, + print_function, unicode_literals) +import six + import re from types import MethodType -from .prototype import registerType, Prototype +from .prototype import Prototype def snakeCase(name): @@ -43,13 +47,13 @@ def __init__(cls, name, bases, attrs): if hasattr(cls, "storageType"): storage_type = cls.storageType() - registerType(type_name, cls, is_return_type=is_return_type, storage_type=storage_type) + Prototype.registerType(type_name, cls, is_return_type=is_return_type, storage_type=storage_type) if hasattr(cls, "createCReference"): - registerType("%s_ref" % type_name, cls.createCReference, is_return_type=True, storage_type=storage_type) + Prototype.registerType("%s_ref" % type_name, cls.createCReference, is_return_type=True, storage_type=storage_type) if hasattr(cls, "createPythonObject"): - registerType("%s_obj" % type_name, cls.createPythonObject, is_return_type=True, storage_type=storage_type) + Prototype.registerType("%s_obj" % type_name, cls.createPythonObject, is_return_type=True, storage_type=storage_type) for key, attr in attrs.items(): @@ -59,4 +63,5 @@ def __init__(cls, name, bases, attrs): if attr.shouldBeBound(): method = MethodType(attr, None, cls) + #method = six.create_bound_method(attr, cls) setattr(cls, key, method) diff --git a/ThirdParty/Ert/python/python/cwrap/prototype.py b/ThirdParty/Ert/python/python/cwrap/prototype.py index 16b291fab0..082fe7184a 100644 --- a/ThirdParty/Ert/python/python/cwrap/prototype.py +++ b/ThirdParty/Ert/python/python/cwrap/prototype.py @@ -31,7 +31,7 @@ def __init__(self, type_class_or_function, is_return_type, storage_type): """:type: dict[str,TypeDefinition]""" -def registerType(type_name, type_class_or_function, is_return_type=True, storage_type=None): +def _registerType(type_name, type_class_or_function, is_return_type=True, storage_type=None): if type_name in REGISTERED_TYPES: raise PrototypeError("Type: '%s' already registered!" % type_name) @@ -39,28 +39,28 @@ def registerType(type_name, type_class_or_function, is_return_type=True, storage # print("Registered: %s for class: %s" % (type_name, repr(type_class_or_function))) -registerType("void", None) -registerType("void*", ctypes.c_void_p) -registerType("uint", ctypes.c_uint) -registerType("uint*", ctypes.POINTER(ctypes.c_uint)) -registerType("int", ctypes.c_int) -registerType("int*", ctypes.POINTER(ctypes.c_int)) -registerType("int64", ctypes.c_int64) -registerType("int64*", ctypes.POINTER(ctypes.c_int64)) -registerType("size_t", ctypes.c_size_t) -registerType("size_t*", ctypes.POINTER(ctypes.c_size_t)) -registerType("bool", ctypes.c_bool) -registerType("bool*", ctypes.POINTER(ctypes.c_bool)) -registerType("long", ctypes.c_long) -registerType("long*", ctypes.POINTER(ctypes.c_long)) -registerType("char", ctypes.c_char) -registerType("char*", ctypes.c_char_p) -registerType("char**", ctypes.POINTER(ctypes.c_char_p)) -registerType("float", ctypes.c_float) -registerType("float*", ctypes.POINTER(ctypes.c_float)) -registerType("double", ctypes.c_double) -registerType("double*", ctypes.POINTER(ctypes.c_double)) -registerType("py_object", ctypes.py_object) +_registerType("void", None) +_registerType("void*", ctypes.c_void_p) +_registerType("uint", ctypes.c_uint) +_registerType("uint*", ctypes.POINTER(ctypes.c_uint)) +_registerType("int", ctypes.c_int) +_registerType("int*", ctypes.POINTER(ctypes.c_int)) +_registerType("int64", ctypes.c_int64) +_registerType("int64*", ctypes.POINTER(ctypes.c_int64)) +_registerType("size_t", ctypes.c_size_t) +_registerType("size_t*", ctypes.POINTER(ctypes.c_size_t)) +_registerType("bool", ctypes.c_bool) +_registerType("bool*", ctypes.POINTER(ctypes.c_bool)) +_registerType("long", ctypes.c_long) +_registerType("long*", ctypes.POINTER(ctypes.c_long)) +_registerType("char", ctypes.c_char) +_registerType("char*", ctypes.c_char_p) +_registerType("char**", ctypes.POINTER(ctypes.c_char_p)) +_registerType("float", ctypes.c_float) +_registerType("float*", ctypes.POINTER(ctypes.c_float)) +_registerType("double", ctypes.c_double) +_registerType("double*", ctypes.POINTER(ctypes.c_double)) +_registerType("py_object", ctypes.py_object) PROTOTYPE_PATTERN = "(?P[a-zA-Z][a-zA-Z0-9_*]*) +(?P[a-zA-Z]\w*) *[(](?P[a-zA-Z0-9_*, ]*)[)]" @@ -160,4 +160,7 @@ def __repr__(self): @classmethod def registerType(cls, type_name, type_class_or_function, is_return_type=True, storage_type=None): - registerType(type_name, type_class_or_function, is_return_type=is_return_type, storage_type=storage_type) + _registerType(type_name, + type_class_or_function, + is_return_type = is_return_type, + storage_type = storage_type) diff --git a/ThirdParty/Ert/python/python/ecl/CMakeLists.txt b/ThirdParty/Ert/python/python/ecl/CMakeLists.txt new file mode 100644 index 0000000000..3ba6f862bc --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/CMakeLists.txt @@ -0,0 +1,14 @@ +set(PYTHON_SOURCES + __init__.py +) +add_python_package("python.ecl" ${PYTHON_INSTALL_PREFIX}/ecl "${PYTHON_SOURCES}" True) + +add_subdirectory(ecl) +add_subdirectory(geo) +add_subdirectory(test) +add_subdirectory(util) +add_subdirectory(well) + +configure_file(ecl_lib_info_build.py.in ${PROJECT_BINARY_DIR}/${PYTHON_INSTALL_PREFIX}/ecl/__ecl_lib_info.py ) +configure_file(ecl_lib_info_install.py.in ${PROJECT_BINARY_DIR}/${PYTHON_INSTALL_PREFIX}/ecl_lib_info_install.py ) +install(FILES ${PROJECT_BINARY_DIR}/${PYTHON_INSTALL_PREFIX}/ecl_lib_info_install.py DESTINATION ${PYTHON_INSTALL_PREFIX}/ecl RENAME __ecl_lib_info.py) diff --git a/ThirdParty/Ert/python/python/ecl/__init__.py b/ThirdParty/Ert/python/python/ecl/__init__.py new file mode 100644 index 0000000000..c5496bbb79 --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/__init__.py @@ -0,0 +1,130 @@ +# Copyright (C) 2011 Statoil ASA, Norway. +# +# The file '__init__.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. +""" +ert - Ensemble Reservoir Tool - a package for reservoir modeling. + +The ert package itself has no code, but contains several subpackages: + +ecl.ecl: Package for working with ECLIPSE files. The far most mature + package in ert. + +ecl.util: + +The ert package is based on wrapping the libriaries from the ERT C +code with ctypes; an essential part of ctypes approach is to load the +shared libraries with the ctypes.CDLL() function. The ctypes.CDLL() +function uses the standard methods of the operating system, +i.e. standard locations configured with ld.so.conf and the environment +variable LD_LIBRARY_PATH. + +To avoid conflict with other application using the ert libraries the +Python code should be able to locate the shared libraries without +(necessarily) using the LD_LIBRARY_PATH variable. The default +behaviour is to try to load from the library ../../lib64, but by using +the enviornment variable ERT_LIBRARY_PATH you can alter how ert looks +for shared libraries. + + 1. By default the code will try to load the shared libraries from + '../../lib64' relative to the location of this file. + + 2. Depending on the value of ERT_LIBRARY_PATH two different + behaviours can be imposed: + + Existing path: the package will look in the path pointed to + by ERT_LIBRARY_PATH for shared libraries. + + Arbitrary value: the package will use standard load order for + the operating system. + +If the fixed path, given by the default ../../lib64 or ERT_LIBRARY_PATH +alternative fails, the loader will try the default load behaviour +before giving up completely. +""" +import os.path +import sys + +import warnings +warnings.simplefilter('always', DeprecationWarning) # see #1437 + +from cwrap import load as cwrapload + +try: + import ert_site_init +except ImportError: + pass + + +required_version_hex = 0x02070000 + +ecl_lib_path = None +ert_so_version = "" +__version__ = "0.0.0" + + +# 1. Try to load the __ecl_lib_info module; this module has been +# configured by cmake during the build configuration process. The +# module should contain the variable lib_path pointing to the +# directory with shared object files. +try: + import __ecl_lib_info + ecl_lib_path = __ecl_lib_info.lib_path + ert_so_version = __ecl_lib_info.so_version + __version__ = __ecl_lib_info.__version__ +except ImportError: + pass +except AttributeError: + pass + + +# 2. Using the environment variable ERT_LIBRARY_PATH it is possible to +# override the default algorithms. If the ERT_LIBRARY_PATH is set +# to a non existing directory a warning will go to stderr and the +# setting will be ignored. +env_lib_path = os.getenv("ERT_LIBRARY_PATH") +if env_lib_path: + if os.path.isdir( env_lib_path ): + ert_lib_path = os.getenv("ERT_LIBRARY_PATH") + else: + sys.stderr.write("Warning: Environment variable ERT_LIBRARY_PATH points to nonexisting directory:%s - ignored" % env_lib_path) + + +# Check that the final ert_lib_path setting corresponds to an existing +# directory. +if ecl_lib_path: + if not os.path.isdir( ecl_lib_path ): + ecl_lib_path = None + + +if sys.hexversion < required_version_hex: + raise Exception("ERT Python requires Python 2.7.") + +# This load() function is *the* function actually loading shared +# libraries. + +def load(name): + return cwrapload(name, path=ecl_lib_path, so_version=ert_so_version) + + +from .util import Version +from .util import updateAbortSignals + +updateAbortSignals( ) + +def root(): + """ + Will print the filesystem root of the current ert package. + """ + return os.path.abspath( os.path.join( os.path.dirname( __file__ ) , "../")) diff --git a/ThirdParty/Ert/python/python/ecl/ecl/CMakeLists.txt b/ThirdParty/Ert/python/python/ecl/ecl/CMakeLists.txt new file mode 100644 index 0000000000..c1cb314101 --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/ecl/CMakeLists.txt @@ -0,0 +1,36 @@ +set(PYTHON_SOURCES + __init__.py + ecl_3d_file.py + ecl_3dkw.py + ecl_file.py + ecl_file_view.py + ecl_grav.py + ecl_grav_calc.py + ecl_grid.py + ecl_init_file.py + ecl_kw.py + ecl_npv.py + ecl_region.py + ecl_restart_file.py + ecl_rft.py + ecl_rft_cell.py + ecl_smspec_node.py + ecl_subsidence.py + ecl_sum.py + ecl_sum_keyword_vector.py + ecl_sum_node.py + ecl_sum_tstep.py + ecl_sum_vector.py + ecl_util.py + fortio.py + ecl_sum_keyword_vector.py + ecl_cmp.py + ecl_sum_var_type.py + ecl_type.py + ecl_grid_generator.py +) + +add_python_package("python.ecl.ecl" ${PYTHON_INSTALL_PREFIX}/ecl/ecl "${PYTHON_SOURCES}" True) + +add_subdirectory(faults) +add_subdirectory(rft) diff --git a/ThirdParty/Ert/python/python/ecl/ecl/__init__.py b/ThirdParty/Ert/python/python/ecl/ecl/__init__.py new file mode 100644 index 0000000000..1c6b26062d --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/ecl/__init__.py @@ -0,0 +1,114 @@ +# Copyright (C) 2011 Statoil ASA, Norway. +# +# The file '__init__.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. +""" +Package for working with ECLIPSE files. + +The ecl package contains several classes for working with ECLIPSE +files. The ecl package is a wrapper around the libecl library from the +ERT distribution. Mainly the package is organized with modules +ecl_xxx.py with a class EclXXX. The module ecl_xxx.py will generaly +wrap the content of the c-file ecl_xxx.c The main content is: + + fortio/FortIO: This is functionality to read and write binary + fortran files. + + ecl_kw/EclKW: This class holds one ECLIPSE keyword, like SWAT, in + restart format. + + ecl_type/EclDataType: This class is used to represent the data type + of the elements in EclKW. + + ecl_file/EclFile: This class is used to load an ECLIPSE file in + restart format, alternatively only parts of the file can be + loaded. Internally it consists of a collection of EclKW + instances. + + ecl_grid/EclGrid: This will load an ECLIPSE GRID or EGRID file, and + can then subsequently be used for queries about the grid. + + ecl_grid_generator/EclGridGenerator: This can be used to generate various + grids. + + ecl_sum/EclSum: This will load summary results from an ECLIPSE run; + both data file(s) and the SMSPEC file. The EclSum object can be + used as basis for queries on summary vectors. + + ecl_rft/[EclRFTFile , EclRFT , EclRFTCell]: Loads an ECLIPSE RFT/PLT + file, and can afterwords be used to support various queries. + + ecl_region/EclRegion: Convenience class to support selecting cells + in a grid based on a wide range of criteria. Can be used as a + mask in operations on EclKW instances. + + ecl_grav/EclGrav: Class used to simplify evaluation of ECLIPSE + modelling time-lapse gravitational surveys. + + ecl_subsidence/EclSubsidence: Small class used to evaluate simulated + subsidence from ECLIPSE simulations; analogous to the EcLGrav + functionality. + +In addition there are some modules which do not follow the one class +per module organization: + + ecl_util: This is mainly a collection of constants, and a few + stateless functions. + + ecl: This module is purely for convenience, all the symbols in the + package are explicitly imported into this module, ensuring that + all symbols in the package are available under the common + namespace 'ecl'. + +""" +import ecl.util +import ecl.geo + +from cwrap import Prototype + + +class EclPrototype(Prototype): + lib = ecl.load("libecl") + + def __init__(self, prototype, bind=True): + super(EclPrototype, self).__init__(EclPrototype.lib, prototype, bind=bind) + +ECL_LIB = ecl.load("libecl") + +from .ecl_util import EclFileEnum, EclFileFlagEnum, EclPhaseEnum, EclUnitTypeEnum , EclUtil +from .ecl_type import EclTypeEnum, EclDataType +from .ecl_sum_var_type import EclSumVarType +from .ecl_sum_tstep import EclSumTStep +from .ecl_sum import EclSum #, EclSumVector, EclSumNode, EclSMSPECNode +from .ecl_sum_keyword_vector import EclSumKeyWordVector +from .ecl_rft_cell import EclPLTCell, EclRFTCell +from .ecl_rft import EclRFT, EclRFTFile +from .fortio import FortIO, openFortIO +from .ecl_kw import EclKW +from .ecl_3dkw import Ecl3DKW +from .ecl_file_view import EclFileView +from .ecl_file import EclFile , openEclFile +from .ecl_3d_file import Ecl3DFile +from .ecl_init_file import EclInitFile +from .ecl_restart_file import EclRestartFile +from .ecl_grid import EclGrid +from .ecl_region import EclRegion +from .ecl_subsidence import EclSubsidence +from .ecl_grav_calc import phase_deltag, deltag +from .ecl_grav import EclGrav +from .ecl_sum_node import EclSumNode +from .ecl_sum_vector import EclSumVector +from .ecl_npv import EclNPV , NPVPriceVector +from .ecl_cmp import EclCmp +from .ecl_grid_generator import EclGridGenerator diff --git a/ThirdParty/Ert/python/python/ert/ecl/ecl_3d_file.py b/ThirdParty/Ert/python/python/ecl/ecl/ecl_3d_file.py similarity index 97% rename from ThirdParty/Ert/python/python/ert/ecl/ecl_3d_file.py rename to ThirdParty/Ert/python/python/ecl/ecl/ecl_3d_file.py index 27a5ef71c7..449641efee 100644 --- a/ThirdParty/Ert/python/python/ert/ecl/ecl_3d_file.py +++ b/ThirdParty/Ert/python/python/ecl/ecl/ecl_3d_file.py @@ -14,7 +14,7 @@ # See the GNU General Public License at # for more details. -from ert.ecl import EclFile, Ecl3DKW +from ecl.ecl import EclFile, Ecl3DKW class Ecl3DFile(EclFile): diff --git a/ThirdParty/Ert/python/python/ert/ecl/ecl_3dkw.py b/ThirdParty/Ert/python/python/ecl/ecl/ecl_3dkw.py similarity index 92% rename from ThirdParty/Ert/python/python/ert/ecl/ecl_3dkw.py rename to ThirdParty/Ert/python/python/ecl/ecl/ecl_3dkw.py index d62c1f0f18..1d1a3ace11 100644 --- a/ThirdParty/Ert/python/python/ert/ecl/ecl_3dkw.py +++ b/ThirdParty/Ert/python/python/ecl/ecl/ecl_3dkw.py @@ -14,8 +14,10 @@ # See the GNU General Public License at # for more details. -from __future__ import print_function -from ecl_kw import EclKW +from __future__ import (absolute_import, division, + print_function, unicode_literals) + +from .ecl_kw import EclKW class Ecl3DKW(EclKW): """ @@ -35,7 +37,7 @@ class Ecl3DKW(EclKW): Usage example: - from ert.ecl import EclInitFile,EclGrid + from ecl.ecl import EclInitFile,EclGrid grid = EclGrid("ECLIPSE.EGRID") file = EclInitFile(grid , "ECLIPSE.INIT") @@ -64,18 +66,20 @@ class Ecl3DKW(EclKW): PERMX property. """ - - @classmethod - def create(cls , kw , grid , value_type , default_value = 0 , global_active = False): + def __init__(self, kw , grid , value_type , default_value = 0 , global_active = False): if global_active: size = grid.getGlobalSize() else: - size = grid.getNumActive( ) + size = grid.getNumActive( ) + super(Ecl3DKW , self).__init__( kw , size , value_type) + self.grid = grid + self.global_active = global_active + self.setDefault( default_value ) - new_kw = super(Ecl3DKW , cls).create( kw , size , value_type) - new_kw.grid = grid - new_kw.global_active = global_active - new_kw.setDefault( default_value ) + + @classmethod + def create(cls , kw , grid , value_type , default_value = 0 , global_active = False): + new_kw = Ecl3DKW(kw , grid , value_type , default_value , global_active) return new_kw @classmethod @@ -164,7 +168,7 @@ def castFromKW(cls , kw , grid , default_value = 0): 2. Convert the keyword to a 3D keyword. - from ert.ecl import EclGrid,EclKW,Ecl3DKW + from ecl.ecl import EclGrid,EclKW,Ecl3DKW grid = EclGrid("ECLIPSE.EGRID") poro = EclKW.read_grdecl(open("poro.grdecl") , "PORO") diff --git a/ThirdParty/Ert/python/python/ert/ecl/ecl_cmp.py b/ThirdParty/Ert/python/python/ecl/ecl/ecl_cmp.py similarity index 99% rename from ThirdParty/Ert/python/python/ert/ecl/ecl_cmp.py rename to ThirdParty/Ert/python/python/ecl/ecl/ecl_cmp.py index 8608730ec1..38f76f2c28 100644 --- a/ThirdParty/Ert/python/python/ert/ecl/ecl_cmp.py +++ b/ThirdParty/Ert/python/python/ecl/ecl/ecl_cmp.py @@ -14,7 +14,7 @@ # See the GNU General Public License at # for more details. -from ert.ecl import EclSum +from ecl.ecl import EclSum class EclCase(object): diff --git a/ThirdParty/Ert/python/python/ert/ecl/ecl_file.py b/ThirdParty/Ert/python/python/ecl/ecl/ecl_file.py similarity index 94% rename from ThirdParty/Ert/python/python/ert/ecl/ecl_file.py rename to ThirdParty/Ert/python/python/ecl/ecl/ecl_file.py index 036003fd27..111b081fd1 100644 --- a/ThirdParty/Ert/python/python/ert/ecl/ecl_file.py +++ b/ThirdParty/Ert/python/python/ecl/ecl/ecl_file.py @@ -39,10 +39,10 @@ import types import datetime import ctypes -import warnings + from cwrap import BaseCClass -from ert.ecl import EclPrototype, EclKW, EclFileEnum, EclFileView -from ert.util import CTime +from ecl.ecl import EclPrototype, EclKW, EclFileEnum, EclFileView +from ecl.util import CTime class EclFile(BaseCClass): @@ -87,7 +87,7 @@ def getFileType(filename): @classmethod def restart_block( cls , filename , dtime = None , report_step = None): raise NotImplementedError("The restart_block implementation has been removed - open file normally and use EclFileView.") - + @classmethod @@ -100,7 +100,7 @@ def contains_report_step( cls , filename , report_step ): corresponding to @report_step can be found. Since this is a classmethod it is invoked like this: - import ert.ecl.ecl as ecl + import ecl.ecl.ecl as ecl .... if ecl.EclFile.contains_report_step("ECLIPSE.UNRST" , 20): print "OK - file contains report step 20" @@ -124,7 +124,7 @@ def contains_sim_time( cls , filename , dtime ): time corresponding to @dtime can be found. Since this is a classmethod it is invoked like this: - import ert.ecl.ecl as ecl + import ecl.ecl.ecl as ecl .... if ecl.EclFile.contains_sim_time("ECLIPSE.UNRST" , datetime.datetime( 2007 , 10 , 10) ): print "OK - file contains 10th of October 2007" @@ -171,8 +171,10 @@ def file_report_list( cls , filename ): - def __str__(self): - return "EclFile: %s" % self.getFilename( ) + def __repr__(self): + fn = self.getFilename() + wr = ', read/write' if self._writable() else '' + return self._create_repr('"%s"%s' % (fn,wr)) def __init__( self , filename , flags = 0): @@ -206,7 +208,7 @@ def __init__( self , filename , flags = 0): super(EclFile , self).__init__(c_ptr) self.global_view = self._get_global_view( ) self.global_view.setParent( self ) - + def save_kw( self , kw ): """ @@ -251,8 +253,16 @@ def free(self): self.close() - def blockView(self, kw , kw_index): - return self.global_view.blockView( kw , kw_index ) + def blockView(self, kw, kw_index): + if not kw in self: + raise KeyError('No such keyword "%s".' % kw) + ls = self.global_view.numKeywords(kw) + idx = kw_index + if idx < 0: + idx += ls + if 0 <= idx < ls: + return self.global_view.blockView(kw, idx) + raise IndexError('Index out of range, must be in [0, %d), was %d.' % (ls, kw_index)) def blockView2(self, start_kw , stop_kw , start_index): @@ -261,9 +271,9 @@ def blockView2(self, start_kw , stop_kw , start_index): def restartView( self, seqnum_index = None, report_step = None , sim_time = None , sim_days = None): return self.global_view.restartView( seqnum_index, report_step , sim_time, sim_days ) - - + + def select_block( self, kw , kw_index): raise NotImplementedError("The select_block implementation has been removed - use EclFileView") @@ -308,7 +318,7 @@ def select_last_restart( self ): is a non-unified restart file (or not a restart file at all), the method will do nothing and return False. """ - + @@ -340,10 +350,18 @@ def __getitem__(self , index): for swat in restart_file["SWAT"]: .... """ + if isinstance(index, int): + ls = len(self) + idx = index + if idx < 0: + idx += ls + if 0 <= idx < ls: + return self.global_view[idx] + else: + raise IndexError('Index must be in [0, %d), was: %d.' % (ls, index)) return self.global_view[index] - def iget_kw( self , index , copy = False): """ Will return EclKW instance nr @index. @@ -391,7 +409,7 @@ def iget_kw( self , index , copy = False): def iget_named_kw( self , kw_name , index , copy = False): return self.global_view.iget_named_kw( kw_name , index ) - + def restart_get_kw( self , kw_name , dtime , copy = False): """Will return EclKW @kw_name from restart file at time @dtime. @@ -490,7 +508,7 @@ def keys(self): header_dict = {} for index in range(len(self)): kw = self[index] - header_dict[ kw.name ] = True + header_dict[ kw.getName() ] = True return header_dict.keys() @@ -531,11 +549,12 @@ def report_dates( self ): probably be tricked by other file types also containing an INTEHEAD keyword. """ - dates = [] if self.has_kw('SEQNUM'): + dates = [] for index in range( self.num_named_kw( 'SEQNUM' )): dates.append( self.iget_restart_sim_time( index )) - else: + return dates + elif 'INTEHEAD' in self: # This is a uber-hack; should export the ecl_rsthead # object as ctypes structure. intehead = self["INTEHEAD"][0] @@ -543,8 +562,8 @@ def report_dates( self ): month = intehead[65] day = intehead[64] date = datetime.datetime( year , month , day ) - dates = [ date ] - return dates + return [ date ] + return None @property @@ -561,7 +580,7 @@ def num_named_kw( self , kw): """ return self.global_view.numKeywords( kw ) - + def has_kw( self , kw , num = 0): """ Check if current EclFile instance has a keyword @kw. @@ -569,11 +588,8 @@ def has_kw( self , kw , num = 0): If the optional argument @num is given it will check if the EclFile has at least @num occurences of @kw. """ - num_named_kw = self.num_named_kw( kw ) - if num_named_kw > num: - return True - else: - return False + + return self.num_named_kw( kw ) > num def __contains__(self , kw): """ @@ -641,14 +657,8 @@ def getFilename(self): """ Name of the file currently loaded. """ - return self._get_src_file( ) - - - @property - def name(self): - warnings.warn("The name property is deprecated - use getFilename( )" , DeprecationWarning) - return self.getFilename() - + fn = self._get_src_file() + return str(fn) if fn else '' def fwrite( self , fortio ): """ @@ -659,7 +669,7 @@ def fwrite( self , fortio ): This method will write the current EclFile instance to a FortIO stream already opened for writing: - import ert.ecl.ecl as ecl + import ecl.ecl.ecl as ecl ... fortio = ecl.FortIO( "FILE.XX" ) file.fwrite( fortio ) diff --git a/ThirdParty/Ert/python/python/ecl/ecl/ecl_file_view.py b/ThirdParty/Ert/python/python/ecl/ecl/ecl_file_view.py new file mode 100644 index 0000000000..558f585e60 --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/ecl/ecl_file_view.py @@ -0,0 +1,192 @@ +# Copyright (C) 2017 Statoil ASA, Norway. +# +# This file is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. + +from __future__ import absolute_import, division, print_function, unicode_literals +from six import string_types +from cwrap import BaseCClass +from ecl.ecl import EclPrototype +from ecl.util import CTime + +class EclFileView(BaseCClass): + TYPE_NAME = "ecl_file_view" + _iget_kw = EclPrototype("ecl_kw_ref ecl_file_view_iget_kw( ecl_file_view , int)") + _iget_named_kw = EclPrototype("ecl_kw_ref ecl_file_view_iget_named_kw( ecl_file_view , char* , int)") + _get_size = EclPrototype("int ecl_file_view_get_size( ecl_file_view )") + _get_num_named_kw = EclPrototype("int ecl_file_view_get_num_named_kw( ecl_file_view , char* )") + _get_unique_size = EclPrototype("int ecl_file_view_get_num_distinct_kw( ecl_file_view )") + _create_block_view = EclPrototype("ecl_file_view_ref ecl_file_view_add_blockview( ecl_file_view , char*, int )") + _create_block_view2 = EclPrototype("ecl_file_view_ref ecl_file_view_add_blockview2( ecl_file_view , char*, char*, int )") + _restart_view = EclPrototype("ecl_file_view_ref ecl_file_view_add_restart_view( ecl_file_view , int, int, time_t, double )") + + + def __init__(self): + raise NotImplementedError("Can not instantiate directly") + + + def __iget(self , index): + return self._iget_kw( index ).setParent( parent = self ) + + + def __repr__(self): + return 'EclFileView(size = %d) %s' % (len(self), self._ad_str()) + + def iget_named_kw(self, kw_name , index): + if not kw_name in self: + raise KeyError("No such keyword: %s" % kw_name) + + if index >= self.numKeywords( kw_name ): + raise IndexError("Too large index: %d" % index) + + return self._iget_named_kw( kw_name , index ).setParent( parent = self ) + + + + def __getitem__(self , index): + """ + Implements [] operator; index can be integer or key. + + Will look up EclKW instances from the current EclFile + instance. The @index argument can either be an integer, in + which case the method will return EclKW number @index, or + alternatively a keyword string, in which case the method will + return a list of EclKW instances with that keyword: + + restart_file = ecl_file.EclFile("ECLIPSE.UNRST") + kw9 = restart_file[9] + swat_list = restart_file["SWAT"] + + The keyword based lookup can be combined with an extra [] to + get EclKW instance nr: + + swat9 = restart_file["SWAT"][9] + + Will return the 10'th SWAT keyword from the restart file. The + following example will iterate over all the SWAT keywords in a + restart file: + + restart_file = ecl_file.EclFile("ECLIPSE.UNRST") + for swat in restart_file["SWAT"]: + .... + """ + + if isinstance( index , int): + ls = len(self) + idx = index + if idx < 0: + idx += ls + if 0 <= idx < ls: + return self.__iget(idx) + else: + raise IndexError('Index must be in [0, %d), was: %d.' % (ls, index)) + + if isinstance( index , slice ): + indices = index.indices( len(self) ) + kw_list = [] + for i in range(*indices): + kw_list.append( self[i] ) + return kw_list + else: + if isinstance( index , bytes): + index = index.decode('ascii') + if isinstance( index , string_types): + if index in self: + kw_index = index + kw_list = [] + for index in range( self.numKeywords( kw_index )): + kw_list.append( self.iget_named_kw( kw_index , index)) + return kw_list + else: + raise KeyError("Unrecognized keyword:\'%s\'" % index) + else: + raise TypeError("Index must be integer or string (keyword)") + + + def __len__(self): + return self._get_size( ) + + + def __contains__(self , kw): + if self.numKeywords(kw) > 0: + return True + else: + return False + + + def numKeywords(self , kw): + return self._get_num_named_kw( kw ) + + + def uniqueSize(self): + return self._get_unique_size( ) + + def blockView2(self , start_kw , stop_kw, start_index): + idx = start_index + if start_kw: + if not start_kw in self: + raise KeyError("The keyword:%s is not in file" % start_kw) + + ls = self.numKeywords(start_kw) + if idx < 0: + idx += ls + if not (0 <= idx < ls): + raise IndexError('Index must be in [0, %d), was: %d.' % (ls, start_index)) + + if stop_kw: + if not stop_kw in self: + raise KeyError("The keyword:%s is not in file" % stop_kw) + + view = self._create_block_view2(start_kw, stop_kw, idx) + view.setParent( parent = self ) + return view + + + def blockView(self , kw , kw_index): + num = self.numKeywords( kw ) + + if num == 0: + raise KeyError("Unknown keyword: %s" % kw) + + idx = kw_index + if idx < 0: + idx += num + + if not (0 <= idx < num): + raise IndexError('Index must be in [0, %d), was: %d.' % (num, kw_index)) + + view = self._create_block_view( kw , kw_index ) + view.setParent( parent = self ) + return view + + + def restartView(self , seqnum_index = None, report_step = None , sim_time = None , sim_days = None): + if report_step is None: + report_step = -1 + + if sim_time is None: + sim_time = -1 + + if sim_days is None: + sim_days = -1 + + if seqnum_index is None: + seqnum_index = -1 + + view = self._restart_view( seqnum_index , report_step , CTime( sim_time ) , sim_days ) + if view is None: + raise ValueError("No such restart block could be identiefied") + + view.setParent( parent = self ) + return view diff --git a/ThirdParty/Ert/python/python/ert/ecl/ecl_grav.py b/ThirdParty/Ert/python/python/ecl/ecl/ecl_grav.py similarity index 99% rename from ThirdParty/Ert/python/python/ert/ecl/ecl_grav.py rename to ThirdParty/Ert/python/python/ecl/ecl/ecl_grav.py index 5b06f7b953..fee8ea71dc 100644 --- a/ThirdParty/Ert/python/python/ert/ecl/ecl_grav.py +++ b/ThirdParty/Ert/python/python/ecl/ecl/ecl_grav.py @@ -22,7 +22,7 @@ ecl_grav.c implementation in the libecl library. """ from cwrap import BaseCClass -from ert.ecl import EclPhaseEnum, EclPrototype +from ecl.ecl import EclPhaseEnum, EclPrototype class EclGrav(BaseCClass): @@ -84,7 +84,7 @@ def add_survey_RPORV( self, survey_name, restart_view ): to load the @restart_view argument is: import datetime - from ert.ecl import EclRestartFile + from ecl.ecl import EclRestartFile ... ... date = datetime.datetime( year , month , day ) diff --git a/ThirdParty/Ert/python/python/ert/ecl/ecl_grav_calc.py b/ThirdParty/Ert/python/python/ecl/ecl/ecl_grav_calc.py similarity index 98% rename from ThirdParty/Ert/python/python/ert/ecl/ecl_grav_calc.py rename to ThirdParty/Ert/python/python/ecl/ecl/ecl_grav_calc.py index 793ad89586..44e5c2006c 100644 --- a/ThirdParty/Ert/python/python/ert/ecl/ecl_grav_calc.py +++ b/ThirdParty/Ert/python/python/ecl/ecl/ecl_grav_calc.py @@ -14,7 +14,7 @@ # See the GNU General Public License at # for more details. -from ert.ecl import EclPrototype +from ecl.ecl import EclPrototype _phase_deltag = EclPrototype("double ecl_grav_phase_deltag( double, double ,double , ecl_grid , ecl_file , ecl_kw , ecl_kw , ecl_kw , ecl_kw , ecl_kw , ecl_kw") diff --git a/ThirdParty/Ert/python/python/ert/ecl/ecl_grid.py b/ThirdParty/Ert/python/python/ecl/ecl/ecl_grid.py similarity index 87% rename from ThirdParty/Ert/python/python/ert/ecl/ecl_grid.py rename to ThirdParty/Ert/python/python/ecl/ecl/ecl_grid.py index aecd7fa5f7..7d9bdb6a65 100644 --- a/ThirdParty/Ert/python/python/ert/ecl/ecl_grid.py +++ b/ThirdParty/Ert/python/python/ecl/ecl/ecl_grid.py @@ -1,18 +1,18 @@ -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file 'ecl_grid.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. +# Copyright (C) 2011 Statoil ASA, Norway. +# +# The file 'ecl_grid.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. """ Module to load and query ECLIPSE GRID/EGRID files. @@ -25,14 +25,15 @@ """ import ctypes +import warnings import numpy import sys -import warnings import os.path import math +import itertools from cwrap import CFILE, BaseCClass -from ert.util import IntVector -from ert.ecl import EclPrototype, EclTypeEnum, EclKW, FortIO, EclUnitTypeEnum +from ecl.util import IntVector +from ecl.ecl import EclPrototype, EclDataType, EclKW, FortIO, EclUnitTypeEnum class EclGrid(BaseCClass): @@ -42,7 +43,7 @@ class EclGrid(BaseCClass): TYPE_NAME = "ecl_grid" _fread_alloc = EclPrototype("void* ecl_grid_load_case__( char* , bool )" , bind = False) - _grdecl_create = EclPrototype("ecl_grid_obj ecl_grid_alloc_GRDECL_kw( int , int , int , ecl_kw , ecl_kw , ecl_kw , ecl_kw)" , bind = False) + _grdecl_create = EclPrototype("ecl_grid_obj ecl_grid_alloc_GRDECL_kw( int , int , int , ecl_kw , ecl_kw , ecl_kw , ecl_kw)" , bind = False) _alloc_rectangular = EclPrototype("ecl_grid_obj ecl_grid_alloc_rectangular( int , int , int , double , double , double , int*)" , bind = False) _exists = EclPrototype("bool ecl_grid_exists( char* )" , bind = False) @@ -50,7 +51,7 @@ class EclGrid(BaseCClass): _get_cell_lgr = EclPrototype("ecl_grid_ref ecl_grid_get_cell_lgr1( ecl_grid , int )") _num_coarse_groups = EclPrototype("int ecl_grid_get_num_coarse_groups( ecl_grid )") _in_coarse_group1 = EclPrototype("bool ecl_grid_cell_in_coarse_group1( ecl_grid , int)") - _free = EclPrototype("void ecl_grid_free( ecl_grid )") + _free = EclPrototype("void ecl_grid_free( ecl_grid )") _get_nx = EclPrototype("int ecl_grid_get_nx( ecl_grid )") _get_ny = EclPrototype("int ecl_grid_get_ny( ecl_grid )") _get_nz = EclPrototype("int ecl_grid_get_nz( ecl_grid )") @@ -60,13 +61,13 @@ class EclGrid(BaseCClass): _get_name = EclPrototype("char* ecl_grid_get_name( ecl_grid )") _ijk_valid = EclPrototype("bool ecl_grid_ijk_valid(ecl_grid , int , int , int)") _get_active_index3 = EclPrototype("int ecl_grid_get_active_index3( ecl_grid , int , int , int)") - _get_global_index3 = EclPrototype("int ecl_grid_get_global_index3( ecl_grid , int , int , int)") - _get_active_index1 = EclPrototype("int ecl_grid_get_active_index1( ecl_grid , int )") - _get_active_fracture_index1 = EclPrototype("int ecl_grid_get_active_fracture_index1( ecl_grid , int )") - _get_global_index1A = EclPrototype("int ecl_grid_get_global_index1A( ecl_grid , int )") - _get_global_index1F = EclPrototype("int ecl_grid_get_global_index1F( ecl_grid , int )") + _get_global_index3 = EclPrototype("int ecl_grid_get_global_index3( ecl_grid , int , int , int)") + _get_active_index1 = EclPrototype("int ecl_grid_get_active_index1( ecl_grid , int )") + _get_active_fracture_index1 = EclPrototype("int ecl_grid_get_active_fracture_index1( ecl_grid , int )") + _get_global_index1A = EclPrototype("int ecl_grid_get_global_index1A( ecl_grid , int )") + _get_global_index1F = EclPrototype("int ecl_grid_get_global_index1F( ecl_grid , int )") _get_ijk1 = EclPrototype("void ecl_grid_get_ijk1( ecl_grid , int , int* , int* , int*)") - _get_ijk1A = EclPrototype("void ecl_grid_get_ijk1A( ecl_grid , int , int* , int* , int*)") + _get_ijk1A = EclPrototype("void ecl_grid_get_ijk1A( ecl_grid , int , int* , int* , int*)") _get_xyz3 = EclPrototype("void ecl_grid_get_xyz3( ecl_grid , int , int , int , double* , double* , double*)") _get_xyz1 = EclPrototype("void ecl_grid_get_xyz1( ecl_grid , int , double* , double* , double*)") _get_cell_corner_xyz1 = EclPrototype("void ecl_grid_get_cell_corner_xyz1( ecl_grid , int , int , double* , double* , double*)") @@ -84,17 +85,18 @@ class EclGrid(BaseCClass): _get_cell_dx = EclPrototype("double ecl_grid_get_cell_dx1( ecl_grid , int )") _get_cell_dy = EclPrototype("double ecl_grid_get_cell_dy1( ecl_grid , int )") _get_depth = EclPrototype("double ecl_grid_get_cdepth1( ecl_grid , int )") - _fwrite_grdecl = EclPrototype("void ecl_grid_grdecl_fprintf_kw( ecl_grid , ecl_kw , char* , FILE , double)") + _fwrite_grdecl = EclPrototype("void ecl_grid_grdecl_fprintf_kw( ecl_grid , ecl_kw , char* , FILE , double)") _load_column = EclPrototype("void ecl_grid_get_column_property( ecl_grid , ecl_kw , int , int , double_vector)") - _get_top = EclPrototype("double ecl_grid_get_top2( ecl_grid , int , int )") - _get_bottom = EclPrototype("double ecl_grid_get_bottom2( ecl_grid , int , int )") - _locate_depth = EclPrototype("int ecl_grid_locate_depth( ecl_grid , double , int , int )") + _get_top = EclPrototype("double ecl_grid_get_top2( ecl_grid , int , int )") + _get_top1A = EclPrototype("double ecl_grid_get_top1A(ecl_grid , int )") + _get_bottom = EclPrototype("double ecl_grid_get_bottom2( ecl_grid , int , int )") + _locate_depth = EclPrototype("int ecl_grid_locate_depth( ecl_grid , double , int , int )") _invalid_cell = EclPrototype("bool ecl_grid_cell_invalid1( ecl_grid , int)") _valid_cell = EclPrototype("bool ecl_grid_cell_valid1( ecl_grid , int)") _get_distance = EclPrototype("void ecl_grid_get_distance( ecl_grid , int , int , double* , double* , double*)") - _fprintf_grdecl = EclPrototype("void ecl_grid_fprintf_grdecl( ecl_grid , FILE) ") - _fwrite_GRID = EclPrototype("void ecl_grid_fwrite_GRID( ecl_grid , char* )") - _fwrite_EGRID2 = EclPrototype("void ecl_grid_fwrite_EGRID2( ecl_grid , char*, ecl_unit_enum , float*)") + _fprintf_grdecl2 = EclPrototype("void ecl_grid_fprintf_grdecl2( ecl_grid , FILE , ecl_unit_enum) ") + _fwrite_GRID2 = EclPrototype("void ecl_grid_fwrite_GRID2( ecl_grid , char* , ecl_unit_enum)") + _fwrite_EGRID2 = EclPrototype("void ecl_grid_fwrite_EGRID2( ecl_grid , char*, ecl_unit_enum)") _equal = EclPrototype("bool ecl_grid_compare(ecl_grid , ecl_grid , bool, bool)") _dual_grid = EclPrototype("bool ecl_grid_dual_grid( ecl_grid )") _init_actnum = EclPrototype("void ecl_grid_init_actnum_data( ecl_grid , int* )") @@ -102,8 +104,8 @@ class EclGrid(BaseCClass): _global_kw_copy = EclPrototype("void ecl_grid_global_kw_copy( ecl_grid , ecl_kw , ecl_kw)") _create_volume_keyword = EclPrototype("ecl_kw_obj ecl_grid_alloc_volume_kw( ecl_grid , bool)") - - + + @classmethod def loadFromGrdecl(cls , filename): """Will create a new EclGrid instance from grdecl file. @@ -111,7 +113,7 @@ def loadFromGrdecl(cls , filename): This function will scan the input file @filename and look for the keywords required to build a grid. The following keywords are required: - + SPECGRID ZCORN COORD In addition the function will look for and use the ACTNUM and @@ -127,11 +129,11 @@ def loadFromGrdecl(cls , filename): if os.path.isfile(filename): with open(filename) as f: - specgrid = EclKW.read_grdecl(f, "SPECGRID", ecl_type=EclTypeEnum.ECL_INT_TYPE, strict=False) + specgrid = EclKW.read_grdecl(f, "SPECGRID", ecl_type=EclDataType.ECL_INT, strict=False) zcorn = EclKW.read_grdecl(f, "ZCORN") coord = EclKW.read_grdecl(f, "COORD") try: - actnum = EclKW.read_grdecl(f, "ACTNUM", ecl_type=EclTypeEnum.ECL_INT_TYPE) + actnum = EclKW.read_grdecl(f, "ACTNUM", ecl_type=EclDataType.ECL_INT) except ValueError: actnum = None @@ -153,7 +155,7 @@ def loadFromFile(cls , filename): return EclGrid( filename ) else: return EclGrid.loadFromGrdecl( filename ) - + @classmethod def create(cls , specgrid , zcorn , coord , actnum , mapaxes = None ): @@ -172,29 +174,25 @@ def create(cls , specgrid , zcorn , coord , actnum , mapaxes = None ): zcorn_kw = file.iget_named_kw( "ZCORN" , 0) coord_kw = file.iget_named_kw( "COORD" , 0) actnum_kw = file.iget_named_kw( "ACTNUM" , 0 ) - + grid = EclGrid.create( specgrid_kw , zcorn_kw , coord_kw , actnum_kw) - - If you are so inclined ... + + If you are so inclined ... """ return cls._grdecl_create( specgrid[0] , specgrid[1] , specgrid[2] , zcorn , coord , actnum , mapaxes ) - - - - @classmethod - def create_rectangular(cls , dims , dV , actnum = None): - warnings.warn("The create_rectangular method is deprecated - use createRectangular( )" , DeprecationWarning) - return cls.createRectangular( dims , dV , actnum ) - - @classmethod - def createRectangular(cls , dims , dV , actnum = None): + def createRectangular(cls, dims , dV , actnum = None): """ Will create a new rectangular grid. @dims = (nx,ny,nz) @dVg = (dx,dy,dz) - - With the default value @actnum == None all cells will be active, + + With the default value @actnum == None all cells will be active, """ + + warnings.warn("EclGrid.createRectangular is deprecated. " + + "Please used the similar method in EclGridGenerator!", + DeprecationWarning) + if actnum is None: ecl_grid = cls._alloc_rectangular( dims[0] , dims[1] , dims[2] , dV[0] , dV[1] , dV[2] , None ) else: @@ -203,7 +201,7 @@ def createRectangular(cls , dims , dV , actnum = None): for (index , value) in enumerate(actnum): tmp[index] = value actnum = tmp - + if not len(actnum) == dims[0] * dims[1] * dims[2]: raise ValueError("ACTNUM size mismatch: len(ACTNUM):%d Expected:%d" % (len(actnum) , dims[0] * dims[1] * dims[2])) ecl_grid = cls._alloc_rectangular( dims[0] , dims[1] , dims[2] , dV[0] , dV[1] , dV[2] , actnum.getDataPtr() ) @@ -215,18 +213,44 @@ def createRectangular(cls , dims , dV , actnum = None): return ecl_grid - - def __init__(self , filename): - apply_mapaxes = True + def __init__(self , filename , apply_mapaxes = True): + """ + Will create a grid structure from an EGRID or GRID file. + """ c_ptr = self._fread_alloc( filename , apply_mapaxes) if c_ptr: super(EclGrid, self).__init__(c_ptr) else: raise IOError("Loading grid from:%s failed" % filename) + def free(self): self._free( ) - + + def _nicename(self): + """name is often full path to grid, if so, output basename, else name""" + name = self.getName() + if os.path.isfile(name): + name = os.path.basename(name) + return name + + def __repr__(self): + """Returns, e.g.: + EclGrid("NORNE_ATW2013.EGRID", 46x112x22, global_size = 113344, active_size = 44431) at 0x28c4a70 + """ + name = self._nicename() + if name: + name = '"%s", ' % name + g_size = self.getGlobalSize() + a_size = self.getNumActive() + xyz_s = '%dx%dx%d' % (self.getNX(),self.getNY(),self.getNZ()) + return self._create_repr('%s%s, global_size = %d, active_size = %d' % (name, xyz_s, g_size, a_size)) + + def __len__(self): + """ + len(grid) wil return the total number of cells. + """ + return self._get_global_size( ) def equal(self , other , include_lgr = True , include_nnc = False , verbose = False): """ @@ -239,49 +263,7 @@ def equal(self , other , include_lgr = True , include_nnc = False , verbose = Fa def dualGrid(self): """Is this grid dual porosity model?""" - return self._dual_grid( ) - - @property - def dual_grid( self ): - warnings.warn("The dual_grid property is deprecated - use dualGrid( ) method" , DeprecationWarning) - return self.dualGrid( ) - - - @property - def nx( self ): - warnings.warn("The nx property is deprecated - use getNX( ) method" , DeprecationWarning) - return self.getNX() - - @property - def ny( self ): - warnings.warn("The ny property is deprecated - use getNY( ) method" , DeprecationWarning) - return self.getNY() - - @property - def nz( self ): - warnings.warn("The nz property is deprecated - use getNZ( ) method" , DeprecationWarning) - return self.getNZ() - - @property - def size( self ): - warnings.warn("The size property is deprecated - use getGlobalSize( ) method" , DeprecationWarning) - return self.getGlobalSize( ) - - @property - def nactive( self ): - warnings.warn("The nactive property is deprecated - use getNumActive( ) method" , DeprecationWarning) - return self.getNumActive( ) - - @property - def nactive_fracture( self ): - warnings.warn("The nactive_fracture property is deprecated - use getNumActiveFracture( ) method" , DeprecationWarning) - return self.getNumActiveFracture( ) - - @property - def dims( self ): - warnings.warn("The dims property is deprecated - use getDims() method instead" , DeprecationWarning) - return self.getDims( ) - + return self._dual_grid( ) def getDims(self): """A tuple of four elements: (nx , ny , nz , nactive).""" @@ -290,7 +272,7 @@ def getDims(self): self.getNZ( ) , self.getNumActive( ) ) - + def getNX(self): """ The number of elements in the x direction""" return self._get_nx( ) @@ -322,7 +304,7 @@ def getBoundingBox2D(self , layer = 0 , lower_left = None , upper_right = None): x = ctypes.c_double() y = ctypes.c_double() z = ctypes.c_double() - + if lower_left is None: i1 = 0 j1 = 0 @@ -334,22 +316,22 @@ def getBoundingBox2D(self , layer = 0 , lower_left = None , upper_right = None): if not 0 < j1 < self.getNY(): raise ValueError("lower_left j coordinate invalid") - + if upper_right is None: i2 = self.getNX() j2 = self.getNY() else: i2,j2 = upper_right - + if not 1 < i2 <= self.getNX(): raise ValueError("upper_right i coordinate invalid") if not 1 < j2 <= self.getNY(): raise ValueError("upper_right j coordinate invalid") - + if not i1 < i2: raise ValueError("Must have lower_left < upper_right") - + if not j1 < j2: raise ValueError("Must have lower_left < upper_right") @@ -374,22 +356,16 @@ def getBoundingBox2D(self , layer = 0 , lower_left = None , upper_right = None): def getName(self): """ - Name of the current grid. - + Name of the current grid, returns a string. + For the main grid this is the filename given to the constructor when loading the grid; for an LGR this is the name of the LGR. If the grid instance has been created with the create() classmethod this can be None. """ - return self._get_name( ) - + n = self._get_name() + return str(n) if n else '' - @property - def name( self ): - warnings.warn("The name property is deprecated - use getName() method instead" , DeprecationWarning) - return self.getName() - - def global_index( self , active_index = None, ijk = None): """ Will convert either active_index or (i,j,k) to global index. @@ -402,7 +378,7 @@ def __global_index( self , active_index = None , global_index = None , ijk = Non This method will convert @active_index or @ijk to a global index. Exactly one of the arguments @active_index, - @global_index or @ijk must be supplied. + @global_index or @ijk must be supplied. The method is used extensively internally in the EclGrid class; most methods which take coordinate input pass through @@ -418,34 +394,34 @@ def __global_index( self , active_index = None , global_index = None , ijk = Non if ijk: set_count += 1 - + if not set_count == 1: raise ValueError("Exactly one of the kewyord arguments active_index, global_index or ijk must be set") - + if not active_index is None: global_index = self._get_global_index1A( active_index ) elif ijk: nx = self.getNX() ny = self.getNY() nz = self.getNZ() - + i,j,k = ijk if not 0 <= i < nx: - raise IndexError("Invalid value i:%d Range: [%d,%d)" % (i , 0 , nx)) + raise IndexError("Invalid value i:%d Range: [%d,%d)" % (i , 0 , nx)) if not 0 <= j < ny: - raise IndexError("Invalid value j:%d Range: [%d,%d)" % (j , 0 , ny)) - + raise IndexError("Invalid value j:%d Range: [%d,%d)" % (j , 0 , ny)) + if not 0 <= k < nz: - raise IndexError("Invalid value k:%d Range: [%d,%d)" % (k , 0 , nz)) + raise IndexError("Invalid value k:%d Range: [%d,%d)" % (k , 0 , nz)) global_index = self._get_global_index3( i,j,k) else: if not 0 <= global_index < self.getGlobalSize(): - raise IndexError("Invalid value global_index:%d Range: [%d,%d)" % (global_index , 0 , self.getGlobalSize())) + raise IndexError("Invalid value global_index:%d Range: [%d,%d)" % (global_index , 0 , self.getGlobalSize())) return global_index - + def get_active_index( self , ijk = None , global_index = None): """ @@ -513,7 +489,7 @@ def validCellGeometry(self, ijk = None , global_index = None , active_index = No gi = self.__global_index( global_index = global_index , ijk = ijk , active_index = active_index) return self._valid_cell( gi ) - + def active( self , ijk = None , global_index = None): """ @@ -559,9 +535,9 @@ def get_xyz( self, active_index = None , global_index = None , ijk = None): Find true position of cell center. Will return world position of the center of a cell in the - grid. The return value is a tuple of three elements: + grid. The return value is a tuple of three elements: (utm_x , utm_y , depth). - + The cells of a grid can be specified in three different ways: (i,j,k) : As a tuple of i,j,k values. @@ -570,21 +546,21 @@ def get_xyz( self, active_index = None , global_index = None , ijk = None): global index is related to (i,j,k) as: global_index = i + j*nx + k*nx*ny - + active_index : A number in the range [0,nactive). - + For many of the EclGrid methods a cell can be specified using any of these three methods. Observe that one and only method is allowed: OK: - pos1 = grid.get_xyz( active_index = 100 ) - pos2 = grid.get_xyz( ijk = (10,20,7 )) + pos1 = grid.get_xyz( active_index = 100 ) + pos2 = grid.get_xyz( ijk = (10,20,7 )) Crash and burn: - pos3 = grid.get_xyz( ijk = (10,20,7 ) , global_index = 10) + pos3 = grid.get_xyz( ijk = (10,20,7 ) , global_index = 10) pos4 = grid.get_xyz() - + All the indices in the EclGrid() class are zero offset, this is in contrast to ECLIPSE which has an offset 1 interface. """ @@ -619,7 +595,7 @@ def getNodePos(self , i , j , k): if not 0 <= k <= self.getNZ(): raise IndexError("Invalid K value:%d - valid range: [0,%d]" % (k , self.getNZ())) - + x = ctypes.c_double() y = ctypes.c_double() z = ctypes.c_double() @@ -631,9 +607,9 @@ def getCellCorner(self , corner_nr , active_index = None , global_index = None , """ Will look up xyz of corner nr @corner_nr - - lower layer: upper layer - + + lower layer: upper layer + 2---3 6---7 | | | | 0---1 4---5 @@ -646,16 +622,10 @@ def getCellCorner(self , corner_nr , active_index = None , global_index = None , self._get_cell_corner_xyz1( gi , corner_nr , ctypes.byref(x) , ctypes.byref(y) , ctypes.byref(z)) return (x.value , y.value , z.value) - - def get_corner_xyz(self, corner_nr , active_index = None , global_index = None , ijk = None): - warnings.warn("The get_corner_xyz() method has been renamed: getCellCorner()" , DeprecationWarning) - return self.getCellCorner(corner_nr , active_index , global_index , ijk) - - def getNodeXYZ(self , i,j,k): """ This function returns the position of Vertex (i,j,k). - + The coordinates are in the inclusive interval [0,nx] x [0,ny] x [0,nz]. """ nx = self.getNX() @@ -663,7 +633,7 @@ def getNodeXYZ(self , i,j,k): nz = self.getNZ() corner = 0 - + if i == nx: i -= 1 corner += 1 @@ -677,7 +647,7 @@ def getNodeXYZ(self , i,j,k): corner += 4 if self._ijk_valid( i , j , k): - return self.get_corner_xyz( corner , global_index = i + j*nx + k*nx*ny ) + return self.getCellCorner( corner , global_index = i + j*nx + k*nx*ny ) else: raise IndexError("Invalid coordinates: (%d,%d,%d) " % (i,j,k)) @@ -685,11 +655,11 @@ def getNodeXYZ(self , i,j,k): def getLayerXYZ(self , xy_corner , layer): nx = self.getNX() - + (j , i) = divmod(xy_corner , nx + 1) k = layer return self.getNodeXYZ(i,j,k) - + def distance( self , global_index1 , global_index2): @@ -714,14 +684,26 @@ def depth( self , active_index = None , global_index = None , ijk = None): def top( self , i , j ): """ Top of the reservoir; in the column (@i , @j). + Returns average depth of the four top corners. """ - return self._get_top( i , j ) + return self._get_top( i , j ) + + def top_active( self, i, j ): + """ + Top of the active part of the reservoir; in the column (@i , @j). + Raises ValueError if (i,j) column is inactive. + """ + for k in range(self.getNZ()): + a_idx = self.get_active_index(ijk=(i,j,k)) + if a_idx >= 0: + return self._get_top1A(a_idx) + raise ValueError('No active cell in column (%d,%d)' % (i,j)) def bottom( self , i , j ): """ Bottom of the reservoir; in the column (@i , @j). """ - return self._get_bottom( i , j ) + return self._get_bottom( i , j ) def locate_depth( self , depth , i , j ): """ @@ -753,20 +735,19 @@ def find_cell( self , x , y , z , start_ijk = None): If the location (@x,@y,@z) can not be found in the grid, the method will return None. """ - + start_index = 0 if start_ijk: start_index = self.__global_index( ijk = start_ijk ) - else: - start_index = 0 + global_index = self._get_ijk_xyz( x , y , z , start_index) if global_index >= 0: i = ctypes.c_int() j = ctypes.c_int() k = ctypes.c_int() - self._get_ijk1( global_index , ctypes.byref(i) , ctypes.byref(j) , ctypes.byref(k)) - return (i.value , j.value , k.value) - else: - return None + self._get_ijk1( global_index, + ctypes.byref(i), ctypes.byref(j), ctypes.byref(k) ) + return (i.value, j.value, k.value) + return None def cell_contains( self , x , y , z , active_index = None , global_index = None , ijk = None): """ @@ -782,7 +763,7 @@ def cell_contains( self , x , y , z , active_index = None , global_index = None def findCellXY(self , x, y , k): """Will find the i,j of cell with utm coordinates x,y. - + The @k input is the layer you are interested in, the allowed values for k are [0,nz]. If the coordinates (x,y) are found to be outside the grid a ValueError exception is raised. @@ -797,7 +778,7 @@ def findCellXY(self , x, y , k): raise ValueError("Could not find the point:(%g,%g) in layer:%d" % (x,y,k)) else: raise IndexError("Invalid layer value:%d" % k) - + @staticmethod def d_cmp(a,b): @@ -806,7 +787,7 @@ def d_cmp(a,b): def findCellCornerXY(self , x, y , k): """Will find the corner nr of corner closest to utm coordinates x,y. - + The @k input is the layer you are interested in, the allowed values for k are [0,nz]. If the coordinates (x,y) are found to be outside the grid a ValueError exception is raised. @@ -817,7 +798,7 @@ def findCellCornerXY(self , x, y , k): corner_shift = 4 else: corner_shift = 0 - + nx = self.getNX() x0,y0,z0 = self.getCellCorner( corner_shift , ijk = (i,j,k)) d0 = math.sqrt( (x0 - x)*(x0 - x) + (y0 - y)*(y0 - y)) @@ -838,7 +819,7 @@ def findCellCornerXY(self , x, y , k): l = [(d0 , c0) , (d1,c1) , (d2 , c2) , (d3,c3)] l.sort( EclGrid.d_cmp ) return l[0][1] - + def cell_regular(self, active_index = None , global_index = None , ijk = None): @@ -864,7 +845,7 @@ def cell_volume( self, active_index = None , global_index = None , ijk = None): """ gi = self.__global_index( ijk = ijk , active_index = active_index , global_index = global_index) return self._get_cell_volume( gi) - + def cell_dz( self , active_index = None , global_index = None , ijk = None): """ @@ -896,11 +877,11 @@ def getCellDims(self , active_index = None , global_index = None , ijk = None): dy = self._get_cell_dy( gi ) dz = self._get_cell_thickness( gi ) return (dx,dy,dz) - + def getNumLGR(self): - + """ How many LGRs are attached to this main grid? @@ -909,13 +890,8 @@ def getNumLGR(self): """ return self._num_lgr( ) - - @property - def num_lgr( self ): - warnings.warn("The num_lgr property is deprecated - use getNumLGR() method instead" , DeprecationWarning) - return self.getNumLGR() - + def has_lgr( self , lgr_name ): """ Query if the grid has an LGR with name @lgr_name. @@ -929,7 +905,7 @@ def has_lgr( self , lgr_name ): def get_lgr( self , lgr_name ): """ Get EclGrid instance with LGR content. - + Return an EclGrid instance based on the LGR named @lgr_name. The LGR grid instance is in most questions like an ordinary grid instance; the only difference is that it can not @@ -944,17 +920,17 @@ def get_lgr( self , lgr_name ): return lgr else: raise KeyError("No such LGR:%s" % lgr_name) - + def get_cell_lgr( self, active_index = None , global_index = None , ijk = None): """ Get EclGrid instance located in cell. - + Will query the current grid instance if the cell given by @active_index, @global_index or @ijk has been refined with an LGR. Will return None if the cell in question has not been refined, the return value can be used for further queries. - + See get_xyz() for documentation of the input parameters. """ gi = self.__global_index( ijk = ijk , active_index = active_index , global_index = global_index) @@ -965,7 +941,7 @@ def get_cell_lgr( self, active_index = None , global_index = None , ijk = None): else: raise IndexError("No LGR defined for this cell") - + def grid_value( self , kw , i , j , k): """ Will evalute @kw in location (@i,@j,@k). @@ -999,7 +975,7 @@ def load_column( self , kw , i , j , column): initialized with a suitable default value. """ self._load_column( kw , i , j , column) - + def createKW( self , array , kw_name , pack): """ @@ -1015,29 +991,29 @@ def createKW( self , array , kw_name , pack): if dims[0] == self.getNX() and dims[1] == self.getNY() and dims[2] == self.getNZ(): dtype = array.dtype if dtype == numpy.int32: - type = EclTypeEnum.ECL_INT_TYPE + type = EclDataType.ECL_INT elif dtype == numpy.float32: - type = EclTypeEnum.ECL_FLOAT_TYPE + type = EclDataType.ECL_FLOAT elif dtype == numpy.float64: - type = EclTypeEnum.ECL_DOUBLE_TYPE + type = EclDataType.ECL_DOUBLE else: sys.exit("Do not know how to create ecl_kw from type:%s" % dtype) - + if pack: size = self.getNumActive() else: size = self.getGlobalSize() - + if len(kw_name) > 8: # Silently truncate to length 8 - ECLIPSE has it's challenges. - kw_name = kw_name[0:8] + kw_name = kw_name[0:8] kw = EclKW( kw_name , size , type ) active_index = 0 global_index = 0 - for k in range( self.nz ): - for j in range( self.ny ): - for i in range( self.nx ): + for k in range( self.getNZ() ): + for j in range( self.getNY() ): + for i in range( self.getNX() ): if pack: if self.active( global_index = global_index ): kw[active_index] = array[i,j,k] @@ -1047,15 +1023,15 @@ def createKW( self , array , kw_name , pack): kw[global_index] = int( array[i,j,k] ) else: kw[global_index] = array[i,j,k] - + global_index += 1 return kw raise ValueError("Wrong size / dimension on array") - + def coarse_groups(self): """ - Will return the number of coarse groups in this grid. + Will return the number of coarse groups in this grid. """ return self._num_coarse_groups( ) @@ -1085,12 +1061,12 @@ def create3D( self , ecl_kw , default = 0): method: value = grid.grid_value( ecl_kw , i , j , k ) - + """ if len(ecl_kw) == self.getNumActive() or len(ecl_kw) == self.getGlobalSize(): array = numpy.ones( [ self.getGlobalSize() ] , dtype = ecl_kw.dtype) * default kwa = ecl_kw.array - if len(ecl_kw) == self.size: + if len(ecl_kw) == self.getGlobalSize(): for i in range(kwa.size): array[i] = kwa[i] else: @@ -1099,34 +1075,37 @@ def create3D( self , ecl_kw , default = 0): if self.active( global_index = global_index ): array[global_index] = kwa[data_index] data_index += 1 - + array = array.reshape( [self.getNX() , self.getNY() , self.getNZ()] , order = 'F') return array else: - raise ValueError("Keyword: %s has invalid size(%d), must be either nactive:%d or nx*ny*nz:%d" % (ecl_kw.name , ecl_kw.size , self.nactive ,self.size)) - - def save_grdecl(self , pyfile): + err_msg_fmt = 'Keyword "%s" has invalid size %d; must be either nactive=%d or nx*ny*nz=%d' + err_msg = err_msg_fmt % (ecl_kw, len(ecl_kw), self.getNumActive(), + self.getGlobalSize()) + raise ValueError(err_msg) + + def save_grdecl(self , pyfile, output_unit = EclUnitTypeEnum.ECL_METRIC_UNITS): """ Will write the the grid content as grdecl formatted keywords. Will only write the main grid. """ cfile = CFILE( pyfile ) - self._fprintf_grdecl( cfile ) + self._fprintf_grdecl2( cfile , output_unit) - def save_EGRID( self , filename , output_unit = EclUnitTypeEnum.ERT_ECL_METRIC_UNITS): + def save_EGRID( self , filename , output_unit = EclUnitTypeEnum.ECL_METRIC_UNITS): """ Will save the current grid as a EGRID file. """ - self._fwrite_EGRID2( filename, output_unit , None ) + self._fwrite_EGRID2( filename, output_unit ) - def save_GRID( self , filename ): + def save_GRID( self , filename , output_unit = EclUnitTypeEnum.ECL_METRIC_UNITS): """ Will save the current grid as a EGRID file. """ - self._fwrite_GRID( filename ) + self._fwrite_GRID2( filename, output_unit ) + - def write_grdecl( self , ecl_kw , pyfile , special_header = None , default_value = 0): """ Writes an EclKW instance as an ECLIPSE grdecl formatted file. @@ -1134,8 +1113,8 @@ def write_grdecl( self , ecl_kw , pyfile , special_header = None , default_value The input argument @ecl_kw must be an EclKW instance of size nactive or nx*ny*nz. If the size is nactive the inactive cells will be filled with @default_value; hence the function will - always write nx*ny*nz elements. - + always write nx*ny*nz elements. + The data in the @ecl_kw argument can be of type integer, float, double or bool. In the case of bool the default value must be specified as 1 (True) or 0 (False). @@ -1149,7 +1128,7 @@ def write_grdecl( self , ecl_kw , pyfile , special_header = None , default_value pyfile.close() """ - + if len(ecl_kw) == self.getNumActive() or len(ecl_kw) == self.getGlobalSize(): cfile = CFILE( pyfile ) self._fwrite_grdecl( ecl_kw , special_header , cfile , default_value ) @@ -1165,9 +1144,9 @@ def exportACTNUM(self): def compressedKWCopy(self, kw): if len(kw) == self.getNumActive(): - return kw.copy( ) + return kw.copy( ) elif len(kw) == self.getGlobalSize(): - kw_copy = EclKW( kw.getName() , self.getNumActive() , kw.getEclType()) + kw_copy = EclKW( kw.getName() , self.getNumActive() , kw.data_type) self._compressed_kw_copy( kw_copy , kw) return kw_copy else: @@ -1177,7 +1156,7 @@ def globalKWCopy(self, kw , default_value): if len(kw) == self.getGlobalSize( ): return kw.copy( ) elif len(kw) == self.getNumActive(): - kw_copy = EclKW( kw.getName() , self.getGlobalSize() , kw.getEclType()) + kw_copy = EclKW( kw.getName() , self.getGlobalSize() , kw.data_type) kw_copy.assign( default_value ) self._global_kw_copy( kw_copy , kw) return kw_copy @@ -1186,7 +1165,7 @@ def globalKWCopy(self, kw , default_value): def exportACTNUMKw(self): - actnum = EclKW.create("ACTNUM" , self.getGlobalSize() , EclTypeEnum.ECL_INT_TYPE) + actnum = EclKW("ACTNUM" , self.getGlobalSize() , EclDataType.ECL_INT) self._init_actnum( actnum.getDataPtr() ) return actnum @@ -1206,7 +1185,7 @@ def createVolumeKeyword(self , active_size = True): The oil in place calculation shown above could easily be implemented by iterating over the soil kw, however using the - volume keyword has two advantages: + volume keyword has two advantages: 1. The calculation of cell volumes is quite time consuming, by storing the results in a kw they can be reused. @@ -1217,9 +1196,6 @@ def createVolumeKeyword(self , active_size = True): By default the kw will only have values for the active cells, but by setting the optional variable @active_size to False you will get volume values for all cells in the grid. - """ + """ return self._create_volume_keyword( active_size ) - - - diff --git a/ThirdParty/Ert/python/python/ecl/ecl/ecl_grid_generator.py b/ThirdParty/Ert/python/python/ecl/ecl/ecl_grid_generator.py new file mode 100644 index 0000000000..b40e6ca335 --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/ecl/ecl_grid_generator.py @@ -0,0 +1,351 @@ +# Copyright (C) 2017 Statoil ASA, Norway. +# +# The file 'ecl_grid_generator.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. + +import itertools +import numpy + +from ecl.util import IntVector +from ecl.ecl import EclGrid, EclKW, EclDataType, EclPrototype + +class EclGridGenerator: + + _alloc_rectangular = EclPrototype("ecl_grid_obj ecl_grid_alloc_rectangular( int , int , int , double , double , double , int*)" , bind = False) + + @classmethod + def createRectangular(cls, dims , dV , actnum = None): + """ + Will create a new rectangular grid. @dims = (nx,ny,nz) @dVg = (dx,dy,dz) + + With the default value @actnum == None all cells will be active, + """ + if actnum is None: + ecl_grid = cls._alloc_rectangular( dims[0] , dims[1] , dims[2] , dV[0] , dV[1] , dV[2] , None ) + else: + if not isinstance(actnum , IntVector): + tmp = IntVector(initial_size = len(actnum)) + for (index , value) in enumerate(actnum): + tmp[index] = value + actnum = tmp + + if not len(actnum) == dims[0] * dims[1] * dims[2]: + raise ValueError("ACTNUM size mismatch: len(ACTNUM):%d Expected:%d" % (len(actnum) , dims[0] * dims[1] * dims[2])) + ecl_grid = cls._alloc_rectangular( dims[0] , dims[1] , dims[2] , dV[0] , dV[1] , dV[2] , actnum.getDataPtr() ) + + # If we have not succeeded in creatin the grid we *assume* the + # error is due to a failed malloc. + if ecl_grid is None: + raise MemoryError("Failed to allocated regualar grid") + + return ecl_grid + + @classmethod + def createSingleCellGrid(cls, corners): + """ + Provided with the corners of the grid in a similar manner as the eight + corners are output for a single cell, this method will create a grid + consisting of a single cell with the specified corners as its corners. + """ + + zcorn = [corners[i][2] for i in range(8)] + + flatten = lambda l : [elem for sublist in l for elem in sublist] + coord = [(corners[i], corners[i+4]) for i in range(4)] + coord = flatten(flatten(coord)) + + def constructFloatKW(name, values): + kw = EclKW(name, len(values), EclDataType.ECL_FLOAT) + for i in range(len(values)): + kw[i] = values[i] + return kw + + grid = EclGrid.create((1,1,1), constructFloatKW("ZCORN", zcorn), constructFloatKW("COORD", coord), None) + + if not corners == [grid.getCellCorner(i, 0) for i in range(8)]: + raise AssertionError("Failed to generate single cell grid. " + + "Did not end up the expected corners.") + + return grid + + @classmethod + def createGrid(cls, dims, dV, offset=1, + escape_origo_shift=(1,1,0), + irregular_offset=False, irregular=False, concave=False, + faults=False, scale=1, translation=(0,0,0), rotate=False, + misalign=False): + """ + Will create a new grid where each cell is a parallelogram (skewed by z-value). + The number of cells are given by @dims = (nx, ny, nz) and the dimention + of each cell by @dV = (dx, dy, dz). + + All cells are guaranteed to not be self-intersecting. Hence, no twisted + cells and somewhat meaningfull cells. + + @offset gives how much the layers should fluctuate or "wave" as you + move along the X-axis. + + @irregular_offset decides whether the offset should be constant or + increase by dz/2 every now and then. + + @irregular if true some of the layers will be inclining and others + declining at the start. + + @concave decides whether the cells are to be convex or not. In + particular, if set to False, all cells of the grid will be concave. + + @escape_origo_shift is used to prevent any cell of having corners in (0,0,z) + as there is a heuristic in ecl_grid.c that marks such cells as tainted. + + @faults decides if there are to be faults in the grid. + + @scale A positive number that scales the "lower" endpoint of all + coord's. In particular, @scale != 1 creates trapeziod cells in both the XZ + and YZ-plane. + + @translation the lower part of the grid is translated ("slided") by the specified + additive factor. + + @rotate the lower part of the grid is rotated 90 degrees around its + center. + + @misalign will toggle COORD's slightly in various directions to break + alignment + + Note that cells in the lowermost layer can have multiple corners + at the same point. + + For testing it should give good coverage of the various scenarios this + method can produce, by leting @dims be (10,10,10), @dV=(2,2,2), @offset=1, + and try all 4 different configurations of @concave and + @irregular_offset. + """ + + nx, ny, nz = dims + dx, dy, dz = dV + + # Validate arguments + if min(dims + dV) <= 0: + raise ValueError("Expected positive grid and cell dimentions") + + if offset < 0: + raise ValueError("Expected non-negative offset") + + if irregular and offset + (dz/2. if irregular_offset else 0) > dz: + raise AssertionError("Arguments can result in self-" + + "intersecting cells. Increase dz, deactivate eiter " + + "irregular or irregular_offset, or decrease offset to avoid " + + "any problems") + + verbose = lambda l : [elem for elem in l for i in range(2)][1:-1:] + flatten = lambda l : [elem for sublist in l for elem in sublist] + + # Compute zcorn + z = escape_origo_shift[2] + zcorn = [z]*(4*nx*ny) + for k in range(nz-1): + z = z+dz + local_offset = offset + (dz/2. if irregular_offset and k%2 == 0 else 0) + + layer = [] + for i in range(ny+1): + shift = ((i if concave else 0) + (k/2 if irregular else 0)) % 2 + path = [z if i%2 == shift else z+local_offset for i in range(nx+1)] + layer.append(verbose(path)) + + zcorn = zcorn + (2*flatten(verbose(layer))) + + z = z+dz + zcorn = zcorn + ([z]*(4*nx*ny)) + + if faults: + # Ensure that drop does not align with grid structure + drop = (offset+dz)/2. if abs(offset-dz/2.) > 0.2 else offset + 0.4 + zcorn = cls.__createFaults(nx, ny, nz, zcorn, drop) + + cls.assertZcorn(nx, ny, nz, zcorn) + + # Compute coord + coord = [] + for j, i in itertools.product(range(ny+1), range(nx+1)): + x, y = i*dx+escape_origo_shift[0], j*dy+escape_origo_shift[1] + coord = coord + [x, y, escape_origo_shift[2], x, y, z] + + # Apply transformations + lower_center = ( + nx*dx/2. + escape_origo_shift[0], + ny*dy/2. + escape_origo_shift[1] + ) + + if misalign: + coord = cls.__misalignCoord(coord, dims, dV) + + coord = cls.__scaleCoord(coord, scale, lower_center) + + if rotate: + coord = cls.__rotateCoord(coord, lower_center) + + coord = cls.__translateCoord(coord, translation) + + cls.assertCoord(nx, ny, nz, coord) + + # Construct grid + def constructFloatKW(name, values): + kw = EclKW(name, len(values), EclDataType.ECL_FLOAT) + for i in range(len(values)): + kw[i] = values[i] + return kw + + return EclGrid.create(dims, constructFloatKW("ZCORN", zcorn), constructFloatKW("COORD", coord), None) + + @classmethod + def __createFaults(cls, nx, ny, nz, zcorn, drop): + """ + Will create several faults consisting of all cells such that either its + i or j index is 1 modulo 3. + """ + + plane_size = 4*nx*ny + for x, y, z in itertools.product(range(nx), range(ny), range(nz)): + if x%3 != 1 and y%3 != 1: + continue + + corner = [0]*8 + corner[0] = 2*z*plane_size + 4*y*nx + 2*x + corner[1] = corner[0] + 1 + corner[2] = corner[0] + 2*nx + corner[3] = corner[2] + 1 + + for i in range(4, 8): + corner[i] = corner[i-4] + plane_size + + for c in corner: + zcorn[c] = zcorn[c] + drop + + return zcorn + + @classmethod + def assertZcorn(cls, nx, ny, nz, zcorn): + """ + + Raises an AssertionError if the zcorn is not as expected. In + patricular, it is verified that: + + - zcorn has the approperiate length (8*nx*ny*nz) and + - that no cell is twisted. + + """ + + if len(zcorn) != 8*nx*ny*nz: + raise AssertionError( + "Expected len(zcorn) to be %d, was %d" % + (8*nx*ny*nz, len(zcorn)) + ) + + plane_size = 4*nx*ny + for p in range(8*nx*ny*nz - plane_size): + if zcorn[p] > zcorn[p + plane_size]: + raise AssertionError( + "Twisted cell was created. " + + "Decrease offset or increase dz to avoid this!" + ) + + @classmethod + def __scaleCoord(cls, coord, scale, lower_center): + coord = numpy.array([ + map(float, coord[i:i+6:]) + for i in range(0, len(coord), 6) + ]) + origo = numpy.array(3*[0.] + list(lower_center) + [0]) + scale = numpy.array(3*[1.] + 2*[scale] + [1]) + + coord = scale * (coord-origo) + origo + return coord.flatten().tolist() + + @classmethod + def __misalignCoord(cls, coord, dims, dV): + nx, ny, nz = dims + + coord = numpy.array([ + map(float, coord[i:i+6:]) + for i in range(0, len(coord), 6) + ]) + + adjustment = numpy.array([ + (0, 0, 0, i*dV[0]/2., j*dV[1]/2., 0) for i, j in itertools.product([-1, 0, 1], repeat=2) + ]) + + for i, c in enumerate(coord): + # Leave the outermost coords alone + if i < nx+1 or i >= len(coord)-(nx+1): + continue + if i%(nx+1) in [0, nx]: + continue + + c += adjustment[i%len(adjustment)] + + return coord.flatten().tolist() + + @classmethod + def __rotateCoord(cls, coord, lower_center): + coord = numpy.array([ + map(float, coord[i:i+6:]) + for i in range(0, len(coord), 6) + ]) + + origo = numpy.array(3*[0.] + list(lower_center) + [0]) + coord -= origo + + for c in coord: + c[3], c[4] = -c[4], c[3] + + coord += origo + return coord.flatten().tolist() + + @classmethod + def __translateCoord(cls, coord, translation): + coord = numpy.array([ + map(float, coord[i:i+6:]) + for i in range(0, len(coord), 6) + ]) + translation = numpy.array(3*[0.] + list(translation)) + + coord = coord + translation + return coord.flatten().tolist() + + @classmethod + def assertCoord(cls, nx, ny, nz, coord): + """ + + Raises an AssertionError if the coord is not as expected. In + particular, it is verfied that: + + - coord has the approperiate length (6*(nx+1)*(ny+1)) and + - that all values are positive. + + """ + + if len(coord) != 6*(nx+1)*(ny+1): + raise AssertionError( + "Expected len(coord) to be %d, was %d" % + (6*(nx+1)*(ny+1), len(coord)) + ) + + if min(coord) < 0: + raise AssertionError("Negative COORD values was generated. " + + "This is likely due to a tranformation. " + + "Increasing the escape_origio_shift will most likely " + + "fix the problem") + + diff --git a/ThirdParty/Ert/python/python/ert/ecl/ecl_init_file.py b/ThirdParty/Ert/python/python/ecl/ecl/ecl_init_file.py similarity index 94% rename from ThirdParty/Ert/python/python/ert/ecl/ecl_init_file.py rename to ThirdParty/Ert/python/python/ecl/ecl/ecl_init_file.py index 587f194c3b..0b53571149 100644 --- a/ThirdParty/Ert/python/python/ert/ecl/ecl_init_file.py +++ b/ThirdParty/Ert/python/python/ecl/ecl/ecl_init_file.py @@ -14,7 +14,7 @@ # See the GNU General Public License at # for more details. -from ert.ecl import EclFileEnum , EclFile, Ecl3DKW , Ecl3DFile +from ecl.ecl import EclFileEnum , EclFile, Ecl3DKW , Ecl3DFile class EclInitFile(Ecl3DFile): diff --git a/ThirdParty/Ert/python/python/ert/ecl/ecl_kw.py b/ThirdParty/Ert/python/python/ecl/ecl/ecl_kw.py similarity index 79% rename from ThirdParty/Ert/python/python/ert/ecl/ecl_kw.py rename to ThirdParty/Ert/python/python/ecl/ecl/ecl_kw.py index 5879f305fa..dac994f3cb 100644 --- a/ThirdParty/Ert/python/python/ert/ecl/ecl_kw.py +++ b/ThirdParty/Ert/python/python/ecl/ecl/ecl_kw.py @@ -1,18 +1,18 @@ -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file 'ecl_kw.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. +# Copyright (C) 2011 Statoil ASA, Norway. +# +# The file 'ecl_kw.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. """ Support for working with one keyword from ECLIPSE file. @@ -22,11 +22,11 @@ 'SWAT ' 10000 'REAL' 0.05 0.08 0.08 0.10 0.11 0.11 0.10 0.09 - .... + .... I.e. it starts with of header consisting of a 8 characters name, a length and a datatype, immediately followed by the actual -data. +data. Altough the term "restart format" is used to describe the format, this particular format is not limited to restart files; it is (at least) @@ -37,24 +37,42 @@ The ecl_kw.py implementation wraps the ecl_kw.c implementation from the libecl library. """ + +from __future__ import absolute_import, division, print_function, unicode_literals + import ctypes -import types import warnings import numpy from cwrap import CFILE, BaseCClass -from ert.ecl import EclTypeEnum, EclUtil, EclPrototype - - -class classprop(object): - def __init__(self , f): - self.f = classmethod( f ) - - def __get__(self , *a): - return self.f.__get__(*a)() - - - +from ecl.ecl import EclDataType +from ecl.ecl import EclTypeEnum, EclUtil, EclPrototype + +def dump_type_deprecation_warning(): + warnings.warn("EclTypeEnum is deprecated. " + + "You should instead provide an EclDataType", + DeprecationWarning) + +def constant_size_data_type(ecl_type): + return (ecl_type in [ + EclTypeEnum.ECL_CHAR_TYPE, + EclTypeEnum.ECL_FLOAT_TYPE, + EclTypeEnum.ECL_DOUBLE_TYPE, + EclTypeEnum.ECL_INT_TYPE, + EclTypeEnum.ECL_BOOL_TYPE, + EclTypeEnum.ECL_MESS_TYPE + ]) + +def warn_and_cast_data_type(data_type): + if isinstance(data_type, EclDataType): + return data_type + if isinstance(data_type, EclTypeEnum): + if not constant_size_data_type(data_type): + raise ValueError("Cannot cast EclTypeEnum (%d) to EclDataType due " + "to non-constant size. Please provide an EclDataType instead.") + + dump_type_deprecation_warning() + return EclDataType(data_type) class EclKW(BaseCClass): """ @@ -75,11 +93,11 @@ class EclKW(BaseCClass): int_kw_set = set( ["PVTNUM" , "FIPNUM" , "EQLNUM" , "FLUXNUM" , "MULTNUM" , "ACTNUM" , "SPECGRID" , "REGIONS"] ) TYPE_NAME = "ecl_kw" - _alloc_new = EclPrototype("void* ecl_kw_alloc( char* , int , ecl_type_enum )", bind = False) + _alloc_new = EclPrototype("void* ecl_kw_alloc_python( char* , int , ecl_data_type )", bind = False) _fread_alloc = EclPrototype("ecl_kw_obj ecl_kw_fread_alloc( fortio )" , bind = False) - _load_grdecl = EclPrototype("ecl_kw_obj ecl_kw_fscanf_alloc_grdecl_dynamic__( FILE , char* , bool , int )" , bind = False) + _load_grdecl = EclPrototype("ecl_kw_obj ecl_kw_fscanf_alloc_grdecl_dynamic_python( FILE , char* , bool , ecl_data_type )" , bind = False) _fseek_grdecl = EclPrototype("bool ecl_kw_grdecl_fseek_kw(char* , bool , FILE )" , bind = False) - + _sub_copy = EclPrototype("ecl_kw_obj ecl_kw_alloc_sub_copy( ecl_kw , char*, int , int)") _copyc = EclPrototype("ecl_kw_obj ecl_kw_alloc_copy( ecl_kw )") _slice_copyc = EclPrototype("ecl_kw_obj ecl_kw_alloc_slice_copy( ecl_kw , int , int , int )") @@ -91,6 +109,8 @@ class EclKW(BaseCClass): _get_type = EclPrototype("ecl_type_enum ecl_kw_get_type( ecl_kw )") _iget_char_ptr = EclPrototype("char* ecl_kw_iget_char_ptr( ecl_kw , int )") _iset_char_ptr = EclPrototype("void ecl_kw_iset_char_ptr( ecl_kw , int , char*)") + _iget_string_ptr = EclPrototype("char* ecl_kw_iget_string_ptr( ecl_kw , int )") + _iset_string_ptr = EclPrototype("void ecl_kw_iset_string_ptr( ecl_kw , int, char*)") _iget_bool = EclPrototype("bool ecl_kw_iget_bool( ecl_kw , int)") _iset_bool = EclPrototype("bool ecl_kw_iset_bool( ecl_kw , int, bool)") _iget_int = EclPrototype("int ecl_kw_iget_int( ecl_kw , int )") @@ -103,6 +123,7 @@ class EclKW(BaseCClass): _fwrite = EclPrototype("void ecl_kw_fwrite( ecl_kw , fortio )") _get_header = EclPrototype("char* ecl_kw_get_header ( ecl_kw )") _set_header = EclPrototype("void ecl_kw_set_header_name ( ecl_kw , char*)") + _get_data_type = EclPrototype("ecl_data_type_obj ecl_kw_get_data_type_python(ecl_kw)"); _int_sum = EclPrototype("int ecl_kw_element_sum_int( ecl_kw )") _float_sum = EclPrototype("double ecl_kw_element_sum_float( ecl_kw )") @@ -114,12 +135,11 @@ class EclKW(BaseCClass): _equal = EclPrototype("bool ecl_kw_equal( ecl_kw , ecl_kw )") _equal_numeric = EclPrototype("bool ecl_kw_numeric_equal( ecl_kw , ecl_kw , double , double)") - _assert_binary = EclPrototype("bool ecl_kw_assert_binary_numeric( ecl_kw , ecl_kw )") + _assert_binary = EclPrototype("bool ecl_kw_size_and_numeric_type_equal( ecl_kw , ecl_kw )") _scale_int = EclPrototype("void ecl_kw_scale_int( ecl_kw , int )") _scale_float = EclPrototype("void ecl_kw_scale_float_or_double( ecl_kw , double )") _shift_int = EclPrototype("void ecl_kw_shift_int( ecl_kw , int )") _shift_float = EclPrototype("void ecl_kw_shift_float_or_double( ecl_kw , double )") - _assert_numeric = EclPrototype("bool ecl_kw_assert_numeric( ecl_kw )") _copy_data = EclPrototype("void ecl_kw_memcpy_data( ecl_kw , ecl_kw )") _set_int = EclPrototype("void ecl_kw_scalar_set_int( ecl_kw , int )") _set_float = EclPrototype("void ecl_kw_scalar_set_float_or_double( ecl_kw , double )") @@ -129,8 +149,8 @@ class EclKW(BaseCClass): _max_min_double = EclPrototype("void ecl_kw_max_min_double( ecl_kw , double* , double*)") _fix_uninitialized = EclPrototype("void ecl_kw_fix_uninitialized( ecl_kw ,int , int , int, int*)") _first_different = EclPrototype("int ecl_kw_first_different( ecl_kw , ecl_kw , int , double, double)") + _resize = EclPrototype("void ecl_kw_resize( ecl_kw , int)") - @classmethod def createCReference(cls, c_ptr, parent=None): ecl_kw = super(EclKW, cls).createCReference(c_ptr , parent = parent) @@ -150,8 +170,8 @@ def createPythonObject(cls, c_ptr): ecl_kw.__private_init() return ecl_kw - - + + @classmethod def add_int_kw(cls , kw): """Will add keyword @kw to the standard set of integer keywords.""" @@ -162,57 +182,29 @@ def del_int_kw(cls , kw): """Will remove keyword @kw from the standard set of integer keywords.""" cls.int_kw_set.discard( kw ) - @classprop - def int_kw( cls ): - warnings.warn("The EclKW.int_kw class property has been deprecated - use class method: EclKW.intKeywords( )" , DeprecationWarning ) - return cls.intKeywords( ) - - @classmethod def intKeywords(cls): """Will return the current set of integer keywords.""" return cls.int_kw_set - - - @classmethod - def create( cls , name, size , data_type): - """ - Creates a brand new EclKW instance. - - This method will create a grand spanking new EclKW - instance. The instance will get name @name (silently truncated - to eight characters), @size elements and datatype @data_type. Using - this method you could create a SOIL keyword with: - - soil_kw = EclKW.create( "SOIL" , 10000 , ECL_FLOAT_TYPE ) - - """ - warnings.warn("The EclKW.create( ) method has been deprecated - use EclKW( %s , %s , %s )" % (name , size , data_type) , DeprecationWarning ) - return cls( name , size , data_type ) - - - - - def slice_copy( self , slice_range ): (start , stop , step) = slice_range.indices( len(self) ) if stop > start: return self._slice_copyc( start , stop , step) else: return None - + def copy( self ): """ Will create a deep copy of the current kw instance. """ return self._copyc( ) - - + + @classmethod def read_grdecl( cls , fileH , kw , strict = True , ecl_type = None): """ @@ -220,7 +212,7 @@ def read_grdecl( cls , fileH , kw , strict = True , ecl_type = None): This constructor can be used to load an EclKW instance from a grdecl formatted file; the input files for petrophysical - properties are typically given as grdecl files. + properties are typically given as grdecl files. The @file argument should be a Python filehandle to an open file. The @kw argument should be the keyword header you are @@ -236,7 +228,7 @@ def read_grdecl( cls , fileH , kw , strict = True , ecl_type = None): program to create grdecl files with more than 8 character length headers, this implementation will refuse to even try loading them. In that case you will have to rename the - keywords in your file - sorry. A TypeError exception + keywords in your file - sorry. A TypeError exception will be raised if @kw has more than 8 characters. The implementation in ert can read integer and float type @@ -247,12 +239,12 @@ def read_grdecl( cls , fileH , kw , strict = True , ecl_type = None): of presedence, is as follows: 1. The optional argument @ecl_type can be used to specify - the type: + the type: - special_int_kw = EclKW.read_grdecl( fileH , 'INTKW' , ecl_type = ECL_INT_TYPE ) + special_int_kw = EclKW.read_grdecl( fileH , 'INTKW' , ecl_type = ECL_INT ) - If ecl_type is different from ECL_INT_TYPE or - ECL_FLOAT_TYPE a TypeError exception will be raised. + If ecl_type is different from ECL_INT or + ECL_FLOAT a TypeError exception will be raised. If ecl_type == None (the default), the method will continue to point 2. or 3. to determine the correct type. @@ -262,44 +254,50 @@ def read_grdecl( cls , fileH , kw , strict = True , ecl_type = None): 'int_kw_set' the type will be ECL_INT_TYPE. pvtnum_kw = EclKW.read_grdecl( fileH , 'PVTNUM' ) - + Observe that (currently) no case conversions take place when checking the 'int_kw_set'. The current built in set is accesible through the int_kw property. - 3. Otherwise the default is float, i.e. ECL_FLOAT_TYPE. + 3. Otherwise the default is float, i.e. ECL_FLOAT. + EclKw reads grdecl with EclDataType poro_kw = EclKW.read_grdecl( fileH , 'PORO') - + Observe that since the grdecl files are quite weakly structured it is difficult to verify the integrity of the files, malformed input might therefor pass unnoticed before things blow up at a later stage. - + [1]: It is possible, but not recommended, to pass in None for @kw, in which case the method will load the first keyword it finds in the file. """ - + cfile = CFILE( fileH ) if kw: if len(kw) > 8: raise TypeError("Sorry keyword:%s is too long, must be eight characters or less." % kw) - + if ecl_type is None: if cls.int_kw_set.__contains__( kw ): - ecl_type = EclTypeEnum.ECL_INT_TYPE + ecl_type = EclDataType.ECL_INT else: - ecl_type = EclTypeEnum.ECL_FLOAT_TYPE + ecl_type = EclDataType.ECL_FLOAT + + ecl_type = warn_and_cast_data_type(ecl_type) + + if not isinstance(ecl_type, EclDataType): + raise TypeError("Expected EclDataType, was: %s" % type(ecl_type)) - if not ecl_type in [EclTypeEnum.ECL_FLOAT_TYPE , EclTypeEnum.ECL_INT_TYPE]: - raise TypeError("The type:%d is invalid when loading keyword:%s" % (ecl_type , kw)) + if not ecl_type in [EclDataType.ECL_FLOAT , EclDataType.ECL_INT]: + raise ValueError("The type:%s is invalid when loading keyword:%s" % (ecl_type.type_name, kw)) return cls._load_grdecl( cfile , kw , strict , ecl_type ) - + @classmethod def fseek_grdecl( cls , fileH , kw , rewind = False): """ @@ -309,7 +307,7 @@ def fseek_grdecl( cls , fileH , kw , rewind = False): pointer will be positioned at the start of the kw, if the search fails the function will return false and the file pointer will be repositioned at the position it had prior to - the call. + the call. Only @kw instances which are found at the beginning of a line (with optional leading space characters) are considered, @@ -318,7 +316,7 @@ def fseek_grdecl( cls , fileH , kw , rewind = False): -- PERMX EQUIL PERMX / - + The function will start searching from the current position in the file and forwards, if the optional argument @rewind is @@ -327,15 +325,6 @@ def fseek_grdecl( cls , fileH , kw , rewind = False): """ cfile = CFILE( fileH ) return cls._fseek_grdecl( kw , rewind , cfile) - - - - @classmethod - def grdecl_load( cls , file , kw , ecl_type = EclTypeEnum.ECL_FLOAT_TYPE): - """Use read_grdecl() instead.""" - warnings.warn("The grdecl_load method has been renamed to read_grdecl()" , DeprecationWarning) - return cls.read_grdecl(file , kw , ecl_type ) - @classmethod @@ -349,6 +338,16 @@ def fread( cls , fortio ): def free(self): self._free( ) + def __repr__(self): + si = len(self) + nm = self.getName() + mm = 'type = %s' % str(self.getEclType()) + if self.isNumeric(): + mi, ma = self.getMinMax() + mm = 'min = %.2f, max = %.2f' % (mi,ma) + ad = self._ad_str() + fmt = 'EclKW(size = %d, name = "%s", %s) %s' + return fmt % (si,nm,mm,ad) def __init__(self , name , size , data_type): """Creates a brand new EclKW instance. @@ -363,42 +362,49 @@ def __init__(self , name , size , data_type): """ if len(name) > 8: raise ValueError("Sorry - maximum eight characters in keyword name") + + data_type = warn_and_cast_data_type(data_type) + + if not isinstance(data_type, EclDataType): + raise TypeError("Expected an EclDataType, received: %s" % + type(data_type)) + c_ptr = self._alloc_new( name , size , data_type ) super(EclKW, self).__init__(c_ptr) self.__private_init() - + def __private_init(self): self.data_ptr = None - ecl_type = self._get_type( ) - if ecl_type == EclTypeEnum.ECL_INT_TYPE: + if self.data_type.is_int(): self.data_ptr = self._int_ptr( ) - self.dtype = numpy.int32 + self.dtype = numpy.int32 self.str_fmt = "%8d" - elif ecl_type == EclTypeEnum.ECL_FLOAT_TYPE: + elif self.data_type.is_float(): self.data_ptr = self._float_ptr( ) self.dtype = numpy.float32 self.str_fmt = "%13.4f" - elif ecl_type == EclTypeEnum.ECL_DOUBLE_TYPE: + elif self.data_type.is_double(): self.data_ptr = self._double_ptr( ) - self.dtype = numpy.float64 + self.dtype = numpy.float64 self.str_fmt = "%13.4f" else: # Iteration not supported for CHAR / BOOL self.data_ptr = None self.dtype = None - if ecl_type == EclTypeEnum.ECL_CHAR_TYPE: + if self.data_type.is_char(): self.str_fmt = "%8s" - elif ecl_type == EclTypeEnum.ECL_BOOL_TYPE: + elif self.data_type.is_bool(): self.str_fmt = "%d" - else: + elif self.data_type.is_mess(): self.str_fmt = "%s" #"Message type" - - + elif self.data_type.is_string(): + self.str_fmt = "%" + str(self.data_type.element_size) + "s" + else: + raise ValueError("Unknown EclDataType (%s)!" % self.data_type.type_name) - def sub_copy(self , offset , count , new_header = None): """ Will create a new block copy of the src keyword. @@ -413,25 +419,24 @@ def sub_copy(self , offset , count , new_header = None): new1 = src.sub_copy(0 , 10, new_header = "NEW1") new2 = src.sub_copy(10 , -1 , new_header = "NEW2") - + If the count or index arguments are in some way invalid the method will raise IndexError. """ - if offset < 0 or offset >= self.size: - raise IndexError("Offset:%d invalid - valid range:[0,%d)" % (offset , self.size)) + if offset < 0 or offset >= len(self): + raise IndexError("Offset:%d invalid - valid range:[0,%d)" % (offset , len(self))) - if offset + count > self.size: + if offset + count > len(self): raise IndexError("Invalid value of (offset + count):%d" % (offset + count)) return self._sub_copy( new_header , offset , count ) - + def isNumeric(self): """ Will check if the keyword contains numeric data, i.e int, float or double. """ - return self._assert_numeric( ) - + return self.data_type.is_numeric() def ecl_kw_instance( self ): return True @@ -444,7 +449,7 @@ def __len__( self ): """ return self._get_size( ) - + def __deep_copy__(self , memo): """ Python special routine used to perform deep copy. @@ -461,7 +466,7 @@ def __getitem__(self, index ): length = self.__len__() if index < 0: # We allow one level of negative indexing - index += self.size + index += len(self) if index < 0 or index >= length: raise IndexError @@ -469,11 +474,12 @@ def __getitem__(self, index ): if self.data_ptr: return self.data_ptr[ index ] else: - ecl_type = self.getEclType( ) - if ecl_type == EclTypeEnum.ECL_BOOL_TYPE: + if self.data_type.is_bool(): return self._iget_bool( index) - elif ecl_type == EclTypeEnum.ECL_CHAR_TYPE: + elif self.data_type.is_char(): return self._iget_char_ptr( index ) + elif self.data_type.is_string(): + return self._iget_string_ptr( index ) else: raise TypeError("Internal implementation error ...") elif isinstance( index , slice): @@ -486,11 +492,11 @@ def __setitem__(self, index ,value): """ Function to support index based assignment: kw[index] = value """ - if isinstance( index , types.IntType): + if isinstance( index , int): length = len(self) if index < 0: # Will only wrap backwards once - index = self.size + index + index = len(self) + index if index < 0 or index >= length: raise IndexError @@ -498,11 +504,12 @@ def __setitem__(self, index ,value): if self.data_ptr: self.data_ptr[ index ] = value else: - ecl_type = self.getEclType( ) - if ecl_type == EclTypeEnum.ECL_BOOL_TYPE: + if self.data_type.is_bool(): self._iset_bool( index , value) - elif ecl_type == EclTypeEnum.ECL_CHAR_TYPE: + elif self.data_type.is_char(): return self._iset_char_ptr( index , value) + elif self.data_type.is_string(): + return self._iset_string_ptr( index, value) else: raise SystemError("Internal implementation error ...") elif isinstance( index , slice): @@ -516,7 +523,7 @@ def __setitem__(self, index ,value): ################################################################# - + def __IMUL__(self , factor , mul = True): if self.isNumeric(): @@ -532,8 +539,7 @@ def __IMUL__(self , factor , mul = True): if not mul: factor = 1.0 / factor - ecl_type = self.getEclType( ) - if ecl_type == EclTypeEnum.ECL_INT_TYPE: + if self.data_type.is_int(): if isinstance( factor , int ): self._scale_int( factor ) else: @@ -545,9 +551,9 @@ def __IMUL__(self , factor , mul = True): raise TypeError("Only muliplication with scalar supported") else: raise TypeError("Not numeric type") - + return self - + def __IADD__(self , delta , add = True): if self.isNumeric(): @@ -565,8 +571,7 @@ def __IADD__(self , delta , add = True): else: sign = -1 - ecl_type = self.getEclType( ) - if ecl_type == EclTypeEnum.ECL_INT_TYPE: + if self.data_type.is_int(): if isinstance( delta , int ): self._shift_int( delta * sign) else: @@ -578,7 +583,7 @@ def __IADD__(self , delta , add = True): raise TypeError("Type mismatch") else: raise TypeError("Type / size mismatch") - + return self def __iadd__(self , delta): @@ -595,7 +600,7 @@ def __idiv__(self , delta): ################################################################# - + def __abs__(self): if self.isNumeric(): copy = self.copy() @@ -603,9 +608,9 @@ def __abs__(self): return copy else: raise TypeError("The __abs__() function is only implemented for numeric types") - - + + def __add__(self , delta): copy = self.copy() copy += delta @@ -620,8 +625,8 @@ def __sub__(self , delta): return copy def __rsub__( self , delta): - return self.__sub__( delta ) * -1 - + return self.__sub__( delta ) * -1 + def __mul__(self , factor): copy = self.copy() copy *= factor @@ -629,12 +634,12 @@ def __mul__(self , factor): def __rmul__(self , factor): return self.__mul__( factor ) - + def __div__(self , factor): copy = self.copy() copy /= factor return copy - + # No __rdiv__() def sum(self): @@ -644,21 +649,20 @@ def sum(self): String: Raise ValueError exception. Bool: The number of true values """ - ecl_type = self.getEclType( ) - if ecl_type == EclTypeEnum.ECL_CHAR_TYPE: - raise ValueError("The keyword:%s is of string type - sum is not implemented" % self.get_name()) - elif ecl_type == EclTypeEnum.ECL_INT_TYPE: + if self.data_type.is_int(): return self._int_sum( ) - elif ecl_type == EclTypeEnum.ECL_FLOAT_TYPE: + elif self.data_type.is_float(): return self._float_sum( ) - elif ecl_type == EclTypeEnum.ECL_DOUBLE_TYPE: + elif self.data_type.is_double(): return self._float_sum( ) - elif ecl_type == EclTypeEnum.ECL_BOOL_TYPE: + elif self.data_type.is_bool(): sum = 0 for elm in self: if elm: sum += 1 return sum + else: + raise ValueError('The keyword "%s" is of string type - sum is not implemented' % self.getName()) @@ -670,7 +674,7 @@ def assert_binary( self , other ): return self._assert_binary( other ) ################################################################# - + def assign(self , value , mask = None , force_active = False): """ Assign a value to current kw instance. @@ -688,7 +692,7 @@ def assign(self , value , mask = None , force_active = False): to only parts of the EclKW. In the example below we select all the elements with PORO below 0.10, and then assign EQLNUM value 88 to those cells: - + grid = ecl.EclGrid("ECLIPSE.EGRID") reg = ecl.EclRegion( grid , false ) init = ecl.EclFile("ECLIPSE.INIT") @@ -696,9 +700,9 @@ def assign(self , value , mask = None , force_active = False): poro = init["PORO"][0] eqlnum = init["EQLNUM"][0] reg.select_below( poro , 0.10 ) - + eqlnum.assign( 88 , mask = reg ) - + The EclRegion instance has two equivalent sets of selected indices; one consisting of active indices and one consisting of global indices. By default the assign() method will select @@ -722,8 +726,7 @@ def assign(self , value , mask = None , force_active = False): if mask: mask.set_kw( self , value , force_active ) else: - ecl_type = self.getEclType( ) - if ecl_type == EclTypeEnum.ECL_INT_TYPE: + if self.data_type.is_int(): if isinstance( value , int ): self._set_int( value ) else: @@ -744,7 +747,7 @@ def add( self , other , mask = None , force_active = False): mask.iadd_kw( self , other , force_active ) else: return self.__iadd__( other ) - + def sub(self , other , mask = None , force_active = False): """ See method assign() for documentation of optional arguments @@ -794,7 +797,7 @@ def cutoff( x , limit): kw.apply( math.sin ) kw.apply( cutoff , arg = 0.10 ) - + See method assign() for documentation of optional arguments @mask and @force_active. """ @@ -808,10 +811,10 @@ def cutoff( x , limit): self.data_ptr[index] = func( self.data_ptr[index] ) else: if arg: - for i in range(self.size): + for i in range(len(self)): self.data_ptr[i] = func( self.data_ptr[i] , arg) else: - for i in range(self.size): + for i in range(len(self)): self.data_ptr[i] = func( self.data_ptr[i] ) @@ -869,62 +872,29 @@ def fortIOSize(self): The number of bytes this keyword would occupy in a BINARY file. """ return self._get_fortio_size( ) - - - @property - def fortio_size(self): - warnings.warn("The fortio_size property is deprecated - use method fortIOSize()" , DeprecationWarning) - return self.fortIOSize() - - - @property - def size(self): - warnings.warn("The size property is deprecated - use built in len(..) " , DeprecationWarning) - return len(self) def setName( self , name ): if len(name) > 8: raise ValueError("Sorry: the name property must be max 8 characters long :-(") self._set_header( name ) - - def set_name( self , name ): - warnings.warn("The set_name method is deprectaed - use setName( )" , DeprecationWarning) - self.setName( name ); - - - def get_name( self ): - warnings.warn("The set_name method is deprectaed - use getName( )" , DeprecationWarning) - return self.getName() - - - name = property( get_name , set_name ) - def getName(self): - return self._get_header( ) + n = self._get_header( ) + return str(n) if n else '' + def resize(self , new_size): + """ + Will set the new size of the kw to @new_size. + """ + if new_size >= 0: + self._resize( new_size ) - @property - def min_max( self ): - warnings.warn("The min_max property has been renamed to method getMinMax()" , DeprecationWarning) - return self.getMinMax() + # Iteration is based on a pointer to the underlying storage, + # that will generally by reset by the resize( ) call; i.e. we + # need to call the __private_init() method again. + self.__private_init() - @property - def max( self ): - warnings.warn("The max property has been renamed to method getMax()" , DeprecationWarning) - mm = self.getMinMax() - return mm[1] - - - @property - def min( self ): - warnings.warn("The min property has been renamed to method getMin()" , DeprecationWarning) - mm = self.getMinMax() - return mm[0] - - - def getMinMax(self): """ Will return a touple (min,max) for numerical types. @@ -932,68 +902,61 @@ def getMinMax(self): Will raise TypeError exception if the keyword is not of numerical type. """ - ecl_type = self.getEclType( ) - if ecl_type == EclTypeEnum.ECL_FLOAT_TYPE: - min = ctypes.c_float() - max = ctypes.c_float() - self._max_min_float( ctypes.byref( max ) , ctypes.byref( min )) - elif ecl_type == EclTypeEnum.ECL_DOUBLE_TYPE: - min = ctypes.c_double() - max = ctypes.c_double() - self._max_min_double( ctypes.byref( max ) , ctypes.byref( min )) - elif ecl_type == EclTypeEnum.ECL_INT_TYPE: - min = ctypes.c_int() - max = ctypes.c_int() - self._max_min_int( ctypes.byref( max ) , ctypes.byref( min )) + if self.data_type.is_float(): + min_ = ctypes.c_float() + max_ = ctypes.c_float() + self._max_min_float( ctypes.byref( max_ ) , ctypes.byref( min_ )) + elif self.data_type.is_double(): + min_ = ctypes.c_double() + max_ = ctypes.c_double() + self._max_min_double( ctypes.byref( max_ ) , ctypes.byref( min_ )) + elif self.data_type.is_int(): + min_ = ctypes.c_int() + max_ = ctypes.c_int() + self._max_min_int( ctypes.byref( max_ ) , ctypes.byref( min_ )) else: raise TypeError("min_max property not defined for keywords of type: %s" % self.type) - return (min.value , max.value) + return (min_.value , max_.value) def getMax( self ): mm = self.getMinMax() return mm[1] - - + + def getMin( self ): mm = self.getMinMax() return mm[0] - - @property - def numeric(self): - warnings.warn("The numeric property has been renamed to method isNumeric()" , DeprecationWarning) - return self.isNumeric( ) - - @property def type( self ): return self.getEclType() + @property + def data_type( self ): + return self._get_data_type() + @property def type_name( self ): - return self.typeName( ) + return self.data_type.type_name - def typeName(self): - return EclUtil.type_name( self.getEclType( )) + def typeName( self ): + return self.data_type.type_name def getEclType(self): + warnings.warn("EclTypeEnum is deprecated. " + + "You should instead provide an EclDataType", + DeprecationWarning) + return self._get_type( ) - - - @property - def header( self ): - return (self.name , self.size , self.type_name ) - def iget( self , index ): - from warnings import warn - warn("The iget() method is deprecated use array notation: kw[index] instead.", DeprecationWarning) - return self.__getitem__( index ) - - + @property + def header(self): + return (self.getName(), len(self), self.typeName()) + @property def array(self): a = self.data_ptr @@ -1002,7 +965,7 @@ def array(self): a.__parent__ = self # Inhibit GC return a - + def str_data( self , width , index1 , index2 , fmt): """ Helper function for str() method. @@ -1017,7 +980,7 @@ def str_data( self , width , index1 , index2 , fmt): s+= "\n" return s - + def str(self , width = 5 , max_lines = 10 , fmt = None): """ Return string representation of kw for pretty printing. @@ -1036,19 +999,19 @@ def str(self , width = 5 , max_lines = 10 , fmt = None): the elements. The implementation of the builtin method __str__() is based on this method. """ - s = "%-8s %8d %-4s\n" % (self.name , self.size , self.type_name) - lines = self.size / width + s = "%-8s %8d %-4s\n" % (self.getName() , len(self) , self.typeName()) + lines = len(self) // width if not fmt: fmt = self.str_fmt + " " if max_lines is None or lines <= max_lines: - s += self.str_data( width , 0 , self.size , fmt) + s += self.str_data( width , 0 , len(self) , fmt) else: - s1 = width * max_lines / 2 + s1 = width * max_lines // 2 s += self.str_data( width , 0 , s1 , fmt) s += " .... \n" - s += self.str_data( width , self.size - s1 , self.size , fmt) - + s += self.str_data( width , len(self) - s1 , len(self) , fmt) + return s def __str__(self): @@ -1074,7 +1037,7 @@ def numpyView(self): ct = ctypes.c_int else: raise ValueError("Invalid type - numpy array only valid for int/float/double") - + ap = ctypes.cast(self.data_ptr, ctypes.POINTER(ct * len(self))) return numpy.frombuffer(ap.contents, dtype = self.dtype) @@ -1090,21 +1053,7 @@ def numpyCopy(self): """ view = self.numpyView( ) return numpy.copy( view ) - - - @property - def numpy_array( self ): - warnings.warn("The EclKW.numpy_array property has been deprecated - use method: numpyView( ) or numpyCopy( ) instead" , DeprecationWarning ) - if self.data_ptr: - a = self.array - value = numpy.zeros( a.size , dtype = self.dtype) - for i in range( a.size ): - value[i] = a[i] - - - - def fwrite( self , fortio ): self._fwrite( fortio ) @@ -1117,20 +1066,20 @@ def write_grdecl( self , file ): opened file. In the example below we load the porosity from an existing GRDECL file, set all poro values below 0.05 to 0.00 and write back an updated GRDECL file. - - poro = ecl.EclKW.load_grdecl( open("poro1.grdecl" , "r") , "PORO" ) + + poro = ecl.EclKW.read_grdecl( open("poro1.grdecl" , "r") , "PORO" ) grid = ecl.EclGrid( "ECLIPSE.EGRID" ) reg = ecl.EclRegion( grid , False ) - + reg.select_below( poro , 0.05 ) poro.assign( 0.0 , mask = reg ) fileH = open( "poro2.grdecl" , "w") poro.write_grdecl( fileH ) fileH.close() - + """ - cfile = CFILE( file ) + cfile = CFILE( file ) self._fprintf_grdecl( cfile ) @@ -1167,25 +1116,24 @@ def fixUninitialized(self , grid): def getDataPtr(self): - ecl_type = self.getEclType( ) - if ecl_type == EclTypeEnum.ECL_INT_TYPE: + if self.data_type.is_int(): return self._int_ptr( ) - elif ecl_type == EclTypeEnum.ECL_FLOAT_TYPE: + elif self.data_type.is_float(): return self._float_ptr( ) - elif ecl_type == EclTypeEnum.ECL_DOUBLE_TYPE: + elif self.data_type.is_double(): return self._double_ptr( ) else: raise ValueError("Only numeric types can export data pointer") - - def firstDifferent(kw1 , kw2 , offset = 0 , epsilon = 0 , abs_epsilon = None , rel_epsilon = None): - if len(kw1) != len(kw2): + + def firstDifferent(self , other , offset = 0 , epsilon = 0 , abs_epsilon = None , rel_epsilon = None): + if len(self) != len(other): raise ValueError("Keywords must have equal size") - if offset >= len(kw1): - raise IndexError("Offset:%d invalid - size:%d" % (offset , len(kw1))) + if offset >= len(self): + raise IndexError("Offset:%d invalid - size:%d" % (offset , len(self))) - if kw1.getEclType() != kw2.getEclType(): + if self.getEclType() != other.getEclType(): raise TypeError("The two keywords have different type") if abs_epsilon is None: @@ -1194,4 +1142,4 @@ def firstDifferent(kw1 , kw2 , offset = 0 , epsilon = 0 , abs_epsilon = None , r if rel_epsilon is None: rel_epsilon = epsilon - return kw1._first_different( kw2 , offset , abs_epsilon , rel_epsilon ) + return self._first_different( other , offset , abs_epsilon , rel_epsilon ) diff --git a/ThirdParty/Ert/python/python/ert/ecl/ecl_npv.py b/ThirdParty/Ert/python/python/ecl/ecl/ecl_npv.py similarity index 99% rename from ThirdParty/Ert/python/python/ert/ecl/ecl_npv.py rename to ThirdParty/Ert/python/python/ecl/ecl/ecl_npv.py index 95232fe158..ebdbdf7df2 100644 --- a/ThirdParty/Ert/python/python/ert/ecl/ecl_npv.py +++ b/ThirdParty/Ert/python/python/ecl/ecl/ecl_npv.py @@ -17,7 +17,7 @@ import re import datetime import numbers -from ert.ecl import EclSum +from ecl.ecl import EclSum class NPVParseKey(object): @@ -29,7 +29,7 @@ def __init__(self , eclNPV): def __call__(self , matchObject): key = matchObject.group(1) smspecNode = self.baseCase.smspec_node( key ) - if smspecNode.is_total: + if smspecNode.isTotal(): var = key.replace(":" , "_") self.NPV.addKey( key , var ) return var + "[i]" diff --git a/ThirdParty/Ert/python/python/ert/ecl/ecl_region.py b/ThirdParty/Ert/python/python/ecl/ecl/ecl_region.py similarity index 91% rename from ThirdParty/Ert/python/python/ert/ecl/ecl_region.py rename to ThirdParty/Ert/python/python/ecl/ecl/ecl_region.py index 1dbb1a1d37..d34c3f3b72 100644 --- a/ThirdParty/Ert/python/python/ert/ecl/ecl_region.py +++ b/ThirdParty/Ert/python/python/ecl/ecl/ecl_region.py @@ -1,18 +1,18 @@ -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file 'ecl_region.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. +# Copyright (C) 2011 Statoil ASA, Norway. +# +# The file 'ecl_region.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. """ Module used to select cells based on many different criteria. @@ -26,12 +26,12 @@ queried for the corresponding list of indices. """ import ctypes -import warnings + from cwrap import BaseCClass -from ert.ecl.faults import Layer -from ert.ecl import EclKW, EclTypeEnum, EclPrototype -from ert.geo import CPolyline -from ert.util import IntVector +from ecl.ecl.faults import Layer +from ecl.ecl import EclKW, EclDataType, EclPrototype +from ecl.geo import CPolyline +from ecl.util import IntVector def select_method(select): @@ -87,7 +87,7 @@ class EclRegion(BaseCClass): _scale_kw_float = EclPrototype("void ecl_region_scale_kw_float( ecl_region , ecl_kw , float, bool ) ") _scale_kw_double = EclPrototype("void ecl_region_scale_kw_double( ecl_region , ecl_kw , double , bool) ") - _free = EclPrototype("void ecl_region_free( ecl_region )") + _free = EclPrototype("void ecl_region_free( ecl_region )") _reset = EclPrototype("void ecl_region_reset( ecl_region )") _select_all = EclPrototype("void ecl_region_select_all( ecl_region )") _deselect_all = EclPrototype("void ecl_region_deselect_all( ecl_region )") @@ -101,8 +101,8 @@ class EclRegion(BaseCClass): _deselect_in_interval = EclPrototype("void ecl_region_deselect_in_interval( ecl_region, ecl_kw, float , float )") _invert_selection = EclPrototype("void ecl_region_invert_selection( ecl_region )") - _select_box = EclPrototype("void ecl_region_select_from_ijkbox(ecl_region , int , int , int , int , int , int)") - _deselect_box = EclPrototype("void ecl_region_deselect_from_ijkbox(ecl_region , int , int , int , int , int , int)") + _select_box = EclPrototype("void ecl_region_select_from_ijkbox(ecl_region , int , int , int , int , int , int)") + _deselect_box = EclPrototype("void ecl_region_deselect_from_ijkbox(ecl_region , int , int , int , int , int , int)") _imul_kw = EclPrototype("void ecl_region_kw_imul( ecl_region , ecl_kw , ecl_kw , bool)") _idiv_kw = EclPrototype("void ecl_region_kw_idiv( ecl_region , ecl_kw , ecl_kw , bool)") _iadd_kw = EclPrototype("void ecl_region_kw_iadd( ecl_region , ecl_kw , ecl_kw , bool)") @@ -163,7 +163,7 @@ class EclRegion(BaseCClass): _select_from_layer = EclPrototype("void ecl_region_select_from_layer( ecl_region , layer , int , int)") _deselect_from_layer = EclPrototype("void ecl_region_deselect_from_layer( ecl_region , layer , int , int)") - + def __init__(self , grid , preselect): """ Create a new region selector for cells in @grid. @@ -216,14 +216,14 @@ def __iand__(self , other): inplace & operator, i.e. reg1 &= reg2 - + will eventually call this method. """ if isinstance(other , EclRegion): self._intersect( other) else: raise TypeError("Ecl region can only intersect with other EclRegion instances") - + return self @@ -239,7 +239,7 @@ def __isub__(self , other): raise TypeError("Ecl region can only subtract with other EclRegion instances") return self - + def __ior__(self , other): """ @@ -257,7 +257,7 @@ def __ior__(self , other): self._combine( other) else: raise TypeError("Ecl region can only be combined with other EclRegion instances") - + return self def __iadd__(self , other): @@ -276,7 +276,7 @@ def __or__(self , other): operator: new_reg = reg1 | reg2 - + """ new_region = self.copy() new_region.__ior__( other ) @@ -316,19 +316,19 @@ def __sub__( self, other): def union_with( self, other): """ Will update self with the union of @self and @other. - - See doscumentation of __ior__(). + + See doscumentation of __ior__(). """ return self.__ior__( other ) def intersect_with( self, other): """ Will update self with the intersection of @self and @other. - - See doscumentation of __iand__(). + + See doscumentation of __iand__(). """ return self.__iand__( other ) - + def copy( self ): return self.__deep_copy__( {} ) @@ -346,7 +346,7 @@ def reset(self): ################################################################## - + @select_method def select_more( self , ecl_kw , limit , intersect = False): """ @@ -365,13 +365,13 @@ def select_more( self , ecl_kw , limit , intersect = False): swat_kw = restart_file["SWAT"][0] grid = ecl.EclGrid( "ECLIPSE.EGRID" ) region = ecl.EclRegion( grid , False ) - + region.select_more( swat_kw , 0.85 ) """ self._select_more( ecl_kw , limit ) - + def deselect_more( self , ecl_kw , limit): """ @@ -385,7 +385,7 @@ def deselect_more( self , ecl_kw , limit): def select_less( self , ecl_kw , limit , intersect = False): """ Select all cells where keyword @ecl_kw is below @limit. - + See select_more() for further documentation. """ self._select_less( ecl_kw , limit ) @@ -393,7 +393,7 @@ def select_less( self , ecl_kw , limit , intersect = False): def deselect_less( self , ecl_kw , limit): """ Deselect all cells where keyword @ecl_kw is below @limit. - + See select_more() for further documentation. """ self._deselect_less( ecl_kw , limit ) @@ -412,11 +412,13 @@ def select_equal( self , ecl_kw , value , intersect = False): pvtnum_kw = init_file.iget_named_kw( "PVTNUM" , 0 ) grid = ecl.EclGrid( "ECLIPSE.GRID" ) region = ecl.EclRegion( grid , False ) - + region.select_equal( pvtnum_kw , 2 ) region.select_equal( pvtnum_kw , 4 ) """ + if not ecl_kw.data_type.is_int(): + raise ValueError("The select_equal method must have an integer valued keyword - got:%s" % ecl_kw.typeName( )) self._select_equal( ecl_kw , value ) @@ -426,6 +428,8 @@ def deselect_equal( self , ecl_kw , value ): See select_equal() for further documentation. """ + if not ecl_kw.data_type.is_int(): + raise ValueError("The select_equal method must have an integer valued keyword - got:%s" % ecl_kw.typeName( )) self._deselect_equal( ecl_kw , value ) @select_method @@ -436,8 +440,8 @@ def select_in_range( self , ecl_kw , lower_limit , upper_limit , select = False) Will select all the cells where EclKW instance @ecl_kw has value in the half-open interval [@lower_limit , @upper_limit). The input argument @ecl_kw must have size - nactive or nx*ny*nz, and it must be of type ECL_FLOAT_TYPE. - + nactive or nx*ny*nz, and it must be of type ECL_FLOAT_TYPE. + The following example will select all cells with porosity in the range [0.15,0.20): @@ -445,9 +449,9 @@ def select_in_range( self , ecl_kw , lower_limit , upper_limit , select = False) poro_kw = init_file.iget_named_kw( "PORO" , 0 ) grid = ecl.EclGrid( "ECLIPSE.GRID" ) region = ecl.EclRegion( grid , False ) - + region.select_in_range( poro_kw , 0.15, 0.20 ) - + """ self._select_in_interval( ecl_kw , lower_limit , upper_limit) @@ -494,7 +498,7 @@ def deselect_cmp_less( self , kw1 , kw2): def select_cmp_more( self , kw1 , kw2 , intersect = False): """ Will select all cells where kw2 > kw1. - + See select_cmp_less() for further documentation. """ self._select_cmp_more( kw1 , kw2 ) @@ -502,7 +506,7 @@ def select_cmp_more( self , kw1 , kw2 , intersect = False): def deselect_cmp_more( self , kw1 , kw2): """ Will deselect all cells where kw2 > kw1. - + See select_cmp_less() for further documentation. """ self._deselect_cmp_more( kw1 , kw2 ) @@ -553,7 +557,7 @@ def clear( self ): """ self.deselect_all() - @select_method + @select_method def select_deep( self , depth , intersect = False): """ Will select all cells below @depth. @@ -566,7 +570,7 @@ def deselect_deep( self, depth): """ self._deselect_deep_cells(depth) - @select_method + @select_method def select_shallow( self, depth , intersect = False): """ Will select all cells above @depth. @@ -650,7 +654,7 @@ def select_box( self , ijk1 , ijk2 , intersect = False): def deselect_box( self , ijk1 , ijk2 ): """ Will deselect all elements in box. - + See select_box() for further documentation. """ self._deselect_box( ijk1[0] , ijk2[0] , ijk1[1] , ijk2[1] , ijk1[2] , ijk2[2]) @@ -684,7 +688,7 @@ def deselect_jslice( self , j1 , j2): @select_method def select_kslice( self , k1 , k2 , intersect = False): """ - Will select all cells with k in [@k1, @k2]. @i1 and @i2 are zero offset. + Will select all cells with k in [@k1, @k2]. @i1 and @i2 are zero offset. """ self._select_kslice( k1,k2) @@ -745,7 +749,7 @@ def deselect_above_plane( self , n , p): def deselect_below_plane( self , n , p): """ Will deselect all the cells 'below' the plane defined by n & p. - + See method 'select_above_plane' for further documentation. """ (n_vec , p_vec) = self.__init_plane_select( n , p ) @@ -763,7 +767,7 @@ def select_inside_polygon( self , points , intersect = False): (100,100) the @points list should be: points = [(0,0) , (0,100) , (100,100) , (100,0)] - + The elements in the points list should be (utm_x, utm_y) values. These values will be compared with the centerpoints of the cells in the grid. The selection is based the top k=0 @@ -798,7 +802,7 @@ def deselect_outside_polygon( self , points ): """ self._deselect_outside_polygon( CPolyline( init_points = points )) - + @select_method def selectTrue( self , ecl_kw , intersect = False): """ @@ -814,14 +818,14 @@ def selectFalse( self , ecl_kw , intersect = False): """ self._select_false( ecl_kw ) - + @select_method def selectFromLayer(self , layer , k , value, intersect = False): """Will select all the cells in in @layer with value @value - at vertical coordinate @k. The input @layer should be of type Layer - from the - ert.ecl.faults.layer module. The k value must in the range + ecl.ecl.faults.layer module. The k value must in the range [0,grid.nz) and the dimensions of the layer must correspond exactly to nx,ny of the grid. """ @@ -834,10 +838,10 @@ def selectFromLayer(self , layer , k , value, intersect = False): if grid.getNY() != layer.getNY(): raise ValueError("NY dimension mismatch. Grid:%d layer:%d" % (grid.getNY() , layer.getNY())) - + self._select_from_layer( layer , k , value ) - + ################################################################# @@ -846,13 +850,13 @@ def scalar_apply_kw( self , target_kw , scalar , func_dict , force_active = Fals """ Helper function to apply a function with one scalar arg on target_kw. """ - type = target_kw.getEclType( ) - if func_dict.has_key( type ): - func = func_dict[ type ] + data_type = target_kw.data_type + if func_dict.has_key( data_type ): + func = func_dict[ data_type ] func( target_kw, scalar , force_active ) else: raise Exception("scalar_apply_kw() only supported for INT/FLOAT/DOUBLE") - + def iadd_kw( self , target_kw , delta_kw , force_active = False): """ The functions iadd_kw(), copy_kw(), set_kw(), scale_kw() and @@ -877,9 +881,9 @@ def shift_kw( self , ecl_kw , shift , force_active = False): """ See usage documentation on iadd_kw(). """ - self.scalar_apply_kw( ecl_kw , shift , {EclTypeEnum.ECL_INT_TYPE : self._shift_kw_int, - EclTypeEnum.ECL_FLOAT_TYPE : self._shift_kw_float , - EclTypeEnum.ECL_DOUBLE_TYPE : self._shift_kw_double} , force_active) + self.scalar_apply_kw( ecl_kw , shift , {EclDataType.ECL_INT : self._shift_kw_int, + EclDataType.ECL_FLOAT : self._shift_kw_float , + EclDataType.ECL_DOUBLE : self._shift_kw_double} , force_active) def isub_kw( self , target_kw , delta_kw , force_active = False): if isinstance(delta_kw , EclKW): @@ -889,15 +893,15 @@ def isub_kw( self , target_kw , delta_kw , force_active = False): raise TypeError("Type mismatch") else: self.shift_kw( target_kw , -delta_kw , force_active = force_active) - + def scale_kw( self , ecl_kw , scale , force_active = False): """ See usage documentation on iadd_kw(). """ - self.scalar_apply_kw( ecl_kw , scale , {EclTypeEnum.ECL_INT_TYPE : self._scale_kw_int, - EclTypeEnum.ECL_FLOAT_TYPE : self._scale_kw_float , - EclTypeEnum.ECL_DOUBLE_TYPE : self._scale_kw_double} , force_active) + self.scalar_apply_kw( ecl_kw , scale , {EclDataType.ECL_INT : self._scale_kw_int, + EclDataType.ECL_FLOAT : self._scale_kw_float , + EclDataType.ECL_DOUBLE : self._scale_kw_double} , force_active) def imul_kw(self, target_kw , other , force_active = False): if isinstance(other , EclKW): @@ -927,21 +931,21 @@ def copy_kw( self , target_kw , src_kw , force_active = False): self._copy_kw( target_kw , src_kw , force_active ) else: raise TypeError("Type mismatch") - + def set_kw( self , ecl_kw , value , force_active = False): """ See usage documentation on iadd_kw(). """ - self.scalar_apply_kw( ecl_kw , value , {EclTypeEnum.ECL_INT_TYPE : self._set_kw_int, - EclTypeEnum.ECL_FLOAT_TYPE : self._set_kw_float , - EclTypeEnum.ECL_DOUBLE_TYPE : self._set_kw_double} , force_active) + self.scalar_apply_kw( ecl_kw , value , {EclDataType.ECL_INT : self._set_kw_int, + EclDataType.ECL_FLOAT : self._set_kw_float , + EclDataType.ECL_DOUBLE : self._set_kw_double} , force_active) + - ################################################################# - def ecl_region_instance( ): + def ecl_region_instance(self): """ Helper function (attribute) to support run-time typechecking. """ @@ -965,7 +969,7 @@ def getGlobalList(self): global_list.setParent(self) return global_list - + def getIJKList(self): """ WIll return a Python list of (ij,k) tuples for the region. @@ -974,39 +978,8 @@ def getIJKList(self): ijk_list = [] for g in global_list: ijk_list.append( self.grid.get_ijk( global_index = g ) ) - - return ijk_list - - - - - @property - def active_list(self): - warnings.warn("The active_list property is deprecated - use method \'getActiveList()\' instead." , DeprecationWarning) - return self.getActiveList() - - @property - def global_list(self): - warnings.warn("The global_list property is deprecated - use method \'getGlobalList()\' instead." , DeprecationWarning) - return self.getGlobalList() - - - @property - def active_size( self ): - """ - Number of active cells in region. - """ - warnings.warn("The active_size property is deprecated - use \'len(getActiveList())\' instead." , DeprecationWarning) - return len(self.getActiveList()) - - @property - def global_size( self ): - """ - Number of global cells in region. - """ - warnings.warn("The global_size property is deprecated - use \'len(getGlobalList())\' instead." , DeprecationWarning) - return len(self.getGlobalList()) + return ijk_list def contains_ijk( self , i,j,k): """ @@ -1028,7 +1001,7 @@ def contains_active( self , active_index): """ return self._contains_active( active_index ) - + def kw_index_list(self , ecl_kw , force_active): c_ptr = self._get_kw_index_list( ecl_kw , force_active) index_list = IntVector.createCReference( c_ptr, self ) @@ -1040,18 +1013,3 @@ def getName(self): def setName(self , name): self._set_name( name ) - - - def set_name( self , name ): - warnings.warn("The name property / set_name method is deprecated - use method \'setName()\' instead." , DeprecationWarning) - self.setName( name ) - - - def get_name( self ): - warnings.warn("The name property / get_name method is deprecated - use method \'getName()\' instead." , DeprecationWarning) - return self.getName( ) - - - name = property( get_name , set_name ) - - diff --git a/ThirdParty/Ert/python/python/ecl/ecl/ecl_restart_file.py b/ThirdParty/Ert/python/python/ecl/ecl/ecl_restart_file.py new file mode 100644 index 0000000000..a67393a68c --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/ecl/ecl_restart_file.py @@ -0,0 +1,148 @@ +# Copyright (C) 2015 Statoil ASA, Norway. +# +# The file 'ecl_restart_file.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. + +from ecl.util import CTime +from ecl.ecl import EclPrototype , EclFile, Ecl3DKW , Ecl3DFile, EclFileEnum +from cwrap import BaseCClass + +class EclRestartHead(BaseCClass): + TYPE_NAME = "ecl_rsthead" + _alloc = EclPrototype("void* ecl_rsthead_alloc(ecl_file_view , int )", bind = False) + _alloc_from_kw = EclPrototype("void* ecl_rsthead_alloc_from_kw(int , ecl_kw , ecl_kw , ecl_kw )", bind = False) + _free = EclPrototype("void ecl_rsthead_free(ecl_rsthead)") + _get_report_step = EclPrototype("int ecl_rsthead_get_report_step(ecl_rsthead)") + _get_sim_time = EclPrototype("time_t ecl_rsthead_get_sim_time(ecl_rsthead)") + _get_sim_days = EclPrototype("double ecl_rsthead_get_sim_days(ecl_rsthead)") + _get_nxconz = EclPrototype("int ecl_rsthead_get_nxconz(ecl_rsthead)") + _get_ncwmax = EclPrototype("int ecl_rsthead_get_ncwmax(ecl_rsthead)") + + def __init__(self , kw_arg = None , rst_view = None): + if kw_arg is None and rst_view is None: + raise ValueError('Cannot construct EclRestartHead without one of kw_arg and rst_view, both were None!') + + if not kw_arg is None: + report_step , intehead_kw , doubhead_kw , logihead_kw = kw_arg + c_ptr = self._alloc_from_kw( report_step , intehead_kw , doubhead_kw , logihead_kw ) + else: + c_ptr = self._alloc( rst_view , -1 ) + + super(EclRestartHead, self).__init__(c_ptr) + + + def free(self): + self._free( ) + + def getReportStep(self): + return self._get_report_step( ) + + def getSimDate(self): + ct = CTime( self._get_sim_time( ) ) + return ct.datetime( ) + + def getSimDays(self): + return self._get_sim_days( ) + + def well_details(self): + return {"NXCONZ" : self._get_nxconz(), + "NCWMAX" : self._get_ncwmax()} + + + + +class EclRestartFile(Ecl3DFile): + + def __init__(self , grid , filename , flags = 0): + """Will open an Eclipse restart file. + + The EclRestartFile class will open an eclipse restart file, in + unified or non unified format. The constructor will infer the + file type based on the filename, and will raise a ValueError + exception if the file type is not ECL_RESTART_FILE or + ECL_UNIFIED_RESTART_FILE. + + The EclRestartFile will use a grid reference to create Ecl3DKw + instances for all the keyword elements which have either + 'nactive' or 'nx*ny*nz' elements. + """ + + file_type , report_step , fmt_file = EclFile.getFileType( filename ) + if not file_type in [EclFileEnum.ECL_RESTART_FILE, EclFileEnum.ECL_UNIFIED_RESTART_FILE]: + raise ValueError('The input filename "%s" does not correspond to a restart file. Please follow the Eclipse naming conventions' + % filename) + + super(EclRestartFile , self).__init__( grid, filename , flags) + self.rst_headers = None + if file_type == EclFileEnum.ECL_RESTART_FILE: + self.is_unified = False + self.report_step = report_step + else: + self.is_unified = True + + + + def unified(self): + """ + Will return True if the file we have opened is unified. + """ + return self.is_unified + + + def assertHeaders(self): + if self.rst_headers is None: + self.rst_headers = [] + if self.unified(): + for index in range(self.num_named_kw("SEQNUM")): + self.rst_headers.append( EclRestartHead( rst_view = self.restartView( seqnum_index = index ))) + else: + intehead_kw = self["INTEHEAD"][0] + doubhead_kw = self["DOUBHEAD"][0] + if "LOGIHEAD" in self: + logihead_kw = self["LOGIHEAD"][0] + else: + logihead_kw = None + + self.rst_headers.append( EclRestartHead( kw_arg = (self.report_step , intehead_kw , doubhead_kw , logihead_kw) )) + + + def timeList(self): + """Will return a list of report_step, simulation time and days. + + The return value will be a list tuples. For a unified restart + file with the three report steps {10,15,20} it can look like: + + [ (10, datetime.datetime( 2010 , 1 , 1 , 0 , 0 , 0 ) , 100.0), + (15, datetime.datetime( 2010 , 3 , 1 , 0 , 0 , 0 ) , 160.0), + (20, datetime.datetime( 2010 , 5 , 1 , 0 , 0 , 0 ) , 220.0) ] + + For a non-unified restart file the list will have only one element. + """ + + self.assertHeaders() + time_list = [] + for header in self.rst_headers: + time_list.append( (header.getReportStep() , header.getSimDate( ) , header.getSimDays( )) ) + + return time_list + + + def headers(self): + self.assertHeaders() + return self.rst_headers + + + def get_header(self, index): + self.assertHeaders() + return self.rst_headers[index] diff --git a/ThirdParty/Ert/python/python/ert/ecl/ecl_rft.py b/ThirdParty/Ert/python/python/ecl/ecl/ecl_rft.py similarity index 86% rename from ThirdParty/Ert/python/python/ert/ecl/ecl_rft.py rename to ThirdParty/Ert/python/python/ecl/ecl/ecl_rft.py index 0499508e1a..fdfae66487 100644 --- a/ThirdParty/Ert/python/python/ert/ecl/ecl_rft.py +++ b/ThirdParty/Ert/python/python/ecl/ecl/ecl_rft.py @@ -17,11 +17,11 @@ Module for loading ECLIPSE RFT files. """ -import types -import warnings +from __future__ import absolute_import, division, print_function, unicode_literals + from cwrap import BaseCClass -from ert.ecl import EclRFTCell, EclPLTCell, EclPrototype -from ert.util import CTime +from ecl.ecl import EclRFTCell, EclPLTCell, EclPrototype +from ecl.util import CTime class EclRFT(BaseCClass): """The EclRFT class contains the information for *one* RFT. @@ -74,7 +74,22 @@ def __init__(self , name , type_string , date , days): def free(self): self._free( ) - + + def __repr__(self): + rs = [] + rs.append('completed_cells = %d' % len(self)) + rs.append('date = %s' % self.getDate()) + if self.is_RFT(): + rs.append('RFT') + if self.is_PLT(): + rs.append('PLT') + if self.is_SEGMENT(): + rs.append('SEGMENT') + if self.is_MSW(): + rs.append('MSW') + rstr = ', '.join(rs) + return self._create_repr(rstr) + def __len__(self): """ The number of completed cells in this RFT. @@ -106,31 +121,12 @@ def is_MSW(self): return self._is_MSW( ) - @property - def type(self): - # Enum: ecl_rft_enum from ecl_rft_node.h - # RFT = 1 - # PLT = 2 - # Segment = 3 -- Not properly implemented - """ - Deprecated - use query methods: is_RFT(), is_PLT() and is_SEGMENT() instead. - """ - warnings.warn("The property type is deprecated, use the query methods is_RFT(), is_PLT() and is_SEGMENT() instead." , DeprecationWarning) - return self._get_type( ) - - def getWellName(self): """ The name of the well we are considering. """ return self._get_well( ) - @property - def well(self): - warnings.warn("The property well is deprecated, use the getWellName() method instead." , DeprecationWarning) - return self.getWellName( ) - - def getDate(self): """ The date when this RFT/PLT/... was recorded. @@ -138,22 +134,6 @@ def getDate(self): ct = CTime(self._get_date( )) return ct.date() - - @property - def date(self): - warnings.warn("The property date is deprecated, use the getDate() instead." , DeprecationWarning) - return self.getDate() - - - @property - def size(self): - """ - The number of completed cells. - """ - warnings.warn("The property size is deprecated, use the built in len( ) function instead." , DeprecationWarning) - return len(self) - - def __cell_ref( self , cell_ptr ): if self.is_RFT(): return EclRFTCell.createCReference( cell_ptr , self ) @@ -164,7 +144,7 @@ def __cell_ref( self , cell_ptr ): def assert_cell_index( self , index ): - if isinstance( index , types.IntType): + if isinstance( index , int): length = self.__len__() if index < 0 or index >= length: raise IndexError @@ -325,13 +305,8 @@ def getNumWells(self): Returns the total number of distinct wells in the RFT file. """ return self._get_num_wells( ) - - @property - def num_wells( self ): - warnings.warn("The property num_wells is deprecated, use the getNumWells() instead." , DeprecationWarning) - return self.getNumWells() - + def getHeaders(self): """ Returns a list of two tuples (well_name , date) for the whole file. @@ -339,14 +314,9 @@ def getHeaders(self): header_list = [] for i in (range(self._get_size( None , CTime(-1)))): rft = self.iget( i ) - header_list.append( (rft.well , rft.date) ) + header_list.append( (rft.getWellName() , rft.getDate()) ) return header_list - @property - def headers(self): - warnings.warn("The property headers is deprecated, use the getHeaders() instead." , DeprecationWarning) - return self.getHeaders() - def iget(self , index): """ @@ -370,13 +340,7 @@ def get(self , well_name , date ): def free(self): self._free( ) - - - - - - - - - + def __repr__(self): + w = len(self) + return self._create_repr('wells = %d' % w) diff --git a/ThirdParty/Ert/python/python/ert/ecl/ecl_rft_cell.py b/ThirdParty/Ert/python/python/ecl/ecl/ecl_rft_cell.py similarity index 85% rename from ThirdParty/Ert/python/python/ert/ecl/ecl_rft_cell.py rename to ThirdParty/Ert/python/python/ecl/ecl/ecl_rft_cell.py index 1933681c16..6c6e312a2b 100644 --- a/ThirdParty/Ert/python/python/ert/ecl/ecl_rft_cell.py +++ b/ThirdParty/Ert/python/python/ecl/ecl/ecl_rft_cell.py @@ -14,9 +14,8 @@ # See the GNU General Public License at # for more details. -import warnings from cwrap import BaseCClass -from ert.ecl import EclPrototype +from ecl.ecl import EclPrototype class RFTCell(BaseCClass): @@ -43,40 +42,9 @@ class RFTCell(BaseCClass): - def warn(self , old , new): - msg = """ - -The cell property:%s has been deprecated, and the method:%s() should -be used instead. Observe that the new method %s() returns coordinate -values starting at 0, whereas the old property %s returned values -starting at 1; hence you must adapt the calling code when you change -from %s -> %s() -""" % (old , new , new , old , old , new) - warnings.warn( msg , DeprecationWarning ) - def free(self): self._free( ) - @property - def i(self): - self.warn("i" , "get_i") - return self.get_i() + 1 - - @property - def j(self): - self.warn("j" , "get_j") - return self.get_j() + 1 - - @property - def k(self): - self.warn("k" , "get_k") - return self.get_k() + 1 - - @property - def ijk(self): - self.warn("ijk" , "get_ijk") - return (self.get_i() + 1 , self.get_j() + 1 , self.get_k() + 1) - def get_i(self): return self._get_i( ) @@ -110,7 +78,7 @@ class EclRFTCell(RFTCell): def __init__(self , i , j , k , depth , pressure , swat , sgas): c_ptr = self._alloc_RFT( i , j , k , depth , pressure , swat , sgas ) - super(RFTCell , self).__init__( c_ptr ) + super(EclRFTCell , self).__init__( c_ptr ) @property def swat(self): @@ -146,7 +114,7 @@ class EclPLTCell(RFTCell): def __init__(self , i , j , k , depth , pressure , orat , grat , wrat , conn_start ,conn_end, flowrate , oil_flowrate , gas_flowrate , water_flowrate ): c_ptr = self._alloc_PLT( i , j , k , depth , pressure , orat , grat , wrat , conn_start ,conn_end, flowrate , oil_flowrate , gas_flowrate , water_flowrate ) - super( RFTCell , self).__init__( c_ptr ) + super( EclPLTCell , self).__init__( c_ptr ) @property diff --git a/ThirdParty/Ert/python/python/ert/ecl/ecl_smspec_node.py b/ThirdParty/Ert/python/python/ecl/ecl/ecl_smspec_node.py similarity index 86% rename from ThirdParty/Ert/python/python/ert/ecl/ecl_smspec_node.py rename to ThirdParty/Ert/python/python/ecl/ecl/ecl_smspec_node.py index badf55f2a0..f651df551a 100644 --- a/ThirdParty/Ert/python/python/ert/ecl/ecl_smspec_node.py +++ b/ThirdParty/Ert/python/python/ecl/ecl/ecl_smspec_node.py @@ -1,5 +1,21 @@ +# Copyright (C) 2016 Statoil ASA, Norway. +# +# This file is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. + from cwrap import BaseCClass -from ert.ecl import EclPrototype +from ecl.ecl import EclPrototype class EclSMSPECNode(BaseCClass): @@ -30,42 +46,6 @@ def __init__(self): super(EclSMSPECNode, self).__init__(0) # null pointer raise NotImplementedError("Class can not be instantiated directly!") - @property - def is_total(self): - """ - Will check if the node corresponds to a total quantity. - - The question of whether a variable corresponds to a 'total' - quantity or not can be interesting for e.g. interpolation - purposes. The actual question whether a quantity is total or - not is based on a hardcoded list in smspec_node_set_flags() in - smspec_node.c; this list again is based on the tables 2.7 - - 2.11 in the ECLIPSE fileformat documentation. - """ - return self._node_is_total( ) - - @property - def is_rate(self): - """ - Will check if the variable in question is a rate variable. - - The conecpt of rate variabel is important (internally) when - interpolation values to arbitrary times. - """ - return self._node_is_rate() - - - @property - def is_historical(self): - """ - Checks if the key corresponds to a historical variable. - - The check is only based on the last character; all variables - ending with 'H' are considered historical. - """ - return self._node_is_historical( ) - - @property def unit(self): """ @@ -148,3 +128,37 @@ def getNum(self): return self._node_num( ) else: return None + + def isRate(self): + """ + Will check if the variable in question is a rate variable. + + The conecpt of rate variabel is important (internally) when + interpolation values to arbitrary times. + """ + return self._node_is_rate() + + + def isTotal(self): + """ + Will check if the node corresponds to a total quantity. + + The question of whether a variable corresponds to a 'total' + quantity or not can be interesting for e.g. interpolation + purposes. The actual question whether a quantity is total or + not is based on a hardcoded list in smspec_node_set_flags() in + smspec_node.c; this list again is based on the tables 2.7 - + 2.11 in the ECLIPSE fileformat documentation. + """ + return self._node_is_total( ) + + + def isHistorical(self): + """ + Checks if the key corresponds to a historical variable. + + The check is only based on the last character; all variables + ending with 'H' are considered historical. + """ + return self._node_is_historical( ) + diff --git a/ThirdParty/Ert/python/python/ert/ecl/ecl_subsidence.py b/ThirdParty/Ert/python/python/ecl/ecl/ecl_subsidence.py similarity index 87% rename from ThirdParty/Ert/python/python/ert/ecl/ecl_subsidence.py rename to ThirdParty/Ert/python/python/ecl/ecl/ecl_subsidence.py index 308789ebc3..dedba06ec7 100644 --- a/ThirdParty/Ert/python/python/ert/ecl/ecl_subsidence.py +++ b/ThirdParty/Ert/python/python/ecl/ecl/ecl_subsidence.py @@ -23,7 +23,7 @@ ecl_subsidence.c implementation in the libecl library. """ from cwrap import BaseCClass -from ert.ecl import EclPrototype +from ecl.ecl import EclPrototype class EclSubsidence(BaseCClass): @@ -47,6 +47,7 @@ class is focused on the ECLIPSE side of things, and does not have _free = EclPrototype("void ecl_subsidence_free( ecl_subsidence )") _add_survey_PRESSURE = EclPrototype("void* ecl_subsidence_add_survey_PRESSURE( ecl_subsidence , char* , ecl_file_view )") _eval = EclPrototype("double ecl_subsidence_eval( ecl_subsidence , char* , char* , ecl_region , double , double , double, double, double)") + _eval_geertsma = EclPrototype("double ecl_subsidence_eval_geertsma( ecl_subsidence , char* , char* , ecl_region , double , double , double, double, double, double)") _has_survey = EclPrototype("bool ecl_subsidence_has_survey( ecl_subsidence , char*)") def __init__( self, grid, init_file ): @@ -78,7 +79,7 @@ def add_survey_PRESSURE( self, survey_name, restart_file ): to load the @restart_file argument is: import datetime - import ert.ecl.ecl as ecl + import ecl.ecl.ecl as ecl ... ... date = datetime.datetime( year , month , day ) @@ -91,6 +92,16 @@ def add_survey_PRESSURE( self, survey_name, restart_file ): self._add_survey_PRESSURE( survey_name, restart_file) + def evalGeertsma(self, base_survey, monitor_survey, pos, youngs_modulus, poisson_ratio, seabed, region=None): + if not base_survey in self: + raise KeyError("No such survey: %s" % base_survey) + + if monitor_survey is not None: + if not monitor_survey in self: + raise KeyError("No such survey: %s" % monitor_survey) + + return self._eval_geertsma(base_survey, monitor_survey, region, pos[0], pos[1], pos[2], youngs_modulus, poisson_ratio, seabed) + def eval(self, base_survey, monitor_survey, pos, compressibility, poisson_ratio, region=None): """ Calculates the subsidence change between two surveys. diff --git a/ThirdParty/Ert/python/python/ert/ecl/ecl_sum.py b/ThirdParty/Ert/python/python/ecl/ecl/ecl_sum.py similarity index 97% rename from ThirdParty/Ert/python/python/ert/ecl/ecl_sum.py rename to ThirdParty/Ert/python/python/ecl/ecl/ecl_sum.py index 4a619141be..0a4d99bf4c 100644 --- a/ThirdParty/Ert/python/python/ert/ecl/ecl_sum.py +++ b/ThirdParty/Ert/python/python/ecl/ecl/ecl_sum.py @@ -24,24 +24,25 @@ import numpy import datetime +import os.path # Observe that there is some convention conflict with the C code # regarding order of arguments: The C code generally takes the time # index as the first argument and the key/key_index as second # argument. In the python code this order has been reversed. from cwrap import BaseCClass, CFILE -from ert.ecl import EclSumTStep -from ert.ecl import EclSumVarType -from ert.ecl.ecl_sum_vector import EclSumVector -from ert.ecl.ecl_smspec_node import EclSMSPECNode -from ert.util import StringList, CTime, DoubleVector, TimeVector, IntVector -from ert.ecl import EclPrototype +from ecl.ecl import EclSumTStep +from ecl.ecl import EclSumVarType +from ecl.ecl.ecl_sum_vector import EclSumVector +from ecl.ecl.ecl_smspec_node import EclSMSPECNode +from ecl.util import StringList, CTime, DoubleVector, TimeVector, IntVector +from ecl.ecl import EclPrototype #, EclSumKeyWordVector -#import ert.ecl_plot.sum_plot as sum_plot +#import ecl.ecl_plot.sum_plot as sum_plot # The date2num function is a verbatim copy of the _to_ordinalf() # function from the matplotlib.dates module. Inserted here only to @@ -159,6 +160,8 @@ def __init__(self, load_case , join_string = ":" , include_restart = True): else: super(EclSum, self).__init__(c_pointer) self.__private_init( ) + self._load_case = load_case + @classmethod @@ -426,6 +429,9 @@ def assertKeyValid(self , key): if not key in self: raise KeyError("The summary key:%s was not recognized" % key) + def __iter__(self): + return iter(self.keys()) + def __getitem__(self , key): """ Implements [] operator - @key should be a summary key. @@ -577,7 +583,7 @@ def timeRange(self , start = None , end = None , interval = "1Y", extend_end = T def blockedProduction(self , totalKey , timeRange): node = self.smspec_node(totalKey) - if node.is_total: + if node.isTotal(): total = DoubleVector() for t in timeRange: if t < CTime(self.start_time): @@ -1001,7 +1007,7 @@ def last_report(self): @property def first_report(self): """ - The number of the last report step in the dataset. + The number of the first report step in the dataset. """ return self._get_first_report_step( ) @@ -1179,6 +1185,26 @@ def get_general_var_index(self, key): def free(self): self._free( ) + def _nicename(self): + """load_case is often full path to summary file, + if so, output basename, else name + """ + name = self._load_case + if name and os.path.isfile(name): + name = os.path.basename(name) + return name + + def __repr__(self): + """Returns, e.g. + EclSum("NORNE_ATW2013.UNSMRY", [1997-11-06 00:00:00, 2006-12-01 00:00:00], keys = 3781) at 0x1609e20 + """ + name = self._nicename() + s_time = self.getStartTime() + e_time = self.getEndTime() + num_keys = len(self.keys()) + content = 'name = "%s", time = [%s, %s], keys = %d' % (name, s_time, e_time, num_keys) + return self._create_repr(content) + def dumpCSVLine(self, time, keywords, pfile): """ Will dump a csv formatted line of the keywords in @keywords, @@ -1214,5 +1240,5 @@ def exportCSV(self , filename , keys = None , date_format = "%Y-%m-%d" , sep = " -import ert.ecl.ecl_sum_keyword_vector +import ecl.ecl.ecl_sum_keyword_vector EclSum._dump_csv_line = EclPrototype("void ecl_sum_fwrite_interp_csv_line(ecl_sum , time_t , ecl_sum_vector, FILE)" , bind = False) diff --git a/ThirdParty/Ert/python/python/ert/ecl/ecl_sum_keyword_vector.py b/ThirdParty/Ert/python/python/ecl/ecl/ecl_sum_keyword_vector.py similarity index 98% rename from ThirdParty/Ert/python/python/ert/ecl/ecl_sum_keyword_vector.py rename to ThirdParty/Ert/python/python/ecl/ecl/ecl_sum_keyword_vector.py index 01d586e5fa..336c0697eb 100644 --- a/ThirdParty/Ert/python/python/ert/ecl/ecl_sum_keyword_vector.py +++ b/ThirdParty/Ert/python/python/ecl/ecl/ecl_sum_keyword_vector.py @@ -24,7 +24,7 @@ # argument. In the python code this order has been reversed. from cwrap import BaseCClass -from ert.ecl import EclPrototype +from ecl.ecl import EclPrototype diff --git a/ThirdParty/Ert/python/python/ert/ecl/ecl_sum_node.py b/ThirdParty/Ert/python/python/ecl/ecl/ecl_sum_node.py similarity index 87% rename from ThirdParty/Ert/python/python/ert/ecl/ecl_sum_node.py rename to ThirdParty/Ert/python/python/ecl/ecl/ecl_sum_node.py index eb2f4ee1b0..ed4ccfc680 100644 --- a/ThirdParty/Ert/python/python/ert/ecl/ecl_sum_node.py +++ b/ThirdParty/Ert/python/python/ecl/ecl/ecl_sum_node.py @@ -1,4 +1,5 @@ -class EclSumNode: +class EclSumNode(object): + def __init__(self, mini_step, report_step, days, date, mpl_date, value): """ EclSumNode is a 'struct' with a summary value and time. @@ -23,5 +24,5 @@ def __init__(self, mini_step, report_step, days, date, mpl_date, value): self.date = date self.mpl_date = mpl_date - def __str__(self): - return "" % ( self.days, self.value ) \ No newline at end of file + def __repr__(self): + return "EclSumNode(days=%d, value=%g)" % (self.days, self.value) diff --git a/ThirdParty/Ert/python/python/ert/ecl/ecl_sum_tstep.py b/ThirdParty/Ert/python/python/ecl/ecl/ecl_sum_tstep.py similarity index 97% rename from ThirdParty/Ert/python/python/ert/ecl/ecl_sum_tstep.py rename to ThirdParty/Ert/python/python/ecl/ecl/ecl_sum_tstep.py index 1d5f3bf97e..e0995bb8aa 100644 --- a/ThirdParty/Ert/python/python/ert/ecl/ecl_sum_tstep.py +++ b/ThirdParty/Ert/python/python/ecl/ecl/ecl_sum_tstep.py @@ -1,6 +1,6 @@ from cwrap import BaseCClass -from ert.ecl import EclPrototype -from ert.util import CTime +from ecl.ecl import EclPrototype +from ecl.util import CTime class EclSumTStep(BaseCClass): diff --git a/ThirdParty/Ert/python/python/ert/ecl/ecl_sum_var_type.py b/ThirdParty/Ert/python/python/ecl/ecl/ecl_sum_var_type.py similarity index 96% rename from ThirdParty/Ert/python/python/ert/ecl/ecl_sum_var_type.py rename to ThirdParty/Ert/python/python/ecl/ecl/ecl_sum_var_type.py index c661123d20..73039c39eb 100644 --- a/ThirdParty/Ert/python/python/ert/ecl/ecl_sum_var_type.py +++ b/ThirdParty/Ert/python/python/ecl/ecl/ecl_sum_var_type.py @@ -14,10 +14,11 @@ # See the GNU General Public License at # for more details. from cwrap import BaseCEnum -from ert.ecl import ECL_LIB +from ecl.ecl import ECL_LIB class EclSumVarType(BaseCEnum): + TYPE_NAME = "ecl_sum_var_type" ECL_SMSPEC_INVALID_VAR = None ECL_SMSPEC_AQUIFER_VAR = None ECL_SMSPEC_WELL_VAR = None @@ -52,4 +53,3 @@ class EclSumVarType(BaseCEnum): EclSumVarType.addEnum("ECL_SMSPEC_SEGMENT_VAR", 13) EclSumVarType.addEnum("ECL_SMSPEC_MISC_VAR", 14) -EclSumVarType.registerEnum(ECL_LIB, "ecl_sum_var_type") diff --git a/ThirdParty/Ert/python/python/ert/ecl/ecl_sum_vector.py b/ThirdParty/Ert/python/python/ecl/ecl/ecl_sum_vector.py similarity index 88% rename from ThirdParty/Ert/python/python/ert/ecl/ecl_sum_vector.py rename to ThirdParty/Ert/python/python/ecl/ecl/ecl_sum_vector.py index ace3a616b9..3080a65306 100644 --- a/ThirdParty/Ert/python/python/ert/ecl/ecl_sum_vector.py +++ b/ThirdParty/Ert/python/python/ecl/ecl/ecl_sum_vector.py @@ -1,6 +1,22 @@ +# Copyright (C) 2017 Statoil ASA, Norway. +# +# This file is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. + from __future__ import print_function import warnings -from ert.ecl.ecl_sum_node import EclSumNode +from ecl.ecl.ecl_sum_node import EclSumNode class EclSumVector(object): @@ -24,7 +40,7 @@ def __init__(self, parent, key, report_only = False): self.parent = parent self.key = key self.report_only = report_only - + if report_only: warnings.warn("The report_only flag to the EclSumVector will be removed" , DeprecationWarning) @@ -39,13 +55,15 @@ def __init__(self, parent, key, report_only = False): def __str__(self): return "" % self.key + def __repr__(self): + return 'EclSumVector(key = %s, size = %d, unit = %s)' % (self.key, len(self), self.unit) @property def unit( self ): """ The unit of this vector. """ - return self.parent.get_unit(self.key) + return self.parent.unit(self.key) def assert_values( self ): """ @@ -107,7 +125,7 @@ def report_step( self ): return self.__report_step - def __iget__( self, index ): + def __iget( self, index ): """ Will return an EclSumNode for element @index; should be called through the [] operator, otherwise you can come across @@ -149,7 +167,7 @@ def __getitem__(self, index): if index < 0 or index > length: raise KeyError("Invalid index:%d out of range [0:%d)" % ( index, length)) else: - return self.__iget__(index) + return self.__iget(index) elif isinstance(index, slice): # Observe that the slice based lookup does __not__ return # a proper EclSumVector instance; it will merely return @@ -158,7 +176,7 @@ def __getitem__(self, index): index = start sub_vector = [] while index < stop: - sub_vector.append(self.__iget__(index)) + sub_vector.append(self.__iget(index)) index += step return sub_vector @@ -170,7 +188,7 @@ def first( self ): Will return the first EclSumNode in this vector. """ self.assert_values() - return self.__iget__(0) + return self.__iget(0) @property def last( self ): @@ -180,7 +198,7 @@ def last( self ): self.assert_values() index = len(self.__values) - 1 - return self.__iget__(index) + return self.__iget(index) @property def last_value( self ): @@ -190,7 +208,7 @@ def last_value( self ): self.assert_values() index = len(self.__values) - 1 - return self.__iget__(index).value + return self.__iget(index).value def get_interp( self, days=None, date=None): @@ -256,7 +274,7 @@ def first_gt( self, limit ): time_index = self.first_gt_index(limit) print(time_index) if time_index >= 0: - return self.__iget__(time_index) + return self.__iget(time_index) else: return None @@ -281,6 +299,6 @@ def first_lt( self, limit ): """ time_index = self.first_lt_index(limit) if time_index >= 0: - return self.__iget__(time_index) + return self.__iget(time_index) else: return None diff --git a/ThirdParty/Ert/python/python/ecl/ecl/ecl_type.py b/ThirdParty/Ert/python/python/ecl/ecl/ecl_type.py new file mode 100644 index 0000000000..a16109caa3 --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/ecl/ecl_type.py @@ -0,0 +1,184 @@ +# Copyright (C) 2017 Statoil ASA, Norway. +# +# The file 'ecl_type.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. + +from cwrap import BaseCClass, BaseCEnum +from ecl.ecl import EclPrototype + +class EclTypeEnum(BaseCEnum): + TYPE_NAME="ecl_type_enum" + ECL_CHAR_TYPE = None + ECL_FLOAT_TYPE = None + ECL_DOUBLE_TYPE = None + ECL_INT_TYPE = None + ECL_BOOL_TYPE = None + ECL_MESS_TYPE = None + ECL_STRING_TYPE = None + +EclTypeEnum.addEnum("ECL_CHAR_TYPE" , 0 ) +EclTypeEnum.addEnum("ECL_FLOAT_TYPE" , 1 ) +EclTypeEnum.addEnum("ECL_DOUBLE_TYPE" , 2 ) +EclTypeEnum.addEnum("ECL_INT_TYPE" , 3 ) +EclTypeEnum.addEnum("ECL_BOOL_TYPE" , 4 ) +EclTypeEnum.addEnum("ECL_MESS_TYPE" , 5 ) +EclTypeEnum.addEnum("ECL_STRING_TYPE" , 7 ) + +#----------------------------------------------------------------- + +class EclDataType(BaseCClass): + + TYPE_NAME = "ecl_data_type" + + _alloc = EclPrototype("void* ecl_type_alloc_python(ecl_type_enum, size_t)", bind=False) + _alloc_from_type = EclPrototype("void* ecl_type_alloc_from_type_python(ecl_type_enum)", bind=False) + _alloc_from_name = EclPrototype("void* ecl_type_alloc_from_name_python(char*)", bind = False) + _free = EclPrototype("void ecl_type_free_python(ecl_data_type)") + _get_type = EclPrototype("ecl_type_enum ecl_type_get_type_python(ecl_data_type)") + _get_element_size = EclPrototype("size_t ecl_type_get_sizeof_ctype_fortio_python(ecl_data_type)") + _is_int = EclPrototype("bool ecl_type_is_int_python(ecl_data_type)") + _is_char = EclPrototype("bool ecl_type_is_char_python(ecl_data_type)") + _is_float = EclPrototype("bool ecl_type_is_float_python(ecl_data_type)") + _is_double = EclPrototype("bool ecl_type_is_double_python(ecl_data_type)") + _is_mess = EclPrototype("bool ecl_type_is_mess_python(ecl_data_type)") + _is_bool = EclPrototype("bool ecl_type_is_bool_python(ecl_data_type)") + _is_string = EclPrototype("bool ecl_type_is_string_python(ecl_data_type)") + _get_name = EclPrototype("char* ecl_type_alloc_name_python(ecl_data_type)") + _is_numeric = EclPrototype("bool ecl_type_is_numeric_python(ecl_data_type)") + _is_equal = EclPrototype("bool ecl_type_is_equal_python(ecl_data_type, ecl_data_type)") + + def __init__(self, type_enum = None, element_size = None, type_name = None): + self._assert_valid_arguments(type_enum, element_size, type_name) + + if type_name: + c_ptr = self._alloc_from_name(type_name) + elif element_size is None: + c_ptr = self._alloc_from_type(type_enum) + else: + c_ptr = self._alloc(type_enum, element_size) + + super(EclDataType, self).__init__(c_ptr) + + def _assert_valid_arguments(self, type_enum, element_size, type_name): + if type_name is not None: + if type_enum is not None or element_size is not None: + err_msg = ("Type name given (%s). Expected both " + + "type_enum and element_size to be None") + raise ValueError(err_msg % type_name) + + elif type_enum is None: + raise ValueError("Both type_enum and type_name is None!") + + elif type_enum == EclTypeEnum.ECL_STRING_TYPE: + if element_size is None: + raise ValueError("When creating an ECL_STRING one must " + + "provide an element size!") + + if not (0 <= element_size <= 999): + raise ValueError("Expected element_size to be in the range " + + "[0, 999], was: %d" % element_size) + + @property + def type(self): + return self._get_type() + + @property + def element_size(self): + return self._get_element_size() + + @property + def type_name(self): + return self._get_name() + + def free(self): + self._free() + + def is_int(self): + return self._is_int() + + def is_char(self): + return self._is_char() + + def is_float(self): + return self._is_float() + + def is_double(self): + return self._is_double() + + def is_mess(self): + return self._is_mess() + + def is_bool(self): + return self._is_bool() + + def is_string(self): + return self._is_string() + + def is_numeric(self): + return self._is_numeric() + + def is_equal(self, other): + return self._is_equal(other) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.is_equal(other) + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def __hash__(self): + return hash((self.type, self. element_size)) + + @classmethod + def create_from_type_name(cls, name): + return EclDataType(type_name = name) + + # Enables one to fetch a type as EclDataType.ECL_XXXX + class classproperty(object): + + def __init__(self, fget): + self.fget = fget + + def __get__(self, owner_self, owner_cls): + return self.fget(owner_cls) + + @classproperty + def ECL_INT(cls): + return EclDataType(EclTypeEnum.ECL_INT_TYPE) + + @classproperty + def ECL_FLOAT(cls): + return EclDataType(EclTypeEnum.ECL_FLOAT_TYPE) + + @classproperty + def ECL_DOUBLE(cls): + return EclDataType(EclTypeEnum.ECL_DOUBLE_TYPE) + + @classproperty + def ECL_BOOL(cls): + return EclDataType(EclTypeEnum.ECL_BOOL_TYPE) + + @classproperty + def ECL_MESS(cls): + return EclDataType(EclTypeEnum.ECL_MESS_TYPE) + + @classproperty + def ECL_CHAR(cls): + return EclDataType(EclTypeEnum.ECL_CHAR_TYPE) + + @classmethod + def ECL_STRING(cls, elem_size): + return EclDataType(EclTypeEnum.ECL_STRING_TYPE, elem_size) diff --git a/ThirdParty/Ert/python/python/ert/ecl/ecl_util.py b/ThirdParty/Ert/python/python/ecl/ecl/ecl_util.py similarity index 77% rename from ThirdParty/Ert/python/python/ert/ecl/ecl_util.py rename to ThirdParty/Ert/python/python/ecl/ecl/ecl_util.py index 9722750ac3..2849c5d604 100644 --- a/ThirdParty/Ert/python/python/ert/ecl/ecl_util.py +++ b/ThirdParty/Ert/python/python/ecl/ecl/ecl_util.py @@ -18,17 +18,18 @@ This module does not contain any class definitions; it mostly consists of enum definitions/values from ecl_util.h; the enum values are -extracted from the shared library using the -cwrap.cenum.create_enum() function in a semi-automagic manner. +extracted from the shared library in a semi-automagic manner using the +BaseCEnum class from cwrap. In addition to the enum definitions there are a few stateless functions from ecl_util.c which are not bound to any class type. """ import ctypes from cwrap import BaseCEnum -from ert.ecl import EclPrototype, ECL_LIB +from ecl.ecl import EclPrototype, ECL_LIB class EclFileEnum(BaseCEnum): + TYPE_NAME="ecl_file_enum" ECL_OTHER_FILE = None ECL_RESTART_FILE = None ECL_UNIFIED_RESTART_FILE = None @@ -53,11 +54,11 @@ class EclFileEnum(BaseCEnum): EclFileEnum.addEnum("ECL_RFT_FILE", 256) EclFileEnum.addEnum("ECL_DATA_FILE", 512) -EclFileEnum.registerEnum(ECL_LIB, "ecl_file_enum") #----------------------------------------------------------------- class EclPhaseEnum(BaseCEnum): + TYPE_NAME="ecl_phase_enum" ECL_OIL_PHASE = None ECL_GAS_PHASE = None ECL_WATER_PHASE = None @@ -66,62 +67,40 @@ class EclPhaseEnum(BaseCEnum): EclPhaseEnum.addEnum("ECL_GAS_PHASE" , 2 ) EclPhaseEnum.addEnum("ECL_WATER_PHASE" , 4 ) -EclPhaseEnum.registerEnum(ECL_LIB, "ecl_phase_enum") - -#----------------------------------------------------------------- - -class EclTypeEnum(BaseCEnum): - ECL_CHAR_TYPE = None - ECL_FLOAT_TYPE = None - ECL_DOUBLE_TYPE = None - ECL_INT_TYPE = None - ECL_BOOL_TYPE = None - ECL_MESS_TYPE = None - -EclTypeEnum.addEnum("ECL_CHAR_TYPE" , 0 ) -EclTypeEnum.addEnum("ECL_FLOAT_TYPE" , 1 ) -EclTypeEnum.addEnum("ECL_DOUBLE_TYPE" , 2 ) -EclTypeEnum.addEnum("ECL_INT_TYPE" , 3 ) -EclTypeEnum.addEnum("ECL_BOOL_TYPE" , 4 ) -EclTypeEnum.addEnum("ECL_MESS_TYPE" , 5 ) - - -EclTypeEnum.registerEnum(ECL_LIB, "ecl_type_enum") #----------------------------------------------------------------- class EclUnitTypeEnum(BaseCEnum): TYPE_NAME = "ecl_unit_enum" - ERT_ECL_METRIC_UNITS = None - ERT_ECL_FIELD_UNITS = None - ERT_ECL_LAB_UNITS = None - -EclUnitTypeEnum.addEnum("ERT_ECL_METRIC_UNITS" , 0 ) -EclUnitTypeEnum.addEnum("ERT_ECL_FIELD_UNITS" , 1 ) -EclUnitTypeEnum.addEnum("ERT_ECL_LAB_UNITS" , 2 ) + ECL_METRIC_UNITS = None + ECL_FIELD_UNITS = None + ECL_LAB_UNITS = None + ECL_PVT_M_UNITS = None + +EclUnitTypeEnum.addEnum("ECL_METRIC_UNITS" , 1 ) +EclUnitTypeEnum.addEnum("ECL_FIELD_UNITS" , 2 ) +EclUnitTypeEnum.addEnum("ECL_LAB_UNITS" , 3 ) +EclUnitTypeEnum.addEnum("ECL_PVT_M_UNITS" , 4 ) -EclUnitTypeEnum.registerEnum(ECL_LIB, "ecl_unit_enum") #----------------------------------------------------------------- class EclFileFlagEnum(BaseCEnum): + TYPE_NAME="ecl_file_flag_enum" ECL_FILE_CLOSE_STREAM = None ECL_FILE_WRITABLE = None EclFileFlagEnum.addEnum("ECL_FILE_CLOSE_STREAM" , 1 ) EclFileFlagEnum.addEnum("ECL_FILE_WRITABLE" , 2 ) -EclFileFlagEnum.registerEnum(ECL_LIB, "ecl_file_flag_enum") - #----------------------------------------------------------------- class EclUtil(object): _get_num_cpu = EclPrototype("int ecl_util_get_num_cpu( char* )", bind = False) _get_file_type = EclPrototype("ecl_file_enum ecl_util_get_file_type( char* , bool* , int*)" , bind = False) - _get_type_name = EclPrototype("char* ecl_util_get_type_name( int )" , bind = False) _get_start_date = EclPrototype("time_t ecl_util_get_start_date( char* )" , bind = False) _get_report_step = EclPrototype("int ecl_util_filename_report_nr( char* )" , bind = False) @@ -145,10 +124,6 @@ def get_file_type( filename ): file_type , fmt , step = EclUtil.inspectExtension( filename ) return file_type - @staticmethod - def type_name(ecl_type): - return EclUtil._get_type_name(ecl_type) - @staticmethod def get_start_date(datafile): return EclUtil._get_start_date(datafile).datetime() @@ -182,5 +157,4 @@ def reportStep(filename): get_num_cpu = EclUtil.get_num_cpu get_file_type = EclUtil.get_file_type -type_name = EclUtil.type_name get_start_date = EclUtil.get_start_date diff --git a/ThirdParty/Ert/python/python/ecl/ecl/faults/CMakeLists.txt b/ThirdParty/Ert/python/python/ecl/ecl/faults/CMakeLists.txt new file mode 100644 index 0000000000..d7955a8c6e --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/ecl/faults/CMakeLists.txt @@ -0,0 +1,12 @@ +set(PYTHON_SOURCES + __init__.py + fault_block.py + fault_block_layer.py + fault_collection.py + fault.py + fault_line.py + fault_segments.py + layer.py +) + +add_python_package("python.ecl.ecl.faults" ${PYTHON_INSTALL_PREFIX}/ecl/ecl/faults "${PYTHON_SOURCES}" True) diff --git a/ThirdParty/Ert/python/python/ecl/ecl/faults/__init__.py b/ThirdParty/Ert/python/python/ecl/ecl/faults/__init__.py new file mode 100644 index 0000000000..cc9670e15c --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/ecl/faults/__init__.py @@ -0,0 +1,7 @@ +from .layer import Layer +from .fault_collection import FaultCollection +from .fault import Fault +from .fault_line import FaultLine +from .fault_segments import FaultSegment , SegmentMap +from .fault_block import FaultBlock , FaultBlockCell +from .fault_block_layer import FaultBlockLayer diff --git a/ThirdParty/Ert/python/python/ecl/ecl/faults/fault.py b/ThirdParty/Ert/python/python/ecl/ecl/faults/fault.py new file mode 100644 index 0000000000..d65fed4406 --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/ecl/faults/fault.py @@ -0,0 +1,611 @@ +# Copyright (C) 2014 Statoil ASA, Norway. +# +# The file 'fault.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. + +from ecl.geo import Polyline, CPolyline, GeometryTools +from ecl.util import stat +from ecl.util import Matrix + +from .fault_line import FaultLine +from .fault_segments import FaultSegment, SegmentMap + + +class Layer(object): + def __init__(self, grid, K): + assert(isinstance(K, int)) + self.__grid = grid + self.__K = K + self.__fault_lines = [] + self.__segment_map = SegmentMap() + self.__processed = False + + + def addSegment(self, segment): + self.__segment_map.addSegment(segment) + self.__processed = False + + def __len__(self): + self.processSegments() + return len(self.__fault_lines) + + def __iter__(self): + self.processSegments() + return iter(self.__fault_lines) + + def __getitem__(self, index): + self.processSegments() + return self.__fault_lines[index] + + def getK(self): + return self.__K + + + def getNeighborCells(self): + neighbor_cells = [] + for fl in self: + neighbor_cells += fl.getNeighborCells() + return neighbor_cells + + def getPolyline(self, name=None): + polyline = CPolyline(name=name) + for fl in self: + polyline += fl.getPolyline() + return polyline + + + def getIJPolyline(self): + """ + Will return a python list of (int,int) tuple. + """ + polyline = [] + for fl in self: + polyline += fl.getIJPolyline() + return polyline + + + def numLines(self): + return len(self) + + def __sortFaultLines(self): + """A fault can typically consist of several non connected fault + segments; right after reading the fault input these can be in + a complete mess: + + 1. The different part of the fault can be in random order. + + 2. Within each fault line the micro segments can be ordered in + reverse. + + This method goes through some desparate heuristics trying to sort + things out. + + """ + + N = len(self.__fault_lines) + x = Matrix(N, 1) + y = Matrix(N, 1) + + for index,line in enumerate(self.__fault_lines): + xc,yc = line.center() + + x[index,0] = xc + y[index,0] = yc + + # y = beta[0] + beta[1] * x + # = a + b * x + beta = stat.polyfit(2, x, y) + a = beta[0] + b = beta[1] + + perm_list = [] + for index,line in enumerate(self.__fault_lines): + x0, y0 = line.center() + d = x0 + b*(y0 - a) + perm_list.append((index, d)) + perm_list.sort(key=lambda x: x[1]) + + fault_lines = [] + for (index,d) in perm_list: + fault_lines.append(self.__fault_lines[ index ]) + self.__fault_lines = fault_lines + + + for line in self.__fault_lines: + x1,y1 = line.startPoint() + x2,y2 = line.endPoint() + d1 = x1 + b*(y1 - a) + d2 = x2 + b*(y2 - a) + + if d1 > d2: + line.reverse() + + + + + def processSegments(self): + if self.__processed: + return + + while self.__segment_map: + fault_line = FaultLine(self.__grid, self.__K) + self.__fault_lines.append(fault_line) + + current_segment = self.__segment_map.popStart() + while current_segment: + append = fault_line.tryAppend(current_segment) + if not append: + fault_line = FaultLine(self.__grid, self.__K) + self.__fault_lines.append(fault_line) + fault_line.tryAppend(current_segment) + + current_segment.next_segment = self.__segment_map.popNext(current_segment) + current_segment = current_segment.next_segment + + if len(self.__fault_lines) > 1: + self.__sortFaultLines() + + self.__processed = True + + +################################################################# + + +class Fault(object): + allowed_faces = ["X","Y","Z","I","J","K","X-","Y-","Z-","I-","J-","K-"] + + def __init__(self, grid, name): + self.__grid = grid + self.__name = name + self.__layer_map = {} + self.__layer_list = [] + (self.nx, self.ny, self.nz, nactive) = grid.getDims() + + + def __str__(self): + return "Fault:%s" % self.__name + + def __getitem__(self, K): + if not self.hasLayer(K): + self.addLayer(K) + layer = self.__layer_map[K] + return layer + + def __len__(self): + return len(self.__layer_map) + + + def __iter__(self): + for layer in self.__layer_list: + yield layer + + + def hasLayer(self, K): + return self.__layer_map.has_key(K) + + + def addLayer(self, K): + layer = Layer(self.__grid, K) + self.__layer_map[K] = layer + self.__layer_list.append(layer) + + + def createSegment(self, I1, I2, J1, J2, face): + if face in ["X", "I"]: + C1 = I1 + 1 + J1*(self.nx + 1) + C2 = C1 + (1 + J2 - J1) * (self.nx + 1) + elif face in ["X-", "I-"]: + C1 = I1 + J1*(self.nx + 1) + C2 = C1 + (1 + J2 - J1) * (self.nx + 1) + elif face in ["Y", "J"]: + C1 = I1 + (J1 + 1) * (self.nx + 1) + C2 = C1 + (1 + I2 - I1) + elif face in ["Y-", "J-"]: + C1 = I1 + J1 * (self.nx + 1) + C2 = C1 + (1 + I2 - I1) + else: + return None + + return FaultSegment(C1,C2) + + + + def addRecord(self, I1, I2, J1, J2, K1, K2, face): + if not face in Fault.allowed_faces: + raise ValueError("Invalid face:%s" % face) + + if I1 > I2: + raise ValueError("Invalid I1 I2 indices") + + if J1 > J2: + raise ValueError("Invalid J1 J2 indices") + + if K1 > K2: + raise ValueError("Invalid K1 K2 indices") + + if I1 < 0 or I1 >= self.nx: + raise ValueError("Invalid I1:%d" % I1) + if I2 < 0 or I2 >= self.nx: + raise ValueError("Invalid I2:%d" % I2) + + if J1 < 0 or J1 >= self.ny: + raise ValueError("Invalid J1:%d" % J1) + if J2 < 0 or J2 >= self.ny: + raise ValueError("Invalid J2:%d" % J2) + + if K1 < 0 or K1 >= self.nz: + raise ValueError("Invalid K1:%d" % K1) + if K2 < 0 or K2 >= self.nz: + raise ValueError("Invalid K2:%d" % K2) + + if face in ["X","I"]: + if I1 != I2: + raise ValueError("For face:%s we must have I1 == I2" % face) + + if face in ["Y","J"]: + if J1 != J2: + raise ValueError("For face:%s we must have J1 == J2" % face) + + if face in ["Z","K"]: + if K1 != K2: + raise ValueError("For face:%s we must have K1 == K2" % face) + + #----------------------------------------------------------------- + + for K in range(K1,K2+1): + if not self.hasLayer(K): + self.addLayer(K) + layer = self.__layer_map[K] + segment = self.createSegment(I1,I2,J1,J2,face) + if segment: + layer.addSegment(segment) + + + def getName(self): + return self.__name + + + def getNeighborCells(self): + neighbor_cells = [] + for layer in self: + neighbor_cells += layer.getNeighborCells() + return neighbor_cells + + + def getPolyline(self, k): + layer = self[k] + return layer.getPolyline(name="Polyline[%s]" % self.getName()) + + + def getIJPolyline(self, k): + layer = self[k] + return layer.getIJPolyline() + + + def numLines(self, k): + layer = self[k] + return layer.numLines() + + + @staticmethod + def __rayIntersect(p0, p1, polyline): + ray_dir = GeometryTools.lineToRay(p0, p1) + intersections = GeometryTools.rayPolygonIntersections(p1, ray_dir, polyline) + if intersections: + if len(intersections) > 1: + d_list = [ GeometryTools.distance(p1, p[1]) for p in intersections ] + index = d_list.index(min(d_list)) + else: + index = 0 + p2 = intersections[index][1] + return [p1, p2] + else: + return None + + + def connectWithPolyline(self, polyline, k): + """ + """ + if self.intersectsPolyline(polyline, k): + return None + else: + self_polyline = self.getPolyline(k) + if len(self_polyline) > 0: + return self_polyline.connect(polyline) + else: + return None + + + def connect(self, target, k): + if isinstance(target, Fault): + polyline = target.getPolyline(k) + else: + polyline = target + return self.connectWithPolyline(polyline, k) + + + + def extendToPolyline(self, polyline, k): + """Extends the fault until it intersects @polyline in layer @k. + + The return value is a list [(x1,y1), (x2,y2)] where (x1,y1) + is on the tip of the fault, and (x2,y2) is on the polyline. If + the fault already intersects polyline None is returned, if no + intersection is found a ValueError exception is raised. + + The method will try four different strategies for finding an + intersection between the extension of the fault and the + polyline. Assume the fault and the polyline looks like: + + + Polyline: ---------------------------------------------- + + +------------+ D + | | | + | +-------C + B-----+ + | + A + + The algorithm will then try to intersect the following rays + with the polyline, the first match will return: + + 1. (Pc, Pd) + 2. (Pb, Pa) + 3. (Pa, Pd) + 4. (Pd, Pa) + + The fault object is not directed in any way; i.e. in the case + both (Pc,Pd) and (Pb,Pa) intersects the polyline it is + impossible to know which intersection is returned, without + actually consulting the construction of the fault object. + """ + if self.intersectsPolyline(polyline, k): + return None + + fault_polyline = self.getPolyline(k) + p0 = fault_polyline[-2] + p1 = fault_polyline[-1] + extension = self.__rayIntersect(p0, p1, polyline) + if extension: + return extension + + p0 = fault_polyline[1] + p1 = fault_polyline[0] + extension = self.__rayIntersect(p0, p1, polyline) + if extension: + return extension + + p0 = fault_polyline[0] + p1 = fault_polyline[-1] + extension = self.__rayIntersect(p0, p1, polyline) + if extension: + return extension + + p0 = fault_polyline[-1] + p1 = fault_polyline[0] + extension = self.__rayIntersect(p0, p1, polyline) + if extension: + return extension + + raise ValueError("The fault %s can not be extended to intersect with polyline:%s in layer:%d" % (self.getName(), polyline.getName(), k+1)) + + + + def intersectsPolyline(self, polyline, k): + fault_line = self.getPolyline(k) + return fault_line.intersects(polyline) + + + def intersectsFault(self, other_fault, k): + fault_line = other_fault.getPolyline(k) + return self.intersectsPolyline(fault_line, k) + + def extendToFault(self, fault, k): + fault_line = fault.getPolyline(k) + return self.extendToPolyline(fault_line, k) + + def extendToEdge(self, edge, k): + if isinstance(edge, Fault): + return self.extendToFault(edge, k) + else: + return self.extendToPolyline(edge, k) + + + def extendToBBox(self, bbox, k, start=True): + fault_polyline = self.getPolyline(k) + if start: + p0 = fault_polyline[1] + p1 = fault_polyline[0] + else: + p0 = fault_polyline[-2] + p1 = fault_polyline[-1] + + ray_dir = GeometryTools.lineToRay(p0,p1) + intersections = GeometryTools.rayPolygonIntersections(p1, ray_dir, bbox) + if intersections: + p2 = intersections[0][1] + if self.getName(): + name = "Extend:%s" % self.getName() + else: + name = None + + return CPolyline(name=name, init_points=[(p1[0], p1[1]), p2]) + else: + raise Exception("Logical error - must intersect with bounding box") + + + def endJoin(self, other, k): + fault_polyline = self.getPolyline(k) + + if isinstance(other, Fault): + other_polyline = other.getPolyline(k) + else: + other_polyline = other + + return GeometryTools.joinPolylines(fault_polyline, other_polyline) + + + + def connectPolylineOnto(self, polyline, k): + if self.intersectsPolyline(polyline, k): + return None + + self_polyline = self.getPolyline(k) + return polyline.connect(self_polyline) + + + + def extendPolylineOnto(self, polyline, k): + if self.intersectsPolyline(polyline, k): + return None + + if len(polyline) > 1: + fault_polyline = self.getPolyline(k) + ext1 = self.__rayIntersect(polyline[-2], polyline[-1], fault_polyline) + ext2 = self.__rayIntersect(polyline[0] , polyline[1] , fault_polyline) + + if ext1 and ext2: + d1 = GeometryTools.distance(ext1[0], ext1[1]) + d2 = GeometryTools.distance(ext2[0], ext2[1]) + + if d1 < d2: + return ext1 + else: + return ext2 + + if ext1: + return ext1 + else: + return ext2 + else: + raise ValueError("Polyline must have length >= 2") + + + + @staticmethod + def intersectFaultRays(ray1, ray2): + p1,dir1 = ray1 + p2,dir2 = ray2 + if p1 == p2: + return [] + + dx = p2[0] - p1[0] + dy = p2[1] - p1[1] + if dx != 0: + if dir1[0] * dx <= 0 and dir2[0] * dx >= 0: + raise ValueError("Rays will never intersect") + + if dy != 0: + if dir1[1] * dy <= 0 and dir2[1] * dy >= 0: + raise ValueError("Rays will never intersect") + + if dx*dy != 0: + if dir1[0] != 0: + xc = p2[0] + yc = p1[1] + else: + xc = p1[0] + yc = p2[1] + + coord_list = [p1, (xc,yc), p2] + else: + coord_list = [p1,p2] + + return coord_list + + + @staticmethod + def intRay(p1,p2): + if p1 == p2: + raise Exception("Can not form ray from coincident points") + + if p1[0] == p2[0]: + # Vertical line + dx = 0 + if p2[1] > p1[1]: + dy = 1 + elif p2[1] < p1[1]: + dy = -1 + else: + # Horizontal line + if p2[1] != p1[1]: + raise Exception("Invalid direction") + + dy = 0 + if p2[0] > p1[0]: + dx = 1 + else: + dx = -1 + + return [p2, (dx,dy)] + + + + def getEndRays(self, k): + polyline = self.getIJPolyline(k) + + p0 = polyline[0] + p1 = polyline[1] + p2 = polyline[-2] + p3 = polyline[-1] + + return (Fault.intRay(p1,p0), Fault.intRay(p2,p3)) + + + + + @staticmethod + def joinFaults(fault1, fault2, k): + fault1_rays = fault1.getEndRays(k) + fault2_rays = fault2.getEndRays(k) + + if fault1.intersectsFault(fault2, k): + return None + + count = 0 + join = None + try: + join = Fault.intersectFaultRays(fault1_rays[0], fault2_rays[0]) + count += 1 + except ValueError: + pass + + try: + join = Fault.intersectFaultRays(fault1_rays[0], fault2_rays[1]) + count += 1 + except ValueError: + pass + + try: + join = Fault.intersectFaultRays(fault1_rays[1], fault2_rays[0]) + count += 1 + except ValueError: + pass + + try: + join = Fault.intersectFaultRays(fault1_rays[1], fault2_rays[1]) + count += 1 + except ValueError: + pass + + if count == 1: + xy_list = [] + for ij in join: + xyz = fault1.__grid.getNodeXYZ(ij[0], ij[1], k) + xy_list.append((xyz[0], xyz[1])) + + return xy_list + else: + return fault1.endJoin(fault2, k) diff --git a/ThirdParty/Ert/python/python/ecl/ecl/faults/fault_block.py b/ThirdParty/Ert/python/python/ecl/ecl/faults/fault_block.py new file mode 100644 index 0000000000..76830ba0c1 --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/ecl/faults/fault_block.py @@ -0,0 +1,173 @@ +# Copyright (C) 2014 Statoil ASA, Norway. +# +# The file 'fault_block.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. + +import ctypes +from ecl.ecl import EclPrototype +from cwrap import BaseCClass +from ecl.geo import Polyline, GeometryTools , CPolylineCollection +from ecl.util import DoubleVector , IntVector + +class FaultBlockCell(object): + def __init__(self , i,j,k ,x,y,z): + + self.i = i + self.j = j + self.k = k + + self.x = x + self.y = y + self.z = z + + + def __str__(self): + return "(%d,%d)" % (self.i , self.j) + + + +class FaultBlock(BaseCClass): + TYPE_NAME = "fault_block" + + _get_xc = EclPrototype("double fault_block_get_xc(fault_block)") + _get_yc = EclPrototype("double fault_block_get_yc(fault_block)") + _get_block_id = EclPrototype("int fault_block_get_id(fault_block)") + _get_size = EclPrototype("int fault_block_get_size(fault_block)") + _export_cell = EclPrototype("void fault_block_export_cell(fault_block , int , int* , int* , int* , double* , double* , double*)") + _assign_to_region = EclPrototype("void fault_block_assign_to_region(fault_block , int)") + _get_region_list = EclPrototype("int_vector_ref fault_block_get_region_list(fault_block)") + _add_cell = EclPrototype("void fault_block_add_cell(fault_block, int , int)") + _get_global_index_list = EclPrototype("int_vector_ref fault_block_get_global_index_list(fault_block)") + _trace_edge = EclPrototype("void fault_block_trace_edge( fault_block, double_vector , double_vector , int_vector)") + _get_neighbours = EclPrototype("void fault_block_list_neighbours( fault_block , bool , geo_polygon_collection , int_vector)") + _free = EclPrototype("void fault_block_free__(fault_block)") + + + def __init__(self , *args , **kwargs): + raise NotImplementedError("Class can not be instantiated directly!") + + + def __getitem__(self , index): + if isinstance(index, int): + if index < 0: + index += len(self) + + if 0 <= index < len(self): + x = ctypes.c_double() + y = ctypes.c_double() + z = ctypes.c_double() + + i = ctypes.c_int() + j = ctypes.c_int() + k = ctypes.c_int() + + self._export_cell( index , ctypes.byref(i) , ctypes.byref(j) , ctypes.byref(k) , ctypes.byref(x) , ctypes.byref(y) , ctypes.byref(z)) + return FaultBlockCell( i.value , j.value , k.value , x.value , y.value , z.value ) + else: + raise IndexError("Index:%d out of range: [0,%d)" % (index , len(self))) + else: + raise TypeError("Index:%s wrong type - integer expected") + + def __str__(self): + return "Block ID: %d" % self.getBlockID() + + + def __len__(self): + return self._get_size( ) + + def free(self): + self._free( ) + + def getCentroid(self): + xc = self._get_xc( ) + yc = self._get_yc( ) + return (xc,yc) + + + def countInside(self , polygon): + """ + Will count the number of points in block which are inside polygon. + """ + inside = 0 + for p in self: + if GeometryTools.pointInPolygon( (p.x , p.y) , polygon ): + inside += 1 + + return inside + + + def getBlockID(self): + return self._get_block_id( ) + + + def assignToRegion(self , region_id): + self._assign_to_region( region_id ) + + + def getRegionList(self): + regionList = self._get_region_list( ) + return regionList.copy() + + def addCell(self, i , j): + self._add_cell( i , j ) + + def getGlobalIndexList(self): + return self._get_global_index_list( ) + + + def getEdgePolygon(self): + x_list = DoubleVector() + y_list = DoubleVector() + cell_list = IntVector() + + self._trace_edge( x_list , y_list , cell_list ) + p = Polyline() + for (x,y) in zip(x_list , y_list): + p.addPoint(x,y) + return p + + + def containsPolyline(self, polyline): + """ + Will return true if at least one point from the polyline is inside the block. + """ + edge_polyline = self.getEdgePolygon() + for p in polyline: + if GeometryTools.pointInPolygon( p , edge_polyline ): + return True + else: + edge_polyline.assertClosed() + return GeometryTools.polylinesIntersect( edge_polyline , polyline ) + + + def getNeighbours(self, polylines = None , connected_only = True): + """ + Will return a list of FaultBlock instances which are in direct + contact with this block. + """ + neighbour_id_list = IntVector() + if polylines is None: + polylines = CPolylineCollection() + + self._get_neighbours( connected_only , polylines , neighbour_id_list ) + + parent_layer = self.getParentLayer() + neighbour_list = [] + for id in neighbour_id_list: + neighbour_list.append( parent_layer.getBlock( id )) + return neighbour_list + + + def getParentLayer(self): + return self.parent() diff --git a/ThirdParty/Ert/python/python/ecl/ecl/faults/fault_block_collection.py b/ThirdParty/Ert/python/python/ecl/ecl/faults/fault_block_collection.py new file mode 100644 index 0000000000..14b9d6d9ae --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/ecl/faults/fault_block_collection.py @@ -0,0 +1,74 @@ +# Copyright (C) 2014 Statoil ASA, Norway. +# +# The file 'fault_block_collection.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. + + +from cwrap import BaseCClass +from ecl.ecl import EclPrototype + + +class FaultBlockCollection(BaseCClass): + TYPE_NAME = "fault_block_collection" + _alloc = EclPrototype("void* fault_block_collection_alloc(ecl_grid)", bind = False) + _free = EclPrototype("void fault_block_collection_free(fault_block_collection)") + _num_layers = EclPrototype("int fault_block_collection_num_layers(fault_block_collection)") + _scan_keyword = EclPrototype("bool fault_block_collection_scan_kw(fault_block_collection, ecl_kw)") + _get_layer = EclPrototype("fault_block_layer_ref fault_block_collection_get_layer(fault_block_collection, int)") + + def __init__(self , grid): + c_ptr = self._alloc( grid ) + if c_ptr: + super(FaultBlockCollection, self).__init__(c_ptr) + else: + raise ValueError("Invalid input - failed to create FaultBlockCollection") + + # The underlying C implementation uses lazy evaluation and + # needs to hold on to the grid reference. We therefor take + # references to it here, to protect against premature garbage + # collection. + self.grid_ref = grid + + + def __len__(self): + return self._num_layers( ) + + + def __getitem__(self , index): + """ + @rtype: FaultBlockLayer + """ + if isinstance(index, int): + if 0 <= index < len(self): + return self._get_layer( index ).setParent(self) + else: + raise IndexError("Index:%d out of range [0,%d)" % (index , len(self))) + else: + raise TypeError("Index should be integer type") + + + def getLayer(self , k): + """ + @rtype: FaultBlockLayer + """ + return self[k] + + def free(self): + self._free( ) + + + def scanKeyword(self , fault_block_kw): + ok = self._scan_keyword( fault_block_kw ) + if not ok: + raise ValueError("The fault block keyword had wrong type/size") diff --git a/ThirdParty/Ert/python/python/ecl/ecl/faults/fault_block_layer.py b/ThirdParty/Ert/python/python/ecl/ecl/faults/fault_block_layer.py new file mode 100644 index 0000000000..d2c0b953ee --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/ecl/faults/fault_block_layer.py @@ -0,0 +1,205 @@ +# Copyright (C) 2014 Statoil ASA, Norway. +# +# The file 'fault_block_layer.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. + +from __future__ import print_function +from cwrap import BaseCClass +from ecl.ecl import EclDataType, EclPrototype +from ecl.ecl.faults import Fault + +class FaultBlockLayer(BaseCClass): + TYPE_NAME = "fault_block_layer" + _alloc = EclPrototype("void* fault_block_layer_alloc(ecl_grid , int)", bind = False) + _free = EclPrototype("void fault_block_layer_free(fault_block_layer)") + _size = EclPrototype("int fault_block_layer_get_size(fault_block_layer)") + _iget_block = EclPrototype("fault_block_ref fault_block_layer_iget_block(fault_block_layer, int)") + _add_block = EclPrototype("fault_block_ref fault_block_layer_add_block(fault_block_layer, int)") + _get_block = EclPrototype("fault_block_ref fault_block_layer_get_block(fault_block_layer, int)") + _del_block = EclPrototype("void fault_block_layer_del_block(fault_block_layer, int)") + _has_block = EclPrototype("bool fault_block_layer_has_block(fault_block_layer, int)") + _scan_keyword = EclPrototype("bool fault_block_layer_scan_kw(fault_block_layer, ecl_kw)") + _load_keyword = EclPrototype("bool fault_block_layer_load_kw(fault_block_layer, ecl_kw)") + _getK = EclPrototype("int fault_block_layer_get_k(fault_block_layer)") + _get_next_id = EclPrototype("int fault_block_layer_get_next_id(fault_block_layer)") + _scan_layer = EclPrototype("void fault_block_layer_scan_layer( fault_block_layer , layer)") + _insert_block_content = EclPrototype("void fault_block_layer_insert_block_content( fault_block_layer , fault_block)") + _export_kw = EclPrototype("bool fault_block_layer_export( fault_block_layer , ecl_kw )") + _get_layer = EclPrototype("layer_ref fault_block_layer_get_layer( fault_block_layer )") + + + def __init__(self , grid , k): + c_ptr = self._alloc( grid , k) + if c_ptr: + super(FaultBlockLayer, self).__init__(c_ptr) + else: + raise ValueError("Invalid input - failed to create FaultBlockLayer") + + # The underlying C implementation uses lazy evaluation and + # needs to hold on to the grid reference. We therefor take + # references to it here, to protect against premature garbage + # collection. + self.grid_ref = grid + + + def __len__(self): + return self._size() + + def __getitem__(self , index): + """ + @rtype: FaultBlock + """ + if isinstance(index, int): + if index < 0: + index += len(self) + + if 0 <= index < len(self): + return self._iget_block( index ).setParent(self) + else: + raise IndexError("Index:%d out of range: [0,%d)" % (index , len(self))) + elif isinstance(index,tuple): + i,j = index + if 0 <= i < self.grid_ref.getNX() and 0 <= j < self.grid_ref.getNY(): + geo_layer = self.getGeoLayer() + block_id = geo_layer[i,j] + if block_id == 0: + raise ValueError("No fault block defined for location (%d,%d)" % (i,j)) + else: + return self.getBlock( block_id ) + else: + raise IndexError("Invalid i,j : (%d,%d)" % (i,j)) + else: + raise TypeError("Index should be integer type") + + def __contains__(self , block_id): + return self._has_block( block_id) + + + def scanKeyword(self , fault_block_kw): + """ + Will reorder the block ids, and ensure single connectedness. Assign block_id to zero blocks. + """ + ok = self._scan_keyword( fault_block_kw ) + if not ok: + raise ValueError("The fault block keyword had wrong type/size: type:%s size:%d grid_size:%d" % (fault_block_kw.type_name , len(fault_block_kw) , self.grid_ref.getGlobalSize())) + + + def loadKeyword(self , fault_block_kw): + """ + Will load directly from keyword - without reorder; ignoring zero. + """ + ok = self._load_keyword( fault_block_kw ) + if not ok: + raise ValueError("The fault block keyword had wrong type/size: type:%s size:%d grid_size:%d" % (fault_block_kw.typeName() , len(fault_block_kw) , self.grid_ref.getGlobalSize())) + + + def getBlock(self , block_id): + """ + @rtype: FaultBlock + """ + if block_id in self: + return self._get_block(block_id).setParent(self) + else: + raise KeyError("No blocks with ID:%d in this layer" % block_id) + + + def deleteBlock(self , block_id): + if block_id in self: + self._del_block( block_id) + else: + raise KeyError("No blocks with ID:%d in this layer" % block_id) + + def addBlock(self , block_id = None): + if block_id is None: + block_id = self.getNextID() + + if block_id in self: + raise KeyError("Layer already contains block with ID:%s" % block_id) + else: + return self._add_block(block_id).setParent(self) + + def getNextID(self): + return self._get_next_id( ) + + + def getK(self): + return self._getK( ) + + + def free(self): + self._free( ) + + + def scanLayer( self , layer): + self._scan_layer( layer ) + + + def insertBlockContent(self , block): + self._insert_block_content( block ) + + def exportKeyword(self , kw): + if len(kw) != self.grid_ref.getGlobalSize(): + raise ValueError("The size of the target keyword must be equal to the size of the grid. Got:%d Expected:%d" % (len(kw) , self.grid_ref.getGlobalSize())) + + if not kw.data_type.is_int(): + raise TypeError("The target kewyord must be of integer type") + + self._export_kw( kw ) + + + def addFaultBarrier(self , fault , link_segments = False): + layer = self.getGeoLayer( ) + layer.addFaultBarrier( fault , self.getK() , link_segments ) + + + def addFaultLink(self , fault1 , fault2 ): + if not fault1.intersectsFault( fault2 , self.getK()): + layer = self.getGeoLayer() + layer.addIJBarrier( fault1.extendToFault( fault2 , self.getK() ) ) + + + def joinFaults(self , fault1 , fault2): + if not fault1.intersectsFault( fault2 , self.getK()): + layer = self.getGeoLayer() + try: + layer.addIJBarrier( Fault.joinFaults( fault1 , fault2 , self.getK()) ) + except ValueError: + print('Failed to join faults %s and %s' % (fault1.getName() , fault2.getName())) + raise ValueError("") + + + def addPolylineBarrier(self , polyline): + layer = self.getGeoLayer() + p0 = polyline[0] + c0 = self.grid_ref.findCellCornerXY( p0[0] , p0[1] , self.getK() ) + i,j = self.grid_ref.findCellXY( p0[0] , p0[1] , self.getK() ) + print('%g,%g -> %d,%d %d' % (p0[0] , p0[1] , i,j,c0)) + for index in range(1,len(polyline)): + p1 = polyline[index] + c1 = self.grid_ref.findCellCornerXY( p1[0] , p1[1] , self.getK() ) + i,j = self.grid_ref.findCellXY( p1[0] , p1[1] , self.getK() ) + layer.addInterpBarrier( c0 , c1 ) + print('%g,%g -> %d,%d %d' % (p1[0] , p1[1] , i,j,c1)) + print('Adding barrier %d -> %d' % (c0 , c1)) + c0 = c1 + + + def getGeoLayer(self): + """Returns the underlying geometric layer.""" + return self._get_layer( ) + + + def cellContact(self , p1 , p2): + layer = self.getGeoLayer() + return layer.cellContact(p1,p2) diff --git a/ThirdParty/Ert/python/python/ecl/ecl/faults/fault_collection.py b/ThirdParty/Ert/python/python/ecl/ecl/faults/fault_collection.py new file mode 100644 index 0000000000..ca180d7cc5 --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/ecl/faults/fault_collection.py @@ -0,0 +1,126 @@ +# Copyright (C) 2014 Statoil ASA, Norway. +# +# The file 'fault_collection.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. +import re + +from .fault import Fault +from ecl.ecl import EclGrid + +comment_regexp = re.compile("--.*") + +def dequote(s): + if s[0] in ["'", '"']: + if s[0] == s[-1]: + return s[1:-1] + else: + raise ValueError("Quote fuckup") + else: + return s + + +class FaultCollection(object): + def __init__(self, grid=None, *file_list): + self.__fault_list = [] + self.__fault_map = {} + self.__grid = grid + + if self.__grid is not None: + if not isinstance(self.__grid, EclGrid): + raise ValueError("When supplying a list of files to load - you must have a grid") + for file in file_list: + self.load(self.__grid, file) + + + def __contains__(self, fault_name): + return self.__fault_map.has_key(fault_name) + + + def __len__(self): + return len(self.__fault_list) + + + def __getitem__(self, index): + if isinstance(index, str): + return self.__fault_map[index] + elif isinstance(index, int): + return self.__fault_list[index] + else: + raise TypeError("Argument must be fault name or number") + + def __iter__(self): + return iter(self.__fault_list) + + + def getGrid(self): + return self.__grid + + + def getFault(self, name): + return self[name] + + + def hasFault(self, fault_name): + return fault_name in self + + + def addFault(self, fault): + self.__fault_map[fault.getName()] = fault + self.__fault_list.append(fault) + + + def splitLine(self, line): + tmp = line.split() + if not tmp[-1] == "/": + raise ValueError("Line:%s does not end with /" % line) + + if len(tmp) != 9: + raise ValueError("Line:%s not correct number of items" % line) + + fault_name = dequote(tmp[0]) + I1 = int(tmp[1]) - 1 + I2 = int(tmp[2]) - 1 + J1 = int(tmp[3]) - 1 + J2 = int(tmp[4]) - 1 + K1 = int(tmp[5]) - 1 + K2 = int(tmp[6]) - 1 + face = dequote(tmp[7]) + + return (fault_name, I1,I2,J1,J2,K1,K2, face) + + + + def loadFaults(self, grid, fileH): + for line in fileH: + line = comment_regexp.sub("", line) + line = line.strip() + if line == "/": + break + + if line: + (name, I1, I2, J1, J2, K1, K2, face) = self.splitLine(line) + if not self.hasFault(name): + fault = Fault(grid, name) + self.addFault(fault) + else: + fault = self.getFault(name) + + fault.addRecord(I1, I2, J1, J2, K1, K2, face) + + + def load(self, grid, file_name): + with open(file_name) as fileH: + for line in fileH: + if line.startswith("FAULTS"): + self.loadFaults(grid, fileH) diff --git a/ThirdParty/Ert/python/python/ert/ecl/faults/fault_line.py b/ThirdParty/Ert/python/python/ecl/ecl/faults/fault_line.py similarity index 99% rename from ThirdParty/Ert/python/python/ert/ecl/faults/fault_line.py rename to ThirdParty/Ert/python/python/ecl/ecl/faults/fault_line.py index 581f18fa15..e2ed3f9c26 100644 --- a/ThirdParty/Ert/python/python/ert/ecl/faults/fault_line.py +++ b/ThirdParty/Ert/python/python/ecl/ecl/faults/fault_line.py @@ -16,8 +16,8 @@ from __future__ import print_function import sys -from ert.util import DoubleVector,stat -from ert.geo import CPolyline +from ecl.util import DoubleVector,stat +from ecl.geo import CPolyline from .fault_segments import FaultSegment diff --git a/ThirdParty/Ert/python/python/ert/ecl/faults/fault_segments.py b/ThirdParty/Ert/python/python/ecl/ecl/faults/fault_segments.py similarity index 100% rename from ThirdParty/Ert/python/python/ert/ecl/faults/fault_segments.py rename to ThirdParty/Ert/python/python/ecl/ecl/faults/fault_segments.py diff --git a/ThirdParty/Ert/python/python/ecl/ecl/faults/layer.py b/ThirdParty/Ert/python/python/ecl/ecl/faults/layer.py new file mode 100644 index 0000000000..6b5a27ad51 --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/ecl/faults/layer.py @@ -0,0 +1,245 @@ +# Copyright (C) 2014 Statoil ASA, Norway. +# +# The file 'layer.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. + +import ctypes +from cwrap import BaseCClass +from ecl.ecl import EclPrototype +from ecl.util import IntVector + + +class Layer(BaseCClass): + TYPE_NAME = "layer" + _alloc = EclPrototype("void* layer_alloc(int, int)", bind = False) + _copy = EclPrototype("void layer_memcpy(layer , layer)") + _free = EclPrototype("void layer_free(layer)") + _get_nx = EclPrototype("int layer_get_nx(layer)") + _get_ny = EclPrototype("int layer_get_ny(layer)") + _set_cell = EclPrototype("void layer_iset_cell_value(layer , int , int , int)") + _get_cell = EclPrototype("int layer_iget_cell_value(layer , int , int )") + _get_bottom_barrier = EclPrototype("bool layer_iget_bottom_barrier(layer , int , int )") + _get_left_barrier = EclPrototype("bool layer_iget_left_barrier(layer , int , int )") + _cell_contact = EclPrototype("bool layer_cell_contact(layer , int , int , int , int)") + _add_barrier = EclPrototype("void layer_add_barrier(layer , int , int)") + _add_ijbarrier = EclPrototype("void layer_add_ijbarrier(layer , int , int, int , int)") + _add_interp_barrier = EclPrototype("void layer_add_interp_barrier(layer , int , int)") + _clear_cells = EclPrototype("void layer_clear_cells(layer)") + _assign = EclPrototype("void layer_assign(layer , int)") + _cell_sum = EclPrototype("int layer_get_cell_sum(layer)") + _update_connected = EclPrototype("void layer_update_connected_cells(layer,int,int,int,int)") + _cells_equal = EclPrototype("void layer_cells_equal( layer, int,int_vector,int_vector)") + _count_equal = EclPrototype("int layer_count_equal( layer, int)") + _active_cell = EclPrototype("bool layer_iget_active( layer, int,int)") + _update_active = EclPrototype("bool layer_update_active( layer, ecl_grid , int)") + + def __init__(self , nx , ny): + c_ptr = self._alloc( nx , ny ) + if c_ptr: + super( Layer , self ).__init__(c_ptr) + else: + raise ValueError("Invalid input - no Layer object created") + + @classmethod + def copy(cls , src): + layer = Layer( src.getNX() , src.getNY()) + layer._copy( layer , src ) + return layer + + + def __assertIJ(self , i,j): + if i < 0 or i >= self.getNX(): + raise ValueError("Invalid layer i:%d" % i) + + if j < 0 or j >= self.getNY(): + raise ValueError("Invalid layer j:%d" % j) + + + def __unpackIndex(self , index): + try: + (i,j) = index + except TypeError: + raise ValueError("Index:%s is invalid - must have two integers" % str(index)) + + self.__assertIJ(i,j) + + return (i,j) + + + def __setitem__(self , index , value): + (i,j) = self.__unpackIndex(index) + self._set_cell( i , j , value ) + + def activeCell(self , i,j): + self.__assertIJ(i,j) + return self._active_cell( i , j ) + + + def updateActive(self , grid , k): + if grid.getNX() != self.getNX(): + raise ValueError("NX dimension mismatch. Grid:%d layer:%d" % (grid.getNX() , self.getNX())) + + if grid.getNY() != self.getNY(): + raise ValueError("NY dimension mismatch. Grid:%d layer:%d" % (grid.getNY() , self.getNY())) + + if k >= grid.getNZ(): + raise ValueError("K value invalid: Grid range [0,%d)" % grid.getNZ()) + + self._update_active( grid , k ) + + + def __getitem__(self , index): + (i,j) = self.__unpackIndex(index) + return self._get_cell( i , j ) + + def bottomBarrier(self , i,j): + self.__assertIJ(i,j) + return self._get_bottom_barrier( i , j ) + + def leftBarrier(self , i,j): + self.__assertIJ(i,j) + return self._get_left_barrier( i , j ) + + def getNX(self): + return self._get_nx( ) + + def getNY(self): + return self._get_ny( ) + + def free(self): + self._free( ) + + def cellContact(self , p1 , p2): + i1,j1 = p1 + i2,j2 = p2 + + if not 0 <= i1 < self.getNX(): + raise IndexError("Invalid i1:%d" % i1) + + if not 0 <= i2 < self.getNX(): + raise IndexError("Invalid i2:%d" % i2) + + if not 0 <= j1 < self.getNY(): + raise IndexError("Invalid i1:%d" % j1) + + if not 0 <= j2 < self.getNY(): + raise IndexError("Invalid i2:%d" % j2) + + return self._cell_contact( i1, j1, i2, j2 ) + + + def addInterpBarrier(self , c1 , c2): + self._add_interp_barrier( c1 , c2 ) + + + def addPolylineBarrier(self , polyline , grid , k): + if len(polyline) > 1: + for i in range(len(polyline) - 1): + x1,y1 = polyline[i] + x2,y2 = polyline[i + 1] + + c1 = grid.findCellCornerXY( x1 , y1 , k ) + c2 = grid.findCellCornerXY( x2 , y2 , k ) + + self.addInterpBarrier( c1 , c2 ) + + + def addFaultBarrier(self , fault , K , link_segments = True ): + fault_layer = fault[K] + num_lines = len(fault_layer) + for index , fault_line in enumerate(fault_layer): + for segment in fault_line: + c1 , c2 = segment.getCorners() + self._add_barrier( c1 , c2 ) + + if index < num_lines - 1: + next_line = fault_layer[index + 1] + next_segment = next_line[0] + next_c1 , next_c2 = next_segment.getCorners() + + if link_segments: + self.addInterpBarrier( c2 , next_c1 ) + + + def addIJBarrier(self , ij_list): + if len(ij_list) < 2: + raise ValueError("Must have at least two (i,j) points") + + nx = self.getNX() + ny = self.getNY() + p1 = ij_list[0] + i1,j1 = p1 + for p2 in ij_list[1:]: + i2,j2 = p2 + if i1 == i2 or j1 == j2: + if not 0 <= i2 <= nx: + raise ValueError("i value:%d invalid. Valid range: [0,%d] " % (i1 , i2)) + + if not 0 <= j2 <= ny: + raise ValueError("i value:%d invalid. Valid range: [0,%d] " % (j1 , j2)) + + self._add_ijbarrier( i1 , j1 , i2 , j2 ) + p1 = p2 + i1,j1 = p1 + else: + raise ValueError("Must have i1 == i2 or j1 == j2") + + + def cellSum(self): + return self._cell_sum( ) + + def clearCells(self): + """ + Will reset all cell and edge values to zero. Barriers will be left + unchanged. + """ + self._clear_cells( ) + + + def assign(self , value): + """ + Will set the cell value to @value in all cells. Barriers will not be changed + """ + self._assign( value ) + + def updateConnected(self , ij , new_value , org_value = None): + """ + Will update cell value of all cells in contact with cell ij to the + value @new_value. If org_value is not supplied, the current + value in cell ij is used. + """ + if org_value is None: + org_value = self[ij] + + if self[ij] == org_value: + self._update_connected( ij[0] , ij[1] , org_value , new_value ) + else: + raise ValueError("Cell %s is not equal to %d \n" % (ij , org_value)) + + + def cellsEqual(self , value): + """ + Will return a list [(i1,j1),(i2,j2) , ...(in,jn)] of all cells with value @value. + """ + i_list = IntVector() + j_list = IntVector() + self._cells_equal( value , i_list , j_list ) + ij_list= [] + for (i,j) in zip(i_list , j_list): + ij_list.append( (i,j) ) + return ij_list + + + def countEqual(self , value): + return self._count_equal( value ) diff --git a/ThirdParty/Ert/python/python/ert/ecl/fortio.py b/ThirdParty/Ert/python/python/ecl/ecl/fortio.py similarity index 78% rename from ThirdParty/Ert/python/python/ert/ecl/fortio.py rename to ThirdParty/Ert/python/python/ecl/ecl/fortio.py index 5929d126c2..3acd2f43ce 100644 --- a/ThirdParty/Ert/python/python/ert/ecl/fortio.py +++ b/ThirdParty/Ert/python/python/ecl/ecl/fortio.py @@ -40,7 +40,7 @@ import os import sys from cwrap import BaseCClass -from ert.ecl import EclPrototype +from ecl.ecl import EclPrototype class FortIO(BaseCClass): @@ -51,17 +51,17 @@ class FortIO(BaseCClass): READ_AND_WRITE_MODE = 3 APPEND_MODE = 4 - _open_reader = EclPrototype("void* fortio_open_reader(char*, bool, bool)" , bind = False) - _open_writer = EclPrototype("void* fortio_open_writer(char*, bool, bool)" , bind = False) - _open_readwrite = EclPrototype("void* fortio_open_readwrite(char*, bool, bool)" , bind = False) - _open_append = EclPrototype("void* fortio_open_append(char*, bool, bool)" , bind = False) - _guess_fortran = EclPrototype("bool fortio_looks_like_fortran_file(char* , bool)" , bind = False) + _open_reader = EclPrototype("void* fortio_open_reader(char*, bool, bool)", bind=False) + _open_writer = EclPrototype("void* fortio_open_writer(char*, bool, bool)", bind=False) + _open_readwrite = EclPrototype("void* fortio_open_readwrite(char*, bool, bool)", bind=False) + _open_append = EclPrototype("void* fortio_open_append(char*, bool, bool)", bind=False) + _guess_fortran = EclPrototype("bool fortio_looks_like_fortran_file(char*, bool)", bind=False) _write_record = EclPrototype("void fortio_fwrite_record(fortio, char*, int)") _get_position = EclPrototype("long fortio_ftell(fortio)") _seek = EclPrototype("void fortio_fseek(fortio, long, int)") _close = EclPrototype("bool fortio_fclose(fortio)") - _truncate = EclPrototype("bool fortio_ftruncate(fortio , long)") + _truncate = EclPrototype("bool fortio_ftruncate(fortio, long)") _filename = EclPrototype("char* fortio_filename_ref(fortio)") @@ -85,14 +85,14 @@ def __init__(self, file_name, mode=READ_MODE, fmt_file=False, endian_flip_header all the pressure keywords to another file: import sys - from ert.ecl import FortIO,ElcFile + from ecl.ecl import FortIO, EclFile rst_file = EclFile(sys.argv[1]) - fortio = FortIO( "PRESSURE" , mode=FortIO.WRITE_MODE) + fortio = FortIO("PRESSURE", mode=FortIO.WRITE_MODE) for kw in rst_file: if kw.name() == "PRESSURE": - kw.write( fortio ) + kw.write(fortio) fortio.close() @@ -100,10 +100,9 @@ def __init__(self, file_name, mode=READ_MODE, fmt_file=False, endian_flip_header method based on a context manager and the with statement. """ - if mode == FortIO.READ_MODE or mode == FortIO.APPEND_MODE or mode == FortIO.READ_AND_WRITE_MODE: - if not os.path.exists(file_name): - raise IOError("File '%s' does not exist!" % file_name) - + read_modes = (FortIO.READ_MODE, FortIO.APPEND_MODE, FortIO.READ_AND_WRITE_MODE) + if mode in read_modes and not os.path.exists(file_name): + raise IOError('No such file "%s".' % file_name) if mode == FortIO.READ_MODE: c_pointer = self._open_reader(file_name, fmt_file, endian_flip_header) elif mode == FortIO.WRITE_MODE: @@ -116,48 +115,49 @@ def __init__(self, file_name, mode=READ_MODE, fmt_file=False, endian_flip_header raise UserWarning("Unknown mode: %d" % mode) self.__mode = mode - + if not c_pointer: + raise IOError('Failed to open FortIO file "%s".' % file_name) super(FortIO, self).__init__(c_pointer) def close(self): if self: - self._close( ) - self._invalidateCPointer( ) + self._close() + self._invalidateCPointer() def getPosition(self): """ @rtype: long """ - return self._get_position( ) + return self._get_position() - def truncate(self , size = None): + def truncate(self, size=None): """Will truncate the file to new size. If the method is called without a size argument the stream will be truncated to the current position. """ if size is None: - size = self.getPosition( ) + size = self.getPosition() - if not self._truncate( size ): - raise IOError("Truncate of fortran filehandle:%s failed" % self.filename() ) + if not self._truncate(size): + raise IOError("Truncate of fortran filehandle:%s failed" % self.filename()) def filename(self): - return self._filename( ) + return self._filename() - def seek(self, position , whence = 0): + def seek(self, position, whence=0): # SEEK_SET = 0 # SEEK_CUR = 1 # SEEK_END = 2 - self._seek(position , whence) + self._seek(position, whence) @classmethod - def isFortranFile(cls , filename , endian_flip = True): + def isFortranFile(cls, filename, endian_flip=True): """@rtype: bool @type filename: str @@ -167,7 +167,7 @@ def isFortranFile(cls , filename , endian_flip = True): file written in fortran style. ASCII files will return false, even if they are structured as ECLIPSE keywords. """ - return cls._guess_fortran( filename , endian_flip ) + return cls._guess_fortran(filename, endian_flip) def free(self): @@ -176,7 +176,7 @@ def free(self): class FortIOContextManager(object): - def __init__(self , fortio): + def __init__(self, fortio): self.__fortio = fortio def __enter__(self): @@ -184,29 +184,24 @@ def __enter__(self): def __exit__(self, exc_type, exc_val, exc_tb): self.__fortio.close() - return False + return exc_type is not None -def openFortIO( file_name , mode = FortIO.READ_MODE , fmt_file = False , endian_flip_header = True): +def openFortIO(file_name, mode=FortIO.READ_MODE, fmt_file=False, endian_flip_header=True): """Will create FortIO based context manager for use with with. The with: statement and context managers is a good alternative in the situation where you need to ensure resource cleanup. import sys - from ert.ecl import FortIO,ElcFile + from ecl.ecl import FortIO, EclFile rst_file = EclFile(sys.argv[1]) - with openFortIO( "PRESSURE" , mode = FortIO.WRITE_MODE) as fortio: + with openFortIO("PRESSURE", mode=FortIO.WRITE_MODE) as fortio: for kw in rst_file: if kw.name() == "PRESSURE": - kw.write( fortio ) + kw.write(fortio) """ - return FortIOContextManager( FortIO( file_name , mode = mode , fmt_file = fmt_file , endian_flip_header = endian_flip_header )) - - - - - - + return FortIOContextManager(FortIO(file_name, mode=mode, fmt_file=fmt_file, + endian_flip_header=endian_flip_header)) diff --git a/ThirdParty/Ert/python/python/ert/ecl/local.cmake b/ThirdParty/Ert/python/python/ecl/ecl/local.cmake similarity index 81% rename from ThirdParty/Ert/python/python/ert/ecl/local.cmake rename to ThirdParty/Ert/python/python/ecl/ecl/local.cmake index 2eb2643d73..f2431a2a7a 100644 --- a/ThirdParty/Ert/python/python/ert/ecl/local.cmake +++ b/ThirdParty/Ert/python/python/ecl/ecl/local.cmake @@ -9,5 +9,5 @@ if (EXISTS ${ECL_LOCAL_TARGET}) endif() if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ecl_local.py") - add_python_package( "Python ert.ecl.ecl_local" ${PYTHON_INSTALL_PREFIX}/ert/ecl "ecl_local.py" True) -endif() \ No newline at end of file + add_python_package( "Python ecl.ecl.ecl_local" ${PYTHON_INSTALL_PREFIX}/ecl/ecl "ecl_local.py" True) +endif() diff --git a/ThirdParty/Ert/python/python/ecl/ecl/rft/CMakeLists.txt b/ThirdParty/Ert/python/python/ecl/ecl/rft/CMakeLists.txt new file mode 100644 index 0000000000..d41bccb489 --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/ecl/rft/CMakeLists.txt @@ -0,0 +1,6 @@ +set(PYTHON_SOURCES + __init__.py + well_trajectory.py +) + +add_python_package("python.ecl.ecl.rft" ${PYTHON_INSTALL_PREFIX}/ecl/ecl/rft "${PYTHON_SOURCES}" True) diff --git a/ThirdParty/Ert/python/python/ert/ecl/rft/__init__.py b/ThirdParty/Ert/python/python/ecl/ecl/rft/__init__.py similarity index 100% rename from ThirdParty/Ert/python/python/ert/ecl/rft/__init__.py rename to ThirdParty/Ert/python/python/ecl/ecl/rft/__init__.py diff --git a/ThirdParty/Ert/python/python/ert/ecl/rft/well_trajectory.py b/ThirdParty/Ert/python/python/ecl/ecl/rft/well_trajectory.py similarity index 100% rename from ThirdParty/Ert/python/python/ert/ecl/rft/well_trajectory.py rename to ThirdParty/Ert/python/python/ecl/ecl/rft/well_trajectory.py diff --git a/ThirdParty/Ert/python/python/ert/ert_lib_info_build.py.in b/ThirdParty/Ert/python/python/ecl/ecl_lib_info_build.py.in similarity index 100% rename from ThirdParty/Ert/python/python/ert/ert_lib_info_build.py.in rename to ThirdParty/Ert/python/python/ecl/ecl_lib_info_build.py.in diff --git a/ThirdParty/Ert/python/python/ert/ert_lib_info_install.py.in b/ThirdParty/Ert/python/python/ecl/ecl_lib_info_install.py.in similarity index 100% rename from ThirdParty/Ert/python/python/ert/ert_lib_info_install.py.in rename to ThirdParty/Ert/python/python/ecl/ecl_lib_info_install.py.in diff --git a/ThirdParty/Ert/python/python/ecl/geo/CMakeLists.txt b/ThirdParty/Ert/python/python/ecl/geo/CMakeLists.txt new file mode 100644 index 0000000000..563a73db75 --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/geo/CMakeLists.txt @@ -0,0 +1,13 @@ +set(PYTHON_SOURCES + __init__.py + cpolyline.py + cpolyline_collection.py + geometry_tools.py + geo_pointset.py + geo_region.py + polyline.py + xyz_io.py + surface.py +) + +add_python_package("python.ecl.geo" ${PYTHON_INSTALL_PREFIX}/ecl/geo "${PYTHON_SOURCES}" True) diff --git a/ThirdParty/Ert/python/python/ecl/geo/__init__.py b/ThirdParty/Ert/python/python/ecl/geo/__init__.py new file mode 100644 index 0000000000..6818408383 --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/geo/__init__.py @@ -0,0 +1,37 @@ +# Copyright (C) 2011 Statoil ASA, Norway. +# +# The file '__init__.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. +""" +Simple package for working with 2D geometry. + +""" +import ecl +from cwrap import Prototype + +class GeoPrototype(Prototype): + lib = ecl.load("libert_geometry") + + def __init__(self, prototype, bind=True): + super(GeoPrototype, self).__init__(GeoPrototype.lib, prototype, bind=bind) + + +from .geo_pointset import GeoPointset +from .geo_region import GeoRegion +from .cpolyline import CPolyline +from .cpolyline_collection import CPolylineCollection +from .polyline import Polyline +from .xyz_io import XYZIo +from .geometry_tools import GeometryTools +from .surface import Surface diff --git a/ThirdParty/Ert/python/python/ert/geo/cpolyline.py b/ThirdParty/Ert/python/python/ecl/geo/cpolyline.py similarity index 97% rename from ThirdParty/Ert/python/python/ert/geo/cpolyline.py rename to ThirdParty/Ert/python/python/ecl/geo/cpolyline.py index 54067dadc0..4014059ed8 100644 --- a/ThirdParty/Ert/python/python/ert/geo/cpolyline.py +++ b/ThirdParty/Ert/python/python/ecl/geo/cpolyline.py @@ -19,8 +19,8 @@ import ctypes import os.path -from cwrap import BaseCClass, CWrapper -from ert.geo import GeoPrototype +from cwrap import BaseCClass +from ecl.geo import GeoPrototype from .geometry_tools import GeometryTools @@ -41,7 +41,7 @@ class CPolyline(BaseCClass): _equal = GeoPrototype("bool geo_polygon_equal( geo_polygon , geo_polygon )") - def __init__(self, name = None , init_points = []): + def __init__(self, name = None , init_points = ()): c_ptr = self._alloc_new( name ) super(CPolyline , self).__init__( c_ptr ) for (xc, yc) in init_points: diff --git a/ThirdParty/Ert/python/python/ert/geo/cpolyline_collection.py b/ThirdParty/Ert/python/python/ecl/geo/cpolyline_collection.py similarity index 96% rename from ThirdParty/Ert/python/python/ert/geo/cpolyline_collection.py rename to ThirdParty/Ert/python/python/ecl/geo/cpolyline_collection.py index d787bcda6e..b93f5596d9 100644 --- a/ThirdParty/Ert/python/python/ert/geo/cpolyline_collection.py +++ b/ThirdParty/Ert/python/python/ecl/geo/cpolyline_collection.py @@ -18,8 +18,8 @@ """ import ctypes -from cwrap import BaseCClass, CWrapper -from ert.geo import GeoPrototype, CPolyline +from cwrap import BaseCClass +from ecl.geo import GeoPrototype, CPolyline class CPolylineCollection(BaseCClass): @@ -35,21 +35,21 @@ class CPolylineCollection(BaseCClass): _add_polyline = GeoPrototype("void geo_polygon_collection_add_polygon(geo_polygon_collection , geo_polygon , bool)") - + def __init__(self): c_ptr = self._alloc_new( ) super(CPolylineCollection , self).__init__( c_ptr ) self.parent_ref = None - + def __contains__(self , name): return self._has_polyline(name) - + def __len__(self): return self._size( ) - + def __iter__(self): index = 0 @@ -62,7 +62,7 @@ def __getitem__(self , index): if isinstance(index , int): if index < 0: index += len(self) - + if 0 <= index < len(self): return self._iget( index).setParent( self ) else: @@ -85,7 +85,7 @@ def shallowCopy(self): # all the polyline objects does not go out of scope. copy.parent_ref = self return copy - + def addPolyline(self , polyline , name = None): @@ -94,7 +94,7 @@ def addPolyline(self , polyline , name = None): else: if not name is None: raise ValueError("The name keyword argument can only be supplied when add not CPOlyline object") - + name = polyline.getName() if name and name in self: raise KeyError("The polyline collection already has an object:%s" % name) @@ -110,7 +110,7 @@ def addPolyline(self , polyline , name = None): def createPolyline(self , name = None): if name and name in self: raise KeyError("The polyline collection already has an object:%s" % name) - + polyline = self._create_polyline(name) polyline.setParent( parent = self ) return polyline @@ -118,5 +118,3 @@ def createPolyline(self , name = None): def free(self): self._free( ) - - diff --git a/ThirdParty/Ert/python/python/ecl/geo/geo_pointset.py b/ThirdParty/Ert/python/python/ecl/geo/geo_pointset.py new file mode 100644 index 0000000000..ff9fa3b2ec --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/geo/geo_pointset.py @@ -0,0 +1,79 @@ +# Copyright (C) 2017 Statoil ASA, Norway. +# +# This file is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. +from cwrap import BaseCClass +from ecl.geo import GeoPrototype + +class GeoPointset(BaseCClass): + TYPE_NAME = "geo_pointset" + + _alloc = GeoPrototype("void* geo_pointset_alloc(bool)", bind=False) + _free = GeoPrototype("void geo_pointset_free(geo_pointset)") + #_add_xyz = GeoPrototype("void geo_pointset_add_xyz(geo_pointset, double, double, double)") + _get_size = GeoPrototype("int geo_pointset_get_size(geo_pointset)") + #_iget_xy = GeoPrototype("void geo_pointset_iget_xy(geo_pointset, int, double*, double*)") + #_get_zcoord = GeoPrototype("double* geo_pointset_get_zcoord(geo_pointset)") + _equal = GeoPrototype("bool geo_pointset_equal(geo_pointset, geo_pointset)") + _iget_z = GeoPrototype("double geo_pointset_iget_z(geo_pointset, int)") + #_iset_z = GeoPrototype("void geo_pointset_iset_z(geo_pointset, int, double)") + #_memcpy = GeoPrototype("void geo_pointset_memcpy(geo_pointset, geo_pointset, bool)") + #_shift_z = GeoPrototype("void geo_pointset_shift_z(geo_pointset, double)") + #_assign_z = GeoPrototype("void geo_pointset_assign_z(geo_pointset, double)") + #_scale_z = GeoPrototype("void geo_pointset_scale_z(geo_pointset, double)") + #_imul = GeoPrototype("void geo_pointset_imul(geo_pointset, geo_pointset)") + #_iadd = GeoPrototype("void geo_pointset_iadd(geo_pointset, geo_pointset)") + #_isub = GeoPrototype("void geo_pointset_isub(geo_pointset, geo_pointset)") + #_isqrt = GeoPrototype("void geo_pointset_isqrt(geo_pointset)") + + + def __init__(self, external_z=False): + c_ptr = self._alloc(external_z) + if c_ptr: + super(GeoPointset, self).__init__(c_ptr) + else: + ext = 'external' if external_z else 'internal' + raise ValueError('Failed to construct GeoPointset with %s_z.' % ext) + + @staticmethod + def fromSurface(surface): + return surface.getPointset() + + def __eq__(self, other): + if isinstance(other, GeoPointset): + return self._equal(other) + return NotImplemented + + def __getitem__(self, key): + size = len(self) + if isinstance(key, int): + idx = key + if idx < 0: + idx += size + if 0 <= idx < size: + return self._iget_z(idx) + else: + raise IndexError('Invalid index, must be in [0, %d), was: %d.' % (size, key)) + else: + # TODO implement slicing? + raise ValueError('Index must be int, not %s.' % type(key)) + + def __len__(self): + return self._get_size() + + def __repr__(self): + return self._create_repr('len=%d' % len(self)) + + def free(self): + self._free() diff --git a/ThirdParty/Ert/python/python/ecl/geo/geo_region.py b/ThirdParty/Ert/python/python/ecl/geo/geo_region.py new file mode 100644 index 0000000000..a4238d8650 --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/geo/geo_region.py @@ -0,0 +1,121 @@ +# Copyright (C) 2017 Statoil ASA, Norway. +# +# This file is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. +from cwrap import BaseCClass +from ecl.util import IntVector +from ecl.geo import GeoPrototype +from .cpolyline import CPolyline +from ctypes import c_double + +cpair = c_double * 2 # this is a function that maps two doubles to a double* + +class GeoRegion(BaseCClass): + TYPE_NAME = "geo_region" + + _alloc = GeoPrototype("void* geo_region_alloc(geo_pointset, bool)", bind=False) + _free = GeoPrototype("void geo_region_free(geo_region)") + _reset = GeoPrototype("void geo_region_reset(geo_region)") + _get_index_list = GeoPrototype("int_vector_ref geo_region_get_index_list(geo_region)") + _select_inside_polygon = GeoPrototype("void geo_region_select_inside_polygon(geo_region, geo_polygon)") + _select_outside_polygon = GeoPrototype("void geo_region_select_outside_polygon(geo_region, geo_polygon)") + _deselect_inside_polygon = GeoPrototype("void geo_region_deselect_inside_polygon(geo_region, geo_polygon)") + _deselect_outside_polygon = GeoPrototype("void geo_region_deselect_outside_polygon(geo_region, geo_polygon)") + _select_above_line = GeoPrototype("void geo_region_select_above_line(geo_region, double*, double*)") + _select_below_line = GeoPrototype("void geo_region_select_below_line(geo_region, double*, double*)") + _deselect_above_line = GeoPrototype("void geo_region_deselect_above_line(geo_region, double*, double*)") + _deselect_below_line = GeoPrototype("void geo_region_deselect_below_line(geo_region, double*, double*)") + + + def __init__(self, pointset, preselect=False): + self._preselect = True if preselect else False + c_ptr = self._alloc(pointset, self._preselect) + if c_ptr: + super(GeoRegion, self).__init__(c_ptr) + else: + raise ValueError('Could not construct GeoRegion from pointset %s.' % pointset) + + + def getActiveList(self): + return self._get_index_list() + + def _assert_polygon(self, polygon): + if not isinstance(polygon, CPolyline): + raise ValueError('Need to select with a CPolyline, not %s.' + % type(polygon)) + + + def _construct_cline(self, line): + """Takes a line ((x1,y1), (x2,y2)) and returns two double[2]* but + reordered to (x1x2, y1y2). + """ + try: + p1, p2 = line + x1, y1 = map(float, p1) + x2, y2 = map(float, p2) + except Exception as err: + err_msg = 'Select with pair ((x1,y1), (x2,y2)), not %s (%s).' + raise ValueError(err_msg % (line, err)) + x1x2_ptr = cpair(x1, x2) + y1y2_ptr = cpair(y1, y2) + return x1x2_ptr, y1y2_ptr + + + def select_inside(self, polygon): + self._assert_polygon(polygon) + self._select_inside_polygon(polygon) + + def select_outside(self, polygon): + self._assert_polygon(polygon) + self._select_outside_polygon(polygon) + + def deselect_inside(self, polygon): + self._assert_polygon(polygon) + self._deselect_inside_polygon(polygon) + + def deselect_outside(self, polygon): + self._assert_polygon(polygon) + self._deselect_outside_polygon(polygon) + + + def select_above(self, line): + x_ptr, y_ptr = self._construct_cline(line) + self._select_above_line(x_ptr, y_ptr) + + def select_below(self, line): + x_ptr, y_ptr = self._construct_cline(line) + self._select_below_line(x_ptr, y_ptr) + + def deselect_above(self, line): + x_ptr, y_ptr = self._construct_cline(line) + self._deselect_above_line(x_ptr, y_ptr) + + def deselect_below(self, line): + x_ptr, y_ptr = self._construct_cline(line) + self._deselect_below_line(x_ptr, y_ptr) + + + def __len__(self): + """Returns the size of the active list, not the size of the + underlying pointset""" + return len(self._get_index_list()) + + def __repr__(self): + ls = len(self) + il = repr(self.getActiveList()) + pres = 'preselected' if self._preselect else 'not preselected' + return self._create_repr('size=%d, active_list=<%s>, %s' % (ls, il, pres)) + + def free(self): + self._free() diff --git a/ThirdParty/Ert/python/python/ert/geo/geometry_tools.py b/ThirdParty/Ert/python/python/ecl/geo/geometry_tools.py similarity index 100% rename from ThirdParty/Ert/python/python/ert/geo/geometry_tools.py rename to ThirdParty/Ert/python/python/ecl/geo/geometry_tools.py diff --git a/ThirdParty/Ert/python/python/ert/geo/polyline.py b/ThirdParty/Ert/python/python/ecl/geo/polyline.py similarity index 100% rename from ThirdParty/Ert/python/python/ert/geo/polyline.py rename to ThirdParty/Ert/python/python/ecl/geo/polyline.py diff --git a/ThirdParty/Ert/python/python/ecl/geo/surface.py b/ThirdParty/Ert/python/python/ecl/geo/surface.py new file mode 100644 index 0000000000..6dfeae9b9a --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/geo/surface.py @@ -0,0 +1,285 @@ +# Copyright (C) 2016 Statoil ASA, Norway. +# +# The file 'surface' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. +""" +Create a polygon +""" +import os.path +import ctypes +from numpy import zeros + +from cwrap import BaseCClass +from ecl.geo import GeoPrototype +from ecl.geo import GeoPointset + +class Surface(BaseCClass): + TYPE_NAME = "surface" + + _alloc = GeoPrototype("void* geo_surface_fload_alloc_irap( char* , bool )" , bind = False) + _free = GeoPrototype("void geo_surface_free( surface )") + _new = GeoPrototype("void* geo_surface_alloc_new( int, int, double, double, double, double, double )", bind = False) + _get_nx = GeoPrototype("int geo_surface_get_nx( surface )") + _get_ny = GeoPrototype("int geo_surface_get_ny( surface )") + _iget_zvalue = GeoPrototype("double geo_surface_iget_zvalue( surface , int)") + _iset_zvalue = GeoPrototype("void geo_surface_iset_zvalue( surface , int , double)") + _write = GeoPrototype("void geo_surface_fprintf_irap( surface , char* )") + _equal = GeoPrototype("bool geo_surface_equal( surface , surface )") + _header_equal = GeoPrototype("bool geo_surface_equal_header( surface , surface )") + _copy = GeoPrototype("surface_obj geo_surface_alloc_copy( surface , bool )") + _assign = GeoPrototype("void geo_surface_assign_value( surface , double )") + _scale = GeoPrototype("void geo_surface_scale( surface , double )") + _shift = GeoPrototype("void geo_surface_shift( surface , double )") + _iadd = GeoPrototype("void geo_surface_iadd( surface , surface )") + _imul = GeoPrototype("void geo_surface_imul( surface , surface )") + _isub = GeoPrototype("void geo_surface_isub( surface , surface )") + _isqrt = GeoPrototype("void geo_surface_isqrt( surface )") + _iget_xy = GeoPrototype("void geo_surface_iget_xy(surface, int, double*, double*)") + _get_pointset = GeoPrototype("geo_pointset_ref geo_surface_get_pointset(surface)") + + + def __init__(self, filename=None, nx=None, ny=None, xinc=None, yinc=None, + xstart=None, ystart=None, angle=None): + """ + This will load a irap surface from file. The surface should + consist of a header and a set z values. + """ + if filename is not None: + filename = str(filename) + if os.path.isfile( filename ): + c_ptr = self._alloc(filename , True) + super(Surface , self).__init__(c_ptr) + else: + raise IOError('No such file "%s".' % filename) + else: + s_args = [nx, ny, xinc, yinc, xstart, ystart, angle] + if None in s_args: + raise ValueError('Missing argument for creating surface, all values must be set, was: %s' % str(s_args)) + c_ptr = self._new(*s_args) + super(Surface , self).__init__(c_ptr) + + def __eq__(self , other): + """ + Compares two Surface instances, both header and data must be equal + to compare as equal. + """ + if isinstance( other , Surface): + return self._equal(other) + else: + return False + + + def headerEqual(self , other): + return self._header_equal( other) + + + def __iadd__(self , other): + if isinstance(other , Surface): + if self.headerEqual(other): + self._iadd(other) + else: + raise ValueError("Tried to add incompatible surfaces") + else: + self._shift(other) + return self + + + def __isub__(self , other): + if isinstance(other , Surface): + if self.headerEqual(other): + self._isub(other) + else: + raise ValueError("Tried to subtract incompatible surfaces") + else: + self._shift( -other) + return self + + + def __imul__(self , other): + if isinstance(other , Surface): + if self.headerEqual(other): + self._imul( other) + else: + raise ValueError("Tried to add multiply ncompatible surfaces") + else: + self._scale( other) + return self + + + def __idiv__(self , other): + self._scale( 1.0/other) + return self + + + def __add__(self , other): + copy = self.copy() + copy += other + return copy + + + def __mul__(self , other): + copy = self.copy() + copy *= other + return copy + + + def __sub__(self , other): + copy = self.copy() + copy -= other + return copy + + + def __div__(self , other): + copy = self.copy() + copy /= other + return copy + + + def __len__(self): + """ + The number of values in the surface. + """ + return self.getNX() * self.getNY() + + + def inplaceSqrt(self): + """ + Will do an inplace sqrt operation. + """ + self._isqrt( ) + return self + + + def sqrt(self): + """ + Will return a new surface where all elements have been sqrt{ .. }. + """ + copy = self.copy( ) + copy.inplaceSqrt( ) + return copy + + + def copy(self , copy_data = True): + """Will create a deep copy of self, if copy_data is set to False the + copy will have all z-values set to zero. + """ + return self._copy( copy_data) + + + def write(self , filename): + + """ + Will write the surface as an ascii formatted file to @filename. + """ + self._write( filename ) + + + + def assign(self , value): + """ + Will set all the values in the surface to @value" + """ + self._assign(value) + + + def __setitem__(self , index , value): + if isinstance(index , int): + if index >= len(self): + raise IndexError("Invalid index:%d - valid range [0,%d)" % (index , len(self))) + if index < 0: + index += len(self) + + self._iset_zvalue(index , value) + else: + raise TypeError("Invalid index type:%s - must be integer" % index) + + + def __getitem__(self , index): + if isinstance(index , int): + idx = index + ls = len(self) + if idx < 0: + idx += ls + if 0 <= idx < ls: + return self._iget_zvalue(idx) + else: + raise IndexError("Invalid index:%d - valid range [0,%d)" % (index , len(self))) + else: + raise TypeError("Invalid index type:%s - must be integer" % index) + + + def getXY(self, index): + """Gets the index'th (x,y) coordinate""" + if isinstance(index, int): + idx = index + if idx < 0: + idx += len(self) + if not 0 <= idx < len(self): + raise IndexError("Invalid index:%d - valid range [0,%d)" % (index, len(self))) + index = idx + else: + raise TypeError("Invalid index type:%s - must be integer" % index) + + x = ctypes.c_double() + y = ctypes.c_double() + self._iget_xy(index, ctypes.byref(x), ctypes.byref(y)) + + return x.value, y.value + + + def getNX(self): + return self._get_nx() + + + def getNY(self): + return self._get_ny() + + def getPointset(self): + return self._get_pointset() + + def _assert_idx_or_i_and_j(self, idx, i, j): + if idx is None: + if i is None or j is None: + raise ValueError('idx is None, i and j must be ints, was %s and %s.' % (i, j)) + else: + if i is not None or j is not None: + raise ValueError('idx is set, i and j must be None, was %s and %s.' % (i, j)) + + + def getXYZ(self, idx=None, i=None, j=None): + """Returns a tuple of 3 floats, (x,y,z) for given global index, or i and j.""" + self._assert_idx_or_i_and_j(idx, i, j) + if idx is None: + nx, ny = self.getNX(), self.getNY() + i_idx, j_idx = i,j + if i_idx < 0: + i_idx += self.getNX() + if j_idx < 0: + j_idx += self.getNY() + if 0 <= i_idx < self.getNX() and 0 <= j_idx < self.getNY(): + idx = j_idx * self.getNX() + i_idx + else: + fmt = 'Index error: i=%d not in [0,nx=%d) or j=%d not in [0,ny=%d).' + raise IndexError(fmt % (i, nx, j, ny)) + x,y = self.getXY(idx) + z = self[idx] + return (x,y,z) + + + def free(self): + self._free() + + def __repr__(self): + cnt = 'nx=%d, ny=%d' % (self.getNX(), self.getNY()) + return self._create_repr(cnt) diff --git a/ThirdParty/Ert/python/python/ert/geo/xyz_io.py b/ThirdParty/Ert/python/python/ecl/geo/xyz_io.py similarity index 100% rename from ThirdParty/Ert/python/python/ert/geo/xyz_io.py rename to ThirdParty/Ert/python/python/ecl/geo/xyz_io.py diff --git a/ThirdParty/Ert/python/python/ecl/test/CMakeLists.txt b/ThirdParty/Ert/python/python/ecl/test/CMakeLists.txt new file mode 100644 index 0000000000..bce318e98c --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/test/CMakeLists.txt @@ -0,0 +1,17 @@ +set(PYTHON_SOURCES + __init__.py + ert_test_context.py + ert_test_runner.py + extended_testcase.py + test_run.py + source_enumerator.py + test_area.py + temp_area.py + path_context.py + lint_test_case.py + import_test_case.py +) + +add_python_package("python.ecl.test" ${PYTHON_INSTALL_PREFIX}/ecl/test "${PYTHON_SOURCES}" True) + +add_subdirectory(ecl_mock) diff --git a/ThirdParty/Ert/python/python/ecl/test/__init__.py b/ThirdParty/Ert/python/python/ecl/test/__init__.py new file mode 100644 index 0000000000..de61efbb8c --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/test/__init__.py @@ -0,0 +1,10 @@ +from .test_run import TestRun +from .test_run import path_exists +from .extended_testcase import ExtendedTestCase +from .source_enumerator import SourceEnumerator +from .test_area import TestArea , TestAreaContext +from .temp_area import TempArea , TempAreaContext +from .ert_test_runner import ErtTestRunner +from .path_context import PathContext +from .lint_test_case import LintTestCase +from .import_test_case import ImportTestCase diff --git a/ThirdParty/Ert/python/python/ecl/test/ecl_mock/CMakeLists.txt b/ThirdParty/Ert/python/python/ecl/test/ecl_mock/CMakeLists.txt new file mode 100644 index 0000000000..19ffbf7540 --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/test/ecl_mock/CMakeLists.txt @@ -0,0 +1,7 @@ +set(PYTHON_SOURCES + __init__.py + ecl_sum_mock.py +) + +# The ecl_mock package is not installed. +add_python_package("python.ecl.test.ecl_mock" ${PYTHON_INSTALL_PREFIX}/ecl/test/ecl_mock "${PYTHON_SOURCES}" False) diff --git a/ThirdParty/Ert/python/python/ert/test/ecl_mock/__init__.py b/ThirdParty/Ert/python/python/ecl/test/ecl_mock/__init__.py similarity index 100% rename from ThirdParty/Ert/python/python/ert/test/ecl_mock/__init__.py rename to ThirdParty/Ert/python/python/ecl/test/ecl_mock/__init__.py diff --git a/ThirdParty/Ert/python/python/ert/test/ecl_mock/ecl_sum_mock.py b/ThirdParty/Ert/python/python/ecl/test/ecl_mock/ecl_sum_mock.py similarity index 97% rename from ThirdParty/Ert/python/python/ert/test/ecl_mock/ecl_sum_mock.py rename to ThirdParty/Ert/python/python/ecl/test/ecl_mock/ecl_sum_mock.py index 3b0e3f4f7d..eb2b779229 100644 --- a/ThirdParty/Ert/python/python/ert/test/ecl_mock/ecl_sum_mock.py +++ b/ThirdParty/Ert/python/python/ecl/test/ecl_mock/ecl_sum_mock.py @@ -1,5 +1,5 @@ import datetime -from ert.ecl import EclSum +from ecl.ecl import EclSum def mock_func(ecl_sum , key , days): diff --git a/ThirdParty/Ert/python/python/ecl/test/ert_test_context.py b/ThirdParty/Ert/python/python/ecl/test/ert_test_context.py new file mode 100644 index 0000000000..dd89c5a720 --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/test/ert_test_context.py @@ -0,0 +1,117 @@ +# Copyright (C) 2013 Statoil ASA, Norway. +# +# The file 'test_work_area.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. +import os.path + +from cwrap import BaseCClass +from ert.enkf import EnKFMain, EnkfPrototype + +class ErtTest(BaseCClass): + TYPE_NAME = "ert_test" + + _alloc = EnkfPrototype("void* ert_test_context_alloc_python( char* , char*)", bind = False) + _set_store = EnkfPrototype("void* ert_test_context_set_store( ert_test , bool)") + _free = EnkfPrototype("void ert_test_context_free( ert_test )") + _get_cwd = EnkfPrototype("char* ert_test_context_get_cwd( ert_test )") + _get_enkf_main = EnkfPrototype("enkf_main_ref ert_test_context_get_main( ert_test )") + + + + def __init__(self, test_name, model_config, store_area=False): + if not os.path.exists(model_config): + raise IOError("The configuration file: %s does not exist" % model_config) + else: + c_ptr = self._alloc(test_name, model_config) + super(ErtTest, self).__init__(c_ptr) + self.setStore(store_area) + + self.__ert = None + + def setStore(self, store): + self._set_store(store) + + def getErt(self): + """ @rtype: EnKFMain """ + if self.__ert is None: + self.__ert = self._get_enkf_main() + + return self.__ert + + def free(self): + ert = self.getErt() + ert.umount() + self._free() + + def installWorkflowJob(self, job_name, job_path): + """ @rtype: bool """ + if os.path.exists(job_path) and os.path.isfile(job_path): + ert = self.getErt() + workflow_list = ert.getWorkflowList() + + workflow_list.addJob(job_name, job_path) + return workflow_list.hasJob(job_name) + else: + return False + + def runWorkflowJob(self, job_name, *arguments): + """ @rtype: bool """ + ert = self.getErt() + workflow_list = ert.getWorkflowList() + + if workflow_list.hasJob(job_name): + job = workflow_list.getJob(job_name) + job.run(ert, [arg for arg in arguments]) + return True + else: + return False + + + def getCwd(self): + """ + Returns the current working directory of this context. + @rtype: string + """ + return self._get_cwd() + + + +class ErtTestContext(object): + def __init__(self, test_name, model_config, store_area=False): + self.__test_name = test_name + self.__model_config = model_config + self.__store_area = store_area + self.__test_context = ErtTest(self.__test_name, self.__model_config, store_area=self.__store_area) + + + def __enter__(self): + """ @rtype: ErtTest """ + return self.__test_context + + + def __exit__(self, exc_type, exc_val, exc_tb): + del self.__test_context + return False + + + def getErt(self): + return self.__test_context.getErt() + + + def getCwd(self): + """ + Returns the current working directory of this context. + @rtype: string + """ + return self.__test_context.getCwd() diff --git a/ThirdParty/Ert/python/python/ert/test/ert_test_runner.py b/ThirdParty/Ert/python/python/ecl/test/ert_test_runner.py similarity index 100% rename from ThirdParty/Ert/python/python/ert/test/ert_test_runner.py rename to ThirdParty/Ert/python/python/ecl/test/ert_test_runner.py diff --git a/ThirdParty/Ert/python/python/ecl/test/extended_testcase.py b/ThirdParty/Ert/python/python/ecl/test/extended_testcase.py new file mode 100644 index 0000000000..d1adb0ecfa --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/test/extended_testcase.py @@ -0,0 +1,178 @@ +import numbers +import os +import os.path +import traceback +import sys + +try: + from unittest2 import TestCase +except ImportError: + from unittest import TestCase + +from .source_enumerator import SourceEnumerator +from ecl.util import installAbortSignals +from ecl.util import Version + +TESTDATA_ROOT = None +SHARE_ROOT = None +SOURCE_ROOT = None +BUILD_ROOT = None +try: + from test_env import * + assert( os.path.isdir( TESTDATA_ROOT )) + assert( os.path.isdir( SOURCE_ROOT )) + assert( os.path.isdir( BUILD_ROOT )) + if not SHARE_ROOT is None: + assert( os.path.isdir( SHARE_ROOT )) +except ImportError: + sys.stderr.write("Warning: could not import file test_env.py - this might lead to test failures.") + + +class _AssertNotRaisesContext(object): + + def __init__(self, test_class): + super(_AssertNotRaisesContext, self).__init__() + self._test_class = test_class + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, tb): + if exc_type is not None: + try: + exc_name = exc_type.__name__ + except AttributeError: + exc_name = str(exc_type) + self._test_class.fail("Exception: %s raised\n%s" % (exc_name, traceback.print_exception(exc_type, exc_value, tb))) + return True + + +""" +This class provides some extra functionality for testing values that are almost equal. +""" +class ExtendedTestCase(TestCase): + def __init__(self , *args , **kwargs): + self.__testdata_root = None + self.__share_root = None + installAbortSignals() + super(ExtendedTestCase , self).__init__(*args , **kwargs) + + + def __str__(self): + return 'ExtendedTestCase( TESTADATA_ROOT=%s, SOURCE_ROOT=%s, SHARE_ROOT=%s, BUILD_ROOT=%s)' % (TESTDATA_ROOT, + SOURCE_ROOT, + SHARE_ROOT, + BUILD_ROOT) + + def assertFloatEqual(self, first, second, msg=None, tolerance=1e-6): + try: + f_first, f_second = float(first), float(second) + diff = abs(f_first - f_second) + scale = max(1, abs(first) + abs(second)) + if msg is None: + msg = "Floats not equal: |%f - %f| > %g" % (f_first, f_second, tolerance) + self.assertTrue(diff < tolerance * scale, msg=msg) + except TypeError: + self.fail("Cannot compare as floats: %s (%s) and %s (%s)" % + (first, type(first), second, type(second))) + + + def assertAlmostEqualList(self, first, second, msg=None): + if len(first) != len(second): + self.fail("Lists are not of same length!") + + for index in range(len(first)): + self.assertFloatEqual(first[index], second[index], msg=msg) + + + def assertImportable(self, module_name): + try: + __import__(module_name) + except ImportError: + tb = traceback.format_exc() + self.fail("Module %s not found!\n\nTrace:\n%s" % (module_name, str(tb))) + except Exception: + tb = traceback.format_exc() + self.fail("Import of module %s caused errors!\n\nTrace:\n%s" % (module_name, str(tb))) + + + def assertFilesAreEqual(self, first, second): + if not self.__filesAreEqual(first, second): + self.fail("Buffer contents of files are not identical!") + + + def assertFilesAreNotEqual(self, first, second): + if self.__filesAreEqual(first, second): + self.fail("Buffer contents of files are identical!") + + def assertFileExists(self, path): + if not os.path.exists(path) or not os.path.isfile(path): + self.fail("The file: %s does not exist!" % path) + + def assertDirectoryExists(self, path): + if not os.path.exists(path) or not os.path.isdir(path): + self.fail("The directory: %s does not exist!" % path) + + def assertFileDoesNotExist(self, path): + if os.path.exists(path) and os.path.isfile(path): + self.fail("The file: %s exists!" % path) + + def assertDirectoryDoesNotExist(self, path): + if os.path.exists(path) and os.path.isdir(path): + self.fail("The directory: %s exists!" % path) + + def __filesAreEqual(self, first, second): + buffer1 = open(first).read() + buffer2 = open(second).read() + + return buffer1 == buffer2 + + def assertEnumIsFullyDefined(self, enum_class, enum_name, source_path, verbose=False): + enum_values = SourceEnumerator.findEnumerators(enum_name, os.path.join( SOURCE_ROOT , source_path)) + + for identifier, value in enum_values: + if verbose: + print("%s = %d" % (identifier, value)) + + self.assertTrue(enum_class.__dict__.has_key(identifier), "Enum does not have identifier: %s" % identifier) + class_value = enum_class.__dict__[identifier] + self.assertEqual(class_value, value, "Enum value for identifier: %s does not match: %s != %s" % (identifier, class_value, value)) + + + @staticmethod + def createSharePath(path): + return os.path.realpath(os.path.join(SHARE_ROOT , path)) + + + @staticmethod + def createTestPath(path): + return os.path.realpath(os.path.join(TESTDATA_ROOT , path)) + + + def assertNotRaises(self, func=None): + + context = _AssertNotRaisesContext(self) + if func is None: + return context + + with context: + func() + + @staticmethod + def slowTestShouldNotRun(): + """ + @param: The slow test flag can be set by environment variable SKIP_SLOW_TESTS = [True|False] + """ + + return os.environ.get("SKIP_SLOW_TESTS", "False") == "True" + + + @staticmethod + def requireVersion(major , minor , micro = "git"): + required_version = Version(major, minor , micro) + current_version = Version.currentVersion() + + if required_version < current_version: + return True + else: + return False diff --git a/ThirdParty/Ert/python/python/ecl/test/import_test_case.py b/ThirdParty/Ert/python/python/ecl/test/import_test_case.py new file mode 100644 index 0000000000..f803f3c57c --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/test/import_test_case.py @@ -0,0 +1,49 @@ +# Copyright (C) 2017 Statoil ASA, Norway. +# +# This file is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. + +import importlib +import os +import sys +import traceback +import unittest +import inspect + +class ImportTestCase(unittest.TestCase): + + + def import_module(self , module): + mod = importlib.import_module( module ) + return mod + + def import_package(self, package): + module = self.import_module( package ) + path = os.path.dirname( inspect.getfile( module ) ) + + for entry in sorted(os.listdir(path)): + entry_path = os.path.join(path, entry) + if os.path.isdir( entry_path ): + module = os.path.basename( entry ) + sub_module = "%s.%s" % (package , module) + self.import_package( sub_module ) + else: + module, ext = os.path.splitext( entry ) + if module == "__init__": + continue + + if ext == "py": + self.import_module("%s.%s" % (package , module)) + + return True diff --git a/ThirdParty/Ert/python/python/ecl/test/lint_test_case.py b/ThirdParty/Ert/python/python/ecl/test/lint_test_case.py new file mode 100644 index 0000000000..069c6f4af3 --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/test/lint_test_case.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python +# Copyright (C) 2017 Statoil ASA, Norway. +# +# This file is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. + +import sys +import fnmatch +import os +import unittest +try: + from pylint import epylint as lint +except ImportError: + sys.stderr.write("Could not import pylint module - lint based testing will be skipped\n") + lint = None + + +class LintTestCase(unittest.TestCase): + """This class is a test case for linting.""" + + LINT_ARGS = ['-d', 'R,C,W'] + \ + ['--extension-pkg-whitelist=numpy'] + + + @staticmethod + def _get_lintable_files(paths, whitelist=()): + """Recursively traverses all folders in paths for *.py files""" + matches = [] + for folder in paths: + for root, _, filenames in os.walk(folder): + for filename in fnmatch.filter(filenames, '*.py'): + if filename not in whitelist: + matches.append(os.path.join(root, filename)) + return matches + + + def assertLinted(self, paths, whitelist=()): # noqa + """Takes a path to a folder or a list of paths to folders and recursively finds + all *.py files within that folder except the ones with filenames in whitelist. + + Will assert lint.lint(fname) == 0 for every *.py file found. + """ + if lint is None: + self.skipTest("pylint not installed") + + if isinstance(paths, str): + paths = [paths] + files = self._get_lintable_files(paths, whitelist=whitelist) + for f in files: + self.assertEqual(0, lint.lint(f, self.LINT_ARGS), 'Linting required for %s' % f) diff --git a/ThirdParty/Ert/python/python/ert/test/path_context.py b/ThirdParty/Ert/python/python/ecl/test/path_context.py similarity index 100% rename from ThirdParty/Ert/python/python/ert/test/path_context.py rename to ThirdParty/Ert/python/python/ecl/test/path_context.py diff --git a/ThirdParty/Ert/python/python/ecl/test/source_enumerator.py b/ThirdParty/Ert/python/python/ecl/test/source_enumerator.py new file mode 100644 index 0000000000..e0c76300f1 --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/test/source_enumerator.py @@ -0,0 +1,39 @@ +import os +import re + +class SourceEnumerator(object): + + @classmethod + def removeComments(cls, code_string): + code_string = re.sub(re.compile("/\*.*?\*/",re.DOTALL ) ,"" ,code_string) # remove all occurance streamed comments (/*COMMENT */) from string + code_string = re.sub(re.compile("//.*?\n" ) ,"" ,code_string) # remove all occurance singleline comments (//COMMENT\n ) from string + return code_string + + + @classmethod + def findEnum(cls, enum_name, full_source_file_path): + with open(full_source_file_path, "r") as f: + text = f.read() + + text = SourceEnumerator.removeComments(text) + + enum_pattern = re.compile("typedef\s+enum\s+\{(.*?)\}\s*(\w+?);", re.DOTALL) + + for enum in enum_pattern.findall(text): + if enum[1] == enum_name: + return enum[0] + + raise ValueError("Enum with name: '%s' not found!" % enum_name) + + + @classmethod + def findEnumerators(cls, enum_name, source_file): + enum_text = SourceEnumerator.findEnum(enum_name, source_file) + + enumerator_pattern = re.compile("(\w+?)\s*?=\s*?(\d+)") + + enumerators = [] + for enumerator in enumerator_pattern.findall(enum_text): + enumerators.append((enumerator[0], int(enumerator[1]))) + + return enumerators diff --git a/ThirdParty/Ert/python/python/ert/test/temp_area.py b/ThirdParty/Ert/python/python/ecl/test/temp_area.py similarity index 98% rename from ThirdParty/Ert/python/python/ert/test/temp_area.py rename to ThirdParty/Ert/python/python/ecl/test/temp_area.py index d7271f103b..4679eed017 100644 --- a/ThirdParty/Ert/python/python/ert/test/temp_area.py +++ b/ThirdParty/Ert/python/python/ecl/test/temp_area.py @@ -16,7 +16,7 @@ import os import os.path -from ert.util import UtilPrototype +from ecl.util import UtilPrototype from . import TestArea class TempArea(TestArea): diff --git a/ThirdParty/Ert/python/python/ert/test/test_area.py b/ThirdParty/Ert/python/python/ecl/test/test_area.py similarity index 99% rename from ThirdParty/Ert/python/python/ert/test/test_area.py rename to ThirdParty/Ert/python/python/ecl/test/test_area.py index e7414f0412..0d2cb1cf57 100644 --- a/ThirdParty/Ert/python/python/ert/test/test_area.py +++ b/ThirdParty/Ert/python/python/ecl/test/test_area.py @@ -16,7 +16,7 @@ import os.path from cwrap import BaseCClass -from ert.util import UtilPrototype +from ecl.util import UtilPrototype class TestArea(BaseCClass): diff --git a/ThirdParty/Ert/python/python/ert/test/test_run.py b/ThirdParty/Ert/python/python/ecl/test/test_run.py similarity index 100% rename from ThirdParty/Ert/python/python/ert/test/test_run.py rename to ThirdParty/Ert/python/python/ecl/test/test_run.py diff --git a/ThirdParty/Ert/python/python/ecl/util/CMakeLists.txt b/ThirdParty/Ert/python/python/ecl/util/CMakeLists.txt new file mode 100644 index 0000000000..4f8ecb2888 --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/util/CMakeLists.txt @@ -0,0 +1,32 @@ +set(PYTHON_SOURCES + __init__.py + bool_vector.py + buffer.py + ctime.py + double_vector.py + hash.py + int_vector.py + install_abort_signals.py + log.py + lookup_table.py + matrix.py + profiler.py + rng.py + stat.py + stringlist.py + substitution_list.py + thread_pool.py + cthread_pool.py + time_vector.py + ui_return.py + util_func.py + vector_template.py + permutation_vector.py + version.py + arg_pack.py + path_format.py +) + +add_python_package("python.ecl.util" ${PYTHON_INSTALL_PREFIX}/ecl/util "${PYTHON_SOURCES}" True) + +add_subdirectory(enums) diff --git a/ThirdParty/Ert/python/python/ecl/util/__init__.py b/ThirdParty/Ert/python/python/ecl/util/__init__.py new file mode 100644 index 0000000000..c9071da3c7 --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/util/__init__.py @@ -0,0 +1,81 @@ +# Copyright (C) 2011 Statoil ASA, Norway. +# +# The file '__init__.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. +""" +Package with utility classes, used by other ERT classes. + +The libutil library implements many utility functions and classes of +things like hash table and vector; these classes are extensively used +by the other ert libraries. The present wrapping here is to facilitate +use and interaction with various ert classes, in a pure python context +you are probably better served by using a plain python solution; +either based on built in python objects or well established third +party packages. + +The modules included in the util package are: + + tvector.py: This module implements the classes IntVector, + DoubleVector and BoolVector. This is a quite normal + implementation of a typed growable vector; but with a special + twist regarding default values. + + util_func.py: This module wraps a couple of stateless (i.e. there is + no class involved) functions from the util.c file. + +""" + +from __future__ import (absolute_import, division, + print_function, unicode_literals) + +import ecl +from cwrap import Prototype + + +class UtilPrototype(Prototype): + lib = ecl.load("libert_util") + + def __init__(self, prototype, bind=True): + super(UtilPrototype, self).__init__(UtilPrototype.lib, prototype, bind=bind) + + + +from .version import Version + +from .enums import RngAlgTypeEnum, RngInitModeEnum, LLSQResultEnum + +from .ctime import CTime + +from .permutation_vector import PermutationVector +from .vector_template import VectorTemplate +from .double_vector import DoubleVector +from .int_vector import IntVector +from .bool_vector import BoolVector +from .time_vector import TimeVector +from .stringlist import StringList +from .rng import RandomNumberGenerator +from .matrix import Matrix +from .stat import quantile, quantile_sorted, polyfit +from .log import Log +from .lookup_table import LookupTable +from .buffer import Buffer +from .hash import Hash, StringHash, DoubleHash, IntegerHash +from .substitution_list import SubstitutionList +from .ui_return import UIReturn +from .thread_pool import ThreadPool +from .cthread_pool import CThreadPool, startCThreadPool +from .install_abort_signals import installAbortSignals, updateAbortSignals +from .profiler import Profiler +from .arg_pack import ArgPack +from .path_format import PathFormat diff --git a/ThirdParty/Ert/python/python/ert/util/arg_pack.py b/ThirdParty/Ert/python/python/ecl/util/arg_pack.py similarity index 98% rename from ThirdParty/Ert/python/python/ert/util/arg_pack.py rename to ThirdParty/Ert/python/python/ecl/util/arg_pack.py index 1297514086..e20bd3fe99 100644 --- a/ThirdParty/Ert/python/python/ert/util/arg_pack.py +++ b/ThirdParty/Ert/python/python/ecl/util/arg_pack.py @@ -15,7 +15,7 @@ # for more details. from cwrap import BaseCClass -from ert.util import UtilPrototype +from ecl.util import UtilPrototype class ArgPack(BaseCClass): diff --git a/ThirdParty/Ert/python/python/ert/util/bool_vector.py b/ThirdParty/Ert/python/python/ecl/util/bool_vector.py similarity index 88% rename from ThirdParty/Ert/python/python/ert/util/bool_vector.py rename to ThirdParty/Ert/python/python/ecl/util/bool_vector.py index 11d7a9feb3..9f920628a9 100644 --- a/ThirdParty/Ert/python/python/ert/util/bool_vector.py +++ b/ThirdParty/Ert/python/python/ecl/util/bool_vector.py @@ -14,10 +14,7 @@ # See the GNU General Public License at # for more details. - -import warnings - -from ert.util import VectorTemplate, UtilPrototype +from ecl.util import VectorTemplate, UtilPrototype class BoolVector(VectorTemplate): @@ -98,25 +95,6 @@ def createActiveMask(cls, range_string): """ return cls._create_active_mask(range_string) - @classmethod - def active_mask(cls, range_string): - """ - Will create a BoolVector instance with the values from @range_string. - - The range_string input should be of the type "1,3-5,9,17", - i.e. integer values separated by commas, and dashes to - represent ranges. If the input string contains ANY invalid - characters the returned active list will be empty: - - "1,4-7,10" => {F,T,F,F,T,T,T,T,F,F,T} - "1,4-7,10X" => {} - - The empty list will evaluate to false - @rtype: BoolVector - """ - warnings.warn("The active_mask(cls, rangs_string) method has been renamed: createActiveMask(cls, rangs_string)", DeprecationWarning) - return cls._create_active_mask(range_string) - def updateActiveMask(self, range_string): """ Updates a bool vector based on a range string. @@ -141,5 +119,25 @@ def createFromList(cls, size, source_list): return bool_vector def createActiveList(self): - """ @rtype: ert.util.IntVector """ + """ @rtype: ecl.util.IntVector """ return self._active_list(self) + + def _tostr(self, arr = None): + if arr is None: + arr = self + return "".join(['1' if x else '0' for x in arr]) + + def __repr__(self): + """Will return BoolVector(size = 4, content = "0010") at 0x1729 and + if size > 10, will return content = "0001...100", i.e., |content|<=10. + """ + cnt = '' + ls = len(self) + if ls <= 20: + cnt = self._tostr() + else: + a,b = self[:9], self[-8:] + cnt = self._tostr(a) + cnt += "..." + cnt += self._tostr(b) + return 'BoolVector(size = %d, content = "%s") %s' % (ls, cnt, self._ad_str()) diff --git a/ThirdParty/Ert/python/python/ert/util/buffer.py b/ThirdParty/Ert/python/python/ecl/util/buffer.py similarity index 96% rename from ThirdParty/Ert/python/python/ert/util/buffer.py rename to ThirdParty/Ert/python/python/ecl/util/buffer.py index 9fa3a36dce..44a96cfd62 100644 --- a/ThirdParty/Ert/python/python/ert/util/buffer.py +++ b/ThirdParty/Ert/python/python/ecl/util/buffer.py @@ -15,7 +15,7 @@ # for more details. from cwrap import BaseCClass -from ert.util import UtilPrototype +from ecl.util import UtilPrototype class Buffer(BaseCClass): diff --git a/ThirdParty/Ert/python/python/ert/util/cthread_pool.py b/ThirdParty/Ert/python/python/ecl/util/cthread_pool.py similarity index 98% rename from ThirdParty/Ert/python/python/ert/util/cthread_pool.py rename to ThirdParty/Ert/python/python/ecl/util/cthread_pool.py index 07a4eb7213..5c5824b2b7 100644 --- a/ThirdParty/Ert/python/python/ert/util/cthread_pool.py +++ b/ThirdParty/Ert/python/python/ecl/util/cthread_pool.py @@ -17,7 +17,7 @@ import ctypes from cwrap import BaseCClass -from ert.util import UtilPrototype +from ecl.util import UtilPrototype class CThreadPool(BaseCClass): diff --git a/ThirdParty/Ert/python/python/ert/util/ctime.py b/ThirdParty/Ert/python/python/ecl/util/ctime.py similarity index 99% rename from ThirdParty/Ert/python/python/ert/util/ctime.py rename to ThirdParty/Ert/python/python/ecl/util/ctime.py index d0fc1c1ef2..04d7d42e2a 100644 --- a/ThirdParty/Ert/python/python/ert/util/ctime.py +++ b/ThirdParty/Ert/python/python/ecl/util/ctime.py @@ -20,7 +20,7 @@ import time from cwrap import BaseCValue -from ert.util import UtilPrototype +from ecl.util import UtilPrototype class CTime(BaseCValue): diff --git a/ThirdParty/Ert/python/python/ert/util/double_vector.py b/ThirdParty/Ert/python/python/ecl/util/double_vector.py similarity index 99% rename from ThirdParty/Ert/python/python/ert/util/double_vector.py rename to ThirdParty/Ert/python/python/ecl/util/double_vector.py index 548dcbc5c6..28a39cfc20 100644 --- a/ThirdParty/Ert/python/python/ert/util/double_vector.py +++ b/ThirdParty/Ert/python/python/ecl/util/double_vector.py @@ -14,7 +14,7 @@ # See the GNU General Public License at # for more details. -from ert.util import VectorTemplate, UtilPrototype +from ecl.util import VectorTemplate, UtilPrototype class DoubleVector(VectorTemplate): diff --git a/ThirdParty/Ert/python/python/ecl/util/enums/CMakeLists.txt b/ThirdParty/Ert/python/python/ecl/util/enums/CMakeLists.txt new file mode 100644 index 0000000000..18c2673477 --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/util/enums/CMakeLists.txt @@ -0,0 +1,10 @@ +set(PYTHON_SOURCES + __init__.py + rng_alg_type_enum.py + rng_init_mode_enum.py + ui_return_status_enum.py + llsq_result_enum.py +) + +add_python_package("python.ecl.util.enums" ${PYTHON_INSTALL_PREFIX}/ecl/util/enums "${PYTHON_SOURCES}" True) + diff --git a/ThirdParty/Ert/python/python/ert/util/enums/__init__.py b/ThirdParty/Ert/python/python/ecl/util/enums/__init__.py similarity index 100% rename from ThirdParty/Ert/python/python/ert/util/enums/__init__.py rename to ThirdParty/Ert/python/python/ecl/util/enums/__init__.py diff --git a/ThirdParty/Ert/python/python/ert/util/enums/llsq_result_enum.py b/ThirdParty/Ert/python/python/ecl/util/enums/llsq_result_enum.py similarity index 100% rename from ThirdParty/Ert/python/python/ert/util/enums/llsq_result_enum.py rename to ThirdParty/Ert/python/python/ecl/util/enums/llsq_result_enum.py diff --git a/ThirdParty/Ert/python/python/ert/util/enums/rng_alg_type_enum.py b/ThirdParty/Ert/python/python/ecl/util/enums/rng_alg_type_enum.py similarity index 100% rename from ThirdParty/Ert/python/python/ert/util/enums/rng_alg_type_enum.py rename to ThirdParty/Ert/python/python/ecl/util/enums/rng_alg_type_enum.py diff --git a/ThirdParty/Ert/python/python/ert/util/enums/rng_init_mode_enum.py b/ThirdParty/Ert/python/python/ecl/util/enums/rng_init_mode_enum.py similarity index 100% rename from ThirdParty/Ert/python/python/ert/util/enums/rng_init_mode_enum.py rename to ThirdParty/Ert/python/python/ecl/util/enums/rng_init_mode_enum.py diff --git a/ThirdParty/Ert/python/python/ert/util/enums/ui_return_status_enum.py b/ThirdParty/Ert/python/python/ecl/util/enums/ui_return_status_enum.py similarity index 100% rename from ThirdParty/Ert/python/python/ert/util/enums/ui_return_status_enum.py rename to ThirdParty/Ert/python/python/ecl/util/enums/ui_return_status_enum.py diff --git a/ThirdParty/Ert/python/python/ert/util/hash.py b/ThirdParty/Ert/python/python/ecl/util/hash.py similarity index 98% rename from ThirdParty/Ert/python/python/ert/util/hash.py rename to ThirdParty/Ert/python/python/ecl/util/hash.py index dbf2086197..bd2a18289d 100644 --- a/ThirdParty/Ert/python/python/ert/util/hash.py +++ b/ThirdParty/Ert/python/python/ecl/util/hash.py @@ -16,7 +16,7 @@ from ctypes import c_void_p from cwrap import BaseCClass -from ert.util import StringList, UtilPrototype +from ecl.util import StringList, UtilPrototype class Hash(BaseCClass): diff --git a/ThirdParty/Ert/python/python/ert/util/install_abort_signals.py b/ThirdParty/Ert/python/python/ecl/util/install_abort_signals.py similarity index 89% rename from ThirdParty/Ert/python/python/ert/util/install_abort_signals.py rename to ThirdParty/Ert/python/python/ecl/util/install_abort_signals.py index 01cd6c74b1..59cddabe75 100644 --- a/ThirdParty/Ert/python/python/ert/util/install_abort_signals.py +++ b/ThirdParty/Ert/python/python/ecl/util/install_abort_signals.py @@ -1,4 +1,4 @@ -from ert.util import UtilPrototype +from ecl.util import UtilPrototype def installAbortSignals(): diff --git a/ThirdParty/Ert/python/python/ert/util/int_vector.py b/ThirdParty/Ert/python/python/ecl/util/int_vector.py similarity index 99% rename from ThirdParty/Ert/python/python/ert/util/int_vector.py rename to ThirdParty/Ert/python/python/ecl/util/int_vector.py index 0809d5b0cc..277a76f9eb 100644 --- a/ThirdParty/Ert/python/python/ert/util/int_vector.py +++ b/ThirdParty/Ert/python/python/ecl/util/int_vector.py @@ -14,7 +14,7 @@ # See the GNU General Public License at # for more details. -from ert.util import VectorTemplate, UtilPrototype +from ecl.util import VectorTemplate, UtilPrototype class IntVector(VectorTemplate): diff --git a/ThirdParty/Ert/python/python/ert/util/log.py b/ThirdParty/Ert/python/python/ecl/util/log.py similarity index 97% rename from ThirdParty/Ert/python/python/ert/util/log.py rename to ThirdParty/Ert/python/python/ecl/util/log.py index 550a18e07f..2e766b83a6 100644 --- a/ThirdParty/Ert/python/python/ert/util/log.py +++ b/ThirdParty/Ert/python/python/ecl/util/log.py @@ -16,7 +16,7 @@ from __future__ import print_function from cwrap import BaseCClass -from ert.util import UtilPrototype +from ecl.util import UtilPrototype class Log(BaseCClass): diff --git a/ThirdParty/Ert/python/python/ert/util/lookup_table.py b/ThirdParty/Ert/python/python/ecl/util/lookup_table.py similarity index 99% rename from ThirdParty/Ert/python/python/ert/util/lookup_table.py rename to ThirdParty/Ert/python/python/ecl/util/lookup_table.py index 4cb6fb87f2..6497a8273c 100644 --- a/ThirdParty/Ert/python/python/ert/util/lookup_table.py +++ b/ThirdParty/Ert/python/python/ecl/util/lookup_table.py @@ -16,7 +16,7 @@ from cwrap import BaseCClass -from ert.util import UtilPrototype +from ecl.util import UtilPrototype class LookupTable(BaseCClass): diff --git a/ThirdParty/Ert/python/python/ert/util/matrix.py b/ThirdParty/Ert/python/python/ecl/util/matrix.py similarity index 95% rename from ThirdParty/Ert/python/python/ert/util/matrix.py rename to ThirdParty/Ert/python/python/ecl/util/matrix.py index 0cff826b44..1c8392daba 100644 --- a/ThirdParty/Ert/python/python/ert/util/matrix.py +++ b/ThirdParty/Ert/python/python/ecl/util/matrix.py @@ -29,11 +29,12 @@ from cwrap import BaseCClass,CFILE -from ert.util import UtilPrototype +from ecl.util import UtilPrototype class Matrix(BaseCClass): _matrix_alloc = UtilPrototype("void* matrix_alloc(int, int )" , bind = False) + _matrix_alloc_identity = UtilPrototype("matrix_obj matrix_alloc_identity( int )" , bind = False) _alloc_transpose = UtilPrototype("matrix_obj matrix_alloc_transpose(matrix)") _inplace_transpose = UtilPrototype("void matrix_inplace_transpose(matrix)") _copy = UtilPrototype("matrix_obj matrix_alloc_copy(matrix)" ) @@ -77,6 +78,13 @@ def __init__(self, rows, columns, value=0): def copy(self): return self._copy( ) + @classmethod + def identity(cls, dim): + """Returns a dim x dim identity matrix.""" + if dim < 1: + raise ValueError('Identity matrix must have positive size, %d not allowed.' % dim) + return cls._matrix_alloc_identity(dim) + def subCopy(self, row_offset, column_offset, rows, columns): if row_offset < 0 or row_offset >= self.rows(): raise ValueError("Invalid row offset") diff --git a/ThirdParty/Ert/python/python/ert/util/path_format.py b/ThirdParty/Ert/python/python/ecl/util/path_format.py similarity index 92% rename from ThirdParty/Ert/python/python/ert/util/path_format.py rename to ThirdParty/Ert/python/python/ecl/util/path_format.py index 165cff2905..0fe290891e 100644 --- a/ThirdParty/Ert/python/python/ert/util/path_format.py +++ b/ThirdParty/Ert/python/python/ecl/util/path_format.py @@ -1,5 +1,5 @@ from cwrap import BaseCClass -from ert.util import UtilPrototype +from ecl.util import UtilPrototype class PathFormat(BaseCClass): diff --git a/ThirdParty/Ert/python/python/ert/util/permutation_vector.py b/ThirdParty/Ert/python/python/ecl/util/permutation_vector.py similarity index 96% rename from ThirdParty/Ert/python/python/ert/util/permutation_vector.py rename to ThirdParty/Ert/python/python/ecl/util/permutation_vector.py index a5c272304f..dabbd3788f 100644 --- a/ThirdParty/Ert/python/python/ert/util/permutation_vector.py +++ b/ThirdParty/Ert/python/python/ecl/util/permutation_vector.py @@ -1,5 +1,5 @@ from cwrap import BaseCClass -from ert.util import UtilPrototype +from ecl.util import UtilPrototype class PermutationVector(BaseCClass): diff --git a/ThirdParty/Ert/python/python/ert/util/profiler.py b/ThirdParty/Ert/python/python/ecl/util/profiler.py similarity index 78% rename from ThirdParty/Ert/python/python/ert/util/profiler.py rename to ThirdParty/Ert/python/python/ecl/util/profiler.py index 0493689bfc..ab35189cc9 100644 --- a/ThirdParty/Ert/python/python/ert/util/profiler.py +++ b/ThirdParty/Ert/python/python/ecl/util/profiler.py @@ -1,4 +1,10 @@ -import StringIO +from __future__ import absolute_import, division, print_function, unicode_literals + +try: + from StringIO import StringIO +except ImportError: + from io import StringIO + import cProfile import pstats import sys @@ -18,7 +24,7 @@ def startProfiler(cls, subcalls=True, builtins=True): def stopProfiler(cls, sort_method="cumulative"): if cls.__profiler is not None: cls.__profiler.disable() - stream = StringIO.StringIO() + stream = StringIO() stats_printer = pstats.Stats(cls.__profiler, stream=stream).sort_stats(sort_method) stats_printer.print_stats() cls.__profiler = None diff --git a/ThirdParty/Ert/python/python/ert/util/rng.py b/ThirdParty/Ert/python/python/ecl/util/rng.py similarity index 96% rename from ThirdParty/Ert/python/python/ert/util/rng.py rename to ThirdParty/Ert/python/python/ecl/util/rng.py index 26e8eb623e..a747d31887 100644 --- a/ThirdParty/Ert/python/python/ert/util/rng.py +++ b/ThirdParty/Ert/python/python/ecl/util/rng.py @@ -16,8 +16,8 @@ import os.path from cwrap import BaseCClass -from ert.util import UtilPrototype -from ert.util.enums import RngInitModeEnum, RngAlgTypeEnum +from ecl.util import UtilPrototype +from ecl.util.enums import RngInitModeEnum, RngAlgTypeEnum class RandomNumberGenerator(BaseCClass): diff --git a/ThirdParty/Ert/python/python/ert/util/stat.py b/ThirdParty/Ert/python/python/ecl/util/stat.py similarity index 93% rename from ThirdParty/Ert/python/python/ert/util/stat.py rename to ThirdParty/Ert/python/python/ecl/util/stat.py index 8efcbe587b..d219a7869a 100644 --- a/ThirdParty/Ert/python/python/ert/util/stat.py +++ b/ThirdParty/Ert/python/python/ecl/util/stat.py @@ -16,14 +16,14 @@ from collections import Sequence from cwrap import PrototypeError -from ert.util import LLSQResultEnum, UtilPrototype, Matrix +from ecl.util import LLSQResultEnum, UtilPrototype, Matrix quantile = UtilPrototype("double statistics_empirical_quantile(double_vector, double)") -"""@type: (ert.util.DoubleVector, float)->float""" +"""@type: (ecl.util.DoubleVector, float)->float""" quantile_sorted = UtilPrototype("double statistics_empirical_quantile(double_vector, double)") -"""@type: (ert.util.DoubleVector, float)->float""" +"""@type: (ecl.util.DoubleVector, float)->float""" try: _polyfit = UtilPrototype("llsq_result_enum matrix_stat_polyfit(matrix, matrix, matrix, matrix)") diff --git a/ThirdParty/Ert/python/python/ert/util/stringlist.py b/ThirdParty/Ert/python/python/ecl/util/stringlist.py similarity index 81% rename from ThirdParty/Ert/python/python/ert/util/stringlist.py rename to ThirdParty/Ert/python/python/ecl/util/stringlist.py index e4de156c68..f4e22b03c6 100644 --- a/ThirdParty/Ert/python/python/ert/util/stringlist.py +++ b/ThirdParty/Ert/python/python/ecl/util/stringlist.py @@ -30,9 +30,9 @@ return a normal python list of string objects, used in this way you hardly need to notice that the StringList class is at play. """ - -from ert.util import UtilPrototype -from types import StringType, IntType +from __future__ import absolute_import, division, print_function, unicode_literals +from six import string_types +from ecl.util import UtilPrototype from cwrap import BaseCClass @@ -76,13 +76,17 @@ def __init__(self, initial=None): c_ptr = self._alloc() super(StringList, self).__init__(c_ptr) - if initial: - for s in initial: - if isinstance(s, StringType): - self.append(s) - else: - raise TypeError("Item: %s not a string" % s) + self._append_all(initial) + + def _append_all(self, lst): + for s in lst: + if isinstance(s, bytes): + s.decode('ascii') + if isinstance(s, string_types): + self.append(s) + else: + raise TypeError('Item is not a string: "%s".' % s) def __eq__(self , other): @@ -101,7 +105,7 @@ def __eq__(self , other): def __setitem__(self, index, value): - if isinstance(index, IntType): + if isinstance(index, int): length = len(self) if index < 0: # Will only wrap backwards once @@ -109,7 +113,9 @@ def __setitem__(self, index, value): if index < 0 or index >= length: raise IndexError("index must be in range %d <= %d < %d" % (0, index, len(self))) - if isinstance(value, StringType): + if isinstance(value, bytes): + value = value.decode('ascii') + if isinstance(value, string_types): self._iset(index, value) else: raise TypeError("Item: %s not string type" % value) @@ -122,7 +128,7 @@ def __getitem__(self, index): The __getitem__ method supports negative, i.e. from the right, indexing; but not slices. """ - if isinstance(index, IntType): + if isinstance(index, int): length = len(self) if index < 0: index += length @@ -143,7 +149,9 @@ def __contains__(self, s): def __iadd__(self , other): - if isinstance(other , str): + if isinstance(other, bytes): + other.decode('ascii') + if isinstance(other , string_types): raise TypeError("Can not add strings with + - use append()") for s in other: self.append( s ) @@ -157,7 +165,9 @@ def __add__(self , other): def __ior__(self , other): - if isinstance(other , str): + if isinstance(other, bytes): + other.decode('ascii') + if isinstance(other , string_types): raise TypeError("Can not | with string.") for s in other: if not s in self: @@ -203,6 +213,12 @@ def __str__(self): buffer += "]" return buffer + def __repr__(self): + return 'StringList(size = %d) %s' % (len(self), self._ad_str()) + + def empty(self): + """Returns true if and only if list is empty.""" + return len(self) == 0 def pop(self): """ @@ -210,10 +226,10 @@ def pop(self): Will raise IndexError if list is empty. """ - if len(self): + if not self.empty(): return self._pop() else: - raise IndexError("pop() failed - the list is empty") + raise IndexError("List empty. Cannot call pop().") def append(self, s): @@ -221,11 +237,13 @@ def append(self, s): Appends a new string @s to list. If the input argument is not a string the string representation will be appended. """ - if isinstance(s, StringType): + if isinstance(s, bytes): + s.decode('ascii') + if isinstance(s, string_types): self._append(s) else: self._append(str(s)) - + @property def strings(self): @@ -245,10 +263,10 @@ def last(self): """ Will return the last element in list. Raise IndexError if empty. """ - if len(self) > 0: + if not self.empty(): return self._last() else: - raise IndexError("The list is empty") + raise IndexError("List empty. No such element last().") def sort(self, cmp_flag=0): @@ -267,21 +285,24 @@ def sort(self, cmp_flag=0): def index(self, value): """ @rtype: int """ - assert isinstance(value, str) - return self._find_first( value) + if isinstance(value, bytes): + value.decode('ascii') + if isinstance(value, string_types): + return self._find_first(value) + raise KeyError('Cannot index by "%s", lst.index() needs a string.' % str(type(value))) def free(self): self._free() def front(self): - if len(self) > 0: + if not self.empty(): return self._front() else: - raise IndexError + raise IndexError('List empty. No such element front().') def back(self): - if len(self) > 0: + if not self.empty(): return self._back() else: - raise IndexError + raise IndexError('List empty. No such element back().') diff --git a/ThirdParty/Ert/python/python/ert/util/substitution_list.py b/ThirdParty/Ert/python/python/ecl/util/substitution_list.py similarity index 98% rename from ThirdParty/Ert/python/python/ert/util/substitution_list.py rename to ThirdParty/Ert/python/python/ecl/util/substitution_list.py index d0902b7f45..925a9de086 100644 --- a/ThirdParty/Ert/python/python/ert/util/substitution_list.py +++ b/ThirdParty/Ert/python/python/ecl/util/substitution_list.py @@ -1,5 +1,5 @@ from cwrap import BaseCClass -from ert.util import UtilPrototype +from ecl.util import UtilPrototype class SubstitutionList(BaseCClass): diff --git a/ThirdParty/Ert/python/python/ert/util/thread_pool.py b/ThirdParty/Ert/python/python/ecl/util/thread_pool.py similarity index 100% rename from ThirdParty/Ert/python/python/ert/util/thread_pool.py rename to ThirdParty/Ert/python/python/ecl/util/thread_pool.py diff --git a/ThirdParty/Ert/python/python/ert/util/time_vector.py b/ThirdParty/Ert/python/python/ecl/util/time_vector.py similarity index 98% rename from ThirdParty/Ert/python/python/ert/util/time_vector.py rename to ThirdParty/Ert/python/python/ecl/util/time_vector.py index fe39f9ef8b..7821057fc7 100644 --- a/ThirdParty/Ert/python/python/ert/util/time_vector.py +++ b/ThirdParty/Ert/python/python/ecl/util/time_vector.py @@ -16,7 +16,7 @@ import datetime import re -from ert.util import VectorTemplate, CTime, UtilPrototype +from ecl.util import VectorTemplate, CTime, UtilPrototype class TimeVector(VectorTemplate): @@ -25,7 +25,7 @@ class TimeVector(VectorTemplate): _alloc = UtilPrototype("void* time_t_vector_alloc(int, time_t )" , bind = False) _alloc_copy = UtilPrototype("time_t_vector_obj time_t_vector_alloc_copy(time_t_vector )") - _strided_copy = UtilPrototype("time_t_vector_obj time_t_vector_alloc_strided_copy(time_t_vector , time_t , time_t , time_t)") + _strided_copy = UtilPrototype("time_t_vector_obj time_t_vector_alloc_strided_copy(time_t_vector , int , int , int)") _free = UtilPrototype("void time_t_vector_free( time_t_vector )") _iget = UtilPrototype("time_t time_t_vector_iget( time_t_vector , int )") _safe_iget = UtilPrototype("time_t time_t_vector_safe_iget( time_t_vector , int )") diff --git a/ThirdParty/Ert/python/python/ecl/util/ui_return.py b/ThirdParty/Ert/python/python/ecl/util/ui_return.py new file mode 100644 index 0000000000..cfe4b28180 --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/util/ui_return.py @@ -0,0 +1,116 @@ +# Copyright (C) 2013 Statoil ASA, Norway. +# +# The file 'ui_return.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. + +from __future__ import (absolute_import, division, + print_function, unicode_literals) + +from cwrap import BaseCClass +from ecl.util import UtilPrototype +from .enums import UIReturnStatusEnum + + +class UIReturn(BaseCClass): + TYPE_NAME = "ui_return" + + _alloc = UtilPrototype("void* ui_return_alloc( ui_return_status )" , bind = False) + _free = UtilPrototype("void ui_return_free(ui_return)") + _get_status = UtilPrototype("ui_return_status ui_return_get_status(ui_return)") + _get_help = UtilPrototype("char* ui_return_get_help(ui_return)") + _add_help = UtilPrototype("void ui_return_add_help(ui_return)") + _add_error = UtilPrototype("void ui_return_add_error(ui_return)") + _num_error = UtilPrototype("int ui_return_get_error_count(ui_return)") + _last_error = UtilPrototype("char* ui_return_get_last_error(ui_return)") + _first_error = UtilPrototype("char* ui_return_get_first_error(ui_return)") + _iget_error = UtilPrototype("char* ui_return_iget_error(ui_return , int)") + + def __init__(self , status): + c_ptr = self._alloc(status) + if c_ptr: + super(UIReturn, self).__init__(c_ptr) + else: + raise ValueError('Unable to construct UIReturn with status = %s' % str(status)) + + + def __nonzero__(self): + if self.status() == UIReturnStatusEnum.UI_RETURN_OK: + return True + else: + return False + + + def __len__(self): + return self._num_error() + + + def __getitem__(self , index): + if isinstance(index , int): + if index < 0: + index += len(self) + if 0 <= index < len(self): + return self._iget_error( index) + else: + raise IndexError('Invalid index. Valid range: [0, %d)' % len(self)) + else: + raise TypeError("Lookup type must be integer") + + + def iget_error(self , index): + return self[index] + + + def help_text(self): + help_text = self._get_help() + if help_text: + return help_text + else: + return "" + + def add_help(self, help_text): + self._add_help(help_text) + + + def status(self): + return self._get_status() + + + def __assert_error(self): + if self.status() == UIReturnStatusEnum.UI_RETURN_OK: + raise ValueError("Can not add error messages to object in state RETURN_OK") + + + def add_error(self, error): + self.__assert_error() + self._add_error(error) + + + def last_error(self): + self.__assert_error() + return self._last_error() + + + def first_error(self): + self.__assert_error() + return self._first_error() + + + def free(self): + self._free() + + def __repr__(self): + ec = len(self) + st = self.status() + ad = self._ad_str() + return 'UIReturn(error_count = %d, status = %s) %s' % (ec, st, ad) diff --git a/ThirdParty/Ert/python/python/ert/util/util_func.py b/ThirdParty/Ert/python/python/ecl/util/util_func.py similarity index 98% rename from ThirdParty/Ert/python/python/ert/util/util_func.py rename to ThirdParty/Ert/python/python/ecl/util/util_func.py index 382b000ac6..0d9e4aa2ac 100644 --- a/ThirdParty/Ert/python/python/ert/util/util_func.py +++ b/ThirdParty/Ert/python/python/ecl/util/util_func.py @@ -17,7 +17,7 @@ Module with utility functions from util.c """ -from ert.util import UtilPrototype +from ecl.util import UtilPrototype strcmp_int = UtilPrototype("int util_strcmp_int( char* , char* )") """ diff --git a/ThirdParty/Ert/python/python/ert/util/vector_template.py b/ThirdParty/Ert/python/python/ecl/util/vector_template.py similarity index 80% rename from ThirdParty/Ert/python/python/ert/util/vector_template.py rename to ThirdParty/Ert/python/python/ecl/util/vector_template.py index ba56854971..56b96c582b 100644 --- a/ThirdParty/Ert/python/python/ert/util/vector_template.py +++ b/ThirdParty/Ert/python/python/ecl/util/vector_template.py @@ -40,11 +40,12 @@ float and size_t not currently implemented in the Python version. """ +from __future__ import absolute_import, division, print_function, unicode_literals + import sys -from types import IntType, SliceType from cwrap import CFILE, BaseCClass -from ert.util import UtilPrototype +from ecl.util import UtilPrototype @@ -178,14 +179,14 @@ def str(self, width=5, max_lines=10, fmt=None): """ s = "" - lines = len(self) / width + lines = len(self) // width if not fmt: fmt = self.default_format + " " if max_lines is None or lines <= max_lines: s += self.str_data(width, 0, len(self), fmt) else: - s1 = width * max_lines / 2 + s1 = width * max_lines // 2 s += self.str_data(width, 0, s1, fmt) s += " .... \n" s += self.str_data(width, len(self) - s1, len(self), fmt) @@ -203,26 +204,34 @@ def __getitem__(self, index): """ Implements read [] operator - @index can be slice instance. """ - if isinstance(index, IntType): + if isinstance(index, int): length = len(self) - if index < 0: - index += length + idx = index + if idx < 0: + idx += length - if index < 0 or index >= length: - raise IndexError("Index must be in range %d <= %d < %d" % (0, index, length)) + if 0 <= idx < length: + return self._iget(idx) else: - return self._iget(index) - elif isinstance(index, SliceType): + raise IndexError('Index must be in range %d <= %d < %d.' % (0, index, length)) + elif isinstance(index, slice): return self.strided_copy(index) else: raise TypeError("Index should be integer or slice type.") def __setitem__(self, index, value): """ - Implements write [] operator - @index must be integer. - """ - if isinstance(index, IntType): - self._iset(index, value) + Implements write [] operator - @index must be integer or slice. + """ + ls = len(self) + if isinstance(index, int): + idx = index + if idx < 0: + idx += ls + self._iset(idx, value) + elif isinstance( index, slice ): + for i in range(*index.indices(ls)): + self[i] = value else: raise TypeError("Index should be integer type") @@ -481,6 +490,9 @@ def getDefault(self): def free(self): self._free() + def __repr__(self): + return self._create_repr('size = %d' % len(self)) + def permute(self, permutation_vector): """ Reorders this vector based on the indexes in permutation_vector. @@ -548,3 +560,88 @@ def createRange(cls , min_value , max_value , delta): vector = cls( ) vector.initRange( min_value , max_value , delta ) return vector + + def _strided_copy(self, *_): + raise NotImplementedError() + def _rshift(self, *_): + raise NotImplementedError() + def _lshift(self, *_): + raise NotImplementedError() + def _alloc(self, *_): + raise NotImplementedError() + def _element_size(self, *_): + raise NotImplementedError() + def _contains(self, *_): + raise NotImplementedError() + def _pop(self, *_): + raise NotImplementedError() + def default_format(self, *_): + raise NotImplementedError() + def _iget(self, *_): + raise NotImplementedError() + def _iset(self, *_): + raise NotImplementedError() + def _inplace_add(self, *_): + raise NotImplementedError() + def _shift(self, *_): + raise NotImplementedError() + def _alloc_copy(self, *_): + raise NotImplementedError() + def _inplace_mul(self, *_): + raise NotImplementedError() + def _scale(self, *_): + raise NotImplementedError() + def _memcpy(self, *_): + raise NotImplementedError() + def _assign(self, *_): + raise NotImplementedError() + def _size(self, *_): + raise NotImplementedError() + def _fprintf(self, *_): + raise NotImplementedError() + def _get_max(self, *_): + raise NotImplementedError() + def _get_min(self, *_): + raise NotImplementedError() + def _get_min_index(self, *_): + raise NotImplementedError() + def _get_max_index(self, *_): + raise NotImplementedError() + def _append(self, *_): + raise NotImplementedError() + def _idel_block(self, *_): + raise NotImplementedError() + def _sort(self, *_): + raise NotImplementedError() + def _rsort(self, *_): + raise NotImplementedError() + def _reset(self, *_): + raise NotImplementedError() + def _safe_iget(self, *_): + raise NotImplementedError() + def _set_read_only(self, *_): + raise NotImplementedError() + def _get_read_only(self, *_): + raise NotImplementedError() + def _set_default(self, *_): + raise NotImplementedError() + def _get_default(self, *_): + raise NotImplementedError() + def _free(self, *_): + raise NotImplementedError() + def _permute(self, *_): + raise NotImplementedError() + def _sort_perm(self, *_): + raise NotImplementedError() + def _rsort_perm(self, *_): + raise NotImplementedError() + def _select_unique(self, *_): + raise NotImplementedError() + def _element_sum(self, *_): + raise NotImplementedError() + def _get_data_ptr(self, *_): + raise NotImplementedError() + def _count_equal(self, *_): + raise NotImplementedError() + def _init_range(self, *_): + raise NotImplementedError() diff --git a/ThirdParty/Ert/python/python/ert/util/version.py b/ThirdParty/Ert/python/python/ecl/util/version.py similarity index 87% rename from ThirdParty/Ert/python/python/ert/util/version.py rename to ThirdParty/Ert/python/python/ecl/util/version.py index 7b2e2d5abf..95b8957ea7 100644 --- a/ThirdParty/Ert/python/python/ert/util/version.py +++ b/ThirdParty/Ert/python/python/ecl/util/version.py @@ -1,4 +1,4 @@ -from ert.util import UtilPrototype +from ecl.util import UtilPrototype def cmp_method(method): @@ -46,6 +46,15 @@ def __cmpTuple(self): def __str__(self): return self.versionString() + def __repr__(self): + major, minor, micro = self.versionTuple() + commit = self._git_commit_short() + status = 'production' + if self.isDevelVersion(): + status = 'development' + fmt = 'Version(major=%d, minor=%d, micro="%s", commit="%s", status="%s")' + return fmt % (major, minor, micro, commit, status) + @cmp_method def __eq__(self, other): return self.versionTuple() == other.versionTuple() diff --git a/ThirdParty/Ert/python/python/ecl/well/CMakeLists.txt b/ThirdParty/Ert/python/python/ecl/well/CMakeLists.txt new file mode 100644 index 0000000000..b37c7f17c4 --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/well/CMakeLists.txt @@ -0,0 +1,13 @@ +set(PYTHON_SOURCES + __init__.py + well_connection.py + well_connection_direction_enum.py + well_info.py + well_segment.py + well_state.py + well_time_line.py + well_type_enum.py +) + +add_python_package("python.ecl.well" ${PYTHON_INSTALL_PREFIX}/ecl/well "${PYTHON_SOURCES}" True) + diff --git a/ThirdParty/Ert/python/python/ecl/well/__init__.py b/ThirdParty/Ert/python/python/ecl/well/__init__.py new file mode 100644 index 0000000000..5050afb29e --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/well/__init__.py @@ -0,0 +1,20 @@ +import ecl +import ecl.util +import ecl.geo +import ecl.ecl + +from cwrap import Prototype + +class WellPrototype(Prototype): + lib = ecl.load("libecl_well") + + def __init__(self, prototype, bind=True): + super(WellPrototype, self).__init__(WellPrototype.lib, prototype, bind=bind) + +from .well_type_enum import WellTypeEnum +from .well_connection_direction_enum import WellConnectionDirectionEnum +from .well_connection import WellConnection +from .well_segment import WellSegment +from .well_state import WellState +from .well_time_line import WellTimeLine +from .well_info import WellInfo diff --git a/ThirdParty/Ert/python/python/ecl/well/well_connection.py b/ThirdParty/Ert/python/python/ecl/well/well_connection.py new file mode 100644 index 0000000000..8dc86af3ac --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/well/well_connection.py @@ -0,0 +1,108 @@ +from cwrap import BaseCClass +from ecl.well import WellPrototype, WellConnectionDirectionEnum + +class WellConnection(BaseCClass): + TYPE_NAME = "well_connection" + + _i = WellPrototype("int well_conn_get_i(well_connection)") + _j = WellPrototype("int well_conn_get_j(well_connection)") + _k = WellPrototype("int well_conn_get_k(well_connection)") + _segment_id = WellPrototype("int well_conn_get_segment_id(well_connection)") + _is_open = WellPrototype("bool well_conn_open(well_connection)") + _is_msw = WellPrototype("bool well_conn_MSW(well_connection)") + _fracture_connection = WellPrototype("bool well_conn_fracture_connection(well_connection)") + _matrix_connection = WellPrototype("bool well_conn_matrix_connection(well_connection)") + _connection_factor = WellPrototype("double well_conn_get_connection_factor(well_connection)") + _equal = WellPrototype("bool well_conn_equal(well_connection, well_connection)") + _get_dir = WellPrototype("void* well_conn_get_dir(well_connection)") + _oil_rate = WellPrototype("double well_conn_get_oil_rate(well_connection)") + _gas_rate = WellPrototype("double well_conn_get_gas_rate(well_connection)") + _water_rate = WellPrototype("double well_conn_get_water_rate(well_connection)") + _volume_rate = WellPrototype("double well_conn_get_volume_rate(well_connection)") + + _oil_rate_si = WellPrototype("double well_conn_get_oil_rate_si(well_connection)") + _gas_rate_si = WellPrototype("double well_conn_get_gas_rate_si(well_connection)") + _water_rate_si = WellPrototype("double well_conn_get_water_rate_si(well_connection)") + _volume_rate_si = WellPrototype("double well_conn_get_volume_rate_si(well_connection)") + + def __init__(self): + raise NotImplementedError("Class can not be instantiated directly") + + + def isOpen(self): + """ @rtype: bool """ + return self._is_open() + + + def ijk(self): + """ @rtype: tuple of (int, int, int) """ + i = self._i() + j = self._j() + k = self._k() + return i, j, k + + def direction(self): + """ @rtype: WellConnectionDirectionEnum """ + return self._get_dir() + + def segmentId(self): + """ @rtype: int """ + return self._segment_id() + + def isFractureConnection(self): + """ @rtype: bool """ + return self._fracture_connection() + + def isMatrixConnection(self): + """ @rtype: bool """ + return self._matrix_connection() + + def connectionFactor(self): + """ @rtype: float """ + return self._connection_factor() + + def __eq__(self, other): + return self._equal(other) + + def __ne__(self, other): + return not self == other + + def free(self): + pass + + def isMultiSegmentWell(self): + """ @rtype: bool """ + return self._is_msw() + + def __repr__(self): + ijk = str(self.ijk()) + frac = 'fracture ' if self.isFractureConnection() else '' + open_ = 'open ' if self.isOpen() else 'shut ' + msw = ' (multi segment)' if self.isMultiSegmentWell() else '' + dir = WellConnectionDirectionEnum(self.direction()) + addr = self._address() + return 'WellConnection(%s %s%s%s, rates = (O:%s,G:%s,W:%s), direction = %s) at 0x%x' % (ijk, frac, open_, msw, self.oilRate(), self.gasRate(), self.waterRate(), dir, addr) + + def gasRate(self): + return self._gas_rate() + + def waterRate(self): + return self._water_rate() + + def oilRate(self): + return self._oil_rate() + + def volumeRate(self): + return self._volume_rate() + + def gasRateSI(self): + return self._gas_rate_si() + + def waterRateSI(self): + return self._water_rate_si() + + def oilRateSI(self): + return self._oil_rate_si() + + def volumeRateSI(self): + return self._volume_rate_si() diff --git a/ThirdParty/Ert/python/python/ecl/well/well_connection_direction_enum.py b/ThirdParty/Ert/python/python/ecl/well/well_connection_direction_enum.py new file mode 100644 index 0000000000..084d796f94 --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/well/well_connection_direction_enum.py @@ -0,0 +1,15 @@ +from cwrap import BaseCEnum + +class WellConnectionDirectionEnum(BaseCEnum): + TYPE_NAME = "well_connection_dir_enum" + well_conn_dirX = None + well_conn_dirY = None + well_conn_dirZ = None + well_conn_fracX = None + well_conn_fracY = None + +WellConnectionDirectionEnum.addEnum("well_conn_dirX", 1) +WellConnectionDirectionEnum.addEnum("well_conn_dirY", 2) +WellConnectionDirectionEnum.addEnum("well_conn_dirZ", 3) +WellConnectionDirectionEnum.addEnum("well_conn_fracX", 4) +WellConnectionDirectionEnum.addEnum("well_conn_fracY", 5) diff --git a/ThirdParty/Ert/python/python/ecl/well/well_info.py b/ThirdParty/Ert/python/python/ecl/well/well_info.py new file mode 100644 index 0000000000..31276ec8b2 --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/well/well_info.py @@ -0,0 +1,100 @@ +from cwrap import BaseCClass +from ecl.ecl import EclGrid +from ecl.ecl.ecl_file import EclFile +from ecl.well import WellTimeLine, WellPrototype + + +class WellInfo(BaseCClass): + TYPE_NAME = "well_info" + + _alloc = WellPrototype("void* well_info_alloc(ecl_grid)", bind = False) + _free = WellPrototype("void well_info_free(well_info)") + _load_rstfile = WellPrototype("void well_info_load_rstfile(well_info, char*, bool)") + _load_rst_eclfile = WellPrototype("void well_info_load_rst_eclfile(well_info, ecl_file, bool)") + _get_well_count = WellPrototype("int well_info_get_num_wells(well_info)") + _iget_well_name = WellPrototype("char* well_info_iget_well_name(well_info, int)") + _has_well = WellPrototype("bool well_info_has_well(well_info, char*)") + _get_ts = WellPrototype("well_time_line_ref well_info_get_ts(well_info, char*)") + + + def __init__(self, grid, rst_file=None, load_segment_information=True): + """ + @type grid: EclGrid + @type rst_file: str or EclFile or list of str or list of EclFile + """ + c_ptr = self._alloc(grid) + super(WellInfo, self).__init__(c_ptr) + if not c_ptr: + raise ValueError('Unable to construct WellInfo from grid %s.' % str(grid)) + + if rst_file is not None: + if isinstance(rst_file, list): + for item in rst_file: + self.addWellFile(item, load_segment_information) + else: + self.addWellFile(rst_file, load_segment_information) + + + def __repr__(self): + return 'WellInfo(well_count = %d) at 0x%x' % (len(self), self._address()) + + def __len__(self): + """ @rtype: int """ + return self._get_well_count( ) + + + def __getitem__(self, item): + """ + @type item: int or str + @rtype: WellTimeLine + """ + + if isinstance(item, str): + if not item in self: + raise KeyError("The well '%s' is not in this set." % item) + well_name = item + + elif isinstance(item, int): + if not 0 <= item < len(self): + raise IndexError("Index must be in range 0 <= %d < %d" % (item, len(self))) + well_name = self._iget_well_name( item ) + + return self._get_ts(well_name).setParent(self) + + def __iter__(self): + """ @rtype: iterator of WellTimeLine """ + index = 0 + + while index < len(self): + yield self[index] + index += 1 + + + def allWellNames(self): + """ @rtype: list of str """ + return [self._iget_well_name(index) for index in range(0, len(self))] + + + def __contains__(self, item): + """ + @type item: str + @rtype: bool + """ + return self._has_well( item ) + + def addWellFile(self, rst_file, load_segment_information): + """ @type rstfile: str or EclFile """ + if isinstance(rst_file, str): + self._load_rstfile(rst_file, load_segment_information) + elif isinstance(rst_file, EclFile): + self._load_rst_eclfile(rst_file, load_segment_information) + else: + raise TypeError("Expected the RST file to be a filename or an EclFile instance.") + + + def hasWell(self , well_name): + return well_name in self + + + def free(self): + self._free( ) diff --git a/ThirdParty/Ert/python/python/ecl/well/well_segment.py b/ThirdParty/Ert/python/python/ecl/well/well_segment.py new file mode 100644 index 0000000000..6e7aeb2f40 --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/well/well_segment.py @@ -0,0 +1,76 @@ +from cwrap import BaseCClass +from ecl.well import WellPrototype + +class WellSegment(BaseCClass): + TYPE_NAME = "well_segment" + + _active = WellPrototype("bool well_segment_active(well_segment)") + _main_stem = WellPrototype("bool well_segment_main_stem(well_segment)") + _nearest_wellhead = WellPrototype("bool well_segment_nearest_wellhead(well_segment)") + _id = WellPrototype("int well_segment_get_id(well_segment)") + _link_count = WellPrototype("int well_segment_get_link_count(well_segment)") + _branch_id = WellPrototype("int well_segment_get_branch_id(well_segment)") + _outlet_id = WellPrototype("int well_segment_get_outlet_id(well_segment)") + _depth = WellPrototype("double well_segment_get_depth(well_segment)") + _length = WellPrototype("double well_segment_get_length(well_segment)") + _total_length = WellPrototype("double well_segment_get_total_length(well_segment)") + _diameter = WellPrototype("double well_segment_get_diameter(well_segment)") + + def __init__(self): + raise NotImplementedError("Class can not be instantiated directly") + + def free(self): + pass + + def __repr__(self): + return 'WellSegment(%s) at 0x%x' % (str(self), self._address()) + + def __str__(self): + return "{Segment ID:%d BranchID:%d Length:%g}" % (self.id() , self.branchId() , self.length()) + + def id(self): + """ @rtype: int """ + return self._id() + + def linkCount(self): + """ @rtype: int """ + return self._link_count() + + def branchId(self): + """ @rtype: int """ + return self._branch_id() + + def outletId(self): + """ @rtype: int """ + return self._outlet_id() + + def isActive(self): + """ @rtype: bool """ + return self._active() + + def isMainStem(self): + """ @rtype: bool """ + return self._main_stem() + + def isNearestWellHead(self): + """ @rtype: bool """ + return self._nearest_wellhead() + + def depth(self): + """ @rtype: float """ + return self._depth() + + def __len__(self): + return self.length() + + def length(self): + """ @rtype: float """ + return self._length() + + def totalLength(self): + """ @rtype: float """ + return self._total_length() + + def diameter(self): + """ @rtype: float """ + return self._diameter() diff --git a/ThirdParty/Ert/python/python/ecl/well/well_state.py b/ThirdParty/Ert/python/python/ecl/well/well_state.py new file mode 100644 index 0000000000..6d0cadf567 --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/well/well_state.py @@ -0,0 +1,164 @@ +from cwrap import BaseCClass +from ecl.well import WellTypeEnum, WellConnection, WellPrototype +from ecl.util import CTime + +class WellState(BaseCClass): + TYPE_NAME = "well_state" + + _global_connections_size = WellPrototype("int well_conn_collection_get_size(void*)", bind = False) + _global_connections_iget = WellPrototype("well_connection_ref well_conn_collection_iget(void*, int)", bind = False) + _segment_collection_size = WellPrototype("int well_segment_collection_get_size(void*)", bind = False) + _segment_collection_iget = WellPrototype("well_segment_ref well_segment_collection_iget(void*, int)", bind = False) + _has_global_connections = WellPrototype("bool well_state_has_global_connections(well_state)") + _get_global_connections = WellPrototype("void* well_state_get_global_connections(well_state)") + _get_segment_collection = WellPrototype("void* well_state_get_segments(well_state)") + _branches = WellPrototype("void* well_state_get_branches(well_state)") + _segments = WellPrototype("void* well_state_get_segments(well_state)") + _get_name = WellPrototype("char* well_state_get_name(well_state)") + _is_open = WellPrototype("bool well_state_is_open(well_state)") + _is_msw = WellPrototype("bool well_state_is_MSW(well_state)") + _well_number = WellPrototype("int well_state_get_well_nr(well_state)") + _report_number = WellPrototype("int well_state_get_report_nr(well_state)") + _has_segment_data = WellPrototype("bool well_state_has_segment_data(well_state)") + _sim_time = WellPrototype("time_t well_state_get_sim_time(well_state)") + _well_type = WellPrototype("well_type_enum well_state_get_type(well_state)") + _oil_rate = WellPrototype("double well_state_get_oil_rate(well_state)") + _gas_rate = WellPrototype("double well_state_get_gas_rate(well_state)") + _water_rate = WellPrototype("double well_state_get_water_rate(well_state)") + _volume_rate = WellPrototype("double well_state_get_volume_rate(well_state)") + _oil_rate_si = WellPrototype("double well_state_get_oil_rate_si(well_state)") + _gas_rate_si = WellPrototype("double well_state_get_gas_rate_si(well_state)") + _water_rate_si = WellPrototype("double well_state_get_water_rate_si(well_state)") + _volume_rate_si = WellPrototype("double well_state_get_volume_rate_si(well_state)") + _get_global_well_head = WellPrototype("well_connection_ref well_state_get_global_wellhead(well_state)") + + def __init__(self): + raise NotImplementedError("Class can not be instantiated directly") + + def name(self): + """ @rtype: str """ + return self._get_name( ) + + def isOpen(self): + """ @rtype: bool """ + return self._is_open( ) + + def free(self): + pass + + def wellHead(self): + well_head = self._get_global_well_head() + well_head.setParent( self ) + return well_head + + def wellNumber(self): + """ @rtype: int """ + return self._well_number( ) + + def reportNumber(self): + """ @rtype: int """ + return self._report_number( ) + + def simulationTime(self): + """ @rtype: CTime """ + return self._sim_time( ) + + def wellType(self): + """ @rtype: WellTypeEnum """ + return self._well_type( ) + + def hasGlobalConnections(self): + """ @rtype: bool """ + return self._has_global_connections( ) + + def globalConnections(self): + """ @rtype: list of WellConnection """ + global_connections = self._get_global_connections( ) + count = self._global_connections_size( global_connections ) + + values = [] + for index in range(count): + value = self._global_connections_iget(global_connections, index).setParent( self ) + values.append(value) + return values + + def __len__(self): + return self.numSegments() + + def __getitem__(self, idx): + return self.igetSegment(idx) + + def numSegments(self): + """ @rtype: int """ + segment_collection = self._get_segment_collection( ) + count = self._segment_collection_size(segment_collection) + return count + + + def segments(self): + """ @rtype: list of WellSegment """ + segment_collection = self._get_segment_collection( ) + + values = [] + for index in range(self.numSegments()): + value = self._segment_collection_iget(segment_collection, index).setParent(self) + values.append(value) + + return values + + + def igetSegment(self , seg_idx): + """ @rtype: WellSegment """ + if seg_idx < 0: + seg_idx += len(self) + + if not 0 <= seg_idx < self.numSegments(): + raise IndexError("Invalid index:%d - valid range [0,%d)" % (seg_idx , len(self))) + + segment_collection = self._get_segment_collection( ) + return self._segment_collection_iget(segment_collection, seg_idx).setParent(self) + + def isMultiSegmentWell(self): + """ @rtype: bool """ + return self._is_msw( ) + + def hasSegmentData(self): + """ @rtype: bool """ + return self._has_segment_data( ) + + def __repr__(self): + name = self.name() + if name: + name = '%s' % name + else: + name = '[no name]' + msw = ' (multi segment)' if self.isMultiSegmentWell() else '' + wn = str(self.wellNumber()) + type_ = self.wellType() + open_ = 'open' if self.isOpen() else 'shut' + cnt = '%s%s, number = %s, type = "%s", state = %s' % (name, msw, wn, type_, open_) + return self._create_repr(cnt) + + def gasRate(self): + return self._gas_rate( ) + + def waterRate(self): + return self._water_rate( ) + + def oilRate(self): + return self._oil_rate( ) + + def volumeRate(self): + return self._volume_rate( ) + + def gasRateSI(self): + return self._gas_rate_si( ) + + def waterRateSI(self): + return self._water_rate_si( ) + + def oilRateSI(self): + return self._oil_rate_si( ) + + def volumeRateSI(self): + return self._volume_rate_si( ) diff --git a/ThirdParty/Ert/python/python/ecl/well/well_time_line.py b/ThirdParty/Ert/python/python/ecl/well/well_time_line.py new file mode 100644 index 0000000000..bc42a20e82 --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/well/well_time_line.py @@ -0,0 +1,42 @@ +from cwrap import BaseCClass +from ecl.well import WellState, WellPrototype + +class WellTimeLine(BaseCClass): + TYPE_NAME = "well_time_line" + _size = WellPrototype("int well_ts_get_size(well_time_line)") + _name = WellPrototype("char* well_ts_get_name(well_time_line)") + _iget = WellPrototype("well_state_ref well_ts_iget_state(well_time_line, int)") + + def __init__(self): + raise NotImplementedError("Class can not be instantiated directly") + + def getName(self): + return self._name() + + def __len__(self): + """ @rtype: int """ + return self._size() + + + def __getitem__(self, index): + """ + @type index: int + @rtype: WellState + """ + + if index < 0: + index += len(self) + + if not 0 <= index < len(self): + raise IndexError("Index must be in range 0 <= %d < %d" % (index, len(self))) + + return self._iget(index).setParent(self) + + def free(self): + pass + + def __repr__(self): + n = self.getName() + l = len(self) + cnt = 'name = %s, size = %d' % (n,l) + return self._create_repr(cnt) diff --git a/ThirdParty/Ert/python/python/ecl/well/well_type_enum.py b/ThirdParty/Ert/python/python/ecl/well/well_type_enum.py new file mode 100644 index 0000000000..f44e01fd22 --- /dev/null +++ b/ThirdParty/Ert/python/python/ecl/well/well_type_enum.py @@ -0,0 +1,16 @@ +from cwrap import BaseCEnum + +class WellTypeEnum(BaseCEnum): + TYPE_NAME = "well_type_enum" + ECL_WELL_ZERO = None + ECL_WELL_PRODUCER = None + ECL_WELL_WATER_INJECTOR = None + ECL_WELL_GAS_INJECTOR = None + ECL_WELL_OIL_INJECTOR = None + +WellTypeEnum.addEnum("ECL_WELL_ZERO", 0) +WellTypeEnum.addEnum("ECL_WELL_PRODUCER", 1) +WellTypeEnum.addEnum("ECL_WELL_OIL_INJECTOR", 2) +WellTypeEnum.addEnum("ECL_WELL_WATER_INJECTOR", 3) +WellTypeEnum.addEnum("ECL_WELL_GAS_INJECTOR", 4) + diff --git a/ThirdParty/Ert/python/python/ert/CMakeLists.txt b/ThirdParty/Ert/python/python/ert/CMakeLists.txt deleted file mode 100644 index 708c201d2d..0000000000 --- a/ThirdParty/Ert/python/python/ert/CMakeLists.txt +++ /dev/null @@ -1,30 +0,0 @@ -set(PYTHON_SOURCES - __init__.py -) -add_python_package("python.ert" ${PYTHON_INSTALL_PREFIX}/ert "${PYTHON_SOURCES}" True) - -add_subdirectory(ecl) -add_subdirectory(geo) -add_subdirectory(test) -add_subdirectory(util) -add_subdirectory(well) - -IF (BUILD_ERT) - set( ERT_SITE_INIT_TARGET "" CACHE FILE "Name of optional external site init module for top level ert package") - if (EXISTS ${ERT_SITE_INIT_TARGET}) - message(STATUS "Using ert site init module: ${ERT_SITE_INIT_TARGET}") - install(FILES ${ERT_SITE_INIT_TARGET} DESTINATION ${PYTHON_INSTALL_PREFIX}/ert RENAME ert_site_init.py) - endif() - add_subdirectory(analysis) - add_subdirectory(config) - add_subdirectory(enkf) - add_subdirectory(job_queue) - add_subdirectory(rms) - add_subdirectory(sched) - add_subdirectory(server) -ENDIF() - - -configure_file(ert_lib_info_build.py.in ${PROJECT_BINARY_DIR}/${PYTHON_INSTALL_PREFIX}/ert/__ert_lib_info.py ) -configure_file(ert_lib_info_install.py.in ${PROJECT_BINARY_DIR}/${PYTHON_INSTALL_PREFIX}/ert_lib_info_install.py ) -install(FILES ${PROJECT_BINARY_DIR}/${PYTHON_INSTALL_PREFIX}/ert_lib_info_install.py DESTINATION ${PYTHON_INSTALL_PREFIX}/ert RENAME __ert_lib_info.py) diff --git a/ThirdParty/Ert/python/python/ert/__init__.py b/ThirdParty/Ert/python/python/ert/__init__.py deleted file mode 100644 index 81c0ab9530..0000000000 --- a/ThirdParty/Ert/python/python/ert/__init__.py +++ /dev/null @@ -1,125 +0,0 @@ -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file '__init__.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -""" -ert - Ensemble Reservoir Tool - a package for reservoir modeling. - -The ert package itself has no code, but contains several subpackages: - -ert.ecl: Package for working with ECLIPSE files. The far most mature - package in ert. - -ert.job_queue: - -ert.util: - -The ert package is based on wrapping the libriaries from the ERT C -code with ctypes; an essential part of ctypes approach is to load the -shared libraries with the ctypes.CDLL() function. The ctypes.CDLL() -function uses the standard methods of the operating system, -i.e. standard locations configured with ld.so.conf and the environment -variable LD_LIBRARY_PATH. - -To avoid conflict with other application using the ert libraries the -Python code should be able to locate the shared libraries without -(necessarily) using the LD_LIBRARY_PATH variable. The default -behaviour is to try to load from the library ../../lib64, but by using -the enviornment variable ERT_LIBRARY_PATH you can alter how ert looks -for shared libraries. - - 1. By default the code will try to load the shared libraries from - '../../lib64' relative to the location of this file. - - 2. Depending on the value of ERT_LIBRARY_PATH two different - behaviours can be imposed: - - Existing path: the package will look in the path pointed to - by ERT_LIBRARY_PATH for shared libraries. - - Arbitrary value: the package will use standard load order for - the operating system. - -If the fixed path, given by the default ../../lib64 or ERT_LIBRARY_PATH -alternative fails, the loader will try the default load behaviour -before giving up completely. -""" -import os.path -import sys -import warnings -from cwrap import load as cwrapload - -try: - import ert_site_init -except ImportError: - pass - - -required_version_hex = 0x02060000 - -ert_lib_path = None -ert_so_version = "" -__version__ = "0.0.0" - - -# 1. Try to load the __ert_lib_info module; this module has been -# configured by cmake during the build configuration process. The -# module should contain the variable lib_path pointing to the -# directory with shared object files. -try: - import __ert_lib_info - ert_lib_path = __ert_lib_info.lib_path - ert_so_version = __ert_lib_info.so_version - __version__ = __ert_lib_info.__version__ -except ImportError: - pass -except AttributeError: - pass - - -# 2. Using the environment variable ERT_LIBRARY_PATH it is possible to -# override the default algorithms. If the ERT_LIBRARY_PATH is set -# to a non existing directory a warning will go to stderr and the -# setting will be ignored. -env_lib_path = os.getenv("ERT_LIBRARY_PATH") -if env_lib_path: - if os.path.isdir( env_lib_path ): - ert_lib_path = os.getenv("ERT_LIBRARY_PATH") - else: - sys.stderr.write("Warning: Environment variable ERT_LIBRARY_PATH points to nonexisting directory:%s - ignored" % env_lib_path) - - -# Check that the final ert_lib_path setting corresponds to an existing -# directory. -if ert_lib_path: - if not os.path.isdir( ert_lib_path ): - ert_lib_path = None - - -if sys.hexversion < required_version_hex: - raise Exception("ERT Python requires at least version 2.6 of Python") - -# This load() function is *the* function actually loading shared -# libraries. - -def load(name): - return cwrapload( name , path = ert_lib_path , so_version = ert_so_version) - - -from ert.util import Version -from ert.util import updateAbortSignals - -updateAbortSignals( ) - -#----------------------------------------------------------------- diff --git a/ThirdParty/Ert/python/python/ert/analysis/CMakeLists.txt b/ThirdParty/Ert/python/python/ert/analysis/CMakeLists.txt deleted file mode 100644 index 5f20dd0a2a..0000000000 --- a/ThirdParty/Ert/python/python/ert/analysis/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - analysis_module.py - linalg.py -) - -add_python_package("python.ert.analysis." ${PYTHON_INSTALL_PREFIX}/ert/analysis/ "${PYTHON_SOURCES}" True) - -add_subdirectory(enums) diff --git a/ThirdParty/Ert/python/python/ert/analysis/__init__.py b/ThirdParty/Ert/python/python/ert/analysis/__init__.py deleted file mode 100644 index 58bae50467..0000000000 --- a/ThirdParty/Ert/python/python/ert/analysis/__init__.py +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file '__init__.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - - -import ert -from cwrap import Prototype -import ert.util - -class AnalysisPrototype(Prototype): - lib = ert.load("libanalysis") - - def __init__(self, prototype, bind=True): - super(AnalysisPrototype, self).__init__(AnalysisPrototype.lib, prototype, bind=bind) - - - -ANALYSIS_LIB = ert.load("libanalysis") - -from .enums import AnalysisModuleOptionsEnum, AnalysisModuleLoadStatusEnum - -from .analysis_module import AnalysisModule -from .linalg import Linalg diff --git a/ThirdParty/Ert/python/python/ert/analysis/analysis_module.py b/ThirdParty/Ert/python/python/ert/analysis/analysis_module.py deleted file mode 100644 index c1cb82d131..0000000000 --- a/ThirdParty/Ert/python/python/ert/analysis/analysis_module.py +++ /dev/null @@ -1,175 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'analysis_module.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -from cwrap import BaseCClass -from ert.util.rng import RandomNumberGenerator -from ert.analysis import AnalysisPrototype - - -class AnalysisModule(BaseCClass): - TYPE_NAME = "analysis_module" - - _alloc_external = AnalysisPrototype("void* analysis_module_alloc_external(rng, char*)" , bind = False) - _alloc_internal = AnalysisPrototype("void* analysis_module_alloc_internal(rng, char*)" , bind = False) - _free = AnalysisPrototype("void analysis_module_free(analysis_module)") - _get_lib_name = AnalysisPrototype("char* analysis_module_get_lib_name(analysis_module)") - _get_module_internal = AnalysisPrototype("bool analysis_module_internal(analysis_module)") - _set_var = AnalysisPrototype("bool analysis_module_set_var(analysis_module, char*, char*)") - _get_table_name = AnalysisPrototype("char* analysis_module_get_table_name(analysis_module)") - _get_name = AnalysisPrototype("char* analysis_module_get_name(analysis_module)") - _check_option = AnalysisPrototype("bool analysis_module_check_option(analysis_module, long)") - _has_var = AnalysisPrototype("bool analysis_module_has_var(analysis_module, char*)") - _get_double = AnalysisPrototype("double analysis_module_get_double(analysis_module, char*)") - _get_int = AnalysisPrototype("int analysis_module_get_int(analysis_module, char*)") - _get_bool = AnalysisPrototype("bool analysis_module_get_bool(analysis_module, char*)") - _get_str = AnalysisPrototype("char* analysis_module_get_ptr(analysis_module, char*)") - _init_update = AnalysisPrototype("void analysis_module_init_update(analysis_module, bool_vector , matrix , matrix , matrix , matrix, matrix)") - _updateA = AnalysisPrototype("void analysis_module_updateA(analysis_module, matrix , matrix , matrix , matrix, matrix, matrix, void*)") - _initX = AnalysisPrototype("void analysis_module_initX(analysis_module, matrix , matrix , matrix , matrix , matrix, matrix, matrix)") - - - # The VARIABLE_NAMES field is a completly broken special case - # which only applies to the rml module. - VARIABLE_NAMES = { - "LAMBDA0": {"type": float, "description": "Initial Lambda"}, - "USE_PRIOR": {"type": bool, "description": "Use both Prior and Observation Variability"}, - "LAMBDA_REDUCE": {"type": float, "description": "Lambda Reduction Factor"}, - "LAMBDA_INCREASE": {"type": float, "description": "Lambda Incremental Factor"}, - "LAMBDA_MIN": {"type": float, "description": "Minimum Lambda"}, - "LOG_FILE": {"type": str, "description": "Log File"}, - "CLEAR_LOG": {"type": bool, "description": "Clear Existing Log File"}, - "LAMBDA_RECALCULATE": {"type": bool, "description": "Recalculate Lambda after each Iteration"}, - "ENKF_TRUNCATION": {"type": float, "description": "Singular value truncation"}, - "ENKF_NCOMP": {"type": int, "description": "ENKF_NCOMP"}, - "CV_NFOLDS": {"type": int, "description": "CV_NFOLDS"}, - "FWD_STEP_R2_LIMIT": {"type": float, "description": "FWD_STEP_R2_LIMIT"}, - "CV_PEN_PRESS": {"type": bool, "description": "CV_PEN_PRESS"} - } - - def __init__(self, rng , name = None , lib_name = None): - if name is None and lib_name is None: - raise ValueError("Must supply exactly one of lib or lib_name") - - if name and lib_name: - raise ValueError("Must supply exactly one of name or lib_name") - - if lib_name: - c_ptr = self._alloc_external(rng, lib_name ) - else: - c_ptr = self._alloc_internal( rng , name ) - if not c_ptr: - raise KeyError("Failed to load internal module:%s" % name) - - super(AnalysisModule, self).__init__(c_ptr) - - - def getVariableNames(self): - """ @rtype: list of str """ - items = [] - for name in AnalysisModule.VARIABLE_NAMES: - if self.hasVar(name): - items.append(name) - return items - - def getVariableValue(self, name): - """ @rtype: int or float or bool or str """ - variable_type = self.getVariableType(name) - if variable_type == float: - return self.getDouble(name) - elif variable_type == bool: - return self.getBool(name) - elif variable_type == str: - return self.getStr(name) - elif variable_type == int: - return self.getInt(name) - - def getVariableType(self, name): - """ :rtype: type """ - return AnalysisModule.VARIABLE_NAMES[name]["type"] - - def getVariableDescription(self, name): - """ :rtype: str """ - return AnalysisModule.VARIABLE_NAMES[name]["description"] - - def getVar(self, name): - return self.getVariableValue( name ) - - def free(self): - self._free( ) - - def getLibName(self): - return self._get_lib_name( ) - - def getInternal(self): - return self._get_module_internal( ) - - def __assertVar(self , var_name): - if not self.hasVar(var_name): - raise KeyError("Module does not support key:%s" % var_name) - - def setVar(self, var_name, value): - self.__assertVar( var_name ) - string_value = str(value) - return self._set_var(var_name, string_value) - - - def getTableName(self): - return self._get_table_name( ) - - def getName(self): - """ :rtype: str """ - return self._get_name( ) - - def checkOption(self, flag): - return self._check_option(flag) - - def hasVar(self, var): - """ :rtype: bool """ - return self._has_var(var) - - def getDouble(self, var): - """ :rtype: float """ - self.__assertVar( var ) - return self._get_double(var) - - def getInt(self, var): - """ :rtype: int """ - self.__assertVar( var ) - return self._get_int(var) - - def getBool(self, var): - """ :rtype: bool """ - self.__assertVar( var ) - return self._get_bool(var) - - def getStr(self, var): - """ :rtype: str """ - self.__assertVar( var ) - return self._get_str(var) - - - def initUpdate(self, mask, S, R, dObs, E, D): - self._init_update(mask, S, R, dObs, E, D) - - - def updateA(self, A, S, R, dObs, E, D): - self._updateA(A, S, R, dObs, E, D, None) - - - def initX(self, A, S, R, dObs, E, D): - X = Matrix( A.columns() , A.columns()) - self._initX(X, A, S, R, dObs, E, D) - return X diff --git a/ThirdParty/Ert/python/python/ert/analysis/enums/CMakeLists.txt b/ThirdParty/Ert/python/python/ert/analysis/enums/CMakeLists.txt deleted file mode 100644 index 55b145c74b..0000000000 --- a/ThirdParty/Ert/python/python/ert/analysis/enums/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - analysis_module_options_enum.py - analysis_module_load_status_enum.py -) - -add_python_package("python.ert.analysis.enums" ${PYTHON_INSTALL_PREFIX}/ert/analysis/enums "${PYTHON_SOURCES}" True) - - - diff --git a/ThirdParty/Ert/python/python/ert/analysis/enums/__init__.py b/ThirdParty/Ert/python/python/ert/analysis/enums/__init__.py deleted file mode 100644 index fecedb4bc1..0000000000 --- a/ThirdParty/Ert/python/python/ert/analysis/enums/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -from .analysis_module_options_enum import AnalysisModuleOptionsEnum -from .analysis_module_load_status_enum import AnalysisModuleLoadStatusEnum - diff --git a/ThirdParty/Ert/python/python/ert/analysis/enums/analysis_module_load_status_enum.py b/ThirdParty/Ert/python/python/ert/analysis/enums/analysis_module_load_status_enum.py deleted file mode 100644 index ca3c3f3cee..0000000000 --- a/ThirdParty/Ert/python/python/ert/analysis/enums/analysis_module_load_status_enum.py +++ /dev/null @@ -1,35 +0,0 @@ - -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'analysis_module_load_status_enum.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - - -from cwrap import BaseCEnum -from ert.analysis import ANALYSIS_LIB - - -class AnalysisModuleLoadStatusEnum(BaseCEnum): - LOAD_OK = None - DLOPEN_FAILURE = None - LOAD_SYMBOL_TABLE_NOT_FOUND = None - -AnalysisModuleLoadStatusEnum.addEnum("LOAD_OK", 0) -AnalysisModuleLoadStatusEnum.addEnum("DLOPEN_FAILURE", 1) -AnalysisModuleLoadStatusEnum.addEnum("LOAD_SYMBOL_TABLE_NOT_FOUND", 2) -AnalysisModuleLoadStatusEnum.registerEnum(ANALYSIS_LIB, "analysis_module_load_status_enum") - - - - diff --git a/ThirdParty/Ert/python/python/ert/analysis/enums/analysis_module_options_enum.py b/ThirdParty/Ert/python/python/ert/analysis/enums/analysis_module_options_enum.py deleted file mode 100644 index 45fd170195..0000000000 --- a/ThirdParty/Ert/python/python/ert/analysis/enums/analysis_module_options_enum.py +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'analysis_module_options_enum.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCEnum -from ert.analysis import ANALYSIS_LIB - - -class AnalysisModuleOptionsEnum(BaseCEnum): - ANALYSIS_NEED_ED = None - ANALYSIS_USE_A = None - ANALYSIS_UPDATE_A = None - ANALYSIS_SCALE_DATA = None - ANALYSIS_ITERABLE = None - -AnalysisModuleOptionsEnum.populateEnum(ANALYSIS_LIB , "analysis_module_flag_enum_iget") -AnalysisModuleOptionsEnum.registerEnum(ANALYSIS_LIB , "analysis_module_options_enum") - - - diff --git a/ThirdParty/Ert/python/python/ert/analysis/linalg.py b/ThirdParty/Ert/python/python/ert/analysis/linalg.py deleted file mode 100644 index 35782dfcd8..0000000000 --- a/ThirdParty/Ert/python/python/ert/analysis/linalg.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (C) 2015 Statoil ASA, Norway. -# -# The file 'linalg.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -from cwrap import BaseCClass -from ert.analysis import AnalysisPrototype - - -__all__ = ["numPC"] - -class Linalg(BaseCClass): - """ - The linalg class is a purely static class which mainly serves as a - namespace for a collection of ensemble based linear algebra - methods. - """ - _get_num_PC = AnalysisPrototype("int enkf_linalg_num_PC( matrix , double)" , bind = False) - - @staticmethod - def numPC(S , truncation): - if 0 < truncation <= 1: - return Linalg._get_num_PC( S , truncation ) - else: - raise ValueError("truncation must be in the interval (0,1]") - diff --git a/ThirdParty/Ert/python/python/ert/config/CMakeLists.txt b/ThirdParty/Ert/python/python/ert/config/CMakeLists.txt deleted file mode 100644 index 9430aef981..0000000000 --- a/ThirdParty/Ert/python/python/ert/config/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - schema_item.py - config_error.py - config_parser.py - config_content.py - content_type_enum.py - unrecognized_enum.py -) - -add_python_package("python.ert.config" ${PYTHON_INSTALL_PREFIX}/ert/config "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert/config/__init__.py b/ThirdParty/Ert/python/python/ert/config/__init__.py deleted file mode 100644 index b014c51a99..0000000000 --- a/ThirdParty/Ert/python/python/ert/config/__init__.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file '__init__.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import Prototype -import ert -import ert.util - -class ConfigPrototype(Prototype): - lib = ert.load("libconfig") - - def __init__(self, prototype, bind=True): - super(ConfigPrototype, self).__init__(ConfigPrototype.lib, prototype, bind=bind) - -from .unrecognized_enum import UnrecognizedEnum -from .content_type_enum import ContentTypeEnum -from .config_error import ConfigError -from .schema_item import SchemaItem -from .config_content import ConfigContent , ContentItem, ContentNode -from .config_parser import ConfigParser - diff --git a/ThirdParty/Ert/python/python/ert/config/config_content.py b/ThirdParty/Ert/python/python/ert/config/config_content.py deleted file mode 100644 index 29a03c6f39..0000000000 --- a/ThirdParty/Ert/python/python/ert/config/config_content.py +++ /dev/null @@ -1,198 +0,0 @@ -# Copyright (C) 2015 Statoil ASA, Norway. -# -# The file 'config_content.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -import os.path - -from ert.config import UnrecognizedEnum, ContentTypeEnum, ConfigError, ConfigPrototype, SchemaItem -from cwrap import BaseCClass - - -class ContentNode(BaseCClass): - TYPE_NAME = "content_node" - - _iget = ConfigPrototype("char* config_content_node_iget( content_node , int)") - _size = ConfigPrototype("int config_content_node_get_size( content_node )") - _get_full_string = ConfigPrototype("char* config_content_node_get_full_string( content_node , char* )") - _iget_type = ConfigPrototype("config_content_type_enum config_content_node_iget_type( content_node , int)") - _iget_as_abspath = ConfigPrototype("char* config_content_node_iget_as_abspath( content_node , int)") - _iget_as_relpath = ConfigPrototype("char* config_content_node_iget_as_relpath( content_node , int)") - _iget_as_string = ConfigPrototype("char* config_content_node_iget( content_node , int)") - _iget_as_int = ConfigPrototype("int config_content_node_iget_as_int( content_node , int)") - _iget_as_double = ConfigPrototype("double config_content_node_iget_as_double( content_node , int)") - _iget_as_path = ConfigPrototype("char* config_content_node_iget_as_path( content_node , int)") - _iget_as_bool = ConfigPrototype("bool config_content_node_iget_as_bool( content_node , int)") - _iget_as_isodate = ConfigPrototype("time_t config_content_node_iget_as_isodate( content_node , int)") - - typed_get = { - ContentTypeEnum.CONFIG_STRING: _iget_as_string, - ContentTypeEnum.CONFIG_INT: _iget_as_int, - ContentTypeEnum.CONFIG_FLOAT: _iget_as_double, - ContentTypeEnum.CONFIG_PATH: _iget_as_path, - ContentTypeEnum.CONFIG_EXISTING_PATH: _iget_as_path, - ContentTypeEnum.CONFIG_BOOL: _iget_as_bool, - ContentTypeEnum.CONFIG_ISODATE: _iget_as_isodate - } - - - def __init__(self): - raise NotImplementedError("Class can not be instantiated directly!") - - def __len__(self): - return self._size() - - def __assertIndex(self , index): - if isinstance(index, int): - if index < 0: - index += len(self) - - if not 0 <= index < len(self): - raise IndexError - return index - else: - raise TypeError("Invalid argument type: %s" % index) - - - def __getitem__(self, index): - index = self.__assertIndex(index) - - content_type = self._iget_type(index) - typed_get = self.typed_get[content_type] - return typed_get(self, index) - - def getPath(self , index = 0, absolute = True , relative_start = None): - index = self.__assertIndex(index) - content_type = self._iget_type(index) - if content_type in [ContentTypeEnum.CONFIG_EXISTING_PATH , ContentTypeEnum.CONFIG_PATH]: - if absolute: - return self._iget_as_abspath(index) - else: - if relative_start is None: - return self._iget_as_relpath(index) - else: - abs_path = self._iget_as_abspath(index) - return os.path.relpath( abs_path , relative_start ) - else: - raise TypeError("The getPath() method can only be called on PATH items") - - def content(self, sep=" "): - return self._get_full_string(sep) - - - def igetString(self , index): - index = self.__assertIndex(index) - return self._iget(index ) - - - def asList(self): - return [x for x in self] - - - -class ContentItem(BaseCClass): - TYPE_NAME = "content_item" - - _alloc = ConfigPrototype("void* config_content_item_alloc( schema_item , void* )" , bind = False ) - _size = ConfigPrototype("int config_content_item_get_size( content_item )") - _iget_content_node = ConfigPrototype("content_node_ref config_content_item_iget_node( content_item , int)") - _free = ConfigPrototype("void config_content_item_free( content_item )") - - def __init__(self , schema_item): - path_elm = None - c_ptr = self._alloc( schema_item , path_elm) - super( ContentItem, self).__init__(c_ptr) - - - def __len__(self): - return self._size() - - - def __getitem__(self, index): - if isinstance(index, int): - if index < 0: - index += len(self) - - if (index >= 0) and (index < len(self)): - return self._iget_content_node(index).setParent(self) - else: - raise IndexError - else: - raise TypeError("[] operator must have integer index") - - def last(self): - return self[-1] - - def getValue(self , item_index = -1 , node_index = 0): - node = self[item_index] - return node[node_index] - - - def free(self): - self._free( ) - - - -class ConfigContent(BaseCClass): - TYPE_NAME = "config_content" - - _free = ConfigPrototype("void config_content_free( config_content )") - _is_valid = ConfigPrototype("bool config_content_is_valid( config_content )") - _has_key = ConfigPrototype("bool config_content_has_item( config_content , char*)") - _get_item = ConfigPrototype("content_item_ref config_content_get_item( config_content , char*)") - _get_errors = ConfigPrototype("config_error_ref config_content_get_errors( config_content )") - - def __init__(self): - raise NotImplementedError("Class can not be instantiated directly!") - - def __contains__(self , key): - return self._has_key(key) - - def setParser(self , parser): - self._parser = parser - - - def __getitem__(self , key): - if key in self: - item = self._get_item(key) - item.setParent( self ) - return item - else: - if key in self._parser: - schema_item = SchemaItem( key ) - return ContentItem( schema_item ) - else: - raise KeyError("No such key: %s" % key) - - - def hasKey(self,key): - return key in self - - - def getValue(self , key , item_index = -1 , node_index = 0): - item = self[key] - return item.getValue( item_index , node_index ) - - - def isValid(self): - return self._is_valid() - - - def free(self): - self._free() - - - def getErrors(self): - """ @rtype: ConfigError """ - return self._get_errors() diff --git a/ThirdParty/Ert/python/python/ert/config/config_error.py b/ThirdParty/Ert/python/python/ert/config/config_error.py deleted file mode 100644 index 515adc8908..0000000000 --- a/ThirdParty/Ert/python/python/ert/config/config_error.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'enkf_fs.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from ert.config import ConfigPrototype -from cwrap import BaseCClass - - - -class ConfigError(BaseCClass): - TYPE_NAME = "config_error" - _free = ConfigPrototype("void config_error_free(config_error)") - _count = ConfigPrototype("int config_error_count(config_error)") - _iget = ConfigPrototype("char* config_error_iget(config_error, int)") - - def __init__(self): - raise NotImplementedError("Class can not be instantiated directly!") - - def __getitem__(self, index): - """ @rtype: str """ - if not isinstance(index, int): - raise TypeError("Expected an integer") - - size = len(self) - if index >= size: - raise IndexError("Index out of range: %d < %d" % (index, size)) - - return self._iget(index) - - def __len__(self): - """ @rtype: int """ - return self._count() - - def free(self): - self._free() - diff --git a/ThirdParty/Ert/python/python/ert/config/config_parser.py b/ThirdParty/Ert/python/python/ert/config/config_parser.py deleted file mode 100644 index c4f75049f7..0000000000 --- a/ThirdParty/Ert/python/python/ert/config/config_parser.py +++ /dev/null @@ -1,84 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'config_parser.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -import sys -import os.path - -from ert.config import UnrecognizedEnum, ContentTypeEnum , ConfigContent, ConfigPrototype -from cwrap import BaseCClass - - -class ConfigParser(BaseCClass): - TYPE_NAME = "config_parser" - - _alloc = ConfigPrototype("void* config_alloc( )", bind=False) - _add = ConfigPrototype("schema_item_ref config_add_schema_item( config_parser , char* , bool)") - _free = ConfigPrototype("void config_free( config_parser )") - _parse = ConfigPrototype("config_content_obj config_parse( config_parser , char* , char* , char* , char* , hash , config_unrecognized_enum , bool )") - _get_schema_item = ConfigPrototype("schema_item_ref config_get_schema_item( config_parser , char*)") - _has_schema_item = ConfigPrototype("bool config_has_schema_item( config_parser , char*)") - - def __init__(self): - c_ptr = self._alloc() - super(ConfigParser, self).__init__(c_ptr) - - - def __contains__(self , keyword): - return self._has_schema_item( keyword ) - - - def add(self, keyword, required=False , value_type = None): - item = self._add(keyword, required).setParent( self ) - if value_type: - item.iset_type( 0 , value_type ) - - return item - - - def getSchemaItem(self , keyword): - if keyword in self: - item = self._get_schema_item(keyword) - item.setParent( self ) - else: - raise KeyError("Config parser does not have item:%s" % keyword) - - - def parse(self, config_file, comment_string="--", include_kw="INCLUDE", define_kw="DEFINE", - pre_defined_kw_map=None, unrecognized=UnrecognizedEnum.CONFIG_UNRECOGNIZED_WARN, validate=True): - """ @rtype: ConfigContent """ - - assert isinstance(unrecognized, UnrecognizedEnum) - - - if os.path.exists(config_file): - config_content = self._parse(config_file, comment_string, include_kw, define_kw, pre_defined_kw_map, unrecognized, validate) - config_content.setParser( self ) - - if not config_content.isValid(): - if validate: - sys.stderr.write("Errors parsing:%s \n" % config_file) - for count, error in enumerate(config_content.getErrors()): - sys.stderr.write(" %02d:%s\n" % (count , error)) - - raise ValueError("Parsing:%s failed" % config_file) - - return config_content - else: - raise IOError("File: %s does not exists" % config_file) - - - def free(self): - self._free() diff --git a/ThirdParty/Ert/python/python/ert/config/content_type_enum.py b/ThirdParty/Ert/python/python/ert/config/content_type_enum.py deleted file mode 100644 index f5ba67e0b7..0000000000 --- a/ThirdParty/Ert/python/python/ert/config/content_type_enum.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'content_type_enum.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -from cwrap import BaseCEnum - -class ContentTypeEnum(BaseCEnum): - TYPE_NAME = "config_content_type_enum" - CONFIG_STRING = None - CONFIG_INT = None - CONFIG_FLOAT = None - CONFIG_PATH = None - CONFIG_EXISTING_PATH = None - CONFIG_BOOL = None - CONFIG_CONFIG = None - CONFIG_BYTESIZE = None - CONFIG_EXECUTABLE = None - CONFIG_ISODATE = None - CONFIG_INVALID = None - -ContentTypeEnum.addEnum("CONFIG_STRING", 1) -ContentTypeEnum.addEnum("CONFIG_INT", 2) -ContentTypeEnum.addEnum("CONFIG_FLOAT", 4) -ContentTypeEnum.addEnum("CONFIG_PATH", 8) -ContentTypeEnum.addEnum("CONFIG_EXISTING_PATH", 16) -ContentTypeEnum.addEnum("CONFIG_BOOL", 32) -ContentTypeEnum.addEnum("CONFIG_CONFIG", 64) -ContentTypeEnum.addEnum("CONFIG_BYTESIZE", 128) -ContentTypeEnum.addEnum("CONFIG_EXECUTABLE", 256) -ContentTypeEnum.addEnum("CONFIG_ISODATE", 512) -ContentTypeEnum.addEnum("CONFIG_INVALID", 1024) diff --git a/ThirdParty/Ert/python/python/ert/config/schema_item.py b/ThirdParty/Ert/python/python/ert/config/schema_item.py deleted file mode 100644 index 78060ec53c..0000000000 --- a/ThirdParty/Ert/python/python/ert/config/schema_item.py +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright (C) 2016 Statoil ASA, Norway. -# -# This file is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -from ert.config import ContentTypeEnum , ConfigPrototype -from cwrap import BaseCClass - - -class SchemaItem(BaseCClass): - TYPE_NAME = "schema_item" - - _alloc = ConfigPrototype("void* config_schema_item_alloc( char* , bool )", bind=False) - _free = ConfigPrototype("void config_schema_item_free( schema_item )") - _iget_type = ConfigPrototype("config_content_type_enum config_schema_item_iget_type( schema_item, int)") - _iset_type = ConfigPrototype("void config_schema_item_iset_type( schema_item , int , config_content_type_enum)") - _set_argc_minmax = ConfigPrototype("void config_schema_item_set_argc_minmax( schema_item , int , int)") - _add_alternative = ConfigPrototype("void config_schema_item_add_indexed_alternative(schema_item , int , char*)") - - def __init__(self, keyword, required=False): - c_ptr = self._alloc(keyword, required) - super(SchemaItem, self).__init__(c_ptr) - - - def iget_type( self, index): - """ @rtype: ContentTypeEnum """ - return self._iget_type(index) - - def iset_type( self, index, schema_type ): - """ - @type schema_type: ContentTypeEnum - """ - assert isinstance(schema_type, ContentTypeEnum) - self._iset_type(index, schema_type) - - def set_argc_minmax(self, minimum, maximum): - self._set_argc_minmax(minimum, maximum) - - - def initSelection(self , index , alternatives): - for alt in alternatives: - self.addAlternative( index , alt ) - - - def addAlternative(self , index , alt): - self._add_alternative( index , alt ) - - - def free(self): - self._free() - diff --git a/ThirdParty/Ert/python/python/ert/config/unrecognized_enum.py b/ThirdParty/Ert/python/python/ert/config/unrecognized_enum.py deleted file mode 100644 index 2a707e60a6..0000000000 --- a/ThirdParty/Ert/python/python/ert/config/unrecognized_enum.py +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'unrecognized_enum.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -from cwrap import BaseCEnum - -class UnrecognizedEnum(BaseCEnum): - TYPE_NAME = "config_unrecognized_enum" - CONFIG_UNRECOGNIZED_IGNORE = None - CONFIG_UNRECOGNIZED_WARN = None - CONFIG_UNRECOGNIZED_ERROR = None - -UnrecognizedEnum.addEnum("CONFIG_UNRECOGNIZED_IGNORE", 0) -UnrecognizedEnum.addEnum("CONFIG_UNRECOGNIZED_WARN", 1) -UnrecognizedEnum.addEnum("CONFIG_UNRECOGNIZED_ERROR", 2) diff --git a/ThirdParty/Ert/python/python/ert/ecl/CMakeLists.txt b/ThirdParty/Ert/python/python/ert/ecl/CMakeLists.txt deleted file mode 100644 index 45a545aa19..0000000000 --- a/ThirdParty/Ert/python/python/ert/ecl/CMakeLists.txt +++ /dev/null @@ -1,36 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - ecl.py - ecl_3d_file.py - ecl_3dkw.py - ecl_case.py - ecl_file.py - ecl_file_view.py - ecl_grav.py - ecl_grav_calc.py - ecl_grid.py - ecl_init_file.py - ecl_kw.py - ecl_npv.py - ecl_region.py - ecl_restart_file.py - ecl_rft.py - ecl_rft_cell.py - ecl_smspec_node.py - ecl_subsidence.py - ecl_sum.py - ecl_sum_keyword_vector.py - ecl_sum_node.py - ecl_sum_tstep.py - ecl_sum_vector.py - ecl_util.py - fortio.py - ecl_sum_keyword_vector.py - ecl_cmp.py - ecl_sum_var_type.py -) - -add_python_package("python.ert.ecl" ${PYTHON_INSTALL_PREFIX}/ert/ecl "${PYTHON_SOURCES}" True) - -add_subdirectory(faults) -add_subdirectory(rft) diff --git a/ThirdParty/Ert/python/python/ert/ecl/__init__.py b/ThirdParty/Ert/python/python/ert/ecl/__init__.py deleted file mode 100644 index e5a506e337..0000000000 --- a/ThirdParty/Ert/python/python/ert/ecl/__init__.py +++ /dev/null @@ -1,106 +0,0 @@ -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file '__init__.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -""" -Package for working with ECLIPSE files. - -The ecl package contains several classes for working with ECLIPSE -files. The ecl package is a wrapper around the libecl library from the -ERT distribution. Mainly the package is organized with modules -ecl_xxx.py with a class EclXXX. The module ecl_xxx.py will generaly -wrap the content of the c-file ecl_xxx.c The main content is: - - fortio/FortIO: This is functionality to read and write binary - fortran files. - - ecl_kw/EclKW: This class holds one ECLIPSE keyword, like SWAT, in - restart format. - - ecl_file/EclFile: This class is used to load an ECLIPSE file in - restart format, alternatively only parts of the file can be - loaded. Internally it consists of a collection of EclKW - instances. - - ecl_grid/EclGrid: This will load an ECLIPSE GRID or EGRID file, and - can then subsequently be used for queries about the grid. - - ecl_sum/EclSum: This will load summary results from an ECLIPSE run; - both data file(s) and the SMSPEC file. The EclSum object can be - used as basis for queries on summary vectors. - - ecl_rft/[EclRFTFile , EclRFT , EclRFTCell]: Loads an ECLIPSE RFT/PLT - file, and can afterwords be used to support various queries. - - ecl_region/EclRegion: Convenience class to support selecting cells - in a grid based on a wide range of criteria. Can be used as a - mask in operations on EclKW instances. - - ecl_grav/EclGrav: Class used to simplify evaluation of ECLIPSE - modelling time-lapse gravitational surveys. - - ecl_subsidence/EclSubsidence: Small class used to evaluate simulated - subsidence from ECLIPSE simulations; analogous to the EcLGrav - functionality. - -In addition there are some modules which do not follow the one class -per module organization: - - ecl_util: This is mainly a collection of constants, and a few - stateless functions. - - ecl: This module is purely for convenience, all the symbols in the - package are explicitly imported into this module, ensuring that - all symbols in the package are available under the common - namespace 'ecl'. - -""" -import ert.util -import ert.geo - -from cwrap import Prototype - - -class EclPrototype(Prototype): - lib = ert.load("libecl") - - def __init__(self, prototype, bind=True): - super(EclPrototype, self).__init__(EclPrototype.lib, prototype, bind=bind) - -ECL_LIB = ert.load("libecl") - -from .ecl_util import EclFileEnum, EclFileFlagEnum, EclPhaseEnum, EclTypeEnum, EclUnitTypeEnum , EclUtil -from .ecl_sum_var_type import EclSumVarType -from .ecl_sum_tstep import EclSumTStep -from .ecl_sum import EclSum #, EclSumVector, EclSumNode, EclSMSPECNode -from .ecl_sum_keyword_vector import EclSumKeyWordVector -from .ecl_rft_cell import EclPLTCell, EclRFTCell -from .ecl_rft import EclRFT, EclRFTFile -from .fortio import FortIO, openFortIO -from .ecl_kw import EclKW -from .ecl_3dkw import Ecl3DKW -from .ecl_file_view import EclFileView -from .ecl_file import EclFile , openEclFile -from .ecl_3d_file import Ecl3DFile -from .ecl_init_file import EclInitFile -from .ecl_restart_file import EclRestartFile -from .ecl_grid import EclGrid -from .ecl_region import EclRegion -from .ecl_subsidence import EclSubsidence -from .ecl_grav_calc import phase_deltag, deltag -from .ecl_grav import EclGrav -from .ecl_sum_node import EclSumNode -from .ecl_sum_vector import EclSumVector -from .ecl_npv import EclNPV , NPVPriceVector -from .ecl_cmp import EclCmp diff --git a/ThirdParty/Ert/python/python/ert/ecl/ecl.py b/ThirdParty/Ert/python/python/ert/ecl/ecl.py deleted file mode 100644 index 2f78a24430..0000000000 --- a/ThirdParty/Ert/python/python/ert/ecl/ecl.py +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file 'ecl.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -""" -Convenience module importing all symbols in the ecl package. - -This module is purely for convenience; it explicitly imports all the -symbols from all the other modules into the common 'ecl' -namespace. The whole point of this excercise is to facilitate the -following construction: - - import ert.ecl.ecl as ecl <-- Import this module; and create the - namespace 'ecl' - ... - ... - sum = ecl.EclSum( "ECLIPSE.DATA") <-- Classes EclSum and EclGrid are now - grid = ecl.EclGrid("ECLIPSE.EGRID") accessible under the ecl namespace. - -It is not necessary to use the this module. See the doc/import.txt -document in the ert-python source distribution for more details of -module import and namespace resolution. -# """ -# import libecl -# from ecl_kw import EclKW -# from ecl_case import EclCase -# from ecl_file import EclFile -# from ecl_sum import EclSum -# from ecl_rft import EclRFTFile , EclRFT -# from ecl_rft_cell import EclRFTCell, EclPLTCell -# from ecl_grid import EclGrid -# from ecl_grav import EclGrav -# from ecl_subsidence import EclSubsidence -# from ecl_region import EclRegion -# from fortio import FortIO -# import ecl_util -# from ecl_util import * - -import os - -warning_message = """ - -The ecl namespace is deprecated and will go away. You are advised to -use one of these alternatives when importing the ert.ecl modules and -classes: - ---------------------------------------------------------------------- -Common prefix: -import ert.ecl as ecl - -Direct import of classes: -from ert.ecl import EclGrid,EclSum ---------------------------------------------------------------------- - -The environment variable ERT_SILENCE_WARNINGS is a colon separated -list which can be used to silence warnings. To silence this particular -warning set: - -ERT_SILENCE_WARNINGS = \"eclimport\" - -""" - - -from warnings import warn - -ert_silence_warnings = os.environ.get("ERT_SILENCE_WARNINGS") -if ert_silence_warnings: - silent_warnings = set( ert_silence_warnings.split(":")) -else: - silent_warnings = set() - -if not "eclimport" in silent_warnings: - warn(warning_message , DeprecationWarning) - - -from .ecl_sum import EclSum #, EclSumVector, EclSumNode, EclSMSPECNode -from .ecl_rft_cell import EclPLTCell, EclRFTCell -from .ecl_rft import EclRFT, EclRFTFile -from .ecl_kw import EclKW -from .ecl_file import EclFile -from .fortio import FortIO -from .ecl_grid import EclGrid -from .ecl_region import EclRegion -from .ecl_case import EclCase -from .ecl_subsidence import EclSubsidence -from .ecl_grav_calc import deltag, phase_deltag -from .ecl_grav import EclGrav diff --git a/ThirdParty/Ert/python/python/ert/ecl/ecl_case.py b/ThirdParty/Ert/python/python/ert/ecl/ecl_case.py deleted file mode 100644 index 77d046e57b..0000000000 --- a/ThirdParty/Ert/python/python/ert/ecl/ecl_case.py +++ /dev/null @@ -1,190 +0,0 @@ -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file 'ecl_case.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -""" -Implements EclCase class which is a container for one ECLIPSE case. - -This module is a pure Python module which does not directly invoke any -C based functions. -""" -import os -import warnings -from ert.ecl import EclRFTFile, EclGrid, EclSum, EclUtil - - - -class EclCase: - """ - Small container for one ECLIPSE case. - - Mostly a wrapper around an ECLIPSE datafile, along with properties - to load the corresponding summary, grid and rft files. In addition - there are methods run() and submit() to run the ECLIPSE - simulation. - """ - def __init__(self , input_case): - """ - Create a new case based on path/basename. - - The @input_case argument should be the basename of the ECLIPSE - case, it can contain an additional path component. The - @input_case argument can contain an extension, but that is not - necessary; it does not need to point an existing file. - - These are all valid: - - case1 = EclCase( "ECLIPSE" ) - case2 = EclCase( "relative/path/ECLIPSE.SMSPEC" ) - case3 = EclCase( "/absolute/path/simulation/ECLIPSE_3.xxx" ) - - """ - warnings.warn("The EclCase class is deprecated - instantiate the EclSum / EclGrid / ... classes directly." , DeprecationWarning) - - self.case = input_case - (path , tmp) = os.path.split( input_case ) - if path: - self.__path = os.path.abspath( path ) - else: - self.__path = os.getcwd() - (self.__base , self.ext) = os.path.splitext( tmp ) - - self.__sum = None - self.__grid = None - self.__data_file = None - self.__rft = None - - - @property - def datafile( self ): - """ - Will return the full path to the ECLIPSE data file. - - Observe that this method is purely about string manipulation; - i.e. it is not checked if the datafile actually exists. - """ - - if not self.__data_file: - self.__data_file = "%s/%s.DATA" % ( self.__path , self.__base ) - return self.__data_file - - - @property - def sum( self ): - """ - An EclSum instance for the current case; or None. - - Observe that accessing the summary of a running ECLIPSE - simulation, i.e. to check progress, is extremely error - prone. During the actual simulation the summary files on disk - are invalid a large part of the time, and an attempt to load - at these times will lead to an instant 'crash and burn'. - """ - if not self.__sum: - self.__sum = EclSum( self.case ) - return self.__sum - - - @property - def grid( self ): - """ - An EclGrid instance for the current case; or None. - """ - if not self.__grid: - self.__grid = EclGrid( self.case ) - return self.__grid - - - @property - def rft_file( self ): - """ - An EclRFTFile instance for the current case; or None. - """ - if not self.__rft: - self.__rft = EclRFTFile( self.case ) - return self.__rft - - - @property - def base( self ): - """ - Will return the ECLIPSE basename of the current case. - """ - return self.__base - - - @property - def path( self ): - """ - Will return the absolute path of the current case. - """ - return self.__path - - - def run( self, - ecl_cmd = None, - ecl_version = None, - driver = None, - driver_type = None, - driver_options = None, - blocking = False ): - """ - Will start an ECLIPSE simulation of the current case. - - The method has a long and nasty argument list, but all - arguments have sensible defaults, and you probably do not need - to enter any at all. The arguments are as follows: - - ecl_cmd: The command used to run ECLIPSE. This will - typically be a script of some kind. The command will be - called with three commandline arguments: version datafile - num_cpu - - ecl_version: The eclipse version you want to use, this - should be a string of the type "2010.2". - - driver: This should be an instance of Driver() from - ert.job_queue.driver. If driver is None the method will - create a new driver instance. - - driver_type: If the driver is none the method will create a - new driver instance, it will create a driver of this type - (i.e. LOCAL, LSF or RSH). - - driver_options: When creating a new driver, these options - will be used. - - blocking: If blocking is True the method will not return - before the simulation is complete, otherwise the method - will return immediately. If blocking is False the ECLIPSE - simulation will continue even if the python script - exits. - - Observe that there are some dependencies between the arguments: - - * If both driver and driver_type are present the existing - driver instance will be used, and the driver_type argument - will be ignored. - - * The driver_options argument will only be used when - creating a new driver instance, and will not be used to - modify an existing driver instance. - """ - import ert.job_queue.driver as queue_driver - - num_cpu = EclUtil.get_num_cpu( self.datafile ) - argv = [ecl_version , self.datafile , num_cpu] - - job = driver.submit( self.base , ecl_cmd , self.path , argv , blocking = blocking) - return job diff --git a/ThirdParty/Ert/python/python/ert/ecl/ecl_file_view.py b/ThirdParty/Ert/python/python/ert/ecl/ecl_file_view.py deleted file mode 100644 index 0e30b1d931..0000000000 --- a/ThirdParty/Ert/python/python/ert/ecl/ecl_file_view.py +++ /dev/null @@ -1,163 +0,0 @@ -import types -from cwrap import BaseCClass -from ert.ecl import EclPrototype, EclKW -from ert.util import CTime - -class EclFileView(BaseCClass): - TYPE_NAME = "ecl_file_view" - _iget_kw = EclPrototype("ecl_kw_ref ecl_file_view_iget_kw( ecl_file_view , int)") - _iget_named_kw = EclPrototype("ecl_kw_ref ecl_file_view_iget_named_kw( ecl_file_view , char* , int)") - _get_size = EclPrototype("int ecl_file_view_get_size( ecl_file_view )") - _get_num_named_kw = EclPrototype("int ecl_file_view_get_num_named_kw( ecl_file_view , char* )") - _get_unique_size = EclPrototype("int ecl_file_view_get_num_distinct_kw( ecl_file_view )") - _create_block_view = EclPrototype("ecl_file_view_ref ecl_file_view_add_blockview( ecl_file_view , char*, int )") - _create_block_view2 = EclPrototype("ecl_file_view_ref ecl_file_view_add_blockview2( ecl_file_view , char*, char*, int )") - _restart_view = EclPrototype("ecl_file_view_ref ecl_file_view_add_restart_view( ecl_file_view , int, int, time_t, double )") - - - def __init__(self): - raise NotImplementedError("Can not instantiate directly") - - - def __iget(self , index): - return self._iget_kw( index ).setParent( parent = self ) - - - - - def iget_named_kw(self, kw_name , index): - if not kw_name in self: - raise KeyError("No such keyword: %s" % kw_name) - - if index >= self.numKeywords( kw_name ): - raise IndexError("Too large index: %d" % index) - - return self._iget_named_kw( kw_name , index ).setParent( parent = self ) - - - - def __getitem__(self , index): - """ - Implements [] operator; index can be integer or key. - - Will look up EclKW instances from the current EclFile - instance. The @index argument can either be an integer, in - which case the method will return EclKW number @index, or - alternatively a keyword string, in which case the method will - return a list of EclKW instances with that keyword: - - restart_file = ecl_file.EclFile("ECLIPSE.UNRST") - kw9 = restart_file[9] - swat_list = restart_file["SWAT"] - - The keyword based lookup can be combined with an extra [] to - get EclKW instance nr: - - swat9 = restart_file["SWAT"][9] - - Will return the 10'th SWAT keyword from the restart file. The - following example will iterate over all the SWAT keywords in a - restart file: - - restart_file = ecl_file.EclFile("ECLIPSE.UNRST") - for swat in restart_file["SWAT"]: - .... - """ - - if isinstance( index , types.IntType): - if index < 0 or index >= len(self): - raise IndexError - else: - kw = self.__iget( index ) - return kw - - if isinstance( index , slice ): - indices = index.indices( len(self) ) - kw_list = [] - for i in range(*indices): - kw_list.append( self[i] ) - return kw_list - else: - if isinstance( index , types.StringType): - if index in self: - kw_index = index - kw_list = [] - for index in range( self.numKeywords( kw_index )): - kw_list.append( self.iget_named_kw( kw_index , index)) - return kw_list - else: - raise KeyError("Unrecognized keyword:\'%s\'" % index) - else: - raise TypeError("Index must be integer or string (keyword)") - - - def __len__(self): - return self._get_size( ) - - - def __contains__(self , kw): - if self.numKeywords(kw) > 0: - return True - else: - return False - - - def numKeywords(self , kw): - return self._get_num_named_kw( kw ) - - - def uniqueSize(self): - return self._get_unique_size( ) - - def blockView2(self , start_kw , stop_kw, start_index): - if start_kw: - if not start_kw in self: - raise KeyError("The keyword:%s is not in file" % start_kw) - - if start_index >= self.numKeywords( start_kw ): - raise IndexError("Index too high") - - if stop_kw: - if not stop_kw in self: - raise KeyError("The keyword:%s is not in file" % stop_kw) - - view = self._create_block_view2( start_kw , stop_kw , start_index ) - view.setParent( parent = self ) - return view - - - - def blockView(self , kw , kw_index): - num = self.numKeywords( kw ) - - if num == 0: - raise KeyError("Unknown keyword: %s" % kw) - - if kw_index >= num: - raise IndexError("Index too high") - - view = self._create_block_view( kw , kw_index ) - view.setParent( parent = self ) - return view - - - - def restartView(self , seqnum_index = None, report_step = None , sim_time = None , sim_days = None): - if report_step is None: - report_step = -1 - - if sim_time is None: - sim_time = -1 - - if sim_days is None: - sim_days = -1 - - if seqnum_index is None: - seqnum_index = -1 - - view = self._restart_view( seqnum_index , report_step , CTime( sim_time ) , sim_days ) - if view is None: - raise ValueError("No such restart block could be identiefied") - - view.setParent( parent = self ) - return view diff --git a/ThirdParty/Ert/python/python/ert/ecl/ecl_restart_file.py b/ThirdParty/Ert/python/python/ert/ecl/ecl_restart_file.py deleted file mode 100644 index 6d0b85f846..0000000000 --- a/ThirdParty/Ert/python/python/ert/ecl/ecl_restart_file.py +++ /dev/null @@ -1,134 +0,0 @@ -# Copyright (C) 2015 Statoil ASA, Norway. -# -# The file 'ecl_restart_file.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -from ert.util import CTime -from ert.ecl import ECL_LIB , EclFile, Ecl3DKW , Ecl3DFile, EclFileEnum -from cwrap import CWrapper, BaseCClass - -class EclRestartHead(BaseCClass): - def __init__(self , kw_arg = None , rst_view = None): - if kw_arg is None and rst_view is None: - raise Exception("Invalid arguments") - - if not kw_arg is None: - report_step , intehead_kw , doubhead_kw , logihead_kw = kw_arg - c_ptr = EclRestartHead.cNamespace().alloc_from_kw( report_step , intehead_kw , doubhead_kw , logihead_kw ) - else: - c_ptr = EclRestartHead.cNamespace().alloc( rst_view , -1 ) - - super(EclRestartHead, self).__init__(c_ptr) - - - def free(self): - EclRestartHead.cNamespace().free( self ) - - def getReportStep(self): - return EclRestartHead.cNamespace().get_report_step( self ) - - def getSimDate(self): - ct = CTime( EclRestartHead.cNamespace().get_sim_time( self ) ) - return ct.datetime( ) - - def getSimDays(self): - return EclRestartHead.cNamespace().get_sim_days( self ) - - - -class EclRestartFile(Ecl3DFile): - - def __init__(self , grid , filename , flags = 0): - """Will open an Eclipse restart file. - - The EclRestartFile class will open an eclipse restart file, in - unified or non unified format. The constructor will infer the - file type based on the filename, and will raise a ValueError - exception if the file type is not ECL_RESTART_FILE or - ECL_UNIFIED_RESTART_FILE. - - The EclRestartFile will use a grid reference to create Ecl3DKw - instances for all the keyword elements which have either - 'nactive' or 'nx*ny*nz' elements. - """ - - file_type , report_step , fmt_file = EclFile.getFileType( filename ) - if not file_type in [EclFileEnum.ECL_RESTART_FILE, EclFileEnum.ECL_UNIFIED_RESTART_FILE]: - raise ValueError("The input filename:%s does not correspond to a restart file - please follow the Eclipse naming conventions" % filename) - - super(EclRestartFile , self).__init__( grid, filename , flags) - self.rst_headers = None - if file_type == EclFileEnum.ECL_RESTART_FILE: - self.is_unified = False - self.report_step = report_step - else: - self.is_unified = True - - - - def unified(self): - """ - Will return True if the file we have opened is unified. - """ - return self.is_unified - - - def assertHeaders(self): - if self.rst_headers is None: - self.rst_headers = [] - if self.unified(): - for index in range(self.num_named_kw("SEQNUM")): - self.rst_headers.append( EclRestartHead( rst_view = self.restartView( seqnum_index = index ))) - else: - intehead_kw = self["INTEHEAD"][0] - doubhead_kw = self["DOUBHEAD"][0] - if "LOGIHEAD" in self: - logihead_kw = self["LOGIHEAD"][0] - else: - logihead_kw = None - - self.rst_headers.append( EclRestartHead( kw_arg = (self.report_step , intehead_kw , doubhead_kw , logihead_kw) )) - - - def timeList(self): - """Will return a list of report_step, simulation time and days. - - The return value will be a list tuples. For a unified restart - file with the three report steps {10,15,20} it can look like: - - [ (10, datetime.datetime( 2010 , 1 , 1 , 0 , 0 , 0 ) , 100.0), - (15, datetime.datetime( 2010 , 3 , 1 , 0 , 0 , 0 ) , 160.0), - (20, datetime.datetime( 2010 , 5 , 1 , 0 , 0 , 0 ) , 220.0) ] - - For a non-unified restart file the list will have only one element. - """ - - self.assertHeaders() - time_list = [] - for header in self.rst_headers: - time_list.append( (header.getReportStep() , header.getSimDate( ) , header.getSimDays( )) ) - - return time_list - - - - -CWrapper.registerObjectType("ecl_rsthead", EclRestartHead) -cwrapper = CWrapper(ECL_LIB) -EclRestartHead.cNamespace().alloc = cwrapper.prototype("c_void_p ecl_rsthead_alloc(ecl_file_view , int )") -EclRestartHead.cNamespace().alloc_from_kw = cwrapper.prototype("c_void_p ecl_rsthead_alloc_from_kw(int , ecl_kw , ecl_kw , ecl_kw )") -EclRestartHead.cNamespace().free = cwrapper.prototype("void ecl_rsthead_free(ecl_rsthead)") -EclRestartHead.cNamespace().get_report_step = cwrapper.prototype("int ecl_rsthead_get_report_step(ecl_rsthead)") -EclRestartHead.cNamespace().get_sim_time = cwrapper.prototype("time_t ecl_rsthead_get_sim_time(ecl_rsthead)") -EclRestartHead.cNamespace().get_sim_days = cwrapper.prototype("double ecl_rsthead_get_sim_days(ecl_rsthead)") diff --git a/ThirdParty/Ert/python/python/ert/ecl/faults/CMakeLists.txt b/ThirdParty/Ert/python/python/ert/ecl/faults/CMakeLists.txt deleted file mode 100644 index bedc35aa82..0000000000 --- a/ThirdParty/Ert/python/python/ert/ecl/faults/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - fault_block.py - fault_block_layer.py - fault_collection.py - fault.py - fault_line.py - fault_segments.py - layer.py -) - -add_python_package("python.ert.ecl.faults" ${PYTHON_INSTALL_PREFIX}/ert/ecl/faults "${PYTHON_SOURCES}" True) diff --git a/ThirdParty/Ert/python/python/ert/ecl/faults/__init__.py b/ThirdParty/Ert/python/python/ert/ecl/faults/__init__.py deleted file mode 100644 index 17307f8032..0000000000 --- a/ThirdParty/Ert/python/python/ert/ecl/faults/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -from .layer import Layer -from .fault_collection import FaultCollection -from .fault import Fault -from .fault_line import FaultLine -from .fault_segments import FaultSegment , SegmentMap -from .fault_block import FaultBlock , FaultBlockCell -from .fault_block_layer import FaultBlockLayer diff --git a/ThirdParty/Ert/python/python/ert/ecl/faults/fault.py b/ThirdParty/Ert/python/python/ert/ecl/faults/fault.py deleted file mode 100644 index 326ad0fc05..0000000000 --- a/ThirdParty/Ert/python/python/ert/ecl/faults/fault.py +++ /dev/null @@ -1,644 +0,0 @@ -# Copyright (C) 2014 Statoil ASA, Norway. -# -# The file 'fault.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -from ert.ecl import EclTypeEnum -from ert.geo import Polyline , CPolyline , GeometryTools -from ert.util import stat -from ert.util import Matrix - -from .fault_line import FaultLine -from .fault_segments import FaultSegment , SegmentMap - - -class Layer(object): - def __init__(self, grid , K): - assert( isinstance(K , int) ) - self.__grid = grid - self.__K = K - self.__fault_lines = [] - self.__segment_map = SegmentMap() - self.__processed = False - - - def addSegment(self , segment): - self.__segment_map.addSegment( segment ) - self.__processed = False - - def __len__(self): - self.processSegments() - return len(self.__fault_lines) - - def __iter__(self): - self.processSegments() - return iter(self.__fault_lines) - - def __getitem__(self , index): - self.processSegments() - return self.__fault_lines[index] - - def getK(self): - return self.__K - - - def getNeighborCells(self): - neighbor_cells = [] - for fl in self: - neighbor_cells += fl.getNeighborCells() - return neighbor_cells - - def getPolyline(self , name = None): - polyline = CPolyline( name = name) - for fl in self: - polyline += fl.getPolyline() - return polyline - - - def getIJPolyline(self): - """ - Will return a python list of (int,int) tuple. - """ - polyline = [] - for fl in self: - polyline += fl.getIJPolyline() - return polyline - - - def numLines(self): - return len(self) - - - # A fault can typically consist of several non connected fault - # segments; right after reading the fault input these can be in a - # complete mess: - # - # 1. The different part of the fault can be in random order. - # - # 2. Within each fault line the micro segments can be ordered in - # reverse. - # - # This method goes through some desparate heuristics trying to - # sort things out. - - def __sortFaultLines(self): - N = len(self.__fault_lines) - x = Matrix(N , 1) - y = Matrix(N , 1) - - for index,line in enumerate(self.__fault_lines): - xc,yc = line.center() - - x[index,0] = xc - y[index,0] = yc - - # y = beta[0] + beta[1] * x - # = a + b * x - beta = stat.polyfit(2 , x , y) - a = beta[0] - b = beta[1] - - perm_list = [] - for index,line in enumerate(self.__fault_lines): - x0 , y0 = line.center() - d = x0 + b*(y0 - a) - perm_list.append((index , d)) - perm_list.sort(key = lambda x: x[1]) - - fault_lines = [] - for (index,d) in perm_list: - fault_lines.append( self.__fault_lines[ index ]) - self.__fault_lines = fault_lines - - - for line in self.__fault_lines: - x1,y1 = line.startPoint() - x2,y2 = line.endPoint() - d1 = x1 + b*(y1 - a) - d2 = x2 + b*(y2 - a) - - if d1 > d2: - line.reverse() - - - - - def processSegments(self): - if self.__processed: - return - - while self.__segment_map: - fault_line = FaultLine(self.__grid , self.__K) - self.__fault_lines.append( fault_line ) - - current_segment = self.__segment_map.popStart() - while current_segment: - append = fault_line.tryAppend(current_segment) - if not append: - fault_line = FaultLine(self.__grid , self.__K) - self.__fault_lines.append( fault_line ) - fault_line.tryAppend(current_segment) - - current_segment.next_segment = self.__segment_map.popNext( current_segment ) - current_segment = current_segment.next_segment - - if len(self.__fault_lines) > 1: - self.__sortFaultLines() - - self.__processed = True - - -################################################################# - - -class Fault(object): - allowed_faces = ["X","Y","Z","I","J","K","X-","Y-","Z-","I-","J-","K-"] - - def __init__(self, grid , name): - self.__grid = grid - self.__name = name - self.__layer_map = {} - self.__layer_list = [] - (self.nx , self.ny , self.nz , nactive) = grid.dims - - - def __str__(self): - return "Fault:%s" % self.__name - - def __getitem__(self , K): - if not self.hasLayer(K): - self.addLayer(K) - layer = self.__layer_map[K] - return layer - - def __len__(self): - return len(self.__layer_map) - - - def __iter__(self): - for layer in self.__layer_list: - yield layer - - - def hasLayer(self , K): - return self.__layer_map.has_key( K ) - - - def addLayer(self , K): - layer = Layer(self.__grid , K) - self.__layer_map[K] = layer - self.__layer_list.append( layer ) - - - def createSegment(self , I1 , I2 , J1 , J2 , face): - if face in ["X" , "I"]: - C1 = I1 + 1 + J1*(self.nx + 1) - C2 = C1 + (1 + J2 - J1) * (self.nx + 1) - elif face in ["X-" , "I-"]: - C1 = I1 + J1*(self.nx + 1) - C2 = C1 + (1 + J2 - J1) * (self.nx + 1) - elif face in ["Y" , "J"]: - C1 = I1 + (J1 + 1) * (self.nx + 1) - C2 = C1 + (1 + I2 - I1) - elif face in ["Y-" , "J-"]: - C1 = I1 + J1 * (self.nx + 1) - C2 = C1 + (1 + I2 - I1) - else: - return None - - return FaultSegment(C1,C2) - - - - def addRecord(self , I1 , I2 , J1 , J2 , K1 , K2 , face): - if not face in Fault.allowed_faces: - raise ValueError("Invalid face:%s" % face) - - if I1 > I2: - raise ValueError("Invalid I1 I2 indices") - - if J1 > J2: - raise ValueError("Invalid J1 J2 indices") - - if K1 > K2: - raise ValueError("Invalid K1 K2 indices") - - if I1 < 0 or I1 >= self.nx: - raise ValueError("Invalid I1:%d" % I1) - if I2 < 0 or I2 >= self.nx: - raise ValueError("Invalid I2:%d" % I2) - - if J1 < 0 or J1 >= self.ny: - raise ValueError("Invalid J1:%d" % J1) - if J2 < 0 or J2 >= self.ny: - raise ValueError("Invalid J2:%d" % J2) - - if K1 < 0 or K1 >= self.nz: - raise ValueError("Invalid K1:%d" % K1) - if K2 < 0 or K2 >= self.nz: - raise ValueError("Invalid K2:%d" % K2) - - if face in ["X","I"]: - if I1 != I2: - raise ValueError("For face:%s we must have I1 == I2" % face) - - if face in ["Y","J"]: - if J1 != J2: - raise ValueError("For face:%s we must have J1 == J2" % face) - - if face in ["Z","K"]: - if K1 != K2: - raise ValueError("For face:%s we must have K1 == K2" % face) - - #----------------------------------------------------------------- - - for K in range(K1,K2+1): - if not self.hasLayer(K): - self.addLayer(K) - layer = self.__layer_map[K] - segment = self.createSegment(I1,I2,J1,J2,face) - if segment: - layer.addSegment( segment ) - - - def getName(self): - return self.__name - - - def getNeighborCells(self): - neighbor_cells = [] - for layer in self: - neighbor_cells += layer.getNeighborCells() - return neighbor_cells - - - def getPolyline(self , k): - layer = self[k] - return layer.getPolyline( name = "Polyline[%s]" % self.getName() ) - - - def getIJPolyline(self , k): - layer = self[k] - return layer.getIJPolyline() - - - def numLines( self , k): - layer = self[k] - return layer.numLines() - - - def extendToFault(self , other_fault , k): - polyline = self.getIJPolyline(k) - - p0 = polyline[-2] - p1 = polyline[-1] - ray_dir = GeometryTools.lineToRay( p0 , p1 ) - intersections = GeometryTools.rayPolygonIntersections( p1 , ray_dir , other_fault.getIJPolyline(k)) - if intersections: - p2 = intersections[0][1] - return [p1 , (int(p2[0]) , int(p2[1])) ] - - p0 = polyline[1] - p1 = polyline[0] - ray_dir = GeometryTools.lineToRay( p0 , p1 ) - intersections = GeometryTools.rayPolygonIntersections( p1 , ray_dir , other_fault.getIJPolyline(k)) - if intersections: - if len(intersections) > 1: - d_list = [ GeometryTools.distance( p1 , p[1] ) for p in intersections ] - index = d_list.index( min(d_list) ) - else: - index = 0 - p2 = intersections[index][1] - return [p1 , (int(p2[0]) , int(p2[1])) ] - - raise ValueError("The fault %s can not be extended to intersect with:%s in layer:%d" % (self.getName() , other_fault.getName() , k+1 )) - - - @staticmethod - def __rayIntersect(p0, p1 , polyline): - ray_dir = GeometryTools.lineToRay( p0 , p1 ) - intersections = GeometryTools.rayPolygonIntersections( p1 , ray_dir , polyline) - if intersections: - if len(intersections) > 1: - d_list = [ GeometryTools.distance( p1 , p[1] ) for p in intersections ] - index = d_list.index( min(d_list) ) - else: - index = 0 - p2 = intersections[index][1] - return [p1 , p2] - else: - return None - - - def connectWithPolyline(self , polyline , k): - """ - """ - if self.intersectsPolyline( polyline , k ): - return None - else: - self_polyline = self.getPolyline( k ) - if len(self_polyline) > 0: - return self_polyline.connect( polyline ) - else: - return None - - - def connect(self , target , k): - if isinstance(target, Fault): - polyline = target.getPolyline(k) - else: - polyline = target - return self.connectWithPolyline( polyline , k ) - - - - def extendToPolyline(self , polyline , k): - """Extends the fault until it intersects @polyline in layer @k. - - The return value is a list [(x1,y1) , (x2,y2)] where (x1,y1) - is on the tip of the fault, and (x2,y2) is on the polyline. If - the fault already intersects polyline None is returned, if no - intersection is found a ValueError exception is raised. - - The method will try four different strategies for finding an - intersection between the extension of the fault and the - polyline. Assume the fault and the polyline looks like: - - - Polyline: ---------------------------------------------- - - +------------+ D - | | | - | +-------C - B-----+ - | - A - - The algorithm will then try to intersect the following rays - with the polyline, the first match will return: - - 1. (Pc , Pd) - 2. (Pb , Pa) - 3. (Pa , Pd) - 4. (Pd , Pa) - - The fault object is not directed in any way; i.e. in the case - both (Pc,Pd) and (Pb,Pa) intersects the polyline it is - impossible to know which intersection is returned, without - actually consulting the construction of the fault object. - """ - if self.intersectsPolyline(polyline , k): - return None - - fault_polyline = self.getPolyline( k ) - p0 = fault_polyline[-2] - p1 = fault_polyline[-1] - extension = self.__rayIntersect(p0 , p1 , polyline) - if extension: - return extension - - p0 = fault_polyline[1] - p1 = fault_polyline[0] - extension = self.__rayIntersect(p0 , p1 , polyline) - if extension: - return extension - - p0 = fault_polyline[0] - p1 = fault_polyline[-1] - extension = self.__rayIntersect(p0 , p1 , polyline) - if extension: - return extension - - p0 = fault_polyline[-1] - p1 = fault_polyline[0] - extension = self.__rayIntersect(p0 , p1 , polyline) - if extension: - return extension - - raise ValueError("The fault %s can not be extended to intersect with polyline:%s in layer:%d" % (self.getName() , polyline.getName() , k+1)) - - - - def intersectsPolyline(self , polyline , k): - fault_line = self.getPolyline(k) - return fault_line.intersects( polyline ) - - - def intersectsFault(self , other_fault , k): - fault_line = other_fault.getPolyline(k) - return self.intersectsPolyline( fault_line , k ) - - - def extendToFault(self , fault , k): - fault_line = fault.getPolyline(k) - return self.extendToPolyline(fault_line , k) - - def extendToEdge(self, edge , k): - if isinstance(edge , Fault): - return self.extendToFault( edge , k ) - else: - return self.extendToPolyline( edge , k ) - - - def extendToBBox(self , bbox , k , start = True): - fault_polyline = self.getPolyline(k) - if start: - p0 = fault_polyline[1] - p1 = fault_polyline[0] - else: - p0 = fault_polyline[-2] - p1 = fault_polyline[-1] - - ray_dir = GeometryTools.lineToRay(p0,p1) - intersections = GeometryTools.rayPolygonIntersections( p1 , ray_dir , bbox) - if intersections: - p2 = intersections[0][1] - if self.getName(): - name = "Extend:%s" % self.getName() - else: - name = None - - return CPolyline( name = name , init_points = [(p1[0] , p1[1]) , p2]) - else: - raise Exception("Logical error - must intersect with bounding box") - - - def endJoin(self , other , k): - fault_polyline = self.getPolyline(k) - - if isinstance(other , Fault): - other_polyline = other.getPolyline(k) - else: - other_polyline = other - - return GeometryTools.joinPolylines( fault_polyline , other_polyline ) - - - - def connectPolylineOnto(self , polyline , k): - if self.intersectsPolyline( polyline , k): - return None - - self_polyline = self.getPolyline(k) - return polyline.connect( self_polyline ) - - - - def extendPolylineOnto(self , polyline , k): - if self.intersectsPolyline( polyline , k): - return None - - if len(polyline) > 1: - fault_polyline = self.getPolyline(k) - ext1 = self.__rayIntersect( polyline[-2] , polyline[-1] , fault_polyline ) - ext2 = self.__rayIntersect( polyline[0] , polyline[1] , fault_polyline ) - - if ext1 and ext2: - d1 = GeometryTools.distance( ext1[0] , ext1[1] ) - d2 = GeometryTools.distance( ext2[0] , ext2[1] ) - - if d1 < d2: - return ext1 - else: - return ext2 - - if ext1: - return ext1 - else: - return ext2 - else: - raise ValueError("Polyline must have length >= 2") - - - - @staticmethod - def intersectFaultRays(ray1 , ray2): - p1,dir1 = ray1 - p2,dir2 = ray2 - if p1 == p2: - return [] - - dx = p2[0] - p1[0] - dy = p2[1] - p1[1] - if dx != 0: - if dir1[0] * dx <= 0 and dir2[0] * dx >= 0: - raise ValueError("Rays will never intersect") - - if dy != 0: - if dir1[1] * dy <= 0 and dir2[1] * dy >= 0: - raise ValueError("Rays will never intersect") - - if dx*dy != 0: - if dir1[0] != 0: - xc = p2[0] - yc = p1[1] - else: - xc = p1[0] - yc = p2[1] - - coord_list = [p1 , (xc,yc) , p2] - else: - coord_list = [p1,p2] - - return coord_list - - - @staticmethod - def intRay(p1,p2): - if p1 == p2: - raise Exception("Can not form ray from coincident points") - - if p1[0] == p2[0]: - # Vertical line - dx = 0 - if p2[1] > p1[1]: - dy = 1 - elif p2[1] < p1[1]: - dy = -1 - else: - # Horizontal line - if p2[1] != p1[1]: - raise Exception("Invalid direction") - - dy = 0 - if p2[0] > p1[0]: - dx = 1 - else: - dx = -1 - - return [p2 , (dx,dy)] - - - - def getEndRays(self , k): - polyline = self.getIJPolyline(k) - - p0 = polyline[0] - p1 = polyline[1] - p2 = polyline[-2] - p3 = polyline[-1] - - return (Fault.intRay(p1,p0) , Fault.intRay(p2,p3)) - - - - - @staticmethod - def joinFaults(fault1 , fault2 , k): - fault1_rays = fault1.getEndRays(k) - fault2_rays = fault2.getEndRays(k) - - if fault1.intersectsFault( fault2 , k ): - return None - - count = 0 - join = None - try: - join = Fault.intersectFaultRays( fault1_rays[0] , fault2_rays[0] ) - count += 1 - except ValueError: - pass - - try: - join = Fault.intersectFaultRays( fault1_rays[0] , fault2_rays[1] ) - count += 1 - except ValueError: - pass - - try: - join = Fault.intersectFaultRays( fault1_rays[1] , fault2_rays[0] ) - count += 1 - except ValueError: - pass - - try: - join = Fault.intersectFaultRays( fault1_rays[1] , fault2_rays[1] ) - count += 1 - except ValueError: - pass - - if count == 1: - xy_list = [] - for ij in join: - xyz = fault1.__grid.getNodeXYZ( ij[0] , ij[1] , k ) - xy_list.append( (xyz[0] , xyz[1]) ) - - return xy_list - else: - return fault1.endJoin( fault2 , k ) - #raise ValueError("Faults %s and %s could not be uniquely joined" % (fault1.getName() , fault2.getName())) - - - - diff --git a/ThirdParty/Ert/python/python/ert/ecl/faults/fault_block.py b/ThirdParty/Ert/python/python/ert/ecl/faults/fault_block.py deleted file mode 100644 index 50480458ab..0000000000 --- a/ThirdParty/Ert/python/python/ert/ecl/faults/fault_block.py +++ /dev/null @@ -1,177 +0,0 @@ -# Copyright (C) 2014 Statoil ASA, Norway. -# -# The file 'fault_block.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -import ctypes -from cwrap import BaseCClass, CWrapper -from ert.geo import Polyline, GeometryTools , CPolylineCollection -from ert.util import DoubleVector , IntVector -from ert.ecl import ECL_LIB - - -class FaultBlockCell(object): - def __init__(self , i,j,k ,x,y,z): - - self.i = i - self.j = j - self.k = k - - self.x = x - self.y = y - self.z = z - - - def __str__(self): - return "(%d,%d)" % (self.i , self.j) - - - -class FaultBlock(BaseCClass): - - def __init__(self , *args , **kwargs): - raise NotImplementedError("Class can not be instantiated directly!") - - - def __getitem__(self , index): - if isinstance(index, int): - if index < 0: - index += len(self) - - if 0 <= index < len(self): - x = ctypes.c_double() - y = ctypes.c_double() - z = ctypes.c_double() - - i = ctypes.c_int() - j = ctypes.c_int() - k = ctypes.c_int() - - self.cNamespace().export_cell(self , index , ctypes.byref(i) , ctypes.byref(j) , ctypes.byref(k) , ctypes.byref(x) , ctypes.byref(y) , ctypes.byref(z)) - return FaultBlockCell( i.value , j.value , k.value , x.value , y.value , z.value ) - else: - raise IndexError("Index:%d out of range: [0,%d)" % (index , len(self))) - else: - raise TypeError("Index:%s wrong type - integer expected") - - def __str__(self): - return "Block ID: %d" % self.getBlockID() - - - def __len__(self): - return self.cNamespace().get_size( self ) - - def free(self): - self.cNamespace().free(self) - - def getCentroid(self): - xc = self.cNamespace().get_xc( self ) - yc = self.cNamespace().get_yc( self ) - return (xc,yc) - - - def countInside(self , polygon): - """ - Will count the number of points in block which are inside polygon. - """ - inside = 0 - for p in self: - if GeometryTools.pointInPolygon( (p.x , p.y) , polygon ): - inside += 1 - - return inside - - - def getBlockID(self): - return self.cNamespace().get_block_id(self) - - - def assignToRegion(self , region_id): - self.cNamespace().assign_to_region(self , region_id) - - - def getRegionList(self): - regionList = self.cNamespace().get_region_list(self) - return regionList.copy() - - def addCell(self, i , j): - self.cNamespace().add_cell( self , i , j ) - - def getGlobalIndexList(self): - return self.cNamespace().get_global_index_list( self ) - - - def getEdgePolygon(self): - x_list = DoubleVector() - y_list = DoubleVector() - cell_list = IntVector() - - self.cNamespace().trace_edge( self , x_list , y_list , cell_list ) - p = Polyline() - for (x,y) in zip(x_list , y_list): - p.addPoint(x,y) - return p - - - def containsPolyline(self, polyline): - """ - Will return true if at least one point from the polyline is inside the block. - """ - edge_polyline = self.getEdgePolygon() - for p in polyline: - if GeometryTools.pointInPolygon( p , edge_polyline ): - return True - else: - edge_polyline.assertClosed() - return GeometryTools.polylinesIntersect( edge_polyline , polyline ) - - - def getNeighbours(self, polylines = None , connected_only = True): - """ - Will return a list of FaultBlock instances which are in direct - contact with this block. - """ - neighbour_id_list = IntVector() - if polylines is None: - polylines = CPolylineCollection() - - self.cNamespace().get_neighbours( self , connected_only , polylines , neighbour_id_list ) - - parent_layer = self.getParentLayer() - neighbour_list = [] - for id in neighbour_id_list: - neighbour_list.append( parent_layer.getBlock( id )) - return neighbour_list - - - def getParentLayer(self): - return self.parent() - - - -cwrapper = CWrapper(ECL_LIB) -CWrapper.registerObjectType("fault_block", FaultBlock) - -FaultBlock.cNamespace().get_xc = cwrapper.prototype("double fault_block_get_xc(fault_block)") -FaultBlock.cNamespace().get_yc = cwrapper.prototype("double fault_block_get_yc(fault_block)") -FaultBlock.cNamespace().get_block_id = cwrapper.prototype("int fault_block_get_id(fault_block)") -FaultBlock.cNamespace().get_size = cwrapper.prototype("int fault_block_get_size(fault_block)") -FaultBlock.cNamespace().export_cell = cwrapper.prototype("void fault_block_export_cell(fault_block , int , int* , int* , int* , double* , double* , double*)") -FaultBlock.cNamespace().assign_to_region = cwrapper.prototype("void fault_block_assign_to_region(fault_block , int)") -FaultBlock.cNamespace().get_region_list = cwrapper.prototype("int_vector_ref fault_block_get_region_list(fault_block)") -FaultBlock.cNamespace().add_cell = cwrapper.prototype("void fault_block_add_cell(fault_block, int , int)") -FaultBlock.cNamespace().get_global_index_list = cwrapper.prototype("int_vector_ref fault_block_get_global_index_list(fault_block)") -FaultBlock.cNamespace().trace_edge = cwrapper.prototype("void fault_block_trace_edge( fault_block, double_vector , double_vector , int_vector)") -FaultBlock.cNamespace().get_neighbours = cwrapper.prototype("void fault_block_list_neighbours( fault_block , bool , geo_polygon_collection , int_vector)") - diff --git a/ThirdParty/Ert/python/python/ert/ecl/faults/fault_block_collection.py b/ThirdParty/Ert/python/python/ert/ecl/faults/fault_block_collection.py deleted file mode 100644 index 641d7d58be..0000000000 --- a/ThirdParty/Ert/python/python/ert/ecl/faults/fault_block_collection.py +++ /dev/null @@ -1,80 +0,0 @@ -# Copyright (C) 2014 Statoil ASA, Norway. -# -# The file 'fault_block_collection.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - - -from cwrap import BaseCClass, CWrapper -from ert.ecl import ECL_LIB - - -class FaultBlockCollection(BaseCClass): - - def __init__(self , grid): - c_pointer = self.cNamespace().alloc( grid) - if c_pointer: - super(FaultBlockCollection, self).__init__(c_pointer) - else: - raise ValueError("Invalid input - failed to create FaultBlockCollection") - - # The underlying C implementation uses lazy evaluation and - # needs to hold on to the grid reference. We therefor take - # references to it here, to protect against premature garbage - # collection. - self.grid_ref = grid - - - def __len__(self): - return self.cNamespace().num_layers(self) - - - def __getitem__(self , index): - """ - @rtype: FaultBlockLayer - """ - if isinstance(index, int): - if 0 <= index < len(self): - return self.cNamespace().get_layer( self , index ).setParent(self) - else: - raise IndexError("Index:%d out of range [0,%d)" % (index , len(self))) - else: - raise TypeError("Index should be integer type") - - - def getLayer(self , k): - """ - @rtype: FaultBlockLayer - """ - return self[k] - - def free(self): - self.cNamespace().free(self) - - - def scanKeyword(self , fault_block_kw): - ok = self.cNamespace().scan_keyword( self , fault_block_kw ) - if not ok: - raise ValueError("The fault block keyword had wrong type/size") - - - -cwrapper = CWrapper(ECL_LIB) -CWrapper.registerObjectType("fault_block_collection", FaultBlockCollection) - - -FaultBlockCollection.cNamespace().alloc = cwrapper.prototype("c_void_p fault_block_collection_alloc(ecl_grid )") -FaultBlockCollection.cNamespace().free = cwrapper.prototype("void fault_block_collection_free(fault_block_collection)") -FaultBlockCollection.cNamespace().num_layers = cwrapper.prototype("int fault_block_collection_num_layers(fault_block_collection)") -FaultBlockCollection.cNamespace().get_layer = cwrapper.prototype("fault_block_layer_ref fault_block_collection_get_layer(fault_block_collection, int)") -FaultBlockCollection.cNamespace().scan_keyword = cwrapper.prototype("bool fault_block_collection_scan_kw(fault_block_collection, ecl_kw)") diff --git a/ThirdParty/Ert/python/python/ert/ecl/faults/fault_block_layer.py b/ThirdParty/Ert/python/python/ert/ecl/faults/fault_block_layer.py deleted file mode 100644 index bc0229d464..0000000000 --- a/ThirdParty/Ert/python/python/ert/ecl/faults/fault_block_layer.py +++ /dev/null @@ -1,211 +0,0 @@ -# Copyright (C) 2014 Statoil ASA, Norway. -# -# The file 'fault_block_layer.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -from __future__ import print_function -from cwrap import BaseCClass, CWrapper -from ert.ecl import ECL_LIB -from ert.ecl import EclTypeEnum -from ert.ecl.faults import Fault - -class FaultBlockLayer(BaseCClass): - - def __init__(self , grid , k): - c_pointer = self.cNamespace().alloc( grid , k) - if c_pointer: - super(FaultBlockLayer, self).__init__(c_pointer) - else: - raise ValueError("Invalid input - failed to create FaultBlockLayer") - - # The underlying C implementation uses lazy evaluation and - # needs to hold on to the grid reference. We therefor take - # references to it here, to protect against premature garbage - # collection. - self.grid_ref = grid - - - def __len__(self): - return self.cNamespace().size(self) - - def __getitem__(self , index): - """ - @rtype: FaultBlock - """ - if isinstance(index, int): - if index < 0: - index += len(self) - - if 0 <= index < len(self): - return self.cNamespace().iget_block( self , index ).setParent(self) - else: - raise IndexError("Index:%d out of range: [0,%d)" % (index , len(self))) - elif isinstance(index,tuple): - i,j = index - if 0 <= i < self.grid_ref.getNX() and 0 <= j < self.grid_ref.getNY(): - geo_layer = self.getGeoLayer() - block_id = geo_layer[i,j] - if block_id == 0: - raise ValueError("No fault block defined for location (%d,%d)" % (i,j)) - else: - return self.getBlock( block_id ) - else: - raise IndexError("Invalid i,j : (%d,%d)" % (i,j)) - else: - raise TypeError("Index should be integer type") - - def __contains__(self , block_id): - return self.cNamespace().has_block( self , block_id) - - - def scanKeyword(self , fault_block_kw): - """ - Will reorder the block ids, and ensure single connectedness. Assign block_id to zero blocks. - """ - ok = self.cNamespace().scan_keyword( self , fault_block_kw ) - if not ok: - raise ValueError("The fault block keyword had wrong type/size: type:%s size:%d grid_size:%d" % (fault_block_kw.typeName() , len(fault_block_kw) , self.grid_ref.getGlobalSize())) - - - def loadKeyword(self , fault_block_kw): - """ - Will load directly from keyword - without reorder; ignoring zero. - """ - ok = self.cNamespace().load_keyword( self , fault_block_kw ) - if not ok: - raise ValueError("The fault block keyword had wrong type/size: type:%s size:%d grid_size:%d" % (fault_block_kw.typeName() , len(fault_block_kw) , self.grid_ref.getGlobalSize())) - - - def getBlock(self , block_id): - """ - @rtype: FaultBlock - """ - if block_id in self: - return self.cNamespace().get_block( self , block_id).setParent(self) - else: - raise KeyError("No blocks with ID:%d in this layer" % block_id) - - - def deleteBlock(self , block_id): - if block_id in self: - self.cNamespace().del_block( self , block_id) - else: - raise KeyError("No blocks with ID:%d in this layer" % block_id) - - def addBlock(self , block_id = None): - if block_id is None: - block_id = self.getNextID() - - if block_id in self: - raise KeyError("Layer already contains block with ID:%s" % block_id) - else: - return self.cNamespace().add_block( self , block_id).setParent(self) - - def getNextID(self): - return self.cNamespace().get_next_id( self ) - - - def getK(self): - return self.cNamespace().getK( self ) - - - def free(self): - self.cNamespace().free(self) - - - def scanLayer( self , layer): - self.cNamespace().scan_layer(self , layer) - - - def insertBlockContent(self , block): - self.cNamespace().insert_block_content(self , block) - - def exportKeyword(self , kw): - if len(kw) != self.grid_ref.getGlobalSize(): - raise ValueError("The size of the target keyword must be equal to the size of the grid. Got:%d Expected:%d" % (len(kw) , self.grid_ref.getGlobalSize())) - - if kw.getEclType() != EclTypeEnum.ECL_INT_TYPE: - raise TypeError("The target kewyord must be of integer type") - - self.cNamespace().export_kw( self , kw ) - - - def addFaultBarrier(self , fault , link_segments = False): - layer = self.getGeoLayer( ) - layer.addFaultBarrier( fault , self.getK() , link_segments ) - - - def addFaultLink(self , fault1 , fault2 ): - if not fault1.intersectsFault( fault2 , self.getK()): - layer = self.getGeoLayer() - layer.addIJBarrier( fault1.extendToFault( fault2 , self.getK() ) ) - - - def joinFaults(self , fault1 , fault2): - if not fault1.intersectsFault( fault2 , self.getK()): - layer = self.getGeoLayer() - try: - layer.addIJBarrier( Fault.joinFaults( fault1 , fault2 , self.getK()) ) - except ValueError: - print('Failed to join faults %s and %s' % (fault1.getName() , fault2.getName())) - raise ValueError("") - - - def addPolylineBarrier(self , polyline): - layer = self.getGeoLayer() - p0 = polyline[0] - c0 = self.grid_ref.findCellCornerXY( p0[0] , p0[1] , self.getK() ) - i,j = self.grid_ref.findCellXY( p0[0] , p0[1] , self.getK() ) - print('%g,%g -> %d,%d %d' % (p0[0] , p0[1] , i,j,c0)) - for index in range(1,len(polyline)): - p1 = polyline[index] - c1 = self.grid_ref.findCellCornerXY( p1[0] , p1[1] , self.getK() ) - i,j = self.grid_ref.findCellXY( p1[0] , p1[1] , self.getK() ) - layer.addInterpBarrier( c0 , c1 ) - print('%g,%g -> %d,%d %d' % (p1[0] , p1[1] , i,j,c1)) - print('Adding barrier %d -> %d' % (c0 , c1)) - c0 = c1 - - - def getGeoLayer(self): - """Returns the underlying geometric layer.""" - return self.cNamespace().get_layer( self ) - - - def cellContact(self , p1 , p2): - layer = self.getGeoLayer() - return layer.cellContact(p1,p2) - - - -cwrapper = CWrapper(ECL_LIB) -CWrapper.registerObjectType("fault_block_layer", FaultBlockLayer) - - -FaultBlockLayer.cNamespace().alloc = cwrapper.prototype("c_void_p fault_block_layer_alloc(ecl_grid , int)") -FaultBlockLayer.cNamespace().free = cwrapper.prototype("void fault_block_layer_free(fault_block_layer)") -FaultBlockLayer.cNamespace().size = cwrapper.prototype("int fault_block_layer_get_size(fault_block_layer)") -FaultBlockLayer.cNamespace().iget_block = cwrapper.prototype("fault_block_ref fault_block_layer_iget_block(fault_block_layer, int)") -FaultBlockLayer.cNamespace().add_block = cwrapper.prototype("fault_block_ref fault_block_layer_add_block(fault_block_layer, int)") -FaultBlockLayer.cNamespace().get_block = cwrapper.prototype("fault_block_ref fault_block_layer_get_block(fault_block_layer, int)") -FaultBlockLayer.cNamespace().del_block = cwrapper.prototype("void fault_block_layer_del_block(fault_block_layer, int)") -FaultBlockLayer.cNamespace().has_block = cwrapper.prototype("bool fault_block_layer_has_block(fault_block_layer, int)") -FaultBlockLayer.cNamespace().scan_keyword = cwrapper.prototype("bool fault_block_layer_scan_kw(fault_block_layer, ecl_kw)") -FaultBlockLayer.cNamespace().load_keyword = cwrapper.prototype("bool fault_block_layer_load_kw(fault_block_layer, ecl_kw)") -FaultBlockLayer.cNamespace().getK = cwrapper.prototype("int fault_block_layer_get_k(fault_block_layer)") -FaultBlockLayer.cNamespace().get_next_id = cwrapper.prototype("int fault_block_layer_get_next_id(fault_block_layer)") -FaultBlockLayer.cNamespace().scan_layer = cwrapper.prototype("void fault_block_layer_scan_layer( fault_block_layer , layer)") -FaultBlockLayer.cNamespace().insert_block_content = cwrapper.prototype("void fault_block_layer_insert_block_content( fault_block_layer , fault_block)") -FaultBlockLayer.cNamespace().export_kw = cwrapper.prototype("bool fault_block_layer_export( fault_block_layer , ecl_kw )") -FaultBlockLayer.cNamespace().get_layer = cwrapper.prototype("layer_ref fault_block_layer_get_layer( fault_block_layer )") diff --git a/ThirdParty/Ert/python/python/ert/ecl/faults/fault_collection.py b/ThirdParty/Ert/python/python/ert/ecl/faults/fault_collection.py deleted file mode 100644 index 4d03a1d160..0000000000 --- a/ThirdParty/Ert/python/python/ert/ecl/faults/fault_collection.py +++ /dev/null @@ -1,128 +0,0 @@ -# Copyright (C) 2014 Statoil ASA, Norway. -# -# The file 'fault_collection.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -import re - -from .fault import Fault -from ert.ecl import EclGrid - -comment_regexp = re.compile("--.*") - -def dequote(s): - if s[0] in ["'" , '"']: - if s[0] == s[-1]: - return s[1:-1] - else: - raise ValueError("Quote fuckup") - else: - return s - - -class FaultCollection(object): - def __init__(self , grid = None , *file_list): - self.__fault_list = [] - self.__fault_map = {} - - if grid is not None: - if not isinstance(grid , EclGrid): - raise ValueError("When supplying a list of files to load - you must have a grid") - - for file in file_list: - self.load(grid , file) - - - - def __contains__(self , fault_name): - return self.__fault_map.has_key( fault_name ) - - - def __len__(self): - return len(self.__fault_list) - - - def __getitem__(self , index): - if isinstance(index , str): - return self.__fault_map[index] - elif isinstance(index , int): - return self.__fault_list[index] - else: - raise TypeError("Argument must be fault name or number") - - def __iter__(self): - return iter(self.__fault_list) - - - def getGrid(self): - return self.__grid - - - def getFault(self , name): - return self.__getitem__(name) - - - def hasFault(self , fault_name): - return fault_name in self - - - def addFault(self, fault): - self.__fault_map[fault.getName()] = fault - self.__fault_list.append( fault ) - - - def splitLine(self , line): - tmp = line.split() - if not tmp[-1] == "/": - raise ValueError("Line:%s does not end with /" % line) - - if len(tmp) != 9: - raise ValueError("Line:%s not correct number of items" % line) - - fault_name = dequote(tmp[0]) - I1 = int(tmp[1]) - 1 - I2 = int(tmp[2]) - 1 - J1 = int(tmp[3]) - 1 - J2 = int(tmp[4]) - 1 - K1 = int(tmp[5]) - 1 - K2 = int(tmp[6]) - 1 - face = dequote(tmp[7]) - - return (fault_name , I1,I2,J1,J2,K1,K2 , face) - - - - def loadFaults(self , grid , fileH): - for line in fileH: - line = comment_regexp.sub("" , line) - line = line.strip() - if line == "/": - break - - if line: - (name , I1 , I2 , J1 , J2 , K1 , K2 , face) = self.splitLine( line ) - if not self.hasFault(name): - fault = Fault( grid , name) - self.addFault( fault ) - else: - fault = self.getFault(name) - - fault.addRecord(I1 , I2 , J1 , J2 , K1 , K2 , face) - - - def load(self , grid , file_name): - with open(file_name) as fileH: - for line in fileH: - if line.startswith("FAULTS"): - self.loadFaults(grid , fileH) - diff --git a/ThirdParty/Ert/python/python/ert/ecl/faults/layer.py b/ThirdParty/Ert/python/python/ert/ecl/faults/layer.py deleted file mode 100644 index 668c31236c..0000000000 --- a/ThirdParty/Ert/python/python/ert/ecl/faults/layer.py +++ /dev/null @@ -1,256 +0,0 @@ -# Copyright (C) 2014 Statoil ASA, Norway. -# -# The file 'layer.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -import ctypes -from cwrap import BaseCClass, CWrapper -from ert.ecl import ECL_LIB -from ert.util import IntVector - - -class Layer(BaseCClass): - - def __init__(self , nx , ny): - c_pointer = self.cNamespace().alloc( nx , ny ) - if c_pointer: - super( Layer , self).__init__(c_pointer) - else: - raise ValueError("Invalid input - no Layer object created") - - @classmethod - def copy(cls , src): - layer = Layer( src.getNX() , src.getNY()) - Layer.cNamespace().copy( layer , src ) - return layer - - - def __assertIJ(self , i,j): - if i < 0 or i >= self.getNX(): - raise ValueError("Invalid layer i:%d" % i) - - if j < 0 or j >= self.getNY(): - raise ValueError("Invalid layer j:%d" % j) - - - - def __unpackIndex(self , index): - try: - (i,j) = index - except TypeError: - raise ValueError("Index:%s is invalid - must have two integers" % str(index)) - - self.__assertIJ(i,j) - - return (i,j) - - - - def __setitem__(self , index , value): - (i,j) = self.__unpackIndex(index) - self.cNamespace().set_cell(self , i , j , value ) - - def activeCell(self , i,j): - self.__assertIJ(i,j) - return self.cNamespace().active_cell(self , i , j) - - - def updateActive(self , grid , k): - if grid.getNX() != self.getNX(): - raise ValueError("NX dimension mismatch. Grid:%d layer:%d" % (grid.getNX() , self.getNX())) - - if grid.getNY() != self.getNY(): - raise ValueError("NY dimension mismatch. Grid:%d layer:%d" % (grid.getNY() , self.getNY())) - - if k >= grid.getNZ(): - raise ValueError("K value invalid: Grid range [0,%d)" % grid.getNZ()) - - self.cNamespace().update_active(self , grid , k) - - - - - def __getitem__(self , index): - (i,j) = self.__unpackIndex(index) - return self.cNamespace().get_cell(self , i , j) - - def bottomBarrier(self , i,j): - self.__assertIJ(i,j) - return self.cNamespace().get_bottom_barrier(self , i , j) - - def leftBarrier(self , i,j): - self.__assertIJ(i,j) - return self.cNamespace().get_left_barrier(self , i , j) - - def getNX(self): - return self.cNamespace().get_nx(self) - - def getNY(self): - return self.cNamespace().get_ny(self) - - def free(self): - self.cNamespace().free(self) - - def cellContact(self , p1 , p2): - i1,j1 = p1 - i2,j2 = p2 - - if not 0 <= i1 < self.getNX(): - raise IndexError("Invalid i1:%d" % i1) - - if not 0 <= i2 < self.getNX(): - raise IndexError("Invalid i2:%d" % i2) - - if not 0 <= j1 < self.getNY(): - raise IndexError("Invalid i1:%d" % j1) - - if not 0 <= j2 < self.getNY(): - raise IndexError("Invalid i2:%d" % j2) - - return self.cNamespace().cell_contact(self , i1,j1,i2,j2) - - - def addInterpBarrier(self , c1 , c2): - self.cNamespace().add_interp_barrier( self , c1 , c2 ) - - - def addPolylineBarrier(self , polyline , grid , k): - if len(polyline) > 1: - for i in range(len(polyline) - 1): - x1,y1 = polyline[i] - x2,y2 = polyline[i + 1] - - c1 = grid.findCellCornerXY( x1 , y1 , k ) - c2 = grid.findCellCornerXY( x2 , y2 , k ) - - self.addInterpBarrier( c1 , c2 ) - - - - def addFaultBarrier(self , fault , K , link_segments = True ): - fault_layer = fault[K] - num_lines = len(fault_layer) - for index , fault_line in enumerate(fault_layer): - for segment in fault_line: - c1 , c2 = segment.getCorners() - self.cNamespace().add_barrier(self , c1 , c2) - - if index < num_lines - 1: - next_line = fault_layer[index + 1] - next_segment = next_line[0] - next_c1 , next_c2 = next_segment.getCorners() - - if link_segments: - self.addInterpBarrier( c2 , next_c1 ) - - - def addIJBarrier(self , ij_list): - if len(ij_list) < 2: - raise ValueError("Must have at least two (i,j) points") - - nx = self.getNX() - ny = self.getNY() - p1 = ij_list[0] - i1,j1 = p1 - for p2 in ij_list[1:]: - i2,j2 = p2 - if i1 == i2 or j1 == j2: - if not 0 <= i2 <= nx: - raise ValueError("i value:%d invalid. Valid range: [0,%d] " % (i , i2)) - - if not 0 <= j2 <= ny: - raise ValueError("i value:%d invalid. Valid range: [0,%d] " % (j , j2)) - - Layer.cNamespace().add_ijbarrier( self , i1 , j1 , i2 , j2 ) - p1 = p2 - i1,j1 = p1 - else: - raise ValueError("Must have i1 == i2 or j1 == j2") - - - def cellSum(self): - return Layer.cNamespace().cell_sum( self ) - - - def clearCells(self): - """ - Will reset all cell and edge values to zero. Barriers will be left - unchanged. - """ - Layer.cNamespace().clear_cells( self ) - - - def assign(self , value): - """ - Will set the cell value to @value in all cells. Barriers will not be changed - """ - Layer.cNamespace().assign( self , value ) - - - def updateConnected(self , ij , new_value , org_value = None): - """ - Will update cell value of all cells in contact with cell ij to the - value @new_value. If org_value is not supplied, the current - value in cell ij is used. - """ - if org_value is None: - org_value = self[ij] - - if self[ij] == org_value: - Layer.cNamespace().update_connected( self , ij[0] , ij[1] , org_value , new_value ) - else: - raise ValueError("Cell %s is not equal to %d \n" % (ij , org_value)) - - - def cellsEqual(self , value): - """ - Will return a list [(i1,j1),(i2,j2) , ...(in,jn)] of all cells with value @value. - """ - i_list = IntVector() - j_list = IntVector() - Layer.cNamespace().cells_equal( self , value , i_list , j_list) - ij_list= [] - for (i,j) in zip(i_list , j_list): - ij_list.append( (i,j) ) - return ij_list - - - def countEqual(self , value): - return Layer.cNamespace().count_equal( self , value ) - - - -cwrapper = CWrapper(ECL_LIB) -CWrapper.registerObjectType("layer", Layer) -Layer.cNamespace().alloc = cwrapper.prototype("c_void_p layer_alloc(int, int)") -Layer.cNamespace().copy = cwrapper.prototype("void layer_memcpy(layer , layer)") -Layer.cNamespace().free = cwrapper.prototype("void layer_free(layer)") -Layer.cNamespace().get_nx = cwrapper.prototype("int layer_get_nx(layer)") -Layer.cNamespace().get_ny = cwrapper.prototype("int layer_get_ny(layer)") -Layer.cNamespace().set_cell = cwrapper.prototype("void layer_iset_cell_value(layer , int , int , int)") -Layer.cNamespace().get_cell = cwrapper.prototype("int layer_iget_cell_value(layer , int , int )") -Layer.cNamespace().get_bottom_barrier = cwrapper.prototype("bool layer_iget_bottom_barrier(layer , int , int )") -Layer.cNamespace().get_left_barrier = cwrapper.prototype("bool layer_iget_left_barrier(layer , int , int )") -Layer.cNamespace().cell_contact = cwrapper.prototype("bool layer_cell_contact(layer , int , int , int , int)") -Layer.cNamespace().add_barrier = cwrapper.prototype("void layer_add_barrier(layer , int , int)") -Layer.cNamespace().add_ijbarrier = cwrapper.prototype("void layer_add_ijbarrier(layer , int , int, int , int)") -Layer.cNamespace().add_interp_barrier = cwrapper.prototype("void layer_add_interp_barrier(layer , int , int)") -Layer.cNamespace().clear_cells = cwrapper.prototype("void layer_clear_cells(layer)") -Layer.cNamespace().assign = cwrapper.prototype("void layer_assign(layer , int)") -Layer.cNamespace().cell_sum = cwrapper.prototype("int layer_get_cell_sum(layer)") -Layer.cNamespace().update_connected = cwrapper.prototype("void layer_update_connected_cells(layer,int,int,int,int)") -Layer.cNamespace().cells_equal = cwrapper.prototype("void layer_cells_equal( layer, int,int_vector,int_vector)") -Layer.cNamespace().count_equal = cwrapper.prototype("int layer_count_equal( layer, int)") -Layer.cNamespace().active_cell = cwrapper.prototype("bool layer_iget_active( layer, int,int)") -Layer.cNamespace().update_active = cwrapper.prototype("bool layer_update_active( layer, ecl_grid , int)") diff --git a/ThirdParty/Ert/python/python/ert/ecl/rft/CMakeLists.txt b/ThirdParty/Ert/python/python/ert/ecl/rft/CMakeLists.txt deleted file mode 100644 index 9a13752492..0000000000 --- a/ThirdParty/Ert/python/python/ert/ecl/rft/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - well_trajectory.py -) - -add_python_package("python.ert.ecl.rft" ${PYTHON_INSTALL_PREFIX}/ert/ecl/rft "${PYTHON_SOURCES}" True) diff --git a/ThirdParty/Ert/python/python/ert/enkf/CMakeLists.txt b/ThirdParty/Ert/python/python/ert/enkf/CMakeLists.txt deleted file mode 100644 index 06ba3ccb3f..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/CMakeLists.txt +++ /dev/null @@ -1,56 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - active_list.py - analysis_config.py - analysis_iter_config.py - custom_kw_config_set.py - ecl_config.py - enkf_fs.py - enkf_fs_manager.py - enkf_linalg.py - enkf_main.py - enkf_obs.py - enkf_simulation_runner.py - enkf_state.py - ensemble_config.py - ert_log.py - ert_run_context.py - ert_template.py - ert_templates.py - ert_workflow_list.py - key_manager.py - local_config.py - local_dataset.py - local_ministep.py - local_obsdata.py - local_obsdata_node.py - local_updatestep.py - meas_block.py - meas_data.py - model_config.py - node_id.py - obs_block.py - obs_data.py - plot_config.py - hook_manager.py - hook_workflow.py - run_arg.py - runpath_list.py - site_config.py - state_map.py - summary_key_matcher.py - summary_key_set.py - forward_load_context.py - es_update.py -) - -add_python_package("python.ert.enkf" ${PYTHON_INSTALL_PREFIX}/ert/enkf "${PYTHON_SOURCES}" True) - -add_subdirectory(config) -add_subdirectory(data) -add_subdirectory(enums) -add_subdirectory(export) -add_subdirectory(observations) -add_subdirectory(plot) -add_subdirectory(plot_data) -add_subdirectory(util) diff --git a/ThirdParty/Ert/python/python/ert/enkf/__init__.py b/ThirdParty/Ert/python/python/ert/enkf/__init__.py deleted file mode 100644 index 4d80e84519..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/__init__.py +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file '__init__.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - - -import ert -from cwrap import Prototype -import ert.util -import ert.geo -import ert.ecl -import ert.rms -import ert.analysis -import ert.sched -import ert.config -import ert.job_queue - -class EnkfPrototype(Prototype): - lib = ert.load("libenkf") - - def __init__(self, prototype, bind=True): - super(EnkfPrototype, self).__init__(EnkfPrototype.lib, prototype, bind=bind) - - - -ENKF_LIB = ert.load("libenkf") - -from .enums import * - -from .node_id import NodeId - -from .enkf_linalg import EnkfLinalg -from .util import TimeMap -from .state_map import StateMap -from .summary_key_set import SummaryKeySet -from .summary_key_matcher import SummaryKeyMatcher -from .custom_kw_config_set import CustomKWConfigSet -from .enkf_fs import EnkfFs - -from .ert_workflow_list import ErtWorkflowList -from .active_list import ActiveList -from .config import * -from .data import * - -from .local_dataset import LocalDataset -from .local_obsdata_node import LocalObsdataNode -from .local_obsdata import LocalObsdata -from .local_ministep import LocalMinistep -from .local_updatestep import LocalUpdateStep - -from .observations import * - -from .obs_block import ObsBlock -from .obs_data import ObsData -from .meas_block import MeasBlock -from .meas_data import MeasData - -from .analysis_iter_config import AnalysisIterConfig -from .analysis_config import AnalysisConfig -from .ecl_config import EclConfig - -from .ensemble_config import EnsembleConfig -from .enkf_obs import EnkfObs -from .enkf_state import EnKFState -from .ert_template import ErtTemplate -from .ert_templates import ErtTemplates -from .local_config import LocalConfig -from .model_config import ModelConfig -from .plot_config import PlotConfig -from .site_config import SiteConfig -from .runpath_list import RunpathList, RunpathNode -from .hook_workflow import HookWorkflow -from .hook_manager import HookManager - -from .es_update import ESUpdate -from .enkf_simulation_runner import EnkfSimulationRunner -from .enkf_fs_manager import EnkfFsManager -from .run_arg import RunArg -from .ert_run_context import ErtRunContext -from .enkf_main import EnKFMain -from .ert_log import ErtLog -from .forward_load_context import ForwardLoadContext - -from ert.job_queue import ErtScript as ErtScript -from ert.job_queue import ErtPlugin as ErtPlugin, CancelPluginException as CancelPluginException diff --git a/ThirdParty/Ert/python/python/ert/enkf/active_list.py b/ThirdParty/Ert/python/python/ert/enkf/active_list.py deleted file mode 100644 index 2d7ede2870..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/active_list.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (C) 2015 Statoil ASA, Norway. -# -# The file 'active_list.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB - -class ActiveList(BaseCClass): - def __init__(self): - c_ptr = ActiveList.cNamespace().alloc() - super(ActiveList, self).__init__(c_ptr) - - - def getMode(self): - return ActiveList.cNamespace().get_mode(self) - - def addActiveIndex(self, index): - ActiveList.cNamespace().add_index(self , index) - - - def free(self): - ActiveList.cNamespace().free(self) - - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("active_list", ActiveList) - - -ActiveList.cNamespace().alloc = cwrapper.prototype("c_void_p active_list_alloc()") -ActiveList.cNamespace().free = cwrapper.prototype("void active_list_free(active_list)") -ActiveList.cNamespace().get_mode = cwrapper.prototype("active_mode_enum active_list_get_mode(active_list)") -ActiveList.cNamespace().add_index = cwrapper.prototype("void active_list_add_index(active_list , int)") diff --git a/ThirdParty/Ert/python/python/ert/enkf/analysis_config.py b/ThirdParty/Ert/python/python/ert/enkf/analysis_config.py deleted file mode 100644 index 2b7c2e10da..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/analysis_config.py +++ /dev/null @@ -1,152 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'analysis_config.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCClass, CWrapper -from ert.enkf import EnkfPrototype -from ert.enkf import ENKF_LIB -from ert.enkf import AnalysisIterConfig -from ert.analysis import AnalysisModule -from ert.util import StringList - - -class AnalysisConfig(BaseCClass): - TYPE_NAME = "analysis_config" - _alloc = EnkfPrototype("void* analysis_config_alloc()", bind = False) - _free = EnkfPrototype("void analysis_config_free( analysis_config )") - _get_rerun = EnkfPrototype("int analysis_config_get_rerun( analysis_config )") - _set_rerun = EnkfPrototype("void analysis_config_set_rerun( analysis_config, bool)") - _get_rerun_start = EnkfPrototype("int analysis_config_get_rerun_start( analysis_config )") - _set_rerun_start = EnkfPrototype("void analysis_config_set_rerun_start( analysis_config, int)") - _get_log_path = EnkfPrototype("char* analysis_config_get_log_path( analysis_config)") - _set_log_path = EnkfPrototype("void analysis_config_set_log_path( analysis_config, char*)") - _get_merge_observations = EnkfPrototype("bool analysis_config_get_merge_observations(analysis_config)") - _set_merge_observations = EnkfPrototype("void analysis_config_set_merge_observations(analysis_config, bool)") - _get_iter_config = EnkfPrototype("analysis_iter_config_ref analysis_config_get_iter_config(analysis_config)") - _have_enough_realisations = EnkfPrototype("bool analysis_config_have_enough_realisations(analysis_config, int, int)") - _get_max_runtime = EnkfPrototype("int analysis_config_get_max_runtime(analysis_config)") - _set_max_runtime = EnkfPrototype("void analysis_config_set_max_runtime(analysis_config, int)") - _get_stop_long_running = EnkfPrototype("bool analysis_config_get_stop_long_running(analysis_config)") - _set_stop_long_running = EnkfPrototype("void analysis_config_set_stop_long_running(analysis_config, bool)") - _get_active_module_name = EnkfPrototype("char* analysis_config_get_active_module_name(analysis_config)") - _get_module_list = EnkfPrototype("stringlist_obj analysis_config_alloc_module_names(analysis_config)") - _get_module = EnkfPrototype("analysis_module_ref analysis_config_get_module(analysis_config, char*)") - _select_module = EnkfPrototype("bool analysis_config_select_module(analysis_config, char*)") - _has_module = EnkfPrototype("bool analysis_config_has_module(analysis_config, char*)") - _get_alpha = EnkfPrototype("double analysis_config_get_alpha(analysis_config)") - _set_alpha = EnkfPrototype("void analysis_config_set_alpha(analysis_config, double)") - _get_std_cutoff = EnkfPrototype("double analysis_config_get_std_cutoff(analysis_config)") - _set_std_cutoff = EnkfPrototype("void analysis_config_set_std_cutoff(analysis_config, double)") - _set_global_std_scaling = EnkfPrototype("void analysis_config_set_global_std_scaling(analysis_config, double)") - _get_global_std_scaling = EnkfPrototype("double analysis_config_get_global_std_scaling(analysis_config)") - - def __init__(self): - c_ptr = AnalysisConfig._alloc() - super(AnalysisConfig , self).__init__(c_ptr) - - - def get_rerun(self): - return self._get_rerun() - - def set_rerun(self, rerun): - self._set_rerun(rerun) - - def get_rerun_start(self): - return self._get_rerun_start() - - def set_rerun_start(self, index): - self._set_rerun_start(index) - - def get_log_path(self): - return self._get_log_path() - - def set_log_path(self, path): - self._set_log_path(path) - - def getEnkfAlpha(self): - """ :rtype: float """ - return self._get_alpha() - - def setEnkfAlpha(self, alpha): - self._set_alpha(alpha) - - def getStdCutoff(self): - """ :rtype: float """ - return self._get_std_cutoff() - - def setStdCutoff(self, std_cutoff): - self._set_std_cutoff(std_cutoff) - - def get_merge_observations(self): - return self._get_merge_observations() - - def set_merge_observations(self, merge_observations): - return self._set_merge_observations(merge_observations) - - def getAnalysisIterConfig(self): - """ @rtype: AnalysisIterConfig """ - return self._get_iter_config().setParent(self) - - def get_stop_long_running(self): - """ @rtype: bool """ - return self._get_stop_long_running() - - def set_stop_long_running(self, stop_long_running): - self._set_stop_long_running(stop_long_running) - - def get_max_runtime(self): - """ @rtype: int """ - return self._get_max_runtime() - - def set_max_runtime(self, max_runtime): - self._set_max_runtime(max_runtime) - - def free(self): - self._free() - - def activeModuleName(self): - """ :rtype: str """ - return self._get_active_module_name() - - def getModuleList(self): - """ :rtype: StringList """ - return self._get_module_list() - - def getModule(self, module_name): - """ @rtype: AnalysisModule """ - return self._get_module(module_name) - - def hasModule(self, module_name): - """ @rtype: bool """ - return self._has_module(module_name) - - - def selectModule(self, module_name): - """ @rtype: bool """ - return self._select_module(module_name) - - def getActiveModule(self): - """ :rtype: AnalysisModule """ - return self.getModule(self.activeModuleName()) - - def setGlobalStdScaling(self, std_scaling): - self._set_global_std_scaling(std_scaling) - - def getGlobalStdScaling(self): - return self._get_global_std_scaling() - - def haveEnoughRealisations(self, realizations, ensemble_size): - return self._have_enough_realisations(realizations, ensemble_size) - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/analysis_iter_config.py b/ThirdParty/Ert/python/python/ert/enkf/analysis_iter_config.py deleted file mode 100644 index 22c5c7e0ab..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/analysis_iter_config.py +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'analysis_iter_config.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB - - -class AnalysisIterConfig(BaseCClass): - def __init__(self): - c_ptr = AnalysisIterConfig.cNamespace().alloc() - super(AnalysisIterConfig , self).__init__(c_ptr) - - def getNumIterations(self): - """ @rtype: int """ - return AnalysisIterConfig.cNamespace().get_num_iterations(self) - - def setNumIterations(self, num_iterations): - AnalysisIterConfig.cNamespace().set_num_iterations(self, num_iterations) - - def numIterationsSet(self): - return AnalysisIterConfig.cNamespace().num_iterations_set(self) - - def getNumRetries(self): - """ @rtype: int """ - return AnalysisIterConfig.cNamespace().get_num_retries(self) - - def getCaseFormat(self): - """ @rtype: str """ - return AnalysisIterConfig.cNamespace().get_case_fmt(self) - - def setCaseFormat(self, case_fmt): - AnalysisIterConfig.cNamespace().set_case_fmt(self, case_fmt) - - def caseFormatSet(self): - return AnalysisIterConfig.cNamespace().case_fmt_set(self) - - def free(self): - AnalysisIterConfig.cNamespace().free(self) - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("analysis_iter_config", AnalysisIterConfig) - - -AnalysisIterConfig.cNamespace().alloc = cwrapper.prototype("c_void_p analysis_iter_config_alloc( )") -AnalysisIterConfig.cNamespace().free = cwrapper.prototype("void analysis_iter_config_free( analysis_iter_config )") -AnalysisIterConfig.cNamespace().set_num_iterations = cwrapper.prototype("void analysis_iter_config_set_num_iterations(analysis_iter_config, int)") -AnalysisIterConfig.cNamespace().get_num_iterations = cwrapper.prototype("int analysis_iter_config_get_num_iterations(analysis_iter_config)") -AnalysisIterConfig.cNamespace().get_num_retries = cwrapper.prototype("int analysis_iter_config_get_num_retries_per_iteration(analysis_iter_config)") -AnalysisIterConfig.cNamespace().num_iterations_set = cwrapper.prototype("bool analysis_iter_config_num_iterations_set(analysis_iter_config)") -AnalysisIterConfig.cNamespace().set_case_fmt = cwrapper.prototype("void analysis_iter_config_set_case_fmt( analysis_iter_config , char* )") -AnalysisIterConfig.cNamespace().get_case_fmt = cwrapper.prototype("char* analysis_iter_config_get_case_fmt( analysis_iter_config)") -AnalysisIterConfig.cNamespace().case_fmt_set = cwrapper.prototype("bool analysis_iter_config_case_fmt_set(analysis_iter_config)") diff --git a/ThirdParty/Ert/python/python/ert/enkf/config/CMakeLists.txt b/ThirdParty/Ert/python/python/ert/enkf/config/CMakeLists.txt deleted file mode 100644 index f3e74bb12c..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/config/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - custom_kw_config.py - enkf_config_node.py - field_config.py - gen_data_config.py - gen_kw_config.py - summary_config.py -) - -add_python_package("python.ert.enkf.config" ${PYTHON_INSTALL_PREFIX}/ert/enkf/config "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert/enkf/config/__init__.py b/ThirdParty/Ert/python/python/ert/enkf/config/__init__.py deleted file mode 100644 index bd91659e2a..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/config/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -from .custom_kw_config import CustomKWConfig -from .field_config import FieldConfig -from .gen_data_config import GenDataConfig -from .gen_kw_config import GenKwConfig -from .summary_config import SummaryConfig -from .enkf_config_node import EnkfConfigNode - -__all__ = ["FieldConfig", - "CustomKWConfig", - "GenKwConfig", - "GenDataConfig", - "EnkfConfigNode",] diff --git a/ThirdParty/Ert/python/python/ert/enkf/config/custom_kw_config.py b/ThirdParty/Ert/python/python/ert/enkf/config/custom_kw_config.py deleted file mode 100644 index c249d68891..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/config/custom_kw_config.py +++ /dev/null @@ -1,117 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'field_config.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -import sys - -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB -from ert.util import StringList, IntegerHash - - -class CustomKWConfig(BaseCClass): - def __init__(self, key, result_file, output_file=None, definition=None): - """ - @type key: str - @type result_file: str - @type output_file: str - @type definition: dict - """ - - if definition is not None: - if result_file is not None and output_file is not None: - sys.stderr.write("[%s] Will ignore result file and output file when constructing with a definition." % self.__class__.__name__) - - type_hash = CustomKWConfig.convertDefinition(definition) - c_ptr = CustomKWConfig.cNamespace().alloc_with_definition(key, type_hash) - else: - c_ptr = CustomKWConfig.cNamespace().alloc_empty(key, result_file, output_file) - super(CustomKWConfig, self).__init__(c_ptr) - - def getName(self): - """ @rtype: str """ - return CustomKWConfig.cNamespace().get_name(self) - - def getResultFile(self): - """ @rtype: str """ - return CustomKWConfig.cNamespace().get_result_file(self) - - def getOutputFile(self): - """ @rtype: str """ - return CustomKWConfig.cNamespace().get_output_file(self) - - def parseResultFile(self, result_file, result): - """ @rtype: bool """ - return CustomKWConfig.cNamespace().parse_result_file(self, result_file, result) - - def keyIsDouble(self, key): - """ @rtype: bool """ - return CustomKWConfig.cNamespace().key_is_double(self, key) - - def indexOfKey(self, key): - """ @rtype: int """ - return CustomKWConfig.cNamespace().index_of_key(self, key) - - def __contains__(self, item): - """ @rtype: bool """ - return CustomKWConfig.cNamespace().has_key(self, item) - - def __len__(self): - """ @rtype: int """ - return CustomKWConfig.cNamespace().size(self) - - def __iter__(self): - keys = self.getKeys() - index = 0 - while index < len(keys): - yield keys[index] - index += 1 - - def free(self): - CustomKWConfig.cNamespace().free(self) - - def getKeys(self): - """ @rtype: StringList """ - return CustomKWConfig.cNamespace().keys(self) - - @classmethod - def convertDefinition(cls, definition): - """ @rtype: IntegerHash """ - type_hash = IntegerHash() - - for key, value_type in definition.iteritems(): - if value_type == float: - value_type = 1 - else: - value_type = 0 #str - type_hash[key] = value_type - return type_hash - - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("custom_kw_config", CustomKWConfig) - -CustomKWConfig.cNamespace().free = cwrapper.prototype("void custom_kw_config_free(custom_kw_config)") -CustomKWConfig.cNamespace().alloc_empty = cwrapper.prototype("void* custom_kw_config_alloc_empty(char*, char*, char*)") -CustomKWConfig.cNamespace().alloc_with_definition = cwrapper.prototype("void* custom_kw_config_alloc_with_definition(char*, integer_hash)") -CustomKWConfig.cNamespace().get_name = cwrapper.prototype("char* custom_kw_config_get_name(custom_kw_config)") -CustomKWConfig.cNamespace().get_result_file = cwrapper.prototype("char* custom_kw_config_get_result_file(custom_kw_config)") -CustomKWConfig.cNamespace().get_output_file = cwrapper.prototype("char* custom_kw_config_get_output_file(custom_kw_config)") -CustomKWConfig.cNamespace().parse_result_file = cwrapper.prototype("bool custom_kw_config_parse_result_file(custom_kw_config, char*, stringlist)") -CustomKWConfig.cNamespace().has_key = cwrapper.prototype("bool custom_kw_config_has_key(custom_kw_config, char*)") -CustomKWConfig.cNamespace().key_is_double = cwrapper.prototype("bool custom_kw_config_key_is_double(custom_kw_config, char*)") -CustomKWConfig.cNamespace().index_of_key = cwrapper.prototype("int custom_kw_config_index_of_key(custom_kw_config, char*)") -CustomKWConfig.cNamespace().size = cwrapper.prototype("int custom_kw_config_size(custom_kw_config)") -CustomKWConfig.cNamespace().keys = cwrapper.prototype("stringlist_obj custom_kw_config_get_keys(custom_kw_config)") \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert/enkf/config/enkf_config_node.py b/ThirdParty/Ert/python/python/ert/enkf/config/enkf_config_node.py deleted file mode 100644 index 4941ef9d85..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/config/enkf_config_node.py +++ /dev/null @@ -1,137 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'enkf_config_node.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB -from ert.enkf.config import FieldConfig, GenDataConfig, GenKwConfig, SummaryConfig, CustomKWConfig -from ert.enkf.enums import EnkfTruncationType, ErtImplType, LoadFailTypeEnum, EnkfVarType -from ert.ecl import EclGrid - - - -class EnkfConfigNode(BaseCClass): - - def __init__(self): - raise NotImplementedError("Class can not be instantiated directly!") - - def getImplementationType( self ): - """ @rtype: ErtImplType """ - return EnkfConfigNode.cNamespace().get_impl_type(self) - - def getVariableType( self ): - return EnkfConfigNode.cNamespace().get_var_type(self) - - def getPointerReference(self): - return EnkfConfigNode.cNamespace().get_ref(self) - - # def get_min_std_file(self): - # return EnkfConfigNode.cNamespace().get_min_std_file(self) - - # def get_enkf_outfile(self): - # return EnkfConfigNode.cNamespace().get_enkf_outfile(self) - - def getFieldModelConfig(self): - """ @rtype: FieldConfig """ - return FieldConfig.createCReference(EnkfConfigNode.cNamespace().get_ref(self), parent=self) - - def getDataModelConfig(self): - """ @rtype: GenDataConfig """ - return GenDataConfig.createCReference(EnkfConfigNode.cNamespace().get_ref(self), parent=self) - - def getKeywordModelConfig(self): - """ @rtype: GenKWConfig """ - return GenKwConfig.createCReference(EnkfConfigNode.cNamespace().get_ref(self), parent=self) - - def getCustomKeywordModelConfig(self): - """ @rtype: CustomKWConfig """ - return CustomKWConfig.createCReference(EnkfConfigNode.cNamespace().get_ref(self), parent=self) - - # def get_enkf_infile(self): - # return EnkfConfigNode.cNamespace().get_enkf_infile(self) - - # def alloc_node(self): - # return EnkfNode(self) - - # def get_init_file_fmt(self): - # return EnkfConfigNode.cNamespace().get_init_file_fmt(self) - - def getObservationKeys(self): - """ @rtype: StringList """ - return EnkfConfigNode.cNamespace().get_obs_keys(self).setParent(self) - - def updateStateField(self, truncation, value_min, value_max): - assert isinstance(truncation, EnkfTruncationType) - EnkfConfigNode.cNamespace().update_state_field(self, truncation, value_min, value_max) - - @classmethod - def createSummaryConfigNode(cls, key, load_fail_type): - """ - @type key: str - @type load_fail_type: LoadFailTypeEnum - @rtype: EnkfConfigNode - """ - - assert isinstance(load_fail_type, LoadFailTypeEnum) - return EnkfConfigNode.cNamespace().alloc_summary_node(key, load_fail_type) - - @classmethod - def createFieldConfigNode(cls, key, grid, trans_table = None, forward_init = False): - """ - @type grid: EclGrid - @rtype: EnkfConfigNode - """ - return EnkfConfigNode.cNamespace().alloc_field_node(key, grid, trans_table, forward_init) - - def free(self): - EnkfConfigNode.cNamespace().free(self) - - def getModelConfig(self): - implementation_type = self.getImplementationType() - - if implementation_type == ErtImplType.FIELD: - return self.getFieldModelConfig() - elif implementation_type == ErtImplType.GEN_DATA: - return self.getDataModelConfig() - elif implementation_type == ErtImplType.GEN_KW: - return self.getKeywordModelConfig() - elif implementation_type == ErtImplType.CUSTOM_KW: - return self.getCustomKeywordModelConfig() - elif implementation_type == ErtImplType.SUMMARY: - return SummaryConfig.createCReference(self.getPointerReference(), parent=self) - else: - print("[EnkfConfigNode::getModelConfig()] Unhandled implementation model type: %i" % implementation_type) - # raise NotImplementedError("Unknown model type: %i" % type) - - def getKey(self): - return EnkfConfigNode.cNamespace().get_key( self ) - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("enkf_config_node", EnkfConfigNode) - -EnkfConfigNode.cNamespace().free = cwrapper.prototype("void enkf_config_node_free(enkf_config_node)") -EnkfConfigNode.cNamespace().get_ref = cwrapper.prototype("c_void_p enkf_config_node_get_ref(enkf_config_node)") #todo: fix return type -EnkfConfigNode.cNamespace().get_impl_type = cwrapper.prototype("ert_impl_type_enum enkf_config_node_get_impl_type(enkf_config_node)") - -EnkfConfigNode.cNamespace().get_enkf_outfile = cwrapper.prototype("char* enkf_config_node_get_enkf_outfile(enkf_config_node)") -EnkfConfigNode.cNamespace().get_min_std_file = cwrapper.prototype("char* enkf_config_node_get_min_std_file(enkf_config_node)") -EnkfConfigNode.cNamespace().get_enkf_infile = cwrapper.prototype("char* enkf_config_node_get_enkf_infile(enkf_config_node)") -EnkfConfigNode.cNamespace().get_init_file_fmt = cwrapper.prototype("char* enkf_config_node_get_init_file_fmt(enkf_config_node)") -EnkfConfigNode.cNamespace().get_var_type = cwrapper.prototype("enkf_var_type_enum enkf_config_node_get_var_type(enkf_config_node)") #todo: fix return type as enum -EnkfConfigNode.cNamespace().get_key = cwrapper.prototype("char* enkf_config_node_get_key(enkf_config_node)") -EnkfConfigNode.cNamespace().get_obs_keys = cwrapper.prototype("stringlist_ref enkf_config_node_get_obs_keys(enkf_config_node)") -EnkfConfigNode.cNamespace().alloc_summary_node = cwrapper.prototype("enkf_config_node_obj enkf_config_node_alloc_summary(char*, load_fail_type)") -EnkfConfigNode.cNamespace().alloc_field_node = cwrapper.prototype("enkf_config_node_obj enkf_config_node_alloc_field(char*, ecl_grid, c_void_p, bool)") -EnkfConfigNode.cNamespace().update_state_field = cwrapper.prototype("void enkf_config_node_update_state_field(enkf_config_node, enkf_truncation_type_enum, double, double)") diff --git a/ThirdParty/Ert/python/python/ert/enkf/config/field_config.py b/ThirdParty/Ert/python/python/ert/enkf/config/field_config.py deleted file mode 100644 index 9ca707fa02..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/config/field_config.py +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'field_config.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCClass, CWrapper - -from ert.enkf import ENKF_LIB -from ert.enkf.enums import EnkfFieldFileFormatEnum - -class FieldConfig(BaseCClass): - def __init__(self , kw , grid): - c_ptr = FieldConfig.cNamespace().alloc( kw , grid , None , False ) - super(FieldConfig, self).__init__(c_ptr) - - @classmethod - def exportFormat(cls , filename): - export_format = FieldConfig.cNamespace().export_format( filename ) - if export_format in [ EnkfFieldFileFormatEnum.ECL_GRDECL_FILE , EnkfFieldFileFormatEnum.RMS_ROFF_FILE ]: - return export_format - else: - raise ValueError("Couuld not determine grdecl / roff format from:%s" % filename) - - - def get_type(self): - return FieldConfig.cNamespace().get_type(self) - - def get_truncation_mode(self): - return FieldConfig.cNamespace().get_truncation_mode(self) - - def get_truncation_min(self): - return FieldConfig.cNamespace().get_truncation_min(self) - - def get_init_transform_name(self): - return FieldConfig.cNamespace().get_init_transform_name(self) - - def get_output_transform_name(self): - return FieldConfig.cNamespace().get_output_transform_name(self) - - def get_truncation_max(self): - return FieldConfig.cNamespace().get_truncation_max(self) - - def get_nx(self): - return FieldConfig.cNamespace().get_nx(self) - - def get_ny(self): - return FieldConfig.cNamespace().get_ny(self) - - def get_nz(self): - return FieldConfig.cNamespace().get_nz(self) - - def ijk_active(self, i, j, k): - return FieldConfig.cNamespace().ijk_active(self, i, j, k) - - def free(self): - FieldConfig.cNamespace().free(self) - - - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("field_config", FieldConfig) - -FieldConfig.cNamespace().alloc = cwrapper.prototype("c_void_p field_config_alloc_empty(char* , ecl_grid , c_void_p , bool)") -FieldConfig.cNamespace().free = cwrapper.prototype("void field_config_free( field_config )") -FieldConfig.cNamespace().get_type = cwrapper.prototype("int field_config_get_type(field_config)") -FieldConfig.cNamespace().get_truncation_mode = cwrapper.prototype("int field_config_get_truncation_mode(field_config)") -FieldConfig.cNamespace().get_truncation_min = cwrapper.prototype("double field_config_get_truncation_min(field_config)") -FieldConfig.cNamespace().get_truncation_max = cwrapper.prototype("double field_config_get_truncation_max(field_config)") -FieldConfig.cNamespace().get_init_transform_name = cwrapper.prototype("char* field_config_get_init_transform_name(field_config)") -FieldConfig.cNamespace().get_output_transform_name = cwrapper.prototype("char* field_config_get_output_transform_name(field_config)") -FieldConfig.cNamespace().ijk_active = cwrapper.prototype("bool field_config_ijk_active(field_config, int, int, int)") -FieldConfig.cNamespace().get_nx = cwrapper.prototype("int field_config_get_nx(field_config)") -FieldConfig.cNamespace().get_ny = cwrapper.prototype("int field_config_get_ny(field_config)") -FieldConfig.cNamespace().get_nz = cwrapper.prototype("int field_config_get_nz(field_config)") -FieldConfig.cNamespace().get_grid = cwrapper.prototype("c_void_p field_config_get_grid(field_config)") #todo: fix return type - -FieldConfig.cNamespace().export_format = cwrapper.prototype("enkf_field_file_format_enum field_config_default_export_format(char*)") - diff --git a/ThirdParty/Ert/python/python/ert/enkf/config/gen_data_config.py b/ThirdParty/Ert/python/python/ert/enkf/config/gen_data_config.py deleted file mode 100644 index 7d4b9fdf53..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/config/gen_data_config.py +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'gen_data_config.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB -from ert.enkf.enums import GenDataFileType - - -class GenDataConfig(BaseCClass): - def __init__(self, key , input_format = GenDataFileType.ASCII): - # Can currently only create GEN_DATA instances which should be used - # as result variables. - c_pointer = GenDataConfig.cNamespace().alloc( key , input_format ) - super(GenDataConfig, self).__init__(c_pointer) - - - def get_template_file(self): - return GenDataConfig.cNamespace().get_template_file(self) - - def get_template_key(self): - return GenDataConfig.cNamespace().get_template_key(self) - - def getDataSize(self , report_step): - data_size = GenDataConfig.cNamespace().get_data_size(self , report_step) - if data_size < 0: - raise ValueError("No data has been loaded for %s at report step:%d " % (self.getName() , report_step)) - else: - return data_size - - def getActiveMask(self): - return GenDataConfig.cNamespace().get_active_mask(self) - - def getName(self): - return GenDataConfig.cNamespace().get_key(self) - - - def get_initial_size(self): - return GenDataConfig.cNamespace().get_initial_size(self) - - def getOutputFormat(self): - return GenDataConfig.cNamespace().get_output_format(self) - - def getInputFormat(self): - return GenDataConfig.cNamespace().get_input_format(self) - - def free(self): - GenDataConfig.cNamespace().free(self) - - def hasReportStep(self, report_step): - """ @rtype: bool """ - return GenDataConfig.cNamespace().has_report_step(self, report_step) - - def getNumReportStep(self): - """ @rtype: int """ - return GenDataConfig.cNamespace().get_num_report_step(self) - - def getReportStep(self, index): - """ @rtype: int """ - return GenDataConfig.cNamespace().iget_report_step(self, index) - - def getReportSteps(self): - """ @rtype: list of int """ - return [self.getReportStep(index) for index in range(self.getNumReportStep())] - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("gen_data_config", GenDataConfig) - - -GenDataConfig.cNamespace().alloc = cwrapper.prototype("c_void_p gen_data_config_alloc_GEN_DATA_result( char* , gen_data_file_format_type)") -GenDataConfig.cNamespace().free = cwrapper.prototype("void gen_data_config_free( gen_data_config )") -GenDataConfig.cNamespace().get_output_format = cwrapper.prototype("gen_data_file_format_type gen_data_config_get_output_format(gen_data_config)") -GenDataConfig.cNamespace().get_input_format = cwrapper.prototype("gen_data_file_format_type gen_data_config_get_input_format(gen_data_config)") -GenDataConfig.cNamespace().get_template_file = cwrapper.prototype("char* gen_data_config_get_template_file(gen_data_config)") -GenDataConfig.cNamespace().get_template_key = cwrapper.prototype("char* gen_data_config_get_template_key(gen_data_config)") -GenDataConfig.cNamespace().get_initial_size = cwrapper.prototype("int gen_data_config_get_initial_size(gen_data_config)") -GenDataConfig.cNamespace().has_report_step = cwrapper.prototype("bool gen_data_config_has_report_step(gen_data_config, int)") -GenDataConfig.cNamespace().get_data_size = cwrapper.prototype("int gen_data_config_get_data_size__(gen_data_config , int)") -GenDataConfig.cNamespace().get_key = cwrapper.prototype("char* gen_data_config_get_key(gen_data_config)") -GenDataConfig.cNamespace().get_active_mask = cwrapper.prototype("bool_vector_ref gen_data_config_get_active_mask(gen_data_config)") - -GenDataConfig.cNamespace().get_num_report_step = cwrapper.prototype("int gen_data_config_num_report_step(gen_data_config)") -GenDataConfig.cNamespace().iget_report_step = cwrapper.prototype("int gen_data_config_iget_report_step(gen_data_config, int)") - diff --git a/ThirdParty/Ert/python/python/ert/enkf/config/gen_kw_config.py b/ThirdParty/Ert/python/python/ert/enkf/config/gen_kw_config.py deleted file mode 100644 index 56fdd92f71..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/config/gen_kw_config.py +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'gen_kw_config.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB -from ert.util import StringList - - -class GenKwConfig(BaseCClass): - def __init__(self, key, template_file , parameter_file , tag_fmt = "<%s>"): - """ - @type key: str - @type tag_fmt: str - """ - c_ptr = GenKwConfig.cNamespace().alloc_empty(key, tag_fmt) - super(GenKwConfig, self).__init__(c_ptr) - - self.setTemplateFile(template_file) - self.setParameterFile(parameter_file) - - - def setTemplateFile(self, template_file): - GenKwConfig.cNamespace().set_template_file(self , template_file) - - def getTemplateFile(self): - return GenKwConfig.cNamespace().get_template_file(self) - - def getParameterFile(self): - return GenKwConfig.cNamespace().get_parameter_file(self) - - def setParameterFile(self, parameter_file): - GenKwConfig.cNamespace().set_parameter_file(self, parameter_file) - - def getKeyWords(self): - """ @rtype: StringList """ - return GenKwConfig.cNamespace().alloc_name_list(self) - - def shouldUseLogScale(self, index): - """ @rtype: bool """ - return GenKwConfig.cNamespace().should_use_log_scale(self, index) - - def free(self): - GenKwConfig.cNamespace().free(self) - - def getKey(self): - """ @rtype: str """ - return GenKwConfig.cNamespace().get_key(self) - - def __len__(self): - return GenKwConfig.cNamespace().size(self) - - def __getitem__(self, index): - """ @rtype: str """ - return GenKwConfig.cNamespace().iget_name(self, index) - - def __iter__(self): - index = 0 - while index < len(self): - yield self[index] - index += 1 - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("gen_kw_config", GenKwConfig) - -GenKwConfig.cNamespace().free = cwrapper.prototype("void gen_kw_config_free( gen_kw_config )") -GenKwConfig.cNamespace().alloc_empty = cwrapper.prototype("c_void_p gen_kw_config_alloc_empty( char*, char* )") -GenKwConfig.cNamespace().get_template_file = cwrapper.prototype("char* gen_kw_config_get_template_file(gen_kw_config)") -GenKwConfig.cNamespace().set_template_file = cwrapper.prototype("void gen_kw_config_set_template_file(gen_kw_config , char*)") -GenKwConfig.cNamespace().get_parameter_file = cwrapper.prototype("char* gen_kw_config_get_parameter_file(gen_kw_config)") -GenKwConfig.cNamespace().set_parameter_file = cwrapper.prototype("void gen_kw_config_set_parameter_file( gen_kw_config, char* )") -GenKwConfig.cNamespace().alloc_name_list = cwrapper.prototype("stringlist_obj gen_kw_config_alloc_name_list(gen_kw_config)") - -GenKwConfig.cNamespace().should_use_log_scale = cwrapper.prototype("bool gen_kw_config_should_use_log_scale(gen_kw_config, int)") -GenKwConfig.cNamespace().get_key = cwrapper.prototype("char* gen_kw_config_get_key(gen_kw_config)") -GenKwConfig.cNamespace().size = cwrapper.prototype("int gen_kw_config_get_data_size(gen_kw_config)") -GenKwConfig.cNamespace().iget_name = cwrapper.prototype("char* gen_kw_config_iget_name(gen_kw_config, int)") diff --git a/ThirdParty/Ert/python/python/ert/enkf/config/summary_config.py b/ThirdParty/Ert/python/python/ert/enkf/config/summary_config.py deleted file mode 100644 index 0c3c318228..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/config/summary_config.py +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'field_config.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB - - -class SummaryConfig(BaseCClass): - def __init__(self): - raise NotImplementedError("Class can not be instantiated directly!") - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerType("summary_config", SummaryConfig) -cwrapper.registerType("summary_config", SummaryConfig.createPythonObject) -cwrapper.registerType("summary_config", SummaryConfig.createCReference) - diff --git a/ThirdParty/Ert/python/python/ert/enkf/custom_kw_config_set.py b/ThirdParty/Ert/python/python/ert/enkf/custom_kw_config_set.py deleted file mode 100644 index 2bb4883b6f..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/custom_kw_config_set.py +++ /dev/null @@ -1,51 +0,0 @@ -from cwrap import CWrapper, BaseCClass -from ert.enkf import ENKF_LIB -from ert.enkf.config.custom_kw_config import CustomKWConfig - - -class CustomKWConfigSet(BaseCClass): - - def __init__(self, filename=None): - if filename is None: - c_ptr = CustomKWConfigSet.cNamespace().alloc() - else: - c_ptr = CustomKWConfigSet.cNamespace().alloc_from_file(filename) - - super(CustomKWConfigSet, self).__init__(c_ptr) - - - def addConfig(self, config): - """ @type config: CustomKWConfig """ - assert isinstance(config, CustomKWConfig) - CustomKWConfigSet.cNamespace().add_config(self, config) - - def getStoredConfigKeys(self): - """ @rtype: StringList """ - return CustomKWConfigSet.cNamespace().get_keys(self) - - def updateConfig(self, config): - """ @type config: CustomKWConfig """ - CustomKWConfigSet.cNamespace().update_config(self, config) - - def fwrite(self, filename): - """ @type filename: str """ - CustomKWConfigSet.cNamespace().fwrite(self, filename) - - def reset(self): - CustomKWConfigSet.cNamespace().reset(self) - - def free(self): - CustomKWConfigSet.cNamespace().free(self) - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("custom_kw_config_set", CustomKWConfigSet) - -CustomKWConfigSet.cNamespace().alloc = cwrapper.prototype("c_void_p custom_kw_config_set_alloc()") -CustomKWConfigSet.cNamespace().alloc_from_file = cwrapper.prototype("c_void_p custom_kw_config_set_alloc_from_file(char*)") -CustomKWConfigSet.cNamespace().free = cwrapper.prototype("void custom_kw_config_set_free(custom_kw_config_set)") -CustomKWConfigSet.cNamespace().reset = cwrapper.prototype("void custom_kw_config_set_reset(custom_kw_config_set)") -CustomKWConfigSet.cNamespace().add_config = cwrapper.prototype("void custom_kw_config_set_add_config(custom_kw_config_set, custom_kw_config)") -CustomKWConfigSet.cNamespace().update_config = cwrapper.prototype("void custom_kw_config_set_update_config(custom_kw_config_set, custom_kw_config)") -CustomKWConfigSet.cNamespace().get_keys = cwrapper.prototype("stringlist_obj custom_kw_config_set_get_keys_alloc(custom_kw_config_set)") -CustomKWConfigSet.cNamespace().fwrite = cwrapper.prototype("void custom_kw_config_set_fwrite(custom_kw_config_set, char*)") diff --git a/ThirdParty/Ert/python/python/ert/enkf/data/CMakeLists.txt b/ThirdParty/Ert/python/python/ert/enkf/data/CMakeLists.txt deleted file mode 100644 index 8e2d82822b..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/data/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - custom_kw.py - enkf_node.py - field.py - gen_data.py - gen_kw.py -) - -add_python_package("python.ert.enkf.data" ${PYTHON_INSTALL_PREFIX}/ert/enkf/data "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert/enkf/data/__init__.py b/ThirdParty/Ert/python/python/ert/enkf/data/__init__.py deleted file mode 100644 index 86fe547005..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/data/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -from .custom_kw import CustomKW -from .field import Field -from .gen_data import GenData -from .gen_kw import GenKw -from .enkf_node import EnkfNode - -__all__ = ["Field", - "CustomKW", - "GenKw", - "GenData", - "EnkfNode",] diff --git a/ThirdParty/Ert/python/python/ert/enkf/data/custom_kw.py b/ThirdParty/Ert/python/python/ert/enkf/data/custom_kw.py deleted file mode 100644 index 09c8dc6125..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/data/custom_kw.py +++ /dev/null @@ -1,87 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'field_config.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB -from ert.enkf.config import CustomKWConfig - - -class CustomKW(BaseCClass): - def __init__(self, custom_kw_config): - assert isinstance(custom_kw_config, CustomKWConfig) - c_ptr = CustomKW.cNamespace().alloc(custom_kw_config) - super(CustomKW, self).__init__(c_ptr) - - def fload(self, filename): - """ - @type filename: str - @rtype: bool - """ - return CustomKW.cNamespace().fload(self, filename) - - - def __getitem__(self, key): - """ @rtype: str or float """ - config = self.getConfig() - - if not key in config: - raise KeyError("The key: '%s' is not available!" % key) - - index = config.indexOfKey(key) - - if CustomKW.cNamespace().key_is_null(self, key): - return None - - if config.keyIsDouble(key): - return CustomKW.cNamespace().iget_as_double(self, index) - - return CustomKW.cNamespace().iget_as_string(self, index) - - def __setitem__(self, key, value): - """ - @type key: str - @type value: float|int|str - """ - - config = self.getConfig() - - if not key in config: - raise KeyError("The key: '%s' is not available!" % key) - - if isinstance(value, (float, int, long)): - CustomKW.cNamespace().set_double(self, key, value) - else: - CustomKW.cNamespace().set_string(self, key, str(value)) - - - def getConfig(self): - """ @rtype: CustomKWConfig """ - return CustomKW.cNamespace().get_config(self) - - def free(self): - CustomKW.cNamespace().free(self) - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("custom_kw", CustomKW) - -CustomKW.cNamespace().free = cwrapper.prototype("void custom_kw_free(custom_kw)") -CustomKW.cNamespace().alloc = cwrapper.prototype("void* custom_kw_alloc(custom_kw_config)") -CustomKW.cNamespace().fload = cwrapper.prototype("bool custom_kw_fload(custom_kw, char*)") -CustomKW.cNamespace().get_config = cwrapper.prototype("custom_kw_config_ref custom_kw_get_config(custom_kw)") -CustomKW.cNamespace().key_is_null = cwrapper.prototype("bool custom_kw_key_is_null(custom_kw, char*)") -CustomKW.cNamespace().iget_as_double = cwrapper.prototype("double custom_kw_iget_as_double(custom_kw, int)") -CustomKW.cNamespace().iget_as_string = cwrapper.prototype("char* custom_kw_iget_as_string(custom_kw, int)") -CustomKW.cNamespace().set_string = cwrapper.prototype("void custom_kw_set_string(custom_kw, char*, char*)") -CustomKW.cNamespace().set_double = cwrapper.prototype("void custom_kw_set_double(custom_kw, char*, double)") diff --git a/ThirdParty/Ert/python/python/ert/enkf/data/enkf_node.py b/ThirdParty/Ert/python/python/ert/enkf/data/enkf_node.py deleted file mode 100644 index 621315d737..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/data/enkf_node.py +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'enkf_node.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -import sys -from ert.enkf.enums import ErtImplType -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB, EnkfFs, NodeId -from ert.enkf.data import GenKw, GenData, CustomKW, Field - -class EnkfNode(BaseCClass): - def __init__(self, config_node, private=False): - if private: - c_pointer = EnkfNode.cNamespace().alloc_private(config_node) - else: - c_pointer = EnkfNode.cNamespace().alloc(config_node) - - super(EnkfNode, self).__init__(c_pointer, config_node, True) - - @classmethod - def exportMany(cls , config_node , file_format , fs , iens_list , report_step = 0 , file_type = None , arg = None): - node = EnkfNode( config_node ) - for iens in iens_list: - filename = file_format % iens - node_id = NodeId( report_step , iens ) - if node.tryLoad(fs , node_id): - if node.export( filename , file_type = file_type , arg = arg): - print("%s[%03d] -> %s" % (config_node.getKey() , iens , filename)) - else: - sys.stderr.write("** ERROR: Could not load realisation:%d - export failed" % iens) - - - def export(self , filename , file_type = None , arg = None): - impl_type = self.getImplType() - if impl_type == ErtImplType.FIELD: - field_node = self.asField( ) - return field_node.export( filename , file_type = file_type , init_file = arg) - else: - raise NotImplementedError("The export method is only implemented for field") - - - - def valuePointer(self): - return EnkfNode.cNamespace().value_ptr(self) - - def getImplType(self): - """ @rtype: ert.enkf.enums.ert_impl_type_enum.ErtImplType """ - return EnkfNode.cNamespace().get_impl_type(self) - - - def asGenData(self): - """ @rtype: GenData """ - impl_type = self.getImplType( ) - assert impl_type == ErtImplType.GEN_DATA - - return GenData.createCReference(self.valuePointer(), self) - - def asGenKw(self): - """ @rtype: GenKw """ - impl_type = self.getImplType( ) - assert impl_type == ErtImplType.GEN_KW - - return GenKw.createCReference(self.valuePointer(), self) - - def asCustomKW(self): - """ @rtype: CustomKW """ - impl_type = self.getImplType( ) - assert impl_type == ErtImplType.CUSTOM_KW - - return CustomKW.createCReference(self.valuePointer(), self) - - def asField(self): - """ @rtype: CustomKW """ - impl_type = self.getImplType( ) - assert impl_type == ErtImplType.FIELD - - return Field.createCReference(self.valuePointer(), self) - - def tryLoad(self, fs, node_id): - """ - @type fs: EnkfFS - @type node_id: NodeId - @rtype: bool - """ - assert isinstance(fs, EnkfFs) - assert isinstance(node_id, NodeId) - - return EnkfNode.cNamespace().try_load(self, fs, node_id) - - def name(self): - """ @rtype: str """ - return EnkfNode.cNamespace().get_name(self) - - def load(self, fs, node_id): - if not self.tryLoad(fs, node_id): - raise Exception("Could not load node: %s iens: %d report: %d" % (self.name(), node_id.iens, node_id.report_step)) - - def save(self, fs, node_id): - assert isinstance(fs, EnkfFs) - assert isinstance(node_id, NodeId) - - return EnkfNode.cNamespace().store(self, fs, False, node_id) - - def free(self): - EnkfNode.cNamespace().free(self) - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("enkf_node", EnkfNode) - -EnkfNode.cNamespace().free = cwrapper.prototype("void enkf_node_free(enkf_node)") -EnkfNode.cNamespace().alloc = cwrapper.prototype("void* enkf_node_alloc(enkf_config_node)") -EnkfNode.cNamespace().alloc_private = cwrapper.prototype("void* enkf_node_alloc_private_container(enkf_config_node)") -EnkfNode.cNamespace().get_name = cwrapper.prototype("char* enkf_node_get_key(enkf_node)") - -EnkfNode.cNamespace().value_ptr = cwrapper.prototype("void* enkf_node_value_ptr(enkf_node)") - -EnkfNode.cNamespace().try_load = cwrapper.prototype("bool enkf_node_try_load(enkf_node, enkf_fs, node_id)") -EnkfNode.cNamespace().get_impl_type = cwrapper.prototype("ert_impl_type_enum enkf_node_get_impl_type(enkf_node)") -EnkfNode.cNamespace().store = cwrapper.prototype("bool enkf_node_store(enkf_node, enkf_fs, bool, node_id)") diff --git a/ThirdParty/Ert/python/python/ert/enkf/data/field.py b/ThirdParty/Ert/python/python/ert/enkf/data/field.py deleted file mode 100644 index f0edea22cb..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/data/field.py +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'field.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -import sys - -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB -from ert.enkf.config import FieldConfig - - -class Field(BaseCClass): - def __init__(self): - raise NotImplementedError("Class can not be instantiated directly!") - - - def ijk_get_double(self, i, j, k): - return Field.cNamespace().ijk_get_double(self, i, j, k) - - - def export(self , filename , file_type = None , init_file = None): - output_transform = False - if file_type is None: - try: - file_type = FieldConfig.exportFormat( filename ) - except ValueError: - sys.stderr.write("Sorry - could not infer output format from filename:%s\n" % filename) - return False - - Field.cNamespace().export(self , filename , None , file_type , output_transform , init_file ) - return True - - - def free(self): - Field.cNamespace().free(self) - - -################################################################## - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("field", Field) - -Field.cNamespace().free = cwrapper.prototype("void field_free( field )") -Field.cNamespace().ijk_get_double = cwrapper.prototype("double field_ijk_get_double(field, int, int, int)") -Field.cNamespace().export = cwrapper.prototype("void field_export(field, char* , fortio , enkf_field_file_format_enum , bool , char*)") diff --git a/ThirdParty/Ert/python/python/ert/enkf/data/gen_data.py b/ThirdParty/Ert/python/python/ert/enkf/data/gen_data.py deleted file mode 100644 index c99e62beb8..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/data/gen_data.py +++ /dev/null @@ -1,45 +0,0 @@ -from cwrap import BaseCClass, CWrapper -from ert.util import DoubleVector -from ert.enkf import ENKF_LIB - - - -class GenData(BaseCClass): - - def __init__(self): - c_pointer = GenData.cNamespace().alloc() - super(GenData, self).__init__(c_pointer) - - def __len__(self): - """ @rtype: int """ - return GenData.cNamespace().size(self) - - def free(self): - GenData.cNamespace().free(self) - - def export(self, file_name, file_format_type, fortio): - """ - @type: str - @type: GenDataFileType - @type: FortIO - """ - GenData.cNamespace().export(self, file_name, file_format_type, fortio) - - def getData(self): - data = DoubleVector() - GenData.cNamespace().export_data( self , data ) - return data - - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("gen_data", GenData) - -GenData.cNamespace().alloc = cwrapper.prototype("c_void_p gen_data_alloc()") -GenData.cNamespace().free = cwrapper.prototype("void gen_data_free(gen_data)") -GenData.cNamespace().size = cwrapper.prototype("int gen_data_get_size(gen_data)") - -GenData.cNamespace().export = cwrapper.prototype("void gen_data_export(gen_data , char*, gen_data_file_format_type, fortio)") -GenData.cNamespace().export_data = cwrapper.prototype("void gen_data_export_data(gen_data , double_vector)") - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/data/gen_kw.py b/ThirdParty/Ert/python/python/ert/enkf/data/gen_kw.py deleted file mode 100644 index 69421eb974..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/data/gen_kw.py +++ /dev/null @@ -1,138 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'gen_kw.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -import os.path - -from cwrap import BaseCClass, CWrapper, CFILE - -from ert.util import DoubleVector - -from ert.enkf import ENKF_LIB -from ert.enkf.config import GenKwConfig - - -class GenKw(BaseCClass): - def __init__(self, gen_kw_config): - """ - @type gen_kw_config: GenKwConfig - """ - c_ptr = GenKw.cNamespace().alloc(gen_kw_config) - super(GenKw, self).__init__(c_ptr) - - def exportParameters(self, file_name): - """ @type: str """ - with open(file_name , "w") as py_file: - cfile = CFILE( py_file ) - GenKw.cNamespace().export_parameters(self, cfile) - - - def exportTemplate(self, file_name): - """ @type: str """ - GenKw.cNamespace().export_template(self, file_name) - - - def __getitem__(self, key): - """ - @type key: int or str - @rtype: float - """ - do_transform = False - if isinstance(key, str): - if not key in self: - raise KeyError("Key %s does not exist" % (key)) - return GenKw.cNamespace().data_get(self, key, do_transform) - elif isinstance(key, int): - if not 0 <= key < len(self): - raise IndexError("Index out of range 0 <= %d < %d" % (key, len(self))) - return GenKw.cNamespace().data_iget(self, key, do_transform) - else: - raise TypeError("Illegal type for indexing, must be int or str, got: %s" % (key)) - - - def __setitem__(self, key, value): - """ - @type key: int or str - @type value: float - """ - if isinstance(key, str): - if not key in self: - raise KeyError("Key %s does not exist" % (key)) - GenKw.cNamespace().data_set(self, key, value) - elif isinstance(key, int): - if not 0 <= key < len(self): - raise IndexError("Index out of range 0 <= %d < %d" % (key, len(self))) - GenKw.cNamespace().data_iset(self, key, value) - else: - raise TypeError("Illegal type for indexing, must be int or str, got: %s" % (key)) - - - def eclWrite(self , path , filename , export_file = None): - if not path is None: - if not os.path.isdir(path): - raise IOError("The directory:%s does not exist" % path) - - - if export_file: - with open(export_file , "w") as fileH: - GenKw.cNamespace().ecl_write(self , path , filename , CFILE( fileH )) - else: - GenKw.cNamespace().ecl_write(self , path , filename , None ) - - - - def setValues(self , values): - if len(values) == len(self): - if isinstance(values , DoubleVector): - GenKw.cNamespace().set_values( self , d ) - else: - d = DoubleVector() - for (index,v) in enumerate(values): - if isinstance(v, (int,long,float)): - d[index] = v - else: - raise TypeError("Values must numeric: %s is invalid" % v) - GenKw.cNamespace().set_values( self , d ) - else: - raise ValueError("Size mismatch between GenKW and values") - - def __len__(self): - """ @rtype: int """ - return GenKw.cNamespace().size(self) - - def __contains__(self, item): - return GenKw.cNamespace().has_key(self, item) - - - def free(self): - GenKw.cNamespace().free(self) - - - ################################################################## - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("gen_kw", GenKw) - -GenKw.cNamespace().free = cwrapper.prototype("void gen_kw_free(gen_kw_config)") -GenKw.cNamespace().alloc = cwrapper.prototype("c_void_p gen_kw_alloc(gen_kw_config)") -GenKw.cNamespace().export_parameters = cwrapper.prototype("void gen_kw_write_export_file(gen_kw , FILE)") -GenKw.cNamespace().export_template = cwrapper.prototype("void gen_kw_ecl_write_template(gen_kw , char* )") -GenKw.cNamespace().data_iget = cwrapper.prototype("double gen_kw_data_iget(gen_kw, int, bool)") -GenKw.cNamespace().data_iset = cwrapper.prototype("void gen_kw_data_iset(gen_kw, int, double)") -GenKw.cNamespace().set_values = cwrapper.prototype("void gen_kw_data_set_vector(gen_kw, double_vector)") -GenKw.cNamespace().data_get = cwrapper.prototype("double gen_kw_data_get(gen_kw, char*, bool)") -GenKw.cNamespace().data_set = cwrapper.prototype("void gen_kw_data_set(gen_kw, char*, double)") -GenKw.cNamespace().size = cwrapper.prototype("int gen_kw_data_size(gen_kw)") -GenKw.cNamespace().has_key = cwrapper.prototype("bool gen_kw_data_has_key(gen_kw, char*)") -GenKw.cNamespace().ecl_write = cwrapper.prototype("void gen_kw_ecl_write(gen_kw, char* , char* , FILE)") diff --git a/ThirdParty/Ert/python/python/ert/enkf/ecl_config.py b/ThirdParty/Ert/python/python/ert/enkf/ecl_config.py deleted file mode 100644 index ed0e0ca3cf..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/ecl_config.py +++ /dev/null @@ -1,191 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'ecl_config.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from warnings import warn - -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB -from ert.util import StringList -from ert.ecl import EclSum -from ert.ecl import EclGrid -from ert.util import UIReturn - - -class EclConfig(BaseCClass): - def __init__(self): - c_pointer = EclConfig.cNamespace().alloc() - super(EclConfig, self).__init__(c_pointer) - - def free(self): - EclConfig.cNamespace().free(self) - - #----------------------------------------------------------------- - - def getEclBase(self): - """ @rtype: str """ - return EclConfig.cNamespace().get_eclbase(self) - - def validateEclBase(self , eclbase_fmt): - return EclConfig.cNamespace().validate_eclbase(self , eclbase_fmt) - - # Warning: You should probably use the EnkFMain.setEclBase() method to update the Eclipse basename format - def setEclBase(self , eclbase): - EclConfig.cNamespace().set_eclbase( self , eclbase ) - - #----------------------------------------------------------------- - - def getDataFile(self): - return EclConfig.cNamespace().get_data_file(self) - - def setDataFile(self , datafile): - EclConfig.cNamespace().set_data_file(self , datafile) - - def validateDataFile( self , datafile ): - """ @rtype: UIReturn """ - return EclConfig.cNamespace().validate_data_file( self , datafile ) - - #----------------------------------------------------------------- - - def get_gridfile(self): - """ @rtype: str """ - return EclConfig.cNamespace().get_gridfile(self) - - def set_gridfile(self, gridfile): - EclConfig.cNamespace().set_gridfile(self, gridfile) - - def validateGridFile(self , gridfile): - return EclConfig.cNamespace().validate_gridfile(self, gridfile) - - def get_grid(self): - warning_message = "The method get_grid() is deprecated. Use getGrid() instead" - warn(warning_message) - return self.getGrid( ) - - def getGrid(self): - return EclConfig.cNamespace().get_grid(self) - - #----------------------------------------------------------------- - - def getScheduleFile(self): - return EclConfig.cNamespace().get_schedule_file(self) - - def setScheduleFile(self, schedule_file): - EclConfig.cNamespace().set_schedule_file(self, schedule_file) - - def validateScheduleFile(self , schedule_file): - return EclConfig.cNamespace().validate_schedule_file( self , schedule_file ) - - def get_sched_file(self): - return EclConfig.cNamespace().get_sched_file(self) - - #----------------------------------------------------------------- - - def getInitSection(self): - return EclConfig.cNamespace().get_init_section(self) - - def setInitSection(self, init_section): - EclConfig.cNamespace().set_init_section(self, init_section) - - def validateInitSection(self, init_section): - return EclConfig.cNamespace().validate_init_section(self, init_section) - - #----------------------------------------------------------------- - - def getRefcaseName(self): - return EclConfig.cNamespace().get_refcase_name(self) - - def loadRefcase(self, refcase): - EclConfig.cNamespace().load_refcase(self, refcase) - - def getRefcase(self): - """ @rtype: EclSum """ - refcase = EclConfig.cNamespace().get_refcase( self ) - if not refcase is None: - refcase.setParent(self) - - return refcase - - - def validateRefcase(self, refcase): - return EclConfig.cNamespace().validate_refcase( self , refcase ) - - def hasRefcase(self): - """ @rtype: bool """ - return EclConfig.cNamespace().has_refcase(self) - - #----------------------------------------------------------------- - - def get_static_kw_list(self): - """ @rtype: StringList """ - return EclConfig.cNamespace().get_static_kw_list(self).setParent(self) - - def clear_static_kw(self): - EclConfig.cNamespace().clear_static_kw(self) - - def add_static_kw(self, kw): - EclConfig.cNamespace().add_static_kw(self, kw) - - #----------------------------------------------------------------- - - def getDepthUnit(self): - return EclConfig.cNamespace().get_depth_unit(self) - - def getPressureUnit(self): - return EclConfig.cNamespace().get_pressure_unit(self) - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerType("ecl_config", EclConfig) -cwrapper.registerType("ecl_config_obj", EclConfig.createPythonObject) -cwrapper.registerType("ecl_config_ref", EclConfig.createCReference) - - -EclConfig.cNamespace().alloc = cwrapper.prototype("c_void_p ecl_config_alloc( )") -EclConfig.cNamespace().free = cwrapper.prototype("void ecl_config_free( ecl_config )") - -EclConfig.cNamespace().get_eclbase = cwrapper.prototype("char* ecl_config_get_eclbase( ecl_config )") -EclConfig.cNamespace().validate_eclbase = cwrapper.prototype("ui_return_obj ecl_config_validate_eclbase( ecl_config , char*)") -EclConfig.cNamespace().set_eclbase = cwrapper.prototype("void ecl_config_set_eclbase( ecl_config , char*)") - -EclConfig.cNamespace().get_data_file = cwrapper.prototype("char* ecl_config_get_data_file(ecl_config)") -EclConfig.cNamespace().set_data_file = cwrapper.prototype("void ecl_config_set_data_file(ecl_config , char*)") -EclConfig.cNamespace().validate_data_file = cwrapper.prototype("ui_return_obj ecl_config_validate_data_file(ecl_config , char*)") - -EclConfig.cNamespace().get_gridfile = cwrapper.prototype("char* ecl_config_get_gridfile(ecl_config)") -EclConfig.cNamespace().set_gridfile = cwrapper.prototype("void ecl_config_set_grid(ecl_config, char*)") -EclConfig.cNamespace().validate_gridfile = cwrapper.prototype("ui_return_obj ecl_config_validate_grid(ecl_config, char*)") -EclConfig.cNamespace().get_grid = cwrapper.prototype("ecl_grid_ref ecl_config_get_grid(ecl_config)") #todo: fix return type!!! - -EclConfig.cNamespace().get_schedule_file = cwrapper.prototype("char* ecl_config_get_schedule_file(ecl_config)") -EclConfig.cNamespace().set_schedule_file = cwrapper.prototype("void ecl_config_set_schedule_file(ecl_config, char*)") -EclConfig.cNamespace().validate_schedule_file = cwrapper.prototype("ui_return_obj ecl_config_validate_schedule_file(ecl_config, char*)") -EclConfig.cNamespace().get_sched_file = cwrapper.prototype("c_void_p ecl_config_get_sched_file(ecl_config)") #todo: fix return type!!! - -EclConfig.cNamespace().get_init_section = cwrapper.prototype("char* ecl_config_get_init_section(ecl_config)") -EclConfig.cNamespace().set_init_section = cwrapper.prototype("void ecl_config_set_init_section(ecl_config, char*)") -EclConfig.cNamespace().validate_init_section = cwrapper.prototype("ui_return_obj ecl_config_validate_init_section(ecl_config, char*)") - -EclConfig.cNamespace().get_refcase_name = cwrapper.prototype("char* ecl_config_get_refcase_name(ecl_config)") -EclConfig.cNamespace().get_refcase = cwrapper.prototype("ecl_sum_ref ecl_config_get_refcase(ecl_config)") #todo: fix return type!!! -EclConfig.cNamespace().load_refcase = cwrapper.prototype("void ecl_config_load_refcase(ecl_config, char*)") -EclConfig.cNamespace().validate_refcase = cwrapper.prototype("ui_return_obj ecl_config_validate_refcase(ecl_config, char*)") -EclConfig.cNamespace().has_refcase = cwrapper.prototype("bool ecl_config_has_refcase(ecl_config)") - -EclConfig.cNamespace().get_static_kw_list = cwrapper.prototype("stringlist_ref ecl_config_get_static_kw_list(ecl_config)") -EclConfig.cNamespace().clear_static_kw = cwrapper.prototype("void ecl_config_clear_static_kw(ecl_config)") -EclConfig.cNamespace().add_static_kw = cwrapper.prototype("void ecl_config_add_static_kw(ecl_config, char*)") - -EclConfig.cNamespace().get_depth_unit = cwrapper.prototype("char* ecl_config_get_depth_unit(ecl_config)") -EclConfig.cNamespace().get_pressure_unit = cwrapper.prototype("char* ecl_config_get_pressure_unit(ecl_config)") diff --git a/ThirdParty/Ert/python/python/ert/enkf/enkf_fs.py b/ThirdParty/Ert/python/python/ert/enkf/enkf_fs.py deleted file mode 100644 index 4cd92caf5b..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/enkf_fs.py +++ /dev/null @@ -1,159 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'enkf_fs.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB, TimeMap, StateMap, SummaryKeySet, CustomKWConfigSet -from ert.enkf.enums import EnKFFSType - - -class EnkfFs(BaseCClass): - def __init__(self, mount_point): - c_ptr = EnkfFs.cNamespace().mount(mount_point) - super(EnkfFs, self).__init__(c_ptr) - - self.__umounted = False # Keep track of umounting so we only do it once - - - @classmethod - def createCReference(cls, c_pointer, parent=None): - obj = super(EnkfFs, cls).createCReference(c_pointer, parent) - if not obj is None: - obj.__umounted = False - return obj - - - # def has_node(self, node_key, var_type, report_step, iens, state): - # return EnkfFs.cNamespace().has_node(self, node_key, var_type, report_step, iens, state) - # - # def has_vector(self, node_key, var_type, iens, state): - # return EnkfFs.cNamespace().has_vector(self, node_key, var_type, iens, state) - # - # - # def fread_node(self, key, type, step, member, value): - # buffer = Buffer(100) - # EnkfFs.cNamespace().fread_node(self, buffer, key, type, step, member, value) - # - # def fread_vector(self, key, type, member, value): - # buffer = Buffer(100) - # EnkfFs.cNamespace().fread_vector(self, buffer, key, type, member, value) - - def getTimeMap(self): - """ @rtype: TimeMap """ - self.__checkIfUmounted() - return EnkfFs.cNamespace().get_time_map(self).setParent(self) - - def getStateMap(self): - """ @rtype: StateMap """ - self.__checkIfUmounted() - return EnkfFs.cNamespace().get_state_map(self).setParent(self) - - def getCaseName(self): - """ @rtype: str """ - self.__checkIfUmounted() - return EnkfFs.cNamespace().get_case_name(self) - - def isReadOnly(self): - """ @rtype: bool """ - self.__checkIfUmounted() - return EnkfFs.cNamespace().is_read_only(self) - - def refCount(self): - self.__checkIfUmounted() - return self.cNamespace().get_refcount(self) - - def writeCount(self): - return self.cNamespace().get_writecount(self) - - @classmethod - def exists(cls, path): - return cls.cNamespace().exists(path) - - @classmethod - def diskVersion(cls, path): - disk_version = cls.cNamespace().disk_version(path) - if disk_version < 0: - raise IOError("No such filesystem: %s" % path) - return disk_version - - - @classmethod - def updateVersion(cls, path, src_version , target_version): - return cls.cNamespace().update_disk_version(path , src_version ,target_version) - - - @classmethod - def createFileSystem(cls, path, fs_type, arg=None , mount = False): - assert isinstance(path, str) - assert isinstance(fs_type, EnKFFSType) - fs = cls.cNamespace().create(path, fs_type, arg, mount) - return fs - - - def __checkIfUmounted(self): - if self.__umounted: - raise AssertionError("The EnkfFs instance has been umounted!") - - def umount(self): - if not self.__umounted: - EnkfFs.cNamespace().decref(self) - self.__umounted = True - - def free(self): - self.umount() - - - def fsync(self): - EnkfFs.cNamespace().fsync(self) - - def getSummaryKeySet(self): - """ @rtype: SummaryKeySet """ - return EnkfFs.cNamespace().summary_key_set(self).setParent(self) - - def realizationList(self, state): - """ - Will return list of realizations with state == the specified state. - @type state: ert.enkf.enums.RealizationStateEnum - @rtype: ert.util.IntVector - """ - state_map = self.getStateMap() - return state_map.realizationList(state) - - def getCustomKWConfigSet(self): - """ @rtype: CustomKWConfigSet """ - return EnkfFs.cNamespace().config_kw_config_set(self) - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("enkf_fs", EnkfFs) - -EnkfFs.cNamespace().mount = cwrapper.prototype("c_void_p enkf_fs_mount(char* )") -EnkfFs.cNamespace().create = cwrapper.prototype("enkf_fs_ref enkf_fs_create_fs(char* , enkf_fs_type_enum , c_void_p , bool)") -EnkfFs.cNamespace().exists = cwrapper.prototype("bool enkf_fs_exists(char*)") -EnkfFs.cNamespace().disk_version = cwrapper.prototype("int enkf_fs_disk_version(char*)") -EnkfFs.cNamespace().update_disk_version = cwrapper.prototype("bool enkf_fs_update_disk_version(char*, int, int)") -EnkfFs.cNamespace().decref = cwrapper.prototype("int enkf_fs_decref(enkf_fs)") -EnkfFs.cNamespace().get_refcount = cwrapper.prototype("int enkf_fs_get_refcount(enkf_fs)") -EnkfFs.cNamespace().has_node = cwrapper.prototype("bool enkf_fs_has_node(enkf_fs, char*, c_uint, int, int, c_uint)") -EnkfFs.cNamespace().has_vector = cwrapper.prototype("bool enkf_fs_has_vector(enkf_fs, char*, c_uint, int, c_uint)") -EnkfFs.cNamespace().fread_node = cwrapper.prototype("void enkf_fs_fread_node(enkf_fs, buffer, char*, c_uint, int, int, c_uint)") -EnkfFs.cNamespace().fread_vector = cwrapper.prototype("void enkf_fs_fread_vector(enkf_fs, buffer, char*, c_uint, int, c_uint)") -EnkfFs.cNamespace().get_time_map = cwrapper.prototype("time_map_ref enkf_fs_get_time_map(enkf_fs)") -EnkfFs.cNamespace().get_state_map = cwrapper.prototype("state_map_ref enkf_fs_get_state_map(enkf_fs)") -EnkfFs.cNamespace().get_case_name = cwrapper.prototype("char* enkf_fs_get_case_name(enkf_fs)") -EnkfFs.cNamespace().is_read_only = cwrapper.prototype("bool enkf_fs_is_read_only(enkf_fs)") -EnkfFs.cNamespace().get_writecount = cwrapper.prototype("int enkf_fs_get_write_count(enkf_fs)") -EnkfFs.cNamespace().fsync = cwrapper.prototype("void enkf_fs_fsync(enkf_fs)") -EnkfFs.cNamespace().summary_key_set = cwrapper.prototype("summary_key_set_ref enkf_fs_get_summary_key_set(enkf_fs)") -EnkfFs.cNamespace().config_kw_config_set = cwrapper.prototype("custom_kw_config_set_ref enkf_fs_get_custom_kw_config_set(enkf_fs)") diff --git a/ThirdParty/Ert/python/python/ert/enkf/enkf_fs_manager.py b/ThirdParty/Ert/python/python/ert/enkf/enkf_fs_manager.py deleted file mode 100644 index 5c2c01f4f1..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/enkf_fs_manager.py +++ /dev/null @@ -1,305 +0,0 @@ -import os.path -from cwrap import BaseCClass -from ert.enkf import EnkfFs, StateMap, TimeMap, RealizationStateEnum, EnkfInitModeEnum, EnkfPrototype -from ert.util import StringList, BoolVector - -import re - -def naturalSortKey(s, _nsre=re.compile('([0-9]+)')): - return [int(text) if text.isdigit() else text.lower() for text in re.split(_nsre, s)] - -class FileSystemRotator(object): - def __init__(self, capacity): - super(FileSystemRotator, self).__init__() - self._capacity = capacity - """:type: int""" - self._fs_list = [] - """:type: list of str""" - self._fs_map = {} - """:type: dict[str, EnkfFs]""" - - def __len__(self): - return len(self._fs_list) - - def addFileSystem(self, file_system, full_name): - if self.atCapacity(): - self.dropOldestFileSystem() - - self._fs_list.append(full_name) - self._fs_map[full_name] = file_system - - def dropOldestFileSystem(self): - if len(self._fs_list) > 0: - case_name = self._fs_list[0] - fs = self._fs_map[case_name] - fs.umount() - del self._fs_list[0] - del self._fs_map[case_name] - - print("Dropped filesystem: %s" % case_name) - - def atCapacity(self): - return len(self._fs_list) == self._capacity - - def __contains__(self, full_case_name): - return full_case_name in self._fs_list - - def __getitem__(self, case): - """ @rtype: EnkfFs """ - if isinstance(case, str): - return self._fs_map[case] - elif isinstance(case, int) and 0 <= case < len(self): - case_name = self._fs_list[case] - return self._fs_map[case_name] - else: - raise IndexError("Value '%s' is not a proper index or case name." % case) - - - def umountAll(self): - while len(self._fs_list) > 0: - self.dropOldestFileSystem() - - - -# For normal use from ert all filesystems will be located in the same -# folder in the filesystem - corresponding to the ENSPATH setting in -# the config file; in this implementation that setting is stored in -# the @mount_root field. Currently @mount_root is fixed to the value -# returned by EnKFMain.getMountPoint(), but in principle a different -# path could be sent as the the optional second argument to the -# getFS() method. - -class EnkfFsManager(BaseCClass): - TYPE_NAME = "enkf_fs_manager" - - _get_current_fs = EnkfPrototype("enkf_fs_ref enkf_main_get_fs_ref(enkf_fs_manager)") - _switch_fs = EnkfPrototype("void enkf_main_set_fs(enkf_fs_manager, enkf_fs, char*)") - _fs_exists = EnkfPrototype("bool enkf_main_fs_exists(enkf_fs_manager, char*)") - _alloc_caselist = EnkfPrototype("stringlist_obj enkf_main_alloc_caselist(enkf_fs_manager)") - _set_case_table = EnkfPrototype("void enkf_main_set_case_table(enkf_fs_manager, char*)") - _ensemble_size = EnkfPrototype("int enkf_main_get_ensemble_size(enkf_fs_manager)") - - _is_initialized = EnkfPrototype("bool enkf_main_is_initialized(enkf_fs_manager, bool_vector)") - _is_case_initialized = EnkfPrototype("bool enkf_main_case_is_initialized(enkf_fs_manager, char*, bool_vector)") - _initialize_from_scratch = EnkfPrototype("void enkf_main_initialize_from_scratch(enkf_fs_manager, enkf_fs , stringlist, bool_vector, enkf_init_mode_enum)") - _initialize_case_from_existing = EnkfPrototype("void enkf_main_init_case_from_existing(enkf_fs_manager, enkf_fs, int, enkf_fs)") - _custom_initialize_from_existing = EnkfPrototype("void enkf_main_init_current_case_from_existing_custom(enkf_fs_manager, enkf_fs, int, stringlist, bool_vector)") - _initialize_current_case_from_existing = EnkfPrototype("void enkf_main_init_current_case_from_existing(enkf_fs_manager, enkf_fs, int)") - - _alloc_readonly_state_map = EnkfPrototype("state_map_obj enkf_main_alloc_readonly_state_map(enkf_fs_manager, char*)") - _alloc_readonly_time_map = EnkfPrototype("time_map_obj enkf_main_alloc_readonly_time_map(enkf_fs_manager, char*)") - - DEFAULT_CAPACITY = 5 - - def __init__(self, enkf_main, capacity=DEFAULT_CAPACITY): - """ - @type enkf_main: ert.enkf.EnKFMain - @type capacity: int - """ - super(EnkfFsManager, self).__init__(enkf_main.from_param(enkf_main).value, parent=enkf_main, is_reference=True) - - self._fs_rotator = FileSystemRotator(capacity) - self._mount_root = enkf_main.getMountPoint() - - self._fs_type = enkf_main.getModelConfig().getFSType() - self._fs_arg = None - - self.getCurrentFileSystem() - - def _createFullCaseName(self, mount_root, case_name): - return os.path.join(mount_root, case_name) - - - def getFileSystem(self, case_name, mount_root=None): - """ - @rtype: EnkfFs - """ - if mount_root is None: - mount_root = self._mount_root - - full_case_name = self._createFullCaseName(mount_root, case_name) - - if not full_case_name in self._fs_rotator: - if not EnkfFs.exists(full_case_name): - if self._fs_rotator.atCapacity(): - self._fs_rotator.dropOldestFileSystem() - - EnkfFs.createFileSystem(full_case_name, self._fs_type, self._fs_arg) - - new_fs = EnkfFs(full_case_name) - self._fs_rotator.addFileSystem(new_fs, full_case_name) - - fs = self._fs_rotator[full_case_name] - - return fs - - def isCaseRunning(self, case_name, mount_root=None): - """ Returns true if case is mounted and write_count > 0 - @rtype: bool - """ - if self.isCaseMounted(case_name, mount_root): - case_fs = self.getFileSystem(case_name, mount_root) - return case_fs.writeCount() > 0 - return False - - - def caseExists(self, case_name): - """ @rtype: bool """ - return case_name in self.getCaseList() - - - def caseHasData(self, case_name): - """ @rtype: bool """ - case_has_data = False - state_map = self.getStateMapForCase(case_name) - - for state in state_map: - if state == RealizationStateEnum.STATE_HAS_DATA: - case_has_data = True - - return case_has_data - - - def getCurrentFileSystem(self): - """ Returns the currently selected file system - @rtype: EnkfFs - """ - current_fs = self._get_current_fs() - case_name = current_fs.getCaseName() - full_name = self._createFullCaseName(self._mount_root, case_name) - - if not full_name in self._fs_rotator: - self._fs_rotator.addFileSystem(current_fs, full_name) - else: - current_fs.umount() - - return self.getFileSystem(case_name, self._mount_root) - - - def umount(self): - self._fs_rotator.umountAll() - - - def getFileSystemCount(self): - return len(self._fs_rotator) - - - def getEnsembleSize(self): - """ @rtype: int """ - return self._ensemble_size( ) - - - def switchFileSystem(self, file_system): - """ - @type file_system: EnkfFs - """ - self._switch_fs(file_system, None) - - - def isCaseInitialized(self, case): - return self._is_case_initialized(case, None) - - def isInitialized(self): - """ @rtype: bool """ - return self._is_initialized(None) # what is the bool_vector mask??? - - - def getCaseList(self): - """ @rtype: list[str] """ - caselist = [case for case in self._alloc_caselist()] - return sorted(caselist, key=naturalSortKey) - - - def customInitializeCurrentFromExistingCase(self, source_case, source_report_step, member_mask, node_list): - """ - @type source_case: str - @type source_report_step: int - @type member_mask: ert.util.BoolVector - @type node_list: ert.util.StringList - """ - source_case_fs = self.getFileSystem(source_case) - self._custom_initialize_from_existing(source_case_fs, source_report_step, node_list, member_mask) - - def initializeCurrentCaseFromExisting(self, source_fs, source_report_step): - """ - @type source_fs: EnkfFs - @type source_report_step: int - """ - self._initialize_current_case_from_existing(source_fs, source_report_step) - - def initializeCaseFromExisting(self, source_fs, source_report_step, target_fs): - """ - @type source_fs: EnkfFs - @type source_report_step: int - @type target_fs: EnkfFs - """ - self._initialize_case_from_existing(source_fs, source_report_step, target_fs) - - def initializeCaseFromScratch(self, case, parameter_list, from_iens, to_iens, force_init=True): - """ - @type case: EnkfFs - @type parameter_list: ert.util.StringList - @type to_iens: int - @type from_iens: int - @type force_init: bool - """ - mask = BoolVector( initial_size = self.getEnsembleSize( ) , default_value = False ) - for iens in range(from_iens,to_iens+1): - mask[iens] = True - - if force_init: - init_mode = EnkfInitModeEnum.INIT_FORCE - else: - init_mode = EnkfInitModeEnum.INIT_CONDITIONAL - - self._initialize_from_scratch(case, parameter_list, mask , init_mode) - - - - def initializeFromScratch(self, parameter_list, from_iens, to_iens, force_init=True): - """ - @type parameter_list: ert.util.StringList - @type to_iens: int - @type from_iens: int - @type force_init: bool - """ - case = self.getCurrentFileSystem() - self.initializeCaseFromScratch(case, parameter_list, from_iens, to_iens, force_init) - - def isCaseMounted(self, case_name, mount_root=None): - """ - @type case_name: str - @type mount_root: str - @rtype: bool - """ - if mount_root is None: - mount_root = self._mount_root - - full_case_name = self._createFullCaseName(mount_root, case_name) - - return full_case_name in self._fs_rotator - - def getStateMapForCase(self, case): - """ - @type case: str - @rtype: StateMap - """ - if self.isCaseMounted(case): - fs = self.getFileSystem(case) - return fs.getStateMap() - else: - return self._alloc_readonly_state_map(case) - - def getTimeMapForCase(self, case): - """ - @type case: str - @rtype: TimeMap - """ - return self._alloc_readonly_time_map(case) - - def isCaseHidden(self, case_name): - """ - @rtype: bool - """ - return case_name.startswith(".") - diff --git a/ThirdParty/Ert/python/python/ert/enkf/enkf_linalg.py b/ThirdParty/Ert/python/python/ert/enkf/enkf_linalg.py deleted file mode 100644 index 18fe128893..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/enkf_linalg.py +++ /dev/null @@ -1,32 +0,0 @@ -from cwrap import CWrapper, CNamespace -from ert.enkf import ENKF_LIB -from ert.util import Matrix , DoubleVector - - -class EnkfLinalg(object): - __namespace = CNamespace("EnkfLinalg") - - @classmethod - def calculatePrincipalComponents(cls, S0, D_obs, truncation, ncomp, PC, PC_obs, singular_values): - assert isinstance(S0, Matrix) - assert isinstance(D_obs, Matrix) - assert isinstance(truncation, (float, int)) - assert isinstance(ncomp, int) - assert isinstance(PC, Matrix) - assert isinstance(PC_obs, Matrix) - assert isinstance(singular_values , DoubleVector) - - EnkfLinalg.cNamespace().get_PC(S0, D_obs, truncation, ncomp, PC, PC_obs , singular_values) - - @classmethod - def cNamespace(cls): - return EnkfLinalg.__namespace - - - -cwrapper = CWrapper(ENKF_LIB) - -EnkfLinalg.cNamespace().get_PC = cwrapper.prototype("void enkf_linalg_get_PC(matrix, matrix, double, int, matrix, matrix, double_vector)") - - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/enkf_main.py b/ThirdParty/Ert/python/python/ert/enkf/enkf_main.py deleted file mode 100644 index c90098614e..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/enkf_main.py +++ /dev/null @@ -1,334 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'ecl_kw.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -import ctypes -from cwrap import BaseCClass, CWrapper - -from ert.enkf import AnalysisConfig, EclConfig, EnkfObs, EnKFState, LocalConfig, ModelConfig, EnsembleConfig, PlotConfig, SiteConfig, ENKF_LIB, EnkfSimulationRunner, EnkfFsManager, ErtWorkflowList, HookManager, HookWorkflow, ESUpdate -from ert.enkf.enums import EnkfInitModeEnum -from ert.enkf.key_manager import KeyManager -from ert.util import SubstitutionList, Log - - - -class EnKFMain(BaseCClass): - def __init__(self, model_config, strict = True, verbose = True): - c_ptr = EnKFMain.cNamespace().bootstrap(model_config, strict, verbose) - super(EnKFMain, self).__init__(c_ptr) - - # The model_config argument can be None; the only reason to - # allow that possibility is to be able to test that the - # site-config loads correctly. - if model_config is None: - self.__simulation_runner = None - self.__fs_manager = None - self.__es_update = None - else: - self.__simulation_runner = EnkfSimulationRunner(self) - self.__fs_manager = EnkfFsManager(self) - self.__es_update = ESUpdate(self) - - - self.__key_manager = KeyManager(self) - - @staticmethod - def loadSiteConfig(): - """ - This method will load the site config file; the sole purpose - of this method is testing. - """ - EnKFMain( None ) - - - @classmethod - def createCReference(cls, c_pointer, parent=None): - obj = super(EnKFMain, cls).createCReference(c_pointer, parent) - obj.__simulation_runner = EnkfSimulationRunner(obj) - obj.__fs_manager = EnkfFsManager(obj) - return obj - - - @staticmethod - def createNewConfig(config_file, storage_path, dbase_type, num_realizations): - EnKFMain.cNamespace().create_new_config(config_file, storage_path, dbase_type, num_realizations) - - def getRealisation(self , iens): - """ @rtype: EnKFState """ - if 0 <= iens < self.getEnsembleSize(): - return EnKFMain.cNamespace().iget_state(self, iens).setParent(self) - else: - raise IndexError("iens value:%d invalid Valid range: [0,%d)" % (iens , self.getEnsembleSize())) - - - def set_eclbase(self, eclbase): - EnKFMain.cNamespace().set_eclbase(self, eclbase) - - def umount(self): - if not self.__fs_manager is None: - self.__fs_manager.umount() - - def free(self): - self.umount() - EnKFMain.cNamespace().free(self) - - def getEnsembleSize(self): - """ @rtype: int """ - return EnKFMain.cNamespace().get_ensemble_size(self) - - def resizeEnsemble(self, value): - EnKFMain.cNamespace().resize_ensemble(self, value) - - def ensembleConfig(self): - """ @rtype: EnsembleConfig """ - return EnKFMain.cNamespace().get_ens_config(self).setParent(self) - - def analysisConfig(self): - """ @rtype: AnalysisConfig """ - return EnKFMain.cNamespace().get_analysis_config(self).setParent(self) - - def getModelConfig(self): - """ @rtype: ModelConfig """ - return EnKFMain.cNamespace().get_model_config(self).setParent(self) - - def logh(self): - """ @rtype: Log """ - return EnKFMain.cNamespace().get_logh(self).setParent(self) - - def getLocalConfig(self): - """ @rtype: LocalConfig """ - config = EnKFMain.cNamespace().get_local_config(self).setParent(self) - config.initAttributes( self.ensembleConfig() , self.getObservations() , self.eclConfig().getGrid() ) - return config - - - def siteConfig(self): - """ @rtype: SiteConfig """ - return EnKFMain.cNamespace().get_site_config(self).setParent(self) - - def eclConfig(self): - """ @rtype: EclConfig """ - return EnKFMain.cNamespace().get_ecl_config(self).setParent(self) - - def plotConfig(self): - """ @rtype: PlotConfig """ - return EnKFMain.cNamespace().get_plot_config(self).setParent(self) - - def set_datafile(self, datafile): - EnKFMain.cNamespace().set_datafile(self, datafile) - - def get_schedule_prediction_file(self): - schedule_prediction_file = EnKFMain.cNamespace().get_schedule_prediction_file(self) - return schedule_prediction_file - - def set_schedule_prediction_file(self, file): - EnKFMain.cNamespace().set_schedule_prediction_file(self, file) - - def getDataKW(self): - """ @rtype: SubstitutionList """ - return EnKFMain.cNamespace().get_data_kw(self) - - def clearDataKW(self): - EnKFMain.cNamespace().clear_data_kw(self) - - def addDataKW(self, key, value): - EnKFMain.cNamespace().add_data_kw(self, key, value) - - - def getMountPoint(self): - return EnKFMain.cNamespace().get_mount_point(self) - - - def del_node(self, key): - EnKFMain.cNamespace().del_node(self, key) - - def getObservations(self): - """ @rtype: EnkfObs """ - return EnKFMain.cNamespace().get_obs(self).setParent(self) - - def loadObservations(self , obs_config_file , clear = True): - EnKFMain.cNamespace().load_obs(self, obs_config_file , clear) - - - def get_pre_clear_runpath(self): - pre_clear = EnKFMain.cNamespace().get_pre_clear_runpath(self) - return pre_clear - - def set_pre_clear_runpath(self, value): - EnKFMain.cNamespace().set_pre_clear_runpath(self, value) - - def iget_keep_runpath(self, iens): - ikeep = EnKFMain.cNamespace().iget_keep_runpath(self, iens) - return ikeep - - def iset_keep_runpath(self, iens, keep_runpath): - EnKFMain.cNamespace().iset_keep_runpath(self, iens, keep_runpath) - - def get_templates(self): - return EnKFMain.cNamespace().get_templates(self).setParent(self) - - def get_site_config_file(self): - site_conf_file = EnKFMain.cNamespace().get_site_config_file(self) - return site_conf_file - - def getUserConfigFile(self): - """ @rtype: str """ - config_file = EnKFMain.cNamespace().get_user_config_file(self) - return config_file - - - def getHistoryLength(self): - return EnKFMain.cNamespace().get_history_length(self) - - def getMemberRunningState(self, ensemble_member): - """ @rtype: EnKFState """ - return EnKFMain.cNamespace().iget_state(self, ensemble_member).setParent(self) - - def get_observations(self, user_key, obs_count, obs_x, obs_y, obs_std): - EnKFMain.cNamespace().get_observations(self, user_key, obs_count, obs_x, obs_y, obs_std) - - def get_observation_count(self, user_key): - return EnKFMain.cNamespace().get_observation_count(self, user_key) - - - def getESUpdate(self): - """ @rtype: ESUpdate """ - return self.__es_update - - def getEnkfSimulationRunner(self): - """ @rtype: EnkfSimulationRunner """ - return self.__simulation_runner - - def getEnkfFsManager(self): - """ @rtype: EnkfFsManager """ - return self.__fs_manager - - def getKeyManager(self): - """ :rtype: KeyManager """ - return self.__key_manager - - def getWorkflowList(self): - """ @rtype: ErtWorkflowList """ - return EnKFMain.cNamespace().get_workflow_list(self).setParent(self) - - def getHookManager(self): - """ @rtype: HookManager """ - return EnKFMain.cNamespace().get_hook_manager(self) - - - def fieldInitFile(self , config_node): - return EnKFMain.cNamespace().alloc_field_init_file( self , config_node ) - - - def exportField(self, keyword, path, iactive, file_type, report_step, state, enkfFs): - """ - @type keyword: str - @type path: str - @type iactive: BoolVector - @type file_type: EnkfFieldFileFormatEnum - @type report_step: int - @type enkfFs: EnkfFs - - """ - assert isinstance(keyword, str) - return EnKFMain.cNamespace().export_field_with_fs(self, keyword, path, iactive, file_type, report_step, state, enkfFs) - - def loadFromForwardModel(self, realization, iteration, fs): - EnKFMain.cNamespace().load_from_forward_model(self, iteration, realization, fs) - - def createRunPath(self , run_arg): - EnKFMain.cNamespace().create_run_path( self , run_arg) - - def submitSimulation(self , run_arg): - EnKFMain.cNamespace().submit_simulation( self , run_arg) - - - def getRunContextENSEMPLE_EXPERIMENT(self , fs , iactive , init_mode = EnkfInitModeEnum.INIT_CONDITIONAL , iteration = 0): - return EnKFMain.cNamespace().alloc_run_context_ENSEMBLE_EXPERIMENT( self , fs , iactive , init_mode , iteration ) - - - def getRunpathList(self): - return EnKFMain.cNamespace().get_runpath_list( self ) - - def addNode(self, enkf_config_node): - EnKFMain.cNamespace().add_node(self, enkf_config_node) - - - - - -################################################################## - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("enkf_main", EnKFMain) - -EnKFMain.cNamespace().bootstrap = cwrapper.prototype("c_void_p enkf_main_bootstrap(char*, bool, bool)") -EnKFMain.cNamespace().free = cwrapper.prototype("void enkf_main_free(enkf_main)") - -EnKFMain.cNamespace().get_ensemble_size = cwrapper.prototype("int enkf_main_get_ensemble_size( enkf_main )") -EnKFMain.cNamespace().get_ens_config = cwrapper.prototype("ens_config_ref enkf_main_get_ensemble_config( enkf_main )") -EnKFMain.cNamespace().get_model_config = cwrapper.prototype("model_config_ref enkf_main_get_model_config( enkf_main )") -EnKFMain.cNamespace().get_local_config = cwrapper.prototype("local_config_ref enkf_main_get_local_config( enkf_main )") -EnKFMain.cNamespace().get_analysis_config = cwrapper.prototype("analysis_config_ref enkf_main_get_analysis_config( enkf_main)") -EnKFMain.cNamespace().get_site_config = cwrapper.prototype("site_config_ref enkf_main_get_site_config( enkf_main)") -EnKFMain.cNamespace().get_ecl_config = cwrapper.prototype("ecl_config_ref enkf_main_get_ecl_config( enkf_main)") -EnKFMain.cNamespace().get_plot_config = cwrapper.prototype("plot_config_ref enkf_main_get_plot_config( enkf_main)") -EnKFMain.cNamespace().set_eclbase = cwrapper.prototype("ui_return_obj enkf_main_set_eclbase( enkf_main, char*)") -EnKFMain.cNamespace().set_datafile = cwrapper.prototype("void enkf_main_set_data_file( enkf_main, char*)") -EnKFMain.cNamespace().get_schedule_prediction_file = cwrapper.prototype("char* enkf_main_get_schedule_prediction_file( enkf_main )") -EnKFMain.cNamespace().set_schedule_prediction_file = cwrapper.prototype("void enkf_main_set_schedule_prediction_file( enkf_main , char*)") - -EnKFMain.cNamespace().get_data_kw = cwrapper.prototype("subst_list_ref enkf_main_get_data_kw(enkf_main)") -EnKFMain.cNamespace().clear_data_kw = cwrapper.prototype("void enkf_main_clear_data_kw(enkf_main)") -EnKFMain.cNamespace().add_data_kw = cwrapper.prototype("void enkf_main_add_data_kw(enkf_main, char*, char*)") - -EnKFMain.cNamespace().resize_ensemble = cwrapper.prototype("void enkf_main_resize_ensemble(enkf_main, int)") -EnKFMain.cNamespace().del_node = cwrapper.prototype("void enkf_main_del_node(enkf_main, char*)") -EnKFMain.cNamespace().get_obs = cwrapper.prototype("enkf_obs_ref enkf_main_get_obs(enkf_main)") -EnKFMain.cNamespace().load_obs = cwrapper.prototype("void enkf_main_load_obs(enkf_main, char* , bool)") - -EnKFMain.cNamespace().get_pre_clear_runpath = cwrapper.prototype("bool enkf_main_get_pre_clear_runpath(enkf_main)") -EnKFMain.cNamespace().set_pre_clear_runpath = cwrapper.prototype("void enkf_main_set_pre_clear_runpath(enkf_main, bool)") -EnKFMain.cNamespace().iget_keep_runpath = cwrapper.prototype("int enkf_main_iget_keep_runpath(enkf_main, int)") -EnKFMain.cNamespace().iset_keep_runpath = cwrapper.prototype("void enkf_main_iset_keep_runpath(enkf_main, int, int_vector)") -EnKFMain.cNamespace().get_templates = cwrapper.prototype("ert_templates_ref enkf_main_get_templates(enkf_main)") -EnKFMain.cNamespace().get_site_config_file = cwrapper.prototype("char* enkf_main_get_site_config_file(enkf_main)") -EnKFMain.cNamespace().get_history_length = cwrapper.prototype("int enkf_main_get_history_length(enkf_main)") - -EnKFMain.cNamespace().get_observations = cwrapper.prototype("void enkf_main_get_observations(enkf_main, char*, int, long*, double*, double*)") -EnKFMain.cNamespace().get_observation_count = cwrapper.prototype("int enkf_main_get_observation_count(enkf_main, char*)") -EnKFMain.cNamespace().iget_state = cwrapper.prototype("enkf_state_ref enkf_main_iget_state(enkf_main, int)") - -EnKFMain.cNamespace().get_workflow_list = cwrapper.prototype("ert_workflow_list_ref enkf_main_get_workflow_list(enkf_main)") -EnKFMain.cNamespace().get_hook_manager = cwrapper.prototype("hook_manager_ref enkf_main_get_hook_manager(enkf_main)") - - -EnKFMain.cNamespace().create_new_config = cwrapper.prototype("void enkf_main_create_new_config(char* , char*, char* , int)") - -EnKFMain.cNamespace().get_user_config_file = cwrapper.prototype("char* enkf_main_get_user_config_file(enkf_main)") -EnKFMain.cNamespace().get_mount_point = cwrapper.prototype("char* enkf_main_get_mount_root( enkf_main )") - -EnKFMain.cNamespace().export_field = cwrapper.prototype("bool enkf_main_export_field(enkf_main, char*, char*, bool_vector, enkf_field_file_format_enum, int)") - -EnKFMain.cNamespace().export_field_with_fs = cwrapper.prototype("bool enkf_main_export_field_with_fs(enkf_main, char*, char*, bool_vector, enkf_field_file_format_enum, int, enkf_fs_manager)") -EnKFMain.cNamespace().load_from_forward_model = cwrapper.prototype("void enkf_main_load_from_forward_model_from_gui(enkf_main, int, bool_vector, enkf_fs)") - -EnKFMain.cNamespace().create_run_path = cwrapper.prototype("void enkf_main_icreate_run_path(enkf_main , run_arg)") -EnKFMain.cNamespace().submit_simulation = cwrapper.prototype("void enkf_main_isubmit_job(enkf_main , run_arg)") -EnKFMain.cNamespace().alloc_run_context_ENSEMBLE_EXPERIMENT= cwrapper.prototype("ert_run_context_obj enkf_main_alloc_ert_run_context_ENSEMBLE_EXPERIMENT( enkf_main , enkf_fs , bool_vector , enkf_init_mode_enum , int)") -EnKFMain.cNamespace().alloc_field_init_file = cwrapper.prototype("cstring_obj enkf_main_alloc_abs_path_to_init_file(enkf_main, enkf_config_node)") -EnKFMain.cNamespace().get_runpath_list = cwrapper.prototype("runpath_list_ref enkf_main_get_runpath_list(enkf_main)") - -EnKFMain.cNamespace().add_node = cwrapper.prototype("void enkf_main_add_node(enkf_main, enkf_config_node)") - diff --git a/ThirdParty/Ert/python/python/ert/enkf/enkf_obs.py b/ThirdParty/Ert/python/python/ert/enkf/enkf_obs.py deleted file mode 100644 index 968c70fc2c..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/enkf_obs.py +++ /dev/null @@ -1,176 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'enkf_obs.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -import os.path - -from cwrap import BaseCClass, CWrapper -from ert.util import StringList, IntVector -from ert.sched import History -from ert.ecl import EclSum , EclGrid -from ert.enkf import ENKF_LIB, EnkfFs, LocalObsdataNode , LocalObsdata, MeasData, ObsData -from ert.enkf.enums import EnkfObservationImplementationType - -from ert.enkf.observations import ObsVector - - -class EnkfObs(BaseCClass): - def __init__(self , ensemble_config , history = None , external_time_map = None , grid = None , refcase = None ): - c_ptr = EnkfObs.cNamespace().alloc( history , external_time_map , grid , refcase , ensemble_config ) - super(EnkfObs, self).__init__(c_ptr) - - - def __len__(self): - return EnkfObs.cNamespace().get_size(self) - - def __contains__(self , key): - return EnkfObs.cNamespace().has_key(self, key) - - def __iter__(self): - """ @rtype: ObsVector """ - iobs = 0 - while iobs < len(self): - vector = self[iobs] - yield vector - iobs += 1 - - - def __getitem__(self, key_or_index): - """ @rtype: ObsVector """ - if isinstance(key_or_index, str): - if self.hasKey(key_or_index): - return EnkfObs.cNamespace().get_vector(self, key_or_index).setParent(self) - else: - raise KeyError("Unknown key: %s" % key_or_index) - elif isinstance(key_or_index, int): - if 0 <= key_or_index < len(self): - return EnkfObs.cNamespace().iget_vector(self, key_or_index).setParent(self) - else: - raise IndexError("Index must be in range: 0 <= %d < %d" % (key_or_index, len(self))) - else: - raise TypeError("Key or index must be of type str or int") - - - def createLocalObsdata(self , key , add_active_steps = True): - # Use getAllActiveLocalObsdata() - raise NotImplementedError("Hmmm C function: enkf_obs_alloc_all_active_local_obs() removed") - - - - def getAllActiveLocalObsdata(self , key = "ALL-OBS"): - return EnkfObs.cNamespace().create_all_active_obs( self , key ) - - - - def getTypedKeylist(self, observation_implementation_type): - """ - @type observation_implementation_type: EnkfObservationImplementationType - @rtype: StringList - """ - return EnkfObs.cNamespace().alloc_typed_keylist(self, observation_implementation_type) - - def obsType(self , key): - if key in self: - return EnkfObs.cNamespace().obs_type( self , key) - else: - raise KeyError("Unknown observation key:%s" % key) - - - def getMatchingKeys(self , pattern , obs_type = None): - """ - Will return a list of all the observation keys matching the input - pattern. The matching is based on fnmatch(). - """ - key_list = EnkfObs.cNamespace().alloc_matching_keylist(self, pattern) - if obs_type: - new_key_list = [] - for key in key_list: - if self.obsType( key ) == obs_type: - new_key_list.append( key ) - return new_key_list - else: - return key_list - - - def hasKey(self, key): - - """ @rtype: bool """ - return key in self - - - def getObservationTime(self, index): - """ @rtype: CTime """ - return EnkfObs.cNamespace().iget_obs_time(self, index) - - - def addObservationVector(self, observation_vector): - assert isinstance(observation_vector, ObsVector) - - observation_vector.convertToCReference(self) - - EnkfObs.cNamespace().add_obs_vector(self, observation_vector) - - def getObservationAndMeasureData(self, fs, local_obsdata, active_list, meas_data, obs_data): - assert isinstance(fs, EnkfFs) - assert isinstance(local_obsdata, LocalObsdata) - assert isinstance(active_list, IntVector) - assert isinstance(meas_data, MeasData) - assert isinstance(obs_data, ObsData) - - EnkfObs.cNamespace().get_obs_and_measure_data(self, fs, local_obsdata, active_list, meas_data, obs_data) - - - def scaleCorrelatedStd( self , fs , local_obsdata , active_list): - return EnkfObs.cNamespace().scale_correlated_std( self , fs , active_list , local_obsdata ) - - def localScaleStd( self , local_obsdata , scale_factor): - return EnkfObs.cNamespace().local_scale_std( self , local_obsdata, scale_factor) - - def load(self , config_file): - if not os.path.isfile( config_file ): - raise IOError("The observation config file:%s does not exist" % config_file) - return EnkfObs.cNamespace().load( self , config_file ) - - - def clear(self): - EnkfObs.cNamespace().clear( self ) - - - def free(self): - EnkfObs.cNamespace().free(self) - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("enkf_obs", EnkfObs) - -EnkfObs.cNamespace().alloc = cwrapper.prototype("c_void_p enkf_obs_alloc( history , time_map , ecl_grid , ecl_sum , ens_config )") -EnkfObs.cNamespace().free = cwrapper.prototype("void enkf_obs_free( enkf_obs )") -EnkfObs.cNamespace().get_size = cwrapper.prototype("int enkf_obs_get_size( enkf_obs )") -EnkfObs.cNamespace().load = cwrapper.prototype("bool enkf_obs_load( enkf_obs , char*)") -EnkfObs.cNamespace().clear = cwrapper.prototype("void enkf_obs_clear( enkf_obs )") -EnkfObs.cNamespace().alloc_typed_keylist = cwrapper.prototype("stringlist_obj enkf_obs_alloc_typed_keylist(enkf_obs, enkf_obs_impl_type)") -EnkfObs.cNamespace().alloc_matching_keylist = cwrapper.prototype("stringlist_obj enkf_obs_alloc_matching_keylist(enkf_obs, char*)") -EnkfObs.cNamespace().has_key = cwrapper.prototype("bool enkf_obs_has_key(enkf_obs, char*)") -EnkfObs.cNamespace().obs_type = cwrapper.prototype("enkf_obs_impl_type enkf_obs_get_type(enkf_obs, char*)") -EnkfObs.cNamespace().get_vector = cwrapper.prototype("obs_vector_ref enkf_obs_get_vector(enkf_obs, char*)") -EnkfObs.cNamespace().iget_vector = cwrapper.prototype("obs_vector_ref enkf_obs_iget_vector(enkf_obs, int)") -EnkfObs.cNamespace().iget_obs_time = cwrapper.prototype("time_t enkf_obs_iget_obs_time(enkf_obs, int)") -EnkfObs.cNamespace().add_obs_vector = cwrapper.prototype("void enkf_obs_add_obs_vector(enkf_obs, obs_vector)") - -EnkfObs.cNamespace().get_obs_and_measure_data = cwrapper.prototype("void enkf_obs_get_obs_and_measure_data(enkf_obs, enkf_fs, local_obsdata, int_vector, meas_data, obs_data)") -EnkfObs.cNamespace().create_all_active_obs = cwrapper.prototype("local_obsdata_obj enkf_obs_alloc_all_active_local_obs( enkf_obs , char*)"); -EnkfObs.cNamespace().scale_correlated_std = cwrapper.prototype("double enkf_obs_scale_correlated_std( enkf_obs , enkf_fs , int_vector , local_obsdata)"); -EnkfObs.cNamespace().local_scale_std = cwrapper.prototype("void enkf_obs_local_scale_std( enkf_obs , local_obsdata , double)"); - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/enkf_simulation_runner.py b/ThirdParty/Ert/python/python/ert/enkf/enkf_simulation_runner.py deleted file mode 100644 index 286763b518..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/enkf_simulation_runner.py +++ /dev/null @@ -1,44 +0,0 @@ -from cwrap import CWrapper, BaseCClass -from ert.enkf import ENKF_LIB, EnkfFs, EnkfPrototype -from ert.enkf import EnkfPrototype -from ert.enkf.enums import EnkfInitModeEnum -from ert.util import BoolVector - - -class EnkfSimulationRunner(BaseCClass): - TYPE_NAME = "enkf_simulation_runner" - - _create_run_path = EnkfPrototype("bool enkf_main_create_run_path(enkf_simulation_runner, bool_vector, int)") - _run_simple_step = EnkfPrototype("int enkf_main_run_simple_step(enkf_simulation_runner, bool_vector, enkf_init_mode_enum, int)") - - def __init__(self, enkf_main): - assert isinstance(enkf_main, BaseCClass) - super(EnkfSimulationRunner, self).__init__(enkf_main.from_param(enkf_main).value, parent=enkf_main, is_reference=True) - self.ert = enkf_main - """:type: ert.enkf.EnKFMain """ - - def runSimpleStep(self, active_realization_mask, initialization_mode, iter_nr): - """ @rtype: int """ - assert isinstance(active_realization_mask, BoolVector) - assert isinstance(initialization_mode, EnkfInitModeEnum) - return self._run_simple_step(active_realization_mask, initialization_mode , iter_nr) - - def createRunPath(self, active_realization_mask, iter_nr): - """ @rtype: bool """ - assert isinstance(active_realization_mask, BoolVector) - return self._create_run_path(active_realization_mask, iter_nr) - - def runEnsembleExperiment(self, active_realization_mask=None): - """ @rtype: int """ - if active_realization_mask is None: - count = self.ert.getEnsembleSize() - active_realization_mask = BoolVector(default_value=True, initial_size=count) - - iter_nr = 0 - return self.runSimpleStep(active_realization_mask, EnkfInitModeEnum.INIT_CONDITIONAL, iter_nr) - - - def runWorkflows(self , runtime): - """:type ert.enkf.enum.HookRuntimeEnum""" - hook_manager = self.ert.getHookManager() - hook_manager.runWorkflows( runtime , self.ert ) diff --git a/ThirdParty/Ert/python/python/ert/enkf/enkf_state.py b/ThirdParty/Ert/python/python/ert/enkf/enkf_state.py deleted file mode 100644 index f52e1cf8ab..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/enkf_state.py +++ /dev/null @@ -1,88 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'enkf_state.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB -from ert.job_queue import JobStatusType - - -class EnKFState(BaseCClass): - def __init__(self): - raise NotImplementedError("Class can not be instantiated directly!") - - - def __getitem__(self , kw): - """ @rtype: ert.enkf.data.enkf_node.EnkfNode """ - if isinstance(kw , str): - if kw in self: - node = EnKFState.cNamespace().get_node( self , kw ) - node.setParent( self ) - return node - else: - raise KeyError("The state object does not have node:%s" % kw) - else: - raise TypeError("The kw type must be string. Input:%s" % kw) - - - def __contains__(self , kw): - return EnKFState.cNamespace().has_key( self , kw ) - - - def hasKey(self , kw): - """ @rtype: bool """ - return kw in self - - - def getNode(self , kw): - """ @rtype: ert.enkf.data.enkf_node.EnkfNode """ - return self[kw] - - - def free(self): - EnKFState.cNamespace().free(self) - - - def addSubstKeyword(self , key , value): - """ - Will add a key -> value pair which can be used for search replace - operations in the data file. Observe that the key will be - surrounded by \'<\' and \'>\'. - """ - doc_string = None - if isinstance(value , str): - EnKFState.cNamespace().add_subst_kw( self , key , value , doc_string ) - else: - raise TypeError("The value argument must be a string") - - def getDataKW(self): - """ - Will return the substitution map for this realisation. - """ - return EnKFState.cNamespace().get_subst_list( self ) - - - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerType("enkf_state", EnKFState) -cwrapper.registerType("enkf_state_obj", EnKFState.createPythonObject) -cwrapper.registerType("enkf_state_ref", EnKFState.createCReference) - - -EnKFState.cNamespace().free = cwrapper.prototype("void enkf_state_free( enkf_state )") -EnKFState.cNamespace().has_key = cwrapper.prototype("bool enkf_state_has_node( enkf_state , char* )") -EnKFState.cNamespace().get_node = cwrapper.prototype("enkf_node_ref enkf_state_get_node( enkf_state , char* )") -EnKFState.cNamespace().add_subst_kw = cwrapper.prototype("void enkf_state_add_subst_kw( enkf_state , char* , char* , char*)") -EnKFState.cNamespace().get_subst_list = cwrapper.prototype("subst_list_ref enkf_state_get_subst_list( enkf_state )") diff --git a/ThirdParty/Ert/python/python/ert/enkf/ensemble_config.py b/ThirdParty/Ert/python/python/ert/enkf/ensemble_config.py deleted file mode 100644 index b15c3ed20f..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/ensemble_config.py +++ /dev/null @@ -1,116 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'ensemble_config.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCClass, CWrapper -from ert.util import StringList -from ert.enkf import ENKF_LIB, SummaryKeyMatcher -from ert.enkf.config import EnkfConfigNode, CustomKWConfig -from ert.enkf.enums import EnkfVarType, ErtImplType - - -class EnsembleConfig(BaseCClass): - - def __init__(self): - c_ptr = EnsembleConfig.cNamespace().alloc() - super(EnsembleConfig , self).__init__(c_ptr) - - - def __len__(self): - return EnsembleConfig.cNamespace().size( self ) - - - def __getitem__(self , key): - """ @rtype: EnkfConfigNode """ - if key in self: - return EnsembleConfig.cNamespace().get_node(self, key).setParent(self) - else: - raise KeyError("The key:%s is not in the ensemble configuration" % key) - - - def getNode(self, key): - return self[key] - - - def alloc_keylist(self): - """ @rtype: StringList """ - return EnsembleConfig.cNamespace().alloc_keylist(self) - - def add_summary(self, key): - """ @rtype: EnkfConfigNode """ - return EnsembleConfig.cNamespace().add_summary(self, key, 2).setParent(self) - - def add_gen_kw(self, key): - """ @rtype: EnkfConfigNode """ - return EnsembleConfig.cNamespace().add_gen_kw(self, key).setParent(self) - - - def addNode(self , config_node): - assert isinstance(config_node , EnkfConfigNode) - EnsembleConfig.cNamespace().add_node( self , config_node ) - config_node.setParent( self ) - - - def add_field(self, key, eclipse_grid): - """ @rtype: EnkfConfigNode """ - return EnsembleConfig.cNamespace().add_field(self, key, eclipse_grid).setParent(self) - - def getKeylistFromVarType(self, var_mask): - """ @rtype: StringList """ - assert isinstance(var_mask, EnkfVarType) - return EnsembleConfig.cNamespace().alloc_keylist_from_var_type(self, var_mask) - - def getKeylistFromImplType(self, ert_impl_type): - """ @rtype: StringList """ - assert isinstance(ert_impl_type, ErtImplType) - return EnsembleConfig.cNamespace().alloc_keylist_from_impl_type(self, ert_impl_type) - - def __contains__(self, key): - return EnsembleConfig.cNamespace().has_key(self, key) - - def getSummaryKeyMatcher(self): - """ @rtype: SummaryKeyMatcher """ - return EnsembleConfig.cNamespace().summary_key_matcher(self) - - def free(self): - EnsembleConfig.cNamespace().free(self) - - def addDefinedCustomKW(self, group_name, definition): - """ @rtype: EnkfConfigNode """ - if not group_name in self: - type_hash = CustomKWConfig.convertDefinition(definition) - EnsembleConfig.cNamespace().add_defined_custom_kw(self, group_name, type_hash) - - return self[group_name] - - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("ens_config", EnsembleConfig) - -EnsembleConfig.cNamespace().alloc = cwrapper.prototype("c_void_p ensemble_config_alloc( )") -EnsembleConfig.cNamespace().free = cwrapper.prototype("void ensemble_config_free( ens_config )") -EnsembleConfig.cNamespace().has_key = cwrapper.prototype("bool ensemble_config_has_key( ens_config , char* )") -EnsembleConfig.cNamespace().size = cwrapper.prototype("int ensemble_config_get_size( ens_config)") -EnsembleConfig.cNamespace().get_node = cwrapper.prototype("enkf_config_node_ref ensemble_config_get_node( ens_config , char*)") -EnsembleConfig.cNamespace().alloc_keylist = cwrapper.prototype("stringlist_obj ensemble_config_alloc_keylist( ens_config )") -EnsembleConfig.cNamespace().add_summary = cwrapper.prototype("enkf_config_node_ref ensemble_config_add_summary( ens_config, char*, int)") -EnsembleConfig.cNamespace().add_gen_kw = cwrapper.prototype("enkf_config_node_ref ensemble_config_add_gen_kw( ens_config, char*)") -EnsembleConfig.cNamespace().add_field = cwrapper.prototype("enkf_config_node_ref ensemble_config_add_field( ens_config, char*, ecl_grid)") -EnsembleConfig.cNamespace().alloc_keylist_from_var_type = cwrapper.prototype("stringlist_obj ensemble_config_alloc_keylist_from_var_type(ens_config, enkf_var_type_enum)") -EnsembleConfig.cNamespace().alloc_keylist_from_impl_type = cwrapper.prototype("stringlist_obj ensemble_config_alloc_keylist_from_impl_type(ens_config, ert_impl_type_enum)") -EnsembleConfig.cNamespace().add_node = cwrapper.prototype("void ensemble_config_add_node( ens_config , enkf_config_node )") -EnsembleConfig.cNamespace().summary_key_matcher = cwrapper.prototype("summary_key_matcher_ref ensemble_config_get_summary_key_matcher(ens_config)") - -EnsembleConfig.cNamespace().add_defined_custom_kw = cwrapper.prototype("enkf_config_node_ref ensemble_config_add_defined_custom_kw(ens_config, char*, integer_hash)") diff --git a/ThirdParty/Ert/python/python/ert/enkf/enums/CMakeLists.txt b/ThirdParty/Ert/python/python/ert/enkf/enums/CMakeLists.txt deleted file mode 100644 index 27be30d855..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/enums/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - enkf_field_file_format_enum.py - enkf_fs_type_enum.py - enkf_init_modes_enum.py - enkf_obs_impl_type_enum.py - enkf_run_enum.py - enkf_truncation_type.py - enkf_var_type_enum.py - ert_impl_type_enum.py - load_fail_type_enum.py - realization_state_enum.py - gen_data_file_type_enum.py - active_mode_enum.py - hook_runtime_enum.py -) - -add_python_package("python.ert.enkf.enums" ${PYTHON_INSTALL_PREFIX}/ert/enkf/enums "${PYTHON_SOURCES}" True) diff --git a/ThirdParty/Ert/python/python/ert/enkf/enums/__init__.py b/ThirdParty/Ert/python/python/ert/enkf/enums/__init__.py deleted file mode 100644 index d3b4382658..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/enums/__init__.py +++ /dev/null @@ -1,27 +0,0 @@ -from .enkf_field_file_format_enum import EnkfFieldFileFormatEnum -from .load_fail_type_enum import LoadFailTypeEnum -from .enkf_var_type_enum import EnkfVarType -from .enkf_run_enum import EnkfRunType -from .enkf_obs_impl_type_enum import EnkfObservationImplementationType -from .ert_impl_type_enum import ErtImplType -from .enkf_init_modes_enum import EnkfInitModeEnum -from .realization_state_enum import RealizationStateEnum -from .enkf_truncation_type import EnkfTruncationType -from .enkf_fs_type_enum import EnKFFSType -from .gen_data_file_type_enum import GenDataFileType -from .active_mode_enum import ActiveMode -from .hook_runtime_enum import HookRuntime - -__all__ = ["EnkfFieldFileFormatEnum", - "LoadFailTypeEnum", - "EnkfVarType", - "EnkfRunType", - "EnkfObservationImplementationType", - "ErtImplType", - "EnkfInitModeEnum", - "RealizationStateEnum", - "EnkfTruncationType", - "EnKFFSType", - "GenDataFileType", - "ActiveMode", - "HookRuntime"] diff --git a/ThirdParty/Ert/python/python/ert/enkf/enums/active_mode_enum.py b/ThirdParty/Ert/python/python/ert/enkf/enums/active_mode_enum.py deleted file mode 100644 index 6385330b60..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/enums/active_mode_enum.py +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'content_type_enum.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCEnum -from ert.enkf import ENKF_LIB - - -class ActiveMode(BaseCEnum): - ALL_ACTIVE = None - INACTIVE = None - PARTLY_ACTIVE = None - - -ActiveMode.addEnum("ALL_ACTIVE", 1) -ActiveMode.addEnum("INACTIVE", 2) -ActiveMode.addEnum("PARTLY_ACTIVE", 3) - -ActiveMode.registerEnum(ENKF_LIB, "active_mode_enum") - diff --git a/ThirdParty/Ert/python/python/ert/enkf/enums/enkf_field_file_format_enum.py b/ThirdParty/Ert/python/python/ert/enkf/enums/enkf_field_file_format_enum.py deleted file mode 100644 index c31b3d91a6..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/enums/enkf_field_file_format_enum.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'enkf_field_file_format_enum.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCEnum -from ert.enkf import ENKF_LIB - - -class EnkfFieldFileFormatEnum(BaseCEnum): - UNDEFINED_FORMAT = None - RMS_ROFF_FILE = None - ECL_KW_FILE = None - ECL_KW_FILE_ACTIVE_CELLS = None - ECL_KW_FILE_ALL_CELLS = None - ECL_GRDECL_FILE = None - ECL_FILE = None - FILE_FORMAT_NULL = None - -EnkfFieldFileFormatEnum.addEnum("UNDEFINED_FORMAT", 0) -EnkfFieldFileFormatEnum.addEnum("RMS_ROFF_FILE", 1) -EnkfFieldFileFormatEnum.addEnum("ECL_KW_FILE", 2) -EnkfFieldFileFormatEnum.addEnum("ECL_KW_FILE_ACTIVE_CELLS", 3) -EnkfFieldFileFormatEnum.addEnum("ECL_KW_FILE_ALL_CELLS", 4) -EnkfFieldFileFormatEnum.addEnum("ECL_GRDECL_FILE", 5) -EnkfFieldFileFormatEnum.addEnum("ECL_FILE", 6) -EnkfFieldFileFormatEnum.addEnum("FILE_FORMAT_NULL", 7) - -EnkfFieldFileFormatEnum.registerEnum(ENKF_LIB, "enkf_field_file_format_enum") diff --git a/ThirdParty/Ert/python/python/ert/enkf/enums/enkf_fs_type_enum.py b/ThirdParty/Ert/python/python/ert/enkf/enums/enkf_fs_type_enum.py deleted file mode 100644 index 439b2d8997..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/enums/enkf_fs_type_enum.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (C) 2014 Statoil ASA, Norway. -# -# The file 'enkf_fs_type_enum.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCEnum -from ert.enkf import ENKF_LIB - - -class EnKFFSType(BaseCEnum): - INVALID_DRIVER_ID = None - PLAIN_DRIVER_ID = None - BLOCK_FS_DRIVER_ID = None - - -EnKFFSType.addEnum("INVALID_DRIVER_ID", 0) -EnKFFSType.addEnum("PLAIN_DRIVER_ID", 1005) -EnKFFSType.addEnum("BLOCK_FS_DRIVER_ID", 3001) -EnKFFSType.registerEnum(ENKF_LIB, "enkf_fs_type_enum") - - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/enums/enkf_init_modes_enum.py b/ThirdParty/Ert/python/python/ert/enkf/enums/enkf_init_modes_enum.py deleted file mode 100644 index 4167edd45b..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/enums/enkf_init_modes_enum.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'content_type_enum.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCEnum -from ert.enkf import ENKF_LIB - - -class EnkfInitModeEnum(BaseCEnum): - INIT_NONE = None - INIT_CONDITIONAL = None - INIT_FORCE = None - - -EnkfInitModeEnum.addEnum("INIT_NONE", 0) -EnkfInitModeEnum.addEnum("INIT_CONDITIONAL", 1) -EnkfInitModeEnum.addEnum("INIT_FORCE", 2) -EnkfInitModeEnum.registerEnum(ENKF_LIB, "enkf_init_mode_enum") - - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/enums/enkf_obs_impl_type_enum.py b/ThirdParty/Ert/python/python/ert/enkf/enums/enkf_obs_impl_type_enum.py deleted file mode 100644 index 5397f97043..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/enums/enkf_obs_impl_type_enum.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'enkf_obs_impl_type_enum.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCEnum -from ert.enkf import ENKF_LIB - - -class EnkfObservationImplementationType(BaseCEnum): - GEN_OBS = None - SUMMARY_OBS = None - BLOCK_OBS = None - -EnkfObservationImplementationType.addEnum("GEN_OBS", 1) -EnkfObservationImplementationType.addEnum("SUMMARY_OBS", 2) -EnkfObservationImplementationType.addEnum("BLOCK_OBS", 3) - -EnkfObservationImplementationType.registerEnum(ENKF_LIB, "enkf_obs_impl_type") - - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/enums/enkf_run_enum.py b/ThirdParty/Ert/python/python/ert/enkf/enums/enkf_run_enum.py deleted file mode 100644 index 34b33317ee..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/enums/enkf_run_enum.py +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'content_type_enum.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCEnum -from ert.enkf import ENKF_LIB - - -class EnkfRunType(BaseCEnum): - ENKF_ASSIMILATION = None - ENSEMBLE_EXPERIMENT = None - SMOOTHER_UPDATED = None - INIT_ONLY = None - - -EnkfRunType.addEnum("ENKF_ASSIMILATION" , 1) -EnkfRunType.addEnum("ENSEMBLE_EXPERIMENT" , 2) -EnkfRunType.addEnum("SMOOTHER_UPDATE" , 4) -EnkfRunType.addEnum("INIT_ONLY" , 8) - -EnkfRunType.registerEnum( ENKF_LIB , "enkf_run_mode_enum") - diff --git a/ThirdParty/Ert/python/python/ert/enkf/enums/enkf_truncation_type.py b/ThirdParty/Ert/python/python/ert/enkf/enums/enkf_truncation_type.py deleted file mode 100644 index 4d7cd65fb8..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/enums/enkf_truncation_type.py +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'content_type_enum.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCEnum -from ert.enkf import ENKF_LIB - - -class EnkfTruncationType(BaseCEnum): - TRUNCATE_NONE = None - TRUNCATE_MIN = None - TRUNCATE_MAX = None - -EnkfTruncationType.addEnum("TRUNCATE_NONE", 0) -EnkfTruncationType.addEnum("TRUNCATE_MIN", 1) -EnkfTruncationType.addEnum("TRUNCATE_MAX", 2) - -EnkfTruncationType.registerEnum(ENKF_LIB, "enkf_truncation_type_enum") - - - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/enums/enkf_var_type_enum.py b/ThirdParty/Ert/python/python/ert/enkf/enums/enkf_var_type_enum.py deleted file mode 100644 index 3e19ade79b..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/enums/enkf_var_type_enum.py +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'content_type_enum.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCEnum -from ert.enkf import ENKF_LIB - - -class EnkfVarType(BaseCEnum): - INVALID_VAR = None - PARAMETER = None - DYNAMIC_STATE = None - DYNAMIC_RESULT = None - STATIC_STATE = None - INDEX_STATE = None - - -EnkfVarType.addEnum("INVALID_VAR", 0) -EnkfVarType.addEnum("PARAMETER", 1) -EnkfVarType.addEnum("DYNAMIC_STATE", 2) -EnkfVarType.addEnum("DYNAMIC_RESULT", 4) -EnkfVarType.addEnum("STATIC_STATE", 8) -EnkfVarType.addEnum("INDEX_STATE", 16) -EnkfVarType.registerEnum(ENKF_LIB, "enkf_var_type_enum") - - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/enums/ert_impl_type_enum.py b/ThirdParty/Ert/python/python/ert/enkf/enums/ert_impl_type_enum.py deleted file mode 100644 index f0d2de305a..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/enums/ert_impl_type_enum.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'ert_impl_type_enum.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCEnum -from ert.enkf import ENKF_LIB - - -class ErtImplType(BaseCEnum): - INVALID = None - IMPL_TYPE_OFFSET = None - STATIC = None # MULTZ has been removed & MULTFLT - FIELD = None # WELL has been removed - GEN_KW = None # RELPERM has been removed & HAVANA_FAULT - CUSTOM_KW = None - SUMMARY = None # TPGZONE has been removed - GEN_DATA = None # PILOT_POINT has been removed - SURFACE = None - CONTAINER = None - - -ErtImplType.addEnum("INVALID", 0) -ErtImplType.addEnum("IMPL_TYPE_OFFSET", 100) -ErtImplType.addEnum("STATIC", 100) -ErtImplType.addEnum("FIELD", 104) -ErtImplType.addEnum("GEN_KW", 107) -ErtImplType.addEnum("CUSTOM_KW", 108) -ErtImplType.addEnum("SUMMARY", 110) -ErtImplType.addEnum("GEN_DATA", 113) -ErtImplType.addEnum("SURFACE", 114) -ErtImplType.addEnum("CONTAINER", 115) -ErtImplType.registerEnum(ENKF_LIB, "ert_impl_type_enum") - - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/enums/gen_data_file_type_enum.py b/ThirdParty/Ert/python/python/ert/enkf/enums/gen_data_file_type_enum.py deleted file mode 100644 index 9dbdfd508d..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/enums/gen_data_file_type_enum.py +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'gen_data_file_type_enum.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCEnum -from ert.enkf import ENKF_LIB - - -class GenDataFileType(BaseCEnum): - GEN_DATA_UNDEFINED = None - ASCII = None # The file is ASCII file with a vector of numbers formatted with "%g" - ASCII_TEMPLATE = None # The data is inserted into a user defined template file. - BINARY_DOUBLE = None # The data is in a binary file with doubles. - BINARY_FLOAT = None # The data is in a binary file with floats. - - -GenDataFileType.addEnum("GEN_DATA_UNDEFINED", 0) -GenDataFileType.addEnum("ASCII", 1) -GenDataFileType.addEnum("ASCII_TEMPLATE", 2) -GenDataFileType.addEnum("BINARY_DOUBLE", 3) -GenDataFileType.addEnum("BINARY_FLOAT", 4) -GenDataFileType.registerEnum(ENKF_LIB, "gen_data_file_format_type") - - - - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/enums/hook_runtime_enum.py b/ThirdParty/Ert/python/python/ert/enkf/enums/hook_runtime_enum.py deleted file mode 100644 index 2371d9f521..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/enums/hook_runtime_enum.py +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (C) 2016 Statoil ASA, Norway. -# -# The file 'hook_runtime_enum.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCEnum -from ert.enkf import ENKF_LIB - - -class HookRuntime(BaseCEnum): - PRE_SIMULATION = None - POST_SIMULATION = None - - -HookRuntime.addEnum("PRE_SIMULATION" , 0) -HookRuntime.addEnum("POST_SIMULATION" , 1) - -HookRuntime.registerEnum(ENKF_LIB, "hook_runtime_enum") diff --git a/ThirdParty/Ert/python/python/ert/enkf/enums/load_fail_type_enum.py b/ThirdParty/Ert/python/python/ert/enkf/enums/load_fail_type_enum.py deleted file mode 100644 index ebb8cf816d..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/enums/load_fail_type_enum.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'content_type_enum.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCEnum -from ert.enkf import ENKF_LIB - - -class LoadFailTypeEnum(BaseCEnum): - LOAD_FAIL_SILENT = None - LOAD_FAIL_WARN = None - LOAD_FAIL_EXIT = None - - -LoadFailTypeEnum.addEnum("LOAD_FAIL_SILENT", 0) -LoadFailTypeEnum.addEnum("LOAD_FAIL_WARN", 2) -LoadFailTypeEnum.addEnum("LOAD_FAIL_EXIT", 4) -LoadFailTypeEnum.registerEnum(ENKF_LIB, "load_fail_type") - - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/enums/realization_state_enum.py b/ThirdParty/Ert/python/python/ert/enkf/enums/realization_state_enum.py deleted file mode 100644 index 0eb94bf5ff..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/enums/realization_state_enum.py +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'ert_impl_type_enum.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCEnum -from ert.enkf import ENKF_LIB - - -class RealizationStateEnum(BaseCEnum): - STATE_UNDEFINED = None - STATE_INITIALIZED = None - STATE_HAS_DATA = None - STATE_LOAD_FAILURE = None - STATE_PARENT_FAILURE = None - -RealizationStateEnum.addEnum("STATE_UNDEFINED", 1) -RealizationStateEnum.addEnum("STATE_INITIALIZED", 2) -RealizationStateEnum.addEnum("STATE_HAS_DATA", 4) -RealizationStateEnum.addEnum("STATE_LOAD_FAILURE", 8) -RealizationStateEnum.addEnum("STATE_PARENT_FAILURE", 16) -RealizationStateEnum.registerEnum(ENKF_LIB, "realisation_state_enum") - - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/ert_log.py b/ThirdParty/Ert/python/python/ert/enkf/ert_log.py deleted file mode 100644 index 499bf2c320..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/ert_log.py +++ /dev/null @@ -1,20 +0,0 @@ -from ert.enkf import EnkfPrototype - - -class ErtLog(object): - _init = EnkfPrototype("void ert_log_init_log(int, char*, bool)", bind=False) - _write_log = EnkfPrototype("void ert_log_add_message_py(int, char*)", bind=False) - _get_filename = EnkfPrototype("char* ert_log_get_filename()", bind=False) - - @classmethod - def init(cls, log_level, log_filename, verbose): - cls._init(log_level, log_filename, verbose) - - @classmethod - def log(cls, log_level, message): - cls._write_log(log_level, message) - - @classmethod - def getFilename(cls): - """ @rtype: string """ - return cls._get_filename() diff --git a/ThirdParty/Ert/python/python/ert/enkf/ert_run_context.py b/ThirdParty/Ert/python/python/ert/enkf/ert_run_context.py deleted file mode 100644 index bff6383335..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/ert_run_context.py +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright (C) 2014 Statoil ASA, Norway. -# -# The file 'enkf_fs.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB, TimeMap, StateMap, RunArg -from ert.util import PathFormat - -class ErtRunContext(BaseCClass): - - def __init__(self): - raise NotImplementedError("Class can not be instantiated directly!") - - def __len__(self): - return ErtRunContext.cNamespace().get_size( self ) - - def __getitem__(self , index): - if isinstance(index, int): - if 0 <= index < len(self): - run_arg = ErtRunContext.cNamespace().iget(self , index) - run_arg.setParent( self ) - return run_arg - else: - raise IndexError("Index:%d invalid. Legal range: [0,%d)" % (index , len(self))) - else: - raise TypeError("Invalid type - expetected integer") - - def iensGet(self , iens): - run_arg = ErtRunContext.cNamespace().iens_get(self , iens) - if run_arg is not None: - run_arg.setParent(self) - return run_arg - else: - raise ValueError("Run context does not have run argument for iens:%d" % iens) - - def free(self): - ErtRunContext.cNamespace().free( self ) - - @classmethod - def createRunpathList(cls, mask, runpath_fmt, subst_list, iter=0): - """ @rtype: ert.util.stringlist.StringList """ - return ErtRunContext.cNamespace().alloc_runpath_list(mask, runpath_fmt, subst_list, iter) - - - @classmethod - def createRunpath(cls, iens , runpath_fmt, subst_list, iter=0): - """ @rtype: ert.util.stringlist.StringList """ - return ErtRunContext.cNamespace().alloc_runpath(iens, runpath_fmt, subst_list, iter) - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("ert_run_context", ErtRunContext) - -ErtRunContext.cNamespace().get_size = cwrapper.prototype("int ert_run_context_get_size( ert_run_context )") -ErtRunContext.cNamespace().free = cwrapper.prototype("void ert_run_context_free( ert_run_context )") -ErtRunContext.cNamespace().iget = cwrapper.prototype("run_arg_ref ert_run_context_iget_arg( ert_run_context , int)") -ErtRunContext.cNamespace().iens_get = cwrapper.prototype("run_arg_ref ert_run_context_iens_get_arg( ert_run_context , int)") -ErtRunContext.cNamespace().alloc_runpath_list = cwrapper.prototype("stringlist_obj ert_run_context_alloc_runpath_list(bool_vector, path_fmt, subst_list, int)") -ErtRunContext.cNamespace().alloc_runpath = cwrapper.prototype("cstring_obj ert_run_context_alloc_runpath(int, path_fmt, subst_list, int)") - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/ert_template.py b/ThirdParty/Ert/python/python/ert/enkf/ert_template.py deleted file mode 100644 index 8289dd0760..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/ert_template.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'ert_template.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import CWrapper, BaseCClass -from ert.enkf import ENKF_LIB - - -class ErtTemplate(BaseCClass): - def __init__(self): - raise NotImplementedError("Class can not be instantiated directly!") - - def get_template_file(self): - """ @rtype: str """ - return ErtTemplate.cNamespace().get_template_file(self) - - def get_target_file(self): - """ @rtype: str """ - return ErtTemplate.cNamespace().get_target_file(self) - - def get_args_as_string(self): - """ @rtype: str """ - return ErtTemplate.cNamespace().get_args_as_string(self) - - def free(self): - ErtTemplate.cNamespace().free(self) - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerType("ert_template", ErtTemplate) -cwrapper.registerType("ert_template_obj", ErtTemplate.createPythonObject) -cwrapper.registerType("ert_template_ref", ErtTemplate.createCReference) - -ErtTemplate.cNamespace().free = cwrapper.prototype("void ert_template_free( ert_template )") -ErtTemplate.cNamespace().get_template_file = cwrapper.prototype("char* ert_template_get_template_file(ert_template)") -ErtTemplate.cNamespace().get_target_file = cwrapper.prototype("char* ert_template_get_target_file(ert_template)") -ErtTemplate.cNamespace().get_args_as_string = cwrapper.prototype("char* ert_template_get_args_as_string(ert_template)") diff --git a/ThirdParty/Ert/python/python/ert/enkf/ert_templates.py b/ThirdParty/Ert/python/python/ert/enkf/ert_templates.py deleted file mode 100644 index 69dd9d20ff..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/ert_templates.py +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'ert_templates.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB, ErtTemplate -from ert.util import StringList - - - -class ErtTemplates(BaseCClass): - def __init__(self): - raise NotImplementedError("Class can not be instantiated directly!") - - def getTemplateNames(self): - """ @rtype: StringList """ - return ErtTemplates.cNamespace().alloc_list(self).setParent(self) - - def clear(self): - ErtTemplates.cNamespace().clear(self) - - def get_template(self, key): - """ @rtype: ErtTemplate """ - return ErtTemplates.cNamespace().get_template(self, key).setParent(self) - - def add_template(self, key, template_file, target_file, arg_string): - """ @rtype: ErtTemplate """ - return ErtTemplates.cNamespace().add_template(self, key, template_file, target_file, arg_string).setParent(self) - - def free(self): - ErtTemplates.cNamespace().free(self) - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerType("ert_templates", ErtTemplates) -cwrapper.registerType("ert_templates_obj", ErtTemplates.createPythonObject) -cwrapper.registerType("ert_templates_ref", ErtTemplates.createCReference) - -ErtTemplates.cNamespace().free = cwrapper.prototype("void ert_templates_free( ert_templates )") -ErtTemplates.cNamespace().alloc_list = cwrapper.prototype("stringlist_ref ert_templates_alloc_list(ert_templates)") -ErtTemplates.cNamespace().get_template = cwrapper.prototype("ert_template_ref ert_templates_get_template(ert_templates, char*)") -ErtTemplates.cNamespace().clear = cwrapper.prototype("void ert_templates_clear(ert_templates)") -ErtTemplates.cNamespace().add_template = cwrapper.prototype("ert_template_ref ert_templates_add_template(ert_templates, char*, char*, char*, char*)") diff --git a/ThirdParty/Ert/python/python/ert/enkf/ert_workflow_list.py b/ThirdParty/Ert/python/python/ert/enkf/ert_workflow_list.py deleted file mode 100644 index 69ef1438dc..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/ert_workflow_list.py +++ /dev/null @@ -1,80 +0,0 @@ -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB -from ert.util import StringList, SubstitutionList -from ert.job_queue import Workflow, WorkflowJob - - -class ErtWorkflowList(BaseCClass): - def __init__(self): - raise NotImplementedError("Class can not be instantiated directly!") - - def getWorkflowNames(self): - """ @rtype: StringList """ - return ErtWorkflowList.cNamespace().alloc_namelist(self) - - def __contains__(self, workflow_name): - assert isinstance(workflow_name, str) - return ErtWorkflowList.cNamespace().has_workflow(self, workflow_name) - - def __getitem__(self, item): - """ @rtype: Workflow """ - if not item in self: - raise KeyError("Item '%s' is not in the list of available workflows." % item) - - return ErtWorkflowList.cNamespace().get_workflow(self, item).setParent(self) - - def getContext(self): - """ @rtype: SubstitutionList """ - return ErtWorkflowList.cNamespace().get_context(self) - - def free(self): - ErtWorkflowList.cNamespace().free(self) - - def addJob(self, job_name, job_path): - """ - @type job_name: str - @type job_path: str - """ - ErtWorkflowList.cNamespace().add_job(self, job_name, job_path) - - def hasJob(self, job_name): - """ - @type job_name: str - @rtype: bool - """ - return ErtWorkflowList.cNamespace().has_job(self, job_name) - - def getJob(self, job_name): - """ @rtype: WorkflowJob """ - return ErtWorkflowList.cNamespace().get_job(self, job_name) - - def getJobNames(self): - """ @rtype: StringList """ - return ErtWorkflowList.cNamespace().get_job_names(self) - - def getPluginJobs(self): - """ @rtype: list of WorkflowJob """ - plugins = [] - for job_name in self.getJobNames(): - job = self.getJob(job_name) - if job.isPlugin(): - plugins.append(job) - return plugins - - - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("ert_workflow_list", ErtWorkflowList) - -ErtWorkflowList.cNamespace().free = cwrapper.prototype("void ert_workflow_list_free(ert_workflow_list)") -ErtWorkflowList.cNamespace().alloc_namelist = cwrapper.prototype("stringlist_obj ert_workflow_list_alloc_namelist(ert_workflow_list)") - -ErtWorkflowList.cNamespace().has_workflow = cwrapper.prototype("bool ert_workflow_list_has_workflow(ert_workflow_list, char*)") -ErtWorkflowList.cNamespace().get_workflow = cwrapper.prototype("workflow_ref ert_workflow_list_get_workflow(ert_workflow_list, char*)") -ErtWorkflowList.cNamespace().get_context = cwrapper.prototype("subst_list_ref ert_workflow_list_get_context(ert_workflow_list)") - -ErtWorkflowList.cNamespace().add_job = cwrapper.prototype("void ert_workflow_list_add_job(ert_workflow_list, char*, char*)") -ErtWorkflowList.cNamespace().has_job = cwrapper.prototype("bool ert_workflow_list_has_job(ert_workflow_list, char*)") -ErtWorkflowList.cNamespace().get_job = cwrapper.prototype("workflow_job_ref ert_workflow_list_get_job(ert_workflow_list, char*)") -ErtWorkflowList.cNamespace().get_job_names = cwrapper.prototype("stringlist_obj ert_workflow_list_get_job_names(ert_workflow_list)") \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert/enkf/es_update.py b/ThirdParty/Ert/python/python/ert/enkf/es_update.py deleted file mode 100644 index 9e4565b8c5..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/es_update.py +++ /dev/null @@ -1,39 +0,0 @@ -from cwrap import CWrapper, BaseCClass -from ert.enkf import EnkfPrototype - -class ESUpdate(BaseCClass): - TYPE_NAME="es_update" - _smoother_update = EnkfPrototype("bool enkf_main_smoother_update(es_update, enkf_fs, enkf_fs)") - - def __init__(self , ert): - assert isinstance(ert , BaseCClass) - super(ESUpdate, self).__init__(ert.from_param(ert).value , parent=ert , is_reference=True) - self.ert = ert - self.analysis_config = self.ert.analysisConfig( ) - - - def hasModule(self, name): - """ - Will check if we have analysis module @name. - """ - return self.analysis_config.hasModule( name ) - - - def getModule(self,name): - if self.hasModule( name ): - self.analysis_config.getModule( name ) - else: - raise KeyError("No such module:%s " % name) - - - def setGlobalStdScaling(self , weight): - self.analysis_config.setGlobalStdScaling( weight ) - - - - def smootherUpdate( self , data_fs , target_fs): - return self._smoother_update(data_fs , target_fs ) - - - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/export/CMakeLists.txt b/ThirdParty/Ert/python/python/ert/enkf/export/CMakeLists.txt deleted file mode 100644 index 54dca03101..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/export/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - arg_loader.py - custom_kw_collector.py - design_matrix_reader.py - gen_data_collector.py - gen_data_observation_collector.py - gen_kw_collector.py - misfit_collector.py - summary_collector.py - summary_observation_collector.py -) - -add_python_package("python.ert.enkf.export" ${PYTHON_INSTALL_PREFIX}/ert/enkf/export "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert/enkf/export/__init__.py b/ThirdParty/Ert/python/python/ert/enkf/export/__init__.py deleted file mode 100644 index 6bd788d815..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/export/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -from .design_matrix_reader import DesignMatrixReader -from .summary_observation_collector import SummaryObservationCollector -from .summary_collector import SummaryCollector -from .gen_kw_collector import GenKwCollector -from .gen_data_collector import GenDataCollector -from .gen_data_observation_collector import GenDataObservationCollector -from .misfit_collector import MisfitCollector -from .custom_kw_collector import CustomKWCollector -from .arg_loader import ArgLoader - -__all__ = ["DesignMatrixReader", - "SummaryCollector", - "SummaryObservationCollector", - "GenKwCollector", - "MisfitCollector", - "CustomKWCollector", - "GenDataCollector", - "GenDataObservationCollector", - "ArgLoader"] - diff --git a/ThirdParty/Ert/python/python/ert/enkf/export/arg_loader.py b/ThirdParty/Ert/python/python/ert/enkf/export/arg_loader.py deleted file mode 100644 index ffb57dc1c1..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/export/arg_loader.py +++ /dev/null @@ -1,46 +0,0 @@ -from __future__ import print_function -import math -from pandas import DataFrame, MultiIndex -import numpy -from ert.enkf import ErtImplType, EnKFMain, EnkfFs, RealizationStateEnum, GenKwConfig -from ert.enkf.plot_data import EnsemblePlotGenData -from ert.util import BoolVector - - -class ArgLoader(object): - - @staticmethod - def load(filename , column_names = None): - rows = 0 - columns = 0 - with open(filename,"r") as fileH: - for line in fileH.readlines(): - rows += 1 - columns = max(columns , len( line.split()) ) - - if not column_names is None: - if len(column_names) <= columns: - columns = len(column_names) - else: - raise ValueError("To many coloumns in input") - - data = numpy.empty(shape=(rows , columns) , dtype=numpy.float64) - data.fill( numpy.nan ) - - row = 0 - with open(filename) as fileH: - for line in fileH.readlines(): - tmp = line.split( ) - print(tmp) - for column in range(columns): - data[row][column] = float(tmp[column]) - row += 1 - - - if column_names is None: - column_names = [] - for column in range(columns): - column_names.append( "Column%d" % column ) - - data_frame = DataFrame( data = data , columns = column_names) - return data_frame diff --git a/ThirdParty/Ert/python/python/ert/enkf/export/custom_kw_collector.py b/ThirdParty/Ert/python/python/ert/enkf/export/custom_kw_collector.py deleted file mode 100644 index e696c488d0..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/export/custom_kw_collector.py +++ /dev/null @@ -1,66 +0,0 @@ -from pandas import DataFrame -from ert.enkf import ErtImplType, EnKFMain, EnkfFs, RealizationStateEnum, CustomKWConfig, EnkfNode, NodeId -from ert.enkf.key_manager import KeyManager - - -class CustomKWCollector(object): - - @staticmethod - def getAllCustomKWKeys(ert): - """ @rtype: list of str """ - key_manager = KeyManager(ert) - return key_manager.customKwKeys() - - @staticmethod - def groupKeys(keys): - grouped_keys = {} - for key in keys: - name, keyword = key.split(":") - - if not name in grouped_keys: - grouped_keys[name] = [] - - grouped_keys[name].append(keyword) - - return grouped_keys - - - @staticmethod - def loadAllCustomKWData(ert, case_name, keys=None): - """ - @type ert: EnKFMain - @type case_name: str - @type keys: list of str - @rtype: DataFrame - """ - fs = ert.getEnkfFsManager().getFileSystem(case_name) - - realizations = fs.realizationList(RealizationStateEnum.STATE_HAS_DATA | RealizationStateEnum.STATE_INITIALIZED) - - custom_kw_keys = CustomKWCollector.getAllCustomKWKeys(ert) - - if keys is not None: - custom_kw_keys = [key for key in keys if key in custom_kw_keys] # ignore keys that doesn't exist - - custom_kw_data = DataFrame(index=realizations, columns=custom_kw_keys) - custom_kw_data.index.name = "Realization" - - custom_kw_keys = CustomKWCollector.groupKeys(custom_kw_keys) - - for name in custom_kw_keys: - ensemble_config_node = ert.ensembleConfig().getNode(name) - enkf_node = EnkfNode(ensemble_config_node) - - keys = custom_kw_keys[name] - - for realization_number in realizations: - node_id = NodeId(0, realization_number) - if enkf_node.tryLoad(fs, node_id): - custom_kw = enkf_node.asCustomKW() - - for key in keys: - value = custom_kw[key] - custom_kw_data["%s:%s" % (name, key)][realization_number] = value - - return custom_kw_data - diff --git a/ThirdParty/Ert/python/python/ert/enkf/export/design_matrix_reader.py b/ThirdParty/Ert/python/python/ert/enkf/export/design_matrix_reader.py deleted file mode 100644 index 0e31707f03..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/export/design_matrix_reader.py +++ /dev/null @@ -1,15 +0,0 @@ -import pandas as pd -from pandas import DataFrame - - -class DesignMatrixReader(object): - - @staticmethod - def loadDesignMatrix(filename): - """@rtype: DataFrame""" - dm = pd.read_csv(filename, delim_whitespace=True) - """ @type dm: pd.DataFrame """ - dm = dm.rename(columns={dm.columns[0]:"Realization"}) - dm = dm.set_index(["Realization"]) - - return dm diff --git a/ThirdParty/Ert/python/python/ert/enkf/export/gen_data_collector.py b/ThirdParty/Ert/python/python/ert/enkf/export/gen_data_collector.py deleted file mode 100644 index 867483999c..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/export/gen_data_collector.py +++ /dev/null @@ -1,45 +0,0 @@ -import math -from pandas import DataFrame, MultiIndex -import numpy -from ert.enkf import ErtImplType, EnKFMain, EnkfFs, RealizationStateEnum, GenKwConfig -from ert.enkf.plot_data import EnsemblePlotGenData -from ert.util import BoolVector - - -class GenDataCollector(object): - - @staticmethod - def loadGenData(ert, case_name, key, report_step): - """@type ert: EnKFMain - @type case_name: str - @type key: str - @type report_step: int - @rtype: DataFrame - - In the returned dataframe the realisation index runs along the - rows, and the gen_data element index runs vertically along the - columns. - """ - fs = ert.getEnkfFsManager().getFileSystem(case_name) - realizations = fs.realizationList( RealizationStateEnum.STATE_HAS_DATA ) - config_node = ert.ensembleConfig().getNode(key) - gen_data_config = config_node.getModelConfig() - - ensemble_data = EnsemblePlotGenData( config_node , fs , report_step ) - # The data size and active can only be inferred *after* the EnsembleLoad. - data_size = gen_data_config.getDataSize( report_step ) - active_mask = gen_data_config.getActiveMask() - - data_array = numpy.empty(shape=(data_size , len(realizations)) , dtype=numpy.float64) - data_array.fill( numpy.nan ) - for realization_index, realization_number in enumerate(realizations): - realization_vector = ensemble_data[realization_number] - - if len(realization_vector) > 0: # Must check because of a bug changing between different case with different states - for data_index in range(data_size): - if active_mask[data_index]: - value = realization_vector[data_index] - data_array[data_index][realization_index] = value - - return DataFrame( data = data_array , columns = realizations ) - diff --git a/ThirdParty/Ert/python/python/ert/enkf/export/gen_data_observation_collector.py b/ThirdParty/Ert/python/python/ert/enkf/export/gen_data_observation_collector.py deleted file mode 100644 index bde51f3353..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/export/gen_data_observation_collector.py +++ /dev/null @@ -1,73 +0,0 @@ -from pandas import DataFrame -from ert.enkf import EnKFMain, EnkfFs, EnkfObservationImplementationType - - -class GenDataObservationCollector(object): - - @staticmethod - def getAllObservationKeys(ert): - """ - @type ert: EnKFMain - @rtype: list of str - """ - enkf_obs = ert.getObservations() - observation_keys = enkf_obs.getTypedKeylist(EnkfObservationImplementationType.GEN_OBS) - return [key for key in observation_keys] - - @staticmethod - def getObservationKeyForDataKey(ert, data_key, data_report_step): - """ - @type ert: EnKFMain - @rtype: str - """ - observation_key = None - - enkf_obs = ert.getObservations() - for obs_vector in enkf_obs: - report_step = obs_vector.activeStep() - key = obs_vector.getDataKey() - - if key == data_key and report_step == data_report_step: - observation_key = obs_vector.getObservationKey() - - return observation_key - - - @staticmethod - def loadGenDataObservations(ert, case_name, key): - """ - @type ert: EnKFMain - @type case_name: str - @type key: name of an observation key - @rtype: DataFrame - """ - fs = ert.getEnkfFsManager().getFileSystem(case_name) - - available_observation_keys = GenDataObservationCollector.getAllObservationKeys(ert) - if not key in available_observation_keys: - raise KeyError("Key '%s' is not a valid observation key") - - columns = [key] - std_columns = ["STD_%s" % key] - - enkf_obs = ert.getObservations() - - index_set = set() - obs_vector = enkf_obs[key] - report_step = obs_vector.activeStep() - - obs_node = obs_vector.getNode(report_step) - # """ :type: ert.enkf.observations.GenObservation """ - - for obs_index in range(len(obs_node)): - index_set.add(obs_node.getIndex(obs_index)) - - index_list = sorted(list(index_set)) - data = DataFrame(index=index_list, columns=columns + std_columns) - - for obs_index, (value, std) in enumerate(obs_node): - data_index = obs_node.getIndex(obs_index) - data[key][data_index] = value - data["STD_%s" % key][data_index] = std - - return data diff --git a/ThirdParty/Ert/python/python/ert/enkf/export/gen_kw_collector.py b/ThirdParty/Ert/python/python/ert/enkf/export/gen_kw_collector.py deleted file mode 100644 index 00bc1417f5..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/export/gen_kw_collector.py +++ /dev/null @@ -1,73 +0,0 @@ -import math -from pandas import DataFrame, MultiIndex -import numpy -from ert.enkf import ErtImplType, EnKFMain, EnkfFs, RealizationStateEnum, GenKwConfig -from ert.enkf.key_manager import KeyManager -from ert.enkf.plot_data import EnsemblePlotGenKW -from ert.util import BoolVector - - -class GenKwCollector(object): - - @staticmethod - def createActiveList(ert, fs): - state_map = fs.getStateMap() - ens_mask = BoolVector(False, ert.getEnsembleSize()) - state_map.selectMatching(ens_mask, RealizationStateEnum.STATE_INITIALIZED | RealizationStateEnum.STATE_HAS_DATA) - active_list = BoolVector.createActiveList(ens_mask) - - return [iens for iens in active_list] - - @staticmethod - def getAllGenKwKeys(ert): - """ @rtype: list of str """ - key_manager = KeyManager(ert) - return key_manager.genKwKeys() - - @staticmethod - def loadAllGenKwData(ert, case_name, keys=None): - """ - @type ert: EnKFMain - @type case_name: str - @type keys: list of str - @rtype: DataFrame - """ - fs = ert.getEnkfFsManager().getFileSystem(case_name) - - realizations = GenKwCollector.createActiveList(ert, fs) - - gen_kw_keys = GenKwCollector.getAllGenKwKeys(ert) - - if keys is not None: - gen_kw_keys = [key for key in keys if key in gen_kw_keys] # ignore keys that doesn't exist - - gen_kw_array = numpy.empty(shape=(len(gen_kw_keys), len(realizations)), dtype=numpy.float64) - gen_kw_array.fill(numpy.nan) - - for column_index, key in enumerate(gen_kw_keys): - key, keyword = key.split(":") - - use_log_scale = False - if key.startswith("LOG10_"): - key = key[6:] - use_log_scale = True - - ensemble_config_node = ert.ensembleConfig().getNode(key) - ensemble_data = EnsemblePlotGenKW(ensemble_config_node, fs) - keyword_index = ensemble_data.getIndexForKeyword(keyword) - - for realization_index, realization_number in enumerate(realizations): - realization_vector = ensemble_data[realization_number] - - value = realization_vector[keyword_index] - - if use_log_scale: - value = math.log10(value) - - gen_kw_array[column_index][realization_index] = value - - gen_kw_data = DataFrame(data=numpy.transpose(gen_kw_array), index=realizations, columns=gen_kw_keys) - gen_kw_data.index.name = "Realization" - - return gen_kw_data - diff --git a/ThirdParty/Ert/python/python/ert/enkf/export/misfit_collector.py b/ThirdParty/Ert/python/python/ert/enkf/export/misfit_collector.py deleted file mode 100644 index fa0ebea40b..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/export/misfit_collector.py +++ /dev/null @@ -1,53 +0,0 @@ -from pandas import DataFrame -import numpy -from ert.enkf import EnKFMain, EnkfFs, RealizationStateEnum -from ert.enkf.key_manager import KeyManager -from ert.util import BoolVector - - -class MisfitCollector(object): - - @staticmethod - def createActiveList(ert, fs): - state_map = fs.getStateMap() - ens_mask = BoolVector(False, ert.getEnsembleSize()) - state_map.selectMatching(ens_mask, RealizationStateEnum.STATE_HAS_DATA) - active_list = BoolVector.createActiveList(ens_mask) - - return [iens for iens in active_list] - - @staticmethod - def getAllMisfitKeys(ert, sort_keys=True): - """ @rtype: list of str """ - key_manager = KeyManager(ert) - return key_manager.misfitKeys(sort_keys=sort_keys) - - @staticmethod - def loadAllMisfitData(ert, case_name): - """ - @type ert: EnKFMain - @type case_name: str - @rtype: DataFrame - """ - fs = ert.getEnkfFsManager().getFileSystem(case_name) - - realizations = MisfitCollector.createActiveList(ert, fs) - misfit_keys = MisfitCollector.getAllMisfitKeys(ert, sort_keys=False) - misfit_sum_index = len(misfit_keys) - 1 - - misfit_array = numpy.empty(shape=(len(misfit_keys), len(realizations)), dtype=numpy.float64) - misfit_array.fill(numpy.nan) - misfit_array[misfit_sum_index] = 0.0 - - for column_index, obs_vector in enumerate(ert.getObservations()): - - for realization_index, realization_number in enumerate(realizations): - misfit = obs_vector.getTotalChi2(fs, realization_number) - - misfit_array[column_index][realization_index] = misfit - misfit_array[misfit_sum_index][realization_index] += misfit - - misfit_data = DataFrame(data=numpy.transpose(misfit_array), index=realizations, columns=misfit_keys) - misfit_data.index.name = "Realization" - - return misfit_data diff --git a/ThirdParty/Ert/python/python/ert/enkf/export/summary_collector.py b/ThirdParty/Ert/python/python/ert/enkf/export/summary_collector.py deleted file mode 100644 index 322ad3d946..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/export/summary_collector.py +++ /dev/null @@ -1,67 +0,0 @@ -from pandas import DataFrame, MultiIndex -import numpy -from ert.enkf import ErtImplType, EnKFMain, EnkfFs, RealizationStateEnum -from ert.enkf.key_manager import KeyManager -from ert.enkf.plot_data import EnsemblePlotData -from ert.util import BoolVector - - -class SummaryCollector(object): - - @staticmethod - def createActiveList(ert, fs): - state_map = fs.getStateMap() - ens_mask = BoolVector(False, ert.getEnsembleSize()) - state_map.selectMatching(ens_mask, RealizationStateEnum.STATE_HAS_DATA) - active_list = BoolVector.createActiveList(ens_mask) - - return [iens for iens in active_list] - - @staticmethod - def getAllSummaryKeys(ert): - """ @rtype: list of str """ - key_manager = KeyManager(ert) - return key_manager.summaryKeys() - - @staticmethod - def loadAllSummaryData(ert, case_name, keys=None): - """ - @type ert: EnKFMain - @type case_name: str - @type keys: list of str - @rtype: DataFrame - """ - fs = ert.getEnkfFsManager().getFileSystem(case_name) - - time_map = fs.getTimeMap() - dates = [time_map[index].datetime() for index in range(1, len(time_map))] - realizations = SummaryCollector.createActiveList(ert, fs) - - summary_keys = SummaryCollector.getAllSummaryKeys(ert) - if keys is not None: - summary_keys = [key for key in keys if key in summary_keys] # ignore keys that doesn't exist - - summary_array = numpy.empty(shape=(len(summary_keys), len(realizations) * len(dates)), dtype=numpy.float64) - summary_array.fill(numpy.nan) - - for key_index, key in enumerate(summary_keys): - ensemble_config_node = ert.ensembleConfig().getNode(key) - ensemble_data = EnsemblePlotData(ensemble_config_node, fs) - summary_row = summary_array[key_index] - - for realization_index, realization_number in enumerate(realizations): - realization_vector = ensemble_data[realization_number] - column_index = realization_index * len(dates) - - for index in range(1, len(realization_vector)): - if realization_vector.isActive(index): - # assert time_map[index] == realization_vector.getTime(index) - # assert time_map[index].datetime() == dates[index - 1] - value = realization_vector.getValue(index) - summary_row[column_index + index - 1] = value - - - multi_index = MultiIndex.from_product([realizations, dates], names=["Realization", "Date"]) - summary_data = DataFrame(data=numpy.transpose(summary_array), index=multi_index, columns=summary_keys) - return summary_data - diff --git a/ThirdParty/Ert/python/python/ert/enkf/export/summary_observation_collector.py b/ThirdParty/Ert/python/python/ert/enkf/export/summary_observation_collector.py deleted file mode 100644 index 7eb9df6f31..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/export/summary_observation_collector.py +++ /dev/null @@ -1,65 +0,0 @@ -from pandas import DataFrame, MultiIndex -import numpy -from ert.enkf import ErtImplType, EnKFMain, EnkfFs, RealizationStateEnum, EnkfObservationImplementationType -from ert.enkf.key_manager import KeyManager -from ert.enkf.plot_data import EnsemblePlotData -from ert.util import BoolVector - - -class SummaryObservationCollector(object): - - @staticmethod - def getAllObservationKeys(ert): - """ - @type ert: EnKFMain - @rtype: list of str - """ - key_manager = KeyManager(ert) - return key_manager.summaryKeysWithObservations() - - @staticmethod - def loadObservationData(ert, case_name, keys=None): - """ - @type ert: EnKFMain - @type case_name: str - @type keys: list of str - @rtype: DataFrame - """ - fs = ert.getEnkfFsManager().getFileSystem(case_name) - - time_map = fs.getTimeMap() - dates = [time_map[index].datetime() for index in range(1, len(time_map))] - - summary_keys = SummaryObservationCollector.getAllObservationKeys(ert) - if keys is not None: - summary_keys = [key for key in keys if key in summary_keys] # ignore keys that doesn't exist - - columns = summary_keys - std_columns = ["STD_%s" % key for key in summary_keys] - - df = DataFrame(index=dates, columns=columns + std_columns) - - for key in summary_keys: - observation_keys = ert.ensembleConfig().getNode(key).getObservationKeys() - - for obs_key in observation_keys: - observations = ert.getObservations() - observation_data = observations[obs_key] - history_length = ert.getHistoryLength() - - for index in range(0, history_length): - if observation_data.isActive(index): - obs_time = observations.getObservationTime(index).datetime() - node = observation_data.getNode(index) - value = node.getValue() - std = node.getStandardDeviation() - - df[key][obs_time] = value - df["STD_%s" % key][obs_time] = std - - - return df - - @classmethod - def summaryKeyHasObservations(cls, ert, key): - return len(ert.ensembleConfig().getNode(key).getObservationKeys()) > 0 diff --git a/ThirdParty/Ert/python/python/ert/enkf/forward_load_context.py b/ThirdParty/Ert/python/python/ert/enkf/forward_load_context.py deleted file mode 100644 index 8c2f4d7335..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/forward_load_context.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (C) 2016 Statoil ASA, Norway. -# -# The file 'forward_load_context.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -from ert.enkf import EnkfPrototype -from cwrap import BaseCClass - - -# The Python wrapping of the forward_load_context is extremely -# minimal; when creating the Python implementation the only purpose -# was to get an existing test through. - - -class ForwardLoadContext(BaseCClass): - TYPE_NAME = "forward_load_context" - _alloc = EnkfPrototype("void* forward_load_context_alloc( run_arg , bool , ecl_config , char* , stringlist )" , bind = False) - _select_step = EnkfPrototype("void forward_load_context_select_step( forward_load_context , int )") - _get_step = EnkfPrototype("int forward_load_context_get_load_step( forward_load_context)") - _free = EnkfPrototype("void forward_load_context_free( forward_load_context)") - - - def __init__(self , run_arg = None , load_summary = False , ecl_config = None , ecl_base = None , messages = None , report_step = None): - c_ptr = self._alloc(run_arg , load_summary , ecl_config , ecl_base , messages) - super(ForwardLoadContext, self).__init__(c_ptr) - if not report_step is None: - self.selectStep( report_step ) - - - def getLoadStep( self ): - return self._get_step( ) - - - def selectStep(self , report_step): - self._select_step( report_step) - - - def free(self): - self._free( ) - diff --git a/ThirdParty/Ert/python/python/ert/enkf/hook_manager.py b/ThirdParty/Ert/python/python/ert/enkf/hook_manager.py deleted file mode 100644 index b4598e6544..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/hook_manager.py +++ /dev/null @@ -1,51 +0,0 @@ -import os -import sys -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB - -class HookManager(BaseCClass): - - def __init__(self): - raise NotImplementedError("Class can not be instantiated directly!") - - def __len__(self): - """ @rtype: int """ - return HookManager.cNamespace().size(self) - - def __getitem__(self, index): - """ @rtype: Hook workflow """ - assert isinstance(index, int) - if index < len(self): - return HookManager.cNamespace().iget_hook_workflow(self, index) - else: - raise IndexError("Invalid index") - - def checkRunpathListFile(self): - """ @rtype: bool """ - runpath_list_file = HookManager.cNamespace().get_runpath_list_file(self) - - if not os.path.exists(runpath_list_file): - sys.stderr.write("** Warning: the file: %s with a list of runpath directories was not found - hook workflow will probably fail.\n" % runpath_list_file) - - def getRunpathList(self): - """ @rtype: RunpathList """ - return HookManager.cNamespace().get_runpath_list(self) - - def runWorkflows(self , run_time , ert_self): - - workflow_list = ert_self.getWorkflowList() - for hook_workflow in self: - - if (hook_workflow.getRunMode() is not run_time): - continue - - workflow = hook_workflow.getWorkflow() - workflow.run(ert_self, context=workflow_list.getContext()) - -cwrapper = CWrapper(ENKF_LIB) - -cwrapper.registerObjectType("hook_manager", HookManager) - -HookManager.cNamespace().get_runpath_list_file = cwrapper.prototype("char* hook_manager_get_runpath_list_file(hook_manager)") -HookManager.cNamespace().iget_hook_workflow = cwrapper.prototype("hook_workflow_ref hook_manager_iget_hook_workflow(hook_manager, int)") -HookManager.cNamespace().size = cwrapper.prototype("int hook_manager_get_size(hook_manager)") diff --git a/ThirdParty/Ert/python/python/ert/enkf/hook_workflow.py b/ThirdParty/Ert/python/python/ert/enkf/hook_workflow.py deleted file mode 100644 index 922f284761..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/hook_workflow.py +++ /dev/null @@ -1,25 +0,0 @@ -import os -import sys -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB, RunpathList - - -class HookWorkflow(BaseCClass): - - def __init__(self): - raise NotImplementedError("Class can not be instantiated directly!") - - def getWorkflow(self): - """ @rtype: Workflow """ - return HookWorkflow.cNamespace().get_workflow(self) - - def getRunMode(self): - return HookWorkflow.cNamespace().get_runmode( self ) - - -cwrapper = CWrapper(ENKF_LIB) - -cwrapper.registerObjectType("hook_workflow", HookWorkflow) - -HookWorkflow.cNamespace().get_workflow = cwrapper.prototype("workflow_ref hook_workflow_get_workflow(hook_workflow)") -HookWorkflow.cNamespace().get_runmode = cwrapper.prototype("hook_runtime_enum hook_workflow_get_run_mode(hook_workflow)") diff --git a/ThirdParty/Ert/python/python/ert/enkf/key_manager.py b/ThirdParty/Ert/python/python/ert/enkf/key_manager.py deleted file mode 100644 index e86c65c5b2..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/key_manager.py +++ /dev/null @@ -1,172 +0,0 @@ -from ert.enkf import ErtImplType, GenKwConfig, CustomKWConfig - - -class KeyManager(object): - - def __init__(self, ert): - super(KeyManager, self).__init__() - """ - @type ert: ert.enkf.EnKFMain - """ - self.__ert = ert - - self.__all_keys = None - self.__all_keys_with_observations = None - self.__summary_keys = None - self.__summary_keys_with_observations = None - self.__gen_data_keys = None - self.__gen_data_keys_with_observations = None - self.__gen_kw_keys = None - self.__custom_kw_keys = None - self.__misfit_keys = None - - - def ert(self): - """ :rtype: ert.enkf.EnKFMain """ - return self.__ert - - def ensembleConfig(self): - """ :rtype: ert.enkf.EnsembleConfig """ - return self.ert().ensembleConfig() - - def summaryKeys(self): - """ :rtype: list of str """ - if self.__summary_keys is None: - self.__summary_keys = sorted([key for key in self.ensembleConfig().getKeylistFromImplType(ErtImplType.SUMMARY)], key=lambda k : k.lower()) - - return self.__summary_keys - - def summaryKeysWithObservations(self): - """ :rtype: list of str """ - if self.__summary_keys_with_observations is None: - self.__summary_keys_with_observations = sorted([key for key in self.summaryKeys() if len(self.ensembleConfig().getNode(key).getObservationKeys()) > 0], key=lambda k : k.lower()) - - return self.__summary_keys_with_observations - - def genKwKeys(self): - """ :rtype: list of str """ - if self.__gen_kw_keys is None: - gen_kw_keys = self.ert().ensembleConfig().getKeylistFromImplType(ErtImplType.GEN_KW) - gen_kw_keys = [key for key in gen_kw_keys] - - gen_kw_list = [] - for key in gen_kw_keys: - enkf_config_node = self.ert().ensembleConfig().getNode(key) - gen_kw_config = enkf_config_node.getModelConfig() - assert isinstance(gen_kw_config, GenKwConfig) - - for keyword_index, keyword in enumerate(gen_kw_config): - gen_kw_list.append("%s:%s" % (key, keyword)) - - if gen_kw_config.shouldUseLogScale(keyword_index): - gen_kw_list.append("LOG10_%s:%s" % (key, keyword)) - - self.__gen_kw_keys = sorted(gen_kw_list, key=lambda k : k.lower()) - - return self.__gen_kw_keys - - - def customKwKeys(self): - """ :rtype: list of str """ - if self.__custom_kw_keys is None: - custom_kw_keys = self.ert().ensembleConfig().getKeylistFromImplType(ErtImplType.CUSTOM_KW) - - keys = [] - for name in custom_kw_keys: - enkf_config_node = self.ert().ensembleConfig().getNode(name) - custom_kw_config = enkf_config_node.getModelConfig() - assert isinstance(custom_kw_config, CustomKWConfig) - - for key in custom_kw_config: - keys.append("%s:%s" % (name, key)) - - self.__custom_kw_keys = sorted([key for key in keys], key=lambda k : k.lower()) - - return self.__custom_kw_keys - - - def genDataKeys(self): - """ :rtype: list of str """ - if self.__gen_data_keys is None: - gen_data_keys = self.ert().ensembleConfig().getKeylistFromImplType(ErtImplType.GEN_DATA) - gen_data_list = [] - for key in gen_data_keys: - enkf_config_node = self.ert().ensembleConfig().getNode(key) - gen_data_config = enkf_config_node.getDataModelConfig() - - for report_step in gen_data_config.getReportSteps(): - gen_data_list.append("%s@%d" % (key, report_step)) - - self.__gen_data_keys = sorted(gen_data_list, key=lambda k : k.lower()) - - return self.__gen_data_keys - - def genDataKeysWithObservations(self): - """ :rtype: list of str """ - if self.__gen_data_keys_with_observations is None: - enkf_obs = self.ert().getObservations() - gen_data_obs_keys = [] - for obs_vector in enkf_obs: - report_step = obs_vector.activeStep() - key = obs_vector.getDataKey() - - gen_data_key = "%s@%d" % (key, report_step) - if gen_data_key in self.genDataKeys(): - gen_data_obs_keys.append(gen_data_key) - - self.__gen_data_keys_with_observations = gen_data_obs_keys - - return self.__gen_data_keys_with_observations - - def misfitKeys(self, sort_keys=True): - """ @rtype: list of str """ - if self.__misfit_keys is None: - keys = [] - for obs_vector in self.ert().getObservations(): - key = "MISFIT:%s" % obs_vector.getObservationKey() - keys.append(key) - - keys.append("MISFIT:TOTAL") - - self.__misfit_keys = sorted(keys, key=lambda k : k.lower()) if sort_keys else keys - - return self.__misfit_keys - - - def allDataTypeKeys(self): - """ :rtype: list of str """ - if self.__all_keys is None: - self.__all_keys = self.summaryKeys() + self.genKwKeys() + self.customKwKeys() + self.genDataKeys() - - return self.__all_keys - - def allDataTypeKeysWithObservations(self): - """ :rtype: list of str """ - if self.__all_keys_with_observations is None: - self.__all_keys_with_observations = self.summaryKeysWithObservations() + self.genDataKeysWithObservations() - - return self.__all_keys_with_observations - - def isKeyWithObservations(self, key): - """ :rtype: bool """ - return key in self.allDataTypeKeysWithObservations() - - def isSummaryKey(self, key): - """ :rtype: bool """ - return key in self.summaryKeys() - - def isGenKwKey(self, key): - """ :rtype: bool """ - return key in self.genKwKeys() - - def isCustomKwKey(self, key): - """ :rtype: bool """ - return key in self.customKwKeys() - - def isGenDataKey(self, key): - """ :rtype: bool """ - return key in self.genDataKeys() - - def isMisfitKey(self, key): - """ :rtype: bool """ - return key in self.misfitKeys() \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert/enkf/local_config.py b/ThirdParty/Ert/python/python/ert/enkf/local_config.py deleted file mode 100644 index 69f25445e8..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/local_config.py +++ /dev/null @@ -1,171 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'local_config.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB, LocalUpdateStep -from ert.enkf.local_ministep import LocalMinistep -from ert.analysis import AnalysisModule - - -class LocalConfig(BaseCClass): - - def __init__(self): - raise NotImplementedError("Class can not be instantiated directly!") - - - # The LocalConfig class is created as a reference to an existing - # underlying C structure by the method - # EnkFMain.local_config(). When the pointer to the C - # local_config_type object has been properly wrapped we 'decorate' - # the Python object with references to the ensemble_config , - # observations and grid. - # - # This implies that the Python object LocalConfig is richer than - # the underlying C object local_config_type; the extra attributes - # are only used for validation. - - def initAttributes(self , ensemble_config , obs , grid): - self.ensemble_config = ensemble_config - self.obs = obs - self.grid = grid - - - def __getObservations(self): - return self.obs - - def __getEnsembleConfig(self): - return self.ensemble_config - - def getGrid(self): - # The grid can be None - return self.grid - - - def free(self): - LocalConfig.cNamespace().free(self) - - def clear(self): - LocalConfig.cNamespace().clear(self) - - def createMinistep(self, mini_step_key, analysis_module = None): - """ @rtype: Ministep """ - assert isinstance(mini_step_key, str) - if analysis_module: - assert isinstance(analysis_module, AnalysisModule) - LocalConfig.cNamespace().create_ministep(self, mini_step_key, analysis_module) - return self.getMinistep(mini_step_key) - - def createObsdata(self, obsdata_key): - """ @rtype: Obsdata """ - assert isinstance(obsdata_key, str) - if LocalConfig.cNamespace().has_obsdata(self, obsdata_key): - raise ValueError("Tried to add existing observation key:%s " % obsdata_key) - - LocalConfig.cNamespace().create_obsdata(self, obsdata_key) - obsdata = self.getObsdata(obsdata_key) - obsdata.initObservations( self.__getObservations() ) - return obsdata - - - def copyObsdata(self, src_key, target_key): - """ @rtype: Obsdata """ - assert isinstance(src_key, str) - assert isinstance(target_key, str) - obsdata = LocalConfig.cNamespace().copy_obsdata(self, src_key, target_key) - obsdata.initObservations( self.__getObservations() ) - return obsdata - - - def createDataset(self, dataset_key): - """ @rtype: Dataset """ - assert isinstance(dataset_key, str) - if LocalConfig.cNamespace().has_dataset(self, dataset_key): - raise ValueError("Tried to add existing data key:%s " % dataset_key) - - LocalConfig.cNamespace().create_dataset(self, dataset_key) - data = self.getDataset(dataset_key) - data.initEnsembleConfig( self.__getEnsembleConfig() ) - return data - - - def copyDataset(self, src_key, target_key): - """ @rtype: Dataset """ - assert isinstance(src_key, str) - assert isinstance(target_key, str) - data = LocalConfig.cNamespace().copy_dataset(self, src_key, target_key) - data.initEnsembleConfig( self.__getEnsembleConfig() ) - return data - - - def getUpdatestep(self): - """ @rtype: UpdateStep """ - return LocalConfig.cNamespace().get_updatestep(self) - - - def getMinistep(self, mini_step_key): - """ @rtype: Ministep """ - assert isinstance(mini_step_key, str) - return LocalConfig.cNamespace().get_ministep(self, mini_step_key) - - def getObsdata(self, obsdata_key): - """ @rtype: Obsdata """ - assert isinstance(obsdata_key, str) - return LocalConfig.cNamespace().get_obsdata(self, obsdata_key) - - def getDataset(self, dataset_key): - """ @rtype: Dataset """ - assert isinstance(dataset_key, str) - return LocalConfig.cNamespace().get_dataset(self, dataset_key) - - - def attachMinistep(self, update_step, mini_step): - assert isinstance(mini_step, LocalMinistep) - assert isinstance(update_step, LocalUpdateStep) - LocalConfig.cNamespace().attach_ministep(update_step, mini_step) - - - def writeSummaryFile(self, filename): - """ - Writes a summary of the local config object - The summary contains the Obsset with their respective - number of observations and the Datasets with the number of active indices - """ - assert isinstance(filename, str) - LocalConfig.cNamespace().write_local_config_summary_file(self, filename) - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("local_config", LocalConfig) - -LocalConfig.cNamespace().free = cwrapper.prototype("void local_config_free( local_config )") -LocalConfig.cNamespace().clear = cwrapper.prototype("void local_config_clear( local_config )") -LocalConfig.cNamespace().get_updatestep = cwrapper.prototype("local_updatestep_ref local_config_get_updatestep( local_config )") -LocalConfig.cNamespace().get_ministep = cwrapper.prototype("local_ministep_ref local_config_get_ministep( local_config, char*)") -LocalConfig.cNamespace().create_ministep = cwrapper.prototype("void local_config_alloc_ministep( local_config, char*, analysis_module)") -LocalConfig.cNamespace().attach_ministep = cwrapper.prototype("void local_updatestep_add_ministep( local_updatestep, local_ministep)") -LocalConfig.cNamespace().get_obsdata = cwrapper.prototype("local_obsdata_ref local_config_get_obsdata( local_config, char*)") -LocalConfig.cNamespace().create_obsdata = cwrapper.prototype("void local_config_alloc_obsdata( local_config, char*)") -LocalConfig.cNamespace().copy_obsdata = cwrapper.prototype("local_obsdata_ref local_config_alloc_obsdata_copy( local_config, char*, char*)") -LocalConfig.cNamespace().has_obsdata = cwrapper.prototype("bool local_config_has_obsdata( local_config, char*)") -LocalConfig.cNamespace().get_dataset = cwrapper.prototype("local_dataset_ref local_config_get_dataset( local_config, char*)") -LocalConfig.cNamespace().create_dataset = cwrapper.prototype("void local_config_alloc_dataset( local_config, char*)") -LocalConfig.cNamespace().copy_dataset = cwrapper.prototype("local_dataset_ref local_config_alloc_dataset_copy( local_config, char*, char*)") -LocalConfig.cNamespace().has_dataset = cwrapper.prototype("bool local_config_has_dataset( local_config, char*)") - -LocalConfig.cNamespace().write_local_config_summary_file = cwrapper.prototype("void local_config_summary_fprintf( local_config, char*)") - - - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/local_dataset.py b/ThirdParty/Ert/python/python/ert/enkf/local_dataset.py deleted file mode 100644 index 2bad96ae6e..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/local_dataset.py +++ /dev/null @@ -1,94 +0,0 @@ -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB -from ert.ecl import EclRegion - -class LocalDataset(BaseCClass): - - def __init__(self, name): - raise NotImplementedError("Class can not be instantiated directly!") - - - def initEnsembleConfig(self , config): - self.ensemble_config = config - - - def __len__(self): - """ @rtype: int """ - return LocalDataset.cNamespace().size(self) - - def __contains__(self , key): - """ @rtype: bool """ - return LocalDataset.cNamespace().has_key(self, key) - - def __delitem__(self, key): - assert isinstance(key, str) - if key in self: - LocalDataset.cNamespace().del_node(self, key) - else: - raise KeyError("Unknown key:%s" % key) - - def getName(self): - """ @rtype: str """ - return LocalDataset.cNamespace().name(self) - - def addNode(self, key): - assert isinstance(key, str) - if key in self.ensemble_config: - if not LocalDataset.cNamespace().has_key(self, key): - LocalDataset.cNamespace().add_node(self, key) - else: - raise KeyError("Tried to add existing data key:%s " % key) - else: - raise KeyError("Tried to add data key:%s - not in ensemble" % key) - - - def addNodeWithIndex(self, key, index): - assert isinstance(key, str) - assert isinstance(index, int) - - self.addNode( key ) - active_list = self.getActiveList(key) - active_list.addActiveIndex(index) - - - def addField(self, key, ecl_region): - assert isinstance(key, str) - assert isinstance(ecl_region, EclRegion) - - self.addNode( key ) - active_list = self.getActiveList(key) - active_region = ecl_region.getActiveList() - for i in active_region: - active_list.addActiveIndex(i) - - - def getActiveList(self, key): - """ @rtype: ActiveList """ - if key in self: - return LocalDataset.cNamespace().active_list(self , key) - else: - raise KeyError("Local key:%s not recognized" % key) - - - def free(self): - LocalDataset.cNamespace().free(self) - - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("local_dataset", LocalDataset) - -LocalDataset.cNamespace().alloc = cwrapper.prototype("c_void_p local_dataset_alloc(char*)") -LocalDataset.cNamespace().size = cwrapper.prototype("c_void_p local_dataset_get_size(char*)") -LocalDataset.cNamespace().has_key = cwrapper.prototype("bool local_dataset_has_key(local_dataset, char*)") -LocalDataset.cNamespace().free = cwrapper.prototype("void local_dataset_free(local_dataset)") -LocalDataset.cNamespace().name = cwrapper.prototype("char* local_dataset_get_name(local_dataset)") -LocalDataset.cNamespace().active_list = cwrapper.prototype("active_list_ref local_dataset_get_node_active_list(local_dataset, char*)") -LocalDataset.cNamespace().add_node = cwrapper.prototype("void local_dataset_add_node(local_dataset, char*)") -LocalDataset.cNamespace().del_node = cwrapper.prototype("void local_dataset_del_node(local_dataset, char*)") - - - - - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/local_ministep.py b/ThirdParty/Ert/python/python/ert/enkf/local_ministep.py deleted file mode 100644 index 21b0425603..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/local_ministep.py +++ /dev/null @@ -1,60 +0,0 @@ -import ert.util -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB, LocalObsdata, LocalObsdataNode, LocalDataset - -class LocalMinistep(BaseCClass): - - def __init__(self, ministep_key): - raise NotImplementedError("Class can not be instantiated directly!") - - # Will used the data keys; and ignore observation keys. - def __getitem__(self, data_key): - if data_key in self: - return LocalMinistep.cNamespace().get_local_data(self , data_key) - else: - raise KeyError("No such data key: %s" % data_key) - - def __len__(self): - return LocalMinistep.cNamespace().data_size( self ) - - def __contains__(self , data_key): - return LocalMinistep.cNamespace().has_local_data(self , data_key) - - def addNode(self, node): - assert isinstance(node, LocalObsdataNode) - LocalMinistep.cNamespace().add_node(self,node) - - def attachObsset(self, obs_set): - assert isinstance(obs_set, LocalObsdata) - LocalMinistep.cNamespace().attach_obsdata(self,obs_set) - - - def attachDataset(self, dataset): - assert isinstance(dataset, LocalDataset) - LocalMinistep.cNamespace().attach_dataset(self,dataset) - - def getLocalObsData(self): - """ @rtype: LocalObsdata """ - return LocalMinistep.cNamespace().get_local_obs_data(self) - - def getName(self): - """ @rtype: str """ - return LocalMinistep.cNamespace().name(self) - - def free(self): - LocalMinistep.cNamespace().free(self) - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("local_ministep", LocalMinistep) - -LocalMinistep.cNamespace().alloc = cwrapper.prototype("c_void_p local_ministep_alloc(char*)") -LocalMinistep.cNamespace().add_node = cwrapper.prototype("void local_ministep_add_obsdata_node(local_ministep,local_obsdata_node)") -LocalMinistep.cNamespace().get_local_obs_data = cwrapper.prototype("local_obsdata_ref local_ministep_get_obsdata(local_ministep)") -LocalMinistep.cNamespace().get_local_data = cwrapper.prototype("local_dataset_ref local_ministep_get_dataset(local_ministep , char*)") -LocalMinistep.cNamespace().has_local_data = cwrapper.prototype("bool local_ministep_has_dataset(local_ministep , char*)") -LocalMinistep.cNamespace().free = cwrapper.prototype("void local_ministep_free(local_ministep)") -LocalMinistep.cNamespace().attach_obsdata = cwrapper.prototype("void local_ministep_add_obsdata(local_ministep,local_obsdata)") -LocalMinistep.cNamespace().attach_dataset = cwrapper.prototype("void local_ministep_add_dataset(local_ministep,local_dataset)") -LocalMinistep.cNamespace().name = cwrapper.prototype("char* local_ministep_get_name(local_ministep)") -LocalMinistep.cNamespace().data_size = cwrapper.prototype("int local_ministep_get_num_dataset(local_ministep)") - diff --git a/ThirdParty/Ert/python/python/ert/enkf/local_obsdata.py b/ThirdParty/Ert/python/python/ert/enkf/local_obsdata.py deleted file mode 100644 index c46939be26..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/local_obsdata.py +++ /dev/null @@ -1,142 +0,0 @@ -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB, LocalObsdataNode - - -class LocalObsdata(BaseCClass): - - def __init__(self, name , obs = None): - # The obs instance should be a EnkFObs instance; some circular dependency problems - # by importing it right away. It is not really optional, but it is made optional - # here to be able to give a decent error message for old call sites which did not - # supply the obs argument. - if obs is None: - msg = """ - -The LocalObsdata constructor has recently changed, as a second -argument you should pass the EnkFObs instance with all the -observations. You can typically get this instance from the ert main -object as: - - obs = ert.getObservations() - local_obs = LocalObsData("YOUR-KEY" , obs) - -""" - raise Exception( msg ) - - assert isinstance(name, str) - - c_pointer = LocalObsdata.cNamespace().alloc(name) - super(LocalObsdata, self).__init__(c_pointer) - self.initObservations( obs ) - - - def initObservations(self , obs): - self.obs = obs - - def __len__(self): - """ @rtype: int """ - return LocalObsdata.cNamespace().size(self) - - - def __getitem__(self, key): - """ @rtype: LocalObsdataNode """ - if isinstance(key , int): - if int < len: - return LocalObsdata.cNamespace().iget_node(self, key).setParent(self) - else: - raise IndexError("Invalid index") - else: - if key in self: - return LocalObsdata.cNamespace().get_node(self, key).setParent(self) - else: - raise KeyError("Unknown key:%s" % key) - - def __iter__(self): - cur = 0 - while cur < len(self): - yield self[cur] - cur += 1 - - def __contains__(self, item): - """ @rtype: bool """ - if isinstance(item, str): - return LocalObsdata.cNamespace().has_node(self, item) - elif isinstance(item, LocalObsdataNode): - return LocalObsdata.cNamespace().has_node(self, item.getKey()) - - return False - - def __delitem__(self, key): - assert isinstance(key, str) - if key in self: - LocalObsdata.cNamespace().del_node(self, key) - else: - raise KeyError("Unknown key:%s" % key) - - def addNode(self, key, add_all_timesteps = True): - """ @rtype: LocalObsdataNode """ - assert isinstance(key, str) - if key in self.obs: - node = LocalObsdataNode(key , add_all_timesteps) - if node not in self: - node.convertToCReference(self) - LocalObsdata.cNamespace().add_node(self, node) - return node - else: - raise KeyError("Tried to add existing observation key:%s " % key) - else: - raise KeyError("The observation node: %s is not recognized observation key" % key) - - - def addNodeAndRange(self, key, step_1, step_2): - """ @rtype: LocalObsdataNode """ - """ The time range will be removed in the future... """ - assert isinstance(key, str) - assert isinstance(step_1, int) - assert isinstance(step_2, int) - node = self.addNode( key ) - node.addRange(step_1, step_2) - return node - - - def clear(self): - LocalObsdata.cNamespace().clear(self) - - - def addObsVector(self , obs_vector): - self.addNode( obs_vector.getObservationKey() ) - - - def getName(self): - """ @rtype: str """ - return LocalObsdata.cNamespace().name(self) - - def getActiveList(self, key): - """ @rtype: ActiveList """ - if key in self: - return LocalObsdata.cNamespace().active_list(self , key) - else: - raise KeyError("Local key:%s not recognized" % key) - - def free(self): - LocalObsdata.cNamespace().free(self) - - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("local_obsdata", LocalObsdata) - -LocalObsdata.cNamespace().alloc = cwrapper.prototype("c_void_p local_obsdata_alloc(char*)") -LocalObsdata.cNamespace().free = cwrapper.prototype("void local_obsdata_free(local_obsdata)") -LocalObsdata.cNamespace().size = cwrapper.prototype("int local_obsdata_get_size(local_obsdata)") -LocalObsdata.cNamespace().has_node = cwrapper.prototype("bool local_obsdata_has_node(local_obsdata, char*)") -LocalObsdata.cNamespace().add_node = cwrapper.prototype("bool local_obsdata_add_node(local_obsdata, local_obsdata_node)") -LocalObsdata.cNamespace().del_node = cwrapper.prototype("void local_obsdata_del_node(local_obsdata, char*)") -LocalObsdata.cNamespace().clear = cwrapper.prototype("void local_dataset_clear(local_obsdata)") -LocalObsdata.cNamespace().iget_node = cwrapper.prototype("local_obsdata_node_ref local_obsdata_iget(local_obsdata, int)") -LocalObsdata.cNamespace().get_node = cwrapper.prototype("local_obsdata_node_ref local_obsdata_get(local_obsdata, char*)") -LocalObsdata.cNamespace().name = cwrapper.prototype("char* local_obsdata_get_name(local_obsdata)") -LocalObsdata.cNamespace().active_list = cwrapper.prototype("active_list_ref local_obsdata_get_node_active_list(local_obsdata, char*)") - - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/local_obsdata_node.py b/ThirdParty/Ert/python/python/ert/enkf/local_obsdata_node.py deleted file mode 100644 index 64197cccb2..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/local_obsdata_node.py +++ /dev/null @@ -1,54 +0,0 @@ -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB - -class LocalObsdataNode(BaseCClass): - - def __init__(self, obs_key , all_timestep_active = True): - assert isinstance(obs_key, str) - - c_pointer = LocalObsdataNode.cNamespace().alloc(obs_key , all_timestep_active) - super(LocalObsdataNode, self).__init__(c_pointer) - - def getKey(self): - return LocalObsdataNode.cNamespace().get_key(self) - - def addRange(self, step_1, step_2): - assert isinstance(step_1, int) - assert isinstance(step_2, int) - LocalObsdataNode.cNamespace().add_range(self, step_1, step_2) - - - def addTimeStep(self , step): - LocalObsdataNode.cNamespace().add_step(self, step ) - - - def free(self): - LocalObsdataNode.cNamespace().free(self) - - def tstepActive(self , tstep): - return LocalObsdataNode.cNamespace().tstep_active( self , tstep) - - - def getActiveList(self): - return LocalObsdataNode.cNamespace().get_active_list( self ) - - def allTimeStepActive(self): - return LocalObsdataNode.cNamespace().all_timestep_active( self ) - - def setAllTimeStepActive(self, flag): - return LocalObsdataNode.cNamespace().set_all_timestep_active( self, flag ) - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("local_obsdata_node", LocalObsdataNode) - -LocalObsdataNode.cNamespace().alloc = cwrapper.prototype("c_void_p local_obsdata_node_alloc(char* , bool)") -LocalObsdataNode.cNamespace().free = cwrapper.prototype("void local_obsdata_node_free(local_obsdata_node)") -LocalObsdataNode.cNamespace().get_key = cwrapper.prototype("char* local_obsdata_node_get_key(local_obsdata_node)") -LocalObsdataNode.cNamespace().add_range = cwrapper.prototype("void local_obsdata_node_add_range(local_obsdata_node, int, int)") -LocalObsdataNode.cNamespace().add_step = cwrapper.prototype("void local_obsdata_node_add_tstep(local_obsdata_node, int)") -LocalObsdataNode.cNamespace().tstep_active = cwrapper.prototype("bool local_obsdata_node_tstep_active(local_obsdata_node, int)") -LocalObsdataNode.cNamespace().get_active_list = cwrapper.prototype("active_list_ref local_obsdata_node_get_active_list(local_obsdata_node)") -LocalObsdataNode.cNamespace().all_timestep_active = cwrapper.prototype("bool local_obsdata_node_all_timestep_active(local_obsdata_node)") -LocalObsdataNode.cNamespace().set_all_timestep_active = cwrapper.prototype("void local_obsdata_node_set_all_timestep_active(local_obsdata_node, bool)") - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/local_updatestep.py b/ThirdParty/Ert/python/python/ert/enkf/local_updatestep.py deleted file mode 100644 index 4eabc6db0c..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/local_updatestep.py +++ /dev/null @@ -1,42 +0,0 @@ -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB, LocalMinistep - -class LocalUpdateStep(BaseCClass): - - def __init__(self, updatestep_key): - raise NotImplementedError("Class can not be instantiated directly!") - - def __len__(self): - """ @rtype: int """ - return LocalUpdateStep.cNamespace().size(self) - - def __getitem__(self, index): - """ @rtype: LocalMinistep """ - assert isinstance(index, int) - if index < len(self): - return LocalUpdateStep.cNamespace().iget_ministep(self, index) - else: - raise IndexError("Invalid index") - - def attachMinistep(self, ministep): - assert isinstance(ministep, LocalMinistep) - LocalUpdateStep.cNamespace().attach_ministep(self,ministep) - - def getName(self): - """ @rtype: str """ - return LocalUpdateStep.cNamespace().name(self) - - def free(self): - LocalUpdateStep.cNamespace().free(self) - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("local_updatestep", LocalUpdateStep) - -LocalUpdateStep.cNamespace().alloc = cwrapper.prototype("c_void_p local_updatestep_alloc(char*)") -LocalUpdateStep.cNamespace().size = cwrapper.prototype("int local_updatestep_get_num_ministep(local_updatestep)") -LocalUpdateStep.cNamespace().iget_ministep = cwrapper.prototype("local_ministep_ref local_updatestep_iget_ministep(local_updatestep, int)") -LocalUpdateStep.cNamespace().free = cwrapper.prototype("void local_updatestep_free(local_updatestep)") -LocalUpdateStep.cNamespace().attach_ministep = cwrapper.prototype("void local_updatestep_add_ministep(local_updatestep,local_ministep)") -LocalUpdateStep.cNamespace().name = cwrapper.prototype("char* local_updatestep_get_name(local_updatestep)") - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/meas_block.py b/ThirdParty/Ert/python/python/ert/enkf/meas_block.py deleted file mode 100644 index 5d5ca9d082..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/meas_block.py +++ /dev/null @@ -1,104 +0,0 @@ -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB -from ert.enkf.obs_data import ObsData -from ert.util import Matrix, IntVector , BoolVector - - -class MeasBlock(BaseCClass): - - def __init__(self , obs_key , obs_size , ens_mask): - assert(isinstance(ens_mask , BoolVector)) - c_pointer = MeasBlock.cNamespace().alloc( obs_key , ens_mask , obs_size ) - super(MeasBlock , self).__init__(c_pointer) - - def __str__(self): - s = "" - for iobs in range(self.getObsSize()): - s += "[" - for iens in range(self.getTotalEnsSize()): - if self.iensActive(iens): - s += "%6.3g " % self[iobs,iens] - else: - s += " X " - - s += "]\n" - return s - - def getObsSize(self): - return MeasBlock.cNamespace().get_total_obs_size(self) - - - def getActiveEnsSize(self): - return MeasBlock.cNamespace().get_active_ens_size(self) - - - def getTotalEnsSize(self): - return MeasBlock.cNamespace().get_total_ens_size(self) - - - def __assert_index(self , index): - if isinstance(index , tuple): - iobs,iens = index - if not 0 <= iobs < self.getObsSize(): - raise IndexError("Invalid iobs value:%d Valid range: [0,%d)" % (iobs , self.getObsSize())) - - if not 0 <= iens < self.getTotalEnsSize(): - raise IndexError("Invalid iens value:%d Valid range: [0,%d)" % (iobs , self.getTotalEnsSize())) - - if not self.iensActive( iens ): - raise ValueError("Ensemble member:%d is not active - can not be accessed in the MeasBlock()" % iens) - - return iobs,iens - else: - raise TypeError("The index argument must be 2-tuple") - - - def __setitem__(self, index, value): - iobs , iens = self.__assert_index(index) - MeasBlock.cNamespace().iset_value( self , iens , iobs , value ) - - - def __getitem__(self, index): - iobs,iens = self.__assert_index(index) - return MeasBlock.cNamespace().iget_value( self , iens , iobs ) - - def iensActive(self , iens): - return MeasBlock.cNamespace().iens_active( self , iens ) - - - def free(self): - MeasBlock.cNamespace().free(self) - - - def igetMean(self , iobs): - if 0 <= iobs < self.getObsSize(): - return MeasBlock.cNamespace().iget_mean(self , iobs) - else: - raise IndexError("Invalid observation index:%d valid range: [0,%d)" % (iobs , self.getObsSize())) - - def igetStd(self , iobs): - if 0 <= iobs < self.getObsSize(): - return MeasBlock.cNamespace().iget_std(self , iobs) - else: - raise IndexError("Invalid observation index:%d valid range: [0,%d)" % (iobs , self.getObsSize())) - - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("meas_block", MeasBlock) - -MeasBlock.cNamespace().alloc = cwrapper.prototype("c_void_p meas_block_alloc( char* , bool_vector , int)") -MeasBlock.cNamespace().free = cwrapper.prototype("void meas_block_free( meas_block )") -MeasBlock.cNamespace().get_active_ens_size = cwrapper.prototype("int meas_block_get_active_ens_size( meas_block )") -MeasBlock.cNamespace().get_total_ens_size = cwrapper.prototype("int meas_block_get_total_ens_size( meas_block )") -MeasBlock.cNamespace().get_total_obs_size = cwrapper.prototype("int meas_block_get_total_obs_size( meas_block )") -MeasBlock.cNamespace().iget_value = cwrapper.prototype("double meas_block_iget( meas_block , int , int)") -MeasBlock.cNamespace().iset_value = cwrapper.prototype("void meas_block_iset( meas_block , int , int , double)") -MeasBlock.cNamespace().iget_mean = cwrapper.prototype("double meas_block_iget_ens_mean( meas_block , int )") -MeasBlock.cNamespace().iget_std = cwrapper.prototype("double meas_block_iget_ens_std( meas_block , int )") -MeasBlock.cNamespace().iens_active = cwrapper.prototype("bool meas_block_iens_active( meas_block , int )") - - - - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/meas_data.py b/ThirdParty/Ert/python/python/ert/enkf/meas_data.py deleted file mode 100644 index 3521e6976e..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/meas_data.py +++ /dev/null @@ -1,95 +0,0 @@ -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB -from ert.enkf.obs_data import ObsData -from ert.util import Matrix, IntVector - - -class MeasData(BaseCClass): - - def __init__(self, ens_mask): - c_pointer = MeasData.cNamespace().alloc(ens_mask) - super(MeasData, self).__init__(c_pointer) - - def __len__(self): - return MeasData.cNamespace().get_num_blocks( self ) - - - def __contains__(self , index): - if isinstance(index , str): - return MeasData.cNamespace().has_block( self , index) - else: - raise TypeError('The in operator expects a string argument, got "%s".' % str(index)) - - - def __getitem__(self , index): - if isinstance(index , str): - if index in self: - return MeasData.cNamespace().get_block( self , index) - else: - raise KeyError('The obs block "%s" is not recognized' % index) - elif isinstance(index,int): - if index < 0: - index += len(self) - - if 0 <= index < len(self): - return MeasData.cNamespace().iget_block( self , index) - else: - raise IndexError("Index out of range, should have 0 <= %d < %d." % (index, len(self))) - else: - raise TypeError("The index variable must string or integer") - - - def __str__(self): - return '\n'.join([str(block) for block in self]) - - - def createS(self): - """ @rtype: Matrix """ - S = MeasData.cNamespace().allocS(self) - if S is None: - raise ValueError("Failed to create S active size : [%d,%d]" % (self.getActiveEnsSize() , self.activeObsSize( ))) - return S - - - def deactivateZeroStdSamples(self, obs_data): - assert isinstance(obs_data, ObsData) - self.cNamespace().deactivate_outliers(obs_data, self) - - - def addBlock(self , obs_key , report_step , obs_size): - return MeasData.cNamespace().add_block( self , obs_key , report_step , obs_size ) - - - def activeObsSize(self): - return MeasData.cNamespace().get_active_obs_size( self ) - - - def getActiveEnsSize(self): - return MeasData.cNamespace().get_active_ens_size(self) - - - def getTotalEnsSize(self): - return MeasData.cNamespace().get_total_ens_size(self) - - - def free(self): - MeasData.cNamespace().free(self) - - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("meas_data", MeasData) - -MeasData.cNamespace().alloc = cwrapper.prototype("c_void_p meas_data_alloc(bool_vector)") -MeasData.cNamespace().free = cwrapper.prototype("void meas_data_free(meas_data)") -MeasData.cNamespace().get_active_obs_size = cwrapper.prototype("int meas_data_get_active_obs_size(meas_data)") -MeasData.cNamespace().get_active_ens_size = cwrapper.prototype("int meas_data_get_active_ens_size( meas_data )") -MeasData.cNamespace().get_total_ens_size = cwrapper.prototype("int meas_data_get_total_ens_size( meas_data )") -MeasData.cNamespace().allocS = cwrapper.prototype("matrix_obj meas_data_allocS(meas_data)") -MeasData.cNamespace().add_block = cwrapper.prototype("meas_block_ref meas_data_add_block(meas_data, char* , int , int)") -MeasData.cNamespace().get_num_blocks = cwrapper.prototype("int meas_data_get_num_blocks( meas_data )") -MeasData.cNamespace().has_block = cwrapper.prototype("bool meas_data_has_block( meas_data , char* )") -MeasData.cNamespace().get_block = cwrapper.prototype("meas_block_ref meas_data_get_block( meas_data , char*)") -MeasData.cNamespace().iget_block = cwrapper.prototype("meas_block_ref meas_data_iget_block( meas_data , int)") - -MeasData.cNamespace().deactivate_outliers = cwrapper.prototype("void enkf_analysis_deactivate_std_zero(obs_data, meas_data)") diff --git a/ThirdParty/Ert/python/python/ert/enkf/model_config.py b/ThirdParty/Ert/python/python/ert/enkf/model_config.py deleted file mode 100644 index c52ebf3343..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/model_config.py +++ /dev/null @@ -1,124 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'model_config.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import CWrapper, BaseCClass -from ert.ecl import EclSum -from ert.enkf import ENKF_LIB -from ert.sched import HistorySourceEnum, SchedFile -from ert.job_queue import ForwardModel -from ert.util import PathFormat - - -class ModelConfig(BaseCClass): - def __init__(self): - raise NotImplementedError("Class can not be instantiated directly!") - - - def hasHistory(self): - return ModelConfig.cNamespace().has_history(self) - - def get_history_source(self): - """ @rtype: HistorySourceEnum """ - return ModelConfig.cNamespace().get_history_source(self) - - def set_history_source(self, history_source, sched_file, refcase): - """ - @type history_source: HistorySourceEnum - @type sched_file: SchedFile - @type refcase: EclSum - @rtype: bool - """ - assert isinstance(history_source, HistorySourceEnum) - assert isinstance(sched_file, SchedFile) - assert isinstance(refcase, EclSum) - return ModelConfig.cNamespace().select_history(self, history_source, sched_file, refcase) - - - def get_max_internal_submit(self): - """ @rtype: int """ - return ModelConfig.cNamespace().get_max_internal_submit(self) - - def set_max_internal_submit(self, max_value): - ModelConfig.cNamespace().get_max_internal_submit(self, max_value) - - def getForwardModel(self): - """ @rtype: ForwardModel """ - return ModelConfig.cNamespace().get_forward_model(self).setParent(self) - - def get_case_table_file(self): - """ @rtype: str """ - return ModelConfig.cNamespace().get_case_table_file(self) - - def getRunpathAsString(self): - """ @rtype: str """ - return ModelConfig.cNamespace().get_runpath_as_char(self) - - def selectRunpath(self, path_key): - """ @rtype: bool """ - return ModelConfig.cNamespace().select_runpath(self, path_key) - - def setRunpath(self, path_format): - ModelConfig.cNamespace().set_runpath(self, path_format) - - def free(self): - ModelConfig.cNamespace().free(self) - - def getFSType(self): - return ModelConfig.cNamespace().get_fs_type( self ) - - def getGenKWExportFile(self): - """ @rtype: str """ - return ModelConfig.cNamespace().gen_kw_export_file(self) - - def runpathRequiresIterations(self): - """ @rtype: bool """ - return ModelConfig.cNamespace().runpath_requires_iterations(self) - - def getJobnameFormat(self): - """ @rtype: str """ - return ModelConfig.cNamespace().get_jobname_fmt(self) - - def getEnspath(self): - """ @rtype: str """ - return ModelConfig.cNamespace().get_enspath(self) - - def getRunpathFormat(self): - """ @rtype: PathFormat """ - return ModelConfig.cNamespace().get_runpath_fmt(self) - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("model_config", ModelConfig) - -ModelConfig.cNamespace().free = cwrapper.prototype("void model_config_free( model_config )") -ModelConfig.cNamespace().get_forward_model = cwrapper.prototype("forward_model_ref model_config_get_forward_model(model_config)") -ModelConfig.cNamespace().get_max_internal_submit = cwrapper.prototype("int model_config_get_max_internal_submit(model_config)") -ModelConfig.cNamespace().set_max_internal_submit = cwrapper.prototype("void model_config_set_max_internal_submit(model_config, int)") -ModelConfig.cNamespace().get_case_table_file = cwrapper.prototype("char* model_config_get_case_table_file(model_config)") -ModelConfig.cNamespace().get_runpath_as_char = cwrapper.prototype("char* model_config_get_runpath_as_char(model_config)") -ModelConfig.cNamespace().select_runpath = cwrapper.prototype("bool model_config_select_runpath(model_config, char*)") -ModelConfig.cNamespace().set_runpath = cwrapper.prototype("void model_config_set_runpath(model_config, char*)") -ModelConfig.cNamespace().get_fs_type = cwrapper.prototype("enkf_fs_type_enum model_config_get_dbase_type(model_config)") - -ModelConfig.cNamespace().get_history = cwrapper.prototype("history_ref model_config_get_history(model_config)") -ModelConfig.cNamespace().get_history_source = cwrapper.prototype("history_source_enum model_config_get_history_source(model_config)") -ModelConfig.cNamespace().select_history = cwrapper.prototype("bool model_config_select_history(model_config, history_source_enum, sched_file, ecl_sum)") -ModelConfig.cNamespace().has_history = cwrapper.prototype("bool model_config_has_history(model_config)") -ModelConfig.cNamespace().gen_kw_export_file = cwrapper.prototype("char* model_config_get_gen_kw_export_file(model_config)") -ModelConfig.cNamespace().runpath_requires_iterations = cwrapper.prototype("bool model_config_runpath_requires_iter(model_config)") -ModelConfig.cNamespace().get_jobname_fmt = cwrapper.prototype("char* model_config_get_jobname_fmt(model_config)") -ModelConfig.cNamespace().get_runpath_fmt = cwrapper.prototype("path_fmt_ref model_config_get_runpath_fmt(model_config)") - -ModelConfig.cNamespace().get_enspath = cwrapper.prototype("char* model_config_get_enspath(model_config)") diff --git a/ThirdParty/Ert/python/python/ert/enkf/node_id.py b/ThirdParty/Ert/python/python/ert/enkf/node_id.py deleted file mode 100644 index b4d8d8b030..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/node_id.py +++ /dev/null @@ -1,20 +0,0 @@ -from ctypes import Structure, c_int -from cwrap import CWrapper - -class NodeId(Structure): - """ - NodeId is specified in enkf_types.h - """ - _fields_ = [("report_step", c_int), - ("iens", c_int)] - - def __init__(self, report_step, realization_number): - """ - @type report_step: int - @type realization_number: int - """ - super(NodeId, self).__init__(report_step, realization_number) - - -CWrapper.registerType("node_id", NodeId) - diff --git a/ThirdParty/Ert/python/python/ert/enkf/obs_block.py b/ThirdParty/Ert/python/python/ert/enkf/obs_block.py deleted file mode 100644 index 8fe4fb50f9..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/obs_block.py +++ /dev/null @@ -1,67 +0,0 @@ -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB -from ert.util import Matrix - - -class ObsBlock(BaseCClass): - - def __init__(self , obs_key , obs_size , global_std_scaling=1.0): - error_covar = None - error_covar_owner = False - c_pointer = ObsBlock.cNamespace().alloc(obs_key , obs_size , error_covar , error_covar_owner, global_std_scaling) - super(ObsBlock, self).__init__(c_pointer) - - - def totalSize(self): - return ObsBlock.cNamespace().total_size(self) - - def activeSize(self): - return ObsBlock.cNamespace().active_size(self) - - def __setitem__(self , index , value): - if isinstance(index , int): - if 0 <= index < self.totalSize(): - if len(value) == 2: - d = value[0] - std = value[1] - - ObsBlock.cNamespace().iset(self , index , d , std) - else: - raise TypeError("The value argument must be a two element tuple: (value , std)") - else: - raise IndexError("Invalid index:%d - valid range: [0,%d)" % (index , self.totalSize())) - else: - raise TypeError("The index item must be integer") - - - def __getitem__(self , index): - if isinstance(index , int): - if 0 <= index < self.totalSize(): - value = ObsBlock.cNamespace().iget_value(self , index) - std = ObsBlock.cNamespace().iget_std(self , index) - - return (value,std) - else: - raise IndexError("Invalid index:%d - valid range: [0,%d)" % (index , self.totalSize())) - else: - raise TypeError("The index item must be integer") - - - - def free(self): - ObsBlock.cNamespace().free(self) - - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("obs_block", ObsBlock) - -ObsBlock.cNamespace().alloc = cwrapper.prototype("c_void_p obs_block_alloc(char*, int, matrix, bool, double)") -ObsBlock.cNamespace().free = cwrapper.prototype("void obs_block_free(obs_block)") -ObsBlock.cNamespace().total_size = cwrapper.prototype("int obs_block_get_size( obs_block )") -ObsBlock.cNamespace().active_size = cwrapper.prototype("int obs_block_get_active_size( obs_block )") -ObsBlock.cNamespace().iset = cwrapper.prototype("void obs_block_iset( obs_block , int , double , double)") -ObsBlock.cNamespace().iget_value = cwrapper.prototype("double obs_block_iget_value( obs_block , int)") -ObsBlock.cNamespace().iget_std = cwrapper.prototype("double obs_block_iget_std( obs_block , int)") - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/obs_data.py b/ThirdParty/Ert/python/python/ert/enkf/obs_data.py deleted file mode 100644 index 8038855e14..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/obs_data.py +++ /dev/null @@ -1,100 +0,0 @@ -from types import NoneType -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB -from ert.util import Matrix - - -class ObsData(BaseCClass): - - def __init__(self, global_std_scaling=1.0): - c_pointer = ObsData.cNamespace().alloc(global_std_scaling) - super(ObsData, self).__init__(c_pointer) - - def __len__(self): - """ @rtype: int """ - return ObsData.cNamespace().total_size(self) - - def __getitem__(self , index): - if index < 0: - index += len(self) - - if index >= len(self): - raise IndexError("Invalid index:%d valid range: [0,%d)" % (index , len(self))) - - value = ObsData.cNamespace().iget_value( self , index ) - std = ObsData.cNamespace().iget_std( self , index ) - return (value,std) - - - def __str__(self): - s = "" - for pair in self: - s += "(%g, %g)\n" % pair - return s - - - - def addBlock(self , obs_key , obs_size): - error_covar = None - error_covar_owner = False - return ObsData.cNamespace().add_block(self , obs_key , obs_size , error_covar , error_covar_owner) - - - def createDObs(self): - """ @rtype: Matrix """ - return ObsData.cNamespace().allocdObs(self) - - def createR(self): - """ @rtype: Matrix """ - return ObsData.cNamespace().allocR(self) - - def createD(self , E , S): - """ @rtype: Matrix """ - return ObsData.cNamespace().allocD(self , E , S) - - def createE( self , rng , active_ens_size): - """ @rtype: Matrix """ - return ObsData.cNamespace().allocE(self , rng , active_ens_size) - - def scaleMatrix(self, m): - ObsData.cNamespace().scale_matrix(self , m ) - - - def scaleRMatrix(self, R): - ObsData.cNamespace().scale_Rmatrix(self , R ) - - - def scale(self, S, E=None, D=None, R=None, D_obs=None): - assert isinstance(S, Matrix) - assert isinstance(E, (Matrix, NoneType)) - assert isinstance(D, (Matrix, NoneType)) - assert isinstance(R, (Matrix, NoneType)) - assert isinstance(D_obs, (Matrix, NoneType)) - ObsData.cNamespace().scale(self, S, E, D, R, D_obs) - - - def free(self): - ObsData.cNamespace().free(self) - - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("obs_data", ObsData) - -ObsData.cNamespace().alloc = cwrapper.prototype("c_void_p obs_data_alloc(double)") -ObsData.cNamespace().free = cwrapper.prototype("void obs_data_free(obs_data)") -ObsData.cNamespace().total_size = cwrapper.prototype("int obs_data_get_total_size(obs_data)") -ObsData.cNamespace().iget_value = cwrapper.prototype("double obs_data_iget_value(obs_data)") -ObsData.cNamespace().iget_std = cwrapper.prototype("double obs_data_iget_std(obs_data)") -ObsData.cNamespace().add_block = cwrapper.prototype("obs_block_ref obs_data_add_block(obs_data , char* , int , matrix , bool)") - -ObsData.cNamespace().allocdObs = cwrapper.prototype("matrix_obj obs_data_allocdObs(obs_data)") -ObsData.cNamespace().allocR = cwrapper.prototype("matrix_obj obs_data_allocR(obs_data)") -ObsData.cNamespace().allocD = cwrapper.prototype("matrix_obj obs_data_allocD(obs_data , matrix , matrix)") -ObsData.cNamespace().allocE = cwrapper.prototype("matrix_obj obs_data_allocE(obs_data , rng , int)") -ObsData.cNamespace().scale = cwrapper.prototype("void obs_data_scale(obs_data, matrix, matrix, matrix, matrix, matrix)") -ObsData.cNamespace().scale_matrix = cwrapper.prototype("void obs_data_scale_matrix(obs_data, matrix)") -ObsData.cNamespace().scale_Rmatrix = cwrapper.prototype("void obs_data_scale_Rmatrix(obs_data, matrix)") - - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/observations/CMakeLists.txt b/ThirdParty/Ert/python/python/ert/enkf/observations/CMakeLists.txt deleted file mode 100644 index f11169271f..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/observations/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - block_observation.py - gen_observation.py - obs_vector.py - summary_observation.py -) - -add_python_package("python.ert.enkf.observations" ${PYTHON_INSTALL_PREFIX}/ert/enkf/observations "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert/enkf/observations/__init__.py b/ThirdParty/Ert/python/python/ert/enkf/observations/__init__.py deleted file mode 100644 index 063f1f88c0..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/observations/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -from .summary_observation import SummaryObservation -from .block_observation import BlockObservation -from .gen_observation import GenObservation -from .obs_vector import ObsVector diff --git a/ThirdParty/Ert/python/python/ert/enkf/observations/block_observation.py b/ThirdParty/Ert/python/python/ert/enkf/observations/block_observation.py deleted file mode 100644 index 8b11c6dd48..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/observations/block_observation.py +++ /dev/null @@ -1,125 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'block_obs.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB, NodeId, FieldConfig - - -class BlockDataConfig(object): - - @classmethod - def from_param(cls , instance): - if instance is None: - return ctypes.c_void_p() - elif isinstance(instance , FieldConfig): - return FieldConfig.from_param( instance ) - - # The Container class which is used to support summary based - # source in the BLOCK_OBS configuration is not yet supported - # in Python. - - #elif isinstance(instance , ContainerConfig): - # return ContainerConfig.from_param( instance ) - else: - raise ValueError("Currently ONLY field data is supported") - - - - -class BlockObservation(BaseCClass): - - def __init__(self , obs_key , data_config , grid): - c_ptr = BlockObservation.cNamespace().alloc( obs_key , data_config , grid ) - super(BlockObservation, self).__init__(c_ptr) - - - def getCoordinate(self, index): - """ @rtype: tuple of (int, int, int) """ - i = BlockObservation.cNamespace().iget_i(self, index) - j = BlockObservation.cNamespace().iget_j(self, index) - k = BlockObservation.cNamespace().iget_k(self, index) - return i, j, k - - def __len__(self): - """ @rtype: int """ - return BlockObservation.cNamespace().get_size(self) - - def __iter__(self): - cur = 0 - while cur < len(self): - yield cur - cur += 1 - - def addPoint(self , i,j,k , value , std , sum_key = None): - if sum_key is None: - BlockObservation.cNamespace().add_field_point(self,i,j,k,value,std) - else: - BlockObservation.cNamespace().add_summary_point(self,i,j,k,sum_key,value,std) - - - def getValue(self, index): - """ @rtype: float """ - return BlockObservation.cNamespace().get_value(self, index) - - def getStd(self, index): - """ @rtype: float """ - return BlockObservation.cNamespace().get_std(self, index) - - def getStdScaling(self , index): - """ @rtype: float """ - return BlockObservation.cNamespace().get_std_scaling(self, index) - - def updateStdScaling(self , factor , active_list): - BlockObservation.cNamespace().update_std_scaling(self, factor , active_list) - - - def getDepth(self, index): - """ @rtype: float """ - return BlockObservation.cNamespace().get_depth(self, index) - - def getData(self, state, obs_index, node_id): - """ - @type state: c_void_p - @type obs_index: int - @type node_id: NodeId - @rtype: float """ - - return BlockObservation.cNamespace().iget_data(self, state, obs_index, node_id) - - - def free(self): - BlockObservation.cNamespace().free(self) - -################################################################## - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("block_obs", BlockObservation) -cwrapper.registerType("block_data_config", BlockDataConfig) - -BlockObservation.cNamespace().alloc = cwrapper.prototype("c_void_p block_obs_alloc( char* , block_data_config , ecl_grid )") -BlockObservation.cNamespace().free = cwrapper.prototype("void block_obs_free( block_obs )") -BlockObservation.cNamespace().iget_i = cwrapper.prototype("int block_obs_iget_i(block_obs, int)") -BlockObservation.cNamespace().iget_j =cwrapper.prototype("int block_obs_iget_j( block_obs, int)") -BlockObservation.cNamespace().iget_k = cwrapper.prototype("int block_obs_iget_k( block_obs , int)") -BlockObservation.cNamespace().get_size = cwrapper.prototype("int block_obs_get_size( block_obs )") -BlockObservation.cNamespace().get_std = cwrapper.prototype("double block_obs_iget_std( block_obs, int )") -BlockObservation.cNamespace().get_std_scaling = cwrapper.prototype("double block_obs_iget_std_scaling( block_obs, int )") -BlockObservation.cNamespace().update_std_scaling = cwrapper.prototype("void block_obs_update_std_scale(block_obs , double , active_list)") -BlockObservation.cNamespace().get_value = cwrapper.prototype("double block_obs_iget_value( block_obs, int)") -BlockObservation.cNamespace().get_depth = cwrapper.prototype("double block_obs_iget_depth( block_obs, int)") -BlockObservation.cNamespace().add_field_point = cwrapper.prototype("void block_obs_append_field_obs( block_obs, int,int,int,double,double)") -BlockObservation.cNamespace().add_summary_point = cwrapper.prototype("void block_obs_append_summary_obs( block_obs, int,int,int,double,double)") -BlockObservation.cNamespace().iget_data = cwrapper.prototype("double block_obs_iget_data(block_obs, c_void_p, int, node_id)") - diff --git a/ThirdParty/Ert/python/python/ert/enkf/observations/gen_observation.py b/ThirdParty/Ert/python/python/ert/enkf/observations/gen_observation.py deleted file mode 100644 index eddac3ef82..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/observations/gen_observation.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'gen_observation.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -import os.path - -from cwrap import BaseCClass, CWrapper -from ert.util import IntVector -from ert.enkf import ENKF_LIB - - -class GenObservation(BaseCClass): - - def __init__(self , obs_key , data_config , scalar_value = None , obs_file = None , data_index = None): - c_pointer = GenObservation.cNamespace().alloc( data_config , obs_key ) - super(GenObservation, self).__init__(c_pointer) - - if scalar_value is None and obs_file is None: - raise ValueError("Exactly one the scalar_value and obs_file arguments must be present") - - if scalar_value is not None and obs_file is not None: - raise ValueError("Exactly one the scalar_value and obs_file arguments must be present") - - if obs_file is not None: - if not os.path.isfile( obs_file ): - raise IOError("The file with observation data:%s does not exist" % obs_file ) - else: - GenObservation.cNamespace().load( self , obs_file ) - else: - obs_value , obs_std = scalar_value - GenObservation.cNamespace().scalar_set( self , obs_value , obs_std ) - - if not data_index is None: - if os.path.isfile( data_index ): - GenObservation.cNamespace().load_data_index( self , data_index ) - else: - index_list = IntVector.active_list( data_index ) - GenObservation.cNamespace().add_data_index( self , index_list ) - - - def __len__(self): - return GenObservation.cNamespace().get_size(self) - - def __getitem__(self , obs_index): - if obs_index < 0: - obs_index += len(self) - - if 0 <= obs_index < len(self): - return (self.getValue(obs_index) , self.getStandardDeviation(obs_index)) - else: - raise IndexError("Valid range: [0,%d)" % len(self)) - - - def getValue(self, obs_index): - """ @rtype: float """ - return GenObservation.cNamespace().get_value(self, obs_index) - - def getStandardDeviation(self, obs_index): - """ @rtype: float """ - return GenObservation.cNamespace().get_std(self, obs_index) - - def getStdScaling(self, obs_index): - """ @rtype: float """ - return GenObservation.cNamespace().get_std_scaling(self, obs_index) - - def updateStdScaling(self , factor , active_list): - GenObservation.cNamespace().update_std_scaling(self, factor , active_list) - - - def getSize(self): - """ @rtype: float """ - return len(self) - - def getIndex(self, obs_index): - """ @rtype: int """ - return self.getDataIndex( obs_index ) - - def getDataIndex(self, obs_index): - return GenObservation.cNamespace().get_data_index(self, obs_index) - - def free(self): - GenObservation.cNamespace().free(self) - - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerType("gen_obs", GenObservation) -cwrapper.registerType("gen_obs_obj", GenObservation.createPythonObject) -cwrapper.registerType("gen_obs_ref", GenObservation.createCReference) - -GenObservation.cNamespace().alloc = cwrapper.prototype("c_void_p gen_obs_alloc__(gen_data_config , char*)") -GenObservation.cNamespace().free = cwrapper.prototype("void gen_obs_free(gen_data_config)") -GenObservation.cNamespace().load = cwrapper.prototype("void gen_obs_load_observation(gen_obs , char*)") -GenObservation.cNamespace().scalar_set = cwrapper.prototype("void gen_obs_set_scalar(gen_obs , double , double)") -GenObservation.cNamespace().get_value = cwrapper.prototype("double gen_obs_iget_value(summary_obs)") -GenObservation.cNamespace().get_std_scaling = cwrapper.prototype("double gen_obs_iget_std_scaling(summary_obs)") -GenObservation.cNamespace().get_std = cwrapper.prototype("double gen_obs_iget_std(gen_obs, int)") -GenObservation.cNamespace().get_size = cwrapper.prototype("int gen_obs_get_size(gen_obs)") -GenObservation.cNamespace().get_data_index = cwrapper.prototype("int gen_obs_get_obs_index(gen_obs, int)") -GenObservation.cNamespace().load_data_index = cwrapper.prototype("void gen_obs_load_data_index(gen_obs , char*)") -GenObservation.cNamespace().add_data_index = cwrapper.prototype("void gen_obs_attach_data_index(gen_obs , int_vector)") -GenObservation.cNamespace().update_std_scaling = cwrapper.prototype("void gen_obs_update_std_scale(gen_obs , double , active_list)") diff --git a/ThirdParty/Ert/python/python/ert/enkf/observations/obs_vector.py b/ThirdParty/Ert/python/python/ert/enkf/observations/obs_vector.py deleted file mode 100644 index 60aa68e16a..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/observations/obs_vector.py +++ /dev/null @@ -1,154 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'obs_vector.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB -from ert.enkf.config import EnkfConfigNode -from ert.enkf.enums import EnkfObservationImplementationType -from ert.enkf.observations import BlockObservation, SummaryObservation, GenObservation - - -class ObsVector(BaseCClass): - def __init__(self, observation_type, observation_key, config_node, num_reports): - """ - @type observation_type: EnkfObservationImplementationType - @type observation_key: str - @type config_node: EnkfConfigNode - @type num_reports: int - """ - assert isinstance(observation_type, EnkfObservationImplementationType) - assert isinstance(observation_key, str) - assert isinstance(config_node, EnkfConfigNode) - assert isinstance(num_reports, int) - pointer = ObsVector.cNamespace().alloc(observation_type, observation_key, config_node, num_reports) - super(ObsVector, self).__init__(pointer) - - - def getDataKey(self): - """ @rtype: str """ - return ObsVector.cNamespace().get_state_kw(self) - - def getObservationKey(self): - """ @rtype: str """ - return ObsVector.cNamespace().get_observation_key(self) - - - def getNode(self, index): - """ @rtype: SummaryObservation or BlockObservation or GenObservation""" - - pointer = ObsVector.cNamespace().iget_node(self, index) - - node_type = self.getImplementationType() - if node_type == EnkfObservationImplementationType.SUMMARY_OBS: - return SummaryObservation.createCReference(pointer, self) - elif node_type == EnkfObservationImplementationType.BLOCK_OBS: - return BlockObservation.createCReference(pointer, self) - elif node_type == EnkfObservationImplementationType.GEN_OBS: - return GenObservation.createCReference(pointer, self) - else: - raise AssertionError("Node type '%s' currently not supported!" % node_type) - - - def __iter__(self): - """ Iterate over active report steps; return node""" - cur = -1 - run = True - for step in self.getStepList(): - yield self.getNode( step ) - - - - def getStepList(self): - """ - Will return an IntVector with the active report steps. - """ - return ObsVector.cNamespace().get_step_list(self) - - def activeStep(self): - """Assuming the observation is only active for one report step, this - method will return that report step - if it is active for more - than one report step the method will raise an exception. - """ - step_list = self.getStepList() - if len(step_list): - return step_list[0] - else: - raise ValueError("The activeStep() method can *ONLY* be called for obervations with one active step") - - - def getActiveCount(self): - """ @rtype: int """ - return ObsVector.cNamespace().get_num_active(self) - - def isActive(self, index): - """ @rtype: bool """ - return ObsVector.cNamespace().iget_active(self, index) - - def getNextActiveStep(self, previous_step=-1): - """ @rtype: int """ - return ObsVector.cNamespace().get_next_active_step(self, previous_step) - - def getImplementationType(self): - """ @rtype: EnkfObservationImplementationType """ - return ObsVector.cNamespace().get_impl_type(self) - - def installNode(self, index, node): - assert isinstance(node, SummaryObservation) - node.convertToCReference(self) - ObsVector.cNamespace().install_node(self, index, node.from_param(node)) - - def getConfigNode(self): - """ @rtype: EnkfConfigNode """ - return ObsVector.cNamespace().get_config_node(self).setParent(self) - - - def createLocalObs(self): - """ - Will create a LocalObsDataNode instance with all timesteps set. - """ - return ObsVector.cNamespace().create_local_node( self ) - - - def hasData(self, active_mask, fs): - """ @rtype: bool """ - return ObsVector.cNamespace().has_data(self, active_mask, fs) - - def free(self): - ObsVector.cNamespace().free(self) - - def getTotalChi2(self, fs, realization_number): - """ @rtype: float """ - return ObsVector.cNamespace().get_total_chi2(self, fs, realization_number) - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("obs_vector", ObsVector) - -ObsVector.cNamespace().alloc = cwrapper.prototype("c_void_p obs_vector_alloc(enkf_obs_impl_type, char*, enkf_config_node, int)") -ObsVector.cNamespace().free = cwrapper.prototype("void obs_vector_free( obs_vector )") -ObsVector.cNamespace().get_state_kw = cwrapper.prototype("char* obs_vector_get_state_kw( obs_vector )") -ObsVector.cNamespace().get_observation_key = cwrapper.prototype("char* obs_vector_get_key( obs_vector )") -ObsVector.cNamespace().iget_node = cwrapper.prototype("c_void_p obs_vector_iget_node( obs_vector, int)") -ObsVector.cNamespace().get_num_active = cwrapper.prototype("int obs_vector_get_num_active( obs_vector )") -ObsVector.cNamespace().iget_active = cwrapper.prototype("bool obs_vector_iget_active( obs_vector, int)") -ObsVector.cNamespace().get_impl_type = cwrapper.prototype("enkf_obs_impl_type obs_vector_get_impl_type( obs_vector)") -ObsVector.cNamespace().install_node = cwrapper.prototype("void obs_vector_install_node(obs_vector, int, c_void_p)") -ObsVector.cNamespace().get_next_active_step = cwrapper.prototype("int obs_vector_get_next_active_step(obs_vector, int)") -ObsVector.cNamespace().has_data = cwrapper.prototype("bool obs_vector_has_data(obs_vector , bool_vector , enkf_fs)") -ObsVector.cNamespace().get_config_node = cwrapper.prototype("enkf_config_node_ref obs_vector_get_config_node(obs_vector)") -ObsVector.cNamespace().get_total_chi2 = cwrapper.prototype("double obs_vector_total_chi2(obs_vector, enkf_fs, int)") -ObsVector.cNamespace().get_obs_key = cwrapper.prototype("char* obs_vector_get_obs_key(obs_vector)") -ObsVector.cNamespace().get_step_list = cwrapper.prototype("int_vector_ref obs_vector_get_step_list(obs_vector)") -ObsVector.cNamespace().create_local_node = cwrapper.prototype("local_obsdata_node_obj obs_vector_alloc_local_node(obs_vector)") diff --git a/ThirdParty/Ert/python/python/ert/enkf/observations/summary_observation.py b/ThirdParty/Ert/python/python/ert/enkf/observations/summary_observation.py deleted file mode 100644 index e957ac51e2..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/observations/summary_observation.py +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'summary_observation.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB - - -class SummaryObservation(BaseCClass): - def __init__(self, summary_key, observation_key, value, std, auto_corrf_name=None, auto_corrf_param=0.0): - assert isinstance(summary_key, str) - assert isinstance(observation_key, str) - assert isinstance(value, float) - assert isinstance(std, float) - - if auto_corrf_name is not None: - assert isinstance(auto_corrf_name, str) - - assert isinstance(auto_corrf_param, float) - pointer = SummaryObservation.cNamespace().alloc(summary_key, observation_key, value, std, auto_corrf_name, auto_corrf_param) - super(SummaryObservation, self).__init__(pointer) - - def getValue(self): - """ @rtype: float """ - return SummaryObservation.cNamespace().get_value(self) - - def getStandardDeviation(self): - """ @rtype: float """ - return SummaryObservation.cNamespace().get_std(self) - - def getStdScaling(self , index = 0): - """ @rtype: float """ - return SummaryObservation.cNamespace().get_std_scaling(self) - - def __len__(self): - return 1 - - - def getSummaryKey(self): - """ @rtype: str """ - return SummaryObservation.cNamespace().get_summary_key(self) - - - def updateStdScaling(self , factor , active_list): - SummaryObservation.cNamespace().update_std_scale(self , factor , active_list) - - - def free(self): - SummaryObservation.cNamespace().free(self) - - - - - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("summary_obs", SummaryObservation) - -SummaryObservation.cNamespace().alloc = cwrapper.prototype("c_void_p summary_obs_alloc(char*, char*, double, double, char*, double)") -SummaryObservation.cNamespace().free = cwrapper.prototype("void summary_obs_free(summary_obs)") -SummaryObservation.cNamespace().get_value = cwrapper.prototype("double summary_obs_get_value(summary_obs)") -SummaryObservation.cNamespace().get_std = cwrapper.prototype("double summary_obs_get_std(summary_obs)") -SummaryObservation.cNamespace().get_std_scaling = cwrapper.prototype("double summary_obs_get_std_scaling(summary_obs)") -SummaryObservation.cNamespace().get_summary_key = cwrapper.prototype("char* summary_obs_get_summary_key(summary_obs)") -SummaryObservation.cNamespace().update_std_scale = cwrapper.prototype("void summary_obs_update_std_scale(summary_obs , double , active_list)") diff --git a/ThirdParty/Ert/python/python/ert/enkf/plot/CMakeLists.txt b/ThirdParty/Ert/python/python/ert/enkf/plot/CMakeLists.txt deleted file mode 100644 index 4ce39c00f6..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/plot/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - block_observation_data_fetcher.py - data_fetcher.py - ensemble_block_data_fetcher.py - ensemble_data_fetcher.py - ensemble_gen_data_fetcher.py - ensemble_gen_kw_fetcher.py - observation_data_fetcher.py - observation_gen_data_fetcher.py - pca_fetcher.py - refcase_data_fetcher.py -) - -add_python_package("python.ert.enkf.plot" ${PYTHON_INSTALL_PREFIX}/ert/enkf/plot "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert/enkf/plot/__init__.py b/ThirdParty/Ert/python/python/ert/enkf/plot/__init__.py deleted file mode 100644 index 75ecfa73b1..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/plot/__init__.py +++ /dev/null @@ -1,10 +0,0 @@ -from .data_fetcher import DataFetcher -from .observation_data_fetcher import ObservationDataFetcher -from .refcase_data_fetcher import RefcaseDataFetcher -from .ensemble_data_fetcher import EnsembleDataFetcher -from .ensemble_block_data_fetcher import EnsembleBlockDataFetcher -from .block_observation_data_fetcher import BlockObservationDataFetcher -from .ensemble_gen_kw_fetcher import EnsembleGenKWFetcher -from .ensemble_gen_data_fetcher import EnsembleGenDataFetcher -from .observation_gen_data_fetcher import ObservationGenDataFetcher -from .pca_fetcher import PcaDataFetcher \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert/enkf/plot/block_observation_data_fetcher.py b/ThirdParty/Ert/python/python/ert/enkf/plot/block_observation_data_fetcher.py deleted file mode 100644 index a5ea24e4ee..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/plot/block_observation_data_fetcher.py +++ /dev/null @@ -1,107 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'block_observation_data_fetcher.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from ert.enkf import EnkfObservationImplementationType -from ert.enkf.observations import BlockObservation -from ert.enkf.plot import DataFetcher - - -class BlockObservationDataFetcher(DataFetcher): - def __init__(self, ert): - super(BlockObservationDataFetcher, self).__init__(ert) - self.__selected_report_step_index = None - - def setSelectedReportStepIndex(self, index): - self.__selected_report_step_index = index - - def fetchSupportedKeys(self): - observations = self.ert().getObservations() - string_list = observations.getTypedKeylist(EnkfObservationImplementationType.BLOCK_OBS) - return [key for key in string_list] - - def __fetchObservationData(self, block_observation): - assert isinstance(block_observation, BlockObservation) - - data = { - "continuous": False, - "x": [], - "y": [], - "std": [], - "min_y": None, - "max_y": None, - "min_x": None, - "max_x": None - } - - for index in block_observation: - std = block_observation.getStd(index) - y = block_observation.getDepth(index) - x = block_observation.getValue(index) - - data["std"].append(std) - data["y"].append(y) - data["x"].append(x) - - adjusted_x = self.adjustX(x, std) - - if data["min_x"] is None or data["min_x"] > adjusted_x: - data["min_x"] = adjusted_x - - if data["max_x"] is None or data["max_x"] < x + std: - data["max_x"] = x + std - - - if data["min_y"] is None or data["min_y"] > y: - data["min_y"] = y - - if data["max_y"] is None or data["max_y"] < y: - data["max_y"] = y - - return data - - @staticmethod - def adjustX(x, std): - if x >= 0: - return max(0, x - std) - - return x - std - - def hasData(self, key): - """ @rtype: bool """ - observations = self.ert().getObservations() - if not observations.hasKey(key): - return False - - return observations[key].getActiveCount() > 0 - - def fetchData(self, key, case=None): - observations = self.ert().getObservations() - assert observations.hasKey(key) - - observation_vector = observations[key] - - report_step_data = [] - for report_step in observation_vector: - block_observation = observation_vector.getNode(report_step) - data = self.__fetchObservationData(block_observation) - data["report_step"] = report_step - report_step_data.append(data) - - - if self.__selected_report_step_index is not None: - return report_step_data[self.__selected_report_step_index] - else: - return report_step_data - diff --git a/ThirdParty/Ert/python/python/ert/enkf/plot/data_fetcher.py b/ThirdParty/Ert/python/python/ert/enkf/plot/data_fetcher.py deleted file mode 100644 index b67769f2dc..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/plot/data_fetcher.py +++ /dev/null @@ -1,30 +0,0 @@ -from ert.enkf.enkf_main import EnKFMain - - -class DataFetcher(object): - def __init__(self, ert): - super(DataFetcher, self).__init__() - assert isinstance(ert, EnKFMain) - self.__ert = ert - self.__supported_keys = None - - def fetchData(self, key, case=None): - raise NotImplementedError() - - def ert(self): - return self.__ert - - def fetchSupportedKeys(self): - raise NotImplementedError() - - def getSupportedKeys(self): - if self.__supported_keys is None: - self.__supported_keys = self.fetchSupportedKeys() - return self.__supported_keys - - def supportsKey(self, key): - return key in self.getSupportedKeys() - - - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/plot/ensemble_block_data_fetcher.py b/ThirdParty/Ert/python/python/ert/enkf/plot/ensemble_block_data_fetcher.py deleted file mode 100644 index 6b9e763088..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/plot/ensemble_block_data_fetcher.py +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'ensemble_block_data_fetcher.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -from ert.enkf.enums import ErtImplType -from ert.enkf.plot import DataFetcher -from ert.enkf.plot_data import PlotBlockDataLoader, PlotBlockData - - -class EnsembleBlockDataFetcher(DataFetcher): - def __init__(self, ert): - super(EnsembleBlockDataFetcher, self).__init__(ert) - self.__selected_report_step_index = None - - def __fetchSimulationData(self, block_data): - """ - @type block_data: PlotBlockData - @rtype dict - """ - data = { - "x": [], - "y": [], - "min_x_values": [], - "max_x_values": [], - "min_y": None, - "max_y": None, - "min_x": None, - "max_x": None - } - - depth_vector = block_data.getDepth() - - for depth in depth_vector: - data["y"].append(depth) - data["min_x_values"].append(None) - data["max_x_values"].append(None) - - - min_y = min(data["y"]) - max_y = max(data["y"]) - - if data["min_y"] is None or data["min_y"] > min_y: - data["min_y"] = min_y - - if data["max_y"] is None or data["max_y"] < max_y: - data["max_y"] = max_y - - for block_vector in block_data: - x = [] - data["x"].append(x) - - for index in range(len(block_vector)): - value = block_vector[index] - x.append(value) - if data["min_x"] is None or data["min_x"] > value: - data["min_x"] = value - - if data["max_x"] is None or data["max_x"] < value: - data["max_x"] = value - - if data["min_x_values"][index] is None or data["min_x_values"][index] > value: - data["min_x_values"][index] = value - - if data["max_x_values"][index] is None or data["max_x_values"][index] < value: - data["max_x_values"][index] = value - - return data - - def fetchData(self, key, case=None): - enkf_fs = self.ert().getEnkfFsManager().getFileSystem(case) - observations = self.ert().getObservations() - assert observations.hasKey(key) - - observation_vector = observations[key] - - loader = PlotBlockDataLoader(observation_vector) - - report_step_data = [] - for report_step in observation_vector: - block_data = loader.load(enkf_fs, report_step) - data = self.__fetchSimulationData(block_data) - data["report_step"] = report_step - - report_step_data.append(data) - - if self.__selected_report_step_index is not None: - return report_step_data[self.__selected_report_step_index] - else: - return report_step_data - - def fetchSupportedKeys(self): - string_list = self.ert().ensembleConfig().getKeylistFromImplType(ErtImplType.SUMMARY) - return [key for key in string_list] - - def setSelectedReportStepIndex(self, index): - self.__selected_report_step_index = index - diff --git a/ThirdParty/Ert/python/python/ert/enkf/plot/ensemble_data_fetcher.py b/ThirdParty/Ert/python/python/ert/enkf/plot/ensemble_data_fetcher.py deleted file mode 100644 index d8828b631a..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/plot/ensemble_data_fetcher.py +++ /dev/null @@ -1,73 +0,0 @@ -from ert.enkf import EnsembleConfig -from ert.enkf.plot_data import EnsemblePlotData -from ert.enkf.enums import ErtImplType -from ert.enkf.plot.data_fetcher import DataFetcher - - -class EnsembleDataFetcher(DataFetcher): - def __init__(self, ert): - super(EnsembleDataFetcher, self).__init__(ert) - - def fetchSupportedKeys(self): - """ @rtype: list of str """ - return [key for key in self.ert().ensembleConfig().getKeylistFromImplType(ErtImplType.SUMMARY)] - - - def getEnsembleConfigNode(self, key): - """ @rtype: EnsembleConfig """ - ensemble_config = self.ert().ensembleConfig() - assert key in ensemble_config - return ensemble_config.getNode(key) - - - def fetchData(self, key, case=None): - ensemble_config_node = self.getEnsembleConfigNode(key) - enkf_fs = self.ert().getEnkfFsManager().getFileSystem(case) - ensemble_plot_data = EnsemblePlotData(ensemble_config_node, enkf_fs) - - data = { - "x": [], - "y": [], - "min_y_values": [], - "max_y_values": [], - "min_y": None, - "max_y": None, - "min_x": None, - "max_x": None - } - - time_map = enkf_fs.getTimeMap() - - for index in range(1, len(time_map)): - data["x"].append(time_map[index].ctime()) - data["min_y_values"].append(None) - data["max_y_values"].append(None) - - data["min_x"] = data["x"][0] - data["max_x"] = data["x"][len(data["x"]) - 1] - - - for vector in ensemble_plot_data: - y = [] - data["y"].append(y) - - # skip index 0 (not a valid simulation value...) - for index in range(len(vector) - 1): - if vector.isActive(index + 1): - y_value = vector.getValue(index + 1) - y.append(y_value) - - if data["min_y"] is None or data["min_y"] > y_value: - data["min_y"] = y_value - - if data["max_y"] is None or data["max_y"] < y_value: - data["max_y"] = y_value - - - if data["min_y_values"][index] is None or data["min_y_values"][index] > y_value: - data["min_y_values"][index] = y_value - - if data["max_y_values"][index] is None or data["max_y_values"][index] < y_value: - data["max_y_values"][index] = y_value - - return data diff --git a/ThirdParty/Ert/python/python/ert/enkf/plot/ensemble_gen_data_fetcher.py b/ThirdParty/Ert/python/python/ert/enkf/plot/ensemble_gen_data_fetcher.py deleted file mode 100644 index c248169c36..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/plot/ensemble_gen_data_fetcher.py +++ /dev/null @@ -1,71 +0,0 @@ -# Copyright (C) 2014 Statoil ASA, Norway. -# -# The file 'ensemble_gen_data_fetcher.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from ert.enkf.plot_data import EnsemblePlotGenData -from ert.enkf.plot import DataFetcher - - -class EnsembleGenDataFetcher(DataFetcher): - def __init__(self, ert): - super(EnsembleGenDataFetcher, self).__init__(ert) - - def fetchSupportedKeys(self): - gen_data_list = [] - - return gen_data_list - - def getEnsembleConfigNode(self, key): - """ @rtype: EnsembleConfig """ - ensemble_config = self.ert().ensembleConfig() - assert key in ensemble_config - return ensemble_config.getNode(key) - - def fetchData(self, key, case=None): - key, report_step = key.split("@") - report_step = int(report_step) - - ensemble_config_node = self.getEnsembleConfigNode(key) - enkf_fs = self.ert().getEnkfFsManager().getFileSystem(case) - ensemble_plot_gen_data = EnsemblePlotGenData(ensemble_config_node, enkf_fs, report_step) - - data = {"x": [], - "y": [], - "min_y_values": [value for value in ensemble_plot_gen_data.getMinValues()], - "max_y_values": [value for value in ensemble_plot_gen_data.getMaxValues()], - "min_y": None, - "max_y": None, - "min_x": 0, - "max_x": None} - - data["x"] = [index for index in range(len(data["min_y_values"]))] - data["max_x"] = len(data["min_y_values"]) - 1 - - for vector in ensemble_plot_gen_data: - y = [] - data["y"].append(y) - - for value in vector: - y.append(value) - - if data["min_y"] is None or data["min_y"] > value: - data["min_y"] = value - - if data["max_y"] is None or data["max_y"] < value: - data["max_y"] = value - - - - return data - diff --git a/ThirdParty/Ert/python/python/ert/enkf/plot/ensemble_gen_kw_fetcher.py b/ThirdParty/Ert/python/python/ert/enkf/plot/ensemble_gen_kw_fetcher.py deleted file mode 100644 index 2dd7e1a942..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/plot/ensemble_gen_kw_fetcher.py +++ /dev/null @@ -1,80 +0,0 @@ -# Copyright (C) 2014 Statoil ASA, Norway. -# -# The file 'ensemble_gen_kw_fetcher.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from ert.enkf.config.gen_kw_config import GenKwConfig -from ert.enkf.enums.ert_impl_type_enum import ErtImplType -from ert.enkf.plot import DataFetcher -from ert.enkf.plot_data import EnsemblePlotGenKW - - -class EnsembleGenKWFetcher(DataFetcher): - def __init__(self, ert): - super(EnsembleGenKWFetcher, self).__init__(ert) - - def fetchSupportedKeys(self): - gen_kw_keys = self.ert().ensembleConfig().getKeylistFromImplType(ErtImplType.GEN_KW) - gen_kw_list = [] - for key in gen_kw_keys: - enkf_config_node = self.ert().ensembleConfig().getNode(key) - model_config = enkf_config_node.getModelConfig() - assert isinstance(model_config, GenKwConfig) - - model_keys = model_config.getKeyWords() - for key_word in model_keys: - gen_kw_list.append("%s:%s" % (key, key_word)) - - return gen_kw_list - - - def getEnsembleConfigNode(self, key): - """ @rtype: EnsembleConfig """ - ensemble_config = self.ert().ensembleConfig() - assert key in ensemble_config - return ensemble_config.getNode(key) - - - def fetchData(self, key, case=None): - key, keyword = key.split(":") - ensemble_config_node = self.getEnsembleConfigNode(key) - enkf_fs = self.ert().getEnkfFsManager().getFileSystem(case) - ensemble_plot_gen_kw = EnsemblePlotGenKW(ensemble_config_node, enkf_fs) - keyword_index = ensemble_plot_gen_kw.getIndexForKeyword(keyword) - - use_log_scale = ensemble_plot_gen_kw.shouldUseLogScale(keyword_index) - - data = {"x": [0], - "y": [], - "min_y": None, - "max_y": None, - "min_x": 0, - "max_x": 0, - "use_log_scale": use_log_scale} - - for vector in ensemble_plot_gen_kw: - y = [] - data["y"].append(y) - - if len(vector) > keyword_index: - value = vector.getValue(keyword_index) - y.append(value) - - if data["min_y"] is None or data["min_y"] > value: - data["min_y"] = value - - if data["max_y"] is None or data["max_y"] < value: - data["max_y"] = value - - return data - diff --git a/ThirdParty/Ert/python/python/ert/enkf/plot/observation_data_fetcher.py b/ThirdParty/Ert/python/python/ert/enkf/plot/observation_data_fetcher.py deleted file mode 100644 index c6e4830e81..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/plot/observation_data_fetcher.py +++ /dev/null @@ -1,91 +0,0 @@ -from ert.enkf import EnkfObservationImplementationType -from ert.enkf.enums import ErtImplType -from ert.enkf.plot import DataFetcher - - -class ObservationDataFetcher(DataFetcher): - def __init__(self, ert): - super(ObservationDataFetcher, self).__init__(ert) - - def getObservationKeys(self): - observations = self.ert().getObservations() - keys = observations.getTypedKeylist(EnkfObservationImplementationType.SUMMARY_OBS) - keys = sorted(keys) - return keys - - def fetchSupportedKeys(self): - """ @rtype: list of str """ - return sorted([key for key in self.ert().ensembleConfig().getKeylistFromImplType(ErtImplType.SUMMARY)]) - - def __getObservationData(self, key, data): - observations = self.ert().getObservations() - assert observations.hasKey(key) - - observation_data = observations[key] - active_count = observation_data.getActiveCount() - - history_length = self.ert().getHistoryLength() - for index in range(0, history_length): - if observation_data.isActive(index): - x_value = int(observations.getObservationTime(index).ctime()) - data["x"].append(x_value) - - #: :type: SummaryObservation - node = observation_data.getNode(index) - - y_value = node.getValue() - std = node.getStandardDeviation() - data["y"].append(float(y_value)) - data["std"].append(float(std)) - - if data["min_x"] is None or data["min_x"] > x_value: - data["min_x"] = x_value - - if data["max_x"] is None or data["max_x"] < x_value: - data["max_x"] = x_value - - - adjusted_y = self.adjustY(y_value, std) - - if data["min_y"] is None or data["min_y"] > adjusted_y: - data["min_y"] = adjusted_y - - if data["max_y"] is None or data["max_y"] < y_value + std: - data["max_y"] = y_value + std - - if active_count == 1: - data["continuous"] = False - - @staticmethod - def adjustY(y, std): - if y >= 0: - return max(0, y - std) - - return y - std - - - def fetchData(self, key, case=None): - obs_keys = self.ert().ensembleConfig().getNode(key).getObservationKeys() - history_length = self.ert().getHistoryLength() - - data = {"continuous": True, - "x": None, - "y": None, - "std": None, - "min_y": None, - "max_y": None, - "min_x": None, - "max_x": None} - - if len(obs_keys) == 0: - return data - - data["x"] = [] - data["y"] = [] - data["std"] = [] - - for obs_key in obs_keys: - self.__getObservationData(obs_key, data) - - return data - diff --git a/ThirdParty/Ert/python/python/ert/enkf/plot/observation_gen_data_fetcher.py b/ThirdParty/Ert/python/python/ert/enkf/plot/observation_gen_data_fetcher.py deleted file mode 100644 index 31c9a2eee5..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/plot/observation_gen_data_fetcher.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright (C) 2014 Statoil ASA, Norway. -# -# The file 'observation_gen_data_fetcher.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from ert.enkf.enums.ert_impl_type_enum import ErtImplType -from ert.enkf.plot import DataFetcher - - -class ObservationGenDataFetcher(DataFetcher): - def __init__(self, ert): - super(ObservationGenDataFetcher, self).__init__(ert) - - def fetchSupportedKeys(self): - gen_data_keys = self.ert().ensembleConfig().getKeylistFromImplType(ErtImplType.GEN_DATA) - gen_data_list = [] - for key in gen_data_keys: - obs_keys = self.ert().ensembleConfig().getNode(key).getObservationKeys() - for obs_key in obs_keys: - obs_vector = self.ert().getObservations()[obs_key] - for report_step in obs_vector.getStepList(): - gen_data_list.append("%s@%d" % (key, report_step)) - - return gen_data_list - - def __getObservationData(self, key, report_step): - data = {"continuous": True, - "x": [], - "y": [], - "std": [], - "min_y": None, - "max_y": None, - "min_x": None, - "max_x": None} - - observations = self.ert().getObservations() - assert observations.hasKey(key) - - gen_obs = observations[key].getNode(report_step) - - size = gen_obs.getSize() - - data["min_x"] = 0 - data["max_x"] = size - 1 - for index in range(0, size): - std = gen_obs.getStandardDeviation(index) - data["std"].append(std) - y_value = gen_obs.getValue(index) - data["y"].append(y_value) - - adjusted_y = self.adjustY(y_value, std) - - if data["min_y"] is None or data["min_y"] > adjusted_y: - data["min_y"] = adjusted_y - - if data["max_y"] is None or data["max_y"] < y_value + std: - data["max_y"] = y_value + std - - obs_index = gen_obs.getIndex(index) - data["x"].append(obs_index) - - return data - - - def getObsKeyForKey(self, key, key_report_step): - obs_keys = self.ert().ensembleConfig().getNode(key).getObservationKeys() - for obs_key in obs_keys: - obs_vector = self.ert().getObservations()[obs_key] - for report_step in obs_vector.getStepList(): - if report_step == key_report_step: - return obs_key - - raise UserWarning("Observation key for key '%s' not found!" % key) - - - def getAllObsKeysForKey(self, key): - key, report_step = key.split("@") - return self.ert().ensembleConfig().getNode(key).getObservationKeys() - - - def hasData(self, key): - """ @rtype: bool """ - key, report_step = key.split("@") - observations = self.ert().getObservations() - obs_key = self.getObsKeyForKey(key, int(report_step)) - if not observations.hasKey(obs_key): - return False - - return observations[obs_key].getActiveCount() > 0 - - def fetchData(self, key, case=None): - key, report_step = key.split("@") - - key_report_step = int(report_step) - obs_key = self.getObsKeyForKey(key, key_report_step) - - return self.__getObservationData(obs_key, key_report_step) - - - @staticmethod - def adjustY(y, std): - if y >= 0: - return max(0, y - std) - - return y - std diff --git a/ThirdParty/Ert/python/python/ert/enkf/plot/pca_fetcher.py b/ThirdParty/Ert/python/python/ert/enkf/plot/pca_fetcher.py deleted file mode 100644 index adbb256f34..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/plot/pca_fetcher.py +++ /dev/null @@ -1,182 +0,0 @@ -from ert.enkf.plot import DataFetcher, ObservationGenDataFetcher, BlockObservationDataFetcher, EnsembleDataFetcher -from ert.enkf.plot_data import PcaPlotData -from ert.enkf.enums import RealizationStateEnum, EnkfObservationImplementationType -from ert.enkf import LocalObsdata, LocalObsdataNode, EnkfLinalg, MeasData, ObsData -from ert.util import Matrix, BoolVector, DoubleVector - - -class PcaDataFetcher(DataFetcher): - def __init__(self, ert): - super(PcaDataFetcher, self).__init__(ert) - self.__prior_singular_values = None - - def fetchSupportedKeys(self): - summary_keys = EnsembleDataFetcher(self.ert()).getSupportedKeys() - - keys = [] - for key in summary_keys: - obs_keys = self.ert().ensembleConfig().getNode(key).getObservationKeys() - if len(obs_keys) > 0: - keys.append(key) - - keys += BlockObservationDataFetcher(self.ert()).getSupportedKeys() - keys += ObservationGenDataFetcher(self.ert()).getSupportedKeys() - - return keys - - - def truncationOrNumberOfComponents(self, truncation_or_ncomp): - """ @rtype: (float, int) """ - truncation = -1 - ncomp = -1 - - if truncation_or_ncomp < 1: - truncation = truncation_or_ncomp - else: - ncomp = int(truncation_or_ncomp) - - return truncation, ncomp - - - def calculatePrincipalComponent(self, fs, local_obsdata, truncation_or_ncomp=3): - pc = Matrix(1, 1) - pc_obs = Matrix(1, 1) - singular_values = DoubleVector() - - state_map = fs.getStateMap() - ens_mask = BoolVector(False, self.ert().getEnsembleSize()) - state_map.selectMatching(ens_mask, RealizationStateEnum.STATE_HAS_DATA) - active_list = ens_mask.createActiveList( ) - - if len(ens_mask) > 0: - meas_data = MeasData(ens_mask) - obs_data = ObsData() - - self.ert().getObservations().getObservationAndMeasureData(fs, local_obsdata, active_list, meas_data, obs_data) - - meas_data.deactivateZeroStdSamples(obs_data) - - active_size = len(obs_data) - - if active_size > 0: - S = meas_data.createS() - D_obs = obs_data.createDObs() - - truncation, ncomp = self.truncationOrNumberOfComponents(truncation_or_ncomp) - - obs_data.scale(S, D_obs=D_obs) - EnkfLinalg.calculatePrincipalComponents(S, D_obs, truncation, ncomp, pc, pc_obs, singular_values) - if self.__prior_singular_values is None: - self.__prior_singular_values = singular_values - else: - for row in range(pc.rows()): - factor = singular_values[row]/self.__prior_singular_values[row] - pc.scaleRow( row , factor ) - pc_obs.scaleRow( row , factor ) - - - return PcaPlotData(local_obsdata.getName(), pc , pc_obs , singular_values) - return None - - - - def getAllObsKeys(self): - observations = self.ert().getObservations() - summary_obs_keys = observations.getTypedKeylist(EnkfObservationImplementationType.SUMMARY_OBS) - gen_data_obs_keys = observations.getTypedKeylist(EnkfObservationImplementationType.GEN_OBS) - block_obs_keys = observations.getTypedKeylist(EnkfObservationImplementationType.BLOCK_OBS) - - summary_obs_keys = [key for key in summary_obs_keys] - gen_data_obs_keys = [key for key in gen_data_obs_keys] - block_obs_keys = [key for key in block_obs_keys] - - return summary_obs_keys + gen_data_obs_keys + block_obs_keys - - - def getObsKeys(self, data_key): - ensemble_data_fetcher = EnsembleDataFetcher(self.ert()) - block_observation_data_fetcher = BlockObservationDataFetcher(self.ert()) - gen_data_observation_data_fetcher = ObservationGenDataFetcher(self.ert()) - - if ensemble_data_fetcher.supportsKey(data_key): - return self.ert().ensembleConfig().getNode(data_key).getObservationKeys() - elif block_observation_data_fetcher.supportsKey(data_key): - return [data_key] - elif gen_data_observation_data_fetcher.supportsKey(data_key): - return gen_data_observation_data_fetcher.getAllObsKeysForKey(data_key) - - - def filterObsKeys(self, obs_keys, fs): - active_mask = BoolVector(True, self.ert().getEnsembleSize()) - ert_obs = self.ert().getObservations() - - result = [] - for obs_key in obs_keys: - obsVector = ert_obs[obs_key] - if obsVector.hasData(active_mask, fs): - result.append(obs_key) - return result - - - def fetchData(self, obs_keys, case=None): - data = {"x": None, - "y": None, - "obs_y": None, - "min_y": None, - "max_y": None, - "min_x": None, - "max_x": None} - - fs = self.ert().getEnkfFsManager().getFileSystem(case) - obs_keys = self.filterObsKeys(obs_keys, fs) - - step_1 = 0 - step_2 = self.ert().getHistoryLength() - - local_obsdata = LocalObsdata("PCA Observations %s" % case) - - for obs_key in obs_keys: - if not obs_key in local_obsdata: - obs_node = LocalObsdataNode(obs_key) - obs_node.addRange(step_1, step_2) - local_obsdata.addNode(obs_node) - - if len(local_obsdata) > 0: - pca_data = self.calculatePrincipalComponent(fs, local_obsdata) - - if pca_data is not None: - data["x"] = [] - data["y"] = [] - data["obs_y"] = [] - - data["min_x"] = 1 - data["max_x"] = len(pca_data) - - component_number = 0 - for pca_vector in pca_data: - component_number += 1 - data["x"].append(component_number) - - obs_y = pca_vector.getObservation() - - if data["min_y"] is None or data["min_y"] > obs_y: - data["min_y"] = obs_y - - if data["max_y"] is None or data["max_y"] < obs_y: - data["max_y"] = obs_y - - data["obs_y"].append(obs_y) - for index, value in enumerate(pca_vector): - if len(data["y"]) == index: - data["y"].append([]) - - y = data["y"][index] - y.append(value) - - if data["min_y"] is None or data["min_y"] > value: - data["min_y"] = value - - if data["max_y"] is None or data["max_y"] < value: - data["max_y"] = value - - return data diff --git a/ThirdParty/Ert/python/python/ert/enkf/plot/refcase_data_fetcher.py b/ThirdParty/Ert/python/python/ert/enkf/plot/refcase_data_fetcher.py deleted file mode 100644 index cc4d1ce158..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/plot/refcase_data_fetcher.py +++ /dev/null @@ -1,81 +0,0 @@ -from ert.ecl import EclSum, EclSumVector, EclSumNode -from ert.enkf.enums import ErtImplType -from ert.enkf.plot.data_fetcher import DataFetcher - - -class RefcaseDataFetcher(DataFetcher): - def __init__(self, ert): - super(RefcaseDataFetcher, self).__init__(ert) - self.report_times = {} - - - def hasRefcase(self): - """ @rtype: bool """ - return self.ert().eclConfig().hasRefcase() - - def getRefCase(self): - """ @rtype: EclSum """ - return self.ert().eclConfig().getRefcase() - - def getSummaryKeys(self): - """ @rtype: StringList """ - return self.ert().ensembleConfig().getKeylistFromImplType(ErtImplType.SUMMARY) - - - def fetchData(self, key, case=None): - data = {"x": None, - "y": None, - "min_y": None, - "max_y": None, - "min_x": None, - "max_x": None} - - if not self.hasRefcase(): - return data - - - refcase = self.getRefCase() - vector = refcase.get_vector(key, report_only=False) - - data["x"] = [] - data["y"] = [] - - for index in range(1, len(vector)): - node = vector[index] - - x_value = self.getReportStepTimeFromRefcase(refcase, node.report_step) - data["x"].append(int(x_value)) - - if data["min_x"] is None or data["min_x"] > x_value: - data["min_x"] = x_value - - if data["max_x"] is None or data["max_x"] < x_value: - data["max_x"] = x_value - - - value = node.value - data["y"].append(float(value)) - - if data["min_y"] is None or data["min_y"] > value: - data["min_y"] = value - - if data["max_y"] is None or data["max_y"] < value: - data["max_y"] = value - - return data - - - def getReportStepTimeFromRefcase(self, refcase, report_step): - if not report_step in self.report_times: - self.report_times[report_step] = EclSum.cNamespace().get_report_time(refcase, report_step).ctime() - - return self.report_times[report_step] - - - - - - - - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/plot_config.py b/ThirdParty/Ert/python/python/ert/enkf/plot_config.py deleted file mode 100644 index 6ff072a709..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/plot_config.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'plot_config.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB - - -class PlotConfig(BaseCClass): - def __init__(self): - raise NotImplementedError("Class can not be instantiated directly!") - - def getPath(self): - """ @rtype: str """ - return PlotConfig.cNamespace().get_path(self) - - def setPath(self, path): - PlotConfig.cNamespace().set_path(self, path) - - def free(self): - PlotConfig.cNamespace().free(self) - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerType("plot_config", PlotConfig) -cwrapper.registerType("plot_config_obj", PlotConfig.createPythonObject) -cwrapper.registerType("plot_config_ref", PlotConfig.createCReference) - -PlotConfig.cNamespace().free = cwrapper.prototype("void plot_config_free( plot_config )") -PlotConfig.cNamespace().get_path = cwrapper.prototype("char* plot_config_get_path(plot_config)") -PlotConfig.cNamespace().set_path = cwrapper.prototype("void plot_config_set_path(plot_config, char*)") - diff --git a/ThirdParty/Ert/python/python/ert/enkf/plot_data/CMakeLists.txt b/ThirdParty/Ert/python/python/ert/enkf/plot_data/CMakeLists.txt deleted file mode 100644 index b56289400e..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/plot_data/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - ensemble_plot_data.py - ensemble_plot_data_vector.py - ensemble_plot_gen_data.py - ensemble_plot_gen_data_vector.py - ensemble_plot_gen_kw.py - ensemble_plot_gen_kw_vector.py - pca_plot_data.py - pca_plot_vector.py - plot_block_data.py - plot_block_data_loader.py - plot_block_vector.py -) - -add_python_package("python.ert.enkf.plot_data" ${PYTHON_INSTALL_PREFIX}/ert/enkf/plot_data "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert/enkf/plot_data/__init__.py b/ThirdParty/Ert/python/python/ert/enkf/plot_data/__init__.py deleted file mode 100644 index 5e957583af..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/plot_data/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -from .ensemble_plot_data_vector import EnsemblePlotDataVector -from .ensemble_plot_data import EnsemblePlotData -from .plot_block_vector import PlotBlockVector -from .plot_block_data import PlotBlockData -from .plot_block_data_loader import PlotBlockDataLoader -from .ensemble_plot_gen_data_vector import EnsemblePlotGenDataVector -from .ensemble_plot_gen_data import EnsemblePlotGenData -from .ensemble_plot_gen_kw_vector import EnsemblePlotGenKWVector -from .ensemble_plot_gen_kw import EnsemblePlotGenKW -from .pca_plot_vector import PcaPlotVector -from .pca_plot_data import PcaPlotData - diff --git a/ThirdParty/Ert/python/python/ert/enkf/plot_data/ensemble_plot_data.py b/ThirdParty/Ert/python/python/ert/enkf/plot_data/ensemble_plot_data.py deleted file mode 100644 index f8e09051ef..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/plot_data/ensemble_plot_data.py +++ /dev/null @@ -1,57 +0,0 @@ -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB -from ert.enkf.config import EnkfConfigNode -from ert.enkf.enkf_fs import EnkfFs -from ert.util import BoolVector - - -class EnsemblePlotData(BaseCClass): - def __init__(self, ensemble_config_node, file_system=None, user_index=None, input_mask=None): - assert isinstance(ensemble_config_node, EnkfConfigNode) - - c_pointer = EnsemblePlotData.cNamespace().alloc(ensemble_config_node) - super(EnsemblePlotData, self).__init__(c_pointer) - - if not file_system is None: - self.load(file_system, user_index, input_mask) - - - def load(self, file_system, user_index=None, input_mask=None): - assert isinstance(file_system, EnkfFs) - if not input_mask is None: - assert isinstance(input_mask, BoolVector) - - EnsemblePlotData.cNamespace().load(self, file_system, user_index, input_mask) - - def __len__(self): - """ @rtype: int """ - return EnsemblePlotData.cNamespace().size(self) - - def __getitem__(self, index): - """ @rtype: EnsemblePlotDataVector """ - return EnsemblePlotData.cNamespace().get(self, index) - - def __iter__(self): - cur = 0 - while cur < len(self): - yield self[cur] - cur += 1 - - - def free(self): - EnsemblePlotData.cNamespace().free(self) - - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerType("ensemble_plot_data", EnsemblePlotData) -cwrapper.registerType("ensemble_plot_data_obj", EnsemblePlotData.createPythonObject) -cwrapper.registerType("ensemble_plot_data_ref", EnsemblePlotData.createCReference) - -EnsemblePlotData.cNamespace().free = cwrapper.prototype("void enkf_plot_data_free(ensemble_plot_data)") -EnsemblePlotData.cNamespace().alloc = cwrapper.prototype("c_void_p enkf_plot_data_alloc(enkf_config_node)") -EnsemblePlotData.cNamespace().load = cwrapper.prototype("void enkf_plot_data_load(ensemble_plot_data, enkf_fs, char*, bool_vector)") -EnsemblePlotData.cNamespace().size = cwrapper.prototype("int enkf_plot_data_get_size(ensemble_plot_data)") -EnsemblePlotData.cNamespace().get = cwrapper.prototype("ensemble_plot_data_vector_ref enkf_plot_data_iget(ensemble_plot_data, int)") - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/plot_data/ensemble_plot_data_vector.py b/ThirdParty/Ert/python/python/ert/enkf/plot_data/ensemble_plot_data_vector.py deleted file mode 100644 index fc7849fa28..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/plot_data/ensemble_plot_data_vector.py +++ /dev/null @@ -1,37 +0,0 @@ -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB -from ert.util import CTime - - - -class EnsemblePlotDataVector(BaseCClass): - def __init__(self): - raise NotImplementedError("Class can not be instantiated directly!") - - def __len__(self): - """ @rtype: int """ - return EnsemblePlotDataVector.cNamespace().size(self) - - def getValue(self, index): - """ @rtype: float """ - return EnsemblePlotDataVector.cNamespace().get_value(self, index) - - def getTime(self, index): - """ @rtype: CTime """ - return EnsemblePlotDataVector.cNamespace().get_time(self, index) - - def isActive(self, index): - """ @rtype: bool """ - return EnsemblePlotDataVector.cNamespace().is_active(self, index) - - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerType("ensemble_plot_data_vector", EnsemblePlotDataVector) -cwrapper.registerType("ensemble_plot_data_vector_obj", EnsemblePlotDataVector.createPythonObject) -cwrapper.registerType("ensemble_plot_data_vector_ref", EnsemblePlotDataVector.createCReference) - -EnsemblePlotDataVector.cNamespace().size = cwrapper.prototype("int enkf_plot_tvector_size(ensemble_plot_data_vector)") -EnsemblePlotDataVector.cNamespace().get_value = cwrapper.prototype("double enkf_plot_tvector_iget_value(ensemble_plot_data_vector, int)") -EnsemblePlotDataVector.cNamespace().get_time = cwrapper.prototype("time_t enkf_plot_tvector_iget_time(ensemble_plot_data_vector, int)") -EnsemblePlotDataVector.cNamespace().is_active = cwrapper.prototype("bool enkf_plot_tvector_iget_active(ensemble_plot_data_vector, int)") diff --git a/ThirdParty/Ert/python/python/ert/enkf/plot_data/ensemble_plot_gen_data.py b/ThirdParty/Ert/python/python/ert/enkf/plot_data/ensemble_plot_gen_data.py deleted file mode 100644 index 9cc41b6945..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/plot_data/ensemble_plot_gen_data.py +++ /dev/null @@ -1,88 +0,0 @@ -# Copyright (C) 2014 Statoil ASA, Norway. -# -# The file 'ensemble_plot_gen_data.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB -from ert.enkf.config import EnkfConfigNode -from ert.enkf.enkf_fs import EnkfFs -from ert.enkf.enums.ert_impl_type_enum import ErtImplType -from ert.util import BoolVector, DoubleVector - - -class EnsemblePlotGenData(BaseCClass): - def __init__(self, ensemble_config_node, file_system, report_step, input_mask=None): - assert isinstance(ensemble_config_node, EnkfConfigNode) - assert ensemble_config_node.getImplementationType() == ErtImplType.GEN_DATA - - c_pointer = EnsemblePlotGenData.cNamespace().alloc(ensemble_config_node) - super(EnsemblePlotGenData, self).__init__(c_pointer) - - self.__load(file_system, report_step, input_mask) - - - def __load(self, file_system, report_step, input_mask=None): - assert isinstance(file_system, EnkfFs) - if not input_mask is None: - assert isinstance(input_mask, BoolVector) - - EnsemblePlotGenData.cNamespace().load(self, file_system, report_step, input_mask) - - def __len__(self): - """ @rtype: int """ - return EnsemblePlotGenData.cNamespace().size(self) - - def __getitem__(self, index): - """ @rtype: EnsemblePlotGenDataVector """ - return EnsemblePlotGenData.cNamespace().get(self, index) - - def __iter__(self): - cur = 0 - while cur < len(self): - yield self[cur] - cur += 1 - - - def getMaxValues(self): - """ @rtype: DoubleVector """ - return EnsemblePlotGenData.cNamespace().max_values(self).setParent(self) - - def getMinValues(self): - """ @rtype: DoubleVector """ - return EnsemblePlotGenData.cNamespace().min_values(self).setParent(self) - - def free(self): - EnsemblePlotGenData.cNamespace().free(self) - - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerType("ensemble_plot_gen_data", EnsemblePlotGenData) -cwrapper.registerType("ensemble_plot_gen_data_obj", EnsemblePlotGenData.createPythonObject) -cwrapper.registerType("ensemble_plot_gen_data_ref", EnsemblePlotGenData.createCReference) - -EnsemblePlotGenData.cNamespace().free = cwrapper.prototype("void enkf_plot_gendata_free(ensemble_plot_gen_data)") -EnsemblePlotGenData.cNamespace().alloc = cwrapper.prototype("c_void_p enkf_plot_gendata_alloc(enkf_config_node)") - -EnsemblePlotGenData.cNamespace().size = cwrapper.prototype("int enkf_plot_gendata_get_size(ensemble_plot_gen_data)") -EnsemblePlotGenData.cNamespace().load = cwrapper.prototype("void enkf_plot_gendata_load(ensemble_plot_gen_data, enkf_fs, int, bool_vector)") -EnsemblePlotGenData.cNamespace().get = cwrapper.prototype("ensemble_plot_gen_data_vector_ref enkf_plot_gendata_iget(ensemble_plot_gen_data, int)") - -EnsemblePlotGenData.cNamespace().min_values = cwrapper.prototype("double_vector_ref enkf_plot_gendata_get_min_values(ensemble_plot_gen_data)") -EnsemblePlotGenData.cNamespace().max_values = cwrapper.prototype("double_vector_ref enkf_plot_gendata_get_max_values(ensemble_plot_gen_data)") - - - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/plot_data/ensemble_plot_gen_data_vector.py b/ThirdParty/Ert/python/python/ert/enkf/plot_data/ensemble_plot_gen_data_vector.py deleted file mode 100644 index 05adb8fc42..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/plot_data/ensemble_plot_gen_data_vector.py +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright (C) 2014 Statoil ASA, Norway. -# -# The file 'ensemble_plot_gen_data_vector.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB - -class EnsemblePlotGenDataVector(BaseCClass): - def __init__(self): - raise NotImplementedError("Class can not be instantiated directly!") - - def __len__(self): - """ @rtype: int """ - return EnsemblePlotGenDataVector.cNamespace().size(self) - - def getValue(self, index): - """ @rtype: float """ - return self[index] - - def __iter__(self): - cur = 0 - while cur < len(self): - yield self[cur] - cur += 1 - - def __getitem__(self, index): - """ @rtype: float """ - return EnsemblePlotGenDataVector.cNamespace().get_value(self, index) - - - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerType("ensemble_plot_gen_data_vector", EnsemblePlotGenDataVector) -cwrapper.registerType("ensemble_plot_gen_data_vector_obj", EnsemblePlotGenDataVector.createPythonObject) -cwrapper.registerType("ensemble_plot_gen_data_vector_ref", EnsemblePlotGenDataVector.createCReference) - -EnsemblePlotGenDataVector.cNamespace().size = cwrapper.prototype("int enkf_plot_genvector_get_size(ensemble_plot_gen_data_vector)") -EnsemblePlotGenDataVector.cNamespace().get_value = cwrapper.prototype("double enkf_plot_genvector_iget(ensemble_plot_gen_data_vector, int)") - diff --git a/ThirdParty/Ert/python/python/ert/enkf/plot_data/ensemble_plot_gen_kw.py b/ThirdParty/Ert/python/python/ert/enkf/plot_data/ensemble_plot_gen_kw.py deleted file mode 100644 index 43d7c45ced..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/plot_data/ensemble_plot_gen_kw.py +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright (C) 2014 Statoil ASA, Norway. -# -# The file 'ensemble_plot_gen_kw.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB -from ert.enkf.config import EnkfConfigNode -from ert.enkf.enkf_fs import EnkfFs -from ert.enkf.enums.ert_impl_type_enum import ErtImplType -from ert.util import BoolVector -from ert.enkf.plot_data import EnsemblePlotGenKWVector - - -class EnsemblePlotGenKW(BaseCClass): - def __init__(self, ensemble_config_node, file_system, input_mask=None): - assert isinstance(ensemble_config_node, EnkfConfigNode) - assert ensemble_config_node.getImplementationType() == ErtImplType.GEN_KW - - c_pointer = EnsemblePlotGenKW.cNamespace().alloc(ensemble_config_node) - super(EnsemblePlotGenKW, self).__init__(c_pointer) - - self.__load(file_system, input_mask) - - - def __load(self, file_system, input_mask=None): - assert isinstance(file_system, EnkfFs) - if not input_mask is None: - assert isinstance(input_mask, BoolVector) - - EnsemblePlotGenKW.cNamespace().load(self, file_system, True, 0, input_mask) - - def __len__(self): - """ @rtype: int """ - return EnsemblePlotGenKW.cNamespace().size(self) - - def __getitem__(self, index): - """ @rtype: EnsemblePlotGenKWVector """ - return EnsemblePlotGenKW.cNamespace().get(self, index) - - def __iter__(self): - cur = 0 - while cur < len(self): - yield self[cur] - cur += 1 - - def getKeyWordCount(self): - """ @rtype: int """ - return EnsemblePlotGenKW.cNamespace().get_keyword_count(self) - - def getKeyWordForIndex(self, index): - """ @rtype: str """ - return EnsemblePlotGenKW.cNamespace().iget_key(self, index) - - def getIndexForKeyword(self, keyword): - """ @rtype: int """ - for index in range(self.getKeyWordCount()): - kw = self.getKeyWordForIndex(index) - if kw == keyword: - return index - return None - - def shouldUseLogScale(self, index): - """ @rtype: bool """ - return bool(EnsemblePlotGenKW.cNamespace().should_use_log_scale(self, index)) - - def free(self): - EnsemblePlotGenKW.cNamespace().free(self) - - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerType("ensemble_plot_gen_kw", EnsemblePlotGenKW) -cwrapper.registerType("ensemble_plot_gen_kw_obj", EnsemblePlotGenKW.createPythonObject) -cwrapper.registerType("ensemble_plot_gen_kw_ref", EnsemblePlotGenKW.createCReference) - -EnsemblePlotGenKW.cNamespace().free = cwrapper.prototype("void enkf_plot_gen_kw_free(ensemble_plot_gen_kw)") -EnsemblePlotGenKW.cNamespace().alloc = cwrapper.prototype("c_void_p enkf_plot_gen_kw_alloc(enkf_config_node)") - -EnsemblePlotGenKW.cNamespace().size = cwrapper.prototype("int enkf_plot_gen_kw_get_size(ensemble_plot_gen_kw)") -EnsemblePlotGenKW.cNamespace().load = cwrapper.prototype("void enkf_plot_gen_kw_load(ensemble_plot_gen_kw, enkf_fs, bool, int, bool_vector)") -EnsemblePlotGenKW.cNamespace().get = cwrapper.prototype("ensemble_plot_gen_kw_vector_ref enkf_plot_gen_kw_iget(ensemble_plot_gen_kw, int)") -EnsemblePlotGenKW.cNamespace().iget_key = cwrapper.prototype("char* enkf_plot_gen_kw_iget_key(ensemble_plot_gen_kw, int)") -EnsemblePlotGenKW.cNamespace().get_keyword_count = cwrapper.prototype("int enkf_plot_gen_kw_get_keyword_count(ensemble_plot_gen_kw)") -EnsemblePlotGenKW.cNamespace().should_use_log_scale = cwrapper.prototype("bool enkf_plot_gen_kw_should_use_log_scale(ensemble_plot_gen_kw, int)") - - - - - - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/plot_data/ensemble_plot_gen_kw_vector.py b/ThirdParty/Ert/python/python/ert/enkf/plot_data/ensemble_plot_gen_kw_vector.py deleted file mode 100644 index 03ddfa2b0b..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/plot_data/ensemble_plot_gen_kw_vector.py +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright (C) 2014 Statoil ASA, Norway. -# -# The file 'ensemble_plot_gen_kw_vector.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB - -class EnsemblePlotGenKWVector(BaseCClass): - def __init__(self): - raise NotImplementedError("Class can not be instantiated directly!") - - def __len__(self): - """ @rtype: int """ - return EnsemblePlotGenKWVector.cNamespace().size(self) - - def getValue(self, index): - """ @rtype: float """ - return self[index] - - def __iter__(self): - cur = 0 - while cur < len(self): - yield self[cur] - cur += 1 - - def __getitem__(self, index): - """ @rtype: float """ - return EnsemblePlotGenKWVector.cNamespace().get_value(self, index) - - - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerType("ensemble_plot_gen_kw_vector", EnsemblePlotGenKWVector) -cwrapper.registerType("ensemble_plot_gen_kw_vector_obj", EnsemblePlotGenKWVector.createPythonObject) -cwrapper.registerType("ensemble_plot_gen_kw_vector_ref", EnsemblePlotGenKWVector.createCReference) - -EnsemblePlotGenKWVector.cNamespace().size = cwrapper.prototype("int enkf_plot_gen_kw_vector_get_size(ensemble_plot_gen_kw_vector)") -EnsemblePlotGenKWVector.cNamespace().get_value = cwrapper.prototype("double enkf_plot_gen_kw_vector_iget(ensemble_plot_gen_kw_vector, int)") - diff --git a/ThirdParty/Ert/python/python/ert/enkf/plot_data/pca_plot_data.py b/ThirdParty/Ert/python/python/ert/enkf/plot_data/pca_plot_data.py deleted file mode 100644 index ab144dea28..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/plot_data/pca_plot_data.py +++ /dev/null @@ -1,55 +0,0 @@ -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB -from ert.util import Matrix -from ert.enkf.plot_data import PcaPlotVector - - -class PcaPlotData(BaseCClass): - - def __init__(self, name, principal_component_matrix, observation_principal_component_matrix, singular_values): - assert isinstance(name, str) - assert isinstance(principal_component_matrix, Matrix) - assert isinstance(observation_principal_component_matrix, Matrix) - - c_pointer = PcaPlotData.cNamespace().alloc(name, principal_component_matrix, observation_principal_component_matrix , singular_values) - super(PcaPlotData, self).__init__(c_pointer) - - - def __len__(self): - """ @rtype: int """ - return PcaPlotData.cNamespace().component_count(self) - - - def __getitem__(self, index): - """ @rtype: PcaPlotVector """ - assert isinstance(index, int) - return PcaPlotData.cNamespace().get(self, index).setParent(self) - - def __iter__(self): - cur = 0 - while cur < len(self): - yield self[cur] - cur += 1 - - def getSingularValues(self): - """ @rtype: DoubleVector """ - return PcaPlotData.cNamespace().get_singular_values(self).setParent(self) - - def free(self): - PcaPlotData.cNamespace().free(self) - - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerType("pca_plot_data", PcaPlotData) -cwrapper.registerType("pca_plot_data_obj", PcaPlotData.createPythonObject) -cwrapper.registerType("pca_plot_data_ref", PcaPlotData.createCReference) - -PcaPlotData.cNamespace().alloc = cwrapper.prototype("c_void_p pca_plot_data_alloc(char*, matrix, matrix , double_vector)") -PcaPlotData.cNamespace().free = cwrapper.prototype("void pca_plot_data_free(pca_plot_data)") - -PcaPlotData.cNamespace().component_count = cwrapper.prototype("int pca_plot_data_get_size(pca_plot_data)") -PcaPlotData.cNamespace().realization_count = cwrapper.prototype("int pca_plot_data_get_ens_size(pca_plot_data)") -PcaPlotData.cNamespace().get = cwrapper.prototype("pca_plot_vector_ref pca_plot_data_iget_vector(pca_plot_data, int)") -PcaPlotData.cNamespace().get_name = cwrapper.prototype("char* pca_plot_data_get_name(pca_plot_data)") -PcaPlotData.cNamespace().get_singular_values = cwrapper.prototype("double_vector_ref pca_plot_data_get_singular_values(pca_plot_data)") diff --git a/ThirdParty/Ert/python/python/ert/enkf/plot_data/pca_plot_vector.py b/ThirdParty/Ert/python/python/ert/enkf/plot_data/pca_plot_vector.py deleted file mode 100644 index 88f20d777a..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/plot_data/pca_plot_vector.py +++ /dev/null @@ -1,62 +0,0 @@ -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB -from ert.util import Matrix - - -class PcaPlotVector(BaseCClass): - - def __init__(self, component, principal_component_matrix, observation_principal_component_matrix): - assert isinstance(component, int) - assert isinstance(principal_component_matrix, Matrix) - assert isinstance(observation_principal_component_matrix, Matrix) - - c_pointer = PcaPlotVector.cNamespace().alloc(component, principal_component_matrix, observation_principal_component_matrix) - super(PcaPlotVector, self).__init__(c_pointer) - - - def __len__(self): - """ @rtype: int """ - return PcaPlotVector.cNamespace().size(self) - - - def __getitem__(self, index): - """ - @type index: int - @rtype: float - """ - assert isinstance(index, int) - return PcaPlotVector.cNamespace().get(self, index) - - def __iter__(self): - cur = 0 - while cur < len(self): - yield self[cur] - cur += 1 - - def getObservation(self): - """ @rtype: float """ - return PcaPlotVector.cNamespace().get_obs(self) - - def getSingularValue(self): - """ @rtype: float """ - return PcaPlotVector.cNamespace().get_singular_value(self) - - - def free(self): - PcaPlotVector.cNamespace().free(self) - - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerType("pca_plot_vector", PcaPlotVector) -cwrapper.registerType("pca_plot_vector_obj", PcaPlotVector.createPythonObject) -cwrapper.registerType("pca_plot_vector_ref", PcaPlotVector.createCReference) - -PcaPlotVector.cNamespace().alloc = cwrapper.prototype("c_void_p pca_plot_vector_alloc(int, matrix, matrix)") -PcaPlotVector.cNamespace().free = cwrapper.prototype("void pca_plot_vector_free(pca_plot_vector)") -PcaPlotVector.cNamespace().size = cwrapper.prototype("int pca_plot_vector_get_size(pca_plot_vector)") -PcaPlotVector.cNamespace().get = cwrapper.prototype("double pca_plot_vector_iget_sim_value(pca_plot_vector, int)") -PcaPlotVector.cNamespace().get_obs = cwrapper.prototype("double pca_plot_vector_get_obs_value(pca_plot_vector)") -PcaPlotVector.cNamespace().get_singular_value = cwrapper.prototype("double pca_plot_vector_get_singular_value(pca_plot_vector)") - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/plot_data/plot_block_data.py b/ThirdParty/Ert/python/python/ert/enkf/plot_data/plot_block_data.py deleted file mode 100644 index 1e270aa954..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/plot_data/plot_block_data.py +++ /dev/null @@ -1,44 +0,0 @@ -from ert.enkf.plot_data import PlotBlockVector -from ert.util import DoubleVector - - -class PlotBlockData(object): - - def __init__(self, depth_vector): - """ - @type depth_vector: DoubleVector - """ - assert isinstance(depth_vector, DoubleVector) - self.__depth_vector = depth_vector - self.__plot_block_vectors = {} - - - def __len__(self): - """ @rtype: int """ - return len(self.__plot_block_vectors) - - - def __getitem__(self, index): - """ - @type index: int - @rtype: PlotBlockVector - """ - return self.__plot_block_vectors[index] - - def __iter__(self): - cur = 0 - keys = sorted(self.__plot_block_vectors.keys()) - while cur < len(keys): - yield self[keys[cur]] - cur += 1 - - def getDepth(self): - """ @rtype: DoubleVector """ - return self.__depth_vector - - - def addPlotBlockVector(self, vector): - """ - @type vector: PlotBlockVector - """ - self.__plot_block_vectors[vector.getRealizationNumber()] = vector diff --git a/ThirdParty/Ert/python/python/ert/enkf/plot_data/plot_block_data_loader.py b/ThirdParty/Ert/python/python/ert/enkf/plot_data/plot_block_data_loader.py deleted file mode 100644 index d6f3283337..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/plot_data/plot_block_data_loader.py +++ /dev/null @@ -1,96 +0,0 @@ -from ert.enkf import RealizationStateEnum, EnkfNode, ErtImplType, NodeId -from ert.enkf.plot_data import PlotBlockData, PlotBlockVector -from ert.util import DoubleVector, BoolVector, ThreadPool - - -class PlotBlockDataLoader(object): - - def __init__(self, obs_vector): - """ - @type obs_vector: ObsVector - """ - super(PlotBlockDataLoader, self).__init__() - self.__obs_vector = obs_vector - self.__permutation_vector = None - - - def getBlockObservation(self, report_step): - """ @rtype: BlockObservation """ - return self.__obs_vector.getNode(report_step) - - - def getDepthValues(self, report_step): - """ @rtype: DoubleVector """ - block_obs = self.getBlockObservation(report_step) - - depth = DoubleVector() - for index in block_obs: - value = block_obs.getDepth(index) - depth.append(value) - - return depth - - - def load(self, fs, report_step, input_mask=None): - """ - @type fs: EnkfFs - @type report_step: int - @type input_mask: BoolVector - @rtype: PlotBlockData - """ - - state_map = fs.getStateMap() - ensemble_size = len(state_map) - - if not input_mask is None: - mask = BoolVector.copy(input_mask) - else: - mask = BoolVector(False, ensemble_size) - - state_map.selectMatching(mask, RealizationStateEnum.STATE_HAS_DATA) - - depth = self.getDepthValues(report_step) - - self.__permutation_vector = depth.permutationSort() - depth.permute(self.__permutation_vector) - - plot_block_data = PlotBlockData(depth) - - thread_pool = ThreadPool() - for index in range(ensemble_size): - if mask[index]: - thread_pool.addTask(self.loadVector, plot_block_data, fs, report_step, index) - - thread_pool.nonBlockingStart() - thread_pool.join() - - return plot_block_data - - - def loadVector(self, plot_block_data, fs, report_step, realization_number): - """ - @type plot_block_data: PlotBlockData - @type fs: EnkfFs - @type report_step: int - @type realization_number: int - @rtype PlotBlockVector - """ - config_node = self.__obs_vector.getConfigNode() - - is_private_container = config_node.getImplementationType() == ErtImplType.CONTAINER - data_node = EnkfNode(config_node, private=is_private_container) - - node_id = NodeId(report_step, realization_number) - - if data_node.tryLoad(fs, node_id): - block_obs = self.getBlockObservation(report_step) - - data = DoubleVector() - for index in range(len(block_obs)): - value = block_obs.getData(data_node.valuePointer(), index, node_id) - data.append(value) - data.permute(self.__permutation_vector) - - plot_block_vector = PlotBlockVector(realization_number, data) - plot_block_data.addPlotBlockVector(plot_block_vector) - diff --git a/ThirdParty/Ert/python/python/ert/enkf/plot_data/plot_block_vector.py b/ThirdParty/Ert/python/python/ert/enkf/plot_data/plot_block_vector.py deleted file mode 100644 index 855bdbb8a1..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/plot_data/plot_block_vector.py +++ /dev/null @@ -1,39 +0,0 @@ -from ert.util import DoubleVector - - -class PlotBlockVector(object): - def __init__(self, realization_number, data): - """ - @type realization_number: int - @type data: DoubleVector - """ - super(PlotBlockVector, self).__init__() - - assert isinstance(data, DoubleVector) - - self.__realization_number = realization_number - self.__data = data - - def __len__(self): - """ @rtype: int """ - return len(self.__data) - - - def __getitem__(self, index): - """ @rtype: float """ - assert isinstance(index, int) - return self.__data[index] - - - def __iter__(self): - """ @rtype: float """ - cur = 0 - while cur < len(self): - yield self[cur] - cur += 1 - - - def getRealizationNumber(self): - """ @rtype: int """ - return self.__realization_number - diff --git a/ThirdParty/Ert/python/python/ert/enkf/run_arg.py b/ThirdParty/Ert/python/python/ert/enkf/run_arg.py deleted file mode 100644 index 38bfd129f4..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/run_arg.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (C) 2014 Statoil ASA, Norway. -# -# The file 'run_arg.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - - -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB - - -class RunArg(BaseCClass): - def __init__(self): - raise NotImplementedError("Class can not be instantiated directly") - - @classmethod - def createEnsembleExperimentRunArg(cls, fs, iens, runpath, iter=0): - return RunArg.cNamespace().alloc_ENSEMBLE_EXPERIMENT(fs, iens, iter, runpath) - - def free(self): - RunArg.cNamespace().free(self) - - def getQueueIndex(self): - return RunArg.cNamespace().get_queue_index(self) - - def isSubmitted(self): - return RunArg.cNamespace().is_submitted(self) - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("run_arg", RunArg) - -RunArg.cNamespace().alloc_ENSEMBLE_EXPERIMENT = cwrapper.prototype("run_arg_obj run_arg_alloc_ENSEMBLE_EXPERIMENT(enkf_fs , int, int, char*)") -RunArg.cNamespace().free = cwrapper.prototype("void run_arg_free(run_arg)") -RunArg.cNamespace().get_queue_index = cwrapper.prototype("int run_arg_get_queue_index(run_arg)") -RunArg.cNamespace().is_submitted = cwrapper.prototype("bool run_arg_is_submitted(run_arg)") diff --git a/ThirdParty/Ert/python/python/ert/enkf/runpath_list.py b/ThirdParty/Ert/python/python/ert/enkf/runpath_list.py deleted file mode 100644 index 7f92c3cff5..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/runpath_list.py +++ /dev/null @@ -1,75 +0,0 @@ -from collections import namedtuple -from cwrap import BaseCClass -from ert.enkf import EnkfPrototype - -RunpathNode = namedtuple("RunpathNode", ["realization", "iteration", "runpath", "basename"]) - -class RunpathList(BaseCClass): - TYPE_NAME = "runpath_list" - _alloc = EnkfPrototype("void* runpath_list_alloc(char*)" , bind = False) - _free = EnkfPrototype("void runpath_list_free(runpath_list)") - _add = EnkfPrototype("void runpath_list_add(runpath_list, int, int, char*, char*)") - _clear = EnkfPrototype("void runpath_list_clear(runpath_list)") - _size = EnkfPrototype("int runpath_list_size(runpath_list)") - _iens = EnkfPrototype("int runpath_list_iget_iens(runpath_list, int)") - _iteration = EnkfPrototype("int runpath_list_iget_iter(runpath_list, int)") - _runpath = EnkfPrototype("char* runpath_list_iget_runpath(runpath_list, int)") - _basename = EnkfPrototype("char* runpath_list_iget_basename(runpath_list, int)") - _export = EnkfPrototype("void runpath_list_fprintf(runpath_list)") - - _get_export_file = EnkfPrototype("char* runpath_list_get_export_file(runpath_list)") - _set_export_file = EnkfPrototype("void runpath_list_set_export_file(runpath_list, char*)") - - def __init__(self, export_file): - c_ptr = self._alloc( export_file ) - super(RunpathList , self).__init__(c_ptr) - - def __len__(self): - return self._size( ) - - def __getitem__(self, index): - """ @rtype: RunpathNode """ - if not 0 <= index < len(self): - raise IndexError("Index not in range: 0 <= %d < %d" % (index, len(self))) - - realization = self._iens(index) - iteration = self._iteration(index) - runpath = self._runpath(index) - basename = self._basename(index) - - return RunpathNode(realization, iteration, runpath, basename) - - def __iter__(self): - index = 0 - while index < len(self): - yield self[index] - index += 1 - - def getExportFile(self): - return self._get_export_file( ) - - - def setExportFile(self , export_file): - self._set_export_file( export_file ) - - - def add(self, realization_number, iteration_number, runpath, basename): - """ - @type realization_number: int - @type iteration_number: int - @type runpath: int - @type basename: int - """ - self._add(realization_number, iteration_number, runpath, basename) - - def clear(self): - self._clear( ) - - - def free(self): - self._free( ) - - - def export(self): - self._export( ) - diff --git a/ThirdParty/Ert/python/python/ert/enkf/site_config.py b/ThirdParty/Ert/python/python/ert/enkf/site_config.py deleted file mode 100644 index 2509344d2a..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/site_config.py +++ /dev/null @@ -1,195 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'site_config.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB -from ert.job_queue import JobQueue, ExtJoblist -from ert.util import StringList, Hash - - -class SiteConfig(BaseCClass): - - def __init__(self): - raise NotImplementedError("Class can not be instantiated directly!") - - def getQueueName(self): - """ @rtype: str """ - return SiteConfig.cNamespace().get_queue_name( self ) - - def setJobQueue(self, queue): - raise Exception("The function setJobQueue() is not properly implemented") - - - - def getLsfQueue(self): - """ @rtype: str """ - return SiteConfig.cNamespace().get_lsf_queue( self ) - - def setLsfQueue(self, queue): - SiteConfig.cNamespace().set_lsf_queue( self , queue) - - def getMaxRunningLsf(self): - """ @rtype: int """ - return SiteConfig.cNamespace().get_max_running_lsf( self ) - - def setMaxRunningLsf(self, max_running): - SiteConfig.cNamespace().set_max_running_lsf( self , max_running) - - def getLsfRequest(self): - """ @rtype: str """ - return SiteConfig.cNamespace().get_lsf_request( self ) - - def setLsfRequest(self, lsf_request): - SiteConfig.cNamespace().set_lsf_request( self , lsf_request) - - def clearRshHostList(self): - SiteConfig.cNamespace().clear_rsh_host_list( self ) - - def getRshCommand(self): - """ @rtype: str """ - return SiteConfig.cNamespace().get_rsh_command( self ) - - def set_rsh_command(self, rsh_command): - SiteConfig.cNamespace().set_rsh_command( self , rsh_command) - - def getMaxRunningRsh(self): - """ @rtype: int """ - return SiteConfig.cNamespace().get_max_running_rsh( self ) - - def setMaxRunningRsh(self, max_running): - SiteConfig.cNamespace().set_max_running_rsh( self , max_running) - - def getMaxRunningLocal(self): - """ @rtype: int """ - return SiteConfig.cNamespace().get_max_running_local( self ) - - def setMaxRunningLocal(self, max_running): - SiteConfig.cNamespace().set_max_running_local( self , max_running) - - def get_job_script(self): - """ @rtype: str """ - return SiteConfig.cNamespace().get_job_script( self ) - - def set_job_script(self, job_script): - SiteConfig.cNamespace().set_job_script( self , job_script) - - def get_env_hash(self): - """ @rtype: StringHash """ - return SiteConfig.cNamespace().get_env_hash( self ) - - def setenv(self, var, value): - SiteConfig.cNamespace().setenv( self , var, value) - - def clear_env(self): - SiteConfig.cNamespace().clear_env( self ) - - def get_path_variables(self): - """ @rtype: StringList """ - return SiteConfig.cNamespace().get_path_variables(self).setParent(self) - - def get_path_values(self): - """ @rtype: StringList """ - return SiteConfig.cNamespace().get_path_values(self).setParent(self) - - def clear_pathvar(self): - SiteConfig.cNamespace().clear_pathvar( self ) - - def update_pathvar(self, pathvar, value): - SiteConfig.cNamespace().update_pathvar( self, pathvar, value) - - def get_installed_jobs(self): - """ @rtype: ExtJoblist """ - return SiteConfig.cNamespace().get_installed_jobs(self).setParent(self) - - def get_max_submit(self): - """ @rtype: int """ - return SiteConfig.cNamespace().get_max_submit( self ) - - def set_max_submit(self, max_value): - SiteConfig.cNamespace().set_max_submit( self , max_value) - - def get_license_root_path(self): - """ @rtype: str """ - return SiteConfig.cNamespace().get_license_root_path( self ) - - def set_license_root_pathmax_submit(self, path): - SiteConfig.cNamespace().set_license_root_path( self , path) - - def isQueueRunning(self): - """ @rtype: bool """ - return SiteConfig.cNamespace().queue_is_running( self ) - - def getJobQueue(self): - """ @rtype: JobQueue """ - return SiteConfig.cNamespace().get_job_queue(self).setParent(self) - - def getRshHostList(self): - """ @rtype: IntegerHash """ - host_list = SiteConfig.cNamespace().get_rsh_host_list(self) - return host_list - - def addRshHost(self, host, max_running): - SiteConfig.cNamespace().add_rsh_host(self, host, max_running) - - def getLocation(self): - """ @rtype: str """ - return SiteConfig.cNamespace().get_location(self) - - - def free(self): - SiteConfig.cNamespace().free(self) - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerType( "site_config" , SiteConfig ) -cwrapper.registerType( "site_config_obj" , SiteConfig.createPythonObject) -cwrapper.registerType( "site_config_ref" , SiteConfig.createCReference) - - -SiteConfig.cNamespace().free = cwrapper.prototype("void site_config_free( site_config )") -SiteConfig.cNamespace().get_queue_name = cwrapper.prototype("char* site_config_get_queue_name(site_config)") -SiteConfig.cNamespace().get_lsf_queue = cwrapper.prototype("char* site_config_get_lsf_queue(site_config)") -SiteConfig.cNamespace().set_lsf_queue = cwrapper.prototype("void site_config_set_lsf_queue(site_config, char*)") -SiteConfig.cNamespace().get_max_running_lsf = cwrapper.prototype("int site_config_get_max_running_lsf(site_config)") -SiteConfig.cNamespace().set_max_running_lsf = cwrapper.prototype("void site_config_set_max_running_lsf(site_config, int)") -SiteConfig.cNamespace().get_lsf_request = cwrapper.prototype("char* site_config_get_lsf_request(site_config)") -SiteConfig.cNamespace().set_lsf_request = cwrapper.prototype("void site_config_set_lsf_request(site_config, char*)") - -SiteConfig.cNamespace().get_rsh_command = cwrapper.prototype("char* site_config_get_rsh_command(site_config)") -SiteConfig.cNamespace().set_rsh_command = cwrapper.prototype("void site_config_set_rsh_command(site_config, char*)") -SiteConfig.cNamespace().get_max_running_rsh = cwrapper.prototype("int site_config_get_max_running_rsh(site_config)") -SiteConfig.cNamespace().set_max_running_rsh = cwrapper.prototype("void site_config_set_max_running_rsh(site_config, int)") -SiteConfig.cNamespace().get_rsh_host_list = cwrapper.prototype("integer_hash_ref site_config_get_rsh_host_list(site_config)") -SiteConfig.cNamespace().clear_rsh_host_list = cwrapper.prototype("void site_config_clear_rsh_host_list(site_config)") -SiteConfig.cNamespace().add_rsh_host = cwrapper.prototype("void site_config_add_rsh_host(site_config, char*, int)") - -SiteConfig.cNamespace().get_max_running_local = cwrapper.prototype("int site_config_get_max_running_local(site_config)") -SiteConfig.cNamespace().set_max_running_local = cwrapper.prototype("void site_config_set_max_running_local(site_config, int)") -SiteConfig.cNamespace().get_installed_jobs = cwrapper.prototype("ext_joblist_ref site_config_get_installed_jobs(site_config)") -SiteConfig.cNamespace().get_max_submit = cwrapper.prototype("int site_config_get_max_submit(site_config)") -SiteConfig.cNamespace().set_max_submit = cwrapper.prototype("void site_config_set_max_submit(site_config, int)") -SiteConfig.cNamespace().get_license_root_path = cwrapper.prototype("char* site_config_get_license_root_path(site_config)") -SiteConfig.cNamespace().set_license_root_path = cwrapper.prototype("void site_config_set_license_root_path(site_config, char*)") -SiteConfig.cNamespace().get_job_script = cwrapper.prototype("char* site_config_get_job_script(site_config)") -SiteConfig.cNamespace().set_job_script = cwrapper.prototype("void site_config_set_job_script(site_config, char*)") -SiteConfig.cNamespace().get_env_hash = cwrapper.prototype("string_hash_ref site_config_get_env_hash(site_config)") -SiteConfig.cNamespace().clear_env = cwrapper.prototype("void site_config_clear_env(site_config)") -SiteConfig.cNamespace().setenv = cwrapper.prototype("void site_config_setenv(site_config, char*, char*)") -SiteConfig.cNamespace().get_path_variables = cwrapper.prototype("stringlist_ref site_config_get_path_variables(site_config)") -SiteConfig.cNamespace().get_path_values = cwrapper.prototype("stringlist_ref site_config_get_path_values(site_config)") -SiteConfig.cNamespace().clear_pathvar = cwrapper.prototype("void site_config_clear_pathvar(site_config)") -SiteConfig.cNamespace().update_pathvar = cwrapper.prototype("void site_config_update_pathvar(site_config, char*, char*)") -SiteConfig.cNamespace().get_job_queue = cwrapper.prototype("job_queue_ref site_config_get_job_queue(site_config)") -SiteConfig.cNamespace().queue_is_running = cwrapper.prototype("bool site_config_queue_is_running(site_config)") -SiteConfig.cNamespace().get_location = cwrapper.prototype("char* site_config_get_location(site_config)") diff --git a/ThirdParty/Ert/python/python/ert/enkf/state_map.py b/ThirdParty/Ert/python/python/ert/enkf/state_map.py deleted file mode 100644 index 3842e00249..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/state_map.py +++ /dev/null @@ -1,140 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'enkf_fs.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB -from ert.enkf.enums import RealizationStateEnum -from ert.util import BoolVector - - -class StateMap(BaseCClass): - def __init__(self , filename = None): - c_ptr = StateMap.cNamespace().alloc() - super(StateMap, self).__init__(c_ptr) - if filename: - self.load(filename) - - - def __len__(self): - """ @rtype: int """ - return StateMap.cNamespace().size(self) - - def __iter__(self): - index = 0 - size = len(self) - - while index < size: - yield self[index] - index += 1 - - def __eq__(self , other): - return self.cNamespace().equal(self, other) - - - def __getitem__(self, index): - """ @rtype: RealizationStateEnum """ - if not isinstance(index, int): - raise TypeError("Expected an integer") - - size = len(self) - if index >= size: - raise IndexError("Index out of range: %d < %d" % (index, size)) - - return StateMap.cNamespace().iget(self, index) - - - def __setitem__(self, index, value): - if self.isReadOnly(): - raise UserWarning("This State Map is read only!") - - if not isinstance(index, int): - raise TypeError("Expected an integer") - - if not isinstance(value, RealizationStateEnum): - raise TypeError("Expected a RealizationStateEnum") - - if index < 0: - raise IndexError("Index out of range: %d < 0" % index) - - StateMap.cNamespace().iset(self, index, value) - - @staticmethod - def isLegalTransition(realization_state1, realization_state2): - """ @rtype: bool """ - - if not isinstance(realization_state1, RealizationStateEnum) or not isinstance(realization_state2, RealizationStateEnum): - raise TypeError("Expected a RealizationStateEnum") - - return StateMap.cNamespace().is_legal_transition(realization_state1, realization_state2) - - - def isReadOnly(self): - """ @rtype: bool """ - return StateMap.cNamespace().is_read_only(self) - - def selectMatching(self, select_target, select_mask): - """ - @type select_target: BoolVector - @type select_mask: RealizationStateEnum - """ - assert isinstance(select_target, BoolVector) - assert isinstance(select_mask, RealizationStateEnum) - - StateMap.cNamespace().select_matching(self, select_target, select_mask) - - - def realizationList(self , state_value): - """ - Will create a list of all realisations with state equal to state_value. - - @type state_value: RealizationStateEnum - @rtype: ert.util.IntVector - """ - mask = BoolVector(False, len(self)) - self.selectMatching(mask, state_value) - return BoolVector.createActiveList(mask) - - - - def free(self): - StateMap.cNamespace().free(self) - - - def load(self,filename): - if not self.cNamespace().fread(self, filename): - raise IOError("Failed to load state map from:%s" % filename) - - - def save(self, filename): - self.cNamespace().fwrite(self, filename) - - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("state_map", StateMap) - -StateMap.cNamespace().alloc = cwrapper.prototype("c_void_p state_map_alloc()") -StateMap.cNamespace().fread = cwrapper.prototype("bool state_map_fread(state_map , char*)") -StateMap.cNamespace().fwrite = cwrapper.prototype("void state_map_fwrite(state_map , char*)") -StateMap.cNamespace().equal = cwrapper.prototype("bool state_map_equal(state_map , state_map)") -StateMap.cNamespace().free = cwrapper.prototype("void state_map_free(state_map)") -StateMap.cNamespace().size = cwrapper.prototype("int state_map_get_size(state_map)") -StateMap.cNamespace().iget = cwrapper.prototype("realisation_state_enum state_map_iget(state_map, int)") -StateMap.cNamespace().iset = cwrapper.prototype("void state_map_iset(state_map, int, realisation_state_enum)") -StateMap.cNamespace().select_matching = cwrapper.prototype("void state_map_select_matching(state_map, bool_vector, realisation_state_enum)") -StateMap.cNamespace().is_read_only = cwrapper.prototype("bool state_map_is_readonly(state_map)") -StateMap.cNamespace().is_legal_transition = cwrapper.prototype("bool state_map_legal_transition(realisation_state_enum, realisation_state_enum)") - - diff --git a/ThirdParty/Ert/python/python/ert/enkf/summary_key_matcher.py b/ThirdParty/Ert/python/python/ert/enkf/summary_key_matcher.py deleted file mode 100644 index 2f76dfae01..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/summary_key_matcher.py +++ /dev/null @@ -1,44 +0,0 @@ -from cwrap import CWrapper, BaseCClass -from ert.enkf import ENKF_LIB -from ert.util import StringList - - -class SummaryKeyMatcher(BaseCClass): - - def __init__(self): - c_ptr = SummaryKeyMatcher.cNamespace().alloc() - - super(SummaryKeyMatcher, self).__init__(c_ptr) - - def addSummaryKey(self, key): - assert isinstance(key, str) - return SummaryKeyMatcher.cNamespace().add_key(self, key) - - def __len__(self): - return SummaryKeyMatcher.cNamespace().size(self) - - def __contains__(self, key): - return SummaryKeyMatcher.cNamespace().match_key(self, key) - - def isRequired(self, key): - """ @rtype: bool """ - return SummaryKeyMatcher.cNamespace().is_required(self, key) - - def keys(self): - """ @rtype: StringList """ - return SummaryKeyMatcher.cNamespace().keys(self) - - def free(self): - SummaryKeyMatcher.cNamespace().free(self) - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("summary_key_matcher", SummaryKeyMatcher) - -SummaryKeyMatcher.cNamespace().alloc = cwrapper.prototype("c_void_p summary_key_matcher_alloc()") -SummaryKeyMatcher.cNamespace().free = cwrapper.prototype("void summary_key_matcher_free(summary_key_matcher)") -SummaryKeyMatcher.cNamespace().size = cwrapper.prototype("int summary_key_matcher_get_size(summary_key_matcher)") -SummaryKeyMatcher.cNamespace().add_key = cwrapper.prototype("void summary_key_matcher_add_summary_key(summary_key_matcher, char*)") -SummaryKeyMatcher.cNamespace().match_key = cwrapper.prototype("bool summary_key_matcher_match_summary_key(summary_key_matcher, char*)") -SummaryKeyMatcher.cNamespace().keys = cwrapper.prototype("stringlist_obj summary_key_matcher_get_keys(summary_key_matcher)") -SummaryKeyMatcher.cNamespace().is_required = cwrapper.prototype("bool summary_key_matcher_summary_key_is_required(summary_key_matcher, char*)") diff --git a/ThirdParty/Ert/python/python/ert/enkf/summary_key_set.py b/ThirdParty/Ert/python/python/ert/enkf/summary_key_set.py deleted file mode 100644 index 5f5403ccbe..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/summary_key_set.py +++ /dev/null @@ -1,54 +0,0 @@ -from cwrap import CWrapper, BaseCClass -from ert.enkf import ENKF_LIB -from ert.util import StringList - - -class SummaryKeySet(BaseCClass): - - def __init__(self, filename=None, read_only=False): - if filename is None: - c_ptr = SummaryKeySet.cNamespace().alloc() - else: - c_ptr = SummaryKeySet.cNamespace().alloc_from_file(filename, read_only) - - super(SummaryKeySet, self).__init__(c_ptr) - - def addSummaryKey(self, key): - assert isinstance(key, str) - return SummaryKeySet.cNamespace().add_key(self, key) - - def __len__(self): - return SummaryKeySet.cNamespace().size(self) - - def __contains__(self, key): - return SummaryKeySet.cNamespace().has_key(self, key) - - def keys(self): - """ @rtype: StringList """ - return SummaryKeySet.cNamespace().keys(self) - - def isReadOnly(self): - """ @rtype: bool """ - return SummaryKeySet.cNamespace().is_read_only(self) - - - def writeToFile(self, filename): - assert isinstance(filename, str) - SummaryKeySet.cNamespace().fwrite(self, filename) - - def free(self): - SummaryKeySet.cNamespace().free(self) - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("summary_key_set", SummaryKeySet) - -SummaryKeySet.cNamespace().alloc = cwrapper.prototype("c_void_p summary_key_set_alloc()") -SummaryKeySet.cNamespace().alloc_from_file = cwrapper.prototype("c_void_p summary_key_set_alloc_from_file(char*, bool)") -SummaryKeySet.cNamespace().free = cwrapper.prototype("void summary_key_set_free(summary_key_set)") -SummaryKeySet.cNamespace().size = cwrapper.prototype("int summary_key_set_get_size(summary_key_set)") -SummaryKeySet.cNamespace().add_key = cwrapper.prototype("bool summary_key_set_add_summary_key(summary_key_set, char*)") -SummaryKeySet.cNamespace().has_key = cwrapper.prototype("bool summary_key_set_has_summary_key(summary_key_set, char*)") -SummaryKeySet.cNamespace().keys = cwrapper.prototype("stringlist_obj summary_key_set_alloc_keys(summary_key_set)") -SummaryKeySet.cNamespace().is_read_only = cwrapper.prototype("bool summary_key_set_is_read_only(summary_key_set)") -SummaryKeySet.cNamespace().fwrite = cwrapper.prototype("void summary_key_set_fwrite(summary_key_set, char*)") diff --git a/ThirdParty/Ert/python/python/ert/enkf/util/CMakeLists.txt b/ThirdParty/Ert/python/python/ert/enkf/util/CMakeLists.txt deleted file mode 100644 index 7a0c3e95c6..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/util/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - time_map.py -) - -add_python_package("python.ert.enkf.util" ${PYTHON_INSTALL_PREFIX}/ert/enkf/util "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert/enkf/util/__init__.py b/ThirdParty/Ert/python/python/ert/enkf/util/__init__.py deleted file mode 100644 index c3ce9ffc8a..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/util/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .time_map import TimeMap \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert/enkf/util/time_map.py b/ThirdParty/Ert/python/python/ert/enkf/util/time_map.py deleted file mode 100644 index b59c1bc75e..0000000000 --- a/ThirdParty/Ert/python/python/ert/enkf/util/time_map.py +++ /dev/null @@ -1,212 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'time_map.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -import os -import errno - -from cwrap import CWrapper, BaseCClass -from ert.enkf import ENKF_LIB -from ert.util import CTime - - -class TimeMap(BaseCClass): - def __init__(self, filename = None): - c_ptr = TimeMap.cNamespace().alloc() - super(TimeMap, self).__init__(c_ptr) - if filename: - self.load(filename) - - - def load(self, filename): - if os.path.isfile( filename ): - TimeMap.cNamespace().load(self , filename) - else: - raise IOError(( errno.ENOENT , "File not found: %s" % filename)) - - - def fwrite(self, filename): - TimeMap.cNamespace().save(self , filename) - - - def fload(self , filename): - """ - Will load a timemap as a formatted file consisting of a list of dates: DD/MM/YYYY - """ - if os.path.isfile( filename ): - OK = TimeMap.cNamespace().fload(self , filename) - if not OK: - raise Exception("Error occured when loading timemap from:%s" % filename) - else: - raise IOError(( errno.ENOENT , "File not found: %s" % filename)) - - - - def isStrict(self): - return TimeMap.cNamespace().is_strict( self ) - - - def setStrict(self , strict): - return TimeMap.cNamespace().set_strict( self , strict) - - - def getSimulationDays(self, step): - """ @rtype: double """ - if not isinstance(step, int): - raise TypeError("Expected an integer") - - size = len(self) - if step < 0 or step >= size: - raise IndexError("Index out of range: 0 <= %d < %d" % (step, size)) - - return TimeMap.cNamespace().iget_sim_days(self, step) - - - def __getitem__(self, index): - """ @rtype: CTime """ - if not isinstance(index, int): - raise TypeError("Expected an integer") - - size = len(self) - if index < 0 or index >= size: - raise IndexError("Index out of range: 0 <= %d < %d" % (index, size)) - - return TimeMap.cNamespace().iget(self, index) - - def __setitem__(self , index , time): - self.update( index , time ) - - - def update(self , index , time): - if TimeMap.cNamespace().try_update(self , index , CTime(time)): - return True - else: - if self.isStrict(): - raise Exception("Tried to update with inconsistent value") - else: - return False - - - - def __iter__(self): - cur = 0 - - while cur < len(self): - yield self[cur] - cur += 1 - - def __contains__(self , time): - index = TimeMap.cNamespace().lookup_time(self , CTime(time)) - if index >= 0: - return True - else: - return False - - - def lookupTime(self , time , tolerance_seconds_before = 0, tolerance_seconds_after = 0): - """Will look up the report step corresponding to input @time. - - If the tolerance arguments tolerance_seconds_before and - tolerance_seconds_after have the default value zero we require - an exact match between input time argument and the content of - the time map. - - If the tolerance arguments are supplied the function will - search through the time_map for the report step closest to the - time argument, which satisfies the tolerance criteria. - - With the call: - - lookupTime( datetime.date(2010,1,10) , 3600*24 , 3600*7) - - We will find the report step in the date interval 2010,1,9 - - 2010,1,17 which is closest to 2010,1,10. The tolerance limits - are inclusive. - - If no report step satisfying the criteria is found a - ValueError exception will be raised. - - """ - if tolerance_seconds_before == 0 and tolerance_seconds_after == 0: - index = TimeMap.cNamespace().lookup_time(self , CTime(time)) - else: - index = TimeMap.cNamespace().lookup_time_with_tolerance(self , CTime(time) , tolerance_seconds_before , tolerance_seconds_after) - - if index >= 0: - return index - else: - raise ValueError("The time:%s was not found in the time_map instance" % time) - - - def lookupDays(self , days): - index = TimeMap.cNamespace().lookup_days(self , days) - if index >= 0: - return index - else: - raise ValueError("The days: %s was not found in the time_map instance" % days) - - - def __len__(self): - """ @rtype: int """ - return TimeMap.cNamespace().size(self) - - def free(self): - TimeMap.cNamespace().free(self) - - - def dump(self): - """ - Will return a list of tuples (step , CTime , days). - """ - step_list = [] - for step,t in enumerate(self): - step_list.append( (step , t , self.getSimulationDays( step )) ) - return step_list - - - def getLastStep(self): - return TimeMap.cNamespace().last_step(self) - - - def upgrade107(self, refcase): - TimeMap.cNamespace().upgrade107(self, refcase) - - -################################################################## -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerType("time_map", TimeMap) -cwrapper.registerType("time_map_obj", TimeMap.createPythonObject) -cwrapper.registerType("time_map_ref", TimeMap.createCReference) - - -################################################################## -################################################################## - -TimeMap.cNamespace().free = cwrapper.prototype("void time_map_free( time_map )") -TimeMap.cNamespace().fread_alloc_readonly = cwrapper.prototype("c_void_p time_map_fread_alloc_readonly(char*)") -TimeMap.cNamespace().alloc = cwrapper.prototype("c_void_p time_map_alloc()") -TimeMap.cNamespace().load = cwrapper.prototype("bool time_map_fread(time_map , char*)") -TimeMap.cNamespace().save = cwrapper.prototype("void time_map_fwrite(time_map , char*)") -TimeMap.cNamespace().fload = cwrapper.prototype("bool time_map_fscanf(time_map , char*)") -TimeMap.cNamespace().iget_sim_days = cwrapper.prototype("double time_map_iget_sim_days(time_map, int)") -TimeMap.cNamespace().iget = cwrapper.prototype("time_t time_map_iget(time_map, int)") -TimeMap.cNamespace().size = cwrapper.prototype("int time_map_get_size(time_map)") -TimeMap.cNamespace().try_update = cwrapper.prototype("bool time_map_try_update(time_map , int , time_t)") -TimeMap.cNamespace().is_strict = cwrapper.prototype("bool time_map_is_strict( time_map )") -TimeMap.cNamespace().set_strict = cwrapper.prototype("void time_map_set_strict( time_map , bool)") -TimeMap.cNamespace().lookup_time = cwrapper.prototype("int time_map_lookup_time( time_map , time_t)") -TimeMap.cNamespace().lookup_time_with_tolerance = cwrapper.prototype("int time_map_lookup_time_with_tolerance( time_map , time_t , int , int)") -TimeMap.cNamespace().lookup_days = cwrapper.prototype("int time_map_lookup_days( time_map , double)") -TimeMap.cNamespace().last_step = cwrapper.prototype("int time_map_get_last_step( time_map )") -TimeMap.cNamespace().upgrade107 = cwrapper.prototype("void time_map_summary_upgrade107( time_map , ecl_sum )") diff --git a/ThirdParty/Ert/python/python/ert/geo/CMakeLists.txt b/ThirdParty/Ert/python/python/ert/geo/CMakeLists.txt deleted file mode 100644 index 379d3df00d..0000000000 --- a/ThirdParty/Ert/python/python/ert/geo/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - cpolyline.py - cpolyline_collection.py - geometry_tools.py - polyline.py - xyz_io.py - surface.py -) - -add_python_package("python.ert.geo" ${PYTHON_INSTALL_PREFIX}/ert/geo "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert/geo/__init__.py b/ThirdParty/Ert/python/python/ert/geo/__init__.py deleted file mode 100644 index 0049bc6ea2..0000000000 --- a/ThirdParty/Ert/python/python/ert/geo/__init__.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file '__init__.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -""" -Simple package for working with 2D geometry. - -""" -import ert -from cwrap import Prototype -import ert.util - -class GeoPrototype(Prototype): - lib = ert.load("libert_geometry") - - def __init__(self, prototype, bind=True): - super(GeoPrototype, self).__init__(GeoPrototype.lib, prototype, bind=bind) - - - -from .cpolyline import CPolyline -from .cpolyline_collection import CPolylineCollection -from .polyline import Polyline -from .xyz_io import XYZIo -from .geometry_tools import GeometryTools -from .surface import Surface diff --git a/ThirdParty/Ert/python/python/ert/geo/geo_polygon.py b/ThirdParty/Ert/python/python/ert/geo/geo_polygon.py deleted file mode 100644 index 5d0a94cba6..0000000000 --- a/ThirdParty/Ert/python/python/ert/geo/geo_polygon.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file 'ecl_kw.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -""" -Create a polygon -""" -from cwrap import CClass, CWrapper, CWrapperNameSpace -from ert.geo import ERT_GEOMETRY_LIB - - -class GeoPolygon(CClass): - def __init__(self, points): - c_ptr = cfunc.alloc_new() - self.init_cobj(c_ptr, cfunc.free) - for (xc, yc) in points: - self.add_point(xc, yc) - - - def add_point( self, xc, yc ): - cfunc.add_point(self, xc, yc) - - -################################################################# - -cwrapper = CWrapper(ERT_GEOMETRY_LIB) -cwrapper.registerType("geo_polygon", GeoPolygon) - -cfunc = CWrapperNameSpace("geo_polygon") -cfunc.alloc_new = cwrapper.prototype("c_void_p geo_polygon_alloc( )") -cfunc.add_point = cwrapper.prototype("void geo_polygon_add_point( geo_polygon , double , double )") -cfunc.free = cwrapper.prototype("void geo_polygon_free( geo_polygon )") diff --git a/ThirdParty/Ert/python/python/ert/geo/surface.py b/ThirdParty/Ert/python/python/ert/geo/surface.py deleted file mode 100644 index 1ea658088a..0000000000 --- a/ThirdParty/Ert/python/python/ert/geo/surface.py +++ /dev/null @@ -1,217 +0,0 @@ -# Copyright (C) 2016 Statoil ASA, Norway. -# -# The file 'surface' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -""" -Create a polygon -""" -import os.path - -from cwrap import BaseCClass -from ert.geo import GeoPrototype - - -class Surface(BaseCClass): - TYPE_NAME = "surface" - - _alloc = GeoPrototype("void* geo_surface_fload_alloc_irap( char* , bool )" , bind = False) - _free = GeoPrototype("void geo_surface_free( surface )") - _get_nx = GeoPrototype("int geo_surface_get_nx( surface )") - _get_ny = GeoPrototype("int geo_surface_get_ny( surface )") - _iget_zvalue = GeoPrototype("double geo_surface_iget_zvalue( surface , int)") - _iset_zvalue = GeoPrototype("void geo_surface_iset_zvalue( surface , int , double)") - _write = GeoPrototype("void geo_surface_fprintf_irap( surface , char* )") - _equal = GeoPrototype("bool geo_surface_equal( surface , surface )") - _header_equal = GeoPrototype("bool geo_surface_equal_header( surface , surface )") - _copy = GeoPrototype("surface_obj geo_surface_alloc_copy( surface , bool )") - _assign = GeoPrototype("void geo_surface_assign_value( surface , double )") - _scale = GeoPrototype("void geo_surface_scale( surface , double )") - _shift = GeoPrototype("void geo_surface_shift( surface , double )") - _iadd = GeoPrototype("void geo_surface_iadd( surface , surface )") - _imul = GeoPrototype("void geo_surface_imul( surface , surface )") - _isub = GeoPrototype("void geo_surface_isub( surface , surface )") - _isqrt = GeoPrototype("void geo_surface_isqrt( surface )") - - - def __init__(self, filename): - """ - This will load a irap surface from file. The surface should - consist of a header and a set z values. - """ - if os.path.isfile( filename ): - c_ptr = self._alloc(filename , True) - super(Surface , self).__init__(c_ptr) - else: - raise IOError("No such file: %s" % filename) - - - def __eq__(self , other): - """ - Compares two Surface instances, both header and data must be equal - to compare as equal. - """ - if isinstance( other , Surface): - return self._equal(other) - else: - return False - - - def headerEqual(self , other): - return self._header_equal( other) - - - def __iadd__(self , other): - if isinstance(other , Surface): - if self.headerEqual(other): - self._iadd(other) - else: - raise ValueError("Tried to add incompatible surfaces") - else: - self._shift(other) - return self - - - def __isub__(self , other): - if isinstance(other , Surface): - if self.headerEqual(other): - self._isub(other) - else: - raise ValueError("Tried to subtract incompatible surfaces") - else: - self._shift( -other) - return self - - - def __imul__(self , other): - if isinstance(other , Surface): - if self.headerEqual(other): - self._imul( other) - else: - raise ValueError("Tried to add multiply ncompatible surfaces") - else: - self._scale( other) - return self - - - def __idiv__(self , other): - self._scale( 1.0/other) - return self - - - def __add__(self , other): - copy = self.copy() - copy += other - return copy - - - def __mul__(self , other): - copy = self.copy() - copy *= other - return copy - - - def __sub__(self , other): - copy = self.copy() - copy -= other - return copy - - - def __div__(self , other): - copy = self.copy() - copy /= other - return copy - - - def __len__(self): - """ - The number of values in the surface. - """ - return self.getNX() * self.getNY() - - - def inplaceSqrt(self): - """ - Will do an inplcae sqrt opearation. - """ - self._isqrt( ) - return self - - - - def sqrt(self): - """ - Will return a new surface where all elements have been sqrt{ .. }. - """ - copy = self.copy( ) - copy.inplaceSqrt( ) - return copy - - - def copy(self , copy_data = True): - """Will create a deep copy of self, if copy_data is set to False the - copy will have all z-values set to zero. - """ - return self._copy( copy_data) - - - def write(self , filename): - - """ - Will write the surface as an ascii formatted file to @filename. - """ - self._write( filename ) - - - - def assign(self , value): - """ - Will set all the values in the surface to @value" - """ - self._assign(value) - - - def __setitem__(self , index , value): - if isinstance(index , int): - if index >= len(self): - raise IndexError("Invalid index:%d - valid range [0,%d)" % (index , len(self))) - if index < 0: - index += len(self) - - self._iset_zvalue(index , value) - else: - raise TypeError("Invalid index type:%s - must be integer" % index) - - - - def __getitem__(self , index): - if isinstance(index , int): - if index >= len(self): - raise IndexError("Invalid index:%d - valid range [0,%d)" % (index , len(self))) - if index < 0: - index += len(self) - - return self._iget_zvalue( index) - else: - raise TypeError("Invalid index type:%s - must be integer" % index) - - def getNX(self): - return self._get_nx( ) - - - def getNY(self): - return self._get_ny( ) - - - def free(self): - self._free( ) diff --git a/ThirdParty/Ert/python/python/ert/job_queue/CMakeLists.txt b/ThirdParty/Ert/python/python/ert/job_queue/CMakeLists.txt deleted file mode 100644 index 4fd89b4318..0000000000 --- a/ThirdParty/Ert/python/python/ert/job_queue/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - driver.py - ert_plugin.py - ert_script.py - ext_job.py - ext_joblist.py - external_ert_script.py - forward_model.py - function_ert_script.py - job.py - job_status_type_enum.py - queue.py - job_queue_manager.py - workflow.py - workflow_job.py - workflow_joblist.py - workflow_runner.py -) - -add_python_package("python.ert.job_queue" ${PYTHON_INSTALL_PREFIX}/ert/job_queue "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert/job_queue/__init__.py b/ThirdParty/Ert/python/python/ert/job_queue/__init__.py deleted file mode 100644 index 82ab36a03e..0000000000 --- a/ThirdParty/Ert/python/python/ert/job_queue/__init__.py +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file '__init__.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -""" -The job_queue package contains modules and classes for running -external commands. -""" - -# Getting LSF to work properly is quite painful. The situation -# is a mix of build complexity and LSF specific requirements: -# -# 1. The LSF libraries are accessed from the libjob_queue.so -# library, but observe that the dependancy on the liblsf and -# libbat libraries is through dlopen(), i.e. runtime. This module -# will therefor load happily without access to the lsf libraries. -# -# If you at a later stage create a lsf driver the runtime -# environment must be able to locate the liblsf.so, libbat.so and -# libnsl.so shared libraries, either through LD_LIBRARY_PATH or -# other means. -# -# 2. To actually use LSF you need a whole list of environment -# variables to be set: LSF_BINDIR , LSF_LIBDIR , XLDF_UIDDIR , -# LSF_SERVERDIR, LSF_ENVDIR - this is an LSF requirement and not -# related to ERT or the Python bindings. The normal way to -# achieve this is by sourcing a shell script. -# -# If the environment variable LSF_HOME is set we set the -# remaining LSF variables according to: -# -# LSF_BINDIR = $LSF_HOME/bin -# LSF_LIBDIR = $LSF_HOME/lib -# XLSF_UIDDIR = $LSF_HOME/lib/uid -# LSF_SERVERDIR = $LSF_HOME/etc -# LSF_ENVDIR = $LSF_HOME/conf -# PATH = $PATH:$LSF_BINDIR -# -# Observe that none of these variables are modified if they -# already have a value, furthermore it should be observed that -# the use of an LSF_HOME variable is something invented with ERT, -# and not standard LSF approach. - - -import os -import ert -import ert.util -import ert.config -from cwrap import Prototype - -def setenv( var, value): - if not os.getenv(var): - os.environ[var] = value - -# Set up the full LSF environment - based onf LSF_HOME -LSF_HOME = os.getenv("LSF_HOME") -if LSF_HOME: - setenv("LSF_BINDIR", "%s/bin" % LSF_HOME) - setenv("LSF_LIBDIR", "%s/lib" % LSF_HOME) - setenv("XLSF_UIDDIR", "%s/lib/uid" % LSF_HOME) - setenv("LSF_SERVERDIR", "%s/etc" % LSF_HOME) - setenv("LSF_ENVDIR", "%s/conf" % LSF_HOME) # This is wrong: Statoil: /prog/LSF/conf - -JOB_QUEUE_LIB = ert.load("libjob_queue") - -class QueuePrototype(Prototype): - lib = ert.load("libjob_queue") - - def __init__(self, prototype, bind=True): - super(QueuePrototype, self).__init__(QueuePrototype.lib, prototype, bind=bind) - - -#from .job_status_type_enum import JobStatusType -from .job_status_type_enum import JobStatusType -from .job import Job -from .queue import JobQueue -from .job_queue_manager import JobQueueManager -from .driver import QueueDriverEnum, Driver, LSFDriver, RSHDriver, LocalDriver -from .ext_job import ExtJob -from .ext_joblist import ExtJoblist -from .forward_model import ForwardModel - -from .ert_script import ErtScript -from .ert_plugin import ErtPlugin, CancelPluginException -from .function_ert_script import FunctionErtScript -from .external_ert_script import ExternalErtScript - -from .workflow_job import WorkflowJob -from .workflow_joblist import WorkflowJoblist -from .workflow import Workflow -from .workflow_runner import WorkflowRunner diff --git a/ThirdParty/Ert/python/python/ert/job_queue/driver.py b/ThirdParty/Ert/python/python/ert/job_queue/driver.py deleted file mode 100644 index 4b8654e981..0000000000 --- a/ThirdParty/Ert/python/python/ert/job_queue/driver.py +++ /dev/null @@ -1,158 +0,0 @@ -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file 'driver.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - - -import ctypes -from cwrap import BaseCClass, BaseCEnum -from ert.job_queue import JOB_QUEUE_LIB, QueuePrototype -from ert.job_queue import Job - - -class QueueDriverEnum(BaseCEnum): - NULL_DRIVER = None - LSF_DRIVER = None - LOCAL_DRIVER = None - RSH_DRIVER = None - TORQUE_DRIVER = None - -QueueDriverEnum.addEnum( "NULL_DRIVER" , 0 ) -QueueDriverEnum.addEnum( "LSF_DRIVER" , 1 ) -QueueDriverEnum.addEnum( "LOCAL_DRIVER" , 2 ) -QueueDriverEnum.addEnum( "RSH_DRIVER" , 3 ) -QueueDriverEnum.addEnum( "TORQUE_DRIVER" , 4 ) -QueueDriverEnum.registerEnum(JOB_QUEUE_LIB, "queue_driver_enum") - - -LSF_DRIVER = QueueDriverEnum.LSF_DRIVER -RSH_DRIVER = QueueDriverEnum.RSH_DRIVER -LOCAL_DRIVER = QueueDriverEnum.LOCAL_DRIVER - - - -class Driver(BaseCClass): - TYPE_NAME = "driver" - _alloc = QueuePrototype("void* queue_driver_alloc( queue_driver_enum )" , bind = False) - _free = QueuePrototype("void queue_driver_free( driver )") - _set_option = QueuePrototype("void queue_driver_set_option( driver , char* , char*)") - _submit = QueuePrototype("void* queue_driver_submit_job( driver , char* , int , char* , char* , int , char**)") - _free_job = QueuePrototype("void queue_driver_free_job( driver , job )") - _get_status = QueuePrototype("int queue_driver_get_status( driver , job)") - _kill_job = QueuePrototype("void queue_driver_kill_job( driver , job )") - _get_max_running = QueuePrototype("int queue_driver_get_max_running( driver )") - _set_max_running = QueuePrototype("void queue_driver_set_max_running( driver , int)") - _get_name = QueuePrototype("char* queue_driver_get_name( driver )") - - def __init__( self, driver_type, max_running=1, options=None): - """ - Creates a new driver instance - """ - c_ptr = self._alloc( driver_type ) - super(Driver , self).__init__(c_ptr) - if options: - for (key, value) in options: - self.set_option(key, value) - self.set_max_running(max_running) - - - def set_option(self, option, value): - """ - Set the driver option @option to @value. - - If the option is succlessfully set the method will return True, - otherwise the method will return False. If the @option is not - recognized the method will return False. The supplied value - should be a string. - """ - return self._set_option(option, str(value)) - - - def is_driver_instance( self ): - return True - - - def submit( self, name, cmd, run_path, argList, num_cpu=1, blocking=False): - argc = len(argList) - argv = (ctypes.c_char_p * argc)() - argv[:] = map(str, argList) - - c_ptr = self._submit(cmd, num_cpu, run_path, name, argc, argv) - job = Job( c_ptr , self ) - if blocking: - job.block() - job = None - return job - - - def free_job( self, job ): - self._free_job(job) - - def get_status( self, job ): - status = self._get_status(job) - return status - - def kill_job( self, job ): - self._kill_job(job) - - def get_max_running( self ): - return self._get_max_running( ) - - def set_max_running( self, max_running ): - self._set_max_running(max_running) - - max_running = property(get_max_running, set_max_running) - - @property - def name(self): - return self._get_name(self) - - def free(self): - self._free( ) - - -class LSFDriver(Driver): - def __init__(self, - max_running, - lsf_server=None, - queue="normal", - resource_request=None): - # The strings should match the available keys given in the - # lsf_driver.h header file. - options = [("LSF_QUEUE", queue), - ("LSF_SERVER", lsf_server), - ("LSF_RESOURCE", resource_request )] - Driver.__init__(self, QueueDriverEnum.LSF_DRIVER, max_running=max_running, options=options) - - -class LocalDriver(Driver): - def __init__( self, max_running ): - Driver.__init__(self, QueueDriverEnum.LOCAL_DRIVER, max_running, options=[]) - - -class RSHDriver(Driver): - # Changing shell to bash can come in conflict with running ssh - # commands. - - def __init__( self, max_running, rsh_host_list, rsh_cmd="/usr/bin/ssh" ): - """ - @rsh_host_list should be a list of tuples like: (hostname , max_running) - """ - - options = [("RSH_CMD", rsh_cmd)] - for (host, host_max) in rsh_host_list: - options.append(("RSH_HOST", "%s:%d" % (host, host_max))) - Driver.__init__(self, QueueDriverEnum.RSH_DRIVER, max_running, options=options) - - diff --git a/ThirdParty/Ert/python/python/ert/job_queue/ert_plugin.py b/ThirdParty/Ert/python/python/ert/job_queue/ert_plugin.py deleted file mode 100644 index b4b48e240c..0000000000 --- a/ThirdParty/Ert/python/python/ert/job_queue/ert_plugin.py +++ /dev/null @@ -1,48 +0,0 @@ -from .ert_script import ErtScript -from threading import Thread -import time - -class CancelPluginException(Exception): - def __init__(self, cancel_message): - super(CancelPluginException, self).__init__(cancel_message) - - -class ErtPlugin(ErtScript): - - def getArguments(self, parent=None): - """ @rtype: list """ - return [] - - def getName(self): - """ @rtype: str """ - return str(self.__class__) - - def getDescription(self): - """ @rtype: str """ - return "No description provided!" - - def checkIfCancelled(self): - if self.isCancelled(): - raise CancelPluginException("Plugin '%s' cancelled by user!" % self.getName()) - - def startCancellableThread(self, runFunction, cancelFunction): - runFunction.return_value = None - - def runFunctionWrapper(): - runFunction.return_value = runFunction() - - thread = Thread() - thread.run = runFunctionWrapper - thread.start() - - while thread.isAlive(): - if self.isCancelled(): - cancelFunction() - - try: - time.sleep(0.1) - except KeyboardInterrupt: - print("Plugin '%s' cancelled (CTRL+C)" % self.getName()) - self.cancel() - - return runFunction.return_value diff --git a/ThirdParty/Ert/python/python/ert/job_queue/ert_script.py b/ThirdParty/Ert/python/python/ert/job_queue/ert_script.py deleted file mode 100644 index ab90c88a95..0000000000 --- a/ThirdParty/Ert/python/python/ert/job_queue/ert_script.py +++ /dev/null @@ -1,116 +0,0 @@ -import inspect -import imp -import sys -import traceback - -class ErtScript(object): - - def __init__(self, ert): - """ - @type ert: EnKFMain - """ - super(ErtScript, self).__init__() - - if not hasattr(self, "run"): - raise UserWarning("ErtScript implementations must provide a method run(self, ert, ...)") - - self.__verbose = False - self.__ert = ert - - self.__is_cancelled = False - self.__failed = False - - def isVerbose(self): - return self.__verbose - - def ert(self): - """ @rtype: ert.enkf.EnKFMain """ - return self.__ert - - def isCancelled(self): - """ @rtype: bool """ - return self.__is_cancelled - - def hasFailed(self): - """ @rtype: bool """ - return self.__failed - - def cancel(self): - self.__is_cancelled = True - - def cleanup(self): - """ - Override to perform cleanup after a run. - """ - pass - - def initializeAndRun(self, argument_types, argument_values, verbose=False): - """ - @type argument_types: list of type - @type argument_values: list of string - @type verbose: bool - @rtype: unknown - """ - self.__verbose = verbose - self.__failed = False - - arguments = [] - for index, arg_value in enumerate(argument_values): - if index < len(argument_types): - arg_type = argument_types[index] - else: - arg_type = str - - if arg_value is not None: - arguments.append(arg_type(arg_value)) - else: - arguments.append(None) - - try: - return self.run(*arguments) - except AttributeError as e: - if not hasattr(self, "run"): - self.__failed = True - return "Script '%s' has not implemented a 'run' function" % self.__class__.__name__ - return self.defaultStackTrace(e) - except KeyboardInterrupt: - return "Script '%s' cancelled (CTRL+C)" % self.__class__.__name__ - except Exception as e: - return self.defaultStackTrace(e) - finally: - self.cleanup() - - - __module_count = 0 # Need to have unique modules in case of identical object naming in scripts - - def defaultStackTrace(self, error): - sys.stderr.write("The script '%s' caused an error while running:\n" % self.__class__.__name__) - self.__failed = True - stack_trace = traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback) - return "".join(stack_trace) - - @staticmethod - def loadScriptFromFile(path): - """ @rtype: type ErtScript """ - try: - m = imp.load_source("ErtScriptModule_%d" % ErtScript.__module_count, path) - ErtScript.__module_count += 1 - return ErtScript.__findErtScriptImplementations(m) - except Exception as e: - sys.stderr.write("The script '%s' caused an error during load:\n" % path) - traceback.print_exception(sys.exc_type, sys.exc_value, None) - return None - - @staticmethod - def __findErtScriptImplementations(module): - """ @rtype: ErtScript """ - result = [] - predicate = lambda member : inspect.isclass(member) and member.__module__ == module.__name__ - for name, member in inspect.getmembers(module, predicate): - if ErtScript in inspect.getmro(member): - result.append(member) - - if len(result) != 1: - raise UserWarning("Must have (only) one implementation of ErtScript in a module!") - - return result[0] \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert/job_queue/ext_job.py b/ThirdParty/Ert/python/python/ert/job_queue/ext_job.py deleted file mode 100644 index 386acc94d9..0000000000 --- a/ThirdParty/Ert/python/python/ert/job_queue/ext_job.py +++ /dev/null @@ -1,144 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'ext_job.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -import os.path - -from cwrap import BaseCClass, CWrapper -from ert.job_queue import QueuePrototype - - -class ExtJob(BaseCClass): - TYPE_NAME = "ext_job" - _alloc = QueuePrototype("void* ext_job_alloc(char*, char*, int)", bind = False) - _fscanf_alloc = QueuePrototype("void* ext_job_fscanf_alloc(char*, char*, bool, char* , bool)", bind = False) - _free = QueuePrototype("void ext_job_free( ext_job )") - _get_help_text = QueuePrototype("char* ext_job_get_help_text(ext_job)") - _get_name = QueuePrototype("char* ext_job_get_name(ext_job)") - _get_private_args_as_string = QueuePrototype("char* ext_job_get_private_args_as_string(ext_job)") - _set_private_args_as_string = QueuePrototype("void ext_job_set_private_args_from_string(ext_job, char*)") - _is_private = QueuePrototype("int ext_job_is_private(ext_job)") - _get_config_file = QueuePrototype("char* ext_job_get_config_file(ext_job)") - _set_config_file = QueuePrototype("void ext_job_set_config_file(ext_job, char*)") - _get_stdin_file = QueuePrototype("char* ext_job_get_stdin_file(ext_job)") - _set_stdin_file = QueuePrototype("void ext_job_set_stdin_file(ext_job, char*)") - _get_stdout_file = QueuePrototype("char* ext_job_get_stdout_file(ext_job)") - _set_stdout_file = QueuePrototype("void ext_job_set_stdout_file(ext_job, char*)") - _get_stderr_file = QueuePrototype("char* ext_job_get_stderr_file(ext_job)") - _set_stderr_file = QueuePrototype("void ext_job_set_stderr_file(ext_job, char*)") - _get_target_file = QueuePrototype("char* ext_job_get_target_file(ext_job)") - _set_target_file = QueuePrototype("void ext_job_set_target_file(ext_job, char*)") - _get_executable = QueuePrototype("char* ext_job_get_executable(ext_job)") - _set_executable = QueuePrototype("void ext_job_set_executable(ext_job, char*)") - _get_max_running = QueuePrototype("int ext_job_get_max_running(ext_job)") - _set_max_running = QueuePrototype("void ext_job_set_max_running(ext_job, int)") - _get_max_running_minutes = QueuePrototype("int ext_job_get_max_running_minutes(ext_job)") - _set_max_running_minutes = QueuePrototype("void ext_job_set_max_running_minutes(ext_job, int)") - _get_environment = QueuePrototype("void* ext_job_get_environment(ext_job)") - _set_environment = QueuePrototype("void ext_job_add_environment(ext_job, char*, char*)") - _clear_environment = QueuePrototype("void ext_job_clear_environment(ext_job)") - _save = QueuePrototype("void ext_job_save(ext_job)") - - - def __init__(self, config_file, private, name = None , license_root_path = None , search_PATH = True): - if os.path.isfile( config_file ): - if name is None: - name = os.path.basename( config_file ) - - c_ptr = self._fscanf_alloc(name, license_root_path, private, config_file , search_PATH) - super(ExtJob, self).__init__(c_ptr) - else: - raise IOError("No such file:%s" % config_file) - - - def get_private_args_as_string(self): - return self._get_private_args_as_string( ) - - def set_private_args_as_string(self, args): - self._set_private_args_as_string( args) - - def get_help_text(self): - return self._get_help_text( ) - - def is_private(self): - return self._is_private( ) - - def get_config_file(self): - return self._get_config_file( ) - - def set_config_file(self, config_file): - self._set_config_file( config_file) - - def get_stdin_file(self): - return self._get_stdin_file( ) - - def set_stdin_file(self, filename): - self._set_stdin_file( filename) - - def get_stdout_file(self): - return self._get_stdout_file( ) - - def set_stdout_file(self, filename): - self._set_stdout_file( filename) - - def get_stderr_file(self): - return self._get_stderr_file( ) - - def set_stderr_file(self, filename): - self._set_stderr_file( filename) - - def get_target_file(self): - return self._get_target_file( ) - - def set_target_file(self, filename): - self._set_target_file( filename) - - def get_executable(self): - return self._get_executable( ) - - def set_executable(self, executable): - self._set_executable( executable) - - def get_max_running(self): - return self._get_max_running( ) - - def set_max_running(self, max_running): - self._set_max_running( max_running) - - def get_max_running_minutes(self): - return self._get_max_running_minutes( ) - - def set_max_running_minutes(self, min_value): - self._set_max_running_minutes(min_value) - - def get_environment(self): - return self._get_environment( ) #warn: fix return type - - def set_environment(self, key, value): - self._set_environment( key, value) - - def clear_environment(self): - self._clear_environment( ) - - def save(self): - self._save( ) - - def free(self): - self._free( ) - - def name(self): - return self._get_name( ) - - - diff --git a/ThirdParty/Ert/python/python/ert/job_queue/ext_joblist.py b/ThirdParty/Ert/python/python/ert/job_queue/ext_joblist.py deleted file mode 100644 index b961175eb7..0000000000 --- a/ThirdParty/Ert/python/python/ert/job_queue/ext_joblist.py +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'ext_joblist.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import CWrapper, BaseCClass -from ert.job_queue import QueuePrototype, ExtJob -from ert.util import StringList - - -class ExtJoblist(BaseCClass): - TYPE_NAME = "ext_joblist" - _free = QueuePrototype("void ext_joblist_free( ext_joblist )") - _alloc_list = QueuePrototype("stringlist_ref ext_joblist_alloc_list(ext_joblist)") - _get_job = QueuePrototype("ext_job_ref ext_joblist_get_job(ext_joblist, char*)") - _del_job = QueuePrototype("int ext_joblist_del_job(ext_joblist, char*)") - _has_job = QueuePrototype("int ext_joblist_has_job(ext_joblist, char*)") - _add_job = QueuePrototype("void ext_joblist_add_job(ext_joblist, char*, ext_joblist)") - _get_jobs = QueuePrototype("hash_ref ext_joblist_get_jobs(ext_joblist)") - - def __init__(self): - raise NotImplementedError("Class can not be instantiated directly!") - - def get_jobs(self): - """ @rtype: Hash """ - jobs = self._get_jobs( ) - jobs.setParent(self) - return jobs - - def getAvailableJobNames(self): - """ @rtype: StringList """ - return self._alloc_list( ).setParent(self) - - def del_job(self, job): - return self._del_job(job) - - def has_job(self, job): - return self._has_job(job) - - def get_job(self, job): - """ @rtype: ExtJob """ - return self._.get_job(job).setParent(self) - - def add_job(self, job_name, new_job): - self._add_job(job_name, new_job) - - def free(self): - self._free( ) - - diff --git a/ThirdParty/Ert/python/python/ert/job_queue/external_ert_script.py b/ThirdParty/Ert/python/python/ert/job_queue/external_ert_script.py deleted file mode 100644 index 6757115868..0000000000 --- a/ThirdParty/Ert/python/python/ert/job_queue/external_ert_script.py +++ /dev/null @@ -1,25 +0,0 @@ -from subprocess import Popen -from ert.job_queue import ErtScript - - -class ExternalErtScript(ErtScript): - - def __init__(self, ert, executable): - super(ExternalErtScript, self).__init__(ert) - - self.__executable = executable - self.__job = None - - def run(self, *args): - command = [self.__executable] - command.extend([str(arg) for arg in args]) - self.__job = Popen(command) - self.__job.wait() # This should not be here? - return None - - def cancel(self): - super(ExternalErtScript, self).cancel() - if self.__job is not None: - self.__job.terminate() - - self.__job.kill() diff --git a/ThirdParty/Ert/python/python/ert/job_queue/forward_model.py b/ThirdParty/Ert/python/python/ert/job_queue/forward_model.py deleted file mode 100644 index 82010ab58d..0000000000 --- a/ThirdParty/Ert/python/python/ert/job_queue/forward_model.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'forward_model.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import CWrapper, BaseCClass -from ert.job_queue import ExtJob, QueuePrototype -from ert.util import StringList - - -class ForwardModel(BaseCClass): - TYPE_NAME = "forward_model" - _free = QueuePrototype("void forward_model_free( forward_model )") - _clear = QueuePrototype("void forward_model_clear(forward_model)") - _add_job = QueuePrototype("ext_job_ref forward_model_add_job(forward_model, char*)") - _alloc_joblist = QueuePrototype("stringlist_obj forward_model_alloc_joblist(forward_model)") - _iget_job = QueuePrototype("ext_job_ref forward_model_iget_job( forward_model, int)") - - def __init__(self): - raise NotImplementedError("Class can not be instantiated directly!") - - def joblist(self): - """ @rtype: StringList """ - return self._alloc_joblist( ) - - def iget_job(self, index): - """ @rtype: ExtJob """ - return self._iget_job(index).setParent(self) - - def add_job(self, name): - """ @rtype: ExtJob """ - return self._.add_job(name).setParent(self) - - def clear(self): - self._clear( ) - - def free(self): - self._free( ) - diff --git a/ThirdParty/Ert/python/python/ert/job_queue/function_ert_script.py b/ThirdParty/Ert/python/python/ert/job_queue/function_ert_script.py deleted file mode 100644 index a4ca18f333..0000000000 --- a/ThirdParty/Ert/python/python/ert/job_queue/function_ert_script.py +++ /dev/null @@ -1,59 +0,0 @@ -import ert as ert_module -from cwrap import CWrapper -from ert.job_queue import ErtScript -from ert.util.stringlist import StringList - - -class FunctionErtScript(ErtScript): - - def __init__(self, ert, function_name, argument_types, argument_count): - super(FunctionErtScript, self).__init__(ert) - - lib = ert_module.load(None) - wrapper = CWrapper(lib) - - parsed_argument_types = [] - - if ert is not None: - self.__function = wrapper.prototype("c_void_p %s(c_void_p, stringlist)" % function_name) - - else: - for arg in argument_types: - if arg is bool: - parsed_argument_types.append("bool") - elif arg is str: - parsed_argument_types.append("char*") - elif arg is int: - parsed_argument_types.append("int") - elif arg is float: - parsed_argument_types.append("float") - else: - raise TypeError("Unknown type: %s" % arg) - - self.__function = wrapper.prototype("c_void_p %s(%s)" % (function_name, ", ".join(parsed_argument_types[:argument_count]))) - - - def run(self, *args): - ert = self.ert() - if ert is None: - # This is usually used for testing purposes without an ert instance - return self.__function(*args) - else: - str_args = StringList() - for arg in args: - str_args.append(arg) - - if hasattr(ert, "from_param"): - pointer = ert.from_param(ert) - else: - pointer = ert # ... - - return self.__function(pointer, str_args) - - def cancel(self): - # job is not cancellable and will just ignore the call - pass - - - - diff --git a/ThirdParty/Ert/python/python/ert/job_queue/job.py b/ThirdParty/Ert/python/python/ert/job_queue/job.py deleted file mode 100644 index 1bf64cf834..0000000000 --- a/ThirdParty/Ert/python/python/ert/job_queue/job.py +++ /dev/null @@ -1,88 +0,0 @@ -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file 'job.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - - -import time -import datetime -from cwrap import BaseCClass -from ert.job_queue import JobStatusType - -# This class and the interplay between this class and the Driver and -# JobQueue classes is quite fragile; in particular the Job class -# internalizes a void * pointer to the completely driver specific job -# information - this is way too low level. - -class Job(BaseCClass): - TYPE_NAME = "job" - - def __init__(self, c_ptr , driver ): - self.driver = driver - self.submit_time = datetime.datetime.now() - super(Job , self).__init__( c_ptr ) - - - def free(self): - pass - - - def block( self ): - while True: - status = self.status() - if status == JobStatusType.JOB_QUEUE_DONE or status == JobStatusType.JOB_QUEUE_EXIT: - break - else: - time.sleep(1) - - def kill( self ): - self.driver.kill_job(self) - - - @property - def run_time( self ): - td = datetime.datetime.now() - self.submit_time - return td.seconds + td.days * 24 * 3600 - - @property - def status( self ): - st = self.driver.get_status(self) - return st - - @property - def running( self ): - status = self.driver.get_status(self) - if status == JobStatusType.JOB_QUEUE_RUNNING: - return True - else: - return False - - - @property - def pending( self ): - status = self.driver.get_status(self) - if status == JobStatusType.JOB_QUEUE_PENDING: - return True - else: - return False - - @property - def complete( self ): - status = self.driver.get_status(self) - if status == JobStatusType.JOB_QUEUE_DONE or status == JobStatusType.JOB_QUEUE_EXIT: - return True - else: - return False - - diff --git a/ThirdParty/Ert/python/python/ert/job_queue/job_queue_manager.py b/ThirdParty/Ert/python/python/ert/job_queue/job_queue_manager.py deleted file mode 100644 index 2ea1c9ba22..0000000000 --- a/ThirdParty/Ert/python/python/ert/job_queue/job_queue_manager.py +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright (C) 2014 Statoil ASA, Norway. -# -# The file 'job_queue_manager.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -""" -Module implementing a queue for managing external jobs. - -""" -from cwrap import BaseCClass, CWrapper -from ert.job_queue import QueuePrototype, Job, JobStatusType - -class JobQueueManager(BaseCClass): - TYPE_NAME = "job_queue_manager" - _alloc = QueuePrototype("void* job_queue_manager_alloc( job_queue)", bind = False) - _free = QueuePrototype("void job_queue_manager_free( job_queue_manager )") - _start_queue = QueuePrototype("void job_queue_manager_start_queue( job_queue_manager , int , bool, bool)") - _get_num_waiting = QueuePrototype("int job_queue_manager_get_num_waiting( job_queue_manager )") - _get_num_running = QueuePrototype("int job_queue_manager_get_num_running( job_queue_manager )") - _get_num_success = QueuePrototype("int job_queue_manager_get_num_success( job_queue_manager )") - _get_num_failed = QueuePrototype("int job_queue_manager_get_num_failed( job_queue_manager )") - _is_running = QueuePrototype("bool job_queue_manager_is_running( job_queue_manager )") - _job_complete = QueuePrototype("bool job_queue_manager_job_complete( job_queue_manager , int)") - _job_running = QueuePrototype("bool job_queue_manager_job_running( job_queue_manager , int)") - - # Note, even if all realizations have finished, they need not all be failed or successes. - # That is how Ert report things. They can be "killed", which is neither success nor failure. - _job_failed = QueuePrototype("bool job_queue_manager_job_failed( job_queue_manager , int)") - _job_waiting = QueuePrototype("bool job_queue_manager_job_waiting( job_queue_manager , int)") - _job_success = QueuePrototype("bool job_queue_manager_job_success( job_queue_manager , int)") - - # The return type of the job_queue_manager_iget_job_status should - # really be the enum job_status_type_enum, but I just did not - # manage to get the prototyping right. Have therefor taken the - # return as an integer and convert it in the getJobStatus() - # method. - _job_status = QueuePrototype("int job_queue_manager_iget_job_status(job_queue_manager, int)") - - def __init__(self, queue): - c_ptr = self._alloc(queue) - super(JobQueueManager, self).__init__(c_ptr) - - - def startQueue(self , total_size , verbose = False , reset_queue = True): - self._start_queue( total_size , verbose , reset_queue) - - def getNumRunning(self): - return self._get_num_running( ) - - def getNumWaiting(self): - return self._get_num_waiting( ) - - def getNumSuccess(self): - return self._get_num_success( ) - - def getNumFailed(self): - return self._get_num_failed( ) - - def isRunning(self): - return self._is_running( ) - - def free(self): - self._free( ) - - def isJobComplete(self, job_index): - return self._job_complete( job_index ) - - def isJobRunning(self, job_index): - return self._job_running( job_index ) - - def isJobWaiting(self, job_index): - return self._job_waiting( job_index ) - - def didJobFail(self, job_index): - return self._job_failed( job_index ) - - def didJobSucceed(self, job_index): - return self._job_success( job_index ) - - def getJobStatus(self, job_index): - # See comment about return type in the prototype section at - # the top of class. - """ @rtype: ert.job_queue.job_status_type_enum.JobStatusType """ - int_status = self._job_status(job_index) - return JobStatusType( int_status ) - diff --git a/ThirdParty/Ert/python/python/ert/job_queue/job_status_type_enum.py b/ThirdParty/Ert/python/python/ert/job_queue/job_status_type_enum.py deleted file mode 100644 index 53732f44ab..0000000000 --- a/ThirdParty/Ert/python/python/ert/job_queue/job_status_type_enum.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'job_status_type_enum.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from cwrap import BaseCEnum -from ert.job_queue import JOB_QUEUE_LIB - - -class JobStatusType(BaseCEnum): - JOB_QUEUE_NOT_ACTIVE = None # This value is used in external query routines - for jobs which are (currently) not active. */ - JOB_QUEUE_WAITING = None # A node which is waiting in the internal queue. - JOB_QUEUE_SUBMITTED = None # Internal status: It has has been submitted - the next status update will (should) place it as pending or running. - JOB_QUEUE_PENDING = None # A node which is pending - a status returned by the external system. I.e LSF - JOB_QUEUE_RUNNING = None # The job is running - JOB_QUEUE_DONE = None # The job is done - but we have not yet checked if the target file is produced */ - JOB_QUEUE_EXIT = None # The job has exited - check attempts to determine if we retry or go to complete_fail */ - JOB_QUEUE_IS_KILLED = None # The job has been killed, following a JOB_QUEUE_DO_KILL - can restart. */ - JOB_QUEUE_DO_KILL = None # The the job should be killed, either due to user request, or automated measures - the job can NOT be restarted.. */ - JOB_QUEUE_SUCCESS = None - JOB_QUEUE_RUNNING_CALLBACK = None - JOB_QUEUE_FAILED = None - JOB_QUEUE_DO_KILL_NODE_FAILURE = None - - -JobStatusType.addEnum("JOB_QUEUE_NOT_ACTIVE", 1) -JobStatusType.addEnum("JOB_QUEUE_WAITING", 4) -JobStatusType.addEnum("JOB_QUEUE_SUBMITTED", 8) -JobStatusType.addEnum("JOB_QUEUE_PENDING", 16) -JobStatusType.addEnum("JOB_QUEUE_RUNNING", 32) -JobStatusType.addEnum("JOB_QUEUE_DONE", 64) -JobStatusType.addEnum("JOB_QUEUE_EXIT", 128) -JobStatusType.addEnum("JOB_QUEUE_IS_KILLED", 4096) -JobStatusType.addEnum("JOB_QUEUE_DO_KILL", 8192) -JobStatusType.addEnum("JOB_QUEUE_SUCCESS", 16384) -JobStatusType.addEnum("JOB_QUEUE_RUNNING_CALLBACK", 32768) -JobStatusType.addEnum("JOB_QUEUE_FAILED", 65536) -JobStatusType.addEnum("JOB_QUEUE_DO_KILL_NODE_FAILURE", 131072) -JobStatusType.registerEnum(JOB_QUEUE_LIB, "job_status_type_enum") diff --git a/ThirdParty/Ert/python/python/ert/job_queue/queue.py b/ThirdParty/Ert/python/python/ert/job_queue/queue.py deleted file mode 100644 index e6a08747d1..0000000000 --- a/ThirdParty/Ert/python/python/ert/job_queue/queue.py +++ /dev/null @@ -1,260 +0,0 @@ -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file 'job_queue.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -""" -Module implementing a queue for managing external jobs. - -""" -import sys -from types import StringType, IntType -import time -import ctypes - -from cwrap import BaseCClass,BaseCEnum - -from ert.job_queue import QueuePrototype -from ert.job_queue import Job, JobStatusType - - -class JobQueue(BaseCClass): - # If the queue is created with size == 0 that means that it will - # just grow as needed; for the queue layer to know when to exit - # you must call the function submit_complete() when you have no - # more jobs to submit. - # - # If the number of jobs is known in advance you can create the - # queue with a finite value for size, in that case it is not - # necessary to explitly inform the queue layer when all jobs have - # been submitted. - TYPE_NAME = "job_queue" - _alloc = QueuePrototype("void* job_queue_alloc( int , char* , char* , char* )" , bind = False) - _start_user_exit = QueuePrototype("bool job_queue_start_user_exit( job_queue )") - _get_user_exit = QueuePrototype("bool job_queue_get_user_exit( job_queue )") - _free = QueuePrototype("void job_queue_free( job_queue )") - _set_max_running = QueuePrototype("void job_queue_set_max_running( job_queue , int)") - _get_max_running = QueuePrototype("int job_queue_get_max_running( job_queue )") - _set_max_job_duration = QueuePrototype("void job_queue_set_max_job_duration( job_queue , int)") - _get_max_job_duration = QueuePrototype("int job_queue_get_max_job_duration( job_queue )") - _set_driver = QueuePrototype("void job_queue_set_driver( job_queue , void* )") - _add_job = QueuePrototype("int job_queue_add_job( job_queue , char* , void* , void* , void* , void* , int , char* , char* , int , char**)") - _kill_job = QueuePrototype("bool job_queue_kill_job( job_queue , int )") - _start_queue = QueuePrototype("void job_queue_run_jobs( job_queue , int , bool)") - _run_jobs = QueuePrototype("void job_queue_run_jobs_threaded(job_queue , int , bool)") - _sim_start = QueuePrototype("time_t job_queue_iget_sim_start( job_queue , int)") - _iget_driver_data = QueuePrototype("void* job_queue_iget_driver_data( job_queue , int)") - - _num_running = QueuePrototype("int job_queue_get_num_running( job_queue )") - _num_complete = QueuePrototype("int job_queue_get_num_complete( job_queue )") - _num_waiting = QueuePrototype("int job_queue_get_num_waiting( job_queue )") - _num_pending = QueuePrototype("int job_queue_get_num_pending( job_queue )") - - _is_running = QueuePrototype("bool job_queue_is_running( job_queue )") - _submit_complete = QueuePrototype("void job_queue_submit_complete( job_queue )") - _iget_sim_start = QueuePrototype("time_t job_queue_iget_sim_start( job_queue , int)") - _get_active_size = QueuePrototype("int job_queue_get_active_size( job_queue )") - _get_pause = QueuePrototype("bool job_queue_get_pause(job_queue)") - _set_pause_on = QueuePrototype("void job_queue_set_pause_on(job_queue)") - _set_pause_off = QueuePrototype("void job_queue_set_pause_off(job_queue)") - - # The return type of the job_queue_iget_job_status should really - # be the enum job_status_type_enum, but I just did not manage to - # get the prototyping right. Have therefor taken the return as an - # integer and convert it in the getJobStatus() method. - _get_job_status = QueuePrototype("int job_queue_iget_job_status(job_queue, int)") - - - def __init__(self, driver , max_submit=1, size=0): - """ - Short doc... - - The @size argument is used to say how many jobs the queue will - run, in total. - - size = 0: That means that you do not tell the queue in - advance how many jobs you have. The queue will just run - all the jobs you add, but you have to inform the queue in - some way that all jobs have been submitted. To achieve - this you should call the submit_complete() method when all - jobs have been submitted.# - - size > 0: The queue will know exactly how many jobs to run, - and will continue until this number of jobs have completed - - it is not necessary to call the submit_complete() method - in this case. - """ - - OK_file = None - status_file = None - exit_file = None - - c_ptr = self._alloc(max_submit, OK_file, status_file , exit_file) - super(JobQueue, self).__init__(c_ptr) - self.size = size - - self.driver = driver - self._set_driver(driver.from_param(driver)) - self.start( blocking=False ) - - - def kill_job(self, queue_index): - """ - Will kill job nr @index. - """ - self._kill_job( queue_index ) - - - def start( self, blocking=False): - verbose = False - self._run_jobs(self.size, verbose) - - - def submit( self, cmd, run_path, job_name, argv, num_cpu=1): - c_argv = (ctypes.c_char_p * len(argv))() - c_argv[:] = argv - - done_callback = None - callback_arg = None - retry_callback = None - exit_callback = None - - queue_index = self._add_job(cmd, - done_callback, - retry_callback, - exit_callback, - callback_arg, - num_cpu, - run_path, - job_name, - len(argv), - c_argv) - - return queue_index - - - def clear( self ): - pass - - def block_waiting( self ): - """ - Will block as long as there are waiting jobs. - """ - while self.num_waiting > 0: - time.sleep(1) - - def block(self): - """ - Will block as long as there are running jobs. - """ - while self.isRunning: - time.sleep(1) - - - def submit_complete( self ): - """ - Method to inform the queue that all jobs have been submitted. - - If the queue has been created with size == 0 the queue has no - way of knowing when all jobs have completed; hence in that - case you must call the submit_complete() method when all jobs - have been submitted. - - If you know in advance exactly how many jobs you will run that - should be specified with the size argument when creating the - queue, in that case it is not necessary to call the - submit_complete() method. - """ - self._submit_complete( ) - - - def isRunning(self): - return self._is_running( ) - - def num_running( self ): - return self._num_running( ) - - def num_pending( self ): - return self._.num_pending( ) - - def num_waiting( self ): - return self._num_waiting( ) - - def num_complete( self ): - return self._num_complete( ) - - def exists(self, index): - job = self.__getitem__(index) - if job: - return True - else: - return False - - def get_max_running( self ): - return self.driver.get_max_running() - - def set_max_running( self, max_running ): - self.driver.set_max_running(max_running) - - def get_max_job_duration(self): - return self._get_max_job_duration() - - def set_max_job_duration(self, max_duration): - self._set_max_job_duration(max_duration) - - def killAllJobs(self): - # The queue will not set the user_exit flag before the - # queue is in a running state. If the queue does not - # change to running state within a timeout the C function - # will return False, and that False value is just passed - # along. - user_exit = self._start_user_exit( ) - if user_exit: - while self.isRunning(): - time.sleep(0.1) - return True - else: - return False - - def igetSimStart(self, job_index): - return self._iget_sim_start( self , job_index ) - - - def getUserExit(self): - # Will check if a user_exit has been initated on the job. The - # queue can be queried about this status until a - # job_queue_reset() call is invoked, and that should not be - # done before the queue is recycled to run another batch of - # simulations. - return self._get_user_exit( ) - - def set_pause_on(self): - self._set_pause_on( ) - - def set_pause_off(self): - self._set_pause_off( ) - - def free(self): - self._free( ) - - def __len__(self): - return self._get_active_size( ) - - def getJobStatus(self, job_number): - # See comment about return type in the prototype section at - # the top of class. - """ @rtype: JobStatusType """ - int_status = self._get_job_status(job_number) - return JobStatusType( int_status ) - - diff --git a/ThirdParty/Ert/python/python/ert/job_queue/workflow.py b/ThirdParty/Ert/python/python/ert/job_queue/workflow.py deleted file mode 100644 index 4547372f70..0000000000 --- a/ThirdParty/Ert/python/python/ert/job_queue/workflow.py +++ /dev/null @@ -1,105 +0,0 @@ -import time -from ert.config import ConfigError -from cwrap import BaseCClass, CWrapper -from ert.job_queue import QueuePrototype, WorkflowJoblist, WorkflowJob -from ert.util import SubstitutionList - - -class Workflow(BaseCClass): - TYPE_NAME = "workflow" - _alloc = QueuePrototype("void* workflow_alloc(char*, workflow_joblist)" , bind = False) - _free = QueuePrototype("void workflow_free(workflow)") - _count = QueuePrototype("int workflow_size(workflow)") - _iget_job = QueuePrototype("workflow_job_ref workflow_iget_job(workflow, int)") - _iget_args = QueuePrototype("stringlist_ref workflow_iget_arguments(workflow, int)") - - _try_compile = QueuePrototype("bool workflow_try_compile(workflow, subst_list)") - _get_last_error = QueuePrototype("config_error_ref workflow_get_last_error(workflow)") - - def __init__(self, src_file, job_list): - """ - @type src_file: str - @type job_list: WorkflowJoblist - """ - c_ptr = self._alloc(src_file, job_list) - super(Workflow, self).__init__(c_ptr) - - self.__running = False - self.__cancelled = False - self.__current_job = None - - def __len__(self): - return self._count( ) - - def __getitem__(self, index): - """ - @type index: int - @rtype: tuple of (WorkflowJob, arguments) - """ - job = self._iget_job(index) - args = self._iget_args(index) - return job, args - - - def __iter__(self): - for index in range(len(self)): - yield self[index] - - def run(self, ert, verbose=False, context=None): - """ - @type ert: ert.enkf.enkf_main.EnKFMain - @type verbose: bool - @type context: SubstitutionList - @rtype: bool - """ - self.__running = True - success = self._try_compile(context) - - if success: - for job, args in self: - self.__current_job = job - if not self.__cancelled: - return_value = job.run(ert, args, verbose) - - if job.hasFailed(): - print(return_value) - - #todo store results? - - self.__current_job = None - self.__running = False - return success - - - def free(self): - self._free( ) - - def isRunning(self): - return self.__running - - def cancel(self): - if self.__current_job is not None: - self.__current_job.cancel() - - self.__cancelled = True - - def isCancelled(self): - return self.__cancelled - - def wait(self): - while self.isRunning(): - time.sleep(1) - - def getLastError(self): - """ @rtype: ConfigError """ - return self._get_last_error( ) - - @classmethod - def createCReference(cls, c_pointer, parent=None): - workflow = super(Workflow, cls).createCReference(c_pointer, parent) - workflow.__running = False - workflow.__cancelled = False - workflow.__current_job = None - return workflow - - diff --git a/ThirdParty/Ert/python/python/ert/job_queue/workflow_job.py b/ThirdParty/Ert/python/python/ert/job_queue/workflow_job.py deleted file mode 100644 index 5e75362aac..0000000000 --- a/ThirdParty/Ert/python/python/ert/job_queue/workflow_job.py +++ /dev/null @@ -1,181 +0,0 @@ -import os - -from cwrap import BaseCClass, CWrapper -from ert.job_queue import QueuePrototype, ErtScript, FunctionErtScript, ErtPlugin, ExternalErtScript -from ert.config import ContentTypeEnum - - -class WorkflowJob(BaseCClass): - TYPE_NAME = "workflow_job" - _alloc = QueuePrototype("void* workflow_job_alloc(char*, bool)", bind= False) - _alloc_parser = QueuePrototype("config_parser_obj workflow_job_alloc_config( )", bind= False) - _alloc_from_file = QueuePrototype("workflow_job_obj workflow_job_config_alloc( char* , config_parser , char*)", bind= False) - _free = QueuePrototype("void workflow_job_free(workflow_job)") - _name = QueuePrototype("char* workflow_job_get_name(workflow_job)") - _internal = QueuePrototype("bool workflow_job_internal(workflow_job)") - _is_internal_script = QueuePrototype("bool workflow_job_is_internal_script(workflow_job)") - _get_internal_script = QueuePrototype("char* workflow_job_get_internal_script_path(workflow_job)") - _get_function = QueuePrototype("char* workflow_job_get_function(workflow_job)") - _get_module = QueuePrototype("char* workflow_job_get_module(workflow_job)") - _get_executable = QueuePrototype("char* workflow_job_get_executable(workflow_job)") - _min_arg = QueuePrototype("int workflow_job_get_min_arg(workflow_job)") - _max_arg = QueuePrototype("int workflow_job_get_max_arg(workflow_job)") - _arg_type = QueuePrototype("config_content_type_enum workflow_job_iget_argtype(workflow_job, int)") - - - - @classmethod - def configParser(cls): - return cls._alloc_parser( ) - - @classmethod - def fromFile(cls , config_file , name = None , parser = None): - if os.path.isfile( config_file ) and os.access( config_file , os.R_OK): - if parser is None: - parser = cls.configParser( ) - - if name is None: - name = os.path.basename( config_file ) - - # NB: Observe argument reoredring. - return cls._alloc_from_file( name , parser , config_file ) - else: - raise IOError("Could not open config_file:%s" % config_file) - - - def __init__(self, name, internal=True): - c_ptr = self._alloc(name, internal) - super(WorkflowJob, self).__init__(c_ptr) - - self.__script = None - """ :type: ErtScript """ - self.__running = False - - def isInternal(self): - """ @rtype: bool """ - return self._internal( ) - - def name(self): - """ @rtype: str """ - return self._name() - - def minimumArgumentCount(self): - """ @rtype: int """ - return self._min_arg() - - def maximumArgumentCount(self): - """ @rtype: int """ - return self._max_arg( ) - - def functionName(self): - """ @rtype: str """ - return self._get_function( ) - - def module(self): - """ @rtype: str """ - return self._get_module( ) - - def executable(self): - """ @rtype: str """ - return self._get_executable( ) - - def isInternalScript(self): - """ @rtype: bool """ - return self._is_internal_script( ) - - def getInternalScriptPath(self): - """ @rtype: str """ - return self._get_internal_script( ) - - def isPlugin(self): - """ @rtype: bool """ - if self.isInternalScript(): - script_obj = ErtScript.loadScriptFromFile(self.getInternalScriptPath()) - return script_obj is not None and issubclass(script_obj, ErtPlugin) - - return False - - - def argumentTypes(self): - """ @rtype: list of type """ - - result = [] - for index in range(self.maximumArgumentCount()): - t = self._arg_type(index) - if t == ContentTypeEnum.CONFIG_BOOL: - result.append(bool) - elif t == ContentTypeEnum.CONFIG_FLOAT: - result.append(float) - elif t == ContentTypeEnum.CONFIG_INT: - result.append(int) - elif t == ContentTypeEnum.CONFIG_STRING: - result.append(str) - else: - result.append(None) - - return result - - - def run(self, ert, arguments, verbose=False): - """ - @type ert: ert.enkf.enkf_main.EnKFMain - @type arguments: list of str - @type verbose: bool - @rtype: ctypes.c_void_p - """ - self.__running = True - - min_arg = self.minimumArgumentCount() - if min_arg > 0 and len(arguments) < min_arg: - raise UserWarning("The job: %s requires at least %d arguments, %d given." % (self.name(), min_arg, len(arguments))) - - max_arg = self.maximumArgumentCount() - if 0 < max_arg < len(arguments): - raise UserWarning("The job: %s can only have %d arguments, %d given." % (self.name(), max_arg, len(arguments))) - - - if self.isInternalScript(): - script_obj = ErtScript.loadScriptFromFile(self.getInternalScriptPath()) - self.__script = script_obj(ert) - result = self.__script.initializeAndRun(self.argumentTypes(), arguments, verbose=verbose) - - elif self.isInternal() and not self.isInternalScript(): - self.__script = FunctionErtScript(ert, self.functionName(), self.argumentTypes(), argument_count=len(arguments)) - result = self.__script.initializeAndRun(self.argumentTypes(), arguments, verbose=verbose) - - elif not self.isInternal(): - self.__script = ExternalErtScript(ert, self.executable()) - result = self.__script.initializeAndRun(self.argumentTypes(), arguments, verbose=verbose) - - else: - raise UserWarning("Unknown script type!") - - self.__running = False - return result - - def cancel(self): - if self.__script is not None: - self.__script.cancel() - - def isRunning(self): - return self.__running - - def isCancelled(self): - return self.__script.isCancelled() - - def hasFailed(self): - """ @rtype: bool """ - return self.__script.hasFailed() - - def free(self): - self._free( ) - - - @classmethod - def createCReference(cls, c_pointer, parent=None): - workflow = super(WorkflowJob, cls).createCReference(c_pointer, parent) - workflow.__script = None - workflow.__running = False - return workflow - - diff --git a/ThirdParty/Ert/python/python/ert/job_queue/workflow_joblist.py b/ThirdParty/Ert/python/python/ert/job_queue/workflow_joblist.py deleted file mode 100644 index e5001d1b5d..0000000000 --- a/ThirdParty/Ert/python/python/ert/job_queue/workflow_joblist.py +++ /dev/null @@ -1,66 +0,0 @@ -import os -from cwrap import BaseCClass -from ert.job_queue import QueuePrototype, WorkflowJob - - -class WorkflowJoblist(BaseCClass): - TYPE_NAME = "workflow_joblist" - _alloc = QueuePrototype("void* workflow_joblist_alloc()" , bind = False) - _free = QueuePrototype("void workflow_joblist_free(workflow_joblist)") - _add_job = QueuePrototype("void workflow_joblist_add_job(workflow_joblist, workflow_job)") - _add_job_from_file = QueuePrototype("bool workflow_joblist_add_job_from_file(workflow_joblist, char*, char*)") - _has_job = QueuePrototype("bool workflow_joblist_has_job(workflow_joblist, char*)") - _get_job = QueuePrototype("workflow_job_ref workflow_joblist_get_job(workflow_joblist, char*)") - _count = QueuePrototype("workflow_job_ref workflow_joblist_get_job(workflow_joblist, char*)") - - def __init__(self): - c_ptr = self._alloc( ) - super(WorkflowJoblist, self).__init__(c_ptr) - - - def addJob(self, job): - """ @type job: WorkflowJob """ - job.convertToCReference(self) - self._add_job(job) - - - def addJobFromFile(self, name, filepath): - """ - @type name: str - @type filepath: str - @rtype: bool - """ - if not os.path.exists(filepath): - raise UserWarning("Job file '%s' does not exist!" % filepath) - - return self._add_job_from_file(name, filepath) - - - def __contains__(self, item): - """ - @type item: str or WorkflowJob - @rtype: bool - """ - - if isinstance(item, WorkflowJob): - item = item.name() - - return self._has_job(item) - - - def __getitem__(self, item): - """ - @type item: str - @rtype: WorkflowJob - """ - - if not item in self: - return None - - return self._get_job(item) - - - - def free(self): - self._free( ) - diff --git a/ThirdParty/Ert/python/python/ert/job_queue/workflow_runner.py b/ThirdParty/Ert/python/python/ert/job_queue/workflow_runner.py deleted file mode 100644 index a281c0d738..0000000000 --- a/ThirdParty/Ert/python/python/ert/job_queue/workflow_runner.py +++ /dev/null @@ -1,63 +0,0 @@ -from threading import Thread -from ert.job_queue import Workflow -from ert.util.substitution_list import SubstitutionList - - -class WorkflowRunner(object): - def __init__(self, workflow, ert=None, context=None): - """ - @type workflow: Workflow - @type ert: ert.enkf.EnKFMain - @type context: SubstitutionList - """ - super(WorkflowRunner, self).__init__() - - self.__workflow = workflow - self.__ert = ert - - if context is None: - context = SubstitutionList() - - self.__context = context - self.__workflow_result = None - - def run(self): - workflow_thread = Thread(name="ert_gui_workflow_thread") - workflow_thread.setDaemon(True) - workflow_thread.run = self.__runWorkflow - workflow_thread.start() - - def __runWorkflow(self): - self.__workflow_result = self.__workflow.run(self.__ert, context=self.__context) - - def isRunning(self): - """ @rtype: bool """ - return self.__workflow.isRunning() - - def isCancelled(self): - """ @rtype: bool """ - return self.__workflow.isCancelled() - - def cancel(self): - if self.isRunning(): - self.__workflow.cancel() - - def wait(self): - self.__workflow.wait() - - def workflowResult(self): - """ @rtype: bool or None """ - return self.__workflow_result - - def workflowError(self): - """ @rtype: str """ - error = self.__workflow.getLastError() - - error_message = "" - - for error_line in error: - error_message += error_line + "\n" - - return error_message - - diff --git a/ThirdParty/Ert/python/python/ert/rms/CMakeLists.txt b/ThirdParty/Ert/python/python/ert/rms/CMakeLists.txt deleted file mode 100644 index d1aab7db53..0000000000 --- a/ThirdParty/Ert/python/python/ert/rms/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - librms.py - rms.py -) - -add_python_package("python.ert.rms" ${PYTHON_INSTALL_PREFIX}/ert/rms "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert/rms/__init__.py b/ThirdParty/Ert/python/python/ert/rms/__init__.py deleted file mode 100644 index 1178612a7d..0000000000 --- a/ThirdParty/Ert/python/python/ert/rms/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -import ert -import ert.util -import ert.geo -import ert.ecl - -RMS_LIB = ert.load("librms") diff --git a/ThirdParty/Ert/python/python/ert/rms/rms.py b/ThirdParty/Ert/python/python/ert/rms/rms.py deleted file mode 100644 index 6feca3459e..0000000000 --- a/ThirdParty/Ert/python/python/ert/rms/rms.py +++ /dev/null @@ -1 +0,0 @@ -import librms diff --git a/ThirdParty/Ert/python/python/ert/sched/CMakeLists.txt b/ThirdParty/Ert/python/python/ert/sched/CMakeLists.txt deleted file mode 100644 index 57c42355e3..0000000000 --- a/ThirdParty/Ert/python/python/ert/sched/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - history.py - history_source_enum.py - sched_file.py -) - -add_python_package("python.ert.sched" ${PYTHON_INSTALL_PREFIX}/ert/sched "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert/sched/__init__.py b/ThirdParty/Ert/python/python/ert/sched/__init__.py deleted file mode 100644 index d42e7fb690..0000000000 --- a/ThirdParty/Ert/python/python/ert/sched/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file '__init__.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -import ert -import ert.ecl -import ert.util -import ert.geo - -SCHED_LIB = ert.load("libsched") - - -from .sched_file import SchedFile -from .history_source_enum import HistorySourceEnum -from .history import History diff --git a/ThirdParty/Ert/python/python/ert/sched/history.py b/ThirdParty/Ert/python/python/ert/sched/history.py deleted file mode 100644 index ff0e79b14f..0000000000 --- a/ThirdParty/Ert/python/python/ert/sched/history.py +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'history.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -from cwrap import CWrapper, BaseCClass -from ert.sched import SCHED_LIB, SchedFile, HistorySourceEnum -from ert.ecl import EclSum - - - -class History(BaseCClass): - def __init__(self): - raise NotImplementedError("Class can not be instantiated directly!") - - @staticmethod - def get_source_string(history_source_type): - """ - @type history_source_type: HistorySourceEnum - @rtype: str - """ - return History.cNamespace().get_source_string(history_source_type) - - #todo: change this to __init__? - @staticmethod - def alloc_from_refcase(refcase, use_history): - """ - @type refcase: EclSum - @type use_history: bool - @rtype: HistoryType - """ - return History.cNamespace().alloc_from_refcase(refcase, use_history) - - @staticmethod - def alloc_from_sched_file(sched_file): - """ @rtype: HistoryType """ - assert isinstance(sched_file, SchedFile) - return History.cNamespace().alloc_from_sched_file(":", sched_file) - - def free(self): - History.cNamespace().free(self) - - -cwrapper = CWrapper(SCHED_LIB) -cwrapper.registerType("history", History) -cwrapper.registerType("history_obj", History.createPythonObject) -cwrapper.registerType("history_ref", History.createCReference) - - - -History.cNamespace().free = cwrapper.prototype("void history_free( history )") -History.cNamespace().get_source_string = cwrapper.prototype("char* history_get_source_string(history_source_enum)") -History.cNamespace().alloc_from_refcase = cwrapper.prototype("history_obj history_alloc_from_refcase(ecl_sum, bool)") -History.cNamespace().alloc_from_sched_file = cwrapper.prototype("history_obj history_alloc_from_sched_file(char*, sched_file)") - -# History.cNamespace().history_get_source_type = cwrapper.prototype("history_source_type_enum history_get_source_type(char*)") diff --git a/ThirdParty/Ert/python/python/ert/sched/history_source_enum.py b/ThirdParty/Ert/python/python/ert/sched/history_source_enum.py deleted file mode 100644 index 54bb64a119..0000000000 --- a/ThirdParty/Ert/python/python/ert/sched/history_source_enum.py +++ /dev/null @@ -1,13 +0,0 @@ -from cwrap import BaseCEnum -from ert.sched import SCHED_LIB - - -class HistorySourceEnum(BaseCEnum): - pass - -HistorySourceEnum.addEnum("SCHEDULE", 0) -HistorySourceEnum.addEnum("REFCASE_SIMULATED", 1) -HistorySourceEnum.addEnum("REFCASE_HISTORY", 2) -HistorySourceEnum.addEnum("HISTORY_SOURCE_INVALID", 10) - -HistorySourceEnum.registerEnum(SCHED_LIB, "history_source_enum") diff --git a/ThirdParty/Ert/python/python/ert/sched/sched_file.py b/ThirdParty/Ert/python/python/ert/sched/sched_file.py deleted file mode 100644 index b12c6a1b40..0000000000 --- a/ThirdParty/Ert/python/python/ert/sched/sched_file.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'sched_file.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -import os.path - -from cwrap import BaseCClass, CWrapper -from ert.sched import SCHED_LIB -from ert.util import CTime - - -class SchedFile(BaseCClass): - def __init__(self, filename, start_time): - if os.path.isfile(filename): - c_ptr = SchedFile.cNamespace().parse(filename, CTime(start_time)) - super(SchedFile, self).__init__(c_ptr) - else: - raise IOError("No such file: %s" % filename) - - @property - def length(self): - """ @rtype: int """ - return SchedFile.cNamespace().length(self) - - def write(self, filename, num_dates, add_end=True): - SchedFile.cNamespace().write(self, num_dates, filename, add_end) - - def free(self): - SchedFile.cNamespace().free(self) - - -cwrapper = CWrapper(SCHED_LIB) -cwrapper.registerType("sched_file", SchedFile) -cwrapper.registerType("sched_file_obj", SchedFile.createPythonObject) -cwrapper.registerType("sched_file_ref", SchedFile.createCReference) - -SchedFile.cNamespace().parse = cwrapper.prototype("c_void_p sched_file_parse_alloc( char*, time_t )") -SchedFile.cNamespace().write = cwrapper.prototype("void sched_file_fprintf_i( sched_file , int , char* , bool)") -SchedFile.cNamespace().length = cwrapper.prototype("int sched_file_get_num_restart_files( sched_file )") -SchedFile.cNamespace().free = cwrapper.prototype("void sched_file_free( sched_file )") diff --git a/ThirdParty/Ert/python/python/ert/server/CMakeLists.txt b/ThirdParty/Ert/python/python/ert/server/CMakeLists.txt deleted file mode 100644 index 8ea8e29f02..0000000000 --- a/ThirdParty/Ert/python/python/ert/server/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - ertrpcclient.py - ertrpcserver.py - simulation_context.py -) - -add_python_package("python.ert.server" ${PYTHON_INSTALL_PREFIX}/ert/server "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert/server/__init__.py b/ThirdParty/Ert/python/python/ert/server/__init__.py deleted file mode 100644 index 7138833de3..0000000000 --- a/ThirdParty/Ert/python/python/ert/server/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -from .simulation_context import SimulationContext -from .ertrpcclient import ErtRPCClient -from .ertrpcserver import ErtRPCServer diff --git a/ThirdParty/Ert/python/python/ert/server/ertrpcclient.py b/ThirdParty/Ert/python/python/ert/server/ertrpcclient.py deleted file mode 100644 index 89eea54b53..0000000000 --- a/ThirdParty/Ert/python/python/ert/server/ertrpcclient.py +++ /dev/null @@ -1,228 +0,0 @@ -import socket -from xmlrpclib import ServerProxy, Fault - -FAULT_CODES = {1: UserWarning, - 2: KeyError, - 3: IndexError, - 4: LookupError, - 5: TypeError - } - - -def convertFault(fault): - if fault.faultCode in FAULT_CODES: - fault_type = FAULT_CODES[fault.faultCode] - raise fault_type(fault.faultString) - else: - raise fault - - -class ErtRPCClient(object): - def __init__(self, host, port, verbose=False): - self._server_proxy = ServerProxy("http://%s:%s" % (host, port), allow_none=True, verbose=verbose) - socket.setdefaulttimeout(180) # 3 minutes - - def ertVersion(self): - """ - Returns a version tuple: (major, minor, micro) - @rtype: tuple - """ - return tuple(self._server_proxy.ertVersion()) - - def getTimeMap(self, target_case_name): - """ - Returns a list of datetime objects for the named target case name - @type target_case_name: str - @rtype: list of datetime - """ - return self._server_proxy.getTimeMap(target_case_name) - - - def isRunning(self): - """ - Returns True if a simulation batch has been started and is running. - @rtype: bool - """ - return self._server_proxy.isRunning() - - - def isInitializationCaseAvailable(self): - """ - Returns True if the initialization case is prepared and ready to run simulations. - @rtype: bool - """ - return self._server_proxy.isInitializationCaseAvailable() - - - def startSimulationBatch(self, initialization_case_name, simulation_count): - """ - Start a simulation batch. Will prepare a batch that will run for the specified number of realizations. - Will fail if the server is already running a batch or no initialization case is available. - @param initialization_case_name: The case containing geo realizations - @type initialization_case_name: str - @type simulation_count: int - """ - try: - self._server_proxy.startSimulationBatch(initialization_case_name, simulation_count) - except Fault as f: - raise convertFault(f) - - - def addSimulation(self, target_case_name, geo_id, pert_id, sim_id, keywords): - """ - Start a simulation. - @type target_case_name: str - @type geo_id: int - @type pert_id: - @type sim_id: int - @type keywords: dict[str, list] - @raise UserWarning if the server is not ready to receive simulations - @raise UserWarning if the server is already running a simulation with the same id as sim_id - """ - try: - self._server_proxy.addSimulation(target_case_name, geo_id, pert_id, sim_id, keywords) - except Fault as f: - raise convertFault(f) - - - def isRealizationFinished(self, sim_id): - """ - Returns true if the realization is finished running. - @type sim_id: int - @rtype: bool - """ - return self._server_proxy.isRealizationFinished(sim_id) - - def didRealizationSucceed(self, sim_id): - """ - Check if the realization successfully finished running. - @type sim_id: int - @rtype: bool - """ - return self._server_proxy.didRealizationSucceed(sim_id) - - def didRealizationFail(self, sim_id): - """ - Check if the realization failed while running. - @type sim_id: int - @rtype: bool - """ - return self._server_proxy.didRealizationFail(sim_id) - - def getGenDataResult(self, target_case_name, sim_id, report_step, keyword): - """ - Retrieve a GenData result from a target case - @type target_case_name: str - @type sim_id: int - @type report_step: int - @type keyword: str - @rtype: list[float] - @raise KeyError if the server was unable to recognize the keyword - @raise UserWarning if the server was unable to load the data - @raise UserWarning if the simulation (with sim_id) is still running - @raise UserWarning if the keyword is not of the correct type - """ - try: - return self._server_proxy.getGenDataResult(target_case_name, sim_id, report_step, keyword) - except Fault as f: - raise convertFault(f) - - def getCustomKWResult(self, target_case_name, sim_id, keyword): - """ - Retrieve a CustomKW result from the target case. - @type target_case_name: str - @type sim_id: int - @type keyword: str - @rtype: dict[str, Union[float,str]] - @raise KeyError if the server was unable to recognize the keyword - @raise UserWarning if the server was unable to load the data - @raise UserWarning if the simulation (with sim_id) is still running - @raise UserWarning if the keyword is not of the correct type - """ - try: - return self._server_proxy.getCustomKWResult(target_case_name, sim_id, keyword) - except Fault as f: - raise convertFault(f) - - def isCustomKWKey(self, key): - """ - Check if a key is of CustomKW type - @param key: The key to check - @type key: str - @rtype: bool - """ - return self._server_proxy.isCustomKWKey(key) - - def isGenDataKey(self, key): - """ - Check if a key is of CustomKW type - @param key: The key to check - @type key: str - @rtype: bool - """ - return self._server_proxy.isGenDataKey(key) - - - def prototypeStorage(self, group_name, storage_definition): - """ - Define the CustomKW with group name and fields with types. - @param group_name: The group name for the CustomKW - @type group_name: str - @param storage_definition: A dictionary with field names (keywords) and types (str or float) - @type storage_definition: dict[str, type] - @raise UserWarning if the group name already exists - @raise TypeError if the type of a keyword/field is unsupported - """ - - converted = {} - for key, value in storage_definition.iteritems(): - if value in (float, str): - value_name = value.__name__ - else: - raise TypeError("Unsupported data type for key: '%s', not one of (float, str): '%s'" % (key, value)) - converted[key] = value_name - try: - self._server_proxy.prototypeStorage(group_name, converted) - except Fault as f: - raise convertFault(f) - - - def storeGlobalData(self, target_case_name, group_name, keyword, value): - """ - Store a value as a CustomKW with group name and keyword. The value will - be stored in all simulations that at least has been initialized. - @param target_case_name: Name of target case - @type target_case_name: str - @param group_name: The name of the CustomKW group - @type group_name: str - @param keyword: The name of the CustomKW keyword - @type keyword: str - @param value: The value to store - @type value: float|int|str - @raise UserWarning if there were issues with the storing - """ - try: - self._server_proxy.storeGlobalData(target_case_name, group_name, keyword, value) - except Fault as f: - raise convertFault(f) - - - def storeSimulationData(self, target_case_name, group_name, keyword, value, sim_id): - """ - Store a single value in a single simulation as a CustomKW with groupname and keyword. - @param target_case_name: Name of target case - @type target_case_name: str - @param group_name: The name of the CustomKW group - @type group_name: str - @param keyword: The name of the CustomKW keyword - @type keyword: str - @param value: The value to store - @type value: float|int|str - @param sim_id: The simulation id (index) - @type sim_id: int - """ - try: - self._server_proxy.storeSimulationData(target_case_name, group_name, keyword, value, sim_id) - except Fault as f: - raise convertFault(f) - diff --git a/ThirdParty/Ert/python/python/ert/server/ertrpcserver.py b/ThirdParty/Ert/python/python/ert/server/ertrpcserver.py deleted file mode 100644 index 1ef6858942..0000000000 --- a/ThirdParty/Ert/python/python/ert/server/ertrpcserver.py +++ /dev/null @@ -1,340 +0,0 @@ -import os -from SimpleXMLRPCServer import SimpleXMLRPCServer -from threading import Lock -from xmlrpclib import Fault - -from ert import Version -from ert.enkf import EnKFMain, NodeId -from ert.enkf.config import CustomKWConfig -from ert.enkf.data import EnkfNode, CustomKW -from ert.enkf.enums import RealizationStateEnum, EnkfVarType, ErtImplType -from ert.server import SimulationContext -from ert.server.ertrpcclient import FAULT_CODES - - -def checkRealizationState(state): - return state == RealizationStateEnum.STATE_INITIALIZED or state == RealizationStateEnum.STATE_HAS_DATA - - -class Session: - def __init__(self): - self.init_case_name = None - """ :type: str """ - - self.simulation_context = None - """ :type: SimulationContext """ - - self.batch_number = 0 - self.lock = Lock() - - -INVERSE_FAULT_CODES = {value:key for key, value in FAULT_CODES.iteritems()} - -def createFault(error, message): - error_code = INVERSE_FAULT_CODES[error] - return Fault(error_code, message) - - - -class ErtRPCServer(SimpleXMLRPCServer): - def __init__(self, config, host="localhost", port=0, log_requests=False, verbose_queue=False): - SimpleXMLRPCServer.__init__(self, (host, port), allow_none=True, logRequests=log_requests) - self._host = host - self._verbose_queue = verbose_queue - # https: server.socket = ssl.wrap_socket(srv.socket, ...) - - if isinstance(config, EnKFMain): - self._config = config - self._config_file = config.getUserConfigFile() - else: - if os.path.exists(config): - self._config = EnKFMain(config) - self._config_file = config - else: - raise IOError("The ert config file: %s does not exist" % config) - - self._session = Session() - - self.register_function(self.ertVersion) - self.register_function(self.getTimeMap) - self.register_function(self.isRunning) - self.register_function(self.isInitializationCaseAvailable) - self.register_function(self.startSimulationBatch) - self.register_function(self.addSimulation) - self.register_function(self.isRealizationFinished) - self.register_function(self.didRealizationSucceed) - self.register_function(self.didRealizationFail) - self.register_function(self.getGenDataResult) - self.register_function(self.getCustomKWResult) - self.register_function(self.isCustomKWKey) - self.register_function(self.isGenDataKey) - self.register_function(self.prototypeStorage) - self.register_function(self.storeGlobalData) - self.register_function(self.storeSimulationData) - - @property - def port(self): - return self.server_address[1] - - @property - def host(self): - return self._host - - @property - def ert(self): - return self._config - - def start(self): - self.serve_forever() - - def stop(self): - if self._session.simulation_context is not None: - if self._session.simulation_context.isRunning(): - self.ert.siteConfig().getJobQueue().killAllJobs() - self.shutdown() - self.server_close() - self._config = None - - def ertVersion(self): - return Version.currentVersion().versionTuple() - - def getTimeMap(self, target_case_name): - enkf_fs_manager = self.ert.getEnkfFsManager() - enkf_fs = enkf_fs_manager.getFileSystem(target_case_name) - time_map = enkf_fs.getTimeMap() - return [time_step.datetime() for time_step in time_map] - - def isRunning(self): - if self._session.simulation_context is not None: - return self._session.simulation_context.isRunning() - return False - - def isRealizationFinished(self, iens): - if self._session.simulation_context is None: - raise createFault(UserWarning, "The simulation batch has not been initialized") - - if self._session.simulation_context.isRealizationQueued(iens): - return self._session.simulation_context.isRealizationFinished(iens) - return False - - def didRealizationSucceed(self, iens): - if self._session.simulation_context is not None and self._session.simulation_context.isRealizationQueued(iens): - return self._session.simulation_context.didRealizationSucceed(iens) - return False - - def didRealizationFail(self, iens): - if self._session.simulation_context is not None and self._session.simulation_context.isRealizationQueued(iens): - return self._session.simulation_context.didRealizationFail(iens) - return False - - - def isInitializationCaseAvailable(self): - return self._session.init_case_name is not None - - - def startSimulationBatch(self, initialization_case_name, simulation_count): - with self._session.lock: - if not self.isRunning(): - self._session.simulation_context = None - self._session.init_case_name = initialization_case_name - - self.ert.addDataKW("", str(self._session.batch_number)) - self.ert.addDataKW("", str(self._session.batch_number)) - self._session.batch_number += 1 - self._session.simulation_context = SimulationContext(self.ert, simulation_count, verbose=self._verbose_queue) - - - def _getInitializationCase(self): - return self.ert.getEnkfFsManager().getFileSystem(self._session.init_case_name) - - - def addSimulation(self, target_case_name, geo_id, pert_id, iens, keywords): - if not self.isRunning(): - raise createFault(UserWarning, "The server is not ready to receive simulations. Have you called startSimulationBatch() first?") - - if self._session.simulation_context.isRealizationQueued(iens): - raise createFault(UserWarning, "Simulation with id: '%d' is already running." % iens) - - state = self.ert.getRealisation(iens) - state.addSubstKeyword("GEO_ID", "%d" % geo_id) - target_fs = self.ert.getEnkfFsManager().getFileSystem(target_case_name) - self._initializeRealization(target_fs, geo_id, iens, keywords) - self._session.simulation_context.addSimulation(iens, target_fs) - - if not target_case_name.startswith("."): - self.ert.getEnkfFsManager().switchFileSystem(target_fs) - - - def _initializeRealization(self, target_fs, geo_id, iens, keywords): - state = self.ert.getRealisation(iens) - ens_config = self.ert.ensembleConfig() - - for kw in ens_config.getKeylistFromVarType(EnkfVarType.PARAMETER): - if not kw in keywords: - node = state[kw] - init_id = NodeId(0, geo_id) - run_id = NodeId(0, iens) - node.load(self._getInitializationCase(), init_id) - node.save(target_fs, run_id) - - for key, value in keywords.iteritems(): - node = state[key] - gen_kw = node.asGenKw() - gen_kw.setValues(value) - - run_id = NodeId(0, iens) - node.save(target_fs, run_id) - - target_fs.fsync() - state_map = target_fs.getStateMap() - state_map[iens] = RealizationStateEnum.STATE_INITIALIZED - - - def getGenDataResult(self, target_case_name, iens, report_step, keyword): - ensemble_config = self.ert.ensembleConfig() - - if not self.isRealizationFinished(iens): - raise createFault(UserWarning, "The simulation with id: %d is still running." % iens) - - if keyword in ensemble_config: - enkf_config_node = self.ert.ensembleConfig().getNode(keyword) - node = EnkfNode(enkf_config_node) - - if not node.getImplType() == ErtImplType.GEN_DATA: - raise createFault(UserWarning, "The keyword is not a GenData keyword.") - - gen_data = node.asGenData() - - fs = self.ert.getEnkfFsManager().getFileSystem(target_case_name) - node_id = NodeId(report_step, iens) - if node.tryLoad(fs, node_id): - data = gen_data.getData() - return data.asList() - else: - raise createFault(UserWarning, "Unable to load data for iens: %d report_step: %d kw: %s for case: %s" % (iens, report_step, keyword, target_case_name)) - else: - raise createFault(KeyError, "The keyword: %s is not recognized" % keyword) - - - def getCustomKWResult(self, target_case_name, iens, keyword): - ensemble_config = self.ert.ensembleConfig() - - if not self.isRealizationFinished(iens): - raise createFault(UserWarning, "The simulation with id: %d is still running." % iens) - - if keyword in ensemble_config: - enkf_config_node = self.ert.ensembleConfig().getNode(keyword) - node = EnkfNode(enkf_config_node) - - if not node.getImplType() == ErtImplType.CUSTOM_KW: - raise createFault(UserWarning, "The keyword is not a CustomKW keyword.") - - custom_kw = node.asCustomKW() - - fs = self.ert.getEnkfFsManager().getFileSystem(target_case_name) - node_id = NodeId(0, iens) - if node.tryLoad(fs, node_id): - config = custom_kw.getConfig() - result = {} - for key in config.getKeys(): - result[key] = custom_kw[key] - return result - else: - raise createFault(UserWarning, "Unable to load data for iens: %d kw: %s for case: %s" % (iens, keyword, target_case_name)) - else: - raise createFault(KeyError, "The keyword: %s is not recognized" % keyword) - - def getFailedCount(self): - if self._session.simulation_context is not None: - return self._session.simulation_context.getNumFailed() - else: - return 0 - - def getRunningCount(self): - if self._session.simulation_context is not None: - return self._session.simulation_context.getNumRunning() - else: - return 0 - - def getSuccessCount(self): - if self._session.simulation_context is not None: - return self._session.simulation_context.getNumSuccess() - else: - return 0 - - def getWaitingCount(self): - if self._session.simulation_context is not None: - return self._session.simulation_context.getNumWaiting() - else: - return 0 - - def getBatchNumber(self): - return self._session.batch_number - - def isCustomKWKey(self, key): - ensemble_config = self.ert.ensembleConfig() - return key in ensemble_config.getKeylistFromImplType(ErtImplType.CUSTOM_KW) - - def isGenDataKey(self, key): - ensemble_config = self.ert.ensembleConfig() - return key in ensemble_config.getKeylistFromImplType(ErtImplType.GEN_DATA) - - - def prototypeStorage(self, group_name, storage_definition): - ensemble_config = self.ert.ensembleConfig() - - if group_name in ensemble_config.getKeylistFromImplType(ErtImplType.CUSTOM_KW): - raise createFault(UserWarning, "The CustomKW with group name: '%s' already exist!" % group_name) - - converted_definition = {} - for key, value in storage_definition.iteritems(): - if value == "str": - converted_definition[key] = str - elif value == "float": - converted_definition[key] = float - else: - raise createFault(TypeError, "Unknown type: '%s' for key '%s'" % (value, key)) - - enkf_config_node = ensemble_config.addDefinedCustomKW(group_name, converted_definition) - self.ert.addNode(enkf_config_node) - - def storeGlobalData(self, target_case_name, group_name, keyword, value): - fs = self.ert.getEnkfFsManager().getFileSystem(target_case_name) - enkf_config_node = self.ert.ensembleConfig().getNode(group_name) - enkf_node = EnkfNode(enkf_config_node) - self._updateCustomKWConfigSet(fs, enkf_config_node) - - realizations = fs.realizationList(RealizationStateEnum.STATE_INITIALIZED | RealizationStateEnum.STATE_HAS_DATA) - - for realization_number in realizations: - self._storeData(enkf_node, fs, group_name, keyword, value, realization_number) - - def storeSimulationData(self, target_case_name, group_name, keyword, value, sim_id): - fs = self.ert.getEnkfFsManager().getFileSystem(target_case_name) - enkf_config_node = self.ert.ensembleConfig().getNode(group_name) - enkf_node = EnkfNode(enkf_config_node) - self._updateCustomKWConfigSet(fs, enkf_config_node) - - self._storeData(enkf_node, fs, group_name, keyword, value, sim_id) - - def _updateCustomKWConfigSet(self, fs, enkf_config_node): - ckwcs = fs.getCustomKWConfigSet() - ckwcs.addConfig(enkf_config_node.getCustomKeywordModelConfig()) - - - def _storeData(self, enkf_node, fs, group_name, keyword, value, realization_number): - node_id = NodeId(0, realization_number) - enkf_node.tryLoad(fs, node_id) # Fetch any data from previous store calls - custom_kw = enkf_node.asCustomKW() - custom_kw[keyword] = value - - if not enkf_node.save(fs, node_id): - raise createFault(UserWarning, "Unable to store data for group: '%s' and key: '%s' into realization: '%d'" % (group_name, keyword, realization_number)) - - - - - - - - diff --git a/ThirdParty/Ert/python/python/ert/server/simulation_context.py b/ThirdParty/Ert/python/python/ert/server/simulation_context.py deleted file mode 100644 index 2eb9624542..0000000000 --- a/ThirdParty/Ert/python/python/ert/server/simulation_context.py +++ /dev/null @@ -1,86 +0,0 @@ -from ert.enkf import ENKF_LIB -from ert.enkf.ert_run_context import ErtRunContext -from ert.enkf.run_arg import RunArg -from ert.job_queue import JobQueueManager -from ert.util import BoolVector, ArgPack, CThreadPool - - -class SimulationContext(object): - def __init__(self, ert, size, verbose=False): - self._ert = ert - """ :type: ert.enkf.EnKFMain """ - self._size = size - - max_runtime = ert.analysisConfig().get_max_runtime() - job_queue = ert.siteConfig().getJobQueue() - job_queue.set_max_job_duration(max_runtime) - - self._queue_manager = JobQueueManager(job_queue) - self._queue_manager.startQueue(size, verbose=verbose) - self._run_args = {} - """ :type: dict[int, RunArg] """ - - self._thread_pool = CThreadPool(8) - self._thread_pool.addTaskFunction("submitJob", ENKF_LIB, "enkf_main_isubmit_job__") - - - def addSimulation(self, iens, target_fs): - if iens >= self._size: - raise UserWarning("Realization number out of range: %d >= %d" % (iens, self._size)) - - if iens in self._run_args: - raise UserWarning("Realization number: '%d' already queued" % iens) - - runpath_fmt = self._ert.getModelConfig().getRunpathFormat() - member = self._ert.getRealisation(iens) - runpath = ErtRunContext.createRunpath(iens , runpath_fmt, member.getDataKW( )) - run_arg = RunArg.createEnsembleExperimentRunArg(target_fs, iens, runpath) - - self._ert.createRunPath(run_arg) - - self._run_args[iens] = run_arg - self._thread_pool.submitJob(ArgPack(self._ert, run_arg)) - - - def isRunning(self): - return self._queue_manager.isRunning() - - - def getNumRunning(self): - return self._queue_manager.getNumRunning() - - - def getNumSuccess(self): - return self._queue_manager.getNumSuccess() - - - def getNumFailed(self): - return self._queue_manager.getNumFailed() - - def getNumWaiting(self): - return self._queue_manager.getNumWaiting() - - - def didRealizationSucceed(self, iens): - queue_index = self._run_args[iens].getQueueIndex() - return self._queue_manager.didJobSucceed(queue_index) - - - def didRealizationFail(self, iens): - # For the purposes of this class, a failure should be anything (killed job, etc) that is not an explicit success. - return not self.didRealizationSucceed(iens) - - - def isRealizationQueued(self, iens): - return iens in self._run_args - - - def isRealizationFinished(self, iens): - run_arg = self._run_args[iens] - - if run_arg.isSubmitted(): - queue_index = run_arg.getQueueIndex() - return self._queue_manager.isJobComplete(queue_index) - else: - return False - diff --git a/ThirdParty/Ert/python/python/ert/test/CMakeLists.txt b/ThirdParty/Ert/python/python/ert/test/CMakeLists.txt deleted file mode 100644 index 36a244aa8a..0000000000 --- a/ThirdParty/Ert/python/python/ert/test/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - ert_test_context.py - ert_test_runner.py - extended_testcase.py - test_run.py - source_enumerator.py - test_area.py - temp_area.py - path_context.py -) - -add_python_package("python.ert.test" ${PYTHON_INSTALL_PREFIX}/ert/test "${PYTHON_SOURCES}" True) - -add_subdirectory(ecl_mock) diff --git a/ThirdParty/Ert/python/python/ert/test/__init__.py b/ThirdParty/Ert/python/python/ert/test/__init__.py deleted file mode 100644 index a6e32a5a82..0000000000 --- a/ThirdParty/Ert/python/python/ert/test/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -from .test_run import TestRun -from .test_run import path_exists -from .extended_testcase import ExtendedTestCase -from .source_enumerator import SourceEnumerator -from .test_area import TestArea , TestAreaContext -from .temp_area import TempArea , TempAreaContext -from .ert_test_runner import ErtTestRunner -from .path_context import PathContext -try: - from .ert_test_context import ErtTestContext, ErtTest -except ImportError: - pass diff --git a/ThirdParty/Ert/python/python/ert/test/ecl_mock/CMakeLists.txt b/ThirdParty/Ert/python/python/ert/test/ecl_mock/CMakeLists.txt deleted file mode 100644 index f9c0405c26..0000000000 --- a/ThirdParty/Ert/python/python/ert/test/ecl_mock/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - ecl_sum_mock.py -) - -# The ecl_mock package is not installed. -add_python_package("python.ert.test.ecl_mock" ${PYTHON_INSTALL_PREFIX}/ert/test/ecl_mock "${PYTHON_SOURCES}" False) diff --git a/ThirdParty/Ert/python/python/ert/test/ert_test_context.py b/ThirdParty/Ert/python/python/ert/test/ert_test_context.py deleted file mode 100644 index 02deaac96d..0000000000 --- a/ThirdParty/Ert/python/python/ert/test/ert_test_context.py +++ /dev/null @@ -1,121 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'test_work_area.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -import os.path - -from cwrap import BaseCClass, CWrapper -from ert.enkf import ENKF_LIB, EnKFMain - -class ErtTest(BaseCClass): - - def __init__(self, test_name, model_config, store_area=False): - if not os.path.exists(model_config): - raise IOError("The configuration file: %s does not exist" % model_config) - else: - c_ptr = ErtTest.cNamespace().alloc(test_name, model_config) - super(ErtTest, self).__init__(c_ptr) - self.setStore(store_area) - - self.__ert = None - - def setStore(self, store): - ErtTest.cNamespace().set_store(self, store) - - def getErt(self): - """ @rtype: EnKFMain """ - if self.__ert is None: - self.__ert = ErtTest.cNamespace().get_enkf_main(self) - - return self.__ert - - def free(self): - ert = self.getErt() - ert.umount() - ErtTest.cNamespace().free(self) - - def installWorkflowJob(self, job_name, job_path): - """ @rtype: bool """ - if os.path.exists(job_path) and os.path.isfile(job_path): - ert = self.getErt() - workflow_list = ert.getWorkflowList() - - workflow_list.addJob(job_name, job_path) - return workflow_list.hasJob(job_name) - else: - return False - - def runWorkflowJob(self, job_name, *arguments): - """ @rtype: bool """ - ert = self.getErt() - workflow_list = ert.getWorkflowList() - - if workflow_list.hasJob(job_name): - job = workflow_list.getJob(job_name) - job.run(ert, [arg for arg in arguments]) - return True - else: - return False - - - def getCwd(self): - """ - Returns the current working directory of this context. - @rtype: string - """ - return ErtTest.cNamespace().get_cwd( self ) - - - -class ErtTestContext(object): - def __init__(self, test_name, model_config, store_area=False): - self.__test_name = test_name - self.__model_config = model_config - self.__store_area = store_area - self.__test_context = ErtTest(self.__test_name, self.__model_config, store_area=self.__store_area) - - - def __enter__(self): - """ @rtype: ErtTest """ - return self.__test_context - - - def __exit__(self, exc_type, exc_val, exc_tb): - del self.__test_context - return False - - - def getErt(self): - return self.__test_context.getErt() - - - def getCwd(self): - """ - Returns the current working directory of this context. - @rtype: string - """ - return self.__test_context.getCwd() - - - - -cwrapper = CWrapper(ENKF_LIB) -cwrapper.registerObjectType("ert_test", ErtTest) - -ErtTest.cNamespace().alloc = cwrapper.prototype("c_void_p ert_test_context_alloc_python( char* , char*)") -ErtTest.cNamespace().set_store = cwrapper.prototype("c_void_p ert_test_context_set_store( ert_test , bool)") -ErtTest.cNamespace().free = cwrapper.prototype("void ert_test_context_free( ert_test )") -ErtTest.cNamespace().get_enkf_main = cwrapper.prototype("enkf_main_ref ert_test_context_get_main( ert_test )") -ErtTest.cNamespace().get_cwd = cwrapper.prototype("char* ert_test_context_get_cwd( ert_test )") - diff --git a/ThirdParty/Ert/python/python/ert/test/extended_testcase.py b/ThirdParty/Ert/python/python/ert/test/extended_testcase.py deleted file mode 100644 index 31ad8e3de7..0000000000 --- a/ThirdParty/Ert/python/python/ert/test/extended_testcase.py +++ /dev/null @@ -1,226 +0,0 @@ -import numbers -import os -import os.path -import traceback - -try: - from unittest2 import TestCase -except ImportError: - from unittest import TestCase - -from .source_enumerator import SourceEnumerator -from ert.util import installAbortSignals -from ert.util import Version - -class _AssertNotRaisesContext(object): - - def __init__(self, test_class): - super(_AssertNotRaisesContext, self).__init__() - self._test_class = test_class - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, tb): - if exc_type is not None: - try: - exc_name = exc_type.__name__ - except AttributeError: - exc_name = str(exc_type) - self._test_class.fail("Exception: %s raised\n%s" % (exc_name, traceback.print_exception(exc_type, exc_value, tb))) - return True - - -""" -This class provides some extra functionality for testing values that are almost equal. -""" -class ExtendedTestCase(TestCase): - def __init__(self , *args , **kwargs): - self.__testdata_root = None - self.__share_root = None - installAbortSignals() - super(ExtendedTestCase , self).__init__(*args , **kwargs) - - - def assertFloatEqual(self, first, second, msg=None): - - if msg is None: - msg = "Value %f and %f are not almost equal!" % (first, second) - - if isinstance(first, numbers.Number) and isinstance(second, numbers.Number): - tolerance = 1e-6 - diff = abs(first - second) - scale = max(1, abs(first) + abs(second)) - - self.assertTrue(diff < tolerance * scale, msg=msg) - else: - self.fail("Elements not comparable as float: %s and %s" % (first, second)) - - - def assertAlmostEqualList(self, first, second, msg=None): - if len(first) != len(second): - self.fail("Lists are not of same length!") - - for index in range(len(first)): - self.assertFloatEqual(first[index], second[index], msg=msg) - - - def assertImportable(self, module_name): - try: - __import__(module_name) - except ImportError: - tb = traceback.format_exc() - self.fail("Module %s not found!\n\nTrace:\n%s" % (module_name, str(tb))) - except Exception: - tb = traceback.format_exc() - self.fail("Import of module %s caused errors!\n\nTrace:\n%s" % (module_name, str(tb))) - - - def assertFilesAreEqual(self, first, second): - if not self.__filesAreEqual(first, second): - self.fail("Buffer contents of files are not identical!") - - - def assertFilesAreNotEqual(self, first, second): - if self.__filesAreEqual(first, second): - self.fail("Buffer contents of files are identical!") - - def assertFileExists(self, path): - if not os.path.exists(path) or not os.path.isfile(path): - self.fail("The file: %s does not exist!" % path) - - def assertDirectoryExists(self, path): - if not os.path.exists(path) or not os.path.isdir(path): - self.fail("The directory: %s does not exist!" % path) - - def assertFileDoesNotExist(self, path): - if os.path.exists(path) and os.path.isfile(path): - self.fail("The file: %s exists!" % path) - - def assertDirectoryDoesNotExist(self, path): - if os.path.exists(path) and os.path.isdir(path): - self.fail("The directory: %s exists!" % path) - - def __filesAreEqual(self, first, second): - buffer1 = open(first).read() - buffer2 = open(second).read() - - return buffer1 == buffer2 - - def assertEnumIsFullyDefined(self, enum_class, enum_name, source_path, verbose=False): - enum_values = SourceEnumerator.findEnumerators(enum_name, source_path) - - for identifier, value in enum_values: - if verbose: - print("%s = %d" % (identifier, value)) - - self.assertTrue(enum_class.__dict__.has_key(identifier), "Enum does not have identifier: %s" % identifier) - class_value = enum_class.__dict__[identifier] - self.assertEqual(class_value, value, "Enum value for identifier: %s does not match: %s != %s" % (identifier, class_value, value)) - - - def setTestDataRoot(self, testdata_root): - self.__testdata_root = testdata_root - if not os.path.exists(self.__testdata_root): - raise IOError("Path:%s not found" % self.__testdata_root) - - def setShareRoot(self, share_root): - self.__share_root = share_root - if not os.path.exists(self.__share_root): - raise IOError("Path: %s not found" % self.__share_root) - - - def createTestPath(self, path, testdata_root=None): - if testdata_root is None and self.__testdata_root is None: - file_path = os.path.realpath(__file__) - build_root = os.path.realpath(os.path.join(os.path.dirname(file_path), "../../../../test-data/")) - site_packages_build_root = os.path.realpath(os.path.join(os.path.dirname(file_path), "../../../../../../test-data/")) - src_root = os.path.realpath(os.path.join(os.path.dirname(file_path), "../../../../test-data/")) - env_root = os.getenv("ERT_TEST_ROOT_PATH") - - if env_root is not None and os.path.exists(env_root): - root = os.path.realpath(env_root) - elif os.path.exists(build_root): - root = os.path.realpath(build_root) - elif os.path.exists(site_packages_build_root): - root = os.path.realpath(site_packages_build_root) - elif os.path.exists(src_root): - root = os.path.realpath(src_root) - else: - root = None - - self.setTestDataRoot(root) - - root_path = self.__testdata_root - if testdata_root is not None: - if not os.path.exists(testdata_root): - raise IOError("Path: %s not found" % testdata_root) - - root_path = testdata_root - - return os.path.realpath(os.path.join(root_path , path)) - - - def createSharePath(self, path, share_root=None): - if share_root is None and self.__share_root is None: - self.setShareRoot(ExtendedTestCase.findShareRoot()) - - root_path = self.__share_root - if share_root is not None: - if not os.path.exists(share_root): - raise IOError("Path: %s not found" % share_root) - - root_path = share_root - - return os.path.realpath(os.path.join(root_path , path)) - - - @staticmethod - def findShareRoot(): - file_path = os.path.realpath(__file__) - build_root = os.path.realpath(os.path.join(os.path.dirname(file_path), "../../../../share/")) - site_packages_build_root = os.path.realpath(os.path.join(os.path.dirname(file_path), "../../../../../../share/")) - src_root = os.path.realpath(os.path.join(os.path.dirname(file_path), "../../../../share/")) - env_root = os.getenv("ERT_SHARE_PATH") - - if env_root is not None and os.path.exists(env_root): - root = os.path.realpath(env_root) - elif os.path.exists(build_root): - root = os.path.realpath(build_root) - elif os.path.exists(site_packages_build_root): - root = os.path.realpath(site_packages_build_root) - elif os.path.exists(src_root): - root = os.path.realpath(src_root) - else: - root = None - - return root - - def assertNotRaises(self, func=None): - - context = _AssertNotRaisesContext(self) - if func is None: - return context - - with context: - func() - - @staticmethod - def slowTestShouldNotRun(): - """ - @param: The slow test flag can be set by environment variable SKIP_SLOW_TESTS = [True|False] - """ - - return os.environ.get("SKIP_SLOW_TESTS", "False") == "True" - - - @staticmethod - def requireVersion(major , minor , micro = "git"): - required_version = Version(major, minor , micro) - current_version = Version.currentVersion() - - if required_version < current_version: - return True - else: - return False - diff --git a/ThirdParty/Ert/python/python/ert/test/source_enumerator.py b/ThirdParty/Ert/python/python/ert/test/source_enumerator.py deleted file mode 100644 index 7fde930a43..0000000000 --- a/ThirdParty/Ert/python/python/ert/test/source_enumerator.py +++ /dev/null @@ -1,73 +0,0 @@ -import os -import re - -class SourceEnumerator(object): - @classmethod - def findDevRoot(cls, root_directory_name = ".", verbose=False): - dev_root = os.path.dirname(os.path.realpath(__file__)) - while True: - if verbose: - print("Looking at: %s" % dev_root) - - dev_path = os.path.join(dev_root , root_directory_name) - if os.path.exists( os.path.join(dev_path, root_directory_name, "libecl", "include", "ert", "ecl", "ecl_region.h") ): - dev_root = os.path.join(dev_root , root_directory_name) - if verbose: - print("break: %s" % dev_path) - break - - head, tail = os.path.split(dev_root) - dev_root = head - if tail == "": - raise ValueError("Source root: '%s' not found!" % root_directory_name) - - if verbose: - print("Returning: %s " % dev_root) - - return dev_root - - - @classmethod - def findSourceFile(cls, path): - dev_root = SourceEnumerator.findDevRoot() - - source_file = os.path.join(dev_root, path) - - if not os.path.exists(source_file): - raise ValueError("File not found: %s:%s" % (path , source_file)) - - return source_file - - @classmethod - def removeComments(cls, code_string): - code_string = re.sub(re.compile("/\*.*?\*/",re.DOTALL ) ,"" ,code_string) # remove all occurance streamed comments (/*COMMENT */) from string - code_string = re.sub(re.compile("//.*?\n" ) ,"" ,code_string) # remove all occurance singleline comments (//COMMENT\n ) from string - return code_string - - @classmethod - def findEnum(cls, enum_name, full_source_file_path): - with open(full_source_file_path, "r") as f: - text = f.read() - - text = SourceEnumerator.removeComments(text) - - enum_pattern = re.compile("typedef\s+enum\s+\{(.*?)\}\s*(\w+?);", re.DOTALL) - - for enum in enum_pattern.findall(text): - if enum[1] == enum_name: - return enum[0] - - raise ValueError("Enum with name: '%s' not found!" % enum_name) - - - @classmethod - def findEnumerators(cls, enum_name, source_file_path): - enum_text = SourceEnumerator.findEnum(enum_name, SourceEnumerator.findSourceFile(source_file_path)) - - enumerator_pattern = re.compile("(\w+?)\s*?=\s*?(\d+)") - - enumerators = [] - for enumerator in enumerator_pattern.findall(enum_text): - enumerators.append((enumerator[0], int(enumerator[1]))) - - return enumerators diff --git a/ThirdParty/Ert/python/python/ert/util/CMakeLists.txt b/ThirdParty/Ert/python/python/ert/util/CMakeLists.txt deleted file mode 100644 index 0bb38e04ba..0000000000 --- a/ThirdParty/Ert/python/python/ert/util/CMakeLists.txt +++ /dev/null @@ -1,33 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - bool_vector.py - buffer.py - ctime.py - cstring.py - double_vector.py - hash.py - int_vector.py - install_abort_signals.py - log.py - lookup_table.py - matrix.py - profiler.py - rng.py - stat.py - stringlist.py - substitution_list.py - thread_pool.py - cthread_pool.py - time_vector.py - ui_return.py - util_func.py - vector_template.py - permutation_vector.py - version.py - arg_pack.py - path_format.py -) - -add_python_package("python.ert.util" ${PYTHON_INSTALL_PREFIX}/ert/util "${PYTHON_SOURCES}" True) - -add_subdirectory(enums) diff --git a/ThirdParty/Ert/python/python/ert/util/__init__.py b/ThirdParty/Ert/python/python/ert/util/__init__.py deleted file mode 100644 index 661f6ee4cb..0000000000 --- a/ThirdParty/Ert/python/python/ert/util/__init__.py +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file '__init__.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -""" -Package with utility classes, used by other ERT classes. - -The libutil library implements many utility functions and classes of -things like hash table and vector; these classes are extensively used -by the other ert libraries. The present wrapping here is to facilitate -use and interaction with various ert classes, in a pure python context -you are probably better served by using a plain python solution; -either based on built in python objects or well established third -party packages. - -The modules included in the util package are: - - tvector.py: This module implements the classes IntVector, - DoubleVector and BoolVector. This is a quite normal - implementation of a typed growable vector; but with a special - twist regarding default values. - - util_func.py: This module wraps a couple of stateless (i.e. there is - no class involved) functions from the util.c file. - -""" - -import ert -from cwrap import Prototype - - -class UtilPrototype(Prototype): - lib = ert.load("libert_util") - - def __init__(self, prototype, bind=True): - super(UtilPrototype, self).__init__(UtilPrototype.lib, prototype, bind=bind) - - - -from .version import Version - -from .enums import RngAlgTypeEnum, RngInitModeEnum, LLSQResultEnum - -from .ctime import CTime - -from .permutation_vector import PermutationVector -from .vector_template import VectorTemplate -from .double_vector import DoubleVector -from .int_vector import IntVector -from .bool_vector import BoolVector -from .time_vector import TimeVector -from .stringlist import StringList -from .rng import RandomNumberGenerator -from .matrix import Matrix -from .stat import quantile, quantile_sorted, polyfit -from .log import Log -from .lookup_table import LookupTable -from .buffer import Buffer -from .hash import Hash, StringHash, DoubleHash, IntegerHash -from .substitution_list import SubstitutionList -from .ui_return import UIReturn -from .thread_pool import ThreadPool -from .cthread_pool import CThreadPool, startCThreadPool -from .install_abort_signals import installAbortSignals, updateAbortSignals -from .profiler import Profiler -from .arg_pack import ArgPack -from .path_format import PathFormat - -# This is only imported for the prototype side-effect; no symbols from -# this module are actually used. -import cstring diff --git a/ThirdParty/Ert/python/python/ert/util/cstring.py b/ThirdParty/Ert/python/python/ert/util/cstring.py deleted file mode 100644 index 690c4ef00c..0000000000 --- a/ThirdParty/Ert/python/python/ert/util/cstring.py +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (C) 2015 Statoil ASA, Norway. -# -# The file 'cstring.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - - -import ctypes - -from ert.util import UtilPrototype - -_free = UtilPrototype("void free(void*)") - - -def cStringObject(c_ptr): - """The cStringObject function is a convenience function which creates a - Python string copy, and discards the underlying C allocated storage - for strings created with *alloc() functions in C. - - This function should not be invoked directly, only indirectly - through the prototyping of the symbol 'cstring_obj'. - - """ - if c_ptr is not None: - python_string = ctypes.c_char_p(c_ptr).value - _free(c_ptr) - return python_string - else: - return None - - -UtilPrototype.registerType("cstring_obj", cStringObject) diff --git a/ThirdParty/Ert/python/python/ert/util/enums/CMakeLists.txt b/ThirdParty/Ert/python/python/ert/util/enums/CMakeLists.txt deleted file mode 100644 index a1f96b233e..0000000000 --- a/ThirdParty/Ert/python/python/ert/util/enums/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - rng_alg_type_enum.py - rng_init_mode_enum.py - ui_return_status_enum.py - llsq_result_enum.py -) - -add_python_package("python.ert.util.enums" ${PYTHON_INSTALL_PREFIX}/ert/util/enums "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert/util/ui_return.py b/ThirdParty/Ert/python/python/ert/util/ui_return.py deleted file mode 100644 index 7deb1284ba..0000000000 --- a/ThirdParty/Ert/python/python/ert/util/ui_return.py +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'ui_return.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -from cwrap import BaseCClass -from ert.util import UtilPrototype -from enums import UIReturnStatusEnum - - -class UIReturn(BaseCClass): - TYPE_NAME = "ui_return" - _alloc = UtilPrototype("void* ui_return_alloc( ui_return_status )" , bind = False) - _free = UtilPrototype("void ui_return_free(ui_return)") - _get_status = UtilPrototype("ui_return_status ui_return_get_status(ui_return)") - _get_help = UtilPrototype("char* ui_return_get_help(ui_return)") - _add_help = UtilPrototype("void ui_return_add_help(ui_return)") - _add_error = UtilPrototype("void ui_return_add_error(ui_return)") - _num_error = UtilPrototype("int ui_return_get_error_count(ui_return)") - _last_error = UtilPrototype("char* ui_return_get_last_error(ui_return)") - _first_error = UtilPrototype("char* ui_return_get_first_error(ui_return)") - _iget_error = UtilPrototype("char* ui_return_iget_error(ui_return , int)") - - def __init__(self , status): - c_ptr = self._alloc(status) - super(UIReturn, self).__init__(c_ptr) - - - def __nonzero__(self): - if self.status() == UIReturnStatusEnum.UI_RETURN_OK: - return True - else: - return False - - - def __len__(self): - return self._num_error() - - - def __getitem__(self , index): - if isinstance(index , int): - if 0 <= index < len(self): - return self._iget_error( index) - else: - raise IndexError - else: - raise TypeError("Lookup type must be integer") - - - def iget_error(self , index): - return self[index] - - - def help_text(self): - help_text = self._get_help() - if help_text: - return help_text - else: - return "" - - def add_help(self, help_text): - self._add_help(help_text) - - - def status(self): - return self._get_status() - - - def __assert_error(self): - if self.status() == UIReturnStatusEnum.UI_RETURN_OK: - raise ValueError("Can not add error messages to object in state RETURN_OK") - - - def add_error(self, error): - self.__assert_error() - self._add_error(error) - - - def last_error(self): - self.__assert_error() - return self._last_error() - - - def first_error(self): - self.__assert_error() - return self._first_error() - - - def free(self): - self._free() diff --git a/ThirdParty/Ert/python/python/ert/well/CMakeLists.txt b/ThirdParty/Ert/python/python/ert/well/CMakeLists.txt deleted file mode 100644 index c9601f7487..0000000000 --- a/ThirdParty/Ert/python/python/ert/well/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - well_connection.py - well_connection_direction_enum.py - well_info.py - well_segment.py - well_state.py - well_time_line.py - well_type_enum.py -) - -add_python_package("python.ert.well" ${PYTHON_INSTALL_PREFIX}/ert/well "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert/well/__init__.py b/ThirdParty/Ert/python/python/ert/well/__init__.py deleted file mode 100644 index 9c01489cc3..0000000000 --- a/ThirdParty/Ert/python/python/ert/well/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -import ert -import ert.util -import ert.geo -import ert.ecl - -ECL_WELL_LIB = ert.load("libecl_well") - - -from .well_type_enum import WellTypeEnum -from .well_connection_direction_enum import WellConnectionDirectionEnum -from .well_connection import WellConnection -from .well_segment import WellSegment -from .well_state import WellState -from .well_time_line import WellTimeLine -from .well_info import WellInfo diff --git a/ThirdParty/Ert/python/python/ert/well/well_connection.py b/ThirdParty/Ert/python/python/ert/well/well_connection.py deleted file mode 100644 index 4c6846b98e..0000000000 --- a/ThirdParty/Ert/python/python/ert/well/well_connection.py +++ /dev/null @@ -1,72 +0,0 @@ -from cwrap import BaseCClass, CWrapper -from ert.well import ECL_WELL_LIB - -class WellConnection(BaseCClass): - - def __init__(self): - raise NotImplementedError("Class can not be instantiated directly") - - - def isOpen(self): - """ @rtype: bool """ - return WellConnection.cNamespace().is_open(self) - - - def ijk(self): - """ @rtype: tuple of (int, int, int) """ - i = WellConnection.cNamespace().i(self) - j = WellConnection.cNamespace().j(self) - k = WellConnection.cNamespace().k(self) - return i, j, k - - def direction(self): - """ @rtype: WellConnectionDirectionEnum """ - return WellConnection.cNamespace().get_dir(self) - - def segmentId(self): - """ @rtype: int """ - return WellConnection.cNamespace().segment_id(self) - - def isFractureConnection(self): - """ @rtype: bool """ - return WellConnection.cNamespace().fracture_connection(self) - - def isMatrixConnection(self): - """ @rtype: bool """ - return WellConnection.cNamespace().matrix_connection(self) - - def connectionFactor(self): - """ @rtype: float """ - return WellConnection.cNamespace().connection_factor(self) - - def __eq__(self, other): - return WellConnection.cNamespace().equal(self, other) - - def __ne__(self, other): - return not self == other - - def free(self): - pass - - def isMultiSegmentWell(self): - """ @rtype: bool """ - return WellConnection.cNamespace().is_msw(self) - - -CWrapper.registerObjectType("well_connection", WellConnection) -cwrapper = CWrapper(ECL_WELL_LIB) - - -WellConnection.cNamespace().i = cwrapper.prototype("int well_conn_get_i(well_connection)") -WellConnection.cNamespace().j = cwrapper.prototype("int well_conn_get_j(well_connection)") -WellConnection.cNamespace().k = cwrapper.prototype("int well_conn_get_k(well_connection)") -WellConnection.cNamespace().get_dir = cwrapper.prototype("well_connection_dir_enum well_conn_get_dir(well_connection)") - -WellConnection.cNamespace().segment_id = cwrapper.prototype("int well_conn_get_segment_id(well_connection)") -WellConnection.cNamespace().is_open = cwrapper.prototype("bool well_conn_open(well_connection)") -WellConnection.cNamespace().is_msw = cwrapper.prototype("bool well_conn_MSW(well_connection)") -WellConnection.cNamespace().fracture_connection = cwrapper.prototype("bool well_conn_fracture_connection(well_connection)") -WellConnection.cNamespace().matrix_connection = cwrapper.prototype("bool well_conn_matrix_connection(well_connection)") -WellConnection.cNamespace().connection_factor = cwrapper.prototype("double well_conn_get_connection_factor(well_connection)") - -WellConnection.cNamespace().equal = cwrapper.prototype("bool well_conn_equal(well_connection, well_connection)") diff --git a/ThirdParty/Ert/python/python/ert/well/well_connection_direction_enum.py b/ThirdParty/Ert/python/python/ert/well/well_connection_direction_enum.py deleted file mode 100644 index 594af39c31..0000000000 --- a/ThirdParty/Ert/python/python/ert/well/well_connection_direction_enum.py +++ /dev/null @@ -1,17 +0,0 @@ -from cwrap import BaseCEnum -from ert.well import ECL_WELL_LIB - -class WellConnectionDirectionEnum(BaseCEnum): - well_conn_dirX = None - well_conn_dirY = None - well_conn_dirZ = None - well_conn_fracX = None - well_conn_fracY = None - -WellConnectionDirectionEnum.addEnum("well_conn_dirX", 1) -WellConnectionDirectionEnum.addEnum("well_conn_dirY", 2) -WellConnectionDirectionEnum.addEnum("well_conn_dirZ", 3) -WellConnectionDirectionEnum.addEnum("well_conn_fracX", 4) -WellConnectionDirectionEnum.addEnum("well_conn_fracY", 5) - -WellConnectionDirectionEnum.registerEnum(ECL_WELL_LIB, "well_connection_dir_enum") \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert/well/well_info.py b/ThirdParty/Ert/python/python/ert/well/well_info.py deleted file mode 100644 index 17724ba3c9..0000000000 --- a/ThirdParty/Ert/python/python/ert/well/well_info.py +++ /dev/null @@ -1,102 +0,0 @@ -from cwrap import BaseCClass, CWrapper -from ert.ecl import EclGrid -from ert.ecl.ecl_file import EclFile -from ert.well import ECL_WELL_LIB, WellTimeLine - - -class WellInfo(BaseCClass): - - def __init__(self, grid, rst_file=None, load_segment_information=True): - """ - @type grid: EclGrid - @type rst_file: str or EclFile or list of str or list of EclFile - """ - c_ptr = WellInfo.cNamespace().alloc(grid) - super(WellInfo, self).__init__(c_ptr) - - if rst_file is not None: - if isinstance(rst_file, list): - for item in rst_file: - self.addWellFile(item, load_segment_information) - else: - self.addWellFile(rst_file, load_segment_information) - - - def __len__(self): - """ @rtype: int """ - return WellInfo.cNamespace().get_well_count(self) - - - def __getitem__(self, item): - """ - @type item: int or str - @rtype: WellTimeLine - """ - - if isinstance(item, str): - if not item in self: - raise KeyError("The well '%s' is not in this set." % item) - well_name = item - - elif isinstance(item, int): - if not 0 <= item < len(self): - raise IndexError("Index must be in range 0 <= %d < %d" % (item, len(self))) - well_name = WellInfo.cNamespace().iget_well_name(self, item) - - return WellInfo.cNamespace().get_ts(self, well_name).setParent(self) - - def __iter__(self): - """ @rtype: iterator of WellTimeLine """ - index = 0 - - while index < len(self): - yield self[index] - index += 1 - - - def allWellNames(self): - """ @rtype: list of str """ - return [WellInfo.cNamespace().iget_well_name(self, index) for index in range(0, len(self))] - - - def __contains__(self, item): - """ - @type item: str - @rtype: bool - """ - return WellInfo.cNamespace().has_well(self, item) - - def addWellFile(self, rst_file, load_segment_information): - """ @type rstfile: str or EclFile """ - if isinstance(rst_file, str): - WellInfo.cNamespace().load_rstfile(self, rst_file, load_segment_information) - elif isinstance(rst_file, EclFile): - WellInfo.cNamespace().load_rst_eclfile(self, rst_file, load_segment_information) - else: - raise TypeError("Expected the RST file to be a filename or an EclFile instance.") - - - def hasWell(self , well_name): - return well_name in self - - - def free(self): - WellInfo.cNamespace().free(self) - - -CWrapper.registerObjectType("well_info", WellInfo) - -cwrapper = CWrapper(ECL_WELL_LIB) - -WellInfo.cNamespace().alloc = cwrapper.prototype("c_void_p well_info_alloc(ecl_grid)") -WellInfo.cNamespace().free = cwrapper.prototype("void well_info_free(well_info)") - -WellInfo.cNamespace().load_rstfile = cwrapper.prototype("void well_info_load_rstfile(well_info, char*, bool)") -WellInfo.cNamespace().load_rst_eclfile = cwrapper.prototype("void well_info_load_rst_eclfile(well_info, ecl_file, bool)") - -WellInfo.cNamespace().get_well_count = cwrapper.prototype("int well_info_get_num_wells(well_info)") -WellInfo.cNamespace().iget_well_name = cwrapper.prototype("char* well_info_iget_well_name(well_info, int)") -WellInfo.cNamespace().get_ts = cwrapper.prototype("well_time_line_ref well_info_get_ts(well_info, char*)") - -WellInfo.cNamespace().has_well = cwrapper.prototype("bool well_info_has_well(well_info, char*)") - diff --git a/ThirdParty/Ert/python/python/ert/well/well_segment.py b/ThirdParty/Ert/python/python/ert/well/well_segment.py deleted file mode 100644 index 2e1f34ca41..0000000000 --- a/ThirdParty/Ert/python/python/ert/well/well_segment.py +++ /dev/null @@ -1,76 +0,0 @@ -from cwrap import BaseCClass, CWrapper -from ert.well import ECL_WELL_LIB - -class WellSegment(BaseCClass): - - def __init__(self): - raise NotImplementedError("Class can not be instantiated directly") - - def free(self): - pass - - def __str__(self): - return "{Segment ID:%d BranchID:%d Length:%g}" % (self.id() , self.branchId() , self.length()) - - def id(self): - """ @rtype: int """ - return WellSegment.cNamespace().id(self) - - def linkCount(self): - """ @rtype: int """ - return WellSegment.cNamespace().link_count(self) - - def branchId(self): - """ @rtype: int """ - return WellSegment.cNamespace().branch_id(self) - - def outletId(self): - """ @rtype: int """ - return WellSegment.cNamespace().outlet_id(self) - - def isActive(self): - """ @rtype: bool """ - return WellSegment.cNamespace().active(self) - - def isMainStem(self): - """ @rtype: bool """ - return WellSegment.cNamespace().main_stem(self) - - def isNearestWellHead(self): - """ @rtype: bool """ - return WellSegment.cNamespace().nearest_wellhead(self) - - def depth(self): - """ @rtype: float """ - return WellSegment.cNamespace().depth(self) - - def length(self): - """ @rtype: float """ - return WellSegment.cNamespace().length(self) - - def totalLength(self): - """ @rtype: float """ - return WellSegment.cNamespace().total_length(self) - - def diameter(self): - """ @rtype: float """ - return WellSegment.cNamespace().diameter(self) - - -CWrapper.registerObjectType("well_segment", WellSegment) -cwrapper = CWrapper(ECL_WELL_LIB) - - -WellSegment.cNamespace().active = cwrapper.prototype("bool well_segment_active(well_segment)") -WellSegment.cNamespace().main_stem = cwrapper.prototype("bool well_segment_main_stem(well_segment)") -WellSegment.cNamespace().nearest_wellhead = cwrapper.prototype("bool well_segment_nearest_wellhead(well_segment)") - -WellSegment.cNamespace().id = cwrapper.prototype("int well_segment_get_id(well_segment)") -WellSegment.cNamespace().link_count = cwrapper.prototype("int well_segment_get_link_count(well_segment)") -WellSegment.cNamespace().branch_id = cwrapper.prototype("int well_segment_get_branch_id(well_segment)") -WellSegment.cNamespace().outlet_id = cwrapper.prototype("int well_segment_get_outlet_id(well_segment)") - -WellSegment.cNamespace().depth = cwrapper.prototype("double well_segment_get_depth(well_segment)") -WellSegment.cNamespace().length = cwrapper.prototype("double well_segment_get_length(well_segment)") -WellSegment.cNamespace().total_length = cwrapper.prototype("double well_segment_get_total_length(well_segment)") -WellSegment.cNamespace().diameter = cwrapper.prototype("double well_segment_get_diameter(well_segment)") diff --git a/ThirdParty/Ert/python/python/ert/well/well_state.py b/ThirdParty/Ert/python/python/ert/well/well_state.py deleted file mode 100644 index 39a833d186..0000000000 --- a/ThirdParty/Ert/python/python/ert/well/well_state.py +++ /dev/null @@ -1,125 +0,0 @@ -from cwrap import BaseCClass, CWrapper -from ert.well import ECL_WELL_LIB, WellTypeEnum, WellConnection -from ert.util import CTime - - -class WellState(BaseCClass): - - def __init__(self): - raise NotImplementedError("Class can not be instantiated directly") - - - def name(self): - """ @rtype: str """ - return WellState.cNamespace().get_name(self) - - def isOpen(self): - """ @rtype: bool """ - return WellState.cNamespace().is_open(self) - - def free(self): - pass - - def wellNumber(self): - """ @rtype: int """ - return WellState.cNamespace().well_number(self) - - def reportNumber(self): - """ @rtype: int """ - return WellState.cNamespace().report_number(self) - - def simulationTime(self): - """ @rtype: CTime """ - return WellState.cNamespace().sim_time(self) - - def wellType(self): - """ @rtype: WellTypeEnum """ - return WellState.cNamespace().well_type(self) - - def hasGlobalConnections(self): - """ @rtype: bool """ - return WellState.cNamespace().has_global_connections(self) - - def globalConnections(self): - """ @rtype: list of WellConnection """ - global_connections = WellState.cNamespace().get_global_connections(self) - count = WellState.cNamespace().global_connections_size(global_connections) - - values = [] - for index in range(count): - value = WellState.cNamespace().global_connections_iget(global_connections, index).setParent(self) - values.append(value) - return values - - - def numSegments(self): - """ @rtype: int """ - segment_collection = WellState.cNamespace().get_segment_collection(self) - count = WellState.cNamespace().segment_collection_size(segment_collection) - return count - - - def segments(self): - """ @rtype: list of WellSegment """ - segment_collection = WellState.cNamespace().get_segment_collection(self) - - values = [] - for index in range(self.numSegments()): - value = WellState.cNamespace().segment_collection_iget(segment_collection, index).setParent(self) - values.append(value) - - return values - - - def igetSegment(self , segment_index): - """ @rtype: WellSegment """ - if segment_index < 0: - segment_index += len(self) - - if not 0 <= segment_index < self.numSegments(): - raise IndexError("Invalid index:%d - valid range [0,%d)" % (index , len(self))) - - segment_collection = WellState.cNamespace().get_segment_collection(self) - return WellState.cNamespace().segment_collection_iget(segment_collection, segment_index).setParent(self) - - - - # def branches(self): - # """ @rtype: BranchCollection """ - - def isMultiSegmentWell(self): - """ @rtype: bool """ - return WellState.cNamespace().is_msw(self) - - def hasSegmentData(self): - """ @rtype: bool """ - return WellState.cNamespace().has_segment_data(self) - - -CWrapper.registerObjectType("well_state", WellState) -cwrapper = CWrapper(ECL_WELL_LIB) - - -WellState.cNamespace().get_name = cwrapper.prototype("char* well_state_get_name(well_state)") -WellState.cNamespace().is_open = cwrapper.prototype("bool well_state_is_open(well_state)") -WellState.cNamespace().is_msw = cwrapper.prototype("bool well_state_is_MSW(well_state)") -WellState.cNamespace().well_number = cwrapper.prototype("int well_state_get_well_nr(well_state)") -WellState.cNamespace().report_number = cwrapper.prototype("int well_state_get_report_nr(well_state)") -WellState.cNamespace().sim_time = cwrapper.prototype("time_t well_state_get_sim_time(well_state)") -WellState.cNamespace().well_type = cwrapper.prototype("well_type_enum well_state_get_type(well_state)") -WellState.cNamespace().has_segment_data = cwrapper.prototype("bool well_state_has_segment_data(well_state)") - -WellState.cNamespace().has_global_connections = cwrapper.prototype("bool well_state_has_global_connections(well_state)") -WellState.cNamespace().get_global_connections = cwrapper.prototype("c_void_p well_state_get_global_connections(well_state)") -WellState.cNamespace().global_connections_size = cwrapper.prototype("int well_conn_collection_get_size(c_void_p)") -WellState.cNamespace().global_connections_iget = cwrapper.prototype("well_connection_ref well_conn_collection_iget(c_void_p, int)") - - -WellState.cNamespace().get_segment_collection = cwrapper.prototype("c_void_p well_state_get_segments(well_state)") -WellState.cNamespace().segment_collection_size = cwrapper.prototype("int well_segment_collection_get_size(c_void_p)") -WellState.cNamespace().segment_collection_iget = cwrapper.prototype("well_segment_ref well_segment_collection_iget(c_void_p, int)") - - -WellState.cNamespace().branches = cwrapper.prototype("c_void_p well_state_get_branches(well_state)") -WellState.cNamespace().segments = cwrapper.prototype("c_void_p well_state_get_segments(well_state)") - diff --git a/ThirdParty/Ert/python/python/ert/well/well_time_line.py b/ThirdParty/Ert/python/python/ert/well/well_time_line.py deleted file mode 100644 index 1e4050be90..0000000000 --- a/ThirdParty/Ert/python/python/ert/well/well_time_line.py +++ /dev/null @@ -1,38 +0,0 @@ -from cwrap import BaseCClass, CWrapper -from ert.well import ECL_WELL_LIB, WellState - -class WellTimeLine(BaseCClass): - - def __init__(self): - raise NotImplementedError("Class can not be instantiated directly") - - - def __len__(self): - """ @rtype: int """ - return WellTimeLine.cNamespace().size(self) - - - def __getitem__(self, index): - """ - @type index: int - @rtype: WellState - """ - - if index < 0: - index += len(self) - - if not 0 <= index < len(self): - raise IndexError("Index must be in range 0 <= %d < %d" % (index, len(self))) - - return WellTimeLine.cNamespace().iget(self, index).setParent(self) - - - def free(self): - pass - -CWrapper.registerObjectType("well_time_line", WellTimeLine) -cwrapper = CWrapper(ECL_WELL_LIB) - - -WellTimeLine.cNamespace().size = cwrapper.prototype("int well_ts_get_size(well_time_line)") -WellTimeLine.cNamespace().iget = cwrapper.prototype("well_state_ref well_ts_iget_state(well_time_line, int)") diff --git a/ThirdParty/Ert/python/python/ert/well/well_type_enum.py b/ThirdParty/Ert/python/python/ert/well/well_type_enum.py deleted file mode 100644 index 9eb65800fa..0000000000 --- a/ThirdParty/Ert/python/python/ert/well/well_type_enum.py +++ /dev/null @@ -1,17 +0,0 @@ -from cwrap import BaseCEnum -from ert.well import ECL_WELL_LIB - -class WellTypeEnum(BaseCEnum): - ERT_UNDOCUMENTED_ZERO = None - ERT_PRODUCER = None - ERT_WATER_INJECTOR = None - ERT_GAS_INJECTOR = None - ERT_OIL_INJECTOR = None - -WellTypeEnum.addEnum("ERT_UNDOCUMENTED_ZERO", 0) -WellTypeEnum.addEnum("ERT_PRODUCER", 10) -WellTypeEnum.addEnum("ERT_WATER_INJECTOR", 22) -WellTypeEnum.addEnum("ERT_GAS_INJECTOR", 21) -WellTypeEnum.addEnum("ERT_OIL_INJECTOR", 78) - -WellTypeEnum.registerEnum(ECL_WELL_LIB, "well_type_enum") \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/CMakeLists.txt b/ThirdParty/Ert/python/python/ert_gui/CMakeLists.txt deleted file mode 100644 index 6aa1647efb..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - about_dialog.py - ert_splash.py - ertnotifier.py - ertplot.py - gert_main.py - main_window.py - newconfig.py -) - -add_python_package("python.ert_gui" ${PYTHON_INSTALL_PREFIX}/ert_gui "${PYTHON_SOURCES}" True) - -add_subdirectory(ertwidgets) -add_subdirectory(ide) -add_subdirectory(plottery) -add_subdirectory(shell) -add_subdirectory(simulation) -add_subdirectory(tools) diff --git a/ThirdParty/Ert/python/python/ert_gui/README.txt b/ThirdParty/Ert/python/python/ert_gui/README.txt deleted file mode 100644 index 8341e4c175..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/README.txt +++ /dev/null @@ -1,43 +0,0 @@ -How to develop/run the GUI: - -You can run the gui in two ways: - -1a There are CMakeLists.txt files all the ways through the gui filesystem, - and if you build the ert distribution you will get file hierarchy - xxxx/build/python/ert_gui beside the xxxx/build/python/ert hierarchy. - - This is the way the gui should be organized when installed, to invoke the - gui this way: - - gert -v xxxx/build - - Observe that the 'xxxx' part must be an ABSOLUTE path, otherwise the - frontend script will search in the default installation directory. - - -1b Alternatively you can use the gert command to invoke the gui in the source - directory: - - gert -v xxxx/python - - Observe only one 'python' above. - - - -2. You can invoke gui as a python module directly from the source, without - going through the gert frontend script. This requires that set several - environment variables: - - ERT_SITE_CONFIG -> /project/res/etc/ERT/site-config - ERT_SHARE_PATH -> xxxx/libenkf/applications/ert_gui/share - LD_LIBRARY_PATH -> xxxx/build/lib64 - - And in addition you must source the local_csh file in - xxxx/python/test to set the PYTHONPATH correctly. - - -About the ERT_SHARE_PATH variable: the correct value for the ERT_SHARE_PATH -variable is currently xxxx/libenkf/applications/ert_gui/share, so if -you are using alternative 2 you get this one correctly, whereas if you use -alternative 1 it will be set to a generally incorrect value by the gert -frontend script. diff --git a/ThirdParty/Ert/python/python/ert_gui/__init__.py b/ThirdParty/Ert/python/python/ert_gui/__init__.py deleted file mode 100644 index 07c404d1fd..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -import sys -import warnings - -REQUIRED_VERSION_HEX = 0x02070000 - - -if sys.hexversion < REQUIRED_VERSION_HEX: - raise Exception("ERT GUI Python requires at least version 2.7 of Python") - -import os -import matplotlib - -def headless(): - return "DISPLAY" not in os.environ - -if headless(): - matplotlib.use("Agg") -else: - matplotlib.use("Qt4Agg") - - -from .ertnotifier import ERT -from .ertnotifier import configureErtNotifier diff --git a/ThirdParty/Ert/python/python/ert_gui/about_dialog.py b/ThirdParty/Ert/python/python/ert_gui/about_dialog.py deleted file mode 100644 index f63e7fc7ab..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/about_dialog.py +++ /dev/null @@ -1,123 +0,0 @@ -# Copyright (C) 2014 Statoil ASA, Norway. -# -# This file is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -from PyQt4.QtCore import Qt, QSize -from PyQt4.QtGui import QDialog, QVBoxLayout, QPushButton, QHBoxLayout, QLabel, QFont -from ert.util import Version -from ert_gui.ertwidgets import resourceImage - - -class AboutDialog(QDialog): - - def __init__(self, parent): - QDialog.__init__(self, parent) - - self.setWindowTitle("About") - self.setModal(True) - self.setFixedSize(QSize(600, 480)) - self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) - self.setWindowFlags(self.windowFlags() & ~Qt.WindowCloseButtonHint) - self.setWindowFlags(self.windowFlags() & ~Qt.WindowCancelButtonHint) - - main_layout = QVBoxLayout() - - main_layout.addLayout(self.createTopLayout()) - main_layout.addLayout(self.createGplLayout()) - main_layout.addLayout(self.createButtonLayout()) - - self.setLayout(main_layout) - - - def createTopLayout(self): - top_layout = QHBoxLayout() - - image_label = QLabel() - image = resourceImage("splash.jpg") - image_label.setPixmap(image.scaled(200, 240, Qt.KeepAspectRatio)) - - top_layout.addWidget(image_label) - - top_layout.addLayout(self.createInfoLayout(), 1) - - return top_layout - - @staticmethod - def createInfoLayout(): - info_layout = QVBoxLayout() - - ert = QLabel() - ert.setAlignment(Qt.AlignHCenter) - - title_font = QFont() - title_font.setPointSize(40) - ert.setFont(title_font) - ert.setText("ERT") - - info_layout.addWidget(ert) - info_layout.addStretch(1) - ert_title = QLabel() - ert_title.setAlignment(Qt.AlignHCenter) - ert_title.setText("Ensemble based Reservoir Tool") - info_layout.addWidget(ert_title) - - version = QLabel() - version.setAlignment(Qt.AlignHCenter) - version.setText("Version: %s" % Version.getVersion()) - info_layout.addWidget(version) - - timestamp = QLabel() - timestamp.setAlignment(Qt.AlignHCenter) - timestamp.setText("Build time: %s" % Version.getBuildTime()) - info_layout.addWidget(timestamp) - - git_commit = QLabel() - git_commit.setAlignment(Qt.AlignHCenter) - git_commit.setText("Git commit hash: %s" % Version.getGitCommit(short=True)) - info_layout.addWidget(git_commit) - - info_layout.addStretch(5) - - return info_layout - - - def createGplLayout(self): - gpl = QLabel() - gpl.setText("ERT 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.

\ - \ - ERT 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 www.gnu.org for more details. ") - gpl.setWordWrap(True) - gpl_layout = QVBoxLayout() - gpl_layout.addWidget(gpl) - return gpl_layout - - def createButtonLayout(self): - button_layout = QHBoxLayout() - - close_button = QPushButton("Close") - close_button.clicked.connect(self.accept) - - button_layout.addStretch() - button_layout.addWidget(close_button) - button_layout.addStretch() - - return button_layout diff --git a/ThirdParty/Ert/python/python/ert_gui/ert_splash.py b/ThirdParty/Ert/python/python/ert_gui/ert_splash.py deleted file mode 100644 index eda53086e5..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ert_splash.py +++ /dev/null @@ -1,106 +0,0 @@ -from PyQt4.QtCore import Qt -from PyQt4.QtGui import QSplashScreen, QApplication, QColor, QPen, QFont - -from ert_gui.ertwidgets import resourceImage - - -class ErtSplash(QSplashScreen): - def __init__(self): - QSplashScreen.__init__(self) - self.setWindowFlags(Qt.WindowStaysOnTopHint | Qt.SplashScreen) - - splash_width = 720 - splash_height = 400 - - desktop = QApplication.desktop() - screen = desktop.screenGeometry(desktop.primaryScreen()).size() - - screen_width, screen_height = screen.width(), screen.height() - x = screen_width / 2 - splash_width / 2 - y = screen_height / 2 - splash_height / 2 - self.setGeometry(x, y, splash_width, splash_height) - - - self.splash_image = resourceImage("splash.jpg") - - self.ert = "ERT" - self.ert_title = "Ensemble based Reservoir Tool" - self.version = "Version string" - self.timestamp = "Timestamp string" - self.copyright = u"Copyright \u00A9 2016 Statoil ASA, Norway" - - - def drawContents(self, painter): - """ @type painter: QPainter """ - w = self.width() - h = self.height() - - margin = 10 - - background = QColor(210, 211, 215) - text_color = QColor(0, 0, 0) - foreground = QColor(255, 255, 255) - - painter.setBrush(background) - painter.fillRect(0, 0, w, h, background) - - - pen = QPen() - pen.setWidth(2) - pen.setColor(foreground) - - - painter.setPen(pen) - painter.drawRect(0, 0, w - 1, h - 1) - - image_width = self.splash_image.width() - image_height = self.splash_image.height() - aspect = float(image_width) / float(image_height) - - scaled_height = h - 2 * margin - scaled_width = scaled_height * aspect - - painter.drawRect(margin, margin, scaled_width, scaled_height) - painter.drawPixmap(margin, margin, scaled_width, scaled_height, self.splash_image) - - text_x = scaled_width + 2 * margin - top_offset = margin - text_area_width = w - scaled_width - 2 * margin - - painter.setPen(text_color) - - - text_size = 150 - font = QFont("Serif") - font.setStyleHint(QFont.Serif) - font.setPixelSize(text_size) - painter.setFont(font) - painter.drawText(text_x, margin + top_offset, text_area_width, text_size, Qt.AlignHCenter | Qt.AlignCenter, self.ert) - - top_offset += text_size + 2 * margin - text_size = 25 - font.setPixelSize(text_size) - painter.setFont(font) - painter.drawText(text_x, top_offset, text_area_width, text_size, Qt.AlignHCenter | Qt.AlignCenter, self.ert_title) - - top_offset += text_size + 4 * margin - text_size = 20 - font.setPixelSize(text_size) - painter.setFont(font) - painter.drawText(text_x, top_offset, text_area_width, text_size, Qt.AlignHCenter | Qt.AlignCenter, self.version) - - top_offset += text_size + margin - text_size = 15 - font.setPixelSize(text_size) - painter.setFont(font) - painter.drawText(text_x, top_offset, text_area_width, text_size, Qt.AlignHCenter | Qt.AlignCenter, self.timestamp) - - - text_size = 12 - font.setPixelSize(text_size) - painter.setFont(font) - painter.drawText(text_x, h - text_size - margin - 5, text_area_width, text_size + 5, Qt.AlignHCenter | Qt.AlignCenter, self.copyright) - - - - diff --git a/ThirdParty/Ert/python/python/ert_gui/ertnotifier.py b/ThirdParty/Ert/python/python/ert_gui/ertnotifier.py deleted file mode 100644 index bde6aa9527..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertnotifier.py +++ /dev/null @@ -1,51 +0,0 @@ -from ert.enkf import EnKFMain -from PyQt4.QtCore import QObject, pyqtSignal, pyqtSlot - -class ErtNotifier(QObject): - ertChanged = pyqtSignal() - - def __init__(self, ert, config_file, parent=None): - QObject.__init__(self, parent) - self._ert = ert - self._config_file = config_file - - def _checkErt(self): - if self._ert is None: - raise ValueError("Ert is undefined.") - - @property - def ert(self): - """ @rtype: EnKFMain """ - self._checkErt() - return self._ert - - - @property - def config_file(self): - """ @rtype: str """ - self._checkErt() - return self._config_file - - pyqtSlot() - def emitErtChange(self): - print("Emitting ertChanged() - source: %s" % self.sender()) - self._checkErt() - self.ertChanged.emit() - - pyqtSignal() - def reloadERT(self, config_file): - import sys - import os - python_executable = sys.executable - ert_gui_main = sys.argv[0] - - self._ert.free() - os.execl(python_executable, python_executable, ert_gui_main, config_file) - - -ERT = ErtNotifier(None, None) -""" @type: ErtNotifier """ - -def configureErtNotifier(ert, config_file): - ERT._ert = ert - ERT._config_file = config_file diff --git a/ThirdParty/Ert/python/python/ert_gui/ertplot.py b/ThirdParty/Ert/python/python/ert_gui/ertplot.py deleted file mode 100644 index cfe0116333..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertplot.py +++ /dev/null @@ -1,87 +0,0 @@ - -import sys -import os -from PyQt4.QtGui import QApplication -import time -from ert.enkf import EnKFMain -from ert.util import Version -from ert_gui.ert_splash import ErtSplash -from ert_gui.ertwidgets import resourceIcon -from ert_gui.tools.plot.plot_window import PlotWindow - - -import ert_gui.ertwidgets - -if os.getenv("ERT_SHARE_PATH"): - ert_share_path = os.getenv("ERT_SHARE_PATH") -else: - # If the ERT_SHARE_PATH variable is not set we try to use the - # source location relative to the location of the current file; - # assuming we are in the source directory. Will not work if we are - # in an arbitrary build directory. - ert_share_path = os.path.realpath( os.path.join( os.path.dirname( os.path.abspath( __file__)) , "../../../share")) - -ert_gui.ertwidgets.img_prefix = ert_share_path + "/gui/img/" - - -def main(argv): - - app = QApplication(argv) #Early so that QT is initialized before other imports - app.setWindowIcon(resourceIcon("application/window_icon_cutout")) - - if len(argv) == 1: - sys.stderr.write("Missing configuration file") - sys.exit(1) - - config_file = argv[1] - strict = True - - if not os.path.exists(config_file): - print("Can not run without a configuration file.") - sys.exit(1) - - if os.path.isdir(config_file): - print("The specified configuration file is a directory!") - sys.exit(1) - - - splash = ErtSplash() - splash.version = "Version %s" % Version.getVersion() - splash.timestamp = Version.getBuildTime() - - splash.show() - splash.repaint() - - now = time.time() - - - ert = EnKFMain(config_file, strict=strict, verbose=False) - ert_gui.configureErtNotifier(ert, config_file) - - window = PlotWindow(ert, None) - - sleep_time = 2 - (time.time() - now) - - if sleep_time > 0: - time.sleep(sleep_time) - - window.show() - splash.finish(window) - window.activateWindow() - window.raise_() - finished_code = app.exec_() - - ert.free() - - sys.exit(finished_code) - - -if __name__ == "__main__": - main(sys.argv) - - - - - - - diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/CMakeLists.txt b/ThirdParty/Ert/python/python/ert_gui/ertwidgets/CMakeLists.txt deleted file mode 100644 index 70bad08451..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - activelabel.py - analysismoduleselector.py - analysismodulevariablespanel.py - caselist.py - caseselector.py - checklist.py - closabledialog.py - customdialog.py - legend.py - listeditbox.py - pathchooser.py - searchbox.py - stringbox.py - summarypanel.py - validateddialog.py - validationsupport.py -) - -add_python_package("python.ert_gui.ertwidgets" ${PYTHON_INSTALL_PREFIX}/ert_gui/ertwidgets "${PYTHON_SOURCES}" True) - -add_subdirectory(models) diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/__init__.py b/ThirdParty/Ert/python/python/ert_gui/ertwidgets/__init__.py deleted file mode 100644 index 22b33f8907..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/__init__.py +++ /dev/null @@ -1,74 +0,0 @@ -from PyQt4 import QtGui, QtCore - -img_prefix = "" - -def addHelpToWidget(widget, link): - original_enter_event = widget.enterEvent - - def enterEvent(event): - original_enter_event(event) - try: - from ert_gui.tools import HelpCenter - HelpCenter.getHelpCenter("ERT").setHelpMessageLink(link) - except AttributeError: - pass - - widget.enterEvent = enterEvent - - -def showWaitCursorWhileWaiting(func): - """A function decorator to show the wait cursor while the function is working.""" - - def wrapper(*arg): - QtGui.QApplication.setOverrideCursor(QtGui.QCursor(QtCore.Qt.WaitCursor)) - try: - res = func(*arg) - return res - except: - raise - finally: - QtGui.QApplication.restoreOverrideCursor() - - return wrapper - - -def resourceIcon(name): - """Load an image as an icon""" - # print("Icon used: %s" % name) - return QtGui.QIcon(img_prefix + name) - - -def resourceStateIcon(on, off): - """Load two images as an icon with on and off states""" - icon = QtGui.QIcon() - icon.addPixmap(resourceImage(on), state=QtGui.QIcon.On) - icon.addPixmap(resourceImage(off), state=QtGui.QIcon.Off) - return icon - - -def resourceImage(name): - """Load an image as a Pixmap""" - return QtGui.QPixmap(img_prefix + name) - - -def resourceMovie(name): - """ @rtype: QMovie """ - movie = QtGui.QMovie(img_prefix + name) - movie.start() - return movie - - -from .legend import Legend -from .validationsupport import ValidationSupport -from .closabledialog import ClosableDialog -from .analysismoduleselector import AnalysisModuleSelector -from .activelabel import ActiveLabel -from .searchbox import SearchBox -from .caseselector import CaseSelector -from .caselist import CaseList -from .checklist import CheckList -from .stringbox import StringBox -from .listeditbox import ListEditBox -from .customdialog import CustomDialog -from .summarypanel import SummaryPanel -from .pathchooser import PathChooser diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/activelabel.py b/ThirdParty/Ert/python/python/ert_gui/ertwidgets/activelabel.py deleted file mode 100644 index 10d9532320..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/activelabel.py +++ /dev/null @@ -1,28 +0,0 @@ -from PyQt4.QtGui import QLabel, QFont - -from ert_gui.ertwidgets import addHelpToWidget - - -class ActiveLabel(QLabel): - def __init__(self, model, help_link=""): - QLabel.__init__(self) - - addHelpToWidget(self, help_link) - self._model = model - - font = self.font() - font.setWeight(QFont.Bold) - self.setFont(font) - - self._model.valueChanged.connect(self.updateLabel) - - self.updateLabel() - - - def updateLabel(self): - """Retrieves data from the model and inserts it into the edit line""" - model_value = self._model.getValue() - if model_value is None: - model_value = "" - - self.setText(str(model_value)) diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/analysismoduleselector.py b/ThirdParty/Ert/python/python/ert_gui/ertwidgets/analysismoduleselector.py deleted file mode 100644 index 027e0826e6..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/analysismoduleselector.py +++ /dev/null @@ -1,69 +0,0 @@ -from PyQt4.QtCore import QMargins, Qt -from PyQt4.QtGui import QWidget, QHBoxLayout, QComboBox, QToolButton - -from ert_gui.ertwidgets import addHelpToWidget, ClosableDialog, resourceIcon -from ert_gui.ertwidgets.models.ertmodel import getCurrentAnalysisModuleName, getAnalysisModuleNames -from ert_gui.ertwidgets.analysismodulevariablespanel import AnalysisModuleVariablesPanel - - -class AnalysisModuleSelector(QWidget): - def __init__(self, iterable=False, help_link=""): - QWidget.__init__(self) - self._iterable = iterable - - addHelpToWidget(self, help_link) - - layout = QHBoxLayout() - - analysis_module_combo = QComboBox() - - module_names = getAnalysisModuleNames(self._iterable) - for module_name in module_names: - analysis_module_combo.addItem(module_name) - - self._current_module_name = self._getCurrentAnalysisModuleName() - if self._current_module_name is not None: - analysis_module_combo.setCurrentIndex(module_names.index(self._current_module_name)) - - analysis_module_combo.currentIndexChanged[int].connect(self.analysisModuleChanged) - - variables_popup_button = QToolButton() - variables_popup_button.setIcon(resourceIcon("ide/small/cog_edit.png")) - variables_popup_button.clicked.connect(self.showVariablesPopup) - variables_popup_button.setMaximumSize(20, 20) - - layout.addWidget(analysis_module_combo, 0, Qt.AlignLeft) - layout.addWidget(variables_popup_button, 0, Qt.AlignLeft) - layout.setContentsMargins(QMargins(0, 0, 0, 0)) - layout.addStretch() - - self.setLayout(layout) - - def analysisModuleChanged(self, index): - modules = getAnalysisModuleNames(self._iterable) - self._current_module_name = modules[index] - - def _getCurrentAnalysisModuleName(self): - active_name = getCurrentAnalysisModuleName() - modules = getAnalysisModuleNames(self._iterable) - - if active_name in modules: - return active_name - elif "STD_ENKF" in modules and not self._iterable: - return "STD_ENKF" - elif "RML_ENKF" in modules and self._iterable: - return "RML_ENKF" - elif len(modules) > 0: - return modules[0] - - return None - - def getSelectedAnalysisModuleName(self): - return self._current_module_name - - def showVariablesPopup(self): - if self.getSelectedAnalysisModuleName() is not None: - variable_dialog = AnalysisModuleVariablesPanel(self.getSelectedAnalysisModuleName()) - dialog = ClosableDialog("Edit variables", variable_dialog, self.parent()) - - dialog.exec_() diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/analysismodulevariablespanel.py b/ThirdParty/Ert/python/python/ert_gui/ertwidgets/analysismodulevariablespanel.py deleted file mode 100644 index 58bf94a495..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/analysismodulevariablespanel.py +++ /dev/null @@ -1,142 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'analysismodulevariablespanel.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from functools import partial - -from PyQt4.QtCore import QString -from PyQt4.QtGui import QDoubleSpinBox, QWidget, QFormLayout, QCheckBox, QLineEdit, QHBoxLayout, QSpinBox, QLabel - -from ert_gui.ertwidgets.models.analysismodulevariablesmodel import AnalysisModuleVariablesModel - - -class AnalysisModuleVariablesPanel(QWidget): - def __init__(self, analysis_module_name, parent=None): - QWidget.__init__(self, parent) - - self._analysis_module_name = analysis_module_name - - layout = QFormLayout() - variable_names = AnalysisModuleVariablesModel.getVariableNames(self._analysis_module_name) - - if len(variable_names) == 0: - label = QString("No variables found to edit") - boxlayout = QHBoxLayout() - layout.addRow(label, boxlayout) - - else: - analysis_module_variables_model = AnalysisModuleVariablesModel - self.blockSignals(True) - - variable_names2 = self.sortVariables(variable_names) - for variable_name in variable_names2: - variable_type = analysis_module_variables_model.getVariableType(variable_name) - variable_value = analysis_module_variables_model.getVariableValue(self._analysis_module_name, - variable_name) - - label_name = analysis_module_variables_model.getVariableLabelName(variable_name) - if variable_type == bool: - spinner = self.createCheckBox(variable_name, variable_value, variable_type) - - elif variable_type == float: - spinner = self.createDoubleSpinBox(variable_name, variable_value, variable_type, - analysis_module_variables_model) - - elif variable_type == str: - spinner = self.createLineEdit(variable_name, variable_value, variable_type) - - elif variable_type == int: - spinner = self.createSpinBox(variable_name, variable_value, variable_type, - analysis_module_variables_model) - - layout.addRow(label_name, spinner) - if variable_name == "LAMBDA0": - label = QLabel( - " Initial Lambda of -1.00 signifies that the value will be calculated") - layout.addRow(label, None) - - self.setLayout(layout) - self.blockSignals(False) - - def sortVariables(self, variable_list): - analysis_module_variables_model = AnalysisModuleVariablesModel - sorted_list = ["#", "#", "#", "#", "#", "#", "#", "#", "#", "#", "#", "#", "#", "#"] - result = [] - for name in variable_list: - pos = analysis_module_variables_model.getVariablePosition(name) - sorted_list.insert(pos, name) - sorted_list.__delitem__(pos + 1) - - for item in sorted_list: - if item <> "#": - result.append(item) - - return result - - def createSpinBox(self, variable_name, variable_value, variable_type, analysis_module_variables_model): - spinner = QSpinBox() - spinner.setMinimumWidth(75) - spinner.setMaximum(analysis_module_variables_model.getVariableMaximumValue(variable_name)) - spinner.setMinimum(analysis_module_variables_model.getVariableMinimumValue(variable_name)) - spinner.setSingleStep(analysis_module_variables_model.getVariableStepValue(variable_name)) - if variable_value is not None: - spinner.setValue(variable_value) - spinner.valueChanged.connect(partial(self.valueChanged, variable_name, variable_type, spinner)) - return spinner - - def createLineEdit(self, variable_name, variable_value, variable_type): - spinner = QLineEdit() - if variable_value == "None": - spinner.setText("") - else: - spinner.setText(variable_value) - spinner.editingFinished.connect(partial(self.valueChanged, variable_name, variable_type, spinner)) - return spinner - - def createCheckBox(self, variable_name, variable_value, variable_type): - spinner = QCheckBox() - spinner.setChecked(variable_value) - spinner.clicked.connect(partial(self.valueChanged, variable_name, variable_type, spinner)) - return spinner - - def createDoubleSpinBox(self, variable_name, variable_value, variable_type, analysis_module_variables_model): - spinner = QDoubleSpinBox() - spinner.setMinimumWidth(75) - spinner.setMaximum(analysis_module_variables_model.getVariableMaximumValue(variable_name)) - spinner.setMinimum(analysis_module_variables_model.getVariableMinimumValue(variable_name)) - spinner.setSingleStep(analysis_module_variables_model.getVariableStepValue(variable_name)) - spinner.setValue(variable_value) - spinner.valueChanged.connect(partial(self.valueChanged, variable_name, variable_type, spinner)) - return spinner; - - def valueChanged(self, variable_name, variable_type, variable_control): - value = None - if variable_type == bool: - assert isinstance(variable_control, QCheckBox) - value = variable_control.isChecked() - elif variable_type == float: - assert isinstance(variable_control, QDoubleSpinBox) - value = variable_control.value() - elif variable_type == str: - assert isinstance(variable_control, QLineEdit) - value = variable_control.text() - value = str(value).strip() - if len(value) == 0: - value = None - elif variable_type == int: - assert isinstance(variable_control, QSpinBox) - value = variable_control.value() - - if value is not None: - AnalysisModuleVariablesModel.setVariableValue(self._analysis_module_name, variable_name, value) diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/caselist.py b/ThirdParty/Ert/python/python/ert_gui/ertwidgets/caselist.py deleted file mode 100644 index da09206cd7..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/caselist.py +++ /dev/null @@ -1,114 +0,0 @@ -from PyQt4.QtCore import QSize -from PyQt4.QtGui import QListWidget, QMessageBox, QAbstractItemView, QWidget, QVBoxLayout, QLabel -from PyQt4.QtGui import QToolButton, QHBoxLayout - -from ert_gui import ERT -from ert_gui.ertwidgets import addHelpToWidget -from ert_gui.ertwidgets.models.ertmodel import getAllCases, selectOrCreateNewCase -from ert_gui.ertwidgets.validateddialog import ValidatedDialog -from ert_gui.ertwidgets import resourceIcon - - -class AddRemoveWidget(QWidget): - """ - A simple class that provides to vertically positioned buttons for adding and removing something. - The addFunction and removeFunction functions must be provided. - """ - - def __init__(self, addFunction=None, removeFunction=None, horizontal=False): - QWidget.__init__(self) - - self.addButton = QToolButton(self) - self.addButton.setIcon(resourceIcon("add")) - self.addButton.setIconSize(QSize(16, 16)) - self.addButton.clicked.connect(addFunction) - - self.removeButton = QToolButton(self) - self.removeButton.setIcon(resourceIcon("remove")) - self.removeButton.setIconSize(QSize(16, 16)) - self.removeButton.clicked.connect(removeFunction) - - if horizontal: - self.buttonLayout = QHBoxLayout() - else: - self.buttonLayout = QVBoxLayout() - - self.buttonLayout.setMargin(0) - - if horizontal: - self.buttonLayout.addStretch(1) - - self.buttonLayout.addWidget(self.addButton) - self.buttonLayout.addWidget(self.removeButton) - - if not horizontal: - self.buttonLayout.addStretch(1) - else: - self.buttonLayout.addSpacing(2) - - self.setLayout(self.buttonLayout) - - def enableAddButton(self, state): - """Enable or disable the add button""" - self.addButton.setEnabled(state) - - def enableRemoveButton(self, state): - """Enable or disable the remove button""" - self.removeButton.setEnabled(state) - -class CaseList(QWidget): - - def __init__(self): - QWidget.__init__(self) - - addHelpToWidget(self, "init/case_list") - - layout = QVBoxLayout() - - self._list = QListWidget(self) - self._list.setMinimumHeight(100) - self._list.setMaximumHeight(250) - self._default_selection_mode = self._list.selectionMode() - self.setSelectable(False) - - layout.addWidget(QLabel("Available Cases:")) - layout.addWidget(self._list) - - self._addRemoveWidget = AddRemoveWidget(self.addItem, self.removeItem, horizontal=True) - self._addRemoveWidget.enableRemoveButton(False) - layout.addWidget(self._addRemoveWidget) - - self._title = "New keyword" - self._description = "Enter name of keyword:" - - self.setLayout(layout) - - ERT.ertChanged.connect(self.updateList) - self.updateList() - - def setSelectable(self, selectable): - if selectable: - self._list.setSelectionMode(self._default_selection_mode) - else: - self._list.setSelectionMode(QAbstractItemView.NoSelection) - - - def addItem(self): - dialog = ValidatedDialog("New case", "Enter name of new case:", getAllCases()) - new_case_name = dialog.showAndTell() - if not new_case_name == "": - selectOrCreateNewCase(new_case_name) - - def removeItem(self): - message = "Support for removal of items has not been implemented!" - QMessageBox.information(self, "Not implemented!", message) - - - def updateList(self): - """Retrieves data from the model and inserts it into the list""" - case_list = getAllCases() - - self._list.clear() - - for case in case_list: - self._list.addItem(case) diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/caseselector.py b/ThirdParty/Ert/python/python/ert_gui/ertwidgets/caseselector.py deleted file mode 100644 index f3afd9f529..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/caseselector.py +++ /dev/null @@ -1,55 +0,0 @@ -from PyQt4.QtGui import QComboBox - -from ert_gui import ERT -from ert_gui.ertwidgets import addHelpToWidget -from ert_gui.ertwidgets.models.ertmodel import getAllCases, selectOrCreateNewCase, getCurrentCaseName, getAllInitializedCases - - -class CaseSelector(QComboBox): - def __init__(self, update_ert=True, show_only_initialized=False, ignore_current=False, help_link="init/current_case_selection"): - QComboBox.__init__(self) - self._update_ert = update_ert # If true current case of ert will be change - self._show_only_initialized = show_only_initialized # only show initialized cases - self._ignore_current = ignore_current # ignore the currently selected case if it changes - - - addHelpToWidget(self, help_link) - self.setSizeAdjustPolicy(QComboBox.AdjustToContents) - - self.populate() - - self.currentIndexChanged[int].connect(self.selectionChanged) - ERT.ertChanged.connect(self.populate) - - def _getAllCases(self): - if self._show_only_initialized: - return getAllInitializedCases() - else: - return getAllCases() - - def selectionChanged(self, index): - if self._update_ert: - assert 0 <= index < self.count(), "Should not happen! Index out of range: 0 <= %i < %i" % (index, self.count()) - - item = self._getAllCases()[index] - selectOrCreateNewCase(item) - - def populate(self): - block = self.signalsBlocked() - self.blockSignals(True) - - case_list = self._getAllCases() - self.clear() - - for case in case_list: - self.addItem(case) - - current_index = 0 - current_case = getCurrentCaseName() - if current_case in case_list: - current_index = case_list.index(current_case) - - if current_index != self.currentIndex() and not self._ignore_current: - self.setCurrentIndex(current_index) - - self.blockSignals(block) diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/checklist.py b/ThirdParty/Ert/python/python/ert_gui/ertwidgets/checklist.py deleted file mode 100644 index 720ce7e582..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/checklist.py +++ /dev/null @@ -1,150 +0,0 @@ -from PyQt4.QtCore import QSize, Qt -from PyQt4.QtGui import QToolButton, QHBoxLayout, QLabel, QListWidget -from PyQt4.QtGui import QWidget, QVBoxLayout, QListWidgetItem, QMenu, QAbstractItemView - -from ert_gui.ertwidgets import addHelpToWidget, SearchBox, resourceIcon - - -class CheckList(QWidget): - def __init__(self, model, label="", help_link=""): - QWidget.__init__(self) - - self._model = model - - if help_link != "": - addHelpToWidget(self, help_link) - - layout = QVBoxLayout() - - self._createCheckButtons() - - self._list = QListWidget() - self._list.setContextMenuPolicy(Qt.CustomContextMenu) - self._list.setSelectionMode(QAbstractItemView.ExtendedSelection) - - self._search_box = SearchBox() - - check_button_layout = QHBoxLayout() - - check_button_layout.setMargin(0) - check_button_layout.setSpacing(0) - check_button_layout.addWidget(QLabel(label)) - check_button_layout.addStretch(1) - check_button_layout.addWidget(self._checkAllButton) - check_button_layout.addWidget(self._uncheckAllButton) - - layout.addLayout(check_button_layout) - layout.addWidget(self._list) - layout.addWidget(self._search_box) - - self.setLayout(layout) - - self._checkAllButton.clicked.connect(self.checkAll) - self._uncheckAllButton.clicked.connect(self.uncheckAll) - self._list.itemChanged.connect(self.itemChanged) - self._search_box.filterChanged.connect(self.filterList) - self._list.customContextMenuRequested.connect(self.showContextMenu) - - self._model.selectionChanged.connect(self.modelChanged) - self._model.modelChanged.connect(self.modelChanged) - - self.modelChanged() - - def _createCheckButtons(self): - self._checkAllButton = QToolButton() - self._checkAllButton.setIcon(resourceIcon("checked")) - self._checkAllButton.setIconSize(QSize(16, 16)) - self._checkAllButton.setToolButtonStyle(Qt.ToolButtonIconOnly) - self._checkAllButton.setAutoRaise(True) - self._checkAllButton.setToolTip("Select all") - self._uncheckAllButton = QToolButton() - self._uncheckAllButton.setIcon(resourceIcon("notchecked")) - self._uncheckAllButton.setIconSize(QSize(16, 16)) - self._uncheckAllButton.setToolButtonStyle(Qt.ToolButtonIconOnly) - self._uncheckAllButton.setAutoRaise(True) - self._uncheckAllButton.setToolTip("Unselect all") - - def itemChanged(self, item): - """@type item: QListWidgetItem""" - if item.checkState() == Qt.Checked: - self._model.selectValue(str(item.text())) - elif item.checkState() == Qt.Unchecked: - self._model.unselectValue(str(item.text())) - else: - raise AssertionError("Unhandled checkstate!") - - def modelChanged(self): - self._list.clear() - - items = self._model.getList() - - for item in items: - list_item = QListWidgetItem(item) - list_item.setFlags(list_item.flags() | Qt.ItemIsUserCheckable) - - if self._model.isValueSelected(item): - list_item.setCheckState(Qt.Checked) - else: - list_item.setCheckState(Qt.Unchecked) - - self._list.addItem(list_item) - - self.filterList(self._search_box.filter()) - - def setSelectionEnabled(self, enabled): - self.setEnabled(enabled) - self._checkAllButton.setEnabled(enabled) - self._uncheckAllButton.setEnabled(enabled) - - def filterList(self, filter): - filter = filter.lower() - - for index in range(0, self._list.count()): - item = self._list.item(index) - text = str(item.text()).lower() - - if filter == "": - item.setHidden(False) - elif filter in text: - item.setHidden(False) - else: - item.setHidden(True) - - def checkAll(self): - self._model.selectAll() - - def uncheckAll(self): - self._model.unselectAll() - - def checkSelected(self): - items = [] - for item in self._list.selectedItems(): - items.append(str(item.text())) - - for item in items: - self._model.selectValue(item) - - def uncheckSelected(self): - items = [] - for item in self._list.selectedItems(): - items.append(str(item.text())) - - for item in items: - self._model.unselectValue(item) - - def showContextMenu(self, point): - p = self._list.mapToGlobal(point) - menu = QMenu() - check_selected = menu.addAction("Check selected") - uncheck_selected = menu.addAction("Uncheck selected") - menu.addSeparator() - clear_selection = menu.addAction("Clear selection") - - selected_item = menu.exec_(p) - - if selected_item == check_selected: - self.checkSelected() - elif selected_item == uncheck_selected: - self.uncheckSelected() - elif selected_item == clear_selection: - self._list.clearSelection() diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/closabledialog.py b/ThirdParty/Ert/python/python/ert_gui/ertwidgets/closabledialog.py deleted file mode 100644 index b5f20599f1..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/closabledialog.py +++ /dev/null @@ -1,73 +0,0 @@ -# Copyright (C) 2016 Statoil ASA, Norway. -# -# The file 'closabledialog.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -from PyQt4.QtCore import Qt -from PyQt4.QtGui import QDialog, QVBoxLayout, QLayout, QPushButton, QHBoxLayout - - -class ClosableDialog(QDialog): - - def __init__(self, title, widget, parent=None): - QDialog.__init__(self, parent) - - self.setWindowTitle(title) - self.setModal(True) - self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) - self.setWindowFlags(self.windowFlags() & ~Qt.WindowCloseButtonHint) - self.setWindowFlags(self.windowFlags() & ~Qt.WindowCancelButtonHint) - - - layout = QVBoxLayout() - layout.setSizeConstraint(QLayout.SetFixedSize) # not resizable!!! - layout.addWidget(widget) - - self.__button_layout = QHBoxLayout() - self.close_button = QPushButton("Close") - self.close_button.setObjectName("CLOSE") - self.close_button.clicked.connect(self.accept) - self.__button_layout.addStretch() - self.__button_layout.addWidget(self.close_button) - - layout.addStretch() - layout.addLayout(self.__button_layout) - - self.setLayout(layout) - - - def disableCloseButton(self): - self.close_button.setEnabled(False) - - def enableCloseButton(self): - self.close_button.setEnabled(True) - - def keyPressEvent(self, q_key_event): - if not self.close_button.isEnabled() and q_key_event.key() == Qt.Key_Escape: - pass - else: - QDialog.keyPressEvent(self, q_key_event) - - def addButton(self, caption, listner): - button = QPushButton(caption) - button.setObjectName(str(caption).capitalize()) - self.__button_layout.insertWidget(1,button) - button.clicked.connect(listner) - - def toggleButton(self, caption, enabled): - button = self.findChild(QPushButton,str(caption).capitalize()) - if button is not None: - button.setEnabled(enabled) - - diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/customdialog.py b/ThirdParty/Ert/python/python/ert_gui/ertwidgets/customdialog.py deleted file mode 100644 index 1f6e3cffc8..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/customdialog.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file 'customdialog.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from PyQt4.QtCore import Qt, QSize, SIGNAL -from PyQt4.QtGui import QDialog, QColor, QFormLayout, QLabel, QWidget, QDialogButtonBox, QLayout - - -class CustomDialog(QDialog): - INVALID_COLOR = QColor(255, 235, 235) - - def __init__(self, title="Title", description="Description", parent=None): - QDialog.__init__(self, parent) - - self._option_list = [] - """ :type: list of QWidget """ - - self.setModal(True) - self.setWindowTitle(title) - - self.layout = QFormLayout() - self.layout.setFieldGrowthPolicy(QFormLayout.ExpandingFieldsGrow) - self.layout.setSizeConstraint(QLayout.SetFixedSize) - - label = QLabel(description) - label.setAlignment(Qt.AlignHCenter) - - self.layout.addRow(self.createSpace(5)) - self.layout.addRow(label) - self.layout.addRow(self.createSpace(10)) - - self.ok_button = None - - self.setLayout(self.layout) - - def notValid(self, msg): - """Called when the name is not valid.""" - self.ok_button.setEnabled(False) - - def valid(self): - """Called when the name is valid.""" - self.ok_button.setEnabled(True) - - def optionValidationChanged(self): - valid = True - for option in self._option_list: - if hasattr(option, "isValid"): - if not option.isValid(): - valid = False - self.notValid("One or more options are incorrectly set!") - - if valid: - self.valid() - - def showAndTell(self): - """ - Shows the dialog modally and returns the true or false (accept/reject) - @rtype: bool - """ - self.optionValidationChanged() - return self.exec_() - - def createSpace(self, size=5): - """Creates a widget that can be used as spacing on a panel.""" - qw = QWidget() - qw.setMinimumSize(QSize(size, size)) - - return qw - - def addSpace(self, size=10): - """ Add some vertical spacing """ - space_widget = self.createSpace(size) - self.layout.addRow("", space_widget) - - def addLabeledOption(self, label, option_widget): - """ - @type option_widget: QWidget - """ - self._option_list.append(option_widget) - - if hasattr(option_widget, "validationChanged"): - option_widget.validationChanged.connect(self.optionValidationChanged) - - if hasattr(option_widget, "getValidationSupport"): - validation_support = option_widget.getValidationSupport() - validation_support.validationChanged.connect(self.optionValidationChanged) - - self.layout.addRow("%s:" % label, option_widget) - - def addWidget(self, widget, label=""): - if not label.endswith(":"): - label = "%s:" % label - self.layout.addRow(label, widget) - - def addButtons(self): - buttons = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel, Qt.Horizontal, self) - self.ok_button = buttons.button(QDialogButtonBox.Ok) - self.ok_button.setEnabled(False) - - self.layout.addRow(self.createSpace(10)) - self.layout.addRow(buttons) - - self.connect(buttons, SIGNAL('accepted()'), self.accept) - self.connect(buttons, SIGNAL('rejected()'), self.reject) diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/legend.py b/ThirdParty/Ert/python/python/ert_gui/ertwidgets/legend.py deleted file mode 100644 index c7c7221e7e..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/legend.py +++ /dev/null @@ -1,61 +0,0 @@ -from PyQt4.QtCore import QSize -from PyQt4.QtGui import QWidget, QPainter, QHBoxLayout, QLabel - - -class LegendMarker(QWidget): - """A widget that shows a colored box""" - def __init__(self, color): - QWidget.__init__(self) - - self.setMaximumSize(QSize(12, 12)) - self.setMinimumSize(QSize(12, 12)) - - self.color = color - - def paintEvent(self, paintevent): - """Paints the box""" - painter = QPainter(self) - - rect = self.contentsRect() - rect.setWidth(rect.width() - 1) - rect.setHeight(rect.height() - 1) - painter.drawRect(rect) - - rect.setX(rect.x() + 1) - rect.setY(rect.y() + 1) - painter.fillRect(rect, self.color) - -class Legend(QWidget): - """Combines a LegendMarker with a label""" - def __init__(self, legend, color): - QWidget.__init__(self) - - self.setMinimumWidth(140) - self.setMaximumHeight(25) - - self.legend = legend - - layout = QHBoxLayout() - layout.setMargin(0) - - self.legend_marker = LegendMarker(color) - self.legend_marker.setToolTip(legend) - - layout.addWidget(self.legend_marker) - self.legend_label = QLabel(legend) - layout.addWidget(self.legend_label) - layout.addStretch() - - self.setLayout(layout) - - def setLegend(self, legend): - self.legend_label.setText(legend) - - def updateLegend(self, *args): - legend_text = self.legend % args - self.legend_label.setText(legend_text) - self.legend_marker.setToolTip(legend_text) - - def setColor(self, color): - self.legend_marker.color = color - self.legend_marker.update() \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/listeditbox.py b/ThirdParty/Ert/python/python/ert_gui/ertwidgets/listeditbox.py deleted file mode 100644 index bfdf415503..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/listeditbox.py +++ /dev/null @@ -1,186 +0,0 @@ -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file 'pathchooser.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from PyQt4.QtCore import Qt, QSize -from PyQt4.QtGui import QHBoxLayout, QLineEdit, QCompleter, QToolButton, QInputDialog, QMessageBox, QWidget - -from ert_gui.ertwidgets import resourceIcon -from ert_gui.ertwidgets.validationsupport import ValidationSupport - - -class AutoCompleteLineEdit(QLineEdit): - # http://blog.elentok.com/2011/08/autocomplete-textbox-for-multiple.html - def __init__(self, items, parent=None): - super(AutoCompleteLineEdit, self).__init__(parent) - - self._separators = [",", " "] - - self._completer = QCompleter(items, self) - self._completer.setWidget(self) - self._completer.activated[str].connect(self.__insertCompletion) - self._completer.setCaseSensitivity(Qt.CaseInsensitive) - - self.__keysToIgnore = [Qt.Key_Enter, Qt.Key_Return, Qt.Key_Escape, Qt.Key_Tab] - - def __insertCompletion(self, completion): - extra = len(completion) - len(self._completer.completionPrefix()) - extra_text = completion[-extra:] - extra_text += ', ' - self.setText(self.text() + extra_text) - - def textUnderCursor(self): - text = self.text() - text_under_cursor = '' - i = self.cursorPosition() - 1 - while i >= 0 and text[i] not in self._separators: - text_under_cursor = text[i] + text_under_cursor - i -= 1 - return text_under_cursor - - def keyPressEvent(self, event): - if self._completer.popup().isVisible(): - if event.key() in self.__keysToIgnore: - event.ignore() - return - - super(AutoCompleteLineEdit, self).keyPressEvent(event) - - completion_prefix = self.textUnderCursor() - if completion_prefix != self._completer.completionPrefix(): - self.__updateCompleterPopupItems(completion_prefix) - if len(event.text()) > 0 and len(completion_prefix) > 0: - self._completer.complete() - if len(completion_prefix) == 0: - self._completer.popup().hide() - - def __updateCompleterPopupItems(self, completionPrefix): - self._completer.setCompletionPrefix(completionPrefix) - self._completer.popup().setCurrentIndex(self._completer.completionModel().index(0, 0)) - - -class ListEditBox(QWidget): - ITEM_DOES_NOT_EXIST_MSG = "The item: '%s' is not a possible choice." - NO_ITEMS_SPECIFIED_MSG = "The list must contain at least one item or * (for all)." - DEFAULT_MSG = "A list of comma separated case names or * for all." - - def __init__(self, possible_items): - QWidget.__init__(self) - - self._editing = True - self._possible_items = possible_items - - self._list_edit_line = AutoCompleteLineEdit(possible_items, self) - self._list_edit_line.setMinimumWidth(350) - - layout = QHBoxLayout() - layout.setMargin(0) - - layout.addWidget(self._list_edit_line) - - dialog_button = QToolButton(self) - dialog_button.setIcon(resourceIcon("ide/small/add")) - dialog_button.setIconSize(QSize(16, 16)) - dialog_button.clicked.connect(self.addChoice) - - layout.addWidget(dialog_button) - - self.setLayout(layout) - - self._validation_support = ValidationSupport(self) - self._valid_color = self._list_edit_line.palette().color(self._list_edit_line.backgroundRole()) - - self._list_edit_line.setText("") - self._editing = False - - self._list_edit_line.editingFinished.connect(self.validateList) - self._list_edit_line.textChanged.connect(self.validateList) - - self.validateList() - - def getListText(self): - text = str(self._list_edit_line.text()) - text = "".join(text.split()) - return text - - def getItems(self): - text = self.getListText() - items = text.split(",") - - if len(items) == 1 and items[0] == "*": - items = self._possible_items - - return [item for item in items if len(item) > 0] - - def validateList(self): - """Called whenever the list is modified""" - palette = self._list_edit_line.palette() - - items = self.getItems() - - valid = True - message = "" - - if len(items) == 0: - valid = False - message = ListEditBox.NO_ITEMS_SPECIFIED_MSG - else: - for item in items: - if item not in self._possible_items: - valid = False - message = ListEditBox.ITEM_DOES_NOT_EXIST_MSG % item - - validity_type = ValidationSupport.WARNING - - if not valid: - color = ValidationSupport.ERROR_COLOR - else: - color = self._valid_color - - self._validation_support.setValidationMessage(message, validity_type) - self._list_edit_line.setToolTip(message) - palette.setColor(self._list_edit_line.backgroundRole(), color) - - self._list_edit_line.setPalette(palette) - - if valid: - self._list_edit_line.setToolTip(ListEditBox.DEFAULT_MSG) - - def addChoice(self): - if len(self._possible_items) == 0: - QMessageBox.information(self, "No items", "No items available for selection!") - else: - item, ok = QInputDialog.getItem(self, - "Select a case", - "Select a case to add to the case list:", - self._possible_items) - - if ok: - item = str(item).strip() - text = str(self._list_edit_line.text()).rstrip() - - if len(text) == 0: - text = item + ", " - elif text.endswith(","): - text += " " + item - else: - text += ", " + item - - self._list_edit_line.setText(text) - - def getValidationSupport(self): - return self._validation_support - - def isValid(self): - return self._validation_support.isValid() diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/CMakeLists.txt b/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/CMakeLists.txt deleted file mode 100644 index 3adbff2348..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - activerealizationsmodel.py - all_cases_model.py - analysismodulevariablesmodel.py - ertmodel.py - ertsummary.py - path_model.py - selectable_list_model.py - targetcasemodel.py - valuemodel.py -) - -add_python_package("python.ert_gui.ertwidgets.models" ${PYTHON_INSTALL_PREFIX}/ert_gui/ertwidgets/models "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/activerealizationsmodel.py b/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/activerealizationsmodel.py deleted file mode 100644 index 6b749f2231..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/activerealizationsmodel.py +++ /dev/null @@ -1,34 +0,0 @@ -from ert.util import BoolVector -from ert_gui.ertwidgets.models.valuemodel import ValueModel -from ert_gui.ertwidgets.models.ertmodel import getRealizationCount - - -class ActiveRealizationsModel(ValueModel): - def __init__(self): - ValueModel.__init__(self, self.getDefaultValue()) - self._custom = False - - def setValue(self, active_realizations): - if active_realizations is None or active_realizations.strip() == "" or active_realizations == self.getDefaultValue(): - self._custom = False - ValueModel.setValue(self, self.getDefaultValue()) - else: - self._custom = True - ValueModel.setValue(self, active_realizations) - - def getDefaultValue(self): - size = getRealizationCount() - return "0-%d" % (size - 1) - - def getActiveRealizationsMask(self): - count = getRealizationCount() - - mask = BoolVector.createActiveMask(self.getValue()) - - if mask is None: - raise ValueError("Error while parsing range string!") - - if len(mask) > count: - raise ValueError("Mask size changed %d != %d!" % (count, len(mask))) - - return mask diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/all_cases_model.py b/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/all_cases_model.py deleted file mode 100644 index f9cb08a395..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/all_cases_model.py +++ /dev/null @@ -1,69 +0,0 @@ -from PyQt4.QtCore import QAbstractItemModel, QModelIndex, Qt, QVariant - -from ert_gui.ertwidgets.models.ertmodel import getAllCases - - -class AllCasesModel(QAbstractItemModel): - - def __init__(self): - QAbstractItemModel.__init__(self) - self.__data = [] - - def index(self, row, column, parent=None, *args, **kwargs): - return self.createIndex(row, column, parent) - - def parent(self, index=None): - return QModelIndex() - - def rowCount(self, parent=None, *args, **kwargs): - items = self.getAllItems() - return len(items) - - def columnCount(self, QModelIndex_parent=None, *args, **kwargs): - return 1 - - - def data(self, index, role=None): - assert isinstance(index, QModelIndex) - - if index.isValid(): - items = self.getAllItems() - row = index.row() - item = items[row] - - if role == Qt.DisplayRole: - return item - - return QVariant() - - def itemAt(self, index): - assert isinstance(index, QModelIndex) - - if index.isValid(): - row = index.row() - return self.getAllItems()[row] - - return None - - - def getAllItems(self): - return getAllCases() - - - def indexOf(self, item): - items = self.getAllItems() - - if item in items: - - return items.index(item) - - return -1 - - - - - - - - - diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/analysismodulevariablesmodel.py b/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/analysismodulevariablesmodel.py deleted file mode 100644 index 539a17cf8c..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/analysismodulevariablesmodel.py +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'analysismodulevariablesmodel.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from ert.analysis.analysis_module import AnalysisModule -from ert_gui import ERT -from ert_gui.ertwidgets.models.ertmodel import getRealizationCount - -class AnalysisModuleVariablesModel(object): - - _VARIABLE_NAMES = { - "LAMBDA0": {"type": float, "min": -1, "max": 10000000000000, "step":1.0, "labelname":"Initial Lambda", "pos":0}, - "USE_PRIOR": {"type": bool, "labelname":"Use both Prior and Observation Variability", "pos":1}, - "LAMBDA_REDUCE": {"type": float, "min": 0, "max": 1, "step":0.1, "labelname":"Lambda Reduction Factor", "pos":2}, - "LAMBDA_INCREASE": {"type": float, "min": 1, "max": 10, "step":0.1, "labelname":"Lambda Incremental Factor", "pos":3}, - "LAMBDA_MIN": {"type": float, "min": 0, "max": 10, "step":0.1, "labelname":"Minimum Lambda", "pos":4}, - "LOG_FILE": {"type": str, "labelname":"Log File", "pos":5}, - "CLEAR_LOG": {"type": bool, "labelname":"Clear Existing Log File", "pos":6}, - "LAMBDA_RECALCULATE": {"type": bool, "labelname":"Recalculate Lambda after each Iteration", "pos":7}, - "ENKF_TRUNCATION" :{"type": float, "min": 0, "max": 1, "step":0.1, "labelname":"Singular value truncation", "pos":9}, - "ENKF_NCOMP": {"type": int, "min": -1, "max": 10, "step":1.0, "labelname":"ENKF_NCOMP", "pos":10}, - "CV_NFOLDS": {"type": int, "min": 2, "max": 9999, "step":1.0, "labelname":"CV_NFOLDS", "pos":11}, - "FWD_STEP_R2_LIMIT":{"type": float, "min": -1, "max": 100, "step":1.0, "labelname":"FWD_STEP_R2_LIMIT", "pos":12}, - "CV_PEN_PRESS": {"type": bool, "labelname":"CV_PEN_PRESS", "pos":13} - } - - @classmethod - def getVariableNames(cls, analysis_module_name): - """ @rtype: list of str """ - analysis_module = ERT.ert.analysisConfig().getModule(analysis_module_name) - assert isinstance(analysis_module, AnalysisModule) - items = [] - for name in cls._VARIABLE_NAMES: - if analysis_module.hasVar(name): - items.append(name) - return items - - @classmethod - def getVariableType(cls, name): - return cls._VARIABLE_NAMES[name]["type"] - - @classmethod - def getVariableMaximumValue(cls, name): - if name == "CV_NFOLDS": - return getRealizationCount() - 1 - - return cls._VARIABLE_NAMES[name]["max"] - - @classmethod - def getVariableMinimumValue(cls, name): - return cls._VARIABLE_NAMES[name]["min"] - - @classmethod - def getVariableStepValue(cls, name): - return cls._VARIABLE_NAMES[name]["step"] - - @classmethod - def getVariableLabelName(cls, name): - return cls._VARIABLE_NAMES[name]["labelname"] - - @classmethod - def getVariablePosition(cls, name): - return cls._VARIABLE_NAMES[name]["pos"] - - @classmethod - def setVariableValue(cls, analysis_module_name, name, value): - analysis_module = ERT.ert.analysisConfig().getModule(analysis_module_name) - result = analysis_module.setVar(name, str(value)) - - @classmethod - def getVariableValue(cls, analysis_module_name, name): - """ @rtype: int or float or bool or str """ - analysis_module = ERT.ert.analysisConfig().getModule(analysis_module_name) - variable_type = cls.getVariableType(name) - if variable_type == float: - return analysis_module.getDouble(name) - elif variable_type == bool: - return analysis_module.getBool(name) - elif variable_type == str: - return analysis_module.getStr(name) - elif variable_type == int: - return analysis_module.getInt(name) diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/ertmodel.py b/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/ertmodel.py deleted file mode 100644 index 2309faff59..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/ertmodel.py +++ /dev/null @@ -1,172 +0,0 @@ -from ert.analysis.analysis_module import AnalysisModule -from ert.analysis.enums.analysis_module_options_enum import AnalysisModuleOptionsEnum -from ert.enkf import RealizationStateEnum, EnkfVarType -from ert.job_queue import WorkflowRunner -from ert.util import BoolVector, StringList -from ert_gui import ERT -from ert_gui.ertwidgets import showWaitCursorWhileWaiting - - -def getRealizationCount(): - return ERT.ert.getEnsembleSize() - - -def getAllCases(): - """ @rtype: list[str] """ - fs = ERT.ert.getEnkfFsManager().getCurrentFileSystem() - case_list = ERT.ert.getEnkfFsManager().getCaseList() - return [str(case) for case in case_list if not ERT.ert.getEnkfFsManager().isCaseHidden(case)] - - -def caseExists(case_name): - """ @rtype: bool """ - return str(case_name) in getAllCases() - - -def caseIsInitialized(case_name): - """ @rtype: bool """ - return ERT.ert.getEnkfFsManager().isCaseInitialized(case_name) - - -def getAllInitializedCases(): - """ @rtype: list[str] """ - return [case for case in getAllCases() if caseIsInitialized(case)] - - -def getCurrentCaseName(): - """ @rtype: str """ - return str(ERT.ert.getEnkfFsManager().getCurrentFileSystem().getCaseName()) - - -def getHistoryLength(): - """ @rtype: int """ - return ERT.ert.getHistoryLength() - - -@showWaitCursorWhileWaiting -def selectOrCreateNewCase(case_name): - if getCurrentCaseName() != case_name: - fs = ERT.ert.getEnkfFsManager().getFileSystem(case_name) - ERT.ert.getEnkfFsManager().switchFileSystem(fs) - ERT.emitErtChange() - - -def caseHasDataAndIsNotRunning(case): - """ @rtype: bool """ - case_has_data = False - state_map = ERT.ert.getEnkfFsManager().getStateMapForCase(case) - - for state in state_map: - if state == RealizationStateEnum.STATE_HAS_DATA: - case_has_data = True - break - - return case_has_data and not caseIsRunning(case) - - -def getAllCasesWithDataAndNotRunning(): - """ @rtype: list[str] """ - return [case for case in getAllCases() if caseHasDataAndIsNotRunning(case)] - - -def caseIsRunning(case): - """ @rtype: bool """ - return ERT.ert.getEnkfFsManager().isCaseRunning(case) - - -def getAllCasesNotRunning(): - """ @rtype: list[str] """ - return [case for case in getAllCases() if not caseIsRunning(case)] - - -def getCaseRealizationStates(case_name): - """ @rtype: list[ert.enkf.enums.RealizationStateEnum] """ - state_map = ERT.ert.getEnkfFsManager().getStateMapForCase(case_name) - return [state for state in state_map] - - -@showWaitCursorWhileWaiting -def initializeCurrentCaseFromScratch(parameters, members): - selected_parameters = StringList(parameters) - for member in members: - member = int(member.strip()) - ERT.ert.getEnkfFsManager().initializeFromScratch(selected_parameters, member, member) - - ERT.emitErtChange() - - -@showWaitCursorWhileWaiting -def initializeCurrentCaseFromExisting(source_case, target_case, source_report_step, parameters, members): - if caseExists(source_case) and caseIsInitialized(source_case) and caseExists(target_case): - total_member_count = getRealizationCount() - - member_mask = BoolVector.createFromList(total_member_count, members) - selected_parameters = StringList(parameters) - - ERT.ert.getEnkfFsManager().customInitializeCurrentFromExistingCase(source_case, source_report_step, member_mask, - selected_parameters) - - ERT.emitErtChange() - - -def getParameterList(): - """ @rtype: list[str] """ - return [str(p) for p in ERT.ert.ensembleConfig().getKeylistFromVarType(EnkfVarType.PARAMETER)] - - -def getRunPath(): - """ @rtype: str """ - return ERT.ert.getModelConfig().getRunpathAsString() - - -def getNumberOfIterations(): - """ @rtype: int """ - return ERT.ert.analysisConfig().getAnalysisIterConfig().getNumIterations() - - -def setNumberOfIterations(iteration_count): - """ @type iteration_count: int """ - if iteration_count != getNumberOfIterations(): - ERT.ert.analysisConfig().getAnalysisIterConfig().setNumIterations(iteration_count) - ERT.emitErtChange() - - -def getWorkflowNames(): - """ @rtype: list[str] """ - return sorted(ERT.ert.getWorkflowList().getWorkflowNames(), key=str.lower) - - -def createWorkflowRunner(workflow_name): - """ @rtype: WorkflowRunner """ - workflow_list = ERT.ert.getWorkflowList() - - workflow = workflow_list[workflow_name] - context = workflow_list.getContext() - return WorkflowRunner(workflow, ERT.ert, context) - - -def getAnalysisModules(iterable=False): - """ @rtype: list[ert.analysis.AnalysisModule]""" - module_names = ERT.ert.analysisConfig().getModuleList() - - modules = [] - for module_name in module_names: - module = ERT.ert.analysisConfig().getModule(module_name) - module_is_iterable = module.checkOption(AnalysisModuleOptionsEnum.ANALYSIS_ITERABLE) - - if iterable == module_is_iterable: - modules.append(module) - - return sorted(modules, key=AnalysisModule.getName) - -def getAnalysisModuleNames(iterable=False): - """ @rtype: list[str] """ - modules = getAnalysisModules(iterable) - return [module.getName() for module in modules] - - -def getCurrentAnalysisModuleName(): - """ @rtype: str """ - return ERT.ert.analysisConfig().activeModuleName() - - diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/ertsummary.py b/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/ertsummary.py deleted file mode 100644 index 5ad142c39b..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/ertsummary.py +++ /dev/null @@ -1,58 +0,0 @@ -from ert.enkf.enums.enkf_obs_impl_type_enum import EnkfObservationImplementationType -from ert.enkf.enums.enkf_var_type_enum import EnkfVarType -from ert_gui import ERT - -class ErtSummary(object): - - def getForwardModels(self): - """ @rtype: list of str """ - forward_model = ERT.ert.getModelConfig().getForwardModel() - return [job for job in forward_model.joblist()] - - def getParameters(self): - """ @rtype: list of str """ - parameters = ERT.ert.ensembleConfig().getKeylistFromVarType(EnkfVarType.PARAMETER) - return sorted([parameter for parameter in parameters], key=lambda k : k.lower()) - - - def getObservations(self): - """ @rtype: list of str """ - gen_obs = ERT.ert.getObservations().getTypedKeylist(EnkfObservationImplementationType.GEN_OBS) - - - summary_obs = ERT.ert.getObservations().getTypedKeylist(EnkfObservationImplementationType.SUMMARY_OBS) - - keys = [] - summary_keys_count = {} - summary_keys = [] - for key in summary_obs: - data_key = ERT.ert.getObservations()[key].getDataKey() - - if not data_key in summary_keys_count: - summary_keys_count[data_key] = 1 - summary_keys.append(data_key) - else: - summary_keys_count[data_key] += 1 - - if key == data_key: - keys.append(key) - else: - keys.append("%s [%s]" % (key, data_key)) - - # keys = [] - # for key in summary_keys: - # count = summary_keys_count[key] - # if count > 1: - # #keys.append("%s (%d)" % (key, count)) - # keys.append("%s" % key) - # else: - # keys.append(key) - - obs_keys = [observation for observation in gen_obs] + summary_keys - return sorted(obs_keys, key=lambda k : k.lower()) - - - - - - diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/path_model.py b/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/path_model.py deleted file mode 100644 index d755aff584..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/path_model.py +++ /dev/null @@ -1,48 +0,0 @@ -from ert_gui.ertwidgets.models.valuemodel import ValueModel - - -class PathModel(ValueModel): - def __init__(self, default_path, is_required=True, must_be_a_directory=False, must_be_a_file=True, - must_exist=False, must_be_absolute=False, must_be_executable=False): - ValueModel.__init__(self, default_path) - - self._path_is_required = is_required - self._path_must_be_a_directory = must_be_a_directory - self._path_must_be_a_file = must_be_a_file - self._path_must_be_executable = must_be_executable - self._path_must_exist = must_exist - self._path_must_be_absolute = must_be_absolute - - def pathIsRequired(self): - """ @rtype: bool """ - return self._path_is_required - - def pathMustBeADirectory(self): - """ @rtype: bool """ - return self._path_must_be_a_directory - - def pathMustBeAFile(self): - """ @rtype: bool """ - return self._path_must_be_a_file - - def pathMustBeExecutable(self): - """ @rtype: bool """ - return self._path_must_be_executable - - def pathMustExist(self): - """ @rtype: bool """ - return self._path_must_exist - - def pathMustBeAbsolute(self): - """ @rtype: bool """ - return self._path_must_be_absolute - - def getPath(self): - """ @rtype: str """ - return self.getValue() - - def setPath(self, value): - """ - @type value: str - """ - self.setValue(value) diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/selectable_list_model.py b/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/selectable_list_model.py deleted file mode 100644 index d386efeca1..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/selectable_list_model.py +++ /dev/null @@ -1,43 +0,0 @@ -from PyQt4.QtCore import QObject, pyqtSignal - - -class SelectableListModel(QObject): - modelChanged = pyqtSignal() - selectionChanged = pyqtSignal() - - def __init__(self, items): - QObject.__init__(self) - self._selection = {} - self._items = items - - def getList(self): - return self._items - - def isValueSelected(self, value): - return self._selection.get(value, True) - - def selectValue(self, value): - self._setSelectState(value, True) - self.selectionChanged.emit() - - def unselectValue(self, value): - self._setSelectState(value, False) - self.selectionChanged.emit() - - def unselectAll(self): - for item in self.getList(): - self._setSelectState(item, False) - - self.selectionChanged.emit() - - def selectAll(self): - for item in self.getList(): - self._setSelectState(item, True) - - self.selectionChanged.emit() - - def getSelectedItems(self): - return [item for item in self.getList() if self.isValueSelected(item)] - - def _setSelectState(self, key, state): - self._selection[key] = state diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/targetcasemodel.py b/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/targetcasemodel.py deleted file mode 100644 index 6e63798bb1..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/targetcasemodel.py +++ /dev/null @@ -1,36 +0,0 @@ -from ert_gui import ERT -from ert_gui.ertwidgets.models.ertmodel import getCurrentCaseName -from ert_gui.ertwidgets.models.valuemodel import ValueModel - - -class TargetCaseModel(ValueModel): - def __init__(self, format_mode=False): - self._format_mode = format_mode - self._custom = False - ValueModel.__init__(self, self.getDefaultValue()) - ERT.ertChanged.connect(self._caseChanged) - - def setValue(self, target_case): - if target_case is None or target_case.strip() == "" or target_case == self.getDefaultValue(): - self._custom = False - ValueModel.setValue(self, self.getDefaultValue()) - else: - self._custom = True - ValueModel.setValue(self, target_case) - - def getDefaultValue(self): - """ @rtype: str """ - if self._format_mode: - if ERT.ert.analysisConfig().getAnalysisIterConfig().caseFormatSet(): - return ERT.ert.analysisConfig().getAnalysisIterConfig().getCaseFormat() - else: - case_name = getCurrentCaseName() - return "%s_%%d" % case_name - else: - case_name = getCurrentCaseName() - return "%s_smoother_update" % case_name - - - def _caseChanged(self): - if not self._custom: - ValueModel.setValue(self, self.getDefaultValue()) diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/valuemodel.py b/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/valuemodel.py deleted file mode 100644 index b0accc69d2..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/valuemodel.py +++ /dev/null @@ -1,17 +0,0 @@ -from PyQt4.QtCore import QObject, pyqtSignal, pyqtSlot - -class ValueModel(QObject): - valueChanged = pyqtSignal(str) - - def __init__(self, value=""): - super(ValueModel, self).__init__() - self._value = value - - def getValue(self): - """ @rtype: str """ - return self._value - - @pyqtSlot(str) - def setValue(self, value): - self._value = value - self.valueChanged.emit(value) diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/pathchooser.py b/ThirdParty/Ert/python/python/ert_gui/ertwidgets/pathchooser.py deleted file mode 100644 index e8846e0f26..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/pathchooser.py +++ /dev/null @@ -1,207 +0,0 @@ -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file 'pathchooser.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -import os -import re -from PyQt4.QtCore import QSize -from PyQt4.QtGui import QLineEdit, QToolButton, QFileDialog, QWidget, QHBoxLayout - -from ert_gui.ertwidgets import resourceIcon, addHelpToWidget -from ert_gui.ertwidgets.validationsupport import ValidationSupport - - -class PathChooser(QWidget): - """ - PathChooser: shows, enables choosing of and validates paths. - The data structure expected and sent to the models getValue and setValue is a string. - """ - - PATH_DOES_NOT_EXIST_MSG = "The specified path does not exist." - FILE_IS_NOT_EXECUTABLE_MSG = "The specified file is not an executable." - PATH_IS_NOT_A_FILE_MSG = "The specified path must be a file." - PATH_IS_NOT_ABSOLUTE_MSG = "The specified path must be an absolute path." - PATH_IS_NOT_A_DIRECTORY_MSG = "The specified path must be a directory." - REQUIRED_FIELD_MSG = "A path is required." - -# UNDEFINED = 0 -# REQUIRED = 1 -# FILE = 2 -# DIRECTORY = 4 -# MUST_EXIST = 8 -# EXECUTABLE = 16 - - def __init__(self, model, help_link=""): - """ - :type model: ert_gui.ertwidgets.models.path_model.PathModel - :param help_link: str - """ - QWidget.__init__(self) - addHelpToWidget(self, help_link) - self._validation_support = ValidationSupport(self) - - self._editing = True - - layout = QHBoxLayout() - layout.setMargin(0) - - self._path_line = QLineEdit() - self._path_line.setMinimumWidth(250) - - layout.addWidget(self._path_line) - - dialog_button = QToolButton(self) - dialog_button.setIcon(resourceIcon("ide/small/folder")) - dialog_button.setIconSize(QSize(16, 16)) - dialog_button.clicked.connect(self.selectPath) - layout.addWidget(dialog_button) - - self.valid_color = self._path_line.palette().color(self._path_line.backgroundRole()) - - self._path_line.setText(os.getcwd()) - self._editing = False - - self._model = model - self._model.valueChanged.connect(self.getPathFromModel) - - self._path_line.editingFinished.connect(self.validatePath) - self._path_line.editingFinished.connect(self.contentsChanged) - self._path_line.textChanged.connect(self.validatePath) - - self.setLayout(layout) - self.getPathFromModel() - - - def isPathValid(self, path): - """ @rtype: tuple of (bool, str) """ - path = path.strip() - path_exists = os.path.exists(path) - is_file = os.path.isfile(path) - is_directory = os.path.isdir(path) - is_executable = os.access(path, os.X_OK) - is_absolute = os.path.isabs(path) - - valid = True - message = "" - - if path == "": - if self._model.pathIsRequired(): - valid = False - message = PathChooser.REQUIRED_FIELD_MSG - elif not path_exists: - if self._model.pathMustExist(): - valid = False - message = PathChooser.PATH_DOES_NOT_EXIST_MSG - #todo: check if new (non-existing) file has directory or file format? - elif path_exists: - if self._model.pathMustBeExecutable() and is_file and not is_executable: - valid = False - message = PathChooser.FILE_IS_NOT_EXECUTABLE_MSG - elif self._model.pathMustBeADirectory() and not is_directory: - valid = False - message = PathChooser.PATH_IS_NOT_A_DIRECTORY_MSG - elif self._model.pathMustBeAbsolute() and not is_absolute: - valid = False - message = PathChooser.PATH_IS_NOT_ABSOLUTE_MSG - elif self._model.pathMustBeAFile() and not is_file: - valid = False - message = PathChooser.PATH_IS_NOT_A_FILE_MSG - - return valid, message - - - def validatePath(self): - """Called whenever the path is modified""" - palette = self._path_line.palette() - - valid, message = self.isPathValid(self.getPath()) - - validity_type = ValidationSupport.WARNING - - if not valid: - color = ValidationSupport.ERROR_COLOR - else: - color = self.valid_color - - self._validation_support.setValidationMessage(message, validity_type) - self._path_line.setToolTip(message) - palette.setColor(self._path_line.backgroundRole(), color) - - self._path_line.setPalette(palette) - - - def getPath(self): - """Returns the path""" - return os.path.expanduser(str(self._path_line.text()).strip()) - - def pathExists(self): - """Returns True if the entered path exists""" - return os.path.exists(self.getPath()) - - def selectPath(self): - """Pops up the 'select a file/directory' dialog""" - # todo: This probably needs some reworking to work properly with different scenarios... (file + dir) - self._editing = True - current_directory = self.getPath() - - #if not os.path.exists(currentDirectory): - # currentDirectory = "~" - - if self._model.pathMustBeAFile(): - current_directory = QFileDialog.getOpenFileName(self, "Select a file path", current_directory) - else: - current_directory = QFileDialog.getExistingDirectory(self, "Select a directory", current_directory) - - if not current_directory == "": - if not self._model.pathMustBeAbsolute(): - cwd = os.getcwd() - match = re.match(cwd + "/(.*)", current_directory) - if match: - current_directory = match.group(1) - - self._path_line.setText(current_directory) - self._model.setPath(self.getPath()) - - self._editing = False - - - def contentsChanged(self): - """Called whenever the path is changed.""" - path_is_valid, message = self.isPathValid(self.getPath()) - - if not self._editing and path_is_valid: - self._model.setPath(self.getPath()) - - - def getPathFromModel(self): - """Retrieves data from the model and inserts it into the edit line""" - self._editing = True - - path = self._model.getPath() - if path is None: - path = "" - - self._path_line.setText("%s" % path) - self._editing = False - - - def getValidationSupport(self): - return self._validation_support - - def isValid(self): - return self._validation_support.isValid() - - - - diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/searchbox.py b/ThirdParty/Ert/python/python/ert_gui/ertwidgets/searchbox.py deleted file mode 100644 index 52b8a76a40..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/searchbox.py +++ /dev/null @@ -1,69 +0,0 @@ -from PyQt4.QtCore import pyqtSignal, Qt -from PyQt4.QtGui import QLineEdit, QColor - - -class SearchBox(QLineEdit): - passive_color = QColor(194, 194, 194) - - filterChanged = pyqtSignal(['PyQt_PyObject']) - - def __init__(self): - QLineEdit.__init__(self) - - self.setToolTip("Type to search!") - self.active_color = self.palette().color(self.foregroundRole()) - self.disable_search = True - self.presentSearch() - self.textChanged.connect(self.__emitFilterChanged) - - def __emitFilterChanged(self, filter): - self.filterChanged.emit(self.filter()) - # self.emit(SIGNAL('filterChanged(PyQt_PyObject)'), self.filter()) - - def filter(self): - if self.disable_search: - return "" - else: - return str(self.text()) - - def presentSearch(self): - """Is called to present the greyed out search""" - self.disable_search = True - self.setText("Search") - palette = self.palette() - palette.setColor(self.foregroundRole(), self.passive_color) - self.setPalette(palette) - - def activateSearch(self): - """Is called to remove the greyed out search""" - self.disable_search = False - self.setText("") - palette = self.palette() - palette.setColor(self.foregroundRole(), self.active_color) - self.setPalette(palette) - - def enterSearch(self): - """Called when the line edit gets the focus""" - if str(self.text()) == "Search": - self.activateSearch() - - def exitSearch(self): - """Called when the line edit looses focus""" - if str(self.text()) == "": - self.presentSearch() - - def focusInEvent(self, focus_event): - QLineEdit.focusInEvent(self, focus_event) - self.enterSearch() - - def focusOutEvent(self, focus_event): - QLineEdit.focusOutEvent(self, focus_event) - self.exitSearch() - - - def keyPressEvent(self, key_event): - if key_event.key() == Qt.Key_Escape: - self.clear() - self.clearFocus() - else: - QLineEdit.keyPressEvent(self, key_event) \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/stringbox.py b/ThirdParty/Ert/python/python/ert_gui/ertwidgets/stringbox.py deleted file mode 100644 index bdb6c32628..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/stringbox.py +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright (C) 2016 Statoil ASA, Norway. -# -# The file 'stringbox.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - - -from PyQt4.QtGui import QPalette, QLineEdit -from ert_gui.ertwidgets import ValidationSupport, addHelpToWidget -from ert_gui.ertwidgets.models.valuemodel import ValueModel - - -class StringBox(QLineEdit): - """StringBox shows a string. The data structure expected and sent to the getter and setter is a string.""" - - def __init__(self, model, help_link="", default_string="", continuous_update=False): - """ - :type model: ValueModel - :type help_link: str - :type default_string: str - :type continuous_update: bool - """ - QLineEdit.__init__(self) - addHelpToWidget(self, help_link) - self.setMinimumWidth(250) - self._validation = ValidationSupport(self) - self._validator = None - self._model = model - - self.editingFinished.connect(self.stringBoxChanged) - self.editingFinished.connect(self.validateString) - - if continuous_update: - self.textChanged.connect(self.stringBoxChanged) - - self.textChanged.connect(self.validateString) - - self._valid_color = self.palette().color(self.backgroundRole()) - self.setText(default_string) - - self._model.valueChanged.connect(self.modelChanged) - self.modelChanged() - - def validateString(self): - string_to_validate = str(self.text()) - - if self._validator is not None: - status = self._validator.validate(string_to_validate) - - palette = QPalette() - if not status: - palette.setColor(self.backgroundRole(), ValidationSupport.ERROR_COLOR) - self.setPalette(palette) - self._validation.setValidationMessage(str(status), ValidationSupport.EXCLAMATION) - else: - palette.setColor(self.backgroundRole(), self._valid_color) - self.setPalette(palette) - self._validation.setValidationMessage("") - - def emitChange(self, q_string): - self.textChanged.emit(str(q_string)) - - def stringBoxChanged(self): - """Called whenever the contents of the editline changes.""" - text = str(self.text()) - if text == "": - text = None - - self._model.setValue(text) - - def modelChanged(self): - """Retrieves data from the model and inserts it into the edit line""" - text = self._model.getValue() - if text is None: - text = "" - - self.setText(str(text)) - - def setValidator(self, validator): - self._validator = validator - - def setAlignment(self, flag): - self.setAlignment(flag) - - def getValidationSupport(self): - return self._validation - - def isValid(self): - return self._validation.isValid() - - - diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/summarypanel.py b/ThirdParty/Ert/python/python/ert_gui/ertwidgets/summarypanel.py deleted file mode 100644 index 38946a43a7..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/summarypanel.py +++ /dev/null @@ -1,100 +0,0 @@ -from PyQt4.QtCore import Qt -from PyQt4.QtGui import QFrame, QLabel, QVBoxLayout, QHBoxLayout, QScrollArea, QWidget, QGridLayout - -from ert_gui.ertwidgets.models.ertsummary import ErtSummary - - -class SummaryTemplate(object): - def __init__(self, title): - super(SummaryTemplate, self).__init__() - - self.text = "" - self.__finished = False - self.startGroup(title) - - - def startGroup(self, title): - if not self.__finished: - style = "display: inline-block; width: 150px; vertical-align: top; float: left" - self.text += "
\n" % style - self.addTitle(title) - - def addTitle(self, title): - if not self.__finished: - style = "font-size: 16px; font-weight: bold; font-variant: small-caps;" - self.text += "
%s
" % (style, title) - - def addRow(self, value): - if not self.__finished: - style = "text-indent: 5px;" - self.text += "
%s
" % (style, value) - - def endGroup(self): - if not self.__finished: - self.text += "

\n" - - def getText(self): - if not self.__finished: - self.__finished = True - self.endGroup() - return "%s" % self.text - - -class SummaryPanel(QFrame): - def __init__(self, parent=None): - QFrame.__init__(self, parent) - - self.setMinimumWidth(250) - self.setMinimumHeight(150) - - widget = QWidget() - self.layout = QHBoxLayout() - widget.setLayout(self.layout) - - - scroll = QScrollArea() - scroll.setWidgetResizable(True) - scroll.setWidget(widget) - - layout = QGridLayout() - layout.addWidget(scroll) - - self.setLayout(layout) - self.updateSummary() - - - def updateSummary(self): - summary = ErtSummary() - - text = SummaryTemplate("Forward Model") - - for job in summary.getForwardModels(): - text.addRow(job) - - - self.addColumn(text.getText()) - - text = SummaryTemplate("Parameters") - for parameters in summary.getParameters(): - text.addRow(parameters) - - self.addColumn(text.getText()) - - text = SummaryTemplate("Observations") - for observations in summary.getObservations(): - text.addRow(observations) - - self.addColumn(text.getText()) - - - def addColumn(self, text): - layout = QVBoxLayout() - text_widget = QLabel(text) - text_widget.setWordWrap(True) - text_widget.setTextFormat(Qt.RichText) - layout.addWidget(text_widget) - layout.addStretch(1) - - self.layout.addLayout(layout) - - diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/validateddialog.py b/ThirdParty/Ert/python/python/ert_gui/ertwidgets/validateddialog.py deleted file mode 100644 index 8f017e06d2..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/validateddialog.py +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file 'validateddialog.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from PyQt4.QtCore import Qt, QSize, SIGNAL -from PyQt4.QtGui import QDialog, QColor, QFormLayout, QLabel, QWidget, QDialogButtonBox, QLineEdit, QComboBox, QLayout - - -class ValidatedDialog(QDialog): - """ - A dialog for creating a validated new value. Performs validation of name against a provided. - Can be used to select from the list or for creating a new value that is not on the list. - - """ - - INVALID_COLOR = QColor(255, 235, 235) - - def __init__(self, title="Title", description="Description", unique_names=None, choose_from_list=False): - QDialog.__init__(self) - self.setModal(True) - self.setWindowTitle(title) - # self.setMinimumWidth(250) - # self.setMinimumHeight(150) - - if unique_names is None: - unique_names = [] - - self.unique_names = unique_names - self.choose_from_list = choose_from_list - - self.layout = QFormLayout() - self.layout.setSizeConstraint(QLayout.SetFixedSize) - - label = QLabel(description) - label.setAlignment(Qt.AlignHCenter) - - self.layout.addRow(self.createSpace(5)) - self.layout.addRow(label) - self.layout.addRow(self.createSpace(10)) - - buttons = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel, Qt.Horizontal, self) - self.ok_button = buttons.button(QDialogButtonBox.Ok) - self.ok_button.setEnabled(False) - - if choose_from_list: - self.param_name_combo = QComboBox() - self.connect(self.param_name_combo, SIGNAL('currentIndexChanged(QString)'), self.validateChoice) - for item in unique_names: - self.param_name_combo.addItem(item) - self.layout.addRow("Job:", self.param_name_combo) - else: - self.param_name = QLineEdit(self) - self.param_name.setFocus() - self.connect(self.param_name, SIGNAL('textChanged(QString)'), self.validateName) - self.validColor = self.param_name.palette().color(self.param_name.backgroundRole()) - - self.layout.addRow("Name:", self.param_name) - - self.layout.addRow(self.createSpace(10)) - - self.layout.addRow(buttons) - - self.connect(buttons, SIGNAL('accepted()'), self.accept) - self.connect(buttons, SIGNAL('rejected()'), self.reject) - - self.setLayout(self.layout) - - def notValid(self, msg): - """Called when the name is not valid.""" - self.ok_button.setEnabled(False) - palette = self.param_name.palette() - palette.setColor(self.param_name.backgroundRole(), self.INVALID_COLOR) - self.param_name.setToolTip(msg) - self.param_name.setPalette(palette) - - def valid(self): - """Called when the name is valid.""" - self.ok_button.setEnabled(True) - palette = self.param_name.palette() - palette.setColor(self.param_name.backgroundRole(), self.validColor) - self.param_name.setToolTip("") - self.param_name.setPalette(palette) - - def validateName(self, value): - """Called to perform validation of a name. For specific needs override this function and call valid() and notValid(msg).""" - value = str(value) - - if value == "": - self.notValid("Can not be empty!") - elif not value.find(" ") == -1: - self.notValid("No spaces allowed!") - elif value in self.unique_names: - self.notValid("Name must be unique!") - else: - self.valid() - - def validateChoice(self, choice): - """Only called when using selection mode.""" - self.ok_button.setEnabled(not choice == "") - - def getName(self): - """Return the new name chosen by the user""" - if self.choose_from_list: - return str(self.param_name_combo.currentText()) - else: - return str(self.param_name.text()) - - def showAndTell(self): - """Shows the dialog and returns the result""" - if self.exec_(): - return str(self.getName()).strip() - - return "" - - def createSpace(self, size=5): - """Creates a widget that can be used as spacing on a panel.""" - qw = QWidget() - qw.setMinimumSize(QSize(size, size)) - - return qw diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/validationsupport.py b/ThirdParty/Ert/python/python/ert_gui/ertwidgets/validationsupport.py deleted file mode 100644 index dd586a3c75..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/validationsupport.py +++ /dev/null @@ -1,110 +0,0 @@ -from PyQt4.QtCore import Qt, QPoint, QObject, pyqtSignal - -from PyQt4.QtGui import QWidget, QVBoxLayout, QSizePolicy, QFrame, QColor, QLabel - - -class ErrorPopup(QWidget): - error_template = ("" - "
" - "" - "%s" - "
Warning:
" - "") - - def __init__(self): - QWidget.__init__(self, None, Qt.ToolTip) - self.resize(300, 50) - - self.setContentsMargins(0, 0, 0, 0) - layout = QVBoxLayout() - layout.setMargin(0) - - self._error_widget = QLabel("") - self._error_widget.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Minimum) - self._error_widget.setFrameStyle(QFrame.Box) - self._error_widget.setWordWrap(True) - self._error_widget.setScaledContents(True) - # self.warning_widget.setAlignment(Qt.AlignHCenter) - self._error_widget.setTextFormat(Qt.RichText) - layout.addWidget(self._error_widget) - - self.setLayout(layout) - - def presentError(self, widget, error): - assert isinstance(widget, QWidget) - - self._error_widget.setText(ErrorPopup.error_template % error) - self.show() - - size_hint = self.sizeHint() - rect = widget.rect() - p = widget.mapToGlobal(QPoint(rect.left(), rect.top())) - - self.setGeometry(p.x(), p.y() - size_hint.height() - 5, size_hint.width(), size_hint.height()) - - self.raise_() - - -class ValidationSupport(QObject): - STRONG_ERROR_COLOR = QColor(255, 215, 215) - ERROR_COLOR = QColor(255, 235, 235) - INVALID_COLOR = QColor(235, 235, 255) - - WARNING = "warning" - EXCLAMATION = "ide/small/exclamation" - - validationChanged = pyqtSignal(bool) - - def __init__(self, validation_target): - """ @type validation_target: QWidget """ - QObject.__init__(self) - - self._validation_target = validation_target - self._validation_message = None - self._validation_type = None - self._error_popup = ErrorPopup() - - self._originalEnterEvent = validation_target.enterEvent - self._originalLeaveEvent = validation_target.leaveEvent - self._originalHideEvent = validation_target.hideEvent - - def enterEvent(event): - self._originalEnterEvent(event) - - if not self.isValid(): - self._error_popup.presentError(self._validation_target, self._validation_message) - - validation_target.enterEvent = enterEvent - - def leaveEvent(event): - self._originalLeaveEvent(event) - - if self._error_popup is not None: - self._error_popup.hide() - - validation_target.leaveEvent = leaveEvent - - def hideEvent(hide_event): - self._error_popup.hide() - self._originalHideEvent(hide_event) - - validation_target.hideEvent = hideEvent - - def setValidationMessage(self, message, validation_type=WARNING): - """Add a warning or information icon to the widget with a tooltip""" - message = message.strip() - if message == "": - self._validation_type = None - self._validation_message = None - self._error_popup.hide() - self.validationChanged.emit(True) - - else: - self._validation_type = validation_type - self._validation_message = message - if self._validation_target.hasFocus() or self._validation_target.underMouse(): - self._error_popup.presentError(self._validation_target, self._validation_message) - self.validationChanged.emit(False) - - def isValid(self): - return self._validation_message is None diff --git a/ThirdParty/Ert/python/python/ert_gui/gert_main.py b/ThirdParty/Ert/python/python/ert_gui/gert_main.py deleted file mode 100644 index 76b26e8241..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/gert_main.py +++ /dev/null @@ -1,253 +0,0 @@ -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file 'gert_main.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -# -------------------------------------------------------------------------------- -# This file is the main script of the ert with graphical UI, e.g. gert or -# ert_gui. To run successfully the ert GUI requires a quite well prepared -# environment. This includes the following: -# -# 1. A Python interpreter with the the ctypes library available. -# -# 2. The program must be able to locate all the required shared libraries with -# no fuss. This includes: -# -# o The ert libraries libecl.so, libenkf.so, libutil.so, librms.so, -# libsched.so, libconfig.so -# -# o The libraries used by the ert libraries, this includes liblapack.so, -# libz.so, libblas.so, libpthread.so and in some cases the libg2c.so -# library. -# -# o The lsf libraries libbat, liblsf and also libnsl. In the current -# implementation the dependance on the lsf libraries is hard, this should -# be relaxed so that the lsf libraries are not linked before an attempt to -# actually use lsf is made. -# When an attempt is actually made to use LSF the additional environment -# variables LSF_LIBDIR, XLSF_UIDDIR, LSF_SERVERDIR, LSF_ENVDIR and -# LSF_BINDIR must also be set. That is an LSF requirement and not -# related to ert as such. These variables can naturally be set from the -# site config file. -# -# -# 3. The program must be able to locate all the necessary Python modules, in -# short this means that the directory containing the ert/ and ert_gui/ -# directories must be on Python path, i.e. the import statements -# -# import ert -# import ert_gui -# -# should just work. -# -# 4. The environment variable GERT_SHARE_PATH should be set to point to the -# /share directory of the current gert installation. The /share directory -# contains html help files and images/icons. -# -# 5. The environment variable ERT_SITE_CONFIG must be set to point to the site -# wide configuration file. -# -# -# Now the important point is that this python script WILL NOT PERFORM ANY -# SPECIAL HOOPS TO TRY TO LOCATE THE REQUIRED FILES, i.e. the environment must -# be fully prepared prior to invoking this script. This will typically involve: -# -# 1. Update the LD_LIBRARY_PATH variable to contain directories with all the -# required shared libraries. -# -# 2. Update the PYTHONPATH variable to contain the directory containg ert/ and -# ert_gui/ directories. -# -# 3. Set the environment variabel GERT_SHARE_PATH to point to the directory -# containg the /share files for the current gert installation. -# -# 4. Set the environment variable ERT_SITE_CONFIG to point to the location of -# the site configuration file. -# -# An example shell script achieving this could look like: -# -# -------------------- -------------------- -# #!/bin/bash -# -# # The LSF libraries are installed in directory /site/LSF/7.0/linux/lib, this -# # directory must be included in the LD_LIBRARY_PATH variable. Furthermore we -# # assume that the ERT libraries like libecl.so and libenkf.so are located in -# # /opt/ert/lib, then LD_LIBRARY_PATH will be updated as: -# -# export LD_LIBRARY_PATH=/site/LSF/7.0/linux/lib:/opt/ert/lib:$LD_LIBRARY_PATH -# -# # The python modules ert and ert_gui are located in /opt/ert/python, so we -# # update PYTHONPATH as: -# -# export PYTHONPATH=/opt/ert/python:$PYTHONPATH -# -# # The shared gert files are installed in /opt/ert/share; this directory can -# # in principle be shared among gert versions built for different operating -# # system versions: -# -# export ERT_SHARE_PATH=/opt/ert/share -# -# # The ERT site configuration file is assumed to be in -# # /opt/ert/etc/site-config, i.e. we set the variable ERT_SITE_CONFIG as: -# -# export ERT_SITE_CONFIG=/opt/ert/etc/site-config -# -# # Now the environment should be fully initialized, and we are ready to invoke -# # the gert_main.py script, i.e. this file: -# -# exec python /opt/ert/python/ert_gui/gert_main.py $@ -# -# -------------------- -------------------- - -import os -import sys -import time - -from PyQt4.QtCore import Qt -from PyQt4.QtGui import QApplication, QFileDialog - -import ert_gui.ertwidgets -from ert.enkf import EnKFMain -from ert.util import Version -from ert_gui.ert_splash import ErtSplash -from ert_gui.ertwidgets import SummaryPanel, resourceIcon -from ert_gui.main_window import GertMainWindow -from ert_gui.simulation.simulation_panel import SimulationPanel -from ert_gui.tools import HelpCenter -from ert_gui.tools.export import ExportTool -from ert_gui.tools.help import HelpTool -from ert_gui.tools.ide import IdeTool -from ert_gui.tools.load_results import LoadResultsTool -from ert_gui.tools.manage_cases import ManageCasesTool -from ert_gui.tools.plot import PlotTool -from ert_gui.tools.plugins import PluginHandler, PluginsTool -from ert_gui.tools.workflows import WorkflowsTool - -if os.getenv("ERT_SHARE_PATH"): - ert_share_path = os.getenv("ERT_SHARE_PATH") -else: - # If the ERT_SHARE_PATH variable is not set we try to use the - # source location relative to the location of the current file; - # assuming we are in the source directory. Will not work if we are - # in an arbitrary build directory. - ert_share_path = os.path.realpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../../share")) - -ert_gui.ertwidgets.img_prefix = ert_share_path + "/gui/img/" - -from ert_gui.newconfig import NewConfigurationDialog - - -def main(argv): - app = QApplication(argv) # Early so that QT is initialized before other imports - app.setWindowIcon(resourceIcon("application/window_icon_cutout")) - - if len(argv) == 1: - config_file = QFileDialog.getOpenFileName(None, "Open Configuration File") - - config_file = str(config_file) - - if len(config_file) == 0: - print("-----------------------------------------------------------------") - print("-- You must supply the name of configuration file as the first --") - print("-- commandline argument: --") - print("-- --") - print("-- bash% gert --") - print("-- --") - print("-- If the configuration file does not exist, gert will create --") - print("-- create a new configuration file. --") - print("-----------------------------------------------------------------") - - sys.exit(1) - else: - config_file = argv[1] - - help_center = HelpCenter("ERT") - help_center.setHelpLinkPrefix(os.getenv("ERT_SHARE_PATH") + "/gui/help/") - help_center.setHelpMessageLink("welcome_to_ert") - - strict = True - - verbose = False - verbose_var = os.getenv("ERT_VERBOSE", "False") - lower_verbose_var = verbose_var.lower() - if lower_verbose_var == "true": - verbose = True - - if not os.path.exists(config_file): - print("Trying to start new config") - new_configuration_dialog = NewConfigurationDialog(config_file) - success = new_configuration_dialog.exec_() - if not success: - print("Can not run without a configuration file.") - sys.exit(1) - else: - config_file = new_configuration_dialog.getConfigurationPath() - dbase_type = new_configuration_dialog.getDBaseType() - num_realizations = new_configuration_dialog.getNumberOfRealizations() - storage_path = new_configuration_dialog.getStoragePath() - - EnKFMain.createNewConfig(config_file, storage_path, dbase_type, num_realizations) - strict = False - - if os.path.isdir(config_file): - print("The specified configuration file is a directory!") - sys.exit(1) - - splash = ErtSplash() - splash.version = "Version %s" % Version.getVersion() - splash.timestamp = Version.getBuildTime() - - splash.show() - splash.repaint() - - now = time.time() - - ert = EnKFMain(config_file, strict=strict, verbose=verbose) - ert_gui.configureErtNotifier(ert, config_file) - - window = GertMainWindow() - window.setWidget(SimulationPanel()) - - plugin_handler = PluginHandler(ert, ert.getWorkflowList().getPluginJobs(), window) - - help_tool = HelpTool("ERT", window) - - window.addDock("Configuration Summary", SummaryPanel(), area=Qt.BottomDockWidgetArea) - window.addTool(IdeTool(os.path.basename(config_file), help_tool)) - window.addTool(PlotTool()) - window.addTool(ExportTool()) - window.addTool(WorkflowsTool()) - window.addTool(ManageCasesTool()) - window.addTool(PluginsTool(plugin_handler)) - window.addTool(LoadResultsTool()) - window.addTool(help_tool) - - sleep_time = 2 - (time.time() - now) - - if sleep_time > 0: - time.sleep(sleep_time) - - window.show() - splash.finish(window) - window.activateWindow() - window.raise_() - finished_code = app.exec_() - - ert.free() - - sys.exit(finished_code) - - -if __name__ == "__main__": - main(sys.argv) diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/CMakeLists.txt b/ThirdParty/Ert/python/python/ert_gui/ide/CMakeLists.txt deleted file mode 100644 index d0813f8eb8..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - highlighter.py - keyword.py - parameter.py -) - -add_python_package("python.ert_gui.ide" ${PYTHON_INSTALL_PREFIX}/ert_gui/ide "${PYTHON_SOURCES}" True) - -add_subdirectory(completers) -add_subdirectory(keywords) -add_subdirectory(wizards) diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/completers/CMakeLists.txt b/ThirdParty/Ert/python/python/ert_gui/ide/completers/CMakeLists.txt deleted file mode 100644 index 5d773c0064..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/completers/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - path_completer.py -) - -add_python_package("python.ert_gui.ide.completers" ${PYTHON_INSTALL_PREFIX}/ert_gui/ide/completers "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/completers/path_completer.py b/ThirdParty/Ert/python/python/ert_gui/ide/completers/path_completer.py deleted file mode 100644 index e38efce4b9..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/completers/path_completer.py +++ /dev/null @@ -1,71 +0,0 @@ -import os - - -class PathItem(object): - def __init__(self, value): - super(PathItem, self).__init__() - #: :type: str - self.value = value - - - def __str__(self): - return self.value - - def __gt__(self, other): - assert isinstance(other, PathItem) - - if self.value.endswith("/") and not other.value.endswith("/"): - return True - elif not self.value.endswith("/") and other.value.endswith("/"): - return False - else: - return self.value.lower() > other.value.lower() - - def __eq__(self, other): - return self.value == other.value - - def __lt__(self, other): - return not (self == other or self > other) - - def __le__(self, other): - return self == other or not self > other - - def __ge__(self, other): - return self == other or self > other - - - -class PathCompleter(object): - def __init__(self): - super(PathCompleter, self).__init__() - - - def completeOptions(self, path_prefix): - - root, entry_prefix = os.path.split(path_prefix) - - if os.path.isdir(root): - if not root.startswith("/"): - root_path = "./%s/" % root - else: - root_path = "%s/" % root - else: - if root == "": - root_path = "./" - else: - root_path = root - - entries = os.listdir(root_path) - - - result = [] - for entry in entries: - if entry.startswith(entry_prefix): - full_path = os.path.join(root, entry) - if os.path.isdir(full_path): - full_path += "/" - result.append(PathItem(full_path)) - - - result = sorted(result) - return [str(item) for item in result] diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/highlighter.py b/ThirdParty/Ert/python/python/ert_gui/ide/highlighter.py deleted file mode 100644 index 24f0064c66..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/highlighter.py +++ /dev/null @@ -1,105 +0,0 @@ -import re -from PyQt4.QtGui import QSyntaxHighlighter, QTextCharFormat, QColor, QTextBlockUserData - -from ert_gui.ide.keywords import ErtKeywords -from ert_gui.ide.keywords.configuration_line_builder import ConfigurationLineBuilder -from ert_gui.ide.keywords.data import Keyword - - -class ConfigurationLineUserData(QTextBlockUserData): - def __init__(self, configuration_line): - QTextBlockUserData.__init__(self) - self.configuration_line = configuration_line - -class KeywordHighlighter(QSyntaxHighlighter): - def __init__(self, document): - QSyntaxHighlighter.__init__(self, document) - - self.clb = ConfigurationLineBuilder(ErtKeywords()) - - - self.comment_format = QTextCharFormat() - self.comment_format.setForeground(QColor(0, 128, 0)) - self.comment_format.setFontItalic(True) - - self.keyword_format = QTextCharFormat() - self.keyword_format.setForeground(QColor(200, 100, 0)) - # self.keyword_format.setFontWeight(QFont.Bold) - - self.error_format = QTextCharFormat() - # self.error_format.setForeground(QColor(255, 0, 0)) - self.error_format.setUnderlineStyle(QTextCharFormat.WaveUnderline) - self.error_format.setUnderlineColor(QColor(255, 0, 0)) - - self.search_format = QTextCharFormat() - self.search_format.setBackground(QColor(220, 220, 220)) - - self.builtin_format = QTextCharFormat() - self.builtin_format.setForeground(QColor(0, 170, 227)) - - self.search_string = "" - - - def formatKeyword(self, keyword, validation_status): - assert isinstance(keyword, Keyword) - if keyword.hasKeywordDefinition(): - keyword_format = QTextCharFormat(self.keyword_format) - - if not validation_status: - keyword_format.merge(self.error_format) - - self.formatToken(keyword, keyword_format) - else: - self.formatToken(keyword, self.error_format) - - - def highlightBlock(self, complete_block): - block = unicode(complete_block) - - self.clb.processLine(block) - - - if self.clb.hasComment(): - self.setFormat(self.clb.commentIndex(), len(block) - self.clb.commentIndex(), self.comment_format) - - if not self.clb.hasConfigurationLine(): - count = len(block) - - if self.clb.hasComment(): - count = self.clb.commentIndex() - - self.setFormat(0, count, self.error_format) - - - if self.clb.hasConfigurationLine(): - cl = self.clb.configurationLine() - self.setCurrentBlockUserData(ConfigurationLineUserData(cl)) - - self.formatKeyword(cl.keyword(), cl.validationStatusForToken(cl.keyword())) - - arguments = cl.arguments() - - for argument in arguments: - if not argument.hasArgumentDefinition(): - pass - - elif argument.argumentDefinition().isBuiltIn(): - self.formatToken(argument, self.builtin_format) - - if not cl.validationStatusForToken(argument): - self.formatToken(argument, self.error_format) - - - if self.search_string != "": - for match in re.finditer("(%s)" % self.search_string, complete_block): - self.setFormat(match.start(1), match.end(1) - match.start(1), self.search_format) - - - def setSearchString(self, string): - if self.search_string != unicode(string): - self.search_string = unicode(string) - self.rehighlight() - - - def formatToken(self, token, highlight_format): - self.setFormat(token.fromIndex(), token.count(), highlight_format) \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keyword.py b/ThirdParty/Ert/python/python/ert_gui/ide/keyword.py deleted file mode 100644 index ec234f2028..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keyword.py +++ /dev/null @@ -1,96 +0,0 @@ -from ert_gui.ide.parameter import Parameter - - -class Keyword(object): - def __init__(self, keyword, start, end): - super(Keyword, self).__init__() - #: :type: str - self.keyword = keyword - #: :type: int - self.start = start - #: :type: int - self.end = end - #: :type: list of Parameter - self.parameter_list = [] - #: :type: bool - self.error = False - #: :type: str - self.error_message = "" - - self.handler = None - - - @property - def length(self): - return self.end - self.start - - def addParameter(self, value, start, end): - self.parameter_list.append(Parameter(value, start, end)) - - def parameterCount(self): - return len(self.parameter_list) - - def parameters(self): - """ @rtype: list of Parameter """ - return self.parameter_list - - def __getitem__(self, item): - """ @rtype: Parameter """ - assert isinstance(item, int) - return self.parameter_list[item] - - def hasError(self): - """ @rtype: bool """ - parameter_error = False - - for param in self.parameter_list: - if param.error: - parameter_error = True - - return self.error or parameter_error - - - - def mergeParameters(self, from_parameter): - parameters = self.parameter_list[from_parameter:] - self.parameter_list = self.parameter_list[0:from_parameter - 1] - - value = " ".join([p.value for p in parameters]) - start = parameters[0].start - end = parameters[len(parameters) - 1].end - - self.parameter_list.append(Parameter(value, start, end)) - - def errorMessage(self): - errors = [] - - if self.error: - errors.append(self.error_message) - - for parameter in self.parameter_list: - if parameter.error: - errors.append(parameter.error_message) - - return "\n".join(errors) - - def parameterIndexForPosition(self, position_in_block): - index = 0 - - if position_in_block <= self.end: - return -1 - - for parameter in self.parameter_list: - if parameter.start <= position_in_block <= parameter.end: - return index - index += 1 - - if self.parameterCount() > 0: - if position_in_block < self.parameter_list[0].start: - return 0 - elif position_in_block > self.parameter_list[self.parameterCount() - 1].end: - return self.parameterCount() - - if self.parameterCount() == 0: - return 0 - - return -1 \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/CMakeLists.txt b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/CMakeLists.txt deleted file mode 100644 index 99afed7609..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/CMakeLists.txt +++ /dev/null @@ -1,24 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - analysis_module_keywords.py - configuration_line_builder.py - configuration_line_parser.py - eclipse_keywords.py - enkf_control_keywords.py - ensemble_keywords.py - ert_keywords.py - parametrization_keywords.py - plot_keywords.py - queue_system_keywords.py - run_keywords.py - simulation_control_keywords.py - workflow_keywords.py - qc_keywords.py - unix_environment_keywords.py - advanced_keywords.py -) - -add_python_package("python.ert_gui.ide.keywords" ${PYTHON_INSTALL_PREFIX}/ert_gui/ide/keywords "${PYTHON_SOURCES}" True) - -add_subdirectory(data) -add_subdirectory(definitions) diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/__init__.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/__init__.py deleted file mode 100644 index c355513387..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -from .configuration_line_parser import ConfigurationLineParser -from .ert_keywords import ErtKeywords diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/advanced_keywords.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/advanced_keywords.py deleted file mode 100644 index 676ede7415..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/advanced_keywords.py +++ /dev/null @@ -1,56 +0,0 @@ -from ert_gui.ide.keywords.definitions import IntegerArgument, KeywordDefinition, ConfigurationLineDefinition, PathArgument, StringArgument -from ert_gui.ide.keywords.definitions.proper_name_argument import ProperNameArgument - - -class AdvancedKeywords(object): - def __init__(self, ert_keywords): - super(AdvancedKeywords, self).__init__() - self.group = "Advanced" - - ert_keywords.addKeyword(self.addDefine()) - ert_keywords.addKeyword(self.addSchedulePredictionFile()) - ert_keywords.addKeyword(self.addFixedLengthScheduleKw()) - ert_keywords.addKeyword(self.addStaticKw()) - - - - def addFixedLengthScheduleKw(self): - fixed_length_sched_kw = ConfigurationLineDefinition(keyword=KeywordDefinition("ADD_FIXED_LENGTH_SCHEDULE_KW"), - arguments=[StringArgument(), - StringArgument()], - documentation_link="keywords/add_fixed_length_schedule_kw", - required=False, - group=self.group) - return fixed_length_sched_kw - - - def addStaticKw(self): - add_static_kw = ConfigurationLineDefinition(keyword=KeywordDefinition("ADD_STATIC_KW"), - arguments=[StringArgument(), - StringArgument()], - documentation_link="keywords/add_static_kw", - required=False, - group=self.group) - return add_static_kw - - - - def addDefine(self): - define = ConfigurationLineDefinition(keyword=KeywordDefinition("DEFINE"), - arguments=[ProperNameArgument(), - StringArgument(rest_of_line=True,allow_space=True)], - documentation_link="keywords/define", - required=False, - group=self.group) - return define - - - - def addSchedulePredictionFile(self): - schedule_prediction_file = ConfigurationLineDefinition(keyword=KeywordDefinition("SCHEDULE_PREDICTION_FILE"), - arguments=[PathArgument()], - documentation_link="keywords/schedule_prediction_file", - required=False, - group=self.group) - return schedule_prediction_file - diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/analysis_module_keywords.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/analysis_module_keywords.py deleted file mode 100644 index 604e59801a..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/analysis_module_keywords.py +++ /dev/null @@ -1,106 +0,0 @@ -from ert_gui.ide.keywords.definitions import IntegerArgument, KeywordDefinition, ConfigurationLineDefinition, PathArgument, StringArgument, FloatArgument, BoolArgument -from ert_gui.ide.keywords.definitions.proper_name_format_argument import ProperNameFormatArgument - - -class AnalysisModuleKeywords(object): - def __init__(self, ert_keywords): - super(AnalysisModuleKeywords, self).__init__() - self.group = "Analysis Module" - - ert_keywords.addKeyword(self.addAnalysisLoad()) - ert_keywords.addKeyword(self.addAnalysisSelect()) - ert_keywords.addKeyword(self.addAnalysisCopy()) - ert_keywords.addKeyword(self.addAnalysisSetVar()) - ert_keywords.addKeyword(self.addIterCase()) - ert_keywords.addKeyword(self.addIterCount()) - ert_keywords.addKeyword(self.addStdCutoff()) - ert_keywords.addKeyword(self.addSingleNodeUpdate()) - ert_keywords.addKeyword(self.addIterRetryCount()) - - - - def addAnalysisLoad(self): - analysis_load = ConfigurationLineDefinition(keyword=KeywordDefinition("ANALYSIS_LOAD"), - arguments=[StringArgument(),StringArgument()], - documentation_link="keywords/analysis_load", - required=False, - group=self.group) - return analysis_load - - - - def addAnalysisSelect(self): - analysis_select = ConfigurationLineDefinition(keyword=KeywordDefinition("ANALYSIS_SELECT"), - arguments=[StringArgument()], - documentation_link="keywords/analysis_select", - required=False, - group=self.group) - return analysis_select - - - def addAnalysisSetVar(self): - analysis_set_var = ConfigurationLineDefinition(keyword=KeywordDefinition("ANALYSIS_SET_VAR"), - arguments=[StringArgument(), - StringArgument(), - StringArgument(rest_of_line=True,allow_space=True)], - documentation_link="keywords/analysis_set_var", - required=False, - group=self.group) - return analysis_set_var - - - - def addAnalysisCopy(self): - analysis_copy = ConfigurationLineDefinition(keyword=KeywordDefinition("ANALYSIS_COPY"), - arguments=[StringArgument(), StringArgument()], - documentation_link="keywords/analysis_copy", - required=False, - group=self.group) - return analysis_copy - - - - - def addIterCase(self): - iter_case = ConfigurationLineDefinition(keyword=KeywordDefinition("ITER_CASE"), - arguments=[ProperNameFormatArgument()], - documentation_link="keywords/iter_case", - required=False, - group=self.group) - return iter_case - - - def addIterCount(self): - iter_count = ConfigurationLineDefinition(keyword=KeywordDefinition("ITER_COUNT"), - arguments=[IntegerArgument()], - documentation_link="keywords/iter_count", - required=False, - group=self.group) - return iter_count - - - def addIterRetryCount(self): - retry_count = ConfigurationLineDefinition(keyword=KeywordDefinition("ITER_RETRY_COUNT"), - arguments=[IntegerArgument()], - documentation_link="keywords/iter_retry_count", - required=False, - group=self.group) - return retry_count - - - def addStdCutoff(self): - std_cutoff = ConfigurationLineDefinition(keyword=KeywordDefinition("STD_CUTOFF"), - arguments=[FloatArgument()], - documentation_link="keywords/std_cutoff", - required=False, - group=self.group) - return std_cutoff - - - def addSingleNodeUpdate(self): - single_node_update = ConfigurationLineDefinition(keyword=KeywordDefinition("SINGLE_NODE_UPDATE"), - arguments=[BoolArgument()], - documentation_link="keywords/single_node_update", - required=False, - group=self.group) - return single_node_update \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/configuration_line_builder.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/configuration_line_builder.py deleted file mode 100644 index cc2766463c..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/configuration_line_builder.py +++ /dev/null @@ -1,110 +0,0 @@ -from ert_gui.ide.keywords import ErtKeywords -from ert_gui.ide.keywords.configuration_line_parser import ConfigurationLineParser -from ert_gui.ide.keywords.data import ConfigurationLine, Argument, Keyword - - -class ConfigurationLineBuilder(object): - DEFAULT_GROUP = "Unknown keyword" - DEFAULT_DOCUMENTATION_LINK = "unknown_keyword" - - def __init__(self, keywords): - super(ConfigurationLineBuilder, self).__init__() - - assert isinstance(keywords, ErtKeywords) - self.__keywords = keywords - self.__configuration_line_parser = ConfigurationLineParser() - self.__configuration_line = None - - - def processLine(self, line): - self.__configuration_line_parser.parseLine(line) - self.__configuration_line = None - - if self.__configuration_line_parser.hasKeyword(): - keyword = self.__configuration_line_parser.keyword() - arguments = self.__configuration_line_parser.arguments() - - documentation_link = ConfigurationLineBuilder.DEFAULT_DOCUMENTATION_LINK - group = ConfigurationLineBuilder.DEFAULT_GROUP - required = False - - if keyword.value() in self.__keywords: - configuration_line_definition = self.__keywords[keyword.value()] - - documentation_link = configuration_line_definition.documentationLink() - group = configuration_line_definition.group() - required = configuration_line_definition.isRequired() - - keyword.setKeywordDefinition(configuration_line_definition.keywordDefinition()) - - arguments = self.__matchArguments(keyword, configuration_line_definition.argumentDefinitions(), arguments) - - - self.__configuration_line = ConfigurationLine(keyword, arguments, documentation_link, group, required) - - def configurationLine(self): - """ @rtype: ConfigurationLine """ - return self.__configuration_line - - def hasConfigurationLine(self): - """ @rtype: bool """ - return self.__configuration_line is not None - - def hasComment(self): - """ @rtype: bool """ - return self.__configuration_line_parser.hasComment() - - def commentIndex(self): - return self.__configuration_line_parser.commentIndex() - - - def __matchArguments(self, keyword, arg_defs, args): - """ - @type keyword: Keyword - @type arg_defs: list of ArgumentDefinition - @type args: list of Argument - @rtype: list of Argument - """ - arg_def_count = len(arg_defs) - arg_count = len(args) - - if arg_count > arg_def_count: - # merge last input arguments - - last_arg_def = arg_defs[len(arg_defs) - 1] - - if last_arg_def.consumeRestOfLine(): - from_arg = args[arg_def_count - 1] - to_arg = args[arg_count - 1] - - last_argument = Argument(from_arg.fromIndex(), to_arg.toIndex(), keyword.line()) - args = args[0:arg_def_count] - args[len(args) - 1] = last_argument - - else: - from_arg = args[arg_def_count] - to_arg = args[arg_count - 1] - - last_argument = Argument(from_arg.fromIndex(), to_arg.toIndex(), keyword.line()) - args = args[0:arg_def_count] - args.append(last_argument) - - if arg_count < arg_def_count: - # pad with empty arguments - line = keyword.line() - - for index in range(arg_def_count - arg_count): - empty_argument = Argument(len(line), len(line), line) - args.append(empty_argument) - - - for index in range(len(args)): - if index < len(arg_defs): - args[index].setArgumentDefinition(arg_defs[index]) - - - return args - - - - diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/configuration_line_parser.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/configuration_line_parser.py deleted file mode 100644 index abcc270e20..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/configuration_line_parser.py +++ /dev/null @@ -1,80 +0,0 @@ -import re -from ert_gui.ide.keywords.data import Argument, Keyword - - -class ConfigurationLineParser(object): - COMMENT_PATTERN = re.compile(".*?(--.*)") - KEYWORD_PATTERN = re.compile("^\s*([A-Z_]+)(\s|--)?") - ARGUMENT_PATTERN = re.compile('\s+?(\S+)\s*?') - - def __init__(self): - super(ConfigurationLineParser, self).__init__() - - self.__comment_index = -1 - self.__keyword = None - self.__text = None - self.__arguments_index = -1 - self.__arguments = [] - - - def parseLine(self, line): - self.__keyword = None - self.__comment_index = -1 - self.__text = line - self.__arguments_index = -1 - self.__arguments = [] - - comment_match = re.match(ConfigurationLineParser.COMMENT_PATTERN, line) - if comment_match is not None: - self.__comment_index = comment_match.start(1) - line = line[0:comment_match.start(1)] - - keyword_match = re.match(ConfigurationLineParser.KEYWORD_PATTERN, line) - if keyword_match is not None: - self.__keyword = Keyword(keyword_match.start(1), keyword_match.end(1), line) - self.__arguments_index = keyword_match.end(1) - - if self.hasKeyword(): - argument_match = ConfigurationLineParser.ARGUMENT_PATTERN.finditer(line) - - for match in argument_match: - self.__arguments.append(Argument(match.start(1), match.end(1), line)) - - - def hasComment(self): - """ @rtype: bool """ - return self.__comment_index >= 0 - - def commentIndex(self): - """ @rtype: str """ - return self.__comment_index - - def hasKeyword(self): - """ @rtype: bool """ - return self.__keyword is not None - - def keyword(self): - """ @rtype: Keyword """ - return self.__keyword - - def text(self): - """ @rtype: str """ - return self.__text - - def uncommentedText(self): - """ @rtype: str """ - if self.hasComment(): - return self.__text[0:self.commentIndex()] - return self.text() - - def argumentsText(self): - """ @rtype: str """ - if self.hasKeyword(): - return self.uncommentedText()[self.__arguments_index:] - return "" - - def arguments(self): - """ @rtype: list of Argument """ - return self.__arguments - - diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/data/CMakeLists.txt b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/data/CMakeLists.txt deleted file mode 100644 index 2e90451487..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/data/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - argument.py - configuration_line.py - keyword.py - token.py - validation_status.py -) - -add_python_package("python.ert_gui.ide.keywords.data" ${PYTHON_INSTALL_PREFIX}/ert_gui/ide/keywords/data "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/data/__init__.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/data/__init__.py deleted file mode 100644 index 9421556f0a..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/data/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -from .validation_status import ValidationStatus - -from .token import Token -from .argument import Argument -from .keyword import Keyword - -from .configuration_line import ConfigurationLine diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/data/argument.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/data/argument.py deleted file mode 100644 index 74b18a0231..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/data/argument.py +++ /dev/null @@ -1,27 +0,0 @@ -from ert_gui.ide.keywords.data import Token - - -class Argument(Token): - def __init__(self, from_index, to_index, line): - super(Argument, self).__init__(from_index, to_index, line) - self.__argument_definition = None - - - def setArgumentDefinition(self, argument_definition): - self.__argument_definition = argument_definition - - def argumentDefinition(self): - """ @rtype: ArgumentDefinition """ - return self.__argument_definition - - def hasArgumentDefinition(self): - """ @rtype: bool """ - return self.__argument_definition is not None - - - - - - - - diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/data/configuration_line.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/data/configuration_line.py deleted file mode 100644 index bd77df285b..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/data/configuration_line.py +++ /dev/null @@ -1,89 +0,0 @@ -from ert_gui.ide.keywords.data import Argument, Keyword, ValidationStatus -from ert_gui.ide.keywords.definitions import ArgumentDefinition, KeywordDefinition - - -class ConfigurationLine(object): - ARGUMENT_NOT_EXPECTED = "Argument not expected!" - ARGUMENT_ERROR = "Keyword has an argument error!" - UNKNOWN_KEYWORD = "Unknown keyword!" - - def __init__(self, keyword, arguments, documentation_link, group, required=False): - """ - @type keyword: Keyword - @type arguments: list of Argument - @type documentation_link: str - @type group: str - @type required: bool - """ - super(ConfigurationLine, self).__init__() - - self.__keyword = keyword - self.__arguments = arguments - self.__documentation_link = documentation_link - self.__required = required - self.__group = group - self.__validation_status = {} - - self.__validateTokens() - - - def __validateTokens(self): - keyword_validation_status = ValidationStatus() - - if not self.__keyword.hasKeywordDefinition(): - keyword_validation_status.setFailed() - keyword_validation_status.addToMessage(ConfigurationLine.UNKNOWN_KEYWORD) - - self.__validation_status[self.__keyword] = keyword_validation_status - - argument_error = False - for argument in self.__arguments: - argument_validation_status = ValidationStatus() - - if not argument.hasArgumentDefinition(): - argument_validation_status.setFailed() - argument_validation_status.addToMessage(ConfigurationLine.ARGUMENT_NOT_EXPECTED) - - argument_error = True - else: - arg_def = argument.argumentDefinition() - argument_validation_status = arg_def.validate(argument.value()) - - if not argument_validation_status: - argument_error = True - - self.__validation_status[argument] = argument_validation_status - - if argument_error: - keyword_validation_status.setFailed() - keyword_validation_status.addToMessage(ConfigurationLine.ARGUMENT_ERROR) - - for argument in self.__arguments: - argument_validation_status = self.validationStatusForToken(argument) - if not argument_validation_status: - keyword_validation_status.addToMessage(argument_validation_status.message()) - - - def keyword(self): - """ @rtype: Keyword""" - return self.__keyword - - def arguments(self): - """ @rtype: list of Argument """ - return self.__arguments - - def isRequired(self): - """ @rtype: bool """ - return self.__required - - def documentationLink(self): - """ @rtype: str """ - return self.__documentation_link - - def group(self): - """ @rtype: str """ - return self.__group - - def validationStatusForToken(self, token): - """ @rtype: ValidationStatus """ - return self.__validation_status[token] diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/data/keyword.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/data/keyword.py deleted file mode 100644 index 00ff0c79c2..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/data/keyword.py +++ /dev/null @@ -1,19 +0,0 @@ -from ert_gui.ide.keywords.data import Token -from ert_gui.ide.keywords.definitions import KeywordDefinition - - -class Keyword(Token): - def __init__(self, from_index, to_index, line): - super(Keyword, self).__init__(from_index, to_index, line) - - self.__keyword_definition = None - - def keywordDefinition(self): - """ @rtype: KeywordDefinition """ - return self.__keyword_definition - - def setKeywordDefinition(self, keyword_definition): - self.__keyword_definition = keyword_definition - - def hasKeywordDefinition(self): - return self.__keyword_definition is not None \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/data/token.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/data/token.py deleted file mode 100644 index a762100101..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/data/token.py +++ /dev/null @@ -1,36 +0,0 @@ -class Token(object): - - def __init__(self, from_index, to_index, line): - super(Token, self).__init__() - - self.__from_index = from_index - self.__to_index = to_index - self.__line = line - - def value(self): - """ @rtype: str """ - return self.__line[self.__from_index:self.__to_index] - - def fromIndex(self): - """ @rtype: int """ - return self.__from_index - - def toIndex(self): - """ @rtype: int """ - return self.__to_index - - def line(self): - """ @rtype: str """ - return self.__line - - def count(self): - """ @rtype: int """ - return self.toIndex() - self.fromIndex() - - def __contains__(self, item): - assert isinstance(item, int) - - return self.__from_index <= item < self.__to_index - - - diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/data/validation_status.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/data/validation_status.py deleted file mode 100644 index ee949edc56..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/data/validation_status.py +++ /dev/null @@ -1,35 +0,0 @@ -class ValidationStatus(object): - def __init__(self): - super(ValidationStatus, self).__init__() - self.reset() - - def reset(self): - self.__fail = False - self.__message = "" - self.__value = None - - def setFailed(self): - self.__fail = True - - def failed(self): - return self.__fail - - def addToMessage(self, message): - self.__message += message + "\n" - - def message(self): - return self.__message.strip() - - def setValue(self, value): - self.__value = value - - def value(self): - return self.__value - - def __nonzero__(self): - return not self.__fail - - def __str__(self): - return self.__message - - diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/CMakeLists.txt b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/CMakeLists.txt deleted file mode 100644 index e95326ab5b..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - argument_definition.py - bool_argument.py - configuration_line_definition.py - float_argument.py - integer_argument.py - keyword_definition.py - number_list_string_argument.py - path_argument.py - percent_argument.py - proper_name_argument.py - proper_name_format_argument.py - proper_name_format_string_argument.py - range_string_argument.py - string_argument.py -) - -add_python_package("python.ert_gui.ide.keywords.definitions" ${PYTHON_INSTALL_PREFIX}/ert_gui/ide/keywords/definitions "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/__init__.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/__init__.py deleted file mode 100644 index aac0683937..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -from .argument_definition import ArgumentDefinition -from .integer_argument import IntegerArgument -from .percent_argument import PercentArgument -from .string_argument import StringArgument -from .bool_argument import BoolArgument -from .float_argument import FloatArgument -from .path_argument import PathArgument -from .proper_name_argument import ProperNameArgument -from .proper_name_format_argument import ProperNameFormatArgument -from .proper_name_format_string_argument import ProperNameFormatStringArgument -from .range_string_argument import RangeStringArgument -from .number_list_string_argument import NumberListStringArgument - -from .argument_definition import ArgumentDefinition -from .keyword_definition import KeywordDefinition -from .configuration_line_definition import ConfigurationLineDefinition diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/argument_definition.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/argument_definition.py deleted file mode 100644 index 6d10bb5a09..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/argument_definition.py +++ /dev/null @@ -1,30 +0,0 @@ -from ert_gui.ide.keywords.data import ValidationStatus - -class ArgumentDefinition(object): - MISSING_ARGUMENT = "Missing argument!" - - def __init__(self, optional=False, built_in=False, rest_of_line=False): - super(ArgumentDefinition, self).__init__() - self.__optional = optional - self.__built_in = built_in - self.__rest_of_line = rest_of_line - - def isOptional(self): - return self.__optional - - def isBuiltIn(self): - return self.__built_in - - def consumeRestOfLine(self): - return self.__rest_of_line - - - def validate(self, token): - vs = ValidationStatus() - - if not self.isOptional() and token.strip() == "": - vs.setFailed() - vs.addToMessage(ArgumentDefinition.MISSING_ARGUMENT) - - return vs - diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/bool_argument.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/bool_argument.py deleted file mode 100644 index 85c736295a..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/bool_argument.py +++ /dev/null @@ -1,36 +0,0 @@ - -import re -from ert_gui.ide.keywords.definitions import ArgumentDefinition - - -class BoolArgument(ArgumentDefinition): - - NOT_BOOL = "The argument must be TRUE or FALSE." - - true_pattern = re.compile("^(1|T|[Tt][Rr][Uu][Ee])$") - false_pattern = re.compile("^(0|F|[Ff][Aa][Ll][Ss][Ee])$") - - def __init__(self, **kwargs): - super(BoolArgument, self).__init__(**kwargs) - - - def validate(self, token): - validation_status = super(BoolArgument, self).validate(token) - - true_match = BoolArgument.true_pattern.match(token) - false_match = BoolArgument.false_pattern.match(token) - - if true_match is None and false_match is None: - validation_status.setFailed() - validation_status.addToMessage(BoolArgument.NOT_BOOL) - else: - validation_status.setValue(true_match is not None) - - return validation_status - - - - - - - diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/configuration_line_definition.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/configuration_line_definition.py deleted file mode 100644 index d1837c58e5..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/configuration_line_definition.py +++ /dev/null @@ -1,32 +0,0 @@ -from ert_gui.ide.keywords.definitions import KeywordDefinition, ArgumentDefinition - - -class ConfigurationLineDefinition(object): - def __init__(self, keyword, arguments, documentation_link, group, required=False): - super(ConfigurationLineDefinition, self).__init__() - - self.__keyword_definition = keyword - self.__argument_definitions = arguments - self.__documentation_link = documentation_link - self.__required = required - self.__group = group - - def isRequired(self): - """ @rtype: bool """ - return self.__required - - def keywordDefinition(self): - """ @rtype: KeywordDefinition """ - return self.__keyword_definition - - def argumentDefinitions(self): - """ @rtype: list of ArgumentDefinition """ - return self.__argument_definitions - - def documentationLink(self): - """ @rtype: str """ - return self.__documentation_link - - def group(self): - """ @rtype: str """ - return self.__group \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/float_argument.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/float_argument.py deleted file mode 100644 index d289dbb9c2..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/float_argument.py +++ /dev/null @@ -1,59 +0,0 @@ -import re -from ert_gui.ide.keywords.definitions import ArgumentDefinition - - -class FloatArgument(ArgumentDefinition): - - NOT_FLOAT = "The argument must be a float." - NOT_IN_RANGE = "The argument is not in range: %s" - - pattern = re.compile("^[\S]+$") - - def __init__(self, from_value=None, to_value=None, **kwargs): - super(FloatArgument, self).__init__(**kwargs) - self.from_value = from_value - self.to_value = to_value - - - def validate(self, token): - validation_status = super(FloatArgument, self).validate(token) - - match = FloatArgument.pattern.match(token) - - if match is None: - validation_status.setFailed() - validation_status.addToMessage(FloatArgument.NOT_FLOAT) - else: - try: - value = float(token) - - if self.from_value is not None and self.to_value is not None and not self.from_value <= value <= self.to_value: - validation_status.setFailed() - range_string = "%f <= %f <= %f" % (self.from_value, value, self.to_value) - validation_status.addToMessage(FloatArgument.NOT_IN_RANGE % range_string) - - elif self.from_value is not None and self.from_value > value: - validation_status.setFailed() - range_string = "%f <= %f" % (self.from_value, value) - validation_status.addToMessage(FloatArgument.NOT_IN_RANGE % range_string) - - elif self.to_value is not None and self.to_value < value: - validation_status.setFailed() - range_string = "%f <= %f" % (value, self.to_value) - validation_status.addToMessage(FloatArgument.NOT_IN_RANGE % range_string) - - if not validation_status.failed(): - validation_status.setValue(value) - - except ValueError: - validation_status.setFailed() - validation_status.addToMessage(FloatArgument.NOT_FLOAT) - - return validation_status - - - - - - - diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/integer_argument.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/integer_argument.py deleted file mode 100644 index e6b57531f6..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/integer_argument.py +++ /dev/null @@ -1,56 +0,0 @@ -import re -from ert_gui.ide.keywords.definitions import ArgumentDefinition - - -class IntegerArgument(ArgumentDefinition): - - NOT_INTEGER = "The argument must be an integer." - NOT_IN_RANGE = "The argument is not in range: %s" - - pattern = re.compile("^-?[0-9]+$") - - def __init__(self, from_value=None, to_value=None, **kwargs): - super(IntegerArgument, self).__init__(**kwargs) - self.from_value = from_value - self.to_value = to_value - - - def validate(self, token): - validation_status = super(IntegerArgument, self).validate(token) - - match = IntegerArgument.pattern.match(token) - - if match is None: - validation_status.setFailed() - validation_status.addToMessage(IntegerArgument.NOT_INTEGER) - else: - value = int(token) - - if self.from_value is not None and self.to_value is not None and not self.from_value <= value <= self.to_value: - validation_status.setFailed() - range_string = "%d <= %d <= %d" % (self.from_value, value, self.to_value) - validation_status.addToMessage(IntegerArgument.NOT_IN_RANGE % range_string) - - elif self.from_value is not None and self.from_value > value: - validation_status.setFailed() - range_string = "%d <= %d" % (self.from_value, value) - validation_status.addToMessage(IntegerArgument.NOT_IN_RANGE % range_string) - - elif self.to_value is not None and self.to_value < value: - validation_status.setFailed() - range_string = "%d <= %d" % (value, self.to_value) - validation_status.addToMessage(IntegerArgument.NOT_IN_RANGE % range_string) - - - if not validation_status.failed(): - validation_status.setValue(value) - - - return validation_status - - - - - - - diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/keyword_definition.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/keyword_definition.py deleted file mode 100644 index 24456505e6..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/keyword_definition.py +++ /dev/null @@ -1,9 +0,0 @@ -class KeywordDefinition(object): - - def __init__(self, name): - super(KeywordDefinition, self).__init__() - self.__name = name - - def name(self): - return self.__name - diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/number_list_string_argument.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/number_list_string_argument.py deleted file mode 100644 index 6f5d245fda..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/number_list_string_argument.py +++ /dev/null @@ -1,43 +0,0 @@ -import re -from ert_gui.ide.keywords.definitions import ArgumentDefinition - - -class NumberListStringArgument(ArgumentDefinition): - - NOT_A_VALID_NUMBER_LIST_STRING = "The input should be of the type:
\n\t23,5.5,11,1.01,3\n
i.e. numeric values separated by commas." - VALUE_NOT_A_NUMBER = "The value: '%s' is not a number." - - PATTERN = re.compile("^[0-9\.\-+, \t]+$") - - def __init__(self, **kwargs): - super(NumberListStringArgument, self).__init__(**kwargs) - - def validate(self, token): - validation_status = super(NumberListStringArgument, self).validate(token) - - if not validation_status: - return validation_status - else: - match = NumberListStringArgument.PATTERN.match(token) - - if match is None: - validation_status.setFailed() - validation_status.addToMessage(NumberListStringArgument.NOT_A_VALID_NUMBER_LIST_STRING) - else: - - groups = token.split(",") - - for group in groups: - group = group.strip() - - if len(group) > 0: - try: - num = float(group.strip()) - except ValueError: - validation_status.setFailed() - validation_status.addToMessage(NumberListStringArgument.VALUE_NOT_A_NUMBER % group) - - - validation_status.setValue(token) - - return validation_status diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/path_argument.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/path_argument.py deleted file mode 100644 index b604fd42ef..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/path_argument.py +++ /dev/null @@ -1,50 +0,0 @@ -import os -import re -from ert_gui.ide.keywords.definitions import ArgumentDefinition - - -class PathArgument(ArgumentDefinition): - - NOT_A_VALID_PATH = "The argument must be a valid path." - PATH_DOES_NOT_EXIST = "The argument must be a valid path that exists." - - PATTERN = re.compile("^[\S]+$") - PATTERN_WITH_SPACE = re.compile("^[\S| ]+$") - - DEFINES = {} - - def __init__(self, must_exist=True, **kwargs): - super(PathArgument, self).__init__(**kwargs) - self.__must_exist = must_exist - - if not "" in PathArgument.DEFINES: - PathArgument.DEFINES[""] = "." - - - def validate(self, token): - validation_status = super(PathArgument, self).validate(token) - - token = PathArgument.substituteDefines(token) - - if self.__must_exist and not os.path.exists(token): - validation_status.setFailed() - validation_status.addToMessage(PathArgument.PATH_DOES_NOT_EXIST) - - return validation_status - - @staticmethod - def substituteDefines(token): - result = token - for key in PathArgument.DEFINES: - if result.find(key) != -1: - value = PathArgument.DEFINES[key] - result = result.replace(key, value) - return result - - @staticmethod - def addDefine(key, value): - value = PathArgument.substituteDefines(value) - PathArgument.DEFINES[key] = value - - - diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/percent_argument.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/percent_argument.py deleted file mode 100644 index 9f329971cb..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/percent_argument.py +++ /dev/null @@ -1,56 +0,0 @@ -import re -from ert_gui.ide.keywords.definitions import ArgumentDefinition - - -class PercentArgument(ArgumentDefinition): - - NOT_PERCENT = "The argument must be a number followed by % - no space allowed." - NOT_IN_RANGE = "The argument is not in range: %s" - - pattern = re.compile("^-?[0-9]+(\.[0-9]+)?\%$") - - def __init__(self, from_value=None, to_value=None, **kwargs): - super(PercentArgument, self).__init__(**kwargs) - self.from_value = from_value * 0.01 - self.to_value = to_value * 0.01 - - - def validate(self, token): - validation_status = super(PercentArgument, self).validate(token) - - match = PercentArgument.pattern.match(token) - - if match is None: - validation_status.setFailed() - validation_status.addToMessage(PercentArgument.NOT_PERCENT) - else: - value = float(token[:-1]) * 0.01 - - if self.from_value is not None and self.to_value is not None and not self.from_value <= value <= self.to_value: - validation_status.setFailed() - range_string = "%d <= %d <= %d" % (self.from_value, value, self.to_value) - validation_status.addToMessage(IntegerArgument.NOT_IN_RANGE % range_string) - - elif self.from_value is not None and self.from_value > value: - validation_status.setFailed() - range_string = "%d <= %d" % (self.from_value, value) - validation_status.addToMessage(IntegerArgument.NOT_IN_RANGE % range_string) - - elif self.to_value is not None and self.to_value < value: - validation_status.setFailed() - range_string = "%d <= %d" % (value, self.to_value) - validation_status.addToMessage(IntegerArgument.NOT_IN_RANGE % range_string) - - - if not validation_status.failed(): - validation_status.setValue(value) - - - return validation_status - - - - - - - diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/proper_name_argument.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/proper_name_argument.py deleted file mode 100644 index 2eed9cc809..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/proper_name_argument.py +++ /dev/null @@ -1,48 +0,0 @@ -import re -from ert_gui.ide.keywords.definitions import ArgumentDefinition - - -class ProperNameArgument(ArgumentDefinition): - - NOT_A_VALID_NAME = "The argument must be a valid string containing only characters of these types:" \ - "
    " \ - "
  • Letters: A-Z and a-z
  • " \ - "
  • Numbers: 0-9
  • " \ - "
  • Underscore: _
  • " \ - "
  • Dash:
  • " \ - "
  • Period: .
  • " \ - "
  • Brackets: <>
  • " \ - "
" - - - PATTERN = re.compile("^[A-Za-z0-9_\-.<>]+$") - - - def __init__(self, **kwargs): - super(ProperNameArgument, self).__init__(**kwargs) - - - def validate(self, token): - validation_status = super(ProperNameArgument, self).validate(token) - - if not validation_status: - return validation_status - else: - match = ProperNameArgument.PATTERN.match(token) - - if match is None: - validation_status.setFailed() - validation_status.addToMessage(ProperNameArgument.NOT_A_VALID_NAME) - else: - - if not validation_status.failed(): - validation_status.setValue(token) - - return validation_status - - - - - - - diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/proper_name_format_argument.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/proper_name_format_argument.py deleted file mode 100644 index ec5f59b721..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/proper_name_format_argument.py +++ /dev/null @@ -1,48 +0,0 @@ -import re -from ert_gui.ide.keywords.definitions import ArgumentDefinition - - -class ProperNameFormatArgument(ArgumentDefinition): - - NOT_A_VALID_NAME_FORMAT = "The argument must be a valid string containing a %d and only characters of these types:" \ - "
    " \ - "
  • Letters: A-Z and a-z
  • " \ - "
  • Numbers: 0-9
  • " \ - "
  • Underscore: _
  • " \ - "
  • Dash:
  • " \ - "
  • Period: .
  • " \ - "
  • Brackets: <>
  • " \ - "
" - - - PATTERN = re.compile("^[A-Za-z0-9_\-.<>]*(%d)[A-Za-z0-9_\-.<>]*$") - - - def __init__(self, **kwargs): - super(ProperNameFormatArgument, self).__init__(**kwargs) - - - def validate(self, token): - validation_status = super(ProperNameFormatArgument, self).validate(token) - - if not validation_status: - return validation_status - else: - match = ProperNameFormatArgument.PATTERN.match(token) - - if match is None: - validation_status.setFailed() - validation_status.addToMessage(ProperNameFormatArgument.NOT_A_VALID_NAME_FORMAT) - else: - - if not validation_status.failed(): - validation_status.setValue(token) - - return validation_status - - - - - - - diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/proper_name_format_string_argument.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/proper_name_format_string_argument.py deleted file mode 100644 index 4eabbcd971..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/proper_name_format_string_argument.py +++ /dev/null @@ -1,45 +0,0 @@ -import re -from ert_gui.ide.keywords.definitions import ArgumentDefinition - - -''' -Keyword definition for proper names containing a string argument. -''' -class ProperNameFormatStringArgument(ArgumentDefinition): - - NOT_A_VALID_NAME_FORMAT = "The argument must be a valid string containing a %s and only characters of these types:" \ - "
    " \ - "
  • Letters: A-Z and a-z
  • " \ - "
  • Numbers: 0-9
  • " \ - "
  • Underscore: _
  • " \ - "
  • Dash:
  • " \ - "
  • Period: .
  • " \ - "
  • Brackets: <>
  • " \ - "
" - - - PATTERN = re.compile("^[A-Za-z0-9_\-.<>]*(%s)[A-Za-z0-9_\-.<>]*$") - - - def __init__(self, **kwargs): - super(ProperNameFormatStringArgument, self).__init__(**kwargs) - - - def validate(self, token): - validation_status = super(ProperNameFormatStringArgument, self).validate(token) - - if not validation_status: - return validation_status - else: - match = ProperNameFormatStringArgument.PATTERN.match(token) - - if match is None: - validation_status.setFailed() - validation_status.addToMessage(ProperNameFormatStringArgument.NOT_A_VALID_NAME_FORMAT) - else: - - if not validation_status.failed(): - validation_status.setValue(token) - - return validation_status - diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/range_string_argument.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/range_string_argument.py deleted file mode 100644 index 8fca2fde08..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/range_string_argument.py +++ /dev/null @@ -1,71 +0,0 @@ -import re -from ert_gui.ide.keywords.definitions import ArgumentDefinition - - -class RangeStringArgument(ArgumentDefinition): - - NOT_A_VALID_RANGE_STRING = "The input should be of the type:
\n\t1,3-5,9,17\n
i.e. integer values separated by commas, and dashes to represent ranges." - VALUE_NOT_IN_RANGE = "A value must be in the range from 0 to %d." - - - PATTERN = re.compile("^[0-9\-, \t]+$") - RANGE_PATTERN = re.compile("^[ \t]*([0-9]+)[ \t]*-[ \t]*([0-9]+)[ \t]*$") - NUMBER_PATTERN = re.compile("^[ \t]*([0-9]+)[ \t]*$") - - - def __init__(self, max_value=None, **kwargs): - super(RangeStringArgument, self).__init__(**kwargs) - self.__max_value = max_value - - def validate(self, token): - validation_status = super(RangeStringArgument, self).validate(token) - - if not validation_status: - return validation_status - else: - match = RangeStringArgument.PATTERN.match(token) - - if match is None: - validation_status.setFailed() - validation_status.addToMessage(RangeStringArgument.NOT_A_VALID_RANGE_STRING) - else: - - groups = token.split(",") - - for group in groups: - range_match = RangeStringArgument.RANGE_PATTERN.match(group) - number_match = RangeStringArgument.NUMBER_PATTERN.match(group) - - - if range_match is None and number_match is None: - validation_status.setFailed() - validation_status.addToMessage(RangeStringArgument.NOT_A_VALID_RANGE_STRING) - break - - if range_match: - num_1 = int(range_match.group(1)) - num_2 = int(range_match.group(2)) - - if not num_2 > num_1: - validation_status.setFailed() - validation_status.addToMessage(RangeStringArgument.NOT_A_VALID_RANGE_STRING) - break - - if self.__max_value is not None and (num_1 >= self.__max_value or num_2 >= self.__max_value): - validation_status.setFailed() - validation_status.addToMessage(RangeStringArgument.VALUE_NOT_IN_RANGE % (self.__max_value - 1)) - break - - if number_match and self.__max_value is not None: - num = int(number_match.group(1)) - - if num >= self.__max_value: - validation_status.setFailed() - validation_status.addToMessage(RangeStringArgument.VALUE_NOT_IN_RANGE % (self.__max_value - 1)) - break - - - - validation_status.setValue(token) - - return validation_status diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/string_argument.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/string_argument.py deleted file mode 100644 index 760d26f018..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/definitions/string_argument.py +++ /dev/null @@ -1,47 +0,0 @@ -import re -from ert_gui.ide.keywords.definitions import ArgumentDefinition - - -class StringArgument(ArgumentDefinition): - - NOT_A_VALID_STRING = "The argument must be a valid string." - - PATTERN = re.compile("^[\S]+$") - PATTERN_WITH_SPACE = re.compile("^[\S| ]+$") - - - def __init__(self, allow_space=False, **kwargs): - super(StringArgument, self).__init__(**kwargs) - self.__allow_space = allow_space - - - def validate(self, token): - validation_status = super(StringArgument, self).validate(token) - - if not validation_status: - return validation_status - elif self.isOptional() and token.strip() == "": - return validation_status - else: - if self.__allow_space: - match = StringArgument.PATTERN_WITH_SPACE.match(token) - else: - match = StringArgument.PATTERN.match(token) - - if match is None: - validation_status.setFailed() - validation_status.addToMessage(StringArgument.NOT_A_VALID_STRING) - else: - - if not validation_status.failed(): - validation_status.setValue(token) - - - return validation_status - - - - - - - diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/eclipse_keywords.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/eclipse_keywords.py deleted file mode 100644 index 2386e78271..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/eclipse_keywords.py +++ /dev/null @@ -1,101 +0,0 @@ -from ert_gui.ide.keywords.definitions import IntegerArgument, KeywordDefinition, ConfigurationLineDefinition, StringArgument, BoolArgument -from ert_gui.ide.keywords.definitions.path_argument import PathArgument - - -class EclipseKeywords(object): - def __init__(self, ert_keywords): - super(EclipseKeywords, self).__init__() - self.group = "Eclipse" - - - ert_keywords.addKeyword(self.addDataFile()) - ert_keywords.addKeyword(self.addEclBase()) - ert_keywords.addKeyword(self.addJobName()) - ert_keywords.addKeyword(self.addGrid()) - ert_keywords.addKeyword(self.addInitSection()) - ert_keywords.addKeyword(self.addScheduleFile()) - ert_keywords.addKeyword(self.addDataKw()) - ert_keywords.addKeyword(self.addEquilInitFile()) - ert_keywords.addKeyword(self.addIgnoreSchedule()) - - - - def addDataFile(self): - data_file = ConfigurationLineDefinition(keyword=KeywordDefinition("DATA_FILE"), - arguments=[PathArgument()], - documentation_link="keywords/data_file", - required=True, - group=self.group) - return data_file - - - def addEquilInitFile(self): - equil_init_file = ConfigurationLineDefinition(keyword=KeywordDefinition("EQUIL_INIT_FILE"), - arguments=[PathArgument()], - documentation_link="keywords/equil_init_file", - group=self.group) - return equil_init_file - - - - def addEclBase(self): - ecl_base = ConfigurationLineDefinition(keyword=KeywordDefinition("ECLBASE"), - arguments=[StringArgument()], - documentation_link="keywords/eclbase", - required=True, - group=self.group) - return ecl_base - - - def addJobName(self): - job_name = ConfigurationLineDefinition(keyword=KeywordDefinition("JOBNAME"), - arguments=[StringArgument()], - documentation_link="keywords/job_name", - required=True, - group=self.group) - return job_name - - - def addGrid(self): - grid = ConfigurationLineDefinition(keyword=KeywordDefinition("GRID"), - arguments=[PathArgument()], - documentation_link="keywords/grid", - required=True, - group=self.group) - return grid - - def addInitSection(self): - init_section = ConfigurationLineDefinition(keyword=KeywordDefinition("INIT_SECTION"), - arguments=[PathArgument()], - documentation_link="keywords/init_section", - required=True, - group=self.group) - return init_section - - - def addScheduleFile(self): - schedule_file = ConfigurationLineDefinition(keyword=KeywordDefinition("SCHEDULE_FILE"), - arguments=[PathArgument()], - documentation_link="keywords/schedule_file", - required=True, - group=self.group) - return schedule_file - - - def addIgnoreSchedule(self): - ignore_schedule = ConfigurationLineDefinition(keyword=KeywordDefinition("IGNORE_SCHEDULE"), - arguments=[BoolArgument()], - documentation_link="keywords/ignore_schedule", - required=False, - group=self.group) - return ignore_schedule - - - def addDataKw(self): - data_kw = ConfigurationLineDefinition(keyword=KeywordDefinition("DATA_KW"), - arguments=[StringArgument(), - StringArgument(rest_of_line=True, allow_space=True)], - documentation_link="keywords/data_kw", - required=False, - group=self.group) - return data_kw \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/enkf_control_keywords.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/enkf_control_keywords.py deleted file mode 100644 index efad1a52e2..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/enkf_control_keywords.py +++ /dev/null @@ -1,240 +0,0 @@ -from ert_gui.ide.keywords.definitions import IntegerArgument, KeywordDefinition, ConfigurationLineDefinition, PathArgument, StringArgument, FloatArgument, BoolArgument - - -class EnkfControlKeywords(object): - def __init__(self, ert_keywords): - super(EnkfControlKeywords, self).__init__() - self.group = "Enkf Control" - - ert_keywords.addKeyword(self.addEnkfAlpha()) - ert_keywords.addKeyword(self.addEnkfBootstrap()) - ert_keywords.addKeyword(self.addEnkfCvFolds()) - ert_keywords.addKeyword(self.addEnkfForceNComp()) - ert_keywords.addKeyword(self.addEnkfLocalCv()) - ert_keywords.addKeyword(self.addEnkfPenPress()) - ert_keywords.addKeyword(self.addEnkfMode()) - ert_keywords.addKeyword(self.addMergeObservations()) - ert_keywords.addKeyword(self.addEnkfNComp()) - ert_keywords.addKeyword(self.addEnkfRerun()) - ert_keywords.addKeyword(self.addEnkfScaling()) - ert_keywords.addKeyword(self.addEnkfTruncation()) - ert_keywords.addKeyword(self.addUpdateLogPath()) - ert_keywords.addKeyword(self.addRerunStart()) - ert_keywords.addKeyword(self.addUpdateResults()) - ert_keywords.addKeyword(self.addEnkfCrossValidation()) - ert_keywords.addKeyword(self.addEnkfKernelRegression()) - ert_keywords.addKeyword(self.addEnkfKernelFunction()) - ert_keywords.addKeyword(self.addEnkfKernelParam()) - ert_keywords.addKeyword(self.addEnkfSchedFile()) - ert_keywords.addKeyword(self.addCaseTable()) - ert_keywords.addKeyword(self.addContainer()) - - - - def addEnkfAlpha(self): - enkf_alpha = ConfigurationLineDefinition(keyword=KeywordDefinition("ENKF_ALPHA"), - arguments=[FloatArgument()], - documentation_link="keywords/enkf_alpha", - required=False, - group=self.group) - return enkf_alpha - - - - def addEnkfBootstrap(self): - enkf_bootstrap = ConfigurationLineDefinition(keyword=KeywordDefinition("ENKF_BOOTSTRAP"), - arguments=[BoolArgument()], - documentation_link="keywords/enkf_bootstrap", - required=False, - group=self.group) - return enkf_bootstrap - - - - def addEnkfCvFolds(self): - enkf_cv_folds = ConfigurationLineDefinition(keyword=KeywordDefinition("ENKF_CV_FOLDS"), - arguments=[IntegerArgument()], - documentation_link="keywords/enkf_cv_folds", - required=False, - group=self.group) - return enkf_cv_folds - - - - def addEnkfForceNComp(self): - enkf_force_ncomp = ConfigurationLineDefinition(keyword=KeywordDefinition("ENKF_FORCE_NCOMP"), - arguments=[BoolArgument()], - documentation_link="keywords/enkf_force_ncomp", - required=False, - group=self.group) - return enkf_force_ncomp - - - def addEnkfLocalCv(self): - enkf_local_cv = ConfigurationLineDefinition(keyword=KeywordDefinition("ENKF_LOCAL_CV"), - arguments=[BoolArgument()], - documentation_link="keywords/enkf_local_cv", - required=False, - group=self.group) - return enkf_local_cv - - - def addEnkfPenPress(self): - enkf_pen_press = ConfigurationLineDefinition(keyword=KeywordDefinition("ENKF_PEN_PRESS"), - arguments=[BoolArgument()], - documentation_link="keywords/enkf_pen_press", - required=False, - group=self.group) - return enkf_pen_press - - - - def addEnkfMode(self): - enkf_mode = ConfigurationLineDefinition(keyword=KeywordDefinition("ENKF_MODE"), - arguments=[StringArgument(built_in=True)], - documentation_link="keywords/enkf_mode", - required=False, - group=self.group) - return enkf_mode - - - - def addMergeObservations(self): - enkf_merge_observations = ConfigurationLineDefinition(keyword=KeywordDefinition("ENKF_MERGE_OBSERVATIONS"), - arguments=[BoolArgument()], - documentation_link="keywords/enkf_merge_observations", - required=False, - group=self.group) - return enkf_merge_observations - - - - def addEnkfNComp(self): - enkf_ncomp = ConfigurationLineDefinition(keyword=KeywordDefinition("ENKF_NCOMP"), - arguments=[IntegerArgument()], - documentation_link="keywords/enkf_ncomp", - required=False, - group=self.group) - return enkf_ncomp - - - def addEnkfRerun(self): - enkf_rerun = ConfigurationLineDefinition(keyword=KeywordDefinition("ENKF_RERUN"), - arguments=[BoolArgument()], - documentation_link="keywords/enkf_rerun", - required=False, - group=self.group) - return enkf_rerun - - - def addRerunStart(self): - rerun_start = ConfigurationLineDefinition(keyword=KeywordDefinition("RERUN_START"), - arguments=[IntegerArgument()], - documentation_link="keywords/rerun_start", - required=False, - group=self.group) - return rerun_start - - - - def addEnkfScaling(self): - enkf_scaling = ConfigurationLineDefinition(keyword=KeywordDefinition("ENKF_SCALING"), - arguments=[BoolArgument()], - documentation_link="keywords/enkf_scaling", - required=False, - group=self.group) - return enkf_scaling - - - - def addEnkfTruncation(self): - enkf_truncation = ConfigurationLineDefinition(keyword=KeywordDefinition("ENKF_TRUNCATION"), - arguments=[FloatArgument()], - documentation_link="keywords/enkf_truncation", - required=False, - group=self.group) - return enkf_truncation - - - - def addUpdateLogPath(self): - update_log_path = ConfigurationLineDefinition(keyword=KeywordDefinition("UPDATE_LOG_PATH"), - arguments=[PathArgument()], - documentation_link="keywords/update_log_path", - required=False, - group=self.group) - return update_log_path - - - def addUpdateResults(self): - update_results = ConfigurationLineDefinition(keyword=KeywordDefinition("UPDATE_RESULTS"), - arguments=[BoolArgument()], - documentation_link="keywords/update_results", - required=False, - group=self.group) - return update_results - - - def addEnkfCrossValidation(self): - cross_validation = ConfigurationLineDefinition(keyword=KeywordDefinition("ENKF_CROSS_VALIDATION"), - arguments=[StringArgument()], - documentation_link="keywords/enkf_cross_validation", - required=False, - group=self.group) - return cross_validation - - - def addEnkfKernelRegression(self): - kernel_regression = ConfigurationLineDefinition(keyword=KeywordDefinition("ENKF_KERNEL_REGRESSION"), - arguments=[StringArgument()], - documentation_link="keywords/enkf_kernel_regression", - required=False, - group=self.group) - return kernel_regression - - - def addEnkfKernelFunction(self): - kernel_function = ConfigurationLineDefinition(keyword=KeywordDefinition("ENKF_KERNEL_FUNCTION"), - arguments=[StringArgument()], - documentation_link="keywords/enkf_kernel_function", - required=False, - group=self.group) - return kernel_function - - - def addEnkfKernelParam(self): - kernel_param = ConfigurationLineDefinition(keyword=KeywordDefinition("ENKF_KERNEL_PARAM"), - arguments=[StringArgument()], - documentation_link="keywords/enkf_kernel_param", - required=False, - group=self.group) - return kernel_param - - - def addEnkfSchedFile(self): - sched_file = ConfigurationLineDefinition(keyword=KeywordDefinition("ENKF_SCHED_FILE"), - arguments=[PathArgument()], - documentation_link="keywords/enkf_sched_file", - required=False, - group=self.group) - return sched_file - - - - def addCaseTable(self): - case_table = ConfigurationLineDefinition(keyword=KeywordDefinition("CASE_TABLE"), - arguments=[StringArgument()], - documentation_link="keywords/case_table", - required=False, - group=self.group) - return case_table - - - def addContainer(self): - container = ConfigurationLineDefinition(keyword=KeywordDefinition("CONTAINER"), - arguments=[StringArgument(rest_of_line=True,allow_space=True)], - documentation_link="keywords/container", - required=False, - group=self.group) - return container - diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/ensemble_keywords.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/ensemble_keywords.py deleted file mode 100644 index f85e3dbfa2..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/ensemble_keywords.py +++ /dev/null @@ -1,135 +0,0 @@ -from ert_gui.ide.keywords.definitions import IntegerArgument, KeywordDefinition, ConfigurationLineDefinition, PathArgument, StringArgument - - -class EnsembleKeywords(object): - def __init__(self, ert_keywords): - super(EnsembleKeywords, self).__init__() - self.group = "Ensemble" - - ert_keywords.addKeyword(self.addNumRealizations()) - ert_keywords.addKeyword(self.addEnsPath()) - ert_keywords.addKeyword(self.addSelectCase()) - ert_keywords.addKeyword(self.addEndDate()) - ert_keywords.addKeyword(self.addHistorySource()) - ert_keywords.addKeyword(self.addRefCase()) - ert_keywords.addKeyword(self.addInclude()) - ert_keywords.addKeyword(self.addObsConfig()) - ert_keywords.addKeyword(self.addResultPath()) - ert_keywords.addKeyword(self.addLicensePath()) - ert_keywords.addKeyword(self.addLocalConfig()) - ert_keywords.addKeyword(self.addRefcaseList()) - - - - - - def addNumRealizations(self): - num_realizations = ConfigurationLineDefinition(keyword=KeywordDefinition("NUM_REALIZATIONS"), - arguments=[IntegerArgument(from_value=1)], - documentation_link="keywords/num_realizations", - required=True, - group=self.group) - return num_realizations - - - def addEndDate(self): - end_date = ConfigurationLineDefinition(keyword=KeywordDefinition("END_DATE"), - arguments=[StringArgument()], - documentation_link="keywords/end_date", - required=False, - group=self.group) - return end_date - - - def addEnsPath(self): - ens_path = ConfigurationLineDefinition(keyword=KeywordDefinition("ENSPATH"), - arguments=[PathArgument()], - documentation_link="keywords/enspath", - required=False, - group=self.group) - return ens_path - - - - def addSelectCase(self): - select_case = ConfigurationLineDefinition(keyword=KeywordDefinition("SELECT_CASE"), - arguments=[StringArgument()], - documentation_link="keywords/select_case", - required=False, - group=self.group) - return select_case - - - def addHistorySource(self): - history_source = ConfigurationLineDefinition(keyword=KeywordDefinition("HISTORY_SOURCE"), - arguments=[StringArgument(built_in=True)], - documentation_link="keywords/history_source", - required=False, - group=self.group) - return history_source - - - def addRefCase(self): - refcase = ConfigurationLineDefinition(keyword=KeywordDefinition("REFCASE"), - arguments=[PathArgument()], - documentation_link="keywords/refcase", - required=False, - group=self.group) - return refcase - - - def addRefcaseList(self): - refcase_list = ConfigurationLineDefinition(keyword=KeywordDefinition("REFCASE_LIST"), - arguments=[StringArgument(rest_of_line=True,allow_space=True)], - documentation_link="keywords/refcase_list", - required=False, - group=self.group) - return refcase_list - - - - def addInclude(self): - include = ConfigurationLineDefinition(keyword=KeywordDefinition("INCLUDE"), - arguments=[PathArgument()], - documentation_link="keywords/include", - required=False, - group=self.group) - return include - - - - def addObsConfig(self): - obs_config = ConfigurationLineDefinition(keyword=KeywordDefinition("OBS_CONFIG"), - arguments=[PathArgument()], - documentation_link="keywords/obs_config", - required=False, - group=self.group) - return obs_config - - - def addResultPath(self): - result_path = ConfigurationLineDefinition(keyword=KeywordDefinition("RESULT_PATH"), - arguments=[PathArgument()], - documentation_link="keywords/result_path", - required=False, - group=self.group) - return result_path - - - def addLicensePath(self): - license_path = ConfigurationLineDefinition(keyword=KeywordDefinition("LICENSE_PATH"), - arguments=[PathArgument()], - documentation_link="keywords/license_path", - required=False, - group=self.group) - return license_path - - - def addLocalConfig(self): - local_config = ConfigurationLineDefinition(keyword=KeywordDefinition("LOCAL_CONFIG"), - arguments=[StringArgument(rest_of_line=True,allow_space=True)], - documentation_link="keywords/local_config", - required=False, - group=self.group) - return local_config - diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/ert_keywords.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/ert_keywords.py deleted file mode 100644 index 572604add8..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/ert_keywords.py +++ /dev/null @@ -1,73 +0,0 @@ -from ert_gui.ide.keywords.advanced_keywords import AdvancedKeywords -from ert_gui.ide.keywords.analysis_module_keywords import AnalysisModuleKeywords -from ert_gui.ide.keywords.definitions import ConfigurationLineDefinition -from ert_gui.ide.keywords.eclipse_keywords import EclipseKeywords -from ert_gui.ide.keywords.enkf_control_keywords import EnkfControlKeywords -from ert_gui.ide.keywords.ensemble_keywords import EnsembleKeywords -from ert_gui.ide.keywords.parametrization_keywords import ParametrizationKeywords -from ert_gui.ide.keywords.plot_keywords import PlotKeywords -from ert_gui.ide.keywords.qc_keywords import QCKeywords -from ert_gui.ide.keywords.queue_system_keywords import QueueSystemKeywords -from ert_gui.ide.keywords.run_keywords import RunKeywords -from ert_gui.ide.keywords.simulation_control_keywords import SimulationControlKeywords -from ert_gui.ide.keywords.unix_environment_keywords import UnixEnvironmentKeywords -from ert_gui.ide.keywords.workflow_keywords import WorkflowKeywords - - -class ErtKeywords(object): - def __init__(self): - super(ErtKeywords, self).__init__() - - self.keywords = {} - self.groups = {} - - EnsembleKeywords(self) - RunKeywords(self) - EclipseKeywords(self) - QueueSystemKeywords(self) - SimulationControlKeywords(self) - ParametrizationKeywords(self) - EnkfControlKeywords(self) - AnalysisModuleKeywords(self) - PlotKeywords(self) - WorkflowKeywords(self) - AdvancedKeywords(self) - QCKeywords(self) - UnixEnvironmentKeywords(self) - - - # group_names = sorted(self.groups.keys()) - # - # for group in group_names: - # print(group) - # keywords = self.groups[group] - # for keyword in keywords: - # print(" %s" % keyword.keywordDefinition().name()) - - - - - - def addKeyword(self, keyword): - assert isinstance(keyword, ConfigurationLineDefinition) - - name = keyword.keywordDefinition().name() - if name in self.keywords: - raise ValueError("Keyword %s already in Ert keyword list!" % name) - - self.keywords[name] = keyword - - group = keyword.group() - - if not group in self.groups: - self.groups[group] = [] - - self.groups[group].append(keyword) - - def __contains__(self, item): - return item in self.keywords - - def __getitem__(self, item): - """ @rtype: ConfigurationLineDefinition """ - return self.keywords[item] - diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/parametrization_keywords.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/parametrization_keywords.py deleted file mode 100644 index baac76ee3c..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/parametrization_keywords.py +++ /dev/null @@ -1,128 +0,0 @@ -from ert_gui.ide.keywords.definitions import IntegerArgument, KeywordDefinition, ConfigurationLineDefinition, PathArgument, StringArgument - - -class ParametrizationKeywords(object): - def __init__(self, ert_keywords): - super(ParametrizationKeywords, self).__init__() - self.group = "Parametrization" - - ert_keywords.addKeyword(self.addField()) - ert_keywords.addKeyword(self.addGenData()) - ert_keywords.addKeyword(self.addGenKw()) - ert_keywords.addKeyword(self.addSummary()) - ert_keywords.addKeyword(self.addGenParam()) - ert_keywords.addKeyword(self.addDBaseType()) - ert_keywords.addKeyword(self.addStoreSeed()) - ert_keywords.addKeyword(self.addLoadSeed()) - ert_keywords.addKeyword(self.addGenKwTagFormat()) - ert_keywords.addKeyword(self.addSurface()) - ert_keywords.addKeyword(self.addGenKwExportFile()) - - - - - def addField(self): - field = ConfigurationLineDefinition(keyword=KeywordDefinition("FIELD"), - arguments=[StringArgument(), - StringArgument(), - StringArgument(rest_of_line=True, allow_space=True)], - documentation_link="keywords/field", - required=False, - group=self.group) - return field - - - - def addGenData(self): - gen_data = ConfigurationLineDefinition(keyword=KeywordDefinition("GEN_DATA"), - arguments=[StringArgument(), - StringArgument(), - StringArgument(rest_of_line=True, allow_space=True)], - documentation_link="keywords/gen_data", - required=False, - group=self.group) - return gen_data - - - def addGenKw(self): - gen_kw = ConfigurationLineDefinition(keyword=KeywordDefinition("GEN_KW"), - arguments=[StringArgument(), - StringArgument(), - StringArgument(rest_of_line=True,allow_space=True)], - documentation_link="keywords/gen_kw", - required=False, - group=self.group) - return gen_kw - - - def addGenKwExportFile(self): - gen_kw_export_file = ConfigurationLineDefinition(keyword=KeywordDefinition("GEN_KW_EXPORT_FILE"), - arguments=[StringArgument()], - documentation_link="keywords/gen_kw_export_file", - required=False, - group=self.group) - return gen_kw_export_file - - - def addGenKwTagFormat(self): - gen_kw_tag_format = ConfigurationLineDefinition(keyword=KeywordDefinition("GEN_KW_TAG_FORMAT"), - arguments=[StringArgument(built_in=True,allow_space=True)], - documentation_link="keywords/gen_kw_tag_format", - required=False, - group=self.group) - return gen_kw_tag_format - - - def addGenParam(self): - gen_param = ConfigurationLineDefinition(keyword=KeywordDefinition("GEN_PARAM"), - arguments=[StringArgument(), - StringArgument(), - StringArgument(built_in=True,allow_space=True)], - documentation_link="keywords/gen_param", - required=False, - group=self.group) - return gen_param - - - def addSummary(self): - summary = ConfigurationLineDefinition(keyword=KeywordDefinition("SUMMARY"), - arguments=[StringArgument(rest_of_line=True,allow_space=True)], - documentation_link="keywords/summary", - required=False, - group=self.group) - return summary - - def addDBaseType(self): - dbase_type = ConfigurationLineDefinition(keyword=KeywordDefinition("DBASE_TYPE"), - arguments=[StringArgument()], - documentation_link="keywords/dbase_type", - required=False, - group=self.group) - return dbase_type - - - def addStoreSeed(self): - store_seed = ConfigurationLineDefinition(keyword=KeywordDefinition("STORE_SEED"), - arguments=[StringArgument(built_in=True)], - documentation_link="keywords/store_seed", - required=False, - group=self.group) - return store_seed - - - def addLoadSeed(self): - load_seed = ConfigurationLineDefinition(keyword=KeywordDefinition("LOAD_SEED"), - arguments=[StringArgument(built_in=True)], - documentation_link="keywords/load_seed", - required=False, - group=self.group) - return load_seed - - - def addSurface(self): - surface = ConfigurationLineDefinition(keyword=KeywordDefinition("SURFACE"), - arguments=[StringArgument(rest_of_line=True,allow_space=True)], - documentation_link="keywords/surface", - required=False, - group=self.group) - return surface \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/plot_keywords.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/plot_keywords.py deleted file mode 100644 index b4a70291db..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/plot_keywords.py +++ /dev/null @@ -1,135 +0,0 @@ -from ert_gui.ide.keywords.definitions import IntegerArgument, KeywordDefinition, ConfigurationLineDefinition, PathArgument, StringArgument, BoolArgument - - -class PlotKeywords(object): - def __init__(self, ert_keywords): - super(PlotKeywords, self).__init__() - self.group = "Plot" - - ert_keywords.addKeyword(self.addImageViewer()) - ert_keywords.addKeyword(self.addImageType()) - ert_keywords.addKeyword(self.addPlotDriver()) - ert_keywords.addKeyword(self.addPlotErrorbar()) - ert_keywords.addKeyword(self.addPlotErrorbarMax()) - ert_keywords.addKeyword(self.addPlotWidth()) - ert_keywords.addKeyword(self.addPlotHeight()) - ert_keywords.addKeyword(self.addPlotRefcase()) - ert_keywords.addKeyword(self.addPlotRefcaseList()) - ert_keywords.addKeyword(self.addPlotPath()) - ert_keywords.addKeyword(self.addRftConfig()) - ert_keywords.addKeyword(self.addRftPath()) - - - - def addImageViewer(self): - image_viewer = ConfigurationLineDefinition(keyword=KeywordDefinition("IMAGE_VIEWER"), - arguments=[PathArgument()], - documentation_link="keywords/image_viewer", - required=False, - group=self.group) - return image_viewer - - - def addImageType(self): - image_type = ConfigurationLineDefinition(keyword=KeywordDefinition("IMAGE_TYPE"), - arguments=[StringArgument(built_in=True)], - documentation_link="keywords/image_type", - required=False, - group=self.group) - return image_type - - - def addPlotDriver(self): - plot_driver = ConfigurationLineDefinition(keyword=KeywordDefinition("PLOT_DRIVER"), - arguments=[StringArgument(built_in=True)], - documentation_link="keywords/plot_driver", - required=False, - group=self.group) - return plot_driver - - - def addPlotErrorbar(self): - plot_errorbar = ConfigurationLineDefinition(keyword=KeywordDefinition("PLOT_ERRORBAR"), - arguments=[BoolArgument()], - documentation_link="keywords/plot_errorbar", - required=False, - group=self.group) - return plot_errorbar - - - - def addPlotErrorbarMax(self): - plot_errorbar_max = ConfigurationLineDefinition(keyword=KeywordDefinition("PLOT_ERRORBAR_MAX"), - arguments=[IntegerArgument()], - documentation_link="keywords/plot_errorbar_max", - required=False, - group=self.group) - return plot_errorbar_max - - - - def addPlotWidth(self): - plot_width = ConfigurationLineDefinition(keyword=KeywordDefinition("PLOT_WIDTH"), - arguments=[IntegerArgument()], - documentation_link="keywords/plot_width", - required=False, - group=self.group) - return plot_width - - - def addPlotHeight(self): - plot_height = ConfigurationLineDefinition(keyword=KeywordDefinition("PLOT_HEIGHT"), - arguments=[IntegerArgument()], - documentation_link="keywords/plot_height", - required=False, - group=self.group) - return plot_height - - - - def addPlotRefcase(self): - plot_refcase = ConfigurationLineDefinition(keyword=KeywordDefinition("PLOT_REFCASE"), - arguments=[BoolArgument()], - documentation_link="keywords/plot_refcase", - required=False, - group=self.group) - return plot_refcase - - - - def addPlotRefcaseList(self): - plot_refcase_list = ConfigurationLineDefinition(keyword=KeywordDefinition("PLOT_REFCASE_LIST"), - arguments=[StringArgument(rest_of_line=True,allow_space=True)], - documentation_link="keywords/plot_refcase_list", - required=False, - group=self.group) - return plot_refcase_list - - - def addPlotPath(self): - plot_path = ConfigurationLineDefinition(keyword=KeywordDefinition("PLOT_PATH"), - arguments=[PathArgument(must_exist=False)], - documentation_link="keywords/plot_path", - required=False, - group=self.group) - return plot_path - - - - def addRftConfig(self): - rft_config = ConfigurationLineDefinition(keyword=KeywordDefinition("RFT_CONFIG"), - arguments=[PathArgument()], - documentation_link="keywords/rft_config", - required=False, - group=self.group) - return rft_config - - - def addRftPath(self): - rft_path = ConfigurationLineDefinition(keyword=KeywordDefinition("RFTPATH"), - arguments=[PathArgument()], - documentation_link="keywords/rftpath", - required=False, - group=self.group) - return rft_path - diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/qc_keywords.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/qc_keywords.py deleted file mode 100644 index 8838c35185..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/qc_keywords.py +++ /dev/null @@ -1,31 +0,0 @@ -from ert_gui.ide.keywords.definitions import IntegerArgument, KeywordDefinition, ConfigurationLineDefinition, PathArgument, StringArgument - - -class QCKeywords(object): - def __init__(self, ert_keywords): - super(QCKeywords, self).__init__() - self.group = "Quality Check" - - ert_keywords.addKeyword(self.addQCWorkflow()) - ert_keywords.addKeyword(self.addQCPath()) - - - - - def addQCWorkflow(self): - qc_workflow = ConfigurationLineDefinition(keyword=KeywordDefinition("QC_WORKFLOW"), - arguments=[StringArgument()], - documentation_link="keywords/qc_workflow", - required=False, - group=self.group) - return qc_workflow - - - - def addQCPath(self): - qc_path = ConfigurationLineDefinition(keyword=KeywordDefinition("QC_PATH"), - arguments=[PathArgument()], - documentation_link="keywords/qc_path", - required=False, - group=self.group) - return qc_path \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/queue_system_keywords.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/queue_system_keywords.py deleted file mode 100644 index 7158b12127..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/queue_system_keywords.py +++ /dev/null @@ -1,128 +0,0 @@ -from ert_gui.ide.keywords.definitions import StringArgument, KeywordDefinition, IntegerArgument, PathArgument -from ert_gui.ide.keywords.definitions.configuration_line_definition import ConfigurationLineDefinition - - -class QueueSystemKeywords(object): - - - def __init__(self, ert_keywords): - super(QueueSystemKeywords, self).__init__() - self.group = "Queue System" - - ert_keywords.addKeyword(self.addQueueOption()) - ert_keywords.addKeyword(self.addQueueSystem()) - ert_keywords.addKeyword(self.addLsfServer()) - ert_keywords.addKeyword(self.addLsfQueue()) - ert_keywords.addKeyword(self.addMaxRunningLsf()) - ert_keywords.addKeyword(self.addTorqueQueue()) - ert_keywords.addKeyword(self.addMaxRunningLocal()) - ert_keywords.addKeyword(self.addRshHost()) - ert_keywords.addKeyword(self.addRshCommand()) - ert_keywords.addKeyword(self.addMaxRunningRsh()) - ert_keywords.addKeyword(self.addHostType()) - ert_keywords.addKeyword(self.addLsfResources()) - - - - def addQueueOption(self): - queue_option = ConfigurationLineDefinition(keyword = KeywordDefinition("QUEUE_OPTION"), - arguments=[ - StringArgument(built_in=True), - StringArgument(built_in=True), - StringArgument(allow_space=True, rest_of_line=True) - ], - documentation_link="keywords/queue_option", - group=self.group) - - return queue_option - - - - def addQueueSystem(self): - queue_system = ConfigurationLineDefinition(keyword = KeywordDefinition("QUEUE_SYSTEM"), - arguments=[StringArgument(built_in=True)], - documentation_link="keywords/queue_system", - group=self.group) - return queue_system - - - def addLsfServer(self): - lsf_server = ConfigurationLineDefinition(keyword = KeywordDefinition("LSF_SERVER"), - arguments=[StringArgument(built_in=True)], - documentation_link="keywords/lsf_server", - group=self.group) - return lsf_server - - - - def addLsfQueue(self): - lsf_queue = ConfigurationLineDefinition(keyword = KeywordDefinition("LSF_QUEUE"), - arguments=[StringArgument()], - documentation_link="keywords/lsf_queue", - group=self.group) - return lsf_queue - - - def addMaxRunningLsf(self): - max_running_lsf = ConfigurationLineDefinition(keyword = KeywordDefinition("MAX_RUNNING_LSF"), - arguments=[IntegerArgument(from_value=1)], - documentation_link="keywords/max_running_lsf", - group=self.group) - return max_running_lsf - - - def addLsfResources(self): - lsf_resources = ConfigurationLineDefinition(keyword = KeywordDefinition("LSF_RESOURCES"), - arguments=[StringArgument(rest_of_line=True,allow_space=True)], - documentation_link="keywords/lsf_resources", - group=self.group) - return lsf_resources - - - def addTorqueQueue(self): - torque_queue = ConfigurationLineDefinition(keyword = KeywordDefinition("TORQUE_QUEUE"), - arguments=[StringArgument()], - documentation_link="keywords/torque_queue", - group=self.group) - return torque_queue - - - def addMaxRunningLocal(self): - max_running_local = ConfigurationLineDefinition(keyword = KeywordDefinition("MAX_RUNNING_LOCAL"), - arguments=[IntegerArgument(from_value=1)], - documentation_link="keywords/max_running_local", - group=self.group) - return max_running_local - - - def addRshHost(self): - rsh_host = ConfigurationLineDefinition(keyword = KeywordDefinition("RSH_HOST"), - arguments=[StringArgument(), StringArgument(rest_of_line=True, allow_space=True)], - documentation_link="keywords/rsh_host", - group=self.group) - return rsh_host - - - def addRshCommand(self): - rsh_command = ConfigurationLineDefinition(keyword = KeywordDefinition("RSH_COMMAND"), - arguments=[PathArgument()], - documentation_link="keywords/rsh_command", - group=self.group) - return rsh_command - - - def addMaxRunningRsh(self): - max_running_rsh = ConfigurationLineDefinition(keyword = KeywordDefinition("MAX_RUNNING_RSH"), - arguments=[IntegerArgument()], - documentation_link="keywords/max_running_rsh", - group=self.group) - return max_running_rsh - - - - def addHostType(self): - host_type = ConfigurationLineDefinition(keyword = KeywordDefinition("HOST_TYPE"), - arguments=[StringArgument(rest_of_line=True, allow_space=True)], - documentation_link="keywords/host_type", - group=self.group) - return host_type diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/run_keywords.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/run_keywords.py deleted file mode 100644 index 7043da7eb6..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/run_keywords.py +++ /dev/null @@ -1,144 +0,0 @@ -from ert_gui.ide.keywords.definitions import IntegerArgument, KeywordDefinition, ConfigurationLineDefinition, PathArgument, StringArgument, BoolArgument - - -class RunKeywords(object): - def __init__(self, ert_keywords): - super(RunKeywords, self).__init__() - self.group = "Run" - - ert_keywords.addKeyword(self.addDeleteRunpath()) - ert_keywords.addKeyword(self.addKeepRunpath()) - ert_keywords.addKeyword(self.addInstallJob()) - ert_keywords.addKeyword(self.addRunpath()) - ert_keywords.addKeyword(self.addRunpathFile()) - ert_keywords.addKeyword(self.addForwardModel()) - ert_keywords.addKeyword(self.addJobScript()) - ert_keywords.addKeyword(self.addRunTemplate()) - ert_keywords.addKeyword(self.addLogLevel()) - ert_keywords.addKeyword(self.addLogFile()) - ert_keywords.addKeyword(self.addMaxSubmit()) - ert_keywords.addKeyword(self.addMaxResample()) - ert_keywords.addKeyword(self.addPreClearRunpath()) - - - - - - def addInstallJob(self): - install_job = ConfigurationLineDefinition(keyword=KeywordDefinition("INSTALL_JOB"), - arguments=[StringArgument(),PathArgument()], - documentation_link="keywords/install_job", - required=False, - group=self.group) - return install_job - - - - def addDeleteRunpath(self): - delete_runpath = ConfigurationLineDefinition(keyword=KeywordDefinition("DELETE_RUNPATH"), - arguments=[StringArgument()], - documentation_link="keywords/delete_runpath", - required=False, - group=self.group) - return delete_runpath - - - def addKeepRunpath(self): - keep_runpath = ConfigurationLineDefinition(keyword=KeywordDefinition("KEEP_RUNPATH"), - arguments=[StringArgument()], - documentation_link="keywords/keep_runpath", - required=False, - group=self.group) - return keep_runpath - - - - - - def addRunpath(self): - runpath = ConfigurationLineDefinition(keyword=KeywordDefinition("RUNPATH"), - arguments=[PathArgument(must_exist=False)], - documentation_link="keywords/runpath", - required=False, - group=self.group) - return runpath - - - - def addRunpathFile(self): - runpath_file = ConfigurationLineDefinition(keyword=KeywordDefinition("RUNPATH_FILE"), - arguments=[PathArgument()], - documentation_link="keywords/runpath_file", - required=False, - group=self.group) - return runpath_file - - - def addForwardModel(self): - forward_model = ConfigurationLineDefinition(keyword=KeywordDefinition("FORWARD_MODEL"), - arguments=[StringArgument(rest_of_line=True, allow_space=True)], - documentation_link="keywords/forward_model", - required=False, - group=self.group) - return forward_model - - def addJobScript(self): - job_script = ConfigurationLineDefinition(keyword=KeywordDefinition("JOB_SCRIPT"), - arguments=[PathArgument()], - documentation_link="keywords/job_script", - required=False, - group=self.group) - return job_script - - def addRunTemplate(self): - run_template = ConfigurationLineDefinition(keyword=KeywordDefinition("RUN_TEMPLATE"), - arguments=[PathArgument(),StringArgument()], - documentation_link="keywords/run_template", - required=False, - group=self.group) - return run_template - - - def addLogLevel(self): - log_level = ConfigurationLineDefinition(keyword=KeywordDefinition("LOG_LEVEL"), - arguments=[IntegerArgument()], - documentation_link="keywords/log_level", - required=False, - group=self.group) - return log_level - - - def addLogFile(self): - log_file = ConfigurationLineDefinition(keyword=KeywordDefinition("LOG_FILE"), - arguments=[PathArgument()], - documentation_link="keywords/log_file", - required=False, - group=self.group) - return log_file - - - - def addMaxSubmit(self): - max_submit = ConfigurationLineDefinition(keyword = KeywordDefinition("MAX_SUBMIT"), - arguments=[IntegerArgument()], - documentation_link="keywords/max_submit", - group=self.group) - return max_submit - - - def addMaxResample(self): - max_resample = ConfigurationLineDefinition(keyword=KeywordDefinition("MAX_RESAMPLE"), - arguments=[IntegerArgument()], - documentation_link="keywords/max_resample", - required=False, - group=self.group) - return max_resample - - - def addPreClearRunpath(self): - pre_clear_runpath = ConfigurationLineDefinition(keyword=KeywordDefinition("PRE_CLEAR_RUNPATH"), - arguments=[BoolArgument()], - documentation_link="keywords/pre_clear_runpath", - required=False, - group=self.group) - return pre_clear_runpath \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/simulation_control_keywords.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/simulation_control_keywords.py deleted file mode 100644 index 35fb78a419..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/simulation_control_keywords.py +++ /dev/null @@ -1,43 +0,0 @@ -from ert_gui.ide.keywords.definitions import IntegerArgument, BoolArgument, StringArgument, ConfigurationLineDefinition, KeywordDefinition , PercentArgument - - -class SimulationControlKeywords(object): - def __init__(self, ert_keywords): - super(SimulationControlKeywords, self).__init__() - self.group = "Simulation Control" - - - - ert_keywords.addKeyword(self.addMaxRuntime()) - ert_keywords.addKeyword(self.addMinRealizations()) - ert_keywords.addKeyword(self.addStopLongRunning()) - - - def addMaxRuntime(self): - max_runtime = ConfigurationLineDefinition(keyword=KeywordDefinition("MAX_RUNTIME"), - arguments=[IntegerArgument(from_value=0)], - documentation_link="keywords/max_runtime", - required=False, - group=self.group) - return max_runtime - - - - - def addMinRealizations(self): - min_realizations = ConfigurationLineDefinition(keyword=KeywordDefinition("MIN_REALIZATIONS"), - arguments=[IntegerArgument(from_value = 0) , - PercentArgument(from_value = 0 , to_value = 100)], - documentation_link="keywords/min_realizations", - required=False, - group=self.group) - return min_realizations - - - def addStopLongRunning(self): - stop_long_running = ConfigurationLineDefinition(keyword=KeywordDefinition("STOP_LONG_RUNNING"), - arguments=[BoolArgument()], - documentation_link="keywords/stop_long_running", - required=False, - group=self.group) - return stop_long_running diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/unix_environment_keywords.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/unix_environment_keywords.py deleted file mode 100644 index 835a3b3b55..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/unix_environment_keywords.py +++ /dev/null @@ -1,40 +0,0 @@ -from ert_gui.ide.keywords.definitions import IntegerArgument, KeywordDefinition, ConfigurationLineDefinition, PathArgument, StringArgument, BoolArgument - - -class UnixEnvironmentKeywords(object): - def __init__(self, ert_keywords): - super(UnixEnvironmentKeywords, self).__init__() - self.group = "Unix" - - ert_keywords.addKeyword(self.addSetEnv()) - ert_keywords.addKeyword(self.addUMask()) - ert_keywords.addKeyword(self.addUpdatePath()) - - - - - def addSetEnv(self): - setenv = ConfigurationLineDefinition(keyword=KeywordDefinition("SETENV"), - arguments=[StringArgument(), StringArgument(rest_of_line=True,allow_space=True)], - documentation_link="keywords/setenv", - required=False, - group=self.group) - return setenv - - - def addUMask(self): - umask = ConfigurationLineDefinition(keyword=KeywordDefinition("UMASK"), - arguments=[IntegerArgument()], - documentation_link="keywords/umask", - required=False, - group=self.group) - return umask - - - def addUpdatePath(self): - update_path = ConfigurationLineDefinition(keyword=KeywordDefinition("UPDATE_PATH"), - arguments=[StringArgument(built_in=True), PathArgument()], - documentation_link="keywords/update_path", - required=False, - group=self.group) - return update_path diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/workflow_keywords.py b/ThirdParty/Ert/python/python/ert_gui/ide/keywords/workflow_keywords.py deleted file mode 100644 index 0566d20a5f..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/keywords/workflow_keywords.py +++ /dev/null @@ -1,115 +0,0 @@ -from ert_gui.ide.keywords.definitions import IntegerArgument, KeywordDefinition, ConfigurationLineDefinition, PathArgument, StringArgument, BoolArgument - - -class WorkflowKeywords(object): - def __init__(self, ert_keywords): - super(WorkflowKeywords, self).__init__() - self.group = "Workflow Jobs" - - ert_keywords.addKeyword(self.addLoadWorkflowJob()) - ert_keywords.addKeyword(self.addWorkflowJobDirectory()) - ert_keywords.addKeyword(self.addLoadWorkflow()) - ert_keywords.addKeyword(self.addInternal()) - ert_keywords.addKeyword(self.addFunction()) - ert_keywords.addKeyword(self.addModule()) - ert_keywords.addKeyword(self.addExecutable()) - ert_keywords.addKeyword(self.addMinArg()) - ert_keywords.addKeyword(self.addMaxArg()) - ert_keywords.addKeyword(self.addArgType()) - - - - def addInternal(self): - internal = ConfigurationLineDefinition(keyword=KeywordDefinition("INTERNAL"), - arguments=[BoolArgument()], - documentation_link="keywords/internal", - required=False, - group=self.group) - return internal - - - def addFunction(self): - function = ConfigurationLineDefinition(keyword=KeywordDefinition("FUNCTION"), - arguments=[StringArgument()], - documentation_link="keywords/function", - required=False, - group=self.group) - return function - - - def addModule(self): - module = ConfigurationLineDefinition(keyword=KeywordDefinition("MODULE"), - arguments=[PathArgument()], - documentation_link="keywords/module", - required=False, - group=self.group) - return module - - - def addExecutable(self): - executable = ConfigurationLineDefinition(keyword=KeywordDefinition("EXECUTABLE"), - arguments=[PathArgument()], - documentation_link="keywords/executable", - required=False, - group=self.group) - return executable - - - - - def addMinArg(self): - min_arg = ConfigurationLineDefinition(keyword=KeywordDefinition("MIN_ARG"), - arguments=[IntegerArgument()], - documentation_link="keywords/min_arg", - required=False, - group=self.group) - return min_arg - - - - - def addMaxArg(self): - max_arg = ConfigurationLineDefinition(keyword=KeywordDefinition("MAX_ARG"), - arguments=[IntegerArgument()], - documentation_link="keywords/max_arg", - required=False, - group=self.group) - return max_arg - - - - def addArgType(self): - arg_type = ConfigurationLineDefinition(keyword=KeywordDefinition("ARG_TYPE"), - arguments=[StringArgument(built_in=True)], - documentation_link="keywords/arg_type", - required=False, - group=self.group) - return arg_type - - - def addLoadWorkflowJob(self): - load_workflow_job = ConfigurationLineDefinition(keyword=KeywordDefinition("LOAD_WORKFLOW_JOB"), - arguments=[StringArgument()], - documentation_link="keywords/load_workflow_job", - required=False, - group=self.group) - return load_workflow_job - - - - def addWorkflowJobDirectory(self): - workflow_job_directory = ConfigurationLineDefinition(keyword=KeywordDefinition("WORKFLOW_JOB_DIRECTORY"), - arguments=[PathArgument()], - documentation_link="keywords/workflow_job_directory", - required=False, - group=self.group) - return workflow_job_directory - - - def addLoadWorkflow(self): - load_workflow = ConfigurationLineDefinition(keyword=KeywordDefinition("LOAD_WORKFLOW"), - arguments=[PathArgument(), StringArgument(optional=True)], - documentation_link="keywords/load_workflow", - required=False, - group=self.group) - return load_workflow \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/parameter.py b/ThirdParty/Ert/python/python/ert_gui/ide/parameter.py deleted file mode 100644 index b7a0371ee3..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/parameter.py +++ /dev/null @@ -1,19 +0,0 @@ -class Parameter(object): - def __init__(self, value, start, end): - super(Parameter, self).__init__() - #: :type: str - self.value = value - #: :type: int - self.start = start - #: :type: int - self.end = end - - #: :type: bool - self.error = False - #: :type: str - self.error_message = "" - - @property - def length(self): - """ @rtype: int """ - return self.end - self.start \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/wizards/CMakeLists.txt b/ThirdParty/Ert/python/python/ert_gui/ide/wizards/CMakeLists.txt deleted file mode 100644 index c2450868b9..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/wizards/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - tree_item.py - tree_model.py - wizard_view.py -) - -add_python_package("python.ert_gui.ide.wizards" ${PYTHON_INSTALL_PREFIX}/ert_gui/ide/wizards "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/wizards/__init__.py b/ThirdParty/Ert/python/python/ert_gui/ide/wizards/__init__.py deleted file mode 100644 index e8b9ef3cce..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/wizards/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -from .tree_item import TreeItem -from .tree_model import TreeModel -from .wizard_view import WizardView \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/wizards/tree_item.py b/ThirdParty/Ert/python/python/ert_gui/ide/wizards/tree_item.py deleted file mode 100644 index e7793dd842..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/wizards/tree_item.py +++ /dev/null @@ -1,38 +0,0 @@ -class TreeItem(object): - def __init__(self, name, data=None): - super(TreeItem, self).__init__() - self.__name = name - self.__parent = None - - self.__children = [] - self.__data = data - - def child(self, row): - return self.__children[row] - - def __len__(self): - return len(self.__children) - - def data(self): - return self.__data - - def name(self): - return self.__name - - def addChild(self, child): - assert isinstance(child, TreeItem) - child.setParent(self) - self.__children.append(child) - return child - - def parent(self): - return self.__parent - - def setParent(self, parent): - self.__parent = parent - - def row(self): - if self.__parent is not None: - return self.__parent.__children.index(self) - - return 0 \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/wizards/tree_model.py b/ThirdParty/Ert/python/python/ert_gui/ide/wizards/tree_model.py deleted file mode 100644 index 1cef6708b7..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/wizards/tree_model.py +++ /dev/null @@ -1,97 +0,0 @@ -from PyQt4.QtCore import QAbstractItemModel, QModelIndex, QVariant, Qt -from ert_gui.ide.wizards import TreeItem - - -class TreeModel(QAbstractItemModel): - - def __init__(self, tree_root, parent=None): - QAbstractItemModel.__init__(self, parent) - - self.__root = tree_root - - def data(self, q_model_index, role=Qt.DisplayRole): - - item = self.item(q_model_index) - - if item is not None: - if role == Qt.DisplayRole: - return item.name() - - return QVariant() - - def item(self, q_model_index): - if not q_model_index.isValid(): - return None - - return q_model_index.internalPointer() - - - def flags(self, q_model_index): - if not q_model_index.isValid(): - return 0 - - item = self.item(q_model_index) - - if item.data() is None: - return Qt.ItemIsEnabled - else: - return Qt.ItemIsEnabled | Qt.ItemIsSelectable - - - def headerData(self, section, orientation, role=Qt.DisplayRole): - if orientation == Qt.Horizontal and role == Qt.DisplayRole: - return self.__root.name() - - return QVariant() - - - def index(self, row, column, parent=None): - if parent is None: - parent = QModelIndex() - - if not self.hasIndex(row, column, parent): - return QModelIndex() - - if not parent.isValid(): - parent_item = self.__root - else: - parent_item = parent.internalPointer() - - child_item = parent_item.child(row) - - return self.createIndex(row, column, child_item) - - - def parent(self, q_model_index): - if not q_model_index.isValid(): - return QModelIndex() - - child_item = q_model_index.internalPointer() - parent_item = child_item.parent() - - if parent_item == self.__root: - return QModelIndex() - - return self.createIndex(parent_item.row(), 0, parent_item) - - def rowCount(self, parent): - if parent is None: - parent = QModelIndex() - - if parent.column() > 0: - return 0 - - if not parent.isValid(): - return len(self.__root) - else: - return len(parent.internalPointer()) - - - - def columnCount(self, parent): - return 1 - - - def emitChange(self): - self.modelReset.emit() - diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/wizards/wizard_view.py b/ThirdParty/Ert/python/python/ert_gui/ide/wizards/wizard_view.py deleted file mode 100644 index b5ce7fe05e..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/ide/wizards/wizard_view.py +++ /dev/null @@ -1,42 +0,0 @@ -from PyQt4.QtGui import QTreeView -from ert_gui.ide.wizards import TreeItem -from ert_gui.ide.wizards.tree_model import TreeModel - - -class WizardView(QTreeView): - def __init__(self, parent=None): - QTreeView.__init__(self, parent) - - self.__root = TreeItem("ERT") - - self.__tree_model = TreeModel(self.__root) - - self.setModel(self.__tree_model) - - #: :type: dict of (str, TreeItem) - self.__groups = {} - - self.header().hide() - - - def addGroup(self, group_name): - if group_name in self.__groups: - raise ValueError("A group with name: %s already exists!" % group_name) - - group = TreeItem(group_name) - - self.__groups[group_name] = group - self.__root.addChild(group) - - self.__tree_model.emitChange() - - - def addItemToGroup(self, group, item): - group_item = self.__groups[group] - - child_item = TreeItem(item) - group_item.addChild(child_item) - - self.__tree_model.emitChange() - - diff --git a/ThirdParty/Ert/python/python/ert_gui/main_window.py b/ThirdParty/Ert/python/python/ert_gui/main_window.py deleted file mode 100644 index ccecd82500..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/main_window.py +++ /dev/null @@ -1,128 +0,0 @@ -from PyQt4.QtCore import QSettings, Qt -from PyQt4.QtGui import QMainWindow, qApp, QWidget, QVBoxLayout, QDockWidget, QAction, QToolButton -from ert_gui.about_dialog import AboutDialog - - -class GertMainWindow(QMainWindow): - def __init__(self): - QMainWindow.__init__(self) - - self.tools = {} - - self.resize(300, 700) - self.setWindowTitle('ERT') - - self.__main_widget = None - - self.central_widget = QWidget() - self.central_layout = QVBoxLayout() - self.central_widget.setLayout(self.central_layout) - - self.setCentralWidget(self.central_widget) - - self.toolbar = self.addToolBar("Tools") - self.toolbar.setObjectName("Toolbar") - self.toolbar.setToolButtonStyle(Qt.ToolButtonTextUnderIcon) - - self.setCorner(Qt.TopLeftCorner, Qt.LeftDockWidgetArea) - self.setCorner(Qt.BottomLeftCorner, Qt.BottomDockWidgetArea) - - self.setCorner(Qt.TopRightCorner, Qt.RightDockWidgetArea) - self.setCorner(Qt.BottomRightCorner, Qt.BottomDockWidgetArea) - self.__view_menu = None - self.__help_menu = None - - self.__createMenu() - self.__fetchSettings() - - def addDock(self, name, widget, area=Qt.RightDockWidgetArea, allowed_areas=Qt.AllDockWidgetAreas): - dock_widget = QDockWidget(name) - dock_widget.setObjectName("%sDock" % name) - dock_widget.setWidget(widget) - dock_widget.setAllowedAreas(allowed_areas) - - self.addDockWidget(area, dock_widget) - - self.__view_menu.addAction(dock_widget.toggleViewAction()) - return dock_widget - - def addTool(self, tool): - tool.setParent(self) - self.tools[tool.getName()] = tool - self.toolbar.addAction(tool.getAction()) - - if tool.isPopupMenu(): - tool_button = self.toolbar.widgetForAction(tool.getAction()) - tool_button.setPopupMode(QToolButton.InstantPopup) - - - def __createMenu(self): - file_menu = self.menuBar().addMenu("&File") - file_menu.addAction("Close", self.__quit) - self.__view_menu = self.menuBar().addMenu("&View") - self.__help_menu = self.menuBar().addMenu("&Help") - """:type: QMenu""" - - """ @rtype: list of QAction """ - advanced_toggle_action = QAction("Show Advanced Options", self) - advanced_toggle_action.setObjectName("AdvancedSimulationOptions") - advanced_toggle_action.setCheckable(True) - advanced_toggle_action.setChecked(False) - advanced_toggle_action.toggled.connect(self.toggleAdvancedMode) - - self.__view_menu.addAction(advanced_toggle_action) - - """ @rtype: list of QAction """ - show_about = self.__help_menu.addAction("About") - show_about.setMenuRole(QAction.ApplicationSpecificRole) - show_about.triggered.connect(self.__showAboutMessage) - - - def __quit(self): - self.__saveSettings() - qApp.quit() - - - def __saveSettings(self): - settings = QSettings("Statoil", "Ert-Gui") - settings.setValue("geometry", self.saveGeometry()) - settings.setValue("windowState", self.saveState()) - - - def closeEvent(self, event): - #Use QT settings saving mechanism - #settings stored in ~/.config/Statoil/ErtGui.conf - self.__saveSettings() - QMainWindow.closeEvent(self, event) - - - def __fetchSettings(self): - settings = QSettings("Statoil", "Ert-Gui") - self.restoreGeometry(settings.value("geometry").toByteArray()) - self.restoreState(settings.value("windowState").toByteArray()) - - def toggleAdvancedMode(self, advanced_mode): - if hasattr(self.__main_widget, "toggleAdvancedMode"): - self.__main_widget.toggleAdvancedMode(advanced_mode) - - for tool in self.tools.values(): - if hasattr(tool, "toggleAdvancedMode"): - tool.toggleAdvancedMode(advanced_mode) - - - def setWidget(self, widget): - self.__main_widget = widget - actions = widget.getActions() - for action in actions: - self.__view_menu.addAction(action) - - self.central_layout.addWidget(widget) - - def __showAboutMessage(self): - diag = AboutDialog(self) - diag.show() - pass - - - - diff --git a/ThirdParty/Ert/python/python/ert_gui/newconfig.py b/ThirdParty/Ert/python/python/ert_gui/newconfig.py deleted file mode 100644 index 419df4f53c..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/newconfig.py +++ /dev/null @@ -1,107 +0,0 @@ -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file 'newconfig.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - - -import os - -from PyQt4.QtCore import Qt, SIGNAL, QSize -from PyQt4.QtGui import QDialog, QFormLayout, QLabel, QDialogButtonBox, QComboBox, QSpinBox, QLineEdit, QWidget - - -def createSpace(size=5): - """Creates a widget that can be used as spacing on a panel.""" - qw = QWidget() - qw.setMinimumSize(QSize(size, size)) - - return qw - - -class NewConfigurationDialog(QDialog): - """A dialog for selecting defaults for a new configuration.""" - - def __init__(self, configuration_path, parent=None): - QDialog.__init__(self, parent) - - self.setModal(True) - self.setWindowTitle("New configuration file") - self.setMinimumWidth(250) - self.setMinimumHeight(150) - - layout = QFormLayout() - - directory, filename = os.path.split(configuration_path) - - if directory.strip() == "": - directory = os.path.abspath(os.curdir) - self.configuration_path = "%s/%s" % (directory, filename) - else: - self.configuration_path = configuration_path - - configuration_location = QLabel() - configuration_location.setText(directory) - - configuration_name = QLabel() - configuration_name.setText(filename) - - self.db_type = QComboBox() - self.db_type.addItem("BLOCK_FS") - self.db_type.addItem("PLAIN") - - self.num_realizations = QSpinBox() - self.num_realizations.setMinimum(1) - self.num_realizations.setMaximum(1000) - self.num_realizations.setValue(10) - - self.storage_path = QLineEdit() - self.storage_path.setText("Storage") - self.connect(self.storage_path, SIGNAL('textChanged(QString)'), self._validateName) - - layout.addRow(createSpace(10)) - layout.addRow("Configuration name:", configuration_name) - layout.addRow("Configuration location:", configuration_location) - layout.addRow("Path to store DBase:", self.storage_path) - layout.addRow("DBase type:", self.db_type) - layout.addRow("Number of realizations", self.num_realizations) - layout.addRow(createSpace(10)) - - buttons = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel, Qt.Horizontal, self) - self.ok_button = buttons.button(QDialogButtonBox.Ok) - - layout.addRow(buttons) - - self.connect(buttons, SIGNAL('accepted()'), self.accept) - self.connect(buttons, SIGNAL('rejected()'), self.reject) - - self.setLayout(layout) - - def getNumberOfRealizations(self): - return self.num_realizations.value() - - def getConfigurationPath(self): - return self.configuration_path - - def getDBaseType(self): - """Return the DBase type""" - return str(self.db_type.currentText()) - - def getStoragePath(self): - """Return the DBase storage path""" - return str(self.storage_path.text()).strip() - - def _validateName(self, name): - name = str(name) - enabled = len(name) > 0 and name.find(" ") == -1 - self.ok_button.setEnabled(enabled) diff --git a/ThirdParty/Ert/python/python/ert_gui/plottery/CMakeLists.txt b/ThirdParty/Ert/python/python/ert_gui/plottery/CMakeLists.txt deleted file mode 100644 index 4a9f42d59c..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/plottery/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - plot_config.py - plot_config_history.py - plot_config_factory.py - plot_context.py - plot_data_gatherer.py - plot_limits.py - plot_style.py -) - -add_python_package("python.ert_gui.plottery" ${PYTHON_INSTALL_PREFIX}/ert_gui/plottery "${PYTHON_SOURCES}" True) - -add_subdirectory(plots) diff --git a/ThirdParty/Ert/python/python/ert_gui/plottery/__init__.py b/ThirdParty/Ert/python/python/ert_gui/plottery/__init__.py deleted file mode 100644 index 30332e1857..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/plottery/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -from .plot_data_gatherer import PlotDataGatherer -from .plot_style import PlotStyle -from .plot_limits import PlotLimits -from .plot_config import PlotConfig -from .plot_context import PlotContext -from .plot_config_history import PlotConfigHistory -from .plot_config_factory import PlotConfigFactory diff --git a/ThirdParty/Ert/python/python/ert_gui/plottery/plot_config.py b/ThirdParty/Ert/python/python/ert_gui/plottery/plot_config.py deleted file mode 100644 index f8433e2933..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/plottery/plot_config.py +++ /dev/null @@ -1,287 +0,0 @@ -import os -import itertools -from ert_gui.plottery import PlotStyle, PlotLimits - - -class PlotConfig(object): - - def __init__(self, title="Unnamed", x_label=None, y_label=None): - super(PlotConfig, self).__init__() - self._title = title - - self._line_color_cycle_colors = ["#000000"] - self._line_color_cycle = itertools.cycle(self._line_color_cycle_colors) #Black - # Blueish, Greenlike, Beigeoid, Pinkness, Orangy-Brown - self.setLineColorCycle(["#386CB0", "#7FC97F", "#FDC086", "#F0027F", "#BF5B17"]) - - self._legend_items = [] - self._legend_labels = [] - - self._x_label = x_label - self._y_label = y_label - - self._limits = PlotLimits() - - self._default_style = PlotStyle(name="Default", color=None, alpha=0.8) - self._refcase_style = PlotStyle(name="Refcase", alpha=0.8, marker="x", width=2.0) - self._history_style = PlotStyle(name="History", alpha=0.8, marker="D", width=2.0) - - # Insanely ugly implementation of user preferences. - if os.getenv("ERT_SHOW_HISTORY_VECTORS"): - self._history_style.setEnabled(True) - else: - self._history_style.setEnabled(False) - - self._observation_style = PlotStyle(name="Observations") - self._histogram_style = PlotStyle(name="Histogram", width=2.0) - self._distribution_style = PlotStyle(name="Distribution", line_style="", marker="o", alpha=0.5, size=10.0) - self._distribution_line_style = PlotStyle(name="Distribution Lines", line_style="-", alpha=0.25, width=1.0) - self._distribution_line_style.setEnabled(False) - self._current_color = None - - self._legend_enabled = True - self._grid_enabled = True - - - self._statistics_style = { - "mean": PlotStyle("Mean", line_style=""), - "p50": PlotStyle("P50", line_style=""), - "min-max": PlotStyle("Min/Max", line_style=""), - "p10-p90": PlotStyle("P10-P90", line_style=""), - "p33-p67": PlotStyle("P33-P67", line_style=""), - "std": PlotStyle("Std dev", line_style="") - } - - self._std_dev_factor = 1 # sigma 1 is default std dev - - def currentColor(self): - if self._current_color is None: - self.nextColor() - - return self._current_color - - def nextColor(self): - self._current_color = self._line_color_cycle.next() - return self._current_color - - def setLineColorCycle(self, color_list): - self._line_color_cycle_colors = color_list - self._line_color_cycle = itertools.cycle(color_list) - - def lineColorCycle(self): - return list(self._line_color_cycle_colors) - - def addLegendItem(self, label, item): - self._legend_items.append(item) - self._legend_labels.append(label) - - def title(self): - """ :rtype: str """ - return self._title if self._title is not None else "Unnamed" - - def setTitle(self, title): - self._title = title - - def isUnnamed(self): - return self._title is None - - def defaultStyle(self): - style = PlotStyle("Default Style") - style.copyStyleFrom(self._default_style) - style.color = self.currentColor() - return style - - def observationsStyle(self): - """ @rtype: PlotStyle """ - style = PlotStyle("Observations Style") - style.copyStyleFrom(self._observation_style) - return style - - def refcaseStyle(self): - """ @rtype: PlotStyle """ - style = PlotStyle("Refcase Style") - style.copyStyleFrom(self._refcase_style) - return style - - def historyStyle(self): - """ @rtype: PlotStyle """ - style = PlotStyle("History Style") - style.copyStyleFrom(self._history_style) - return style - - def histogramStyle(self): - """ @rtype: PlotStyle """ - style = PlotStyle("Histogram Style") - style.copyStyleFrom(self._histogram_style) - style.color = self.currentColor() - return style - - def distributionStyle(self): - """ @rtype: PlotStyle """ - style = PlotStyle("Distribution Style") - style.copyStyleFrom(self._distribution_style) - style.color = self.currentColor() - return style - - def distributionLineStyle(self): - """ @rtype: ert_gui.plottery.PlotStyle """ - style = PlotStyle("Distribution Line Style") - style.copyStyleFrom(self._distribution_line_style) - return style - - def xLabel(self): - return self._x_label - - def yLabel(self): - return self._y_label - - def legendItems(self): - return self._legend_items - - def legendLabels(self): - return self._legend_labels - - def setXLabel(self, label): - self._x_label = label - - def setYLabel(self, label): - self._y_label = label - - def setObservationsEnabled(self, enabled): - self._observation_style.setEnabled(enabled) - - def isObservationsEnabled(self): - return self._observation_style.isEnabled() - - def setRefcaseEnabled(self, enabled): - self._refcase_style.setEnabled(enabled) - - def isRefcaseEnabled(self): - return self._refcase_style.isEnabled() - - def setHistoryEnabled(self, enabled): - self._history_style.setEnabled(enabled) - - def isHistoryEnabled(self): - return self._history_style.isEnabled() - - def isLegendEnabled(self): - return self._legend_enabled - - def isDistributionLineEnabled(self): - return self._distribution_line_style.isEnabled() - - def setDistributionLineEnabled(self, enabled): - self._distribution_line_style.setEnabled(enabled) - - def setStandardDeviationFactor(self, value): - self._std_dev_factor = value - - def getStandardDeviationFactor(self): - return self._std_dev_factor - - def setLegendEnabled(self, enabled): - self._legend_enabled = enabled - - def isGridEnabled(self): - return self._grid_enabled - - def setGridEnabled(self, enabled): - self._grid_enabled = enabled - - def setStatisticsStyle(self, statistic, style): - """ - @type statistic: str - @type style: PlotStyle - """ - - statistics_style = self._statistics_style[statistic] - statistics_style.line_style = style.line_style - statistics_style.marker = style.marker - statistics_style.width = style.width - statistics_style.size = style.size - - def getStatisticsStyle(self, statistic): - style = self._statistics_style[statistic] - copy_style = PlotStyle(style.name) - copy_style.copyStyleFrom(style) - copy_style.color = self.currentColor() - return copy_style - - def setRefcaseStyle(self, style): - """ @type style: PlotStyle """ - self._refcase_style.line_style = style.line_style - self._refcase_style.marker = style.marker - self._refcase_style.width = style.width - self._refcase_style.size = style.size - - def setHistoryStyle(self, style): - """ @type style: PlotStyle """ - self._history_style.line_style = style.line_style - self._history_style.marker = style.marker - self._history_style.width = style.width - self._history_style.size = style.size - - - def setDefaultStyle(self, style): - """ @type style: PlotStyle """ - self._default_style.line_style = style.line_style - self._default_style.marker = style.marker - self._default_style.width = style.width - self._default_style.size = style.size - - - @property - def limits(self): - """ @rtype: PlotLimits """ - limits = PlotLimits() - limits.copyLimitsFrom(self._limits) - return limits - - @limits.setter - def limits(self, value): - """ @type value: PlotLimits """ - self._limits.copyLimitsFrom(value) - - - def copyConfigFrom(self, other): - """ - :type other: PlotConfig - """ - self._default_style.copyStyleFrom(other._default_style, copy_enabled_state=True) - self._refcase_style.copyStyleFrom(other._refcase_style, copy_enabled_state=True) - self._history_style.copyStyleFrom(other._history_style, copy_enabled_state=True) - self._histogram_style.copyStyleFrom(other._histogram_style, copy_enabled_state=True) - self._observation_style.copyStyleFrom(other._observation_style, copy_enabled_state=True) - self._distribution_style.copyStyleFrom(other._distribution_style, copy_enabled_state=True) - self._distribution_line_style.copyStyleFrom(other._distribution_line_style, copy_enabled_state=True) - - self._statistics_style["mean"].copyStyleFrom(other._statistics_style["mean"], copy_enabled_state=True) - self._statistics_style["p50"].copyStyleFrom(other._statistics_style["p50"], copy_enabled_state=True) - self._statistics_style["min-max"].copyStyleFrom(other._statistics_style["min-max"], copy_enabled_state=True) - self._statistics_style["p10-p90"].copyStyleFrom(other._statistics_style["p10-p90"], copy_enabled_state=True) - self._statistics_style["p33-p67"].copyStyleFrom(other._statistics_style["p33-p67"], copy_enabled_state=True) - self._statistics_style["std"].copyStyleFrom(other._statistics_style["std"], copy_enabled_state=True) - - self._std_dev_factor = other._std_dev_factor - self._legend_enabled = other._legend_enabled - self._grid_enabled = other._grid_enabled - - self.setLineColorCycle(other._line_color_cycle_colors) - - self._legend_items = other._legend_items[:] - self._legend_labels = other._legend_labels[:] - - self._x_label = other._x_label - self._y_label = other._y_label - - self._limits.copyLimitsFrom(other._limits) - - if other._title is not None: - self._title = other._title - - @classmethod - def createCopy(cls, other): - copy = PlotConfig(None) - copy.copyConfigFrom(other) - return copy diff --git a/ThirdParty/Ert/python/python/ert_gui/plottery/plot_config_factory.py b/ThirdParty/Ert/python/python/ert_gui/plottery/plot_config_factory.py deleted file mode 100644 index 541e36ab83..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/plottery/plot_config_factory.py +++ /dev/null @@ -1,45 +0,0 @@ -from ert_gui.plottery import PlotConfig - - -class PlotConfigFactory(object): - - @classmethod - def createPlotConfigForKey(cls, ert, key): - """ - @type ert: ert.enkf.enkf_main.EnKFMain - @param key: str - @return: PlotConfig - """ - plot_config = PlotConfig(key) - return PlotConfigFactory.updatePlotConfigForKey(ert, key, plot_config) - - - @classmethod - def updatePlotConfigForKey(cls, ert, key, plot_config): - """ - @type ert: ert.enkf.enkf_main.EnKFMain - @param key: str - @return: PlotConfig - """ - key_manager = ert.getKeyManager() - # The styling of statistics changes based on the nature of the data - if key_manager.isSummaryKey(key) or key_manager.isGenDataKey(key): - mean_style = plot_config.getStatisticsStyle("mean") - mean_style.line_style = "-" - plot_config.setStatisticsStyle("mean", mean_style) - - p10p90_style = plot_config.getStatisticsStyle("p10-p90") - p10p90_style.line_style = "--" - plot_config.setStatisticsStyle("p10-p90", p10p90_style) - else: - mean_style = plot_config.getStatisticsStyle("mean") - mean_style.line_style = "-" - mean_style.marker = "o" - plot_config.setStatisticsStyle("mean", mean_style) - - std_style = plot_config.getStatisticsStyle("std") - std_style.line_style = "--" - std_style.marker = "D" - plot_config.setStatisticsStyle("std", std_style) - - return plot_config diff --git a/ThirdParty/Ert/python/python/ert_gui/plottery/plot_config_history.py b/ThirdParty/Ert/python/python/ert_gui/plottery/plot_config_history.py deleted file mode 100644 index b21699267e..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/plottery/plot_config_history.py +++ /dev/null @@ -1,46 +0,0 @@ -from ert_gui.plottery import PlotConfig - - -class PlotConfigHistory(object): - """ A Class for tracking changes to a PlotConfig class (supports undo, redo and reset)""" - - def __init__(self, name, initial): - super(PlotConfigHistory, self).__init__() - self._name = name - self._initial = PlotConfig.createCopy(initial) - self._undo_history = [] - self._redo_history = [] - self._current = PlotConfig.createCopy(self._initial) - - def isUndoPossible(self): - """ @rtype: bool """ - return len(self._undo_history) > 0 - - def isRedoPossible(self): - """ @rtype: bool """ - return len(self._redo_history) > 0 - - def applyChanges(self, plot_config): - """ @type plot_config: PlotConfig """ - self._undo_history.append(self._current) - copy = PlotConfig.createCopy(self._current) - copy.copyConfigFrom(plot_config) - self._current = copy - del self._redo_history[:] - - def resetChanges(self): - self.applyChanges(self._initial) - - def undoChanges(self): - if self.isUndoPossible(): - self._redo_history.append(self._current) - self._current = self._undo_history.pop() - - def redoChanges(self): - if self.isRedoPossible(): - self._undo_history.append(self._current) - self._current = self._redo_history.pop() - - def getPlotConfig(self): - """ @rtype: PlotConfig """ - return PlotConfig.createCopy(self._current) diff --git a/ThirdParty/Ert/python/python/ert_gui/plottery/plot_context.py b/ThirdParty/Ert/python/python/ert_gui/plottery/plot_context.py deleted file mode 100644 index 8afeaf74d4..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/plottery/plot_context.py +++ /dev/null @@ -1,80 +0,0 @@ -from .plot_config import PlotConfig -from .plot_data_gatherer import PlotDataGatherer - -class PlotContext(object): - UNKNOWN_AXIS = None - VALUE_AXIS = "VALUE" - DATE_AXIS = "DATE" - INDEX_AXIS = "INDEX" - COUNT_AXIS = "COUNT" - DENSITY_AXIS = "DENSITY" - DEPTH_AXIS = "DEPTH" - AXIS_TYPES = [UNKNOWN_AXIS, COUNT_AXIS, DATE_AXIS, DENSITY_AXIS, DEPTH_AXIS, INDEX_AXIS, VALUE_AXIS] - - def __init__(self, ert, figure, plot_config, cases, key, data_gatherer): - super(PlotContext, self).__init__() - self._data_gatherer = data_gatherer - self._key = key - self._cases = cases - self._figure = figure - self._ert = ert - self._plot_config = plot_config - - self._date_support_active = True - self._x_axis = None - self._y_axis = None - - def figure(self): - """ :rtype: matplotlib.figure.Figure""" - return self._figure - - def plotConfig(self): - """ :rtype: PlotConfig """ - return self._plot_config - - def ert(self): - """ :rtype: ert.enkf.EnKFMain""" - return self._ert - - def cases(self): - """ :rtype: list of str """ - return self._cases - - def key(self): - """ :rtype: str """ - return self._key - - def dataGatherer(self): - """ :rtype: PlotDataGatherer """ - return self._data_gatherer - - def deactivateDateSupport(self): - self._date_support_active = False - - def isDateSupportActive(self): - """ @rtype: bool """ - return self._date_support_active - - @property - def x_axis(self): - """ @rtype: str """ - return self._x_axis - - @x_axis.setter - def x_axis(self, value): - """ @type value: str """ - if not value in PlotContext.AXIS_TYPES: - raise UserWarning("Axis: '%s' is not one of: %s" % (value, PlotContext.AXIS_TYPES)) - self._x_axis = value - - @property - def y_axis(self): - """ @rtype: str """ - return self._y_axis - - @y_axis.setter - def y_axis(self, value): - """ @type value: str """ - if not value in PlotContext.AXIS_TYPES: - raise UserWarning("Axis: '%s' is not one of: %s" % (value, PlotContext.AXIS_TYPES)) - self._y_axis = value \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/plottery/plot_data_gatherer.py b/ThirdParty/Ert/python/python/ert_gui/plottery/plot_data_gatherer.py deleted file mode 100644 index 11fa2a3c94..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/plottery/plot_data_gatherer.py +++ /dev/null @@ -1,159 +0,0 @@ -from pandas import DataFrame -from ert.enkf.export import GenKwCollector, SummaryCollector, GenDataCollector, SummaryObservationCollector, \ - GenDataObservationCollector, CustomKWCollector - - -class PlotDataGatherer(object): - - def __init__(self, dataGatherFunc, conditionFunc, refcaseGatherFunc=None, observationGatherFunc=None, historyGatherFunc=None): - super(PlotDataGatherer, self).__init__() - - self._dataGatherFunction = dataGatherFunc - self._conditionFunction = conditionFunc - self._refcaseGatherFunction = refcaseGatherFunc - self._observationGatherFunction = observationGatherFunc - self._historyGatherFunc = historyGatherFunc - - def hasHistoryGatherFunction(self): - """ :rtype: bool """ - return self._historyGatherFunc is not None - - def hasRefcaseGatherFunction(self): - """ :rtype: bool """ - return self._refcaseGatherFunction is not None - - def hasObservationGatherFunction(self): - """ :rtype: bool """ - return self._observationGatherFunction is not None - - def canGatherDataForKey(self, key): - """ :rtype: bool """ - return self._conditionFunction(key) - - def gatherData(self, ert, case, key): - """ :rtype: pandas.DataFrame """ - if not self.canGatherDataForKey(key): - raise UserWarning("Unable to gather data for key: %s" % key) - - return self._dataGatherFunction(ert, case, key) - - def gatherRefcaseData(self, ert, key): - """ :rtype: pandas.DataFrame """ - if not self.canGatherDataForKey(key) or not self.hasRefcaseGatherFunction(): - raise UserWarning("Unable to gather refcase data for key: %s" % key) - - return self._refcaseGatherFunction(ert, key) - - def gatherObservationData(self, ert, case, key): - """ :rtype: pandas.DataFrame """ - if not self.canGatherDataForKey(key) or not self.hasObservationGatherFunction(): - raise UserWarning("Unable to gather observation data for key: %s" % key) - - return self._observationGatherFunction(ert, case, key) - - def gatherHistoryData(self, ert, case, key): - """ :rtype: pandas.DataFrame """ - if not self.canGatherDataForKey(key) or not self.hasHistoryGatherFunction(): - raise UserWarning("Unable to gather history data for key: %s" % key) - - return self._historyGatherFunc(ert, case, key) - - - @staticmethod - def gatherGenKwData(ert, case, key): - """ :rtype: pandas.DataFrame """ - data = GenKwCollector.loadAllGenKwData(ert, case, [key]) - return data[key].dropna() - - @staticmethod - def gatherSummaryData(ert, case, key): - """ :rtype: pandas.DataFrame """ - data = SummaryCollector.loadAllSummaryData(ert, case, [key]) - if not data.empty: - data = data.reset_index() - data = data.pivot(index="Date", columns="Realization", values=key) - - return data #.dropna() - - @staticmethod - def gatherSummaryRefcaseData(ert, key): - refcase = ert.eclConfig().getRefcase() - - if refcase is None or not key in refcase: - return DataFrame() - - vector = refcase.get_vector(key, report_only=False) - - rows = [] - for index in range(1, len(vector)): - node = vector[index] - row = { - "Date": node.date, - key: node.value - } - rows.append(row) - - data = DataFrame(rows) - data = data.set_index("Date") - - return data - - @staticmethod - def gatherSummaryHistoryData(ert, case, key): - # create history key - if ":" in key: - head, tail = key.split(":", 2) - key = "%sH:%s" % (head, tail) - else: - key = "%sH" % key - - data = PlotDataGatherer.gatherSummaryRefcaseData(ert, key) - if data.empty and case is not None: - data = PlotDataGatherer.gatherSummaryData(ert, case, key) - - return data - - @staticmethod - def gatherSummaryObservationData(ert, case, key): - if ert.getKeyManager().isKeyWithObservations(key): - return SummaryObservationCollector.loadObservationData(ert, case, [key]).dropna() - else: - return DataFrame() - - - @staticmethod - def gatherGenDataData(ert, case, key): - """ :rtype: pandas.DataFrame """ - key, report_step = key.split("@", 1) - report_step = int(report_step) - try: - data = GenDataCollector.loadGenData(ert, case, key, report_step) - except ValueError: - data = DataFrame() - - return data.dropna() # removes all rows that has a NaN - - - @staticmethod - def gatherGenDataObservationData(ert, case, key_with_report_step): - """ :rtype: pandas.DataFrame """ - key, report_step = key_with_report_step.split("@", 1) - report_step = int(report_step) - - obs_key = GenDataObservationCollector.getObservationKeyForDataKey(ert, key, report_step) - - if obs_key is not None: - obs_data = GenDataObservationCollector.loadGenDataObservations(ert, case, obs_key) - columns = {obs_key: key_with_report_step, "STD_%s" % obs_key: "STD_%s" % key_with_report_step} - obs_data = obs_data.rename(columns=columns) - else: - obs_data = DataFrame() - - return obs_data.dropna() - - @staticmethod - def gatherCustomKwData(ert, case, key): - """ :rtype: pandas.DataFrame """ - data = CustomKWCollector.loadAllCustomKWData(ert, case, [key])[key] - - return data diff --git a/ThirdParty/Ert/python/python/ert_gui/plottery/plot_limits.py b/ThirdParty/Ert/python/python/ert_gui/plottery/plot_limits.py deleted file mode 100644 index bac7f42dd5..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/plottery/plot_limits.py +++ /dev/null @@ -1,105 +0,0 @@ -import datetime - -class limit_property(object): - def __init__(self, attribute_name, types, minimum=None, maximum=None): - super(limit_property, self).__init__() - self._types = types - self._maximum = maximum - self._minimum = minimum - self._attribute_name = attribute_name - - def __get__(self, instance, owner): - if not hasattr(instance, "_%s" % self._attribute_name): - setattr(instance, "_%s" % self._attribute_name, None) - return getattr(instance, "_%s" % self._attribute_name) - - def __set__(self, instance, value): - if value is not None: - if not isinstance(value, self._types): - raise TypeError("Value not (one) of type(s): %s: %s" % (self._types, repr(value))) - if self._minimum is not None and value < self._minimum: - raise ValueError("Value can not be less than %f: %f < %f" % (self._minimum, value, self._minimum)) - if self._maximum is not None and value > self._maximum: - raise ValueError("Value can not be larger than %f: %f > %f" % (self._maximum, value, self._maximum)) - - setattr(instance, "_%s" % self._attribute_name, value) - - -class limits_property(object): - def __init__(self, minimum_attribute_name, maximum_attribute_name): - super(limits_property, self).__init__() - self._minimum_attribute_name = minimum_attribute_name - self._maximum_attribute_name = maximum_attribute_name - - def __get__(self, instance, owner): - return getattr(instance, "%s" % self._minimum_attribute_name), getattr(instance, "%s" % self._maximum_attribute_name) - - def __set__(self, instance, value): - setattr(instance, "_%s" % self._minimum_attribute_name, value[0]) - setattr(instance, "_%s" % self._maximum_attribute_name, value[1]) - - -class PlotLimits(object): - value_minimum = limit_property("value_minimum", (float, int)) - """ :type: float """ - value_maximum = limit_property("value_maximum", (float, int)) - """ :type: float """ - value_limits = limits_property("value_minimum", "value_maximum") - """ :type: (float, float) """ - - index_minimum = limit_property("index_minimum", int, minimum=0) - """ :type: int """ - index_maximum = limit_property("index_maximum", int, minimum=0) - """ :type: int """ - index_limits = limits_property("index_minimum", "index_maximum") - """ :type: (int, int) """ - - count_minimum = limit_property("count_minimum", int, minimum=0) - """ :type: int """ - count_maximum = limit_property("count_maximum", int, minimum=0) - """ :type: int """ - count_limits = limits_property("count_minimum", "count_maximum") - """ :type: (int, int) """ - - density_minimum = limit_property("density_minimum", (float, int), minimum=0.0) - """ :type: float """ - density_maximum = limit_property("density_maximum", (float, int), minimum=0.0) - """ :type: float """ - density_limits = limits_property("density_minimum", "density_maximum") - """ :type: (float, float) """ - - depth_minimum = limit_property("depth_minimum", (float, int), minimum=0.0) - """ :type: float """ - depth_maximum = limit_property("depth_maximum", (float, int), minimum=0.0) - """ :type: float """ - depth_limits = limits_property("depth_minimum", "depth_maximum") - """ :type: tuple[float, float] """ - - date_minimum = limit_property("date_minimum", (datetime.date, datetime.datetime)) - """ :type: datetime.datetime or datetime.date """ - date_maximum = limit_property("date_maximum", (datetime.date, datetime.datetime)) - """ :type: datetime.datetime or datetime.date """ - date_limits = limits_property("date_minimum", "date_maximum") - """ :type: tuple[datetime.datetime|datetime.date, datetime.datetime|datetime.date] """ - - - def __eq__(self, other): - """ @type other: PlotLimits """ - equality = self.value_limits == other.value_limits - equality = equality and self.index_limits == other.index_limits - equality = equality and self.count_limits == other.count_limits - equality = equality and self.depth_limits == other.depth_limits - equality = equality and self.date_limits == other.date_limits - equality = equality and self.density_limits == other.density_limits - - return equality - - - def copyLimitsFrom(self, other): - """ @type other: PlotLimits """ - self.value_limits = other.value_limits - self.density_limits = other.density_limits - self.depth_limits = other.depth_limits - self.index_limits = other.index_limits - self.date_limits = other.date_limits - self.count_limits = other.count_limits \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/plottery/plot_style.py b/ThirdParty/Ert/python/python/ert_gui/plottery/plot_style.py deleted file mode 100644 index e3ca67de25..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/plottery/plot_style.py +++ /dev/null @@ -1,112 +0,0 @@ -class PlotStyle(object): - def __init__(self, name, color="#000000", alpha=1.0, line_style="-", marker="", width=1.0, size=7.5): - super(PlotStyle, self).__init__() - self.name = name - self.color = color - self.alpha = alpha - self.line_style = line_style - self.marker = marker - self.width = width - self.size = size - self._enabled = True - self._is_copy = False - - def copyStyleFrom(self, other, copy_enabled_state=False): - self.color = other.color - self.alpha = other.alpha - self.line_style = other._line_style - self.marker = other._marker - self.width = other.width - self.size = other.size - self._is_copy = True - - if copy_enabled_state: - self.setEnabled(other.isEnabled()) - - def isEnabled(self): - return self._enabled - - def setEnabled(self, enabled): - self._enabled = enabled - - def isVisible(self): - return self.line_style != "" or self.marker != "" - - @property - def name(self): - return self._name - - @name.setter - def name(self, name): - self._name = name - - @property - def color(self): - return self._color - - @color.setter - def color(self, color): - self._color = color - - @property - def alpha(self): - return self._alpha - - @alpha.setter - def alpha(self, alpha): - if alpha > 1.0: - alpha = 1.0 - if alpha < 0.0: - alpha = 0.0 - self._alpha = alpha - - @property - def marker(self): - return self._marker if self._marker is not None else "" - - @marker.setter - def marker(self, marker): - self._marker = marker - - @property - def line_style(self): - return self._line_style if self._line_style is not None else "" - - @line_style.setter - def line_style(self, line_style): - self._line_style = line_style - - @property - def width(self): - return self._width - - @width.setter - def width(self, width): - if width < 0.0: - width = 0.0 - self._width = width - - @property - def size(self): - return self._size - - @size.setter - def size(self, size): - if size < 0.0: - size = 0.0 - self._size = size - - - def __str__(self): - return "%s c:%s a:%f ls:%s m:%s w:%f s:%f enabled:%s copy:%s" % (self.name, self.color, self.alpha, self.line_style, self.marker, self.width, self.size, self.isEnabled(), self._is_copy) - - def __eq__(self, other): - equalness = self.alpha == other.alpha - equalness = equalness and self.marker == other.marker - equalness = equalness and self.line_style == other.line_style - equalness = equalness and self.width == other.width - equalness = equalness and self.color == other.color - equalness = equalness and self.size == other.size - equalness = equalness and self.isEnabled() == other.isEnabled() - - return equalness \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/plottery/plots/CMakeLists.txt b/ThirdParty/Ert/python/python/ert_gui/plottery/plots/CMakeLists.txt deleted file mode 100644 index 24aa63b774..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/plottery/plots/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - ccsp.py - distribution.py - ensemble.py - gaussian_kde.py - histogram.py - history.py - observations.py - plot_tools.py - refcase.py - statistics.py -) - -add_python_package("python.ert_gui.plottery.plots" ${PYTHON_INSTALL_PREFIX}/ert_gui/plottery/plots "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert_gui/plottery/plots/__init__.py b/ThirdParty/Ert/python/python/ert_gui/plottery/plots/__init__.py deleted file mode 100644 index 64f84b1e9a..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/plottery/plots/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -import os -import matplotlib - -from .histogram import plotHistogram -from .gaussian_kde import plotGaussianKDE - -from .refcase import plotRefcase -from .history import plotHistory -from .observations import plotObservations - -from .ensemble import plotEnsemble -from .statistics import plotStatistics -from .distribution import plotDistribution -from .ccsp import plotCrossCaseStatistics diff --git a/ThirdParty/Ert/python/python/ert_gui/plottery/plots/ccsp.py b/ThirdParty/Ert/python/python/ert_gui/plottery/plots/ccsp.py deleted file mode 100644 index 52679222d7..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/plottery/plots/ccsp.py +++ /dev/null @@ -1,221 +0,0 @@ -from matplotlib.patches import Rectangle -from matplotlib.lines import Line2D -from .plot_tools import PlotTools -import pandas as pd - -def plotCrossCaseStatistics(plot_context): - """ @type plot_context: ert_gui.plottery.PlotContext """ - ert = plot_context.ert() - key = plot_context.key() - config = plot_context.plotConfig() - axes = plot_context.figure().add_subplot(111) - """:type: matplotlib.axes.Axes """ - - plot_context.deactivateDateSupport() - - plot_context.y_axis = plot_context.VALUE_AXIS - - if key.startswith("LOG10_"): - key = key[6:] - axes.set_yscale("log") - - case_list = plot_context.cases() - case_indexes = [] - ccs = { - "index": [], - "mean": {}, - "min": {}, - "max": {}, - "std": {}, - "p10": {}, - "p33": {}, - "p50": {}, - "p67": {}, - "p90": {} - } - for case_index, case in enumerate(case_list): - case_indexes.append(case_index) - data = plot_context.dataGatherer().gatherData(ert, case, key) - std_dev_factor = config.getStandardDeviationFactor() - - if not data.empty: - data = _assertNumeric(data) - if not data is None: - ccs["index"].append(case_index) - ccs["mean"][case_index] = data.mean() - ccs["min"][case_index] = data.min() - ccs["max"][case_index] = data.max() - ccs["std"][case_index] = data.std() * std_dev_factor - ccs["p10"][case_index] = data.quantile(0.1) - ccs["p33"][case_index] = data.quantile(0.33) - ccs["p50"][case_index] = data.quantile(0.5) - ccs["p67"][case_index] = data.quantile(0.67) - ccs["p90"][case_index] = data.quantile(0.9) - - _plotCrossCaseStatistics(axes, config, ccs, case_index) - config.nextColor() - - if config.isDistributionLineEnabled() and len(ccs["index"]) > 1: - _plotConnectionLines(axes, config, ccs) - - _addStatisticsLegends(config) - - axes.set_xticks([-1] + case_indexes + [len(case_indexes)]) - - rotation = 0 - if len(case_list) > 3: - rotation = 30 - - axes.set_xticklabels([""] + case_list + [""], rotation=rotation) - - PlotTools.finalizePlot(plot_context, axes, default_x_label="Case", default_y_label="Value") - - -def _addStatisticsLegends(plot_config): - _addStatisticsLegend(plot_config, "mean") - _addStatisticsLegend(plot_config, "p50") - _addStatisticsLegend(plot_config, "min-max", 0.2) - _addStatisticsLegend(plot_config, "p10-p90", 0.4) - _addStatisticsLegend(plot_config, "std", 0.4) - _addStatisticsLegend(plot_config, "p33-p67", 0.6) - - -def _addStatisticsLegend(plot_config, style_name, alpha_multiplier=1.0): - style = plot_config.getStatisticsStyle(style_name) - if style.isVisible(): - if style.line_style == "#": - rectangle = Rectangle((0, 0), 1, 1, color='black', alpha=style.alpha * alpha_multiplier) # creates rectangle patch for legend use. - plot_config.addLegendItem(style.name, rectangle) - else: - line = Line2D([], [], color='black', marker=style.marker, linestyle=style.line_style, linewidth=style.width, alpha=style.alpha) - plot_config.addLegendItem(style.name, line) - - -def _assertNumeric(data): - if data.dtype == "object": - try: - data = pd.to_numeric(data, errors='coerce') - except AttributeError: - data = data.convert_objects(convert_numeric=True) - - if data.dtype == "object": - data = None - return data - - -def _plotCrossCaseStatistics(axes, plot_config, data, index): - """ - @type axes: matplotlib.axes.Axes - @type plot_config: PlotConfig - @type data: DataFrame - @type index: int - """ - - axes.set_xlabel(plot_config.xLabel()) - axes.set_ylabel(plot_config.yLabel()) - - style = plot_config.getStatisticsStyle("mean") - if style.isVisible(): - axes.plot([index], data["mean"][index], alpha=style.alpha, linestyle="", color=style.color, marker=style.marker, markersize=style.size) - - style = plot_config.getStatisticsStyle("p50") - if style.isVisible(): - axes.plot([index], data["p50"][index], alpha=style.alpha, linestyle="", color=style.color, marker=style.marker, markersize=style.size) - - style = plot_config.getStatisticsStyle("std") - if style.isVisible(): - axes.plot([index], data["mean"][index] + data["std"][index], alpha=style.alpha, linestyle="", color=style.color, marker=style.marker, markersize=style.size) - axes.plot([index], data["mean"][index] - data["std"][index], alpha=style.alpha, linestyle="", color=style.color, marker=style.marker, markersize=style.size) - - style = plot_config.getStatisticsStyle("min-max") - if style.isVisible(): - axes.plot([index], data["min"][index], alpha=style.alpha, linestyle="", color=style.color, marker=style.marker, markersize=style.size) - axes.plot([index], data["max"][index], alpha=style.alpha, linestyle="", color=style.color, marker=style.marker, markersize=style.size) - - style = plot_config.getStatisticsStyle("p10-p90") - if style.isVisible(): - axes.plot([index], data["p10"][index], alpha=style.alpha, linestyle="", color=style.color, marker=style.marker, markersize=style.size) - axes.plot([index], data["p90"][index], alpha=style.alpha, linestyle="", color=style.color, marker=style.marker, markersize=style.size) - - style = plot_config.getStatisticsStyle("p33-p67") - if style.isVisible(): - axes.plot([index], data["p33"][index], alpha=style.alpha, linestyle="", color=style.color, marker=style.marker, markersize=style.size) - axes.plot([index], data["p67"][index], alpha=style.alpha, linestyle="", color=style.color, marker=style.marker, markersize=style.size) - - -def _plotConnectionLines(axes, plot_config, ccs): - """ - @type axes: matplotlib.axes.Axes - @type plot_config: PlotConfig - @type ccs: dict[str, dict[int, float]] - """ - line_style = plot_config.distributionLineStyle() - index_list = ccs["index"] - """ :type: list[int] """ - for index in range(len(index_list) - 1): - from_index = index_list[index] - to_index = index_list[index + 1] - - x = [from_index, to_index] - - style = plot_config.getStatisticsStyle("mean") - if style.isVisible(): - y = [ccs["mean"][from_index], ccs["mean"][to_index]] - axes.plot(x, y, alpha=line_style.alpha, linestyle=style.line_style, color=line_style.color, linewidth=style.width) - - style = plot_config.getStatisticsStyle("p50") - if style.isVisible(): - y = [ccs["p50"][from_index], ccs["p50"][to_index]] - axes.plot(x, y, alpha=line_style.alpha, linestyle=style.line_style, color=line_style.color, linewidth=style.width) - - style = plot_config.getStatisticsStyle("std") - if style.isVisible(): - mean = [ccs["mean"][from_index], ccs["mean"][to_index]] - std = [ccs["std"][from_index], ccs["std"][to_index]] - - y_1 = [mean[0] + std[0], mean[1] + std[1]] - y_2 = [mean[0] - std[0], mean[1] - std[1]] - - linestyle = style.line_style - if linestyle == "#": - linestyle = "" - - axes.plot(x, y_1, alpha=style.alpha, linestyle=linestyle, color=line_style.color, linewidth=style.width) - axes.plot(x, y_2, alpha=style.alpha, linestyle=linestyle, color=line_style.color, linewidth=style.width) - - style = plot_config.getStatisticsStyle("min-max") - if style.isVisible(): - y_1 = [ccs["min"][from_index], ccs["min"][to_index]] - y_2 = [ccs["max"][from_index], ccs["max"][to_index]] - - linestyle = style.line_style - if linestyle == "#": - linestyle = "" - - axes.plot(x, y_1, alpha=style.alpha, linestyle=linestyle, color=line_style.color, linewidth=style.width) - axes.plot(x, y_2, alpha=style.alpha, linestyle=linestyle, color=line_style.color, linewidth=style.width) - - style = plot_config.getStatisticsStyle("p10-p90") - if style.isVisible(): - y_1 = [ccs["p10"][from_index], ccs["p10"][to_index]] - y_2 = [ccs["p90"][from_index], ccs["p90"][to_index]] - - linestyle = style.line_style - if linestyle == "#": - linestyle = "" - - axes.plot(x, y_1, alpha=style.alpha, linestyle=linestyle, color=line_style.color, linewidth=style.width) - axes.plot(x, y_2, alpha=style.alpha, linestyle=linestyle, color=line_style.color, linewidth=style.width) - - style = plot_config.getStatisticsStyle("p33-p67") - if style.isVisible(): - y_1 = [ccs["p33"][from_index], ccs["p33"][to_index]] - y_2 = [ccs["p67"][from_index], ccs["p67"][to_index]] - - linestyle = style.line_style - if linestyle == "#": - linestyle = "" - - axes.plot(x, y_1, alpha=style.alpha, linestyle=linestyle, color=line_style.color, linewidth=style.width) - axes.plot(x, y_2, alpha=style.alpha, linestyle=linestyle, color=line_style.color, linewidth=style.width) - diff --git a/ThirdParty/Ert/python/python/ert_gui/plottery/plots/distribution.py b/ThirdParty/Ert/python/python/ert_gui/plottery/plots/distribution.py deleted file mode 100644 index af0b546a1d..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/plottery/plots/distribution.py +++ /dev/null @@ -1,77 +0,0 @@ -from .plot_tools import PlotTools -import pandas as pd - -def plotDistribution(plot_context): - """ @type plot_context: ert_gui.plottery.PlotContext """ - ert = plot_context.ert() - key = plot_context.key() - config = plot_context.plotConfig() - axes = plot_context.figure().add_subplot(111) - """:type: matplotlib.axes.Axes """ - - plot_context.deactivateDateSupport() - - plot_context.y_axis = plot_context.VALUE_AXIS - - if key.startswith("LOG10_"): - key = key[6:] - axes.set_yscale("log") - - case_list = plot_context.cases() - case_indexes = [] - previous_data = None - for case_index, case in enumerate(case_list): - case_indexes.append(case_index) - data = plot_context.dataGatherer().gatherData(ert, case, key) - - if not data.empty: - _plotDistribution(axes, config, data, case, case_index, previous_data) - config.nextColor() - - previous_data = data - - axes.set_xticks([-1] + case_indexes + [len(case_indexes)]) - - rotation = 0 - if len(case_list) > 3: - rotation = 30 - - axes.set_xticklabels([""] + case_list + [""], rotation=rotation) - - config.setLegendEnabled(False) - - PlotTools.finalizePlot(plot_context, axes, default_x_label="Case", default_y_label="Value") - - -def _plotDistribution(axes, plot_config, data, label, index, previous_data): - """ - @type axes: matplotlib.axes.Axes - @type plot_config: PlotConfig - @type data: DataFrame - @type label: Str - """ - - axes.set_xlabel(plot_config.xLabel()) - axes.set_ylabel(plot_config.yLabel()) - - style = plot_config.distributionStyle() - - if data.dtype == "object": - try: - data = pd.to_numeric(data, errors='coerce') - except AttributeError: - data = data.convert_objects(convert_numeric=True) - - if data.dtype == "object": - dots = [] - else: - dots = axes.plot([index] * len(data), data, color=style.color, alpha=style.alpha, marker=style.marker, linestyle=style.line_style, markersize=style.size) - - if plot_config.isDistributionLineEnabled() and previous_data is not None: - line_style = plot_config.distributionLineStyle() - x = [index - 1, index] - y = [previous_data, data] - lines = axes.plot(x, y, color=line_style.color, alpha=line_style.alpha, linestyle=line_style.line_style, linewidth=line_style.width) - - if len(dots) > 0: - plot_config.addLegendItem(label, dots[0]) diff --git a/ThirdParty/Ert/python/python/ert_gui/plottery/plots/ensemble.py b/ThirdParty/Ert/python/python/ert_gui/plottery/plots/ensemble.py deleted file mode 100644 index 333a3a2434..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/plottery/plots/ensemble.py +++ /dev/null @@ -1,56 +0,0 @@ -from .refcase import plotRefcase -from .history import plotHistory -from .observations import plotObservations -from .plot_tools import PlotTools - -def plotEnsemble(plot_context): - """ - @type plot_context: ert_gui.plottery.PlotContext - """ - ert = plot_context.ert() - key = plot_context.key() - config = plot_context.plotConfig() - """:type: ert_gui.plottery.PlotConfig """ - axes = plot_context.figure().add_subplot(111) - """:type: matplotlib.axes.Axes """ - - case_list = plot_context.cases() - - plot_context.y_axis = plot_context.VALUE_AXIS - plot_context.x_axis = plot_context.DATE_AXIS - - for case in case_list: - data = plot_context.dataGatherer().gatherData(ert, case, key) - if not data.empty: - if not data.index.is_all_dates: - plot_context.deactivateDateSupport() - plot_context.x_axis = plot_context.INDEX_AXIS - - _plotLines(axes, config, data, case, plot_context.isDateSupportActive()) - config.nextColor() - - plotRefcase(plot_context, axes) - plotObservations(plot_context, axes) - plotHistory(plot_context, axes) - - default_x_label = "Date" if plot_context.isDateSupportActive() else "Index" - PlotTools.finalizePlot(plot_context, axes, default_x_label=default_x_label, default_y_label="Value") - - -def _plotLines(axes, plot_config, data, ensemble_label, is_date_supported): - """ - @type axes: matplotlib.axes.Axes - @type plot_config: ert_gui.plottery.PlotConfig - @type data: pandas.DataFrame - @type ensemble_label: Str - """ - - style = plot_config.defaultStyle() - - if is_date_supported: - lines = axes.plot_date(x=data.index.values, y=data, color=style.color, alpha=style.alpha, marker=style.marker, linestyle=style.line_style, linewidth=style.width, markersize=style.size) - else: - lines = axes.plot(data.index.values, data, color=style.color, alpha=style.alpha, marker=style.marker, linestyle=style.line_style, linewidth=style.width, markersize=style.size) - - if len(lines) > 0: - plot_config.addLegendItem(ensemble_label, lines[0]) diff --git a/ThirdParty/Ert/python/python/ert_gui/plottery/plots/gaussian_kde.py b/ThirdParty/Ert/python/python/ert_gui/plottery/plots/gaussian_kde.py deleted file mode 100644 index 5e6c6b7124..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/plottery/plots/gaussian_kde.py +++ /dev/null @@ -1,63 +0,0 @@ -import numpy -from scipy.stats import gaussian_kde -from .plot_tools import PlotTools -import pandas as pd - - -def plotGaussianKDE(plot_context): - """ - @type plot_context: ert_gui.plottery.PlotContext - """ - ert = plot_context.ert() - key = plot_context.key() - config = plot_context.plotConfig() - axes = plot_context.figure().add_subplot(111) - """:type: matplotlib.axes.Axes """ - - plot_context.deactivateDateSupport() - plot_context.x_axis = plot_context.VALUE_AXIS - plot_context.y_axis = plot_context.DENSITY_AXIS - - if key.startswith("LOG10_"): - key = key[6:] - axes.set_xscale("log") - - case_list = plot_context.cases() - for case in case_list: - data = plot_context.dataGatherer().gatherData(ert, case, key) - - if not data.empty and data.nunique() > 1: - _plotGaussianKDE(axes, config, data, case) - config.nextColor() - - PlotTools.finalizePlot(plot_context, axes, default_x_label="Value", default_y_label="Density") - - -def _plotGaussianKDE(axes, plot_config, data, label): - """ - @type axes: matplotlib.axes.Axes - @type plot_config: PlotConfig - @type data: DataFrame - @type label: Str - """ - - style = plot_config.histogramStyle() - - if data.dtype == "object": - try: - data = pd.to_numeric(data, errors='coerce') - except AttributeError: - data = data.convert_objects(convert_numeric=True) - - if data.dtype == "object": - pass - else: - sample_range = data.max() - data.min() - indexes = numpy.linspace(data.min() - 0.5 * sample_range, data.max() + 0.5 * sample_range, 1000) - gkde = gaussian_kde(data.values) - evaluated_gkde = gkde.evaluate(indexes) - - lines = axes.plot(indexes, evaluated_gkde, linewidth=style.width, color=style.color, alpha=style.alpha) - - if len(lines) > 0: - plot_config.addLegendItem(label, lines[0]) \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/plottery/plots/histogram.py b/ThirdParty/Ert/python/python/ert_gui/plottery/plots/histogram.py deleted file mode 100644 index eeb308c10a..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/plottery/plots/histogram.py +++ /dev/null @@ -1,183 +0,0 @@ -from math import sqrt, ceil, floor, log10 -from matplotlib.patches import Rectangle -import numpy -from .plot_tools import PlotTools -import pandas as pd - -def plotHistogram(plot_context): - """ @type plot_context: ert_gui.plottery.PlotContext """ - ert = plot_context.ert() - key = plot_context.key() - config = plot_context.plotConfig() - - case_list = plot_context.cases() - case_count = len(case_list) - - plot_context.x_axis = plot_context.VALUE_AXIS - plot_context.Y_axis = plot_context.COUNT_AXIS - - if config.xLabel() is None: - config.setXLabel("Value") - - if config.yLabel() is None: - config.setYLabel("Count") - - use_log_scale = False - if key.startswith("LOG10_"): - key = key[6:] - use_log_scale = True - - data = {} - minimum = None - maximum = None - categories = set() - max_element_count = 0 - categorical = False - for case in case_list: - data[case] = plot_context.dataGatherer().gatherData(ert, case, key) - - if data[case].dtype == "object": - try: - data[case] = pd.to_numeric(data[case], errors='ignore') - except AttributeError: - data[case] = data[case].convert_objects(convert_numeric=True) - - if data[case].dtype == "object": - categorical = True - - if categorical: - categories = categories.union(set(data[case].unique())) - else: - if minimum is None: - minimum = data[case].min() - else: - minimum = min(minimum, data[case].min()) - - if maximum is None: - maximum = data[case].max() - else: - maximum = max(maximum, data[case].max()) - - max_element_count = max(max_element_count, len(data[case].index)) - - categories = sorted(categories) - bin_count = int(ceil(sqrt(max_element_count))) - - axes = {} - """:type: dict of (str, matplotlib.axes.Axes) """ - for index, case in enumerate(case_list): - axes[case] = plot_context.figure().add_subplot(case_count, 1, index + 1) - - axes[case].set_title("%s (%s)" % (config.title(), case)) - - if use_log_scale: - axes[case].set_xscale("log") - - if not data[case].empty: - if categorical: - _plotCategoricalHistogram(axes[case], config, data[case], case, categories) - else: - _plotHistogram(axes[case], config, data[case], case, bin_count, use_log_scale, minimum, maximum) - - config.nextColor() - PlotTools.showGrid(axes[case], plot_context) - - min_count = 0 - max_count = max([subplot.get_ylim()[1] for subplot in axes.values()]) - - custom_limits = plot_context.plotConfig().limits - - if custom_limits.count_maximum is not None: - max_count = custom_limits.count_maximum - - if custom_limits.count_minimum is not None: - min_count = custom_limits.count_minimum - - for subplot in axes.values(): - subplot.set_ylim(min_count, max_count) - subplot.set_xlim(custom_limits.value_minimum, custom_limits.value_maximum) - - -def _plotCategoricalHistogram(axes, plot_config, data, label, categories): - """ - @type axes: matplotlib.axes.Axes - @type plot_config: PlotConfig - @type data: DataFrame - @type label: str - @type categories: list of str - """ - - axes.set_xlabel(plot_config.xLabel()) - axes.set_ylabel(plot_config.yLabel()) - - style = plot_config.histogramStyle() - - counts = data.value_counts() - freq = [counts[category] if category in counts else 0 for category in categories] - pos = numpy.arange(len(categories)) - width = 1.0 - axes.set_xticks(pos + (width / 2.0)) - axes.set_xticklabels(categories) - - axes.bar(pos, freq, alpha=style.alpha, color=style.color, width=width) - - rectangle = Rectangle((0, 0), 1, 1, color=style.color) # creates rectangle patch for legend use. - plot_config.addLegendItem(label, rectangle) - - -def _plotHistogram(axes, plot_config, data, label, bin_count, use_log_scale=False, minimum=None, maximum=None): - """ - @type axes: matplotlib.axes.Axes - @type plot_config: PlotConfig - @type data: DataFrame - @type label: str - """ - - axes.set_xlabel(plot_config.xLabel()) - axes.set_ylabel(plot_config.yLabel()) - - style = plot_config.histogramStyle() - - if minimum is not None and maximum is not None: - if use_log_scale: - bins = _histogramLogBins(bin_count, minimum, maximum) - else: - bins = numpy.linspace(minimum, maximum, bin_count) - else: - bins = bin_count - - axes.hist(data.values, alpha=style.alpha, bins=bins, color=style.color) - - if minimum == maximum: - minimum -= 0.5 - maximum += 0.5 - - axes.set_xlim(minimum, maximum) - - rectangle = Rectangle((0, 0), 1, 1, color=style.color) # creates rectangle patch for legend use.' - plot_config.addLegendItem(label, rectangle) - - - -def _histogramLogBins(bin_count, minimum=None, maximum=None): - """ - @type data: pandas.DataFrame - @rtype: int - """ - minimum = log10(float(minimum)) - maximum = log10(float(maximum)) - - min_value = int(floor(minimum)) - max_value = int(ceil(maximum)) - - log_bin_count = max_value - min_value - - if log_bin_count < bin_count: - next_bin_count = log_bin_count * 2 - - if bin_count - log_bin_count > next_bin_count - bin_count: - log_bin_count = next_bin_count - else: - log_bin_count = bin_count - - return 10 ** numpy.linspace(minimum, maximum, log_bin_count) diff --git a/ThirdParty/Ert/python/python/ert_gui/plottery/plots/history.py b/ThirdParty/Ert/python/python/ert_gui/plottery/plots/history.py deleted file mode 100644 index dd1d8d7768..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/plottery/plots/history.py +++ /dev/null @@ -1,33 +0,0 @@ -def plotHistory(plot_context, axes): - ert = plot_context.ert() - key = plot_context.key() - - if len(plot_context.cases()) == 0: - case = None - else: - case = plot_context.cases()[0] - - config = plot_context.plotConfig() - data_gatherer = plot_context.dataGatherer() - - if config.isHistoryEnabled() and data_gatherer.hasHistoryGatherFunction(): - history_data = data_gatherer.gatherHistoryData(ert, case, key) - - if not history_data.empty: - _plotHistory(axes, config, history_data) - - -def _plotHistory(axes, plot_config, data): - """ - @type axes: matplotlib.axes.Axes - @type plot_config: PlotConfig - @type data: DataFrame - """ - - style = plot_config.historyStyle() - - lines = axes.plot_date(x=data.index.values, y=data, color=style.color, alpha=style.alpha, marker=style.marker, linestyle=style.line_style, - linewidth=style.width, markersize=style.size) - - if len(lines) > 0 and style.isVisible(): - plot_config.addLegendItem("History", lines[0]) diff --git a/ThirdParty/Ert/python/python/ert_gui/plottery/plots/observations.py b/ThirdParty/Ert/python/python/ert_gui/plottery/plots/observations.py deleted file mode 100644 index 5e67f42469..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/plottery/plots/observations.py +++ /dev/null @@ -1,29 +0,0 @@ -def plotObservations(plot_context, axes): - ert = plot_context.ert() - key = plot_context.key() - config = plot_context.plotConfig() - case_list = plot_context.cases() - data_gatherer = plot_context.dataGatherer() - - if config.isObservationsEnabled() and data_gatherer.hasObservationGatherFunction(): - if len(case_list) > 0: - observation_data = data_gatherer.gatherObservationData(ert, case_list[0], key) - - if not observation_data.empty: - _plotObservations(axes, config, observation_data, value_column=key) - - - -def _plotObservations(axes, plot_config, data, value_column): - """ - @type axes: matplotlib.axes.Axes - @type plot_config: PlotConfig - @type data: DataFrame - @type value_column: Str - """ - - style = plot_config.observationsStyle() - - errorbars = axes.errorbar(x=data.index.values, y=data[value_column].values, - yerr=data["STD_%s" % value_column].values, - fmt=' ', ecolor=style.color, alpha=style.alpha) diff --git a/ThirdParty/Ert/python/python/ert_gui/plottery/plots/plot_tools.py b/ThirdParty/Ert/python/python/ert_gui/plottery/plots/plot_tools.py deleted file mode 100644 index 7e2a3b93a2..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/plottery/plots/plot_tools.py +++ /dev/null @@ -1,109 +0,0 @@ -class PlotTools(object): - @staticmethod - def showGrid(axes, plot_context): - config = plot_context.plotConfig() - if config.isGridEnabled(): - axes.grid() - - - @staticmethod - def showLegend(axes, plot_context): - config = plot_context.plotConfig() - if config.isLegendEnabled() and len(config.legendItems()) > 0: - axes.legend(config.legendItems(), config.legendLabels(), numpoints=1) - - - @staticmethod - def _getXAxisLimits(plot_context): - """ @type plot_context: ert_gui.plottery.PlotContext """ - limits = plot_context.plotConfig().limits - axis_name = plot_context.x_axis - - if axis_name == plot_context.VALUE_AXIS: - return limits.value_limits - elif axis_name == plot_context.COUNT_AXIS: - # return limits.count_limits - return None # Histogram takes care of itself - elif axis_name == plot_context.DATE_AXIS: - return limits.date_limits - elif axis_name == plot_context.DENSITY_AXIS: - return limits.density_limits - elif axis_name == plot_context.DEPTH_AXIS: - return limits.depth_limits - elif axis_name == plot_context.INDEX_AXIS: - return limits.index_limits - - return None # No limits set - - @staticmethod - def _getYAxisLimits(plot_context): - """ @type plot_context: ert_gui.plottery.PlotContext """ - limits = plot_context.plotConfig().limits - axis_name = plot_context.y_axis - - if axis_name == plot_context.VALUE_AXIS: - return limits.value_limits - elif axis_name == plot_context.COUNT_AXIS: - # return limits.count_limits - return None # Histogram takes care of itself - elif axis_name == plot_context.DATE_AXIS: - return limits.date_limits - elif axis_name == plot_context.DENSITY_AXIS: - return limits.density_limits - elif axis_name == plot_context.DEPTH_AXIS: - return limits.depth_limits - elif axis_name == plot_context.INDEX_AXIS: - return limits.index_limits - - return None # No limits set - - - - @staticmethod - def finalizePlot(plot_context, axes, default_x_label="Unnamed", default_y_label="Unnamed"): - """ - @type plot_context: ert_gui.plottery.PlotContext - @type axes: - @type default_x_label: - @type default_y_label: - """ - - PlotTools.showLegend(axes, plot_context) - PlotTools.showGrid(axes, plot_context) - - PlotTools.__setupLabels(plot_context, default_x_label, default_y_label) - - plot_config = plot_context.plotConfig() - axes.set_xlabel(plot_config.xLabel()) - axes.set_ylabel(plot_config.yLabel()) - - x_axis_limits = PlotTools._getXAxisLimits(plot_context) - if x_axis_limits is not None: - axes.set_xlim(*x_axis_limits) - - y_axis_limits = PlotTools._getYAxisLimits(plot_context) - if y_axis_limits is not None: - axes.set_ylim(*y_axis_limits) - - axes.set_title(plot_config.title()) - - if plot_context.isDateSupportActive(): - plot_context.figure().autofmt_xdate() - - - @staticmethod - def __setupLabels(plot_context, default_x_label, default_y_label): - ert = plot_context.ert() - key = plot_context.key() - config = plot_context.plotConfig() - - if config.xLabel() is None: - config.setXLabel(default_x_label) - - if config.yLabel() is None: - config.setYLabel(default_y_label) - - if ert.eclConfig().hasRefcase() and key in ert.eclConfig().getRefcase(): - unit = ert.eclConfig().getRefcase().unit(key) - if unit != "": - config.setYLabel(unit) \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/plottery/plots/refcase.py b/ThirdParty/Ert/python/python/ert_gui/plottery/plots/refcase.py deleted file mode 100644 index 4a0836bf1b..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/plottery/plots/refcase.py +++ /dev/null @@ -1,26 +0,0 @@ -def plotRefcase(plot_context, axes): - ert = plot_context.ert() - key = plot_context.key() - config = plot_context.plotConfig() - data_gatherer = plot_context.dataGatherer() - - if config.isRefcaseEnabled() and data_gatherer.hasRefcaseGatherFunction(): - refcase_data = data_gatherer.gatherRefcaseData(ert, key) - - if not refcase_data.empty: - _plotRefcase(axes, config, refcase_data) - - -def _plotRefcase(axes, plot_config, data): - """ - @type axes: matplotlib.axes.Axes - @type plot_config: PlotConfig - @type data: DataFrame - """ - - style = plot_config.refcaseStyle() - - lines = axes.plot_date(x=data.index.values, y=data, color=style.color, alpha=style.alpha, marker=style.marker, linestyle=style.line_style, linewidth=style.width, markersize=style.size) - - if len(lines) > 0 and style.isVisible(): - plot_config.addLegendItem("Refcase", lines[0]) \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/plottery/plots/statistics.py b/ThirdParty/Ert/python/python/ert_gui/plottery/plots/statistics.py deleted file mode 100644 index 79b6f99067..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/plottery/plots/statistics.py +++ /dev/null @@ -1,117 +0,0 @@ -from matplotlib.patches import Rectangle -from matplotlib.lines import Line2D -from pandas import DataFrame -from .refcase import plotRefcase -from .observations import plotObservations -from .plot_tools import PlotTools - - -def plotStatistics(plot_context): - """ @type plot_context: ert_gui.plottery.PlotContext """ - ert = plot_context.ert() - key = plot_context.key() - config = plot_context.plotConfig() - """:type: ert_gui.plotter.PlotConfig """ - axes = plot_context.figure().add_subplot(111) - """:type: matplotlib.axes.Axes """ - - plot_context.y_axis = plot_context.VALUE_AXIS - plot_context.x_axis = plot_context.DATE_AXIS - - case_list = plot_context.cases() - for case in case_list: - data = plot_context.dataGatherer().gatherData(ert, case, key) - - if not data.empty: - if not data.index.is_all_dates: - plot_context.deactivateDateSupport() - plot_context.x_axis = plot_context.INDEX_AXIS - - style = config.getStatisticsStyle("mean") - rectangle = Rectangle((0, 0), 1, 1, color=style.color, alpha=0.8) # creates rectangle patch for legend use. - config.addLegendItem(case, rectangle) - - statistics_data = DataFrame() - std_dev_factor = config.getStandardDeviationFactor() - - statistics_data["Minimum"] = data.min(axis=1) - statistics_data["Maximum"] = data.max(axis=1) - statistics_data["Mean"] = data.mean(axis=1) - statistics_data["p10"] = data.quantile(0.1, axis=1) - statistics_data["p33"] = data.quantile(0.33, axis=1) - statistics_data["p50"] = data.quantile(0.50, axis=1) - statistics_data["p67"] = data.quantile(0.67, axis=1) - statistics_data["p90"] = data.quantile(0.90, axis=1) - std = data.std(axis=1) * std_dev_factor - statistics_data["std+"] = statistics_data["Mean"] + std - statistics_data["std-"] = statistics_data["Mean"] - std - - _plotPercentiles(axes, config, statistics_data, case) - config.nextColor() - - _addStatisticsLegends(plot_config=config) - - plotRefcase(plot_context, axes) - plotObservations(plot_context, axes) - - default_x_label = "Date" if plot_context.isDateSupportActive() else "Index" - PlotTools.finalizePlot(plot_context, axes, default_x_label=default_x_label, default_y_label="Value") - -def _addStatisticsLegends(plot_config): - _addStatisticsLegend(plot_config, "mean") - _addStatisticsLegend(plot_config, "p50") - _addStatisticsLegend(plot_config, "min-max", 0.2) - _addStatisticsLegend(plot_config, "p10-p90", 0.4) - _addStatisticsLegend(plot_config, "std", 0.4) - _addStatisticsLegend(plot_config, "p33-p67", 0.6) - -def _addStatisticsLegend(plot_config, style_name, alpha_multiplier=1.0): - style = plot_config.getStatisticsStyle(style_name) - if style.isVisible(): - if style.line_style == "#": - rectangle = Rectangle((0, 0), 1, 1, color='black', alpha=style.alpha * alpha_multiplier) # creates rectangle patch for legend use. - plot_config.addLegendItem(style.name, rectangle) - else: - line = Line2D([], [], color='black', marker=style.marker, linestyle=style.line_style, linewidth=style.width, alpha=style.alpha, markersize=style.size) - plot_config.addLegendItem(style.name, line) - - -def _plotPercentiles(axes, plot_config, data, ensemble_label): - """ - @type axes: matplotlib.axes.Axes - @type plot_config: ert_gui.plottery.PlotConfig - @type data: DataFrame - @type ensemble_label: Str - """ - style = plot_config.getStatisticsStyle("mean") - if style.isVisible(): - axes.plot(data.index.values, data["Mean"].values, alpha=style.alpha, linestyle=style.line_style, color=style.color, marker=style.marker, linewidth=style.width, markersize=style.size) - - style = plot_config.getStatisticsStyle("p50") - if style.isVisible(): - axes.plot(data.index.values, data["p50"].values, alpha=style.alpha, linestyle=style.line_style, color=style.color, marker=style.marker, linewidth=style.width, markersize=style.size) - - style = plot_config.getStatisticsStyle("std") - _plotPercentile(axes, style, data.index.values, data["std+"].values, data["std-"].values, 0.5) - - style = plot_config.getStatisticsStyle("min-max") - _plotPercentile(axes, style, data.index.values, data["Maximum"].values, data["Minimum"].values, 0.5) - - style = plot_config.getStatisticsStyle("p10-p90") - _plotPercentile(axes, style, data.index.values, data["p90"].values, data["p10"].values, 0.5) - - style = plot_config.getStatisticsStyle("p33-p67") - _plotPercentile(axes, style, data.index.values, data["p67"].values, data["p33"].values, 0.5) - - -def _plotPercentile(axes, style, index_values, top_line_data, bottom_line_data, alpha_multiplier): - alpha = style.alpha - line_style = style.line_style - color = style.color - marker = style.marker - - if line_style == "#": - axes.fill_between(index_values, bottom_line_data, top_line_data, alpha=alpha * alpha_multiplier, color=color) - elif style.isVisible(): - axes.plot(index_values, bottom_line_data, alpha=alpha, linestyle=line_style, color=color, marker=marker, linewidth=style.width, markersize=style.size) - axes.plot(index_values, top_line_data, alpha=alpha, linestyle=line_style, color=color, marker=marker, linewidth=style.width, markersize=style.size) diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/CMakeLists.txt b/ThirdParty/Ert/python/python/ert_gui/shell/CMakeLists.txt deleted file mode 100644 index d9d31a71df..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/CMakeLists.txt +++ /dev/null @@ -1,28 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - analysis_module.py - cases.py - custom_kw_keys.py - debug.py - export.py - ertshell.py - ert_shell_collection.py - gen_data_keys.py - gen_kw_keys.py - observations.py - plot_settings.py - plugins.py - results.py - ert_shell_context.py - server.py - shell_plot.py - simulations.py - smoother.py - storage.py - summary_keys.py - workflows.py -) - -add_python_package("python.ert_gui.shell" ${PYTHON_INSTALL_PREFIX}/ert_gui/shell "${PYTHON_SOURCES}" True) - -add_subdirectory(libshell) \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/__init__.py b/ThirdParty/Ert/python/python/ert_gui/shell/__init__.py deleted file mode 100644 index 52fb97e60b..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/__init__.py +++ /dev/null @@ -1,34 +0,0 @@ -from .ert_shell_context import ErtShellContext - -def isConfigLoaded(shell_context, verbose=True): - """ @rtype: bool """ - if shell_context.ert() is None: - if verbose: - print("Error: A config file has not been loaded!") - return False - return True - -def assertConfigLoaded(func): - def wrapper(self, *args, **kwargs): - # prefixes should be either do_ or complete_ - if func.__name__.startswith("complete_"): - result = [] - verbose = False - else: - result = False - verbose = True - - if isConfigLoaded(self.shellContext(), verbose=verbose): - result = func(self, *args, **kwargs) - - return result - - wrapper.__doc__ = func.__doc__ - wrapper.__name__ = func.__name__ - - return wrapper - -from .ert_shell_collection import ErtShellCollection -from .plot_settings import PlotSettings -from .shell_plot import ShellPlot -from .ertshell import ErtShell diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/analysis_module.py b/ThirdParty/Ert/python/python/ert_gui/shell/analysis_module.py deleted file mode 100644 index 26b839c28b..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/analysis_module.py +++ /dev/null @@ -1,119 +0,0 @@ -from ert_gui.shell import assertConfigLoaded, ErtShellCollection -from ert_gui.shell.libshell import extractFullArgument, autoCompleteListWithSeparator, matchItems, splitArguments - - -class AnalysisModule(ErtShellCollection): - def __init__(self, parent): - super(AnalysisModule, self).__init__("analysis_module", parent) - - self.addShellProperty(name="active_module", - getter=AnalysisModule.getAnalysisModule, - setter=AnalysisModule.setAnalysisModule, - validator=AnalysisModule.validateAnalysisModule, - completer=AnalysisModule.completeAnalysisModule, - help_arguments="[analysis_module]", - help_message="Show or set the current analysis module.", - pretty_attribute="Active Module") - - self.addShellFunction(name="list", - function=AnalysisModule.list, - help_message="Shows a list of the available analysis modules.") - - self.addShellFunction(name="variables", - function=AnalysisModule.variables, - help_message="Shows a list of the available options for the current analysis module.") - - self.addShellFunction(name="set", - function=AnalysisModule.set, - completer=AnalysisModule.completeSet, - help_arguments=" ", - help_message="Set a variable value.") - - - @assertConfigLoaded - def getAnalysisModule(self): - return self.ert().analysisConfig().activeModuleName() - - - @assertConfigLoaded - def setAnalysisModule(self, analysis_module_name): - self.ert().analysisConfig().selectModule(analysis_module_name) - - - @assertConfigLoaded - def validateAnalysisModule(self, line): - keys = matchItems(line, self.getAnalysisModules()) - - if len(keys) == 0 or len(keys) > 1: - raise ValueError("Must enter a single valid Analysis Module") - - return list(keys)[0] - - - def completeAnalysisModule(self, text, line, begidx, endidx): - key = extractFullArgument(line, endidx) - return autoCompleteListWithSeparator(key, self.getAnalysisModules()) - - - @assertConfigLoaded - def getAnalysisModules(self): - analysis_modules = self.ert().analysisConfig().getModuleList() - items = [analysis_module for analysis_module in analysis_modules] - return items - - - @assertConfigLoaded - def list(self, args): - items = self.getAnalysisModules() - self.columnize(items) - - - @assertConfigLoaded - def variables(self, args): - active_module = self.ert().analysisConfig().getActiveModule() - variables = active_module.getVariableNames() - - format = " %-20s %-6s %-20s %s" - print(format % ("Name", "Type", "Value", "Description")) - - for variable_name in variables: - variable_type = active_module.getVariableType(variable_name).__name__ - variable_value = active_module.getVariableValue(variable_name) - variable_description = active_module.getVariableDescription(variable_name) - print(format % (variable_name, variable_type, variable_value, variable_description)) - - - @assertConfigLoaded - def set(self, line): - arguments = splitArguments(line) - - if len(arguments) > 1: - active_module = self.ert().analysisConfig().getActiveModule() - variables = active_module.getVariableNames() - variable, argument = line.split(" ", 1) - - if not variable in variables: - self.lastCommandFailed("Variable with name: %s, not available in analysis module!" % variable) - else: - variable_type = active_module.getVariableType(variable) - try: - value = variable_type(argument) - active_module.setVar(variable, argument) - except ValueError: - self.lastCommandFailed("Unable to convert '%s' into to a: %s" % (argument, variable_type.__name__)) - - else: - self.lastCommandFailed("This keyword requires a variable name and a value.") - - - - @assertConfigLoaded - def completeSet(self, text, line, begidx, endidx): - arguments = splitArguments(line) - - if len(arguments) > 2 or len(arguments) == 2 and not text: - return [] - - active_module = self.ert().analysisConfig().getActiveModule() - variables = active_module.getVariableNames() - return autoCompleteListWithSeparator(text, variables) \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/cases.py b/ThirdParty/Ert/python/python/ert_gui/shell/cases.py deleted file mode 100644 index 4e334c3ddc..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/cases.py +++ /dev/null @@ -1,174 +0,0 @@ -from ert.enkf import EnkfVarType - -from ert_gui.shell import assertConfigLoaded, ErtShellCollection -from ert_gui.shell.libshell import autoCompleteList, splitArguments -from ert_gui.shell.libshell.shell_tools import boolValidator - - -class Cases(ErtShellCollection): - def __init__(self, parent): - super(Cases, self).__init__("case", parent) - self._show_hidden = False - - self.addShellFunction(name="list", - function=Cases.list, - help_message="Shows a list of all available cases.") - - self.addShellFunction(name="select", - function=Cases.select, - completer=Cases.completeSelect, - help_arguments="", - help_message="Change the current file system to the named case.") - - self.addShellFunction(name="create", - function=Cases.create, - help_arguments="", - help_message="Create a new case with the specified named.") - - self.addShellFunction(name="summary_key_set", - function=Cases.summaryKeySet, - help_message="Shows a list of the stored summary keys.") - - self.addShellFunction(name="state", - function=Cases.state, - completer=Cases.completeFilesystem, - help_arguments="[case_name]", - help_message="Shows a list of the states of the individual realizations. " - "Uses the current case if no case name is provided.") - - self.addShellFunction(name="time_map", - function=Cases.timemap, - completer=Cases.completeFilesystem, - help_arguments="[case_name]", - help_message="Shows a list of the time/report steps of the case. " - "Uses the current case if no case name is provided.") - - self.addShellFunction(name="initialize", - function=Cases.initialize, - completer=Cases.completeFilesystem, - help_arguments="[case_name]", - help_message="Initialize the selected case from scratch. " - "Uses the current if no case name is provided") - - self.addShellProperty(name="show_hidden", - getter=Cases.showHidden, - setter=Cases.setShowHidden, - validator=boolValidator, - completer=["true", "false"], - help_arguments="[true|false]", - help_message="Show or set the visibility of hidden cases", - pretty_attribute="Hidden case visibility") - - - def showHidden(self): - return self._show_hidden - - def setShowHidden(self, show_hidden): - self._show_hidden = show_hidden - - @assertConfigLoaded - def list(self, line): - fs_list = self.getFileSystemNames() - current_fs = self.ert().getEnkfFsManager().getCurrentFileSystem().getCaseName() - max_length = max([len(fs) for fs in fs_list]) - case_format = "%1s %-" + str(max_length) + "s %s" - for fs in fs_list: - current = "" - if fs == current_fs: - current = "*" - - state = "No Data" - if self.ert().getEnkfFsManager().caseHasData(fs): - state = "Data" - - print(case_format % (current, fs, state)) - - def getFileSystemNames(self): - fsm = self.ert().getEnkfFsManager() - if self._show_hidden: - return [case for case in fsm.getCaseList()] - else: - return [case for case in fsm.getCaseList() if not fsm.isCaseHidden(case)] - - @assertConfigLoaded - def select(self, case_name): - case_name = case_name.strip() - if case_name in self.getFileSystemNames(): - fs = self.ert().getEnkfFsManager().getFileSystem(case_name) - self.ert().getEnkfFsManager().switchFileSystem(fs) - else: - self.lastCommandFailed("Unknown case '%s'" % case_name) - - @assertConfigLoaded - def completeSelect(self, text, line, begidx, endidx): - return autoCompleteList(text, self.getFileSystemNames()) - - @assertConfigLoaded - def create(self, line): - arguments = splitArguments(line) - - if len(arguments) == 1: - case_name = arguments[0] - if case_name not in self.getFileSystemNames(): - fs = self.ert().getEnkfFsManager().getFileSystem(case_name) - self.ert().getEnkfFsManager().switchFileSystem(fs) - else: - self.lastCommandFailed("Case '%s' already exists!" % case_name) - else: - self.lastCommandFailed("Expected one argument: received: '%s'" % line) - - @assertConfigLoaded - def summaryKeySet(self, line): - fs = self.ert().getEnkfFsManager().getCurrentFileSystem() - key_set = sorted([key for key in fs.getSummaryKeySet().keys()]) - self.columnize(key_set) - - @assertConfigLoaded - def state(self, case_name): - case_name = case_name.strip() - if not case_name: - case_name = self.ert().getEnkfFsManager().getCurrentFileSystem().getCaseName() - elif not case_name in self.getFileSystemNames(): - self.lastCommandFailed("Unknown case name '%s'" % case_name) - return False - - state_map = self.ert().getEnkfFsManager().getStateMapForCase(case_name) - states = ["%d: %s" % (index, state) for index, state in enumerate(state_map)] - - self.columnize(states) - - @assertConfigLoaded - def completeFilesystem(self, text, line, begidx, endidx): - return autoCompleteList(text, self.getFileSystemNames()) - - @assertConfigLoaded - def timemap(self, case_name): - case_name = case_name.strip() - if not case_name: - case_name = self.ert().getEnkfFsManager().getCurrentFileSystem().getCaseName() - elif not case_name in self.getFileSystemNames(): - self.lastCommandFailed("Unknown case name '%s'" % case_name) - return False - - time_map = self.ert().getEnkfFsManager().getTimeMapForCase(case_name) - report_steps = ["%d: %s" % (index, report_step_time) for index, report_step_time in enumerate(time_map)] - - self.columnize(report_steps) - - - @assertConfigLoaded - def initialize(self, case_name): - case_name = case_name.strip() - if not case_name: - case_name = self.ert().getEnkfFsManager().getCurrentFileSystem().getCaseName() - elif not case_name in self.getFileSystemNames(): - self.lastCommandFailed("Unknown case name '%s'" % case_name) - return False - - ert = self.ert() - fs = ert.getEnkfFsManager().getFileSystem(case_name) - size = self.ert().getEnsembleSize() - parameters = ert.ensembleConfig().getKeylistFromVarType(EnkfVarType.PARAMETER) - ert.getEnkfFsManager().initializeCaseFromScratch(fs , parameters, 0, size - 1) - - print("Case: '%s' initialized") diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/custom_kw_keys.py b/ThirdParty/Ert/python/python/ert_gui/shell/custom_kw_keys.py deleted file mode 100644 index d1360fe27d..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/custom_kw_keys.py +++ /dev/null @@ -1,37 +0,0 @@ -from ert_gui.shell import assertConfigLoaded, ShellPlot, ErtShellCollection -from ert_gui.plottery import PlotDataGatherer as PDG - - -class CustomKWKeys(ErtShellCollection): - def __init__(self, parent): - super(CustomKWKeys, self).__init__("custom_kw", parent) - - self.addShellFunction(**{"name": "list", - "function": CustomKWKeys.list, - "help_message": "List all CustomKW keys."}) - - self.__plot_data_gatherer = None - - ShellPlot.addPrintSupport(self, "CustomKW") - ShellPlot.addHistogramPlotSupport(self, "CustomKW") - ShellPlot.addGaussianKDEPlotSupport(self, "CustomKW") - ShellPlot.addDistributionPlotSupport(self, "CustomKW") - ShellPlot.addCrossCaseStatisticsPlotSupport(self, "CustomKW") - - - def fetchSupportedKeys(self): - return self.ert().getKeyManager().customKwKeys() - - - def plotDataGatherer(self): - if self.__plot_data_gatherer is None: - custom_kw_pdg = PDG.gatherCustomKwData - custom_kw_key_manager = self.ert().getKeyManager().isCustomKwKey - self.__plot_data_gatherer = PDG(custom_kw_pdg, custom_kw_key_manager) - - return self.__plot_data_gatherer - - - @assertConfigLoaded - def list(self, line): - self.columnize(self.fetchSupportedKeys()) diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/debug.py b/ThirdParty/Ert/python/python/ert_gui/shell/debug.py deleted file mode 100644 index bdc8a035e8..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/debug.py +++ /dev/null @@ -1,59 +0,0 @@ -from ert import Version -from ert_gui.shell import assertConfigLoaded, ErtShellCollection - - -class Debug(ErtShellCollection): - def __init__(self, parent): - super(Debug, self).__init__("debug", parent) - - self.addShellFunction(name="site_config", function=Debug.siteConfig, help_message="Show the path to the current site_config") - self.addShellFunction(name="version", function=Debug.version, help_message="Show the internalized ert version number") - self.addShellFunction(name="timestamp", function=Debug.timestamp, help_message="Show the build timestamp") - self.addShellFunction(name="git_commit", function=Debug.gitCommit, help_message="Show the git commit") - self.addShellFunction(name="info", function=Debug.info, help_message="Shows site_config, version, timestamp and Git Commit") - self.addShellFunction(name="last_plugin_result", function=Debug.lastPluginResult, help_message="Shows the last plugin result.") - self.addShellFunction(name="eval", function=Debug.eval, help_arguments="", help_message="Evaluate a Python expression. The last plugin result is defined as: x") - - self.shellContext()["debug"] = self - self.__last_plugin_result = None - self.__local_variables = {} - - def setLastPluginResult(self, result): - self.__last_plugin_result = result - - @assertConfigLoaded - def siteConfig(self, line): - print("Site Config: %s" % self.ert().siteConfig().getLocation()) - - def version(self, line): - print("Version: %s" % Version.getVersion()) - - def timestamp(self, line): - print("Timestamp: %s" % Version.getBuildTime()) - - def gitCommit(self, line): - print("Git Commit: %s" % Version.getGitCommit(True)) - - @assertConfigLoaded - def info(self, line): - print("Site Config: %s" % self.ert().siteConfig().getLocation()) - print("Version: %s" % Version.getVersion()) - print("Timestamp: %s" % Version.getBuildTime()) - print("Git Commit: %s" % Version.getGitCommit(True)) - - def lastPluginResult(self, line): - print("Last plugin result: %s" % self.__last_plugin_result) - - def eval(self, line): - line = line.strip() - - if len(line) > 0: - self.__local_variables["x"] = self.__last_plugin_result - try: - exec(line, self.__local_variables) - except Exception as e: - print("Error: The expression caused an exception!") - print(e) - else: - print("Error: A python expression is required!") - diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/ert_shell_collection.py b/ThirdParty/Ert/python/python/ert_gui/shell/ert_shell_collection.py deleted file mode 100644 index b003be1be6..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/ert_shell_collection.py +++ /dev/null @@ -1,19 +0,0 @@ -from ert_gui.shell import assertConfigLoaded -from ert_gui.shell.libshell import ShellCollection - - -class ErtShellCollection(ShellCollection): - def __init__(self, name, parent=None, description="No description available"): - super(ErtShellCollection, self).__init__(name, parent, description) - - def shellContext(self): - """ @rtype: ert_gui.shell.ErtShellContext """ - return super(ErtShellCollection, self).shellContext() - - @assertConfigLoaded - def ert(self): - """ @rtype: ert.enkf.enkf_main.EnKFMain """ - return self.shellContext().ert() - - def columnize(self, items, displaywidth=80): - self.shellContext().shell().columnize(items, displaywidth=displaywidth) \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/ert_shell_context.py b/ThirdParty/Ert/python/python/ert_gui/shell/ert_shell_context.py deleted file mode 100644 index 2cece5ef68..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/ert_shell_context.py +++ /dev/null @@ -1,20 +0,0 @@ -from ert_gui.shell.libshell import ShellContext - - -class ErtShellContext(ShellContext): - def __init__(self, shell): - super(ErtShellContext, self).__init__(shell) - self.__ert = None - """ :type: EnKFMain """ - - def ert(self): - """ @rtype: ert.enkf.enkf_main.EnKFMain """ - return self.__ert - - def setErt(self, ert): - """ @type ert: ert.enkf.enkf_main.EnKFMain """ - if self.__ert is not None and self.__ert != ert: - self.__ert.free() - self.__ert = None - - self.__ert = ert \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/ertshell.py b/ThirdParty/Ert/python/python/ert_gui/shell/ertshell.py deleted file mode 100644 index b061b86b19..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/ertshell.py +++ /dev/null @@ -1,192 +0,0 @@ -import atexit -from cmd import Cmd -import readline -import os - -from ert.enkf import EnKFMain -import ert_gui -from ert_gui.shell import PlotSettings - -from ert_gui.shell.analysis_module import AnalysisModule -from ert_gui.shell.custom_kw_keys import CustomKWKeys -from ert_gui.shell.debug import Debug -from ert_gui.shell.cases import Cases -from ert_gui.shell.export import Export -from ert_gui.shell.gen_data_keys import GenDataKeys -from ert_gui.shell.gen_kw_keys import GenKWKeys -from ert_gui.shell.results import Results -from ert_gui.shell.plugins import Plugins -from ert_gui.shell.simulations import Simulations -from ert_gui.shell.smoother import Smoother -from ert_gui.shell.storage import Storage -from ert_gui.shell.summary_keys import SummaryKeys -from ert_gui.shell.workflows import Workflows -from ert_gui.shell.observations import Observations -from ert_gui.shell.server import Server -from ert_gui.shell.libshell import extractFullArgument, getPossibleFilenameCompletions -from ert_gui.shell import ErtShellContext - -import matplotlib - -class ErtShell(Cmd): - prompt = "--> " - intro = " :::::::::::::::::::::::::::::::::::::\n" \ - " :: ::\n" \ - " :: ______ ______ _______ ::\n" \ - " :: | ____| | __ \ |__ __| ::\n" \ - " :: | |__ | |__) | | | ::\n" \ - " :: | __| | _ / | | ::\n" \ - " :: | |____ | | \ \ | | ::\n" \ - " :: |______| |_| \_\ |_| ::\n" \ - " :: ::\n" \ - " :: Ensemble based Reservoir Tool ::\n" \ - " :::::::::::::::::::::::::::::::::::::\n" \ - "\n" \ - "Interactive shell for working with ERT.\n" \ - "\n" \ - "-- Type help for a list of supported commands.\n" \ - "-- Type exit or press Ctrl+D to end the shell session.\n" \ - "-- Press Tab for auto completion.\n" \ - "-- Arrow up/down for history.\n" - - - def __init__(self, forget_history=False): - Cmd.__init__(self) - - self._children = [] - - self._shell_context = ErtShellContext(self) - - if not forget_history: - self._history_file = os.path.join(os.path.expanduser("~/.ertshell/ertshell.history")) - self._init_history() - else: - self._history_file = None - - matplotlib.rcParams["interactive"] = True - matplotlib.rcParams["mathtext.default"] = "regular" - matplotlib.rcParams["verbose.level"] = "helpful" - matplotlib.rcParams["verbose.fileo"] = "sys.stderr" - - try: - matplotlib.style.use("ggplot") # available from version 1.4 - except AttributeError: - pass - - Debug(self) - PlotSettings(self) - Cases(self) - Workflows(self) - Plugins(self) - SummaryKeys(self) - GenDataKeys(self) - GenKWKeys(self) - Results(self) - Simulations(self) - CustomKWKeys(self) - AnalysisModule(self) - Smoother(self) - Observations(self) - Export(self) - Storage(self) - Server(self) - - self._last_command_failed = False - - atexit.register(self._cleanup) - - def _init_history(self): - try: - readline.set_history_length(100) - readline.read_history_file(self._history_file) - except IOError: - pass - atexit.register(self._save_history) - - def _save_history(self): - if self._history_file is not None: - if not os.path.exists(os.path.dirname(self._history_file)): - os.makedirs(os.path.dirname(self._history_file)) - - readline.write_history_file(self._history_file) - - def _cleanup(self): - print("Performing cleanup...") - - for child in self._children: - child.cleanup() - - if self.shellContext().ert() is not None: - self.shellContext().setErt(None) - - - def addChild(self, child): - self._children.append(child) - - def emptyline(self): - pass - - def do_load_config(self, config_file): - if os.path.exists(config_file) and os.path.isfile(config_file): - self.shellContext().setErt(EnKFMain(config_file)) - ert_gui.configureErtNotifier(self.shellContext().ert(), config_file) - else: - self.lastCommandFailed("Config file '%s' not found!\n" % config_file) - - def complete_load_config(self, text, line, begidx, endidx): - argument = extractFullArgument(line, endidx) - return getPossibleFilenameCompletions(argument) - - - def help_load_config(self): - print("\n".join(("load_config config_file", - " Loads a config file."))) - - def do_cwd(self, line): - cwd = os.getcwd() - print("Current directory: %s" % cwd) - - def help_cwd(self): - print("Show the current directory.") - - def do_exit(self, line): - return True - - def help_exit(self): - return "\n".join(("exit", - " End the shell session.")), - - do_EOF = do_exit - - def help_EOF(self): - return "\n".join(("EOF", - " The same as exit. (Ctrl+D)")), - - def shellContext(self): - return self._shell_context - - def default(self, line): - Cmd.default(self, line) - self._last_command_failed = True - - def precmd(self, line): - self._last_command_failed = False - return Cmd.precmd(self, line) - - def invokeCommand(self, line): - self._last_command_failed = False - self.onecmd(line) - return not self._last_command_failed - - def lastCommandFailed(self, message): - print("Error: %s" % message) - self._last_command_failed = True - - def get_names(self): - return dir(self) - - - - - - diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/export.py b/ThirdParty/Ert/python/python/ert_gui/shell/export.py deleted file mode 100644 index 862f8062ab..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/export.py +++ /dev/null @@ -1,67 +0,0 @@ -from __future__ import print_function -from ert.util import IntVector -from ert.enkf.enums import ErtImplType -from ert.enkf.data import EnkfNode -from ert_gui.shell import assertConfigLoaded, ErtShellCollection -from ert_gui.shell.libshell import autoCompleteList, splitArguments - - -class Export(ErtShellCollection): - DEFAULT_EXPORT_PATH = "export/%s/%s_%%d" - - def __init__(self, parent): - super(Export, self).__init__("export", parent) - default_path = Export.DEFAULT_EXPORT_PATH % ("{KEY}", "{KEY}") - - self.addShellFunction(name="FIELD", - function=Export.exportFIELD, - completer=Export.completeFIELD, - help_arguments=" [%s] [1,4,7-10]" % default_path, - help_message="Export parameters; path and realisations in [...] are optional.") - - def supportedFIELDKeys(self): - ens_config = self.ert().ensembleConfig() - key_list = ens_config.getKeylistFromImplType(ErtImplType.FIELD) - return key_list - - @assertConfigLoaded - def completeFIELD(self, text, line, begidx, endidx): - arguments = splitArguments(line) - - if len(arguments) > 2 or len(arguments) == 2 and not text: - return [] - - return autoCompleteList(text, self.supportedFIELDKeys()) - - @assertConfigLoaded - def exportFIELD(self, line): - arguments = splitArguments(line) - - if len(arguments) >= 1: - ens_config = self.ert().ensembleConfig() - key = arguments[0] - if key in self.supportedFIELDKeys(): - config_node = ens_config[key] - if len(arguments) >= 2: - path_fmt = arguments[1] - else: - path_fmt = Export.DEFAULT_EXPORT_PATH % (key, key) + ".grdecl" - - if len(arguments) >= 3: - range_string = "".join(arguments[2:]) - iens_list = IntVector.active_list(range_string) - else: - ens_size = self.ert().getEnsembleSize() - iens_list = IntVector.createRange(0, ens_size, 1) - - fs_manager = self.ert().getEnkfFsManager() - fs = fs_manager.getCurrentFileSystem() - init_file = self.ert().fieldInitFile(config_node) - if init_file: - print('Using init file: %s' % init_file) - - EnkfNode.exportMany(config_node, path_fmt, fs, iens_list, arg=init_file) - else: - self.lastCommandFailed("No such FIELD node: %s" % key) - else: - self.lastCommandFailed("Expected at least one argument: received: '%s'" % line) diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/gen_data_keys.py b/ThirdParty/Ert/python/python/ert_gui/shell/gen_data_keys.py deleted file mode 100644 index cf6f7b67b9..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/gen_data_keys.py +++ /dev/null @@ -1,32 +0,0 @@ -from ert_gui.plottery import PlotDataGatherer as PDG -from ert_gui.shell import ShellPlot, assertConfigLoaded, ErtShellCollection - - -class GenDataKeys(ErtShellCollection): - def __init__(self, parent): - super(GenDataKeys, self).__init__("gen_data", parent) - self.addShellFunction(name="list", function=GenDataKeys.list, help_message="Shows a list of all available GenData keys.") - - self.__plot_data_gatherer = None - - ShellPlot.addPrintSupport(self, "GenData") - ShellPlot.addEnsemblePlotSupport(self, "GenData") - ShellPlot.addQuantilesPlotSupport(self, "GenData") - - - def fetchSupportedKeys(self): - return self.ert().getKeyManager().genDataKeys() - - def plotDataGatherer(self): - if self.__plot_data_gatherer is None: - gen_data_pdg = PDG.gatherGenDataData - gen_data_key_manager = self.ert().getKeyManager().isGenDataKey - gen_data_observation_pdg = PDG.gatherGenDataObservationData - pdg = PDG(gen_data_pdg, gen_data_key_manager, observationGatherFunc=gen_data_observation_pdg) - self.__plot_data_gatherer = pdg - - return self.__plot_data_gatherer - - @assertConfigLoaded - def list(self, line): - self.columnize(self.fetchSupportedKeys()) diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/gen_kw_keys.py b/ThirdParty/Ert/python/python/ert_gui/shell/gen_kw_keys.py deleted file mode 100644 index 104f006185..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/gen_kw_keys.py +++ /dev/null @@ -1,31 +0,0 @@ -from ert_gui.shell import ShellPlot, assertConfigLoaded, ErtShellCollection -from ert_gui.plottery import PlotDataGatherer as PDG - - -class GenKWKeys(ErtShellCollection): - def __init__(self, parent): - super(GenKWKeys, self).__init__("gen_kw", parent) - self.addShellFunction(name="list", function=GenKWKeys.list, help_message="Shows a list of all available GenKW keys.") - - self.__plot_data_gatherer = None - - ShellPlot.addPrintSupport(self, "GenKW") - ShellPlot.addHistogramPlotSupport(self, "GenKW") - ShellPlot.addGaussianKDEPlotSupport(self, "GenKW") - ShellPlot.addDistributionPlotSupport(self, "GenKW") - ShellPlot.addCrossCaseStatisticsPlotSupport(self, "GenKW") - - def fetchSupportedKeys(self): - return self.ert().getKeyManager().genKwKeys() - - def plotDataGatherer(self): - if self.__plot_data_gatherer is None: - gen_kw_pdg = PDG.gatherGenKwData - gen_kw_key_manager = self.ert().getKeyManager().isGenKwKey - self.__plot_data_gatherer = PDG(gen_kw_pdg, gen_kw_key_manager) - - return self.__plot_data_gatherer - - @assertConfigLoaded - def list(self, line): - self.columnize(self.fetchSupportedKeys()) diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/libshell/CMakeLists.txt b/ThirdParty/Ert/python/python/ert_gui/shell/libshell/CMakeLists.txt deleted file mode 100644 index 11b4cb7ad0..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/libshell/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - shell_collection.py - shell_context.py - shell_function.py - shell_path_tools.py - shell_property.py - shell_tools.py -) - -add_python_package("python.ert_gui.shell.libshell" ${PYTHON_INSTALL_PREFIX}/ert_gui/shell/libshell "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/libshell/__init__.py b/ThirdParty/Ert/python/python/ert_gui/shell/libshell/__init__.py deleted file mode 100644 index cf18bdc417..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/libshell/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -from .shell_context import ShellContext -from .shell_tools import autoCompleteList, extractFullArgument, autoCompleteListWithSeparator, matchItems, containsAny, findRightMostSeparator, boolValidator, createListValidator, createFloatValidator, widthAsPercentageOfConsoleWidth, getTerminalSize, splitArguments -from .shell_path_tools import getPossibleFilenameCompletions, pathCompleter, pathify -from .shell_property import ShellProperty -from .shell_function import ShellFunction -from .shell_collection import ShellCollection \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/libshell/shell_collection.py b/ThirdParty/Ert/python/python/ert_gui/shell/libshell/shell_collection.py deleted file mode 100644 index db5a2adc9d..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/libshell/shell_collection.py +++ /dev/null @@ -1,171 +0,0 @@ -import shlex -import textwrap -from ert_gui.shell.libshell import autoCompleteList, ShellFunction, ShellProperty, widthAsPercentageOfConsoleWidth, getTerminalSize - - -class ShellCollection(object): - command_help_message = "The command: '%s' supports the following keywords:" - - def __init__(self, name, parent=None, description="No description available"): - super(ShellCollection, self).__init__() - self.__name = name - self.__parent = None - self.__description = description - - if parent is not None: - self.setParent(parent) - parent.addChild(self) - - self.__collection = {} - self.__model_tracker = {} - self.__children = [] - - def setParent(self, parent): - if not hasattr(parent, "shellContext"): - raise ValueError("Parent is missing function: shellContext()") - - if not hasattr(parent, "lastCommandFailed"): - raise ValueError("Parent is missing function: lastCommandFailed()") - - setattr(parent, "do_%s" % self.name, self.doKeywords) - setattr(parent, "complete_%s" % self.name, self.completeKeywords) - setattr(parent, "help_%s" % self.name, self.helpKeywords) - self.__parent = parent - - - def addChild(self, child): - self.__children.append(child) - - def cleanup(self): - for child in self.__children: - child.cleanup() - - def addCollection(self, collection): - """ - :type collection: ShellCollection - """ - self.__collection[collection.name] = collection - collection.setParent(self) - - - def addProperty(self, property): - """ - :type property: ShellProperty - """ - self.__collection[property.name] = property - property.setParent(self) - - def addFunction(self, function): - """ - :type function: ShellFunction - """ - self.__collection[function.name] = function - function.setParent(self) - - - def addShellProperty(self, name, getter, setter=None, validator=None, completer=None, help_arguments=None, help_message=None, pretty_attribute=None, model=None): - """ @rtype: ShellProperty """ - shell_property = ShellProperty(name, getter, setter, validator, completer, help_arguments, help_message, pretty_attribute) - self.addProperty(shell_property) - - if model is None: - model = self - - self.__model_tracker[name] = model - return shell_property - - - def getModelForProperty(self, property_name): - return self.__model_tracker[property_name] - - - def addShellFunction(self, name, function, completer=None, help_arguments=None, help_message=None, model=None): - """ @rtype: ShellFunction """ - func = ShellFunction(name, function, completer, help_arguments, help_message) - self.addFunction(func) - - if model is None: - model = self - - self.__model_tracker[name] = model - - return func - - - def getModelForFunction(self, name): - return self.__model_tracker[name] - - @property - def name(self): - return self.__name - - def shellContext(self): - """ :rtype: ert_gui.shell.libshell.ShellContext """ - return self.__parent.shellContext() - - def lastCommandFailed(self, message): - self.__parent.lastCommandFailed(message) - - def findKeywords(self): - return self.__collection.keys() - - def completeKeywords(self, text, line, begidx, endidx): - arguments = shlex.split(line) - assert arguments[0] == self.name - - line = line[len(self.name) + 1:] - begidx = begidx - len(self.name) + 1 - endidx = endidx - len(self.name) + 1 - keyword, sep, arguments = line.partition(' ') - - if begidx >= len(keyword) and keyword in self.findKeywords(): - if hasattr(self, "complete_%s" % keyword): - func = getattr(self, "complete_%s" % keyword) - return func(text, line, begidx, endidx) - else: - return [] - else: - return autoCompleteList(text, self.findKeywords()) - - def doKeywords(self, line): - keyword, sep, arguments = line.partition(' ') - - if keyword.strip() == "": - self.printGuidance() - elif keyword in self.__collection: - func = getattr(self, "do_%s" % keyword) - return func(arguments) - else: - self.lastCommandFailed("Unknown keyword: '%s'" % keyword) - self.printGuidance() - - - def printGuidance(self): - print(self.command_help_message % self.name) - self.shellContext().shell().columnize(self.findKeywords(), getTerminalSize()[0]) - - - def helpKeywords(self): - print(self.command_help_message % self.name) - keywords = self.findKeywords() - - keyword_column_width = widthAsPercentageOfConsoleWidth(20) - parameter_column_width = widthAsPercentageOfConsoleWidth(30) - help_column_width = widthAsPercentageOfConsoleWidth(48) - help_format = " %-" + str(keyword_column_width) + "s %-" + str(parameter_column_width) + "s %-" + str(help_column_width) + "s" - - print(help_format % ("Keyword", "Parameter(s)", "Help")) - - for keyword in keywords: - message = "No help available!" - parameters = None - if hasattr(self, "help_tuple_%s" % keyword): - func = getattr(self, "help_tuple_%s" % keyword) - _, parameters, message = func() - - message = textwrap.wrap(message, help_column_width) - print(help_format % (keyword, parameters, message[0])) - - if len(message) > 1: - for line in message[1:]: - print(help_format % ("", "", line)) \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/libshell/shell_context.py b/ThirdParty/Ert/python/python/ert_gui/shell/libshell/shell_context.py deleted file mode 100644 index 7e52e46ed0..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/libshell/shell_context.py +++ /dev/null @@ -1,23 +0,0 @@ - -class ShellContext(object): - def __init__(self, shell): - super(ShellContext, self).__init__() - - self.__shell = shell - """ :type: Cmd """ - - self.__settings = {} - - - def shell(self): - """ @rtype: ert_gui.shell.ErtShell """ - return self.__shell - - def __setitem__(self, key, value): - self.__settings[key] = value - - def __getitem__(self, key): - return self.__settings[key] - - def __contains__(self, key): - return key in self.__settings \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/libshell/shell_function.py b/ThirdParty/Ert/python/python/ert_gui/shell/libshell/shell_function.py deleted file mode 100644 index 48c3b144ed..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/libshell/shell_function.py +++ /dev/null @@ -1,62 +0,0 @@ -from ert_gui.shell.libshell import extractFullArgument, autoCompleteListWithSeparator - - -class ShellFunction(object): - - def __init__(self, name, function, completer=None, help_arguments=None, help_message=None): - super(ShellFunction, self).__init__() - self.__parent = None - self.__name = name - - if function is None: - raise ValueError("Function can not be None for shell function '%s'" % name) - - self.__function = function - self.__completer = completer - - self.__help_arguments = help_arguments - self.__help_message = help_message if help_message is not None else "No help available!" - - - def setParent(self, parent): - if parent is None: - raise ValueError("Function target can not be None for shell function '%s'" % self.name) - - if not hasattr(parent, "getModelForFunction"): - raise ValueError("function target is missing method 'getModelForFunction(name)' for shell function '%s'" % self.name) - - if hasattr(parent, "do_%s" % self.name) or hasattr(parent, "complete_%s" % self.name) or hasattr(parent, "help_%s" % self.name) : - raise ValueError("function with name '%s' already exists for object '%s'" % (self.name, parent)) - - setattr(parent, "do_%s" % self.name, self.doFunction) - setattr(parent, "complete_%s" % self.name, self.completeFunction) - setattr(parent, "help_tuple_%s" % self.name, self.helpFunction) - - self.__parent = parent - - - def doFunction(self, line): - model = self.getModelForFunction() - self.__function(model, line.strip()) - - def completeFunction(self, text, line, begidx, endidx): - if self.__completer is not None: - if callable(self.__completer): - model = self.getModelForFunction() - return self.__completer(model, text, line, begidx, endidx) - else: - key = extractFullArgument(line, endidx) - return autoCompleteListWithSeparator(key, self.__completer) - - return [] - - def helpFunction(self): - return self.name, self.__help_arguments, self.__help_message - - def getModelForFunction(self): - return self.__parent.getModelForFunction(self.name) - - @property - def name(self): - return self.__name - diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/libshell/shell_path_tools.py b/ThirdParty/Ert/python/python/ert_gui/shell/libshell/shell_path_tools.py deleted file mode 100644 index d9322fb8cc..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/libshell/shell_path_tools.py +++ /dev/null @@ -1,26 +0,0 @@ -import os -from ert_gui.shell.libshell import containsAny, extractFullArgument, findRightMostSeparator - - -def pathify(head, tail): - path = os.path.join(head, tail) - if os.path.isdir(path): - return "%s/" % tail - return tail - -def getPossibleFilenameCompletions(text, separators="-"): - head, tail = os.path.split(text.strip()) - if head == "": # no head - head = "." - files = os.listdir(head) - - separator_pos = 0 - if containsAny(tail, separators): - separator_pos = findRightMostSeparator(tail, separators) + 1 - - return [pathify(head, f)[separator_pos:] for f in files if f.startswith(tail)] - - -def pathCompleter(model, text, line, begidx, endidx): - argument = extractFullArgument(line, endidx) - return getPossibleFilenameCompletions(argument) \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/libshell/shell_property.py b/ThirdParty/Ert/python/python/ert_gui/shell/libshell/shell_property.py deleted file mode 100644 index 6a8b8d2e3c..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/libshell/shell_property.py +++ /dev/null @@ -1,90 +0,0 @@ -from ert_gui.shell.libshell import extractFullArgument, autoCompleteListWithSeparator - -class ShellProperty(object): - def __init__(self, name, getter, setter=None, validator=None, completer=None, help_arguments=None, help_message=None, pretty_attribute=None): - super(ShellProperty, self).__init__() - self.__parent = None - - if getter is None: - raise ValueError("Getter function/property can not be None for shell property '%s'" % name) - - self.__setter = setter - self.__getter = getter - - self.__name = name - self.__pretty_attribute = name if pretty_attribute is None else pretty_attribute - - self.__help_arguments = help_arguments - self.__help_message = help_message if help_message is not None else "No help available!" - - self.__completer = completer - self.__validator = validator - - - - def setParent(self, parent): - if parent is None: - raise ValueError("Property target can not be None for shell property '%s'" % self.name) - - if not hasattr(parent, "getModelForProperty"): - raise ValueError("Property target is missing method 'getModelForProperty(name)' for shell property '%s'" % self.name) - - if hasattr(parent, "do_%s" % self.name) or hasattr(parent, "complete_%s" % self.name) or hasattr(parent, "help_%s" % self.name) : - raise ValueError("Property with name '%s' already exists for object '%s'" % (self.name, parent)) - - setattr(parent, "do_%s" % self.name, self.doFunction) - setattr(parent, "complete_%s" % self.name, self.completeFunction) - setattr(parent, "help_tuple_%s" % self.name, self.helpFunction) - - self.__parent = parent - - - def doFunction(self, line): - value = line.strip() - model = self.getModelForProperty() - if value == "": - if isinstance(self.__getter, property): - result = self.__getter.__get__(model) - else: - result = self.__getter(model) - print("%s = %s" % (self.__pretty_attribute, result)) - else: - try: - if self.__validator is not None: - value = self.__validator(model, value) - - if self.__setter is not None: - if isinstance(self.__setter, property): - self.__setter.__set__(model, value) - else: - self.__setter(model, value) - print("%s set to: %s" % (self.__pretty_attribute, value)) - else: - self.lastCommandFailed("Property '%s' is set to read only" % self.__pretty_attribute) - except ValueError as e: - self.lastCommandFailed(e.message) - - - def completeFunction(self, text, line, begidx, endidx): - if self.__completer is not None: - if callable(self.__completer): - model = self.getModelForProperty() - return self.__completer(model, text, line, begidx, endidx) - else: - key = extractFullArgument(line, endidx) - return autoCompleteListWithSeparator(key, self.__completer) - - return [] - - def helpFunction(self): - return self.name, self.__help_arguments, self.__help_message - - def getModelForProperty(self): - return self.__parent.getModelForProperty(self.name) - - def lastCommandFailed(self, message): - self.__parent.lastCommandFailed(message) - - @property - def name(self): - return self.__name diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/libshell/shell_tools.py b/ThirdParty/Ert/python/python/ert_gui/shell/libshell/shell_tools.py deleted file mode 100644 index c314de47a9..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/libshell/shell_tools.py +++ /dev/null @@ -1,133 +0,0 @@ -import fnmatch -from math import floor -import shlex - - -def autoCompleteList(text, items): - if not text: - completions = items - else: - completions = [item for item in items if str(item).lower().startswith(text.lower())] - return completions - -def containsAny(string, chars): - return True in [char in string for char in chars] - -def findRightMostSeparator(text, separators): - max_pos = 0 - - for separator in separators: - pos = text.rfind(separator) - max_pos = max(pos, max_pos) - - return max_pos - -def autoCompleteListWithSeparator(text, items, separators=":,@"): - if containsAny(text, separators): - auto_complete_list = autoCompleteList(text, items) - separator_pos = findRightMostSeparator(text, separators) - auto_complete_list = [item[separator_pos + 1:] for item in auto_complete_list] - else: - auto_complete_list = autoCompleteList(text, items) - - return auto_complete_list - - -def extractFullArgument(line, endidx): - last_space_index = line.rfind(" ", 0, endidx) - newstart = 0 if last_space_index == -1 else last_space_index - return line[newstart:endidx].strip() - - -def matchItems(line, items): - patterns = shlex.split(line) - - result_items = set() - - for pattern in patterns: - pattern_matches = set() - for item in items: - if fnmatch.fnmatch(item.lower(), pattern.lower()): # case-insensitive matching - pattern_matches.add(item) - - if len(pattern_matches) == 0: - print("Error: Name/Pattern '%s' does not match anything." % pattern) - else: - result_items = result_items | pattern_matches - - return result_items - - -def boolValidator(model, value): - trueness = value.lower() in ("yes", "true", "t", "1") - falseness = value.lower() in ("no", "false", "f", "0") - - if not (trueness or falseness): - raise ValueError("Unable to convert '%s' into a boolean expression true|false" % value) - - return trueness - - -def createFloatValidator(minimum=None, maximum=None): - def validate(model, value): - value = float(value) - if minimum is not None: - value = max(value, minimum) - - if maximum is not None: - value = min(value, maximum) - - return value - return validate - - -def createListValidator(items): - def validate(model, value): - value = value.lower() - for item in items: - if value == str(item).lower(): - return item - - raise ValueError("Value '%s' not in collection: %s" % (value, items)) - - return validate - -def splitArguments(line): - """ @rtype: list of str """ - return shlex.split(line) - -def widthAsPercentageOfConsoleWidth(percentage): - width, height = getTerminalSize() - return int(floor(percentage * width / 100.0)) - - -def getTerminalSize(): - """ - @rtype: tuple of (int,int) - @return: Console dimensions as: width, height - """ - import os - env = os.environ - - def ioctl_GWINSZ(fd): - try: - import fcntl, termios, struct, os - cr = struct.unpack('hh', fcntl.ioctl(fd, termios.TIOCGWINSZ, '1234')) - except: - return - return cr - - cr = ioctl_GWINSZ(0) or ioctl_GWINSZ(1) or ioctl_GWINSZ(2) - - if not cr: - try: - fd = os.open(os.ctermid(), os.O_RDONLY) - cr = ioctl_GWINSZ(fd) - os.close(fd) - except: - pass - - if not cr: - cr = (env.get('LINES', 25), env.get('COLUMNS', 80)) - return int(cr[1]), int(cr[0]) - diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/observations.py b/ThirdParty/Ert/python/python/ert_gui/shell/observations.py deleted file mode 100644 index c05a86d3b1..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/observations.py +++ /dev/null @@ -1,67 +0,0 @@ -import os - -from ert_gui.shell import assertConfigLoaded, ErtShellCollection -from ert_gui.shell.libshell import extractFullArgument, getPossibleFilenameCompletions - - -class Observations(ErtShellCollection): - def __init__(self, parent): - super(Observations, self).__init__("observations", parent) - - self.addShellFunction(name="list", - function=Observations.list, - help_message="List all observation keys.") - - self.addShellFunction(name="clear", - function=Observations.clear, - help_message="Remove all observations.") - - self.addShellFunction(name="load", - function=Observations.load, - completer=Observations.completeLoad, - help_arguments="", - help_message="Add observations from the specified file.") - - self.addShellFunction(name="reload", - function=Observations.reload, - completer=Observations.completeReload, - help_arguments="", - help_message="Perform a clear before adding observations from the specified file.") - - - @assertConfigLoaded - def list(self, line): - keys = [obs_vector.getObservationKey() for obs_vector in self.ert().getObservations()] - print("Observation keys:") - self.columnize(keys) - - @assertConfigLoaded - def clear(self, line): - self.ert().getObservations().clear() - - @assertConfigLoaded - def load(self, config_file): - if os.path.exists(config_file) and os.path.isfile(config_file): - # This will append observations; alternatively reload() - # can be used to clear the current observations first. - self.ert().loadObservations( config_file , clear = False ) - else: - self.lastCommandFailed("Observations file '%s' not found!\n" % config_file) - - @assertConfigLoaded - def reload(self, config_file): - if os.path.exists(config_file) and os.path.isfile(config_file): - # If clear is False the new observations will be added to the existing. - self.ert().loadObservations( config_file , clear = True ) - else: - self.lastCommandFailed("Observations file '%s' not found!\n" % config_file) - - @assertConfigLoaded - def completeLoad(self, text, line, begidx, endidx): - argument = extractFullArgument(line, endidx) - return getPossibleFilenameCompletions(argument) - - @assertConfigLoaded - def completeReload(self, text, line, begidx, endidx): - argument = extractFullArgument(line, endidx) - return getPossibleFilenameCompletions(argument) diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/plot_settings.py b/ThirdParty/Ert/python/python/ert_gui/shell/plot_settings.py deleted file mode 100644 index a2c195c8e3..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/plot_settings.py +++ /dev/null @@ -1,172 +0,0 @@ -from ert.enkf.enkf_fs_manager import naturalSortKey -from ert_gui.plottery.plot_config import PlotConfig -from ert_gui.shell import assertConfigLoaded, ErtShellCollection -from ert_gui.shell.libshell import autoCompleteList, boolValidator, pathCompleter, splitArguments -from ert_gui.shell.libshell.shell_tools import matchItems - - -def plotPathValidator(model, line): - arguments = splitArguments(line) - - if len(arguments) == 1: - return arguments[0] # todo: check if exists and is file or directory for example - else: - raise ValueError("Can only set one path. If you require spaces in your path, " - "surround it with quotes: \"path with space\".") - - -class PlotSettings(ErtShellCollection): - def __init__(self, parent): - super(PlotSettings, self).__init__("plot_settings", parent) - - self.__cases = None - self.__plot_config = PlotConfig(None) - self.shellContext()["plot_settings"] = self - - self.addShellFunction(name="current", - function=PlotSettings.current, - help_message="Shows the selected plot source case(s).") - - self.addShellFunction(name="reset_title", - function=PlotSettings.resetTitle, - help_message="Reset plot title back to default.") - - self.addShellFunction(name="select", - function=PlotSettings.select, - completer=PlotSettings.completeSelect, - help_arguments="[case_1..case_n]", - help_message="Select one or more cases as default plot sources. Empty resets to current case.") - - self.addShellProperty(name="path", - getter=PlotSettings.getPath, - setter=PlotSettings.setPath, - validator=plotPathValidator, - completer=pathCompleter, - help_arguments="[path]", - help_message="Show or set the plot output path", - pretty_attribute="Plot output path") - - self.addShellProperty(name="title", - getter=PlotConfig.title, - setter=PlotConfig.setTitle, - help_arguments="[new_title]", - help_message="Show or set the title of the plot", - pretty_attribute="Title", - model=self.__plot_config) - - self.addShellProperty(name="x_label", - getter=PlotConfig.xLabel, - setter=PlotConfig.setXLabel, - help_arguments="[new_label]", - help_message="Show or set the X label of the plot", - pretty_attribute="X label", - model=self.__plot_config) - - self.addShellProperty(name="y_label", - getter=PlotConfig.yLabel, - setter=PlotConfig.setYLabel, - help_arguments="[new_label]", - help_message="Show or set the Y label of the plot", - pretty_attribute="Y label", - model=self.__plot_config) - - self.addShellProperty(name="grid", - getter=PlotConfig.isGridEnabled, - setter=PlotConfig.setGridEnabled, - validator=boolValidator, - completer=["true", "false"], - help_arguments="[true|false]", - help_message="Show or set the grid visibility", - pretty_attribute="Grid visibility", - model=self.__plot_config) - - self.addShellProperty(name="legend", - getter=PlotConfig.isLegendEnabled, - setter=PlotConfig.setLegendEnabled, - validator=boolValidator, - completer=["true", "false"], - help_arguments="[true|false]", - help_message="Show or set the legend visibility", - pretty_attribute="Legend visibility", - model=self.__plot_config) - - self.addShellProperty(name="connection_lines", - getter=PlotConfig.isDistributionLineEnabled, - setter=PlotConfig.setDistributionLineEnabled, - validator=boolValidator, - completer=["true", "false"], - help_arguments="[true|false]", - help_message="Show or set the connection lines visibility", - pretty_attribute="Connection Line visibility", - model=self.__plot_config) - - self.addShellProperty(name="refcase", - getter=PlotConfig.isRefcaseEnabled, - setter=PlotConfig.setRefcaseEnabled, - validator=boolValidator, - completer=["true", "false"], - help_arguments="[true|false]", - help_message="Show or set the refcase visibility", - pretty_attribute="Refcase visibility", - model=self.__plot_config) - - self.addShellProperty(name="observations", - getter=PlotConfig.isObservationsEnabled, - setter=PlotConfig.setObservationsEnabled, - validator=boolValidator, - completer=["true", "false"], - help_arguments="[true|false]", - help_message="Show or set the observations visibility", - pretty_attribute="Observations visibility", - model=self.__plot_config) - - - def getCurrentPlotCases(self): - """ @rtype: list of str """ - - if self.__cases is None: - case_name = self.ert().getEnkfFsManager().getCurrentFileSystem().getCaseName() - return [case_name] - - return self.__cases - - def plotConfig(self): - return self.__plot_config - - @assertConfigLoaded - def current(self, line): - keys = self.getCurrentPlotCases() - self.columnize(keys) - - @assertConfigLoaded - def select(self, line): - matched_cases = matchItems(line, self.getAllCaseList()) - - if len(matched_cases) > 0: - self.__cases = sorted(list(matched_cases), key=naturalSortKey) - else: - if len(line) > 0: - self.lastCommandFailed("No valid case names provided: %s" % line) - print("Case reset to default: %s" % self.ert().getEnkfFsManager().getCurrentFileSystem().getCaseName()) - self.__cases = None - - @assertConfigLoaded - def completeSelect(self, text, line, begidx, endidx): - return autoCompleteList(text, self.getAllCaseList()) - - def getAllCaseList(self): - fs_manager = self.ert().getEnkfFsManager() - all_case_list = fs_manager.getCaseList() - all_case_list = [case for case in all_case_list if not case.startswith(".")] - return all_case_list - - @assertConfigLoaded - def getPath(self): - return self.ert().plotConfig().getPath() - - @assertConfigLoaded - def setPath(self, path): - self.ert().plotConfig().setPath(path) - - def resetTitle(self, line): - self.plotConfig().setTitle(None) diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/plugins.py b/ThirdParty/Ert/python/python/ert_gui/shell/plugins.py deleted file mode 100644 index 275eaface6..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/plugins.py +++ /dev/null @@ -1,190 +0,0 @@ -import inspect -import time -from ert.job_queue import ErtScript, CancelPluginException -from ert_gui.shell import assertConfigLoaded, ErtShellCollection -from ert_gui.shell.libshell import splitArguments, autoCompleteList - - -class Plugins(ErtShellCollection): - def __init__(self, parent): - super(Plugins, self).__init__("plugins", parent) - - self.addShellFunction(name="list", - function=Plugins.list, - help_message="Shows a list of all available plugins.") - - self.addShellFunction(name="help", - function=Plugins.help, - completer=Plugins.completeHelp, - help_arguments="", - help_message="Shows help for the specified plugin if available.") - - self.addShellFunction(name="run", - function=Plugins.run, - completer=Plugins.completeRun, - help_arguments=" [args]", - help_message="Run a named plugin with either arguments or default input GUI.") - - self.addShellFunction(name="arguments", - function=Plugins.arguments, - completer=Plugins.completeArguments, - help_arguments="", - help_message="Shows a list of expected arguments for a specified plugin.") - - - @assertConfigLoaded - def list(self, line): - plugins = self.getPluginNames() - if len(plugins) > 0: - self.columnize(plugins) - else: - print("No plugins available.") - - - @assertConfigLoaded - def run(self, line): - arguments = splitArguments(line) - - if len(arguments) < 1: - print("Error: This keyword requires a name of a plugin to run.") - else: - plugin_name = arguments[0] - plugin_job = self.getWorkflowJob(plugin_name) - - if plugin_job is not None: - try: - script = self.getScript(plugin_job) - if len(arguments) > 1: - arguments = arguments[1:] - else: - arguments = script.getArguments(None) - - now = time.time() - result = plugin_job.run(self.ert(), arguments) - - self.shellContext()["debug"].setLastPluginResult(result) - - diff = time.time() - now - print("Plugin running time: %d seconds" % int(diff)) - - print(result) - except CancelPluginException: - print("Plugin cancelled before execution!") - else: - self.lastCommandFailed("Unknown plugin: '%s'" % plugin_name) - - - @assertConfigLoaded - def completeRun(self, text, line, begidx, endidx): - arguments = splitArguments(line) - - if len(arguments) > 2 or len(arguments) == 2 and not text: - return [] - return autoCompleteList(text, self.getPluginNames()) - - - @assertConfigLoaded - def arguments(self, plugin_name): - plugin_job = self.getWorkflowJob(plugin_name) - - if plugin_job is not None: - script, arguments = self.getScriptAndArguments(plugin_job) - - if len(arguments) > 1: - print("The plugin: '%s' takes the following required <...> and/or optional [...] arguments:\n" % plugin_name) - arguments_format = " %-25s %-35s %-20s" - print(arguments_format % ("Arguments", "Default Value", "Type")) - - for argument in arguments: - - if not argument["optional"]: - argument_format = "<%s>" - else: - argument_format = "[%s]" - - print(arguments_format % (argument_format % argument["name"], argument["default"], argument["type"].__name__)) - else: - print("Plugin has no arguments.") - else: - self.lastCommandFailed("Unknown plugin: '%s'" % plugin_name) - - @assertConfigLoaded - def completeArguments(self, text, line, begidx, endidx): - arguments = splitArguments(line) - - if len(arguments) > 2 or len(arguments) == 2 and not text: - return [] - return autoCompleteList(text, self.getPluginNames()) - - - @assertConfigLoaded - def help(self, line): - arguments = splitArguments(line) - - if len(arguments) < 1: - self.lastCommandFailed("This keyword requires a name of a plugin to run.") - else: - plugin_name = arguments[0] - plugin_job = self.getWorkflowJob(plugin_name) - - if plugin_job is not None: - script = self.getScript(plugin_job) - - print(script.__doc__) - else: - self.lastCommandFailed("Unknown plugin: '%s'" % plugin_name) - - - @assertConfigLoaded - def completeHelp(self, text, line, begidx, endidx): - arguments = splitArguments(line) - - if len(arguments) > 2 or len(arguments) == 2 and not text: - return [] - return autoCompleteList(text, self.getPluginNames()) - - def getPluginNames(self): - plugin_jobs = self.ert().getWorkflowList().getPluginJobs() - return [plugin.name() for plugin in plugin_jobs] - - - def getWorkflowJob(self, plugin_name): - """ @rtype: WorkflowJob """ - plugin_name = plugin_name.strip() - plugin_jobs = self.ert().getWorkflowList().getPluginJobs() - plugin_job = next((job for job in plugin_jobs if job.name() == plugin_name), None) - return plugin_job - - - def getScript(self, plugin_job): - script_obj = ErtScript.loadScriptFromFile(plugin_job.getInternalScriptPath()) - script = script_obj(self.ert()) - return script - - def getScriptAndArguments(self, plugin_job): - script = self.getScript(plugin_job) - arg_spec = inspect.getargspec(script.run) - - arguments = [] - - if len(arg_spec.args) > 1: - - for argument_name, argument_type in zip(arg_spec.args[1:], plugin_job.argumentTypes()): - arguments.append({ - "name": argument_name, - "type": argument_type, - "default": "", - "optional": False - }) - - if arg_spec.defaults is not None: - for index, value in enumerate(reversed(arg_spec.defaults)): - arguments[len(arguments) - 1 - index]["default"] = value - - min_arg_count = plugin_job.minimumArgumentCount() - - for index, argument in enumerate(arguments): - if index >= min_arg_count: - argument["optional"] = True - - return script, arguments diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/results.py b/ThirdParty/Ert/python/python/ert_gui/shell/results.py deleted file mode 100644 index 9b6a5c34c7..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/results.py +++ /dev/null @@ -1,50 +0,0 @@ -from ert.util import BoolVector -from ert_gui.shell import assertConfigLoaded, ErtShellCollection -from ert_gui.shell.libshell import splitArguments - - -class Results(ErtShellCollection): - def __init__(self, parent): - super(Results, self).__init__("results", parent) - - self.addShellFunction(name="runpath", function=Results.runpath, help_message="Shows the current runpath.") - self.addShellFunction(name="load", function=Results.load, completer=Results.completeLoad, help_arguments="", help_message="Load results from the specified realizations.") #todo iterations - - @assertConfigLoaded - def runpath(self, args): - runpath = self.ert().getModelConfig().getRunpathAsString() - print("Runpath set to: %s" % runpath) - - - @assertConfigLoaded - def load(self, args): - arguments = splitArguments(args) - - if len(arguments) < 1: - self.lastCommandFailed("Loading requires a realization mask.") - return False - - realization_count = self.ert().getEnsembleSize() - - mask = BoolVector(False, realization_count) - mask_success = mask.updateActiveMask(arguments[0]) - - if not mask_success: - self.lastCommandFailed("The realization mask: '%s' is not valid." % arguments[0]) - return False - - fs = self.ert().getEnkfFsManager().getCurrentFileSystem() - self.ert().loadFromForwardModel(mask, 0, fs) - - - @assertConfigLoaded - def completeLoad(self, text, line, begidx, endidx): - arguments = splitArguments(line) - - if len(arguments) > 2 or len(arguments) == 2 and not text: - return [] - - if not text: - return ["0-%d" % self.ert().getEnsembleSize()] # todo should generate based on realization directories. - - return [] diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/server.py b/ThirdParty/Ert/python/python/ert_gui/shell/server.py deleted file mode 100644 index 693b6271c7..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/server.py +++ /dev/null @@ -1,105 +0,0 @@ -import socket -from threading import Thread - -from ert.server import ErtRPCServer -from ert_gui.shell import assertConfigLoaded, ErtShellCollection - - -class Server(ErtShellCollection): - def __init__(self, parent): - super(Server, self).__init__("server", parent) - self.shellContext()["server_settings"] = self - - self.addShellFunction(name="start", - function=Server.startServer, - help_message="Start the ERT RPC Server") - - self.addShellFunction(name="stop", - function=Server.stopServer, - help_message="Stop the ERT RPC Server") - - self.addShellFunction(name="inspect", - function=Server.inspect, - help_message="Shows information about the current job queue") - - self.addShellProperty(name="hostname", - getter=Server.getHost, - setter=Server.setHost, - help_arguments="[hostname]", - help_message="Show or set the server hostname", - pretty_attribute="Hostname") - - self.addShellProperty(name="port", - getter=Server.getPort, - setter=Server.setPort, - help_arguments="[port]", - help_message="Show or set the server port number (0 = automatic)", - pretty_attribute="Port") - - self._server = None - """ :type: ErtRPCServer """ - - self._hostname = "localhost" - self._port = 0 - - def getHost(self): - return self._hostname - - def setHost(self, hostname): - self._hostname = hostname - - def getPort(self): - return self._port - - def setPort(self, port): - self._port = int(port) - - @assertConfigLoaded - def startServer(self, line): - port = self._port - host = self._hostname - - if self._server is None: - try: - self._server = ErtRPCServer(self.ert(), host=host, port=port) - except socket.error as e: - print("Unable to start the server on port: %d" % port) - else: - thread = Thread(name="Shell Server Thread") - thread.daemon = True - thread.run = self._server.start - thread.start() - print("Server running on host: '%s' and port: %d" % (self._server.host, self._server.port)) - else: - print("A server is already running at host: '%s' and port: %d" % (self._server.host, self._server.port)) - - def _stopServer(self): - if self._server is not None: - self._server.stop() - self._server = None - print("Server stopped") - - def stopServer(self, line): - if self._server is not None: - self._stopServer() - else: - print("No server to stop") - - def cleanup(self): - self._stopServer() - ErtShellCollection.cleanup(self) - - def inspect(self, line): - if self._server is not None: - if self._server.isRunning(): - print("Waiting..: %d" % self._server.getWaitingCount()) - print("Running..: %d" % self._server.getRunningCount()) - print("Failed...: %d" % self._server.getFailedCount()) - print("Succeeded: %d" % self._server.getSuccessCount()) - print("Batch#...: %d" % self._server.getBatchNumber()) - else: - print("Server is not running any simulations") - else: - print("No server is not available") - - diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/shell_plot.py b/ThirdParty/Ert/python/python/ert_gui/shell/shell_plot.py deleted file mode 100644 index 293b9daf3d..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/shell_plot.py +++ /dev/null @@ -1,236 +0,0 @@ -import ert_gui.plottery.plots as plots - -import matplotlib.pyplot as plt - -from ert_gui.plottery.plot_config_factory import PlotConfigFactory -from ert_gui.shell import assertConfigLoaded -from ert_gui.plottery import PlotConfig, PlotContext -from ert_gui.shell.libshell import matchItems, extractFullArgument, autoCompleteListWithSeparator - - -class ShellPlot(object): - @classmethod - def _createPlotContext(cls, shell_context, data_gatherer, key): - """ - :type shell_context: ShellContext - :param data_gatherer: PlotDataGatherer - :param key: str - """ - figure = plt.figure() - figure.set_tight_layout(True) - cases = shell_context["plot_settings"].getCurrentPlotCases() - - plot_config = PlotConfig(key) - #plot settings should keep of track of single attributes and only apply the changed ones... - plot_config.copyConfigFrom(shell_context["plot_settings"].plotConfig()) - - if plot_config.isUnnamed(): - plot_config.setTitle(key) - - #Apply data type specific changes for statistics... - PlotConfigFactory.updatePlotConfigForKey(shell_context.ert(), key, plot_config) - - plot_context = PlotContext(shell_context.ert(), figure, plot_config, cases, key, data_gatherer) - return plot_context - - @classmethod - def plotEnsemble(cls, shell_context, data_gatherer, key): - """ - :type shell_context: ShellContext - :param data_gatherer: PlotDataGatherer - :param key: str - """ - plot_context = cls._createPlotContext(shell_context, data_gatherer, key) - plots.plotEnsemble(plot_context) - - @classmethod - def plotQuantiles(cls, shell_context, data_gatherer, key): - """ - :type shell_context: ShellContext - :param data_gatherer: PlotDataGatherer - :param key: str - """ - plot_context = cls._createPlotContext(shell_context, data_gatherer, key) - plots.plotStatistics(plot_context) - - @classmethod - def plotHistogram(cls, shell_context, data_gatherer, key): - """ - :type shell_context: ShellContext - :param data_gatherer: PlotDataGatherer - :param key: str - """ - plot_context = cls._createPlotContext(shell_context, data_gatherer, key) - plots.plotHistogram(plot_context) - - @classmethod - def plotDistribution(cls, shell_context, data_gatherer, key): - """ - :type shell_context: ShellContext - :param data_gatherer: PlotDataGatherer - :param key: str - """ - plot_context = cls._createPlotContext(shell_context, data_gatherer, key) - plots.plotDistribution(plot_context) - - @classmethod - def plotGaussianKDE(cls, shell_context, data_gatherer, key): - """ - :type shell_context: ShellContext - :param data_gatherer: PlotDataGatherer - :param key: str - """ - plot_context = cls._createPlotContext(shell_context, data_gatherer, key) - plots.plotGaussianKDE(plot_context) - - @classmethod - def plotCrossCaseStatistics(cls, shell_context, data_gatherer, key): - """ - :type shell_context: ShellContext - :param data_gatherer: PlotDataGatherer - :param key: str - """ - plot_context = cls._createPlotContext(shell_context, data_gatherer, key) - plots.plotCrossCaseStatistics(plot_context) - - @classmethod - def _checkForRequiredMethods(cls, instance): - if not hasattr(instance, "fetchSupportedKeys"): - raise NotImplementedError("Class must implement: fetchSupportedKeys()") - - if not hasattr(instance, "plotDataGatherer"): - raise NotImplementedError("Class must implement: plotDataGatherer()") - - @classmethod - def _createDoFunction(cls, plot_function, name): - def do_function(self, line): - keys = matchItems(line, self.fetchSupportedKeys()) - - if len(keys) == 0: - self.lastCommandFailed("Must have at least one %s key" % name) - return False - - for key in keys: - pdg = self.plotDataGatherer() - plot_function(self.shellContext(), pdg, key) - - return assertConfigLoaded(do_function) - - @classmethod - def _createCompleteFunction(cls): - def complete_function(self, text, line, begidx, endidx): - key = extractFullArgument(line, endidx) - return autoCompleteListWithSeparator(key, self.fetchSupportedKeys()) - - complete_function = assertConfigLoaded(complete_function) - return complete_function - - @classmethod - def addHistogramPlotSupport(cls, instance, name): - """ - :type instance: ert_gui.shell.libshell.ShellCollection - """ - cls._checkForRequiredMethods(instance) - - instance.addShellFunction(name="histogram", - function=cls._createDoFunction(ShellPlot.plotHistogram, name), - completer=cls._createCompleteFunction(), - help_arguments=" [key_2..key_n]", - help_message="Plot a histogram for the specified %s key(s)." % name) - - @classmethod - def addGaussianKDEPlotSupport(cls, instance, name): - """ - :type instance: ert_gui.shell.ShellFunction - """ - cls._checkForRequiredMethods(instance) - - instance.addShellFunction(name="density", - function=cls._createDoFunction(ShellPlot.plotGaussianKDE, name), - completer=cls._createCompleteFunction(), - help_arguments=" [key_2..key_n]", - help_message="Plot a GaussianKDE plot for the specified %s key(s)." % name) - - @classmethod - def addEnsemblePlotSupport(cls, instance, name): - """ - :type instance: ert_gui.shell.ShellFunction - """ - cls._checkForRequiredMethods(instance) - - instance.addShellFunction(name="plot", - function=cls._createDoFunction(ShellPlot.plotEnsemble, name), - completer=cls._createCompleteFunction(), - help_arguments=" [key_2..key_n]", - help_message="Plot an ensemble plot for the specified %s key(s)." % name) - - @classmethod - def addQuantilesPlotSupport(cls, instance, name): - """ - :type instance: ert_gui.shell.ShellFunction - """ - cls._checkForRequiredMethods(instance) - - instance.addShellFunction(name="plot_quantile", - function=cls._createDoFunction(ShellPlot.plotQuantiles, name), - completer=cls._createCompleteFunction(), - help_arguments=" [key_2..key_n]", - help_message="Plot a different statistics for the specified %s key(s)." % name) - - @classmethod - def addDistributionPlotSupport(cls, instance, name): - """ - :type instance: ert_gui.shell.ShellFunction - """ - cls._checkForRequiredMethods(instance) - instance.addShellFunction(name="distribution", - function=cls._createDoFunction(ShellPlot.plotDistribution, name), - completer=cls._createCompleteFunction(), - help_arguments=" [key_2..key_n]", - help_message="Plot the distribution plot for the specified %s key(s)." % name) - - @classmethod - def addCrossCaseStatisticsPlotSupport(cls, instance, name): - """ - :type instance: ert_gui.shell.ShellFunction - """ - cls._checkForRequiredMethods(instance) - instance.addShellFunction(name="cross_case_statistics", - function=cls._createDoFunction(ShellPlot.plotCrossCaseStatistics, name), - completer=cls._createCompleteFunction(), - help_arguments=" [key_2..key_n]", - help_message="Plot the cross case statistics plot for the specified %s key(s)." % name) - - @classmethod - def _createDoPrintFunction(cls, name): - def do_function(self, line): - keys = matchItems(line, self.fetchSupportedKeys()) - - if len(keys) == 0: - self.lastCommandFailed("Must have at least one %s key" % name) - return False - - case_name = self.shellContext().ert().getEnkfFsManager().getCurrentFileSystem().getCaseName() - - for key in keys: - pdg = self.plotDataGatherer() - if pdg.canGatherDataForKey(key): - data = pdg.gatherData(self.shellContext().ert(), case_name, key) - print(data) - else: - self.lastCommandFailed("Unable to print data for key: %s" % key) - - return assertConfigLoaded(do_function) - - @classmethod - def addPrintSupport(cls, instance, name): - """ - :type instance: ert_gui.shell.ShellFunction - """ - cls._checkForRequiredMethods(instance) - - instance.addShellFunction(name="print", - function=cls._createDoPrintFunction(name), - completer=cls._createCompleteFunction(), - help_arguments=" [key_2..key_n]", - help_message="Print the values for the specified %s key(s)." % name) diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/simulations.py b/ThirdParty/Ert/python/python/ert_gui/shell/simulations.py deleted file mode 100644 index b8ca252347..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/simulations.py +++ /dev/null @@ -1,58 +0,0 @@ -import time -from datetime import datetime - -from ert.enkf import EnkfSimulationRunner -from ert.enkf.enums import HookRuntime -from ert_gui.shell import assertConfigLoaded, ErtShellCollection - - -class Simulations(ErtShellCollection): - def __init__(self, parent): - super(Simulations, self).__init__("simulations", parent) - self.addShellFunction(name="settings", - function=Simulations.settings, - help_message="Show simulations settings.") - - self.addShellFunction(name="ensemble_experiment", - function=Simulations.ensembleExperiment, - help_message="Run Ensemble Experiment.") - - @assertConfigLoaded - def settings(self, line): - runpath = self.ert().getModelConfig().getRunpathAsString() - - iteration_count = self.ert().analysisConfig().getAnalysisIterConfig().getNumIterations() - realizations = self.ert().getEnsembleSize() - - print("Runpath: %s" % runpath) - print("Iteration count: %d" % iteration_count) - print("Realization count: %d" % realizations) - - @assertConfigLoaded - def ensembleExperiment(self, line): - simulation_runner = EnkfSimulationRunner(self.ert()) - - now = time.time() - print("Ensemble Experiment started at: %s" % datetime.now().isoformat(sep=" ")) - - iteration_count = 0 - active_realization_mask = BoolVector(default_value = True, initial_size = self.ert().getEnsembleSize()) - simulation_runner.createRunPath(active_realization_mask, iteration_count) - - simulation_runner.runWorkflows(HookRuntime.PRE_SIMULATION) - - print("Start simulations!") - num_successful_realizations = simulation_runner.runEnsembleExperiment() - - success = self.ert().analysisConfig().haveEnoughRealisations(num_successful_realizations, self.ert().getEnsembleSize()) - if not success: - print("Error: Number of successful realizations is too low.\nYou can allow more failed realizations by setting / changing the MIN_REALIZATIONS configuration element!") - return - - print("Ensemble Experiment post processing!") - simulation_runner.runWorkflows(HookRuntime.POST_SIMULATION) - - print("Ensemble Experiment completed at: %s" % datetime.now().isoformat(sep=" ")) - - diff = time.time() - now - print("Running time: %d seconds" % int(diff)) diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/smoother.py b/ThirdParty/Ert/python/python/ert_gui/shell/smoother.py deleted file mode 100644 index cef8f72704..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/smoother.py +++ /dev/null @@ -1,84 +0,0 @@ -from ert.enkf import ESUpdate -from ert_gui.shell import assertConfigLoaded, ErtShellCollection -from ert_gui.shell.libshell import splitArguments, createFloatValidator - - -class Smoother(ErtShellCollection): - def __init__(self, parent): - super(Smoother, self).__init__("smoother", parent) - - self.addShellProperty(name="overlap_alpha", - getter=Smoother.getOverlapAlpha, - setter=Smoother.setOverlapAlpha, - validator=createFloatValidator(), - completer=None, - help_arguments="[alpha_value]", - help_message="Show or set the overlap alpha.", - pretty_attribute="Overlap Alpha") - - self.addShellProperty(name="std_cutoff", - getter=Smoother.getStdCutOff, - setter=Smoother.setStdCutOff, - validator=createFloatValidator(minimum=0), - completer=None, - help_arguments="[cutoff_value]", - help_message="Show or set the standard deviation cutoff value (>0).", - pretty_attribute="Standard Deviation Cutoff") - - self.addShellProperty(name="global_std_scaling", - getter=Smoother.getGlobalStdScaling, - setter=Smoother.setGlobalStdScaling, - validator=createFloatValidator(minimum=0), - completer=None, - help_arguments="[std_scaling]", - help_message="Show or set the global standard deviation scaling value (>0) applied to updates.", - pretty_attribute="Global Standard Deviation Scaling") - - self.addShellFunction(name="update", - function=Smoother.update, - help_arguments=" ", - help_message="Set a variable value.") - - - @assertConfigLoaded - def analysisConfig(self): - """ @rtype: ert.analysis.AnalysisConfig """ - return self.ert().analysisConfig() - - def setOverlapAlpha(self, value): - self.analysisConfig().setEnkfAlpha(value) - - def getOverlapAlpha(self): - return self.analysisConfig().getEnkfAlpha() - - def setStdCutOff(self, value): - self.analysisConfig().setStdCutoff(value) - - def getStdCutOff(self): - return self.analysisConfig().getStdCutoff() - - def setGlobalStdScaling(self, value): - self.analysisConfig().setGlobalStdScaling(value) - - def getGlobalStdScaling(self): - return self.analysisConfig().getGlobalStdScaling() - - @assertConfigLoaded - def update(self, line): - arguments = splitArguments(line) - - if len(arguments) == 1: - case_name = arguments[0] - ert = self.ert() - fs_manager = ert.getEnkfFsManager() - es_update = ESUpdate( ert ) - - target_fs = fs_manager.getFileSystem(case_name) - source_fs = fs_manager.getCurrentFileSystem( ) - success = es_update.smootherUpdate( source_fs , target_fs ) - - if not success: - self.lastCommandFailed("Unable to perform update") - - else: - self.lastCommandFailed("Expected one argument: received: '%s'" % line) diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/storage.py b/ThirdParty/Ert/python/python/ert_gui/shell/storage.py deleted file mode 100644 index ef08aeeb32..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/storage.py +++ /dev/null @@ -1,90 +0,0 @@ -import ert -from ert_gui.shell import ErtShellCollection -from ert_gui.shell.libshell import splitArguments, getPossibleFilenameCompletions, extractFullArgument - - -import ctypes -import os - -NO_SORT = 0 -STRING_SORT = 1 -OFFSET_SORT = 2 - -import cwrap.clib as clib -UTIL_LIB = ert.load("libert_util") - -UTIL_LIB.block_fs_is_mount.restype = ctypes.c_bool -UTIL_LIB.block_fs_mount.restype = ctypes.c_void_p -UTIL_LIB.block_fs_alloc_filelist.restype = ctypes.c_void_p -UTIL_LIB.block_fs_close.restype = ctypes.c_void_p - -UTIL_LIB.vector_get_size.restype = ctypes.c_int -UTIL_LIB.vector_iget_const.restype = ctypes.c_void_p -UTIL_LIB.vector_free.restype = ctypes.c_void_p - -UTIL_LIB.user_file_node_get_filename.restype = ctypes.c_char_p -UTIL_LIB.user_file_node_get_data_size.restype = ctypes.c_int -UTIL_LIB.user_file_node_get_node_offset.restype = ctypes.c_long - -class Storage(ErtShellCollection): - def __init__(self, parent): - super(Storage, self).__init__("storage", parent) - - self.addShellFunction(name="ls", - function=Storage.ls, - completer=Storage.completeLs, - help_arguments=" [wildcard_pattern]", - help_message="Will list all elements in 'block_file' matching optional 'wildcard_pattern'") - - def ls(self, line): - arguments = splitArguments(line) - - if len(arguments) == 0: - self.lastCommandFailed("A 'block file' is required.") - else: - block_file = arguments[0] - pattern = None if len(arguments) == 1 else arguments[1] - - if not os.path.isfile(block_file): - self.lastCommandFailed("The path: '%s' is not a file." % block_file) - else: - if not UTIL_LIB.block_fs_is_mount(block_file): - _, filename = os.path.split(block_file) - self.lastCommandFailed("The file: '%s' is not a block mount file." % filename) - else: - block_fs = UTIL_LIB.block_fs_mount(block_file, 1, 0, 1, 0, False, True, False) - files = UTIL_LIB.block_fs_alloc_filelist(block_fs, pattern, OFFSET_SORT, False) - - file_count = UTIL_LIB.vector_get_size(files) - - if file_count > 0: - fmt = " %-40s %10d %10d" - print(" %-40s %10s %10s" % ("Keyword", "Size", "Offset")) - - for index in range(file_count): - node = UTIL_LIB.vector_iget_const(files, index) - node_filename = UTIL_LIB.user_file_node_get_filename(node) - node_size = UTIL_LIB.user_file_node_get_data_size(node) - node_offset = UTIL_LIB.user_file_node_get_node_offset(node) - print(fmt % (node_filename, node_size, node_offset)) - - UTIL_LIB.vector_free(files) - UTIL_LIB.block_fs_close(block_fs) - - - def completeLs(self, text, line, begidx, endidx): - arguments = splitArguments(line) - last_argument = extractFullArgument(line, endidx) - - if len(arguments) == 1 and len(text) == 0: - ert = self.ert() - if ert is not None: - return [ert.getModelConfig().getEnspath() + os.path.sep] - else: - return getPossibleFilenameCompletions("") - elif len(arguments) == 2 and len(last_argument) > 0: - return getPossibleFilenameCompletions(last_argument) - elif len(arguments) == 3 and len(text) > 0: - return [] # pattern completion... - else: - return [] diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/summary_keys.py b/ThirdParty/Ert/python/python/ert_gui/shell/summary_keys.py deleted file mode 100644 index 1d915bd505..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/summary_keys.py +++ /dev/null @@ -1,95 +0,0 @@ -from ert_gui.plottery import PlotDataGatherer as PDG -from ert_gui.shell import assertConfigLoaded, ShellPlot, ErtShellCollection -from ert_gui.shell.libshell import splitArguments - - -class SummaryKeys(ErtShellCollection): - def __init__(self, parent): - super(SummaryKeys, self).__init__("summary", parent) - - self.addShellFunction(name="list", - function=SummaryKeys.list, - help_message="Shows a list of all available Summary keys. (* = with observations)") - - self.addShellFunction(name="observations", - function=SummaryKeys.observations, - help_message= "Shows a list of all available Summary key observations.") - - self.addShellFunction(name="matchers", - function=SummaryKeys.matchers, - help_message="Shows a list of all Summary keys that the ensemble will match " - "against during simulations and manual load.") - - self.addShellFunction(name="add_matcher", - function=SummaryKeys.add_matcher, - help_arguments="", - help_message="Add a matcher to the Summary key matcher set.") - - self.__plot_data_gatherer = None - - ShellPlot.addPrintSupport(self, "Summary") - ShellPlot.addEnsemblePlotSupport(self, "Summary") - ShellPlot.addQuantilesPlotSupport(self, "Summary") - - - @assertConfigLoaded - def list(self, line): - keys = self.summaryKeys() - observation_keys = self.summaryObservationKeys() - - result = ["*%s" % key if key in observation_keys else " %s" % key for key in keys] - - self.columnize(result) - - @assertConfigLoaded - def observations(self, line): - keys = self.summaryKeys() - - observation_keys = [] - for key in keys: - obs_keys = self.ert().ensembleConfig().getNode(key).getObservationKeys() - observation_keys.extend(obs_keys) - - self.columnize(observation_keys) - - @assertConfigLoaded - def matchers(self, line): - ensemble_config = self.ert().ensembleConfig() - summary_key_matcher = ensemble_config.getSummaryKeyMatcher() - keys = sorted(["!%s" % key if summary_key_matcher.isRequired(key) else " %s" % key for key in summary_key_matcher.keys()]) - - self.columnize(keys) - - @assertConfigLoaded - def add_matcher(self, line): - args = splitArguments(line) - - if len(args) < 1: - self.lastCommandFailed("A Summary key is required.") - return False - - self.ert().ensembleConfig().getSummaryKeyMatcher().addSummaryKey(args[0].strip()) - - - def summaryKeys(self): - return self.ert().getKeyManager().summaryKeys() - - - def summaryObservationKeys(self): - return self.ert().getKeyManager().summaryKeysWithObservations() - - - def fetchSupportedKeys(self): - return self.summaryKeys() - - - def plotDataGatherer(self): - if self.__plot_data_gatherer is None: - summary_pdg = PDG.gatherSummaryData - summary_key_manager = self.ert().getKeyManager().isSummaryKey - refcase_pdg = PDG.gatherSummaryRefcaseData - observation_pdg = PDG.gatherSummaryObservationData - pdg = PDG(summary_pdg, summary_key_manager, refcaseGatherFunc=refcase_pdg, observationGatherFunc=observation_pdg) - self.__plot_data_gatherer = pdg - - return self.__plot_data_gatherer diff --git a/ThirdParty/Ert/python/python/ert_gui/shell/workflows.py b/ThirdParty/Ert/python/python/ert_gui/shell/workflows.py deleted file mode 100644 index c2c65c43cb..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/shell/workflows.py +++ /dev/null @@ -1,48 +0,0 @@ -from ert.job_queue import WorkflowRunner -from ert_gui.shell import assertConfigLoaded, ErtShellCollection -from ert_gui.shell.libshell import autoCompleteList - - -class Workflows(ErtShellCollection): - def __init__(self, parent): - super(Workflows, self).__init__("workflows", parent) - - self.addShellFunction(name="list", - function=Workflows.list, - help_message="Shows a list of all available workflows.") - - self.addShellFunction(name="run", - function=Workflows.run, - completer=Workflows.completeRun, - help_arguments="", - help_message="Run a named workflow.") - - def getWorkflowNames(self): - return [workflow for workflow in self.ert().getWorkflowList().getWorkflowNames()] - - @assertConfigLoaded - def list(self, line): - workflows = self.getWorkflowNames() - if len(workflows) > 0: - self.columnize(workflows) - else: - print("No workflows available.") - - @assertConfigLoaded - def run(self, workflow): - workflow = workflow.strip() - if workflow in self.getWorkflowNames(): - workflow_list = self.ert().getWorkflowList() - workflow = workflow_list[workflow] - context = workflow_list.getContext() - - runner = WorkflowRunner(workflow, self.ert(), context) - runner.run() - runner.wait() - else: - self.lastCommandFailed("Unknown workflow: '%s'" % workflow) - - @assertConfigLoaded - def completeRun(self, text, line, begidx, endidx): - return autoCompleteList(text, self.getWorkflowNames()) - diff --git a/ThirdParty/Ert/python/python/ert_gui/simulation/CMakeLists.txt b/ThirdParty/Ert/python/python/ert_gui/simulation/CMakeLists.txt deleted file mode 100644 index 76c0e02957..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/simulation/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - ensemble_experiment_panel.py - ensemble_smoother_panel.py - iterated_ensemble_smoother_panel.py - multiple_data_assimilation_panel.py - progress.py - run_dialog.py - simple_progress.py - simulation_config_panel.py - simulation_panel.py -) - -add_python_package("python.ert_gui.simulation" ${PYTHON_INSTALL_PREFIX}/ert_gui/simulation "${PYTHON_SOURCES}" True) - -add_subdirectory(models) diff --git a/ThirdParty/Ert/python/python/ert_gui/simulation/__init__.py b/ThirdParty/Ert/python/python/ert_gui/simulation/__init__.py deleted file mode 100644 index 4c029f1732..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/simulation/__init__.py +++ /dev/null @@ -1,9 +0,0 @@ -from .progress import Progress -from .simple_progress import SimpleProgress -from .run_dialog import RunDialog -from .simulation_config_panel import SimulationConfigPanel -from .ensemble_experiment_panel import EnsembleExperimentPanel -from .ensemble_smoother_panel import EnsembleSmootherPanel -from .iterated_ensemble_smoother_panel import IteratedEnsembleSmootherPanel -from .multiple_data_assimilation_panel import MultipleDataAssimilationPanel - diff --git a/ThirdParty/Ert/python/python/ert_gui/simulation/ensemble_experiment_panel.py b/ThirdParty/Ert/python/python/ert_gui/simulation/ensemble_experiment_panel.py deleted file mode 100644 index ca62e11a36..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/simulation/ensemble_experiment_panel.py +++ /dev/null @@ -1,52 +0,0 @@ -from PyQt4.QtGui import QFormLayout, QLabel - -from ert_gui.ertwidgets import addHelpToWidget -from ert_gui.ertwidgets.caseselector import CaseSelector -from ert_gui.ertwidgets.models.activerealizationsmodel import ActiveRealizationsModel -from ert_gui.ertwidgets.models.ertmodel import getRealizationCount, getRunPath -from ert_gui.ertwidgets.stringbox import StringBox -from ert_gui.ide.keywords.definitions import RangeStringArgument -from ert_gui.simulation.models import EnsembleExperiment -from ert_gui.simulation.simulation_config_panel import SimulationConfigPanel - - -class EnsembleExperimentPanel(SimulationConfigPanel): - - def __init__(self): - SimulationConfigPanel.__init__(self, EnsembleExperiment()) - - layout = QFormLayout() - - case_selector = CaseSelector() - layout.addRow("Current case:", case_selector) - - run_path_label = QLabel("%s" % getRunPath()) - addHelpToWidget(run_path_label, "config/simulation/runpath") - layout.addRow("Runpath:", run_path_label) - - number_of_realizations_label = QLabel("%d" % getRealizationCount()) - addHelpToWidget(number_of_realizations_label, "config/ensemble/num_realizations") - layout.addRow(QLabel("Number of realizations:"), number_of_realizations_label) - - self._active_realizations_model = ActiveRealizationsModel() - self._active_realizations_field = StringBox(self._active_realizations_model, "config/simulation/active_realizations") - self._active_realizations_field.setValidator(RangeStringArgument(getRealizationCount())) - layout.addRow("Active realizations", self._active_realizations_field) - - self._active_realizations_field.getValidationSupport().validationChanged.connect(self.simulationConfigurationChanged) - - self.setLayout(layout) - - - def isConfigurationValid(self): - return self._active_realizations_field.isValid() - - def toggleAdvancedOptions(self, show_advanced): - self._active_realizations_field.setVisible(show_advanced) - self.layout().labelForField(self._active_realizations_field).setVisible(show_advanced) - - def getSimulationArguments(self): - active_realizations_mask = self._active_realizations_model.getActiveRealizationsMask() - return {"active_realizations": active_realizations_mask} - - diff --git a/ThirdParty/Ert/python/python/ert_gui/simulation/ensemble_smoother_panel.py b/ThirdParty/Ert/python/python/ert_gui/simulation/ensemble_smoother_panel.py deleted file mode 100644 index def973caf9..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/simulation/ensemble_smoother_panel.py +++ /dev/null @@ -1,64 +0,0 @@ -from PyQt4.QtGui import QFormLayout, QLabel - -from ert_gui.ertwidgets import addHelpToWidget, AnalysisModuleSelector -from ert_gui.ertwidgets.caseselector import CaseSelector -from ert_gui.ertwidgets.models.activerealizationsmodel import ActiveRealizationsModel -from ert_gui.ertwidgets.models.ertmodel import getRealizationCount, getRunPath -from ert_gui.ertwidgets.models.targetcasemodel import TargetCaseModel -from ert_gui.ertwidgets.stringbox import StringBox -from ert_gui.ide.keywords.definitions import RangeStringArgument, ProperNameArgument -from ert_gui.simulation import SimulationConfigPanel -from ert_gui.simulation.models import EnsembleSmoother - - -class EnsembleSmootherPanel(SimulationConfigPanel): - def __init__(self): - SimulationConfigPanel.__init__(self, EnsembleSmoother()) - - layout = QFormLayout() - - case_selector = CaseSelector() - layout.addRow("Current case:", case_selector) - - run_path_label = QLabel("%s" % getRunPath()) - addHelpToWidget(run_path_label, "config/simulation/runpath") - layout.addRow("Runpath:", run_path_label) - - number_of_realizations_label = QLabel("%d" % getRealizationCount()) - addHelpToWidget(number_of_realizations_label, "config/ensemble/num_realizations") - layout.addRow(QLabel("Number of realizations:"), number_of_realizations_label) - - self._target_case_model = TargetCaseModel() - self._target_case_field = StringBox(self._target_case_model, "config/simulation/target_case") - self._target_case_field.setValidator(ProperNameArgument()) - layout.addRow("Target case:", self._target_case_field) - - self._analysis_module_selector = AnalysisModuleSelector(iterable=False, help_link="config/analysis/analysis_module") - layout.addRow("Analysis Module:", self._analysis_module_selector) - - self._active_realizations_model = ActiveRealizationsModel() - self._active_realizations_field = StringBox(self._active_realizations_model, "config/simulation/active_realizations") - self._active_realizations_field.setValidator(RangeStringArgument(getRealizationCount())) - layout.addRow("Active realizations", self._active_realizations_field) - - self._target_case_field.getValidationSupport().validationChanged.connect(self.simulationConfigurationChanged) - self._active_realizations_field.getValidationSupport().validationChanged.connect(self.simulationConfigurationChanged) - - self.setLayout(layout) - - def isConfigurationValid(self): - return self._target_case_field.isValid() and self._active_realizations_field.isValid() - - def toggleAdvancedOptions(self, show_advanced): - self._active_realizations_field.setVisible(show_advanced) - self.layout().labelForField(self._active_realizations_field).setVisible(show_advanced) - - self._analysis_module_selector.setVisible(show_advanced) - self.layout().labelForField(self._analysis_module_selector).setVisible(show_advanced) - - def getSimulationArguments(self): - arguments = {"active_realizations": self._active_realizations_model.getActiveRealizationsMask(), - "target_case": self._target_case_model.getValue(), - "analysis_module": self._analysis_module_selector.getSelectedAnalysisModuleName() - } - return arguments diff --git a/ThirdParty/Ert/python/python/ert_gui/simulation/iterated_ensemble_smoother_panel.py b/ThirdParty/Ert/python/python/ert_gui/simulation/iterated_ensemble_smoother_panel.py deleted file mode 100644 index ce7cc7959b..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/simulation/iterated_ensemble_smoother_panel.py +++ /dev/null @@ -1,78 +0,0 @@ -from PyQt4.QtGui import QFormLayout, QLabel, QSpinBox - -from ert_gui.ertwidgets import addHelpToWidget, AnalysisModuleSelector, CaseSelector -from ert_gui.ertwidgets.models.activerealizationsmodel import ActiveRealizationsModel -from ert_gui.ertwidgets.models.ertmodel import getRealizationCount, getRunPath, setNumberOfIterations, getNumberOfIterations -from ert_gui.ertwidgets.models.targetcasemodel import TargetCaseModel -from ert_gui.ertwidgets.stringbox import StringBox -from ert_gui.ide.keywords.definitions import RangeStringArgument, ProperNameFormatArgument -from ert_gui.simulation import SimulationConfigPanel -from ert_gui.simulation.models import IteratedEnsembleSmoother - - -class IteratedEnsembleSmootherPanel(SimulationConfigPanel): - def __init__(self): - SimulationConfigPanel.__init__(self, IteratedEnsembleSmoother()) - - layout = QFormLayout() - - case_selector = CaseSelector() - layout.addRow("Current case:", case_selector) - - run_path_label = QLabel("%s" % getRunPath()) - addHelpToWidget(run_path_label, "config/simulation/runpath") - layout.addRow("Runpath:", run_path_label) - - number_of_realizations_label = QLabel("%d" % getRealizationCount()) - addHelpToWidget(number_of_realizations_label, "config/ensemble/num_realizations") - layout.addRow(QLabel("Number of realizations:"), number_of_realizations_label) - - # The num_iterations_spinner does not track any external changes (will that ever happen?) - num_iterations_spinner = QSpinBox() - num_iterations_spinner.setMinimum(1) - num_iterations_spinner.setMaximum(100) - num_iterations_spinner.setValue(getNumberOfIterations()) - addHelpToWidget(num_iterations_spinner, "config/simulation/number_of_iterations") - num_iterations_spinner.valueChanged[int].connect(setNumberOfIterations) - - layout.addRow("Number of iterations:", num_iterations_spinner) - - self._iterated_target_case_format_model = TargetCaseModel(format_mode=True) - self._iterated_target_case_format_field = StringBox(self._iterated_target_case_format_model, "config/simulation/iterated_target_case_format") - self._iterated_target_case_format_field.setValidator(ProperNameFormatArgument()) - layout.addRow("Target case format:", self._iterated_target_case_format_field) - - - self._analysis_module_selector = AnalysisModuleSelector(iterable=True, help_link="config/analysis/analysis_module") - layout.addRow("Analysis Module:", self._analysis_module_selector) - - self._active_realizations_model = ActiveRealizationsModel() - self._active_realizations_field = StringBox(self._active_realizations_model, "config/simulation/active_realizations") - self._active_realizations_field.setValidator(RangeStringArgument(getRealizationCount())) - layout.addRow("Active realizations", self._active_realizations_field) - - - self._iterated_target_case_format_field.getValidationSupport().validationChanged.connect(self.simulationConfigurationChanged) - self._active_realizations_field.getValidationSupport().validationChanged.connect(self.simulationConfigurationChanged) - - self.setLayout(layout) - - def isConfigurationValid(self): - analysis_module = self._analysis_module_selector.getSelectedAnalysisModuleName() - return self._iterated_target_case_format_field.isValid() and self._active_realizations_field.isValid() and analysis_module is not None - - - def toggleAdvancedOptions(self, show_advanced): - self._active_realizations_field.setVisible(show_advanced) - self.layout().labelForField(self._active_realizations_field).setVisible(show_advanced) - - self._analysis_module_selector.setVisible(show_advanced) - self.layout().labelForField(self._analysis_module_selector).setVisible(show_advanced) - - - def getSimulationArguments(self): - arguments = {"active_realizations": self._active_realizations_model.getActiveRealizationsMask(), - "target_case": self._iterated_target_case_format_model.getValue(), - "analysis_module": self._analysis_module_selector.getSelectedAnalysisModuleName() - } - return arguments diff --git a/ThirdParty/Ert/python/python/ert_gui/simulation/models/CMakeLists.txt b/ThirdParty/Ert/python/python/ert_gui/simulation/models/CMakeLists.txt deleted file mode 100644 index 630b7ae43a..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/simulation/models/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - base_run_model.py - ensemble_experiment.py - ensemble_smoother.py - iterated_ensemble_smoother.py - multiple_data_assimilation.py - simulations_tracker.py -) - -add_python_package("python.ert_gui.simulation.models" ${PYTHON_INSTALL_PREFIX}/ert_gui/simulation/models "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert_gui/simulation/models/__init__.py b/ThirdParty/Ert/python/python/ert_gui/simulation/models/__init__.py deleted file mode 100644 index 8f0b2301a3..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/simulation/models/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -from .base_run_model import BaseRunModel, ErtRunError -from .ensemble_experiment import EnsembleExperiment -from .ensemble_smoother import EnsembleSmoother -from .iterated_ensemble_smoother import IteratedEnsembleSmoother -from .multiple_data_assimilation import MultipleDataAssimilation -from .simulations_tracker import SimulationsTracker \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/simulation/models/base_run_model.py b/ThirdParty/Ert/python/python/ert_gui/simulation/models/base_run_model.py deleted file mode 100644 index 1297174fe6..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/simulation/models/base_run_model.py +++ /dev/null @@ -1,206 +0,0 @@ -import time -from ert.job_queue import JobStatusType -from ert_gui import ERT -from ert.enkf import ErtLog - - -class ErtRunError(Exception): - pass - -class BaseRunModel(object): - - def __init__(self, name, phase_count=1): - super(BaseRunModel, self).__init__() - self._name = name - self._phase = 0 - self._phase_count = phase_count - self._phase_update_count = 0 - self._phase_name = "Not defined" - - self._job_start_time = 0 - self._job_stop_time = 0 - self._indeterminate = False - self._fail_message = "" - self._failed = False - self.reset( ) - - - def ert(self): - """ @rtype: ert.enkf.EnKFMain""" - return ERT.ert - - def reset(self): - self._failed = False - - - def startSimulations(self, run_arguments): - try: - self.runSimulations(run_arguments) - except ErtRunError as e: - self._failed = True - self._fail_message = str(e) - self._simulationEnded() - - - def runSimulations(self, run_arguments): - raise NotImplementedError("Method must be implemented by inheritors!") - - - def killAllSimulations(self): - job_queue = self.ert().siteConfig().getJobQueue() - job_queue.killAllJobs() - - - def userExitCalled(self): - """ @rtype: bool """ - job_queue = self.ert().siteConfig().getJobQueue() - return job_queue.getUserExit( ) - - - def phaseCount(self): - """ @rtype: int """ - return self._phase_count - - - def setPhaseCount(self, phase_count): - self._phase_count = phase_count - self.setPhase(0, "") - - - def currentPhase(self): - """ @rtype: int """ - return self._phase - - - def setPhaseName(self, phase_name, indeterminate=None): - self._phase_name = phase_name - self.setIndeterminate(indeterminate) - - - def getPhaseName(self): - """ @rtype: str """ - return self._phase_name - - - def setIndeterminate(self, indeterminate): - if indeterminate is not None: - self._indeterminate = indeterminate - - - def isFinished(self): - """ @rtype: bool """ - return self._phase == self._phase_count or self.hasRunFailed() - - - def hasRunFailed(self): - """ @rtype: bool """ - return self._failed - - - def getFailMessage(self): - """ @rtype: str """ - return self._fail_message - - - def _simulationEnded(self): - self._job_stop_time = int(time.time()) - - - def setPhase(self, phase, phase_name, indeterminate=None): - self.setPhaseName(phase_name) - if not 0 <= phase <= self._phase_count: - raise ValueError("Phase must be an integer from 0 to less than %d." % self._phase_count) - - self.setIndeterminate(indeterminate) - - if phase == 0: - self._job_start_time = int(time.time()) - - if phase == self._phase_count: - self._simulationEnded() - - self._phase = phase - self._phase_update_count = 0 - - - def getRunningTime(self): - """ @rtype: float """ - if self._job_stop_time < self._job_start_time: - return time.time() - self._job_start_time - else: - return self._job_stop_time - self._job_start_time - - - def getQueueSize(self): - """ @rtype: int """ - queue_size = len(self.ert().siteConfig().getJobQueue()) - - if queue_size == 0: - queue_size = 1 - - return queue_size - - - def getQueueStatus(self): - """ @rtype: dict of (JobStatusType, int) """ - job_queue = self.ert().siteConfig().getJobQueue() - - queue_status = {} - - if job_queue.isRunning(): - for job_number in range(len(job_queue)): - status = job_queue.getJobStatus(job_number) - - if not status in queue_status: - queue_status[status] = 0 - - queue_status[status] += 1 - - return queue_status - - def isQueueRunning(self): - """ @rtype: bool """ - return self.ert().siteConfig().getJobQueue().isRunning() - - - def getProgress(self): - """ @rtype: float """ - if self.isFinished(): - current_progress = 1.0 - elif not self.isQueueRunning() and self._phase_update_count > 0: - current_progress = (self._phase + 1.0) / self._phase_count - else: - self._phase_update_count += 1 - queue_status = self.getQueueStatus() - queue_size = self.getQueueSize() - - done_state = JobStatusType.JOB_QUEUE_SUCCESS | JobStatusType.JOB_QUEUE_DONE - done_count = 0 - - for state in queue_status: - if state in done_state: - done_count += queue_status[state] - - phase_progress = float(done_count) / queue_size - current_progress = (self._phase + phase_progress) / self._phase_count - - return current_progress - - - def isIndeterminate(self): - """ @rtype: bool """ - return not self.isFinished() and self._indeterminate - - - def checkHaveSufficientRealizations(self, num_successful_realizations): - if num_successful_realizations == 0: - raise ErtRunError("Simulation failed! All realizations failed!") - elif not self.ert().analysisConfig().haveEnoughRealisations(num_successful_realizations, self.ert().getEnsembleSize()): - raise ErtRunError("Too many simulations have failed! You can add/adjust MIN_REALIZATIONS to allow failures in your simulations.\n\n" - "Check ERT log file '%s' or simulation folder for details." % ErtLog.getFilename()) - - - def __str__(self): - return self._name - - diff --git a/ThirdParty/Ert/python/python/ert_gui/simulation/models/ensemble_experiment.py b/ThirdParty/Ert/python/python/ert_gui/simulation/models/ensemble_experiment.py deleted file mode 100644 index 26bc7947c9..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/simulation/models/ensemble_experiment.py +++ /dev/null @@ -1,30 +0,0 @@ -from ert.enkf.enums import HookRuntime -from ert_gui.simulation.models import BaseRunModel, ErtRunError - - -class EnsembleExperiment(BaseRunModel): - - def __init__(self): - super(EnsembleExperiment, self).__init__("Ensemble Experiment") - - def runSimulations(self, arguments): - self.setPhase(0, "Running simulations...", indeterminate=False) - active_realization_mask = arguments["active_realizations"] - - self.setPhaseName("Pre processing...", indeterminate=True) - self.ert().getEnkfSimulationRunner().createRunPath(active_realization_mask, 0) - self.ert().getEnkfSimulationRunner().runWorkflows( HookRuntime.PRE_SIMULATION ) - - self.setPhaseName("Running ensemble experiment...", indeterminate=False) - - num_successful_realizations = self.ert().getEnkfSimulationRunner().runEnsembleExperiment(active_realization_mask) - - self.checkHaveSufficientRealizations(num_successful_realizations) - - self.setPhaseName("Post processing...", indeterminate=True) - self.ert().getEnkfSimulationRunner().runWorkflows( HookRuntime.POST_SIMULATION ) - - self.setPhase(1, "Simulations completed.") # done... - - - diff --git a/ThirdParty/Ert/python/python/ert_gui/simulation/models/ensemble_smoother.py b/ThirdParty/Ert/python/python/ert_gui/simulation/models/ensemble_smoother.py deleted file mode 100644 index 1d491262d3..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/simulation/models/ensemble_smoother.py +++ /dev/null @@ -1,63 +0,0 @@ -from ert.enkf.enums import EnkfInitModeEnum -from ert.enkf.enums import HookRuntime -from ert_gui.simulation.models import BaseRunModel, ErtRunError - - -class EnsembleSmoother(BaseRunModel): - - def __init__(self): - super(EnsembleSmoother, self).__init__(name="Ensemble Smoother", phase_count=2) - - def setAnalysisModule(self, module_name): - module_load_success = self.ert().analysisConfig().selectModule(module_name) - - if not module_load_success: - raise ErtRunError("Unable to load analysis module '%s'!" % module_name) - - - def runSimulations(self, arguments): - self.setPhase(0, "Running simulations...", indeterminate=False) - - self.setAnalysisModule(arguments["analysis_module"]) - active_realization_mask = arguments["active_realizations"] - - self.setPhaseName("Pre processing...", indeterminate=True) - self.ert().getEnkfSimulationRunner().createRunPath(active_realization_mask, 0) - self.ert().getEnkfSimulationRunner().runWorkflows( HookRuntime.PRE_SIMULATION ) - - self.setPhaseName("Running forecast...", indeterminate=False) - num_successful_realizations = self.ert().getEnkfSimulationRunner().runSimpleStep(active_realization_mask, EnkfInitModeEnum.INIT_CONDITIONAL , 0) - - self.checkHaveSufficientRealizations(num_successful_realizations) - - self.setPhaseName("Post processing...", indeterminate=True) - self.ert().getEnkfSimulationRunner().runWorkflows( HookRuntime.POST_SIMULATION ) - - self.setPhaseName("Analyzing...") - - target_case_name = arguments["target_case"] - target_fs = self.ert().getEnkfFsManager().getFileSystem(target_case_name) - source_fs = self.ert().getEnkfFsManager().getCurrentFileSystem() - - es_update = self.ert().getESUpdate( ) - success = es_update.smootherUpdate(source_fs, target_fs) - if not success: - raise ErtRunError("Analysis of simulation failed!") - - self.setPhase(1, "Running simulations...") - self.ert().getEnkfFsManager().switchFileSystem(target_fs) - - self.setPhaseName("Pre processing...") - self.ert().getEnkfSimulationRunner().createRunPath(active_realization_mask, 1) - self.ert().getEnkfSimulationRunner().runWorkflows( HookRuntime.PRE_SIMULATION ) - - self.setPhaseName("Running forecast...", indeterminate=False) - - num_successful_realizations = self.ert().getEnkfSimulationRunner().runSimpleStep(active_realization_mask, EnkfInitModeEnum.INIT_NONE, 1) - - self.checkHaveSufficientRealizations(num_successful_realizations) - - self.setPhaseName("Post processing...", indeterminate=True) - self.ert().getEnkfSimulationRunner().runWorkflows( HookRuntime.POST_SIMULATION ) - - self.setPhase(2, "Simulations completed.") diff --git a/ThirdParty/Ert/python/python/ert_gui/simulation/models/iterated_ensemble_smoother.py b/ThirdParty/Ert/python/python/ert_gui/simulation/models/iterated_ensemble_smoother.py deleted file mode 100644 index 37fcc42fab..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/simulation/models/iterated_ensemble_smoother.py +++ /dev/null @@ -1,104 +0,0 @@ -from ert.enkf.enums import EnkfInitModeEnum, HookRuntime -from ert_gui.ertwidgets.models.ertmodel import getNumberOfIterations -from ert_gui.simulation.models import BaseRunModel, ErtRunError - - -class IteratedEnsembleSmoother(BaseRunModel): - - def __init__(self): - super(IteratedEnsembleSmoother, self).__init__(name="Iterated Ensemble Smoother", phase_count=2) - - def setAnalysisModule(self, module_name): - module_load_success = self.ert().analysisConfig().selectModule(module_name) - - if not module_load_success: - raise ErtRunError("Unable to load analysis module '%s'!" % module_name) - - return self.ert().analysisConfig().getModule(module_name) - - - def runAndPostProcess(self, active_realization_mask, phase, phase_count, mode): - self.setPhase(phase, "Running iteration %d of %d simulation iterations..." % (phase, phase_count - 1), indeterminate=False) - - self.setPhaseName("Pre processing...", indeterminate=True) - self.ert().getEnkfSimulationRunner().createRunPath(active_realization_mask, phase) - self.ert().getEnkfSimulationRunner().runWorkflows( HookRuntime.PRE_SIMULATION ) - - self.setPhaseName("Running forecast...", indeterminate=False) - num_successful_realizations = self.ert().getEnkfSimulationRunner().runSimpleStep(active_realization_mask, mode, phase) - - self.checkHaveSufficientRealizations(num_successful_realizations) - - self.setPhaseName("Post processing...", indeterminate=True) - self.ert().getEnkfSimulationRunner().runWorkflows( HookRuntime.POST_SIMULATION ) - - - def createTargetCaseFileSystem(self, phase, target_case_format): - target_fs = self.ert().getEnkfFsManager().getFileSystem(target_case_format % phase) - return target_fs - - - def analyzeStep(self, target_fs): - self.setPhaseName("Analyzing...", indeterminate=True) - source_fs = self.ert().getEnkfFsManager().getCurrentFileSystem() - es_update = self.ert().getESUpdate() - - success = es_update.smootherUpdate(source_fs, target_fs) - if not success: - raise ErtRunError("Analysis of simulation failed!") - - - def runSimulations(self, arguments): - phase_count = getNumberOfIterations() + 1 - self.setPhaseCount(phase_count) - - analysis_module = self.setAnalysisModule(arguments["analysis_module"]) - active_realization_mask = arguments["active_realizations"] - target_case_format = arguments["target_case"] - - source_fs = self.ert().getEnkfFsManager().getCurrentFileSystem() - initial_fs = self.createTargetCaseFileSystem(0, target_case_format) - - if not source_fs == initial_fs: - self.ert().getEnkfFsManager().switchFileSystem(initial_fs) - self.ert().getEnkfFsManager().initializeCurrentCaseFromExisting(source_fs, 0) - - self.runAndPostProcess(active_realization_mask, 0, phase_count, EnkfInitModeEnum.INIT_CONDITIONAL) - - self.ert().analysisConfig().getAnalysisIterConfig().setCaseFormat( target_case_format ) - - analysis_config = self.ert().analysisConfig() - analysis_iter_config = analysis_config.getAnalysisIterConfig() - num_retries_per_iteration = analysis_iter_config.getNumRetries() - num_tries = 0 - current_iteration = 1 - - while current_iteration <= getNumberOfIterations() and num_tries < num_retries_per_iteration: - target_fs = self.createTargetCaseFileSystem(current_iteration, target_case_format) - - pre_analysis_iter_num = analysis_module.getInt("ITER") - self.analyzeStep(target_fs) - post_analysis_iter_num = analysis_module.getInt("ITER") - - analysis_success = False - if post_analysis_iter_num > pre_analysis_iter_num: - analysis_success = True - - if analysis_success: - self.ert().getEnkfFsManager().switchFileSystem(target_fs) - self.runAndPostProcess(active_realization_mask, current_iteration, phase_count, EnkfInitModeEnum.INIT_NONE) - num_tries = 0 - current_iteration += 1 - else: - self.ert().getEnkfFsManager().initializeCurrentCaseFromExisting(target_fs, 0) - self.runAndPostProcess(active_realization_mask, current_iteration - 1 , phase_count, EnkfInitModeEnum.INIT_NONE) - num_tries += 1 - - - - if current_iteration == phase_count: - self.setPhase(phase_count, "Simulations completed.") - else: - raise ErtRunError("Iterated Ensemble Smoother stopped: maximum number of iteration retries (%d retries) reached for iteration %d" % (num_retries_per_iteration, current_iteration)) - - diff --git a/ThirdParty/Ert/python/python/ert_gui/simulation/models/multiple_data_assimilation.py b/ThirdParty/Ert/python/python/ert_gui/simulation/models/multiple_data_assimilation.py deleted file mode 100644 index 6f340d4346..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/simulation/models/multiple_data_assimilation.py +++ /dev/null @@ -1,172 +0,0 @@ -# Copyright (C) 2016 Statoil ASA, Norway. -# -# This file is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from ert.enkf.enums import EnkfInitModeEnum -from ert.enkf.enums import HookRuntime - -from ert_gui.simulation.models import BaseRunModel, ErtRunError - - -class MultipleDataAssimilation(BaseRunModel): - """ - Run Multiple Data Assimilation (MDA) Ensemble Smoother with custom weights. - """ - - def __init__(self): - super(MultipleDataAssimilation, self).__init__(name="Multiple Data Assimilation (ES MDA)", phase_count=2) - self.weights = "3, 2, 1" # default value - - def getWeights(self): - return self.weights - - def setWeights(self, weights): - str_weights = str(weights) - print("Weights changed: %s" % str_weights) - self.weights = str_weights - - def setAnalysisModule(self, module_name): - module_load_success = self.ert().analysisConfig().selectModule(module_name) - - if not module_load_success: - raise ErtRunError("Unable to load analysis module '%s'!" % module_name) - - - def runSimulations(self, arguments): - weights = self.parseWeights(self.weights) - iteration_count = len(weights) - - self.setAnalysisModule(arguments["analysis_module"]) - - print("Running MDA ES for %s iterations\t%s" % (iteration_count, ", ".join(str(weight) for weight in weights))) - weights = self.normalizeWeights(weights) - - weight_string = ", ".join(str(round(weight,3)) for weight in weights) - print("Running MDA ES on (weights normalized)\t%s" % weight_string) - - - self.setPhaseCount(iteration_count+2) # pre + post + weights - - target_case_format = arguments["target_case"] - - source_fs = self.ert().getEnkfFsManager().getCurrentFileSystem() - target_case_name = target_case_format % 0 - target_fs = self.ert().getEnkfFsManager().getFileSystem(target_case_name) - - if not source_fs == target_fs: - self.ert().getEnkfFsManager().switchFileSystem(target_fs) - self.ert().getEnkfFsManager().initializeCurrentCaseFromExisting(source_fs, 0) - - active_realization_mask = arguments["active_realizations"] - - - phase_string = "Running MDA ES %d iteration%s." % (iteration_count, ('s' if (iteration_count != 1) else '')) - self.setPhaseName(phase_string, indeterminate=True) - - self.ert().getEnkfSimulationRunner().createRunPath(active_realization_mask, 1) - self.ert().getEnkfSimulationRunner().runWorkflows( HookRuntime.PRE_SIMULATION ) - - - for iteration, weight in enumerate(weights): - num_successful_realizations = self.simulateAndPostProcess(target_case_format, active_realization_mask, iteration) - - # We exit because the user has pressed 'Kill all simulations'. - if self.userExitCalled( ): - self.setPhase(iteration_count + 2, "Simulations stopped") - return - - # We exit if there are too few realisations left for updating. - self.checkHaveSufficientRealizations(num_successful_realizations) - - self.update(target_case_format, iteration, weights[iteration]) - - self.setPhaseName("Post processing...", indeterminate=True) - self.simulateAndPostProcess(target_case_format, active_realization_mask, iteration_count) - - self.setPhase(iteration_count + 2, "Simulations completed.") - - - def update(self, target_case_format, iteration, weight): - source_fs = self.ert().getEnkfFsManager().getCurrentFileSystem() - next_iteration = (iteration + 1) - next_target_case_name = target_case_format % next_iteration - target_fs = self.ert().getEnkfFsManager().getFileSystem(next_target_case_name) - - phase_string = "Analyzing iteration: %d with weight %f" % (next_iteration, weight) - self.setPhase(self.currentPhase() + 1, phase_string, indeterminate=True) - - es_update = self.ert().getESUpdate( ) - es_update.setGlobalStdScaling(weight) - success = es_update.smootherUpdate(source_fs, target_fs) - - if not success: - raise UserWarning("Analysis of simulation failed for iteration: %d!" % next_iteration) - - - def simulateAndPostProcess(self, target_case_format, active_realization_mask, iteration): - target_case_name = target_case_format % iteration - - target_fs = self.ert().getEnkfFsManager().getFileSystem(target_case_name) - self.ert().getEnkfFsManager().switchFileSystem(target_fs) - - phase_string = "Running simulation for iteration: %d" % iteration - self.setPhaseName(phase_string, indeterminate=True) - self.ert().getEnkfSimulationRunner().createRunPath(active_realization_mask, iteration) - - phase_string = "Pre processing for iteration: %d" % iteration - self.setPhaseName(phase_string) - self.ert().getEnkfSimulationRunner().runWorkflows( HookRuntime.PRE_SIMULATION ) - - phase_string = "Running forecast for iteration: %d" % iteration - self.setPhaseName(phase_string, indeterminate=False) - num_successful_realizations = self.ert().getEnkfSimulationRunner().runSimpleStep(active_realization_mask, EnkfInitModeEnum.INIT_CONDITIONAL, iteration) - - phase_string = "Post processing for iteration: %d" % iteration - self.setPhaseName(phase_string, indeterminate=True) - self.ert().getEnkfSimulationRunner().runWorkflows(HookRuntime.POST_SIMULATION) - - return num_successful_realizations - - - @staticmethod - def normalizeWeights(weights): - """ :rtype: list of float """ - if not weights: - return [] - weights = [weight for weight in weights if abs(weight) != 0.0] - from math import sqrt - length = sqrt(sum((1.0 / x) * (1.0 / x) for x in weights)) - return [x * length for x in weights] - - - @staticmethod - def parseWeights(weights): - if not weights: - return [] - - elements = weights.split(",") - elements = [element.strip() for element in elements if not element.strip() == ""] - - result = [] - for element in elements: - try: - f = float(element) - if f == 0: - print('Warning: 0 weight, will ignore') - else: - result.append(f) - except ValueError: - raise ValueError('Warning: cannot parse weight %s' % element) - - return result diff --git a/ThirdParty/Ert/python/python/ert_gui/simulation/models/simulations_tracker.py b/ThirdParty/Ert/python/python/ert_gui/simulation/models/simulations_tracker.py deleted file mode 100644 index 0e684bb112..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/simulation/models/simulations_tracker.py +++ /dev/null @@ -1,87 +0,0 @@ -from ert.job_queue import JobStatusType - -class SimulationStateStatus(object): - COLOR_WAITING = (164, 164, 255) - COLOR_PENDING = (164, 200, 255) - COLOR_RUNNING = (200, 255, 200) - COLOR_FAILED = (255, 200, 200) - - COLOR_FINISHED = (200, 200, 200) - COLOR_NOT_ACTIVE = (255, 255, 255) - - def __init__(self, name, state, color): - self.__name = name - self.__state = state - self.__color = color - - self.__count = 0 - self.__total_count = 1 - - @property - def name(self): - return self.__name - - @property - def state(self): - return self.__state - - @property - def color(self): - return self.__color - - @property - def count(self): - return self.__count - - @count.setter - def count(self, value): - self.__count = value - - @property - def total_count(self): - return self.__total_count - - @total_count.setter - def total_count(self, value): - self.__total_count = value - - -class SimulationsTracker(object): - def __init__(self): - super(SimulationsTracker, self).__init__() - - waiting_flag = JobStatusType.JOB_QUEUE_NOT_ACTIVE | JobStatusType.JOB_QUEUE_WAITING | JobStatusType.JOB_QUEUE_SUBMITTED - waiting_state = SimulationStateStatus("Waiting", waiting_flag, SimulationStateStatus.COLOR_WAITING) - - pending_flag = JobStatusType.JOB_QUEUE_PENDING - pending_state = SimulationStateStatus("Pending", pending_flag, SimulationStateStatus.COLOR_PENDING) - - running_flag = JobStatusType.JOB_QUEUE_RUNNING | JobStatusType.JOB_QUEUE_EXIT | JobStatusType.JOB_QUEUE_RUNNING_CALLBACK - running_state = SimulationStateStatus("Running", running_flag, SimulationStateStatus.COLOR_RUNNING) - - # Failed also includes simulations which have been killed by the MAX_RUNTIME system. - failed_flag = JobStatusType.JOB_QUEUE_IS_KILLED | JobStatusType.JOB_QUEUE_DO_KILL - failed_flag |= JobStatusType.JOB_QUEUE_FAILED | JobStatusType.JOB_QUEUE_DO_KILL_NODE_FAILURE - failed_state = SimulationStateStatus("Failed", failed_flag, SimulationStateStatus.COLOR_FAILED) - - done_flag = JobStatusType.JOB_QUEUE_DONE | JobStatusType.JOB_QUEUE_SUCCESS - done_state = SimulationStateStatus("Finished", done_flag, SimulationStateStatus.COLOR_FINISHED) - - self.states = [waiting_state, pending_state, running_state, failed_state, done_state] - self.custom_states = [waiting_state, pending_state, running_state, failed_state, done_state] - - self.__checkForUnusedEnums() - - def getStates(self): - """ @rtype: list[SimulationStateStatus] """ - return list(self.custom_states) - - def __checkForUnusedEnums(self): - for enum in JobStatusType.enums(): - used = False - for state in self.states: - if enum in state.state: - used = True - - if not used: - raise AssertionError("Enum identifier '%s' not used!" % enum) diff --git a/ThirdParty/Ert/python/python/ert_gui/simulation/multiple_data_assimilation_panel.py b/ThirdParty/Ert/python/python/ert_gui/simulation/multiple_data_assimilation_panel.py deleted file mode 100644 index 724160656e..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/simulation/multiple_data_assimilation_panel.py +++ /dev/null @@ -1,110 +0,0 @@ -# Copyright (C) 2016 Statoil ASA, Norway. -# -# This file is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -from PyQt4.QtGui import QFormLayout, QLabel - -from ert_gui.ertwidgets import addHelpToWidget, CaseSelector, ActiveLabel, AnalysisModuleSelector -from ert_gui.ertwidgets.models.activerealizationsmodel import ActiveRealizationsModel -from ert_gui.ertwidgets.models.ertmodel import getRealizationCount, getRunPath -from ert_gui.ertwidgets.models.targetcasemodel import TargetCaseModel -from ert_gui.ertwidgets.models.valuemodel import ValueModel -from ert_gui.ertwidgets.stringbox import StringBox -from ert_gui.ide.keywords.definitions import NumberListStringArgument, RangeStringArgument, ProperNameFormatArgument -from ert_gui.simulation import SimulationConfigPanel -from ert_gui.simulation.models import MultipleDataAssimilation - - -class MultipleDataAssimilationPanel(SimulationConfigPanel): - def __init__(self): - SimulationConfigPanel.__init__(self, MultipleDataAssimilation()) - - layout = QFormLayout() - - case_selector = CaseSelector() - layout.addRow("Current case:", case_selector) - - run_path_label = QLabel("%s" % getRunPath()) - addHelpToWidget(run_path_label, "config/simulation/runpath") - layout.addRow("Runpath:", run_path_label) - - number_of_realizations_label = QLabel("%d" % getRealizationCount()) - addHelpToWidget(number_of_realizations_label, "config/ensemble/num_realizations") - layout.addRow(QLabel("Number of realizations:"), number_of_realizations_label) - - self._target_case_format_model = TargetCaseModel(format_mode=True) - self._target_case_format_field = StringBox(self._target_case_format_model, "config/simulation/target_case_format") - self._target_case_format_field.setValidator(ProperNameFormatArgument()) - layout.addRow("Target case format:", self._target_case_format_field) - - self._createInputForWeights(layout) - - self._analysis_module_selector = AnalysisModuleSelector(iterable=False, help_link="config/analysis/analysis_module") - layout.addRow("Analysis Module:", self._analysis_module_selector) - - - self._active_realizations_model = ActiveRealizationsModel() - self._active_realizations_field = StringBox(self._active_realizations_model, "config/simulation/active_realizations") - self._active_realizations_field.setValidator(RangeStringArgument(getRealizationCount())) - layout.addRow("Active realizations", self._active_realizations_field) - - - self._target_case_format_field.getValidationSupport().validationChanged.connect(self.simulationConfigurationChanged) - self._active_realizations_field.getValidationSupport().validationChanged.connect(self.simulationConfigurationChanged) - self._relative_iteration_weights_box.getValidationSupport().validationChanged.connect(self.simulationConfigurationChanged) - - self.setLayout(layout) - - def _createInputForWeights(self, layout): - relative_iteration_weights_model = ValueModel(self.getSimulationModel().getWeights()) - self._relative_iteration_weights_box = StringBox(relative_iteration_weights_model, help_link="config/simulation/iteration_weights", continuous_update=True) - self._relative_iteration_weights_box.setValidator(NumberListStringArgument()) - layout.addRow("Relative Weights:", self._relative_iteration_weights_box) - - relative_iteration_weights_model.valueChanged.connect(self.getSimulationModel().setWeights) - - normalized_weights_model = ValueModel() - normalized_weights_widget = ActiveLabel(normalized_weights_model, help_link="config/simulation/iteration_weights") - layout.addRow('Normalized weights:', normalized_weights_widget) - - def updateVisualizationOfNormalizedWeights(): - if self._relative_iteration_weights_box.isValid(): - weights = MultipleDataAssimilation.parseWeights(relative_iteration_weights_model.getValue()) - normalized_weights = MultipleDataAssimilation.normalizeWeights(weights) - normalized_weights_model.setValue(", ".join("%.2f" % x for x in normalized_weights)) - else: - normalized_weights_model.setValue("The weights are invalid!") - - self._relative_iteration_weights_box.getValidationSupport().validationChanged.connect(updateVisualizationOfNormalizedWeights) - - updateVisualizationOfNormalizedWeights() # To normalize the default weights - - def isConfigurationValid(self): - return self._target_case_format_field.isValid() and self._active_realizations_field.isValid() and self._relative_iteration_weights_box.isValid() - - def toggleAdvancedOptions(self, show_advanced): - self._active_realizations_field.setVisible(show_advanced) - self.layout().labelForField(self._active_realizations_field).setVisible(show_advanced) - - self._analysis_module_selector.setVisible(show_advanced) - self.layout().labelForField(self._analysis_module_selector).setVisible(show_advanced) - - def getSimulationArguments(self): - arguments = {"active_realizations": self._active_realizations_model.getActiveRealizationsMask(), - "target_case": self._target_case_format_model.getValue(), - "analysis_module": self._analysis_module_selector.getSelectedAnalysisModuleName() - } - return arguments - diff --git a/ThirdParty/Ert/python/python/ert_gui/simulation/progress.py b/ThirdParty/Ert/python/python/ert_gui/simulation/progress.py deleted file mode 100644 index a6fb3aed16..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/simulation/progress.py +++ /dev/null @@ -1,123 +0,0 @@ -from math import floor -from PyQt4.QtCore import QTimer -from PyQt4.QtGui import QWidget, QPainter, QColor, QFrame, QLinearGradient - - -class StateTracker(object): - def __init__(self, state_reference, color, progress=0.0): - super(StateTracker, self).__init__() - self.name = state_reference - self.color = color - self.progress = progress - - def setProgress(self, progress): - self.progress = progress - - -class Progress(QFrame): - def __init__(self): - QFrame.__init__(self) - self.setLineWidth(1) - self.setFrameStyle(QFrame.Panel | QFrame.Plain) - - self.__color = QColor(255, 255, 255) - - self.setMinimumHeight(30) - self.__state_order = [] - """@type: list of State""" - - self.__states = {} - """@type: dict of (object, State)""" - - self.__shiny = False - self.__count = 0 - - self.__indeterminate = False - self.__indeterminate_color = QColor(128, 128, 128) - self.__indeterminate_state = 0.5 - self.__indeterminate_step_size = 0.05 - self.__timer = QTimer(self) - self.__timer.setInterval(100) - self.__timer.timeout.connect(self.update) - - def addState(self, state, state_color, progress=0.0): - state_tracker = StateTracker(state, state_color, progress) - self.__state_order.append(state_tracker) - self.__states[state] = state_tracker - - - def updateState(self, state, progress): - self.__count += 1 - self.__states[state].setProgress(progress) - self.update() - - - def setIndeterminate(self, indeterminate): - self.__indeterminate = indeterminate - if indeterminate: - self.__timer.start() - else: - self.__timer.stop() - - def setIndeterminateColor(self, color): - self.__indeterminate_color = color - - - def paintEvent(self, paint_event): - QFrame.paintEvent(self, paint_event) - painter = QPainter(self) - painter.setRenderHint(QPainter.Antialiasing, True) - painter.setRenderHint(QPainter.SmoothPixmapTransform, True) - - rect = self.contentsRect() - """@type: QRect""" - - painter.fillRect(rect, self.__color) - - x = rect.x() - y = rect.y() - width = rect.width() - height = rect.height() - - if not self.__indeterminate: - count = len(self.__state_order) - for index in range(count): - state = self.__state_order[index] - state_width = floor(width * (state.progress / 100.0)) - - if index == count - 1: - state_width = width - x + 1 - - painter.fillRect(x, y, state_width, height, state.color) - - x += state_width - else: - painter.fillRect(rect, self.__indeterminate_color) - - p = self.__indeterminate_state - s = self.__indeterminate_step_size - - gradient = QLinearGradient(0, rect.height() / 2, rect.width(), rect.height() / 2) - gradient.setColorAt(p - s, QColor(255, 255, 255, 0)) - gradient.setColorAt(p, QColor(255, 255, 255, 200)) - gradient.setColorAt(p + s, QColor(255, 255, 255, 0)) - painter.fillRect(rect, gradient) - - self.__indeterminate_state += s - - if self.__indeterminate_state + s >= 1.0 or self.__indeterminate_state + s <= 0.0: - self.__indeterminate_step_size *= -1 - self.__indeterminate_state = round(self.__indeterminate_state) + self.__indeterminate_step_size - - - - if self.__shiny: - #Shiny overlay! - gradient = QLinearGradient(rect.width() / 2, 0, rect.width() / 2, rect.height()) - gradient.setColorAt(0, QColor(255, 255, 255, 0)) - gradient.setColorAt(0.2, QColor(255, 255, 255, 200)) - gradient.setColorAt(0.4, QColor(255, 255, 255, 0)) - gradient.setColorAt(0.85, QColor(255, 255, 255, 0)) - gradient.setColorAt(0.85, QColor(0, 0, 0, 0)) - gradient.setColorAt(1, QColor(0, 0, 0, 127)) - painter.fillRect(rect, gradient) diff --git a/ThirdParty/Ert/python/python/ert_gui/simulation/run_dialog.py b/ThirdParty/Ert/python/python/ert_gui/simulation/run_dialog.py deleted file mode 100644 index e6ef13e211..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/simulation/run_dialog.py +++ /dev/null @@ -1,208 +0,0 @@ -from threading import Thread - -from PyQt4.QtCore import Qt, QTimer, QSize -from PyQt4.QtGui import QDialog, QVBoxLayout, QLayout, QMessageBox, QPushButton, QHBoxLayout, QColor, QLabel - -from ert_gui.ertwidgets import resourceMovie, Legend -from ert_gui.simulation import Progress, SimpleProgress -from ert_gui.simulation.models import BaseRunModel, SimulationsTracker -from ert_gui.tools.plot.plot_tool import PlotTool - - -class RunDialog(QDialog): - - def __init__(self, run_model, run_arguments, parent): - QDialog.__init__(self, parent) - self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) - self.setWindowFlags(self.windowFlags() & ~Qt.WindowCloseButtonHint) - self.setModal(True) - self.setWindowModality(Qt.WindowModal) - self.setWindowTitle("Simulations") - - assert isinstance(run_model, BaseRunModel) - self._run_model = run_model - self._run_arguments = run_arguments - - layout = QVBoxLayout() - layout.setSizeConstraint(QLayout.SetFixedSize) - - self.simulations_tracker = SimulationsTracker() - states = self.simulations_tracker.getStates() - - self.total_progress = SimpleProgress() - layout.addWidget(self.total_progress) - - - status_layout = QHBoxLayout() - status_layout.addStretch() - self.__status_label = QLabel() - status_layout.addWidget(self.__status_label) - status_layout.addStretch() - layout.addLayout(status_layout) - - self.progress = Progress() - self.progress.setIndeterminateColor(self.total_progress.color) - for state in states: - self.progress.addState(state.state, QColor(*state.color), 100.0 * state.count / state.total_count) - - layout.addWidget(self.progress) - - legend_layout = QHBoxLayout() - self.legends = {} - for state in states: - self.legends[state] = Legend("%s (%d/%d)", QColor(*state.color)) - self.legends[state].updateLegend(state.name, 0, 0) - legend_layout.addWidget(self.legends[state]) - - layout.addLayout(legend_layout) - - self.running_time = QLabel("") - - ert = None - if isinstance(run_model, BaseRunModel): - ert = run_model.ert() - - self.plot_tool = PlotTool() - self.plot_tool.setParent(None) - self.plot_button = QPushButton(self.plot_tool.getName()) - self.plot_button.clicked.connect(self.plot_tool.trigger) - self.plot_button.setEnabled(ert is not None) - - self.kill_button = QPushButton("Kill simulations") - self.done_button = QPushButton("Done") - self.done_button.setHidden(True) - - button_layout = QHBoxLayout() - - size = 20 - spin_movie = resourceMovie("ide/loading.gif") - spin_movie.setSpeed(60) - spin_movie.setScaledSize(QSize(size, size)) - spin_movie.start() - - self.processing_animation = QLabel() - self.processing_animation.setMaximumSize(QSize(size, size)) - self.processing_animation.setMinimumSize(QSize(size, size)) - self.processing_animation.setMovie(spin_movie) - - button_layout.addWidget(self.processing_animation) - button_layout.addWidget(self.running_time) - button_layout.addStretch() - button_layout.addWidget(self.plot_button) - button_layout.addWidget(self.kill_button) - button_layout.addWidget(self.done_button) - - layout.addStretch() - layout.addLayout(button_layout) - - self.setLayout(layout) - - self.kill_button.clicked.connect(self.killJobs) - self.done_button.clicked.connect(self.accept) - - self.__updating = False - self.__update_queued = False - self.__simulation_started = False - - self.__update_timer = QTimer(self) - self.__update_timer.setInterval(500) - self.__update_timer.timeout.connect(self.updateRunStatus) - - - def startSimulation(self): - self._run_model.reset() - - def run(): - self._run_model.startSimulations(self._run_arguments) - - simulation_thread = Thread(name="ert_gui_simulation_thread") - simulation_thread.setDaemon(True) - simulation_thread.run = run - simulation_thread.start() - - self.__update_timer.start() - - - def checkIfRunFinished(self): - if self._run_model.isFinished(): - self.hideKillAndShowDone() - - if self._run_model.hasRunFailed(): - error = self._run_model.getFailMessage() - QMessageBox.critical(self, "Simulations failed!", "The simulation failed with the following error:\n\n%s" % error) - self.reject() - - - def updateRunStatus(self): - self.checkIfRunFinished() - - self.total_progress.setProgress(self._run_model.getProgress()) - - self.__status_label.setText(self._run_model.getPhaseName()) - - states = self.simulations_tracker.getStates() - - if self._run_model.isIndeterminate(): - self.progress.setIndeterminate(True) - - for state in states: - self.legends[state].updateLegend(state.name, 0, 0) - - else: - self.progress.setIndeterminate(False) - total_count = self._run_model.getQueueSize() - queue_status = self._run_model.getQueueStatus() - - for state in states: - state.count = 0 - state.total_count = total_count - - for state in states: - for queue_state in queue_status: - if queue_state in state.state: - state.count += queue_status[queue_state] - - self.progress.updateState(state.state, 100.0 * state.count / state.total_count) - self.legends[state].updateLegend(state.name, state.count, state.total_count) - - self.setRunningTime() - - - def setRunningTime(self): - days = 0 - hours = 0 - minutes = 0 - seconds = self._run_model.getRunningTime() - - if seconds >= 60: - minutes, seconds = divmod(seconds, 60) - - if minutes >= 60: - hours, minutes = divmod(minutes, 60) - - if hours >= 24: - days, hours = divmod(hours, 24) - - if days > 0: - self.running_time.setText("Running time: %d days %d hours %d minutes %d seconds" % (days, hours, minutes, seconds)) - elif hours > 0: - self.running_time.setText("Running time: %d hours %d minutes %d seconds" % (hours, minutes, seconds)) - elif minutes > 0: - self.running_time.setText("Running time: %d minutes %d seconds" % (minutes, seconds)) - else: - self.running_time.setText("Running time: %d seconds" % seconds) - - - def killJobs(self): - kill_job = QMessageBox.question(self, "Kill simulations?", "Are you sure you want to kill the currently running simulations?", QMessageBox.Yes | QMessageBox.No ) - - if kill_job == QMessageBox.Yes: - if self._run_model.killAllSimulations(): - self.reject() - - - def hideKillAndShowDone(self): - self.__update_timer.stop() - self.processing_animation.hide() - self.kill_button.setHidden(True) - self.done_button.setHidden(False) diff --git a/ThirdParty/Ert/python/python/ert_gui/simulation/simple_progress.py b/ThirdParty/Ert/python/python/ert_gui/simulation/simple_progress.py deleted file mode 100644 index c8b2afaa99..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/simulation/simple_progress.py +++ /dev/null @@ -1,55 +0,0 @@ -from math import floor -from PyQt4.QtGui import QPainter, QColor, QFrame, QLinearGradient - - -class SimpleProgress(QFrame): - def __init__(self): - QFrame.__init__(self) - self.setLineWidth(1) - self.setFrameStyle(QFrame.Panel | QFrame.Plain) - - self.background_color = QColor(255, 255, 255) - # self.color = QColor(0, 128, 255) - self.color = QColor(255, 200, 128) - - self.setMinimumHeight(15) - self.setMaximumHeight(15) - - self.__progress = 0 - - self.__shiny = False - - def setProgress(self, progress): - self.__progress = progress - self.update() - - def paintEvent(self, paint_event): - QFrame.paintEvent(self, paint_event) - painter = QPainter(self) - painter.setRenderHint(QPainter.Antialiasing, True) - painter.setRenderHint(QPainter.SmoothPixmapTransform, True) - - rect = self.contentsRect() - """@type: QRect""" - - painter.fillRect(rect, self.background_color) - - x = rect.x() - y = rect.y() - height = rect.height() - width = floor(rect.width() * self.__progress) - - painter.fillRect(x, y, width, height, self.color) - - if self.__shiny: - #Shiny overlay! - gradient = QLinearGradient(rect.width() / 2, 0, rect.width() / 2, rect.height()) - gradient.setColorAt(0, QColor(255, 255, 255, 0)) - gradient.setColorAt(0.2, QColor(255, 255, 255, 200)) - gradient.setColorAt(0.4, QColor(255, 255, 255, 0)) - gradient.setColorAt(0.85, QColor(255, 255, 255, 0)) - gradient.setColorAt(0.85, QColor(0, 0, 0, 0)) - gradient.setColorAt(1, QColor(0, 0, 0, 127)) - painter.fillRect(rect, gradient) - - diff --git a/ThirdParty/Ert/python/python/ert_gui/simulation/simulation_config_panel.py b/ThirdParty/Ert/python/python/ert_gui/simulation/simulation_config_panel.py deleted file mode 100644 index bcb0721990..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/simulation/simulation_config_panel.py +++ /dev/null @@ -1,25 +0,0 @@ -from PyQt4.QtCore import pyqtSignal -from PyQt4.QtGui import QWidget - - -class SimulationConfigPanel(QWidget): - - simulationConfigurationChanged = pyqtSignal() - - def __init__(self, simulation_model): - QWidget.__init__(self) - self.setContentsMargins(10, 10, 10, 10) - self.__simulation_model = simulation_model - - def getSimulationModel(self): - return self.__simulation_model - - def isConfigurationValid(self): - return True - - def toggleAdvancedOptions(self, show_advanced): - raise NotImplementedError("toggleAdvancedOptions must be implemented!") - - def getSimulationArguments(self): - """" @rtype: dict[str, object]""" - return {} diff --git a/ThirdParty/Ert/python/python/ert_gui/simulation/simulation_panel.py b/ThirdParty/Ert/python/python/ert_gui/simulation/simulation_panel.py deleted file mode 100644 index 8734b76e0f..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/simulation/simulation_panel.py +++ /dev/null @@ -1,118 +0,0 @@ -from PyQt4.QtCore import Qt, QSize -from PyQt4.QtGui import QWidget, QVBoxLayout, QHBoxLayout, QLabel, QStackedWidget, QFrame, QToolButton, QMessageBox, QComboBox - -from ert_gui import ERT -from ert_gui.ertwidgets import addHelpToWidget, resourceIcon -from ert_gui.ertwidgets.models.ertmodel import getCurrentCaseName -from ert_gui.simulation import EnsembleExperimentPanel, EnsembleSmootherPanel -from ert_gui.simulation import IteratedEnsembleSmootherPanel, MultipleDataAssimilationPanel, SimulationConfigPanel -from ert_gui.simulation import RunDialog - - -class SimulationPanel(QWidget): - - def __init__(self): - QWidget.__init__(self) - - layout = QVBoxLayout() - - self._simulation_mode_combo = QComboBox() - addHelpToWidget(self._simulation_mode_combo, "run/simulation_mode") - - self._simulation_mode_combo.currentIndexChanged.connect(self.toggleSimulationMode) - - simulation_mode_layout = QHBoxLayout() - simulation_mode_layout.addSpacing(10) - simulation_mode_layout.addWidget(QLabel("Simulation mode:"), 0, Qt.AlignVCenter) - simulation_mode_layout.addWidget(self._simulation_mode_combo, 0, Qt.AlignVCenter) - - simulation_mode_layout.addSpacing(20) - - self.run_button = QToolButton() - self.run_button.setIconSize(QSize(32, 32)) - self.run_button.setText("Start Simulation") - self.run_button.setIcon(resourceIcon("ide/gear_in_play")) - self.run_button.clicked.connect(self.runSimulation) - self.run_button.setToolButtonStyle(Qt.ToolButtonTextBesideIcon) - addHelpToWidget(self.run_button, "run/start_simulation") - - simulation_mode_layout.addWidget(self.run_button) - simulation_mode_layout.addStretch(1) - - layout.addSpacing(5) - layout.addLayout(simulation_mode_layout) - layout.addSpacing(10) - - self._simulation_stack = QStackedWidget() - self._simulation_stack.setLineWidth(1) - self._simulation_stack.setFrameStyle(QFrame.StyledPanel) - - layout.addWidget(self._simulation_stack) - - self._simulation_widgets = {} - """ :type: dict[BaseRunModel,SimulationConfigPanel]""" - - self.addSimulationConfigPanel(EnsembleExperimentPanel()) - self.addSimulationConfigPanel(EnsembleSmootherPanel()) - self.addSimulationConfigPanel(IteratedEnsembleSmootherPanel()) - self.addSimulationConfigPanel(MultipleDataAssimilationPanel()) - - self.setLayout(layout) - - - def addSimulationConfigPanel(self, panel): - assert isinstance(panel, SimulationConfigPanel) - - panel.toggleAdvancedOptions(False) - self._simulation_stack.addWidget(panel) - - simulation_model = panel.getSimulationModel() - - self._simulation_widgets[simulation_model] = panel - self._simulation_mode_combo.addItem(str(simulation_model), simulation_model) - panel.simulationConfigurationChanged.connect(self.validationStatusChanged) - - - def getActions(self): - return [] - - - def toggleAdvancedMode(self, show_advanced): - for panel in self._simulation_widgets.values(): - panel.toggleAdvancedOptions(show_advanced) - - - def getCurrentSimulationModel(self): - data = self._simulation_mode_combo.itemData(self._simulation_mode_combo.currentIndex(), Qt.UserRole) - return data.toPyObject() - - def getSimulationArguments(self): - """ @rtype: dict[str,object]""" - simulation_widget = self._simulation_widgets[self.getCurrentSimulationModel()] - return simulation_widget.getSimulationArguments() - - - def runSimulation(self): - case_name = getCurrentCaseName() - message = "Are you sure you want to use case '%s' for initialization of the initial ensemble when running the simulations?" % case_name - start_simulations = QMessageBox.question(self, "Start simulations?", message, QMessageBox.Yes | QMessageBox.No ) - - if start_simulations == QMessageBox.Yes: - run_model = self.getCurrentSimulationModel() - arguments = self.getSimulationArguments() - dialog = RunDialog(run_model, arguments, self) - dialog.startSimulation() - dialog.exec_() - - ERT.emitErtChange() # simulations may have added new cases. - - - def toggleSimulationMode(self): - widget = self._simulation_widgets[self.getCurrentSimulationModel()] - self._simulation_stack.setCurrentWidget(widget) - self.validationStatusChanged() - - - def validationStatusChanged(self): - widget = self._simulation_widgets[self.getCurrentSimulationModel()] - self.run_button.setEnabled(widget.isConfigurationValid()) diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/CMakeLists.txt b/ThirdParty/Ert/python/python/ert_gui/tools/CMakeLists.txt deleted file mode 100644 index 80bcd31456..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - help_center.py - tool.py -) - -add_python_package("python.ert_gui.tools" ${PYTHON_INSTALL_PREFIX}/ert_gui/tools "${PYTHON_SOURCES}" True) - -add_subdirectory(export) -add_subdirectory(help) -add_subdirectory(ide) -add_subdirectory(load_results) -add_subdirectory(manage_cases) -add_subdirectory(plot) -add_subdirectory(plugins) -add_subdirectory(workflows) diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/__init__.py b/ThirdParty/Ert/python/python/ert_gui/tools/__init__.py deleted file mode 100644 index 17af514901..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -from .help_center import HelpCenter -from .tool import Tool \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/export/CMakeLists.txt b/ThirdParty/Ert/python/python/ert_gui/tools/export/CMakeLists.txt deleted file mode 100644 index 3ff565a6d8..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/export/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - export_panel.py - export_tool.py - exporter.py - export_keyword_model.py - export_model.py -) - -add_python_package("python.ert_gui.tools.export" ${PYTHON_INSTALL_PREFIX}/ert_gui/tools/export "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/export/__init__.py b/ThirdParty/Ert/python/python/ert_gui/tools/export/__init__.py deleted file mode 100644 index 4a34ca171a..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/export/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -from .export_model import ExportModel -from .export_keyword_model import ExportKeywordModel -from .export_panel import ExportPanel -from .exporter import Exporter -from .export_tool import ExportTool diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/export/export_keyword_model.py b/ThirdParty/Ert/python/python/ert_gui/tools/export/export_keyword_model.py deleted file mode 100644 index bae8935f47..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/export/export_keyword_model.py +++ /dev/null @@ -1,123 +0,0 @@ -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file 'export_keyword_model.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from ert.enkf import EnkfVarType, ErtImplType -from ert_gui import ERT - - -class ExportKeywordModel(object): - def __init__(self): - super(ExportKeywordModel, self).__init__() - self.__gen_kw = None - self.__field_kw = None - self.__gen_data = None - self.__gen_param = None - - def getKeylistFromImplType(self, ert_impl_type): - return sorted(ERT.ert.ensembleConfig().getKeylistFromImplType(ert_impl_type)) - - def isDynamicPlot(self, key): - variable_type = self.getVarType(key) - return_value = False - if variable_type == EnkfVarType.DYNAMIC_STATE: - return_value = True - elif variable_type == EnkfVarType.DYNAMIC_RESULT: - return_value = True - - return return_value - - def isDynamicField(self, key): - return self.getVarType(key) == EnkfVarType.DYNAMIC_STATE - - def getVarType(self, key): - config_node = ERT.ert.ensembleConfig().getNode(key) - variable_type = config_node.getVariableType() - return variable_type - - def getImplementationType(self, key): - config_node = ERT.ert.ensembleConfig().getNode(key) - return config_node.getImplementationType() - - def getGenKwKeyWords(self): - if self.__gen_kw is None: - self.__gen_kw = [key for key in ERT.ert.ensembleConfig().getKeylistFromImplType(ErtImplType.GEN_KW)] - - return self.__gen_kw - - def getGenDataKeyWords(self): - if self.__gen_data is None: - gen_data_list = [] - gen_param_list = [] - for key in ERT.ert.ensembleConfig().getKeylistFromImplType(ErtImplType.GEN_DATA): - if self.getVarType(key) == EnkfVarType.PARAMETER: - gen_param_list.append(key) - continue - if ERT.ert.ensembleConfig().getNode(key).getDataModelConfig().getOutputFormat() is not None: - gen_data_list.append(key) - elif ERT.ert.ensembleConfig().getNode(key).getDataModelConfig().getInputFormat() is not None: - gen_data_list.append(key) - self.__gen_data = gen_data_list - self.__gen_param = gen_param_list - return self.__gen_data + self.__gen_param - - def getFieldKeyWords(self): - if self.__field_kw is None: - self.__field_kw = self.getKeylistFromImplType(ErtImplType.FIELD) - - return self.__field_kw - - def getKeyWords(self): - return sorted(self.getFieldKeyWords() + self.getGenKwKeyWords() + self.getGenDataKeyWords()) - - def hasKeywords(self): - keys = self.getKeyWords() - if keys.count > 0: - return True - else: - return False - - def isGenKw(self, key): - if self.__gen_kw is None: - return False - - return key in self.__gen_kw - - def isFieldKw(self, key): - if self.__field_kw is None: - return False - - return key in self.__field_kw - - def isGenDataKw(self, key): - if self.__gen_data is None: - return False - - return key in self.__gen_data - - def isGenParamKw(self, key): - if self.__gen_param is None: - return False - - return key in self.__gen_param - - def getGenDataReportSteps(self, key): - gen_data_list = [] - obs_keys = ERT.ert.ensembleConfig().getNode(key).getObservationKeys() - for obs_key in obs_keys: - obs_vector = ERT.ert.getObservations()[obs_key] - for report_step in obs_vector: - gen_data_list.append(str(report_step)) - - return gen_data_list diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/export/export_model.py b/ThirdParty/Ert/python/python/ert_gui/tools/export/export_model.py deleted file mode 100644 index 7fd345fe08..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/export/export_model.py +++ /dev/null @@ -1,106 +0,0 @@ -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file 'export_model.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -from __future__ import print_function -import os.path -from ert.enkf import EnkfConfigNode, EnkfNode, EnkfFieldFileFormatEnum, ErtImplType -from ert.enkf import GenKw, GenDataFileType, GenData, NodeId -from ert_gui import ERT - - -class ExportModel(object): - def __init__(self): - super(ExportModel, self).__init__() - - def exportField(self, keyword, path, iactive, file_type, report_step, selected_case): - """ - @type keyword: str - @type path: str - @type iactive: BoolVector - @type file_type: EnkfFieldFileFormatEnum - @type report_step: int - @type selected_case: str - """ - - fs = ERT.ert.getEnkfFsManager().getFileSystem(selected_case) - if file_type == EnkfFieldFileFormatEnum.ECL_GRDECL_FILE: - extension = ".grdecl" - elif file_type == EnkfFieldFileFormatEnum.RMS_ROFF_FILE: - extension = ".roff" - - iens_list = iactive.createActiveList() - path_fmt = os.path.join(path, keyword + "_%d" + extension) - config_node = ERT.ert.ensembleConfig()[keyword] - init_file = ERT.ert.fieldInitFile(config_node) - if init_file: - print('Using init file:%s' % init_file) - EnkfNode.exportMany(config_node, path_fmt, fs, iens_list, file_type=file_type, arg=init_file) - return True - - def exportGenKw(self, keyword, path, iactive, file_type, report_step, selected_case): - """ - @type keyword: str - @type path: str - @type iactive: BoolVector - @type file_type: EnkfFieldFileFormatEnum - @type report_step: int - @type selected_case: str - """ - enkf_config_node = ERT.ert.ensembleConfig().getNode(keyword) - assert isinstance(enkf_config_node, EnkfConfigNode) - node = EnkfNode(enkf_config_node) - fs = ERT.ert.getEnkfFsManager().getFileSystem(selected_case) - - for index, value in enumerate(iactive): - if value: - if node.tryLoad(fs, NodeId(report_step, index)): - gen_kw = GenKw.createCReference(node.valuePointer()) - filename = str(path + "/" + keyword + "_{0}").format(index) - if file_type == "Parameter list": - filename += ".txt" - gen_kw.exportParameters(filename) - else: - filename += ".inc" - gen_kw.exportTemplate(filename) - - def exportGenData(self, keyword, path, iactive, file_type, report_step, selected_case): - """ - @type keyword: str - @type path: str - @type iactive: BoolVector - @type file_type: EnkfFieldFileFormatEnum - @type report_step: int - @type selected_case: str - """ - fs = ERT.ert.getEnkfFsManager().getFileSystem(selected_case) - config_node = ERT.ert.ensembleConfig().getNode(keyword) - gen_data_config_node = config_node.getDataModelConfig() - - export_type = gen_data_config_node.getOutputFormat() - if export_type == GenDataFileType.GEN_DATA_UNDEFINED: - export_type = gen_data_config_node.getInputFormat() - - node = EnkfNode(config_node) - - for index, active in enumerate(iactive): - if active: - node_id = NodeId(int(report_step), index) - - if node.tryLoad(fs, node_id): - gen_data = node.asGenData() - - filename = str(path + "/" + keyword + "_{0}").format(index) + ".txt" - gen_data.export(filename, export_type, None) diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/export/export_panel.py b/ThirdParty/Ert/python/python/ert_gui/tools/export/export_panel.py deleted file mode 100644 index 4ba237147b..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/export/export_panel.py +++ /dev/null @@ -1,181 +0,0 @@ -# Copyright (C) 2014 Statoil ASA, Norway. -# -# The file 'export_panel.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from PyQt4.QtCore import QDir, pyqtSignal -from PyQt4.QtGui import QFormLayout, QWidget, QLineEdit, QToolButton, QHBoxLayout, QFileDialog, QComboBox - -from ert_gui.ertwidgets.models.activerealizationsmodel import ActiveRealizationsModel -from ert_gui.ertwidgets.models.all_cases_model import AllCasesModel -from ert_gui.ertwidgets.models.ertmodel import getCurrentCaseName -from ert_gui.ertwidgets.stringbox import StringBox -from ert_gui.ide.keywords.definitions import RangeStringArgument -from ert_gui.tools.export import ExportKeywordModel - - -class ExportPanel(QWidget): - updateExportButton = pyqtSignal(str, bool) - runExport = pyqtSignal(dict) - - def __init__(self, parent=None): - QWidget.__init__(self, parent) - self.setMinimumWidth(500) - self.setMinimumHeight(200) - self._dynamic = False - - self.setWindowTitle("Export data") - self.activateWindow() - - layout = QFormLayout() - current_case = getCurrentCaseName() - - self._case_model = AllCasesModel() - self._case_combo = QComboBox() - self._case_combo.setSizeAdjustPolicy(QComboBox.AdjustToMinimumContentsLength) - self._case_combo.setMinimumContentsLength(20) - self._case_combo.setModel(self._case_model) - self._case_combo.setCurrentIndex(self._case_model.indexOf(current_case)) - layout.addRow("Select case:", self._case_combo) - - self._export_keyword_model = ExportKeywordModel() - - self._kw_model = self._export_keyword_model.getKeyWords() - self._keywords = QComboBox() - self._keywords.addItems(self._kw_model) - layout.addRow("Select keyword:", self._keywords) - - self._active_realizations_model = ActiveRealizationsModel() - self._active_realizations_field = StringBox(self._active_realizations_model, "config/simulation/active_realizations") - self._active_realizations_field.setValidator(RangeStringArgument()) - self._active_realizations_field.getValidationSupport().validationChanged.connect(self.validateExportDialog) - layout.addRow("Active realizations:", self._active_realizations_field) - - file_name_button = QToolButton() - file_name_button.setText("Browse") - file_name_button.clicked.connect(self.selectFileDirectory) - - self._defaultPath = QDir.currentPath() + "/export" - self._file_name = QLineEdit() - self._file_name.setEnabled(False) - self._file_name.setText(self._defaultPath) - self._file_name.textChanged.connect(self.validateExportDialog) - self._file_name.setMinimumWidth(250) - - file_name_layout = QHBoxLayout() - file_name_layout.addWidget(self._file_name) - file_name_layout.addWidget(file_name_button) - layout.addRow("Select directory to save files to:", file_name_layout) - - self._gen_kw_file_types = ["Parameter list", "Template based"] - self._field_kw_file_types = ["Eclipse GRDECL", "RMS roff"] - self._gen_data_file_types = ["Gen data"] - - self._file_type_model = self._field_kw_file_types - self._file_type_combo = QComboBox() - self._file_type_combo.setSizeAdjustPolicy(QComboBox.AdjustToContents) - self._file_type_combo.addItems(self._file_type_model) - layout.addRow("Select file format:", self._file_type_combo) - - self._report_step = QLineEdit() - layout.addRow("Report step:", self._report_step) - - self._gen_data_report_step_model = [] - self._gen_data_report_step = QComboBox() - layout.addRow("Report step:", self._gen_data_report_step) - - self.setLayout(layout) - self._keywords.currentIndexChanged.connect(self.keywordSelected) - self.keywordSelected() - - def selectFileDirectory(self): - directory = QFileDialog().getExistingDirectory(self, "Directory", self._file_name.text(), QFileDialog.ShowDirsOnly) - if str(directory).__len__() > 0: - self._file_name.setText(str(directory)) - - def updateFileExportType(self, keyword): - self._file_type_combo.clear() - if self._export_keyword_model.isGenKw(keyword): - self._file_type_model = self._gen_kw_file_types - elif self._export_keyword_model.isGenParamKw(keyword): - self._file_type_model = self._gen_data_file_types - elif self._export_keyword_model.isGenDataKw(keyword): - self._file_type_model = self._gen_data_file_types - else: - self._file_type_model = self._field_kw_file_types - - self._file_type_combo.addItems(self._file_type_model) - - def export(self): - keyword = self._kw_model[self._keywords.currentIndex()] - report_step = self.getReportStep(keyword) - all_cases = self._case_model.getAllItems() - selected_case = all_cases[self._case_combo.currentIndex()] - path = self._file_name.text() - iactive = self._active_realizations_model.getActiveRealizationsMask() - file_type_key = self._file_type_model[self._file_type_combo.currentIndex()] - values = {"keyword": keyword, - "report_step": report_step, - "iactive": iactive, - "file_type_key": file_type_key, - "path": path, - "selected_case": selected_case} - self.runExport.emit(values) - - def getReportStep(self, key): - report_step = 0 - if self._dynamic: - report_step = self._report_step.text() - - if self._export_keyword_model.isGenParamKw(key): - return report_step - - if self._export_keyword_model.isGenDataKw(key): - report_step = self._gen_data_report_step_model[self._gen_data_report_step.currentIndex()] - - return report_step - - def keywordSelected(self): - key = self._kw_model[self._keywords.currentIndex()] - self.updateFileExportType(key) - self._dynamic = False - if self._export_keyword_model.isFieldKw(key): - self._dynamic = self._export_keyword_model.isDynamicField(key) - - self._report_step.setVisible(self._dynamic) - self.layout().labelForField(self._report_step).setVisible(self._dynamic) - - self._gen_data_report_step.setVisible(self._export_keyword_model.isGenDataKw(key)) - self.layout().labelForField(self._gen_data_report_step).setVisible(self._export_keyword_model.isGenDataKw(key)) - - if self._export_keyword_model.isGenDataKw(key): - data = self._export_keyword_model.getGenDataReportSteps(key) - self._gen_data_report_step_model = data - self._gen_data_report_step.clear() - self._gen_data_report_step.addItems(self._gen_data_report_step_model) - - def setSelectedCase(self, selected_case): - self._case_combo.setCurrentIndex(self._case_model.indexOf(selected_case)) - - def validateExportDialog(self): - validRealizations = False - if self._active_realizations_field.isValid(): - validRealizations = True - - path = str(self._file_name.text()) - validPath = len(path) > 0 - - if validRealizations and validPath: - self.updateExportButton.emit("export", True) - else: - self.updateExportButton.emit("export", False) diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/export/export_tool.py b/ThirdParty/Ert/python/python/ert_gui/tools/export/export_tool.py deleted file mode 100644 index ffecb55406..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/export/export_tool.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (C) 2014 Statoil ASA, Norway. -# -# The file 'export_tool.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from weakref import ref - -from ert_gui.ertwidgets import resourceIcon -from ert_gui.ertwidgets.closabledialog import ClosableDialog -from ert_gui.ertwidgets.models.ertmodel import getCurrentCaseName -from ert_gui.tools import Tool -from ert_gui.tools.export import ExportPanel, Exporter, ExportKeywordModel - - -class ExportTool(Tool): - def __init__(self): - super(ExportTool, self).__init__("Export Data", "tools/export", resourceIcon("ide/table_export")) - self.__export_widget = None - self.__dialog = None - self.__exporter = None - self.setEnabled(ExportKeywordModel().hasKeywords()) - - def trigger(self): - if self.__export_widget is None: - self.__export_widget = ref(ExportPanel(self.parent())) - self.__exporter = Exporter() - self.__export_widget().runExport.connect(self.__exporter.runExport) - - self.__export_widget().setSelectedCase(getCurrentCaseName()) - self.__dialog = ref(ClosableDialog("Export", self.__export_widget(), self.parent())) - self.__export_widget().updateExportButton.connect(self.__dialog().toggleButton) - self.__dialog().addButton("Export", self.export) - self.__dialog().show() - - def export(self): - self.__export_widget().export() - self.__dialog().accept() diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/export/exporter.py b/ThirdParty/Ert/python/python/ert_gui/tools/export/exporter.py deleted file mode 100644 index 6afb88dbfd..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/export/exporter.py +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright (C) 2014 Statoil ASA, Norway. -# -# The file 'export_tool.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -import os -from PyQt4.QtCore import QDir -from PyQt4.QtGui import QMessageBox -from ert.enkf import EnkfFieldFileFormatEnum -from ert_gui.tools.export import ExportModel, ExportKeywordModel - - -class Exporter(): - def __init__(self): - self.__export_keyword_model = ExportKeywordModel() - - def runExport(self, values): - keyword = values["keyword"] - file_name = self.createExportFileNameMask(keyword, values["selected_case"], values["report_step"], values["path"]) - - if self.__export_keyword_model.isFieldKw(keyword): - self.exportField(keyword, file_name, values["iactive"], values["file_type_key"], values["report_step"], values["selected_case"]) - elif self.__export_keyword_model.isGenKw(keyword): - self.exportGenKw(keyword, file_name, values["iactive"], values["file_type_key"], values["report_step"], values["selected_case"]) - elif self.__export_keyword_model.isGenParamKw(keyword) or self.__export_keyword_model.isGenDataKw(keyword): - self.exportGenData(keyword, file_name, values["iactive"], values["file_type_key"], values["report_step"], values["selected_case"]) - - def exportField(self, keyword, file_name, iactive, file_type_key, report_step, selected_case): - if file_type_key == "Eclipse GRDECL": - file_type = EnkfFieldFileFormatEnum.ECL_GRDECL_FILE - else: - file_type = EnkfFieldFileFormatEnum.RMS_ROFF_FILE - - result = ExportModel().exportField(keyword, file_name, iactive, file_type, report_step, selected_case) - if not result: - QMessageBox.warning(self, "Warning", '''Something did not work!''', QMessageBox.Ok) - - def exportGenData(self, keyword, file_name, iactive, file_type_key, report_step, selected_case): - ExportModel().exportGenData(keyword, file_name, iactive, file_type_key, report_step, selected_case) - - def exportGenKw(self, keyword, file_name, iactive, file_type_key, report_step, selected_case): - ExportModel().exportGenKw(keyword, file_name, iactive, file_type_key, report_step, selected_case) - - def createExportFileNameMask(self, keyword, current_case, report_step, path): - impl_type = None - - if self.__export_keyword_model.isFieldKw(keyword): - impl_type = self.__export_keyword_model.getImplementationType(keyword) - elif self.__export_keyword_model.isGenDataKw(keyword): - impl_type = "Gen_Data" - elif self.__export_keyword_model.isGenKw(keyword): - impl_type = "Gen_Kw" - elif self.__export_keyword_model.isGenParamKw(keyword): - impl_type = "Gen_Param" - - path = os.path.join(str(path), str(current_case), str(impl_type), str(keyword)) - - if self.__export_keyword_model.isGenDataKw(keyword): - path = path + "_" + str(report_step) - - if not QDir(path).exists(): - os.makedirs(path) - - return path diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/help/CMakeLists.txt b/ThirdParty/Ert/python/python/ert_gui/tools/help/CMakeLists.txt deleted file mode 100644 index d8698f25ce..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/help/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - help_tool.py - help_window.py -) - -add_python_package("python.ert_gui.tools.help" ${PYTHON_INSTALL_PREFIX}/ert_gui/tools/help "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/help/__init__.py b/ThirdParty/Ert/python/python/ert_gui/tools/help/__init__.py deleted file mode 100644 index bf58faee13..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/help/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -from .help_window import HelpWindow -from .help_tool import HelpTool diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/help/help_tool.py b/ThirdParty/Ert/python/python/ert_gui/tools/help/help_tool.py deleted file mode 100644 index 165cd42704..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/help/help_tool.py +++ /dev/null @@ -1,26 +0,0 @@ -from ert_gui.ertwidgets import resourceIcon -from ert_gui.tools import Tool -from ert_gui.tools.help import HelpWindow - - -class HelpTool(Tool): - __help_window_instance = None - - def __init__(self, help_center_name, parent): - super(HelpTool, self).__init__("Help", "tools/help", resourceIcon("ide/help"), enabled=True, checkable=True) - self.setParent(parent) - - self.help_center_name = help_center_name - - if HelpTool.__help_window_instance is None: - HelpTool.__help_window_instance = HelpWindow(self.help_center_name, parent=self.parent()) - self.__help_window_instance.visibilityChanged.connect(self.getAction().setChecked) - - - def trigger(self): - checked = self.getAction().isChecked() - if checked: - HelpTool.__help_window_instance.show() - else: - HelpTool.__help_window_instance.hide() - diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/help/help_window.py b/ThirdParty/Ert/python/python/ert_gui/tools/help/help_window.py deleted file mode 100644 index 3d4b27cdcf..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/help/help_window.py +++ /dev/null @@ -1,86 +0,0 @@ -from PyQt4.QtCore import Qt, QUrl, pyqtSignal, QSettings -from PyQt4.QtGui import QLabel, QVBoxLayout, QColor, QDesktopServices, QDialog, QMainWindow, QWidget - -from ert_gui.tools import HelpCenter - - -class HelpWindow(QMainWindow): - help_prefix = None - default_help_string = "No help available!" - validation_template = ("" - "" - "" - "" - "
Notice:
%s
" - "") - - visibilityChanged = pyqtSignal(bool) - - def __init__(self, help_center_name, parent=None): - QMainWindow.__init__(self, parent, Qt.WindowStaysOnTopHint) - palette = self.palette() - palette.setColor(self.backgroundRole(), QColor(255, 255, 224)) - self.setPalette(palette) - self.setAutoFillBackground(True) - self.setMinimumWidth(300) - self.setMinimumHeight(250) - self.setWindowTitle("Help") - self.setObjectName("ert-gui-help") - - central_widget = QWidget() - - layout = QVBoxLayout() - central_widget.setLayout(layout) - - self.link_widget = QLabel() - self.link_widget.setStyleSheet("font-weight: bold") - self.link_widget.setMinimumHeight(20) - - self.help_widget = QLabel(HelpWindow.default_help_string) - self.help_widget.setWordWrap(True) - self.help_widget.setTextFormat(Qt.RichText) - self.help_widget.linkActivated.connect(self.openHelpURL) - - layout.addWidget(self.link_widget) - layout.addWidget(self.help_widget) - layout.addStretch(1) - - HelpCenter.getHelpCenter(help_center_name).addListener(self) - - self.__position = None - self.__geometry = None - self.setCentralWidget(central_widget) - - # settings = QSettings("Statoil", "Ert-Gui") - # self.restoreGeometry(settings.value("ert-gui-help/geometry").toByteArray()) - - - def openHelpURL(self, q_string): - url = QUrl(q_string) - QDesktopServices.openUrl(url) - - - def setHelpMessage(self, help_link, message): - self.link_widget.setText(help_link) - self.help_widget.setText(message) - - def showEvent(self, q_show_event): - if self.__geometry is not None and self.__position is not None: - self.setGeometry(self.__geometry) - self.move(self.__position) - self.visibilityChanged.emit(True) - - def hideEvent(self, q_hide_event): - self.__position = self.pos() - self.__geometry = self.geometry() - self.visibilityChanged.emit(False) - - - def keyPressEvent(self, event): - if event.key() != Qt.Key_Escape: - QMainWindow.keyPressEvent(self, event) - - def closeEvent(self, event): - self.hide() - event.ignore() - diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/help_center.py b/ThirdParty/Ert/python/python/ert_gui/tools/help_center.py deleted file mode 100644 index 0be497a559..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/help_center.py +++ /dev/null @@ -1,107 +0,0 @@ -import os - - -class HelpCenter(object): - __default_help_string = "No help available!" - __help_centers = {} - - def __init__(self, name): - if name in HelpCenter.__help_centers: - raise UserWarning("HelpCenter '%s' already exists!") - - super(HelpCenter, self).__init__() - self.__name = name - self.__listeners = [] - self.__help_prefix = "" - self.__current_help_link = "" - self.__help_messages = {} - - HelpCenter.__help_centers[name] = self - - - def setHelpMessageLink(self, help_link): - self.__current_help_link = help_link - - help_message = self.resolveHelpLink(help_link) - - if help_message is not None: - self.__help_messages[help_link] = help_message - else: - self.__help_messages[help_link] = self.__default_help_string - - # if not help_link in self.__help_messages: - # help_message = self.resolveHelpLink(help_link) - # if help_message is not None: - # self.__help_messages[help_link] = help_message - # else: - # self.__help_messages[help_link] = self.__default_help_string - - for listener in self.__listeners: - listener.setHelpMessage(help_link, self.__help_messages[help_link]) - - def addListener(self, listener): - self.__listeners.append(listener) - help_link = self.__current_help_link - listener.setHelpMessage(help_link, self.__help_messages[help_link]) - - - # The setHelpLinkPrefix should be set to point to a directory - # containing (directories) with html help files. In the current - # implementation this variable is set from the gert_main.py script. - def setHelpLinkPrefix(self, prefix): - self.__help_prefix = prefix - - def getTemplate(self): - path = self.__help_prefix + "template.html" - if os.path.exists(path) and os.path.isfile(path): - f = open(path, 'r') - template = f.read() - f.close() - return template - else: - return "%s" - - def resolveHelpLink(self, help_link): - """ - Reads a HTML file from the help directory. - The HTML must follow the specification allowed by QT here: http://doc.trolltech.com/4.6/richtext-html-subset.html - """ - - # This code can be used to find widgets with empty help labels - # if label.strip() == "": - # raise AssertionError("NOOOOOOOOOOOOOOOOOOOOO!!!!!!!!!!!!") - - path = self.__help_prefix + help_link + ".html" - if os.path.exists(path) and os.path.isfile(path): - f = open(path, 'r') - help = f.read() - f.close() - return self.getTemplate() % help - else: - # This code automatically creates empty help files - # sys.stderr.write("Missing help file: '%s'\n" % label) - # if not label == "" and not label.find("/") == -1: - # sys.stderr.write("Creating help file: '%s'\n" % label) - # directory, filename = os.path.split(path) - # - # if not os.path.exists(directory): - # os.makedirs(directory) - # - # file_object = open(path, "w") - # file_object.write(label) - # file_object.close() - return None - - - @classmethod - def getHelpCenter(cls, name): - """ @rtype: HelpCenter """ - return HelpCenter.__help_centers.get(name) - - - @staticmethod - def addHelpToAction(action, link, help_center_name="ERT"): - def showHelp(): - HelpCenter.getHelpCenter(help_center_name).setHelpMessageLink(link) - - action.hovered.connect(showHelp) \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/ide/CMakeLists.txt b/ThirdParty/Ert/python/python/ert_gui/tools/ide/CMakeLists.txt deleted file mode 100644 index 83e6cfc49b..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/ide/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - configuration_panel.py - ide_panel.py - ide_tool.py - ide_window.py -) - -add_python_package("python.ert_gui.tools.ide" ${PYTHON_INSTALL_PREFIX}/ert_gui/tools/ide "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/ide/__init__.py b/ThirdParty/Ert/python/python/ert_gui/tools/ide/__init__.py deleted file mode 100644 index b76ae2cfc5..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/ide/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -from .ide_panel import IdePanel -from .configuration_panel import ConfigurationPanel -from .ide_window import IdeWindow -from .ide_tool import IdeTool diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/ide/configuration_panel.py b/ThirdParty/Ert/python/python/ert_gui/tools/ide/configuration_panel.py deleted file mode 100644 index 64c87e844b..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/ide/configuration_panel.py +++ /dev/null @@ -1,124 +0,0 @@ -import re -import shutil - -from PyQt4.QtCore import pyqtSignal -from PyQt4.QtGui import QWidget, QVBoxLayout, QToolBar, QMessageBox, QSizePolicy, QFileDialog - -from ert_gui.ertwidgets import SearchBox, resourceIcon -from ert_gui.ide.highlighter import KeywordHighlighter -from ert_gui.ide.keywords.definitions.path_argument import PathArgument -from ert_gui.tools.ide import IdePanel - - -class ConfigurationPanel(QWidget): - - reloadApplication = pyqtSignal(str) - - def __init__(self, config_file_path, help_tool): - QWidget.__init__(self) - - layout = QVBoxLayout() - - toolbar = QToolBar("toolbar") - - - save_action = toolbar.addAction(resourceIcon("ide/disk"), "Save") - save_action.triggered.connect(self.save) - - save_as_action = toolbar.addAction(resourceIcon("ide/save_as"), "Save As") - save_as_action.triggered.connect(self.saveAs) - - # reload_icon = toolbar.style().standardIcon(QStyle.SP_BrowserReload) - # reload_action = toolbar.addAction(reload_icon, "Reload") - # reload_action.triggered.connect(self.reload) - - toolbar.addSeparator() - - toolbar.addAction(help_tool.getAction()) - - - stretchy_separator = QWidget() - stretchy_separator.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) - toolbar.addWidget(stretchy_separator) - - - search = SearchBox() - search.setMaximumWidth(200) - search.setContentsMargins(5, 2, 5, 2) - - toolbar.addWidget(search) - - layout.addWidget(toolbar) - - self.ide_panel = IdePanel() - layout.addWidget(self.ide_panel, 1) - - self.config_file_path = config_file_path - - with open(config_file_path) as f: - config_file_text = f.read() - - self.highlighter = KeywordHighlighter(self.ide_panel.document()) - - search.filterChanged.connect(self.highlighter.setSearchString) - - self.parseDefines(config_file_text) - self.ide_panel.document().setPlainText(config_file_text) - - cursor = self.ide_panel.textCursor() - cursor.setPosition(0) - self.ide_panel.setTextCursor(cursor) - self.ide_panel.setFocus() - - - self.setLayout(layout) - - - - def getName(self): - return "Configuration" - - - def save(self): - backup_path = "%s.backup" % self.config_file_path - shutil.copyfile(self.config_file_path, backup_path) - - with open(self.config_file_path, "w") as f: - f.write(self.ide_panel.getText()) - - message = "To make your changes current, a reload of the configuration file is required. Would you like to reload now?" - result = QMessageBox.information(self, "Reload required!", message, QMessageBox.Yes | QMessageBox.No) - - if result == QMessageBox.Yes: - self.reload(self.config_file_path) - - - def saveAs(self): - config_file = QFileDialog.getSaveFileName(self, "Save Configuration File As") - - config_file = str(config_file) - - if len(config_file) > 0: - with open(config_file, "w") as f: - f.write(self.ide_panel.getText()) - - message = "The current configuration file has been saved to a new file. Do you want to restart Ert using the new configuration file?" - result = QMessageBox.information(self, "Restart Ert?", message, QMessageBox.Yes | QMessageBox.No) - - if result == QMessageBox.Yes: - self.reload(config_file) - - - def reload(self, path): - self.reloadApplication.emit(path) - - def start(self): - print("Start!") - - def parseDefines(self, text): - pattern = re.compile("[ \t]*DEFINE[ \t]*(\S+)[ \t]*(\S+)") - - match = re.findall(pattern, text) - - for m in match: - PathArgument.addDefine(m[0], m[1]) diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/ide/ide_panel.py b/ThirdParty/Ert/python/python/ert_gui/tools/ide/ide_panel.py deleted file mode 100644 index 280dde1774..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/ide/ide_panel.py +++ /dev/null @@ -1,211 +0,0 @@ -import re -from PyQt4.QtCore import Qt, QEvent, QDir, QRegExp, QChar -from PyQt4.QtGui import QPlainTextEdit, QTextOption, QCompleter, QStringListModel, QFont, QColor, QShortcut, QKeySequence, QTextCursor, QFileSystemModel, QTextDocument -from ert_gui.tools import HelpCenter - - -class IdePanel(QPlainTextEdit): - def __init__(self): - QPlainTextEdit.__init__(self) - self.setWordWrapMode(QTextOption.NoWrap) - self.setFont(QFont("monospace", 10)) - self.setCursorWidth(2) - self.installEventFilter(self) - - self.cursorPositionChanged.connect(self.showHelp) - - self.completer = QCompleter(self) - self.completer.setWidget(self) - self.completer.setCaseSensitivity(Qt.CaseInsensitive) - self.completer.activated.connect(self.insertCompletion) - - - auto_complete = QShortcut(QKeySequence("Ctrl+Space"), self) - auto_complete.activated.connect(self.activateCompleter) - - copy_line = QShortcut(QKeySequence("Ctrl+D"), self) - copy_line.activated.connect(self.duplicateLine) - - select_fragment = QShortcut(QKeySequence("Ctrl+J"), self) - select_fragment.activated.connect(self.selectFragment) - - def showHelp(self): - text_cursor = self.textCursor() - user_data = text_cursor.block().userData() - - if user_data is not None: - configuration_line = user_data.configuration_line - - if configuration_line.keyword().hasKeywordDefinition(): - HelpCenter.getHelpCenter("ERT").setHelpMessageLink("config/" + configuration_line.documentationLink()) - - - def getText(self): - return self.document().toPlainText() - - - def eventFilter(self, qobject, qevent): - if qobject == self and qevent.type() == QEvent.ToolTip: - text_cursor = self.cursorForPosition(qevent.pos()) - pos = text_cursor.positionInBlock() - - user_data = text_cursor.block().userData() - if user_data is not None: - #: :type: ConfigurationLine - configuration_line = user_data.configuration_line - # if configuration_line.keyword().hasKeywordDefinition(): - # print(configuration_line.keyword().keywordDefinition().documentation) - - if pos in configuration_line.keyword(): - self.setToolTip(configuration_line.validationStatusForToken(configuration_line.keyword()).message()) - else: - for argument in configuration_line.arguments(): - if pos in argument: - self.setToolTip(configuration_line.validationStatusForToken(argument).message()) - - else: - self.setToolTip("") - - - return QPlainTextEdit.eventFilter(self, qobject, qevent) - - - def activateCompleter(self): - text_cursor = self.textCursor() - block = self.document().findBlock(text_cursor.position()) - position_in_block = text_cursor.positionInBlock() - - - - self.selectWordUnderCursor(text_cursor) - word = unicode(text_cursor.selectedText()) - - user_data = block.userData() - - self.completer.setCompletionPrefix(word) - - show_completer = False - if user_data is None: - self.completer.setModel(QStringListModel(self.handler_names)) - show_completer = True - - else: - keyword = user_data.keyword - options = keyword.handler.parameterOptions(keyword, word, position_in_block) - - if len(options) == 1: - self.insertCompletion(options[0]) - elif len(options) > 1: - self.completer.setModel(QStringListModel(options)) - if self.completer.completionCount() == 1: - self.insertCompletion(self.completer.currentCompletion()) - else: - show_completer = True - - - if show_completer: - rect = self.cursorRect(text_cursor) - rect.setWidth(self.completer.popup().sizeHintForColumn(0) + self.completer.popup().verticalScrollBar().sizeHint().width()) - self.completer.complete(rect) - - def keyPressEvent(self, qkeyevent): - if self.completer.popup().isVisible(): - dead_keys = [Qt.Key_Enter, Qt.Key_Return, Qt.Key_Escape, Qt.Key_Tab, Qt.Key_Backtab] - if qkeyevent.key() in dead_keys: - qkeyevent.ignore() - return - - if qkeyevent.modifiers() == Qt.ShiftModifier: - if qkeyevent.key() & Qt.Key_Delete == Qt.Key_Delete: - self.deleteLine() - - QPlainTextEdit.keyPressEvent(self, qkeyevent) - - - def insertCompletion(self, string): - text_cursor = self.textCursor() - self.selectWordUnderCursor(text_cursor) - text_cursor.insertText(string) - - def isCursorInSpace(self): - text_cursor = self.textCursor() - if text_cursor.positionInBlock() > 0: - text_cursor.movePosition(QTextCursor.Left, QTextCursor.MoveAnchor) - text_cursor.movePosition(QTextCursor.Right, QTextCursor.KeepAnchor) - - if text_cursor.positionInBlock() < text_cursor.block().length() - 1: - text_cursor.movePosition(QTextCursor.Right, QTextCursor.KeepAnchor) - - if unicode(text_cursor.selectedText()).strip() == "": - return True - - return False - - def selectWordUnderCursor(self, text_cursor): - if not self.isCursorInSpace(): - # text_cursor.select(QTextCursor.WordUnderCursor) - - # pattern = "[\s|\v|\f|\n|\r|\t|\xe2\x80\xa8|\xe2\x80\xa9]" - # pattern = "[\\s|\\xe2\\x80\\xa9|\\xe2\\x80\\xa8]" - - block_start = 0 - block_end = text_cursor.block().length() - - cursor_pos = text_cursor.positionInBlock() - pos = cursor_pos - pattern = u"[\s\u2029\u2028]" - while pos >= block_start: - text_cursor.movePosition(QTextCursor.Left, QTextCursor.KeepAnchor) - text = text_cursor.selectedText() - if re.search(pattern, text): - break - pos -= 1 - - text_cursor.movePosition(QTextCursor.Right, QTextCursor.MoveAnchor) - - while pos < block_end: - text_cursor.movePosition(QTextCursor.Right, QTextCursor.KeepAnchor) - text = text_cursor.selectedText() - if re.search(pattern, text): - break - pos += 1 - - text_cursor.movePosition(QTextCursor.Left, QTextCursor.KeepAnchor) - - # pattern = "[\\s]" - # start = self.document().find(QRegExp(pattern), text_cursor, QTextDocument.FindBackward | QTextDocument.FindCaseSensitively) - # end = self.document().find(QRegExp(pattern), text_cursor, QTextDocument.FindCaseSensitively) - # block_end_pos = text_cursor.block().position() + text_cursor.block().length() - # - # text_cursor.setPosition(start.position(), QTextCursor.MoveAnchor) - # # text_cursor.setPosition(min(block_end_pos, end.position() - 1), QTextCursor.KeepAnchor) - # text_cursor.setPosition(end.position() - 1, QTextCursor.KeepAnchor) - - - def deleteLine(self): - text_cursor = self.textCursor() - text_cursor.beginEditBlock() - text_cursor.select(QTextCursor.LineUnderCursor) - text_cursor.removeSelectedText() - text_cursor.deletePreviousChar() - - text_cursor.movePosition(QTextCursor.NextBlock) - text_cursor.movePosition(QTextCursor.StartOfLine) - self.setTextCursor(text_cursor) - text_cursor.endEditBlock() - - def duplicateLine(self): - text_cursor = self.textCursor() - text_cursor.beginEditBlock() - text_cursor.select(QTextCursor.LineUnderCursor) - text = text_cursor.selectedText() - text_cursor.movePosition(QTextCursor.EndOfLine) - text_cursor.insertBlock() - text_cursor.insertText(text) - text_cursor.endEditBlock() - - - def selectFragment(self): - text_cursor = self.textCursor() - self.selectWordUnderCursor(text_cursor) - self.setTextCursor(text_cursor) diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/ide/ide_tool.py b/ThirdParty/Ert/python/python/ert_gui/tools/ide/ide_tool.py deleted file mode 100644 index 9c9ca5b4c7..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/ide/ide_tool.py +++ /dev/null @@ -1,24 +0,0 @@ -from weakref import ref - -from ert_gui import ERT -from ert_gui.ertwidgets import resourceIcon -from ert_gui.tools import Tool -from ert_gui.tools.ide import IdeWindow - - -class IdeTool(Tool): - def __init__(self, path, help_tool): - super(IdeTool, self).__init__("Configure", "tools/ide", resourceIcon("ide/widgets")) - - self.ide_window = None - self.path = path - self.help_tool = help_tool - - def trigger(self): - if self.ide_window is None: - self.ide_window = ref(IdeWindow(self.path, self.parent(), self.help_tool)) - self.ide_window().reloadTriggered.connect(ERT.reloadERT) - - self.ide_window().show() - self.ide_window().raise_() - self.ide_window().activateWindow() \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/ide/ide_window.py b/ThirdParty/Ert/python/python/ert_gui/tools/ide/ide_window.py deleted file mode 100644 index b123c7171b..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/ide/ide_window.py +++ /dev/null @@ -1,59 +0,0 @@ -from PyQt4.QtCore import pyqtSignal -from PyQt4.QtGui import QMainWindow - -from ert_gui.tools.ide.configuration_panel import ConfigurationPanel - - -class IdeWindow(QMainWindow): - reloadTriggered = pyqtSignal(str) - - def __init__(self, path, parent, help_tool): - QMainWindow.__init__(self, parent) - - self.resize(900, 900) - - self.__position = None - self.__geometry = None - - self.__configuration_panel = ConfigurationPanel(path, help_tool) - self.__configuration_panel.reloadApplication.connect(self.reloadTriggered) - self.setCentralWidget(self.__configuration_panel) - self.setWindowTitle("Configuration") - self.activateWindow() - - - # wizard_panel = WizardView() - # wizard_panel.addGroup("Parameters") - # wizard_panel.addItemToGroup("Parameters", "Add Summary key") - # wizard_panel.addItemToGroup("Parameters", "Add Field parameter") - # wizard_panel.addItemToGroup("Parameters", "Add Data Keyword") - # wizard_panel.addGroup("Eclipse") - # wizard_panel.addItemToGroup("Eclipse", "Setup Eclipse parameters") - # wizard_panel.addGroup("Observations") - # wizard_panel.addItemToGroup("Observations", "Add Observations") - # wizard_panel.expandAll() - # self.addDock("Wizards", wizard_panel) - - - def closeEvent(self, q_close_event): - self.__position = self.pos() - self.__geometry = self.geometry() - self.hide() - q_close_event.ignore() - - def show(self): - if self.__geometry is not None and self.__position is not None: - self.setGeometry(self.__geometry) - self.move(self.__position) - QMainWindow.show(self) - - # def addDock(self, name, widget, area=Qt.RightDockWidgetArea, allowed_areas=Qt.AllDockWidgetAreas): - # dock_widget = QDockWidget(name) - # dock_widget.setObjectName("%sDock" % name) - # dock_widget.setWidget(widget) - # dock_widget.setAllowedAreas(allowed_areas) - # - # self.addDockWidget(area, dock_widget) - # - # self.__view_menu.addAction(dock_widget.toggleViewAction()) - # return dock_widget diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/load_results/CMakeLists.txt b/ThirdParty/Ert/python/python/ert_gui/tools/load_results/CMakeLists.txt deleted file mode 100644 index ea92b4461c..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/load_results/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - load_results_panel.py - load_results_tool.py - load_results_model.py - -) - -add_python_package("python.ert_gui.tools.load_results" ${PYTHON_INSTALL_PREFIX}/ert_gui/tools/load_results "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/load_results/__init__.py b/ThirdParty/Ert/python/python/ert_gui/tools/load_results/__init__.py deleted file mode 100644 index 783c414edc..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/load_results/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -from .load_results_model import LoadResultsModel -from .load_results_panel import LoadResultsPanel -from .load_results_tool import LoadResultsTool diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/load_results/load_results_model.py b/ThirdParty/Ert/python/python/ert_gui/tools/load_results/load_results_model.py deleted file mode 100644 index 92740e924e..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/load_results/load_results_model.py +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright (C) 2014 Statoil ASA, Norway. -# -# The file 'load_results_model.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -import os - -from ert_gui import ERT - - -class LoadResultsModel(object): - - @staticmethod - def loadResults(selected_case, realisations, iteration): - """ - @type selected_case: str - @type realisations: BoolVector - @type iteration: int - """ - fs = ERT.ert.getEnkfFsManager().getFileSystem(selected_case) - ERT.ert.loadFromForwardModel(realisations, iteration, fs) - - @staticmethod - def isValidRunPath(): - """ @rtype: bool """ - run_path = ERT.ert.getModelConfig().getRunpathAsString() - try: - result = run_path % (0, 0) - return True - except TypeError: - pass - - try: - result = run_path % 0 - return True - except TypeError: - pass - - return False - - @staticmethod - def getCurrentRunPath(): - """ @rtype: str """ - return ERT.ert.getModelConfig().getRunpathAsString() - - - @staticmethod - def getIterationCount(): - """ @rtype: int """ - run_path = ERT.ert.getModelConfig().getRunpathAsString() - try: - results = run_path % (0, 0) - except TypeError: - return 0 - - iteration = 0 - valid_directory = True - while valid_directory: - formatted = run_path % (0, iteration) - valid_directory = os.path.exists(formatted) - if valid_directory: - iteration += 1 - - return iteration - - diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/load_results/load_results_panel.py b/ThirdParty/Ert/python/python/ert_gui/tools/load_results/load_results_panel.py deleted file mode 100644 index d9db135ee9..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/load_results/load_results_panel.py +++ /dev/null @@ -1,90 +0,0 @@ -# Copyright (C) 2014 Statoil ASA, Norway. -# -# The file 'load_results_panel.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from PyQt4.QtGui import QWidget, QFormLayout, QComboBox, QTextEdit - -from ert_gui.ertwidgets.models.activerealizationsmodel import ActiveRealizationsModel -from ert_gui.ertwidgets.models.all_cases_model import AllCasesModel -from ert_gui.ertwidgets.models.ertmodel import getCurrentCaseName -from ert_gui.ertwidgets.models.valuemodel import ValueModel -from ert_gui.ertwidgets.stringbox import StringBox -from ert_gui.ide.keywords.definitions import RangeStringArgument, IntegerArgument -from ert_gui.tools.load_results import LoadResultsModel - - -class LoadResultsPanel(QWidget): - - def __init__(self): - QWidget.__init__(self) - - self.setMinimumWidth(500) - self.setMinimumHeight(200) - self._dynamic = False - - self.setWindowTitle("Load results manually") - self.activateWindow() - - layout = QFormLayout() - current_case = getCurrentCaseName() - - run_path_text = QTextEdit() - run_path_text.setText(self.readCurrentRunPath()) - run_path_text.setDisabled(True) - run_path_text.setFixedHeight(80) - - layout.addRow("Load data from current run path: ",run_path_text) - - self._case_model = AllCasesModel() - self._case_combo = QComboBox() - self._case_combo.setSizeAdjustPolicy(QComboBox.AdjustToMinimumContentsLength) - self._case_combo.setMinimumContentsLength(20) - self._case_combo.setModel(self._case_model) - self._case_combo.setCurrentIndex(self._case_model.indexOf(current_case)) - layout.addRow("Load into case:", self._case_combo) - - - self._active_realizations_model = ActiveRealizationsModel() - self._active_realizations_field = StringBox(self._active_realizations_model, "load_results_manually/Realizations") - self._active_realizations_field.setValidator(RangeStringArgument()) - layout.addRow("Realizations to load:", self._active_realizations_field) - - iterations_count = LoadResultsModel.getIterationCount() - - self._iterations_model = ValueModel(iterations_count) - self._iterations_field = StringBox(self._iterations_model, "load_results_manually/iterations") - self._iterations_field.setValidator(IntegerArgument(from_value=1)) - layout.addRow("Iteration to load:", self._iterations_field) - - self.setLayout(layout) - - def readCurrentRunPath(self): - current_case = getCurrentCaseName() - run_path = LoadResultsModel.getCurrentRunPath() - run_path = run_path.replace("",current_case) - run_path = run_path.replace("",current_case) - return run_path - - - def load(self): - all_cases = self._case_model.getAllItems() - selected_case = all_cases[self._case_combo.currentIndex()] - realizations = self._active_realizations_model.getActiveRealizationsMask() - iteration = self._iterations_model.getActiveIteration() - - LoadResultsModel.loadResults(selected_case, realizations, iteration) - - def setCurrectCase(self): - current_case = getCurrentCaseName() - self._case_combo.setCurrentIndex(self._case_model.indexOf(current_case)) \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/load_results/load_results_tool.py b/ThirdParty/Ert/python/python/ert_gui/tools/load_results/load_results_tool.py deleted file mode 100644 index 88825bb0dc..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/load_results/load_results_tool.py +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (C) 2014 Statoil ASA, Norway. -# -# The file 'load_results_tool.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from ert_gui.ertwidgets import resourceIcon -from ert_gui.ertwidgets.closabledialog import ClosableDialog -from ert_gui.tools import Tool -from ert_gui.tools.load_results import LoadResultsModel -from ert_gui.tools.load_results import LoadResultsPanel - - -class LoadResultsTool(Tool): - def __init__(self): - super(LoadResultsTool, self).__init__("Load results manually", "tools/load_manually", resourceIcon("ide/table_import")) - self.__import_widget = None - self.__dialog = None - self.setVisible(False) - - - - - def trigger(self): - if self.__import_widget is None: - self.__import_widget = LoadResultsPanel() - self.__dialog = ClosableDialog("Load results manually", self.__import_widget, self.parent()) - self.__import_widget.setCurrectCase() - self.__dialog.addButton("Load", self.load) - self.__dialog.exec_() - - def load(self): - self.__import_widget.load() - self.__dialog.accept() - - def toggleAdvancedMode(self, advanced_mode): - self.setVisible(advanced_mode) - if not LoadResultsModel.isValidRunPath(): - self.setEnabled(False) - - diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/manage_cases/CMakeLists.txt b/ThirdParty/Ert/python/python/ert_gui/tools/manage_cases/CMakeLists.txt deleted file mode 100644 index 3f599f743f..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/manage_cases/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - case_init_configuration.py - manage_cases_tool.py -) - -add_python_package("python.ert_gui.tools.manage_cases" ${PYTHON_INSTALL_PREFIX}/ert_gui/tools/manage_cases "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/manage_cases/__init__.py b/ThirdParty/Ert/python/python/ert_gui/tools/manage_cases/__init__.py deleted file mode 100644 index 29c33e538e..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/manage_cases/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .manage_cases_tool import ManageCasesTool diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/manage_cases/case_init_configuration.py b/ThirdParty/Ert/python/python/ert_gui/tools/manage_cases/case_init_configuration.py deleted file mode 100644 index c2173dc3fd..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/manage_cases/case_init_configuration.py +++ /dev/null @@ -1,206 +0,0 @@ -from PyQt4.QtGui import QToolButton, QTextEdit, QTabWidget, QWidget, QVBoxLayout, QHBoxLayout, QLabel, QPushButton, QSpinBox -from PyQt4.QtCore import Qt - -from ert_gui import ERT -from ert_gui.ertwidgets import addHelpToWidget, showWaitCursorWhileWaiting -from ert_gui.ertwidgets.caselist import CaseList -from ert_gui.ertwidgets.caseselector import CaseSelector -from ert_gui.ertwidgets.checklist import CheckList -from ert_gui.ertwidgets.models.ertmodel import getRealizationCount, initializeCurrentCaseFromScratch, getCaseRealizationStates, getParameterList, getHistoryLength, \ - initializeCurrentCaseFromExisting, getCurrentCaseName -from ert_gui.ertwidgets.models.selectable_list_model import SelectableListModel - - -def createCheckLists(): - parameter_model = SelectableListModel([]) - - parameter_model.getList = getParameterList - parameter_check_list = CheckList(parameter_model, "Parameters", "init/select_parameters") - parameter_check_list.setMaximumWidth(300) - - members_model = SelectableListModel([]) - - def getMemberList(): - return [str(member) for member in range(getRealizationCount())] - - members_model.getList = getMemberList - member_check_list = CheckList(members_model, "Members", "init/select_members") - member_check_list.setMaximumWidth(150) - return createRow(parameter_check_list, member_check_list), parameter_model, members_model - - -def createRow(*widgets): - row = QHBoxLayout() - - for widget in widgets: - row.addWidget(widget) - - row.addStretch() - return row - - -class CaseInitializationConfigurationPanel(QTabWidget): - @showWaitCursorWhileWaiting - def __init__(self): - QTabWidget.__init__(self) - self.setWindowTitle("Case Management") - self.setMinimumWidth(600) - - self.addCreateNewCaseTab() - self.addInitializeFromScratchTab() - self.addInitializeFromExistingTab() - self.addShowCaseInfo() - - def addCreateNewCaseTab(self): - panel = QWidget() - layout = QVBoxLayout() - case_list = CaseList() - case_list.setMaximumWidth(250) - - layout.addWidget(case_list) - layout.addStretch() - - panel.setLayout(layout) - - self.addTab(panel, "Create new case") - - def addInitializeFromScratchTab(self): - panel = QWidget() - layout = QVBoxLayout() - - row1 = createRow(QLabel("Target case:"), CaseSelector()) - layout.addLayout(row1) - - check_list_layout, parameter_model, members_model = createCheckLists() - layout.addLayout(check_list_layout) - - layout.addSpacing(10) - - initialize_button = QPushButton("Initialize") - addHelpToWidget(initialize_button, "init/initialize_from_scratch") - initialize_button.setMinimumWidth(75) - initialize_button.setMaximumWidth(150) - - def initializeFromScratch(): - parameters = parameter_model.getSelectedItems() - members = members_model.getSelectedItems() - initializeCurrentCaseFromScratch(parameters, members) - - initialize_button.clicked.connect(initializeFromScratch) - layout.addWidget(initialize_button, 0, Qt.AlignCenter) - - layout.addSpacing(10) - - panel.setLayout(layout) - self.addTab(panel, "Initialize from scratch") - - def addInitializeFromExistingTab(self): - widget = QWidget() - layout = QVBoxLayout() - - target_case = CaseSelector() - row = createRow(QLabel("Target case:"), target_case) - layout.addLayout(row) - - source_case = CaseSelector(update_ert=False, show_only_initialized=True, ignore_current=True) - row = createRow(QLabel("Source case:"), source_case) - layout.addLayout(row) - - row, history_length_spinner = self.createTimeStepRow() - layout.addLayout(row) - - layout.addSpacing(10) - check_list_layout, parameter_model, members_model = createCheckLists() - layout.addLayout(check_list_layout) - layout.addSpacing(10) - - initialize_button = QPushButton("Initialize") - addHelpToWidget(initialize_button, "init/initialize_from_existing") - initialize_button.setMinimumWidth(75) - initialize_button.setMaximumWidth(150) - - def initializeFromExisting(): - source_case_name = str(source_case.currentText()) - target_case_name = str(target_case.currentText()) - report_step = history_length_spinner.value() - parameters = parameter_model.getSelectedItems() - members = members_model.getSelectedItems() - initializeCurrentCaseFromExisting(source_case_name, target_case_name, report_step, parameters, members) - - initialize_button.clicked.connect(initializeFromExisting) - layout.addWidget(initialize_button, 0, Qt.AlignCenter) - - - layout.addSpacing(10) - - layout.addStretch() - widget.setLayout(layout) - self.addTab(widget, "Initialize from existing") - - def createTimeStepRow(self): - history_length_spinner = QSpinBox() - addHelpToWidget(history_length_spinner, "config/init/history_length") - history_length_spinner.setMinimum(0) - history_length_spinner.setMaximum(getHistoryLength()) - - initial = QToolButton() - initial.setText("Initial") - addHelpToWidget(initial, "config/init/history_length") - - def setToMin(): - history_length_spinner.setValue(0) - - initial.clicked.connect(setToMin) - - end_of_time = QToolButton() - end_of_time.setText("End of time") - addHelpToWidget(end_of_time, "config/init/history_length") - - def setToMax(): - history_length_spinner.setValue(getHistoryLength()) - - end_of_time.clicked.connect(setToMax) - - row = createRow(QLabel("Timestep:"), history_length_spinner, initial, end_of_time) - - return row, history_length_spinner - - def addShowCaseInfo(self): - case_widget = QWidget() - layout = QVBoxLayout() - - case_selector = CaseSelector(update_ert=False, help_link="init/selected_case_info") - row1 = createRow(QLabel("Select case:"), case_selector) - - layout.addLayout(row1) - - self._case_info_area = QTextEdit() - self._case_info_area.setReadOnly(True) - self._case_info_area.setMinimumHeight(300) - - row2 = createRow(QLabel("Case info:"), self._case_info_area) - - layout.addLayout(row2) - - case_widget.setLayout(layout) - - case_selector.currentIndexChanged[str].connect(self._showInfoForCase) - ERT.ertChanged.connect(self._showInfoForCase) - - self.addTab(case_widget, "Case Info") - - self._showInfoForCase() - - def _showInfoForCase(self, case_name=None): - if case_name is None: - case_name = getCurrentCaseName() - - states = getCaseRealizationStates(str(case_name)) - - html = "" - for index in range(len(states)): - html += "" % (index, str(states[index])) - - html += "
%d.%s
" - - self._case_info_area.setHtml(html) diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/manage_cases/manage_cases_tool.py b/ThirdParty/Ert/python/python/ert_gui/tools/manage_cases/manage_cases_tool.py deleted file mode 100644 index d593a138a4..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/manage_cases/manage_cases_tool.py +++ /dev/null @@ -1,20 +0,0 @@ -from ert_gui.ertwidgets import resourceIcon -from ert_gui.ertwidgets.closabledialog import ClosableDialog -from ert_gui.tools import Tool -from ert_gui.tools.manage_cases.case_init_configuration import CaseInitializationConfigurationPanel - - -class ManageCasesTool(Tool): - def __init__(self): - super(ManageCasesTool, self).__init__("Manage Cases", "tools/manage_cases", resourceIcon("ide/database_gear")) - - - def trigger(self): - case_management_widget = CaseInitializationConfigurationPanel() - - dialog = ClosableDialog("Manage Cases", case_management_widget, self.parent()) - dialog.exec_() - - - - diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plot/CMakeLists.txt b/ThirdParty/Ert/python/python/ert_gui/tools/plot/CMakeLists.txt deleted file mode 100644 index 8a94170f99..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plot/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - color_chooser.py - data_type_keys_list_model.py - data_type_keys_widget.py - data_type_proxy_model.py - filter_popup.py - plot_case_model.py - plot_case_selection_widget.py - plot_tool.py - plot_widget.py - plot_window.py - style_chooser.py -) - -add_python_package("python.ert_gui.tools.plot" ${PYTHON_INSTALL_PREFIX}/ert_gui/tools/plot "${PYTHON_SOURCES}" True) - -add_subdirectory(customize) -add_subdirectory(widgets) diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plot/__init__.py b/ThirdParty/Ert/python/python/ert_gui/tools/plot/__init__.py deleted file mode 100644 index 3bc05020ef..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plot/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -from .plot_widget import PlotWidget - -from .filter_popup import FilterPopup - -from .data_type_keys_list_model import DataTypeKeysListModel -from .data_type_proxy_model import DataTypeProxyModel -from .data_type_keys_widget import DataTypeKeysWidget - -from .plot_case_model import PlotCaseModel -from .plot_case_selection_widget import CaseSelectionWidget - -from .color_chooser import ColorBox -from .style_chooser import StyleChooser - -from .plot_window import PlotWindow -from .plot_tool import PlotTool - - - diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plot/color_chooser.py b/ThirdParty/Ert/python/python/ert_gui/tools/plot/color_chooser.py deleted file mode 100644 index 834389736f..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plot/color_chooser.py +++ /dev/null @@ -1,54 +0,0 @@ -from PyQt4.QtCore import QSize, QRect, pyqtSignal -from PyQt4.QtGui import QWidget, QPainter, QHBoxLayout, QLabel, QFrame, QColor, QColorDialog - - -class ColorBox(QFrame): - colorChanged = pyqtSignal(QColor) - - """A widget that shows a colored box""" - def __init__(self, color, size=15): - QFrame.__init__(self) - self.setFrameStyle(QFrame.Panel | QFrame.Sunken) - self.setMaximumSize(QSize(size, size)) - self.setMinimumSize(QSize(size, size)) - - self._tile_colors = [QColor(255, 255, 255), QColor(200, 200, 255)] - self._color = color - - def paintEvent(self, paint_event): - """Paints the box""" - painter = QPainter(self) - rect = self.contentsRect() - tile_count = 3 - tile_size = rect.width() / tile_count - painter.save() - painter.translate(rect.x(), rect.y()) - - for y in range(tile_count): - for x in range(tile_count): - color_index = (y * tile_count + x) % 2 - tile_rect = QRect(x * tile_size, y * tile_size, tile_size, tile_size) - painter.fillRect(tile_rect, self._tile_colors[color_index]) - - painter.restore() - painter.fillRect(rect, self._color) - - QFrame.paintEvent(self, paint_event) - - def mouseReleaseEvent(self, QMouseEvent): - color = QColorDialog.getColor(self._color, self, "Select color", QColorDialog.ShowAlphaChannel) - - if color.isValid(): - self._color = color - self.update() - self.colorChanged.emit(self._color) - - @property - def color(self): - """ @rtype: QColor """ - return self._color - - @color.setter - def color(self, color): - self._color = QColor(color) - self.update() diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plot/customize/CMakeLists.txt b/ThirdParty/Ert/python/python/ert_gui/tools/plot/customize/CMakeLists.txt deleted file mode 100644 index 291759bac9..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plot/customize/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - customization_view.py - customize_plot_dialog.py - default_customization_view.py - limits_customization_view.py - statistics_customization_view.py - style_customization_view.py -) - -add_python_package("python.ert_gui.tools.plot.customize" ${PYTHON_INSTALL_PREFIX}/ert_gui/tools/plot/customize "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plot/customize/__init__.py b/ThirdParty/Ert/python/python/ert_gui/tools/plot/customize/__init__.py deleted file mode 100644 index 99e83000c2..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plot/customize/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -from ert_gui.tools.plot.customize.customization_view import CustomizationView, WidgetProperty -from ert_gui.tools.plot.customize.default_customization_view import DefaultCustomizationView -from ert_gui.tools.plot.customize.style_customization_view import StyleCustomizationView -from ert_gui.tools.plot.customize.limits_customization_view import LimitsCustomizationView -from ert_gui.tools.plot.customize.statistics_customization_view import StatisticsCustomizationView -from ert_gui.tools.plot.customize.customize_plot_dialog import PlotCustomizer diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plot/customize/customization_view.py b/ThirdParty/Ert/python/python/ert_gui/tools/plot/customize/customization_view.py deleted file mode 100644 index abd3f92b71..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plot/customize/customization_view.py +++ /dev/null @@ -1,143 +0,0 @@ -from PyQt4.QtGui import QWidget, QFormLayout, QSpacerItem, QCheckBox, QHBoxLayout, QSpinBox - -from ert_gui.plottery import PlotConfig -from ert_gui.tools.plot import StyleChooser -from ert_gui.tools.plot.widgets.clearable_line_edit import ClearableLineEdit - - -class CustomizationView(QWidget): - def __init__(self): - QWidget.__init__(self) - - self._layout = QFormLayout() - self.setLayout(self._layout) - self._widgets = {} - - - def addRow(self, title, widget): - self._layout.addRow(title, widget) - - def addLineEdit(self, attribute_name, title, tool_tip=None, placeholder=""): - self[attribute_name] = ClearableLineEdit(placeholder=placeholder) - self.addRow(title, self[attribute_name]) - - if tool_tip is not None: - self[attribute_name].setToolTip(tool_tip) - - def getter(self): - value = str(self[attribute_name].text()) - if value == "": - value = None - return value - - def setter(self, value): - if value is None: - value = "" - self[attribute_name].setText(str(value)) - - self.updateProperty(attribute_name, getter, setter) - - def addCheckBox(self, attribute_name, title, tool_tip=None): - self[attribute_name] = QCheckBox() - self.addRow(title, self[attribute_name]) - - if tool_tip is not None: - self[attribute_name].setToolTip(tool_tip) - - def getter(self): - return self[attribute_name].isChecked() - - def setter(self, value): - self[attribute_name].setChecked(value) - - self.updateProperty(attribute_name, getter, setter) - - def addSpinBox(self, attribute_name, title, tool_tip=None, min_value=1, max_value=10, single_step=1): - sb = QSpinBox() - self[attribute_name] = sb - sb.setMaximumHeight(25) - sb_layout = QHBoxLayout() - sb_layout.addWidget(sb) - sb_layout.addStretch() - self.addRow(title, sb_layout) - - if tool_tip is not None: - sb.setToolTip(tool_tip) - - sb.setMinimum(min_value) - sb.setMaximum(max_value) - sb.setSingleStep(single_step) - - def getter(self): - return self[attribute_name].value() - - def setter(self, value): - self[attribute_name].setValue(value) - - self.updateProperty(attribute_name, getter, setter) - return sb - - def addStyleChooser(self, attribute_name, title, tool_tip=None, area_supported=False): - style_chooser = StyleChooser(area_supported=area_supported) - self[attribute_name] = style_chooser - self.addRow(title, self[attribute_name]) - - if tool_tip is not None: - self[attribute_name].setToolTip(tool_tip) - - def getter(self): - return self[attribute_name].getStyle() - - def setter(self, style): - self[attribute_name].setStyle(style) - - self.updateProperty(attribute_name, getter, setter) - - def updateProperty(self, attribute_name, getter, setter): - setattr(self.__class__, attribute_name, property(getter, setter)) - - def setWidgetEnabled(self, attribute_name, enabled): - widget = self[attribute_name] - widget.setEnabled(enabled) - widget.setHidden(enabled) - label = self._layout.labelForField(widget) - label.setEnabled(enabled) - label.setHidden(enabled) - - def addSpacing(self, pixels=10): - self._layout.addItem(QSpacerItem(1, pixels)) - - def addHeading(self, title): - self.addSpacing(10) - self._layout.addRow(title, None) - self.addSpacing(1) - - def __getitem__(self, item): - """ - @rtype: QWidget - """ - return self._widgets[item] - - def __setitem__(self, key, value): - self._widgets[key] = value - - def applyCustomization(self, plot_config): - """ - @type plot_config: PlotConfig - """ - raise NotImplementedError("Class '%s' has not implemented the applyCustomization() function!" % self.__class__.__name__) - - def revertCustomization(self, plot_config): - """ - @type plot_config: PlotConfig - """ - raise NotImplementedError("Class '%s' has not implemented the revertCustomization() function!" % self.__class__.__name__) - - - -class WidgetProperty(object): - def __get__(self, instance, owner): - raise UserWarning("Property is invalid!") - - def __set__(self, instance, value): - raise UserWarning("Property is invalid!") diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plot/customize/customize_plot_dialog.py b/ThirdParty/Ert/python/python/ert_gui/tools/plot/customize/customize_plot_dialog.py deleted file mode 100644 index d44385f137..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plot/customize/customize_plot_dialog.py +++ /dev/null @@ -1,241 +0,0 @@ -from PyQt4.QtCore import Qt, pyqtSignal, QObject -from PyQt4.QtGui import QDialog, QVBoxLayout, QLayout, QTabWidget, QHBoxLayout, QPushButton, QToolButton, QMenu, QWidgetAction, QListWidget - -from ert_gui.ertwidgets import resourceIcon -from ert_gui.plottery import PlotConfig, PlotConfigHistory -from ert_gui.tools.plot.customize import DefaultCustomizationView, StyleCustomizationView, StatisticsCustomizationView, LimitsCustomizationView - - -class PlotCustomizer(QObject): - - settingsChanged = pyqtSignal() - - def __init__(self, parent): - super(PlotCustomizer, self).__init__() - - self._plot_config_key = None - self._previous_key = None - self._plot_configs = {None: PlotConfigHistory("No_Key_Selected", PlotConfig(None))} - - self._plotConfigCreator = self._defaultPlotConfigCreator - - self._customization_dialog = CustomizePlotDialog("Customize", parent) - - self._customization_dialog.addTab("general", "General", DefaultCustomizationView()) - self._customization_dialog.addTab("style", "Style", StyleCustomizationView()) - self._customization_dialog.addTab("statistics", "Statistics", StatisticsCustomizationView()) - - self._customize_limits = LimitsCustomizationView() - self._customization_dialog.addTab("limits", "Limits", self._customize_limits) - - self._customization_dialog.applySettings.connect(self.applyCustomization) - self._customization_dialog.undoSettings.connect(self.undoCustomization) - self._customization_dialog.redoSettings.connect(self.redoCustomization) - self._customization_dialog.resetSettings.connect(self.resetCustomization) - self._customization_dialog.copySettings.connect(self.copyCustomization) - - self._revertCustomization(self.getPlotConfig()) - - - def _getPlotConfigHistory(self): - """ @rtype: PlotConfigHistory """ - return self._plot_configs[self._plot_config_key] - - def undoCustomization(self): - history = self._getPlotConfigHistory() - history.undoChanges() - self._revertCustomization(history.getPlotConfig()) - - def redoCustomization(self): - history = self._getPlotConfigHistory() - history.redoChanges() - self._revertCustomization(history.getPlotConfig()) - - def resetCustomization(self): - history = self._getPlotConfigHistory() - history.resetChanges() - self._revertCustomization(history.getPlotConfig()) - - - def applyCustomization(self): - history = self._getPlotConfigHistory() - plot_config = history.getPlotConfig() - if self._customization_dialog is not None: - for customization_view in self._customization_dialog: - customization_view.applyCustomization(plot_config) - - history.applyChanges(plot_config) - - self._emitChangedSignal() - - - def _revertCustomization(self, plot_config, emit=True): - if self._customization_dialog is not None: - for customization_view in self._customization_dialog: - customization_view.revertCustomization(plot_config) - - self._emitChangedSignal(emit) - - def _emitChangedSignal(self, emit=True): - history = self._getPlotConfigHistory() - self._customization_dialog.setUndoRedoCopyState(history.isUndoPossible(), history.isRedoPossible(), self.isCopyPossible()) - - if emit: - self.settingsChanged.emit() - - def isCopyPossible(self): - """ @rtype: bool """ - return len(self._plot_configs) > 2 - - def copyCustomization(self, key): - key = str(key) - if self.isCopyPossible(): - source_config = self._plot_configs[key].getPlotConfig() - source_config.setTitle(None) - - history = self._getPlotConfigHistory() - history.applyChanges(source_config) - - self._revertCustomization(history.getPlotConfig()) - - def toggleCustomizationDialog(self): - if self._customization_dialog.isVisible(): - self._customization_dialog.hide() - else: - self._customization_dialog.show() - - def _defaultPlotConfigCreator(self, title): - return PlotConfig(title) - - def _selectiveCopyOfCurrentPlotConfig(self, title): - return self._plotConfigCreator(title) - - def switchPlotConfigHistory(self, key): - if key != self._plot_config_key: - if not key in self._plot_configs: - self._plot_configs[key] = PlotConfigHistory(key, self._selectiveCopyOfCurrentPlotConfig(key)) - self._customization_dialog.addCopyableKey(key) - self._previous_key = self._plot_config_key - self._plot_config_key = key - self._revertCustomization(self.getPlotConfig(), emit=False) - - def getPlotConfig(self): - """ @rtype: PlotConfig """ - return self._getPlotConfigHistory().getPlotConfig() - - def setAxisTypes(self, x_axis_type, y_axis_type): - self._customize_limits.setAxisTypes(x_axis_type, y_axis_type) - - def setPlotConfigCreator(self, func): - self._plotConfigCreator = func - - -class CustomizePlotDialog(QDialog): - applySettings = pyqtSignal() - undoSettings = pyqtSignal() - redoSettings = pyqtSignal() - resetSettings = pyqtSignal() - copySettings = pyqtSignal(str) - - def __init__(self, title, parent=None): - QDialog.__init__(self, parent) - self.setWindowTitle(title) - self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) - self.setWindowFlags(self.windowFlags() & ~Qt.WindowCloseButtonHint) - self.setWindowFlags(self.windowFlags() & ~Qt.WindowCancelButtonHint) - - self._tab_map = {} - self._tab_order = [] - - layout = QVBoxLayout() - - self._tabs = QTabWidget() - layout.addWidget(self._tabs) - layout.setSizeConstraint(QLayout.SetFixedSize) # not resizable!!! - - self._button_layout = QHBoxLayout() - - self._reset_button = QToolButton() - self._reset_button.setIcon(resourceIcon("update.png")) - self._reset_button.setToolTip("Reset all settings back to default") - self._reset_button.clicked.connect(self.resetSettings) - - self._undo_button = QToolButton() - self._undo_button.setIcon(resourceIcon("undo.png")) - self._undo_button.setToolTip("Undo") - self._undo_button.clicked.connect(self.undoSettings) - - self._redo_button = QToolButton() - self._redo_button.setIcon(resourceIcon("redo.png")) - self._redo_button.setToolTip("Redo") - self._redo_button.clicked.connect(self.redoSettings) - self._redo_button.setEnabled(False) - - self._copy_button = QToolButton() - self._copy_button.setIcon(resourceIcon("page_copy.png")) - self._copy_button.setToolTip("Copy settings from another key") - self._copy_button.setPopupMode(QToolButton.InstantPopup) - self._copy_button.setEnabled(False) - - tool_menu = QMenu(self._copy_button) - self._popup_list = QListWidget(tool_menu) - self._popup_list.setSortingEnabled(True) - self._popup_list.itemClicked.connect(self.keySelected) - action = QWidgetAction(tool_menu) - action.setDefaultWidget(self._popup_list) - tool_menu.addAction(action) - self._copy_button.setMenu(tool_menu) - - - self._apply_button = QPushButton("Apply") - self._apply_button.setToolTip("Apply the new settings") - self._apply_button.clicked.connect(self.applySettings) - self._apply_button.setDefault(True) - - self._close_button = QPushButton("Close") - self._close_button.setToolTip("Hide this dialog") - self._close_button.clicked.connect(self.hide) - - self._button_layout.addWidget(self._reset_button) - self._button_layout.addStretch() - self._button_layout.addWidget(self._undo_button) - self._button_layout.addWidget(self._redo_button) - self._button_layout.addWidget(self._copy_button) - self._button_layout.addStretch() - self._button_layout.addWidget(self._apply_button) - self._button_layout.addWidget(self._close_button) - - layout.addStretch() - layout.addLayout(self._button_layout) - - self.setLayout(layout) - - def addCopyableKey(self, key): - self._popup_list.addItem(key) - - def keySelected(self, list_widget_item): - self.copySettings.emit(str(list_widget_item.text())) - - def keyPressEvent(self, q_key_event): - if q_key_event.key() == Qt.Key_Escape: - self.hide() - else: - QDialog.keyPressEvent(self, q_key_event) - - def addTab(self, attribute_name, title, widget): - self._tabs.addTab(widget, title) - self._tab_map[attribute_name] = widget - self._tab_order.append(attribute_name) - - def __getitem__(self, item): - """ @rtype: ert_gui.tools.plot.customize.customization_view.CustomizationView """ - return self._tab_map[item] - - def __iter__(self): - for attribute_name in self._tab_order: - yield self._tab_map[attribute_name] - - def setUndoRedoCopyState(self, undo, redo, copy=False): - self._undo_button.setEnabled(undo) - self._redo_button.setEnabled(redo) - self._copy_button.setEnabled(copy) \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plot/customize/default_customization_view.py b/ThirdParty/Ert/python/python/ert_gui/tools/plot/customize/default_customization_view.py deleted file mode 100644 index 5cd8e1f764..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plot/customize/default_customization_view.py +++ /dev/null @@ -1,69 +0,0 @@ -from ert_gui.tools.plot.customize import CustomizationView, WidgetProperty - - -class DefaultCustomizationView(CustomizationView): - - title = WidgetProperty() - x_label = WidgetProperty() - y_label = WidgetProperty() - legend = WidgetProperty() - grid = WidgetProperty() - refcase = WidgetProperty() - history = WidgetProperty() - observations = WidgetProperty() - - - def __init__(self): - CustomizationView.__init__(self) - label_msg = "Set to empty to use the default %s.\n" \ - "It is also possible to use LaTeX. Enclose expression with $...$ for example: \n" \ - "$\\alpha > \\beta$\n" \ - "$r^3$\n" \ - "$\\frac{1}{x}$\n" \ - "$\\sqrt{2}$" - - self.addLineEdit("title", "Title", "The title of the plot. %s" % (label_msg % "title"), placeholder="Title") - self.addSpacing() - self.addLineEdit("x_label", "X Label", "The label of the X axis. %s" % (label_msg % "label"), placeholder="X Label") - self.addLineEdit("y_label", "Y Label", "The label of the Y axis. %s" % (label_msg % "label"), placeholder="Y Label") - self.addSpacing() - self.addCheckBox("legend", "Legend", "Toggle Legend visibility.") - self.addCheckBox("grid", "Grid", "Toggle Grid visibility.") - self.addCheckBox("refcase", "Refcase", "Toggle Refcase visibility.") - self.addCheckBox("history", "History", "Toggle History visibility.") - self.addCheckBox("observations", "Observations", "Toggle Observations visibility.") - - - def applyCustomization(self, plot_config): - """ - @type plot_config: ert_gui.plottery.PlotConfig - """ - plot_config.setTitle(self.title) - - plot_config.setXLabel(self.x_label) - plot_config.setYLabel(self.y_label) - - plot_config.setLegendEnabled(self.legend) - plot_config.setGridEnabled(self.grid) - plot_config.setRefcaseEnabled(self.refcase) - plot_config.setHistoryEnabled(self.history) - plot_config.setObservationsEnabled(self.observations) - - - def revertCustomization(self, plot_config): - """ - @type plot_config: ert_gui.plottery.PlotConfig - """ - if not plot_config.isUnnamed(): - self.title = plot_config.title() - else: - self.title = "" - - self.x_label = plot_config.xLabel() - self.y_label = plot_config.yLabel() - - self.legend = plot_config.isLegendEnabled() - self.grid = plot_config.isGridEnabled() - self.refcase = plot_config.isRefcaseEnabled() - self.history = plot_config.isHistoryEnabled() - self.observations = plot_config.isObservationsEnabled() diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plot/customize/limits_customization_view.py b/ThirdParty/Ert/python/python/ert_gui/tools/plot/customize/limits_customization_view.py deleted file mode 100644 index 90b4dadfb7..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plot/customize/limits_customization_view.py +++ /dev/null @@ -1,251 +0,0 @@ -from PyQt4.QtGui import QDoubleValidator, QStackedWidget, QIntValidator, QLabel -from ert_gui.tools.plot.widgets.custom_date_edit import CustomDateEdit - -from ert_gui.plottery import PlotContext -from ert_gui.plottery.plot_limits import PlotLimits -from ert_gui.tools.plot.customize import CustomizationView -from ert_gui.tools.plot.widgets.clearable_line_edit import ClearableLineEdit - - -class StackedInput(QStackedWidget): - def __init__(self): - QStackedWidget.__init__(self) - self._inputs = {} - self._index_map = {} - self.addInput(PlotContext.UNKNOWN_AXIS, QLabel("Fixed")) - self._current_name = PlotContext.UNKNOWN_AXIS - - def addInput(self, name, widget): - index = self.addWidget(widget) - self._inputs[name] = widget - self._index_map[name] = index - - def switchToInput(self, name): - index_for_name = self._index_map[name] - self.setCurrentIndex(index_for_name) - self._current_name = name - - def getCurrentInputName(self): - return self._current_name - - -class LimitsStack(StackedInput): - FLOAT_AXIS = [PlotContext.VALUE_AXIS, PlotContext.DENSITY_AXIS, PlotContext.DEPTH_AXIS] - INT_AXIS = [PlotContext.INDEX_AXIS, PlotContext.COUNT_AXIS] - NUMBER_AXIS = FLOAT_AXIS + INT_AXIS - - def __init__(self): - StackedInput.__init__(self) - self.addInput(PlotContext.COUNT_AXIS, self.createIntegerLineEdit(minimum=0, placeholder="Default value")) - self.addInput(PlotContext.DATE_AXIS, CustomDateEdit()) - self.addInput(PlotContext.DENSITY_AXIS, self.createDoubleLineEdit(minimum=0, placeholder="Default value")) - self.addInput(PlotContext.DEPTH_AXIS, self.createDoubleLineEdit(minimum=0, placeholder="Default value")) - self.addInput(PlotContext.INDEX_AXIS, self.createIntegerLineEdit(minimum=0, placeholder="Default value")) - self.addInput(PlotContext.VALUE_AXIS, self.createDoubleLineEdit(placeholder="Default value")) - - def createDoubleLineEdit(self, minimum=None, maximum=None, placeholder=""): - line_edit = ClearableLineEdit(placeholder=placeholder) - validator = QDoubleValidator() - - if minimum is not None: - validator.setBottom(minimum) - - if maximum is not None: - validator.setTop(maximum) - - line_edit.setValidator(validator) - return line_edit - - def createIntegerLineEdit(self, minimum=None, maximum=None, placeholder=""): - line_edit = ClearableLineEdit(placeholder=placeholder) - validator = QIntValidator() - - if minimum is not None: - validator.setBottom(minimum) - - if maximum is not None: - validator.setTop(maximum) - - line_edit.setValidator(validator) - return line_edit - - def setValue(self, axis_name, value): - input = self._inputs[axis_name] - - if axis_name in LimitsStack.NUMBER_AXIS: - if value is None: - input.setText("") - else: - input.setText(str(value)) - elif axis_name == PlotContext.DATE_AXIS: - input.setDate(value) - - def getValue(self, axis_name): - input = self._inputs[axis_name] - result = None - if axis_name in LimitsStack.FLOAT_AXIS: - try: - result = float(input.text()) - except ValueError: - result = None - elif axis_name in LimitsStack.INT_AXIS: - try: - result = int(input.text()) - except ValueError: - result = None - elif axis_name == PlotContext.DATE_AXIS: - result = input.date() - - return result - - -class LimitsWidget(object): - def __init__(self): - self._limits = PlotLimits() - self._x_minimum_stack = LimitsStack() - self._x_maximum_stack = LimitsStack() - self._x_current_input_name = PlotContext.UNKNOWN_AXIS - - self._y_minimum_stack = LimitsStack() - self._y_maximum_stack = LimitsStack() - self._y_current_input_name = PlotContext.UNKNOWN_AXIS - - - @property - def x_minimum_stack(self): - """ @rtype: LimitsStack """ - return self._x_minimum_stack - - @property - def x_maximum_stack(self): - """ @rtype: LimitsStack """ - return self._x_maximum_stack - - @property - def y_minimum_stack(self): - """ @rtype: LimitsStack """ - return self._y_minimum_stack - - @property - def y_maximum_stack(self): - """ @rtype: LimitsStack """ - return self._y_maximum_stack - - @property - def limits(self): - """ @rtype: PlotLimits """ - self._updateLimits() - limits = PlotLimits() - limits.copyLimitsFrom(self._limits) - return limits - - @limits.setter - def limits(self, value): - """ @type value: PlotLimits """ - self._limits.copyLimitsFrom(value) - self._updateWidgets() - - def _updateWidgets(self): - limits = self._limits - self._x_minimum_stack.setValue(PlotContext.DATE_AXIS, limits.date_minimum) - self._x_maximum_stack.setValue(PlotContext.DATE_AXIS, limits.date_maximum) - self._y_minimum_stack.setValue(PlotContext.DATE_AXIS, limits.date_minimum) - self._y_maximum_stack.setValue(PlotContext.DATE_AXIS, limits.date_maximum) - - self._x_minimum_stack.setValue(PlotContext.DEPTH_AXIS, limits.depth_minimum) - self._x_maximum_stack.setValue(PlotContext.DEPTH_AXIS, limits.depth_maximum) - self._y_minimum_stack.setValue(PlotContext.DEPTH_AXIS, limits.depth_minimum) - self._y_maximum_stack.setValue(PlotContext.DEPTH_AXIS, limits.depth_maximum) - - self._x_minimum_stack.setValue(PlotContext.DENSITY_AXIS, limits.density_minimum) - self._x_maximum_stack.setValue(PlotContext.DENSITY_AXIS, limits.density_maximum) - self._y_minimum_stack.setValue(PlotContext.DENSITY_AXIS, limits.density_minimum) - self._y_maximum_stack.setValue(PlotContext.DENSITY_AXIS, limits.density_maximum) - - self._x_minimum_stack.setValue(PlotContext.COUNT_AXIS, limits.count_minimum) - self._x_maximum_stack.setValue(PlotContext.COUNT_AXIS, limits.count_maximum) - self._y_minimum_stack.setValue(PlotContext.COUNT_AXIS, limits.count_minimum) - self._y_maximum_stack.setValue(PlotContext.COUNT_AXIS, limits.count_maximum) - - self._x_minimum_stack.setValue(PlotContext.INDEX_AXIS, limits.index_minimum) - self._x_maximum_stack.setValue(PlotContext.INDEX_AXIS, limits.index_maximum) - self._y_minimum_stack.setValue(PlotContext.INDEX_AXIS, limits.index_minimum) - self._y_maximum_stack.setValue(PlotContext.INDEX_AXIS, limits.index_maximum) - - self._x_minimum_stack.setValue(PlotContext.VALUE_AXIS, limits.value_minimum) - self._x_maximum_stack.setValue(PlotContext.VALUE_AXIS, limits.value_maximum) - self._y_minimum_stack.setValue(PlotContext.VALUE_AXIS, limits.value_minimum) - self._y_maximum_stack.setValue(PlotContext.VALUE_AXIS, limits.value_maximum) - - - def _updateLimits(self): - if self._x_current_input_name is not PlotContext.UNKNOWN_AXIS: - minimum = self._x_minimum_stack.getValue(self._x_current_input_name) - maximum = self._x_maximum_stack.getValue(self._x_current_input_name) - self._updateLimit(self._x_current_input_name, minimum, maximum) - - if self._y_current_input_name is not PlotContext.UNKNOWN_AXIS: - minimum = self._y_minimum_stack.getValue(self._y_current_input_name) - maximum = self._y_maximum_stack.getValue(self._y_current_input_name) - self._updateLimit(self._y_current_input_name, minimum, maximum) - - - def _updateLimit(self, axis_name, minimum, maximum): - if axis_name == PlotContext.COUNT_AXIS: - self._limits.count_limits = minimum, maximum - elif axis_name == PlotContext.DENSITY_AXIS: - self._limits.density_limits = minimum, maximum - elif axis_name == PlotContext.DEPTH_AXIS: - self._limits.depth_limits = minimum, maximum - elif axis_name == PlotContext.DATE_AXIS: - self._limits.date_limits = minimum, maximum - elif axis_name == PlotContext.INDEX_AXIS: - self._limits.index_limits = minimum, maximum - elif axis_name == PlotContext.VALUE_AXIS: - self._limits.value_limits = minimum, maximum - - - def switchInputOnX(self, axis_type): - self._x_current_input_name = axis_type - self._updateWidgets() - self._x_minimum_stack.switchToInput(axis_type) - self._x_maximum_stack.switchToInput(axis_type) - - - def switchInputOnY(self, axis_type): - self._y_current_input_name = axis_type - self._updateWidgets() - self._y_minimum_stack.switchToInput(axis_type) - self._y_maximum_stack.switchToInput(axis_type) - - - -class LimitsCustomizationView(CustomizationView): - - def __init__(self): - CustomizationView.__init__(self) - - limits_widget = LimitsWidget() - self._limits_widget = limits_widget - - self.addHeading("X Axis") - self.addRow("Minimum", limits_widget.x_minimum_stack) - self.addRow("Maximum", limits_widget.x_maximum_stack) - - self.addHeading("Y Axis") - self.addRow("Minimum", limits_widget.y_minimum_stack) - self.addRow("Maximum", limits_widget.y_maximum_stack) - - - def setAxisTypes(self, x_axis_type, y_axis_type): - self._limits_widget.switchInputOnX(x_axis_type) - self._limits_widget.switchInputOnY(y_axis_type) - - def revertCustomization(self, plot_config): - """ @type plot_config: ert_gui.plottery.PlotConfig """ - self._limits_widget.limits = plot_config.limits - - - def applyCustomization(self, plot_config): - """ @type plot_config: ert_gui.plottery.PlotConfig """ - plot_config.limits = self._limits_widget.limits diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plot/customize/statistics_customization_view.py b/ThirdParty/Ert/python/python/ert_gui/tools/plot/customize/statistics_customization_view.py deleted file mode 100644 index 81de3df988..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plot/customize/statistics_customization_view.py +++ /dev/null @@ -1,116 +0,0 @@ -from PyQt4.QtGui import QHBoxLayout, QLabel, QComboBox - -from ert_gui.tools.plot.customize import CustomizationView, WidgetProperty - - -class StatisticsCustomizationView(CustomizationView): - mean_style = WidgetProperty() - p50_style = WidgetProperty() - std_style = WidgetProperty() - min_max_style = WidgetProperty() - p10_p90_style = WidgetProperty() - p33_p67_style = WidgetProperty() - std_dev_factor = WidgetProperty() - distribution_lines = WidgetProperty() - - - def __init__(self): - CustomizationView.__init__(self) - - self._presets = ["Statistics Default", "Cross Case Statistics Default", "Overview", "All statistics"] - - self.addRow("Presets", self.createPresets()) - self.addSpacing(10) - layout = QHBoxLayout() - self.addRow("", layout) - self.addStyleChooser("mean_style", "Mean", "Line and marker style for the mean line.") - self.addStyleChooser("p50_style", "P50", "Line and marker style for the P50 line.") - self.addStyleChooser("std_style", "Std dev", "Line and marker style for the unbiased standard deviation lines.", True) - self.addStyleChooser("min_max_style", "Min/Max", "Line and marker style for the min/max lines.", True) - self.addStyleChooser("p10_p90_style", "P10-P90", "Line and marker style for the P10-P90 lines.", True) - self.addStyleChooser("p33_p67_style", "P33-P67", "Line and marker style for the P33-P67 lines.", True) - self.addSpacing() - - std_box = self.addSpinBox("std_dev_factor", "Std dev multiplier", "Choose which standard deviation to plot", max_value=3) - - self.addCheckBox("distribution_lines", "Connection Lines", "Toggle distribution connection lines visibility.") - - self["mean_style"].createLabelLayout(layout) - - - - def createPresets(self): - preset_combo = QComboBox() - for preset in self._presets: - preset_combo.addItem(preset) - - preset_combo.currentIndexChanged.connect(self.presetSelected) - return preset_combo - - - def presetSelected(self, index): - if index == 0: # Default - self.updateStyle("mean_style", "-", None) - self.updateStyle("p50_style", None, None) - self.updateStyle("std_style", None, None) - self.updateStyle("min_max_style", None, None) - self.updateStyle("p10_p90_style", "--", None) - self.updateStyle("p33_p67_style", None, None) - elif index == 1: # CCS Default - self.updateStyle("mean_style", "-", "o") - self.updateStyle("p50_style", None, None) - self.updateStyle("std_style", "--", "D") - self.updateStyle("min_max_style", None, None) - self.updateStyle("p10_p90_style", None, None) - self.updateStyle("p33_p67_style", None, None) - elif index == 2: # Overview - self.updateStyle("mean_style", None, None) - self.updateStyle("p50_style", None, None) - self.updateStyle("std_style", None, None) - self.updateStyle("min_max_style", "#", None) - self.updateStyle("p10_p90_style", None, None) - self.updateStyle("p33_p67_style", None, None) - elif index == 3: # All statistics - self.updateStyle("mean_style", "-", None) - self.updateStyle("p50_style", "--", "x") - self.updateStyle("std_style", ":", None) - self.updateStyle("min_max_style", "--", None) - self.updateStyle("p10_p90_style", "#", None) - self.updateStyle("p33_p67_style", "#", None) - - - def updateStyle(self, attribute_name, line_style, marker_style): - style = getattr(self, attribute_name) - style.line_style = line_style - style.marker = marker_style - setattr(self, attribute_name, style) - - - def applyCustomization(self, plot_config): - """ - @type plot_config: ert_gui.plottery.PlotConfig - """ - plot_config.setStatisticsStyle("mean", self.mean_style) - plot_config.setStatisticsStyle("p50", self.p50_style) - plot_config.setStatisticsStyle("std", self.std_style) - plot_config.setStatisticsStyle("min-max", self.min_max_style) - plot_config.setStatisticsStyle("p10-p90", self.p10_p90_style) - plot_config.setStatisticsStyle("p33-p67", self.p33_p67_style) - - plot_config.setStandardDeviationFactor(self.std_dev_factor) - plot_config.setDistributionLineEnabled(self.distribution_lines) - - - def revertCustomization(self, plot_config): - """ - @type plot_config: ert_gui.plottery.PlotConfig - """ - self.mean_style = plot_config.getStatisticsStyle("mean") - self.p50_style = plot_config.getStatisticsStyle("p50") - self.std_style = plot_config.getStatisticsStyle("std") - self.min_max_style = plot_config.getStatisticsStyle("min-max") - self.p10_p90_style = plot_config.getStatisticsStyle("p10-p90") - self.p33_p67_style = plot_config.getStatisticsStyle("p33-p67") - - self.std_dev_factor = plot_config.getStandardDeviationFactor() - self.distribution_lines = plot_config.isDistributionLineEnabled() diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plot/customize/style_customization_view.py b/ThirdParty/Ert/python/python/ert_gui/tools/plot/customize/style_customization_view.py deleted file mode 100644 index 8e62052fd7..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plot/customize/style_customization_view.py +++ /dev/null @@ -1,76 +0,0 @@ -from PyQt4.QtGui import QHBoxLayout, QLabel, QColor - -from ert_gui.tools.plot import ColorBox -from ert_gui.tools.plot.customize import CustomizationView, WidgetProperty - - -class StyleCustomizationView(CustomizationView): - default_style = WidgetProperty() - refcase_style = WidgetProperty() - history_style = WidgetProperty() - color_cycle = WidgetProperty() - - def __init__(self): - CustomizationView.__init__(self) - - layout = QHBoxLayout() - - self.addRow("", layout) - self.addStyleChooser("default_style", "Default", "Line and marker style for default lines.") - self.addStyleChooser("refcase_style", "Refcase", "Line and marker style for the refcase line.") - self.addStyleChooser("history_style", "History", "Line and marker style for the history line.") - - self["default_style"].createLabelLayout(layout) - - self.addSpacing(10) - - color_layout = QHBoxLayout() - - self._color_boxes = [] - for name in ["#1", "#2", "#3", "#4", "#5"]: - color_box = self.createColorBox(name) - self._color_boxes.append(color_box) - color_layout.addWidget(color_box) - - self.addRow("Color Cycle", color_layout) - self.updateProperty("color_cycle", StyleCustomizationView.getColorCycle, StyleCustomizationView.setColorCycle) - - - def createColorBox(self, name): - color_box = ColorBox(QColor(255, 255, 255), 20) - color_box.setToolTip(name) - return color_box - - - def getColorCycle(self): - colors = [] - for color_box in self._color_boxes: - colors.append(str(color_box.color.name())) - - return colors - - def setColorCycle(self, color_cycle): - for index, color in enumerate(color_cycle): - if 0 <= index < len(self._color_boxes): - color_box = self._color_boxes[index] - color_box.color = color - - def applyCustomization(self, plot_config): - """ - @type plot_config: ert_gui.plottery.PlotConfig - """ - plot_config.setDefaultStyle(self.default_style) - plot_config.setRefcaseStyle(self.refcase_style) - plot_config.setHistoryStyle(self.history_style) - plot_config.setLineColorCycle(self.color_cycle) - - def revertCustomization(self, plot_config): - """ - @type plot_config: ert_gui.plottery.PlotConfig - """ - self.default_style = plot_config.defaultStyle() - self.refcase_style = plot_config.refcaseStyle() - self.history_style = plot_config.historyStyle() - self.color_cycle = plot_config.lineColorCycle() - - diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plot/data_type_keys_list_model.py b/ThirdParty/Ert/python/python/ert_gui/tools/plot/data_type_keys_list_model.py deleted file mode 100644 index 4c4a509ba6..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plot/data_type_keys_list_model.py +++ /dev/null @@ -1,77 +0,0 @@ -from PyQt4.QtCore import QAbstractItemModel, QModelIndex, Qt, QVariant -from PyQt4.QtGui import QColor - -from ert_gui.ertwidgets import resourceIcon - - -class DataTypeKeysListModel(QAbstractItemModel): - DEFAULT_DATA_TYPE = QColor(255, 255, 255) - HAS_OBSERVATIONS = QColor(237, 218, 116) - GROUP_ITEM = QColor(64, 64, 64) - - def __init__(self, ert): - """ - @type ert: ert.enkf.EnKFMain - """ - QAbstractItemModel.__init__(self) - self.__ert = ert - self.__icon = resourceIcon("ide/small/bullet_star") - - def keyManager(self): - return self.__ert.getKeyManager() - - def index(self, row, column, parent=None, *args, **kwargs): - return self.createIndex(row, column, parent) - - def parent(self, index=None): - return QModelIndex() - - def rowCount(self, parent=None, *args, **kwargs): - return len(self.keyManager().allDataTypeKeys()) - - def columnCount(self, QModelIndex_parent=None, *args, **kwargs): - return 1 - - def data(self, index, role=None): - assert isinstance(index, QModelIndex) - - if index.isValid(): - items = self.keyManager().allDataTypeKeys() - row = index.row() - item = items[row] - - if role == Qt.DisplayRole: - return item - elif role == Qt.BackgroundRole: - if self.keyManager().isKeyWithObservations(item): - return self.HAS_OBSERVATIONS - - return QVariant() - - def itemAt(self, index): - assert isinstance(index, QModelIndex) - - if index.isValid(): - row = index.row() - return self.keyManager().allDataTypeKeys()[row] - - return None - - - def isSummaryKey(self, key): - return self.keyManager().isSummaryKey(key) - - def isBlockKey(self, key): - return False - - def isGenKWKey(self, key): - return self.keyManager().isGenKwKey(key) - - def isGenDataKey(self, key): - return self.keyManager().isGenDataKey(key) - - def isCustomKwKey(self, key): - return self.keyManager().isCustomKwKey(key) - - def isCustomPcaKey(self, key): - return False diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plot/data_type_keys_widget.py b/ThirdParty/Ert/python/python/ert_gui/tools/plot/data_type_keys_widget.py deleted file mode 100644 index 13914f2744..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plot/data_type_keys_widget.py +++ /dev/null @@ -1,78 +0,0 @@ -from PyQt4.QtCore import pyqtSignal -from PyQt4.QtGui import QWidget, QVBoxLayout, QListView, QHBoxLayout, QToolButton - -from ert_gui.ertwidgets import SearchBox, resourceIcon, Legend -from ert_gui.tools.plot import DataTypeKeysListModel, DataTypeProxyModel, FilterPopup - - -class DataTypeKeysWidget(QWidget): - dataTypeKeySelected = pyqtSignal() - - def __init__(self, model): - QWidget.__init__(self) - - self.__filter_popup = FilterPopup(self) - self.__filter_popup.filterSettingsChanged.connect(self.onItemChanged) - - layout = QVBoxLayout() - - self.model = model - self.filter_model = DataTypeProxyModel(self.model) - - filter_layout = QHBoxLayout() - - self.search_box = SearchBox() - self.search_box.filterChanged.connect(self.setSearchString) - filter_layout.addWidget(self.search_box) - - filter_popup_button = QToolButton() - filter_popup_button.setIcon(resourceIcon("ide/cog_edit.png")) - filter_popup_button.clicked.connect(self.showFilterPopup) - filter_layout.addWidget(filter_popup_button) - layout.addLayout(filter_layout) - - self.data_type_keys_widget = QListView() - self.data_type_keys_widget.setModel(self.filter_model) - self.data_type_keys_widget.selectionModel().selectionChanged.connect(self.itemSelected) - - layout.addSpacing(15) - layout.addWidget(self.data_type_keys_widget, 2) - layout.addStretch() - - # layout.addWidget(Legend("Default types", DataTypeKeysListModel.DEFAULT_DATA_TYPE)) - layout.addWidget(Legend("Observations available", DataTypeKeysListModel.HAS_OBSERVATIONS)) - - self.setLayout(layout) - - def onItemChanged(self, item): - # self.filter_model.setShowBlockKeys(item["block"]) - self.filter_model.setShowSummaryKeys(item["summary"]) - self.filter_model.setShowGenKWKeys(item["gen_kw"]) - self.filter_model.setShowGenDataKeys(item["gen_data"]) - self.filter_model.setShowCustomKwKeys(item["custom_kw"]) - # self.filter_model.setShowCustomPcaKeys(item["custom_pca"]) - - - def itemSelected(self): - selected_item = self.getSelectedItem() - if selected_item is not None: - self.dataTypeKeySelected.emit() - - - def getSelectedItem(self): - """ @rtype: str """ - index = self.data_type_keys_widget.currentIndex() - source_index = self.filter_model.mapToSource(index) - item = self.model.itemAt(source_index) - return item - - def selectDefault(self): - self.data_type_keys_widget.setCurrentIndex(self.filter_model.index(0, 0)) - - - def setSearchString(self, filter): - self.filter_model.setFilterFixedString(filter) - - def showFilterPopup(self): - self.__filter_popup.show() - diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plot/data_type_proxy_model.py b/ThirdParty/Ert/python/python/ert_gui/tools/plot/data_type_proxy_model.py deleted file mode 100644 index 059762f9ef..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plot/data_type_proxy_model.py +++ /dev/null @@ -1,92 +0,0 @@ -# Copyright (C) 2014 Statoil ASA, Norway. -# -# The file 'data_type_proxy_model.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -from PyQt4.QtCore import Qt -from PyQt4.QtGui import QSortFilterProxyModel -from ert_gui.tools.plot import DataTypeKeysListModel - - -class DataTypeProxyModel(QSortFilterProxyModel): - - def __init__(self, model , parent=None): - QSortFilterProxyModel.__init__(self, parent) - self.__show_summary_keys = True - self.__show_block_keys = True - self.__show_gen_kw_keys = True - self.__show_gen_data_keys = True - self.__show_custom_kw_keys = True - self.__show_custom_pca_keys = True - - self.setFilterCaseSensitivity(Qt.CaseInsensitive) - self.setSourceModel(model) - - def filterAcceptsRow(self, index, q_model_index): - show = QSortFilterProxyModel.filterAcceptsRow(self, index, q_model_index) - - if show: - source_model = self.sourceModel() - source_index = source_model.index(index, 0, q_model_index) - key = source_model.itemAt(source_index) - - if not self.__show_summary_keys and source_model.isSummaryKey(key): - show = False - - elif not self.__show_block_keys and source_model.isBlockKey(key): - show = False - - elif not self.__show_gen_kw_keys and source_model.isGenKWKey(key): - show = False - - elif not self.__show_gen_data_keys and source_model.isGenDataKey(key): - show = False - - elif not self.__show_custom_kw_keys and source_model.isCustomKwKey(key): - show = False - - elif not self.__show_custom_pca_keys and source_model.isCustomPcaKey(key): - show = False - - - return show - - def sourceModel(self): - """ @rtype: DataTypeKeysListModel """ - return QSortFilterProxyModel.sourceModel(self) - - def setShowSummaryKeys(self, visible): - self.__show_summary_keys = visible - self.invalidateFilter() - - def setShowBlockKeys(self, visible): - self.__show_block_keys = visible - self.invalidateFilter() - - def setShowGenKWKeys(self, visible): - self.__show_gen_kw_keys = visible - self.invalidateFilter() - - def setShowGenDataKeys(self, visible): - self.__show_gen_data_keys = visible - self.invalidateFilter() - - def setShowCustomKwKeys(self, visible): - self.__show_custom_kw_keys = visible - self.invalidateFilter() - - def setShowCustomPcaKeys(self, visible): - self.__show_custom_pca_keys = visible - self.invalidateFilter() - diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plot/filter_popup.py b/ThirdParty/Ert/python/python/ert_gui/tools/plot/filter_popup.py deleted file mode 100644 index cfb286533a..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plot/filter_popup.py +++ /dev/null @@ -1,58 +0,0 @@ -from PyQt4.QtCore import Qt, pyqtSignal -from PyQt4.QtGui import QWidget, QFrame, QDialog, QVBoxLayout, QCheckBox, QLabel, QLayout, QCursor - - -class FilterPopup(QDialog): - filterSettingsChanged = pyqtSignal(dict) - - def __init__(self, parent=None): - QDialog.__init__(self, parent, Qt.WindowStaysOnTopHint | Qt.X11BypassWindowManagerHint | Qt.FramelessWindowHint) - self.setVisible(False) - - self.filter_items = {} - - layout = QVBoxLayout() - layout.setMargin(0) - frame = QFrame() - frame.setFrameStyle(QFrame.StyledPanel | QFrame.Raised) - layout.addWidget(frame) - - self.__layout = QVBoxLayout() - self.__layout.setSizeConstraint(QLayout.SetFixedSize) - self.__layout.addWidget(QLabel("Filter by data type:")) - - self.addFilterItem("Summary", "summary") - # self.addFilterItem("Block", "block") - self.addFilterItem("Gen KW", "gen_kw") - self.addFilterItem("Gen Data", "gen_data") - self.addFilterItem("Custom KW", "custom_kw") - # self.addFilterItem("Custom PCA", "custom_pca") - - frame.setLayout(self.__layout) - - self.setLayout(layout) - self.adjustSize() - - - def addFilterItem(self, name, id, value=True): - self.filter_items[id] = value - - check_box = QCheckBox(name) - check_box.setChecked(value) - - def toggleItem(checked): - self.filter_items[id] = checked - self.filterSettingsChanged.emit(self.filter_items) - - check_box.toggled.connect(toggleItem) - - self.__layout.addWidget(check_box) - - def leaveEvent(self, QEvent): - QWidget.leaveEvent(self, QEvent) - self.hide() - - def show(self): - QWidget.show(self) - p = QCursor().pos() - self.move(p.x(), p.y()) diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plot/plot_case_model.py b/ThirdParty/Ert/python/python/ert_gui/tools/plot/plot_case_model.py deleted file mode 100644 index bc1029cfc1..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plot/plot_case_model.py +++ /dev/null @@ -1,69 +0,0 @@ -from PyQt4.QtCore import QAbstractItemModel, QModelIndex, Qt, QVariant - -from ert_gui.ertwidgets.models.ertmodel import getAllCasesNotRunning - - -class PlotCaseModel(QAbstractItemModel): - - def __init__(self): - QAbstractItemModel.__init__(self) - self.__data = None - - def index(self, row, column, parent=None, *args, **kwargs): - return self.createIndex(row, column, parent) - - def parent(self, index=None): - return QModelIndex() - - def rowCount(self, parent=None, *args, **kwargs): - items = self.getAllItems() - return len(items) - - def columnCount(self, QModelIndex_parent=None, *args, **kwargs): - return 1 - - - def data(self, index, role=None): - assert isinstance(index, QModelIndex) - - if index.isValid(): - items = self.getAllItems() - row = index.row() - item = items[row] - - if role == Qt.DisplayRole: - return item - - return QVariant() - - def itemAt(self, index): - assert isinstance(index, QModelIndex) - - if index.isValid(): - row = index.row() - return self.getAllItems()[row] - - return None - - - def getAllItems(self): - if self.__data is None: - self.__data = getAllCasesNotRunning() - - return self.__data - - def __iter__(self): - cur = 0 - while cur < self.rowCount(): - yield self.itemAt(self.index(cur, 0)) - cur += 1 - - - - - - - - - - diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plot/plot_case_selection_widget.py b/ThirdParty/Ert/python/python/ert_gui/tools/plot/plot_case_selection_widget.py deleted file mode 100644 index 6942795949..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plot/plot_case_selection_widget.py +++ /dev/null @@ -1,119 +0,0 @@ -from PyQt4.QtCore import pyqtSignal, QSignalMapper, Qt -from PyQt4.QtGui import QWidget, QVBoxLayout, QHBoxLayout, QToolButton, QComboBox - -from ert_gui.ertwidgets import resourceIcon -from ert_gui.tools.plot import PlotCaseModel - - -class CaseSelectionWidget(QWidget): - - caseSelectionChanged = pyqtSignal() - - def __init__(self, current_case): - QWidget.__init__(self) - - self.__model = PlotCaseModel() - - self.__signal_mapper = QSignalMapper(self) - self.__case_selectors = {} - self.__case_selectors_order = [] - - layout = QVBoxLayout() - - add_button_layout = QHBoxLayout() - self.__add_case_button = QToolButton() - self.__add_case_button.setToolButtonStyle(Qt.ToolButtonTextBesideIcon) - self.__add_case_button.setText("Add case to plot") - self.__add_case_button.setIcon(resourceIcon("ide/small/add")) - self.__add_case_button.clicked.connect(self.addCaseSelector) - - add_button_layout.addStretch() - add_button_layout.addWidget(self.__add_case_button) - add_button_layout.addStretch() - - layout.addLayout(add_button_layout) - - self.__case_layout = QVBoxLayout() - self.__case_layout.setMargin(0) - layout.addLayout(self.__case_layout) - - self.addCaseSelector(disabled=True, current_case=current_case) - layout.addStretch() - - self.setLayout(layout) - - self.__signal_mapper.mapped[QWidget].connect(self.removeWidget) - - - def __caseName(self, widget): - """ @rtype: str """ - return str(self.__case_selectors[widget].currentText()) - - def getPlotCaseNames(self): - if self.__model.rowCount() == 0: - return [] - - return [self.__caseName(widget) for widget in self.__case_selectors_order] - - def checkCaseCount(self): - state = True - if len(self.__case_selectors_order) == 5: - state = False - - self.__add_case_button.setEnabled(state) - - - def addCaseSelector(self, disabled=False, current_case=None): - widget = QWidget() - - layout = QHBoxLayout() - layout.setMargin(0) - widget.setLayout(layout) - - combo = QComboBox() - combo.setSizeAdjustPolicy(QComboBox.AdjustToMinimumContentsLengthWithIcon) - combo.setMinimumContentsLength(20) - combo.setModel(self.__model) - - if current_case is not None: - index = 0 - for item in self.__model: - if item == current_case: - combo.setCurrentIndex(index) - break - index += 1 - - combo.currentIndexChanged.connect(self.caseSelectionChanged.emit) - - - - layout.addWidget(combo, 1) - - button = QToolButton() - button.setAutoRaise(True) - button.setDisabled(disabled) - button.setIcon(resourceIcon("ide/small/delete")) - button.clicked.connect(self.__signal_mapper.map) - - layout.addWidget(button) - - self.__case_selectors[widget] = combo - self.__case_selectors_order.append(widget) - self.__signal_mapper.setMapping(button, widget) - - self.__case_layout.addWidget(widget) - - self.checkCaseCount() - self.caseSelectionChanged.emit() - - - - def removeWidget(self, widget): - self.__case_layout.removeWidget(widget) - del self.__case_selectors[widget] - self.__case_selectors_order.remove(widget) - widget.setParent(None) - self.caseSelectionChanged.emit() - - self.checkCaseCount() - diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plot/plot_tool.py b/ThirdParty/Ert/python/python/ert_gui/tools/plot/plot_tool.py deleted file mode 100644 index 6433919831..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plot/plot_tool.py +++ /dev/null @@ -1,14 +0,0 @@ -from ert_gui.ertwidgets import resourceIcon -from ert_gui.tools import Tool -from ert_gui.tools.plot import PlotWindow - - -class PlotTool(Tool): - def __init__(self): - super(PlotTool, self).__init__("Create Plot", "tools/plot", resourceIcon("ide/chart_curve_add")) - - def trigger(self): - plot_window = PlotWindow(self.parent()) - plot_window.show() - - diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plot/plot_widget.py b/ThirdParty/Ert/python/python/ert_gui/tools/plot/plot_widget.py deleted file mode 100644 index b250eed2a0..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plot/plot_widget.py +++ /dev/null @@ -1,112 +0,0 @@ -import sys -import traceback - -from PyQt4.QtCore import Qt, pyqtSignal -from PyQt4.QtGui import QWidget, QVBoxLayout, QAction - -from matplotlib.figure import Figure -from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas, NavigationToolbar2QT - -from ert_gui.ertwidgets import resourceIcon - - -class CustomNavigationToolbar(NavigationToolbar2QT): - customizationTriggered = pyqtSignal() - - def __init__(self, canvas, parent, coordinates=True): - super(CustomNavigationToolbar, self).__init__(canvas, parent, coordinates) - - gear = resourceIcon("ide/cog_edit.png") - customize_action = QAction(gear, "Customize", self) - customize_action.setToolTip("Customize plot settings") - customize_action.triggered.connect(self.customizationTriggered) - - for action in self.actions(): - if str(action.text()).lower() == "subplots": - self.removeAction(action) - - if str(action.text()).lower() == "customize": - self.insertAction(action, customize_action) - self.removeAction(action) - break - - - -class PlotWidget(QWidget): - customizationTriggered = pyqtSignal() - - def __init__(self, name, plotFunction, plot_condition_function_list, plotContextFunction, parent=None): - QWidget.__init__(self, parent) - - self._name = name - self._plotFunction = plotFunction - self._plotContextFunction = plotContextFunction - self._plot_conditions = plot_condition_function_list - """:type: list of functions """ - - self._figure = Figure() - self._figure.set_tight_layout(True) - self._canvas = FigureCanvas(self._figure) - self._canvas.setParent(self) - self._canvas.setFocusPolicy(Qt.StrongFocus) - self._canvas.setFocus() - - vbox = QVBoxLayout() - vbox.addWidget(self._canvas) - self._toolbar = CustomNavigationToolbar(self._canvas, self) - self._toolbar.customizationTriggered.connect(self.customizationTriggered) - vbox.addWidget(self._toolbar) - self.setLayout(vbox) - - self._dirty = True - self._active = False - self.resetPlot() - - - def getFigure(self): - """ :rtype: matplotlib.figure.Figure""" - return self._figure - - - def resetPlot(self): - self._figure.clear() - - @property - def name(self): - """ @rtype: str """ - return self._name - - def updatePlot(self): - if self.isDirty() and self.isActive(): - # print("Drawing: %s" % self._name) - self.resetPlot() - plot_context = self._plotContextFunction(self.getFigure()) - try: - self._plotFunction(plot_context) - self._canvas.draw() - except StandardError as e: - exc_type, exc_value, exc_tb = sys.exc_info() - sys.stderr.write("%s\n" % ("-" * 80)) - traceback.print_tb(exc_tb) - sys.stderr.write("Exception type: %s\n" % exc_type.__name__) - sys.stderr.write("%s\n" % e.message) - sys.stderr.write("%s\n" % ("-" * 80)) - sys.stderr.write("An error occurred during plotting. This stack trace is helpful for diagnosing the problem.") - - self.setDirty(False) - - - def setDirty(self, dirty=True): - self._dirty = dirty - - def isDirty(self): - return self._dirty - - def setActive(self, active=True): - self._active = active - - def isActive(self): - return self._active - - def canPlotKey(self, key): - return any([plotConditionFunction(key) for plotConditionFunction in self._plot_conditions]) diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plot/plot_window.py b/ThirdParty/Ert/python/python/ert_gui/tools/plot/plot_window.py deleted file mode 100644 index 04a2a3e529..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plot/plot_window.py +++ /dev/null @@ -1,199 +0,0 @@ -from PyQt4.QtCore import Qt -from PyQt4.QtGui import QMainWindow, QDockWidget, QTabWidget, QWidget, QVBoxLayout - -from ert_gui import ERT -from ert_gui.ertwidgets import showWaitCursorWhileWaiting -from ert_gui.ertwidgets.models.ertmodel import getCurrentCaseName -from ert_gui.plottery import PlotContext, PlotDataGatherer as PDG, PlotConfig, plots, PlotConfigFactory - -from ert_gui.tools.plot import DataTypeKeysWidget, CaseSelectionWidget, PlotWidget, DataTypeKeysListModel -from ert_gui.tools.plot.customize import PlotCustomizer - -CROSS_CASE_STATISTICS = "Cross Case Statistics" -DISTRIBUTION = "Distribution" -GAUSSIAN_KDE = "Gaussian KDE" -ENSEMBLE = "Ensemble" -HISTOGRAM = "Histogram" -STATISTICS = "Statistics" - -class PlotWindow(QMainWindow): - - - def __init__(self, parent): - QMainWindow.__init__(self, parent) - - self._ert = ERT.ert - """:type: ert.enkf.enkf_main.EnKFMain""" - - key_manager = self._ert.getKeyManager() - """:type: ert.enkf.key_manager.KeyManager """ - - self.setMinimumWidth(850) - self.setMinimumHeight(650) - - self.setWindowTitle("Plotting") - self.activateWindow() - - self._plot_customizer = PlotCustomizer(self) - - def plotConfigCreator(key): - return PlotConfigFactory.createPlotConfigForKey(self._ert, key) - - self._plot_customizer.setPlotConfigCreator(plotConfigCreator) - self._plot_customizer.settingsChanged.connect(self.keySelected) - - self._central_tab = QTabWidget() - self._central_tab.currentChanged.connect(self.currentPlotChanged) - - central_widget = QWidget() - central_layout = QVBoxLayout() - central_layout.setContentsMargins(0, 0, 0, 0) - central_widget.setLayout(central_layout) - - central_layout.addWidget(self._central_tab) - - self.setCentralWidget(central_widget) - - self._plot_widgets = [] - """:type: list of PlotWidget""" - - self._data_gatherers = [] - """:type: list of PlotDataGatherer """ - - summary_gatherer = self.createDataGatherer(PDG.gatherSummaryData, key_manager.isSummaryKey, refcaseGatherFunc=PDG.gatherSummaryRefcaseData, observationGatherFunc=PDG.gatherSummaryObservationData, historyGatherFunc=PDG.gatherSummaryHistoryData) - gen_data_gatherer = self.createDataGatherer(PDG.gatherGenDataData, key_manager.isGenDataKey, observationGatherFunc=PDG.gatherGenDataObservationData) - gen_kw_gatherer = self.createDataGatherer(PDG.gatherGenKwData, key_manager.isGenKwKey) - custom_kw_gatherer = self.createDataGatherer(PDG.gatherCustomKwData, key_manager.isCustomKwKey) - - - self.addPlotWidget(ENSEMBLE, plots.plotEnsemble, [summary_gatherer, gen_data_gatherer]) - self.addPlotWidget(STATISTICS, plots.plotStatistics, [summary_gatherer, gen_data_gatherer]) - self.addPlotWidget(HISTOGRAM, plots.plotHistogram, [gen_kw_gatherer, custom_kw_gatherer]) - self.addPlotWidget(GAUSSIAN_KDE, plots.plotGaussianKDE, [gen_kw_gatherer, custom_kw_gatherer]) - self.addPlotWidget(DISTRIBUTION, plots.plotDistribution, [gen_kw_gatherer, custom_kw_gatherer]) - self.addPlotWidget(CROSS_CASE_STATISTICS, plots.plotCrossCaseStatistics, [gen_kw_gatherer, custom_kw_gatherer]) - - - data_types_key_model = DataTypeKeysListModel(self._ert) - - self._data_type_keys_widget = DataTypeKeysWidget(data_types_key_model) - self._data_type_keys_widget.dataTypeKeySelected.connect(self.keySelected) - self.addDock("Data types", self._data_type_keys_widget) - - current_case = getCurrentCaseName() - self._case_selection_widget = CaseSelectionWidget(current_case) - self._case_selection_widget.caseSelectionChanged.connect(self.keySelected) - self.addDock("Plot case", self._case_selection_widget) - - current_plot_widget = self._plot_widgets[self._central_tab.currentIndex()] - current_plot_widget.setActive() - self._data_type_keys_widget.selectDefault() - self._updateCustomizer(current_plot_widget) - - - - - def createDataGatherer(self, dataGatherFunc, gatherConditionFunc, refcaseGatherFunc=None, observationGatherFunc=None, historyGatherFunc=None): - data_gatherer = PDG(dataGatherFunc, gatherConditionFunc, refcaseGatherFunc=refcaseGatherFunc, observationGatherFunc=observationGatherFunc, historyGatherFunc=historyGatherFunc) - self._data_gatherers.append(data_gatherer) - return data_gatherer - - - def currentPlotChanged(self): - for plot_widget in self._plot_widgets: - plot_widget.setActive(False) - index = self._central_tab.indexOf(plot_widget) - - if index == self._central_tab.currentIndex() and plot_widget.canPlotKey(self.getSelectedKey()): - plot_widget.setActive() - self._updateCustomizer(plot_widget) - plot_widget.updatePlot() - - def _updateCustomizer(self, plot_widget): - """ @type plot_widget: PlotWidget """ - key = self.getSelectedKey() - key_manager = self._ert.getKeyManager() - - index_type = PlotContext.UNKNOWN_AXIS - - if key_manager.isGenDataKey(key): - index_type = PlotContext.INDEX_AXIS - elif key_manager.isSummaryKey(key): - index_type = PlotContext.DATE_AXIS - - x_axis_type = PlotContext.UNKNOWN_AXIS - y_axis_type = PlotContext.UNKNOWN_AXIS - - if plot_widget.name == ENSEMBLE: - x_axis_type = index_type - y_axis_type = PlotContext.VALUE_AXIS - elif plot_widget.name == STATISTICS: - x_axis_type = index_type - y_axis_type = PlotContext.VALUE_AXIS - elif plot_widget.name == DISTRIBUTION: - y_axis_type = PlotContext.VALUE_AXIS - elif plot_widget.name == CROSS_CASE_STATISTICS: - y_axis_type = PlotContext.VALUE_AXIS - elif plot_widget.name == HISTOGRAM: - x_axis_type = PlotContext.VALUE_AXIS - y_axis_type = PlotContext.COUNT_AXIS - elif plot_widget.name == GAUSSIAN_KDE: - x_axis_type = PlotContext.VALUE_AXIS - y_axis_type = PlotContext.DENSITY_AXIS - - self._plot_customizer.setAxisTypes(x_axis_type, y_axis_type) - - - def createPlotContext(self, figure): - key = self.getSelectedKey() - cases = self._case_selection_widget.getPlotCaseNames() - data_gatherer = self.getDataGathererForKey(key) - plot_config = PlotConfig(key) - plot_config.copyConfigFrom(self._plot_customizer.getPlotConfig()) - return PlotContext(self._ert, figure, plot_config, cases, key, data_gatherer) - - def getDataGathererForKey(self, key): - """ @rtype: PlotDataGatherer """ - return next((data_gatherer for data_gatherer in self._data_gatherers if data_gatherer.canGatherDataForKey(key)), None) - - def getSelectedKey(self): - return str(self._data_type_keys_widget.getSelectedItem()) - - def addPlotWidget(self, name, plotFunction, data_gatherers, enabled=True): - plot_condition_function_list = [data_gatherer.canGatherDataForKey for data_gatherer in data_gatherers] - plot_widget = PlotWidget(name, plotFunction, plot_condition_function_list, self.createPlotContext) - plot_widget.customizationTriggered.connect(self.toggleCustomizeDialog) - - index = self._central_tab.addTab(plot_widget, name) - self._plot_widgets.append(plot_widget) - self._central_tab.setTabEnabled(index, enabled) - - - def addDock(self, name, widget, area=Qt.LeftDockWidgetArea, allowed_areas=Qt.AllDockWidgetAreas): - dock_widget = QDockWidget(name) - dock_widget.setObjectName("%sDock" % name) - dock_widget.setWidget(widget) - dock_widget.setAllowedAreas(allowed_areas) - dock_widget.setFeatures(QDockWidget.DockWidgetFloatable | QDockWidget.DockWidgetMovable) - - self.addDockWidget(area, dock_widget) - return dock_widget - - - @showWaitCursorWhileWaiting - def keySelected(self): - key = self.getSelectedKey() - self._plot_customizer.switchPlotConfigHistory(key) - - for plot_widget in self._plot_widgets: - plot_widget.setDirty() - index = self._central_tab.indexOf(plot_widget) - self._central_tab.setTabEnabled(index, plot_widget.canPlotKey(key)) - - for plot_widget in self._plot_widgets: - if plot_widget.canPlotKey(key): - plot_widget.updatePlot() - - - def toggleCustomizeDialog(self): - self._plot_customizer.toggleCustomizationDialog() diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plot/style_chooser.py b/ThirdParty/Ert/python/python/ert_gui/tools/plot/style_chooser.py deleted file mode 100644 index cf00ff8ee9..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plot/style_chooser.py +++ /dev/null @@ -1,151 +0,0 @@ -from PyQt4.QtGui import QWidget, QHBoxLayout, QComboBox, QDoubleSpinBox, QLabel, QHBoxLayout - -from ert_gui.plottery import PlotStyle - - -STYLE_OFF = ("Off", None) -STYLE_AREA = ("Area", "#") -STYLE_SOLID = ("Solid", "-") -STYLE_DASHED = ("Dashed", "--") -STYLE_DOTTED = ("Dotted", ":") -STYLE_DASH_DOTTED = ("Dash Dotted", "-.") - -STYLES = [STYLE_OFF, STYLE_AREA, STYLE_SOLID, STYLE_DASHED, STYLE_DOTTED, STYLE_DASH_DOTTED] -STYLES_LINE_ONLY = [STYLE_OFF, STYLE_SOLID, STYLE_DASHED, STYLE_DOTTED, STYLE_DASH_DOTTED] - -MARKER_OFF = ("Off", None) -MARKER_X = ("X", "x") -MARKER_CIRCLE = ("Circle", "o") -MARKER_POINT = ("Point", ".") -MARKER_PIXEL = ("Pixel", ",") -MARKER_PLUS = ("Plus", "+") -MARKER_STAR = ("Star", "*") -MARKER_DIAMOND = ("Diamond", "D") -MARKER_PENTAGON = ("Pentagon", "p") -MARKER_SQUARE = ("Square", "s") -MARKER_HLINE = ("H Line", "_") -MARKER_VLINE = ("V Line", "|") -MARKER_OCTAGON = ("Octagon", "8") -MARKER_HEXAGON1 = ("Hexagon 1", "h") -MARKER_HEXAGON2 = ("Hexagon 2", "H") - -MARKERS = [MARKER_OFF, MARKER_X, MARKER_CIRCLE, MARKER_POINT, MARKER_STAR, MARKER_DIAMOND, MARKER_PLUS, MARKER_PENTAGON, MARKER_SQUARE, MARKER_OCTAGON, MARKER_HEXAGON1, MARKER_HEXAGON2] - - -class StyleChooser(QWidget): - - def __init__(self, area_supported=False): - QWidget.__init__(self) - self._style = PlotStyle("StyleChooser Internal Style") - self._styles = STYLES if area_supported else STYLES_LINE_ONLY - - self.setMinimumWidth(140) - self.setMaximumHeight(25) - - layout = QHBoxLayout() - layout.setMargin(0) - layout.setSpacing(2) - - self.line_chooser = QComboBox() - self.line_chooser.setToolTip("Select line style.") - for style in self._styles: - self.line_chooser.addItem(*style) - - self.marker_chooser = QComboBox() - self.marker_chooser.setToolTip("Select marker style.") - for marker in MARKERS: - self.marker_chooser.addItem(*marker) - - self.thickness_spinner = QDoubleSpinBox() - self.thickness_spinner.setToolTip("Line thickness") - self.thickness_spinner.setMinimum(0.1) - self.thickness_spinner.setDecimals(1) - self.thickness_spinner.setSingleStep(0.1) - - self.size_spinner = QDoubleSpinBox() - self.size_spinner.setToolTip("Marker Size") - self.size_spinner.setMinimum(0.1) - self.size_spinner.setDecimals(1) - self.size_spinner.setSingleStep(0.1) - - layout.addWidget(self.line_chooser) - layout.addWidget(self.thickness_spinner) - layout.addWidget(self.marker_chooser) - layout.addWidget(self.size_spinner) - - self.setLayout(layout) - - self.line_chooser.currentIndexChanged.connect(self._updateStyle) - self.marker_chooser.currentIndexChanged.connect(self._updateStyle) - self.thickness_spinner.valueChanged.connect(self._updateStyle) - self.size_spinner.valueChanged.connect(self._updateStyle) - - self._updateLineStyleAndMarker(self._style.line_style, self._style.marker, self._style.width, self._style.size) - self._layout = layout - - def getItemSizes(self): - line_style_combo_width = self._layout.itemAt(0).sizeHint().width() - thickness_spinner_width = self._layout.itemAt(1).sizeHint().width() - marker_combo_width = self._layout.itemAt(2).sizeHint().width() - size_spinner_width = self._layout.itemAt(3).sizeHint().width() - return line_style_combo_width, thickness_spinner_width, marker_combo_width, size_spinner_width - - def _findLineStyleIndex(self, line_style): - for index, style in enumerate(self._styles): - if style[1] == line_style: - return index - elif style[1] is None and line_style == "": - return index - return -1 - - def _findMarkerStyleIndex(self, marker): - for index, style in enumerate(MARKERS): - if style[1] == marker: - return index - elif style[1] is None and marker == "": - return index - return -1 - - def _updateLineStyleAndMarker(self, line_style, marker, thickness, size): - self.line_chooser.setCurrentIndex(self._findLineStyleIndex(line_style)) - self.marker_chooser.setCurrentIndex(self._findMarkerStyleIndex(marker)) - self.thickness_spinner.setValue(thickness) - self.size_spinner.setValue(size) - - def _updateStyle(self): - self.marker_chooser.setEnabled(self.line_chooser.currentText() != "Area") - - line_style = self.line_chooser.itemData(self.line_chooser.currentIndex()) - marker_style = self.marker_chooser.itemData(self.marker_chooser.currentIndex()) - thickness = float(self.thickness_spinner.value()) - size = float(self.size_spinner.value()) - - self._style.line_style = str(line_style.toString()) - self._style.marker = str(marker_style.toString()) - self._style.width = thickness - self._style.size = size - - def setStyle(self, style): - """ @type style: PlotStyle """ - self._style.copyStyleFrom(style) - self._updateLineStyleAndMarker(style.line_style, style.marker, style.width, style.size) - - def getStyle(self): - """ @rtype: PlotStyle """ - style = PlotStyle("Generated Style from StyleChooser") - style.copyStyleFrom(self._style) - return style - - def createLabelLayout(self, layout=None): - if layout is None: - layout = QHBoxLayout() - - titles = ["Line Style", "Width", "Marker Style", "Size"] - sizes = self.getItemSizes() - for title, size in zip(titles, sizes): - label = QLabel(title) - label.setFixedWidth(size) - layout.addWidget(label) - - return layout - diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plot/widgets/CMakeLists.txt b/ThirdParty/Ert/python/python/ert_gui/tools/plot/widgets/CMakeLists.txt deleted file mode 100644 index 6208a1a4d4..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plot/widgets/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - clearable_line_edit.py - custom_date_edit.py -) - -add_python_package("python.ert_gui.tools.plot.widgets" ${PYTHON_INSTALL_PREFIX}/ert_gui/tools/plot/widgets "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plot/widgets/clearable_line_edit.py b/ThirdParty/Ert/python/python/ert_gui/tools/plot/widgets/clearable_line_edit.py deleted file mode 100644 index 81d24eec9b..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plot/widgets/clearable_line_edit.py +++ /dev/null @@ -1,97 +0,0 @@ -from PyQt4.QtCore import QString, QSize, Qt -from PyQt4.QtGui import QPushButton, QColor, QLineEdit, QStyle - -from ert_gui.ertwidgets import resourceIcon - - -class ClearableLineEdit(QLineEdit): - passive_color = QColor(194, 194, 194) - - def __init__(self, placeholder="yyyy-mm-dd"): - QLineEdit.__init__(self) - - self._placeholder_text = placeholder - self._active_color = self.palette().color(self.foregroundRole()) - self._placeholder_active = False - - self._clear_button = QPushButton(self) - self._clear_button.setIcon(resourceIcon("remove_favorite.png")) - self._clear_button.setFlat(True) - self._clear_button.setFocusPolicy(Qt.NoFocus) - self._clear_button.setFixedSize(17, 17) - self._clear_button.setCursor(Qt.ArrowCursor) - - self._clear_button.clicked.connect(self.clearButtonClicked) - self._clear_button.setVisible(False) - - self.textChanged.connect(self.toggleClearButtonVisibility) - - self.showPlaceholder() - - - def toggleClearButtonVisibility(self): - self._clear_button.setVisible(len(str(self.text())) > 0 and not self._placeholder_active) - - def sizeHint(self): - size = QLineEdit.sizeHint(self) - return QSize(size.width() + self._clear_button.width() + 3, size.height()) - - def minimumSizeHint(self): - size = QLineEdit.minimumSizeHint(self) - return QSize(size.width() + self._clear_button.width() + 3, size.height()) - - def resizeEvent(self, event): - right = self.rect().right() - frame_width = self.style().pixelMetric(QStyle.PM_DefaultFrameWidth) - self._clear_button.move(right - frame_width - self._clear_button.width(), (self.height() - self._clear_button.height()) / 2) - QLineEdit.resizeEvent(self, event) - - def clearButtonClicked(self): - self.setText("") - - def showPlaceholder(self): - if not self._placeholder_active: - self._placeholder_active = True - QLineEdit.setText(self, self._placeholder_text) - palette = self.palette() - palette.setColor(self.foregroundRole(), self.passive_color) - self.setPalette(palette) - - def hidePlaceHolder(self): - if self._placeholder_active: - self._placeholder_active = False - QLineEdit.setText(self, "") - palette = self.palette() - palette.setColor(self.foregroundRole(), self._active_color) - self.setPalette(palette) - - def focusInEvent(self, focus_event): - QLineEdit.focusInEvent(self, focus_event) - self.hidePlaceHolder() - - def focusOutEvent(self, focus_event): - QLineEdit.focusOutEvent(self, focus_event) - if str(QLineEdit.text(self)) == "": - self.showPlaceholder() - - def keyPressEvent(self, key_event): - if key_event.key() == Qt.Key_Escape: - self.clear() - self.clearFocus() - key_event.accept() - - QLineEdit.keyPressEvent(self, key_event) - - def setText(self, string): - self.hidePlaceHolder() - - QLineEdit.setText(self, string) - - if len(str(string)) == 0 and not self.hasFocus(): - self.showPlaceholder() - - def text(self): - if self._placeholder_active: - return QString("") - else: - return QLineEdit.text(self) diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plot/widgets/custom_date_edit.py b/ThirdParty/Ert/python/python/ert_gui/tools/plot/widgets/custom_date_edit.py deleted file mode 100644 index 882a97ee36..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plot/widgets/custom_date_edit.py +++ /dev/null @@ -1,53 +0,0 @@ -import datetime - -from PyQt4.QtCore import QDate -from PyQt4.QtGui import QWidget, QHBoxLayout, QCalendarWidget, QToolButton, QMenu, QWidgetAction - -from ert_gui.ertwidgets import resourceIcon -from ert_gui.tools.plot.widgets.clearable_line_edit import ClearableLineEdit - -class CustomDateEdit(QWidget): - def __init__(self): - QWidget.__init__(self) - self._line_edit = ClearableLineEdit() - - self._calendar_button = QToolButton() - self._calendar_button.setPopupMode(QToolButton.InstantPopup) - self._calendar_button.setFixedSize(26, 26) - self._calendar_button.setAutoRaise(True) - self._calendar_button.setIcon(resourceIcon("calendar.png")) - self._calendar_button.setStyleSheet("QToolButton::menu-indicator { image: none; }") - - tool_menu = QMenu(self._calendar_button) - self._calendar_widget = QCalendarWidget(tool_menu) - action = QWidgetAction(tool_menu) - action.setDefaultWidget(self._calendar_widget) - tool_menu.addAction(action) - self._calendar_button.setMenu(tool_menu) - - layout = QHBoxLayout() - layout.setMargin(0) - layout.addWidget(self._line_edit) - layout.addWidget(self._calendar_button) - self.setLayout(layout) - - self._calendar_widget.activated.connect(self.setDate) - - def setDate(self, date): - if isinstance(date, datetime.date): - date = QDate(date.year, date.month, date.day) - - if date is not None and date.isValid(): - self._line_edit.setText(str(date.toString("yyyy-MM-dd"))) - else: - self._line_edit.setText("") - - - def date(self): - date_string = self._line_edit.text() - if len(str(date_string).strip()) > 0: - date = QDate.fromString(date_string, "yyyy-MM-dd") - if date.isValid(): - return datetime.date(date.year(), date.month(), date.day()) - - return None diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plugins/CMakeLists.txt b/ThirdParty/Ert/python/python/ert_gui/tools/plugins/CMakeLists.txt deleted file mode 100644 index 26ba15fee6..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plugins/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - plugin.py - plugin_handler.py - plugin_runner.py - plugins_tool.py - process_job_dialog.py -) - -add_python_package("python.ert_gui.tools.plugins" ${PYTHON_INSTALL_PREFIX}/ert_gui/tools/plugins "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plugins/__init__.py b/ThirdParty/Ert/python/python/ert_gui/tools/plugins/__init__.py deleted file mode 100644 index d3509c4f5d..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plugins/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -from .process_job_dialog import ProcessJobDialog -from .plugin import Plugin -from .plugin_runner import PluginRunner -from .plugin_handler import PluginHandler -from .plugins_tool import PluginsTool diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plugins/plugin.py b/ThirdParty/Ert/python/python/ert_gui/tools/plugins/plugin.py deleted file mode 100644 index 1a4ee460b3..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plugins/plugin.py +++ /dev/null @@ -1,54 +0,0 @@ -from ert.job_queue import ErtScript, ErtPlugin, WorkflowJob - -class Plugin(object): - def __init__(self, ert, workflow_job): - """ - @type ert: ert.enkf.EnKFMain - @type workflow_job: WorkflowJob - """ - self.__ert = ert - self.__workflow_job = workflow_job - self.__parent_window = None - - script = self.__loadPlugin() - self.__name = script.getName() - self.__description = script.getDescription() - - - def __loadPlugin(self): - """ @rtype: ErtPlugin """ - script_obj = ErtScript.loadScriptFromFile(self.__workflow_job.getInternalScriptPath()) - script = script_obj(self.__ert) - return script - - def getName(self): - """ @rtype: str """ - return self.__name - - def getDescription(self): - """ @rtype: str """ - return self.__description - - def getArguments(self): - """ - Returns a list of arguments. Either from GUI or from arbitrary code. - If the user for example cancels in the GUI a CancelPluginException is raised. - @rtype: list """ - script = self.__loadPlugin() - return script.getArguments(self.__parent_window) - - - def setParentWindow(self, parent_window): - self.__parent_window = parent_window - - def getParentWindow(self): - """ @rtype: QWidget """ - return self.__parent_window - - def ert(self): - """ @rtype: ert.enkf.enkf_main.EnKFMain """ - return self.__ert - - def getWorkflowJob(self): - """ @rtype: WorkflowJob """ - return self.__workflow_job diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plugins/plugin_handler.py b/ThirdParty/Ert/python/python/ert_gui/tools/plugins/plugin_handler.py deleted file mode 100644 index 6622bfc79e..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plugins/plugin_handler.py +++ /dev/null @@ -1,37 +0,0 @@ -from ert.job_queue import WorkflowJob -from .plugin import Plugin - - -class PluginHandler(object): - - def __init__(self, ert, plugin_jobs, parent_window): - """ @type plugin_jobs: list of WorkflowJob """ - self.__ert = ert - self.__plugins = [] - - for job in plugin_jobs: - plugin = Plugin(self.__ert, job) - self.__plugins.append(plugin) - plugin.setParentWindow(parent_window) - - self.__plugins = sorted(self.__plugins, key=Plugin.getName) - - - def ert(self): - """ @rtype: ert.enkf.enkf_main.EnKFMain """ - return self.__ert - - def __iter__(self): - """ @rtype: Plugin """ - index = 0 - while index < len(self.__plugins): - yield self.__plugins[index] - index += 1 - - def __getitem__(self, index): - """ @rtype: Plugin """ - return self.__plugins[index] - - - def __len__(self): - return len(self.__plugins) diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plugins/plugin_runner.py b/ThirdParty/Ert/python/python/ert_gui/tools/plugins/plugin_runner.py deleted file mode 100644 index 44978a8999..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plugins/plugin_runner.py +++ /dev/null @@ -1,91 +0,0 @@ -from functools import partial -from threading import Thread -import time -from ert.job_queue.ert_plugin import CancelPluginException -from ert_gui.tools.plugins import Plugin, ProcessJobDialog -from ert.job_queue import WorkflowJob - -class PluginRunner(object): - def __init__(self, plugin): - """ - @type plugin: Plugin - """ - super(PluginRunner, self).__init__() - - self.__plugin = plugin - - self.__plugin_finished_callback = lambda : None - - self.__result = None - - def run(self): - try: - plugin = self.__plugin - - arguments = plugin.getArguments() - dialog = ProcessJobDialog(plugin.getName(), plugin.getParentWindow()) - - dialog.cancelConfirmed.connect(self.cancel) - - run_function = partial(self.__runWorkflowJob, plugin, arguments) - - workflow_job_thread = Thread(name="ert_gui_workflow_job_thread") - workflow_job_thread.setDaemon(True) - workflow_job_thread.run = run_function - workflow_job_thread.start() - - - poll_function = partial(self.__pollRunner, plugin, dialog) - - poll_thread = Thread(name="ert_gui_workflow_job_poll_thread") - poll_thread.setDaemon(True) - poll_thread.run = poll_function - poll_thread.start() - - dialog.show() - except CancelPluginException: - print("Plugin cancelled before execution!") - - def __runWorkflowJob(self, plugin, arguments): - workflow_job = plugin.getWorkflowJob() - self.__result = workflow_job.run(plugin.ert(), arguments) - - - def __pollRunner(self, plugin, dialog): - self.wait() - - details = "" - if self.__result is not None: - details = str(self.__result) - - if plugin.getWorkflowJob().hasFailed(): - dialog.presentError.emit("Job Failed!", "The job '%s' has failed while running!" % plugin.getName(), details) - dialog.disposeDialog.emit() - elif plugin.getWorkflowJob().isCancelled(): - dialog.presentInformation.emit("Job Cancelled!", "The job '%s' was cancelled successfully!" % plugin.getName(), details) - dialog.disposeDialog.emit() - else: - dialog.presentInformation.emit("Job Completed!", "The job '%s' was completed successfully!" % plugin.getName(), details) - dialog.disposeDialog.emit() - - self.__plugin_finished_callback() - - - def isRunning(self): - """ @rtype: bool """ - return self.__plugin.getWorkflowJob().isRunning() - - def isCancelled(self): - """ @rtype: bool """ - return self.__plugin.getWorkflowJob().isCancelled() - - def cancel(self): - if self.isRunning(): - self.__plugin.getWorkflowJob().cancel() - - def wait(self): - while self.isRunning(): - time.sleep(1) - - def setPluginFinishedCallback(self, callback): - self.__plugin_finished_callback = callback \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plugins/plugins_tool.py b/ThirdParty/Ert/python/python/ert_gui/tools/plugins/plugins_tool.py deleted file mode 100644 index 6f8ba2fa1d..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plugins/plugins_tool.py +++ /dev/null @@ -1,34 +0,0 @@ -from PyQt4.QtGui import QMenu - -from ert_gui import ERT -from ert_gui.ertwidgets import resourceIcon -from ert_gui.tools import Tool -from ert_gui.tools.plugins import PluginHandler, PluginRunner - - -class PluginsTool(Tool): - def __init__(self, plugin_handler): - """ - @type plugin_handler: PluginHandler - """ - enabled = len(plugin_handler) > 0 - super(PluginsTool, self).__init__("Plugins", "tools/plugins", resourceIcon("ide/plugin"), enabled, popup_menu=True) - - self.__plugins = {} - - menu = QMenu() - for plugin in plugin_handler: - plugin_runner = PluginRunner(plugin) - plugin_runner.setPluginFinishedCallback(self.trigger) - - self.__plugins[plugin] = plugin_runner - plugin_action = menu.addAction(plugin.getName()) - plugin_action.setToolTip(plugin.getDescription()) - plugin_action.triggered.connect(plugin_runner.run) - - self.getAction().setMenu(menu) - - - def trigger(self): - ERT.emitErtChange() # plugin may have added new cases. - diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plugins/process_job_dialog.py b/ThirdParty/Ert/python/python/ert_gui/tools/plugins/process_job_dialog.py deleted file mode 100644 index 1a80bdc62a..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/plugins/process_job_dialog.py +++ /dev/null @@ -1,121 +0,0 @@ -from PyQt4.QtCore import Qt, pyqtSignal, QSize -from PyQt4.QtGui import QDialog, QVBoxLayout, QLayout, QPushButton, QHBoxLayout, QWidget, QLabel, QMessageBox, QSizePolicy, QSpacerItem - -from ert_gui.ertwidgets import resourceMovie - - -class ProcessJobDialog(QDialog): - - disposeDialog = pyqtSignal() - presentInformation = pyqtSignal(str, str, str) - presentError = pyqtSignal(str, str, str) - - closeButtonPressed = pyqtSignal() - cancelConfirmed = pyqtSignal() - - def __init__(self, title, parent=None): - QDialog.__init__(self, parent) - - self.__parent = parent - self.setWindowTitle(title) - self.setModal(True) - self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) - self.setWindowFlags(self.windowFlags() & ~Qt.WindowCloseButtonHint) - self.setWindowFlags(self.windowFlags() & ~Qt.WindowCancelButtonHint) - - layout = QVBoxLayout() - layout.setSizeConstraint(QLayout.SetFixedSize) - - widget = QWidget() - widget_layout = QHBoxLayout() - - size = 64 - spin_movie = resourceMovie("ide/loading.gif") - spin_movie.setSpeed(60) - spin_movie.setScaledSize(QSize(size, size)) - spin_movie.start() - - processing_animation = QLabel() - processing_animation.setMaximumSize(QSize(size, size)) - processing_animation.setMinimumSize(QSize(size, size)) - processing_animation.setMovie(spin_movie) - widget_layout.addWidget(processing_animation) - - self.processing_label = QLabel("Processing job: '%s'" % title) - widget_layout.addWidget(self.processing_label, Qt.AlignBottom) - - widget.setLayout(widget_layout) - - layout.addWidget(widget) - - button_layout = QHBoxLayout() - self.close_button = QPushButton("Close") - self.close_button.clicked.connect(self.closeButtonPressed.emit) - button_layout.addStretch() - button_layout.addWidget(self.close_button) - - layout.addStretch() - layout.addLayout(button_layout) - - self.setLayout(layout) - - self.disposeDialog.connect(self.reject) - self.presentInformation.connect(self.__presentInformation) - self.presentError.connect(self.__presentError) - self.closeButtonPressed.connect(self.__confirmCancel) - - - def disableCloseButton(self): - self.close_button.setEnabled(False) - - def enableCloseButton(self): - self.close_button.setEnabled(True) - - def keyPressEvent(self, q_key_event): - if not self.close_button.isEnabled() and q_key_event.key() == Qt.Key_Escape: - pass - else: - QDialog.keyPressEvent(self, q_key_event) - - def closeEvent(self, close_event): - close_event.ignore() - self.closeButtonPressed.emit() - - def __createMsgBox(self, title, message, details): - msg_box = QMessageBox(self.parent()) - msg_box.setText(title) - msg_box.setInformativeText(message) - - if len(details) > 0: - msg_box.setDetailedText(details) - - horizontal_spacer = QSpacerItem(500, 0, QSizePolicy.MinimumExpanding, QSizePolicy.Expanding) - layout = msg_box.layout() - layout.addItem(horizontal_spacer, layout.rowCount(), 0, 1, layout.columnCount()) - - return msg_box - - - def __presentInformation(self, title, message, details): - msg_box = self.__createMsgBox(title, message, details) - msg_box.setIcon(QMessageBox.Information) - - msg_box.exec_() - - def __presentError(self, title, message, details): - msg_box = self.__createMsgBox(title, message, details) - msg_box.setIcon(QMessageBox.Critical) - - msg_box.exec_() - - - def __confirmCancel(self): - cancel_box = self.__createMsgBox("Confirm Cancel", "Are you sure you want to cancel the running job?", "") - cancel_box.setIcon(QMessageBox.Question) - cancel_box.setStandardButtons(QMessageBox.Yes | QMessageBox.No) - cancel_box.exec_() - - cancel = cancel_box.result() - - if cancel == QMessageBox.Yes: - self.cancelConfirmed.emit() diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/tool.py b/ThirdParty/Ert/python/python/ert_gui/tools/tool.py deleted file mode 100644 index 67034a0efb..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/tool.py +++ /dev/null @@ -1,57 +0,0 @@ -from PyQt4.QtGui import QAction -from ert_gui.tools import HelpCenter - - -class Tool(object): - def __init__(self, name, help_link="", icon=None, enabled=True, checkable=False, popup_menu=False): - super(Tool, self).__init__() - self.__icon = icon - self.__name = name - self.__parent = None - self.__enabled = enabled - self.__checkable = checkable - self.__help_link = help_link - self.__is_popup_menu = popup_menu - - self.__action = QAction(self.getIcon(), self.getName(), None) - self.__action.setIconText(self.getName()) - self.__action.setEnabled(self.isEnabled()) - self.__action.setCheckable(checkable) - self.__action.triggered.connect(self.trigger) - - HelpCenter.addHelpToAction(self.__action, self.getHelpLink()) - - def getIcon(self): - return self.__icon - - def getName(self): - return self.__name - - def trigger(self): - raise NotImplementedError() - - def setParent(self, parent): - self.__parent = parent - self.__action.setParent(parent) - - def parent(self): - return self.__parent - - def isEnabled(self): - return self.__enabled - - def getHelpLink(self): - return self.__help_link - - - def getAction(self): - return self.__action - - def setVisible(self, visible): - self.__action.setVisible(visible) - - def setEnabled(self, enabled): - self.__action.setEnabled(enabled) - - def isPopupMenu(self): - return self.__is_popup_menu diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/workflows/CMakeLists.txt b/ThirdParty/Ert/python/python/ert_gui/tools/workflows/CMakeLists.txt deleted file mode 100644 index a042788db3..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/workflows/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - run_workflow_widget.py - workflow_dialog.py - workflows_tool.py -) - -add_python_package("python.ert_gui.tools.workflows" ${PYTHON_INSTALL_PREFIX}/ert_gui/tools/workflows "${PYTHON_SOURCES}" True) - diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/workflows/__init__.py b/ThirdParty/Ert/python/python/ert_gui/tools/workflows/__init__.py deleted file mode 100644 index 5dd024d585..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/workflows/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -from .run_workflow_widget import RunWorkflowWidget -from .workflows_tool import WorkflowsTool \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/workflows/run_workflow_widget.py b/ThirdParty/Ert/python/python/ert_gui/tools/workflows/run_workflow_widget.py deleted file mode 100644 index 05f81ddccf..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/workflows/run_workflow_widget.py +++ /dev/null @@ -1,146 +0,0 @@ -import time -from threading import Thread - -from PyQt4.QtCore import QSize, Qt, pyqtSignal -from PyQt4.QtGui import QWidget, QHBoxLayout, QLabel, QToolButton, QMessageBox, QComboBox - -from ert_gui.ertwidgets import addHelpToWidget, resourceMovie, resourceIcon -from ert_gui.ertwidgets.models.ertmodel import getWorkflowNames, createWorkflowRunner -from ert_gui.tools.workflows.workflow_dialog import WorkflowDialog - - -class RunWorkflowWidget(QWidget): - - workflowSucceeded = pyqtSignal() - workflowFailed = pyqtSignal() - workflowKilled = pyqtSignal() - - def __init__(self): - QWidget.__init__(self) - - layout = QHBoxLayout() - layout.addSpacing(10) - - - self._workflow_combo = QComboBox() - addHelpToWidget(self._workflow_combo, "run/workflow") - - self._workflow_combo.addItems(getWorkflowNames()) - - layout.addWidget(QLabel("Select Workflow:"), 0, Qt.AlignVCenter) - layout.addWidget(self._workflow_combo, 0, Qt.AlignVCenter) - - # simulation_mode_layout.addStretch() - layout.addSpacing(20) - - self.run_button = QToolButton() - self.run_button.setIconSize(QSize(32, 32)) - self.run_button.setText("Start Workflow") - self.run_button.setIcon(resourceIcon("ide/gear_in_play")) - self.run_button.clicked.connect(self.startWorkflow) - self.run_button.setToolButtonStyle(Qt.ToolButtonTextBesideIcon) - - layout.addWidget(self.run_button) - layout.addStretch(1) - - self.setLayout(layout) - - self._running_workflow_dialog = None - - self.workflowSucceeded.connect(self.workflowFinished) - self.workflowFailed.connect(self.workflowFinishedWithFail) - self.workflowKilled.connect(self.workflowStoppedByUser) - - self._workflow_runner = None - """:type: WorkflowRunner""" - - - def createSpinWidget(self): - widget = QWidget() - layout = QHBoxLayout() - - size = 64 - spin_movie = resourceMovie("ide/loading.gif") - spin_movie.setSpeed(60) - spin_movie.setScaledSize(QSize(size, size)) - spin_movie.start() - - processing_animation = QLabel() - processing_animation.setMaximumSize(QSize(size, size)) - processing_animation.setMinimumSize(QSize(size, size)) - processing_animation.setMovie(spin_movie) - layout.addWidget(processing_animation) - - processing_label = QLabel("Processing workflow '%s'" % self.getCurrentWorkflowName()) - layout.addWidget(processing_label, Qt.AlignBottom) - - widget.setLayout(layout) - - return widget - - - def cancelWorkflow(self): - if self._workflow_runner.isRunning(): - cancel = QMessageBox.question(self, "Confirm Cancel", "Are you sure you want to cancel the running workflow?", QMessageBox.Yes | QMessageBox.No) - - if cancel == QMessageBox.Yes: - self._workflow_runner.cancel() - self._running_workflow_dialog.disableCloseButton() - - def getCurrentWorkflowName(self): - index = self._workflow_combo.currentIndex() - return getWorkflowNames()[index] - - - def startWorkflow(self): - self._running_workflow_dialog = WorkflowDialog("Running Workflow", self.createSpinWidget(), self) - self._running_workflow_dialog.closeButtonPressed.connect(self.cancelWorkflow) - - workflow_thread = Thread(name="ert_gui_workflow_thread") - workflow_thread.setDaemon(True) - workflow_thread.run = self.runWorkflow - - self._workflow_runner = createWorkflowRunner(self.getCurrentWorkflowName()) - self._workflow_runner.run() - - workflow_thread.start() - - self._running_workflow_dialog.show() - - def runWorkflow(self): - while self._workflow_runner.isRunning(): - time.sleep(2) - - cancelled = self._workflow_runner.isCancelled() - - if cancelled: - self.workflowKilled.emit() - else: - success = self._workflow_runner.workflowResult() - - if not success: - self.workflowFailed.emit() - else: - self.workflowSucceeded.emit() - - def workflowFinished(self): - workflow_name = self.getCurrentWorkflowName() - QMessageBox.information(self, "Workflow completed!", "The workflow '%s' completed successfully!" % workflow_name) - self._running_workflow_dialog.accept() - self._running_workflow_dialog = None - - def workflowFinishedWithFail(self): - workflow_name = self.getCurrentWorkflowName() - - error = self._workflow_runner.workflowError() - - QMessageBox.critical(self, "Workflow failed!", "The workflow '%s' failed!\n\n%s" % (workflow_name, error)) - self._running_workflow_dialog.reject() - self._running_workflow_dialog = None - - def workflowStoppedByUser(self): - workflow_name = self.getCurrentWorkflowName() - QMessageBox.information(self, "Workflow killed!", "The workflow '%s' was killed successfully!" % workflow_name) - self._running_workflow_dialog.reject() - self._running_workflow_dialog = None - \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/workflows/workflow_dialog.py b/ThirdParty/Ert/python/python/ert_gui/tools/workflows/workflow_dialog.py deleted file mode 100644 index 320eb8a9be..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/workflows/workflow_dialog.py +++ /dev/null @@ -1,46 +0,0 @@ -from PyQt4.QtCore import Qt, pyqtSignal -from PyQt4.QtGui import QDialog, QVBoxLayout, QLayout, QPushButton, QHBoxLayout - - -class WorkflowDialog(QDialog): - - closeButtonPressed = pyqtSignal() - - def __init__(self, title, widget, parent=None): - QDialog.__init__(self, parent) - - self.setWindowTitle(title) - self.setModal(True) - self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) - self.setWindowFlags(self.windowFlags() & ~Qt.WindowCloseButtonHint) - self.setWindowFlags(self.windowFlags() & ~Qt.WindowCancelButtonHint) - - - layout = QVBoxLayout() - layout.setSizeConstraint(QLayout.SetFixedSize) # not resizable!!! - layout.addWidget(widget) - - button_layout = QHBoxLayout() - self.close_button = QPushButton("Close") - self.close_button.clicked.connect(self.closeButtonPressed.emit) - button_layout.addStretch() - button_layout.addWidget(self.close_button) - - layout.addStretch() - layout.addLayout(button_layout) - - self.setLayout(layout) - - - def disableCloseButton(self): - self.close_button.setEnabled(False) - - def enableCloseButton(self): - self.close_button.setEnabled(True) - - def keyPressEvent(self, q_key_event): - if not self.close_button.isEnabled() and q_key_event.key() == Qt.Key_Escape: - pass - else: - QDialog.keyPressEvent(self, q_key_event) - diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/workflows/workflows_tool.py b/ThirdParty/Ert/python/python/ert_gui/tools/workflows/workflows_tool.py deleted file mode 100644 index 223d52584d..0000000000 --- a/ThirdParty/Ert/python/python/ert_gui/tools/workflows/workflows_tool.py +++ /dev/null @@ -1,20 +0,0 @@ -from ert_gui import ERT -from ert_gui.ertwidgets import resourceIcon -from ert_gui.ertwidgets.closabledialog import ClosableDialog -from ert_gui.ertwidgets.models.ertmodel import getWorkflowNames -from ert_gui.tools import Tool -from ert_gui.tools.workflows import RunWorkflowWidget - - -class WorkflowsTool(Tool): - def __init__(self): - enabled = len(getWorkflowNames()) > 0 - super(WorkflowsTool, self).__init__("Run Workflow", "tools/workflows", resourceIcon("ide/to_do_list_checked_1"), enabled) - - - def trigger(self): - run_workflow_widget = RunWorkflowWidget() - dialog = ClosableDialog("Run workflow", run_workflow_widget, self.parent()) - dialog.exec_() - ERT.emitErtChange() # workflow may have added new cases. - diff --git a/ThirdParty/Ert/python/python/test_env.py.in b/ThirdParty/Ert/python/python/test_env.py.in new file mode 100644 index 0000000000..9fd11ea156 --- /dev/null +++ b/ThirdParty/Ert/python/python/test_env.py.in @@ -0,0 +1,6 @@ +import os + +TESTDATA_ROOT = os.getenv("ERT_TEST_ROOT_PATH") or "${PROJECT_SOURCE_DIR}/test-data" +SOURCE_ROOT = "${PROJECT_SOURCE_DIR}" +BUILD_ROOT = "${PROJECT_BINARY_DIR}" + diff --git a/ThirdParty/Ert/python/tests/CMakeLists.txt b/ThirdParty/Ert/python/tests/CMakeLists.txt index c75b981836..985fe07610 100644 --- a/ThirdParty/Ert/python/tests/CMakeLists.txt +++ b/ThirdParty/Ert/python/tests/CMakeLists.txt @@ -1,54 +1,16 @@ set(TEST_SOURCES __init__.py - ctest_import.py - ctest_run.py - import_tester.py ) -set(TEST_ROOT ${CMAKE_CURRENT_SOURCE_DIR}) -set(INSTALL_DIRECTORY ${PROJECT_BINARY_DIR}/${PYTHON_INSTALL_PREFIX}) - add_python_package("python.tests" "${PYTHON_INSTALL_PREFIX}/tests" "${TEST_SOURCES}" False) +set(CTEST_PYTHONPATH ${PROJECT_BINARY_DIR}/${PYTHON_INSTALL_PREFIX}) -function (addPythonTest TEST_NAME TEST_CLASS) - set(oneValueArgs LABELS) - set(multiValueArgs ARGUMENTS ENVIRONMENT) - cmake_parse_arguments(TEST_OPTIONS "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - - add_test(NAME python.tests.${TEST_NAME} - WORKING_DIRECTORY ${INSTALL_DIRECTORY} - COMMAND tests/ctest_run.py ${INSTALL_DIRECTORY} ${TEST_CLASS} ${TEST_OPTIONS_ARGUMENTS}) - - if(TEST_OPTIONS_LABELS) - set_property(TEST python.tests.${TEST_NAME} PROPERTY LABELS "Python:${TEST_OPTIONS_LABELS}") - else() - set_property(TEST python.tests.${TEST_NAME} PROPERTY LABELS "Python") - endif() - - if(TEST_OPTIONS_ENVIRONMENT) - set_property(TEST python.tests.${TEST_NAME} PROPERTY ENVIRONMENT ${TEST_OPTIONS_ENVIRONMENT}) - endif() -endfunction(addPythonTest) - - -add_subdirectory(core) -add_subdirectory(share) - -if(BUILD_ERT) - add_subdirectory(ert) - - add_test( NAME python.tests.ert.import - WORKING_DIRECTORY ${INSTALL_DIRECTORY} - COMMAND tests/ctest_import.py ${INSTALL_DIRECTORY} "ert") - - if (ERT_BUILD_GUI) - add_subdirectory(gui) - - add_test( NAME python.tests.ert_gui.import - WORKING_DIRECTORY ${INSTALL_DIRECTORY} - COMMAND tests/ctest_import.py ${INSTALL_DIRECTORY} "ert_gui") - endif() +add_subdirectory(geometry) +add_subdirectory(util) +add_subdirectory(ecl) +add_subdirectory(well) +add_subdirectory(cwrap) +add_subdirectory(global) -endif() diff --git a/ThirdParty/Ert/python/tests/core/CMakeLists.txt b/ThirdParty/Ert/python/tests/core/CMakeLists.txt deleted file mode 100644 index 62741f3c13..0000000000 --- a/ThirdParty/Ert/python/tests/core/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -set(TEST_SOURCES - __init__.py -) - -add_python_package("python.tests.core" ${PYTHON_INSTALL_PREFIX}/tests/core "${TEST_SOURCES}" False) - -add_subdirectory(cwrap) -add_subdirectory(geometry) -add_subdirectory(util) -add_subdirectory(ecl) -add_subdirectory(well) diff --git a/ThirdParty/Ert/python/tests/core/cwrap/CMakeLists.txt b/ThirdParty/Ert/python/tests/core/cwrap/CMakeLists.txt deleted file mode 100644 index a1fa1cea2b..0000000000 --- a/ThirdParty/Ert/python/tests/core/cwrap/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -set(TEST_SOURCES - __init__.py - test_basecclass.py - test_basecenum.py - test_basecvalue.py - test_cwrap.py - test_metawrap.py - test_cfile.py -) - -add_python_package("python.tests.core.cwrap" ${PYTHON_INSTALL_PREFIX}/tests/core/cwrap "${TEST_SOURCES}" False) - -addPythonTest(core.cwrap tests.core.cwrap.test_cwrap.CWrapTest) -addPythonTest(core.cwrap.basecclass tests.core.cwrap.test_basecclass.BaseCClassTest) -addPythonTest(core.cwrap.basecenum tests.core.cwrap.test_basecenum.BaseCEnumTest) -addPythonTest(core.cwrap.basecvalue tests.core.cwrap.test_basecvalue.BaseCValueTest) -addPythonTest(core.cwrap.metacwrap tests.core.cwrap.test_metawrap.MetaWrapTest) -addPythonTest(core.cwrap.cfile tests.core.cwrap.test_cfile.CFILETest) - diff --git a/ThirdParty/Ert/python/tests/core/cwrap/test_cwrap.py b/ThirdParty/Ert/python/tests/core/cwrap/test_cwrap.py deleted file mode 100644 index 1da65c7af5..0000000000 --- a/ThirdParty/Ert/python/tests/core/cwrap/test_cwrap.py +++ /dev/null @@ -1,92 +0,0 @@ -import ctypes -import ert -from cwrap import CWrapper, BaseCClass, CWrapError -from ert.test import ExtendedTestCase - -test_lib = ert.load("libert_util") # create a local namespace (so we don't overwrite StringList) -cwrapper = CWrapper(test_lib) - -class StringListTest(BaseCClass): - def __init__(self): - c_pointer = self.cNamespace().alloc() - super(StringListTest, self).__init__(c_pointer) - - def free(self): - StringListTest.cNamespace().free(self) - -CWrapper.registerObjectType("stringlisttest", StringListTest) - -StringListTest.cNamespace().alloc = cwrapper.prototype("c_void_p stringlist_alloc_new( )") -StringListTest.cNamespace().free = cwrapper.prototype("void stringlist_free(stringlisttest )") - - -class CWrapTest(ExtendedTestCase): - - def test_return_type(self): - stringlist_alloc = cwrapper.prototype("c_void_p stringlist_alloc_new( )") - string_list1 = StringListTest() - - stringlist_alloc = cwrapper.prototype("stringlisttest_obj stringlist_alloc_new( )") - string_list2 = stringlist_alloc() - - stringlist_alloc = cwrapper.prototype("stringlisttest_ref stringlist_alloc_new( )") - string_list3 = stringlist_alloc() - - self.assertIsInstance(string_list1, StringListTest) - self.assertIsInstance(string_list2, StringListTest) - self.assertIsInstance(string_list3, StringListTest) - - self.assertFalse(string_list1.isReference()) - self.assertFalse(string_list2.isReference()) - self.assertTrue(string_list3.isReference()) - - self.assertNotEqual(BaseCClass.from_param(string_list1), BaseCClass.from_param(string_list2)) - self.assertNotEqual(BaseCClass.from_param(string_list2), BaseCClass.from_param(string_list3)) - self.assertNotEqual(BaseCClass.from_param(string_list1), BaseCClass.from_param(string_list3)) - - - - - def test_class_variables(self): - BaseCClass.cNamespace().hello = "BooYa!" - StringListTest.cNamespace()["pow"] = "Badonkadonk!" - - with self.assertRaises(AssertionError): - StringListTest.cNamespace().pow = "Badonkadonka!" - - with self.assertRaises(LookupError): - self.assertFalse(BaseCClass.cNamespace()["pow"]) - - with self.assertRaises(AttributeError): - self.assertFalse(StringListTest.cNamespace().hello) - - self.assertEqual(StringListTest.cNamespace().pow, StringListTest.cNamespace()["pow"]) - - - def test_invalid_function(self): - with self.assertRaises(CWrapError): - func = cwrapper.prototype("void stringlist_missing_function( )") - - - def test_invalid_prototype(self): - with self.assertRaises(CWrapError): - stringlist_alloc = cwrapper.prototype("c_void_p stringlist_alloc_new( ") - - - def test_method_type(self): - wrapper = CWrapper(test_lib) - def stringObj(c_ptr): - char_ptr = ctypes.c_char_p( c_ptr ) - python_string = char_ptr.value - test_lib.free(c_ptr) - return python_string - - wrapper.registerType("string_obj", stringObj) - - dateStamp = wrapper.prototype("string_obj util_alloc_date_stamp_utc()") - date_stamp = dateStamp() - self.assertIsInstance(date_stamp, str) - - - - diff --git a/ThirdParty/Ert/python/tests/core/ecl/CMakeLists.txt b/ThirdParty/Ert/python/tests/core/ecl/CMakeLists.txt deleted file mode 100644 index e8fa3a6b69..0000000000 --- a/ThirdParty/Ert/python/tests/core/ecl/CMakeLists.txt +++ /dev/null @@ -1,83 +0,0 @@ -set(NFS_RUNPATH "" CACHE STRING "Disk area which is shared among cluster nodes and can be used as CWD for LSF/RSH jobs.") -set(RSH_SERVERS "" CACHE STRING "List of nodes which will be used to test the RSH driver") - -set(TEST_SOURCES - __init__.py - test_deprecation.py - test_removed.py - test_ecl_3dkw.py - test_ecl_file_statoil.py - test_ecl_file.py - test_ecl_init_file.py - test_ecl_restart_file.py - test_ecl_submit.py - test_ecl_sum.py - test_ecl_sum_vector.py - test_fault_blocks.py - test_fault_blocks_statoil.py - test_faults.py - test_fortio.py - test_grdecl.py - test_grid.py - test_grid_statoil.py - test_indexed_read.py - test_ecl_kw_statoil.py - test_ecl_kw.py - test_kw_function.py - test_layer.py - test_legacy_ecl.py - test_npv.py - test_region.py - test_restart.py - test_rft.py - test_rft_statoil.py - test_rft_cell.py - test_statoil_faults.py - test_sum_statoil.py - test_ecl_util.py - test_ecl_cmp.py - test_sum.py - test_grav.py -) - -add_python_package("python.tests.ecl" ${PYTHON_INSTALL_PREFIX}/tests/ecl "${TEST_SOURCES}" False) - -addPythonTest(ecl.ecl_grid ecl.test_grid.GridTest ) -addPythonTest(ecl.ecl_kw ecl.test_ecl_kw.KWTest) -addPythonTest(ecl.ecl_kw_function ecl.test_kw_function.KWFunctionTest) -addPythonTest(ecl.ecl_3dkw ecl.test_ecl_3dkw.Ecl3DKWTest ) -addPythonTest(ecl.legacy_ecl ecl.test_legacy_ecl.LegacyEclTest) -addPythonTest(ecl.ecl_rft ecl.test_rft.RFTTest) -addPythonTest(ecl.ecl_rft_cell ecl.test_rft_cell.RFTCellTest) -addPythonTest(ecl.ecl_sum2 ecl.test_sum.SumTest) -addPythonTest(ecl.layer ecl.test_layer.LayerTest ) -addPythonTest(ecl.faults ecl.test_faults.FaultTest ) -addPythonTest(ecl.fault_blocks ecl.test_fault_blocks.FaultBlockTest ) -addPythonTest(ecl.ecl_deprecation1.9 ecl.test_deprecation.Deprecation_1_9_Test ) -addPythonTest(ecl.ecl_deprecation2.0 ecl.test_deprecation.Deprecation_2_0_Test ) -addPythonTest(ecl.ecl_removed2.1 ecl.test_removed.Removed_2_1_Test ) -addPythonTest(ecl.ecl_util ecl.test_ecl_util.EclUtilTest ) -addPythonTest(ecl.fortio ecl.test_fortio.FortIOTest) -addPythonTest(ecl.ecl_file ecl.test_ecl_file.EclFileTest) -addPythonTest(ecl.ecl_grav ecl.test_grav.EclGravTest) - - -if (STATOIL_TESTDATA_ROOT) - addPythonTest(ecl.ecl_file_statoil ecl.test_ecl_file_statoil.EclFileStatoilTest LABELS StatoilData) - addPythonTest(ecl.ecl_grdecl ecl.test_grdecl.GRDECLTest LABELS StatoilData) - addPythonTest(ecl.ecl_grid_statoil ecl.test_grid_statoil.GridTest LABELS StatoilData:Slow) - addPythonTest(ecl.ecl_kw_statoil ecl.test_ecl_kw_statoil.KWTest LABELS StatoilData) - addPythonTest(ecl.ecl_init_file ecl.test_ecl_init_file.InitFileTest LABELS StatoilData) - addPythonTest(ecl.ecl_restart_file ecl.test_ecl_restart_file.RestartFileTest LABELS StatoilData) - addPythonTest(ecl.ecl_restart ecl.test_restart.RestartTest LABELS StatoilData ) - addPythonTest(ecl.ecl_region ecl.test_region.RegionTest LABELS StatoilData) - addPythonTest(ecl.ecl_rft_statoil ecl.test_rft_statoil.RFTTest LABELS StatoilData) - addPythonTest(ecl.ecl_sum1 ecl.test_sum_statoil.SumTest LABELS StatoilData) - addPythonTest(ecl.ecl_sum_vector ecl.test_ecl_sum_vector.EclSumVectorTest LABELS StatoilData) - addPythonTest(ecl.ecl_sum_time_range ecl.test_ecl_sum.EclSumTest LABELS StatoilData) - addPythonTest(ecl.statoil_faults ecl.test_statoil_faults.StatoilFaultTest LABELS StatoilData) - addPythonTest(ecl.fault_blocks_statoil ecl.test_fault_blocks_statoil.FaultBlockTest LABELS StatoilData) - addPythonTest(ecl.ecl_npv ecl.test_npv.NPVTest LABELS StatoilData) - addPythonTest(ecl.indexed_read ecl.test_indexed_read.EclIndexedReadTest LABELS StatoilData) - addPythonTest(ecl.ecl_cmp ecl.test_ecl_cmp.EclCmpTest LABELS StatoilData) -endif() diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_deprecation.py b/ThirdParty/Ert/python/tests/core/ecl/test_deprecation.py deleted file mode 100644 index 2ec494d0a8..0000000000 --- a/ThirdParty/Ert/python/tests/core/ecl/test_deprecation.py +++ /dev/null @@ -1,246 +0,0 @@ -#!/usr/bin/env python -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file 'test_deprecation.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -import warnings -import time -import datetime - -from ert.test import ExtendedTestCase, TestAreaContext -from ert.ecl import EclFile,EclGrid,EclKW,EclTypeEnum,EclGrid,EclRegion,FortIO, openFortIO,EclRFT -from ert.ecl.ecl_case import EclCase -from ert.util import BoolVector - -# The class Deprecation_1_9_Test contains methods which will be marked -# as deprecated in the 1.9.x versions. - -warnings.simplefilter("error" , DeprecationWarning) - - -class Deprecation_2_1_Test(ExtendedTestCase): - def test_ecl_kw_classprop(self): - with self.assertRaises(DeprecationWarning): - int_kw = EclKW.int_kw - - def test_ecl_kw_numpy_property(self): - kw = EclKW("TEST" , 10 , EclTypeEnum.ECL_INT_TYPE) - with self.assertRaises(DeprecationWarning): - n = kw.numpy_array - - - - - -class Deprecation_2_0_Test(ExtendedTestCase): - def test_EclGrid_dims_property(self): - with self.assertRaises(DeprecationWarning): - grid = EclGrid.create_rectangular( (10,20,30) , (1,1,1) ) - - def test_EclFile_name_property(self): - with TestAreaContext("name") as t: - kw = EclKW("TEST", 3, EclTypeEnum.ECL_INT_TYPE) - with openFortIO("TEST" , mode = FortIO.WRITE_MODE) as f: - kw.fwrite( f ) - - t.sync() - - f = EclFile( "TEST" ) - with self.assertRaises(DeprecationWarning): - name = f.name - - def test_EclGrid_get_corner_xyz(self): - grid = EclGrid.createRectangular( (10,20,30) , (1,1,1) ) - with self.assertRaises(DeprecationWarning): - grid.get_corner_xyz(0 , global_index = 10) - - - def test_ecl_ecl_ecl(self): - with self.assertRaises(DeprecationWarning): - import ert.ecl.ecl as ecl - - - def test_ecl_kw_fortio_size_property(self): - kw = EclKW("KW" , 1000 , EclTypeEnum.ECL_INT_TYPE) - with self.assertRaises(DeprecationWarning): - kw.fortio_size - - - def test_ecl_kw_size_property(self): - kw = EclKW("KW" , 1000 , EclTypeEnum.ECL_INT_TYPE) - with self.assertRaises(DeprecationWarning): - kw.size - - - def test_ecl_kw_set_name(self): - kw = EclKW("KW" , 1000 , EclTypeEnum.ECL_INT_TYPE) - with self.assertRaises(DeprecationWarning): - kw.set_name("HEI") - - def test_ecl_kw_get_name(self): - kw = EclKW("KW" , 1000 , EclTypeEnum.ECL_INT_TYPE) - with self.assertRaises(DeprecationWarning): - kw.get_name( ) - - - def test_ecl_kw_create(self): - with self.assertRaises(DeprecationWarning): - kw = EclKW.create("KW" , 1000 , EclTypeEnum.ECL_INT_TYPE) - - - def test_ecl_kw_iget(self): - kw = EclKW("PORO" , 1000 , EclTypeEnum.ECL_FLOAT_TYPE) - with self.assertRaises(DeprecationWarning): - value = kw.iget( 100 ) - - - def test_ecl_kw_numeric_property(self): - kw = EclKW("PORO" , 1000 , EclTypeEnum.ECL_FLOAT_TYPE) - with self.assertRaises(DeprecationWarning): - kw.numeric - - - def test_ecl_kw_grdecl_load(self): - with TestAreaContext("ecl_kw/deprecate/grdecl_load"): - kw = EclKW("PORO" , 1000 , EclTypeEnum.ECL_FLOAT_TYPE) - with open("PORO.grdecl" , "w") as poro_file: - kw.write_grdecl( poro_file ) - - with open("PORO.grdecl") as poro_file: - with self.assertRaises(DeprecationWarning): - kw = EclKW.grdecl_load( poro_file , "PORO") - - - def test_ecl_grid_dual_property(self): - grid = EclGrid.createRectangular((10,20,30) , (1,1,1) ) - with self.assertRaises(DeprecationWarning): - grid.dual_grid - - - def test_ecl_grid_name(self): - grid = EclGrid.createRectangular((10,20,30) , (1,1,1) ) - with self.assertRaises(DeprecationWarning): - grid.name - - - def test_ecl_grid_dims_property(self): - grid = EclGrid.createRectangular((10,20,30) , (1,1,1) ) - with self.assertRaises(DeprecationWarning): - grid.nx - - with self.assertRaises(DeprecationWarning): - grid.ny - - with self.assertRaises(DeprecationWarning): - grid.nz - - with self.assertRaises(DeprecationWarning): - grid.size - - with self.assertRaises(DeprecationWarning): - grid.nactive - - def test_ecl_grid_num_lgr(self): - grid = EclGrid.createRectangular((10,20,30) , (1,1,1) ) - with self.assertRaises(DeprecationWarning): - grid.num_lgr - - - - def test_ecl_region_name(self): - grid = EclGrid.createRectangular((10,20,30) , (1,1,1) ) - region = EclRegion( grid , False ) - - with self.assertRaises(DeprecationWarning): - region.name = "NAME" - - with self.assertRaises(DeprecationWarning): - region.get_name( ) - - - def test_ecl_case( self ): - with self.assertRaises(DeprecationWarning): - case = EclCase( "CASE" ) - - - def test_rft(self): - rft = EclRFT("WELL" , "RFT" , datetime.date.today() , 100 ) - - # Property: type - with self.assertRaises(DeprecationWarning): - t = rft.type - - # Property: date - with self.assertRaises(DeprecationWarning): - d = rft.date - - # Property: well - with self.assertRaises(DeprecationWarning): - d = rft.date - - # Property: size - with self.assertRaises(DeprecationWarning): - d = rft.size - - def test_rft_file(self): - # These deprecations are not tested - but just recorded here. - # Property: num_wells - # Property: headers - pass - - - - -class Deprecation_1_9_Test(ExtendedTestCase): - - def test_EclGrid_dims_property(self): - grid = EclGrid.createRectangular( (10,20,30) , (1,1,1) ) - with self.assertRaises(DeprecationWarning): - d = grid.dims - - - def test_EclKW_min_max(self): - kw = EclKW("TEST", 3, EclTypeEnum.ECL_INT_TYPE) - with self.assertRaises(DeprecationWarning): - kw.min - - with self.assertRaises(DeprecationWarning): - kw.max - - with self.assertRaises(DeprecationWarning): - kw.min_max - - def test_EclRegion_properties(self): - grid = EclGrid.createRectangular( (10,10,10) , (1,1,1)) - region = EclRegion( grid , False ) - - with self.assertRaises(DeprecationWarning): - region.active_size - - with self.assertRaises(DeprecationWarning): - region.global_size - - with self.assertRaises(DeprecationWarning): - region.global_list - - with self.assertRaises(DeprecationWarning): - region.active_list - - - def test_BoolVector_active_mask(self): - with self.assertRaises(DeprecationWarning): - active_vector = BoolVector.active_mask("1,1,1,1,1,1") - - - diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_ecl_file_statoil.py b/ThirdParty/Ert/python/tests/core/ecl/test_ecl_file_statoil.py deleted file mode 100644 index 49d426f173..0000000000 --- a/ThirdParty/Ert/python/tests/core/ecl/test_ecl_file_statoil.py +++ /dev/null @@ -1,155 +0,0 @@ -#!/usr/bin/env python -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file 'sum_test.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -import datetime -import os.path -from unittest import skipIf - -from ert.ecl import EclFile, FortIO, EclKW , openFortIO , openEclFile -from ert.ecl import EclFileFlagEnum, EclTypeEnum, EclFileEnum - -from ert.test import ExtendedTestCase , TestAreaContext - - - - -class EclFileStatoilTest(ExtendedTestCase): - def setUp(self): - self.test_file = self.createTestPath("Statoil/ECLIPSE/Gurbat/ECLIPSE.UNRST") - self.test_fmt_file = self.createTestPath("Statoil/ECLIPSE/Gurbat/ECLIPSE.FUNRST") - - def assertFileType(self , filename , expected): - file_type , step , fmt_file = EclFile.getFileType(filename) - self.assertEqual( file_type , expected[0] ) - self.assertEqual( fmt_file , expected[1] ) - self.assertEqual( step , expected[2] ) - - - - def test_restart_days(self): - rst_file = EclFile( self.test_file ) - self.assertAlmostEqual( 0.0 , rst_file.iget_restart_sim_days(0) ) - self.assertAlmostEqual( 31.0 , rst_file.iget_restart_sim_days(1) ) - self.assertAlmostEqual( 274.0 , rst_file.iget_restart_sim_days(10) ) - - with self.assertRaises(KeyError): - rst_file.restart_get_kw("Missing" , dtime = datetime.date( 2004,1,1)) - - with self.assertRaises(IndexError): - rst_file.restart_get_kw("SWAT" , dtime = datetime.date( 1985 , 1 , 1)) - - - - def test_iget_named(self): - f = EclFile(self.test_file) - N = f.num_named_kw( "SWAT" ) - with self.assertRaises(IndexError): - s = f.iget_named_kw( "SWAT" , N + 1) - - - - def test_fwrite( self ): - #work_area = TestArea("python/ecl_file/fwrite") - with TestAreaContext("python/ecl_file/fwrite"): - rst_file = EclFile(self.test_file) - fortio = FortIO("ECLIPSE.UNRST", FortIO.WRITE_MODE) - rst_file.fwrite(fortio) - fortio.close() - rst_file.close() - self.assertFilesAreEqual("ECLIPSE.UNRST", self.test_file) - - - - - @skipIf(ExtendedTestCase.slowTestShouldNotRun(), "Slow file test skipped!") - def test_save(self): - #work_area = TestArea("python/ecl_file/save") - with TestAreaContext("python/ecl_file/save", store_area=False) as work_area: - work_area.copy_file(self.test_file) - rst_file = EclFile("ECLIPSE.UNRST", flags=EclFileFlagEnum.ECL_FILE_WRITABLE) - swat0 = rst_file["SWAT"][0] - swat0.assign(0.75) - rst_file.save_kw(swat0) - rst_file.close() - self.assertFilesAreNotEqual("ECLIPSE.UNRST",self.test_file) - - rst_file1 = EclFile(self.test_file) - rst_file2 = EclFile("ECLIPSE.UNRST", flags=EclFileFlagEnum.ECL_FILE_WRITABLE) - - swat1 = rst_file1["SWAT"][0] - swat2 = rst_file2["SWAT"][0] - swat2.assign(swat1) - - rst_file2.save_kw(swat2) - self.assertTrue(swat1.equal(swat2)) - rst_file1.close() - rst_file2.close() - - # Random failure .... - self.assertFilesAreEqual("ECLIPSE.UNRST", self.test_file) - - - - @skipIf(ExtendedTestCase.slowTestShouldNotRun(), "Slow file test skipped!") - def test_save_fmt(self): - #work_area = TestArea("python/ecl_file/save_fmt") - with TestAreaContext("python/ecl_file/save_fmt") as work_area: - work_area.copy_file(self.test_fmt_file) - rst_file = EclFile("ECLIPSE.FUNRST", flags=EclFileFlagEnum.ECL_FILE_WRITABLE) - swat0 = rst_file["SWAT"][0] - swat0.assign(0.75) - rst_file.save_kw(swat0) - rst_file.close() - self.assertFilesAreNotEqual("ECLIPSE.FUNRST", self.test_fmt_file) - - rst_file1 = EclFile(self.test_fmt_file) - rst_file2 = EclFile("ECLIPSE.FUNRST", flags=EclFileFlagEnum.ECL_FILE_WRITABLE) - - swat1 = rst_file1["SWAT"][0] - swat2 = rst_file2["SWAT"][0] - - swat2.assign(swat1) - rst_file2.save_kw(swat2) - self.assertTrue(swat1.equal(swat2)) - rst_file1.close() - rst_file2.close() - - # Random failure .... - self.assertFilesAreEqual("ECLIPSE.FUNRST", self.test_fmt_file) - - - def test_truncated(self): - with TestAreaContext("python/ecl_file/truncated") as work_area: - work_area.copy_file(self.test_file) - size = os.path.getsize("ECLIPSE.UNRST") - with open("ECLIPSE.UNRST" , "r+") as f: - f.truncate( size / 2 ) - - with self.assertRaises(IOError): - rst_file = EclFile("ECLIPSE.UNRST") - - with self.assertRaises(IOError): - rst_file = EclFile("ECLIPSE.UNRST", flags=EclFileFlagEnum.ECL_FILE_WRITABLE) - - def test_restart_view(self): - f = EclFile( self.test_file ) - with self.assertRaises(ValueError): - v = f.restartView( ) - - v = f.restartView( sim_days = 274 ) - v = f.restartView( sim_time = datetime.date( 2004,1,1) ) - v = f.restartView( report_step = 30 ) - v = f.restartView( seqnum_index = 30 ) diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_ecl_kw.py b/ThirdParty/Ert/python/tests/core/ecl/test_ecl_kw.py deleted file mode 100644 index 9d22ed1a57..0000000000 --- a/ThirdParty/Ert/python/tests/core/ecl/test_ecl_kw.py +++ /dev/null @@ -1,369 +0,0 @@ -#!/usr/bin/env python -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file 'test_kw.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -import os -import random -import numpy -from ert.ecl import EclKW, EclTypeEnum, EclFile, FortIO, EclFileFlagEnum , openFortIO - -from ert.test import ExtendedTestCase , TestAreaContext - - -def copy_long(): - src = EclKW.create("NAME", 100, EclTypeEnum.ECL_FLOAT_TYPE) - copy = src.sub_copy(0, 2000) - - -def copy_offset(): - src = EclKW.create("NAME", 100, EclTypeEnum.ECL_FLOAT_TYPE) - copy = src.sub_copy(200, 100) - - -class KWTest(ExtendedTestCase): - - def test_min_max(self): - kw = EclKW("TEST", 3, EclTypeEnum.ECL_INT_TYPE) - kw[0] = 10 - kw[1] = 5 - kw[2] = 0 - - self.assertEqual( 10 , kw.getMax()) - self.assertEqual( 0 , kw.getMin()) - self.assertEqual( (0,10) , kw.getMinMax()) - - - - - - def kw_test( self, data_type, data, fmt ): - name1 = "file1.txt" - name2 = "file2.txt" - kw = EclKW("TEST", len(data), data_type) - i = 0 - for d in data: - kw[i] = d - i += 1 - - file1 = open(name1, "w") - kw.fprintf_data(file1, fmt) - file1.close() - - file2 = open(name2, "w") - for d in data: - file2.write(fmt % d) - file2.close() - self.assertFilesAreEqual(name1, name2) - self.assertEqual( kw.getEclType() , data_type ) - - def test_create(self): - with self.assertRaises(ValueError): - EclKW.create( "ToGodDamnLong" , 100 , EclTypeEnum.ECL_CHAR_TYPE ) - - - - def test_sum( self ): - kw_string = EclKW.create( "STRING" , 100 , EclTypeEnum.ECL_CHAR_TYPE ) - with self.assertRaises(ValueError): - kw_string.sum() - - - kw_int = EclKW.create( "INT" , 4 , EclTypeEnum.ECL_INT_TYPE ) - kw_int[0] = 1 - kw_int[1] = 2 - kw_int[2] = 3 - kw_int[3] = 4 - self.assertEqual( kw_int.sum() , 10 ) - - kw_d = EclKW.create( "D" , 4 , EclTypeEnum.ECL_DOUBLE_TYPE ) - kw_d[0] = 1 - kw_d[1] = 2 - kw_d[2] = 3 - kw_d[3] = 4 - self.assertEqual( kw_d.sum() , 10 ) - - kw_f = EclKW.create( "F" , 4 , EclTypeEnum.ECL_FLOAT_TYPE ) - kw_f[0] = 1 - kw_f[1] = 2 - kw_f[2] = 3 - kw_f[3] = 4 - self.assertEqual( kw_f.sum() , 10 ) - - kw_b = EclKW.create( "F" , 4 , EclTypeEnum.ECL_BOOL_TYPE ) - kw_b[0] = False - kw_b[1] = True - kw_b[2] = False - kw_b[3] = True - self.assertEqual( kw_b.sum() , 2 ) - - - - def test_fprintf( self ): - with TestAreaContext("python.ecl_kw"): - self.kw_test(EclTypeEnum.ECL_INT_TYPE, [0, 1, 2, 3, 4, 5], "%4d\n") - self.kw_test(EclTypeEnum.ECL_FLOAT_TYPE, [0.0, 1.1, 2.2, 3.3, 4.4, 5.5], "%12.6f\n") - self.kw_test(EclTypeEnum.ECL_DOUBLE_TYPE, [0.0, 1.1, 2.2, 3.3, 4.4, 5.5], "%12.6f\n") - self.kw_test(EclTypeEnum.ECL_BOOL_TYPE, [True, True, True, False, True], "%4d\n") - self.kw_test(EclTypeEnum.ECL_CHAR_TYPE, ["1", "22", "4444", "666666", "88888888"], "%-8s\n") - - def test_kw_write(self): - with TestAreaContext("python/ecl_kw/writing"): - - data = [random.random() for i in range(10000)] - - kw = EclKW("TEST", len(data), EclTypeEnum.ECL_DOUBLE_TYPE) - i = 0 - for d in data: - kw[i] = d - i += 1 - - fortio = FortIO("ECL_KW_TEST", FortIO.WRITE_MODE) - kw.fwrite(fortio) - fortio.close() - - fortio = FortIO("ECL_KW_TEST") - - kw2 = EclKW.fread(fortio) - - self.assertTrue(kw.equal(kw2)) - - ecl_file = EclFile("ECL_KW_TEST", flags=EclFileFlagEnum.ECL_FILE_WRITABLE) - kw3 = ecl_file["TEST"][0] - self.assertTrue(kw.equal(kw3)) - ecl_file.save_kw(kw3) - ecl_file.close() - - fortio = FortIO("ECL_KW_TEST", FortIO.READ_AND_WRITE_MODE) - kw4 = EclKW.fread(fortio) - self.assertTrue(kw.equal(kw4)) - fortio.seek(0) - kw4.fwrite(fortio) - fortio.close() - - ecl_file = EclFile("ECL_KW_TEST") - kw5 = ecl_file["TEST"][0] - self.assertTrue(kw.equal(kw5)) - - - - def test_fprintf_data(self): - with TestAreaContext("kw_no_header"): - kw = EclKW.create("REGIONS" , 10 , EclTypeEnum.ECL_INT_TYPE) - for i in range(len(kw)): - kw[i] = i - - fileH = open("test" , "w") - kw.fprintf_data( fileH ) - fileH.close() - - fileH = open("test" , "r") - data = [] - for line in fileH.readlines(): - tmp = line.split() - for elm in tmp: - data.append( int(elm) ) - - for (v1,v2) in zip(data,kw): - self.assertEqual(v1,v2) - - - def test_sliced_set(self): - kw = EclKW.create("REGIONS" , 10 , EclTypeEnum.ECL_INT_TYPE) - kw.assign(99) - kw[0:5] = 66 - self.assertEqual(kw[0] , 66) - self.assertEqual(kw[4] , 66) - self.assertEqual(kw[5] , 99) - - - def test_long_name(self): - with self.assertRaises(ValueError): - EclKW.create("LONGLONGNAME" , 10 , EclTypeEnum.ECL_INT_TYPE) - - kw = EclKW.create("REGIONS" , 10 , EclTypeEnum.ECL_INT_TYPE) - with self.assertRaises(ValueError): - kw.set_name("LONGLONGNAME") - - - def test_abs(self): - kw = EclKW("NAME" , 10 , EclTypeEnum.ECL_CHAR_TYPE) - with self.assertRaises(TypeError): - abs_kw = abs(kw) - - kw = EclKW("NAME" , 10 , EclTypeEnum.ECL_BOOL_TYPE) - with self.assertRaises(TypeError): - abs_kw = abs(kw) - - kw = EclKW("NAME" , 10 , EclTypeEnum.ECL_INT_TYPE) - for i in range(len(kw)): - kw[i] = -i - - abs_kw = abs(kw) - for i in range(len(kw)): - self.assertEqual(kw[i] , -i ) - self.assertEqual(abs_kw[i] , i ) - - - def test_fmt(self): - kw1 = EclKW( "NAME1" , 100 , EclTypeEnum.ECL_INT_TYPE) - kw2 = EclKW( "NAME2" , 100 , EclTypeEnum.ECL_INT_TYPE) - - for i in range(len(kw1)): - kw1[i] = i + 1 - kw2[i] = len(kw1) - kw1[i] - - with TestAreaContext("ecl_kw/fmt") as ta: - with openFortIO( "TEST.FINIT" , FortIO.WRITE_MODE , fmt_file = True ) as f: - kw1.fwrite( f ) - kw2.fwrite( f ) - - with openFortIO( "TEST.FINIT" , fmt_file = True ) as f: - kw1b = EclKW.fread( f ) - kw2b = EclKW.fread( f ) - - self.assertTrue( kw1 == kw1b ) - self.assertTrue( kw2 == kw2b ) - - f = EclFile( "TEST.FINIT" ) - self.assertTrue( kw1 == f[0] ) - self.assertTrue( kw2 == f[1] ) - - - def test_first_different(self): - kw1 = EclKW( "NAME1" , 100 , EclTypeEnum.ECL_INT_TYPE) - kw2 = EclKW( "NAME2" , 100 , EclTypeEnum.ECL_INT_TYPE) - kw3 = EclKW( "NAME2" , 200 , EclTypeEnum.ECL_INT_TYPE) - kw4 = EclKW( "NAME2" , 100 , EclTypeEnum.ECL_FLOAT_TYPE) - kw5 = EclKW( "NAME2" , 100 , EclTypeEnum.ECL_FLOAT_TYPE) - - - with self.assertRaises( IndexError ): - EclKW.firstDifferent( kw1 , kw2 , offset = 100 ) - - with self.assertRaises( ValueError ): - EclKW.firstDifferent( kw1 , kw3 ) - - with self.assertRaises( TypeError ): - EclKW.firstDifferent( kw1 , kw4 ) - - - with self.assertRaises( IndexError ): - kw1.firstDifferent( kw2 , offset = 100 ) - - with self.assertRaises( ValueError ): - kw1.firstDifferent( kw3 ) - - with self.assertRaises( TypeError ): - kw1.firstDifferent( kw4 ) - - - kw1.assign( 1 ) - kw2.assign( 1 ) - - self.assertEqual( kw1.firstDifferent( kw2 ) , len(kw1)) - - kw1[0] = 100 - self.assertEqual( kw1.firstDifferent( kw2 ) , 0) - self.assertEqual( kw1.firstDifferent( kw2 , offset = 1) , len(kw1)) - kw1[10] = 100 - self.assertEqual( kw1.firstDifferent( kw2 , offset = 1) , 10) - - - kw4.assign( 1.0 ) - kw5.assign( 1.0 ) - self.assertEqual( kw4.firstDifferent( kw5 ) , len(kw4)) - - kw4[10] *= 1.0001 - self.assertEqual( kw4.firstDifferent( kw5 ) , 10) - - self.assertEqual( kw4.firstDifferent( kw5 , epsilon = 1.0) , len(kw4)) - self.assertEqual( kw4.firstDifferent( kw5 , epsilon = 0.0000001) , 10) - - - def test_numeric_equal(self): - kw1 = EclKW("Name1" , 10 , EclTypeEnum.ECL_DOUBLE_TYPE ) - kw2 = EclKW("Name1" , 10 , EclTypeEnum.ECL_DOUBLE_TYPE ) - - - shift = 0.0001 - value = 1000 - - abs_diff = shift - rel_diff = shift / (shift + 2* value) - kw1.assign( value ) - kw2.assign( value + shift ) - - - self.assertTrue( kw1.equal_numeric( kw2 , abs_epsilon = abs_diff * 1.1 , rel_epsilon = rel_diff * 1.1)) - self.assertFalse( kw1.equal_numeric( kw2 , abs_epsilon = abs_diff * 1.1 , rel_epsilon = rel_diff * 0.9)) - self.assertFalse( kw1.equal_numeric( kw2 , abs_epsilon = abs_diff * 0.9 , rel_epsilon = rel_diff * 1.1)) - self.assertTrue( kw1.equal_numeric( kw2 , abs_epsilon = 0 , rel_epsilon = rel_diff * 1.1)) - self.assertTrue( kw1.equal_numeric( kw2 , abs_epsilon = abs_diff * 1.1 , rel_epsilon = 0)) - - def test_mul(self): - kw1 = EclKW("Name1" , 10 , EclTypeEnum.ECL_INT_TYPE ) - kw1.assign( 10 ) - - kw2 = EclKW("Name1" , 10 , EclTypeEnum.ECL_INT_TYPE ) - kw2.assign( 2 ) - - kw3 = kw1 * kw2 - kw4 = kw1 + kw2 - self.assertEqual( len(kw3) , len(kw1)) - self.assertEqual( len(kw4) , len(kw1)) - for v in kw3: - self.assertEqual( v , 20 ) - - for v in kw4: - self.assertEqual( v , 12 ) - - - def test_numpy(self): - kw1 = EclKW("DOUBLE", 10, EclTypeEnum.ECL_DOUBLE_TYPE ) - - view = kw1.numpyView( ) - copy = kw1.numpyCopy( ) - - self.assertTrue( copy[ 0 ] == kw1[ 0 ] ) - self.assertTrue( view[ 0 ] == kw1[ 0 ] ) - - kw1[ 0 ] += 1 - self.assertTrue( view[ 0 ] == kw1[ 0 ] ) - self.assertTrue( copy[ 0 ] == kw1[ 0 ] - 1) - - - kw2 = EclKW("CHAR", 10, EclTypeEnum.ECL_CHAR_TYPE ) - with self.assertRaises(ValueError): - kw2.numpyView( ) - - kw3 = EclKW("BOOL", 10, EclTypeEnum.ECL_BOOL_TYPE ) - with self.assertRaises(ValueError): - kw3.numpyView( ) - - def test_slice(self): - N = 100 - kw = EclKW("KW" , N , EclTypeEnum.ECL_INT_TYPE) - for i in range(len(kw)): - kw[i] = i - - even = kw[0:len(kw):2] - odd = kw[1:len(kw):2] - - self.assertEqual( len(even) , N/2 ) - self.assertEqual( len(odd) , N/2 ) - - for i in range(len(even)): - self.assertEqual(even[i] , 2*i) - self.assertEqual(odd[i] , 2*i + 1) diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_ecl_submit.py b/ThirdParty/Ert/python/tests/core/ecl/test_ecl_submit.py deleted file mode 100644 index 2bb86e3e8c..0000000000 --- a/ThirdParty/Ert/python/tests/core/ecl/test_ecl_submit.py +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright (C) 2011 Statoil ASA, Norway. -# -# This file is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -import os -import getpass - -try: - from unittest2 import skipIf -except ImportError: - from unittest import skipIf - -import time -import shutil -from ert.ecl import EclSum -from ert.job_queue import QueueDriverEnum, RSHDriver -from ert.test import ExtendedTestCase , TestAreaContext - -path = "Statoil/ECLIPSE/Gurbat" - -base = "ECLIPSE_SHORT" -LSF_base = "ECLIPSE_SHORT_MPI" - -case = "%s/%s" % (path, base) -LSF_case = "%s/%s" % (path, LSF_base) - - - -class EclSubmitTest(ExtendedTestCase): - nfs_work_path = None - rsh_servers = None - - def setUp(self): - if hasattr(self, "argv"): - if len(self.argv) > 0: - self.nfs_work_path = self.argv[0] - - if len(self.argv) > 1: - self.rsh_servers = self.argv[1] - - def make_run_path(self, iens, LSF=False): - run_path = "run%d" % iens - if os.path.exists(run_path): - shutil.rmtree(run_path) - - os.makedirs(run_path) - shutil.copytree("%s/include" % self.createTestPath(path), "%s/include" % run_path) - if LSF: - shutil.copy("%s.DATA" % self.createTestPath(LSF_case), run_path) - else: - shutil.copy("%s.DATA" % self.createTestPath(case), run_path) - - return os.path.abspath(run_path) diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_ecl_sum_vector.py b/ThirdParty/Ert/python/tests/core/ecl/test_ecl_sum_vector.py deleted file mode 100644 index 14cbb5e264..0000000000 --- a/ThirdParty/Ert/python/tests/core/ecl/test_ecl_sum_vector.py +++ /dev/null @@ -1,40 +0,0 @@ -# !/usr/bin/env python -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'test_ecl_sum_vector.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -try: - from unittest2 import skipIf -except ImportError: - from unittest import skipIf - -import warnings - -from ert.ecl import EclSumVector, EclSum -from ert.test import ExtendedTestCase - - -class EclSumVectorTest(ExtendedTestCase): - def setUp(self): - self.test_file = self.createTestPath("Statoil/ECLIPSE/Gurbat/ECLIPSE.SMSPEC") - self.ecl_sum = EclSum(self.test_file) - - def test_reportOnly_warns(self): - with warnings.catch_warnings(record=True) as w: - warnings.simplefilter("always") - - vector = EclSumVector(self.ecl_sum, "FOPT", True) - assert len(w) == 1 - assert issubclass(w[-1].category, DeprecationWarning) diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_grav.py b/ThirdParty/Ert/python/tests/core/ecl/test_grav.py deleted file mode 100644 index 816b059cfc..0000000000 --- a/ThirdParty/Ert/python/tests/core/ecl/test_grav.py +++ /dev/null @@ -1,25 +0,0 @@ -import time -from ert.ecl import EclGrav, EclKW, EclGrid, EclFile, EclTypeEnum, openFortIO, FortIO -from ert.test import ExtendedTestCase , TestAreaContext - - -class EclGravTest(ExtendedTestCase): - - - def setUp(self): - self.grid = EclGrid.createRectangular( (10,10,10) , (1,1,1)) - - - def test_create(self): - # The init file created here only contains a PORO field. More - # properties must be added to this before it can be used for - # any usefull gravity calculations. - poro = EclKW( "PORO" , self.grid.getGlobalSize() , EclTypeEnum.ECL_FLOAT_TYPE ) - with TestAreaContext("grav_init"): - with openFortIO( "TEST.INIT" , mode = FortIO.WRITE_MODE ) as f: - poro.fwrite( f ) - self.init = EclFile( "TEST.INIT") - - grav = EclGrav( self.grid , self.init ) - - diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_grid.py b/ThirdParty/Ert/python/tests/core/ecl/test_grid.py deleted file mode 100644 index 39b79f9750..0000000000 --- a/ThirdParty/Ert/python/tests/core/ecl/test_grid.py +++ /dev/null @@ -1,218 +0,0 @@ -#!/usr/bin/env python -# Copyright (C) 2014 Statoil ASA, Norway. -# -# The file 'test_grid.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -import os.path -from unittest import skipIf -import time - -from ert.util import IntVector -from ert.ecl import EclGrid,EclKW,EclTypeEnum -from ert.ecl.faults import Layer , FaultCollection -from ert.test import ExtendedTestCase , TestAreaContext - - -# This test class should only have test cases which do not require -# external test data. Tests involving Statoil test data are in the -# test_grid_statoil module. - -class GridTest(ExtendedTestCase): - - def test_oom_grid(self): - nx = 2000 - ny = 2000 - nz = 2000 - - with self.assertRaises(MemoryError): - grid = EclGrid.createRectangular( (nx,ny,nz), (1,1,1)) - - - - def test_posXYEdge(self): - nx = 10 - ny = 11 - grid = EclGrid.createRectangular( (nx,ny,1) , (1,1,1) ) - self.assertEqual( grid.findCellCornerXY(0,0,0) , 0 ) - self.assertEqual( grid.findCellCornerXY(nx,0,0) , nx) - self.assertEqual( grid.findCellCornerXY(0 , ny , 0) , (nx + 1 ) * ny ) - self.assertEqual( grid.findCellCornerXY(nx,ny,0) , (nx + 1 ) * (ny + 1) - 1) - - self.assertEqual( grid.findCellCornerXY(0.25,0,0) , 0 ) - self.assertEqual( grid.findCellCornerXY(0,0.25,0) , 0 ) - - self.assertEqual( grid.findCellCornerXY(nx - 0.25,0,0) , nx ) - self.assertEqual( grid.findCellCornerXY(nx , 0.25,0) , nx ) - - self.assertEqual( grid.findCellCornerXY(0 , ny - 0.25, 0) , (nx + 1 ) * ny ) - self.assertEqual( grid.findCellCornerXY(0.25 , ny , 0) , (nx + 1 ) * ny ) - - self.assertEqual( grid.findCellCornerXY(nx -0.25 ,ny,0) , (nx + 1 ) * (ny + 1) - 1) - self.assertEqual( grid.findCellCornerXY(nx , ny - 0.25,0) , (nx + 1 ) * (ny + 1) - 1) - - - def test_dims(self): - grid = EclGrid.createRectangular( (10,20,30) , (1,1,1) ) - self.assertEqual( grid.getNX() , 10 ) - self.assertEqual( grid.getNY() , 20 ) - self.assertEqual( grid.getNZ() , 30 ) - self.assertEqual( grid.getGlobalSize() , 30*10*20 ) - - self.assertEqual( grid.getDims() , (10,20,30,6000) ) - - - - def test_create(self): - with self.assertRaises(ValueError): - grid = EclGrid.createRectangular( (10,20,30) , (1,1,1) , actnum = [0,1,1,2]) - - with self.assertRaises(ValueError): - grid = EclGrid.createRectangular( (10,20,30) , (1,1,1) , actnum = IntVector(initial_size = 10)) - - actnum = IntVector(default_value = 1 , initial_size = 6000) - actnum[0] = 0 - actnum[1] = 0 - grid = EclGrid.createRectangular( (10,20,30) , (1,1,1) , actnum = actnum) - self.assertEqual( grid.getNumActive( ) , 30*20*10 - 2) - - - - - def test_node_pos(self): - grid = EclGrid.createRectangular( (10,20,30) , (1,1,1) ) - with self.assertRaises(IndexError): - grid.getNodePos(-1,0,0) - - with self.assertRaises(IndexError): - grid.getNodePos(11,0,0) - - p0 = grid.getNodePos(0,0,0) - self.assertEqual( p0 , (0,0,0)) - - p7 = grid.getNodePos(10,20,30) - self.assertEqual( p7 , (10,20,30)) - - - def test_truncated_file(self): - grid = EclGrid.createRectangular( (10,20,30) , (1,1,1) ) - with TestAreaContext("python/ecl_grid/truncated"): - grid.save_EGRID( "TEST.EGRID") - - size = os.path.getsize( "TEST.EGRID") - with open("TEST.EGRID" , "r+") as f: - f.truncate( size / 2 ) - - with self.assertRaises(IOError): - EclGrid("TEST.EGRID") - - def test_posXY1(self): - nx = 4 - ny = 1 - nz = 1 - grid = EclGrid.createRectangular( (nx,ny,nz) , (1,1,1) ) - (i,j) = grid.findCellXY( 0.5 , 0.5, 0 ) - self.assertEqual(i , 0) - self.assertEqual(j , 0) - - (i,j) = grid.findCellXY( 3.5 , 0.5, 0 ) - self.assertEqual(i , 3) - self.assertEqual(j , 0) - - - def test_init_ACTNUM(self): - nx = 10 - ny = 23 - nz = 7 - grid = EclGrid.createRectangular( (nx,ny,nz) , (1,1,1) ) - actnum = grid.exportACTNUM() - - self.assertEqual( len(actnum) , nx*ny*nz ) - self.assertEqual( actnum[0] , 1 ) - self.assertEqual( actnum[nx*ny*nz - 1] , 1 ) - - actnum_kw = grid.exportACTNUMKw( ) - self.assertEqual(len(actnum_kw) , len(actnum)) - for a1,a2 in zip(actnum, actnum_kw): - self.assertEqual(a1, a2) - - - def test_posXY(self): - nx = 10 - ny = 23 - nz = 7 - grid = EclGrid.createRectangular( (nx,ny,nz) , (1,1,1) ) - with self.assertRaises(IndexError): - grid.findCellXY( 1 , 1, -1 ) - - with self.assertRaises(IndexError): - grid.findCellXY( 1 , 1, nz + 1 ) - - with self.assertRaises(ValueError): - grid.findCellXY(15 , 78 , 2) - - - i,j = grid.findCellXY( 1.5 , 1.5 , 2 ) - self.assertEqual(i , 1) - self.assertEqual(j , 1) - - - for i in range(nx): - for j in range(ny): - p = grid.findCellXY(i + 0.5 , j+ 0.5 , 0) - self.assertEqual( p[0] , i ) - self.assertEqual( p[1] , j ) - - c = grid.findCellCornerXY( 0.10 , 0.10 , 0 ) - self.assertEqual(c , 0) - - c = grid.findCellCornerXY( 0.90 , 0.90 , 0 ) - self.assertEqual( c , (nx + 1) + 1 ) - - c = grid.findCellCornerXY( 0.10 , 0.90 , 0 ) - self.assertEqual( c , (nx + 1) ) - - c = grid.findCellCornerXY( 0.90 , 0.90 , 0 ) - self.assertEqual( c , (nx + 1) + 1 ) - - c = grid.findCellCornerXY( 0.90 , 0.10 , 0 ) - self.assertEqual( c , 1 ) - - def test_compressed_copy(self): - nx = 10 - ny = 10 - nz = 10 - grid = EclGrid.createRectangular( (nx,ny,nz) , (1,1,1) ) - kw1 = EclKW.create("KW" , 1001 , EclTypeEnum.ECL_INT_TYPE ) - with self.assertRaises(ValueError): - cp = grid.compressedKWCopy( kw1 ) - - - def test_dxdydz(self): - nx = 10 - ny = 10 - nz = 10 - grid = EclGrid.createRectangular( (nx,ny,nz) , (2,3,4) ) - - (dx,dy,dz) = grid.getCellDims( active_index = 0 ) - self.assertEqual( dx , 2 ) - self.assertEqual( dy , 3 ) - self.assertEqual( dz , 4 ) - - def test_numpy3D(self): - nx = 10 - ny = 7 - nz = 5 - grid = EclGrid.createRectangular((nx,ny,nz) , (1,1,1)) - kw = EclKW( "SWAT" , nx*ny*nz , EclTypeEnum.ECL_FLOAT_TYPE ) - numpy_3d = grid.create3D( kw ) diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_legacy_ecl.py b/ThirdParty/Ert/python/tests/core/ecl/test_legacy_ecl.py deleted file mode 100644 index 1c9ffd6b8f..0000000000 --- a/ThirdParty/Ert/python/tests/core/ecl/test_legacy_ecl.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env python -# Copyright (C) 2013 Statoil ASA, Norway. -# -# This file is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -try: - from unittest2 import TestCase -except ImportError: - from unittest import TestCase - -from ert.ecl import EclTypeEnum, EclFileFlagEnum, EclPhaseEnum - -import ert.ecl.ecl as ecl -import ert.ecl as new_ecl - -class LegacyEclTest(TestCase): - - def test_classes(self): - self.assertEqual(ecl.EclSum, new_ecl.EclSum) - - self.assertEqual(ecl.EclRFTFile, new_ecl.EclRFTFile) - self.assertEqual(ecl.EclRFTCell, new_ecl.EclRFTCell) - self.assertEqual(ecl.EclPLTCell, new_ecl.EclPLTCell) - - self.assertEqual(ecl.EclKW, new_ecl.EclKW) - self.assertEqual(ecl.EclFile, new_ecl.EclFile) - - self.assertEqual(ecl.FortIO, new_ecl.FortIO) - - self.assertEqual(ecl.EclGrid, new_ecl.EclGrid) - - self.assertEqual(ecl.EclRegion, new_ecl.EclRegion) diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_region.py b/ThirdParty/Ert/python/tests/core/ecl/test_region.py deleted file mode 100644 index caf9616b6e..0000000000 --- a/ThirdParty/Ert/python/tests/core/ecl/test_region.py +++ /dev/null @@ -1,205 +0,0 @@ -#!/usr/bin/env python -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'test_region.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -from ert.ecl import EclFile, EclGrid, EclRegion -from ert.ecl.faults import Layer -from ert.test import ExtendedTestCase - - -class RegionTest(ExtendedTestCase): - def setUp(self): - case = self.createTestPath("Statoil/ECLIPSE/Gurbat/ECLIPSE") - self.grid = EclGrid(case) - self.rst_file = EclFile("%s.UNRST" % case) - self.init_file = EclFile("%s.INIT" % case) - - - def test_kw_imul(self): - P = self.rst_file["PRESSURE"][5] - fipnum = self.init_file["FIPNUM"][0] - fipnum_copy = fipnum.deep_copy() - - reg = EclRegion(self.grid, False) - reg.select_more(P, 260) - fipnum.mul(-1, mask=reg) - self.assertFalse(fipnum.equal(fipnum_copy)) - - fipnum.mul(-1, mask=reg) - self.assertTrue(fipnum.equal(fipnum_copy)) - - def test_equal(self): - reg1 = EclRegion(self.grid , False) - reg2 = EclRegion(self.grid , False) - - self.assertTrue( reg1 == reg2 ) - - reg1.select_islice(4 , 6) - self.assertFalse( reg1 == reg2 ) - reg2.select_islice(4,7) - self.assertFalse( reg1 == reg2 ) - reg1.select_islice(7,7) - self.assertTrue( reg1 == reg2 ) - - - def test_kw_idiv(self): - P = self.rst_file["PRESSURE"][5] - fipnum = self.init_file["FIPNUM"][0] - fipnum_copy = fipnum.deep_copy() - - reg = EclRegion(self.grid, False) - reg.select_more(P, 260) - fipnum.div(-1, mask=reg) - self.assertFalse(fipnum.equal(fipnum_copy)) - - fipnum.div(-1, mask=reg) - self.assertTrue(fipnum.equal(fipnum_copy)) - - - def test_kw_iadd(self): - P = self.rst_file["PRESSURE"][5] - fipnum = self.init_file["FIPNUM"][0] - fipnum_copy = fipnum.deep_copy() - - reg = EclRegion(self.grid, False) - reg.select_more(P, 260) - fipnum.add(1, mask=reg) - self.assertFalse(fipnum.equal(fipnum_copy)) - - reg.invert() - fipnum.add(1, mask=reg) - - fipnum.sub(1) - self.assertTrue(fipnum.equal(fipnum_copy)) - - - def test_kw_isub(self): - P = self.rst_file["PRESSURE"][5] - fipnum = self.init_file["FIPNUM"][0] - fipnum_copy = fipnum.deep_copy() - - reg = EclRegion(self.grid, False) - reg.select_more(P, 260) - fipnum.sub(1, mask=reg) - self.assertFalse(fipnum.equal(fipnum_copy)) - fipnum.add(1, mask=reg) - self.assertTrue(fipnum.equal(fipnum_copy)) - - - def test_slice(self): - reg = EclRegion(self.grid, False) - reg.select_islice(0, 5) - OK = True - - global_list = reg.global_list - self.assertEqual(global_list.parent(), reg) - - for gi in global_list: - (i, j, k) = self.grid.get_ijk(global_index=gi) - if i > 5: - OK = False - self.assertTrue(OK) - self.assertTrue(self.grid.ny * self.grid.nz * 6 == len(reg.global_list)) - - reg.select_jslice(7, 8, intersect=True) - OK = True - for gi in reg.global_list: - (i, j, k) = self.grid.get_ijk(global_index=gi) - if i > 5: - OK = False - - if j < 7 or j > 8: - OK = False - - self.assertTrue(OK) - self.assertTrue(2 * self.grid.nz * 6 == len(reg.global_list)) - - reg2 = EclRegion(self.grid, False) - reg2.select_kslice(3, 5) - reg &= reg2 - OK = True - for gi in reg.global_list: - (i, j, k) = self.grid.get_ijk(global_index=gi) - if i > 5: - OK = False - - if j < 7 or j > 8: - OK = False - - if k < 3 or k > 5: - OK = False - - self.assertTrue(OK) - self.assertTrue(2 * 3 * 6 == len(reg.getGlobalList())) - - - - def test_index_list(self): - reg = EclRegion(self.grid, False) - reg.select_islice(0, 5) - active_list = reg.active_list - global_list = reg.global_list - - - - def test_polygon(self): - reg = EclRegion(self.grid, False) - (x,y,z) = self.grid.get_xyz( ijk=(10,10,0) ) - dx = 0.1 - dy = 0.1 - reg.select_inside_polygon( [(x-dx,y-dy) , (x-dx,y+dy) , (x+dx,y+dy) , (x+dx,y-dy)] ) - self.assertTrue( self.grid.nz == len(reg.getGlobalList())) - - - def test_heidrun(self): - root = self.createTestPath("Statoil/ECLIPSE/Heidrun") - grid = EclGrid( "%s/FF12_2013B2_AMAP_AOP-J15_NO62_MOVEX.EGRID" % root) - - polygon = [] - with open("%s/polygon.ply" % root) as fileH: - for line in fileH.readlines(): - tmp = line.split() - polygon.append( (float(tmp[0]) , float(tmp[1]))) - self.assertEqual( len(polygon) , 11 ) - - reg = EclRegion( grid , False ) - reg.select_inside_polygon( polygon ) - self.assertEqual( 0 , len(reg.global_list) % grid.nz) - - - def test_layer(self): - region = EclRegion(self.grid, False) - layer = Layer( self.grid.getNX() , self.grid.getNY() + 1) - with self.assertRaises(ValueError): - region.selectFromLayer( layer , 0 , 1 ) - - layer = Layer( self.grid.getNX() , self.grid.getNY() ) - layer[0,0] = 1 - layer[1,1] = 1 - layer[2,2] = 1 - - with self.assertRaises(ValueError): - region.selectFromLayer( layer , -1 , 1 ) - - with self.assertRaises(ValueError): - region.selectFromLayer( layer , self.grid.getNZ() , 1 ) - - region.selectFromLayer( layer , 0 , 2 ) - glist = region.getGlobalList() - self.assertEqual(0 , len(glist)) - - region.selectFromLayer( layer , 0 , 1 ) - glist = region.getGlobalList() - self.assertEqual(3 , len(glist)) diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_rft.py b/ThirdParty/Ert/python/tests/core/ecl/test_rft.py deleted file mode 100644 index fe0215facf..0000000000 --- a/ThirdParty/Ert/python/tests/core/ecl/test_rft.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python -# Copyright (C) 2016 Statoil ASA, Norway. -# -# The file 'test_rft.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - - -import datetime -from ert.util import CTime -from ert.ecl import EclRFTFile, EclRFTCell, EclPLTCell -from ert.ecl.rft import WellTrajectory -from ert.test import ExtendedTestCase -from ert.ecl import EclRFT - -class RFTTest(ExtendedTestCase): - - def test_create(self): - rft = EclRFT( "WELL" , "RFT" , datetime.date(2015 , 10 , 1 ) , 100 ) - self.assertEqual( len(rft) , 0 ) - - with self.assertRaises(IndexError): - cell = rft[5] - - - diff --git a/ThirdParty/Ert/python/tests/core/geometry/CMakeLists.txt b/ThirdParty/Ert/python/tests/core/geometry/CMakeLists.txt deleted file mode 100644 index 6fc11295d9..0000000000 --- a/ThirdParty/Ert/python/tests/core/geometry/CMakeLists.txt +++ /dev/null @@ -1,24 +0,0 @@ -set(TEST_SOURCES - __init__.py - test_convex_hull.py - test_cpolyline.py - test_cpolyline_collection.py - test_geometry_tools.py - test_intersection.py - test_point_in_polygon.py - test_polygon_slicing.py - test_polyline.py - test_surface.py -) - -add_python_package("python.tests.core.geometry" ${PYTHON_INSTALL_PREFIX}/tests/core/geometry "${TEST_SOURCES}" False) - -addPythonTest(core.geometry.surface tests.core.geometry.test_surface.SurfaceTest) -addPythonTest(core.geometry.polyline tests.core.geometry.test_polyline.PolylineTest) -addPythonTest(core.geometry.intersection tests.core.geometry.test_intersection.IntersectionTest) -addPythonTest(core.geometry.convex_hull tests.core.geometry.test_convex_hull.ConvexHullTest) -addPythonTest(core.geometry.point_in_polygon tests.core.geometry.test_point_in_polygon.PointInPolygonTest) -addPythonTest(core.geometry.polygon_slicing tests.core.geometry.test_polygon_slicing.PolygonSlicingTest) -addPythonTest(core.geometry.cpolyline tests.core.geometry.test_cpolyline.CPolylineTest) -addPythonTest(core.geometry.cpolyline_collection tests.core.geometry.test_cpolyline_collection.CPolylineCollectionTest) -addPythonTest(core.geometry.geometry_tools tests.core.geometry.test_geometry_tools.GeometryToolsTest ) diff --git a/ThirdParty/Ert/python/tests/core/geometry/__init__.py b/ThirdParty/Ert/python/tests/core/geometry/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/python/tests/core/geometry/test_surface.py b/ThirdParty/Ert/python/tests/core/geometry/test_surface.py deleted file mode 100644 index 0e29cdf5ee..0000000000 --- a/ThirdParty/Ert/python/tests/core/geometry/test_surface.py +++ /dev/null @@ -1,151 +0,0 @@ -import random -from ert.geo import Surface -from ert.test import ExtendedTestCase , TestAreaContext - - -class SurfaceTest(ExtendedTestCase): - def setUp(self): - self.surface_valid = self.createTestPath("local/geometry/surface/valid_ascii.irap") - self.surface_short = self.createTestPath("local/geometry/surface/short_ascii.irap") - self.surface_long = self.createTestPath("local/geometry/surface/long_ascii.irap") - self.surface_valid2 = self.createTestPath("local/geometry/surface/valid2_ascii.irap") - self.surface_small = self.createTestPath("local/geometry/surface/valid_small_ascii.irap") - - - def test_create(self): - with self.assertRaises(IOError): - s = Surface("File/does/not/exist") - - with self.assertRaises(ValueError): - s = Surface(self.surface_short) - - with self.assertRaises(ValueError): - s = Surface(self.surface_long) - - s = Surface( self.surface_valid ) - - self.assertEqual( s.getNX( ) , 49 ) - self.assertEqual( s.getNY( ) , 79 ) - self.assertEqual( len(s) , 49*79 ) - - with self.assertRaises(IndexError): - v = s[49 * 79] - - with self.assertRaises(TypeError): - v = s["KEY"] - - self.assertEqual( s[0] , 0.0051 ) - self.assertEqual( s[-1] , -0.0014 ) - - with self.assertRaises(IndexError): - s[49*79] = 787 - - s[0] = 10 - self.assertEqual( s[0] , 10 ) - - s[-1] = 77 - self.assertEqual( s[len(s) - 1] , 77 ) - - - def test_write(self): - with TestAreaContext("surface/write"): - - s0 = Surface( self.surface_valid ) - s0.write( "new_surface.irap") - - s1 = Surface( "new_surface.irap") - self.assertTrue( s1 == s0 ) - - s0[0] = 99 - self.assertFalse( s1 == s0 ) - - - - def test_copy(self): - with TestAreaContext("surface/copy"): - s0 = Surface( self.surface_valid ) - s1 = s0.copy( ) - - self.assertTrue( s1 == s0 ) - s1[0] = 99 - self.assertFalse( s1 == s0 ) - del s0 - self.assertEqual( s1[0] , 99) - - s2 = s1.copy( copy_data = False ) - self.assertEqual( s2[0] , 0.0 ) - self.assertEqual( s2[10] , 0.0 ) - self.assertEqual( s2[100] , 0.0 ) - - - def test_header_equal(self): - s0 = Surface( self.surface_valid ) - s1 = Surface( self.surface_valid2 ) - s2 = s0.copy( ) - - self.assertTrue( s0.headerEqual( s0 )) - self.assertFalse( s0.headerEqual( s1 )) - self.assertTrue( s0.headerEqual( s2 )) - - - def test_ops(self): - s0 = Surface( self.surface_valid ) - s0.assign(1.0) - for v in s0: - self.assertEqual(v , 1.0) - - s0 += 1 - for v in s0: - self.assertEqual(v , 2.0) - - s0 *= 2 - for v in s0: - self.assertEqual(v , 4.0) - - s1 = s0 + 4 - for v in s1: - self.assertEqual(v , 8.0) - - s2 = Surface( self.surface_valid2 ) - with self.assertRaises(ValueError): - s3 = s1 + s2 - - s4 = s1 + s0 - for v in s4: - self.assertEqual(v , 12.0) - - s5 = s4 / 12 - for v in s5: - self.assertEqual(v , 1.0) - - - def test_ops2(self): - s0 = Surface( self.surface_small ) - surface_list = [] - for i in range(10): - s = s0.copy() - for j in range(len(s)): - s[j] = random.random() - surface_list.append(s) - - mean = s0.copy( copy_data = False ) - for s in surface_list: - mean += s - mean /= len(surface_list) - - std = s0.copy( copy_data = False ) - for s in surface_list: - std += (s - mean) * (s - mean) - std /= (len(surface_list) - 1) - - - def test_sqrt(self): - s0 = Surface( self.surface_small ) - s0.assign(4) - s_sqrt = s0.sqrt( ) - for i in range(len(s0)): - self.assertEqual(s0[i] , 4) - self.assertEqual(s_sqrt[i] , 2) - - s0.inplaceSqrt( ) - self.assertTrue( s0 == s_sqrt ) diff --git a/ThirdParty/Ert/python/tests/core/util/CMakeLists.txt b/ThirdParty/Ert/python/tests/core/util/CMakeLists.txt deleted file mode 100644 index e90b279076..0000000000 --- a/ThirdParty/Ert/python/tests/core/util/CMakeLists.txt +++ /dev/null @@ -1,41 +0,0 @@ -set(TEST_SOURCES - __init__.py - test_ctime.py - test_cstring.py - test_hash.py - test_lookup_table.py - test_matrix.py - test_rng.py - test_stat.py - test_string_list.py - test_substitution_list.py - test_thread_pool.py - test_cthread_pool.py - test_ui_return.py - test_vectors.py - test_version.py - test_work_area.py - test_path_context.py - test_arg_pack.py - test_spawn.py -) - -add_python_package("python.tests.core.util" ${PYTHON_INSTALL_PREFIX}/tests/core/util "${TEST_SOURCES}" False) - -addPythonTest(core.util.ctime core.util.test_ctime.CTimeTest) -addPythonTest(core.util.cstring core.util.test_cstring.CStringTest) -addPythonTest(core.util.hash core.util.test_hash.HashTest) -addPythonTest(core.util.lookup_table core.util.test_lookup_table.LookupTableTest ) -addPythonTest(core.util.matrix core.util.test_matrix.MatrixTest ) -addPythonTest(core.util.rng core.util.test_rng.RngTest ) -addPythonTest(core.util.stat core.util.test_stat.StatTest ) -addPythonTest(core.util.stringlist core.util.test_string_list.StringListTest) -addPythonTest(core.util.tvector core.util.test_vectors.UtilTest) -addPythonTest(core.util.ui_return core.util.test_ui_return.UIReturnTest) -addPythonTest(core.util.work_area core.util.test_work_area.WorkAreaTest) -addPythonTest(core.util.version core.util.test_version.VersionTest) -addPythonTest(core.util.path_context core.util.test_path_context.PathContextTest) -addPythonTest(core.util.thread_pool core.util.test_thread_pool.ThreadPoolTest) -addPythonTest(core.util.cthread_pool core.util.test_cthread_pool.CThreadPoolTest) -addPythonTest(core.util.arg_pack core.util.test_arg_pack.ArgPackTest) -addPythonTest(core.util.spawn core.util.test_spawn.SpawnTest) diff --git a/ThirdParty/Ert/python/tests/core/util/__init__.py b/ThirdParty/Ert/python/tests/core/util/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/python/tests/core/util/test_cstring.py b/ThirdParty/Ert/python/tests/core/util/test_cstring.py deleted file mode 100644 index 47ecb7c473..0000000000 --- a/ThirdParty/Ert/python/tests/core/util/test_cstring.py +++ /dev/null @@ -1,20 +0,0 @@ -import ert -from cwrap import Prototype -from ert.test.extended_testcase import ExtendedTestCase - -# Local copies so that the real ones don't get changed -class TestUtilPrototype(Prototype): - lib = ert.load("libert_util") - - def __init__(self, prototype, bind=False): - super(TestUtilPrototype, self).__init__(TestUtilPrototype.lib, prototype, bind=bind) - - -alloc_string_copy = TestUtilPrototype("cstring_obj util_alloc_string_copy(char*)") - - -class CStringTest(ExtendedTestCase): - def test_get(self): - s1 = "String123" - s2 = alloc_string_copy(s1) - self.assertEqual(s1, s2) diff --git a/ThirdParty/Ert/python/tests/core/util/test_spawn.py b/ThirdParty/Ert/python/tests/core/util/test_spawn.py deleted file mode 100644 index d7ea4963a1..0000000000 --- a/ThirdParty/Ert/python/tests/core/util/test_spawn.py +++ /dev/null @@ -1,60 +0,0 @@ -import os -import stat - -import sys - -import ert -from cwrap import CWrapper -from ert.test.extended_testcase import ExtendedTestCase -from ert.test.test_area import TestAreaContext - -test_lib = ert.load("libert_util") # create a local namespace (so we don't overwrite StringList) -cwrapper = CWrapper(test_lib) - -spawn = cwrapper.prototype("int util_spawn_blocking(char*, int, void*, char*, char*)") - -class SpawnTest(ExtendedTestCase): - def createScript(self, name, stdout_string , stderr_string): - with open(name, "w") as f: - f.write("#!/usr/bin/env python\n") - f.write("import sys\n") - f.write("sys.stdout.write('%s')\n" % stdout_string) - f.write("sys.stdout.flush()\n") - f.write("sys.stderr.write('%s')\n" % stderr_string) - f.write("sys.stderr.flush()\n") - - mode = os.stat(name).st_mode - mode |= stat.S_IXUSR | stat.S_IXGRP - os.chmod(name, stat.S_IMODE(mode)) - - - - def test_spawn_redirect(self): - with TestAreaContext("spawn_test1", store_area=True) as test_area: - stdout_string = "stdout_redirect" - stderr_string = "stderr_redirect" - self.createScript("print.py",stdout_string, stderr_string) - status = spawn("print.py",0, None, "print.out", "print.err") - self.assertEqual(status , 0) - - sys.stderr.write("init stderr\n") - sys.stdout.write("init stdout\n") - sys.stderr.write("complete stderr\n") - sys.stdout.write("complete stdout\n") - - with open("print.out", "r") as f: - s = f.read() - self.assertEqual(s , stdout_string) - - with open("print.err", "r") as f: - s = f.read() - self.assertEqual(s , stderr_string) - - - - def test_spawn_noredirect(self): - with TestAreaContext("spawn_test2", store_area=True) as test_area: - self.createScript("print.py","stdout_no_redirect", "stderr_no_redirect") - status = spawn("print.py", 0, None, None , None) - self.assertEqual(status , 0) - diff --git a/ThirdParty/Ert/python/tests/core/util/test_version.py b/ThirdParty/Ert/python/tests/core/util/test_version.py deleted file mode 100644 index f09e9bb7a6..0000000000 --- a/ThirdParty/Ert/python/tests/core/util/test_version.py +++ /dev/null @@ -1,97 +0,0 @@ -# Copyright (C) 2015 Statoil ASA, Norway. -# -# The file 'test_version.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -import ert -from ert.test import ExtendedTestCase -from ert.util import Version - - -class VersionTest(ExtendedTestCase): - def setUp(self): - pass - - def test_create(self): - v1 = Version(1, 8, 6) - self.assertFalse(v1.isDevelVersion()) - - self.assertEqual(v1.versionString(), "1.8.6") - self.assertEqual(v1.versionTuple(), (1, 8, 6)) - - v2 = Version(2, 0, "X") - self.assertTrue(v2.isDevelVersion()) - - def test_eq(self): - v1 = Version(1, 2, 3) - v2 = Version(1, 2, 3) - - self.assertTrue(v1 == v2) - self.assertFalse(v1 != v2) - - v1 = Version(1, 2, "X") - v2 = Version(1, 2, "Y") - self.assertTrue(v1 != v2) - self.assertFalse(v1 == v2) - - v1 = Version(1, 2, "X") - v2 = Version(1, 2, 0) - self.assertTrue(v1 != v2) - self.assertFalse(v1 == v2) - - v1 = Version(1, 2, "X") - v2 = Version(1, 3, "X") - self.assertTrue(v1 != v2) - self.assertFalse(v1 == v2) - - v1 = Version(1, 2, "X") - v2 = (1, 3, "X") - self.assertTrue(v1 != v2) - self.assertFalse(v1 == v2) - - def test_ge(self): - v1 = Version(1, 2, 3) - v2 = Version(1, 2, 3) - v3 = (1, 2, 2) - - self.assertTrue(v1 >= v2) - self.assertFalse(v1 < v2) - - self.assertTrue(v1 >= v3) - self.assertFalse(v1 < v3) - - v1 = Version(1, 2, "X") - v2 = Version(1, 1, 9) - self.assertTrue(v1 > v2) - - v2 = Version(1, 2, "X") - self.assertTrue(v1 >= v2) - - v2 = Version(1, 2, 0) - self.assertFalse(v1 >= v2) - - def test_current(self): - current = Version.currentVersion() - self.assertTrue(current > (0, 0, 0)) - - def test_import(self): - from ert import Version as globalVersion - v1 = globalVersion(1, 1, 2) - v2 = Version(1, 1, 2) - - self.assertTrue(v1 == v2) - - def test_root_version(self): - cv = Version.currentVersion( ) - self.assertEqual( ert.__version__ , cv.versionString() ) diff --git a/ThirdParty/Ert/python/tests/core/well/CMakeLists.txt b/ThirdParty/Ert/python/tests/core/well/CMakeLists.txt deleted file mode 100644 index 8e85087ebf..0000000000 --- a/ThirdParty/Ert/python/tests/core/well/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -set(TEST_SOURCES - __init__.py - test_ecl_well.py - test_ecl_well2.py -) - -add_python_package("python.tests.core.well" ${PYTHON_INSTALL_PREFIX}/tests/core/well "${TEST_SOURCES}" False) - -if (STATOIL_TESTDATA_ROOT) - addPythonTest(core.well.ecl_well core.well.test_ecl_well.EclWellTest LABELS StatoilData) - addPythonTest(core.well.ecl_well2 core.well.test_ecl_well2.EclWellTest2 LABELS StatoilData) -endif() \ No newline at end of file diff --git a/ThirdParty/Ert/python/tests/core/well/__init__.py b/ThirdParty/Ert/python/tests/core/well/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/python/tests/ctest_import.py b/ThirdParty/Ert/python/tests/ctest_import.py deleted file mode 100644 index c7892a0ec3..0000000000 --- a/ThirdParty/Ert/python/tests/ctest_import.py +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env python -import os -import sys - -PYTHONPATH = sys.argv[1] -sys.path.insert(0, PYTHONPATH) - -from import_tester import ImportTester - -package_name = sys.argv[2] -package_path = os.path.join(PYTHONPATH, package_name) - -if ImportTester.importRecursively(package_path, package_name): - sys.exit(0) -else: - sys.exit(1) diff --git a/ThirdParty/Ert/python/tests/ctest_run.py b/ThirdParty/Ert/python/tests/ctest_run.py deleted file mode 100644 index 1ab2bb37a6..0000000000 --- a/ThirdParty/Ert/python/tests/ctest_run.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env python -import os -import sys - -try: - from unittest2 import TextTestRunner -except ImportError: - from unittest import TextTestRunner - - -def runTestCase(tests, verbosity=0): - test_result = TextTestRunner(verbosity=verbosity).run(tests) - - if len(test_result.errors) or len(test_result.failures): - test_result.printErrors() - return False - else: - return True - - -if __name__ == '__main__': - TEST_PYTHONPATH = sys.argv[1] - os.environ["PYTHONPATH"] = TEST_PYTHONPATH + os.pathsep + os.getenv("PYTHONPATH", "") - for path_element in reversed(TEST_PYTHONPATH.split(os.pathsep)): - sys.path.insert(0, path_element) - - test_class_path = sys.argv[2] - argv = [] - - try: - argv = sys.argv[3:] - except IndexError: - pass - - from ert.test import ErtTestRunner - - tests = ErtTestRunner.getTestsFromTestClass(test_class_path, argv) - - # Set verbosity to 2 to see which test method in a class that fails. - if runTestCase(tests, verbosity=0): - sys.exit(0) - else: - sys.exit(1) diff --git a/ThirdParty/Ert/python/tests/cwrap/CMakeLists.txt b/ThirdParty/Ert/python/tests/cwrap/CMakeLists.txt new file mode 100644 index 0000000000..56200ef2d9 --- /dev/null +++ b/ThirdParty/Ert/python/tests/cwrap/CMakeLists.txt @@ -0,0 +1,17 @@ +set(TEST_SOURCES + __init__.py + test_basecclass.py + test_basecenum.py + test_basecvalue.py + test_metawrap.py + test_cfile.py +) + +add_python_package("python.tests.cwrap" ${PYTHON_INSTALL_PREFIX}/tests/cwrap "${TEST_SOURCES}" False) + +addPythonTest(tests.cwrap.test_basecclass.BaseCClassTest) +addPythonTest(tests.cwrap.test_basecenum.BaseCEnumTest) +addPythonTest(tests.cwrap.test_basecvalue.BaseCValueTest) +addPythonTest(tests.cwrap.test_metawrap.MetaWrapTest) +addPythonTest(tests.cwrap.test_cfile.CFILETest) + diff --git a/ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/__init__.py b/ThirdParty/Ert/python/tests/cwrap/__init__.py similarity index 100% rename from ThirdParty/Ert/python/python/ert_gui/ertwidgets/models/__init__.py rename to ThirdParty/Ert/python/tests/cwrap/__init__.py diff --git a/ThirdParty/Ert/python/tests/core/cwrap/test_basecclass.py b/ThirdParty/Ert/python/tests/cwrap/test_basecclass.py similarity index 90% rename from ThirdParty/Ert/python/tests/core/cwrap/test_basecclass.py rename to ThirdParty/Ert/python/tests/cwrap/test_basecclass.py index 7670b41b0a..f2925d67b6 100644 --- a/ThirdParty/Ert/python/tests/core/cwrap/test_basecclass.py +++ b/ThirdParty/Ert/python/tests/cwrap/test_basecclass.py @@ -1,5 +1,5 @@ from cwrap import BaseCClass -from ert.test import ExtendedTestCase +from ecl.test import ExtendedTestCase class BaseCClassTest(ExtendedTestCase): diff --git a/ThirdParty/Ert/python/tests/core/cwrap/test_basecenum.py b/ThirdParty/Ert/python/tests/cwrap/test_basecenum.py similarity index 78% rename from ThirdParty/Ert/python/tests/core/cwrap/test_basecenum.py rename to ThirdParty/Ert/python/tests/cwrap/test_basecenum.py index 04f0dcc4f0..b5f44efa95 100644 --- a/ThirdParty/Ert/python/tests/core/cwrap/test_basecenum.py +++ b/ThirdParty/Ert/python/tests/cwrap/test_basecenum.py @@ -1,5 +1,5 @@ from cwrap import BaseCEnum -from ert.test import ExtendedTestCase +from ecl.test import ExtendedTestCase @@ -74,5 +74,18 @@ class PowerOf2(BaseCEnum): self.assertIn(PowerOf2.ONE, three) self.assertNotIn(PowerOf2.FOUR, three) + def test_repr_and_str(self): + class MyLonelyEnum(BaseCEnum): + pass + + MyLonelyEnum.addEnum("ONE", 1) + MyLonelyEnum.addEnum("TWO", 2) + MyLonelyEnum.addEnum("THREE", 3) + MyLonelyEnum.addEnum("FOUR", 4) + tri = MyLonelyEnum.THREE + self.assertEqual(repr(tri), 'MyLonelyEnum(name = "THREE", value = 3)') + self.assertEqual(str(tri), 'THREE') + self.assertEqual(tri.name, 'THREE') + self.assertEqual(tri.value, 3) diff --git a/ThirdParty/Ert/python/tests/core/cwrap/test_basecvalue.py b/ThirdParty/Ert/python/tests/cwrap/test_basecvalue.py similarity index 95% rename from ThirdParty/Ert/python/tests/core/cwrap/test_basecvalue.py rename to ThirdParty/Ert/python/tests/cwrap/test_basecvalue.py index f0096c1a9f..6f2bb647d6 100644 --- a/ThirdParty/Ert/python/tests/core/cwrap/test_basecvalue.py +++ b/ThirdParty/Ert/python/tests/cwrap/test_basecvalue.py @@ -1,10 +1,10 @@ -import ert +import ecl from ctypes import c_ubyte, c_double from cwrap import BaseCValue, Prototype -from ert.test import ExtendedTestCase +from ecl.test import ExtendedTestCase class TestPrototype(Prototype): - lib = ert.load("libert_util") + lib = ecl.load("libert_util") def __init__(self, prototype): super(TestPrototype, self).__init__(self.lib, prototype) diff --git a/ThirdParty/Ert/python/tests/core/cwrap/test_cfile.py b/ThirdParty/Ert/python/tests/cwrap/test_cfile.py similarity index 83% rename from ThirdParty/Ert/python/tests/core/cwrap/test_cfile.py rename to ThirdParty/Ert/python/tests/cwrap/test_cfile.py index e790cbb7f1..3fb5093a55 100644 --- a/ThirdParty/Ert/python/tests/core/cwrap/test_cfile.py +++ b/ThirdParty/Ert/python/tests/cwrap/test_cfile.py @@ -1,12 +1,12 @@ -import ert +import ecl from cwrap import Prototype, CFILE -from ert.test.extended_testcase import ExtendedTestCase -from ert.test.test_area import TestAreaContext +from ecl.test.extended_testcase import ExtendedTestCase +from ecl.test.test_area import TestAreaContext # Local copies so that the real ones don't get changed class TestUtilPrototype(Prototype): - lib = ert.load("libert_util") + lib = ecl.load("libert_util") def __init__(self, prototype, bind=False): super(TestUtilPrototype, self).__init__(TestUtilPrototype.lib, prototype, bind=bind) diff --git a/ThirdParty/Ert/python/tests/core/cwrap/test_metawrap.py b/ThirdParty/Ert/python/tests/cwrap/test_metawrap.py similarity index 78% rename from ThirdParty/Ert/python/tests/core/cwrap/test_metawrap.py rename to ThirdParty/Ert/python/tests/cwrap/test_metawrap.py index 99e6ce92a6..2f9c5c2b90 100644 --- a/ThirdParty/Ert/python/tests/core/cwrap/test_metawrap.py +++ b/ThirdParty/Ert/python/tests/cwrap/test_metawrap.py @@ -1,15 +1,15 @@ +from __future__ import absolute_import, division, print_function, unicode_literals +from six import string_types import ctypes -from types import StringType, IntType -import ert +import ecl from cwrap import BaseCClass, Prototype, PrototypeError -from ert.test import ExtendedTestCase -import cwrap.clib as clib +from ecl.test import ExtendedTestCase # Local copies so that the real ones don't get changed class TestUtilPrototype(Prototype): - lib = ert.load("libert_util") + lib = ecl.load("libert_util") def __init__(self, prototype, bind=False): super(TestUtilPrototype, self).__init__(TestUtilPrototype.lib, prototype, bind=bind) @@ -22,11 +22,11 @@ class StringList(BaseCClass): TYPE_NAME = "test_stringlist" __len__ = BoundTestUtilPrototype("int stringlist_get_size(test_stringlist)") - free = BoundTestUtilPrototype("void stringlist_free(test_stringlist)") + free = BoundTestUtilPrototype("void stringlist_free(test_stringlist)") - _alloc = TestUtilPrototype("void* stringlist_alloc_new()") - _iget = TestUtilPrototype("char* stringlist_iget(test_stringlist, int)") - _append = TestUtilPrototype("void stringlist_append_copy(test_stringlist, char*)") + _alloc = TestUtilPrototype("void* stringlist_alloc_new()", bind = False) + _iget = TestUtilPrototype("char* stringlist_iget(test_stringlist, int)") + _append = TestUtilPrototype("void stringlist_append_copy(test_stringlist, char*)") def __init__(self, initial=None): c_ptr = self._alloc() @@ -34,13 +34,15 @@ def __init__(self, initial=None): if initial: for s in initial: - if isinstance(s, StringType): + if isinstance(s, bytes): + s.decode('ascii') + if isinstance(s, string_types): self.append(s) else: raise TypeError("Item: %s not a string" % s) def __getitem__(self, index): - if isinstance(index, IntType): + if isinstance(index, int): length = len(self) if index < 0: index += length @@ -52,7 +54,9 @@ def __getitem__(self, index): raise TypeError("Index should be integer type") def append(self, string): - if isinstance(string, StringType): + if isinstance(string, bytes): + s.decode('ascii') + if isinstance(string, string_types): self._append(self, string) else: self._append(self, str(string)) @@ -110,10 +114,10 @@ def stringObj(c_ptr): char_ptr = ctypes.c_char_p(c_ptr) python_string = char_ptr.value TestUtilPrototype.lib.free(c_ptr) - return python_string + return python_string.decode('ascii') Prototype.registerType("string_obj", stringObj) dateStamp = TestUtilPrototype("string_obj util_alloc_date_stamp_utc()") date_stamp = dateStamp() - self.assertIsInstance(date_stamp, str) + self.assertIsInstance(date_stamp, string_types) diff --git a/ThirdParty/Ert/python/tests/ecl/CMakeLists.txt b/ThirdParty/Ert/python/tests/ecl/CMakeLists.txt new file mode 100644 index 0000000000..85a308d90e --- /dev/null +++ b/ThirdParty/Ert/python/tests/ecl/CMakeLists.txt @@ -0,0 +1,89 @@ +set(NFS_RUNPATH "" CACHE STRING "Disk area which is shared among cluster nodes and can be used as CWD for LSF/RSH jobs.") +set(RSH_SERVERS "" CACHE STRING "List of nodes which will be used to test the RSH driver") + +set(TEST_SOURCES + __init__.py + test_deprecation.py + test_removed.py + test_ecl_3dkw.py + test_ecl_file_statoil.py + test_ecl_file.py + test_ecl_init_file.py + test_ecl_restart_file.py + test_ecl_sum.py + test_ecl_sum_vector.py + test_fault_blocks.py + test_fault_blocks_statoil.py + test_faults.py + test_fortio.py + test_grdecl.py + test_grid.py + test_grid_statoil.py + test_indexed_read.py + test_ecl_kw_statoil.py + test_ecl_kw.py + test_kw_function.py + test_layer.py + test_npv.py + test_region.py + test_region_statoil.py + test_restart.py + test_rft.py + test_rft_statoil.py + test_rft_cell.py + test_statoil_faults.py + test_sum_statoil.py + test_ecl_util.py + test_ecl_cmp.py + test_sum.py + test_grav.py + test_geertsma.py + test_ecl_type.py + test_restart_head.py +) + +add_python_package("python.tests.ecl" ${PYTHON_INSTALL_PREFIX}/tests/ecl "${TEST_SOURCES}" False) + +addPythonTest(tests.ecl.test_grid.GridTest ) +addPythonTest(tests.ecl.test_ecl_kw.KWTest) +addPythonTest(tests.ecl.test_kw_function.KWFunctionTest) +addPythonTest(tests.ecl.test_ecl_3dkw.Ecl3DKWTest ) +addPythonTest(tests.ecl.test_rft.RFTTest) +addPythonTest(tests.ecl.test_rft_cell.RFTCellTest) +addPythonTest(tests.ecl.test_sum.SumTest) +addPythonTest(tests.ecl.test_layer.LayerTest ) +addPythonTest(tests.ecl.test_faults.FaultTest ) +addPythonTest(tests.ecl.test_fault_blocks.FaultBlockTest ) +addPythonTest(tests.ecl.test_deprecation.Deprecation_1_9_Test ) +addPythonTest(tests.ecl.test_deprecation.Deprecation_2_0_Test ) +addPythonTest(tests.ecl.test_deprecation.Deprecation_2_1_Test ) +addPythonTest(tests.ecl.test_removed.Removed_2_1_Test ) +addPythonTest(tests.ecl.test_ecl_util.EclUtilTest ) +addPythonTest(tests.ecl.test_fortio.FortIOTest) +addPythonTest(tests.ecl.test_ecl_file.EclFileTest) +addPythonTest(tests.ecl.test_grav.EclGravTest) +addPythonTest(tests.ecl.test_geertsma.GeertsmaTest) +addPythonTest(tests.ecl.test_ecl_type.EclDataTypeTest) +addPythonTest(tests.ecl.test_region.RegionTest) + + +if (STATOIL_TESTDATA_ROOT) + addPythonTest(tests.ecl.test_ecl_file_statoil.EclFileStatoilTest LABELS StatoilData) + addPythonTest(tests.ecl.test_grdecl.GRDECLTest LABELS StatoilData) + addPythonTest(tests.ecl.test_grid_statoil.GridTest LABELS StatoilData:Slow) + addPythonTest(tests.ecl.test_ecl_kw_statoil.KWTest LABELS StatoilData) + addPythonTest(tests.ecl.test_ecl_init_file.InitFileTest LABELS StatoilData) + addPythonTest(tests.ecl.test_ecl_restart_file.RestartFileTest LABELS StatoilData) + addPythonTest(tests.ecl.test_restart.RestartTest LABELS StatoilData ) + addPythonTest(tests.ecl.test_region_statoil.RegionTest LABELS StatoilData) + addPythonTest(tests.ecl.test_rft_statoil.RFTTest LABELS StatoilData) + addPythonTest(tests.ecl.test_sum_statoil.SumTest LABELS StatoilData) + addPythonTest(tests.ecl.test_ecl_sum_vector.EclSumVectorTest LABELS StatoilData) + addPythonTest(tests.ecl.test_ecl_sum.EclSumTest LABELS StatoilData) + addPythonTest(tests.ecl.test_statoil_faults.StatoilFaultTest LABELS StatoilData) + addPythonTest(tests.ecl.test_fault_blocks_statoil.FaultBlockTest LABELS StatoilData) + addPythonTest(tests.ecl.test_npv.NPVTest LABELS StatoilData) + addPythonTest(tests.ecl.test_indexed_read.EclIndexedReadTest LABELS StatoilData) + addPythonTest(tests.ecl.test_ecl_cmp.EclCmpTest LABELS StatoilData) + addPythonTest(tests.ecl.test_restart_head.RestartHeadTest LABELS StatoilData) +endif() diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/__init__.py b/ThirdParty/Ert/python/tests/ecl/__init__.py similarity index 100% rename from ThirdParty/Ert/python/python/ert_gui/ide/__init__.py rename to ThirdParty/Ert/python/tests/ecl/__init__.py diff --git a/ThirdParty/Ert/python/tests/ecl/test_deprecation.py b/ThirdParty/Ert/python/tests/ecl/test_deprecation.py new file mode 100644 index 0000000000..cd818abc5e --- /dev/null +++ b/ThirdParty/Ert/python/tests/ecl/test_deprecation.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python +# Copyright (C) 2011 Statoil ASA, Norway. +# +# The file 'test_deprecation.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. +import warnings +import time +import datetime + +from ecl.test import ExtendedTestCase, TestAreaContext +from ecl.ecl import EclFile, EclGrid, EclKW, EclDataType, EclGrid, EclRegion +from ecl.ecl import FortIO, openFortIO, EclRFT, EclGridGenerator +from ecl.test.ecl_mock import createEclSum +from ecl.util import BoolVector + +# The class Deprecation_1_9_Test contains methods which will be marked +# as deprecated in the 1.9.x versions. + +warnings.simplefilter("error" , DeprecationWarning) + +class Deprecation_2_1_Test(ExtendedTestCase): + pass + +class Deprecation_2_0_Test(ExtendedTestCase): + + def test_EclFile_name_property(self): + with TestAreaContext("name") as t: + kw = EclKW("TEST", 3, EclDataType.ECL_INT) + with openFortIO("TEST" , mode = FortIO.WRITE_MODE) as f: + kw.fwrite( f ) + + t.sync() + f = EclFile( "TEST" ) + +class Deprecation_1_9_Test(ExtendedTestCase): + + def test_EclRegion_properties(self): + grid = EclGridGenerator.createRectangular( (10,10,10) , (1,1,1)) + region = EclRegion( grid , False ) diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_ecl_3dkw.py b/ThirdParty/Ert/python/tests/ecl/test_ecl_3dkw.py similarity index 82% rename from ThirdParty/Ert/python/tests/core/ecl/test_ecl_3dkw.py rename to ThirdParty/Ert/python/tests/ecl/test_ecl_3dkw.py index 5135dc5315..f6bdabb0c3 100644 --- a/ThirdParty/Ert/python/tests/core/ecl/test_ecl_3dkw.py +++ b/ThirdParty/Ert/python/tests/ecl/test_ecl_3dkw.py @@ -17,9 +17,9 @@ import os import random -from ert.util import IntVector -from ert.ecl import Ecl3DKW , EclKW, EclTypeEnum, EclFile, FortIO, EclFileFlagEnum , EclGrid -from ert.test import ExtendedTestCase , TestAreaContext +from ecl.util import IntVector +from ecl.ecl import Ecl3DKW , EclKW, EclDataType, EclFile, FortIO, EclFileFlagEnum , EclGrid +from ecl.test import ExtendedTestCase , TestAreaContext @@ -31,7 +31,7 @@ def test_create( self ): actnum[i] = 0 grid = EclGrid.createRectangular( (10,10,10) , (1,1,1) , actnum = actnum) - kw = Ecl3DKW.create( "KW" , grid , EclTypeEnum.ECL_FLOAT_TYPE ) + kw = Ecl3DKW( "KW" , grid , EclDataType.ECL_FLOAT ) self.assertEqual( len(kw) , grid.getNumActive()) self.assertEqual( (10,10,10) , kw.dims() ) @@ -43,7 +43,7 @@ def test_create_global_size( self ): actnum[i] = 0 grid = EclGrid.createRectangular( (10,10,10) , (1,1,1) , actnum = actnum) - kw = Ecl3DKW.create( "KW" , grid , EclTypeEnum.ECL_FLOAT_TYPE , global_active = True) + kw = Ecl3DKW( "KW" , grid , EclDataType.ECL_FLOAT , global_active = True) self.assertEqual( len(kw) , grid.getGlobalSize()) kw.assign(50) @@ -58,7 +58,7 @@ def test_fix_uninitialized(self): ny = 11 nz = 12 grid = EclGrid.createRectangular( (nx,ny,nz) , (1,1,1) ) - kw = Ecl3DKW.create("REGIONS" , grid , EclTypeEnum.ECL_INT_TYPE , global_active = True) + kw = Ecl3DKW("REGIONS" , grid , EclDataType.ECL_INT , global_active = True) kw.assign(3) self.assertEqual( 3 * nx*ny*nz , sum(kw)) @@ -78,7 +78,7 @@ def test_getitem( self ): actnum[i] = 0 grid = EclGrid.createRectangular( (10,10,10) , (1,1,1) , actnum = actnum) - kw = Ecl3DKW.create( "KW" , grid , EclTypeEnum.ECL_FLOAT_TYPE , default_value = 77) + kw = Ecl3DKW( "KW" , grid , EclDataType.ECL_FLOAT , default_value = 77) with self.assertRaises(IndexError): kw[1000] @@ -105,7 +105,7 @@ def test_setitem( self ): actnum[i] = 0 grid = EclGrid.createRectangular( (10,10,10) , (1,1,1) , actnum = actnum) - kw = Ecl3DKW.create( "KW" , grid , EclTypeEnum.ECL_FLOAT_TYPE , default_value = 77) + kw = Ecl3DKW( "KW" , grid , EclDataType.ECL_FLOAT , default_value = 77) with self.assertRaises(IndexError): kw[1000] @@ -138,9 +138,9 @@ def test_cast(self): actnum[i] = 0 grid = EclGrid.createRectangular( (10,10,10) , (1,1,1) , actnum = actnum) - kw_wrong_size = EclKW.create( "KW" , 27 , EclTypeEnum.ECL_FLOAT_TYPE ) - kw_global_size = EclKW.create( "KW" , grid.getGlobalSize() , EclTypeEnum.ECL_FLOAT_TYPE ) - kw_active_size = EclKW.create( "KW" , grid.getNumActive() , EclTypeEnum.ECL_FLOAT_TYPE ) + kw_wrong_size = EclKW( "KW" , 27 , EclDataType.ECL_FLOAT ) + kw_global_size = EclKW( "KW" , grid.getGlobalSize() , EclDataType.ECL_FLOAT ) + kw_active_size = EclKW( "KW" , grid.getNumActive() , EclDataType.ECL_FLOAT ) with self.assertRaises(ValueError): Ecl3DKW.castFromKW(kw_wrong_size , grid) @@ -158,7 +158,7 @@ def test_cast(self): def test_default(self): grid = EclGrid.createRectangular( (10,10,10) , (1,1,1)) - kw = Ecl3DKW.create( "KW" , grid , EclTypeEnum.ECL_FLOAT_TYPE ) + kw = Ecl3DKW( "KW" , grid , EclDataType.ECL_FLOAT ) kw.setDefault(55) self.assertTrue( 55 , kw.getDefault()) @@ -169,7 +169,7 @@ def test_compressed_copy(self): actnum[2*i + 1] = 0 grid = EclGrid.createRectangular( (10,10,10) , (1,1,1) , actnum = actnum) - kw = Ecl3DKW.create( "KW" , grid , EclTypeEnum.ECL_INT_TYPE , global_active = True) + kw = Ecl3DKW( "KW" , grid , EclDataType.ECL_INT , global_active = True) for i in range(len(kw)): kw[i] = i @@ -188,7 +188,7 @@ def test_global_copy(self): actnum[2*i + 1] = 0 grid = EclGrid.createRectangular( (10,10,10) , (1,1,1) , actnum = actnum) - kw = Ecl3DKW.create( "KW" , grid , EclTypeEnum.ECL_INT_TYPE , global_active = False) + kw = Ecl3DKW( "KW" , grid , EclDataType.ECL_INT , global_active = False) for i in range(len(kw)): kw[i] = i diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_ecl_cmp.py b/ThirdParty/Ert/python/tests/ecl/test_ecl_cmp.py similarity index 94% rename from ThirdParty/Ert/python/tests/core/ecl/test_ecl_cmp.py rename to ThirdParty/Ert/python/tests/ecl/test_ecl_cmp.py index 0c2782f3d3..807c0b9ab0 100644 --- a/ThirdParty/Ert/python/tests/core/ecl/test_ecl_cmp.py +++ b/ThirdParty/Ert/python/tests/ecl/test_ecl_cmp.py @@ -14,9 +14,9 @@ # See the GNU General Public License at # for more details. -from ert.test import ExtendedTestCase , TestAreaContext -from ert.test.ecl_mock import createEclSum -from ert.ecl import EclCmp +from ecl.test import ExtendedTestCase , TestAreaContext +from ecl.test.ecl_mock import createEclSum +from ecl.ecl import EclCmp class EclCmpTest(ExtendedTestCase): def setUp(self): diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_ecl_file.py b/ThirdParty/Ert/python/tests/ecl/test_ecl_file.py similarity index 77% rename from ThirdParty/Ert/python/tests/core/ecl/test_ecl_file.py rename to ThirdParty/Ert/python/tests/ecl/test_ecl_file.py index 2872cd52d1..66a70196eb 100644 --- a/ThirdParty/Ert/python/tests/core/ecl/test_ecl_file.py +++ b/ThirdParty/Ert/python/tests/ecl/test_ecl_file.py @@ -1,18 +1,18 @@ #!/usr/bin/env python -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file 'sum_test.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 +# Copyright (C) 2011 Statoil ASA, Norway. +# +# The file 'sum_test.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 # for more details. import datetime import os.path @@ -20,10 +20,10 @@ from unittest import skipIf -from ert.ecl import EclFile, FortIO, EclKW , openFortIO , openEclFile -from ert.ecl import EclFileFlagEnum, EclTypeEnum, EclFileEnum +from ecl.ecl import EclFile, FortIO, EclKW , openFortIO , openEclFile +from ecl.ecl import EclFileFlagEnum, EclDataType, EclFileEnum -from ert.test import ExtendedTestCase , TestAreaContext +from ecl.test import ExtendedTestCase , TestAreaContext def createFile( name , kw_list ): with openFortIO(name , mode = FortIO.WRITE_MODE) as f: @@ -40,7 +40,7 @@ def loadKeywords( name ): return kw_list - + class EclFileTest(ExtendedTestCase): @@ -50,7 +50,7 @@ def assertFileType(self , filename , expected): self.assertEqual( fmt_file , expected[1] ) self.assertEqual( step , expected[2] ) - + def test_file_type(self): self.assertFileType( "ECLIPSE.UNRST" , (EclFileEnum.ECL_UNIFIED_RESTART_FILE , False , None)) self.assertFileType( "ECLIPSE.X0030" , (EclFileEnum.ECL_RESTART_FILE , False , 30 )) @@ -59,7 +59,7 @@ def test_file_type(self): self.assertFileType( "ECLIPSE.A0010" , (EclFileEnum.ECL_SUMMARY_FILE , True , 10 )) self.assertFileType( "ECLIPSE.EGRID" , (EclFileEnum.ECL_EGRID_FILE , False , None )) - + def test_IOError(self): with self.assertRaises(IOError): EclFile("No/Does/not/exist") @@ -67,8 +67,8 @@ def test_IOError(self): def test_context( self ): with TestAreaContext("python/ecl_file/context"): - kw1 = EclKW.create( "KW1" , 100 , EclTypeEnum.ECL_INT_TYPE) - kw2 = EclKW.create( "KW2" , 100 , EclTypeEnum.ECL_INT_TYPE) + kw1 = EclKW( "KW1" , 100 , EclDataType.ECL_INT) + kw2 = EclKW( "KW2" , 100 , EclDataType.ECL_INT) with openFortIO("TEST" , mode = FortIO.WRITE_MODE) as f: kw1.fwrite( f ) kw2.fwrite( f ) @@ -77,13 +77,14 @@ def test_context( self ): self.assertEqual( len(ecl_file) , 2 ) self.assertTrue( ecl_file.has_kw("KW1")) self.assertTrue( ecl_file.has_kw("KW2")) + self.assertEqual(ecl_file[1], ecl_file[-1]) + + - - def test_gc(self): - kw1 = EclKW("KW1" , 100 , EclTypeEnum.ECL_INT_TYPE) - kw2 = EclKW("KW2" , 100 , EclTypeEnum.ECL_INT_TYPE) - kw3 = EclKW("KW3" , 100 , EclTypeEnum.ECL_INT_TYPE) + kw1 = EclKW("KW1" , 100 , EclDataType.ECL_INT) + kw2 = EclKW("KW2" , 100 , EclDataType.ECL_INT) + kw3 = EclKW("KW3" , 100 , EclDataType.ECL_INT) for i in range(len(kw1)): kw1[i] = i @@ -91,50 +92,58 @@ def test_gc(self): kw3[i] = 3*i kw_list = [kw1 , kw2 , kw2] - + with TestAreaContext("context") as ta: createFile("TEST" , kw_list ) - gc.collect() + gc.collect() kw_list2 = loadKeywords( "TEST" ) for kw1,kw2 in zip(kw_list,kw_list2): self.assertEqual( kw1, kw2 ) - + def test_block_view(self): with TestAreaContext("python/ecl_file/view"): with openFortIO("TEST" , mode = FortIO.WRITE_MODE) as f: for i in range(5): - header = EclKW("HEADER" , 1 , EclTypeEnum.ECL_INT_TYPE ) + header = EclKW("HEADER" , 1 , EclDataType.ECL_INT ) header[0] = i - - data1 = EclKW("DATA1" , 100 , EclTypeEnum.ECL_INT_TYPE ) + + data1 = EclKW("DATA1" , 100 , EclDataType.ECL_INT ) data1.assign( i ) - data2 = EclKW("DATA2" , 100 , EclTypeEnum.ECL_INT_TYPE ) + data2 = EclKW("DATA2" , 100 , EclDataType.ECL_INT ) data2.assign( i*10 ) header.fwrite( f ) data1.fwrite( f ) data2.fwrite( f ) - + ecl_file = EclFile("TEST") + pfx = 'EclFile(' + self.assertEqual(pfx, repr(ecl_file)[:len(pfx)]) with self.assertRaises(KeyError): ecl_file.blockView("NO" , 1) with self.assertRaises(IndexError): ecl_file.blockView("HEADER" , 100) + with self.assertRaises(IndexError): + ecl_file.blockView("HEADER" , 1000) + + bv = ecl_file.blockView("HEADER" , -1) + + for i in range(5): view = ecl_file.blockView("HEADER" , i) self.assertEqual( len(view) , 3) header = view["HEADER"][0] data1 = view["DATA1"][0] data2 = view["DATA2"][0] - + self.assertEqual( header[0] , i ) self.assertEqual( data1[99] , i ) self.assertEqual( data2[99] , i*10 ) @@ -145,7 +154,7 @@ def test_block_view(self): self.assertEqual( len(view) , 2) header = view["HEADER"][0] data1 = view["DATA1"][0] - + self.assertEqual( header[0] , i ) self.assertEqual( data1[99] , i ) @@ -159,4 +168,3 @@ def test_block_view(self): #self.assertTrue( "HEADER" in view ) #self.assertTrue( "DATA1" in view ) #self.assertFalse( "DATA2" in view ) - diff --git a/ThirdParty/Ert/python/tests/ecl/test_ecl_file_statoil.py b/ThirdParty/Ert/python/tests/ecl/test_ecl_file_statoil.py new file mode 100644 index 0000000000..5d13e0f913 --- /dev/null +++ b/ThirdParty/Ert/python/tests/ecl/test_ecl_file_statoil.py @@ -0,0 +1,258 @@ +#!/usr/bin/env python +# Copyright (C) 2011 Statoil ASA, Norway. +# +# The file 'sum_test.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. +import datetime +import os.path +from unittest import skipIf + +from ecl.ecl import EclFile, FortIO, EclKW , openFortIO , openEclFile +from ecl.ecl import EclFileFlagEnum, EclFileEnum + +from ecl.test import ExtendedTestCase , TestAreaContext + + + + +class EclFileStatoilTest(ExtendedTestCase): + def setUp(self): + self.test_file = self.createTestPath("Statoil/ECLIPSE/Gurbat/ECLIPSE.UNRST") + self.test_fmt_file = self.createTestPath("Statoil/ECLIPSE/Gurbat/ECLIPSE.FUNRST") + + def assertFileType(self , filename , expected): + file_type , step , fmt_file = EclFile.getFileType(filename) + self.assertEqual( file_type , expected[0] ) + self.assertEqual( fmt_file , expected[1] ) + self.assertEqual( step , expected[2] ) + + + + def test_restart_days(self): + rst_file = EclFile( self.test_file ) + self.assertAlmostEqual( 0.0 , rst_file.iget_restart_sim_days(0) ) + self.assertAlmostEqual( 31.0 , rst_file.iget_restart_sim_days(1) ) + self.assertAlmostEqual( 274.0 , rst_file.iget_restart_sim_days(10) ) + + with self.assertRaises(KeyError): + rst_file.restart_get_kw("Missing" , dtime = datetime.date( 2004,1,1)) + + with self.assertRaises(IndexError): + rst_file.restart_get_kw("SWAT" , dtime = datetime.date( 1985 , 1 , 1)) + + + + def test_iget_named(self): + f = EclFile(self.test_file) + N = f.num_named_kw( "SWAT" ) + with self.assertRaises(IndexError): + s = f.iget_named_kw( "SWAT" , N + 1) + + + + def test_fwrite( self ): + #work_area = TestArea("python/ecl_file/fwrite") + with TestAreaContext("python/ecl_file/fwrite"): + rst_file = EclFile(self.test_file) + fortio = FortIO("ECLIPSE.UNRST", FortIO.WRITE_MODE) + rst_file.fwrite(fortio) + fortio.close() + rst_file.close() + self.assertFilesAreEqual("ECLIPSE.UNRST", self.test_file) + + + + + @skipIf(ExtendedTestCase.slowTestShouldNotRun(), "Slow file test skipped!") + def test_save(self): + #work_area = TestArea("python/ecl_file/save") + with TestAreaContext("python/ecl_file/save", store_area=False) as work_area: + work_area.copy_file(self.test_file) + rst_file = EclFile("ECLIPSE.UNRST", flags=EclFileFlagEnum.ECL_FILE_WRITABLE) + swat0 = rst_file["SWAT"][0] + swat0.assign(0.75) + rst_file.save_kw(swat0) + rst_file.close() + self.assertFilesAreNotEqual("ECLIPSE.UNRST",self.test_file) + + rst_file1 = EclFile(self.test_file) + rst_file2 = EclFile("ECLIPSE.UNRST", flags=EclFileFlagEnum.ECL_FILE_WRITABLE) + + swat1 = rst_file1["SWAT"][0] + swat2 = rst_file2["SWAT"][0] + swat2.assign(swat1) + + rst_file2.save_kw(swat2) + self.assertTrue(swat1.equal(swat2)) + rst_file1.close() + rst_file2.close() + + # Random failure .... + self.assertFilesAreEqual("ECLIPSE.UNRST", self.test_file) + + + + @skipIf(ExtendedTestCase.slowTestShouldNotRun(), "Slow file test skipped!") + def test_save_fmt(self): + #work_area = TestArea("python/ecl_file/save_fmt") + with TestAreaContext("python/ecl_file/save_fmt") as work_area: + work_area.copy_file(self.test_fmt_file) + rst_file = EclFile("ECLIPSE.FUNRST", flags=EclFileFlagEnum.ECL_FILE_WRITABLE) + swat0 = rst_file["SWAT"][0] + swat0.assign(0.75) + rst_file.save_kw(swat0) + rst_file.close() + self.assertFilesAreNotEqual("ECLIPSE.FUNRST", self.test_fmt_file) + + rst_file1 = EclFile(self.test_fmt_file) + rst_file2 = EclFile("ECLIPSE.FUNRST", flags=EclFileFlagEnum.ECL_FILE_WRITABLE) + + swat1 = rst_file1["SWAT"][0] + swat2 = rst_file2["SWAT"][0] + + swat2.assign(swat1) + rst_file2.save_kw(swat2) + self.assertTrue(swat1.equal(swat2)) + rst_file1.close() + rst_file2.close() + + # Random failure .... + self.assertFilesAreEqual("ECLIPSE.FUNRST", self.test_fmt_file) + + + def test_truncated(self): + with TestAreaContext("python/ecl_file/truncated") as work_area: + work_area.copy_file(self.test_file) + size = os.path.getsize("ECLIPSE.UNRST") + with open("ECLIPSE.UNRST" , "r+") as f: + f.truncate( size / 2 ) + + with self.assertRaises(IOError): + rst_file = EclFile("ECLIPSE.UNRST") + + with self.assertRaises(IOError): + rst_file = EclFile("ECLIPSE.UNRST", flags=EclFileFlagEnum.ECL_FILE_WRITABLE) + + def test_restart_view(self): + f = EclFile( self.test_file ) + with self.assertRaises(ValueError): + v = f.restartView( ) + + v = f.restartView( sim_days = 274 ) + v = f.restartView( sim_time = datetime.date( 2004,1,1) ) + v = f.restartView( report_step = 30 ) + v = f.restartView( seqnum_index = 30 ) + + def test_ix_case(self): + f = EclFile( self.createTestPath( "Statoil/ECLIPSE/ix/summary/Create_Region_Around_Well.SMSPEC")) + + # Keywords + self.assertTrue( "KEYWORDS" in f ) + keywords_loaded = list(f["KEYWORDS"][0]) + keywords_from_file = [ + 'TIME', 'YEARS', 'AAQR', 'AAQT', 'AAQP', 'AAQR', 'AAQT', + 'AAQP', 'AAQR', 'AAQT', 'AAQP', 'FPPW', 'FPPO', 'FPPG', 'FNQT', + 'FNQR', 'FEIP', 'FWPT', 'FWIT', 'FWIP', 'FWGR', 'FVPT', 'FVPR', + 'FVIT', 'FVIR', 'FPR', 'FOPT', 'FOIT', 'FOIR', 'FOIPL', + 'FOIPG', 'FOIP', 'FGPT', 'FGIT', 'FGIPL', 'FGIPG', 'FGIP', + 'FAQT', 'FAQR', 'FGOR', 'FWCT', 'FGSR', 'FGIR', 'FGPR', 'FWIR', + 'FWPR', 'FOPR', 'MEMORYTS', 'NAIMFRAC', 'TCPUDAY', 'TCPUTS', + 'NBAKFL', 'NNUMST', 'NNUMFL', 'NEWTFL', 'MSUMNEWT', 'MSUMLINS', + 'MLINEARS', 'NLINEARS', 'NEWTON', 'ELAPSED', 'TCPU', + 'TIMESTEP', 'GOPR', 'GOPR', 'GOPR', 'GWPR', 'GWPR', 'GWPR', + 'GWIR', 'GWIR', 'GWIR', 'GGPR', 'GGPR', 'GGPR', 'GWCT', 'GWCT', + 'GWCT', 'GGOR', 'GGOR', 'GGOR', 'GGIR', 'GGIR', 'GGIR', 'GGIT', + 'GGIT', 'GGIT', 'GGPT', 'GGPT', 'GGPT', 'GOIR', 'GOIR', 'GOIR', + 'GOIT', 'GOIT', 'GOIT', 'GOPT', 'GOPT', 'GOPT', 'GVIR', 'GVIR', + 'GVIR', 'GVIT', 'GVIT', 'GVIT', 'GVPR', 'GVPR', 'GVPR', 'GVPT', + 'GVPT', 'GVPT', 'GWGR', 'GWGR', 'GWGR', 'GWIT', 'GWIT', 'GWIT', + 'GWPT', 'GWPT', 'GWPT', 'WOPR', 'WOPR', 'WOPR', 'WOPR', 'WOPR', + 'WOPR', 'WWPR', 'WWPR', 'WWPR', 'WWPR', 'WWPR', 'WWPR', 'WWIR', + 'WWIR', 'WWIR', 'WWIR', 'WWIR', 'WWIR', 'WGPR', 'WGPR', 'WGPR', + 'WGPR', 'WGPR', 'WGPR', 'WWCT', 'WWCT', 'WWCT', 'WWCT', 'WWCT', + 'WWCT', 'WMCTL', 'WMCTL', 'WMCTL', 'WMCTL', 'WMCTL', 'WMCTL', + 'WGOR', 'WGOR', 'WGOR', 'WGOR', 'WGOR', 'WGOR', 'WAPI', 'WAPI', + 'WAPI', 'WAPI', 'WAPI', 'WAPI', 'WBHP', 'WBHP', 'WBHP', 'WBHP', + 'WBHP', 'WBHP', 'WGIR', 'WGIR', 'WGIR', 'WGIR', 'WGIR', 'WGIR', + 'WGIT', 'WGIT', 'WGIT', 'WGIT', 'WGIT', 'WGIT', 'WGPT', 'WGPT', + 'WGPT', 'WGPT', 'WGPT', 'WGPT', 'WOIR', 'WOIR', 'WOIR', 'WOIR', + 'WOIR', 'WOIR', 'WOIT', 'WOIT', 'WOIT', 'WOIT', 'WOIT', 'WOIT', + 'WOPT', 'WOPT', 'WOPT', 'WOPT', 'WOPT', 'WOPT', 'WPIG', 'WPIG', + 'WPIG', 'WPIG', 'WPIG', 'WPIG', 'WPIO', 'WPIO', 'WPIO', 'WPIO', + 'WPIO', 'WPIO', 'WPIW', 'WPIW', 'WPIW', 'WPIW', 'WPIW', 'WPIW', + 'WTHP', 'WTHP', 'WTHP', 'WTHP', 'WTHP', 'WTHP', 'WVIR', 'WVIR', + 'WVIR', 'WVIR', 'WVIR', 'WVIR', 'WVIT', 'WVIT', 'WVIT', 'WVIT', + 'WVIT', 'WVIT', 'WVPR', 'WVPR', 'WVPR', 'WVPR', 'WVPR', 'WVPR', + 'WVPT', 'WVPT', 'WVPT', 'WVPT', 'WVPT', 'WVPT', 'WWGR', 'WWGR', + 'WWGR', 'WWGR', 'WWGR', 'WWGR', 'WWIT', 'WWIT', 'WWIT', 'WWIT', + 'WWIT', 'WWIT', 'WWPT', 'WWPT', 'WWPT', 'WWPT', 'WWPT', 'WWPT', + 'WBHT', 'WBHT', 'WBHT', 'WBHT', 'WBHT', 'WBHT', 'WBP', 'WBP', + 'WBP', 'WBP', 'WBP', 'WBP', 'WWCT', 'WWCT', 'WWCT', 'WWCT', + 'WWCT', 'WWCT', 'WWCT', 'WWCT', 'WWCT', 'WWCT', 'WWCT', 'WWCT', + 'WWCT', 'WWCT', 'WWCT', 'WWCT', 'WWCT', 'WWCT', 'WWCT', 'WWCT', + 'WWCT', 'WWCT', 'WWCT', 'WWCT', 'WWCT', 'WWCT', 'WWCT', 'WWCT' + ] + + padd = lambda str_len : (lambda s : s + (" " * (max(0, str_len-len(s))))) + self.assertEqual(map(padd(8), keywords_from_file), keywords_loaded) + + # Names + self.assertTrue( "NAMES" in f ) + names_loaded = list(f["NAMES"][0]) + names_from_file = [ + '', '', 'AQFR_1', 'AQFR_1', 'AQFR_1', 'AQFR_2', 'AQFR_2', + 'AQFR_2', 'AQFR_3', 'AQFR_3', 'AQFR_3', 'FIELD', 'FIELD', + 'FIELD', 'FIELD', 'FIELD', 'FIELD', 'FIELD', 'FIELD', 'FIELD', + 'FIELD', 'FIELD', 'FIELD', 'FIELD', 'FIELD', 'FIELD', 'FIELD', + 'FIELD', 'FIELD', 'FIELD', 'FIELD', 'FIELD', 'FIELD', 'FIELD', + 'FIELD', 'FIELD', 'FIELD', 'FIELD', 'FIELD', 'FIELD', 'FIELD', + 'FIELD', 'FIELD', 'FIELD', 'FIELD', 'FIELD', 'FIELD', 'FIELD', + 'FIELD', 'FIELD', 'FIELD', 'FIELD', 'FIELD', 'FIELD', 'FIELD', + 'FIELD', 'FIELD', 'FIELD', 'FIELD', 'FIELD', 'FIELD', 'FIELD', + 'FIELD', 'ONE', 'TWO', 'FIELD', 'ONE', 'TWO', 'FIELD', 'ONE', + 'TWO', 'FIELD', 'ONE', 'TWO', 'FIELD', 'ONE', 'TWO', 'FIELD', + 'ONE', 'TWO', 'FIELD', 'ONE', 'TWO', 'FIELD', 'ONE', 'TWO', + 'FIELD', 'ONE', 'TWO', 'FIELD', 'ONE', 'TWO', 'FIELD', 'ONE', + 'TWO', 'FIELD', 'ONE', 'TWO', 'FIELD', 'ONE', 'TWO', 'FIELD', + 'ONE', 'TWO', 'FIELD', 'ONE', 'TWO', 'FIELD', 'ONE', 'TWO', + 'FIELD', 'ONE', 'TWO', 'FIELD', 'ONE', 'TWO', 'FIELD', 'ONE', + 'TWO', 'FIELD', 'HWELL_PROD', 'GI', 'I2', 'I4', 'I6', 'I8', + 'HWELL_PROD', 'GI', 'I2', 'I4', 'I6', 'I8', 'HWELL_PROD', 'GI', + 'I2', 'I4', 'I6', 'I8', 'HWELL_PROD', 'GI', 'I2', 'I4', 'I6', + 'I8', 'HWELL_PROD', 'GI', 'I2', 'I4', 'I6', 'I8', 'HWELL_PROD', + 'GI', 'I2', 'I4', 'I6', 'I8', 'HWELL_PROD', 'GI', 'I2', 'I4', + 'I6', 'I8', 'HWELL_PROD', 'GI', 'I2', 'I4', 'I6', 'I8', + 'HWELL_PROD', 'GI', 'I2', 'I4', 'I6', 'I8', 'HWELL_PROD', 'GI', + 'I2', 'I4', 'I6', 'I8', 'HWELL_PROD', 'GI', 'I2', 'I4', 'I6', + 'I8', 'HWELL_PROD', 'GI', 'I2', 'I4', 'I6', 'I8', 'HWELL_PROD', + 'GI', 'I2', 'I4', 'I6', 'I8', 'HWELL_PROD', 'GI', 'I2', 'I4', + 'I6', 'I8', 'HWELL_PROD', 'GI', 'I2', 'I4', 'I6', 'I8', + 'HWELL_PROD', 'GI', 'I2', 'I4', 'I6', 'I8', 'HWELL_PROD', 'GI', + 'I2', 'I4', 'I6', 'I8', 'HWELL_PROD', 'GI', 'I2', 'I4', 'I6', + 'I8', 'HWELL_PROD', 'GI', 'I2', 'I4', 'I6', 'I8', 'HWELL_PROD', + 'GI', 'I2', 'I4', 'I6', 'I8', 'HWELL_PROD', 'GI', 'I2', 'I4', + 'I6', 'I8', 'HWELL_PROD', 'GI', 'I2', 'I4', 'I6', 'I8', + 'HWELL_PROD', 'GI', 'I2', 'I4', 'I6', 'I8', 'HWELL_PROD', 'GI', + 'I2', 'I4', 'I6', 'I8', 'HWELL_PROD', 'GI', 'I2', 'I4', 'I6', + 'I8', 'HWELL_PROD', 'GI', 'I2', 'I4', 'I6', 'I8', 'HWELL_PROD', + 'GI', 'I2', 'I4', 'I6', 'I8', 'HWELL_PROD', 'GI', 'I2', 'I4', + 'I6', 'I8', ':+:+:+:+', ':+:+:+:+', ':+:+:+:+', ':+:+:+:+', + ':+:+:+:+', ':+:+:+:+', ':+:+:+:+', ':+:+:+:+', ':+:+:+:+', + ':+:+:+:+', ':+:+:+:+', ':+:+:+:+', ':+:+:+:+', ':+:+:+:+', + ':+:+:+:+', ':+:+:+:+', ':+:+:+:+', ':+:+:+:+', ':+:+:+:+', + ':+:+:+:+', ':+:+:+:+', ':+:+:+:+', ':+:+:+:+', ':+:+:+:+', + ':+:+:+:+', ':+:+:+:+', ':+:+:+:+', ':+:+:+:+' + ] + + self.assertEqual(map(padd(10), names_from_file), names_loaded) diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_ecl_init_file.py b/ThirdParty/Ert/python/tests/ecl/test_ecl_init_file.py similarity index 91% rename from ThirdParty/Ert/python/tests/core/ecl/test_ecl_init_file.py rename to ThirdParty/Ert/python/tests/ecl/test_ecl_init_file.py index 0e34c180a7..703be6be23 100644 --- a/ThirdParty/Ert/python/tests/core/ecl/test_ecl_init_file.py +++ b/ThirdParty/Ert/python/tests/ecl/test_ecl_init_file.py @@ -15,8 +15,8 @@ # for more details. -from ert.test import ExtendedTestCase -from ert.ecl import Ecl3DKW , EclKW, EclTypeEnum, EclInitFile , EclFile, FortIO, EclFileFlagEnum , EclGrid +from ecl.test import ExtendedTestCase +from ecl.ecl import Ecl3DKW , EclKW, EclInitFile , EclFile, FortIO, EclFileFlagEnum , EclGrid class InitFileTest(ExtendedTestCase): def setUp(self): diff --git a/ThirdParty/Ert/python/tests/ecl/test_ecl_kw.py b/ThirdParty/Ert/python/tests/ecl/test_ecl_kw.py new file mode 100644 index 0000000000..5079b06dbe --- /dev/null +++ b/ThirdParty/Ert/python/tests/ecl/test_ecl_kw.py @@ -0,0 +1,456 @@ +#!/usr/bin/env python +# Copyright (C) 2011 Statoil ASA, Norway. +# +# The file 'test_kw.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. +import os +import random +import numpy +import warnings + +from ecl.ecl import EclKW, EclDataType, EclTypeEnum, EclFile, FortIO, EclFileFlagEnum , openFortIO + +from ecl.test import ExtendedTestCase , TestAreaContext + + +def copy_long(): + src = EclKW("NAME", 100, EclDataType.ECL_FLOAT) + copy = src.sub_copy(0, 2000) + + +def copy_offset(): + src = EclKW("NAME", 100, EclDataType.ECL_FLOAT) + copy = src.sub_copy(200, 100) + + +class KWTest(ExtendedTestCase): + + def test_min_max(self): + kw = EclKW("TEST", 3, EclDataType.ECL_INT) + kw[0] = 10 + kw[1] = 5 + kw[2] = 0 + + self.assertEqual( 10 , kw.getMax()) + self.assertEqual( 0 , kw.getMin()) + self.assertEqual( (0,10) , kw.getMinMax()) + + + def test_deprecated_datatypes(self): + with warnings.catch_warnings(record=True) as w: + warnings.simplefilter("always") + kw = EclKW("Test", 10, EclTypeEnum.ECL_INT_TYPE) + self.assertTrue(len(w) > 0) + self.assertTrue(issubclass(w[-1].category, DeprecationWarning)) + + with warnings.catch_warnings(record=True) as w: + warnings.simplefilter("always") + kw = EclKW("Test", 10, EclDataType.ECL_INT) + self.assertTrue(len(w) == 0) + + self.assertEqual(EclTypeEnum.ECL_INT_TYPE, kw.type) + + self.assertTrue(len(w) > 0) + self.assertTrue(issubclass(w[-1].category, DeprecationWarning)) + + def kw_test( self, data_type, data, fmt ): + name1 = "file1.txt" + name2 = "file2.txt" + kw = EclKW("TEST", len(data), data_type) + i = 0 + for d in data: + kw[i] = d + i += 1 + + file1 = open(name1, "w") + kw.fprintf_data(file1, fmt) + file1.close() + + file2 = open(name2, "w") + for d in data: + file2.write(fmt % d) + file2.close() + self.assertFilesAreEqual(name1, name2) + self.assertEqual( kw.data_type , data_type ) + + def test_create(self): + with self.assertRaises(ValueError): + EclKW( "ToGodDamnLong" , 100 , EclDataType.ECL_CHAR ) + + def test_sum( self ): + for ecl_type in [EclDataType.ECL_CHAR, EclDataType.ECL_STRING(42)]: + kw_string = EclKW("STRING", 100, ecl_type) + with self.assertRaises(ValueError): + kw_string.sum() + + kw_int = EclKW( "INT" , 4 , EclDataType.ECL_INT ) + kw_int[0] = 1 + kw_int[1] = 2 + kw_int[2] = 3 + kw_int[3] = 4 + self.assertEqual( kw_int.sum() , 10 ) + + kw_d = EclKW( "D" , 4 , EclDataType.ECL_DOUBLE ) + kw_d[0] = 1 + kw_d[1] = 2 + kw_d[2] = 3 + kw_d[3] = 4 + self.assertEqual( kw_d.sum() , 10 ) + + kw_f = EclKW( "F" , 4 , EclDataType.ECL_FLOAT ) + kw_f[0] = 1 + kw_f[1] = 2 + kw_f[2] = 3 + kw_f[3] = 4 + self.assertEqual( kw_f.sum() , 10 ) + + kw_b = EclKW( "F" , 4 , EclDataType.ECL_BOOL ) + kw_b[0] = False + kw_b[1] = True + kw_b[2] = False + kw_b[3] = True + self.assertEqual( kw_b.sum() , 2 ) + + + + def test_fprintf( self ): + with TestAreaContext("python.ecl_kw"): + self.kw_test(EclDataType.ECL_INT, [0, 1, 2, 3, 4, 5], "%4d\n") + self.kw_test(EclDataType.ECL_FLOAT, [0.0, 1.1, 2.2, 3.3, 4.4, 5.5], "%12.6f\n") + self.kw_test(EclDataType.ECL_DOUBLE, [0.0, 1.1, 2.2, 3.3, 4.4, 5.5], "%12.6f\n") + self.kw_test(EclDataType.ECL_BOOL, [True, True, True, False, True], "%4d\n") + self.kw_test(EclDataType.ECL_CHAR, ["1", "22", "4444", "666666", "88888888"], "%-8s\n") + + for str_len in range(1000): + self.kw_test(EclDataType.ECL_STRING(str_len), [str(i)*str_len for i in range(10)], "%s\n") + + def test_kw_write(self): + with TestAreaContext("python/ecl_kw/writing"): + + data = [random.random() for i in range(10000)] + + kw = EclKW("TEST", len(data), EclDataType.ECL_DOUBLE) + i = 0 + for d in data: + kw[i] = d + i += 1 + + pfx = 'EclKW(' + self.assertEqual(pfx, repr(kw)[:len(pfx)]) + + fortio = FortIO("ECL_KW_TEST", FortIO.WRITE_MODE) + kw.fwrite(fortio) + fortio.close() + + fortio = FortIO("ECL_KW_TEST") + + kw2 = EclKW.fread(fortio) + + self.assertTrue(kw.equal(kw2)) + + ecl_file = EclFile("ECL_KW_TEST", flags=EclFileFlagEnum.ECL_FILE_WRITABLE) + kw3 = ecl_file["TEST"][0] + self.assertTrue(kw.equal(kw3)) + ecl_file.save_kw(kw3) + ecl_file.close() + + fortio = FortIO("ECL_KW_TEST", FortIO.READ_AND_WRITE_MODE) + kw4 = EclKW.fread(fortio) + self.assertTrue(kw.equal(kw4)) + fortio.seek(0) + kw4.fwrite(fortio) + fortio.close() + + ecl_file = EclFile("ECL_KW_TEST") + kw5 = ecl_file["TEST"][0] + self.assertTrue(kw.equal(kw5)) + + + + def test_fprintf_data(self): + with TestAreaContext("kw_no_header"): + kw = EclKW("REGIONS" , 10 , EclDataType.ECL_INT) + for i in range(len(kw)): + kw[i] = i + + fileH = open("test" , "w") + kw.fprintf_data( fileH ) + fileH.close() + + fileH = open("test" , "r") + data = [] + for line in fileH.readlines(): + tmp = line.split() + for elm in tmp: + data.append( int(elm) ) + + for (v1,v2) in zip(data,kw): + self.assertEqual(v1,v2) + + + def test_sliced_set(self): + kw = EclKW("REGIONS" , 10 , EclDataType.ECL_INT) + kw.assign(99) + kw[0:5] = 66 + self.assertEqual(kw[0] , 66) + self.assertEqual(kw[4] , 66) + self.assertEqual(kw[5] , 99) + + + def test_long_name(self): + with self.assertRaises(ValueError): + EclKW("LONGLONGNAME" , 10 , EclDataType.ECL_INT) + + kw = EclKW("REGIONS" , 10 , EclDataType.ECL_INT) + with self.assertRaises(ValueError): + kw.setName("LONGLONGNAME") + + + def test_abs(self): + for ecl_type in [ + EclDataType.ECL_CHAR, + EclDataType.ECL_BOOL, + EclDataType.ECL_STRING(32) + ]: + kw = EclKW("NAME" , 10 , ecl_type) + with self.assertRaises(TypeError): + abs_kw = abs(kw) + + kw = EclKW("NAME" , 10 , EclDataType.ECL_INT) + for i in range(len(kw)): + kw[i] = -i + + abs_kw = abs(kw) + for i in range(len(kw)): + self.assertEqual(kw[i] , -i ) + self.assertEqual(abs_kw[i] , i ) + + + def test_fmt(self): + kw1 = EclKW( "NAME1" , 100 , EclDataType.ECL_INT) + kw2 = EclKW( "NAME2" , 100 , EclDataType.ECL_INT) + + for i in range(len(kw1)): + kw1[i] = i + 1 + kw2[i] = len(kw1) - kw1[i] + + with TestAreaContext("ecl_kw/fmt") as ta: + with openFortIO( "TEST.FINIT" , FortIO.WRITE_MODE , fmt_file = True ) as f: + kw1.fwrite( f ) + kw2.fwrite( f ) + + with openFortIO( "TEST.FINIT" , fmt_file = True ) as f: + kw1b = EclKW.fread( f ) + kw2b = EclKW.fread( f ) + + self.assertTrue( kw1 == kw1b ) + self.assertTrue( kw2 == kw2b ) + + f = EclFile( "TEST.FINIT" ) + self.assertTrue( kw1 == f[0] ) + self.assertTrue( kw2 == f[1] ) + + + def test_first_different(self): + kw1 = EclKW( "NAME1" , 100 , EclDataType.ECL_INT) + kw2 = EclKW( "NAME2" , 100 , EclDataType.ECL_INT) + kw3 = EclKW( "NAME2" , 200 , EclDataType.ECL_INT) + kw4 = EclKW( "NAME2" , 100 , EclDataType.ECL_FLOAT) + kw5 = EclKW( "NAME2" , 100 , EclDataType.ECL_FLOAT) + + + with self.assertRaises( IndexError ): + EclKW.firstDifferent( kw1 , kw2 , offset = 100 ) + + with self.assertRaises( ValueError ): + EclKW.firstDifferent( kw1 , kw3 ) + + with self.assertRaises( TypeError ): + EclKW.firstDifferent( kw1 , kw4 ) + + + with self.assertRaises( IndexError ): + kw1.firstDifferent( kw2 , offset = 100 ) + + with self.assertRaises( ValueError ): + kw1.firstDifferent( kw3 ) + + with self.assertRaises( TypeError ): + kw1.firstDifferent( kw4 ) + + + kw1.assign( 1 ) + kw2.assign( 1 ) + + self.assertEqual( kw1.firstDifferent( kw2 ) , len(kw1)) + + kw1[0] = 100 + self.assertEqual( kw1.firstDifferent( kw2 ) , 0) + self.assertEqual( kw1.firstDifferent( kw2 , offset = 1) , len(kw1)) + kw1[10] = 100 + self.assertEqual( kw1.firstDifferent( kw2 , offset = 1) , 10) + + + kw4.assign( 1.0 ) + kw5.assign( 1.0 ) + self.assertEqual( kw4.firstDifferent( kw5 ) , len(kw4)) + + kw4[10] *= 1.0001 + self.assertEqual( kw4.firstDifferent( kw5 ) , 10) + + self.assertEqual( kw4.firstDifferent( kw5 , epsilon = 1.0) , len(kw4)) + self.assertEqual( kw4.firstDifferent( kw5 , epsilon = 0.0000001) , 10) + + + def test_numeric_equal(self): + kw1 = EclKW("Name1" , 10 , EclDataType.ECL_DOUBLE ) + kw2 = EclKW("Name1" , 10 , EclDataType.ECL_DOUBLE ) + + + shift = 0.0001 + value = 1000 + + abs_diff = shift + rel_diff = shift / (shift + 2* value) + kw1.assign( value ) + kw2.assign( value + shift ) + + + self.assertTrue( kw1.equal_numeric( kw2 , abs_epsilon = abs_diff * 1.1 , rel_epsilon = rel_diff * 1.1)) + self.assertFalse( kw1.equal_numeric( kw2 , abs_epsilon = abs_diff * 1.1 , rel_epsilon = rel_diff * 0.9)) + self.assertFalse( kw1.equal_numeric( kw2 , abs_epsilon = abs_diff * 0.9 , rel_epsilon = rel_diff * 1.1)) + self.assertTrue( kw1.equal_numeric( kw2 , abs_epsilon = 0 , rel_epsilon = rel_diff * 1.1)) + self.assertTrue( kw1.equal_numeric( kw2 , abs_epsilon = abs_diff * 1.1 , rel_epsilon = 0)) + + def test_mul(self): + kw1 = EclKW("Name1" , 10 , EclDataType.ECL_INT ) + kw1.assign( 10 ) + + kw2 = EclKW("Name1" , 10 , EclDataType.ECL_INT ) + kw2.assign( 2 ) + + kw3 = kw1 * kw2 + kw4 = kw1 + kw2 + self.assertEqual( len(kw3) , len(kw1)) + self.assertEqual( len(kw4) , len(kw1)) + for v in kw3: + self.assertEqual( v , 20 ) + + for v in kw4: + self.assertEqual( v , 12 ) + + + def test_numpy(self): + kw1 = EclKW("DOUBLE", 10, EclDataType.ECL_DOUBLE ) + + view = kw1.numpyView( ) + copy = kw1.numpyCopy( ) + + self.assertTrue( copy[ 0 ] == kw1[ 0 ] ) + self.assertTrue( view[ 0 ] == kw1[ 0 ] ) + + kw1[ 0 ] += 1 + self.assertTrue( view[ 0 ] == kw1[ 0 ] ) + self.assertTrue( copy[ 0 ] == kw1[ 0 ] - 1) + + for ecl_type in [ + EclDataType.ECL_CHAR, + EclDataType.ECL_BOOL, + EclDataType.ECL_STRING(19)]: + kw2 = EclKW("TEST_KW", 10, ecl_type) + with self.assertRaises(ValueError): + kw2.numpyView() + + def test_slice(self): + N = 100 + kw = EclKW("KW" , N , EclDataType.ECL_INT) + for i in range(len(kw)): + kw[i] = i + + even = kw[0:len(kw):2] + odd = kw[1:len(kw):2] + + self.assertEqual( len(even) , N/2 ) + self.assertEqual( len(odd) , N/2 ) + + for i in range(len(even)): + self.assertEqual(even[i] , 2*i) + self.assertEqual(odd[i] , 2*i + 1) + + + def test_resize(self): + N = 4 + kw = EclKW("KW" , N , EclDataType.ECL_INT) + for i in range(N): + kw[i] = i + + kw.resize( 2*N ) + self.assertEqual( len(kw) , 2*N ) + for i in range(N): + self.assertEqual( kw[i] , i ) + + kw.resize( N/2 ) + self.assertEqual( len(kw) , N/2 ) + for i in range(N/2): + self.assertEqual( kw[i] , i ) + + + def test_typename(self): + kw = EclKW("KW" , 100 , EclDataType.ECL_INT) + + self.assertEqual( kw.typeName( ) , "INTE") + + def test_string_alloc(self): + kw = EclKW("KW" , 10, EclDataType.ECL_STRING(30)) + + for i in range(10): + kw[i] = str(i)*30 + + for i in range(10): + self.assertEqual(str(i)*30, kw[i]) + + def test_string_write_read_unformatted(self): + for str_len in range(1000): + with TestAreaContext("my_space"): + + kw = EclKW("TEST_KW" , 10, EclDataType.ECL_STRING(str_len)) + for i in range(10): + kw[i] = str(i)*str_len + + file_name = "ecl_kw_test" + + with openFortIO(file_name, mode=FortIO.WRITE_MODE) as fortio: + kw.fwrite(fortio) + + with openFortIO(file_name) as fortio: + loaded_kw = EclKW.fread(fortio) + + self.assertEqual(kw, loaded_kw) + + def test_string_write_read_formatted(self): + for str_len in range(1000): + with TestAreaContext("my_space"): + + kw = EclKW("TEST_KW" , 10, EclDataType.ECL_STRING(str_len)) + for i in range(10): + kw[i] = str(i)*str_len + + file_name = "ecl_kw_test" + with openFortIO(file_name, mode=FortIO.WRITE_MODE, fmt_file=True) as fortio: + kw.fwrite(fortio) + + with openFortIO(file_name, fmt_file=True) as fortio: + loaded_kw = EclKW.fread(fortio) + + self.assertEqual(kw, loaded_kw) diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_ecl_kw_statoil.py b/ThirdParty/Ert/python/tests/ecl/test_ecl_kw_statoil.py similarity index 83% rename from ThirdParty/Ert/python/tests/core/ecl/test_ecl_kw_statoil.py rename to ThirdParty/Ert/python/tests/ecl/test_ecl_kw_statoil.py index 2ddb0f600c..21d6b63c40 100644 --- a/ThirdParty/Ert/python/tests/core/ecl/test_ecl_kw_statoil.py +++ b/ThirdParty/Ert/python/tests/ecl/test_ecl_kw_statoil.py @@ -16,18 +16,18 @@ # for more details. import os import random -from ert.ecl import EclKW, EclTypeEnum, EclFile, FortIO, EclFileFlagEnum +from ecl.ecl import EclKW, EclDataType, EclFile, FortIO, EclFileFlagEnum -from ert.test import ExtendedTestCase , TestAreaContext +from ecl.test import ExtendedTestCase , TestAreaContext def copy_long(): - src = EclKW.create("NAME", 100, EclTypeEnum.ECL_FLOAT_TYPE) + src = EclKW("NAME", 100, EclDataType.ECL_FLOAT) copy = src.sub_copy(0, 2000) def copy_offset(): - src = EclKW.create("NAME", 100, EclTypeEnum.ECL_FLOAT_TYPE) + src = EclKW("NAME", 100, EclDataType.ECL_FLOAT) copy = src.sub_copy(200, 100) @@ -37,7 +37,7 @@ def test_fortio_size( self ): unrst_file = EclFile(unrst_file_path) size = 0 for kw in unrst_file: - size += kw.fortio_size + size += kw.fortIOSize() stat = os.stat(unrst_file_path) self.assertTrue(size == stat.st_size) @@ -51,16 +51,16 @@ def test_sub_copy(self): swat = unrst_file["SWAT"][0] swat1 = swat.sub_copy(0, -1) - swat2 = swat.sub_copy(0, swat.size) + swat2 = swat.sub_copy(0, len(swat)) self.assertTrue(swat.equal(swat1)) self.assertTrue(swat.equal(swat2)) swat3 = swat.sub_copy(20000, 100, new_header="swat") - self.assertTrue(swat3.name == "swat") - self.assertTrue(swat3.size == 100) + self.assertTrue(swat3.getName() == "swat") + self.assertTrue(len(swat3) == 100) equal = True - for i in range(swat3.size): + for i in range(len(swat3)): if swat3[i] != swat[i + 20000]: equal = False self.assertTrue(equal) @@ -70,12 +70,12 @@ def test_sub_copy(self): def test_equal(self): - kw1 = EclKW("TEST", 3, EclTypeEnum.ECL_CHAR_TYPE) + kw1 = EclKW("TEST", 3, EclDataType.ECL_CHAR) kw1[0] = "Test1" kw1[1] = "Test13" kw1[2] = "Test15" - kw2 = EclKW("TEST", 3, EclTypeEnum.ECL_CHAR_TYPE) + kw2 = EclKW("TEST", 3, EclDataType.ECL_CHAR) kw2[0] = "Test1" kw2[1] = "Test13" kw2[2] = "Test15" diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_ecl_restart_file.py b/ThirdParty/Ert/python/tests/ecl/test_ecl_restart_file.py similarity index 94% rename from ThirdParty/Ert/python/tests/core/ecl/test_ecl_restart_file.py rename to ThirdParty/Ert/python/tests/ecl/test_ecl_restart_file.py index 18095d2535..e2779e6d5e 100644 --- a/ThirdParty/Ert/python/tests/core/ecl/test_ecl_restart_file.py +++ b/ThirdParty/Ert/python/tests/ecl/test_ecl_restart_file.py @@ -15,8 +15,8 @@ # for more details. import datetime -from ert.test import ExtendedTestCase -from ert.ecl import Ecl3DKW , EclKW, EclTypeEnum, EclRestartFile , EclFile, FortIO, EclFileFlagEnum , EclGrid +from ecl.test import ExtendedTestCase +from ecl.ecl import Ecl3DKW , EclKW, EclRestartFile , EclFile, FortIO, EclFileFlagEnum , EclGrid class RestartFileTest(ExtendedTestCase): def setUp(self): diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_ecl_sum.py b/ThirdParty/Ert/python/tests/ecl/test_ecl_sum.py similarity index 96% rename from ThirdParty/Ert/python/tests/core/ecl/test_ecl_sum.py rename to ThirdParty/Ert/python/tests/ecl/test_ecl_sum.py index a3785f47d9..7e81dd49dc 100644 --- a/ThirdParty/Ert/python/tests/core/ecl/test_ecl_sum.py +++ b/ThirdParty/Ert/python/tests/ecl/test_ecl_sum.py @@ -1,4 +1,4 @@ -# !/usr/bin/env python +#!/usr/bin/env python # Copyright (C) 2014 Statoil ASA, Norway. # # The file 'test_ecl_sum.py' is part of ERT - Ensemble based Reservoir Tool. @@ -17,8 +17,8 @@ import datetime import os.path from cwrap import CFILE -from ert.ecl import EclSum, EclSumKeyWordVector, EclFile,FortIO, openFortIO,openEclFile,EclKW -from ert.test import ExtendedTestCase , TestAreaContext +from ecl.ecl import EclSum, EclSumKeyWordVector, EclFile,FortIO, openFortIO,openEclFile,EclKW +from ecl.test import ExtendedTestCase , TestAreaContext class EclSumTest(ExtendedTestCase): @@ -48,7 +48,7 @@ def test_dump_csv_line(self): with self.assertRaises(KeyError): ecl_sum_vector.addKeyword("MISSING") - dtime = datetime.datetime( 2002 , 01 , 01 , 0 , 0 , 0 ) + dtime = datetime.datetime( 2002 , 1 , 1 , 0 , 0 , 0 ) with TestAreaContext("EclSum/csv_dump"): test_file_name = self.createTestPath("dump.csv") outputH = open(test_file_name , "w") diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_ecl_sum_tstep.py b/ThirdParty/Ert/python/tests/ecl/test_ecl_sum_tstep.py similarity index 94% rename from ThirdParty/Ert/python/tests/core/ecl/test_ecl_sum_tstep.py rename to ThirdParty/Ert/python/tests/ecl/test_ecl_sum_tstep.py index ddcdcaa609..8a15241a09 100644 --- a/ThirdParty/Ert/python/tests/core/ecl/test_ecl_sum_tstep.py +++ b/ThirdParty/Ert/python/tests/ecl/test_ecl_sum_tstep.py @@ -1,7 +1,7 @@ from datetime import datetime import random -from ert.ecl import EclSumTStep, EclSum -from ert.test import ExtendedTestCase +from ecl.ecl import EclSumTStep, EclSum +from ecl.test import ExtendedTestCase class EclSumTStepTest(ExtendedTestCase): diff --git a/ThirdParty/Ert/python/tests/ecl/test_ecl_sum_vector.py b/ThirdParty/Ert/python/tests/ecl/test_ecl_sum_vector.py new file mode 100644 index 0000000000..09bc438ea8 --- /dev/null +++ b/ThirdParty/Ert/python/tests/ecl/test_ecl_sum_vector.py @@ -0,0 +1,51 @@ +#!/usr/bin/env python +# Copyright (C) 2013 Statoil ASA, Norway. +# +# The file 'test_ecl_sum_vector.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. + +try: + from unittest2 import skipIf +except ImportError: + from unittest import skipIf + +import warnings + +from ecl.ecl import EclSumVector, EclSum +from ecl.test import ExtendedTestCase + + +class EclSumVectorTest(ExtendedTestCase): + def setUp(self): + self.test_file = self.createTestPath("Statoil/ECLIPSE/Gurbat/ECLIPSE.SMSPEC") + self.ecl_sum = EclSum(self.test_file) + + def test_reportOnly_warns(self): + with warnings.catch_warnings(record=True) as w: + warnings.simplefilter("always") + + vector = EclSumVector(self.ecl_sum, "FOPT", True) + assert len(w) == 1 + assert issubclass(w[-1].category, DeprecationWarning) + + def test_basic(self): + self.assertEqual(512, len(self.ecl_sum.keys())) + pfx = 'EclSum(name' + self.assertEqual(pfx, repr(self.ecl_sum)[:len(pfx)]) + it = iter(self.ecl_sum) + t = self.ecl_sum[it.next()] # EclSumVector + self.assertEqual(63, len(t)) + self.assertEqual('BARSA', t.unit) + pfx = 'EclSumVector(key = ' + self.assertEqual(pfx, repr(t)[:len(pfx)]) diff --git a/ThirdParty/Ert/python/tests/ecl/test_ecl_type.py b/ThirdParty/Ert/python/tests/ecl/test_ecl_type.py new file mode 100644 index 0000000000..48da066718 --- /dev/null +++ b/ThirdParty/Ert/python/tests/ecl/test_ecl_type.py @@ -0,0 +1,139 @@ +from ecl.test import TestAreaContext, ExtendedTestCase + +from ecl.ecl import EclDataType, EclTypeEnum + +def get_const_size_types(): + return EclTypeEnum.enums()[:-1:] + +class EclDataTypeTest(ExtendedTestCase): + + # All of the below should list their elements in the same order as + # EclTypeEnum! + # [char, float, double, int, bool, mess] + + CONST_SIZES = [8, 4, 8, 4, 4, 0] + + CONST_VERIFIERS = [ + EclDataType.is_char, + EclDataType.is_float, + EclDataType.is_double, + EclDataType.is_int, + EclDataType.is_bool, + EclDataType.is_mess + ] + + CONST_NAMES = ["CHAR", "REAL", "DOUB", "INTE", "LOGI", "MESS"] + + STRING_NAMES = ["C000", "C010", "C020", "C042", "C999"] + + STRING_SIZES = [0, 10, 20, 42, 999] + + TYPES = (get_const_size_types() + + len(STRING_SIZES) * [EclTypeEnum.ECL_STRING_TYPE]) + + SIZES = CONST_SIZES + STRING_SIZES + + NAMES = CONST_NAMES + STRING_NAMES + + + def test_alloc_from_type(self): + types, sizes = get_const_size_types(), self.CONST_SIZES + for (ecl_type, element_size) in zip(types, sizes): + data_type = EclDataType(ecl_type) + self.assertEqual(ecl_type, data_type.type) + self.assertEqual(element_size, data_type.element_size) + + def test_invalid_string_alloc(self): + with self.assertRaises(ValueError): + data_type = EclDataType(EclTypeEnum.ECL_STRING_TYPE) + + with self.assertRaises(ValueError): + data_type = EclDataType(EclTypeEnum.ECL_STRING_TYPE, -1) + + with self.assertRaises(ValueError): + data_type = EclDataType(EclTypeEnum.ECL_STRING_TYPE, 1000) + + def test_alloc(self): + for (ecl_type, element_size) in zip(self.TYPES, self.SIZES): + data_type = EclDataType(ecl_type, element_size) + self.assertEqual(ecl_type, data_type.type) + self.assertEqual(element_size, data_type.element_size) + + def test_type_verifiers(self): + test_base = zip(self.TYPES, self.SIZES, self.CONST_VERIFIERS) + for (ecl_type, elem_size, verifier) in test_base: + data_type = EclDataType(ecl_type, elem_size) + self.assertTrue(verifier(data_type)) + + def test_get_type_name(self): + test_base = zip(self.TYPES, self.SIZES, self.NAMES) + for (ecl_type, elem_size, type_name) in test_base: + data_type = EclDataType(ecl_type, elem_size) + self.assertEqual(type_name, data_type.type_name) + + def test_initialization_validation(self): + invalid_args = [ + (None, 0, self.CONST_NAMES[0]), + (1, None, self.CONST_NAMES[0]), + (1, 0, self.CONST_NAMES[0]), + (None, None, None), + (None, 12, None) + ] + + for inv_arg in invalid_args: + with self.assertRaises(ValueError): + EclDataType(inv_arg[0], inv_arg[1], inv_arg[2]) + + def test_create_from_type_name(self): + test_base = zip(self.TYPES, self.SIZES, self.NAMES) + for (ecl_type, elem_size, type_name) in test_base: + data_type = EclDataType.create_from_type_name(type_name) + self.assertEqual(ecl_type, data_type.type) + self.assertEqual(elem_size, data_type.element_size) + self.assertEqual(type_name, data_type.type_name) + + def test_is_numeric(self): + numeric_types = [ + EclTypeEnum.ECL_INT_TYPE, + EclTypeEnum.ECL_FLOAT_TYPE, + EclTypeEnum.ECL_DOUBLE_TYPE + ] + + for ecl_type in numeric_types: + self.assertTrue(EclDataType(ecl_type).is_numeric()) + + for ecl_type in set(get_const_size_types())-set(numeric_types): + self.assertFalse(EclDataType(ecl_type).is_numeric()) + + for elem_size in self.STRING_SIZES: + data_type = EclDataType(EclTypeEnum.ECL_STRING_TYPE, elem_size) + self.assertFalse(data_type.is_numeric()) + + def test_equals(self): + test_base = zip(self.TYPES, self.SIZES) + for ecl_type, elem_size in test_base: + a = EclDataType(ecl_type, elem_size) + b = EclDataType(ecl_type, elem_size) + + self.assertTrue(a.is_equal(b)) + self.assertEqual(a, b) + + for otype, osize in set(test_base)-set([(ecl_type, elem_size)]): + self.assertFalse(a.is_equal(EclDataType(otype, osize))) + self.assertNotEqual(a, EclDataType(otype, osize)) + + def test_hash(self): + all_types = set() + test_base = zip(self.TYPES, self.SIZES) + + for index, (ecl_type, elem_size) in enumerate(test_base): + all_types.add(EclDataType(ecl_type, elem_size)) + self.assertEqual(index+1, len(all_types)) + + for index, (ecl_type, elem_size) in enumerate(test_base): + all_types.add(EclDataType(ecl_type, elem_size)) + + for index, ecl_type in enumerate(get_const_size_types()): + all_types.add(EclDataType(ecl_type)) + + self.assertEqual(len(test_base), len(all_types)) diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_ecl_util.py b/ThirdParty/Ert/python/tests/ecl/test_ecl_util.py similarity index 90% rename from ThirdParty/Ert/python/tests/core/ecl/test_ecl_util.py rename to ThirdParty/Ert/python/tests/ecl/test_ecl_util.py index 961d3297fe..0704b17cf1 100644 --- a/ThirdParty/Ert/python/tests/core/ecl/test_ecl_util.py +++ b/ThirdParty/Ert/python/tests/ecl/test_ecl_util.py @@ -14,8 +14,8 @@ # See the GNU General Public License at # for more details. -from ert.ecl import EclGrid , EclUtil, EclTypeEnum , EclFileEnum, EclPhaseEnum, EclUnitTypeEnum -from ert.test import ExtendedTestCase +from ecl.ecl import EclGrid , EclUtil, EclTypeEnum , EclFileEnum, EclPhaseEnum, EclUnitTypeEnum +from ecl.test import ExtendedTestCase class EclUtilTest(ExtendedTestCase): @@ -24,9 +24,10 @@ def test_enums(self): source_file_path = "libecl/include/ert/ecl/ecl_util.h" self.assertEnumIsFullyDefined(EclFileEnum, "ecl_file_enum", source_file_path) self.assertEnumIsFullyDefined(EclPhaseEnum, "ecl_phase_enum", source_file_path) - self.assertEnumIsFullyDefined(EclTypeEnum, "ecl_type_enum", source_file_path) self.assertEnumIsFullyDefined(EclUnitTypeEnum, "ert_ecl_unit_enum", source_file_path) - + + source_file_path = "libecl/include/ert/ecl/ecl_type.h" + self.assertEnumIsFullyDefined(EclTypeEnum, "ecl_type_enum", source_file_path) def test_file_type(self): file_type , fmt , report = EclUtil.inspectExtension("CASE.X0078") diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_fault_blocks.py b/ThirdParty/Ert/python/tests/ecl/test_fault_blocks.py similarity index 90% rename from ThirdParty/Ert/python/tests/core/ecl/test_fault_blocks.py rename to ThirdParty/Ert/python/tests/ecl/test_fault_blocks.py index 192369f6b0..9275c9a5dc 100644 --- a/ThirdParty/Ert/python/tests/core/ecl/test_fault_blocks.py +++ b/ThirdParty/Ert/python/tests/ecl/test_fault_blocks.py @@ -16,17 +16,18 @@ # for more details. from __future__ import print_function from unittest import skipIf +import warnings -from ert.ecl import EclGrid, EclTypeEnum , EclKW , EclRegion -from ert.ecl.faults import FaultBlock, FaultBlockLayer, FaultBlockCell,FaultCollection -from ert.geo import Polyline , CPolylineCollection -from ert.test import ExtendedTestCase , TestAreaContext +from ecl.ecl import EclGrid, EclKW , EclRegion, EclDataType +from ecl.ecl.faults import FaultBlock, FaultBlockLayer, FaultBlockCell,FaultCollection +from ecl.geo import Polyline , CPolylineCollection +from ecl.test import ExtendedTestCase , TestAreaContext class FaultBlockTest(ExtendedTestCase): def setUp(self): - self.grid = EclGrid.create_rectangular( (10,10,10) , (1,1,1) ) - self.kw = EclKW.create( "FAULTBLK" , self.grid.size , EclTypeEnum.ECL_INT_TYPE ) + self.grid = EclGrid.createRectangular( (10,10,10) , (1,1,1) ) + self.kw = EclKW( "FAULTBLK" , self.grid.getGlobalSize() , EclDataType.ECL_INT ) self.kw.assign( 1 ) reg = EclRegion( self.grid , False ) @@ -40,8 +41,8 @@ def setUp(self): def test_fault_block(self): - grid = EclGrid.create_rectangular( (5,5,1) , (1,1,1) ) - kw = EclKW.create( "FAULTBLK" , grid.size , EclTypeEnum.ECL_INT_TYPE ) + grid = EclGrid.createRectangular( (5,5,1) , (1,1,1) ) + kw = EclKW( "FAULTBLK" , grid.getGlobalSize() , EclDataType.ECL_INT ) kw.assign( 0 ) for j in range(1,4): for i in range(1,4): @@ -56,7 +57,6 @@ def test_fault_block(self): self.assertEqual( len(block) , 9) self.assertEqual( layer , block.getParentLayer() ) - def test_get_ijk(self): with TestAreaContext("python/fault_block_layer/neighbour") as work_area: with open("kw.grdecl","w") as fileH: @@ -68,9 +68,9 @@ def test_get_ijk(self): fileH.write("4 4 4 0 5\n") fileH.write("/\n") - kw = EclKW.read_grdecl(open("kw.grdecl") , "FAULTBLK" , ecl_type = EclTypeEnum.ECL_INT_TYPE) + kw = EclKW.read_grdecl(open("kw.grdecl") , "FAULTBLK" , ecl_type = EclDataType.ECL_INT) - grid = EclGrid.create_rectangular( (5,5,1) , (1,1,1) ) + grid = EclGrid.createRectangular( (5,5,1) , (1,1,1) ) layer = FaultBlockLayer( grid , 0 ) layer.loadKeyword( kw ) @@ -100,9 +100,9 @@ def test_neighbours(self): fileH.write("4 4 4 0 5\n") fileH.write("/\n") - kw = EclKW.read_grdecl(open("kw.grdecl") , "FAULTBLK" , ecl_type = EclTypeEnum.ECL_INT_TYPE) + kw = EclKW.read_grdecl(open("kw.grdecl") , "FAULTBLK" , ecl_type = EclDataType.ECL_INT) - grid = EclGrid.create_rectangular( (5,5,1) , (1,1,1) ) + grid = EclGrid.createRectangular( (5,5,1) , (1,1,1) ) layer = FaultBlockLayer( grid , 0 ) layer.loadKeyword( kw ) @@ -160,7 +160,7 @@ def test_neighbours2(self): fileH.write("3 3 3 3 2 2 2 2 \n") fileH.write("/\n") - kw = EclKW.read_grdecl(open("faultblock.grdecl") , "FAULTBLK" , ecl_type = EclTypeEnum.ECL_INT_TYPE) + kw = EclKW.read_grdecl(open("faultblock.grdecl") , "FAULTBLK" , ecl_type = EclDataType.ECL_INT) with open("faults.grdecl" , "w") as f: f.write("FAULTS\n") f.write("\'FY\' 1 4 4 4 1 1 'Y' /\n") @@ -226,7 +226,7 @@ def test_neighbours3(self): fileH.write("1 1 1 1 1 2 2 2 \n") fileH.write("/\n") - kw = EclKW.read_grdecl(open("faultblock.grdecl") , "FAULTBLK" , ecl_type = EclTypeEnum.ECL_INT_TYPE) + kw = EclKW.read_grdecl(open("faultblock.grdecl") , "FAULTBLK" , ecl_type = EclDataType.ECL_INT) with open("faults.grdecl" , "w") as f: f.write("FAULTS\n") f.write("\'FX\' 4 4 1 4 1 1 'X' /\n") @@ -252,8 +252,8 @@ def test_neighbours3(self): def test_fault_block_edge(self): - grid = EclGrid.create_rectangular( (5,5,1) , (1,1,1) ) - kw = EclKW.create( "FAULTBLK" , grid.size , EclTypeEnum.ECL_INT_TYPE ) + grid = EclGrid.createRectangular( (5,5,1) , (1,1,1) ) + kw = EclKW( "FAULTBLK" , grid.getGlobalSize() , EclDataType.ECL_INT ) kw.assign( 0 ) for j in range(1,4): for i in range(1,4): @@ -271,12 +271,12 @@ def test_fault_block_layer(self): layer = FaultBlockLayer( self.grid , -1 ) with self.assertRaises(ValueError): - layer = FaultBlockLayer( self.grid , self.grid.size ) + layer = FaultBlockLayer( self.grid , self.grid.getGlobalSize() ) layer = FaultBlockLayer( self.grid , 1 ) self.assertEqual( 1 , layer.getK() ) - kw = EclKW.create( "FAULTBLK" , self.grid.size , EclTypeEnum.ECL_FLOAT_TYPE ) + kw = EclKW( "FAULTBLK" , self.grid.getGlobalSize() , EclDataType.ECL_FLOAT ) with self.assertRaises(ValueError): layer.scanKeyword( kw ) @@ -358,7 +358,7 @@ def test_fault_block_layer(self): def test_add_polyline_barrier1(self): - grid = EclGrid.create_rectangular( (4,1,1) , (1,1,1) ) + grid = EclGrid.createRectangular( (4,1,1) , (1,1,1) ) layer = FaultBlockLayer( self.grid , 0 ) polyline = Polyline( init_points = [ (1.99 , 0.001) , (2.01 , 0.99)]) @@ -376,7 +376,7 @@ def test_add_polyline_barrier1(self): def test_add_polyline_barrier2(self): - grid = EclGrid.create_rectangular( (10,10,1) , (1,1,1) ) + grid = EclGrid.createRectangular( (10,10,1) , (1,1,1) ) layer = FaultBlockLayer( self.grid , 0 ) polyline = Polyline( init_points = [ (0.1 , 0.9) , (8.9,0.9) , (8.9,8.9) ]) @@ -407,11 +407,11 @@ def test_add_polyline_barrier2(self): def test_fault_block_layer_export(self): layer = FaultBlockLayer( self.grid , 1 ) - kw1 = EclKW.create( "FAULTBLK" , self.grid.size + 1 , EclTypeEnum.ECL_INT_TYPE ) + kw1 = EclKW( "FAULTBLK" , self.grid.getGlobalSize() + 1 , EclDataType.ECL_INT ) with self.assertRaises(ValueError): layer.exportKeyword( kw1 ) - kw2 = EclKW.create( "FAULTBLK" , self.grid.size , EclTypeEnum.ECL_FLOAT_TYPE ) + kw2 = EclKW( "FAULTBLK" , self.grid.getGlobalSize() , EclDataType.ECL_FLOAT ) with self.assertRaises(TypeError): layer.exportKeyword(kw2) @@ -436,7 +436,7 @@ def test_internal_blocks(self): fileH.write("/\n") - kw = EclKW.read_grdecl(open("faultblock.grdecl") , "FAULTBLK" , ecl_type = EclTypeEnum.ECL_INT_TYPE) + kw = EclKW.read_grdecl(open("faultblock.grdecl") , "FAULTBLK" , ecl_type = EclDataType.ECL_INT) with open("faults.grdecl" , "w") as f: f.write("FAULTS\n") f.write("\'FX\' 4 4 1 4 1 1 'X' /\n") diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_fault_blocks_statoil.py b/ThirdParty/Ert/python/tests/ecl/test_fault_blocks_statoil.py similarity index 88% rename from ThirdParty/Ert/python/tests/core/ecl/test_fault_blocks_statoil.py rename to ThirdParty/Ert/python/tests/ecl/test_fault_blocks_statoil.py index 0225105108..8be7f2fc0a 100644 --- a/ThirdParty/Ert/python/tests/core/ecl/test_fault_blocks_statoil.py +++ b/ThirdParty/Ert/python/tests/ecl/test_fault_blocks_statoil.py @@ -19,15 +19,15 @@ except ImportError: from unittest import skipIf -from ert.ecl import EclGrid, EclTypeEnum , EclKW -from ert.test import ExtendedTestCase -from ert.ecl.faults import FaultBlock, FaultBlockLayer +from ecl.ecl import EclGrid, EclDataType , EclKW +from ecl.test import ExtendedTestCase +from ecl.ecl.faults import FaultBlock, FaultBlockLayer class FaultBlockTest(ExtendedTestCase): def setUp(self): self.grid = EclGrid( self.createTestPath("Statoil/ECLIPSE/Mariner/MARINER.EGRID")) fileH = open( self.createTestPath("Statoil/ECLIPSE/Mariner/faultblock.grdecl") ) - self.kw = EclKW.read_grdecl( fileH , "FAULTBLK" , ecl_type = EclTypeEnum.ECL_INT_TYPE ) + self.kw = EclKW.read_grdecl( fileH , "FAULTBLK" , ecl_type = EclDataType.ECL_INT ) diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_faults.py b/ThirdParty/Ert/python/tests/ecl/test_faults.py similarity index 95% rename from ThirdParty/Ert/python/tests/core/ecl/test_faults.py rename to ThirdParty/Ert/python/tests/ecl/test_faults.py index 0407f4a65b..aa73ceae9f 100644 --- a/ThirdParty/Ert/python/tests/core/ecl/test_faults.py +++ b/ThirdParty/Ert/python/tests/ecl/test_faults.py @@ -17,19 +17,19 @@ from unittest import skipIf import time -from ert import util +from ecl import util -from ert.ecl.faults import FaultCollection, Fault, FaultLine, FaultSegment,FaultBlockLayer -from ert.ecl import EclGrid, EclKW, EclTypeEnum -from ert.test import ExtendedTestCase, TestAreaContext -from ert.geo import Polyline , CPolyline +from ecl.ecl.faults import FaultCollection, Fault, FaultLine, FaultSegment,FaultBlockLayer +from ecl.ecl import EclGrid, EclKW, EclDataType +from ecl.test import ExtendedTestCase, TestAreaContext +from ecl.geo import Polyline , CPolyline class FaultTest(ExtendedTestCase): @classmethod def setUpClass(cls): - cls.grid = EclGrid.create_rectangular( (151,100,50) , (1,1,1)) - + cls.grid = EclGrid.createRectangular( (151,100,50) , (1,1,1)) + def setUp(self): self.faults1 = self.createTestPath("local/ECLIPSE/FAULTS/fault1.grdecl") self.faults2 = self.createTestPath("local/ECLIPSE/FAULTS/fault2.grdecl") @@ -39,7 +39,7 @@ def test_PolylineIJ(self): nx = 10 ny = 10 nz = 10 - grid = EclGrid.create_rectangular( (nx,ny,nz) , (0.1,0.1,0.1)) + grid = EclGrid.createRectangular( (nx,ny,nz) , (0.1,0.1,0.1)) f = Fault(grid , "F") f.addRecord(0 , 1 , 0 , 0 , 0,0 , "Y-") f.addRecord(2 , 2 , 0 , 1 , 0,0 , "X-") @@ -119,7 +119,7 @@ def test_faultLine_center(self): nx = 10 ny = 10 nz = 2 - grid = EclGrid.create_rectangular( (nx,ny,nz) , (0.1,0.1,0.1)) + grid = EclGrid.createRectangular( (nx,ny,nz) , (0.1,0.1,0.1)) fl = FaultLine(grid , 0) C1 = (nx + 1) * 5 + 3 C2 = C1 + 2 @@ -204,7 +204,7 @@ def test_load(self): def test_connect_faults(self): - grid = EclGrid.create_rectangular( (100,100,10) , (1,1,1)) + grid = EclGrid.createRectangular( (100,100,10) , (1,1,1)) # Fault1 Fault4 # | | @@ -359,7 +359,7 @@ def test_intersect_intRays(self): def test_join_faults(self): - grid = EclGrid.create_rectangular( (100,100,10) , (1,1,1)) + grid = EclGrid.createRectangular( (100,100,10) , (1,1,1)) # Fault1 Fault4 # | | @@ -391,7 +391,7 @@ def test_join_faults(self): def test_contact(self): - grid = EclGrid.create_rectangular( (100,100,10) , (1,1,1)) + grid = EclGrid.createRectangular( (100,100,10) , (1,1,1)) # Fault1 Fault4 # | | @@ -500,7 +500,7 @@ def test_fault_line_order(self): nx = 120 ny = 60 nz = 43 - grid = EclGrid.create_rectangular( (nx , ny , nz) , (1,1,1) ) + grid = EclGrid.createRectangular( (nx , ny , nz) , (1,1,1) ) with TestAreaContext("python/faults/line_order"): with open("faults.grdecl" , "w") as f: f.write("""FAULTS @@ -540,7 +540,7 @@ def test_neighbour_cells(self): nx = 10 ny = 8 nz = 7 - grid = EclGrid.create_rectangular( (nx , ny , nz) , (1,1,1) ) + grid = EclGrid.createRectangular( (nx , ny , nz) , (1,1,1) ) faults_file = self.createTestPath("local/ECLIPSE/FAULTS/faults_nb.grdecl") faults = FaultCollection( grid , faults_file ) @@ -601,7 +601,7 @@ def test_neighbour_cells(self): def test_polyline_intersection(self): - grid = EclGrid.create_rectangular( (100,100,10) , (0.25 , 0.25 , 1)) + grid = EclGrid.createRectangular( (100,100,10) , (0.25 , 0.25 , 1)) # Fault1 Fault4 # | | @@ -642,7 +642,7 @@ def test_num_linesegment(self): nx = 10 ny = 10 nz = 1 - grid = EclGrid.create_rectangular( (nx , ny , nz) , (1,1,1) ) + grid = EclGrid.createRectangular( (nx , ny , nz) , (1,1,1) ) with TestAreaContext("python/faults/line_order"): with open("faults.grdecl" , "w") as f: f.write("""FAULTS @@ -660,7 +660,7 @@ def test_num_linesegment(self): def test_extend_to_polyline(self): - grid = EclGrid.create_rectangular( (3,3,1) , (1 , 1 , 1)) + grid = EclGrid.createRectangular( (3,3,1) , (1 , 1 , 1)) # o o o o # @@ -688,7 +688,7 @@ def test_extend_to_polyline(self): def test_extend_polyline_on(self): - grid = EclGrid.create_rectangular( (3,3,1) , (1 , 1 , 1)) + grid = EclGrid.createRectangular( (3,3,1) , (1 , 1 , 1)) # o o o o # @@ -720,13 +720,13 @@ def test_extend_polyline_on(self): def test_stepped(self): - grid = EclGrid.create_rectangular( (6,1,4) , (1,1,1)) + grid = EclGrid.createRectangular( (6,1,4) , (1,1,1)) f = Fault(grid , "F") f.addRecord(4,4,0,0,0,1,"X") f.addRecord(2,2,0,0,1,1,"Z") f.addRecord(1,1,0,0,2,3,"X") - block_kw = EclKW.create("FAULTBLK" , grid.getGlobalSize() , EclTypeEnum.ECL_INT_TYPE) + block_kw = EclKW("FAULTBLK" , grid.getGlobalSize() , EclDataType.ECL_INT) block_kw.assign(1) block_kw[5] = 2 block_kw[11] = 2 @@ -761,7 +761,7 @@ def test_stepped(self): def test_connectWithPolyline(self): - grid = EclGrid.create_rectangular( (4,4,1) , (1 , 1 , 1)) + grid = EclGrid.createRectangular( (4,4,1) , (1 , 1 , 1)) # o o o o o diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_fortio.py b/ThirdParty/Ert/python/tests/ecl/test_fortio.py similarity index 87% rename from ThirdParty/Ert/python/tests/core/ecl/test_fortio.py rename to ThirdParty/Ert/python/tests/ecl/test_fortio.py index 36a635e8fb..01e51ff3d3 100644 --- a/ThirdParty/Ert/python/tests/core/ecl/test_fortio.py +++ b/ThirdParty/Ert/python/tests/ecl/test_fortio.py @@ -16,8 +16,8 @@ # for more details. import os from random import randint -from ert.ecl import FortIO, EclTypeEnum, EclKW , openFortIO, EclFile -from ert.test import ExtendedTestCase, TestAreaContext +from ecl.ecl import FortIO, EclDataType, EclKW , openFortIO, EclFile +from ecl.test import ExtendedTestCase, TestAreaContext @@ -37,8 +37,8 @@ def test_noex(self): f = FortIO("odes_not_exist", FortIO.READ_MODE) def test_kw(self): - kw1 = EclKW.create("KW1", 2, EclTypeEnum.ECL_INT_TYPE) - kw2 = EclKW.create("KW2", 2, EclTypeEnum.ECL_INT_TYPE) + kw1 = EclKW("KW1", 2, EclDataType.ECL_INT) + kw2 = EclKW("KW2", 2, EclDataType.ECL_INT) kw1[0] = 99 kw1[1] = 77 @@ -61,8 +61,8 @@ def test_kw(self): def test_truncate(self): - kw1 = EclKW.create("KW1", 2, EclTypeEnum.ECL_INT_TYPE) - kw2 = EclKW.create("KW2", 2, EclTypeEnum.ECL_INT_TYPE) + kw1 = EclKW("KW1", 2, EclDataType.ECL_INT) + kw2 = EclKW("KW2", 2, EclDataType.ECL_INT) kw1[0] = 99 kw1[1] = 77 @@ -110,7 +110,7 @@ def test_fortio_creation(self): def test_context(self): with TestAreaContext("python/fortio/context") as t: - kw1 = EclKW.create("KW" , 2456 , EclTypeEnum.ECL_FLOAT_TYPE) + kw1 = EclKW("KW" , 2456 , EclDataType.ECL_FLOAT) for i in range(len(kw1)): kw1[i] = randint(0,1000) @@ -128,7 +128,7 @@ def test_context(self): def test_is_fortran_file(self): with TestAreaContext("python/fortio/guess"): - kw1 = EclKW.create("KW" , 12345 , EclTypeEnum.ECL_FLOAT_TYPE) + kw1 = EclKW("KW" , 12345 , EclDataType.ECL_FLOAT) with openFortIO("fortran_file" , mode = FortIO.WRITE_MODE) as f: kw1.fwrite( f ) diff --git a/ThirdParty/Ert/python/tests/ecl/test_geertsma.py b/ThirdParty/Ert/python/tests/ecl/test_geertsma.py new file mode 100644 index 0000000000..5ff2850716 --- /dev/null +++ b/ThirdParty/Ert/python/tests/ecl/test_geertsma.py @@ -0,0 +1,144 @@ +import datetime +from ecl.ecl import EclGrid, EclKW, EclDataType, openFortIO, FortIO, EclFile, EclSubsidence + +from ecl.test import ExtendedTestCase , TestAreaContext + +import numpy as np + + +def create_init(grid, case): + poro = EclKW("PORO", grid.getNumActive(), EclDataType.ECL_FLOAT) + porv = poro.copy() + porv.setName("PORV") + for g in range(grid.getGlobalSize()): + porv[g] *= grid.cell_volume(global_index=g) + + with openFortIO("%s.INIT" % case, mode=FortIO.WRITE_MODE) as f: + poro.fwrite(f) + porv.fwrite(f) + + +def create_restart(grid, case, p1, p2=None): + with openFortIO("%s.UNRST" % case, mode=FortIO.WRITE_MODE) as f: + seq_hdr = EclKW("SEQNUM", 1, EclDataType.ECL_FLOAT) + seq_hdr[0] = 10 + p = EclKW("PRESSURE", grid.getNumActive(), EclDataType.ECL_FLOAT) + for i in range(len(p1)): + p[i] = p1[i] + + header = EclKW("INTEHEAD", 67, EclDataType.ECL_INT) + header[64] = 1 + header[65] = 1 + header[66] = 2000 + + seq_hdr.fwrite(f) + header.fwrite(f) + p.fwrite(f) + + if p2: + seq_hdr[0] = 20 + header[66] = 2010 + for i in range(len(p2)): + p[i] = p2[i] + + seq_hdr.fwrite(f) + header.fwrite(f) + p.fwrite(f) + + +class GeertsmaTest(ExtendedTestCase): + + @staticmethod + def test_geertsma_kernel(): + grid = EclGrid.createRectangular(dims=(1, 1, 1), dV=(50, 50, 50)) + with TestAreaContext("Subsidence"): + p1 = [1] + create_restart(grid, "TEST", p1) + create_init(grid, "TEST") + + init = EclFile("TEST.INIT") + restart_file = EclFile("TEST.UNRST") + + restart_view1 = restart_file.restartView(sim_time=datetime.date(2000, 1, 1)) + + subsidence = EclSubsidence(grid, init) + subsidence.add_survey_PRESSURE("S1", restart_view1) + + youngs_modulus = 5E8 + poisson_ratio = 0.3 + seabed = 0 + above = 100 + topres = 2000 + receiver = (1000, 1000, 0) + + dz = subsidence.evalGeertsma("S1", None, receiver, youngs_modulus, poisson_ratio, seabed) + np.testing.assert_almost_equal(dz, 3.944214576168326e-09) + + receiver = (1000, 1000, topres - seabed - above) + + dz = subsidence.evalGeertsma("S1", None, receiver, youngs_modulus, poisson_ratio, seabed) + np.testing.assert_almost_equal(dz, 5.8160298201497136e-08) + + @staticmethod + def test_geertsma_kernel_2_source_points_2_vintages(): + grid = EclGrid.createRectangular(dims=(2, 1, 1), dV=(100, 100, 100)) + + with TestAreaContext("Subsidence"): + p1 = [1, 10] + p2 = [10, 20] + create_restart(grid, "TEST", p1, p2) + create_init(grid, "TEST") + + init = EclFile("TEST.INIT") + restart_file = EclFile("TEST.UNRST") + + restart_view1 = restart_file.restartView(sim_time=datetime.date(2000, 1, 1)) + restart_view2 = restart_file.restartView(sim_time=datetime.date(2010, 1, 1)) + + subsidence = EclSubsidence(grid, init) + subsidence.add_survey_PRESSURE("S1", restart_view1) + subsidence.add_survey_PRESSURE("S2", restart_view2) + + youngs_modulus = 5E8 + poisson_ratio = 0.3 + seabed = 0 + receiver = (1000, 1000, 0) + + dz1 = subsidence.evalGeertsma("S1", None, receiver, youngs_modulus, poisson_ratio, seabed) + np.testing.assert_almost_equal(dz1, 8.65322541521704e-07) + + dz2 = subsidence.evalGeertsma("S2", None, receiver, youngs_modulus, poisson_ratio, seabed) + np.testing.assert_almost_equal(dz2, 2.275556615015282e-06) + + np.testing.assert_almost_equal(dz1-dz2, -1.4102340734935779e-06) + + dz = subsidence.evalGeertsma("S1", "S2", receiver, youngs_modulus, poisson_ratio, seabed) + np.testing.assert_almost_equal(dz, dz1-dz2) + + @staticmethod + def test_geertsma_kernel_seabed(): + grid = EclGrid.createRectangular(dims=(1, 1, 1), dV=(50, 50, 50)) + with TestAreaContext("Subsidence"): + p1 = [1] + create_restart(grid, "TEST", p1) + create_init(grid, "TEST") + + init = EclFile("TEST.INIT") + restart_file = EclFile("TEST.UNRST") + + restart_view1 = restart_file.restartView(sim_time=datetime.date(2000, 1, 1)) + + subsidence = EclSubsidence(grid, init) + subsidence.add_survey_PRESSURE("S1", restart_view1) + + youngs_modulus = 5E8 + poisson_ratio = 0.3 + seabed = 300 + above = 100 + topres = 2000 + receiver = (1000, 1000, topres - seabed - above) + + dz = subsidence.evalGeertsma("S1", None, receiver, youngs_modulus, poisson_ratio, seabed) + np.testing.assert_almost_equal(dz, 5.819790154474284e-08) + + diff --git a/ThirdParty/Ert/python/tests/ecl/test_grav.py b/ThirdParty/Ert/python/tests/ecl/test_grav.py new file mode 100644 index 0000000000..3772db8448 --- /dev/null +++ b/ThirdParty/Ert/python/tests/ecl/test_grav.py @@ -0,0 +1,25 @@ +import time +from ecl.ecl import EclGrav, EclKW, EclGrid, EclFile, EclDataType, openFortIO, FortIO +from ecl.test import ExtendedTestCase , TestAreaContext + + +class EclGravTest(ExtendedTestCase): + + + def setUp(self): + self.grid = EclGrid.createRectangular( (10,10,10) , (1,1,1)) + + + def test_create(self): + # The init file created here only contains a PORO field. More + # properties must be added to this before it can be used for + # any usefull gravity calculations. + poro = EclKW( "PORO" , self.grid.getGlobalSize() , EclDataType.ECL_FLOAT ) + with TestAreaContext("grav_init"): + with openFortIO( "TEST.INIT" , mode = FortIO.WRITE_MODE ) as f: + poro.fwrite( f ) + self.init = EclFile( "TEST.INIT") + + grav = EclGrav( self.grid , self.init ) + + diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_grdecl.py b/ThirdParty/Ert/python/tests/ecl/test_grdecl.py similarity index 98% rename from ThirdParty/Ert/python/tests/core/ecl/test_grdecl.py rename to ThirdParty/Ert/python/tests/ecl/test_grdecl.py index 3ff4f63b01..7c6b1b05c6 100644 --- a/ThirdParty/Ert/python/tests/core/ecl/test_grdecl.py +++ b/ThirdParty/Ert/python/tests/ecl/test_grdecl.py @@ -16,8 +16,8 @@ # for more details. import os -from ert.ecl import EclKW,EclGrid,Ecl3DKW -from ert.test import ExtendedTestCase +from ecl.ecl import EclKW,EclGrid,Ecl3DKW +from ecl.test import ExtendedTestCase diff --git a/ThirdParty/Ert/python/tests/ecl/test_grid.py b/ThirdParty/Ert/python/tests/ecl/test_grid.py new file mode 100644 index 0000000000..08dded9868 --- /dev/null +++ b/ThirdParty/Ert/python/tests/ecl/test_grid.py @@ -0,0 +1,553 @@ +#!/usr/bin/env python +# Copyright (C) 2014 Statoil ASA, Norway. +# +# The file 'test_grid.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. +import os.path +from unittest import skipIf +import time +import itertools +from numpy import linspace + +from ecl.util import IntVector +from ecl.ecl import EclGrid, EclKW, EclDataType, EclUnitTypeEnum, EclFile +from ecl.ecl import EclGridGenerator as GridGen +from ecl.ecl.faults import Layer , FaultCollection +from ecl.test import ExtendedTestCase , TestAreaContext + +# This dict is used to verify that corners are mapped to the correct +# cell with respect to containment. +CORNER_HOME = { + (0, 0, 0) : 0, (0, 0, 1) : 9, (0, 0, 2) : 18, (0, 0, 3) : 18, + (0, 1, 0) : 3, (0, 1, 1) : 12, (0, 1, 2) : 21, (0, 1, 3) : 21, + (0, 2, 0) : 6, (0, 2, 1) : 15, (0, 2, 2) : 24, (0, 2, 3) : 24, + (0, 3, 0) : 6, (0, 3, 1) : 15, (0, 3, 2) : 24, (0, 3, 3) : 24, + (1, 0, 0) : 1, (1, 0, 1) : 10, (1, 0, 2) : 19, (1, 0, 3) : 19, + (1, 1, 0) : 4, (1, 1, 1) : 13, (1, 1, 2) : 22, (1, 1, 3) : 22, + (1, 2, 0) : 7, (1, 2, 1) : 16, (1, 2, 2) : 25, (1, 2, 3) : 25, + (1, 3, 0) : 7, (1, 3, 1) : 16, (1, 3, 2) : 25, (1, 3, 3) : 25, + (2, 0, 0) : 2, (2, 0, 1) : 11, (2, 0, 2) : 20, (2, 0, 3) : 20, + (2, 1, 0) : 5, (2, 1, 1) : 14, (2, 1, 2) : 23, (2, 1, 3) : 23, + (2, 2, 0) : 8, (2, 2, 1) : 17, (2, 2, 2) : 26, (2, 2, 3) : 26, + (2, 3, 0) : 8, (2, 3, 1) : 17, (2, 3, 2) : 26, (2, 3, 3) : 26, + (3, 0, 0) : 2, (3, 0, 1) : 11, (3, 0, 2) : 20, (3, 0, 3) : 20, + (3, 1, 0) : 5, (3, 1, 1) : 14, (3, 1, 2) : 23, (3, 1, 3) : 23, + (3, 2, 0) : 8, (3, 2, 1) : 17, (3, 2, 2) : 26, (3, 2, 3) : 26, + (3, 3, 0) : 8, (3, 3, 1) : 17, (3, 3, 2) : 26, (3, 3, 3) : 26 +} + +def createVolumeTestGridBase(dim, dV, offset=1): + return [ + GridGen.createGrid(dim, dV, offset=0), + GridGen.createGrid(dim, dV, offset=offset), + GridGen.createGrid(dim, dV, offset=offset, irregular_offset=True), + GridGen.createGrid(dim, dV, offset=offset, concave=True), + GridGen.createGrid(dim, dV, offset=offset, irregular=True), + GridGen.createGrid(dim, dV, offset=offset, concave=True, irregular=True), + GridGen.createGrid(dim, dV, offset=offset, irregular_offset=True, concave=True), + GridGen.createGrid(dim, dV, offset=0, faults=True), + GridGen.createGrid(dim, dV, offset=offset, faults=True), + GridGen.createGrid(dim, dV, escape_origo_shift=(100, 100, 0), scale=2), + GridGen.createGrid(dim, dV, escape_origo_shift=(100, 100, 0), scale=0.5), + GridGen.createGrid(dim, dV, escape_origo_shift=(100, 100, 0), translation=(50,50,0)), + GridGen.createGrid(dim, dV, escape_origo_shift=(100, 100, 0), rotate=True), + GridGen.createGrid(dim, dV, escape_origo_shift=(100, 100, 0), misalign=True), + GridGen.createGrid(dim, dV, offset=offset, escape_origo_shift=(100, 100, 0), + irregular_offset=True, concave=True, irregular=True, + scale=1.5, translation=(5,5,0), rotate=True, + misalign=True) + ] + +def createContainmentTestBase(): + return [ + (3, GridGen.createGrid((6,6,6), (1,1,1), offset=1)), + (10, GridGen.createGrid((3,3,3), (1,1,1), offset=1, concave=True)), + (4, GridGen.createGrid((10,10,1), (1,1,1), offset=0., misalign=True)), + (3, + GridGen.createGrid((6,6,6), (1,1,1), offset=0., + escape_origo_shift=(100, 100, 0), + irregular_offset=True, concave=True, irregular=True, + scale=1.5, translation=(5,5,0), + misalign=True + ) + ) + ] + +def getMinMaxValue(grid): + corners = [ + grid.getCellCorner(i, cell) + for i in range(8) + for cell in range(grid.getGlobalSize()) + ] + + return [(min(values), max(values)) for values in zip(*corners)] + +def createWrapperGrid(grid): + """ + Creates a grid that occupies the same space as the given grid, + but that consists of a single cell. + """ + + x, y, z = grid.getNX()-1, grid.getNY()-1, grid.getNZ()-1 + corner_pos = [ + (0, 0, 0), (x, 0, 0), (0, y, 0), (x, y, 0), + (0, 0, z), (x, 0, z), (0, y, z), (x, y, z) + ] + + corners = [ + grid.getCellCorner(i, ijk=pos) + for i, pos in enumerate(corner_pos) + ] + + return GridGen.createSingleCellGrid(corners) + +def average(points): + p = reduce(lambda a,b: (a[0]+b[0], a[1]+b[1], a[2]+b[2]), points) + return [elem/float(len(points)) for elem in p] + +# This test class should only have test cases which do not require +# external test data. Tests involving Statoil test data are in the +# test_grid_statoil module. +class GridTest(ExtendedTestCase): + + def test_oom_grid(self): + nx = 2000 + ny = 2000 + nz = 2000 + + with self.assertRaises(MemoryError): + grid = GridGen.createRectangular( (nx,ny,nz), (1,1,1)) + + + + def test_posXYEdge(self): + nx = 10 + ny = 11 + grid = GridGen.createRectangular( (nx,ny,1) , (1,1,1) ) + self.assertEqual( grid.findCellCornerXY(0,0,0) , 0 ) + self.assertEqual( grid.findCellCornerXY(nx,0,0) , nx) + self.assertEqual( grid.findCellCornerXY(0 , ny , 0) , (nx + 1 ) * ny ) + self.assertEqual( grid.findCellCornerXY(nx,ny,0) , (nx + 1 ) * (ny + 1) - 1) + + self.assertEqual( grid.findCellCornerXY(0.25,0,0) , 0 ) + self.assertEqual( grid.findCellCornerXY(0,0.25,0) , 0 ) + + self.assertEqual( grid.findCellCornerXY(nx - 0.25,0,0) , nx ) + self.assertEqual( grid.findCellCornerXY(nx , 0.25,0) , nx ) + + self.assertEqual( grid.findCellCornerXY(0 , ny - 0.25, 0) , (nx + 1 ) * ny ) + self.assertEqual( grid.findCellCornerXY(0.25 , ny , 0) , (nx + 1 ) * ny ) + + self.assertEqual( grid.findCellCornerXY(nx -0.25 ,ny,0) , (nx + 1 ) * (ny + 1) - 1) + self.assertEqual( grid.findCellCornerXY(nx , ny - 0.25,0) , (nx + 1 ) * (ny + 1) - 1) + + + def test_dims(self): + grid = GridGen.createRectangular( (10,20,30) , (1,1,1) ) + self.assertEqual( grid.getNX() , 10 ) + self.assertEqual( grid.getNY() , 20 ) + self.assertEqual( grid.getNZ() , 30 ) + self.assertEqual( grid.getGlobalSize() , 30*10*20 ) + + self.assertEqual( grid.getDims() , (10,20,30,6000) ) + + + + def test_create(self): + with self.assertRaises(ValueError): + grid = GridGen.createRectangular( (10,20,30) , (1,1,1) , actnum = [0,1,1,2]) + + with self.assertRaises(ValueError): + grid = GridGen.createRectangular( (10,20,30) , (1,1,1) , actnum = IntVector(initial_size = 10)) + + actnum = IntVector(default_value = 1 , initial_size = 6000) + actnum[0] = 0 + actnum[1] = 0 + grid = GridGen.createRectangular( (10,20,30) , (1,1,1) , actnum = actnum) + self.assertEqual( grid.getNumActive( ) , 30*20*10 - 2) + + def test_repr_and_name(self): + grid = GridGen.createRectangular((2,2,2), (10,10,10), actnum=[0,0,0,0,1,1,1,1]) + pfx = 'EclGrid(' + rep = repr(grid) + self.assertEqual(pfx, rep[:len(pfx)]) + self.assertEqual(type(rep), type('')) + self.assertEqual(type(grid.getName()), type('')) + with TestAreaContext("python/ecl_grid/repr"): + grid.save_EGRID("CASE.EGRID") + g2 = EclGrid("CASE.EGRID") + r2 = repr(g2) + self.assertEqual(pfx, r2[:len(pfx)]) + self.assertEqual(type(r2), type('')) + self.assertEqual(type(g2.getName()), type('')) + + def test_node_pos(self): + grid = GridGen.createRectangular( (10,20,30) , (1,1,1) ) + with self.assertRaises(IndexError): + grid.getNodePos(-1,0,0) + + with self.assertRaises(IndexError): + grid.getNodePos(11,0,0) + + p0 = grid.getNodePos(0,0,0) + self.assertEqual( p0 , (0,0,0)) + + p7 = grid.getNodePos(10,20,30) + self.assertEqual( p7 , (10,20,30)) + + + def test_truncated_file(self): + grid = GridGen.createRectangular( (10,20,30) , (1,1,1) ) + with TestAreaContext("python/ecl_grid/truncated"): + grid.save_EGRID( "TEST.EGRID") + + size = os.path.getsize( "TEST.EGRID") + with open("TEST.EGRID" , "r+") as f: + f.truncate( size / 2 ) + + with self.assertRaises(IOError): + EclGrid("TEST.EGRID") + + def test_posXY1(self): + nx = 4 + ny = 1 + nz = 1 + grid = GridGen.createRectangular( (nx,ny,nz) , (1,1,1) ) + (i,j) = grid.findCellXY( 0.5 , 0.5, 0 ) + self.assertEqual(i , 0) + self.assertEqual(j , 0) + + (i,j) = grid.findCellXY( 3.5 , 0.5, 0 ) + self.assertEqual(i , 3) + self.assertEqual(j , 0) + + + def test_init_ACTNUM(self): + nx = 10 + ny = 23 + nz = 7 + grid = GridGen.createRectangular( (nx,ny,nz) , (1,1,1) ) + actnum = grid.exportACTNUM() + + self.assertEqual( len(actnum) , nx*ny*nz ) + self.assertEqual( actnum[0] , 1 ) + self.assertEqual( actnum[nx*ny*nz - 1] , 1 ) + + actnum_kw = grid.exportACTNUMKw( ) + self.assertEqual(len(actnum_kw) , len(actnum)) + for a1,a2 in zip(actnum, actnum_kw): + self.assertEqual(a1, a2) + + + def test_posXY(self): + nx = 10 + ny = 23 + nz = 7 + grid = GridGen.createRectangular( (nx,ny,nz) , (1,1,1) ) + with self.assertRaises(IndexError): + grid.findCellXY( 1 , 1, -1 ) + + with self.assertRaises(IndexError): + grid.findCellXY( 1 , 1, nz + 1 ) + + with self.assertRaises(ValueError): + grid.findCellXY(15 , 78 , 2) + + + i,j = grid.findCellXY( 1.5 , 1.5 , 2 ) + self.assertEqual(i , 1) + self.assertEqual(j , 1) + + + for i in range(nx): + for j in range(ny): + p = grid.findCellXY(i + 0.5 , j+ 0.5 , 0) + self.assertEqual( p[0] , i ) + self.assertEqual( p[1] , j ) + + c = grid.findCellCornerXY( 0.10 , 0.10 , 0 ) + self.assertEqual(c , 0) + + c = grid.findCellCornerXY( 0.90 , 0.90 , 0 ) + self.assertEqual( c , (nx + 1) + 1 ) + + c = grid.findCellCornerXY( 0.10 , 0.90 , 0 ) + self.assertEqual( c , (nx + 1) ) + + c = grid.findCellCornerXY( 0.90 , 0.90 , 0 ) + self.assertEqual( c , (nx + 1) + 1 ) + + c = grid.findCellCornerXY( 0.90 , 0.10 , 0 ) + self.assertEqual( c , 1 ) + + def test_compressed_copy(self): + nx = 10 + ny = 10 + nz = 10 + grid = GridGen.createRectangular( (nx,ny,nz) , (1,1,1) ) + kw1 = EclKW("KW" , 1001 , EclDataType.ECL_INT ) + with self.assertRaises(ValueError): + cp = grid.compressedKWCopy( kw1 ) + + + def test_dxdydz(self): + nx = 10 + ny = 10 + nz = 10 + grid = GridGen.createRectangular( (nx,ny,nz) , (2,3,4) ) + + (dx,dy,dz) = grid.getCellDims( active_index = 0 ) + self.assertEqual( dx , 2 ) + self.assertEqual( dy , 3 ) + self.assertEqual( dz , 4 ) + + def test_numpy3D(self): + nx = 10 + ny = 7 + nz = 5 + grid = GridGen.createRectangular((nx,ny,nz) , (1,1,1)) + kw = EclKW( "SWAT" , nx*ny*nz , EclDataType.ECL_FLOAT ) + numpy_3d = grid.create3D( kw ) + + def test_len(self): + nx = 10 + ny = 11 + nz = 12 + actnum = EclKW( "ACTNUM" , nx*ny*nz , EclDataType.ECL_INT ) + actnum[0] = 1 + actnum[1] = 1 + actnum[2] = 1 + actnum[3] = 1 + + grid = GridGen.createRectangular( (nx,ny,nz) , (1,1,1), actnum = actnum) + self.assertEqual( len(grid) , nx*ny*nz ) + self.assertEqual( grid.getNumActive( ) , 4 ) + + + def test_output_units(self): + n = 10 + a = 1 + grid = GridGen.createRectangular( (n,n,n), (a,a,a)) + + with TestAreaContext("python/ecl_grid/units"): + grid.save_EGRID( "CASE.EGRID" , output_unit = EclUnitTypeEnum.ECL_FIELD_UNITS ) + f = EclFile("CASE.EGRID") + g = f["GRIDUNIT"][0] + self.assertEqual( g[0].strip( ) , "FEET" ) + g2 = EclGrid("CASE.EGRID") + self.assertFloatEqual( g2.cell_volume( global_index = 0 ) , 3.28084*3.28084*3.28084) + + + grid.save_EGRID( "CASE.EGRID" ) + f = EclFile("CASE.EGRID") + g = f["GRIDUNIT"][0] + self.assertEqual( g[0].strip( ) , "METRES" ) + + grid.save_EGRID( "CASE.EGRID" , output_unit = EclUnitTypeEnum.ECL_LAB_UNITS) + f = EclFile("CASE.EGRID") + g = f["GRIDUNIT"][0] + self.assertEqual( g[0].strip() , "CM" ) + g2 = EclGrid("CASE.EGRID") + self.assertFloatEqual( g2.cell_volume( global_index = 0 ) , 100*100*100 ) + + def test_volume(self): + dim = (10,10,10) + dV = (2,2,2) + + grids = createVolumeTestGridBase(dim, dV) + for grid in grids: + tot_vol = createWrapperGrid(grid).cell_volume(0) + cell_volumes = [grid.cell_volume(i) for i in range(grid.getGlobalSize())] + self.assertTrue(min(cell_volumes) >= 0) + self.assertFloatEqual(sum(cell_volumes), tot_vol) + + def test_unique_containment(self): + test_base = createContainmentTestBase() + + for steps_per_unit, grid in test_base: + wgrid = createWrapperGrid(grid) + + (xmin, xmax), (ymin, ymax), (zmin, zmax) = getMinMaxValue(wgrid) + x_space = linspace(xmin-1, xmax+1, (xmax-xmin+2)*steps_per_unit+1) + y_space = linspace(ymin-1, ymax+1, (ymax-ymin+2)*steps_per_unit+1) + z_space = linspace(zmin-1, zmax+1, (zmax-zmin+2)*steps_per_unit+1) + + for x, y, z in itertools.product(x_space, y_space, z_space): + hits = [ + grid.cell_contains(x, y, z, i) + for i in range(grid.getGlobalSize()) + ].count(True) + + self.assertTrue(hits in [0, 1]) + + self.assertEqual( + 1 if wgrid.cell_contains(x, y, z, 0) else 0, + hits + ) + + def test_cell_corner_containment(self): + n = 4 + d = 10 + grid = GridGen.createRectangular( (n, n, n), (d, d, d)) + + for x, y, z in itertools.product(range(0, n*d+1, d), repeat=3): + self.assertEqual( + 1, + [grid.cell_contains(x, y, z, i) for i in range(n**3)].count(True) + ) + + def test_cell_corner_containment_compatability(self): + grid = GridGen.createRectangular( (3,3,3), (1,1,1) ) + + for x, y, z in itertools.product(range(4), repeat=3): + for i in range(27): + if grid.cell_contains(x, y, z, i): + self.assertEqual( + CORNER_HOME[(x,y,z)], + i + ) + + def test_cell_face_containment(self): + n = 4 + d = 10 + grid = GridGen.createRectangular( (n, n, n), (d, d, d)) + + for x, y, z in itertools.product(range(d/2, n*d, d), repeat=3): + for axis, direction in itertools.product(range(3), [-1, 1]): + p = [x, y, z] + p[axis] = p[axis] + direction*d/2 + self.assertEqual( + 1, + [grid.cell_contains(p[0], p[1], p[2], i) for i in range(n**3)].count(True) + ) + + # This test generates a cell that is concave on ALL 6 sides + def test_concave_cell_containment(self): + points = [ + (5, 5, 5), + (20, 10, 10), + (10, 20, 10), + (25, 25, 5), + (10, 10, 20), + (25, 5, 25), + (5, 25, 25), + (20, 20, 20) + ] + + grid = GridGen.createSingleCellGrid(points) + + assertPoint = lambda p : self.assertTrue( + grid.cell_contains(p[0], p[1], p[2], 0) + ) + + assertNotPoint = lambda p : self.assertFalse( + grid.cell_contains(p[0], p[1], p[2], 0) + ) + + # Cell center + assertPoint(average(points)); + + # "Side" center + assertNotPoint(average(points[0:4:])) + assertNotPoint(average(points[4:8:])) + assertNotPoint(average(points[1:8:2])) + assertNotPoint(average(points[0:8:2])) + assertNotPoint(average(points[0:8:4] + points[1:8:4])) + assertNotPoint(average(points[2:8:4] + points[3:8:4])) + + # Corners + for p in points: + assertPoint(p) + + # Edges + edges = ([(i, i+1) for i in range(0, 8, 2)] + + [(i, i+2) for i in [0, 1, 4, 5]] + + [(i, i+4) for i in range(4)] + + [(1,2), (2,7), (1,7), (4,7), (2,4), (4,1)]) + for a,b in edges: + assertPoint(average([points[a], points[b]])) + + # Epsilon inside from corners + middle_point = average(points) + for p in points: + assertPoint(average(20*[p] + [middle_point])) + + # Espilon outside + middle_point[2] = 0 + for p in points[0:4:]: + assertNotPoint(average(20*[p] + [middle_point])) + + middle_point[2] = 30 + for p in points[4:8:]: + assertNotPoint(average(20*[p] + [middle_point])) + + # This test generates a cell that is strictly convex on ALL 6 sides + def test_concvex_cell_containment(self): + points = [ + (10, 10, 10), + (25, 5, 5), + (5, 25, 5), + (20, 20, 10), + (5, 5, 25), + (20, 10, 20), + (10, 20, 20), + (25, 25, 25) + ] + + grid = GridGen.createSingleCellGrid(points) + + assertPoint = lambda p : self.assertTrue( + grid.cell_contains(p[0], p[1], p[2], 0) + ) + + assertNotPoint = lambda p : self.assertFalse( + grid.cell_contains(p[0], p[1], p[2], 0) + ) + + # Cell center + assertPoint(average(points)); + + # "Side" center + assertPoint(average(points[0:4:])) + assertPoint(average(points[4:8:])) + assertPoint(average(points[1:8:2])) + assertPoint(average(points[0:8:2])) + assertPoint(average(points[0:8:4] + points[1:8:4])) + assertPoint(average(points[2:8:4] + points[3:8:4])) + + # Corners + for p in points: + assertPoint(p) + + # Edges + edges = ([(i, i+1) for i in range(0, 8, 2)] + + [(i, i+2) for i in [0, 1, 4, 5]] + + [(i, i+4) for i in range(4)] + + [(1,2), (2,7), (1,7), (4,7), (2,4), (4,1)]) + for a,b in edges: + assertPoint(average([points[a], points[b]])) + + # Epsilon inside from corners + middle_point = average(points) + for p in points: + assertPoint(average(20*[p] + [middle_point])) + + # Espilon outside + middle_point[2] = 0 + for p in points[0:4:]: + assertNotPoint(average(20*[p] + [middle_point])) + + middle_point[2] = 30 + for p in points[4:8:]: + assertNotPoint(average(20*[p] + [middle_point])) diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_grid_statoil.py b/ThirdParty/Ert/python/tests/ecl/test_grid_statoil.py similarity index 92% rename from ThirdParty/Ert/python/tests/core/ecl/test_grid_statoil.py rename to ThirdParty/Ert/python/tests/ecl/test_grid_statoil.py index 96f4a2c011..db64e14680 100644 --- a/ThirdParty/Ert/python/tests/core/ecl/test_grid_statoil.py +++ b/ThirdParty/Ert/python/tests/ecl/test_grid_statoil.py @@ -22,9 +22,9 @@ from unittest import skipIf import time -from ert.ecl import EclTypeEnum, EclKW, EclGrid, EclFile, openEclFile -from ert.util import DoubleVector, IntVector -from ert.test import ExtendedTestCase , TestAreaContext +from ecl.ecl import EclDataType, EclKW, EclGrid, EclFile, openEclFile +from ecl.util import DoubleVector, IntVector +from ecl.test import ExtendedTestCase , TestAreaContext class GridTest(ExtendedTestCase): @@ -107,7 +107,7 @@ def test_GRID( self ): def test_EGRID( self ): grid = EclGrid(self.egrid_file()) self.assertTrue(grid) - dims = grid.dims + dims = grid.getDims() self.assertEqual(dims[0] , grid.getNX()) self.assertEqual(dims[1] , grid.getNY()) self.assertEqual(dims[2] , grid.getNZ()) @@ -116,11 +116,11 @@ def test_EGRID( self ): def create(self, filename, load_actnum=True): fileH = open(filename, "r") - specgrid = EclKW.read_grdecl(fileH, "SPECGRID", ecl_type=EclTypeEnum.ECL_INT_TYPE, strict=False) + specgrid = EclKW.read_grdecl(fileH, "SPECGRID", ecl_type=EclDataType.ECL_INT, strict=False) zcorn = EclKW.read_grdecl(fileH, "ZCORN") coord = EclKW.read_grdecl(fileH, "COORD") if load_actnum: - actnum = EclKW.read_grdecl(fileH, "ACTNUM", ecl_type=EclTypeEnum.ECL_INT_TYPE) + actnum = EclKW.read_grdecl(fileH, "ACTNUM", ecl_type=EclDataType.ECL_INT) else: actnum = None @@ -291,20 +291,20 @@ def test_boundingBox(self): def test_dual(self): with TestAreaContext("python/grid-test/testDual"): grid = EclGrid(self.egrid_file()) - self.assertFalse(grid.dual_grid) - self.assertTrue(grid.nactive_fracture == 0) + self.assertFalse(grid.dualGrid()) + self.assertTrue(grid.getNumActiveFracture() == 0) grid2 = EclGrid(self.grid_file()) - self.assertFalse(grid.dual_grid) - self.assertTrue(grid.nactive_fracture == 0) + self.assertFalse(grid.dualGrid()) + self.assertTrue(grid.getNumActiveFracture() == 0) dgrid = EclGrid(self.createTestPath("Statoil/ECLIPSE/DualPoro/DUALPOR_MSW.EGRID")) - self.assertTrue(dgrid.nactive == dgrid.nactive_fracture) - self.assertTrue(dgrid.nactive == 46118) + self.assertTrue(dgrid.getNumActive() == dgrid.getNumActiveFracture()) + self.assertTrue(dgrid.getNumActive() == 46118) dgrid2 = EclGrid(self.createTestPath("Statoil/ECLIPSE/DualPoro/DUALPOR_MSW.GRID")) - self.assertTrue(dgrid.nactive == dgrid.nactive_fracture) - self.assertTrue(dgrid.nactive == 46118) + self.assertTrue(dgrid.getNumActive() == dgrid.getNumActiveFracture()) + self.assertTrue(dgrid.getNumActive() == 46118) self.assertTrue(dgrid.equal(dgrid2)) @@ -312,8 +312,8 @@ def test_dual(self): # situation where some cells are only matrix active, and some # cells are only fracture active. dgrid = EclGrid(self.createTestPath("Statoil/ECLIPSE/DualPoro/DUAL_DIFF.EGRID")) - self.assertTrue(dgrid.nactive == 106) - self.assertTrue(dgrid.nactive_fracture == 105) + self.assertTrue(dgrid.getNumActive() == 106) + self.assertTrue(dgrid.getNumActiveFracture() == 105) self.assertTrue(dgrid.get_active_fracture_index(global_index=0) == -1) self.assertTrue(dgrid.get_active_fracture_index(global_index=2) == -1) @@ -330,8 +330,8 @@ def test_dual(self): self.assertTrue(dgrid.equal(dgrid2 , verbose = True)) - @skipIf(ExtendedTestCase.slowTestShouldNotRun(), "Slow test of nactive large memory skipped!") - def test_nactive_large_memory(self): + @skipIf(ExtendedTestCase.slowTestShouldNotRun(), "Slow test of numActive large memory skipped!") + def test_num_active_large_memory(self): case = self.createTestPath("Statoil/ECLIPSE/Gurbat/ECLIPSE") vecList = [] for i in range(12500): @@ -341,8 +341,8 @@ def test_nactive_large_memory(self): grid1 = EclGrid(case) grid2 = EclGrid(case) - self.assertEqual(grid1.nactive, grid2.nactive) - self.assertEqual(grid1.nactive, 34770) + self.assertEqual(grid1.getNumActive(), grid2.getNumActive()) + self.assertEqual(grid1.getNumActive(), 34770) def test_no_mapaxes_check_for_nan(self): diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_indexed_read.py b/ThirdParty/Ert/python/tests/ecl/test_indexed_read.py similarity index 75% rename from ThirdParty/Ert/python/tests/core/ecl/test_indexed_read.py rename to ThirdParty/Ert/python/tests/ecl/test_indexed_read.py index bd784afd8a..8de919409a 100644 --- a/ThirdParty/Ert/python/tests/core/ecl/test_indexed_read.py +++ b/ThirdParty/Ert/python/tests/ecl/test_indexed_read.py @@ -1,26 +1,21 @@ import ctypes -import ert -from cwrap import CWrapper -from ert.ecl import EclKW, EclFile, EclTypeEnum, FortIO -from ert.test import ExtendedTestCase, TestAreaContext -from ert.util import IntVector - - -ecl_lib = ert.load("libecl") -ecl_wrapper = CWrapper(ecl_lib) - - -freadIndexedData = ecl_wrapper.prototype("void ecl_kw_fread_indexed_data(fortio, int, int, int, int_vector, char*)") # fortio, offset, type, count, index_map, buffer -eclFileIndexedRead = ecl_wrapper.prototype("void ecl_file_indexed_read(ecl_file, char*, int, int_vector, char*)") # ecl_file, kw, index, index_map, buffer +import ecl +from ecl.ecl import EclPrototype +from ecl.ecl import EclKW, EclFile, EclDataType, FortIO +from ecl.test import ExtendedTestCase, TestAreaContext +from ecl.util import IntVector class EclIndexedReadTest(ExtendedTestCase): + _freadIndexedData = EclPrototype("void ecl_kw_fread_indexed_data_python(fortio, int, ecl_data_type, int, int_vector, char*)", bind = False) # fortio, offset, type, count, index_map, buffer + _eclFileIndexedRead = EclPrototype("void ecl_file_indexed_read(ecl_file, char*, int, int_vector, char*)", bind = False) # ecl_file, kw, index, index_map, buffer + def test_ecl_kw_indexed_read(self): with TestAreaContext("ecl_kw_indexed_read") as area: fortio = FortIO("index_test", mode=FortIO.WRITE_MODE) element_count = 100000 - ecl_kw = EclKW.create("TEST", element_count, EclTypeEnum.ECL_INT_TYPE) + ecl_kw = EclKW("TEST", element_count, EclDataType.ECL_INT) for index in range(element_count): ecl_kw[index] = index @@ -59,7 +54,7 @@ def test_ecl_kw_indexed_read(self): char_buffer = ctypes.create_string_buffer(len(index_map) * ctypes.sizeof(ctypes.c_int)) - freadIndexedData(fortio, 24, EclTypeEnum.ECL_INT_TYPE, element_count, index_map, char_buffer) + self._freadIndexedData(fortio, 24, EclDataType.ECL_INT, element_count, index_map, char_buffer) int_buffer = ctypes.cast(char_buffer, ctypes.POINTER(ctypes.c_int)) @@ -73,8 +68,8 @@ def test_ecl_file_indexed_read(self): fortio = FortIO("ecl_file_index_test", mode=FortIO.WRITE_MODE) element_count = 100000 - ecl_kw_1 = EclKW.create("TEST1", element_count, EclTypeEnum.ECL_INT_TYPE) - ecl_kw_2 = EclKW.create("TEST2", element_count, EclTypeEnum.ECL_INT_TYPE) + ecl_kw_1 = EclKW("TEST1", element_count, EclDataType.ECL_INT) + ecl_kw_2 = EclKW("TEST2", element_count, EclDataType.ECL_INT) for index in range(element_count): ecl_kw_1[index] = index @@ -110,8 +105,8 @@ def test_ecl_file_indexed_read(self): char_buffer_1 = ctypes.create_string_buffer(len(index_map) * ctypes.sizeof(ctypes.c_int)) char_buffer_2 = ctypes.create_string_buffer(len(index_map) * ctypes.sizeof(ctypes.c_int)) - eclFileIndexedRead(ecl_file, "TEST2", 0, index_map, char_buffer_2) - eclFileIndexedRead(ecl_file, "TEST1", 0, index_map, char_buffer_1) + self._eclFileIndexedRead(ecl_file, "TEST2", 0, index_map, char_buffer_2) + self._eclFileIndexedRead(ecl_file, "TEST1", 0, index_map, char_buffer_1) int_buffer_1 = ctypes.cast(char_buffer_1, ctypes.POINTER(ctypes.c_int)) int_buffer_2 = ctypes.cast(char_buffer_2, ctypes.POINTER(ctypes.c_int)) diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_kw_function.py b/ThirdParty/Ert/python/tests/ecl/test_kw_function.py similarity index 88% rename from ThirdParty/Ert/python/tests/core/ecl/test_kw_function.py rename to ThirdParty/Ert/python/tests/ecl/test_kw_function.py index cd60c14f60..4f45f2f313 100644 --- a/ThirdParty/Ert/python/tests/core/ecl/test_kw_function.py +++ b/ThirdParty/Ert/python/tests/ecl/test_kw_function.py @@ -16,9 +16,9 @@ # for more details. import os import random -from ert.ecl import EclKW, EclTypeEnum, EclGrid , Ecl3DKW -from ert.util import IntVector -from ert.test import ExtendedTestCase +from ecl.ecl import EclKW, EclDataType, EclGrid , Ecl3DKW +from ecl.util import IntVector +from ecl.test import ExtendedTestCase class KWFunctionTest(ExtendedTestCase): @@ -32,7 +32,7 @@ def test_region_filter(self): grid = EclGrid.createRectangular( (nx,ny,nz) , (1,1,1) , actnum = actnum) self.assertEqual( grid.getNumActive() , nx*ny*nz - 1 ) - kw = Ecl3DKW.create( "REGIONS" , grid , EclTypeEnum.ECL_INT_TYPE , global_active = True ) + kw = Ecl3DKW.create( "REGIONS" , grid , EclDataType.ECL_INT , global_active = True ) kw.assign( 0 ) kw[0:nx*ny/2] = 1 kw[5,2,0] = 0 diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_layer.py b/ThirdParty/Ert/python/tests/ecl/test_layer.py similarity index 97% rename from ThirdParty/Ert/python/tests/core/ecl/test_layer.py rename to ThirdParty/Ert/python/tests/ecl/test_layer.py index 26a176288f..370eb6ae8e 100644 --- a/ThirdParty/Ert/python/tests/core/ecl/test_layer.py +++ b/ThirdParty/Ert/python/tests/ecl/test_layer.py @@ -18,11 +18,11 @@ from unittest import skipIf import time -from ert.util import IntVector -from ert.ecl import EclGrid -from ert.geo import CPolyline -from ert.ecl.faults import Layer , FaultCollection -from ert.test import ExtendedTestCase , TestAreaContext +from ecl.util import IntVector +from ecl.ecl import EclGrid +from ecl.geo import CPolyline +from ecl.ecl.faults import Layer , FaultCollection +from ecl.test import ExtendedTestCase , TestAreaContext class LayerTest(ExtendedTestCase): @@ -112,7 +112,7 @@ def test_fault_barrier(self): nx = 120 ny = 60 nz = 43 - grid = EclGrid.create_rectangular( (nx , ny , nz) , (1,1,1) ) + grid = EclGrid.createRectangular( (nx , ny , nz) , (1,1,1) ) with TestAreaContext("python/faults/line_order"): with open("faults.grdecl" , "w") as f: f.write("""FAULTS diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_npv.py b/ThirdParty/Ert/python/tests/ecl/test_npv.py similarity index 97% rename from ThirdParty/Ert/python/tests/core/ecl/test_npv.py rename to ThirdParty/Ert/python/tests/ecl/test_npv.py index ac31d398ef..dceda077c1 100644 --- a/ThirdParty/Ert/python/tests/core/ecl/test_npv.py +++ b/ThirdParty/Ert/python/tests/ecl/test_npv.py @@ -24,11 +24,11 @@ except ImportError: from unittest import skipIf, skipUnless, skipIf -from ert.ecl import EclSum -from ert.ecl import EclNPV , NPVPriceVector +from ecl.ecl import EclSum +from ecl.ecl import EclNPV , NPVPriceVector -from ert.util import StringList, TimeVector, DoubleVector , CTime -from ert.test import ExtendedTestCase , TestAreaContext +from ecl.util import StringList, TimeVector, DoubleVector , CTime +from ecl.test import ExtendedTestCase , TestAreaContext base = "ECLIPSE" diff --git a/ThirdParty/Ert/python/tests/ecl/test_region.py b/ThirdParty/Ert/python/tests/ecl/test_region.py new file mode 100644 index 0000000000..5e3cef90d8 --- /dev/null +++ b/ThirdParty/Ert/python/tests/ecl/test_region.py @@ -0,0 +1,37 @@ +#!/usr/bin/env python +# Copyright (C) 2017 Statoil ASA, Norway. +# +# The file 'test_region.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. +from ecl.ecl import EclGrid, EclKW, EclRegion, EclDataType +from ecl.ecl.faults import Layer +from ecl.test import ExtendedTestCase + + +class RegionTest(ExtendedTestCase): + + def test_equal(self): + grid = EclGrid.createRectangular( (10,10,1) , (1,1,1)) + kw_int = EclKW( "INT" , grid.getGlobalSize( ) , EclDataType.ECL_INT ) + kw_float = EclKW( "FLOAT" , grid.getGlobalSize( ) , EclDataType.ECL_FLOAT ) + + kw_int[0:49] = 1 + region = EclRegion(grid, False) + region.select_equal( kw_int , 1 ) + glist = region.getGlobalList() + for g in glist: + self.assertEqual( kw_int[g] , 1 ) + + with self.assertRaises(ValueError): + region.select_equal( kw_float , 1 ) diff --git a/ThirdParty/Ert/python/tests/ecl/test_region_statoil.py b/ThirdParty/Ert/python/tests/ecl/test_region_statoil.py new file mode 100644 index 0000000000..fbe0c8035c --- /dev/null +++ b/ThirdParty/Ert/python/tests/ecl/test_region_statoil.py @@ -0,0 +1,205 @@ +#!/usr/bin/env python +# Copyright (C) 2012 Statoil ASA, Norway. +# +# The file 'test_region.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. +from ecl.ecl import EclFile, EclGrid, EclRegion +from ecl.ecl.faults import Layer +from ecl.test import ExtendedTestCase + + +class RegionTest(ExtendedTestCase): + def setUp(self): + case = self.createTestPath("Statoil/ECLIPSE/Gurbat/ECLIPSE") + self.grid = EclGrid(case) + self.rst_file = EclFile("%s.UNRST" % case) + self.init_file = EclFile("%s.INIT" % case) + + + def test_kw_imul(self): + P = self.rst_file["PRESSURE"][5] + fipnum = self.init_file["FIPNUM"][0] + fipnum_copy = fipnum.deep_copy() + + reg = EclRegion(self.grid, False) + reg.select_more(P, 260) + fipnum.mul(-1, mask=reg) + self.assertFalse(fipnum.equal(fipnum_copy)) + + fipnum.mul(-1, mask=reg) + self.assertTrue(fipnum.equal(fipnum_copy)) + + def test_equal(self): + reg1 = EclRegion(self.grid , False) + reg2 = EclRegion(self.grid , False) + + self.assertTrue( reg1 == reg2 ) + + reg1.select_islice(4 , 6) + self.assertFalse( reg1 == reg2 ) + reg2.select_islice(4,7) + self.assertFalse( reg1 == reg2 ) + reg1.select_islice(7,7) + self.assertTrue( reg1 == reg2 ) + + + def test_kw_idiv(self): + P = self.rst_file["PRESSURE"][5] + fipnum = self.init_file["FIPNUM"][0] + fipnum_copy = fipnum.deep_copy() + + reg = EclRegion(self.grid, False) + reg.select_more(P, 260) + fipnum.div(-1, mask=reg) + self.assertFalse(fipnum.equal(fipnum_copy)) + + fipnum.div(-1, mask=reg) + self.assertTrue(fipnum.equal(fipnum_copy)) + + + def test_kw_iadd(self): + P = self.rst_file["PRESSURE"][5] + fipnum = self.init_file["FIPNUM"][0] + fipnum_copy = fipnum.deep_copy() + + reg = EclRegion(self.grid, False) + reg.select_more(P, 260) + fipnum.add(1, mask=reg) + self.assertFalse(fipnum.equal(fipnum_copy)) + + reg.invert() + fipnum.add(1, mask=reg) + + fipnum.sub(1) + self.assertTrue(fipnum.equal(fipnum_copy)) + + + def test_kw_isub(self): + P = self.rst_file["PRESSURE"][5] + fipnum = self.init_file["FIPNUM"][0] + fipnum_copy = fipnum.deep_copy() + + reg = EclRegion(self.grid, False) + reg.select_more(P, 260) + fipnum.sub(1, mask=reg) + self.assertFalse(fipnum.equal(fipnum_copy)) + fipnum.add(1, mask=reg) + self.assertTrue(fipnum.equal(fipnum_copy)) + + + def test_slice(self): + reg = EclRegion(self.grid, False) + reg.select_islice(0, 5) + OK = True + + global_list = reg.getGlobalList() + self.assertEqual(global_list.parent(), reg) + + for gi in global_list: + (i, j, k) = self.grid.get_ijk(global_index=gi) + if i > 5: + OK = False + self.assertTrue(OK) + self.assertTrue(self.grid.getNY() * self.grid.getNZ() * 6 == len(reg.getGlobalList())) + + reg.select_jslice(7, 8, intersect=True) + OK = True + for gi in reg.getGlobalList(): + (i, j, k) = self.grid.get_ijk(global_index=gi) + if i > 5: + OK = False + + if j < 7 or j > 8: + OK = False + + self.assertTrue(OK) + self.assertTrue(2 * self.grid.getNZ() * 6 == len(reg.getGlobalList())) + + reg2 = EclRegion(self.grid, False) + reg2.select_kslice(3, 5) + reg &= reg2 + OK = True + for gi in reg.getGlobalList(): + (i, j, k) = self.grid.get_ijk(global_index=gi) + if i > 5: + OK = False + + if j < 7 or j > 8: + OK = False + + if k < 3 or k > 5: + OK = False + + self.assertTrue(OK) + self.assertTrue(2 * 3 * 6 == len(reg.getGlobalList())) + + + + def test_index_list(self): + reg = EclRegion(self.grid, False) + reg.select_islice(0, 5) + active_list = reg.getActiveList() + global_list = reg.getGlobalList() + + + + def test_polygon(self): + reg = EclRegion(self.grid, False) + (x,y,z) = self.grid.get_xyz( ijk=(10,10,0) ) + dx = 0.1 + dy = 0.1 + reg.select_inside_polygon( [(x-dx,y-dy) , (x-dx,y+dy) , (x+dx,y+dy) , (x+dx,y-dy)] ) + self.assertTrue( self.grid.getNZ() == len(reg.getGlobalList())) + + + def test_heidrun(self): + root = self.createTestPath("Statoil/ECLIPSE/Heidrun") + grid = EclGrid( "%s/FF12_2013B2_AMAP_AOP-J15_NO62_MOVEX.EGRID" % root) + + polygon = [] + with open("%s/polygon.ply" % root) as fileH: + for line in fileH.readlines(): + tmp = line.split() + polygon.append( (float(tmp[0]) , float(tmp[1]))) + self.assertEqual( len(polygon) , 11 ) + + reg = EclRegion( grid , False ) + reg.select_inside_polygon( polygon ) + self.assertEqual( 0 , len(reg.getGlobalList()) % grid.getNZ()) + + + def test_layer(self): + region = EclRegion(self.grid, False) + layer = Layer( self.grid.getNX() , self.grid.getNY() + 1) + with self.assertRaises(ValueError): + region.selectFromLayer( layer , 0 , 1 ) + + layer = Layer( self.grid.getNX() , self.grid.getNY() ) + layer[0,0] = 1 + layer[1,1] = 1 + layer[2,2] = 1 + + with self.assertRaises(ValueError): + region.selectFromLayer( layer , -1 , 1 ) + + with self.assertRaises(ValueError): + region.selectFromLayer( layer , self.grid.getNZ() , 1 ) + + region.selectFromLayer( layer , 0 , 2 ) + glist = region.getGlobalList() + self.assertEqual(0 , len(glist)) + + region.selectFromLayer( layer , 0 , 1 ) + glist = region.getGlobalList() + self.assertEqual(3 , len(glist)) diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_removed.py b/ThirdParty/Ert/python/tests/ecl/test_removed.py similarity index 82% rename from ThirdParty/Ert/python/tests/core/ecl/test_removed.py rename to ThirdParty/Ert/python/tests/ecl/test_removed.py index 54f26f45a8..fd41e1e434 100644 --- a/ThirdParty/Ert/python/tests/core/ecl/test_removed.py +++ b/ThirdParty/Ert/python/tests/ecl/test_removed.py @@ -1,9 +1,8 @@ -import warnings import time import datetime -from ert.test import ExtendedTestCase, TestAreaContext -from ert.ecl import EclFile,EclKW,EclTypeEnum,openFortIO, FortIO +from ecl.test import ExtendedTestCase, TestAreaContext +from ecl.ecl import EclFile,EclKW,EclDataType,openFortIO, FortIO @@ -11,7 +10,7 @@ class Removed_2_1_Test(ExtendedTestCase): def test_ecl_file_block(self): with TestAreaContext("name") as t: - kw = EclKW("TEST", 3, EclTypeEnum.ECL_INT_TYPE) + kw = EclKW("TEST", 3, EclDataType.ECL_INT) with openFortIO("TEST" , mode = FortIO.WRITE_MODE) as f: kw.fwrite( f ) diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_restart.py b/ThirdParty/Ert/python/tests/ecl/test_restart.py similarity index 96% rename from ThirdParty/Ert/python/tests/core/ecl/test_restart.py rename to ThirdParty/Ert/python/tests/ecl/test_restart.py index 391b07ba20..c9e91be399 100644 --- a/ThirdParty/Ert/python/tests/core/ecl/test_restart.py +++ b/ThirdParty/Ert/python/tests/ecl/test_restart.py @@ -17,8 +17,8 @@ from _ctypes import ArgumentError import os import datetime -from ert.ecl import EclFile -from ert.test import ExtendedTestCase +from ecl.ecl import EclFile +from ecl.test import ExtendedTestCase @@ -109,10 +109,10 @@ def test_dates(self): def test_name(self): f = EclFile(self.u_file) - self.assertTrue(f.name == self.u_file) + self.assertTrue(f.getFilename() == self.u_file) f = EclFile(self.xfile0) - self.assertTrue(f.name == self.xfile0) + self.assertTrue(f.getFilename() == self.xfile0) def test_kw( self ): diff --git a/ThirdParty/Ert/python/tests/ecl/test_restart_head.py b/ThirdParty/Ert/python/tests/ecl/test_restart_head.py new file mode 100644 index 0000000000..bd1468a73e --- /dev/null +++ b/ThirdParty/Ert/python/tests/ecl/test_restart_head.py @@ -0,0 +1,41 @@ +# Copyright (C) 2015 Statoil ASA, Norway. +# +# The file 'test_ecl_init_file.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. +import datetime + +from ecl.test import ExtendedTestCase +from ecl.ecl import Ecl3DKW , EclKW, EclRestartFile , EclFile, FortIO, EclFileFlagEnum , EclGrid + +class RestartHeadTest(ExtendedTestCase): + def setUp(self): + self.grid_file = self.createTestPath("Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID") + self.unrst_file = self.createTestPath("Statoil/ECLIPSE/Gurbat/ECLIPSE.UNRST") + self.xrst_file0 = self.createTestPath("Statoil/ECLIPSE/Gurbat/ECLIPSE.X0000") + + def test_headers(self): + g = EclGrid( self.grid_file ) + f = EclRestartFile( g , self.unrst_file ) + + headers = f.headers( ) + self.assertEqual( len(headers) , 63 ) + + with self.assertRaises(IndexError): + f.get_header(1000) + + header = f.get_header( 10 ) + details = header.well_details( ) + self.assertTrue( "NXCONZ" in details ) + self.assertTrue( "NCWMAX" in details ) + diff --git a/ThirdParty/Ert/python/tests/ecl/test_rft.py b/ThirdParty/Ert/python/tests/ecl/test_rft.py new file mode 100644 index 0000000000..3ff440b42c --- /dev/null +++ b/ThirdParty/Ert/python/tests/ecl/test_rft.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python +# Copyright (C) 2016 Statoil ASA, Norway. +# +# The file 'test_rft.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. + + +import datetime +from ecl.util import CTime +from ecl.ecl import EclRFTFile, EclRFTCell, EclPLTCell +from ecl.ecl.rft import WellTrajectory +from ecl.test import ExtendedTestCase +from ecl.ecl import EclRFT + +class RFTTest(ExtendedTestCase): + + def test_create(self): + rft = EclRFT( "WELL" , "RFT" , datetime.date(2015 , 10 , 1 ) , 100 ) + self.assertEqual( len(rft) , 0 ) + + with self.assertRaises(IndexError): + cell = rft[5] + + def test_repr(self): + rft = EclRFT( "WELL" , "RFT" , datetime.date(2015 , 10 , 1 ) , 100 ) + pfx = 'EclRFT(completed_cells = 0, date = 2015-10-01, RFT, MSW)' + self.assertEqual(pfx, repr(rft)[:len(pfx)]) diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_rft_cell.py b/ThirdParty/Ert/python/tests/ecl/test_rft_cell.py similarity index 89% rename from ThirdParty/Ert/python/tests/core/ecl/test_rft_cell.py rename to ThirdParty/Ert/python/tests/ecl/test_rft_cell.py index 11f720c85b..87276f6ad3 100644 --- a/ThirdParty/Ert/python/tests/core/ecl/test_rft_cell.py +++ b/ThirdParty/Ert/python/tests/ecl/test_rft_cell.py @@ -16,9 +16,8 @@ # for more details. -import warnings -from ert.ecl import EclRFTCell, EclPLTCell -from ert.test import ExtendedTestCase +from ecl.ecl import EclRFTCell, EclPLTCell +from ecl.test import ExtendedTestCase # def out_of_range(): @@ -76,12 +75,6 @@ def test_PLT_cell(self): self.assertEqual(j, cell.get_j()) self.assertEqual(k, cell.get_k()) - with warnings.catch_warnings(): - warnings.simplefilter("ignore") - self.assertTrue(cell.get_i() + 1 == cell.i) - self.assertTrue(cell.get_j() + 1 == cell.j) - self.assertTrue(cell.get_k() + 1 == cell.k) - self.assertFloatEqual(pressure, cell.pressure) self.assertFloatEqual(depth, cell.depth) self.assertFloatEqual(orat, cell.orat) diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_rft_statoil.py b/ThirdParty/Ert/python/tests/ecl/test_rft_statoil.py similarity index 96% rename from ThirdParty/Ert/python/tests/core/ecl/test_rft_statoil.py rename to ThirdParty/Ert/python/tests/ecl/test_rft_statoil.py index 147ee80cbb..be3329e230 100644 --- a/ThirdParty/Ert/python/tests/core/ecl/test_rft_statoil.py +++ b/ThirdParty/Ert/python/tests/ecl/test_rft_statoil.py @@ -17,9 +17,9 @@ from __future__ import print_function import datetime -from ert.ecl import EclRFTFile, EclRFTCell, EclPLTCell -from ert.ecl.rft import WellTrajectory -from ert.test import ExtendedTestCase +from ecl.ecl import EclRFTFile, EclRFTCell, EclPLTCell +from ecl.ecl.rft import WellTrajectory +from ecl.test import ExtendedTestCase class RFTTest(ExtendedTestCase): @@ -57,7 +57,7 @@ def test_RFT_load( self ): self.assertIsInstance(cell, EclRFTCell) rft.sort() - for h in rftFile.headers: + for h in rftFile.getHeaders(): print(h) self.assertIsInstance( h[1] , datetime.date ) diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_statoil_faults.py b/ThirdParty/Ert/python/tests/ecl/test_statoil_faults.py similarity index 96% rename from ThirdParty/Ert/python/tests/core/ecl/test_statoil_faults.py rename to ThirdParty/Ert/python/tests/ecl/test_statoil_faults.py index e436985e18..2d362b8713 100644 --- a/ThirdParty/Ert/python/tests/core/ecl/test_statoil_faults.py +++ b/ThirdParty/Ert/python/tests/ecl/test_statoil_faults.py @@ -20,9 +20,9 @@ from unittest import skipIf import time -from ert.ecl.faults import FaultCollection, Fault, FaultLine, FaultSegment -from ert.ecl import EclGrid,EclKW,EclTypeEnum -from ert.test import ExtendedTestCase +from ecl.ecl.faults import FaultCollection, Fault, FaultLine, FaultSegment +from ecl.ecl import EclGrid, EclKW, EclDataType +from ecl.test import ExtendedTestCase @@ -30,10 +30,10 @@ class StatoilFaultTest(ExtendedTestCase): def loadGrid(self): grid_file = self.createTestPath("Statoil/ECLIPSE/Faults/grid.grdecl") fileH = open(grid_file, "r") - specgrid = EclKW.read_grdecl(fileH, "SPECGRID", ecl_type=EclTypeEnum.ECL_INT_TYPE, strict=False) + specgrid = EclKW.read_grdecl(fileH, "SPECGRID", ecl_type=EclDataType.ECL_INT, strict=False) zcorn = EclKW.read_grdecl(fileH, "ZCORN") coord = EclKW.read_grdecl(fileH, "COORD") - actnum = EclKW.read_grdecl(fileH, "ACTNUM", ecl_type=EclTypeEnum.ECL_INT_TYPE) + actnum = EclKW.read_grdecl(fileH, "ACTNUM", ecl_type=EclDataType.ECL_INT) return EclGrid.create(specgrid, zcorn, coord, actnum) diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_sum.py b/ThirdParty/Ert/python/tests/ecl/test_sum.py similarity index 92% rename from ThirdParty/Ert/python/tests/core/ecl/test_sum.py rename to ThirdParty/Ert/python/tests/ecl/test_sum.py index 907d15111f..c41d1da0a9 100644 --- a/ThirdParty/Ert/python/tests/core/ecl/test_sum.py +++ b/ThirdParty/Ert/python/tests/ecl/test_sum.py @@ -20,9 +20,9 @@ import csv from unittest import skipIf, skipUnless, skipIf -from ert.ecl import EclSum, EclSumVarType -from ert.test import ExtendedTestCase, TestAreaContext -from ert.test.ecl_mock import createEclSum +from ecl.ecl import EclSum, EclSumVarType +from ecl.test import ExtendedTestCase, TestAreaContext +from ecl.test.ecl_mock import createEclSum def fopr(days): return days @@ -65,7 +65,10 @@ def test_identify_var_type(self): self.assertEqual( EclSum.varType( "WNEWTON") , EclSumVarType.ECL_SMSPEC_MISC_VAR ) self.assertEqual( EclSum.varType( "AARQ:4") , EclSumVarType.ECL_SMSPEC_AQUIFER_VAR ) - case = createEclSum("CSV" , [("FOPT", None , 0) , ("FOPR" , None , 0), ("AARQ" , None , 10)]) + case = createEclSum("CSV" , [("FOPT", None , 0) , + ("FOPR" , None , 0), + ("AARQ" , None , 10), + ("RGPT" , None ,1)]) node = case.smspec_node( "FOPT" ) self.assertEqual( node.varType( ) , EclSumVarType.ECL_SMSPEC_FIELD_VAR ) @@ -74,8 +77,13 @@ def test_identify_var_type(self): self.assertEqual( node.varType( ) , EclSumVarType.ECL_SMSPEC_AQUIFER_VAR ) self.assertEqual( node.getNum( ) , 10 ) - + node = case.smspec_node("RGPT:1") + self.assertEqual( node.varType( ) , EclSumVarType.ECL_SMSPEC_REGION_VAR ) + self.assertEqual( node.getNum( ) , 1 ) + self.assertTrue( node.isTotal( )) + + def test_csv_export(self): case = createEclSum("CSV" , [("FOPT", None , 0) , ("FOPR" , None , 0)]) sep = ";" diff --git a/ThirdParty/Ert/python/tests/core/ecl/test_sum_statoil.py b/ThirdParty/Ert/python/tests/ecl/test_sum_statoil.py similarity index 79% rename from ThirdParty/Ert/python/tests/core/ecl/test_sum_statoil.py rename to ThirdParty/Ert/python/tests/ecl/test_sum_statoil.py index 79e6718477..650aff9987 100644 --- a/ThirdParty/Ert/python/tests/core/ecl/test_sum_statoil.py +++ b/ThirdParty/Ert/python/tests/ecl/test_sum_statoil.py @@ -20,11 +20,11 @@ from unittest import skipIf, skipUnless, skipIf -from ert.ecl import EclSum +from ecl.ecl import EclSum, EclFile -from ert.util import StringList, TimeVector, DoubleVector +from ecl.util import StringList, TimeVector, DoubleVector -from ert.test import ExtendedTestCase , TestAreaContext +from ecl.test import ExtendedTestCase , TestAreaContext import csv base = "ECLIPSE" @@ -248,28 +248,28 @@ def test_var_properties( self ): self.assertRaises(KeyError, sum.smspec_node, "BJARNE") node = sum.smspec_node("FOPT") - self.assertTrue(node.is_total) - self.assertFalse(node.is_historical) + self.assertTrue(node.isTotal()) + self.assertFalse(node.isHistorical()) node = sum.smspec_node("FOPR") - self.assertFalse(node.is_total) - self.assertFalse(node.is_historical) + self.assertFalse(node.isTotal()) + self.assertFalse(node.isHistorical()) self.assertTrue(node.keyword == "FOPR") node = sum.smspec_node("FOPRH") - self.assertFalse(node.is_total) - self.assertTrue(node.is_historical) - self.assertTrue(node.is_rate) + self.assertFalse(node.isTotal()) + self.assertTrue(node.isHistorical()) + self.assertTrue(node.isRate()) self.assertTrue(node.keyword == "FOPRH") node = sum.smspec_node("WOPR:OP_1") - self.assertFalse(node.is_total) - self.assertTrue(node.is_rate) + self.assertFalse(node.isTotal()) + self.assertTrue(node.isRate()) self.assertTrue(node.keyword == "WOPR") node = sum.smspec_node("WOPT:OP_1") - self.assertTrue(node.is_total) - self.assertFalse(node.is_rate) + self.assertTrue(node.isTotal()) + self.assertFalse(node.isRate()) self.assertTrue(node.unit == "SM3") self.assertTrue(node.wgname == "OP_1") self.assertTrue(node.keyword == "WOPT") @@ -277,8 +277,8 @@ def test_var_properties( self ): self.assertTrue(sum.unit("FOPR") == "SM3/DAY") node = sum.smspec_node("FOPTH") - self.assertTrue(node.is_total) - self.assertFalse(node.is_rate) + self.assertTrue(node.isTotal()) + self.assertFalse(node.isRate()) self.assertIsNone(node.wgname) node = sum.smspec_node("FOPTH") @@ -423,9 +423,82 @@ def test_writer(self): self.assertTrue( writer.has_key( "FOPT" )) writer.addTStep( 1 , 100 ) + def test_aquifer(self): case = EclSum( self.createTestPath( "Statoil/ECLIPSE/Aquifer/06_PRESSURE_R009-0")) self.assertTrue( "AAQR:2" in case ) + def test_restart_mapping(self): + history = EclSum( self.createTestPath( "Statoil/ECLIPSE/SummaryRestart/iter-1/NOR-2013A_R007-0") ) + total = EclSum( self.createTestPath( "Statoil/ECLIPSE/SummaryRestart/Prediction/NOR-2013A_R007_PRED-0") , include_restart = True) + + history_dates = history.get_dates( ) + total_dates = total.get_dates( ) + for i in range(len(history_dates)): + self.assertEqual( history_dates[i] , total_dates[i] ) + + + keys = history.keys( pattern = "W*") + for key in keys: + if key in total: + self.assertEqual( history.iget( key , 5 ) , total.iget( key , 5 )) + + self.assertFalse( "WGPR:NOT_21_D" in history ) + self.assertTrue( "WGPR:NOT_21_D" in total ) + + self.assertEqual( total.iget( "WGPR:NOT_21_D", 5) , 0) # Default value + + def test_write(self): + with TestAreaContext("my_space") as area: + intersect_summary = EclSum( self.createTestPath( "Statoil/ECLIPSE/SummaryRestart/iter-1/NOR-2013A_R007-0") ) + self.assertIsNotNone(intersect_summary) + + write_location = os.path.join(os.getcwd(), "CASE") + intersect_summary.fwrite(ecl_case=write_location) + + reloaded_summary = EclSum(write_location) + self.assertEqual(intersect_summary.keys(), reloaded_summary.keys()) + + def test_ix_case(self): + intersect_summary = EclSum(self.createTestPath("Statoil/ECLIPSE/ix/summary/Create_Region_Around_Well")) + self.assertIsNotNone(intersect_summary) + + self.assertTrue( + "HWELL_PROD" in + [intersect_summary.smspec_node(key).wgname for key in intersect_summary.keys()] + ) + + eclipse_summary = EclSum(self.createTestPath("Statoil/ECLIPSE/ix/summary/ECL100/E100_CREATE_REGION_AROUND_WELL")) + self.assertIsNotNone(eclipse_summary) + + hwell_padder = lambda key : key if key.split(":")[-1] != "HWELL_PR" else key + "OD" + self.assertEqual( + intersect_summary.keys("WWCT*"), + map(hwell_padder, eclipse_summary.keys("WWCT*")) + ) + + def test_ix_write(self): + for data_set in [ + "Statoil/ECLIPSE/ix/summary/Create_Region_Around_Well", + "Statoil/ECLIPSE/ix/troll/IX_NOPH3_R04_75X75X1_grid2.SMSPEC" + ]: + + with TestAreaContext("my_space" + data_set.split("/")[-1]) as area: + intersect_summary = EclSum(self.createTestPath(data_set)) + self.assertIsNotNone(intersect_summary) + + write_location = os.path.join(os.getcwd(), "CASE") + intersect_summary.fwrite(ecl_case=write_location) + + reloaded_summary = EclSum(write_location) + self.assertEqual( + list(intersect_summary.keys()), + list(reloaded_summary.keys()) + ) + + def test_ix_caseII(self): + troll_summary = EclSum( self.createTestPath("Statoil/ECLIPSE/ix/troll/IX_NOPH3_R04_75X75X1_grid2.SMSPEC")) + self.assertIsNotNone(troll_summary) + self.assertTrue("WMCTL:Q21BH1" in list(troll_summary.keys())) diff --git a/ThirdParty/Ert/python/tests/ert/CMakeLists.txt b/ThirdParty/Ert/python/tests/ert/CMakeLists.txt deleted file mode 100644 index 892b16a645..0000000000 --- a/ThirdParty/Ert/python/tests/ert/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -set(TEST_SOURCES - __init__.py -) - -add_python_package("python.tests.ert" ${PYTHON_INSTALL_PREFIX}/tests/ert "${TEST_SOURCES}" False) - -add_subdirectory(analysis) -add_subdirectory(config) -add_subdirectory(enkf) -add_subdirectory(job_queue) -add_subdirectory(run) -add_subdirectory(sched) -add_subdirectory(server) -add_subdirectory(testcase) diff --git a/ThirdParty/Ert/python/tests/ert/__init__.py b/ThirdParty/Ert/python/tests/ert/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/python/tests/ert/analysis/CMakeLists.txt b/ThirdParty/Ert/python/tests/ert/analysis/CMakeLists.txt deleted file mode 100644 index 64512c7ede..0000000000 --- a/ThirdParty/Ert/python/tests/ert/analysis/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -set(TEST_SOURCES - __init__.py - test_analysis_module.py - test_linalg.py - test_options_enum.py - test_rml.py - test_std_enkf.py - test_std_enkf_debug.py -) - -add_python_package("python.tests.ert.analysis" ${PYTHON_INSTALL_PREFIX}/tests/ert/analysis "${TEST_SOURCES}" False) - -addPythonTest(ert.analysis.analysis_module tests.ert.analysis.test_analysis_module.AnalysisModuleTest) -addPythonTest(ert.analysis.enums tests.ert.analysis.test_options_enum.AnalysisOptionsEnumTest) -addPythonTest(ert.analysis.linalg tests.ert.analysis.test_linalg.LinalgTest) -addPythonTest(ert.analysis.rml tests.ert.analysis.test_rml.RMLTest) -addPythonTest(ert.analysis.std_enkf tests.ert.analysis.test_std_enkf.StdEnKFTest) -addPythonTest(ert.analysis.std_enkf_debug tests.ert.analysis.test_std_enkf_debug.StdEnKFDebugTest) - diff --git a/ThirdParty/Ert/python/tests/ert/analysis/__init__.py b/ThirdParty/Ert/python/tests/ert/analysis/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/python/tests/ert/analysis/test_analysis_module.py b/ThirdParty/Ert/python/tests/ert/analysis/test_analysis_module.py deleted file mode 100644 index e073e3e12d..0000000000 --- a/ThirdParty/Ert/python/tests/ert/analysis/test_analysis_module.py +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'test_analysis_module.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -import ert -from ert.test import ExtendedTestCase -from ert.analysis import AnalysisModule, AnalysisModuleLoadStatusEnum, AnalysisModuleOptionsEnum - -from ert.util.enums import RngAlgTypeEnum, RngInitModeEnum -from ert.util.rng import RandomNumberGenerator - - -class AnalysisModuleTest(ExtendedTestCase): - def setUp(self): - self.libname = ert.ert_lib_path + "/rml_enkf.so" - self.rng = RandomNumberGenerator(RngAlgTypeEnum.MZRAN, RngInitModeEnum.INIT_DEFAULT) - - def createAnalysisModule(self): - return AnalysisModule(self.rng, lib_name = self.libname) - - def test_load_status_enum(self): - source_file_path = "libanalysis/include/ert/analysis/analysis_module.h" - self.assertEnumIsFullyDefined(AnalysisModuleLoadStatusEnum, "analysis_module_load_status_enum", source_file_path) - - def test_analysis_module(self): - am = self.createAnalysisModule() - - self.assertEqual(am.getLibName(), self.libname) - - self.assertFalse(am.getInternal()) - - self.assertTrue(am.setVar("ITER", "1")) - - self.assertEqual(am.getTableName(), "analysis_table") - - self.assertTrue(am.checkOption(AnalysisModuleOptionsEnum.ANALYSIS_ITERABLE)) - - self.assertTrue(am.hasVar("ITER")) - - self.assertIsInstance(am.getDouble("ENKF_TRUNCATION"), float) - - self.assertIsInstance(am.getInt("ITER"), int) - - def test_set_get_var(self): - mod = AnalysisModule( self.rng , name = "STD_ENKF" ) - with self.assertRaises(KeyError): - mod.setVar("NO-NOT_THIS_KEY" , 100) - - - with self.assertRaises(KeyError): - mod.getInt("NO-NOT_THIS_KEY") - - - - - - def test_create_internal(self): - with self.assertRaises( KeyError ): - mod = AnalysisModule( self.rng , name = "STD_ENKFXXX" ) - - mod = AnalysisModule( self.rng , name = "STD_ENKF" ) - - diff --git a/ThirdParty/Ert/python/tests/ert/analysis/test_linalg.py b/ThirdParty/Ert/python/tests/ert/analysis/test_linalg.py deleted file mode 100644 index 8ccef6e91c..0000000000 --- a/ThirdParty/Ert/python/tests/ert/analysis/test_linalg.py +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env python -# Copyright (C) 2015 Statoil ASA, Norway. -# -# The file 'test_labscale.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - - -from ert.enkf import ObsVector -from ert.util import Matrix -from ert.analysis import Linalg -from ert.test import ExtendedTestCase - -class LinalgTest(ExtendedTestCase): - - def test_num_PC(self): - S = Matrix(3,3) - S[0,0] = 1 - S[1,1] = 1 - S[2,2] = 1 - - with self.assertRaises(ValueError): - num_pc = Linalg.numPC( S , 0 ) - - with self.assertRaises(ValueError): - num_pc = Linalg.numPC( S , 1.5 ) - - num_pc = Linalg.numPC( S , 0.20 ) - self.assertEqual( num_pc , 1 ) - - num_pc = Linalg.numPC( S , 0.50 ) - self.assertEqual( num_pc , 2 ) - - num_pc = Linalg.numPC( S , 0.80 ) - self.assertEqual( num_pc , 3 ) - - diff --git a/ThirdParty/Ert/python/tests/ert/analysis/test_options_enum.py b/ThirdParty/Ert/python/tests/ert/analysis/test_options_enum.py deleted file mode 100644 index 9013f1954e..0000000000 --- a/ThirdParty/Ert/python/tests/ert/analysis/test_options_enum.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env python -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'test_options_enum.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -from ert.test import ExtendedTestCase -from ert.analysis import AnalysisModuleOptionsEnum - - -class AnalysisOptionsEnumTest(ExtendedTestCase): - def test_items(self): - source_file_path = "libanalysis/include/ert/analysis/analysis_module.h" - self.assertEnumIsFullyDefined(AnalysisModuleOptionsEnum, "analysis_module_flag_enum", source_file_path) diff --git a/ThirdParty/Ert/python/tests/ert/analysis/test_rml.py b/ThirdParty/Ert/python/tests/ert/analysis/test_rml.py deleted file mode 100644 index 1440f73596..0000000000 --- a/ThirdParty/Ert/python/tests/ert/analysis/test_rml.py +++ /dev/null @@ -1,129 +0,0 @@ -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'test_analysis_module.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -import random - -from ert.test import ExtendedTestCase -from ert.util.enums import RngAlgTypeEnum, RngInitModeEnum -from ert.util import Matrix, BoolVector , RandomNumberGenerator -from ert.analysis import AnalysisModule, AnalysisModuleLoadStatusEnum, AnalysisModuleOptionsEnum -from ert.enkf import MeasData , ObsData - -import ert - - -def forward_model(params , model_error = False): - # Y = A*p[0] + B*p[1] - A = 2 - B = -1 - C = 1 - D = 0.1 - state = [A*params[0] + B*params[1] , C*params[0] - D*params[1]*params[0]] - return state - - -def measure(state): - return 0.25*state[0] - 0.1*state[1]*state[1] - - -def init_matrices(ens , mask , obs , rng): - state_size = 2 - report_step = 5 - meas_data = MeasData( mask ) - meas_block = meas_data.addBlock("OBS" , report_step , len(obs) ) - - A = Matrix( state_size , mask.countEqual( True )) - active_iens = 0 - for iens,params in enumerate( ens ): - if mask[iens]: - state = forward_model( params ) - meas_block[0,iens] = measure( state ) - - A[0 , active_iens] = params[0] - A[1 , active_iens] = params[1] - - active_iens += 1 - - - S = meas_data.createS() - - obs_data = ObsData() - obs_block = obs_data.addBlock("OBS" , 1) - for iobs,obs_value in enumerate(obs): - obs_block[iobs] = obs_value - - - R = obs_data.createR() - dObs = obs_data.createDObs() - E = obs_data.createE( rng , meas_data.getActiveEnsSize() ) - D = obs_data.createD(E , S) - - obs_data.scale(S , E = E , D = D , R = R , D_obs = dObs) - return (A , S , E , D , R , dObs) - - - -class RMLTest(ExtendedTestCase): - def setUp(self): - self.libname = ert.ert_lib_path + "/rml_enkf.so" - self.user = "TEST" - - def createAnalysisModule(self): - rng = RandomNumberGenerator(RngAlgTypeEnum.MZRAN, RngInitModeEnum.INIT_DEFAULT) - return AnalysisModule(rng, lib_name = self.libname) - - def test_load_status_enum(self): - source_file_path = "libanalysis/include/ert/analysis/analysis_module.h" - self.assertEnumIsFullyDefined(AnalysisModuleLoadStatusEnum, "analysis_module_load_status_enum", source_file_path) - - - - - def test_analysis_module(self): - rng = RandomNumberGenerator( ) - module = self.createAnalysisModule() - ens_size = 12 - obs_size = 1 - state_size = 2 - - true_params = [1.25 , 0.75] - true_state = forward_model( true_params ) - obs = [(measure( true_state ) , 0.75)] - A = Matrix( state_size , ens_size ) - - ens = [] - for iens in range(ens_size): - param = [ random.gauss( 1.00 , 1.00 ) , random.gauss(1.00 , 1.00)] - ens.append( param ) - - mask = BoolVector(default_value = True , initial_size = ens_size) - mask[2] = False - (A , S , E , D , R , dObs) = init_matrices( ens , mask , obs , rng ) - - module.initUpdate( mask , S , R , dObs , E , D ) - module.updateA( A , S , R , dObs , E , D ) - - - mask[10] = False - mask[5] = False - (A , S , E , D , R , dObs) = init_matrices( ens , mask , obs , rng ) - self.assertEqual( S.dims() , (obs_size , mask.countEqual( True ))) - self.assertEqual( E.dims() , (obs_size , mask.countEqual( True ))) - self.assertEqual( D.dims() , (obs_size , mask.countEqual( True ))) - - module.initUpdate( mask , S , R , dObs , E , D ) - module.updateA( A , S , R , dObs , E , D ) - diff --git a/ThirdParty/Ert/python/tests/ert/analysis/test_std_enkf.py b/ThirdParty/Ert/python/tests/ert/analysis/test_std_enkf.py deleted file mode 100644 index 1ce00f050c..0000000000 --- a/ThirdParty/Ert/python/tests/ert/analysis/test_std_enkf.py +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (C) 2016 Statoil ASA, Norway. -# -# The file 'test_analysis_module.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -from ert.test import ExtendedTestCase -from ert.analysis import AnalysisModule, AnalysisModuleLoadStatusEnum, AnalysisModuleOptionsEnum - -from ert.util.enums import RngAlgTypeEnum, RngInitModeEnum -from ert.util.rng import RandomNumberGenerator - - -class StdEnKFTest(ExtendedTestCase): - - def setUp(self): - self.rng = RandomNumberGenerator(RngAlgTypeEnum.MZRAN, RngInitModeEnum.INIT_DEFAULT) - self.module = AnalysisModule( self.rng , name = "STD_ENKF" ) - - def toggleKey(self, key): - self.assertTrue( self.module.hasVar( key )) - - # check it is true - self.assertTrue( self.module.setVar( key , True ) ) - self.assertTrue( self.module.getBool(key) ) - - # set it to false - self.assertTrue( self.module.setVar( key , False ) ) - self.assertFalse( self.module.getBool(key) ) - - def test_EE_option(self): - self.toggleKey( 'USE_EE' ) - - def test_scaledata_option(self): - self.toggleKey( 'ANALYSIS_SCALE_DATA' ) - - - diff --git a/ThirdParty/Ert/python/tests/ert/analysis/test_std_enkf_debug.py b/ThirdParty/Ert/python/tests/ert/analysis/test_std_enkf_debug.py deleted file mode 100644 index 80637c9cab..0000000000 --- a/ThirdParty/Ert/python/tests/ert/analysis/test_std_enkf_debug.py +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright (C) 2016 Statoil ASA, Norway. -# -# The file 'test_analysis_module.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -import ert -from ert.test import ExtendedTestCase -from ert.analysis import AnalysisModule, AnalysisModuleLoadStatusEnum, AnalysisModuleOptionsEnum -from ert.analysis import AnalysisPrototype -from ert.util.enums import RngAlgTypeEnum, RngInitModeEnum -from ert.util.rng import RandomNumberGenerator - - -class StdEnKFDebugTest(ExtendedTestCase): - - def setUp(self): - self.rng = RandomNumberGenerator(RngAlgTypeEnum.MZRAN, RngInitModeEnum.INIT_DEFAULT) - self.libname = ert.ert_lib_path + "/std_enkf_debug.so" - self.module = AnalysisModule( self.rng , lib_name = self.libname ) - - - def toggleKey(self, key): - self.assertTrue( self.module.hasVar( key )) - - # check it is true - self.assertTrue( self.module.setVar( key , True ) ) - self.assertTrue( self.module.getBool(key) ) - - # set it to false - self.assertTrue( self.module.setVar( key , False ) ) - self.assertFalse( self.module.getBool(key) ) - - def test_EE_option(self): - self.toggleKey( 'USE_EE' ) - - - def test_scaledata_option(self): - self.toggleKey( 'ANALYSIS_SCALE_DATA' ) - - def test_prefix(self): - self.assertTrue( self.module.hasVar("PREFIX")) - self.assertTrue( self.module.setVar( "PREFIX" , "Path") ) diff --git a/ThirdParty/Ert/python/tests/ert/config/CMakeLists.txt b/ThirdParty/Ert/python/tests/ert/config/CMakeLists.txt deleted file mode 100644 index 06443963eb..0000000000 --- a/ThirdParty/Ert/python/tests/ert/config/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -set(TEST_SOURCES - __init__.py - test_config.py -) - -add_python_package("python.tests.ert.config" ${PYTHON_INSTALL_PREFIX}/tests/ert/config "${TEST_SOURCES}" True) - -addPythonTest(ert.config tests.ert.config.test_config.ConfigTest) \ No newline at end of file diff --git a/ThirdParty/Ert/python/tests/ert/config/__init__.py b/ThirdParty/Ert/python/tests/ert/config/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/python/tests/ert/config/test_config.py b/ThirdParty/Ert/python/tests/ert/config/test_config.py deleted file mode 100644 index 9ec72d22f7..0000000000 --- a/ThirdParty/Ert/python/tests/ert/config/test_config.py +++ /dev/null @@ -1,239 +0,0 @@ -#!/usr/bin/env python -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'test_config.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -import os - -import ert -from ert.config import ContentTypeEnum, UnrecognizedEnum, SchemaItem, ContentItem, ContentNode, ConfigParser, ConfigContent -from cwrap import Prototype, clib -from ert.test import ExtendedTestCase, TestAreaContext - - -class TestConfigPrototype(Prototype): - lib = ert.load("libconfig") - - def __init__(self, prototype, bind=False): - super(TestConfigPrototype, self).__init__(TestConfigPrototype.lib, prototype, bind=bind) - -# Adding extra functions to the ConfigContent object for the ability -# to test low level C functions which are not exposed in Python. -_safe_iget = TestConfigPrototype("char* config_content_safe_iget( config_content , char* , int , int)") -_iget = TestConfigPrototype("char* config_content_iget( config_content , char* , int , int)") -_iget_as_int = TestConfigPrototype("int config_content_iget_as_int( config_content , char* , int , int)") -_iget_as_bool = TestConfigPrototype("bool config_content_iget_as_bool( config_content , char* , int , int)") -_iget_as_double = TestConfigPrototype("double config_content_iget_as_double( config_content , char* , int , int)") -_get_occurences = TestConfigPrototype("int config_content_get_occurences( config_content , char* )") - - -class ConfigTest(ExtendedTestCase): - def setUp( self ): - self.file_list = [] - - - def test_enums(self): - source_file_path = "libconfig/include/ert/config/config_schema_item.h" - self.assertEnumIsFullyDefined(ContentTypeEnum, "config_item_types", source_file_path) - self.assertEnumIsFullyDefined(UnrecognizedEnum, "config_schema_unrecognized_enum", source_file_path) - - - def test_item_types(self): - with TestAreaContext("config/types") as test_area: - with open("config" , "w") as f: - f.write("TYPE_ITEM 10 3.14 TruE String file\n") - - conf = ConfigParser() - schema_item = conf.add("TYPE_ITEM", False) - schema_item.iset_type(0 , ContentTypeEnum.CONFIG_INT ) - schema_item.iset_type(1 , ContentTypeEnum.CONFIG_FLOAT ) - schema_item.iset_type(2 , ContentTypeEnum.CONFIG_BOOL ) - schema_item.iset_type(3 , ContentTypeEnum.CONFIG_STRING ) - schema_item.iset_type(4 , ContentTypeEnum.CONFIG_PATH ) - self.assertFalse( "TYPE_XX" in conf ) - self.assertTrue( "TYPE_ITEM" in conf ) - - content = conf.parse("config") - type_item = content["TYPE_ITEM"][0] - int_value = type_item[0] - self.assertEqual( int_value , 10 ) - self.assertEqual( type_item.igetString(0) , "10") - - float_value = type_item[1] - self.assertEqual( float_value , 3.14 ) - self.assertEqual( type_item.igetString(1) , "3.14") - - bool_value = type_item[2] - self.assertEqual( bool_value , True) - self.assertEqual( type_item.igetString(2) , "TruE") - - string_value = type_item[3] - self.assertEqual( string_value , "String") - self.assertEqual( type_item.igetString(3) , "String") - - path_value = type_item[4] - self.assertEqual( path_value , "file") - self.assertEqual( type_item.igetString(4) , "file") - - - - - - def test_parse(self): - conf = ConfigParser() - conf.add("FIELD", False) - schema_item = conf.add("RSH_HOST", False) - self.assertIsInstance(schema_item, SchemaItem) - test_path = self.createTestPath("local/config/simple_config") - content = conf.parse(test_path, unrecognized=UnrecognizedEnum.CONFIG_UNRECOGNIZED_IGNORE) - self.assertTrue( content.isValid() ) - - - content_item = content["RSH_HOST"] - self.assertIsInstance(content_item, ContentItem) - self.assertEqual(len(content_item), 1) - with self.assertRaises(TypeError): - content_item["BJARNE"] - - with self.assertRaises(IndexError): - content_item[10] - - content_node = content_item[0] - self.assertIsInstance(content_node, ContentNode) - self.assertEqual(len(content_node), 2) - self.assertEqual(content_node[1], "be-lx633214:2") - self.assertEqual(content_node.content(sep=","), "be-lx655082:2,be-lx633214:2") - self.assertEqual(content_node.content(), "be-lx655082:2 be-lx633214:2") - - - content_item = content["FIELD"] - self.assertEqual(len(content_item), 5) - with self.assertRaises(IOError): - conf.parse("DoesNotExits") - - - def test_parse_invalid(self): - conf = ConfigParser() - conf.add("INT", value_type = ContentTypeEnum.CONFIG_INT ) - with TestAreaContext("config/parse2"): - with open("config","w") as fileH: - fileH.write("INT xx\n") - - with self.assertRaises(ValueError): - conf.parse("config") - - content = conf.parse("config" , validate = False ) - self.assertFalse( content.isValid() ) - self.assertEqual( len(content.getErrors()) , 1 ) - - - - def test_parser_content(self): - conf = ConfigParser() - conf.add("KEY2", False) - schema_item = conf.add("KEY", False) - schema_item.iset_type(2 , ContentTypeEnum.CONFIG_INT ) - schema_item.iset_type(3 , ContentTypeEnum.CONFIG_BOOL ) - schema_item.iset_type(4 , ContentTypeEnum.CONFIG_FLOAT ) - schema_item.iset_type(5 , ContentTypeEnum.CONFIG_PATH ) - schema_item = conf.add("NOT_IN_CONTENT", False) - - - with TestAreaContext("config/parse2"): - with open("config","w") as fileH: - fileH.write("KEY VALUE1 VALUE2 100 True 3.14 path/file.txt\n") - - cwd0 = os.getcwd( ) - os.makedirs("tmp") - os.chdir("tmp") - content = conf.parse("../config") - self.assertTrue( content.isValid() ) - self.assertTrue( "KEY" in content ) - self.assertFalse( "NOKEY" in content ) - - self.assertFalse( "NOT_IN_CONTENT" in content ) - item = content["NOT_IN_CONTENT"] - self.assertEqual( len(item) , 0 ) - - with self.assertRaises(KeyError): - content["Nokey"] - - item = content["KEY"] - self.assertEqual(len(item) , 1) - - line = item[0] - with self.assertRaises(TypeError): - line.getPath(4) - - with self.assertRaises(TypeError): - line.getPath() - - - rel_path = line.getPath(index = 5, absolute = False) - self.assertEqual( rel_path , "../path/file.txt" ) - get = line[5] - self.assertEqual( get , "../path/file.txt") - abs_path = line.getPath(index = 5) - self.assertEqual( abs_path , os.path.join(cwd0 , "path/file.txt")) - - rel_path = line.getPath(index = 5, absolute = False , relative_start = "../") - self.assertEqual( rel_path , "path/file.txt" ) - - - with self.assertRaises(IndexError): - item[10] - - node = item[0] - self.assertEqual(len(node) , 6) - with self.assertRaises(IndexError): - node[6] - - self.assertEqual( node[0] , "VALUE1" ) - self.assertEqual( node[1] , "VALUE2" ) - self.assertEqual( node[2] , 100 ) - self.assertEqual( node[3] , True ) - self.assertEqual( node[4] , 3.14) - - self.assertEqual( content.getValue( "KEY" , 0 , 1 ) , "VALUE2" ) - self.assertEqual( _iget( content , "KEY" , 0 , 1) , "VALUE2") - - self.assertEqual( content.getValue( "KEY" , 0 , 2 ) , 100 ) - self.assertEqual( _iget_as_int( content , "KEY" , 0 , 2) , 100) - - self.assertEqual( content.getValue( "KEY" , 0 , 3 ) , True ) - self.assertEqual( _iget_as_bool( content , "KEY" , 0 , 3) , True) - - self.assertEqual( content.getValue( "KEY" , 0 , 4 ) , 3.14 ) - self.assertEqual( _iget_as_double( content , "KEY" , 0 , 4) , 3.14) - - self.assertIsNone( _safe_iget( content , "KEY2" , 0 , 0)) - - self.assertEqual( _get_occurences( content , "KEY2" ) , 0) - self.assertEqual( _get_occurences( content , "KEY" ) , 1) - self.assertEqual( _get_occurences( content , "MISSING-KEY" ) , 0) - - - - def test_schema(self): - schema_item = SchemaItem("TestItem") - self.assertIsInstance(schema_item, SchemaItem) - self.assertEqual(schema_item.iget_type(6), ContentTypeEnum.CONFIG_STRING) - schema_item.iset_type(0, ContentTypeEnum.CONFIG_INT) - self.assertEqual(schema_item.iget_type(0), ContentTypeEnum.CONFIG_INT) - schema_item.set_argc_minmax(3, 6) - - del schema_item - - - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/CMakeLists.txt b/ThirdParty/Ert/python/tests/ert/enkf/CMakeLists.txt deleted file mode 100644 index fc83171cdf..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/CMakeLists.txt +++ /dev/null @@ -1,85 +0,0 @@ -set(TEST_SOURCES - __init__.py - test_active_list.py - test_analysis_config.py - test_analysis_iter_config.py - test_block_obs.py - test_custom_kw_config_set.py - test_ecl_config.py - test_es_update.py - test_enkf.py - test_enkf_fs.py - test_enkf_fs_manager1.py - test_enkf_fs_manager2.py - test_enkf_library.py - test_enkf_load_results_manually.py - test_enkf_obs.py - test_ert_context.py - test_ert_log.py - test_gen_obs.py - test_labscale.py - test_linalg.py - test_local_obsdata_node.py - test_local_config.py - test_meas_block.py - test_meas_data.py - test_obs_block.py - test_obs_data.py - test_state_map.py - test_summary_key_matcher.py - test_summary_key_set.py - test_summary_obs.py - test_time_map.py - test_update.py - test_ensemble_config.py - test_deprecation.py - test_field_export.py - test_hook_workflow.py - test_forward_load_context.py - test_runpath_list.py -) - -add_python_package("python.tests.ert.enkf" ${PYTHON_INSTALL_PREFIX}/tests/ert/enkf "${TEST_SOURCES}" False) -addPythonTest(ert.enkf.es_update tests.ert.enkf.test_es_update.ESUpdateTest) -addPythonTest(ert.enkf.forward_load_context tests.ert.enkf.test_forward_load_context.ForwardLoadContextTest) -addPythonTest(ert.enkf.deprecation tests.ert.enkf.test_deprecation.DeprecationTest) -addPythonTest(ert.enkf.meas_block tests.ert.enkf.test_meas_block.MeasBlockTest) -addPythonTest(ert.enkf.meas_data tests.ert.enkf.test_meas_data.MeasDataTest) -addPythonTest(ert.enkf.obs_data tests.ert.enkf.test_obs_data.ObsDataTest) -addPythonTest(ert.enkf.gen_obs tests.ert.enkf.test_gen_obs.GenObsTest) -addPythonTest(ert.enkf.summary_obs tests.ert.enkf.test_summary_obs.SummaryObsTest) -addPythonTest(ert.enkf.block_obs tests.ert.enkf.test_block_obs.BlockObsTest) -addPythonTest(ert.enkf.obs_block tests.ert.enkf.test_obs_block.ObsBlockTest) -addPythonTest(ert.enkf.ert_log tests.ert.enkf.test_ert_log.ErtLogTest) -addPythonTest(ert.enkf.analysis_config tests.ert.enkf.test_analysis_config.AnalysisConfigTest) -addPythonTest(ert.enkf.analysis_iter_config tests.ert.enkf.test_analysis_iter_config.AnalysisIterConfigTest) -addPythonTest(ert.enkf.state_map tests.ert.enkf.test_state_map.StateMapTest) -addPythonTest(ert.enkf.custom_kw_config_set tests.ert.enkf.test_custom_kw_config_set.CustomKWConfigSetTest) -addPythonTest(ert.enkf.summary_key_matcher tests.ert.enkf.test_summary_key_matcher.SummaryKeyMatcherTest) -addPythonTest(ert.enkf.time_map tests.ert.enkf.test_time_map.TimeMapTest) -addPythonTest(ert.enkf.active_list tests.ert.enkf.test_active_list.ActiveListTest) -addPythonTest(ert.enkf.local_obsdata_node tests.ert.enkf.test_local_obsdata_node.LocalObsdataNodeTest) -addPythonTest(ert.enkf.local_config tests.ert.enkf.test_local_config.LocalConfigTest) -addPythonTest(ert.enkf.ensemble_config tests.ert.enkf.test_ensemble_config.EnsembleConfigTest) -addPythonTest(ert.enkf.hook_workflow tests.ert.enkf.test_hook_workflow.HookWorkFlowTest) -addPythonTest(ert.enkf.runpath_list tests.ert.enkf.test_runpath_list.RunpathListTest) - -if (STATOIL_TESTDATA_ROOT) - addPythonTest(ert.enkf.enkf tests.ert.enkf.test_enkf.EnKFTest LABELS StatoilData) - addPythonTest(ert.enkf.enkf_obs tests.ert.enkf.test_enkf_obs.EnKFObsTest LABELS StatoilData) - addPythonTest(ert.enkf.enkf_load_results_manually tests.ert.enkf.test_enkf_load_results_manually.LoadResultsManuallyTest LABELS StatoilData) - addPythonTest(ert.enkf.enkf_fs tests.ert.enkf.test_enkf_fs.EnKFFSTest LABELS StatoilData) - addPythonTest(ert.enkf.enkf_fs_manager1 tests.ert.enkf.test_enkf_fs_manager1.EnKFFSManagerTest1 LABELS StatoilData) - addPythonTest(ert.enkf.enkf_fs_manager2 tests.ert.enkf.test_enkf_fs_manager2.EnKFFSManagerTest2 LABELS StatoilData) - addPythonTest(ert.enkf.enkf_library tests.ert.enkf.test_enkf_library.EnKFLibraryTest) - addPythonTest(ert.enkf.summary_key_set tests.ert.enkf.test_summary_key_set.SummaryKeySetTest LABELS StatoilData) - addPythonTest(ert.enkf.ecl_config tests.ert.enkf.test_ecl_config.EclConfigTest LABELS StatoilData) - addPythonTest(ert.enkf.ert_test_context tests.ert.enkf.test_ert_context.ErtTestContextTest LABELS StatoilData) - addPythonTest(ert.enkf.update tests.ert.enkf.test_update.UpdateTest LABELS StatoilData) - addPythonTest(ert.enkf.labscale tests.ert.enkf.test_labscale.LabScaleTest LABELS StatoilData) - addPythonTest(ert.enkf.field_export tests.ert.enkf.test_field_export.FieldExportTest LABELS StatoilData) -endif() - -add_subdirectory(data) -add_subdirectory(export) -add_subdirectory(plot) diff --git a/ThirdParty/Ert/python/tests/ert/enkf/__init__.py b/ThirdParty/Ert/python/tests/ert/enkf/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/python/tests/ert/enkf/data/CMakeLists.txt b/ThirdParty/Ert/python/tests/ert/enkf/data/CMakeLists.txt deleted file mode 100644 index 2f2d27be53..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/data/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -set(TEST_SOURCES - __init__.py - test_custom_kw.py - test_custom_kw_config.py - test_field_config.py - test_gen_data.py - test_gen_data_config.py - test_gen_kw.py - test_gen_kw_config.py -) - -add_python_package("python.tests.ert.enkf.data" ${PYTHON_INSTALL_PREFIX}/tests/ert/enkf/data "${TEST_SOURCES}" False) - -addPythonTest(ert.enkf.data.custom_kw tests.ert.enkf.data.test_custom_kw.CustomKWTest) -addPythonTest(ert.enkf.data.gen_kw tests.ert.enkf.data.test_gen_kw.GenKwTest) - -if (STATOIL_TESTDATA_ROOT) - addPythonTest(ert.enkf.data.gen_kw_config tests.ert.enkf.data.test_gen_kw_config.GenKwConfigTest LABELS StatoilData) - addPythonTest(ert.enkf.data.gen_data tests.ert.enkf.data.test_gen_data.GenDataTest LABELS StatoilData) - addPythonTest(ert.enkf.data.gen_data_config tests.ert.enkf.data.test_gen_data_config.GenDataConfigTest LABELS StatoilData) -endif() diff --git a/ThirdParty/Ert/python/tests/ert/enkf/data/__init__.py b/ThirdParty/Ert/python/tests/ert/enkf/data/__init__.py deleted file mode 100644 index 8b13789179..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/data/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/data/test_custom_kw.py b/ThirdParty/Ert/python/tests/ert/enkf/data/test_custom_kw.py deleted file mode 100644 index 804127472b..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/data/test_custom_kw.py +++ /dev/null @@ -1,123 +0,0 @@ -import os -from ert.enkf.config import CustomKWConfig -from ert.enkf.data import CustomKW -from ert.enkf.enkf_simulation_runner import EnkfSimulationRunner -from ert.enkf.export import custom_kw_collector -from ert.enkf.export.custom_kw_collector import CustomKWCollector -from ert.test.ert_test_context import ErtTestContext -from ert.test.extended_testcase import ExtendedTestCase -from ert.test.test_area import TestAreaContext -from ert.util import StringList - - -class CustomKWTest(ExtendedTestCase): - - def createResultFile(self, filename, data): - with open(filename, "w") as output_file: - for key in data: - output_file.write("%s %s\n" % (key, data[key])) - - def test_custom_kw_creation(self): - data = {"VALUE_1": 2345.234, - "VALUE_2": 0.001234, - "VALUE_3": "string_1", - "VALUE_4": "string_2"} - - with TestAreaContext("python/enkf/data/custom_kw_creation") as test_area: - - self.createResultFile("result_file", data) - - custom_kw_config = CustomKWConfig("CUSTOM_KW", "result_file") - - self.assertEqual(len(custom_kw_config), 0) - - custom_kw = CustomKW(custom_kw_config) - - custom_kw.fload("result_file") - - self.assertEqual(len(custom_kw_config), 4) - - for key in data: - index = custom_kw_config.indexOfKey(key) - self.assertEqual(data[key], custom_kw[key]) - - with self.assertRaises(KeyError): - value = custom_kw["VALUE_5"] - - - - def test_custom_kw_config_data_is_null(self): - data_1 = {"VALUE_1": 123453.3, - "VALUE_2": 0.234234} - - data_2 = {"VALUE_1": 965689, - "VALUE_3": 1.1222} - - with TestAreaContext("python/enkf/data/custom_kw_null_element") as test_area: - - self.createResultFile("result_file_1", data_1) - self.createResultFile("result_file_2", data_2) - - custom_kw_config = CustomKWConfig("CUSTOM_KW", "result_file") - - custom_kw_1 = CustomKW(custom_kw_config) - custom_kw_1.fload("result_file_1") - - custom_kw_2 = CustomKW(custom_kw_config) - custom_kw_2.fload("result_file_2") - - index_1 = custom_kw_config.indexOfKey("VALUE_1") - index_2 = custom_kw_config.indexOfKey("VALUE_2") - - self.assertEqual(custom_kw_1["VALUE_1"], data_1["VALUE_1"]) - self.assertEqual(custom_kw_2["VALUE_1"], data_2["VALUE_1"]) - - self.assertIsNone(custom_kw_2["VALUE_2"]) - self.assertFalse( "VALUE_3" in custom_kw_config ) - - - - def test_simulated_custom_kw(self): - config = self.createTestPath("local/custom_kw/mini_config") - with ErtTestContext("python/enkf/data/custom_kw_simulated", config) as context: - ert = context.getErt() - - ensemble_config = ert.ensembleConfig() - self.assertTrue("AGGREGATED" in ensemble_config) - - config = ensemble_config.getNode("AGGREGATED").getCustomKeywordModelConfig() - - self.assertEqual(len(config.getKeys()), 0) - - simulation_runner = EnkfSimulationRunner(ert) - simulation_runner.runEnsembleExperiment() - - config = ensemble_config.getNode("AGGREGATED").getCustomKeywordModelConfig() - - self.assertEqual(len(config.getKeys()), 4) - self.assertItemsEqual(config.getKeys(), ["PERLIN_1", "PERLIN_2", "PERLIN_3", "STATE"]) - - - def test_custom_kw_set_values(self): - definition = { - "STRING": str, - "FLOAT": float, - "INT": float - } - - ckwc = CustomKWConfig("Test", None, definition=definition) - - ckw = CustomKW(ckwc) - with self.assertRaises(KeyError): - ckw["ANOTHER_STRING"] = "another string" - - ckw["STRING"] = "string" - ckw["FLOAT"] = 3.1415 - ckw["INT"] = 1 - - self.assertEqual(ckw["STRING"], "string") - self.assertEqual(ckw["FLOAT"], 3.1415) - self.assertEqual(ckw["INT"], 1) - - - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/data/test_custom_kw_config.py b/ThirdParty/Ert/python/tests/ert/enkf/data/test_custom_kw_config.py deleted file mode 100644 index a57b4dc9e8..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/data/test_custom_kw_config.py +++ /dev/null @@ -1,130 +0,0 @@ -from ert.enkf.config.custom_kw_config import CustomKWConfig -from ert.test.extended_testcase import ExtendedTestCase -from ert.test.test_area import TestAreaContext -from ert.util import StringList - - -class CustomKWConfigTest(ExtendedTestCase): - - def createResultFile(self, filename, data): - with open(filename, "w") as output_file: - for key in data: - output_file.write("%s %s\n" % (key, data[key])) - - def test_custom_kw_config_creation(self): - data = {"VALUE_1": 2345.234, - "VALUE_2": 0.001234, - "VALUE_3": "string_1", - "VALUE_4": "string_2"} - - with TestAreaContext("python/enkf/data/custom_kw_config") as test_area: - - self.createResultFile("result_file", data) - - custom_kw_config = CustomKWConfig("CUSTOM_KW", "result_file", "output_file") - - self.assertEqual(custom_kw_config.getName(), "CUSTOM_KW") - self.assertEqual(custom_kw_config.getResultFile(), "result_file") - self.assertEqual(custom_kw_config.getOutputFile(), "output_file") - - self.assertEqual(len(custom_kw_config), 0) - - result = StringList() - success = custom_kw_config.parseResultFile("result_file", result) - self.assertTrue(success) - - self.assertEqual(len(custom_kw_config), 4) - - for index, key in enumerate(data): - self.assertTrue(key in custom_kw_config) - - key_is_string = isinstance(data[key], str) - self.assertTrue(custom_kw_config.keyIsDouble(key) != key_is_string) - self.assertEqual(index, custom_kw_config.indexOfKey(key)) - - self.assertEqual(result[index], str(data[key])) - - self.assertTrue(len(custom_kw_config.getKeys()) == 4) - - for key in custom_kw_config: - self.assertTrue(key in data) - - - def test_custom_kw_config_multiple_identical_keys(self): - data = {"VALUE_1": 2345.234, - "VALUE_2": 0.001234, - "VALUE_3": "string_1", - "VALUE_4": "string_2 VALUE_4 repeat_of_value_4"} - - with TestAreaContext("python/enkf/data/custom_kw_config_multiple_identical_keys") as test_area: - - self.createResultFile("result_file", data) - - custom_kw_config = CustomKWConfig("CUSTOM_KW", "result_file") - - result = StringList() - success = custom_kw_config.parseResultFile("result_file", result) - self.assertTrue(success) - - index_of_value_4 = custom_kw_config.indexOfKey("VALUE_4") - self.assertEqual(result[index_of_value_4], "repeat_of_value_4") - - - - def test_custom_kw_config_define_and_read(self): - data_1 = {"VALUE_1": 123453.3, - "VALUE_2": 0.234234} - - data_2 = {"VALUE_1": 965689, - "VALUE_3": 1.1222} - - with TestAreaContext("python/enkf/data/custom_kw_config") as test_area: - - self.createResultFile("result_file_1", data_1) - self.createResultFile("result_file_2", data_2) - - custom_kw_config = CustomKWConfig("CUSTOM_KW", "result_file") - - result_1 = StringList() - success = custom_kw_config.parseResultFile("result_file_1", result_1) - self.assertTrue(success) - - result_2 = StringList() - success = custom_kw_config.parseResultFile("result_file_2", result_2) - self.assertFalse(success) - - for key in custom_kw_config: - self.assertTrue(key in data_1) - - self.assertFalse("VALUE_3" in custom_kw_config) - - - - - def test_custom_kw_config_parse_fail(self): - data = {"KEY_1": "Value Key_2"} - - with TestAreaContext("python/enkf/data/custom_kw_config_fail") as test_area: - - self.createResultFile("result_file", data) - - custom_kw_config = CustomKWConfig("CUSTOM_KW_FAIL", "result_file") - self.assertIsNone(custom_kw_config.getOutputFile()) - - self.assertFalse(custom_kw_config.parseResultFile("result_file", StringList())) - - - def test_custom_kw_config_construction_with_definition(self): - definition = { - "VALUE_1": float, - "VALUE_2": str - } - custom_kw_config = CustomKWConfig("TEST", None, definition=definition) - self.assertEqual(len(custom_kw_config.getKeys()), 2) - - self.assertTrue(custom_kw_config.keyIsDouble("VALUE_1")) - self.assertFalse(custom_kw_config.keyIsDouble("VALUE_2")) - - self.assertIn("VALUE_1", custom_kw_config) - self.assertIn("VALUE_2", custom_kw_config) - self.assertNotIn("VALUE_3", custom_kw_config) \ No newline at end of file diff --git a/ThirdParty/Ert/python/tests/ert/enkf/data/test_field_config.py b/ThirdParty/Ert/python/tests/ert/enkf/data/test_field_config.py deleted file mode 100644 index 04ba9303c9..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/data/test_field_config.py +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (C) 2015 Statoil ASA, Norway. -# -# The file 'test_field_config.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -import os - -from ert.enkf import FieldConfig -from ert.enkf import ActiveList -from ert.test import ExtendedTestCase -from ert.ecl import EclGrid - -class FieldConfigTest(ExtendedTestCase): - - def test_create(self): - grid = EclGrid.createRectangular( (10,10,5) , (1,1,1) ) - field_config = FieldConfig("SWAT" , grid) - - - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/data/test_gen_data.py b/ThirdParty/Ert/python/tests/ert/enkf/data/test_gen_data.py deleted file mode 100644 index 0515fe63c3..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/data/test_gen_data.py +++ /dev/null @@ -1,33 +0,0 @@ -import ert -from cwrap import clib, CWrapper -from ert.enkf.data.enkf_node import EnkfNode -from ert.enkf.node_id import NodeId -from ert.test import ErtTestContext -from ert.test.extended_testcase import ExtendedTestCase -from ert.util import BoolVector - -test_lib = ert.load("libenkf") -cwrapper = CWrapper(test_lib) - - -class GenDataTest(ExtendedTestCase): - def setUp(self): - self.config_file = self.createTestPath("Statoil/config/with_GEN_DATA/config") - - - def test_create(self): - with ErtTestContext("gen_data_test", self.config_file) as test_context: - ert = test_context.getErt() - fs1 = ert.getEnkfFsManager().getCurrentFileSystem() - config_node = ert.ensembleConfig().getNode("TIMESHIFT") - - data_node = EnkfNode(config_node) - data_node.tryLoad(fs1, NodeId(60, 0)) - - gen_data = data_node.asGenData() - data = gen_data.getData() - - self.assertEqual(len(data) , 2560) - - - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/data/test_gen_data_config.py b/ThirdParty/Ert/python/tests/ert/enkf/data/test_gen_data_config.py deleted file mode 100644 index 546ccb3d02..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/data/test_gen_data_config.py +++ /dev/null @@ -1,84 +0,0 @@ -import ert -from cwrap import clib, CWrapper -from ert.enkf.data import EnkfNode -from ert.enkf.config import GenDataConfig -from ert.enkf import NodeId -from ert.enkf import ForwardLoadContext -from ert.test import ErtTestContext, ExtendedTestCase -from ert.util import BoolVector - -test_lib = ert.load("libenkf") -cwrapper = CWrapper(test_lib) - -get_active_mask = cwrapper.prototype("bool_vector_ref gen_data_config_get_active_mask( gen_data_config )") -update_active_mask = cwrapper.prototype("void gen_data_config_update_active( gen_data_config, forward_load_context , bool_vector)") - -alloc_run_arg = cwrapper.prototype("run_arg_obj run_arg_alloc_ENSEMBLE_EXPERIMENT( enkf_fs , int , int , char*) ") - - -def updateMask(gen_data_config , report_step , fs, active_mask): - run_arg = alloc_run_arg( fs , 0 , 0 , "Path") - load_context = ForwardLoadContext( run_arg = run_arg , report_step = report_step ) - update_active_mask( gen_data_config , load_context , active_mask ) - - - -class GenDataConfigTest(ExtendedTestCase): - def setUp(self): - self.config_file = self.createTestPath("Statoil/config/with_GEN_DATA/config") - - def load_active_masks(self, case1, case2 ): - with ErtTestContext("gen_data_config_test", self.config_file) as test_context: - ert = test_context.getErt() - - fs1 = ert.getEnkfFsManager().getFileSystem(case1) - config_node = ert.ensembleConfig().getNode("TIMESHIFT") - data_node = EnkfNode(config_node) - data_node.tryLoad(fs1, NodeId(60, 0)) - - active_mask = get_active_mask( config_node.getDataModelConfig() ) - first_active_mask_length = len(active_mask) - self.assertEqual(first_active_mask_length, 2560) - - fs2 = ert.getEnkfFsManager().getFileSystem(case2) - data_node = EnkfNode(config_node) - data_node.tryLoad(fs2, NodeId(60, 0)) - - active_mask = get_active_mask( config_node.getDataModelConfig() ) - second_active_mask_len = len(active_mask) - self.assertEqual(second_active_mask_len, 2560) - self.assertEqual(first_active_mask_length, second_active_mask_len) - - # Setting one element to False, load different case, check, reload, and check. - self.assertTrue(active_mask[10]) - active_mask_modified = active_mask.copy() - active_mask_modified[10] = False - - updateMask(config_node.getDataModelConfig(), 60, fs2 , active_mask_modified) - active_mask = get_active_mask( config_node.getDataModelConfig() ) - self.assertFalse(active_mask[10]) - - #Load first - check element is true - data_node = EnkfNode(config_node) - data_node.tryLoad(fs1, NodeId(60, 0)) - active_mask = get_active_mask( config_node.getDataModelConfig() ) - self.assertTrue(active_mask[10]) - - # Reload second again, should now be false at 10, due to the update further up - data_node = EnkfNode(config_node) - data_node.tryLoad(fs2, NodeId(60, 0)) - active_mask = get_active_mask( config_node.getDataModelConfig() ) - self.assertFalse(active_mask[10]) - - - def test_loading_two_cases_with_and_without_active_file(self): - self.load_active_masks("missing-active", "default") - - - - def test_create(self): - conf = GenDataConfig("KEY") - - - - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/data/test_gen_kw.py b/ThirdParty/Ert/python/tests/ert/enkf/data/test_gen_kw.py deleted file mode 100644 index 14a41cb019..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/data/test_gen_kw.py +++ /dev/null @@ -1,124 +0,0 @@ -import os.path -from ert.enkf.data import GenKw -from ert.enkf.config import GenKwConfig -from ert.test import TestAreaContext, ExtendedTestCase - - -def create_gen_kw(): - parameter_file ="MULTFLT.txt" - template_file ="MULTFLT.tmpl" - with open(parameter_file, "w") as f: - f.write("MULTFLT1 NORMAL 0 1\n") - f.write("MULTFLT2 RAW \n") - f.write("MULTFLT3 NORMAL 0 1\n") - - with open(template_file, "w") as f: - f.write(" \n") - f.write("/\n") - - - gen_kw_config = GenKwConfig("MULTFLT", template_file , parameter_file) - gen_kw = GenKw( gen_kw_config ) - - return (gen_kw_config , gen_kw) - - - -class GenKwTest(ExtendedTestCase): - - def test_gen_kw_get_set(self): - with TestAreaContext("enkf/data/gen_kwt"): - - (gen_kw_config , gen_kw) = create_gen_kw() - self.assertIsInstance(gen_kw, GenKw) - - gen_kw[0] = 3.0 - self.assertEqual(gen_kw[0], 3.0) - - gen_kw["MULTFLT1"] = 4.0 - self.assertEqual(gen_kw["MULTFLT1"], 4.0) - self.assertEqual(gen_kw[0], 4.0) - - gen_kw["MULTFLT2"] = 8.0 - self.assertEqual(gen_kw["MULTFLT2"], 8.0) - self.assertEqual(gen_kw[1], 8.0) - - gen_kw["MULTFLT3"] = 12.0 - self.assertEqual(gen_kw["MULTFLT3"], 12.0) - self.assertEqual(gen_kw[2], 12.0) - - self.assertEqual(len(gen_kw), 3) - - with self.assertRaises(IndexError): - gen_kw[4] - - with self.assertRaises(TypeError): - gen_kw[1.5] - - with self.assertRaises(KeyError): - gen_kw["MULTFLT_2"] - - self.assertTrue("MULTFLT1" in gen_kw ) - - - - def test_gen_kw_get_set_vector(self): - with TestAreaContext("enkf/data/gen_kwt"): - - (gen_kw_config , gen_kw) = create_gen_kw() - with self.assertRaises(ValueError): - gen_kw.setValues([0]) - - with self.assertRaises(TypeError): - gen_kw.setValues(["A","B","C"]) - - gen_kw.setValues([0,1,2]) - self.assertEqual(gen_kw[0], 0) - self.assertEqual(gen_kw[1], 1) - self.assertEqual(gen_kw[2], 2) - - self.assertEqual(gen_kw["MULTFLT1"] , 0) - self.assertEqual(gen_kw["MULTFLT2"] , 1) - self.assertEqual(gen_kw["MULTFLT3"] , 2) - - - - - - def test_gen_kw_ecl_write(self): - with TestAreaContext("enkf/data/gen_kwt"): - (gen_kw_config , gen_kw) = create_gen_kw() - - with self.assertRaises(IOError): - gen_kw.eclWrite( "tmp" , "file.txt") - - gen_kw.eclWrite( None , "file.txt") - self.assertTrue( os.path.isfile( "file.txt" )) - - os.mkdir("tmp") - gen_kw.eclWrite( "tmp" , "file.txt") - self.assertTrue( os.path.isfile( "tmp/file.txt" )) - - gen_kw.eclWrite( "tmp" , "file.txt" , "tmp/export.txt") - self.assertTrue( os.path.isfile( "tmp/export.txt" )) - - - - - - - - - - - - - - - - - - - - - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/data/test_gen_kw_config.py b/ThirdParty/Ert/python/tests/ert/enkf/data/test_gen_kw_config.py deleted file mode 100644 index f32ad7a1e2..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/data/test_gen_kw_config.py +++ /dev/null @@ -1,55 +0,0 @@ -from ert.enkf import ErtImplType, GenKwConfig -from ert.test import ErtTestContext, ExtendedTestCase - -class GenKwConfigTest(ExtendedTestCase): - - def setUp(self): - self.config = self.createTestPath("Statoil/config/with_data/config") - - - def test_gen_kw_config(self): - - with ErtTestContext("python/enkf/data/gen_kw_config", self.config) as context: - - ert = context.getErt() - - gen_kw_keys = ert.ensembleConfig().getKeylistFromImplType(ErtImplType.GEN_KW) - - self.assertEqual(gen_kw_keys[0], "GRID_PARAMS") - - node = ert.ensembleConfig().getNode(gen_kw_keys[0]) - gen_kw_config = node.getModelConfig() - self.assertIsInstance(gen_kw_config, GenKwConfig) - - self.assertEqual(gen_kw_config.getKey(), "GRID_PARAMS") - self.assertEqual(len(gen_kw_config), 2) - - self.assertEqual(gen_kw_config[0], "MULTPV2") - self.assertEqual(gen_kw_config[1], "MULTPV3") - - self.assertFalse(gen_kw_config.shouldUseLogScale(0)) - self.assertFalse(gen_kw_config.shouldUseLogScale(1)) - - - node = ert.ensembleConfig().getNode(gen_kw_keys[1]) - gen_kw_config = node.getModelConfig() - self.assertIsInstance(gen_kw_config, GenKwConfig) - - self.assertEqual(gen_kw_config.getKey(), "MULTFLT") - - self.assertTrue(gen_kw_config.shouldUseLogScale(0)) - - - node = ert.ensembleConfig().getNode(gen_kw_keys[2]) - gen_kw_config = node.getModelConfig() - self.assertIsInstance(gen_kw_config, GenKwConfig) - - self.assertEqual(gen_kw_config.getKey(), "FLUID_PARAMS") - - self.assertFalse(gen_kw_config.shouldUseLogScale(0)) - self.assertFalse(gen_kw_config.shouldUseLogScale(1)) - - expected = ["SWCR", "SGCR"] - - for index, keyword in enumerate(gen_kw_config): - self.assertEqual(keyword, expected[index]) \ No newline at end of file diff --git a/ThirdParty/Ert/python/tests/ert/enkf/export/CMakeLists.txt b/ThirdParty/Ert/python/tests/ert/enkf/export/CMakeLists.txt deleted file mode 100644 index d59e1c5044..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/export/CMakeLists.txt +++ /dev/null @@ -1,31 +0,0 @@ -set(TEST_SOURCES - __init__.py - test_arg_loader.py - test_custom_kw_collector.py - test_design_matrix.py - test_export_join.py - test_gen_data_collector.py - test_gen_data_observation_collector.py - test_gen_kw_collector.py - test_misfit_collector.py - test_numpy_and_pandas.py - test_summary_collector.py - test_summary_observation_collector.py -) - -add_python_package("python.tests.ert.enkf.export" ${PYTHON_INSTALL_PREFIX}/tests/ert/enkf/export "${TEST_SOURCES}" False) - -addPythonTest(ert.enkf.export.custom_kw_collector tests.ert.enkf.export.test_custom_kw_collector.CustomKwCollectorTest) -addPythonTest(ert.enkf.export.design_matrix tests.ert.enkf.export.test_design_matrix.DesignMatrixTest) -addPythonTest(ert.enkf.export.export_join tests.ert.enkf.export.test_export_join.ExportJoinTest) -addPythonTest(ert.enkf.export.gen_data_collector tests.ert.enkf.export.test_gen_data_collector.GenDataCollectorTest) -addPythonTest(ert.enkf.export.gen_data_observation_collector tests.ert.enkf.export.test_gen_data_observation_collector.GenDataObservationCollectorTest) -addPythonTest(ert.enkf.export.gen_kw_collector tests.ert.enkf.export.test_gen_kw_collector.GenKwCollectorTest) -addPythonTest(ert.enkf.export.numpy_and_pandas tests.ert.enkf.export.test_numpy_and_pandas.NumpyAndPandasTest) -addPythonTest(ert.enkf.export.misfit_collector tests.ert.enkf.export.test_misfit_collector.MisfitCollectorTest) -addPythonTest(ert.enkf.export.summary_collector tests.ert.enkf.export.test_summary_collector.SummaryCollectorTest) -addPythonTest(ert.enkf.export.summary_observation_collector tests.ert.enkf.export.test_summary_observation_collector.SummaryObservationCollectorTest) - -if (STATOIL_TESTDATA_ROOT) - addPythonTest(ert.enkf.export.arg_loader tests.ert.enkf.export.test_arg_loader.ArgLoaderTest LABELS StatoilData) -endif() \ No newline at end of file diff --git a/ThirdParty/Ert/python/tests/ert/enkf/export/__init__.py b/ThirdParty/Ert/python/tests/ert/enkf/export/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/python/tests/ert/enkf/export/test_arg_loader.py b/ThirdParty/Ert/python/tests/ert/enkf/export/test_arg_loader.py deleted file mode 100644 index 58e510271c..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/export/test_arg_loader.py +++ /dev/null @@ -1,24 +0,0 @@ -import math - -from ert.enkf.export import ArgLoader -from ert.test import ErtTestContext, ExtendedTestCase - -class ArgLoaderTest(ExtendedTestCase): - - - def test_arg_loader(self): - - with self.assertRaises(IOError): - arg = ArgLoader.load("arg1X") - - arg_file = self.createTestPath("Statoil/config/with_GEN_DATA_RFT/wellpath/WI_1.txt") - - with self.assertRaises(ValueError): - arg = ArgLoader.load(arg_file , column_names = ["Col1" , "Col2" , "Col3" ,"COl5" , "Col6"]) - - arg = ArgLoader.load(arg_file , column_names = ["utm_x" , "utm_y" , "md" , "tvd"]) - self.assertFloatEqual( arg["utm_x"][0] , 461317.620646) - - - - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/export/test_custom_kw_collector.py b/ThirdParty/Ert/python/tests/ert/enkf/export/test_custom_kw_collector.py deleted file mode 100644 index dba81ea80b..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/export/test_custom_kw_collector.py +++ /dev/null @@ -1,40 +0,0 @@ -from ert.enkf.export import CustomKWCollector -from ert.test import ErtTestContext, ExtendedTestCase - -class CustomKwCollectorTest(ExtendedTestCase): - - def test_custom_kw_collector_non_current_fs(self): - config = self.createTestPath("local/custom_kw/mini_config") - - with ErtTestContext("python/enkf/export/custom_kw_collector_from_fs", config) as context: - ert = context.getErt() - - data = CustomKWCollector.loadAllCustomKWData(ert, "test_run") - - self.assertTrue(len(data.columns) == 0) - - - def test_custom_kw_collector_current_fs(self): - config = self.createTestPath("local/custom_kw/mini_config") - - with ErtTestContext("python/enkf/export/custom_kw_collector_from_current_fs", config) as context: - ert = context.getErt() - fs = ert.getEnkfFsManager().getFileSystem("test_run") - ert.getEnkfFsManager().switchFileSystem(fs) - data = CustomKWCollector.loadAllCustomKWData(ert, "test_run") - - self.assertFloatEqual(data["AGGREGATED:PERLIN_1"][0], -0.167794) - self.assertFloatEqual(data["AGGREGATED:PERLIN_1"][8], -1.276058) - self.assertFloatEqual(data["AGGREGATED:PERLIN_1"][9], -0.137903) - - self.assertFloatEqual(data["AGGREGATED:PERLIN_2"][0], 1.00263) - self.assertFloatEqual(data["AGGREGATED:PERLIN_2"][8], -0.105634) - self.assertFloatEqual(data["AGGREGATED:PERLIN_2"][9], 1.032522) - - self.assertFloatEqual(data["AGGREGATED:PERLIN_3"][0], 0.190479) - self.assertFloatEqual(data["AGGREGATED:PERLIN_3"][8], -0.917785) - self.assertFloatEqual(data["AGGREGATED:PERLIN_3"][9], 0.220371) - - self.assertEqual(data["AGGREGATED:STATE"][0], "Positive") - self.assertEqual(data["AGGREGATED:STATE"][8], "Negative") - self.assertEqual(data["AGGREGATED:STATE"][9], "Positive") diff --git a/ThirdParty/Ert/python/tests/ert/enkf/export/test_design_matrix.py b/ThirdParty/Ert/python/tests/ert/enkf/export/test_design_matrix.py deleted file mode 100644 index 8c513a63fa..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/export/test_design_matrix.py +++ /dev/null @@ -1,94 +0,0 @@ -from ert.enkf.export import DesignMatrixReader -from ert.test import ExtendedTestCase -from ert.test.test_area import TestAreaContext - -def dumpDesignMatrix1(path): - with open(path, "w") as dm: - dm.write("Case CORR_SEIS_HEIMDAL VOL_FRAC_HEIMDAL AZIM_IND_HEIMDAL VARIO_PARAL_HEIMDAL VARIO_NORM_HEIMDAL VARIO_VERT_HEIMDAL SEIS_COND_HEIMDAL\n") - dm.write("0 0.8 0.08 125 1000 500 25 ON\n") - dm.write("1 0.8 0.15 125 2000 1000 25 ON\n") - dm.write("2 0.8 0.20 125 4000 2000 25 ON\n") - - -def dumpDesignMatrix2(path): - with open(path, "w") as dm: - dm.write("Case CORR_SEIS_HEIMDAL VOL_FRAC_HEIMDAL AZIM_IND_HEIMDAL VARIO_PARAL_HEIMDAL VARIO_NORM_HEIMDAL VARIO_VERT_HEIMDAL SEIS_COND_HEIMDAL\n") - dm.write("0 0.8 0.08 125 1000 500 25 ON\n") - dm.write("1 0.8 0.15 125 2000 1000 25 ON\n") - dm.write("2 0.8 0.20 125 4000 2000 25 ON\n") - dm.write("4 0.8 0.30 125 16000 8000 25 ON\n") - - - -class DesignMatrixTest(ExtendedTestCase): - - def test_read_design_matrix(self): - with TestAreaContext("python/enkf/export/design_matrix"): - dumpDesignMatrix1("DesignMatrix.txt") - dm = DesignMatrixReader.loadDesignMatrix("DesignMatrix.txt") - - self.assertEqual(dm["CORR_SEIS_HEIMDAL"][0], 0.8) - self.assertEqual(dm["VOL_FRAC_HEIMDAL"][0], 0.08) - self.assertEqual(dm["AZIM_IND_HEIMDAL"][0], 125) - self.assertEqual(dm["VARIO_PARAL_HEIMDAL"][0], 1000) - self.assertEqual(dm["VARIO_NORM_HEIMDAL"][0], 500) - self.assertEqual(dm["VARIO_VERT_HEIMDAL"][0], 25) - self.assertEqual(dm["SEIS_COND_HEIMDAL"][0], "ON") - - self.assertEqual(dm["CORR_SEIS_HEIMDAL"][1], 0.8) - self.assertEqual(dm["VOL_FRAC_HEIMDAL"][1], 0.15) - self.assertEqual(dm["AZIM_IND_HEIMDAL"][1], 125) - self.assertEqual(dm["VARIO_PARAL_HEIMDAL"][1], 2000) - self.assertEqual(dm["VARIO_NORM_HEIMDAL"][1], 1000) - self.assertEqual(dm["VARIO_VERT_HEIMDAL"][1], 25) - self.assertEqual(dm["SEIS_COND_HEIMDAL"][1], "ON") - - self.assertEqual(dm["CORR_SEIS_HEIMDAL"][2], 0.8) - self.assertEqual(dm["VOL_FRAC_HEIMDAL"][2], 0.20) - self.assertEqual(dm["AZIM_IND_HEIMDAL"][2], 125) - self.assertEqual(dm["VARIO_PARAL_HEIMDAL"][2], 4000) - self.assertEqual(dm["VARIO_NORM_HEIMDAL"][2], 2000) - self.assertEqual(dm["VARIO_VERT_HEIMDAL"][2], 25) - self.assertEqual(dm["SEIS_COND_HEIMDAL"][2], "ON") - - - def test_read_design_matrix_2(self): - with TestAreaContext("python/enkf/export/design_matrix_2"): - dumpDesignMatrix2("DesignMatrix2.txt") - dm = DesignMatrixReader.loadDesignMatrix("DesignMatrix2.txt") - - self.assertEqual(dm["CORR_SEIS_HEIMDAL"][0], 0.8) - self.assertEqual(dm["VOL_FRAC_HEIMDAL"][0], 0.08) - self.assertEqual(dm["AZIM_IND_HEIMDAL"][0], 125) - self.assertEqual(dm["VARIO_PARAL_HEIMDAL"][0], 1000) - self.assertEqual(dm["VARIO_NORM_HEIMDAL"][0], 500) - self.assertEqual(dm["VARIO_VERT_HEIMDAL"][0], 25) - self.assertEqual(dm["SEIS_COND_HEIMDAL"][0], "ON") - - self.assertEqual(dm["CORR_SEIS_HEIMDAL"][1], 0.8) - self.assertEqual(dm["VOL_FRAC_HEIMDAL"][1], 0.15) - self.assertEqual(dm["AZIM_IND_HEIMDAL"][1], 125) - self.assertEqual(dm["VARIO_PARAL_HEIMDAL"][1], 2000) - self.assertEqual(dm["VARIO_NORM_HEIMDAL"][1], 1000) - self.assertEqual(dm["VARIO_VERT_HEIMDAL"][1], 25) - self.assertEqual(dm["SEIS_COND_HEIMDAL"][1], "ON") - - self.assertEqual(dm["CORR_SEIS_HEIMDAL"][2], 0.8) - self.assertEqual(dm["VOL_FRAC_HEIMDAL"][2], 0.20) - self.assertEqual(dm["AZIM_IND_HEIMDAL"][2], 125) - self.assertEqual(dm["VARIO_PARAL_HEIMDAL"][2], 4000) - self.assertEqual(dm["VARIO_NORM_HEIMDAL"][2], 2000) - self.assertEqual(dm["VARIO_VERT_HEIMDAL"][2], 25) - self.assertEqual(dm["SEIS_COND_HEIMDAL"][2], "ON") - - - with self.assertRaises(KeyError): - self.assertEqual(dm["CORR_SEIS_HEIMDAL"][3], 0.8) - - self.assertEqual(dm["CORR_SEIS_HEIMDAL"][4], 0.8) - self.assertEqual(dm["VOL_FRAC_HEIMDAL"][4], 0.30) - self.assertEqual(dm["AZIM_IND_HEIMDAL"][4], 125) - self.assertEqual(dm["VARIO_PARAL_HEIMDAL"][4], 16000) - self.assertEqual(dm["VARIO_NORM_HEIMDAL"][4], 8000) - self.assertEqual(dm["VARIO_VERT_HEIMDAL"][4], 25) - self.assertEqual(dm["SEIS_COND_HEIMDAL"][4], "ON") diff --git a/ThirdParty/Ert/python/tests/ert/enkf/export/test_export_join.py b/ThirdParty/Ert/python/tests/ert/enkf/export/test_export_join.py deleted file mode 100644 index a46d5e9728..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/export/test_export_join.py +++ /dev/null @@ -1,90 +0,0 @@ -from ert.enkf.export import DesignMatrixReader, SummaryCollector, GenKwCollector, MisfitCollector -from ert.test import ExtendedTestCase, ErtTestContext -import pandas -import numpy -import os - -def dumpDesignMatrix(path): - with open(path, "w") as dm: - dm.write("REALIZATION EXTRA_FLOAT_COLUMN EXTRA_INT_COLUMN EXTRA_STRING_COLUMN\n") - dm.write("0 0.08 125 ON\n") - dm.write("1 0.07 225 OFF\n") - dm.write("2 0.08 325 ON\n") - dm.write("3 0.06 425 ON\n") - dm.write("4 0.08 525 OFF\n") - dm.write("5 0.08 625 ON\n") - dm.write("6 0.09 725 ON\n") - dm.write("7 0.08 825 OFF\n") - dm.write("8 0.02 925 ON\n") - dm.write("9 0.08 125 ON\n") - dm.write("10 0.08 225 ON\n") - dm.write("11 0.05 325 OFF\n") - dm.write("12 0.08 425 ON\n") - dm.write("13 0.07 525 ON\n") - dm.write("14 0.08 625 UNKNOWN\n") - dm.write("15 0.08 725 ON\n") - dm.write("16 0.08 825 ON\n") - dm.write("17 0.08 925 OFF\n") - dm.write("18 0.09 125 ON\n") - dm.write("19 0.08 225 ON\n") - dm.write("20 0.06 325 OFF\n") - dm.write("21 0.08 425 ON\n") - dm.write("22 0.07 525 ON\n") - dm.write("23 0.08 625 OFF\n") - dm.write("24 0.08 725 ON\n") - -class ExportJoinTest(ExtendedTestCase): - - def setUp(self): - os.environ["TZ"] = "CET" # The ert_statoil case was generated in CET - self.config = self.createTestPath("local/snake_oil/snake_oil.ert") - - def test_join(self): - - with ErtTestContext("python/enkf/export/export_join", self.config) as context: - dumpDesignMatrix("DesignMatrix.txt") - ert = context.getErt() - - summary_data = SummaryCollector.loadAllSummaryData(ert, "default_1") - gen_kw_data = GenKwCollector.loadAllGenKwData(ert, "default_1") - misfit = MisfitCollector.loadAllMisfitData(ert, "default_1") - dm = DesignMatrixReader.loadDesignMatrix("DesignMatrix.txt") - - result = summary_data.join(gen_kw_data, how='inner') - result = result.join(misfit, how='inner') - result = result.join(dm, how='inner') - - first_date = "2010-01-10" - last_date = "2015-06-23" - - self.assertFloatEqual(result["SNAKE_OIL_PARAM:OP1_OCTAVES"][0][first_date], 3.947766) - self.assertFloatEqual(result["SNAKE_OIL_PARAM:OP1_OCTAVES"][24][first_date], 4.206698) - self.assertFloatEqual(result["SNAKE_OIL_PARAM:OP1_OCTAVES"][24][last_date], 4.206698) - - self.assertFloatEqual(result["EXTRA_FLOAT_COLUMN"][0][first_date], 0.08) - self.assertEqual(result["EXTRA_INT_COLUMN"][0][first_date], 125) - self.assertEqual(result["EXTRA_STRING_COLUMN"][0][first_date], "ON") - - self.assertFloatEqual(result["EXTRA_FLOAT_COLUMN"][0][last_date], 0.08) - self.assertEqual(result["EXTRA_INT_COLUMN"][0][last_date], 125) - self.assertEqual(result["EXTRA_STRING_COLUMN"][0][last_date], "ON") - - self.assertFloatEqual(result["EXTRA_FLOAT_COLUMN"][1][last_date], 0.07) - self.assertEqual(result["EXTRA_INT_COLUMN"][1][last_date], 225) - self.assertEqual(result["EXTRA_STRING_COLUMN"][1][last_date], "OFF") - - self.assertFloatEqual(result["MISFIT:FOPR"][0][last_date], 489.191069) - self.assertFloatEqual(result["MISFIT:FOPR"][24][last_date], 1841.906872) - - self.assertFloatEqual(result["MISFIT:TOTAL"][0][first_date], 500.170035) - self.assertFloatEqual(result["MISFIT:TOTAL"][0][last_date], 500.170035) - self.assertFloatEqual(result["MISFIT:TOTAL"][24][last_date], 1925.793865) - - - with self.assertRaises(KeyError): - realization_13 = result.loc[60] - - column_count = len(result.columns) - self.assertEqual(result.dtypes[0], numpy.float64) - self.assertEqual(result.dtypes[column_count - 1], numpy.object) - self.assertEqual(result.dtypes[column_count - 2], numpy.int64) diff --git a/ThirdParty/Ert/python/tests/ert/enkf/export/test_gen_data_collector.py b/ThirdParty/Ert/python/tests/ert/enkf/export/test_gen_data_collector.py deleted file mode 100644 index 12fe99c7ca..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/export/test_gen_data_collector.py +++ /dev/null @@ -1,21 +0,0 @@ -from ert.enkf.export import GenDataCollector -from ert.test import ErtTestContext, ExtendedTestCase - - -class GenDataCollectorTest(ExtendedTestCase): - def test_gen_data_collector(self): - config = self.createTestPath("local/snake_oil/snake_oil.ert") - with ErtTestContext("python/enkf/export/gen_data_collector", config) as context: - ert = context.getErt() - - with self.assertRaises(KeyError): - data = GenDataCollector.loadGenData(ert, "default_0", "RFT_XX", 199) - - with self.assertRaises(ValueError): - data = GenDataCollector.loadGenData(ert, "default_0", "SNAKE_OIL_OPR_DIFF", 198) - - data1 = GenDataCollector.loadGenData(ert, "default_0", "SNAKE_OIL_OPR_DIFF", 199) - - self.assertFloatEqual(data1[0][0], -0.008206) - self.assertFloatEqual(data1[24][1], -0.119255) - self.assertFloatEqual(data1[24][1000], -0.258516) diff --git a/ThirdParty/Ert/python/tests/ert/enkf/export/test_gen_data_observation_collector.py b/ThirdParty/Ert/python/tests/ert/enkf/export/test_gen_data_observation_collector.py deleted file mode 100644 index 58357f2ab5..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/export/test_gen_data_observation_collector.py +++ /dev/null @@ -1,33 +0,0 @@ -from ert.enkf.export import GenDataObservationCollector -from ert.test import ErtTestContext, ExtendedTestCase - - -class GenDataObservationCollectorTest(ExtendedTestCase): - - def test_gen_data_collector(self): - config = self.createTestPath("local/custom_kw/mini_config") - with ErtTestContext("python/enkf/export/gen_data_observation_collector", config) as context: - ert = context.getErt() - - obs_key = GenDataObservationCollector.getObservationKeyForDataKey(ert, "PERLIN", 1) - self.assertEqual(obs_key, "GEN_PERLIN_1") - - obs_key = GenDataObservationCollector.getObservationKeyForDataKey(ert, "PERLIN", 2) - self.assertEqual(obs_key, "GEN_PERLIN_2") - - obs_key = GenDataObservationCollector.getObservationKeyForDataKey(ert, "PERLIN", 3) - self.assertEqual(obs_key, "GEN_PERLIN_3") - - obs_key = GenDataObservationCollector.getObservationKeyForDataKey(ert, "PERLIN", 4) - self.assertIsNone(obs_key) - - obs_key = GenDataObservationCollector.getObservationKeyForDataKey(ert, "PERLINk", 1) - self.assertIsNone(obs_key) - - data = GenDataObservationCollector.loadGenDataObservations(ert, "default", "GEN_PERLIN_1") - - self.assertFloatEqual(data["GEN_PERLIN_1"][0], -0.616789) - self.assertFloatEqual(data["STD_GEN_PERLIN_1"][0], 0.2) - - with self.assertRaises(KeyError): - GenDataObservationCollector.loadGenDataObservations(ert, "default", "GEN_PERLIN_4") \ No newline at end of file diff --git a/ThirdParty/Ert/python/tests/ert/enkf/export/test_gen_kw_collector.py b/ThirdParty/Ert/python/tests/ert/enkf/export/test_gen_kw_collector.py deleted file mode 100644 index fd57b7664e..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/export/test_gen_kw_collector.py +++ /dev/null @@ -1,32 +0,0 @@ -from ert.enkf.export import GenKwCollector -from ert.test import ErtTestContext, ExtendedTestCase - - -class GenKwCollectorTest(ExtendedTestCase): - def setUp(self): - self.config = self.createTestPath("local/snake_oil/snake_oil.ert") - - def test_gen_kw_collector(self): - with ErtTestContext("python/enkf/export/gen_kw_collector", self.config) as context: - ert = context.getErt() - - data = GenKwCollector.loadAllGenKwData(ert, "default_0") - - self.assertFloatEqual(data["SNAKE_OIL_PARAM:OP1_PERSISTENCE"][0], 0.047517) - self.assertFloatEqual(data["SNAKE_OIL_PARAM:OP1_PERSISTENCE"][24], 0.160907) - - self.assertFloatEqual(data["SNAKE_OIL_PARAM:OP1_OFFSET"][0], 0.054539) - self.assertFloatEqual(data["SNAKE_OIL_PARAM:OP1_OFFSET"][12], 0.057807) - - realization_20 = data.loc[20] - - with self.assertRaises(KeyError): - realization_60 = data.loc[60] - - data = GenKwCollector.loadAllGenKwData(ert, "default_0", ["SNAKE_OIL_PARAM:OP1_PERSISTENCE", "SNAKE_OIL_PARAM:OP1_OFFSET"]) - - self.assertFloatEqual(data["SNAKE_OIL_PARAM:OP1_PERSISTENCE"][0], 0.047517) - self.assertFloatEqual(data["SNAKE_OIL_PARAM:OP1_OFFSET"][0], 0.054539) - - with self.assertRaises(KeyError): - data["SNAKE_OIL_PARAM:OP1_DIVERGENCE_SCALE"] diff --git a/ThirdParty/Ert/python/tests/ert/enkf/export/test_misfit_collector.py b/ThirdParty/Ert/python/tests/ert/enkf/export/test_misfit_collector.py deleted file mode 100644 index 057b571dea..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/export/test_misfit_collector.py +++ /dev/null @@ -1,23 +0,0 @@ -from ert.enkf.export import MisfitCollector -from ert.test import ErtTestContext, ExtendedTestCase - - -class MisfitCollectorTest(ExtendedTestCase): - def setUp(self): - self.config = self.createTestPath("local/snake_oil/snake_oil.ert") - - def test_misfit_collector(self): - with ErtTestContext("python/enkf/export/misfit_collector", self.config) as context: - ert = context.getErt() - data = MisfitCollector.loadAllMisfitData(ert, "default_0") - - self.assertFloatEqual(data["MISFIT:FOPR"][0], 798.378619) - self.assertFloatEqual(data["MISFIT:FOPR"][24], 1332.219633) - - self.assertFloatEqual(data["MISFIT:TOTAL"][0], 826.651491) - self.assertFloatEqual(data["MISFIT:TOTAL"][24], 1431.305646) - - realization_20 = data.loc[20] - - with self.assertRaises(KeyError): - realization_60 = data.loc[60] diff --git a/ThirdParty/Ert/python/tests/ert/enkf/export/test_numpy_and_pandas.py b/ThirdParty/Ert/python/tests/ert/enkf/export/test_numpy_and_pandas.py deleted file mode 100644 index e3763467ff..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/export/test_numpy_and_pandas.py +++ /dev/null @@ -1,82 +0,0 @@ -import numpy -from pandas import MultiIndex, DataFrame -import pandas as pandas -from ert.test import ExtendedTestCase - - -class NumpyAndPandasTest(ExtendedTestCase): - - def test_numpy(self): - data = numpy.empty(shape=(10, 10), dtype=numpy.float64) - data.fill(numpy.nan) - - self.assertTrue(numpy.isnan(data[0][0])) - self.assertTrue(numpy.isnan(data[9][9])) - - with self.assertRaises(IndexError): - v = data[10][9] - - data[5][5] = 1.0 - - self.assertEqual(data[5][5], 1.0) - - data[0] = 5.0 - - test_data = numpy.empty(shape=10) - test_data.fill(5.0) - - self.assertTrue(numpy.array_equal(data[0], test_data)) - - data = numpy.transpose(data) - - self.assertTrue(numpy.array_equal(data[:,0], test_data)) - - row = data[0] - row[5] = 11 - self.assertEqual(data[0][5], 11) - - - def test_pandas_join(self): - - multi_index = MultiIndex.from_product([[1, 2], ["A", "B", "C"]], names=["REALIZATION", "LABEL"]) - - data = DataFrame(data=[[1, 2, 3], [2, 4, 6], [4, 8, 12]] * 2, index=multi_index, columns=["C1", "C2", "C3"]) - - new_column = DataFrame(data=[4.0, 4.4, 4.8], index=[1, 2, 3], columns=["C4"]) - new_column.index.name = "REALIZATION" - - result = data.join(new_column, how='inner') - - self.assertFloatEqual(result["C4"][1]["A"], 4.0) - self.assertFloatEqual(result["C4"][1]["B"], 4.0) - self.assertFloatEqual(result["C4"][1]["C"], 4.0) - - self.assertFloatEqual(result["C4"][2]["A"], 4.4) - self.assertFloatEqual(result["C4"][2]["B"], 4.4) - self.assertFloatEqual(result["C4"][2]["C"], 4.4) - - - - def test_pandas_concatenate(self): - - d1 = DataFrame(data=[2, 4, 6, 8], columns=["A"], index=[1, 2, 3, 4]) - d2 = DataFrame(data=[[1, 1.1], [3, 3.3], [5, 5.5], [7, 7.7], [9, 9.9]], columns=["A", "B"], index=[1, 2, 3, 4, 5]) - - result = pandas.concat([d1, d2], keys=[1, 2]) - - self.assertEqual(result["A"][1][2], 4) - self.assertEqual(result["A"][2][2], 3) - self.assertTrue(numpy.isnan(result["B"][1][1])) - self.assertFloatEqual(result["B"][2][4], 7.7) - - - def test_pandas_extend_index(self): - d1 = DataFrame(data=[2, 4, 6, 8], columns=["A"], index=[1, 2, 3, 4]) - d1.index.name = "first" - - d1["second"] = "default" - d1.set_index(["second"], append=True, inplace=True) - self.assertEqual(d1.index.names, ["first", "second"]) - - d1 = d1.reorder_levels(["second", "first"]) - self.assertEqual(d1.index.names, ["second", "first"]) diff --git a/ThirdParty/Ert/python/tests/ert/enkf/export/test_summary_collector.py b/ThirdParty/Ert/python/tests/ert/enkf/export/test_summary_collector.py deleted file mode 100644 index fea0d22776..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/export/test_summary_collector.py +++ /dev/null @@ -1,34 +0,0 @@ -from ert.enkf.export import SummaryCollector -from ert.test import ErtTestContext, ExtendedTestCase -import os - - -class SummaryCollectorTest(ExtendedTestCase): - def setUp(self): - os.environ["TZ"] = "CET" # The ert_statoil case was generated in CET - self.config = self.createTestPath("local/snake_oil/snake_oil.ert") - - def test_summary_collector(self): - with ErtTestContext("python/enkf/export/summary_collector", self.config) as context: - ert = context.getErt() - - data = SummaryCollector.loadAllSummaryData(ert, "default_0") - - self.assertFloatEqual(data["WWCT:OP2"][0]["2010-01-10"], 0.385549) - self.assertFloatEqual(data["WWCT:OP2"][24]["2010-01-10"], 0.498331) - - self.assertFloatEqual(data["FOPR"][0]["2010-01-10"], 0.118963) - self.assertFloatEqual(data["FOPR"][0]["2015-06-23"], 0.133601) - - realization_20 = data.loc[20] - - with self.assertRaises(KeyError): - realization_60 = data.loc[60] - - data = SummaryCollector.loadAllSummaryData(ert, "default_0", ["WWCT:OP1", "WWCT:OP2"]) - - self.assertFloatEqual(data["WWCT:OP1"][0]["2010-01-10"], 0.352953) - self.assertFloatEqual(data["WWCT:OP2"][0]["2010-01-10"], 0.385549) - - with self.assertRaises(KeyError): - data["FOPR"] diff --git a/ThirdParty/Ert/python/tests/ert/enkf/export/test_summary_observation_collector.py b/ThirdParty/Ert/python/tests/ert/enkf/export/test_summary_observation_collector.py deleted file mode 100644 index 92a3baf55f..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/export/test_summary_observation_collector.py +++ /dev/null @@ -1,45 +0,0 @@ -from ert.enkf.export import SummaryObservationCollector -from ert.test import ErtTestContext, ExtendedTestCase -import os - -class SummaryObservationCollectorTest(ExtendedTestCase): - - def setUp(self): - os.environ["TZ"] = "CET" # The ert_statoil case was generated in CET - self.config = self.createTestPath("local/snake_oil/snake_oil.ert") - - - def test_summary_observation_collector(self): - - with ErtTestContext("python/enkf/export/summary_observation_collector", self.config) as context: - - ert = context.getErt() - - self.assertTrue(SummaryObservationCollector.summaryKeyHasObservations(ert, "FOPR")) - self.assertFalse(SummaryObservationCollector.summaryKeyHasObservations(ert, "FOPT")) - - keys = SummaryObservationCollector.getAllObservationKeys(ert) - self.assertTrue("FOPR" in keys) - self.assertTrue("WOPR:OP1" in keys) - self.assertFalse("WOPR:OP2" in keys) - - data = SummaryObservationCollector.loadObservationData(ert, "default_0") - - self.assertFloatEqual(data["FOPR"]["2010-01-10"], 0.001696887) - self.assertFloatEqual(data["STD_FOPR"]["2010-01-10"], 0.1) - - self.assertFloatEqual(data["WOPR:OP1"]["2010-03-31"], 0.1) - self.assertFloatEqual(data["STD_WOPR:OP1"]["2010-03-31"], 0.05) - - - with self.assertRaises(KeyError): - fgir = data["FGIR"] - - - data = SummaryObservationCollector.loadObservationData(ert, "default_0", ["WOPR:OP1"]) - - self.assertFloatEqual(data["WOPR:OP1"]["2010-03-31"], 0.1) - self.assertFloatEqual(data["STD_WOPR:OP1"]["2010-03-31"], 0.05) - - with self.assertRaises(KeyError): - data["FOPR"] diff --git a/ThirdParty/Ert/python/tests/ert/enkf/plot/CMakeLists.txt b/ThirdParty/Ert/python/tests/ert/enkf/plot/CMakeLists.txt deleted file mode 100644 index 15af92f86c..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/plot/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -set(TEST_SOURCES - __init__.py - test_plot_data.py -) - -add_python_package("python.tests.ert.enkf.plot" ${PYTHON_INSTALL_PREFIX}/tests/ert/enkf/plot "${TEST_SOURCES}" False) - -if (STATOIL_TESTDATA_ROOT) - addPythonTest(ert.enkf.plot.plot_block_data tests.ert.enkf.plot.test_plot_data.PlotDataTest LABELS StatoilData) -endif() \ No newline at end of file diff --git a/ThirdParty/Ert/python/tests/ert/enkf/plot/__init__.py b/ThirdParty/Ert/python/tests/ert/enkf/plot/__init__.py deleted file mode 100644 index 284bf2e772..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/plot/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__author__ = 'jpb' diff --git a/ThirdParty/Ert/python/tests/ert/enkf/plot/test_plot_data.py b/ThirdParty/Ert/python/tests/ert/enkf/plot/test_plot_data.py deleted file mode 100644 index 41c27231a3..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/plot/test_plot_data.py +++ /dev/null @@ -1,101 +0,0 @@ -from ert.enkf.plot_data import PlotBlockData, PlotBlockDataLoader, PlotBlockVector -from ert.util import DoubleVector -from ert.test import ExtendedTestCase, ErtTestContext - - -class PlotDataTest(ExtendedTestCase): - - def setUp(self): - self.config_file = self.createTestPath("Statoil/config/with_RFT/config") - - def test_plot_block_vector(self): - vector = DoubleVector() - vector.append(1.5) - vector.append(2.5) - vector.append(3.5) - plot_block_vector = PlotBlockVector(1, vector) - - self.assertEqual(plot_block_vector.getRealizationNumber(), 1) - self.assertEqual(plot_block_vector[0], 1.5) - self.assertEqual(plot_block_vector[2], 3.5) - - self.assertEqual(len(plot_block_vector), len(vector)) - - - def test_plot_block_data(self): - depth = DoubleVector() - depth.append(2.5) - depth.append(3.5) - - data = PlotBlockData(depth) - - self.assertEqual(data.getDepth(), depth) - - vector = PlotBlockVector(1, DoubleVector()) - data.addPlotBlockVector(vector) - data.addPlotBlockVector(PlotBlockVector(2, DoubleVector())) - - self.assertEqual(len(data), 2) - - self.assertEqual(vector, data[1]) - - - def compareLists(self, source, target): - self.assertEqual(len(source), len(target)) - for index, value in enumerate(source): - self.assertEqual(value, target[index]) - - - def checkBlockData(self, ert, obs_key, report_step): - """ - @type ert: EnKFMain - @type obs_key: str - @type report_step: int - """ - enkf_obs = ert.getObservations() - obs_vector = enkf_obs[obs_key] - loader = PlotBlockDataLoader(obs_vector) - - fs = ert.getEnkfFsManager().getCurrentFileSystem() - plot_block_data = loader.load(fs, report_step) - - self.assertEqual(ert.getEnsembleSize(), len(plot_block_data)) - - depth = plot_block_data.getDepth() - - depth_test_values = [1752.24998474, 1757.88926697, 1760.70924377] - if report_step == 56: - depth_test_values.append(1763.52885437) - - self.assertAlmostEqualList(depth_test_values, depth) - - block_obs = len(obs_vector.getNode(report_step)) - self.assertEqual(block_obs, len(plot_block_data[0])) - self.assertEqual(block_obs, len(plot_block_data[9])) - - - if report_step == 50: - rft_values = [244.681655884, 245.217041016, 245.48500061] - else: - rft_values = [239.7550354, 240.290313721, 240.558197021, 240.825881958] - - self.assertAlmostEqualList(rft_values, plot_block_data[0]) - - - if report_step == 50: - rft_values = [238.702560425, 239.237838745, 239.505737305] - else: - rft_values = [234.41583252, 234.95098877, 235.218841553, 235.486480713] - - self.assertAlmostEqualList(rft_values, plot_block_data[9]) - - - - - def test_plot_block_data_fs(self): - with ErtTestContext("plot_block_data_test", self.config_file) as test_context: - ert = test_context.getErt() - - self.checkBlockData(ert, "RFT2", 50) - self.checkBlockData(ert, "RFT5", 56) - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_active_list.py b/ThirdParty/Ert/python/tests/ert/enkf/test_active_list.py deleted file mode 100644 index 53a3c089a2..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_active_list.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (C) 2015 Statoil ASA, Norway. -# -# The file 'test_active_list.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -from ert.enkf import ActiveList -from ert.enkf import ActiveMode -from ert.test import ExtendedTestCase - - - -class ActiveListTest(ExtendedTestCase): - - def test_create(self): - active_list = ActiveList() - self.assertEqual( active_list.getMode() , ActiveMode.ALL_ACTIVE ) - active_list.addActiveIndex( 10 ) - - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_analysis_config.py b/ThirdParty/Ert/python/tests/ert/enkf/test_analysis_config.py deleted file mode 100644 index 630d7a0db2..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_analysis_config.py +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env python -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'test_analysis_config.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -import os -from ert.enkf import AnalysisConfig -from ert.test import ExtendedTestCase - - -class AnalysisConfigTest(ExtendedTestCase): - - def test_keywords_for_monitoring_simulation_runtime(self): - ac = AnalysisConfig() - - # Unless the MIN_REALIZATIONS is set in config, one is required to have "all" realizations. - self.assertFalse(ac.haveEnoughRealisations(5, 10)) - self.assertTrue(ac.haveEnoughRealisations(10, 10)) - - ac.set_max_runtime( 50 ) - self.assertEqual( 50 , ac.get_max_runtime() ) - - ac.set_stop_long_running( True ) - self.assertTrue( ac.get_stop_long_running() ) - - - def test_analysis_modules(self): - ac = AnalysisConfig() - self.assertIsNone( ac.activeModuleName() ) - self.assertIsNotNone( ac.getModuleList() ) - - def test_analysis_config_global_std_scaling(self): - ac = AnalysisConfig() - self.assertFloatEqual(ac.getGlobalStdScaling(), 1.0) - ac.setGlobalStdScaling(0.77) - self.assertFloatEqual(ac.getGlobalStdScaling(), 0.77) diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_analysis_iter_config.py b/ThirdParty/Ert/python/tests/ert/enkf/test_analysis_iter_config.py deleted file mode 100644 index dfe7f9d13e..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_analysis_iter_config.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python -# Copyright (C) 2014 Statoil ASA, Norway. -# -# The file 'test_analysis_iter_config.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -import os -from ert.enkf import AnalysisIterConfig -from ert.test import ExtendedTestCase - - -class AnalysisIterConfigTest(ExtendedTestCase): - - def test_set(self): - c = AnalysisIterConfig() - - self.assertFalse( c.caseFormatSet() ) - c.setCaseFormat("case%d") - self.assertTrue( c.caseFormatSet() ) - - self.assertFalse( c.numIterationsSet() ) - c.setNumIterations(1) - self.assertTrue( c.numIterationsSet() ) - - - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_block_obs.py b/ThirdParty/Ert/python/tests/ert/enkf/test_block_obs.py deleted file mode 100644 index 9363c204fe..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_block_obs.py +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (C) 2015 Statoil ASA, Norway. -# -# The file 'test_block_obs.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -import os - -from ert.enkf import BlockObservation -from ert.enkf import ActiveList, FieldConfig -from ert.test import ExtendedTestCase -from ert.ecl import EclGrid - - -class BlockObsTest(ExtendedTestCase): - - def test_create(self): - grid = EclGrid.createRectangular( (10,20,5) , (1,1,1) ) - field_config = FieldConfig("PRESSURE" , grid) - block_obs = BlockObservation("P-CONFIG" , field_config , grid) - - self.assertEqual( len(block_obs) , 0 ) - - block_obs.addPoint(1,2,3,100,25) - self.assertEqual( len(block_obs) , 1 ) - self.assertEqual( block_obs.getValue(0) , 100 ) - self.assertEqual( block_obs.getStd(0) , 25 ) - self.assertEqual( block_obs.getStdScaling(0) , 1 ) - - block_obs.addPoint(1,2,4,200,50) - self.assertEqual( len(block_obs) , 2 ) - self.assertEqual( block_obs.getValue(1) , 200 ) - self.assertEqual( block_obs.getStd(1) , 50 ) - self.assertEqual( block_obs.getStdScaling(1) , 1 ) - - active_list = ActiveList( ) - block_obs.updateStdScaling( 0.50 , active_list ) - self.assertEqual( block_obs.getStdScaling(0) , 0.50 ) - self.assertEqual( block_obs.getStdScaling(1) , 0.50 ) - - active_list.addActiveIndex( 1 ) - block_obs.updateStdScaling( 2.00 , active_list ) - self.assertEqual( block_obs.getStdScaling(0) , 0.50 ) - self.assertEqual( block_obs.getStdScaling(1) , 2.00 ) - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_custom_kw_config_set.py b/ThirdParty/Ert/python/tests/ert/enkf/test_custom_kw_config_set.py deleted file mode 100644 index 7bbc4b27fa..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_custom_kw_config_set.py +++ /dev/null @@ -1,80 +0,0 @@ -import os -from ert.enkf import CustomKWConfigSet -from ert.enkf.config import CustomKWConfig -from ert.enkf.enkf_fs import EnkfFs -from ert.enkf.enkf_main import EnKFMain -from ert.test import ExtendedTestCase -from ert.test.ert_test_context import ErtTestContext -from ert.test.test_area import TestAreaContext -from ert.util.stringlist import StringList - - -class CustomKWConfigSetTest(ExtendedTestCase): - - def createCustomKWConfig(self, name, data): - with TestAreaContext("python/enkf/custom_kw_config_set_config") as test_area: - self.createResultFile("result_file", data) - - config = CustomKWConfig(name, "") - config.parseResultFile("result_file", StringList()) - - return config - - def createResultFile(self, filename, data): - with open(filename, "w") as output_file: - for key in data: - output_file.write("%s %s\n" % (key, data[key])) - - - def test_creation(self): - config_set = CustomKWConfigSet() - - config = self.createCustomKWConfig("TEST", {"VALUE_1": 0.5, "VALUE_2": 5, "VALUE_3": "string", "VALUE_4": "true"}) - self.assertItemsEqual(config.getKeys(), ["VALUE_1", "VALUE_2", "VALUE_3", "VALUE_4"]) - - config_set.addConfig(config) - keys = config_set.getStoredConfigKeys() - self.assertItemsEqual(keys, ["TEST"]) - - config_set.reset() - self.assertTrue(len(config_set.getStoredConfigKeys()) == 0) - - - def test_fwrite_and_fread(self): - with TestAreaContext("python/enkf/custom_kw_config_set_fwrite") as test_area: - trees_config = self.createCustomKWConfig("TREES", {"OAK": 0.1, "SPRUCE": 5, "FIR": "pines", "PALM": "coconut"}) - insects_config = self.createCustomKWConfig("INSECTS", {"MOSQUITO": "annoying", "FLY": 3.14, "BEETLE": 0.5}) - - config_set = CustomKWConfigSet() - config_set.addConfig(trees_config) - config_set.addConfig(insects_config) - - self.assertItemsEqual(config_set.getStoredConfigKeys(), ["TREES", "INSECTS"]) - - config_set.fwrite("config_set") - - self.assertTrue(os.path.exists("config_set")) - - config_set = CustomKWConfigSet("config_set") - - self.assertItemsEqual(config_set.getStoredConfigKeys(), ["TREES", "INSECTS"]) - - trees_config_from_file = CustomKWConfig("TREES", None) - config_set.updateConfig(trees_config_from_file) - - for key in ["OAK", "SPRUCE", "FIR", "PALM"]: - self.assertEqual(trees_config_from_file.indexOfKey(key), trees_config.indexOfKey(key)) - self.assertTrue(trees_config_from_file.keyIsDouble(key) == trees_config.keyIsDouble(key)) - - - insects_config_from_file = CustomKWConfig("INSECTS", None) - config_set.updateConfig(insects_config_from_file) - - for key in ["MOSQUITO", "FLY", "BEETLE"]: - self.assertEqual(insects_config_from_file.indexOfKey(key), insects_config.indexOfKey(key)) - self.assertTrue(insects_config_from_file.keyIsDouble(key) == insects_config.keyIsDouble(key)) - - - - - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_deprecation.py b/ThirdParty/Ert/python/tests/ert/enkf/test_deprecation.py deleted file mode 100644 index 3a09b9f5e5..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_deprecation.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python -# Copyright (C) 2011 Statoil ASA, Norway. -# -# The file 'test_deprecation.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -import warnings - -from ert.test import ErtTestContext, ExtendedTestCase - - -class DeprecationTest(ExtendedTestCase): - def setUp(self): - self.config_file = self.createTestPath("local/simple_config/minimum_config") - self.obs_file = self.createTestPath("local/simple_config/minimum_config") - - - # Added in 1.10 development - def test(self): - with ErtTestContext("enkf_deprecation", self.config_file) as test_context: - ert = test_context.getErt() - - ecl_config = ert.eclConfig() - with warnings.catch_warnings(): - ecl_config.get_grid( ) - - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_ecl_config.py b/ThirdParty/Ert/python/tests/ert/enkf/test_ecl_config.py deleted file mode 100644 index bd7f66ebde..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_ecl_config.py +++ /dev/null @@ -1,136 +0,0 @@ -#!/usr/bin/env python -# Copyright (C) 2013 Statoil ASA, Norway. -# -# The file 'test_analysis_config.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -import os -import os.path -from ert.enkf import EclConfig -from ert.test import ExtendedTestCase -from ert.util import UIReturn -from ert.ecl import EclSum - -EGRID_file = "Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID" -SMSPEC_file = "Statoil/ECLIPSE/Gurbat/ECLIPSE.SMSPEC" -DATA_file = "Statoil/ECLIPSE/Gurbat/ECLIPSE.DATA" -INIT_file = "Statoil/ECLIPSE/Gurbat/EQUIL.INC" -DATA_INIT_file= "Statoil/ECLIPSE/Gurbat/ECLIPSE_INIT.DATA" -SCHEDULE_file = "Statoil/ECLIPSE/Gurbat/target.SCH" - - -class EclConfigTest(ExtendedTestCase): - - - def test_grid(self): - grid_file = self.createTestPath( EGRID_file ) - smspec_file = self.createTestPath( SMSPEC_file ) - ec = EclConfig() - ui = ec.validateGridFile( grid_file ) - self.assertTrue( ui ) - self.assertTrue( isinstance(ui , UIReturn )) - - ui = ec.validateGridFile( "Does/Not/Exist" ) - self.assertFalse( ui ) - - self.assertTrue( os.path.exists( smspec_file )) - ui = ec.validateGridFile( smspec_file ) - self.assertFalse( ui ) - - - - def test_eclbase(self): - ec = EclConfig() - ui = ec.validateEclBase( "MixedCase%d" ) - self.assertFalse( ui ) - - ui = ec.validateEclBase( "CASE%s" ) - self.assertFalse( ui ) - - ui = ec.validateEclBase( "CASE%d" ) - self.assertTrue( ui ) - ec.setEclBase("CASE%d") - self.assertEqual( "CASE%d" , ec.getEclBase()) - - - - def test_datafile(self): - ec = EclConfig() - ui = ec.validateDataFile( "DoesNotExist" ) - self.assertFalse( ui ) - - dfile = self.createTestPath( DATA_file ) - ui = ec.validateDataFile( dfile ) - self.assertTrue( ui ) - ec.setDataFile( dfile ) - self.assertEqual( dfile , ec.getDataFile() ) - - - def test_schedule_file(self): - ec = EclConfig() - ui = ec.validateScheduleFile( "DoesNotExist" ) - self.assertFalse( ui ) - - dfile = self.createTestPath( DATA_file ) - sfile = self.createTestPath( SCHEDULE_file ) - - # Setting the schedule file should fail before the datafile - # (i.e. startdate) has been set. - ui = ec.validateScheduleFile( sfile ) - self.assertFalse( ui ) - - ec.setDataFile( dfile ) - ui = ec.validateScheduleFile( sfile ) - self.assertTrue( ui ) - - ec.setScheduleFile( sfile ) - self.assertEqual( sfile , ec.getScheduleFile() ) - - - def test_init_section(self): - ec = EclConfig() - dfile = self.createTestPath( DATA_file ) - difile = self.createTestPath( DATA_INIT_file ) - ifile = self.createTestPath( INIT_file ) - - ui = ec.validateInitSection( ifile ) - self.assertFalse( ui ) - - ec.setDataFile( dfile ) - ui = ec.validateInitSection( ifile ) - self.assertFalse( ui ) - - ec.setDataFile( difile ) - ui = ec.validateInitSection( ifile ) - self.assertTrue( ui ) - ec.setInitSection( ifile ) - self.assertTrue( ifile , ec.getInitSection() ) - - - def test_refcase( self ): - ec = EclConfig() - dfile = self.createTestPath( DATA_file ) - - ui = ec.validateRefcase( "Does/not/exist" ) - self.assertFalse( ui ) - - ui = ec.validateRefcase( dfile ) - self.assertTrue( ui ) - ec.loadRefcase( dfile ) - refcase = ec.getRefcase() - self.assertTrue( isinstance( refcase , EclSum )) - refcaseName = ec.getRefcaseName() + ".DATA" - self.assertEqual( dfile , refcaseName ) - - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_enkf.py b/ThirdParty/Ert/python/tests/ert/enkf/test_enkf.py deleted file mode 100644 index 47405ead42..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_enkf.py +++ /dev/null @@ -1,181 +0,0 @@ -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'test_enkf.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -import os - -from ert.util import BoolVector - -from ert.enkf import EnsembleConfig, AnalysisConfig, ModelConfig, SiteConfig, EclConfig, PlotConfig, EnkfObs, ErtTemplates, EnkfFs, EnKFState, EnkfVarType, ObsVector , RunArg -from ert.enkf.config import EnkfConfigNode -from ert.enkf.enkf_main import EnKFMain -from ert.enkf.enums import EnkfObservationImplementationType, LoadFailTypeEnum, EnkfInitModeEnum, ErtImplType, RealizationStateEnum , EnkfRunType, EnkfFieldFileFormatEnum, EnkfTruncationType, ActiveMode -from ert.enkf.observations.summary_observation import SummaryObservation -from ert.test import ExtendedTestCase , TestAreaContext - - - -class EnKFTest(ExtendedTestCase): - def setUp(self): - self.case_directory = self.createTestPath("local/simple_config/") - - - def test_bootstrap( self ): - with TestAreaContext("enkf_test", store_area=True) as work_area: - work_area.copy_directory(self.case_directory) - main = EnKFMain("simple_config/minimum_config") - self.assertTrue(main, "Load failed") - main.free() - - - def test_site_bootstrap( self ): - with TestAreaContext("enkf_test", store_area=True) as work_area: - EnKFMain.loadSiteConfig() - - - def test_enum(self): - self.assertEnumIsFullyDefined(EnkfVarType, "enkf_var_type", "libenkf/include/ert/enkf/enkf_types.h") - self.assertEnumIsFullyDefined(ErtImplType, "ert_impl_type", "libenkf/include/ert/enkf/enkf_types.h") - self.assertEnumIsFullyDefined(EnkfInitModeEnum, "init_mode_type", "libenkf/include/ert/enkf/enkf_types.h") - self.assertEnumIsFullyDefined(RealizationStateEnum, "realisation_state_enum", "libenkf/include/ert/enkf/enkf_types.h") - self.assertEnumIsFullyDefined(EnkfTruncationType, "truncation_type", "libenkf/include/ert/enkf/enkf_types.h") - self.assertEnumIsFullyDefined(EnkfRunType, "run_mode_type" , "libenkf/include/ert/enkf/enkf_types.h") - - self.assertEnumIsFullyDefined(EnkfObservationImplementationType, "obs_impl_type", "libenkf/include/ert/enkf/obs_vector.h") - self.assertEnumIsFullyDefined(LoadFailTypeEnum, "load_fail_type", "libenkf/include/ert/enkf/summary_config.h") - self.assertEnumIsFullyDefined(EnkfFieldFileFormatEnum, "field_file_format_type", "libenkf/include/ert/enkf/field_config.h" ) - self.assertEnumIsFullyDefined(ActiveMode , "active_mode_type" , "libenkf/include/ert/enkf/enkf_types.h") - - - def test_observations(self): - with TestAreaContext("enkf_test") as work_area: - work_area.copy_directory(self.case_directory) - - main = EnKFMain("simple_config/minimum_config") - - count = 10 - summary_key = "test_key" - observation_key = "test_obs_key" - summary_observation_node = EnkfConfigNode.createSummaryConfigNode(summary_key, LoadFailTypeEnum.LOAD_FAIL_EXIT) - observation_vector = ObsVector(EnkfObservationImplementationType.SUMMARY_OBS, observation_key, summary_observation_node, count) - - main.getObservations().addObservationVector(observation_vector) - - values = [] - for index in range(0, count): - value = index * 10.5 - std = index / 10.0 - summary_observation_node = SummaryObservation(summary_key, observation_key, value, std) - observation_vector.installNode(index, summary_observation_node) - self.assertEqual(observation_vector.getNode(index), summary_observation_node) - self.assertEqual(value, summary_observation_node.getValue()) - values.append((index, value, std)) - - - - observations = main.getObservations() - test_vector = observations[observation_key] - index = 0 - for node in test_vector: - self.assertTrue( isinstance( node , SummaryObservation )) - self.assertEqual( node.getValue( ) , index * 10.5 ) - index += 1 - - - self.assertEqual(observation_vector, test_vector) - for index, value, std in values: - self.assertTrue(test_vector.isActive(index)) - - summary_observation_node = test_vector.getNode(index) - """@type: SummaryObservation""" - - self.assertEqual(value, summary_observation_node.getValue()) - self.assertEqual(std, summary_observation_node.getStandardDeviation()) - self.assertEqual(summary_key, summary_observation_node.getSummaryKey()) - - - main.free() - - - - def test_config( self ): - with TestAreaContext("enkf_test") as work_area: - work_area.copy_directory(self.case_directory) - - main = EnKFMain("simple_config/minimum_config") - - self.assertIsInstance(main.ensembleConfig(), EnsembleConfig) - self.assertIsInstance(main.analysisConfig(), AnalysisConfig) - self.assertIsInstance(main.getModelConfig(), ModelConfig) - #self.assertIsInstance(main.local_config(), LocalConfig) #warn: Should this be None? - self.assertIsInstance(main.siteConfig(), SiteConfig) - self.assertIsInstance(main.eclConfig(), EclConfig) - self.assertIsInstance(main.plotConfig(), PlotConfig) - - # self.main.load_obs(obs_config_file) - self.assertIsInstance(main.getObservations(), EnkfObs) - self.assertIsInstance(main.get_templates(), ErtTemplates) - self.assertIsInstance(main.getEnkfFsManager().getCurrentFileSystem(), EnkfFs) - # self.assertIsInstance(main.iget_member_config(0), MemberConfig) - self.assertIsInstance(main.getMemberRunningState(0), EnKFState) - - self.assertEqual( "Ensemble" , main.getMountPoint()) - - main.free() - - def test_enkf_create_config_file(self): - config_file = "test_new_config" - dbase_type = "BLOCK_FS" - num_realizations = 42 - - with TestAreaContext("python/ens_condif/create_config" , store_area = True) as ta: - EnKFMain.createNewConfig(config_file, "storage" , dbase_type, num_realizations) - main = EnKFMain(config_file) - self.assertEqual(main.getEnsembleSize(), num_realizations) - - - def test_run_context(self): - with TestAreaContext("enkf_test") as work_area: - work_area.copy_directory(self.case_directory) - main = EnKFMain("simple_config/minimum_config") - fs_manager = main.getEnkfFsManager() - fs = fs_manager.getCurrentFileSystem( ) - iactive = BoolVector(initial_size = 10 , default_value = True) - iactive[0] = False - iactive[1] = False - run_context = main.getRunContextENSEMPLE_EXPERIMENT( fs , iactive ) - - self.assertEqual( len(run_context) , 8 ) - - with self.assertRaises(IndexError): - run_context[8] - - with self.assertRaises(TypeError): - run_context["String"] - - run_arg = run_context[0] - self.assertTrue( isinstance( run_arg , RunArg )) - - with self.assertRaises(ValueError): - run_context.iensGet(0) - - - with self.assertRaises(ValueError): - run_context.iensGet(1) - - arg0 = run_context[0] - arg2 = run_context.iensGet( 2 ) - #self.assertEqual( arg0 , arg2 ) - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_enkf_fs.py b/ThirdParty/Ert/python/tests/ert/enkf/test_enkf_fs.py deleted file mode 100644 index 93de431075..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_enkf_fs.py +++ /dev/null @@ -1,67 +0,0 @@ -import os -from ert.enkf import EnkfFs -from ert.enkf import EnKFMain -from ert.enkf.enums import EnKFFSType -from ert.test import ExtendedTestCase , TestAreaContext -from ert.test import ErtTestContext - - -class EnKFFSTest(ExtendedTestCase): - def setUp(self): - self.mount_point = "storage/default" - self.config_file = self.createTestPath("Statoil/config/with_data/config") - - - def test_id_enum(self): - self.assertEnumIsFullyDefined(EnKFFSType, "fs_driver_impl", "libenkf/include/ert/enkf/fs_types.h") - - - def test_create(self): - with TestAreaContext("create_fs") as work_area: - work_area.copy_parent_content(self.config_file) - - self.assertTrue(EnkfFs.exists(self.mount_point)) - fs = EnkfFs(self.mount_point) - self.assertEqual(1, fs.refCount()) - fs.umount() - - self.assertFalse(EnkfFs.exists("newFS")) - arg = None - fs = EnkfFs.createFileSystem("newFS", EnKFFSType.BLOCK_FS_DRIVER_ID, arg) - self.assertTrue(EnkfFs.exists("newFS")) - self.assertTrue( fs is None ) - - with self.assertRaises(IOError): - version = EnkfFs.diskVersion("does/not/exist") - - version = EnkfFs.diskVersion("newFS") - self.assertTrue( version >= 106 ) - - - def test_create2(self): - with TestAreaContext("create_fs2") as work_area: - work_area.copy_parent_content(self.config_file) - - new_fs = EnkfFs.createFileSystem("newFS", EnKFFSType.BLOCK_FS_DRIVER_ID, mount = True) - self.assertTrue( isinstance( new_fs , EnkfFs )) - - - - def test_throws(self): - with self.assertRaises(Exception): - fs = EnkfFs("/does/not/exist") - - - def test_refcount(self): - with ErtTestContext("TEST", self.config_file) as testContext: - ert = testContext.getErt() - self.assertTrue(isinstance(ert, EnKFMain)) - - fsm = ert.getEnkfFsManager() - fs = fsm.getCurrentFileSystem() - self.assertEqual(2, fs.refCount()) - - fs.umount() - - with self.assertRaises(AssertionError): - fs.refCount() diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_enkf_fs_manager1.py b/ThirdParty/Ert/python/tests/ert/enkf/test_enkf_fs_manager1.py deleted file mode 100644 index 03c8ca6b12..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_enkf_fs_manager1.py +++ /dev/null @@ -1,45 +0,0 @@ -import os -from ert.enkf import EnkfFs -from ert.enkf import EnKFMain -from ert.enkf import EnkfFsManager -from ert.test import ErtTestContext -from ert.test import ExtendedTestCase - - -class EnKFFSManagerTest1(ExtendedTestCase): - def setUp(self): - self.config_file = self.createTestPath("Statoil/config/with_data/config") - - - def test_create(self): - # We are indirectly testing the create through the create - # already in the enkf_main object. In principle we could - # create a separate manager instance from the ground up, but - # then the reference count will be weird. - with ErtTestContext("enkf_fs_manager_create_test", self.config_file) as testContext: - ert = testContext.getErt() - fsm = ert.getEnkfFsManager() - - self.assertTrue(fsm.isCaseMounted("default")) - self.assertTrue(fsm.caseExists("default")) - self.assertTrue(fsm.caseHasData("default")) - self.assertFalse(fsm.isCaseRunning("default")) - - fs = fsm.getCurrentFileSystem() - self.assertEqual(2, fs.refCount()) - self.assertEqual(1, fsm.getFileSystemCount()) - - self.assertFalse(fsm.isCaseMounted("newFS")) - self.assertFalse(fsm.caseExists("newFS")) - self.assertFalse(fsm.caseHasData("newFS")) - self.assertFalse(fsm.isCaseRunning("newFS")) - - fs2 = fsm.getFileSystem("newFS") - self.assertEqual(2, fsm.getFileSystemCount()) - self.assertEqual(1, fs2.refCount()) - - self.assertTrue(fsm.isCaseMounted("newFS")) - self.assertTrue(fsm.caseExists("newFS")) - self.assertFalse(fsm.caseHasData("newFS")) - self.assertFalse(fsm.isCaseRunning("newFS")) - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_enkf_fs_manager2.py b/ThirdParty/Ert/python/tests/ert/enkf/test_enkf_fs_manager2.py deleted file mode 100644 index 1441407ddd..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_enkf_fs_manager2.py +++ /dev/null @@ -1,37 +0,0 @@ -import os -from ert.enkf import EnkfFs -from ert.enkf import EnKFMain -from ert.enkf import EnkfFsManager -from ert.test import ErtTestContext -from ert.test import ExtendedTestCase - - -class EnKFFSManagerTest2(ExtendedTestCase): - def setUp(self): - self.config_file = self.createTestPath("Statoil/config/with_data/config") - - - def test_rotate(self): - - # We are indirectly testing the create through the create - # already in the enkf_main object. In principle we could - # create a separate manager instance from the ground up, but - # then the reference count will be weird. - with ErtTestContext("enkf_fs_manager_rotate_test", self.config_file) as testContext: - ert = testContext.getErt() - fsm = ert.getEnkfFsManager() - self.assertEqual(1, fsm.getFileSystemCount()) - - fs_list = [] - for index in range(EnkfFsManager.DEFAULT_CAPACITY): - fs_list.append(fsm.getFileSystem("fs_fill_%d" % index)) - - self.assertEqual(EnkfFsManager.DEFAULT_CAPACITY, fsm.getFileSystemCount()) - - for i in range(10): - fs = "fs_test_%d" % i - print("Mounting: %s" % fs) - fs_list.append(fsm.getFileSystem(fs)) - self.assertEqual(EnkfFsManager.DEFAULT_CAPACITY, fsm.getFileSystemCount()) - - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_enkf_library.py b/ThirdParty/Ert/python/tests/ert/enkf/test_enkf_library.py deleted file mode 100644 index 689cf2de4a..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_enkf_library.py +++ /dev/null @@ -1,56 +0,0 @@ -import os -from ert.ecl import EclSum -from ert.enkf import AnalysisConfig, EclConfig, GenKwConfig, EnkfConfigNode, SiteConfig, ObsVector -from ert.enkf import GenDataConfig, FieldConfig, EnkfFs, EnkfObs, EnKFState, EnsembleConfig -from ert.enkf import ErtTemplate, ErtTemplates, LocalConfig, ModelConfig, PlotConfig -from ert.enkf.enkf_main import EnKFMain - -from ert.enkf.util import TimeMap -from ert.test import ExtendedTestCase , TestAreaContext - - -class EnKFLibraryTest(ExtendedTestCase): - def setUp(self): - self.case_directory = self.createTestPath("local/simple_config/") - - def test_failed_class_creation(self): - classes = [EnkfConfigNode, EnKFState, - ErtTemplate, ErtTemplates, LocalConfig, ModelConfig, PlotConfig, SiteConfig] - - for cls in classes: - with self.assertRaises(NotImplementedError): - temp = cls() - - - def test_ecl_config_creation(self): - with TestAreaContext("enkf_library_test") as work_area: - work_area.copy_directory(self.case_directory) - - main = EnKFMain("simple_config/minimum_config") - - self.assertIsInstance(main.analysisConfig(), AnalysisConfig) - self.assertIsInstance(main.eclConfig(), EclConfig) - - with self.assertRaises(AssertionError): # Null pointer! - self.assertIsInstance(main.eclConfig().getRefcase(), EclSum) - - file_system = main.getEnkfFsManager().getCurrentFileSystem() - self.assertEqual(file_system.getCaseName(), "default") - time_map = file_system.getTimeMap() - self.assertIsInstance(time_map, TimeMap) - - main.free() - - - def test_enkf_state(self): - with TestAreaContext("enkf_library_test") as work_area: - work_area.copy_directory(self.case_directory) - - main = EnKFMain("simple_config/minimum_config") - state = main.getRealisation( 0 ) - - with self.assertRaises(TypeError): - state.addSubstKeyword( "GEO_ID" , 45) - - state.addSubstKeyword("GEO_ID" , "45") - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_enkf_load_results_manually.py b/ThirdParty/Ert/python/tests/ert/enkf/test_enkf_load_results_manually.py deleted file mode 100644 index 43ef9377b7..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_enkf_load_results_manually.py +++ /dev/null @@ -1,44 +0,0 @@ -from ert.enkf.enums.realization_state_enum import RealizationStateEnum -from ert.test import ErtTestContext, ExtendedTestCase -from ert.util import BoolVector - - -class LoadResultsManuallyTest(ExtendedTestCase): - def setUp(self): - self.config_file = self.createTestPath("Statoil/config/with_data/config") - - def test_load_results_manually(self): - with ErtTestContext("manual_load_test", self.config_file) as test_context: - ert = test_context.getErt() - load_into_case = "A1" - load_from_case = "default" - - load_into = ert.getEnkfFsManager().getFileSystem(load_into_case) - load_from = ert.getEnkfFsManager().getFileSystem(load_from_case) - - ert.getEnkfFsManager().switchFileSystem(load_from) - realisations = BoolVector(default_value=True,initial_size=25) - realisations[7] = False - iteration = 0 - - ert.loadFromForwardModel(realisations, iteration, load_into) - - load_into_case_state_map = load_into.getStateMap() - - load_into_states = [state for state in load_into_case_state_map] - - expected = [RealizationStateEnum.STATE_HAS_DATA] * 25 - expected[7] = RealizationStateEnum.STATE_UNDEFINED - - self.assertListEqual(load_into_states, expected) - - - - - - - - - - - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_enkf_obs.py b/ThirdParty/Ert/python/tests/ert/enkf/test_enkf_obs.py deleted file mode 100644 index a4cb415878..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_enkf_obs.py +++ /dev/null @@ -1,237 +0,0 @@ -from ert.test import ErtTestContext -from ert.test import ExtendedTestCase - -from ert.ecl import EclGrid, EclSum -from ert.sched import History - -from ert.util import BoolVector,IntVector -from ert.enkf import ActiveMode, EnsembleConfig -from ert.enkf import ObsVector , LocalObsdata, EnkfObs, TimeMap, LocalObsdataNode , ObsData , MeasData, ActiveList - - -class EnKFObsTest(ExtendedTestCase): - def setUp(self): - self.config_file = self.createTestPath("Statoil/config/obs_testing/config") - self.obs_config = self.createTestPath("Statoil/config/obs_testing/observations") - self.obs_config2 = self.createTestPath("Statoil/config/obs_testing/observations2") - self.refcase = self.createTestPath("Statoil/config/obs_testing/EXAMPLE_01_BASE") - self.grid = self.createTestPath("Statoil/config/obs_testing/EXAMPLE_01_BASE.EGRID") - - - def test_scale_obs(self): - with ErtTestContext("obs_test", self.config_file) as test_context: - ert = test_context.getErt() - obs = ert.getObservations() - - obs1 = obs["WWCT:OP_1"].getNode( 50 ) - obs2 = obs["WWCT:OP_1_50"].getNode( 50 ) - - self.assertEqual( obs1.getStandardDeviation( ) , obs2.getStandardDeviation( )) - std0 = obs1.getStandardDeviation( ) - - local_obsdata = LocalObsdata("obs" , obs) - node1 = local_obsdata.addNode( "WWCT:OP_1" ) - node2 = local_obsdata.addNode( "WWCT:OP_1_50" ) - node1.addTimeStep( 50 ) - node2.addTimeStep( 50 ) - - mask = BoolVector( default_value = True ) - mask[2] = True - meas_data = MeasData(mask) - obs_data = ObsData( ) - fs = ert.getEnkfFsManager().getCurrentFileSystem() - active_list = IntVector() - active_list.initRange(0,2,1) - obs.getObservationAndMeasureData( fs , local_obsdata , active_list , meas_data , obs_data ) - self.assertEqual( 2 , len(obs_data) ) - - v1 = obs_data[0] - v2 = obs_data[1] - - self.assertEqual( v1[1] , std0 ) - self.assertEqual( v2[1] , std0 ) - - meas_data = MeasData(mask) - obs_data = ObsData( 10 ) - obs.getObservationAndMeasureData( fs , local_obsdata , active_list , meas_data , obs_data ) - self.assertEqual( 2 , len(obs_data) ) - - v1 = obs_data[0] - v2 = obs_data[1] - - self.assertEqual( v1[1] , std0*10) - self.assertEqual( v2[1] , std0*10 ) - - actl = ActiveList() - obs1.updateStdScaling( 10 , actl) - obs2.updateStdScaling( 20 , actl) - meas_data = MeasData(mask) - obs_data = ObsData( ) - obs.getObservationAndMeasureData( fs , local_obsdata , active_list , meas_data , obs_data ) - self.assertEqual( 2 , len(obs_data) ) - - v1 = obs_data[0] - v2 = obs_data[1] - - self.assertEqual( v1[1] , std0*10) - self.assertEqual( v2[1] , std0*20) - - - - - - - def testObs(self): - with ErtTestContext("obs_test", self.config_file) as test_context: - ert = test_context.getErt() - obs = ert.getObservations() - - self.assertEqual(32, len(obs)) - for v in obs: - self.assertTrue(isinstance(v, ObsVector)) - - with self.assertRaises(IndexError): - v = obs[-1] - - with self.assertRaises(IndexError): - v = obs[40] - - with self.assertRaises(KeyError): - v = obs["No-this-does-not-exist"] - - v1 = obs["WWCT:OP_3"] - v2 = obs["GOPT:OP"] - mask = BoolVector(True, ert.getEnsembleSize()) - current_fs = ert.getEnkfFsManager().getCurrentFileSystem() - - self.assertTrue(v1.hasData(mask, current_fs)) - self.assertFalse(v2.hasData(mask, current_fs)) - - local_node = v1.createLocalObs( ) - for t in v1.getStepList(): - self.assertTrue( local_node.tstepActive( t )) - - - - def test_obs_block_scale_std(self): - with ErtTestContext("obs_test_scale", self.config_file) as test_context: - ert = test_context.getErt() - fs = ert.getEnkfFsManager().getCurrentFileSystem() - active_list = IntVector( ) - active_list.initRange(0 , ert.getEnsembleSize() , 1 ) - - obs = ert.getObservations() - obs_data = LocalObsdata( "OBSxx" , obs ) - obs_vector = obs["WWCT:OP_1"] - obs_data.addObsVector( obs_vector ) - scale_factor = obs.scaleCorrelatedStd( fs , obs_data , active_list ) - - for obs_node in obs_vector: - for index in range(len(obs_node)): - self.assertEqual( scale_factor , obs_node.getStdScaling( index )) - - - - - def test_obs_block_all_active_local(self): - with ErtTestContext("obs_test_all_active", self.config_file) as test_context: - ert = test_context.getErt() - obs = ert.getObservations() - obs_data = obs.getAllActiveLocalObsdata( ) - - self.assertEqual( len(obs_data) , len(obs) ) - for obs_vector in obs: - self.assertTrue( obs_vector.getObservationKey() in obs_data ) - - tstep_list1 = obs_vector.getStepList() - local_node = obs_data[ obs_vector.getObservationKey() ] - for t in tstep_list1: - self.assertTrue( local_node.tstepActive( t )) - - active_list = local_node.getActiveList() - self.assertEqual( active_list.getMode() , ActiveMode.ALL_ACTIVE ) - - - - def test_create(self): - ensemble_config = EnsembleConfig() - obs = EnkfObs(ensemble_config) - self.assertEqual( len(obs) , 0 ) - self.assertFalse( obs.load(self.obs_config) ) - self.assertEqual( len(obs) , 0 ) - - - time_map = TimeMap() - obs = EnkfObs(ensemble_config , external_time_map = time_map) - self.assertEqual( len(obs) , 0 ) - - grid = EclGrid(self.grid) - refcase = EclSum(self.refcase) - - history = History.alloc_from_refcase( refcase , False ) - obs = EnkfObs( ensemble_config , grid = grid , history = history ) - with self.assertRaises(IOError): - obs.load("/does/not/exist") - - self.assertTrue( obs.load(self.obs_config) ) - self.assertEqual( len(obs) , 33 ) - obs.clear() - self.assertEqual( len(obs) , 0 ) - - obs.load(self.obs_config) - self.assertEqual( len(obs) , 33 ) - self.assertFalse( "RFT2" in obs ) - obs.load(self.obs_config2) - self.assertEqual( len(obs) , 35 ) - self.assertTrue( "RFT2" in obs ) - - - - def test_ert_obs_reload(self): - with ErtTestContext("obs_test_reload", self.config_file) as test_context: - ert = test_context.getErt() - local_config = ert.getLocalConfig( ) - update_step = local_config.getUpdatestep( ) - mini_step = update_step[0] - local_obs = mini_step.getLocalObsData( ) - self.assertTrue( "WGOR:OP_5" in local_obs ) - self.assertTrue( "RPR2_1" in local_obs ) - - - ens_config = ert.ensembleConfig( ) - wwct_op1 = ens_config["WWCT:OP_1"] - wopr_op5 = ens_config["WOPR:OP_5"] - - obs = ert.getObservations() - self.assertEqual( len(obs) , 32 ) - - keys = wwct_op1.getObservationKeys() - self.assertEqual( len(keys) , 2 ) - self.assertTrue( "WWCT:OP_1" in keys ) - self.assertTrue( "WWCT:OP_1_50" in keys ) - - self.assertEqual( wopr_op5.getObservationKeys() , [] ) - - ert.loadObservations("observations2") - self.assertEqual( len(obs) , 2 ) - self.assertEqual( wwct_op1.getObservationKeys() , [] ) - self.assertEqual( wopr_op5.getObservationKeys() , ["WOPR:OP_5"] ) - - local_config = ert.getLocalConfig( ) - update_step = local_config.getUpdatestep( ) - mini_step = update_step[0] - local_obs = mini_step.getLocalObsData( ) - self.assertTrue( "WOPR:OP_5" in local_obs ) - self.assertTrue( "RFT2" in local_obs ) - self.assertFalse( "WGOR:OP_5" in local_obs ) - self.assertFalse( "RPR2_1" in local_obs ) - - - ert.loadObservations("observations" , clear = False) - self.assertEqual( len(obs) , 34 ) - keys = wwct_op1.getObservationKeys() - self.assertEqual( len(keys) , 2 ) - self.assertTrue( "WWCT:OP_1" in keys ) - self.assertTrue( "WWCT:OP_1_50" in keys ) - - self.assertEqual( wopr_op5.getObservationKeys() , ["WOPR:OP_5"] ) diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_ensemble_config.py b/ThirdParty/Ert/python/tests/ert/enkf/test_ensemble_config.py deleted file mode 100644 index e5f64250e2..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_ensemble_config.py +++ /dev/null @@ -1,17 +0,0 @@ -from ert.test import ErtTestContext -from ert.test import ExtendedTestCase - -from ert.util import BoolVector,IntVector -from ert.enkf import ActiveMode, EnsembleConfig -from ert.enkf import ObsVector , LocalObsdata - - -class EnsembleConfigTest(ExtendedTestCase): - - def test_create(self): - conf = EnsembleConfig( ) - self.assertEqual( len(conf) , 0 ) - self.assertFalse( "XYZ" in conf ) - - with self.assertRaises(KeyError): - node = conf["KEY"] diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_ert_context.py b/ThirdParty/Ert/python/tests/ert/enkf/test_ert_context.py deleted file mode 100644 index 6356f653d2..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_ert_context.py +++ /dev/null @@ -1,95 +0,0 @@ -from ert.test import ErtTestContext, ExtendedTestCase - - -class ErtTestContextTest(ExtendedTestCase): - def setUp(self): - self.config = self.createTestPath("Statoil/config/with_data/config") - - def test_raises(self): - with self.assertRaises(IOError): - testContext = ErtTestContext("ExistTest" , "Does/not/exist") - - - def initFromCaseTest(self, context, root_path): - ert = context.getErt() - - init_case_job = self.createSharePath("%s/INIT_CASE_FROM_EXISTING" % root_path) - self.assertTrue(context.installWorkflowJob("INIT_CASE_JOB", init_case_job)) - self.assertTrue(context.runWorkflowJob("INIT_CASE_JOB", "default", "new_not_current_case")) - - default_fs = ert.getEnkfFsManager().getFileSystem("default") - new_fs = ert.getEnkfFsManager().getFileSystem("new_not_current_case") - - self.assertIsNotNone(default_fs) - self.assertIsNotNone(new_fs) - - self.assertTrue(len(default_fs.getStateMap()) > 0) - self.assertEqual(len(default_fs.getStateMap()), len(new_fs.getStateMap())) - - - def createCaseTest(self, context, root_path): - create_case_job = self.createSharePath("%s/CREATE_CASE" % root_path) - self.assertTrue(context.installWorkflowJob("CREATE_CASE_JOB", create_case_job)) - self.assertTrue(context.runWorkflowJob("CREATE_CASE_JOB", "newly_created_case")) - self.assertDirectoryExists("storage/newly_created_case") - - - def selectCaseTest(self, context, root_path): - ert = context.getErt() - select_case_job = self.createSharePath("%s/SELECT_CASE" % root_path) - - default_fs = ert.getEnkfFsManager().getCurrentFileSystem() - - custom_fs = ert.getEnkfFsManager().getFileSystem("CustomCase") - - self.assertEqual(ert.getEnkfFsManager().getCurrentFileSystem(), default_fs) - - self.assertTrue(context.installWorkflowJob("SELECT_CASE_JOB", select_case_job)) - self.assertTrue(context.runWorkflowJob("SELECT_CASE_JOB", "CustomCase")) - - self.assertEqual(ert.getEnkfFsManager().getCurrentFileSystem(), custom_fs) - - - def loadResultsTest(self, context): - load_results_job = self.createSharePath("workflows/jobs/internal/config/LOAD_RESULTS") - self.assertTrue(context.installWorkflowJob("LOAD_RESULTS_JOB", load_results_job)) - self.assertTrue(context.runWorkflowJob("LOAD_RESULTS_JOB", 0, 1)) - - - def rankRealizationsOnObservationsTest(self, context): - rank_job = self.createSharePath("workflows/jobs/internal/config/OBSERVATION_RANKING") - - self.assertTrue(context.installWorkflowJob("OBS_RANK_JOB", rank_job)) - - self.assertTrue(context.runWorkflowJob("OBS_RANK_JOB", "NameOfObsRanking1", "|", "WOPR:*")) - self.assertTrue(context.runWorkflowJob("OBS_RANK_JOB", "NameOfObsRanking2", "1-5", "55", "|", "WWCT:*", "WOPR:*")) - self.assertTrue(context.runWorkflowJob("OBS_RANK_JOB", "NameOfObsRanking3", "5", "55", "|")) - self.assertTrue(context.runWorkflowJob("OBS_RANK_JOB", "NameOfObsRanking4", "1,3,5-10", "55")) - self.assertTrue(context.runWorkflowJob("OBS_RANK_JOB", "NameOfObsRanking5")) - self.assertTrue(context.runWorkflowJob("OBS_RANK_JOB", "NameOfObsRanking6", "|", "UnrecognizableObservation")) - - - def test_workflow_function_jobs(self): - - with ErtTestContext("python/enkf/ert_test_context_workflow_function_job", self.config) as context: - internal_config = "workflows/jobs/internal-tui/config" - self.createCaseTest(context, root_path=internal_config) - self.selectCaseTest(context, root_path=internal_config) - - # Due to EnKFFs caching and unmonitored C functions this will fail - #self.initFromCaseTest(context, root_path=internal_config) - - self.loadResultsTest(context) - self.rankRealizationsOnObservationsTest(context) - - - - def test_workflow_ert_script_jobs(self): - - with ErtTestContext("python/enkf/ert_test_context_workflow_ert_script_job", self.config) as context: - ert_scripts_config = "workflows/jobs/internal-gui/config" - self.createCaseTest(context, root_path=ert_scripts_config) - self.selectCaseTest(context, root_path=ert_scripts_config) - self.initFromCaseTest(context, root_path=ert_scripts_config) - - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_ert_log.py b/ThirdParty/Ert/python/tests/ert/enkf/test_ert_log.py deleted file mode 100644 index f98551f566..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_ert_log.py +++ /dev/null @@ -1,31 +0,0 @@ -import os -from ert.enkf import ErtLog -from ert.test import ExtendedTestCase, TestAreaContext - - -class ErtLogTest(ExtendedTestCase): - - def test_log(self): - with TestAreaContext("python/ert_log/log") as work_area: - test_log_filename = "test_log" - ErtLog.init(1, test_log_filename, True) - message = "This is fun" - ErtLog.log(1, message) - - self.assertTrue(os.path.isfile(test_log_filename)) - - with open(test_log_filename, "r") as f: - text = f.readlines() - self.assertTrue(len(text) > 0) - self.assertTrue(message in text[-1]) - - - def test_getFilename(self): - with TestAreaContext("python/ert_log/log") as work_area: - test_log_filename = "log_test_file.txt" - ErtLog.init(1, test_log_filename, True) - message = "This is fun" - ErtLog.log(1, message) - - self.assertEqual(ErtLog.getFilename(), test_log_filename) - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_es_update.py b/ThirdParty/Ert/python/tests/ert/enkf/test_es_update.py deleted file mode 100644 index 09b7202b97..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_es_update.py +++ /dev/null @@ -1,19 +0,0 @@ -from ert.test import ExtendedTestCase, ErtTestContext -from ert.enkf import ESUpdate - - -class ESUpdateTest(ExtendedTestCase): - - def test_create(self): - config = self.createTestPath("local/custom_kw/mini_config") - with ErtTestContext("python/enkf/data/custom_kw_simulated", config) as context: - ert = context.getErt() - es_update = ESUpdate( ert ) - - self.assertFalse( es_update.hasModule( "NO_NOT_THIS_MODULE" )) - with self.assertRaises(KeyError): - m = es_update.getModule( "STD_ENKF_XXX" ) - - module = es_update.getModule( "STD_ENKF" ) - - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_field_export.py b/ThirdParty/Ert/python/tests/ert/enkf/test_field_export.py deleted file mode 100644 index 9f08a03d48..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_field_export.py +++ /dev/null @@ -1,69 +0,0 @@ -import os - -from ert.util import IntVector - -from ert.ecl import EclGrid - -from ert.enkf.config import FieldConfig -from ert.enkf.data import EnkfNode -from ert.enkf.enums import EnkfFieldFileFormatEnum -from ert.enkf import NodeId - -from ert.test import ExtendedTestCase -from ert.test import ErtTestContext - - -class FieldExportTest(ExtendedTestCase): - def setUp(self): - self.config_file = self.createTestPath("Statoil/config/obs_testing/config") - - - def test_export_format(self): - self.assertEqual( FieldConfig.exportFormat("file.grdecl") , EnkfFieldFileFormatEnum.ECL_GRDECL_FILE ) - self.assertEqual( FieldConfig.exportFormat("file.roFF") , EnkfFieldFileFormatEnum.RMS_ROFF_FILE ) - - with self.assertRaises(ValueError): - FieldConfig.exportFormat("file.xyz") - - with self.assertRaises(ValueError): - FieldConfig.exportFormat("file.xyz") - - - - def test_field_export(self): - with ErtTestContext("export_test", self.config_file) as test_context: - ert = test_context.getErt() - fs_manager = ert.getEnkfFsManager( ) - ens_config = ert.ensembleConfig() - config_node = ens_config["PERMX"] - data_node = EnkfNode( config_node ) - node_id = NodeId( 0 , 0 ) - fs = fs_manager.getCurrentFileSystem( ) - data_node.tryLoad( fs , node_id ) - - data_node.export("export/with/path/PERMX.grdecl") - self.assertTrue( os.path.isfile("export/with/path/PERMX.grdecl") ) - - - def test_field_export_many(self): - with ErtTestContext("export_test", self.config_file) as test_context: - ert = test_context.getErt() - fs_manager = ert.getEnkfFsManager( ) - ens_config = ert.ensembleConfig() - config_node = ens_config["PERMX"] - iens_list = IntVector( ) - iens_list.append(0) - iens_list.append(2) - iens_list.append(4) - - fs = fs_manager.getCurrentFileSystem( ) - - # Filename without embedded %d - TypeError - with self.assertRaises(TypeError): - EnkfNode.exportMany( config_node , "export/with/path/PERMX.grdecl" , fs , iens_list ) - - EnkfNode.exportMany( config_node , "export/with/path/PERMX_%d.grdecl" , fs , iens_list ) - self.assertTrue( os.path.isfile("export/with/path/PERMX_0.grdecl") ) - self.assertTrue( os.path.isfile("export/with/path/PERMX_2.grdecl") ) - self.assertTrue( os.path.isfile("export/with/path/PERMX_4.grdecl") ) - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_forward_load_context.py b/ThirdParty/Ert/python/tests/ert/enkf/test_forward_load_context.py deleted file mode 100644 index 82970a06aa..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_forward_load_context.py +++ /dev/null @@ -1,9 +0,0 @@ -from ert.test import ExtendedTestCase -from ert.enkf import ForwardLoadContext - -class ForwardLoadContextTest(ExtendedTestCase): - - def test_create(self): - ctx = ForwardLoadContext( report_step = 1 ) - self.assertEqual( 1 , ctx.getLoadStep( ) ) - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_gen_obs.py b/ThirdParty/Ert/python/tests/ert/enkf/test_gen_obs.py deleted file mode 100644 index 429a3852cc..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_gen_obs.py +++ /dev/null @@ -1,52 +0,0 @@ -import os.path - -from ert.test import ExtendedTestCase, TestAreaContext - -from ert.enkf import GenObservation,GenDataConfig,ActiveList - - - - -class GenObsTest(ExtendedTestCase): - def setUp(self): - pass - - - def test_create(self): - data_config = GenDataConfig("KEY") - with self.assertRaises(ValueError): - gen_obs = GenObservation("KEY" , data_config ) - - with TestAreaContext("gen_obs/create"): - with open("obs1.txt","w") as f: - f.write("10 5 12 6\n") - - with self.assertRaises(ValueError): - gen_obs = GenObservation("KEY" , data_config , scalar_value = (1,2) , obs_file = "obs1.txt") - - with self.assertRaises(TypeError): - gen_obs = GenObservation("KEY" , data_config , scalar_value = 1 ) - - with self.assertRaises(IOError): - gen_obs = GenObservation("KEY" , data_config , obs_file = "does/not/exist" ) - - gen_obs = GenObservation("KEY" , data_config , obs_file = "obs1.txt" , data_index = "10,20") - self.assertEqual( len(gen_obs) , 2 ) - self.assertEqual( gen_obs[0] , (10,5) ) - self.assertEqual( gen_obs[1] , (12,6) ) - - self.assertEqual( gen_obs.getValue(0) , 10 ) - self.assertEqual( gen_obs.getDataIndex(1) , 20 ) - self.assertEqual( gen_obs.getStdScaling(0) , 1 ) - self.assertEqual( gen_obs.getStdScaling(1) , 1 ) - - active_list = ActiveList( ) - gen_obs.updateStdScaling( 0.25 , active_list ) - self.assertEqual( gen_obs.getStdScaling(0) , 0.25 ) - self.assertEqual( gen_obs.getStdScaling(1) , 0.25 ) - - active_list.addActiveIndex( 1 ) - gen_obs.updateStdScaling( 2.00 , active_list ) - self.assertEqual( gen_obs.getStdScaling(0) , 0.25 ) - self.assertEqual( gen_obs.getStdScaling(1) , 2.00 ) - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_hook_workflow.py b/ThirdParty/Ert/python/tests/ert/enkf/test_hook_workflow.py deleted file mode 100644 index c5a105576c..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_hook_workflow.py +++ /dev/null @@ -1,9 +0,0 @@ -from ert.enkf.enums import HookRuntime -from ert.test import ExtendedTestCase - - -class HookWorkFlowTest(ExtendedTestCase): - - def test_enum(self): - self.assertEnumIsFullyDefined(HookRuntime, "hook_run_mode_enum" , "libenkf/include/ert/enkf/hook_workflow.h", verbose=True) - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_labscale.py b/ThirdParty/Ert/python/tests/ert/enkf/test_labscale.py deleted file mode 100644 index 38db80bce9..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_labscale.py +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env python -# Copyright (C) 2015 Statoil ASA, Norway. -# -# The file 'test_labscale.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - - -from ert.enkf import ObsVector -from ert.test import ExtendedTestCase , ErtTestContext - - - -class LabScaleTest(ExtendedTestCase): - - - def testObs(self): - config_file = self.createTestPath("Statoil/config/labscale/config") - with ErtTestContext("labscale", config_file) as test_context: - ert = test_context.getErt() - obs = ert.getObservations() - - self.assertEqual(4, len(obs)) - for v in obs: - self.assertTrue(isinstance(v, ObsVector)) - - v1 = obs["WWCT_1"] - self.assertEqual( v1.activeStep() , 5 ) - node = v1.getNode( 5 ) - self.assertFloatEqual( node.getValue() , 0.00) - - v2 = obs["WWCT_2"] - self.assertEqual( v2.activeStep() , 31 ) - node = v2.getNode( 31 ) - self.assertFloatEqual( node.getValue() , 0.575828) - - v3 = obs["WWCT_3"] - self.assertEqual( v3.activeStep() , 73 ) - node = v3.getNode( 73 ) - self.assertFloatEqual( node.getValue() , 1.00) - - - bpr = obs["BPR"] - self.assertEqual( bpr.activeStep() , 31 ) - node = bpr.getNode( 31 ) - self.assertFloatEqual( node.getValue(0) , 10.284) - - - - def testObs_beijing(self): - config_file = self.createTestPath("Statoil/config/lab-beijing/labunits/config") - with ErtTestContext("labscale-beijing", config_file) as test_context: - ert = test_context.getErt() - obs = ert.getObservations() - - - v0 = obs["WCT0"] - self.assertEqual( v0.activeStep() , 18 ) - node = v0.getNode( 18 ) - self.assertEqual( node.getValue() , 0.12345 ) - - - v1 = obs["WCT1"] - self.assertEqual( v1.activeStep() , 18 ) - node = v1.getNode( 18 ) - self.assertEqual( node.getValue() , 0.12345 ) diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_linalg.py b/ThirdParty/Ert/python/tests/ert/enkf/test_linalg.py deleted file mode 100644 index 0106b60c6e..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_linalg.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (C) 2015 Statoil ASA, Norway. -# -# The file 'test_labscale.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - - -from ert.enkf import ObsVector -from ert.util import Matrix -from ert.enkf.linalg import * - - -class LinalgTest(ExtendedTestCase): - - def test_num_PC(self): - S = Matrix(3,3) - s[0,0] = 1 - s[1,1] = 0.25 - s[2,2] = 0.125 - - with self.assertRaises(ValueError): - num_pc = numPC( S , -1 ) - - - with self.assertRaises(ValueError): - num_pc = numPC( S , 1.5 ) - - num_pc = numPC( S , 0.80 ) - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_local_config.py b/ThirdParty/Ert/python/tests/ert/enkf/test_local_config.py deleted file mode 100644 index 27d0592f48..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_local_config.py +++ /dev/null @@ -1,187 +0,0 @@ -import os.path -from ert.ecl import EclGrid - -from ert.test import ExtendedTestCase -from ert.test import ErtTestContext -from ert.enkf.local_ministep import LocalMinistep -from ert.enkf.active_list import ActiveList -from ert.enkf.local_obsdata import LocalObsdata -from ert.enkf.local_updatestep import LocalUpdateStep -from ert.enkf.local_obsdata_node import LocalObsdataNode -from ert.enkf import local_config -from ert.enkf.local_dataset import LocalDataset - -class LocalConfigTest(ExtendedTestCase): - - def setUp(self): - - self.config = self.createTestPath("local/custom_kw/mini_config") - - def testLocalConfig(self): - - with ErtTestContext("python/enkf/data/local_config", self.config) as test_context: - - main = test_context.getErt() - self.assertTrue(main, "Load failed") - - local_config = main.getLocalConfig() - analysis_module = main.analysisConfig().getModule("STD_ENKF") - - self.AllActive(local_config) - - local_config.clear() - - self.MiniStep(local_config, analysis_module) - - self.AttachMinistep(local_config) - - self.LocalDataset(local_config) - - self.LocalObsdata(local_config) - - local_config_file_summary = "local_config_summary.txt" - local_config.writeSummaryFile( local_config_file_summary ) - self.assertTrue( os.path.isfile( local_config_file_summary )) - - self.clear(local_config) - - grid = local_config.getGrid() - self.assertTrue( isinstance( grid , EclGrid )) - - def clear(self, local_config): - local_config.clear() - updateStep = local_config.getUpdatestep( ) - self.assertEqual( len(updateStep) , 0 ) - - - - def AllActive(self , local_config): - updateStep = local_config.getUpdatestep( ) - ministep = updateStep[0] - self.assertEqual( 1 , len(ministep) ) - dataset = ministep["ALL_DATA"] - - self.assertTrue( "PERLIN_PARAM" in dataset ) - - obsdata = ministep.getLocalObsData() - self.assertEqual( len(obsdata) , 3 ) - - - def MiniStep( self, local_config, analysis_module ): - - # Ministep - ministep = local_config.createMinistep("MINISTEP", analysis_module) - self.assertTrue(isinstance(ministep, LocalMinistep)) - - self.assertFalse( "DATA" in ministep ) - with self.assertRaises(KeyError): - ministep["DATA"] - - - def AttachMinistep( self, local_config): - - # Update step - updatestep = local_config.getUpdatestep( ) - self.assertTrue(isinstance(updatestep, LocalUpdateStep)) - n1 = len(updatestep) - - # Ministep - ministep = local_config.createMinistep("MINISTEP") - self.assertTrue(isinstance(ministep, LocalMinistep)) - - # Attach - updatestep.attachMinistep(ministep) - self.assertTrue(isinstance(updatestep[0], LocalMinistep)) - - self.assertEqual( len(updatestep) , n1 + 1 ) - - - def LocalDataset( self, local_config ): - - # Creating dataset - data_scale = local_config.createDataset("DATA_SCALE") - self.assertTrue(isinstance(data_scale, LocalDataset)) - - # Try to add existing dataset - with self.assertRaises(ValueError): - local_config.createDataset("DATA_SCALE") - - with self.assertRaises(KeyError): - data_scale.addNode("MISSING") - - data_scale.addNode("PERLIN_PARAM") - active_list = data_scale.getActiveList("PERLIN_PARAM") - self.assertTrue(isinstance(active_list, ActiveList)) - active_list.addActiveIndex(0) - - self.assertTrue("PERLIN_PARAM" in data_scale) - self.assertFalse("MISSING" in data_scale) - - ministep = local_config.createMinistep("MINISTEP") - ministep.attachDataset( data_scale ) - self.assertTrue( "DATA_SCALE" in ministep ) - data_scale_get = ministep["DATA_SCALE"] - self.assertTrue( "PERLIN_PARAM" in data_scale_get ) - - # Error when adding existing data node - with self.assertRaises(KeyError): - data_scale.addNode("PERLIN_PARAM") - - - - def LocalObsdata( self, local_config ): - - # Creating obsdata - local_obs_data_1 = local_config.createObsdata("OBSSET_1") - self.assertTrue(isinstance(local_obs_data_1, LocalObsdata)) - - # Try to add existing obsdata - with self.assertRaises(ValueError): - local_config.createObsdata("OBSSET_1") - - # Add node with range - with self.assertRaises(KeyError): - local_obs_data_1.addNodeAndRange("MISSING_KEY" , 0 , 1 ) - - local_obs_data_1.addNodeAndRange("GEN_PERLIN_1", 0, 1) - local_obs_data_1.addNodeAndRange("GEN_PERLIN_2", 0, 1) - - self.assertEqual( len(local_obs_data_1) , 2 ) - - # Delete node - del local_obs_data_1["GEN_PERLIN_1"] - self.assertEqual( len(local_obs_data_1) , 1 ) - - # Get node - node = local_obs_data_1["GEN_PERLIN_2"] - self.assertTrue(isinstance(node, LocalObsdataNode)) - - # Add node again with no range and check return type - node_again = local_obs_data_1.addNode("GEN_PERLIN_1") - self.assertTrue(isinstance(node_again, LocalObsdataNode)) - - # Error when adding existing obs node - with self.assertRaises(KeyError): - local_obs_data_1.addNode("GEN_PERLIN_1") - - - def AttachObsData( self , local_config): - - local_obs_data_2 = local_config.createObsdata("OBSSET_2") - self.assertTrue(isinstance(local_obs_data_2, LocalObsdata)) - - # Obsdata - local_obs_data_2.addNodeAndRange("GEN_PERLIN_1", 0, 1) - local_obs_data_2.addNodeAndRange("GEN_PERLIN_2", 0, 1) - - # Ministep - ministep = local_config.createMinistep("MINISTEP") - self.assertTrue(isinstance(ministep, LocalMinistep)) - - # Attach obsset - ministep.attachObsset(local_obs_data_2) - - # Retrieve attached obsset - local_obs_data_new = ministep.getLocalObsData() - self.assertEqual( len(local_obs_data_new) , 2 ) - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_local_obsdata_node.py b/ThirdParty/Ert/python/tests/ert/enkf/test_local_obsdata_node.py deleted file mode 100644 index 903df7f61a..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_local_obsdata_node.py +++ /dev/null @@ -1,22 +0,0 @@ -from ert.enkf import LocalObsdataNode -from ert.test import ExtendedTestCase - - -class LocalObsdataNodeTest(ExtendedTestCase): - def setUp(self): - pass - - def test_tstep(self): - node = LocalObsdataNode("KEY") - self.assertTrue( node.allTimeStepActive() ) - self.assertTrue( node.tstepActive( 10 )) - self.assertTrue( node.tstepActive( 0 )) - - node.addTimeStep(10) - self.assertFalse( node.allTimeStepActive() ) - - self.assertTrue( node.tstepActive( 10 )) - self.assertFalse( node.tstepActive( 0 )) - - - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_meas_block.py b/ThirdParty/Ert/python/tests/ert/enkf/test_meas_block.py deleted file mode 100644 index cff889fdab..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_meas_block.py +++ /dev/null @@ -1,103 +0,0 @@ -import datetime - -from ert.test import TestAreaContext -from ert.test import ExtendedTestCase -from ert.util import BoolVector -from ert.enkf import MeasBlock - - - -class MeasBlockTest(ExtendedTestCase): - - - def test_create(self): - key = "OBS" - ens_size = 100 - obs_size = 77 - ens_mask = BoolVector( default_value = True , initial_size = ens_size ) - - ens_mask[67] = False - block = MeasBlock( key , obs_size , ens_mask) - self.assertEqual( block.getObsSize() , obs_size ) - self.assertEqual( block.getActiveEnsSize() , ens_size - 1) - self.assertEqual( block.getTotalEnsSize() , ens_size ) - - self.assertTrue( block.iensActive( 66 ) ) - self.assertFalse( block.iensActive( 67 ) ) - - - - - def test_update(self): - key = "OBS" - obs_size = 4 - ens_size = 10 - ens_mask = BoolVector( default_value = True , initial_size = ens_size ) - block = MeasBlock( key , obs_size , ens_mask) - - with self.assertRaises(TypeError): - block["String"] = 10 - - with self.assertRaises(TypeError): - block[10] = 10 - - with self.assertRaises(IndexError): - block[obs_size,0] = 10 - - with self.assertRaises(IndexError): - block[0,ens_size] = 10 - - #----------------------------------------------------------------- - - with self.assertRaises(TypeError): - a = block["String"] - - with self.assertRaises(TypeError): - a = block[10] - - with self.assertRaises(IndexError): - val = block[obs_size,0] - - with self.assertRaises(IndexError): - val = block[0,ens_size] - - block[1,2] = 3 - self.assertEqual( 3 , block[1,2] ) - - - - def test_inactive(self): - key = "OBS" - obs_size = 2 - ens_size = 10 - ens_mask = BoolVector( default_value = True , initial_size = ens_size ) - ens_mask[5] = False - block = MeasBlock( key , obs_size , ens_mask) - - self.assertFalse( block.iensActive( 5 )) - - with self.assertRaises(ValueError): - block[0,5] = 10 - - - - - def test_stat(self): - key = "OBS" - obs_size = 2 - ens_size = 10 - ens_mask = BoolVector( default_value = True , initial_size = ens_size ) - block = MeasBlock( key , obs_size , ens_mask) - - for iens in range(ens_size): - block[0,iens] = iens - block[1,iens] = iens + 1 - - self.assertEqual( 4.5 , block.igetMean( 0 )) - self.assertEqual( 5.5 , block.igetMean( 1 )) - - self.assertFloatEqual( 2.872281 , block.igetStd( 0 )) - self.assertFloatEqual( 2.872281 , block.igetStd( 1 )) - - - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_meas_data.py b/ThirdParty/Ert/python/tests/ert/enkf/test_meas_data.py deleted file mode 100644 index eb0d85e3ef..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_meas_data.py +++ /dev/null @@ -1,75 +0,0 @@ -import datetime - -from ert.util import BoolVector -from ert.test import TestAreaContext -from ert.test import ExtendedTestCase -from ert.enkf import MeasBlock,MeasData - - - -class MeasDataTest(ExtendedTestCase): - - - def test_create(self): - ens_size = 10 - ens_mask = BoolVector( default_value = True , initial_size = ens_size ) - data = MeasData( ens_mask ) - self.assertEqual( len(data) , 0) - self.assertTrue( isinstance( data , MeasData )) - - block1 = data.addBlock( "OBS1" , 10 , 5 ) - block2 = data.addBlock( "OBS2" , 27 , 10 ) - - with self.assertRaises(TypeError): - data[1.782] - - with self.assertRaises(KeyError): - data["NO-this-does-not-exist"] - - with self.assertRaises(IndexError): - data[2] - - last0 = data[-1] - last1 = data[1] - self.assertEqual( last0 , last1 ) - - self.assertTrue( "OBS1-10" in data ) - self.assertTrue( "OBS2-27" in data ) - self.assertEqual( len(data) , 2) - - self.assertTrue( isinstance( block1 , MeasBlock )) - self.assertTrue( isinstance( block2 , MeasBlock )) - - self.assertEqual( block1.getObsSize() , 5 ) - self.assertEqual( block2.getObsSize() , 10 ) - - l = [] - for b in data: - l.append(b) - - self.assertEqual(len(l) , 2) - self.assertEqual(l[0] , block1) - self.assertEqual(l[1] , block2) - - - with self.assertRaises(ValueError): - S = data.createS() - - for iens in range(ens_size): - block1[0,iens] = 5 - block2[0,iens] = 10 - block2[1,iens] = 15 - - self.assertEqual( 3 , data.activeObsSize() ) - S = data.createS() - - self.assertEqual( S.dims() , (3 , ens_size) ) - - for iens in range(ens_size): - self.assertEqual( S[0,iens] , 5 ) - self.assertEqual( S[1,iens] , 10 ) - self.assertEqual( S[2,iens] , 15 ) - - - - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_obs_block.py b/ThirdParty/Ert/python/tests/ert/enkf/test_obs_block.py deleted file mode 100644 index 0cbea7eae4..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_obs_block.py +++ /dev/null @@ -1,55 +0,0 @@ -import datetime - -from ert.util import BoolVector -from ert.test import TestAreaContext -from ert.test import ExtendedTestCase -from ert.enkf import ObsBlock - - - -class ObsBlockTest(ExtendedTestCase): - - - def test_create(self): - block = ObsBlock("OBS" , 1000) - self.assertTrue( isinstance( block , ObsBlock )) - self.assertEqual( 1000 , block.totalSize()) - self.assertEqual( 0 , block.activeSize()) - - - - def test_access(self): - obs_size = 10 - block = ObsBlock("OBS" , obs_size) - - with self.assertRaises(IndexError): - block[100] = (1,1) - - with self.assertRaises(IndexError): - block[-1] = (1,1) - - with self.assertRaises(TypeError): - block[4] = 10 - - with self.assertRaises(TypeError): - block[4] = (1,1,9) - - #------ - - with self.assertRaises(IndexError): - v = block[100] - - with self.assertRaises(IndexError): - v = block[-1] - - block[0] = (10,1) - v = block[0] - self.assertEqual( v , (10,1)) - self.assertEqual( 1 , block.activeSize()) - - - - - - - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_obs_data.py b/ThirdParty/Ert/python/tests/ert/enkf/test_obs_data.py deleted file mode 100644 index def60a480f..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_obs_data.py +++ /dev/null @@ -1,53 +0,0 @@ -import datetime - -from ert.util import BoolVector , Matrix -from ert.test import TestAreaContext -from ert.test import ExtendedTestCase -from ert.enkf import ObsData , ObsBlock - - - - -class ObsDataTest(ExtendedTestCase): - - - def test_create(self): - obs_data = ObsData() - obs_size = 10 - block = obs_data.addBlock("OBS" , obs_size) - self.assertTrue( isinstance( block , ObsBlock )) - - block[0] = (100,10) - block[1] = (120,12) - D = obs_data.createDObs() - self.assertTrue( isinstance(D , Matrix )) - self.assertEqual( D.dims() , (2,2)) - - self.assertEqual( D[0,0] , 100 ) - self.assertEqual( D[1,0] , 120 ) - self.assertEqual( D[0,1] , 10 ) - self.assertEqual( D[1,1] , 12 ) - - obs_data.scaleMatrix( D ) - self.assertEqual( D[0,0] , 10 ) - self.assertEqual( D[1,0] , 10 ) - self.assertEqual( D[0,1] , 1 ) - self.assertEqual( D[1,1] , 1 ) - - R = obs_data.createR() - self.assertEqual( (2,2) , R.dims() ) - - with self.assertRaises(IndexError): - obs_data[10] - - v,s = obs_data[0] - self.assertEqual( v , 100 ) - self.assertEqual( s , 10 ) - - - v,s = obs_data[1] - self.assertEqual( v , 120 ) - self.assertEqual( s , 12 ) - - - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_runpath_list.py b/ThirdParty/Ert/python/tests/ert/enkf/test_runpath_list.py deleted file mode 100644 index 06f3021366..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_runpath_list.py +++ /dev/null @@ -1,120 +0,0 @@ -from os import path, symlink, remove - -import ert -from cwrap import CWrapper -from ert.test import ExtendedTestCase, TestAreaContext,ErtTestContext -from ert.enkf import RunpathList, RunpathNode -from ert.util import BoolVector - -test_lib = ert.load("libenkf") # create a local namespace -cwrapper = CWrapper(test_lib) - -runpath_list_alloc = cwrapper.prototype("runpath_list_obj runpath_list_alloc(char*)") - -class RunpathListTest(ExtendedTestCase): - - def test_runpath_list(self): - runpath_list = runpath_list_alloc("") - """ @type runpath_list: RunpathList """ - - self.assertEqual(len(runpath_list), 0) - - test_runpath_nodes = [RunpathNode(0, 0, "runpath0", "basename0"), RunpathNode(1, 0, "runpath1", "basename0")] - - runpath_node = test_runpath_nodes[0] - runpath_list.add(runpath_node.realization, runpath_node.iteration, runpath_node.runpath, runpath_node.basename) - - self.assertEqual(len(runpath_list), 1) - self.assertEqual(runpath_list[0], test_runpath_nodes[0]) - - runpath_node = test_runpath_nodes[1] - runpath_list.add(runpath_node.realization, runpath_node.iteration, runpath_node.runpath, runpath_node.basename) - - self.assertEqual(len(runpath_list), 2) - self.assertEqual(runpath_list[1], test_runpath_nodes[1]) - - for index, runpath_node in enumerate(runpath_list): - self.assertEqual(runpath_node, test_runpath_nodes[index]) - - - runpath_list.clear() - - self.assertEqual(len(runpath_list), 0) - - - - def test_sorted_export(self): - with TestAreaContext("runpath_list"): - runpath_list = RunpathList("EXPORT.txt") - runpath_list.add( 3 , 1 , "path" , "base" ) - runpath_list.add( 1 , 1 , "path" , "base" ) - runpath_list.add( 2 , 1 , "path" , "base" ) - runpath_list.add( 0 , 0 , "path" , "base" ) - - runpath_list.add( 3 , 0 , "path" , "base" ) - runpath_list.add( 1 , 0 , "path" , "base" ) - runpath_list.add( 2 , 0 , "path" , "base" ) - runpath_list.add( 0 , 1 , "path" , "base" ) - - runpath_list.export( ) - - path_list = [] - with open("EXPORT.txt") as f: - for line in f.readlines(): - tmp = line.split() - iens = int(tmp[0]) - iteration = int(tmp[3]) - - path_list.append( (iens , iteration) ) - - for iens in range(4): - t0 = path_list[iens] - t4 = path_list[iens + 4] - self.assertEqual( t0[0] , iens ) - self.assertEqual( t4[0] , iens ) - - self.assertEqual( t0[1] , 0 ) - self.assertEqual( t4[1] , 1 ) - - - def test_assert_export(self): - with ErtTestContext("create_runpath1" , self.createTestPath("local/snake_oil_no_data/snake_oil.ert")) as tc: - ert = tc.getErt( ) - runpath_list = ert.getRunpathList( ) - self.assertFalse( path.isfile( runpath_list.getExportFile( ) )) - - ens_size = ert.getEnsembleSize( ) - runner = ert.getEnkfSimulationRunner( ) - mask = BoolVector( initial_size = ens_size , default_value = True ) - runner.createRunPath( mask , 0 ) - - self.assertTrue( path.isfile( runpath_list.getExportFile( ) )) - self.assertEqual( "test_runpath_list.txt" , path.basename( runpath_list.getExportFile( ) )) - - - - def test_assert_symlink_deleted(self): - with ErtTestContext("create_runpath2" , self.createTestPath("local/snake_oil_field/snake_oil.ert")) as tc: - ert = tc.getErt( ) - runpath_list = ert.getRunpathList( ) - - ens_size = ert.getEnsembleSize( ) - runner = ert.getEnkfSimulationRunner( ) - mask = BoolVector( initial_size = ens_size , default_value = True ) - - # create directory structure - runner.createRunPath( mask , 0 ) - - # replace field file with symlink - linkpath = '%s/permx.grdcel' % str(runpath_list[0].runpath) - targetpath = '%s/permx.grdcel.target' % str(runpath_list[0].runpath) - open(targetpath, 'a').close() - remove(linkpath) - symlink(targetpath, linkpath) - - # recreate directory structure - runner.createRunPath( mask , 0 ) - - # ensure field symlink is replaced by file - self.assertFalse( path.islink(linkpath) ) - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_state_map.py b/ThirdParty/Ert/python/tests/ert/enkf/test_state_map.py deleted file mode 100644 index e6d5c1cc5c..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_state_map.py +++ /dev/null @@ -1,105 +0,0 @@ -from ert.enkf.enums.realization_state_enum import RealizationStateEnum -from ert.enkf.state_map import StateMap -from ert.test import TestAreaContext -from ert.test import ExtendedTestCase - - -class StateMapTest(ExtendedTestCase): - - def test_state_map(self): - state_map = StateMap() - - self.assertEqual(len(state_map), 0) - - with self.assertRaises(TypeError): - r = state_map["r"] - - with self.assertRaises(IOError): - s2 = StateMap("DoesNotExist") - - with self.assertRaises(IOError): - state_map.load("/file/does/not/exist") - - with self.assertRaises(IndexError): - v = state_map[0] - - with self.assertRaises(TypeError): - state_map["r"] = RealizationStateEnum.STATE_INITIALIZED - - with self.assertRaises(TypeError): - state_map[0] = "INITIALIZED" - - with self.assertRaises(IndexError): - state_map[-1] = RealizationStateEnum.STATE_INITIALIZED - - - state_map[0] = RealizationStateEnum.STATE_INITIALIZED - - self.assertEqual(len(state_map), 1) - - state_map[1] = RealizationStateEnum.STATE_INITIALIZED - state_map[1] = RealizationStateEnum.STATE_HAS_DATA - - self.assertEqual(len(state_map), 2) - - index = 0 - for state in state_map: - self.assertEqual(state, state_map[index]) - index += 1 - - states = [state for state in state_map] - - self.assertEqual(states, [RealizationStateEnum.STATE_INITIALIZED, RealizationStateEnum.STATE_HAS_DATA]) - - - state_map[5] = RealizationStateEnum.STATE_INITIALIZED - self.assertEqual(len(state_map), 6) - - self.assertEqual(state_map[2], RealizationStateEnum.STATE_UNDEFINED) - self.assertEqual(state_map[3], RealizationStateEnum.STATE_UNDEFINED) - self.assertEqual(state_map[4], RealizationStateEnum.STATE_UNDEFINED) - self.assertEqual(state_map[5], RealizationStateEnum.STATE_INITIALIZED) - - self.assertFalse(state_map.isReadOnly()) - - with TestAreaContext("python/state-map/fwrite") as work_area: - state_map.save("MAP") - s2 = StateMap("MAP") - self.assertTrue( state_map == s2 ) - - - - def test_state_map_transitions(self): - self.assertTrue(StateMap.isLegalTransition(RealizationStateEnum.STATE_UNDEFINED, RealizationStateEnum.STATE_INITIALIZED)) - self.assertTrue(StateMap.isLegalTransition(RealizationStateEnum.STATE_INITIALIZED, RealizationStateEnum.STATE_HAS_DATA)) - self.assertTrue(StateMap.isLegalTransition(RealizationStateEnum.STATE_INITIALIZED, RealizationStateEnum.STATE_LOAD_FAILURE)) - self.assertTrue(StateMap.isLegalTransition(RealizationStateEnum.STATE_INITIALIZED, RealizationStateEnum.STATE_PARENT_FAILURE)) - self.assertTrue(StateMap.isLegalTransition(RealizationStateEnum.STATE_HAS_DATA, RealizationStateEnum.STATE_PARENT_FAILURE)) - - self.assertFalse(StateMap.isLegalTransition(RealizationStateEnum.STATE_UNDEFINED, RealizationStateEnum.STATE_LOAD_FAILURE)) - self.assertFalse(StateMap.isLegalTransition(RealizationStateEnum.STATE_UNDEFINED, RealizationStateEnum.STATE_HAS_DATA)) - - with self.assertRaises(TypeError): - StateMap.isLegalTransition("error", RealizationStateEnum.STATE_UNDEFINED) - - with self.assertRaises(TypeError): - StateMap.isLegalTransition(RealizationStateEnum.STATE_UNDEFINED, "error") - - with self.assertRaises(TypeError): - StateMap.isLegalTransition("error", "exception") - - - def test_active_list(self): - state_map = StateMap() - state_map[0] = RealizationStateEnum.STATE_INITIALIZED - state_map[2] = RealizationStateEnum.STATE_INITIALIZED - state_map[2] = RealizationStateEnum.STATE_HAS_DATA - - initialized = state_map.realizationList( RealizationStateEnum.STATE_INITIALIZED ) - self.assertEqual( len(initialized) , 1 ) - self.assertEqual( initialized[0] , 0 ) - - has_data = state_map.realizationList( RealizationStateEnum.STATE_HAS_DATA ) - self.assertEqual( len(has_data) , 1 ) - self.assertEqual( has_data[0] , 2) - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_summary_key_matcher.py b/ThirdParty/Ert/python/tests/ert/enkf/test_summary_key_matcher.py deleted file mode 100644 index fcd783fdc3..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_summary_key_matcher.py +++ /dev/null @@ -1,28 +0,0 @@ -from ert.enkf import SummaryKeyMatcher -from ert.test import ExtendedTestCase - -class SummaryKeyMatcherTest(ExtendedTestCase): - - def test_creation(self): - matcher = SummaryKeyMatcher() - - self.assertTrue(len(matcher) == 0) - - matcher.addSummaryKey("F*") - self.assertTrue(len(matcher) == 1) - - matcher.addSummaryKey("F*") - self.assertTrue(len(matcher) == 1) - - matcher.addSummaryKey("FOPT") - self.assertTrue(len(matcher) == 2) - - self.assertItemsEqual(["F*", "FOPT"], matcher.keys()) - - self.assertTrue("FGIR" in matcher) - self.assertTrue("FOPT" in matcher) - self.assertFalse("TCPU" in matcher) - - self.assertTrue(matcher.isRequired("FOPT")) - self.assertFalse(matcher.isRequired("FGIR")) - self.assertFalse(matcher.isRequired("TCPU")) \ No newline at end of file diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_summary_key_set.py b/ThirdParty/Ert/python/tests/ert/enkf/test_summary_key_set.py deleted file mode 100644 index 4c3a44e9ee..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_summary_key_set.py +++ /dev/null @@ -1,99 +0,0 @@ -import os -from ert.enkf import SummaryKeySet -from ert.enkf.enkf_fs import EnkfFs -from ert.enkf.enkf_main import EnKFMain -from ert.test import ExtendedTestCase -from ert.test.ert_test_context import ErtTestContext -from ert.test.test_area import TestAreaContext - - -class SummaryKeySetTest(ExtendedTestCase): - - def test_creation(self): - - keys = SummaryKeySet() - - self.assertEqual(len(keys), 0) - - self.assertTrue(keys.addSummaryKey("FOPT")) - - self.assertEqual(len(keys), 1) - - self.assertTrue("FOPT" in keys) - - self.assertItemsEqual(["FOPT"], keys.keys()) - - self.assertTrue(keys.addSummaryKey("WWCT")) - - self.assertEqual(len(keys), 2) - - self.assertTrue("WWCT" in keys) - - self.assertItemsEqual(["WWCT", "FOPT"], keys.keys()) - - - - def test_read_only_creation(self): - with TestAreaContext("enkf/summary_key_set/read_only_write_test"): - keys = SummaryKeySet() - - keys.addSummaryKey("FOPT") - keys.addSummaryKey("WWCT") - - filename = "test.txt" - keys.writeToFile(filename) - - keys_from_file = SummaryKeySet(filename, read_only=True) - self.assertItemsEqual(keys.keys(), keys_from_file.keys()) - - self.assertTrue(keys_from_file.isReadOnly()) - self.assertFalse(keys_from_file.addSummaryKey("WOPR")) - - - def test_write_to_and_read_from_file(self): - with TestAreaContext("enkf/summary_key_set/write_test"): - keys = SummaryKeySet() - - keys.addSummaryKey("FOPT") - keys.addSummaryKey("WWCT") - - filename = "test.txt" - - self.assertFalse(os.path.exists(filename)) - - keys.writeToFile(filename) - - self.assertTrue(os.path.exists(filename)) - - keys_from_file = SummaryKeySet(filename) - self.assertItemsEqual(keys.keys(), keys_from_file.keys()) - - - def test_with_enkf_fs(self): - config_file = self.createTestPath("Statoil/config/with_data/config") - - with TestAreaContext("enkf/summary_key_set/enkf_fs", store_area=True) as context: - context.copy_parent_content(config_file) - - fs = EnkfFs("storage/default") - summary_key_set = fs.getSummaryKeySet() - summary_key_set.addSummaryKey("FOPT") - summary_key_set.addSummaryKey("WWCT") - summary_key_set.addSummaryKey("WOPR") - fs.umount() - - ert = EnKFMain("config") - fs = ert.getEnkfFsManager().getCurrentFileSystem() - summary_key_set = fs.getSummaryKeySet() - self.assertTrue("FOPT" in summary_key_set) - self.assertTrue("WWCT" in summary_key_set) - self.assertTrue("WOPR" in summary_key_set) - - ensemble_config = ert.ensembleConfig() - - self.assertTrue("FOPT" in ensemble_config) - self.assertTrue("WWCT" in ensemble_config) - self.assertTrue("WOPR" in ensemble_config) - self.assertFalse("TCPU" in ensemble_config) - - diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_summary_obs.py b/ThirdParty/Ert/python/tests/ert/enkf/test_summary_obs.py deleted file mode 100644 index 981ce73f91..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_summary_obs.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (C) 2015 Statoil ASA, Norway. -# -# The file 'test_summary_obs.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -import os - -from ert.enkf import SummaryObservation -from ert.enkf import ActiveList -from ert.test import ExtendedTestCase - - - -class SummaryObsTest(ExtendedTestCase): - - def test_create(self): - sum_obs = SummaryObservation("WWCT:OP_X" , "WWCT:OP_X" , 0.25 , 0.12) - - self.assertEqual( sum_obs.getValue() , 0.25 ) - self.assertEqual( sum_obs.getStandardDeviation() , 0.12 ) - self.assertEqual( sum_obs.getStdScaling() , 1.0 ) - - - def test_std_scaling(self): - sum_obs = SummaryObservation("WWCT:OP_X" , "WWCT:OP_X" , 0.25 , 0.12) - - active_list = ActiveList() - sum_obs.updateStdScaling(0.50 , active_list) - sum_obs.updateStdScaling(0.125 , active_list) - self.assertEqual( sum_obs.getStdScaling() , 0.125 ) diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_time_map.py b/ThirdParty/Ert/python/tests/ert/enkf/test_time_map.py deleted file mode 100644 index 57a3106e00..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_time_map.py +++ /dev/null @@ -1,179 +0,0 @@ -import datetime - -from ert.enkf.enums.realization_state_enum import RealizationStateEnum -from ert.enkf import TimeMap -from ert.test import TestAreaContext -from ert.test import ExtendedTestCase - - -class TimeMapTest(ExtendedTestCase): - - def test_time_map(self): - with self.assertRaises(IOError): - TimeMap("Does/not/exist") - - - tm = TimeMap() - with self.assertRaises(IndexError): - t = tm[10] - - self.assertTrue( tm.update(0 , datetime.date(2000 , 1, 1))) - self.assertEqual( tm[0] , datetime.date(2000 , 1, 1)) - - self.assertTrue( tm.isStrict() ) - with self.assertRaises(Exception): - tm.update(tm.update(0 , datetime.date(2000 , 1, 2))) - - tm.setStrict( False ) - self.assertFalse(tm.update(0 , datetime.date(2000 , 1, 2))) - - tm.setStrict( True ) - self.assertTrue( tm.update( 1 , datetime.date(2000 , 1, 2))) - d = tm.dump() - self.assertEqual( d , [(0 , datetime.date(2000,1,1) , 0), - (1 , datetime.date(2000,1,2) , 1)]) - - - def test_fscanf(self): - tm = TimeMap() - - with self.assertRaises(IOError): - tm.fload( "Does/not/exist" ) - - with TestAreaContext("timemap/fload1") as work_area: - with open("map.txt","w") as fileH: - fileH.write("10/10/2000\n") - fileH.write("12/10/2000\n") - fileH.write("14/10/2000\n") - fileH.write("16/10/2000\n") - - tm.fload("map.txt") - self.assertEqual( 4 , len(tm) ) - self.assertEqual( datetime.date(2000,10,10) , tm[0]) - self.assertEqual( datetime.date(2000,10,16) , tm[3]) - - with TestAreaContext("timemap/fload2") as work_area: - with open("map.txt","w") as fileH: - fileH.write("10/10/200X\n") - - with self.assertRaises(Exception): - tm.fload("map.txt") - - self.assertEqual( 4 , len(tm) ) - self.assertEqual( datetime.date(2000,10,10) , tm[0]) - self.assertEqual( datetime.date(2000,10,16) , tm[3]) - - - with TestAreaContext("timemap/fload2") as work_area: - with open("map.txt","w") as fileH: - fileH.write("12/10/2000\n") - fileH.write("10/10/2000\n") - - with self.assertRaises(Exception): - tm.fload("map.txt") - - self.assertEqual( 4 , len(tm) ) - self.assertEqual( datetime.date(2000,10,10) , tm[0]) - self.assertEqual( datetime.date(2000,10,16) , tm[3]) - - - def test_setitem(self): - tm = TimeMap() - tm[0] = datetime.date(2000,1,1) - tm[1] = datetime.date(2000,1,2) - self.assertEqual(2 , len(tm)) - - self.assertEqual( tm[0] , datetime.date(2000,1,1) ) - self.assertEqual( tm[1] , datetime.date(2000,1,2) ) - - - def test_in(self): - tm = TimeMap() - tm[0] = datetime.date(2000,1,1) - tm[1] = datetime.date(2000,1,2) - tm[2] = datetime.date(2000,1,3) - - self.assertTrue( datetime.date(2000,1,1) in tm ) - self.assertTrue( datetime.date(2000,1,2) in tm ) - self.assertTrue( datetime.date(2000,1,3) in tm ) - - self.assertFalse( datetime.date(2001,1,3) in tm ) - self.assertFalse( datetime.date(1999,1,3) in tm ) - - - def test_lookupDate(self): - tm = TimeMap() - tm[0] = datetime.date(2000,1,1) - tm[1] = datetime.date(2000,1,2) - tm[2] = datetime.date(2000,1,3) - - self.assertEqual( 0 , tm.lookupTime( datetime.date(2000,1,1))) - self.assertEqual( 0 , tm.lookupTime( datetime.datetime(2000,1,1,0,0,0))) - - self.assertEqual( 2 , tm.lookupTime( datetime.date(2000,1,3))) - self.assertEqual( 2 , tm.lookupTime( datetime.datetime(2000,1,3,0,0,0))) - - with self.assertRaises(ValueError): - tm.lookupTime( datetime.date(1999,10,10)) - - - - def test_lookupDays(self): - tm = TimeMap() - - with self.assertRaises(ValueError): - tm.lookupDays( 0 ) - - tm[0] = datetime.date(2000,1,1) - tm[1] = datetime.date(2000,1,2) - tm[2] = datetime.date(2000,1,3) - - self.assertEqual( 0 , tm.lookupDays( 0 )) - self.assertEqual( 1 , tm.lookupDays( 1 )) - self.assertEqual( 2 , tm.lookupDays( 2 )) - - with self.assertRaises(ValueError): - tm.lookupDays( -1 ) - - with self.assertRaises(ValueError): - tm.lookupDays( 0.50 ) - - with self.assertRaises(ValueError): - tm.lookupDays( 3 ) - - - - def test_nearest_date_lookup(self): - tm = TimeMap() - with self.assertRaises(ValueError): - tm.lookupTime(datetime.date( 1999 , 1 , 1)) - - with self.assertRaises(ValueError): - tm.lookupTime(datetime.date( 1999 , 1 , 1) , tolerance_seconds_before = 10 , tolerance_seconds_after = 10) - - tm[0] = datetime.date(2000,1,1) - tm[1] = datetime.date(2000,2,1) - tm[2] = datetime.date(2000,3,1) - - # Outside of total range will raise an exception, irrespective of - # the tolerances used. - with self.assertRaises(ValueError): - tm.lookupTime(datetime.date( 1999 , 1 , 1) , tolerance_seconds_before = -1 , tolerance_seconds_after = -1) - - with self.assertRaises(ValueError): - tm.lookupTime(datetime.date( 2001 , 1 , 1) , tolerance_seconds_before = -1 , tolerance_seconds_after = -1) - - self.assertEqual(0 , tm.lookupTime( datetime.datetime(2000 , 1 , 1 , 0 , 0 , 10) , tolerance_seconds_after = 15)) - self.assertEqual(1 , tm.lookupTime( datetime.datetime(2000 , 1 , 1 , 0 , 0 , 10) , tolerance_seconds_before = 3600*24*40)) - - self.assertEqual(0 , tm.lookupTime( datetime.date( 2000 , 1 , 10) , tolerance_seconds_before = -1 , tolerance_seconds_after = -1)) - self.assertEqual(1 , tm.lookupTime( datetime.date( 2000 , 1 , 20) , tolerance_seconds_before = -1 , tolerance_seconds_after = -1)) - - with self.assertRaises(ValueError): - tm.lookupTime(datetime.date( 2001 , 10 , 1) , tolerance_seconds_before = 10 , tolerance_seconds_after = 10) - - - def test_empty(self): - tm = TimeMap() - last_step = tm.getLastStep( ) - self.assertEqual( last_step , -1 ) diff --git a/ThirdParty/Ert/python/tests/ert/enkf/test_update.py b/ThirdParty/Ert/python/tests/ert/enkf/test_update.py deleted file mode 100644 index 757084be40..0000000000 --- a/ThirdParty/Ert/python/tests/ert/enkf/test_update.py +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright (C) 2015 Statoil ASA, Norway. -# -# The file 'test_update.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -import random - -import ert -from ert.test import ExtendedTestCase, ErtTestContext -from ert.util.enums import RngAlgTypeEnum, RngInitModeEnum -from ert.util import Matrix, BoolVector , RandomNumberGenerator -from ert.analysis import AnalysisModule, AnalysisModuleLoadStatusEnum, AnalysisModuleOptionsEnum -from ert.enkf import MeasData , ObsData , LocalObsdata - - - - -def update(rng , mask , module , ert , meas_data , obs_data , state_size): - S = meas_data.createS() - R = obs_data.createR() - dObs = obs_data.createDObs() - E = obs_data.createE( rng , meas_data.getActiveEnsSize() ) - D = obs_data.createD(E , S) - obs_data.scale(S , E = E , D = D , R = R , D_obs = dObs) - - A = Matrix(state_size , meas_data.getActiveEnsSize()) - A.randomInit( rng ) - - module.initUpdate( mask , S , R , dObs , E , D ) - module.updateA( A , S , R , dObs , E , D ) - - - - -class UpdateTest(ExtendedTestCase): - def setUp(self): - self.libname = ert.ert_lib_path + "/rml_enkf.so" - self.config_file = self.createTestPath("Statoil/config/obs_testing2/config") - self.rng = RandomNumberGenerator(RngAlgTypeEnum.MZRAN, RngInitModeEnum.INIT_DEFAULT) - - - def createAnalysisModule(self): - return AnalysisModule(self.rng, lib_name = self.libname) - - - def test_it(self): - state_size = 10 - with ErtTestContext("update" , self.config_file) as tc: - analysis = self.createAnalysisModule() - ert = tc.getErt() - obs = ert.getObservations() - local_obsdata = obs.getAllActiveLocalObsdata( ) - - fs = ert.getEnkfFsManager().getCurrentFileSystem() - - - mask = BoolVector( initial_size = ert.getEnsembleSize() , default_value = True) - meas_data = MeasData(mask) - obs_data = ObsData() - obs.getObservationAndMeasureData( fs , local_obsdata , mask.createActiveList() , meas_data , obs_data ) - update( self.rng , mask , analysis , ert , meas_data , obs_data , state_size) - - - mask[0] = False - mask[4] = False - meas_data = MeasData(mask) - obs_data = ObsData() - obs.getObservationAndMeasureData( fs , local_obsdata , mask.createActiveList() , meas_data , obs_data ) - update( self.rng , mask , analysis , ert , meas_data , obs_data , state_size) - - diff --git a/ThirdParty/Ert/python/tests/ert/job_queue/CMakeLists.txt b/ThirdParty/Ert/python/tests/ert/job_queue/CMakeLists.txt deleted file mode 100644 index d7dcab80dc..0000000000 --- a/ThirdParty/Ert/python/tests/ert/job_queue/CMakeLists.txt +++ /dev/null @@ -1,25 +0,0 @@ -set(TEST_SOURCES - __init__.py - test_ert_plugin.py - test_ert_script.py - test_ext_job.py - test_function_ert_script.py - test_job_queue.py - test_workflow.py - test_workflow_job.py - test_workflow_joblist.py - test_workflow_runner.py - workflow_common.py -) - -add_python_package("python.tests.ert.job_queue" ${PYTHON_INSTALL_PREFIX}/tests/ert/job_queue "${TEST_SOURCES}" False) - -addPythonTest(ert.job_queue.job_status_type_enum tests.ert.job_queue.test_job_queue.JobQueueTest) -addPythonTest(ert.job_queue.workflow_job tests.ert.job_queue.test_workflow_job.WorkflowJobTest) -addPythonTest(ert.job_queue.workflow tests.ert.job_queue.test_workflow.WorkflowTest) -addPythonTest(ert.job_queue.workflow_joblist tests.ert.job_queue.test_workflow_joblist.WorkflowJoblistTest) -addPythonTest(ert.job_queue.ert_plugin tests.ert.job_queue.test_ert_plugin.ErtPluginTest) -addPythonTest(ert.job_queue.ert_script tests.ert.job_queue.test_ert_script.ErtScriptTest) -addPythonTest(ert.job_queue.function_ert_script tests.ert.job_queue.test_function_ert_script.FunctionErtScriptTest) -addPythonTest(ert.job_queue.workflow_runner tests.ert.job_queue.test_workflow_runner.WorkflowRunnerTest) -addPythonTest(ert.job_queue.ext_job tests.ert.job_queue.test_ext_job.ExtJobTest) \ No newline at end of file diff --git a/ThirdParty/Ert/python/tests/ert/job_queue/__init__.py b/ThirdParty/Ert/python/tests/ert/job_queue/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/python/tests/ert/job_queue/test_ert_plugin.py b/ThirdParty/Ert/python/tests/ert/job_queue/test_ert_plugin.py deleted file mode 100644 index 96fbef4fd7..0000000000 --- a/ThirdParty/Ert/python/tests/ert/job_queue/test_ert_plugin.py +++ /dev/null @@ -1,86 +0,0 @@ -from ert.enkf import ErtPlugin, CancelPluginException -from ert.test.extended_testcase import ExtendedTestCase - - -class SimplePlugin(ErtPlugin): - def run(self, parameter1, parameter2): - assert parameter1 == "one" - assert parameter2 == 2 - - def getArguments(self, parent=None): - return ["one", 2] - - -class FullPlugin(ErtPlugin): - def getName(self): - return "FullPlugin" - - def getDescription(self): - return "Fully described!" - - def run(self, arg1, arg2, arg3=None): - assert arg1 == 5 - assert arg2 == "No" - assert arg3 is None - - def getArguments(self, parent=None): - return [5, "No"] - - -class CanceledPlugin(ErtPlugin): - def run(self, arg1): - pass - - def getArguments(self, parent=None): - raise CancelPluginException("Cancel test!") - -# class GUIPlugin(ErtPlugin): -# def getArguments(self, parent=None): -# value1 = QInputDialog.getInt(parent, "Enter a number!", "Enter a nice number (nothing else than 5):", value=0, min=0, max=10) -# value2 = QInputDialog.getInt(parent, "Enter a number!", "Enter a nice number (nothing else than 6):", value=0, min=0, max=10) -# print(value1, value2) -# return [value1[0], value2[0]] -# -# def run(self, arg1, arg2, arg3=None): -# assert arg1 == 5 -# assert arg2 == 6 - - -class ErtPluginTest(ExtendedTestCase): - - def test_simple_ert_plugin(self): - - simple_plugin = SimplePlugin("ert") - - arguments = simple_plugin.getArguments() - - self.assertTrue("SimplePlugin" in simple_plugin.getName()) - self.assertEqual("No description provided!", simple_plugin.getDescription()) - - simple_plugin.initializeAndRun([str, int], arguments) - - - def test_full_ert_plugin(self): - plugin = FullPlugin("ert") - - self.assertEqual(plugin.getName(), "FullPlugin") - self.assertEqual(plugin.getDescription(), "Fully described!") - - arguments = plugin.getArguments() - - plugin.initializeAndRun([int, str, float], arguments) - - - def test_cancel_plugin(self): - plugin = CanceledPlugin("ert") - - with self.assertRaises(CancelPluginException): - plugin.getArguments() - - # def test_gui_ert_plugin(self): - # app = QApplication([]) - # plugin = GUIPlugin("ert") - # - # arguments = plugin.getArguments() - # plugin.initializeAndRun([int, int], arguments) - diff --git a/ThirdParty/Ert/python/tests/ert/job_queue/test_ert_script.py b/ThirdParty/Ert/python/tests/ert/job_queue/test_ert_script.py deleted file mode 100644 index 5b99e414df..0000000000 --- a/ThirdParty/Ert/python/tests/ert/job_queue/test_ert_script.py +++ /dev/null @@ -1,82 +0,0 @@ -from ert.job_queue import ErtScript -from ert.test import TestAreaContext, ExtendedTestCase -from .workflow_common import WorkflowCommon - - -class ReturnErtScript(ErtScript): - def run(self): - return self.ert() - -class AddScript(ErtScript): - def run(self, arg1, arg2): - return arg1 + arg2 - -class FailScript(ErtScript): - def rum(self): - pass - -class NoneScript(ErtScript): - def run(self, arg): - assert arg is None - - -class ErtScriptTest(ExtendedTestCase): - - @staticmethod - def createScripts(): - WorkflowCommon.createErtScriptsJob() - - with open("syntax_error_script.py", "w") as f: - f.write("from ert.enkf not_legal_syntax ErtScript\n") - - with open("import_error_script.py", "w") as f: - f.write("from ert.enkf import DoesNotExist\n") - - with open("empty_script.py", "w") as f: - f.write("from ert.enkf import ErtScript\n") - - - def test_ert_script_return_ert(self): - script = ReturnErtScript("ert") - result = script.initializeAndRun([], []) - self.assertEqual(result, "ert") - - - def test_ert_script_add(self): - script = AddScript("ert") - - result = script.initializeAndRun([int, int], ["5", "4"]) - - self.assertEqual(result, 9) - - with self.assertRaises(ValueError): - result = script.initializeAndRun([int, int], ["5", "4.6"]) - - - def test_ert_script_failed_implementation(self): - with self.assertRaises(UserWarning): - script = FailScript("ert") - - - def test_ert_script_from_file(self): - with TestAreaContext("python/job_queue/ert_script") as work_area: - ErtScriptTest.createScripts() - - script_object = ErtScript.loadScriptFromFile("subtract_script.py") - - script = script_object("ert") - result = script.initializeAndRun([int, int], ["1", "2"]) - self.assertEqual(result, -1) - - - # with self.assertRaises(ErtScriptError): - self.assertIsNone(ErtScript.loadScriptFromFile("syntax_error_script.py")) - self.assertIsNone(ErtScript.loadScriptFromFile("import_error_script.py")) - self.assertIsNone(ErtScript.loadScriptFromFile("empty_script.py")) - - - def test_none_ert_script(self): - #Check if None is not converted to string "None" - script = NoneScript("ert") - - script.initializeAndRun([str], [None]) diff --git a/ThirdParty/Ert/python/tests/ert/job_queue/test_ext_job.py b/ThirdParty/Ert/python/tests/ert/job_queue/test_ext_job.py deleted file mode 100644 index d6932d3316..0000000000 --- a/ThirdParty/Ert/python/tests/ert/job_queue/test_ext_job.py +++ /dev/null @@ -1,77 +0,0 @@ -import os.path - -from ert.test import TestAreaContext, ExtendedTestCase -from ert.job_queue.ext_job import ExtJob - - -def create_valid_config( config_file ): - with open(config_file , "w") as f: - f.write("EXECUTABLE script.sh\n") - - with open("script.sh" , "w") as f: - f.write("This is a script") - - -def create_config_missing_executable( config_file ): - with open(config_file , "w") as f: - f.write("EXECUTABLE missing_script.sh\n") - - -def create_config_missing_EXECUTABLE( config_file ): - with open(config_file , "w") as f: - f.write("EXECU missing_script.sh\n") - - -def create_config_executable_directory( config_file ): - with open(config_file , "w") as f: - f.write("EXECUTABLE /tmp\n") - - -def create_config_foreign_file( config_file ): - with open(config_file , "w") as f: - f.write("EXECUTABLE /etc/passwd\n") - - - - -class ExtJobTest(ExtendedTestCase): - def test_load_forward_model(self): - with self.assertRaises(IOError): - job = ExtJob("CONFIG_FILE" , True) - - with TestAreaContext("python/job_queue/forward_model1"): - create_valid_config("CONFIG") - job = ExtJob("CONFIG" , True) - self.assertEqual( job.name() , "CONFIG") - - self.assertEqual( job.get_executable() , os.path.join( os.getcwd() , "script.sh")) - self.assertTrue( os.access( job.get_executable() , os.X_OK )) - - - job = ExtJob("CONFIG" , True , name = "Job") - self.assertEqual( job.name() , "Job") - - - with TestAreaContext("python/job_queue/forward_model2"): - create_config_missing_executable( "CONFIG" ) - with self.assertRaises(ValueError): - job = ExtJob("CONFIG" , True) - - - with TestAreaContext("python/job_queue/forward_model3"): - create_config_missing_EXECUTABLE( "CONFIG" ) - with self.assertRaises(ValueError): - job = ExtJob("CONFIG" , True) - - - with TestAreaContext("python/job_queue/forward_model4"): - create_config_executable_directory( "CONFIG" ) - with self.assertRaises(ValueError): - job = ExtJob("CONFIG" , True) - - - with TestAreaContext("python/job_queue/forward_model5"): - create_config_foreign_file( "CONFIG" ) - with self.assertRaises(ValueError): - job = ExtJob("CONFIG" , True) - diff --git a/ThirdParty/Ert/python/tests/ert/job_queue/test_function_ert_script.py b/ThirdParty/Ert/python/tests/ert/job_queue/test_function_ert_script.py deleted file mode 100644 index 6d6ec4b643..0000000000 --- a/ThirdParty/Ert/python/tests/ert/job_queue/test_function_ert_script.py +++ /dev/null @@ -1,28 +0,0 @@ -import ctypes -from cwrap import clib, CWrapper -from ert.test import ExtendedTestCase, TestAreaContext -from ert.job_queue import WorkflowJob -from .workflow_common import WorkflowCommon - -class FunctionErtScriptTest(ExtendedTestCase): - - def test_compare(self): - with TestAreaContext("python/job_queue/workflow_job") as work_area: - WorkflowCommon.createInternalFunctionJob() - - parser = WorkflowJob.configParser( ) - with self.assertRaises(IOError): - workflow_job = WorkflowJob.fromFile("no/such/file") - - workflow_job = WorkflowJob.fromFile("compare_job", name = "COMPARE", parser = parser) - self.assertEqual( workflow_job.name() , "COMPARE") - - result = workflow_job.run(None , ["String", "string"]) - self.assertNotEqual(result, 0) - - result = workflow_job.run(None, ["String", "String"]) - # result is returned as c_void_p -> automatic conversion to None if value is 0 - self.assertIsNone(result) - - workflow_job = WorkflowJob.fromFile("compare_job") - self.assertEqual( workflow_job.name() , "compare_job") diff --git a/ThirdParty/Ert/python/tests/ert/job_queue/test_job_queue.py b/ThirdParty/Ert/python/tests/ert/job_queue/test_job_queue.py deleted file mode 100644 index 6cacb1bf61..0000000000 --- a/ThirdParty/Ert/python/tests/ert/job_queue/test_job_queue.py +++ /dev/null @@ -1,11 +0,0 @@ -from ert.job_queue import JobStatusType -from ert.test import ExtendedTestCase - - -class JobQueueTest(ExtendedTestCase): - - def testStatusEnum(self): - source_path = "libjob_queue/include/ert/job_queue/queue_driver.h" - self.assertEnumIsFullyDefined(JobStatusType, "job_status_type", source_path) - - diff --git a/ThirdParty/Ert/python/tests/ert/job_queue/test_workflow.py b/ThirdParty/Ert/python/tests/ert/job_queue/test_workflow.py deleted file mode 100644 index a21228fc30..0000000000 --- a/ThirdParty/Ert/python/tests/ert/job_queue/test_workflow.py +++ /dev/null @@ -1,56 +0,0 @@ -from ert.job_queue import Workflow, WorkflowJoblist -from ert.test import ExtendedTestCase, TestAreaContext -from ert.util import SubstitutionList -from .workflow_common import WorkflowCommon - - -class WorkflowTest(ExtendedTestCase): - - def test_workflow(self): - with TestAreaContext("python/job_queue/workflow") as work_area: - WorkflowCommon.createExternalDumpJob() - - joblist = WorkflowJoblist() - self.assertTrue(joblist.addJobFromFile("DUMP", "dump_job")) - - with self.assertRaises(UserWarning): - joblist.addJobFromFile("KNOCK", "knock_job") - - self.assertTrue("DUMP" in joblist) - - - workflow = Workflow("dump_workflow", joblist) - - self.assertEqual(len(workflow), 2) - - job, args = workflow[0] - self.assertEqual(job, joblist["DUMP"]) - self.assertEqual(args[0], "dump1") - self.assertEqual(args[1], "dump_text_1") - - job, args = workflow[1] - self.assertEqual(job, joblist["DUMP"]) - - - def test_workflow_run(self): - with TestAreaContext("python/job_queue/workflow") as work_area: - WorkflowCommon.createExternalDumpJob() - - joblist = WorkflowJoblist() - self.assertTrue(joblist.addJobFromFile("DUMP", "dump_job")) - self.assertTrue("DUMP" in joblist) - - workflow = Workflow("dump_workflow", joblist) - - self.assertTrue(len(workflow), 2) - - context = SubstitutionList() - context.addItem("", "text") - - self.assertTrue(workflow.run(None, verbose=True, context=context)) - - with open("dump1", "r") as f: - self.assertEqual(f.read(), "dump_text_1") - - with open("dump2", "r") as f: - self.assertEqual(f.read(), "dump_text_2") diff --git a/ThirdParty/Ert/python/tests/ert/job_queue/test_workflow_job.py b/ThirdParty/Ert/python/tests/ert/job_queue/test_workflow_job.py deleted file mode 100644 index 51623aeb27..0000000000 --- a/ThirdParty/Ert/python/tests/ert/job_queue/test_workflow_job.py +++ /dev/null @@ -1,96 +0,0 @@ -import ert -from cwrap import CWrapper -from ert.job_queue import WorkflowJob -from ert.test import TestAreaContext, ExtendedTestCase -from .workflow_common import WorkflowCommon - -test_lib = ert.load("libjob_queue") # create a local namespace -cwrapper = CWrapper(test_lib) - -alloc_config = cwrapper.prototype("c_void_p workflow_job_alloc_config()") -alloc_from_file = cwrapper.prototype("workflow_job_obj workflow_job_config_alloc(char*, c_void_p, char*)") - -class WorkflowJobTest(ExtendedTestCase): - - def test_workflow_job_creation(self): - workflow_job = WorkflowJob("Test") - - self.assertTrue(workflow_job.isInternal()) - self.assertEqual(workflow_job.name(), "Test") - - - def test_read_internal_function(self): - with TestAreaContext("python/job_queue/workflow_job") as work_area: - WorkflowCommon.createInternalFunctionJob() - WorkflowCommon.createErtScriptsJob() - - config = alloc_config() - workflow_job = alloc_from_file("SELECT_CASE", config, "select_case_job") - - self.assertEqual(workflow_job.name(), "SELECT_CASE") - self.assertTrue(workflow_job.isInternal()) - self.assertEqual(workflow_job.functionName(), "enkf_main_select_case_JOB") - - self.assertFalse(workflow_job.isInternalScript()) - self.assertIsNone(workflow_job.getInternalScriptPath()) - - - workflow_job = alloc_from_file("SUBTRACT", config, "subtract_script_job") - self.assertEqual(workflow_job.name(), "SUBTRACT") - self.assertTrue(workflow_job.isInternal()) - self.assertIsNone(workflow_job.functionName()) - - self.assertTrue(workflow_job.isInternalScript()) - self.assertTrue(workflow_job.getInternalScriptPath().endswith("subtract_script.py")) - - - - def test_arguments(self): - with TestAreaContext("python/job_queue/workflow_job") as work_area: - WorkflowCommon.createInternalFunctionJob() - - config = alloc_config() - job = alloc_from_file("PRINTF", config, "printf_job") - - self.assertEqual(job.minimumArgumentCount(), 4) - self.assertEqual(job.maximumArgumentCount(), 5) - self.assertEqual(job.argumentTypes(), [str, int, float, bool, str]) - - self.assertTrue(job.run(None, ["x %d %f %d", 1, 2.5, True])) - self.assertTrue(job.run(None, ["x %d %f %d %s", 1, 2.5, True, "y"])) - - with self.assertRaises(UserWarning): # Too few arguments - job.run(None, ["x %d %f", 1, 2.5]) - - with self.assertRaises(UserWarning): # Too many arguments - job.run(None, ["x %d %f %d %s", 1, 2.5, True, "y", "nada"]) - - - def test_run_external_job(self): - - with TestAreaContext("python/job_queue/workflow_job") as work_area: - WorkflowCommon.createExternalDumpJob() - - config = alloc_config() - job = alloc_from_file("DUMP", config, "dump_job") - - self.assertFalse(job.isInternal()) - argTypes = job.argumentTypes() - self.assertEqual( argTypes , [str , str] ) - self.assertIsNone(job.run(None, ["test", "text"])) - - with open("test", "r") as f: - self.assertEqual(f.read(), "text") - - - def test_run_internal_script(self): - with TestAreaContext("python/job_queue/workflow_job") as work_area: - WorkflowCommon.createErtScriptsJob() - - config = alloc_config() - job = alloc_from_file("SUBTRACT", config, "subtract_script_job") - - result = job.run(None, ["1", "2"]) - - self.assertEqual(result, -1) - diff --git a/ThirdParty/Ert/python/tests/ert/job_queue/test_workflow_joblist.py b/ThirdParty/Ert/python/tests/ert/job_queue/test_workflow_joblist.py deleted file mode 100644 index a8a8a83db1..0000000000 --- a/ThirdParty/Ert/python/tests/ert/job_queue/test_workflow_joblist.py +++ /dev/null @@ -1,42 +0,0 @@ -from ert.job_queue import WorkflowJoblist, WorkflowJob -from ert.test import ExtendedTestCase, TestAreaContext -from .workflow_common import WorkflowCommon - - -class WorkflowJoblistTest(ExtendedTestCase): - - def test_workflow_joblist_creation(self): - joblist = WorkflowJoblist() - - job = WorkflowJob("JOB1") - - joblist.addJob(job) - - self.assertTrue(job in joblist) - self.assertTrue("JOB1" in joblist) - - job_ref = joblist["JOB1"] - - self.assertEqual(job.name(), job_ref.name()) - - - - def test_workflow_joblist_with_files(self): - with TestAreaContext("python/job_queue/workflow_joblist") as work_area: - WorkflowCommon.createErtScriptsJob() - WorkflowCommon.createExternalDumpJob() - WorkflowCommon.createInternalFunctionJob() - - joblist = WorkflowJoblist() - - joblist.addJobFromFile("DUMP_JOB", "dump_job") - joblist.addJobFromFile("SELECT_CASE_JOB", "select_case_job") - joblist.addJobFromFile("SUBTRACT_SCRIPT_JOB", "subtract_script_job") - - self.assertTrue("DUMP_JOB" in joblist) - self.assertTrue("SELECT_CASE_JOB" in joblist) - self.assertTrue("SUBTRACT_SCRIPT_JOB" in joblist) - - self.assertFalse((joblist["DUMP_JOB"]).isInternal()) - self.assertTrue((joblist["SELECT_CASE_JOB"]).isInternal()) - self.assertTrue((joblist["SUBTRACT_SCRIPT_JOB"]).isInternal()) diff --git a/ThirdParty/Ert/python/tests/ert/job_queue/test_workflow_runner.py b/ThirdParty/Ert/python/tests/ert/job_queue/test_workflow_runner.py deleted file mode 100644 index e45a084ed1..0000000000 --- a/ThirdParty/Ert/python/tests/ert/job_queue/test_workflow_runner.py +++ /dev/null @@ -1,128 +0,0 @@ -import os -import time -from ert.job_queue import WorkflowJoblist, Workflow, WorkflowRunner -from ert.test import TestAreaContext, ExtendedTestCase -from ert.util.substitution_list import SubstitutionList -from .workflow_common import WorkflowCommon - - -class WorkflowRunnerTest(ExtendedTestCase): - - def test_workflow_thread_cancel_ert_script(self): - with TestAreaContext("python/job_queue/workflow_runner_ert_script") as work_area: - WorkflowCommon.createWaitJob() - - joblist = WorkflowJoblist() - self.assertTrue(joblist.addJobFromFile("WAIT", "wait_job")) - self.assertTrue("WAIT" in joblist) - - workflow = Workflow("wait_workflow", joblist) - - self.assertEqual(len(workflow), 3) - - - workflow_runner = WorkflowRunner(workflow) - - self.assertFalse(workflow_runner.isRunning()) - - workflow_runner.run() - - self.assertIsNone(workflow_runner.workflowResult()) - - time.sleep(1) # wait for workflow to start - self.assertTrue(workflow_runner.isRunning()) - self.assertFileExists("wait_started_0") - - time.sleep(1) # wait for first job to finish - - workflow_runner.cancel() - time.sleep(1) # wait for cancel to take effect - self.assertFileExists("wait_finished_0") - - - self.assertFileExists("wait_started_1") - self.assertFileExists("wait_cancelled_1") - self.assertFileDoesNotExist("wait_finished_1") - - self.assertTrue(workflow_runner.isCancelled()) - - workflow_runner.wait() # wait for runner to complete - - self.assertFileDoesNotExist("wait_started_2") - self.assertFileDoesNotExist("wait_cancelled_2") - self.assertFileDoesNotExist("wait_finished_2") - - - - - def test_workflow_thread_cancel_external(self): - with TestAreaContext("python/job_queue/workflow_runner_external") as work_area: - WorkflowCommon.createWaitJob() - - joblist = WorkflowJoblist() - self.assertTrue(joblist.addJobFromFile("WAIT", "external_wait_job")) - self.assertTrue("WAIT" in joblist) - - workflow = Workflow("wait_workflow", joblist) - - self.assertEqual(len(workflow), 3) - - - workflow_runner = WorkflowRunner(workflow, ert=None, context=SubstitutionList()) - - self.assertFalse(workflow_runner.isRunning()) - - workflow_runner.run() - - time.sleep(1) # wait for workflow to start - self.assertTrue(workflow_runner.isRunning()) - self.assertFileExists("wait_started_0") - - time.sleep(1) # wait for first job to finish - - workflow_runner.cancel() - time.sleep(1) # wait for cancel to take effect - self.assertFileExists("wait_finished_0") - - self.assertFileExists("wait_started_1") - self.assertFileDoesNotExist("wait_finished_1") - - self.assertTrue(workflow_runner.isCancelled()) - - workflow_runner.wait() # wait for runner to complete - - self.assertFileDoesNotExist("wait_started_2") - self.assertFileDoesNotExist("wait_cancelled_2") - self.assertFileDoesNotExist("wait_finished_2") - - - def test_workflow_success(self): - with TestAreaContext("python/job_queue/workflow_runner_fast") as work_area: - WorkflowCommon.createWaitJob() - - joblist = WorkflowJoblist() - self.assertTrue(joblist.addJobFromFile("WAIT", "wait_job")) - self.assertTrue(joblist.addJobFromFile("EXTERNAL_WAIT", "external_wait_job")) - - workflow = Workflow("fast_wait_workflow", joblist) - - self.assertEqual(len(workflow), 2) - - - workflow_runner = WorkflowRunner(workflow, ert=None, context=SubstitutionList()) - - self.assertFalse(workflow_runner.isRunning()) - - workflow_runner.run() - time.sleep(1) # wait for workflow to start - workflow_runner.wait() - - self.assertFileExists("wait_started_0") - self.assertFileDoesNotExist("wait_cancelled_0") - self.assertFileExists("wait_finished_0") - - self.assertFileExists("wait_started_1") - self.assertFileDoesNotExist("wait_cancelled_1") - self.assertFileExists("wait_finished_1") - - self.assertTrue(workflow_runner.workflowResult()) diff --git a/ThirdParty/Ert/python/tests/ert/job_queue/workflow_common.py b/ThirdParty/Ert/python/tests/ert/job_queue/workflow_common.py deleted file mode 100644 index 564c934ebc..0000000000 --- a/ThirdParty/Ert/python/tests/ert/job_queue/workflow_common.py +++ /dev/null @@ -1,140 +0,0 @@ -import os -import stat - -class WorkflowCommon(object): - - @staticmethod - def createExternalDumpJob(): - with open("dump_job", "w") as f: - f.write("INTERNAL FALSE\n") - f.write("EXECUTABLE dump.py\n") - f.write("MIN_ARG 2\n") - f.write("MAX_ARG 2\n") - f.write("ARG_TYPE 0 STRING\n") - - - with open("dump.py", "w") as f: - f.write("#!/usr/bin/env python\n") - f.write("import sys\n") - f.write("f = open('%s' % sys.argv[1], 'w')\n") - f.write("f.write('%s' % sys.argv[2])\n") - f.write("f.close()\n") - - st = os.stat("dump.py") - os.chmod("dump.py", st.st_mode | stat.S_IEXEC) # | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH - - with open("dump_workflow", "w") as f: - f.write("DUMP dump1 dump_text_1\n") - f.write("DUMP dump2 dump__2\n") - - - @staticmethod - def createInternalFunctionJob(): - with open("select_case_job", "w") as f: - f.write("INTERNAL True\n") - f.write("FUNCTION enkf_main_select_case_JOB\n") - f.write("MIN_ARG 1\n") - f.write("MAX_ARG 1\n") - f.write("ARG_TYPE 0 STRING\n") - - with open("printf_job", "w") as f: - f.write("INTERNAL True\n") - f.write("FUNCTION printf\n") - f.write("MIN_ARG 4\n") - f.write("MAX_ARG 5\n") - f.write("ARG_TYPE 0 STRING\n") - f.write("ARG_TYPE 1 INT\n") - f.write("ARG_TYPE 2 FLOAT\n") - f.write("ARG_TYPE 3 BOOL\n") - f.write("ARG_TYPE 4 STRING\n") - - - with open("compare_job", "w") as f: - f.write("INTERNAL True\n") - f.write("FUNCTION strcmp\n") - f.write("MIN_ARG 2\n") - f.write("MAX_ARG 2\n") - f.write("ARG_TYPE 0 STRING\n") - f.write("ARG_TYPE 1 STRING\n") - - - @staticmethod - def createErtScriptsJob(): - with open("subtract_script.py", "w") as f: - f.write("from ert.job_queue import ErtScript\n") - f.write("\n") - f.write("class SubtractScript(ErtScript):\n") - f.write(" def run(self, arg1, arg2):\n") - f.write(" return arg1 - arg2\n") - - - with open("subtract_script_job", "w") as f: - f.write("INTERNAL True\n") - f.write("SCRIPT subtract_script.py\n") - f.write("MIN_ARG 2\n") - f.write("MAX_ARG 2\n") - f.write("ARG_TYPE 0 FLOAT\n") - f.write("ARG_TYPE 1 FLOAT\n") - - - @staticmethod - def createWaitJob(): - with open("wait_job.py", "w") as f: - f.write("from ert.job_queue import ErtScript\n") - f.write("import time\n") - f.write("\n") - f.write("class WaitScript(ErtScript):\n") - f.write(" def dump(self, filename, content):\n") - f.write(" with open(filename, 'w') as f:\n") - f.write(" f.write(content)\n") - f.write("\n") - f.write(" def run(self, number, wait_time):\n") - f.write(" self.dump('wait_started_%d' % number, 'text')\n") - f.write(" start = time.time()\n") - f.write(" diff = 0\n") - f.write(" while not self.isCancelled() and diff < wait_time: \n") - f.write(" time.sleep(0.2)\n") - f.write(" diff = time.time() - start\n") - f.write("\n") - f.write(" if self.isCancelled():\n") - f.write(" self.dump('wait_cancelled_%d' % number, 'text')\n") - f.write(" else:\n") - f.write(" self.dump('wait_finished_%d' % number, 'text')\n") - f.write("\n") - f.write(" return None\n") - - - with open("external_wait_job.sh", "w") as f: - f.write("#!/usr/bin/env bash\n") - f.write("echo \"text\" > wait_started_$1\n") - f.write("sleep $2\n") - f.write("echo \"text\" > wait_finished_$1\n") - - st = os.stat("external_wait_job.sh") - os.chmod("external_wait_job.sh", st.st_mode | stat.S_IEXEC) # | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH - - with open("wait_job", "w") as f: - f.write("INTERNAL True\n") - f.write("SCRIPT wait_job.py\n") - f.write("MIN_ARG 2\n") - f.write("MAX_ARG 2\n") - f.write("ARG_TYPE 0 INT\n") - f.write("ARG_TYPE 1 INT\n") - - with open("external_wait_job", "w") as f: - f.write("INTERNAL False\n") - f.write("EXECUTABLE external_wait_job.sh\n") - f.write("MIN_ARG 2\n") - f.write("MAX_ARG 2\n") - f.write("ARG_TYPE 0 INT\n") - f.write("ARG_TYPE 1 INT\n") - - - with open("wait_workflow", "w") as f: - f.write("WAIT 0 1\n") - f.write("WAIT 1 10\n") - f.write("WAIT 2 1\n") - - with open("fast_wait_workflow", "w") as f: - f.write("WAIT 0 1\n") - f.write("EXTERNAL_WAIT 1 1\n") diff --git a/ThirdParty/Ert/python/tests/ert/run/CMakeLists.txt b/ThirdParty/Ert/python/tests/ert/run/CMakeLists.txt deleted file mode 100644 index 01114973d2..0000000000 --- a/ThirdParty/Ert/python/tests/ert/run/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -set(TEST_SOURCES - __init__.py - test_run.py -) - -add_python_package("python.tests.ert.run" ${PYTHON_INSTALL_PREFIX}/tests/ert/run "${TEST_SOURCES}" False) - -addPythonTest(ert.test_run tests.ert.run.test_run.RunTest ) \ No newline at end of file diff --git a/ThirdParty/Ert/python/tests/ert/run/__init__.py b/ThirdParty/Ert/python/tests/ert/run/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/python/tests/ert/run/test_run.py b/ThirdParty/Ert/python/tests/ert/run/test_run.py deleted file mode 100644 index c5c76ea85d..0000000000 --- a/ThirdParty/Ert/python/tests/ert/run/test_run.py +++ /dev/null @@ -1,67 +0,0 @@ -from ert.test import TestRun , path_exists , ExtendedTestCase - - - -class RunTest(ExtendedTestCase): - def setUp(self): - self.testConfig = self.createTestPath("local/run/config.txt") - - def test_init(self): - with self.assertRaises(IOError): - TestRun("Does/notExist") - - tr = TestRun(self.testConfig) - self.assertEqual( tr.config_file , "config.txt") - self.assertEqual(tr.ert_version , "stable") - - - def test_args(self): - tr = TestRun(self.testConfig , args=["-v" , "latest"]) - self.assertEqual(tr.ert_version , "latest") - - - def test_cmd(self): - tr = TestRun(self.testConfig) - self.assertEqual( tr.ert_cmd , TestRun.default_ert_cmd ) - - tr.ert_cmd = "/tmp/test" - self.assertEqual( "/tmp/test" , tr.ert_cmd ) - - - def test_args2(self): - tr = TestRun(self.testConfig , args = ["arg1","arg2","-v","latest"]) - self.assertEqual( tr.get_args() , ["arg1","arg2"]) - self.assertEqual(tr.ert_version , "latest") - - - def test_workflows(self): - tr = TestRun(self.testConfig) - self.assertEqual( tr.get_workflows() , []) - - tr.add_workflow( "wf1" ) - tr.add_workflow( "wf2" ) - self.assertEqual( tr.get_workflows() , ["wf1" , "wf2"]) - - - def test_run_no_workflow(self): - tr = TestRun(self.testConfig) - with self.assertRaises(Exception): - tr.run() - - - - - def test_runpath(self): - tr = TestRun(self.testConfig , "Name") - self.assertEqual( TestRun.default_path_prefix , tr.path_prefix ) - - - def test_check(self): - tr = TestRun(self.testConfig , "Name") - tr.add_check( path_exists , "some/file" ) - - with self.assertRaises(Exception): - tr.add_check( 25 , "arg") - - with self.assertRaises(Exception): - tr.add_check( func_does_not_exist , "arg") diff --git a/ThirdParty/Ert/python/tests/ert/sched/CMakeLists.txt b/ThirdParty/Ert/python/tests/ert/sched/CMakeLists.txt deleted file mode 100644 index 3a0156b288..0000000000 --- a/ThirdParty/Ert/python/tests/ert/sched/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -set(TEST_SOURCES - __init__.py - test_sched.py -) - -add_python_package("python.tests.ert.sched" ${PYTHON_INSTALL_PREFIX}/tests/ert/sched "${TEST_SOURCES}" False) - -if (STATOIL_TESTDATA_ROOT) - addPythonTest(ert.sched.sched tests.ert.sched.test_sched.SchedFileTest LABELS StatoilData) -endif() \ No newline at end of file diff --git a/ThirdParty/Ert/python/tests/ert/sched/__init__.py b/ThirdParty/Ert/python/tests/ert/sched/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/python/tests/ert/sched/test_sched.py b/ThirdParty/Ert/python/tests/ert/sched/test_sched.py deleted file mode 100644 index 9e803d1073..0000000000 --- a/ThirdParty/Ert/python/tests/ert/sched/test_sched.py +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env python -# Copyright (C) 2012 Statoil ASA, Norway. -# -# The file 'test_sched.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. -import datetime -import os -from ert.sched import SchedFile -from ert.test import ExtendedTestCase - - - - -class SchedFileTest(ExtendedTestCase): - def setUp(self): - src_file = self.createTestPath("Statoil/ECLIPSE/Gurbat/target.SCH") - self.start_time = datetime.date(2000, 1, 1) - - self.sched_file = SchedFile(src_file, self.start_time) - self.file_list = [] - - def test_missing(self): - with self.assertRaises(IOError): - SchedFile("/does/not/exist", datetime.date(2000 , 1 , 1)) - - - def addFile( self, filename ): - self.file_list.append(filename) - - def tearDown(self): - for f in self.file_list: - if os.path.exists(f): - os.unlink(f) - - def test_load(self): - self.assertTrue(self.sched_file, "Load failed") - - - def test_length(self): - self.assertEqual(self.sched_file.length, 63) - - - def test_write_loop(self): - self.sched_file.write("/tmp/schedule1", 62) - sched_file2 = SchedFile("/tmp/schedule1", self.start_time) - sched_file2.write("/tmp/schedule2", 62) - self.assertFilesAreEqual("/tmp/schedule1", "/tmp/schedule2") - - self.addFile("/tmp/schedule1") - self.addFile("/tmp/schedule2") diff --git a/ThirdParty/Ert/python/tests/ert/server/CMakeLists.txt b/ThirdParty/Ert/python/tests/ert/server/CMakeLists.txt deleted file mode 100644 index d34a452814..0000000000 --- a/ThirdParty/Ert/python/tests/ert/server/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -set(TEST_SOURCES - __init__.py - test_simulation_context.py - test_rpc_service.py - test_rpc_storage.py -) - -add_python_package("python.tests.ert.server" ${PYTHON_INSTALL_PREFIX}/tests/ert/server "${TEST_SOURCES}" False) - -addPythonTest(ert.server.simulation_context tests.ert.server.test_simulation_context.SimulationContextTest) -addPythonTest(ert.server.rpc_service tests.ert.server.test_rpc_service.RPCServiceTest) -addPythonTest(ert.server.rpc_storage tests.ert.server.test_rpc_storage.RPCStorageTest) \ No newline at end of file diff --git a/ThirdParty/Ert/python/tests/ert/server/__init__.py b/ThirdParty/Ert/python/tests/ert/server/__init__.py deleted file mode 100644 index 9171f9677e..0000000000 --- a/ThirdParty/Ert/python/tests/ert/server/__init__.py +++ /dev/null @@ -1,43 +0,0 @@ -from threading import Thread - -from ert.enkf import EnkfFsManager, EnkfFs, EnkfVarType -from ert.server import ErtRPCServer -from ert.test import ErtTest - - -def initializeCase(ert, name, size): - """ - @type ert: ert.enkf.enkf_main.EnKFMain - @type name: str - @type size: int - @rtype: - """ - current_fs = ert.getEnkfFsManager().getCurrentFileSystem() - fs = ert.getEnkfFsManager().getFileSystem(name) - ert.getEnkfFsManager().switchFileSystem(fs) - parameters = ert.ensembleConfig().getKeylistFromVarType(EnkfVarType.PARAMETER) - ert.getEnkfFsManager().initializeFromScratch(parameters, 0, size - 1) - - ert.getEnkfFsManager().switchFileSystem(current_fs) - return fs - - - -class RPCServiceContext(object): - def __init__(self, test_name, model_config, store_area=False): - self._test_context = ErtTest(test_name, model_config, store_area=store_area) - self._server = ErtRPCServer(self._test_context.getErt()) - - def __enter__(self): - """ @rtype: ErtRPCServer""" - thread = Thread(name="ErtRPCServerTest") - thread.run = self._server.start - thread.start() - - return self._server - - def __exit__(self, exc_type, exc_val, exc_tb): - self._server.stop() - del self._server - del self._test_context - return False \ No newline at end of file diff --git a/ThirdParty/Ert/python/tests/ert/server/test_rpc_service.py b/ThirdParty/Ert/python/tests/ert/server/test_rpc_service.py deleted file mode 100644 index 58d8283caf..0000000000 --- a/ThirdParty/Ert/python/tests/ert/server/test_rpc_service.py +++ /dev/null @@ -1,186 +0,0 @@ -import datetime -import os -import time -from threading import Thread - -from ert import Version -from ert.enkf import EnKFMain -from ert.enkf.enums import RealizationStateEnum -from ert.server import ErtRPCServer, ErtRPCClient -from ert.test import ErtTestContext, ExtendedTestCase, ErtTest -from tests.ert.server import RPCServiceContext - - -def realizationIsInitialized(ert, case_name, realization_number): - assert isinstance(ert, EnKFMain) - fs = ert.getEnkfFsManager().getFileSystem(case_name) - state_map = fs.getStateMap() - state = state_map[realization_number] - return state == RealizationStateEnum.STATE_INITIALIZED or state == RealizationStateEnum.STATE_HAS_DATA - - -class RPCServiceTest(ExtendedTestCase): - def setUp(self): - self.config = self.createTestPath("local/snake_oil_no_data/snake_oil.ert") - - def test_server_creation(self): - with ErtTestContext("ert/server/rpc/server", self.config) as test_context: - ert = test_context.getErt() - server = ErtRPCServer(ert) - - self.assertIsNotNone(server.port) - self.assertEqual(ert, server._config) - self.assertEqual(os.path.basename(self.config), server._config_file) - - thread = Thread(name="ErtRPCServerTest") - thread.run = server.start - thread.start() - - server.stop() - - def test_client_interaction(self): - target_case_names = ["batch_1", ".batch_1", "batch_1", ".batch_1"] - kw = [ - {"SNAKE_OIL_PARAM": [0.50, 6, 1.750, 0.250, 0.990, 2, 1.770, 0.330, 0.550, 0.770]}, - {"SNAKE_OIL_PARAM": [0.51, 7, 1.751, 0.251, 0.991, 3, 1.771, 0.331, 0.551, 0.771]}, - {"SNAKE_OIL_PARAM": [0.52, 8, 1.752, 0.252, 0.992, 4, 1.772, 0.332, 0.552, 0.772]}, - {"SNAKE_OIL_PARAM": [0.53, 9, 1.753, 0.253, 0.993, 5, 1.773, 0.333, 0.553, 0.773]} - ] - - expected_state_map = { - "batch_1": [RealizationStateEnum.STATE_HAS_DATA, - RealizationStateEnum.STATE_UNDEFINED, - RealizationStateEnum.STATE_HAS_DATA - ], - - ".batch_1": [RealizationStateEnum.STATE_UNDEFINED, - RealizationStateEnum.STATE_HAS_DATA, - RealizationStateEnum.STATE_UNDEFINED, - RealizationStateEnum.STATE_HAS_DATA - ] - } - - expected_custom_kw = [ - {'RATING': 'EXCELLENT', 'NPV': 125692.534209}, - {'RATING': 'AVERAGE', 'NPV': 87423.5773042}, - {'RATING': 'GOOD', 'NPV': 113243.319848}, - {'RATING': 'AVERAGE', 'NPV': 91781.8557083} - ] - - with RPCServiceContext("ert/server/rpc/client", self.config) as server: - client = ErtRPCClient("localhost", server.port) - self.assertEqual(Version.currentVersion().versionTuple(), client.ertVersion()) - realization_count = len(target_case_names) - - client.startSimulationBatch("default", realization_count) - - self.assertTrue(server.isInitializationCaseAvailable()) - self.assertTrue(server.isRunning()) - - - for iens in range(realization_count): - client.addSimulation(target_case_names[iens], geo_id=0, pert_id=0, sim_id=iens, keywords=kw[iens]) - self.assertTrue(realizationIsInitialized(server.ert, target_case_names[iens], iens)) - - while client.isRunning(): - time.sleep(1) - - for case in expected_state_map: - fs = server.ert.getEnkfFsManager().getFileSystem(case) - state_map = fs.getStateMap() - states = expected_state_map[case] - - for index, state in enumerate(states): - self.assertEqual(state, state_map[index]) - - time_map = client.getTimeMap("batch_1") - self.assertEqual(datetime.datetime(2010, 1, 1), time_map[0]) - self.assertEqual(datetime.datetime(2015, 6, 13), time_map[199]) - - with self.assertRaises(KeyError): - client.getGenDataResult(target_case_names[0], 0, 199, "UNKNOWN_KEYWORD") - - for iens, case in enumerate(target_case_names): - self.assertTrue(client.isRealizationFinished(iens)) - self.assertTrue(client.didRealizationSucceed(iens)) - self.assertFalse(client.didRealizationFail(iens)) - - self.assertTrue(client.isCustomKWKey("SNAKE_OIL_NPV")) - self.assertFalse(client.isGenDataKey("SNAKE_OIL_NPV")) - self.assertTrue(client.isGenDataKey("SNAKE_OIL_OPR_DIFF")) - - result = client.getGenDataResult(case, iens, 199, "SNAKE_OIL_OPR_DIFF") - self.assertEqual(len(result), 2000) - - result = client.getCustomKWResult(case, iens, "SNAKE_OIL_NPV") - self.assertTrue("NPV" in result) - self.assertTrue("RATING" in result) - self.assertEqual(expected_custom_kw[iens]["RATING"], result["RATING"]) - self.assertAlmostEqual(expected_custom_kw[iens]["NPV"], result["NPV"]) - - - def test_multiple_threads(self): - expected_ckw = { - 0:{'RATING': 'EXCELLENT', 'NPV': 125692.534209}, - 1:{'RATING': 'AVERAGE', 'NPV': 87384.4316741}, - 2:{'RATING': 'GOOD', 'NPV': 113181.024141}, - 3:{'RATING': 'AVERAGE', 'NPV': 91659.8650599}, - 4:{'RATING': 'EXCELLENT', 'NPV': 134891.570703}, - 5:{'RATING': 'GOOD', 'NPV': 117270.977546}, - 6:{'RATING': 'GOOD', 'NPV': 106838.28455}, - 7:{'RATING': 'EXCELLENT', 'NPV': 144001.339}, - 8:{'RATING': 'AVERAGE', 'NPV': 95423.9155004}, - 9:{'RATING': 'AVERAGE', 'NPV': 96123.0227439} - } - - with RPCServiceContext("ert/server/rpc/multi_client", self.config, store_area=True) as server: - client_count = len(expected_ckw) - - # initializeCase(server.ert, "default", 1) - thread_success_state = {} - - def createClientInteractor(target_case_name, iens): - def clientInteraction(): - thread_success_state[iens] = False - keywords = {"SNAKE_OIL_PARAM": [0.50, iens + 2, 1.750, 0.250, 0.990, 2 + client_count - iens, 1.770, 0.330, 0.550, 0.770]} - client = ErtRPCClient("localhost", server.port) - client.startSimulationBatch("default", client_count) - - self.assertTrue(client.isRunning()) - self.assertTrue(client.isInitializationCaseAvailable()) - - client.addSimulation(target_case_name, 0, 0, iens, keywords) - self.assertTrue(realizationIsInitialized(server.ert, target_case_name, iens)) - - while not client.isRealizationFinished(iens): - time.sleep(0.5) - - self.assertTrue(client.didRealizationSucceed(iens)) - - result = client.getCustomKWResult(target_case_name, iens, "SNAKE_OIL_NPV") - self.assertTrue("NPV" in result) - self.assertTrue("RATING" in result) - self.assertEqual(expected_ckw[iens]["RATING"], result["RATING"]) - self.assertAlmostEqual(expected_ckw[iens]["NPV"], result["NPV"]) - - thread_success_state[iens] = True - - return clientInteraction - - threads = [] - for iens in range(client_count): - thread = Thread(name="client_%d" % iens) - target_case_name = "target" if iens % 2 == 0 else ".target" - thread.run = createClientInteractor(target_case_name, iens) - threads.append(thread) - - for thread in threads: - thread.start() - - while server.isRunning(): - time.sleep(0.1) - - for thread in threads: - thread.join() - - self.assertTrue(all(success for success in thread_success_state.values())) diff --git a/ThirdParty/Ert/python/tests/ert/server/test_rpc_storage.py b/ThirdParty/Ert/python/tests/ert/server/test_rpc_storage.py deleted file mode 100644 index f15ce7845c..0000000000 --- a/ThirdParty/Ert/python/tests/ert/server/test_rpc_storage.py +++ /dev/null @@ -1,124 +0,0 @@ -from itertools import product -from random import random - -import time - -from ert.enkf.enums import ErtImplType -from ert.enkf.export.custom_kw_collector import CustomKWCollector -from ert.server import ErtRPCClient -from ert.test import ExtendedTestCase -from tests.ert.server import RPCServiceContext, initializeCase - - -class RPCStorageTest(ExtendedTestCase): - def test_rpc_storage(self): - config = self.createTestPath("local/snake_oil_no_data/snake_oil.ert") - - with RPCServiceContext("ert/server/rpc_storage/storage", config) as server: - client = ErtRPCClient("localhost", server.port) - - group_name = "Test" - storage_definition = { - "PI": float, - "DakotaVersion": str, - "Gradient": float, - "GradientDirection": str - } - client.prototypeStorage(group_name, storage_definition) - - with self.assertRaises(UserWarning): - client.prototypeStorage(group_name, {"value": float}) - - with self.assertRaises(TypeError): - client.prototypeStorage(group_name, {"value": bool}) - - - ensemble_config = server.ert.ensembleConfig() - - self.assertIn(group_name, ensemble_config.getKeylistFromImplType(ErtImplType.CUSTOM_KW)) - - custom_kw_config = ensemble_config.getNode(group_name).getCustomKeywordModelConfig() - - self.assertIn("PI", custom_kw_config) - self.assertTrue(custom_kw_config.keyIsDouble("PI")) - - self.assertIn("DakotaVersion", custom_kw_config) - self.assertFalse(custom_kw_config.keyIsDouble("DakotaVersion")) - - self.assertIn("Gradient", custom_kw_config) - self.assertTrue(custom_kw_config.keyIsDouble("Gradient")) - - self.assertIn("GradientDirection", custom_kw_config) - self.assertFalse(custom_kw_config.keyIsDouble("GradientDirection")) - - - simulation_count = 10 - initializeCase(server.ert, "default", simulation_count) - - client.storeGlobalData("default", group_name, "PI", 3.1415) - client.storeGlobalData("default", group_name, "DakotaVersion", "DAKOTA 6.2.0") - - gradients = [random() * 20.0 - 10.0 for _ in range(simulation_count)] - gradient_directions = [("POSITIVE" if gradient >= 0.0 else "NEGATIVE") for gradient in gradients] - for sim_id in range(simulation_count): - gradient = gradients[sim_id] - gradient_direction = gradient_directions[sim_id] - client.storeSimulationData("default", group_name, "Gradient", gradient, sim_id) - client.storeSimulationData("default", group_name, "GradientDirection", gradient_direction, sim_id) - - - data = CustomKWCollector.loadAllCustomKWData(server.ert, "default") - for sim_id in range(simulation_count): - self.assertEqual(data["Test:PI"][sim_id], 3.1415) - self.assertEqual(data["Test:DakotaVersion"][sim_id], "DAKOTA 6.2.0") - self.assertEqual(data["Test:Gradient"][sim_id], gradients[sim_id]) - self.assertEqual(data["Test:GradientDirection"][sim_id], gradient_directions[sim_id]) - - - def test_rpc_storage_with_simulation(self): - config = self.createTestPath("local/snake_oil_no_data/snake_oil.ert") - - with RPCServiceContext("ert/server/rpc_storage/simulation_and_storage", config, store_area=True) as server: - client = ErtRPCClient("localhost", server.port) - realization_count = 2 - - client.prototypeStorage("SNAKEX", {"SNAKE_ID": float, "SNAKE_RUN": str}) - - batch_names = ["test_run_0", "test_run_1"] - - for batch_id, batch_name in enumerate(batch_names): - self.runSimulation(client, realization_count, batch_id, batch_name) - - for (batch_id, batch_name), iens in product(enumerate(batch_names), range(realization_count)): - result = client.getCustomKWResult(batch_name, iens, "SNAKEX") - self.assertEqual(result["SNAKE_RUN"], "batch_%d" % batch_id) - snake_id = realization_count * batch_id + iens - self.assertEqual(result["SNAKE_ID"], snake_id) - - - - def runSimulation(self, client, realization_count, batch_id, batch_name): - client.startSimulationBatch("default", 2) - kw = {"SNAKE_OIL_PARAM": [0.50, 6, 1.750, 0.250, 0.990, 2, 1.770, 0.330, 0.550, 0.770]} # identical runs - - for iens in range(realization_count): - client.addSimulation(batch_name, geo_id=0, pert_id=0, sim_id=iens, keywords=kw) - - while client.isRunning(): - time.sleep(0.2) - - for iens in range(realization_count): - self.assertTrue(client.didRealizationSucceed(iens)) - - - client.storeGlobalData(batch_name, "SNAKEX", "SNAKE_RUN", "batch_%d" % batch_id) - - for iens in range(realization_count): - client.storeSimulationData(batch_name, "SNAKEX", "SNAKE_ID", realization_count * batch_id + iens, iens) - - - - - - - diff --git a/ThirdParty/Ert/python/tests/ert/server/test_simulation_context.py b/ThirdParty/Ert/python/tests/ert/server/test_simulation_context.py deleted file mode 100644 index 3e443ac964..0000000000 --- a/ThirdParty/Ert/python/tests/ert/server/test_simulation_context.py +++ /dev/null @@ -1,93 +0,0 @@ -import time -import os.path -import sys - -from ert.enkf import EnkfVarType -from ert.enkf.enums import RealizationStateEnum -from ert.server import SimulationContext -from ert.test import ErtTestContext, ExtendedTestCase -from tests.ert.server import initializeCase - - -class SimulationContextTest(ExtendedTestCase): - - def setUp(self): - self.config1 = self.createTestPath("local/snake_oil_no_data/snake_oil.ert") - self.config2 = self.createTestPath("local/snake_oil_no_data/snake_oil_GEO_ID.ert") - - - def test_simulation_context(self): - with ErtTestContext("ert/server/rpc/simulation_context", self.config1) as test_context: - ert = test_context.getErt() - - size = 4 - first_half = initializeCase(ert, "first_half", size) - other_half = initializeCase(ert, "other_half", size) - - simulation_context = SimulationContext(ert, size) - - for iens in range(size): - if iens % 2 == 0: - simulation_context.addSimulation(iens, first_half) - else: - simulation_context.addSimulation(iens, other_half) - self.assertFalse(simulation_context.isRealizationFinished(iens)) - - with self.assertRaises(UserWarning): - simulation_context.addSimulation(size, first_half) - - with self.assertRaises(UserWarning): - simulation_context.addSimulation(0, first_half) - - while simulation_context.isRunning(): - time.sleep(1.0) - - self.assertEqual(simulation_context.getNumFailed(), 0) - self.assertEqual(simulation_context.getNumRunning(), 0) - self.assertEqual(simulation_context.getNumSuccess(), size) - - first_half_state_map = first_half.getStateMap() - other_half_state_map = other_half.getStateMap() - - for iens in range(size): - self.assertTrue(simulation_context.didRealizationSucceed(iens)) - self.assertFalse(simulation_context.didRealizationFail(iens)) - self.assertTrue(simulation_context.isRealizationFinished(iens)) - if iens % 2 == 0: - self.assertEqual(first_half_state_map[iens], RealizationStateEnum.STATE_HAS_DATA) - self.assertEqual(other_half_state_map[iens], RealizationStateEnum.STATE_INITIALIZED) - else: - self.assertEqual(first_half_state_map[iens], RealizationStateEnum.STATE_INITIALIZED) - self.assertEqual(other_half_state_map[iens], RealizationStateEnum.STATE_HAS_DATA) - - - def test_runpath(self): - with ErtTestContext("ert/server/rpc/simulation_context_runpath", self.config2) as test_context: - ert = test_context.getErt() - sys.stderr.write("cwd: %s \n" % os.getcwd()) - size = 10 - - fs = ert.getEnkfFsManager().getCurrentFileSystem() - parameters = ert.ensembleConfig().getKeylistFromVarType(EnkfVarType.PARAMETER) - ert.getEnkfFsManager().initializeFromScratch(parameters, 0, size - 1) - simulation_context = SimulationContext(ert, size) - - for iens in range(size): - state = ert.getRealisation(iens) - if iens % 2 == 0: - state.addSubstKeyword("GEO_ID", "EVEN") - else: - state.addSubstKeyword("GEO_ID", "ODD") - simulation_context.addSimulation(iens , fs) - - while simulation_context.isRunning(): - time.sleep(1.0) - - for iens in range(size): - if iens % 2 == 0: - path = "simulations/EVEN/realisation-%d/iter-%d" % (iens , 0) - self.assertTrue( os.path.isdir(path) ) - else: - path = "simulations/ODD/realisation-%d/iter-%d" % (iens , 0) - self.assertTrue( os.path.isdir(path) ) - diff --git a/ThirdParty/Ert/python/tests/ert/testcase/CMakeLists.txt b/ThirdParty/Ert/python/tests/ert/testcase/CMakeLists.txt deleted file mode 100644 index 328614835f..0000000000 --- a/ThirdParty/Ert/python/tests/ert/testcase/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -set(TEST_SOURCES - __init__.py - test_testcase.py - test_mini_config.py -) - -add_python_package("python.tests.ert.testcase" ${PYTHON_INSTALL_PREFIX}/tests/ert/testcase "${TEST_SOURCES}" False) - -addPythonTest(ert.testcase.testcase tests.ert.testcase.test_testcase.TestTestCase) -addPythonTest(ert.testcase.mini_config tests.ert.testcase.test_mini_config.MiniConfigTest) \ No newline at end of file diff --git a/ThirdParty/Ert/python/tests/ert/testcase/__init__.py b/ThirdParty/Ert/python/tests/ert/testcase/__init__.py deleted file mode 100644 index 5e08e797f5..0000000000 --- a/ThirdParty/Ert/python/tests/ert/testcase/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ThirdParty/Ert/python/tests/ert/testcase/test_mini_config.py b/ThirdParty/Ert/python/tests/ert/testcase/test_mini_config.py deleted file mode 100644 index 33f388578b..0000000000 --- a/ThirdParty/Ert/python/tests/ert/testcase/test_mini_config.py +++ /dev/null @@ -1,49 +0,0 @@ -from ert.enkf.enums.realization_state_enum import RealizationStateEnum -from ert.test import ErtTestContext -from ert.test.extended_testcase import ExtendedTestCase - - -class MiniConfigTest(ExtendedTestCase): - - def test_failed_realizations(self): - - # mini_fail_config has the following realization success/failures: - # - # 0 OK - # 1 GenData report step 1 missing - # 2 GenData report step 2 missing, Forward Model Component Target File not found. - # 3 GenData report step 3 missing, Forward Model Component Target File not found. - # 4 GenData report step 1 missing - # 5 GenData report step 2 missing, Forward Model Component Target File not found. - # 6 GenData report step 3 missing - # 7 Forward Model Target File not found. - # 8 OK - # 9 OK - - - config = self.createTestPath("local/custom_kw/mini_fail_config") - with ErtTestContext("python/enkf/data/custom_kw_simulated", config) as context: - ert = context.getErt() - - fs = ert.getEnkfFsManager().getCurrentFileSystem() - - realizations_list = fs.realizationList(RealizationStateEnum.STATE_HAS_DATA) - self.assertTrue(0 in realizations_list) - self.assertTrue(8 in realizations_list) - self.assertTrue(9 in realizations_list) - - realizations_list = fs.realizationList(RealizationStateEnum.STATE_LOAD_FAILURE) - self.assertTrue(1 in realizations_list) - self.assertTrue(2 in realizations_list) - self.assertTrue(3 in realizations_list) - self.assertTrue(4 in realizations_list) - self.assertTrue(5 in realizations_list) - self.assertTrue(6 in realizations_list) - self.assertTrue(7 in realizations_list) - - - - - - - diff --git a/ThirdParty/Ert/python/tests/ert/testcase/test_testcase.py b/ThirdParty/Ert/python/tests/ert/testcase/test_testcase.py deleted file mode 100644 index 6308d54264..0000000000 --- a/ThirdParty/Ert/python/tests/ert/testcase/test_testcase.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (C) 2015 Statoil ASA, Norway. -# -# The file 'test_testcase.py' is part of ERT - Ensemble based Reservoir Tool. -# -# ERT 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. -# -# ERT 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 -# for more details. - -import functools -import math -from ert.test import ExtendedTestCase - -class TestTestCase(ExtendedTestCase): - - def test_not_raises(self): - call_sin = functools.partial( math.sin , 0.5*math.pi ) - self.assertNotRaises( call_sin ) - diff --git a/ThirdParty/Ert/python/tests/geometry/CMakeLists.txt b/ThirdParty/Ert/python/tests/geometry/CMakeLists.txt new file mode 100644 index 0000000000..1795decd10 --- /dev/null +++ b/ThirdParty/Ert/python/tests/geometry/CMakeLists.txt @@ -0,0 +1,28 @@ +set(TEST_SOURCES + __init__.py + test_convex_hull.py + test_cpolyline.py + test_cpolyline_collection.py + test_geometry_tools.py + test_intersection.py + test_point_in_polygon.py + test_polygon_slicing.py + test_polyline.py + test_surface.py + test_geo_pointset.py + test_geo_region.py +) + +add_python_package("python.tests.geometry" ${PYTHON_INSTALL_PREFIX}/tests/geometry "${TEST_SOURCES}" False) + +addPythonTest(tests.geometry.test_geo_pointset.GeoPointsetTest) +addPythonTest(tests.geometry.test_geo_region.GeoRegionTest) +addPythonTest(tests.geometry.test_surface.SurfaceTest) +addPythonTest(tests.geometry.test_polyline.PolylineTest) +addPythonTest(tests.geometry.test_intersection.IntersectionTest) +addPythonTest(tests.geometry.test_convex_hull.ConvexHullTest) +addPythonTest(tests.geometry.test_point_in_polygon.PointInPolygonTest) +addPythonTest(tests.geometry.test_polygon_slicing.PolygonSlicingTest) +addPythonTest(tests.geometry.test_cpolyline.CPolylineTest) +addPythonTest(tests.geometry.test_cpolyline_collection.CPolylineCollectionTest) +addPythonTest(tests.geometry.test_geometry_tools.GeometryToolsTest ) diff --git a/ThirdParty/Ert/python/python/ert_gui/ide/completers/__init__.py b/ThirdParty/Ert/python/tests/geometry/__init__.py similarity index 100% rename from ThirdParty/Ert/python/python/ert_gui/ide/completers/__init__.py rename to ThirdParty/Ert/python/tests/geometry/__init__.py diff --git a/ThirdParty/Ert/python/tests/core/geometry/test_convex_hull.py b/ThirdParty/Ert/python/tests/geometry/test_convex_hull.py similarity index 89% rename from ThirdParty/Ert/python/tests/core/geometry/test_convex_hull.py rename to ThirdParty/Ert/python/tests/geometry/test_convex_hull.py index 395fbe5fec..e0c27305f6 100644 --- a/ThirdParty/Ert/python/tests/core/geometry/test_convex_hull.py +++ b/ThirdParty/Ert/python/tests/geometry/test_convex_hull.py @@ -1,5 +1,5 @@ -from ert.geo.geometry_tools import GeometryTools -from ert.test.extended_testcase import ExtendedTestCase +from ecl.geo.geometry_tools import GeometryTools +from ecl.test.extended_testcase import ExtendedTestCase class ConvexHullTest(ExtendedTestCase): diff --git a/ThirdParty/Ert/python/tests/core/geometry/test_cpolyline.py b/ThirdParty/Ert/python/tests/geometry/test_cpolyline.py similarity index 97% rename from ThirdParty/Ert/python/tests/core/geometry/test_cpolyline.py rename to ThirdParty/Ert/python/tests/geometry/test_cpolyline.py index cb517af936..6439f15923 100644 --- a/ThirdParty/Ert/python/tests/core/geometry/test_cpolyline.py +++ b/ThirdParty/Ert/python/tests/geometry/test_cpolyline.py @@ -1,8 +1,8 @@ import math -from ert.geo import CPolyline , Polyline -from ert.geo.xyz_io import XYZIo -from ert.test import ExtendedTestCase , TestAreaContext +from ecl.geo import CPolyline , Polyline +from ecl.geo.xyz_io import XYZIo +from ecl.test import ExtendedTestCase , TestAreaContext class CPolylineTest(ExtendedTestCase): diff --git a/ThirdParty/Ert/python/tests/core/geometry/test_cpolyline_collection.py b/ThirdParty/Ert/python/tests/geometry/test_cpolyline_collection.py similarity index 95% rename from ThirdParty/Ert/python/tests/core/geometry/test_cpolyline_collection.py rename to ThirdParty/Ert/python/tests/geometry/test_cpolyline_collection.py index 08fc345bce..11ab6a63cd 100644 --- a/ThirdParty/Ert/python/tests/core/geometry/test_cpolyline_collection.py +++ b/ThirdParty/Ert/python/tests/geometry/test_cpolyline_collection.py @@ -1,9 +1,9 @@ import gc -from ert.geo import CPolylineCollection , CPolyline -from ert.geo.xyz_io import XYZIo -from ert.test import ExtendedTestCase , TestAreaContext -from ert.util import DoubleVector +from ecl.geo import CPolylineCollection , CPolyline +from ecl.geo.xyz_io import XYZIo +from ecl.test import ExtendedTestCase , TestAreaContext +from ecl.util import DoubleVector class CPolylineCollectionTest(ExtendedTestCase): diff --git a/ThirdParty/Ert/python/tests/geometry/test_geo_pointset.py b/ThirdParty/Ert/python/tests/geometry/test_geo_pointset.py new file mode 100644 index 0000000000..1d1c423f17 --- /dev/null +++ b/ThirdParty/Ert/python/tests/geometry/test_geo_pointset.py @@ -0,0 +1,27 @@ +from ecl.geo import GeoPointset, Surface +from ecl.test import ExtendedTestCase, TestAreaContext + + +class GeoPointsetTest(ExtendedTestCase): + + def test_init(self): + gp = GeoPointset() + self.assertEqual(0, len(gp)) + + def test_repr(self): + gp = GeoPointset() + self.assertTrue(repr(gp).startswith('GeoPointset')) + + def test_from_surface(self): + srf_path = self.createTestPath("local/geometry/surface/valid_ascii.irap") + srf = Surface(srf_path) + gp = GeoPointset.fromSurface(srf) + self.assertEqual(3871, len(srf)) + self.assertEqual(len(srf), len(gp)) + + def test_getitem(self): + srf_path = self.createTestPath("local/geometry/surface/valid_ascii.irap") + srf = Surface(srf_path) + gp = GeoPointset.fromSurface(srf) + for i in (561, 1105, 1729, 2465, 2821): + self.assertEqual(gp[i], srf[i]) diff --git a/ThirdParty/Ert/python/tests/geometry/test_geo_region.py b/ThirdParty/Ert/python/tests/geometry/test_geo_region.py new file mode 100644 index 0000000000..949ced3128 --- /dev/null +++ b/ThirdParty/Ert/python/tests/geometry/test_geo_region.py @@ -0,0 +1,88 @@ +from ecl.geo import GeoRegion, GeoPointset, CPolyline, Surface +from ecl.test import ExtendedTestCase, TestAreaContext + + +class GeoRegionTest(ExtendedTestCase): + + def test_init(self): + pointset = GeoPointset() + georegion = GeoRegion(pointset) + self.assertEqual(0, len(georegion)) + + def test_repr(self): + pointset = GeoPointset() + georegion = GeoRegion(pointset) + self.assertTrue(repr(georegion).startswith('GeoRegion')) + + @staticmethod + def small_surface(): + ny,nx = 12,12 + xinc,yinc = 1, 1 + xstart,ystart = -1, -1 + angle = 0.0 + s_args = (None, nx, ny, xinc, yinc, xstart, ystart, angle) + return Surface(*s_args) + + def test_select_polygon(self): + surface = self.small_surface() + pointset = GeoPointset.fromSurface(surface) + georegion = GeoRegion(pointset) + self.assertEqual(0, len(georegion)) + points = [(-0.1,2.0), (1.9,8.1), (6.1,8.1), (9.1,5), (7.1,0.9)] + polygon = CPolyline(name='test_polygon', init_points=points) + picked = 52 # https://www.futilitycloset.com/2013/04/24/picks-theorem/ + georegion.select_inside(polygon) + self.assertEqual(picked, len(georegion)) + georegion.deselect_inside(polygon) + self.assertEqual(0, len(georegion)) + georegion.select_outside(polygon) + self.assertEqual(len(surface) - picked, len(georegion)) + georegion.deselect_outside(polygon) + self.assertEqual(0, len(georegion)) + + georegion.select_inside(polygon) + georegion.select_outside(polygon) + self.assertEqual(len(surface), len(georegion)) + georegion.deselect_inside(polygon) + georegion.deselect_outside(polygon) + self.assertEqual(0, len(georegion)) + + georegion.select_inside(polygon) + self.assertEqual(picked, len(georegion)) + internal_square = [(2.5,2.5), (2.5,6.5), (6.5,6.5), (6.5,2.5)] + georegion.deselect_inside(CPolyline(init_points=internal_square)) + self.assertEqual(picked - 4*4, len(georegion)) # internal square is 4x4 + + + def test_select_halfspace(self): + surface = self.small_surface() + pointset = GeoPointset.fromSurface(surface) + georegion = GeoRegion(pointset) + self.assertEqual(0, len(georegion)) + line = [(-0.1,2.0), (1.9,8.1)] + picked = 118 + georegion.select_above(line) + self.assertEqual(picked, len(georegion)) + georegion.deselect_above(line) + self.assertEqual(0, len(georegion)) + georegion.select_below(line) + self.assertEqual(len(surface) - picked, len(georegion)) + georegion.deselect_below(line) + self.assertEqual(0, len(georegion)) + + georegion.select_above(line) + georegion.select_below(line) + self.assertEqual(len(surface), len(georegion)) + georegion.deselect_above(line) + georegion.deselect_below(line) + self.assertEqual(0, len(georegion)) + + + def test_raises(self): + surface = self.small_surface() + pointset = GeoPointset.fromSurface(surface) + georegion = GeoRegion(pointset) + with self.assertRaises(ValueError): + georegion.select_above(((2,), (1, 3))) + with self.assertRaises(ValueError): + georegion.select_above((('not-a-number', 2), (1, 3))) diff --git a/ThirdParty/Ert/python/tests/core/geometry/test_geometry_tools.py b/ThirdParty/Ert/python/tests/geometry/test_geometry_tools.py similarity index 94% rename from ThirdParty/Ert/python/tests/core/geometry/test_geometry_tools.py rename to ThirdParty/Ert/python/tests/geometry/test_geometry_tools.py index 80f0eb8489..0656677ad6 100644 --- a/ThirdParty/Ert/python/tests/core/geometry/test_geometry_tools.py +++ b/ThirdParty/Ert/python/tests/geometry/test_geometry_tools.py @@ -1,8 +1,8 @@ import math -from ert.geo import Polyline, GeometryTools , CPolyline -from ert.geo.xyz_io import XYZIo -from ert.test import ExtendedTestCase , TestAreaContext +from ecl.geo import Polyline, GeometryTools , CPolyline +from ecl.geo.xyz_io import XYZIo +from ecl.test import ExtendedTestCase , TestAreaContext class GeometryToolsTest(ExtendedTestCase): diff --git a/ThirdParty/Ert/python/tests/core/geometry/test_intersection.py b/ThirdParty/Ert/python/tests/geometry/test_intersection.py similarity index 92% rename from ThirdParty/Ert/python/tests/core/geometry/test_intersection.py rename to ThirdParty/Ert/python/tests/geometry/test_intersection.py index 2e36c59aaf..af78512e84 100644 --- a/ThirdParty/Ert/python/tests/core/geometry/test_intersection.py +++ b/ThirdParty/Ert/python/tests/geometry/test_intersection.py @@ -1,5 +1,5 @@ -from ert.geo import GeometryTools -from ert.test.extended_testcase import ExtendedTestCase +from ecl.geo import GeometryTools +from ecl.test.extended_testcase import ExtendedTestCase class IntersectionTest(ExtendedTestCase): diff --git a/ThirdParty/Ert/python/tests/core/geometry/test_point_in_polygon.py b/ThirdParty/Ert/python/tests/geometry/test_point_in_polygon.py similarity index 92% rename from ThirdParty/Ert/python/tests/core/geometry/test_point_in_polygon.py rename to ThirdParty/Ert/python/tests/geometry/test_point_in_polygon.py index ad2e87c31b..8faeb9ca5f 100644 --- a/ThirdParty/Ert/python/tests/core/geometry/test_point_in_polygon.py +++ b/ThirdParty/Ert/python/tests/geometry/test_point_in_polygon.py @@ -1,6 +1,6 @@ -from ert.geo.geometry_tools import GeometryTools -from ert.geo.polyline import Polyline -from ert.test.extended_testcase import ExtendedTestCase +from ecl.geo.geometry_tools import GeometryTools +from ecl.geo.polyline import Polyline +from ecl.test.extended_testcase import ExtendedTestCase class PointInPolygonTest(ExtendedTestCase): diff --git a/ThirdParty/Ert/python/tests/core/geometry/test_polygon_slicing.py b/ThirdParty/Ert/python/tests/geometry/test_polygon_slicing.py similarity index 97% rename from ThirdParty/Ert/python/tests/core/geometry/test_polygon_slicing.py rename to ThirdParty/Ert/python/tests/geometry/test_polygon_slicing.py index ad7c1780ac..e2493e6822 100644 --- a/ThirdParty/Ert/python/tests/core/geometry/test_polygon_slicing.py +++ b/ThirdParty/Ert/python/tests/geometry/test_polygon_slicing.py @@ -1,6 +1,6 @@ from math import sqrt -from ert.geo.geometry_tools import GeometryTools -from ert.test import ExtendedTestCase +from ecl.geo.geometry_tools import GeometryTools +from ecl.test import ExtendedTestCase class PolygonSlicingTest(ExtendedTestCase): diff --git a/ThirdParty/Ert/python/tests/core/geometry/test_polyline.py b/ThirdParty/Ert/python/tests/geometry/test_polyline.py similarity index 97% rename from ThirdParty/Ert/python/tests/core/geometry/test_polyline.py rename to ThirdParty/Ert/python/tests/geometry/test_polyline.py index 8674e75460..bd9e262cff 100644 --- a/ThirdParty/Ert/python/tests/core/geometry/test_polyline.py +++ b/ThirdParty/Ert/python/tests/geometry/test_polyline.py @@ -1,7 +1,7 @@ -from ert.geo import Polyline, GeometryTools -from ert.geo.xyz_io import XYZIo -from ert.test import ExtendedTestCase , TestAreaContext +from ecl.geo import Polyline, GeometryTools +from ecl.geo.xyz_io import XYZIo +from ecl.test import ExtendedTestCase , TestAreaContext class PolylineTest(ExtendedTestCase): diff --git a/ThirdParty/Ert/python/tests/geometry/test_surface.py b/ThirdParty/Ert/python/tests/geometry/test_surface.py new file mode 100644 index 0000000000..995c34bcdb --- /dev/null +++ b/ThirdParty/Ert/python/tests/geometry/test_surface.py @@ -0,0 +1,210 @@ +import random +from ecl.geo import Surface +from ecl.test import ExtendedTestCase , TestAreaContext + + +class SurfaceTest(ExtendedTestCase): + def setUp(self): + self.surface_valid = self.createTestPath("local/geometry/surface/valid_ascii.irap") + self.surface_short = self.createTestPath("local/geometry/surface/short_ascii.irap") + self.surface_long = self.createTestPath("local/geometry/surface/long_ascii.irap") + self.surface_valid2 = self.createTestPath("local/geometry/surface/valid2_ascii.irap") + self.surface_small = self.createTestPath("local/geometry/surface/valid_small_ascii.irap") + + def test_xyz(self): + s = Surface(self.surface_valid2) + self.assertEqual(s.getXYZ(i=5,j=13), s.getXYZ(idx=642)) + x,y,z = s.getXYZ(i=5,j=13) + self.assertFloatEqual(464041.44804, x) + self.assertFloatEqual(7336966.309535, y) + self.assertFloatEqual(0.0051, z) + self.assertAlmostEqualList(s.getXYZ(i=6,j=13), s.getXYZ(idx=643)) + self.assertFloatEqual(-0.0006, s.getXYZ(i=6,j=13)[2]) # z value + + def test_create_new(self): + with self.assertRaises(ValueError): + s = Surface(None, 1, 1, 1) + with self.assertRaises(IOError): + s = Surface(50, 1, 1, 1) + + # values copied from irap surface_small + ny,nx = 20,30 + xinc,yinc = 50.0, 50.0 + xstart,ystart = 463325.5625, 7336963.5 + angle = -65.0 + s_args = (None, nx, ny, xinc, yinc, xstart, ystart, angle) + s = Surface(*s_args) + self.assertEqual(ny*nx, len(s)) + self.assertEqual(nx, s.getNX()) + self.assertEqual(ny, s.getNY()) + small = Surface (self.surface_small) + self.assertTrue(small.headerEqual(s)) + valid = Surface (self.surface_valid) + self.assertFalse(valid.headerEqual(s)) + + self.assertNotEqual(s, small) + idx = 0 + for i in range(nx): + for j in range(ny): + s[idx] = small[idx] + idx += 1 + self.assertEqual(s, small) + + def test_create(self): + with self.assertRaises(IOError): + s = Surface("File/does/not/exist") + + with self.assertRaises(ValueError): + s = Surface(self.surface_short) + + with self.assertRaises(ValueError): + s = Surface(self.surface_long) + + s = Surface( self.surface_valid ) + + self.assertEqual( s.getNX( ) , 49 ) + self.assertEqual( s.getNY( ) , 79 ) + self.assertEqual( len(s) , 49*79 ) + + with self.assertRaises(IndexError): + v = s[49 * 79] + + with self.assertRaises(TypeError): + v = s["KEY"] + + self.assertEqual( s[0] , 0.0051 ) + self.assertEqual( s[-1] , -0.0014 ) + + with self.assertRaises(IndexError): + s[49*79] = 787 + + s[0] = 10 + self.assertEqual( s[0] , 10 ) + + s[-1] = 77 + self.assertEqual( s[len(s) - 1] , 77 ) + + + def test_write(self): + with TestAreaContext("surface/write"): + + s0 = Surface( self.surface_valid ) + s0.write( "new_surface.irap") + + s1 = Surface( "new_surface.irap") + self.assertTrue( s1 == s0 ) + + s0[0] = 99 + self.assertFalse( s1 == s0 ) + + + + def test_copy(self): + with TestAreaContext("surface/copy"): + s0 = Surface( self.surface_valid ) + s1 = s0.copy( ) + + self.assertTrue( s1 == s0 ) + s1[0] = 99 + self.assertFalse( s1 == s0 ) + del s0 + self.assertEqual( s1[0] , 99) + + s2 = s1.copy( copy_data = False ) + self.assertEqual( s2[0] , 0.0 ) + self.assertEqual( s2[10] , 0.0 ) + self.assertEqual( s2[100] , 0.0 ) + + + def test_header_equal(self): + s0 = Surface( self.surface_valid ) + s1 = Surface( self.surface_valid2 ) + s2 = s0.copy( ) + + self.assertTrue( s0.headerEqual( s0 )) + self.assertFalse( s0.headerEqual( s1 )) + self.assertTrue( s0.headerEqual( s2 )) + + + def test_ops(self): + s0 = Surface( self.surface_valid ) + s0.assign(1.0) + for v in s0: + self.assertEqual(v , 1.0) + + s0 += 1 + for v in s0: + self.assertEqual(v , 2.0) + + s0 *= 2 + for v in s0: + self.assertEqual(v , 4.0) + + s1 = s0 + 4 + for v in s1: + self.assertEqual(v , 8.0) + + s2 = Surface( self.surface_valid2 ) + with self.assertRaises(ValueError): + s3 = s1 + s2 + + s4 = s1 + s0 + for v in s4: + self.assertEqual(v , 12.0) + + s5 = s4 / 12 + for v in s5: + self.assertEqual(v , 1.0) + + + def test_ops2(self): + s0 = Surface( self.surface_small ) + surface_list = [] + for i in range(10): + s = s0.copy() + for j in range(len(s)): + s[j] = random.random() + surface_list.append(s) + + mean = s0.copy( copy_data = False ) + for s in surface_list: + mean += s + mean /= len(surface_list) + + std = s0.copy( copy_data = False ) + for s in surface_list: + std += (s - mean) * (s - mean) + std /= (len(surface_list) - 1) + + + def test_sqrt(self): + s0 = Surface( self.surface_small ) + s0.assign(4) + self.assertEqual(20*30, len(s0)) + s_sqrt = s0.sqrt( ) + for i in range(len(s0)): + self.assertEqual(s0[i] , 4) + self.assertEqual(s_sqrt[i] , 2) + s0.inplaceSqrt( ) + self.assertTrue( s0 == s_sqrt ) + + + def test_xy(self): + ny,nx = 20,30 + xinc,yinc = 50.0, 50.0 + xstart,ystart = 463325.5625, 7336963.5 + angle = 0 + s_args = (None, nx, ny, xinc, yinc, xstart, ystart, angle) + s = Surface(*s_args) + + xy = s.getXY(0) + self.assertEqual((xstart, ystart), xy) + + xy = s.getXY(1) + self.assertEqual((xstart+xinc, ystart), xy) + + xy = s.getXY(nx) + self.assertEqual((xstart, ystart+yinc), xy) + + xy = s.getXY(-1) + self.assertEqual((xstart+xinc*(nx-1), ystart+yinc*(ny-1)), xy) diff --git a/ThirdParty/Ert/python/tests/global/CMakeLists.txt b/ThirdParty/Ert/python/tests/global/CMakeLists.txt new file mode 100644 index 0000000000..957c12c570 --- /dev/null +++ b/ThirdParty/Ert/python/tests/global/CMakeLists.txt @@ -0,0 +1,12 @@ +set(TEST_SOURCES + __init__.py + test_import.py + test_pylint.py +) + +add_python_package("python.tests.global" "${PYTHON_INSTALL_PREFIX}/tests/global" "${TEST_SOURCES}" False) + +addPythonTest(tests.global.test_import.ImportEcl) +addPythonTest(tests.global.test_pylint.LintErt) + + diff --git a/ThirdParty/Ert/python/python/ert_gui/tools/plot/widgets/__init__.py b/ThirdParty/Ert/python/tests/global/__init__.py similarity index 100% rename from ThirdParty/Ert/python/python/ert_gui/tools/plot/widgets/__init__.py rename to ThirdParty/Ert/python/tests/global/__init__.py diff --git a/ThirdParty/Ert/python/tests/global/test_import.py b/ThirdParty/Ert/python/tests/global/test_import.py new file mode 100644 index 0000000000..fe0835809a --- /dev/null +++ b/ThirdParty/Ert/python/tests/global/test_import.py @@ -0,0 +1,26 @@ +# Copyright (C) 2017 Statoil ASA, Norway. +# +# This file is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. + +import os +import sys + + +from ecl.test import ImportTestCase + +class ImportEcl(ImportTestCase): + + def test_import_ecl(self): + self.assertTrue( self.import_package( "ecl" )) diff --git a/ThirdParty/Ert/python/tests/global/test_pylint.py b/ThirdParty/Ert/python/tests/global/test_pylint.py new file mode 100644 index 0000000000..20206294f1 --- /dev/null +++ b/ThirdParty/Ert/python/tests/global/test_pylint.py @@ -0,0 +1,33 @@ +# Copyright (C) 2017 Statoil ASA, Norway. +# +# This file is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. + +from ecl.test import LintTestCase + +class LintErt(LintTestCase): + """Tests that no file in ert needs linting""" + + def test_lint_ecl(self): + white = ['ecl_kw.py', 'ecl_type.py', 'ecl_sum.py', 'ecl_grid.py', 'ecl_npv.py'] # TODO fix issues and remove + self.assertLinted('ecl/ecl', whitelist=white) + + def test_lint_geo(self): + self.assertLinted('ecl/geo') + + def test_lint_util(self): + self.assertLinted('ecl/util') + + def test_lint_well(self): + self.assertLinted('ecl/well') diff --git a/ThirdParty/Ert/python/tests/gui/CMakeLists.txt b/ThirdParty/Ert/python/tests/gui/CMakeLists.txt deleted file mode 100644 index 26d2b0e202..0000000000 --- a/ThirdParty/Ert/python/tests/gui/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -set(TEST_SOURCES - __init__.py - test_multiple_data_assimilation.py -) - -add_python_package("python.tests.gui" ${PYTHON_INSTALL_PREFIX}/tests/gui "${TEST_SOURCES}" False) - -addPythonTest(gui.mda_weights tests.gui.test_multiple_data_assimilation.MDAWeightsTest) - -add_subdirectory(ertshell) -add_subdirectory(ide) -add_subdirectory(plottery) diff --git a/ThirdParty/Ert/python/tests/gui/__init__.py b/ThirdParty/Ert/python/tests/gui/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/python/tests/gui/ertshell/CMakeLists.txt b/ThirdParty/Ert/python/tests/gui/ertshell/CMakeLists.txt deleted file mode 100644 index d402395a86..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ertshell/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -set(TEST_SOURCES - __init__.py - ert_shell_test_context.py - test_ertshell_analysis.py - test_ertshell_context.py - test_ertshell_observations.py - test_ertshell_plot_settings.py - test_ertshell_smoother.py - test_ertshell_server.py - - test_shell_function.py - test_shell_property.py - test_shell_collection.py -) - -add_python_package("python.tests.gui.ertshell" ${PYTHON_INSTALL_PREFIX}/tests/gui/ertshell "${TEST_SOURCES}" False) - -addPythonTest(gui.ertshell.analysis gui.ertshell.test_ertshell_analysis.ErtShellAnalysisModuleTest) -addPythonTest(gui.ertshell.context gui.ertshell.test_ertshell_context.ErtShellContextTest) -addPythonTest(gui.ertshell.observations gui.ertshell.test_ertshell_observations.ErtShellObservationsTest) -addPythonTest(gui.ertshell.plot_settings gui.ertshell.test_ertshell_plot_settings.ErtShellPlotSettingsTest) -addPythonTest(gui.ertshell.smoother gui.ertshell.test_ertshell_smoother.ErtShellSmootherTest) -addPythonTest(gui.ertshell.server gui.ertshell.test_ertshell_server.ErtShellServerTest) - -addPythonTest(gui.ertshell.shell_function gui.ertshell.test_shell_function.ShellFunctionTest) -addPythonTest(gui.ertshell.shell_property gui.ertshell.test_shell_property.ShellPropertyTest) -addPythonTest(gui.ertshell.shell_collection gui.ertshell.test_shell_collection.ShellCollectionTest) \ No newline at end of file diff --git a/ThirdParty/Ert/python/tests/gui/ertshell/__init__.py b/ThirdParty/Ert/python/tests/gui/ertshell/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/python/tests/gui/ertshell/ert_shell_test_context.py b/ThirdParty/Ert/python/tests/gui/ertshell/ert_shell_test_context.py deleted file mode 100644 index b5f025e32d..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ertshell/ert_shell_test_context.py +++ /dev/null @@ -1,56 +0,0 @@ -from StringIO import StringIO -import os -import sys -from ert.test import TestAreaContext -from ert_gui.shell import ErtShell - -class ShellCapturing(list): - - def __init__(self, shell): - self.shell = shell - - def __enter__(self): - self._stdout = sys.stdout - self._shell_stdout = self.shell.stdout - sys.stdout = self.shell.stdout = self._stringio = StringIO() - return self - - def __exit__(self, *args): - self.extend(self._stringio.getvalue().splitlines()) - sys.stdout = self._stdout - self.shell.stdout = self._shell_stdout - - - -class ErtShellTestContext(object): - - def __init__(self, test_name, config_file, load_config=True, prefix=None, store_area=False): - self.config_file = config_file - self.load_config = load_config - self.test_area_context = TestAreaContext(test_name, prefix=prefix, store_area=store_area) - - - def __enter__(self): - """ :rtype: ErtShell """ - test_area = self.test_area_context.__enter__() - - if os.path.exists(self.config_file): - test_area.copy_parent_content(self.config_file) - elif self.config_file is not None: - raise IOError("The config file: '%s' does not exist!" % self.config_file) - - self.shell = ErtShell(forget_history=True) - - config_file = os.path.basename(self.config_file) - - if self.load_config: - self.shell.onecmd("load_config %s" % config_file) - - return self.shell - - - def __exit__(self, exc_type, exc_val, exc_tb): - self.shell.do_exit("") - self.shell._cleanup() - self.test_area_context.__exit__(exc_type, exc_val, exc_tb) - return False \ No newline at end of file diff --git a/ThirdParty/Ert/python/tests/gui/ertshell/test_ertshell_analysis.py b/ThirdParty/Ert/python/tests/gui/ertshell/test_ertshell_analysis.py deleted file mode 100644 index f974b17124..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ertshell/test_ertshell_analysis.py +++ /dev/null @@ -1,46 +0,0 @@ -from ert.test.extended_testcase import ExtendedTestCase -from tests.gui.ertshell.ert_shell_test_context import ErtShellTestContext - - -class ErtShellAnalysisModuleTest(ExtendedTestCase): - - def test_analysis_module(self): - test_config = self.createTestPath("local/custom_kw/mini_config") - - with ErtShellTestContext("python/ertshell/analysis_module", test_config) as shell: - - self.assertTrue(shell.invokeCommand("analysis_module active_module")) - self.assertTrue(shell.invokeCommand("analysis_module list")) - - modules = shell.shellContext().ert().analysisConfig().getModuleList() - - for analysis_module in modules: - self.assertTrue(shell.invokeCommand("analysis_module active_module %s" % analysis_module)) - active_module_name = shell.shellContext().ert().analysisConfig().activeModuleName() - self.assertEqual(analysis_module, active_module_name) - - self.assertTrue(shell.invokeCommand("analysis_module variables")) - - analysis_module = shell.shellContext().ert().analysisConfig().getActiveModule() - variable_names = analysis_module.getVariableNames() - - for variable_name in variable_names: - value = analysis_module.getVariableValue(variable_name) - - variable_type = analysis_module.getVariableType(variable_name) - - if variable_type is float: - new_value = value + 0.5 - elif variable_type is int: - new_value = value + 2 - elif variable_type is str: - new_value = "New String Value" - else: - new_value = not value - - self.assertTrue(shell.invokeCommand("analysis_module set %s %s" % (variable_name, new_value))) - - updated_value = analysis_module.getVariableValue(variable_name) - - self.assertEqual(new_value, updated_value) - diff --git a/ThirdParty/Ert/python/tests/gui/ertshell/test_ertshell_context.py b/ThirdParty/Ert/python/tests/gui/ertshell/test_ertshell_context.py deleted file mode 100644 index a83d860d7a..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ertshell/test_ertshell_context.py +++ /dev/null @@ -1,31 +0,0 @@ -import os -from ert.test import ExtendedTestCase -from tests.gui.ertshell.ert_shell_test_context import ErtShellTestContext, ShellCapturing - - -class ErtShellContextTest(ExtendedTestCase): - - def test_ertshell_context(self): - test_config = self.createTestPath("local/custom_kw/mini_config") - - with ErtShellTestContext("python/ertshell/ert_shell_context", config_file=test_config, load_config=False) as shell: - self.assertIsNone(shell.shellContext().ert()) - self.assertTrue(shell.invokeCommand("load_config mini_config")) - self.assertIsNotNone(shell.shellContext().ert()) - - - def test_std_out_capture(self): - - test_config = self.createTestPath("local/custom_kw/mini_config") - - with ErtShellTestContext("python/ertshell/ert_shell_context", config_file=test_config, load_config=False) as shell: - - with ShellCapturing(shell) as out: - shell.onecmd("cwd") - - cwd = out[0] - prefix = "Current directory: " - self.assertTrue(cwd.startswith(prefix)) - - self.assertEqual(os.getcwd(), cwd[len(prefix):]) - diff --git a/ThirdParty/Ert/python/tests/gui/ertshell/test_ertshell_observations.py b/ThirdParty/Ert/python/tests/gui/ertshell/test_ertshell_observations.py deleted file mode 100644 index 391f2516c0..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ertshell/test_ertshell_observations.py +++ /dev/null @@ -1,28 +0,0 @@ -from ert.test import ExtendedTestCase -from tests.gui.ertshell.ert_shell_test_context import ErtShellTestContext - -class ErtShellObservationsTest(ExtendedTestCase): - - def test_load_observations(self): - test_config = self.createTestPath("local/custom_kw/mini_config") - - with ErtShellTestContext("python/ertshell/observations", test_config) as shell: - ert = shell.shellContext().ert() - original_observation_count = len(ert.getObservations()) - - self.assertTrue(shell.invokeCommand("observations list")) - - self.assertTrue(shell.invokeCommand("observations clear")) - self.assertEqual(0, len(ert.getObservations())) - - self.assertTrue(shell.invokeCommand("observations load Observations/observation_1")) - self.assertEqual(1, len(ert.getObservations())) - - self.assertTrue(shell.invokeCommand("observations load Observations/observation_2")) - self.assertEqual(2, len(ert.getObservations())) - - self.assertTrue(shell.invokeCommand("observations load Observations/observation_3")) - self.assertEqual(original_observation_count, len(ert.getObservations())) - - self.assertTrue(shell.invokeCommand("observations reload Observations/observation_1")) - self.assertEqual(1, len(ert.getObservations())) diff --git a/ThirdParty/Ert/python/tests/gui/ertshell/test_ertshell_plot_settings.py b/ThirdParty/Ert/python/tests/gui/ertshell/test_ertshell_plot_settings.py deleted file mode 100644 index c5ba0793e7..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ertshell/test_ertshell_plot_settings.py +++ /dev/null @@ -1,60 +0,0 @@ -from ert.test import ExtendedTestCase -from tests.gui.ertshell.ert_shell_test_context import ErtShellTestContext - - -class ErtShellPlotSettingsTest(ExtendedTestCase): - def checkStringProperties(self, shell, command, testFunction, allow_multiple_arguments=True): - self.assertTrue(shell.invokeCommand(command)) - - spacey_string = "new value with spaces" - if allow_multiple_arguments: - self.assertTrue(shell.invokeCommand("%s %s" % (command, spacey_string))) - self.assertEqual(testFunction(), spacey_string) - else: - self.assertFalse(shell.invokeCommand("%s %s" % (command, spacey_string))) - self.assertNotEqual(testFunction(), spacey_string) - - no_spacey_string = "new_value_without_spaces" - self.assertTrue(shell.invokeCommand("%s %s" % (command, no_spacey_string))) - self.assertEqual(testFunction(), no_spacey_string) - - - def checkBoolProperties(self, shell, command, testFunction): - start_value = testFunction() - self.assertTrue(shell.invokeCommand(command)) - self.assertTrue(shell.invokeCommand("%s %s" % (command, str(not start_value)))) - self.assertNotEqual(start_value, testFunction()) - self.assertFalse(shell.invokeCommand("%s not_a_bool" % command)) - - - def test_style_setting(self): - test_config = self.createTestPath("local/custom_kw/mini_config") - with ErtShellTestContext("python/ertshell/plot_settings", test_config, load_config=True) as shell: - plot_config = shell.shellContext()["plot_settings"].plotConfig() - - self.assertTrue(shell.invokeCommand("help plot_settings")) - - self.checkStringProperties(shell, "plot_settings title", plot_config.title) - self.checkStringProperties(shell, "plot_settings x_label", plot_config.xLabel) - self.checkStringProperties(shell, "plot_settings y_label", plot_config.yLabel) - - self.checkBoolProperties(shell, "plot_settings grid", plot_config.isGridEnabled) - self.checkBoolProperties(shell, "plot_settings legend", plot_config.isLegendEnabled) - self.checkBoolProperties(shell, "plot_settings refcase", plot_config.isRefcaseEnabled) - self.checkBoolProperties(shell, "plot_settings observations", plot_config.isObservationsEnabled) - - self.checkStringProperties(shell, "plot_settings path", shell.shellContext()["plot_settings"].getPath, allow_multiple_arguments=False) - - default_plot_cases = shell.shellContext()["plot_settings"].getCurrentPlotCases() - self.assertTrue(shell.invokeCommand("plot_settings current")) - self.assertTrue(shell.invokeCommand("plot_settings select test_run default")) - - plot_cases = shell.shellContext()["plot_settings"].getCurrentPlotCases() - self.assertSetEqual(set(plot_cases), {"test_run", "default"}) - - self.assertTrue(shell.invokeCommand("plot_settings select")) - plot_cases = shell.shellContext()["plot_settings"].getCurrentPlotCases() - self.assertListEqual(plot_cases, default_plot_cases) - - self.assertFalse(shell.invokeCommand("plot_settings select unknown")) - self.assertFalse(shell.invokeCommand("plot_settings select unknown1 unknown2")) diff --git a/ThirdParty/Ert/python/tests/gui/ertshell/test_ertshell_server.py b/ThirdParty/Ert/python/tests/gui/ertshell/test_ertshell_server.py deleted file mode 100644 index 6aea6ce930..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ertshell/test_ertshell_server.py +++ /dev/null @@ -1,23 +0,0 @@ -from ert.test import ExtendedTestCase -from tests.gui.ertshell.ert_shell_test_context import ErtShellTestContext - - -class ErtShellServerTest(ExtendedTestCase): - - def test_server(self): - config = self.createTestPath("local/snake_oil_no_data/snake_oil.ert") - with ErtShellTestContext("python/ertshell/server", config, load_config=False) as shell: - server_settings = shell.shellContext()["server_settings"] - self.assertTrue(shell.invokeCommand("help server")) - - self.assertTrue(shell.invokeCommand("server hostname")) - self.assertEqual(server_settings._hostname, "localhost") - - self.assertTrue(shell.invokeCommand("server hostname new.hostname.no")) - self.assertEqual(server_settings._hostname, "new.hostname.no") - - self.assertTrue(shell.invokeCommand("server port")) - self.assertEqual(server_settings._port, 0) - - self.assertTrue(shell.invokeCommand("server port 99")) - self.assertEqual(server_settings._port, 99) diff --git a/ThirdParty/Ert/python/tests/gui/ertshell/test_ertshell_smoother.py b/ThirdParty/Ert/python/tests/gui/ertshell/test_ertshell_smoother.py deleted file mode 100644 index 3646b6d0ca..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ertshell/test_ertshell_smoother.py +++ /dev/null @@ -1,53 +0,0 @@ -from __future__ import print_function -import os -from ert.enkf.export import GenKwCollector -from ert.test.extended_testcase import ExtendedTestCase -from tests.gui.ertshell.ert_shell_test_context import ErtShellTestContext - -class ErtShellSmootherTest(ExtendedTestCase): - - def test_smoother(self): - test_config = self.createTestPath("local/custom_kw/mini_config") - - with ErtShellTestContext("python/ertshell/smoother", test_config) as shell: - print(os.getcwd()) - shell.invokeCommand("case select test_run") - - self.assertTrue(shell.invokeCommand("smoother update test_run_update")) - - shell.invokeCommand("case select test_run_update") - - ert = shell.shellContext().ert() - data = GenKwCollector.loadAllGenKwData(ert, "test_run", keys=["PERLIN_PARAM:SCALE"]) - update_data = GenKwCollector.loadAllGenKwData(ert, "test_run_update", keys=["PERLIN_PARAM:SCALE"]) - - self.assertTrue(data["PERLIN_PARAM:SCALE"].std() > update_data["PERLIN_PARAM:SCALE"].std()) - - - def test_config(self): - test_config = self.createTestPath("local/custom_kw/mini_config") - - with ErtShellTestContext("python/ertshell/smoother_config", test_config) as shell: - - analysis_config = shell.shellContext().ert().analysisConfig() - - self.assertTrue(shell.invokeCommand("smoother overlap_alpha")) - self.assertTrue(shell.invokeCommand("smoother overlap_alpha 3.1415")) - self.assertAlmostEqual(3.1415, analysis_config.getEnkfAlpha()) - self.assertFalse(shell.invokeCommand("smoother overlap_alpha threepointfourteen")) - - self.assertTrue(shell.invokeCommand("smoother std_cutoff")) - self.assertTrue(shell.invokeCommand("smoother std_cutoff 0.1")) - self.assertAlmostEqual(0.1, analysis_config.getStdCutoff()) - self.assertTrue(shell.invokeCommand("smoother std_cutoff -0.1")) - self.assertAlmostEqual(0.0, analysis_config.getStdCutoff()) - self.assertFalse(shell.invokeCommand("smoother std_cutoff zeropointthreefourteen")) - - - self.assertTrue(shell.invokeCommand("smoother global_std_scaling")) - self.assertTrue(shell.invokeCommand("smoother global_std_scaling 0.5")) - self.assertAlmostEqual(0.5, analysis_config.getGlobalStdScaling()) - self.assertTrue(shell.invokeCommand("smoother global_std_scaling -0.5")) - self.assertAlmostEqual(0.0, analysis_config.getGlobalStdScaling()) - self.assertFalse(shell.invokeCommand("smoother global_std_scaling zeropointfour")) - diff --git a/ThirdParty/Ert/python/tests/gui/ertshell/test_shell_collection.py b/ThirdParty/Ert/python/tests/gui/ertshell/test_shell_collection.py deleted file mode 100644 index 763d9f1799..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ertshell/test_shell_collection.py +++ /dev/null @@ -1,97 +0,0 @@ -from ert.test import ExtendedTestCase -from ert_gui.shell.libshell import ShellCollection - - -class MockParent(object): - def __init__(self, name="DefaultMockParent"): - self.__name = name - self.__failed = False - - def shellContext(self): - return self - - def shell(self): - return self - - def columnize(self, items, size): - print(items) - - def lastCommandFailed(self, message): - print("[%s] Error: %s" % (self.__name, message)) - self.__failed = True - - def didLastCommandFail(self): - failed = self.__failed - self.__failed = False - return failed - - -def completeMock(line): - last_space_index = line.rfind(" ") - begin_index = 0 if last_space_index == -1 else last_space_index + 1 - end_index = len(line) - text = line[begin_index:end_index] - - return text, line, begin_index, end_index - - -class ShellCollectionTest(ExtendedTestCase): - - def test_creation(self): - name = "test" - shell_collection = ShellCollection(name) - - parent = MockParent() - shell_collection.setParent(parent) - - self.assertEqual(shell_collection.name, name) - - self.assertTrue(hasattr(parent, "do_%s" % name)) - self.assertTrue(hasattr(parent, "complete_%s" % name)) - self.assertTrue(hasattr(parent, "help_%s" % name)) - - - def test_sub_collection(self): - l1 = "level_1" - l2 = "level_2" - l3 = "level_3" - - root = MockParent() - level_1 = ShellCollection(l1) - level_1.setParent(root) - level_2 = ShellCollection(l2) - level_1.addCollection(level_2) - level_3 = ShellCollection(l3) - level_2.addCollection(level_3) - - tests = [(root, l1), (level_1, l2), (level_2, l3)] - - for parent, name in tests: - self.assertTrue(hasattr(parent, "do_%s" % name)) - self.assertTrue(hasattr(parent, "complete_%s" % name)) - self.assertTrue(hasattr(parent, "help_%s" % name)) - - root.do_level_1("level_2 ") - self.assertFalse(root.didLastCommandFail()) - - root.do_level_1("r ") - self.assertTrue(root.didLastCommandFail()) - - root.do_level_1(" level_2 level_3") - self.assertFalse(root.didLastCommandFail()) - - root.do_level_1("level_2 level_3 p") - self.assertTrue(root.didLastCommandFail()) - - result = root.complete_level_1(*completeMock("level_1 ")) - self.assertListEqual(result, [l2]) - - result = root.complete_level_1(*completeMock("level_1 lev")) - self.assertListEqual(result, [l2]) - - result = root.complete_level_1(*completeMock("level_1 level_2 ")) - self.assertListEqual(result, [l3]) - - root.help_level_1() - level_1.help_level_2() - level_2.help_level_3() diff --git a/ThirdParty/Ert/python/tests/gui/ertshell/test_shell_function.py b/ThirdParty/Ert/python/tests/gui/ertshell/test_shell_function.py deleted file mode 100644 index 9b76956a2b..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ertshell/test_shell_function.py +++ /dev/null @@ -1,148 +0,0 @@ -from ert.test import ExtendedTestCase -from ert_gui.shell.libshell import ShellFunction - - -class TestTarget(object): - def __init__(self, name="DefaultTestTarget"): - self.__name = name - self.__failed = False - - def lastCommandFailed(self, message): - print("[%s] Error: %s" % (self.__name, message)) - self.__failed = True - - def didLastCommandFail(self): - return self.__failed - - def resetFailedFlag(self): - self.__failed = False - - def getModelForFunction(self, function_name): - if function_name == "test_function": - return self - else: - return {"key": "value"} - - -def dummyFunction(model, line): - print("[Dummy] Received line: %s" % line) - - -def completeMock(line): - last_space_index = line.rfind(" ") - begin_index = 0 if last_space_index == -1 else last_space_index + 1 - end_index = len(line) - text = line[begin_index:end_index] - - return text, line, begin_index, end_index - - -class ShellFunctionTest(ExtendedTestCase): - - def test_creation(self): - target = TestTarget() - name = "test_function" - shell_function = ShellFunction(name, dummyFunction, None) - shell_function.setParent(target) - - self.assertTrue(hasattr(target, "do_%s" % name)) - self.assertTrue(hasattr(target, "complete_%s" % name)) - self.assertTrue(hasattr(target, "help_tuple_%s" % name)) - - def test_no_parent(self): - target = TestTarget() - name = "test_function" - shell_function = ShellFunction(name, dummyFunction, None) - - self.assertFalse(hasattr(target, "do_%s" % name)) - self.assertFalse(hasattr(target, "complete_%s" % name)) - self.assertFalse(hasattr(target, "help_tuple_%s" % name)) - - with self.assertRaises(AttributeError): - shell_function.doFunction("nonsense") - - - def test_failed_creation(self): - shell_function = ShellFunction("test_function", dummyFunction) - with self.assertRaises(ValueError): - shell_function.setParent(None) - - with self.assertRaises(ValueError): - ShellFunction("test_function", None) - - - def test_duplicate_function(self): - target = TestTarget() - shell_function = ShellFunction("duplicate", dummyFunction) - shell_function.setParent(target) - - with self.assertRaises(ValueError): - duplicate = ShellFunction("duplicate", dummyFunction) - duplicate.setParent(target) - - def test_addition_of_help(self): - target = TestTarget() - - name = "test_function" - help_arguments = "%s args" % name - help_message = "%s msg" % name - shell_function = ShellFunction(name, str, None, help_arguments=help_arguments, help_message=help_message) - shell_function.setParent(target) - - help_function = getattr(target, "help_tuple_%s" % name) - - cmd_name, args, msg = help_function() - self.assertEqual(cmd_name, name) - self.assertEqual(args, help_arguments) - self.assertEqual(msg, help_message) - self.assertFalse(target.didLastCommandFail()) - - def test_function_with_target_as_model(self): - target = TestTarget() - - def checkModel(model, line): - self.assertIsInstance(model, TestTarget) - self.assertEqual(line, "some text to parse") - - shell_function = ShellFunction("test_function", checkModel) - shell_function.setParent(target) - target.do_test_function("some text to parse") - - def test_function_with_custom_model(self): - target = TestTarget() - - def checkModel(model, line): - self.assertIsInstance(model, dict) - self.assertTrue("key" in model) - self.assertEqual(line, "some other text to parse") - - shell_function = ShellFunction("other_test_function", checkModel) - shell_function.setParent(target) - target.do_other_test_function("some other text to parse") - - def test_completion(self): - target = TestTarget() - - def completer(model, text, line, begidx, endidx): - text = text.strip().lower() - - if text == "s": - return ["Large"] - elif text == "l": - return ["Small"] - elif text == "m": - return ["Medium"] - else: - return [] - - shell_function = ShellFunction("test_function", dummyFunction, completer) - shell_function.setParent(target) - - result = target.complete_test_function(*completeMock("s")) - self.assertEqual(result, ["Large"]) - - result = target.complete_test_function(*completeMock("l")) - self.assertEqual(result, ["Small"]) - - result = target.complete_test_function(*completeMock("")) - self.assertEqual(result, []) diff --git a/ThirdParty/Ert/python/tests/gui/ertshell/test_shell_property.py b/ThirdParty/Ert/python/tests/gui/ertshell/test_shell_property.py deleted file mode 100644 index 1925f424b3..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ertshell/test_shell_property.py +++ /dev/null @@ -1,317 +0,0 @@ -from ert.test.extended_testcase import ExtendedTestCase -from ert_gui.shell.libshell import ShellProperty, boolValidator, createListValidator, createFloatValidator - - -class TestModel(object): - STATUSES = ["OK", "Error", "Unknown"] - - def __init__(self, name="TestModel"): - self.__enabled = True - self.__status = "OK" - self.__name = name - self.__description = None - self.__threshold = 0.5 - self.__priority = 1 - - def setEnabled(self, enabled): - self.__enabled = enabled - - def isEnabled(self): - return self.__enabled - - def setStatus(self, status): - self.__status = status - - def status(self): - return self.__status - - def statusCompleter(self, text, line, begidx, endidx): - def test(status, text): - status = status.lower() - text = text.lower() - return status != self.status().lower() and status.startswith(text) - return [status for status in TestModel.STATUSES if test(status, text)] - - def statusValidator(self, value): - if value.lower() == self.status().lower(): - raise ValueError("Value can not be set to current value!") - - for status in TestModel.STATUSES: - if value.lower() == str(status).lower(): - return status - - raise ValueError("Unknown value") - - - def name(self): - return self.__name - - def setDescription(self, description): - self.__description = description - - def description(self): - return self.__description - - @property - def threshold(self): - return self.__threshold - - @threshold.setter - def threshold(self, threshold): - self.__threshold = max(0.0, min(threshold, 1.0)) - - @property - def priority(self): - return self.__priority - - @priority.setter - def priority(self, priority): - try: - priority = int(priority) - self.__priority = priority - except ValueError as error: - self.__priority = 0 - - -class TestTarget(object): - def __init__(self, model, name="DefaultTestTarget"): - self.__model = model - self.__name = name - self.__failed = False - - def lastCommandFailed(self, message): - print("[%s] Error: %s" % (self.__name, message)) - self.__failed = True - - def didLastCommandFail(self): - return self.__failed - - def resetFailedFlag(self): - self.__failed = False - - def getModelForProperty(self, property_name): - return self.__model - - -def completeMock(line): - last_space_index = line.rfind(" ") - begin_index = 0 if last_space_index == -1 else last_space_index + 1 - end_index = len(line) - text = line[begin_index:end_index] - - return text, line, begin_index, end_index - - -class ShellPropertyTest(ExtendedTestCase): - def setUp(self): - self.properties = { - "enabled": ("enabled", TestModel.isEnabled, TestModel.setEnabled), - "status": ("status", TestModel.status, TestModel.setStatus), - "priority": ("priority", TestModel.priority, TestModel.priority), - "name": ("name", TestModel.name, None), - "description": ("description", TestModel.description, TestModel.setDescription), - "threshold": ("threshold", TestModel.threshold, TestModel.threshold) - } - - self.completers = { - "enabled": ["true", "false"], - "status": TestModel.statusCompleter, - "threshold": None, - "priority": [1, 2, 3, 4, 5], - "name": None, - "description": None - } - - self.validators = { - "enabled": boolValidator, - "status": TestModel.statusValidator, - "threshold": createFloatValidator(0.0, 1.0), - "priority": createListValidator(self.completers["priority"]), - "name": None, - "description": None - } - - def test_creation_and_check_existence_of_do_complete_help(self): - target = TestTarget(TestModel()) - for key, (name, getter, setter) in self.properties.items(): - shell_property = ShellProperty(name, getter, setter) - shell_property.setParent(target) - - self.assertTrue(hasattr(target, "do_%s" % name)) - self.assertTrue(hasattr(target, "complete_%s" % name)) - self.assertTrue(hasattr(target, "help_tuple_%s" % name)) - - - def test_addition_of_help(self): - target = TestTarget(TestModel()) - - for key, (name, getter, setter) in self.properties.items(): - help_arguments = "%s args" % name - help_message = "%s msg" % name - shell_property = ShellProperty(name, getter, setter, help_arguments=help_arguments, help_message=help_message) - shell_property.setParent(target) - - help_function = getattr(target, "help_tuple_%s" % name) - - cmd_name, args, msg = help_function() - self.assertEqual(cmd_name, name) - self.assertEqual(args, help_arguments) - self.assertEqual(msg, help_message) - self.assertFalse(target.didLastCommandFail()) - - - def test_no_parent(self): - target = TestTarget(TestModel()) - for key, (name, getter, setter) in self.properties.items(): - shell_property = ShellProperty(name, getter, setter) - - self.assertFalse(hasattr(target, "do_%s" % name)) - self.assertFalse(hasattr(target, "complete_%s" % name)) - self.assertFalse(hasattr(target, "help_tuple_%s" % name)) - - with self.assertRaises(AttributeError): - shell_property.doFunction("") - - def test_duplicate_properties(self): - target = TestTarget(TestModel()) - shell_property = ShellProperty("test", str, None) - shell_property.setParent(target) - - with self.assertRaises(ValueError): - shell_property = ShellProperty("test", str, None) - shell_property.setParent(target) - - - - def test_read_only_property(self): - property_name = "name" - tests = [ - ("", "TestModel", False), - ("new_name", "TestModel", True), - ] - - completions = [ - ("", []), - ] - - self.runPropertyTests(property_name, tests, completions) - - - def test_bool_property(self): - property_name = "enabled" - tests = [ - ("", True, False), - ("False", False, False), - ("g", False, True), - ("yes", True, False), - ] - - completions = [ - ("", self.completers[property_name]), - ("f", ["false"]), - ("t", ["true"]), - ("q", []) - ] - - self.runPropertyTests(property_name, tests, completions) - - def test_string_property(self): - property_name = "description" - tests = [ - ("", None, False), - ("a description", "a description", False), - ("1234", "1234", False), - ] - - completions = [ - ("", []), - ("q", []), - ] - - self.runPropertyTests(property_name, tests, completions) - - - def test_choice_property(self): - property_name = "status" - tests = [ - ("", "OK", False), - ("ERROR", "Error", False), - ("DING", "Error", True), - ] - - completions = [ - ("", ["OK", "Unknown"]), - ("e", []), - ("u", ["Unknown"]), - ("q", []) - ] - - self.runPropertyTests(property_name, tests, completions) - - - def test_float_property(self): - property_name = "threshold" - tests = [ - ("", 0.5, False), - ("0.7", 0.7, False), - ("1.1", 1.0, False), - ("0", 0.0, False), - ("zero", 0.0, True) - ] - - completions = [ - ("", []), - ("1", []), - ("e", []) - ] - - self.runPropertyTests(property_name, tests, completions) - - - def test_int_list_property(self): - property_name = "priority" - tests = [ - ("", 1, False), - ("2", 2, False), - ("6", 2, True), - ] - - completions = [ - ("", self.completers[property_name]), - ("5", [5]), - ("e", []) - ] - - self.runPropertyTests(property_name, tests, completions) - - - def runPropertyTests(self, property_name, tests, completions): - model = TestModel() - target = TestTarget(model) - - name, getter, setter = self.properties[property_name] - shell_property = ShellProperty(name, getter, setter, self.validators[property_name], self.completers[property_name]) - shell_property.setParent(target) - - doFunc = getattr(target, "do_%s" % property_name) - for do_input, expected_value, fail in tests: - doFunc(do_input) - - if isinstance(getter, property): - model_value = getter.__get__(model) - else: - model_value = getter(model) - - self.assertEqual(expected_value, model_value) - - if fail: - self.assertTrue(target.didLastCommandFail()) - else: - self.assertFalse(target.didLastCommandFail()) - - target.resetFailedFlag() - - completeFunc = getattr(target, "complete_%s" % property_name) - for complete_input, expected_value in completions: - choices = completeFunc(*completeMock(complete_input)) - self.assertListEqual(choices, expected_value) \ No newline at end of file diff --git a/ThirdParty/Ert/python/tests/gui/ide/CMakeLists.txt b/ThirdParty/Ert/python/tests/gui/ide/CMakeLists.txt deleted file mode 100644 index 64135b2519..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ide/CMakeLists.txt +++ /dev/null @@ -1,37 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - test_bool_argument.py - test_configuration_line.py - test_configuration_line_builder.py - test_configuration_line_definition.py - test_configuration_line_parser.py - test_ert_keywords.py - test_float_argument.py - test_integer_argument.py - test_path_argument.py - test_percent_argument.py - test_proper_name_argument.py - test_proper_name_format_argument.py - test_proper_name_format_string_argument.py - test_range_string_argument.py - test_tokens.py -) - -add_python_package("python.tests.gui.ide" ${PYTHON_INSTALL_PREFIX}/tests/gui/ide "${PYTHON_SOURCES}" True) - -addPythonTest(gui.ide.bool_argument tests.gui.ide.test_bool_argument.BoolArgumentTest) -addPythonTest(gui.ide.integer_argument tests.gui.ide.test_integer_argument.IntegerArgumentTest) -addPythonTest(gui.ide.float_argument tests.gui.ide.test_float_argument.FloatArgumentTest) -addPythonTest(gui.ide.path_argument tests.gui.ide.test_path_argument.PathArgumentTest) -addPythonTest(gui.ide.proper_name_argument tests.gui.ide.test_proper_name_argument.ProperNameArgumentTest) -addPythonTest(gui.ide.proper_name_format_argument tests.gui.ide.test_proper_name_format_argument.ProperNameFormatArgumentTest) -addPythonTest(gui.ide.proper_name_format_string_argument tests.gui.ide.test_proper_name_format_string_argument.ProperNameFormatStringArgumentTest) -addPythonTest(gui.ide.range_string_argument tests.gui.ide.test_range_string_argument.RangeStringArgumentTest) -addPythonTest(gui.ide.test_configuration_line tests.gui.ide.test_configuration_line.ConfigurationLineTest) -addPythonTest(gui.ide.test_configuration_line_builder tests.gui.ide.test_configuration_line_builder.ConfigurationLineBuilderTest) -addPythonTest(gui.ide.test_configuration_line_definition tests.gui.ide.test_configuration_line_definition.ConfigurationLineDefinitionTest) -addPythonTest(gui.ide.test_configuration_line_parser tests.gui.ide.test_configuration_line_parser.ConfigurationLineParserTest) -addPythonTest(gui.ide.ert_keywords tests.gui.ide.test_ert_keywords.ErtKeywordTest) -addPythonTest(gui.ide.tokens tests.gui.ide.test_tokens.TokenTest) - -add_subdirectory(wizards) diff --git a/ThirdParty/Ert/python/tests/gui/ide/__init__.py b/ThirdParty/Ert/python/tests/gui/ide/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/python/tests/gui/ide/test_bool_argument.py b/ThirdParty/Ert/python/tests/gui/ide/test_bool_argument.py deleted file mode 100644 index 5f9cdeea62..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ide/test_bool_argument.py +++ /dev/null @@ -1,53 +0,0 @@ -from ert_gui.ide.keywords.definitions import BoolArgument -from ert.test import ExtendedTestCase - - -class BoolArgumentTest(ExtendedTestCase): - - - - def test_bool_argument(self): - bool_arg = BoolArgument() - - validation_status = bool_arg.validate("TRUE") - self.assertTrue(validation_status) - self.assertTrue(validation_status.value()) - self.assertEqual(validation_status.message(), "") - - validation_status = bool_arg.validate("FALSE") - self.assertTrue(validation_status) - self.assertFalse(validation_status.value()) - self.assertEqual(validation_status.message(), "") - - validation_status = bool_arg.validate("True") - self.assertTrue(validation_status) - - validation_status = bool_arg.validate("False") - self.assertTrue(validation_status) - - validation_status = bool_arg.validate(" FALSE") - self.assertFalse(validation_status) - self.assertEqual(validation_status.message(), bool_arg.NOT_BOOL) - - self.assertTrue(bool_arg.validate("T")) - self.assertTrue(bool_arg.validate("F")) - self.assertTrue(bool_arg.validate("0")) - self.assertTrue(bool_arg.validate("1")) - self.assertTrue(bool_arg.validate("TrUe")) - self.assertTrue(bool_arg.validate("FaLsE")) - - self.assertFalse(bool_arg.validate("t")) - self.assertFalse(bool_arg.validate("f")) - self.assertFalse(bool_arg.validate("Tr")) - - self.assertTrue(bool_arg.validate("T").value()) - self.assertFalse(bool_arg.validate("F").value()) - - - - - - - - - diff --git a/ThirdParty/Ert/python/tests/gui/ide/test_configuration_line.py b/ThirdParty/Ert/python/tests/gui/ide/test_configuration_line.py deleted file mode 100644 index 8961cb3268..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ide/test_configuration_line.py +++ /dev/null @@ -1,72 +0,0 @@ -from ert_gui.ide.keywords.data import ConfigurationLine, Keyword, Argument -from ert_gui.ide.keywords.definitions import StringArgument -from ert_gui.ide.keywords.definitions.keyword_definition import KeywordDefinition -from ert.test import ExtendedTestCase - - -class ConfigurationLineTest(ExtendedTestCase): - - def test_configuration_line_creation(self): - line = "KEYWORD arg1" - keyword = Keyword(0, 7, line) - argument = Argument(8, 12, line) - cl = ConfigurationLine(keyword=keyword, - arguments=[argument], - documentation_link="help/link", - group="group", - required=True) - - self.assertEqual(cl.keyword(), keyword) - self.assertEqual(cl.arguments()[0], argument) - - self.assertEqual(cl.documentationLink(), "help/link") - self.assertEqual(cl.group(), "group") - self.assertTrue(cl.isRequired()) - - self.assertFalse(cl.validationStatusForToken(keyword)) - self.assertFalse(cl.validationStatusForToken(argument)) - - - - def test_configuration_line(self): - - keyword_def = KeywordDefinition("KEYWORD") - arg1_def = StringArgument() - - line = "KEYWORD string 2" - keyword = Keyword(0, 7, line) - self.assertEqual(keyword.value(), "KEYWORD") - - keyword.setKeywordDefinition(keyword_def) - - arg1 = Argument(8, 14, line) - self.assertEqual(arg1.value(), "string") - arg1.setArgumentDefinition(arg1_def) - - arg2 = Argument(15, 16, line) - self.assertEqual(arg2.value(), "2") - - - cl = ConfigurationLine(keyword=keyword, - arguments=[arg1, arg2], - documentation_link="help", - group="test_group", - required=True) - - self.assertTrue(cl.keyword().hasKeywordDefinition()) - self.assertEqual(cl.keyword().keywordDefinition(), keyword_def) - - self.assertEqual(len(cl.arguments()), 2) - - self.assertEqual(cl.arguments()[0], arg1) - self.assertTrue(cl.arguments()[0].hasArgumentDefinition()) - self.assertEqual(cl.arguments()[0].argumentDefinition(), arg1_def) - - self.assertEqual(cl.arguments()[1], arg2) - self.assertFalse(cl.arguments()[1].hasArgumentDefinition()) - self.assertIsNone(cl.arguments()[1].argumentDefinition()) - - self.assertFalse(cl.validationStatusForToken(keyword)) - self.assertTrue(cl.validationStatusForToken(arg1)) - self.assertFalse(cl.validationStatusForToken(arg2)) - diff --git a/ThirdParty/Ert/python/tests/gui/ide/test_configuration_line_builder.py b/ThirdParty/Ert/python/tests/gui/ide/test_configuration_line_builder.py deleted file mode 100644 index bf052ea79d..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ide/test_configuration_line_builder.py +++ /dev/null @@ -1,130 +0,0 @@ -from ert_gui.ide.keywords import ErtKeywords -from ert_gui.ide.keywords.configuration_line_builder import ConfigurationLineBuilder -from ert_gui.ide.keywords.definitions import ArgumentDefinition -from ert_gui.ide.keywords.data.configuration_line import ConfigurationLine -from ert.test import ExtendedTestCase - - -class ConfigurationLineBuilderTest(ExtendedTestCase): - - - - def test_num_realizations(self): - keywords = ErtKeywords() - clb = ConfigurationLineBuilder(keywords) - - test_line = "NUM_REALIZATIONS 25" - - clb.processLine(test_line) - - self.assertTrue(clb.hasConfigurationLine()) - self.assertFalse(clb.hasComment()) - self.assertEqual(clb.commentIndex(), -1) - - config_line = clb.configurationLine() - - self.assertEqual(config_line.keyword().value(), "NUM_REALIZATIONS") - self.assertEqual(config_line.keyword().keywordDefinition(), keywords["NUM_REALIZATIONS"].keywordDefinition()) - self.assertEqual(config_line.arguments()[0].value(), "25") - - def test_num_realizations_no_argument(self): - keywords = ErtKeywords() - clb = ConfigurationLineBuilder(keywords) - - test_line = "NUM_REALIZATIONS" - - clb.processLine(test_line) - - self.assertTrue(clb.hasConfigurationLine()) - - config_line = clb.configurationLine() - - self.assertEqual(config_line.keyword().value(), "NUM_REALIZATIONS") - self.assertEqual(config_line.keyword().keywordDefinition(), keywords["NUM_REALIZATIONS"].keywordDefinition()) - - arguments = config_line.arguments() - self.assertEqual(len(arguments), 1) - - self.assertFalse(config_line.validationStatusForToken(config_line.keyword())) - self.assertFalse(config_line.validationStatusForToken(arguments[0])) - - - def test_unknown_keyword_with_comment(self): - keywords = ErtKeywords() - clb = ConfigurationLineBuilder(keywords) - - test_line = "KEYWORD nothing --comment" - - clb.processLine(test_line) - - self.assertTrue(clb.hasConfigurationLine()) - - config_line = clb.configurationLine() - keyword = config_line.keyword() - self.assertFalse(config_line.validationStatusForToken(keyword)) - message = ConfigurationLine.UNKNOWN_KEYWORD + '\n' + ConfigurationLine.ARGUMENT_ERROR + '\n' + ConfigurationLine.ARGUMENT_NOT_EXPECTED - self.assertEqual(config_line.validationStatusForToken(keyword).message(), message) - - self.assertEqual(keyword.value(), "KEYWORD") - arguments = config_line.arguments() - - self.assertEqual(arguments[0].value(), "nothing") - self.assertIsNone(keyword.keywordDefinition()) - - self.assertTrue(clb.hasComment()) - self.assertEqual(clb.commentIndex(), 16) - - self.assertFalse(config_line.validationStatusForToken(arguments[0])) - self.assertEqual(config_line.validationStatusForToken(arguments[0]).message(), ConfigurationLine.ARGUMENT_NOT_EXPECTED) - - - def test_queue_option_keyword(self): - keywords = ErtKeywords() - clb = ConfigurationLineBuilder(keywords) - - test_line = "QUEUE_OPTION LSF LSF_BJOBS_CMD STRING AND STRING" - - clb.processLine(test_line) - config_line = clb.configurationLine() - - arguments = config_line.arguments() - - self.assertEqual(len(arguments), 3) - self.assertEqual(arguments[0].value(), "LSF") - self.assertEqual(arguments[1].value(), "LSF_BJOBS_CMD") - self.assertEqual(arguments[2].value(), "STRING AND STRING") - - print(config_line.validationStatusForToken(config_line.keyword())) - - self.assertTrue(config_line.validationStatusForToken(arguments[0])) - self.assertTrue(config_line.validationStatusForToken(arguments[1])) - self.assertTrue(config_line.validationStatusForToken(arguments[2])) - - - def test_queue_option_keyword_too_few_arguments(self): - keywords = ErtKeywords() - clb = ConfigurationLineBuilder(keywords) - - test_line = "QUEUE_OPTION LSF LSF_BJOBS_CMD" - - clb.processLine(test_line) - config_line = clb.configurationLine() - - arguments = config_line.arguments() - - self.assertEqual(len(arguments), 3) - - self.assertEqual(arguments[0].value(), "LSF") - self.assertEqual(arguments[1].value(), "LSF_BJOBS_CMD") - self.assertEqual(arguments[2].value(), "") - - self.assertFalse(config_line.validationStatusForToken(config_line.keyword())) - - self.assertTrue(config_line.validationStatusForToken(arguments[0])) - self.assertTrue(config_line.validationStatusForToken(arguments[1])) - self.assertFalse(config_line.validationStatusForToken(arguments[2])) - - self.assertEqual(config_line.validationStatusForToken(arguments[2]).message(), ArgumentDefinition.MISSING_ARGUMENT) - - - diff --git a/ThirdParty/Ert/python/tests/gui/ide/test_configuration_line_definition.py b/ThirdParty/Ert/python/tests/gui/ide/test_configuration_line_definition.py deleted file mode 100644 index bcccb60472..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ide/test_configuration_line_definition.py +++ /dev/null @@ -1,45 +0,0 @@ -from ert_gui.ide.keywords.definitions import ArgumentDefinition, KeywordDefinition, ConfigurationLineDefinition, IntegerArgument -from ert.test import ExtendedTestCase - - - - - -class ConfigurationLineDefinitionTest(ExtendedTestCase): - - def test_keyword_definition(self): - keyword = KeywordDefinition("KEYWORD") - self.assertEqual(keyword.name(), "KEYWORD") - - - def test_argument_definition(self): - arg_def = ArgumentDefinition(optional=True, built_in=True, rest_of_line=True) - - self.assertTrue(arg_def.isBuiltIn()) - self.assertTrue(arg_def.isOptional()) - self.assertTrue(arg_def.consumeRestOfLine()) - - - def test_configuration_line_definition(self): - - cld = ConfigurationLineDefinition(keyword=KeywordDefinition("KEYWORD"), - arguments=[IntegerArgument(from_value=1)], - documentation_link="help/path", - required=True, - group="Group") - - self.assertTrue(cld.isRequired()) - self.assertEqual(cld.documentationLink(), "help/path") - - keyword_definition = cld.keywordDefinition() - self.assertIsInstance(keyword_definition, KeywordDefinition) - self.assertEqual(keyword_definition.name(), "KEYWORD") - - argument_definitions = cld.argumentDefinitions() - self.assertIsInstance(argument_definitions, list) - self.assertEqual(len(argument_definitions), 1) - self.assertIsInstance(argument_definitions[0], IntegerArgument) - - - self.assertEqual(cld.group(), "Group") - diff --git a/ThirdParty/Ert/python/tests/gui/ide/test_configuration_line_parser.py b/ThirdParty/Ert/python/tests/gui/ide/test_configuration_line_parser.py deleted file mode 100644 index e02d154cd6..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ide/test_configuration_line_parser.py +++ /dev/null @@ -1,98 +0,0 @@ -from ert_gui.ide.keywords import ConfigurationLineParser -from ert_gui.ide.keywords.data import Argument -from ert.test import ExtendedTestCase - - -class ConfigurationLineParserTest(ExtendedTestCase): - - - def test_comments(self): - keyword_parser = ConfigurationLineParser() - - test_line = "-- comment" - keyword_parser.parseLine(test_line) - - self.assertTrue(keyword_parser.hasComment()) - self.assertEqual(keyword_parser.commentIndex(), 0) - self.assertFalse(keyword_parser.hasKeyword()) - self.assertIsNone(keyword_parser.keyword()) - self.assertEqual(keyword_parser.uncommentedText(), "") - - - test_line = " -- comment" - keyword_parser.parseLine(test_line) - - self.assertTrue(keyword_parser.hasComment()) - self.assertEqual(keyword_parser.commentIndex(), 5) - self.assertFalse(keyword_parser.hasKeyword()) - self.assertIsNone(keyword_parser.keyword()) - self.assertEqual(keyword_parser.uncommentedText(), " ") - - test_line = "NUM_REALIZATIONS-- comment" - keyword_parser.parseLine(test_line) - - self.assertTrue(keyword_parser.hasComment()) - self.assertEqual(keyword_parser.commentIndex(), 16) - self.assertTrue(keyword_parser.hasKeyword()) - self.assertEqual(keyword_parser.keyword().value(), "NUM_REALIZATIONS") - self.assertEqual(keyword_parser.uncommentedText(), "NUM_REALIZATIONS") - - test_line = "NUM_REALIZATIONS -- comment" - keyword_parser.parseLine(test_line) - - self.assertTrue(keyword_parser.hasComment()) - self.assertEqual(keyword_parser.commentIndex(), 17) - self.assertTrue(keyword_parser.hasKeyword()) - self.assertEqual(keyword_parser.keyword().value(), "NUM_REALIZATIONS") - self.assertEqual(keyword_parser.uncommentedText(), "NUM_REALIZATIONS ") - - - def test_argument_text(self): - keyword_parser = ConfigurationLineParser() - - test_line = "NUM_REALIZATIONS 25" - keyword_parser.parseLine(test_line) - - self.assertFalse(keyword_parser.hasComment()) - self.assertEqual(keyword_parser.commentIndex(), -1) - self.assertTrue(keyword_parser.hasKeyword()) - self.assertEqual(keyword_parser.keyword().value(), "NUM_REALIZATIONS") - self.assertEqual(keyword_parser.uncommentedText(), "NUM_REALIZATIONS 25") - self.assertEqual(keyword_parser.argumentsText(), " 25") - - - test_line = "NUM_REALIZATIONS 25--comment" - keyword_parser.parseLine(test_line) - - self.assertTrue(keyword_parser.hasComment()) - self.assertEqual(keyword_parser.commentIndex(), 19) - self.assertTrue(keyword_parser.hasKeyword()) - self.assertEqual(keyword_parser.keyword().value(), "NUM_REALIZATIONS") - self.assertEqual(keyword_parser.uncommentedText(), "NUM_REALIZATIONS 25") - self.assertEqual(keyword_parser.argumentsText(), " 25") - - test_line = "NUM_REALIZATIONS 25 something_else" - keyword_parser.parseLine(test_line) - - self.assertTrue(keyword_parser.hasKeyword()) - self.assertEqual(keyword_parser.keyword().value(), "NUM_REALIZATIONS") - self.assertEqual(keyword_parser.uncommentedText(), "NUM_REALIZATIONS 25 something_else") - self.assertEqual(keyword_parser.argumentsText(), " 25 something_else") - - - - - def test_argument_list(self): - keyword_parser = ConfigurationLineParser() - - test_line = "KEYWORD arg1 arg2" - keyword_parser.parseLine(test_line) - - keyword = keyword_parser.keyword() - self.assertEqual(keyword.value(), "KEYWORD") - - arguments = keyword_parser.arguments() - self.assertEqual(arguments[0].value(), "arg1") - self.assertEqual(arguments[1].value(), "arg2") - - diff --git a/ThirdParty/Ert/python/tests/gui/ide/test_ert_keywords.py b/ThirdParty/Ert/python/tests/gui/ide/test_ert_keywords.py deleted file mode 100644 index fc1b93588a..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ide/test_ert_keywords.py +++ /dev/null @@ -1,186 +0,0 @@ -from ert_gui.ide.keywords.definitions import IntegerArgument, StringArgument, BoolArgument, PathArgument, FloatArgument , PercentArgument -from ert_gui.ide.keywords import ErtKeywords -from ert_gui.ide.keywords.definitions.proper_name_argument import ProperNameArgument -from ert_gui.ide.keywords.definitions.proper_name_format_argument import ProperNameFormatArgument -from ert.test import ExtendedTestCase - - -class ErtKeywordTest(ExtendedTestCase): - - def setUp(self): - self.keywords = ErtKeywords() - - def keywordTest(self, name, argument_types, documentation_link, group, required=False): - self.assertTrue(name in self.keywords) - - cld = self.keywords[name] - - self.assertEqual(cld.keywordDefinition().name(), name) - self.assertEqual(cld.group(), group) - self.assertEqual(cld.documentationLink(), documentation_link) - self.assertEqual(cld.isRequired(), required) - - arguments = cld.argumentDefinitions() - - self.assertEqual(len(arguments), len(argument_types)) - - for index in range(len(arguments)): - self.assertIsInstance(arguments[index], argument_types[index]) - - - def test_eclipse_keywords(self): - self.keywordTest("DATA_FILE", [PathArgument], "keywords/data_file", "Eclipse", True) - self.keywordTest("EQUIL_INIT_FILE", [PathArgument], "keywords/equil_init_file", "Eclipse") - self.keywordTest("ECLBASE", [StringArgument], "keywords/eclbase", "Eclipse", True) - self.keywordTest("JOBNAME", [StringArgument], "keywords/job_name", "Eclipse", True) - self.keywordTest("GRID", [PathArgument], "keywords/grid", "Eclipse", True) - self.keywordTest("INIT_SECTION", [PathArgument], "keywords/init_section", "Eclipse", True) - self.keywordTest("SCHEDULE_FILE", [PathArgument], "keywords/schedule_file", "Eclipse", True) - self.keywordTest("DATA_KW", [StringArgument, StringArgument], "keywords/data_kw", "Eclipse") - self.keywordTest("IGNORE_SCHEDULE", [BoolArgument], "keywords/ignore_schedule", "Eclipse") - - - def test_ensemble_keywords(self): - self.keywordTest("NUM_REALIZATIONS", [IntegerArgument], "keywords/num_realizations", "Ensemble", True) - self.keywordTest("END_DATE", [StringArgument], "keywords/end_date", "Ensemble") - self.keywordTest("ENSPATH", [PathArgument], "keywords/enspath", "Ensemble") - self.keywordTest("SELECT_CASE", [StringArgument], "keywords/select_case", "Ensemble") - self.keywordTest("HISTORY_SOURCE", [StringArgument], "keywords/history_source", "Ensemble") - self.keywordTest("REFCASE", [PathArgument], "keywords/refcase", "Ensemble") - self.keywordTest("REFCASE_LIST", [StringArgument], "keywords/refcase_list", "Ensemble") - self.keywordTest("INCLUDE", [PathArgument], "keywords/include", "Ensemble") - self.keywordTest("OBS_CONFIG", [PathArgument], "keywords/obs_config", "Ensemble") - self.keywordTest("RESULT_PATH", [PathArgument], "keywords/result_path", "Ensemble") - self.keywordTest("LICENSE_PATH", [PathArgument], "keywords/license_path", "Ensemble") - self.keywordTest("LOCAL_CONFIG", [StringArgument], "keywords/local_config", "Ensemble") - - def test_run_keywords(self): - self.keywordTest("INSTALL_JOB", [StringArgument, PathArgument], "keywords/install_job", "Run") - self.keywordTest("DELETE_RUNPATH", [StringArgument], "keywords/delete_runpath", "Run") - self.keywordTest("KEEP_RUNPATH", [StringArgument], "keywords/keep_runpath", "Run") - self.keywordTest("RUNPATH", [PathArgument], "keywords/runpath", "Run") - self.keywordTest("RUNPATH_FILE", [PathArgument], "keywords/runpath_file", "Run") - self.keywordTest("FORWARD_MODEL", [StringArgument], "keywords/forward_model", "Run") - self.keywordTest("JOB_SCRIPT", [PathArgument], "keywords/job_script", "Run") - self.keywordTest("RUN_TEMPLATE", [PathArgument, StringArgument], "keywords/run_template", "Run") - self.keywordTest("LOG_LEVEL", [IntegerArgument], "keywords/log_level", "Run") - self.keywordTest("LOG_FILE", [PathArgument], "keywords/log_file", "Run") - self.keywordTest("MAX_SUBMIT", [IntegerArgument], "keywords/max_submit", "Run") - self.keywordTest("MAX_RESAMPLE", [IntegerArgument], "keywords/max_resample", "Run") - self.keywordTest("PRE_CLEAR_RUNPATH", [BoolArgument], "keywords/pre_clear_runpath", "Run") - - - - def test_control_simulations_keywords(self): - self.keywordTest("MAX_RUNTIME", [IntegerArgument], "keywords/max_runtime", "Simulation Control") - self.keywordTest("MIN_REALIZATIONS", [IntegerArgument,PercentArgument], "keywords/min_realizations", "Simulation Control") - self.keywordTest("STOP_LONG_RUNNING", [BoolArgument], "keywords/stop_long_running", "Simulation Control") - - def test_parametrization_keywords(self): - self.keywordTest("FIELD", [StringArgument,StringArgument,StringArgument], "keywords/field", "Parametrization") - self.keywordTest("GEN_DATA", [StringArgument,StringArgument,StringArgument], "keywords/gen_data", "Parametrization") - self.keywordTest("GEN_KW", [StringArgument,StringArgument,StringArgument], "keywords/gen_kw", "Parametrization") - self.keywordTest("GEN_KW_TAG_FORMAT", [StringArgument], "keywords/gen_kw_tag_format", "Parametrization") - self.keywordTest("GEN_PARAM", [StringArgument,StringArgument,StringArgument], "keywords/gen_param", "Parametrization") - self.keywordTest("SUMMARY", [StringArgument], "keywords/summary", "Parametrization") - self.keywordTest("DBASE_TYPE", [StringArgument], "keywords/dbase_type", "Parametrization") - self.keywordTest("STORE_SEED", [StringArgument], "keywords/store_seed", "Parametrization") - self.keywordTest("LOAD_SEED", [StringArgument], "keywords/load_seed", "Parametrization") - self.keywordTest("SURFACE", [StringArgument], "keywords/surface", "Parametrization") - - - def test_enkf_control_keywords(self): - self.keywordTest("ENKF_ALPHA", [FloatArgument], "keywords/enkf_alpha", "Enkf Control") - self.keywordTest("ENKF_BOOTSTRAP", [BoolArgument], "keywords/enkf_bootstrap", "Enkf Control") - self.keywordTest("ENKF_CV_FOLDS", [IntegerArgument], "keywords/enkf_cv_folds", "Enkf Control") - self.keywordTest("ENKF_FORCE_NCOMP", [BoolArgument], "keywords/enkf_force_ncomp", "Enkf Control") - self.keywordTest("ENKF_LOCAL_CV", [BoolArgument], "keywords/enkf_local_cv", "Enkf Control") - self.keywordTest("ENKF_PEN_PRESS", [BoolArgument], "keywords/enkf_pen_press", "Enkf Control") - self.keywordTest("ENKF_MODE", [StringArgument], "keywords/enkf_mode", "Enkf Control") - self.keywordTest("ENKF_MERGE_OBSERVATIONS", [BoolArgument], "keywords/enkf_merge_observations", "Enkf Control") - self.keywordTest("ENKF_NCOMP", [IntegerArgument], "keywords/enkf_ncomp", "Enkf Control") - self.keywordTest("ENKF_RERUN", [BoolArgument], "keywords/enkf_rerun", "Enkf Control") - self.keywordTest("RERUN_START", [IntegerArgument], "keywords/rerun_start", "Enkf Control") - self.keywordTest("ENKF_SCALING", [BoolArgument], "keywords/enkf_scaling", "Enkf Control") - self.keywordTest("ENKF_TRUNCATION", [FloatArgument], "keywords/enkf_truncation", "Enkf Control") - self.keywordTest("UPDATE_LOG_PATH", [PathArgument], "keywords/update_log_path", "Enkf Control") - self.keywordTest("UPDATE_RESULTS", [BoolArgument], "keywords/update_results", "Enkf Control") - self.keywordTest("ENKF_CROSS_VALIDATION", [StringArgument], "keywords/enkf_cross_validation", "Enkf Control") - self.keywordTest("ENKF_KERNEL_REGRESSION", [StringArgument], "keywords/enkf_kernel_regression", "Enkf Control") - self.keywordTest("ENKF_KERNEL_FUNCTION", [StringArgument], "keywords/enkf_kernel_function", "Enkf Control") - self.keywordTest("ENKF_KERNEL_PARAM", [StringArgument], "keywords/enkf_kernel_param", "Enkf Control") - self.keywordTest("ENKF_SCHED_FILE", [PathArgument], "keywords/enkf_sched_file", "Enkf Control") - self.keywordTest("CASE_TABLE", [StringArgument], "keywords/case_table", "Enkf Control") - self.keywordTest("CONTAINER", [StringArgument], "keywords/container", "Enkf Control") - - - - def test_analysis_module_keywords(self): - self.keywordTest("ANALYSIS_LOAD", [StringArgument,StringArgument], "keywords/analysis_load", "Analysis Module") - self.keywordTest("ANALYSIS_SELECT", [StringArgument], "keywords/analysis_select", "Analysis Module") - self.keywordTest("ANALYSIS_SET_VAR", [StringArgument, StringArgument, StringArgument], "keywords/analysis_set_var", "Analysis Module") - self.keywordTest("ANALYSIS_COPY", [StringArgument, StringArgument], "keywords/analysis_copy", "Analysis Module") - self.keywordTest("ITER_CASE", [ProperNameFormatArgument], "keywords/iter_case", "Analysis Module") - self.keywordTest("ITER_COUNT", [IntegerArgument], "keywords/iter_count", "Analysis Module") - self.keywordTest("STD_CUTOFF", [FloatArgument], "keywords/std_cutoff", "Analysis Module") - self.keywordTest("SINGLE_NODE_UPDATE", [BoolArgument], "keywords/single_node_update", "Analysis Module") - - - def test_advanced_keywords(self): - self.keywordTest("ADD_FIXED_LENGTH_SCHEDULE_KW", [StringArgument, StringArgument], "keywords/add_fixed_length_schedule_kw", "Advanced") - self.keywordTest("ADD_STATIC_KW", [StringArgument, StringArgument], "keywords/add_static_kw", "Advanced") - self.keywordTest("DEFINE", [ProperNameArgument, StringArgument], "keywords/define", "Advanced") - self.keywordTest("SCHEDULE_PREDICTION_FILE", [PathArgument], "keywords/schedule_prediction_file", "Advanced") - - def test_queue_system_keywords(self): - self.keywordTest("QUEUE_SYSTEM", [StringArgument], "keywords/queue_system", "Queue System") - self.keywordTest("QUEUE_OPTION", [StringArgument, StringArgument, StringArgument], "keywords/queue_option", "Queue System") - self.keywordTest("LSF_SERVER", [StringArgument], "keywords/lsf_server", "Queue System") - self.keywordTest("LSF_QUEUE", [StringArgument], "keywords/lsf_queue", "Queue System") - self.keywordTest("LSF_RESOURCES", [StringArgument], "keywords/lsf_resources", "Queue System") - self.keywordTest("MAX_RUNNING_LSF", [IntegerArgument], "keywords/max_running_lsf", "Queue System") - self.keywordTest("TORQUE_QUEUE", [StringArgument], "keywords/torque_queue", "Queue System") - self.keywordTest("MAX_RUNNING_LOCAL", [IntegerArgument], "keywords/max_running_local", "Queue System") - self.keywordTest("RSH_HOST", [StringArgument, StringArgument], "keywords/rsh_host", "Queue System") - self.keywordTest("RSH_COMMAND", [PathArgument], "keywords/rsh_command", "Queue System") - self.keywordTest("MAX_RUNNING_RSH", [IntegerArgument], "keywords/max_running_rsh", "Queue System") - self.keywordTest("HOST_TYPE", [StringArgument], "keywords/host_type", "Queue System") - - - def test_plot_keywords(self): - self.keywordTest("IMAGE_VIEWER", [PathArgument], "keywords/image_viewer", "Plot") - self.keywordTest("IMAGE_TYPE", [StringArgument], "keywords/image_type", "Plot") - self.keywordTest("PLOT_DRIVER", [StringArgument], "keywords/plot_driver", "Plot") - self.keywordTest("PLOT_ERRORBAR", [BoolArgument], "keywords/plot_errorbar", "Plot") - self.keywordTest("PLOT_ERRORBAR_MAX", [IntegerArgument], "keywords/plot_errorbar_max", "Plot") - self.keywordTest("PLOT_WIDTH", [IntegerArgument], "keywords/plot_width", "Plot") - self.keywordTest("PLOT_HEIGHT", [IntegerArgument], "keywords/plot_height", "Plot") - self.keywordTest("PLOT_REFCASE", [BoolArgument], "keywords/plot_refcase", "Plot") - self.keywordTest("PLOT_REFCASE_LIST", [StringArgument], "keywords/plot_refcase_list", "Plot") - self.keywordTest("PLOT_PATH", [PathArgument], "keywords/plot_path", "Plot") - self.keywordTest("RFT_CONFIG", [PathArgument], "keywords/rft_config", "Plot") - self.keywordTest("RFTPATH", [PathArgument], "keywords/rftpath", "Plot") - - def test_workflow_keywords(self): - self.keywordTest("INTERNAL", [BoolArgument], "keywords/internal", "Workflow Jobs") - self.keywordTest("FUNCTION", [StringArgument], "keywords/function", "Workflow Jobs") - self.keywordTest("MODULE", [PathArgument], "keywords/module", "Workflow Jobs") - self.keywordTest("EXECUTABLE", [PathArgument], "keywords/executable", "Workflow Jobs") - self.keywordTest("MIN_ARG", [IntegerArgument], "keywords/min_arg", "Workflow Jobs") - self.keywordTest("MAX_ARG", [IntegerArgument], "keywords/max_arg", "Workflow Jobs") - self.keywordTest("ARG_TYPE", [StringArgument], "keywords/arg_type", "Workflow Jobs") - self.keywordTest("LOAD_WORKFLOW_JOB", [StringArgument], "keywords/load_workflow_job", "Workflow Jobs") - self.keywordTest("WORKFLOW_JOB_DIRECTORY", [PathArgument], "keywords/workflow_job_directory", "Workflow Jobs") - self.keywordTest("LOAD_WORKFLOW", [PathArgument, StringArgument], "keywords/load_workflow", "Workflow Jobs") - - def test_qc_keywords(self): - self.keywordTest("QC_WORKFLOW", [StringArgument], "keywords/qc_workflow", "Quality Check") - self.keywordTest("QC_PATH", [PathArgument], "keywords/qc_path", "Quality Check") - - def test_unix_environment_keywords(self): - self.keywordTest("SETENV", [StringArgument, StringArgument], "keywords/setenv", "Unix") - self.keywordTest("UMASK", [IntegerArgument], "keywords/umask", "Unix") - self.keywordTest("UPDATE_PATH", [StringArgument,PathArgument], "keywords/update_path", "Unix") - - - diff --git a/ThirdParty/Ert/python/tests/gui/ide/test_float_argument.py b/ThirdParty/Ert/python/tests/gui/ide/test_float_argument.py deleted file mode 100644 index 376ea3e87d..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ide/test_float_argument.py +++ /dev/null @@ -1,99 +0,0 @@ -from ert_gui.ide.keywords.definitions import FloatArgument -from ert.test import ExtendedTestCase - - -class FloatArgumentTest(ExtendedTestCase): - - def test_default_float_argument(self): - f = FloatArgument() - - validation_status = f.validate("45.0") - - self.assertTrue(validation_status) - self.assertEqual(validation_status.value(), 45.0) - self.assertEqual(validation_status.message(), "") - - - validation_status = f.validate("-45.0") - - self.assertTrue(validation_status) - self.assertEqual(validation_status.value(), -45) - - - validation_status = f.validate("45.0 ") - - self.assertFalse(validation_status) - self.assertNotEqual(validation_status.message(), "") - self.assertIsNone(validation_status.value()) - - validation_status = f.validate("gx") - - self.assertFalse(validation_status) - self.assertNotEqual(validation_status.message(), "") - - - def test_float_range_argument_from(self): - from_value = 9.9 - f = FloatArgument(from_value=from_value) - - validation_status = f.validate("%f" % from_value) - self.assertTrue(validation_status) - - value = 9.85 - validation_status = f.validate("%f" % value) - self.assertFalse(validation_status) - - range_string = "%f <= %f" % (from_value, value) - self.assertEqual(validation_status.message(), FloatArgument.NOT_IN_RANGE % range_string) - - - def test_float_range_argument_to(self): - to_value = 9.9 - f = FloatArgument(to_value=to_value) - - validation_status = f.validate("%f" % to_value) - self.assertTrue(validation_status) - - value = 9.91 - validation_status = f.validate("%f" % value) - self.assertFalse(validation_status) - - range_string = "%f <= %f" % (value, to_value) - self.assertEqual(validation_status.message(), FloatArgument.NOT_IN_RANGE % range_string) - - - def test_float_range_argument(self): - from_value = 1.0 - to_value = 1.1 - f = FloatArgument(from_value=from_value, to_value=to_value) - - validation_status = f.validate("%f" % to_value) - self.assertTrue(validation_status) - - validation_status = f.validate("%f" % from_value) - self.assertTrue(validation_status) - - validation_status = f.validate("%f" % 1.05) - self.assertTrue(validation_status) - - value = 0.9 - validation_status = f.validate("%f" % value) - self.assertFalse(validation_status) - - range_string = "%f <= %f <= %f" % (from_value, value, to_value) - self.assertEqual(validation_status.message(), FloatArgument.NOT_IN_RANGE % range_string) - - value = 1.15 - validation_status = f.validate("%f" % value) - self.assertFalse(validation_status) - - range_string = "%f <= %f <= %f" % (from_value, value, to_value) - self.assertEqual(validation_status.message(), FloatArgument.NOT_IN_RANGE % range_string) - - - - - - - - diff --git a/ThirdParty/Ert/python/tests/gui/ide/test_integer_argument.py b/ThirdParty/Ert/python/tests/gui/ide/test_integer_argument.py deleted file mode 100644 index e40597416c..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ide/test_integer_argument.py +++ /dev/null @@ -1,99 +0,0 @@ -from ert_gui.ide.keywords.definitions import IntegerArgument -from ert.test import ExtendedTestCase - - -class IntegerArgumentTest(ExtendedTestCase): - - def test_default_integer_argument(self): - integer = IntegerArgument() - - validation_status = integer.validate("45") - - self.assertTrue(validation_status) - self.assertEqual(validation_status.value(), 45) - self.assertEqual(validation_status.message(), "") - - - validation_status = integer.validate("-45") - - self.assertTrue(validation_status) - self.assertEqual(validation_status.value(), -45) - - - validation_status = integer.validate("45 ") - - self.assertFalse(validation_status) - self.assertNotEqual(validation_status.message(), "") - self.assertIsNone(validation_status.value()) - - validation_status = integer.validate("gx") - - self.assertFalse(validation_status) - self.assertNotEqual(validation_status.message(), "") - - - def test_integer_range_argument_from(self): - from_value = 99 - integer = IntegerArgument(from_value=from_value) - - validation_status = integer.validate("%d" % from_value) - self.assertTrue(validation_status) - - value = 98 - validation_status = integer.validate("%d" % value) - self.assertFalse(validation_status) - - range_string = "%d <= %d" % (from_value, value) - self.assertEqual(validation_status.message(), IntegerArgument.NOT_IN_RANGE % range_string) - - - def test_integer_range_argument_to(self): - to_value = 99 - integer = IntegerArgument(to_value=to_value) - - validation_status = integer.validate("%d" % to_value) - self.assertTrue(validation_status) - - value = 100 - validation_status = integer.validate("%d" % value) - self.assertFalse(validation_status) - - range_string = "%d <= %d" % (value, to_value) - self.assertEqual(validation_status.message(), IntegerArgument.NOT_IN_RANGE % range_string) - - - def test_integer_range_argument(self): - from_value = 10 - to_value = 20 - integer = IntegerArgument(from_value=from_value, to_value=to_value) - - validation_status = integer.validate("%d" % to_value) - self.assertTrue(validation_status) - - validation_status = integer.validate("%d" % from_value) - self.assertTrue(validation_status) - - validation_status = integer.validate("%d" % 15) - self.assertTrue(validation_status) - - value = 9 - validation_status = integer.validate("%d" % value) - self.assertFalse(validation_status) - - range_string = "%d <= %d <= %d" % (from_value, value, to_value) - self.assertEqual(validation_status.message(), IntegerArgument.NOT_IN_RANGE % range_string) - - value = 21 - validation_status = integer.validate("%d" % value) - self.assertFalse(validation_status) - - range_string = "%d <= %d <= %d" % (from_value, value, to_value) - self.assertEqual(validation_status.message(), IntegerArgument.NOT_IN_RANGE % range_string) - - - - - - - - diff --git a/ThirdParty/Ert/python/tests/gui/ide/test_path_argument.py b/ThirdParty/Ert/python/tests/gui/ide/test_path_argument.py deleted file mode 100644 index 1bac902d4e..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ide/test_path_argument.py +++ /dev/null @@ -1,15 +0,0 @@ -from ert_gui.ide.keywords.definitions import PathArgument -from ert.test import ExtendedTestCase - - -class PathArgumentTest(ExtendedTestCase): - - def test_path_argument(self): - - path_arg = PathArgument() - - validation_status = path_arg.validate("/non_existing_file") - self.assertFalse(validation_status) - - validation_status = path_arg.validate(__file__) - self.assertTrue(validation_status) diff --git a/ThirdParty/Ert/python/tests/gui/ide/test_percent_argument.py b/ThirdParty/Ert/python/tests/gui/ide/test_percent_argument.py deleted file mode 100644 index d7afffc7c0..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ide/test_percent_argument.py +++ /dev/null @@ -1,99 +0,0 @@ -from ert_gui.ide.keywords.definitions import PercentArgument -from ert.test import ExtendedTestCase - - -class PercentArgumentTest(ExtendedTestCase): - - def test_default_percent_argument(self): - percent = PercentArgument() - - validation_status = percent.validate("45%") - - self.assertTrue(validation_status) - self.assertEqual(validation_status.value(), 0.45) - self.assertEqual(validation_status.message(), "") - - - validation_status = percent.validate("-45%") - - self.assertTrue(validation_status) - self.assertEqual(validation_status.value(), -0.45) - - - validation_status = percent.validate("45") - - self.assertFalse(validation_status) - self.assertNotEqual(validation_status.message(), "") - self.assertIsNone(validation_status.value()) - - validation_status = percent.validate("gx") - - self.assertFalse(validation_status) - self.assertNotEqual(validation_status.message(), "") - - - def test_percent_range_argument_from(self): - from_value = 99 - percent = PercentArgument(from_value=from_value) - - validation_status = percent.validate("%d%%" % from_value) - self.assertTrue(validation_status) - - value = 98 - validation_status = percent.validate("%d%%" % value) - self.assertFalse(validation_status) - - range_string = "%g %% <= %g %%" % (from_value, value) - self.assertEqual(validation_status.message(), PercentArgument.NOT_IN_RANGE % range_string) - - - def test_percent_range_argument_to(self): - to_value = 99 - percent = PercentArgument(to_value=to_value) - - validation_status = percent.validate("%d%%" % to_value) - self.assertTrue(validation_status) - - value = 100 - validation_status = percent.validate("%d%%" % value) - self.assertFalse(validation_status) - - range_string = "%g%% <= %g%%" % (value, to_value) - self.assertEqual(validation_status.message(), PercentArgument.NOT_IN_RANGE % range_string) - - - def test_percent_range_argument(self): - from_value = 10 - to_value = 20 - percent = PercentArgument(from_value=from_value, to_value=to_value) - - validation_status = percent.validate("%d%%" % to_value) - self.assertTrue(validation_status) - - validation_status = percent.validate("%d%%" % from_value) - self.assertTrue(validation_status) - - validation_status = percent.validate("%d%%" % 15) - self.assertTrue(validation_status) - - value = 9 - validation_status = percent.validate("%d%%" % value) - self.assertFalse(validation_status) - - range_string = "%g%% <= %g%% <= %g%%" % (from_value, value, to_value) - self.assertEqual(validation_status.message(), PercentArgument.NOT_IN_RANGE % range_string) - - value = 21 - validation_status = percent.validate("%d%%" % value) - self.assertFalse(validation_status) - - range_string = "%g%% <= %g%% <= %g%%" % (from_value, value, to_value) - self.assertEqual(validation_status.message(), PercentArgument.NOT_IN_RANGE % range_string) - - - - - - - - diff --git a/ThirdParty/Ert/python/tests/gui/ide/test_proper_name_argument.py b/ThirdParty/Ert/python/tests/gui/ide/test_proper_name_argument.py deleted file mode 100644 index 1d754feef1..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ide/test_proper_name_argument.py +++ /dev/null @@ -1,18 +0,0 @@ -from ert_gui.ide.keywords.definitions import ProperNameArgument -from ert.test import ExtendedTestCase - - -class ProperNameArgumentTest(ExtendedTestCase): - - def test_proper_name_argument(self): - - argument = ProperNameArgument() - - self.assertTrue(argument.validate("NAME")) - self.assertTrue(argument.validate("__NAME__")) - self.assertTrue(argument.validate("")) - self.assertTrue(argument.validate("-NAME-")) - - self.assertFalse(argument.validate("-NA ME-")) - self.assertFalse(argument.validate("NAME*")) - diff --git a/ThirdParty/Ert/python/tests/gui/ide/test_proper_name_format_argument.py b/ThirdParty/Ert/python/tests/gui/ide/test_proper_name_format_argument.py deleted file mode 100644 index f6f1ccb180..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ide/test_proper_name_format_argument.py +++ /dev/null @@ -1,18 +0,0 @@ -from ert_gui.ide.keywords.definitions import ProperNameFormatArgument -from ert.test import ExtendedTestCase - - -class ProperNameFormatArgumentTest(ExtendedTestCase): - - def test_proper_name_format_argument(self): - - argument = ProperNameFormatArgument() - - self.assertTrue(argument.validate("NAME%d")) - self.assertTrue(argument.validate("__NA%dME__")) - self.assertTrue(argument.validate("%d")) - self.assertTrue(argument.validate("%d-NAME-")) - - self.assertFalse(argument.validate("-%dNA ME-")) - self.assertFalse(argument.validate("NAME*%d")) - diff --git a/ThirdParty/Ert/python/tests/gui/ide/test_proper_name_format_string_argument.py b/ThirdParty/Ert/python/tests/gui/ide/test_proper_name_format_string_argument.py deleted file mode 100644 index 8fa3ecd2ef..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ide/test_proper_name_format_string_argument.py +++ /dev/null @@ -1,21 +0,0 @@ -from ert_gui.ide.keywords.definitions import ProperNameFormatStringArgument -from ert.test import ExtendedTestCase - - -class ProperNameFormatStringArgumentTest(ExtendedTestCase): - - def test_proper_name_format_string_argument(self): - - argument = ProperNameFormatStringArgument() - - self.assertTrue(argument.validate("NAME%s")) - self.assertTrue(argument.validate("__NA%sME__")) - self.assertTrue(argument.validate("%s")) - self.assertTrue(argument.validate("%s-NAME-")) - self.assertTrue(argument.validate("%s")) - self.assertTrue(argument.validate(".NA.ME%s.")) - - self.assertFalse(argument.validate("-%sNA ME-")) - self.assertFalse(argument.validate("NAME*%s")) - self.assertFalse(argument.validate("")) - diff --git a/ThirdParty/Ert/python/tests/gui/ide/test_range_string_argument.py b/ThirdParty/Ert/python/tests/gui/ide/test_range_string_argument.py deleted file mode 100644 index a3612cec84..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ide/test_range_string_argument.py +++ /dev/null @@ -1,28 +0,0 @@ -from ert_gui.ide.keywords.definitions.range_string_argument import RangeStringArgument -from ert.test import ExtendedTestCase - - -class RangeStringArgumentTest(ExtendedTestCase): - - def test_proper_name_argument(self): - - argument = RangeStringArgument() - - self.assertTrue(argument.validate("1")) - self.assertTrue(argument.validate("1-10")) - self.assertTrue(argument.validate("1-10,11-20")) - self.assertTrue(argument.validate("1-10,11,12,13,14,15,16-20")) - - self.assertFalse(argument.validate("s5")) - self.assertFalse(argument.validate("1-10,5-4*")) - - - self.assertTrue(argument.validate("1 - 5, 2,3 ,4")) - self.assertTrue(argument.validate("1 - 5, 2 ,3 ,4")) - - - argument = RangeStringArgument(max_value=10) - - self.assertTrue(argument.validate("1-5, 9")) - self.assertFalse(argument.validate("10")) - diff --git a/ThirdParty/Ert/python/tests/gui/ide/test_tokens.py b/ThirdParty/Ert/python/tests/gui/ide/test_tokens.py deleted file mode 100644 index 60285f0dc5..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ide/test_tokens.py +++ /dev/null @@ -1,60 +0,0 @@ -from ert_gui.ide.keywords.data import Keyword, Argument, Token -from ert_gui.ide.keywords.definitions import KeywordDefinition, StringArgument -from ert.test import ExtendedTestCase - - -class TokenTest(ExtendedTestCase): - def test_token(self): - line = "some words in a line" - token = Token(5, 10, line) - - self.assertEqual(token.value(), "words") - self.assertEqual(token.fromIndex(), 5) - self.assertEqual(token.toIndex(), 10) - self.assertEqual(token.count(), 5) - self.assertTrue(5 in token) - self.assertTrue(9 in token) - self.assertTrue(not 10 in token) - - - def test_empty_token(self): - token = Token(4, 4, "text") - - self.assertEqual(token.value(), "") - - def test_keyword(self): - num_realizations = "NUM_REALIZATIONS" - - keyword_def = KeywordDefinition(num_realizations) - - keyword = Keyword(0, 16, num_realizations) - keyword.setKeywordDefinition(keyword_def) - - self.assertEqual(keyword.value(), num_realizations) - self.assertEqual(keyword_def, keyword.keywordDefinition()) - self.assertTrue(keyword.hasKeywordDefinition()) - - - def test_argument(self): - text = "KEYWORD arg1 arg2" - - arg1 = Argument(8, 12, text) - arg1.setArgumentDefinition(StringArgument()) - - arg2 = Argument(13, 17, text) - - self.assertEqual(arg1.value(), "arg1") - self.assertEqual(arg2.value(), "arg2") - - self.assertEqual(arg2.line(), text) - - self.assertTrue(arg1.hasArgumentDefinition()) - self.assertIsInstance(arg1.argumentDefinition(), StringArgument) - - self.assertFalse(arg2.hasArgumentDefinition()) - self.assertIsNone(arg2.argumentDefinition()) - - - - - diff --git a/ThirdParty/Ert/python/tests/gui/ide/wizards/CMakeLists.txt b/ThirdParty/Ert/python/tests/gui/ide/wizards/CMakeLists.txt deleted file mode 100644 index 3125ba406f..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ide/wizards/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -set(TEST_SOURCES - __init__.py - test_tree_structure.py -) - -add_python_package("python.tests.gui.ide.wizards" ${PYTHON_INSTALL_PREFIX}/tests/gui/ide/wizards "${TEST_SOURCES}" False) - -addPythonTest(gui.ide.wizards.tree_structure tests.gui.ide.wizards.test_tree_structure.TreeStructureTest) \ No newline at end of file diff --git a/ThirdParty/Ert/python/tests/gui/ide/wizards/__init__.py b/ThirdParty/Ert/python/tests/gui/ide/wizards/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/python/tests/gui/ide/wizards/test_tree_structure.py b/ThirdParty/Ert/python/tests/gui/ide/wizards/test_tree_structure.py deleted file mode 100644 index 402a7346fd..0000000000 --- a/ThirdParty/Ert/python/tests/gui/ide/wizards/test_tree_structure.py +++ /dev/null @@ -1,65 +0,0 @@ -from PyQt4.QtCore import Qt -from ert_gui.ide.wizards import TreeItem, TreeModel -from ert.test import ExtendedTestCase - - -class TreeStructureTest(ExtendedTestCase): - - def test_tree_item(self): - - root = TreeItem("Root") - - self.assertIsNone(root.parent()) - self.assertEqual(root.name(), "Root") - self.assertEqual(len(root), 0) - - with self.assertRaises(IndexError): - root.child(0) - - self.assertIsNone(root.data()) - - child_1 = TreeItem("Child1") - - child = root.addChild(child_1) - - self.assertEqual(child, child_1) - self.assertEqual(len(root), 1) - self.assertEqual(root.child(0), child_1) - self.assertEqual(child_1.parent(), root) - - def test_tree_model(self): - root = TreeItem("Wizards") - - root.addChild(TreeItem("One")) - - child = root.addChild(TreeItem("Two")) - child.addChild(TreeItem("SubOne")) - child.addChild(TreeItem("SubTwo")) - - child_item = root.addChild(TreeItem("Three")) - - tree = TreeModel(root) - - self.assertEqual(tree.headerData(0, Qt.Horizontal), root.name()) - - name1 = tree.data(tree.index(0, 0)) - self.assertEqual(name1, "One") - - name2_index = tree.index(1, 0) - sub_name2_index = tree.index(1, 0, name2_index) - - self.assertEqual(tree.data(sub_name2_index), "SubTwo") - - - tree_item = tree.item(tree.index(2, 0)) - - self.assertEqual(child_item, tree_item) - - self.assertTrue(tree.data(tree.index(3, 0)).isNull()) - - - - - - - diff --git a/ThirdParty/Ert/python/tests/gui/plottery/CMakeLists.txt b/ThirdParty/Ert/python/tests/gui/plottery/CMakeLists.txt deleted file mode 100644 index 3dd35e54c7..0000000000 --- a/ThirdParty/Ert/python/tests/gui/plottery/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -set(TEST_SOURCES - __init__.py - test_plot_style.py - test_plot_config_history.py - test_plot_limits.py -) - -add_python_package("python.tests.gui.plottery" ${PYTHON_INSTALL_PREFIX}/tests/gui/plottery "${TEST_SOURCES}" False) - -addPythonTest(gui.plottery.plot_style gui.plottery.test_plot_style.PlotStyleTest) -addPythonTest(gui.plottery.plot_config_history gui.plottery.test_plot_config_history.PlotConfigHistoryTest) -addPythonTest(gui.plottery.plot_limits gui.plottery.test_plot_limits.PlotLimitsTest) \ No newline at end of file diff --git a/ThirdParty/Ert/python/tests/gui/plottery/__init__.py b/ThirdParty/Ert/python/tests/gui/plottery/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/python/tests/gui/plottery/test_plot_config_history.py b/ThirdParty/Ert/python/tests/gui/plottery/test_plot_config_history.py deleted file mode 100644 index f992f779b8..0000000000 --- a/ThirdParty/Ert/python/tests/gui/plottery/test_plot_config_history.py +++ /dev/null @@ -1,44 +0,0 @@ -from ert.test import ExtendedTestCase -from ert_gui.plottery import PlotConfig, PlotConfigHistory - - -class PlotConfigHistoryTest(ExtendedTestCase): - - def test_plot_config_history(self): - test_pc = PlotConfig("test_1") - history = PlotConfigHistory("test", test_pc) - - self.assertEqual(history.getPlotConfig().title(), test_pc.title()) - self.assertNotEqual(history.getPlotConfig(), test_pc) - - self.assertFalse(history.isUndoPossible()) - self.assertFalse(history.isRedoPossible()) - - history.applyChanges(PlotConfig("test_2")) - self.assertTrue(history.isUndoPossible()) - self.assertFalse(history.isRedoPossible()) - self.assertEqual(history.getPlotConfig().title(), "test_2") - - history.undoChanges() - self.assertFalse(history.isUndoPossible()) - self.assertTrue(history.isRedoPossible()) - self.assertEqual(history.getPlotConfig().title(), "test_1") - - history.redoChanges() - self.assertTrue(history.isUndoPossible()) - self.assertFalse(history.isRedoPossible()) - self.assertEqual(history.getPlotConfig().title(), "test_2") - - history.resetChanges() - self.assertTrue(history.isUndoPossible()) - self.assertFalse(history.isRedoPossible()) - self.assertEqual(history.getPlotConfig().title(), "test_1") - - history.undoChanges() - self.assertTrue(history.isUndoPossible()) - self.assertTrue(history.isRedoPossible()) - self.assertEqual(history.getPlotConfig().title(), "test_2") - - - - diff --git a/ThirdParty/Ert/python/tests/gui/plottery/test_plot_limits.py b/ThirdParty/Ert/python/tests/gui/plottery/test_plot_limits.py deleted file mode 100644 index f85140916c..0000000000 --- a/ThirdParty/Ert/python/tests/gui/plottery/test_plot_limits.py +++ /dev/null @@ -1,124 +0,0 @@ -import datetime - -from ert.test import ExtendedTestCase -from ert_gui.plottery import PlotLimits - - -class PlotLimitsTest(ExtendedTestCase): - - def test_plot_limits_construction(self): - plot_limits = PlotLimits() - self.assertEqual(plot_limits.value_minimum, None) - self.assertEqual(plot_limits.value_maximum, None) - self.assertEqual(plot_limits.value_limits, (None, None)) - - self.assertEqual(plot_limits.index_minimum, None) - self.assertEqual(plot_limits.index_maximum, None) - self.assertEqual(plot_limits.index_limits, (None, None)) - - self.assertEqual(plot_limits.count_minimum, None) - self.assertEqual(plot_limits.count_maximum, None) - self.assertEqual(plot_limits.count_limits, (None, None)) - - self.assertEqual(plot_limits.density_minimum, None) - self.assertEqual(plot_limits.density_maximum, None) - self.assertEqual(plot_limits.density_limits, (None, None)) - - self.assertEqual(plot_limits.depth_minimum, None) - self.assertEqual(plot_limits.depth_maximum, None) - self.assertEqual(plot_limits.depth_limits, (None, None)) - - self.assertEqual(plot_limits.date_minimum, None) - self.assertEqual(plot_limits.date_maximum, None) - self.assertEqual(plot_limits.date_limits, (None, None)) - - - def test_plot_limits(self): - plot_limits = PlotLimits() - limit_names = ["value", "index", "count", "density", "depth", "date"] - - non_numbers = ["string", datetime.date(2001, 1, 1), "3.0", "1e-5", "-5.5", "-.5"] - - positive_floats = [1.0, 1.5, 3.1415, 1e10, 5.2e-7] - negative_floats = [-1.0, -1.5, -3.1415, -1e10, -5.2e-7] - positive_ints = [1, 5, 1000] - negative_ints = [-1, -5, -1000] - - non_dates = ["string", "3.4", "2001-01-01", datetime.time()] - dates = [datetime.date(2001, 1, 1), datetime.datetime(2010, 3, 3)] - - setter_should_fail_values = { - "value": non_numbers + dates, - "index": non_numbers + positive_floats + negative_floats + dates, - "depth": non_numbers + negative_floats + negative_ints + negative_ints, - "count": non_numbers + negative_ints + negative_floats + positive_floats, - "density": non_numbers + negative_floats + negative_ints, - "date": non_dates - } - - setter_should_succeed_values = { - "value": positive_floats + negative_floats + positive_ints + negative_ints, - "index": positive_ints, - "depth": positive_floats + positive_ints, - "count": positive_ints, - "density": positive_floats + positive_ints, - "date": dates - } - - for attribute_name in limit_names: - self.assertIsNone(getattr(plot_limits, "%s_minimum" % attribute_name)) - self.assertIsNone(getattr(plot_limits, "%s_maximum" % attribute_name)) - self.assertTupleEqual(getattr(plot_limits, "%s_limits" % attribute_name), (None, None)) - - with self.assertNotRaises(): - setattr(plot_limits, "%s_minimum" % attribute_name, None) - setattr(plot_limits, "%s_maximum" % attribute_name, None) - setattr(plot_limits, "%s_limits" % attribute_name, (None, None)) - - with self.assertRaises(TypeError): - setattr(plot_limits, "%s_limits" % attribute_name, None) - - for value in setter_should_fail_values[attribute_name]: - with self.assertRaises((TypeError, ValueError)): - setattr(plot_limits, "%s_minimum" % attribute_name, value) - - with self.assertRaises((TypeError, ValueError)): - setattr(plot_limits, "%s_maximum" % attribute_name, value) - - self.assertTupleEqual(getattr(plot_limits, "%s_limits" % attribute_name), (None, None)) - - for value in setter_should_succeed_values[attribute_name]: - with self.assertNotRaises(): - setattr(plot_limits, "%s_minimum" % attribute_name, value) - setattr(plot_limits, "%s_maximum" % attribute_name, value) - - minimum = getattr(plot_limits, "%s_minimum" % attribute_name) - maximum = getattr(plot_limits, "%s_maximum" % attribute_name) - - self.assertEqual(minimum, value) - self.assertEqual(maximum, value) - - self.assertTupleEqual(getattr(plot_limits, "%s_limits" % attribute_name), (minimum, maximum)) - - - def test_copy_plot_limits(self): - plot_limits = PlotLimits() - plot_limits.value_limits = 1, 2 - plot_limits.index_limits = 3, 4 - plot_limits.count_limits = 5, 6 - plot_limits.depth_limits = 7, 8 - plot_limits.density_limits = 9, 10 - plot_limits.date_limits = datetime.date(1999, 1, 1), datetime.date(1999, 12, 31) - - copy_of_plot_limits = PlotLimits() - - copy_of_plot_limits.copyLimitsFrom(plot_limits) - - self.assertEqual(copy_of_plot_limits, plot_limits) - - self.assertEqual(copy_of_plot_limits.value_limits, (1, 2)) - self.assertEqual(copy_of_plot_limits.index_limits, (3, 4)) - self.assertEqual(copy_of_plot_limits.count_limits, (5, 6)) - self.assertEqual(copy_of_plot_limits.depth_limits, (7, 8)) - self.assertEqual(copy_of_plot_limits.density_limits, (9, 10)) - self.assertEqual(copy_of_plot_limits.date_limits, (datetime.date(1999, 1, 1), datetime.date(1999, 12, 31))) diff --git a/ThirdParty/Ert/python/tests/gui/plottery/test_plot_style.py b/ThirdParty/Ert/python/tests/gui/plottery/test_plot_style.py deleted file mode 100644 index dbc415da98..0000000000 --- a/ThirdParty/Ert/python/tests/gui/plottery/test_plot_style.py +++ /dev/null @@ -1,162 +0,0 @@ -import datetime - -from ert.test import ExtendedTestCase -from ert_gui.plottery import PlotStyle, PlotConfig, PlotLimits - - -class PlotStyleTest(ExtendedTestCase): - - def test_plot_style_test_defaults(self): - style = PlotStyle("Test") - - self.assertEqual(style.name, "Test") - self.assertEqual(style.color, "#000000") - self.assertEqual(style.line_style, "-") - self.assertEqual(style.alpha, 1.0) - self.assertEqual(style.marker, "") - self.assertEqual(style.width, 1.0) - self.assertEqual(style.size, 7.5) - self.assertTrue(style.isEnabled()) - - style.line_style = None - style.marker = None - - self.assertEqual(style.line_style, "") - self.assertEqual(style.marker, "") - - - def test_plot_style_builtin_checks(self): - style = PlotStyle("Test") - - style.name = None - self.assertIsNone(style.name) - - style.color = "notacolor" - self.assertEqual(style.color, "notacolor") # maybe make this a proper check in future ? - - style.line_style = None - self.assertEqual(style.line_style, "") - - style.marker = None - self.assertEqual(style.marker, "") - - style.width = -1 - self.assertEqual(style.width, 0.0) - - style.size = -1 - self.assertEqual(style.size, 0.0) - - style.alpha = 1.1 - self.assertEqual(style.alpha, 1.0) - - style.alpha = -0.1 - self.assertEqual(style.alpha, 0.0) - - style.setEnabled(False) - self.assertFalse(style.isEnabled()) - - - def test_plot_style_copy_style(self): - style = PlotStyle("Test", "red", 0.5, ".", "o", 2.5) - style.setEnabled(False) - - copy_style = PlotStyle("Copy") - - copy_style.copyStyleFrom(style) - - self.assertNotEqual(style.name, copy_style.name) - self.assertEqual(style.color, copy_style.color) - self.assertEqual(style.alpha, copy_style.alpha) - self.assertEqual(style.line_style, copy_style.line_style) - self.assertEqual(style.marker, copy_style.marker) - self.assertEqual(style.width, copy_style.width) - self.assertEqual(style.size, copy_style.size) - self.assertNotEqual(style.isEnabled(), copy_style.isEnabled()) - - another_copy_style = PlotStyle("Another Copy") - another_copy_style.copyStyleFrom(style, copy_enabled_state=True) - self.assertEqual(style.isEnabled(), another_copy_style.isEnabled()) - - - def test_plot_config(self): - plot_config = PlotConfig("Golden Sample", x_label="x", y_label="y") - - limits = PlotLimits() - limits.count_limits = 1, 2 - limits.depth_limits = 3, 4 - limits.density_limits = 5, 6 - limits.date_limits = datetime.date(2005, 2, 5), datetime.date(2006, 2, 6) - limits.index_limits = 7, 8 - limits.value_limits = 9.0, 10.0 - - plot_config.limits = limits - self.assertEqual(plot_config.limits, limits) - - plot_config.setDistributionLineEnabled(True) - plot_config.setLegendEnabled(False) - plot_config.setGridEnabled(False) - plot_config.setRefcaseEnabled(False) - plot_config.setObservationsEnabled(False) - - style = PlotStyle("test_style", line_style=".", marker="g", width=2.5, size=7.5) - - plot_config.setDefaultStyle(style) - plot_config.setRefcaseStyle(style) - plot_config.setStatisticsStyle("mean", style) - plot_config.setStatisticsStyle("min-max", style) - plot_config.setStatisticsStyle("p50", style) - plot_config.setStatisticsStyle("p10-p90", style) - plot_config.setStatisticsStyle("p33-p67", style) - plot_config.setStatisticsStyle("std", style) - - copy_of_plot_config = PlotConfig("Copy of Golden Sample") - copy_of_plot_config.copyConfigFrom(plot_config) - - self.assertEqual(plot_config.isLegendEnabled(), copy_of_plot_config.isLegendEnabled()) - self.assertEqual(plot_config.isGridEnabled(), copy_of_plot_config.isGridEnabled()) - self.assertEqual(plot_config.isObservationsEnabled(), copy_of_plot_config.isObservationsEnabled()) - self.assertEqual(plot_config.isDistributionLineEnabled(), copy_of_plot_config.isDistributionLineEnabled()) - - self.assertEqual(plot_config.refcaseStyle(), copy_of_plot_config.refcaseStyle()) - self.assertEqual(plot_config.observationsStyle(), copy_of_plot_config.observationsStyle()) - - self.assertEqual(plot_config.histogramStyle(), copy_of_plot_config.histogramStyle()) - self.assertEqual(plot_config.defaultStyle(), copy_of_plot_config.defaultStyle()) - self.assertEqual(plot_config.currentColor(), copy_of_plot_config.currentColor()) - - self.assertEqual(plot_config.getStatisticsStyle("mean"), copy_of_plot_config.getStatisticsStyle("mean")) - self.assertEqual(plot_config.getStatisticsStyle("min-max"), copy_of_plot_config.getStatisticsStyle("min-max")) - self.assertEqual(plot_config.getStatisticsStyle("p50"), copy_of_plot_config.getStatisticsStyle("p50")) - self.assertEqual(plot_config.getStatisticsStyle("p10-p90"), copy_of_plot_config.getStatisticsStyle("p10-p90")) - self.assertEqual(plot_config.getStatisticsStyle("p33-p67"), copy_of_plot_config.getStatisticsStyle("p33-p67")) - self.assertEqual(plot_config.getStatisticsStyle("std"), copy_of_plot_config.getStatisticsStyle("std")) - - self.assertEqual(plot_config.title(), copy_of_plot_config.title()) - - self.assertEqual(plot_config.limits, copy_of_plot_config.limits) - - - plot_config.currentColor() # cycle state will not be copied - plot_config.nextColor() - - copy_of_plot_config = PlotConfig("Another Copy of Golden Sample") - copy_of_plot_config.copyConfigFrom(plot_config) - - self.assertEqual(plot_config.refcaseStyle(), copy_of_plot_config.refcaseStyle()) - self.assertEqual(plot_config.observationsStyle(), copy_of_plot_config.observationsStyle()) - - self.assertNotEqual(plot_config.histogramStyle(), copy_of_plot_config.histogramStyle()) - self.assertNotEqual(plot_config.defaultStyle(), copy_of_plot_config.defaultStyle()) - self.assertNotEqual(plot_config.currentColor(), copy_of_plot_config.currentColor()) - - self.assertNotEqual(plot_config.getStatisticsStyle("mean"), copy_of_plot_config.getStatisticsStyle("mean")) - self.assertNotEqual(plot_config.getStatisticsStyle("min-max"), copy_of_plot_config.getStatisticsStyle("min-max")) - self.assertNotEqual(plot_config.getStatisticsStyle("p50"), copy_of_plot_config.getStatisticsStyle("p50")) - self.assertNotEqual(plot_config.getStatisticsStyle("p10-p90"), copy_of_plot_config.getStatisticsStyle("p10-p90")) - self.assertNotEqual(plot_config.getStatisticsStyle("p33-p67"), copy_of_plot_config.getStatisticsStyle("p33-p67")) - self.assertNotEqual(plot_config.getStatisticsStyle("std"), copy_of_plot_config.getStatisticsStyle("std")) - - - - - diff --git a/ThirdParty/Ert/python/tests/gui/test_multiple_data_assimilation.py b/ThirdParty/Ert/python/tests/gui/test_multiple_data_assimilation.py deleted file mode 100644 index 8b8cd8ed54..0000000000 --- a/ThirdParty/Ert/python/tests/gui/test_multiple_data_assimilation.py +++ /dev/null @@ -1,44 +0,0 @@ -from ert.test import ExtendedTestCase -from ert_gui.simulation.models import MultipleDataAssimilation as mda - - -class MDAWeightsTest(ExtendedTestCase): - - def test_weights(self): - - weights = mda.parseWeights("2, 2, 2, 2") - print(weights) - self.assertAlmostEqualList([2, 2, 2, 2], weights) - - weights = mda.parseWeights("1, 2, 3, ") - self.assertAlmostEqualList([1, 2, 3], weights) - - weights = mda.parseWeights("1, 0, 1") - self.assertAlmostEqualList([1, 1], weights) - - weights = mda.parseWeights("1.414213562373095, 1.414213562373095") - self.assertAlmostEqualList([1.414213562373095, 1.414213562373095], weights) - - with self.assertRaises(ValueError): - mda.parseWeights("2, error, 2, 2") - - - def test_normalized_weights(self): - - weights = mda.normalizeWeights([1]) - self.assertAlmostEqualList([1.0], weights) - - weights = mda.normalizeWeights([1, 1]) - self.assertAlmostEqualList([1.414214, 1.414214], weights) - - weights = mda.normalizeWeights([1, 0, 1]) - self.assertAlmostEqualList([1.414214, 1.414214], weights) - - weights = mda.normalizeWeights([1, 1, 1]) - self.assertAlmostEqualList([1.732051, 1.732051, 1.732051], weights) - - weights = mda.normalizeWeights([8, 4, 2, 1]) - self.assertAlmostEqualList([9.219544457292887, 4.6097722286464435, 2.3048861143232218, 1.1524430571616109], weights) - - weights = mda.normalizeWeights([9.219544457292887, 4.6097722286464435, 2.3048861143232218, 1.1524430571616109]) - self.assertAlmostEqualList([9.219544457292887, 4.6097722286464435, 2.3048861143232218, 1.1524430571616109], weights) diff --git a/ThirdParty/Ert/python/tests/import_tester.py b/ThirdParty/Ert/python/tests/import_tester.py deleted file mode 100644 index 8ecd927404..0000000000 --- a/ThirdParty/Ert/python/tests/import_tester.py +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env python -import os -import sys -import traceback - -class ImportTester(object): - @staticmethod - def testImport(module): - try: - # print(module) - __import__(module) - return True - except ImportError: - tb = traceback.format_exc() - sys.stderr.write("Error importing module %s!\n\n" % module) - sys.stderr.write(str(tb)) - sys.stderr.write("\n") - except Exception: - tb = traceback.format_exc() - sys.stderr.write("Import of module %s caused errors!\n\n" % module) - sys.stderr.write(str(tb)) - sys.stderr.write("\n") - - return False - - - @staticmethod - def importRecursively(path, package_name): - entries = os.listdir(path) - - result = True - - for entry in sorted(entries): - import_success = True - - entry_path = os.path.join(path, entry) - if os.path.isdir(entry_path): - package = "%s.%s" % (package_name, entry) - import_success = ImportTester.testImport(package) - new_path = os.path.join(path, entry) - import_success = import_success and ImportTester.importRecursively(new_path, package) - elif os.path.isfile(entry_path): - if not entry.startswith("__init__") and entry.endswith(".py"): - module = entry[0:len(entry) - 3] - import_success = ImportTester.testImport("%s.%s" % (package_name, module)) - else: - # skip other files - pass - # print("Skipped entry: %s" % entry) - - if not import_success: - result = False - - return result - - -if __name__ == '__main__': - PYTHONPATH = sys.argv[1] - package_name = sys.argv[2] - - sys.path.insert(0, PYTHONPATH) - - package_path = os.path.join(PYTHONPATH, package_name) - - if ImportTester.importRecursively(package_path, package_name): - sys.exit(0) - else: - sys.exit(1) diff --git a/ThirdParty/Ert/python/tests/share/CMakeLists.txt b/ThirdParty/Ert/python/tests/share/CMakeLists.txt index 572d5d0c4e..ef80c2d77d 100644 --- a/ThirdParty/Ert/python/tests/share/CMakeLists.txt +++ b/ThirdParty/Ert/python/tests/share/CMakeLists.txt @@ -5,4 +5,4 @@ set(TEST_SOURCES add_python_package("python.tests.share" ${PYTHON_INSTALL_PREFIX}/tests/share "${TEST_SOURCES}" False) -addPythonTest(share.synthesizer share.test_synthesizer.SynthesizerTest) \ No newline at end of file +addPythonTest(share.test_synthesizer.SynthesizerTest) diff --git a/ThirdParty/Ert/python/tests/share/test_synthesizer.py b/ThirdParty/Ert/python/tests/share/test_synthesizer.py index 0efb611bf2..f5863f5e91 100644 --- a/ThirdParty/Ert/python/tests/share/test_synthesizer.py +++ b/ThirdParty/Ert/python/tests/share/test_synthesizer.py @@ -1,11 +1,11 @@ import sys import os -from ert.test import ExtendedTestCase +from ecl.test import ExtendedTestCase try: from synthesizer import OilSimulator except ImportError as e: - share_lib_path = os.path.join(ExtendedTestCase.findShareRoot(), "lib") + share_lib_path = os.path.join(ExtendedTestCase.createSharePath("lib")) sys.path.insert(0, share_lib_path) synthesizer_module = __import__("synthesizer") diff --git a/ThirdParty/Ert/python/tests/test_pylint.py b/ThirdParty/Ert/python/tests/test_pylint.py new file mode 100644 index 0000000000..20206294f1 --- /dev/null +++ b/ThirdParty/Ert/python/tests/test_pylint.py @@ -0,0 +1,33 @@ +# Copyright (C) 2017 Statoil ASA, Norway. +# +# This file is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. + +from ecl.test import LintTestCase + +class LintErt(LintTestCase): + """Tests that no file in ert needs linting""" + + def test_lint_ecl(self): + white = ['ecl_kw.py', 'ecl_type.py', 'ecl_sum.py', 'ecl_grid.py', 'ecl_npv.py'] # TODO fix issues and remove + self.assertLinted('ecl/ecl', whitelist=white) + + def test_lint_geo(self): + self.assertLinted('ecl/geo') + + def test_lint_util(self): + self.assertLinted('ecl/util') + + def test_lint_well(self): + self.assertLinted('ecl/well') diff --git a/ThirdParty/Ert/python/tests/util/CMakeLists.txt b/ThirdParty/Ert/python/tests/util/CMakeLists.txt new file mode 100644 index 0000000000..fdac8c12eb --- /dev/null +++ b/ThirdParty/Ert/python/tests/util/CMakeLists.txt @@ -0,0 +1,41 @@ +set(TEST_SOURCES + __init__.py + test_ctime.py + test_cstring.py + test_hash.py + test_lookup_table.py + test_matrix.py + test_rng.py + test_stat.py + test_string_list.py + test_substitution_list.py + test_thread_pool.py + test_cthread_pool.py + test_ui_return.py + test_vectors.py + test_version.py + test_work_area.py + test_path_context.py + test_arg_pack.py + test_spawn.py +) + +add_python_package("python.tests.util" ${PYTHON_INSTALL_PREFIX}/tests/util "${TEST_SOURCES}" False) + +addPythonTest(tests.util.test_ctime.CTimeTest) +addPythonTest(tests.util.test_cstring.CStringTest) +addPythonTest(tests.util.test_hash.HashTest) +addPythonTest(tests.util.test_lookup_table.LookupTableTest ) +addPythonTest(tests.util.test_matrix.MatrixTest ) +addPythonTest(tests.util.test_rng.RngTest ) +addPythonTest(tests.util.test_stat.StatTest ) +addPythonTest(tests.util.test_string_list.StringListTest) +addPythonTest(tests.util.test_vectors.UtilTest) +addPythonTest(tests.util.test_ui_return.UIReturnTest) +addPythonTest(tests.util.test_work_area.WorkAreaTest) +addPythonTest(tests.util.test_version.VersionTest) +addPythonTest(tests.util.test_path_context.PathContextTest) +addPythonTest(tests.util.test_thread_pool.ThreadPoolTest) +addPythonTest(tests.util.test_cthread_pool.CThreadPoolTest) +addPythonTest(tests.util.test_arg_pack.ArgPackTest) +addPythonTest(tests.util.test_spawn.SpawnTest) diff --git a/ThirdParty/Ert/python/tests/core/__init__.py b/ThirdParty/Ert/python/tests/util/__init__.py similarity index 100% rename from ThirdParty/Ert/python/tests/core/__init__.py rename to ThirdParty/Ert/python/tests/util/__init__.py diff --git a/ThirdParty/Ert/python/tests/core/util/test_arg_pack.py b/ThirdParty/Ert/python/tests/util/test_arg_pack.py similarity index 84% rename from ThirdParty/Ert/python/tests/core/util/test_arg_pack.py rename to ThirdParty/Ert/python/tests/util/test_arg_pack.py index a433f44fc0..0ecbe23c05 100644 --- a/ThirdParty/Ert/python/tests/core/util/test_arg_pack.py +++ b/ThirdParty/Ert/python/tests/util/test_arg_pack.py @@ -1,8 +1,8 @@ -import ert -from ert.test import ExtendedTestCase -from ert.util import ArgPack, StringList +import ecl +from ecl.test import ExtendedTestCase +from ecl.util import ArgPack, StringList -TEST_LIB = ert.load("libtest_util") +TEST_LIB = ecl.load("libert_util") class ArgPackTest(ExtendedTestCase): diff --git a/ThirdParty/Ert/python/tests/util/test_cstring.py b/ThirdParty/Ert/python/tests/util/test_cstring.py new file mode 100644 index 0000000000..fe82c5a6fe --- /dev/null +++ b/ThirdParty/Ert/python/tests/util/test_cstring.py @@ -0,0 +1,24 @@ +import ecl +from cwrap import Prototype +from ecl.test.extended_testcase import ExtendedTestCase + +# Local copies so that the real ones don't get changed +class TestUtilPrototype(Prototype): + lib = ecl.load("libert_util") + + def __init__(self, prototype, bind=False): + super(TestUtilPrototype, self).__init__(TestUtilPrototype.lib, prototype, bind=bind) + +alloc_string_copy = TestUtilPrototype("char* util_alloc_string_copy(char*)") + +class CStringTest(ExtendedTestCase): + + def test_get(self): + # this test can safely be deleted, as the type it used to test, + # cstring_obj, has been replaced with char* + s1 = "String123" + print('test_get.s1=' + s1) + s2 = alloc_string_copy(s1) + print('test_get.s2=' + s2) + self.assertEqual(s1, s2) + print('test_get.s1==s2: %s' % (s1 == s2)) diff --git a/ThirdParty/Ert/python/tests/core/util/test_cthread_pool.py b/ThirdParty/Ert/python/tests/util/test_cthread_pool.py similarity index 90% rename from ThirdParty/Ert/python/tests/core/util/test_cthread_pool.py rename to ThirdParty/Ert/python/tests/util/test_cthread_pool.py index 698fdc80ec..ee55aa9ce6 100644 --- a/ThirdParty/Ert/python/tests/core/util/test_cthread_pool.py +++ b/ThirdParty/Ert/python/tests/util/test_cthread_pool.py @@ -1,9 +1,9 @@ import ctypes -import ert -from ert.test import ExtendedTestCase -from ert.util import CThreadPool, startCThreadPool +import ecl +from ecl.test import ExtendedTestCase +from ecl.util import CThreadPool, startCThreadPool -TEST_LIB = ert.load("libtest_util") +TEST_LIB = ecl.load("libert_util") class CThreadPoolTest(ExtendedTestCase): diff --git a/ThirdParty/Ert/python/tests/core/util/test_ctime.py b/ThirdParty/Ert/python/tests/util/test_ctime.py similarity index 99% rename from ThirdParty/Ert/python/tests/core/util/test_ctime.py rename to ThirdParty/Ert/python/tests/util/test_ctime.py index 8a74c2c51e..292a13153a 100644 --- a/ThirdParty/Ert/python/tests/core/util/test_ctime.py +++ b/ThirdParty/Ert/python/tests/util/test_ctime.py @@ -1,7 +1,7 @@ import time from datetime import datetime, date -from ert.util import CTime +from ecl.util import CTime try: diff --git a/ThirdParty/Ert/python/tests/core/util/test_hash.py b/ThirdParty/Ert/python/tests/util/test_hash.py similarity index 93% rename from ThirdParty/Ert/python/tests/core/util/test_hash.py rename to ThirdParty/Ert/python/tests/util/test_hash.py index 1279794b08..528d123ee4 100644 --- a/ThirdParty/Ert/python/tests/core/util/test_hash.py +++ b/ThirdParty/Ert/python/tests/util/test_hash.py @@ -1,7 +1,7 @@ from ctypes import c_void_p -from ert.test import ExtendedTestCase -from ert.util import Hash, StringHash, DoubleHash, IntegerHash +from ecl.test import ExtendedTestCase +from ecl.util import Hash, StringHash, DoubleHash, IntegerHash class HashTest(ExtendedTestCase): diff --git a/ThirdParty/Ert/python/tests/core/util/test_lookup_table.py b/ThirdParty/Ert/python/tests/util/test_lookup_table.py similarity index 98% rename from ThirdParty/Ert/python/tests/core/util/test_lookup_table.py rename to ThirdParty/Ert/python/tests/util/test_lookup_table.py index de4fef4241..9a0fdccdfe 100644 --- a/ThirdParty/Ert/python/tests/core/util/test_lookup_table.py +++ b/ThirdParty/Ert/python/tests/util/test_lookup_table.py @@ -3,7 +3,7 @@ except ImportError: from unittest import TestCase -from ert.util import LookupTable +from ecl.util import LookupTable class LookupTableTest(TestCase): diff --git a/ThirdParty/Ert/python/tests/core/util/test_matrix.py b/ThirdParty/Ert/python/tests/util/test_matrix.py similarity index 86% rename from ThirdParty/Ert/python/tests/core/util/test_matrix.py rename to ThirdParty/Ert/python/tests/util/test_matrix.py index bd78b7faeb..d5d5205890 100644 --- a/ThirdParty/Ert/python/tests/core/util/test_matrix.py +++ b/ThirdParty/Ert/python/tests/util/test_matrix.py @@ -1,6 +1,6 @@ -from ert.util import Matrix , RandomNumberGenerator -from ert.util.enums import RngAlgTypeEnum, RngInitModeEnum -from ert.test import ExtendedTestCase, TestAreaContext +from ecl.util import Matrix , RandomNumberGenerator +from ecl.util.enums import RngAlgTypeEnum, RngInitModeEnum +from ecl.test import ExtendedTestCase, TestAreaContext class MatrixTest(ExtendedTestCase): def test_matrix(self): @@ -224,4 +224,24 @@ def test_csv(self): with TestAreaContext("matrix_csv"): m.dumpCSV("matrix.csv") - + def test_identity(self): + m1 = Matrix.identity(1) + self.assertEqual(m1.rows(), 1) + self.assertEqual(m1.columns(), 1) + self.assertEqual(m1[0,0], 1) + + with self.assertRaises(ValueError): + Matrix.identity(0) + with self.assertRaises(ValueError): + Matrix.identity(-3) + + m = Matrix.identity(17) + self.assertEqual(m.rows(), 17) + self.assertEqual(m.columns(), 17) + for i in range(17): + for j in range(17): + elt = m[i, j] + if i == j: + self.assertEqual(elt, 1) + else: + self.assertEqual(elt, 0) diff --git a/ThirdParty/Ert/python/tests/core/util/test_path_context.py b/ThirdParty/Ert/python/tests/util/test_path_context.py similarity index 94% rename from ThirdParty/Ert/python/tests/core/util/test_path_context.py rename to ThirdParty/Ert/python/tests/util/test_path_context.py index 06cb537574..51587a5827 100644 --- a/ThirdParty/Ert/python/tests/core/util/test_path_context.py +++ b/ThirdParty/Ert/python/tests/util/test_path_context.py @@ -1,5 +1,5 @@ import os -from ert.test import ExtendedTestCase, PathContext,TestAreaContext +from ecl.test import ExtendedTestCase, PathContext,TestAreaContext class PathContextTest(ExtendedTestCase): diff --git a/ThirdParty/Ert/python/tests/core/util/test_rng.py b/ThirdParty/Ert/python/tests/util/test_rng.py similarity index 89% rename from ThirdParty/Ert/python/tests/core/util/test_rng.py rename to ThirdParty/Ert/python/tests/util/test_rng.py index 21eea2177b..dc4b03f7ca 100644 --- a/ThirdParty/Ert/python/tests/core/util/test_rng.py +++ b/ThirdParty/Ert/python/tests/util/test_rng.py @@ -1,6 +1,6 @@ -from ert.util.enums import RngAlgTypeEnum, RngInitModeEnum -from ert.util.rng import RandomNumberGenerator -from ert.test import ExtendedTestCase,TestAreaContext +from ecl.util.enums import RngAlgTypeEnum, RngInitModeEnum +from ecl.util.rng import RandomNumberGenerator +from ecl.test import ExtendedTestCase,TestAreaContext class RngTest(ExtendedTestCase): diff --git a/ThirdParty/Ert/python/tests/util/test_spawn.py b/ThirdParty/Ert/python/tests/util/test_spawn.py new file mode 100644 index 0000000000..a867da3336 --- /dev/null +++ b/ThirdParty/Ert/python/tests/util/test_spawn.py @@ -0,0 +1,63 @@ +import os +import stat +import sys + +import ecl +from ecl.test.extended_testcase import ExtendedTestCase +from ecl.test.test_area import TestAreaContext + +from cwrap import Prototype + +class _TestSpawnPrototype(Prototype): + lib = ecl.load('libert_util') + + def __init__(self, prototype, bind=True): + super(_TestSpawnPrototype, self).__init__(_TestSpawnPrototype.lib, prototype, bind=bind) + + +class SpawnTest(ExtendedTestCase): + _spawn = _TestSpawnPrototype("int util_spawn_blocking(char*, int, void*, char*, char*)", bind = False) + def createScript(self, name, stdout_string , stderr_string): + with open(name, "w") as f: + f.write("#!/usr/bin/env python\n") + f.write("import sys\n") + f.write("sys.stdout.write('%s')\n" % stdout_string) + f.write("sys.stdout.flush()\n") + f.write("sys.stderr.write('%s')\n" % stderr_string) + f.write("sys.stderr.flush()\n") + + mode = os.stat(name).st_mode + mode |= stat.S_IXUSR | stat.S_IXGRP + os.chmod(name, stat.S_IMODE(mode)) + + + + def test_spawn_redirect(self): + with TestAreaContext("spawn_test1", store_area=True) as test_area: + stdout_string = "stdout_redirect" + stderr_string = "stderr_redirect" + self.createScript("print.py",stdout_string, stderr_string) + status = self._spawn("print.py",0, None, "print.out", "print.err") + self.assertEqual(status , 0) + + sys.stderr.write("init stderr\n") + sys.stdout.write("init stdout\n") + sys.stderr.write("complete stderr\n") + sys.stdout.write("complete stdout\n") + + with open("print.out", "r") as f: + s = f.read() + self.assertEqual(s , stdout_string) + + with open("print.err", "r") as f: + s = f.read() + self.assertEqual(s , stderr_string) + + + + def test_spawn_noredirect(self): + with TestAreaContext("spawn_test2", store_area=True) as test_area: + self.createScript("print.py","stdout_no_redirect", "stderr_no_redirect") + status = self._spawn("print.py", 0, None, None , None) + self.assertEqual(status , 0) + diff --git a/ThirdParty/Ert/python/tests/core/util/test_stat.py b/ThirdParty/Ert/python/tests/util/test_stat.py similarity index 88% rename from ThirdParty/Ert/python/tests/core/util/test_stat.py rename to ThirdParty/Ert/python/tests/util/test_stat.py index e2a73bbf45..f1a79e9701 100644 --- a/ThirdParty/Ert/python/tests/core/util/test_stat.py +++ b/ThirdParty/Ert/python/tests/util/test_stat.py @@ -1,6 +1,6 @@ -from ert.test import ExtendedTestCase -from ert.util import DoubleVector, quantile, quantile_sorted, polyfit -from ert.util.rng import RandomNumberGenerator +from ecl.test import ExtendedTestCase +from ecl.util import DoubleVector, quantile, quantile_sorted, polyfit +from ecl.util.rng import RandomNumberGenerator class StatTest(ExtendedTestCase): diff --git a/ThirdParty/Ert/python/tests/core/util/test_string_list.py b/ThirdParty/Ert/python/tests/util/test_string_list.py similarity index 94% rename from ThirdParty/Ert/python/tests/core/util/test_string_list.py rename to ThirdParty/Ert/python/tests/util/test_string_list.py index c965ec5c42..a4076fe2c8 100644 --- a/ThirdParty/Ert/python/tests/core/util/test_string_list.py +++ b/ThirdParty/Ert/python/tests/util/test_string_list.py @@ -1,9 +1,11 @@ +from __future__ import absolute_import, division, print_function, unicode_literals + try: from unittest2 import TestCase except ImportError: from unittest import TestCase -from ert.util import StringList +from ecl.util import StringList class StringListTest(TestCase): @@ -83,7 +85,9 @@ def test_append(self): self.assertFalse(s1 == ["A","B","D"]) self.assertFalse(s1 == ["A","B","C" , "D"]) - + pfx = 'StringList(size' # __repr__ + self.assertEqual(pfx, repr(s2)[:len(pfx)]) + def test_append_not_string(self): s = StringList() s.append(10) diff --git a/ThirdParty/Ert/python/tests/core/util/test_substitution_list.py b/ThirdParty/Ert/python/tests/util/test_substitution_list.py similarity index 90% rename from ThirdParty/Ert/python/tests/core/util/test_substitution_list.py rename to ThirdParty/Ert/python/tests/util/test_substitution_list.py index 0d60268ca9..8541b76044 100644 --- a/ThirdParty/Ert/python/tests/core/util/test_substitution_list.py +++ b/ThirdParty/Ert/python/tests/util/test_substitution_list.py @@ -1,5 +1,5 @@ -from ert.test import ExtendedTestCase -from ert.util import SubstitutionList +from ecl.test import ExtendedTestCase +from ecl.util import SubstitutionList class SubstitutionListTest(ExtendedTestCase): diff --git a/ThirdParty/Ert/python/tests/core/util/test_thread_pool.py b/ThirdParty/Ert/python/tests/util/test_thread_pool.py similarity index 95% rename from ThirdParty/Ert/python/tests/core/util/test_thread_pool.py rename to ThirdParty/Ert/python/tests/util/test_thread_pool.py index 3c772ec633..ffe620dcd6 100644 --- a/ThirdParty/Ert/python/tests/core/util/test_thread_pool.py +++ b/ThirdParty/Ert/python/tests/util/test_thread_pool.py @@ -1,7 +1,7 @@ import time -from ert.util import ThreadPool -from ert.util.thread_pool import Task -from ert.test import ExtendedTestCase +from ecl.util import ThreadPool +from ecl.util.thread_pool import Task +from ecl.test import ExtendedTestCase class ThreadPoolTest(ExtendedTestCase): diff --git a/ThirdParty/Ert/python/tests/core/util/test_ui_return.py b/ThirdParty/Ert/python/tests/util/test_ui_return.py similarity index 95% rename from ThirdParty/Ert/python/tests/core/util/test_ui_return.py rename to ThirdParty/Ert/python/tests/util/test_ui_return.py index b3dd1d5b6a..2e7dfe9e75 100644 --- a/ThirdParty/Ert/python/tests/core/util/test_ui_return.py +++ b/ThirdParty/Ert/python/tests/util/test_ui_return.py @@ -1,6 +1,6 @@ -from ert.test import ExtendedTestCase -from ert.util import UIReturn -from ert.util.enums import UIReturnStatusEnum +from ecl.test import ExtendedTestCase +from ecl.util import UIReturn +from ecl.util.enums import UIReturnStatusEnum class UIReturnTest(ExtendedTestCase): diff --git a/ThirdParty/Ert/python/tests/core/util/test_vectors.py b/ThirdParty/Ert/python/tests/util/test_vectors.py similarity index 87% rename from ThirdParty/Ert/python/tests/core/util/test_vectors.py rename to ThirdParty/Ert/python/tests/util/test_vectors.py index c24416bac5..9b710567eb 100644 --- a/ThirdParty/Ert/python/tests/core/util/test_vectors.py +++ b/ThirdParty/Ert/python/tests/util/test_vectors.py @@ -24,12 +24,43 @@ except ImportError: from unittest import TestCase -from ert.util import DoubleVector, IntVector, BoolVector, TimeVector, CTime, PermutationVector +from ecl.util import DoubleVector, IntVector, BoolVector, TimeVector, CTime, PermutationVector class UtilTest(TestCase): def setUp(self): pass - + + def dotest_slicing(self, vec): + self.assertEqual(10, len(vec)) + self.assertEqual(vec[-1], vec[9]) + self.assertEqual(8, len(vec[:8])) + self.assertEqual(9, len(vec[1:])) + self.assertEqual(3, len(vec[1:8:3])) + odds = vec[1::2] + self.assertEqual(4, len(vec[1:8:2])) + for i in range(4): + self.assertEqual(vec[2*i + 1], odds[i]) + + def test_slicing(self): + dv = DoubleVector(initial_size=10) + for i in range(10): + dv[i] = 1.0 / (1+i) + self.dotest_slicing(dv) + iv = IntVector(initial_size=10) + for i in range(10): + iv[i] = i**3 + self.dotest_slicing(iv) + bv = BoolVector(initial_size=10) + for i in range(0,10,3): + bv[i] = True + self.dotest_slicing(bv) + tv = TimeVector(initial_size=10) + for i in range(10): + tv[i] = CTime(datetime.datetime(2016, 12, i+3, 0, 0, 0)) + self.dotest_slicing(tv) + + + def test_double_vector(self): v = DoubleVector() @@ -104,6 +135,34 @@ def test_vector_operations_with_exceptions(self): with self.assertRaises(TypeError): iv1 *= dv1 + def test_setitem_getitem(self): + primes = [2,3,5,7,11,13,17,19] + primep = [i in primes for i in range(20)] + b = BoolVector(initial_size = 20) + b[2] = True + b[3:8:2] = True + b[11::2] = True + self.assertTrue(b[15]) + self.assertTrue(b[-5]) + self.assertTrue(b[17]) + self.assertTrue(b[19]) + b[-5] = False + self.assertEqual(list(b), primep) + + def test_repr(self): + primes = [2,3,5,7,11,13,17,19] + b = BoolVector() + for i in primes: + b[i] = True + pfx = 'BoolVector(size = 20, content = "00110101000101000101")' + print(repr(b)) + self.assertEqual(pfx, repr(b)[:len(pfx)]) + b[30] = True + pfx = 'BoolVector(size = 31, content = "001101010...00000001")' + print(repr(b)) + self.assertEqual(pfx, repr(b)[:len(pfx)]) + + def test_bool_vector(self): b = BoolVector() b.setDefault(True) diff --git a/ThirdParty/Ert/python/tests/util/test_version.py b/ThirdParty/Ert/python/tests/util/test_version.py new file mode 100644 index 0000000000..cb27655c8e --- /dev/null +++ b/ThirdParty/Ert/python/tests/util/test_version.py @@ -0,0 +1,119 @@ +# Copyright (C) 2015 Statoil ASA, Norway. +# +# The file 'test_version.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT 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. +# +# ERT 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 +# for more details. +import os.path + +import ecl +from ecl.test import ExtendedTestCase +from ecl.util import Version + + +class VersionTest(ExtendedTestCase): + def setUp(self): + pass + + def test_create(self): + v1 = Version(1, 8, 6) + self.assertFalse(v1.isDevelVersion()) + + self.assertEqual(v1.versionString(), "1.8.6") + self.assertEqual(v1.versionTuple(), (1, 8, 6)) + + v2 = Version(2, 0, "X") + self.assertTrue(v2.isDevelVersion()) + + def test_eq(self): + v1 = Version(1, 2, 3) + v2 = Version(1, 2, 3) + + self.assertTrue(v1 == v2) + self.assertEqual(v1, v2) + self.assertEqual(str(v1), str(v2)) + self.assertEqual(repr(v1), repr(v2)) + self.assertFalse(v1 != v2) + + v1 = Version(1, 2, "X") + v2 = Version(1, 2, "Y") + self.assertTrue(v1 != v2) + self.assertFalse(v1 == v2) + + v1 = Version(1, 2, "X") + v2 = Version(1, 2, 0) + self.assertTrue(v1 != v2) + self.assertFalse(v1 == v2) + + v1 = Version(1, 2, "X") + v2 = Version(1, 3, "X") + self.assertTrue(v1 != v2) + self.assertFalse(v1 == v2) + + v1 = Version(1, 2, "X") + v2 = (1, 3, "X") + self.assertTrue(v1 != v2) + self.assertFalse(v1 == v2) + + def test_ge(self): + v1 = Version(1, 2, 3) + v2 = Version(1, 2, 3) + v3 = (1, 2, 2) + + self.assertEqual(str(v1), str(v2)) + self.assertEqual(repr(v1), repr(v2)) + + self.assertTrue(v1 >= v2) + self.assertFalse(v1 < v2) + + self.assertTrue(v1 >= v3) + self.assertFalse(v1 < v3) + + v1 = Version(1, 2, "X") + v2 = Version(1, 1, 9) + self.assertTrue(v1 > v2) + + v2 = Version(1, 2, "X") + self.assertTrue(v1 >= v2) + + v2 = Version(1, 2, 0) + self.assertFalse(v1 >= v2) + + self.assertNotEqual(str(v1), str(v2)) + self.assertNotEqual(repr(v1), repr(v2)) + + + def test_current(self): + current = Version.currentVersion() + self.assertTrue(current > (0, 0, 0)) + pfx = 'Version(major=' + self.assertEqual(pfx, repr(current)[:len(pfx)]) + + def test_import(self): + from ecl import Version as globalVersion + v1 = globalVersion(1, 1, 2) + v2 = Version(1, 1, 2) + + self.assertTrue(v1 == v2) + self.assertEqual(v1, v2) + self.assertEqual(repr(v1), repr(v2)) + + + def test_root_version(self): + cv = Version.currentVersion( ) + self.assertEqual( ecl.__version__ , cv.versionString() ) + + + def test_root_path(self): + self.assertTrue( os.path.isdir( os.path.join( ecl.root() , "ecl"))) + self.assertTrue( os.path.isfile( os.path.join( ecl.root() , "ecl", "__init__.py"))) + diff --git a/ThirdParty/Ert/python/tests/core/util/test_work_area.py b/ThirdParty/Ert/python/tests/util/test_work_area.py similarity index 98% rename from ThirdParty/Ert/python/tests/core/util/test_work_area.py rename to ThirdParty/Ert/python/tests/util/test_work_area.py index 5123c827e6..51403f817d 100644 --- a/ThirdParty/Ert/python/tests/core/util/test_work_area.py +++ b/ThirdParty/Ert/python/tests/util/test_work_area.py @@ -23,7 +23,7 @@ except ImportError: from unittest import skipIf -from ert.test import ExtendedTestCase , TestAreaContext, TempAreaContext +from ecl.test import ExtendedTestCase , TestAreaContext, TempAreaContext class WorkAreaTest(ExtendedTestCase): diff --git a/ThirdParty/Ert/python/tests/well/CMakeLists.txt b/ThirdParty/Ert/python/tests/well/CMakeLists.txt new file mode 100644 index 0000000000..e5853b33f6 --- /dev/null +++ b/ThirdParty/Ert/python/tests/well/CMakeLists.txt @@ -0,0 +1,14 @@ +set(TEST_SOURCES + __init__.py + test_ecl_well.py + test_ecl_well2.py + test_ecl_well3.py +) + +add_python_package("python.tests.well" ${PYTHON_INSTALL_PREFIX}/tests/well "${TEST_SOURCES}" False) + +if (STATOIL_TESTDATA_ROOT) + addPythonTest(well.test_ecl_well.EclWellTest LABELS StatoilData) + addPythonTest(well.test_ecl_well2.EclWellTest2 LABELS StatoilData) + addPythonTest(well.test_ecl_well3.EclWellTest3 LABELS StatoilData) +endif() diff --git a/ThirdParty/Ert/python/tests/core/cwrap/__init__.py b/ThirdParty/Ert/python/tests/well/__init__.py similarity index 100% rename from ThirdParty/Ert/python/tests/core/cwrap/__init__.py rename to ThirdParty/Ert/python/tests/well/__init__.py diff --git a/ThirdParty/Ert/python/tests/core/well/test_ecl_well.py b/ThirdParty/Ert/python/tests/well/test_ecl_well.py similarity index 93% rename from ThirdParty/Ert/python/tests/core/well/test_ecl_well.py rename to ThirdParty/Ert/python/tests/well/test_ecl_well.py index 8310d18d88..bcbf872d17 100644 --- a/ThirdParty/Ert/python/tests/core/well/test_ecl_well.py +++ b/ThirdParty/Ert/python/tests/well/test_ecl_well.py @@ -1,8 +1,8 @@ import datetime -from ert.ecl import EclGrid, EclFile, EclFileFlagEnum -from ert.test import ExtendedTestCase -from ert.util.ctime import CTime -from ert.well import WellInfo, WellConnection, WellTypeEnum, WellConnectionDirectionEnum, WellSegment +from ecl.ecl import EclGrid, EclFile, EclFileFlagEnum +from ecl.test import ExtendedTestCase +from ecl.util.ctime import CTime +from ecl.well import WellInfo, WellConnection, WellTypeEnum, WellConnectionDirectionEnum, WellSegment class EclWellTest(ExtendedTestCase): @@ -111,7 +111,8 @@ def checkWellInfo(well_info, well_count, report_step_count): def test_well_type_enum(self): source_file_path = "libecl_well/include/ert/ecl_well/well_const.h" - self.assertEnumIsFullyDefined(WellTypeEnum, "well_type_enum", source_file_path) + # The header file has duplicated symbols, so the simple test fails. + # self.assertEnumIsFullyDefined(WellTypeEnum, "well_type_enum", source_file_path) def test_well_connection_direction_enum(self): @@ -165,6 +166,22 @@ def test_well_time_line(self): self.assertEqual(len(well_states), len(EclWellTest.ALL_WELLS)) + # testing name and repr + info = self.getWellInfo() + wtl = info['G6HT2'] + self.assertEqual('G6HT2', wtl.getName()) + rep = repr(wtl) + print(rep) + pfx = 'WellTimeLine(' + self.assertEqual(pfx, rep[:len(pfx)]) + + # testing __getitem__ and its well state + ws = wtl[0] + self.assertTrue(ws.isOpen()) + self.assertEqual(ws.wellType(), WellTypeEnum.ECL_WELL_PRODUCER) + self.assertTrue(ws.isMultiSegmentWell()) + pfx = 'WellState(' + self.assertEqual(pfx, repr(ws)[:len(pfx)]) def test_well_state(self): @@ -173,11 +190,11 @@ def test_well_state(self): sim_time = CTime(datetime.date(2000, 1, 1)) open_states = {True: 0, False: 0} msw_states = {True: 0, False: 0} - well_types = {WellTypeEnum.ERT_UNDOCUMENTED_ZERO: 0, - WellTypeEnum.ERT_PRODUCER: 0, - WellTypeEnum.ERT_GAS_INJECTOR: 0, - WellTypeEnum.ERT_OIL_INJECTOR: 0, - WellTypeEnum.ERT_WATER_INJECTOR: 0} + well_types = {WellTypeEnum.ECL_WELL_ZERO: 0, + WellTypeEnum.ECL_WELL_PRODUCER: 0, + WellTypeEnum.ECL_WELL_GAS_INJECTOR: 0, + WellTypeEnum.ECL_WELL_OIL_INJECTOR: 0, + WellTypeEnum.ECL_WELL_WATER_INJECTOR: 0} segments = set() branches = set() @@ -214,11 +231,11 @@ def test_well_state(self): self.assertEqual(msw_states[True], 169) self.assertEqual(msw_states[False], 53) - self.assertEqual(well_types[WellTypeEnum.ERT_UNDOCUMENTED_ZERO], 0) - self.assertEqual(well_types[WellTypeEnum.ERT_WATER_INJECTOR], 0) - self.assertEqual(well_types[WellTypeEnum.ERT_OIL_INJECTOR], 0) - self.assertEqual(well_types[WellTypeEnum.ERT_GAS_INJECTOR], 1) - self.assertEqual(well_types[WellTypeEnum.ERT_PRODUCER], 221) + self.assertEqual(well_types[WellTypeEnum.ECL_WELL_ZERO], 0) + self.assertEqual(well_types[WellTypeEnum.ECL_WELL_WATER_INJECTOR], 0) + self.assertEqual(well_types[WellTypeEnum.ECL_WELL_OIL_INJECTOR], 0) + self.assertEqual(well_types[WellTypeEnum.ECL_WELL_GAS_INJECTOR], 1) + self.assertEqual(well_types[WellTypeEnum.ECL_WELL_PRODUCER], 221) self.assertEqual(len(connections), connections_count) diff --git a/ThirdParty/Ert/python/tests/core/well/test_ecl_well2.py b/ThirdParty/Ert/python/tests/well/test_ecl_well2.py similarity index 87% rename from ThirdParty/Ert/python/tests/core/well/test_ecl_well2.py rename to ThirdParty/Ert/python/tests/well/test_ecl_well2.py index 07a78629f7..52797e2bfa 100644 --- a/ThirdParty/Ert/python/tests/core/well/test_ecl_well2.py +++ b/ThirdParty/Ert/python/tests/well/test_ecl_well2.py @@ -1,10 +1,10 @@ import datetime import os.path -from ert.ecl import EclGrid, EclFile, EclFileFlagEnum -from ert.test import ExtendedTestCase -from ert.util.ctime import CTime -from ert.well import WellInfo, WellConnection, WellTypeEnum, WellConnectionDirectionEnum, WellSegment +from ecl.ecl import EclGrid, EclFile, EclFileFlagEnum +from ecl.test import ExtendedTestCase +from ecl.util.ctime import CTime +from ecl.well import WellInfo, WellConnection, WellTypeEnum, WellConnectionDirectionEnum, WellSegment diff --git a/ThirdParty/Ert/python/tests/well/test_ecl_well3.py b/ThirdParty/Ert/python/tests/well/test_ecl_well3.py new file mode 100644 index 0000000000..66283d261e --- /dev/null +++ b/ThirdParty/Ert/python/tests/well/test_ecl_well3.py @@ -0,0 +1,48 @@ +import datetime +import os.path + +from ecl.ecl import EclGrid, EclFile, EclSum +from ecl.test import ExtendedTestCase +from ecl.util.ctime import CTime +from ecl.well import WellInfo, WellConnection, WellTypeEnum, WellConnectionDirectionEnum, WellSegment + + +class EclWellTest3(ExtendedTestCase): + grid = None + + def test_rates(self): + grid_path = self.createTestPath("Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID") + rst_path = self.createTestPath("Statoil/ECLIPSE/Gurbat/ECLIPSE.UNRST") + sum_path = self.createTestPath("Statoil/ECLIPSE/Gurbat/ECLIPSE.SMSPEC") + + grid = EclGrid(grid_path) + well_info = WellInfo(grid, rst_path) + sum = EclSum(sum_path) + + for wtl in well_info: + for well_state in wtl: + # print "%03d %g %g " % (R , well_state.oilRate(), sum.get_from_report( "WOPR:%s" % well , R)) + if wtl.getName() == "OP_4": + pass + # print well_state.oilRate(), well_state.waterRate(), well_state.gasRate(), well_state.volumeRate() + # print well_state.oilRateSI(), well_state.waterRateSI(), well_state.gasRateSI(), well_state.volumeRateSI() + self.assertEqual(well_state.oilRate(), well_state.oilRateSI()) + self.assertEqual(well_state.waterRate(), well_state.waterRateSI()) + self.assertEqual(well_state.gasRate(), well_state.gasRateSI()) + self.assertEqual(well_state.volumeRate(), well_state.volumeRateSI()) + # print sum.get_from_report("WOPR:%s" % wtl.getName(), 1) + # print sum.get_from_report( "WWPR:%s" % wtl.getName(), 30 ) + + for conn in well_state.globalConnections(): + # print conn.gasRate(), conn.waterRate(), conn.oilRate() + # print conn.gasRateSI(), conn.waterRateSI(), conn.oilRateSI() + self.assertEqual(conn.gasRate(), conn.gasRateSI()) + self.assertEqual(conn.waterRate(), conn.waterRateSI()) + self.assertEqual(conn.oilRate(), conn.oilRateSI()) + self.assertEqual(conn.volumeRate(), conn.volumeRateSI()) + # + # print sum.get_from_report("WGPR:%s" % wtl.getName(), 30) + # + # self.assertFloatEqual(well_state.oilRate(), sum.get_from_report("WOPR:%s" % wtl.getName(), 30)) + # self.assertFloatEqual(well_state.waterRate(), sum.get_from_report("WWPR:%s" % wtl.getName(), 30)) + # self.assertFloatEqual(well_state.gasRate(), sum.get_from_report("WGPR:%s" % wtl.getName(), 30)) diff --git a/ThirdParty/Ert/redhat/ert.ecl.spec b/ThirdParty/Ert/redhat/ert.ecl.spec index 989362fd5a..9aabf2ff86 100644 --- a/ThirdParty/Ert/redhat/ert.ecl.spec +++ b/ThirdParty/Ert/redhat/ert.ecl.spec @@ -2,10 +2,10 @@ # spec file for package ert.ecl # -%define tag final +%define tag final2 Name: ert.ecl -Version: 2016.10 +Version: 2015.10 Release: 0 Summary: ERT - Ensemble based Reservoir Tool - ECL library License: GPL-3+ diff --git a/ThirdParty/Ert/release-notes.txt b/ThirdParty/Ert/release-notes.txt index d2a844df15..193ab6d37f 100644 --- a/ThirdParty/Ert/release-notes.txt +++ b/ThirdParty/Ert/release-notes.txt @@ -1,39 +1,142 @@ -Versjon 2.1.0, October 2016 - -* Made ecl_file_view 1st class citizen, exposed to API -* Added EXCLUDE_HOSTS to LSF driver with dynamic blacklisting -* Fixed MAX_RUNTIME is respected by WPRO -* Added functionality to open restart files in RW mode with seek -* Improved date handling (all is UTC now) -* As a result of this the filesystem version has been upgraded to 107, to use an old case you must upgrade it: "ert_upgradefs_107 config_file". -* Bug fixes (EclKW and EclGrid) -* Improved jobs and plugin loading -* The entire source tree was changed with the removal of devel -* ecl_sum can load aquifer variables. - - -Version 2.0.5, August 2016 -* rel_eps & abs_eps - -Version 2.0, July 2016 -* functions to write keywords DEPTH, DX, DY and DZ keyword to the INIT file. -* failed realizations are correctly propagated back to the main running scope -* MDA is made first-class citizen and no longer a plugin - -Version 1.10, November 2011 -* Set the the verbose flag from the environment variable ERT_VERBOSE. -* Abort if field transformation does not exist among the supported - transformations. -* Added small class EclCmp for comparing Eclipse simulation cases. -* Added function ecl_grid_cell_invalid / EclGrid.validCellGeometry( ). Typically - interesting for GRID files where not necessarily all cells are entered. -* Added function util_update_signalse() which will install util_abort_signal() - signal handler for all fatal signals in default state; using new function from - python ert/__init__py. -* Removed reference to undefined EnkFMain.__len__() method. - -Version 1 -* Fixed crash when stopping running simulations from gui. -* Ertshell refactored. Implementing shell functionality has been simplified. -* Ertshell. Added dumping of entries in block mount files. -* Removed LaTeX reporting +Version 2.1.0 February 2017 PR: 1150 - 1415 +Open PR: 1352, 1358, 1362 + +Queue system/workflows: + + - Functionality to blacklist nodes from LSF [1240, 1256, 1258, 1274, 1412, 1415]. + - Use bhist command to check lsf job status if job has expired from bjobs [1301]. + - Debug output from torque goes to stdout [1151]. + - Torque driver will not abort if qstat returns invalid status [1411]. + - Simulation status USER_EXIT - count as failed [1166]. + - Added Enum identifier 'JOB_QUEUE_DO_KILL_NODE_FAILURE [1268]. + - Have deprecated the ability to set queue options directly on the drivers [1288]. + - Added system for version specific loading for workflow job model + description files [1177]. + - Job loader should not try to load from directory [1187]. + - Refactoring of max runtime - initiated from WPRO [1237]. + - Determine which nodes are running a job [1251]. + +Build updates: + + - Check if python modules are present in the required version [1150]. + - Do not build ERT_GUI if PyQt4 is not found [1150, 1230]. + - Do not fail build numpy is not found [1153]. + - Allow for user provided CMAKE_C_FLAGS on linux [1300]. + - Require exactly version 2.7 of Python [1307]. + - Travis testing improvements [1363]. + - Removed devel/ directory from source [1196]. + - Setting correct working directory, and build target dependency + for sphinx-apidoc / html generation [1385]. + +Eclipse library: + + - C++ move constructor and operator= for smspec_node [1155, 1200]. + - fortio_ftruncate( ) [1161]. + - INIT writer will write keywords DEPTH, DX, DY, DZ [1164, 1172, 1311, 1388]. + - Grid writer will take unit system enum argument [1164]. + - New function ecl_kw_first_different( ) [1165]. + - Completion variables can be treated as totals [1167]. + - Fixed bug in ecl_kw_compare_numeric( ) [1168]. + - Refactored / inlined volume calculations in ecl_grid [1173, 1184]. + - Made function ecl_kw_size_and_type_equal() public [1192]. + - Fixed bug in ecl_grid_cell_contains() [1402, 1404, 1195, 1419]. + - OOM bug in ecl_kw_grdecl loader for large files [1207]. + - Cache cell volumes in ecl_grid [1228]. + - Geertsma / gravity functionality [1227, 1284, 1289, 1292, 1364, 1408]. + - Summary + restart - will allow some keyword differences [1296]. + - Implemented ecl_rst_file_open_write_seek( ) [1236]. + - Optionally apply mapaxes [1242, 1281]. + - Expose and use ecl_file_view datastructere - stop using 'blocks' in ecl_file objects [1250]. + - ecl_sum will internalize Aquifer variables [1275]. + - Make sure region properties RxxT are marked as total + depreecated some properties [1285]. + - ecl_kw_resize() + C++ operator[] [1316] + - Added small C++ utility to create eclipse filenames[1396]. + - Make sure restart and INIT files are written with correct unit ID [1399, 1407]. + - Skip keyword data type: 'C010' without failing [1406, 1410]. + - Adding parsing of the last (optional) config token for the SLAVES kwd [1409]. + - Add nnc index to the information exported by ecl_nnc_export() [1204]. + - Marked solvent related total keywords ?NIT and ?NPT.* as totals [1241]. + - Top active cell in grid [1322]. + - Added absolute epsilon to ecl_kw comparsion [1345,1351]. + +Smoother, updates and 'running': + + - Fixed bug with local updates of GEN_DATA [1291]. + - Changed default MDA weights and removed file input [1156, 1190, 1191]. + - Bug in handling of failed realisations [1163]. + - Fix bug missing assignment of analysis module in ES-MDA [1179]. + - OpenMP implementation of fwd_step [1185, 1324,1342]. + - Removes the ability to update dynamic variables [1189]. + - Allow max CV FOLD to be the number of ensembles [1205, 1208]. + - Fix for min_realizations logic [1206]. + - Can assign a specific analyis module for one local update [1224]. + - Handle updates when some summary relaisations are "too short" [1400, 1405]. + - Extending hook manager to support PRE_UPDATE and POST_UPDATE hooks [1340,1360]. + - RML logging is on by default [1318]. + - Changed default ENKF_ALPHA value to 3.0 [??] + - Implemented subsspacce inversion algorithm [1334, 1344]. + +libgeometry: + + - Added function to create new geo_surface (i.e. IRAP) object [1308]. + - Get (x, y) pos from surface [1395]. + +Python code: + + - cwrap has been moved out to stand-alone module, out of ert + package [1159, 1320, 1325, 1326, 1328, 1332, 1338, 1341, 1343, 1347, 1350, 1353] + - Simplified loading of shared libraries [1234]. + - Python3 preparations [1231, 1347]. + - Added __repr__ methods: [1266, 1327, 1329, 1331, 1348, 1373, 1375, 1377, 1384, 1387]. + - Implement __getitem__( ) for gen_data [1331]. + - Removed cstring_obj Python class [1387]. + - EclKW.numpy_array returns shared buffer ndarray [1180]. + - Minor bug in ecl_kw.py [1171]. + - Added EclKW.numpyView( ) and EclKW.numpyCopy( ) [1188]. + - Bug in EclKW slice access [1203]. + - Expose active_list better in Python [1392]. + - @TYPE@_vector suppports negative indices in __getitem__ and + __setitem__; added repr method [1378]. + - added root() methdo ert/__init__.py [1293]. + +GUI / Configuration / Documentation + + - Bug when viewing plots while simulating [1157.] + - Bug when plotting short vectors [1303]. + - Completely refactored the ERT Gui event system [1158, 1162]. + - Marked keywords INIT_SECTION and SCHEDULE_FILE as deprecated [1181]. + - Removed outdated keywords from documentation [1390]. + - Documented UMASK keyword [1186]. + - ConfigParser: Can turn off validation + warnings [1233, 1249, 1287]. + - Make ies advanced option only [1401]. + - Removing MAX_RUNNING_LOCAL and MAX_RUNNING_LSF from user doc [1398]. + - Apply plot style to other plots [1397]. + - Fig bug in initialization when out of range [1394]. + - Added new object for generic config settings [1391]. + - Changes to plot settings [11359,376,1380,1382,1386]. + - Fix bug in load case manually [1368]. + - Documentation of plugins [1194]. + - Changed all time handling to UTC. This will affect loading old cases [1229, 1257]. + - Removed keyword QC_PATH + updated GRID [1263]. + - Making sure the ertshell is creating the run path [1280]. + - Create Doxygen [1277,1278,1294,1309,1317]. + - Ability to run analysis from GUI [1314]. + - Improved documentation of priors [1319]. + - Bug in config parsing with relative paths [1333]. + - Field documentation updates [1337]. + + +libwecl_well: + + - Internalize rates for wells and connections in the well library + [1403]. + - New function well_ts_get_name() [1393]. + +libutil: + + - Functions for parsing and outputting dates in ISO format[1248]. + - stringlist_join - like Python str.join [1243]. + - bug in matrix_dgemm [1286]. + - Resurrected block_fs utilities from the past [1297]. + - Slicing for runpath_list [1356]. + diff --git a/ThirdParty/Ert/script/download-pr b/ThirdParty/Ert/script/download-pr new file mode 100644 index 0000000000..6c20e4c4ca --- /dev/null +++ b/ThirdParty/Ert/script/download-pr @@ -0,0 +1,78 @@ +#!/usr/bin/env python +import requests +import json +import os +import sys + +closed_pr = set( [1197 , 1201, 1235, 1244, 1245, 1252, 1261, 1262, 1366, + 1357, 1282, 1279, 1267, 1273, 1305, 1312, 1313, 1339 , 1346, + 1354, 1370,1371, 1381]) + +def getPRList( api_token, first_pr ): + pr = first_pr + pr_list = [] + prev_len = 0 + sys.stderr.write("Downloading PR: ") + while True: + if pr in closed_pr: + pr += 1 + else: + url = "https://api.github.com/repos/Ensembles/ert/pulls/%d" % pr + response = requests.get( url , {"access_token" : api_token}) + for i in range(prev_len): + sys.stdout.write("\b") + + sys.stdout.write("%d" % pr ) + sys.stdout.flush() + prev_len = len("%s" % pr) + + if response.status_code == 200: + pr_list.append( json.loads( response.content ) ) + pr += 1 + else: + break + + + + return pr_list + + +def printPRList( pr_list , fileH): + for pr in pr_list: + title = pr["title"] + body = pr["body"] + nr = pr["number"] + + try: + fileH.write( "[%d] *%s*\n\n" % (nr , title)) + except UnicodeEncodeError: + fileH.write(" [%d] : UnicodeError") + + try: + fileH.write( "%s\n\n\n" % body ) + except UnicodeEncodeError: + fileH.write("UnicodeError") + + +def main(): + if "GITHUB_API_TOKEN" in os.environ: + github_api_token = os.getenv("GITHUB_API_TOKEN") + else: + sys.exit("You must create a github access token and set the environment variable 'GITHUB_API_TOKEN' to proceed") + + pr1 = int(sys.argv[1]) + pr_list = getPRList( github_api_token, pr1) + pr2 = pr_list[-1]["number"] + + filename = "/tmp/relnotes-%d-%d" % (pr1 , pr2) + printPRList( pr_list , open(filename , "w")) + + print "Have created file: %s which can be a starting point for release notes" % filename + + + + +if __name__ == "__main__": + main( ) + + diff --git a/ThirdParty/Ert/script/job_dispatch.py b/ThirdParty/Ert/script/job_dispatch.py deleted file mode 100644 index 5c0ada4de2..0000000000 --- a/ThirdParty/Ert/script/job_dispatch.py +++ /dev/null @@ -1,354 +0,0 @@ -#!/usr/bin/env python -from __future__ import print_function -import sys -import os -import os.path -import socket -import time -import random -import subprocess - - -OK_file = "OK" -EXIT_file = "EXIT" -STATUS_file = "STATUS" -run_path = sys.argv[1] -sleep_time = 10 # Time to sleep before exiting the script - to let the disks sync up. -short_sleep = 2 - -################################################################# - -def redirect(file , fd , open_mode): - new_fd = os.open(file , open_mode , 0644) - os.dup2(new_fd , fd) - os.close(new_fd) - - -def cond_symlink(target , src): - if not os.path.exists(src): - os.symlink( target , src ) - - -def cond_unlink(file): - if os.path.exists(file): - os.unlink(file) - - - -def exec_job(job , executable): - if job.get("stdin"): - redirect(job["stdin"] , 0 , os.O_RDONLY) - - if job.get("stdout"): - redirect(job["stdout"] , 1 , os.O_WRONLY | os.O_TRUNC | os.O_CREAT ) - - if job.get("stderr"): - redirect(job["stderr"] , 2 , os.O_WRONLY | os.O_TRUNC | os.O_CREAT ) - - if job.get("environment"): - env = job["environment"] - for key in env.keys(): - os.putenv(key , env[key]) - argList = [ executable ] - if job.get("argList"): - argList += job["argList"] - os.execvp(executable , argList ) - - -def job_process(job , executable): - import subprocess - argList = [ executable ] - if job.get("argList"): - argList += job["argList"] - - P = subprocess.Popen( argList , - stdin = job.get("stdin"), - stdout = job.get("stdout"), - stderr = job.get("stderr"), - env = job.get("environment") ) - return P - - -def kill_process( job , P ): - fileH = open( EXIT_file , "a") - fileH.write("Job:%s has been running for more than %d minutes - explicitly killed.\n" % (job["name"] , job["max_running_minutes"])) - fileH.close() - - try: - P.kill() # P.kill became available in Python2.6 - except AttributeError: - os.system("kill -9 %s" % P.pid) - - -def unlink_empty(file): - if os.path.exists(file): - st = os.stat( file ) - if st.st_size == 0: - os.unlink( file ) - - - -def cleanup( job ): - if job.get("stdout"): - unlink_empty( job["stdout"] ) - if job.get("stderr"): - unlink_empty( job["stderr"] ) - if job.get("license_link"): - os.unlink(job["license_link"]) - - - -# This function implements a simple "personal license" system limiting -# how many instances of this job can run concurrently. Observe that the -# limiting is based on pr. invocation of the queue system (i.e. ERT -# binary) and pr user. The system works as follows: -# -# 1. The job is initilized with a license_path and a max_running -# variable. -# -# 2. In the licens_path directory a license file is made. -# -# 3. For each instance a random hard-link is created to the license -# file - this is how the number of concurrent uses is counted. -# -# 4. When the external program is finished the hard link is removed. - - -def license_check( job ): - job["license_link"] = None - if job.has_key("max_running"): - if job["max_running"]: - job["license_file"] = "%s/%s" % (job["license_path"] , job["name"]) - max_running = job["max_running"] - license_file = job["license_file"] - while True: - job["license_link"] = "%s/%d" % (job["license_path"] , random.randint(100000,999999)) - if not os.path.exists(job["license_link"]): - break - - - if not os.path.exists(license_file): - fileH = open(license_file , "w") - fileH.write("This is a license file for job:%s" % job["name"]) - fileH.close() - - - stat_info = os.stat(license_file) - currently_running = stat_info[3] - 1 - - while True: - stat_info = os.stat(license_file) - currently_running = stat_info[3] - 1 - if currently_running < max_running: - break - else: - time.sleep(5) - - os.link(license_file , job["license_link"]) - - while True: - stat_info = os.stat(license_file) - currently_running = stat_info[3] - 1 - if currently_running <= max_running: - break # OK - now we can leave the building - and let the job start - else: - time.sleep(5) - - -# Compatibility mode which must be retained until all ert prior to -# svn 2709 has been removed. - -def get_executable( job ): - executable = job.get("executable") - if not executable: - executable = job.get("portable_exe") - if not executable: - cpu = os.uname()[4] - if job["platform_exe"].has_key(cpu): - executable = job["platform_exe"][cpu] - else: - return (False, 0 , "%s : did not recognize platform:%s" % (job["name"] , cpu)) - - return executable - - - -def run_one(job): - license_check( job ) - if job.get("stdin"): - if not os.path.exists(job["stdin"]): - return (False , 0 , "Could not locate stdin file: %s" % job["stdin"]) - - if job.get("start_file"): - if not os.path.exists(job["start_file"]): - return (False , -1 , "Could not locate start_file:%s" % job["start_file"]) - - if job.get("error_file"): - if os.path.exists( job.get("error_file")): - os.unlink( job.get("error_file") ) - - - executable = get_executable( job ) - start_time = time.time() - - if job.get("max_running_minutes"): - P = job_process( job , executable) - while True: - time.sleep( short_sleep ) - run_time = time.time() - start_time - poll = P.poll() - if poll is None: - # Still running - if run_time > job["max_running_minutes"] * 60: - # Have been running to long - kill it - kill_process( job , P ) - break - else: - # Have completed within the time limits - break - exit_status = 0 # NOOOT properly used - else: - pid = os.fork() - if pid == 0: - exec_job(job , executable) - else: - (return_pid , exit_status) = os.waitpid(pid , 0) - - - # Check success of job; look for both target_file and - # error_file. Both can be used to signal failure - # independently. - - if job.get("target_file"): - if os.path.exists(job["target_file"]): - stat = os.stat(job["target_file"]) - if stat.st_ctime > start_time: - status = (True , 0 , "") - else: - status = (True , 0 , "Hmmm - seems the target file has not been updated - let the job suceed anyway...??") - else: - status = (False , exit_status , "%s : could not find target_file:%s" % (job["name"] , job["target_file"])) - else: - status = (True , exit_status , "Target file not specified") # Do not really look at exit status yet... - - if status[0]: - if job.get("error_file"): - if os.path.exists( job.get("error_file") ): - status = (False , -1 , "Found the error file:%s - job failed" % job.get("error_file")) - - return status - - - - - -################################################################# - -################################################################# - -os.nice(19) -if not os.path.exists( run_path ): - sys.stderr.write("*****************************************************************\n"); - sys.stderr.write("** FATAL Error: Could not find directory: %s \n" % run_path) - sys.stderr.write("** CWD: %s\n" % os.getcwd()) - sys.stderr.write("*****************************************************************\n"); - - fileH = open(EXIT_file , "w") - fileH.write("Could not locate:%s " % run_path) - fileH.write("CWD: %s" % os.getcwd()) - fileH.close() - sys.exit(-1) - - -################################################################# -# 1. Change current directory to the runpath. -# 2. Modify the sys.path variable to include the runpath -# 3. Import the jobs module. -################################################################# -os.chdir( run_path ) -sys.path.append( os.getcwd() ) -import jobs - -# The jobs module can optionally have a dictionary 'options', which can be -# used to modify some of the global run time properties of the script. -if hasattr(jobs , "options"): - options = getattr( jobs , "options") - OK_file = options.get("OK_file" , OK_file ) - EXIT_file = options.get("EXIT_file" , EXIT_file ) - STATUS_file = options.get("STATUS_file" , STATUS_file ) - sleep_time = options.get("sleep_time" , sleep_time ) - -cond_unlink(EXIT_file) -cond_unlink(STATUS_file) -cond_unlink(OK_file) -fileH = open(STATUS_file , "a") -fileH.write("%-32s: %s/%s\n" % ("Current host" , socket.gethostname() , os.uname()[4])) -fileH.close() - - -random.seed() - -for job in jobs.jobList: - # To ensure compatibility with old versions. - if not job.has_key("max_running_minutes"): - job["max_running_minutes"] = None - -if len(sys.argv) == 2: - # Normal batch run. - for job in jobs.jobList: - fileH = open(STATUS_file , "a") - now = time.localtime() - fileH.write("%-32s: %02d:%02d:%02d .... " % (job["name"] , now.tm_hour , now.tm_min , now.tm_sec)) - fileH.close() - (OK , exit_status, error_msg) = run_one(job) - now = time.localtime() - if OK: - fileH = open(STATUS_file , "a") - fileH.write("%02d:%02d:%02d \n" % (now.tm_hour , now.tm_min , now.tm_sec)) - fileH.close() - else: - fileH = open(EXIT_file , "a") - fileH.write("%02d:%02d:%02d \n" % (now.tm_hour , now.tm_min , now.tm_sec)) - fileH.write("%s : failed\n" % job["name"]) - fileH.write("%s\n" % error_msg) - fileH.close() - sys.exit(exit_status) - - - if OK: - fileH = open("OK" , "w") - fileH.write("All jobs complete") - fileH.close() - time.sleep( sleep_time ) # Let the disks sync up -else: - #Interactive run - jobHash = {} - for job in jobs.jobList: - jobHash[job["name"]] = job - - for job_name in sys.argv[2:]: - # This is totally unpredictable if there more jobs with - # the same name. - if jobHash.has_key( job_name ): - job = jobHash[job_name] - print('Running job: %s ... ' % job_name, end='') - sys.stdout.flush() - (OK , exit_status, error_msg) = run_one( job ) - if OK: - print('OK') - else: - print('failed ...') - print('-----------------------------------------------------------------') - if job.get("stderr"): - print('Error:%s ' % error_msg) - if os.path.exists(job["stderr"]): - fileH = open(job["stderr"],"r") - for line in fileH.readlines(): - print(line, end='') - fileH.close() - print('-----------------------------------------------------------------') - sys.exit() - else: - print('Job: %s does not exist. Available jobs:' % job_name) - for j in jobs.jobList: - print(' %s' % j['name']) diff --git a/ThirdParty/Ert/share/gui/doc/documentation.txt b/ThirdParty/Ert/share/gui/doc/documentation.txt deleted file mode 100644 index 7a25a71ffc..0000000000 --- a/ThirdParty/Ert/share/gui/doc/documentation.txt +++ /dev/null @@ -1,70 +0,0 @@ -ERTGUI core documentation - - Codebase in C Codebase in Python - -+--------------------+ +-------------------------+ -| ERT |/------------\| ErtWrapper | -| shared C library |\------------/| ctypes wrapper | -+--------------------+ | (C <-> Python comm.) | - +-------------------------+ - /\ - || - || - \/ - +-------------------------+ - | ContentModel | - | Class for fetching and | - | updating data in ERT | - +-------------------------+ - /\ - || - || - \/ - +-------------------------+ - | Widgets | - | GUI components that | - | enables presentation | - | and modification of | - | data in ERT | - +-------------------------+ - - -ERT: - the base software which the GUI controls. - -ErtWrapper: - this class simplifies the link between Python code and the exposed - functions of the shared library of ERT. - All communication between ERT and the GUI is performed through this - class and type safety of the functions in the shared library are - provided through a prototyping functionality. - -ContentModel: - This class is a base class for all widgets and algorithms that need - to communicate with ERT. Several abstract functions are defined that - must/can be implemented: - * initialize(model): typically used for prototyping of functions - * getter(model): used to fetch data from ERT - * setter(model, value): used for updating data values - * insert(model, value): used for adding data values - * remove(model, value): used for removing data values - - The program should never call these functions directly but use: - * getFromModel(): which will call the getter automatically - * updateContent(value, operation = UPDATE|INSERT|REMOVE): - which will call setter/insert/remove respectively automatically. - - A final function that must be implemented is fetchContent(). This function - will automatically be called when the model (ERT) is ready or has been - changed. This is also safe to be called by the program. Typical use of this - function is to call getFromModel() which returns the data generated by the - implemented getter function and then populate the widgets with the data. - - Whenever changes are made to the GUI ERT should be updated by calls - to updateContent(). - -Widgets: - Several widgets have been implemented. Most of these subclass HelpedWidget - which subclass ContentModel and provide built-in help functionality. - - diff --git a/ThirdParty/Ert/share/gui/doc/info.txt b/ThirdParty/Ert/share/gui/doc/info.txt deleted file mode 100644 index 09b28d82a0..0000000000 --- a/ThirdParty/Ert/share/gui/doc/info.txt +++ /dev/null @@ -1,244 +0,0 @@ -forward_model: --------------- - -get: ----- -model_config = enkf_main_get_model_config( enkf_main ) -forward_model = model_config_get_forward_model( model_config ) -names = forward_model_alloc_joblist( forward_model ) <- Allokerer en stringlist() med navnene p jobbene. - - - -set ---- -forward_model_clear( forward_model ) - -forward_model_add_job( forward_model , job_name ); -forward_model_iset_job_arg( forward_model , job_nr , key , value); <- Set argument - observe that the jobs are identified with the index in - the forward model, and not by name. - -more ----- -s = enkf_main_get_site_config( enkf_main ) -joblist = site_config_get_installed_jobs( s ); -job_names = ext_joblist_alloc_list( joblist ); <- Stringlist - - - -forward_model_get_job( forward_model , ?NAME?) -ext_joblist_get_job( joblist , ?NAME?) - -ext_job = forward_model_iget_job( forward_model , job_nr ) -arg_string = ext_job_get_private_args_as_string( ext_job ); -ext_job_set_private_args_from_string( ext_job , "KEY1=Value1 , Key2=value2" ) - - -ext_job_get_help_text( job ); - - --------------------------------------- - - -LOG: - -Get ---- -log_file = enkf_main_get_log_file( enkf_main ) -log_level = enkf_main_get_log_level( enkf_main ) - - -Set ---- -enkf_main_set_log_file( enkf_main , "log_file" ) -enkf_main_set_log_level( enkf_main , log_level ) - - -analysis_config = enkf_main_get_analysis_config( enkf_main ) -log_path = analysis_config_get_log_path( analysis_config ); -analysis_config_set_log_path( analysis_config , log_path ); - - - - -INITIALIZED ------------ - -enkf_main_is_initialized(enkf_main , active_mask); - -active_mask er n en vector av typen: bool_vector som er implementert i -libutil. Dersom alle elemementene er aktive kan du sende inn None / -NULL, ellers m allokere og initialisere en active_mask instans: - -mask = bool_vector_alloc(0 , false) -for index in selectedMembers: - bool_vector_iset( mask , index , true ) - -enkf_main_is_initialized( enkf_main , mask ) -bool_vector_free( mask ) - - - - -TEMPLATES: ----------- -Get: ----- -templates = enkf_main_get_templates( enkf_main ); -s = ert_templates_alloc_list( templates ); <- Returnerer en stringlist med navn -template = ert_templates_get_template( templates , "Navn") -template_file = ert_template_get_template_file( template ); -target_file = ert_template_get_target_file( template ); -arg_string = ert_template_get_args_as_string( template ) - - -Set: (kan enten gjres med manuelle add / del eller ved hjelp av clear og add). ----- -templates = enkf_main_get_templates( enkf_main ); -ert_templates_clear( templates ); -ert_templates_del_template( templates , "Key"); -template = ert_templates_add_template( templates , "Key", "Template_file" , "target_file" , arg_string /* Can be None / NULL */); - -template = ert_templates_get_template( templates , Key) -ert_template_set_target_file(template , target_file ); -ert_template_set_template_file(template , template_file ); -ert_template_set_args_as_string(template , arg_string); - - - - - -INITIALIZATION --------------- - -enkf_main_initialize_from_existing__( enkf_main , source_case , source_step , source_state , - iens_mask , ranking_key /* Will be NULL*/ , - node_list); - - - -node_list ~ stringlist med de valgt nodene. - -iens_mask = bool_vector_alloc(0 , false); <- Allokereres med false som default. -iens_mask ~ bool_vector hvor alle de aktive indeksene er satt til true - - - -SCHEDULE_PREDICTION_FILE ------------------------- -Get: enkf_main_get_schedule_prediction_file( enkf_main ) -Set: enkf_main_set_schedule_prediction_file( enkf_main , filename ) - - -REFCASE -------- -Get: -ecle_config = enkf_main_get_ecl_config( enkf_main ); -refacse = ecl_config_get_refcase_name( ecl_config ) - -Set: -enkf_main_set_refcase( enkf_main , refcase ) ???????????????????? Ikkje load? - - - -HISTORY_SOURCE --------------- -Get: -m = enkf_main_get_model_config( enkf_main ) -history_source = model_config_get_history_source( m ) <- History_source ~ enum history_source_type fra libsched/src/history.y - - -Set: -m = enkf_main_get_model_config( enkf_main ) -model_config_get_history_source( m , source) <- NB Hvis source har en av verdiene REFCASE_HISTORY / REFCASE_SMULATED du maa satt ett REFACSE forst. - - - -PRE_CLEAR_RUNPATH: ------------------ -Get: enkf_main_get_pre_clear_runpath( enkf_main ) <- Return value: true | false -Set: enkf_main_set_pre_clear_runpath( enkf_main , true | false ) - - - - -CASE_TABLE ----------- -model_config = enkf_main_get_model_config( enkf_main ); - -get: model_config_get_case_table_file( model_config ) -set: enkf_main_set_case_table( model_config , filename ); <- File must exist - - - -REFCASE - Plotting: ------------------- -Get: - -ecl_config = enkf_main_get_ecl_config( enkf_main ) -ecl_sum = ecl_config_get_refcase( ecl_config ) - -Plotting: - - 1. Sjekk om refcase har variabel: - - ecl_sum_has_general_var( ecl_sum , key) - - hvor 'key' er en summary key, som for eksempel "WWCT:OP_1". Dersom denne funksjonen returnerer true, maa du - sporre ecl_sum som en "oversettelse" fra key til en integer index, og siden bruke den indeksen: - - key_index = ecl_sum_get_general_var_index( ecl_sum , key ); - - - 2. Alloker en tidsakse: - - time_vector = ecl_sum_alloc_time_vector( ecl_sum , true /* Report_only kan vre true */); - - Denne kan selvflgelig gjenbrukes mellom flere summary plott. - - 3. Alloker datavektor - - data_vektor1 = ecl_sum_alloc_data_vector( ecl_sum , key_index1 , true ); - - - Da har du x og y i en hhv time_t_vector og double_vector - en av joakims hjemmelade datastrukturer: - - size: xxx_vector_get_size( ) - get1: xxx_vector_iget( ) - get2: xxx_vector_get_ptr() <- Returnerer en peker til underliggende data. - - - 4. xxx_vector_free () naar du er ferdi. - - -5. (Ekstraoppgave:) en ecl_sum instans kan ogs loades fra filsystemet (helt utenfor ERT sin database) med - - ecl_sum = ecl_sum_fread_alloc_case( "Navn p en ECLIPSE.DATA fil" ) - ---------------------- - -Gen_data: -size: ------ -ensemble_config = enkf_main_get_ensemble_config( enkf_main ) -config_node = ensemble_config_get_node( ensemble_config , "KEY") -gen_data_config = enkf_config_node_get_ref( config_node ) - -size = gen_date_config_get_initial_size( gen_data_config ) - -Value: ------ -value = enkf_node_user_get( enkf_node , "KEY:tall" , &valid) <----- NB Det er helt avgjrende sjekke at valid returnerer true, - gen_data typen er (altfor) fleksibel, og kan endre strrelse runtime. - At du har sjekket initiell strrelse er derfor desverre ikke tilstrekkelig - til validere input. - - ----------------- -Saving: - -1. Sette config file: enkf_main_set_user_config_file( enkf_main , "config_file" ) [Denne trengs for "Save AS"] -2. enkf_main_fprintf_config( enkf_main ); - - - - \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/doc/initializers b/ThirdParty/Ert/share/gui/doc/initializers deleted file mode 100644 index 26ec3d9224..0000000000 --- a/ThirdParty/Ert/share/gui/doc/initializers +++ /dev/null @@ -1,201 +0,0 @@ - -mask = util.bool_vector_alloc(ens_size , false) -# Frste arg: strrelse -# Andre arg: init verdi. - -util.bool_vector_iset( mask , 67 , true ) -# bool_ptr = util.bool_vector_get_ptr( mask ) -# Send inn int_ptr -.... -#util.bool_vector_free( mask ) - - - - - - - -#Missing initializer: job_script -# s = enkf_main_get_site_config( enkf_main ) -# site_config_get_job_script( s ); -# site_config_set_job_script( s , EXECUTABLE_FILE ); - - - - -Missing initializer: install_job - s = enkf_main_get_site_config( enkf_main ); - site_config_install_job( s , JOB_KEY , EXISTING_FILE ); <- Should have a GUI option for creating the - config file EXISTING_FILE - -INSTALL_JOB: ------------ -1. Denne br endre navn til "Private jobs" - -2. Her blir get/set ganske komplisert - det er to grunner til det: - - a) Listen over installerte jobber inneholder bde globale jobber, - som brukeren ikke har anledning til manipulere, og "Private" - jobber som brukeren har installert og sledes m f lov til - manipulere. - - b) Forelpig er det bare basert en config_file, men nr vi frst - lager GUI ville det vre veldig naturlig lage mulighet for - konfigurere en jobb via GUI. - -3. Det opprinnelige GUI panelet bestr av to felt. Kutt ut det ene - feltet, men la det sprette opp ett vindu nr man legger til en - jobb. - - -Get: -s = enkf_main_get_site_config( enkf_main ) -jl = site_config_get_installed_jobs( s ) -h = ext_joblist_get_jobs( jl ) <- N er h en hash tabell. - -#Itererer over hash_tabellen: -python_joblist = [] -job = hash_get( h , job_name ); -if ext_job_is_private( job ): <- Denne funksjonen er i libjob_queue - python_joblist.append( job_name ) - -OK : python_joblist skal inneholde de job_navnene som skal - vises i GUI. - - - -Set: Her tror jeg det er enklest respondere eksplisitt p add_job og - del_job events, istedet for ta en batch prosess til slutt - -add_job: --------- -job = ext_job_fscanf_alloc( job_name , site_config_get_license_root_path__( s ) , job_config_file ) # job_name and job_config_file from GUI. -ext_joblist_add_job( jl , job ) - - -del_job -------- -ext_joblist_del_job( jl , job_name ) - - - - - - -#Missing initializer: num_realizations -# enkf_main_get_ensemble_size( enkf_main ); -# enkf_main_resize_ensemble( enkf_main ); <- Denne kan potensielt ta en del tid, og - br vre beskyttet av en APPLY knapp. - - -Missing initializer: parameters -Missing initializer: param_type -Missing initializer: param_min -Missing initializer: param_max -Missing initializer: param_init -Missing initializer: param_output -Missing initializer: param_init_files -Missing initializer: param_file_generated_by_enkf -Missing initializer: param_file_loaded_by_enkf -Missing initializer: history_source -Missing initializer: obs_config - - - -#Missing initializer: max_submit -# s = enkf_main_get_site_config( enkf_main ); -# site_config_get_max_submit( s ); -# site_config_set_max_submit( s , max_submit ); - - - - -#Missing initializer: max_resample -# m = enkf_main_get_model_config( enkf_main ); -# model_config_get_max_resample( m ); -# model_config_set_max_resample( m , max_resample ); - - - -Missing initializer: forward_model -Missing initializer: case_table -Missing initializer: license_path - -Missing initializer: runpath -# m = enkf_main_get_model_config( enkf_main ) -# model_config_get_runpath_fmt( m ) -# model_config_set_runpath_fmt( m , "/path/to/run%d" ) - - - -Missing initializer: pre_clear_runpath -Missing initializer: delete_runpath -Missing initializer: keep_runpath -Missing initializer: run_template -Missing initializer: dbase_type -Missing initializer: enspath -Missing initializer: select_case - - -#Missing initializer: log_file -#Missing initializer: log_level -# lg = enkf_main_get_logh( enkf_main ); -# log_reset_filename( lg , "/some/path/to/FILENAME" ); -# log_get_filename( lg ); -# -# log_get_level( lg ); -# log_set_level( lg , LOG_LEVEL) - - - -Missing initializer: update_log_path - - - - -#Get: s = enkf_main_get_data_kw( enkf_main ) -# subst_list_get_size( s ) -# subst_list_iget_key( s ) -# subst_list_iget_value( s ) -#Set: enkf_main_clear_data_kw( enkf_main ) -# enkf_main_add_data_kw( enkf_main , key , value ) - -#Get: m = enkf_main_get_model_config( enkf_main ) -# model_config_get_enkf_sched_file( m ) -#Set: model_config_set_enkf_sched_file( m , "FILENAME" ) - -#Get l = enkf_main_get_local_config( enkf_main ); -# s = local_config_get_config_files( l ) # Stringlist -#Set local_config_clear_config_files( l ) -# local_config_add_config_file(l , "FILENAME") - -#Get s = enkf_main_get_site_config( enkf_main ) -# site_config_get_max_running_(lsf|rsh|local)( s ) -#Set site_config_get_max_running_(lsf|rsh|local)( s , value ) - -#Get s = enkf_main_get_site_config( enkf_main ) -# h = site_config_get_rsh_host_list( s ) -# Iterer over hash - men bruk hash_get_int() for aa faa antall jobber en host kan ta. -#Set site_config_clear_rsh_host_list( s ) -# site_config_add_rsh_host( s , host_name , max_running ) - -#Get s = enkf_main_get_site_config( enkf_main ) -# queue_name = site_config_get_lsf_queue( s ) -#Set site_config_set_lsf_queue( s , "NORMAL" ) - -# site_config_set_job_queue( s , "LOCAL|LSF|RSH" ); -# site_config_get_job_queue_name( s ); - -#self.job_script = "..." -#self.setenv = [["LSF_BINDIR", "/prog/LSF/7.0/linux2.6-glibc2.3-x86_64/bin"], ["LSF_LIBDIR", "/prog/LSF/7.0/linux2.6-glibc2.3-x86_64/lib"]] -#Get: s = enkf_main_get_site_config( enkf_main ) -# h = site_config_get_env_hash( s ) -#Set site_config_clear_env( s ) -# site_config_setenv( s , var , value ) - -#self.update_path = [["PATH", "/prog/LSF/7.0/linux2.6-glibc2.3-x86_64/bin"], ["LD_LIBRARY_PATH", "/prog/LSF/7.0/linux2.6-glibc2.3-x86_64/lib"]] -#Get: s = enkf_main_get_site_config( enkf_main ) -# pathlist = site_config_get_path_variables( s ) -# valuelist = site_config_get_path_values( s ) -#Set: site_config_clear_pathvar( s ) -# site_config_update_pathvar( s , path , value ); diff --git a/ThirdParty/Ert/share/gui/doc/run_info b/ThirdParty/Ert/share/gui/doc/run_info deleted file mode 100644 index 3c7280a722..0000000000 --- a/ThirdParty/Ert/share/gui/doc/run_info +++ /dev/null @@ -1,36 +0,0 @@ -state = enkf_main_iget_state( enkf_main , iens ); -status = enkf_state_get_run_status( state ); -sim_start = enkf_state_get_start_time( state ); -submit_time = enkf_state_get_submit_time( state ); - - -Queue running: -------------- -s = enkf_main_get_site_config( enkf_main ) -site_config_queue_is_running( s ) - - -Kill simulation ---------------- -enkf_state_kill_simulation( state ) - - -Restart simulation ------------------- -enkf_state_restart_simulation( state , resample ) /* Resample er en bool - True: Kjr ny initialisering */ - - - - -Main queue pausing: -------------------- -job_queue_get_pause( jq ) - -job_queue_set_pause_on( jq ) - -job_queue_set_pause_off( jp ) - - - - - diff --git a/ThirdParty/Ert/share/gui/doc/tmp_info.txt b/ThirdParty/Ert/share/gui/doc/tmp_info.txt deleted file mode 100644 index bc63f69f66..0000000000 --- a/ThirdParty/Ert/share/gui/doc/tmp_info.txt +++ /dev/null @@ -1,69 +0,0 @@ -GEN_DATA (Det er ikke skille p GEN_DATA og GEN_PARAM - alt er GEN_DATA) --------- - -1. Opprette en ny: ensemble_config_add_gen_data( ensemble_config , new_key ); - - -2 Get: - - gen_data_config = enkf_config_node_get_ref( config_node ); - - output_format = gen_data_config_get_output_format( gen_data_config ); <- Returverdien her er en enum: gen_data_file_format_type, - input_format = gen_data_config_get_input_format( gen_data_config ); definert i gen_data_config.h - template_file = gen_data_config_get_template_file( gen_data_config ); - template_key = gen_data_config_get_template_key( gen_data_config ); - init_file_fmt = gen_data_config_get_init_file_fmt( gen_data_config ); - ..... - enkf_config_node_get_enkf_outfile( config_node ) -> Include file (parameter/general) - enkf_config_node_get_min_std_file( config_node ) -> Min. std. (parameter/general) - enkf_config_node_get_enkf_infile( config_node ) -> File loaded by EnKF (general) - - - -3. Update: - - enkf_config_node_update_gen_data( config_node , input_format , output_format , /* Enum: gen_data_file_format_type */ - init_file_format , - template_file , - template_key , - enkf_outfile_fmt , - enkf_infile_fmt , - min_std_file ); - - Legg merke til at det er ganske MAANGE innbyrdes krav mellom de - forskjellige variablene som maa vaere tilfredsstilt; dette er - "dokumentert" i funksjonene enkf_config_node_update_gen_data() og - gen_data_config_update(). - - - - - -OBS_CONFIG: ----------- - -Get: ----- -obs = enkf_main_get_obs( enkf_main ); -enkf_obs_get_config_file( obs ); - - -Set: -enkf_main_load_obs( enkf_main , obs_config_file ); - - - - - -KEEP_RUNPATH / DELETE_RUNPATH ------------------------------ - -Denne variabelen er definert som en streng i tui - jeg foreslaar at du -heller bruker en tilsvarende tilnaerming som naar vi skal velge hvilke -realisasjoner som skal simuleres paa, hver av de smaa boksene skal ha -tre mulige verdier, tilsvarende enum keep_runpath_type i enkf_types.h. - -Deretter: - -enkf_main_iget_keep_runpath( enkf_main , index ); -enkf_main_iset_keep_runpath( enkf_main , index , enum_value ); diff --git a/ThirdParty/Ert/share/gui/help/config/analysis/analysis_module.html b/ThirdParty/Ert/share/gui/help/config/analysis/analysis_module.html deleted file mode 100644 index f0b8207c57..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/analysis/analysis_module.html +++ /dev/null @@ -1 +0,0 @@ -Select which type of ensemble smoother to use for perform updates \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/analysis/iterated_analysis_module.html b/ThirdParty/Ert/share/gui/help/config/analysis/iterated_analysis_module.html deleted file mode 100644 index adea08022e..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/analysis/iterated_analysis_module.html +++ /dev/null @@ -1 +0,0 @@ -Select which type of iterated ensemble smoother to use for perform updates \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/init/history_length.html b/ThirdParty/Ert/share/gui/help/config/init/history_length.html deleted file mode 100644 index df8285cb42..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/init/history_length.html +++ /dev/null @@ -1 +0,0 @@ -The timestep of the source case from which the initial values are copied \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/add_fixed_length_schedule_kw.html b/ThirdParty/Ert/share/gui/help/config/keywords/add_fixed_length_schedule_kw.html deleted file mode 100644 index 7fd6807ce1..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/add_fixed_length_schedule_kw.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/add_static_kw.html b/ThirdParty/Ert/share/gui/help/config/keywords/add_static_kw.html deleted file mode 100644 index c78e0cbbc3..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/add_static_kw.html +++ /dev/null @@ -1,15 +0,0 @@ -The restart files from ECLIPSE are organized by keywords, which are of three different types: -
    -
  1. Keywords containing the dynamic solution, e.g. pressure and saturations.
  2. -
  3. Keywords containing various types of header information which is needed for a restart.
  4. -
  5. Keywords containing various types of diagnostic information which is not needed for a restart.
  6. -
- -Keywords in category 2 and 3 are referred to as static keywords. To be able to restart ECLIPSE, the ERT application has to store the keywords in category 2, whereas keywords in category 3 can safely be dropped. To determine whether a particular keyword is in category 2 or 3 ERT considers an internal list of keywords. The current list contains the keywords: - -
INTEHEAD LOGIHEAD DOUBHEAD IGRP SGRP XGRP ZGRP IWEL SWEL XWEL ZWEL
- ICON SCON XCON HIDDEN STARTSOL PRESSURE SWAT SGAS RS RV ENDSOL ICAQNUM ICAQ IAAQ
- SCAQNUM SCAQ SAAQ ACAQNUM ACAQ XAAQ
- ISEG ILBS ILBR RSEG ISTHW ISTHG
-
-Here you can dynamically add to this list. The magic string __ALL__ will add all static keywords, but use of this option is strongly discouraged, as it wastes a lot of disk space. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/analysis_copy.html b/ThirdParty/Ert/share/gui/help/config/keywords/analysis_copy.html deleted file mode 100644 index bb65f45d44..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/analysis_copy.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/analysis_enkf_update.html b/ThirdParty/Ert/share/gui/help/config/keywords/analysis_enkf_update.html deleted file mode 100644 index ba92057398..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/analysis_enkf_update.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/analysis_load.html b/ThirdParty/Ert/share/gui/help/config/keywords/analysis_load.html deleted file mode 100644 index 0439e95c26..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/analysis_load.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/analysis_select.html b/ThirdParty/Ert/share/gui/help/config/keywords/analysis_select.html deleted file mode 100644 index 5be06c89cb..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/analysis_select.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/analysis_set_var.html b/ThirdParty/Ert/share/gui/help/config/keywords/analysis_set_var.html deleted file mode 100644 index 7513aae255..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/analysis_set_var.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/analysis_update.html b/ThirdParty/Ert/share/gui/help/config/keywords/analysis_update.html deleted file mode 100644 index be8ec82a19..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/analysis_update.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/case_table.html b/ThirdParty/Ert/share/gui/help/config/keywords/case_table.html deleted file mode 100644 index a0597c4844..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/case_table.html +++ /dev/null @@ -1 +0,0 @@ -For running sensitivies you can give the cases descriptive names. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/config_help.py b/ThirdParty/Ert/share/gui/help/config/keywords/config_help.py deleted file mode 100644 index 079efe92f3..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/config_help.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/prog/sdpsoft/python2.6.7/bin/python - - -f= open('keywords.txt', "r") -for line in f: - tokens=line.split() - fname = tokens[0]+".html" - href = "Click here to view help on the wiki page." - file= open(fname, "w") - file.write (href) - file.close() -f.close() \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/create_case.html b/ThirdParty/Ert/share/gui/help/config/keywords/create_case.html deleted file mode 100644 index 7a634a6b3a..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/create_case.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/data_file.html b/ThirdParty/Ert/share/gui/help/config/keywords/data_file.html deleted file mode 100644 index 280a668f08..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/data_file.html +++ /dev/null @@ -1 +0,0 @@ -The ECLIPSE data file used to control the simulations. The standard ECLIPSE data file needs to be modified in some ways in order to work with ERT. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/data_kw.html b/ThirdParty/Ert/share/gui/help/config/keywords/data_kw.html deleted file mode 100644 index 50e7d08a0d..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/data_kw.html +++ /dev/null @@ -1 +0,0 @@ -Using Data keywords you can assign arbitrary (Keyword , Value) pairs where all occurences of <Keyword> in the ECLIPSE Data file will be replaced by Value. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/data_ranking.html b/ThirdParty/Ert/share/gui/help/config/keywords/data_ranking.html deleted file mode 100644 index 9336015252..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/data_ranking.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/define.html b/ThirdParty/Ert/share/gui/help/config/keywords/define.html deleted file mode 100644 index b1f1a19e61..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/define.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/delete_runpath.html b/ThirdParty/Ert/share/gui/help/config/keywords/delete_runpath.html deleted file mode 100644 index 397ba46143..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/delete_runpath.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/eclbase.html b/ThirdParty/Ert/share/gui/help/config/keywords/eclbase.html deleted file mode 100644 index e4ba02e992..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/eclbase.html +++ /dev/null @@ -1,5 +0,0 @@ -The basename used for the ECLIPSE simulations. The name should contain a %d-specifier, which will be replazed by the realization number when running ECLIPSE.
- -Example: BASE_%04d will be replaced by BASE_0007 for realization number 7.
- -Note that due to limitations in ECLIPSE, the basename must be in strictly upper or lower case. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/end_date.html b/ThirdParty/Ert/share/gui/help/config/keywords/end_date.html deleted file mode 100644 index 13ea1a5f5b..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/end_date.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/enkf_alpha.html b/ThirdParty/Ert/share/gui/help/config/keywords/enkf_alpha.html deleted file mode 100644 index 5534d25dc1..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/enkf_alpha.html +++ /dev/null @@ -1 +0,0 @@ -A parameter controlling outlier behaviour in the EnKF algorithm. The default value is 1.50. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/enkf_bootstrap.html b/ThirdParty/Ert/share/gui/help/config/keywords/enkf_bootstrap.html deleted file mode 100644 index 62c4d5e1e0..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/enkf_bootstrap.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/enkf_cv_folds.html b/ThirdParty/Ert/share/gui/help/config/keywords/enkf_cv_folds.html deleted file mode 100644 index 8d32df09a6..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/enkf_cv_folds.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/enkf_force_ncomp.html b/ThirdParty/Ert/share/gui/help/config/keywords/enkf_force_ncomp.html deleted file mode 100644 index bff2df9366..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/enkf_force_ncomp.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/enkf_local_cv.html b/ThirdParty/Ert/share/gui/help/config/keywords/enkf_local_cv.html deleted file mode 100644 index 7ea90f84f9..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/enkf_local_cv.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/enkf_merge_observations.html b/ThirdParty/Ert/share/gui/help/config/keywords/enkf_merge_observations.html deleted file mode 100644 index 274c5023ea..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/enkf_merge_observations.html +++ /dev/null @@ -1 +0,0 @@ -If you use the ENKF schedule file option to jump over several dates at a time you can choose whether you want to use all the observations in between, or just the final. Select Perform merge if you want all observations to be used, unselect to use only the final observation. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/enkf_mode.html b/ThirdParty/Ert/share/gui/help/config/keywords/enkf_mode.html deleted file mode 100644 index 3a31f07936..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/enkf_mode.html +++ /dev/null @@ -1 +0,0 @@ -Here you select which EnKF algorithm to use. Use ENKF_STANDARD for the original EnKF algorithm, or ENKF_SQRT for the square root scheme. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/enkf_ncomp.html b/ThirdParty/Ert/share/gui/help/config/keywords/enkf_ncomp.html deleted file mode 100644 index 438e8b761d..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/enkf_ncomp.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/enkf_pen_press.html b/ThirdParty/Ert/share/gui/help/config/keywords/enkf_pen_press.html deleted file mode 100644 index 7385cf5292..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/enkf_pen_press.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/enkf_rerun.html b/ThirdParty/Ert/share/gui/help/config/keywords/enkf_rerun.html deleted file mode 100644 index 3f7b3ec169..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/enkf_rerun.html +++ /dev/null @@ -1 +0,0 @@ -Select if the simulation should be started from time zero after each update. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/enkf_scaling.html b/ThirdParty/Ert/share/gui/help/config/keywords/enkf_scaling.html deleted file mode 100644 index 26f232374d..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/enkf_scaling.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/enkf_truncation.html b/ThirdParty/Ert/share/gui/help/config/keywords/enkf_truncation.html deleted file mode 100644 index cc87ad385f..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/enkf_truncation.html +++ /dev/null @@ -1 +0,0 @@ -Cutoff used on singular value spectrum. Default value: 0.99. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/ensemble_run.html b/ThirdParty/Ert/share/gui/help/config/keywords/ensemble_run.html deleted file mode 100644 index d0c173a933..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/ensemble_run.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/enspath.html b/ThirdParty/Ert/share/gui/help/config/keywords/enspath.html deleted file mode 100644 index cc2d44680e..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/enspath.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/export_field.html b/ThirdParty/Ert/share/gui/help/config/keywords/export_field.html deleted file mode 100644 index e1cf6dddec..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/export_field.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/export_field_ecl_grdecl.html b/ThirdParty/Ert/share/gui/help/config/keywords/export_field_ecl_grdecl.html deleted file mode 100644 index 256e994c04..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/export_field_ecl_grdecl.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/export_field_rms_roff.html b/ThirdParty/Ert/share/gui/help/config/keywords/export_field_rms_roff.html deleted file mode 100644 index 69b24e56a4..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/export_field_rms_roff.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/export_ranking.html b/ThirdParty/Ert/share/gui/help/config/keywords/export_ranking.html deleted file mode 100644 index 82e3807b97..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/export_ranking.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/field.html b/ThirdParty/Ert/share/gui/help/config/keywords/field.html deleted file mode 100644 index 7002f52e4e..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/field.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/forward_model.html b/ThirdParty/Ert/share/gui/help/config/keywords/forward_model.html deleted file mode 100644 index ef7799a67b..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/forward_model.html +++ /dev/null @@ -1 +0,0 @@ -The Forward model defines how the simulations are executed. E.g., which version of ECLIPSE to use, which rel.perm script to run, which rock physics model to use etc. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/gen_data.html b/ThirdParty/Ert/share/gui/help/config/keywords/gen_data.html deleted file mode 100644 index 4225d803d4..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/gen_data.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/gen_kw.html b/ThirdParty/Ert/share/gui/help/config/keywords/gen_kw.html deleted file mode 100644 index 92666c8c31..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/gen_kw.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/gen_param.html b/ThirdParty/Ert/share/gui/help/config/keywords/gen_param.html deleted file mode 100644 index d8ac1acef5..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/gen_param.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/grid.html b/ThirdParty/Ert/share/gui/help/config/keywords/grid.html deleted file mode 100644 index 163472e188..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/grid.html +++ /dev/null @@ -1 +0,0 @@ -This should point to an existing GRID/EGRID-file belonging to your ECLIPSE-model. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/history_source.html b/ThirdParty/Ert/share/gui/help/config/keywords/history_source.html deleted file mode 100644 index eddb472db1..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/history_source.html +++ /dev/null @@ -1,9 +0,0 @@ -ERT will read the historic rates from the Schedule file, but it is also possible to use historic data from another ECLIPSE run (e.g if historic data do not exist in the Schedule file). -
-
SCHEDULE -
ERT will use the historic data provided in the Schedule file. -
REFCASE_SIMULATED -
ERT will use simulated values from another ECLIPSE run (a Reference case) as historic data. -
REFCASE_HISTORY -
ERT will use historic data from a reference case. -
diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/image_type.html b/ThirdParty/Ert/share/gui/help/config/keywords/image_type.html deleted file mode 100644 index 012875d225..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/image_type.html +++ /dev/null @@ -1 +0,0 @@ -In which format should the plots created by PLPLOT be saved (default: png). diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/image_viewer.html b/ThirdParty/Ert/share/gui/help/config/keywords/image_viewer.html deleted file mode 100644 index 422c6d7417..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/image_viewer.html +++ /dev/null @@ -1,5 +0,0 @@ -Here you may decide which application to use to view the plots. The default is a program called /usr/bin/display. -
-
-In order to avoid the plots from flashing in your face as they are created, set Image viewer to /d/proj/bg/enkf/bin/noplot.sh -. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/init_case_from_existing.html b/ThirdParty/Ert/share/gui/help/config/keywords/init_case_from_existing.html deleted file mode 100644 index ba679851bf..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/init_case_from_existing.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/init_misfit_table.html b/ThirdParty/Ert/share/gui/help/config/keywords/init_misfit_table.html deleted file mode 100644 index a242e1e5ce..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/init_misfit_table.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/init_section.html b/ThirdParty/Ert/share/gui/help/config/keywords/init_section.html deleted file mode 100644 index cd2dacddcc..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/init_section.html +++ /dev/null @@ -1,6 +0,0 @@ -The Init section is used to handle initialization of the ECLIPSE run. -This can be used in two different ways: -
    -
  • If it is set to the name of an existing file, the contents of this file will be used for the initialization. -
  • If it is set to the name of a non-existing file, it will be assumed that a file with this name in the simulation folder will be generated when simulations are submitted, either by the ERT application itself, or by some job installed by the user. This generated file will then be used by ECLIPSE for initialization. -
diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/install_job.html b/ThirdParty/Ert/share/gui/help/config/keywords/install_job.html deleted file mode 100644 index 8c97722da7..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/install_job.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/job_script.html b/ThirdParty/Ert/share/gui/help/config/keywords/job_script.html deleted file mode 100644 index bb05afd9a4..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/job_script.html +++ /dev/null @@ -1,7 +0,0 @@ -Running the forward model from enkf is a multi-level process which can be summarized as follows: -
    -
  1. A Python module called jobs.py is written and stored in the directory where the forward simulation is run. This module contains a list of job-elements, where each element is a Python representation of the code entered when installing the job.
  2. -
  3. The ERT application submits a Python script to the EnKF queue system, this script then loads the jobs.py module to find out which programs to run, and how to run them.
  4. -
  5. The Job script starts and monitors the individual jobs in the jobs.py module.
  6. -
-Job script should point at the Python script which is managing the forward model. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/jobname.html b/ThirdParty/Ert/share/gui/help/config/keywords/jobname.html deleted file mode 100644 index c1b4e7290e..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/jobname.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/keywords.txt b/ThirdParty/Ert/share/gui/help/config/keywords/keywords.txt deleted file mode 100644 index ed221111e0..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/keywords.txt +++ /dev/null @@ -1,94 +0,0 @@ -data_file http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#DATA_FILE -eclbase http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#ECLBASE -jobname http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#JOBNAME -grid http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#GRID -init_section http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#INIT_SECTION -num_realizations http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#NUM_REALIZATIONS -schedule_file http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#SCHEDULE_FILE -data_kw http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#DATA_KW -delete_runpath http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#DELETE_RUNPATH -enkf_sched_file http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#ENKF_SCHED_FILE -end_date http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#END_DATE -enspath http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#ENSPATH -select_case http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#SELECT_CASE -history_source http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#HISTORY_SOURCE -refcase http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#REFCASE -install_job http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#INSTALL_JOB -keep_runpath http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#KEEP_RUNPATH -obs_config http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#OBS_CONFIG -result_path http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#RESULT_PATH -runpath http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#RUNPATH -runpath_file http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#RUNPATH_FILE -min_realizations http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#MIN_REALIZATIONS -stop_long_running http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#STOP_LONG_RUNNING -max_runtime http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#MAX_RUNTIME -field http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#FIELD -gen_data http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#GEN_DATA -gen_kw http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#GEN_KW -gen_param http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#GEN_PARAM -surface http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#SURFACE -summary http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#SUMMARY -enkf_alpha http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#ENKF_ALPHA -enkf_bootstrap http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#ENKF_BOOTSTRAP -enkf_cv_folds http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#ENKF_CV_FOLDS -enkf_force_ncomp http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#ENKF_FORCE_NCOMP -enkf_local_cv http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#ENKF_LOCAL_CV -enkf_pen_press http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#ENKF_PEN_PRESS -enkf_mode http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#ENKF_MODE -enkf_merge_observations http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#ENKF_MERGE_OBSERVATIONS -enkf_ncomp http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#ENKF_NCOMP -enkf_rerun http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#ENKF_RERUN -enkf_scaling http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#ENKF_SCALING -enkf_truncation http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#ENKF_TRUNCATION -update_log_path http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#UPDATE_LOG_PATH -analysis_load http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#ANALYSIS_LOAD -analysis_select http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#ANALYSIS_SELECT -analysis_set_var http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#ANALYSIS_SET_VAR -analysis_copy http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#ANALYSIS_COPY -add_fixed_length_schedule_kw http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#ADD_FIXED_LENGTH_SCHEDULE_KW -add_static_kw http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#ADD_STATIC_KW -define http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#DEFINE -schedule_prediction_file http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#SCHEDULE_PREDICTION_FILE -forward_model http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#FORWARD_MODEL -job_script http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#JOB_SCRIPT -queue_system http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#QUEUE_SYSTEM -lsf_server http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#LSF_SERVER -lsf_queue http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#LSF_QUEUE -max_running_lsf http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#MAX_RUNNING_LSF -max_running_local http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#MAX_RUNNING_LOCAL -rsh_host http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#RSH_HOST -rsh_command http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#RSH_COMMAND -max_running_rsh http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#MAX_RUNNING_RSH -image_viewer http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#IMAGE_VIEWER -image_type http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#IMAGE_TYPE -plot_driver http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#PLOT_DRIVER -plot_errorbar http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#PLOT_ERRORBAR -plot_errorbar_max http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#PLOT_ERRORBAR_MAX -plot_height http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#PLOT_HEIGHT -plot_refcase http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#PLOT_REFCASE -refcase_list http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#REFCASE_LIST -plot_path http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#PLOT_PATH -plot_width http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#PLOT_WIDTH -rft_config http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#RFT_CONFIG -rftpath http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#RFTPATH -select_case http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#SELECT_CASE -create_case http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#CREATE_CASE -init_case_from_existing http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#INIT_CASE_FROM_EXISTING -export_field http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#EXPORT_FIELD -export_field_rms_roff http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#EXPORT_FIELD_RMS_ROFF -export_field_ecl_grdecl http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#EXPORT_FIELD_ECL_GRDECL -analysis_update http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#ANALYSIS_UPDATE -analysis_enkf_update http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#ANALYSIS_ENKF_UPDATE -run_smoother http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#RUN_SMOOTHER -run_smoother_with_iter http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#RUN_SMOOTHER_WITH_ITER -ensemble_run http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#ENSEMBLE_RUN -load_results http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#LOAD_RESULTS -load_results_iter http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#LOAD_RESULTS_ITER -observation_ranking http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#OBSERVATION_RANKING -data_ranking http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#DATA_RANKING -export_ranking http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#EXPORT_RANKING -init_misfit_table http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#INIT_MISFIT_TABLE -qc_workflow http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#QC_WORKFLOW -qc_path http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#QC_PATH -setenv http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#SETENV -update_path http://ert.nr.no/ert/index.php/Creating_a_configuration_file_for_ERT#UPDATE_PATH \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/license_path.html b/ThirdParty/Ert/share/gui/help/config/keywords/license_path.html deleted file mode 100644 index cd8d4a08f3..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/license_path.html +++ /dev/null @@ -1 +0,0 @@ -The path where the ERT-licenses for the different programs (such as RMS) are stored. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/load_results.html b/ThirdParty/Ert/share/gui/help/config/keywords/load_results.html deleted file mode 100644 index 2def17d6d9..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/load_results.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/load_results_iter.html b/ThirdParty/Ert/share/gui/help/config/keywords/load_results_iter.html deleted file mode 100644 index 11a79d6e59..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/load_results_iter.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/local_config.html b/ThirdParty/Ert/share/gui/help/config/keywords/local_config.html deleted file mode 100644 index cfa726e6db..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/local_config.html +++ /dev/null @@ -1 +0,0 @@ -This can point to a file with configuration information for local analysis. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/log_file.html b/ThirdParty/Ert/share/gui/help/config/keywords/log_file.html deleted file mode 100644 index 2e2eb3503b..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/log_file.html +++ /dev/null @@ -1 +0,0 @@ -The name of the log file. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/log_level.html b/ThirdParty/Ert/share/gui/help/config/keywords/log_level.html deleted file mode 100644 index dd3c264cbc..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/log_level.html +++ /dev/null @@ -1 +0,0 @@ -The amount of logging. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/lsf_queue.html b/ThirdParty/Ert/share/gui/help/config/keywords/lsf_queue.html deleted file mode 100644 index 7007bb48e0..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/lsf_queue.html +++ /dev/null @@ -1,2 +0,0 @@ -Select which LSF queue to use. - diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/lsf_resources.html b/ThirdParty/Ert/share/gui/help/config/keywords/lsf_resources.html deleted file mode 100644 index 266ae8a750..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/lsf_resources.html +++ /dev/null @@ -1 +0,0 @@ -Specify special LSF requirements here. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/lsf_server.html b/ThirdParty/Ert/share/gui/help/config/keywords/lsf_server.html deleted file mode 100644 index fd9aac3cc2..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/lsf_server.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/max_resample.html b/ThirdParty/Ert/share/gui/help/config/keywords/max_resample.html deleted file mode 100644 index 0e22f3505e..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/max_resample.html +++ /dev/null @@ -1 +0,0 @@ -How many times ERT should resample & retry a simulation. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/max_running_local.html b/ThirdParty/Ert/share/gui/help/config/keywords/max_running_local.html deleted file mode 100644 index 2fe1a41c97..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/max_running_local.html +++ /dev/null @@ -1 +0,0 @@ -Controls the maximum number of simultaneous jobs running when using the LOCAL option. It is strongly recommended to not let this number exceed the number of processors on the workstation used. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/max_running_lsf.html b/ThirdParty/Ert/share/gui/help/config/keywords/max_running_lsf.html deleted file mode 100644 index 607149cd96..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/max_running_lsf.html +++ /dev/null @@ -1 +0,0 @@ -Controls the maximum number of simultaneous jobs submitted to the LSF queue when using the LSF option. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/max_running_rsh.html b/ThirdParty/Ert/share/gui/help/config/keywords/max_running_rsh.html deleted file mode 100644 index a7d64dcd5c..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/max_running_rsh.html +++ /dev/null @@ -1 +0,0 @@ -Controls the maximum number of simultaneous jobs running when using the RSH option. If this number exceeds the total capacity defined in the RSH Host List, it will automatically be truncated to that capacity. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/max_runtime.html b/ThirdParty/Ert/share/gui/help/config/keywords/max_runtime.html deleted file mode 100644 index 3e1de4739b..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/max_runtime.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/max_submit.html b/ThirdParty/Ert/share/gui/help/config/keywords/max_submit.html deleted file mode 100644 index 3fcc40c76c..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/max_submit.html +++ /dev/null @@ -1 +0,0 @@ -How many times the queue system should retry a simulation. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/min_realizations.html b/ThirdParty/Ert/share/gui/help/config/keywords/min_realizations.html deleted file mode 100644 index 4f54035717..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/min_realizations.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/num_realizations.html b/ThirdParty/Ert/share/gui/help/config/keywords/num_realizations.html deleted file mode 100644 index 2b94172324..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/num_realizations.html +++ /dev/null @@ -1 +0,0 @@ -The number of members/realizations in your ensemble, i.e the ensemble size. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/obs_config.html b/ThirdParty/Ert/share/gui/help/config/keywords/obs_config.html deleted file mode 100644 index 267ab3e64b..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/obs_config.html +++ /dev/null @@ -1 +0,0 @@ -This should point to an observation file, a file defining observations and associated uncertainties. It is optional, but strongly recommended to provide an observation file. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/observation_ranking.html b/ThirdParty/Ert/share/gui/help/config/keywords/observation_ranking.html deleted file mode 100644 index be2ff2fe01..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/observation_ranking.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/plot_driver.html b/ThirdParty/Ert/share/gui/help/config/keywords/plot_driver.html deleted file mode 100644 index 249a95f9e0..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/plot_driver.html +++ /dev/null @@ -1,7 +0,0 @@ -The Plot Driver is the sub system used for creating plots. -
-
PLPLOT: -
This is the default system. All the other options regarding plotting are sub options which are only relevant when you are using this. -
TEXT: -
This will not produce any plots, just textfiles which can be used for plotting with your favorite plotting program. This is particularly relevant if you have some special requirements to the plots. -
diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/plot_errorbar.html b/ThirdParty/Ert/share/gui/help/config/keywords/plot_errorbar.html deleted file mode 100644 index 0568bb659d..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/plot_errorbar.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/plot_errorbar_max.html b/ThirdParty/Ert/share/gui/help/config/keywords/plot_errorbar_max.html deleted file mode 100644 index 011fec7881..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/plot_errorbar_max.html +++ /dev/null @@ -1,5 +0,0 @@ -When plotting summary vectors for which observations have been 'installed' with the Observation config, ERT will plot the observed values. If the number of observations is less than Errorbar max, ERT will use errorbars to show the observed values, otherwise it will use two dashed lines indicating +/- one standard deviation. -
-To ensure that you always get errorbars you can set Errorbar max to a very large value. On the other hand, setting Errorbar max to zero will ensure that ERT always plots observation uncertainty using dashed lines of +/- one standard deviation. -
-The setting here will also affect the output when you are using the TEXT driver to plot. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/plot_height.html b/ThirdParty/Ert/share/gui/help/config/keywords/plot_height.html deleted file mode 100644 index e33e7dfe74..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/plot_height.html +++ /dev/null @@ -1,2 +0,0 @@ -When the PLPLOT driver creates a plot file, it will have the height (in pixels) given by the PLOT_HEIGHT keyword. -The default value for PLOT_HEIGHT is 1024 pixels. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/plot_path.html b/ThirdParty/Ert/share/gui/help/config/keywords/plot_path.html deleted file mode 100644 index f40b2a22c5..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/plot_path.html +++ /dev/null @@ -1,3 +0,0 @@ -The plotting engine creates files with plots, they are stored in a directory. -You can tell what that directory should be. -Observe that the current casename automatically will be appended to the plot path. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/plot_refcase.html b/ThirdParty/Ert/share/gui/help/config/keywords/plot_refcase.html deleted file mode 100644 index a7d3d67fb9..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/plot_refcase.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/plot_width.html b/ThirdParty/Ert/share/gui/help/config/keywords/plot_width.html deleted file mode 100644 index 281295d50b..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/plot_width.html +++ /dev/null @@ -1,2 +0,0 @@ -When the PLPLOT driver creates a plot file, it will have the width (in pixels) given by the PLOT_WIDTH keyword. -The default value for PLOT_WIDTH is 1024 pixels. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/pre_clear_runpath.html b/ThirdParty/Ert/share/gui/help/config/keywords/pre_clear_runpath.html deleted file mode 100644 index a67c334861..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/pre_clear_runpath.html +++ /dev/null @@ -1 +0,0 @@ -Select Perform pre clear if you would like the runpath to be cleared before initilaizing. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/qc_path.html b/ThirdParty/Ert/share/gui/help/config/keywords/qc_path.html deleted file mode 100644 index 26029f50f1..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/qc_path.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/qc_workflow.html b/ThirdParty/Ert/share/gui/help/config/keywords/qc_workflow.html deleted file mode 100644 index 61ebf75d26..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/qc_workflow.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/queue_system.html b/ThirdParty/Ert/share/gui/help/config/keywords/queue_system.html deleted file mode 100644 index d23625073f..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/queue_system.html +++ /dev/null @@ -1,8 +0,0 @@ -Controls where the simulation jobs are executed. -
-
LSF: Submits the jobs to the LSF cluster at your location. -
RSH: Submits the jobs to a defined set of workstations. -
LOCAL: Submits the jobs to your local workstation. -
-
-More information in the wiki. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/refcase.html b/ThirdParty/Ert/share/gui/help/config/keywords/refcase.html deleted file mode 100644 index 519d42c654..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/refcase.html +++ /dev/null @@ -1 +0,0 @@ -Here you may supply ERT with a reference case, i.e an existing ECLIPSE data file, which can be used as observations. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/refcase_list.html b/ThirdParty/Ert/share/gui/help/config/keywords/refcase_list.html deleted file mode 100644 index 9fa95da112..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/refcase_list.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/rerun_start.html b/ThirdParty/Ert/share/gui/help/config/keywords/rerun_start.html deleted file mode 100644 index db11b245c1..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/rerun_start.html +++ /dev/null @@ -1 +0,0 @@ -If using EnKF rerun, select here which time step to start from after each update. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/result_path.html b/ThirdParty/Ert/share/gui/help/config/keywords/result_path.html deleted file mode 100644 index 5ca7fa5241..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/result_path.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/rft_config.html b/ThirdParty/Ert/share/gui/help/config/keywords/rft_config.html deleted file mode 100644 index fa68edbb47..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/rft_config.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/rftpath.html b/ThirdParty/Ert/share/gui/help/config/keywords/rftpath.html deleted file mode 100644 index ca1df0aa92..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/rftpath.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/rsh_command.html b/ThirdParty/Ert/share/gui/help/config/keywords/rsh_command.html deleted file mode 100644 index e0e268f88c..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/rsh_command.html +++ /dev/null @@ -1 +0,0 @@ -The name of the executable used to invoke remote shell operations. Will typically be either rsh or ssh. The command given to RSH Command must either be in PATH or an absolute path. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/rsh_host.html b/ThirdParty/Ert/share/gui/help/config/keywords/rsh_host.html deleted file mode 100644 index c8413d6180..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/rsh_host.html +++ /dev/null @@ -1,6 +0,0 @@ -To use the RSH queue system you must first set a list of computers which ERT can use for running jobs. The first column takes the computer names, the second takes the number of jobs for each computer.
- -When using the RSH option, note the following:
    -
  1. You must have passwordless login to the computers listed in the Host List.
  2. -
  3. ERT will not consider the total load on the various computers; if having said a computer can take two jobs, it will get two jobs, irrespective of the existing load.
  4. -
diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/run_smoother.html b/ThirdParty/Ert/share/gui/help/config/keywords/run_smoother.html deleted file mode 100644 index 5d61059e82..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/run_smoother.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/run_smoother_with_iter.html b/ThirdParty/Ert/share/gui/help/config/keywords/run_smoother_with_iter.html deleted file mode 100644 index f71187c49e..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/run_smoother_with_iter.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/run_template.html b/ThirdParty/Ert/share/gui/help/config/keywords/run_template.html deleted file mode 100644 index 113f283454..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/run_template.html +++ /dev/null @@ -1 +0,0 @@ -You may use this option to install arbitrary files in the runpath directory. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/runpath.html b/ThirdParty/Ert/share/gui/help/config/keywords/runpath.html deleted file mode 100644 index 7f30da7d36..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/runpath.html +++ /dev/null @@ -1,12 +0,0 @@ -The Runpath should give the name of the folders where the -ECLIPSE simulations are to be executed. It should contain at least one -%d-specifier, which will be replaced by the realization number when -ERT creates the folders.

- -Optionally, the Runpath can contain two more %d specifers, which will -be replaced by the first and last report step of the simulation. By -default, Runpath is set to "simulations/realization%d".

- -When running with LSF it is essential that the Runpath points -to a network disk which is accessible with the same path from all the -nodes in the cluster. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/runpath_file.html b/ThirdParty/Ert/share/gui/help/config/keywords/runpath_file.html deleted file mode 100644 index e5839c9695..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/runpath_file.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/schedule_file.html b/ThirdParty/Ert/share/gui/help/config/keywords/schedule_file.html deleted file mode 100644 index 2ea01382cd..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/schedule_file.html +++ /dev/null @@ -1 +0,0 @@ -A text file containing the SCHEDULE section of the ECLIPSE data file. The Schedule file is used to control the ECLIPSE simulations. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/schedule_prediction_file.html b/ThirdParty/Ert/share/gui/help/config/keywords/schedule_prediction_file.html deleted file mode 100644 index 9d9ee7bb4b..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/schedule_prediction_file.html +++ /dev/null @@ -1 +0,0 @@ -This is the name of a schedule prediction file. It may contain a %d-specifier to get different files for different members. Observe that the ECLIPSE datafile should include only one schedule file, even if you are doing predictions. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/select_case.html b/ThirdParty/Ert/share/gui/help/config/keywords/select_case.html deleted file mode 100644 index 68f628f3c3..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/select_case.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/setenv.html b/ThirdParty/Ert/share/gui/help/config/keywords/setenv.html deleted file mode 100644 index b22ce6a2d0..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/setenv.html +++ /dev/null @@ -1,4 +0,0 @@ -You can use setenv to alter the unix environment ERT is running -in. This is probably most relevant for setting up the environment for -the external jobs invoked by ERT. It is possible to use $VAR to refer -to an existing environment variable. diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/stop_long_running.html b/ThirdParty/Ert/share/gui/help/config/keywords/stop_long_running.html deleted file mode 100644 index 0abd696273..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/stop_long_running.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/summary.html b/ThirdParty/Ert/share/gui/help/config/keywords/summary.html deleted file mode 100644 index 8083f8729b..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/summary.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/surface.html b/ThirdParty/Ert/share/gui/help/config/keywords/surface.html deleted file mode 100644 index c26f69080a..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/surface.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/update_log_path.html b/ThirdParty/Ert/share/gui/help/config/keywords/update_log_path.html deleted file mode 100644 index c321b261c8..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/update_log_path.html +++ /dev/null @@ -1 +0,0 @@ -Click here to view help on the wiki page. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/keywords/update_path.html b/ThirdParty/Ert/share/gui/help/config/keywords/update_path.html deleted file mode 100644 index 99db43fb90..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/keywords/update_path.html +++ /dev/null @@ -1 +0,0 @@ -The Update path option will prepend a new element to an existing PATH variable. diff --git a/ThirdParty/Ert/share/gui/help/config/run/runpath.html b/ThirdParty/Ert/share/gui/help/config/run/runpath.html deleted file mode 100644 index 36685bc466..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/run/runpath.html +++ /dev/null @@ -1,3 +0,0 @@ -basic runpath info - -Click here diff --git a/ThirdParty/Ert/share/gui/help/config/simulation/active_realizations.html b/ThirdParty/Ert/share/gui/help/config/simulation/active_realizations.html deleted file mode 100644 index adff4f4ce7..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/simulation/active_realizations.html +++ /dev/null @@ -1 +0,0 @@ -These are the realizations that will be used to perform simulations. For example, if "Number of realizations:50 and Active realizations is 0-9", then only realizations 0,1,2,3,...,9 will be used to perform simulations while realizations 10,11, 12,...,49 will be excluded. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/simulation/analysis_module.html b/ThirdParty/Ert/share/gui/help/config/simulation/analysis_module.html deleted file mode 100644 index a0597c4844..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/simulation/analysis_module.html +++ /dev/null @@ -1 +0,0 @@ -For running sensitivies you can give the cases descriptive names. diff --git a/ThirdParty/Ert/share/gui/help/config/simulation/iterated_target_case_format.html b/ThirdParty/Ert/share/gui/help/config/simulation/iterated_target_case_format.html deleted file mode 100644 index de622b8418..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/simulation/iterated_target_case_format.html +++ /dev/null @@ -1 +0,0 @@ -The "Iterated Ensemble Smoother" creates multiple cases for the different iterations. The case names will follow the specified format. For example, "Target case format: iter_%d" will generate cases with the names iter_0, iter_1, iter_2, iter_3, .... \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/simulation/iteration_weights.html b/ThirdParty/Ert/share/gui/help/config/simulation/iteration_weights.html deleted file mode 100644 index 7e6a9edf4f..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/simulation/iteration_weights.html +++ /dev/null @@ -1,7 +0,0 @@ -

- The normalized weights are the actual α values used in the scaling of the standard deviation. -

-

- Example Custom Relative Weights: '8,4,2,1'. This means Multiple Data Assimilation Ensemble Smoother will half the - weight applied to the Observation Errors from one iteration to the next across 4 iterations. -

diff --git a/ThirdParty/Ert/share/gui/help/config/simulation/number_of_iterations.html b/ThirdParty/Ert/share/gui/help/config/simulation/number_of_iterations.html deleted file mode 100644 index 5d649052ff..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/simulation/number_of_iterations.html +++ /dev/null @@ -1 +0,0 @@ -Specify the number of times to perform updates/iterations. In general, the more updates the better, however, this could be time consuming. The default value is 4. \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/config/simulation/sensitivity_parameter_constant_value.html b/ThirdParty/Ert/share/gui/help/config/simulation/sensitivity_parameter_constant_value.html deleted file mode 100644 index 792bce12bb..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/simulation/sensitivity_parameter_constant_value.html +++ /dev/null @@ -1 +0,0 @@ -Constant value used when the parameter is kept constant in the sensitivity study. diff --git a/ThirdParty/Ert/share/gui/help/config/simulation/sensitivity_parameter_is_included.html b/ThirdParty/Ert/share/gui/help/config/simulation/sensitivity_parameter_is_included.html deleted file mode 100644 index 549294c6e8..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/simulation/sensitivity_parameter_is_included.html +++ /dev/null @@ -1 +0,0 @@ -Check this box if you want the parameter to be included in the sensitivity study. diff --git a/ThirdParty/Ert/share/gui/help/config/simulation/sensitivity_target_case_format.html b/ThirdParty/Ert/share/gui/help/config/simulation/sensitivity_target_case_format.html deleted file mode 100644 index b602cba8dd..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/simulation/sensitivity_target_case_format.html +++ /dev/null @@ -1 +0,0 @@ -The "Sensitivity Study" creates a case for each parameter that is tested. The case names will follow the specified format. For example, "Target case format: iter_%s" and parameter name trans_mult will generate cases with the names iter_trans_mult. diff --git a/ThirdParty/Ert/share/gui/help/config/simulation/target_case.html b/ThirdParty/Ert/share/gui/help/config/simulation/target_case.html deleted file mode 100644 index b3f6cb2063..0000000000 --- a/ThirdParty/Ert/share/gui/help/config/simulation/target_case.html +++ /dev/null @@ -1 +0,0 @@ -This is the name of the case where the results for the updated parameters will be stored \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/init/case_list.html b/ThirdParty/Ert/share/gui/help/init/case_list.html deleted file mode 100644 index 21d1bbc77b..0000000000 --- a/ThirdParty/Ert/share/gui/help/init/case_list.html +++ /dev/null @@ -1 +0,0 @@ -List of available cases. diff --git a/ThirdParty/Ert/share/gui/help/init/current_case_selection.html b/ThirdParty/Ert/share/gui/help/init/current_case_selection.html deleted file mode 100644 index fbcc72af96..0000000000 --- a/ThirdParty/Ert/share/gui/help/init/current_case_selection.html +++ /dev/null @@ -1 +0,0 @@ -The case to initialize and use for simulation. diff --git a/ThirdParty/Ert/share/gui/help/init/initialize_from_existing.html b/ThirdParty/Ert/share/gui/help/init/initialize_from_existing.html deleted file mode 100644 index c05dccad1b..0000000000 --- a/ThirdParty/Ert/share/gui/help/init/initialize_from_existing.html +++ /dev/null @@ -1 +0,0 @@ -Click on this button to perform the initialization process \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/init/initialize_from_scratch.html b/ThirdParty/Ert/share/gui/help/init/initialize_from_scratch.html deleted file mode 100644 index c05dccad1b..0000000000 --- a/ThirdParty/Ert/share/gui/help/init/initialize_from_scratch.html +++ /dev/null @@ -1 +0,0 @@ -Click on this button to perform the initialization process \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/init/select_case_for_info.html b/ThirdParty/Ert/share/gui/help/init/select_case_for_info.html deleted file mode 100644 index f27d05c573..0000000000 --- a/ThirdParty/Ert/share/gui/help/init/select_case_for_info.html +++ /dev/null @@ -1 +0,0 @@ -The case you want to view information on \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/init/select_members.html b/ThirdParty/Ert/share/gui/help/init/select_members.html deleted file mode 100644 index 616ac700be..0000000000 --- a/ThirdParty/Ert/share/gui/help/init/select_members.html +++ /dev/null @@ -1 +0,0 @@ -Select which members of realizations to initialize \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/init/select_parameters.html b/ThirdParty/Ert/share/gui/help/init/select_parameters.html deleted file mode 100644 index ddb2f22741..0000000000 --- a/ThirdParty/Ert/share/gui/help/init/select_parameters.html +++ /dev/null @@ -1 +0,0 @@ -Select which parameters you want to initialize \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/init/selected_case_info.html b/ThirdParty/Ert/share/gui/help/init/selected_case_info.html deleted file mode 100644 index ba7763102b..0000000000 --- a/ThirdParty/Ert/share/gui/help/init/selected_case_info.html +++ /dev/null @@ -1 +0,0 @@ -Information for the selected case \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/init/source_case.html b/ThirdParty/Ert/share/gui/help/init/source_case.html deleted file mode 100644 index 5eec505e79..0000000000 --- a/ThirdParty/Ert/share/gui/help/init/source_case.html +++ /dev/null @@ -1 +0,0 @@ -The case from which the initial values are copied \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/run/simulation_mode.html b/ThirdParty/Ert/share/gui/help/run/simulation_mode.html deleted file mode 100644 index 3be738a9b6..0000000000 --- a/ThirdParty/Ert/share/gui/help/run/simulation_mode.html +++ /dev/null @@ -1,4 +0,0 @@ -Here you can select which type of simulation to run.
-1. Ensemble Experiment: this will run simulations without performing any updates on the parameters.
-2. Ensemble Smoother: this will run simulations while performing one update on the parameters by using the ensemble smoother algorithm.
-3. Iterated Ensemble Smoother: this will run simulations while performing multiple updates on the parameters by using the iterated ensemble smoother algorithm. diff --git a/ThirdParty/Ert/share/gui/help/run/start_simulation.html b/ThirdParty/Ert/share/gui/help/run/start_simulation.html deleted file mode 100644 index cd0892535e..0000000000 --- a/ThirdParty/Ert/share/gui/help/run/start_simulation.html +++ /dev/null @@ -1 +0,0 @@ -Click on this button to start running simulations diff --git a/ThirdParty/Ert/share/gui/help/run/workflow.html b/ThirdParty/Ert/share/gui/help/run/workflow.html deleted file mode 100644 index 986b0130b1..0000000000 --- a/ThirdParty/Ert/share/gui/help/run/workflow.html +++ /dev/null @@ -1 +0,0 @@ -Select the workflow to run diff --git a/ThirdParty/Ert/share/gui/help/template.html b/ThirdParty/Ert/share/gui/help/template.html deleted file mode 100644 index d11776e51a..0000000000 --- a/ThirdParty/Ert/share/gui/help/template.html +++ /dev/null @@ -1 +0,0 @@ -%s \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/help/tools/export.html b/ThirdParty/Ert/share/gui/help/tools/export.html deleted file mode 100644 index 5a3f2061d7..0000000000 --- a/ThirdParty/Ert/share/gui/help/tools/export.html +++ /dev/null @@ -1 +0,0 @@ -This will open the "Export Data to Other Formats" dialog window where you can export data stored in ERT to formats usable by other applications diff --git a/ThirdParty/Ert/share/gui/help/tools/help.html b/ThirdParty/Ert/share/gui/help/tools/help.html deleted file mode 100644 index ecbb174173..0000000000 --- a/ThirdParty/Ert/share/gui/help/tools/help.html +++ /dev/null @@ -1 +0,0 @@ -This will open the "Help" window where help information are displayed for various functionality diff --git a/ThirdParty/Ert/share/gui/help/tools/ide.html b/ThirdParty/Ert/share/gui/help/tools/ide.html deleted file mode 100644 index c04f7eca8b..0000000000 --- a/ThirdParty/Ert/share/gui/help/tools/ide.html +++ /dev/null @@ -1 +0,0 @@ -This will open the "Configuration" dialog window where you can set the values for various keywords and parameters in ERT diff --git a/ThirdParty/Ert/share/gui/help/tools/manage_cases.html b/ThirdParty/Ert/share/gui/help/tools/manage_cases.html deleted file mode 100644 index 6420f762a1..0000000000 --- a/ThirdParty/Ert/share/gui/help/tools/manage_cases.html +++ /dev/null @@ -1 +0,0 @@ -This will open the "Manage Cases" dialog window where you can create, delete, and initialize cases diff --git a/ThirdParty/Ert/share/gui/help/tools/plot.html b/ThirdParty/Ert/share/gui/help/tools/plot.html deleted file mode 100644 index 5110a84c4d..0000000000 --- a/ThirdParty/Ert/share/gui/help/tools/plot.html +++ /dev/null @@ -1 +0,0 @@ -This will open the "Plotting" page where you can view the plot profiles for various data types diff --git a/ThirdParty/Ert/share/gui/help/tools/workflows.html b/ThirdParty/Ert/share/gui/help/tools/workflows.html deleted file mode 100644 index dcf597397b..0000000000 --- a/ThirdParty/Ert/share/gui/help/tools/workflows.html +++ /dev/null @@ -1 +0,0 @@ -This will open the "Workflow" dialog window where you can select and run workflows which you have configured in ERT diff --git a/ThirdParty/Ert/share/gui/help/welcome_to_ert.html b/ThirdParty/Ert/share/gui/help/welcome_to_ert.html deleted file mode 100644 index 8d6993316d..0000000000 --- a/ThirdParty/Ert/share/gui/help/welcome_to_ert.html +++ /dev/null @@ -1,17 +0,0 @@ -
- _________________________________
-/                                 \
-|    ______   ______   _______    |
-|   |  ____| |  __  \ |__   __|   |
-|   | |__    | |__) |    | |      |
-|   |  __|   |  _  /     | |      |
-|   | |____  | | \ \     | |      |
-|   |______| |_|  \_\    |_|      |
-|                                 |
-|  Ensemble based Reservoir Tool  |
-\_________________________________/
-
-
-

-Welcome to ERT -

diff --git a/ThirdParty/Ert/share/gui/img/add.png b/ThirdParty/Ert/share/gui/img/add.png deleted file mode 100644 index 4aadc248db..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/add.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/application/window_icon.png b/ThirdParty/Ert/share/gui/img/application/window_icon.png deleted file mode 100644 index 94e19b30d5..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/application/window_icon.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/application/window_icon_cutout.png b/ThirdParty/Ert/share/gui/img/application/window_icon_cutout.png deleted file mode 100644 index e902e02c61..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/application/window_icon_cutout.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/calendar.png b/ThirdParty/Ert/share/gui/img/calendar.png deleted file mode 100644 index f404e21eb8..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/calendar.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/checked.png b/ThirdParty/Ert/share/gui/img/checked.png deleted file mode 100644 index 8ca5395d72..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/checked.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/ide/chart_curve_add.png b/ThirdParty/Ert/share/gui/img/ide/chart_curve_add.png deleted file mode 100644 index 45b61c5656..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/ide/chart_curve_add.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/ide/cog.png b/ThirdParty/Ert/share/gui/img/ide/cog.png deleted file mode 100644 index d53ebf1c3d..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/ide/cog.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/ide/cog_edit.png b/ThirdParty/Ert/share/gui/img/ide/cog_edit.png deleted file mode 100644 index 7b7cb83683..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/ide/cog_edit.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/ide/control_play_blue.png b/ThirdParty/Ert/share/gui/img/ide/control_play_blue.png deleted file mode 100644 index a1f7345f37..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/ide/control_play_blue.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/ide/database_gear.png b/ThirdParty/Ert/share/gui/img/ide/database_gear.png deleted file mode 100644 index 373a0adb0c..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/ide/database_gear.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/ide/disk.png b/ThirdParty/Ert/share/gui/img/ide/disk.png deleted file mode 100644 index 3a9dcf37ec..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/ide/disk.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/ide/gear_in_play.png b/ThirdParty/Ert/share/gui/img/ide/gear_in_play.png deleted file mode 100644 index 6f73cbb4d9..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/ide/gear_in_play.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/ide/help.png b/ThirdParty/Ert/share/gui/img/ide/help.png deleted file mode 100644 index 68f51bac41..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/ide/help.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/ide/loading.gif b/ThirdParty/Ert/share/gui/img/ide/loading.gif deleted file mode 100644 index 90f28cbdbb..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/ide/loading.gif and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/ide/plugin.png b/ThirdParty/Ert/share/gui/img/ide/plugin.png deleted file mode 100644 index c1ee68def0..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/ide/plugin.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/ide/readme-fatcow.txt b/ThirdParty/Ert/share/gui/img/ide/readme-fatcow.txt deleted file mode 100644 index 1f3e716286..0000000000 --- a/ThirdParty/Ert/share/gui/img/ide/readme-fatcow.txt +++ /dev/null @@ -1,21 +0,0 @@ -FatCow Farm Fresh Icons - -03/29/2013, v3.5.0, 9.12 Mb - - Copyright 2013 FatCow Web Hosting. All rights reserved. - -These icons are licensed under a Creative Commons -Attribution 3.0 License. -http://creativecommons.org/licenses/by/3.0/us/ - -We are unavailable for custom icon design work. But we -plan to draw 500 more metaphors and suggestions are welcome. -https://twitter.com/FatCow http://www.facebook.com/FatCow -or Google+ https://plus.google.com/101826539018374982925 - ------------------------------------------------------------- - -All other trademarks and copyrights -are property of their respective owners. - ------------------------------------------------------------- \ No newline at end of file diff --git a/ThirdParty/Ert/share/gui/img/ide/save_as.png b/ThirdParty/Ert/share/gui/img/ide/save_as.png deleted file mode 100644 index 915e280c54..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/ide/save_as.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/ide/small/add.png b/ThirdParty/Ert/share/gui/img/ide/small/add.png deleted file mode 100644 index 0ea124a744..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/ide/small/add.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/ide/small/chart_curve_go.png b/ThirdParty/Ert/share/gui/img/ide/small/chart_curve_go.png deleted file mode 100644 index aa7dc60db9..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/ide/small/chart_curve_go.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/ide/small/cog_edit.png b/ThirdParty/Ert/share/gui/img/ide/small/cog_edit.png deleted file mode 100644 index dc0a35ee5e..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/ide/small/cog_edit.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/ide/small/delete.png b/ThirdParty/Ert/share/gui/img/ide/small/delete.png deleted file mode 100644 index ace289edd9..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/ide/small/delete.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/ide/small/folder.png b/ThirdParty/Ert/share/gui/img/ide/small/folder.png deleted file mode 100644 index f1ed9abe03..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/ide/small/folder.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/ide/table_export.png b/ThirdParty/Ert/share/gui/img/ide/table_export.png deleted file mode 100644 index a96837ed1e..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/ide/table_export.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/ide/table_import.png b/ThirdParty/Ert/share/gui/img/ide/table_import.png deleted file mode 100644 index 5c25faddac..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/ide/table_import.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/ide/to_do_list_checked_1.png b/ThirdParty/Ert/share/gui/img/ide/to_do_list_checked_1.png deleted file mode 100644 index e0d6504752..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/ide/to_do_list_checked_1.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/ide/transform_scale.png b/ThirdParty/Ert/share/gui/img/ide/transform_scale.png deleted file mode 100644 index a5956ba7a3..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/ide/transform_scale.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/ide/widgets.png b/ThirdParty/Ert/share/gui/img/ide/widgets.png deleted file mode 100644 index 73e67cf938..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/ide/widgets.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/notchecked.png b/ThirdParty/Ert/share/gui/img/notchecked.png deleted file mode 100644 index 11765214ba..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/notchecked.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/page_copy.png b/ThirdParty/Ert/share/gui/img/page_copy.png deleted file mode 100644 index a61ec13432..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/page_copy.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/redo.png b/ThirdParty/Ert/share/gui/img/redo.png deleted file mode 100644 index bb7673c827..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/redo.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/remove.png b/ThirdParty/Ert/share/gui/img/remove.png deleted file mode 100644 index 5be9040ec9..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/remove.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/remove_favorite.png b/ThirdParty/Ert/share/gui/img/remove_favorite.png deleted file mode 100644 index e716db68ca..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/remove_favorite.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/splash.jpg b/ThirdParty/Ert/share/gui/img/splash.jpg deleted file mode 100644 index 0ea9457f3f..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/splash.jpg and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/undo.png b/ThirdParty/Ert/share/gui/img/undo.png deleted file mode 100644 index 0c196ec096..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/undo.png and /dev/null differ diff --git a/ThirdParty/Ert/share/gui/img/update.png b/ThirdParty/Ert/share/gui/img/update.png deleted file mode 100644 index b7639f1558..0000000000 Binary files a/ThirdParty/Ert/share/gui/img/update.png and /dev/null differ diff --git a/ThirdParty/Ert/share/lib/synthesizer/__init__.py b/ThirdParty/Ert/share/lib/synthesizer/__init__.py deleted file mode 100644 index 0bc890b220..0000000000 --- a/ThirdParty/Ert/share/lib/synthesizer/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -from .prime_generator import PrimeGenerator -from .perlin import PerlinNoise -from .shaped_perlin import ShapedNoise, ShapeFunction, ShapeCreator -from .oil_simulator import OilSimulator \ No newline at end of file diff --git a/ThirdParty/Ert/share/lib/synthesizer/oil_simulator.py b/ThirdParty/Ert/share/lib/synthesizer/oil_simulator.py deleted file mode 100644 index 8c74cd120c..0000000000 --- a/ThirdParty/Ert/share/lib/synthesizer/oil_simulator.py +++ /dev/null @@ -1,168 +0,0 @@ -from . import ShapeFunction, ShapeCreator - -class OilSimulator(object): - OPR_SHAPE = ShapeFunction([0.0, 0.2, 0.5, 0.7, 1.0], [0.0, 0.7, 0.2, 0.1, 0.01]) - GPR_SHAPE = ShapeFunction([0.0, 0.2, 0.5, 0.7, 1.0], [0.0, 0.5, 0.7, 0.7, 0.3]) - WPR_SHAPE = ShapeFunction([0.0, 0.2, 0.5, 0.7, 1.0], [0.0, 0.01, 0.3, 0.7, 1]) - BPR_SHAPE= ShapeFunction([0.0, 0.2, 0.5, 0.7, 1.0], [1.0, 0.7, 0.5, 0.3, 0.1]) - - O_DIVERGENCE = ShapeFunction([0.0, 0.5, 0.7, 0.9, 1.0], [0.0, 0.5, 0.3, 0.1, 0.01]) - G_DIVERGENCE = ShapeFunction([0.0, 0.5, 0.7, 0.9, 1.0], [0.0, 0.1, 0.3, 0.2, 0.1]) - W_DIVERGENCE = ShapeFunction([0.0, 0.5, 0.7, 0.9, 1.0], [0.0, 0.1, 0.3, 0.2, 0.01]) - B_DIVERGENCE = ShapeFunction([0.0, 0.5, 0.7, 0.9, 1.0], [0.0, 0.1, 0.2, 0.3, 0.5]) - - def __init__(self, ooip=2000, goip=2500, woip=2250): - self._foip = self.ooip = ooip - self._fgip = self.goip = goip - self._fwip = self.woip = woip - - self._oprFunc = {} - self._gprFunc = {} - self._wprFunc = {} - self._bprFunc = {} - self._current_step = 0 - - self._fopt = 0.0 - self._fopr = 0.0 - self._fgpt = 0.0 - self._fgpr = 0.0 - self._fwpt = 0.0 - self._fwpr = 0.0 - - self._fgor = 0.0 - self._fwct = 0.0 - - - self._wells = {} - self._bpr = {} - - def addWell(self, name, seed, persistence=0.2, octaves=8, divergence_scale=1.0, offset=0.0): - oil_div = OilSimulator.O_DIVERGENCE.scaledCopy(divergence_scale) - gas_div = OilSimulator.G_DIVERGENCE.scaledCopy(divergence_scale) - water_div = OilSimulator.W_DIVERGENCE.scaledCopy(divergence_scale) - self._oprFunc[name] = ShapeCreator.createNoiseFunction(OilSimulator.OPR_SHAPE, oil_div, seed, persistence=persistence, octaves=octaves, cutoff=0.0, offset=offset) - self._gprFunc[name] = ShapeCreator.createNoiseFunction(OilSimulator.GPR_SHAPE, gas_div, seed * 7, persistence=persistence * 3.5, octaves=octaves / 2, cutoff=0.0, offset=offset) - self._wprFunc[name] = ShapeCreator.createNoiseFunction(OilSimulator.WPR_SHAPE, water_div, seed * 11, persistence=persistence, octaves=octaves, cutoff=0.0, offset=offset) - - self._wells[name] = {"opr": 0.0, "opt": 0.0, "gpr": 0.0, "gpt": 0.0, "wpr": 0.0, "wpt": 0.0} - - def addBlock(self, name, seed, persistence=0.2): - self._bprFunc[name] = ShapeCreator.createNoiseFunction(OilSimulator.BPR_SHAPE, OilSimulator.B_DIVERGENCE, seed, persistence=persistence, cutoff=0.0) - self._bpr[name] = 0.0 - - def step(self, scale=1.0): - self._fopr = 0.0 - self._fgpr = 0.0 - self._fwpr = 0.0 - self._fgor = 0.0 - self._fwct = 0.0 - for key in self._wells: - oprFunction = self._oprFunc[key] - gprFunction = self._gprFunc[key] - wprFunction = self._wprFunc[key] - opr_value = oprFunction(self._current_step, scale) - gpr_value = gprFunction(self._current_step, scale) - wpr_value = wprFunction(self._current_step, scale) - - well = self._wells[key] - if self._foip > 0.0: - well["opr"] = opr_value - well["opt"] += opr_value - self._fopr += opr_value - - if self._fgip > 0.0: - well["gpr"] = gpr_value - well["gpt"] += gpr_value - self._fgpr += gpr_value - - if self._fwip > 0.0: - well["wpr"] = wpr_value - well["wpt"] += wpr_value - self._fwpr += wpr_value - - self._fgor += self.gor(key) - self._fwct += self.wct(key) - - self._foip -= self._fopr - self._fgip -= self._fgpr - self._fwip -= self._fwpr - - if self._foip < 0.0: - self._foip = 0.0 # This may lead to the total (FOPT) larger than OOIP - - if self._fgip < 0.0: - self._fgip = 0.0 - - if self._fwip < 0.0: - self._fwip = 0.0 - - self._fopt += self._fopr - self._fgpt += self._fgpr - self._fwpt += self._fwpr - - self._fgor /= len(self._wells) - self._fwct /= len(self._wells) - - for key in self._bpr: - bprFunction = self._bprFunc[key] - self._bpr[key] = bprFunction(self._current_step, scale) - - self._current_step += 1 - - def fopt(self): - return self._fopt - - def fopr(self): - return self._fopr - - def fgpt(self): - return self._fgpt - - def fgpr(self): - return self._fgpr - - def fwpt(self): - return self._fwpt - - def fwpr(self): - return self._fwpr - - def fgor(self): - return self._fgor - - def fwct(self): - return self._fwct - - def foip(self): - return self._foip - - def fgip(self): - return self._fgip - - def fwip(self): - return self._fwip - - def opr(self, well_name): - return self._wells[well_name]["opr"] - - def gpr(self, well_name): - return self._wells[well_name]["gpr"] - - def wpr(self, well_name): - return self._wells[well_name]["wpr"] - - def wct(self, well_name): - opr = self.opr(well_name) - wpr = self.wpr(well_name) - opr = max(opr, 0.1) - return wpr / (wpr + opr) if (wpr + opr) > 0.0 else 0.0 - - def gor(self, well_name): - opr = self.opr(well_name) - gpr = self.gpr(well_name) - opr = max(opr, 0.1) - gpr = max(gpr, 0.1) - return gpr / opr - - def bpr(self, block_name): - return self._bpr[block_name] diff --git a/ThirdParty/Ert/share/lib/synthesizer/perlin.py b/ThirdParty/Ert/share/lib/synthesizer/perlin.py deleted file mode 100644 index b3da8ae7e1..0000000000 --- a/ThirdParty/Ert/share/lib/synthesizer/perlin.py +++ /dev/null @@ -1,57 +0,0 @@ -import math - -from .prime_generator import PrimeGenerator - - -class PerlinNoise(object): - def __init__(self, persistence=0.5, number_of_octaves=4, prime_generator=None): - self.persistence = persistence - self.number_of_octaves = number_of_octaves - - self.octave_primes = prime_generator if prime_generator is not None else PrimeGenerator() - - def cosineInterpolation(self, a, b, x): - ft = x * 3.1415927 - f = (1.0 - math.cos(ft)) * 0.5 - return a * (1 - f) + b * f - - MAX_INT = (1 << 31) - 1 - - def noise(self, x, perturbation): - x += perturbation - x = ((x << 13) & PerlinNoise.MAX_INT) ^ x - x = (x * (x * x * 15731 + 789221) + 1376312589) & PerlinNoise.MAX_INT - return 1.0 - x / 1073741824.0 - - def smoothedNoise(self, x, perturbation): - return self.noise(x, perturbation) / 2.0 + self.noise(x - 1, perturbation) / 4.0 + self.noise(x + 1, perturbation) / 4.0 - - def interpolatedNoise(self, x, octave_number): - int_x = int(x) - frac_x = x - int_x - - perturbation = self.octave_primes[octave_number] - - v1 = self.smoothedNoise(int_x, perturbation) - v2 = self.smoothedNoise(int_x + 1, perturbation) - - return self.cosineInterpolation(v1, v2, frac_x) - - def perlinNoise1D(self, x): - total = 0.0 - - for octave in range(self.number_of_octaves - 1): - frequency = math.pow(2, octave) - amplitude = math.pow(self.persistence, octave) - - total += self.interpolatedNoise(x * frequency, octave_number=octave) * amplitude - - return total - - def __getitem__(self, x): - """ :rtype: float """ - return self.perlinNoise1D(x * 10.0) - - def __call__(self, x): - """ :rtype: float """ - return self[x] diff --git a/ThirdParty/Ert/share/lib/synthesizer/prime_generator.py b/ThirdParty/Ert/share/lib/synthesizer/prime_generator.py deleted file mode 100644 index d7c35107b4..0000000000 --- a/ThirdParty/Ert/share/lib/synthesizer/prime_generator.py +++ /dev/null @@ -1,40 +0,0 @@ -import random - -def rwh_primes2(n): - # http://stackoverflow.com/questions/2068372/fastest-way-to-list-all-primes-below-n-in-python/3035188#3035188 - """ Input n>=6, Returns a list of primes, 2 <= p < n """ - correction = (n % 6 > 1) - n = {0: n, 1: n - 1, 2: n + 4, 3: n + 3, 4: n + 2, 5: n + 1}[n % 6] - sieve = [True] * (n / 3) - sieve[0] = False - for i in xrange(int(n ** 0.5) / 3 + 1): - if sieve[i]: - k = 3 * i + 1 | 1 - sieve[((k * k) / 3)::2 * k] = [False] * ((n / 6 - (k * k) / 6 - 1) / k + 1) - sieve[(k * k + 4 * k - 2 * k * (i & 1)) / 3::2 * k] = [False] * ( - (n / 6 - (k * k + 4 * k - 2 * k * (i & 1)) / 6 - 1) / k + 1) - return [2, 3] + [3 * i + 1 | 1 for i in xrange(1, n / 3 - correction) if sieve[i]] - - - -class PrimeGenerator(object): - LIST_OF_PRIMES = rwh_primes2(10000) - - def __init__(self, seed=None): - self.__primes = {} - self.__random = random.Random(seed) - random.seed(seed) - - def __getitem__(self, index): - if not isinstance(index, (int, long)) or index < 0: - raise IndexError("Index must be a positive integer: %d" % index) - - if not index in self.__primes: - p1 = self.randomPrime() - self.__primes[index] = p1 - - return self.__primes[index] - - def randomPrime(self): - random_index = self.__random.randint(0, len(PrimeGenerator.LIST_OF_PRIMES) - 1) - return PrimeGenerator.LIST_OF_PRIMES[random_index] diff --git a/ThirdParty/Ert/share/lib/synthesizer/shaped_perlin.py b/ThirdParty/Ert/share/lib/synthesizer/shaped_perlin.py deleted file mode 100644 index 65b63a1f02..0000000000 --- a/ThirdParty/Ert/share/lib/synthesizer/shaped_perlin.py +++ /dev/null @@ -1,106 +0,0 @@ -import math -from . import PrimeGenerator, PerlinNoise - - -class Interpolator(object): - def __init__(self, x, y): - self.x = x - self.y = y - - assert len(x) == len(y) - - def __call__(self, x): - if x <= self.x[0]: - y = self.y[0] - elif x >= self.x[len(self.x) - 1]: - y = self.y[len(self.x) - 1] - else: - y = None - for i in range(len(self.x) - 1): - if self.x[i] <= x < self.x[i + 1]: - x_diff = self.x[i + 1] - self.x[i] - frac_x = (x - self.x[i]) / x_diff - y = self.cosineInterpolation(self.y[i], self.y[i + 1], frac_x) - break - - return y - - def cosineInterpolation(self, a, b, x): - ft = x * 3.1415927 - f = (1.0 - math.cos(ft)) * 0.5 - return a * (1 - f) + b * f - - -class ShapeFunction(object): - def __init__(self, x, y, scale=1.0): - self.scale = scale - self.interpolator = Interpolator(x, y) - - def __call__(self, x): - return self.interpolator(x) * self.scale - - def scaledCopy(self, scale=1.0): - return ShapeFunction(self.interpolator.x, self.interpolator.y, scale) - - -class ConstantShapeFunction(ShapeFunction): - def __init__(self, value): - super(ConstantShapeFunction, self).__init__([0.0], [value]) - - - -class ShapedNoise(object): - - def __init__(self, noiseFunction, shapeFunction, divergenceFunction, offset=0.0, cutoff=None): - self.shapeFunction = shapeFunction - self.divergenceFunction = divergenceFunction - self.noiseFunction = noiseFunction - self.offset = offset - self.cutoff = cutoff - - def __call__(self, x, scale=1.0): - scaled_x = x * scale - result = self.shapeFunction(scaled_x) + self.noiseFunction(scaled_x) * self.divergenceFunction(scaled_x) - result += self.offset - if self.cutoff is not None: - result = max(result, self.cutoff) - return result - - -class ShapeCreator(object): - - @staticmethod - def createShapeFunction(count=1000, persistence=0.2, octaves=8, seed=1): - """ @rtype: ShapeFunction """ - prime_generator = PrimeGenerator(seed=seed) - perlininator = PerlinNoise(persistence=persistence, number_of_octaves=octaves, prime_generator=prime_generator) - - x_values = [x / float(count) for x in range(count)] - y_values = [perlininator(x) for x in x_values] - - return ShapeFunction(x_values, y_values) - - @staticmethod - def createShapedPerlinFunction(divergence_x, divergence_y, shape_seed=None, perlin_seed=None, count=1000, persistence=0.2, octaves=8, offset=0.0, cutoff=None): - """ @rtype: ShapedNoise """ - shapeFunction = ShapeCreator.createShapeFunction(count, persistence, octaves, shape_seed) - divergenceFunction = ShapeFunction(divergence_x, divergence_y) - prime_generator = PrimeGenerator(perlin_seed) - perlin_noise = PerlinNoise(persistence, octaves, prime_generator) - - return ShapedNoise(perlin_noise, shapeFunction, divergenceFunction, offset=offset, cutoff=cutoff) - - @staticmethod - def createNoiseFunction(shapeFunction=None, divergenceFunction=None, seed=None, persistence=0.2, octaves=8, offset=0.0, cutoff=None): - """ @rtype: ShapedNoise """ - if shapeFunction is None: - shapeFunction = ConstantShapeFunction(0.0) - - if divergenceFunction is None: - divergenceFunction = ConstantShapeFunction(1.0) - - prime_generator = PrimeGenerator(seed) - perlin_noise = PerlinNoise(persistence, octaves, prime_generator) - - noise = ShapedNoise(perlin_noise, shapeFunction, divergenceFunction, offset=offset, cutoff=cutoff) - return noise diff --git a/ThirdParty/Ert/share/site-config b/ThirdParty/Ert/share/site-config deleted file mode 100644 index c751e4e9ba..0000000000 --- a/ThirdParty/Ert/share/site-config +++ /dev/null @@ -1,7 +0,0 @@ --- This is a very basic site config file, mainly used for testing. - -WORKFLOW_JOB_DIRECTORY workflows/jobs/internal/config -WORKFLOW_JOB_DIRECTORY workflows/jobs/internal-gui/config -JOB_SCRIPT bin/job_dispatch.py -QUEUE_OPTION LOCAL MAX_RUNNING 1 - diff --git a/ThirdParty/Ert/share/viewer/shaders/default.fp b/ThirdParty/Ert/share/viewer/shaders/default.fp deleted file mode 100644 index bd6ba38d8e..0000000000 --- a/ThirdParty/Ert/share/viewer/shaders/default.fp +++ /dev/null @@ -1,4 +0,0 @@ -void main() { - gl_FragColor.rgb = gl_TexCoord[0].zyx; - gl_FragColor.a = 1.0; -} \ No newline at end of file diff --git a/ThirdParty/Ert/share/viewer/shaders/default.vp b/ThirdParty/Ert/share/viewer/shaders/default.vp deleted file mode 100644 index 9ead80e635..0000000000 --- a/ThirdParty/Ert/share/viewer/shaders/default.vp +++ /dev/null @@ -1,33 +0,0 @@ -#version 120 -uniform sampler3D grid; -uniform ivec3 grid_size; - -vec4 DELTA = vec4(1.0 / grid_size.x, 1.0 / grid_size.y, 1.0 / grid_size.z, 0.0); - -varying vec3 normal; - -vec4 fetchTexel(sampler3D sampler, vec3 p, vec3 offset) { - return texture3D(sampler, p + offset); -} - -void main() { - gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; - - vec3 xyz = texture3D(grid, gl_TexCoord[0].xyz).rgb; - vec4 p = vec4(gl_Vertex); - p.xyz = xyz; - //p.z = 1800.0; - - float s01 = fetchTexel(grid, gl_TexCoord[0].xyz, DELTA.xww).z; - float s21 = fetchTexel(grid, gl_TexCoord[0].xyz, -DELTA.xww).z; - float s10 = fetchTexel(grid, gl_TexCoord[0].xyz, DELTA.wyw).z; - float s12 = fetchTexel(grid, gl_TexCoord[0].xyz, -DELTA.wyw).z; - - vec3 va = normalize(vec3(2.0, 0.0, s21 - s01)); - vec3 vb = normalize(vec3(0.0, 2.0, s12 - s10)); - normal = normalize(cross(va, vb)); - - //normal = (gl_ModelViewMatrix * vec4(normal, 0.0)).xyz; - - gl_Position = gl_ModelViewProjectionMatrix * p; -} \ No newline at end of file diff --git a/ThirdParty/Ert/share/viewer/shaders/texturing.fp b/ThirdParty/Ert/share/viewer/shaders/texturing.fp deleted file mode 100644 index 298cff2c63..0000000000 --- a/ThirdParty/Ert/share/viewer/shaders/texturing.fp +++ /dev/null @@ -1,49 +0,0 @@ -#version 120 -uniform sampler3D grid; -uniform sampler3D grid_data; -uniform sampler1D color_scale; - -uniform bool hide_inactive_cells; -uniform bool lighting; -uniform bool region_scaling; -uniform float data_range; - -// From python code: self.__shader.setUniformi("grid_size", texture.getWidth(), texture.getHeight(), texture.getDepth()) - - -varying vec3 normal; - - -void main() { - vec4 cell = texture3D(grid, gl_TexCoord[0].xyz); - - if(hide_inactive_cells && cell.w < 0.5) { - discard; - } - - float color_pos = texture3D(grid_data, gl_TexCoord[0].xyz).a; - - if (color_pos < 0.001) { - discard; - } - - if(region_scaling) { - // data_range + 1 because [0-9] count = 10 - color_pos = color_pos * (data_range + 1) / 16.0; - } - - vec3 color = texture1D(color_scale, color_pos).rgb; - - //color = gl_TexCoord[0].yxz; - - if(lighting) { - float d = dot(normalize(normal), normalize(vec3(0.0, 0.0, 0.5))); - //d = clamp(d, 0.0, 1.0); - color = color + ((0.5 * color * d) - 0.25); - } - - - - gl_FragColor.rgb = color; - gl_FragColor.a = 1.0; -} diff --git a/ThirdParty/Ert/share/workflows/jobs/internal-gui/config/CREATE_CASE b/ThirdParty/Ert/share/workflows/jobs/internal-gui/config/CREATE_CASE deleted file mode 100644 index 6875fee2d0..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal-gui/config/CREATE_CASE +++ /dev/null @@ -1,6 +0,0 @@ -INTERNAL True -SCRIPT ../scripts/create_case.py -MIN_ARG 1 -MAX_ARG 1 -ARG_TYPE 0 STRING - diff --git a/ThirdParty/Ert/share/workflows/jobs/internal-gui/config/CSV_EXPORT b/ThirdParty/Ert/share/workflows/jobs/internal-gui/config/CSV_EXPORT deleted file mode 100644 index abef52b476..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal-gui/config/CSV_EXPORT +++ /dev/null @@ -1,9 +0,0 @@ -INTERNAL True -SCRIPT ../scripts/csv_export.py -MIN_ARG 1 -MAX_ARG 4 -ARG_TYPE 0 STRING -ARG_TYPE 1 STRING -ARG_TYPE 2 STRING -ARG_TYPE 3 BOOL - diff --git a/ThirdParty/Ert/share/workflows/jobs/internal-gui/config/EXPORT_MISFIT_DATA b/ThirdParty/Ert/share/workflows/jobs/internal-gui/config/EXPORT_MISFIT_DATA deleted file mode 100644 index c4aac369aa..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal-gui/config/EXPORT_MISFIT_DATA +++ /dev/null @@ -1,6 +0,0 @@ -INTERNAL True -SCRIPT ../scripts/export_misfit_data.py -MIN_ARG 0 -MAX_ARG 1 -ARG_TYPE 0 STRING - diff --git a/ThirdParty/Ert/share/workflows/jobs/internal-gui/config/GEN_DATA_RFT_CSV_EXPORT b/ThirdParty/Ert/share/workflows/jobs/internal-gui/config/GEN_DATA_RFT_CSV_EXPORT deleted file mode 100644 index e6ca1dcc58..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal-gui/config/GEN_DATA_RFT_CSV_EXPORT +++ /dev/null @@ -1,8 +0,0 @@ -INTERNAL True -SCRIPT ../scripts/gen_data_rft_export.py -MIN_ARG 2 -MAX_ARG 4 -ARG_TYPE 0 STRING -ARG_TYPE 1 STRING -ARG_TYPE 2 STRING -ARG_TYPE 3 BOOL diff --git a/ThirdParty/Ert/share/workflows/jobs/internal-gui/config/INIT_CASE_FROM_EXISTING b/ThirdParty/Ert/share/workflows/jobs/internal-gui/config/INIT_CASE_FROM_EXISTING deleted file mode 100644 index 4c37a13fca..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal-gui/config/INIT_CASE_FROM_EXISTING +++ /dev/null @@ -1,7 +0,0 @@ -INTERNAL True -SCRIPT ../scripts/init_case_from_existing.py -MIN_ARG 1 -MAX_ARG 2 -ARG_TYPE 0 STRING -ARG_TYPE 1 STRING - diff --git a/ThirdParty/Ert/share/workflows/jobs/internal-gui/config/SELECT_CASE b/ThirdParty/Ert/share/workflows/jobs/internal-gui/config/SELECT_CASE deleted file mode 100644 index bdd49d8888..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal-gui/config/SELECT_CASE +++ /dev/null @@ -1,6 +0,0 @@ -INTERNAL True -SCRIPT ../scripts/select_case.py -MIN_ARG 1 -MAX_ARG 1 -ARG_TYPE 0 STRING - diff --git a/ThirdParty/Ert/share/workflows/jobs/internal-gui/config/UPDATE_RUNPATH_LIST b/ThirdParty/Ert/share/workflows/jobs/internal-gui/config/UPDATE_RUNPATH_LIST deleted file mode 100644 index dbaa256d05..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal-gui/config/UPDATE_RUNPATH_LIST +++ /dev/null @@ -1,6 +0,0 @@ -INTERNAL True -SCRIPT ../scripts/update_runpath_list.py -MIN_ARG 0 -MAX_ARG 1 -ARG_TYPE 0 STRING - diff --git a/ThirdParty/Ert/share/workflows/jobs/internal-gui/scripts/create_case.py b/ThirdParty/Ert/share/workflows/jobs/internal-gui/scripts/create_case.py deleted file mode 100644 index 74c6380f1b..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal-gui/scripts/create_case.py +++ /dev/null @@ -1,7 +0,0 @@ -from ert.enkf import ErtScript - -class CreateCaseJob(ErtScript): - - def run(self, case_name): - ert = self.ert() - fs = ert.getEnkfFsManager().getFileSystem(case_name) diff --git a/ThirdParty/Ert/share/workflows/jobs/internal-gui/scripts/csv_export.py b/ThirdParty/Ert/share/workflows/jobs/internal-gui/scripts/csv_export.py deleted file mode 100644 index 4c0a93b08b..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal-gui/scripts/csv_export.py +++ /dev/null @@ -1,189 +0,0 @@ -import os -import re - -import pandas -from PyQt4.QtGui import QCheckBox - -from ert.enkf import ErtPlugin, CancelPluginException -from ert.enkf.export import SummaryCollector, GenKwCollector, MisfitCollector, DesignMatrixReader, CustomKWCollector -from ert_gui.ertwidgets.customdialog import CustomDialog -from ert_gui.ertwidgets.listeditbox import ListEditBox -from ert_gui.ertwidgets.models.path_model import PathModel -from ert_gui.ertwidgets.pathchooser import PathChooser - - -class CSVExportJob(ErtPlugin): - """ - Export of summary, custom_kw, misfit, design matrix data and gen kw into a single CSV file. - - The script expects a single argument: - - output_file: this is the path to the file to output the CSV data to - - Optional arguments: - - case_list: a comma separated list of cases to export (no spaces allowed) - if no list is provided the current case is exported - a single * can be used to export all cases - - design_matrix: a path to a file containing the design matrix - - infer_iteration: If True the script will try to infer the iteration number by looking at the suffix of the case name - (i.e. default_2 = iteration 2) - If False the script will use the ordering of the case list: the first item will be iteration 0, - the second item will be iteration 1... - - The script also looks for default values for output path and design matrix path to present in the GUI. These can - be specified with DATA_KW keyword in the config file: - DATA_KW CSV_OUTPUT_PATH - DATA_KW DESIGN_MATRIX_PATH - """ - - INFER_HELP = ("" - "If this is checked the iteration number will be inferred from the name i.e.:" - "
    " - "
  • case_name -> iteration: 0
  • " - "
  • case_name_0 -> iteration: 0
  • " - "
  • case_name_2 -> iteration: 2
  • " - "
  • case_0, case_2, case_5 -> iterations: 0, 2, 5
  • " - "
" - "Leave this unchecked to set iteration number to the order of the listed cases:" - "
  • case_0, case_2, case_5 -> iterations: 0, 1, 2
" - "
" - "") - - def getName(self): - return "CSV Export" - - def getDescription(self): - return "Export GenKW, CustomKW, design matrix, misfit data and summary data into a single CSV file." - - def inferIterationNumber(self, case_name): - pattern = re.compile("_([0-9]+$)") - match = pattern.search(case_name) - - if match is not None: - return int(match.group(1)) - return 0 - - - def run(self, output_file, case_list=None, design_matrix_path=None, infer_iteration=True): - cases = [] - - if case_list is not None: - if case_list.strip() == "*": - cases = self.getAllCaseList() - else: - cases = case_list.split(",") - - if case_list is None or len(cases) == 0: - cases = [self.ert().getEnkfFsManager().getCurrentFileSystem().getCaseName()] - - if design_matrix_path is not None: - if not os.path.exists(design_matrix_path): - raise UserWarning("The design matrix file does not exists!") - - if not os.path.isfile(design_matrix_path): - raise UserWarning("The design matrix is not a file!") - - data = pandas.DataFrame() - - for index, case in enumerate(cases): - case = case.strip() - - if not self.ert().getEnkfFsManager().caseExists(case): - raise UserWarning("The case '%s' does not exist!" % case) - - if not self.ert().getEnkfFsManager().caseHasData(case): - raise UserWarning("The case '%s' does not have any data!" % case) - - if infer_iteration: - iteration_number = self.inferIterationNumber(case) - else: - iteration_number = index - - case_data = GenKwCollector.loadAllGenKwData(self.ert(), case) - - custom_kw_data = CustomKWCollector.loadAllCustomKWData(self.ert(), case) - if not custom_kw_data.empty: - case_data = case_data.join(custom_kw_data, how='outer') - - if design_matrix_path is not None: - design_matrix_data = DesignMatrixReader.loadDesignMatrix(design_matrix_path) - if not design_matrix_data.empty: - case_data = case_data.join(design_matrix_data, how='outer') - - misfit_data = MisfitCollector.loadAllMisfitData(self.ert(), case) - if not misfit_data.empty: - case_data = case_data.join(misfit_data, how='outer') - - summary_data = SummaryCollector.loadAllSummaryData(self.ert(), case) - if not summary_data.empty: - case_data = case_data.join(summary_data, how='outer') - else: - case_data["Date"] = None - case_data.set_index(["Date"], append=True, inplace=True) - - case_data["Iteration"] = iteration_number - case_data["Case"] = case - case_data.set_index(["Case", "Iteration"], append=True, inplace=True) - - data = pandas.concat([data, case_data]) - - data = data.reorder_levels(["Realization", "Iteration", "Date", "Case"]) - data.to_csv(output_file) - - export_info = "Exported %d rows and %d columns to %s." % (len(data.index), len(data.columns), output_file) - return export_info - - - def getArguments(self, parent=None): - description = "The CSV export requires some information before it starts:" - dialog = CustomDialog("CSV Export", description, parent) - - default_csv_output_path = self.getDataKWValue("CSV_OUTPUT_PATH", default="output.csv") - output_path_model = PathModel(default_csv_output_path) - output_path_chooser = PathChooser(output_path_model) - - design_matrix_default = self.getDataKWValue("DESIGN_MATRIX_PATH", default="") - design_matrix_path_model = PathModel(design_matrix_default, is_required=False, must_exist=True) - design_matrix_path_chooser = PathChooser(design_matrix_path_model) - - list_edit = ListEditBox(self.getAllCaseList()) - - infer_iteration_check = QCheckBox() - infer_iteration_check.setChecked(True) - infer_iteration_check.setToolTip(CSVExportJob.INFER_HELP) - - dialog.addLabeledOption("Output file path", output_path_chooser) - dialog.addLabeledOption("Design Matrix path", design_matrix_path_chooser) - dialog.addLabeledOption("List of cases to export", list_edit) - dialog.addLabeledOption("Infer iteration number", infer_iteration_check) - - dialog.addButtons() - - success = dialog.showAndTell() - - if success: - design_matrix_path = design_matrix_path_model.getPath() - if design_matrix_path.strip() == "": - design_matrix_path = None - - case_list = ",".join(list_edit.getItems()) - - return [output_path_model.getPath(), case_list, design_matrix_path, infer_iteration_check.isChecked()] - - raise CancelPluginException("User cancelled!") - - - def getDataKWValue(self, name, default): - data_kw = self.ert().getDataKW() - if name in data_kw: - return data_kw[data_kw.indexForKey(name)][1] - return default - - def getAllCaseList(self): - fs_manager = self.ert().getEnkfFsManager() - all_case_list = fs_manager.getCaseList() - all_case_list = [case for case in all_case_list if fs_manager.caseHasData(case)] - return all_case_list \ No newline at end of file diff --git a/ThirdParty/Ert/share/workflows/jobs/internal-gui/scripts/export_misfit_data.py b/ThirdParty/Ert/share/workflows/jobs/internal-gui/scripts/export_misfit_data.py deleted file mode 100644 index 0cda52f916..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal-gui/scripts/export_misfit_data.py +++ /dev/null @@ -1,78 +0,0 @@ -from collections import OrderedDict -import os -from ert.enkf import ErtScript, RealizationStateEnum -from ert.util import BoolVector - -""" -This job exports misfit data into a chosen file or to the default gen_kw export file (parameters.txt) -""" - -class ExportMisfitDataJob(ErtScript): - - def run(self, target_file=None): - ert = self.ert() - fs = ert.getEnkfFsManager().getCurrentFileSystem() - - if target_file is None: - target_file = ert.getModelConfig().getGenKWExportFile() - - runpath_list = ert.getHookManager().getRunpathList() - - active_list = self.createActiveList(fs) - - for runpath_node in runpath_list: - if runpath_node.realization in active_list: - - if not os.path.exists(runpath_node.runpath): - os.makedirs(runpath_node.runpath) - - target_path = os.path.join(runpath_node.runpath, target_file) - - parameters = self.parseTargetFile(target_path) - - misfit_sum = 0.0 - for obs_vector in ert.getObservations(): - misfit = obs_vector.getTotalChi2(fs, runpath_node.realization ) - - key = "MISFIT:%s" % obs_vector.getObservationKey() - parameters[key] = misfit - - misfit_sum += misfit - - parameters["MISFIT:TOTAL"] = misfit_sum - - self.dumpParametersToTargetFile(parameters, target_path) - - - - def parseTargetFile(self, target_path): - parameters = OrderedDict() - - if os.path.exists(target_path) and os.path.isfile(target_path): - with open(target_path, "r") as input_file: - lines = input_file.readlines() - - for line in lines: - tokens = line.split() - - if len(tokens) == 2: - parameters[tokens[0]] = tokens[1] - else: - raise UserWarning("The file '%s' contains errors. Expected format for each line: KEY VALUE" % target_path) - - return parameters - - - def dumpParametersToTargetFile(self, parameters, target_path): - with open(target_path, "w") as output: - for key in parameters: - output.write("%s %s\n" % (key, parameters[key])) - - - def createActiveList(self, fs): - state_map = fs.getStateMap() - ens_mask = BoolVector(False, self.ert().getEnsembleSize()) - state_map.selectMatching(ens_mask, RealizationStateEnum.STATE_HAS_DATA) - active_list = BoolVector.createActiveList(ens_mask) - - return active_list diff --git a/ThirdParty/Ert/share/workflows/jobs/internal-gui/scripts/gen_data_rft_export.py b/ThirdParty/Ert/share/workflows/jobs/internal-gui/scripts/gen_data_rft_export.py deleted file mode 100644 index 0cac7e970f..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal-gui/scripts/gen_data_rft_export.py +++ /dev/null @@ -1,199 +0,0 @@ -import os -import re - -import numpy -import pandas -from PyQt4.QtGui import QCheckBox - -from ert.ecl.rft import WellTrajectory -from ert.enkf import ErtPlugin, CancelPluginException -from ert.enkf import RealizationStateEnum -from ert.enkf.enums import EnkfObservationImplementationType -from ert.enkf.export import GenDataCollector, ArgLoader -from ert_gui.ertwidgets.customdialog import CustomDialog -from ert_gui.ertwidgets.listeditbox import ListEditBox -from ert_gui.ertwidgets.models.path_model import PathModel -from ert_gui.ertwidgets.pathchooser import PathChooser - - -class GenDataRFTCSVExportJob(ErtPlugin): - """Export of GEN_DATA based rfts to a CSV file. The csv file will in - addition contain the depth as duplicated seperate row. - - The script expects four arguments: - - output_file: this is the path to the file to output the CSV data to - - key: this is the ert GEN_DATA key used for this particular RFT. - - report_step: This is the report step configured in the ert - configuration file for this RFT. - - trajectory_file: This is the the file containing the - - Optional arguments: - - case_list: a comma separated list of cases to export (no spaces allowed) - if no list is provided the current case is exported - - infer_iteration: If True the script will try to infer the iteration number by looking at the suffix of the case name - (i.e. default_2 = iteration 2) - If False the script will use the ordering of the case list: the first item will be iteration 0, - the second item will be iteration 1... - """ - - INFER_HELP = ("" - "If this is checked the iteration number will be inferred from the name i.e.:" - "
    " - "
  • case_name -> iteration: 0
  • " - "
  • case_name_0 -> iteration: 0
  • " - "
  • case_name_2 -> iteration: 2
  • " - "
  • case_0, case_2, case_5 -> iterations: 0, 2, 5
  • " - "
" - "Leave this unchecked to set iteration number to the order of the listed cases:" - "
  • case_0, case_2, case_5 -> iterations: 0, 1, 2
" - "
" - "") - - def getName(self): - return "GEN_DATA RFT CSV Export" - - def getDescription(self): - return "Export gen_data RFT results into a single CSV file." - - def inferIterationNumber(self, case_name): - pattern = re.compile("_([0-9]+$)") - match = pattern.search(case_name) - - if match is not None: - return int(match.group(1)) - return 0 - - def run(self, output_file, trajectory_path, case_list=None, infer_iteration=True): - """The run method will export the RFT's for all wells and all cases. - - The successfull operation of this method hinges on two naming - conventions: - - 1. All the GEN_DATA RFT observations have key RFT_$WELL - 2. The trajectory files are in $trajectory_path/$WELL.txt or $trajectory_path/$WELL_R.txt - - """ - - wells = set() - obs_pattern = "RFT_*" - enkf_obs = self.ert().getObservations() - obs_keys = enkf_obs.getMatchingKeys(obs_pattern, obs_type=EnkfObservationImplementationType.GEN_OBS) - - cases = [] - if case_list is not None: - cases = case_list.split(",") - - if case_list is None or len(cases) == 0: - cases = [self.ert().getEnkfFsManager().getCurrentFileSystem().getCaseName()] - - data_frame = pandas.DataFrame() - for index, case in enumerate(cases): - case = case.strip() - case_frame = pandas.DataFrame() - - if not self.ert().getEnkfFsManager().caseExists(case): - raise UserWarning("The case '%s' does not exist!" % case) - - if not self.ert().getEnkfFsManager().caseHasData(case): - raise UserWarning("The case '%s' does not have any data!" % case) - - if infer_iteration: - iteration_number = self.inferIterationNumber(case) - else: - iteration_number = index - - for obs_key in obs_keys: - well = obs_key.replace("RFT_", "") - wells.add(well) - obs_vector = enkf_obs[obs_key] - data_key = obs_vector.getDataKey() - report_step = obs_vector.activeStep() - obs_node = obs_vector.getNode(report_step) - - rft_data = GenDataCollector.loadGenData(self.ert(), case, data_key, report_step) - fs = self.ert().getEnkfFsManager().getFileSystem(case) - realizations = fs.realizationList(RealizationStateEnum.STATE_HAS_DATA) - - # Trajectory - trajectory_file = os.path.join(trajectory_path, "%s.txt" % well) - if not os.path.isfile(trajectory_file): - trajectory_file = os.path.join(trajectory_path, "%s_R.txt" % well) - - trajectory = WellTrajectory(trajectory_file) - arg = ArgLoader.load(trajectory_file, column_names=["utm_x", "utm_y", "md", "tvd"]) - tvd_arg = arg["tvd"] - data_size = len(tvd_arg) - - # Observations - obs = numpy.empty(shape=(data_size, 2), dtype=numpy.float64) - obs.fill(numpy.nan) - for obs_index in range(len(obs_node)): - data_index = obs_node.getDataIndex(obs_index) - value = obs_node.getValue(obs_index) - std = obs_node.getStandardDeviation(obs_index) - obs[data_index, 0] = value - obs[data_index, 1] = std - - for iens in realizations: - realization_frame = pandas.DataFrame(data={"TVD": tvd_arg, - "Pressure": rft_data[iens], - "ObsValue": obs[:, 0], - "ObsStd": obs[:, 1]}, - columns=["TVD", "Pressure", "ObsValue", "ObsStd"]) - - realization_frame["Realization"] = iens - realization_frame["Well"] = well - realization_frame["Case"] = case - realization_frame["Iteration"] = iteration_number - - case_frame = case_frame.append(realization_frame) - - data_frame = data_frame.append(case_frame) - - data_frame.set_index(["Realization", "Well", "Case", "Iteration"], inplace=True) - data_frame.to_csv(output_file) - export_info = "Exported RFT information for wells: %s to: %s " % (", ".join(list(wells)), output_file) - return export_info - - def getArguments(self, parent=None): - description = "The GEN_DATA RFT CSV export requires some information before it starts:" - dialog = CustomDialog("Robust CSV Export", description, parent) - - output_path_model = PathModel("output.csv") - output_path_chooser = PathChooser(output_path_model) - - trajectory_model = PathModel("wellpath", must_be_a_directory=True, must_be_a_file=False, must_exist=True) - trajectory_chooser = PathChooser(trajectory_model) - - fs_manager = self.ert().getEnkfFsManager() - all_case_list = fs_manager.getCaseList() - all_case_list = [case for case in all_case_list if fs_manager.caseHasData(case)] - list_edit = ListEditBox(all_case_list) - - infer_iteration_check = QCheckBox() - infer_iteration_check.setChecked(True) - infer_iteration_check.setToolTip(GenDataRFTCSVExportJob.INFER_HELP) - - dialog.addLabeledOption("Output file path", output_path_chooser) - dialog.addLabeledOption("Trajectory file", trajectory_chooser) - dialog.addLabeledOption("List of cases to export", list_edit) - dialog.addLabeledOption("Infer iteration number", infer_iteration_check) - - dialog.addButtons() - - success = dialog.showAndTell() - - if success: - case_list = ",".join(list_edit.getItems()) - try: - return [output_path_model.getPath(), trajectory_model.getPath(), case_list, infer_iteration_check.isChecked()] - except ValueError: - pass - - raise CancelPluginException("User cancelled!") diff --git a/ThirdParty/Ert/share/workflows/jobs/internal-gui/scripts/init_case_from_existing.py b/ThirdParty/Ert/share/workflows/jobs/internal-gui/scripts/init_case_from_existing.py deleted file mode 100644 index abb028820c..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal-gui/scripts/init_case_from_existing.py +++ /dev/null @@ -1,16 +0,0 @@ -from ert.enkf import ErtScript - - -class InitCaseFromExistingJob(ErtScript): - - def run(self, source_case, target_case=None): - ert = self.ert() - source_fs = ert.getEnkfFsManager().getFileSystem(source_case) - - if target_case is None: - target_fs = ert.getEnkfFsManager().getCurrentFileSystem() - - else: - target_fs = ert.getEnkfFsManager().getFileSystem(target_case) - - ert.getEnkfFsManager().initializeCaseFromExisting(source_fs, 0 , target_fs) diff --git a/ThirdParty/Ert/share/workflows/jobs/internal-gui/scripts/select_case.py b/ThirdParty/Ert/share/workflows/jobs/internal-gui/scripts/select_case.py deleted file mode 100644 index 63f4456f9d..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal-gui/scripts/select_case.py +++ /dev/null @@ -1,9 +0,0 @@ -from ert.enkf import ErtScript - -class SelectCaseJob(ErtScript): - - def run(self, case_name): - ert = self.ert() - fs = ert.getEnkfFsManager().getFileSystem(case_name) - ert.getEnkfFsManager().switchFileSystem(fs) - diff --git a/ThirdParty/Ert/share/workflows/jobs/internal-gui/scripts/update_runpath_list.py b/ThirdParty/Ert/share/workflows/jobs/internal-gui/scripts/update_runpath_list.py deleted file mode 100644 index 4a4300fb6c..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal-gui/scripts/update_runpath_list.py +++ /dev/null @@ -1,37 +0,0 @@ -from ert.enkf import ErtScript - -""" -This job is useful if you are running a workflow that requires the hook_manager runpath_list -to be populated but your are not running any simulations. -""" - -class UpdateRunpathListJob(ErtScript): - def run(self): - ert = self.ert() - - realization_count = ert.getEnsembleSize() - iteration = 0 - - ecl_config = ert.eclConfig() - model_config = ert.getModelConfig() - basename_fmt = ecl_config.getEclBase() - runpath_fmt = model_config.getRunpathAsString() - hook_manager = ert.getHookManager() - - runpath_list = hook_manager.getRunpathList() - - runpath_list.clear() - - for realization_number in range(realization_count): - - if basename_fmt is not None: - basename = basename_fmt % realization_number - else: - raise UserWarning("EclBase not set!") - - if model_config.runpathRequiresIterations(): - runpath = runpath_fmt % (realization_number, iteration) - else: - runpath = runpath_fmt % realization_number - - runpath_list.add(realization_number, iteration, runpath, basename) diff --git a/ThirdParty/Ert/share/workflows/jobs/internal-tui/config/CREATE_CASE b/ThirdParty/Ert/share/workflows/jobs/internal-tui/config/CREATE_CASE deleted file mode 100644 index e59df565d8..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal-tui/config/CREATE_CASE +++ /dev/null @@ -1,6 +0,0 @@ -INTERNAL True -FUNCTION enkf_main_create_case_JOB -MIN_ARG 1 -MAX_ARG 1 -ARG_TYPE 0 STRING - diff --git a/ThirdParty/Ert/share/workflows/jobs/internal-tui/config/INIT_CASE_FROM_EXISTING b/ThirdParty/Ert/share/workflows/jobs/internal-tui/config/INIT_CASE_FROM_EXISTING deleted file mode 100644 index f9a1ba7a5e..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal-tui/config/INIT_CASE_FROM_EXISTING +++ /dev/null @@ -1,7 +0,0 @@ -INTERNAL True -FUNCTION enkf_main_init_case_from_existing_JOB -MIN_ARG 1 -MAX_ARG 2 -ARG_TYPE 0 STRING -ARG_TYPE 1 STRING - diff --git a/ThirdParty/Ert/share/workflows/jobs/internal-tui/config/PLOT_ALL_SUMMARY b/ThirdParty/Ert/share/workflows/jobs/internal-tui/config/PLOT_ALL_SUMMARY deleted file mode 100644 index 76ce548a86..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal-tui/config/PLOT_ALL_SUMMARY +++ /dev/null @@ -1,5 +0,0 @@ -INTERNAL True -FUNCTION enkf_tui_plot_all_summary_JOB -MIN_ARG 0 - - diff --git a/ThirdParty/Ert/share/workflows/jobs/internal-tui/config/SELECT_CASE b/ThirdParty/Ert/share/workflows/jobs/internal-tui/config/SELECT_CASE deleted file mode 100644 index 3d77f14369..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal-tui/config/SELECT_CASE +++ /dev/null @@ -1,6 +0,0 @@ -INTERNAL True -FUNCTION enkf_main_select_case_JOB -MIN_ARG 1 -MAX_ARG 1 -ARG_TYPE 0 STRING - diff --git a/ThirdParty/Ert/share/workflows/jobs/internal/config/ANALYSIS_SELECT_MODULE b/ThirdParty/Ert/share/workflows/jobs/internal/config/ANALYSIS_SELECT_MODULE deleted file mode 100644 index 7e12173079..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal/config/ANALYSIS_SELECT_MODULE +++ /dev/null @@ -1,5 +0,0 @@ -INTERNAL True -FUNCTION enkf_main_select_module_JOB -MIN_ARG 1 -MAX_ARG 1 -ARG_TYPE 0 STRING \ No newline at end of file diff --git a/ThirdParty/Ert/share/workflows/jobs/internal/config/ANALYSIS_UPDATE b/ThirdParty/Ert/share/workflows/jobs/internal/config/ANALYSIS_UPDATE deleted file mode 100644 index 186f1d7122..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal/config/ANALYSIS_UPDATE +++ /dev/null @@ -1,6 +0,0 @@ -INTERNAL True -FUNCTION enkf_main_analysis_update_JOB -MIN_ARG 2 -MAX_ARG 2 -ARG_TYPE 0 STRING -ARG_TYPE 1 STRING diff --git a/ThirdParty/Ert/share/workflows/jobs/internal/config/DATA_RANKING b/ThirdParty/Ert/share/workflows/jobs/internal/config/DATA_RANKING deleted file mode 100644 index 514aac9c2e..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal/config/DATA_RANKING +++ /dev/null @@ -1,8 +0,0 @@ -INTERNAL True -FUNCTION enkf_main_rank_on_data_JOB -MIN_ARG 3 -MAX_ARG 4 -ARG_TYPE 0 STRING -ARG_TYPE 1 STRING -ARG_TYPE 2 BOOL -ARG_TYPE 3 INT diff --git a/ThirdParty/Ert/share/workflows/jobs/internal/config/ENSEMBLE_RUN b/ThirdParty/Ert/share/workflows/jobs/internal/config/ENSEMBLE_RUN deleted file mode 100644 index 8bdc4b1da2..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal/config/ENSEMBLE_RUN +++ /dev/null @@ -1,6 +0,0 @@ -INTERNAL True -FUNCTION enkf_main_ensemble_run_JOB -MIN_ARG 0 -ARG_TYPE 0 STRING - - diff --git a/ThirdParty/Ert/share/workflows/jobs/internal/config/EXIT_ERT b/ThirdParty/Ert/share/workflows/jobs/internal/config/EXIT_ERT deleted file mode 100644 index ef2e4b9d1e..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal/config/EXIT_ERT +++ /dev/null @@ -1,4 +0,0 @@ -INTERNAL True -FUNCTION enkf_main_exit_JOB -MIN_ARG 0 -MAX_ARG 0 diff --git a/ThirdParty/Ert/share/workflows/jobs/internal/config/EXPORT_FIELD b/ThirdParty/Ert/share/workflows/jobs/internal/config/EXPORT_FIELD deleted file mode 100644 index ca01bc461a..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal/config/EXPORT_FIELD +++ /dev/null @@ -1,7 +0,0 @@ -INTERNAL True -FUNCTION enkf_main_export_field_JOB -MIN_ARG 3 -ARG_TYPE 0 STRING -ARG_TYPE 1 STRING -ARG_TYPE 2 INT -ARG_TYPE 3 STRING diff --git a/ThirdParty/Ert/share/workflows/jobs/internal/config/EXPORT_FIELD_ECL_GRDECL b/ThirdParty/Ert/share/workflows/jobs/internal/config/EXPORT_FIELD_ECL_GRDECL deleted file mode 100644 index 75e0020f1e..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal/config/EXPORT_FIELD_ECL_GRDECL +++ /dev/null @@ -1,7 +0,0 @@ -INTERNAL True -FUNCTION enkf_main_export_field_to_ECL_JOB -MIN_ARG 3 -ARG_TYPE 0 STRING -ARG_TYPE 1 STRING -ARG_TYPE 2 INT -ARG_TYPE 3 STRING diff --git a/ThirdParty/Ert/share/workflows/jobs/internal/config/EXPORT_FIELD_RMS_ROFF b/ThirdParty/Ert/share/workflows/jobs/internal/config/EXPORT_FIELD_RMS_ROFF deleted file mode 100644 index cfc6a2f4f5..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal/config/EXPORT_FIELD_RMS_ROFF +++ /dev/null @@ -1,7 +0,0 @@ -INTERNAL True -FUNCTION enkf_main_export_field_to_RMS_JOB -MIN_ARG 3 -ARG_TYPE 0 STRING -ARG_TYPE 1 STRING -ARG_TYPE 2 INT -ARG_TYPE 3 STRING diff --git a/ThirdParty/Ert/share/workflows/jobs/internal/config/EXPORT_RANKING b/ThirdParty/Ert/share/workflows/jobs/internal/config/EXPORT_RANKING deleted file mode 100644 index 0ef0614609..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal/config/EXPORT_RANKING +++ /dev/null @@ -1,7 +0,0 @@ -INTERNAL True -FUNCTION enkf_main_export_ranking_JOB -MIN_ARG 2 -MAX_ARG 2 -ARG_TYPE 0 STRING -ARG_TYPE 1 STRING - diff --git a/ThirdParty/Ert/share/workflows/jobs/internal/config/EXPORT_RUNPATH b/ThirdParty/Ert/share/workflows/jobs/internal/config/EXPORT_RUNPATH deleted file mode 100644 index 753f9e9c9f..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal/config/EXPORT_RUNPATH +++ /dev/null @@ -1,3 +0,0 @@ -INTERNAL True -FUNCTION enkf_main_export_runpath_file_JOB - diff --git a/ThirdParty/Ert/share/workflows/jobs/internal/config/INIT_MISFIT_TABLE b/ThirdParty/Ert/share/workflows/jobs/internal/config/INIT_MISFIT_TABLE deleted file mode 100644 index a798874f59..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal/config/INIT_MISFIT_TABLE +++ /dev/null @@ -1,4 +0,0 @@ -INTERNAL True -FUNCTION enkf_main_init_misfit_table_JOB -MIN_ARG 0 - diff --git a/ThirdParty/Ert/share/workflows/jobs/internal/config/LOAD_RESULTS b/ThirdParty/Ert/share/workflows/jobs/internal/config/LOAD_RESULTS deleted file mode 100644 index 8be9a06ecd..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal/config/LOAD_RESULTS +++ /dev/null @@ -1,3 +0,0 @@ -INTERNAL True -FUNCTION enkf_main_load_results_JOB - diff --git a/ThirdParty/Ert/share/workflows/jobs/internal/config/LOAD_RESULTS_ITER b/ThirdParty/Ert/share/workflows/jobs/internal/config/LOAD_RESULTS_ITER deleted file mode 100644 index e81802426e..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal/config/LOAD_RESULTS_ITER +++ /dev/null @@ -1,5 +0,0 @@ -INTERNAL True -FUNCTION enkf_main_load_results_iter_JOB -MIN_ARG 1 -ARG_TYPE 0 INT - diff --git a/ThirdParty/Ert/share/workflows/jobs/internal/config/OBSERVATION_RANKING b/ThirdParty/Ert/share/workflows/jobs/internal/config/OBSERVATION_RANKING deleted file mode 100644 index 23b8402bb6..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal/config/OBSERVATION_RANKING +++ /dev/null @@ -1,4 +0,0 @@ -INTERNAL True -FUNCTION enkf_main_rank_on_observations_JOB -MIN_ARG 1 -ARG_TYPE 0 STRING diff --git a/ThirdParty/Ert/share/workflows/jobs/internal/config/RUN_ITERATED_SMOOTHER b/ThirdParty/Ert/share/workflows/jobs/internal/config/RUN_ITERATED_SMOOTHER deleted file mode 100644 index ed425d5f97..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal/config/RUN_ITERATED_SMOOTHER +++ /dev/null @@ -1,4 +0,0 @@ -INTERNAL True -FUNCTION enkf_main_iterated_smoother_JOB -MIN_ARG 0 -MAX_ARG 0 diff --git a/ThirdParty/Ert/share/workflows/jobs/internal/config/RUN_SMOOTHER b/ThirdParty/Ert/share/workflows/jobs/internal/config/RUN_SMOOTHER deleted file mode 100644 index 44e1bf217b..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal/config/RUN_SMOOTHER +++ /dev/null @@ -1,7 +0,0 @@ -INTERNAL True -FUNCTION enkf_main_smoother_JOB -MIN_ARG 1 -MAX_ARG 2 -ARG_TYPE 0 STRING -ARG_TYPE 1 BOOL - diff --git a/ThirdParty/Ert/share/workflows/jobs/internal/config/RUN_SMOOTHER_WITH_ITER b/ThirdParty/Ert/share/workflows/jobs/internal/config/RUN_SMOOTHER_WITH_ITER deleted file mode 100644 index 15ab1a9dcf..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal/config/RUN_SMOOTHER_WITH_ITER +++ /dev/null @@ -1,8 +0,0 @@ -INTERNAL True -FUNCTION enkf_main_smoother_with_iter_JOB -MIN_ARG 1 -MAX_ARG 3 -ARG_TYPE 0 INT -ARG_TYPE 1 STRING -ARG_TYPE 2 BOOL - diff --git a/ThirdParty/Ert/share/workflows/jobs/internal/config/SCALE_STD b/ThirdParty/Ert/share/workflows/jobs/internal/config/SCALE_STD deleted file mode 100644 index 26ebee4fc8..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal/config/SCALE_STD +++ /dev/null @@ -1,5 +0,0 @@ -INTERNAL True -FUNCTION enkf_main_scale_obs_std_JOB -MIN_ARG 1 -MAX_ARG 1 -ARG_TYPE 0 FLOAT diff --git a/ThirdParty/Ert/share/workflows/jobs/internal/config/STD_SCALE_CORRELATED_OBS b/ThirdParty/Ert/share/workflows/jobs/internal/config/STD_SCALE_CORRELATED_OBS deleted file mode 100644 index 10baf75313..0000000000 --- a/ThirdParty/Ert/share/workflows/jobs/internal/config/STD_SCALE_CORRELATED_OBS +++ /dev/null @@ -1,3 +0,0 @@ -INTERNAL True -FUNCTION enkf_main_std_scale_correlated_obs_JOB - diff --git a/ThirdParty/Ert/test-data/local/config/gen_data/REFCASE.SMSPEC b/ThirdParty/Ert/test-data/local/config/gen_data/REFCASE.SMSPEC deleted file mode 100644 index 04373c55f9..0000000000 Binary files a/ThirdParty/Ert/test-data/local/config/gen_data/REFCASE.SMSPEC and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/config/gen_data/REFCASE.UNSMRY b/ThirdParty/Ert/test-data/local/config/gen_data/REFCASE.UNSMRY deleted file mode 100644 index 426c9beb6c..0000000000 Binary files a/ThirdParty/Ert/test-data/local/config/gen_data/REFCASE.UNSMRY and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/config/gen_data/config b/ThirdParty/Ert/test-data/local/config/gen_data/config deleted file mode 100644 index 64f533aca1..0000000000 --- a/ThirdParty/Ert/test-data/local/config/gen_data/config +++ /dev/null @@ -1,8 +0,0 @@ -JOBNAME Job%d -RUNPATH /tmp/simulations/run%d -NUM_REALIZATIONS 1 - -GEN_DATA DATA INPUT_FORMAT:ASCII RESULT_FILE:Result%d REPORT_STEPS:10,20 - -OBS_CONFIG observations -REFCASE REFCASE \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/config/gen_data/gen_obs_data b/ThirdParty/Ert/test-data/local/config/gen_data/gen_obs_data deleted file mode 100644 index 94ebaf9001..0000000000 --- a/ThirdParty/Ert/test-data/local/config/gen_data/gen_obs_data +++ /dev/null @@ -1,4 +0,0 @@ -1 -2 -3 -4 diff --git a/ThirdParty/Ert/test-data/local/config/gen_data/observations b/ThirdParty/Ert/test-data/local/config/gen_data/observations deleted file mode 100644 index 28b4e99cd2..0000000000 --- a/ThirdParty/Ert/test-data/local/config/gen_data/observations +++ /dev/null @@ -1,19 +0,0 @@ -GENERAL_OBSERVATION GEN_OBS10 { - DATA = DATA; - RESTART = 10; - OBS_FILE = "gen_obs_data"; -}; - - -GENERAL_OBSERVATION GEN_OBS20 { - DATA = DATA; - RESTART = 20; - OBS_FILE = "gen_obs_data"; -}; - - -GENERAL_OBSERVATION GEN_OBS30 { - DATA = DATA; - RESTART = 30; - OBS_FILE = "gen_obs_data"; -}; diff --git a/ThirdParty/Ert/test-data/local/config/simple_config b/ThirdParty/Ert/test-data/local/config/simple_config deleted file mode 100644 index 8d4b1b0f93..0000000000 --- a/ThirdParty/Ert/test-data/local/config/simple_config +++ /dev/null @@ -1,214 +0,0 @@ -QUEUE_OPTION LSF LSF_LOGIN_SHELL /bin/csh - -DEFINE __NAME__ EXAMPLE_01_BASE -DEFINE __INCLUDE_PATH__ /private/joaho/ERT/git/ert/Gurbat -DEFINE __GRID__ __NAME__.EGRID -DEFINE MULTIR_FILE MULTIR.INC - -JOB_SCRIPT /private/joaho/ERT/Statoil/etc/ERT/Scripts/job_dispatch.py - - --- The ECLIPSE data files which are used as init. - -GRID __GRID__ -SCHEDULE_FILE target.SCH - - ---SCHEDULE_PREDICTION_FILE prediction.sch - -INSTALL_JOB RMS_BATCH /private/joaho/ERT/Statoil/etc/ERT/Config/jobs/resmod/RMS_BATCH_TEST -INSTALL_JOB ECLIPSE_TEST ECLIPSE_TEST -INSTALL_JOB AVGP jobs/AVGP ---INSTALL_JOB RMS_TEST /private/joaho/ERT/Statoil/etc/ERT/Config/jobs/resmod/RMS_BATCH -SETENV MANY_PATH $PATH:$LD_LIBRARY_PATH:$MANPATH:/lib - - ---SCHEDULE_PREDICTION_FILE prediction2.schi - -DATA_FILE Example_01_base.data - - -INIT_SECTION __INCLUDE_PATH__/EQUIL.INC -LICENSE_PATH /tmp/BJARNE_PATH - ---SETENV ERT_LINK_LSF True ---LSF_SERVER be-grid01 - ---CASE_TABLE CaseNames - - ---PRE_CLEAR_RUNPATH TRUE - --- Where do you want to store things - - -RUNPATH /scratch/ert/joaho/Run1/Xrun%d -RERUN_PATH /scratch/ert/joaho/Rerun/Xrun%d - - - - - -ENSPATH /tmp/Gurbat/104BlockFS -ECLBASE ECL_%04d - -QC_PATH /tmp/QC - --- How to simulate - - -INSTALL_JOB PVT jobs/PVT -INSTALL_JOB NULL jobs/NULL - -INSTALL_JOB RMS_TEST /private/joaho/ERT/Statoil/etc/ERT/Config/jobs/resmod/RUN_RMS_20XX -INSTALL_JOB PRESSURE33 jobs/Pressure33 - ---FORWARD_MODEL RMS_BATCH(=2012.0.1, =/rms/rms_project_2012 , =MAIN_WORKFLOW) -FORWARD_MODEL ECLIPSE100_2009.1 ---FORWARD_MODEL PRESSURE33 ---FORWARD_MODEL RMS_TEST( = , = , = 2011.0.2, =/rms/rms_project_2012 , =/d/proj/bg/ior_fsenter/GRM_TDP/Gimle/work/tfen/r0004/models/eclipse/refcase/, =Forward_Seismic,=SEISMIC_FORWARD_TARGET.INC) - ---FORWARD_MODEL AVGP ---FORWARD_MODEL NULL - - -UMASK 0 -MAX_SUBMIT 10 -MAX_RESAMPLE 1 - - -ADD_FIXED_LENGTH_SCHEDULE_KW Jalla 7 -ADD_FIXED_LENGTH_SCHEDULE_KW Jalla2 70 - - - -DBASE_TYPE BLOCK_FS - --- The ensemble -NUM_REALIZATIONS 25 - -IMAGE_TYPE png -PLOT_DRIVER PLPLOT - -RUN_TEMPLATE Template1 File1 File:1 -RUN_TEMPLATE Template1 File2 File:2 - - -INSTALL_JOB PRESSURE100 PRESSURE100 - - -GEN_KW MULTFLT FAULT_TEMPLATE MULTFLT.INC Config/MULTFLT.txt -GEN_KW GRID_PARAMS GRID_PARAM_TEMPLATE GRID_PARAMS.INC Config/GRID_PARAMS.txt --MIN_STD:Config/GRID_PARAMS.min_std -GEN_KW FLUID_PARAMS FLUID_PARAM_TEMPLATE FLUID_PARAMS.INC Config/FLUID_PARAMS.txt --MIN_STD:Config/FLUID_PARAMS.min_std - -GEN_PARAM GP GP.txt INIT_FILES:GP/GP.txt INPUT_FORMAT:ASCII OUTPUT_FORMAT:ASCII - - - - -UPDATE_RESULTS TRUE -ENKF_RERUN FALSE -RERUN_START 0 - -INSTALL_JOB SGOF_TAB jobs/SGOF_TAB - - - -ENKF_MERGE_OBSERVATIONS TRUE ---ENKF_SCHED_FILE sched_config - - ---ADD_STATIC_KW __ALL__ -ADD_STATIC_KW BJARNE KW2 - -ENKF_ALPHA 1.50 ------------------------------------------------------------------ -IMAGE_VIEWER /tmp/echo.sh -IMAGE_VIEWER /usr/bin/display - - -QUEUE_SYSTEM LSF -QUEUE_SYSTEM LOCAL -QUEUE_SYSTEM RSH - -MAX_RUNNING_LOCAL 3 -MAX_RUNNING_LSF 100 -MAX_RUNNING_RSH 6 ---LSF_QUEUE SUPERKO - -RSH_HOST be-lx655082:2 be-lx633214:2 - - - -LOG_LEVEL 3 -LOG_FILE /tmp/log/log.txt -UPDATE_LOG_PATH /tmp/UP - -KEEP_RUNPATH 0 - 9 -DATA_KW __INCLUDE_PATH__ -DATA_KW WhatEver SomeThing - - - - --- Quantities to estimate on - -HISTORY_SOURCE REFCASE_HISTORY -REFCASE __NAME__.DATA - - -STORE_SEED RandomSeed -LOAD_SEED RandomSeed - - ---EQUIL EQUIL EQUIL.INC equil_config - -RUN_TEMPLATE GEN_DATA_TEMPLATE GEN_DATA_FILE ---GEN_DATA PRESSURE100 INPUT_FORMAT:ASCII RESULT_FILE:PRESSURE%04d - - - ---ANALYSIS_LOAD RML_ENKF /project/res/x86_64_RH_5/lib/rml_enkf.so ---ANALYSIS_LOAD RML_ENKF rml_enkf.so -ANALYSIS_LOAD RML_ENKF /private/joaho/ERT/NR/libanalysis/src/rml_enkf.so - ---ANALYSIS_LOAD FWD_ENKF /private/joaho/ERT/NR/tmp-build/libanalysis/src/sqrt_enkf.so ---ANALYSIS_LOAD SFWD_ENKF /private/joaho/ERT/NR/tmp-build/libanalysis/src/std_enkf.so -ANALYSIS_SET_VAR STD_ENKF ENKF_TRUNCATION 0.95 ---ANALYSIS_SET_VAR SQRT_ENKF ENKF_TRUNCATION 0.99 -ANALYSIS_SET_VAR STD_ENKF ENKF_NCOMP 2 -ANALYSIS_SET_VAR STD_ENKF ENKF_TRUNCATION 0.98 -ANALYSIS_SELECT STD_ENKF - -ANALYSIS_LOAD TEST_ENKF /private/joaho/ERT/NR/libanalysis/src/test_enkf.so - - -QUEUE_OPTION LSF LSF_LOGIN_SHELL /bin/csh - - -FIELD PRESSURE DYNAMIC -FIELD SWAT DYNAMIC MIN:0 MAX:1 -FIELD SGAS DYNAMIC MIN:0 MAX:1 -FIELD RS DYNAMIC MIN:0 -FIELD RV DYNAMIC MIN:0.0034 - ---CONTAINER CXX PRESSURE SWAT - - ---SURFACE TOP OUTPUT_FILE:surf.irap INIT_FILES:Surfaces/d_BCU_%d.irap BASE_SURFACE:Surfaces/d_BCU_0.irap - --- Observations -OBS_CONFIG observations - - ---SUMMARY F* RPR:* - -PLOT_PATH plots - - -IMAGE_VIEWER /tmp/noplot.sh - ------------------------------------------------------------------ - -WORKFLOW_JOB_DIRECTORY WorkflowJobs -LOAD_WORKFLOW Workflows/PLOT_AND_EXIT diff --git a/ThirdParty/Ert/test-data/local/custom_kw/Observations/observation_1 b/ThirdParty/Ert/test-data/local/custom_kw/Observations/observation_1 deleted file mode 100644 index 9468fb3092..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/Observations/observation_1 +++ /dev/null @@ -1,5 +0,0 @@ -GENERAL_OBSERVATION GEN_PERLIN_1 { - DATA = PERLIN; - RESTART = 1; - OBS_FILE = Observations/perlin_obs_1.txt; -}; diff --git a/ThirdParty/Ert/test-data/local/custom_kw/Observations/observation_2 b/ThirdParty/Ert/test-data/local/custom_kw/Observations/observation_2 deleted file mode 100644 index a52d2ddb9c..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/Observations/observation_2 +++ /dev/null @@ -1,5 +0,0 @@ -GENERAL_OBSERVATION GEN_PERLIN_2 { - DATA = PERLIN; - RESTART = 2; - OBS_FILE = Observations/perlin_obs_2.txt; -}; diff --git a/ThirdParty/Ert/test-data/local/custom_kw/Observations/observation_3 b/ThirdParty/Ert/test-data/local/custom_kw/Observations/observation_3 deleted file mode 100644 index 7465c4c124..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/Observations/observation_3 +++ /dev/null @@ -1,5 +0,0 @@ -GENERAL_OBSERVATION GEN_PERLIN_3 { - DATA = PERLIN; - RESTART = 3; - OBS_FILE = Observations/perlin_obs_3.txt; -}; \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/Observations/observations b/ThirdParty/Ert/test-data/local/custom_kw/Observations/observations deleted file mode 100644 index bff0c5823b..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/Observations/observations +++ /dev/null @@ -1,17 +0,0 @@ -GENERAL_OBSERVATION GEN_PERLIN_1 { - DATA = PERLIN; - RESTART = 1; - OBS_FILE = Observations/perlin_obs_1.txt; -}; - -GENERAL_OBSERVATION GEN_PERLIN_2 { - DATA = PERLIN; - RESTART = 2; - OBS_FILE = Observations/perlin_obs_2.txt; -}; - -GENERAL_OBSERVATION GEN_PERLIN_3 { - DATA = PERLIN; - RESTART = 3; - OBS_FILE = Observations/perlin_obs_3.txt; -}; \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/Observations/perlin_obs_1.txt b/ThirdParty/Ert/test-data/local/custom_kw/Observations/perlin_obs_1.txt deleted file mode 100644 index fbfbf08d9e..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/Observations/perlin_obs_1.txt +++ /dev/null @@ -1,100 +0,0 @@ --0.616789 0.200000 --0.626286 0.200000 --0.642772 0.200000 --0.623396 0.200000 --0.601028 0.200000 --0.587671 0.200000 --0.545803 0.200000 --0.548698 0.200000 --0.576106 0.200000 --0.547830 0.200000 --0.499566 0.200000 --0.390302 0.200000 --0.274769 0.200000 --0.218078 0.200000 --0.206531 0.200000 --0.256190 0.200000 --0.286962 0.200000 --0.290826 0.200000 --0.279457 0.200000 --0.220628 0.200000 --0.175666 0.200000 --0.134717 0.200000 --0.041140 0.200000 -0.004634 0.200000 --0.003586 0.200000 --0.044667 0.200000 --0.084128 0.200000 --0.096405 0.200000 --0.146272 0.200000 --0.192659 0.200000 --0.240387 0.200000 --0.315781 0.200000 --0.353862 0.200000 --0.373289 0.200000 --0.395017 0.200000 --0.362747 0.200000 --0.314473 0.200000 --0.207889 0.200000 --0.078605 0.200000 --0.003939 0.200000 -0.034326 0.200000 -0.005587 0.200000 -0.013544 0.200000 -0.095579 0.200000 -0.191848 0.200000 -0.291420 0.200000 -0.337769 0.200000 -0.309285 0.200000 -0.283094 0.200000 -0.246823 0.200000 -0.190450 0.200000 -0.194585 0.200000 -0.244807 0.200000 -0.290661 0.200000 -0.329075 0.200000 -0.306089 0.200000 -0.264557 0.200000 -0.288901 0.200000 -0.331039 0.200000 -0.413380 0.200000 -0.466520 0.200000 -0.460285 0.200000 -0.444206 0.200000 -0.386893 0.200000 -0.350833 0.200000 -0.314020 0.200000 -0.255650 0.200000 -0.237356 0.200000 -0.229103 0.200000 -0.216303 0.200000 -0.232054 0.200000 -0.206562 0.200000 -0.164036 0.200000 -0.215742 0.200000 -0.336400 0.200000 -0.517183 0.200000 -0.654671 0.200000 -0.732607 0.200000 -0.814735 0.200000 -0.835433 0.200000 -0.826283 0.200000 -0.770065 0.200000 -0.673958 0.200000 -0.624376 0.200000 -0.615341 0.200000 -0.601582 0.200000 -0.585811 0.200000 -0.522072 0.200000 -0.459689 0.200000 -0.462806 0.200000 -0.463663 0.200000 -0.490711 0.200000 -0.483229 0.200000 -0.416017 0.200000 -0.344176 0.200000 -0.307064 0.200000 -0.311372 0.200000 -0.314551 0.200000 -0.275854 0.200000 -0.138191 0.200000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/Observations/perlin_obs_2.txt b/ThirdParty/Ert/test-data/local/custom_kw/Observations/perlin_obs_2.txt deleted file mode 100644 index 1c0ee7d131..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/Observations/perlin_obs_2.txt +++ /dev/null @@ -1,100 +0,0 @@ -0.553636 0.200000 -0.562210 0.200000 -0.577093 0.200000 -0.516574 0.200000 -0.453354 0.200000 -0.438536 0.200000 -0.362335 0.200000 -0.299754 0.200000 -0.294947 0.200000 -0.258916 0.200000 -0.199226 0.200000 -0.154968 0.200000 -0.076430 0.200000 -0.038162 0.200000 -0.047076 0.200000 -0.040351 0.200000 -0.044383 0.200000 --0.022339 0.200000 --0.098926 0.200000 --0.182296 0.200000 --0.239174 0.200000 --0.175066 0.200000 --0.098687 0.200000 -0.046630 0.200000 -0.163052 0.200000 -0.239754 0.200000 -0.379917 0.200000 -0.457436 0.200000 -0.500511 0.200000 -0.547066 0.200000 -0.589134 0.200000 -0.630865 0.200000 -0.648067 0.200000 -0.546752 0.200000 -0.382873 0.200000 -0.254339 0.200000 -0.167602 0.200000 -0.165063 0.200000 -0.107654 0.200000 -0.014283 0.200000 --0.003453 0.200000 --0.014968 0.200000 -0.001727 0.200000 -0.011346 0.200000 -0.009215 0.200000 -0.083611 0.200000 -0.234321 0.200000 -0.391352 0.200000 -0.455607 0.200000 -0.429702 0.200000 -0.462148 0.200000 -0.563361 0.200000 -0.647466 0.200000 -0.778980 0.200000 -0.862696 0.200000 -0.876752 0.200000 -0.897362 0.200000 -0.858848 0.200000 -0.813029 0.200000 -0.815672 0.200000 -0.829471 0.200000 -0.883008 0.200000 -0.938118 0.200000 -0.943737 0.200000 -0.943930 0.200000 -0.887728 0.200000 -0.749709 0.200000 -0.570611 0.200000 -0.427346 0.200000 -0.279535 0.200000 -0.134481 0.200000 -0.091839 0.200000 -0.092425 0.200000 -0.142324 0.200000 -0.217527 0.200000 -0.182289 0.200000 -0.063206 0.200000 --0.052929 0.200000 --0.124322 0.200000 --0.149079 0.200000 --0.160036 0.200000 --0.180000 0.200000 --0.213176 0.200000 --0.191568 0.200000 --0.140832 0.200000 --0.131431 0.200000 --0.164401 0.200000 --0.253597 0.200000 --0.316338 0.200000 --0.275519 0.200000 --0.191733 0.200000 --0.019671 0.200000 -0.187348 0.200000 -0.371249 0.200000 -0.532809 0.200000 -0.604516 0.200000 -0.620637 0.200000 -0.517488 0.200000 -0.382527 0.200000 -0.308772 0.200000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/Observations/perlin_obs_3.txt b/ThirdParty/Ert/test-data/local/custom_kw/Observations/perlin_obs_3.txt deleted file mode 100644 index f2cad960e0..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/Observations/perlin_obs_3.txt +++ /dev/null @@ -1,100 +0,0 @@ --0.258515 0.200000 --0.356107 0.200000 --0.525515 0.200000 --0.663313 0.200000 --0.770373 0.200000 --0.752177 0.200000 --0.720117 0.200000 --0.712752 0.200000 --0.678174 0.200000 --0.634873 0.200000 --0.510858 0.200000 --0.401601 0.200000 --0.371298 0.200000 --0.399836 0.200000 --0.388296 0.200000 --0.362204 0.200000 --0.377951 0.200000 --0.339453 0.200000 --0.258223 0.200000 --0.088966 0.200000 -0.113885 0.200000 -0.276111 0.200000 -0.391728 0.200000 -0.418974 0.200000 -0.416504 0.200000 -0.381174 0.200000 -0.323184 0.200000 -0.270447 0.200000 -0.279357 0.200000 -0.328360 0.200000 -0.328559 0.200000 -0.323026 0.200000 -0.327307 0.200000 -0.348794 0.200000 -0.376927 0.200000 -0.383302 0.200000 -0.372235 0.200000 -0.356978 0.200000 -0.397867 0.200000 -0.522396 0.200000 -0.601574 0.200000 -0.657218 0.200000 -0.723345 0.200000 -0.698378 0.200000 -0.639636 0.200000 -0.584196 0.200000 -0.523544 0.200000 -0.490729 0.200000 -0.486421 0.200000 -0.409534 0.200000 -0.286329 0.200000 -0.120963 0.200000 --0.046326 0.200000 --0.129596 0.200000 --0.224071 0.200000 --0.277277 0.200000 --0.271037 0.200000 --0.304891 0.200000 --0.363780 0.200000 --0.395722 0.200000 --0.438535 0.200000 --0.504110 0.200000 --0.546085 0.200000 --0.616035 0.200000 --0.673682 0.200000 --0.650552 0.200000 --0.604866 0.200000 --0.567949 0.200000 --0.539873 0.200000 --0.552954 0.200000 --0.570381 0.200000 --0.517706 0.200000 --0.474400 0.200000 --0.373474 0.200000 --0.263037 0.200000 --0.203820 0.200000 --0.103226 0.200000 --0.051460 0.200000 -0.023379 0.200000 -0.085632 0.200000 -0.073926 0.200000 -0.114264 0.200000 -0.210600 0.200000 -0.367117 0.200000 -0.493523 0.200000 -0.541983 0.200000 -0.555534 0.200000 -0.507462 0.200000 -0.468411 0.200000 -0.494860 0.200000 -0.511384 0.200000 -0.505254 0.200000 -0.497490 0.200000 -0.404108 0.200000 -0.324978 0.200000 -0.329421 0.200000 -0.331172 0.200000 -0.357684 0.200000 -0.334654 0.200000 -0.226313 0.200000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/Parameters/PERLIN_PARAMS.txt b/ThirdParty/Ert/test-data/local/custom_kw/Parameters/PERLIN_PARAMS.txt deleted file mode 100644 index 24926666bb..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/Parameters/PERLIN_PARAMS.txt +++ /dev/null @@ -1,7 +0,0 @@ -SCALE UNIFORM 0.1 1 -OFFSET UNIFORM -1 1 -PERSISTENCE UNIFORM 0.01 1 -OCTAVES UNIFORM 1 64 -PRIME_1 UNIFORM 0 127 -PRIME_2 UNIFORM 0 127 -PRIME_3 UNIFORM 0 127 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/RandomSeed b/ThirdParty/Ert/test-data/local/custom_kw/RandomSeed deleted file mode 100644 index a4571d8b82..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/RandomSeed +++ /dev/null @@ -1 +0,0 @@ -103 95 15 -86 -95 -5 16 -18 24 -60 -89 101 70 22 -104 -41 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/Refcase/CASE.EGRID b/ThirdParty/Ert/test-data/local/custom_kw/Refcase/CASE.EGRID deleted file mode 100644 index 33da9f7a70..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/Refcase/CASE.EGRID and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/Template/PERLIN_TEMPLATE b/ThirdParty/Ert/test-data/local/custom_kw/Template/PERLIN_TEMPLATE deleted file mode 100644 index 527a92907c..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/Template/PERLIN_TEMPLATE +++ /dev/null @@ -1,7 +0,0 @@ -SCALE: -OFFSET: -PERSISTENCE: -OCTAVES: -PRIME_1: -PRIME_2: -PRIME_3: \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/OK b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/OK deleted file mode 100644 index 9590cb949c..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/OK +++ /dev/null @@ -1 +0,0 @@ -All jobs complete \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/aggregated.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/aggregated.txt deleted file mode 100644 index de8aedc562..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/aggregated.txt +++ /dev/null @@ -1,4 +0,0 @@ -PERLIN_3 0.190479 -PERLIN_2 1.002630 -PERLIN_1 -0.167794 -STATE Positive \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/aggregator.stderr b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/aggregator.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/aggregator.stdout b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/aggregator.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/parameters.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/parameters.txt deleted file mode 100644 index 142dbecaab..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/parameters.txt +++ /dev/null @@ -1,7 +0,0 @@ -PERLIN_PARAM:SCALE 0.249225 -PERLIN_PARAM:OFFSET 0.185709 -PERLIN_PARAM:PERSISTENCE 0.936132 -PERLIN_PARAM:OCTAVES 22.4008 -PERLIN_PARAM:PRIME_1 70.2373 -PERLIN_PARAM:PRIME_2 73.2881 -PERLIN_PARAM:PRIME_3 73.2557 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/perlin.stderr b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/perlin.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/perlin.stdout b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/perlin.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/perlin_1.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/perlin_1.txt deleted file mode 100644 index fec0fd107e..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/perlin_1.txt +++ /dev/null @@ -1,100 +0,0 @@ --0.167794 --0.533157 --0.582564 --0.581187 --0.544394 --0.617389 --0.471483 --0.570636 --0.513164 --0.094431 --0.489078 --0.363713 --0.116233 -0.104267 --0.185805 --0.200709 --0.150918 --0.384297 -0.293484 -0.122875 --0.157933 -0.066183 -0.043334 -0.083941 -0.237257 -0.510188 -0.247252 -0.238908 --0.087547 --0.330292 --0.126747 --0.035823 --0.234230 -0.031125 --0.470002 -0.277528 -0.333005 -0.208194 -0.329248 -0.183316 -0.030305 -0.292607 -0.207885 --0.055542 -0.267287 -0.489294 -0.351695 -0.473816 -0.486845 -0.161185 -0.750709 -0.334430 -0.487895 --0.083531 -0.631333 -0.189402 -0.293179 -0.416287 -0.071861 -0.343657 -0.530727 -0.295893 -0.707495 -0.705177 -0.364062 --0.028729 -0.627459 -0.665644 -0.110239 -0.074890 -0.898952 -0.507702 -0.793900 -0.376955 -0.740932 -0.768612 -1.072116 -0.641052 -0.951385 -1.114482 -0.779685 -1.030575 -0.960609 -0.819774 -0.728183 -0.880717 -0.390042 -0.616292 -0.534190 -0.332035 -0.597337 -0.310784 -0.480825 -0.510514 -0.527712 -0.106739 -0.459289 -0.091994 -0.167754 -0.291767 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/perlin_2.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/perlin_2.txt deleted file mode 100644 index a4c8ae2281..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/perlin_2.txt +++ /dev/null @@ -1,100 +0,0 @@ -1.002630 -0.655338 -0.637300 -0.558783 -0.509989 -0.408818 -0.436655 -0.277816 -0.357889 -0.712315 -0.209713 -0.181557 -0.234966 -0.360507 -0.067803 -0.095832 -0.180428 --0.115810 -0.474014 -0.161206 --0.221441 -0.025834 --0.014213 -0.125937 -0.403895 -0.794609 -0.711298 -0.792749 -0.559236 -0.409434 -0.702774 -0.910823 -0.767699 -0.951166 -0.307889 -0.894615 -0.815080 -0.581146 -0.515508 -0.201538 --0.007474 -0.272051 -0.196068 --0.139775 -0.084654 -0.281485 -0.248246 -0.555883 -0.659358 -0.344063 -1.022407 -0.703206 -0.890554 -0.404788 -1.164953 -0.760065 -0.925984 -0.986234 -0.553851 -0.745948 -0.893678 -0.718616 -1.201408 -1.262021 -0.957160 -0.544980 -1.121517 -0.998898 -0.308482 -0.138122 -0.801380 -0.392979 -0.722289 -0.303537 -0.622059 -0.433718 -0.480651 --0.144483 -0.012328 -0.129970 --0.206634 -0.080509 -0.073475 -0.003830 --0.027990 -0.147703 --0.360170 --0.159376 --0.241837 --0.406290 --0.058059 --0.199599 -0.184944 -0.465746 -0.716346 -0.404191 -0.768554 -0.294930 -0.274427 -0.462347 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/perlin_3.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/perlin_3.txt deleted file mode 100644 index 13a10a9e5d..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/perlin_3.txt +++ /dev/null @@ -1,100 +0,0 @@ -0.190479 --0.262978 --0.465308 --0.621105 --0.713738 --0.781896 --0.645797 --0.734690 --0.615233 --0.181474 --0.500371 --0.375013 --0.212762 --0.077491 --0.367569 --0.306723 --0.241907 --0.432924 -0.314717 -0.254536 -0.131618 -0.477011 -0.476202 -0.498281 -0.657347 -0.936028 -0.654565 -0.605760 -0.338082 -0.190727 -0.442199 -0.602984 -0.446939 -0.753207 -0.301943 -1.023577 -1.019714 -0.773061 -0.805721 -0.709651 -0.597553 -0.944238 -0.917685 -0.547257 -0.715075 -0.782070 -0.537469 -0.655260 -0.690172 -0.323895 -0.846589 -0.260808 -0.196762 --0.503788 -0.078186 --0.393964 --0.242415 --0.177505 --0.622958 --0.465445 --0.374328 --0.668502 --0.282796 --0.297752 --0.660453 --0.993300 --0.233057 --0.139662 --0.658737 --0.694367 -0.096517 --0.216566 -0.155464 --0.212261 -0.141495 -0.047609 -0.314219 --0.143014 -0.160029 -0.364682 -0.027328 -0.374773 -0.497251 -0.562515 -0.606365 -0.821117 -0.359765 -0.601682 -0.542912 -0.364089 -0.645058 -0.325327 -0.495087 -0.498606 -0.508514 -0.129097 -0.479090 -0.135126 -0.226554 -0.379889 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/perlin_fail.status b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/perlin_fail.status deleted file mode 100644 index 6ac0122a28..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/perlin_fail.status +++ /dev/null @@ -1 +0,0 @@ -Did nothing! \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/perlin_params.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/perlin_params.txt deleted file mode 100644 index 99b2ec3ff6..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/perlin_params.txt +++ /dev/null @@ -1,7 +0,0 @@ -SCALE:0.249225 -OFFSET:0.185709 -PERSISTENCE:0.936132 -OCTAVES:22.4008 -PRIME_1:70.2373 -PRIME_2:73.2881 -PRIME_3:73.2557 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/realization.ok b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/realization.ok deleted file mode 100644 index a0aba9318a..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-0/iter-0/realization.ok +++ /dev/null @@ -1 +0,0 @@ -OK \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/OK b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/OK deleted file mode 100644 index 9590cb949c..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/OK +++ /dev/null @@ -1 +0,0 @@ -All jobs complete \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/aggregated.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/aggregated.txt deleted file mode 100644 index c42ebc2573..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/aggregated.txt +++ /dev/null @@ -1,4 +0,0 @@ -PERLIN_3 -0.584204 -PERLIN_2 0.227947 -PERLIN_1 -0.942477 -STATE Negative \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/aggregator.stderr b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/aggregator.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/aggregator.stdout b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/aggregator.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/parameters.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/parameters.txt deleted file mode 100644 index d931876083..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/parameters.txt +++ /dev/null @@ -1,7 +0,0 @@ -PERLIN_PARAM:SCALE 0.24275 -PERLIN_PARAM:OFFSET -0.29096 -PERLIN_PARAM:PERSISTENCE 0.860518 -PERLIN_PARAM:OCTAVES 14.7858 -PERLIN_PARAM:PRIME_1 11.8217 -PERLIN_PARAM:PRIME_2 48.9187 -PERLIN_PARAM:PRIME_3 89.5122 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/perlin.stderr b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/perlin.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/perlin.stdout b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/perlin.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/perlin_2.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/perlin_2.txt deleted file mode 100644 index 296be5b8cd..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/perlin_2.txt +++ /dev/null @@ -1,100 +0,0 @@ -0.227947 -0.461424 -0.496254 -0.385250 -0.382965 -0.294599 -0.215538 -0.354808 -0.194641 -0.061050 -0.006348 --0.033658 --0.137511 --0.052176 -0.054974 -0.004020 --0.119814 --0.186461 --0.385196 --0.286967 --0.540945 --0.434223 --0.424480 --0.139600 --0.216224 -0.069846 -0.120217 -0.327327 -0.326008 -0.431300 -0.341933 -0.550826 -0.259922 -0.392107 -0.003858 -0.014051 --0.354946 --0.083760 --0.201720 --0.372664 --0.515754 --0.416670 --0.452153 --0.378276 --0.502741 --0.226850 --0.117039 --0.170353 --0.103309 -0.018785 -0.134857 -0.299396 -0.256928 -0.466775 -0.638846 -0.679726 -0.643554 -0.744558 -0.717986 -0.632070 -0.597780 -0.726447 -0.907347 -0.748545 -0.576996 -0.711178 -0.663988 -0.233265 -0.069050 --0.047240 --0.055375 --0.163060 --0.421085 --0.171631 -0.043688 --0.021042 --0.190991 --0.247524 --0.463284 --0.413005 --0.644291 --0.650833 --0.570592 --0.466943 --0.568175 --0.409936 --0.512981 --0.655652 --0.830461 --0.878072 --0.495081 --0.517236 --0.159439 -0.026080 --0.084928 -0.074934 -0.020797 -0.156703 --0.069071 -0.019410 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/perlin_3.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/perlin_3.txt deleted file mode 100644 index d43e140291..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/perlin_3.txt +++ /dev/null @@ -1,100 +0,0 @@ --0.584204 --0.456892 --0.606354 --0.794637 --0.840762 --0.896115 --0.866915 --0.657698 --0.778480 --0.832740 --0.703736 --0.590227 --0.585239 --0.490175 --0.380398 --0.398535 --0.542149 --0.503575 --0.544492 --0.193638 --0.187886 -0.016954 -0.065935 -0.232744 -0.037229 -0.211265 -0.063484 -0.140338 -0.104854 -0.212594 -0.081358 -0.242987 --0.060839 -0.194148 --0.002088 -0.143014 --0.150313 -0.108155 -0.088492 -0.135449 -0.089272 -0.255517 -0.269465 -0.308757 -0.127679 -0.273734 -0.172184 --0.070976 --0.072495 --0.001383 --0.040962 --0.143002 --0.436864 --0.441800 --0.447921 --0.474303 --0.524845 --0.419181 --0.458823 --0.579324 --0.670226 --0.660671 --0.576856 --0.811227 --1.040616 --0.827102 --0.690587 --0.905295 --0.898169 --0.879729 --0.760237 --0.772606 --0.987910 --0.687429 --0.436876 --0.407151 --0.357423 --0.246055 --0.315583 --0.178294 --0.410329 --0.356569 --0.146816 -0.091742 -0.066180 -0.263478 -0.206954 -0.105406 --0.045712 --0.107693 -0.208035 -0.007690 -0.150704 -0.058939 --0.292759 --0.200161 --0.268667 --0.003101 --0.116944 --0.063049 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/perlin_fail.status b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/perlin_fail.status deleted file mode 100644 index 46a71f4e16..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/perlin_fail.status +++ /dev/null @@ -1 +0,0 @@ -Deleted report step: 1 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/perlin_params.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/perlin_params.txt deleted file mode 100644 index fb78e8c3e9..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/perlin_params.txt +++ /dev/null @@ -1,7 +0,0 @@ -SCALE:0.24275 -OFFSET:-0.29096 -PERSISTENCE:0.860518 -OCTAVES:14.7858 -PRIME_1:11.8217 -PRIME_2:48.9187 -PRIME_3:89.5122 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/realization.ok b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/realization.ok deleted file mode 100644 index a0aba9318a..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-1/iter-0/realization.ok +++ /dev/null @@ -1 +0,0 @@ -OK \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/ERROR b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/ERROR deleted file mode 100644 index f5c9d83c76..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/ERROR +++ /dev/null @@ -1,8 +0,0 @@ - - - REALIZATION_FAIL - Could not find target_file:realization.ok - - - - diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/EXIT b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/EXIT deleted file mode 100644 index f5c9d83c76..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/EXIT +++ /dev/null @@ -1,8 +0,0 @@ - - - REALIZATION_FAIL - Could not find target_file:realization.ok - - - - diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/aggregated.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/aggregated.txt deleted file mode 100644 index 39c71d12aa..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/aggregated.txt +++ /dev/null @@ -1,4 +0,0 @@ -PERLIN_3 -0.294383 -PERLIN_2 0.517768 -PERLIN_1 -0.652656 -STATE Negative \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/aggregator.stderr b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/aggregator.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/aggregator.stdout b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/aggregator.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/parameters.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/parameters.txt deleted file mode 100644 index 0850de9c61..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/parameters.txt +++ /dev/null @@ -1,7 +0,0 @@ -PERLIN_PARAM:SCALE 0.187883 -PERLIN_PARAM:OFFSET -0.512383 -PERLIN_PARAM:PERSISTENCE 0.850056 -PERLIN_PARAM:OCTAVES 39.9199 -PERLIN_PARAM:PRIME_1 76.7337 -PERLIN_PARAM:PRIME_2 54.1086 -PERLIN_PARAM:PRIME_3 16.0042 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/perlin.stderr b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/perlin.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/perlin.stdout b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/perlin.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/perlin_1.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/perlin_1.txt deleted file mode 100644 index 122d4089ea..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/perlin_1.txt +++ /dev/null @@ -1,100 +0,0 @@ --0.652656 --0.856575 --0.907574 --0.921559 --0.907052 --0.798535 --0.892001 --0.898300 --0.932647 --0.887530 --0.745258 --0.774438 --0.680597 --0.707552 --0.616984 --0.784930 --0.705796 --0.672207 --0.677662 --0.517634 --0.460960 --0.512998 --0.485822 --0.377630 --0.469687 --0.463782 --0.644529 --0.631042 --0.610238 --0.645129 --0.841183 --0.813056 --0.824549 --0.985474 --0.818724 --1.021755 --0.749654 --0.643111 --0.382287 --0.319701 --0.240893 --0.293783 --0.356379 --0.315861 --0.243741 --0.061641 --0.016073 --0.078540 --0.166452 --0.204278 --0.206156 --0.339674 --0.324650 --0.218586 --0.220018 --0.365619 --0.213129 --0.161173 --0.144854 --0.088350 --0.193806 --0.111286 --0.100984 --0.235155 --0.165413 --0.278588 --0.429381 --0.254946 --0.240835 --0.227267 --0.524615 --0.423858 --0.341032 --0.369948 --0.180422 -0.176827 -0.282667 -0.455645 -0.421888 -0.461117 -0.478802 -0.408361 -0.301001 -0.266791 -0.167743 -0.066362 -0.101881 -0.183729 --0.037895 -0.191528 -0.077918 -0.193353 -0.109073 -0.001759 --0.061599 --0.001108 --0.164077 --0.253534 --0.200586 --0.275259 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/perlin_3.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/perlin_3.txt deleted file mode 100644 index 1e03faf793..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/perlin_3.txt +++ /dev/null @@ -1,100 +0,0 @@ --0.294383 --0.586396 --0.790317 --0.961476 --1.076396 --0.963042 --1.066316 --1.062354 --1.034715 --0.974573 --0.756551 --0.785737 --0.777126 --0.889310 --0.798749 --0.890944 --0.796785 --0.720834 --0.656429 --0.385973 --0.171410 --0.102170 --0.052955 -0.036709 --0.049597 --0.037941 --0.237216 --0.264190 --0.184608 --0.124110 --0.272236 --0.174249 --0.143380 --0.263391 --0.046779 --0.275706 --0.062945 --0.078243 -0.094185 -0.206634 -0.326354 -0.357848 -0.353421 -0.286938 -0.204047 -0.231135 -0.169701 -0.102903 -0.036875 --0.041568 --0.110276 --0.413296 --0.615784 --0.638843 --0.773164 --0.948985 --0.748723 --0.754966 --0.839672 --0.897452 --1.098861 --1.075682 --1.091275 --1.238084 --1.189928 --1.243159 --1.289897 --1.060251 --1.009811 --0.996525 --1.327050 --1.148126 --0.979468 --0.959163 --0.779859 --0.544176 --0.475229 --0.328422 --0.369468 --0.288684 --0.273556 --0.247441 --0.162358 -0.009532 -0.045926 -0.006763 -0.071604 -0.169119 --0.029173 -0.223582 -0.125639 -0.207896 -0.123334 --0.010150 --0.080797 -0.021249 --0.144276 --0.210401 --0.141786 --0.187137 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/perlin_fail.status b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/perlin_fail.status deleted file mode 100644 index 2494f445e5..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/perlin_fail.status +++ /dev/null @@ -1 +0,0 @@ -Deleted report step: 2 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/perlin_params.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/perlin_params.txt deleted file mode 100644 index a069d36ab8..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-2/iter-0/perlin_params.txt +++ /dev/null @@ -1,7 +0,0 @@ -SCALE:0.187883 -OFFSET:-0.512383 -PERSISTENCE:0.850056 -OCTAVES:39.9199 -PRIME_1:76.7337 -PRIME_2:54.1086 -PRIME_3:16.0042 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/ERROR b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/ERROR deleted file mode 100644 index f5c9d83c76..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/ERROR +++ /dev/null @@ -1,8 +0,0 @@ - - - REALIZATION_FAIL - Could not find target_file:realization.ok - - - - diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/EXIT b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/EXIT deleted file mode 100644 index f5c9d83c76..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/EXIT +++ /dev/null @@ -1,8 +0,0 @@ - - - REALIZATION_FAIL - Could not find target_file:realization.ok - - - - diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/aggregated.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/aggregated.txt deleted file mode 100644 index b986f1b481..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/aggregated.txt +++ /dev/null @@ -1,4 +0,0 @@ -PERLIN_3 -0.871387 -PERLIN_2 -0.059236 -PERLIN_1 -1.229660 -STATE Negative \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/aggregator.stderr b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/aggregator.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/aggregator.stdout b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/aggregator.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/parameters.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/parameters.txt deleted file mode 100644 index a7472afccf..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/parameters.txt +++ /dev/null @@ -1,7 +0,0 @@ -PERLIN_PARAM:SCALE 0.542054 -PERLIN_PARAM:OFFSET -0.936072 -PERLIN_PARAM:PERSISTENCE 0.66513 -PERLIN_PARAM:OCTAVES 59.6891 -PERLIN_PARAM:PRIME_1 58.3958 -PERLIN_PARAM:PRIME_2 51.6271 -PERLIN_PARAM:PRIME_3 37.3286 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/perlin.stderr b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/perlin.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/perlin.stdout b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/perlin.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/perlin_1.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/perlin_1.txt deleted file mode 100644 index 1f0aabd193..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/perlin_1.txt +++ /dev/null @@ -1,100 +0,0 @@ --1.229660 --1.403213 --1.494882 --1.481222 --1.545058 --1.605346 --1.466829 --1.460689 --1.589462 --1.462504 --1.586371 --1.419953 --1.184666 --1.064367 --1.081730 --1.130531 --1.307146 --1.330892 --1.147255 --1.230522 --1.290812 --1.243312 --1.053225 --0.837831 --0.815416 --0.794856 --0.780118 --0.867346 --0.868595 --0.844661 --0.949974 --1.135521 --1.278698 --1.237066 --1.353473 --1.274754 --1.024540 --1.062374 --1.018191 --0.989482 --1.082235 --1.083477 --1.111900 --0.884140 --0.804378 --0.649785 --0.414051 --0.453314 --0.426393 --0.376335 --0.433952 --0.369796 --0.319725 --0.318209 --0.380495 --0.274543 --0.410077 --0.265464 --0.276032 --0.293185 --0.259478 --0.307654 --0.469020 --0.606702 --0.727993 --0.657698 --0.738949 --0.779068 --0.929409 --0.925120 --0.888902 --0.818882 --0.691387 --0.806321 --0.774223 --0.725947 --0.616177 --0.575377 --0.546778 --0.619225 --0.739783 --0.805058 --0.854443 --1.003113 --0.978222 --0.724971 --0.804323 --0.920953 --0.973738 --0.936418 --0.905518 --0.717744 --0.616881 --0.785126 --0.782606 --0.680625 --0.739233 --0.708171 --0.640854 --0.813288 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/perlin_2.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/perlin_2.txt deleted file mode 100644 index 58ac16bef2..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/perlin_2.txt +++ /dev/null @@ -1,100 +0,0 @@ --0.059236 --0.214718 --0.275017 --0.341253 --0.490676 --0.579139 --0.558691 --0.612236 --0.718408 --0.655757 --0.887580 --0.874683 --0.833466 --0.808127 --0.828123 --0.833990 --0.975800 --1.062405 --0.966725 --1.192190 --1.354320 --1.283661 --1.110772 --0.795835 --0.648779 --0.510435 --0.316072 --0.313505 --0.221812 --0.104936 --0.120453 --0.188875 --0.276769 --0.317026 --0.575582 --0.657667 --0.542465 --0.689421 --0.831931 --0.971260 --1.120014 --1.104033 --1.123718 --0.968373 --0.987011 --0.857594 --0.517499 --0.371248 --0.253880 --0.193457 --0.162254 --0.001019 -0.082934 -0.170110 -0.153126 -0.296120 -0.222728 -0.304483 -0.205958 -0.109107 -0.103474 -0.115069 -0.024892 --0.049858 --0.134896 --0.083989 --0.244890 --0.445814 --0.731166 --0.861888 --0.986474 --0.933604 --0.762998 --0.879739 --0.893096 --1.060842 --1.207642 --1.360912 --1.485835 --1.603737 --1.726102 --1.755124 --1.741578 --1.819057 --1.734395 --1.457985 --1.554534 --1.696621 --1.749765 --1.674743 --1.560913 --1.228126 --0.912762 --0.829894 --0.593973 --0.383174 --0.429968 --0.505235 --0.534181 --0.642708 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/perlin_fail.status b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/perlin_fail.status deleted file mode 100644 index 6842226365..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/perlin_fail.status +++ /dev/null @@ -1 +0,0 @@ -Deleted report step: 3 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/perlin_params.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/perlin_params.txt deleted file mode 100644 index f51328cc14..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-3/iter-0/perlin_params.txt +++ /dev/null @@ -1,7 +0,0 @@ -SCALE:0.542054 -OFFSET:-0.936072 -PERSISTENCE:0.66513 -OCTAVES:59.6891 -PRIME_1:58.3958 -PRIME_2:51.6271 -PRIME_3:37.3286 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/OK b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/OK deleted file mode 100644 index 9590cb949c..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/OK +++ /dev/null @@ -1 +0,0 @@ -All jobs complete \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/aggregated.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/aggregated.txt deleted file mode 100644 index 35536135e9..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/aggregated.txt +++ /dev/null @@ -1,4 +0,0 @@ -PERLIN_3 0.585905 -PERLIN_2 1.398056 -PERLIN_1 0.227632 -STATE Positive \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/aggregator.stderr b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/aggregator.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/aggregator.stdout b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/aggregator.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/parameters.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/parameters.txt deleted file mode 100644 index 43486a893a..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/parameters.txt +++ /dev/null @@ -1,7 +0,0 @@ -PERLIN_PARAM:SCALE 0.434448 -PERLIN_PARAM:OFFSET 0.831105 -PERLIN_PARAM:PERSISTENCE 0.630867 -PERLIN_PARAM:OCTAVES 8.00407 -PERLIN_PARAM:PRIME_1 85.4235 -PERLIN_PARAM:PRIME_2 21.3039 -PERLIN_PARAM:PRIME_3 104.858 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/perlin.stderr b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/perlin.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/perlin.stdout b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/perlin.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/perlin_2.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/perlin_2.txt deleted file mode 100644 index b747326d4e..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/perlin_2.txt +++ /dev/null @@ -1,100 +0,0 @@ -1.398056 -1.370914 -1.363998 -1.279446 -1.232190 -1.280908 -1.103097 -1.044700 -1.071948 -1.061684 -1.094715 -0.964632 -0.831411 -0.781949 -0.814620 -0.849516 -0.851001 -0.765851 -0.758157 -0.773463 -0.753641 -0.789955 -0.752934 -0.828227 -0.915443 -0.973537 -1.081467 -1.241200 -1.241392 -1.257672 -1.377862 -1.470086 -1.421784 -1.325527 -1.150346 -1.051501 -1.044802 -1.106502 -1.157155 -1.178239 -1.131983 -1.091121 -1.099748 -1.022758 -0.922794 -1.005841 -1.071597 -1.179689 -1.248927 -1.203617 -1.238719 -1.303884 -1.370907 -1.578622 -1.711466 -1.711839 -1.668280 -1.577131 -1.546602 -1.622520 -1.688682 -1.788272 -1.882089 -1.796176 -1.789849 -1.824672 -1.596314 -1.354986 -1.209724 -1.109246 -0.923528 -0.922481 -0.911951 -0.973918 -1.090397 -1.192352 -1.060059 -0.993187 -1.014380 -0.913349 -0.932815 -0.882706 -0.835195 -0.874574 -0.888107 -0.876224 -0.749712 -0.614713 -0.449095 -0.520278 -0.614327 -0.737773 -0.860582 -0.969577 -1.155922 -1.219523 -1.274034 -1.070757 -0.993013 -0.832009 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/perlin_3.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/perlin_3.txt deleted file mode 100644 index c5dd1d518a..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/perlin_3.txt +++ /dev/null @@ -1,100 +0,0 @@ -0.585905 -0.452598 -0.261390 -0.099559 -0.008463 -0.090195 -0.020645 -0.032193 -0.098826 -0.167894 -0.384631 -0.408063 -0.383683 -0.343951 -0.379248 -0.446961 -0.428666 -0.448737 -0.598860 -0.866793 -1.106700 -1.241132 -1.243349 -1.200570 -1.168896 -1.114956 -1.024733 -1.054210 -1.020238 -1.038965 -1.117287 -1.162247 -1.101024 -1.127568 -1.144400 -1.180464 -1.249435 -1.298417 -1.447368 -1.686352 -1.737009 -1.763308 -1.821366 -1.709790 -1.553214 -1.506426 -1.360820 -1.279066 -1.279741 -1.183449 -1.062901 -0.861486 -0.677115 -0.670046 -0.624699 -0.557809 -0.499881 -0.413392 -0.369794 -0.411126 -0.420676 -0.401154 -0.397886 -0.236404 -0.172236 -0.286392 -0.241739 -0.216426 -0.242506 -0.276757 -0.218665 -0.312935 -0.345126 -0.458120 -0.609833 -0.806243 -0.893627 -0.994656 -1.162081 -1.148060 -1.166777 -1.176970 -1.258971 -1.433259 -1.522462 -1.549638 -1.469646 -1.375772 -1.233844 -1.290657 -1.317444 -1.262699 -1.170724 -1.002436 -0.948090 -0.944428 -0.984570 -0.910954 -0.945140 -0.749551 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/perlin_fail.status b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/perlin_fail.status deleted file mode 100644 index 46a71f4e16..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/perlin_fail.status +++ /dev/null @@ -1 +0,0 @@ -Deleted report step: 1 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/perlin_params.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/perlin_params.txt deleted file mode 100644 index 324cbda2ee..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/perlin_params.txt +++ /dev/null @@ -1,7 +0,0 @@ -SCALE:0.434448 -OFFSET:0.831105 -PERSISTENCE:0.630867 -OCTAVES:8.00407 -PRIME_1:85.4235 -PRIME_2:21.3039 -PRIME_3:104.858 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/realization.ok b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/realization.ok deleted file mode 100644 index a0aba9318a..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-4/iter-0/realization.ok +++ /dev/null @@ -1 +0,0 @@ -OK \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/ERROR b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/ERROR deleted file mode 100644 index 48bc5b6354..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/ERROR +++ /dev/null @@ -1,8 +0,0 @@ - - - REALIZATION_FAIL - Could not find target_file:realization.ok - - - - diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/EXIT b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/EXIT deleted file mode 100644 index 48bc5b6354..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/EXIT +++ /dev/null @@ -1,8 +0,0 @@ - - - REALIZATION_FAIL - Could not find target_file:realization.ok - - - - diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/aggregated.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/aggregated.txt deleted file mode 100644 index 72e58cbf64..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/aggregated.txt +++ /dev/null @@ -1,4 +0,0 @@ -PERLIN_3 0.638889 -PERLIN_2 1.451039 -PERLIN_1 0.280615 -STATE Positive \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/aggregator.stderr b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/aggregator.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/aggregator.stdout b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/aggregator.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/parameters.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/parameters.txt deleted file mode 100644 index 463f5c41d8..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/parameters.txt +++ /dev/null @@ -1,7 +0,0 @@ -PERLIN_PARAM:SCALE 0.72828 -PERLIN_PARAM:OFFSET 0.48251 -PERLIN_PARAM:PERSISTENCE 0.878696 -PERLIN_PARAM:OCTAVES 62.5026 -PERLIN_PARAM:PRIME_1 10.3564 -PERLIN_PARAM:PRIME_2 34.9666 -PERLIN_PARAM:PRIME_3 46.2883 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/perlin.stderr b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/perlin.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/perlin.stdout b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/perlin.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/perlin_1.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/perlin_1.txt deleted file mode 100644 index 11da497a09..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/perlin_1.txt +++ /dev/null @@ -1,100 +0,0 @@ -0.280615 -0.140016 -0.101814 --0.129046 -0.108540 -0.255758 --0.136433 -0.402995 -0.060006 -0.243033 -0.270699 -1.032076 --0.013904 --0.123877 -0.661223 -0.260982 -0.218027 -1.382060 -0.399264 -0.483361 -0.472825 --0.400746 -1.339330 -0.692467 -0.043042 -0.542935 --0.239154 -0.322095 -0.568886 --0.253825 -0.069002 -0.151587 --0.060719 -0.071557 -1.232762 -0.806173 -0.197592 -0.775339 -0.485706 --0.340968 -0.563185 --0.301442 --0.470657 -0.391865 -1.604934 -1.366571 -0.978296 -0.533236 -0.199409 -0.640021 -0.724001 -0.620437 --0.062286 -0.448127 -0.681424 -0.211811 -0.962468 -0.569284 -0.153403 -0.463251 -0.717336 -1.047732 -0.879313 -0.557671 -0.589243 -0.475895 -0.668305 -1.261389 -1.992548 -0.514705 -1.480108 -0.964709 -0.672593 -0.541782 -1.389203 -0.533862 -1.237538 -0.892042 -0.376384 -0.676731 -1.374955 -1.291646 -0.276911 -0.706050 -0.032507 -1.074094 -0.914922 -1.747032 -2.087744 -1.287205 -1.735100 -1.305039 -1.283753 -0.989592 -0.686460 -0.373096 -0.309114 -0.349820 -0.814016 -0.915557 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/perlin_3.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/perlin_3.txt deleted file mode 100644 index 4b5a132c2c..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/perlin_3.txt +++ /dev/null @@ -1,100 +0,0 @@ -0.638889 -0.410195 -0.219070 --0.168964 --0.060804 -0.091251 --0.310748 -0.238941 --0.042062 -0.155990 -0.259406 -1.020776 --0.110433 --0.305635 -0.479458 -0.154968 -0.127038 -1.333433 -0.420498 -0.615022 -0.762375 -0.010082 -1.772197 -1.106807 -0.463132 -0.968775 -0.168158 -0.688947 -0.994515 -0.267193 -0.637949 -0.790394 -0.620450 -0.793639 -2.004706 -1.552222 -0.884301 -1.340207 -0.962178 -0.185367 -1.130433 -0.350189 -0.239143 -0.994664 -2.052722 -1.659346 -1.164070 -0.714679 -0.402736 -0.802732 -0.819881 -0.546816 --0.353419 -0.027870 -0.128278 --0.371555 -0.426874 --0.024508 --0.541415 --0.345851 --0.187719 -0.083337 --0.110978 --0.445258 --0.435272 --0.488676 --0.192211 -0.456083 -1.223572 --0.254552 -0.677673 -0.240441 -0.034157 --0.047433 -0.789765 --0.187141 -0.479641 -0.107975 --0.414972 --0.073069 -0.622598 -0.635844 --0.186447 -0.448791 --0.089311 -1.014494 -0.884645 -1.732422 -2.096466 -1.319259 -1.782821 -1.319583 -1.298015 -0.977683 -0.667262 -0.395453 -0.328915 -0.392952 -0.872816 -1.003679 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/perlin_fail.status b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/perlin_fail.status deleted file mode 100644 index 2494f445e5..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/perlin_fail.status +++ /dev/null @@ -1 +0,0 @@ -Deleted report step: 2 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/perlin_params.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/perlin_params.txt deleted file mode 100644 index 6ffe51857b..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-5/iter-0/perlin_params.txt +++ /dev/null @@ -1,7 +0,0 @@ -SCALE:0.72828 -OFFSET:0.48251 -PERSISTENCE:0.878696 -OCTAVES:62.5026 -PRIME_1:10.3564 -PRIME_2:34.9666 -PRIME_3:46.2883 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/OK b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/OK deleted file mode 100644 index 9590cb949c..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/OK +++ /dev/null @@ -1 +0,0 @@ -All jobs complete \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/aggregated.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/aggregated.txt deleted file mode 100644 index 07f12f2a08..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/aggregated.txt +++ /dev/null @@ -1,4 +0,0 @@ -PERLIN_3 0.870550 -PERLIN_2 1.682701 -PERLIN_1 0.512277 -STATE Positive \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/aggregator.stderr b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/aggregator.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/aggregator.stdout b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/aggregator.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/parameters.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/parameters.txt deleted file mode 100644 index 04dc1adb80..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/parameters.txt +++ /dev/null @@ -1,7 +0,0 @@ -PERLIN_PARAM:SCALE 0.105108 -PERLIN_PARAM:OFFSET 0.913379 -PERLIN_PARAM:PERSISTENCE 0.962764 -PERLIN_PARAM:OCTAVES 54.2875 -PERLIN_PARAM:PRIME_1 12.1353 -PERLIN_PARAM:PRIME_2 108.225 -PERLIN_PARAM:PRIME_3 58.2668 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/perlin.stderr b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/perlin.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/perlin.stdout b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/perlin.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/perlin_1.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/perlin_1.txt deleted file mode 100644 index 309c31a80b..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/perlin_1.txt +++ /dev/null @@ -1,100 +0,0 @@ -0.512277 -0.536404 -0.520619 -0.520234 -0.561383 -0.536841 -0.593527 -0.431159 -0.579716 -0.595432 -0.613877 -0.832759 -0.851509 -0.830369 -0.752398 -0.701988 -0.854139 -0.813144 -0.848016 -0.675839 -0.919173 -1.078956 -1.165071 -1.045397 -1.099168 -1.049976 -0.934854 -0.813458 -0.777245 -0.747191 -0.680688 -0.492784 -0.756629 -0.639112 -0.677362 -0.560299 -0.783620 -0.757035 -0.781494 -1.092201 -1.102767 -1.052654 -1.207713 -1.115009 -1.380213 -1.620005 -1.355587 -1.358326 -1.365758 -1.049275 -1.264629 -1.182026 -1.240226 -1.329804 -1.210895 -1.340758 -1.160254 -1.099240 -1.243394 -1.267952 -1.359115 -1.457122 -1.219766 -1.225781 -1.439935 -1.367284 -1.242810 -1.155161 -1.278395 -1.180081 -1.125988 -1.131542 -1.239492 -1.086901 -1.273243 -1.532824 -1.482385 -1.810195 -1.887451 -1.774089 -1.870171 -1.843973 -1.696110 -1.740468 -1.791604 -1.614504 -1.582554 -1.758357 -1.634232 -1.684106 -1.786180 -1.619646 -1.484936 -1.430948 -1.379634 -1.352505 -1.382218 -1.487943 -1.057155 -0.971585 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/perlin_2.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/perlin_2.txt deleted file mode 100644 index 463edcab27..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/perlin_2.txt +++ /dev/null @@ -1,100 +0,0 @@ -1.682701 -1.724900 -1.740484 -1.660204 -1.615765 -1.563048 -1.501665 -1.279611 -1.450770 -1.402179 -1.312668 -1.378029 -1.202709 -1.086610 -1.006006 -0.998528 -1.185484 -1.081631 -1.028546 -0.714171 -0.855664 -1.038607 -1.107524 -1.087393 -1.265806 -1.334397 -1.398900 -1.367299 -1.424028 -1.486916 -1.510209 -1.439430 -1.758558 -1.559152 -1.455253 -1.177386 -1.265695 -1.129987 -0.967754 -1.110422 -1.064988 -1.032099 -1.195895 -1.030776 -1.197580 -1.412196 -1.252139 -1.440393 -1.538272 -1.232153 -1.536327 -1.550802 -1.642885 -1.818122 -1.744516 -1.911422 -1.793059 -1.669187 -1.725384 -1.670243 -1.722066 -1.879845 -1.713679 -1.782625 -2.033032 -1.940992 -1.736869 -1.488416 -1.476638 -1.243313 -1.028416 -1.016820 -1.167881 -1.013483 -1.154370 -1.197929 -0.890921 -1.024660 -0.948394 -0.789577 -0.883852 -0.893907 -0.808975 -0.924524 -1.035431 -0.881490 -0.832342 -0.982689 -0.858205 -0.945780 -1.130784 -1.109264 -1.189055 -1.386180 -1.568267 -1.649957 -1.691483 -1.690880 -1.163828 -1.142166 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/perlin_fail.status b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/perlin_fail.status deleted file mode 100644 index 6842226365..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/perlin_fail.status +++ /dev/null @@ -1 +0,0 @@ -Deleted report step: 3 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/perlin_params.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/perlin_params.txt deleted file mode 100644 index 29d18ec899..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/perlin_params.txt +++ /dev/null @@ -1,7 +0,0 @@ -SCALE:0.105108 -OFFSET:0.913379 -PERSISTENCE:0.962764 -OCTAVES:54.2875 -PRIME_1:12.1353 -PRIME_2:108.225 -PRIME_3:58.2668 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/realization.ok b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/realization.ok deleted file mode 100644 index a0aba9318a..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-6/iter-0/realization.ok +++ /dev/null @@ -1 +0,0 @@ -OK \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/ERROR b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/ERROR deleted file mode 100644 index 1eb5bf0114..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/ERROR +++ /dev/null @@ -1,8 +0,0 @@ - - - REALIZATION_FAIL - Could not find target_file:realization.ok - - - - diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/EXIT b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/EXIT deleted file mode 100644 index 1eb5bf0114..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/EXIT +++ /dev/null @@ -1,8 +0,0 @@ - - - REALIZATION_FAIL - Could not find target_file:realization.ok - - - - diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/aggregated.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/aggregated.txt deleted file mode 100644 index 6b3b4204d7..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/aggregated.txt +++ /dev/null @@ -1,4 +0,0 @@ -PERLIN_3 -0.223092 -PERLIN_2 0.589059 -PERLIN_1 -0.581365 -STATE Negative \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/aggregator.stderr b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/aggregator.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/aggregator.stdout b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/aggregator.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/parameters.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/parameters.txt deleted file mode 100644 index 0fec4832fd..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/parameters.txt +++ /dev/null @@ -1,7 +0,0 @@ -PERLIN_PARAM:SCALE 0.100905 -PERLIN_PARAM:OFFSET 0.749785 -PERLIN_PARAM:PERSISTENCE 0.960394 -PERLIN_PARAM:OCTAVES 27.0099 -PERLIN_PARAM:PRIME_1 40.6138 -PERLIN_PARAM:PRIME_2 61.0175 -PERLIN_PARAM:PRIME_3 87.8034 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/perlin.stderr b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/perlin.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/perlin.stdout b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/perlin.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/perlin_1.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/perlin_1.txt deleted file mode 100644 index f4ab414309..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/perlin_1.txt +++ /dev/null @@ -1,100 +0,0 @@ --0.581365 -0.196529 -0.251092 -0.129792 -0.331063 -0.243506 -0.276892 -0.080451 -0.396119 -0.359775 -0.367571 -0.375403 -0.583877 -0.600213 -0.433206 -0.667000 -0.730207 -0.597004 -0.652034 -0.663611 -0.746119 -0.692967 -0.730701 -0.876335 -0.892405 -0.727578 -0.723739 -0.564331 -0.468088 -0.488808 -0.664805 -0.660028 -0.630792 -0.524399 -0.474312 -0.443139 -0.580488 -0.481039 -0.800572 -1.001564 -0.911524 -0.901357 -0.788429 -0.858484 -0.905262 -1.091118 -1.153703 -1.092191 -1.125297 -0.931559 -0.887913 -0.949225 -1.000548 -1.157858 -0.916321 -0.916039 -0.825100 -0.963569 -0.946300 -1.325529 -1.317807 -1.051895 -1.371837 -1.120878 -1.290153 -1.132642 -1.106899 -0.951717 -1.053646 -1.097485 -0.993622 -1.071263 -1.003207 -1.060272 -0.945896 -1.081059 -1.483716 -1.639907 -1.778137 -1.743444 -1.658571 -1.670091 -1.528567 -1.360096 -1.348333 -1.247859 -1.311556 -1.223970 -1.139654 -1.236625 -1.220851 -1.388255 -1.244178 -1.146154 -1.093360 -0.984612 -1.125281 -1.104519 -0.927790 -0.740832 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/perlin_2.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/perlin_2.txt deleted file mode 100644 index 3b2079e9c1..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/perlin_2.txt +++ /dev/null @@ -1,100 +0,0 @@ -0.589059 -1.385024 -1.470957 -1.269762 -1.385446 -1.269712 -1.185030 -0.928904 -1.267172 -1.166521 -1.066362 -0.920673 -0.935076 -0.856454 -0.686814 -0.963540 -1.061552 -0.865491 -0.832564 -0.701943 -0.682610 -0.652618 -0.673153 -0.918331 -1.059042 -1.011999 -1.187784 -1.118172 -1.114871 -1.228534 -1.494326 -1.606674 -1.632721 -1.444440 -1.252203 -1.060226 -1.062564 -0.853991 -0.986832 -1.019786 -0.873746 -0.880802 -0.776611 -0.774251 -0.722629 -0.883309 -1.050254 -1.174258 -1.297810 -1.114437 -1.159611 -1.318001 -1.403207 -1.646177 -1.449942 -1.486702 -1.457905 -1.533516 -1.428289 -1.727821 -1.680758 -1.474617 -1.865750 -1.677722 -1.883250 -1.706351 -1.600958 -1.284972 -1.251889 -1.160717 -0.896049 -0.956541 -0.931596 -0.986854 -0.827023 -0.746164 -0.892252 -0.854372 -0.839080 -0.758932 -0.672252 -0.720025 -0.641433 -0.544152 -0.592160 -0.514846 -0.561344 -0.448302 -0.363627 -0.498299 -0.565455 -0.877873 -0.948297 -1.101386 -1.281993 -1.282064 -1.434546 -1.307456 -1.034463 -0.911412 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/perlin_3.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/perlin_3.txt deleted file mode 100644 index 520a51e79f..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/perlin_3.txt +++ /dev/null @@ -1,100 +0,0 @@ --0.223092 -0.466707 -0.368349 -0.089874 -0.161719 -0.078999 -0.102578 --0.083603 -0.294051 -0.272732 -0.356278 -0.364104 -0.487348 -0.418455 -0.251441 -0.560986 -0.639218 -0.548377 -0.673267 -0.795272 -1.035669 -1.103795 -1.163568 -1.290674 -1.312494 -1.153418 -1.131051 -0.931183 -0.893717 -1.009827 -1.233752 -1.298835 -1.311961 -1.246482 -1.246256 -1.189188 -1.267197 -1.045907 -1.277045 -1.527899 -1.478772 -1.552988 -1.498229 -1.461283 -1.353050 -1.383894 -1.339477 -1.273635 -1.328624 -1.094269 -0.983792 -0.875603 -0.709414 -0.737601 -0.363175 -0.332673 -0.289505 -0.369777 -0.251481 -0.516427 -0.412752 -0.087499 -0.381547 -0.117950 -0.265638 -0.168071 -0.246383 -0.146412 -0.284670 -0.328228 -0.191186 -0.346995 -0.364771 -0.471056 -0.346459 -0.360055 -0.725820 -0.855841 -0.986781 -0.993643 -0.906214 -1.014289 -1.065209 -1.102837 -1.226516 -1.188260 -1.281279 -1.209360 -1.148376 -1.268678 -1.268572 -1.402798 -1.258439 -1.134246 -1.074161 -1.006970 -1.145082 -1.147652 -0.986590 -0.828954 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/perlin_fail.status b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/perlin_fail.status deleted file mode 100644 index 6ac0122a28..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/perlin_fail.status +++ /dev/null @@ -1 +0,0 @@ -Did nothing! \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/perlin_params.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/perlin_params.txt deleted file mode 100644 index 4455122772..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-7/iter-0/perlin_params.txt +++ /dev/null @@ -1,7 +0,0 @@ -SCALE:0.100905 -OFFSET:0.749785 -PERSISTENCE:0.960394 -OCTAVES:27.0099 -PRIME_1:40.6138 -PRIME_2:61.0175 -PRIME_3:87.8034 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/OK b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/OK deleted file mode 100644 index 9590cb949c..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/OK +++ /dev/null @@ -1 +0,0 @@ -All jobs complete \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/aggregated.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/aggregated.txt deleted file mode 100644 index 244709c651..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/aggregated.txt +++ /dev/null @@ -1,4 +0,0 @@ -PERLIN_3 -0.917785 -PERLIN_2 -0.105634 -PERLIN_1 -1.276058 -STATE Negative \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/aggregator.stderr b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/aggregator.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/aggregator.stdout b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/aggregator.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/parameters.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/parameters.txt deleted file mode 100644 index 59ba741905..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/parameters.txt +++ /dev/null @@ -1,7 +0,0 @@ -PERLIN_PARAM:SCALE 0.494279 -PERLIN_PARAM:OFFSET -0.526799 -PERLIN_PARAM:PERSISTENCE 0.0911083 -PERLIN_PARAM:OCTAVES 43.0492 -PERLIN_PARAM:PRIME_1 123.299 -PERLIN_PARAM:PRIME_2 42.4258 -PERLIN_PARAM:PRIME_3 14.0702 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/perlin.stderr b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/perlin.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/perlin.stdout b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/perlin.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/perlin_1.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/perlin_1.txt deleted file mode 100644 index 6aa944dccf..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/perlin_1.txt +++ /dev/null @@ -1,100 +0,0 @@ --1.276058 --1.289017 --1.314341 --1.306601 --1.296437 --1.293440 --1.259407 --1.266510 --1.294486 --1.261902 --1.202479 --1.080475 --0.954164 --0.885534 --0.858941 --0.894787 --0.919912 --0.916939 --0.886507 --0.799550 --0.721154 --0.650200 --0.537956 --0.483812 --0.489635 --0.525394 --0.546662 --0.527208 --0.534832 --0.533549 --0.538252 --0.584050 --0.611137 --0.630059 --0.650202 --0.616093 --0.568181 --0.463276 --0.334508 --0.259597 --0.221372 --0.259230 --0.279580 --0.244302 --0.207325 --0.170186 --0.177288 --0.240439 --0.278604 --0.325685 --0.411518 --0.447688 --0.438482 --0.430901 --0.426508 --0.473419 --0.523455 --0.492174 --0.429854 --0.320462 --0.242691 --0.226471 --0.221185 --0.262628 --0.292571 --0.326766 --0.377534 --0.383441 --0.373359 --0.364832 --0.330290 --0.341756 --0.378785 --0.325450 --0.201339 --0.014930 -0.131198 -0.218084 -0.307262 -0.331535 -0.323047 -0.275638 -0.204499 -0.189781 -0.216423 -0.234694 -0.244237 -0.196780 -0.140343 -0.139795 -0.132064 -0.149348 -0.135500 -0.067575 --0.002818 --0.038351 --0.033175 --0.039802 --0.104931 --0.282153 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/perlin_2.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/perlin_2.txt deleted file mode 100644 index 9527f5ea7a..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/perlin_2.txt +++ /dev/null @@ -1,100 +0,0 @@ --0.105634 --0.100522 --0.094477 --0.166631 --0.242055 --0.267233 --0.351269 --0.418058 --0.423433 --0.455156 --0.503687 --0.535205 --0.602964 --0.629293 --0.605334 --0.598246 --0.588567 --0.648452 --0.705977 --0.761218 --0.784663 --0.690549 --0.595504 --0.441816 --0.322998 --0.240974 --0.082616 -0.026633 -0.111952 -0.206176 -0.291269 -0.362596 -0.390792 -0.289982 -0.127689 -0.000994 --0.086106 --0.090324 --0.148248 --0.241375 --0.259151 --0.279786 --0.291397 --0.328535 --0.389958 --0.377995 --0.280737 --0.158372 --0.106091 --0.142807 --0.139820 --0.078912 --0.035823 -0.057418 -0.107112 -0.097244 -0.109350 -0.077772 -0.052136 -0.081830 -0.120261 -0.196251 -0.272728 -0.294216 -0.300526 -0.246943 -0.116525 --0.050187 --0.175115 --0.301600 --0.427862 --0.456478 --0.450396 --0.398868 --0.320212 --0.349825 --0.460267 --0.567451 --0.631795 --0.652977 --0.663271 --0.674428 --0.682635 --0.626163 --0.539750 --0.498320 --0.505975 --0.578888 --0.635684 --0.598530 --0.523332 --0.361034 --0.160381 -0.022807 -0.185816 -0.259100 -0.276090 -0.163135 -0.001742 --0.111572 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/perlin_3.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/perlin_3.txt deleted file mode 100644 index cd80bec7c2..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/perlin_3.txt +++ /dev/null @@ -1,100 +0,0 @@ --0.917785 --1.018838 --1.197085 --1.346518 --1.465782 --1.457947 --1.433721 --1.430564 --1.396554 --1.348945 --1.213771 --1.091774 --1.050692 --1.067291 --1.040706 --1.000801 --1.010901 --0.965566 --0.865274 --0.667889 --0.431604 --0.239372 --0.105089 --0.069473 --0.069545 --0.099554 --0.139350 --0.160356 --0.109202 --0.012531 -0.030695 -0.054757 -0.070031 -0.092023 -0.121743 -0.129957 -0.118527 -0.101591 -0.141964 -0.266738 -0.345876 -0.392401 -0.430221 -0.358497 -0.240463 -0.122590 -0.008486 --0.058995 --0.075277 --0.162975 --0.315639 --0.521310 --0.729615 --0.851158 --0.979655 --1.056785 --1.059049 --1.085967 --1.124672 --1.129564 --1.147745 --1.190867 --1.211475 --1.265556 --1.317086 --1.291337 --1.238050 --1.188747 --1.142334 --1.134089 --1.132725 --1.066024 --1.017221 --0.914666 --0.800777 --0.735933 --0.626698 --0.565983 --0.484094 --0.418266 --0.429310 --0.380164 --0.258859 --0.067478 -0.094606 -0.175094 -0.213959 -0.182170 -0.149065 -0.171849 -0.179785 -0.163891 -0.149761 -0.055666 --0.022016 --0.015994 --0.013374 -0.003331 --0.046131 --0.194030 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/perlin_fail.status b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/perlin_fail.status deleted file mode 100644 index 6ac0122a28..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/perlin_fail.status +++ /dev/null @@ -1 +0,0 @@ -Did nothing! \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/perlin_params.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/perlin_params.txt deleted file mode 100644 index 219b62155c..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/perlin_params.txt +++ /dev/null @@ -1,7 +0,0 @@ -SCALE:0.494279 -OFFSET:-0.526799 -PERSISTENCE:0.0911083 -OCTAVES:43.0492 -PRIME_1:123.299 -PRIME_2:42.4258 -PRIME_3:14.0702 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/realization.ok b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/realization.ok deleted file mode 100644 index a0aba9318a..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-8/iter-0/realization.ok +++ /dev/null @@ -1 +0,0 @@ -OK \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/OK b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/OK deleted file mode 100644 index 9590cb949c..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/OK +++ /dev/null @@ -1 +0,0 @@ -All jobs complete \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/aggregated.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/aggregated.txt deleted file mode 100644 index 48b8531624..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/aggregated.txt +++ /dev/null @@ -1,4 +0,0 @@ -PERLIN_3 0.220371 -PERLIN_2 1.032522 -PERLIN_1 -0.137903 -STATE Positive \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/aggregator.stderr b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/aggregator.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/aggregator.stdout b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/aggregator.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/parameters.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/parameters.txt deleted file mode 100644 index 2e4f0f7b04..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/parameters.txt +++ /dev/null @@ -1,7 +0,0 @@ -PERLIN_PARAM:SCALE 0.971949 -PERLIN_PARAM:OFFSET 0.568165 -PERLIN_PARAM:PERSISTENCE 0.332226 -PERLIN_PARAM:OCTAVES 8.48231 -PERLIN_PARAM:PRIME_1 106.04 -PERLIN_PARAM:PRIME_2 17.4819 -PERLIN_PARAM:PRIME_3 56.9629 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/perlin.stderr b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/perlin.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/perlin.stdout b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/perlin.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/perlin_1.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/perlin_1.txt deleted file mode 100644 index 36798a3f53..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/perlin_1.txt +++ /dev/null @@ -1,100 +0,0 @@ --0.137903 --0.157851 --0.192276 --0.201670 --0.192839 --0.193214 --0.209423 --0.243628 --0.261796 --0.213269 --0.207591 --0.203993 --0.142490 --0.122206 --0.157129 --0.193732 --0.206432 --0.177612 --0.114381 --0.050740 --0.070342 --0.154469 --0.151716 --0.137877 --0.155888 --0.199095 --0.226091 --0.254674 --0.326284 --0.337833 --0.312344 --0.317023 --0.346853 --0.332528 --0.238504 --0.042655 -0.146262 -0.376535 -0.617211 -0.752626 -0.797129 -0.714055 -0.660213 -0.707589 -0.786058 -0.902157 -0.982988 -0.972517 -0.950945 -0.917937 -0.833802 -0.834170 -0.874761 -0.874663 -0.835114 -0.714452 -0.615202 -0.641686 -0.698232 -0.833272 -0.978281 -1.070483 -1.118218 -1.061277 -1.031902 -0.998036 -0.965574 -1.010296 -1.079127 -1.148032 -1.260956 -1.285149 -1.247059 -1.290888 -1.424147 -1.629905 -1.764537 -1.819917 -1.898802 -1.893787 -1.855403 -1.728917 -1.536779 -1.375375 -1.281240 -1.209446 -1.131790 -1.009449 -0.933443 -0.938227 -0.970148 -1.049769 -1.076923 -1.035402 -0.981504 -0.949433 -0.958861 -0.977078 -0.958006 -0.802606 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/perlin_2.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/perlin_2.txt deleted file mode 100644 index ba557199f4..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/perlin_2.txt +++ /dev/null @@ -1,100 +0,0 @@ -1.032522 -1.030645 -1.027589 -0.938300 -0.861544 -0.832993 -0.698715 -0.604825 -0.609257 -0.593477 -0.491201 -0.341277 -0.208709 -0.134035 -0.096478 -0.102808 -0.124913 -0.090875 -0.066149 --0.012408 --0.133850 --0.194818 --0.209263 --0.095881 -0.010749 -0.085326 -0.237955 -0.299167 -0.320499 -0.401893 -0.517178 -0.629623 -0.655076 -0.587512 -0.539387 -0.574432 -0.628337 -0.749487 -0.803470 -0.770847 -0.759350 -0.693500 -0.648396 -0.623356 -0.603426 -0.694348 -0.879540 -1.054584 -1.123458 -1.100816 -1.105500 -1.202947 -1.277420 -1.362982 -1.368734 -1.285116 -1.248007 -1.211633 -1.180222 -1.235564 -1.341232 -1.493206 -1.612131 -1.618121 -1.625000 -1.571745 -1.459633 -1.343551 -1.277370 -1.211264 -1.163383 -1.170426 -1.175448 -1.217470 -1.305274 -1.295011 -1.173072 -1.034382 -0.959745 -0.909275 -0.869084 -0.778851 -0.649645 -0.559430 -0.525067 -0.476432 -0.381578 -0.233781 -0.157416 -0.199901 -0.314752 -0.539386 -0.781042 -0.990634 -1.170137 -1.246885 -1.268126 -1.180015 -1.064679 -0.973186 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/perlin_3.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/perlin_3.txt deleted file mode 100644 index 2bb0cef781..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/perlin_3.txt +++ /dev/null @@ -1,100 +0,0 @@ -0.220371 -0.112328 --0.075019 --0.241588 --0.362184 --0.357721 --0.383737 --0.407682 --0.363864 --0.300312 --0.218883 --0.215292 --0.239019 --0.303964 --0.338894 --0.299746 --0.297421 --0.226239 --0.093147 -0.080922 -0.219209 -0.256359 -0.281152 -0.276463 -0.264202 -0.226745 -0.181221 -0.112178 -0.099345 -0.183186 -0.256603 -0.321784 -0.334316 -0.389554 -0.533441 -0.703395 -0.832970 -0.941402 -1.093683 -1.278960 -1.364377 -1.365686 -1.370013 -1.310389 -1.233846 -1.194933 -1.168762 -1.153961 -1.154271 -1.080648 -0.929681 -0.760549 -0.583628 -0.454406 -0.281967 -0.131086 -0.079608 -0.047894 -0.003413 -0.024170 -0.073226 -0.106088 -0.127928 -0.058349 -0.007387 -0.033465 -0.105058 -0.204991 -0.310151 -0.378775 -0.458521 -0.560881 -0.608623 -0.701672 -0.824709 -0.908902 -1.006640 -1.035850 -1.107446 -1.143986 -1.103046 -1.073115 -1.073421 -1.118115 -1.159422 -1.149846 -1.101513 -0.994839 -0.942165 -0.970280 -1.017869 -1.064312 -1.091185 -1.023493 -0.962306 -0.971791 -0.978662 -1.020211 -1.016806 -0.890728 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/perlin_fail.status b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/perlin_fail.status deleted file mode 100644 index 6ac0122a28..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/perlin_fail.status +++ /dev/null @@ -1 +0,0 @@ -Did nothing! \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/perlin_params.txt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/perlin_params.txt deleted file mode 100644 index c3e63c5f53..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/perlin_params.txt +++ /dev/null @@ -1,7 +0,0 @@ -SCALE:0.971949 -OFFSET:0.568165 -PERSISTENCE:0.332226 -OCTAVES:8.48231 -PRIME_1:106.04 -PRIME_2:17.4819 -PRIME_3:56.9629 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/realization.ok b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/realization.ok deleted file mode 100644 index a0aba9318a..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/Run/realisation-9/iter-0/realization.ok +++ /dev/null @@ -1 +0,0 @@ -OK \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/current_case b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/current_case deleted file mode 100644 index 331d858ce9..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/current_case +++ /dev/null @@ -1 +0,0 @@ -default \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/0001/files/PERLIN_active b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/0001/files/PERLIN_active deleted file mode 100644 index c72400474a..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/0001/files/PERLIN_active and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/0002/files/PERLIN_active b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/0002/files/PERLIN_active deleted file mode 100644 index c72400474a..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/0002/files/PERLIN_active and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/0003/files/PERLIN_active b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/0003/files/PERLIN_active deleted file mode 100644 index c72400474a..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/0003/files/PERLIN_active and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/FORECAST.data_0 deleted file mode 100644 index efbe7f58b3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/FORECAST.index deleted file mode 100644 index b0e9ebe688..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/PARAMETER.data_0 deleted file mode 100644 index a9c2968ca3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/PARAMETER.index deleted file mode 100644 index d16822022a..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_0/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/FORECAST.data_0 deleted file mode 100644 index de1d02fa33..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/FORECAST.index deleted file mode 100644 index fb519c3d53..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/PARAMETER.data_0 deleted file mode 100644 index 5e8b2f1b17..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/PARAMETER.index deleted file mode 100644 index 34f7beab32..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_1/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/FORECAST.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/PARAMETER.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_10/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/FORECAST.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/PARAMETER.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_11/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/FORECAST.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/PARAMETER.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_12/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/FORECAST.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/PARAMETER.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_13/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/FORECAST.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/PARAMETER.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_14/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/FORECAST.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/PARAMETER.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_15/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/FORECAST.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/PARAMETER.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_16/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/FORECAST.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/PARAMETER.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_17/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/FORECAST.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/PARAMETER.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_18/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/FORECAST.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/PARAMETER.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_19/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/FORECAST.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/PARAMETER.data_0 deleted file mode 100644 index b7b2db9ef2..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/PARAMETER.index deleted file mode 100644 index 6453ec00ca..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_2/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/FORECAST.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/PARAMETER.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_20/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/FORECAST.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/PARAMETER.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_21/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/FORECAST.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/PARAMETER.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_22/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/FORECAST.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/PARAMETER.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_23/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/FORECAST.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/PARAMETER.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_24/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/FORECAST.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/PARAMETER.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_25/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/FORECAST.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/PARAMETER.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_26/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/FORECAST.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/PARAMETER.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_27/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/FORECAST.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/PARAMETER.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_28/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/FORECAST.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/PARAMETER.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_29/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/FORECAST.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/PARAMETER.data_0 deleted file mode 100644 index 199393d8ef..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/PARAMETER.index deleted file mode 100644 index cd8301dcf3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_3/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/FORECAST.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/PARAMETER.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_30/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/FORECAST.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/PARAMETER.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_31/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/FORECAST.data_0 deleted file mode 100644 index 8b3a153a8a..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/FORECAST.index deleted file mode 100644 index b5a589b271..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/PARAMETER.data_0 deleted file mode 100644 index f02909a32a..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/PARAMETER.index deleted file mode 100644 index 8ebbf01df8..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_4/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/FORECAST.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/PARAMETER.data_0 deleted file mode 100644 index b5cb1eae3a..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/PARAMETER.index deleted file mode 100644 index 46988dc345..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_5/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/FORECAST.data_0 deleted file mode 100644 index 80f2a9aafd..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/FORECAST.index deleted file mode 100644 index 10ceee2c80..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/PARAMETER.data_0 deleted file mode 100644 index d6b1ac3e58..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/PARAMETER.index deleted file mode 100644 index a3ec21810e..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_6/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/FORECAST.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/PARAMETER.data_0 deleted file mode 100644 index 57a1b2511a..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/PARAMETER.index deleted file mode 100644 index 51cada30a8..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_7/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/FORECAST.data_0 deleted file mode 100644 index 24edf52b05..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/FORECAST.index deleted file mode 100644 index bf076ad1aa..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/PARAMETER.data_0 deleted file mode 100644 index 703bfe7edb..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/PARAMETER.index deleted file mode 100644 index 21f092b0c6..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_8/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/ANALYZED.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/FORECAST.data_0 deleted file mode 100644 index 83c5711b3d..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/FORECAST.index deleted file mode 100644 index fd35646b63..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/PARAMETER.data_0 deleted file mode 100644 index c78a769777..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/PARAMETER.index deleted file mode 100644 index a8013e439c..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/STATIC.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Ensemble/mod_9/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Index/INDEX.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Index/INDEX.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Index/INDEX.index b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Index/INDEX.index deleted file mode 100644 index 05ba4b90c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Index/INDEX.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Index/INDEX.mnt b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Index/INDEX.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/Index/INDEX.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/ert_fstab b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/ert_fstab deleted file mode 100644 index a5d67ad3a3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/ert_fstab and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/files/case_config b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/files/case_config deleted file mode 100644 index 593f4708db..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/files/case_config and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/files/custom_kw_config_set b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/files/custom_kw_config_set deleted file mode 100644 index b51c81a5bb..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/files/custom_kw_config_set and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/files/state-map b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/files/state-map deleted file mode 100644 index c37c4be56f..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/files/state-map and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/files/summary-key-set b/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/files/summary-key-set deleted file mode 100644 index 593f4708db..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/fail_storage/ertensemble/default/files/summary-key-set and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/jobs/AGGREGATOR b/ThirdParty/Ert/test-data/local/custom_kw/jobs/AGGREGATOR deleted file mode 100644 index f9571d60f9..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/jobs/AGGREGATOR +++ /dev/null @@ -1,4 +0,0 @@ -STDOUT aggregator.stdout -STDERR aggregator.stderr - -EXECUTABLE aggregator.py \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/jobs/PERLIN b/ThirdParty/Ert/test-data/local/custom_kw/jobs/PERLIN deleted file mode 100644 index fbf5c2ac87..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/jobs/PERLIN +++ /dev/null @@ -1,4 +0,0 @@ -STDOUT perlin.stdout -STDERR perlin.stderr - -EXECUTABLE perlin.py \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/jobs/PERLIN_FAIL b/ThirdParty/Ert/test-data/local/custom_kw/jobs/PERLIN_FAIL deleted file mode 100644 index f6da4542e8..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/jobs/PERLIN_FAIL +++ /dev/null @@ -1,3 +0,0 @@ -EXECUTABLE perlin_fail.py -TARGET_FILE perlin_fail.status -ARGLIST \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/jobs/REALIZATION_FAIL b/ThirdParty/Ert/test-data/local/custom_kw/jobs/REALIZATION_FAIL deleted file mode 100644 index 533677cf99..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/jobs/REALIZATION_FAIL +++ /dev/null @@ -1,3 +0,0 @@ -EXECUTABLE realization_fail.py -TARGET_FILE realization.ok -ARGLIST \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/jobs/aggregator.py b/ThirdParty/Ert/test-data/local/custom_kw/jobs/aggregator.py deleted file mode 100644 index 72561296f9..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/jobs/aggregator.py +++ /dev/null @@ -1,26 +0,0 @@ -#! /usr/bin/env python - -if __name__ == "__main__": - files = {"PERLIN_1": "perlin_1.txt", - "PERLIN_2": "perlin_2.txt", - "PERLIN_3": "perlin_3.txt"} - - with open("aggregated.txt", "w") as output_file: - sum_of_sum = 0.0 - for key in files: - sum = 0.0 - with open(files[key], "r") as input_file: - sum += float(input_file.readline()) - sum_of_sum += sum - output_file.write("%s %f\n" % (key, sum)) - - if sum_of_sum < 0: - state = "Negative" - elif abs(sum_of_sum) < 0.00000001: - state = "Zero" - else: - state = "Positive" - - output_file.write("STATE %s" % state) - - diff --git a/ThirdParty/Ert/test-data/local/custom_kw/jobs/perlin.py b/ThirdParty/Ert/test-data/local/custom_kw/jobs/perlin.py deleted file mode 100644 index 7cccc0d1f6..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/jobs/perlin.py +++ /dev/null @@ -1,176 +0,0 @@ -#! /usr/bin/env python -import math -import random - -PRIME_INDEX_1 = [49193,11887,23819,93983,28283,87179,74933,82561,29741,98453,72719,48193,66883,95071,12841,89603, - 49261,52529,57697,70321,54617,49363,41233,39883,35393,33149,37493,42989,58073,62507,99829,41999, - 44087,31907,10627,29231,57559,36809,17123,50593,38449,71317,38149,60637,10607,48677,23189,83701, - 78853,35617,28477,86117,46901,80819,89491,36097,54881,94781,20707,20011,69457,14593,49253,35257, - 14753,44851,10289,36097,62017,82723,10037,77551,89513,70429,30269,30703,77711,69313,20021,31657, - 33851,27749,85667,42793,47599,92789,97771,84551,61637,68659,93263,62201,42131,78823,17747,31183, - 89611,91009,76673,47051,94099,96757,90977,65141,46051,11093,19073,44633,27967,25171,41221,96223, - 88997,74941,49559,11909,11593,97369,55733,35869,55849,87931,81131,99023,76561,78977,48857,74717] - -PRIME_INDEX_2 = [7360349,1287757,3764759,5276833,2735671,7351777,7705903,2034551, - 2427493,3883639,4260859,6814097,3226933,2648249,4458793,8015303, - 2323733,7991233,5560879,9826913,3634811,3746299,1051543,2954789, - 7874983,9380681,4577789,4306829,6714599,8395733,2718493,1429867, - 5675147,6104573,3118727,2657243,9750043,1853377,9441353,7247969, - 7669553,5334157,9376649,9518137,9368297,3912679,3230237,7291939, - 1361677,1034167,4998089,1178239,5160677,6130199,8056553,8527361, - 4261093,8640553,5553391,6024797,7275019,7245019,7661483,5120033, - 4388117,5941147,7682189,9303467,7165777,1509163,5223929,9696487, - 8012383,6254273,1400731,9958177,7733573,1498993,1553467,4791257, - 4524521,7048633,3630821,7931179,2341457,6432269,9597703,4338011, - 6665059,7911653,8384317,2230531,7904621,1633559,9096533,6873301, - 2717821,5897977,3608543,2248243,3174599,8634233,4028963,6435001, - 6611399,3250469,4046353,1429943,8552111,1970261,1045043,9552523, - 6993799,6141467,5723479,9578867,9233299,7224641,3165023,4583899, - 3905861,1633993,5013137,5092613,2197163,7732213,6559019,2538499] - -PRIME_INDEX_3 = [1368916889,3054015583,6066123341,8673964289,9002483141,7187080993,5319345529,6961795349, - 1653814157,3416288497,6454122317,2480898239,3878100221,5956454227,9767569853,5981528503, - 4962084931,4489312199,3013312061,9818685161,4061204663,1816202221,7567463471,9839749459, - 3993070667,5872839331,9256050443,4854483611,4876755749,3823459247,6244209637,4199084081, - 6053970359,1093521049,7385602219,7289318273,9333908789,9701161343,8139801689,5013046681, - 4094649187,2372669671,9010267157,4298511787,7575340187,9252205969,5923706413,7112626819, - 6531270523,8379490583,4521945149,6804302789,6984132251,9173492033,1657527653,1532523367, - 3132088123,5910371431,7551540169,1643193353,6127000571,2637510193,7904761379,2954227033, - 7344843263,8077648457,9397237879,6775740173,1950824101,1152859999,2990299673,8197021109, - 2184824123,4309539167,1742841137,9113517421,4752058561,5594292329,9565022153,8519292151, - 6553311239,5204301593,8405487593,1987918357,3175759277,5659428917,6611421781,8765753053, - 3781235599,5651365571,8399394649,3867050417,3258145379,9836441977,2499690049,2742615479, - 7720787857,6135275183,9580731373,1860360379,2879750459,4302251633,8019104719,3889658671, - 7242891343,2516043583,8081336113,7718332591,4940550151,2216825899,7387662781,5562762407, - 2486416781,9111045257,1197705721,6649659239,6110149477,4548595937,3169540631,8993669479, - 6444114251,3098519969,1609592407,5803463207,8385117647,3056488453,1046337653,8165632597] - -class PerlinNoise(object): - - def __init__(self, persistence=0.5, number_of_octaves=4, prime_1=15731, prime_2=789221, prime_3=1376312589): - self.persistence = persistence - self.number_of_octaves = number_of_octaves - self.prime_1 = prime_1 - self.prime_2 = prime_2 - self.prime_3 = prime_3 - - - def cosineInterpolation(self, a, b, x): - ft = x * 3.1415927 - f = (1.0 - math.cos(ft)) * 0.5 - return a * (1 - f) + b * f - - - def noise(self, x): - x = (x << 13) ^ x - return 1.0 - ((x * (x * x + self.prime_1 + self.prime_2) + self.prime_3) & 0x7fffffff) / 1073741824.0 - - - def smoothedNoise(self, x): - return self.noise(x) / 2.0 + self.noise(x - 1) / 4.0 + self.noise(x + 1) / 4.0 - - - def interpolatedNoise(self, x): - int_x = int(x) - frac_x = x - int_x - - v1 = self.smoothedNoise(int_x) - v2 = self.smoothedNoise(int_x + 1) - - return self.cosineInterpolation(v1, v2, frac_x) - - - def perlinNoise1D(self, x): - total = 0.0 - - for octave in range(self.number_of_octaves - 1): - frequency = math.pow(2, octave) - amplitude = math.pow(self.persistence, octave) - - total += self.interpolatedNoise(x * frequency) * amplitude - - return total - - - @staticmethod - def isPrime(num): - for j in range(2, int(math.sqrt(num) + 1)): - if (num % j) == 0: - return False - return True - - @staticmethod - def createPrime(digits=10): - done = False - low = int("1" + "0" * (digits - 1)) - high = int("9" * digits) - - if low == 1: - low = 2 - - while not done: - num = random.randint(low, high) - if PerlinNoise.isPrime(num): - return num - - -def createObservationFile(report_step, observation, count, std=0.2): - with open("perlin_obs_%d.txt" % report_step, "w") as f: - - for index in range(count): - x = index / 8.0 - f.write("%f %f\n" % (observation.perlinNoise1D(x), std)) - - - -def readParameters(filename): - params = {} - with open(filename, "r") as f: - for line in f: - key, value = line.split(":", 1) - params[key] = float(value) - - return params - - -if __name__ == "__main__": - count = 100 - - # primes = [] - # for p in range(128): - # primes.append(str(PerlinNoise.createPrime(7))) - # - # print(",".join(primes)) - - observations = {1: PerlinNoise(prime_1=15731, prime_2=789221, prime_3=1376312589), - 2: PerlinNoise(prime_1=8831, prime_2=1300237, prime_3=32416187567), - 3: PerlinNoise(prime_1=10657, prime_2=105767, prime_3=2902956923)} - - for report_step in observations: - observation = observations[report_step] - # createObservationFile(report_step, observation, count) - - params = readParameters("perlin_params.txt") - - scale = params["SCALE"] - offset = params["OFFSET"] - octaves = int(round(params["OCTAVES"])) - persistence = params["PERSISTENCE"] - p1_index = int(round(params["PRIME_1"])) - p2_index = int(round(params["PRIME_2"])) - p3_index = int(round(params["PRIME_3"])) - - with open("perlin_%d.txt" % report_step, "w") as f: - P1 = PRIME_INDEX_1[p1_index] - P2 = PRIME_INDEX_2[p2_index] - P3 = PRIME_INDEX_3[p3_index] - # P1 = PerlinNoise.createPrime() - # P2 = PerlinNoise.createPrime() - # P3 = PerlinNoise.createPrime() - report_step_noise = PerlinNoise(persistence=persistence, number_of_octaves=octaves, prime_1=P1, prime_2=P2, prime_3=P3) - - for i in range(count): - x = i / 8.0 - obs = observation.perlinNoise1D(x) - noise = report_step_noise.perlinNoise1D(x) - f.write("%f\n" % (obs + offset + noise * scale)) diff --git a/ThirdParty/Ert/test-data/local/custom_kw/jobs/perlin_fail.py b/ThirdParty/Ert/test-data/local/custom_kw/jobs/perlin_fail.py deleted file mode 100644 index fed238f4b2..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/jobs/perlin_fail.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env python -import os -import sys - -iens = None -if len(sys.argv) > 1: - iens = int(sys.argv[1]) - -numbers = [1, 2, 3, 4, 5, 6] -if iens in numbers: - random_report_step = (numbers.index(iens) % 3) + 1 - os.remove("perlin_%d.txt" % random_report_step) - - with open("perlin_fail.status", "w") as f: - f.write("Deleted report step: %d" % random_report_step) - -else: - with open("perlin_fail.status", "w") as f: - f.write("Did nothing!") - - diff --git a/ThirdParty/Ert/test-data/local/custom_kw/jobs/realization_fail.py b/ThirdParty/Ert/test-data/local/custom_kw/jobs/realization_fail.py deleted file mode 100644 index 33a16ae523..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/jobs/realization_fail.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python -import sys - -iens = None -if len(sys.argv) > 1: - iens = int(sys.argv[1]) - -if iens is None or not iens in [2, 3, 5, 7]: - with open("realization.ok", "w") as f: - f.write("OK") - diff --git a/ThirdParty/Ert/test-data/local/custom_kw/mini_config b/ThirdParty/Ert/test-data/local/custom_kw/mini_config deleted file mode 100644 index 630ad828c4..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/mini_config +++ /dev/null @@ -1,40 +0,0 @@ -QUEUE_SYSTEM LOCAL -DBASE_TYPE BLOCK_FS - -JOBNAME MINI_%d - -DEFINE storage - -NUM_REALIZATIONS 10 - -STORE_SEED RandomSeed -LOAD_SEED RandomSeed - -RUNPATH /Run/realisation-%d/iter-%d -ENSPATH /ertensemble - -INSTALL_JOB AGGREGATOR jobs/AGGREGATOR -INSTALL_JOB PERLIN jobs/PERLIN - -FORWARD_MODEL PERLIN -FORWARD_MODEL AGGREGATOR - -TIME_MAP time_map -GEN_KW PERLIN_PARAM Template/PERLIN_TEMPLATE perlin_params.txt Parameters/PERLIN_PARAMS.txt -GEN_DATA PERLIN INPUT_FORMAT:ASCII RESULT_FILE:perlin_%d.txt REPORT_STEPS:1,2,3 - -UPDATE_RESULTS TRUE - -ENKF_MERGE_OBSERVATIONS TRUE - -LOG_LEVEL 3 -LOG_FILE log/log.txt -UPDATE_LOG_PATH log/UP - -DATA_KW CSV_OUTPUT_PATH custom_output.csv - -OBS_CONFIG Observations/observations - -CUSTOM_KW AGGREGATED aggregated.txt aggregated_out.txt - -GRID Refcase/CASE.EGRID \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/mini_fail_config b/ThirdParty/Ert/test-data/local/custom_kw/mini_fail_config deleted file mode 100644 index 2c45bc5eed..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/mini_fail_config +++ /dev/null @@ -1,43 +0,0 @@ -QUEUE_SYSTEM LOCAL -DBASE_TYPE BLOCK_FS - -JOBNAME MINI_FAIL_%d - -DEFINE fail_storage - -NUM_REALIZATIONS 10 -MAX_SUBMIT 1 - -STORE_SEED RandomSeed -LOAD_SEED RandomSeed - -RUNPATH /Run/realisation-%d/iter-%d -ENSPATH /ertensemble - -INSTALL_JOB AGGREGATOR jobs/AGGREGATOR -INSTALL_JOB PERLIN jobs/PERLIN -INSTALL_JOB PERLIN_FAIL jobs/PERLIN_FAIL -INSTALL_JOB REALIZATION_FAIL jobs/REALIZATION_FAIL - -FORWARD_MODEL PERLIN -FORWARD_MODEL AGGREGATOR -FORWARD_MODEL PERLIN_FAIL -FORWARD_MODEL REALIZATION_FAIL - -TIME_MAP time_map -GEN_KW PERLIN_PARAM Template/PERLIN_TEMPLATE perlin_params.txt Parameters/PERLIN_PARAMS.txt -GEN_DATA PERLIN INPUT_FORMAT:ASCII RESULT_FILE:perlin_%d.txt REPORT_STEPS:1,2,3 - -UPDATE_RESULTS TRUE - -ENKF_MERGE_OBSERVATIONS TRUE - -LOG_LEVEL 3 -LOG_FILE log/fail_log.txt -UPDATE_LOG_PATH log/UP - -DATA_KW CSV_OUTPUT_PATH custom_output.csv - -OBS_CONFIG Observations/observations - -CUSTOM_KW AGGREGATED aggregated.txt aggregated_out.txt diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/OK b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/OK deleted file mode 100644 index 9590cb949c..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/OK +++ /dev/null @@ -1 +0,0 @@ -All jobs complete \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/aggregated.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/aggregated.txt deleted file mode 100644 index de8aedc562..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/aggregated.txt +++ /dev/null @@ -1,4 +0,0 @@ -PERLIN_3 0.190479 -PERLIN_2 1.002630 -PERLIN_1 -0.167794 -STATE Positive \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/aggregator.stderr b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/aggregator.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/aggregator.stdout b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/aggregator.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/parameters.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/parameters.txt deleted file mode 100644 index 142dbecaab..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/parameters.txt +++ /dev/null @@ -1,7 +0,0 @@ -PERLIN_PARAM:SCALE 0.249225 -PERLIN_PARAM:OFFSET 0.185709 -PERLIN_PARAM:PERSISTENCE 0.936132 -PERLIN_PARAM:OCTAVES 22.4008 -PERLIN_PARAM:PRIME_1 70.2373 -PERLIN_PARAM:PRIME_2 73.2881 -PERLIN_PARAM:PRIME_3 73.2557 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/perlin.stderr b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/perlin.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/perlin.stdout b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/perlin.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/perlin_1.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/perlin_1.txt deleted file mode 100644 index fec0fd107e..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/perlin_1.txt +++ /dev/null @@ -1,100 +0,0 @@ --0.167794 --0.533157 --0.582564 --0.581187 --0.544394 --0.617389 --0.471483 --0.570636 --0.513164 --0.094431 --0.489078 --0.363713 --0.116233 -0.104267 --0.185805 --0.200709 --0.150918 --0.384297 -0.293484 -0.122875 --0.157933 -0.066183 -0.043334 -0.083941 -0.237257 -0.510188 -0.247252 -0.238908 --0.087547 --0.330292 --0.126747 --0.035823 --0.234230 -0.031125 --0.470002 -0.277528 -0.333005 -0.208194 -0.329248 -0.183316 -0.030305 -0.292607 -0.207885 --0.055542 -0.267287 -0.489294 -0.351695 -0.473816 -0.486845 -0.161185 -0.750709 -0.334430 -0.487895 --0.083531 -0.631333 -0.189402 -0.293179 -0.416287 -0.071861 -0.343657 -0.530727 -0.295893 -0.707495 -0.705177 -0.364062 --0.028729 -0.627459 -0.665644 -0.110239 -0.074890 -0.898952 -0.507702 -0.793900 -0.376955 -0.740932 -0.768612 -1.072116 -0.641052 -0.951385 -1.114482 -0.779685 -1.030575 -0.960609 -0.819774 -0.728183 -0.880717 -0.390042 -0.616292 -0.534190 -0.332035 -0.597337 -0.310784 -0.480825 -0.510514 -0.527712 -0.106739 -0.459289 -0.091994 -0.167754 -0.291767 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/perlin_2.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/perlin_2.txt deleted file mode 100644 index a4c8ae2281..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/perlin_2.txt +++ /dev/null @@ -1,100 +0,0 @@ -1.002630 -0.655338 -0.637300 -0.558783 -0.509989 -0.408818 -0.436655 -0.277816 -0.357889 -0.712315 -0.209713 -0.181557 -0.234966 -0.360507 -0.067803 -0.095832 -0.180428 --0.115810 -0.474014 -0.161206 --0.221441 -0.025834 --0.014213 -0.125937 -0.403895 -0.794609 -0.711298 -0.792749 -0.559236 -0.409434 -0.702774 -0.910823 -0.767699 -0.951166 -0.307889 -0.894615 -0.815080 -0.581146 -0.515508 -0.201538 --0.007474 -0.272051 -0.196068 --0.139775 -0.084654 -0.281485 -0.248246 -0.555883 -0.659358 -0.344063 -1.022407 -0.703206 -0.890554 -0.404788 -1.164953 -0.760065 -0.925984 -0.986234 -0.553851 -0.745948 -0.893678 -0.718616 -1.201408 -1.262021 -0.957160 -0.544980 -1.121517 -0.998898 -0.308482 -0.138122 -0.801380 -0.392979 -0.722289 -0.303537 -0.622059 -0.433718 -0.480651 --0.144483 -0.012328 -0.129970 --0.206634 -0.080509 -0.073475 -0.003830 --0.027990 -0.147703 --0.360170 --0.159376 --0.241837 --0.406290 --0.058059 --0.199599 -0.184944 -0.465746 -0.716346 -0.404191 -0.768554 -0.294930 -0.274427 -0.462347 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/perlin_3.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/perlin_3.txt deleted file mode 100644 index 13a10a9e5d..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/perlin_3.txt +++ /dev/null @@ -1,100 +0,0 @@ -0.190479 --0.262978 --0.465308 --0.621105 --0.713738 --0.781896 --0.645797 --0.734690 --0.615233 --0.181474 --0.500371 --0.375013 --0.212762 --0.077491 --0.367569 --0.306723 --0.241907 --0.432924 -0.314717 -0.254536 -0.131618 -0.477011 -0.476202 -0.498281 -0.657347 -0.936028 -0.654565 -0.605760 -0.338082 -0.190727 -0.442199 -0.602984 -0.446939 -0.753207 -0.301943 -1.023577 -1.019714 -0.773061 -0.805721 -0.709651 -0.597553 -0.944238 -0.917685 -0.547257 -0.715075 -0.782070 -0.537469 -0.655260 -0.690172 -0.323895 -0.846589 -0.260808 -0.196762 --0.503788 -0.078186 --0.393964 --0.242415 --0.177505 --0.622958 --0.465445 --0.374328 --0.668502 --0.282796 --0.297752 --0.660453 --0.993300 --0.233057 --0.139662 --0.658737 --0.694367 -0.096517 --0.216566 -0.155464 --0.212261 -0.141495 -0.047609 -0.314219 --0.143014 -0.160029 -0.364682 -0.027328 -0.374773 -0.497251 -0.562515 -0.606365 -0.821117 -0.359765 -0.601682 -0.542912 -0.364089 -0.645058 -0.325327 -0.495087 -0.498606 -0.508514 -0.129097 -0.479090 -0.135126 -0.226554 -0.379889 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/perlin_params.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/perlin_params.txt deleted file mode 100644 index 99b2ec3ff6..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-0/iter-0/perlin_params.txt +++ /dev/null @@ -1,7 +0,0 @@ -SCALE:0.249225 -OFFSET:0.185709 -PERSISTENCE:0.936132 -OCTAVES:22.4008 -PRIME_1:70.2373 -PRIME_2:73.2881 -PRIME_3:73.2557 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/OK b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/OK deleted file mode 100644 index 9590cb949c..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/OK +++ /dev/null @@ -1 +0,0 @@ -All jobs complete \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/aggregated.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/aggregated.txt deleted file mode 100644 index c42ebc2573..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/aggregated.txt +++ /dev/null @@ -1,4 +0,0 @@ -PERLIN_3 -0.584204 -PERLIN_2 0.227947 -PERLIN_1 -0.942477 -STATE Negative \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/aggregator.stderr b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/aggregator.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/aggregator.stdout b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/aggregator.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/parameters.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/parameters.txt deleted file mode 100644 index d931876083..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/parameters.txt +++ /dev/null @@ -1,7 +0,0 @@ -PERLIN_PARAM:SCALE 0.24275 -PERLIN_PARAM:OFFSET -0.29096 -PERLIN_PARAM:PERSISTENCE 0.860518 -PERLIN_PARAM:OCTAVES 14.7858 -PERLIN_PARAM:PRIME_1 11.8217 -PERLIN_PARAM:PRIME_2 48.9187 -PERLIN_PARAM:PRIME_3 89.5122 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/perlin.stderr b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/perlin.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/perlin.stdout b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/perlin.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/perlin_1.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/perlin_1.txt deleted file mode 100644 index 20e4b55793..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/perlin_1.txt +++ /dev/null @@ -1,100 +0,0 @@ --0.942477 --0.727071 --0.723611 --0.754719 --0.671417 --0.731608 --0.692600 --0.493644 --0.676412 --0.745697 --0.692443 --0.578927 --0.488710 --0.308417 --0.198633 --0.292521 --0.451160 --0.454948 --0.565726 --0.325299 --0.477437 --0.393874 --0.366932 --0.181596 --0.382861 --0.214575 --0.343829 --0.226514 --0.320776 --0.308425 --0.487588 --0.395820 --0.742008 --0.527934 --0.774032 --0.603036 --0.837021 --0.456712 --0.387980 --0.390885 --0.477976 --0.396114 --0.440335 --0.294043 --0.320108 --0.019041 --0.013591 --0.252420 --0.275822 --0.164093 --0.136841 --0.069380 --0.145731 --0.021543 -0.105226 -0.109063 -0.010749 -0.174611 -0.235996 -0.229778 -0.234829 -0.303725 -0.413435 -0.191701 --0.016101 -0.137470 -0.169930 --0.099989 --0.129193 --0.110471 -0.042198 --0.048338 --0.349474 --0.098213 -0.162561 -0.313852 -0.400474 -0.538012 -0.475773 -0.571507 -0.342028 -0.299233 -0.316542 -0.349001 -0.187998 -0.323078 -0.237231 -0.120016 --0.054434 --0.139747 -0.160315 --0.006853 -0.136442 -0.070848 --0.273561 --0.222518 --0.288468 --0.046234 --0.175744 --0.151171 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/perlin_2.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/perlin_2.txt deleted file mode 100644 index 296be5b8cd..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/perlin_2.txt +++ /dev/null @@ -1,100 +0,0 @@ -0.227947 -0.461424 -0.496254 -0.385250 -0.382965 -0.294599 -0.215538 -0.354808 -0.194641 -0.061050 -0.006348 --0.033658 --0.137511 --0.052176 -0.054974 -0.004020 --0.119814 --0.186461 --0.385196 --0.286967 --0.540945 --0.434223 --0.424480 --0.139600 --0.216224 -0.069846 -0.120217 -0.327327 -0.326008 -0.431300 -0.341933 -0.550826 -0.259922 -0.392107 -0.003858 -0.014051 --0.354946 --0.083760 --0.201720 --0.372664 --0.515754 --0.416670 --0.452153 --0.378276 --0.502741 --0.226850 --0.117039 --0.170353 --0.103309 -0.018785 -0.134857 -0.299396 -0.256928 -0.466775 -0.638846 -0.679726 -0.643554 -0.744558 -0.717986 -0.632070 -0.597780 -0.726447 -0.907347 -0.748545 -0.576996 -0.711178 -0.663988 -0.233265 -0.069050 --0.047240 --0.055375 --0.163060 --0.421085 --0.171631 -0.043688 --0.021042 --0.190991 --0.247524 --0.463284 --0.413005 --0.644291 --0.650833 --0.570592 --0.466943 --0.568175 --0.409936 --0.512981 --0.655652 --0.830461 --0.878072 --0.495081 --0.517236 --0.159439 -0.026080 --0.084928 -0.074934 -0.020797 -0.156703 --0.069071 -0.019410 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/perlin_3.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/perlin_3.txt deleted file mode 100644 index d43e140291..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/perlin_3.txt +++ /dev/null @@ -1,100 +0,0 @@ --0.584204 --0.456892 --0.606354 --0.794637 --0.840762 --0.896115 --0.866915 --0.657698 --0.778480 --0.832740 --0.703736 --0.590227 --0.585239 --0.490175 --0.380398 --0.398535 --0.542149 --0.503575 --0.544492 --0.193638 --0.187886 -0.016954 -0.065935 -0.232744 -0.037229 -0.211265 -0.063484 -0.140338 -0.104854 -0.212594 -0.081358 -0.242987 --0.060839 -0.194148 --0.002088 -0.143014 --0.150313 -0.108155 -0.088492 -0.135449 -0.089272 -0.255517 -0.269465 -0.308757 -0.127679 -0.273734 -0.172184 --0.070976 --0.072495 --0.001383 --0.040962 --0.143002 --0.436864 --0.441800 --0.447921 --0.474303 --0.524845 --0.419181 --0.458823 --0.579324 --0.670226 --0.660671 --0.576856 --0.811227 --1.040616 --0.827102 --0.690587 --0.905295 --0.898169 --0.879729 --0.760237 --0.772606 --0.987910 --0.687429 --0.436876 --0.407151 --0.357423 --0.246055 --0.315583 --0.178294 --0.410329 --0.356569 --0.146816 -0.091742 -0.066180 -0.263478 -0.206954 -0.105406 --0.045712 --0.107693 -0.208035 -0.007690 -0.150704 -0.058939 --0.292759 --0.200161 --0.268667 --0.003101 --0.116944 --0.063049 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/perlin_params.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/perlin_params.txt deleted file mode 100644 index fb78e8c3e9..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-1/iter-0/perlin_params.txt +++ /dev/null @@ -1,7 +0,0 @@ -SCALE:0.24275 -OFFSET:-0.29096 -PERSISTENCE:0.860518 -OCTAVES:14.7858 -PRIME_1:11.8217 -PRIME_2:48.9187 -PRIME_3:89.5122 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/OK b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/OK deleted file mode 100644 index 9590cb949c..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/OK +++ /dev/null @@ -1 +0,0 @@ -All jobs complete \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/aggregated.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/aggregated.txt deleted file mode 100644 index 39c71d12aa..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/aggregated.txt +++ /dev/null @@ -1,4 +0,0 @@ -PERLIN_3 -0.294383 -PERLIN_2 0.517768 -PERLIN_1 -0.652656 -STATE Negative \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/aggregator.stderr b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/aggregator.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/aggregator.stdout b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/aggregator.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/parameters.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/parameters.txt deleted file mode 100644 index 0850de9c61..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/parameters.txt +++ /dev/null @@ -1,7 +0,0 @@ -PERLIN_PARAM:SCALE 0.187883 -PERLIN_PARAM:OFFSET -0.512383 -PERLIN_PARAM:PERSISTENCE 0.850056 -PERLIN_PARAM:OCTAVES 39.9199 -PERLIN_PARAM:PRIME_1 76.7337 -PERLIN_PARAM:PRIME_2 54.1086 -PERLIN_PARAM:PRIME_3 16.0042 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/perlin.stderr b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/perlin.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/perlin.stdout b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/perlin.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/perlin_1.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/perlin_1.txt deleted file mode 100644 index 122d4089ea..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/perlin_1.txt +++ /dev/null @@ -1,100 +0,0 @@ --0.652656 --0.856575 --0.907574 --0.921559 --0.907052 --0.798535 --0.892001 --0.898300 --0.932647 --0.887530 --0.745258 --0.774438 --0.680597 --0.707552 --0.616984 --0.784930 --0.705796 --0.672207 --0.677662 --0.517634 --0.460960 --0.512998 --0.485822 --0.377630 --0.469687 --0.463782 --0.644529 --0.631042 --0.610238 --0.645129 --0.841183 --0.813056 --0.824549 --0.985474 --0.818724 --1.021755 --0.749654 --0.643111 --0.382287 --0.319701 --0.240893 --0.293783 --0.356379 --0.315861 --0.243741 --0.061641 --0.016073 --0.078540 --0.166452 --0.204278 --0.206156 --0.339674 --0.324650 --0.218586 --0.220018 --0.365619 --0.213129 --0.161173 --0.144854 --0.088350 --0.193806 --0.111286 --0.100984 --0.235155 --0.165413 --0.278588 --0.429381 --0.254946 --0.240835 --0.227267 --0.524615 --0.423858 --0.341032 --0.369948 --0.180422 -0.176827 -0.282667 -0.455645 -0.421888 -0.461117 -0.478802 -0.408361 -0.301001 -0.266791 -0.167743 -0.066362 -0.101881 -0.183729 --0.037895 -0.191528 -0.077918 -0.193353 -0.109073 -0.001759 --0.061599 --0.001108 --0.164077 --0.253534 --0.200586 --0.275259 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/perlin_2.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/perlin_2.txt deleted file mode 100644 index 6e35f0db00..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/perlin_2.txt +++ /dev/null @@ -1,100 +0,0 @@ -0.517768 -0.331920 -0.312291 -0.218411 -0.147331 -0.227672 -0.016137 --0.049848 --0.061594 --0.080783 --0.046467 --0.229168 --0.329398 --0.451311 --0.363377 --0.488389 --0.374451 --0.403720 --0.497132 --0.479302 --0.524469 --0.553347 --0.543370 --0.335634 --0.303049 --0.179361 --0.180483 --0.077200 -0.036546 -0.094596 --0.011662 -0.133590 -0.177380 --0.065433 --0.040833 --0.404669 --0.267578 --0.270158 --0.196027 --0.301479 --0.278672 --0.314339 --0.368196 --0.400094 --0.426374 --0.269450 --0.119522 -0.003527 -0.006061 --0.021400 -0.065542 -0.029102 -0.078009 -0.269733 -0.313603 -0.205045 -0.419677 -0.408773 -0.337136 -0.313942 -0.169145 -0.311436 -0.392928 -0.321689 -0.427685 -0.295121 -0.064678 -0.078309 --0.042592 --0.164036 --0.622187 --0.538581 --0.412642 --0.443366 --0.299295 --0.158067 --0.308798 --0.329891 --0.517169 --0.523395 --0.507517 --0.541705 --0.586134 --0.549153 --0.588430 --0.666651 --0.648330 --0.591939 --0.813922 --0.546797 --0.577477 --0.317029 --0.186808 --0.043009 -0.127034 -0.296344 -0.145188 --0.050597 --0.093913 --0.104679 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/perlin_3.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/perlin_3.txt deleted file mode 100644 index 1e03faf793..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/perlin_3.txt +++ /dev/null @@ -1,100 +0,0 @@ --0.294383 --0.586396 --0.790317 --0.961476 --1.076396 --0.963042 --1.066316 --1.062354 --1.034715 --0.974573 --0.756551 --0.785737 --0.777126 --0.889310 --0.798749 --0.890944 --0.796785 --0.720834 --0.656429 --0.385973 --0.171410 --0.102170 --0.052955 -0.036709 --0.049597 --0.037941 --0.237216 --0.264190 --0.184608 --0.124110 --0.272236 --0.174249 --0.143380 --0.263391 --0.046779 --0.275706 --0.062945 --0.078243 -0.094185 -0.206634 -0.326354 -0.357848 -0.353421 -0.286938 -0.204047 -0.231135 -0.169701 -0.102903 -0.036875 --0.041568 --0.110276 --0.413296 --0.615784 --0.638843 --0.773164 --0.948985 --0.748723 --0.754966 --0.839672 --0.897452 --1.098861 --1.075682 --1.091275 --1.238084 --1.189928 --1.243159 --1.289897 --1.060251 --1.009811 --0.996525 --1.327050 --1.148126 --0.979468 --0.959163 --0.779859 --0.544176 --0.475229 --0.328422 --0.369468 --0.288684 --0.273556 --0.247441 --0.162358 -0.009532 -0.045926 -0.006763 -0.071604 -0.169119 --0.029173 -0.223582 -0.125639 -0.207896 -0.123334 --0.010150 --0.080797 -0.021249 --0.144276 --0.210401 --0.141786 --0.187137 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/perlin_params.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/perlin_params.txt deleted file mode 100644 index a069d36ab8..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-2/iter-0/perlin_params.txt +++ /dev/null @@ -1,7 +0,0 @@ -SCALE:0.187883 -OFFSET:-0.512383 -PERSISTENCE:0.850056 -OCTAVES:39.9199 -PRIME_1:76.7337 -PRIME_2:54.1086 -PRIME_3:16.0042 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/OK b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/OK deleted file mode 100644 index 9590cb949c..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/OK +++ /dev/null @@ -1 +0,0 @@ -All jobs complete \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/aggregated.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/aggregated.txt deleted file mode 100644 index b986f1b481..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/aggregated.txt +++ /dev/null @@ -1,4 +0,0 @@ -PERLIN_3 -0.871387 -PERLIN_2 -0.059236 -PERLIN_1 -1.229660 -STATE Negative \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/aggregator.stderr b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/aggregator.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/aggregator.stdout b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/aggregator.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/parameters.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/parameters.txt deleted file mode 100644 index a7472afccf..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/parameters.txt +++ /dev/null @@ -1,7 +0,0 @@ -PERLIN_PARAM:SCALE 0.542054 -PERLIN_PARAM:OFFSET -0.936072 -PERLIN_PARAM:PERSISTENCE 0.66513 -PERLIN_PARAM:OCTAVES 59.6891 -PERLIN_PARAM:PRIME_1 58.3958 -PERLIN_PARAM:PRIME_2 51.6271 -PERLIN_PARAM:PRIME_3 37.3286 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/perlin.stderr b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/perlin.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/perlin.stdout b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/perlin.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/perlin_1.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/perlin_1.txt deleted file mode 100644 index 1f0aabd193..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/perlin_1.txt +++ /dev/null @@ -1,100 +0,0 @@ --1.229660 --1.403213 --1.494882 --1.481222 --1.545058 --1.605346 --1.466829 --1.460689 --1.589462 --1.462504 --1.586371 --1.419953 --1.184666 --1.064367 --1.081730 --1.130531 --1.307146 --1.330892 --1.147255 --1.230522 --1.290812 --1.243312 --1.053225 --0.837831 --0.815416 --0.794856 --0.780118 --0.867346 --0.868595 --0.844661 --0.949974 --1.135521 --1.278698 --1.237066 --1.353473 --1.274754 --1.024540 --1.062374 --1.018191 --0.989482 --1.082235 --1.083477 --1.111900 --0.884140 --0.804378 --0.649785 --0.414051 --0.453314 --0.426393 --0.376335 --0.433952 --0.369796 --0.319725 --0.318209 --0.380495 --0.274543 --0.410077 --0.265464 --0.276032 --0.293185 --0.259478 --0.307654 --0.469020 --0.606702 --0.727993 --0.657698 --0.738949 --0.779068 --0.929409 --0.925120 --0.888902 --0.818882 --0.691387 --0.806321 --0.774223 --0.725947 --0.616177 --0.575377 --0.546778 --0.619225 --0.739783 --0.805058 --0.854443 --1.003113 --0.978222 --0.724971 --0.804323 --0.920953 --0.973738 --0.936418 --0.905518 --0.717744 --0.616881 --0.785126 --0.782606 --0.680625 --0.739233 --0.708171 --0.640854 --0.813288 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/perlin_2.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/perlin_2.txt deleted file mode 100644 index 58ac16bef2..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/perlin_2.txt +++ /dev/null @@ -1,100 +0,0 @@ --0.059236 --0.214718 --0.275017 --0.341253 --0.490676 --0.579139 --0.558691 --0.612236 --0.718408 --0.655757 --0.887580 --0.874683 --0.833466 --0.808127 --0.828123 --0.833990 --0.975800 --1.062405 --0.966725 --1.192190 --1.354320 --1.283661 --1.110772 --0.795835 --0.648779 --0.510435 --0.316072 --0.313505 --0.221812 --0.104936 --0.120453 --0.188875 --0.276769 --0.317026 --0.575582 --0.657667 --0.542465 --0.689421 --0.831931 --0.971260 --1.120014 --1.104033 --1.123718 --0.968373 --0.987011 --0.857594 --0.517499 --0.371248 --0.253880 --0.193457 --0.162254 --0.001019 -0.082934 -0.170110 -0.153126 -0.296120 -0.222728 -0.304483 -0.205958 -0.109107 -0.103474 -0.115069 -0.024892 --0.049858 --0.134896 --0.083989 --0.244890 --0.445814 --0.731166 --0.861888 --0.986474 --0.933604 --0.762998 --0.879739 --0.893096 --1.060842 --1.207642 --1.360912 --1.485835 --1.603737 --1.726102 --1.755124 --1.741578 --1.819057 --1.734395 --1.457985 --1.554534 --1.696621 --1.749765 --1.674743 --1.560913 --1.228126 --0.912762 --0.829894 --0.593973 --0.383174 --0.429968 --0.505235 --0.534181 --0.642708 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/perlin_3.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/perlin_3.txt deleted file mode 100644 index 3e28703234..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/perlin_3.txt +++ /dev/null @@ -1,100 +0,0 @@ --0.871387 --1.133034 --1.377625 --1.521140 --1.714403 --1.769853 --1.641143 --1.624743 --1.691530 --1.549547 --1.597664 --1.431252 --1.281194 --1.246125 --1.263495 --1.236545 --1.398135 --1.379519 --1.126021 --1.098861 --1.001261 --0.832484 --0.620357 --0.423492 --0.395326 --0.369015 --0.372806 --0.500494 --0.442966 --0.323643 --0.381027 --0.496714 --0.597530 --0.514984 --0.581528 --0.528705 --0.337832 --0.497506 --0.541718 --0.463147 --0.514987 --0.431846 --0.402100 --0.281341 --0.356591 --0.357009 --0.228277 --0.271871 --0.223066 --0.213625 --0.338073 --0.443417 --0.610858 --0.738466 --0.933641 --0.857909 --0.945672 --0.859256 --0.970850 --1.102287 --1.164532 --1.272049 --1.459311 --1.609631 --1.752508 --1.622269 --1.599465 --1.584374 --1.698385 --1.694377 --1.691337 --1.543150 --1.329823 --1.395537 --1.373660 --1.446951 --1.374073 --1.359444 --1.338134 --1.369026 --1.492140 --1.460860 --1.317801 --1.260372 --1.100040 --0.784571 --0.834600 --0.935563 --0.965016 --0.904364 --0.857797 --0.703201 --0.602620 --0.797035 --0.801804 --0.658268 --0.719432 --0.665039 --0.582054 --0.725166 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/perlin_params.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/perlin_params.txt deleted file mode 100644 index f51328cc14..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-3/iter-0/perlin_params.txt +++ /dev/null @@ -1,7 +0,0 @@ -SCALE:0.542054 -OFFSET:-0.936072 -PERSISTENCE:0.66513 -OCTAVES:59.6891 -PRIME_1:58.3958 -PRIME_2:51.6271 -PRIME_3:37.3286 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/OK b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/OK deleted file mode 100644 index 9590cb949c..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/OK +++ /dev/null @@ -1 +0,0 @@ -All jobs complete \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/aggregated.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/aggregated.txt deleted file mode 100644 index 35536135e9..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/aggregated.txt +++ /dev/null @@ -1,4 +0,0 @@ -PERLIN_3 0.585905 -PERLIN_2 1.398056 -PERLIN_1 0.227632 -STATE Positive \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/aggregator.stderr b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/aggregator.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/aggregator.stdout b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/aggregator.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/parameters.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/parameters.txt deleted file mode 100644 index 43486a893a..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/parameters.txt +++ /dev/null @@ -1,7 +0,0 @@ -PERLIN_PARAM:SCALE 0.434448 -PERLIN_PARAM:OFFSET 0.831105 -PERLIN_PARAM:PERSISTENCE 0.630867 -PERLIN_PARAM:OCTAVES 8.00407 -PERLIN_PARAM:PRIME_1 85.4235 -PERLIN_PARAM:PRIME_2 21.3039 -PERLIN_PARAM:PRIME_3 104.858 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/perlin.stderr b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/perlin.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/perlin.stdout b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/perlin.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/perlin_1.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/perlin_1.txt deleted file mode 100644 index 7ea431597a..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/perlin_1.txt +++ /dev/null @@ -1,100 +0,0 @@ -0.227632 -0.182419 -0.144134 -0.139476 -0.177808 -0.254702 -0.194959 -0.196247 -0.200894 -0.254938 -0.395923 -0.419362 -0.480212 -0.525709 -0.561013 -0.552975 -0.519655 -0.497365 -0.577627 -0.735132 -0.817150 -0.830304 -0.810482 -0.786231 -0.748806 -0.689116 -0.617421 -0.687358 -0.594608 -0.517947 -0.548341 -0.523440 -0.419855 -0.405486 -0.372455 -0.434415 -0.562727 -0.733549 -0.970895 -1.160018 -1.169762 -1.111676 -1.111566 -1.106991 -1.105426 -1.213650 -1.175046 -1.097622 -1.076414 -1.020738 -0.967021 -0.935108 -0.968248 -1.090303 -1.177846 -1.141175 -1.035475 -1.007184 -1.064612 -1.220228 -1.325731 -1.365550 -1.388177 -1.239332 -1.196752 -1.250964 -1.102255 -1.021732 -1.011481 -1.046014 -1.021100 -1.037203 -0.983562 -1.047336 -1.209270 -1.527246 -1.651524 -1.778722 -1.953437 -1.897861 -1.919134 -1.832772 -1.722330 -1.690519 -1.644280 -1.609237 -1.499923 -1.390382 -1.225122 -1.258604 -1.269723 -1.248156 -1.156463 -1.014345 -0.967288 -0.922071 -0.964769 -0.867821 -0.886340 -0.661428 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/perlin_2.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/perlin_2.txt deleted file mode 100644 index b747326d4e..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/perlin_2.txt +++ /dev/null @@ -1,100 +0,0 @@ -1.398056 -1.370914 -1.363998 -1.279446 -1.232190 -1.280908 -1.103097 -1.044700 -1.071948 -1.061684 -1.094715 -0.964632 -0.831411 -0.781949 -0.814620 -0.849516 -0.851001 -0.765851 -0.758157 -0.773463 -0.753641 -0.789955 -0.752934 -0.828227 -0.915443 -0.973537 -1.081467 -1.241200 -1.241392 -1.257672 -1.377862 -1.470086 -1.421784 -1.325527 -1.150346 -1.051501 -1.044802 -1.106502 -1.157155 -1.178239 -1.131983 -1.091121 -1.099748 -1.022758 -0.922794 -1.005841 -1.071597 -1.179689 -1.248927 -1.203617 -1.238719 -1.303884 -1.370907 -1.578622 -1.711466 -1.711839 -1.668280 -1.577131 -1.546602 -1.622520 -1.688682 -1.788272 -1.882089 -1.796176 -1.789849 -1.824672 -1.596314 -1.354986 -1.209724 -1.109246 -0.923528 -0.922481 -0.911951 -0.973918 -1.090397 -1.192352 -1.060059 -0.993187 -1.014380 -0.913349 -0.932815 -0.882706 -0.835195 -0.874574 -0.888107 -0.876224 -0.749712 -0.614713 -0.449095 -0.520278 -0.614327 -0.737773 -0.860582 -0.969577 -1.155922 -1.219523 -1.274034 -1.070757 -0.993013 -0.832009 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/perlin_3.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/perlin_3.txt deleted file mode 100644 index c5dd1d518a..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/perlin_3.txt +++ /dev/null @@ -1,100 +0,0 @@ -0.585905 -0.452598 -0.261390 -0.099559 -0.008463 -0.090195 -0.020645 -0.032193 -0.098826 -0.167894 -0.384631 -0.408063 -0.383683 -0.343951 -0.379248 -0.446961 -0.428666 -0.448737 -0.598860 -0.866793 -1.106700 -1.241132 -1.243349 -1.200570 -1.168896 -1.114956 -1.024733 -1.054210 -1.020238 -1.038965 -1.117287 -1.162247 -1.101024 -1.127568 -1.144400 -1.180464 -1.249435 -1.298417 -1.447368 -1.686352 -1.737009 -1.763308 -1.821366 -1.709790 -1.553214 -1.506426 -1.360820 -1.279066 -1.279741 -1.183449 -1.062901 -0.861486 -0.677115 -0.670046 -0.624699 -0.557809 -0.499881 -0.413392 -0.369794 -0.411126 -0.420676 -0.401154 -0.397886 -0.236404 -0.172236 -0.286392 -0.241739 -0.216426 -0.242506 -0.276757 -0.218665 -0.312935 -0.345126 -0.458120 -0.609833 -0.806243 -0.893627 -0.994656 -1.162081 -1.148060 -1.166777 -1.176970 -1.258971 -1.433259 -1.522462 -1.549638 -1.469646 -1.375772 -1.233844 -1.290657 -1.317444 -1.262699 -1.170724 -1.002436 -0.948090 -0.944428 -0.984570 -0.910954 -0.945140 -0.749551 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/perlin_params.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/perlin_params.txt deleted file mode 100644 index 324cbda2ee..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-4/iter-0/perlin_params.txt +++ /dev/null @@ -1,7 +0,0 @@ -SCALE:0.434448 -OFFSET:0.831105 -PERSISTENCE:0.630867 -OCTAVES:8.00407 -PRIME_1:85.4235 -PRIME_2:21.3039 -PRIME_3:104.858 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/OK b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/OK deleted file mode 100644 index 9590cb949c..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/OK +++ /dev/null @@ -1 +0,0 @@ -All jobs complete \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/aggregated.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/aggregated.txt deleted file mode 100644 index 72e58cbf64..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/aggregated.txt +++ /dev/null @@ -1,4 +0,0 @@ -PERLIN_3 0.638889 -PERLIN_2 1.451039 -PERLIN_1 0.280615 -STATE Positive \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/aggregator.stderr b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/aggregator.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/aggregator.stdout b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/aggregator.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/parameters.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/parameters.txt deleted file mode 100644 index 463f5c41d8..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/parameters.txt +++ /dev/null @@ -1,7 +0,0 @@ -PERLIN_PARAM:SCALE 0.72828 -PERLIN_PARAM:OFFSET 0.48251 -PERLIN_PARAM:PERSISTENCE 0.878696 -PERLIN_PARAM:OCTAVES 62.5026 -PERLIN_PARAM:PRIME_1 10.3564 -PERLIN_PARAM:PRIME_2 34.9666 -PERLIN_PARAM:PRIME_3 46.2883 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/perlin.stderr b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/perlin.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/perlin.stdout b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/perlin.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/perlin_1.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/perlin_1.txt deleted file mode 100644 index 11da497a09..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/perlin_1.txt +++ /dev/null @@ -1,100 +0,0 @@ -0.280615 -0.140016 -0.101814 --0.129046 -0.108540 -0.255758 --0.136433 -0.402995 -0.060006 -0.243033 -0.270699 -1.032076 --0.013904 --0.123877 -0.661223 -0.260982 -0.218027 -1.382060 -0.399264 -0.483361 -0.472825 --0.400746 -1.339330 -0.692467 -0.043042 -0.542935 --0.239154 -0.322095 -0.568886 --0.253825 -0.069002 -0.151587 --0.060719 -0.071557 -1.232762 -0.806173 -0.197592 -0.775339 -0.485706 --0.340968 -0.563185 --0.301442 --0.470657 -0.391865 -1.604934 -1.366571 -0.978296 -0.533236 -0.199409 -0.640021 -0.724001 -0.620437 --0.062286 -0.448127 -0.681424 -0.211811 -0.962468 -0.569284 -0.153403 -0.463251 -0.717336 -1.047732 -0.879313 -0.557671 -0.589243 -0.475895 -0.668305 -1.261389 -1.992548 -0.514705 -1.480108 -0.964709 -0.672593 -0.541782 -1.389203 -0.533862 -1.237538 -0.892042 -0.376384 -0.676731 -1.374955 -1.291646 -0.276911 -0.706050 -0.032507 -1.074094 -0.914922 -1.747032 -2.087744 -1.287205 -1.735100 -1.305039 -1.283753 -0.989592 -0.686460 -0.373096 -0.309114 -0.349820 -0.814016 -0.915557 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/perlin_2.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/perlin_2.txt deleted file mode 100644 index 1a12f1d5e3..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/perlin_2.txt +++ /dev/null @@ -1,100 +0,0 @@ -1.451039 -1.328511 -1.321678 -1.010924 -1.162923 -1.281965 -0.771705 -1.251448 -0.931060 -1.049780 -0.969490 -1.577345 -0.337295 -0.132363 -0.914830 -0.557523 -0.549373 -1.650547 -0.579795 -0.521693 -0.409316 --0.441095 -1.281782 -0.734463 -0.209679 -0.827356 -0.224891 -0.875937 -1.215669 -0.485900 -0.898524 -1.098233 -0.941210 -0.991598 -2.010653 -1.423259 -0.679667 -1.148292 -0.671966 --0.322746 -0.525407 --0.321998 --0.482474 -0.307632 -1.422302 -1.158762 -0.874847 -0.615302 -0.371922 -0.822899 -0.995699 -0.989214 -0.340374 -0.936446 -1.215045 -0.782475 -1.595273 -1.139231 -0.635393 -0.865543 -1.080287 -1.470455 -1.373225 -1.114515 -1.182340 -1.049604 -1.162364 -1.594643 -2.190791 -0.577937 -1.382536 -0.849987 -0.600982 -0.468364 -1.270330 -0.198968 -0.646073 -0.106506 --0.562673 --0.307781 -0.388636 -0.341580 --0.610223 --0.109894 --0.723666 -0.341080 -0.164710 -0.971363 -1.311717 -0.548880 -1.079704 -0.794657 -0.987872 -0.944824 -0.875093 -0.670548 -0.618379 -0.552756 -0.920689 -1.086138 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/perlin_3.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/perlin_3.txt deleted file mode 100644 index 4b5a132c2c..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/perlin_3.txt +++ /dev/null @@ -1,100 +0,0 @@ -0.638889 -0.410195 -0.219070 --0.168964 --0.060804 -0.091251 --0.310748 -0.238941 --0.042062 -0.155990 -0.259406 -1.020776 --0.110433 --0.305635 -0.479458 -0.154968 -0.127038 -1.333433 -0.420498 -0.615022 -0.762375 -0.010082 -1.772197 -1.106807 -0.463132 -0.968775 -0.168158 -0.688947 -0.994515 -0.267193 -0.637949 -0.790394 -0.620450 -0.793639 -2.004706 -1.552222 -0.884301 -1.340207 -0.962178 -0.185367 -1.130433 -0.350189 -0.239143 -0.994664 -2.052722 -1.659346 -1.164070 -0.714679 -0.402736 -0.802732 -0.819881 -0.546816 --0.353419 -0.027870 -0.128278 --0.371555 -0.426874 --0.024508 --0.541415 --0.345851 --0.187719 -0.083337 --0.110978 --0.445258 --0.435272 --0.488676 --0.192211 -0.456083 -1.223572 --0.254552 -0.677673 -0.240441 -0.034157 --0.047433 -0.789765 --0.187141 -0.479641 -0.107975 --0.414972 --0.073069 -0.622598 -0.635844 --0.186447 -0.448791 --0.089311 -1.014494 -0.884645 -1.732422 -2.096466 -1.319259 -1.782821 -1.319583 -1.298015 -0.977683 -0.667262 -0.395453 -0.328915 -0.392952 -0.872816 -1.003679 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/perlin_params.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/perlin_params.txt deleted file mode 100644 index 6ffe51857b..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-5/iter-0/perlin_params.txt +++ /dev/null @@ -1,7 +0,0 @@ -SCALE:0.72828 -OFFSET:0.48251 -PERSISTENCE:0.878696 -OCTAVES:62.5026 -PRIME_1:10.3564 -PRIME_2:34.9666 -PRIME_3:46.2883 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/OK b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/OK deleted file mode 100644 index 9590cb949c..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/OK +++ /dev/null @@ -1 +0,0 @@ -All jobs complete \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/aggregated.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/aggregated.txt deleted file mode 100644 index 07f12f2a08..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/aggregated.txt +++ /dev/null @@ -1,4 +0,0 @@ -PERLIN_3 0.870550 -PERLIN_2 1.682701 -PERLIN_1 0.512277 -STATE Positive \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/aggregator.stderr b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/aggregator.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/aggregator.stdout b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/aggregator.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/parameters.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/parameters.txt deleted file mode 100644 index 04dc1adb80..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/parameters.txt +++ /dev/null @@ -1,7 +0,0 @@ -PERLIN_PARAM:SCALE 0.105108 -PERLIN_PARAM:OFFSET 0.913379 -PERLIN_PARAM:PERSISTENCE 0.962764 -PERLIN_PARAM:OCTAVES 54.2875 -PERLIN_PARAM:PRIME_1 12.1353 -PERLIN_PARAM:PRIME_2 108.225 -PERLIN_PARAM:PRIME_3 58.2668 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/perlin.stderr b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/perlin.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/perlin.stdout b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/perlin.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/perlin_1.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/perlin_1.txt deleted file mode 100644 index 309c31a80b..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/perlin_1.txt +++ /dev/null @@ -1,100 +0,0 @@ -0.512277 -0.536404 -0.520619 -0.520234 -0.561383 -0.536841 -0.593527 -0.431159 -0.579716 -0.595432 -0.613877 -0.832759 -0.851509 -0.830369 -0.752398 -0.701988 -0.854139 -0.813144 -0.848016 -0.675839 -0.919173 -1.078956 -1.165071 -1.045397 -1.099168 -1.049976 -0.934854 -0.813458 -0.777245 -0.747191 -0.680688 -0.492784 -0.756629 -0.639112 -0.677362 -0.560299 -0.783620 -0.757035 -0.781494 -1.092201 -1.102767 -1.052654 -1.207713 -1.115009 -1.380213 -1.620005 -1.355587 -1.358326 -1.365758 -1.049275 -1.264629 -1.182026 -1.240226 -1.329804 -1.210895 -1.340758 -1.160254 -1.099240 -1.243394 -1.267952 -1.359115 -1.457122 -1.219766 -1.225781 -1.439935 -1.367284 -1.242810 -1.155161 -1.278395 -1.180081 -1.125988 -1.131542 -1.239492 -1.086901 -1.273243 -1.532824 -1.482385 -1.810195 -1.887451 -1.774089 -1.870171 -1.843973 -1.696110 -1.740468 -1.791604 -1.614504 -1.582554 -1.758357 -1.634232 -1.684106 -1.786180 -1.619646 -1.484936 -1.430948 -1.379634 -1.352505 -1.382218 -1.487943 -1.057155 -0.971585 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/perlin_2.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/perlin_2.txt deleted file mode 100644 index 463edcab27..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/perlin_2.txt +++ /dev/null @@ -1,100 +0,0 @@ -1.682701 -1.724900 -1.740484 -1.660204 -1.615765 -1.563048 -1.501665 -1.279611 -1.450770 -1.402179 -1.312668 -1.378029 -1.202709 -1.086610 -1.006006 -0.998528 -1.185484 -1.081631 -1.028546 -0.714171 -0.855664 -1.038607 -1.107524 -1.087393 -1.265806 -1.334397 -1.398900 -1.367299 -1.424028 -1.486916 -1.510209 -1.439430 -1.758558 -1.559152 -1.455253 -1.177386 -1.265695 -1.129987 -0.967754 -1.110422 -1.064988 -1.032099 -1.195895 -1.030776 -1.197580 -1.412196 -1.252139 -1.440393 -1.538272 -1.232153 -1.536327 -1.550802 -1.642885 -1.818122 -1.744516 -1.911422 -1.793059 -1.669187 -1.725384 -1.670243 -1.722066 -1.879845 -1.713679 -1.782625 -2.033032 -1.940992 -1.736869 -1.488416 -1.476638 -1.243313 -1.028416 -1.016820 -1.167881 -1.013483 -1.154370 -1.197929 -0.890921 -1.024660 -0.948394 -0.789577 -0.883852 -0.893907 -0.808975 -0.924524 -1.035431 -0.881490 -0.832342 -0.982689 -0.858205 -0.945780 -1.130784 -1.109264 -1.189055 -1.386180 -1.568267 -1.649957 -1.691483 -1.690880 -1.163828 -1.142166 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/perlin_3.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/perlin_3.txt deleted file mode 100644 index bb7c009032..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/perlin_3.txt +++ /dev/null @@ -1,100 +0,0 @@ -0.870550 -0.806583 -0.637876 -0.480317 -0.392038 -0.372334 -0.419213 -0.267105 -0.477648 -0.508389 -0.602584 -0.821460 -0.754981 -0.648612 -0.570634 -0.595973 -0.763150 -0.764517 -0.869249 -0.807500 -1.208723 -1.489784 -1.597939 -1.459736 -1.519258 -1.475816 -1.342167 -1.180310 -1.202874 -1.268209 -1.249634 -1.131591 -1.437798 -1.361194 -1.449307 -1.306349 -1.470329 -1.321902 -1.257966 -1.618535 -1.670015 -1.704286 -1.917513 -1.717808 -1.828000 -1.912781 -1.541362 -1.539769 -1.569085 -1.211985 -1.360508 -1.108404 -0.949092 -0.909547 -0.657749 -0.757392 -0.624659 -0.505448 -0.548575 -0.458850 -0.454060 -0.492727 -0.229476 -0.222852 -0.415420 -0.402712 -0.382294 -0.349856 -0.509419 -0.410824 -0.323553 -0.407274 -0.601056 -0.497685 -0.673805 -0.811821 -0.724489 -1.026129 -1.096095 -1.024289 -1.117814 -1.188171 -1.232752 -1.483209 -1.669786 -1.554904 -1.552277 -1.743747 -1.642953 -1.716159 -1.833900 -1.634190 -1.499198 -1.419039 -1.360436 -1.374862 -1.402018 -1.531076 -1.115955 -1.059708 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/perlin_params.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/perlin_params.txt deleted file mode 100644 index 29d18ec899..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-6/iter-0/perlin_params.txt +++ /dev/null @@ -1,7 +0,0 @@ -SCALE:0.105108 -OFFSET:0.913379 -PERSISTENCE:0.962764 -OCTAVES:54.2875 -PRIME_1:12.1353 -PRIME_2:108.225 -PRIME_3:58.2668 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/OK b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/OK deleted file mode 100644 index 9590cb949c..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/OK +++ /dev/null @@ -1 +0,0 @@ -All jobs complete \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/aggregated.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/aggregated.txt deleted file mode 100644 index 6b3b4204d7..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/aggregated.txt +++ /dev/null @@ -1,4 +0,0 @@ -PERLIN_3 -0.223092 -PERLIN_2 0.589059 -PERLIN_1 -0.581365 -STATE Negative \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/aggregator.stderr b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/aggregator.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/aggregator.stdout b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/aggregator.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/parameters.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/parameters.txt deleted file mode 100644 index 0fec4832fd..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/parameters.txt +++ /dev/null @@ -1,7 +0,0 @@ -PERLIN_PARAM:SCALE 0.100905 -PERLIN_PARAM:OFFSET 0.749785 -PERLIN_PARAM:PERSISTENCE 0.960394 -PERLIN_PARAM:OCTAVES 27.0099 -PERLIN_PARAM:PRIME_1 40.6138 -PERLIN_PARAM:PRIME_2 61.0175 -PERLIN_PARAM:PRIME_3 87.8034 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/perlin.stderr b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/perlin.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/perlin.stdout b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/perlin.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/perlin_1.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/perlin_1.txt deleted file mode 100644 index f4ab414309..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/perlin_1.txt +++ /dev/null @@ -1,100 +0,0 @@ --0.581365 -0.196529 -0.251092 -0.129792 -0.331063 -0.243506 -0.276892 -0.080451 -0.396119 -0.359775 -0.367571 -0.375403 -0.583877 -0.600213 -0.433206 -0.667000 -0.730207 -0.597004 -0.652034 -0.663611 -0.746119 -0.692967 -0.730701 -0.876335 -0.892405 -0.727578 -0.723739 -0.564331 -0.468088 -0.488808 -0.664805 -0.660028 -0.630792 -0.524399 -0.474312 -0.443139 -0.580488 -0.481039 -0.800572 -1.001564 -0.911524 -0.901357 -0.788429 -0.858484 -0.905262 -1.091118 -1.153703 -1.092191 -1.125297 -0.931559 -0.887913 -0.949225 -1.000548 -1.157858 -0.916321 -0.916039 -0.825100 -0.963569 -0.946300 -1.325529 -1.317807 -1.051895 -1.371837 -1.120878 -1.290153 -1.132642 -1.106899 -0.951717 -1.053646 -1.097485 -0.993622 -1.071263 -1.003207 -1.060272 -0.945896 -1.081059 -1.483716 -1.639907 -1.778137 -1.743444 -1.658571 -1.670091 -1.528567 -1.360096 -1.348333 -1.247859 -1.311556 -1.223970 -1.139654 -1.236625 -1.220851 -1.388255 -1.244178 -1.146154 -1.093360 -0.984612 -1.125281 -1.104519 -0.927790 -0.740832 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/perlin_2.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/perlin_2.txt deleted file mode 100644 index 3b2079e9c1..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/perlin_2.txt +++ /dev/null @@ -1,100 +0,0 @@ -0.589059 -1.385024 -1.470957 -1.269762 -1.385446 -1.269712 -1.185030 -0.928904 -1.267172 -1.166521 -1.066362 -0.920673 -0.935076 -0.856454 -0.686814 -0.963540 -1.061552 -0.865491 -0.832564 -0.701943 -0.682610 -0.652618 -0.673153 -0.918331 -1.059042 -1.011999 -1.187784 -1.118172 -1.114871 -1.228534 -1.494326 -1.606674 -1.632721 -1.444440 -1.252203 -1.060226 -1.062564 -0.853991 -0.986832 -1.019786 -0.873746 -0.880802 -0.776611 -0.774251 -0.722629 -0.883309 -1.050254 -1.174258 -1.297810 -1.114437 -1.159611 -1.318001 -1.403207 -1.646177 -1.449942 -1.486702 -1.457905 -1.533516 -1.428289 -1.727821 -1.680758 -1.474617 -1.865750 -1.677722 -1.883250 -1.706351 -1.600958 -1.284972 -1.251889 -1.160717 -0.896049 -0.956541 -0.931596 -0.986854 -0.827023 -0.746164 -0.892252 -0.854372 -0.839080 -0.758932 -0.672252 -0.720025 -0.641433 -0.544152 -0.592160 -0.514846 -0.561344 -0.448302 -0.363627 -0.498299 -0.565455 -0.877873 -0.948297 -1.101386 -1.281993 -1.282064 -1.434546 -1.307456 -1.034463 -0.911412 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/perlin_3.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/perlin_3.txt deleted file mode 100644 index 520a51e79f..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/perlin_3.txt +++ /dev/null @@ -1,100 +0,0 @@ --0.223092 -0.466707 -0.368349 -0.089874 -0.161719 -0.078999 -0.102578 --0.083603 -0.294051 -0.272732 -0.356278 -0.364104 -0.487348 -0.418455 -0.251441 -0.560986 -0.639218 -0.548377 -0.673267 -0.795272 -1.035669 -1.103795 -1.163568 -1.290674 -1.312494 -1.153418 -1.131051 -0.931183 -0.893717 -1.009827 -1.233752 -1.298835 -1.311961 -1.246482 -1.246256 -1.189188 -1.267197 -1.045907 -1.277045 -1.527899 -1.478772 -1.552988 -1.498229 -1.461283 -1.353050 -1.383894 -1.339477 -1.273635 -1.328624 -1.094269 -0.983792 -0.875603 -0.709414 -0.737601 -0.363175 -0.332673 -0.289505 -0.369777 -0.251481 -0.516427 -0.412752 -0.087499 -0.381547 -0.117950 -0.265638 -0.168071 -0.246383 -0.146412 -0.284670 -0.328228 -0.191186 -0.346995 -0.364771 -0.471056 -0.346459 -0.360055 -0.725820 -0.855841 -0.986781 -0.993643 -0.906214 -1.014289 -1.065209 -1.102837 -1.226516 -1.188260 -1.281279 -1.209360 -1.148376 -1.268678 -1.268572 -1.402798 -1.258439 -1.134246 -1.074161 -1.006970 -1.145082 -1.147652 -0.986590 -0.828954 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/perlin_params.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/perlin_params.txt deleted file mode 100644 index 4455122772..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-7/iter-0/perlin_params.txt +++ /dev/null @@ -1,7 +0,0 @@ -SCALE:0.100905 -OFFSET:0.749785 -PERSISTENCE:0.960394 -OCTAVES:27.0099 -PRIME_1:40.6138 -PRIME_2:61.0175 -PRIME_3:87.8034 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/OK b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/OK deleted file mode 100644 index 9590cb949c..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/OK +++ /dev/null @@ -1 +0,0 @@ -All jobs complete \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/STATUS b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/STATUS deleted file mode 100644 index bfebf7ba94..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/STATUS +++ /dev/null @@ -1,3 +0,0 @@ -Current host : lx-774616.local/x86_64 -PERLIN : 17:15:11 .... 17:15:12 -AGGREGATOR : 17:15:12 .... 17:15:12 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/aggregated.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/aggregated.txt deleted file mode 100644 index 244709c651..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/aggregated.txt +++ /dev/null @@ -1,4 +0,0 @@ -PERLIN_3 -0.917785 -PERLIN_2 -0.105634 -PERLIN_1 -1.276058 -STATE Negative \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/aggregator.stderr b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/aggregator.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/aggregator.stdout b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/aggregator.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/jobs.py b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/jobs.py deleted file mode 100644 index 72a3af4e0a..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/jobs.py +++ /dev/null @@ -1,28 +0,0 @@ -jobList = [ {"name" : "PERLIN", - "executable" : "/Users/jpb/projects/ert/test-data/local/custom_kw/jobs/perlin.py", - "target_file" : None, - "error_file" : None, - "start_file" : None, - "stdout" : "perlin.stdout", - "stderr" : "perlin.stderr", - "stdin" : None, - "argList" : [], - "environment" : None, - "license_path" : None, - "max_running_minutes" : None, - "max_running" : None, -}, - {"name" : "AGGREGATOR", - "executable" : "/Users/jpb/projects/ert/test-data/local/custom_kw/jobs/aggregator.py", - "target_file" : None, - "error_file" : None, - "start_file" : None, - "stdout" : "aggregator.stdout", - "stderr" : "aggregator.stderr", - "stdin" : None, - "argList" : [], - "environment" : None, - "license_path" : None, - "max_running_minutes" : None, - "max_running" : None, -}] diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/parameters.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/parameters.txt deleted file mode 100644 index 59ba741905..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/parameters.txt +++ /dev/null @@ -1,7 +0,0 @@ -PERLIN_PARAM:SCALE 0.494279 -PERLIN_PARAM:OFFSET -0.526799 -PERLIN_PARAM:PERSISTENCE 0.0911083 -PERLIN_PARAM:OCTAVES 43.0492 -PERLIN_PARAM:PRIME_1 123.299 -PERLIN_PARAM:PRIME_2 42.4258 -PERLIN_PARAM:PRIME_3 14.0702 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/perlin.stderr b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/perlin.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/perlin.stdout b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/perlin.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/perlin_1.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/perlin_1.txt deleted file mode 100644 index 6aa944dccf..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/perlin_1.txt +++ /dev/null @@ -1,100 +0,0 @@ --1.276058 --1.289017 --1.314341 --1.306601 --1.296437 --1.293440 --1.259407 --1.266510 --1.294486 --1.261902 --1.202479 --1.080475 --0.954164 --0.885534 --0.858941 --0.894787 --0.919912 --0.916939 --0.886507 --0.799550 --0.721154 --0.650200 --0.537956 --0.483812 --0.489635 --0.525394 --0.546662 --0.527208 --0.534832 --0.533549 --0.538252 --0.584050 --0.611137 --0.630059 --0.650202 --0.616093 --0.568181 --0.463276 --0.334508 --0.259597 --0.221372 --0.259230 --0.279580 --0.244302 --0.207325 --0.170186 --0.177288 --0.240439 --0.278604 --0.325685 --0.411518 --0.447688 --0.438482 --0.430901 --0.426508 --0.473419 --0.523455 --0.492174 --0.429854 --0.320462 --0.242691 --0.226471 --0.221185 --0.262628 --0.292571 --0.326766 --0.377534 --0.383441 --0.373359 --0.364832 --0.330290 --0.341756 --0.378785 --0.325450 --0.201339 --0.014930 -0.131198 -0.218084 -0.307262 -0.331535 -0.323047 -0.275638 -0.204499 -0.189781 -0.216423 -0.234694 -0.244237 -0.196780 -0.140343 -0.139795 -0.132064 -0.149348 -0.135500 -0.067575 --0.002818 --0.038351 --0.033175 --0.039802 --0.104931 --0.282153 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/perlin_2.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/perlin_2.txt deleted file mode 100644 index 9527f5ea7a..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/perlin_2.txt +++ /dev/null @@ -1,100 +0,0 @@ --0.105634 --0.100522 --0.094477 --0.166631 --0.242055 --0.267233 --0.351269 --0.418058 --0.423433 --0.455156 --0.503687 --0.535205 --0.602964 --0.629293 --0.605334 --0.598246 --0.588567 --0.648452 --0.705977 --0.761218 --0.784663 --0.690549 --0.595504 --0.441816 --0.322998 --0.240974 --0.082616 -0.026633 -0.111952 -0.206176 -0.291269 -0.362596 -0.390792 -0.289982 -0.127689 -0.000994 --0.086106 --0.090324 --0.148248 --0.241375 --0.259151 --0.279786 --0.291397 --0.328535 --0.389958 --0.377995 --0.280737 --0.158372 --0.106091 --0.142807 --0.139820 --0.078912 --0.035823 -0.057418 -0.107112 -0.097244 -0.109350 -0.077772 -0.052136 -0.081830 -0.120261 -0.196251 -0.272728 -0.294216 -0.300526 -0.246943 -0.116525 --0.050187 --0.175115 --0.301600 --0.427862 --0.456478 --0.450396 --0.398868 --0.320212 --0.349825 --0.460267 --0.567451 --0.631795 --0.652977 --0.663271 --0.674428 --0.682635 --0.626163 --0.539750 --0.498320 --0.505975 --0.578888 --0.635684 --0.598530 --0.523332 --0.361034 --0.160381 -0.022807 -0.185816 -0.259100 -0.276090 -0.163135 -0.001742 --0.111572 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/perlin_3.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/perlin_3.txt deleted file mode 100644 index cd80bec7c2..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/perlin_3.txt +++ /dev/null @@ -1,100 +0,0 @@ --0.917785 --1.018838 --1.197085 --1.346518 --1.465782 --1.457947 --1.433721 --1.430564 --1.396554 --1.348945 --1.213771 --1.091774 --1.050692 --1.067291 --1.040706 --1.000801 --1.010901 --0.965566 --0.865274 --0.667889 --0.431604 --0.239372 --0.105089 --0.069473 --0.069545 --0.099554 --0.139350 --0.160356 --0.109202 --0.012531 -0.030695 -0.054757 -0.070031 -0.092023 -0.121743 -0.129957 -0.118527 -0.101591 -0.141964 -0.266738 -0.345876 -0.392401 -0.430221 -0.358497 -0.240463 -0.122590 -0.008486 --0.058995 --0.075277 --0.162975 --0.315639 --0.521310 --0.729615 --0.851158 --0.979655 --1.056785 --1.059049 --1.085967 --1.124672 --1.129564 --1.147745 --1.190867 --1.211475 --1.265556 --1.317086 --1.291337 --1.238050 --1.188747 --1.142334 --1.134089 --1.132725 --1.066024 --1.017221 --0.914666 --0.800777 --0.735933 --0.626698 --0.565983 --0.484094 --0.418266 --0.429310 --0.380164 --0.258859 --0.067478 -0.094606 -0.175094 -0.213959 -0.182170 -0.149065 -0.171849 -0.179785 -0.163891 -0.149761 -0.055666 --0.022016 --0.015994 --0.013374 -0.003331 --0.046131 --0.194030 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/perlin_params.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/perlin_params.txt deleted file mode 100644 index 219b62155c..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-8/iter-0/perlin_params.txt +++ /dev/null @@ -1,7 +0,0 @@ -SCALE:0.494279 -OFFSET:-0.526799 -PERSISTENCE:0.0911083 -OCTAVES:43.0492 -PRIME_1:123.299 -PRIME_2:42.4258 -PRIME_3:14.0702 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/OK b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/OK deleted file mode 100644 index 9590cb949c..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/OK +++ /dev/null @@ -1 +0,0 @@ -All jobs complete \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/aggregated.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/aggregated.txt deleted file mode 100644 index 48b8531624..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/aggregated.txt +++ /dev/null @@ -1,4 +0,0 @@ -PERLIN_3 0.220371 -PERLIN_2 1.032522 -PERLIN_1 -0.137903 -STATE Positive \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/aggregator.stderr b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/aggregator.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/aggregator.stdout b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/aggregator.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/parameters.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/parameters.txt deleted file mode 100644 index 2e4f0f7b04..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/parameters.txt +++ /dev/null @@ -1,7 +0,0 @@ -PERLIN_PARAM:SCALE 0.971949 -PERLIN_PARAM:OFFSET 0.568165 -PERLIN_PARAM:PERSISTENCE 0.332226 -PERLIN_PARAM:OCTAVES 8.48231 -PERLIN_PARAM:PRIME_1 106.04 -PERLIN_PARAM:PRIME_2 17.4819 -PERLIN_PARAM:PRIME_3 56.9629 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/perlin.stderr b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/perlin.stderr deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/perlin.stdout b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/perlin.stdout deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/perlin_1.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/perlin_1.txt deleted file mode 100644 index 36798a3f53..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/perlin_1.txt +++ /dev/null @@ -1,100 +0,0 @@ --0.137903 --0.157851 --0.192276 --0.201670 --0.192839 --0.193214 --0.209423 --0.243628 --0.261796 --0.213269 --0.207591 --0.203993 --0.142490 --0.122206 --0.157129 --0.193732 --0.206432 --0.177612 --0.114381 --0.050740 --0.070342 --0.154469 --0.151716 --0.137877 --0.155888 --0.199095 --0.226091 --0.254674 --0.326284 --0.337833 --0.312344 --0.317023 --0.346853 --0.332528 --0.238504 --0.042655 -0.146262 -0.376535 -0.617211 -0.752626 -0.797129 -0.714055 -0.660213 -0.707589 -0.786058 -0.902157 -0.982988 -0.972517 -0.950945 -0.917937 -0.833802 -0.834170 -0.874761 -0.874663 -0.835114 -0.714452 -0.615202 -0.641686 -0.698232 -0.833272 -0.978281 -1.070483 -1.118218 -1.061277 -1.031902 -0.998036 -0.965574 -1.010296 -1.079127 -1.148032 -1.260956 -1.285149 -1.247059 -1.290888 -1.424147 -1.629905 -1.764537 -1.819917 -1.898802 -1.893787 -1.855403 -1.728917 -1.536779 -1.375375 -1.281240 -1.209446 -1.131790 -1.009449 -0.933443 -0.938227 -0.970148 -1.049769 -1.076923 -1.035402 -0.981504 -0.949433 -0.958861 -0.977078 -0.958006 -0.802606 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/perlin_2.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/perlin_2.txt deleted file mode 100644 index ba557199f4..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/perlin_2.txt +++ /dev/null @@ -1,100 +0,0 @@ -1.032522 -1.030645 -1.027589 -0.938300 -0.861544 -0.832993 -0.698715 -0.604825 -0.609257 -0.593477 -0.491201 -0.341277 -0.208709 -0.134035 -0.096478 -0.102808 -0.124913 -0.090875 -0.066149 --0.012408 --0.133850 --0.194818 --0.209263 --0.095881 -0.010749 -0.085326 -0.237955 -0.299167 -0.320499 -0.401893 -0.517178 -0.629623 -0.655076 -0.587512 -0.539387 -0.574432 -0.628337 -0.749487 -0.803470 -0.770847 -0.759350 -0.693500 -0.648396 -0.623356 -0.603426 -0.694348 -0.879540 -1.054584 -1.123458 -1.100816 -1.105500 -1.202947 -1.277420 -1.362982 -1.368734 -1.285116 -1.248007 -1.211633 -1.180222 -1.235564 -1.341232 -1.493206 -1.612131 -1.618121 -1.625000 -1.571745 -1.459633 -1.343551 -1.277370 -1.211264 -1.163383 -1.170426 -1.175448 -1.217470 -1.305274 -1.295011 -1.173072 -1.034382 -0.959745 -0.909275 -0.869084 -0.778851 -0.649645 -0.559430 -0.525067 -0.476432 -0.381578 -0.233781 -0.157416 -0.199901 -0.314752 -0.539386 -0.781042 -0.990634 -1.170137 -1.246885 -1.268126 -1.180015 -1.064679 -0.973186 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/perlin_3.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/perlin_3.txt deleted file mode 100644 index 2bb0cef781..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/perlin_3.txt +++ /dev/null @@ -1,100 +0,0 @@ -0.220371 -0.112328 --0.075019 --0.241588 --0.362184 --0.357721 --0.383737 --0.407682 --0.363864 --0.300312 --0.218883 --0.215292 --0.239019 --0.303964 --0.338894 --0.299746 --0.297421 --0.226239 --0.093147 -0.080922 -0.219209 -0.256359 -0.281152 -0.276463 -0.264202 -0.226745 -0.181221 -0.112178 -0.099345 -0.183186 -0.256603 -0.321784 -0.334316 -0.389554 -0.533441 -0.703395 -0.832970 -0.941402 -1.093683 -1.278960 -1.364377 -1.365686 -1.370013 -1.310389 -1.233846 -1.194933 -1.168762 -1.153961 -1.154271 -1.080648 -0.929681 -0.760549 -0.583628 -0.454406 -0.281967 -0.131086 -0.079608 -0.047894 -0.003413 -0.024170 -0.073226 -0.106088 -0.127928 -0.058349 -0.007387 -0.033465 -0.105058 -0.204991 -0.310151 -0.378775 -0.458521 -0.560881 -0.608623 -0.701672 -0.824709 -0.908902 -1.006640 -1.035850 -1.107446 -1.143986 -1.103046 -1.073115 -1.073421 -1.118115 -1.159422 -1.149846 -1.101513 -0.994839 -0.942165 -0.970280 -1.017869 -1.064312 -1.091185 -1.023493 -0.962306 -0.971791 -0.978662 -1.020211 -1.016806 -0.890728 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/perlin_params.txt b/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/perlin_params.txt deleted file mode 100644 index c3e63c5f53..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/Run/realisation-9/iter-0/perlin_params.txt +++ /dev/null @@ -1,7 +0,0 @@ -SCALE:0.971949 -OFFSET:0.568165 -PERSISTENCE:0.332226 -OCTAVES:8.48231 -PRIME_1:106.04 -PRIME_2:17.4819 -PRIME_3:56.9629 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/current_case b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/current_case deleted file mode 100644 index 331d858ce9..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/current_case +++ /dev/null @@ -1 +0,0 @@ -default \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/0001/files/PERLIN_active b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/0001/files/PERLIN_active deleted file mode 100644 index c72400474a..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/0001/files/PERLIN_active and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/0002/files/PERLIN_active b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/0002/files/PERLIN_active deleted file mode 100644 index c72400474a..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/0002/files/PERLIN_active and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/0003/files/PERLIN_active b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/0003/files/PERLIN_active deleted file mode 100644 index c72400474a..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/0003/files/PERLIN_active and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/FORECAST.data_0 deleted file mode 100644 index 8dcc722d5a..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/FORECAST.index deleted file mode 100644 index 0a01a88233..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/PARAMETER.data_0 deleted file mode 100644 index 1d8b6c18da..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/PARAMETER.index deleted file mode 100644 index 1f0db16ccc..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_0/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/FORECAST.data_0 deleted file mode 100644 index 8cfcfa2250..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/FORECAST.index deleted file mode 100644 index 9e25666ab4..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/PARAMETER.data_0 deleted file mode 100644 index ff8922efbf..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/PARAMETER.index deleted file mode 100644 index 2f8c799aed..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_1/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/FORECAST.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/PARAMETER.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_10/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/FORECAST.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/PARAMETER.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_11/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/FORECAST.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/PARAMETER.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_12/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/FORECAST.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/PARAMETER.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_13/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/FORECAST.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/PARAMETER.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_14/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/FORECAST.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/PARAMETER.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_15/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/FORECAST.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/PARAMETER.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_16/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/FORECAST.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/PARAMETER.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_17/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/FORECAST.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/PARAMETER.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_18/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/FORECAST.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/PARAMETER.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_19/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/FORECAST.data_0 deleted file mode 100644 index 6f7244c4fa..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/FORECAST.index deleted file mode 100644 index d90f7a9f75..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/PARAMETER.data_0 deleted file mode 100644 index aad9490e0c..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/PARAMETER.index deleted file mode 100644 index 4c804b5b87..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_2/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/FORECAST.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/PARAMETER.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_20/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/FORECAST.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/PARAMETER.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_21/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/FORECAST.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/PARAMETER.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_22/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/FORECAST.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/PARAMETER.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_23/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/FORECAST.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/PARAMETER.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_24/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/FORECAST.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/PARAMETER.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_25/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/FORECAST.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/PARAMETER.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_26/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/FORECAST.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/PARAMETER.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_27/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/FORECAST.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/PARAMETER.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_28/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/FORECAST.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/PARAMETER.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_29/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/FORECAST.data_0 deleted file mode 100644 index fd7246d7ab..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/FORECAST.index deleted file mode 100644 index 718956c242..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/PARAMETER.data_0 deleted file mode 100644 index 2fc669aaf7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/PARAMETER.index deleted file mode 100644 index cbeb9c1224..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_3/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/FORECAST.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/PARAMETER.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_30/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/FORECAST.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/PARAMETER.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_31/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/FORECAST.data_0 deleted file mode 100644 index 28665371dc..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/FORECAST.index deleted file mode 100644 index a879653abd..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/PARAMETER.data_0 deleted file mode 100644 index 90b4c5e871..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/PARAMETER.index deleted file mode 100644 index b7afb6bf58..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_4/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/FORECAST.data_0 deleted file mode 100644 index 178960502d..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/FORECAST.index deleted file mode 100644 index 7e09d8c482..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/PARAMETER.data_0 deleted file mode 100644 index b47d88c6ce..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/PARAMETER.index deleted file mode 100644 index 68c8652b8a..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_5/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/FORECAST.data_0 deleted file mode 100644 index cfb98aa00e..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/FORECAST.index deleted file mode 100644 index 2f03d8d11b..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/PARAMETER.data_0 deleted file mode 100644 index bb97f570e8..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/PARAMETER.index deleted file mode 100644 index e86f73216f..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_6/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/FORECAST.data_0 deleted file mode 100644 index c8b34c3179..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/FORECAST.index deleted file mode 100644 index 7ef99ebfde..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/PARAMETER.data_0 deleted file mode 100644 index 9bc6a11543..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/PARAMETER.index deleted file mode 100644 index 40817c501f..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_7/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/FORECAST.data_0 deleted file mode 100644 index 6ce8ff1142..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/FORECAST.index deleted file mode 100644 index c560413360..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/PARAMETER.data_0 deleted file mode 100644 index 674b8594d6..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/PARAMETER.index deleted file mode 100644 index 86d42f2def..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_8/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/ANALYZED.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/ANALYZED.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/FORECAST.data_0 deleted file mode 100644 index 27d18051fd..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/FORECAST.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/FORECAST.index deleted file mode 100644 index 9bbcfc9ea7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/FORECAST.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/PARAMETER.data_0 deleted file mode 100644 index a6ce92b471..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/PARAMETER.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/PARAMETER.index deleted file mode 100644 index 727e912850..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/STATIC.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/STATIC.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/STATIC.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/STATIC.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Ensemble/mod_9/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Index/INDEX.data_0 b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Index/INDEX.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Index/INDEX.index b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Index/INDEX.index deleted file mode 100644 index e1de74ede3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Index/INDEX.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Index/INDEX.mnt b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Index/INDEX.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/Index/INDEX.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/ert_fstab b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/ert_fstab deleted file mode 100644 index a5d67ad3a3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/ert_fstab and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/files/case_config b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/files/case_config deleted file mode 100644 index 593f4708db..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/files/case_config and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/files/custom_kw_config_set b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/files/custom_kw_config_set deleted file mode 100644 index b51c81a5bb..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/files/custom_kw_config_set and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/files/state-map b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/files/state-map deleted file mode 100644 index f2112badc8..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/files/state-map and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/files/summary-key-set b/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/files/summary-key-set deleted file mode 100644 index 593f4708db..0000000000 Binary files a/ThirdParty/Ert/test-data/local/custom_kw/storage/ertensemble/test_run/files/summary-key-set and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/custom_kw/time_map b/ThirdParty/Ert/test-data/local/custom_kw/time_map deleted file mode 100644 index 95ec9b0216..0000000000 --- a/ThirdParty/Ert/test-data/local/custom_kw/time_map +++ /dev/null @@ -1,4 +0,0 @@ -01/01/2015 -01/02/2015 -01/03/2015 -01/04/2015 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/resopt/config/simple/config b/ThirdParty/Ert/test-data/local/resopt/config/simple/config deleted file mode 100644 index 8111c47113..0000000000 --- a/ThirdParty/Ert/test-data/local/resopt/config/simple/config +++ /dev/null @@ -1,5 +0,0 @@ -JOBNAME Job%d -RUNPATH /tmp/simulations/run%d -NUM_REALIZATIONS 1 - - diff --git a/ThirdParty/Ert/test-data/local/run/config.txt b/ThirdParty/Ert/test-data/local/run/config.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/SEED b/ThirdParty/Ert/test-data/local/snake_oil/SEED deleted file mode 100644 index 314cda88f6..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil/SEED +++ /dev/null @@ -1 +0,0 @@ -67 -110 42 -42 106 34 96 0 18 42 76 -69 44 -40 -78 -61 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/snake_oil/jobs/snake_oil_diff.py b/ThirdParty/Ert/test-data/local/snake_oil/jobs/snake_oil_diff.py deleted file mode 100644 index afabb261f9..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil/jobs/snake_oil_diff.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python -from ert.ecl import EclSum - -def writeDiff(filename, vector1, vector2): - with open(filename, "w") as f: - for index in range(len(vector1)): - node1 = vector1[index] - node2 = vector2[index] - - diff = node1.value - node2.value - f.write("%f\n" % diff) - - -if __name__ == '__main__': - ecl_sum = EclSum("SNAKE_OIL_FIELD") - - report_step = 199 - writeDiff("snake_oil_opr_diff_%d.txt" % report_step, ecl_sum["WOPR:OP1"], ecl_sum["WOPR:OP2"]) - writeDiff("snake_oil_wpr_diff_%d.txt" % report_step, ecl_sum["WWPR:OP1"], ecl_sum["WWPR:OP2"]) - writeDiff("snake_oil_gpr_diff_%d.txt" % report_step, ecl_sum["WGPR:OP1"], ecl_sum["WGPR:OP2"]) - - - - diff --git a/ThirdParty/Ert/test-data/local/snake_oil/jobs/snake_oil_npv.py b/ThirdParty/Ert/test-data/local/snake_oil/jobs/snake_oil_npv.py deleted file mode 100644 index 4ff61251bc..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil/jobs/snake_oil_npv.py +++ /dev/null @@ -1,103 +0,0 @@ -#!/usr/bin/env python -from ert.ecl import EclSum - -OIL_PRICES = {"2010-01-01": 78.33, - "2010-02-01": 76.39, - "2010-03-01": 81.20, - "2010-04-01": 84.29, - "2010-05-01": 73.74, - "2010-06-01": 75.34, - "2010-07-01": 76.32, - "2010-08-01": 76.60, - "2010-09-01": 75.24, - "2010-10-01": 81.89, - "2010-11-01": 84.25, - "2010-12-01": 89.15, - "2011-01-01": 89.17, - "2011-02-01": 88.58, - "2011-03-01": 102.86, - "2011-04-01": 109.53, - "2011-05-01": 100.90, - "2011-06-01": 96.26, - "2011-07-01": 97.30, - "2011-08-01": 86.33, - "2011-09-01": 85.52, - "2011-10-01": 86.32, - "2011-11-01": 97.16, - "2011-12-01": 98.56, - "2012-01-01": 100.27, - "2012-02-01": 102.20, - "2012-03-01": 106.16, - "2012-04-01": 103.32, - "2012-05-01": 94.65, - "2012-06-01": 82.30, - "2012-07-01": 87.90, - "2012-08-01": 94.13, - "2012-09-01": 94.51, - "2012-10-01": 89.49, - "2012-11-01": 86.53, - "2012-12-01": 87.86, - "2013-01-01": 94.76, - "2013-02-01": 95.31, - "2013-03-01": 92.94, - "2013-04-01": 92.02, - "2013-05-01": 94.51, - "2013-06-01": 95.77, - "2013-07-01": 104.67, - "2013-08-01": 106.57, - "2013-09-01": 106.29, - "2013-10-01": 100.54, - "2013-11-01": 93.86, - "2013-12-01": 97.63, - "2014-01-01": 94.62, - "2014-02-01": 100.82, - "2014-03-01": 100.80, - "2014-04-01": 102.07, - "2014-05-01": 102.18, - "2014-06-01": 105.79, - "2014-07-01": 103.59, - "2014-08-01": 96.54, - "2014-09-01": 93.21, - "2014-10-01": 84.40, - "2014-11-01": 75.79, - "2014-12-01": 59.29, - "2015-01-01": 47.22, - "2015-02-01": 50.58, - "2015-03-01": 47.82, - "2015-04-01": 54.45, - "2015-05-01": 59.27, - "2015-06-01": 59.82, - "2015-07-01": 50.90, - "2015-08-01": 42.87, - "2015-09-01": 45.48} - -if __name__ == '__main__': - ecl_sum = EclSum("SNAKE_OIL_FIELD") - start_time = ecl_sum.getStartTime() - date_ranges = ecl_sum.timeRange(start_time, interval="1M") - production_sums = ecl_sum.blockedProduction("FOPT", date_ranges) - - npv = 0.0 - for index in range(0, len(date_ranges) - 1): - date = date_ranges[index + 1] # end of period - production_sum = production_sums[index] - - oil_price = OIL_PRICES[date.date().strftime("%Y-%m-%d")] - - production_value = oil_price * production_sum - npv += production_value - - with open("snake_oil_npv.txt", "w") as output_file: - output_file.write("NPV %s\n" % npv) - - if npv < 80000: - rating = "POOR" - elif 80000 <= npv < 100000: - rating = "AVERAGE" - elif 100000 <= npv < 120000: - rating = "GOOD" - else: - rating = "EXCELLENT" - - output_file.write("RATING %s\n" % rating) - diff --git a/ThirdParty/Ert/test-data/local/snake_oil/jobs/snake_oil_simulator.py b/ThirdParty/Ert/test-data/local/snake_oil/jobs/snake_oil_simulator.py deleted file mode 100644 index 0083e09155..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil/jobs/snake_oil_simulator.py +++ /dev/null @@ -1,200 +0,0 @@ -#!/usr/bin/env python -from datetime import datetime -import os -import sys - -from ert.ecl import EclSum, EclSumTStep -from ert.test import ExtendedTestCase - -try: - from synthesizer import OilSimulator -except ImportError as e: - share_lib_path = os.path.join(ExtendedTestCase.findShareRoot(), "lib") - - sys.path.insert(0, share_lib_path) - synthesizer_module = __import__("synthesizer") - OilSimulator = synthesizer_module.OilSimulator - sys.path.pop(0) - - -def globalIndex(i, j, k, nx=10, ny=10, nz=10): - return i + nx * (j - 1) + nx * ny * (k - 1) - - -def readParameters(filename): - params = {} - with open(filename, "r") as f: - for line in f: - key, value = line.split(":", 1) - params[key] = value.strip() - - return params - - -def runSimulator(simulator, history_simulator, time_step_count): - """ @rtype: EclSum """ - ecl_sum = EclSum.writer("SNAKE_OIL_FIELD", datetime(2010, 1, 1), 10, 10, 10) - - ecl_sum.addVariable('FOPT', unit="SM3") - ecl_sum.addVariable('FOPR', unit="SM3/DAY") - ecl_sum.addVariable('FGPT', unit="SM3") - ecl_sum.addVariable('FGPR', unit="SM3/DAY") - ecl_sum.addVariable('FWPT', unit="SM3") - ecl_sum.addVariable('FWPR', unit="SM3/DAY") - ecl_sum.addVariable('FGOR', unit="SM3/SM3") - ecl_sum.addVariable('FWCT', unit="SM3/SM3") - - ecl_sum.addVariable('FOIP', unit="SM3") - ecl_sum.addVariable('FGIP', unit="SM3") - ecl_sum.addVariable('FWIP', unit="SM3") - - ecl_sum.addVariable('FOPTH', unit="SM3") - ecl_sum.addVariable('FOPRH', unit="SM3/DAY") - ecl_sum.addVariable('FGPTH', unit="SM3") - ecl_sum.addVariable('FGPRH', unit="SM3/DAY") - ecl_sum.addVariable('FWPTH', unit="SM3") - ecl_sum.addVariable('FWPRH', unit="SM3/DAY") - ecl_sum.addVariable('FGORH', unit="SM3/SM3") - ecl_sum.addVariable('FWCTH', unit="SM3/SM3") - - ecl_sum.addVariable('FOIPH', unit="SM3") - ecl_sum.addVariable('FGIPH', unit="SM3") - ecl_sum.addVariable('FWIPH', unit="SM3") - - ecl_sum.addVariable('WOPR', wgname='OP1', unit="SM3/DAY") - ecl_sum.addVariable('WOPR', wgname='OP2', unit="SM3/DAY") - ecl_sum.addVariable('WWPR', wgname='OP1', unit="SM3/DAY") - ecl_sum.addVariable('WWPR', wgname='OP2', unit="SM3/DAY") - ecl_sum.addVariable('WGPR', wgname='OP1', unit="SM3/DAY") - ecl_sum.addVariable('WGPR', wgname='OP2', unit="SM3/DAY") - ecl_sum.addVariable('WGOR', wgname='OP1', unit="SM3/SM3") - ecl_sum.addVariable('WGOR', wgname='OP2', unit="SM3/SM3") - ecl_sum.addVariable('WWCT', wgname='OP1', unit="SM3/SM3") - ecl_sum.addVariable('WWCT', wgname='OP2', unit="SM3/SM3") - - ecl_sum.addVariable('WOPRH', wgname='OP1', unit="SM3/DAY") - ecl_sum.addVariable('WOPRH', wgname='OP2', unit="SM3/DAY") - ecl_sum.addVariable('WWPRH', wgname='OP1', unit="SM3/DAY") - ecl_sum.addVariable('WWPRH', wgname='OP2', unit="SM3/DAY") - ecl_sum.addVariable('WGPRH', wgname='OP1', unit="SM3/DAY") - ecl_sum.addVariable('WGPRH', wgname='OP2', unit="SM3/DAY") - ecl_sum.addVariable('WGORH', wgname='OP1', unit="SM3/SM3") - ecl_sum.addVariable('WGORH', wgname='OP2', unit="SM3/SM3") - ecl_sum.addVariable('WWCTH', wgname='OP1', unit="SM3/SM3") - ecl_sum.addVariable('WWCTH', wgname='OP2', unit="SM3/SM3") - - ecl_sum.addVariable('BPR', num=globalIndex(5, 5, 5), unit="BARSA") - ecl_sum.addVariable('BPR', num=globalIndex(1, 3, 8), unit="BARSA") - - time_map = [] - mini_step_count = 10 - total_step_count = time_step_count * mini_step_count - - for report_step in range(time_step_count): - for mini_step in range(mini_step_count): - t_step = ecl_sum.addTStep(report_step + 1, sim_days=report_step * mini_step_count + mini_step) - - time_map.append(t_step.getSimTime().datetime().strftime("%d/%m/%Y")) - - simulator.step(scale=1.0 / total_step_count) - history_simulator.step(scale=1.0 / total_step_count) - - t_step['FOPR'] = simulator.fopr() - t_step['FOPT'] = simulator.fopt() - t_step['FGPR'] = simulator.fgpr() - t_step['FGPT'] = simulator.fgpt() - t_step['FWPR'] = simulator.fwpr() - t_step['FWPT'] = simulator.fwpt() - t_step['FGOR'] = simulator.fgor() - t_step['FWCT'] = simulator.fwct() - - t_step['FOIP'] = simulator.foip() - t_step['FGIP'] = simulator.fgip() - t_step['FWIP'] = simulator.fwip() - - t_step['WOPR:OP1'] = simulator.opr('OP1') - t_step['WOPR:OP2'] = simulator.opr('OP2') - - t_step['WGPR:OP1'] = simulator.gpr('OP1') - t_step['WGPR:OP2'] = simulator.gpr('OP2') - - t_step['WWPR:OP1'] = simulator.wpr('OP1') - t_step['WWPR:OP2'] = simulator.wpr('OP2') - - t_step['WGOR:OP1'] = simulator.gor('OP1') - t_step['WGOR:OP2'] = simulator.gor('OP2') - - t_step['WWCT:OP1'] = simulator.wct('OP1') - t_step['WWCT:OP2'] = simulator.wct('OP2') - - t_step['BPR:5,5,5'] = simulator.bpr('5,5,5') - t_step['BPR:1,3,8'] = simulator.bpr('1,3,8') - - t_step['FOPRH'] = history_simulator.fopr() - t_step['FOPTH'] = history_simulator.fopt() - t_step['FGPRH'] = history_simulator.fgpr() - t_step['FGPTH'] = history_simulator.fgpt() - t_step['FWPRH'] = history_simulator.fwpr() - t_step['FWPTH'] = history_simulator.fwpt() - t_step['FGORH'] = history_simulator.fgor() - t_step['FWCTH'] = history_simulator.fwct() - t_step['FOIPH'] = history_simulator.foip() - t_step['FGIPH'] = history_simulator.fgip() - t_step['FWIPH'] = history_simulator.fwip() - - t_step['WOPRH:OP1'] = history_simulator.opr('OP1') - t_step['WOPRH:OP2'] = history_simulator.opr('OP2') - - t_step['WGPRH:OP1'] = history_simulator.gpr('OP1') - t_step['WGPRH:OP2'] = history_simulator.gpr('OP2') - - t_step['WWPRH:OP1'] = history_simulator.wpr('OP1') - t_step['WWPRH:OP2'] = history_simulator.wpr('OP2') - - t_step['WGORH:OP1'] = history_simulator.gor('OP1') - t_step['WGORH:OP2'] = history_simulator.gor('OP2') - - t_step['WWCTH:OP1'] = history_simulator.wct('OP1') - t_step['WWCTH:OP2'] = history_simulator.wct('OP2') - - return ecl_sum, time_map - - -def roundedInt(value): - return int(round(float(value))) - - -if __name__ == '__main__': - seed = int(readParameters("seed.txt")["SEED"]) - parameters = readParameters("snake_oil_params.txt") - - op1_divergence_scale = float(parameters['OP1_DIVERGENCE_SCALE']) - op2_divergence_scale = float(parameters['OP2_DIVERGENCE_SCALE']) - op1_persistence = float(parameters['OP1_PERSISTENCE']) - op2_persistence = float(parameters['OP2_PERSISTENCE']) - op1_offset = float(parameters['OP1_OFFSET']) - op2_offset = float(parameters['OP2_OFFSET']) - bpr_138_persistence = float(parameters['BPR_138_PERSISTENCE']) - bpr_555_persistence = float(parameters['BPR_555_PERSISTENCE']) - - op1_octaves = roundedInt(parameters['OP1_OCTAVES']) - op2_octaves = roundedInt(parameters['OP2_OCTAVES']) - - simulator = OilSimulator() - simulator.addWell('OP1', seed * 997, persistence=op1_persistence, octaves=op1_octaves, divergence_scale=op1_divergence_scale, offset=op1_offset) - simulator.addWell('OP2', seed * 13, persistence=op2_persistence, octaves=op2_octaves, divergence_scale=op2_divergence_scale, offset=op2_offset) - simulator.addBlock('5,5,5', seed * 37, persistence=bpr_555_persistence) - simulator.addBlock('1,3,8', seed * 31, persistence=bpr_138_persistence) - - history_simulator = OilSimulator() - history_simulator.addWell('OP1', 222118781) - history_simulator.addWell('OP2', 118116362) - - report_step_count = 200 - ecl_sum, time_map = runSimulator(simulator, history_simulator, report_step_count) - - ecl_sum.fwrite() - - with open("time_map.txt", "w") as f: - for t in time_map: - f.write("%s\n" % t) diff --git a/ThirdParty/Ert/test-data/local/snake_oil/observations/observations.txt b/ThirdParty/Ert/test-data/local/snake_oil/observations/observations.txt deleted file mode 100644 index de28837efb..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil/observations/observations.txt +++ /dev/null @@ -1,56 +0,0 @@ -HISTORY_OBSERVATION FOPR; - -SUMMARY_OBSERVATION WOPR_OP1_9 -{ - VALUE = 0.1; - ERROR = 0.05; - RESTART = 9; - KEY = WOPR:OP1; -}; - -SUMMARY_OBSERVATION WOPR_OP1_36 -{ - VALUE = 0.7; - ERROR = 0.07; - RESTART = 36; - KEY = WOPR:OP1; -}; - -SUMMARY_OBSERVATION WOPR_OP1_72 -{ - VALUE = 0.5; - ERROR = 0.05; - RESTART = 72; - KEY = WOPR:OP1; -}; - -SUMMARY_OBSERVATION WOPR_OP1_108 -{ - VALUE = 0.3; - ERROR = 0.075; - RESTART = 108; - KEY = WOPR:OP1; -}; - -SUMMARY_OBSERVATION WOPR_OP1_144 -{ - VALUE = 0.2; - ERROR = 0.035; - RESTART = 144; - KEY = WOPR:OP1; -}; - -SUMMARY_OBSERVATION WOPR_OP1_190 -{ - VALUE = 0.015; - ERROR = 0.01; - RESTART = 190; - KEY = WOPR:OP1; -}; - -GENERAL_OBSERVATION WPR_DIFF_1 { - DATA = SNAKE_OIL_WPR_DIFF; - INDEX_LIST = 400,800,1200,1800; - RESTART = 199; - OBS_FILE = observations/wpr_diff_obs.txt; -}; \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/snake_oil/observations/wpr_diff_obs.txt b/ThirdParty/Ert/test-data/local/snake_oil/observations/wpr_diff_obs.txt deleted file mode 100644 index 4aee6d7ef7..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil/observations/wpr_diff_obs.txt +++ /dev/null @@ -1,4 +0,0 @@ -0.0 0.1 -0.1 0.2 -0.2 0.15 -0.0 0.05 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/refcase/SNAKE_OIL_FIELD.SMSPEC b/ThirdParty/Ert/test-data/local/snake_oil/refcase/SNAKE_OIL_FIELD.SMSPEC deleted file mode 100644 index c5aa629876..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/refcase/SNAKE_OIL_FIELD.SMSPEC and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/refcase/SNAKE_OIL_FIELD.UNSMRY b/ThirdParty/Ert/test-data/local/snake_oil/refcase/SNAKE_OIL_FIELD.UNSMRY deleted file mode 100644 index 854f523fa7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/refcase/SNAKE_OIL_FIELD.UNSMRY and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/snake_oil.ert b/ThirdParty/Ert/test-data/local/snake_oil/snake_oil.ert deleted file mode 100644 index e3dfe76b53..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil/snake_oil.ert +++ /dev/null @@ -1,39 +0,0 @@ -QUEUE_SYSTEM LOCAL - -JOBNAME SNAKE_OIL_%d -NUM_REALIZATIONS 25 - -DEFINE storage/ - -STORE_SEED SEED -LOAD_SEED SEED - -RUNPATH /runpath/realisation-%d/iter-%d -ENSPATH /ensemble -ECLBASE SNAKE_OIL_FIELD -SUMMARY * - -HISTORY_SOURCE REFCASE_HISTORY -REFCASE refcase/SNAKE_OIL_FIELD - -TIME_MAP refcase/time_map.txt -OBS_CONFIG observations/observations.txt - -INSTALL_JOB SNAKE_OIL_SIMULATOR jobs/SNAKE_OIL_SIMULATOR -INSTALL_JOB SNAKE_OIL_NPV jobs/SNAKE_OIL_NPV -INSTALL_JOB SNAKE_OIL_DIFF jobs/SNAKE_OIL_DIFF - -FORWARD_MODEL SNAKE_OIL_SIMULATOR -FORWARD_MODEL SNAKE_OIL_NPV -FORWARD_MODEL SNAKE_OIL_DIFF - -RUN_TEMPLATE templates/seed_template.txt seed.txt -GEN_KW SNAKE_OIL_PARAM templates/snake_oil_template.txt snake_oil_params.txt parameters/snake_oil_parameters.txt -CUSTOM_KW SNAKE_OIL_NPV snake_oil_npv.txt -GEN_DATA SNAKE_OIL_OPR_DIFF INPUT_FORMAT:ASCII RESULT_FILE:snake_oil_opr_diff_%d.txt REPORT_STEPS:199 -GEN_DATA SNAKE_OIL_WPR_DIFF INPUT_FORMAT:ASCII RESULT_FILE:snake_oil_wpr_diff_%d.txt REPORT_STEPS:199 -GEN_DATA SNAKE_OIL_GPR_DIFF INPUT_FORMAT:ASCII RESULT_FILE:snake_oil_gpr_diff_%d.txt REPORT_STEPS:199 - -LOG_LEVEL 3 -LOG_FILE log/log.txt -UPDATE_LOG_PATH log/update diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/current_case b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/current_case deleted file mode 100644 index abe2ad0fa3..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/current_case +++ /dev/null @@ -1 +0,0 @@ -default_0 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/0199/files/SNAKE_OIL_GPR_DIFF_active b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/0199/files/SNAKE_OIL_GPR_DIFF_active deleted file mode 100644 index 200047ee9e..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/0199/files/SNAKE_OIL_GPR_DIFF_active and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/0199/files/SNAKE_OIL_OPR_DIFF_active b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/0199/files/SNAKE_OIL_OPR_DIFF_active deleted file mode 100644 index 200047ee9e..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/0199/files/SNAKE_OIL_OPR_DIFF_active and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/0199/files/SNAKE_OIL_WPR_DIFF_active b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/0199/files/SNAKE_OIL_WPR_DIFF_active deleted file mode 100644 index 200047ee9e..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/0199/files/SNAKE_OIL_WPR_DIFF_active and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/FORECAST.data_0 deleted file mode 100644 index f903ae21cf..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/FORECAST.index deleted file mode 100644 index ea3e7b2759..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/PARAMETER.data_0 deleted file mode 100644 index 914e758e0a..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/PARAMETER.index deleted file mode 100644 index 394a6acddb..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_0/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/FORECAST.data_0 deleted file mode 100644 index a0c416f1a2..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/FORECAST.index deleted file mode 100644 index b13f099382..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/PARAMETER.data_0 deleted file mode 100644 index c729e0adca..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/PARAMETER.index deleted file mode 100644 index 7faf5e3e70..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_1/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/FORECAST.data_0 deleted file mode 100644 index b3afe7d7da..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/FORECAST.index deleted file mode 100644 index 4c4f038743..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/PARAMETER.data_0 deleted file mode 100644 index 89089d51ff..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/PARAMETER.index deleted file mode 100644 index 9ae730ac13..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_10/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/FORECAST.data_0 deleted file mode 100644 index e449618e19..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/FORECAST.index deleted file mode 100644 index fcba30db17..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/PARAMETER.data_0 deleted file mode 100644 index 8901a336c2..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/PARAMETER.index deleted file mode 100644 index a1761eace2..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_11/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/FORECAST.data_0 deleted file mode 100644 index bda1686421..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/FORECAST.index deleted file mode 100644 index 74511a9abc..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/PARAMETER.data_0 deleted file mode 100644 index 38f6f229be..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/PARAMETER.index deleted file mode 100644 index 7ed2b239ba..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_12/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/FORECAST.data_0 deleted file mode 100644 index e3e9a7b88f..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/FORECAST.index deleted file mode 100644 index 3f775f8853..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/PARAMETER.data_0 deleted file mode 100644 index e81f2dac3a..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/PARAMETER.index deleted file mode 100644 index eb7291b587..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_13/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/FORECAST.data_0 deleted file mode 100644 index e13ec6e9e9..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/FORECAST.index deleted file mode 100644 index 56143a90b4..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/PARAMETER.data_0 deleted file mode 100644 index 7abd7ab116..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/PARAMETER.index deleted file mode 100644 index 5e147e8afa..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_14/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/FORECAST.data_0 deleted file mode 100644 index f7a62199f5..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/FORECAST.index deleted file mode 100644 index fa19a420df..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/PARAMETER.data_0 deleted file mode 100644 index d5a3cc93ac..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/PARAMETER.index deleted file mode 100644 index 3e91b06866..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_15/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/FORECAST.data_0 deleted file mode 100644 index 1255e298ae..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/FORECAST.index deleted file mode 100644 index 1460540829..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/PARAMETER.data_0 deleted file mode 100644 index 0f7fb022ce..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/PARAMETER.index deleted file mode 100644 index 863806367a..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_16/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/FORECAST.data_0 deleted file mode 100644 index 6cccb3e4dc..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/FORECAST.index deleted file mode 100644 index f1908387fb..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/PARAMETER.data_0 deleted file mode 100644 index e6042a0cb4..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/PARAMETER.index deleted file mode 100644 index 796c562bd6..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_17/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/FORECAST.data_0 deleted file mode 100644 index 5c1128da5f..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/FORECAST.index deleted file mode 100644 index 3c5f22a423..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/PARAMETER.data_0 deleted file mode 100644 index 5ac5e6633b..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/PARAMETER.index deleted file mode 100644 index 31f31b7c81..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_18/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/FORECAST.data_0 deleted file mode 100644 index eb0f346253..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/FORECAST.index deleted file mode 100644 index 7181e4036c..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/PARAMETER.data_0 deleted file mode 100644 index b9393bd3d1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/PARAMETER.index deleted file mode 100644 index bc3f4758ad..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_19/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/FORECAST.data_0 deleted file mode 100644 index d684b0e58a..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/FORECAST.index deleted file mode 100644 index 560a822527..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/PARAMETER.data_0 deleted file mode 100644 index 1b78159dc1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/PARAMETER.index deleted file mode 100644 index 98e78da568..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_2/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/FORECAST.data_0 deleted file mode 100644 index 0193c9858f..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/FORECAST.index deleted file mode 100644 index 62cfffa12c..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/PARAMETER.data_0 deleted file mode 100644 index f804b9c01b..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/PARAMETER.index deleted file mode 100644 index bacebc6b31..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_20/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/FORECAST.data_0 deleted file mode 100644 index d0f0b09d96..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/FORECAST.index deleted file mode 100644 index 827472ecd2..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/PARAMETER.data_0 deleted file mode 100644 index ba2c8fcb43..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/PARAMETER.index deleted file mode 100644 index bbc36c7045..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_21/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/FORECAST.data_0 deleted file mode 100644 index 38299e9bad..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/FORECAST.index deleted file mode 100644 index 93b2a8a40f..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/PARAMETER.data_0 deleted file mode 100644 index 0be9c7bd1b..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/PARAMETER.index deleted file mode 100644 index 8775a960fb..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_22/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/FORECAST.data_0 deleted file mode 100644 index cc4636a3ae..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/FORECAST.index deleted file mode 100644 index 457dbed536..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/PARAMETER.data_0 deleted file mode 100644 index ef0f06cab0..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/PARAMETER.index deleted file mode 100644 index 5cead4c75c..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_23/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/FORECAST.data_0 deleted file mode 100644 index 6288c34a79..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/FORECAST.index deleted file mode 100644 index fe66f53d31..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/PARAMETER.data_0 deleted file mode 100644 index 41ecb4c3a6..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/PARAMETER.index deleted file mode 100644 index db5e6dd43d..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_24/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/FORECAST.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/PARAMETER.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_25/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/FORECAST.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/PARAMETER.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_26/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/FORECAST.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/PARAMETER.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_27/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/FORECAST.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/PARAMETER.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_28/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/FORECAST.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/PARAMETER.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_29/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/FORECAST.data_0 deleted file mode 100644 index d712b2fd9f..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/FORECAST.index deleted file mode 100644 index ecdfc3d830..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/PARAMETER.data_0 deleted file mode 100644 index a137a5e6b1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/PARAMETER.index deleted file mode 100644 index 76c019a3a7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_3/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/FORECAST.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/PARAMETER.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_30/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/FORECAST.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/PARAMETER.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_31/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/FORECAST.data_0 deleted file mode 100644 index 732dacdc28..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/FORECAST.index deleted file mode 100644 index ca34110546..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/PARAMETER.data_0 deleted file mode 100644 index 7f52a5fe22..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/PARAMETER.index deleted file mode 100644 index 78ef983cb5..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_4/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/FORECAST.data_0 deleted file mode 100644 index fbe0a4b97a..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/FORECAST.index deleted file mode 100644 index 55f38217c3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/PARAMETER.data_0 deleted file mode 100644 index 2f431ce03d..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/PARAMETER.index deleted file mode 100644 index 2cda545a60..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_5/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/FORECAST.data_0 deleted file mode 100644 index b45e5214a8..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/FORECAST.index deleted file mode 100644 index 4fb2f8d61d..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/PARAMETER.data_0 deleted file mode 100644 index 3023b7b1ca..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/PARAMETER.index deleted file mode 100644 index 28ddb9559c..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_6/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/FORECAST.data_0 deleted file mode 100644 index 86542a2006..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/FORECAST.index deleted file mode 100644 index 78b322106e..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/PARAMETER.data_0 deleted file mode 100644 index 05dee2ddd2..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/PARAMETER.index deleted file mode 100644 index 0cb9ab22af..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_7/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/FORECAST.data_0 deleted file mode 100644 index a7e80be3b9..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/FORECAST.index deleted file mode 100644 index 865dde56f7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/PARAMETER.data_0 deleted file mode 100644 index 7664ed432b..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/PARAMETER.index deleted file mode 100644 index 113befd57e..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_8/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/ANALYZED.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/FORECAST.data_0 deleted file mode 100644 index f1417e17ce..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/FORECAST.index deleted file mode 100644 index c661372176..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/PARAMETER.data_0 deleted file mode 100644 index 3ec5272b40..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/PARAMETER.index deleted file mode 100644 index 9a2da48679..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/STATIC.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Ensemble/mod_9/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Index/INDEX.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Index/INDEX.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Index/INDEX.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Index/INDEX.index deleted file mode 100644 index 4377afdcd7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Index/INDEX.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Index/INDEX.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Index/INDEX.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/Index/INDEX.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/ert_fstab b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/ert_fstab deleted file mode 100644 index a5d67ad3a3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/ert_fstab and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/files/case_config b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/files/case_config deleted file mode 100644 index 593f4708db..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/files/case_config and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/files/custom_kw_config_set b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/files/custom_kw_config_set deleted file mode 100644 index ec71bfdcb0..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/files/custom_kw_config_set and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/files/state-map b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/files/state-map deleted file mode 100644 index 847546ba7a..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/files/state-map and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/files/summary-key-set b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/files/summary-key-set deleted file mode 100644 index 374e250937..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/files/summary-key-set and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/files/time-map b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/files/time-map deleted file mode 100644 index 75e73e5c3c..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_0/files/time-map and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/FORECAST.data_0 deleted file mode 100644 index 7712e6890c..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/FORECAST.index deleted file mode 100644 index 2ec82d5de2..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/PARAMETER.data_0 deleted file mode 100644 index 7a759415c8..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/PARAMETER.index deleted file mode 100644 index 124fd15292..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_0/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/FORECAST.data_0 deleted file mode 100644 index f6cc9a9d7e..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/FORECAST.index deleted file mode 100644 index afa1d3eb13..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/PARAMETER.data_0 deleted file mode 100644 index 69a76c69ef..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/PARAMETER.index deleted file mode 100644 index b3d275e53f..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_1/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/FORECAST.data_0 deleted file mode 100644 index 9088aaea34..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/FORECAST.index deleted file mode 100644 index 6491ad708a..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/PARAMETER.data_0 deleted file mode 100644 index d13d1306c1..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/PARAMETER.index deleted file mode 100644 index f7a5c2b1ce..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_10/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/FORECAST.data_0 deleted file mode 100644 index bd132b8b6a..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/FORECAST.index deleted file mode 100644 index aa96a8a85c..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/PARAMETER.data_0 deleted file mode 100644 index 8dbe842ea4..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/PARAMETER.index deleted file mode 100644 index 93ec9e230f..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_11/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/FORECAST.data_0 deleted file mode 100644 index e13367c600..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/FORECAST.index deleted file mode 100644 index c32bea2654..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/PARAMETER.data_0 deleted file mode 100644 index 06192b663d..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/PARAMETER.index deleted file mode 100644 index 1b3e2dd2fb..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_12/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/FORECAST.data_0 deleted file mode 100644 index 88f2616412..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/FORECAST.index deleted file mode 100644 index c9cabd67fe..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/PARAMETER.data_0 deleted file mode 100644 index 0f77feb613..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/PARAMETER.index deleted file mode 100644 index 28e06a2b12..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_13/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/FORECAST.data_0 deleted file mode 100644 index 15ba295ff2..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/FORECAST.index deleted file mode 100644 index b0f52d5067..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/PARAMETER.data_0 deleted file mode 100644 index e8778073dc..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/PARAMETER.index deleted file mode 100644 index 4a3adecf64..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_14/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/FORECAST.data_0 deleted file mode 100644 index ca6fcfd5b5..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/FORECAST.index deleted file mode 100644 index 2852e1d32f..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/PARAMETER.data_0 deleted file mode 100644 index 30b22bb326..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/PARAMETER.index deleted file mode 100644 index d72eca1831..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_15/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/FORECAST.data_0 deleted file mode 100644 index f1a07702af..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/FORECAST.index deleted file mode 100644 index aca2e32260..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/PARAMETER.data_0 deleted file mode 100644 index f29b9e20c3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/PARAMETER.index deleted file mode 100644 index 25fdec4685..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_16/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/FORECAST.data_0 deleted file mode 100644 index a33bfb12cb..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/FORECAST.index deleted file mode 100644 index 2f9c397b4d..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/PARAMETER.data_0 deleted file mode 100644 index 6e82c5c2db..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/PARAMETER.index deleted file mode 100644 index 4dc7149bcf..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_17/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/FORECAST.data_0 deleted file mode 100644 index 7c069ba069..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/FORECAST.index deleted file mode 100644 index d3ad129f4d..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/PARAMETER.data_0 deleted file mode 100644 index 91e1000417..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/PARAMETER.index deleted file mode 100644 index 8137e1e626..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_18/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/FORECAST.data_0 deleted file mode 100644 index 5ad52e627a..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/FORECAST.index deleted file mode 100644 index 8006b4ea6a..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/PARAMETER.data_0 deleted file mode 100644 index 487f09c68f..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/PARAMETER.index deleted file mode 100644 index 97668fe2ba..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_19/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/FORECAST.data_0 deleted file mode 100644 index d2f61efb51..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/FORECAST.index deleted file mode 100644 index 1e38fe0e2b..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/PARAMETER.data_0 deleted file mode 100644 index 96b186a466..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/PARAMETER.index deleted file mode 100644 index cfc51a05e8..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_2/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/FORECAST.data_0 deleted file mode 100644 index 982a2723e3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/FORECAST.index deleted file mode 100644 index 9b280c1568..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/PARAMETER.data_0 deleted file mode 100644 index 86829b2270..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/PARAMETER.index deleted file mode 100644 index c33aed0d8a..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_20/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/FORECAST.data_0 deleted file mode 100644 index 3bc4bc3caa..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/FORECAST.index deleted file mode 100644 index fe0f0d7c2f..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/PARAMETER.data_0 deleted file mode 100644 index 7873a46f81..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/PARAMETER.index deleted file mode 100644 index 1cf58d702b..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_21/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/FORECAST.data_0 deleted file mode 100644 index 367a2add56..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/FORECAST.index deleted file mode 100644 index 432db22d86..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/PARAMETER.data_0 deleted file mode 100644 index ae315352ba..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/PARAMETER.index deleted file mode 100644 index e4ae83c833..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_22/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/FORECAST.data_0 deleted file mode 100644 index 8b9b240ee5..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/FORECAST.index deleted file mode 100644 index f086160709..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/PARAMETER.data_0 deleted file mode 100644 index 8e6f6150a0..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/PARAMETER.index deleted file mode 100644 index 81a864974b..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_23/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/FORECAST.data_0 deleted file mode 100644 index f948378ae4..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/FORECAST.index deleted file mode 100644 index 635db16f6f..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/PARAMETER.data_0 deleted file mode 100644 index dc0a0e1631..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/PARAMETER.index deleted file mode 100644 index 105c02c7b8..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_24/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/FORECAST.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/PARAMETER.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_25/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/FORECAST.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/PARAMETER.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_26/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/FORECAST.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/PARAMETER.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_27/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/FORECAST.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/PARAMETER.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_28/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/FORECAST.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/PARAMETER.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_29/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/FORECAST.data_0 deleted file mode 100644 index b36f758a29..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/FORECAST.index deleted file mode 100644 index e3a507872d..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/PARAMETER.data_0 deleted file mode 100644 index b1f41588e5..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/PARAMETER.index deleted file mode 100644 index 14e4241100..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_3/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/FORECAST.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/PARAMETER.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_30/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/FORECAST.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/FORECAST.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/PARAMETER.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/PARAMETER.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_31/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/FORECAST.data_0 deleted file mode 100644 index afb802c53b..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/FORECAST.index deleted file mode 100644 index e7bdf52f5a..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/PARAMETER.data_0 deleted file mode 100644 index 01708a37a9..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/PARAMETER.index deleted file mode 100644 index fec5f5d82e..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_4/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/FORECAST.data_0 deleted file mode 100644 index 808f1841fb..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/FORECAST.index deleted file mode 100644 index 3fb65418a0..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/PARAMETER.data_0 deleted file mode 100644 index 7ae7c0f6cd..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/PARAMETER.index deleted file mode 100644 index 0018eecf4c..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_5/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/FORECAST.data_0 deleted file mode 100644 index 6142d1e6a8..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/FORECAST.index deleted file mode 100644 index 2ac26beb09..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/PARAMETER.data_0 deleted file mode 100644 index b0d6438d5e..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/PARAMETER.index deleted file mode 100644 index 031003b32e..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_6/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/FORECAST.data_0 deleted file mode 100644 index ab1521c915..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/FORECAST.index deleted file mode 100644 index aa3e002d22..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/PARAMETER.data_0 deleted file mode 100644 index 5f970b15fd..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/PARAMETER.index deleted file mode 100644 index d2054df4c9..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_7/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/FORECAST.data_0 deleted file mode 100644 index 41d0a4aaa7..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/FORECAST.index deleted file mode 100644 index 6803d23177..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/PARAMETER.data_0 deleted file mode 100644 index b2a3976b54..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/PARAMETER.index deleted file mode 100644 index 506140f1b5..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_8/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/ANALYZED.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/ANALYZED.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/ANALYZED.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/ANALYZED.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/ANALYZED.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/ANALYZED.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/ANALYZED.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/ANALYZED.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/FORECAST.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/FORECAST.data_0 deleted file mode 100644 index ed5fbcde99..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/FORECAST.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/FORECAST.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/FORECAST.index deleted file mode 100644 index 1f1df9fac4..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/FORECAST.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/FORECAST.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/FORECAST.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/FORECAST.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/PARAMETER.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/PARAMETER.data_0 deleted file mode 100644 index 9c68873c7a..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/PARAMETER.data_0 and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/PARAMETER.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/PARAMETER.index deleted file mode 100644 index e62045d14a..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/PARAMETER.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/PARAMETER.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/PARAMETER.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/PARAMETER.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/STATIC.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/STATIC.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/STATIC.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/STATIC.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/STATIC.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/STATIC.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/STATIC.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Ensemble/mod_9/STATIC.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Index/INDEX.data_0 b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Index/INDEX.data_0 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Index/INDEX.index b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Index/INDEX.index deleted file mode 100644 index 6ae8e93535..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Index/INDEX.index and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Index/INDEX.mnt b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Index/INDEX.mnt deleted file mode 100644 index 5280360395..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/Index/INDEX.mnt and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/ert_fstab b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/ert_fstab deleted file mode 100644 index a5d67ad3a3..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/ert_fstab and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/files/case_config b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/files/case_config deleted file mode 100644 index 593f4708db..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/files/case_config and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/files/custom_kw_config_set b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/files/custom_kw_config_set deleted file mode 100644 index ec71bfdcb0..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/files/custom_kw_config_set and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/files/state-map b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/files/state-map deleted file mode 100644 index 847546ba7a..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/files/state-map and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/files/summary-key-set b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/files/summary-key-set deleted file mode 100644 index 374e250937..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/files/summary-key-set and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/files/time-map b/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/files/time-map deleted file mode 100644 index 75e73e5c3c..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil/storage/snake_oil/ensemble/default_1/files/time-map and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/SEED b/ThirdParty/Ert/test-data/local/snake_oil_field/SEED deleted file mode 100644 index 314cda88f6..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/SEED +++ /dev/null @@ -1 +0,0 @@ -67 -110 42 -42 106 34 96 0 18 42 76 -69 44 -40 -78 -61 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx0.grdecl b/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx0.grdecl deleted file mode 100644 index 481f9d8b83..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx0.grdecl +++ /dev/null @@ -1,127 +0,0 @@ -PERMX - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 - 0.92063643E-01 0.92063643E-01 0.92063643E-01 0.92063643E-01 -/ diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx1.grdecl b/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx1.grdecl deleted file mode 100644 index 03959ed75a..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx1.grdecl +++ /dev/null @@ -1,127 +0,0 @@ -PERMX - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 - 0.53819609E+00 0.53819609E+00 0.53819609E+00 0.53819609E+00 -/ diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx2.grdecl b/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx2.grdecl deleted file mode 100644 index 7d8e9bb96a..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx2.grdecl +++ /dev/null @@ -1,127 +0,0 @@ -PERMX - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 - 0.84981030E+00 0.84981030E+00 0.84981030E+00 0.84981030E+00 -/ diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx3.grdecl b/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx3.grdecl deleted file mode 100644 index 5b733e38b2..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx3.grdecl +++ /dev/null @@ -1,127 +0,0 @@ -PERMX - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 - 0.24182262E+00 0.24182262E+00 0.24182262E+00 0.24182262E+00 -/ diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx4.grdecl b/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx4.grdecl deleted file mode 100644 index 39a483cea1..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx4.grdecl +++ /dev/null @@ -1,127 +0,0 @@ -PERMX - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 - 0.59172921E-01 0.59172921E-01 0.59172921E-01 0.59172921E-01 -/ diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx5.grdecl b/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx5.grdecl deleted file mode 100644 index 9286ac8ec9..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx5.grdecl +++ /dev/null @@ -1,127 +0,0 @@ -PERMX - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 - 0.76347315E+00 0.76347315E+00 0.76347315E+00 0.76347315E+00 -/ diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx6.grdecl b/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx6.grdecl deleted file mode 100644 index 8e33d568fe..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx6.grdecl +++ /dev/null @@ -1,127 +0,0 @@ -PERMX - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 - 0.37705892E+00 0.37705892E+00 0.37705892E+00 0.37705892E+00 -/ diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx7.grdecl b/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx7.grdecl deleted file mode 100644 index 399a9fc9d0..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx7.grdecl +++ /dev/null @@ -1,127 +0,0 @@ -PERMX - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 - 0.84188782E-01 0.84188782E-01 0.84188782E-01 0.84188782E-01 -/ diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx8.grdecl b/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx8.grdecl deleted file mode 100644 index ec1f83277b..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx8.grdecl +++ /dev/null @@ -1,127 +0,0 @@ -PERMX - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 - 0.52828066E-01 0.52828066E-01 0.52828066E-01 0.52828066E-01 -/ diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx9.grdecl b/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx9.grdecl deleted file mode 100644 index 02dd5a1a0e..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/permx9.grdecl +++ /dev/null @@ -1,127 +0,0 @@ -PERMX - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 - 0.67972553E+00 0.67972553E+00 0.67972553E+00 0.67972553E+00 -/ diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro0.grdecl b/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro0.grdecl deleted file mode 100644 index b6075fa61d..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro0.grdecl +++ /dev/null @@ -1,127 +0,0 @@ -PORO - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 - 0.94346166E+00 0.94346166E+00 0.94346166E+00 0.94346166E+00 -/ diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro1.grdecl b/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro1.grdecl deleted file mode 100644 index e814818eb8..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro1.grdecl +++ /dev/null @@ -1,127 +0,0 @@ -PORO - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 - 0.68036640E+00 0.68036640E+00 0.68036640E+00 0.68036640E+00 -/ diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro2.grdecl b/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro2.grdecl deleted file mode 100644 index ba3eb9d6e8..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro2.grdecl +++ /dev/null @@ -1,127 +0,0 @@ -PORO - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 - 0.21387884E+00 0.21387884E+00 0.21387884E+00 0.21387884E+00 -/ diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro3.grdecl b/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro3.grdecl deleted file mode 100644 index f276fb55a3..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro3.grdecl +++ /dev/null @@ -1,127 +0,0 @@ -PORO - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 - 0.72398102E+00 0.72398102E+00 0.72398102E+00 0.72398102E+00 -/ diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro4.grdecl b/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro4.grdecl deleted file mode 100644 index 934fecb3ed..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro4.grdecl +++ /dev/null @@ -1,127 +0,0 @@ -PORO - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 - 0.68414760E+00 0.68414760E+00 0.68414760E+00 0.68414760E+00 -/ diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro5.grdecl b/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro5.grdecl deleted file mode 100644 index b0448eb974..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro5.grdecl +++ /dev/null @@ -1,127 +0,0 @@ -PORO - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 - 0.81912923E+00 0.81912923E+00 0.81912923E+00 0.81912923E+00 -/ diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro6.grdecl b/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro6.grdecl deleted file mode 100644 index 919c438a61..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro6.grdecl +++ /dev/null @@ -1,127 +0,0 @@ -PORO - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 - 0.43541095E+00 0.43541095E+00 0.43541095E+00 0.43541095E+00 -/ diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro7.grdecl b/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro7.grdecl deleted file mode 100644 index f8a6beed8d..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro7.grdecl +++ /dev/null @@ -1,127 +0,0 @@ -PORO - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 - 0.48421845E+00 0.48421845E+00 0.48421845E+00 0.48421845E+00 -/ diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro8.grdecl b/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro8.grdecl deleted file mode 100644 index 285e34c970..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro8.grdecl +++ /dev/null @@ -1,127 +0,0 @@ -PORO - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 - 0.98167807E+00 0.98167807E+00 0.98167807E+00 0.98167807E+00 -/ diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro9.grdecl b/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro9.grdecl deleted file mode 100644 index 1b0faeefd0..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/fields/poro9.grdecl +++ /dev/null @@ -1,127 +0,0 @@ -PORO - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 - 0.82837886E+00 0.82837886E+00 0.82837886E+00 0.82837886E+00 -/ diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/grid/CASE.EGRID b/ThirdParty/Ert/test-data/local/snake_oil_field/grid/CASE.EGRID deleted file mode 100644 index 33da9f7a70..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil_field/grid/CASE.EGRID and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/jobs/SNAKE_OIL_DIFF b/ThirdParty/Ert/test-data/local/snake_oil_field/jobs/SNAKE_OIL_DIFF deleted file mode 100644 index 98a867d959..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/jobs/SNAKE_OIL_DIFF +++ /dev/null @@ -1,4 +0,0 @@ -STDOUT snake_oil_diff.stdout -STDERR snake_oil_diff.stderr - -EXECUTABLE snake_oil_diff.py \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/jobs/SNAKE_OIL_NPV b/ThirdParty/Ert/test-data/local/snake_oil_field/jobs/SNAKE_OIL_NPV deleted file mode 100644 index 887830c756..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/jobs/SNAKE_OIL_NPV +++ /dev/null @@ -1,4 +0,0 @@ -STDOUT snake_oil_npv.stdout -STDERR snake_oil_npv.stderr - -EXECUTABLE snake_oil_npv.py \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/jobs/SNAKE_OIL_SIMULATOR b/ThirdParty/Ert/test-data/local/snake_oil_field/jobs/SNAKE_OIL_SIMULATOR deleted file mode 100644 index b4b7f9928f..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/jobs/SNAKE_OIL_SIMULATOR +++ /dev/null @@ -1,4 +0,0 @@ -STDOUT snake_oil.stdout -STDERR snake_oil.stderr - -EXECUTABLE snake_oil_simulator.py \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/jobs/snake_oil_diff.py b/ThirdParty/Ert/test-data/local/snake_oil_field/jobs/snake_oil_diff.py deleted file mode 100644 index afabb261f9..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/jobs/snake_oil_diff.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python -from ert.ecl import EclSum - -def writeDiff(filename, vector1, vector2): - with open(filename, "w") as f: - for index in range(len(vector1)): - node1 = vector1[index] - node2 = vector2[index] - - diff = node1.value - node2.value - f.write("%f\n" % diff) - - -if __name__ == '__main__': - ecl_sum = EclSum("SNAKE_OIL_FIELD") - - report_step = 199 - writeDiff("snake_oil_opr_diff_%d.txt" % report_step, ecl_sum["WOPR:OP1"], ecl_sum["WOPR:OP2"]) - writeDiff("snake_oil_wpr_diff_%d.txt" % report_step, ecl_sum["WWPR:OP1"], ecl_sum["WWPR:OP2"]) - writeDiff("snake_oil_gpr_diff_%d.txt" % report_step, ecl_sum["WGPR:OP1"], ecl_sum["WGPR:OP2"]) - - - - diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/jobs/snake_oil_npv.py b/ThirdParty/Ert/test-data/local/snake_oil_field/jobs/snake_oil_npv.py deleted file mode 100644 index 4ff61251bc..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/jobs/snake_oil_npv.py +++ /dev/null @@ -1,103 +0,0 @@ -#!/usr/bin/env python -from ert.ecl import EclSum - -OIL_PRICES = {"2010-01-01": 78.33, - "2010-02-01": 76.39, - "2010-03-01": 81.20, - "2010-04-01": 84.29, - "2010-05-01": 73.74, - "2010-06-01": 75.34, - "2010-07-01": 76.32, - "2010-08-01": 76.60, - "2010-09-01": 75.24, - "2010-10-01": 81.89, - "2010-11-01": 84.25, - "2010-12-01": 89.15, - "2011-01-01": 89.17, - "2011-02-01": 88.58, - "2011-03-01": 102.86, - "2011-04-01": 109.53, - "2011-05-01": 100.90, - "2011-06-01": 96.26, - "2011-07-01": 97.30, - "2011-08-01": 86.33, - "2011-09-01": 85.52, - "2011-10-01": 86.32, - "2011-11-01": 97.16, - "2011-12-01": 98.56, - "2012-01-01": 100.27, - "2012-02-01": 102.20, - "2012-03-01": 106.16, - "2012-04-01": 103.32, - "2012-05-01": 94.65, - "2012-06-01": 82.30, - "2012-07-01": 87.90, - "2012-08-01": 94.13, - "2012-09-01": 94.51, - "2012-10-01": 89.49, - "2012-11-01": 86.53, - "2012-12-01": 87.86, - "2013-01-01": 94.76, - "2013-02-01": 95.31, - "2013-03-01": 92.94, - "2013-04-01": 92.02, - "2013-05-01": 94.51, - "2013-06-01": 95.77, - "2013-07-01": 104.67, - "2013-08-01": 106.57, - "2013-09-01": 106.29, - "2013-10-01": 100.54, - "2013-11-01": 93.86, - "2013-12-01": 97.63, - "2014-01-01": 94.62, - "2014-02-01": 100.82, - "2014-03-01": 100.80, - "2014-04-01": 102.07, - "2014-05-01": 102.18, - "2014-06-01": 105.79, - "2014-07-01": 103.59, - "2014-08-01": 96.54, - "2014-09-01": 93.21, - "2014-10-01": 84.40, - "2014-11-01": 75.79, - "2014-12-01": 59.29, - "2015-01-01": 47.22, - "2015-02-01": 50.58, - "2015-03-01": 47.82, - "2015-04-01": 54.45, - "2015-05-01": 59.27, - "2015-06-01": 59.82, - "2015-07-01": 50.90, - "2015-08-01": 42.87, - "2015-09-01": 45.48} - -if __name__ == '__main__': - ecl_sum = EclSum("SNAKE_OIL_FIELD") - start_time = ecl_sum.getStartTime() - date_ranges = ecl_sum.timeRange(start_time, interval="1M") - production_sums = ecl_sum.blockedProduction("FOPT", date_ranges) - - npv = 0.0 - for index in range(0, len(date_ranges) - 1): - date = date_ranges[index + 1] # end of period - production_sum = production_sums[index] - - oil_price = OIL_PRICES[date.date().strftime("%Y-%m-%d")] - - production_value = oil_price * production_sum - npv += production_value - - with open("snake_oil_npv.txt", "w") as output_file: - output_file.write("NPV %s\n" % npv) - - if npv < 80000: - rating = "POOR" - elif 80000 <= npv < 100000: - rating = "AVERAGE" - elif 100000 <= npv < 120000: - rating = "GOOD" - else: - rating = "EXCELLENT" - - output_file.write("RATING %s\n" % rating) - diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/jobs/snake_oil_simulator.py b/ThirdParty/Ert/test-data/local/snake_oil_field/jobs/snake_oil_simulator.py deleted file mode 100644 index 1724cea874..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/jobs/snake_oil_simulator.py +++ /dev/null @@ -1,185 +0,0 @@ -#!/usr/bin/env python -from datetime import datetime -import os -import sys - -from ert.ecl import EclSum, EclSumTStep -from ert.test import ExtendedTestCase - -try: - from synthesizer import OilSimulator -except ImportError as e: - share_lib_path = os.path.join(ExtendedTestCase.findShareRoot(), "lib") - - sys.path.insert(0, share_lib_path) - synthesizer_module = __import__("synthesizer") - OilSimulator = synthesizer_module.OilSimulator - sys.path.pop(0) - - -def globalIndex(i, j, k, nx=10, ny=10, nz=10): - return i + nx * (j - 1) + nx * ny * (k - 1) - - -def readParameters(filename): - params = {} - with open(filename, "r") as f: - for line in f: - key, value = line.split(":", 1) - params[key] = value.strip() - - return params - - -def runSimulator(simulator, history_simulator, time_step_count): - """ @rtype: EclSum """ - ecl_sum = EclSum.writer("SNAKE_OIL_FIELD", datetime(2010, 1, 1), 10, 10, 10) - - ecl_sum.addVariable("FOPT") - ecl_sum.addVariable("FOPR") - ecl_sum.addVariable("FGPT") - ecl_sum.addVariable("FGPR") - ecl_sum.addVariable("FWPT") - ecl_sum.addVariable("FWPR") - ecl_sum.addVariable("FGOR") - ecl_sum.addVariable("FWCT") - - ecl_sum.addVariable("FOPTH") - ecl_sum.addVariable("FOPRH") - ecl_sum.addVariable("FGPTH") - ecl_sum.addVariable("FGPRH") - ecl_sum.addVariable("FWPTH") - ecl_sum.addVariable("FWPRH") - ecl_sum.addVariable("FGORH") - ecl_sum.addVariable("FWCTH") - - ecl_sum.addVariable("WOPR", wgname="OP1") - ecl_sum.addVariable("WOPR", wgname="OP2") - ecl_sum.addVariable("WWPR", wgname="OP1") - ecl_sum.addVariable("WWPR", wgname="OP2") - ecl_sum.addVariable("WGPR", wgname="OP1") - ecl_sum.addVariable("WGPR", wgname="OP2") - ecl_sum.addVariable("WGOR", wgname="OP1") - ecl_sum.addVariable("WGOR", wgname="OP2") - ecl_sum.addVariable("WWCT", wgname="OP1") - ecl_sum.addVariable("WWCT", wgname="OP2") - - ecl_sum.addVariable("WOPRH", wgname="OP1") - ecl_sum.addVariable("WOPRH", wgname="OP2") - ecl_sum.addVariable("WWPRH", wgname="OP1") - ecl_sum.addVariable("WWPRH", wgname="OP2") - ecl_sum.addVariable("WGPRH", wgname="OP1") - ecl_sum.addVariable("WGPRH", wgname="OP2") - ecl_sum.addVariable("WGORH", wgname="OP1") - ecl_sum.addVariable("WGORH", wgname="OP2") - ecl_sum.addVariable("WWCTH", wgname="OP1") - ecl_sum.addVariable("WWCTH", wgname="OP2") - - ecl_sum.addVariable("BPR", num=globalIndex(5, 5, 5)) - ecl_sum.addVariable("BPR", num=globalIndex(1, 3, 8)) - - time_map = [] - mini_step_count = 10 - total_step_count = time_step_count * mini_step_count - - for report_step in range(time_step_count): - for mini_step in range(mini_step_count): - t_step = ecl_sum.addTStep(report_step + 1, sim_days=report_step * mini_step_count + mini_step) - - time_map.append(t_step.getSimTime().datetime().strftime("%d/%m/%Y")) - - simulator.step(scale=1.0 / total_step_count) - history_simulator.step(scale=1.0 / total_step_count) - - t_step["FOPR"] = simulator.fopr() - t_step["FOPT"] = simulator.fopt() - t_step["FGPR"] = simulator.fgpr() - t_step["FGPT"] = simulator.fgpt() - t_step["FWPR"] = simulator.fwpr() - t_step["FWPT"] = simulator.fwpt() - t_step["FGOR"] = simulator.fgor() - t_step["FWCT"] = simulator.fwct() - - t_step["WOPR:OP1"] = simulator.opr("OP1") - t_step["WOPR:OP2"] = simulator.opr("OP2") - - t_step["WGPR:OP1"] = simulator.gpr("OP1") - t_step["WGPR:OP2"] = simulator.gpr("OP2") - - t_step["WWPR:OP1"] = simulator.wpr("OP1") - t_step["WWPR:OP2"] = simulator.wpr("OP2") - - t_step["WGOR:OP1"] = simulator.gor("OP1") - t_step["WGOR:OP2"] = simulator.gor("OP2") - - t_step["WWCT:OP1"] = simulator.wct("OP1") - t_step["WWCT:OP2"] = simulator.wct("OP2") - - t_step["BPR:5,5,5"] = simulator.bpr("5,5,5") - t_step["BPR:1,3,8"] = simulator.bpr("1,3,8") - - t_step["FOPRH"] = history_simulator.fopr() - t_step["FOPTH"] = history_simulator.fopt() - t_step["FGPRH"] = history_simulator.fgpr() - t_step["FGPTH"] = history_simulator.fgpt() - t_step["FWPRH"] = history_simulator.fwpr() - t_step["FWPTH"] = history_simulator.fwpt() - t_step["FGORH"] = history_simulator.fgor() - t_step["FWCTH"] = history_simulator.fwct() - - t_step["WOPRH:OP1"] = history_simulator.opr("OP1") - t_step["WOPRH:OP2"] = history_simulator.opr("OP2") - - t_step["WGPRH:OP1"] = history_simulator.gpr("OP1") - t_step["WGPRH:OP2"] = history_simulator.gpr("OP2") - - t_step["WWPRH:OP1"] = history_simulator.wpr("OP1") - t_step["WWPRH:OP2"] = history_simulator.wpr("OP2") - - t_step["WGORH:OP1"] = history_simulator.gor("OP1") - t_step["WGORH:OP2"] = history_simulator.gor("OP2") - - t_step["WWCTH:OP1"] = history_simulator.wct("OP1") - t_step["WWCTH:OP2"] = history_simulator.wct("OP2") - - return ecl_sum, time_map - - -def roundedInt(value): - return int(round(float(value))) - - -if __name__ == '__main__': - seed = int(readParameters("seed.txt")["SEED"]) - parameters = readParameters("snake_oil_params.txt") - - op1_divergence_scale = float(parameters["OP1_DIVERGENCE_SCALE"]) - op2_divergence_scale = float(parameters["OP2_DIVERGENCE_SCALE"]) - op1_persistence = float(parameters["OP1_PERSISTENCE"]) - op2_persistence = float(parameters["OP2_PERSISTENCE"]) - op1_offset = float(parameters["OP1_OFFSET"]) - op2_offset = float(parameters["OP2_OFFSET"]) - bpr_138_persistence = float(parameters["BPR_138_PERSISTENCE"]) - bpr_555_persistence = float(parameters["BPR_555_PERSISTENCE"]) - - op1_octaves = roundedInt(parameters["OP1_OCTAVES"]) - op2_octaves = roundedInt(parameters["OP2_OCTAVES"]) - - simulator = OilSimulator() - simulator.addWell("OP1", seed * 997, persistence=op1_persistence, octaves=op1_octaves, divergence_scale=op1_divergence_scale, offset=op1_offset) - simulator.addWell("OP2", seed * 13, persistence=op2_persistence, octaves=op2_octaves, divergence_scale=op2_divergence_scale, offset=op2_offset) - simulator.addBlock("5,5,5", seed * 37, persistence=bpr_555_persistence) - simulator.addBlock("1,3,8", seed * 31, persistence=bpr_138_persistence) - - history_simulator = OilSimulator() - history_simulator.addWell("OP1", 222118781) - history_simulator.addWell("OP2", 118116362) - - report_step_count = 200 - ecl_sum, time_map = runSimulator(simulator, history_simulator, report_step_count) - - ecl_sum.fwrite() - - with open("time_map.txt", "w") as f: - for t in time_map: - f.write("%s\n" % t) diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/make_data.py b/ThirdParty/Ert/test-data/local/snake_oil_field/make_data.py deleted file mode 100644 index 069716e345..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/make_data.py +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env python -import os -import os.path - -from ert.ecl import EclGrid, EclKW, EclTypeEnum -from ert.util import RandomNumberGenerator - -# This little script is used as a one-shot operation to generate the -# grid and the corresponding PERMX and PORO fields used for this test -# case. The script itself is not used bye the test. - -nx = 10 -ny = 10 -nz = 5 -ens_size = 10 - - -def make_grid( ): - grid = EclGrid.createRectangular( (nx,ny,nz) , (1,1,1) ) - if not os.path.isdir("grid"): - os.makedirs("grid") - grid.save_EGRID("grid/CASE.EGRID") - - return grid - - - -def make_field(rng , grid , iens): - permx = EclKW.create( "PERMX" , grid.getGlobalSize( ) , EclTypeEnum.ECL_FLOAT_TYPE) - permx.assign( rng.getDouble( ) ) - - poro = EclKW.create( "PORO" , grid.getGlobalSize( ) , EclTypeEnum.ECL_FLOAT_TYPE) - poro.assign( rng.getDouble( ) ) - - if not os.path.isdir("fields"): - os.makedirs("fields") - - with open("fields/permx%d.grdecl" % iens,"w") as f: - permx.write_grdecl( f ) - - with open("fields/poro%d.grdecl" % iens ,"w") as f: - poro.write_grdecl( f ) - - -rng = RandomNumberGenerator( ) -rng.setState("ABCD6375ejascEFGHIJ") - - -grid = make_grid( ) -for iens in range(ens_size): - make_field(rng , grid , iens) diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/observations/observations.txt b/ThirdParty/Ert/test-data/local/snake_oil_field/observations/observations.txt deleted file mode 100644 index de28837efb..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/observations/observations.txt +++ /dev/null @@ -1,56 +0,0 @@ -HISTORY_OBSERVATION FOPR; - -SUMMARY_OBSERVATION WOPR_OP1_9 -{ - VALUE = 0.1; - ERROR = 0.05; - RESTART = 9; - KEY = WOPR:OP1; -}; - -SUMMARY_OBSERVATION WOPR_OP1_36 -{ - VALUE = 0.7; - ERROR = 0.07; - RESTART = 36; - KEY = WOPR:OP1; -}; - -SUMMARY_OBSERVATION WOPR_OP1_72 -{ - VALUE = 0.5; - ERROR = 0.05; - RESTART = 72; - KEY = WOPR:OP1; -}; - -SUMMARY_OBSERVATION WOPR_OP1_108 -{ - VALUE = 0.3; - ERROR = 0.075; - RESTART = 108; - KEY = WOPR:OP1; -}; - -SUMMARY_OBSERVATION WOPR_OP1_144 -{ - VALUE = 0.2; - ERROR = 0.035; - RESTART = 144; - KEY = WOPR:OP1; -}; - -SUMMARY_OBSERVATION WOPR_OP1_190 -{ - VALUE = 0.015; - ERROR = 0.01; - RESTART = 190; - KEY = WOPR:OP1; -}; - -GENERAL_OBSERVATION WPR_DIFF_1 { - DATA = SNAKE_OIL_WPR_DIFF; - INDEX_LIST = 400,800,1200,1800; - RESTART = 199; - OBS_FILE = observations/wpr_diff_obs.txt; -}; \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/observations/wpr_diff_obs.txt b/ThirdParty/Ert/test-data/local/snake_oil_field/observations/wpr_diff_obs.txt deleted file mode 100644 index 4aee6d7ef7..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/observations/wpr_diff_obs.txt +++ /dev/null @@ -1,4 +0,0 @@ -0.0 0.1 -0.1 0.2 -0.2 0.15 -0.0 0.05 diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/parameters/snake_oil_parameters.txt b/ThirdParty/Ert/test-data/local/snake_oil_field/parameters/snake_oil_parameters.txt deleted file mode 100644 index 64573d0058..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/parameters/snake_oil_parameters.txt +++ /dev/null @@ -1,11 +0,0 @@ -OP1_PERSISTENCE UNIFORM 0.01 0.4 -OP1_OCTAVES UNIFORM 3 5 -OP1_DIVERGENCE_SCALE UNIFORM 0.25 1.25 -OP1_OFFSET UNIFORM -0.1 0.1 -OP2_PERSISTENCE UNIFORM 0.1 0.6 -OP2_OCTAVES UNIFORM 5 12 -OP2_DIVERGENCE_SCALE UNIFORM 0.5 1.5 -OP2_OFFSET UNIFORM -0.2 0.2 -BPR_555_PERSISTENCE UNIFORM 0.1 0.5 -BPR_138_PERSISTENCE UNIFORM 0.2 0.7 - diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/refcase/refcase_readme.txt b/ThirdParty/Ert/test-data/local/snake_oil_field/refcase/refcase_readme.txt deleted file mode 100644 index a3d0fe6058..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/refcase/refcase_readme.txt +++ /dev/null @@ -1 +0,0 @@ -To create a refcase run the snake_oil_simulator.py job with the this as working directory. \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/refcase/seed.txt b/ThirdParty/Ert/test-data/local/snake_oil_field/refcase/seed.txt deleted file mode 100644 index 0009f6e89a..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/refcase/seed.txt +++ /dev/null @@ -1 +0,0 @@ -SEED:268776 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/refcase/snake_oil_params.txt b/ThirdParty/Ert/test-data/local/snake_oil_field/refcase/snake_oil_params.txt deleted file mode 100644 index 3868522924..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/refcase/snake_oil_params.txt +++ /dev/null @@ -1,10 +0,0 @@ -OP1_PERSISTENCE:0.15 -OP1_OCTAVES:4 -OP1_DIVERGENCE_SCALE:0.5 -OP1_OFFSET:0.0 -OP2_PERSISTENCE:0.25 -OP2_OCTAVES:7.0 -OP2_DIVERGENCE_SCALE:1.0 -OP2_OFFSET:0.0 -BPR_555_PERSISTENCE:0.25 -BPR_138_PERSISTENCE:0.35 diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/refcase/time_map.txt b/ThirdParty/Ert/test-data/local/snake_oil_field/refcase/time_map.txt deleted file mode 100644 index d54b4293ae..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/refcase/time_map.txt +++ /dev/null @@ -1,2000 +0,0 @@ -01/01/2010 -02/01/2010 -03/01/2010 -04/01/2010 -05/01/2010 -06/01/2010 -07/01/2010 -08/01/2010 -09/01/2010 -10/01/2010 -11/01/2010 -12/01/2010 -13/01/2010 -14/01/2010 -15/01/2010 -16/01/2010 -17/01/2010 -18/01/2010 -19/01/2010 -20/01/2010 -21/01/2010 -22/01/2010 -23/01/2010 -24/01/2010 -25/01/2010 -26/01/2010 -27/01/2010 -28/01/2010 -29/01/2010 -30/01/2010 -31/01/2010 -01/02/2010 -02/02/2010 -03/02/2010 -04/02/2010 -05/02/2010 -06/02/2010 -07/02/2010 -08/02/2010 -09/02/2010 -10/02/2010 -11/02/2010 -12/02/2010 -13/02/2010 -14/02/2010 -15/02/2010 -16/02/2010 -17/02/2010 -18/02/2010 -19/02/2010 -20/02/2010 -21/02/2010 -22/02/2010 -23/02/2010 -24/02/2010 -25/02/2010 -26/02/2010 -27/02/2010 -28/02/2010 -01/03/2010 -02/03/2010 -03/03/2010 -04/03/2010 -05/03/2010 -06/03/2010 -07/03/2010 -08/03/2010 -09/03/2010 -10/03/2010 -11/03/2010 -12/03/2010 -13/03/2010 -14/03/2010 -15/03/2010 -16/03/2010 -17/03/2010 -18/03/2010 -19/03/2010 -20/03/2010 -21/03/2010 -22/03/2010 -23/03/2010 -24/03/2010 -25/03/2010 -26/03/2010 -27/03/2010 -28/03/2010 -29/03/2010 -30/03/2010 -31/03/2010 -01/04/2010 -02/04/2010 -03/04/2010 -04/04/2010 -05/04/2010 -06/04/2010 -07/04/2010 -08/04/2010 -09/04/2010 -10/04/2010 -11/04/2010 -12/04/2010 -13/04/2010 -14/04/2010 -15/04/2010 -16/04/2010 -17/04/2010 -18/04/2010 -19/04/2010 -20/04/2010 -21/04/2010 -22/04/2010 -23/04/2010 -24/04/2010 -25/04/2010 -26/04/2010 -27/04/2010 -28/04/2010 -29/04/2010 -30/04/2010 -01/05/2010 -02/05/2010 -03/05/2010 -04/05/2010 -05/05/2010 -06/05/2010 -07/05/2010 -08/05/2010 -09/05/2010 -10/05/2010 -11/05/2010 -12/05/2010 -13/05/2010 -14/05/2010 -15/05/2010 -16/05/2010 -17/05/2010 -18/05/2010 -19/05/2010 -20/05/2010 -21/05/2010 -22/05/2010 -23/05/2010 -24/05/2010 -25/05/2010 -26/05/2010 -27/05/2010 -28/05/2010 -29/05/2010 -30/05/2010 -31/05/2010 -01/06/2010 -02/06/2010 -03/06/2010 -04/06/2010 -05/06/2010 -06/06/2010 -07/06/2010 -08/06/2010 -09/06/2010 -10/06/2010 -11/06/2010 -12/06/2010 -13/06/2010 -14/06/2010 -15/06/2010 -16/06/2010 -17/06/2010 -18/06/2010 -19/06/2010 -20/06/2010 -21/06/2010 -22/06/2010 -23/06/2010 -24/06/2010 -25/06/2010 -26/06/2010 -27/06/2010 -28/06/2010 -29/06/2010 -30/06/2010 -01/07/2010 -02/07/2010 -03/07/2010 -04/07/2010 -05/07/2010 -06/07/2010 -07/07/2010 -08/07/2010 -09/07/2010 -10/07/2010 -11/07/2010 -12/07/2010 -13/07/2010 -14/07/2010 -15/07/2010 -16/07/2010 -17/07/2010 -18/07/2010 -19/07/2010 -20/07/2010 -21/07/2010 -22/07/2010 -23/07/2010 -24/07/2010 -25/07/2010 -26/07/2010 -27/07/2010 -28/07/2010 -29/07/2010 -30/07/2010 -31/07/2010 -01/08/2010 -02/08/2010 -03/08/2010 -04/08/2010 -05/08/2010 -06/08/2010 -07/08/2010 -08/08/2010 -09/08/2010 -10/08/2010 -11/08/2010 -12/08/2010 -13/08/2010 -14/08/2010 -15/08/2010 -16/08/2010 -17/08/2010 -18/08/2010 -19/08/2010 -20/08/2010 -21/08/2010 -22/08/2010 -23/08/2010 -24/08/2010 -25/08/2010 -26/08/2010 -27/08/2010 -28/08/2010 -29/08/2010 -30/08/2010 -31/08/2010 -01/09/2010 -02/09/2010 -03/09/2010 -04/09/2010 -05/09/2010 -06/09/2010 -07/09/2010 -08/09/2010 -09/09/2010 -10/09/2010 -11/09/2010 -12/09/2010 -13/09/2010 -14/09/2010 -15/09/2010 -16/09/2010 -17/09/2010 -18/09/2010 -19/09/2010 -20/09/2010 -21/09/2010 -22/09/2010 -23/09/2010 -24/09/2010 -25/09/2010 -26/09/2010 -27/09/2010 -28/09/2010 -29/09/2010 -30/09/2010 -01/10/2010 -02/10/2010 -03/10/2010 -04/10/2010 -05/10/2010 -06/10/2010 -07/10/2010 -08/10/2010 -09/10/2010 -10/10/2010 -11/10/2010 -12/10/2010 -13/10/2010 -14/10/2010 -15/10/2010 -16/10/2010 -17/10/2010 -18/10/2010 -19/10/2010 -20/10/2010 -21/10/2010 -22/10/2010 -23/10/2010 -24/10/2010 -25/10/2010 -26/10/2010 -27/10/2010 -28/10/2010 -29/10/2010 -30/10/2010 -31/10/2010 -01/11/2010 -02/11/2010 -03/11/2010 -04/11/2010 -05/11/2010 -06/11/2010 -07/11/2010 -08/11/2010 -09/11/2010 -10/11/2010 -11/11/2010 -12/11/2010 -13/11/2010 -14/11/2010 -15/11/2010 -16/11/2010 -17/11/2010 -18/11/2010 -19/11/2010 -20/11/2010 -21/11/2010 -22/11/2010 -23/11/2010 -24/11/2010 -25/11/2010 -26/11/2010 -27/11/2010 -28/11/2010 -29/11/2010 -30/11/2010 -01/12/2010 -02/12/2010 -03/12/2010 -04/12/2010 -05/12/2010 -06/12/2010 -07/12/2010 -08/12/2010 -09/12/2010 -10/12/2010 -11/12/2010 -12/12/2010 -13/12/2010 -14/12/2010 -15/12/2010 -16/12/2010 -17/12/2010 -18/12/2010 -19/12/2010 -20/12/2010 -21/12/2010 -22/12/2010 -23/12/2010 -24/12/2010 -25/12/2010 -26/12/2010 -27/12/2010 -28/12/2010 -29/12/2010 -30/12/2010 -31/12/2010 -01/01/2011 -02/01/2011 -03/01/2011 -04/01/2011 -05/01/2011 -06/01/2011 -07/01/2011 -08/01/2011 -09/01/2011 -10/01/2011 -11/01/2011 -12/01/2011 -13/01/2011 -14/01/2011 -15/01/2011 -16/01/2011 -17/01/2011 -18/01/2011 -19/01/2011 -20/01/2011 -21/01/2011 -22/01/2011 -23/01/2011 -24/01/2011 -25/01/2011 -26/01/2011 -27/01/2011 -28/01/2011 -29/01/2011 -30/01/2011 -31/01/2011 -01/02/2011 -02/02/2011 -03/02/2011 -04/02/2011 -05/02/2011 -06/02/2011 -07/02/2011 -08/02/2011 -09/02/2011 -10/02/2011 -11/02/2011 -12/02/2011 -13/02/2011 -14/02/2011 -15/02/2011 -16/02/2011 -17/02/2011 -18/02/2011 -19/02/2011 -20/02/2011 -21/02/2011 -22/02/2011 -23/02/2011 -24/02/2011 -25/02/2011 -26/02/2011 -27/02/2011 -28/02/2011 -01/03/2011 -02/03/2011 -03/03/2011 -04/03/2011 -05/03/2011 -06/03/2011 -07/03/2011 -08/03/2011 -09/03/2011 -10/03/2011 -11/03/2011 -12/03/2011 -13/03/2011 -14/03/2011 -15/03/2011 -16/03/2011 -17/03/2011 -18/03/2011 -19/03/2011 -20/03/2011 -21/03/2011 -22/03/2011 -23/03/2011 -24/03/2011 -25/03/2011 -26/03/2011 -27/03/2011 -28/03/2011 -29/03/2011 -30/03/2011 -31/03/2011 -01/04/2011 -02/04/2011 -03/04/2011 -04/04/2011 -05/04/2011 -06/04/2011 -07/04/2011 -08/04/2011 -09/04/2011 -10/04/2011 -11/04/2011 -12/04/2011 -13/04/2011 -14/04/2011 -15/04/2011 -16/04/2011 -17/04/2011 -18/04/2011 -19/04/2011 -20/04/2011 -21/04/2011 -22/04/2011 -23/04/2011 -24/04/2011 -25/04/2011 -26/04/2011 -27/04/2011 -28/04/2011 -29/04/2011 -30/04/2011 -01/05/2011 -02/05/2011 -03/05/2011 -04/05/2011 -05/05/2011 -06/05/2011 -07/05/2011 -08/05/2011 -09/05/2011 -10/05/2011 -11/05/2011 -12/05/2011 -13/05/2011 -14/05/2011 -15/05/2011 -16/05/2011 -17/05/2011 -18/05/2011 -19/05/2011 -20/05/2011 -21/05/2011 -22/05/2011 -23/05/2011 -24/05/2011 -25/05/2011 -26/05/2011 -27/05/2011 -28/05/2011 -29/05/2011 -30/05/2011 -31/05/2011 -01/06/2011 -02/06/2011 -03/06/2011 -04/06/2011 -05/06/2011 -06/06/2011 -07/06/2011 -08/06/2011 -09/06/2011 -10/06/2011 -11/06/2011 -12/06/2011 -13/06/2011 -14/06/2011 -15/06/2011 -16/06/2011 -17/06/2011 -18/06/2011 -19/06/2011 -20/06/2011 -21/06/2011 -22/06/2011 -23/06/2011 -24/06/2011 -25/06/2011 -26/06/2011 -27/06/2011 -28/06/2011 -29/06/2011 -30/06/2011 -01/07/2011 -02/07/2011 -03/07/2011 -04/07/2011 -05/07/2011 -06/07/2011 -07/07/2011 -08/07/2011 -09/07/2011 -10/07/2011 -11/07/2011 -12/07/2011 -13/07/2011 -14/07/2011 -15/07/2011 -16/07/2011 -17/07/2011 -18/07/2011 -19/07/2011 -20/07/2011 -21/07/2011 -22/07/2011 -23/07/2011 -24/07/2011 -25/07/2011 -26/07/2011 -27/07/2011 -28/07/2011 -29/07/2011 -30/07/2011 -31/07/2011 -01/08/2011 -02/08/2011 -03/08/2011 -04/08/2011 -05/08/2011 -06/08/2011 -07/08/2011 -08/08/2011 -09/08/2011 -10/08/2011 -11/08/2011 -12/08/2011 -13/08/2011 -14/08/2011 -15/08/2011 -16/08/2011 -17/08/2011 -18/08/2011 -19/08/2011 -20/08/2011 -21/08/2011 -22/08/2011 -23/08/2011 -24/08/2011 -25/08/2011 -26/08/2011 -27/08/2011 -28/08/2011 -29/08/2011 -30/08/2011 -31/08/2011 -01/09/2011 -02/09/2011 -03/09/2011 -04/09/2011 -05/09/2011 -06/09/2011 -07/09/2011 -08/09/2011 -09/09/2011 -10/09/2011 -11/09/2011 -12/09/2011 -13/09/2011 -14/09/2011 -15/09/2011 -16/09/2011 -17/09/2011 -18/09/2011 -19/09/2011 -20/09/2011 -21/09/2011 -22/09/2011 -23/09/2011 -24/09/2011 -25/09/2011 -26/09/2011 -27/09/2011 -28/09/2011 -29/09/2011 -30/09/2011 -01/10/2011 -02/10/2011 -03/10/2011 -04/10/2011 -05/10/2011 -06/10/2011 -07/10/2011 -08/10/2011 -09/10/2011 -10/10/2011 -11/10/2011 -12/10/2011 -13/10/2011 -14/10/2011 -15/10/2011 -16/10/2011 -17/10/2011 -18/10/2011 -19/10/2011 -20/10/2011 -21/10/2011 -22/10/2011 -23/10/2011 -24/10/2011 -25/10/2011 -26/10/2011 -27/10/2011 -28/10/2011 -29/10/2011 -30/10/2011 -31/10/2011 -01/11/2011 -02/11/2011 -03/11/2011 -04/11/2011 -05/11/2011 -06/11/2011 -07/11/2011 -08/11/2011 -09/11/2011 -10/11/2011 -11/11/2011 -12/11/2011 -13/11/2011 -14/11/2011 -15/11/2011 -16/11/2011 -17/11/2011 -18/11/2011 -19/11/2011 -20/11/2011 -21/11/2011 -22/11/2011 -23/11/2011 -24/11/2011 -25/11/2011 -26/11/2011 -27/11/2011 -28/11/2011 -29/11/2011 -30/11/2011 -01/12/2011 -02/12/2011 -03/12/2011 -04/12/2011 -05/12/2011 -06/12/2011 -07/12/2011 -08/12/2011 -09/12/2011 -10/12/2011 -11/12/2011 -12/12/2011 -13/12/2011 -14/12/2011 -15/12/2011 -16/12/2011 -17/12/2011 -18/12/2011 -19/12/2011 -20/12/2011 -21/12/2011 -22/12/2011 -23/12/2011 -24/12/2011 -25/12/2011 -26/12/2011 -27/12/2011 -28/12/2011 -29/12/2011 -30/12/2011 -31/12/2011 -01/01/2012 -02/01/2012 -03/01/2012 -04/01/2012 -05/01/2012 -06/01/2012 -07/01/2012 -08/01/2012 -09/01/2012 -10/01/2012 -11/01/2012 -12/01/2012 -13/01/2012 -14/01/2012 -15/01/2012 -16/01/2012 -17/01/2012 -18/01/2012 -19/01/2012 -20/01/2012 -21/01/2012 -22/01/2012 -23/01/2012 -24/01/2012 -25/01/2012 -26/01/2012 -27/01/2012 -28/01/2012 -29/01/2012 -30/01/2012 -31/01/2012 -01/02/2012 -02/02/2012 -03/02/2012 -04/02/2012 -05/02/2012 -06/02/2012 -07/02/2012 -08/02/2012 -09/02/2012 -10/02/2012 -11/02/2012 -12/02/2012 -13/02/2012 -14/02/2012 -15/02/2012 -16/02/2012 -17/02/2012 -18/02/2012 -19/02/2012 -20/02/2012 -21/02/2012 -22/02/2012 -23/02/2012 -24/02/2012 -25/02/2012 -26/02/2012 -27/02/2012 -28/02/2012 -29/02/2012 -01/03/2012 -02/03/2012 -03/03/2012 -04/03/2012 -05/03/2012 -06/03/2012 -07/03/2012 -08/03/2012 -09/03/2012 -10/03/2012 -11/03/2012 -12/03/2012 -13/03/2012 -14/03/2012 -15/03/2012 -16/03/2012 -17/03/2012 -18/03/2012 -19/03/2012 -20/03/2012 -21/03/2012 -22/03/2012 -23/03/2012 -24/03/2012 -25/03/2012 -26/03/2012 -27/03/2012 -28/03/2012 -29/03/2012 -30/03/2012 -31/03/2012 -01/04/2012 -02/04/2012 -03/04/2012 -04/04/2012 -05/04/2012 -06/04/2012 -07/04/2012 -08/04/2012 -09/04/2012 -10/04/2012 -11/04/2012 -12/04/2012 -13/04/2012 -14/04/2012 -15/04/2012 -16/04/2012 -17/04/2012 -18/04/2012 -19/04/2012 -20/04/2012 -21/04/2012 -22/04/2012 -23/04/2012 -24/04/2012 -25/04/2012 -26/04/2012 -27/04/2012 -28/04/2012 -29/04/2012 -30/04/2012 -01/05/2012 -02/05/2012 -03/05/2012 -04/05/2012 -05/05/2012 -06/05/2012 -07/05/2012 -08/05/2012 -09/05/2012 -10/05/2012 -11/05/2012 -12/05/2012 -13/05/2012 -14/05/2012 -15/05/2012 -16/05/2012 -17/05/2012 -18/05/2012 -19/05/2012 -20/05/2012 -21/05/2012 -22/05/2012 -23/05/2012 -24/05/2012 -25/05/2012 -26/05/2012 -27/05/2012 -28/05/2012 -29/05/2012 -30/05/2012 -31/05/2012 -01/06/2012 -02/06/2012 -03/06/2012 -04/06/2012 -05/06/2012 -06/06/2012 -07/06/2012 -08/06/2012 -09/06/2012 -10/06/2012 -11/06/2012 -12/06/2012 -13/06/2012 -14/06/2012 -15/06/2012 -16/06/2012 -17/06/2012 -18/06/2012 -19/06/2012 -20/06/2012 -21/06/2012 -22/06/2012 -23/06/2012 -24/06/2012 -25/06/2012 -26/06/2012 -27/06/2012 -28/06/2012 -29/06/2012 -30/06/2012 -01/07/2012 -02/07/2012 -03/07/2012 -04/07/2012 -05/07/2012 -06/07/2012 -07/07/2012 -08/07/2012 -09/07/2012 -10/07/2012 -11/07/2012 -12/07/2012 -13/07/2012 -14/07/2012 -15/07/2012 -16/07/2012 -17/07/2012 -18/07/2012 -19/07/2012 -20/07/2012 -21/07/2012 -22/07/2012 -23/07/2012 -24/07/2012 -25/07/2012 -26/07/2012 -27/07/2012 -28/07/2012 -29/07/2012 -30/07/2012 -31/07/2012 -01/08/2012 -02/08/2012 -03/08/2012 -04/08/2012 -05/08/2012 -06/08/2012 -07/08/2012 -08/08/2012 -09/08/2012 -10/08/2012 -11/08/2012 -12/08/2012 -13/08/2012 -14/08/2012 -15/08/2012 -16/08/2012 -17/08/2012 -18/08/2012 -19/08/2012 -20/08/2012 -21/08/2012 -22/08/2012 -23/08/2012 -24/08/2012 -25/08/2012 -26/08/2012 -27/08/2012 -28/08/2012 -29/08/2012 -30/08/2012 -31/08/2012 -01/09/2012 -02/09/2012 -03/09/2012 -04/09/2012 -05/09/2012 -06/09/2012 -07/09/2012 -08/09/2012 -09/09/2012 -10/09/2012 -11/09/2012 -12/09/2012 -13/09/2012 -14/09/2012 -15/09/2012 -16/09/2012 -17/09/2012 -18/09/2012 -19/09/2012 -20/09/2012 -21/09/2012 -22/09/2012 -23/09/2012 -24/09/2012 -25/09/2012 -26/09/2012 -27/09/2012 -28/09/2012 -29/09/2012 -30/09/2012 -01/10/2012 -02/10/2012 -03/10/2012 -04/10/2012 -05/10/2012 -06/10/2012 -07/10/2012 -08/10/2012 -09/10/2012 -10/10/2012 -11/10/2012 -12/10/2012 -13/10/2012 -14/10/2012 -15/10/2012 -16/10/2012 -17/10/2012 -18/10/2012 -19/10/2012 -20/10/2012 -21/10/2012 -22/10/2012 -23/10/2012 -24/10/2012 -25/10/2012 -26/10/2012 -27/10/2012 -28/10/2012 -29/10/2012 -30/10/2012 -31/10/2012 -01/11/2012 -02/11/2012 -03/11/2012 -04/11/2012 -05/11/2012 -06/11/2012 -07/11/2012 -08/11/2012 -09/11/2012 -10/11/2012 -11/11/2012 -12/11/2012 -13/11/2012 -14/11/2012 -15/11/2012 -16/11/2012 -17/11/2012 -18/11/2012 -19/11/2012 -20/11/2012 -21/11/2012 -22/11/2012 -23/11/2012 -24/11/2012 -25/11/2012 -26/11/2012 -27/11/2012 -28/11/2012 -29/11/2012 -30/11/2012 -01/12/2012 -02/12/2012 -03/12/2012 -04/12/2012 -05/12/2012 -06/12/2012 -07/12/2012 -08/12/2012 -09/12/2012 -10/12/2012 -11/12/2012 -12/12/2012 -13/12/2012 -14/12/2012 -15/12/2012 -16/12/2012 -17/12/2012 -18/12/2012 -19/12/2012 -20/12/2012 -21/12/2012 -22/12/2012 -23/12/2012 -24/12/2012 -25/12/2012 -26/12/2012 -27/12/2012 -28/12/2012 -29/12/2012 -30/12/2012 -31/12/2012 -01/01/2013 -02/01/2013 -03/01/2013 -04/01/2013 -05/01/2013 -06/01/2013 -07/01/2013 -08/01/2013 -09/01/2013 -10/01/2013 -11/01/2013 -12/01/2013 -13/01/2013 -14/01/2013 -15/01/2013 -16/01/2013 -17/01/2013 -18/01/2013 -19/01/2013 -20/01/2013 -21/01/2013 -22/01/2013 -23/01/2013 -24/01/2013 -25/01/2013 -26/01/2013 -27/01/2013 -28/01/2013 -29/01/2013 -30/01/2013 -31/01/2013 -01/02/2013 -02/02/2013 -03/02/2013 -04/02/2013 -05/02/2013 -06/02/2013 -07/02/2013 -08/02/2013 -09/02/2013 -10/02/2013 -11/02/2013 -12/02/2013 -13/02/2013 -14/02/2013 -15/02/2013 -16/02/2013 -17/02/2013 -18/02/2013 -19/02/2013 -20/02/2013 -21/02/2013 -22/02/2013 -23/02/2013 -24/02/2013 -25/02/2013 -26/02/2013 -27/02/2013 -28/02/2013 -01/03/2013 -02/03/2013 -03/03/2013 -04/03/2013 -05/03/2013 -06/03/2013 -07/03/2013 -08/03/2013 -09/03/2013 -10/03/2013 -11/03/2013 -12/03/2013 -13/03/2013 -14/03/2013 -15/03/2013 -16/03/2013 -17/03/2013 -18/03/2013 -19/03/2013 -20/03/2013 -21/03/2013 -22/03/2013 -23/03/2013 -24/03/2013 -25/03/2013 -26/03/2013 -27/03/2013 -28/03/2013 -29/03/2013 -30/03/2013 -31/03/2013 -01/04/2013 -02/04/2013 -03/04/2013 -04/04/2013 -05/04/2013 -06/04/2013 -07/04/2013 -08/04/2013 -09/04/2013 -10/04/2013 -11/04/2013 -12/04/2013 -13/04/2013 -14/04/2013 -15/04/2013 -16/04/2013 -17/04/2013 -18/04/2013 -19/04/2013 -20/04/2013 -21/04/2013 -22/04/2013 -23/04/2013 -24/04/2013 -25/04/2013 -26/04/2013 -27/04/2013 -28/04/2013 -29/04/2013 -30/04/2013 -01/05/2013 -02/05/2013 -03/05/2013 -04/05/2013 -05/05/2013 -06/05/2013 -07/05/2013 -08/05/2013 -09/05/2013 -10/05/2013 -11/05/2013 -12/05/2013 -13/05/2013 -14/05/2013 -15/05/2013 -16/05/2013 -17/05/2013 -18/05/2013 -19/05/2013 -20/05/2013 -21/05/2013 -22/05/2013 -23/05/2013 -24/05/2013 -25/05/2013 -26/05/2013 -27/05/2013 -28/05/2013 -29/05/2013 -30/05/2013 -31/05/2013 -01/06/2013 -02/06/2013 -03/06/2013 -04/06/2013 -05/06/2013 -06/06/2013 -07/06/2013 -08/06/2013 -09/06/2013 -10/06/2013 -11/06/2013 -12/06/2013 -13/06/2013 -14/06/2013 -15/06/2013 -16/06/2013 -17/06/2013 -18/06/2013 -19/06/2013 -20/06/2013 -21/06/2013 -22/06/2013 -23/06/2013 -24/06/2013 -25/06/2013 -26/06/2013 -27/06/2013 -28/06/2013 -29/06/2013 -30/06/2013 -01/07/2013 -02/07/2013 -03/07/2013 -04/07/2013 -05/07/2013 -06/07/2013 -07/07/2013 -08/07/2013 -09/07/2013 -10/07/2013 -11/07/2013 -12/07/2013 -13/07/2013 -14/07/2013 -15/07/2013 -16/07/2013 -17/07/2013 -18/07/2013 -19/07/2013 -20/07/2013 -21/07/2013 -22/07/2013 -23/07/2013 -24/07/2013 -25/07/2013 -26/07/2013 -27/07/2013 -28/07/2013 -29/07/2013 -30/07/2013 -31/07/2013 -01/08/2013 -02/08/2013 -03/08/2013 -04/08/2013 -05/08/2013 -06/08/2013 -07/08/2013 -08/08/2013 -09/08/2013 -10/08/2013 -11/08/2013 -12/08/2013 -13/08/2013 -14/08/2013 -15/08/2013 -16/08/2013 -17/08/2013 -18/08/2013 -19/08/2013 -20/08/2013 -21/08/2013 -22/08/2013 -23/08/2013 -24/08/2013 -25/08/2013 -26/08/2013 -27/08/2013 -28/08/2013 -29/08/2013 -30/08/2013 -31/08/2013 -01/09/2013 -02/09/2013 -03/09/2013 -04/09/2013 -05/09/2013 -06/09/2013 -07/09/2013 -08/09/2013 -09/09/2013 -10/09/2013 -11/09/2013 -12/09/2013 -13/09/2013 -14/09/2013 -15/09/2013 -16/09/2013 -17/09/2013 -18/09/2013 -19/09/2013 -20/09/2013 -21/09/2013 -22/09/2013 -23/09/2013 -24/09/2013 -25/09/2013 -26/09/2013 -27/09/2013 -28/09/2013 -29/09/2013 -30/09/2013 -01/10/2013 -02/10/2013 -03/10/2013 -04/10/2013 -05/10/2013 -06/10/2013 -07/10/2013 -08/10/2013 -09/10/2013 -10/10/2013 -11/10/2013 -12/10/2013 -13/10/2013 -14/10/2013 -15/10/2013 -16/10/2013 -17/10/2013 -18/10/2013 -19/10/2013 -20/10/2013 -21/10/2013 -22/10/2013 -23/10/2013 -24/10/2013 -25/10/2013 -26/10/2013 -27/10/2013 -28/10/2013 -29/10/2013 -30/10/2013 -31/10/2013 -01/11/2013 -02/11/2013 -03/11/2013 -04/11/2013 -05/11/2013 -06/11/2013 -07/11/2013 -08/11/2013 -09/11/2013 -10/11/2013 -11/11/2013 -12/11/2013 -13/11/2013 -14/11/2013 -15/11/2013 -16/11/2013 -17/11/2013 -18/11/2013 -19/11/2013 -20/11/2013 -21/11/2013 -22/11/2013 -23/11/2013 -24/11/2013 -25/11/2013 -26/11/2013 -27/11/2013 -28/11/2013 -29/11/2013 -30/11/2013 -01/12/2013 -02/12/2013 -03/12/2013 -04/12/2013 -05/12/2013 -06/12/2013 -07/12/2013 -08/12/2013 -09/12/2013 -10/12/2013 -11/12/2013 -12/12/2013 -13/12/2013 -14/12/2013 -15/12/2013 -16/12/2013 -17/12/2013 -18/12/2013 -19/12/2013 -20/12/2013 -21/12/2013 -22/12/2013 -23/12/2013 -24/12/2013 -25/12/2013 -26/12/2013 -27/12/2013 -28/12/2013 -29/12/2013 -30/12/2013 -31/12/2013 -01/01/2014 -02/01/2014 -03/01/2014 -04/01/2014 -05/01/2014 -06/01/2014 -07/01/2014 -08/01/2014 -09/01/2014 -10/01/2014 -11/01/2014 -12/01/2014 -13/01/2014 -14/01/2014 -15/01/2014 -16/01/2014 -17/01/2014 -18/01/2014 -19/01/2014 -20/01/2014 -21/01/2014 -22/01/2014 -23/01/2014 -24/01/2014 -25/01/2014 -26/01/2014 -27/01/2014 -28/01/2014 -29/01/2014 -30/01/2014 -31/01/2014 -01/02/2014 -02/02/2014 -03/02/2014 -04/02/2014 -05/02/2014 -06/02/2014 -07/02/2014 -08/02/2014 -09/02/2014 -10/02/2014 -11/02/2014 -12/02/2014 -13/02/2014 -14/02/2014 -15/02/2014 -16/02/2014 -17/02/2014 -18/02/2014 -19/02/2014 -20/02/2014 -21/02/2014 -22/02/2014 -23/02/2014 -24/02/2014 -25/02/2014 -26/02/2014 -27/02/2014 -28/02/2014 -01/03/2014 -02/03/2014 -03/03/2014 -04/03/2014 -05/03/2014 -06/03/2014 -07/03/2014 -08/03/2014 -09/03/2014 -10/03/2014 -11/03/2014 -12/03/2014 -13/03/2014 -14/03/2014 -15/03/2014 -16/03/2014 -17/03/2014 -18/03/2014 -19/03/2014 -20/03/2014 -21/03/2014 -22/03/2014 -23/03/2014 -24/03/2014 -25/03/2014 -26/03/2014 -27/03/2014 -28/03/2014 -29/03/2014 -30/03/2014 -31/03/2014 -01/04/2014 -02/04/2014 -03/04/2014 -04/04/2014 -05/04/2014 -06/04/2014 -07/04/2014 -08/04/2014 -09/04/2014 -10/04/2014 -11/04/2014 -12/04/2014 -13/04/2014 -14/04/2014 -15/04/2014 -16/04/2014 -17/04/2014 -18/04/2014 -19/04/2014 -20/04/2014 -21/04/2014 -22/04/2014 -23/04/2014 -24/04/2014 -25/04/2014 -26/04/2014 -27/04/2014 -28/04/2014 -29/04/2014 -30/04/2014 -01/05/2014 -02/05/2014 -03/05/2014 -04/05/2014 -05/05/2014 -06/05/2014 -07/05/2014 -08/05/2014 -09/05/2014 -10/05/2014 -11/05/2014 -12/05/2014 -13/05/2014 -14/05/2014 -15/05/2014 -16/05/2014 -17/05/2014 -18/05/2014 -19/05/2014 -20/05/2014 -21/05/2014 -22/05/2014 -23/05/2014 -24/05/2014 -25/05/2014 -26/05/2014 -27/05/2014 -28/05/2014 -29/05/2014 -30/05/2014 -31/05/2014 -01/06/2014 -02/06/2014 -03/06/2014 -04/06/2014 -05/06/2014 -06/06/2014 -07/06/2014 -08/06/2014 -09/06/2014 -10/06/2014 -11/06/2014 -12/06/2014 -13/06/2014 -14/06/2014 -15/06/2014 -16/06/2014 -17/06/2014 -18/06/2014 -19/06/2014 -20/06/2014 -21/06/2014 -22/06/2014 -23/06/2014 -24/06/2014 -25/06/2014 -26/06/2014 -27/06/2014 -28/06/2014 -29/06/2014 -30/06/2014 -01/07/2014 -02/07/2014 -03/07/2014 -04/07/2014 -05/07/2014 -06/07/2014 -07/07/2014 -08/07/2014 -09/07/2014 -10/07/2014 -11/07/2014 -12/07/2014 -13/07/2014 -14/07/2014 -15/07/2014 -16/07/2014 -17/07/2014 -18/07/2014 -19/07/2014 -20/07/2014 -21/07/2014 -22/07/2014 -23/07/2014 -24/07/2014 -25/07/2014 -26/07/2014 -27/07/2014 -28/07/2014 -29/07/2014 -30/07/2014 -31/07/2014 -01/08/2014 -02/08/2014 -03/08/2014 -04/08/2014 -05/08/2014 -06/08/2014 -07/08/2014 -08/08/2014 -09/08/2014 -10/08/2014 -11/08/2014 -12/08/2014 -13/08/2014 -14/08/2014 -15/08/2014 -16/08/2014 -17/08/2014 -18/08/2014 -19/08/2014 -20/08/2014 -21/08/2014 -22/08/2014 -23/08/2014 -24/08/2014 -25/08/2014 -26/08/2014 -27/08/2014 -28/08/2014 -29/08/2014 -30/08/2014 -31/08/2014 -01/09/2014 -02/09/2014 -03/09/2014 -04/09/2014 -05/09/2014 -06/09/2014 -07/09/2014 -08/09/2014 -09/09/2014 -10/09/2014 -11/09/2014 -12/09/2014 -13/09/2014 -14/09/2014 -15/09/2014 -16/09/2014 -17/09/2014 -18/09/2014 -19/09/2014 -20/09/2014 -21/09/2014 -22/09/2014 -23/09/2014 -24/09/2014 -25/09/2014 -26/09/2014 -27/09/2014 -28/09/2014 -29/09/2014 -30/09/2014 -01/10/2014 -02/10/2014 -03/10/2014 -04/10/2014 -05/10/2014 -06/10/2014 -07/10/2014 -08/10/2014 -09/10/2014 -10/10/2014 -11/10/2014 -12/10/2014 -13/10/2014 -14/10/2014 -15/10/2014 -16/10/2014 -17/10/2014 -18/10/2014 -19/10/2014 -20/10/2014 -21/10/2014 -22/10/2014 -23/10/2014 -24/10/2014 -25/10/2014 -26/10/2014 -27/10/2014 -28/10/2014 -29/10/2014 -30/10/2014 -31/10/2014 -01/11/2014 -02/11/2014 -03/11/2014 -04/11/2014 -05/11/2014 -06/11/2014 -07/11/2014 -08/11/2014 -09/11/2014 -10/11/2014 -11/11/2014 -12/11/2014 -13/11/2014 -14/11/2014 -15/11/2014 -16/11/2014 -17/11/2014 -18/11/2014 -19/11/2014 -20/11/2014 -21/11/2014 -22/11/2014 -23/11/2014 -24/11/2014 -25/11/2014 -26/11/2014 -27/11/2014 -28/11/2014 -29/11/2014 -30/11/2014 -01/12/2014 -02/12/2014 -03/12/2014 -04/12/2014 -05/12/2014 -06/12/2014 -07/12/2014 -08/12/2014 -09/12/2014 -10/12/2014 -11/12/2014 -12/12/2014 -13/12/2014 -14/12/2014 -15/12/2014 -16/12/2014 -17/12/2014 -18/12/2014 -19/12/2014 -20/12/2014 -21/12/2014 -22/12/2014 -23/12/2014 -24/12/2014 -25/12/2014 -26/12/2014 -27/12/2014 -28/12/2014 -29/12/2014 -30/12/2014 -31/12/2014 -01/01/2015 -02/01/2015 -03/01/2015 -04/01/2015 -05/01/2015 -06/01/2015 -07/01/2015 -08/01/2015 -09/01/2015 -10/01/2015 -11/01/2015 -12/01/2015 -13/01/2015 -14/01/2015 -15/01/2015 -16/01/2015 -17/01/2015 -18/01/2015 -19/01/2015 -20/01/2015 -21/01/2015 -22/01/2015 -23/01/2015 -24/01/2015 -25/01/2015 -26/01/2015 -27/01/2015 -28/01/2015 -29/01/2015 -30/01/2015 -31/01/2015 -01/02/2015 -02/02/2015 -03/02/2015 -04/02/2015 -05/02/2015 -06/02/2015 -07/02/2015 -08/02/2015 -09/02/2015 -10/02/2015 -11/02/2015 -12/02/2015 -13/02/2015 -14/02/2015 -15/02/2015 -16/02/2015 -17/02/2015 -18/02/2015 -19/02/2015 -20/02/2015 -21/02/2015 -22/02/2015 -23/02/2015 -24/02/2015 -25/02/2015 -26/02/2015 -27/02/2015 -28/02/2015 -01/03/2015 -02/03/2015 -03/03/2015 -04/03/2015 -05/03/2015 -06/03/2015 -07/03/2015 -08/03/2015 -09/03/2015 -10/03/2015 -11/03/2015 -12/03/2015 -13/03/2015 -14/03/2015 -15/03/2015 -16/03/2015 -17/03/2015 -18/03/2015 -19/03/2015 -20/03/2015 -21/03/2015 -22/03/2015 -23/03/2015 -24/03/2015 -25/03/2015 -26/03/2015 -27/03/2015 -28/03/2015 -29/03/2015 -30/03/2015 -31/03/2015 -01/04/2015 -02/04/2015 -03/04/2015 -04/04/2015 -05/04/2015 -06/04/2015 -07/04/2015 -08/04/2015 -09/04/2015 -10/04/2015 -11/04/2015 -12/04/2015 -13/04/2015 -14/04/2015 -15/04/2015 -16/04/2015 -17/04/2015 -18/04/2015 -19/04/2015 -20/04/2015 -21/04/2015 -22/04/2015 -23/04/2015 -24/04/2015 -25/04/2015 -26/04/2015 -27/04/2015 -28/04/2015 -29/04/2015 -30/04/2015 -01/05/2015 -02/05/2015 -03/05/2015 -04/05/2015 -05/05/2015 -06/05/2015 -07/05/2015 -08/05/2015 -09/05/2015 -10/05/2015 -11/05/2015 -12/05/2015 -13/05/2015 -14/05/2015 -15/05/2015 -16/05/2015 -17/05/2015 -18/05/2015 -19/05/2015 -20/05/2015 -21/05/2015 -22/05/2015 -23/05/2015 -24/05/2015 -25/05/2015 -26/05/2015 -27/05/2015 -28/05/2015 -29/05/2015 -30/05/2015 -31/05/2015 -01/06/2015 -02/06/2015 -03/06/2015 -04/06/2015 -05/06/2015 -06/06/2015 -07/06/2015 -08/06/2015 -09/06/2015 -10/06/2015 -11/06/2015 -12/06/2015 -13/06/2015 -14/06/2015 -15/06/2015 -16/06/2015 -17/06/2015 -18/06/2015 -19/06/2015 -20/06/2015 -21/06/2015 -22/06/2015 -23/06/2015 diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/snake_oil.ert b/ThirdParty/Ert/test-data/local/snake_oil_field/snake_oil.ert deleted file mode 100644 index 693ab1715c..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/snake_oil.ert +++ /dev/null @@ -1,50 +0,0 @@ -QUEUE_SYSTEM LOCAL - -JOBNAME SNAKE_OIL_%d -NUM_REALIZATIONS 10 -GRID grid/CASE.EGRID - -DEFINE storage/ - -STORE_SEED SEED -LOAD_SEED SEED - -RUNPATH /runpath/realisation-%d/iter-%d -ENSPATH /ensemble -ECLBASE SNAKE_OIL_FIELD -SUMMARY * - -HISTORY_SOURCE REFCASE_HISTORY -REFCASE refcase/SNAKE_OIL_FIELD - -TIME_MAP refcase/time_map.txt -OBS_CONFIG observations/observations.txt - -INSTALL_JOB SNAKE_OIL_SIMULATOR jobs/SNAKE_OIL_SIMULATOR -INSTALL_JOB SNAKE_OIL_NPV jobs/SNAKE_OIL_NPV -INSTALL_JOB SNAKE_OIL_DIFF jobs/SNAKE_OIL_DIFF - -FORWARD_MODEL SNAKE_OIL_SIMULATOR -FORWARD_MODEL SNAKE_OIL_NPV -FORWARD_MODEL SNAKE_OIL_DIFF - -RUN_TEMPLATE templates/seed_template.txt seed.txt - -GEN_KW SNAKE_OIL_PARAM templates/snake_oil_template.txt snake_oil_params.txt parameters/snake_oil_parameters.txt -CUSTOM_KW SNAKE_OIL_NPV snake_oil_npv.txt -GEN_DATA SNAKE_OIL_OPR_DIFF INPUT_FORMAT:ASCII RESULT_FILE:snake_oil_opr_diff_%d.txt REPORT_STEPS:199 -GEN_DATA SNAKE_OIL_WPR_DIFF INPUT_FORMAT:ASCII RESULT_FILE:snake_oil_wpr_diff_%d.txt REPORT_STEPS:199 -GEN_DATA SNAKE_OIL_GPR_DIFF INPUT_FORMAT:ASCII RESULT_FILE:snake_oil_gpr_diff_%d.txt REPORT_STEPS:199 - - --- Observe that the snake_oil simulator does not really take these --- field parameters into account, they are mainly here to create a --- test case with field parameters. - -FIELD PERMX PARAMETER permx.grdcel INIT_FILES:fields/permx%d.grdecl -FIELD PORO PARAMETER poro.grdcel INIT_FILES:fields/poro%d.grdecl - - -LOG_LEVEL 3 -LOG_FILE log/log.txt -UPDATE_LOG_PATH log/update diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/templates/seed_template.txt b/ThirdParty/Ert/test-data/local/snake_oil_field/templates/seed_template.txt deleted file mode 100644 index a0bca49fbd..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/templates/seed_template.txt +++ /dev/null @@ -1 +0,0 @@ -SEED: \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/snake_oil_field/templates/snake_oil_template.txt b/ThirdParty/Ert/test-data/local/snake_oil_field/templates/snake_oil_template.txt deleted file mode 100644 index ad2c648a0b..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_field/templates/snake_oil_template.txt +++ /dev/null @@ -1,10 +0,0 @@ -OP1_PERSISTENCE: -OP1_OCTAVES: -OP1_DIVERGENCE_SCALE: -OP1_OFFSET: -OP2_PERSISTENCE: -OP2_OCTAVES: -OP2_DIVERGENCE_SCALE: -OP2_OFFSET: -BPR_555_PERSISTENCE: -BPR_138_PERSISTENCE: diff --git a/ThirdParty/Ert/test-data/local/snake_oil_no_data/SEED b/ThirdParty/Ert/test-data/local/snake_oil_no_data/SEED deleted file mode 100644 index 314cda88f6..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_no_data/SEED +++ /dev/null @@ -1 +0,0 @@ -67 -110 42 -42 106 34 96 0 18 42 76 -69 44 -40 -78 -61 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/snake_oil_no_data/jobs/SNAKE_OIL_DIFF b/ThirdParty/Ert/test-data/local/snake_oil_no_data/jobs/SNAKE_OIL_DIFF deleted file mode 100644 index 98a867d959..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_no_data/jobs/SNAKE_OIL_DIFF +++ /dev/null @@ -1,4 +0,0 @@ -STDOUT snake_oil_diff.stdout -STDERR snake_oil_diff.stderr - -EXECUTABLE snake_oil_diff.py \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/snake_oil_no_data/jobs/SNAKE_OIL_NPV b/ThirdParty/Ert/test-data/local/snake_oil_no_data/jobs/SNAKE_OIL_NPV deleted file mode 100644 index 887830c756..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_no_data/jobs/SNAKE_OIL_NPV +++ /dev/null @@ -1,4 +0,0 @@ -STDOUT snake_oil_npv.stdout -STDERR snake_oil_npv.stderr - -EXECUTABLE snake_oil_npv.py \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/snake_oil_no_data/jobs/SNAKE_OIL_SIMULATOR b/ThirdParty/Ert/test-data/local/snake_oil_no_data/jobs/SNAKE_OIL_SIMULATOR deleted file mode 100644 index b4b7f9928f..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_no_data/jobs/SNAKE_OIL_SIMULATOR +++ /dev/null @@ -1,4 +0,0 @@ -STDOUT snake_oil.stdout -STDERR snake_oil.stderr - -EXECUTABLE snake_oil_simulator.py \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/snake_oil_no_data/jobs/snake_oil_diff.py b/ThirdParty/Ert/test-data/local/snake_oil_no_data/jobs/snake_oil_diff.py deleted file mode 100644 index afabb261f9..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_no_data/jobs/snake_oil_diff.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python -from ert.ecl import EclSum - -def writeDiff(filename, vector1, vector2): - with open(filename, "w") as f: - for index in range(len(vector1)): - node1 = vector1[index] - node2 = vector2[index] - - diff = node1.value - node2.value - f.write("%f\n" % diff) - - -if __name__ == '__main__': - ecl_sum = EclSum("SNAKE_OIL_FIELD") - - report_step = 199 - writeDiff("snake_oil_opr_diff_%d.txt" % report_step, ecl_sum["WOPR:OP1"], ecl_sum["WOPR:OP2"]) - writeDiff("snake_oil_wpr_diff_%d.txt" % report_step, ecl_sum["WWPR:OP1"], ecl_sum["WWPR:OP2"]) - writeDiff("snake_oil_gpr_diff_%d.txt" % report_step, ecl_sum["WGPR:OP1"], ecl_sum["WGPR:OP2"]) - - - - diff --git a/ThirdParty/Ert/test-data/local/snake_oil_no_data/jobs/snake_oil_npv.py b/ThirdParty/Ert/test-data/local/snake_oil_no_data/jobs/snake_oil_npv.py deleted file mode 100644 index 4ff61251bc..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_no_data/jobs/snake_oil_npv.py +++ /dev/null @@ -1,103 +0,0 @@ -#!/usr/bin/env python -from ert.ecl import EclSum - -OIL_PRICES = {"2010-01-01": 78.33, - "2010-02-01": 76.39, - "2010-03-01": 81.20, - "2010-04-01": 84.29, - "2010-05-01": 73.74, - "2010-06-01": 75.34, - "2010-07-01": 76.32, - "2010-08-01": 76.60, - "2010-09-01": 75.24, - "2010-10-01": 81.89, - "2010-11-01": 84.25, - "2010-12-01": 89.15, - "2011-01-01": 89.17, - "2011-02-01": 88.58, - "2011-03-01": 102.86, - "2011-04-01": 109.53, - "2011-05-01": 100.90, - "2011-06-01": 96.26, - "2011-07-01": 97.30, - "2011-08-01": 86.33, - "2011-09-01": 85.52, - "2011-10-01": 86.32, - "2011-11-01": 97.16, - "2011-12-01": 98.56, - "2012-01-01": 100.27, - "2012-02-01": 102.20, - "2012-03-01": 106.16, - "2012-04-01": 103.32, - "2012-05-01": 94.65, - "2012-06-01": 82.30, - "2012-07-01": 87.90, - "2012-08-01": 94.13, - "2012-09-01": 94.51, - "2012-10-01": 89.49, - "2012-11-01": 86.53, - "2012-12-01": 87.86, - "2013-01-01": 94.76, - "2013-02-01": 95.31, - "2013-03-01": 92.94, - "2013-04-01": 92.02, - "2013-05-01": 94.51, - "2013-06-01": 95.77, - "2013-07-01": 104.67, - "2013-08-01": 106.57, - "2013-09-01": 106.29, - "2013-10-01": 100.54, - "2013-11-01": 93.86, - "2013-12-01": 97.63, - "2014-01-01": 94.62, - "2014-02-01": 100.82, - "2014-03-01": 100.80, - "2014-04-01": 102.07, - "2014-05-01": 102.18, - "2014-06-01": 105.79, - "2014-07-01": 103.59, - "2014-08-01": 96.54, - "2014-09-01": 93.21, - "2014-10-01": 84.40, - "2014-11-01": 75.79, - "2014-12-01": 59.29, - "2015-01-01": 47.22, - "2015-02-01": 50.58, - "2015-03-01": 47.82, - "2015-04-01": 54.45, - "2015-05-01": 59.27, - "2015-06-01": 59.82, - "2015-07-01": 50.90, - "2015-08-01": 42.87, - "2015-09-01": 45.48} - -if __name__ == '__main__': - ecl_sum = EclSum("SNAKE_OIL_FIELD") - start_time = ecl_sum.getStartTime() - date_ranges = ecl_sum.timeRange(start_time, interval="1M") - production_sums = ecl_sum.blockedProduction("FOPT", date_ranges) - - npv = 0.0 - for index in range(0, len(date_ranges) - 1): - date = date_ranges[index + 1] # end of period - production_sum = production_sums[index] - - oil_price = OIL_PRICES[date.date().strftime("%Y-%m-%d")] - - production_value = oil_price * production_sum - npv += production_value - - with open("snake_oil_npv.txt", "w") as output_file: - output_file.write("NPV %s\n" % npv) - - if npv < 80000: - rating = "POOR" - elif 80000 <= npv < 100000: - rating = "AVERAGE" - elif 100000 <= npv < 120000: - rating = "GOOD" - else: - rating = "EXCELLENT" - - output_file.write("RATING %s\n" % rating) - diff --git a/ThirdParty/Ert/test-data/local/snake_oil_no_data/jobs/snake_oil_simulator.py b/ThirdParty/Ert/test-data/local/snake_oil_no_data/jobs/snake_oil_simulator.py deleted file mode 100644 index 1724cea874..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_no_data/jobs/snake_oil_simulator.py +++ /dev/null @@ -1,185 +0,0 @@ -#!/usr/bin/env python -from datetime import datetime -import os -import sys - -from ert.ecl import EclSum, EclSumTStep -from ert.test import ExtendedTestCase - -try: - from synthesizer import OilSimulator -except ImportError as e: - share_lib_path = os.path.join(ExtendedTestCase.findShareRoot(), "lib") - - sys.path.insert(0, share_lib_path) - synthesizer_module = __import__("synthesizer") - OilSimulator = synthesizer_module.OilSimulator - sys.path.pop(0) - - -def globalIndex(i, j, k, nx=10, ny=10, nz=10): - return i + nx * (j - 1) + nx * ny * (k - 1) - - -def readParameters(filename): - params = {} - with open(filename, "r") as f: - for line in f: - key, value = line.split(":", 1) - params[key] = value.strip() - - return params - - -def runSimulator(simulator, history_simulator, time_step_count): - """ @rtype: EclSum """ - ecl_sum = EclSum.writer("SNAKE_OIL_FIELD", datetime(2010, 1, 1), 10, 10, 10) - - ecl_sum.addVariable("FOPT") - ecl_sum.addVariable("FOPR") - ecl_sum.addVariable("FGPT") - ecl_sum.addVariable("FGPR") - ecl_sum.addVariable("FWPT") - ecl_sum.addVariable("FWPR") - ecl_sum.addVariable("FGOR") - ecl_sum.addVariable("FWCT") - - ecl_sum.addVariable("FOPTH") - ecl_sum.addVariable("FOPRH") - ecl_sum.addVariable("FGPTH") - ecl_sum.addVariable("FGPRH") - ecl_sum.addVariable("FWPTH") - ecl_sum.addVariable("FWPRH") - ecl_sum.addVariable("FGORH") - ecl_sum.addVariable("FWCTH") - - ecl_sum.addVariable("WOPR", wgname="OP1") - ecl_sum.addVariable("WOPR", wgname="OP2") - ecl_sum.addVariable("WWPR", wgname="OP1") - ecl_sum.addVariable("WWPR", wgname="OP2") - ecl_sum.addVariable("WGPR", wgname="OP1") - ecl_sum.addVariable("WGPR", wgname="OP2") - ecl_sum.addVariable("WGOR", wgname="OP1") - ecl_sum.addVariable("WGOR", wgname="OP2") - ecl_sum.addVariable("WWCT", wgname="OP1") - ecl_sum.addVariable("WWCT", wgname="OP2") - - ecl_sum.addVariable("WOPRH", wgname="OP1") - ecl_sum.addVariable("WOPRH", wgname="OP2") - ecl_sum.addVariable("WWPRH", wgname="OP1") - ecl_sum.addVariable("WWPRH", wgname="OP2") - ecl_sum.addVariable("WGPRH", wgname="OP1") - ecl_sum.addVariable("WGPRH", wgname="OP2") - ecl_sum.addVariable("WGORH", wgname="OP1") - ecl_sum.addVariable("WGORH", wgname="OP2") - ecl_sum.addVariable("WWCTH", wgname="OP1") - ecl_sum.addVariable("WWCTH", wgname="OP2") - - ecl_sum.addVariable("BPR", num=globalIndex(5, 5, 5)) - ecl_sum.addVariable("BPR", num=globalIndex(1, 3, 8)) - - time_map = [] - mini_step_count = 10 - total_step_count = time_step_count * mini_step_count - - for report_step in range(time_step_count): - for mini_step in range(mini_step_count): - t_step = ecl_sum.addTStep(report_step + 1, sim_days=report_step * mini_step_count + mini_step) - - time_map.append(t_step.getSimTime().datetime().strftime("%d/%m/%Y")) - - simulator.step(scale=1.0 / total_step_count) - history_simulator.step(scale=1.0 / total_step_count) - - t_step["FOPR"] = simulator.fopr() - t_step["FOPT"] = simulator.fopt() - t_step["FGPR"] = simulator.fgpr() - t_step["FGPT"] = simulator.fgpt() - t_step["FWPR"] = simulator.fwpr() - t_step["FWPT"] = simulator.fwpt() - t_step["FGOR"] = simulator.fgor() - t_step["FWCT"] = simulator.fwct() - - t_step["WOPR:OP1"] = simulator.opr("OP1") - t_step["WOPR:OP2"] = simulator.opr("OP2") - - t_step["WGPR:OP1"] = simulator.gpr("OP1") - t_step["WGPR:OP2"] = simulator.gpr("OP2") - - t_step["WWPR:OP1"] = simulator.wpr("OP1") - t_step["WWPR:OP2"] = simulator.wpr("OP2") - - t_step["WGOR:OP1"] = simulator.gor("OP1") - t_step["WGOR:OP2"] = simulator.gor("OP2") - - t_step["WWCT:OP1"] = simulator.wct("OP1") - t_step["WWCT:OP2"] = simulator.wct("OP2") - - t_step["BPR:5,5,5"] = simulator.bpr("5,5,5") - t_step["BPR:1,3,8"] = simulator.bpr("1,3,8") - - t_step["FOPRH"] = history_simulator.fopr() - t_step["FOPTH"] = history_simulator.fopt() - t_step["FGPRH"] = history_simulator.fgpr() - t_step["FGPTH"] = history_simulator.fgpt() - t_step["FWPRH"] = history_simulator.fwpr() - t_step["FWPTH"] = history_simulator.fwpt() - t_step["FGORH"] = history_simulator.fgor() - t_step["FWCTH"] = history_simulator.fwct() - - t_step["WOPRH:OP1"] = history_simulator.opr("OP1") - t_step["WOPRH:OP2"] = history_simulator.opr("OP2") - - t_step["WGPRH:OP1"] = history_simulator.gpr("OP1") - t_step["WGPRH:OP2"] = history_simulator.gpr("OP2") - - t_step["WWPRH:OP1"] = history_simulator.wpr("OP1") - t_step["WWPRH:OP2"] = history_simulator.wpr("OP2") - - t_step["WGORH:OP1"] = history_simulator.gor("OP1") - t_step["WGORH:OP2"] = history_simulator.gor("OP2") - - t_step["WWCTH:OP1"] = history_simulator.wct("OP1") - t_step["WWCTH:OP2"] = history_simulator.wct("OP2") - - return ecl_sum, time_map - - -def roundedInt(value): - return int(round(float(value))) - - -if __name__ == '__main__': - seed = int(readParameters("seed.txt")["SEED"]) - parameters = readParameters("snake_oil_params.txt") - - op1_divergence_scale = float(parameters["OP1_DIVERGENCE_SCALE"]) - op2_divergence_scale = float(parameters["OP2_DIVERGENCE_SCALE"]) - op1_persistence = float(parameters["OP1_PERSISTENCE"]) - op2_persistence = float(parameters["OP2_PERSISTENCE"]) - op1_offset = float(parameters["OP1_OFFSET"]) - op2_offset = float(parameters["OP2_OFFSET"]) - bpr_138_persistence = float(parameters["BPR_138_PERSISTENCE"]) - bpr_555_persistence = float(parameters["BPR_555_PERSISTENCE"]) - - op1_octaves = roundedInt(parameters["OP1_OCTAVES"]) - op2_octaves = roundedInt(parameters["OP2_OCTAVES"]) - - simulator = OilSimulator() - simulator.addWell("OP1", seed * 997, persistence=op1_persistence, octaves=op1_octaves, divergence_scale=op1_divergence_scale, offset=op1_offset) - simulator.addWell("OP2", seed * 13, persistence=op2_persistence, octaves=op2_octaves, divergence_scale=op2_divergence_scale, offset=op2_offset) - simulator.addBlock("5,5,5", seed * 37, persistence=bpr_555_persistence) - simulator.addBlock("1,3,8", seed * 31, persistence=bpr_138_persistence) - - history_simulator = OilSimulator() - history_simulator.addWell("OP1", 222118781) - history_simulator.addWell("OP2", 118116362) - - report_step_count = 200 - ecl_sum, time_map = runSimulator(simulator, history_simulator, report_step_count) - - ecl_sum.fwrite() - - with open("time_map.txt", "w") as f: - for t in time_map: - f.write("%s\n" % t) diff --git a/ThirdParty/Ert/test-data/local/snake_oil_no_data/observations/observations.txt b/ThirdParty/Ert/test-data/local/snake_oil_no_data/observations/observations.txt deleted file mode 100644 index de28837efb..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_no_data/observations/observations.txt +++ /dev/null @@ -1,56 +0,0 @@ -HISTORY_OBSERVATION FOPR; - -SUMMARY_OBSERVATION WOPR_OP1_9 -{ - VALUE = 0.1; - ERROR = 0.05; - RESTART = 9; - KEY = WOPR:OP1; -}; - -SUMMARY_OBSERVATION WOPR_OP1_36 -{ - VALUE = 0.7; - ERROR = 0.07; - RESTART = 36; - KEY = WOPR:OP1; -}; - -SUMMARY_OBSERVATION WOPR_OP1_72 -{ - VALUE = 0.5; - ERROR = 0.05; - RESTART = 72; - KEY = WOPR:OP1; -}; - -SUMMARY_OBSERVATION WOPR_OP1_108 -{ - VALUE = 0.3; - ERROR = 0.075; - RESTART = 108; - KEY = WOPR:OP1; -}; - -SUMMARY_OBSERVATION WOPR_OP1_144 -{ - VALUE = 0.2; - ERROR = 0.035; - RESTART = 144; - KEY = WOPR:OP1; -}; - -SUMMARY_OBSERVATION WOPR_OP1_190 -{ - VALUE = 0.015; - ERROR = 0.01; - RESTART = 190; - KEY = WOPR:OP1; -}; - -GENERAL_OBSERVATION WPR_DIFF_1 { - DATA = SNAKE_OIL_WPR_DIFF; - INDEX_LIST = 400,800,1200,1800; - RESTART = 199; - OBS_FILE = observations/wpr_diff_obs.txt; -}; \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/snake_oil_no_data/observations/wpr_diff_obs.txt b/ThirdParty/Ert/test-data/local/snake_oil_no_data/observations/wpr_diff_obs.txt deleted file mode 100644 index 4aee6d7ef7..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_no_data/observations/wpr_diff_obs.txt +++ /dev/null @@ -1,4 +0,0 @@ -0.0 0.1 -0.1 0.2 -0.2 0.15 -0.0 0.05 diff --git a/ThirdParty/Ert/test-data/local/snake_oil_no_data/parameters/snake_oil_parameters.txt b/ThirdParty/Ert/test-data/local/snake_oil_no_data/parameters/snake_oil_parameters.txt deleted file mode 100644 index 64573d0058..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_no_data/parameters/snake_oil_parameters.txt +++ /dev/null @@ -1,11 +0,0 @@ -OP1_PERSISTENCE UNIFORM 0.01 0.4 -OP1_OCTAVES UNIFORM 3 5 -OP1_DIVERGENCE_SCALE UNIFORM 0.25 1.25 -OP1_OFFSET UNIFORM -0.1 0.1 -OP2_PERSISTENCE UNIFORM 0.1 0.6 -OP2_OCTAVES UNIFORM 5 12 -OP2_DIVERGENCE_SCALE UNIFORM 0.5 1.5 -OP2_OFFSET UNIFORM -0.2 0.2 -BPR_555_PERSISTENCE UNIFORM 0.1 0.5 -BPR_138_PERSISTENCE UNIFORM 0.2 0.7 - diff --git a/ThirdParty/Ert/test-data/local/snake_oil_no_data/refcase/SNAKE_OIL_FIELD.SMSPEC b/ThirdParty/Ert/test-data/local/snake_oil_no_data/refcase/SNAKE_OIL_FIELD.SMSPEC deleted file mode 100644 index 5a29e043b2..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil_no_data/refcase/SNAKE_OIL_FIELD.SMSPEC and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil_no_data/refcase/SNAKE_OIL_FIELD.UNSMRY b/ThirdParty/Ert/test-data/local/snake_oil_no_data/refcase/SNAKE_OIL_FIELD.UNSMRY deleted file mode 100644 index dfa04f8002..0000000000 Binary files a/ThirdParty/Ert/test-data/local/snake_oil_no_data/refcase/SNAKE_OIL_FIELD.UNSMRY and /dev/null differ diff --git a/ThirdParty/Ert/test-data/local/snake_oil_no_data/refcase/refcase_readme.txt b/ThirdParty/Ert/test-data/local/snake_oil_no_data/refcase/refcase_readme.txt deleted file mode 100644 index a3d0fe6058..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_no_data/refcase/refcase_readme.txt +++ /dev/null @@ -1 +0,0 @@ -To create a refcase run the snake_oil_simulator.py job with the this as working directory. \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/snake_oil_no_data/refcase/seed.txt b/ThirdParty/Ert/test-data/local/snake_oil_no_data/refcase/seed.txt deleted file mode 100644 index 0009f6e89a..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_no_data/refcase/seed.txt +++ /dev/null @@ -1 +0,0 @@ -SEED:268776 \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/snake_oil_no_data/refcase/snake_oil_params.txt b/ThirdParty/Ert/test-data/local/snake_oil_no_data/refcase/snake_oil_params.txt deleted file mode 100644 index 3868522924..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_no_data/refcase/snake_oil_params.txt +++ /dev/null @@ -1,10 +0,0 @@ -OP1_PERSISTENCE:0.15 -OP1_OCTAVES:4 -OP1_DIVERGENCE_SCALE:0.5 -OP1_OFFSET:0.0 -OP2_PERSISTENCE:0.25 -OP2_OCTAVES:7.0 -OP2_DIVERGENCE_SCALE:1.0 -OP2_OFFSET:0.0 -BPR_555_PERSISTENCE:0.25 -BPR_138_PERSISTENCE:0.35 diff --git a/ThirdParty/Ert/test-data/local/snake_oil_no_data/refcase/time_map.txt b/ThirdParty/Ert/test-data/local/snake_oil_no_data/refcase/time_map.txt deleted file mode 100644 index d54b4293ae..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_no_data/refcase/time_map.txt +++ /dev/null @@ -1,2000 +0,0 @@ -01/01/2010 -02/01/2010 -03/01/2010 -04/01/2010 -05/01/2010 -06/01/2010 -07/01/2010 -08/01/2010 -09/01/2010 -10/01/2010 -11/01/2010 -12/01/2010 -13/01/2010 -14/01/2010 -15/01/2010 -16/01/2010 -17/01/2010 -18/01/2010 -19/01/2010 -20/01/2010 -21/01/2010 -22/01/2010 -23/01/2010 -24/01/2010 -25/01/2010 -26/01/2010 -27/01/2010 -28/01/2010 -29/01/2010 -30/01/2010 -31/01/2010 -01/02/2010 -02/02/2010 -03/02/2010 -04/02/2010 -05/02/2010 -06/02/2010 -07/02/2010 -08/02/2010 -09/02/2010 -10/02/2010 -11/02/2010 -12/02/2010 -13/02/2010 -14/02/2010 -15/02/2010 -16/02/2010 -17/02/2010 -18/02/2010 -19/02/2010 -20/02/2010 -21/02/2010 -22/02/2010 -23/02/2010 -24/02/2010 -25/02/2010 -26/02/2010 -27/02/2010 -28/02/2010 -01/03/2010 -02/03/2010 -03/03/2010 -04/03/2010 -05/03/2010 -06/03/2010 -07/03/2010 -08/03/2010 -09/03/2010 -10/03/2010 -11/03/2010 -12/03/2010 -13/03/2010 -14/03/2010 -15/03/2010 -16/03/2010 -17/03/2010 -18/03/2010 -19/03/2010 -20/03/2010 -21/03/2010 -22/03/2010 -23/03/2010 -24/03/2010 -25/03/2010 -26/03/2010 -27/03/2010 -28/03/2010 -29/03/2010 -30/03/2010 -31/03/2010 -01/04/2010 -02/04/2010 -03/04/2010 -04/04/2010 -05/04/2010 -06/04/2010 -07/04/2010 -08/04/2010 -09/04/2010 -10/04/2010 -11/04/2010 -12/04/2010 -13/04/2010 -14/04/2010 -15/04/2010 -16/04/2010 -17/04/2010 -18/04/2010 -19/04/2010 -20/04/2010 -21/04/2010 -22/04/2010 -23/04/2010 -24/04/2010 -25/04/2010 -26/04/2010 -27/04/2010 -28/04/2010 -29/04/2010 -30/04/2010 -01/05/2010 -02/05/2010 -03/05/2010 -04/05/2010 -05/05/2010 -06/05/2010 -07/05/2010 -08/05/2010 -09/05/2010 -10/05/2010 -11/05/2010 -12/05/2010 -13/05/2010 -14/05/2010 -15/05/2010 -16/05/2010 -17/05/2010 -18/05/2010 -19/05/2010 -20/05/2010 -21/05/2010 -22/05/2010 -23/05/2010 -24/05/2010 -25/05/2010 -26/05/2010 -27/05/2010 -28/05/2010 -29/05/2010 -30/05/2010 -31/05/2010 -01/06/2010 -02/06/2010 -03/06/2010 -04/06/2010 -05/06/2010 -06/06/2010 -07/06/2010 -08/06/2010 -09/06/2010 -10/06/2010 -11/06/2010 -12/06/2010 -13/06/2010 -14/06/2010 -15/06/2010 -16/06/2010 -17/06/2010 -18/06/2010 -19/06/2010 -20/06/2010 -21/06/2010 -22/06/2010 -23/06/2010 -24/06/2010 -25/06/2010 -26/06/2010 -27/06/2010 -28/06/2010 -29/06/2010 -30/06/2010 -01/07/2010 -02/07/2010 -03/07/2010 -04/07/2010 -05/07/2010 -06/07/2010 -07/07/2010 -08/07/2010 -09/07/2010 -10/07/2010 -11/07/2010 -12/07/2010 -13/07/2010 -14/07/2010 -15/07/2010 -16/07/2010 -17/07/2010 -18/07/2010 -19/07/2010 -20/07/2010 -21/07/2010 -22/07/2010 -23/07/2010 -24/07/2010 -25/07/2010 -26/07/2010 -27/07/2010 -28/07/2010 -29/07/2010 -30/07/2010 -31/07/2010 -01/08/2010 -02/08/2010 -03/08/2010 -04/08/2010 -05/08/2010 -06/08/2010 -07/08/2010 -08/08/2010 -09/08/2010 -10/08/2010 -11/08/2010 -12/08/2010 -13/08/2010 -14/08/2010 -15/08/2010 -16/08/2010 -17/08/2010 -18/08/2010 -19/08/2010 -20/08/2010 -21/08/2010 -22/08/2010 -23/08/2010 -24/08/2010 -25/08/2010 -26/08/2010 -27/08/2010 -28/08/2010 -29/08/2010 -30/08/2010 -31/08/2010 -01/09/2010 -02/09/2010 -03/09/2010 -04/09/2010 -05/09/2010 -06/09/2010 -07/09/2010 -08/09/2010 -09/09/2010 -10/09/2010 -11/09/2010 -12/09/2010 -13/09/2010 -14/09/2010 -15/09/2010 -16/09/2010 -17/09/2010 -18/09/2010 -19/09/2010 -20/09/2010 -21/09/2010 -22/09/2010 -23/09/2010 -24/09/2010 -25/09/2010 -26/09/2010 -27/09/2010 -28/09/2010 -29/09/2010 -30/09/2010 -01/10/2010 -02/10/2010 -03/10/2010 -04/10/2010 -05/10/2010 -06/10/2010 -07/10/2010 -08/10/2010 -09/10/2010 -10/10/2010 -11/10/2010 -12/10/2010 -13/10/2010 -14/10/2010 -15/10/2010 -16/10/2010 -17/10/2010 -18/10/2010 -19/10/2010 -20/10/2010 -21/10/2010 -22/10/2010 -23/10/2010 -24/10/2010 -25/10/2010 -26/10/2010 -27/10/2010 -28/10/2010 -29/10/2010 -30/10/2010 -31/10/2010 -01/11/2010 -02/11/2010 -03/11/2010 -04/11/2010 -05/11/2010 -06/11/2010 -07/11/2010 -08/11/2010 -09/11/2010 -10/11/2010 -11/11/2010 -12/11/2010 -13/11/2010 -14/11/2010 -15/11/2010 -16/11/2010 -17/11/2010 -18/11/2010 -19/11/2010 -20/11/2010 -21/11/2010 -22/11/2010 -23/11/2010 -24/11/2010 -25/11/2010 -26/11/2010 -27/11/2010 -28/11/2010 -29/11/2010 -30/11/2010 -01/12/2010 -02/12/2010 -03/12/2010 -04/12/2010 -05/12/2010 -06/12/2010 -07/12/2010 -08/12/2010 -09/12/2010 -10/12/2010 -11/12/2010 -12/12/2010 -13/12/2010 -14/12/2010 -15/12/2010 -16/12/2010 -17/12/2010 -18/12/2010 -19/12/2010 -20/12/2010 -21/12/2010 -22/12/2010 -23/12/2010 -24/12/2010 -25/12/2010 -26/12/2010 -27/12/2010 -28/12/2010 -29/12/2010 -30/12/2010 -31/12/2010 -01/01/2011 -02/01/2011 -03/01/2011 -04/01/2011 -05/01/2011 -06/01/2011 -07/01/2011 -08/01/2011 -09/01/2011 -10/01/2011 -11/01/2011 -12/01/2011 -13/01/2011 -14/01/2011 -15/01/2011 -16/01/2011 -17/01/2011 -18/01/2011 -19/01/2011 -20/01/2011 -21/01/2011 -22/01/2011 -23/01/2011 -24/01/2011 -25/01/2011 -26/01/2011 -27/01/2011 -28/01/2011 -29/01/2011 -30/01/2011 -31/01/2011 -01/02/2011 -02/02/2011 -03/02/2011 -04/02/2011 -05/02/2011 -06/02/2011 -07/02/2011 -08/02/2011 -09/02/2011 -10/02/2011 -11/02/2011 -12/02/2011 -13/02/2011 -14/02/2011 -15/02/2011 -16/02/2011 -17/02/2011 -18/02/2011 -19/02/2011 -20/02/2011 -21/02/2011 -22/02/2011 -23/02/2011 -24/02/2011 -25/02/2011 -26/02/2011 -27/02/2011 -28/02/2011 -01/03/2011 -02/03/2011 -03/03/2011 -04/03/2011 -05/03/2011 -06/03/2011 -07/03/2011 -08/03/2011 -09/03/2011 -10/03/2011 -11/03/2011 -12/03/2011 -13/03/2011 -14/03/2011 -15/03/2011 -16/03/2011 -17/03/2011 -18/03/2011 -19/03/2011 -20/03/2011 -21/03/2011 -22/03/2011 -23/03/2011 -24/03/2011 -25/03/2011 -26/03/2011 -27/03/2011 -28/03/2011 -29/03/2011 -30/03/2011 -31/03/2011 -01/04/2011 -02/04/2011 -03/04/2011 -04/04/2011 -05/04/2011 -06/04/2011 -07/04/2011 -08/04/2011 -09/04/2011 -10/04/2011 -11/04/2011 -12/04/2011 -13/04/2011 -14/04/2011 -15/04/2011 -16/04/2011 -17/04/2011 -18/04/2011 -19/04/2011 -20/04/2011 -21/04/2011 -22/04/2011 -23/04/2011 -24/04/2011 -25/04/2011 -26/04/2011 -27/04/2011 -28/04/2011 -29/04/2011 -30/04/2011 -01/05/2011 -02/05/2011 -03/05/2011 -04/05/2011 -05/05/2011 -06/05/2011 -07/05/2011 -08/05/2011 -09/05/2011 -10/05/2011 -11/05/2011 -12/05/2011 -13/05/2011 -14/05/2011 -15/05/2011 -16/05/2011 -17/05/2011 -18/05/2011 -19/05/2011 -20/05/2011 -21/05/2011 -22/05/2011 -23/05/2011 -24/05/2011 -25/05/2011 -26/05/2011 -27/05/2011 -28/05/2011 -29/05/2011 -30/05/2011 -31/05/2011 -01/06/2011 -02/06/2011 -03/06/2011 -04/06/2011 -05/06/2011 -06/06/2011 -07/06/2011 -08/06/2011 -09/06/2011 -10/06/2011 -11/06/2011 -12/06/2011 -13/06/2011 -14/06/2011 -15/06/2011 -16/06/2011 -17/06/2011 -18/06/2011 -19/06/2011 -20/06/2011 -21/06/2011 -22/06/2011 -23/06/2011 -24/06/2011 -25/06/2011 -26/06/2011 -27/06/2011 -28/06/2011 -29/06/2011 -30/06/2011 -01/07/2011 -02/07/2011 -03/07/2011 -04/07/2011 -05/07/2011 -06/07/2011 -07/07/2011 -08/07/2011 -09/07/2011 -10/07/2011 -11/07/2011 -12/07/2011 -13/07/2011 -14/07/2011 -15/07/2011 -16/07/2011 -17/07/2011 -18/07/2011 -19/07/2011 -20/07/2011 -21/07/2011 -22/07/2011 -23/07/2011 -24/07/2011 -25/07/2011 -26/07/2011 -27/07/2011 -28/07/2011 -29/07/2011 -30/07/2011 -31/07/2011 -01/08/2011 -02/08/2011 -03/08/2011 -04/08/2011 -05/08/2011 -06/08/2011 -07/08/2011 -08/08/2011 -09/08/2011 -10/08/2011 -11/08/2011 -12/08/2011 -13/08/2011 -14/08/2011 -15/08/2011 -16/08/2011 -17/08/2011 -18/08/2011 -19/08/2011 -20/08/2011 -21/08/2011 -22/08/2011 -23/08/2011 -24/08/2011 -25/08/2011 -26/08/2011 -27/08/2011 -28/08/2011 -29/08/2011 -30/08/2011 -31/08/2011 -01/09/2011 -02/09/2011 -03/09/2011 -04/09/2011 -05/09/2011 -06/09/2011 -07/09/2011 -08/09/2011 -09/09/2011 -10/09/2011 -11/09/2011 -12/09/2011 -13/09/2011 -14/09/2011 -15/09/2011 -16/09/2011 -17/09/2011 -18/09/2011 -19/09/2011 -20/09/2011 -21/09/2011 -22/09/2011 -23/09/2011 -24/09/2011 -25/09/2011 -26/09/2011 -27/09/2011 -28/09/2011 -29/09/2011 -30/09/2011 -01/10/2011 -02/10/2011 -03/10/2011 -04/10/2011 -05/10/2011 -06/10/2011 -07/10/2011 -08/10/2011 -09/10/2011 -10/10/2011 -11/10/2011 -12/10/2011 -13/10/2011 -14/10/2011 -15/10/2011 -16/10/2011 -17/10/2011 -18/10/2011 -19/10/2011 -20/10/2011 -21/10/2011 -22/10/2011 -23/10/2011 -24/10/2011 -25/10/2011 -26/10/2011 -27/10/2011 -28/10/2011 -29/10/2011 -30/10/2011 -31/10/2011 -01/11/2011 -02/11/2011 -03/11/2011 -04/11/2011 -05/11/2011 -06/11/2011 -07/11/2011 -08/11/2011 -09/11/2011 -10/11/2011 -11/11/2011 -12/11/2011 -13/11/2011 -14/11/2011 -15/11/2011 -16/11/2011 -17/11/2011 -18/11/2011 -19/11/2011 -20/11/2011 -21/11/2011 -22/11/2011 -23/11/2011 -24/11/2011 -25/11/2011 -26/11/2011 -27/11/2011 -28/11/2011 -29/11/2011 -30/11/2011 -01/12/2011 -02/12/2011 -03/12/2011 -04/12/2011 -05/12/2011 -06/12/2011 -07/12/2011 -08/12/2011 -09/12/2011 -10/12/2011 -11/12/2011 -12/12/2011 -13/12/2011 -14/12/2011 -15/12/2011 -16/12/2011 -17/12/2011 -18/12/2011 -19/12/2011 -20/12/2011 -21/12/2011 -22/12/2011 -23/12/2011 -24/12/2011 -25/12/2011 -26/12/2011 -27/12/2011 -28/12/2011 -29/12/2011 -30/12/2011 -31/12/2011 -01/01/2012 -02/01/2012 -03/01/2012 -04/01/2012 -05/01/2012 -06/01/2012 -07/01/2012 -08/01/2012 -09/01/2012 -10/01/2012 -11/01/2012 -12/01/2012 -13/01/2012 -14/01/2012 -15/01/2012 -16/01/2012 -17/01/2012 -18/01/2012 -19/01/2012 -20/01/2012 -21/01/2012 -22/01/2012 -23/01/2012 -24/01/2012 -25/01/2012 -26/01/2012 -27/01/2012 -28/01/2012 -29/01/2012 -30/01/2012 -31/01/2012 -01/02/2012 -02/02/2012 -03/02/2012 -04/02/2012 -05/02/2012 -06/02/2012 -07/02/2012 -08/02/2012 -09/02/2012 -10/02/2012 -11/02/2012 -12/02/2012 -13/02/2012 -14/02/2012 -15/02/2012 -16/02/2012 -17/02/2012 -18/02/2012 -19/02/2012 -20/02/2012 -21/02/2012 -22/02/2012 -23/02/2012 -24/02/2012 -25/02/2012 -26/02/2012 -27/02/2012 -28/02/2012 -29/02/2012 -01/03/2012 -02/03/2012 -03/03/2012 -04/03/2012 -05/03/2012 -06/03/2012 -07/03/2012 -08/03/2012 -09/03/2012 -10/03/2012 -11/03/2012 -12/03/2012 -13/03/2012 -14/03/2012 -15/03/2012 -16/03/2012 -17/03/2012 -18/03/2012 -19/03/2012 -20/03/2012 -21/03/2012 -22/03/2012 -23/03/2012 -24/03/2012 -25/03/2012 -26/03/2012 -27/03/2012 -28/03/2012 -29/03/2012 -30/03/2012 -31/03/2012 -01/04/2012 -02/04/2012 -03/04/2012 -04/04/2012 -05/04/2012 -06/04/2012 -07/04/2012 -08/04/2012 -09/04/2012 -10/04/2012 -11/04/2012 -12/04/2012 -13/04/2012 -14/04/2012 -15/04/2012 -16/04/2012 -17/04/2012 -18/04/2012 -19/04/2012 -20/04/2012 -21/04/2012 -22/04/2012 -23/04/2012 -24/04/2012 -25/04/2012 -26/04/2012 -27/04/2012 -28/04/2012 -29/04/2012 -30/04/2012 -01/05/2012 -02/05/2012 -03/05/2012 -04/05/2012 -05/05/2012 -06/05/2012 -07/05/2012 -08/05/2012 -09/05/2012 -10/05/2012 -11/05/2012 -12/05/2012 -13/05/2012 -14/05/2012 -15/05/2012 -16/05/2012 -17/05/2012 -18/05/2012 -19/05/2012 -20/05/2012 -21/05/2012 -22/05/2012 -23/05/2012 -24/05/2012 -25/05/2012 -26/05/2012 -27/05/2012 -28/05/2012 -29/05/2012 -30/05/2012 -31/05/2012 -01/06/2012 -02/06/2012 -03/06/2012 -04/06/2012 -05/06/2012 -06/06/2012 -07/06/2012 -08/06/2012 -09/06/2012 -10/06/2012 -11/06/2012 -12/06/2012 -13/06/2012 -14/06/2012 -15/06/2012 -16/06/2012 -17/06/2012 -18/06/2012 -19/06/2012 -20/06/2012 -21/06/2012 -22/06/2012 -23/06/2012 -24/06/2012 -25/06/2012 -26/06/2012 -27/06/2012 -28/06/2012 -29/06/2012 -30/06/2012 -01/07/2012 -02/07/2012 -03/07/2012 -04/07/2012 -05/07/2012 -06/07/2012 -07/07/2012 -08/07/2012 -09/07/2012 -10/07/2012 -11/07/2012 -12/07/2012 -13/07/2012 -14/07/2012 -15/07/2012 -16/07/2012 -17/07/2012 -18/07/2012 -19/07/2012 -20/07/2012 -21/07/2012 -22/07/2012 -23/07/2012 -24/07/2012 -25/07/2012 -26/07/2012 -27/07/2012 -28/07/2012 -29/07/2012 -30/07/2012 -31/07/2012 -01/08/2012 -02/08/2012 -03/08/2012 -04/08/2012 -05/08/2012 -06/08/2012 -07/08/2012 -08/08/2012 -09/08/2012 -10/08/2012 -11/08/2012 -12/08/2012 -13/08/2012 -14/08/2012 -15/08/2012 -16/08/2012 -17/08/2012 -18/08/2012 -19/08/2012 -20/08/2012 -21/08/2012 -22/08/2012 -23/08/2012 -24/08/2012 -25/08/2012 -26/08/2012 -27/08/2012 -28/08/2012 -29/08/2012 -30/08/2012 -31/08/2012 -01/09/2012 -02/09/2012 -03/09/2012 -04/09/2012 -05/09/2012 -06/09/2012 -07/09/2012 -08/09/2012 -09/09/2012 -10/09/2012 -11/09/2012 -12/09/2012 -13/09/2012 -14/09/2012 -15/09/2012 -16/09/2012 -17/09/2012 -18/09/2012 -19/09/2012 -20/09/2012 -21/09/2012 -22/09/2012 -23/09/2012 -24/09/2012 -25/09/2012 -26/09/2012 -27/09/2012 -28/09/2012 -29/09/2012 -30/09/2012 -01/10/2012 -02/10/2012 -03/10/2012 -04/10/2012 -05/10/2012 -06/10/2012 -07/10/2012 -08/10/2012 -09/10/2012 -10/10/2012 -11/10/2012 -12/10/2012 -13/10/2012 -14/10/2012 -15/10/2012 -16/10/2012 -17/10/2012 -18/10/2012 -19/10/2012 -20/10/2012 -21/10/2012 -22/10/2012 -23/10/2012 -24/10/2012 -25/10/2012 -26/10/2012 -27/10/2012 -28/10/2012 -29/10/2012 -30/10/2012 -31/10/2012 -01/11/2012 -02/11/2012 -03/11/2012 -04/11/2012 -05/11/2012 -06/11/2012 -07/11/2012 -08/11/2012 -09/11/2012 -10/11/2012 -11/11/2012 -12/11/2012 -13/11/2012 -14/11/2012 -15/11/2012 -16/11/2012 -17/11/2012 -18/11/2012 -19/11/2012 -20/11/2012 -21/11/2012 -22/11/2012 -23/11/2012 -24/11/2012 -25/11/2012 -26/11/2012 -27/11/2012 -28/11/2012 -29/11/2012 -30/11/2012 -01/12/2012 -02/12/2012 -03/12/2012 -04/12/2012 -05/12/2012 -06/12/2012 -07/12/2012 -08/12/2012 -09/12/2012 -10/12/2012 -11/12/2012 -12/12/2012 -13/12/2012 -14/12/2012 -15/12/2012 -16/12/2012 -17/12/2012 -18/12/2012 -19/12/2012 -20/12/2012 -21/12/2012 -22/12/2012 -23/12/2012 -24/12/2012 -25/12/2012 -26/12/2012 -27/12/2012 -28/12/2012 -29/12/2012 -30/12/2012 -31/12/2012 -01/01/2013 -02/01/2013 -03/01/2013 -04/01/2013 -05/01/2013 -06/01/2013 -07/01/2013 -08/01/2013 -09/01/2013 -10/01/2013 -11/01/2013 -12/01/2013 -13/01/2013 -14/01/2013 -15/01/2013 -16/01/2013 -17/01/2013 -18/01/2013 -19/01/2013 -20/01/2013 -21/01/2013 -22/01/2013 -23/01/2013 -24/01/2013 -25/01/2013 -26/01/2013 -27/01/2013 -28/01/2013 -29/01/2013 -30/01/2013 -31/01/2013 -01/02/2013 -02/02/2013 -03/02/2013 -04/02/2013 -05/02/2013 -06/02/2013 -07/02/2013 -08/02/2013 -09/02/2013 -10/02/2013 -11/02/2013 -12/02/2013 -13/02/2013 -14/02/2013 -15/02/2013 -16/02/2013 -17/02/2013 -18/02/2013 -19/02/2013 -20/02/2013 -21/02/2013 -22/02/2013 -23/02/2013 -24/02/2013 -25/02/2013 -26/02/2013 -27/02/2013 -28/02/2013 -01/03/2013 -02/03/2013 -03/03/2013 -04/03/2013 -05/03/2013 -06/03/2013 -07/03/2013 -08/03/2013 -09/03/2013 -10/03/2013 -11/03/2013 -12/03/2013 -13/03/2013 -14/03/2013 -15/03/2013 -16/03/2013 -17/03/2013 -18/03/2013 -19/03/2013 -20/03/2013 -21/03/2013 -22/03/2013 -23/03/2013 -24/03/2013 -25/03/2013 -26/03/2013 -27/03/2013 -28/03/2013 -29/03/2013 -30/03/2013 -31/03/2013 -01/04/2013 -02/04/2013 -03/04/2013 -04/04/2013 -05/04/2013 -06/04/2013 -07/04/2013 -08/04/2013 -09/04/2013 -10/04/2013 -11/04/2013 -12/04/2013 -13/04/2013 -14/04/2013 -15/04/2013 -16/04/2013 -17/04/2013 -18/04/2013 -19/04/2013 -20/04/2013 -21/04/2013 -22/04/2013 -23/04/2013 -24/04/2013 -25/04/2013 -26/04/2013 -27/04/2013 -28/04/2013 -29/04/2013 -30/04/2013 -01/05/2013 -02/05/2013 -03/05/2013 -04/05/2013 -05/05/2013 -06/05/2013 -07/05/2013 -08/05/2013 -09/05/2013 -10/05/2013 -11/05/2013 -12/05/2013 -13/05/2013 -14/05/2013 -15/05/2013 -16/05/2013 -17/05/2013 -18/05/2013 -19/05/2013 -20/05/2013 -21/05/2013 -22/05/2013 -23/05/2013 -24/05/2013 -25/05/2013 -26/05/2013 -27/05/2013 -28/05/2013 -29/05/2013 -30/05/2013 -31/05/2013 -01/06/2013 -02/06/2013 -03/06/2013 -04/06/2013 -05/06/2013 -06/06/2013 -07/06/2013 -08/06/2013 -09/06/2013 -10/06/2013 -11/06/2013 -12/06/2013 -13/06/2013 -14/06/2013 -15/06/2013 -16/06/2013 -17/06/2013 -18/06/2013 -19/06/2013 -20/06/2013 -21/06/2013 -22/06/2013 -23/06/2013 -24/06/2013 -25/06/2013 -26/06/2013 -27/06/2013 -28/06/2013 -29/06/2013 -30/06/2013 -01/07/2013 -02/07/2013 -03/07/2013 -04/07/2013 -05/07/2013 -06/07/2013 -07/07/2013 -08/07/2013 -09/07/2013 -10/07/2013 -11/07/2013 -12/07/2013 -13/07/2013 -14/07/2013 -15/07/2013 -16/07/2013 -17/07/2013 -18/07/2013 -19/07/2013 -20/07/2013 -21/07/2013 -22/07/2013 -23/07/2013 -24/07/2013 -25/07/2013 -26/07/2013 -27/07/2013 -28/07/2013 -29/07/2013 -30/07/2013 -31/07/2013 -01/08/2013 -02/08/2013 -03/08/2013 -04/08/2013 -05/08/2013 -06/08/2013 -07/08/2013 -08/08/2013 -09/08/2013 -10/08/2013 -11/08/2013 -12/08/2013 -13/08/2013 -14/08/2013 -15/08/2013 -16/08/2013 -17/08/2013 -18/08/2013 -19/08/2013 -20/08/2013 -21/08/2013 -22/08/2013 -23/08/2013 -24/08/2013 -25/08/2013 -26/08/2013 -27/08/2013 -28/08/2013 -29/08/2013 -30/08/2013 -31/08/2013 -01/09/2013 -02/09/2013 -03/09/2013 -04/09/2013 -05/09/2013 -06/09/2013 -07/09/2013 -08/09/2013 -09/09/2013 -10/09/2013 -11/09/2013 -12/09/2013 -13/09/2013 -14/09/2013 -15/09/2013 -16/09/2013 -17/09/2013 -18/09/2013 -19/09/2013 -20/09/2013 -21/09/2013 -22/09/2013 -23/09/2013 -24/09/2013 -25/09/2013 -26/09/2013 -27/09/2013 -28/09/2013 -29/09/2013 -30/09/2013 -01/10/2013 -02/10/2013 -03/10/2013 -04/10/2013 -05/10/2013 -06/10/2013 -07/10/2013 -08/10/2013 -09/10/2013 -10/10/2013 -11/10/2013 -12/10/2013 -13/10/2013 -14/10/2013 -15/10/2013 -16/10/2013 -17/10/2013 -18/10/2013 -19/10/2013 -20/10/2013 -21/10/2013 -22/10/2013 -23/10/2013 -24/10/2013 -25/10/2013 -26/10/2013 -27/10/2013 -28/10/2013 -29/10/2013 -30/10/2013 -31/10/2013 -01/11/2013 -02/11/2013 -03/11/2013 -04/11/2013 -05/11/2013 -06/11/2013 -07/11/2013 -08/11/2013 -09/11/2013 -10/11/2013 -11/11/2013 -12/11/2013 -13/11/2013 -14/11/2013 -15/11/2013 -16/11/2013 -17/11/2013 -18/11/2013 -19/11/2013 -20/11/2013 -21/11/2013 -22/11/2013 -23/11/2013 -24/11/2013 -25/11/2013 -26/11/2013 -27/11/2013 -28/11/2013 -29/11/2013 -30/11/2013 -01/12/2013 -02/12/2013 -03/12/2013 -04/12/2013 -05/12/2013 -06/12/2013 -07/12/2013 -08/12/2013 -09/12/2013 -10/12/2013 -11/12/2013 -12/12/2013 -13/12/2013 -14/12/2013 -15/12/2013 -16/12/2013 -17/12/2013 -18/12/2013 -19/12/2013 -20/12/2013 -21/12/2013 -22/12/2013 -23/12/2013 -24/12/2013 -25/12/2013 -26/12/2013 -27/12/2013 -28/12/2013 -29/12/2013 -30/12/2013 -31/12/2013 -01/01/2014 -02/01/2014 -03/01/2014 -04/01/2014 -05/01/2014 -06/01/2014 -07/01/2014 -08/01/2014 -09/01/2014 -10/01/2014 -11/01/2014 -12/01/2014 -13/01/2014 -14/01/2014 -15/01/2014 -16/01/2014 -17/01/2014 -18/01/2014 -19/01/2014 -20/01/2014 -21/01/2014 -22/01/2014 -23/01/2014 -24/01/2014 -25/01/2014 -26/01/2014 -27/01/2014 -28/01/2014 -29/01/2014 -30/01/2014 -31/01/2014 -01/02/2014 -02/02/2014 -03/02/2014 -04/02/2014 -05/02/2014 -06/02/2014 -07/02/2014 -08/02/2014 -09/02/2014 -10/02/2014 -11/02/2014 -12/02/2014 -13/02/2014 -14/02/2014 -15/02/2014 -16/02/2014 -17/02/2014 -18/02/2014 -19/02/2014 -20/02/2014 -21/02/2014 -22/02/2014 -23/02/2014 -24/02/2014 -25/02/2014 -26/02/2014 -27/02/2014 -28/02/2014 -01/03/2014 -02/03/2014 -03/03/2014 -04/03/2014 -05/03/2014 -06/03/2014 -07/03/2014 -08/03/2014 -09/03/2014 -10/03/2014 -11/03/2014 -12/03/2014 -13/03/2014 -14/03/2014 -15/03/2014 -16/03/2014 -17/03/2014 -18/03/2014 -19/03/2014 -20/03/2014 -21/03/2014 -22/03/2014 -23/03/2014 -24/03/2014 -25/03/2014 -26/03/2014 -27/03/2014 -28/03/2014 -29/03/2014 -30/03/2014 -31/03/2014 -01/04/2014 -02/04/2014 -03/04/2014 -04/04/2014 -05/04/2014 -06/04/2014 -07/04/2014 -08/04/2014 -09/04/2014 -10/04/2014 -11/04/2014 -12/04/2014 -13/04/2014 -14/04/2014 -15/04/2014 -16/04/2014 -17/04/2014 -18/04/2014 -19/04/2014 -20/04/2014 -21/04/2014 -22/04/2014 -23/04/2014 -24/04/2014 -25/04/2014 -26/04/2014 -27/04/2014 -28/04/2014 -29/04/2014 -30/04/2014 -01/05/2014 -02/05/2014 -03/05/2014 -04/05/2014 -05/05/2014 -06/05/2014 -07/05/2014 -08/05/2014 -09/05/2014 -10/05/2014 -11/05/2014 -12/05/2014 -13/05/2014 -14/05/2014 -15/05/2014 -16/05/2014 -17/05/2014 -18/05/2014 -19/05/2014 -20/05/2014 -21/05/2014 -22/05/2014 -23/05/2014 -24/05/2014 -25/05/2014 -26/05/2014 -27/05/2014 -28/05/2014 -29/05/2014 -30/05/2014 -31/05/2014 -01/06/2014 -02/06/2014 -03/06/2014 -04/06/2014 -05/06/2014 -06/06/2014 -07/06/2014 -08/06/2014 -09/06/2014 -10/06/2014 -11/06/2014 -12/06/2014 -13/06/2014 -14/06/2014 -15/06/2014 -16/06/2014 -17/06/2014 -18/06/2014 -19/06/2014 -20/06/2014 -21/06/2014 -22/06/2014 -23/06/2014 -24/06/2014 -25/06/2014 -26/06/2014 -27/06/2014 -28/06/2014 -29/06/2014 -30/06/2014 -01/07/2014 -02/07/2014 -03/07/2014 -04/07/2014 -05/07/2014 -06/07/2014 -07/07/2014 -08/07/2014 -09/07/2014 -10/07/2014 -11/07/2014 -12/07/2014 -13/07/2014 -14/07/2014 -15/07/2014 -16/07/2014 -17/07/2014 -18/07/2014 -19/07/2014 -20/07/2014 -21/07/2014 -22/07/2014 -23/07/2014 -24/07/2014 -25/07/2014 -26/07/2014 -27/07/2014 -28/07/2014 -29/07/2014 -30/07/2014 -31/07/2014 -01/08/2014 -02/08/2014 -03/08/2014 -04/08/2014 -05/08/2014 -06/08/2014 -07/08/2014 -08/08/2014 -09/08/2014 -10/08/2014 -11/08/2014 -12/08/2014 -13/08/2014 -14/08/2014 -15/08/2014 -16/08/2014 -17/08/2014 -18/08/2014 -19/08/2014 -20/08/2014 -21/08/2014 -22/08/2014 -23/08/2014 -24/08/2014 -25/08/2014 -26/08/2014 -27/08/2014 -28/08/2014 -29/08/2014 -30/08/2014 -31/08/2014 -01/09/2014 -02/09/2014 -03/09/2014 -04/09/2014 -05/09/2014 -06/09/2014 -07/09/2014 -08/09/2014 -09/09/2014 -10/09/2014 -11/09/2014 -12/09/2014 -13/09/2014 -14/09/2014 -15/09/2014 -16/09/2014 -17/09/2014 -18/09/2014 -19/09/2014 -20/09/2014 -21/09/2014 -22/09/2014 -23/09/2014 -24/09/2014 -25/09/2014 -26/09/2014 -27/09/2014 -28/09/2014 -29/09/2014 -30/09/2014 -01/10/2014 -02/10/2014 -03/10/2014 -04/10/2014 -05/10/2014 -06/10/2014 -07/10/2014 -08/10/2014 -09/10/2014 -10/10/2014 -11/10/2014 -12/10/2014 -13/10/2014 -14/10/2014 -15/10/2014 -16/10/2014 -17/10/2014 -18/10/2014 -19/10/2014 -20/10/2014 -21/10/2014 -22/10/2014 -23/10/2014 -24/10/2014 -25/10/2014 -26/10/2014 -27/10/2014 -28/10/2014 -29/10/2014 -30/10/2014 -31/10/2014 -01/11/2014 -02/11/2014 -03/11/2014 -04/11/2014 -05/11/2014 -06/11/2014 -07/11/2014 -08/11/2014 -09/11/2014 -10/11/2014 -11/11/2014 -12/11/2014 -13/11/2014 -14/11/2014 -15/11/2014 -16/11/2014 -17/11/2014 -18/11/2014 -19/11/2014 -20/11/2014 -21/11/2014 -22/11/2014 -23/11/2014 -24/11/2014 -25/11/2014 -26/11/2014 -27/11/2014 -28/11/2014 -29/11/2014 -30/11/2014 -01/12/2014 -02/12/2014 -03/12/2014 -04/12/2014 -05/12/2014 -06/12/2014 -07/12/2014 -08/12/2014 -09/12/2014 -10/12/2014 -11/12/2014 -12/12/2014 -13/12/2014 -14/12/2014 -15/12/2014 -16/12/2014 -17/12/2014 -18/12/2014 -19/12/2014 -20/12/2014 -21/12/2014 -22/12/2014 -23/12/2014 -24/12/2014 -25/12/2014 -26/12/2014 -27/12/2014 -28/12/2014 -29/12/2014 -30/12/2014 -31/12/2014 -01/01/2015 -02/01/2015 -03/01/2015 -04/01/2015 -05/01/2015 -06/01/2015 -07/01/2015 -08/01/2015 -09/01/2015 -10/01/2015 -11/01/2015 -12/01/2015 -13/01/2015 -14/01/2015 -15/01/2015 -16/01/2015 -17/01/2015 -18/01/2015 -19/01/2015 -20/01/2015 -21/01/2015 -22/01/2015 -23/01/2015 -24/01/2015 -25/01/2015 -26/01/2015 -27/01/2015 -28/01/2015 -29/01/2015 -30/01/2015 -31/01/2015 -01/02/2015 -02/02/2015 -03/02/2015 -04/02/2015 -05/02/2015 -06/02/2015 -07/02/2015 -08/02/2015 -09/02/2015 -10/02/2015 -11/02/2015 -12/02/2015 -13/02/2015 -14/02/2015 -15/02/2015 -16/02/2015 -17/02/2015 -18/02/2015 -19/02/2015 -20/02/2015 -21/02/2015 -22/02/2015 -23/02/2015 -24/02/2015 -25/02/2015 -26/02/2015 -27/02/2015 -28/02/2015 -01/03/2015 -02/03/2015 -03/03/2015 -04/03/2015 -05/03/2015 -06/03/2015 -07/03/2015 -08/03/2015 -09/03/2015 -10/03/2015 -11/03/2015 -12/03/2015 -13/03/2015 -14/03/2015 -15/03/2015 -16/03/2015 -17/03/2015 -18/03/2015 -19/03/2015 -20/03/2015 -21/03/2015 -22/03/2015 -23/03/2015 -24/03/2015 -25/03/2015 -26/03/2015 -27/03/2015 -28/03/2015 -29/03/2015 -30/03/2015 -31/03/2015 -01/04/2015 -02/04/2015 -03/04/2015 -04/04/2015 -05/04/2015 -06/04/2015 -07/04/2015 -08/04/2015 -09/04/2015 -10/04/2015 -11/04/2015 -12/04/2015 -13/04/2015 -14/04/2015 -15/04/2015 -16/04/2015 -17/04/2015 -18/04/2015 -19/04/2015 -20/04/2015 -21/04/2015 -22/04/2015 -23/04/2015 -24/04/2015 -25/04/2015 -26/04/2015 -27/04/2015 -28/04/2015 -29/04/2015 -30/04/2015 -01/05/2015 -02/05/2015 -03/05/2015 -04/05/2015 -05/05/2015 -06/05/2015 -07/05/2015 -08/05/2015 -09/05/2015 -10/05/2015 -11/05/2015 -12/05/2015 -13/05/2015 -14/05/2015 -15/05/2015 -16/05/2015 -17/05/2015 -18/05/2015 -19/05/2015 -20/05/2015 -21/05/2015 -22/05/2015 -23/05/2015 -24/05/2015 -25/05/2015 -26/05/2015 -27/05/2015 -28/05/2015 -29/05/2015 -30/05/2015 -31/05/2015 -01/06/2015 -02/06/2015 -03/06/2015 -04/06/2015 -05/06/2015 -06/06/2015 -07/06/2015 -08/06/2015 -09/06/2015 -10/06/2015 -11/06/2015 -12/06/2015 -13/06/2015 -14/06/2015 -15/06/2015 -16/06/2015 -17/06/2015 -18/06/2015 -19/06/2015 -20/06/2015 -21/06/2015 -22/06/2015 -23/06/2015 diff --git a/ThirdParty/Ert/test-data/local/snake_oil_no_data/snake_oil_GEO_ID.ert b/ThirdParty/Ert/test-data/local/snake_oil_no_data/snake_oil_GEO_ID.ert deleted file mode 100644 index 5818bd064d..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_no_data/snake_oil_GEO_ID.ert +++ /dev/null @@ -1,39 +0,0 @@ -QUEUE_SYSTEM LOCAL - -JOBNAME SNAKE_OIL_%d -NUM_REALIZATIONS 25 - -DEFINE storage/ - -STORE_SEED SEED -LOAD_SEED SEED - -RUNPATH simulations//realisation-%d/iter-%d -ENSPATH /ensemble -ECLBASE SNAKE_OIL_FIELD -SUMMARY * - -HISTORY_SOURCE REFCASE_HISTORY -REFCASE refcase/SNAKE_OIL_FIELD - -TIME_MAP refcase/time_map.txt -OBS_CONFIG observations/observations.txt - -INSTALL_JOB SNAKE_OIL_SIMULATOR jobs/SNAKE_OIL_SIMULATOR -INSTALL_JOB SNAKE_OIL_NPV jobs/SNAKE_OIL_NPV -INSTALL_JOB SNAKE_OIL_DIFF jobs/SNAKE_OIL_DIFF - -FORWARD_MODEL SNAKE_OIL_SIMULATOR -FORWARD_MODEL SNAKE_OIL_NPV -FORWARD_MODEL SNAKE_OIL_DIFF - -RUN_TEMPLATE templates/seed_template.txt seed.txt -GEN_KW SNAKE_OIL_PARAM templates/snake_oil_template.txt snake_oil_params.txt parameters/snake_oil_parameters.txt -CUSTOM_KW SNAKE_OIL_NPV snake_oil_npv.txt -GEN_DATA SNAKE_OIL_OPR_DIFF INPUT_FORMAT:ASCII RESULT_FILE:snake_oil_opr_diff_%d.txt REPORT_STEPS:199 -GEN_DATA SNAKE_OIL_WPR_DIFF INPUT_FORMAT:ASCII RESULT_FILE:snake_oil_wpr_diff_%d.txt REPORT_STEPS:199 -GEN_DATA SNAKE_OIL_GPR_DIFF INPUT_FORMAT:ASCII RESULT_FILE:snake_oil_gpr_diff_%d.txt REPORT_STEPS:199 - -LOG_LEVEL 3 -LOG_FILE log/log.txt -UPDATE_LOG_PATH log/update diff --git a/ThirdParty/Ert/test-data/local/snake_oil_no_data/templates/seed_template.txt b/ThirdParty/Ert/test-data/local/snake_oil_no_data/templates/seed_template.txt deleted file mode 100644 index a0bca49fbd..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_no_data/templates/seed_template.txt +++ /dev/null @@ -1 +0,0 @@ -SEED: \ No newline at end of file diff --git a/ThirdParty/Ert/test-data/local/snake_oil_no_data/templates/snake_oil_template.txt b/ThirdParty/Ert/test-data/local/snake_oil_no_data/templates/snake_oil_template.txt deleted file mode 100644 index ad2c648a0b..0000000000 --- a/ThirdParty/Ert/test-data/local/snake_oil_no_data/templates/snake_oil_template.txt +++ /dev/null @@ -1,10 +0,0 @@ -OP1_PERSISTENCE: -OP1_OCTAVES: -OP1_DIVERGENCE_SCALE: -OP1_OFFSET: -OP2_PERSISTENCE: -OP2_OCTAVES: -OP2_DIVERGENCE_SCALE: -OP2_OFFSET: -BPR_555_PERSISTENCE: -BPR_138_PERSISTENCE: diff --git a/ThirdParty/NRLib/CMakeLists.txt b/ThirdParty/NRLib/CMakeLists.txt index 72b08e6a23..f91869388b 100644 --- a/ThirdParty/NRLib/CMakeLists.txt +++ b/ThirdParty/NRLib/CMakeLists.txt @@ -1,20 +1,13 @@ cmake_minimum_required (VERSION 2.8) -if (MSVC) - ADD_DEFINITIONS("-DBOOST_ALL_NO_LIB") -endif() - project (NRLib) -#add_definitions(-DBOOST_FILESYSTEM_VERSION=3) -#find_package(Boost 1.44.0 COMPONENTS filesystem date_time system regex REQUIRED) - include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/nrlib ${CMAKE_CURRENT_SOURCE_DIR}/nrlib/well - ${Boost_INCLUDE_DIRS} + ${boost-Subset_SOURCE_DIR} ) file ( GLOB NRLIB_IOTOOLS_SRC diff --git a/ThirdParty/NRLib/well_UnitTests/CMakeLists.txt b/ThirdParty/NRLib/well_UnitTests/CMakeLists.txt index 92e2e2f1f7..f8ff33b636 100644 --- a/ThirdParty/NRLib/well_UnitTests/CMakeLists.txt +++ b/ThirdParty/NRLib/well_UnitTests/CMakeLists.txt @@ -1,9 +1,5 @@ cmake_minimum_required (VERSION 2.8) -if (MSVC) - ADD_DEFINITIONS("-DBOOST_ALL_NO_LIB") -endif() - project ( well_UnitTests ) @@ -12,12 +8,9 @@ include_directories ( ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/../.. - ${Boost_INCLUDE_DIRS} - ${NR_well_SOURCE_DIR} ) - set( PROJECT_FILES well_UnitTests.cpp @@ -33,19 +26,8 @@ add_executable (${PROJECT_NAME} source_group("" FILES ${PROJECT_FILES}) -if (MSVC) - set (RI_BOOST_LIBRARIES - debug ${Boost_SYSTEM_LIBRARY_DEBUG} - optimized ${Boost_SYSTEM_LIBRARY_RELEASE} - debug ${Boost_FILESYSTEM_LIBRARY_DEBUG} - optimized ${Boost_FILESYSTEM_LIBRARY_RELEASE} - ) -else() - set (RI_BOOST_LIBRARIES ${Boost_LIBRARIES}) -endif() - target_link_libraries ( ${PROJECT_NAME} NRLib - ${RI_BOOST_LIBRARIES} + boost-Subset ) diff --git a/ThirdParty/boost-Subset/CMakeLists.txt b/ThirdParty/boost-Subset/CMakeLists.txt new file mode 100644 index 0000000000..16dfa809ce --- /dev/null +++ b/ThirdParty/boost-Subset/CMakeLists.txt @@ -0,0 +1,35 @@ +cmake_minimum_required (VERSION 2.8) + +# Procedure used to extract subset from complete Boost installation +# +# 1) Run command line tool bcp to extract required files for filesystem module +# http://www.boost.org/doc/libs/1_63_0/tools/bcp/doc/html/index.html#bcp.syntax.options +# bcp.exe filesystem --boost="c:/local/boost_1_59_0" d:/gitroot/ResInsight/ThirdParty/boost-Subset +# +# 2) Delete the following include folders, as they are large and not required +# It is probably possible to exclude more folders, but the dependencies for the remaining folders are quite complex +# boost-Subset/boost/test +# boost-Subset/boost/typeof + +# 3) Delete following source folders, keep folders 'filesystem' and 'system' +# boost-Subset/libs/chrono +# boost-Subset/libs/smart_ptr +# boost-Subset/libs/test +# boost-Subset/libs/timer + +project (boost-Subset) + +include_directories( +. +) + +add_library( ${PROJECT_NAME} + libs/filesystem/src/codecvt_error_category.cpp + libs/filesystem/src/operations.cpp + libs/filesystem/src/path.cpp + libs/filesystem/src/path_traits.cpp + libs/filesystem/src/portability.cpp + libs/filesystem/src/windows_file_codecvt.cpp + + libs/system/src/error_code.cpp +) diff --git a/ThirdParty/boost-Subset/boost/align/align.hpp b/ThirdParty/boost-Subset/boost/align/align.hpp new file mode 100644 index 0000000000..b95d673bcd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/align/align.hpp @@ -0,0 +1,20 @@ +/* +(c) 2014 Glen Joseph Fernandes +glenjofe at gmail dot com + +Distributed under the Boost Software +License, Version 1.0. +http://boost.org/LICENSE_1_0.txt +*/ +#ifndef BOOST_ALIGN_ALIGN_HPP +#define BOOST_ALIGN_ALIGN_HPP + +#include + +#if !defined(BOOST_NO_CXX11_STD_ALIGN) +#include +#else +#include +#endif + +#endif diff --git a/ThirdParty/boost-Subset/boost/align/detail/address.hpp b/ThirdParty/boost-Subset/boost/align/detail/address.hpp new file mode 100644 index 0000000000..63be1a95d0 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/align/detail/address.hpp @@ -0,0 +1,29 @@ +/* +(c) 2014 Glen Joseph Fernandes +glenjofe at gmail dot com + +Distributed under the Boost Software +License, Version 1.0. +http://boost.org/LICENSE_1_0.txt +*/ +#ifndef BOOST_ALIGN_DETAIL_ADDRESS_HPP +#define BOOST_ALIGN_DETAIL_ADDRESS_HPP + +#include +#include + +namespace boost { +namespace alignment { +namespace detail { + +#if defined(BOOST_HAS_INTPTR_T) +typedef boost::uintptr_t address_t; +#else +typedef std::size_t address_t; +#endif + +} /* :detail */ +} /* :alignment */ +} /* :boost */ + +#endif diff --git a/ThirdParty/boost-Subset/boost/align/detail/align.hpp b/ThirdParty/boost-Subset/boost/align/detail/align.hpp new file mode 100644 index 0000000000..00be6fd6aa --- /dev/null +++ b/ThirdParty/boost-Subset/boost/align/detail/align.hpp @@ -0,0 +1,40 @@ +/* +(c) 2014 Glen Joseph Fernandes +glenjofe at gmail dot com + +Distributed under the Boost Software +License, Version 1.0. +http://boost.org/LICENSE_1_0.txt +*/ +#ifndef BOOST_ALIGN_DETAIL_ALIGN_HPP +#define BOOST_ALIGN_DETAIL_ALIGN_HPP + +#include +#include +#include +#include + +namespace boost { +namespace alignment { + +inline void* align(std::size_t alignment, std::size_t size, + void*& ptr, std::size_t& space) +{ + BOOST_ASSERT(detail::is_alignment(alignment)); + std::size_t n = detail::address_t(ptr) & (alignment - 1); + if (n != 0) { + n = alignment - n; + } + void* p = 0; + if (n <= space && size <= space - n) { + p = static_cast(ptr) + n; + ptr = p; + space -= n; + } + return p; +} + +} /* :alignment */ +} /* :boost */ + +#endif diff --git a/ThirdParty/boost-Subset/boost/align/detail/align_cxx11.hpp b/ThirdParty/boost-Subset/boost/align/detail/align_cxx11.hpp new file mode 100644 index 0000000000..80dc7e36a4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/align/detail/align_cxx11.hpp @@ -0,0 +1,22 @@ +/* +(c) 2014 Glen Joseph Fernandes +glenjofe at gmail dot com + +Distributed under the Boost Software +License, Version 1.0. +http://boost.org/LICENSE_1_0.txt +*/ +#ifndef BOOST_ALIGN_DETAIL_ALIGN_CXX11_HPP +#define BOOST_ALIGN_DETAIL_ALIGN_CXX11_HPP + +#include + +namespace boost { +namespace alignment { + +using std::align; + +} /* :alignment */ +} /* :boost */ + +#endif diff --git a/ThirdParty/boost-Subset/boost/align/detail/is_alignment.hpp b/ThirdParty/boost-Subset/boost/align/detail/is_alignment.hpp new file mode 100644 index 0000000000..7ac0bb3d12 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/align/detail/is_alignment.hpp @@ -0,0 +1,29 @@ +/* +(c) 2014 Glen Joseph Fernandes +glenjofe at gmail dot com + +Distributed under the Boost Software +License, Version 1.0. +http://boost.org/LICENSE_1_0.txt +*/ +#ifndef BOOST_ALIGN_DETAIL_IS_ALIGNMENT_HPP +#define BOOST_ALIGN_DETAIL_IS_ALIGNMENT_HPP + +#include +#include + +namespace boost { +namespace alignment { +namespace detail { + +BOOST_CONSTEXPR inline bool is_alignment(std::size_t value) + BOOST_NOEXCEPT +{ + return (value > 0) && ((value & (value - 1)) == 0); +} + +} /* :detail */ +} /* :alignment */ +} /* :boost */ + +#endif diff --git a/ThirdParty/boost-Subset/boost/aligned_storage.hpp b/ThirdParty/boost-Subset/boost/aligned_storage.hpp new file mode 100644 index 0000000000..b5455f00b6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/aligned_storage.hpp @@ -0,0 +1,143 @@ +//----------------------------------------------------------------------------- +// boost aligned_storage.hpp header file +// See http://www.boost.org for updates, documentation, and revision history. +//----------------------------------------------------------------------------- +// +// Copyright (c) 2002-2003 +// Eric Friedman, Itay Maman +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_ALIGNED_STORAGE_HPP +#define BOOST_ALIGNED_STORAGE_HPP + +#include // for std::size_t + +#include "boost/config.hpp" +#include "boost/detail/workaround.hpp" +#include "boost/type_traits/alignment_of.hpp" +#include "boost/type_traits/type_with_alignment.hpp" +#include "boost/type_traits/is_pod.hpp" + +#include "boost/mpl/eval_if.hpp" +#include "boost/mpl/identity.hpp" + +#include "boost/type_traits/detail/bool_trait_def.hpp" + +namespace boost { + +namespace detail { namespace aligned_storage { + +BOOST_STATIC_CONSTANT( + std::size_t + , alignment_of_max_align = ::boost::alignment_of::value + ); + +// +// To be TR1 conforming this must be a POD type: +// +template < + std::size_t size_ + , std::size_t alignment_ +> +struct aligned_storage_imp +{ + union data_t + { + char buf[size_]; + + typename ::boost::mpl::eval_if_c< + alignment_ == std::size_t(-1) + , ::boost::mpl::identity< ::boost::detail::max_align > + , ::boost::type_with_alignment + >::type align_; + } data_; + void* address() const { return const_cast(this); } +}; + +template< std::size_t alignment_ > +struct aligned_storage_imp<0u,alignment_> +{ + /* intentionally empty */ + void* address() const { return 0; } +}; + +}} // namespace detail::aligned_storage + +template < + std::size_t size_ + , std::size_t alignment_ = std::size_t(-1) +> +class aligned_storage : +#ifndef __BORLANDC__ + private +#else + public +#endif + ::boost::detail::aligned_storage::aligned_storage_imp +{ + +public: // constants + + typedef ::boost::detail::aligned_storage::aligned_storage_imp type; + + BOOST_STATIC_CONSTANT( + std::size_t + , size = size_ + ); + BOOST_STATIC_CONSTANT( + std::size_t + , alignment = ( + alignment_ == std::size_t(-1) + ? ::boost::detail::aligned_storage::alignment_of_max_align + : alignment_ + ) + ); + +private: // noncopyable + + aligned_storage(const aligned_storage&); + aligned_storage& operator=(const aligned_storage&); + +public: // structors + + aligned_storage() + { + } + + ~aligned_storage() + { + } + +public: // accessors + + void* address() + { + return static_cast(this)->address(); + } + + const void* address() const + { + return static_cast(this)->address(); + } +}; + +// +// Make sure that is_pod recognises aligned_storage<>::type +// as a POD (Note that aligned_storage<> itself is not a POD): +// +template +struct is_pod< ::boost::detail::aligned_storage::aligned_storage_imp > + BOOST_TT_AUX_BOOL_C_BASE(true) +{ + BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(true) +}; + + +} // namespace boost + +#include "boost/type_traits/detail/bool_trait_undef.hpp" + +#endif // BOOST_ALIGNED_STORAGE_HPP diff --git a/ThirdParty/boost-Subset/boost/array.hpp b/ThirdParty/boost-Subset/boost/array.hpp new file mode 100644 index 0000000000..fa06fa9a5f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/array.hpp @@ -0,0 +1,446 @@ +/* The following code declares class array, + * an STL container (as wrapper) for arrays of constant size. + * + * See + * http://www.boost.org/libs/array/ + * for documentation. + * + * The original author site is at: http://www.josuttis.com/ + * + * (C) Copyright Nicolai M. Josuttis 2001. + * + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * 14 Apr 2012 - (mtc) Added support for boost::hash + * 28 Dec 2010 - (mtc) Added cbegin and cend (and crbegin and crend) for C++Ox compatibility. + * 10 Mar 2010 - (mtc) fill method added, matching resolution of the standard library working group. + * See or Trac issue #3168 + * Eventually, we should remove "assign" which is now a synonym for "fill" (Marshall Clow) + * 10 Mar 2010 - added workaround for SUNCC and !STLPort [trac #3893] (Marshall Clow) + * 29 Jan 2004 - c_array() added, BOOST_NO_PRIVATE_IN_AGGREGATE removed (Nico Josuttis) + * 23 Aug 2002 - fix for Non-MSVC compilers combined with MSVC libraries. + * 05 Aug 2001 - minor update (Nico Josuttis) + * 20 Jan 2001 - STLport fix (Beman Dawes) + * 29 Sep 2000 - Initial Revision (Nico Josuttis) + * + * Jan 29, 2004 + */ +#ifndef BOOST_ARRAY_HPP +#define BOOST_ARRAY_HPP + +#include + +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +# pragma warning(push) +# pragma warning(disable:4996) // 'std::equal': Function call with parameters that may be unsafe +# pragma warning(disable:4510) // boost::array' : default constructor could not be generated +# pragma warning(disable:4610) // warning C4610: class 'boost::array' can never be instantiated - user defined constructor required +#endif + +#include +#include +#include +#include + +// Handles broken standard libraries better than +#include +#include +#include +#include + +// FIXES for broken compilers +#include + + +namespace boost { + + template + class array { + public: + T elems[N]; // fixed-size array of elements of type T + + public: + // type definitions + typedef T value_type; + typedef T* iterator; + typedef const T* const_iterator; + typedef T& reference; + typedef const T& const_reference; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + + // iterator support + iterator begin() { return elems; } + const_iterator begin() const { return elems; } + const_iterator cbegin() const { return elems; } + + iterator end() { return elems+N; } + const_iterator end() const { return elems+N; } + const_iterator cend() const { return elems+N; } + + // reverse iterator support +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS) + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; +#elif defined(_MSC_VER) && (_MSC_VER == 1300) && defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB == 310) + // workaround for broken reverse_iterator in VC7 + typedef std::reverse_iterator > reverse_iterator; + typedef std::reverse_iterator > const_reverse_iterator; +#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; +#else + // workaround for broken reverse_iterator implementations + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; +#endif + + reverse_iterator rbegin() { return reverse_iterator(end()); } + const_reverse_iterator rbegin() const { + return const_reverse_iterator(end()); + } + const_reverse_iterator crbegin() const { + return const_reverse_iterator(end()); + } + + reverse_iterator rend() { return reverse_iterator(begin()); } + const_reverse_iterator rend() const { + return const_reverse_iterator(begin()); + } + const_reverse_iterator crend() const { + return const_reverse_iterator(begin()); + } + + // operator[] + reference operator[](size_type i) + { + BOOST_ASSERT_MSG( i < N, "out of range" ); + return elems[i]; + } + + const_reference operator[](size_type i) const + { + BOOST_ASSERT_MSG( i < N, "out of range" ); + return elems[i]; + } + + // at() with range check + reference at(size_type i) { rangecheck(i); return elems[i]; } + const_reference at(size_type i) const { rangecheck(i); return elems[i]; } + + // front() and back() + reference front() + { + return elems[0]; + } + + const_reference front() const + { + return elems[0]; + } + + reference back() + { + return elems[N-1]; + } + + const_reference back() const + { + return elems[N-1]; + } + + // size is constant + static size_type size() { return N; } + static bool empty() { return false; } + static size_type max_size() { return N; } + enum { static_size = N }; + + // swap (note: linear complexity) + void swap (array& y) { + for (size_type i = 0; i < N; ++i) + boost::swap(elems[i],y.elems[i]); + } + + // direct access to data (read-only) + const T* data() const { return elems; } + T* data() { return elems; } + + // use array as C array (direct read/write access to data) + T* c_array() { return elems; } + + // assignment with type conversion + template + array& operator= (const array& rhs) { + std::copy(rhs.begin(),rhs.end(), begin()); + return *this; + } + + // assign one value to all elements + void assign (const T& value) { fill ( value ); } // A synonym for fill + void fill (const T& value) + { + std::fill_n(begin(),size(),value); + } + + // check range (may be private because it is static) + static void rangecheck (size_type i) { + if (i >= size()) { + std::out_of_range e("array<>: index out of range"); + boost::throw_exception(e); + } + } + + }; + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + template< class T > + class array< T, 0 > { + + public: + // type definitions + typedef T value_type; + typedef T* iterator; + typedef const T* const_iterator; + typedef T& reference; + typedef const T& const_reference; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + + // iterator support + iterator begin() { return iterator( reinterpret_cast< T * >( this ) ); } + const_iterator begin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); } + const_iterator cbegin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); } + + iterator end() { return begin(); } + const_iterator end() const { return begin(); } + const_iterator cend() const { return cbegin(); } + + // reverse iterator support +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS) + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; +#elif defined(_MSC_VER) && (_MSC_VER == 1300) && defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB == 310) + // workaround for broken reverse_iterator in VC7 + typedef std::reverse_iterator > reverse_iterator; + typedef std::reverse_iterator > const_reverse_iterator; +#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; +#else + // workaround for broken reverse_iterator implementations + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; +#endif + + reverse_iterator rbegin() { return reverse_iterator(end()); } + const_reverse_iterator rbegin() const { + return const_reverse_iterator(end()); + } + const_reverse_iterator crbegin() const { + return const_reverse_iterator(end()); + } + + reverse_iterator rend() { return reverse_iterator(begin()); } + const_reverse_iterator rend() const { + return const_reverse_iterator(begin()); + } + const_reverse_iterator crend() const { + return const_reverse_iterator(begin()); + } + + // operator[] + reference operator[](size_type /*i*/) + { + return failed_rangecheck(); + } + + const_reference operator[](size_type /*i*/) const + { + return failed_rangecheck(); + } + + // at() with range check + reference at(size_type /*i*/) { return failed_rangecheck(); } + const_reference at(size_type /*i*/) const { return failed_rangecheck(); } + + // front() and back() + reference front() + { + return failed_rangecheck(); + } + + const_reference front() const + { + return failed_rangecheck(); + } + + reference back() + { + return failed_rangecheck(); + } + + const_reference back() const + { + return failed_rangecheck(); + } + + // size is constant + static size_type size() { return 0; } + static bool empty() { return true; } + static size_type max_size() { return 0; } + enum { static_size = 0 }; + + void swap (array& /*y*/) { + } + + // direct access to data (read-only) + const T* data() const { return 0; } + T* data() { return 0; } + + // use array as C array (direct read/write access to data) + T* c_array() { return 0; } + + // assignment with type conversion + template + array& operator= (const array& ) { + return *this; + } + + // assign one value to all elements + void assign (const T& value) { fill ( value ); } + void fill (const T& ) {} + + // check range (may be private because it is static) + static reference failed_rangecheck () { + std::out_of_range e("attempt to access element of an empty array"); + boost::throw_exception(e); +#if defined(BOOST_NO_EXCEPTIONS) || (!defined(BOOST_MSVC) && !defined(__PATHSCALE__)) + // + // We need to return something here to keep + // some compilers happy: however we will never + // actually get here.... + // + static T placeholder; + return placeholder; +#endif + } + }; +#endif + + // comparisons + template + bool operator== (const array& x, const array& y) { + return std::equal(x.begin(), x.end(), y.begin()); + } + template + bool operator< (const array& x, const array& y) { + return std::lexicographical_compare(x.begin(),x.end(),y.begin(),y.end()); + } + template + bool operator!= (const array& x, const array& y) { + return !(x==y); + } + template + bool operator> (const array& x, const array& y) { + return y + bool operator<= (const array& x, const array& y) { + return !(y + bool operator>= (const array& x, const array& y) { + return !(x + inline void swap (array& x, array& y) { + x.swap(y); + } + +#if defined(__SUNPRO_CC) +// Trac ticket #4757; the Sun Solaris compiler can't handle +// syntax like 'T(&get_c_array(boost::array& arg))[N]' +// +// We can't just use this for all compilers, because the +// borland compilers can't handle this form. + namespace detail { + template struct c_array + { + typedef T type[N]; + }; + } + + // Specific for boost::array: simply returns its elems data member. + template + typename detail::c_array::type& get_c_array(boost::array& arg) + { + return arg.elems; + } + + // Specific for boost::array: simply returns its elems data member. + template + typename const detail::c_array::type& get_c_array(const boost::array& arg) + { + return arg.elems; + } +#else +// Specific for boost::array: simply returns its elems data member. + template + T(&get_c_array(boost::array& arg))[N] + { + return arg.elems; + } + + // Const version. + template + const T(&get_c_array(const boost::array& arg))[N] + { + return arg.elems; + } +#endif + +#if 0 + // Overload for std::array, assuming that std::array will have + // explicit conversion functions as discussed at the WG21 meeting + // in Summit, March 2009. + template + T(&get_c_array(std::array& arg))[N] + { + return static_cast(arg); + } + + // Const version. + template + const T(&get_c_array(const std::array& arg))[N] + { + return static_cast(arg); + } +#endif + + + template + std::size_t hash_value(const array& arr) + { + return boost::hash_range(arr.begin(), arr.end()); + } + +} /* namespace boost */ + + +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +# pragma warning(pop) +#endif + +#endif /*BOOST_ARRAY_HPP*/ diff --git a/ThirdParty/boost-Subset/boost/assert.hpp b/ThirdParty/boost-Subset/boost/assert.hpp new file mode 100644 index 0000000000..1713d9bb1d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/assert.hpp @@ -0,0 +1,78 @@ +// +// boost/assert.hpp - BOOST_ASSERT(expr) +// BOOST_ASSERT_MSG(expr, msg) +// BOOST_VERIFY(expr) +// BOOST_VERIFY_MSG(expr, msg) +// +// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. +// Copyright (c) 2007, 2014 Peter Dimov +// Copyright (c) Beman Dawes 2011 +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// Note: There are no include guards. This is intentional. +// +// See http://www.boost.org/libs/assert/assert.html for documentation. +// + +// +// Stop inspect complaining about use of 'assert': +// +// boostinspect:naassert_macro +// + +// +// BOOST_ASSERT, BOOST_ASSERT_MSG +// + +#undef BOOST_ASSERT +#undef BOOST_ASSERT_MSG + +#if defined(BOOST_DISABLE_ASSERTS) || ( defined(BOOST_ENABLE_ASSERT_DEBUG_HANDLER) && defined(NDEBUG) ) + +# define BOOST_ASSERT(expr) ((void)0) +# define BOOST_ASSERT_MSG(expr, msg) ((void)0) + +#elif defined(BOOST_ENABLE_ASSERT_HANDLER) || ( defined(BOOST_ENABLE_ASSERT_DEBUG_HANDLER) && !defined(NDEBUG) ) + +#include // for BOOST_LIKELY +#include + +namespace boost +{ + void assertion_failed(char const * expr, char const * function, char const * file, long line); // user defined + void assertion_failed_msg(char const * expr, char const * msg, char const * function, char const * file, long line); // user defined +} // namespace boost + +#define BOOST_ASSERT(expr) (BOOST_LIKELY(!!(expr))? ((void)0): ::boost::assertion_failed(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) +#define BOOST_ASSERT_MSG(expr, msg) (BOOST_LIKELY(!!(expr))? ((void)0): ::boost::assertion_failed_msg(#expr, msg, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) + +#else + +# include // .h to support old libraries w/o - effect is the same + +# define BOOST_ASSERT(expr) assert(expr) +# define BOOST_ASSERT_MSG(expr, msg) assert((expr)&&(msg)) + +#endif + +// +// BOOST_VERIFY, BOOST_VERIFY_MSG +// + +#undef BOOST_VERIFY +#undef BOOST_VERIFY_MSG + +#if defined(BOOST_DISABLE_ASSERTS) || ( !defined(BOOST_ENABLE_ASSERT_HANDLER) && defined(NDEBUG) ) + +# define BOOST_VERIFY(expr) ((void)(expr)) +# define BOOST_VERIFY_MSG(expr, msg) ((void)(expr)) + +#else + +# define BOOST_VERIFY(expr) BOOST_ASSERT(expr) +# define BOOST_VERIFY_MSG(expr, msg) BOOST_ASSERT_MSG(expr,msg) + +#endif diff --git a/ThirdParty/boost-Subset/boost/bind.hpp b/ThirdParty/boost-Subset/boost/bind.hpp new file mode 100644 index 0000000000..fd3421ea5a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/bind.hpp @@ -0,0 +1,24 @@ +#ifndef BOOST_BIND_HPP_INCLUDED +#define BOOST_BIND_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// bind.hpp - binds function objects to arguments +// +// Copyright (c) 2009 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// See http://www.boost.org/libs/bind/bind.html for documentation. +// + +#include + +#endif // #ifndef BOOST_BIND_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/bind/arg.hpp b/ThirdParty/boost-Subset/boost/bind/arg.hpp new file mode 100644 index 0000000000..c879bb408b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/bind/arg.hpp @@ -0,0 +1,62 @@ +#ifndef BOOST_BIND_ARG_HPP_INCLUDED +#define BOOST_BIND_ARG_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// bind/arg.hpp +// +// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/bind/bind.html for documentation. +// + +#include +#include +#include + +namespace boost +{ + +template< int I > struct arg +{ + arg() + { + } + + template< class T > arg( T const & /* t */ ) + { + BOOST_STATIC_ASSERT( I == is_placeholder::value ); + } +}; + +template< int I > bool operator==( arg const &, arg const & ) +{ + return true; +} + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template< int I > struct is_placeholder< arg > +{ + enum _vt { value = I }; +}; + +template< int I > struct is_placeholder< arg (*) () > +{ + enum _vt { value = I }; +}; + +#endif + +} // namespace boost + +#endif // #ifndef BOOST_BIND_ARG_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/bind/bind.hpp b/ThirdParty/boost-Subset/boost/bind/bind.hpp new file mode 100644 index 0000000000..fd05131236 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/bind/bind.hpp @@ -0,0 +1,2041 @@ +#ifndef BOOST_BIND_BIND_HPP_INCLUDED +#define BOOST_BIND_BIND_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// bind.hpp - binds function objects to arguments +// +// Copyright (c) 2001-2004 Peter Dimov and Multi Media Ltd. +// Copyright (c) 2001 David Abrahams +// Copyright (c) 2005 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/bind/bind.html for documentation. +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Borland-specific bug, visit_each() silently fails to produce code + +#if defined(__BORLANDC__) +# define BOOST_BIND_VISIT_EACH boost::visit_each +#else +# define BOOST_BIND_VISIT_EACH visit_each +#endif + +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated +#endif + +namespace boost +{ + +template class weak_ptr; + +namespace _bi // implementation details +{ + +// result_traits + +template struct result_traits +{ + typedef R type; +}; + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) + +struct unspecified {}; + +template struct result_traits +{ + typedef typename F::result_type type; +}; + +template struct result_traits< unspecified, reference_wrapper > +{ + typedef typename F::result_type type; +}; + +#endif + +// ref_compare + +template bool ref_compare( T const & a, T const & b, long ) +{ + return a == b; +} + +template bool ref_compare( arg const &, arg const &, int ) +{ + return true; +} + +template bool ref_compare( arg (*) (), arg (*) (), int ) +{ + return true; +} + +template bool ref_compare( reference_wrapper const & a, reference_wrapper const & b, int ) +{ + return a.get_pointer() == b.get_pointer(); +} + +// bind_t forward declaration for listN + +template class bind_t; + +template bool ref_compare( bind_t const & a, bind_t const & b, int ) +{ + return a.compare( b ); +} + +// value + +template class value +{ +public: + + value(T const & t): t_(t) {} + + T & get() { return t_; } + T const & get() const { return t_; } + + bool operator==(value const & rhs) const + { + return t_ == rhs.t_; + } + +private: + + T t_; +}; + +// ref_compare for weak_ptr + +template bool ref_compare( value< weak_ptr > const & a, value< weak_ptr > const & b, int ) +{ + return !(a.get() < b.get()) && !(b.get() < a.get()); +} + +// type + +template class type {}; + +// unwrap + +template struct unwrapper +{ + static inline F & unwrap( F & f, long ) + { + return f; + } + + template static inline F2 & unwrap( reference_wrapper rf, int ) + { + return rf.get(); + } + + template static inline _mfi::dm unwrap( R T::* pm, int ) + { + return _mfi::dm( pm ); + } +}; + +// listN + +class list0 +{ +public: + + list0() {} + + template T & operator[] (_bi::value & v) const { return v.get(); } + + template T const & operator[] (_bi::value const & v) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A &, long) + { + return unwrapper::unwrap(f, 0)(); + } + + template R operator()(type, F const & f, A &, long) const + { + return unwrapper::unwrap(f, 0)(); + } + + template void operator()(type, F & f, A &, int) + { + unwrapper::unwrap(f, 0)(); + } + + template void operator()(type, F const & f, A &, int) const + { + unwrapper::unwrap(f, 0)(); + } + + template void accept(V &) const + { + } + + bool operator==(list0 const &) const + { + return true; + } +}; + +#ifdef BOOST_MSVC +// MSVC is bright enough to realise that the parameter rhs +// in operator==may be unused for some template argument types: +#pragma warning(push) +#pragma warning(disable:4100) +#endif + +template< class A1 > class list1: private storage1< A1 > +{ +private: + + typedef storage1< A1 > base_type; + +public: + + explicit list1( A1 a1 ): base_type( a1 ) {} + + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + + template T & operator[] ( _bi::value & v ) const { return v.get(); } + + template T const & operator[] ( _bi::value const & v ) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_]); + } + + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_]); + } + + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_]); + } + + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_]); + } + + template void accept(V & v) const + { + base_type::accept(v); + } + + bool operator==(list1 const & rhs) const + { + return ref_compare(base_type::a1_, rhs.a1_, 0); + } +}; + +struct logical_and; +struct logical_or; + +template< class A1, class A2 > class list2: private storage2< A1, A2 > +{ +private: + + typedef storage2< A1, A2 > base_type; + +public: + + list2( A1 a1, A2 a2 ): base_type( a1, a2 ) {} + + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + + template T & operator[] (_bi::value & v) const { return v.get(); } + + template T const & operator[] (_bi::value const & v) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); + } + + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); + } + + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); + } + + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); + } + + template bool operator()( type, logical_and & /*f*/, A & a, int ) + { + return a[ base_type::a1_ ] && a[ base_type::a2_ ]; + } + + template bool operator()( type, logical_and const & /*f*/, A & a, int ) const + { + return a[ base_type::a1_ ] && a[ base_type::a2_ ]; + } + + template bool operator()( type, logical_or & /*f*/, A & a, int ) + { + return a[ base_type::a1_ ] || a[ base_type::a2_ ]; + } + + template bool operator()( type, logical_or const & /*f*/, A & a, int ) const + { + return a[ base_type::a1_ ] || a[ base_type::a2_ ]; + } + + template void accept(V & v) const + { + base_type::accept(v); + } + + bool operator==(list2 const & rhs) const + { + return ref_compare(base_type::a1_, rhs.a1_, 0) && ref_compare(base_type::a2_, rhs.a2_, 0); + } +}; + +template< class A1, class A2, class A3 > class list3: private storage3< A1, A2, A3 > +{ +private: + + typedef storage3< A1, A2, A3 > base_type; + +public: + + list3( A1 a1, A2 a2, A3 a3 ): base_type( a1, a2, a3 ) {} + + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A3 operator[] (boost::arg<3>) const { return base_type::a3_; } + + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } + + template T & operator[] (_bi::value & v) const { return v.get(); } + + template T const & operator[] (_bi::value const & v) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); + } + + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); + } + + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); + } + + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); + } + + template void accept(V & v) const + { + base_type::accept(v); + } + + bool operator==(list3 const & rhs) const + { + return + + ref_compare( base_type::a1_, rhs.a1_, 0 ) && + ref_compare( base_type::a2_, rhs.a2_, 0 ) && + ref_compare( base_type::a3_, rhs.a3_, 0 ); + } +}; + +template< class A1, class A2, class A3, class A4 > class list4: private storage4< A1, A2, A3, A4 > +{ +private: + + typedef storage4< A1, A2, A3, A4 > base_type; + +public: + + list4( A1 a1, A2 a2, A3 a3, A4 a4 ): base_type( a1, a2, a3, a4 ) {} + + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A3 operator[] (boost::arg<3>) const { return base_type::a3_; } + A4 operator[] (boost::arg<4>) const { return base_type::a4_; } + + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } + A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } + + template T & operator[] (_bi::value & v) const { return v.get(); } + + template T const & operator[] (_bi::value const & v) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); + } + + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); + } + + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); + } + + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); + } + + template void accept(V & v) const + { + base_type::accept(v); + } + + bool operator==(list4 const & rhs) const + { + return + + ref_compare( base_type::a1_, rhs.a1_, 0 ) && + ref_compare( base_type::a2_, rhs.a2_, 0 ) && + ref_compare( base_type::a3_, rhs.a3_, 0 ) && + ref_compare( base_type::a4_, rhs.a4_, 0 ); + } +}; + +template< class A1, class A2, class A3, class A4, class A5 > class list5: private storage5< A1, A2, A3, A4, A5 > +{ +private: + + typedef storage5< A1, A2, A3, A4, A5 > base_type; + +public: + + list5( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5 ): base_type( a1, a2, a3, a4, a5 ) {} + + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A3 operator[] (boost::arg<3>) const { return base_type::a3_; } + A4 operator[] (boost::arg<4>) const { return base_type::a4_; } + A5 operator[] (boost::arg<5>) const { return base_type::a5_; } + + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } + A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } + A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } + + template T & operator[] (_bi::value & v) const { return v.get(); } + + template T const & operator[] (_bi::value const & v) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); + } + + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); + } + + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); + } + + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); + } + + template void accept(V & v) const + { + base_type::accept(v); + } + + bool operator==(list5 const & rhs) const + { + return + + ref_compare( base_type::a1_, rhs.a1_, 0 ) && + ref_compare( base_type::a2_, rhs.a2_, 0 ) && + ref_compare( base_type::a3_, rhs.a3_, 0 ) && + ref_compare( base_type::a4_, rhs.a4_, 0 ) && + ref_compare( base_type::a5_, rhs.a5_, 0 ); + } +}; + +template class list6: private storage6< A1, A2, A3, A4, A5, A6 > +{ +private: + + typedef storage6< A1, A2, A3, A4, A5, A6 > base_type; + +public: + + list6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6 ): base_type( a1, a2, a3, a4, a5, a6 ) {} + + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A3 operator[] (boost::arg<3>) const { return base_type::a3_; } + A4 operator[] (boost::arg<4>) const { return base_type::a4_; } + A5 operator[] (boost::arg<5>) const { return base_type::a5_; } + A6 operator[] (boost::arg<6>) const { return base_type::a6_; } + + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } + A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } + A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } + A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } + + template T & operator[] (_bi::value & v) const { return v.get(); } + + template T const & operator[] (_bi::value const & v) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); + } + + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); + } + + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); + } + + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); + } + + template void accept(V & v) const + { + base_type::accept(v); + } + + bool operator==(list6 const & rhs) const + { + return + + ref_compare( base_type::a1_, rhs.a1_, 0 ) && + ref_compare( base_type::a2_, rhs.a2_, 0 ) && + ref_compare( base_type::a3_, rhs.a3_, 0 ) && + ref_compare( base_type::a4_, rhs.a4_, 0 ) && + ref_compare( base_type::a5_, rhs.a5_, 0 ) && + ref_compare( base_type::a6_, rhs.a6_, 0 ); + } +}; + +template class list7: private storage7< A1, A2, A3, A4, A5, A6, A7 > +{ +private: + + typedef storage7< A1, A2, A3, A4, A5, A6, A7 > base_type; + +public: + + list7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7 ): base_type( a1, a2, a3, a4, a5, a6, a7 ) {} + + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A3 operator[] (boost::arg<3>) const { return base_type::a3_; } + A4 operator[] (boost::arg<4>) const { return base_type::a4_; } + A5 operator[] (boost::arg<5>) const { return base_type::a5_; } + A6 operator[] (boost::arg<6>) const { return base_type::a6_; } + A7 operator[] (boost::arg<7>) const { return base_type::a7_; } + + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } + A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } + A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } + A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } + A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } + + template T & operator[] (_bi::value & v) const { return v.get(); } + + template T const & operator[] (_bi::value const & v) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); + } + + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); + } + + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); + } + + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); + } + + template void accept(V & v) const + { + base_type::accept(v); + } + + bool operator==(list7 const & rhs) const + { + return + + ref_compare( base_type::a1_, rhs.a1_, 0 ) && + ref_compare( base_type::a2_, rhs.a2_, 0 ) && + ref_compare( base_type::a3_, rhs.a3_, 0 ) && + ref_compare( base_type::a4_, rhs.a4_, 0 ) && + ref_compare( base_type::a5_, rhs.a5_, 0 ) && + ref_compare( base_type::a6_, rhs.a6_, 0 ) && + ref_compare( base_type::a7_, rhs.a7_, 0 ); + } +}; + +template< class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > class list8: private storage8< A1, A2, A3, A4, A5, A6, A7, A8 > +{ +private: + + typedef storage8< A1, A2, A3, A4, A5, A6, A7, A8 > base_type; + +public: + + list8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8 ): base_type( a1, a2, a3, a4, a5, a6, a7, a8 ) {} + + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A3 operator[] (boost::arg<3>) const { return base_type::a3_; } + A4 operator[] (boost::arg<4>) const { return base_type::a4_; } + A5 operator[] (boost::arg<5>) const { return base_type::a5_; } + A6 operator[] (boost::arg<6>) const { return base_type::a6_; } + A7 operator[] (boost::arg<7>) const { return base_type::a7_; } + A8 operator[] (boost::arg<8>) const { return base_type::a8_; } + + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } + A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } + A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } + A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } + A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } + A8 operator[] (boost::arg<8> (*) ()) const { return base_type::a8_; } + + template T & operator[] (_bi::value & v) const { return v.get(); } + + template T const & operator[] (_bi::value const & v) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); + } + + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); + } + + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); + } + + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); + } + + template void accept(V & v) const + { + base_type::accept(v); + } + + bool operator==(list8 const & rhs) const + { + return + + ref_compare( base_type::a1_, rhs.a1_, 0 ) && + ref_compare( base_type::a2_, rhs.a2_, 0 ) && + ref_compare( base_type::a3_, rhs.a3_, 0 ) && + ref_compare( base_type::a4_, rhs.a4_, 0 ) && + ref_compare( base_type::a5_, rhs.a5_, 0 ) && + ref_compare( base_type::a6_, rhs.a6_, 0 ) && + ref_compare( base_type::a7_, rhs.a7_, 0 ) && + ref_compare( base_type::a8_, rhs.a8_, 0 ); + } +}; + +template class list9: private storage9< A1, A2, A3, A4, A5, A6, A7, A8, A9 > +{ +private: + + typedef storage9< A1, A2, A3, A4, A5, A6, A7, A8, A9 > base_type; + +public: + + list9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9 ): base_type( a1, a2, a3, a4, a5, a6, a7, a8, a9 ) {} + + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A3 operator[] (boost::arg<3>) const { return base_type::a3_; } + A4 operator[] (boost::arg<4>) const { return base_type::a4_; } + A5 operator[] (boost::arg<5>) const { return base_type::a5_; } + A6 operator[] (boost::arg<6>) const { return base_type::a6_; } + A7 operator[] (boost::arg<7>) const { return base_type::a7_; } + A8 operator[] (boost::arg<8>) const { return base_type::a8_; } + A9 operator[] (boost::arg<9>) const { return base_type::a9_; } + + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } + A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } + A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } + A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } + A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } + A8 operator[] (boost::arg<8> (*) ()) const { return base_type::a8_; } + A9 operator[] (boost::arg<9> (*) ()) const { return base_type::a9_; } + + template T & operator[] (_bi::value & v) const { return v.get(); } + + template T const & operator[] (_bi::value const & v) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); + } + + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); + } + + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); + } + + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); + } + + template void accept(V & v) const + { + base_type::accept(v); + } + + bool operator==(list9 const & rhs) const + { + return + + ref_compare( base_type::a1_, rhs.a1_, 0 ) && + ref_compare( base_type::a2_, rhs.a2_, 0 ) && + ref_compare( base_type::a3_, rhs.a3_, 0 ) && + ref_compare( base_type::a4_, rhs.a4_, 0 ) && + ref_compare( base_type::a5_, rhs.a5_, 0 ) && + ref_compare( base_type::a6_, rhs.a6_, 0 ) && + ref_compare( base_type::a7_, rhs.a7_, 0 ) && + ref_compare( base_type::a8_, rhs.a8_, 0 ) && + ref_compare( base_type::a9_, rhs.a9_, 0 ); + } +}; + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +// bind_t + +#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + +template< class A > struct list_add_cref +{ + typedef A const & type; +}; + +template< class A > struct list_add_cref< A& > +{ + typedef A & type; +}; + +template class bind_t +{ +private: + + F f_; + L l_; + +public: + + typedef typename result_traits::type result_type; + typedef bind_t this_type; + + bind_t( F f, L const & l ): f_( f ), l_( l ) {} + + // + + result_type operator()() + { + list0 a; + return l_( type(), f_, a, 0 ); + } + + result_type operator()() const + { + list0 a; + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1 ) + { + list1< typename list_add_cref::type > a( a1 ); + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1 ) const + { + list1< typename list_add_cref::type > a( a1 ); + return l_(type(), f_, a, 0); + } + + template result_type operator()( A1 && a1, A2 && a2 ) + { + list2< typename list_add_cref::type, typename list_add_cref::type > a( a1, a2 ); + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2 ) const + { + list2< typename list_add_cref::type, typename list_add_cref::type > a( a1, a2 ); + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2, A3 && a3 ) + { + list3< + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type + > a( a1, a2, a3 ); + + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2, A3 && a3 ) const + { + list3< + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type + > a( a1, a2, a3 ); + + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4 ) + { + list4< + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type + > a( a1, a2, a3, a4 ); + + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4 ) const + { + list4< + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type + > a( a1, a2, a3, a4 ); + + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5 ) + { + list5< + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type + > a( a1, a2, a3, a4, a5 ); + + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5 ) const + { + list5< + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type + > a( a1, a2, a3, a4, a5 ); + + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6 ) + { + list6< + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type + > a( a1, a2, a3, a4, a5, a6 ); + + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6 ) const + { + list6< + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type + > a( a1, a2, a3, a4, a5, a6 ); + + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7 ) + { + list7< + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type + > a( a1, a2, a3, a4, a5, a6, a7 ); + + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7 ) const + { + list7< + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type + > a( a1, a2, a3, a4, a5, a6, a7 ); + + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8 ) + { + list8< + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type + > a( a1, a2, a3, a4, a5, a6, a7, a8 ); + + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8 ) const + { + list8< + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type + > a( a1, a2, a3, a4, a5, a6, a7, a8 ); + + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9 ) + { + list9< + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type + > a( a1, a2, a3, a4, a5, a6, a7, a8, a9 ); + + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9 ) const + { + list9< + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type + > a( a1, a2, a3, a4, a5, a6, a7, a8, a9 ); + + return l_( type(), f_, a, 0 ); + } + + // + + template result_type eval( A & a ) + { + return l_( type(), f_, a, 0 ); + } + + template result_type eval( A & a ) const + { + return l_( type(), f_, a, 0 ); + } + + template void accept( V & v ) const + { +#if !defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) && !defined( __BORLANDC__ ) + using boost::visit_each; +#endif + + BOOST_BIND_VISIT_EACH( v, f_, 0 ); + l_.accept( v ); + } + + bool compare( this_type const & rhs ) const + { + return ref_compare( f_, rhs.f_, 0 ) && l_ == rhs.l_; + } +}; + +#elif !defined( BOOST_NO_VOID_RETURNS ) + +template class bind_t +{ +public: + + typedef bind_t this_type; + + bind_t(F f, L const & l): f_(f), l_(l) {} + +#define BOOST_BIND_RETURN return +#include +#undef BOOST_BIND_RETURN + +}; + +#else // no void returns + +template struct bind_t_generator +{ + +template class implementation +{ +public: + + typedef implementation this_type; + + implementation(F f, L const & l): f_(f), l_(l) {} + +#define BOOST_BIND_RETURN return +#include +#undef BOOST_BIND_RETURN + +}; + +}; + +template<> struct bind_t_generator +{ + +template class implementation +{ +private: + + typedef void R; + +public: + + typedef implementation this_type; + + implementation(F f, L const & l): f_(f), l_(l) {} + +#define BOOST_BIND_RETURN +#include +#undef BOOST_BIND_RETURN + +}; + +}; + +template class bind_t: public bind_t_generator::BOOST_NESTED_TEMPLATE implementation +{ +public: + + bind_t(F f, L const & l): bind_t_generator::BOOST_NESTED_TEMPLATE implementation(f, l) {} + +}; + +#endif + +// function_equal + +#ifndef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP + +// put overloads in _bi, rely on ADL + +# ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + +template bool function_equal( bind_t const & a, bind_t const & b ) +{ + return a.compare(b); +} + +# else + +template bool function_equal_impl( bind_t const & a, bind_t const & b, int ) +{ + return a.compare(b); +} + +# endif // #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + +#else // BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP + +// put overloads in boost + +} // namespace _bi + +# ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + +template bool function_equal( _bi::bind_t const & a, _bi::bind_t const & b ) +{ + return a.compare(b); +} + +# else + +template bool function_equal_impl( _bi::bind_t const & a, _bi::bind_t const & b, int ) +{ + return a.compare(b); +} + +# endif // #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + +namespace _bi +{ + +#endif // BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP + +// add_value + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) || (__SUNPRO_CC >= 0x530) + +#if defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x582) ) + +template struct add_value +{ + typedef _bi::value type; +}; + +#else + +template< class T, int I > struct add_value_2 +{ + typedef boost::arg type; +}; + +template< class T > struct add_value_2< T, 0 > +{ + typedef _bi::value< T > type; +}; + +template struct add_value +{ + typedef typename add_value_2< T, boost::is_placeholder< T >::value >::type type; +}; + +#endif + +template struct add_value< value > +{ + typedef _bi::value type; +}; + +template struct add_value< reference_wrapper > +{ + typedef reference_wrapper type; +}; + +template struct add_value< arg > +{ + typedef boost::arg type; +}; + +template struct add_value< arg (*) () > +{ + typedef boost::arg (*type) (); +}; + +template struct add_value< bind_t > +{ + typedef bind_t type; +}; + +#else + +template struct _avt_0; + +template<> struct _avt_0<1> +{ + template struct inner + { + typedef T type; + }; +}; + +template<> struct _avt_0<2> +{ + template struct inner + { + typedef value type; + }; +}; + +typedef char (&_avt_r1) [1]; +typedef char (&_avt_r2) [2]; + +template _avt_r1 _avt_f(value); +template _avt_r1 _avt_f(reference_wrapper); +template _avt_r1 _avt_f(arg); +template _avt_r1 _avt_f(arg (*) ()); +template _avt_r1 _avt_f(bind_t); + +_avt_r2 _avt_f(...); + +template struct add_value +{ + static T t(); + typedef typename _avt_0::template inner::type type; +}; + +#endif + +// list_av_N + +template struct list_av_1 +{ + typedef typename add_value::type B1; + typedef list1 type; +}; + +template struct list_av_2 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef list2 type; +}; + +template struct list_av_3 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef typename add_value::type B3; + typedef list3 type; +}; + +template struct list_av_4 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef typename add_value::type B3; + typedef typename add_value::type B4; + typedef list4 type; +}; + +template struct list_av_5 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef typename add_value::type B3; + typedef typename add_value::type B4; + typedef typename add_value::type B5; + typedef list5 type; +}; + +template struct list_av_6 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef typename add_value::type B3; + typedef typename add_value::type B4; + typedef typename add_value::type B5; + typedef typename add_value::type B6; + typedef list6 type; +}; + +template struct list_av_7 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef typename add_value::type B3; + typedef typename add_value::type B4; + typedef typename add_value::type B5; + typedef typename add_value::type B6; + typedef typename add_value::type B7; + typedef list7 type; +}; + +template struct list_av_8 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef typename add_value::type B3; + typedef typename add_value::type B4; + typedef typename add_value::type B5; + typedef typename add_value::type B6; + typedef typename add_value::type B7; + typedef typename add_value::type B8; + typedef list8 type; +}; + +template struct list_av_9 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef typename add_value::type B3; + typedef typename add_value::type B4; + typedef typename add_value::type B5; + typedef typename add_value::type B6; + typedef typename add_value::type B7; + typedef typename add_value::type B8; + typedef typename add_value::type B9; + typedef list9 type; +}; + +// operator! + +struct logical_not +{ + template bool operator()(V const & v) const { return !v; } +}; + +template + bind_t< bool, logical_not, list1< bind_t > > + operator! (bind_t const & f) +{ + typedef list1< bind_t > list_type; + return bind_t ( logical_not(), list_type(f) ); +} + +// relational operators + +#define BOOST_BIND_OPERATOR( op, name ) \ +\ +struct name \ +{ \ + template bool operator()(V const & v, W const & w) const { return v op w; } \ +}; \ + \ +template \ + bind_t< bool, name, list2< bind_t, typename add_value::type > > \ + operator op (bind_t const & f, A2 a2) \ +{ \ + typedef typename add_value::type B2; \ + typedef list2< bind_t, B2> list_type; \ + return bind_t ( name(), list_type(f, a2) ); \ +} + +BOOST_BIND_OPERATOR( ==, equal ) +BOOST_BIND_OPERATOR( !=, not_equal ) + +BOOST_BIND_OPERATOR( <, less ) +BOOST_BIND_OPERATOR( <=, less_equal ) + +BOOST_BIND_OPERATOR( >, greater ) +BOOST_BIND_OPERATOR( >=, greater_equal ) + +BOOST_BIND_OPERATOR( &&, logical_and ) +BOOST_BIND_OPERATOR( ||, logical_or ) + +#undef BOOST_BIND_OPERATOR + +#if defined(__GNUC__) && BOOST_WORKAROUND(__GNUC__, < 3) + +// resolve ambiguity with rel_ops + +#define BOOST_BIND_OPERATOR( op, name ) \ +\ +template \ + bind_t< bool, name, list2< bind_t, bind_t > > \ + operator op (bind_t const & f, bind_t const & g) \ +{ \ + typedef list2< bind_t, bind_t > list_type; \ + return bind_t ( name(), list_type(f, g) ); \ +} + +BOOST_BIND_OPERATOR( !=, not_equal ) +BOOST_BIND_OPERATOR( <=, less_equal ) +BOOST_BIND_OPERATOR( >, greater ) +BOOST_BIND_OPERATOR( >=, greater_equal ) + +#endif + +// visit_each, ADL + +#if !defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) && !defined( __BORLANDC__ ) \ + && !(defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3) + +template void visit_each( V & v, value const & t, int ) +{ + using boost::visit_each; + BOOST_BIND_VISIT_EACH( v, t.get(), 0 ); +} + +template void visit_each( V & v, bind_t const & t, int ) +{ + t.accept( v ); +} + +#endif + +} // namespace _bi + +// visit_each, no ADL + +#if defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) || defined( __BORLANDC__ ) \ + || (defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3) + +template void visit_each( V & v, _bi::value const & t, int ) +{ + BOOST_BIND_VISIT_EACH( v, t.get(), 0 ); +} + +template void visit_each( V & v, _bi::bind_t const & t, int ) +{ + t.accept( v ); +} + +#endif + +// is_bind_expression + +template< class T > struct is_bind_expression +{ + enum _vt { value = 0 }; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template< class R, class F, class L > struct is_bind_expression< _bi::bind_t< R, F, L > > +{ + enum _vt { value = 1 }; +}; + +#endif + +// bind + +#ifndef BOOST_BIND +#define BOOST_BIND bind +#endif + +// generic function objects + +template + _bi::bind_t + BOOST_BIND(F f) +{ + typedef _bi::list0 list_type; + return _bi::bind_t (f, list_type()); +} + +template + _bi::bind_t::type> + BOOST_BIND(F f, A1 a1) +{ + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t (f, list_type(a1)); +} + +template + _bi::bind_t::type> + BOOST_BIND(F f, A1 a1, A2 a2) +{ + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t (f, list_type(a1, a2)); +} + +template + _bi::bind_t::type> + BOOST_BIND(F f, A1 a1, A2 a2, A3 a3) +{ + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3)); +} + +template + _bi::bind_t::type> + BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4)); +} + +template + _bi::bind_t::type> + BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5)); +} + +template + _bi::bind_t::type> + BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6)); +} + +template + _bi::bind_t::type> + BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7)); +} + +template + _bi::bind_t::type> + BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} + +template + _bi::bind_t::type> + BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} + +// generic function objects, alternative syntax + +template + _bi::bind_t + BOOST_BIND(boost::type, F f) +{ + typedef _bi::list0 list_type; + return _bi::bind_t (f, list_type()); +} + +template + _bi::bind_t::type> + BOOST_BIND(boost::type, F f, A1 a1) +{ + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t (f, list_type(a1)); +} + +template + _bi::bind_t::type> + BOOST_BIND(boost::type, F f, A1 a1, A2 a2) +{ + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t (f, list_type(a1, a2)); +} + +template + _bi::bind_t::type> + BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3) +{ + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3)); +} + +template + _bi::bind_t::type> + BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4)); +} + +template + _bi::bind_t::type> + BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5)); +} + +template + _bi::bind_t::type> + BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6)); +} + +template + _bi::bind_t::type> + BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7)); +} + +template + _bi::bind_t::type> + BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} + +template + _bi::bind_t::type> + BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) + +// adaptable function objects + +template + _bi::bind_t<_bi::unspecified, F, _bi::list0> + BOOST_BIND(F f) +{ + typedef _bi::list0 list_type; + return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type()); +} + +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_1::type> + BOOST_BIND(F f, A1 a1) +{ + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type(a1)); +} + +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_2::type> + BOOST_BIND(F f, A1 a1, A2 a2) +{ + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type(a1, a2)); +} + +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_3::type> + BOOST_BIND(F f, A1 a1, A2 a2, A3 a3) +{ + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3)); +} + +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_4::type> + BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4)); +} + +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_5::type> + BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5)); +} + +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_6::type> + BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6)); +} + +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_7::type> + BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7)); +} + +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_8::type> + BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} + +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_9::type> + BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} + +#endif // !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) + +// function pointers + +#define BOOST_BIND_CC +#define BOOST_BIND_ST + +#include + +#undef BOOST_BIND_CC +#undef BOOST_BIND_ST + +#ifdef BOOST_BIND_ENABLE_STDCALL + +#define BOOST_BIND_CC __stdcall +#define BOOST_BIND_ST + +#include + +#undef BOOST_BIND_CC +#undef BOOST_BIND_ST + +#endif + +#ifdef BOOST_BIND_ENABLE_FASTCALL + +#define BOOST_BIND_CC __fastcall +#define BOOST_BIND_ST + +#include + +#undef BOOST_BIND_CC +#undef BOOST_BIND_ST + +#endif + +#ifdef BOOST_BIND_ENABLE_PASCAL + +#define BOOST_BIND_ST pascal +#define BOOST_BIND_CC + +#include + +#undef BOOST_BIND_ST +#undef BOOST_BIND_CC + +#endif + +// member function pointers + +#define BOOST_BIND_MF_NAME(X) X +#define BOOST_BIND_MF_CC + +#include +#include + +#undef BOOST_BIND_MF_NAME +#undef BOOST_BIND_MF_CC + +#ifdef BOOST_MEM_FN_ENABLE_CDECL + +#define BOOST_BIND_MF_NAME(X) X##_cdecl +#define BOOST_BIND_MF_CC __cdecl + +#include +#include + +#undef BOOST_BIND_MF_NAME +#undef BOOST_BIND_MF_CC + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_STDCALL + +#define BOOST_BIND_MF_NAME(X) X##_stdcall +#define BOOST_BIND_MF_CC __stdcall + +#include +#include + +#undef BOOST_BIND_MF_NAME +#undef BOOST_BIND_MF_CC + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_FASTCALL + +#define BOOST_BIND_MF_NAME(X) X##_fastcall +#define BOOST_BIND_MF_CC __fastcall + +#include +#include + +#undef BOOST_BIND_MF_NAME +#undef BOOST_BIND_MF_CC + +#endif + +// data member pointers + +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) || defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + || ( defined(__BORLANDC__) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x620 ) ) ) + +template +_bi::bind_t< R, _mfi::dm, typename _bi::list_av_1::type > + BOOST_BIND(R T::*f, A1 a1) +{ + typedef _mfi::dm F; + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t( F(f), list_type(a1) ); +} + +#else + +namespace _bi +{ + +template< class Pm, int I > struct add_cref; + +template< class M, class T > struct add_cref< M T::*, 0 > +{ + typedef M type; +}; + +template< class M, class T > struct add_cref< M T::*, 1 > +{ +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4180) +#endif + typedef M const & type; +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif +}; + +template< class R, class T > struct add_cref< R (T::*) (), 1 > +{ + typedef void type; +}; + +#if !defined(__IBMCPP__) || __IBMCPP_FUNC_CV_TMPL_ARG_DEDUCTION + +template< class R, class T > struct add_cref< R (T::*) () const, 1 > +{ + typedef void type; +}; + +#endif // __IBMCPP__ + +template struct isref +{ + enum value_type { value = 0 }; +}; + +template struct isref< R& > +{ + enum value_type { value = 1 }; +}; + +template struct isref< R* > +{ + enum value_type { value = 1 }; +}; + +template struct dm_result +{ + typedef typename add_cref< Pm, 1 >::type type; +}; + +template struct dm_result< Pm, bind_t > +{ + typedef typename bind_t::result_type result_type; + typedef typename add_cref< Pm, isref< result_type >::value >::type type; +}; + +} // namespace _bi + +template< class A1, class M, class T > + +_bi::bind_t< + typename _bi::dm_result< M T::*, A1 >::type, + _mfi::dm, + typename _bi::list_av_1::type +> + +BOOST_BIND( M T::*f, A1 a1 ) +{ + typedef typename _bi::dm_result< M T::*, A1 >::type result_type; + typedef _mfi::dm F; + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t< result_type, F, list_type >( F( f ), list_type( a1 ) ); +} + +#endif + +} // namespace boost + +#ifndef BOOST_BIND_NO_PLACEHOLDERS + +# include + +#endif + +#ifdef BOOST_MSVC +# pragma warning(default: 4512) // assignment operator could not be generated +# pragma warning(pop) +#endif + +#endif // #ifndef BOOST_BIND_BIND_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/bind/bind_cc.hpp b/ThirdParty/boost-Subset/boost/bind/bind_cc.hpp new file mode 100644 index 0000000000..35f8eceb9e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/bind/bind_cc.hpp @@ -0,0 +1,117 @@ +// +// bind/bind_cc.hpp - support for different calling conventions +// +// Do not include this header directly. +// +// Copyright (c) 2001 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/bind/bind.html for documentation. +// + +template + _bi::bind_t + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) ()) +{ + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (); + typedef _bi::list0 list_type; + return _bi::bind_t (f, list_type()); +} + +template + _bi::bind_t::type> + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1), A1 a1) +{ + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1); + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t (f, list_type(a1)); +} + +template + _bi::bind_t::type> + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2), A1 a1, A2 a2) +{ + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2); + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t (f, list_type(a1, a2)); +} + +template + _bi::bind_t::type> + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3), A1 a1, A2 a2, A3 a3) +{ + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3); + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3)); +} + +template + _bi::bind_t::type> + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4); + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4)); +} + +template + _bi::bind_t::type> + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5); + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5)); +} + +template + _bi::bind_t::type> + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6); + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6)); +} + +template + _bi::bind_t::type> + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7); + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7)); +} + +template + _bi::bind_t::type> + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8); + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} + +template + _bi::bind_t::type> + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8, B9), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8, B9); + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} diff --git a/ThirdParty/boost-Subset/boost/bind/bind_mf2_cc.hpp b/ThirdParty/boost-Subset/boost/bind/bind_mf2_cc.hpp new file mode 100644 index 0000000000..66476bc19d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/bind/bind_mf2_cc.hpp @@ -0,0 +1,228 @@ +// +// bind/bind_mf2_cc.hpp - member functions, type<> syntax +// +// Do not include this header directly. +// +// Copyright (c) 2001 Peter Dimov and Multi Media Ltd. +// Copyright (c) 2008 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// See http://www.boost.org/libs/bind/bind.html for documentation. +// + +// 0 + +template + _bi::bind_t, typename _bi::list_av_1::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (), A1 a1) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf0) F; + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t(F(f), list_type(a1)); +} + +template + _bi::bind_t, typename _bi::list_av_1::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) () const, A1 a1) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf0) F; + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t(F(f), list_type(a1)); +} + +// 1 + +template + _bi::bind_t, typename _bi::list_av_2::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1), A1 a1, A2 a2) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf1) F; + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2)); +} + +template + _bi::bind_t, typename _bi::list_av_2::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1) const, A1 a1, A2 a2) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf1) F; + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2)); +} + +// 2 + +template + _bi::bind_t, typename _bi::list_av_3::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2), A1 a1, A2 a2, A3 a3) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf2) F; + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3)); +} + +template + _bi::bind_t, typename _bi::list_av_3::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf2) F; + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3)); +} + +// 3 + +template + _bi::bind_t, typename _bi::list_av_4::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf3) F; + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); +} + +template + _bi::bind_t, typename _bi::list_av_4::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf3) F; + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); +} + +// 4 + +template + _bi::bind_t, typename _bi::list_av_5::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf4) F; + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); +} + +template + _bi::bind_t, typename _bi::list_av_5::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf4) F; + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); +} + +// 5 + +template + _bi::bind_t, typename _bi::list_av_6::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf5) F; + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); +} + +template + _bi::bind_t, typename _bi::list_av_6::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf5) F; + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); +} + +// 6 + +template + _bi::bind_t, typename _bi::list_av_7::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf6) F; + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); +} + +template + _bi::bind_t, typename _bi::list_av_7::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf6) F; + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); +} + +// 7 + +template + _bi::bind_t, typename _bi::list_av_8::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf7) F; + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} + +template + _bi::bind_t, typename _bi::list_av_8::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf7) F; + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} + +// 8 + +template + _bi::bind_t, typename _bi::list_av_9::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf8) F; + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} + +template + _bi::bind_t, typename _bi::list_av_9::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf8) F; + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} diff --git a/ThirdParty/boost-Subset/boost/bind/bind_mf_cc.hpp b/ThirdParty/boost-Subset/boost/bind/bind_mf_cc.hpp new file mode 100644 index 0000000000..e149384ff5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/bind/bind_mf_cc.hpp @@ -0,0 +1,441 @@ +// +// bind/bind_mf_cc.hpp - support for different calling conventions +// +// Do not include this header directly. +// +// Copyright (c) 2001 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/bind/bind.html for documentation. +// + +// 0 + +template + _bi::bind_t, typename _bi::list_av_1::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (), A1 a1) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf0) F; + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t(F(f), list_type(a1)); +} + +template + _bi::bind_t, typename _bi::list_av_1::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const, A1 a1) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf0) F; + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t(F(f), list_type(a1)); +} + +template + typename boost::enable_if_c::value, + _bi::bind_t, typename _bi::list_av_1::type> + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (), A1 a1) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf0) F; + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t(F(f), list_type(a1)); +} + +template + typename boost::enable_if_c::value, + _bi::bind_t, typename _bi::list_av_1::type> + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const, A1 a1) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf0) F; + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t(F(f), list_type(a1)); +} + +// 1 + +template + _bi::bind_t, typename _bi::list_av_2::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1), A1 a1, A2 a2) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf1) F; + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2)); +} + +template + _bi::bind_t, typename _bi::list_av_2::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) const, A1 a1, A2 a2) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf1) F; + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2)); +} + +template + typename boost::enable_if_c::value, + _bi::bind_t, typename _bi::list_av_2::type> + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1), A1 a1, A2 a2) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf1) F; + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2)); +} + +template + typename boost::enable_if_c::value, + _bi::bind_t, typename _bi::list_av_2::type> + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) const, A1 a1, A2 a2) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf1) F; + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2)); +} + +// 2 + +template + _bi::bind_t, typename _bi::list_av_3::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2), A1 a1, A2 a2, A3 a3) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf2) F; + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3)); +} + +template + _bi::bind_t, typename _bi::list_av_3::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf2) F; + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3)); +} + +template + typename boost::enable_if_c::value, + _bi::bind_t, typename _bi::list_av_3::type> + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2), A1 a1, A2 a2, A3 a3) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf2) F; + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3)); +} + +template + typename boost::enable_if_c::value, + _bi::bind_t, typename _bi::list_av_3::type> + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf2) F; + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3)); +} + +// 3 + +template + _bi::bind_t, typename _bi::list_av_4::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf3) F; + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); +} + +template + _bi::bind_t, typename _bi::list_av_4::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf3) F; + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); +} + +template + typename boost::enable_if_c::value, + _bi::bind_t, typename _bi::list_av_4::type> + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf3) F; + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); +} + +template + typename boost::enable_if_c::value, + _bi::bind_t, typename _bi::list_av_4::type> + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf3) F; + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); +} + +// 4 + +template + _bi::bind_t, typename _bi::list_av_5::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf4) F; + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); +} + +template + _bi::bind_t, typename _bi::list_av_5::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf4) F; + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); +} + +template + typename boost::enable_if_c::value, + _bi::bind_t, typename _bi::list_av_5::type> + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf4) F; + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); +} + +template + typename boost::enable_if_c::value, + _bi::bind_t, typename _bi::list_av_5::type> + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf4) F; + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); +} + +// 5 + +template + _bi::bind_t, typename _bi::list_av_6::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf5) F; + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); +} + +template + _bi::bind_t, typename _bi::list_av_6::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf5) F; + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); +} + +template + typename boost::enable_if_c::value, + _bi::bind_t, typename _bi::list_av_6::type> + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf5) F; + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); +} + +template + typename boost::enable_if_c::value, + _bi::bind_t, typename _bi::list_av_6::type> + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf5) F; + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); +} + +// 6 + +template + _bi::bind_t, typename _bi::list_av_7::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf6) F; + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); +} + +template + _bi::bind_t, typename _bi::list_av_7::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf6) F; + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); +} + +template + typename boost::enable_if_c::value, + _bi::bind_t, typename _bi::list_av_7::type> + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf6) F; + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); +} + +template + typename boost::enable_if_c::value, + _bi::bind_t, typename _bi::list_av_7::type> + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf6) F; + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); +} + +// 7 + +template + _bi::bind_t, typename _bi::list_av_8::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf7) F; + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} + +template + _bi::bind_t, typename _bi::list_av_8::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf7) F; + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} + +template + typename boost::enable_if_c::value, + _bi::bind_t, typename _bi::list_av_8::type> + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf7) F; + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} + +template + typename boost::enable_if_c::value, + _bi::bind_t, typename _bi::list_av_8::type> + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf7) F; + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} + +// 8 + +template + _bi::bind_t, typename _bi::list_av_9::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf8) F; + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} + +template + _bi::bind_t, typename _bi::list_av_9::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf8) F; + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} + +template + typename boost::enable_if_c::value, + _bi::bind_t, typename _bi::list_av_9::type> + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf8) F; + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} + +template + typename boost::enable_if_c::value, + _bi::bind_t, typename _bi::list_av_9::type> + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf8) F; + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} diff --git a/ThirdParty/boost-Subset/boost/bind/bind_template.hpp b/ThirdParty/boost-Subset/boost/bind/bind_template.hpp new file mode 100644 index 0000000000..411d20c74e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/bind/bind_template.hpp @@ -0,0 +1,345 @@ +// +// bind/bind_template.hpp +// +// Do not include this header directly. +// +// Copyright (c) 2001-2004 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/bind/bind.html for documentation. +// + + typedef typename result_traits::type result_type; + + result_type operator()() + { + list0 a; + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + result_type operator()() const + { + list0 a; + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1) + { + list1 a(a1); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1) const + { + list1 a(a1); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + + template result_type operator()(A1 const & a1) + { + list1 a(a1); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1) const + { + list1 a(a1); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#endif + + template result_type operator()(A1 & a1, A2 & a2) + { + list2 a(a1, a2); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1, A2 & a2) const + { + list2 a(a1, a2); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + + template result_type operator()(A1 const & a1, A2 & a2) + { + list2 a(a1, a2); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1, A2 & a2) const + { + list2 a(a1, a2); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + + template result_type operator()(A1 & a1, A2 const & a2) + { + list2 a(a1, a2); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1, A2 const & a2) const + { + list2 a(a1, a2); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + + template result_type operator()(A1 const & a1, A2 const & a2) + { + list2 a(a1, a2); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1, A2 const & a2) const + { + list2 a(a1, a2); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#endif + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3) + { + list3 a(a1, a2, a3); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3) const + { + list3 a(a1, a2, a3); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) + { + list3 a(a1, a2, a3); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) const + { + list3 a(a1, a2, a3); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#endif + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) + { + list4 a(a1, a2, a3, a4); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) const + { + list4 a(a1, a2, a3, a4); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) + { + list4 a(a1, a2, a3, a4); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) const + { + list4 a(a1, a2, a3, a4); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#endif + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) + { + list5 a(a1, a2, a3, a4, a5); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) const + { + list5 a(a1, a2, a3, a4, a5); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) + { + list5 a(a1, a2, a3, a4, a5); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) const + { + list5 a(a1, a2, a3, a4, a5); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#endif + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) + { + list6 a(a1, a2, a3, a4, a5, a6); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) const + { + list6 a(a1, a2, a3, a4, a5, a6); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) + { + list6 a(a1, a2, a3, a4, a5, a6); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) const + { + list6 a(a1, a2, a3, a4, a5, a6); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#endif + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) + { + list7 a(a1, a2, a3, a4, a5, a6, a7); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) const + { + list7 a(a1, a2, a3, a4, a5, a6, a7); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) + { + list7 a(a1, a2, a3, a4, a5, a6, a7); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) const + { + list7 a(a1, a2, a3, a4, a5, a6, a7); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#endif + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) + { + list8 a(a1, a2, a3, a4, a5, a6, a7, a8); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) const + { + list8 a(a1, a2, a3, a4, a5, a6, a7, a8); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) + { + list8 a(a1, a2, a3, a4, a5, a6, a7, a8); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) const + { + list8 a(a1, a2, a3, a4, a5, a6, a7, a8); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#endif + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) + { + list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) const + { + list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) + { + list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) const + { + list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#endif + + template result_type eval(A & a) + { + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type eval(A & a) const + { + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template void accept(V & v) const + { +#if !defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) && !defined( __BORLANDC__ ) + + using boost::visit_each; + +#endif + BOOST_BIND_VISIT_EACH(v, f_, 0); + l_.accept(v); + } + + bool compare(this_type const & rhs) const + { + return ref_compare(f_, rhs.f_, 0) && l_ == rhs.l_; + } + +private: + + F f_; + L l_; diff --git a/ThirdParty/boost-Subset/boost/bind/mem_fn.hpp b/ThirdParty/boost-Subset/boost/bind/mem_fn.hpp new file mode 100644 index 0000000000..956e7d8885 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/bind/mem_fn.hpp @@ -0,0 +1,389 @@ +#ifndef BOOST_BIND_MEM_FN_HPP_INCLUDED +#define BOOST_BIND_MEM_FN_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// mem_fn.hpp - a generalization of std::mem_fun[_ref] +// +// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. +// Copyright (c) 2001 David Abrahams +// Copyright (c) 2003-2005 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/bind/mem_fn.html for documentation. +// + +#include +#include +#include + +namespace boost +{ + +#if defined(BOOST_NO_VOID_RETURNS) + +#define BOOST_MEM_FN_CLASS_F , class F +#define BOOST_MEM_FN_TYPEDEF(X) + +namespace _mfi // mem_fun_impl +{ + +template struct mf +{ + +#define BOOST_MEM_FN_RETURN return + +#define BOOST_MEM_FN_NAME(X) inner_##X +#define BOOST_MEM_FN_CC + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#ifdef BOOST_MEM_FN_ENABLE_CDECL + +#define BOOST_MEM_FN_NAME(X) inner_##X##_cdecl +#define BOOST_MEM_FN_CC __cdecl + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_STDCALL + +#define BOOST_MEM_FN_NAME(X) inner_##X##_stdcall +#define BOOST_MEM_FN_CC __stdcall + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_FASTCALL + +#define BOOST_MEM_FN_NAME(X) inner_##X##_fastcall +#define BOOST_MEM_FN_CC __fastcall + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#endif + +#undef BOOST_MEM_FN_RETURN + +}; // struct mf + +template<> struct mf +{ + +#define BOOST_MEM_FN_RETURN + +#define BOOST_MEM_FN_NAME(X) inner_##X +#define BOOST_MEM_FN_CC + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#ifdef BOOST_MEM_FN_ENABLE_CDECL + +#define BOOST_MEM_FN_NAME(X) inner_##X##_cdecl +#define BOOST_MEM_FN_CC __cdecl + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_STDCALL + +#define BOOST_MEM_FN_NAME(X) inner_##X##_stdcall +#define BOOST_MEM_FN_CC __stdcall + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_FASTCALL + +#define BOOST_MEM_FN_NAME(X) inner_##X##_fastcall +#define BOOST_MEM_FN_CC __fastcall + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#endif + +#undef BOOST_MEM_FN_RETURN + +}; // struct mf + +#undef BOOST_MEM_FN_CLASS_F +#undef BOOST_MEM_FN_TYPEDEF_F + +#define BOOST_MEM_FN_NAME(X) X +#define BOOST_MEM_FN_NAME2(X) inner_##X +#define BOOST_MEM_FN_CC + +#include + +#undef BOOST_MEM_FN_NAME +#undef BOOST_MEM_FN_NAME2 +#undef BOOST_MEM_FN_CC + +#ifdef BOOST_MEM_FN_ENABLE_CDECL + +#define BOOST_MEM_FN_NAME(X) X##_cdecl +#define BOOST_MEM_FN_NAME2(X) inner_##X##_cdecl +#define BOOST_MEM_FN_CC __cdecl + +#include + +#undef BOOST_MEM_FN_NAME +#undef BOOST_MEM_FN_NAME2 +#undef BOOST_MEM_FN_CC + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_STDCALL + +#define BOOST_MEM_FN_NAME(X) X##_stdcall +#define BOOST_MEM_FN_NAME2(X) inner_##X##_stdcall +#define BOOST_MEM_FN_CC __stdcall + +#include + +#undef BOOST_MEM_FN_NAME +#undef BOOST_MEM_FN_NAME2 +#undef BOOST_MEM_FN_CC + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_FASTCALL + +#define BOOST_MEM_FN_NAME(X) X##_fastcall +#define BOOST_MEM_FN_NAME2(X) inner_##X##_fastcall +#define BOOST_MEM_FN_CC __fastcall + +#include + +#undef BOOST_MEM_FN_NAME +#undef BOOST_MEM_FN_NAME2 +#undef BOOST_MEM_FN_CC + +#endif + +} // namespace _mfi + +#else // #ifdef BOOST_NO_VOID_RETURNS + +#define BOOST_MEM_FN_CLASS_F +#define BOOST_MEM_FN_TYPEDEF(X) typedef X; + +namespace _mfi +{ + +#define BOOST_MEM_FN_RETURN return + +#define BOOST_MEM_FN_NAME(X) X +#define BOOST_MEM_FN_CC + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#ifdef BOOST_MEM_FN_ENABLE_CDECL + +#define BOOST_MEM_FN_NAME(X) X##_cdecl +#define BOOST_MEM_FN_CC __cdecl + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_STDCALL + +#define BOOST_MEM_FN_NAME(X) X##_stdcall +#define BOOST_MEM_FN_CC __stdcall + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_FASTCALL + +#define BOOST_MEM_FN_NAME(X) X##_fastcall +#define BOOST_MEM_FN_CC __fastcall + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#endif + +#undef BOOST_MEM_FN_RETURN + +} // namespace _mfi + +#undef BOOST_MEM_FN_CLASS_F +#undef BOOST_MEM_FN_TYPEDEF + +#endif // #ifdef BOOST_NO_VOID_RETURNS + +#define BOOST_MEM_FN_NAME(X) X +#define BOOST_MEM_FN_CC + +#include + +#undef BOOST_MEM_FN_NAME +#undef BOOST_MEM_FN_CC + +#ifdef BOOST_MEM_FN_ENABLE_CDECL + +#define BOOST_MEM_FN_NAME(X) X##_cdecl +#define BOOST_MEM_FN_CC __cdecl + +#include + +#undef BOOST_MEM_FN_NAME +#undef BOOST_MEM_FN_CC + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_STDCALL + +#define BOOST_MEM_FN_NAME(X) X##_stdcall +#define BOOST_MEM_FN_CC __stdcall + +#include + +#undef BOOST_MEM_FN_NAME +#undef BOOST_MEM_FN_CC + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_FASTCALL + +#define BOOST_MEM_FN_NAME(X) X##_fastcall +#define BOOST_MEM_FN_CC __fastcall + +#include + +#undef BOOST_MEM_FN_NAME +#undef BOOST_MEM_FN_CC + +#endif + +// data member support + +namespace _mfi +{ + +template class dm +{ +public: + + typedef R const & result_type; + typedef T const * argument_type; + +private: + + typedef R (T::*F); + F f_; + + template R const & call(U & u, T const *) const + { + return (u.*f_); + } + + template R const & call(U & u, void const *) const + { + return (get_pointer(u)->*f_); + } + +public: + + explicit dm(F f): f_(f) {} + + R & operator()(T * p) const + { + return (p->*f_); + } + + R const & operator()(T const * p) const + { + return (p->*f_); + } + + template R const & operator()(U const & u) const + { + return call(u, &u); + } + +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && !BOOST_WORKAROUND(__MWERKS__, < 0x3200) + + R & operator()(T & t) const + { + return (t.*f_); + } + + R const & operator()(T const & t) const + { + return (t.*f_); + } + +#endif + + bool operator==(dm const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(dm const & rhs) const + { + return f_ != rhs.f_; + } +}; + +} // namespace _mfi + +template _mfi::dm mem_fn(R T::*f) +{ + return _mfi::dm(f); +} + +} // namespace boost + +#endif // #ifndef BOOST_BIND_MEM_FN_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/bind/mem_fn_cc.hpp b/ThirdParty/boost-Subset/boost/bind/mem_fn_cc.hpp new file mode 100644 index 0000000000..8b6ea0ba13 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/bind/mem_fn_cc.hpp @@ -0,0 +1,103 @@ +// +// bind/mem_fn_cc.hpp - support for different calling conventions +// +// Do not include this header directly. +// +// Copyright (c) 2001 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/bind/mem_fn.html for documentation. +// + +template _mfi::BOOST_MEM_FN_NAME(mf0) mem_fn(R (BOOST_MEM_FN_CC T::*f) ()) +{ + return _mfi::BOOST_MEM_FN_NAME(mf0)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(cmf0) mem_fn(R (BOOST_MEM_FN_CC T::*f) () const) +{ + return _mfi::BOOST_MEM_FN_NAME(cmf0)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(mf1) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1)) +{ + return _mfi::BOOST_MEM_FN_NAME(mf1)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(cmf1) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1) const) +{ + return _mfi::BOOST_MEM_FN_NAME(cmf1)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(mf2) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2)) +{ + return _mfi::BOOST_MEM_FN_NAME(mf2)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(cmf2) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2) const) +{ + return _mfi::BOOST_MEM_FN_NAME(cmf2)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(mf3) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3)) +{ + return _mfi::BOOST_MEM_FN_NAME(mf3)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(cmf3) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3) const) +{ + return _mfi::BOOST_MEM_FN_NAME(cmf3)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(mf4) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4)) +{ + return _mfi::BOOST_MEM_FN_NAME(mf4)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(cmf4) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4) const) +{ + return _mfi::BOOST_MEM_FN_NAME(cmf4)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(mf5) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5)) +{ + return _mfi::BOOST_MEM_FN_NAME(mf5)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(cmf5) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5) const) +{ + return _mfi::BOOST_MEM_FN_NAME(cmf5)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(mf6) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6)) +{ + return _mfi::BOOST_MEM_FN_NAME(mf6)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(cmf6) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6) const) +{ + return _mfi::BOOST_MEM_FN_NAME(cmf6)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(mf7) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6, A7)) +{ + return _mfi::BOOST_MEM_FN_NAME(mf7)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(cmf7) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6, A7) const) +{ + return _mfi::BOOST_MEM_FN_NAME(cmf7)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(mf8) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6, A7, A8)) +{ + return _mfi::BOOST_MEM_FN_NAME(mf8)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(cmf8) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6, A7, A8) const) +{ + return _mfi::BOOST_MEM_FN_NAME(cmf8)(f); +} diff --git a/ThirdParty/boost-Subset/boost/bind/mem_fn_template.hpp b/ThirdParty/boost-Subset/boost/bind/mem_fn_template.hpp new file mode 100644 index 0000000000..b26d585dbc --- /dev/null +++ b/ThirdParty/boost-Subset/boost/bind/mem_fn_template.hpp @@ -0,0 +1,1047 @@ +// +// bind/mem_fn_template.hpp +// +// Do not include this header directly +// +// Copyright (c) 2001 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/bind/mem_fn.html for documentation. +// + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) +# define BOOST_MEM_FN_ENABLE_CONST_OVERLOADS +#endif + +// mf0 + +template class BOOST_MEM_FN_NAME(mf0) +{ +public: + + typedef R result_type; + typedef T * argument_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) ()) + F f_; + + template R call(U & u, T const *) const + { + BOOST_MEM_FN_RETURN (u.*f_)(); + } + + template R call(U & u, void const *) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(); + } + +public: + + explicit BOOST_MEM_FN_NAME(mf0)(F f): f_(f) {} + + R operator()(T * p) const + { + BOOST_MEM_FN_RETURN (p->*f_)(); + } + + template R operator()(U & u) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p); + } + +#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS + + template R operator()(U const & u) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p); + } + +#endif + + R operator()(T & t) const + { + BOOST_MEM_FN_RETURN (t.*f_)(); + } + + bool operator==(BOOST_MEM_FN_NAME(mf0) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(mf0) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// cmf0 + +template class BOOST_MEM_FN_NAME(cmf0) +{ +public: + + typedef R result_type; + typedef T const * argument_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) () const) + F f_; + + template R call(U & u, T const *) const + { + BOOST_MEM_FN_RETURN (u.*f_)(); + } + + template R call(U & u, void const *) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(); + } + +public: + + explicit BOOST_MEM_FN_NAME(cmf0)(F f): f_(f) {} + + template R operator()(U const & u) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p); + } + + R operator()(T const & t) const + { + BOOST_MEM_FN_RETURN (t.*f_)(); + } + + bool operator==(BOOST_MEM_FN_NAME(cmf0) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(cmf0) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// mf1 + +template class BOOST_MEM_FN_NAME(mf1) +{ +public: + + typedef R result_type; + typedef T * first_argument_type; + typedef A1 second_argument_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1)) + F f_; + + template R call(U & u, T const *, B1 & b1) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1); + } + + template R call(U & u, void const *, B1 & b1) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1); + } + +public: + + explicit BOOST_MEM_FN_NAME(mf1)(F f): f_(f) {} + + R operator()(T * p, A1 a1) const + { + BOOST_MEM_FN_RETURN (p->*f_)(a1); + } + + template R operator()(U & u, A1 a1) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1); + } + +#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS + + template R operator()(U const & u, A1 a1) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1); + } + +#endif + + R operator()(T & t, A1 a1) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1); + } + + bool operator==(BOOST_MEM_FN_NAME(mf1) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(mf1) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// cmf1 + +template class BOOST_MEM_FN_NAME(cmf1) +{ +public: + + typedef R result_type; + typedef T const * first_argument_type; + typedef A1 second_argument_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1) const) + F f_; + + template R call(U & u, T const *, B1 & b1) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1); + } + + template R call(U & u, void const *, B1 & b1) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1); + } + +public: + + explicit BOOST_MEM_FN_NAME(cmf1)(F f): f_(f) {} + + template R operator()(U const & u, A1 a1) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1); + } + + R operator()(T const & t, A1 a1) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1); + } + + bool operator==(BOOST_MEM_FN_NAME(cmf1) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(cmf1) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// mf2 + +template class BOOST_MEM_FN_NAME(mf2) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2)) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2); + } + +public: + + explicit BOOST_MEM_FN_NAME(mf2)(F f): f_(f) {} + + R operator()(T * p, A1 a1, A2 a2) const + { + BOOST_MEM_FN_RETURN (p->*f_)(a1, a2); + } + + template R operator()(U & u, A1 a1, A2 a2) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2); + } + +#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS + + template R operator()(U const & u, A1 a1, A2 a2) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2); + } + +#endif + + R operator()(T & t, A1 a1, A2 a2) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2); + } + + bool operator==(BOOST_MEM_FN_NAME(mf2) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(mf2) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// cmf2 + +template class BOOST_MEM_FN_NAME(cmf2) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2) const) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2); + } + +public: + + explicit BOOST_MEM_FN_NAME(cmf2)(F f): f_(f) {} + + template R operator()(U const & u, A1 a1, A2 a2) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2); + } + + R operator()(T const & t, A1 a1, A2 a2) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2); + } + + bool operator==(BOOST_MEM_FN_NAME(cmf2) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(cmf2) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// mf3 + +template class BOOST_MEM_FN_NAME(mf3) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3)) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3); + } + +public: + + explicit BOOST_MEM_FN_NAME(mf3)(F f): f_(f) {} + + R operator()(T * p, A1 a1, A2 a2, A3 a3) const + { + BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3); + } + + template R operator()(U & u, A1 a1, A2 a2, A3 a3) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3); + } + +#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3); + } + +#endif + + R operator()(T & t, A1 a1, A2 a2, A3 a3) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3); + } + + bool operator==(BOOST_MEM_FN_NAME(mf3) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(mf3) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// cmf3 + +template class BOOST_MEM_FN_NAME(cmf3) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3) const) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3); + } + +public: + + explicit BOOST_MEM_FN_NAME(cmf3)(F f): f_(f) {} + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3); + } + + R operator()(T const & t, A1 a1, A2 a2, A3 a3) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3); + } + + bool operator==(BOOST_MEM_FN_NAME(cmf3) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(cmf3) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// mf4 + +template class BOOST_MEM_FN_NAME(mf4) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4)) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4); + } + +public: + + explicit BOOST_MEM_FN_NAME(mf4)(F f): f_(f) {} + + R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4) const + { + BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4); + } + + template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4); + } + +#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4); + } + +#endif + + R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4); + } + + bool operator==(BOOST_MEM_FN_NAME(mf4) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(mf4) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// cmf4 + +template class BOOST_MEM_FN_NAME(cmf4) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4) const) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4); + } + +public: + + explicit BOOST_MEM_FN_NAME(cmf4)(F f): f_(f) {} + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4); + } + + R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4); + } + + bool operator==(BOOST_MEM_FN_NAME(cmf4) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(cmf4) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// mf5 + +template class BOOST_MEM_FN_NAME(mf5) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5)) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5); + } + +public: + + explicit BOOST_MEM_FN_NAME(mf5)(F f): f_(f) {} + + R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5); + } + + template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5); + } + +#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5); + } + +#endif + + R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5); + } + + bool operator==(BOOST_MEM_FN_NAME(mf5) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(mf5) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// cmf5 + +template class BOOST_MEM_FN_NAME(cmf5) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5) const) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5); + } + +public: + + explicit BOOST_MEM_FN_NAME(cmf5)(F f): f_(f) {} + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5); + } + + R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5); + } + + bool operator==(BOOST_MEM_FN_NAME(cmf5) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(cmf5) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// mf6 + +template class BOOST_MEM_FN_NAME(mf6) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6)) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6); + } + +public: + + explicit BOOST_MEM_FN_NAME(mf6)(F f): f_(f) {} + + R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6); + } + + template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6); + } + +#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6); + } + +#endif + + R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6); + } + + bool operator==(BOOST_MEM_FN_NAME(mf6) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(mf6) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// cmf6 + +template class BOOST_MEM_FN_NAME(cmf6) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6) const) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6); + } + +public: + + explicit BOOST_MEM_FN_NAME(cmf6)(F f): f_(f) {} + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6); + } + + R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6); + } + + bool operator==(BOOST_MEM_FN_NAME(cmf6) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(cmf6) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// mf7 + +template class BOOST_MEM_FN_NAME(mf7) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7)) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7); + } + +public: + + explicit BOOST_MEM_FN_NAME(mf7)(F f): f_(f) {} + + R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6, a7); + } + + template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7); + } + +#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7); + } + +#endif + + R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7); + } + + bool operator==(BOOST_MEM_FN_NAME(mf7) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(mf7) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// cmf7 + +template class BOOST_MEM_FN_NAME(cmf7) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7) const) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7); + } + +public: + + explicit BOOST_MEM_FN_NAME(cmf7)(F f): f_(f) {} + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7); + } + + R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7); + } + + bool operator==(BOOST_MEM_FN_NAME(cmf7) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(cmf7) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// mf8 + +template class BOOST_MEM_FN_NAME(mf8) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8)) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7, b8); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7, b8); + } + +public: + + explicit BOOST_MEM_FN_NAME(mf8)(F f): f_(f) {} + + R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6, a7, a8); + } + + template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7, a8); + } + +#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7, a8); + } + +#endif + + R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7, a8); + } + + bool operator==(BOOST_MEM_FN_NAME(mf8) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(mf8) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// cmf8 + +template class BOOST_MEM_FN_NAME(cmf8) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8) const) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7, b8); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7, b8); + } + +public: + + explicit BOOST_MEM_FN_NAME(cmf8)(F f): f_(f) {} + + R operator()(T const * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6, a7, a8); + } + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7, a8); + } + + R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7, a8); + } + + bool operator==(BOOST_MEM_FN_NAME(cmf8) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(cmf8) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +#undef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS diff --git a/ThirdParty/boost-Subset/boost/bind/mem_fn_vw.hpp b/ThirdParty/boost-Subset/boost/bind/mem_fn_vw.hpp new file mode 100644 index 0000000000..f3fc58db04 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/bind/mem_fn_vw.hpp @@ -0,0 +1,130 @@ +// +// bind/mem_fn_vw.hpp - void return helper wrappers +// +// Do not include this header directly +// +// Copyright (c) 2001 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/bind/mem_fn.html for documentation. +// + +template struct BOOST_MEM_FN_NAME(mf0): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf0) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (); + explicit BOOST_MEM_FN_NAME(mf0)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf0)(f) {} +}; + +template struct BOOST_MEM_FN_NAME(cmf0): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf0) +{ + typedef R (BOOST_MEM_FN_CC T::*F) () const; + explicit BOOST_MEM_FN_NAME(cmf0)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf0)(f) {} +}; + + +template struct BOOST_MEM_FN_NAME(mf1): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf1) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1); + explicit BOOST_MEM_FN_NAME(mf1)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf1)(f) {} +}; + +template struct BOOST_MEM_FN_NAME(cmf1): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf1) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1) const; + explicit BOOST_MEM_FN_NAME(cmf1)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf1)(f) {} +}; + + +template struct BOOST_MEM_FN_NAME(mf2): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf2) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2); + explicit BOOST_MEM_FN_NAME(mf2)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf2)(f) {} +}; + +template struct BOOST_MEM_FN_NAME(cmf2): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf2) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2) const; + explicit BOOST_MEM_FN_NAME(cmf2)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf2)(f) {} +}; + + +template struct BOOST_MEM_FN_NAME(mf3): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf3) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3); + explicit BOOST_MEM_FN_NAME(mf3)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf3)(f) {} +}; + +template struct BOOST_MEM_FN_NAME(cmf3): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf3) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3) const; + explicit BOOST_MEM_FN_NAME(cmf3)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf3)(f) {} +}; + + +template struct BOOST_MEM_FN_NAME(mf4): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf4) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4); + explicit BOOST_MEM_FN_NAME(mf4)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf4)(f) {} +}; + +template struct BOOST_MEM_FN_NAME(cmf4): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf4) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4) const; + explicit BOOST_MEM_FN_NAME(cmf4)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf4)(f) {} +}; + + +template struct BOOST_MEM_FN_NAME(mf5): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf5) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5); + explicit BOOST_MEM_FN_NAME(mf5)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf5)(f) {} +}; + +template struct BOOST_MEM_FN_NAME(cmf5): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf5) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5) const; + explicit BOOST_MEM_FN_NAME(cmf5)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf5)(f) {} +}; + + +template struct BOOST_MEM_FN_NAME(mf6): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf6) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6); + explicit BOOST_MEM_FN_NAME(mf6)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf6)(f) {} +}; + +template struct BOOST_MEM_FN_NAME(cmf6): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf6) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6) const; + explicit BOOST_MEM_FN_NAME(cmf6)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf6)(f) {} +}; + + +template struct BOOST_MEM_FN_NAME(mf7): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf7) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7); + explicit BOOST_MEM_FN_NAME(mf7)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf7)(f) {} +}; + +template struct BOOST_MEM_FN_NAME(cmf7): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf7) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7) const; + explicit BOOST_MEM_FN_NAME(cmf7)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf7)(f) {} +}; + + +template struct BOOST_MEM_FN_NAME(mf8): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf8) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8); + explicit BOOST_MEM_FN_NAME(mf8)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf8)(f) {} +}; + +template struct BOOST_MEM_FN_NAME(cmf8): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf8) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8) const; + explicit BOOST_MEM_FN_NAME(cmf8)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf8)(f) {} +}; + diff --git a/ThirdParty/boost-Subset/boost/bind/placeholders.hpp b/ThirdParty/boost-Subset/boost/bind/placeholders.hpp new file mode 100644 index 0000000000..3b098b14f8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/bind/placeholders.hpp @@ -0,0 +1,69 @@ +#ifndef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED +#define BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// bind/placeholders.hpp - _N definitions +// +// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/bind/bind.html for documentation. +// + +#include +#include + +namespace +{ + +#if defined(__BORLANDC__) || defined(__GNUC__) && (__GNUC__ < 4) + +static inline boost::arg<1> _1() { return boost::arg<1>(); } +static inline boost::arg<2> _2() { return boost::arg<2>(); } +static inline boost::arg<3> _3() { return boost::arg<3>(); } +static inline boost::arg<4> _4() { return boost::arg<4>(); } +static inline boost::arg<5> _5() { return boost::arg<5>(); } +static inline boost::arg<6> _6() { return boost::arg<6>(); } +static inline boost::arg<7> _7() { return boost::arg<7>(); } +static inline boost::arg<8> _8() { return boost::arg<8>(); } +static inline boost::arg<9> _9() { return boost::arg<9>(); } + +#elif defined(BOOST_MSVC) || (defined(__DECCXX_VER) && __DECCXX_VER <= 60590031) || defined(__MWERKS__) || \ + defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ < 2) + +static boost::arg<1> _1; +static boost::arg<2> _2; +static boost::arg<3> _3; +static boost::arg<4> _4; +static boost::arg<5> _5; +static boost::arg<6> _6; +static boost::arg<7> _7; +static boost::arg<8> _8; +static boost::arg<9> _9; + +#else + +boost::arg<1> _1; +boost::arg<2> _2; +boost::arg<3> _3; +boost::arg<4> _4; +boost::arg<5> _5; +boost::arg<6> _6; +boost::arg<7> _7; +boost::arg<8> _8; +boost::arg<9> _9; + +#endif + +} // unnamed namespace + +#endif // #ifndef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/bind/storage.hpp b/ThirdParty/boost-Subset/boost/bind/storage.hpp new file mode 100644 index 0000000000..be490b0f59 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/bind/storage.hpp @@ -0,0 +1,475 @@ +#ifndef BOOST_BIND_STORAGE_HPP_INCLUDED +#define BOOST_BIND_STORAGE_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// bind/storage.hpp +// +// boost/bind.hpp support header, optimized storage +// +// Copyright (c) 2006 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// See http://www.boost.org/libs/bind/bind.html for documentation. +// + +#include +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated +#endif + +namespace boost +{ + +namespace _bi +{ + +// 1 + +template struct storage1 +{ + explicit storage1( A1 a1 ): a1_( a1 ) {} + + template void accept(V & v) const + { + BOOST_BIND_VISIT_EACH(v, a1_, 0); + } + + A1 a1_; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined( __BORLANDC__ ) + +template struct storage1< boost::arg > +{ + explicit storage1( boost::arg ) {} + + template void accept(V &) const { } + + static boost::arg a1_() { return boost::arg(); } +}; + +template struct storage1< boost::arg (*) () > +{ + explicit storage1( boost::arg (*) () ) {} + + template void accept(V &) const { } + + static boost::arg a1_() { return boost::arg(); } +}; + +#endif + +// 2 + +template struct storage2: public storage1 +{ + typedef storage1 inherited; + + storage2( A1 a1, A2 a2 ): storage1( a1 ), a2_( a2 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + BOOST_BIND_VISIT_EACH(v, a2_, 0); + } + + A2 a2_; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template struct storage2< A1, boost::arg >: public storage1 +{ + typedef storage1 inherited; + + storage2( A1 a1, boost::arg ): storage1( a1 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a2_() { return boost::arg(); } +}; + +template struct storage2< A1, boost::arg (*) () >: public storage1 +{ + typedef storage1 inherited; + + storage2( A1 a1, boost::arg (*) () ): storage1( a1 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a2_() { return boost::arg(); } +}; + +#endif + +// 3 + +template struct storage3: public storage2< A1, A2 > +{ + typedef storage2 inherited; + + storage3( A1 a1, A2 a2, A3 a3 ): storage2( a1, a2 ), a3_( a3 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + BOOST_BIND_VISIT_EACH(v, a3_, 0); + } + + A3 a3_; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template struct storage3< A1, A2, boost::arg >: public storage2< A1, A2 > +{ + typedef storage2 inherited; + + storage3( A1 a1, A2 a2, boost::arg ): storage2( a1, a2 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a3_() { return boost::arg(); } +}; + +template struct storage3< A1, A2, boost::arg (*) () >: public storage2< A1, A2 > +{ + typedef storage2 inherited; + + storage3( A1 a1, A2 a2, boost::arg (*) () ): storage2( a1, a2 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a3_() { return boost::arg(); } +}; + +#endif + +// 4 + +template struct storage4: public storage3< A1, A2, A3 > +{ + typedef storage3 inherited; + + storage4( A1 a1, A2 a2, A3 a3, A4 a4 ): storage3( a1, a2, a3 ), a4_( a4 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + BOOST_BIND_VISIT_EACH(v, a4_, 0); + } + + A4 a4_; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template struct storage4< A1, A2, A3, boost::arg >: public storage3< A1, A2, A3 > +{ + typedef storage3 inherited; + + storage4( A1 a1, A2 a2, A3 a3, boost::arg ): storage3( a1, a2, a3 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a4_() { return boost::arg(); } +}; + +template struct storage4< A1, A2, A3, boost::arg (*) () >: public storage3< A1, A2, A3 > +{ + typedef storage3 inherited; + + storage4( A1 a1, A2 a2, A3 a3, boost::arg (*) () ): storage3( a1, a2, a3 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a4_() { return boost::arg(); } +}; + +#endif + +// 5 + +template struct storage5: public storage4< A1, A2, A3, A4 > +{ + typedef storage4 inherited; + + storage5( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5 ): storage4( a1, a2, a3, a4 ), a5_( a5 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + BOOST_BIND_VISIT_EACH(v, a5_, 0); + } + + A5 a5_; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template struct storage5< A1, A2, A3, A4, boost::arg >: public storage4< A1, A2, A3, A4 > +{ + typedef storage4 inherited; + + storage5( A1 a1, A2 a2, A3 a3, A4 a4, boost::arg ): storage4( a1, a2, a3, a4 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a5_() { return boost::arg(); } +}; + +template struct storage5< A1, A2, A3, A4, boost::arg (*) () >: public storage4< A1, A2, A3, A4 > +{ + typedef storage4 inherited; + + storage5( A1 a1, A2 a2, A3 a3, A4 a4, boost::arg (*) () ): storage4( a1, a2, a3, a4 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a5_() { return boost::arg(); } +}; + +#endif + +// 6 + +template struct storage6: public storage5< A1, A2, A3, A4, A5 > +{ + typedef storage5 inherited; + + storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6 ): storage5( a1, a2, a3, a4, a5 ), a6_( a6 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + BOOST_BIND_VISIT_EACH(v, a6_, 0); + } + + A6 a6_; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template struct storage6< A1, A2, A3, A4, A5, boost::arg >: public storage5< A1, A2, A3, A4, A5 > +{ + typedef storage5 inherited; + + storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, boost::arg ): storage5( a1, a2, a3, a4, a5 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a6_() { return boost::arg(); } +}; + +template struct storage6< A1, A2, A3, A4, A5, boost::arg (*) () >: public storage5< A1, A2, A3, A4, A5 > +{ + typedef storage5 inherited; + + storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, boost::arg (*) () ): storage5( a1, a2, a3, a4, a5 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a6_() { return boost::arg(); } +}; + +#endif + +// 7 + +template struct storage7: public storage6< A1, A2, A3, A4, A5, A6 > +{ + typedef storage6 inherited; + + storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7 ): storage6( a1, a2, a3, a4, a5, a6 ), a7_( a7 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + BOOST_BIND_VISIT_EACH(v, a7_, 0); + } + + A7 a7_; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template struct storage7< A1, A2, A3, A4, A5, A6, boost::arg >: public storage6< A1, A2, A3, A4, A5, A6 > +{ + typedef storage6 inherited; + + storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, boost::arg ): storage6( a1, a2, a3, a4, a5, a6 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a7_() { return boost::arg(); } +}; + +template struct storage7< A1, A2, A3, A4, A5, A6, boost::arg (*) () >: public storage6< A1, A2, A3, A4, A5, A6 > +{ + typedef storage6 inherited; + + storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, boost::arg (*) () ): storage6( a1, a2, a3, a4, a5, a6 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a7_() { return boost::arg(); } +}; + +#endif + +// 8 + +template struct storage8: public storage7< A1, A2, A3, A4, A5, A6, A7 > +{ + typedef storage7 inherited; + + storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8 ): storage7( a1, a2, a3, a4, a5, a6, a7 ), a8_( a8 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + BOOST_BIND_VISIT_EACH(v, a8_, 0); + } + + A8 a8_; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template struct storage8< A1, A2, A3, A4, A5, A6, A7, boost::arg >: public storage7< A1, A2, A3, A4, A5, A6, A7 > +{ + typedef storage7 inherited; + + storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, boost::arg ): storage7( a1, a2, a3, a4, a5, a6, a7 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a8_() { return boost::arg(); } +}; + +template struct storage8< A1, A2, A3, A4, A5, A6, A7, boost::arg (*) () >: public storage7< A1, A2, A3, A4, A5, A6, A7 > +{ + typedef storage7 inherited; + + storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, boost::arg (*) () ): storage7( a1, a2, a3, a4, a5, a6, a7 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a8_() { return boost::arg(); } +}; + +#endif + +// 9 + +template struct storage9: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 > +{ + typedef storage8 inherited; + + storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9 ): storage8( a1, a2, a3, a4, a5, a6, a7, a8 ), a9_( a9 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + BOOST_BIND_VISIT_EACH(v, a9_, 0); + } + + A9 a9_; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template struct storage9< A1, A2, A3, A4, A5, A6, A7, A8, boost::arg >: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 > +{ + typedef storage8 inherited; + + storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, boost::arg ): storage8( a1, a2, a3, a4, a5, a6, a7, a8 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a9_() { return boost::arg(); } +}; + +template struct storage9< A1, A2, A3, A4, A5, A6, A7, A8, boost::arg (*) () >: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 > +{ + typedef storage8 inherited; + + storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, boost::arg (*) () ): storage8( a1, a2, a3, a4, a5, a6, a7, a8 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a9_() { return boost::arg(); } +}; + +#endif + +} // namespace _bi + +} // namespace boost + +#ifdef BOOST_MSVC +# pragma warning(default: 4512) // assignment operator could not be generated +# pragma warning(pop) +#endif + +#endif // #ifndef BOOST_BIND_STORAGE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/call_traits.hpp b/ThirdParty/boost-Subset/boost/call_traits.hpp new file mode 100644 index 0000000000..2c1328e94d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/call_traits.hpp @@ -0,0 +1,20 @@ +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/utility for most recent version including documentation. + +// See boost/detail/call_traits.hpp +// for full copyright notices. + +#ifndef BOOST_CALL_TRAITS_HPP +#define BOOST_CALL_TRAITS_HPP + +#ifndef BOOST_CONFIG_HPP +#include +#endif + +#include + +#endif // BOOST_CALL_TRAITS_HPP diff --git a/ThirdParty/boost-Subset/boost/cerrno.hpp b/ThirdParty/boost-Subset/boost/cerrno.hpp new file mode 100644 index 0000000000..6f2669846d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/cerrno.hpp @@ -0,0 +1,331 @@ +// Boost cerrno.hpp header -------------------------------------------------// + +// Copyright Beman Dawes 2005. +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/system + +#ifndef BOOST_CERRNO_HPP +#define BOOST_CERRNO_HPP + +#include + +// supply errno values likely to be missing, particularly on Windows + +#ifndef EAFNOSUPPORT +#define EAFNOSUPPORT 9901 +#endif + +#ifndef EADDRINUSE +#define EADDRINUSE 9902 +#endif + +#ifndef EADDRNOTAVAIL +#define EADDRNOTAVAIL 9903 +#endif + +#ifndef EISCONN +#define EISCONN 9904 +#endif + +#ifndef EBADMSG +#define EBADMSG 9905 +#endif + +#ifndef ECONNABORTED +#define ECONNABORTED 9906 +#endif + +#ifndef EALREADY +#define EALREADY 9907 +#endif + +#ifndef ECONNREFUSED +#define ECONNREFUSED 9908 +#endif + +#ifndef ECONNRESET +#define ECONNRESET 9909 +#endif + +#ifndef EDESTADDRREQ +#define EDESTADDRREQ 9910 +#endif + +#ifndef EHOSTUNREACH +#define EHOSTUNREACH 9911 +#endif + +#ifndef EIDRM +#define EIDRM 9912 +#endif + +#ifndef EMSGSIZE +#define EMSGSIZE 9913 +#endif + +#ifndef ENETDOWN +#define ENETDOWN 9914 +#endif + +#ifndef ENETRESET +#define ENETRESET 9915 +#endif + +#ifndef ENETUNREACH +#define ENETUNREACH 9916 +#endif + +#ifndef ENOBUFS +#define ENOBUFS 9917 +#endif + +#ifndef ENOLINK +#define ENOLINK 9918 +#endif + +#ifndef ENODATA +#define ENODATA 9919 +#endif + +#ifndef ENOMSG +#define ENOMSG 9920 +#endif + +#ifndef ENOPROTOOPT +#define ENOPROTOOPT 9921 +#endif + +#ifndef ENOSR +#define ENOSR 9922 +#endif + +#ifndef ENOTSOCK +#define ENOTSOCK 9923 +#endif + +#ifndef ENOSTR +#define ENOSTR 9924 +#endif + +#ifndef ENOTCONN +#define ENOTCONN 9925 +#endif + +#ifndef ENOTSUP +#define ENOTSUP 9926 +#endif + +#ifndef ECANCELED +#define ECANCELED 9927 +#endif + +#ifndef EINPROGRESS +#define EINPROGRESS 9928 +#endif + +#ifndef EOPNOTSUPP +#define EOPNOTSUPP 9929 +#endif + +#ifndef EWOULDBLOCK +#define EWOULDBLOCK 9930 +#endif + +#ifndef EOWNERDEAD +#define EOWNERDEAD 9931 +#endif + +#ifndef EPROTO +#define EPROTO 9932 +#endif + +#ifndef EPROTONOSUPPORT +#define EPROTONOSUPPORT 9933 +#endif + +#ifndef ENOTRECOVERABLE +#define ENOTRECOVERABLE 9934 +#endif + +#ifndef ETIME +#define ETIME 9935 +#endif + +#ifndef ETXTBSY +#define ETXTBSY 9936 +#endif + +#ifndef ETIMEDOUT +#define ETIMEDOUT 9938 +#endif + +#ifndef ELOOP +#define ELOOP 9939 +#endif + +#ifndef EOVERFLOW +#define EOVERFLOW 9940 +#endif + +#ifndef EPROTOTYPE +#define EPROTOTYPE 9941 +#endif + +#ifndef ENOSYS +#define ENOSYS 9942 +#endif + +#ifndef EINVAL +#define EINVAL 9943 +#endif + +#ifndef ERANGE +#define ERANGE 9944 +#endif + +#ifndef EILSEQ +#define EILSEQ 9945 +#endif + +// Windows Mobile doesn't appear to define these: + +#ifndef E2BIG +#define E2BIG 9946 +#endif + +#ifndef EDOM +#define EDOM 9947 +#endif + +#ifndef EFAULT +#define EFAULT 9948 +#endif + +#ifndef EBADF +#define EBADF 9949 +#endif + +#ifndef EPIPE +#define EPIPE 9950 +#endif + +#ifndef EXDEV +#define EXDEV 9951 +#endif + +#ifndef EBUSY +#define EBUSY 9952 +#endif + +#ifndef ENOTEMPTY +#define ENOTEMPTY 9953 +#endif + +#ifndef ENOEXEC +#define ENOEXEC 9954 +#endif + +#ifndef EEXIST +#define EEXIST 9955 +#endif + +#ifndef EFBIG +#define EFBIG 9956 +#endif + +#ifndef ENAMETOOLONG +#define ENAMETOOLONG 9957 +#endif + +#ifndef ENOTTY +#define ENOTTY 9958 +#endif + +#ifndef EINTR +#define EINTR 9959 +#endif + +#ifndef ESPIPE +#define ESPIPE 9960 +#endif + +#ifndef EIO +#define EIO 9961 +#endif + +#ifndef EISDIR +#define EISDIR 9962 +#endif + +#ifndef ECHILD +#define ECHILD 9963 +#endif + +#ifndef ENOLCK +#define ENOLCK 9964 +#endif + +#ifndef ENOSPC +#define ENOSPC 9965 +#endif + +#ifndef ENXIO +#define ENXIO 9966 +#endif + +#ifndef ENODEV +#define ENODEV 9967 +#endif + +#ifndef ENOENT +#define ENOENT 9968 +#endif + +#ifndef ESRCH +#define ESRCH 9969 +#endif + +#ifndef ENOTDIR +#define ENOTDIR 9970 +#endif + +#ifndef ENOMEM +#define ENOMEM 9971 +#endif + +#ifndef EPERM +#define EPERM 9972 +#endif + +#ifndef EACCES +#define EACCES 9973 +#endif + +#ifndef EROFS +#define EROFS 9974 +#endif + +#ifndef EDEADLK +#define EDEADLK 9975 +#endif + +#ifndef EAGAIN +#define EAGAIN 9976 +#endif + +#ifndef ENFILE +#define ENFILE 9977 +#endif + +#ifndef EMFILE +#define EMFILE 9978 +#endif + +#ifndef EMLINK +#define EMLINK 9979 +#endif + +#endif // include guard diff --git a/ThirdParty/boost-Subset/boost/checked_delete.hpp b/ThirdParty/boost-Subset/boost/checked_delete.hpp new file mode 100644 index 0000000000..fb71c789c8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/checked_delete.hpp @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2014 Glen Fernandes + * + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_CHECKED_DELETE_HPP +#define BOOST_CHECKED_DELETE_HPP + +// The header file at this path is deprecated; +// use boost/core/checked_delete.hpp instead. + +#include + +#endif diff --git a/ThirdParty/boost-Subset/boost/chrono/chrono.hpp b/ThirdParty/boost-Subset/boost/chrono/chrono.hpp new file mode 100644 index 0000000000..ebc29d8d47 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/chrono/chrono.hpp @@ -0,0 +1,15 @@ +// chrono.hpp --------------------------------------------------------------// + +// Copyright 2009-2011 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#ifndef BOOST_CHRONO_CHRONO_HPP +#define BOOST_CHRONO_CHRONO_HPP + +#include +#include +#include + +#endif // BOOST_CHRONO_CHRONO_HPP diff --git a/ThirdParty/boost-Subset/boost/chrono/clock_string.hpp b/ThirdParty/boost-Subset/boost/chrono/clock_string.hpp new file mode 100644 index 0000000000..af025f27e0 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/chrono/clock_string.hpp @@ -0,0 +1,25 @@ +// +// (C) Copyright 2010-2011 Vicente J. Botet Escriba +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// + +#ifndef BOOST_CHRONO_CLOCK_STRING_HPP +#define BOOST_CHRONO_CLOCK_STRING_HPP + +#include + +namespace boost +{ + namespace chrono + { + + template + struct clock_string; + + } // chrono + +} // boost + +#endif // BOOST_CHRONO_CLOCK_STRING_HPP diff --git a/ThirdParty/boost-Subset/boost/chrono/config.hpp b/ThirdParty/boost-Subset/boost/chrono/config.hpp new file mode 100644 index 0000000000..1045ba3a79 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/chrono/config.hpp @@ -0,0 +1,216 @@ +// boost/chrono/config.hpp -------------------------------------------------// + +// Copyright Beman Dawes 2003, 2006, 2008 +// Copyright 2009-2011 Vicente J. Botet Escriba +// Copyright (c) Microsoft Corporation 2014 + +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/chrono for documentation. + +#ifndef BOOST_CHRONO_CONFIG_HPP +#define BOOST_CHRONO_CONFIG_HPP + +#include +#include + +#if !defined BOOST_CHRONO_VERSION +#define BOOST_CHRONO_VERSION 1 +#else +#if BOOST_CHRONO_VERSION!=1 && BOOST_CHRONO_VERSION!=2 +#error "BOOST_CHRONO_VERSION must be 1 or 2" +#endif +#endif + +#if defined(BOOST_CHRONO_SOURCE) && !defined(BOOST_USE_WINDOWS_H) +#define BOOST_USE_WINDOWS_H +#endif + +#if ! defined BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT \ + && ! defined BOOST_CHRONO_DONT_PROVIDE_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT + +# define BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT + +#endif + +// BOOST_CHRONO_POSIX_API, BOOST_CHRONO_MAC_API, or BOOST_CHRONO_WINDOWS_API +// can be defined by the user to specify which API should be used + +#if defined(BOOST_CHRONO_WINDOWS_API) +# warning Boost.Chrono will use the Windows API +#elif defined(BOOST_CHRONO_MAC_API) +# warning Boost.Chrono will use the Mac API +#elif defined(BOOST_CHRONO_POSIX_API) +# warning Boost.Chrono will use the POSIX API +#endif + +# if defined( BOOST_CHRONO_WINDOWS_API ) && defined( BOOST_CHRONO_POSIX_API ) +# error both BOOST_CHRONO_WINDOWS_API and BOOST_CHRONO_POSIX_API are defined +# elif defined( BOOST_CHRONO_WINDOWS_API ) && defined( BOOST_CHRONO_MAC_API ) +# error both BOOST_CHRONO_WINDOWS_API and BOOST_CHRONO_MAC_API are defined +# elif defined( BOOST_CHRONO_MAC_API ) && defined( BOOST_CHRONO_POSIX_API ) +# error both BOOST_CHRONO_MAC_API and BOOST_CHRONO_POSIX_API are defined +# elif !defined( BOOST_CHRONO_WINDOWS_API ) && !defined( BOOST_CHRONO_MAC_API ) && !defined( BOOST_CHRONO_POSIX_API ) +# if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) +# define BOOST_CHRONO_WINDOWS_API +# elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) +# define BOOST_CHRONO_MAC_API +# else +# define BOOST_CHRONO_POSIX_API +# endif +# endif + +# if defined( BOOST_CHRONO_WINDOWS_API ) +# ifndef UNDER_CE +# define BOOST_CHRONO_HAS_PROCESS_CLOCKS +# endif +# define BOOST_CHRONO_HAS_CLOCK_STEADY +# if BOOST_PLAT_WINDOWS_DESKTOP +# define BOOST_CHRONO_HAS_THREAD_CLOCK +# endif +# define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true +# endif + +# if defined( BOOST_CHRONO_MAC_API ) +# define BOOST_CHRONO_HAS_PROCESS_CLOCKS +# define BOOST_CHRONO_HAS_CLOCK_STEADY +# define BOOST_CHRONO_HAS_THREAD_CLOCK +# define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true +# endif + +# if defined( BOOST_CHRONO_POSIX_API ) +# define BOOST_CHRONO_HAS_PROCESS_CLOCKS +# include //to check for CLOCK_REALTIME and CLOCK_MONOTONIC and _POSIX_THREAD_CPUTIME +# if defined(CLOCK_MONOTONIC) +# define BOOST_CHRONO_HAS_CLOCK_STEADY +# endif +# if defined(_POSIX_THREAD_CPUTIME) && !defined(BOOST_DISABLE_THREADS) +# define BOOST_CHRONO_HAS_THREAD_CLOCK +# define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true +# endif +# if defined(CLOCK_THREAD_CPUTIME_ID) && !defined(BOOST_DISABLE_THREADS) +# define BOOST_CHRONO_HAS_THREAD_CLOCK +# define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true +# endif +# if defined(sun) || defined(__sun) +# undef BOOST_CHRONO_HAS_THREAD_CLOCK +# undef BOOST_CHRONO_THREAD_CLOCK_IS_STEADY +# endif +# if (defined(__HP_aCC) || defined(__GNUC__)) && defined(__hpux) +# undef BOOST_CHRONO_HAS_THREAD_CLOCK +# undef BOOST_CHRONO_THREAD_CLOCK_IS_STEADY +# endif +# if defined(__VXWORKS__) +# undef BOOST_CHRONO_HAS_PROCESS_CLOCKS +# endif +# endif + +#if defined(BOOST_CHRONO_THREAD_DISABLED) && defined(BOOST_CHRONO_HAS_THREAD_CLOCK) +#undef BOOST_CHRONO_HAS_THREAD_CLOCK +#undef BOOST_CHRONO_THREAD_CLOCK_IS_STEADY +#endif + +// unicode support ------------------------------// + +#if defined(BOOST_NO_CXX11_UNICODE_LITERALS) || defined(BOOST_NO_CXX11_CHAR16_T) || defined(BOOST_NO_CXX11_CHAR32_T) +//~ #define BOOST_CHRONO_HAS_UNICODE_SUPPORT +#else +#define BOOST_CHRONO_HAS_UNICODE_SUPPORT 1 +#endif + +#ifndef BOOST_CHRONO_LIB_CONSTEXPR +#if defined( BOOST_NO_CXX11_NUMERIC_LIMITS ) +#define BOOST_CHRONO_LIB_CONSTEXPR +#elif defined(_LIBCPP_VERSION) && !defined(_LIBCPP_CONSTEXPR) + #define BOOST_CHRONO_LIB_CONSTEXPR +#else + #define BOOST_CHRONO_LIB_CONSTEXPR BOOST_CONSTEXPR +#endif +#endif + +#if defined( BOOST_NO_CXX11_NUMERIC_LIMITS ) +# define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW throw() +#else +#ifdef BOOST_NO_CXX11_NOEXCEPT +# define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW throw() +#else +# define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW noexcept +#endif +#endif + +#if defined BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING \ + && defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING +#error "BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING && BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING defined" +#endif + +#if defined BOOST_CHRONO_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 \ + && defined BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 +#error "BOOST_CHRONO_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 && BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 defined" +#endif + +#if ! defined BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING \ + && ! defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING +#define BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING +#endif + +#if (BOOST_CHRONO_VERSION == 2) +#if ! defined BOOST_CHRONO_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 \ + && ! defined BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 +#define BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 +#endif +#endif + +#ifdef BOOST_CHRONO_HEADER_ONLY +#define BOOST_CHRONO_INLINE inline +#define BOOST_CHRONO_STATIC inline +#define BOOST_CHRONO_DECL + +#else +#define BOOST_CHRONO_INLINE +#define BOOST_CHRONO_STATIC static + +// enable dynamic linking on Windows ---------------------------------------// + +// we need to import/export our code only if the user has specifically +// asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost +// libraries to be dynamically linked, or BOOST_CHRONO_DYN_LINK +// if they want just this one to be dynamically liked: +#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CHRONO_DYN_LINK) +// export if this is our own source, otherwise import: +#ifdef BOOST_CHRONO_SOURCE +# define BOOST_CHRONO_DECL BOOST_SYMBOL_EXPORT +#else +# define BOOST_CHRONO_DECL BOOST_SYMBOL_IMPORT +#endif // BOOST_CHRONO_SOURCE +#endif // DYN_LINK +// +// if BOOST_CHRONO_DECL isn't defined yet define it now: +#ifndef BOOST_CHRONO_DECL +#define BOOST_CHRONO_DECL +#endif + + + +// enable automatic library variant selection ------------------------------// + +#if !defined(BOOST_CHRONO_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_CHRONO_NO_LIB) +// +// Set the name of our library; this will get undef'ed by auto_link.hpp +// once it's done with it: +// +#define BOOST_LIB_NAME boost_chrono +// +// If we're importing code from a dll, then tell auto_link.hpp about it: +// +#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CHRONO_DYN_LINK) +# define BOOST_DYN_LINK +#endif +// +// And include the header that does the work: +// +#include +#endif // auto-linking disabled +#endif // BOOST_CHRONO_HEADER_ONLY +#endif // BOOST_CHRONO_CONFIG_HPP + diff --git a/ThirdParty/boost-Subset/boost/chrono/detail/inlined/chrono.hpp b/ThirdParty/boost-Subset/boost/chrono/detail/inlined/chrono.hpp new file mode 100644 index 0000000000..027884365e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/chrono/detail/inlined/chrono.hpp @@ -0,0 +1,44 @@ +// chrono.cpp --------------------------------------------------------------// + +// Copyright Beman Dawes 2008 +// Copyright Vicente J. Botet Escriba 2009 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#ifndef BOOST_CHRONO_DETAIL_INLINED_CHRONO_HPP +#define BOOST_CHRONO_DETAIL_INLINED_CHRONO_HPP + +#include +#include +#include +#include +#include + +//----------------------------------------------------------------------------// +// // +// Platform-specific Implementations // +// // +//----------------------------------------------------------------------------// + +//----------------------------------------------------------------------------// +// Windows // +//----------------------------------------------------------------------------// +#if defined(BOOST_CHRONO_WINDOWS_API) +#include + +//----------------------------------------------------------------------------// +// Mac // +//----------------------------------------------------------------------------// +#elif defined(BOOST_CHRONO_MAC_API) +#include + +//----------------------------------------------------------------------------// +// POSIX // +//----------------------------------------------------------------------------// +#elif defined(BOOST_CHRONO_POSIX_API) +#include + +#endif // POSIX + +#endif diff --git a/ThirdParty/boost-Subset/boost/chrono/detail/inlined/mac/chrono.hpp b/ThirdParty/boost-Subset/boost/chrono/detail/inlined/mac/chrono.hpp new file mode 100644 index 0000000000..bf20ae924b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/chrono/detail/inlined/mac/chrono.hpp @@ -0,0 +1,241 @@ +// mac/chrono.cpp --------------------------------------------------------------// + +// Copyright Beman Dawes 2008 +// Copyright 2009-2010 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +//----------------------------------------------------------------------------// +// Mac // +//----------------------------------------------------------------------------// + +#include //for gettimeofday and timeval +#include // mach_absolute_time, mach_timebase_info_data_t + +namespace boost +{ +namespace chrono +{ + +// system_clock + +// gettimeofday is the most precise "system time" available on this platform. +// It returns the number of microseconds since New Years 1970 in a struct called timeval +// which has a field for seconds and a field for microseconds. +// Fill in the timeval and then convert that to the time_point +system_clock::time_point +system_clock::now() BOOST_NOEXCEPT +{ + timeval tv; + gettimeofday(&tv, 0); + return time_point(seconds(tv.tv_sec) + microseconds(tv.tv_usec)); +} + +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING +system_clock::time_point +system_clock::now(system::error_code & ec) +{ + timeval tv; + gettimeofday(&tv, 0); + if (!BOOST_CHRONO_IS_THROWS(ec)) + { + ec.clear(); + } + return time_point(seconds(tv.tv_sec) + microseconds(tv.tv_usec)); +} +#endif +// Take advantage of the fact that on this platform time_t is nothing but +// an integral count of seconds since New Years 1970 (same epoch as timeval). +// Just get the duration out of the time_point and truncate it to seconds. +time_t +system_clock::to_time_t(const time_point& t) BOOST_NOEXCEPT +{ + return time_t(duration_cast(t.time_since_epoch()).count()); +} + +// Just turn the time_t into a count of seconds and construct a time_point with it. +system_clock::time_point +system_clock::from_time_t(time_t t) BOOST_NOEXCEPT +{ + return system_clock::time_point(seconds(t)); +} + +namespace chrono_detail +{ + +// steady_clock + +// Note, in this implementation steady_clock and high_resolution_clock +// are the same clock. They are both based on mach_absolute_time(). +// mach_absolute_time() * MachInfo.numer / MachInfo.denom is the number of +// nanoseconds since the computer booted up. MachInfo.numer and MachInfo.denom +// are run time constants supplied by the OS. This clock has no relationship +// to the Gregorian calendar. It's main use is as a high resolution timer. + +// MachInfo.numer / MachInfo.denom is often 1 on the latest equipment. Specialize +// for that case as an optimization. +BOOST_CHRONO_STATIC +steady_clock::rep +steady_simplified() +{ + return mach_absolute_time(); +} + +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING +BOOST_CHRONO_STATIC +steady_clock::rep +steady_simplified_ec(system::error_code & ec) +{ + if (!BOOST_CHRONO_IS_THROWS(ec)) + { + ec.clear(); + } + return mach_absolute_time(); +} +#endif + +BOOST_CHRONO_STATIC +double +compute_steady_factor(kern_return_t& err) +{ + mach_timebase_info_data_t MachInfo; + err = mach_timebase_info(&MachInfo); + if ( err != 0 ) { + return 0; + } + return static_cast(MachInfo.numer) / MachInfo.denom; +} + +BOOST_CHRONO_STATIC +steady_clock::rep +steady_full() +{ + static kern_return_t err; + static const double factor = chrono_detail::compute_steady_factor(err); + if (err != 0) + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + } + return static_cast(mach_absolute_time() * factor); +} + +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING +BOOST_CHRONO_STATIC +steady_clock::rep +steady_full_ec(system::error_code & ec) +{ + static kern_return_t err; + static const double factor = chrono_detail::compute_steady_factor(err); + if (err != 0) + { + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception( + system::system_error( + err, + BOOST_CHRONO_SYSTEM_CATEGORY, + "chrono::steady_clock" )); + } + else + { + ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY ); + return steady_clock::rep(); + } + } + if (!BOOST_CHRONO_IS_THROWS(ec)) + { + ec.clear(); + } + return static_cast(mach_absolute_time() * factor); +} +#endif + +typedef steady_clock::rep (*FP)(); +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING +typedef steady_clock::rep (*FP_ec)(system::error_code &); +#endif + +BOOST_CHRONO_STATIC +FP +init_steady_clock(kern_return_t & err) +{ + mach_timebase_info_data_t MachInfo; + err = mach_timebase_info(&MachInfo); + if ( err != 0 ) + { + return 0; + } + + if (MachInfo.numer == MachInfo.denom) + { + return &chrono_detail::steady_simplified; + } + return &chrono_detail::steady_full; +} + +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING +BOOST_CHRONO_STATIC +FP_ec +init_steady_clock_ec(kern_return_t & err) +{ + mach_timebase_info_data_t MachInfo; + err = mach_timebase_info(&MachInfo); + if ( err != 0 ) + { + return 0; + } + + if (MachInfo.numer == MachInfo.denom) + { + return &chrono_detail::steady_simplified_ec; + } + return &chrono_detail::steady_full_ec; +} +#endif +} + +steady_clock::time_point +steady_clock::now() BOOST_NOEXCEPT +{ + static kern_return_t err; + static chrono_detail::FP fp = chrono_detail::init_steady_clock(err); + if ( err != 0 ) + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + } + return time_point(duration(fp())); +} + +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING +steady_clock::time_point +steady_clock::now(system::error_code & ec) +{ + static kern_return_t err; + static chrono_detail::FP_ec fp = chrono_detail::init_steady_clock_ec(err); + if ( err != 0 ) + { + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception( + system::system_error( + err, + BOOST_CHRONO_SYSTEM_CATEGORY, + "chrono::steady_clock" )); + } + else + { + ec.assign( err, BOOST_CHRONO_SYSTEM_CATEGORY ); + return time_point(); + } + } + if (!BOOST_CHRONO_IS_THROWS(ec)) + { + ec.clear(); + } + return time_point(duration(fp(ec))); +} +#endif +} // namespace chrono +} // namespace boost diff --git a/ThirdParty/boost-Subset/boost/chrono/detail/inlined/mac/process_cpu_clocks.hpp b/ThirdParty/boost-Subset/boost/chrono/detail/inlined/mac/process_cpu_clocks.hpp new file mode 100644 index 0000000000..6d09e2cb3a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/chrono/detail/inlined/mac/process_cpu_clocks.hpp @@ -0,0 +1,356 @@ +// boost process_cpu_clocks.cpp -----------------------------------------------------------// + +// Copyright Beman Dawes 1994, 2006, 2008 +// Copyright Vicente J. Botet Escriba 2009 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// See http://www.boost.org/libs/chrono for documentation. + +//--------------------------------------------------------------------------------------// + +#include +#include +#include + +#include //for gettimeofday and timeval +#include //for times +# include + +namespace boost +{ + namespace chrono + { + namespace chrono_detail + { + + inline long tick_factor() // multiplier to convert ticks + // to nanoseconds; -1 if unknown + { + static long factor = 0; + if (!factor) + { + if ((factor = ::sysconf(_SC_CLK_TCK)) <= 0) + factor = -1; + else + { + BOOST_ASSERT(factor <= 1000000000l); // doesn't handle large ticks + factor = 1000000000l / factor; // compute factor + if (!factor) + factor = -1; + } + } + return factor; + } + } + + + process_real_cpu_clock::time_point process_real_cpu_clock::now() BOOST_NOEXCEPT + { +#if 1 + tms tm; + clock_t c = ::times(&tm); + if (c == clock_t(-1)) // error + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + } else + { + long factor = chrono_detail::tick_factor(); + if (factor != -1) + { + return time_point(nanoseconds(c * factor)); + } else + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + } + } + return time_point(); +#else + clock_t c = ::clock(); + if (c == clock_t(-1)) // error + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + } else + { + long factor = chrono_detail::tick_factor(); + if (factor != -1) + { + return time_point(nanoseconds(c * factor)); + } else + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + } + } + return time_point(); +#endif + } + +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING + process_real_cpu_clock::time_point process_real_cpu_clock::now(system::error_code & ec) + { + +#if 1 + tms tm; + clock_t c = ::times(&tm); + if (c == clock_t(-1)) // error + { + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_real_cpu_clock")); + } else + { + ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY); + return time_point(); + } + } else + { + long factor = chrono_detail::tick_factor(); + if (factor != -1) + { + if (!BOOST_CHRONO_IS_THROWS(ec)) + { + ec.clear(); + } + return time_point(nanoseconds(c * factor)); + } else + { + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_real_cpu_clock")); + } else + { + ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY); + return time_point(); + } + } + } +#else + clock_t c = ::clock(); + if (c == clock_t(-1)) // error + { + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_real_cpu_clock")); + } else + { + ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY); + return time_point(); + } + } else + { + long factor = chrono_detail::tick_factor(); + if (factor != -1) + { + if (!BOOST_CHRONO_IS_THROWS(ec)) + { + ec.clear(); + } + return time_point(nanoseconds(c * factor)); + } else + { + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_real_cpu_clock")); + } else + { + ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY); + return time_point(); + } + } + } +#endif + + } +#endif + +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING + process_user_cpu_clock::time_point process_user_cpu_clock::now(system::error_code & ec) + { + tms tm; + clock_t c = ::times(&tm); + if (c == clock_t(-1)) // error + { + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_user_cpu_clock")); + } else + { + ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY); + return time_point(); + } + } else + { + long factor = chrono_detail::tick_factor(); + if (factor != -1) + { + if (!BOOST_CHRONO_IS_THROWS(ec)) + { + ec.clear(); + } + return time_point(nanoseconds((tm.tms_utime + tm.tms_cutime) * factor)); + } else + { + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_user_cpu_clock")); + } else + { + ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY); + return time_point(); + } + } + } + } +#endif + + process_user_cpu_clock::time_point process_user_cpu_clock::now() BOOST_NOEXCEPT + { + tms tm; + clock_t c = ::times(&tm); + if (c == clock_t(-1)) // error + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + } else + { + long factor = chrono_detail::tick_factor(); + if (factor != -1) + { + return time_point(nanoseconds((tm.tms_utime + tm.tms_cutime) + * factor)); + } else + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + } + } + return time_point(); + } + process_system_cpu_clock::time_point process_system_cpu_clock::now() BOOST_NOEXCEPT + { + tms tm; + clock_t c = ::times(&tm); + if (c == clock_t(-1)) // error + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + } else + { + long factor = chrono_detail::tick_factor(); + if (factor != -1) + { + return time_point(nanoseconds((tm.tms_stime + tm.tms_cstime) + * factor)); + } else + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + } + } + return time_point(); + } + +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING + process_system_cpu_clock::time_point process_system_cpu_clock::now(system::error_code & ec) + { + tms tm; + clock_t c = ::times(&tm); + if (c == clock_t(-1)) // error + { + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_system_cpu_clock")); + } else + { + ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY); + return time_point(); + } + } else + { + long factor = chrono_detail::tick_factor(); + if (factor != -1) + { + if (!BOOST_CHRONO_IS_THROWS(ec)) + { + ec.clear(); + } + return time_point(nanoseconds((tm.tms_stime + tm.tms_cstime) * factor)); + } else + { + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_system_cpu_clock")); + } else + { + ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY); + return time_point(); + } + } + } + } +#endif + + process_cpu_clock::time_point process_cpu_clock::now() BOOST_NOEXCEPT + { + tms tm; + clock_t c = ::times(&tm); + if (c == clock_t(-1)) // error + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + } else + { + long factor = chrono_detail::tick_factor(); + if (factor != -1) + { + time_point::rep + r(c * factor, (tm.tms_utime + tm.tms_cutime) * factor, (tm.tms_stime + + tm.tms_cstime) * factor); + return time_point(duration(r)); + } else + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + } + } + return time_point(); + } + +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING + process_cpu_clock::time_point process_cpu_clock::now(system::error_code & ec) + { + + tms tm; + clock_t c = ::times(&tm); + if (c == clock_t(-1)) // error + { + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_clock")); + } else + { + ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY); + return time_point(); + } + } else + { + long factor = chrono_detail::tick_factor(); + if (factor != -1) + { + time_point::rep + r(c * factor, (tm.tms_utime + tm.tms_cutime) * factor, (tm.tms_stime + + tm.tms_cstime) * factor); + return time_point(duration(r)); + } else + { + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_clock")); + } else + { + ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY); + return time_point(); + } + } + } + + } +#endif + + } +} diff --git a/ThirdParty/boost-Subset/boost/chrono/detail/inlined/mac/thread_clock.hpp b/ThirdParty/boost-Subset/boost/chrono/detail/inlined/mac/thread_clock.hpp new file mode 100644 index 0000000000..1a4406b83d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/chrono/detail/inlined/mac/thread_clock.hpp @@ -0,0 +1,91 @@ +// boost thread_clock.cpp -----------------------------------------------------------// + +// Copyright Beman Dawes 1994, 2006, 2008 +// Copyright Vicente J. Botet Escriba 2009-2011 +// Copyright Christopher Brown 2013 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// See http://www.boost.org/libs/chrono for documentation. + +//--------------------------------------------------------------------------------------// + +#include +#include +#include + +# include +# include + +namespace boost { namespace chrono { + + thread_clock::time_point thread_clock::now( ) BOOST_NOEXCEPT + { + // get the thread port (borrowing pthread's reference) + mach_port_t port = pthread_mach_thread_np(pthread_self()); + + // get the thread info + thread_basic_info_data_t info; + mach_msg_type_number_t count = THREAD_BASIC_INFO_COUNT; + if ( thread_info(port, THREAD_BASIC_INFO, (thread_info_t)&info, &count) != KERN_SUCCESS ) + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + return time_point(); + } + + // convert to nanoseconds + duration user = duration( + static_cast( info.user_time.seconds ) * 1000000000 + + static_cast(info.user_time.microseconds ) * 1000); + + duration system = duration( + static_cast( info.system_time.seconds ) * 1000000000 + + static_cast( info.system_time.microseconds ) * 1000); + + return time_point( user + system ); + } + +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING + thread_clock::time_point thread_clock::now( system::error_code & ec ) + { + // get the thread port (borrowing pthread's reference) + mach_port_t port = pthread_mach_thread_np(pthread_self()); + + // get the thread info + thread_basic_info_data_t info; + mach_msg_type_number_t count = THREAD_BASIC_INFO_COUNT; + if ( thread_info(port, THREAD_BASIC_INFO, (thread_info_t)&info, &count) != KERN_SUCCESS ) + { + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception( + system::system_error( + EINVAL, + BOOST_CHRONO_SYSTEM_CATEGORY, + "chrono::thread_clock" )); + } + else + { + ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY ); + return time_point(); + } + } + if (!BOOST_CHRONO_IS_THROWS(ec)) + { + ec.clear(); + } + + // convert to nanoseconds + duration user = duration( + static_cast( info.user_time.seconds ) * 1000000000 + + static_cast(info.user_time.microseconds ) * 1000); + + duration system = duration( + static_cast( info.system_time.seconds ) * 1000000000 + + static_cast( info.system_time.microseconds ) * 1000); + + return time_point( user + system ); + } +#endif +} } diff --git a/ThirdParty/boost-Subset/boost/chrono/detail/inlined/posix/chrono.hpp b/ThirdParty/boost-Subset/boost/chrono/detail/inlined/posix/chrono.hpp new file mode 100644 index 0000000000..e35a7ce267 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/chrono/detail/inlined/posix/chrono.hpp @@ -0,0 +1,120 @@ +// posix/chrono.cpp --------------------------------------------------------------// + +// Copyright Beman Dawes 2008 +// Copyright Vicente J. Botet Escriba 2009 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +//----------------------------------------------------------------------------// +// POSIX // +//----------------------------------------------------------------------------// + +#include // for clock_gettime + +namespace boost +{ +namespace chrono +{ + + system_clock::time_point system_clock::now() BOOST_NOEXCEPT + { + timespec ts; + if ( ::clock_gettime( CLOCK_REALTIME, &ts ) ) + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + } + + return time_point(duration( + static_cast( ts.tv_sec ) * 1000000000 + ts.tv_nsec)); + } + +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING + system_clock::time_point system_clock::now(system::error_code & ec) + { + timespec ts; + if ( ::clock_gettime( CLOCK_REALTIME, &ts ) ) + { + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception( + system::system_error( + errno, + BOOST_CHRONO_SYSTEM_CATEGORY, + "chrono::system_clock" )); + } + else + { + ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY ); + return time_point(); + } + } + + if (!BOOST_CHRONO_IS_THROWS(ec)) + { + ec.clear(); + } + return time_point(duration( + static_cast( ts.tv_sec ) * 1000000000 + ts.tv_nsec)); + } +#endif + + std::time_t system_clock::to_time_t(const system_clock::time_point& t) BOOST_NOEXCEPT + { + return static_cast( t.time_since_epoch().count() / 1000000000 ); + } + + system_clock::time_point system_clock::from_time_t(std::time_t t) BOOST_NOEXCEPT + { + return time_point(duration(static_cast(t) * 1000000000)); + } + +#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY + + steady_clock::time_point steady_clock::now() BOOST_NOEXCEPT + { + timespec ts; + if ( ::clock_gettime( CLOCK_MONOTONIC, &ts ) ) + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + } + + return time_point(duration( + static_cast( ts.tv_sec ) * 1000000000 + ts.tv_nsec)); + } + +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING + steady_clock::time_point steady_clock::now(system::error_code & ec) + { + timespec ts; + if ( ::clock_gettime( CLOCK_MONOTONIC, &ts ) ) + { + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception( + system::system_error( + errno, + BOOST_CHRONO_SYSTEM_CATEGORY, + "chrono::steady_clock" )); + } + else + { + ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY ); + return time_point(); + } + } + + if (!BOOST_CHRONO_IS_THROWS(ec)) + { + ec.clear(); + } + return time_point(duration( + static_cast( ts.tv_sec ) * 1000000000 + ts.tv_nsec)); + } +#endif +#endif + +} // namespace chrono +} // namespace boost + + diff --git a/ThirdParty/boost-Subset/boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp b/ThirdParty/boost-Subset/boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp new file mode 100644 index 0000000000..0476f590c9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp @@ -0,0 +1,354 @@ +// boost process_cpu_clocks.cpp -----------------------------------------------------------// + +// Copyright Beman Dawes 1994, 2006, 2008 +// Copyright Vicente J. Botet Escriba 2009 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// See http://www.boost.org/libs/chrono for documentation. + +//--------------------------------------------------------------------------------------// + +#include +#include +#include + +#include +#include +#include // for clock_gettime + + +namespace boost { namespace chrono { +namespace chrono_detail +{ + inline nanoseconds::rep tick_factor() // multiplier to convert ticks + // to nanoseconds; -1 if unknown + { + static long factor = 0; + if ( !factor ) + { + if ( (factor = ::sysconf( _SC_CLK_TCK )) <= 0 ) + factor = -1; + else + { + BOOST_ASSERT( factor <= 1000000000l ); // doesn't handle large ticks + factor = 1000000000l / factor; // compute factor + if ( !factor ) factor = -1; + } + } + return factor; + } +} + +process_real_cpu_clock::time_point process_real_cpu_clock::now() BOOST_NOEXCEPT +{ + tms tm; + clock_t c = ::times( &tm ); + if ( c == clock_t(-1) ) // error + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + } + else + { + if ( chrono_detail::tick_factor() != -1 ) + { + return time_point( + nanoseconds(c*chrono_detail::tick_factor())); + } + else + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + } + } + return time_point(); +} + +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING +process_real_cpu_clock::time_point process_real_cpu_clock::now( + system::error_code & ec) +{ + + tms tm; + clock_t c = ::times( &tm ); + if ( c == clock_t(-1) ) // error + { + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception( + system::system_error( + errno, + BOOST_CHRONO_SYSTEM_CATEGORY, + "chrono::process_real_cpu_clock" )); + } + else + { + ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY ); + return time_point(); + } + } + else + { + if ( chrono_detail::tick_factor() != -1 ) + { + if (!BOOST_CHRONO_IS_THROWS(ec)) + { + ec.clear(); + } + return time_point( + nanoseconds(c*chrono_detail::tick_factor())); + } + else + { + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception( + system::system_error( + errno, + BOOST_CHRONO_SYSTEM_CATEGORY, + "chrono::process_real_cpu_clock" )); + } + else + { + ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY ); + return time_point(); + } + } + } +} +#endif + +process_user_cpu_clock::time_point process_user_cpu_clock::now() BOOST_NOEXCEPT +{ + tms tm; + clock_t c = ::times( &tm ); + if ( c == clock_t(-1) ) // error + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + } + else + { + if ( chrono_detail::tick_factor() != -1 ) + { + return time_point( + nanoseconds((tm.tms_utime + tm.tms_cutime)*chrono_detail::tick_factor())); + } + else + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + } + } + return time_point(); +} + +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING +process_user_cpu_clock::time_point process_user_cpu_clock::now( + system::error_code & ec) +{ + tms tm; + clock_t c = ::times( &tm ); + if ( c == clock_t(-1) ) // error + { + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception( + system::system_error( + errno, + BOOST_CHRONO_SYSTEM_CATEGORY, + "chrono::process_user_cpu_clock" )); + } + else + { + ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY ); + return time_point(); + } + } + else + { + if ( chrono_detail::tick_factor() != -1 ) + { + if (!BOOST_CHRONO_IS_THROWS(ec)) + { + ec.clear(); + } + return time_point( + nanoseconds((tm.tms_utime + tm.tms_cutime)*chrono_detail::tick_factor())); + } + else + { + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception( + system::system_error( + errno, + BOOST_CHRONO_SYSTEM_CATEGORY, + "chrono::process_user_cpu_clock" )); + } + else + { + ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY ); + return time_point(); + } + } + } +} +#endif + +process_system_cpu_clock::time_point process_system_cpu_clock::now() BOOST_NOEXCEPT +{ + tms tm; + clock_t c = ::times( &tm ); + if ( c == clock_t(-1) ) // error + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + return time_point(); + } + else + { + if ( chrono_detail::tick_factor() != -1 ) + { + return time_point( + nanoseconds((tm.tms_stime + tm.tms_cstime)*chrono_detail::tick_factor())); + } + else + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + return time_point(); + } + } +} + +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING +process_system_cpu_clock::time_point process_system_cpu_clock::now( + system::error_code & ec) +{ + tms tm; + clock_t c = ::times( &tm ); + if ( c == clock_t(-1) ) // error + { + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception( + system::system_error( + errno, + BOOST_CHRONO_SYSTEM_CATEGORY, + "chrono::process_system_cpu_clock" )); + } + else + { + ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY ); + return time_point(); + } + } + else + { + if ( chrono_detail::tick_factor() != -1 ) + { + if (!BOOST_CHRONO_IS_THROWS(ec)) + { + ec.clear(); + } + return time_point( + nanoseconds((tm.tms_stime + tm.tms_cstime)*chrono_detail::tick_factor())); + } + else + { + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception( + system::system_error( + errno, + BOOST_CHRONO_SYSTEM_CATEGORY, + "chrono::process_system_cpu_clock" )); + } + else + { + ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY ); + return time_point(); + } + } + } +} +#endif + +process_cpu_clock::time_point process_cpu_clock::now() BOOST_NOEXCEPT +{ + tms tm; + clock_t c = ::times( &tm ); + if ( c == clock_t(-1) ) // error + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + } + else + { + nanoseconds::rep factor = chrono_detail::tick_factor(); + if ( factor != -1 ) + { + time_point::rep r( + c*factor, + (tm.tms_utime + tm.tms_cutime)*factor, + (tm.tms_stime + tm.tms_cstime)*factor); + return time_point(duration(r)); + } + else + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + } + } + return time_point(); +} + +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING +process_cpu_clock::time_point process_cpu_clock::now( + system::error_code & ec ) +{ + tms tm; + clock_t c = ::times( &tm ); + if ( c == clock_t(-1) ) // error + { + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception( + system::system_error( + errno, + BOOST_CHRONO_SYSTEM_CATEGORY, + "chrono::process_clock" )); + } + else + { + ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY ); + return time_point(); + } + } + else + { + if ( chrono_detail::tick_factor() != -1 ) + { + time_point::rep r( + c*chrono_detail::tick_factor(), + (tm.tms_utime + tm.tms_cutime)*chrono_detail::tick_factor(), + (tm.tms_stime + tm.tms_cstime)*chrono_detail::tick_factor()); + return time_point(duration(r)); + } + else + { + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception( + system::system_error( + errno, + BOOST_CHRONO_SYSTEM_CATEGORY, + "chrono::process_clock" )); + } + else + { + ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY ); + return time_point(); + } + } + } + +} +#endif + +} } diff --git a/ThirdParty/boost-Subset/boost/chrono/detail/inlined/posix/thread_clock.hpp b/ThirdParty/boost-Subset/boost/chrono/detail/inlined/posix/thread_clock.hpp new file mode 100644 index 0000000000..a1012240ec --- /dev/null +++ b/ThirdParty/boost-Subset/boost/chrono/detail/inlined/posix/thread_clock.hpp @@ -0,0 +1,91 @@ +// boost thread_clock.cpp -----------------------------------------------------------// + +// Copyright Beman Dawes 1994, 2006, 2008 +// Copyright Vicente J. Botet Escriba 2009-2011 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// See http://www.boost.org/libs/chrono for documentation. + +//--------------------------------------------------------------------------------------// + +#include +#include +#include + +#if !defined(__VXWORKS__) +# include +#endif +# include +# include + +namespace boost { namespace chrono { + + thread_clock::time_point thread_clock::now( ) BOOST_NOEXCEPT + { + struct timespec ts; +#if defined CLOCK_THREAD_CPUTIME_ID + // get the timespec associated to the thread clock + if ( ::clock_gettime( CLOCK_THREAD_CPUTIME_ID, &ts ) ) +#else + // get the current thread + pthread_t pth=pthread_self(); + // get the clock_id associated to the current thread + clockid_t clock_id; + pthread_getcpuclockid(pth, &clock_id); + // get the timespec associated to the thread clock + if ( ::clock_gettime( clock_id, &ts ) ) +#endif + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + } + + // transform to nanoseconds + return time_point(duration( + static_cast( ts.tv_sec ) * 1000000000 + ts.tv_nsec)); + + } + +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING + thread_clock::time_point thread_clock::now( system::error_code & ec ) + { + struct timespec ts; +#if defined CLOCK_THREAD_CPUTIME_ID + // get the timespec associated to the thread clock + if ( ::clock_gettime( CLOCK_THREAD_CPUTIME_ID, &ts ) ) +#else + // get the current thread + pthread_t pth=pthread_self(); + // get the clock_id associated to the current thread + clockid_t clock_id; + pthread_getcpuclockid(pth, &clock_id); + // get the timespec associated to the thread clock + if ( ::clock_gettime( clock_id, &ts ) ) +#endif + { + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception( + system::system_error( + errno, + BOOST_CHRONO_SYSTEM_CATEGORY, + "chrono::thread_clock" )); + } + else + { + ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY ); + return time_point(); + } + } + if (!BOOST_CHRONO_IS_THROWS(ec)) + { + ec.clear(); + } + // transform to nanoseconds + return time_point(duration( + static_cast( ts.tv_sec ) * 1000000000 + ts.tv_nsec)); + + } +#endif +} } diff --git a/ThirdParty/boost-Subset/boost/chrono/detail/inlined/process_cpu_clocks.hpp b/ThirdParty/boost-Subset/boost/chrono/detail/inlined/process_cpu_clocks.hpp new file mode 100644 index 0000000000..d37f6754cb --- /dev/null +++ b/ThirdParty/boost-Subset/boost/chrono/detail/inlined/process_cpu_clocks.hpp @@ -0,0 +1,45 @@ +// boost process_cpu_clocks.cpp -----------------------------------------------------------// + +// Copyright 2009-2010 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// See http://www.boost.org/libs/chrono for documentation. + +//--------------------------------------------------------------------------------------// +#ifndef BOOST_CHRONO_DETAIL_INLINED_PROCESS_CPU_CLOCKS_HPP +#define BOOST_CHRONO_DETAIL_INLINED_PROCESS_CPU_CLOCKS_HPP + + +#include +#if defined(BOOST_CHRONO_HAS_PROCESS_CLOCKS) + +#include +#include +#include +#include + +//----------------------------------------------------------------------------// +// Windows // +//----------------------------------------------------------------------------// +#if defined(BOOST_CHRONO_WINDOWS_API) +#include + +//----------------------------------------------------------------------------// +// Mac // +//----------------------------------------------------------------------------// +#elif defined(BOOST_CHRONO_MAC_API) +#include + +//----------------------------------------------------------------------------// +// POSIX // +//----------------------------------------------------------------------------// +#elif defined(BOOST_CHRONO_POSIX_API) +#include + +#endif // POSIX + +#endif + +#endif diff --git a/ThirdParty/boost-Subset/boost/chrono/detail/inlined/thread_clock.hpp b/ThirdParty/boost-Subset/boost/chrono/detail/inlined/thread_clock.hpp new file mode 100644 index 0000000000..16d19ef488 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/chrono/detail/inlined/thread_clock.hpp @@ -0,0 +1,44 @@ +// boost thread_clock.cpp -----------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// See http://www.boost.org/libs/chrono for documentation. + +//--------------------------------------------------------------------------------------// +#ifndef BOOST_CHRONO_DETAIL_INLINED_THREAD_CLOCK_HPP +#define BOOST_CHRONO_DETAIL_INLINED_THREAD_CLOCK_HPP + +#include +#include +#if defined(BOOST_CHRONO_HAS_THREAD_CLOCK) +#include +#include +#include +#include +#include + +//----------------------------------------------------------------------------// +// Windows // +//----------------------------------------------------------------------------// +#if defined(BOOST_CHRONO_WINDOWS_API) +#include + +//----------------------------------------------------------------------------// +// Mac // +//----------------------------------------------------------------------------// +#elif defined(BOOST_CHRONO_MAC_API) +#include + +//----------------------------------------------------------------------------// +// POSIX // +//----------------------------------------------------------------------------// +#elif defined(BOOST_CHRONO_POSIX_API) +#include + +#endif // POSIX + +#endif +#endif diff --git a/ThirdParty/boost-Subset/boost/chrono/detail/inlined/win/chrono.hpp b/ThirdParty/boost-Subset/boost/chrono/detail/inlined/win/chrono.hpp new file mode 100644 index 0000000000..16e8c51426 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/chrono/detail/inlined/win/chrono.hpp @@ -0,0 +1,149 @@ +// win/chrono.cpp --------------------------------------------------------------// + +// Copyright Beman Dawes 2008 +// Copyright 2009-2010 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +//----------------------------------------------------------------------------// +// Windows // +//----------------------------------------------------------------------------// +#ifndef BOOST_CHRONO_DETAIL_INLINED_WIN_CHRONO_HPP +#define BOOST_CHRONO_DETAIL_INLINED_WIN_CHRONO_HPP + +#include +#include +#include + +namespace boost +{ +namespace chrono +{ +namespace chrono_detail +{ + + BOOST_CHRONO_INLINE double get_nanosecs_per_tic() BOOST_NOEXCEPT + { + boost::detail::winapi::LARGE_INTEGER_ freq; + if ( !boost::detail::winapi::QueryPerformanceFrequency( &freq ) ) + return 0.0L; + return double(1000000000.0L / freq.QuadPart); + } + +} + + steady_clock::time_point steady_clock::now() BOOST_NOEXCEPT + { + double nanosecs_per_tic = chrono_detail::get_nanosecs_per_tic(); + + boost::detail::winapi::LARGE_INTEGER_ pcount; + if ( nanosecs_per_tic <= 0.0L ) + { + BOOST_ASSERT(0 && "Boost::Chrono - get_nanosecs_per_tic Internal Error"); + return steady_clock::time_point(); + } + unsigned times=0; + while ( ! boost::detail::winapi::QueryPerformanceCounter( &pcount ) ) + { + if ( ++times > 3 ) + { + BOOST_ASSERT(0 && "Boost::Chrono - QueryPerformanceCounter Internal Error"); + return steady_clock::time_point(); + } + } + + return steady_clock::time_point(steady_clock::duration( + static_cast((nanosecs_per_tic) * pcount.QuadPart))); + } + + +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING + steady_clock::time_point steady_clock::now( system::error_code & ec ) + { + double nanosecs_per_tic = chrono_detail::get_nanosecs_per_tic(); + + boost::detail::winapi::LARGE_INTEGER_ pcount; + if ( (nanosecs_per_tic <= 0.0L) + || (!boost::detail::winapi::QueryPerformanceCounter( &pcount )) ) + { + boost::detail::winapi::DWORD_ cause = + ((nanosecs_per_tic <= 0.0L) + ? ERROR_NOT_SUPPORTED + : boost::detail::winapi::GetLastError()); + if (BOOST_CHRONO_IS_THROWS(ec)) { + boost::throw_exception( + system::system_error( + cause, + BOOST_CHRONO_SYSTEM_CATEGORY, + "chrono::steady_clock" )); + } + else + { + ec.assign( cause, BOOST_CHRONO_SYSTEM_CATEGORY ); + return steady_clock::time_point(duration(0)); + } + } + + if (!BOOST_CHRONO_IS_THROWS(ec)) + { + ec.clear(); + } + return time_point(duration( + static_cast(nanosecs_per_tic * pcount.QuadPart))); + } +#endif + + BOOST_CHRONO_INLINE + system_clock::time_point system_clock::now() BOOST_NOEXCEPT + { + boost::detail::winapi::FILETIME_ ft; + boost::detail::winapi::GetSystemTimeAsFileTime( &ft ); // never fails + return system_clock::time_point( + system_clock::duration( + ((static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime) + - 116444736000000000LL + //- (134775LL*864000000000LL) + ) + ); + } + +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING + BOOST_CHRONO_INLINE + system_clock::time_point system_clock::now( system::error_code & ec ) + { + boost::detail::winapi::FILETIME_ ft; + boost::detail::winapi::GetSystemTimeAsFileTime( &ft ); // never fails + if (!BOOST_CHRONO_IS_THROWS(ec)) + { + ec.clear(); + } + return system_clock::time_point( + system_clock::duration( + ((static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime) + - 116444736000000000LL + //- (134775LL*864000000000LL) + )); + } +#endif + + BOOST_CHRONO_INLINE + std::time_t system_clock::to_time_t(const system_clock::time_point& t) BOOST_NOEXCEPT + { + __int64 temp = t.time_since_epoch().count(); + temp /= 10000000; + return static_cast( temp ); + } + + BOOST_CHRONO_INLINE + system_clock::time_point system_clock::from_time_t(std::time_t t) BOOST_NOEXCEPT + { + __int64 temp = t; + temp *= 10000000; + return time_point(duration(temp)); + } + +} // namespace chrono +} // namespace boost + +#endif diff --git a/ThirdParty/boost-Subset/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp b/ThirdParty/boost-Subset/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp new file mode 100644 index 0000000000..e97bfe590c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp @@ -0,0 +1,281 @@ +// boost process_timer.cpp -----------------------------------------------------------// + +// Copyright Beman Dawes 1994, 2006, 2008 +// Copyright 2009-2010 Vicente J. Botet Escriba +// Copyright (c) Microsoft Corporation 2014 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// See http://www.boost.org/libs/chrono for documentation. + +//--------------------------------------------------------------------------------------// +#ifndef BOOST_CHRONO_DETAIL_INLINED_WIN_PROCESS_CLOCK_HPP +#define BOOST_CHRONO_DETAIL_INLINED_WIN_PROCESS_CLOCK_HPP + +#include +//#include +#include +#include +#include + +#include +#include +#if BOOST_PLAT_WINDOWS_DESKTOP +#include +#endif + +namespace boost +{ +namespace chrono +{ + +process_real_cpu_clock::time_point process_real_cpu_clock::now() BOOST_NOEXCEPT +{ + clock_t c = ::clock(); + if ( c == clock_t(-1) ) // error + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + } + typedef ratio_divide >::type R; + return time_point( + duration(static_cast(c)*R::num/R::den) + ); +} + +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING +process_real_cpu_clock::time_point process_real_cpu_clock::now( + system::error_code & ec) +{ + clock_t c = ::clock(); + if ( c == clock_t(-1) ) // error + { + boost::throw_exception( + system::system_error( + errno, + BOOST_CHRONO_SYSTEM_CATEGORY, + "chrono::process_real_cpu_clock" )); + } + if (!BOOST_CHRONO_IS_THROWS(ec)) + { + ec.clear(); + } + typedef ratio_divide >::type R; + return time_point( + duration(static_cast(c)*R::num/R::den) + ); +} +#endif + +#if BOOST_PLAT_WINDOWS_DESKTOP +process_user_cpu_clock::time_point process_user_cpu_clock::now() BOOST_NOEXCEPT +{ + + // note that Windows uses 100 nanosecond ticks for FILETIME + boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time; + + if ( boost::detail::winapi::GetProcessTimes( + boost::detail::winapi::GetCurrentProcess(), &creation, &exit, + &system_time, &user_time ) ) + { + return time_point(duration( + ((static_cast(user_time.dwHighDateTime) << 32) + | user_time.dwLowDateTime) * 100 + )); + } + else + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + return time_point(); + } + +} + +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING +process_user_cpu_clock::time_point process_user_cpu_clock::now( + system::error_code & ec) +{ + + // note that Windows uses 100 nanosecond ticks for FILETIME + boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time; + + if ( boost::detail::winapi::GetProcessTimes( + boost::detail::winapi::GetCurrentProcess(), &creation, &exit, + &system_time, &user_time ) ) + { + if (!BOOST_CHRONO_IS_THROWS(ec)) + { + ec.clear(); + } + return time_point(duration( + ((static_cast(user_time.dwHighDateTime) << 32) + | user_time.dwLowDateTime) * 100 + )); + } + else + { + boost::detail::winapi::DWORD_ cause = boost::detail::winapi::GetLastError(); + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception( + system::system_error( + cause, + BOOST_CHRONO_SYSTEM_CATEGORY, + "chrono::process_user_cpu_clock" )); + } + else + { + ec.assign( cause, BOOST_CHRONO_SYSTEM_CATEGORY ); + return time_point(); + } + } + +} +#endif + +process_system_cpu_clock::time_point process_system_cpu_clock::now() BOOST_NOEXCEPT +{ + + // note that Windows uses 100 nanosecond ticks for FILETIME + boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time; + + if ( boost::detail::winapi::GetProcessTimes( + boost::detail::winapi::GetCurrentProcess(), &creation, &exit, + &system_time, &user_time ) ) + { + return time_point(duration( + ((static_cast(system_time.dwHighDateTime) << 32) + | system_time.dwLowDateTime) * 100 + )); + } + else + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + return time_point(); + } + +} + +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING +process_system_cpu_clock::time_point process_system_cpu_clock::now( + system::error_code & ec) +{ + + // note that Windows uses 100 nanosecond ticks for FILETIME + boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time; + + if ( boost::detail::winapi::GetProcessTimes( + boost::detail::winapi::GetCurrentProcess(), &creation, &exit, + &system_time, &user_time ) ) + { + if (!BOOST_CHRONO_IS_THROWS(ec)) + { + ec.clear(); + } + return time_point(duration( + ((static_cast(system_time.dwHighDateTime) << 32) + | system_time.dwLowDateTime) * 100 + )); + } + else + { + boost::detail::winapi::DWORD_ cause = boost::detail::winapi::GetLastError(); + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception( + system::system_error( + cause, + BOOST_CHRONO_SYSTEM_CATEGORY, + "chrono::process_system_cpu_clock" )); + } + else + { + ec.assign( cause, BOOST_CHRONO_SYSTEM_CATEGORY ); + return time_point(); + } + } + +} +#endif + +process_cpu_clock::time_point process_cpu_clock::now() BOOST_NOEXCEPT +{ + + // note that Windows uses 100 nanosecond ticks for FILETIME + boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time; + + if ( boost::detail::winapi::GetProcessTimes( + boost::detail::winapi::GetCurrentProcess(), &creation, &exit, + &system_time, &user_time ) ) + { + time_point::rep r(process_real_cpu_clock::now().time_since_epoch().count() + , + ((static_cast(user_time.dwHighDateTime) << 32) + | user_time.dwLowDateTime + ) * 100, + ((static_cast(system_time.dwHighDateTime) << 32) + | system_time.dwLowDateTime + ) * 100 + ); + return time_point(duration(r)); + } + else + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + return time_point(); + } + +} + +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING +process_cpu_clock::time_point process_cpu_clock::now( + system::error_code & ec ) +{ + + // note that Windows uses 100 nanosecond ticks for FILETIME + boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time; + + if ( boost::detail::winapi::GetProcessTimes( + boost::detail::winapi::GetCurrentProcess(), &creation, &exit, + &system_time, &user_time ) ) + { + if (!BOOST_CHRONO_IS_THROWS(ec)) + { + ec.clear(); + } + time_point::rep r(process_real_cpu_clock::now().time_since_epoch().count() + , + ((static_cast(user_time.dwHighDateTime) << 32) + | user_time.dwLowDateTime + ) * 100, + ((static_cast(system_time.dwHighDateTime) << 32) + | system_time.dwLowDateTime + ) * 100 + ); + return time_point(duration(r)); + } + else + { + boost::detail::winapi::DWORD_ cause = boost::detail::winapi::GetLastError(); + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception( + system::system_error( + cause, + BOOST_CHRONO_SYSTEM_CATEGORY, + "chrono::process_cpu_clock" )); + } + else + { + ec.assign( cause, BOOST_CHRONO_SYSTEM_CATEGORY ); + return time_point(); + } + } + +} +#endif +#endif +} // namespace chrono +} // namespace boost + +#endif diff --git a/ThirdParty/boost-Subset/boost/chrono/detail/inlined/win/thread_clock.hpp b/ThirdParty/boost-Subset/boost/chrono/detail/inlined/win/thread_clock.hpp new file mode 100644 index 0000000000..e47c481473 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/chrono/detail/inlined/win/thread_clock.hpp @@ -0,0 +1,102 @@ +// boost thread_clock.cpp -----------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// See http://www.boost.org/libs/chrono for documentation. + +//--------------------------------------------------------------------------------------// +#ifndef BOOST_CHRONO_DETAIL_INLINED_WIN_THREAD_CLOCK_HPP +#define BOOST_CHRONO_DETAIL_INLINED_WIN_THREAD_CLOCK_HPP + +#include +#include +#include + +#include +#include +#include + +namespace boost +{ +namespace chrono +{ + +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING +thread_clock::time_point thread_clock::now( system::error_code & ec ) +{ + // note that Windows uses 100 nanosecond ticks for FILETIME + boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time; + + if ( boost::detail::winapi::GetThreadTimes( + boost::detail::winapi::GetCurrentThread (), &creation, &exit, + &system_time, &user_time ) ) + { + duration user = duration( + ((static_cast(user_time.dwHighDateTime) << 32) + | user_time.dwLowDateTime) * 100 ); + + duration system = duration( + ((static_cast(system_time.dwHighDateTime) << 32) + | system_time.dwLowDateTime) * 100 ); + + if (!BOOST_CHRONO_IS_THROWS(ec)) + { + ec.clear(); + } + return time_point(system+user); + + } + else + { + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception( + system::system_error( + boost::detail::winapi::GetLastError(), + BOOST_CHRONO_SYSTEM_CATEGORY, + "chrono::thread_clock" )); + } + else + { + ec.assign( boost::detail::winapi::GetLastError(), BOOST_CHRONO_SYSTEM_CATEGORY ); + return thread_clock::time_point(duration(0)); + } + } +} +#endif + +thread_clock::time_point thread_clock::now() BOOST_NOEXCEPT +{ + + // note that Windows uses 100 nanosecond ticks for FILETIME + boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time; + + if ( boost::detail::winapi::GetThreadTimes( + boost::detail::winapi::GetCurrentThread (), &creation, &exit, + &system_time, &user_time ) ) + { + duration user = duration( + ((static_cast(user_time.dwHighDateTime) << 32) + | user_time.dwLowDateTime) * 100 ); + + duration system = duration( + ((static_cast(system_time.dwHighDateTime) << 32) + | system_time.dwLowDateTime) * 100 ); + + return time_point(system+user); + } + else + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + return time_point(); + } + +} + +} // namespace chrono +} // namespace boost + +#endif diff --git a/ThirdParty/boost-Subset/boost/chrono/detail/is_evenly_divisible_by.hpp b/ThirdParty/boost-Subset/boost/chrono/detail/is_evenly_divisible_by.hpp new file mode 100644 index 0000000000..960a208a75 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/chrono/detail/is_evenly_divisible_by.hpp @@ -0,0 +1,31 @@ +// is_evenly_divisible_by.hpp --------------------------------------------------------------// + +// Copyright 2009-2010 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#ifndef BOOST_CHRONO_DETAIL_IS_EVENLY_DIVISIBLE_BY_HPP +#define BOOST_CHRONO_DETAIL_IS_EVENLY_DIVISIBLE_BY_HPP + +#include + +#include +#include + +namespace boost { +namespace chrono { +namespace chrono_detail { + +// template +// struct is_evenly_divisible_by : public boost::mpl::bool_ < ratio_divide::type::den == 1 > +// {}; + template + struct is_evenly_divisible_by : public boost::ratio_detail::is_evenly_divisible_by + {}; + +} // namespace chrono_detail +} // namespace detail +} // namespace chrono + +#endif // BOOST_CHRONO_DETAIL_IS_EVENLY_DIVISIBLE_BY_HPP diff --git a/ThirdParty/boost-Subset/boost/chrono/detail/static_assert.hpp b/ThirdParty/boost-Subset/boost/chrono/detail/static_assert.hpp new file mode 100644 index 0000000000..8615194754 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/chrono/detail/static_assert.hpp @@ -0,0 +1,30 @@ +// static_assert.hpp --------------------------------------------------------------// + +// Copyright 2009-2010 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_CHRONO_DETAIL_STATIC_ASSERT_HPP +#define BOOST_CHRONO_DETAIL_STATIC_ASSERT_HPP + +#include + +#ifndef BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) static_assert(CND,MSG) +#elif defined(BOOST_CHRONO_USES_STATIC_ASSERT) +#include +#define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) BOOST_STATIC_ASSERT(CND) +#elif defined(BOOST_CHRONO_USES_MPL_ASSERT) +#include +#include +#define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) \ + BOOST_MPL_ASSERT_MSG(boost::mpl::bool_< (CND) >::type::value, MSG, TYPES) +#else +//~ #elif defined(BOOST_CHRONO_USES_ARRAY_ASSERT) +#define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) static char BOOST_JOIN(boost_chrono_test_,__LINE__)[(CND)?1:-1] +//~ #define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) +#endif + +#endif // BOOST_CHRONO_DETAIL_STATIC_ASSERT_HPP diff --git a/ThirdParty/boost-Subset/boost/chrono/detail/system.hpp b/ThirdParty/boost-Subset/boost/chrono/detail/system.hpp new file mode 100644 index 0000000000..0dcffe8521 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/chrono/detail/system.hpp @@ -0,0 +1,29 @@ +// Copyright 2009-2010 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#ifndef BOOST_CHRONO_DETAIL_SYSTEM_HPP +#define BOOST_CHRONO_DETAIL_SYSTEM_HPP + +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING + +#include +#include + +#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44) +#define BOOST_CHRONO_SYSTEM_CATEGORY boost::system::system_category +#else +#define BOOST_CHRONO_SYSTEM_CATEGORY boost::system::system_category() +#endif + +#ifdef BOOST_SYSTEM_NO_DEPRECATED +#define BOOST_CHRONO_THROWS boost::throws() +#define BOOST_CHRONO_IS_THROWS(EC) (&EC==&boost::throws()) +#else +#define BOOST_CHRONO_THROWS boost::system::throws +#define BOOST_CHRONO_IS_THROWS(EC) (&EC==&boost::system::throws) +#endif + +#endif +#endif diff --git a/ThirdParty/boost-Subset/boost/chrono/duration.hpp b/ThirdParty/boost-Subset/boost/chrono/duration.hpp new file mode 100644 index 0000000000..a2110bf411 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/chrono/duration.hpp @@ -0,0 +1,799 @@ +// duration.hpp --------------------------------------------------------------// + +// Copyright 2008 Howard Hinnant +// Copyright 2008 Beman Dawes +// Copyright 2009-2011 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +/* + +This code was derived by Beman Dawes from Howard Hinnant's time2_demo prototype. +Many thanks to Howard for making his code available under the Boost license. +The original code was modified to conform to Boost conventions and to section +20.9 Time utilities [time] of the C++ committee's working paper N2798. +See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf. + +time2_demo contained this comment: + + Much thanks to Andrei Alexandrescu, + Walter Brown, + Peter Dimov, + Jeff Garland, + Terry Golubiewski, + Daniel Krugler, + Anthony Williams. +*/ + + +#ifndef BOOST_CHRONO_DURATION_HPP +#define BOOST_CHRONO_DURATION_HPP + +#include +#include + +#include +#include + + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#if !defined(BOOST_NO_CXX11_STATIC_ASSERT) || !defined(BOOST_CHRONO_USES_MPL_ASSERT) +#define BOOST_CHRONO_A_DURATION_REPRESENTATION_CAN_NOT_BE_A_DURATION "A duration representation can not be a duration" +#define BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_DURATION_MUST_BE_A_STD_RATIO "Second template parameter of duration must be a boost::ratio" +#define BOOST_CHRONO_DURATION_PERIOD_MUST_BE_POSITIVE "duration period must be positive" +#define BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_TIME_POINT_MUST_BE_A_BOOST_CHRONO_DURATION "Second template parameter of time_point must be a boost::chrono::duration" +#endif + +#ifndef BOOST_CHRONO_HEADER_ONLY +// this must occur after all of the includes and before any code appears: +#include // must be the last #include +#endif + +//----------------------------------------------------------------------------// +// // +// 20.9 Time utilities [time] // +// synopsis // +// // +//----------------------------------------------------------------------------// + +namespace boost { +namespace chrono { + + template > + class duration; + + namespace detail + { + template + struct is_duration + : boost::false_type {}; + + template + struct is_duration > + : boost::true_type {}; + + template ::value> + struct duration_divide_result + { + }; + + template ::type>::value)) + && ((boost::is_convertible::type>::value)) + ) + > + struct duration_divide_imp + { + }; + + template + struct duration_divide_imp, Rep2, true> + { + typedef duration::type, Period> type; + }; + + template + struct duration_divide_result, Rep2, false> + : duration_divide_imp, Rep2> + { + }; + +/// + template ::value> + struct duration_divide_result2 + { + }; + + template ::type>::value)) + && ((boost::is_convertible::type>::value)) + ) + > + struct duration_divide_imp2 + { + }; + + template + struct duration_divide_imp2, true> + { + //typedef typename common_type::type type; + typedef double type; + }; + + template + struct duration_divide_result2, false> + : duration_divide_imp2 > + { + }; + +/// + template ::value> + struct duration_modulo_result + { + }; + + template ::type>::value + //&& + boost::is_convertible::type>::value + ) + > + struct duration_modulo_imp + { + }; + + template + struct duration_modulo_imp, Rep2, true> + { + typedef duration::type, Period> type; + }; + + template + struct duration_modulo_result, Rep2, false> + : duration_modulo_imp, Rep2> + { + }; + +} // namespace detail +} // namespace chrono + + +// common_type trait specializations + +template +struct common_type, + chrono::duration >; + + +namespace chrono { + + // customization traits + template struct treat_as_floating_point; + template struct duration_values; + + // convenience typedefs + typedef duration nanoseconds; // at least 64 bits needed + typedef duration microseconds; // at least 55 bits needed + typedef duration milliseconds; // at least 45 bits needed + typedef duration seconds; // at least 35 bits needed + typedef duration > minutes; // at least 29 bits needed + typedef duration > hours; // at least 23 bits needed + +//----------------------------------------------------------------------------// +// duration helpers // +//----------------------------------------------------------------------------// + +namespace detail +{ + + // duration_cast + + // duration_cast is the heart of this whole prototype. It can convert any + // duration to any other. It is also (implicitly) used in converting + // time_points. The conversion is always exact if possible. And it is + // always as efficient as hand written code. If different representations + // are involved, care is taken to never require implicit conversions. + // Instead static_cast is used explicitly for every required conversion. + // If there are a mixture of integral and floating point representations, + // the use of common_type ensures that the most logical "intermediate" + // representation is used. + template + struct duration_cast_aux; + + // When the two periods are the same, all that is left to do is static_cast from + // the source representation to the target representation (which may be a no-op). + // This conversion is always exact as long as the static_cast from the source + // representation to the destination representation is exact. + template + struct duration_cast_aux + { + BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const + { + return ToDuration(static_cast(fd.count())); + } + }; + + // When the numerator of FromPeriod / ToPeriod is 1, then all we need to do is + // divide by the denominator of FromPeriod / ToPeriod. The common_type of + // the two representations is used for the intermediate computation before + // static_cast'ing to the destination. + // This conversion is generally not exact because of the division (but could be + // if you get lucky on the run time value of fd.count()). + template + struct duration_cast_aux + { + BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const + { + typedef typename common_type< + typename ToDuration::rep, + typename FromDuration::rep, + boost::intmax_t>::type C; + return ToDuration(static_cast( + static_cast(fd.count()) / static_cast(Period::den))); + } + }; + + // When the denominator of FromPeriod / ToPeriod is 1, then all we need to do is + // multiply by the numerator of FromPeriod / ToPeriod. The common_type of + // the two representations is used for the intermediate computation before + // static_cast'ing to the destination. + // This conversion is always exact as long as the static_cast's involved are exact. + template + struct duration_cast_aux + { + BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const + { + typedef typename common_type< + typename ToDuration::rep, + typename FromDuration::rep, + boost::intmax_t>::type C; + return ToDuration(static_cast( + static_cast(fd.count()) * static_cast(Period::num))); + } + }; + + // When neither the numerator or denominator of FromPeriod / ToPeriod is 1, then we need to + // multiply by the numerator and divide by the denominator of FromPeriod / ToPeriod. The + // common_type of the two representations is used for the intermediate computation before + // static_cast'ing to the destination. + // This conversion is generally not exact because of the division (but could be + // if you get lucky on the run time value of fd.count()). + template + struct duration_cast_aux + { + BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const + { + typedef typename common_type< + typename ToDuration::rep, + typename FromDuration::rep, + boost::intmax_t>::type C; + return ToDuration(static_cast( + static_cast(fd.count()) * static_cast(Period::num) + / static_cast(Period::den))); + } + }; + + template + struct duration_cast { + typedef typename ratio_divide::type Period; + typedef duration_cast_aux< + FromDuration, + ToDuration, + Period, + Period::num == 1, + Period::den == 1 + > Aux; + BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const + { + return Aux()(fd); + } + }; + +} // namespace detail + +//----------------------------------------------------------------------------// +// // +// 20.9.2 Time-related traits [time.traits] // +// // +//----------------------------------------------------------------------------// +//----------------------------------------------------------------------------// +// 20.9.2.1 treat_as_floating_point [time.traits.is_fp] // +// Probably should have been treat_as_floating_point. Editor notifed. // +//----------------------------------------------------------------------------// + + // Support bidirectional (non-exact) conversions for floating point rep types + // (or user defined rep types which specialize treat_as_floating_point). + template + struct treat_as_floating_point : boost::is_floating_point {}; + +//----------------------------------------------------------------------------// +// 20.9.2.2 duration_values [time.traits.duration_values] // +//----------------------------------------------------------------------------// + +namespace detail { + template ::value> + struct chrono_numeric_limits { + static BOOST_CHRONO_LIB_CONSTEXPR T lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW {return (std::numeric_limits::min) ();} + }; + + template + struct chrono_numeric_limits { + static BOOST_CHRONO_LIB_CONSTEXPR T lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW {return (std::numeric_limits::min) ();} + }; + + template <> + struct chrono_numeric_limits { + static BOOST_CHRONO_LIB_CONSTEXPR float lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW + { + return -(std::numeric_limits::max) (); + } + }; + + template <> + struct chrono_numeric_limits { + static BOOST_CHRONO_LIB_CONSTEXPR double lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW + { + return -(std::numeric_limits::max) (); + } + }; + + template <> + struct chrono_numeric_limits { + static BOOST_CHRONO_LIB_CONSTEXPR long double lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW + { + return -(std::numeric_limits::max)(); + } + }; + + template + struct numeric_limits : chrono_numeric_limits::type> + {}; + +} +template +struct duration_values +{ + static BOOST_CONSTEXPR Rep zero() {return Rep(0);} + static BOOST_CHRONO_LIB_CONSTEXPR Rep max BOOST_PREVENT_MACRO_SUBSTITUTION () + { + return (std::numeric_limits::max)(); + } + + static BOOST_CHRONO_LIB_CONSTEXPR Rep min BOOST_PREVENT_MACRO_SUBSTITUTION () + { + return detail::numeric_limits::lowest(); + } +}; + +} // namespace chrono + +//----------------------------------------------------------------------------// +// 20.9.2.3 Specializations of common_type [time.traits.specializations] // +//----------------------------------------------------------------------------// + +template +struct common_type, + chrono::duration > +{ + typedef chrono::duration::type, + typename boost::ratio_gcd::type> type; +}; + + +//----------------------------------------------------------------------------// +// // +// 20.9.3 Class template duration [time.duration] // +// // +//----------------------------------------------------------------------------// + + +namespace chrono { + + template + class BOOST_SYMBOL_VISIBLE duration + { + //BOOST_CHRONO_STATIC_ASSERT(boost::is_integral::value, BOOST_CHRONO_A_DURATION_REPRESENTATION_MUST_BE_INTEGRAL, ()); + BOOST_CHRONO_STATIC_ASSERT(!boost::chrono::detail::is_duration::value, + BOOST_CHRONO_A_DURATION_REPRESENTATION_CAN_NOT_BE_A_DURATION, ()); + BOOST_CHRONO_STATIC_ASSERT(boost::ratio_detail::is_ratio::value, + BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_DURATION_MUST_BE_A_STD_RATIO, ()); + BOOST_CHRONO_STATIC_ASSERT(Period::num>0, + BOOST_CHRONO_DURATION_PERIOD_MUST_BE_POSITIVE, ()); + public: + typedef Rep rep; + typedef Period period; + private: + rep rep_; + public: + +#if defined BOOST_NO_CXX11_DEFAULTED_FUNCTIONS + BOOST_FORCEINLINE BOOST_CONSTEXPR + duration() : rep_(duration_values::zero()) { } +#else + BOOST_CONSTEXPR duration() BOOST_NOEXCEPT {}; +#endif + template + BOOST_SYMBOL_VISIBLE BOOST_FORCEINLINE BOOST_CONSTEXPR + explicit duration(const Rep2& r + , typename boost::enable_if < + mpl::and_ < + boost::is_convertible, + mpl::or_ < + treat_as_floating_point, + mpl::and_ < + mpl::not_ < treat_as_floating_point >, + mpl::not_ < treat_as_floating_point > + > + > + > + >::type* = 0 + ) : rep_(r) { } +#if defined BOOST_NO_CXX11_DEFAULTED_FUNCTIONS + duration& operator=(const duration& rhs) + { + if (&rhs != this) rep_= rhs.rep_; + return *this; + } +#else + duration& operator=(const duration& rhs) = default; +#endif + // conversions + template + BOOST_FORCEINLINE BOOST_CONSTEXPR + duration(const duration& d + , typename boost::enable_if < + mpl::or_ < + treat_as_floating_point, + mpl::and_ < + chrono_detail::is_evenly_divisible_by, + mpl::not_ < treat_as_floating_point > + > + > + >::type* = 0 + ) + : rep_(chrono::detail::duration_cast, duration>()(d).count()) {} + + // observer + + BOOST_CONSTEXPR + rep count() const {return rep_;} + + // arithmetic + + BOOST_CONSTEXPR + duration operator+() const {return duration(rep_);;} + BOOST_CONSTEXPR + duration operator-() const {return duration(-rep_);} + duration& operator++() {++rep_; return *this;} + duration operator++(int) {return duration(rep_++);} + duration& operator--() {--rep_; return *this;} + duration operator--(int) {return duration(rep_--);} + + duration& operator+=(const duration& d) + { + rep_ += d.count(); return *this; + } + duration& operator-=(const duration& d) + { + rep_ -= d.count(); return *this; + } + + duration& operator*=(const rep& rhs) {rep_ *= rhs; return *this;} + duration& operator/=(const rep& rhs) {rep_ /= rhs; return *this;} + duration& operator%=(const rep& rhs) {rep_ %= rhs; return *this;} + duration& operator%=(const duration& rhs) + { + rep_ %= rhs.count(); return *this; + } + // 20.9.3.4 duration special values [time.duration.special] + + static BOOST_CONSTEXPR duration zero() + { + return duration(duration_values::zero()); + } + static BOOST_CHRONO_LIB_CONSTEXPR duration min BOOST_PREVENT_MACRO_SUBSTITUTION () + { + return duration((duration_values::min)()); + } + static BOOST_CHRONO_LIB_CONSTEXPR duration max BOOST_PREVENT_MACRO_SUBSTITUTION () + { + return duration((duration_values::max)()); + } + }; + +//----------------------------------------------------------------------------// +// 20.9.3.5 duration non-member arithmetic [time.duration.nonmember] // +//----------------------------------------------------------------------------// + + // Duration + + + template + inline BOOST_CONSTEXPR + typename common_type, duration >::type + operator+(const duration& lhs, + const duration& rhs) + { + typedef typename common_type, + duration >::type CD; + return CD(CD(lhs).count()+CD(rhs).count()); + } + + // Duration - + + template + inline BOOST_CONSTEXPR + typename common_type, duration >::type + operator-(const duration& lhs, + const duration& rhs) + { + typedef typename common_type, + duration >::type CD; + return CD(CD(lhs).count()-CD(rhs).count()); + } + + // Duration * + + template + inline BOOST_CONSTEXPR + typename boost::enable_if < + mpl::and_ < + boost::is_convertible::type>, + boost::is_convertible::type> + >, + duration::type, Period> + >::type + operator*(const duration& d, const Rep2& s) + { + typedef typename common_type::type CR; + typedef duration CD; + return CD(CD(d).count()*static_cast(s)); + } + + template + inline BOOST_CONSTEXPR + typename boost::enable_if < + mpl::and_ < + boost::is_convertible::type>, + boost::is_convertible::type> + >, + duration::type, Period> + >::type + operator*(const Rep1& s, const duration& d) + { + return d * s; + } + + // Duration / + + template + inline BOOST_CONSTEXPR + typename boost::disable_if , + typename boost::chrono::detail::duration_divide_result< + duration, Rep2>::type + >::type + operator/(const duration& d, const Rep2& s) + { + typedef typename common_type::type CR; + typedef duration CD; + + return CD(CD(d).count()/static_cast(s)); + } + + template + inline BOOST_CONSTEXPR + typename common_type::type + operator/(const duration& lhs, const duration& rhs) + { + typedef typename common_type, + duration >::type CD; + return CD(lhs).count() / CD(rhs).count(); + } + + #ifdef BOOST_CHRONO_EXTENSIONS + template + inline BOOST_CONSTEXPR + typename boost::disable_if , + typename boost::chrono::detail::duration_divide_result2< + Rep1, duration >::type + >::type + operator/(const Rep1& s, const duration& d) + { + typedef typename common_type::type CR; + typedef duration CD; + + return static_cast(s)/CD(d).count(); + } + #endif + // Duration % + + template + inline BOOST_CONSTEXPR + typename boost::disable_if , + typename boost::chrono::detail::duration_modulo_result< + duration, Rep2>::type + >::type + operator%(const duration& d, const Rep2& s) + { + typedef typename common_type::type CR; + typedef duration CD; + + return CD(CD(d).count()%static_cast(s)); + } + + template + inline BOOST_CONSTEXPR + typename common_type, duration >::type + operator%(const duration& lhs, + const duration& rhs) { + typedef typename common_type, + duration >::type CD; + + return CD(CD(lhs).count()%CD(rhs).count()); + } + + +//----------------------------------------------------------------------------// +// 20.9.3.6 duration comparisons [time.duration.comparisons] // +//----------------------------------------------------------------------------// + +namespace detail +{ + template + struct duration_eq + { + BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const RhsDuration& rhs) const + { + typedef typename common_type::type CD; + return CD(lhs).count() == CD(rhs).count(); + } + }; + + template + struct duration_eq + { + BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const LhsDuration& rhs) const + { + return lhs.count() == rhs.count(); + } + }; + + template + struct duration_lt + { + BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const RhsDuration& rhs) const + { + typedef typename common_type::type CD; + return CD(lhs).count() < CD(rhs).count(); + } + }; + + template + struct duration_lt + { + BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const LhsDuration& rhs) const + { + return lhs.count() < rhs.count(); + } + }; + +} // namespace detail + + // Duration == + + template + inline BOOST_CONSTEXPR + bool + operator==(const duration& lhs, + const duration& rhs) + { + return boost::chrono::detail::duration_eq< + duration, duration >()(lhs, rhs); + } + + // Duration != + + template + inline BOOST_CONSTEXPR + bool + operator!=(const duration& lhs, + const duration& rhs) + { + return !(lhs == rhs); + } + + // Duration < + + template + inline BOOST_CONSTEXPR + bool + operator< (const duration& lhs, + const duration& rhs) + { + return boost::chrono::detail::duration_lt< + duration, duration >()(lhs, rhs); + } + + // Duration > + + template + inline BOOST_CONSTEXPR + bool + operator> (const duration& lhs, + const duration& rhs) + { + return rhs < lhs; + } + + // Duration <= + + template + inline BOOST_CONSTEXPR + bool + operator<=(const duration& lhs, + const duration& rhs) + { + return !(rhs < lhs); + } + + // Duration >= + + template + inline BOOST_CONSTEXPR + bool + operator>=(const duration& lhs, + const duration& rhs) + { + return !(lhs < rhs); + } + +//----------------------------------------------------------------------------// +// 20.9.3.7 duration_cast [time.duration.cast] // +//----------------------------------------------------------------------------// + + // Compile-time select the most efficient algorithm for the conversion... + template + inline BOOST_CONSTEXPR + typename boost::enable_if < + boost::chrono::detail::is_duration, ToDuration>::type + duration_cast(const duration& fd) + { + return boost::chrono::detail::duration_cast< + duration, ToDuration>()(fd); + } + +} // namespace chrono +} // namespace boost + +#ifndef BOOST_CHRONO_HEADER_ONLY +// the suffix header occurs after all of our code: +#include // pops abi_prefix.hpp pragmas +#endif + +#endif // BOOST_CHRONO_DURATION_HPP diff --git a/ThirdParty/boost-Subset/boost/chrono/process_cpu_clocks.hpp b/ThirdParty/boost-Subset/boost/chrono/process_cpu_clocks.hpp new file mode 100644 index 0000000000..248837506e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/chrono/process_cpu_clocks.hpp @@ -0,0 +1,522 @@ +// boost/chrono/process_cpu_clocks.hpp -----------------------------------------------------------// + +// Copyright 2009-2011 Vicente J. Botet Escriba +// Copyright (c) Microsoft Corporation 2014 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// See http://www.boost.org/libs/system for documentation. + +#ifndef BOOST_CHRONO_PROCESS_CPU_CLOCKS_HPP +#define BOOST_CHRONO_PROCESS_CPU_CLOCKS_HPP + +#include + + +#if defined(BOOST_CHRONO_HAS_PROCESS_CLOCKS) + +#include +#include +#include +#include +#include +#include +#include + +#ifndef BOOST_CHRONO_HEADER_ONLY +#include // must be the last #include +#endif + +namespace boost { namespace chrono { + + class BOOST_CHRONO_DECL process_real_cpu_clock { + public: + typedef nanoseconds duration; + typedef duration::rep rep; + typedef duration::period period; + typedef chrono::time_point time_point; + BOOST_STATIC_CONSTEXPR bool is_steady = true; + + static BOOST_CHRONO_INLINE time_point now() BOOST_NOEXCEPT; +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING + static BOOST_CHRONO_INLINE time_point now(system::error_code & ec ); +#endif + }; + +#if ! BOOST_OS_WINDOWS || BOOST_PLAT_WINDOWS_DESKTOP + class BOOST_CHRONO_DECL process_user_cpu_clock { + public: + typedef nanoseconds duration; + typedef duration::rep rep; + typedef duration::period period; + typedef chrono::time_point time_point; + BOOST_STATIC_CONSTEXPR bool is_steady = true; + + static BOOST_CHRONO_INLINE time_point now() BOOST_NOEXCEPT; +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING + static BOOST_CHRONO_INLINE time_point now(system::error_code & ec ); +#endif + }; + + class BOOST_CHRONO_DECL process_system_cpu_clock { + public: + typedef nanoseconds duration; + typedef duration::rep rep; + typedef duration::period period; + typedef chrono::time_point time_point; + BOOST_STATIC_CONSTEXPR bool is_steady = true; + + static BOOST_CHRONO_INLINE time_point now() BOOST_NOEXCEPT; +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING + static BOOST_CHRONO_INLINE time_point now(system::error_code & ec ); +#endif + }; +#endif + + template + struct process_times + : arithmetic, + multiplicative, Rep, + less_than_comparable > > > + { + //typedef process_real_cpu_clock::rep rep; + typedef Rep rep; + process_times() + : real(0) + , user(0) + , system(0){} + +#if ! defined BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 + template + explicit process_times( + Rep2 r) + : real(r) + , user(r) + , system(r){} +#endif + template + explicit process_times( + process_times const& rhs) + : real(rhs.real) + , user(rhs.user) + , system(rhs.system){} + process_times( + rep r, + rep u, + rep s) + : real(r) + , user(u) + , system(s){} + + rep real; // real (i.e wall clock) time + rep user; // user cpu time + rep system; // system cpu time + +#if ! defined BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 + operator rep() const + { + return real; + } +#endif + template + bool operator==(process_times const& rhs) { + return (real==rhs.real && + user==rhs.user && + system==rhs.system); + } + + process_times& operator+=( + process_times const& rhs) + { + real+=rhs.real; + user+=rhs.user; + system+=rhs.system; + return *this; + } + process_times& operator-=( + process_times const& rhs) + { + real-=rhs.real; + user-=rhs.user; + system-=rhs.system; + return *this; + } + process_times& operator*=( + process_times const& rhs) + { + real*=rhs.real; + user*=rhs.user; + system*=rhs.system; + return *this; + } + process_times& operator*=(rep const& rhs) + { + real*=rhs; + user*=rhs; + system*=rhs; + return *this; + } + process_times& operator/=(process_times const& rhs) + { + real/=rhs.real; + user/=rhs.user; + system/=rhs.system; + return *this; + } + process_times& operator/=(rep const& rhs) + { + real/=rhs; + user/=rhs; + system/=rhs; + return *this; + } + bool operator<(process_times const & rhs) const + { + if (real < rhs.real) return true; + if (real > rhs.real) return false; + if (user < rhs.user) return true; + if (user > rhs.user) return false; + if (system < rhs.system) return true; + else return false; + } + + template + void print(std::basic_ostream& os) const + { + os << "{"<< real <<";"<< user <<";"<< system << "}"; + } + + template + void read(std::basic_istream& is) + { + typedef std::istreambuf_iterator in_iterator; + in_iterator i(is); + in_iterator e; + if (i == e || *i != '{') // mandatory '{' + { + is.setstate(is.failbit | is.eofbit); + return; + } + CharT x,y,z; + is >> real >> x >> user >> y >> system >> z; + if (!is.good() || (x != ';')|| (y != ';')|| (z != '}')) + { + is.setstate(is.failbit); + } + } + }; +} +template +struct common_type< + chrono::process_times, + chrono::process_times +> +{ + typedef chrono::process_times::type> type; +}; + +template +struct common_type< + chrono::process_times, + Rep2 +> +{ + typedef chrono::process_times::type> type; +}; + +template +struct common_type< + Rep1, + chrono::process_times +> +{ + typedef chrono::process_times::type> type; +}; + + +namespace chrono +{ + template + inline BOOST_CONSTEXPR + bool + operator==(const duration, Period1>& lhs, + const duration, Period2>& rhs) + { + return boost::chrono::detail::duration_eq< + duration, Period1>, duration, Period2> >()(lhs, rhs); + } + + template + inline BOOST_CONSTEXPR + bool + operator==(const duration, Period1>& lhs, + const duration& rhs) + { + return boost::chrono::detail::duration_eq< + duration, duration >()(duration(lhs.count().real), rhs); + } + + template + inline BOOST_CONSTEXPR + bool + operator==(const duration& lhs, + const duration, Period2>& rhs) + { + return rhs == lhs; + } + + + // Duration < + + template + inline BOOST_CONSTEXPR + bool + operator< (const duration, Period1>& lhs, + const duration& rhs) + { + return boost::chrono::detail::duration_lt< + duration, duration >()(duration(lhs.count().real), rhs); + } + + template + inline BOOST_CONSTEXPR + bool + operator< (const duration& lhs, + const duration, Period2>& rhs) + { + return rhs < lhs; + } + + template + inline BOOST_CONSTEXPR + bool + operator< (const duration, Period1>& lhs, + const duration, Period2>& rhs) + { + return boost::chrono::detail::duration_lt< + duration, duration >()(lhs, rhs); + } + + + typedef process_times process_cpu_clock_times; +#if ! BOOST_OS_WINDOWS || BOOST_PLAT_WINDOWS_DESKTOP + class BOOST_CHRONO_DECL process_cpu_clock + { + public: + + typedef process_cpu_clock_times times; + typedef boost::chrono::duration duration; + typedef duration::rep rep; + typedef duration::period period; + typedef chrono::time_point time_point; + BOOST_STATIC_CONSTEXPR bool is_steady = true; + + static BOOST_CHRONO_INLINE time_point now() BOOST_NOEXCEPT; +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING + static BOOST_CHRONO_INLINE time_point now(system::error_code & ec ); +#endif + }; +#endif + + template + std::basic_ostream& + operator<<(std::basic_ostream& os, + process_times const& rhs) + { + rhs.print(os); + return os; + } + + template + std::basic_istream& + operator>>(std::basic_istream& is, + process_times& rhs) + { + rhs.read(is); + return is; + } + + template + struct duration_values > + { + typedef process_times Res; + public: + static Res zero() + { + return Res(); + } + static Res max BOOST_PREVENT_MACRO_SUBSTITUTION () + { + return Res((std::numeric_limits::max)(), + (std::numeric_limits::max)(), + (std::numeric_limits::max)()); + } + static Res min BOOST_PREVENT_MACRO_SUBSTITUTION () + { + return Res((std::numeric_limits::min)(), + (std::numeric_limits::min)(), + (std::numeric_limits::min)()); + } + }; + + template + struct clock_string + { + static std::basic_string name() + { + static const CharT + u[] = + { 'p', 'r', 'o', 'c', 'e', 's', 's', '_', 'r', 'e', 'a', 'l', '_', 'c', 'l', 'o', 'c', 'k' }; + static const std::basic_string str(u, u + sizeof(u) + / sizeof(u[0])); + return str; + } + static std::basic_string since() + { + const CharT + u[] = + { ' ', 's', 'i', 'n', 'c', 'e', ' ', 'p', 'r', 'o', 'c', 'e', 's', 's', ' ', 's', 't', 'a', 'r', 't', '-', 'u', 'p' }; + const std::basic_string str(u, u + sizeof(u) / sizeof(u[0])); + return str; + } + }; + +#if ! BOOST_OS_WINDOWS || BOOST_PLAT_WINDOWS_DESKTOP + template + struct clock_string + { + static std::basic_string name() + { + static const CharT + u[] = + { 'p', 'r', 'o', 'c', 'e', 's', 's', '_', 'u', 's', 'e', 'r', '_', 'c', 'l', 'o', 'c', 'k' }; + static const std::basic_string str(u, u + sizeof(u) + / sizeof(u[0])); + return str; + } + static std::basic_string since() + { + const CharT + u[] = + { ' ', 's', 'i', 'n', 'c', 'e', ' ', 'p', 'r', 'o', 'c', 'e', 's', 's', ' ', 's', 't', 'a', 'r', 't', '-', 'u', 'p' }; + const std::basic_string str(u, u + sizeof(u) / sizeof(u[0])); + return str; + } + }; + + template + struct clock_string + { + static std::basic_string name() + { + static const CharT + u[] = + { 'p', 'r', 'o', 'c', 'e', 's', 's', '_', 's', 'y', 's', 't', 't', 'e', 'm', '_', 'c', 'l', 'o', 'c', 'k' }; + static const std::basic_string str(u, u + sizeof(u) + / sizeof(u[0])); + return str; + } + static std::basic_string since() + { + const CharT + u[] = + { ' ', 's', 'i', 'n', 'c', 'e', ' ', 'p', 'r', 'o', 'c', 'e', 's', 's', ' ', 's', 't', 'a', 'r', 't', '-', 'u', 'p' }; + const std::basic_string str(u, u + sizeof(u) / sizeof(u[0])); + return str; + } + }; + + template + struct clock_string + { + static std::basic_string name() + { + static const CharT u[] = + { 'p', 'r', 'o', 'c', 'e', 's', 's', '_', 'c', 'l', 'o', 'c', 'k' }; + static const std::basic_string str(u, u + sizeof(u) + / sizeof(u[0])); + return str; + } + static std::basic_string since() + { + const CharT + u[] = + { ' ', 's', 'i', 'n', 'c', 'e', ' ', 'p', 'r', 'o', 'c', 'e', 's', 's', ' ', 's', 't', 'a', 'r', 't', '-', 'u', 'p' }; + const std::basic_string str(u, u + sizeof(u) / sizeof(u[0])); + return str; + } + }; +#endif + +} // namespace chrono +} // namespace boost + +namespace std { + + template + struct numeric_limits > + { + typedef boost::chrono::process_times Res; + + public: + static const bool is_specialized = true; + static Res min BOOST_PREVENT_MACRO_SUBSTITUTION () + { + return Res((std::numeric_limits::min)(), + (std::numeric_limits::min)(), + (std::numeric_limits::min)()); + } + static Res max BOOST_PREVENT_MACRO_SUBSTITUTION () + { + return Res((std::numeric_limits::max)(), + (std::numeric_limits::max)(), + (std::numeric_limits::max)()); + } + static Res lowest() throw() + { + return (min)(); + } + static const int digits = std::numeric_limits::digits+ + std::numeric_limits::digits+ + std::numeric_limits::digits; + static const int digits10 = std::numeric_limits::digits10+ + std::numeric_limits::digits10+ + std::numeric_limits::digits10; + static const bool is_signed = Rep::is_signed; + static const bool is_integer = Rep::is_integer; + static const bool is_exact = Rep::is_exact; + static const int radix = 0; + //~ static Res epsilon() throw() { return 0; } + //~ static Res round_error() throw() { return 0; } + //~ static const int min_exponent = 0; + //~ static const int min_exponent10 = 0; + //~ static const int max_exponent = 0; + //~ static const int max_exponent10 = 0; + //~ static const bool has_infinity = false; + //~ static const bool has_quiet_NaN = false; + //~ static const bool has_signaling_NaN = false; + //~ static const float_denorm_style has_denorm = denorm_absent; + //~ static const bool has_denorm_loss = false; + //~ static Res infinity() throw() { return 0; } + //~ static Res quiet_NaN() throw() { return 0; } + //~ static Res signaling_NaN() throw() { return 0; } + //~ static Res denorm_min() throw() { return 0; } + //~ static const bool is_iec559 = false; + //~ static const bool is_bounded = true; + //~ static const bool is_modulo = false; + //~ static const bool traps = false; + //~ static const bool tinyness_before = false; + //~ static const float_round_style round_style = round_toward_zero; + + }; +} + +#ifndef BOOST_CHRONO_HEADER_ONLY +#include // pops abi_prefix.hpp pragmas +#else +#include +#endif +#endif + +#endif // BOOST_CHRONO_PROCESS_CPU_CLOCKS_HPP diff --git a/ThirdParty/boost-Subset/boost/chrono/system_clocks.hpp b/ThirdParty/boost-Subset/boost/chrono/system_clocks.hpp new file mode 100644 index 0000000000..5ba6a3b0e9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/chrono/system_clocks.hpp @@ -0,0 +1,233 @@ +// boost/chrono/system_clocks.hpp --------------------------------------------------------------// + +// Copyright 2008 Howard Hinnant +// Copyright 2008 Beman Dawes +// Copyright 2009-2011 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +/* + +This code was derived by Beman Dawes from Howard Hinnant's time2_demo prototype. +Many thanks to Howard for making his code available under the Boost license. +The original code was modified to conform to Boost conventions and to section +20.9 Time utilities [time] of the C++ committee's working paper N2798. +See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf. + +time2_demo contained this comment: + + Much thanks to Andrei Alexandrescu, + Walter Brown, + Peter Dimov, + Jeff Garland, + Terry Golubiewski, + Daniel Krugler, + Anthony Williams. +*/ + +/* + +TODO: + + * Fully implement error handling, with test cases. + * Consider issues raised by Michael Marcin: + + > In the past I've seen QueryPerformanceCounter give incorrect results, + > especially with SpeedStep processors on laptops. This was many years ago and + > might have been fixed by service packs and drivers. + > + > Typically you check the results of QPC against GetTickCount to see if the + > results are reasonable. + > http://support.microsoft.com/kb/274323 + > + > I've also heard of problems with QueryPerformanceCounter in multi-processor + > systems. + > + > I know some people SetThreadAffinityMask to 1 for the current thread call + > their QueryPerformance* functions then restore SetThreadAffinityMask. This + > seems horrible to me because it forces your program to jump to another + > physical processor if it isn't already on cpu0 but they claim it worked well + > in practice because they called the timing functions infrequently. + > + > In the past I have chosen to use timeGetTime with timeBeginPeriod(1) for + > high resolution timers to avoid these issues. + +*/ + +#ifndef BOOST_CHRONO_SYSTEM_CLOCKS_HPP +#define BOOST_CHRONO_SYSTEM_CLOCKS_HPP + +#include +#include +#include +#include +#include + +#include + +# if defined( BOOST_CHRONO_POSIX_API ) +# if ! defined(CLOCK_REALTIME) && ! defined (__hpux__) +# error does not supply CLOCK_REALTIME +# endif +# endif + +#ifdef BOOST_CHRONO_WINDOWS_API +// The system_clock tick is 100 nanoseconds +# define BOOST_SYSTEM_CLOCK_DURATION boost::chrono::duration > +#else +# define BOOST_SYSTEM_CLOCK_DURATION boost::chrono::nanoseconds +#endif + +// this must occur after all of the includes and before any code appears: +#ifndef BOOST_CHRONO_HEADER_ONLY +#include // must be the last #include +#endif + + +//----------------------------------------------------------------------------// +// // +// 20.9 Time utilities [time] // +// synopsis // +// // +//----------------------------------------------------------------------------// + +namespace boost { +namespace chrono { + + // Clocks + class BOOST_CHRONO_DECL system_clock; +#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY + class BOOST_CHRONO_DECL steady_clock; +#endif + +#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY + typedef steady_clock high_resolution_clock; // as permitted by [time.clock.hires] +#else + typedef system_clock high_resolution_clock; // as permitted by [time.clock.hires] +#endif + +//----------------------------------------------------------------------------// +// // +// 20.9.5 Clocks [time.clock] // +// // +//----------------------------------------------------------------------------// + +// If you're porting, clocks are the system-specific (non-portable) part. +// You'll need to know how to get the current time and implement that under now(). +// You'll need to know what units (tick period) and representation makes the most +// sense for your clock and set those accordingly. +// If you know how to map this clock to time_t (perhaps your clock is std::time, which +// makes that trivial), then you can fill out system_clock's to_time_t() and from_time_t(). + +//----------------------------------------------------------------------------// +// 20.9.5.1 Class system_clock [time.clock.system] // +//----------------------------------------------------------------------------// + + class BOOST_CHRONO_DECL system_clock + { + public: + typedef BOOST_SYSTEM_CLOCK_DURATION duration; + typedef duration::rep rep; + typedef duration::period period; + typedef chrono::time_point time_point; + BOOST_STATIC_CONSTEXPR bool is_steady = false; + + static BOOST_CHRONO_INLINE time_point now() BOOST_NOEXCEPT; +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING + static BOOST_CHRONO_INLINE time_point now(system::error_code & ec); +#endif + + static BOOST_CHRONO_INLINE std::time_t to_time_t(const time_point& t) BOOST_NOEXCEPT; + static BOOST_CHRONO_INLINE time_point from_time_t(std::time_t t) BOOST_NOEXCEPT; + }; + +//----------------------------------------------------------------------------// +// 20.9.5.2 Class steady_clock [time.clock.steady] // +//----------------------------------------------------------------------------// + +// As permitted by [time.clock.steady] +// The class steady_clock is conditionally supported. + +#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY + class BOOST_CHRONO_DECL steady_clock + { + public: + typedef nanoseconds duration; + typedef duration::rep rep; + typedef duration::period period; + typedef chrono::time_point time_point; + BOOST_STATIC_CONSTEXPR bool is_steady = true; + + static BOOST_CHRONO_INLINE time_point now() BOOST_NOEXCEPT; +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING + static BOOST_CHRONO_INLINE time_point now(system::error_code & ec); +#endif + }; +#endif +//----------------------------------------------------------------------------// +// 20.9.5.3 Class high_resolution_clock [time.clock.hires] // +//----------------------------------------------------------------------------// + +// As permitted, steady_clock or system_clock is a typedef for high_resolution_clock. +// See synopsis. + + + template + struct clock_string + { + static std::basic_string name() + { + static const CharT u[] = + { 's', 'y', 's', 't', 'e', 'm', '_', 'c', 'l', 'o', 'c', 'k' }; + static const std::basic_string str(u, u + sizeof(u) + / sizeof(u[0])); + return str; + } + static std::basic_string since() + { + static const CharT + u[] = + { ' ', 's', 'i', 'n', 'c', 'e', ' ', 'J', 'a', 'n', ' ', '1', ',', ' ', '1', '9', '7', '0' }; + static const std::basic_string str(u, u + sizeof(u) + / sizeof(u[0])); + return str; + } + }; + +#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY + + template + struct clock_string + { + static std::basic_string name() + { + static const CharT + u[] = + { 's', 't', 'e', 'a', 'd', 'y', '_', 'c', 'l', 'o', 'c', 'k' }; + static const std::basic_string str(u, u + sizeof(u) + / sizeof(u[0])); + return str; + } + static std::basic_string since() + { + const CharT u[] = + { ' ', 's', 'i', 'n', 'c', 'e', ' ', 'b', 'o', 'o', 't' }; + const std::basic_string str(u, u + sizeof(u) / sizeof(u[0])); + return str; + } + }; + +#endif + +} // namespace chrono +} // namespace boost + +#ifndef BOOST_CHRONO_HEADER_ONLY +// the suffix header occurs after all of our code: +#include // pops abi_prefix.hpp pragmas +#else +#include +#endif + +#endif // BOOST_CHRONO_SYSTEM_CLOCKS_HPP diff --git a/ThirdParty/boost-Subset/boost/chrono/thread_clock.hpp b/ThirdParty/boost-Subset/boost/chrono/thread_clock.hpp new file mode 100644 index 0000000000..207697b4cc --- /dev/null +++ b/ThirdParty/boost-Subset/boost/chrono/thread_clock.hpp @@ -0,0 +1,75 @@ +// boost/chrono/thread_clock.hpp -----------------------------------------------------------// + +// Copyright 2009-2011 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// See http://www.boost.org/libs/system for documentation. + +#include + +#ifndef BOOST_CHRONO_THREAD_CLOCK_HPP +#define BOOST_CHRONO_THREAD_CLOCK_HPP + +#if defined(BOOST_CHRONO_HAS_THREAD_CLOCK) + +#include +#include +#include +#include +#include + +#ifndef BOOST_CHRONO_HEADER_ONLY +#include // must be the last #include +#endif + +namespace boost { namespace chrono { + +class BOOST_CHRONO_DECL thread_clock { +public: + typedef nanoseconds duration; + typedef duration::rep rep; + typedef duration::period period; + typedef chrono::time_point time_point; + BOOST_STATIC_CONSTEXPR bool is_steady = BOOST_CHRONO_THREAD_CLOCK_IS_STEADY; + + static BOOST_CHRONO_INLINE time_point now( ) BOOST_NOEXCEPT; +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING + static BOOST_CHRONO_INLINE time_point now( system::error_code & ec ); +#endif +}; + +template +struct clock_string +{ + static std::basic_string name() + { + static const CharT u[] = + { 't', 'h', 'r', 'e', 'a', 'd', '_', + 'c', 'l','o', 'c', 'k'}; + static const std::basic_string str(u, u + sizeof(u)/sizeof(u[0])); + return str; + } + static std::basic_string since() + { + const CharT u[] = + { ' ', 's', 'i', 'n', 'c', 'e', ' ', 't', 'h', 'r', 'e', 'a', 'd', ' ', 's', 't', 'a', 'r', 't', '-', 'u', 'p'}; + const std::basic_string str(u, u + sizeof(u)/sizeof(u[0])); + return str; + } +}; + +} // namespace chrono +} // namespace boost + + +#ifndef BOOST_CHRONO_HEADER_ONLY +#include // pops abi_prefix.hpp pragmas +#else +#include +#endif + +#endif + +#endif // BOOST_CHRONO_THREAD_CLOCK_HPP diff --git a/ThirdParty/boost-Subset/boost/chrono/time_point.hpp b/ThirdParty/boost-Subset/boost/chrono/time_point.hpp new file mode 100644 index 0000000000..6449fac6e1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/chrono/time_point.hpp @@ -0,0 +1,380 @@ +// duration.hpp --------------------------------------------------------------// + +// Copyright 2008 Howard Hinnant +// Copyright 2008 Beman Dawes +// Copyright 2009-2012 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +/* + +This code was derived by Beman Dawes from Howard Hinnant's time2_demo prototype. +Many thanks to Howard for making his code available under the Boost license. +The original code was modified to conform to Boost conventions and to section +20.9 Time utilities [time] of the C++ committee's working paper N2798. +See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf. + +time2_demo contained this comment: + + Much thanks to Andrei Alexandrescu, + Walter Brown, + Peter Dimov, + Jeff Garland, + Terry Golubiewski, + Daniel Krugler, + Anthony Williams. +*/ + + +#ifndef BOOST_CHRONO_TIME_POINT_HPP +#define BOOST_CHRONO_TIME_POINT_HPP + +#include +#include + +#ifndef BOOST_CHRONO_HEADER_ONLY +// this must occur after all of the includes and before any code appears: +#include // must be the last #include +#endif + +//----------------------------------------------------------------------------// +// // +// 20.9 Time utilities [time] // +// synopsis // +// // +//----------------------------------------------------------------------------// + +namespace boost { +namespace chrono { + + template + class time_point; + + +} // namespace chrono + + +// common_type trait specializations + +template + struct common_type, + chrono::time_point >; + + +//----------------------------------------------------------------------------// +// 20.9.2.3 Specializations of common_type [time.traits.specializations] // +//----------------------------------------------------------------------------// + + +template +struct common_type, + chrono::time_point > +{ + typedef chrono::time_point::type> type; +}; + + + +namespace chrono { + + // time_point arithmetic + template + inline BOOST_CONSTEXPR + time_point >::type> + operator+( + const time_point& lhs, + const duration& rhs); + template + inline BOOST_CONSTEXPR + time_point, Duration2>::type> + operator+( + const duration& lhs, + const time_point& rhs); + template + inline BOOST_CONSTEXPR + time_point >::type> + operator-( + const time_point& lhs, + const duration& rhs); + template + inline BOOST_CONSTEXPR + typename common_type::type + operator-( + const time_point& lhs, + const time_point& rhs); + + // time_point comparisons + template + inline BOOST_CONSTEXPR + bool operator==( + const time_point& lhs, + const time_point& rhs); + template + inline BOOST_CONSTEXPR + bool operator!=( + const time_point& lhs, + const time_point& rhs); + template + inline BOOST_CONSTEXPR + bool operator< ( + const time_point& lhs, + const time_point& rhs); + template + inline BOOST_CONSTEXPR + bool operator<=( + const time_point& lhs, + const time_point& rhs); + template + inline BOOST_CONSTEXPR + bool operator> ( + const time_point& lhs, + const time_point& rhs); + template + inline BOOST_CONSTEXPR + bool operator>=( + const time_point& lhs, + const time_point& rhs); + + // time_point_cast + template + inline BOOST_CONSTEXPR + time_point time_point_cast(const time_point& t); + +//----------------------------------------------------------------------------// +// // +// 20.9.4 Class template time_point [time.point] // +// // +//----------------------------------------------------------------------------// + + template + class time_point + { + BOOST_CHRONO_STATIC_ASSERT(boost::chrono::detail::is_duration::value, + BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_TIME_POINT_MUST_BE_A_BOOST_CHRONO_DURATION, (Duration)); + public: + typedef Clock clock; + typedef Duration duration; + typedef typename duration::rep rep; + typedef typename duration::period period; + typedef Duration difference_type; + + private: + duration d_; + + public: + BOOST_FORCEINLINE BOOST_CONSTEXPR + time_point() : d_(duration::zero()) + {} + BOOST_FORCEINLINE BOOST_CONSTEXPR + explicit time_point(const duration& d) + : d_(d) + {} + + // conversions + template + BOOST_FORCEINLINE BOOST_CONSTEXPR + time_point(const time_point& t + , typename boost::enable_if + < + boost::is_convertible + >::type* = 0 + ) + : d_(t.time_since_epoch()) + { + } + // observer + + BOOST_CONSTEXPR + duration time_since_epoch() const + { + return d_; + } + + // arithmetic + +#ifdef BOOST_CHRONO_EXTENSIONS + BOOST_CONSTEXPR + time_point operator+() const {return *this;} + BOOST_CONSTEXPR + time_point operator-() const {return time_point(-d_);} + time_point& operator++() {++d_; return *this;} + time_point operator++(int) {return time_point(d_++);} + time_point& operator--() {--d_; return *this;} + time_point operator--(int) {return time_point(d_--);} + + time_point& operator+=(const rep& r) {d_ += duration(r); return *this;} + time_point& operator-=(const rep& r) {d_ -= duration(r); return *this;} + +#endif + + time_point& operator+=(const duration& d) {d_ += d; return *this;} + time_point& operator-=(const duration& d) {d_ -= d; return *this;} + + // special values + + static BOOST_CHRONO_LIB_CONSTEXPR time_point + min BOOST_PREVENT_MACRO_SUBSTITUTION () + { + return time_point((duration::min)()); + } + static BOOST_CHRONO_LIB_CONSTEXPR time_point + max BOOST_PREVENT_MACRO_SUBSTITUTION () + { + return time_point((duration::max)()); + } + }; + +//----------------------------------------------------------------------------// +// 20.9.4.5 time_point non-member arithmetic [time.point.nonmember] // +//----------------------------------------------------------------------------// + + // time_point operator+(time_point x, duration y); + + template + inline BOOST_CONSTEXPR + time_point >::type> + operator+(const time_point& lhs, + const duration& rhs) + { + typedef typename common_type >::type CDuration; + typedef time_point< + Clock, + CDuration + > TimeResult; + return TimeResult(lhs.time_since_epoch() + CDuration(rhs)); + } + + // time_point operator+(duration x, time_point y); + + template + inline BOOST_CONSTEXPR + time_point, Duration2>::type> + operator+(const duration& lhs, + const time_point& rhs) + { + return rhs + lhs; + } + + // time_point operator-(time_point x, duration y); + + template + inline BOOST_CONSTEXPR + time_point >::type> + operator-(const time_point& lhs, + const duration& rhs) + { + return lhs + (-rhs); + } + + // duration operator-(time_point x, time_point y); + + template + inline BOOST_CONSTEXPR + typename common_type::type + operator-(const time_point& lhs, + const time_point& rhs) + { + return lhs.time_since_epoch() - rhs.time_since_epoch(); + } + +//----------------------------------------------------------------------------// +// 20.9.4.6 time_point comparisons [time.point.comparisons] // +//----------------------------------------------------------------------------// + + // time_point == + + template + inline BOOST_CONSTEXPR + bool + operator==(const time_point& lhs, + const time_point& rhs) + { + return lhs.time_since_epoch() == rhs.time_since_epoch(); + } + + // time_point != + + template + inline BOOST_CONSTEXPR + bool + operator!=(const time_point& lhs, + const time_point& rhs) + { + return !(lhs == rhs); + } + + // time_point < + + template + inline BOOST_CONSTEXPR + bool + operator<(const time_point& lhs, + const time_point& rhs) + { + return lhs.time_since_epoch() < rhs.time_since_epoch(); + } + + // time_point > + + template + inline BOOST_CONSTEXPR + bool + operator>(const time_point& lhs, + const time_point& rhs) + { + return rhs < lhs; + } + + // time_point <= + + template + inline BOOST_CONSTEXPR + bool + operator<=(const time_point& lhs, + const time_point& rhs) + { + return !(rhs < lhs); + } + + // time_point >= + + template + inline BOOST_CONSTEXPR + bool + operator>=(const time_point& lhs, + const time_point& rhs) + { + return !(lhs < rhs); + } + +//----------------------------------------------------------------------------// +// 20.9.4.7 time_point_cast [time.point.cast] // +//----------------------------------------------------------------------------// + + template + inline BOOST_CONSTEXPR + time_point + time_point_cast(const time_point& t) + { + return time_point( + duration_cast(t.time_since_epoch())); + } + +} // namespace chrono +} // namespace boost + +#ifndef BOOST_CHRONO_HEADER_ONLY +// the suffix header occurs after all of our code: +#include // pops abi_prefix.hpp pragmas +#endif + +#endif // BOOST_CHRONO_TIME_POINT_HPP diff --git a/ThirdParty/boost-Subset/boost/concept/assert.hpp b/ThirdParty/boost-Subset/boost/concept/assert.hpp new file mode 100644 index 0000000000..cf98179522 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/concept/assert.hpp @@ -0,0 +1,45 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_ASSERT_DWA2006430_HPP +# define BOOST_CONCEPT_ASSERT_DWA2006430_HPP + +# include +# include + +// The old protocol used a constraints() member function in concept +// checking classes. If the compiler supports SFINAE, we can detect +// that function and seamlessly support the old concept checking +// classes. In this release, backward compatibility with the old +// concept checking classes is enabled by default, where available. +// The old protocol is deprecated, though, and backward compatibility +// will no longer be the default in the next release. + +# if !defined(BOOST_NO_OLD_CONCEPT_SUPPORT) \ + && !defined(BOOST_NO_SFINAE) \ + \ + && !(BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, < 4)) + +// Note: gcc-2.96 through 3.3.x have some SFINAE, but no ability to +// check for the presence of particularmember functions. + +# define BOOST_OLD_CONCEPT_SUPPORT + +# endif + +# ifdef BOOST_MSVC +# include +# elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +# include +# else +# include +# endif + + // Usage, in class or function context: + // + // BOOST_CONCEPT_ASSERT((UnaryFunctionConcept)); + // +# define BOOST_CONCEPT_ASSERT(ModelInParens) \ + BOOST_CONCEPT_ASSERT_FN(void(*)ModelInParens) + +#endif // BOOST_CONCEPT_ASSERT_DWA2006430_HPP diff --git a/ThirdParty/boost-Subset/boost/concept/detail/backward_compatibility.hpp b/ThirdParty/boost-Subset/boost/concept/detail/backward_compatibility.hpp new file mode 100644 index 0000000000..66d573ef4b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/concept/detail/backward_compatibility.hpp @@ -0,0 +1,16 @@ +// Copyright David Abrahams 2009. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP +# define BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP + +namespace boost +{ + namespace concepts {} + +# if defined(BOOST_HAS_CONCEPTS) && !defined(BOOST_CONCEPT_NO_BACKWARD_KEYWORD) + namespace concept = concepts; +# endif +} // namespace boost::concept + +#endif // BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP diff --git a/ThirdParty/boost-Subset/boost/concept/detail/borland.hpp b/ThirdParty/boost-Subset/boost/concept/detail/borland.hpp new file mode 100644 index 0000000000..300d5d4050 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/concept/detail/borland.hpp @@ -0,0 +1,30 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP +# define BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP + +# include +# include + +namespace boost { namespace concepts { + +template +struct require; + +template +struct require +{ + enum { instantiate = sizeof((((Model*)0)->~Model()), 3) }; +}; + +# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \ + enum \ + { \ + BOOST_PP_CAT(boost_concept_check,__LINE__) = \ + boost::concepts::require::instantiate \ + } + +}} // namespace boost::concept + +#endif // BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP diff --git a/ThirdParty/boost-Subset/boost/concept/detail/concept_def.hpp b/ThirdParty/boost-Subset/boost/concept/detail/concept_def.hpp new file mode 100644 index 0000000000..750561ee30 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/concept/detail/concept_def.hpp @@ -0,0 +1,34 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP +# define BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP +# include +# include +# include +# include +#endif // BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP + +// BOOST_concept(SomeName, (p1)(p2)...(pN)) +// +// Expands to "template struct SomeName" +// +// Also defines an equivalent SomeNameConcept for backward compatibility. +// Maybe in the next release we can kill off the "Concept" suffix for good. +# define BOOST_concept(name, params) \ + template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ + struct name; /* forward declaration */ \ + \ + template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ + struct BOOST_PP_CAT(name,Concept) \ + : name< BOOST_PP_SEQ_ENUM(params) > \ + { \ + }; \ + \ + template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ + struct name + +// Helper for BOOST_concept, above. +# define BOOST_CONCEPT_typename(r, ignored, index, t) \ + BOOST_PP_COMMA_IF(index) typename t + diff --git a/ThirdParty/boost-Subset/boost/concept/detail/concept_undef.hpp b/ThirdParty/boost-Subset/boost/concept/detail/concept_undef.hpp new file mode 100644 index 0000000000..713db89123 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/concept/detail/concept_undef.hpp @@ -0,0 +1,5 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +# undef BOOST_concept_typename +# undef BOOST_concept diff --git a/ThirdParty/boost-Subset/boost/concept/detail/general.hpp b/ThirdParty/boost-Subset/boost/concept/detail/general.hpp new file mode 100644 index 0000000000..525ea656c2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/concept/detail/general.hpp @@ -0,0 +1,77 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP +# define BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP + +# include +# include +# include + +# ifdef BOOST_OLD_CONCEPT_SUPPORT +# include +# include +# endif + +// This implementation works on Comeau and GCC, all the way back to +// 2.95 +namespace boost { namespace concepts { + +template +struct requirement_; + +namespace detail +{ + template struct instantiate {}; +} + +template +struct requirement +{ + static void failed() { ((Model*)0)->~Model(); } +}; + +struct failed {}; + +template +struct requirement +{ + static void failed() { ((Model*)0)->~Model(); } +}; + +# ifdef BOOST_OLD_CONCEPT_SUPPORT + +template +struct constraint +{ + static void failed() { ((Model*)0)->constraints(); } +}; + +template +struct requirement_ + : mpl::if_< + concepts::not_satisfied + , constraint + , requirement + >::type +{}; + +# else + +// For GCC-2.x, these can't have exactly the same name +template +struct requirement_ + : requirement +{}; + +# endif + +# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \ + typedef ::boost::concepts::detail::instantiate< \ + &::boost::concepts::requirement_::failed> \ + BOOST_PP_CAT(boost_concept_check,__LINE__) \ + BOOST_ATTRIBUTE_UNUSED + +}} + +#endif // BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP diff --git a/ThirdParty/boost-Subset/boost/concept/detail/has_constraints.hpp b/ThirdParty/boost-Subset/boost/concept/detail/has_constraints.hpp new file mode 100644 index 0000000000..a309db3d88 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/concept/detail/has_constraints.hpp @@ -0,0 +1,50 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP +# define BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP + +# include +# include +# include + +namespace boost { namespace concepts { + +namespace detail +{ + +// Here we implement the metafunction that detects whether a +// constraints metafunction exists + typedef char yes; + typedef char (&no)[2]; + + template + struct wrap_constraints {}; + +#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580) || defined(__CUDACC__) + // Work around the following bogus error in Sun Studio 11, by + // turning off the has_constraints function entirely: + // Error: complex expression not allowed in dependent template + // argument expression + inline no has_constraints_(...); +#else + template + inline yes has_constraints_(Model*, wrap_constraints* = 0); + inline no has_constraints_(...); +#endif +} + +// This would be called "detail::has_constraints," but it has a strong +// tendency to show up in error messages. +template +struct not_satisfied +{ + BOOST_STATIC_CONSTANT( + bool + , value = sizeof( detail::has_constraints_((Model*)0) ) == sizeof(detail::yes) ); + typedef mpl::bool_ type; +}; + +}} // namespace boost::concepts::detail + +#endif // BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP diff --git a/ThirdParty/boost-Subset/boost/concept/detail/msvc.hpp b/ThirdParty/boost-Subset/boost/concept/detail/msvc.hpp new file mode 100644 index 0000000000..078dd22330 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/concept/detail/msvc.hpp @@ -0,0 +1,123 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP +# define BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP + +# include +# include +# include + +# ifdef BOOST_OLD_CONCEPT_SUPPORT +# include +# include +# endif + +# ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable:4100) +# endif + +namespace boost { namespace concepts { + + +template +struct check +{ + virtual void failed(Model* x) + { + x->~Model(); + } +}; + +# ifndef BOOST_NO_PARTIAL_SPECIALIZATION +struct failed {}; +template +struct check +{ + virtual void failed(Model* x) + { + x->~Model(); + } +}; +# endif + +# ifdef BOOST_OLD_CONCEPT_SUPPORT + +namespace detail +{ + // No need for a virtual function here, since evaluating + // not_satisfied below will have already instantiated the + // constraints() member. + struct constraint {}; +} + +template +struct require + : mpl::if_c< + not_satisfied::value + , detail::constraint +# ifndef BOOST_NO_PARTIAL_SPECIALIZATION + , check +# else + , check +# endif + >::type +{}; + +# else + +template +struct require +# ifndef BOOST_NO_PARTIAL_SPECIALIZATION + : check +# else + : check +# endif +{}; + +# endif + +# if BOOST_WORKAROUND(BOOST_MSVC, == 1310) + +// +// The iterator library sees some really strange errors unless we +// do things this way. +// +template +struct require +{ + virtual void failed(Model*) + { + require(); + } +}; + +# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \ +enum \ +{ \ + BOOST_PP_CAT(boost_concept_check,__LINE__) = \ + sizeof(::boost::concepts::require) \ +} + +# else // Not vc-7.1 + +template +require +require_(void(*)(Model)); + +# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \ +enum \ +{ \ + BOOST_PP_CAT(boost_concept_check,__LINE__) = \ + sizeof(::boost::concepts::require_((ModelFnPtr)0)) \ +} + +# endif +}} + +# ifdef BOOST_MSVC +# pragma warning(pop) +# endif + +#endif // BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP diff --git a/ThirdParty/boost-Subset/boost/concept/usage.hpp b/ThirdParty/boost-Subset/boost/concept/usage.hpp new file mode 100644 index 0000000000..e73370fb37 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/concept/usage.hpp @@ -0,0 +1,36 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_USAGE_DWA2006919_HPP +# define BOOST_CONCEPT_USAGE_DWA2006919_HPP + +# include +# include +# include + +namespace boost { namespace concepts { + +template +struct usage_requirements +{ + ~usage_requirements() { ((Model*)0)->~Model(); } +}; + +# if BOOST_WORKAROUND(__GNUC__, <= 3) + +# define BOOST_CONCEPT_USAGE(model) \ + model(); /* at least 2.96 and 3.4.3 both need this :( */ \ + BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements)); \ + ~model() + +# else + +# define BOOST_CONCEPT_USAGE(model) \ + BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements)); \ + ~model() + +# endif + +}} // namespace boost::concepts + +#endif // BOOST_CONCEPT_USAGE_DWA2006919_HPP diff --git a/ThirdParty/boost-Subset/boost/concept_check.hpp b/ThirdParty/boost-Subset/boost/concept_check.hpp new file mode 100644 index 0000000000..2d6fa32332 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/concept_check.hpp @@ -0,0 +1,1083 @@ +// +// (C) Copyright Jeremy Siek 2000. +// Copyright 2002 The Trustees of Indiana University. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// Revision History: +// 05 May 2001: Workarounds for HP aCC from Thomas Matelich. (Jeremy Siek) +// 02 April 2001: Removed limits header altogether. (Jeremy Siek) +// 01 April 2001: Modified to use new header. (JMaddock) +// + +// See http://www.boost.org/libs/concept_check for documentation. + +#ifndef BOOST_CONCEPT_CHECKS_HPP +# define BOOST_CONCEPT_CHECKS_HPP + +# include + +# include +# include +# include +# include +# include +# include +# include +# include +# include + +# include +# include + +#if (defined _MSC_VER) +# pragma warning( push ) +# pragma warning( disable : 4510 ) // default constructor could not be generated +# pragma warning( disable : 4610 ) // object 'class' can never be instantiated - user-defined constructor required +#endif + +namespace boost +{ + + // + // Backward compatibility + // + + template + inline void function_requires(Model* = 0) + { + BOOST_CONCEPT_ASSERT((Model)); + } + template inline void ignore_unused_variable_warning(T const&) {} + +# define BOOST_CLASS_REQUIRE(type_var, ns, concept) \ + BOOST_CONCEPT_ASSERT((ns::concept)) + +# define BOOST_CLASS_REQUIRE2(type_var1, type_var2, ns, concept) \ + BOOST_CONCEPT_ASSERT((ns::concept)) + +# define BOOST_CLASS_REQUIRE3(tv1, tv2, tv3, ns, concept) \ + BOOST_CONCEPT_ASSERT((ns::concept)) + +# define BOOST_CLASS_REQUIRE4(tv1, tv2, tv3, tv4, ns, concept) \ + BOOST_CONCEPT_ASSERT((ns::concept)) + + + // + // Begin concept definitions + // + BOOST_concept(Integer, (T)) + { + BOOST_CONCEPT_USAGE(Integer) + { + x.error_type_must_be_an_integer_type(); + } + private: + T x; + }; + + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; +# if defined(BOOST_HAS_LONG_LONG) + template <> struct Integer< ::boost::long_long_type> {}; + template <> struct Integer< ::boost::ulong_long_type> {}; +# elif defined(BOOST_HAS_MS_INT64) + template <> struct Integer<__int64> {}; + template <> struct Integer {}; +# endif + + BOOST_concept(SignedInteger,(T)) { + BOOST_CONCEPT_USAGE(SignedInteger) { + x.error_type_must_be_a_signed_integer_type(); + } + private: + T x; + }; + template <> struct SignedInteger { }; + template <> struct SignedInteger {}; + template <> struct SignedInteger {}; + template <> struct SignedInteger {}; +# if defined(BOOST_HAS_LONG_LONG) + template <> struct SignedInteger< ::boost::long_long_type> {}; +# elif defined(BOOST_HAS_MS_INT64) + template <> struct SignedInteger<__int64> {}; +# endif + + BOOST_concept(UnsignedInteger,(T)) { + BOOST_CONCEPT_USAGE(UnsignedInteger) { + x.error_type_must_be_an_unsigned_integer_type(); + } + private: + T x; + }; + + template <> struct UnsignedInteger {}; + template <> struct UnsignedInteger {}; + template <> struct UnsignedInteger {}; + template <> struct UnsignedInteger {}; +# if defined(BOOST_HAS_LONG_LONG) + template <> struct UnsignedInteger< ::boost::ulong_long_type> {}; +# elif defined(BOOST_HAS_MS_INT64) + template <> struct UnsignedInteger {}; +# endif + + //=========================================================================== + // Basic Concepts + + BOOST_concept(DefaultConstructible,(TT)) + { + BOOST_CONCEPT_USAGE(DefaultConstructible) { + TT a; // require default constructor + ignore_unused_variable_warning(a); + } + }; + + BOOST_concept(Assignable,(TT)) + { + BOOST_CONCEPT_USAGE(Assignable) { +#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL + a = b; // require assignment operator +#endif + const_constraints(b); + } + private: + void const_constraints(const TT& x) { +#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL + a = x; // const required for argument to assignment +#else + ignore_unused_variable_warning(x); +#endif + } + private: + TT a; + TT b; + }; + + + BOOST_concept(CopyConstructible,(TT)) + { + BOOST_CONCEPT_USAGE(CopyConstructible) { + TT a(b); // require copy constructor + TT* ptr = &a; // require address of operator + const_constraints(a); + ignore_unused_variable_warning(ptr); + } + private: + void const_constraints(const TT& a) { + TT c(a); // require const copy constructor + const TT* ptr = &a; // require const address of operator + ignore_unused_variable_warning(c); + ignore_unused_variable_warning(ptr); + } + TT b; + }; + + // The SGI STL version of Assignable requires copy constructor and operator= + BOOST_concept(SGIAssignable,(TT)) + { + BOOST_CONCEPT_USAGE(SGIAssignable) { + TT c(a); +#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL + a = b; // require assignment operator +#endif + const_constraints(b); + ignore_unused_variable_warning(c); + } + private: + void const_constraints(const TT& x) { + TT c(x); +#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL + a = x; // const required for argument to assignment +#endif + ignore_unused_variable_warning(c); + } + TT a; + TT b; + }; + + BOOST_concept(Convertible,(X)(Y)) + { + BOOST_CONCEPT_USAGE(Convertible) { + Y y = x; + ignore_unused_variable_warning(y); + } + private: + X x; + }; + + // The C++ standard requirements for many concepts talk about return + // types that must be "convertible to bool". The problem with this + // requirement is that it leaves the door open for evil proxies that + // define things like operator|| with strange return types. Two + // possible solutions are: + // 1) require the return type to be exactly bool + // 2) stay with convertible to bool, and also + // specify stuff about all the logical operators. + // For now we just test for convertible to bool. + template + void require_boolean_expr(const TT& t) { + bool x = t; + ignore_unused_variable_warning(x); + } + + BOOST_concept(EqualityComparable,(TT)) + { + BOOST_CONCEPT_USAGE(EqualityComparable) { + require_boolean_expr(a == b); + require_boolean_expr(a != b); + } + private: + TT a, b; + }; + + BOOST_concept(LessThanComparable,(TT)) + { + BOOST_CONCEPT_USAGE(LessThanComparable) { + require_boolean_expr(a < b); + } + private: + TT a, b; + }; + + // This is equivalent to SGI STL's LessThanComparable. + BOOST_concept(Comparable,(TT)) + { + BOOST_CONCEPT_USAGE(Comparable) { + require_boolean_expr(a < b); + require_boolean_expr(a > b); + require_boolean_expr(a <= b); + require_boolean_expr(a >= b); + } + private: + TT a, b; + }; + +#define BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(OP,NAME) \ + BOOST_concept(NAME, (First)(Second)) \ + { \ + BOOST_CONCEPT_USAGE(NAME) { (void)constraints_(); } \ + private: \ + bool constraints_() { return a OP b; } \ + First a; \ + Second b; \ + } + +#define BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(OP,NAME) \ + BOOST_concept(NAME, (Ret)(First)(Second)) \ + { \ + BOOST_CONCEPT_USAGE(NAME) { (void)constraints_(); } \ + private: \ + Ret constraints_() { return a OP b; } \ + First a; \ + Second b; \ + } + + BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(==, EqualOp); + BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(!=, NotEqualOp); + BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<, LessThanOp); + BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<=, LessEqualOp); + BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>, GreaterThanOp); + BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>=, GreaterEqualOp); + + BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(+, PlusOp); + BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(*, TimesOp); + BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(/, DivideOp); + BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(-, SubtractOp); + BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(%, ModOp); + + //=========================================================================== + // Function Object Concepts + + BOOST_concept(Generator,(Func)(Return)) + { + BOOST_CONCEPT_USAGE(Generator) { test(is_void()); } + + private: + void test(boost::mpl::false_) + { + // Do we really want a reference here? + const Return& r = f(); + ignore_unused_variable_warning(r); + } + + void test(boost::mpl::true_) + { + f(); + } + + Func f; + }; + + BOOST_concept(UnaryFunction,(Func)(Return)(Arg)) + { + BOOST_CONCEPT_USAGE(UnaryFunction) { test(is_void()); } + + private: + void test(boost::mpl::false_) + { + f(arg); // "priming the pump" this way keeps msvc6 happy (ICE) + Return r = f(arg); + ignore_unused_variable_warning(r); + } + + void test(boost::mpl::true_) + { + f(arg); + } + +#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ + && BOOST_WORKAROUND(__GNUC__, > 3))) + // Declare a dummy construktor to make gcc happy. + // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. + // (warning: non-static reference "const double& boost::UnaryFunction::arg" + // in class without a constructor [-Wuninitialized]) + UnaryFunction(); +#endif + + Func f; + Arg arg; + }; + + BOOST_concept(BinaryFunction,(Func)(Return)(First)(Second)) + { + BOOST_CONCEPT_USAGE(BinaryFunction) { test(is_void()); } + private: + void test(boost::mpl::false_) + { + f(first,second); + Return r = f(first, second); // require operator() + (void)r; + } + + void test(boost::mpl::true_) + { + f(first,second); + } + +#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ + && BOOST_WORKAROUND(__GNUC__, > 3))) + // Declare a dummy constructor to make gcc happy. + // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. + // (warning: non-static reference "const double& boost::BinaryFunction::arg" + // in class without a constructor [-Wuninitialized]) + BinaryFunction(); +#endif + + Func f; + First first; + Second second; + }; + + BOOST_concept(UnaryPredicate,(Func)(Arg)) + { + BOOST_CONCEPT_USAGE(UnaryPredicate) { + require_boolean_expr(f(arg)); // require operator() returning bool + } + private: +#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ + && BOOST_WORKAROUND(__GNUC__, > 3))) + // Declare a dummy constructor to make gcc happy. + // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. + // (warning: non-static reference "const double& boost::UnaryPredicate::arg" + // in class without a constructor [-Wuninitialized]) + UnaryPredicate(); +#endif + + Func f; + Arg arg; + }; + + BOOST_concept(BinaryPredicate,(Func)(First)(Second)) + { + BOOST_CONCEPT_USAGE(BinaryPredicate) { + require_boolean_expr(f(a, b)); // require operator() returning bool + } + private: +#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ + && BOOST_WORKAROUND(__GNUC__, > 3))) + // Declare a dummy constructor to make gcc happy. + // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. + // (warning: non-static reference "const double& boost::BinaryPredicate::arg" + // in class without a constructor [-Wuninitialized]) + BinaryPredicate(); +#endif + Func f; + First a; + Second b; + }; + + // use this when functor is used inside a container class like std::set + BOOST_concept(Const_BinaryPredicate,(Func)(First)(Second)) + : BinaryPredicate + { + BOOST_CONCEPT_USAGE(Const_BinaryPredicate) { + const_constraints(f); + } + private: + void const_constraints(const Func& fun) { + // operator() must be a const member function + require_boolean_expr(fun(a, b)); + } +#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ + && BOOST_WORKAROUND(__GNUC__, > 3))) + // Declare a dummy constructor to make gcc happy. + // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. + // (warning: non-static reference "const double& boost::Const_BinaryPredicate::arg" + // in class without a constructor [-Wuninitialized]) + Const_BinaryPredicate(); +#endif + + Func f; + First a; + Second b; + }; + + BOOST_concept(AdaptableGenerator,(Func)(Return)) + : Generator + { + typedef typename Func::result_type result_type; + + BOOST_CONCEPT_USAGE(AdaptableGenerator) + { + BOOST_CONCEPT_ASSERT((Convertible)); + } + }; + + BOOST_concept(AdaptableUnaryFunction,(Func)(Return)(Arg)) + : UnaryFunction + { + typedef typename Func::argument_type argument_type; + typedef typename Func::result_type result_type; + + ~AdaptableUnaryFunction() + { + BOOST_CONCEPT_ASSERT((Convertible)); + BOOST_CONCEPT_ASSERT((Convertible)); + } + }; + + BOOST_concept(AdaptableBinaryFunction,(Func)(Return)(First)(Second)) + : BinaryFunction< + Func + , typename Func::result_type + , typename Func::first_argument_type + , typename Func::second_argument_type + > + { + typedef typename Func::first_argument_type first_argument_type; + typedef typename Func::second_argument_type second_argument_type; + typedef typename Func::result_type result_type; + + ~AdaptableBinaryFunction() + { + BOOST_CONCEPT_ASSERT((Convertible)); + BOOST_CONCEPT_ASSERT((Convertible)); + BOOST_CONCEPT_ASSERT((Convertible)); + } + }; + + BOOST_concept(AdaptablePredicate,(Func)(Arg)) + : UnaryPredicate + , AdaptableUnaryFunction + { + }; + + BOOST_concept(AdaptableBinaryPredicate,(Func)(First)(Second)) + : BinaryPredicate + , AdaptableBinaryFunction + { + }; + + //=========================================================================== + // Iterator Concepts + + BOOST_concept(InputIterator,(TT)) + : Assignable + , EqualityComparable + { + typedef typename boost::detail::iterator_traits::value_type value_type; + typedef typename boost::detail::iterator_traits::difference_type difference_type; + typedef typename boost::detail::iterator_traits::reference reference; + typedef typename boost::detail::iterator_traits::pointer pointer; + typedef typename boost::detail::iterator_traits::iterator_category iterator_category; + + BOOST_CONCEPT_USAGE(InputIterator) + { + BOOST_CONCEPT_ASSERT((SignedInteger)); + BOOST_CONCEPT_ASSERT((Convertible)); + + TT j(i); + (void)*i; // require dereference operator + ++j; // require preincrement operator + i++; // require postincrement operator + } + private: + TT i; + }; + + BOOST_concept(OutputIterator,(TT)(ValueT)) + : Assignable + { + BOOST_CONCEPT_USAGE(OutputIterator) { + + ++i; // require preincrement operator + i++; // require postincrement operator + *i++ = t; // require postincrement and assignment + } + private: + TT i, j; + ValueT t; + }; + + BOOST_concept(ForwardIterator,(TT)) + : InputIterator + { + BOOST_CONCEPT_USAGE(ForwardIterator) + { + BOOST_CONCEPT_ASSERT((Convertible< + BOOST_DEDUCED_TYPENAME ForwardIterator::iterator_category + , std::forward_iterator_tag + >)); + + typename InputIterator::reference r = *i; + ignore_unused_variable_warning(r); + } + + private: + TT i; + }; + + BOOST_concept(Mutable_ForwardIterator,(TT)) + : ForwardIterator + { + BOOST_CONCEPT_USAGE(Mutable_ForwardIterator) { + *i++ = *j; // require postincrement and assignment + } + private: + TT i, j; + }; + + BOOST_concept(BidirectionalIterator,(TT)) + : ForwardIterator + { + BOOST_CONCEPT_USAGE(BidirectionalIterator) + { + BOOST_CONCEPT_ASSERT((Convertible< + BOOST_DEDUCED_TYPENAME BidirectionalIterator::iterator_category + , std::bidirectional_iterator_tag + >)); + + --i; // require predecrement operator + i--; // require postdecrement operator + } + private: + TT i; + }; + + BOOST_concept(Mutable_BidirectionalIterator,(TT)) + : BidirectionalIterator + , Mutable_ForwardIterator + { + BOOST_CONCEPT_USAGE(Mutable_BidirectionalIterator) + { + *i-- = *j; // require postdecrement and assignment + } + private: + TT i, j; + }; + + BOOST_concept(RandomAccessIterator,(TT)) + : BidirectionalIterator + , Comparable + { + BOOST_CONCEPT_USAGE(RandomAccessIterator) + { + BOOST_CONCEPT_ASSERT((Convertible< + BOOST_DEDUCED_TYPENAME BidirectionalIterator::iterator_category + , std::random_access_iterator_tag + >)); + + i += n; // require assignment addition operator + i = i + n; i = n + i; // require addition with difference type + i -= n; // require assignment subtraction operator + i = i - n; // require subtraction with difference type + n = i - j; // require difference operator + (void)i[n]; // require element access operator + } + + private: + TT a, b; + TT i, j; + typename boost::detail::iterator_traits::difference_type n; + }; + + BOOST_concept(Mutable_RandomAccessIterator,(TT)) + : RandomAccessIterator + , Mutable_BidirectionalIterator + { + BOOST_CONCEPT_USAGE(Mutable_RandomAccessIterator) + { + i[n] = *i; // require element access and assignment + } + private: + TT i; + typename boost::detail::iterator_traits::difference_type n; + }; + + //=========================================================================== + // Container s + + BOOST_concept(Container,(C)) + : Assignable + { + typedef typename C::value_type value_type; + typedef typename C::difference_type difference_type; + typedef typename C::size_type size_type; + typedef typename C::const_reference const_reference; + typedef typename C::const_pointer const_pointer; + typedef typename C::const_iterator const_iterator; + + BOOST_CONCEPT_USAGE(Container) + { + BOOST_CONCEPT_ASSERT((InputIterator)); + const_constraints(c); + } + + private: + void const_constraints(const C& cc) { + i = cc.begin(); + i = cc.end(); + n = cc.size(); + n = cc.max_size(); + b = cc.empty(); + } + C c; + bool b; + const_iterator i; + size_type n; + }; + + BOOST_concept(Mutable_Container,(C)) + : Container + { + typedef typename C::reference reference; + typedef typename C::iterator iterator; + typedef typename C::pointer pointer; + + BOOST_CONCEPT_USAGE(Mutable_Container) + { + BOOST_CONCEPT_ASSERT(( + Assignable)); + + BOOST_CONCEPT_ASSERT((InputIterator)); + + i = c.begin(); + i = c.end(); + c.swap(c2); + } + + private: + iterator i; + C c, c2; + }; + + BOOST_concept(ForwardContainer,(C)) + : Container + { + BOOST_CONCEPT_USAGE(ForwardContainer) + { + BOOST_CONCEPT_ASSERT(( + ForwardIterator< + typename ForwardContainer::const_iterator + >)); + } + }; + + BOOST_concept(Mutable_ForwardContainer,(C)) + : ForwardContainer + , Mutable_Container + { + BOOST_CONCEPT_USAGE(Mutable_ForwardContainer) + { + BOOST_CONCEPT_ASSERT(( + Mutable_ForwardIterator< + typename Mutable_ForwardContainer::iterator + >)); + } + }; + + BOOST_concept(ReversibleContainer,(C)) + : ForwardContainer + { + typedef typename + C::const_reverse_iterator + const_reverse_iterator; + + BOOST_CONCEPT_USAGE(ReversibleContainer) + { + BOOST_CONCEPT_ASSERT(( + BidirectionalIterator< + typename ReversibleContainer::const_iterator>)); + + BOOST_CONCEPT_ASSERT((BidirectionalIterator)); + + const_constraints(c); + } + private: + void const_constraints(const C& cc) + { + const_reverse_iterator i = cc.rbegin(); + i = cc.rend(); + } + C c; + }; + + BOOST_concept(Mutable_ReversibleContainer,(C)) + : Mutable_ForwardContainer + , ReversibleContainer + { + typedef typename C::reverse_iterator reverse_iterator; + + BOOST_CONCEPT_USAGE(Mutable_ReversibleContainer) + { + typedef typename Mutable_ForwardContainer::iterator iterator; + BOOST_CONCEPT_ASSERT((Mutable_BidirectionalIterator)); + BOOST_CONCEPT_ASSERT((Mutable_BidirectionalIterator)); + + reverse_iterator i = c.rbegin(); + i = c.rend(); + } + private: + C c; + }; + + BOOST_concept(RandomAccessContainer,(C)) + : ReversibleContainer + { + typedef typename C::size_type size_type; + typedef typename C::const_reference const_reference; + + BOOST_CONCEPT_USAGE(RandomAccessContainer) + { + BOOST_CONCEPT_ASSERT(( + RandomAccessIterator< + typename RandomAccessContainer::const_iterator + >)); + + const_constraints(c); + } + private: + void const_constraints(const C& cc) + { + const_reference r = cc[n]; + ignore_unused_variable_warning(r); + } + + C c; + size_type n; + }; + + BOOST_concept(Mutable_RandomAccessContainer,(C)) + : Mutable_ReversibleContainer + , RandomAccessContainer + { + private: + typedef Mutable_RandomAccessContainer self; + public: + BOOST_CONCEPT_USAGE(Mutable_RandomAccessContainer) + { + BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator)); + BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator)); + + typename self::reference r = c[i]; + ignore_unused_variable_warning(r); + } + + private: + typename Mutable_ReversibleContainer::size_type i; + C c; + }; + + // A Sequence is inherently mutable + BOOST_concept(Sequence,(S)) + : Mutable_ForwardContainer + // Matt Austern's book puts DefaultConstructible here, the C++ + // standard places it in Container --JGS + // ... so why aren't we following the standard? --DWA + , DefaultConstructible + { + BOOST_CONCEPT_USAGE(Sequence) + { + S + c(n, t), + c2(first, last); + + c.insert(p, t); + c.insert(p, n, t); + c.insert(p, first, last); + + c.erase(p); + c.erase(p, q); + + typename Sequence::reference r = c.front(); + + ignore_unused_variable_warning(c); + ignore_unused_variable_warning(c2); + ignore_unused_variable_warning(r); + const_constraints(c); + } + private: + void const_constraints(const S& c) { + typename Sequence::const_reference r = c.front(); + ignore_unused_variable_warning(r); + } + + typename S::value_type t; + typename S::size_type n; + typename S::value_type* first, *last; + typename S::iterator p, q; + }; + + BOOST_concept(FrontInsertionSequence,(S)) + : Sequence + { + BOOST_CONCEPT_USAGE(FrontInsertionSequence) + { + c.push_front(t); + c.pop_front(); + } + private: + S c; + typename S::value_type t; + }; + + BOOST_concept(BackInsertionSequence,(S)) + : Sequence + { + BOOST_CONCEPT_USAGE(BackInsertionSequence) + { + c.push_back(t); + c.pop_back(); + typename BackInsertionSequence::reference r = c.back(); + ignore_unused_variable_warning(r); + const_constraints(c); + } + private: + void const_constraints(const S& cc) { + typename BackInsertionSequence::const_reference + r = cc.back(); + ignore_unused_variable_warning(r); + } + S c; + typename S::value_type t; + }; + + BOOST_concept(AssociativeContainer,(C)) + : ForwardContainer + , DefaultConstructible + { + typedef typename C::key_type key_type; + typedef typename C::key_compare key_compare; + typedef typename C::value_compare value_compare; + typedef typename C::iterator iterator; + + BOOST_CONCEPT_USAGE(AssociativeContainer) + { + i = c.find(k); + r = c.equal_range(k); + c.erase(k); + c.erase(i); + c.erase(r.first, r.second); + const_constraints(c); + BOOST_CONCEPT_ASSERT((BinaryPredicate)); + + typedef typename AssociativeContainer::value_type value_type_; + BOOST_CONCEPT_ASSERT((BinaryPredicate)); + } + + // Redundant with the base concept, but it helps below. + typedef typename C::const_iterator const_iterator; + private: + void const_constraints(const C& cc) + { + ci = cc.find(k); + n = cc.count(k); + cr = cc.equal_range(k); + } + + C c; + iterator i; + std::pair r; + const_iterator ci; + std::pair cr; + typename C::key_type k; + typename C::size_type n; + }; + + BOOST_concept(UniqueAssociativeContainer,(C)) + : AssociativeContainer + { + BOOST_CONCEPT_USAGE(UniqueAssociativeContainer) + { + C c(first, last); + + pos_flag = c.insert(t); + c.insert(first, last); + + ignore_unused_variable_warning(c); + } + private: + std::pair pos_flag; + typename C::value_type t; + typename C::value_type* first, *last; + }; + + BOOST_concept(MultipleAssociativeContainer,(C)) + : AssociativeContainer + { + BOOST_CONCEPT_USAGE(MultipleAssociativeContainer) + { + C c(first, last); + + pos = c.insert(t); + c.insert(first, last); + + ignore_unused_variable_warning(c); + ignore_unused_variable_warning(pos); + } + private: + typename C::iterator pos; + typename C::value_type t; + typename C::value_type* first, *last; + }; + + BOOST_concept(SimpleAssociativeContainer,(C)) + : AssociativeContainer + { + BOOST_CONCEPT_USAGE(SimpleAssociativeContainer) + { + typedef typename C::key_type key_type; + typedef typename C::value_type value_type; + BOOST_MPL_ASSERT((boost::is_same)); + } + }; + + BOOST_concept(PairAssociativeContainer,(C)) + : AssociativeContainer + { + BOOST_CONCEPT_USAGE(PairAssociativeContainer) + { + typedef typename C::key_type key_type; + typedef typename C::value_type value_type; + typedef typename C::mapped_type mapped_type; + typedef std::pair required_value_type; + BOOST_MPL_ASSERT((boost::is_same)); + } + }; + + BOOST_concept(SortedAssociativeContainer,(C)) + : AssociativeContainer + , ReversibleContainer + { + BOOST_CONCEPT_USAGE(SortedAssociativeContainer) + { + C + c(kc), + c2(first, last), + c3(first, last, kc); + + p = c.upper_bound(k); + p = c.lower_bound(k); + r = c.equal_range(k); + + c.insert(p, t); + + ignore_unused_variable_warning(c); + ignore_unused_variable_warning(c2); + ignore_unused_variable_warning(c3); + const_constraints(c); + } + + void const_constraints(const C& c) + { + kc = c.key_comp(); + vc = c.value_comp(); + + cp = c.upper_bound(k); + cp = c.lower_bound(k); + cr = c.equal_range(k); + } + + private: + typename C::key_compare kc; + typename C::value_compare vc; + typename C::value_type t; + typename C::key_type k; + typedef typename C::iterator iterator; + typedef typename C::const_iterator const_iterator; + + typedef SortedAssociativeContainer self; + iterator p; + const_iterator cp; + std::pair r; + std::pair cr; + typename C::value_type* first, *last; + }; + + // HashedAssociativeContainer + + BOOST_concept(Collection,(C)) + { + BOOST_CONCEPT_USAGE(Collection) + { + boost::function_requires >(); + boost::function_requires >(); + boost::function_requires >(); + const_constraints(c); + i = c.begin(); + i = c.end(); + c.swap(c); + } + + void const_constraints(const C& cc) { + ci = cc.begin(); + ci = cc.end(); + n = cc.size(); + b = cc.empty(); + } + + private: + typedef typename C::value_type value_type; + typedef typename C::iterator iterator; + typedef typename C::const_iterator const_iterator; + typedef typename C::reference reference; + typedef typename C::const_reference const_reference; + // typedef typename C::pointer pointer; + typedef typename C::difference_type difference_type; + typedef typename C::size_type size_type; + + C c; + bool b; + iterator i; + const_iterator ci; + size_type n; + }; +} // namespace boost + +#if (defined _MSC_VER) +# pragma warning( pop ) +#endif + +# include + +#endif // BOOST_CONCEPT_CHECKS_HPP + diff --git a/ThirdParty/boost-Subset/boost/config.hpp b/ThirdParty/boost-Subset/boost/config.hpp new file mode 100644 index 0000000000..d49bb27cd5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config.hpp @@ -0,0 +1,67 @@ +// Boost config.hpp configuration header file ------------------------------// + +// (C) Copyright John Maddock 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/config for most recent version. + +// Boost config.hpp policy and rationale documentation has been moved to +// http://www.boost.org/libs/config +// +// CAUTION: This file is intended to be completely stable - +// DO NOT MODIFY THIS FILE! +// + +#ifndef BOOST_CONFIG_HPP +#define BOOST_CONFIG_HPP + +// if we don't have a user config, then use the default location: +#if !defined(BOOST_USER_CONFIG) && !defined(BOOST_NO_USER_CONFIG) +# define BOOST_USER_CONFIG +#if 0 +// For dependency trackers: +# include +#endif +#endif +// include it first: +#ifdef BOOST_USER_CONFIG +# include BOOST_USER_CONFIG +#endif + +// if we don't have a compiler config set, try and find one: +#if !defined(BOOST_COMPILER_CONFIG) && !defined(BOOST_NO_COMPILER_CONFIG) && !defined(BOOST_NO_CONFIG) +# include +#endif +// if we have a compiler config, include it now: +#ifdef BOOST_COMPILER_CONFIG +# include BOOST_COMPILER_CONFIG +#endif + +// if we don't have a std library config set, try and find one: +#if !defined(BOOST_STDLIB_CONFIG) && !defined(BOOST_NO_STDLIB_CONFIG) && !defined(BOOST_NO_CONFIG) && defined(__cplusplus) +# include +#endif +// if we have a std library config, include it now: +#ifdef BOOST_STDLIB_CONFIG +# include BOOST_STDLIB_CONFIG +#endif + +// if we don't have a platform config set, try and find one: +#if !defined(BOOST_PLATFORM_CONFIG) && !defined(BOOST_NO_PLATFORM_CONFIG) && !defined(BOOST_NO_CONFIG) +# include +#endif +// if we have a platform config, include it now: +#ifdef BOOST_PLATFORM_CONFIG +# include BOOST_PLATFORM_CONFIG +#endif + +// get config suffix code: +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +#endif // BOOST_CONFIG_HPP diff --git a/ThirdParty/boost-Subset/boost/config/abi/borland_prefix.hpp b/ThirdParty/boost-Subset/boost/config/abi/borland_prefix.hpp new file mode 100644 index 0000000000..3a0e5ae2d7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/abi/borland_prefix.hpp @@ -0,0 +1,27 @@ +// (C) Copyright John Maddock 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// for C++ Builder the following options effect the ABI: +// +// -b (on or off - effect emum sizes) +// -Vx (on or off - empty members) +// -Ve (on or off - empty base classes) +// -aX (alignment - 5 options). +// -pX (Calling convention - 4 options) +// -VmX (member pointer size and layout - 5 options) +// -VC (on or off, changes name mangling) +// -Vl (on or off, changes struct layout). + +// In addition the following warnings are sufficiently annoying (and +// unfixable) to have them turned off by default: +// +// 8027 - functions containing [for|while] loops are not expanded inline +// 8026 - functions taking class by value arguments are not expanded inline + +#pragma nopushoptwarn +# pragma option push -a8 -Vx- -Ve- -b- -pc -Vmv -VC- -Vl- -w-8027 -w-8026 + + + diff --git a/ThirdParty/boost-Subset/boost/config/abi/borland_suffix.hpp b/ThirdParty/boost-Subset/boost/config/abi/borland_suffix.hpp new file mode 100644 index 0000000000..940535f381 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/abi/borland_suffix.hpp @@ -0,0 +1,12 @@ +// (C) Copyright John Maddock 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# pragma option pop +#pragma nopushoptwarn + + + + + diff --git a/ThirdParty/boost-Subset/boost/config/abi/msvc_prefix.hpp b/ThirdParty/boost-Subset/boost/config/abi/msvc_prefix.hpp new file mode 100644 index 0000000000..97f06cdc0c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/abi/msvc_prefix.hpp @@ -0,0 +1,22 @@ +// (C) Copyright John Maddock 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// +// Boost binaries are built with the compiler's default ABI settings, +// if the user changes their default alignment in the VS IDE then their +// code will no longer be binary compatible with the bjam built binaries +// unless this header is included to force Boost code into a consistent ABI. +// +// Note that inclusion of this header is only necessary for libraries with +// separate source, header only libraries DO NOT need this as long as all +// translation units are built with the same options. +// +#if defined(_M_X64) +# pragma pack(push,16) +#else +# pragma pack(push,8) +#endif + + diff --git a/ThirdParty/boost-Subset/boost/config/abi/msvc_suffix.hpp b/ThirdParty/boost-Subset/boost/config/abi/msvc_suffix.hpp new file mode 100644 index 0000000000..a64d783eb0 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/abi/msvc_suffix.hpp @@ -0,0 +1,8 @@ +// (C) Copyright John Maddock 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#pragma pack(pop) + + diff --git a/ThirdParty/boost-Subset/boost/config/abi_prefix.hpp b/ThirdParty/boost-Subset/boost/config/abi_prefix.hpp new file mode 100644 index 0000000000..3b1347492c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/abi_prefix.hpp @@ -0,0 +1,25 @@ +// abi_prefix header -------------------------------------------------------// + +// (c) Copyright John Maddock 2003 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). + +#ifndef BOOST_CONFIG_ABI_PREFIX_HPP +# define BOOST_CONFIG_ABI_PREFIX_HPP +#else +# error double inclusion of header boost/config/abi_prefix.hpp is an error +#endif + +#include + +// this must occur after all other includes and before any code appears: +#ifdef BOOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX +#endif + +#if defined( __BORLANDC__ ) +#pragma nopushoptwarn +#endif + diff --git a/ThirdParty/boost-Subset/boost/config/abi_suffix.hpp b/ThirdParty/boost-Subset/boost/config/abi_suffix.hpp new file mode 100644 index 0000000000..939161662a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/abi_suffix.hpp @@ -0,0 +1,27 @@ +// abi_sufffix header -------------------------------------------------------// + +// (c) Copyright John Maddock 2003 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). + +// This header should be #included AFTER code that was preceded by a #include +// . + +#ifndef BOOST_CONFIG_ABI_PREFIX_HPP +# error Header boost/config/abi_suffix.hpp must only be used after boost/config/abi_prefix.hpp +#else +# undef BOOST_CONFIG_ABI_PREFIX_HPP +#endif + +// the suffix header occurs after all of our code: +#ifdef BOOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX +#endif + +#if defined( __BORLANDC__ ) +#pragma nopushoptwarn +#endif + + diff --git a/ThirdParty/boost-Subset/boost/config/auto_link.hpp b/ThirdParty/boost-Subset/boost/config/auto_link.hpp new file mode 100644 index 0000000000..56a16b0b38 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/auto_link.hpp @@ -0,0 +1,439 @@ +// (C) Copyright John Maddock 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + /* + * LOCATION: see http://www.boost.org for most recent version. + * FILE auto_link.hpp + * VERSION see + * DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers. + */ + +/************************************************************************* + +USAGE: +~~~~~~ + +Before including this header you must define one or more of define the following macros: + +BOOST_LIB_NAME: Required: A string containing the basename of the library, + for example boost_regex. +BOOST_LIB_TOOLSET: Optional: the base name of the toolset. +BOOST_DYN_LINK: Optional: when set link to dll rather than static library. +BOOST_LIB_DIAGNOSTIC: Optional: when set the header will print out the name + of the library selected (useful for debugging). +BOOST_AUTO_LINK_NOMANGLE: Specifies that we should link to BOOST_LIB_NAME.lib, + rather than a mangled-name version. +BOOST_AUTO_LINK_TAGGED: Specifies that we link to libraries built with the --layout=tagged option. + This is essentially the same as the default name-mangled version, but without + the compiler name and version, or the Boost version. Just the build options. + +These macros will be undef'ed at the end of the header, further this header +has no include guards - so be sure to include it only once from your library! + +Algorithm: +~~~~~~~~~~ + +Libraries for Borland and Microsoft compilers are automatically +selected here, the name of the lib is selected according to the following +formula: + +BOOST_LIB_PREFIX + + BOOST_LIB_NAME + + "_" + + BOOST_LIB_TOOLSET + + BOOST_LIB_THREAD_OPT + + BOOST_LIB_RT_OPT + "-" + + BOOST_LIB_VERSION + +These are defined as: + +BOOST_LIB_PREFIX: "lib" for static libraries otherwise "". + +BOOST_LIB_NAME: The base name of the lib ( for example boost_regex). + +BOOST_LIB_TOOLSET: The compiler toolset name (vc6, vc7, bcb5 etc). + +BOOST_LIB_THREAD_OPT: "-mt" for multithread builds, otherwise nothing. + +BOOST_LIB_RT_OPT: A suffix that indicates the runtime library used, + contains one or more of the following letters after + a hyphen: + + s static runtime (dynamic if not present). + g debug/diagnostic runtime (release if not present). + y Python debug/diagnostic runtime (release if not present). + d debug build (release if not present). + p STLport build. + n STLport build without its IOStreams. + +BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. + + +***************************************************************************/ + +#ifdef __cplusplus +# ifndef BOOST_CONFIG_HPP +# include +# endif +#elif defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__EDG_VERSION__) +// +// C language compatability (no, honestly) +// +# define BOOST_MSVC _MSC_VER +# define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X) +# define BOOST_DO_STRINGIZE(X) #X +#endif +// +// Only include what follows for known and supported compilers: +// +#if defined(BOOST_MSVC) \ + || defined(__BORLANDC__) \ + || (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \ + || (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200)) + +#ifndef BOOST_VERSION_HPP +# include +#endif + +#ifndef BOOST_LIB_NAME +# error "Macro BOOST_LIB_NAME not set (internal error)" +#endif + +// +// error check: +// +#if defined(__MSVC_RUNTIME_CHECKS) && !defined(_DEBUG) +# pragma message("Using the /RTC option without specifying a debug runtime will lead to linker errors") +# pragma message("Hint: go to the code generation options and switch to one of the debugging runtimes") +# error "Incompatible build options" +#endif +// +// select toolset if not defined already: +// +#ifndef BOOST_LIB_TOOLSET +# if defined(BOOST_MSVC) && (BOOST_MSVC < 1200) + // Note: no compilers before 1200 are supported +# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1300) + +# ifdef UNDER_CE + // eVC4: +# define BOOST_LIB_TOOLSET "evc4" +# else + // vc6: +# define BOOST_LIB_TOOLSET "vc6" +# endif + +# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1310) + + // vc7: +# define BOOST_LIB_TOOLSET "vc7" + +# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1400) + + // vc71: +# define BOOST_LIB_TOOLSET "vc71" + +# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1500) + + // vc80: +# define BOOST_LIB_TOOLSET "vc80" + +# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1600) + + // vc90: +# define BOOST_LIB_TOOLSET "vc90" + +# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1700) + + // vc10: +# define BOOST_LIB_TOOLSET "vc100" + +# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1800) + + // vc11: +# define BOOST_LIB_TOOLSET "vc110" + +# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1900) + + // vc12: +# define BOOST_LIB_TOOLSET "vc120" + +# elif defined(BOOST_MSVC) + + // vc14: +# define BOOST_LIB_TOOLSET "vc140" + +# elif defined(__BORLANDC__) + + // CBuilder 6: +# define BOOST_LIB_TOOLSET "bcb" + +# elif defined(__ICL) + + // Intel C++, no version number: +# define BOOST_LIB_TOOLSET "iw" + +# elif defined(__MWERKS__) && (__MWERKS__ <= 0x31FF ) + + // Metrowerks CodeWarrior 8.x +# define BOOST_LIB_TOOLSET "cw8" + +# elif defined(__MWERKS__) && (__MWERKS__ <= 0x32FF ) + + // Metrowerks CodeWarrior 9.x +# define BOOST_LIB_TOOLSET "cw9" + +# endif +#endif // BOOST_LIB_TOOLSET + +// +// select thread opt: +// +#if defined(_MT) || defined(__MT__) +# define BOOST_LIB_THREAD_OPT "-mt" +#else +# define BOOST_LIB_THREAD_OPT +#endif + +#if defined(_MSC_VER) || defined(__MWERKS__) + +# ifdef _DLL + +# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS)) + +# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-gydp" +# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) +# define BOOST_LIB_RT_OPT "-gdp" +# elif defined(_DEBUG)\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-gydp" +# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") +# error "Build options aren't compatible with pre-built libraries" +# elif defined(_DEBUG) +# define BOOST_LIB_RT_OPT "-gdp" +# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") +# error "Build options aren't compatible with pre-built libraries" +# else +# define BOOST_LIB_RT_OPT "-p" +# endif + +# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) + +# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-gydpn" +# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) +# define BOOST_LIB_RT_OPT "-gdpn" +# elif defined(_DEBUG)\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-gydpn" +# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") +# error "Build options aren't compatible with pre-built libraries" +# elif defined(_DEBUG) +# define BOOST_LIB_RT_OPT "-gdpn" +# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") +# error "Build options aren't compatible with pre-built libraries" +# else +# define BOOST_LIB_RT_OPT "-pn" +# endif + +# else + +# if defined(_DEBUG) && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-gyd" +# elif defined(_DEBUG) +# define BOOST_LIB_RT_OPT "-gd" +# else +# define BOOST_LIB_RT_OPT +# endif + +# endif + +# else + +# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS)) + +# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-sgydp" +# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) +# define BOOST_LIB_RT_OPT "-sgdp" +# elif defined(_DEBUG)\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-sgydp" +# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") +# error "Build options aren't compatible with pre-built libraries" +# elif defined(_DEBUG) +# define BOOST_LIB_RT_OPT "-sgdp" +# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") +# error "Build options aren't compatible with pre-built libraries" +# else +# define BOOST_LIB_RT_OPT "-sp" +# endif + +# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) + +# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-sgydpn" +# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) +# define BOOST_LIB_RT_OPT "-sgdpn" +# elif defined(_DEBUG)\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-sgydpn" +# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") +# error "Build options aren't compatible with pre-built libraries" +# elif defined(_DEBUG) +# define BOOST_LIB_RT_OPT "-sgdpn" +# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") +# error "Build options aren't compatible with pre-built libraries" +# else +# define BOOST_LIB_RT_OPT "-spn" +# endif + +# else + +# if defined(_DEBUG)\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-sgyd" +# elif defined(_DEBUG) +# define BOOST_LIB_RT_OPT "-sgd" +# else +# define BOOST_LIB_RT_OPT "-s" +# endif + +# endif + +# endif + +#elif defined(__BORLANDC__) + +// +// figure out whether we want the debug builds or not: +// +#if __BORLANDC__ > 0x561 +#pragma defineonoption BOOST_BORLAND_DEBUG -v +#endif +// +// sanity check: +// +#if defined(__STL_DEBUG) || defined(_STLP_DEBUG) +#error "Pre-built versions of the Boost libraries are not provided in STLport-debug form" +#endif + +# ifdef _RTLDLL + +# if defined(BOOST_BORLAND_DEBUG)\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-yd" +# elif defined(BOOST_BORLAND_DEBUG) +# define BOOST_LIB_RT_OPT "-d" +# elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT -y +# else +# define BOOST_LIB_RT_OPT +# endif + +# else + +# if defined(BOOST_BORLAND_DEBUG)\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-syd" +# elif defined(BOOST_BORLAND_DEBUG) +# define BOOST_LIB_RT_OPT "-sd" +# elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-sy" +# else +# define BOOST_LIB_RT_OPT "-s" +# endif + +# endif + +#endif + +// +// select linkage opt: +// +#if (defined(_DLL) || defined(_RTLDLL)) && defined(BOOST_DYN_LINK) +# define BOOST_LIB_PREFIX +#elif defined(BOOST_DYN_LINK) +# error "Mixing a dll boost library with a static runtime is a really bad idea..." +#else +# define BOOST_LIB_PREFIX "lib" +#endif + +// +// now include the lib: +// +#if defined(BOOST_LIB_NAME) \ + && defined(BOOST_LIB_PREFIX) \ + && defined(BOOST_LIB_TOOLSET) \ + && defined(BOOST_LIB_THREAD_OPT) \ + && defined(BOOST_LIB_RT_OPT) \ + && defined(BOOST_LIB_VERSION) + +#ifdef BOOST_AUTO_LINK_TAGGED +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib") +# ifdef BOOST_LIB_DIAGNOSTIC +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib") +# endif +#elif defined(BOOST_AUTO_LINK_NOMANGLE) +# pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") +# ifdef BOOST_LIB_DIAGNOSTIC +# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") +# endif +#elif defined(BOOST_LIB_BUILDID) +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib") +# ifdef BOOST_LIB_DIAGNOSTIC +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib") +# endif +#else +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib") +# ifdef BOOST_LIB_DIAGNOSTIC +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib") +# endif +#endif + +#else +# error "some required macros where not defined (internal logic error)." +#endif + + +#endif // _MSC_VER || __BORLANDC__ + +// +// finally undef any macros we may have set: +// +#ifdef BOOST_LIB_PREFIX +# undef BOOST_LIB_PREFIX +#endif +#if defined(BOOST_LIB_NAME) +# undef BOOST_LIB_NAME +#endif +// Don't undef this one: it can be set by the user and should be the +// same for all libraries: +//#if defined(BOOST_LIB_TOOLSET) +//# undef BOOST_LIB_TOOLSET +//#endif +#if defined(BOOST_LIB_THREAD_OPT) +# undef BOOST_LIB_THREAD_OPT +#endif +#if defined(BOOST_LIB_RT_OPT) +# undef BOOST_LIB_RT_OPT +#endif +#if defined(BOOST_LIB_LINK_OPT) +# undef BOOST_LIB_LINK_OPT +#endif +#if defined(BOOST_LIB_DEBUG_OPT) +# undef BOOST_LIB_DEBUG_OPT +#endif +#if defined(BOOST_DYN_LINK) +# undef BOOST_DYN_LINK +#endif + + diff --git a/ThirdParty/boost-Subset/boost/config/compiler/borland.hpp b/ThirdParty/boost-Subset/boost/config/compiler/borland.hpp new file mode 100644 index 0000000000..80dd230034 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/compiler/borland.hpp @@ -0,0 +1,318 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Aleksey Gurtovoy 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Borland C++ compiler setup: + +// +// versions check: +// we don't support Borland prior to version 5.4: +#if __BORLANDC__ < 0x540 +# error "Compiler not supported or configured - please reconfigure" +#endif + +// last known compiler version: +#if (__BORLANDC__ > 0x613) +//# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +//# else +//# pragma message( "Unknown compiler version - please run the configure tests and report the results") +//# endif +#elif (__BORLANDC__ == 0x600) +# error "CBuilderX preview compiler is no longer supported" +#endif + +// +// Support macros to help with standard library detection +#if (__BORLANDC__ < 0x560) || defined(_USE_OLD_RW_STL) +# define BOOST_BCB_WITH_ROGUE_WAVE +#elif __BORLANDC__ < 0x570 +# define BOOST_BCB_WITH_STLPORT +#else +# define BOOST_BCB_WITH_DINKUMWARE +#endif + +// +// Version 5.0 and below: +# if __BORLANDC__ <= 0x0550 +// Borland C++Builder 4 and 5: +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +# if __BORLANDC__ == 0x0550 +// Borland C++Builder 5, command-line compiler 5.5: +# define BOOST_NO_OPERATORS_IN_NAMESPACE +# endif +// Variadic macros do not exist for C++ Builder versions 5 and below +#define BOOST_NO_CXX11_VARIADIC_MACROS +# endif + +// Version 5.51 and below: +#if (__BORLANDC__ <= 0x551) +# define BOOST_NO_CV_SPECIALIZATIONS +# define BOOST_NO_CV_VOID_SPECIALIZATIONS +# define BOOST_NO_DEDUCED_TYPENAME +// workaround for missing WCHAR_MAX/WCHAR_MIN: +#ifdef __cplusplus +#include +#include +#else +#include +#include +#endif // __cplusplus +#ifndef WCHAR_MAX +# define WCHAR_MAX 0xffff +#endif +#ifndef WCHAR_MIN +# define WCHAR_MIN 0 +#endif +#endif + +// Borland C++ Builder 6 and below: +#if (__BORLANDC__ <= 0x564) + +# if defined(NDEBUG) && defined(__cplusplus) + // fix broken so that Boost.test works: +# include +# undef strcmp +# endif + // fix broken errno declaration: +# include +# ifndef errno +# define errno errno +# endif + +#endif + +// +// new bug in 5.61: +#if (__BORLANDC__ >= 0x561) && (__BORLANDC__ <= 0x580) + // this seems to be needed by the command line compiler, but not the IDE: +# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS +#endif + +// Borland C++ Builder 2006 Update 2 and below: +#if (__BORLANDC__ <= 0x582) +# define BOOST_NO_SFINAE +# define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG +# define BOOST_NO_TEMPLATE_TEMPLATES + +# define BOOST_NO_PRIVATE_IN_AGGREGATE + +# ifdef _WIN32 +# define BOOST_NO_SWPRINTF +# elif defined(linux) || defined(__linux__) || defined(__linux) + // we should really be able to do without this + // but the wcs* functions aren't imported into std:: +# define BOOST_NO_STDC_NAMESPACE + // _CPPUNWIND doesn't get automatically set for some reason: +# pragma defineonoption BOOST_CPPUNWIND -x +# endif +#endif + +#if (__BORLANDC__ <= 0x613) // Beman has asked Alisdair for more info + // we shouldn't really need this - but too many things choke + // without it, this needs more investigation: +# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +# define BOOST_NO_IS_ABSTRACT +# define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS +# define BOOST_NO_USING_TEMPLATE +# define BOOST_SP_NO_SP_CONVERTIBLE + +// Temporary workaround +#define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif + +// Borland C++ Builder 2008 and below: +# define BOOST_NO_INTEGRAL_INT64_T +# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +# define BOOST_NO_TWO_PHASE_NAME_LOOKUP +# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE +# define BOOST_NO_NESTED_FRIENDSHIP +# define BOOST_NO_TYPENAME_WITH_CTOR +#if (__BORLANDC__ < 0x600) +# define BOOST_ILLEGAL_CV_REFERENCES +#endif + +// +// Positive Feature detection +// +// Borland C++ Builder 2008 and below: +#if (__BORLANDC__ >= 0x599) +# pragma defineonoption BOOST_CODEGEAR_0X_SUPPORT -Ax +#endif +// +// C++0x Macros: +// +#if !defined( BOOST_CODEGEAR_0X_SUPPORT ) || (__BORLANDC__ < 0x610) +# define BOOST_NO_CXX11_CHAR16_T +# define BOOST_NO_CXX11_CHAR32_T +# define BOOST_NO_CXX11_DECLTYPE +# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +# define BOOST_NO_CXX11_EXTERN_TEMPLATE +# define BOOST_NO_CXX11_RVALUE_REFERENCES +# define BOOST_NO_CXX11_SCOPED_ENUMS +# define BOOST_NO_CXX11_STATIC_ASSERT +#else +# define BOOST_HAS_ALIGNOF +# define BOOST_HAS_CHAR16_T +# define BOOST_HAS_CHAR32_T +# define BOOST_HAS_DECLTYPE +# define BOOST_HAS_EXPLICIT_CONVERSION_OPS +# define BOOST_HAS_REF_QUALIFIER +# define BOOST_HAS_RVALUE_REFS +# define BOOST_HAS_STATIC_ASSERT +#endif + +#define BOOST_NO_CXX11_AUTO_DECLARATIONS +#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CXX11_CONSTEXPR +#define BOOST_NO_CXX11_DECLTYPE_N3276 +#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#define BOOST_NO_CXX11_DELETED_FUNCTIONS +#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#define BOOST_NO_CXX11_LAMBDAS +#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR +#define BOOST_NO_CXX11_RAW_LITERALS +#define BOOST_NO_CXX11_RVALUE_REFERENCES +#define BOOST_NO_CXX11_SCOPED_ENUMS +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_TEMPLATE_ALIASES +#define BOOST_NO_CXX11_UNICODE_LITERALS // UTF-8 still not supported +#define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#define BOOST_NO_CXX11_NOEXCEPT +#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#define BOOST_NO_CXX11_ALIGNAS +#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif + +#if __BORLANDC__ >= 0x590 +# define BOOST_HAS_TR1_HASH + +# define BOOST_HAS_MACRO_USE_FACET +#endif + +// +// Post 0x561 we have long long and stdint.h: +#if __BORLANDC__ >= 0x561 +# ifndef __NO_LONG_LONG +# define BOOST_HAS_LONG_LONG +# else +# define BOOST_NO_LONG_LONG +# endif + // On non-Win32 platforms let the platform config figure this out: +# ifdef _WIN32 +# define BOOST_HAS_STDINT_H +# endif +#endif + +// Borland C++Builder 6 defaults to using STLPort. If _USE_OLD_RW_STL is +// defined, then we have 0x560 or greater with the Rogue Wave implementation +// which presumably has the std::DBL_MAX bug. +#if defined( BOOST_BCB_WITH_ROGUE_WAVE ) +// is partly broken, some macros define symbols that are really in +// namespace std, so you end up having to use illegal constructs like +// std::DBL_MAX, as a fix we'll just include float.h and have done with: +#include +#endif +// +// __int64: +// +#if (__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__) +# define BOOST_HAS_MS_INT64 +#endif +// +// check for exception handling support: +// +#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +#endif +// +// all versions have a : +// +#ifndef __STRICT_ANSI__ +# define BOOST_HAS_DIRENT_H +#endif +// +// all versions support __declspec: +// +#if defined(__STRICT_ANSI__) +// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined +# define BOOST_SYMBOL_EXPORT +#endif +// +// ABI fixing headers: +// +#if __BORLANDC__ != 0x600 // not implemented for version 6 compiler yet +#ifndef BOOST_ABI_PREFIX +# define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp" +#endif +#ifndef BOOST_ABI_SUFFIX +# define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp" +#endif +#endif +// +// Disable Win32 support in ANSI mode: +// +#if __BORLANDC__ < 0x600 +# pragma defineonoption BOOST_DISABLE_WIN32 -A +#elif defined(__STRICT_ANSI__) +# define BOOST_DISABLE_WIN32 +#endif +// +// MSVC compatibility mode does some nasty things: +// TODO: look up if this doesn't apply to the whole 12xx range +// +#if defined(_MSC_VER) && (_MSC_VER <= 1200) +# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP +# define BOOST_NO_VOID_RETURNS +#endif + +// Borland did not implement value-initialization completely, as I reported +// in 2007, Borland Report 51854, "Value-initialization: POD struct should be +// zero-initialized", http://qc.embarcadero.com/wc/qcmain.aspx?d=51854 +// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues +// (Niels Dekker, LKEB, April 2010) +#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION + +#define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__) diff --git a/ThirdParty/boost-Subset/boost/config/compiler/clang.hpp b/ThirdParty/boost-Subset/boost/config/compiler/clang.hpp new file mode 100644 index 0000000000..47ea65b0a2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/compiler/clang.hpp @@ -0,0 +1,271 @@ +// (C) Copyright Douglas Gregor 2010 +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Clang compiler setup. + +#define BOOST_HAS_PRAGMA_ONCE + +// Detecting `-fms-extension` compiler flag assuming that _MSC_VER defined when that flag is used. +#if defined (_MSC_VER) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 4)) +# define BOOST_HAS_PRAGMA_DETECT_MISMATCH +#endif + +// When compiling with clang before __has_extension was defined, +// even if one writes 'defined(__has_extension) && __has_extension(xxx)', +// clang reports a compiler error. So the only workaround found is: + +#ifndef __has_extension +#define __has_extension __has_feature +#endif + +#if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +#endif + +#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_RTTI) +# define BOOST_NO_RTTI +#endif + +#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_TYPEID) +# define BOOST_NO_TYPEID +#endif + +#if defined(__int64) && !defined(__GNUC__) +# define BOOST_HAS_MS_INT64 +#endif + +#define BOOST_HAS_NRVO + +// Branch prediction hints +#if defined(__has_builtin) +#if __has_builtin(__builtin_expect) +#define BOOST_LIKELY(x) __builtin_expect(x, 1) +#define BOOST_UNLIKELY(x) __builtin_expect(x, 0) +#endif +#endif + +// Clang supports "long long" in all compilation modes. +#define BOOST_HAS_LONG_LONG + +// +// We disable this if the compiler is really nvcc as it +// doesn't actually support __int128 as of CUDA_VERSION=5000 +// even though it defines __SIZEOF_INT128__. +// See https://svn.boost.org/trac/boost/ticket/10418 +// Only re-enable this for nvcc if you're absolutely sure +// of the circumstances under which it's supported: +// +#if defined(__SIZEOF_INT128__) && !defined(__CUDACC__) +# define BOOST_HAS_INT128 +#endif + + +// +// Dynamic shared object (DSO) and dynamic-link library (DLL) support +// +#if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32) +# define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default"))) +# define BOOST_SYMBOL_IMPORT +# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default"))) +#endif + +// +// The BOOST_FALLTHROUGH macro can be used to annotate implicit fall-through +// between switch labels. +// +#if __cplusplus >= 201103L && defined(__has_warning) +# if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough") +# define BOOST_FALLTHROUGH [[clang::fallthrough]] +# endif +#endif + +#if !__has_feature(cxx_auto_type) +# define BOOST_NO_CXX11_AUTO_DECLARATIONS +# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#endif + +// +// Currently clang on Windows using VC++ RTL does not support C++11's char16_t or char32_t +// +#if defined(_MSC_VER) || !(defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L) +# define BOOST_NO_CXX11_CHAR16_T +# define BOOST_NO_CXX11_CHAR32_T +#endif + +#if !__has_feature(cxx_constexpr) +# define BOOST_NO_CXX11_CONSTEXPR +#endif + +#if !__has_feature(cxx_decltype) +# define BOOST_NO_CXX11_DECLTYPE +#endif + +#if !__has_feature(cxx_decltype_incomplete_return_types) +# define BOOST_NO_CXX11_DECLTYPE_N3276 +#endif + +#if !__has_feature(cxx_defaulted_functions) +# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#endif + +#if !__has_feature(cxx_deleted_functions) +# define BOOST_NO_CXX11_DELETED_FUNCTIONS +#endif + +#if !__has_feature(cxx_explicit_conversions) +# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#endif + +#if !__has_feature(cxx_default_function_template_args) +# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#endif + +#if !__has_feature(cxx_generalized_initializers) +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#endif + +#if !__has_feature(cxx_lambdas) +# define BOOST_NO_CXX11_LAMBDAS +#endif + +#if !__has_feature(cxx_local_type_template_args) +# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#endif + +#if !__has_feature(cxx_noexcept) +# define BOOST_NO_CXX11_NOEXCEPT +#endif + +#if !__has_feature(cxx_nullptr) +# define BOOST_NO_CXX11_NULLPTR +#endif + +#if !__has_feature(cxx_range_for) +# define BOOST_NO_CXX11_RANGE_BASED_FOR +#endif + +#if !__has_feature(cxx_raw_string_literals) +# define BOOST_NO_CXX11_RAW_LITERALS +#endif + +#if !__has_feature(cxx_reference_qualified_functions) +# define BOOST_NO_CXX11_REF_QUALIFIERS +#endif + +#if !__has_feature(cxx_generalized_initializers) +# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#endif + +#if !__has_feature(cxx_rvalue_references) +# define BOOST_NO_CXX11_RVALUE_REFERENCES +#endif + +#if !__has_feature(cxx_strong_enums) +# define BOOST_NO_CXX11_SCOPED_ENUMS +#endif + +#if !__has_feature(cxx_static_assert) +# define BOOST_NO_CXX11_STATIC_ASSERT +#endif + +#if !__has_feature(cxx_alias_templates) +# define BOOST_NO_CXX11_TEMPLATE_ALIASES +#endif + +#if !__has_feature(cxx_unicode_literals) +# define BOOST_NO_CXX11_UNICODE_LITERALS +#endif + +#if !__has_feature(cxx_variadic_templates) +# define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#endif + +#if !__has_feature(cxx_user_literals) +# define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#endif + +#if !__has_feature(cxx_alignas) +# define BOOST_NO_CXX11_ALIGNAS +#endif + +#if !__has_feature(cxx_trailing_return) +# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#endif + +#if !__has_feature(cxx_inline_namespaces) +# define BOOST_NO_CXX11_INLINE_NAMESPACES +#endif + +#if !__has_feature(cxx_override_control) +# define BOOST_NO_CXX11_FINAL +#endif + +#if !(__has_feature(__cxx_binary_literals__) || __has_extension(__cxx_binary_literals__)) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif + +#if !__has_feature(__cxx_decltype_auto__) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif + +#if !__has_feature(__cxx_aggregate_nsdmi__) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif + +#if !__has_feature(__cxx_init_captures__) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif + +#if !__has_feature(__cxx_generic_lambdas__) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif + +// clang < 3.5 has a defect with dependent type, like following. +// +// template +// constexpr typename enable_if >::type foo(T &) +// { } // error: no return statement in constexpr function +// +// This issue also affects C++11 mode, but C++11 constexpr requires return stmt. +// Therefore we don't care such case. +// +// Note that we can't check Clang version directly as the numbering system changes depending who's +// creating the Clang release (see https://github.com/boostorg/config/pull/39#issuecomment-59927873) +// so instead verify that we have a feature that was introduced at the same time as working C++14 +// constexpr (generic lambda's in this case): +// +#if !__has_feature(__cxx_generic_lambdas__) || !__has_feature(__cxx_relaxed_constexpr__) +# define BOOST_NO_CXX14_CONSTEXPR +#endif + +#if !__has_feature(__cxx_return_type_deduction__) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif + +#if !__has_feature(__cxx_variable_templates__) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif + +#if __cplusplus < 201400 +// All versions with __cplusplus above this value seem to support this: +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif + + +// Unused attribute: +#if defined(__GNUC__) && (__GNUC__ >= 4) +# define BOOST_ATTRIBUTE_UNUSED __attribute__((unused)) +#endif + +#ifndef BOOST_COMPILER +# define BOOST_COMPILER "Clang version " __clang_version__ +#endif + +// Macro used to identify the Clang compiler. +#define BOOST_CLANG 1 + diff --git a/ThirdParty/boost-Subset/boost/config/compiler/codegear.hpp b/ThirdParty/boost-Subset/boost/config/compiler/codegear.hpp new file mode 100644 index 0000000000..02bd792a15 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/compiler/codegear.hpp @@ -0,0 +1,220 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Aleksey Gurtovoy 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// CodeGear C++ compiler setup: + +#if !defined( BOOST_WITH_CODEGEAR_WARNINGS ) +// these warnings occur frequently in optimized template code +# pragma warn -8004 // var assigned value, but never used +# pragma warn -8008 // condition always true/false +# pragma warn -8066 // dead code can never execute +# pragma warn -8104 // static members with ctors not threadsafe +# pragma warn -8105 // reference member in class without ctors +#endif +// +// versions check: +// last known and checked version is 0x621 +#if (__CODEGEARC__ > 0x621) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# else +# pragma message( "Unknown compiler version - please run the configure tests and report the results") +# endif +#endif + +// CodeGear C++ Builder 2009 +#if (__CODEGEARC__ <= 0x613) +# define BOOST_NO_INTEGRAL_INT64_T +# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS +# define BOOST_NO_PRIVATE_IN_AGGREGATE +# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE + // we shouldn't really need this - but too many things choke + // without it, this needs more investigation: +# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +# define BOOST_SP_NO_SP_CONVERTIBLE +#endif + +// CodeGear C++ Builder 2010 +#if (__CODEGEARC__ <= 0x621) +# define BOOST_NO_TYPENAME_WITH_CTOR // Cannot use typename keyword when making temporaries of a dependant type +# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +# define BOOST_NO_NESTED_FRIENDSHIP // TC1 gives nested classes access rights as any other member +# define BOOST_NO_USING_TEMPLATE +# define BOOST_NO_TWO_PHASE_NAME_LOOKUP +// Temporary hack, until specific MPL preprocessed headers are generated +# define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +// CodeGear has not yet completely implemented value-initialization, for +// example for array types, as I reported in 2010: Embarcadero Report 83751, +// "Value-initialization: arrays should have each element value-initialized", +// http://qc.embarcadero.com/wc/qcmain.aspx?d=83751 +// Last checked version: Embarcadero C++ 6.21 +// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues +// (Niels Dekker, LKEB, April 2010) +# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION + +# if defined(NDEBUG) && defined(__cplusplus) + // fix broken so that Boost.test works: +# include +# undef strcmp +# endif + // fix broken errno declaration: +# include +# ifndef errno +# define errno errno +# endif + +#endif + +// Reportedly, #pragma once is supported since C++ Builder 2010 +#if (__CODEGEARC__ >= 0x620) +# define BOOST_HAS_PRAGMA_ONCE +#endif + +// +// C++0x macros: +// +#if (__CODEGEARC__ <= 0x620) +#define BOOST_NO_CXX11_STATIC_ASSERT +#else +#define BOOST_HAS_STATIC_ASSERT +#endif +#define BOOST_HAS_CHAR16_T +#define BOOST_HAS_CHAR32_T +#define BOOST_HAS_LONG_LONG +// #define BOOST_HAS_ALIGNOF +#define BOOST_HAS_DECLTYPE +#define BOOST_HAS_EXPLICIT_CONVERSION_OPS +// #define BOOST_HAS_RVALUE_REFS +#define BOOST_HAS_SCOPED_ENUM +// #define BOOST_HAS_STATIC_ASSERT +#define BOOST_HAS_STD_TYPE_TRAITS + +#define BOOST_NO_CXX11_AUTO_DECLARATIONS +#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CXX11_CONSTEXPR +#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#define BOOST_NO_CXX11_DELETED_FUNCTIONS +#define BOOST_NO_CXX11_EXTERN_TEMPLATE +#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_CXX11_LAMBDAS +#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#define BOOST_NO_CXX11_NOEXCEPT +#define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR +#define BOOST_NO_CXX11_RAW_LITERALS +#define BOOST_NO_CXX11_RVALUE_REFERENCES +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_TEMPLATE_ALIASES +#define BOOST_NO_CXX11_UNICODE_LITERALS +#define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#define BOOST_NO_CXX11_ALIGNAS +#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif + +// +// TR1 macros: +// +#define BOOST_HAS_TR1_HASH +#define BOOST_HAS_TR1_TYPE_TRAITS +#define BOOST_HAS_TR1_UNORDERED_MAP +#define BOOST_HAS_TR1_UNORDERED_SET + +#define BOOST_HAS_MACRO_USE_FACET + +#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST + +// On non-Win32 platforms let the platform config figure this out: +#ifdef _WIN32 +# define BOOST_HAS_STDINT_H +#endif + +// +// __int64: +// +#if !defined(__STRICT_ANSI__) +# define BOOST_HAS_MS_INT64 +#endif +// +// check for exception handling support: +// +#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +#endif +// +// all versions have a : +// +#if !defined(__STRICT_ANSI__) +# define BOOST_HAS_DIRENT_H +#endif +// +// all versions support __declspec: +// +#if defined(__STRICT_ANSI__) +// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined +# define BOOST_SYMBOL_EXPORT +#endif +// +// ABI fixing headers: +// +#ifndef BOOST_ABI_PREFIX +# define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp" +#endif +#ifndef BOOST_ABI_SUFFIX +# define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp" +#endif +// +// Disable Win32 support in ANSI mode: +// +# pragma defineonoption BOOST_DISABLE_WIN32 -A +// +// MSVC compatibility mode does some nasty things: +// TODO: look up if this doesn't apply to the whole 12xx range +// +#if defined(_MSC_VER) && (_MSC_VER <= 1200) +# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP +# define BOOST_NO_VOID_RETURNS +#endif + +#define BOOST_COMPILER "CodeGear C++ version " BOOST_STRINGIZE(__CODEGEARC__) + diff --git a/ThirdParty/boost-Subset/boost/config/compiler/comeau.hpp b/ThirdParty/boost-Subset/boost/config/compiler/comeau.hpp new file mode 100644 index 0000000000..278222dcfd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/compiler/comeau.hpp @@ -0,0 +1,59 @@ +// (C) Copyright John Maddock 2001. +// (C) Copyright Douglas Gregor 2001. +// (C) Copyright Peter Dimov 2001. +// (C) Copyright Aleksey Gurtovoy 2003. +// (C) Copyright Beman Dawes 2003. +// (C) Copyright Jens Maurer 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Comeau C++ compiler setup: + +#include "boost/config/compiler/common_edg.hpp" + +#if (__COMO_VERSION__ <= 4245) + +# if defined(_MSC_VER) && _MSC_VER <= 1300 +# if _MSC_VER > 100 + // only set this in non-strict mode: +# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP +# endif +# endif + +// Void returns don't work when emulating VC 6 (Peter Dimov) +// TODO: look up if this doesn't apply to the whole 12xx range +# if defined(_MSC_VER) && (_MSC_VER < 1300) +# define BOOST_NO_VOID_RETURNS +# endif + +#endif // version 4245 + +// +// enable __int64 support in VC emulation mode +// +# if defined(_MSC_VER) && (_MSC_VER >= 1200) +# define BOOST_HAS_MS_INT64 +# endif + +#define BOOST_COMPILER "Comeau compiler version " BOOST_STRINGIZE(__COMO_VERSION__) + +// +// versions check: +// we don't know Comeau prior to version 4245: +#if __COMO_VERSION__ < 4245 +# error "Compiler not configured - please reconfigure" +#endif +// +// last known and checked version is 4245: +#if (__COMO_VERSION__ > 4245) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + + + + diff --git a/ThirdParty/boost-Subset/boost/config/compiler/common_edg.hpp b/ThirdParty/boost-Subset/boost/config/compiler/common_edg.hpp new file mode 100644 index 0000000000..b92e574d60 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/compiler/common_edg.hpp @@ -0,0 +1,143 @@ +// (C) Copyright John Maddock 2001 - 2002. +// (C) Copyright Jens Maurer 2001. +// (C) Copyright David Abrahams 2002. +// (C) Copyright Aleksey Gurtovoy 2002. +// (C) Copyright Markus Schoepflin 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// +// Options common to all edg based compilers. +// +// This is included from within the individual compiler mini-configs. + +#ifndef __EDG_VERSION__ +# error This file requires that __EDG_VERSION__ be defined. +#endif + +#if (__EDG_VERSION__ <= 238) +# define BOOST_NO_INTEGRAL_INT64_T +# define BOOST_NO_SFINAE +#endif + +#if (__EDG_VERSION__ <= 240) +# define BOOST_NO_VOID_RETURNS +#endif + +#if (__EDG_VERSION__ <= 241) && !defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) +# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP +#endif + +#if (__EDG_VERSION__ <= 244) && !defined(BOOST_NO_TEMPLATE_TEMPLATES) +# define BOOST_NO_TEMPLATE_TEMPLATES +#endif + +#if (__EDG_VERSION__ < 300) && !defined(BOOST_NO_IS_ABSTRACT) +# define BOOST_NO_IS_ABSTRACT +#endif + +#if (__EDG_VERSION__ <= 303) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) +# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +#endif + +// See also kai.hpp which checks a Kai-specific symbol for EH +# if !defined(__KCC) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +# endif + +# if !defined(__NO_LONG_LONG) +# define BOOST_HAS_LONG_LONG +# else +# define BOOST_NO_LONG_LONG +# endif + +// Not sure what version was the first to support #pragma once, but +// different EDG-based compilers (e.g. Intel) supported it for ages. +// Add a proper version check if it causes problems. +#define BOOST_HAS_PRAGMA_ONCE + +// +// C++0x features +// +// See above for BOOST_NO_LONG_LONG +// +#if (__EDG_VERSION__ < 310) +# define BOOST_NO_CXX11_EXTERN_TEMPLATE +#endif +#if (__EDG_VERSION__ <= 310) +// No support for initializer lists +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#endif +#if (__EDG_VERSION__ < 400) +# define BOOST_NO_CXX11_VARIADIC_MACROS +#endif + +#define BOOST_NO_CXX11_AUTO_DECLARATIONS +#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CXX11_CHAR16_T +#define BOOST_NO_CXX11_CHAR32_T +#define BOOST_NO_CXX11_CONSTEXPR +#define BOOST_NO_CXX11_DECLTYPE +#define BOOST_NO_CXX11_DECLTYPE_N3276 +#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#define BOOST_NO_CXX11_DELETED_FUNCTIONS +#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_CXX11_LAMBDAS +#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#define BOOST_NO_CXX11_NOEXCEPT +#define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR +#define BOOST_NO_CXX11_RAW_LITERALS +#define BOOST_NO_CXX11_RVALUE_REFERENCES +#define BOOST_NO_CXX11_SCOPED_ENUMS +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_NO_CXX11_TEMPLATE_ALIASES +#define BOOST_NO_CXX11_UNICODE_LITERALS +#define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#define BOOST_NO_CXX11_ALIGNAS +#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif + +#ifdef c_plusplus +// EDG has "long long" in non-strict mode +// However, some libraries have insufficient "long long" support +// #define BOOST_HAS_LONG_LONG +#endif diff --git a/ThirdParty/boost-Subset/boost/config/compiler/compaq_cxx.hpp b/ThirdParty/boost-Subset/boost/config/compiler/compaq_cxx.hpp new file mode 100644 index 0000000000..b44486c673 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/compiler/compaq_cxx.hpp @@ -0,0 +1,19 @@ +// (C) Copyright John Maddock 2001 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Tru64 C++ compiler setup (now HP): + +#define BOOST_COMPILER "HP Tru64 C++ " BOOST_STRINGIZE(__DECCXX_VER) + +#include "boost/config/compiler/common_edg.hpp" + +// +// versions check: +// Nothing to do here? + + + diff --git a/ThirdParty/boost-Subset/boost/config/compiler/cray.hpp b/ThirdParty/boost-Subset/boost/config/compiler/cray.hpp new file mode 100644 index 0000000000..3f66043357 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/compiler/cray.hpp @@ -0,0 +1,92 @@ +// (C) Copyright John Maddock 2011. +// (C) Copyright Cray, Inc. 2013 +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Greenhills C compiler setup: + +#define BOOST_COMPILER "Cray C version " BOOST_STRINGIZE(_RELEASE) + +#if _RELEASE < 8 +# error "Boost is not configured for Cray compilers prior to version 8, please try the configure script." +#endif + +// +// Check this is a recent EDG based compiler, otherwise we don't support it here: +// +#ifndef __EDG_VERSION__ +# error "Unsupported Cray compiler, please try running the configure script." +#endif + +#include "boost/config/compiler/common_edg.hpp" + + +// +// +#define BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_NO_CXX11_AUTO_DECLARATIONS +#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#define BOOST_HAS_NRVO +#define BOOST_NO_CXX11_VARIADIC_MACROS +#define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#define BOOST_NO_CXX11_UNICODE_LITERALS +#define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#define BOOST_HAS_NRVO +#define BOOST_NO_CXX11_TEMPLATE_ALIASES +#define BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_SCOPED_ENUMS +#define BOOST_NO_CXX11_RVALUE_REFERENCES +#define BOOST_NO_CXX11_RANGE_BASED_FOR +#define BOOST_NO_CXX11_RAW_LITERALS +#define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_NOEXCEPT +#define BOOST_NO_CXX11_LAMBDAS +#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_CXX11_DELETED_FUNCTIONS +#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#define BOOST_NO_CXX11_DECLTYPE_N3276 +#define BOOST_NO_CXX11_DECLTYPE +#define BOOST_NO_CXX11_CONSTEXPR +#define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION +#define BOOST_NO_CXX11_CHAR32_T +#define BOOST_NO_CXX11_CHAR16_T +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + + +//#define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG +#define BOOST_MATH_DISABLE_STD_FPCLASSIFY +//#define BOOST_HAS_FPCLASSIFY + +#define BOOST_SP_USE_PTHREADS +#define BOOST_AC_USE_PTHREADS + +/* everything that follows is working around what are thought to be + * compiler shortcomings. Revist all of these regularly. + */ + +//#define BOOST_USE_ENUM_STATIC_ASSERT +//#define BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS //(this may be implied by the previous #define + +// These constants should be provided by the +// compiler, at least when -hgnu is asserted on the command line. + +#ifndef __ATOMIC_RELAXED +#define __ATOMIC_RELAXED 0 +#define __ATOMIC_CONSUME 1 +#define __ATOMIC_ACQUIRE 2 +#define __ATOMIC_RELEASE 3 +#define __ATOMIC_ACQ_REL 4 +#define __ATOMIC_SEQ_CST 5 +#endif + + + diff --git a/ThirdParty/boost-Subset/boost/config/compiler/digitalmars.hpp b/ThirdParty/boost-Subset/boost/config/compiler/digitalmars.hpp new file mode 100644 index 0000000000..a3d293c7b5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/compiler/digitalmars.hpp @@ -0,0 +1,124 @@ +// Copyright (C) Christof Meerwald 2003 +// Copyright (C) Dan Watkins 2003 +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// Digital Mars C++ compiler setup: +#define BOOST_COMPILER __DMC_VERSION_STRING__ + +#define BOOST_HAS_LONG_LONG +#define BOOST_HAS_PRAGMA_ONCE + +#if !defined(BOOST_STRICT_CONFIG) +#define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +#define BOOST_NO_OPERATORS_IN_NAMESPACE +#define BOOST_NO_UNREACHABLE_RETURN_DETECTION +#define BOOST_NO_SFINAE +#define BOOST_NO_USING_TEMPLATE +#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +#endif + +// +// has macros: +#define BOOST_HAS_DIRENT_H +#define BOOST_HAS_STDINT_H +#define BOOST_HAS_WINTHREADS + +#if (__DMC__ >= 0x847) +#define BOOST_HAS_EXPM1 +#define BOOST_HAS_LOG1P +#endif + +// +// Is this really the best way to detect whether the std lib is in namespace std? +// +#ifdef __cplusplus +#include +#endif +#if !defined(__STL_IMPORT_VENDOR_CSTD) && !defined(_STLP_IMPORT_VENDOR_CSTD) +# define BOOST_NO_STDC_NAMESPACE +#endif + + +// check for exception handling support: +#if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +#endif + +// +// C++0x features +// +#define BOOST_NO_CXX11_AUTO_DECLARATIONS +#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CXX11_CHAR16_T +#define BOOST_NO_CXX11_CHAR32_T +#define BOOST_NO_CXX11_CONSTEXPR +#define BOOST_NO_CXX11_DECLTYPE +#define BOOST_NO_CXX11_DECLTYPE_N3276 +#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#define BOOST_NO_CXX11_DELETED_FUNCTIONS +#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_CXX11_EXTERN_TEMPLATE +#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#define BOOST_NO_CXX11_LAMBDAS +#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#define BOOST_NO_CXX11_NOEXCEPT +#define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR +#define BOOST_NO_CXX11_RAW_LITERALS +#define BOOST_NO_CXX11_RVALUE_REFERENCES +#define BOOST_NO_CXX11_SCOPED_ENUMS +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_NO_CXX11_TEMPLATE_ALIASES +#define BOOST_NO_CXX11_UNICODE_LITERALS +#define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#define BOOST_NO_CXX11_ALIGNAS +#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif + +#if (__DMC__ <= 0x840) +#error "Compiler not supported or configured - please reconfigure" +#endif +// +// last known and checked version is ...: +#if (__DMC__ > 0x848) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif diff --git a/ThirdParty/boost-Subset/boost/config/compiler/gcc.hpp b/ThirdParty/boost-Subset/boost/config/compiler/gcc.hpp new file mode 100644 index 0000000000..41705df039 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/compiler/gcc.hpp @@ -0,0 +1,296 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Darin Adler 2001 - 2002. +// (C) Copyright Jens Maurer 2001 - 2002. +// (C) Copyright Beman Dawes 2001 - 2003. +// (C) Copyright Douglas Gregor 2002. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Synge Todo 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// GNU C++ compiler setup. + +// +// Define BOOST_GCC so we know this is "real" GCC and not some pretender: +// +#define BOOST_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) +#if !defined(__CUDACC__) +#define BOOST_GCC BOOST_GCC_VERSION +#endif + +#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L) +# define BOOST_GCC_CXX11 +#endif + +#if __GNUC__ == 3 +# if defined (__PATHSCALE__) +# define BOOST_NO_TWO_PHASE_NAME_LOOKUP +# define BOOST_NO_IS_ABSTRACT +# endif + +# if __GNUC_MINOR__ < 4 +# define BOOST_NO_IS_ABSTRACT +# endif +# define BOOST_NO_CXX11_EXTERN_TEMPLATE +#endif +#if __GNUC__ < 4 +// +// All problems to gcc-3.x and earlier here: +// +#define BOOST_NO_TWO_PHASE_NAME_LOOKUP +# ifdef __OPEN64__ +# define BOOST_NO_IS_ABSTRACT +# endif +#endif + +// GCC prior to 3.4 had #pragma once too but it didn't work well with filesystem links +#if BOOST_GCC_VERSION >= 30400 +#define BOOST_HAS_PRAGMA_ONCE +#endif + +#if BOOST_GCC_VERSION < 40400 +// Previous versions of GCC did not completely implement value-initialization: +// GCC Bug 30111, "Value-initialization of POD base class doesn't initialize +// members", reported by Jonathan Wakely in 2006, +// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30111 (fixed for GCC 4.4) +// GCC Bug 33916, "Default constructor fails to initialize array members", +// reported by Michael Elizabeth Chastain in 2007, +// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33916 (fixed for GCC 4.2.4) +// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues +#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION +#endif + +#if !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +#endif + + +// +// Threading support: Turn this on unconditionally here (except for +// those platforms where we can know for sure). It will get turned off again +// later if no threading API is detected. +// +#if !defined(__MINGW32__) && !defined(linux) && !defined(__linux) && !defined(__linux__) +# define BOOST_HAS_THREADS +#endif + +// +// gcc has "long long" +// Except on Darwin with standard compliance enabled (-pedantic) +// Apple gcc helpfully defines this macro we can query +// +#if !defined(__DARWIN_NO_LONG_LONG) +# define BOOST_HAS_LONG_LONG +#endif + +// +// gcc implements the named return value optimization since version 3.1 +// +#define BOOST_HAS_NRVO + +// Branch prediction hints +#define BOOST_LIKELY(x) __builtin_expect(x, 1) +#define BOOST_UNLIKELY(x) __builtin_expect(x, 0) + +// +// Dynamic shared object (DSO) and dynamic-link library (DLL) support +// +#if __GNUC__ >= 4 +# if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && !defined(__CYGWIN__) + // All Win32 development environments, including 64-bit Windows and MinGW, define + // _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment, + // so does not define _WIN32 or its variants. +# define BOOST_HAS_DECLSPEC +# define BOOST_SYMBOL_EXPORT __attribute__((__dllexport__)) +# define BOOST_SYMBOL_IMPORT __attribute__((__dllimport__)) +# else +# define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default"))) +# define BOOST_SYMBOL_IMPORT +# endif +# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default"))) +#else +// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined +# define BOOST_SYMBOL_EXPORT +#endif + +// +// RTTI and typeinfo detection is possible post gcc-4.3: +// +#if BOOST_GCC_VERSION > 40300 +# ifndef __GXX_RTTI +# ifndef BOOST_NO_TYPEID +# define BOOST_NO_TYPEID +# endif +# ifndef BOOST_NO_RTTI +# define BOOST_NO_RTTI +# endif +# endif +#endif + +// +// Recent GCC versions have __int128 when in 64-bit mode. +// +// We disable this if the compiler is really nvcc as it +// doesn't actually support __int128 as of CUDA_VERSION=5000 +// even though it defines __SIZEOF_INT128__. +// See https://svn.boost.org/trac/boost/ticket/8048 +// Only re-enable this for nvcc if you're absolutely sure +// of the circumstances under which it's supported: +// +#if defined(__SIZEOF_INT128__) && !defined(__CUDACC__) +# define BOOST_HAS_INT128 +#endif + +// C++0x features in 4.3.n and later +// +#if (BOOST_GCC_VERSION >= 40300) && defined(BOOST_GCC_CXX11) +// C++0x features are only enabled when -std=c++0x or -std=gnu++0x are +// passed on the command line, which in turn defines +// __GXX_EXPERIMENTAL_CXX0X__. +# define BOOST_HAS_DECLTYPE +# define BOOST_HAS_RVALUE_REFS +# define BOOST_HAS_STATIC_ASSERT +# define BOOST_HAS_VARIADIC_TMPL +#else +# define BOOST_NO_CXX11_DECLTYPE +# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +# define BOOST_NO_CXX11_RVALUE_REFERENCES +# define BOOST_NO_CXX11_STATIC_ASSERT +#endif + +// C++0x features in 4.4.n and later +// +#if (BOOST_GCC_VERSION < 40400) || !defined(BOOST_GCC_CXX11) +# define BOOST_NO_CXX11_AUTO_DECLARATIONS +# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +# define BOOST_NO_CXX11_CHAR16_T +# define BOOST_NO_CXX11_CHAR32_T +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +# define BOOST_NO_CXX11_DELETED_FUNCTIONS +# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +# define BOOST_NO_CXX11_INLINE_NAMESPACES +# define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#endif + +#if BOOST_GCC_VERSION < 40500 +# define BOOST_NO_SFINAE_EXPR +#endif + +// GCC 4.5 forbids declaration of defaulted functions in private or protected sections +#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ == 5) || !defined(BOOST_GCC_CXX11) +# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS +#endif + +// C++0x features in 4.5.0 and later +// +#if (BOOST_GCC_VERSION < 40500) || !defined(BOOST_GCC_CXX11) +# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +# define BOOST_NO_CXX11_LAMBDAS +# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +# define BOOST_NO_CXX11_RAW_LITERALS +# define BOOST_NO_CXX11_UNICODE_LITERALS +#endif + +// C++0x features in 4.5.1 and later +// +#if (BOOST_GCC_VERSION < 40501) || !defined(BOOST_GCC_CXX11) +// scoped enums have a serious bug in 4.4.0, so define BOOST_NO_CXX11_SCOPED_ENUMS before 4.5.1 +// See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064 +# define BOOST_NO_CXX11_SCOPED_ENUMS +#endif + +// C++0x features in 4.6.n and later +// +#if (BOOST_GCC_VERSION < 40600) || !defined(BOOST_GCC_CXX11) +#define BOOST_NO_CXX11_CONSTEXPR +#define BOOST_NO_CXX11_NOEXCEPT +#define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR +#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#endif + +// C++0x features in 4.7.n and later +// +#if (BOOST_GCC_VERSION < 40700) || !defined(BOOST_GCC_CXX11) +# define BOOST_NO_CXX11_FINAL +# define BOOST_NO_CXX11_TEMPLATE_ALIASES +# define BOOST_NO_CXX11_USER_DEFINED_LITERALS +# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS +#endif + +// C++0x features in 4.8.n and later +// +#if (BOOST_GCC_VERSION < 40800) || !defined(BOOST_GCC_CXX11) +# define BOOST_NO_CXX11_ALIGNAS +#endif + +// C++0x features in 4.8.1 and later +// +#if (BOOST_GCC_VERSION < 40801) || !defined(BOOST_GCC_CXX11) +# define BOOST_NO_CXX11_DECLTYPE_N3276 +# define BOOST_NO_CXX11_REF_QUALIFIERS +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif + +// C++14 features in 4.9.0 and later +// +#if (BOOST_GCC_VERSION < 40900) || (__cplusplus < 201300) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +# define BOOST_NO_CXX14_DECLTYPE_AUTO +# if !((BOOST_GCC_VERSION >= 40801) && (BOOST_GCC_VERSION < 40900) && defined(BOOST_GCC_CXX11)) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +# endif +#endif + + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif + +// +// Unused attribute: +#if __GNUC__ >= 4 +# define BOOST_ATTRIBUTE_UNUSED __attribute__((unused)) +#endif + +#ifndef BOOST_COMPILER +# define BOOST_COMPILER "GNU C++ version " __VERSION__ +#endif + +// ConceptGCC compiler: +// http://www.generic-programming.org/software/ConceptGCC/ +#ifdef __GXX_CONCEPTS__ +# define BOOST_HAS_CONCEPTS +# define BOOST_COMPILER "ConceptGCC version " __VERSION__ +#endif + +// versions check: +// we don't know gcc prior to version 3.30: +#if (BOOST_GCC_VERSION< 30300) +# error "Compiler not configured - please reconfigure" +#endif +// +// last known and checked version is 4.9: +#if (BOOST_GCC_VERSION > 40900) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# else +// we don't emit warnings here anymore since there are no defect macros defined for +// gcc post 3.4, so any failures are gcc regressions... +//# warning "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + diff --git a/ThirdParty/boost-Subset/boost/config/compiler/gcc_xml.hpp b/ThirdParty/boost-Subset/boost/config/compiler/gcc_xml.hpp new file mode 100644 index 0000000000..c11f29dd01 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/compiler/gcc_xml.hpp @@ -0,0 +1,95 @@ +// (C) Copyright John Maddock 2006. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// GCC-XML C++ compiler setup: + +# if !defined(__GCCXML_GNUC__) || ((__GCCXML_GNUC__ <= 3) && (__GCCXML_GNUC_MINOR__ <= 3)) +# define BOOST_NO_IS_ABSTRACT +# endif + +// +// Threading support: Turn this on unconditionally here (except for +// those platforms where we can know for sure). It will get turned off again +// later if no threading API is detected. +// +#if !defined(__MINGW32__) && !defined(_MSC_VER) && !defined(linux) && !defined(__linux) && !defined(__linux__) +# define BOOST_HAS_THREADS +#endif + +// +// gcc has "long long" +// +#define BOOST_HAS_LONG_LONG + +// C++0x features: +// +# define BOOST_NO_CXX11_CONSTEXPR +# define BOOST_NO_CXX11_NULLPTR +# define BOOST_NO_CXX11_TEMPLATE_ALIASES +# define BOOST_NO_CXX11_DECLTYPE +# define BOOST_NO_CXX11_DECLTYPE_N3276 +# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +# define BOOST_NO_CXX11_RVALUE_REFERENCES +# define BOOST_NO_CXX11_STATIC_ASSERT +# define BOOST_NO_CXX11_VARIADIC_TEMPLATES +# define BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_NO_CXX11_AUTO_DECLARATIONS +# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +# define BOOST_NO_CXX11_CHAR16_T +# define BOOST_NO_CXX11_CHAR32_T +# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +# define BOOST_NO_CXX11_DELETED_FUNCTIONS +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_SCOPED_ENUMS +# define BOOST_NO_SFINAE_EXPR +# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +# define BOOST_NO_CXX11_LAMBDAS +# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +# define BOOST_NO_CXX11_RANGE_BASED_FOR +# define BOOST_NO_CXX11_RAW_LITERALS +# define BOOST_NO_CXX11_UNICODE_LITERALS +# define BOOST_NO_CXX11_NOEXCEPT +# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +# define BOOST_NO_CXX11_USER_DEFINED_LITERALS +# define BOOST_NO_CXX11_ALIGNAS +# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +# define BOOST_NO_CXX11_INLINE_NAMESPACES +# define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif + +#define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__ + + diff --git a/ThirdParty/boost-Subset/boost/config/compiler/greenhills.hpp b/ThirdParty/boost-Subset/boost/config/compiler/greenhills.hpp new file mode 100644 index 0000000000..038b6b2b52 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/compiler/greenhills.hpp @@ -0,0 +1,28 @@ +// (C) Copyright John Maddock 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Greenhills C++ compiler setup: + +#define BOOST_COMPILER "Greenhills C++ version " BOOST_STRINGIZE(__ghs) + +#include "boost/config/compiler/common_edg.hpp" + +// +// versions check: +// we don't support Greenhills prior to version 0: +#if __ghs < 0 +# error "Compiler not supported or configured - please reconfigure" +#endif +// +// last known and checked version is 0: +#if (__ghs > 0) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + + diff --git a/ThirdParty/boost-Subset/boost/config/compiler/hp_acc.hpp b/ThirdParty/boost-Subset/boost/config/compiler/hp_acc.hpp new file mode 100644 index 0000000000..fb63839a57 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/compiler/hp_acc.hpp @@ -0,0 +1,145 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2001 - 2003. +// (C) Copyright Aleksey Gurtovoy 2002. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Toon Knapen 2003. +// (C) Copyright Boris Gubenko 2006 - 2007. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// HP aCC C++ compiler setup: + +#if defined(__EDG__) +#include "boost/config/compiler/common_edg.hpp" +#endif + +#if (__HP_aCC <= 33100) +# define BOOST_NO_INTEGRAL_INT64_T +# define BOOST_NO_OPERATORS_IN_NAMESPACE +# if !defined(_NAMESPACE_STD) +# define BOOST_NO_STD_LOCALE +# define BOOST_NO_STRINGSTREAM +# endif +#endif + +#if (__HP_aCC <= 33300) +// member templates are sufficiently broken that we disable them for now +# define BOOST_NO_MEMBER_TEMPLATES +# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS +# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE +#endif + +#if (__HP_aCC <= 38000) +# define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#endif + +#if (__HP_aCC > 50000) && (__HP_aCC < 60000) +# define BOOST_NO_UNREACHABLE_RETURN_DETECTION +# define BOOST_NO_TEMPLATE_TEMPLATES +# define BOOST_NO_SWPRINTF +# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS +# define BOOST_NO_IS_ABSTRACT +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +#endif + +// optional features rather than defects: +#if (__HP_aCC >= 33900) +# define BOOST_HAS_LONG_LONG +# define BOOST_HAS_PARTIAL_STD_ALLOCATOR +#endif + +#if (__HP_aCC >= 50000 ) && (__HP_aCC <= 53800 ) || (__HP_aCC < 31300 ) +# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD +#endif + +// This macro should not be defined when compiling in strict ansi +// mode, but, currently, we don't have the ability to determine +// what standard mode we are compiling with. Some future version +// of aCC6 compiler will provide predefined macros reflecting the +// compilation options, including the standard mode. +#if (__HP_aCC >= 60000) || ((__HP_aCC > 38000) && defined(__hpxstd98)) +# define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#endif + +#define BOOST_COMPILER "HP aCC version " BOOST_STRINGIZE(__HP_aCC) + +// +// versions check: +// we don't support HP aCC prior to version 33000: +#if __HP_aCC < 33000 +# error "Compiler not supported or configured - please reconfigure" +#endif + +// +// Extended checks for supporting aCC on PA-RISC +#if __HP_aCC > 30000 && __HP_aCC < 50000 +# if __HP_aCC < 38000 + // versions prior to version A.03.80 not supported +# error "Compiler version not supported - version A.03.80 or higher is required" +# elif !defined(__hpxstd98) + // must compile using the option +hpxstd98 with version A.03.80 and above +# error "Compiler option '+hpxstd98' is required for proper support" +# endif //PA-RISC +#endif + +// +// C++0x features +// +// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG +// +#if !defined(__EDG__) + +#define BOOST_NO_CXX11_AUTO_DECLARATIONS +#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CXX11_CHAR16_T +#define BOOST_NO_CXX11_CHAR32_T +#define BOOST_NO_CXX11_CONSTEXPR +#define BOOST_NO_CXX11_DECLTYPE +#define BOOST_NO_CXX11_DECLTYPE_N3276 +#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#define BOOST_NO_CXX11_DELETED_FUNCTIONS +#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_CXX11_EXTERN_TEMPLATE +#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#define BOOST_NO_CXX11_LAMBDAS +#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#define BOOST_NO_CXX11_NOEXCEPT +#define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR +#define BOOST_NO_CXX11_RAW_LITERALS +#define BOOST_NO_CXX11_RVALUE_REFERENCES +#define BOOST_NO_CXX11_SCOPED_ENUMS +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_NO_CXX11_TEMPLATE_ALIASES +#define BOOST_NO_CXX11_UNICODE_LITERALS +#define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#define BOOST_NO_CXX11_ALIGNAS +#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_REF_QUALIFIERS + +/* + See https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443331 and + https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443436 +*/ + +#if (__HP_aCC < 62500) || !defined(HP_CXX0x_SOURCE) + #define BOOST_NO_CXX11_VARIADIC_MACROS +#endif + +#endif + +// +// last known and checked version for HP-UX/ia64 is 61300 +// last known and checked version for PA-RISC is 38000 +#if ((__HP_aCC > 61300) || ((__HP_aCC > 38000) && defined(__hpxstd98))) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif diff --git a/ThirdParty/boost-Subset/boost/config/compiler/intel.hpp b/ThirdParty/boost-Subset/boost/config/compiler/intel.hpp new file mode 100644 index 0000000000..ecfacc5e70 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/compiler/intel.hpp @@ -0,0 +1,529 @@ +// (C) Copyright John Maddock 2001-8. +// (C) Copyright Peter Dimov 2001. +// (C) Copyright Jens Maurer 2001. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Aleksey Gurtovoy 2002 - 2003. +// (C) Copyright Guillaume Melquiond 2002 - 2003. +// (C) Copyright Beman Dawes 2003. +// (C) Copyright Martin Wille 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Intel compiler setup: + +#if defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500) && (defined(_MSC_VER) || defined(__GNUC__)) + +#ifdef _MSC_VER + +#include + +#if (__INTEL_COMPILER >= 1500) && (_MSC_VER >= 1900) +// +// These appear to be supported, even though VC++ may not support them: +// +#define BOOST_HAS_EXPM1 +#define BOOST_HAS_LOG1P +#undef BOOST_NO_CXX14_BINARY_LITERALS +// This one may be a little risky to enable?? +#undef BOOST_NO_SFINAE_EXPR + +#endif + +#else + +#include + +#endif + +#undef BOOST_COMPILER + +#if defined(__INTEL_COMPILER) +#if __INTEL_COMPILER == 9999 +# define BOOST_INTEL_CXX_VERSION 1200 // Intel bug in 12.1. +#else +# define BOOST_INTEL_CXX_VERSION __INTEL_COMPILER +#endif +#elif defined(__ICL) +# define BOOST_INTEL_CXX_VERSION __ICL +#elif defined(__ICC) +# define BOOST_INTEL_CXX_VERSION __ICC +#elif defined(__ECC) +# define BOOST_INTEL_CXX_VERSION __ECC +#endif + +// Flags determined by comparing output of 'icpc -dM -E' with and without '-std=c++0x' +#if (!(defined(_WIN32) || defined(_WIN64)) && defined(__STDC_HOSTED__) && (__STDC_HOSTED__ && (BOOST_INTEL_CXX_VERSION <= 1200))) || defined(__GXX_EXPERIMENTAL_CPP0X__) || defined(__GXX_EXPERIMENTAL_CXX0X__) +# define BOOST_INTEL_STDCXX0X +#endif +#if defined(_MSC_VER) && (_MSC_VER >= 1600) +# define BOOST_INTEL_STDCXX0X +#endif + +#ifdef __GNUC__ +# define BOOST_INTEL_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) +#endif + +#if !defined(BOOST_COMPILER) +# if defined(BOOST_INTEL_STDCXX0X) +# define BOOST_COMPILER "Intel C++ C++0x mode version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) +# else +# define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) +# endif +#endif + +#define BOOST_INTEL BOOST_INTEL_CXX_VERSION + +#if defined(_WIN32) || defined(_WIN64) +# define BOOST_INTEL_WIN BOOST_INTEL +#else +# define BOOST_INTEL_LINUX BOOST_INTEL +#endif + +#else + +#include "boost/config/compiler/common_edg.hpp" + +#if defined(__INTEL_COMPILER) +#if __INTEL_COMPILER == 9999 +# define BOOST_INTEL_CXX_VERSION 1200 // Intel bug in 12.1. +#else +# define BOOST_INTEL_CXX_VERSION __INTEL_COMPILER +#endif +#elif defined(__ICL) +# define BOOST_INTEL_CXX_VERSION __ICL +#elif defined(__ICC) +# define BOOST_INTEL_CXX_VERSION __ICC +#elif defined(__ECC) +# define BOOST_INTEL_CXX_VERSION __ECC +#endif + +// Flags determined by comparing output of 'icpc -dM -E' with and without '-std=c++0x' +#if (!(defined(_WIN32) || defined(_WIN64)) && defined(__STDC_HOSTED__) && (__STDC_HOSTED__ && (BOOST_INTEL_CXX_VERSION <= 1200))) || defined(__GXX_EXPERIMENTAL_CPP0X__) || defined(__GXX_EXPERIMENTAL_CXX0X__) +# define BOOST_INTEL_STDCXX0X +#endif +#if defined(_MSC_VER) && (_MSC_VER >= 1600) +# define BOOST_INTEL_STDCXX0X +#endif + +#ifdef __GNUC__ +# define BOOST_INTEL_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) +#endif + +#if !defined(BOOST_COMPILER) +# if defined(BOOST_INTEL_STDCXX0X) +# define BOOST_COMPILER "Intel C++ C++0x mode version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) +# else +# define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) +# endif +#endif + +#define BOOST_INTEL BOOST_INTEL_CXX_VERSION + +#if defined(_WIN32) || defined(_WIN64) +# define BOOST_INTEL_WIN BOOST_INTEL +#else +# define BOOST_INTEL_LINUX BOOST_INTEL +#endif + +#if (BOOST_INTEL_CXX_VERSION <= 600) + +# if defined(_MSC_VER) && (_MSC_VER <= 1300) // added check for <= VC 7 (Peter Dimov) + +// Boost libraries assume strong standard conformance unless otherwise +// indicated by a config macro. As configured by Intel, the EDG front-end +// requires certain compiler options be set to achieve that strong conformance. +// Particularly /Qoption,c,--arg_dep_lookup (reported by Kirk Klobe & Thomas Witt) +// and /Zc:wchar_t,forScope. See boost-root/tools/build/intel-win32-tools.jam for +// details as they apply to particular versions of the compiler. When the +// compiler does not predefine a macro indicating if an option has been set, +// this config file simply assumes the option has been set. +// Thus BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP will not be defined, even if +// the compiler option is not enabled. + +# define BOOST_NO_SWPRINTF +# endif + +// Void returns, 64 bit integrals don't work when emulating VC 6 (Peter Dimov) + +# if defined(_MSC_VER) && (_MSC_VER <= 1200) +# define BOOST_NO_VOID_RETURNS +# define BOOST_NO_INTEGRAL_INT64_T +# endif + +#endif + +#if (BOOST_INTEL_CXX_VERSION <= 710) && defined(_WIN32) +# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS +#endif + +// See http://aspn.activestate.com/ASPN/Mail/Message/boost/1614864 +#if BOOST_INTEL_CXX_VERSION < 600 +# define BOOST_NO_INTRINSIC_WCHAR_T +#else +// We should test the macro _WCHAR_T_DEFINED to check if the compiler +// supports wchar_t natively. *BUT* there is a problem here: the standard +// headers define this macro if they typedef wchar_t. Anyway, we're lucky +// because they define it without a value, while Intel C++ defines it +// to 1. So we can check its value to see if the macro was defined natively +// or not. +// Under UNIX, the situation is exactly the same, but the macro _WCHAR_T +// is used instead. +# if ((_WCHAR_T_DEFINED + 0) == 0) && ((_WCHAR_T + 0) == 0) +# define BOOST_NO_INTRINSIC_WCHAR_T +# endif +#endif + +#if defined(__GNUC__) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) +// +// Figure out when Intel is emulating this gcc bug +// (All Intel versions prior to 9.0.26, and versions +// later than that if they are set up to emulate gcc 3.2 +// or earlier): +// +# if ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)) || (BOOST_INTEL < 900) || (__INTEL_COMPILER_BUILD_DATE < 20050912) +# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +# endif +#endif +#if (defined(__GNUC__) && (__GNUC__ < 4)) || (defined(_WIN32) && (BOOST_INTEL_CXX_VERSION <= 1200)) || (BOOST_INTEL_CXX_VERSION <= 1200) +// GCC or VC emulation: +#define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#endif +// +// Verify that we have actually got BOOST_NO_INTRINSIC_WCHAR_T +// set correctly, if we don't do this now, we will get errors later +// in type_traits code among other things, getting this correct +// for the Intel compiler is actually remarkably fragile and tricky: +// +#ifdef __cplusplus +#if defined(BOOST_NO_INTRINSIC_WCHAR_T) +#include +template< typename T > struct assert_no_intrinsic_wchar_t; +template<> struct assert_no_intrinsic_wchar_t { typedef void type; }; +// if you see an error here then you need to unset BOOST_NO_INTRINSIC_WCHAR_T +// where it is defined above: +typedef assert_no_intrinsic_wchar_t::type assert_no_intrinsic_wchar_t_; +#else +template< typename T > struct assert_intrinsic_wchar_t; +template<> struct assert_intrinsic_wchar_t {}; +// if you see an error here then define BOOST_NO_INTRINSIC_WCHAR_T on the command line: +template<> struct assert_intrinsic_wchar_t {}; +#endif +#endif + +#if defined(_MSC_VER) && (_MSC_VER+0 >= 1000) +# if _MSC_VER >= 1200 +# define BOOST_HAS_MS_INT64 +# endif +# define BOOST_NO_SWPRINTF +# define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#elif defined(_WIN32) +# define BOOST_DISABLE_WIN32 +#endif + +// I checked version 6.0 build 020312Z, it implements the NRVO. +// Correct this as you find out which version of the compiler +// implemented the NRVO first. (Daniel Frey) +#if (BOOST_INTEL_CXX_VERSION >= 600) +# define BOOST_HAS_NRVO +#endif + +// Branch prediction hints +// I'm not sure 8.0 was the first version to support these builtins, +// update the condition if the version is not accurate. (Andrey Semashev) +#if defined(__GNUC__) && BOOST_INTEL_CXX_VERSION >= 800 +#define BOOST_LIKELY(x) __builtin_expect(x, 1) +#define BOOST_UNLIKELY(x) __builtin_expect(x, 0) +#endif + +// RTTI +// __RTTI is the EDG macro +// __INTEL_RTTI__ is the Intel macro +// __GXX_RTTI is the g++ macro +// _CPPRTTI is the MSVC++ macro +#if !defined(__RTTI) && !defined(__INTEL_RTTI__) && !defined(__GXX_RTTI) && !defined(_CPPRTTI) + +#if !defined(BOOST_NO_RTTI) +# define BOOST_NO_RTTI +#endif + +// in MS mode, static typeid works even when RTTI is off +#if !defined(_MSC_VER) && !defined(BOOST_NO_TYPEID) +# define BOOST_NO_TYPEID +#endif + +#endif + +// +// versions check: +// we don't support Intel prior to version 6.0: +#if BOOST_INTEL_CXX_VERSION < 600 +# error "Compiler not supported or configured - please reconfigure" +#endif + +// Intel on MacOS requires +#if defined(__APPLE__) && defined(__INTEL_COMPILER) +# define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#endif + +// Intel on Altix Itanium +#if defined(__itanium__) && defined(__INTEL_COMPILER) +# define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#endif + +// +// An attempt to value-initialize a pointer-to-member may trigger an +// internal error on Intel <= 11.1 (last checked version), as was +// reported by John Maddock, Intel support issue 589832, May 2010. +// Moreover, according to test results from Huang-Vista-x86_32_intel, +// intel-vc9-win-11.1 may leave a non-POD array uninitialized, in some +// cases when it should be value-initialized. +// (Niels Dekker, LKEB, May 2010) +// Apparently Intel 12.1 (compiler version number 9999 !!) has the same issue (compiler regression). +#if defined(__INTEL_COMPILER) +# if (__INTEL_COMPILER <= 1110) || (__INTEL_COMPILER == 9999) || (defined(_WIN32) && (__INTEL_COMPILER < 1600)) +# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION +# endif +#endif + +// +// Dynamic shared object (DSO) and dynamic-link library (DLL) support +// +#if defined(__GNUC__) && (__GNUC__ >= 4) +# define BOOST_SYMBOL_EXPORT __attribute__((visibility("default"))) +# define BOOST_SYMBOL_IMPORT +# define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default"))) +#endif +// +// C++0x features +// For each feature we need to check both the Intel compiler version, +// and the version of MSVC or GCC that we are emulating. +// See http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/ +// for a list of which features were implemented in which Intel releases. +// +#if defined(BOOST_INTEL_STDCXX0X) +// BOOST_NO_CXX11_CONSTEXPR: +#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && !defined(_MSC_VER) +// Available in earlier Intel versions, but fail our tests: +# undef BOOST_NO_CXX11_CONSTEXPR +#endif +// BOOST_NO_CXX11_NULLPTR: +#if (BOOST_INTEL_CXX_VERSION >= 1210) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) +# undef BOOST_NO_CXX11_NULLPTR +#endif +// BOOST_NO_CXX11_TEMPLATE_ALIASES +#if (BOOST_INTEL_CXX_VERSION >= 1210) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40700)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) +# undef BOOST_NO_CXX11_TEMPLATE_ALIASES +#endif + +// BOOST_NO_CXX11_DECLTYPE +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) +# undef BOOST_NO_CXX11_DECLTYPE +#endif + +// BOOST_NO_CXX11_DECLTYPE_N3276 +#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) +# undef BOOST_NO_CXX11_DECLTYPE_N3276 +#endif + +// BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) +# undef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#endif + +// BOOST_NO_CXX11_RVALUE_REFERENCES +#if (BOOST_INTEL_CXX_VERSION >= 1300) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) +// This is available from earlier Intel versions, but breaks Filesystem and other libraries: +# undef BOOST_NO_CXX11_RVALUE_REFERENCES +#endif + +// BOOST_NO_CXX11_STATIC_ASSERT +#if (BOOST_INTEL_CXX_VERSION >= 1110) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) +# undef BOOST_NO_CXX11_STATIC_ASSERT +#endif + +// BOOST_NO_CXX11_VARIADIC_TEMPLATES +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) +# undef BOOST_NO_CXX11_VARIADIC_TEMPLATES +#endif + +// BOOST_NO_CXX11_VARIADIC_MACROS +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40200)) && (!defined(_MSC_VER) || (_MSC_VER >= 1400)) +# undef BOOST_NO_CXX11_VARIADIC_MACROS +#endif + +// BOOST_NO_CXX11_AUTO_DECLARATIONS +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) +# undef BOOST_NO_CXX11_AUTO_DECLARATIONS +#endif + +// BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) +# undef BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#endif + +// BOOST_NO_CXX11_CHAR16_T +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) +# undef BOOST_NO_CXX11_CHAR16_T +#endif + +// BOOST_NO_CXX11_CHAR32_T +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) +# undef BOOST_NO_CXX11_CHAR32_T +#endif + +// BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) +# undef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#endif + +// BOOST_NO_CXX11_DELETED_FUNCTIONS +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) +# undef BOOST_NO_CXX11_DELETED_FUNCTIONS +#endif + +// BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700)) +# undef BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#endif + +// BOOST_NO_CXX11_SCOPED_ENUMS +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40501)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700)) +// This is available but broken in earlier Intel releases. +# undef BOOST_NO_CXX11_SCOPED_ENUMS +#endif + +// BOOST_NO_SFINAE_EXPR +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) +# undef BOOST_NO_SFINAE_EXPR +#endif + +// BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) +// This is available in earlier Intel releases, but breaks Multiprecision: +# undef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#endif + +// BOOST_NO_CXX11_LAMBDAS +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) +# undef BOOST_NO_CXX11_LAMBDAS +#endif + +// BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) +# undef BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#endif + +// BOOST_NO_CXX11_RANGE_BASED_FOR +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700)) +# undef BOOST_NO_CXX11_RANGE_BASED_FOR +#endif + +// BOOST_NO_CXX11_RAW_LITERALS +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) +# undef BOOST_NO_CXX11_RAW_LITERALS +#endif + +// BOOST_NO_CXX11_UNICODE_LITERALS +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) +# undef BOOST_NO_CXX11_UNICODE_LITERALS +#endif + +// BOOST_NO_CXX11_NOEXCEPT +#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) +// Available in earlier Intel release, but generates errors when used with +// conditional exception specifications, for example in multiprecision: +# undef BOOST_NO_CXX11_NOEXCEPT +#endif + +// BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) +# undef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#endif + +// BOOST_NO_CXX11_USER_DEFINED_LITERALS +#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40700)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730)) +# undef BOOST_NO_CXX11_USER_DEFINED_LITERALS +#endif + +// BOOST_NO_CXX11_ALIGNAS +#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730)) +# undef BOOST_NO_CXX11_ALIGNAS +#endif + +// BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) +# undef BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#endif + +// BOOST_NO_CXX11_INLINE_NAMESPACES +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730)) +# undef BOOST_NO_CXX11_INLINE_NAMESPACES +#endif + +// BOOST_NO_CXX11_REF_QUALIFIERS +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730)) +# undef BOOST_NO_CXX11_REF_QUALIFIERS +#endif + +// BOOST_NO_CXX11_FINAL +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40700)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700)) +# undef BOOST_NO_CXX11_FINAL +#endif + +#endif + +// +// Broken in all versions up to 15: +#define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS + +#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION <= 1310) +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#endif + +#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION == 1400) +// A regression in Intel's compiler means that seems to be broken in this release as well as : +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_TUPLE +#endif + +#if (BOOST_INTEL_CXX_VERSION < 1200) +// +// fenv.h appears not to work with Intel prior to 12.0: +// +# define BOOST_NO_FENV_H +#endif + +// Intel 13.10 fails to access defaulted functions of a base class declared in private or protected sections, +// producing the following errors: +// error #453: protected function "..." (declared at ...") is not accessible through a "..." pointer or object +#if (BOOST_INTEL_CXX_VERSION <= 1310) +# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS +#endif + +#if defined(_MSC_VER) && (_MSC_VER >= 1600) +# define BOOST_HAS_STDINT_H +#endif + +#if defined(__LP64__) && defined(__GNUC__) && (BOOST_INTEL_CXX_VERSION >= 1310) && !defined(__CUDACC__) +# define BOOST_HAS_INT128 +#endif + +#endif +// +// last known and checked version: +#if (BOOST_INTEL_CXX_VERSION > 1500) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# elif defined(_MSC_VER) +// +// We don't emit this warning any more, since we have so few +// defect macros set anyway (just the one). +// +//# pragma message("Unknown compiler version - please run the configure tests and report the results") +# endif +#endif + diff --git a/ThirdParty/boost-Subset/boost/config/compiler/kai.hpp b/ThirdParty/boost-Subset/boost/config/compiler/kai.hpp new file mode 100644 index 0000000000..2337e6a8dd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/compiler/kai.hpp @@ -0,0 +1,33 @@ +// (C) Copyright John Maddock 2001. +// (C) Copyright David Abrahams 2002. +// (C) Copyright Aleksey Gurtovoy 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Kai C++ compiler setup: + +#include "boost/config/compiler/common_edg.hpp" + +# if (__KCC_VERSION <= 4001) || !defined(BOOST_STRICT_CONFIG) + // at least on Sun, the contents of is not in namespace std +# define BOOST_NO_STDC_NAMESPACE +# endif + +// see also common_edg.hpp which needs a special check for __KCC +# if !defined(_EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +# endif + +// +// last known and checked version is 4001: +#if (__KCC_VERSION > 4001) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + + + diff --git a/ThirdParty/boost-Subset/boost/config/compiler/metrowerks.hpp b/ThirdParty/boost-Subset/boost/config/compiler/metrowerks.hpp new file mode 100644 index 0000000000..c930143450 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/compiler/metrowerks.hpp @@ -0,0 +1,179 @@ +// (C) Copyright John Maddock 2001. +// (C) Copyright Darin Adler 2001. +// (C) Copyright Peter Dimov 2001. +// (C) Copyright David Abrahams 2001 - 2002. +// (C) Copyright Beman Dawes 2001 - 2003. +// (C) Copyright Stefan Slapeta 2004. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Metrowerks C++ compiler setup: + +// locale support is disabled when linking with the dynamic runtime +# ifdef _MSL_NO_LOCALE +# define BOOST_NO_STD_LOCALE +# endif + +# if __MWERKS__ <= 0x2301 // 5.3 +# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING +# define BOOST_NO_POINTER_TO_MEMBER_CONST +# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS +# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD +# endif + +# if __MWERKS__ <= 0x2401 // 6.2 +//# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING +# endif + +# if(__MWERKS__ <= 0x2407) // 7.x +# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS +# define BOOST_NO_UNREACHABLE_RETURN_DETECTION +# endif + +# if(__MWERKS__ <= 0x3003) // 8.x +# define BOOST_NO_SFINAE +# endif + +// the "|| !defined(BOOST_STRICT_CONFIG)" part should apply to the last +// tested version *only*: +# if(__MWERKS__ <= 0x3207) || !defined(BOOST_STRICT_CONFIG) // 9.6 +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +# define BOOST_NO_IS_ABSTRACT +# endif + +#if !__option(wchar_type) +# define BOOST_NO_INTRINSIC_WCHAR_T +#endif + +#if !__option(exceptions) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +#endif + +#if (__INTEL__ && _WIN32) || (__POWERPC__ && macintosh) +# if __MWERKS__ == 0x3000 +# define BOOST_COMPILER_VERSION 8.0 +# elif __MWERKS__ == 0x3001 +# define BOOST_COMPILER_VERSION 8.1 +# elif __MWERKS__ == 0x3002 +# define BOOST_COMPILER_VERSION 8.2 +# elif __MWERKS__ == 0x3003 +# define BOOST_COMPILER_VERSION 8.3 +# elif __MWERKS__ == 0x3200 +# define BOOST_COMPILER_VERSION 9.0 +# elif __MWERKS__ == 0x3201 +# define BOOST_COMPILER_VERSION 9.1 +# elif __MWERKS__ == 0x3202 +# define BOOST_COMPILER_VERSION 9.2 +# elif __MWERKS__ == 0x3204 +# define BOOST_COMPILER_VERSION 9.3 +# elif __MWERKS__ == 0x3205 +# define BOOST_COMPILER_VERSION 9.4 +# elif __MWERKS__ == 0x3206 +# define BOOST_COMPILER_VERSION 9.5 +# elif __MWERKS__ == 0x3207 +# define BOOST_COMPILER_VERSION 9.6 +# else +# define BOOST_COMPILER_VERSION __MWERKS__ +# endif +#else +# define BOOST_COMPILER_VERSION __MWERKS__ +#endif + +// +// C++0x features +// +// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG +// +#if __MWERKS__ > 0x3206 && __option(rvalue_refs) +# define BOOST_HAS_RVALUE_REFS +#else +# define BOOST_NO_CXX11_RVALUE_REFERENCES +#endif +#define BOOST_NO_CXX11_AUTO_DECLARATIONS +#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CXX11_CHAR16_T +#define BOOST_NO_CXX11_CHAR32_T +#define BOOST_NO_CXX11_CONSTEXPR +#define BOOST_NO_CXX11_DECLTYPE +#define BOOST_NO_CXX11_DECLTYPE_N3276 +#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#define BOOST_NO_CXX11_DELETED_FUNCTIONS +#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_CXX11_EXTERN_TEMPLATE +#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#define BOOST_NO_CXX11_LAMBDAS +#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#define BOOST_NO_CXX11_NOEXCEPT +#define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR +#define BOOST_NO_CXX11_RAW_LITERALS +#define BOOST_NO_CXX11_SCOPED_ENUMS +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_NO_CXX11_TEMPLATE_ALIASES +#define BOOST_NO_CXX11_UNICODE_LITERALS +#define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#define BOOST_NO_CXX11_VARIADIC_MACROS +#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#define BOOST_NO_CXX11_ALIGNAS +#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif + +#define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) + +// +// versions check: +// we don't support Metrowerks prior to version 5.3: +#if __MWERKS__ < 0x2301 +# error "Compiler not supported or configured - please reconfigure" +#endif +// +// last known and checked version: +#if (__MWERKS__ > 0x3205) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + + + + + + + diff --git a/ThirdParty/boost-Subset/boost/config/compiler/mpw.hpp b/ThirdParty/boost-Subset/boost/config/compiler/mpw.hpp new file mode 100644 index 0000000000..76045bcd3f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/compiler/mpw.hpp @@ -0,0 +1,121 @@ +// (C) Copyright John Maddock 2001 - 2002. +// (C) Copyright Aleksey Gurtovoy 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// MPW C++ compilers setup: + +# if defined(__SC__) +# define BOOST_COMPILER "MPW SCpp version " BOOST_STRINGIZE(__SC__) +# elif defined(__MRC__) +# define BOOST_COMPILER "MPW MrCpp version " BOOST_STRINGIZE(__MRC__) +# else +# error "Using MPW compiler configuration by mistake. Please update." +# endif + +// +// MPW 8.90: +// +#if (MPW_CPLUS <= 0x890) || !defined(BOOST_STRICT_CONFIG) +# define BOOST_NO_CV_SPECIALIZATIONS +# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS +# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS +# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION +# define BOOST_NO_INTRINSIC_WCHAR_T +# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +# define BOOST_NO_USING_TEMPLATE + +# define BOOST_NO_CWCHAR +# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + +# define BOOST_NO_STD_ALLOCATOR /* actually a bug with const reference overloading */ + +#endif + +// +// C++0x features +// +// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG +// +#define BOOST_NO_CXX11_AUTO_DECLARATIONS +#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CXX11_CHAR16_T +#define BOOST_NO_CXX11_CHAR32_T +#define BOOST_NO_CXX11_CONSTEXPR +#define BOOST_NO_CXX11_DECLTYPE +#define BOOST_NO_CXX11_DECLTYPE_N3276 +#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#define BOOST_NO_CXX11_DELETED_FUNCTIONS +#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_CXX11_EXTERN_TEMPLATE +#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#define BOOST_NO_CXX11_LAMBDAS +#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#define BOOST_NO_CXX11_NOEXCEPT +#define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR +#define BOOST_NO_CXX11_RAW_LITERALS +#define BOOST_NO_CXX11_RVALUE_REFERENCES +#define BOOST_NO_CXX11_SCOPED_ENUMS +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_NO_CXX11_TEMPLATE_ALIASES +#define BOOST_NO_CXX11_UNICODE_LITERALS +#define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#define BOOST_NO_CXX11_VARIADIC_MACROS +#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#define BOOST_NO_CXX11_ALIGNAS +#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif + +// +// versions check: +// we don't support MPW prior to version 8.9: +#if MPW_CPLUS < 0x890 +# error "Compiler not supported or configured - please reconfigure" +#endif +// +// last known and checked version is 0x890: +#if (MPW_CPLUS > 0x890) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + + diff --git a/ThirdParty/boost-Subset/boost/config/compiler/nvcc.hpp b/ThirdParty/boost-Subset/boost/config/compiler/nvcc.hpp new file mode 100644 index 0000000000..bbe81f6ee5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/compiler/nvcc.hpp @@ -0,0 +1,16 @@ +// (C) Copyright Eric Jourdanneau, Joel Falcou 2010 +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// NVIDIA CUDA C++ compiler setup + +#ifndef BOOST_COMPILER +# define BOOST_COMPILER "NVIDIA CUDA C++ Compiler" +#endif + +// NVIDIA Specific support +// BOOST_GPU_ENABLED : Flag a function or a method as being enabled on the host and device +#define BOOST_GPU_ENABLED __host__ __device__ diff --git a/ThirdParty/boost-Subset/boost/config/compiler/pathscale.hpp b/ThirdParty/boost-Subset/boost/config/compiler/pathscale.hpp new file mode 100644 index 0000000000..7c211c4517 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/compiler/pathscale.hpp @@ -0,0 +1,114 @@ +// (C) Copyright Bryce Lelbach 2011 + +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// PathScale EKOPath C++ Compiler + +#ifndef BOOST_COMPILER +# define BOOST_COMPILER "PathScale EKOPath C++ Compiler version " __PATHSCALE__ +#endif + +#if __PATHCC__ >= 4 +# define BOOST_MSVC6_MEMBER_TEMPLATES +# define BOOST_HAS_UNISTD_H +# define BOOST_HAS_STDINT_H +# define BOOST_HAS_SIGACTION +# define BOOST_HAS_SCHED_YIELD +# define BOOST_HAS_THREADS +# define BOOST_HAS_PTHREADS +# define BOOST_HAS_PTHREAD_YIELD +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# define BOOST_HAS_PARTIAL_STD_ALLOCATOR +# define BOOST_HAS_NRVO +# define BOOST_HAS_NL_TYPES_H +# define BOOST_HAS_NANOSLEEP +# define BOOST_HAS_LONG_LONG +# define BOOST_HAS_LOG1P +# define BOOST_HAS_GETTIMEOFDAY +# define BOOST_HAS_EXPM1 +# define BOOST_HAS_DIRENT_H +# define BOOST_HAS_CLOCK_GETTIME +# define BOOST_NO_CXX11_VARIADIC_TEMPLATES +# define BOOST_NO_CXX11_UNICODE_LITERALS +# define BOOST_NO_CXX11_TEMPLATE_ALIASES +# define BOOST_NO_CXX11_STATIC_ASSERT +# define BOOST_NO_SFINAE_EXPR +# define BOOST_NO_CXX11_SCOPED_ENUMS +# define BOOST_NO_CXX11_RVALUE_REFERENCES +# define BOOST_NO_CXX11_RANGE_BASED_FOR +# define BOOST_NO_CXX11_RAW_LITERALS +# define BOOST_NO_CXX11_NULLPTR +# define BOOST_NO_CXX11_NUMERIC_LIMITS +# define BOOST_NO_CXX11_NOEXCEPT +# define BOOST_NO_CXX11_LAMBDAS +# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +# define BOOST_NO_MS_INT64_NUMERIC_LIMITS +# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +# define BOOST_NO_CXX11_DELETED_FUNCTIONS +# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +# define BOOST_NO_CXX11_DECLTYPE +# define BOOST_NO_CXX11_DECLTYPE_N3276 +# define BOOST_NO_CXX11_CONSTEXPR +# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION +# define BOOST_NO_CXX11_CHAR32_T +# define BOOST_NO_CXX11_CHAR16_T +# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +# define BOOST_NO_CXX11_AUTO_DECLARATIONS +# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +# define BOOST_NO_CXX11_HDR_UNORDERED_SET +# define BOOST_NO_CXX11_HDR_UNORDERED_MAP +# define BOOST_NO_CXX11_HDR_TYPEINDEX +# define BOOST_NO_CXX11_HDR_TUPLE +# define BOOST_NO_CXX11_HDR_THREAD +# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR +# define BOOST_NO_CXX11_HDR_REGEX +# define BOOST_NO_CXX11_HDR_RATIO +# define BOOST_NO_CXX11_HDR_RANDOM +# define BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_FORWARD_LIST +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_CODECVT +# define BOOST_NO_CXX11_HDR_CHRONO +# define BOOST_NO_CXX11_USER_DEFINED_LITERALS +# define BOOST_NO_CXX11_ALIGNAS +# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +# define BOOST_NO_CXX11_INLINE_NAMESPACES +# define BOOST_NO_CXX11_REF_QUALIFIERS +# define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif +#endif diff --git a/ThirdParty/boost-Subset/boost/config/compiler/pgi.hpp b/ThirdParty/boost-Subset/boost/config/compiler/pgi.hpp new file mode 100644 index 0000000000..e5605c9ec2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/compiler/pgi.hpp @@ -0,0 +1,155 @@ +// (C) Copyright Noel Belcourt 2007. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// PGI C++ compiler setup: + +#define BOOST_COMPILER_VERSION __PGIC__##__PGIC_MINOR__ +#define BOOST_COMPILER "PGI compiler version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) + +// +// Threading support: +// Turn this on unconditionally here, it will get turned off again later +// if no threading API is detected. +// + +#if __PGIC__ >= 11 + +// options requested by configure --enable-test +#define BOOST_HAS_PTHREADS +#define BOOST_HAS_THREADS +#define BOOST_HAS_PTHREAD_YIELD +#define BOOST_HAS_NRVO +#define BOOST_HAS_LONG_LONG + +// options --enable-test wants undefined +#undef BOOST_NO_STDC_NAMESPACE +#undef BOOST_NO_EXCEPTION_STD_NAMESPACE +#undef BOOST_DEDUCED_TYPENAME + +#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +#define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CXX11_AUTO_DECLARATIONS + +#elif __PGIC__ >= 10 + +// options requested by configure --enable-test +#define BOOST_HAS_THREADS +#define BOOST_HAS_NRVO +#define BOOST_HAS_LONG_LONG +#if defined(linux) || defined(__linux) || defined(__linux__) +# define BOOST_HAS_STDINT_H +#endif + +// options --enable-test wants undefined +#undef BOOST_NO_STDC_NAMESPACE +#undef BOOST_NO_EXCEPTION_STD_NAMESPACE +#undef BOOST_DEDUCED_TYPENAME + +#elif __PGIC__ >= 7 + +#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +#define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#define BOOST_NO_SWPRINTF +#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CXX11_AUTO_DECLARATIONS + +#else + +# error "Pgi compiler not configured - please reconfigure" + +#endif +// +// C++0x features +// +// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG +// +#define BOOST_NO_CXX11_CHAR16_T +#define BOOST_NO_CXX11_CHAR32_T +#define BOOST_NO_CXX11_CONSTEXPR +#define BOOST_NO_CXX11_DECLTYPE +#define BOOST_NO_CXX11_DECLTYPE_N3276 +#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#define BOOST_NO_CXX11_DELETED_FUNCTIONS +#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_CXX11_EXTERN_TEMPLATE +#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_CXX11_LAMBDAS +#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#define BOOST_NO_CXX11_NOEXCEPT +#define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_NUMERIC_LIMITS +#define BOOST_NO_CXX11_RANGE_BASED_FOR +#define BOOST_NO_CXX11_RAW_LITERALS +#define BOOST_NO_CXX11_RVALUE_REFERENCES +#define BOOST_NO_CXX11_SCOPED_ENUMS +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_NO_SWPRINTF +#define BOOST_NO_CXX11_TEMPLATE_ALIASES +#define BOOST_NO_CXX11_UNICODE_LITERALS +#define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#define BOOST_NO_CXX11_VARIADIC_MACROS +#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX + +#define BOOST_NO_CXX11_HDR_UNORDERED_SET +#define BOOST_NO_CXX11_HDR_UNORDERED_MAP +#define BOOST_NO_CXX11_HDR_TYPEINDEX +#define BOOST_NO_CXX11_HDR_TYPE_TRAITS +#define BOOST_NO_CXX11_HDR_TUPLE +#define BOOST_NO_CXX11_HDR_THREAD +#define BOOST_NO_CXX11_HDR_SYSTEM_ERROR +#define BOOST_NO_CXX11_HDR_REGEX +#define BOOST_NO_CXX11_HDR_RATIO +#define BOOST_NO_CXX11_HDR_RANDOM +#define BOOST_NO_CXX11_HDR_MUTEX +#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#define BOOST_NO_CXX11_HDR_FUTURE +#define BOOST_NO_CXX11_HDR_FORWARD_LIST +#define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +#define BOOST_NO_CXX11_HDR_CODECVT +#define BOOST_NO_CXX11_HDR_CHRONO +#define BOOST_NO_CXX11_HDR_ARRAY +#define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#define BOOST_NO_CXX11_ALIGNAS +#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif +// +// version check: +// probably nothing to do here? + diff --git a/ThirdParty/boost-Subset/boost/config/compiler/sgi_mipspro.hpp b/ThirdParty/boost-Subset/boost/config/compiler/sgi_mipspro.hpp new file mode 100644 index 0000000000..90688314ad --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/compiler/sgi_mipspro.hpp @@ -0,0 +1,29 @@ +// (C) Copyright John Maddock 2001 - 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// SGI C++ compiler setup: + +#define BOOST_COMPILER "SGI Irix compiler version " BOOST_STRINGIZE(_COMPILER_VERSION) + +#include "boost/config/compiler/common_edg.hpp" + +// +// Threading support: +// Turn this on unconditionally here, it will get turned off again later +// if no threading API is detected. +// +#define BOOST_HAS_THREADS +#define BOOST_NO_TWO_PHASE_NAME_LOOKUP + +#undef BOOST_NO_SWPRINTF +#undef BOOST_DEDUCED_TYPENAME + +// +// version check: +// probably nothing to do here? + + diff --git a/ThirdParty/boost-Subset/boost/config/compiler/sunpro_cc.hpp b/ThirdParty/boost-Subset/boost/config/compiler/sunpro_cc.hpp new file mode 100644 index 0000000000..2fd6d3ece0 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/compiler/sunpro_cc.hpp @@ -0,0 +1,194 @@ +// (C) Copyright John Maddock 2001. +// (C) Copyright Jens Maurer 2001 - 2003. +// (C) Copyright Peter Dimov 2002. +// (C) Copyright Aleksey Gurtovoy 2002 - 2003. +// (C) Copyright David Abrahams 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Sun C++ compiler setup: + +# if __SUNPRO_CC <= 0x500 +# define BOOST_NO_MEMBER_TEMPLATES +# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING +# endif + +# if (__SUNPRO_CC <= 0x520) + // + // Sunpro 5.2 and earler: + // + // although sunpro 5.2 supports the syntax for + // inline initialization it often gets the value + // wrong, especially where the value is computed + // from other constants (J Maddock 6th May 2001) +# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION + + // Although sunpro 5.2 supports the syntax for + // partial specialization, it often seems to + // bind to the wrong specialization. Better + // to disable it until suppport becomes more stable + // (J Maddock 6th May 2001). +# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +# endif + +# if (__SUNPRO_CC <= 0x530) + // Requesting debug info (-g) with Boost.Python results + // in an internal compiler error for "static const" + // initialized in-class. + // >> Assertion: (../links/dbg_cstabs.cc, line 611) + // while processing ../test.cpp at line 0. + // (Jens Maurer according to Gottfried Ganssauge 04 Mar 2002) +# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION + + // SunPro 5.3 has better support for partial specialization, + // but breaks when compiling std::less > + // (Jens Maurer 4 Nov 2001). + + // std::less specialization fixed as reported by George + // Heintzelman; partial specialization re-enabled + // (Peter Dimov 17 Jan 2002) + +//# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + // integral constant expressions with 64 bit numbers fail +# define BOOST_NO_INTEGRAL_INT64_T +# endif + +# if (__SUNPRO_CC < 0x570) +# define BOOST_NO_TEMPLATE_TEMPLATES + // see http://lists.boost.org/MailArchives/boost/msg47184.php + // and http://lists.boost.org/MailArchives/boost/msg47220.php +# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION +# define BOOST_NO_SFINAE +# define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS +# endif +# if (__SUNPRO_CC <= 0x580) +# define BOOST_NO_IS_ABSTRACT +# endif + +# if (__SUNPRO_CC <= 0x5100) + // Sun 5.10 may not correctly value-initialize objects of + // some user defined types, as was reported in April 2010 + // (CR 6947016), and confirmed by Steve Clamage. + // (Niels Dekker, LKEB, May 2010). +# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION +# endif + +// +// Dynamic shared object (DSO) and dynamic-link library (DLL) support +// +#if __SUNPRO_CC > 0x500 +# define BOOST_SYMBOL_EXPORT __global +# define BOOST_SYMBOL_IMPORT __global +# define BOOST_SYMBOL_VISIBLE __global +#endif + +#if (__SUNPRO_CC < 0x5130) +// C++03 features in 12.4: +#define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_ADL_BARRIER +#define BOOST_NO_CXX11_VARIADIC_MACROS +#endif + +#if (__SUNPRO_CC < 0x5130) || (__cplusplus < 201100) +// C++11 only featuires in 12.4: +#define BOOST_NO_CXX11_AUTO_DECLARATIONS +#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CXX11_CHAR16_T +#define BOOST_NO_CXX11_CHAR32_T +#define BOOST_NO_CXX11_CONSTEXPR +#define BOOST_NO_CXX11_DECLTYPE +#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#define BOOST_NO_CXX11_DELETED_FUNCTIONS +#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_CXX11_EXTERN_TEMPLATE +#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#define BOOST_NO_CXX11_LAMBDAS +#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#define BOOST_NO_CXX11_NOEXCEPT +#define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR +#define BOOST_NO_CXX11_RAW_LITERALS +#define BOOST_NO_CXX11_RVALUE_REFERENCES +#define BOOST_NO_CXX11_SCOPED_ENUMS +#define BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_NO_CXX11_TEMPLATE_ALIASES +#define BOOST_NO_CXX11_UNICODE_LITERALS +#define BOOST_NO_CXX11_ALIGNAS +#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_FINAL +#endif + +// +// Issues that effect all known versions: +// +// Variadic templates pass our test case, but enabling this +// causes the compiler to issue a signal 11 and bail out +// in various libraries. The others fail our test cases. +// +#define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS +#define BOOST_NO_CXX11_DECLTYPE_N3276 +#define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION +// +// C++0x features +// +# define BOOST_HAS_LONG_LONG + + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif +// +// Version +// + +#define BOOST_COMPILER "Sun compiler version " BOOST_STRINGIZE(__SUNPRO_CC) + +// +// versions check: +// we don't support sunpro prior to version 4: +#if __SUNPRO_CC < 0x400 +#error "Compiler not supported or configured - please reconfigure" +#endif +// +// last known and checked version is 0x590: +#if (__SUNPRO_CC > 0x590) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif diff --git a/ThirdParty/boost-Subset/boost/config/compiler/vacpp.hpp b/ThirdParty/boost-Subset/boost/config/compiler/vacpp.hpp new file mode 100644 index 0000000000..6c228eab6e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/compiler/vacpp.hpp @@ -0,0 +1,162 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Toon Knapen 2001 - 2003. +// (C) Copyright Lie-Quan Lee 2001. +// (C) Copyright Markus Schoepflin 2002 - 2003. +// (C) Copyright Beman Dawes 2002 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Visual Age (IBM) C++ compiler setup: + +#if __IBMCPP__ <= 501 +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS +#endif + +#if (__IBMCPP__ <= 502) +// Actually the compiler supports inclass member initialization but it +// requires a definition for the class member and it doesn't recognize +// it as an integral constant expression when used as a template argument. +# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION +# define BOOST_NO_INTEGRAL_INT64_T +# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD +#endif + +#if (__IBMCPP__ <= 600) || !defined(BOOST_STRICT_CONFIG) +# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS +#endif + +#if (__IBMCPP__ <= 1110) +// XL C++ V11.1 and earlier versions may not always value-initialize +// a temporary object T(), when T is a non-POD aggregate class type. +// Michael Wong (IBM Canada Ltd) has confirmed this issue and gave it +// high priority. -- Niels Dekker (LKEB), May 2010. +# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION +#endif + +// +// On AIX thread support seems to be indicated by _THREAD_SAFE: +// +#ifdef _THREAD_SAFE +# define BOOST_HAS_THREADS +#endif + +#define BOOST_COMPILER "IBM Visual Age version " BOOST_STRINGIZE(__IBMCPP__) + +// +// versions check: +// we don't support Visual age prior to version 5: +#if __IBMCPP__ < 500 +#error "Compiler not supported or configured - please reconfigure" +#endif +// +// last known and checked version is 1210: +#if (__IBMCPP__ > 1210) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + +// Some versions of the compiler have issues with default arguments on partial specializations +#if __IBMCPP__ <= 1010 +#define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS +#endif + +// +// C++0x features +// +// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG +// +#if ! __IBMCPP_AUTO_TYPEDEDUCTION +# define BOOST_NO_CXX11_AUTO_DECLARATIONS +# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#endif +#if ! __IBMCPP_UTF_LITERAL__ +# define BOOST_NO_CXX11_CHAR16_T +# define BOOST_NO_CXX11_CHAR32_T +#endif +#if ! __IBMCPP_CONSTEXPR +# define BOOST_NO_CXX11_CONSTEXPR +#endif +#if ! __IBMCPP_DECLTYPE +# define BOOST_NO_CXX11_DECLTYPE +#else +# define BOOST_HAS_DECLTYPE +#endif +#define BOOST_NO_CXX11_DECLTYPE_N3276 +#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#define BOOST_NO_CXX11_DELETED_FUNCTIONS +#if ! __IBMCPP_EXPLICIT_CONVERSION_OPERATORS +# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#endif +#if ! __IBMCPP_EXTERN_TEMPLATE +# define BOOST_NO_CXX11_EXTERN_TEMPLATE +#endif +#if ! __IBMCPP_VARIADIC_TEMPLATES +// not enabled separately at this time +# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#endif +#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#define BOOST_NO_CXX11_LAMBDAS +#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#define BOOST_NO_CXX11_NOEXCEPT +#define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_RANGE_BASED_FOR +#define BOOST_NO_CXX11_RAW_LITERALS +#define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#if ! __IBMCPP_RVALUE_REFERENCES +# define BOOST_NO_CXX11_RVALUE_REFERENCES +#endif +#if ! __IBMCPP_SCOPED_ENUM +# define BOOST_NO_CXX11_SCOPED_ENUMS +#endif +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#if ! __IBMCPP_STATIC_ASSERT +# define BOOST_NO_CXX11_STATIC_ASSERT +#endif +#define BOOST_NO_CXX11_TEMPLATE_ALIASES +#define BOOST_NO_CXX11_UNICODE_LITERALS +#if ! __IBMCPP_VARIADIC_TEMPLATES +# define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#endif +#if ! __C99_MACRO_WITH_VA_ARGS +# define BOOST_NO_CXX11_VARIADIC_MACROS +#endif +#define BOOST_NO_CXX11_ALIGNAS +#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif diff --git a/ThirdParty/boost-Subset/boost/config/compiler/visualc.hpp b/ThirdParty/boost-Subset/boost/config/compiler/visualc.hpp new file mode 100644 index 0000000000..93908cea50 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/compiler/visualc.hpp @@ -0,0 +1,297 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Darin Adler 2001 - 2002. +// (C) Copyright Peter Dimov 2001. +// (C) Copyright Aleksey Gurtovoy 2002. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Beman Dawes 2002 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. +// +// Microsoft Visual C++ compiler setup: +// +// We need to be careful with the checks in this file, as contrary +// to popular belief there are versions with _MSC_VER with the final +// digit non-zero (mainly the MIPS cross compiler). +// +// So we either test _MSC_VER >= XXXX or else _MSC_VER < XXXX. +// No other comparisons (==, >, or <=) are safe. +// + +#define BOOST_MSVC _MSC_VER + +// +// Helper macro BOOST_MSVC_FULL_VER for use in Boost code: +// +#if _MSC_FULL_VER > 100000000 +# define BOOST_MSVC_FULL_VER _MSC_FULL_VER +#else +# define BOOST_MSVC_FULL_VER (_MSC_FULL_VER * 10) +#endif + +// Attempt to suppress VC6 warnings about the length of decorated names (obsolete): +#pragma warning( disable : 4503 ) // warning: decorated name length exceeded + +#define BOOST_HAS_PRAGMA_ONCE + +// +// versions check: +// we don't support Visual C++ prior to version 7.1: +#if _MSC_VER < 1310 +# error "Compiler not supported or configured - please reconfigure" +#endif + +#if _MSC_FULL_VER < 180020827 +# define BOOST_NO_FENV_H +#endif + +#if _MSC_VER < 1400 +// although a conforming signature for swprint exists in VC7.1 +// it appears not to actually work: +# define BOOST_NO_SWPRINTF +// Our extern template tests also fail for this compiler: +# define BOOST_NO_CXX11_EXTERN_TEMPLATE +// Variadic macros do not exist for VC7.1 and lower +# define BOOST_NO_CXX11_VARIADIC_MACROS +#endif + +#if _MSC_VER < 1500 // 140X == VC++ 8.0 +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +#endif + +#if _MSC_VER < 1600 // 150X == VC++ 9.0 + // A bug in VC9: +# define BOOST_NO_ADL_BARRIER +#endif + + +#ifndef _NATIVE_WCHAR_T_DEFINED +# define BOOST_NO_INTRINSIC_WCHAR_T +#endif + +// +// check for exception handling support: +#if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +#endif + +// +// __int64 support: +// +#define BOOST_HAS_MS_INT64 +#if defined(_MSC_EXTENSIONS) || (_MSC_VER >= 1400) +# define BOOST_HAS_LONG_LONG +#else +# define BOOST_NO_LONG_LONG +#endif +#if (_MSC_VER >= 1400) && !defined(_DEBUG) +# define BOOST_HAS_NRVO +#endif +#if _MSC_VER >= 1600 // 160X == VC++ 10.0 +# define BOOST_HAS_PRAGMA_DETECT_MISMATCH +#endif +// +// disable Win32 API's if compiler extensions are +// turned off: +// +#if !defined(_MSC_EXTENSIONS) && !defined(BOOST_DISABLE_WIN32) +# define BOOST_DISABLE_WIN32 +#endif +#if !defined(_CPPRTTI) && !defined(BOOST_NO_RTTI) +# define BOOST_NO_RTTI +#endif + +// +// TR1 features: +// +#if _MSC_VER >= 1700 +// # define BOOST_HAS_TR1_HASH // don't know if this is true yet. +// # define BOOST_HAS_TR1_TYPE_TRAITS // don't know if this is true yet. +# define BOOST_HAS_TR1_UNORDERED_MAP +# define BOOST_HAS_TR1_UNORDERED_SET +#endif + +// +// C++0x features +// +// See above for BOOST_NO_LONG_LONG + +// C++ features supported by VC++ 10 (aka 2010) +// +#if _MSC_VER < 1600 +# define BOOST_NO_CXX11_AUTO_DECLARATIONS +# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +# define BOOST_NO_CXX11_LAMBDAS +# define BOOST_NO_CXX11_RVALUE_REFERENCES +# define BOOST_NO_CXX11_STATIC_ASSERT +# define BOOST_NO_CXX11_NULLPTR +# define BOOST_NO_CXX11_DECLTYPE +#endif // _MSC_VER < 1600 + +#if _MSC_VER >= 1600 +# define BOOST_HAS_STDINT_H +#endif + +// C++11 features supported by VC++ 11 (aka 2012) +// +#if _MSC_VER < 1700 +# define BOOST_NO_CXX11_FINAL +# define BOOST_NO_CXX11_RANGE_BASED_FOR +# define BOOST_NO_CXX11_SCOPED_ENUMS +#endif // _MSC_VER < 1700 + +// C++11 features supported by VC++ 12 (aka 2013). +// +#if _MSC_FULL_VER < 180020827 +# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +# define BOOST_NO_CXX11_DELETED_FUNCTIONS +# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +# define BOOST_NO_CXX11_RAW_LITERALS +# define BOOST_NO_CXX11_TEMPLATE_ALIASES +# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +# define BOOST_NO_CXX11_VARIADIC_TEMPLATES +# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +# define BOOST_NO_CXX11_DECLTYPE_N3276 +#endif + +// C++11 features supported by VC++ 14 (aka 2015) +// +#if (_MSC_FULL_VER < 190023026) +# define BOOST_NO_CXX11_NOEXCEPT +# define BOOST_NO_CXX11_REF_QUALIFIERS +# define BOOST_NO_CXX11_USER_DEFINED_LITERALS +# define BOOST_NO_CXX11_ALIGNAS +# define BOOST_NO_CXX11_INLINE_NAMESPACES +# define BOOST_NO_CXX11_CHAR16_T +# define BOOST_NO_CXX11_CHAR32_T +# define BOOST_NO_CXX11_UNICODE_LITERALS +# define BOOST_NO_CXX14_DECLTYPE_AUTO +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +# define BOOST_NO_CXX14_BINARY_LITERALS +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif + +// MSVC including version 14 has not yet completely +// implemented value-initialization, as is reported: +// "VC++ does not value-initialize members of derived classes without +// user-declared constructor", reported in 2009 by Sylvester Hesp: +// https://connect.microsoft.com/VisualStudio/feedback/details/484295 +// "Presence of copy constructor breaks member class initialization", +// reported in 2009 by Alex Vakulenko: +// https://connect.microsoft.com/VisualStudio/feedback/details/499606 +// "Value-initialization in new-expression", reported in 2005 by +// Pavel Kuznetsov (MetaCommunications Engineering): +// https://connect.microsoft.com/VisualStudio/feedback/details/100744 +// Reported again by John Maddock in 2015 for VC14: +// https://connect.microsoft.com/VisualStudio/feedback/details/1582233/c-subobjects-still-not-value-initialized-correctly +// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues +// (Niels Dekker, LKEB, May 2010) +#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION +// C++11 features not supported by any versions +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_TWO_PHASE_NAME_LOOKUP +// +// This is somewhat supported in VC14, but we may need to wait for +// a service release before enabling: +// +#define BOOST_NO_CXX11_CONSTEXPR + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif + +// +// prefix and suffix headers: +// +#ifndef BOOST_ABI_PREFIX +# define BOOST_ABI_PREFIX "boost/config/abi/msvc_prefix.hpp" +#endif +#ifndef BOOST_ABI_SUFFIX +# define BOOST_ABI_SUFFIX "boost/config/abi/msvc_suffix.hpp" +#endif + +#ifndef BOOST_COMPILER +// TODO: +// these things are mostly bogus. 1200 means version 12.0 of the compiler. The +// artificial versions assigned to them only refer to the versions of some IDE +// these compilers have been shipped with, and even that is not all of it. Some +// were shipped with freely downloadable SDKs, others as crosscompilers in eVC. +// IOW, you can't use these 'versions' in any sensible way. Sorry. +# if defined(UNDER_CE) +# if _MSC_VER < 1400 + // Note: I'm not aware of any CE compiler with version 13xx +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown EVC++ compiler version - please run the configure tests and report the results" +# else +# pragma message("Unknown EVC++ compiler version - please run the configure tests and report the results") +# endif +# elif _MSC_VER < 1500 +# define BOOST_COMPILER_VERSION evc8 +# elif _MSC_VER < 1600 +# define BOOST_COMPILER_VERSION evc9 +# elif _MSC_VER < 1700 +# define BOOST_COMPILER_VERSION evc10 +# elif _MSC_VER < 1800 +# define BOOST_COMPILER_VERSION evc11 +# elif _MSC_VER < 1900 +# define BOOST_COMPILER_VERSION evc12 +# elif _MSC_VER < 2000 +# define BOOST_COMPILER_VERSION evc14 +# else +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown EVC++ compiler version - please run the configure tests and report the results" +# else +# pragma message("Unknown EVC++ compiler version - please run the configure tests and report the results") +# endif +# endif +# else +# if _MSC_VER < 1310 + // Note: Versions up to 7.0 aren't supported. +# define BOOST_COMPILER_VERSION 5.0 +# elif _MSC_VER < 1300 +# define BOOST_COMPILER_VERSION 6.0 +# elif _MSC_VER < 1310 +# define BOOST_COMPILER_VERSION 7.0 +# elif _MSC_VER < 1400 +# define BOOST_COMPILER_VERSION 7.1 +# elif _MSC_VER < 1500 +# define BOOST_COMPILER_VERSION 8.0 +# elif _MSC_VER < 1600 +# define BOOST_COMPILER_VERSION 9.0 +# elif _MSC_VER < 1700 +# define BOOST_COMPILER_VERSION 10.0 +# elif _MSC_VER < 1800 +# define BOOST_COMPILER_VERSION 11.0 +# elif _MSC_VER < 1900 +# define BOOST_COMPILER_VERSION 12.0 +# elif _MSC_VER < 2000 +# define BOOST_COMPILER_VERSION 14.0 +# else +# define BOOST_COMPILER_VERSION _MSC_VER +# endif +# endif + +# define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) +#endif + +// +// last known and checked version is 19.00.23026 (VC++ 2015 RTM): +#if (_MSC_VER > 1900) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# else +# pragma message("Unknown compiler version - please run the configure tests and report the results") +# endif +#endif diff --git a/ThirdParty/boost-Subset/boost/config/compiler/xlcpp.hpp b/ThirdParty/boost-Subset/boost/config/compiler/xlcpp.hpp new file mode 100644 index 0000000000..e369ecefd2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/compiler/xlcpp.hpp @@ -0,0 +1,258 @@ +// (C) Copyright Douglas Gregor 2010 +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// compiler setup for IBM XL C/C++ for Linux (Little Endian) based on clang. + +#define BOOST_HAS_PRAGMA_ONCE + +// Detecting `-fms-extension` compiler flag assuming that _MSC_VER defined when that flag is used. +#if defined (_MSC_VER) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 4)) +# define BOOST_HAS_PRAGMA_DETECT_MISMATCH +#endif + +// When compiling with clang before __has_extension was defined, +// even if one writes 'defined(__has_extension) && __has_extension(xxx)', +// clang reports a compiler error. So the only workaround found is: + +#ifndef __has_extension +#define __has_extension __has_feature +#endif + +#if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +#endif + +#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_RTTI) +# define BOOST_NO_RTTI +#endif + +#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_TYPEID) +# define BOOST_NO_TYPEID +#endif + +#if defined(__int64) && !defined(__GNUC__) +# define BOOST_HAS_MS_INT64 +#endif + +#define BOOST_HAS_NRVO + +// Branch prediction hints +#if defined(__has_builtin) +#if __has_builtin(__builtin_expect) +#define BOOST_LIKELY(x) __builtin_expect(x, 1) +#define BOOST_UNLIKELY(x) __builtin_expect(x, 0) +#endif +#endif + +// Clang supports "long long" in all compilation modes. +#define BOOST_HAS_LONG_LONG + +// +// Dynamic shared object (DSO) and dynamic-link library (DLL) support +// +#if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32) +# define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default"))) +# define BOOST_SYMBOL_IMPORT +# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default"))) +#endif + +// +// The BOOST_FALLTHROUGH macro can be used to annotate implicit fall-through +// between switch labels. +// +#if __cplusplus >= 201103L && defined(__has_warning) +# if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough") +# define BOOST_FALLTHROUGH [[clang::fallthrough]] +# endif +#endif + +#if !__has_feature(cxx_auto_type) +# define BOOST_NO_CXX11_AUTO_DECLARATIONS +# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#endif + +// +// Currently clang on Windows using VC++ RTL does not support C++11's char16_t or char32_t +// +#if defined(_MSC_VER) || !(defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L) +# define BOOST_NO_CXX11_CHAR16_T +# define BOOST_NO_CXX11_CHAR32_T +#endif + +#if !__has_feature(cxx_constexpr) +# define BOOST_NO_CXX11_CONSTEXPR +#endif + +#if !__has_feature(cxx_decltype) +# define BOOST_NO_CXX11_DECLTYPE +#endif + +#if !__has_feature(cxx_decltype_incomplete_return_types) +# define BOOST_NO_CXX11_DECLTYPE_N3276 +#endif + +#if !__has_feature(cxx_defaulted_functions) +# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#endif + +#if !__has_feature(cxx_deleted_functions) +# define BOOST_NO_CXX11_DELETED_FUNCTIONS +#endif + +#if !__has_feature(cxx_explicit_conversions) +# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#endif + +#if !__has_feature(cxx_default_function_template_args) +# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#endif + +#if !__has_feature(cxx_generalized_initializers) +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#endif + +#if !__has_feature(cxx_lambdas) +# define BOOST_NO_CXX11_LAMBDAS +#endif + +#if !__has_feature(cxx_local_type_template_args) +# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#endif + +#if !__has_feature(cxx_noexcept) +# define BOOST_NO_CXX11_NOEXCEPT +#endif + +#if !__has_feature(cxx_nullptr) +# define BOOST_NO_CXX11_NULLPTR +#endif + +#if !__has_feature(cxx_range_for) +# define BOOST_NO_CXX11_RANGE_BASED_FOR +#endif + +#if !__has_feature(cxx_raw_string_literals) +# define BOOST_NO_CXX11_RAW_LITERALS +#endif + +#if !__has_feature(cxx_reference_qualified_functions) +# define BOOST_NO_CXX11_REF_QUALIFIERS +#endif + +#if !__has_feature(cxx_generalized_initializers) +# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#endif + +#if !__has_feature(cxx_rvalue_references) +# define BOOST_NO_CXX11_RVALUE_REFERENCES +#endif + +#if !__has_feature(cxx_strong_enums) +# define BOOST_NO_CXX11_SCOPED_ENUMS +#endif + +#if !__has_feature(cxx_static_assert) +# define BOOST_NO_CXX11_STATIC_ASSERT +#endif + +#if !__has_feature(cxx_alias_templates) +# define BOOST_NO_CXX11_TEMPLATE_ALIASES +#endif + +#if !__has_feature(cxx_unicode_literals) +# define BOOST_NO_CXX11_UNICODE_LITERALS +#endif + +#if !__has_feature(cxx_variadic_templates) +# define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#endif + +#if !__has_feature(cxx_user_literals) +# define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#endif + +#if !__has_feature(cxx_alignas) +# define BOOST_NO_CXX11_ALIGNAS +#endif + +#if !__has_feature(cxx_trailing_return) +# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#endif + +#if !__has_feature(cxx_inline_namespaces) +# define BOOST_NO_CXX11_INLINE_NAMESPACES +#endif + +#if !__has_feature(cxx_override_control) +# define BOOST_NO_CXX11_FINAL +#endif + +#if !(__has_feature(__cxx_binary_literals__) || __has_extension(__cxx_binary_literals__)) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif + +#if !__has_feature(__cxx_decltype_auto__) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif + +#if !__has_feature(__cxx_aggregate_nsdmi__) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif + +#if !__has_feature(__cxx_init_captures__) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif + +#if !__has_feature(__cxx_generic_lambdas__) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif + +// clang < 3.5 has a defect with dependent type, like following. +// +// template +// constexpr typename enable_if >::type foo(T &) +// { } // error: no return statement in constexpr function +// +// This issue also affects C++11 mode, but C++11 constexpr requires return stmt. +// Therefore we don't care such case. +// +// Note that we can't check Clang version directly as the numbering system changes depending who's +// creating the Clang release (see https://github.com/boostorg/config/pull/39#issuecomment-59927873) +// so instead verify that we have a feature that was introduced at the same time as working C++14 +// constexpr (generic lambda's in this case): +// +#if !__has_feature(__cxx_generic_lambdas__) || !__has_feature(__cxx_relaxed_constexpr__) +# define BOOST_NO_CXX14_CONSTEXPR +#endif + +#if !__has_feature(__cxx_return_type_deduction__) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif + +#if !__has_feature(__cxx_variable_templates__) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif + +#if __cplusplus < 201400 +// All versions with __cplusplus above this value seem to support this: +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif + + +// Unused attribute: +#if defined(__GNUC__) && (__GNUC__ >= 4) +# define BOOST_ATTRIBUTE_UNUSED __attribute__((unused)) +#endif + +#ifndef BOOST_COMPILER +# define BOOST_COMPILER "Clang version " __clang_version__ +#endif + +// Macro used to identify the Clang compiler. +#define BOOST_CLANG 1 + diff --git a/ThirdParty/boost-Subset/boost/config/no_tr1/cmath.hpp b/ThirdParty/boost-Subset/boost/config/no_tr1/cmath.hpp new file mode 100644 index 0000000000..d8268d842a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/no_tr1/cmath.hpp @@ -0,0 +1,28 @@ +// (C) Copyright John Maddock 2008. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// The aim of this header is just to include but to do +// so in a way that does not result in recursive inclusion of +// the Boost TR1 components if boost/tr1/tr1/cmath is in the +// include search path. We have to do this to avoid circular +// dependencies: +// + +#ifndef BOOST_CONFIG_CMATH +# define BOOST_CONFIG_CMATH + +# ifndef BOOST_TR1_NO_RECURSION +# define BOOST_TR1_NO_RECURSION +# define BOOST_CONFIG_NO_CMATH_RECURSION +# endif + +# include + +# ifdef BOOST_CONFIG_NO_CMATH_RECURSION +# undef BOOST_TR1_NO_RECURSION +# undef BOOST_CONFIG_NO_CMATH_RECURSION +# endif + +#endif diff --git a/ThirdParty/boost-Subset/boost/config/no_tr1/complex.hpp b/ThirdParty/boost-Subset/boost/config/no_tr1/complex.hpp new file mode 100644 index 0000000000..ca200922b3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/no_tr1/complex.hpp @@ -0,0 +1,28 @@ +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// The aim of this header is just to include but to do +// so in a way that does not result in recursive inclusion of +// the Boost TR1 components if boost/tr1/tr1/complex is in the +// include search path. We have to do this to avoid circular +// dependencies: +// + +#ifndef BOOST_CONFIG_COMPLEX +# define BOOST_CONFIG_COMPLEX + +# ifndef BOOST_TR1_NO_RECURSION +# define BOOST_TR1_NO_RECURSION +# define BOOST_CONFIG_NO_COMPLEX_RECURSION +# endif + +# include + +# ifdef BOOST_CONFIG_NO_COMPLEX_RECURSION +# undef BOOST_TR1_NO_RECURSION +# undef BOOST_CONFIG_NO_COMPLEX_RECURSION +# endif + +#endif diff --git a/ThirdParty/boost-Subset/boost/config/no_tr1/functional.hpp b/ThirdParty/boost-Subset/boost/config/no_tr1/functional.hpp new file mode 100644 index 0000000000..e395efc197 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/no_tr1/functional.hpp @@ -0,0 +1,28 @@ +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// The aim of this header is just to include but to do +// so in a way that does not result in recursive inclusion of +// the Boost TR1 components if boost/tr1/tr1/functional is in the +// include search path. We have to do this to avoid circular +// dependencies: +// + +#ifndef BOOST_CONFIG_FUNCTIONAL +# define BOOST_CONFIG_FUNCTIONAL + +# ifndef BOOST_TR1_NO_RECURSION +# define BOOST_TR1_NO_RECURSION +# define BOOST_CONFIG_NO_FUNCTIONAL_RECURSION +# endif + +# include + +# ifdef BOOST_CONFIG_NO_FUNCTIONAL_RECURSION +# undef BOOST_TR1_NO_RECURSION +# undef BOOST_CONFIG_NO_FUNCTIONAL_RECURSION +# endif + +#endif diff --git a/ThirdParty/boost-Subset/boost/config/no_tr1/memory.hpp b/ThirdParty/boost-Subset/boost/config/no_tr1/memory.hpp new file mode 100644 index 0000000000..2b5d208027 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/no_tr1/memory.hpp @@ -0,0 +1,28 @@ +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// The aim of this header is just to include but to do +// so in a way that does not result in recursive inclusion of +// the Boost TR1 components if boost/tr1/tr1/memory is in the +// include search path. We have to do this to avoid circular +// dependencies: +// + +#ifndef BOOST_CONFIG_MEMORY +# define BOOST_CONFIG_MEMORY + +# ifndef BOOST_TR1_NO_RECURSION +# define BOOST_TR1_NO_RECURSION +# define BOOST_CONFIG_NO_MEMORY_RECURSION +# endif + +# include + +# ifdef BOOST_CONFIG_NO_MEMORY_RECURSION +# undef BOOST_TR1_NO_RECURSION +# undef BOOST_CONFIG_NO_MEMORY_RECURSION +# endif + +#endif diff --git a/ThirdParty/boost-Subset/boost/config/no_tr1/utility.hpp b/ThirdParty/boost-Subset/boost/config/no_tr1/utility.hpp new file mode 100644 index 0000000000..dea8f115bc --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/no_tr1/utility.hpp @@ -0,0 +1,28 @@ +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// The aim of this header is just to include but to do +// so in a way that does not result in recursive inclusion of +// the Boost TR1 components if boost/tr1/tr1/utility is in the +// include search path. We have to do this to avoid circular +// dependencies: +// + +#ifndef BOOST_CONFIG_UTILITY +# define BOOST_CONFIG_UTILITY + +# ifndef BOOST_TR1_NO_RECURSION +# define BOOST_TR1_NO_RECURSION +# define BOOST_CONFIG_NO_UTILITY_RECURSION +# endif + +# include + +# ifdef BOOST_CONFIG_NO_UTILITY_RECURSION +# undef BOOST_TR1_NO_RECURSION +# undef BOOST_CONFIG_NO_UTILITY_RECURSION +# endif + +#endif diff --git a/ThirdParty/boost-Subset/boost/config/platform/aix.hpp b/ThirdParty/boost-Subset/boost/config/platform/aix.hpp new file mode 100644 index 0000000000..894ef42ce9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/platform/aix.hpp @@ -0,0 +1,33 @@ +// (C) Copyright John Maddock 2001 - 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// IBM/Aix specific config options: + +#define BOOST_PLATFORM "IBM Aix" + +#define BOOST_HAS_UNISTD_H +#define BOOST_HAS_NL_TYPES_H +#define BOOST_HAS_NANOSLEEP +#define BOOST_HAS_CLOCK_GETTIME + +// This needs support in "boost/cstdint.hpp" exactly like FreeBSD. +// This platform has header named which includes all +// the things needed. +#define BOOST_HAS_STDINT_H + +// Threading API's: +#define BOOST_HAS_PTHREADS +#define BOOST_HAS_PTHREAD_DELAY_NP +#define BOOST_HAS_SCHED_YIELD +//#define BOOST_HAS_PTHREAD_YIELD + +// boilerplate code: +#include + + + + diff --git a/ThirdParty/boost-Subset/boost/config/platform/amigaos.hpp b/ThirdParty/boost-Subset/boost/config/platform/amigaos.hpp new file mode 100644 index 0000000000..34bcf4128b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/platform/amigaos.hpp @@ -0,0 +1,15 @@ +// (C) Copyright John Maddock 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +#define BOOST_PLATFORM "AmigaOS" + +#define BOOST_DISABLE_THREADS +#define BOOST_NO_CWCHAR +#define BOOST_NO_STD_WSTRING +#define BOOST_NO_INTRINSIC_WCHAR_T + + diff --git a/ThirdParty/boost-Subset/boost/config/platform/beos.hpp b/ThirdParty/boost-Subset/boost/config/platform/beos.hpp new file mode 100644 index 0000000000..48c3d8dc5b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/platform/beos.hpp @@ -0,0 +1,26 @@ +// (C) Copyright John Maddock 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// BeOS specific config options: + +#define BOOST_PLATFORM "BeOS" + +#define BOOST_NO_CWCHAR +#define BOOST_NO_CWCTYPE +#define BOOST_HAS_UNISTD_H + +#define BOOST_HAS_BETHREADS + +#ifndef BOOST_DISABLE_THREADS +# define BOOST_HAS_THREADS +#endif + +// boilerplate code: +#include + + + diff --git a/ThirdParty/boost-Subset/boost/config/platform/bsd.hpp b/ThirdParty/boost-Subset/boost/config/platform/bsd.hpp new file mode 100644 index 0000000000..a0142978eb --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/platform/bsd.hpp @@ -0,0 +1,86 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Darin Adler 2001. +// (C) Copyright Douglas Gregor 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// generic BSD config options: + +#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) +#error "This platform is not BSD" +#endif + +#ifdef __FreeBSD__ +#define BOOST_PLATFORM "FreeBSD " BOOST_STRINGIZE(__FreeBSD__) +#elif defined(__NetBSD__) +#define BOOST_PLATFORM "NetBSD " BOOST_STRINGIZE(__NetBSD__) +#elif defined(__OpenBSD__) +#define BOOST_PLATFORM "OpenBSD " BOOST_STRINGIZE(__OpenBSD__) +#elif defined(__DragonFly__) +#define BOOST_PLATFORM "DragonFly " BOOST_STRINGIZE(__DragonFly__) +#endif + +// +// is this the correct version check? +// FreeBSD has but does not +// advertise the fact in : +// +#if (defined(__FreeBSD__) && (__FreeBSD__ >= 3)) || defined(__DragonFly__) +# define BOOST_HAS_NL_TYPES_H +#endif + +// +// FreeBSD 3.x has pthreads support, but defines _POSIX_THREADS in +// and not in +// +#if (defined(__FreeBSD__) && (__FreeBSD__ <= 3))\ + || defined(__OpenBSD__) || defined(__DragonFly__) +# define BOOST_HAS_PTHREADS +#endif + +// +// No wide character support in the BSD header files: +// +#if defined(__NetBSD__) +#define __NetBSD_GCC__ (__GNUC__ * 1000000 \ + + __GNUC_MINOR__ * 1000 \ + + __GNUC_PATCHLEVEL__) +// XXX - the following is required until c++config.h +// defines _GLIBCXX_HAVE_SWPRINTF and friends +// or the preprocessor conditionals are removed +// from the cwchar header. +#define _GLIBCXX_HAVE_SWPRINTF 1 +#endif + +#if !((defined(__FreeBSD__) && (__FreeBSD__ >= 5)) \ + || (defined(__NetBSD_GCC__) && (__NetBSD_GCC__ >= 2095003)) || defined(__DragonFly__)) +# define BOOST_NO_CWCHAR +#endif +// +// The BSD has macros only, no functions: +// +#if !defined(__OpenBSD__) || defined(__DragonFly__) +# define BOOST_NO_CTYPE_FUNCTIONS +#endif + +// +// thread API's not auto detected: +// +#define BOOST_HAS_SCHED_YIELD +#define BOOST_HAS_NANOSLEEP +#define BOOST_HAS_GETTIMEOFDAY +#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +#define BOOST_HAS_SIGACTION + +// boilerplate code: +#define BOOST_HAS_UNISTD_H +#include + + + + + + diff --git a/ThirdParty/boost-Subset/boost/config/platform/cray.hpp b/ThirdParty/boost-Subset/boost/config/platform/cray.hpp new file mode 100644 index 0000000000..5c476e4160 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/platform/cray.hpp @@ -0,0 +1,18 @@ +// (C) Copyright John Maddock 2011. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + +// See http://www.boost.org for most recent version. + +// SGI Irix specific config options: + +#define BOOST_PLATFORM "Cray" + +// boilerplate code: +#define BOOST_HAS_UNISTD_H +#include + + + diff --git a/ThirdParty/boost-Subset/boost/config/platform/cygwin.hpp b/ThirdParty/boost-Subset/boost/config/platform/cygwin.hpp new file mode 100644 index 0000000000..b7ef572fa6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/platform/cygwin.hpp @@ -0,0 +1,58 @@ +// (C) Copyright John Maddock 2001 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// cygwin specific config options: + +#define BOOST_PLATFORM "Cygwin" +#define BOOST_HAS_DIRENT_H +#define BOOST_HAS_LOG1P +#define BOOST_HAS_EXPM1 + +// +// Threading API: +// See if we have POSIX threads, if we do use them, otherwise +// revert to native Win threads. +#define BOOST_HAS_UNISTD_H +#include +#if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) +# define BOOST_HAS_PTHREADS +# define BOOST_HAS_SCHED_YIELD +# define BOOST_HAS_GETTIMEOFDAY +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# define BOOST_HAS_SIGACTION +#else +# if !defined(BOOST_HAS_WINTHREADS) +# define BOOST_HAS_WINTHREADS +# endif +# define BOOST_HAS_FTIME +#endif + +// +// find out if we have a stdint.h, there should be a better way to do this: +// +#include +#ifdef _STDINT_H +#define BOOST_HAS_STDINT_H +#endif + +/// Cygwin has no fenv.h +#define BOOST_NO_FENV_H + +// boilerplate code: +#include + +// +// Cygwin lies about XSI conformance, there is no nl_types.h: +// +#ifdef BOOST_HAS_NL_TYPES_H +# undef BOOST_HAS_NL_TYPES_H +#endif + + + + + diff --git a/ThirdParty/boost-Subset/boost/config/platform/haiku.hpp b/ThirdParty/boost-Subset/boost/config/platform/haiku.hpp new file mode 100644 index 0000000000..750866c47d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/platform/haiku.hpp @@ -0,0 +1,31 @@ +// (C) Copyright Jessica Hamilton 2014. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Haiku specific config options: + +#define BOOST_PLATFORM "Haiku" + +#define BOOST_HAS_UNISTD_H +#define BOOST_HAS_STDINT_H + +#ifndef BOOST_DISABLE_THREADS +# define BOOST_HAS_THREADS +#endif + +#define BOOST_NO_CXX11_HDR_TYPE_TRAITS +#define BOOST_NO_CXX11_ATOMIC_SMART_PTR +#define BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_NO_CXX11_VARIADIC_MACROS + +// +// thread API's not auto detected: +// +#define BOOST_HAS_SCHED_YIELD +#define BOOST_HAS_GETTIMEOFDAY + +// boilerplate code: +#include diff --git a/ThirdParty/boost-Subset/boost/config/platform/hpux.hpp b/ThirdParty/boost-Subset/boost/config/platform/hpux.hpp new file mode 100644 index 0000000000..19ce68e597 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/platform/hpux.hpp @@ -0,0 +1,87 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2001 - 2003. +// (C) Copyright David Abrahams 2002. +// (C) Copyright Toon Knapen 2003. +// (C) Copyright Boris Gubenko 2006 - 2007. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// hpux specific config options: + +#define BOOST_PLATFORM "HP-UX" + +// In principle, HP-UX has a nice under the name +// However, it has the following problem: +// Use of UINT32_C(0) results in "0u l" for the preprocessed source +// (verifyable with gcc 2.95.3) +#if (defined(__GNUC__) && (__GNUC__ >= 3)) || defined(__HP_aCC) +# define BOOST_HAS_STDINT_H +#endif + +#if !(defined(__HP_aCC) || !defined(_INCLUDE__STDC_A1_SOURCE)) +# define BOOST_NO_SWPRINTF +#endif +#if defined(__HP_aCC) && !defined(_INCLUDE__STDC_A1_SOURCE) +# define BOOST_NO_CWCTYPE +#endif + +#if defined(__GNUC__) +# if (__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3)) + // GNU C on HP-UX does not support threads (checked up to gcc 3.3) +# define BOOST_DISABLE_THREADS +# elif !defined(BOOST_DISABLE_THREADS) + // threads supported from gcc-3.3 onwards: +# define BOOST_HAS_THREADS +# define BOOST_HAS_PTHREADS +# endif +#elif defined(__HP_aCC) && !defined(BOOST_DISABLE_THREADS) +# define BOOST_HAS_PTHREADS +#endif + +// boilerplate code: +#define BOOST_HAS_UNISTD_H +#include + +// the following are always available: +#ifndef BOOST_HAS_GETTIMEOFDAY +# define BOOST_HAS_GETTIMEOFDAY +#endif +#ifndef BOOST_HAS_SCHED_YIELD +# define BOOST_HAS_SCHED_YIELD +#endif +#ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +#endif +#ifndef BOOST_HAS_NL_TYPES_H +# define BOOST_HAS_NL_TYPES_H +#endif +#ifndef BOOST_HAS_NANOSLEEP +# define BOOST_HAS_NANOSLEEP +#endif +#ifndef BOOST_HAS_GETTIMEOFDAY +# define BOOST_HAS_GETTIMEOFDAY +#endif +#ifndef BOOST_HAS_DIRENT_H +# define BOOST_HAS_DIRENT_H +#endif +#ifndef BOOST_HAS_CLOCK_GETTIME +# define BOOST_HAS_CLOCK_GETTIME +#endif +#ifndef BOOST_HAS_SIGACTION +# define BOOST_HAS_SIGACTION +#endif +#ifndef BOOST_HAS_NRVO +# ifndef __parisc +# define BOOST_HAS_NRVO +# endif +#endif +#ifndef BOOST_HAS_LOG1P +# define BOOST_HAS_LOG1P +#endif +#ifndef BOOST_HAS_EXPM1 +# define BOOST_HAS_EXPM1 +#endif + diff --git a/ThirdParty/boost-Subset/boost/config/platform/irix.hpp b/ThirdParty/boost-Subset/boost/config/platform/irix.hpp new file mode 100644 index 0000000000..aeae49c8b4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/platform/irix.hpp @@ -0,0 +1,31 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + +// See http://www.boost.org for most recent version. + +// SGI Irix specific config options: + +#define BOOST_PLATFORM "SGI Irix" + +#define BOOST_NO_SWPRINTF +// +// these are not auto detected by POSIX feature tests: +// +#define BOOST_HAS_GETTIMEOFDAY +#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE + +#ifdef __GNUC__ + // GNU C on IRIX does not support threads (checked up to gcc 3.3) +# define BOOST_DISABLE_THREADS +#endif + +// boilerplate code: +#define BOOST_HAS_UNISTD_H +#include + + + diff --git a/ThirdParty/boost-Subset/boost/config/platform/linux.hpp b/ThirdParty/boost-Subset/boost/config/platform/linux.hpp new file mode 100644 index 0000000000..6fa5f45be4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/platform/linux.hpp @@ -0,0 +1,105 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2001 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// linux specific config options: + +#define BOOST_PLATFORM "linux" + +// make sure we have __GLIBC_PREREQ if available at all +#ifdef __cplusplus +#include +#else +#include +#endif + +// +// added to glibc 2.1.1 +// We can only test for 2.1 though: +// +#if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 1))) + // defines int64_t unconditionally, but defines + // int64_t only if __GNUC__. Thus, assume a fully usable + // only when using GCC. +# if defined __GNUC__ +# define BOOST_HAS_STDINT_H +# endif +#endif + +#if defined(__LIBCOMO__) + // + // como on linux doesn't have std:: c functions: + // NOTE: versions of libcomo prior to beta28 have octal version numbering, + // e.g. version 25 is 21 (dec) + // +# if __LIBCOMO_VERSION__ <= 20 +# define BOOST_NO_STDC_NAMESPACE +# endif + +# if __LIBCOMO_VERSION__ <= 21 +# define BOOST_NO_SWPRINTF +# endif + +#endif + +// +// If glibc is past version 2 then we definitely have +// gettimeofday, earlier versions may or may not have it: +// +#if defined(__GLIBC__) && (__GLIBC__ >= 2) +# define BOOST_HAS_GETTIMEOFDAY +#endif + +#ifdef __USE_POSIX199309 +# define BOOST_HAS_NANOSLEEP +#endif + +#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) +// __GLIBC_PREREQ is available since 2.1.2 + + // swprintf is available since glibc 2.2.0 +# if !__GLIBC_PREREQ(2,2) || (!defined(__USE_ISOC99) && !defined(__USE_UNIX98)) +# define BOOST_NO_SWPRINTF +# endif +#else +# define BOOST_NO_SWPRINTF +#endif + +// boilerplate code: +#define BOOST_HAS_UNISTD_H +#include +#ifdef __USE_GNU +#define BOOST_HAS_PTHREAD_YIELD +#endif + +#ifndef __GNUC__ +// +// if the compiler is not gcc we still need to be able to parse +// the GNU system headers, some of which (mainly ) +// use GNU specific extensions: +// +# ifndef __extension__ +# define __extension__ +# endif +# ifndef __const__ +# define __const__ const +# endif +# ifndef __volatile__ +# define __volatile__ volatile +# endif +# ifndef __signed__ +# define __signed__ signed +# endif +# ifndef __typeof__ +# define __typeof__ typeof +# endif +# ifndef __inline__ +# define __inline__ inline +# endif +#endif + + diff --git a/ThirdParty/boost-Subset/boost/config/platform/macos.hpp b/ThirdParty/boost-Subset/boost/config/platform/macos.hpp new file mode 100644 index 0000000000..6d876b12db --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/platform/macos.hpp @@ -0,0 +1,87 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Darin Adler 2001 - 2002. +// (C) Copyright Bill Kempf 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Mac OS specific config options: + +#define BOOST_PLATFORM "Mac OS" + +#if __MACH__ && !defined(_MSL_USING_MSL_C) + +// Using the Mac OS X system BSD-style C library. + +# ifndef BOOST_HAS_UNISTD_H +# define BOOST_HAS_UNISTD_H +# endif +// +// Begin by including our boilerplate code for POSIX +// feature detection, this is safe even when using +// the MSL as Metrowerks supply their own +// to replace the platform-native BSD one. G++ users +// should also always be able to do this on MaxOS X. +// +# include +# ifndef BOOST_HAS_STDINT_H +# define BOOST_HAS_STDINT_H +# endif + +// +// BSD runtime has pthreads, sigaction, sched_yield and gettimeofday, +// of these only pthreads are advertised in , so set the +// other options explicitly: +// +# define BOOST_HAS_SCHED_YIELD +# define BOOST_HAS_GETTIMEOFDAY +# define BOOST_HAS_SIGACTION + +# if (__GNUC__ < 3) && !defined( __APPLE_CC__) + +// GCC strange "ignore std" mode works better if you pretend everything +// is in the std namespace, for the most part. + +# define BOOST_NO_STDC_NAMESPACE +# endif + +# if (__GNUC__ == 4) + +// Both gcc and intel require these. +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# define BOOST_HAS_NANOSLEEP + +# endif + +#else + +// Using the MSL C library. + +// We will eventually support threads in non-Carbon builds, but we do +// not support this yet. +# if ( defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON ) || ( defined(TARGET_CARBON) && TARGET_CARBON ) + +# if !defined(BOOST_HAS_PTHREADS) +// MPTasks support is deprecated/removed from Boost: +//# define BOOST_HAS_MPTASKS +# elif ( __dest_os == __mac_os_x ) +// We are doing a Carbon/Mach-O/MSL build which has pthreads, but only the +// gettimeofday and no posix. +# define BOOST_HAS_GETTIMEOFDAY +# endif + +#ifdef BOOST_HAS_PTHREADS +# define BOOST_HAS_THREADS +#endif + +// The remote call manager depends on this. +# define BOOST_BIND_ENABLE_PASCAL + +# endif + +#endif + + + diff --git a/ThirdParty/boost-Subset/boost/config/platform/qnxnto.hpp b/ThirdParty/boost-Subset/boost/config/platform/qnxnto.hpp new file mode 100644 index 0000000000..b1377c8d2c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/platform/qnxnto.hpp @@ -0,0 +1,31 @@ +// (C) Copyright Jim Douglas 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// QNX specific config options: + +#define BOOST_PLATFORM "QNX" + +#define BOOST_HAS_UNISTD_H +#include + +// QNX claims XOpen version 5 compatibility, but doesn't have an nl_types.h +// or log1p and expm1: +#undef BOOST_HAS_NL_TYPES_H +#undef BOOST_HAS_LOG1P +#undef BOOST_HAS_EXPM1 + +#define BOOST_HAS_PTHREADS +#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE + +#define BOOST_HAS_GETTIMEOFDAY +#define BOOST_HAS_CLOCK_GETTIME +#define BOOST_HAS_NANOSLEEP + + + + + diff --git a/ThirdParty/boost-Subset/boost/config/platform/solaris.hpp b/ThirdParty/boost-Subset/boost/config/platform/solaris.hpp new file mode 100644 index 0000000000..6e4efc9e56 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/platform/solaris.hpp @@ -0,0 +1,31 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// sun specific config options: + +#define BOOST_PLATFORM "Sun Solaris" + +#define BOOST_HAS_GETTIMEOFDAY + +// boilerplate code: +#define BOOST_HAS_UNISTD_H +#include + +// +// pthreads don't actually work with gcc unless _PTHREADS is defined: +// +#if defined(__GNUC__) && defined(_POSIX_THREADS) && !defined(_PTHREADS) +# undef BOOST_HAS_PTHREADS +#endif + +#define BOOST_HAS_STDINT_H +#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +#define BOOST_HAS_LOG1P +#define BOOST_HAS_EXPM1 + + diff --git a/ThirdParty/boost-Subset/boost/config/platform/symbian.hpp b/ThirdParty/boost-Subset/boost/config/platform/symbian.hpp new file mode 100644 index 0000000000..e02a7782de --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/platform/symbian.hpp @@ -0,0 +1,97 @@ +// (C) Copyright Yuriy Krasnoschek 2009. +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2001 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// symbian specific config options: + + +#define BOOST_PLATFORM "Symbian" +#define BOOST_SYMBIAN 1 + + +#if defined(__S60_3X__) +// Open C / C++ plugin was introdused in this SDK, earlier versions don't have CRT / STL +# define BOOST_S60_3rd_EDITION_FP2_OR_LATER_SDK +// make sure we have __GLIBC_PREREQ if available at all +#ifdef __cplusplus +#include +#else +#include +#endif// boilerplate code: +# define BOOST_HAS_UNISTD_H +# include +// S60 SDK defines _POSIX_VERSION as POSIX.1 +# ifndef BOOST_HAS_STDINT_H +# define BOOST_HAS_STDINT_H +# endif +# ifndef BOOST_HAS_GETTIMEOFDAY +# define BOOST_HAS_GETTIMEOFDAY +# endif +# ifndef BOOST_HAS_DIRENT_H +# define BOOST_HAS_DIRENT_H +# endif +# ifndef BOOST_HAS_SIGACTION +# define BOOST_HAS_SIGACTION +# endif +# ifndef BOOST_HAS_PTHREADS +# define BOOST_HAS_PTHREADS +# endif +# ifndef BOOST_HAS_NANOSLEEP +# define BOOST_HAS_NANOSLEEP +# endif +# ifndef BOOST_HAS_SCHED_YIELD +# define BOOST_HAS_SCHED_YIELD +# endif +# ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# endif +# ifndef BOOST_HAS_LOG1P +# define BOOST_HAS_LOG1P +# endif +# ifndef BOOST_HAS_EXPM1 +# define BOOST_HAS_EXPM1 +# endif +# ifndef BOOST_POSIX_API +# define BOOST_POSIX_API +# endif +// endianess support +# include +// Symbian SDK provides _BYTE_ORDER instead of __BYTE_ORDER +# ifndef __LITTLE_ENDIAN +# ifdef _LITTLE_ENDIAN +# define __LITTLE_ENDIAN _LITTLE_ENDIAN +# else +# define __LITTLE_ENDIAN 1234 +# endif +# endif +# ifndef __BIG_ENDIAN +# ifdef _BIG_ENDIAN +# define __BIG_ENDIAN _BIG_ENDIAN +# else +# define __BIG_ENDIAN 4321 +# endif +# endif +# ifndef __BYTE_ORDER +# define __BYTE_ORDER __LITTLE_ENDIAN // Symbian is LE +# endif +// Known limitations +# define BOOST_ASIO_DISABLE_SERIAL_PORT +# define BOOST_DATE_TIME_NO_LOCALE +# define BOOST_NO_STD_WSTRING +# define BOOST_EXCEPTION_DISABLE +# define BOOST_NO_EXCEPTIONS + +#else // TODO: More platform support e.g. UIQ +# error "Unsuppoted Symbian SDK" +#endif + +#if defined(__WINSCW__) && !defined(BOOST_DISABLE_WIN32) +# define BOOST_DISABLE_WIN32 // winscw defines WIN32 macro +#endif + + diff --git a/ThirdParty/boost-Subset/boost/config/platform/vms.hpp b/ThirdParty/boost-Subset/boost/config/platform/vms.hpp new file mode 100644 index 0000000000..f70efcfb8e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/platform/vms.hpp @@ -0,0 +1,25 @@ +// (C) Copyright Artyom Beilis 2010. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_CONFIG_PLATFORM_VMS_HPP +#define BOOST_CONFIG_PLATFORM_VMS_HPP + +#define BOOST_PLATFORM "OpenVMS" + +#undef BOOST_HAS_STDINT_H +#define BOOST_HAS_UNISTD_H +#define BOOST_HAS_NL_TYPES_H +#define BOOST_HAS_GETTIMEOFDAY +#define BOOST_HAS_DIRENT_H +#define BOOST_HAS_PTHREADS +#define BOOST_HAS_NANOSLEEP +#define BOOST_HAS_CLOCK_GETTIME +#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +#define BOOST_HAS_LOG1P +#define BOOST_HAS_EXPM1 +#define BOOST_HAS_THREADS +#undef BOOST_HAS_SCHED_YIELD + +#endif diff --git a/ThirdParty/boost-Subset/boost/config/platform/vxworks.hpp b/ThirdParty/boost-Subset/boost/config/platform/vxworks.hpp new file mode 100644 index 0000000000..cdda0158ad --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/platform/vxworks.hpp @@ -0,0 +1,369 @@ +// (C) Copyright Dustin Spicuzza 2009. +// Adapted to vxWorks 6.9 by Peter Brockamp 2012. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Since WRS does not yet properly support boost under vxWorks +// and this file was badly outdated, but I was keen on using it, +// I patched boost myself to make things work. This has been tested +// and adapted by me for vxWorks 6.9 *only*, as I'm lacking access +// to earlier 6.X versions! The only thing I know for sure is that +// very old versions of vxWorks (namely everything below 6.x) are +// absolutely unable to use boost. This is mainly due to the completely +// outdated libraries and ancient compiler (GCC 2.96 or worse). Do +// not even think of getting this to work, a miserable failure will +// be guaranteed! +// Equally, this file has been tested for RTPs (Real Time Processes) +// only, not for DKMs (Downloadable Kernel Modules). These two types +// of executables differ largely in the available functionality of +// the C-library, STL, and so on. A DKM uses a library similar to those +// of vxWorks 5.X - with all its limitations and incompatibilities +// with respect to ANSI C++ and STL. So probably there might be problems +// with the usage of boost from DKMs. WRS or any voluteers are free to +// prove the opposite! + +// ==================================================================== +// +// Some important information regarding the usage of POSIX semaphores: +// ------------------------------------------------------------------- +// +// VxWorks as a real time operating system handles threads somewhat +// different from what "normal" OSes do, regarding their scheduling! +// This could lead to a scenario called "priority inversion" when using +// semaphores, see http://en.wikipedia.org/wiki/Priority_inversion. +// +// Now, VxWorks POSIX-semaphores for DKM's default to the usage of +// priority inverting semaphores, which is fine. On the other hand, +// for RTP's it defaults to using non priority inverting semaphores, +// which could easily pose a serious problem for a real time process, +// i.e. deadlocks! To overcome this two possibilities do exist: +// +// a) Patch every piece of boost that uses semaphores to instanciate +// the proper type of semaphores. This is non-intrusive with respect +// to the OS and could relatively easy been done by giving all +// semaphores attributes deviating from the default (for in-depth +// information see the POSIX functions pthread_mutexattr_init() +// and pthread_mutexattr_setprotocol()). However this breaks all +// too easily, as with every new version some boost library could +// all in a sudden start using semaphores, resurrecting the very +// same, hard to locate problem over and over again! +// +// b) We could change the default properties for POSIX-semaphores +// that VxWorks uses for RTP's and this is being suggested here, +// as it will more or less seamlessly integrate with boost. I got +// the following information from WRS how to do this, compare +// Wind River TSR# 1209768: +// +// Instructions for changing the default properties of POSIX- +// semaphores for RTP's in VxWorks 6.9: +// - Edit the file /vxworks-6.9/target/usr/src/posix/pthreadLib.c +// in the root of your Workbench-installation. +// - Around line 917 there should be the definition of the default +// mutex attributes: +// +// LOCAL pthread_mutexattr_t defaultMutexAttr = +// { +// PTHREAD_INITIALIZED_OBJ, PTHREAD_PRIO_NONE, 0, +// PTHREAD_MUTEX_DEFAULT +// }; +// +// Here, replace PTHREAD_PRIO_NONE by PTHREAD_PRIO_INHERIT. +// - Around line 1236 there should be a definition for the function +// pthread_mutexattr_init(). A couple of lines below you should +// find a block of code like this: +// +// pAttr->mutexAttrStatus = PTHREAD_INITIALIZED_OBJ; +// pAttr->mutexAttrProtocol = PTHREAD_PRIO_NONE; +// pAttr->mutexAttrPrioceiling = 0; +// pAttr->mutexAttrType = PTHREAD_MUTEX_DEFAULT; +// +// Here again, replace PTHREAD_PRIO_NONE by PTHREAD_PRIO_INHERIT. +// - Finally, rebuild your VSB. This will create a new VxWorks kernel +// with the changed properties. That's it! Now, using boost should +// no longer cause any problems with task deadlocks! +// +// And here's another useful piece of information concerning VxWorks' +// POSIX-functionality in general: +// VxWorks is not a genuine POSIX-OS in itself, rather it is using a +// kind of compatibility layer (sort of a wrapper) to emulate the +// POSIX-functionality by using its own resources and functions. +// At the time a task (thread) calls it's first POSIX-function during +// runtime it is being transformed by the OS into a POSIX-thread. +// This transformation does include a call to malloc() to allocate the +// memory required for the housekeeping of POSIX-threads. In a high +// priority RTP this malloc() call may be highly undesirable, as its +// timing is more or less unpredictable (depending on what your actual +// heap looks like). You can circumvent this problem by calling the +// function thread_self() at a well defined point in the code of the +// task, e.g. shortly after the task spawns up. Thereby you are able +// to define the time when the task-transformation will take place and +// you could shift it to an uncritical point where a malloc() call is +// tolerable. So, if this could pose a problem for your code, remember +// to call thread_self() from the affected task at an early stage. +// +// ==================================================================== + +// Block out all versions before vxWorks 6.x, as these don't work: +// Include header with the vxWorks version information and query them +#include +#if !defined(_WRS_VXWORKS_MAJOR) || (_WRS_VXWORKS_MAJOR < 6) +# error "The vxWorks version you're using is so badly outdated,\ + it doesn't work at all with boost, sorry, no chance!" +#endif + +// Handle versions above 5.X but below 6.9 +#if (_WRS_VXWORKS_MAJOR == 6) && (_WRS_VXWORKS_MINOR < 9) +// TODO: Starting from what version does vxWorks work with boost? +// We can't reasonably insert a #warning "" as a user hint here, +// as this will show up with every file including some boost header, +// badly bugging the user... So for the time being we just leave it. +#endif + +// vxWorks specific config options: +// -------------------------------- +#define BOOST_PLATFORM "vxWorks" + +// Special behaviour for DKMs: +#ifdef _WRS_KERNEL + // DKMs do not have the -header, + // but apparently they do have an intrinsic wchar_t meanwhile! +# define BOOST_NO_CWCHAR + + // Lots of wide-functions and -headers are unavailable for DKMs as well: +# define BOOST_NO_CWCTYPE +# define BOOST_NO_SWPRINTF +# define BOOST_NO_STD_WSTRING +# define BOOST_NO_STD_WSTREAMBUF +#endif + +// Generally available headers: +#define BOOST_HAS_UNISTD_H +#define BOOST_HAS_STDINT_H +#define BOOST_HAS_DIRENT_H +#define BOOST_HAS_SLIST + +// vxWorks does not have installed an iconv-library by default, +// so unfortunately no Unicode support from scratch is available! +// Thus, instead it is suggested to switch to ICU, as this seems +// to be the most complete and portable option... +#define BOOST_LOCALE_WITH_ICU + +// Generally available functionality: +#define BOOST_HAS_THREADS +#define BOOST_HAS_NANOSLEEP +#define BOOST_HAS_GETTIMEOFDAY +#define BOOST_HAS_CLOCK_GETTIME +#define BOOST_HAS_MACRO_USE_FACET + +// Generally unavailable functionality, delivered by boost's test function: +//#define BOOST_NO_DEDUCED_TYPENAME // Commented this out, boost's test gives an errorneous result! +#define BOOST_NO_CXX11_EXTERN_TEMPLATE +#define BOOST_NO_CXX11_VARIADIC_MACROS + +// Generally available threading API's: +#define BOOST_HAS_PTHREADS +#define BOOST_HAS_SCHED_YIELD +#define BOOST_HAS_SIGACTION + +// Functionality available for RTPs only: +#ifdef __RTP__ +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# define BOOST_HAS_LOG1P +# define BOOST_HAS_EXPM1 +#endif + +// Functionality available for DKMs only: +#ifdef _WRS_KERNEL + // Luckily, at the moment there seems to be none! +#endif + +// These #defines allow posix_features to work, since vxWorks doesn't +// #define them itself for DKMs (for RTPs on the contrary it does): +#ifdef _WRS_KERNEL +# ifndef _POSIX_TIMERS +# define _POSIX_TIMERS 1 +# endif +# ifndef _POSIX_THREADS +# define _POSIX_THREADS 1 +# endif +#endif + +// vxWorks doesn't work with asio serial ports: +#define BOOST_ASIO_DISABLE_SERIAL_PORT +// TODO: The problem here seems to bee that vxWorks uses its own, very specific +// ways to handle serial ports, incompatible with POSIX or anything... +// Maybe a specific implementation would be possible, but until the +// straight need arises... This implementation would presumably consist +// of some vxWorks specific ioctl-calls, etc. Any voluteers? + +// vxWorks-around: #defines CLOCKS_PER_SEC as sysClkRateGet() but +// miserably fails to #include the required to make +// sysClkRateGet() available! So we manually include it here. +#ifdef __RTP__ +# include +# include +#endif + +// vxWorks-around: In the macros INT32_C(), UINT32_C(), INT64_C() and +// UINT64_C() are defined errorneously, yielding not a signed/ +// unsigned long/long long type, but a signed/unsigned int/long +// type. Eventually this leads to compile errors in ratio_fwd.hpp, +// when trying to define several constants which do not fit into a +// long type! We correct them here by redefining. +#include + +// Some macro-magic to do the job +#define VX_JOIN(X, Y) VX_DO_JOIN(X, Y) +#define VX_DO_JOIN(X, Y) VX_DO_JOIN2(X, Y) +#define VX_DO_JOIN2(X, Y) X##Y + +// Correctly setup the macros +#undef INT32_C +#undef UINT32_C +#undef INT64_C +#undef UINT64_C +#define INT32_C(x) VX_JOIN(x, L) +#define UINT32_C(x) VX_JOIN(x, UL) +#define INT64_C(x) VX_JOIN(x, LL) +#define UINT64_C(x) VX_JOIN(x, ULL) + +// #include Libraries required for the following function adaption +#include +#include +#include + +// Use C-linkage for the following helper functions +extern "C" { + +// vxWorks-around: The required functions getrlimit() and getrlimit() are missing. +// But we have the similar functions getprlimit() and setprlimit(), +// which may serve the purpose. +// Problem: The vxWorks-documentation regarding these functions +// doesn't deserve its name! It isn't documented what the first two +// parameters idtype and id mean, so we must fall back to an educated +// guess - null, argh... :-/ + +// TODO: getprlimit() and setprlimit() do exist for RTPs only, for whatever reason. +// Thus for DKMs there would have to be another implementation. +#ifdef __RTP__ + inline int getrlimit(int resource, struct rlimit *rlp){ + return getprlimit(0, 0, resource, rlp); + } + + inline int setrlimit(int resource, const struct rlimit *rlp){ + return setprlimit(0, 0, resource, const_cast(rlp)); + } +#endif + +// vxWorks has ftruncate() only, so we do simulate truncate(): +inline int truncate(const char *p, off_t l){ + int fd = open(p, O_WRONLY); + if (fd == -1){ + errno = EACCES; + return -1; + } + if (ftruncate(fd, l) == -1){ + close(fd); + errno = EACCES; + return -1; + } + return close(fd); +} + +// Fake symlink handling by dummy functions: +inline int symlink(const char*, const char*){ + // vxWorks has no symlinks -> always return an error! + errno = EACCES; + return -1; +} + +inline ssize_t readlink(const char*, char*, size_t){ + // vxWorks has no symlinks -> always return an error! + errno = EACCES; + return -1; +} + +// vxWorks claims to implement gettimeofday in sys/time.h +// but nevertheless does not provide it! See +// https://support.windriver.com/olsPortal/faces/maintenance/techtipDetail_noHeader.jspx?docId=16442&contentId=WR_TECHTIP_006256 +// We implement a surrogate version here via clock_gettime: +inline int gettimeofday(struct timeval *tv, void * /*tzv*/) { + struct timespec ts; + clock_gettime(CLOCK_MONOTONIC, &ts); + tv->tv_sec = ts.tv_sec; + tv->tv_usec = ts.tv_nsec / 1000; + return 0; +} + +// vxWorks does provide neither struct tms nor function times()! +// We implement an empty dummy-function, simply setting the user +// and system time to the half of thew actual system ticks-value +// and the child user and system time to 0. +// Rather ugly but at least it suppresses compiler errors... +// Unfortunately, this of course *does* have an severe impact on +// dependant libraries, actually this is chrono only! Here it will +// not be possible to correctly use user and system times! But +// as vxWorks is lacking the ability to calculate user and system +// process times there seems to be no other possible solution. +struct tms{ + clock_t tms_utime; // User CPU time + clock_t tms_stime; // System CPU time + clock_t tms_cutime; // User CPU time of terminated child processes + clock_t tms_cstime; // System CPU time of terminated child processes +}; + +inline clock_t times(struct tms *t){ + struct timespec ts; + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts); + clock_t ticks(static_cast(static_cast(ts.tv_sec) * CLOCKS_PER_SEC + + static_cast(ts.tv_nsec) * CLOCKS_PER_SEC / 1000000.0)); + t->tms_utime = ticks/2U; + t->tms_stime = ticks/2U; + t->tms_cutime = 0; // vxWorks is lacking the concept of a child process! + t->tms_cstime = 0; // -> Set the wait times for childs to 0 + return ticks; +} + +} // extern "C" + +// Put the selfmade functions into the std-namespace, just in case +namespace std { +# ifdef __RTP__ + using ::getrlimit; + using ::setrlimit; +# endif + using ::truncate; + using ::symlink; + using ::readlink; + using ::times; + using ::gettimeofday; +} + +// Some more macro-magic: +// vxWorks-around: Some functions are not present or broken in vxWorks +// but may be patched to life via helper macros... + +// Include signal.h which might contain a typo to be corrected here +#include + +#define getpagesize() sysconf(_SC_PAGESIZE) // getpagesize is deprecated anyway! +#ifndef S_ISSOCK +# define S_ISSOCK(mode) ((mode & S_IFMT) == S_IFSOCK) // Is file a socket? +#endif +#define lstat(p, b) stat(p, b) // lstat() == stat(), as vxWorks has no symlinks! +#ifndef FPE_FLTINV +# define FPE_FLTINV (FPE_FLTSUB+1) // vxWorks has no FPE_FLTINV, so define one as a dummy +#endif +#if !defined(BUS_ADRALN) && defined(BUS_ADRALNR) +# define BUS_ADRALN BUS_ADRALNR // Correct a supposed typo in vxWorks' +#endif +//typedef int locale_t; // locale_t is a POSIX-extension, currently unpresent in vxWorks! + +// #include boilerplate code: +#include + +// vxWorks lies about XSI conformance, there is no nl_types.h: +#undef BOOST_HAS_NL_TYPES_H diff --git a/ThirdParty/boost-Subset/boost/config/platform/win32.hpp b/ThirdParty/boost-Subset/boost/config/platform/win32.hpp new file mode 100644 index 0000000000..60a29abe83 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/platform/win32.hpp @@ -0,0 +1,82 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Bill Kempf 2001. +// (C) Copyright Aleksey Gurtovoy 2003. +// (C) Copyright Rene Rivera 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Win32 specific config options: + +#define BOOST_PLATFORM "Win32" + +// Get the information about the MinGW runtime, i.e. __MINGW32_*VERSION. +#if defined(__MINGW32__) +# include <_mingw.h> +#endif + +#if defined(__GNUC__) && !defined(BOOST_NO_SWPRINTF) +# define BOOST_NO_SWPRINTF +#endif + +// Default defines for BOOST_SYMBOL_EXPORT and BOOST_SYMBOL_IMPORT +// If a compiler doesn't support __declspec(dllexport)/__declspec(dllimport), +// its boost/config/compiler/ file must define BOOST_SYMBOL_EXPORT and +// BOOST_SYMBOL_IMPORT +#ifndef BOOST_SYMBOL_EXPORT +# define BOOST_HAS_DECLSPEC +# define BOOST_SYMBOL_EXPORT __declspec(dllexport) +# define BOOST_SYMBOL_IMPORT __declspec(dllimport) +#endif + +#if defined(__MINGW32__) && ((__MINGW32_MAJOR_VERSION > 2) || ((__MINGW32_MAJOR_VERSION == 2) && (__MINGW32_MINOR_VERSION >= 0))) +# define BOOST_HAS_STDINT_H +# ifndef __STDC_LIMIT_MACROS +# define __STDC_LIMIT_MACROS +# endif +# define BOOST_HAS_DIRENT_H +# define BOOST_HAS_UNISTD_H +#endif + +#if defined(__MINGW32__) && (__GNUC__ >= 4) +// Mingw has these functions but there are persistent problems +// with calls to these crashing, so disable for now: +//# define BOOST_HAS_EXPM1 +//# define BOOST_HAS_LOG1P +# define BOOST_HAS_GETTIMEOFDAY +#endif +// +// Win32 will normally be using native Win32 threads, +// but there is a pthread library avaliable as an option, +// we used to disable this when BOOST_DISABLE_WIN32 was +// defined but no longer - this should allow some +// files to be compiled in strict mode - while maintaining +// a consistent setting of BOOST_HAS_THREADS across +// all translation units (needed for shared_ptr etc). +// + +#ifndef BOOST_HAS_PTHREADS +# define BOOST_HAS_WINTHREADS +#endif + +// +// WinCE configuration: +// +#if defined(_WIN32_WCE) || defined(UNDER_CE) +# define BOOST_NO_ANSI_APIS +// Windows CE does not have a conforming signature for swprintf +# define BOOST_NO_SWPRINTF +#else +# define BOOST_HAS_GETSYSTEMTIMEASFILETIME +# define BOOST_HAS_THREADEX +# define BOOST_HAS_GETSYSTEMTIMEASFILETIME +#endif + +#ifndef BOOST_DISABLE_WIN32 +// WEK: Added +#define BOOST_HAS_FTIME +#define BOOST_WINDOWS 1 + +#endif diff --git a/ThirdParty/boost-Subset/boost/config/posix_features.hpp b/ThirdParty/boost-Subset/boost/config/posix_features.hpp new file mode 100644 index 0000000000..d12954797f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/posix_features.hpp @@ -0,0 +1,95 @@ +// (C) Copyright John Maddock 2001 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + +// See http://www.boost.org for most recent version. + +// All POSIX feature tests go in this file, +// Note that we test _POSIX_C_SOURCE and _XOPEN_SOURCE as well +// _POSIX_VERSION and _XOPEN_VERSION: on some systems POSIX API's +// may be present but none-functional unless _POSIX_C_SOURCE and +// _XOPEN_SOURCE have been defined to the right value (it's up +// to the user to do this *before* including any header, although +// in most cases the compiler will do this for you). + +# if defined(BOOST_HAS_UNISTD_H) +# include + + // XOpen has , but is this the correct version check? +# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION >= 3) +# define BOOST_HAS_NL_TYPES_H +# endif + + // POSIX version 6 requires +# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 200100) +# define BOOST_HAS_STDINT_H +# endif + + // POSIX version 2 requires +# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199009L) +# define BOOST_HAS_DIRENT_H +# endif + + // POSIX version 3 requires to have sigaction: +# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199506L) +# define BOOST_HAS_SIGACTION +# endif + // POSIX defines _POSIX_THREADS > 0 for pthread support, + // however some platforms define _POSIX_THREADS without + // a value, hence the (_POSIX_THREADS+0 >= 0) check. + // Strictly speaking this may catch platforms with a + // non-functioning stub , but such occurrences should + // occur very rarely if at all. +# if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_MPTASKS) +# define BOOST_HAS_PTHREADS +# endif + + // BOOST_HAS_NANOSLEEP: + // This is predicated on _POSIX_TIMERS or _XOPEN_REALTIME: +# if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0)) \ + || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0)) +# define BOOST_HAS_NANOSLEEP +# endif + + // BOOST_HAS_CLOCK_GETTIME: + // This is predicated on _POSIX_TIMERS (also on _XOPEN_REALTIME + // but at least one platform - linux - defines that flag without + // defining clock_gettime): +# if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0)) +# define BOOST_HAS_CLOCK_GETTIME +# endif + + // BOOST_HAS_SCHED_YIELD: + // This is predicated on _POSIX_PRIORITY_SCHEDULING or + // on _POSIX_THREAD_PRIORITY_SCHEDULING or on _XOPEN_REALTIME. +# if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING+0 > 0)\ + || (defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING+0 > 0))\ + || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0)) +# define BOOST_HAS_SCHED_YIELD +# endif + + // BOOST_HAS_GETTIMEOFDAY: + // BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE: + // These are predicated on _XOPEN_VERSION, and appears to be first released + // in issue 4, version 2 (_XOPEN_VERSION > 500). + // Likewise for the functions log1p and expm1. +# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION+0 >= 500) +# define BOOST_HAS_GETTIMEOFDAY +# if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE+0 >= 500) +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# endif +# ifndef BOOST_HAS_LOG1P +# define BOOST_HAS_LOG1P +# endif +# ifndef BOOST_HAS_EXPM1 +# define BOOST_HAS_EXPM1 +# endif +# endif + +# endif + + + + diff --git a/ThirdParty/boost-Subset/boost/config/requires_threads.hpp b/ThirdParty/boost-Subset/boost/config/requires_threads.hpp new file mode 100644 index 0000000000..cfaff23027 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/requires_threads.hpp @@ -0,0 +1,92 @@ +// (C) Copyright John Maddock 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + +#ifndef BOOST_CONFIG_REQUIRES_THREADS_HPP +#define BOOST_CONFIG_REQUIRES_THREADS_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif + +#if defined(BOOST_DISABLE_THREADS) + +// +// special case to handle versions of gcc which don't currently support threads: +// +#if defined(__GNUC__) && ((__GNUC__ < 3) || (__GNUC_MINOR__ <= 3) || !defined(BOOST_STRICT_CONFIG)) +// +// this is checked up to gcc 3.3: +// +#if defined(__sgi) || defined(__hpux) +# error "Multi-threaded programs are not supported by gcc on HPUX or Irix (last checked with gcc 3.3)" +#endif + +#endif + +# error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS" + +#elif !defined(BOOST_HAS_THREADS) + +# if defined __COMO__ +// Comeau C++ +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -D_MT (Windows) or -D_REENTRANT (Unix)" + +#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) +// Intel +#ifdef _WIN32 +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd" +#else +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -openmp" +#endif + +# elif defined __GNUC__ +// GNU C++: +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)" + +#elif defined __sgi +// SGI MIPSpro C++ +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -D_SGI_MP_SOURCE" + +#elif defined __DECCXX +// Compaq Tru64 Unix cxx +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread" + +#elif defined __BORLANDC__ +// Borland +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -tWM" + +#elif defined __MWERKS__ +// Metrowerks CodeWarrior +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either -runtime sm, -runtime smd, -runtime dm, or -runtime dmd" + +#elif defined __SUNPRO_CC +// Sun Workshop Compiler C++ +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt" + +#elif defined __HP_aCC +// HP aCC +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt" + +#elif defined(__IBMCPP__) +// IBM Visual Age +# error "Compiler threading support is not turned on. Please compile the code with the xlC_r compiler" + +#elif defined _MSC_VER +// Microsoft Visual C++ +// +// Must remain the last #elif since some other vendors (Metrowerks, for +// example) also #define _MSC_VER +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd" + +#else + +# error "Compiler threading support is not turned on. Please consult your compiler's documentation for the appropriate options to use" + +#endif // compilers + +#endif // BOOST_HAS_THREADS + +#endif // BOOST_CONFIG_REQUIRES_THREADS_HPP diff --git a/ThirdParty/boost-Subset/boost/config/select_compiler_config.hpp b/ThirdParty/boost-Subset/boost/config/select_compiler_config.hpp new file mode 100644 index 0000000000..4d87093af3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/select_compiler_config.hpp @@ -0,0 +1,148 @@ +// Boost compiler configuration selection header file + +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Martin Wille 2003. +// (C) Copyright Guillaume Melquiond 2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for most recent version. + +// locate which compiler we are using and define +// BOOST_COMPILER_CONFIG as needed: + +#if defined __CUDACC__ +// NVIDIA CUDA C++ compiler for GPU +# include "boost/config/compiler/nvcc.hpp" + +#endif + +#if defined(__GCCXML__) +// GCC-XML emulates other compilers, it has to appear first here! +# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc_xml.hpp" + +#elif defined(_CRAYC) +// EDG based Cray compiler: +# define BOOST_COMPILER_CONFIG "boost/config/compiler/cray.hpp" + +#elif defined __COMO__ +// Comeau C++ +# define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp" + +#elif defined(__PATHSCALE__) && (__PATHCC__ >= 4) +// PathScale EKOPath compiler (has to come before clang and gcc) +# define BOOST_COMPILER_CONFIG "boost/config/compiler/pathscale.hpp" + +#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) +// Intel +# define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp" + +#elif defined __clang__ && !defined(__CUDACC__) && !defined(__ibmxl__) +// when using clang and cuda at same time, you want to appear as gcc +// Clang C++ emulates GCC, so it has to appear early. +# define BOOST_COMPILER_CONFIG "boost/config/compiler/clang.hpp" + +#elif defined __DMC__ +// Digital Mars C++ +# define BOOST_COMPILER_CONFIG "boost/config/compiler/digitalmars.hpp" + +# elif defined(__GNUC__) && !defined(__ibmxl__) +// GNU C++: +# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc.hpp" + +#elif defined __KCC +// Kai C++ +# define BOOST_COMPILER_CONFIG "boost/config/compiler/kai.hpp" + +#elif defined __sgi +// SGI MIPSpro C++ +# define BOOST_COMPILER_CONFIG "boost/config/compiler/sgi_mipspro.hpp" + +#elif defined __DECCXX +// Compaq Tru64 Unix cxx +# define BOOST_COMPILER_CONFIG "boost/config/compiler/compaq_cxx.hpp" + +#elif defined __ghs +// Greenhills C++ +# define BOOST_COMPILER_CONFIG "boost/config/compiler/greenhills.hpp" + +#elif defined __CODEGEARC__ +// CodeGear - must be checked for before Borland +# define BOOST_COMPILER_CONFIG "boost/config/compiler/codegear.hpp" + +#elif defined __BORLANDC__ +// Borland +# define BOOST_COMPILER_CONFIG "boost/config/compiler/borland.hpp" + +#elif defined __MWERKS__ +// Metrowerks CodeWarrior +# define BOOST_COMPILER_CONFIG "boost/config/compiler/metrowerks.hpp" + +#elif defined __SUNPRO_CC +// Sun Workshop Compiler C++ +# define BOOST_COMPILER_CONFIG "boost/config/compiler/sunpro_cc.hpp" + +#elif defined __HP_aCC +// HP aCC +# define BOOST_COMPILER_CONFIG "boost/config/compiler/hp_acc.hpp" + +#elif defined(__MRC__) || defined(__SC__) +// MPW MrCpp or SCpp +# define BOOST_COMPILER_CONFIG "boost/config/compiler/mpw.hpp" + +#elif defined(__ibmxl__) +// IBM XL C/C++ for Linux (Little Endian) +# define BOOST_COMPILER_CONFIG "boost/config/compiler/xlcpp.hpp" + +#elif defined(__IBMCPP__) +// IBM Visual Age or IBM XL C/C++ for Linux (Big Endian) +# define BOOST_COMPILER_CONFIG "boost/config/compiler/vacpp.hpp" + +#elif defined(__PGI) +// Portland Group Inc. +# define BOOST_COMPILER_CONFIG "boost/config/compiler/pgi.hpp" + +#elif defined _MSC_VER +// Microsoft Visual C++ +// +// Must remain the last #elif since some other vendors (Metrowerks, for +// example) also #define _MSC_VER +# define BOOST_COMPILER_CONFIG "boost/config/compiler/visualc.hpp" + +#elif defined (BOOST_ASSERT_CONFIG) +// this must come last - generate an error if we don't +// recognise the compiler: +# error "Unknown compiler - please configure (http://www.boost.org/libs/config/config.htm#configuring) and report the results to the main boost mailing list (http://www.boost.org/more/mailing_lists.htm#main)" + +#endif + +#if 0 +// +// This section allows dependency scanners to find all the headers we *might* include: +// +#include "boost/config/compiler/gcc_xml.hpp" +#include "boost/config/compiler/cray.hpp" +#include "boost/config/compiler/comeau.hpp" +#include "boost/config/compiler/pathscale.hpp" +#include "boost/config/compiler/intel.hpp" +#include "boost/config/compiler/clang.hpp" +#include "boost/config/compiler/digitalmars.hpp" +#include "boost/config/compiler/gcc.hpp" +#include "boost/config/compiler/kai.hpp" +#include "boost/config/compiler/sgi_mipspro.hpp" +#include "boost/config/compiler/compaq_cxx.hpp" +#include "boost/config/compiler/greenhills.hpp" +#include "boost/config/compiler/codegear.hpp" +#include "boost/config/compiler/borland.hpp" +#include "boost/config/compiler/metrowerks.hpp" +#include "boost/config/compiler/sunpro_cc.hpp" +#include "boost/config/compiler/hp_acc.hpp" +#include "boost/config/compiler/mpw.hpp" +#include "boost/config/compiler/vacpp.hpp" +#include "boost/config/compiler/pgi.hpp" +#include "boost/config/compiler/visualc.hpp" + +#endif + diff --git a/ThirdParty/boost-Subset/boost/config/select_platform_config.hpp b/ThirdParty/boost-Subset/boost/config/select_platform_config.hpp new file mode 100644 index 0000000000..acd1409ebc --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/select_platform_config.hpp @@ -0,0 +1,133 @@ +// Boost compiler configuration selection header file + +// (C) Copyright John Maddock 2001 - 2002. +// (C) Copyright Jens Maurer 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// locate which platform we are on and define BOOST_PLATFORM_CONFIG as needed. +// Note that we define the headers to include using "header_name" not +// in order to prevent macro expansion within the header +// name (for example "linux" is a macro on linux systems). + +#if (defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)) && !defined(_CRAYC) +// linux, also other platforms (Hurd etc) that use GLIBC, should these really have their own config headers though? +# define BOOST_PLATFORM_CONFIG "boost/config/platform/linux.hpp" + +#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) +// BSD: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/bsd.hpp" + +#elif defined(sun) || defined(__sun) +// solaris: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/solaris.hpp" + +#elif defined(__sgi) +// SGI Irix: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/irix.hpp" + +#elif defined(__hpux) +// hp unix: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/hpux.hpp" + +#elif defined(__CYGWIN__) +// cygwin is not win32: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/cygwin.hpp" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +// win32: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/win32.hpp" + +#elif defined(__HAIKU__) +// Haiku +# define BOOST_PLATFORM_CONFIG "boost/config/platform/haiku.hpp" + +#elif defined(__BEOS__) +// BeOS +# define BOOST_PLATFORM_CONFIG "boost/config/platform/beos.hpp" + +#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) +// MacOS +# define BOOST_PLATFORM_CONFIG "boost/config/platform/macos.hpp" + +#elif defined(__IBMCPP__) || defined(_AIX) +// IBM +# define BOOST_PLATFORM_CONFIG "boost/config/platform/aix.hpp" + +#elif defined(__amigaos__) +// AmigaOS +# define BOOST_PLATFORM_CONFIG "boost/config/platform/amigaos.hpp" + +#elif defined(__QNXNTO__) +// QNX: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/qnxnto.hpp" + +#elif defined(__VXWORKS__) +// vxWorks: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/vxworks.hpp" + +#elif defined(__SYMBIAN32__) +// Symbian: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/symbian.hpp" + +#elif defined(_CRAYC) +// Cray: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/cray.hpp" + +#elif defined(__VMS) +// VMS: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/vms.hpp" +#else + +# if defined(unix) \ + || defined(__unix) \ + || defined(_XOPEN_SOURCE) \ + || defined(_POSIX_SOURCE) + + // generic unix platform: + +# ifndef BOOST_HAS_UNISTD_H +# define BOOST_HAS_UNISTD_H +# endif + +# include + +# endif + +# if defined (BOOST_ASSERT_CONFIG) + // this must come last - generate an error if we don't + // recognise the platform: +# error "Unknown platform - please configure and report the results to boost.org" +# endif + +#endif + +#if 0 +// +// This section allows dependency scanners to find all the files we *might* include: +// +# include "boost/config/platform/linux.hpp" +# include "boost/config/platform/bsd.hpp" +# include "boost/config/platform/solaris.hpp" +# include "boost/config/platform/irix.hpp" +# include "boost/config/platform/hpux.hpp" +# include "boost/config/platform/cygwin.hpp" +# include "boost/config/platform/win32.hpp" +# include "boost/config/platform/beos.hpp" +# include "boost/config/platform/macos.hpp" +# include "boost/config/platform/aix.hpp" +# include "boost/config/platform/amigaos.hpp" +# include "boost/config/platform/qnxnto.hpp" +# include "boost/config/platform/vxworks.hpp" +# include "boost/config/platform/symbian.hpp" +# include "boost/config/platform/cray.hpp" +# include "boost/config/platform/vms.hpp" +# include + + + +#endif + diff --git a/ThirdParty/boost-Subset/boost/config/select_stdlib_config.hpp b/ThirdParty/boost-Subset/boost/config/select_stdlib_config.hpp new file mode 100644 index 0000000000..e270a8813a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/select_stdlib_config.hpp @@ -0,0 +1,105 @@ +// Boost compiler configuration selection header file + +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2001 - 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + +// See http://www.boost.org for most recent version. + +// locate which std lib we are using and define BOOST_STDLIB_CONFIG as needed: + +// First include to determine if some version of STLport is in use as the std lib +// (do not rely on this header being included since users can short-circuit this header +// if they know whose std lib they are using.) +#ifdef __cplusplus +# include +#else +# include +#endif + +#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) +// STLPort library; this _must_ come first, otherwise since +// STLport typically sits on top of some other library, we +// can end up detecting that first rather than STLport: +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/stlport.hpp" + +#else + +// If our std lib was not some version of STLport, and has not otherwise +// been detected, then include as it is about +// the smallest of the std lib headers that includes real C++ stuff. +// Some std libs do not include their C++-related macros in +// so this additional include makes sure we get those definitions. +// Note: do not rely on this header being included since users can short-circuit this +// #include if they know whose std lib they are using. +#if !defined(__LIBCOMO__) && !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER)\ + && !defined(_LIBCPP_VERSION) && !defined(__GLIBCPP__) && !defined(__GLIBCXX__)\ + && !defined(__STL_CONFIG_H) && !defined(__MSL_CPP__) && !defined(__IBMCPP__)\ + && !defined(MSIPL_COMPILE_H) && !defined(_YVALS) && !defined(_CPPLIB_VER) +#include +#endif + +#if defined(__LIBCOMO__) +// Comeau STL: +#define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcomo.hpp" + +#elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER) +// Rogue Wave library: +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/roguewave.hpp" + +#elif defined(_LIBCPP_VERSION) +// libc++ +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcpp.hpp" + +#elif defined(__GLIBCPP__) || defined(__GLIBCXX__) +// GNU libstdc++ 3 +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/libstdcpp3.hpp" + +#elif defined(__STL_CONFIG_H) +// generic SGI STL +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/sgi.hpp" + +#elif defined(__MSL_CPP__) +// MSL standard lib: +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/msl.hpp" + +#elif defined(__IBMCPP__) +// take the default VACPP std lib +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/vacpp.hpp" + +#elif defined(MSIPL_COMPILE_H) +// Modena C++ standard library +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/modena.hpp" + +#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER) +// Dinkumware Library (this has to appear after any possible replacement libraries): +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/dinkumware.hpp" + +#elif defined (BOOST_ASSERT_CONFIG) +// this must come last - generate an error if we don't +// recognise the library: +# error "Unknown standard library - please configure and report the results to boost.org" + +#endif + +#endif + +#if 0 +// +// This section allows dependency scanners to find all the files we *might* include: +// +# include "boost/config/stdlib/stlport.hpp" +# include "boost/config/stdlib/libcomo.hpp" +# include "boost/config/stdlib/roguewave.hpp" +# include "boost/config/stdlib/libcpp.hpp" +# include "boost/config/stdlib/libstdcpp3.hpp" +# include "boost/config/stdlib/sgi.hpp" +# include "boost/config/stdlib/msl.hpp" +# include "boost/config/stdlib/vacpp.hpp" +# include "boost/config/stdlib/modena.hpp" +# include "boost/config/stdlib/dinkumware.hpp" +#endif + diff --git a/ThirdParty/boost-Subset/boost/config/stdlib/dinkumware.hpp b/ThirdParty/boost-Subset/boost/config/stdlib/dinkumware.hpp new file mode 100644 index 0000000000..90c45c6c23 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/stdlib/dinkumware.hpp @@ -0,0 +1,189 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2001. +// (C) Copyright Peter Dimov 2001. +// (C) Copyright David Abrahams 2002. +// (C) Copyright Guillaume Melquiond 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Dinkumware standard library config: + +#if !defined(_YVALS) && !defined(_CPPLIB_VER) +#include +#if !defined(_YVALS) && !defined(_CPPLIB_VER) +#error This is not the Dinkumware lib! +#endif +#endif + + +#if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 306) + // full dinkumware 3.06 and above + // fully conforming provided the compiler supports it: +# if !(defined(_GLOBAL_USING) && (_GLOBAL_USING+0 > 0)) && !defined(__BORLANDC__) && !defined(_STD) && !(defined(__ICC) && (__ICC >= 700)) // can be defined in yvals.h +# define BOOST_NO_STDC_NAMESPACE +# endif +# if !(defined(_HAS_MEMBER_TEMPLATES_REBIND) && (_HAS_MEMBER_TEMPLATES_REBIND+0 > 0)) && !(defined(_MSC_VER) && (_MSC_VER > 1300)) && defined(BOOST_MSVC) +# define BOOST_NO_STD_ALLOCATOR +# endif +# define BOOST_HAS_PARTIAL_STD_ALLOCATOR +# if defined(BOOST_MSVC) && (BOOST_MSVC < 1300) + // if this lib version is set up for vc6 then there is no std::use_facet: +# define BOOST_NO_STD_USE_FACET +# define BOOST_HAS_TWO_ARG_USE_FACET + // C lib functions aren't in namespace std either: +# define BOOST_NO_STDC_NAMESPACE + // and nor is +# define BOOST_NO_EXCEPTION_STD_NAMESPACE +# endif +// There's no numeric_limits support unless _LONGLONG is defined: +# if !defined(_LONGLONG) && (_CPPLIB_VER <= 310) +# define BOOST_NO_MS_INT64_NUMERIC_LIMITS +# endif +// 3.06 appears to have (non-sgi versions of) & , +// and no at all +#else +# define BOOST_MSVC_STD_ITERATOR 1 +# define BOOST_NO_STD_ITERATOR +# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS +# define BOOST_NO_STD_ALLOCATOR +# define BOOST_NO_STDC_NAMESPACE +# define BOOST_NO_STD_USE_FACET +# define BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN +# define BOOST_HAS_MACRO_USE_FACET +# ifndef _CPPLIB_VER + // Updated Dinkum library defines this, and provides + // its own min and max definitions, as does MTA version. +# ifndef __MTA__ +# define BOOST_NO_STD_MIN_MAX +# endif +# define BOOST_NO_MS_INT64_NUMERIC_LIMITS +# endif +#endif + +// +// std extension namespace is stdext for vc7.1 and later, +// the same applies to other compilers that sit on top +// of vc7.1 (Intel and Comeau): +// +#if defined(_MSC_VER) && (_MSC_VER >= 1310) && !defined(__BORLANDC__) +# define BOOST_STD_EXTENSION_NAMESPACE stdext +#endif + + +#if (defined(_MSC_VER) && (_MSC_VER <= 1300) && !defined(__BORLANDC__)) || !defined(_CPPLIB_VER) || (_CPPLIB_VER < 306) + // if we're using a dinkum lib that's + // been configured for VC6/7 then there is + // no iterator traits (true even for icl) +# define BOOST_NO_STD_ITERATOR_TRAITS +#endif + +#if defined(__ICL) && (__ICL < 800) && defined(_CPPLIB_VER) && (_CPPLIB_VER <= 310) +// Intel C++ chokes over any non-trivial use of +// this may be an overly restrictive define, but regex fails without it: +# define BOOST_NO_STD_LOCALE +#endif + +// Fix for VC++ 8.0 on up ( I do not have a previous version to test ) +// or clang-cl. If exceptions are off you must manually include the +// header before including the header. Admittedly +// trying to use Boost libraries or the standard C++ libraries without +// exception support is not suggested but currently clang-cl ( v 3.4 ) +// does not support exceptions and must be compiled with exceptions off. +#if !_HAS_EXCEPTIONS && ((defined(BOOST_MSVC) && BOOST_MSVC >= 1400) || (defined(__clang__) && defined(_MSC_VER))) +#include +#endif +#include +#if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (!_HAS_NAMESPACE && defined(__ghs__)) ) && !defined(__TI_COMPILER_VERSION__) && !defined(__VISUALDSPVERSION__) +# define BOOST_NO_STD_TYPEINFO +#endif + +// C++0x headers implemented in 520 (as shipped by Microsoft) +// +#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 520 +# define BOOST_NO_CXX11_HDR_ARRAY +# define BOOST_NO_CXX11_HDR_CODECVT +# define BOOST_NO_CXX11_HDR_FORWARD_LIST +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_HDR_RANDOM +# define BOOST_NO_CXX11_HDR_REGEX +# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR +# define BOOST_NO_CXX11_HDR_UNORDERED_MAP +# define BOOST_NO_CXX11_HDR_UNORDERED_SET +# define BOOST_NO_CXX11_HDR_TUPLE +# define BOOST_NO_CXX11_HDR_TYPEINDEX +# define BOOST_NO_CXX11_HDR_FUNCTIONAL +# define BOOST_NO_CXX11_NUMERIC_LIMITS +# define BOOST_NO_CXX11_SMART_PTR +#endif + +#if ((!defined(_HAS_TR1_IMPORTS) || (_HAS_TR1_IMPORTS+0 == 0)) && !defined(BOOST_NO_CXX11_HDR_TUPLE)) \ + && (!defined(_CPPLIB_VER) || _CPPLIB_VER < 610) +# define BOOST_NO_CXX11_HDR_TUPLE +#endif + +// C++0x headers implemented in 540 (as shipped by Microsoft) +// +#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 540 +# define BOOST_NO_CXX11_HDR_TYPE_TRAITS +# define BOOST_NO_CXX11_HDR_CHRONO +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_RATIO +# define BOOST_NO_CXX11_HDR_THREAD +# define BOOST_NO_CXX11_ATOMIC_SMART_PTR +#endif + +// C++0x headers implemented in 610 (as shipped by Microsoft) +// +#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 610 +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_ALLOCATOR +// 540 has std::align but it is not a conforming implementation +# define BOOST_NO_CXX11_STD_ALIGN +#endif + +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus < 201402 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#elif !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif + +#if defined(BOOST_INTEL) && (BOOST_INTEL <= 1400) +// Intel's compiler can't handle this header yet: +# define BOOST_NO_CXX11_HDR_ATOMIC +#endif + + +// 520..610 have std::addressof, but it doesn't support functions +// +#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 650 +# define BOOST_NO_CXX11_ADDRESSOF +#endif + +// Bug specific to VC14, +// See https://connect.microsoft.com/VisualStudio/feedback/details/1348277/link-error-when-using-std-codecvt-utf8-utf16-char16-t +// and discussion here: http://blogs.msdn.com/b/vcblog/archive/2014/11/12/visual-studio-2015-preview-now-available.aspx?PageIndex=2 +#if _CPPLIB_VER == 650 +# define BOOST_NO_CXX11_HDR_CODECVT +#endif + +#ifdef _CPPLIB_VER +# define BOOST_DINKUMWARE_STDLIB _CPPLIB_VER +#else +# define BOOST_DINKUMWARE_STDLIB 1 +#endif + +#ifdef _CPPLIB_VER +# define BOOST_STDLIB "Dinkumware standard library version " BOOST_STRINGIZE(_CPPLIB_VER) +#else +# define BOOST_STDLIB "Dinkumware standard library version 1.x" +#endif diff --git a/ThirdParty/boost-Subset/boost/config/stdlib/libcomo.hpp b/ThirdParty/boost-Subset/boost/config/stdlib/libcomo.hpp new file mode 100644 index 0000000000..941498d076 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/stdlib/libcomo.hpp @@ -0,0 +1,83 @@ +// (C) Copyright John Maddock 2002 - 2003. +// (C) Copyright Jens Maurer 2002 - 2003. +// (C) Copyright Beman Dawes 2002 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Comeau STL: + +#if !defined(__LIBCOMO__) +# include +# if !defined(__LIBCOMO__) +# error "This is not the Comeau STL!" +# endif +#endif + +// +// std::streambuf is non-standard +// NOTE: versions of libcomo prior to beta28 have octal version numbering, +// e.g. version 25 is 21 (dec) +#if __LIBCOMO_VERSION__ <= 22 +# define BOOST_NO_STD_WSTREAMBUF +#endif + +#if (__LIBCOMO_VERSION__ <= 31) && defined(_WIN32) +#define BOOST_NO_SWPRINTF +#endif + +#if __LIBCOMO_VERSION__ >= 31 +# define BOOST_HAS_HASH +# define BOOST_HAS_SLIST +#endif + +// C++0x headers not yet implemented +// +# define BOOST_NO_CXX11_HDR_ARRAY +# define BOOST_NO_CXX11_HDR_CHRONO +# define BOOST_NO_CXX11_HDR_CODECVT +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_FORWARD_LIST +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_RANDOM +# define BOOST_NO_CXX11_HDR_RATIO +# define BOOST_NO_CXX11_HDR_REGEX +# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR +# define BOOST_NO_CXX11_HDR_THREAD +# define BOOST_NO_CXX11_HDR_TUPLE +# define BOOST_NO_CXX11_HDR_TYPE_TRAITS +# define BOOST_NO_CXX11_HDR_TYPEINDEX +# define BOOST_NO_CXX11_HDR_UNORDERED_MAP +# define BOOST_NO_CXX11_HDR_UNORDERED_SET +# define BOOST_NO_CXX11_NUMERIC_LIMITS +# define BOOST_NO_CXX11_ALLOCATOR +# define BOOST_NO_CXX11_ATOMIC_SMART_PTR +# define BOOST_NO_CXX11_SMART_PTR +# define BOOST_NO_CXX11_HDR_FUNCTIONAL +# define BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_STD_ALIGN +# define BOOST_NO_CXX11_ADDRESSOF + +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus < 201402 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#else +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif + +// +// Intrinsic type_traits support. +// The SGI STL has it's own __type_traits class, which +// has intrinsic compiler support with SGI's compilers. +// Whatever map SGI style type traits to boost equivalents: +// +#define BOOST_HAS_SGI_TYPE_TRAITS + +#define BOOST_STDLIB "Comeau standard library " BOOST_STRINGIZE(__LIBCOMO_VERSION__) diff --git a/ThirdParty/boost-Subset/boost/config/stdlib/libcpp.hpp b/ThirdParty/boost-Subset/boost/config/stdlib/libcpp.hpp new file mode 100644 index 0000000000..ab5d123544 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/stdlib/libcpp.hpp @@ -0,0 +1,80 @@ +// (C) Copyright Christopher Jefferson 2011. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// config for libc++ +// Might need more in here later. + +#if !defined(_LIBCPP_VERSION) +# include +# if !defined(_LIBCPP_VERSION) +# error "This is not libc++!" +# endif +#endif + +#define BOOST_STDLIB "libc++ version " BOOST_STRINGIZE(_LIBCPP_VERSION) + +#define BOOST_HAS_THREADS + +#ifdef _LIBCPP_HAS_NO_VARIADICS +# define BOOST_NO_CXX11_HDR_TUPLE +#endif + +// BOOST_NO_CXX11_ALLOCATOR should imply no support for the C++11 +// allocator model. The C++11 allocator model requires a conforming +// std::allocator_traits which is only possible with C++11 template +// aliases since members rebind_alloc and rebind_traits require it. +#if defined(_LIBCPP_HAS_NO_TEMPLATE_ALIASES) +# define BOOST_NO_CXX11_ALLOCATOR +#endif + +#if __cplusplus < 201103 +# define BOOST_NO_CXX11_HDR_ARRAY +# define BOOST_NO_CXX11_HDR_CODECVT +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_FORWARD_LIST +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_RANDOM +# define BOOST_NO_CXX11_HDR_RATIO +# define BOOST_NO_CXX11_HDR_REGEX +# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR +# define BOOST_NO_CXX11_HDR_THREAD +# define BOOST_NO_CXX11_HDR_TUPLE +# define BOOST_NO_CXX11_HDR_TYPEINDEX +# define BOOST_NO_CXX11_HDR_UNORDERED_MAP +# define BOOST_NO_CXX11_HDR_UNORDERED_SET +# define BOOST_NO_CXX11_NUMERIC_LIMITS +# define BOOST_NO_CXX11_ALLOCATOR +# define BOOST_NO_CXX11_SMART_PTR +# define BOOST_NO_CXX11_HDR_FUNCTIONAL +# define BOOST_NO_CXX11_STD_ALIGN +# define BOOST_NO_CXX11_ADDRESSOF +#endif + +// +// These appear to be unusable/incomplete so far: +// +# define BOOST_NO_CXX11_HDR_CHRONO +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_TYPE_TRAITS +# define BOOST_NO_CXX11_ATOMIC_SMART_PTR +# define BOOST_NO_CXX11_HDR_ATOMIC + +// libc++ uses a non-standard messages_base +#define BOOST_NO_STD_MESSAGES + +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus <= 201103 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#elif __cplusplus < 201402 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif + +// --- end --- diff --git a/ThirdParty/boost-Subset/boost/config/stdlib/libstdcpp3.hpp b/ThirdParty/boost-Subset/boost/config/stdlib/libstdcpp3.hpp new file mode 100644 index 0000000000..7d27b0cc0c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/stdlib/libstdcpp3.hpp @@ -0,0 +1,277 @@ +// (C) Copyright John Maddock 2001. +// (C) Copyright Jens Maurer 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// config for libstdc++ v3 +// not much to go in here: + +#define BOOST_GNU_STDLIB 1 + +#ifdef __GLIBCXX__ +#define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCXX__) +#else +#define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCPP__) +#endif + +#if !defined(_GLIBCPP_USE_WCHAR_T) && !defined(_GLIBCXX_USE_WCHAR_T) +# define BOOST_NO_CWCHAR +# define BOOST_NO_CWCTYPE +# define BOOST_NO_STD_WSTRING +# define BOOST_NO_STD_WSTREAMBUF +#endif + +#if defined(__osf__) && !defined(_REENTRANT) \ + && ( defined(_GLIBCXX_HAVE_GTHR_DEFAULT) || defined(_GLIBCPP_HAVE_GTHR_DEFAULT) ) +// GCC 3 on Tru64 forces the definition of _REENTRANT when any std lib header +// file is included, therefore for consistency we define it here as well. +# define _REENTRANT +#endif + +#ifdef __GLIBCXX__ // gcc 3.4 and greater: +# if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \ + || defined(_GLIBCXX__PTHREADS) \ + || defined(_GLIBCXX_HAS_GTHREADS) \ + || defined(_WIN32) \ + || defined(_AIX) \ + || defined(__HAIKU__) + // + // If the std lib has thread support turned on, then turn it on in Boost + // as well. We do this because some gcc-3.4 std lib headers define _REENTANT + // while others do not... + // +# define BOOST_HAS_THREADS +# else +# define BOOST_DISABLE_THREADS +# endif +#elif defined(__GLIBCPP__) \ + && !defined(_GLIBCPP_HAVE_GTHR_DEFAULT) \ + && !defined(_GLIBCPP__PTHREADS) + // disable thread support if the std lib was built single threaded: +# define BOOST_DISABLE_THREADS +#endif + +#if (defined(linux) || defined(__linux) || defined(__linux__)) && defined(__arm__) && defined(_GLIBCPP_HAVE_GTHR_DEFAULT) +// linux on arm apparently doesn't define _REENTRANT +// so just turn on threading support whenever the std lib is thread safe: +# define BOOST_HAS_THREADS +#endif + +#if !defined(_GLIBCPP_USE_LONG_LONG) \ + && !defined(_GLIBCXX_USE_LONG_LONG)\ + && defined(BOOST_HAS_LONG_LONG) +// May have been set by compiler/*.hpp, but "long long" without library +// support is useless. +# undef BOOST_HAS_LONG_LONG +#endif + +// Apple doesn't seem to reliably defined a *unix* macro +#if !defined(CYGWIN) && ( defined(__unix__) \ + || defined(__unix) \ + || defined(unix) \ + || defined(__APPLE__) \ + || defined(__APPLE) \ + || defined(APPLE)) +# include +#endif + +#if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0 +# define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx +# define BOOST_HAS_SLIST +# define BOOST_HAS_HASH +# define BOOST_SLIST_HEADER +# if !defined(__GNUC__) || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) +# define BOOST_HASH_SET_HEADER +# define BOOST_HASH_MAP_HEADER +# else +# define BOOST_HASH_SET_HEADER +# define BOOST_HASH_MAP_HEADER +# endif +#endif + +// +// Decide whether we have C++11 support turned on: +// +#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103) +# define BOOST_LIBSTDCXX11 +#endif +// +// Decide which version of libstdc++ we have, normally +// stdlibc++ C++0x support is detected via __GNUC__, __GNUC_MINOR__, and possibly +// __GNUC_PATCHLEVEL__ at the suggestion of Jonathan Wakely, one of the stdlibc++ +// developers. He also commented: +// +// "I'm not sure how useful __GLIBCXX__ is for your purposes, for instance in +// GCC 4.2.4 it is set to 20080519 but in GCC 4.3.0 it is set to 20080305. +// Although 4.3.0 was released earlier than 4.2.4, it has better C++0x support +// than any release in the 4.2 series." +// +// Another resource for understanding stdlibc++ features is: +// http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#manual.intro.status.standard.200x +// +// However, using the GCC version number fails when the compiler is clang since this +// only ever claims to emulate GCC-4.2, see https://svn.boost.org/trac/boost/ticket/7473 +// for a long discussion on this issue. What we can do though is use clang's __has_include +// to detect the presence of a C++11 header that was introduced with a specific GCC release. +// We still have to be careful though as many such headers were buggy and/or incomplete when +// first introduced, so we only check for headers that were fully featured from day 1, and then +// use that to infer the underlying GCC version: +// +#ifdef __clang__ + +#if __has_include() +# define BOOST_LIBSTDCXX_VERSION 50100 +#elif __has_include() +# define BOOST_LIBSTDCXX_VERSION 40900 +#elif __has_include() +# define BOOST_LIBSTDCXX_VERSION 40800 +#elif __has_include() +# define BOOST_LIBSTDCXX_VERSION 40700 +#elif __has_include() +# define BOOST_LIBSTDCXX_VERSION 40600 +#elif __has_include() +# define BOOST_LIBSTDCXX_VERSION 40500 +#elif __has_include() +# define BOOST_LIBSTDCXX_VERSION 40400 +#elif __has_include() +# define BOOST_LIBSTDCXX_VERSION 40300 +#endif +// +// GCC 4.8 and 9 add working versions of and respectively. +// However, we have no test for these as the headers were present but broken +// in early GCC versions. +// +#endif + +#if defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130) && (__cplusplus >= 201103L) +// +// Oracle Solaris compiler uses it's own verison of libstdc++ but doesn't +// set __GNUC__ +// +#define BOOST_LIBSTDCXX_VERSION 40800 +#endif + +#if !defined(BOOST_LIBSTDCXX_VERSION) +# define BOOST_LIBSTDCXX_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) +#endif + +// C++0x headers in GCC 4.3.0 and later +// +#if (BOOST_LIBSTDCXX_VERSION < 40300) || !defined(BOOST_LIBSTDCXX11) +# define BOOST_NO_CXX11_HDR_ARRAY +# define BOOST_NO_CXX11_HDR_TUPLE +# define BOOST_NO_CXX11_HDR_UNORDERED_MAP +# define BOOST_NO_CXX11_HDR_UNORDERED_SET +# define BOOST_NO_CXX11_HDR_FUNCTIONAL +#endif + +// C++0x headers in GCC 4.4.0 and later +// +#if (BOOST_LIBSTDCXX_VERSION < 40400) || !defined(BOOST_LIBSTDCXX11) +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_FORWARD_LIST +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_RATIO +# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR +# define BOOST_NO_CXX11_SMART_PTR +#else +# define BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG +# define BOOST_HAS_TR1_COMPLEX_OVERLOADS +#endif + +// C++0x features in GCC 4.5.0 and later +// +#if (BOOST_LIBSTDCXX_VERSION < 40500) || !defined(BOOST_LIBSTDCXX11) +# define BOOST_NO_CXX11_NUMERIC_LIMITS +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_RANDOM +#endif + +// C++0x features in GCC 4.6.0 and later +// +#if (BOOST_LIBSTDCXX_VERSION < 40600) || !defined(BOOST_LIBSTDCXX11) +# define BOOST_NO_CXX11_HDR_TYPEINDEX +# define BOOST_NO_CXX11_ADDRESSOF +#endif + +// C++0x features in GCC 4.7.0 and later +// +#if (BOOST_LIBSTDCXX_VERSION < 40700) || !defined(BOOST_LIBSTDCXX11) +// Note that although existed prior to 4.7, "steady_clock" is spelled "monotonic_clock" +// so 4.7.0 is the first truely conforming one. +# define BOOST_NO_CXX11_HDR_CHRONO +# define BOOST_NO_CXX11_ALLOCATOR +#endif +// C++0x features in GCC 4.8.0 and later +// +#if (BOOST_LIBSTDCXX_VERSION < 40800) || !defined(BOOST_LIBSTDCXX11) +// Note that although existed prior to gcc 4.8 it was largely unimplemented for many types: +# define BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_HDR_THREAD +#endif +// C++0x features in GCC 4.9.0 and later +// +#if (BOOST_LIBSTDCXX_VERSION < 40900) || !defined(BOOST_LIBSTDCXX11) +// Although is present and compilable against, the actual implementation is not functional +// even for the simplest patterns such as "\d" or "[0-9]". This is the case at least in gcc up to 4.8, inclusively. +# define BOOST_NO_CXX11_HDR_REGEX +#endif + +#if defined(__clang_major__) && ((__clang_major__ < 3) || ((__clang_major__ == 3) && (__clang_minor__ < 7))) +// As of clang-3.6, libstdc++ header throws up errors with clang: +# define BOOST_NO_CXX11_HDR_ATOMIC +#endif +// +// C++0x features in GCC 5.1 and later +// +#if (BOOST_LIBSTDCXX_VERSION < 50100) || !defined(BOOST_LIBSTDCXX11) +# define BOOST_NO_CXX11_HDR_TYPE_TRAITS +# define BOOST_NO_CXX11_HDR_CODECVT +# define BOOST_NO_CXX11_ATOMIC_SMART_PTR +# define BOOST_NO_CXX11_STD_ALIGN +#endif + +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus <= 201103 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#elif __cplusplus < 201402 || (BOOST_LIBSTDCXX_VERSION < 40900) || !defined(BOOST_LIBSTDCXX11) +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif + +// +// Headers not present on Solaris with the Oracle compiler: +#if defined(__SUNPRO_CC) +#define BOOST_NO_CXX11_HDR_FUTURE +#define BOOST_NO_CXX11_HDR_FORWARD_LIST +#define BOOST_NO_CXX11_HDR_ATOMIC +#endif + +#if (!defined(_GLIBCXX_HAS_GTHREADS) || !defined(_GLIBCXX_USE_C99_STDINT_TR1)) + // Headers not always available: +# ifndef BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# endif +# ifndef BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_MUTEX +# endif +# ifndef BOOST_NO_CXX11_HDR_THREAD +# define BOOST_NO_CXX11_HDR_THREAD +# endif +# ifndef BOOST_NO_CXX14_HDR_SHARED_MUTEX +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +# endif +#endif + +#if (!defined(_GTHREAD_USE_MUTEX_TIMEDLOCK) || (_GTHREAD_USE_MUTEX_TIMEDLOCK == 0)) && !defined(BOOST_NO_CXX11_HDR_MUTEX) +// Timed mutexes are not always available: +# define BOOST_NO_CXX11_HDR_MUTEX +#endif + +// --- end --- diff --git a/ThirdParty/boost-Subset/boost/config/stdlib/modena.hpp b/ThirdParty/boost-Subset/boost/config/stdlib/modena.hpp new file mode 100644 index 0000000000..7a85e0cd57 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/stdlib/modena.hpp @@ -0,0 +1,69 @@ +// (C) Copyright Jens Maurer 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Modena C++ standard library (comes with KAI C++) + +#if !defined(MSIPL_COMPILE_H) +# include +# if !defined(__MSIPL_COMPILE_H) +# error "This is not the Modena C++ library!" +# endif +#endif + +#ifndef MSIPL_NL_TYPES +#define BOOST_NO_STD_MESSAGES +#endif + +#ifndef MSIPL_WCHART +#define BOOST_NO_STD_WSTRING +#endif + +// C++0x headers not yet implemented +// +# define BOOST_NO_CXX11_HDR_ARRAY +# define BOOST_NO_CXX11_HDR_CHRONO +# define BOOST_NO_CXX11_HDR_CODECVT +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_FORWARD_LIST +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_RANDOM +# define BOOST_NO_CXX11_HDR_RATIO +# define BOOST_NO_CXX11_HDR_REGEX +# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR +# define BOOST_NO_CXX11_HDR_THREAD +# define BOOST_NO_CXX11_HDR_TUPLE +# define BOOST_NO_CXX11_HDR_TYPE_TRAITS +# define BOOST_NO_CXX11_HDR_TYPEINDEX +# define BOOST_NO_CXX11_HDR_UNORDERED_MAP +# define BOOST_NO_CXX11_HDR_UNORDERED_SET +# define BOOST_NO_CXX11_NUMERIC_LIMITS +# define BOOST_NO_CXX11_ALLOCATOR +# define BOOST_NO_CXX11_ATOMIC_SMART_PTR +# define BOOST_NO_CXX11_SMART_PTR +# define BOOST_NO_CXX11_HDR_FUNCTIONAL +# define BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_STD_ALIGN +# define BOOST_NO_CXX11_ADDRESSOF + +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus < 201402 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#else +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif + +#define BOOST_STDLIB "Modena C++ standard library" + + + + + diff --git a/ThirdParty/boost-Subset/boost/config/stdlib/msl.hpp b/ThirdParty/boost-Subset/boost/config/stdlib/msl.hpp new file mode 100644 index 0000000000..dd2775e10c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/stdlib/msl.hpp @@ -0,0 +1,88 @@ +// (C) Copyright John Maddock 2001. +// (C) Copyright Darin Adler 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Metrowerks standard library: + +#ifndef __MSL_CPP__ +# include +# ifndef __MSL_CPP__ +# error This is not the MSL standard library! +# endif +#endif + +#if __MSL_CPP__ >= 0x6000 // Pro 6 +# define BOOST_HAS_HASH +# define BOOST_STD_EXTENSION_NAMESPACE Metrowerks +#endif +#define BOOST_HAS_SLIST + +#if __MSL_CPP__ < 0x6209 +# define BOOST_NO_STD_MESSAGES +#endif + +// check C lib version for +#include + +#if defined(__MSL__) && (__MSL__ >= 0x5000) +# define BOOST_HAS_STDINT_H +# if !defined(__PALMOS_TRAPS__) +# define BOOST_HAS_UNISTD_H +# endif + // boilerplate code: +# include +#endif + +#if defined(_MWMT) || _MSL_THREADSAFE +# define BOOST_HAS_THREADS +#endif + +#ifdef _MSL_NO_EXPLICIT_FUNC_TEMPLATE_ARG +# define BOOST_NO_STD_USE_FACET +# define BOOST_HAS_TWO_ARG_USE_FACET +#endif + +// C++0x headers not yet implemented +// +# define BOOST_NO_CXX11_HDR_ARRAY +# define BOOST_NO_CXX11_HDR_CHRONO +# define BOOST_NO_CXX11_HDR_CODECVT +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_FORWARD_LIST +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_RANDOM +# define BOOST_NO_CXX11_HDR_RATIO +# define BOOST_NO_CXX11_HDR_REGEX +# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR +# define BOOST_NO_CXX11_HDR_THREAD +# define BOOST_NO_CXX11_HDR_TUPLE +# define BOOST_NO_CXX11_HDR_TYPE_TRAITS +# define BOOST_NO_CXX11_HDR_TYPEINDEX +# define BOOST_NO_CXX11_HDR_UNORDERED_MAP +# define BOOST_NO_CXX11_HDR_UNORDERED_SET +# define BOOST_NO_CXX11_NUMERIC_LIMITS +# define BOOST_NO_CXX11_ALLOCATOR +# define BOOST_NO_CXX11_ATOMIC_SMART_PTR +# define BOOST_NO_CXX11_SMART_PTR +# define BOOST_NO_CXX11_HDR_FUNCTIONAL +# define BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_STD_ALIGN +# define BOOST_NO_CXX11_ADDRESSOF + +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus < 201402 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#else +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif + +#define BOOST_STDLIB "Metrowerks Standard Library version " BOOST_STRINGIZE(__MSL_CPP__) diff --git a/ThirdParty/boost-Subset/boost/config/stdlib/roguewave.hpp b/ThirdParty/boost-Subset/boost/config/stdlib/roguewave.hpp new file mode 100644 index 0000000000..97a2b0b90b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/stdlib/roguewave.hpp @@ -0,0 +1,198 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2001. +// (C) Copyright David Abrahams 2003. +// (C) Copyright Boris Gubenko 2007. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Rogue Wave std lib: + +#define BOOST_RW_STDLIB 1 + +#if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER) +# include +# if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER) +# error This is not the Rogue Wave standard library +# endif +#endif +// +// figure out a consistent version number: +// +#ifndef _RWSTD_VER +# define BOOST_RWSTD_VER 0x010000 +#elif _RWSTD_VER < 0x010000 +# define BOOST_RWSTD_VER (_RWSTD_VER << 8) +#else +# define BOOST_RWSTD_VER _RWSTD_VER +#endif + +#ifndef _RWSTD_VER +# define BOOST_STDLIB "Rogue Wave standard library version (Unknown version)" +#elif _RWSTD_VER < 0x04010200 + # define BOOST_STDLIB "Rogue Wave standard library version " BOOST_STRINGIZE(_RWSTD_VER) +#else +# ifdef _RWSTD_VER_STR +# define BOOST_STDLIB "Apache STDCXX standard library version " _RWSTD_VER_STR +# else +# define BOOST_STDLIB "Apache STDCXX standard library version " BOOST_STRINGIZE(_RWSTD_VER) +# endif +#endif + +// +// Prior to version 2.2.0 the primary template for std::numeric_limits +// does not have compile time constants, even though specializations of that +// template do: +// +#if BOOST_RWSTD_VER < 0x020200 +# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +#endif + +// Sun CC 5.5 patch 113817-07 adds long long specialization, but does not change the +// library version number (http://sunsolve6.sun.com/search/document.do?assetkey=1-21-113817): +#if BOOST_RWSTD_VER <= 0x020101 && (!defined(__SUNPRO_CC) || (__SUNPRO_CC < 0x550)) +# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS +# endif + +// +// Borland version of numeric_limits lacks __int64 specialisation: +// +#ifdef __BORLANDC__ +# define BOOST_NO_MS_INT64_NUMERIC_LIMITS +#endif + +// +// No std::iterator if it can't figure out default template args: +// +#if defined(_RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || defined(RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || (BOOST_RWSTD_VER < 0x020000) +# define BOOST_NO_STD_ITERATOR +#endif + +// +// No iterator traits without partial specialization: +// +#if defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) || defined(RWSTD_NO_CLASS_PARTIAL_SPEC) +# define BOOST_NO_STD_ITERATOR_TRAITS +#endif + +// +// Prior to version 2.0, std::auto_ptr was buggy, and there were no +// new-style iostreams, and no conformant std::allocator: +// +#if (BOOST_RWSTD_VER < 0x020000) +# define BOOST_NO_AUTO_PTR +# define BOOST_NO_STRINGSTREAM +# define BOOST_NO_STD_ALLOCATOR +# define BOOST_NO_STD_LOCALE +#endif + +// +// No template iterator constructors without member template support: +// +#if defined(RWSTD_NO_MEMBER_TEMPLATES) || defined(_RWSTD_NO_MEMBER_TEMPLATES) +# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS +#endif + +// +// RW defines _RWSTD_ALLOCATOR if the allocator is conformant and in use +// (the or _HPACC_ part is a hack - the library seems to define _RWSTD_ALLOCATOR +// on HP aCC systems even though the allocator is in fact broken): +// +#if !defined(_RWSTD_ALLOCATOR) || (defined(__HP_aCC) && __HP_aCC <= 33100) +# define BOOST_NO_STD_ALLOCATOR +#endif + +// +// If we have a std::locale, we still may not have std::use_facet: +// +#if defined(_RWSTD_NO_TEMPLATE_ON_RETURN_TYPE) && !defined(BOOST_NO_STD_LOCALE) +# define BOOST_NO_STD_USE_FACET +# define BOOST_HAS_TWO_ARG_USE_FACET +#endif + +// +// There's no std::distance prior to version 2, or without +// partial specialization support: +// +#if (BOOST_RWSTD_VER < 0x020000) || defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) + #define BOOST_NO_STD_DISTANCE +#endif + +// +// Some versions of the rogue wave library don't have assignable +// OutputIterators: +// +#if BOOST_RWSTD_VER < 0x020100 +# define BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN +#endif + +// +// Disable BOOST_HAS_LONG_LONG when the library has no support for it. +// +#if !defined(_RWSTD_LONG_LONG) && defined(BOOST_HAS_LONG_LONG) +# undef BOOST_HAS_LONG_LONG +#endif + +// +// check that on HP-UX, the proper RW library is used +// +#if defined(__HP_aCC) && !defined(_HP_NAMESPACE_STD) +# error "Boost requires Standard RW library. Please compile and link with -AA" +#endif + +// +// Define macros specific to RW V2.2 on HP-UX +// +#if defined(__HP_aCC) && (BOOST_RWSTD_VER == 0x02020100) +# ifndef __HP_TC1_MAKE_PAIR +# define __HP_TC1_MAKE_PAIR +# endif +# ifndef _HP_INSTANTIATE_STD2_VL +# define _HP_INSTANTIATE_STD2_VL +# endif +#endif + +#if _RWSTD_VER < 0x05000000 +# define BOOST_NO_CXX11_HDR_ARRAY +#endif +// type_traits header is incomplete: +# define BOOST_NO_CXX11_HDR_TYPE_TRAITS +// +// C++0x headers not yet implemented +// +# define BOOST_NO_CXX11_HDR_CHRONO +# define BOOST_NO_CXX11_HDR_CODECVT +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_FORWARD_LIST +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_RANDOM +# define BOOST_NO_CXX11_HDR_RATIO +# define BOOST_NO_CXX11_HDR_REGEX +# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR +# define BOOST_NO_CXX11_HDR_THREAD +# define BOOST_NO_CXX11_HDR_TUPLE +# define BOOST_NO_CXX11_HDR_TYPEINDEX +# define BOOST_NO_CXX11_HDR_UNORDERED_MAP +# define BOOST_NO_CXX11_HDR_UNORDERED_SET +# define BOOST_NO_CXX11_NUMERIC_LIMITS +# define BOOST_NO_CXX11_ALLOCATOR +# define BOOST_NO_CXX11_ATOMIC_SMART_PTR +# define BOOST_NO_CXX11_SMART_PTR +# define BOOST_NO_CXX11_HDR_FUNCTIONAL +# define BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_STD_ALIGN +# define BOOST_NO_CXX11_ADDRESSOF + +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus < 201402 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#else +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif diff --git a/ThirdParty/boost-Subset/boost/config/stdlib/sgi.hpp b/ThirdParty/boost-Subset/boost/config/stdlib/sgi.hpp new file mode 100644 index 0000000000..c8052717ce --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/stdlib/sgi.hpp @@ -0,0 +1,158 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Darin Adler 2001. +// (C) Copyright Jens Maurer 2001 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// generic SGI STL: + +#if !defined(__STL_CONFIG_H) +# include +# if !defined(__STL_CONFIG_H) +# error "This is not the SGI STL!" +# endif +#endif + +// +// No std::iterator traits without partial specialisation: +// +#if !defined(__STL_CLASS_PARTIAL_SPECIALIZATION) +# define BOOST_NO_STD_ITERATOR_TRAITS +#endif + +// +// No std::stringstream with gcc < 3 +// +#if defined(__GNUC__) && (__GNUC__ < 3) && \ + ((__GNUC_MINOR__ < 95) || (__GNUC_MINOR__ == 96)) && \ + !defined(__STL_USE_NEW_IOSTREAMS) || \ + defined(__APPLE_CC__) + // Note that we only set this for GNU C++ prior to 2.95 since the + // latest patches for that release do contain a minimal + // If you are running a 2.95 release prior to 2.95.3 then this will need + // setting, but there is no way to detect that automatically (other + // than by running the configure script). + // Also, the unofficial GNU C++ 2.96 included in RedHat 7.1 doesn't + // have . +# define BOOST_NO_STRINGSTREAM +#endif + +// Apple doesn't seem to reliably defined a *unix* macro +#if !defined(CYGWIN) && ( defined(__unix__) \ + || defined(__unix) \ + || defined(unix) \ + || defined(__APPLE__) \ + || defined(__APPLE) \ + || defined(APPLE)) +# include +#endif + + +// +// Assume no std::locale without own iostreams (this may be an +// incorrect assumption in some cases): +// +#if !defined(__SGI_STL_OWN_IOSTREAMS) && !defined(__STL_USE_NEW_IOSTREAMS) +# define BOOST_NO_STD_LOCALE +#endif + +// +// Original native SGI streams have non-standard std::messages facet: +// +#if defined(__sgi) && (_COMPILER_VERSION <= 650) && !defined(__SGI_STL_OWN_IOSTREAMS) +# define BOOST_NO_STD_LOCALE +#endif + +// +// SGI's new iostreams have missing "const" in messages<>::open +// +#if defined(__sgi) && (_COMPILER_VERSION <= 740) && defined(__STL_USE_NEW_IOSTREAMS) +# define BOOST_NO_STD_MESSAGES +#endif + +// +// No template iterator constructors, or std::allocator +// without member templates: +// +#if !defined(__STL_MEMBER_TEMPLATES) +# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS +# define BOOST_NO_STD_ALLOCATOR +#endif + +// +// We always have SGI style hash_set, hash_map, and slist: +// +#define BOOST_HAS_HASH +#define BOOST_HAS_SLIST + +// +// If this is GNU libstdc++2, then no and no std::wstring: +// +#if (defined(__GNUC__) && (__GNUC__ < 3)) +# include +# if defined(__BASTRING__) +# define BOOST_NO_LIMITS +// Note: will provide compile-time constants +# undef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +# define BOOST_NO_STD_WSTRING +# endif +#endif + +// +// There is no standard iterator unless we have namespace support: +// +#if !defined(__STL_USE_NAMESPACES) +# define BOOST_NO_STD_ITERATOR +#endif + +// +// Intrinsic type_traits support. +// The SGI STL has it's own __type_traits class, which +// has intrinsic compiler support with SGI's compilers. +// Whatever map SGI style type traits to boost equivalents: +// +#define BOOST_HAS_SGI_TYPE_TRAITS + +// C++0x headers not yet implemented +// +# define BOOST_NO_CXX11_HDR_ARRAY +# define BOOST_NO_CXX11_HDR_CHRONO +# define BOOST_NO_CXX11_HDR_CODECVT +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_FORWARD_LIST +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_RANDOM +# define BOOST_NO_CXX11_HDR_RATIO +# define BOOST_NO_CXX11_HDR_REGEX +# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR +# define BOOST_NO_CXX11_HDR_THREAD +# define BOOST_NO_CXX11_HDR_TUPLE +# define BOOST_NO_CXX11_HDR_TYPE_TRAITS +# define BOOST_NO_CXX11_HDR_TYPEINDEX +# define BOOST_NO_CXX11_HDR_UNORDERED_MAP +# define BOOST_NO_CXX11_HDR_UNORDERED_SET +# define BOOST_NO_CXX11_NUMERIC_LIMITS +# define BOOST_NO_CXX11_ALLOCATOR +# define BOOST_NO_CXX11_ATOMIC_SMART_PTR +# define BOOST_NO_CXX11_SMART_PTR +# define BOOST_NO_CXX11_HDR_FUNCTIONAL +# define BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_STD_ALIGN +# define BOOST_NO_CXX11_ADDRESSOF + +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus < 201402 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#else +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif + +#define BOOST_STDLIB "SGI standard library" \ No newline at end of file diff --git a/ThirdParty/boost-Subset/boost/config/stdlib/stlport.hpp b/ThirdParty/boost-Subset/boost/config/stdlib/stlport.hpp new file mode 100644 index 0000000000..bbc4176c90 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/stdlib/stlport.hpp @@ -0,0 +1,248 @@ +// (C) Copyright John Maddock 2001 - 2002. +// (C) Copyright Darin Adler 2001. +// (C) Copyright Jens Maurer 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// STLPort standard library config: + +#if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) +# include +# if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) +# error "This is not STLPort!" +# endif +#endif + +// Apple doesn't seem to reliably defined a *unix* macro +#if !defined(CYGWIN) && ( defined(__unix__) \ + || defined(__unix) \ + || defined(unix) \ + || defined(__APPLE__) \ + || defined(__APPLE) \ + || defined(APPLE)) +# include +#endif + +// +// __STL_STATIC_CONST_INIT_BUG implies BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +// for versions prior to 4.1(beta) +// +#if (defined(__STL_STATIC_CONST_INIT_BUG) || defined(_STLP_STATIC_CONST_INIT_BUG)) && (__SGI_STL_PORT <= 0x400) +# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +#endif + +// +// If STLport thinks that there is no partial specialisation, then there is no +// std::iterator traits: +// +#if !(defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) || defined(__STL_CLASS_PARTIAL_SPECIALIZATION)) +# define BOOST_NO_STD_ITERATOR_TRAITS +#endif + +// +// No new style iostreams on GCC without STLport's iostreams enabled: +// +#if (defined(__GNUC__) && (__GNUC__ < 3)) && !(defined(__SGI_STL_OWN_IOSTREAMS) || defined(_STLP_OWN_IOSTREAMS)) +# define BOOST_NO_STRINGSTREAM +#endif + +// +// No new iostreams implies no std::locale, and no std::stringstream: +// +#if defined(__STL_NO_IOSTREAMS) || defined(__STL_NO_NEW_IOSTREAMS) || defined(_STLP_NO_IOSTREAMS) || defined(_STLP_NO_NEW_IOSTREAMS) +# define BOOST_NO_STD_LOCALE +# define BOOST_NO_STRINGSTREAM +#endif + +// +// If the streams are not native, and we have a "using ::x" compiler bug +// then the io stream facets are not available in namespace std:: +// +#ifdef _STLPORT_VERSION +# if !(_STLPORT_VERSION >= 0x500) && !defined(_STLP_OWN_IOSTREAMS) && defined(_STLP_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__) +# define BOOST_NO_STD_LOCALE +# endif +#else +# if !defined(__SGI_STL_OWN_IOSTREAMS) && defined(__STL_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__) +# define BOOST_NO_STD_LOCALE +# endif +#endif + +#if defined(_STLPORT_VERSION) && (_STLPORT_VERSION >= 0x520) +# define BOOST_HAS_TR1_UNORDERED_SET +# define BOOST_HAS_TR1_UNORDERED_MAP +#endif +// +// Without member template support enabled, their are no template +// iterate constructors, and no std::allocator: +// +#if !(defined(__STL_MEMBER_TEMPLATES) || defined(_STLP_MEMBER_TEMPLATES)) +# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS +# define BOOST_NO_STD_ALLOCATOR +#endif +// +// however we always have at least a partial allocator: +// +#define BOOST_HAS_PARTIAL_STD_ALLOCATOR + +#if !defined(_STLP_MEMBER_TEMPLATE_CLASSES) || defined(_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE) +# define BOOST_NO_STD_ALLOCATOR +#endif + +#if defined(_STLP_NO_MEMBER_TEMPLATE_KEYWORD) && defined(BOOST_MSVC) && (BOOST_MSVC <= 1300) +# define BOOST_NO_STD_ALLOCATOR +#endif + +// +// If STLport thinks there is no wchar_t at all, then we have to disable +// the support for the relevant specilazations of std:: templates. +// +#if !defined(_STLP_HAS_WCHAR_T) && !defined(_STLP_WCHAR_T_IS_USHORT) +# ifndef BOOST_NO_STD_WSTRING +# define BOOST_NO_STD_WSTRING +# endif +# ifndef BOOST_NO_STD_WSTREAMBUF +# define BOOST_NO_STD_WSTREAMBUF +# endif +#endif + +// +// We always have SGI style hash_set, hash_map, and slist: +// +#ifndef _STLP_NO_EXTENSIONS +#define BOOST_HAS_HASH +#define BOOST_HAS_SLIST +#endif + +// +// STLport does a good job of importing names into namespace std::, +// but doesn't always get them all, define BOOST_NO_STDC_NAMESPACE, since our +// workaround does not conflict with STLports: +// +// +// Harold Howe says: +// Borland switched to STLport in BCB6. Defining BOOST_NO_STDC_NAMESPACE with +// BCB6 does cause problems. If we detect C++ Builder, then don't define +// BOOST_NO_STDC_NAMESPACE +// +#if !defined(__BORLANDC__) && !defined(__DMC__) +// +// If STLport is using it's own namespace, and the real names are in +// the global namespace, then we duplicate STLport's using declarations +// (by defining BOOST_NO_STDC_NAMESPACE), we do this because STLport doesn't +// necessarily import all the names we need into namespace std:: +// +# if (defined(__STL_IMPORT_VENDOR_CSTD) \ + || defined(__STL_USE_OWN_NAMESPACE) \ + || defined(_STLP_IMPORT_VENDOR_CSTD) \ + || defined(_STLP_USE_OWN_NAMESPACE)) \ + && (defined(__STL_VENDOR_GLOBAL_CSTD) || defined (_STLP_VENDOR_GLOBAL_CSTD)) +# define BOOST_NO_STDC_NAMESPACE +# define BOOST_NO_EXCEPTION_STD_NAMESPACE +# endif +#elif defined(__BORLANDC__) && __BORLANDC__ < 0x560 +// STLport doesn't import std::abs correctly: +#include +namespace std { using ::abs; } +// and strcmp/strcpy don't get imported either ('cos they are macros) +#include +#ifdef strcpy +# undef strcpy +#endif +#ifdef strcmp +# undef strcmp +#endif +#ifdef _STLP_VENDOR_CSTD +namespace std{ using _STLP_VENDOR_CSTD::strcmp; using _STLP_VENDOR_CSTD::strcpy; } +#endif +#endif + +// +// std::use_facet may be non-standard, uses a class instead: +// +#if defined(__STL_NO_EXPLICIT_FUNCTION_TMPL_ARGS) || defined(_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS) +# define BOOST_NO_STD_USE_FACET +# define BOOST_HAS_STLP_USE_FACET +#endif + +// +// If STLport thinks there are no wide functions, etc. is not working; but +// only if BOOST_NO_STDC_NAMESPACE is not defined (if it is then we do the import +// into std:: ourselves). +// +#if defined(_STLP_NO_NATIVE_WIDE_FUNCTIONS) && !defined(BOOST_NO_STDC_NAMESPACE) +# define BOOST_NO_CWCHAR +# define BOOST_NO_CWCTYPE +#endif + +// +// If STLport for some reason was configured so that it thinks that wchar_t +// is not an intrinsic type, then we have to disable the support for it as +// well (we would be missing required specializations otherwise). +// +#if !defined( _STLP_HAS_WCHAR_T) || defined(_STLP_WCHAR_T_IS_USHORT) +# undef BOOST_NO_INTRINSIC_WCHAR_T +# define BOOST_NO_INTRINSIC_WCHAR_T +#endif + +// +// Borland ships a version of STLport with C++ Builder 6 that lacks +// hashtables and the like: +// +#if defined(__BORLANDC__) && (__BORLANDC__ == 0x560) +# undef BOOST_HAS_HASH +#endif + +// +// gcc-2.95.3/STLPort does not like the using declarations we use to get ADL with std::min/max +// +#if defined(__GNUC__) && (__GNUC__ < 3) +# include // for std::min and std::max +# define BOOST_USING_STD_MIN() ((void)0) +# define BOOST_USING_STD_MAX() ((void)0) +namespace boost { using std::min; using std::max; } +#endif + +// C++0x headers not yet implemented +// +# define BOOST_NO_CXX11_HDR_ARRAY +# define BOOST_NO_CXX11_HDR_CHRONO +# define BOOST_NO_CXX11_HDR_CODECVT +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_FORWARD_LIST +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_RANDOM +# define BOOST_NO_CXX11_HDR_RATIO +# define BOOST_NO_CXX11_HDR_REGEX +# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR +# define BOOST_NO_CXX11_HDR_THREAD +# define BOOST_NO_CXX11_HDR_TUPLE +# define BOOST_NO_CXX11_HDR_TYPE_TRAITS +# define BOOST_NO_CXX11_HDR_TYPEINDEX +# define BOOST_NO_CXX11_HDR_UNORDERED_MAP +# define BOOST_NO_CXX11_HDR_UNORDERED_SET +# define BOOST_NO_CXX11_NUMERIC_LIMITS +# define BOOST_NO_CXX11_ALLOCATOR +# define BOOST_NO_CXX11_ATOMIC_SMART_PTR +# define BOOST_NO_CXX11_SMART_PTR +# define BOOST_NO_CXX11_HDR_FUNCTIONAL +# define BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_STD_ALIGN +# define BOOST_NO_CXX11_ADDRESSOF + +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus < 201402 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#else +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif + +#define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT) diff --git a/ThirdParty/boost-Subset/boost/config/stdlib/vacpp.hpp b/ThirdParty/boost-Subset/boost/config/stdlib/vacpp.hpp new file mode 100644 index 0000000000..4ccd0d2466 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/stdlib/vacpp.hpp @@ -0,0 +1,64 @@ +// (C) Copyright John Maddock 2001 - 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +#if __IBMCPP__ <= 501 +# define BOOST_NO_STD_ALLOCATOR +#endif + +#define BOOST_HAS_MACRO_USE_FACET +#define BOOST_NO_STD_MESSAGES + +// Apple doesn't seem to reliably defined a *unix* macro +#if !defined(CYGWIN) && ( defined(__unix__) \ + || defined(__unix) \ + || defined(unix) \ + || defined(__APPLE__) \ + || defined(__APPLE) \ + || defined(APPLE)) +# include +#endif + +// C++0x headers not yet implemented +// +# define BOOST_NO_CXX11_HDR_ARRAY +# define BOOST_NO_CXX11_HDR_CHRONO +# define BOOST_NO_CXX11_HDR_CODECVT +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_FORWARD_LIST +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_RANDOM +# define BOOST_NO_CXX11_HDR_RATIO +# define BOOST_NO_CXX11_HDR_REGEX +# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR +# define BOOST_NO_CXX11_HDR_THREAD +# define BOOST_NO_CXX11_HDR_TUPLE +# define BOOST_NO_CXX11_HDR_TYPE_TRAITS +# define BOOST_NO_CXX11_HDR_TYPEINDEX +# define BOOST_NO_CXX11_HDR_UNORDERED_MAP +# define BOOST_NO_CXX11_HDR_UNORDERED_SET +# define BOOST_NO_CXX11_NUMERIC_LIMITS +# define BOOST_NO_CXX11_ALLOCATOR +# define BOOST_NO_CXX11_ATOMIC_SMART_PTR +# define BOOST_NO_CXX11_SMART_PTR +# define BOOST_NO_CXX11_HDR_FUNCTIONAL +# define BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_STD_ALIGN +# define BOOST_NO_CXX11_ADDRESSOF + +#if defined(__has_include) +#if !__has_include() +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#elif __cplusplus < 201402 +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#else +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif + +#define BOOST_STDLIB "Visual Age default standard library" diff --git a/ThirdParty/boost-Subset/boost/config/suffix.hpp b/ThirdParty/boost-Subset/boost/config/suffix.hpp new file mode 100644 index 0000000000..c0ba333918 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/suffix.hpp @@ -0,0 +1,995 @@ +// Boost config.hpp configuration header file ------------------------------// +// boostinspect:ndprecated_macros -- tell the inspect tool to ignore this file + +// Copyright (c) 2001-2003 John Maddock +// Copyright (c) 2001 Darin Adler +// Copyright (c) 2001 Peter Dimov +// Copyright (c) 2002 Bill Kempf +// Copyright (c) 2002 Jens Maurer +// Copyright (c) 2002-2003 David Abrahams +// Copyright (c) 2003 Gennaro Prota +// Copyright (c) 2003 Eric Friedman +// Copyright (c) 2010 Eric Jourdanneau, Joel Falcou +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for most recent version. + +// Boost config.hpp policy and rationale documentation has been moved to +// http://www.boost.org/libs/config/ +// +// This file is intended to be stable, and relatively unchanging. +// It should contain boilerplate code only - no compiler specific +// code unless it is unavoidable - no changes unless unavoidable. + +#ifndef BOOST_CONFIG_SUFFIX_HPP +#define BOOST_CONFIG_SUFFIX_HPP + +#if defined(__GNUC__) && (__GNUC__ >= 4) +// +// Some GCC-4.x versions issue warnings even when __extension__ is used, +// so use this as a workaround: +// +#pragma GCC system_header +#endif + +// +// ensure that visibility macros are always defined, thus symplifying use +// +#ifndef BOOST_SYMBOL_EXPORT +# define BOOST_SYMBOL_EXPORT +#endif +#ifndef BOOST_SYMBOL_IMPORT +# define BOOST_SYMBOL_IMPORT +#endif +#ifndef BOOST_SYMBOL_VISIBLE +# define BOOST_SYMBOL_VISIBLE +#endif + +// +// look for long long by looking for the appropriate macros in . +// Note that we use limits.h rather than climits for maximal portability, +// remember that since these just declare a bunch of macros, there should be +// no namespace issues from this. +// +#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG) \ + && !defined(BOOST_MSVC) && !defined(__BORLANDC__) +# include +# if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX)) +# define BOOST_HAS_LONG_LONG +# else +# define BOOST_NO_LONG_LONG +# endif +#endif + +// GCC 3.x will clean up all of those nasty macro definitions that +// BOOST_NO_CTYPE_FUNCTIONS is intended to help work around, so undefine +// it under GCC 3.x. +#if defined(__GNUC__) && (__GNUC__ >= 3) && defined(BOOST_NO_CTYPE_FUNCTIONS) +# undef BOOST_NO_CTYPE_FUNCTIONS +#endif + +// +// Assume any extensions are in namespace std:: unless stated otherwise: +// +# ifndef BOOST_STD_EXTENSION_NAMESPACE +# define BOOST_STD_EXTENSION_NAMESPACE std +# endif + +// +// If cv-qualified specializations are not allowed, then neither are cv-void ones: +// +# if defined(BOOST_NO_CV_SPECIALIZATIONS) \ + && !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS) +# define BOOST_NO_CV_VOID_SPECIALIZATIONS +# endif + +// +// If there is no numeric_limits template, then it can't have any compile time +// constants either! +// +# if defined(BOOST_NO_LIMITS) \ + && !defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) +# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +# define BOOST_NO_MS_INT64_NUMERIC_LIMITS +# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS +# endif + +// +// if there is no long long then there is no specialisation +// for numeric_limits either: +// +#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS) +# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS +#endif + +// +// if there is no __int64 then there is no specialisation +// for numeric_limits<__int64> either: +// +#if !defined(BOOST_HAS_MS_INT64) && !defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS) +# define BOOST_NO_MS_INT64_NUMERIC_LIMITS +#endif + +// +// if member templates are supported then so is the +// VC6 subset of member templates: +// +# if !defined(BOOST_NO_MEMBER_TEMPLATES) \ + && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) +# define BOOST_MSVC6_MEMBER_TEMPLATES +# endif + +// +// Without partial specialization, can't test for partial specialisation bugs: +// +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG) +# define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG +# endif + +// +// Without partial specialization, we can't have array-type partial specialisations: +// +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) +# define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS +# endif + +// +// Without partial specialization, std::iterator_traits can't work: +// +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_NO_STD_ITERATOR_TRAITS) +# define BOOST_NO_STD_ITERATOR_TRAITS +# endif + +// +// Without partial specialization, partial +// specialization with default args won't work either: +// +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) +# define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS +# endif + +// +// Without member template support, we can't have template constructors +// in the standard library either: +// +# if defined(BOOST_NO_MEMBER_TEMPLATES) \ + && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \ + && !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS) +# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS +# endif + +// +// Without member template support, we can't have a conforming +// std::allocator template either: +// +# if defined(BOOST_NO_MEMBER_TEMPLATES) \ + && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \ + && !defined(BOOST_NO_STD_ALLOCATOR) +# define BOOST_NO_STD_ALLOCATOR +# endif + +// +// without ADL support then using declarations will break ADL as well: +// +#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) +# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +#endif + +// +// Without typeid support we have no dynamic RTTI either: +// +#if defined(BOOST_NO_TYPEID) && !defined(BOOST_NO_RTTI) +# define BOOST_NO_RTTI +#endif + +// +// If we have a standard allocator, then we have a partial one as well: +// +#if !defined(BOOST_NO_STD_ALLOCATOR) +# define BOOST_HAS_PARTIAL_STD_ALLOCATOR +#endif + +// +// We can't have a working std::use_facet if there is no std::locale: +// +# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_USE_FACET) +# define BOOST_NO_STD_USE_FACET +# endif + +// +// We can't have a std::messages facet if there is no std::locale: +// +# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_MESSAGES) +# define BOOST_NO_STD_MESSAGES +# endif + +// +// We can't have a working std::wstreambuf if there is no std::locale: +// +# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_WSTREAMBUF) +# define BOOST_NO_STD_WSTREAMBUF +# endif + +// +// We can't have a if there is no : +// +# if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_CWCTYPE) +# define BOOST_NO_CWCTYPE +# endif + +// +// We can't have a swprintf if there is no : +// +# if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_SWPRINTF) +# define BOOST_NO_SWPRINTF +# endif + +// +// If Win32 support is turned off, then we must turn off +// threading support also, unless there is some other +// thread API enabled: +// +#if defined(BOOST_DISABLE_WIN32) && defined(_WIN32) \ + && !defined(BOOST_DISABLE_THREADS) && !defined(BOOST_HAS_PTHREADS) +# define BOOST_DISABLE_THREADS +#endif + +// +// Turn on threading support if the compiler thinks that it's in +// multithreaded mode. We put this here because there are only a +// limited number of macros that identify this (if there's any missing +// from here then add to the appropriate compiler section): +// +#if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \ + || defined(_PTHREADS) || defined(__APPLE__) || defined(__DragonFly__)) \ + && !defined(BOOST_HAS_THREADS) +# define BOOST_HAS_THREADS +#endif + +// +// Turn threading support off if BOOST_DISABLE_THREADS is defined: +// +#if defined(BOOST_DISABLE_THREADS) && defined(BOOST_HAS_THREADS) +# undef BOOST_HAS_THREADS +#endif + +// +// Turn threading support off if we don't recognise the threading API: +// +#if defined(BOOST_HAS_THREADS) && !defined(BOOST_HAS_PTHREADS)\ + && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_BETHREADS)\ + && !defined(BOOST_HAS_MPTASKS) +# undef BOOST_HAS_THREADS +#endif + +// +// Turn threading detail macros off if we don't (want to) use threading +// +#ifndef BOOST_HAS_THREADS +# undef BOOST_HAS_PTHREADS +# undef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# undef BOOST_HAS_PTHREAD_YIELD +# undef BOOST_HAS_PTHREAD_DELAY_NP +# undef BOOST_HAS_WINTHREADS +# undef BOOST_HAS_BETHREADS +# undef BOOST_HAS_MPTASKS +#endif + +// +// If the compiler claims to be C99 conformant, then it had better +// have a : +// +# if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901) +# define BOOST_HAS_STDINT_H +# ifndef BOOST_HAS_LOG1P +# define BOOST_HAS_LOG1P +# endif +# ifndef BOOST_HAS_EXPM1 +# define BOOST_HAS_EXPM1 +# endif +# endif + +// +// Define BOOST_NO_SLIST and BOOST_NO_HASH if required. +// Note that this is for backwards compatibility only. +// +# if !defined(BOOST_HAS_SLIST) && !defined(BOOST_NO_SLIST) +# define BOOST_NO_SLIST +# endif + +# if !defined(BOOST_HAS_HASH) && !defined(BOOST_NO_HASH) +# define BOOST_NO_HASH +# endif + +// +// Set BOOST_SLIST_HEADER if not set already: +// +#if defined(BOOST_HAS_SLIST) && !defined(BOOST_SLIST_HEADER) +# define BOOST_SLIST_HEADER +#endif + +// +// Set BOOST_HASH_SET_HEADER if not set already: +// +#if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_SET_HEADER) +# define BOOST_HASH_SET_HEADER +#endif + +// +// Set BOOST_HASH_MAP_HEADER if not set already: +// +#if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_MAP_HEADER) +# define BOOST_HASH_MAP_HEADER +#endif + +// BOOST_HAS_ABI_HEADERS +// This macro gets set if we have headers that fix the ABI, +// and prevent ODR violations when linking to external libraries: +#if defined(BOOST_ABI_PREFIX) && defined(BOOST_ABI_SUFFIX) && !defined(BOOST_HAS_ABI_HEADERS) +# define BOOST_HAS_ABI_HEADERS +#endif + +#if defined(BOOST_HAS_ABI_HEADERS) && defined(BOOST_DISABLE_ABI_HEADERS) +# undef BOOST_HAS_ABI_HEADERS +#endif + +// BOOST_NO_STDC_NAMESPACE workaround --------------------------------------// +// Because std::size_t usage is so common, even in boost headers which do not +// otherwise use the C library, the workaround is included here so +// that ugly workaround code need not appear in many other boost headers. +// NOTE WELL: This is a workaround for non-conforming compilers; +// must still be #included in the usual places so that inclusion +// works as expected with standard conforming compilers. The resulting +// double inclusion of is harmless. + +# if defined(BOOST_NO_STDC_NAMESPACE) && defined(__cplusplus) +# include + namespace std { using ::ptrdiff_t; using ::size_t; } +# endif + +// Workaround for the unfortunate min/max macros defined by some platform headers + +#define BOOST_PREVENT_MACRO_SUBSTITUTION + +#ifndef BOOST_USING_STD_MIN +# define BOOST_USING_STD_MIN() using std::min +#endif + +#ifndef BOOST_USING_STD_MAX +# define BOOST_USING_STD_MAX() using std::max +#endif + +// BOOST_NO_STD_MIN_MAX workaround -----------------------------------------// + +# if defined(BOOST_NO_STD_MIN_MAX) && defined(__cplusplus) + +namespace std { + template + inline const _Tp& min BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) { + return __b < __a ? __b : __a; + } + template + inline const _Tp& max BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) { + return __a < __b ? __b : __a; + } +} + +# endif + +// BOOST_STATIC_CONSTANT workaround --------------------------------------- // +// On compilers which don't allow in-class initialization of static integral +// constant members, we must use enums as a workaround if we want the constants +// to be available at compile-time. This macro gives us a convenient way to +// declare such constants. + +# ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION +# define BOOST_STATIC_CONSTANT(type, assignment) enum { assignment } +# else +# define BOOST_STATIC_CONSTANT(type, assignment) static const type assignment +# endif + +// BOOST_USE_FACET / HAS_FACET workaround ----------------------------------// +// When the standard library does not have a conforming std::use_facet there +// are various workarounds available, but they differ from library to library. +// The same problem occurs with has_facet. +// These macros provide a consistent way to access a locale's facets. +// Usage: +// replace +// std::use_facet(loc); +// with +// BOOST_USE_FACET(Type, loc); +// Note do not add a std:: prefix to the front of BOOST_USE_FACET! +// Use for BOOST_HAS_FACET is analogous. + +#if defined(BOOST_NO_STD_USE_FACET) +# ifdef BOOST_HAS_TWO_ARG_USE_FACET +# define BOOST_USE_FACET(Type, loc) std::use_facet(loc, static_cast(0)) +# define BOOST_HAS_FACET(Type, loc) std::has_facet(loc, static_cast(0)) +# elif defined(BOOST_HAS_MACRO_USE_FACET) +# define BOOST_USE_FACET(Type, loc) std::_USE(loc, Type) +# define BOOST_HAS_FACET(Type, loc) std::_HAS(loc, Type) +# elif defined(BOOST_HAS_STLP_USE_FACET) +# define BOOST_USE_FACET(Type, loc) (*std::_Use_facet(loc)) +# define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc) +# endif +#else +# define BOOST_USE_FACET(Type, loc) std::use_facet< Type >(loc) +# define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc) +#endif + +// BOOST_NESTED_TEMPLATE workaround ------------------------------------------// +// Member templates are supported by some compilers even though they can't use +// the A::template member syntax, as a workaround replace: +// +// typedef typename A::template rebind binder; +// +// with: +// +// typedef typename A::BOOST_NESTED_TEMPLATE rebind binder; + +#ifndef BOOST_NO_MEMBER_TEMPLATE_KEYWORD +# define BOOST_NESTED_TEMPLATE template +#else +# define BOOST_NESTED_TEMPLATE +#endif + +// BOOST_UNREACHABLE_RETURN(x) workaround -------------------------------------// +// Normally evaluates to nothing, unless BOOST_NO_UNREACHABLE_RETURN_DETECTION +// is defined, in which case it evaluates to return x; Use when you have a return +// statement that can never be reached. + +#ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION +# define BOOST_UNREACHABLE_RETURN(x) return x; +#else +# define BOOST_UNREACHABLE_RETURN(x) +#endif + +// BOOST_DEDUCED_TYPENAME workaround ------------------------------------------// +// +// Some compilers don't support the use of `typename' for dependent +// types in deduced contexts, e.g. +// +// template void f(T, typename T::type); +// ^^^^^^^^ +// Replace these declarations with: +// +// template void f(T, BOOST_DEDUCED_TYPENAME T::type); + +#ifndef BOOST_NO_DEDUCED_TYPENAME +# define BOOST_DEDUCED_TYPENAME typename +#else +# define BOOST_DEDUCED_TYPENAME +#endif + +#ifndef BOOST_NO_TYPENAME_WITH_CTOR +# define BOOST_CTOR_TYPENAME typename +#else +# define BOOST_CTOR_TYPENAME +#endif + +// long long workaround ------------------------------------------// +// On gcc (and maybe other compilers?) long long is alway supported +// but it's use may generate either warnings (with -ansi), or errors +// (with -pedantic -ansi) unless it's use is prefixed by __extension__ +// +#if defined(BOOST_HAS_LONG_LONG) && defined(__cplusplus) +namespace boost{ +# ifdef __GNUC__ + __extension__ typedef long long long_long_type; + __extension__ typedef unsigned long long ulong_long_type; +# else + typedef long long long_long_type; + typedef unsigned long long ulong_long_type; +# endif +} +#endif +// same again for __int128: +#if defined(BOOST_HAS_INT128) && defined(__cplusplus) +namespace boost{ +# ifdef __GNUC__ + __extension__ typedef __int128 int128_type; + __extension__ typedef unsigned __int128 uint128_type; +# else + typedef __int128 int128_type; + typedef unsigned __int128 uint128_type; +# endif +} +#endif + +// BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------// + +// These macros are obsolete. Port away and remove. + +# define BOOST_EXPLICIT_TEMPLATE_TYPE(t) +# define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) +# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) +# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) + +# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t) +# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) +# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) +# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) + +// When BOOST_NO_STD_TYPEINFO is defined, we can just import +// the global definition into std namespace: +#if defined(BOOST_NO_STD_TYPEINFO) && defined(__cplusplus) +#include +namespace std{ using ::type_info; } +#endif + +// ---------------------------------------------------------------------------// + +// +// Helper macro BOOST_STRINGIZE: +// Converts the parameter X to a string after macro replacement +// on X has been performed. +// +#define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X) +#define BOOST_DO_STRINGIZE(X) #X + +// +// Helper macro BOOST_JOIN: +// The following piece of macro magic joins the two +// arguments together, even when one of the arguments is +// itself a macro (see 16.3.1 in C++ standard). The key +// is that macro expansion of macro arguments does not +// occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN. +// +#define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y ) +#define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y) +#define BOOST_DO_JOIN2( X, Y ) X##Y + +// +// Set some default values for compiler/library/platform names. +// These are for debugging config setup only: +// +# ifndef BOOST_COMPILER +# define BOOST_COMPILER "Unknown ISO C++ Compiler" +# endif +# ifndef BOOST_STDLIB +# define BOOST_STDLIB "Unknown ISO standard library" +# endif +# ifndef BOOST_PLATFORM +# if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) \ + || defined(_POSIX_SOURCE) +# define BOOST_PLATFORM "Generic Unix" +# else +# define BOOST_PLATFORM "Unknown" +# endif +# endif + +// +// Set some default values GPU support +// +# ifndef BOOST_GPU_ENABLED +# define BOOST_GPU_ENABLED +# endif + +// BOOST_FORCEINLINE ---------------------------------------------// +// Macro to use in place of 'inline' to force a function to be inline +#if !defined(BOOST_FORCEINLINE) +# if defined(_MSC_VER) +# define BOOST_FORCEINLINE __forceinline +# elif defined(__GNUC__) && __GNUC__ > 3 + // Clang also defines __GNUC__ (as 4) +# define BOOST_FORCEINLINE inline __attribute__ ((__always_inline__)) +# else +# define BOOST_FORCEINLINE inline +# endif +#endif + +// BOOST_NOINLINE ---------------------------------------------// +// Macro to use in place of 'inline' to prevent a function to be inlined +#if !defined(BOOST_NOINLINE) +# if defined(_MSC_VER) +# define BOOST_NOINLINE __declspec(noinline) +# elif defined(__GNUC__) && __GNUC__ > 3 + // Clang also defines __GNUC__ (as 4) +# if defined(__CUDACC__) + // nvcc doesn't always parse __noinline__, + // see: https://svn.boost.org/trac/boost/ticket/9392 +# define BOOST_NOINLINE __attribute__ ((noinline)) +# else +# define BOOST_NOINLINE __attribute__ ((__noinline__)) +# endif +# else +# define BOOST_NOINLINE +# endif +#endif + +// BOOST_NORETURN ---------------------------------------------// +// Macro to use before a function declaration/definition to designate +// the function as not returning normally (i.e. with a return statement +// or by leaving the function scope, if the function return type is void). +#if !defined(BOOST_NORETURN) +# if defined(_MSC_VER) +# define BOOST_NORETURN __declspec(noreturn) +# elif defined(__GNUC__) +# define BOOST_NORETURN __attribute__ ((__noreturn__)) +# else +# define BOOST_NO_NORETURN +# define BOOST_NORETURN +# endif +#endif + +// Branch prediction hints +// These macros are intended to wrap conditional expressions that yield true or false +// +// if (BOOST_LIKELY(var == 10)) +// { +// // the most probable code here +// } +// +#if !defined(BOOST_LIKELY) +# define BOOST_LIKELY(x) x +#endif +#if !defined(BOOST_UNLIKELY) +# define BOOST_UNLIKELY(x) x +#endif + +// Type and data alignment specification +// +#if !defined(BOOST_NO_CXX11_ALIGNAS) +# define BOOST_ALIGNMENT(x) alignas(x) +#elif defined(_MSC_VER) +# define BOOST_ALIGNMENT(x) __declspec(align(x)) +#elif defined(__GNUC__) +# define BOOST_ALIGNMENT(x) __attribute__ ((__aligned__(x))) +#else +# define BOOST_NO_ALIGNMENT +# define BOOST_ALIGNMENT(x) +#endif + +// Lack of non-public defaulted functions is implied by the lack of any defaulted functions +#if !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS) && defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) +# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS +#endif + +// Defaulted and deleted function declaration helpers +// These macros are intended to be inside a class definition. +// BOOST_DEFAULTED_FUNCTION accepts the function declaration and its +// body, which will be used if the compiler doesn't support defaulted functions. +// BOOST_DELETED_FUNCTION only accepts the function declaration. It +// will expand to a private function declaration, if the compiler doesn't support +// deleted functions. Because of this it is recommended to use BOOST_DELETED_FUNCTION +// in the end of the class definition. +// +// class my_class +// { +// public: +// // Default-constructible +// BOOST_DEFAULTED_FUNCTION(my_class(), {}) +// // Copying prohibited +// BOOST_DELETED_FUNCTION(my_class(my_class const&)) +// BOOST_DELETED_FUNCTION(my_class& operator= (my_class const&)) +// }; +// +#if !(defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS)) +# define BOOST_DEFAULTED_FUNCTION(fun, body) fun = default; +#else +# define BOOST_DEFAULTED_FUNCTION(fun, body) fun body +#endif + +#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) +# define BOOST_DELETED_FUNCTION(fun) fun = delete; +#else +# define BOOST_DELETED_FUNCTION(fun) private: fun; +#endif + +// +// Set BOOST_NO_DECLTYPE_N3276 when BOOST_NO_DECLTYPE is defined +// +#if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_DECLTYPE_N3276) +#define BOOST_NO_CXX11_DECLTYPE_N3276 BOOST_NO_CXX11_DECLTYPE +#endif + +// -------------------- Deprecated macros for 1.50 --------------------------- +// These will go away in a future release + +// Use BOOST_NO_CXX11_HDR_UNORDERED_SET or BOOST_NO_CXX11_HDR_UNORDERED_MAP +// instead of BOOST_NO_STD_UNORDERED +#if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) || defined (BOOST_NO_CXX11_HDR_UNORDERED_SET) +# ifndef BOOST_NO_CXX11_STD_UNORDERED +# define BOOST_NO_CXX11_STD_UNORDERED +# endif +#endif + +// Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST instead of BOOST_NO_INITIALIZER_LISTS +#if defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_INITIALIZER_LISTS) +# define BOOST_NO_INITIALIZER_LISTS +#endif + +// Use BOOST_NO_CXX11_HDR_ARRAY instead of BOOST_NO_0X_HDR_ARRAY +#if defined(BOOST_NO_CXX11_HDR_ARRAY) && !defined(BOOST_NO_0X_HDR_ARRAY) +# define BOOST_NO_0X_HDR_ARRAY +#endif +// Use BOOST_NO_CXX11_HDR_CHRONO instead of BOOST_NO_0X_HDR_CHRONO +#if defined(BOOST_NO_CXX11_HDR_CHRONO) && !defined(BOOST_NO_0X_HDR_CHRONO) +# define BOOST_NO_0X_HDR_CHRONO +#endif +// Use BOOST_NO_CXX11_HDR_CODECVT instead of BOOST_NO_0X_HDR_CODECVT +#if defined(BOOST_NO_CXX11_HDR_CODECVT) && !defined(BOOST_NO_0X_HDR_CODECVT) +# define BOOST_NO_0X_HDR_CODECVT +#endif +// Use BOOST_NO_CXX11_HDR_CONDITION_VARIABLE instead of BOOST_NO_0X_HDR_CONDITION_VARIABLE +#if defined(BOOST_NO_CXX11_HDR_CONDITION_VARIABLE) && !defined(BOOST_NO_0X_HDR_CONDITION_VARIABLE) +# define BOOST_NO_0X_HDR_CONDITION_VARIABLE +#endif +// Use BOOST_NO_CXX11_HDR_FORWARD_LIST instead of BOOST_NO_0X_HDR_FORWARD_LIST +#if defined(BOOST_NO_CXX11_HDR_FORWARD_LIST) && !defined(BOOST_NO_0X_HDR_FORWARD_LIST) +# define BOOST_NO_0X_HDR_FORWARD_LIST +#endif +// Use BOOST_NO_CXX11_HDR_FUTURE instead of BOOST_NO_0X_HDR_FUTURE +#if defined(BOOST_NO_CXX11_HDR_FUTURE) && !defined(BOOST_NO_0X_HDR_FUTURE) +# define BOOST_NO_0X_HDR_FUTURE +#endif + +// Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST +// instead of BOOST_NO_0X_HDR_INITIALIZER_LIST or BOOST_NO_INITIALIZER_LISTS +#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# ifndef BOOST_NO_0X_HDR_INITIALIZER_LIST +# define BOOST_NO_0X_HDR_INITIALIZER_LIST +# endif +# ifndef BOOST_NO_INITIALIZER_LISTS +# define BOOST_NO_INITIALIZER_LISTS +# endif +#endif + +// Use BOOST_NO_CXX11_HDR_MUTEX instead of BOOST_NO_0X_HDR_MUTEX +#if defined(BOOST_NO_CXX11_HDR_MUTEX) && !defined(BOOST_NO_0X_HDR_MUTEX) +# define BOOST_NO_0X_HDR_MUTEX +#endif +// Use BOOST_NO_CXX11_HDR_RANDOM instead of BOOST_NO_0X_HDR_RANDOM +#if defined(BOOST_NO_CXX11_HDR_RANDOM) && !defined(BOOST_NO_0X_HDR_RANDOM) +# define BOOST_NO_0X_HDR_RANDOM +#endif +// Use BOOST_NO_CXX11_HDR_RATIO instead of BOOST_NO_0X_HDR_RATIO +#if defined(BOOST_NO_CXX11_HDR_RATIO) && !defined(BOOST_NO_0X_HDR_RATIO) +# define BOOST_NO_0X_HDR_RATIO +#endif +// Use BOOST_NO_CXX11_HDR_REGEX instead of BOOST_NO_0X_HDR_REGEX +#if defined(BOOST_NO_CXX11_HDR_REGEX) && !defined(BOOST_NO_0X_HDR_REGEX) +# define BOOST_NO_0X_HDR_REGEX +#endif +// Use BOOST_NO_CXX11_HDR_SYSTEM_ERROR instead of BOOST_NO_0X_HDR_SYSTEM_ERROR +#if defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR) && !defined(BOOST_NO_0X_HDR_SYSTEM_ERROR) +# define BOOST_NO_0X_HDR_SYSTEM_ERROR +#endif +// Use BOOST_NO_CXX11_HDR_THREAD instead of BOOST_NO_0X_HDR_THREAD +#if defined(BOOST_NO_CXX11_HDR_THREAD) && !defined(BOOST_NO_0X_HDR_THREAD) +# define BOOST_NO_0X_HDR_THREAD +#endif +// Use BOOST_NO_CXX11_HDR_TUPLE instead of BOOST_NO_0X_HDR_TUPLE +#if defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_0X_HDR_TUPLE) +# define BOOST_NO_0X_HDR_TUPLE +#endif +// Use BOOST_NO_CXX11_HDR_TYPE_TRAITS instead of BOOST_NO_0X_HDR_TYPE_TRAITS +#if defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) && !defined(BOOST_NO_0X_HDR_TYPE_TRAITS) +# define BOOST_NO_0X_HDR_TYPE_TRAITS +#endif +// Use BOOST_NO_CXX11_HDR_TYPEINDEX instead of BOOST_NO_0X_HDR_TYPEINDEX +#if defined(BOOST_NO_CXX11_HDR_TYPEINDEX) && !defined(BOOST_NO_0X_HDR_TYPEINDEX) +# define BOOST_NO_0X_HDR_TYPEINDEX +#endif +// Use BOOST_NO_CXX11_HDR_UNORDERED_MAP instead of BOOST_NO_0X_HDR_UNORDERED_MAP +#if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) && !defined(BOOST_NO_0X_HDR_UNORDERED_MAP) +# define BOOST_NO_0X_HDR_UNORDERED_MAP +#endif +// Use BOOST_NO_CXX11_HDR_UNORDERED_SET instead of BOOST_NO_0X_HDR_UNORDERED_SET +#if defined(BOOST_NO_CXX11_HDR_UNORDERED_SET) && !defined(BOOST_NO_0X_HDR_UNORDERED_SET) +# define BOOST_NO_0X_HDR_UNORDERED_SET +#endif + +// ------------------ End of deprecated macros for 1.50 --------------------------- + +// -------------------- Deprecated macros for 1.51 --------------------------- +// These will go away in a future release + +// Use BOOST_NO_CXX11_AUTO_DECLARATIONS instead of BOOST_NO_AUTO_DECLARATIONS +#if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && !defined(BOOST_NO_AUTO_DECLARATIONS) +# define BOOST_NO_AUTO_DECLARATIONS +#endif +// Use BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS instead of BOOST_NO_AUTO_MULTIDECLARATIONS +#if defined(BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS) && !defined(BOOST_NO_AUTO_MULTIDECLARATIONS) +# define BOOST_NO_AUTO_MULTIDECLARATIONS +#endif +// Use BOOST_NO_CXX11_CHAR16_T instead of BOOST_NO_CHAR16_T +#if defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CHAR16_T) +# define BOOST_NO_CHAR16_T +#endif +// Use BOOST_NO_CXX11_CHAR32_T instead of BOOST_NO_CHAR32_T +#if defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CHAR32_T) +# define BOOST_NO_CHAR32_T +#endif +// Use BOOST_NO_CXX11_TEMPLATE_ALIASES instead of BOOST_NO_TEMPLATE_ALIASES +#if defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !defined(BOOST_NO_TEMPLATE_ALIASES) +# define BOOST_NO_TEMPLATE_ALIASES +#endif +// Use BOOST_NO_CXX11_CONSTEXPR instead of BOOST_NO_CONSTEXPR +#if defined(BOOST_NO_CXX11_CONSTEXPR) && !defined(BOOST_NO_CONSTEXPR) +# define BOOST_NO_CONSTEXPR +#endif +// Use BOOST_NO_CXX11_DECLTYPE_N3276 instead of BOOST_NO_DECLTYPE_N3276 +#if defined(BOOST_NO_CXX11_DECLTYPE_N3276) && !defined(BOOST_NO_DECLTYPE_N3276) +# define BOOST_NO_DECLTYPE_N3276 +#endif +// Use BOOST_NO_CXX11_DECLTYPE instead of BOOST_NO_DECLTYPE +#if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_DECLTYPE) +# define BOOST_NO_DECLTYPE +#endif +// Use BOOST_NO_CXX11_DEFAULTED_FUNCTIONS instead of BOOST_NO_DEFAULTED_FUNCTIONS +#if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_DEFAULTED_FUNCTIONS) +# define BOOST_NO_DEFAULTED_FUNCTIONS +#endif +// Use BOOST_NO_CXX11_DELETED_FUNCTIONS instead of BOOST_NO_DELETED_FUNCTIONS +#if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_DELETED_FUNCTIONS) +# define BOOST_NO_DELETED_FUNCTIONS +#endif +// Use BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS instead of BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) && !defined(BOOST_NO_EXPLICIT_CONVERSION_OPERATORS) +# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +#endif +// Use BOOST_NO_CXX11_EXTERN_TEMPLATE instead of BOOST_NO_EXTERN_TEMPLATE +#if defined(BOOST_NO_CXX11_EXTERN_TEMPLATE) && !defined(BOOST_NO_EXTERN_TEMPLATE) +# define BOOST_NO_EXTERN_TEMPLATE +#endif +// Use BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS instead of BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS +#if defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && !defined(BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS) +# define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS +#endif +// Use BOOST_NO_CXX11_LAMBDAS instead of BOOST_NO_LAMBDAS +#if defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_NO_LAMBDAS) +# define BOOST_NO_LAMBDAS +#endif +// Use BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS instead of BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS +#if defined(BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS) && !defined(BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS) +# define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS +#endif +// Use BOOST_NO_CXX11_NOEXCEPT instead of BOOST_NO_NOEXCEPT +#if defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_NOEXCEPT) +# define BOOST_NO_NOEXCEPT +#endif +// Use BOOST_NO_CXX11_NULLPTR instead of BOOST_NO_NULLPTR +#if defined(BOOST_NO_CXX11_NULLPTR) && !defined(BOOST_NO_NULLPTR) +# define BOOST_NO_NULLPTR +#endif +// Use BOOST_NO_CXX11_RAW_LITERALS instead of BOOST_NO_RAW_LITERALS +#if defined(BOOST_NO_CXX11_RAW_LITERALS) && !defined(BOOST_NO_RAW_LITERALS) +# define BOOST_NO_RAW_LITERALS +#endif +// Use BOOST_NO_CXX11_RVALUE_REFERENCES instead of BOOST_NO_RVALUE_REFERENCES +#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_RVALUE_REFERENCES) +# define BOOST_NO_RVALUE_REFERENCES +#endif +// Use BOOST_NO_CXX11_SCOPED_ENUMS instead of BOOST_NO_SCOPED_ENUMS +#if defined(BOOST_NO_CXX11_SCOPED_ENUMS) && !defined(BOOST_NO_SCOPED_ENUMS) +# define BOOST_NO_SCOPED_ENUMS +#endif +// Use BOOST_NO_CXX11_STATIC_ASSERT instead of BOOST_NO_STATIC_ASSERT +#if defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_NO_STATIC_ASSERT) +# define BOOST_NO_STATIC_ASSERT +#endif +// Use BOOST_NO_CXX11_STD_UNORDERED instead of BOOST_NO_STD_UNORDERED +#if defined(BOOST_NO_CXX11_STD_UNORDERED) && !defined(BOOST_NO_STD_UNORDERED) +# define BOOST_NO_STD_UNORDERED +#endif +// Use BOOST_NO_CXX11_UNICODE_LITERALS instead of BOOST_NO_UNICODE_LITERALS +#if defined(BOOST_NO_CXX11_UNICODE_LITERALS) && !defined(BOOST_NO_UNICODE_LITERALS) +# define BOOST_NO_UNICODE_LITERALS +#endif +// Use BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX instead of BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX +#if defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) && !defined(BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX) +# define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX +#endif +// Use BOOST_NO_CXX11_VARIADIC_TEMPLATES instead of BOOST_NO_VARIADIC_TEMPLATES +#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_VARIADIC_TEMPLATES) +# define BOOST_NO_VARIADIC_TEMPLATES +#endif +// Use BOOST_NO_CXX11_VARIADIC_MACROS instead of BOOST_NO_VARIADIC_MACROS +#if defined(BOOST_NO_CXX11_VARIADIC_MACROS) && !defined(BOOST_NO_VARIADIC_MACROS) +# define BOOST_NO_VARIADIC_MACROS +#endif +// Use BOOST_NO_CXX11_NUMERIC_LIMITS instead of BOOST_NO_NUMERIC_LIMITS_LOWEST +#if defined(BOOST_NO_CXX11_NUMERIC_LIMITS) && !defined(BOOST_NO_NUMERIC_LIMITS_LOWEST) +# define BOOST_NO_NUMERIC_LIMITS_LOWEST +#endif +// ------------------ End of deprecated macros for 1.51 --------------------------- + + + +// +// Helper macros BOOST_NOEXCEPT, BOOST_NOEXCEPT_IF, BOOST_NOEXCEPT_EXPR +// These aid the transition to C++11 while still supporting C++03 compilers +// +#ifdef BOOST_NO_CXX11_NOEXCEPT +# define BOOST_NOEXCEPT +# define BOOST_NOEXCEPT_OR_NOTHROW throw() +# define BOOST_NOEXCEPT_IF(Predicate) +# define BOOST_NOEXCEPT_EXPR(Expression) false +#else +# define BOOST_NOEXCEPT noexcept +# define BOOST_NOEXCEPT_OR_NOTHROW noexcept +# define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate)) +# define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression)) +#endif +// +// Helper macro BOOST_FALLTHROUGH +// Fallback definition of BOOST_FALLTHROUGH macro used to mark intended +// fall-through between case labels in a switch statement. We use a definition +// that requires a semicolon after it to avoid at least one type of misuse even +// on unsupported compilers. +// +#ifndef BOOST_FALLTHROUGH +# define BOOST_FALLTHROUGH ((void)0) +#endif + +// +// constexpr workarounds +// +#if defined(BOOST_NO_CXX11_CONSTEXPR) +#define BOOST_CONSTEXPR +#define BOOST_CONSTEXPR_OR_CONST const +#else +#define BOOST_CONSTEXPR constexpr +#define BOOST_CONSTEXPR_OR_CONST constexpr +#endif +#if defined(BOOST_NO_CXX14_CONSTEXPR) +#define BOOST_CXX14_CONSTEXPR +#else +#define BOOST_CXX14_CONSTEXPR constexpr +#endif + +// +// Unused variable/typedef workarounds: +// +#ifndef BOOST_ATTRIBUTE_UNUSED +# define BOOST_ATTRIBUTE_UNUSED +#endif + +#define BOOST_STATIC_CONSTEXPR static BOOST_CONSTEXPR_OR_CONST + +// +// Set BOOST_HAS_STATIC_ASSERT when BOOST_NO_CXX11_STATIC_ASSERT is not defined +// +#if !defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_HAS_STATIC_ASSERT) +# define BOOST_HAS_STATIC_ASSERT +#endif + +// +// Set BOOST_HAS_RVALUE_REFS when BOOST_NO_CXX11_RVALUE_REFERENCES is not defined +// +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_HAS_RVALUE_REFS) +#define BOOST_HAS_RVALUE_REFS +#endif + +// +// Set BOOST_HAS_VARIADIC_TMPL when BOOST_NO_CXX11_VARIADIC_TEMPLATES is not defined +// +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_HAS_VARIADIC_TMPL) +#define BOOST_HAS_VARIADIC_TMPL +#endif +// +// Set BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS when +// BOOST_NO_CXX11_VARIADIC_TEMPLATES is set: +// +#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS) +# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS +#endif + +// +// Finish off with checks for macros that are depricated / no longer supported, +// if any of these are set then it's very likely that much of Boost will no +// longer work. So stop with a #error for now, but give the user a chance +// to continue at their own risk if they really want to: +// +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_CONFIG_ALLOW_DEPRECATED) +# error "You are using a compiler which lacks features which are now a minimum requirement in order to use Boost, define BOOST_CONFIG_ALLOW_DEPRECATED if you want to continue at your own risk!!!" +#endif + +#endif diff --git a/ThirdParty/boost-Subset/boost/config/user.hpp b/ThirdParty/boost-Subset/boost/config/user.hpp new file mode 100644 index 0000000000..28e7476afd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/user.hpp @@ -0,0 +1,133 @@ +// boost/config/user.hpp ---------------------------------------------------// + +// (C) Copyright John Maddock 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// Do not check in modified versions of this file, +// This file may be customized by the end user, but not by boost. + +// +// Use this file to define a site and compiler specific +// configuration policy: +// + +// define this to locate a compiler config file: +// #define BOOST_COMPILER_CONFIG + +// define this to locate a stdlib config file: +// #define BOOST_STDLIB_CONFIG + +// define this to locate a platform config file: +// #define BOOST_PLATFORM_CONFIG + +// define this to disable compiler config, +// use if your compiler config has nothing to set: +// #define BOOST_NO_COMPILER_CONFIG + +// define this to disable stdlib config, +// use if your stdlib config has nothing to set: +// #define BOOST_NO_STDLIB_CONFIG + +// define this to disable platform config, +// use if your platform config has nothing to set: +// #define BOOST_NO_PLATFORM_CONFIG + +// define this to disable all config options, +// excluding the user config. Use if your +// setup is fully ISO compliant, and has no +// useful extensions, or for autoconf generated +// setups: +// #define BOOST_NO_CONFIG + +// define this to make the config "optimistic" +// about unknown compiler versions. Normally +// unknown compiler versions are assumed to have +// all the defects of the last known version, however +// setting this flag, causes the config to assume +// that unknown compiler versions are fully conformant +// with the standard: +// #define BOOST_STRICT_CONFIG + +// define this to cause the config to halt compilation +// with an #error if it encounters anything unknown -- +// either an unknown compiler version or an unknown +// compiler/platform/library: +// #define BOOST_ASSERT_CONFIG + + +// define if you want to disable threading support, even +// when available: +// #define BOOST_DISABLE_THREADS + +// define when you want to disable Win32 specific features +// even when available: +// #define BOOST_DISABLE_WIN32 + +// BOOST_DISABLE_ABI_HEADERS: Stops boost headers from including any +// prefix/suffix headers that normally control things like struct +// packing and alignment. +// #define BOOST_DISABLE_ABI_HEADERS + +// BOOST_ABI_PREFIX: A prefix header to include in place of whatever +// boost.config would normally select, any replacement should set up +// struct packing and alignment options as required. +// #define BOOST_ABI_PREFIX my-header-name + +// BOOST_ABI_SUFFIX: A suffix header to include in place of whatever +// boost.config would normally select, any replacement should undo +// the effects of the prefix header. +// #define BOOST_ABI_SUFFIX my-header-name + +// BOOST_ALL_DYN_LINK: Forces all libraries that have separate source, +// to be linked as dll's rather than static libraries on Microsoft Windows +// (this macro is used to turn on __declspec(dllimport) modifiers, so that +// the compiler knows which symbols to look for in a dll rather than in a +// static library). Note that there may be some libraries that can only +// be linked in one way (statically or dynamically), in these cases this +// macro has no effect. +// #define BOOST_ALL_DYN_LINK + +// BOOST_WHATEVER_DYN_LINK: Forces library "whatever" to be linked as a dll +// rather than a static library on Microsoft Windows: replace the WHATEVER +// part of the macro name with the name of the library that you want to +// dynamically link to, for example use BOOST_DATE_TIME_DYN_LINK or +// BOOST_REGEX_DYN_LINK etc (this macro is used to turn on __declspec(dllimport) +// modifiers, so that the compiler knows which symbols to look for in a dll +// rather than in a static library). +// Note that there may be some libraries that can only +// be linked in one way (statically or dynamically), +// in these cases this macro is unsupported. +// #define BOOST_WHATEVER_DYN_LINK + +// BOOST_ALL_NO_LIB: Tells the config system not to automatically select +// which libraries to link against. +// Normally if a compiler supports #pragma lib, then the correct library +// build variant will be automatically selected and linked against, +// simply by the act of including one of that library's headers. +// This macro turns that feature off. +// #define BOOST_ALL_NO_LIB + +// BOOST_WHATEVER_NO_LIB: Tells the config system not to automatically +// select which library to link against for library "whatever", +// replace WHATEVER in the macro name with the name of the library; +// for example BOOST_DATE_TIME_NO_LIB or BOOST_REGEX_NO_LIB. +// Normally if a compiler supports #pragma lib, then the correct library +// build variant will be automatically selected and linked against, simply +// by the act of including one of that library's headers. This macro turns +// that feature off. +// #define BOOST_WHATEVER_NO_LIB + +// BOOST_LIB_BUILDID: Set to the same value as the value passed to Boost.Build's +// --buildid command line option. For example if you built using: +// +// bjam address-model=64 --buildid=amd64 +// +// then compile your code with: +// +// -DBOOST_LIB_BUILDID = amd64 +// +// to ensure the correct libraries are selected at link time. +// #define BOOST_LIB_BUILDID amd64 + diff --git a/ThirdParty/boost-Subset/boost/config/warning_disable.hpp b/ThirdParty/boost-Subset/boost/config/warning_disable.hpp new file mode 100644 index 0000000000..fea8e829f1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/config/warning_disable.hpp @@ -0,0 +1,47 @@ +// Copyright John Maddock 2008 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// This file exists to turn off some overly-pedantic warning emitted +// by certain compilers. You should include this header only in: +// +// * A test case, before any other headers, or, +// * A library source file before any other headers. +// +// IT SHOULD NOT BE INCLUDED BY ANY BOOST HEADER. +// +// YOU SHOULD NOT INCLUDE IT IF YOU CAN REASONABLY FIX THE WARNING. +// +// The only warnings disabled here are those that are: +// +// * Quite unreasonably pedantic. +// * Generally only emitted by a single compiler. +// * Can't easily be fixed: for example if the vendors own std lib +// code emits these warnings! +// +// Note that THIS HEADER MUST NOT INCLUDE ANY OTHER HEADERS: +// not even std library ones! Doing so may turn the warning +// off too late to be of any use. For example the VC++ C4996 +// warning can be emitted from if that header is included +// before or by this one :-( +// + +#ifndef BOOST_CONFIG_WARNING_DISABLE_HPP +#define BOOST_CONFIG_WARNING_DISABLE_HPP + +#if defined(_MSC_VER) && (_MSC_VER >= 1400) + // Error 'function': was declared deprecated + // http://msdn2.microsoft.com/en-us/library/ttcz0bys(VS.80).aspx + // This error is emitted when you use some perfectly conforming + // std lib functions in a perfectly correct way, and also by + // some of Microsoft's own std lib code ! +# pragma warning(disable:4996) +#endif +#if defined(__INTEL_COMPILER) || defined(__ICL) + // As above: gives warning when a "deprecated" + // std library function is encountered. +# pragma warning(disable:1786) +#endif + +#endif // BOOST_CONFIG_WARNING_DISABLE_HPP diff --git a/ThirdParty/boost-Subset/boost/container/container_fwd.hpp b/ThirdParty/boost-Subset/boost/container/container_fwd.hpp new file mode 100644 index 0000000000..a9b421c2b2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/container/container_fwd.hpp @@ -0,0 +1,281 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2005-2014. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/container for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP +#define BOOST_CONTAINER_CONTAINER_FWD_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif + +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +//! \file +//! This header file forward declares the following containers: +//! - boost::container::vector +//! - boost::container::stable_vector +//! - boost::container::static_vector +//! - boost::container::slist +//! - boost::container::list +//! - boost::container::set +//! - boost::container::multiset +//! - boost::container::map +//! - boost::container::multimap +//! - boost::container::flat_set +//! - boost::container::flat_multiset +//! - boost::container::flat_map +//! - boost::container::flat_multimap +//! - boost::container::basic_string +//! - boost::container::string +//! - boost::container::wstring +//! +//! It forward declares the following allocators: +//! - boost::container::allocator +//! - boost::container::node_allocator +//! - boost::container::adaptive_pool +//! +//! And finally it defines the following types + +#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED + +//Std forward declarations +#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP + #include +#endif + +namespace boost{ +namespace intrusive{ + //Create namespace to avoid compilation errors +}} + +namespace boost{ namespace container{ namespace container_detail{ + namespace bi = boost::intrusive; +}}} + +#include + +#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED + +////////////////////////////////////////////////////////////////////////////// +// Containers +////////////////////////////////////////////////////////////////////////////// + +namespace boost { +namespace container { + +//! Enumeration used to configure ordered associative containers +//! with a concrete tree implementation. +enum tree_type_enum +{ + red_black_tree, + avl_tree, + scapegoat_tree, + splay_tree +}; + +#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED + +template +class new_allocator; + +template > +class vector; + +template > +class stable_vector; + +template +class static_vector; + +template < class T, std::size_t N + , class Allocator= new_allocator > +class small_vector; + +template > +class deque; + +template > +class list; + +template > +class slist; + +template +struct tree_opt; + +typedef tree_opt tree_assoc_defaults; + +template + ,class Allocator = new_allocator + ,class Options = tree_assoc_defaults > +class set; + +template + ,class Allocator = new_allocator + ,class Options = tree_assoc_defaults > +class multiset; + +template + ,class Allocator = new_allocator > + ,class Options = tree_assoc_defaults > +class map; + +template + ,class Allocator = new_allocator > + ,class Options = tree_assoc_defaults > +class multimap; + +template + ,class Allocator = new_allocator > +class flat_set; + +template + ,class Allocator = new_allocator > +class flat_multiset; + +template + ,class Allocator = new_allocator > > +class flat_map; + +template + ,class Allocator = new_allocator > > +class flat_multimap; + +template + ,class Allocator = new_allocator > +class basic_string; + +typedef basic_string + + ,new_allocator > +string; + +typedef basic_string + + ,new_allocator > +wstring; + +static const std::size_t ADP_nodes_per_block = 256u; +static const std::size_t ADP_max_free_blocks = 2u; +static const std::size_t ADP_overhead_percent = 1u; +static const std::size_t ADP_only_alignment = 0u; + +template < class T + , std::size_t NodesPerBlock = ADP_nodes_per_block + , std::size_t MaxFreeBlocks = ADP_max_free_blocks + , std::size_t OverheadPercent = ADP_overhead_percent + , unsigned Version = 2 + > +class adaptive_pool; + +template < class T + , unsigned Version = 2 + , unsigned int AllocationDisableMask = 0> +class allocator; + +static const std::size_t NodeAlloc_nodes_per_block = 256u; + +template + < class T + , std::size_t NodesPerBlock = NodeAlloc_nodes_per_block + , std::size_t Version = 2> +class node_allocator; + +#else + +//! Default options for tree-based associative containers +//! - tree_type +//! - optimize_size +typedef implementation_defined tree_assoc_defaults; + +#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED + +//! Type used to tag that the input range is +//! guaranteed to be ordered +struct ordered_range_t +{}; + +//! Value used to tag that the input range is +//! guaranteed to be ordered +static const ordered_range_t ordered_range = ordered_range_t(); + +//! Type used to tag that the input range is +//! guaranteed to be ordered and unique +struct ordered_unique_range_t + : public ordered_range_t +{}; + +//! Value used to tag that the input range is +//! guaranteed to be ordered and unique +static const ordered_unique_range_t ordered_unique_range = ordered_unique_range_t(); + +//! Type used to tag that the inserted values +//! should be default initialized +struct default_init_t +{}; + +//! Value used to tag that the inserted values +//! should be default initialized +static const default_init_t default_init = default_init_t(); +#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED + +//! Type used to tag that the inserted values +//! should be value initialized +struct value_init_t +{}; + +//! Value used to tag that the inserted values +//! should be value initialized +static const value_init_t value_init = value_init_t(); + +namespace container_detail_really_deep_namespace { + +//Otherwise, gcc issues a warning of previously defined +//anonymous_instance and unique_instance +struct dummy +{ + dummy() + { + (void)ordered_range; + (void)ordered_unique_range; + (void)default_init; + } +}; + +} //detail_really_deep_namespace { + + +#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED + +}} //namespace boost { namespace container { + +#endif //#ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP diff --git a/ThirdParty/boost-Subset/boost/container/detail/std_fwd.hpp b/ThirdParty/boost-Subset/boost/container/detail/std_fwd.hpp new file mode 100644 index 0000000000..1277df071f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/container/detail/std_fwd.hpp @@ -0,0 +1,76 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2014-2014. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/container for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP +#define BOOST_CONTAINER_DETAIL_STD_FWD_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif + +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +////////////////////////////////////////////////////////////////////////////// +// Standard predeclarations +////////////////////////////////////////////////////////////////////////////// + +#if defined(_LIBCPP_VERSION) + #define BOOST_CONTAINER_CLANG_INLINE_STD_NS + #pragma GCC diagnostic push + #if defined(__clang__) + #pragma GCC diagnostic ignored "-Wc++11-extensions" + #endif + #define BOOST_CONTAINER_STD_NS_BEG _LIBCPP_BEGIN_NAMESPACE_STD + #define BOOST_CONTAINER_STD_NS_END _LIBCPP_END_NAMESPACE_STD +#elif defined(BOOST_GNU_STDLIB) && defined(_GLIBCXX_BEGIN_NAMESPACE_VERSION) //GCC >= 4.6 + #define BOOST_CONTAINER_STD_NS_BEG namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION + #define BOOST_CONTAINER_STD_NS_END _GLIBCXX_END_NAMESPACE_VERSION } // namespace +#elif defined(BOOST_GNU_STDLIB) && defined(_GLIBCXX_BEGIN_NAMESPACE) //GCC >= 4.2 + #define BOOST_CONTAINER_STD_NS_BEG _GLIBCXX_BEGIN_NAMESPACE(std) + #define BOOST_CONTAINER_STD_NS_END _GLIBCXX_END_NAMESPACE +#else + #define BOOST_CONTAINER_STD_NS_BEG namespace std{ + #define BOOST_CONTAINER_STD_NS_END } +#endif + +BOOST_CONTAINER_STD_NS_BEG + +template +class allocator; + +template +struct less; + +template +struct pair; + +template +struct char_traits; + +struct input_iterator_tag; +struct forward_iterator_tag; +struct bidirectional_iterator_tag; +struct random_access_iterator_tag; + +template +class insert_iterator; + +struct allocator_arg_t; + +BOOST_CONTAINER_STD_NS_END + +#ifdef BOOST_CONTAINER_CLANG_INLINE_STD_NS + #pragma GCC diagnostic pop + #undef BOOST_CONTAINER_CLANG_INLINE_STD_NS +#endif //BOOST_CONTAINER_CLANG_INLINE_STD_NS + +#endif //#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP diff --git a/ThirdParty/boost-Subset/boost/core/addressof.hpp b/ThirdParty/boost-Subset/boost/core/addressof.hpp new file mode 100644 index 0000000000..889b5825e1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/core/addressof.hpp @@ -0,0 +1,162 @@ +// Copyright (C) 2002 Brad King (brad.king@kitware.com) +// Douglas Gregor (gregod@cs.rpi.edu) +// +// Copyright (C) 2002, 2008, 2013 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#ifndef BOOST_CORE_ADDRESSOF_HPP +#define BOOST_CORE_ADDRESSOF_HPP + +# include +# include +# include + +namespace boost +{ + +namespace detail +{ + +template struct addr_impl_ref +{ + T & v_; + + BOOST_FORCEINLINE addr_impl_ref( T & v ): v_( v ) {} + BOOST_FORCEINLINE operator T& () const { return v_; } + +private: + addr_impl_ref & operator=(const addr_impl_ref &); +}; + +template struct addressof_impl +{ + static BOOST_FORCEINLINE T * f( T & v, long ) + { + return reinterpret_cast( + &const_cast(reinterpret_cast(v))); + } + + static BOOST_FORCEINLINE T * f( T * v, int ) + { + return v; + } +}; + +#if !defined( BOOST_NO_CXX11_NULLPTR ) + +#if !defined( BOOST_NO_CXX11_DECLTYPE ) && ( ( defined( __clang__ ) && !defined( _LIBCPP_VERSION ) ) || defined( __INTEL_COMPILER ) ) + + typedef decltype(nullptr) addr_nullptr_t; + +#else + + typedef std::nullptr_t addr_nullptr_t; + +#endif + +template<> struct addressof_impl< addr_nullptr_t > +{ + typedef addr_nullptr_t T; + + static BOOST_FORCEINLINE T * f( T & v, int ) + { + return &v; + } +}; + +template<> struct addressof_impl< addr_nullptr_t const > +{ + typedef addr_nullptr_t const T; + + static BOOST_FORCEINLINE T * f( T & v, int ) + { + return &v; + } +}; + +template<> struct addressof_impl< addr_nullptr_t volatile > +{ + typedef addr_nullptr_t volatile T; + + static BOOST_FORCEINLINE T * f( T & v, int ) + { + return &v; + } +}; + +template<> struct addressof_impl< addr_nullptr_t const volatile > +{ + typedef addr_nullptr_t const volatile T; + + static BOOST_FORCEINLINE T * f( T & v, int ) + { + return &v; + } +}; + +#endif + +} // namespace detail + +template +BOOST_FORCEINLINE +T * addressof( T & v ) +{ +#if (defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x610 ) ) ) || (defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x5120)) + + return boost::detail::addressof_impl::f( v, 0 ); + +#else + + return boost::detail::addressof_impl::f( boost::detail::addr_impl_ref( v ), 0 ); + +#endif +} + +#if defined( __SUNPRO_CC ) && BOOST_WORKAROUND( __SUNPRO_CC, BOOST_TESTED_AT( 0x590 ) ) + +namespace detail +{ + +template struct addressof_addp +{ + typedef T * type; +}; + +} // namespace detail + +template< class T, std::size_t N > +BOOST_FORCEINLINE +typename detail::addressof_addp< T[N] >::type addressof( T (&t)[N] ) +{ + return &t; +} + +#endif + +// Borland doesn't like casting an array reference to a char reference +// but these overloads work around the problem. +#if defined( __BORLANDC__ ) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +template +BOOST_FORCEINLINE +T (*addressof(T (&t)[N]))[N] +{ + return reinterpret_cast(&t); +} + +template +BOOST_FORCEINLINE +const T (*addressof(const T (&t)[N]))[N] +{ + return reinterpret_cast(&t); +} +#endif + +} // namespace boost + +#endif // BOOST_CORE_ADDRESSOF_HPP diff --git a/ThirdParty/boost-Subset/boost/core/checked_delete.hpp b/ThirdParty/boost-Subset/boost/core/checked_delete.hpp new file mode 100644 index 0000000000..b086e03e88 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/core/checked_delete.hpp @@ -0,0 +1,69 @@ +#ifndef BOOST_CORE_CHECKED_DELETE_HPP +#define BOOST_CORE_CHECKED_DELETE_HPP + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/checked_delete.hpp +// +// Copyright (c) 2002, 2003 Peter Dimov +// Copyright (c) 2003 Daniel Frey +// Copyright (c) 2003 Howard Hinnant +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/core/doc/html/core/checked_delete.html for documentation. +// + +namespace boost +{ + +// verify that types are complete for increased safety + +template inline void checked_delete(T * x) +{ + // intentionally complex - simplification causes regressions + typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; + (void) sizeof(type_must_be_complete); + delete x; +} + +template inline void checked_array_delete(T * x) +{ + typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; + (void) sizeof(type_must_be_complete); + delete [] x; +} + +template struct checked_deleter +{ + typedef void result_type; + typedef T * argument_type; + + void operator()(T * x) const + { + // boost:: disables ADL + boost::checked_delete(x); + } +}; + +template struct checked_array_deleter +{ + typedef void result_type; + typedef T * argument_type; + + void operator()(T * x) const + { + boost::checked_array_delete(x); + } +}; + +} // namespace boost + +#endif // #ifndef BOOST_CORE_CHECKED_DELETE_HPP diff --git a/ThirdParty/boost-Subset/boost/core/demangle.hpp b/ThirdParty/boost-Subset/boost/core/demangle.hpp new file mode 100644 index 0000000000..eebd0ce0f1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/core/demangle.hpp @@ -0,0 +1,121 @@ +#ifndef BOOST_CORE_DEMANGLE_HPP_INCLUDED +#define BOOST_CORE_DEMANGLE_HPP_INCLUDED + +// core::demangle +// +// Copyright 2014 Peter Dimov +// Copyright 2014 Andrey Semashev +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include +#include + +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +#if defined( __clang__ ) && defined( __has_include ) +# if __has_include() +# define BOOST_CORE_HAS_CXXABI_H +# endif +#elif defined( __GLIBCXX__ ) || defined( __GLIBCPP__ ) +# define BOOST_CORE_HAS_CXXABI_H +#endif + +#if defined( BOOST_CORE_HAS_CXXABI_H ) +# include +# include +# include +#endif + +namespace boost +{ + +namespace core +{ + +inline char const * demangle_alloc( char const * name ) BOOST_NOEXCEPT; +inline void demangle_free( char const * name ) BOOST_NOEXCEPT; + +class scoped_demangled_name +{ +private: + char const * m_p; + +public: + explicit scoped_demangled_name( char const * name ) BOOST_NOEXCEPT : + m_p( demangle_alloc( name ) ) + { + } + + ~scoped_demangled_name() BOOST_NOEXCEPT + { + demangle_free( m_p ); + } + + char const * get() const BOOST_NOEXCEPT + { + return m_p; + } + + BOOST_DELETED_FUNCTION(scoped_demangled_name( scoped_demangled_name const& )) + BOOST_DELETED_FUNCTION(scoped_demangled_name& operator= ( scoped_demangled_name const& )) +}; + + +#if defined( BOOST_CORE_HAS_CXXABI_H ) + +inline char const * demangle_alloc( char const * name ) BOOST_NOEXCEPT +{ + int status = 0; + std::size_t size = 0; + return abi::__cxa_demangle( name, NULL, &size, &status ); +} + +inline void demangle_free( char const * name ) BOOST_NOEXCEPT +{ + std::free( const_cast< char* >( name ) ); +} + +inline std::string demangle( char const * name ) +{ + scoped_demangled_name demangled_name( name ); + char const * const p = demangled_name.get(); + if( p ) + { + return p; + } + else + { + return name; + } +} + +#else + +inline char const * demangle_alloc( char const * name ) BOOST_NOEXCEPT +{ + return name; +} + +inline void demangle_free( char const * ) BOOST_NOEXCEPT +{ +} + +inline std::string demangle( char const * name ) +{ + return name; +} + +#endif + +} // namespace core + +} // namespace boost + +#undef BOOST_CORE_HAS_CXXABI_H + +#endif // #ifndef BOOST_CORE_DEMANGLE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/core/enable_if.hpp b/ThirdParty/boost-Subset/boost/core/enable_if.hpp new file mode 100644 index 0000000000..a3302b18a1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/core/enable_if.hpp @@ -0,0 +1,119 @@ +// Boost enable_if library + +// Copyright 2003 (c) The Trustees of Indiana University. + +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Jaakko Jarvi (jajarvi at osl.iu.edu) +// Jeremiah Willcock (jewillco at osl.iu.edu) +// Andrew Lumsdaine (lums at osl.iu.edu) + + +#ifndef BOOST_CORE_ENABLE_IF_HPP +#define BOOST_CORE_ENABLE_IF_HPP + +#include "boost/config.hpp" + +// Even the definition of enable_if causes problems on some compilers, +// so it's macroed out for all compilers that do not support SFINAE + +#ifndef BOOST_NO_SFINAE + +namespace boost +{ + + template + struct enable_if_c { + typedef T type; + }; + + template + struct enable_if_c {}; + + template + struct enable_if : public enable_if_c {}; + + template + struct lazy_enable_if_c { + typedef typename T::type type; + }; + + template + struct lazy_enable_if_c {}; + + template + struct lazy_enable_if : public lazy_enable_if_c {}; + + + template + struct disable_if_c { + typedef T type; + }; + + template + struct disable_if_c {}; + + template + struct disable_if : public disable_if_c {}; + + template + struct lazy_disable_if_c { + typedef typename T::type type; + }; + + template + struct lazy_disable_if_c {}; + + template + struct lazy_disable_if : public lazy_disable_if_c {}; + +} // namespace boost + +#else + +namespace boost { + + namespace detail { typedef void enable_if_default_T; } + + template + struct enable_if_does_not_work_on_this_compiler; + + template + struct enable_if_c : enable_if_does_not_work_on_this_compiler + { }; + + template + struct disable_if_c : enable_if_does_not_work_on_this_compiler + { }; + + template + struct lazy_enable_if_c : enable_if_does_not_work_on_this_compiler + { }; + + template + struct lazy_disable_if_c : enable_if_does_not_work_on_this_compiler + { }; + + template + struct enable_if : enable_if_does_not_work_on_this_compiler + { }; + + template + struct disable_if : enable_if_does_not_work_on_this_compiler + { }; + + template + struct lazy_enable_if : enable_if_does_not_work_on_this_compiler + { }; + + template + struct lazy_disable_if : enable_if_does_not_work_on_this_compiler + { }; + +} // namespace boost + +#endif // BOOST_NO_SFINAE + +#endif diff --git a/ThirdParty/boost-Subset/boost/core/explicit_operator_bool.hpp b/ThirdParty/boost-Subset/boost/core/explicit_operator_bool.hpp new file mode 100644 index 0000000000..a8936e2cd6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/core/explicit_operator_bool.hpp @@ -0,0 +1,154 @@ +/* + * Copyright Andrey Semashev 2007 - 2013. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + */ + +/*! + * \file explicit_operator_bool.hpp + * \author Andrey Semashev + * \date 08.03.2009 + * + * This header defines a compatibility macro that implements an unspecified + * \c bool operator idiom, which is superseded with explicit conversion operators in + * C++11. + */ + +#ifndef BOOST_CORE_EXPLICIT_OPERATOR_BOOL_HPP +#define BOOST_CORE_EXPLICIT_OPERATOR_BOOL_HPP + +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +#if !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) + +/*! + * \brief The macro defines an explicit operator of conversion to \c bool + * + * The macro should be used inside the definition of a class that has to + * support the conversion. The class should also implement operator!, + * in terms of which the conversion operator will be implemented. + */ +#define BOOST_EXPLICIT_OPERATOR_BOOL()\ + BOOST_FORCEINLINE explicit operator bool () const\ + {\ + return !this->operator! ();\ + } + +/*! + * \brief The macro defines a noexcept explicit operator of conversion to \c bool + * + * The macro should be used inside the definition of a class that has to + * support the conversion. The class should also implement operator!, + * in terms of which the conversion operator will be implemented. + */ +#define BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()\ + BOOST_FORCEINLINE explicit operator bool () const BOOST_NOEXCEPT\ + {\ + return !this->operator! ();\ + } + +/*! + * \brief The macro defines a constexpr explicit operator of conversion to \c bool + * + * The macro should be used inside the definition of a class that has to + * support the conversion. The class should also implement operator!, + * in terms of which the conversion operator will be implemented. + */ +#define BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL()\ + BOOST_FORCEINLINE BOOST_CONSTEXPR explicit operator bool () const BOOST_NOEXCEPT\ + {\ + return !this->operator! ();\ + } + +#else // !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) + +#if (defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530)) && !defined(BOOST_NO_COMPILER_CONFIG) +// Sun C++ 5.3 can't handle the safe_bool idiom, so don't use it +#define BOOST_NO_UNSPECIFIED_BOOL +#endif // (defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530)) && !defined(BOOST_NO_COMPILER_CONFIG) + +#if !defined(BOOST_NO_UNSPECIFIED_BOOL) + +namespace boost { + +namespace detail { + +#if !defined(_MSC_VER) && !defined(__IBMCPP__) + + struct unspecified_bool + { + // NOTE TO THE USER: If you see this in error messages then you tried + // to apply an unsupported operator on the object that supports + // explicit conversion to bool. + struct OPERATORS_NOT_ALLOWED; + static void true_value(OPERATORS_NOT_ALLOWED*) {} + }; + typedef void (*unspecified_bool_type)(unspecified_bool::OPERATORS_NOT_ALLOWED*); + +#else + + // MSVC and VACPP are too eager to convert pointer to function to void* even though they shouldn't + struct unspecified_bool + { + // NOTE TO THE USER: If you see this in error messages then you tried + // to apply an unsupported operator on the object that supports + // explicit conversion to bool. + struct OPERATORS_NOT_ALLOWED; + void true_value(OPERATORS_NOT_ALLOWED*) {} + }; + typedef void (unspecified_bool::*unspecified_bool_type)(unspecified_bool::OPERATORS_NOT_ALLOWED*); + +#endif + +} // namespace detail + +} // namespace boost + +#define BOOST_EXPLICIT_OPERATOR_BOOL()\ + BOOST_FORCEINLINE operator boost::detail::unspecified_bool_type () const\ + {\ + return (!this->operator! () ? &boost::detail::unspecified_bool::true_value : (boost::detail::unspecified_bool_type)0);\ + } + +#define BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()\ + BOOST_FORCEINLINE operator boost::detail::unspecified_bool_type () const BOOST_NOEXCEPT\ + {\ + return (!this->operator! () ? &boost::detail::unspecified_bool::true_value : (boost::detail::unspecified_bool_type)0);\ + } + +#define BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL()\ + BOOST_FORCEINLINE BOOST_CONSTEXPR operator boost::detail::unspecified_bool_type () const BOOST_NOEXCEPT\ + {\ + return (!this->operator! () ? &boost::detail::unspecified_bool::true_value : (boost::detail::unspecified_bool_type)0);\ + } + +#else // !defined(BOOST_NO_UNSPECIFIED_BOOL) + +#define BOOST_EXPLICIT_OPERATOR_BOOL()\ + BOOST_FORCEINLINE operator bool () const\ + {\ + return !this->operator! ();\ + } + +#define BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()\ + BOOST_FORCEINLINE operator bool () const BOOST_NOEXCEPT\ + {\ + return !this->operator! ();\ + } + +#define BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL()\ + BOOST_FORCEINLINE BOOST_CONSTEXPR operator bool () const BOOST_NOEXCEPT\ + {\ + return !this->operator! ();\ + } + +#endif // !defined(BOOST_NO_UNSPECIFIED_BOOL) + +#endif // !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) + +#endif // BOOST_CORE_EXPLICIT_OPERATOR_BOOL_HPP diff --git a/ThirdParty/boost-Subset/boost/core/ignore_unused.hpp b/ThirdParty/boost-Subset/boost/core/ignore_unused.hpp new file mode 100644 index 0000000000..994e5f6476 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/core/ignore_unused.hpp @@ -0,0 +1,70 @@ +// Copyright (c) 2014 Adam Wulkiewicz, Lodz, Poland. +// +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_CORE_IGNORE_UNUSED_HPP +#define BOOST_CORE_IGNORE_UNUSED_HPP + +#include + +namespace boost { + +#ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(Ts const& ...) +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused() +{} + +#else + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&) +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&, T2 const&) +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&, T2 const&, T3 const&) +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&, T2 const&, T3 const&, T4 const&) +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&, T2 const&, T3 const&, T4 const&, T5 const&) +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused() +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused() +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused() +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused() +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused() +{} + +#endif + +} // namespace boost + +#endif // BOOST_CORE_IGNORE_UNUSED_HPP diff --git a/ThirdParty/boost-Subset/boost/core/is_same.hpp b/ThirdParty/boost-Subset/boost/core/is_same.hpp new file mode 100644 index 0000000000..f373c654d5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/core/is_same.hpp @@ -0,0 +1,40 @@ +#ifndef BOOST_CORE_IS_SAME_HPP_INCLUDED +#define BOOST_CORE_IS_SAME_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// is_same::value is true when T1 == T2 +// +// Copyright 2014 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include + +namespace boost +{ + +namespace core +{ + +template< class T1, class T2 > struct is_same +{ + BOOST_STATIC_CONSTANT( bool, value = false ); +}; + +template< class T > struct is_same< T, T > +{ + BOOST_STATIC_CONSTANT( bool, value = true ); +}; + +} // namespace core + +} // namespace boost + +#endif // #ifndef BOOST_CORE_IS_SAME_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/core/lightweight_test.hpp b/ThirdParty/boost-Subset/boost/core/lightweight_test.hpp new file mode 100644 index 0000000000..cdc8a72d8b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/core/lightweight_test.hpp @@ -0,0 +1,171 @@ +#ifndef BOOST_CORE_LIGHTWEIGHT_TEST_HPP +#define BOOST_CORE_LIGHTWEIGHT_TEST_HPP + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) +# pragma once +#endif + +// +// boost/core/lightweight_test.hpp - lightweight test library +// +// Copyright (c) 2002, 2009, 2014 Peter Dimov +// Copyright (2) Beman Dawes 2010, 2011 +// Copyright (3) Ion Gaztanaga 2013 +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// + +#include +#include +#include +#include + +// IDE's like Visual Studio perform better if output goes to std::cout or +// some other stream, so allow user to configure output stream: +#ifndef BOOST_LIGHTWEIGHT_TEST_OSTREAM +# define BOOST_LIGHTWEIGHT_TEST_OSTREAM std::cerr +#endif + +namespace boost +{ + +namespace detail +{ + +struct report_errors_reminder +{ + bool called_report_errors_function; + + report_errors_reminder() : called_report_errors_function(false) {} + + ~report_errors_reminder() + { + BOOST_ASSERT(called_report_errors_function); // verify report_errors() was called + } +}; + +inline report_errors_reminder& report_errors_remind() +{ + static report_errors_reminder r; + return r; +} + +inline int & test_errors() +{ + static int x = 0; + report_errors_remind(); + return x; +} + +inline void test_failed_impl(char const * expr, char const * file, int line, char const * function) +{ + BOOST_LIGHTWEIGHT_TEST_OSTREAM + << file << "(" << line << "): test '" << expr << "' failed in function '" + << function << "'" << std::endl; + ++test_errors(); +} + +inline void error_impl(char const * msg, char const * file, int line, char const * function) +{ + BOOST_LIGHTWEIGHT_TEST_OSTREAM + << file << "(" << line << "): " << msg << " in function '" + << function << "'" << std::endl; + ++test_errors(); +} + +inline void throw_failed_impl(char const * excep, char const * file, int line, char const * function) +{ + BOOST_LIGHTWEIGHT_TEST_OSTREAM + << file << "(" << line << "): Exception '" << excep << "' not thrown in function '" + << function << "'" << std::endl; + ++test_errors(); +} + +template inline void test_eq_impl( char const * expr1, char const * expr2, + char const * file, int line, char const * function, T const & t, U const & u ) +{ + if( t == u ) + { + report_errors_remind(); + } + else + { + BOOST_LIGHTWEIGHT_TEST_OSTREAM + << file << "(" << line << "): test '" << expr1 << " == " << expr2 + << "' failed in function '" << function << "': " + << "'" << t << "' != '" << u << "'" << std::endl; + ++test_errors(); + } +} + +template inline void test_ne_impl( char const * expr1, char const * expr2, + char const * file, int line, char const * function, T const & t, U const & u ) +{ + if( t != u ) + { + report_errors_remind(); + } + else + { + BOOST_LIGHTWEIGHT_TEST_OSTREAM + << file << "(" << line << "): test '" << expr1 << " != " << expr2 + << "' failed in function '" << function << "': " + << "'" << t << "' == '" << u << "'" << std::endl; + ++test_errors(); + } +} + +} // namespace detail + +inline int report_errors() +{ + boost::detail::report_errors_remind().called_report_errors_function = true; + + int errors = boost::detail::test_errors(); + + if( errors == 0 ) + { + BOOST_LIGHTWEIGHT_TEST_OSTREAM + << "No errors detected." << std::endl; + return 0; + } + else + { + BOOST_LIGHTWEIGHT_TEST_OSTREAM + << errors << " error" << (errors == 1? "": "s") << " detected." << std::endl; + return 1; + } +} + +} // namespace boost + +#define BOOST_TEST(expr) ((expr)? (void)0: ::boost::detail::test_failed_impl(#expr, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION)) + +#define BOOST_ERROR(msg) ( ::boost::detail::error_impl(msg, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION) ) + +#define BOOST_TEST_EQ(expr1,expr2) ( ::boost::detail::test_eq_impl(#expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) ) +#define BOOST_TEST_NE(expr1,expr2) ( ::boost::detail::test_ne_impl(#expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) ) + +#ifndef BOOST_NO_EXCEPTIONS + #define BOOST_TEST_THROWS( EXPR, EXCEP ) \ + try { \ + EXPR; \ + ::boost::detail::throw_failed_impl \ + (#EXCEP, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION); \ + } \ + catch(EXCEP const&) { \ + } \ + catch(...) { \ + ::boost::detail::throw_failed_impl \ + (#EXCEP, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION); \ + } \ + // +#else + #define BOOST_TEST_THROWS( EXPR, EXCEP ) +#endif + +#endif // #ifndef BOOST_CORE_LIGHTWEIGHT_TEST_HPP diff --git a/ThirdParty/boost-Subset/boost/core/no_exceptions_support.hpp b/ThirdParty/boost-Subset/boost/core/no_exceptions_support.hpp new file mode 100644 index 0000000000..a697f01a52 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/core/no_exceptions_support.hpp @@ -0,0 +1,44 @@ +#ifndef BOOST_CORE_NO_EXCEPTIONS_SUPPORT_HPP +#define BOOST_CORE_NO_EXCEPTIONS_SUPPORT_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +//---------------------------------------------------------------------- +// (C) Copyright 2004 Pavel Vozenilek. +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// +// This file contains helper macros used when exception support may be +// disabled (as indicated by macro BOOST_NO_EXCEPTIONS). +// +// Before picking up these macros you may consider using RAII techniques +// to deal with exceptions - their syntax can be always the same with +// or without exception support enabled. +//---------------------------------------------------------------------- + +#include +#include + +#if !(defined BOOST_NO_EXCEPTIONS) +# define BOOST_TRY { try +# define BOOST_CATCH(x) catch(x) +# define BOOST_RETHROW throw; +# define BOOST_CATCH_END } +#else +# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +# define BOOST_TRY { if ("") +# define BOOST_CATCH(x) else if (!"") +# else +# define BOOST_TRY { if (true) +# define BOOST_CATCH(x) else if (false) +# endif +# define BOOST_RETHROW +# define BOOST_CATCH_END } +#endif + + +#endif diff --git a/ThirdParty/boost-Subset/boost/core/noncopyable.hpp b/ThirdParty/boost-Subset/boost/core/noncopyable.hpp new file mode 100644 index 0000000000..6ae8c244dd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/core/noncopyable.hpp @@ -0,0 +1,48 @@ +// Boost noncopyable.hpp header file --------------------------------------// + +// (C) Copyright Beman Dawes 1999-2003. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/utility for documentation. + +#ifndef BOOST_CORE_NONCOPYABLE_HPP +#define BOOST_CORE_NONCOPYABLE_HPP + +#include + +namespace boost { + +// Private copy constructor and copy assignment ensure classes derived from +// class noncopyable cannot be copied. + +// Contributed by Dave Abrahams + +namespace noncopyable_ // protection from unintended ADL +{ + class noncopyable + { + protected: +#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS) + BOOST_CONSTEXPR noncopyable() = default; + ~noncopyable() = default; +#else + noncopyable() {} + ~noncopyable() {} +#endif +#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) + noncopyable( const noncopyable& ) = delete; + noncopyable& operator=( const noncopyable& ) = delete; +#else + private: // emphasize the following members are private + noncopyable( const noncopyable& ); + noncopyable& operator=( const noncopyable& ); +#endif + }; +} + +typedef noncopyable_::noncopyable noncopyable; + +} // namespace boost + +#endif // BOOST_CORE_NONCOPYABLE_HPP diff --git a/ThirdParty/boost-Subset/boost/core/ref.hpp b/ThirdParty/boost-Subset/boost/core/ref.hpp new file mode 100644 index 0000000000..47dc858007 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/core/ref.hpp @@ -0,0 +1,301 @@ +#ifndef BOOST_CORE_REF_HPP +#define BOOST_CORE_REF_HPP + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include +#include + +// +// ref.hpp - ref/cref, useful helper functions +// +// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi) +// Copyright (C) 2001, 2002 Peter Dimov +// Copyright (C) 2002 David Abrahams +// +// Copyright (C) 2014 Glen Joseph Fernandes +// glenfe at live dot com +// Copyright (C) 2014 Agustin Berge +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/core/doc/html/core/ref.html for documentation. +// + +/** + @file +*/ + +/** + Boost namespace. +*/ +namespace boost +{ + +#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1600 ) + + struct ref_workaround_tag {}; + +#endif + +// reference_wrapper + +/** + @brief Contains a reference to an object of type `T`. + + `reference_wrapper` is primarily used to "feed" references to + function templates (algorithms) that take their parameter by + value. It provides an implicit conversion to `T&`, which + usually allows the function templates to work on references + unmodified. +*/ +template class reference_wrapper +{ +public: + /** + Type `T`. + */ + typedef T type; + + /** + Constructs a `reference_wrapper` object that stores a + reference to `t`. + + @remark Does not throw. + */ + BOOST_FORCEINLINE explicit reference_wrapper(T& t): t_(boost::addressof(t)) {} + +#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1600 ) + + BOOST_FORCEINLINE explicit reference_wrapper( T & t, ref_workaround_tag ): t_( boost::addressof( t ) ) {} + +#endif + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + /** + @remark Construction from a temporary object is disabled. + */ + BOOST_DELETED_FUNCTION(reference_wrapper(T&& t)) +public: +#endif + + /** + @return The stored reference. + @remark Does not throw. + */ + BOOST_FORCEINLINE operator T& () const { return *t_; } + + /** + @return The stored reference. + @remark Does not throw. + */ + BOOST_FORCEINLINE T& get() const { return *t_; } + + /** + @return A pointer to the object referenced by the stored + reference. + @remark Does not throw. + */ + BOOST_FORCEINLINE T* get_pointer() const { return t_; } + +private: + + T* t_; +}; + +// ref + +/** + @cond +*/ +#if defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) ) +# define BOOST_REF_CONST +#else +# define BOOST_REF_CONST const +#endif +/** + @endcond +*/ + +/** + @return `reference_wrapper(t)` + @remark Does not throw. +*/ +template BOOST_FORCEINLINE reference_wrapper BOOST_REF_CONST ref( T & t ) +{ +#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1600 ) + + return reference_wrapper( t, ref_workaround_tag() ); + +#else + + return reference_wrapper( t ); + +#endif +} + +// cref + +/** + @return `reference_wrapper(t)` + @remark Does not throw. +*/ +template BOOST_FORCEINLINE reference_wrapper BOOST_REF_CONST cref( T const & t ) +{ + return reference_wrapper(t); +} + +#undef BOOST_REF_CONST + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + +/** + @cond +*/ +#if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) +# define BOOST_REF_DELETE +#else +# define BOOST_REF_DELETE = delete +#endif +/** + @endcond +*/ + +/** + @remark Construction from a temporary object is disabled. +*/ +template void ref(T const&&) BOOST_REF_DELETE; + +/** + @remark Construction from a temporary object is disabled. +*/ +template void cref(T const&&) BOOST_REF_DELETE; + +#undef BOOST_REF_DELETE + +#endif + +// is_reference_wrapper + +/** + @brief Determine if a type `T` is an instantiation of + `reference_wrapper`. + + The value static constant will be true if the type `T` is a + specialization of `reference_wrapper`. +*/ +template struct is_reference_wrapper +{ + BOOST_STATIC_CONSTANT( bool, value = false ); +}; + +/** + @cond +*/ +template struct is_reference_wrapper< reference_wrapper > +{ + BOOST_STATIC_CONSTANT( bool, value = true ); +}; + +#if !defined(BOOST_NO_CV_SPECIALIZATIONS) + +template struct is_reference_wrapper< reference_wrapper const > +{ + BOOST_STATIC_CONSTANT( bool, value = true ); +}; + +template struct is_reference_wrapper< reference_wrapper volatile > +{ + BOOST_STATIC_CONSTANT( bool, value = true ); +}; + +template struct is_reference_wrapper< reference_wrapper const volatile > +{ + BOOST_STATIC_CONSTANT( bool, value = true ); +}; + +#endif // !defined(BOOST_NO_CV_SPECIALIZATIONS) + +/** + @endcond +*/ + + +// unwrap_reference + +/** + @brief Find the type in a `reference_wrapper`. + + The `typedef` type is `T::type` if `T` is a + `reference_wrapper`, `T` otherwise. +*/ +template struct unwrap_reference +{ + typedef T type; +}; + +/** + @cond +*/ +template struct unwrap_reference< reference_wrapper > +{ + typedef T type; +}; + +#if !defined(BOOST_NO_CV_SPECIALIZATIONS) + +template struct unwrap_reference< reference_wrapper const > +{ + typedef T type; +}; + +template struct unwrap_reference< reference_wrapper volatile > +{ + typedef T type; +}; + +template struct unwrap_reference< reference_wrapper const volatile > +{ + typedef T type; +}; + +#endif // !defined(BOOST_NO_CV_SPECIALIZATIONS) + +/** + @endcond +*/ + +// unwrap_ref + +/** + @return `unwrap_reference::type&(t)` + @remark Does not throw. +*/ +template BOOST_FORCEINLINE typename unwrap_reference::type& unwrap_ref( T & t ) +{ + return t; +} + +// get_pointer + +/** + @cond +*/ +template BOOST_FORCEINLINE T* get_pointer( reference_wrapper const & r ) +{ + return r.get_pointer(); +} +/** + @endcond +*/ + +} // namespace boost + +#endif // #ifndef BOOST_CORE_REF_HPP diff --git a/ThirdParty/boost-Subset/boost/core/scoped_enum.hpp b/ThirdParty/boost-Subset/boost/core/scoped_enum.hpp new file mode 100644 index 0000000000..78c548bf81 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/core/scoped_enum.hpp @@ -0,0 +1,192 @@ +// scoped_enum.hpp ---------------------------------------------------------// + +// Copyright Beman Dawes, 2009 +// Copyright (C) 2011-2012 Vicente J. Botet Escriba +// Copyright (C) 2012 Anthony Williams + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#ifndef BOOST_CORE_SCOPED_ENUM_HPP +#define BOOST_CORE_SCOPED_ENUM_HPP + +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +namespace boost +{ + +#ifdef BOOST_NO_CXX11_SCOPED_ENUMS + + /** + * Meta-function to get the native enum type associated to an enum class or its emulation. + */ + template + struct native_type + { + /** + * The member typedef type names the native enum type associated to the scoped enum, + * which is it self if the compiler supports scoped enums or EnumType::enum_type if it is an emulated scoped enum. + */ + typedef typename EnumType::enum_type type; + }; + + /** + * Casts a scoped enum to its underlying type. + * + * This function is useful when working with scoped enum classes, which doens't implicitly convert to the underlying type. + * @param v A scoped enum. + * @returns The underlying type. + * @throws No-throws. + */ + template + UnderlyingType underlying_cast(EnumType v) + { + return v.get_underlying_value_(); + } + + /** + * Casts a scoped enum to its native enum type. + * + * This function is useful to make programs portable when the scoped enum emulation can not be use where native enums can. + * + * EnumType the scoped enum type + * + * @param v A scoped enum. + * @returns The native enum value. + * @throws No-throws. + */ + template + inline + typename EnumType::enum_type native_value(EnumType e) + { + return e.get_native_value_(); + } + +#else // BOOST_NO_CXX11_SCOPED_ENUMS + + template + struct native_type + { + typedef EnumType type; + }; + + template + UnderlyingType underlying_cast(EnumType v) + { + return static_cast(v); + } + + template + inline + EnumType native_value(EnumType e) + { + return e; + } + +#endif // BOOST_NO_CXX11_SCOPED_ENUMS +} + + +#ifdef BOOST_NO_CXX11_SCOPED_ENUMS + +#ifndef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS + +#define BOOST_SCOPED_ENUM_UT_DECLARE_CONVERSION_OPERATOR \ + explicit operator underlying_type() const BOOST_NOEXCEPT { return get_underlying_value_(); } + +#else + +#define BOOST_SCOPED_ENUM_UT_DECLARE_CONVERSION_OPERATOR + +#endif + +/** + * Start a declaration of a scoped enum. + * + * @param EnumType The new scoped enum. + * @param UnderlyingType The underlying type. + */ +#define BOOST_SCOPED_ENUM_UT_DECLARE_BEGIN(EnumType, UnderlyingType) \ + struct EnumType { \ + typedef void is_boost_scoped_enum_tag; \ + typedef UnderlyingType underlying_type; \ + EnumType() BOOST_NOEXCEPT {} \ + explicit EnumType(underlying_type v) BOOST_NOEXCEPT : v_(v) {} \ + underlying_type get_underlying_value_() const BOOST_NOEXCEPT { return v_; } \ + BOOST_SCOPED_ENUM_UT_DECLARE_CONVERSION_OPERATOR \ + private: \ + underlying_type v_; \ + typedef EnumType self_type; \ + public: \ + enum enum_type + +#define BOOST_SCOPED_ENUM_DECLARE_END2() \ + enum_type get_native_value_() const BOOST_NOEXCEPT { return enum_type(v_); } \ + friend bool operator ==(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)==enum_type(rhs.v_); } \ + friend bool operator ==(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)==rhs; } \ + friend bool operator ==(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs==enum_type(rhs.v_); } \ + friend bool operator !=(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)!=enum_type(rhs.v_); } \ + friend bool operator !=(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)!=rhs; } \ + friend bool operator !=(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs!=enum_type(rhs.v_); } \ + friend bool operator <(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)>enum_type(rhs.v_); } \ + friend bool operator >(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)>rhs; } \ + friend bool operator >(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs>enum_type(rhs.v_); } \ + friend bool operator >=(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)>=enum_type(rhs.v_); } \ + friend bool operator >=(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)>=rhs; } \ + friend bool operator >=(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs>=enum_type(rhs.v_); } \ + }; + +#define BOOST_SCOPED_ENUM_DECLARE_END(EnumType) \ + ; \ + EnumType(enum_type v) BOOST_NOEXCEPT : v_(v) {} \ + BOOST_SCOPED_ENUM_DECLARE_END2() + +/** + * Starts a declaration of a scoped enum with the default int underlying type. + * + * @param EnumType The new scoped enum. + */ +#define BOOST_SCOPED_ENUM_DECLARE_BEGIN(EnumType) \ + BOOST_SCOPED_ENUM_UT_DECLARE_BEGIN(EnumType,int) + +/** + * Name of the native enum type. + * + * @param EnumType The new scoped enum. + */ +#define BOOST_SCOPED_ENUM_NATIVE(EnumType) EnumType::enum_type +/** + * Forward declares an scoped enum. + * + * @param EnumType The scoped enum. + */ +#define BOOST_SCOPED_ENUM_FORWARD_DECLARE(EnumType) struct EnumType + +#else // BOOST_NO_CXX11_SCOPED_ENUMS + +#define BOOST_SCOPED_ENUM_UT_DECLARE_BEGIN(EnumType,UnderlyingType) enum class EnumType : UnderlyingType +#define BOOST_SCOPED_ENUM_DECLARE_BEGIN(EnumType) enum class EnumType +#define BOOST_SCOPED_ENUM_DECLARE_END2() +#define BOOST_SCOPED_ENUM_DECLARE_END(EnumType) ; + +#define BOOST_SCOPED_ENUM_NATIVE(EnumType) EnumType +#define BOOST_SCOPED_ENUM_FORWARD_DECLARE(EnumType) enum class EnumType + +#endif // BOOST_NO_CXX11_SCOPED_ENUMS + +// Deprecated macros +#define BOOST_SCOPED_ENUM_START(name) BOOST_SCOPED_ENUM_DECLARE_BEGIN(name) +#define BOOST_SCOPED_ENUM_END BOOST_SCOPED_ENUM_DECLARE_END2() +#define BOOST_SCOPED_ENUM(name) BOOST_SCOPED_ENUM_NATIVE(name) + +#endif // BOOST_CORE_SCOPED_ENUM_HPP diff --git a/ThirdParty/boost-Subset/boost/core/swap.hpp b/ThirdParty/boost-Subset/boost/core/swap.hpp new file mode 100644 index 0000000000..baa1be970d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/core/swap.hpp @@ -0,0 +1,60 @@ +// Copyright (C) 2007, 2008 Steven Watanabe, Joseph Gauterin, Niels Dekker +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// For more information, see http://www.boost.org + + +#ifndef BOOST_CORE_SWAP_HPP +#define BOOST_CORE_SWAP_HPP + +// Note: the implementation of this utility contains various workarounds: +// - swap_impl is put outside the boost namespace, to avoid infinite +// recursion (causing stack overflow) when swapping objects of a primitive +// type. +// - swap_impl has a using-directive, rather than a using-declaration, +// because some compilers (including MSVC 7.1, Borland 5.9.3, and +// Intel 8.1) don't do argument-dependent lookup when it has a +// using-declaration instead. +// - boost::swap has two template arguments, instead of one, to +// avoid ambiguity when swapping objects of a Boost type that does +// not have its own boost::swap overload. + +#include //for std::swap (C++11) +#include //for std::swap (C++98) +#include //for std::size_t +#include + +namespace boost_swap_impl +{ + template + BOOST_GPU_ENABLED + void swap_impl(T& left, T& right) + { + using namespace std;//use std::swap if argument dependent lookup fails + swap(left,right); + } + + template + BOOST_GPU_ENABLED + void swap_impl(T (& left)[N], T (& right)[N]) + { + for (std::size_t i = 0; i < N; ++i) + { + ::boost_swap_impl::swap_impl(left[i], right[i]); + } + } +} + +namespace boost +{ + template + BOOST_GPU_ENABLED + void swap(T1& left, T2& right) + { + ::boost_swap_impl::swap_impl(left, right); + } +} + +#endif diff --git a/ThirdParty/boost-Subset/boost/core/typeinfo.hpp b/ThirdParty/boost-Subset/boost/core/typeinfo.hpp new file mode 100644 index 0000000000..e67b4a3198 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/core/typeinfo.hpp @@ -0,0 +1,151 @@ +#ifndef BOOST_CORE_TYPEINFO_HPP_INCLUDED +#define BOOST_CORE_TYPEINFO_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// core::typeinfo, BOOST_CORE_TYPEID +// +// Copyright 2007, 2014 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include + +#if defined( BOOST_NO_TYPEID ) + +#include +#include + +namespace boost +{ + +namespace core +{ + +class typeinfo +{ +private: + + typeinfo( typeinfo const& ); + typeinfo& operator=( typeinfo const& ); + + char const * name_; + +public: + + explicit typeinfo( char const * name ): name_( name ) + { + } + + bool operator==( typeinfo const& rhs ) const + { + return this == &rhs; + } + + bool operator!=( typeinfo const& rhs ) const + { + return this != &rhs; + } + + bool before( typeinfo const& rhs ) const + { + return std::less< typeinfo const* >()( this, &rhs ); + } + + char const* name() const + { + return name_; + } +}; + +inline char const * demangled_name( core::typeinfo const & ti ) +{ + return ti.name(); +} + +} // namespace core + +namespace detail +{ + +template struct core_typeid_ +{ + static boost::core::typeinfo ti_; + + static char const * name() + { + return BOOST_CURRENT_FUNCTION; + } +}; + +#if defined(__SUNPRO_CC) +// see #4199, the Sun Studio compiler gets confused about static initialization +// constructor arguments. But an assignment works just fine. +template boost::core::typeinfo core_typeid_< T >::ti_ = core_typeid_< T >::name(); +#else +template boost::core::typeinfo core_typeid_< T >::ti_(core_typeid_< T >::name()); +#endif + +template struct core_typeid_< T & >: core_typeid_< T > +{ +}; + +template struct core_typeid_< T const >: core_typeid_< T > +{ +}; + +template struct core_typeid_< T volatile >: core_typeid_< T > +{ +}; + +template struct core_typeid_< T const volatile >: core_typeid_< T > +{ +}; + +} // namespace detail + +} // namespace boost + +#define BOOST_CORE_TYPEID(T) (boost::detail::core_typeid_::ti_) + +#else + +#include +#include + +namespace boost +{ + +namespace core +{ + +#if defined( BOOST_NO_STD_TYPEINFO ) + +typedef ::type_info typeinfo; + +#else + +typedef std::type_info typeinfo; + +#endif + +inline std::string demangled_name( core::typeinfo const & ti ) +{ + return core::demangle( ti.name() ); +} + +} // namespace core + +} // namespace boost + +#define BOOST_CORE_TYPEID(T) typeid(T) + +#endif + +#endif // #ifndef BOOST_CORE_TYPEINFO_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/cstdint.hpp b/ThirdParty/boost-Subset/boost/cstdint.hpp new file mode 100644 index 0000000000..69888352da --- /dev/null +++ b/ThirdParty/boost-Subset/boost/cstdint.hpp @@ -0,0 +1,546 @@ +// boost cstdint.hpp header file ------------------------------------------// + +// (C) Copyright Beman Dawes 1999. +// (C) Copyright Jens Mauer 2001 +// (C) Copyright John Maddock 2001 +// Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/integer for documentation. + +// Revision History +// 31 Oct 01 use BOOST_HAS_LONG_LONG to check for "long long" (Jens M.) +// 16 Apr 01 check LONGLONG_MAX when looking for "long long" (Jens Maurer) +// 23 Jan 01 prefer "long" over "int" for int32_t and intmax_t (Jens Maurer) +// 12 Nov 00 Merged (Jens Maurer) +// 23 Sep 00 Added INTXX_C macro support (John Maddock). +// 22 Sep 00 Better 64-bit support (John Maddock) +// 29 Jun 00 Reimplement to avoid including stdint.h within namespace boost +// 8 Aug 99 Initial version (Beman Dawes) + + +#ifndef BOOST_CSTDINT_HPP +#define BOOST_CSTDINT_HPP + +// +// Since we always define the INT#_C macros as per C++0x, +// define __STDC_CONSTANT_MACROS so that does the right +// thing if possible, and so that the user knows that the macros +// are actually defined as per C99. +// +#ifndef __STDC_CONSTANT_MACROS +# define __STDC_CONSTANT_MACROS +#endif + +#include + +// +// Note that GLIBC is a bit inconsistent about whether int64_t is defined or not +// depending upon what headers happen to have been included first... +// so we disable use of stdint.h when GLIBC does not define __GLIBC_HAVE_LONG_LONG. +// See https://svn.boost.org/trac/boost/ticket/3548 and http://sources.redhat.com/bugzilla/show_bug.cgi?id=10990 +// +#if defined(BOOST_HAS_STDINT_H) \ + && (!defined(__GLIBC__) \ + || defined(__GLIBC_HAVE_LONG_LONG) \ + || (defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 17))))) + +// The following #include is an implementation artifact; not part of interface. +# ifdef __hpux +// HP-UX has a vaguely nice in a non-standard location +# include +# ifdef __STDC_32_MODE__ + // this is triggered with GCC, because it defines __cplusplus < 199707L +# define BOOST_NO_INT64_T +# endif +# elif defined(__FreeBSD__) || defined(__IBMCPP__) || defined(_AIX) +# include +# else +# include + +// There is a bug in Cygwin two _C macros +# if defined(__STDC_CONSTANT_MACROS) && defined(__CYGWIN__) +# undef INTMAX_C +# undef UINTMAX_C +# define INTMAX_C(c) c##LL +# define UINTMAX_C(c) c##ULL +# endif + +# endif + +#ifdef __QNX__ + +// QNX (Dinkumware stdlib) defines these as non-standard names. +// Reflect to the standard names. + +typedef ::intleast8_t int_least8_t; +typedef ::intfast8_t int_fast8_t; +typedef ::uintleast8_t uint_least8_t; +typedef ::uintfast8_t uint_fast8_t; + +typedef ::intleast16_t int_least16_t; +typedef ::intfast16_t int_fast16_t; +typedef ::uintleast16_t uint_least16_t; +typedef ::uintfast16_t uint_fast16_t; + +typedef ::intleast32_t int_least32_t; +typedef ::intfast32_t int_fast32_t; +typedef ::uintleast32_t uint_least32_t; +typedef ::uintfast32_t uint_fast32_t; + +# ifndef BOOST_NO_INT64_T + +typedef ::intleast64_t int_least64_t; +typedef ::intfast64_t int_fast64_t; +typedef ::uintleast64_t uint_least64_t; +typedef ::uintfast64_t uint_fast64_t; + +# endif + +#endif + +namespace boost +{ + + using ::int8_t; + using ::int_least8_t; + using ::int_fast8_t; + using ::uint8_t; + using ::uint_least8_t; + using ::uint_fast8_t; + + using ::int16_t; + using ::int_least16_t; + using ::int_fast16_t; + using ::uint16_t; + using ::uint_least16_t; + using ::uint_fast16_t; + + using ::int32_t; + using ::int_least32_t; + using ::int_fast32_t; + using ::uint32_t; + using ::uint_least32_t; + using ::uint_fast32_t; + +# ifndef BOOST_NO_INT64_T + + using ::int64_t; + using ::int_least64_t; + using ::int_fast64_t; + using ::uint64_t; + using ::uint_least64_t; + using ::uint_fast64_t; + +# endif + + using ::intmax_t; + using ::uintmax_t; + +} // namespace boost + +#elif defined(__FreeBSD__) && (__FreeBSD__ <= 4) || defined(__osf__) || defined(__VMS) || defined(__SOLARIS9__) || defined(__NetBSD__) +// FreeBSD and Tru64 have an that contains much of what we need. +# include + +namespace boost { + + using ::int8_t; + typedef int8_t int_least8_t; + typedef int8_t int_fast8_t; + using ::uint8_t; + typedef uint8_t uint_least8_t; + typedef uint8_t uint_fast8_t; + + using ::int16_t; + typedef int16_t int_least16_t; + typedef int16_t int_fast16_t; + using ::uint16_t; + typedef uint16_t uint_least16_t; + typedef uint16_t uint_fast16_t; + + using ::int32_t; + typedef int32_t int_least32_t; + typedef int32_t int_fast32_t; + using ::uint32_t; + typedef uint32_t uint_least32_t; + typedef uint32_t uint_fast32_t; + +# ifndef BOOST_NO_INT64_T + + using ::int64_t; + typedef int64_t int_least64_t; + typedef int64_t int_fast64_t; + using ::uint64_t; + typedef uint64_t uint_least64_t; + typedef uint64_t uint_fast64_t; + + typedef int64_t intmax_t; + typedef uint64_t uintmax_t; + +# else + + typedef int32_t intmax_t; + typedef uint32_t uintmax_t; + +# endif + +} // namespace boost + +#else // BOOST_HAS_STDINT_H + +# include // implementation artifact; not part of interface +# include // needed for limits macros + + +namespace boost +{ + +// These are fairly safe guesses for some 16-bit, and most 32-bit and 64-bit +// platforms. For other systems, they will have to be hand tailored. +// +// Because the fast types are assumed to be the same as the undecorated types, +// it may be possible to hand tailor a more efficient implementation. Such +// an optimization may be illusionary; on the Intel x86-family 386 on, for +// example, byte arithmetic and load/stores are as fast as "int" sized ones. + +// 8-bit types ------------------------------------------------------------// + +# if UCHAR_MAX == 0xff + typedef signed char int8_t; + typedef signed char int_least8_t; + typedef signed char int_fast8_t; + typedef unsigned char uint8_t; + typedef unsigned char uint_least8_t; + typedef unsigned char uint_fast8_t; +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif + +// 16-bit types -----------------------------------------------------------// + +# if USHRT_MAX == 0xffff +# if defined(__crayx1) + // The Cray X1 has a 16-bit short, however it is not recommend + // for use in performance critical code. + typedef short int16_t; + typedef short int_least16_t; + typedef int int_fast16_t; + typedef unsigned short uint16_t; + typedef unsigned short uint_least16_t; + typedef unsigned int uint_fast16_t; +# else + typedef short int16_t; + typedef short int_least16_t; + typedef short int_fast16_t; + typedef unsigned short uint16_t; + typedef unsigned short uint_least16_t; + typedef unsigned short uint_fast16_t; +# endif +# elif (USHRT_MAX == 0xffffffff) && defined(__MTA__) + // On MTA / XMT short is 32 bits unless the -short16 compiler flag is specified + // MTA / XMT does support the following non-standard integer types + typedef __short16 int16_t; + typedef __short16 int_least16_t; + typedef __short16 int_fast16_t; + typedef unsigned __short16 uint16_t; + typedef unsigned __short16 uint_least16_t; + typedef unsigned __short16 uint_fast16_t; +# elif (USHRT_MAX == 0xffffffff) && defined(CRAY) + // no 16-bit types on Cray: + typedef short int_least16_t; + typedef short int_fast16_t; + typedef unsigned short uint_least16_t; + typedef unsigned short uint_fast16_t; +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif + +// 32-bit types -----------------------------------------------------------// + +# if UINT_MAX == 0xffffffff + typedef int int32_t; + typedef int int_least32_t; + typedef int int_fast32_t; + typedef unsigned int uint32_t; + typedef unsigned int uint_least32_t; + typedef unsigned int uint_fast32_t; +# elif (USHRT_MAX == 0xffffffff) + typedef short int32_t; + typedef short int_least32_t; + typedef short int_fast32_t; + typedef unsigned short uint32_t; + typedef unsigned short uint_least32_t; + typedef unsigned short uint_fast32_t; +# elif ULONG_MAX == 0xffffffff + typedef long int32_t; + typedef long int_least32_t; + typedef long int_fast32_t; + typedef unsigned long uint32_t; + typedef unsigned long uint_least32_t; + typedef unsigned long uint_fast32_t; +# elif (UINT_MAX == 0xffffffffffffffff) && defined(__MTA__) + // Integers are 64 bits on the MTA / XMT + typedef __int32 int32_t; + typedef __int32 int_least32_t; + typedef __int32 int_fast32_t; + typedef unsigned __int32 uint32_t; + typedef unsigned __int32 uint_least32_t; + typedef unsigned __int32 uint_fast32_t; +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif + +// 64-bit types + intmax_t and uintmax_t ----------------------------------// + +# if defined(BOOST_HAS_LONG_LONG) && \ + !defined(BOOST_MSVC) && !defined(__BORLANDC__) && \ + (!defined(__GLIBCPP__) || defined(_GLIBCPP_USE_LONG_LONG)) && \ + (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX)) +# if defined(__hpux) + // HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions +# elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) || (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) || (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL) + // 2**64 - 1 +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif + + typedef ::boost::long_long_type intmax_t; + typedef ::boost::ulong_long_type uintmax_t; + typedef ::boost::long_long_type int64_t; + typedef ::boost::long_long_type int_least64_t; + typedef ::boost::long_long_type int_fast64_t; + typedef ::boost::ulong_long_type uint64_t; + typedef ::boost::ulong_long_type uint_least64_t; + typedef ::boost::ulong_long_type uint_fast64_t; + +# elif ULONG_MAX != 0xffffffff + +# if ULONG_MAX == 18446744073709551615 // 2**64 - 1 + typedef long intmax_t; + typedef unsigned long uintmax_t; + typedef long int64_t; + typedef long int_least64_t; + typedef long int_fast64_t; + typedef unsigned long uint64_t; + typedef unsigned long uint_least64_t; + typedef unsigned long uint_fast64_t; +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif +# elif defined(__GNUC__) && defined(BOOST_HAS_LONG_LONG) + __extension__ typedef long long intmax_t; + __extension__ typedef unsigned long long uintmax_t; + __extension__ typedef long long int64_t; + __extension__ typedef long long int_least64_t; + __extension__ typedef long long int_fast64_t; + __extension__ typedef unsigned long long uint64_t; + __extension__ typedef unsigned long long uint_least64_t; + __extension__ typedef unsigned long long uint_fast64_t; +# elif defined(BOOST_HAS_MS_INT64) + // + // we have Borland/Intel/Microsoft __int64: + // + typedef __int64 intmax_t; + typedef unsigned __int64 uintmax_t; + typedef __int64 int64_t; + typedef __int64 int_least64_t; + typedef __int64 int_fast64_t; + typedef unsigned __int64 uint64_t; + typedef unsigned __int64 uint_least64_t; + typedef unsigned __int64 uint_fast64_t; +# else // assume no 64-bit integers +# define BOOST_NO_INT64_T + typedef int32_t intmax_t; + typedef uint32_t uintmax_t; +# endif + +} // namespace boost + + +#endif // BOOST_HAS_STDINT_H + +// intptr_t/uintptr_t are defined separately because they are optional and not universally available +#if defined(BOOST_WINDOWS) && !defined(_WIN32_WCE) && !defined(BOOST_HAS_STDINT_H) +// Older MSVC don't have stdint.h and have intptr_t/uintptr_t defined in stddef.h +#include +#endif + +// PGI seems to not support intptr_t/uintptr_t properly. BOOST_HAS_STDINT_H is not defined for this compiler by Boost.Config. +#if !defined(__PGIC__) + +#if (defined(BOOST_WINDOWS) && !defined(_WIN32_WCE)) \ + || (defined(_XOPEN_UNIX) && (_XOPEN_UNIX+0 > 0) && !defined(__UCLIBC__)) \ + || defined(__CYGWIN__) \ + || defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) \ + || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(sun) + +namespace boost { + using ::intptr_t; + using ::uintptr_t; +} +#define BOOST_HAS_INTPTR_T + +// Clang pretends to be GCC, so it'll match this condition +#elif defined(__GNUC__) && defined(__INTPTR_TYPE__) && defined(__UINTPTR_TYPE__) + +namespace boost { + typedef __INTPTR_TYPE__ intptr_t; + typedef __UINTPTR_TYPE__ uintptr_t; +} +#define BOOST_HAS_INTPTR_T + +#endif + +#endif // !defined(__PGIC__) + +#endif // BOOST_CSTDINT_HPP + + +/**************************************************** + +Macro definition section: + +Added 23rd September 2000 (John Maddock). +Modified 11th September 2001 to be excluded when +BOOST_HAS_STDINT_H is defined (John Maddock). +Modified 11th Dec 2009 to always define the +INT#_C macros if they're not already defined (John Maddock). + +******************************************************/ + +#if !defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && \ + (!defined(INT8_C) || !defined(INT16_C) || !defined(INT32_C) || !defined(INT64_C)) +// +// For the following code we get several warnings along the lines of: +// +// boost/cstdint.hpp:428:35: error: use of C99 long long integer constant +// +// So we declare this a system header to suppress these warnings. +// +#if defined(__GNUC__) && (__GNUC__ >= 4) +#pragma GCC system_header +#endif + +#include +# define BOOST__STDC_CONSTANT_MACROS_DEFINED +# if defined(BOOST_HAS_MS_INT64) +// +// Borland/Intel/Microsoft compilers have width specific suffixes: +// +#ifndef INT8_C +# define INT8_C(value) value##i8 +#endif +#ifndef INT16_C +# define INT16_C(value) value##i16 +#endif +#ifndef INT32_C +# define INT32_C(value) value##i32 +#endif +#ifndef INT64_C +# define INT64_C(value) value##i64 +#endif +# ifdef __BORLANDC__ + // Borland bug: appending ui8 makes the type a signed char +# define UINT8_C(value) static_cast(value##u) +# else +# define UINT8_C(value) value##ui8 +# endif +#ifndef UINT16_C +# define UINT16_C(value) value##ui16 +#endif +#ifndef UINT32_C +# define UINT32_C(value) value##ui32 +#endif +#ifndef UINT64_C +# define UINT64_C(value) value##ui64 +#endif +#ifndef INTMAX_C +# define INTMAX_C(value) value##i64 +# define UINTMAX_C(value) value##ui64 +#endif + +# else +// do it the old fashioned way: + +// 8-bit types ------------------------------------------------------------// + +# if (UCHAR_MAX == 0xff) && !defined(INT8_C) +# define INT8_C(value) static_cast(value) +# define UINT8_C(value) static_cast(value##u) +# endif + +// 16-bit types -----------------------------------------------------------// + +# if (USHRT_MAX == 0xffff) && !defined(INT16_C) +# define INT16_C(value) static_cast(value) +# define UINT16_C(value) static_cast(value##u) +# endif + +// 32-bit types -----------------------------------------------------------// +#ifndef INT32_C +# if (UINT_MAX == 0xffffffff) +# define INT32_C(value) value +# define UINT32_C(value) value##u +# elif ULONG_MAX == 0xffffffff +# define INT32_C(value) value##L +# define UINT32_C(value) value##uL +# endif +#endif + +// 64-bit types + intmax_t and uintmax_t ----------------------------------// +#ifndef INT64_C +# if defined(BOOST_HAS_LONG_LONG) && \ + (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX) || defined(_ULLONG_MAX) || defined(_LLONG_MAX)) + +# if defined(__hpux) + // HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions +# define INT64_C(value) value##LL +# define UINT64_C(value) value##uLL +# elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) || \ + (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) || \ + (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL) || \ + (defined(_ULLONG_MAX) && _ULLONG_MAX == 18446744073709551615ULL) || \ + (defined(_LLONG_MAX) && _LLONG_MAX == 9223372036854775807LL) + +# define INT64_C(value) value##LL +# define UINT64_C(value) value##uLL +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif +# elif ULONG_MAX != 0xffffffff + +# if ULONG_MAX == 18446744073709551615U // 2**64 - 1 +# define INT64_C(value) value##L +# define UINT64_C(value) value##uL +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif +# elif defined(BOOST_HAS_LONG_LONG) + // Usual macros not defined, work things out for ourselves: +# if(~0uLL == 18446744073709551615ULL) +# define INT64_C(value) value##LL +# define UINT64_C(value) value##uLL +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif + +# ifdef BOOST_NO_INT64_T +# define INTMAX_C(value) INT32_C(value) +# define UINTMAX_C(value) UINT32_C(value) +# else +# define INTMAX_C(value) INT64_C(value) +# define UINTMAX_C(value) UINT64_C(value) +# endif +#endif +# endif // Borland/Microsoft specific width suffixes + +#endif // INT#_C macros. + + + + diff --git a/ThirdParty/boost-Subset/boost/cstdlib.hpp b/ThirdParty/boost-Subset/boost/cstdlib.hpp new file mode 100644 index 0000000000..6322146354 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/cstdlib.hpp @@ -0,0 +1,41 @@ +// boost/cstdlib.hpp header ------------------------------------------------// + +// Copyright Beman Dawes 2001. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/utility/cstdlib.html for documentation. + +// Revision History +// 26 Feb 01 Initial version (Beman Dawes) + +#ifndef BOOST_CSTDLIB_HPP +#define BOOST_CSTDLIB_HPP + +#include + +namespace boost +{ + // The intent is to propose the following for addition to namespace std + // in the C++ Standard Library, and to then deprecate EXIT_SUCCESS and + // EXIT_FAILURE. As an implementation detail, this header defines the + // new constants in terms of EXIT_SUCCESS and EXIT_FAILURE. In a new + // standard, the constants would be implementation-defined, although it + // might be worthwhile to "suggest" (which a standard is allowed to do) + // values of 0 and 1 respectively. + + // Rationale for having multiple failure values: some environments may + // wish to distinguish between different classes of errors. + // Rationale for choice of values: programs often use values < 100 for + // their own error reporting. Values > 255 are sometimes reserved for + // system detected errors. 200/201 were suggested to minimize conflict. + + const int exit_success = EXIT_SUCCESS; // implementation-defined value + const int exit_failure = EXIT_FAILURE; // implementation-defined value + const int exit_exception_failure = 200; // otherwise uncaught exception + const int exit_test_failure = 201; // report_error or + // report_critical_error called. +} + +#endif + diff --git a/ThirdParty/boost-Subset/boost/current_function.hpp b/ThirdParty/boost-Subset/boost/current_function.hpp new file mode 100644 index 0000000000..5c113f8093 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/current_function.hpp @@ -0,0 +1,71 @@ +#ifndef BOOST_CURRENT_FUNCTION_HPP_INCLUDED +#define BOOST_CURRENT_FUNCTION_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/current_function.hpp - BOOST_CURRENT_FUNCTION +// +// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// http://www.boost.org/libs/assert/current_function.html +// + +namespace boost +{ + +namespace detail +{ + +inline void current_function_helper() +{ + +#if defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) || (defined(__ICC) && (__ICC >= 600)) || defined(__ghs__) + +# define BOOST_CURRENT_FUNCTION __PRETTY_FUNCTION__ + +#elif defined(__DMC__) && (__DMC__ >= 0x810) + +# define BOOST_CURRENT_FUNCTION __PRETTY_FUNCTION__ + +#elif defined(__FUNCSIG__) + +# define BOOST_CURRENT_FUNCTION __FUNCSIG__ + +#elif (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 600)) || (defined(__IBMCPP__) && (__IBMCPP__ >= 500)) + +# define BOOST_CURRENT_FUNCTION __FUNCTION__ + +#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x550) + +# define BOOST_CURRENT_FUNCTION __FUNC__ + +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901) + +# define BOOST_CURRENT_FUNCTION __func__ + +#elif defined(__cplusplus) && (__cplusplus >= 201103) + +# define BOOST_CURRENT_FUNCTION __func__ + +#else + +# define BOOST_CURRENT_FUNCTION "(unknown)" + +#endif + +} + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_CURRENT_FUNCTION_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/detail/basic_pointerbuf.hpp b/ThirdParty/boost-Subset/boost/detail/basic_pointerbuf.hpp new file mode 100644 index 0000000000..1d8cf373b3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/basic_pointerbuf.hpp @@ -0,0 +1,139 @@ +//----------------------------------------------------------------------------- +// boost detail/templated_streams.hpp header file +// See http://www.boost.org for updates, documentation, and revision history. +//----------------------------------------------------------------------------- +// +// Copyright (c) 2013 John Maddock, Antony Polukhin +// +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_DETAIL_BASIC_POINTERBUF_HPP +#define BOOST_DETAIL_BASIC_POINTERBUF_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +#include "boost/config.hpp" +#include + +namespace boost { namespace detail { + +// +// class basic_pointerbuf: +// acts as a stream buffer which wraps around a pair of pointers: +// +template +class basic_pointerbuf : public BufferT { +protected: + typedef BufferT base_type; + typedef basic_pointerbuf this_type; + typedef typename base_type::int_type int_type; + typedef typename base_type::char_type char_type; + typedef typename base_type::pos_type pos_type; + typedef ::std::streamsize streamsize; + typedef typename base_type::off_type off_type; + +public: + basic_pointerbuf() : base_type() { setbuf(0, 0); } + const charT* getnext() { return this->gptr(); } + +#ifndef BOOST_NO_USING_TEMPLATE + using base_type::pptr; + using base_type::pbase; +#else + charT* pptr() const { return base_type::pptr(); } + charT* pbase() const { return base_type::pbase(); } +#endif + +protected: + // VC mistakenly assumes that `setbuf` and other functions are not referenced. + // Marking those functions with `inline` suppresses the warnings. + // There must be no harm from marking virtual functions as inline: inline virtual + // call can be inlined ONLY when the compiler knows the "exact class". + inline base_type* setbuf(char_type* s, streamsize n); + inline typename this_type::pos_type seekpos(pos_type sp, ::std::ios_base::openmode which); + inline typename this_type::pos_type seekoff(off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which); + +private: + basic_pointerbuf& operator=(const basic_pointerbuf&); + basic_pointerbuf(const basic_pointerbuf&); +}; + +template +BufferT* +basic_pointerbuf::setbuf(char_type* s, streamsize n) +{ + this->setg(s, s, s + n); + return this; +} + +template +typename basic_pointerbuf::pos_type +basic_pointerbuf::seekoff(off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which) +{ + typedef typename boost::int_t::least cast_type; + + if(which & ::std::ios_base::out) + return pos_type(off_type(-1)); + std::ptrdiff_t size = this->egptr() - this->eback(); + std::ptrdiff_t pos = this->gptr() - this->eback(); + charT* g = this->eback(); + switch(static_cast(way)) + { + case ::std::ios_base::beg: + if((off < 0) || (off > size)) + return pos_type(off_type(-1)); + else + this->setg(g, g + off, g + size); + break; + case ::std::ios_base::end: + if((off < 0) || (off > size)) + return pos_type(off_type(-1)); + else + this->setg(g, g + size - off, g + size); + break; + case ::std::ios_base::cur: + { + std::ptrdiff_t newpos = static_cast(pos + off); + if((newpos < 0) || (newpos > size)) + return pos_type(off_type(-1)); + else + this->setg(g, g + newpos, g + size); + break; + } + default: ; + } +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4244) +#endif + return static_cast(this->gptr() - this->eback()); +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif +} + +template +typename basic_pointerbuf::pos_type +basic_pointerbuf::seekpos(pos_type sp, ::std::ios_base::openmode which) +{ + if(which & ::std::ios_base::out) + return pos_type(off_type(-1)); + off_type size = static_cast(this->egptr() - this->eback()); + charT* g = this->eback(); + if(off_type(sp) <= size) + { + this->setg(g, g + off_type(sp), g + size); + } + return pos_type(off_type(-1)); +} + +}} // namespace boost::detail + +#endif // BOOST_DETAIL_BASIC_POINTERBUF_HPP + diff --git a/ThirdParty/boost-Subset/boost/detail/binary_search.hpp b/ThirdParty/boost-Subset/boost/detail/binary_search.hpp new file mode 100644 index 0000000000..3dca9b6509 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/binary_search.hpp @@ -0,0 +1,216 @@ +// Copyright (c) 2000 David Abrahams. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// Copyright (c) 1994 +// Hewlett-Packard Company +// +// Permission to use, copy, modify, distribute and sell this software +// and its documentation for any purpose is hereby granted without fee, +// provided that the above copyright notice appear in all copies and +// that both that copyright notice and this permission notice appear +// in supporting documentation. Hewlett-Packard Company makes no +// representations about the suitability of this software for any +// purpose. It is provided "as is" without express or implied warranty. +// +// Copyright (c) 1996 +// Silicon Graphics Computer Systems, Inc. +// +// Permission to use, copy, modify, distribute and sell this software +// and its documentation for any purpose is hereby granted without fee, +// provided that the above copyright notice appear in all copies and +// that both that copyright notice and this permission notice appear +// in supporting documentation. Silicon Graphics makes no +// representations about the suitability of this software for any +// purpose. It is provided "as is" without express or implied warranty. +// +#ifndef BINARY_SEARCH_DWA_122600_H_ +# define BINARY_SEARCH_DWA_122600_H_ + +# include +# include + +namespace boost { namespace detail { + +template +ForwardIter lower_bound(ForwardIter first, ForwardIter last, + const Tp& val) +{ + typedef detail::iterator_traits traits; + + typename traits::difference_type len = boost::detail::distance(first, last); + typename traits::difference_type half; + ForwardIter middle; + + while (len > 0) { + half = len >> 1; + middle = first; + std::advance(middle, half); + if (*middle < val) { + first = middle; + ++first; + len = len - half - 1; + } + else + len = half; + } + return first; +} + +template +ForwardIter lower_bound(ForwardIter first, ForwardIter last, + const Tp& val, Compare comp) +{ + typedef detail::iterator_traits traits; + + typename traits::difference_type len = boost::detail::distance(first, last); + typename traits::difference_type half; + ForwardIter middle; + + while (len > 0) { + half = len >> 1; + middle = first; + std::advance(middle, half); + if (comp(*middle, val)) { + first = middle; + ++first; + len = len - half - 1; + } + else + len = half; + } + return first; +} + +template +ForwardIter upper_bound(ForwardIter first, ForwardIter last, + const Tp& val) +{ + typedef detail::iterator_traits traits; + + typename traits::difference_type len = boost::detail::distance(first, last); + typename traits::difference_type half; + ForwardIter middle; + + while (len > 0) { + half = len >> 1; + middle = first; + std::advance(middle, half); + if (val < *middle) + len = half; + else { + first = middle; + ++first; + len = len - half - 1; + } + } + return first; +} + +template +ForwardIter upper_bound(ForwardIter first, ForwardIter last, + const Tp& val, Compare comp) +{ + typedef detail::iterator_traits traits; + + typename traits::difference_type len = boost::detail::distance(first, last); + typename traits::difference_type half; + ForwardIter middle; + + while (len > 0) { + half = len >> 1; + middle = first; + std::advance(middle, half); + if (comp(val, *middle)) + len = half; + else { + first = middle; + ++first; + len = len - half - 1; + } + } + return first; +} + +template +std::pair +equal_range(ForwardIter first, ForwardIter last, const Tp& val) +{ + typedef detail::iterator_traits traits; + + typename traits::difference_type len = boost::detail::distance(first, last); + typename traits::difference_type half; + ForwardIter middle, left, right; + + while (len > 0) { + half = len >> 1; + middle = first; + std::advance(middle, half); + if (*middle < val) { + first = middle; + ++first; + len = len - half - 1; + } + else if (val < *middle) + len = half; + else { + left = boost::detail::lower_bound(first, middle, val); + std::advance(first, len); + right = boost::detail::upper_bound(++middle, first, val); + return std::pair(left, right); + } + } + return std::pair(first, first); +} + +template +std::pair +equal_range(ForwardIter first, ForwardIter last, const Tp& val, + Compare comp) +{ + typedef detail::iterator_traits traits; + + typename traits::difference_type len = boost::detail::distance(first, last); + typename traits::difference_type half; + ForwardIter middle, left, right; + + while (len > 0) { + half = len >> 1; + middle = first; + std::advance(middle, half); + if (comp(*middle, val)) { + first = middle; + ++first; + len = len - half - 1; + } + else if (comp(val, *middle)) + len = half; + else { + left = boost::detail::lower_bound(first, middle, val, comp); + std::advance(first, len); + right = boost::detail::upper_bound(++middle, first, val, comp); + return std::pair(left, right); + } + } + return std::pair(first, first); +} + +template +bool binary_search(ForwardIter first, ForwardIter last, + const Tp& val) { + ForwardIter i = boost::detail::lower_bound(first, last, val); + return i != last && !(val < *i); +} + +template +bool binary_search(ForwardIter first, ForwardIter last, + const Tp& val, + Compare comp) { + ForwardIter i = boost::detail::lower_bound(first, last, val, comp); + return i != last && !comp(val, *i); +} + +}} // namespace boost::detail + +#endif // BINARY_SEARCH_DWA_122600_H_ diff --git a/ThirdParty/boost-Subset/boost/detail/bitmask.hpp b/ThirdParty/boost-Subset/boost/detail/bitmask.hpp new file mode 100644 index 0000000000..c6714a1109 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/bitmask.hpp @@ -0,0 +1,47 @@ +// boost/detail/bitmask.hpp ------------------------------------------------// + +// Copyright Beman Dawes 2006 + +// Distributed under the Boost Software License, Version 1.0 +// http://www.boost.org/LICENSE_1_0.txt + +// Usage: enum foo { a=1, b=2, c=4 }; +// BOOST_BITMASK( foo ); +// +// void f( foo arg ); +// ... +// f( a | c ); + +#ifndef BOOST_BITMASK_HPP +#define BOOST_BITMASK_HPP + +#include + +#define BOOST_BITMASK(Bitmask) \ + \ + inline Bitmask operator| (Bitmask x , Bitmask y ) \ + { return static_cast( static_cast(x) \ + | static_cast(y)); } \ + \ + inline Bitmask operator& (Bitmask x , Bitmask y ) \ + { return static_cast( static_cast(x) \ + & static_cast(y)); } \ + \ + inline Bitmask operator^ (Bitmask x , Bitmask y ) \ + { return static_cast( static_cast(x) \ + ^ static_cast(y)); } \ + \ + inline Bitmask operator~ (Bitmask x ) \ + { return static_cast(~static_cast(x)); } \ + \ + inline Bitmask & operator&=(Bitmask & x , Bitmask y) \ + { x = x & y ; return x ; } \ + \ + inline Bitmask & operator|=(Bitmask & x , Bitmask y) \ + { x = x | y ; return x ; } \ + \ + inline Bitmask & operator^=(Bitmask & x , Bitmask y) \ + { x = x ^ y ; return x ; } + +#endif // BOOST_BITMASK_HPP + diff --git a/ThirdParty/boost-Subset/boost/detail/call_traits.hpp b/ThirdParty/boost-Subset/boost/detail/call_traits.hpp new file mode 100644 index 0000000000..36dea0003a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/call_traits.hpp @@ -0,0 +1,172 @@ +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/utility for most recent version including documentation. + +// call_traits: defines typedefs for function usage +// (see libs/utility/call_traits.htm) + +/* Release notes: + 23rd July 2000: + Fixed array specialization. (JM) + Added Borland specific fixes for reference types + (issue raised by Steve Cleary). +*/ + +#ifndef BOOST_DETAIL_CALL_TRAITS_HPP +#define BOOST_DETAIL_CALL_TRAITS_HPP + +#ifndef BOOST_CONFIG_HPP +#include +#endif +#include + +#include +#include +#include +#include + +namespace boost{ + +namespace detail{ + +template +struct ct_imp2 +{ + typedef const T& param_type; +}; + +template +struct ct_imp2 +{ + typedef const T param_type; +}; + +template +struct ct_imp +{ + typedef const T& param_type; +}; + +template +struct ct_imp +{ + typedef typename ct_imp2::param_type param_type; +}; + +template +struct ct_imp +{ + typedef typename ct_imp2::param_type param_type; +}; + +template +struct ct_imp +{ + typedef const T param_type; +}; + +} + +template +struct call_traits +{ +public: + typedef T value_type; + typedef T& reference; + typedef const T& const_reference; + // + // C++ Builder workaround: we should be able to define a compile time + // constant and pass that as a single template parameter to ct_imp, + // however compiler bugs prevent this - instead pass three bool's to + // ct_imp and add an extra partial specialisation + // of ct_imp to handle the logic. (JM) + typedef typename boost::detail::ct_imp< + T, + ::boost::is_pointer::value, + ::boost::is_arithmetic::value, + ::boost::is_enum::value + >::param_type param_type; +}; + +template +struct call_traits +{ + typedef T& value_type; + typedef T& reference; + typedef const T& const_reference; + typedef T& param_type; // hh removed const +}; + +#if BOOST_WORKAROUND( __BORLANDC__, < 0x5A0 ) +// these are illegal specialisations; cv-qualifies applied to +// references have no effect according to [8.3.2p1], +// C++ Builder requires them though as it treats cv-qualified +// references as distinct types... +template +struct call_traits +{ + typedef T& value_type; + typedef T& reference; + typedef const T& const_reference; + typedef T& param_type; // hh removed const +}; +template +struct call_traits +{ + typedef T& value_type; + typedef T& reference; + typedef const T& const_reference; + typedef T& param_type; // hh removed const +}; +template +struct call_traits +{ + typedef T& value_type; + typedef T& reference; + typedef const T& const_reference; + typedef T& param_type; // hh removed const +}; + +template +struct call_traits< T * > +{ + typedef T * value_type; + typedef T * & reference; + typedef T * const & const_reference; + typedef T * const param_type; // hh removed const +}; +#endif +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) +template +struct call_traits +{ +private: + typedef T array_type[N]; +public: + // degrades array to pointer: + typedef const T* value_type; + typedef array_type& reference; + typedef const array_type& const_reference; + typedef const T* const param_type; +}; + +template +struct call_traits +{ +private: + typedef const T array_type[N]; +public: + // degrades array to pointer: + typedef const T* value_type; + typedef array_type& reference; + typedef const array_type& const_reference; + typedef const T* const param_type; +}; +#endif + +} + +#endif // BOOST_DETAIL_CALL_TRAITS_HPP diff --git a/ThirdParty/boost-Subset/boost/detail/container_fwd.hpp b/ThirdParty/boost-Subset/boost/detail/container_fwd.hpp new file mode 100644 index 0000000000..04ce972738 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/container_fwd.hpp @@ -0,0 +1,157 @@ + +// Copyright 2005-2011 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// Note: if you change this include guard, you also need to change +// container_fwd_compile_fail.cpp +#if !defined(BOOST_DETAIL_CONTAINER_FWD_HPP) +#define BOOST_DETAIL_CONTAINER_FWD_HPP + +#if defined(_MSC_VER) && \ + !defined(BOOST_DETAIL_TEST_CONFIG_ONLY) +# pragma once +#endif + +#include +#include + +//////////////////////////////////////////////////////////////////////////////// +// // +// Define BOOST_DETAIL_NO_CONTAINER_FWD if you don't want this header to // +// forward declare standard containers. // +// // +// BOOST_DETAIL_CONTAINER_FWD to make it foward declare containers even if it // +// normally doesn't. // +// // +// BOOST_DETAIL_NO_CONTAINER_FWD overrides BOOST_DETAIL_CONTAINER_FWD. // +// // +//////////////////////////////////////////////////////////////////////////////// + +#if !defined(BOOST_DETAIL_NO_CONTAINER_FWD) +# if defined(BOOST_DETAIL_CONTAINER_FWD) + // Force forward declarations. +# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) + // STLport +# define BOOST_DETAIL_NO_CONTAINER_FWD +# elif defined(__LIBCOMO__) + // Comeau STL: +# define BOOST_DETAIL_NO_CONTAINER_FWD +# elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER) + // Rogue Wave library: +# define BOOST_DETAIL_NO_CONTAINER_FWD +# elif defined(_LIBCPP_VERSION) + // libc++ +# define BOOST_DETAIL_NO_CONTAINER_FWD +# elif defined(__GLIBCPP__) || defined(__GLIBCXX__) + // GNU libstdc++ 3 + // + // Disable forwarding for all recent versions, as the library has a + // versioned namespace mode, and I don't know how to detect it. +# if __GLIBCXX__ >= 20070513 \ + || defined(_GLIBCXX_DEBUG) \ + || defined(_GLIBCXX_PARALLEL) \ + || defined(_GLIBCXX_PROFILE) +# define BOOST_DETAIL_NO_CONTAINER_FWD +# else +# if defined(__GLIBCXX__) && __GLIBCXX__ >= 20040530 +# define BOOST_CONTAINER_FWD_COMPLEX_STRUCT +# endif +# endif +# elif defined(__STL_CONFIG_H) + // generic SGI STL + // + // Forward declaration seems to be okay, but it has a couple of odd + // implementations. +# define BOOST_CONTAINER_FWD_BAD_BITSET +# if !defined(__STL_NON_TYPE_TMPL_PARAM_BUG) +# define BOOST_CONTAINER_FWD_BAD_DEQUE +# endif +# elif defined(__MSL_CPP__) + // MSL standard lib: +# define BOOST_DETAIL_NO_CONTAINER_FWD +# elif defined(__IBMCPP__) + // The default VACPP std lib, forward declaration seems to be fine. +# elif defined(MSIPL_COMPILE_H) + // Modena C++ standard library +# define BOOST_DETAIL_NO_CONTAINER_FWD +# elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER) + // Dinkumware Library (this has to appear after any possible replacement + // libraries) +# else +# define BOOST_DETAIL_NO_CONTAINER_FWD +# endif +#endif + +#if !defined(BOOST_DETAIL_TEST_CONFIG_ONLY) + +#if defined(BOOST_DETAIL_NO_CONTAINER_FWD) && \ + !defined(BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD) + +#include +#include +#include +#include +#include +#include +#include +#include + +#else + +#include + +#if defined(BOOST_CONTAINER_FWD_BAD_DEQUE) +#include +#endif + +#if defined(BOOST_CONTAINER_FWD_BAD_BITSET) +#include +#endif + +#if defined(BOOST_MSVC) +#pragma warning(push) +#pragma warning(disable:4099) // struct/class mismatch in fwd declarations +#endif + +namespace std +{ + template class allocator; + template class basic_string; + + template struct char_traits; + +#if defined(BOOST_CONTAINER_FWD_COMPLEX_STRUCT) + template struct complex; +#else + template class complex; +#endif + +#if !defined(BOOST_CONTAINER_FWD_BAD_DEQUE) + template class deque; +#endif + + template class list; + template class vector; + template class map; + template + class multimap; + template class set; + template class multiset; + +#if !defined(BOOST_CONTAINER_FWD_BAD_BITSET) + template class bitset; +#endif + template struct pair; +} + +#if defined(BOOST_MSVC) +#pragma warning(pop) +#endif + +#endif // BOOST_DETAIL_NO_CONTAINER_FWD && + // !defined(BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD) + +#endif // BOOST_DETAIL_TEST_CONFIG_ONLY + +#endif diff --git a/ThirdParty/boost-Subset/boost/detail/endian.hpp b/ThirdParty/boost-Subset/boost/detail/endian.hpp new file mode 100644 index 0000000000..f576c26b89 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/endian.hpp @@ -0,0 +1,11 @@ +// Copyright 2013 Rene Rivera +// Distributed under the Boost Software License, Version 1.0. (See accompany- +// ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_DETAIL_ENDIAN_HPP +#define BOOST_DETAIL_ENDIAN_HPP + +// Use the Predef library for the detection of endianess. +#include + +#endif diff --git a/ThirdParty/boost-Subset/boost/detail/fenv.hpp b/ThirdParty/boost-Subset/boost/detail/fenv.hpp new file mode 100644 index 0000000000..b268f5c1cc --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/fenv.hpp @@ -0,0 +1,101 @@ +/*============================================================================= + Copyright (c) 2010 Bryce Lelbach + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include + +#if defined(BOOST_NO_FENV_H) + #error This platform does not have a floating point environment +#endif + +#if !defined(BOOST_DETAIL_FENV_HPP) +#define BOOST_DETAIL_FENV_HPP + +/* If we're using clang + glibc, we have to get hacky. + * See http://llvm.org/bugs/show_bug.cgi?id=6907 */ +#if defined(__clang__) && (__clang_major__ < 3) && \ + defined(__GNU_LIBRARY__) && /* up to version 5 */ \ + defined(__GLIBC__) && /* version 6 + */ \ + !defined(_FENV_H) + #define _FENV_H + + #include + #include + + extern "C" { + extern int fegetexceptflag (fexcept_t*, int) __THROW; + extern int fesetexceptflag (__const fexcept_t*, int) __THROW; + extern int feclearexcept (int) __THROW; + extern int feraiseexcept (int) __THROW; + extern int fetestexcept (int) __THROW; + extern int fegetround (void) __THROW; + extern int fesetround (int) __THROW; + extern int fegetenv (fenv_t*) __THROW; + extern int fesetenv (__const fenv_t*) __THROW; + extern int feupdateenv (__const fenv_t*) __THROW; + extern int feholdexcept (fenv_t*) __THROW; + + #ifdef __USE_GNU + extern int feenableexcept (int) __THROW; + extern int fedisableexcept (int) __THROW; + extern int fegetexcept (void) __THROW; + #endif + } + + namespace std { namespace tr1 { + using ::fenv_t; + using ::fexcept_t; + using ::fegetexceptflag; + using ::fesetexceptflag; + using ::feclearexcept; + using ::feraiseexcept; + using ::fetestexcept; + using ::fegetround; + using ::fesetround; + using ::fegetenv; + using ::fesetenv; + using ::feupdateenv; + using ::feholdexcept; + } } + +#elif defined(__MINGW32__) && defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 + + // MinGW (32-bit) has a bug in mingw32/bits/c++config.h, it does not define _GLIBCXX_HAVE_FENV_H, + // which prevents the C fenv.h header contents to be included in the C++ wrapper header fenv.h. This is at least + // the case with gcc 4.8.1 packages tested so far, up to 4.8.1-4. Note that there is no issue with + // MinGW-w64. + // To work around the bug we avoid including the C++ wrapper header and include the C header directly + // and import all relevant symbols into std:: ourselves. + + #include <../include/fenv.h> + + namespace std { + using ::fenv_t; + using ::fexcept_t; + using ::fegetexceptflag; + using ::fesetexceptflag; + using ::feclearexcept; + using ::feraiseexcept; + using ::fetestexcept; + using ::fegetround; + using ::fesetround; + using ::fegetenv; + using ::fesetenv; + using ::feupdateenv; + using ::feholdexcept; + } + +#else /* if we're not using GNU's C stdlib, fenv.h should work with clang */ + + #if defined(__SUNPRO_CC) /* lol suncc */ + #include + #endif + + #include + +#endif + +#endif /* BOOST_DETAIL_FENV_HPP */ diff --git a/ThirdParty/boost-Subset/boost/detail/indirect_traits.hpp b/ThirdParty/boost-Subset/boost/detail/indirect_traits.hpp new file mode 100644 index 0000000000..6294e40f6a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/indirect_traits.hpp @@ -0,0 +1,204 @@ +// Copyright David Abrahams 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef INDIRECT_TRAITS_DWA2002131_HPP +# define INDIRECT_TRAITS_DWA2002131_HPP +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include + +# include + +# include +# include +# include +# include +# include +# include + + +namespace boost { namespace detail { + +namespace indirect_traits { + +template +struct is_reference_to_const : mpl::false_ +{ +}; + +template +struct is_reference_to_const : mpl::true_ +{ +}; + +# if defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140 // vc7.01 alpha workaround +template +struct is_reference_to_const : mpl::true_ +{ +}; +# endif + +template +struct is_reference_to_function : mpl::false_ +{ +}; + +template +struct is_reference_to_function : is_function +{ +}; + +template +struct is_pointer_to_function : mpl::false_ +{ +}; + +// There's no such thing as a pointer-to-cv-function, so we don't need +// specializations for those +template +struct is_pointer_to_function : is_function +{ +}; + +template +struct is_reference_to_member_function_pointer_impl : mpl::false_ +{ +}; + +template +struct is_reference_to_member_function_pointer_impl + : is_member_function_pointer::type> +{ +}; + + +template +struct is_reference_to_member_function_pointer + : is_reference_to_member_function_pointer_impl +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_member_function_pointer,(T)) +}; + +template +struct is_reference_to_function_pointer_aux + : mpl::and_< + is_reference + , is_pointer_to_function< + typename remove_cv< + typename remove_reference::type + >::type + > + > +{ + // There's no such thing as a pointer-to-cv-function, so we don't need specializations for those +}; + +template +struct is_reference_to_function_pointer + : mpl::if_< + is_reference_to_function + , mpl::false_ + , is_reference_to_function_pointer_aux + >::type +{ +}; + +template +struct is_reference_to_non_const + : mpl::and_< + is_reference + , mpl::not_< + is_reference_to_const + > + > +{ +}; + +template +struct is_reference_to_volatile : mpl::false_ +{ +}; + +template +struct is_reference_to_volatile : mpl::true_ +{ +}; + +# if defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140 // vc7.01 alpha workaround +template +struct is_reference_to_volatile : mpl::true_ +{ +}; +# endif + + +template +struct is_reference_to_pointer : mpl::false_ +{ +}; + +template +struct is_reference_to_pointer : mpl::true_ +{ +}; + +template +struct is_reference_to_pointer : mpl::true_ +{ +}; + +template +struct is_reference_to_pointer : mpl::true_ +{ +}; + +template +struct is_reference_to_pointer : mpl::true_ +{ +}; + +template +struct is_reference_to_class + : mpl::and_< + is_reference + , is_class< + typename remove_cv< + typename remove_reference::type + >::type + > + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_class,(T)) +}; + +template +struct is_pointer_to_class + : mpl::and_< + is_pointer + , is_class< + typename remove_cv< + typename remove_pointer::type + >::type + > + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_pointer_to_class,(T)) +}; + + +} + +using namespace indirect_traits; + +}} // namespace boost::python::detail + +#endif // INDIRECT_TRAITS_DWA2002131_HPP diff --git a/ThirdParty/boost-Subset/boost/detail/iterator.hpp b/ThirdParty/boost-Subset/boost/detail/iterator.hpp new file mode 100644 index 0000000000..c2e8f1e2a5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/iterator.hpp @@ -0,0 +1,26 @@ +// (C) Copyright David Abrahams 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef ITERATOR_DWA122600_HPP_ +#define ITERATOR_DWA122600_HPP_ + +// This header is obsolete and will be deprecated. + +#include + +namespace boost +{ + +namespace detail +{ + +using std::iterator_traits; +using std::distance; + +} // namespace detail + +} // namespace boost + +#endif // ITERATOR_DWA122600_HPP_ diff --git a/ThirdParty/boost-Subset/boost/detail/lcast_precision.hpp b/ThirdParty/boost-Subset/boost/detail/lcast_precision.hpp new file mode 100644 index 0000000000..93abce18ce --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/lcast_precision.hpp @@ -0,0 +1,184 @@ +// Copyright Alexander Nasonov & Paul A. Bristow 2006. + +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_DETAIL_LCAST_PRECISION_HPP_INCLUDED +#define BOOST_DETAIL_LCAST_PRECISION_HPP_INCLUDED + +#include +#include +#include + +#include +#include + +#ifndef BOOST_NO_IS_ABSTRACT +// Fix for SF:1358600 - lexical_cast & pure virtual functions & VC 8 STL +#include +#include +#endif + +#if defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) || \ + (defined(BOOST_MSVC) && (BOOST_MSVC<1310)) + +#define BOOST_LCAST_NO_COMPILE_TIME_PRECISION +#endif + +#ifdef BOOST_LCAST_NO_COMPILE_TIME_PRECISION +#include +#else +#include +#endif + +namespace boost { namespace detail { + +class lcast_abstract_stub {}; + +#ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION +// Calculate an argument to pass to std::ios_base::precision from +// lexical_cast. See alternative implementation for broken standard +// libraries in lcast_get_precision below. Keep them in sync, please. +template +struct lcast_precision +{ +#ifdef BOOST_NO_IS_ABSTRACT + typedef std::numeric_limits limits; // No fix for SF:1358600. +#else + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_< + boost::is_abstract + , std::numeric_limits + , std::numeric_limits + >::type limits; +#endif + + BOOST_STATIC_CONSTANT(bool, use_default_precision = + !limits::is_specialized || limits::is_exact + ); + + BOOST_STATIC_CONSTANT(bool, is_specialized_bin = + !use_default_precision && + limits::radix == 2 && limits::digits > 0 + ); + + BOOST_STATIC_CONSTANT(bool, is_specialized_dec = + !use_default_precision && + limits::radix == 10 && limits::digits10 > 0 + ); + + BOOST_STATIC_CONSTANT(std::streamsize, streamsize_max = + boost::integer_traits::const_max + ); + + BOOST_STATIC_CONSTANT(unsigned int, precision_dec = limits::digits10 + 1U); + + BOOST_STATIC_ASSERT(!is_specialized_dec || + precision_dec <= streamsize_max + 0UL + ); + + BOOST_STATIC_CONSTANT(unsigned long, precision_bin = + 2UL + limits::digits * 30103UL / 100000UL + ); + + BOOST_STATIC_ASSERT(!is_specialized_bin || + (limits::digits + 0UL < ULONG_MAX / 30103UL && + precision_bin > limits::digits10 + 0UL && + precision_bin <= streamsize_max + 0UL) + ); + + BOOST_STATIC_CONSTANT(std::streamsize, value = + is_specialized_bin ? precision_bin + : is_specialized_dec ? precision_dec : 6 + ); +}; +#endif + +template +inline std::streamsize lcast_get_precision(T* = 0) +{ +#ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION + return lcast_precision::value; +#else // Follow lcast_precision algorithm at run-time: + +#ifdef BOOST_NO_IS_ABSTRACT + typedef std::numeric_limits limits; // No fix for SF:1358600. +#else + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_< + boost::is_abstract + , std::numeric_limits + , std::numeric_limits + >::type limits; +#endif + + bool const use_default_precision = + !limits::is_specialized || limits::is_exact; + + if(!use_default_precision) + { // Includes all built-in floating-point types, float, double ... + // and UDT types for which digits (significand bits) is defined (not zero) + + bool const is_specialized_bin = + limits::radix == 2 && limits::digits > 0; + bool const is_specialized_dec = + limits::radix == 10 && limits::digits10 > 0; + std::streamsize const streamsize_max = + (boost::integer_traits::max)(); + + if(is_specialized_bin) + { // Floating-point types with + // limits::digits defined by the specialization. + + unsigned long const digits = limits::digits; + unsigned long const precision = 2UL + digits * 30103UL / 100000UL; + // unsigned long is selected because it is at least 32-bits + // and thus ULONG_MAX / 30103UL is big enough for all types. + BOOST_ASSERT( + digits < ULONG_MAX / 30103UL && + precision > limits::digits10 + 0UL && + precision <= streamsize_max + 0UL + ); + return precision; + } + else if(is_specialized_dec) + { // Decimal Floating-point type, most likely a User Defined Type + // rather than a real floating-point hardware type. + unsigned int const precision = limits::digits10 + 1U; + BOOST_ASSERT(precision <= streamsize_max + 0UL); + return precision; + } + } + + // Integral type (for which precision has no effect) + // or type T for which limits is NOT specialized, + // so assume stream precision remains the default 6 decimal digits. + // Warning: if your User-defined Floating-point type T is NOT specialized, + // then you may lose accuracy by only using 6 decimal digits. + // To avoid this, you need to specialize T with either + // radix == 2 and digits == the number of significand bits, + // OR + // radix = 10 and digits10 == the number of decimal digits. + + return 6; +#endif +} + +template +inline void lcast_set_precision(std::ios_base& stream, T*) +{ + stream.precision(lcast_get_precision()); +} + +template +inline void lcast_set_precision(std::ios_base& stream, Source*, Target*) +{ + std::streamsize const s = lcast_get_precision(static_cast(0)); + std::streamsize const t = lcast_get_precision(static_cast(0)); + stream.precision(s > t ? s : t); +} + +}} + +#endif // BOOST_DETAIL_LCAST_PRECISION_HPP_INCLUDED + diff --git a/ThirdParty/boost-Subset/boost/detail/lightweight_main.hpp b/ThirdParty/boost-Subset/boost/detail/lightweight_main.hpp new file mode 100644 index 0000000000..1705309780 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/lightweight_main.hpp @@ -0,0 +1,36 @@ +// boost/detail/lightweight_main.hpp -------------------------------------------------// + +// Copyright Beman Dawes 2010 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#include +#include + +//--------------------------------------------------------------------------------------// +// // +// exception reporting main() that calls cpp_main() // +// // +//--------------------------------------------------------------------------------------// + +int cpp_main(int argc, char* argv[]); + +int main(int argc, char* argv[]) +{ + try + { + return cpp_main(argc, argv); + } + + catch (const std::exception& ex) + { + std::cout + << "\nERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR\n" + << "\n****************************** std::exception *****************************\n" + << ex.what() + << "\n***************************************************************************\n" + << std::endl; + } + return 1; +} diff --git a/ThirdParty/boost-Subset/boost/detail/lightweight_mutex.hpp b/ThirdParty/boost-Subset/boost/detail/lightweight_mutex.hpp new file mode 100644 index 0000000000..b7a7f6dd4e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/lightweight_mutex.hpp @@ -0,0 +1,22 @@ +#ifndef BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED +#define BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/detail/lightweight_mutex.hpp - lightweight mutex +// +// Copyright (c) 2002, 2003 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// + +#include + +#endif // #ifndef BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/detail/lightweight_test.hpp b/ThirdParty/boost-Subset/boost/detail/lightweight_test.hpp new file mode 100644 index 0000000000..9fece8ab7e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/lightweight_test.hpp @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2014 Glen Fernandes + * + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_DETAIL_LIGHTWEIGHT_TEST_HPP +#define BOOST_DETAIL_LIGHTWEIGHT_TEST_HPP + +// The header file at this path is deprecated; +// use boost/core/lightweight_test.hpp instead. + +#include + +#endif diff --git a/ThirdParty/boost-Subset/boost/detail/lightweight_test_report.hpp b/ThirdParty/boost-Subset/boost/detail/lightweight_test_report.hpp new file mode 100644 index 0000000000..1511ba9d14 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/lightweight_test_report.hpp @@ -0,0 +1,56 @@ +// boost/detail/lightweight_test_reporter.hpp ----------------------------------------// + +// Copyright Beman Dawes 2014 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +//--------------------------------------------------------------------------------------// +// // +// Configuration reporting cpp_main() // +// // +// Displays configuration information, then returns test_main(argc, argv), which // +// must be supplied by the user. // +// // +// Note: cpp_main(argc, argv) is called from a try block in main(), which is // +// supplied by as is a catch block that reports // +// std::exception what(). // +// // +//--------------------------------------------------------------------------------------// + +#include +#include +#include +#include +#include + +int test_main(int argc, char* argv[]); + +int cpp_main(int argc, char* argv[]) +{ + std::cout << BOOST_COMPILER +#ifdef __GNUC__ + << ", __GXX_EXPERIMENTAL_CXX0X__ " +# ifdef __GXX_EXPERIMENTAL_CXX0X__ + "defined" +# else + "not defined" +# endif +#endif + << "\n" + << BOOST_STDLIB << "\n" + << BOOST_PLATFORM << "\n" + << "Boost version " << BOOST_VERSION / 100000 << '.' + << BOOST_VERSION / 100 % 1000 << '.' << BOOST_VERSION % 100 << "\n"; + + std::cout << "Command line: "; + for (int a = 0; a < argc; ++a) + { + std::cout << argv[a]; + if (a != argc - 1) + std::cout << ' '; + } + std::cout << std::endl; + + return test_main(argc, argv); +} \ No newline at end of file diff --git a/ThirdParty/boost-Subset/boost/detail/no_exceptions_support.hpp b/ThirdParty/boost-Subset/boost/detail/no_exceptions_support.hpp new file mode 100644 index 0000000000..7d17454a73 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/no_exceptions_support.hpp @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2014 Glen Fernandes + * + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_DETAIL_NO_EXCEPTIONS_SUPPORT_HPP +#define BOOST_DETAIL_NO_EXCEPTIONS_SUPPORT_HPP + +// The header file at this path is deprecated; +// use boost/core/no_exceptions_support.hpp instead. + +#include + +#endif diff --git a/ThirdParty/boost-Subset/boost/detail/reference_content.hpp b/ThirdParty/boost-Subset/boost/detail/reference_content.hpp new file mode 100644 index 0000000000..36b80d244e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/reference_content.hpp @@ -0,0 +1,120 @@ +//----------------------------------------------------------------------------- +// boost detail/reference_content.hpp header file +// See http://www.boost.org for updates, documentation, and revision history. +//----------------------------------------------------------------------------- +// +// Copyright (c) 2003 +// Eric Friedman +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_DETAIL_REFERENCE_CONTENT_HPP +#define BOOST_DETAIL_REFERENCE_CONTENT_HPP + +#include "boost/config.hpp" + +# include "boost/mpl/bool.hpp" +# include "boost/type_traits/has_nothrow_copy.hpp" + +#include "boost/mpl/void.hpp" + +namespace boost { + +namespace detail { + +/////////////////////////////////////////////////////////////////////////////// +// (detail) class template reference_content +// +// Non-Assignable wrapper for references. +// +template +class reference_content +{ +private: // representation + + RefT content_; + +public: // structors + + ~reference_content() + { + } + + reference_content(RefT r) + : content_( r ) + { + } + + reference_content(const reference_content& operand) + : content_( operand.content_ ) + { + } + +private: // non-Assignable + + reference_content& operator=(const reference_content&); + +public: // queries + + RefT get() const + { + return content_; + } + +}; + +/////////////////////////////////////////////////////////////////////////////// +// (detail) metafunction make_reference_content +// +// Wraps with reference_content if specified type is reference. +// + +template struct make_reference_content; + + +template +struct make_reference_content +{ + typedef T type; +}; + +template +struct make_reference_content< T& > +{ + typedef reference_content type; +}; + + +template <> +struct make_reference_content< mpl::void_ > +{ + template + struct apply + : make_reference_content + { + }; + + typedef mpl::void_ type; +}; + +} // namespace detail + +/////////////////////////////////////////////////////////////////////////////// +// reference_content type traits specializations +// + + +template +struct has_nothrow_copy< + ::boost::detail::reference_content< T& > + > + : mpl::true_ +{ +}; + + +} // namespace boost + +#endif // BOOST_DETAIL_REFERENCE_CONTENT_HPP diff --git a/ThirdParty/boost-Subset/boost/detail/scoped_enum_emulation.hpp b/ThirdParty/boost-Subset/boost/detail/scoped_enum_emulation.hpp new file mode 100644 index 0000000000..1c7bc23c1c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/scoped_enum_emulation.hpp @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2014 Andrey Semashev + * + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_DETAIL_SCOPED_ENUM_EMULATION_HPP +#define BOOST_DETAIL_SCOPED_ENUM_EMULATION_HPP + +// The header file at this path is deprecated; +// use boost/core/scoped_enum.hpp instead. + +#include + +#endif diff --git a/ThirdParty/boost-Subset/boost/detail/sp_typeinfo.hpp b/ThirdParty/boost-Subset/boost/detail/sp_typeinfo.hpp new file mode 100644 index 0000000000..4e4de55b05 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/sp_typeinfo.hpp @@ -0,0 +1,36 @@ +#ifndef BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED +#define BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// detail/sp_typeinfo.hpp +// +// Deprecated, please use boost/core/typeinfo.hpp +// +// Copyright 2007 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include + +namespace boost +{ + +namespace detail +{ + +typedef boost::core::typeinfo sp_typeinfo; + +} // namespace detail + +} // namespace boost + +#define BOOST_SP_TYPEID(T) BOOST_CORE_TYPEID(T) + +#endif // #ifndef BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/detail/utf8_codecvt_facet.hpp b/ThirdParty/boost-Subset/boost/detail/utf8_codecvt_facet.hpp new file mode 100644 index 0000000000..2d7ed8b2c4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/utf8_codecvt_facet.hpp @@ -0,0 +1,214 @@ +// Copyright (c) 2001 Ronald Garcia, Indiana University (garcia@osl.iu.edu) +// Andrew Lumsdaine, Indiana University (lums@osl.iu.edu). +// Distributed under the Boost Software License, Version 1.0. (See accompany- +// ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UTF8_CODECVT_FACET_HPP +#define BOOST_UTF8_CODECVT_FACET_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// utf8_codecvt_facet.hpp + +// This header defines class utf8_codecvt_facet, derived from +// std::codecvt, which can be used to convert utf8 data in +// files into wchar_t strings in the application. +// +// The header is NOT STANDALONE, and is not to be included by the USER. +// There are at least two libraries which want to use this functionality, and +// we want to avoid code duplication. It would be possible to create utf8 +// library, but: +// - this requires review process first +// - in the case, when linking the a library which uses utf8 +// (say 'program_options'), user should also link to the utf8 library. +// This seems inconvenient, and asking a user to link to an unrevieved +// library is strange. +// Until the above points are fixed, a library which wants to use utf8 must: +// - include this header in one of it's headers or sources +// - include the corresponding boost/detail/utf8_codecvt_facet.ipp file in one +// of its sources +// - before including either file, the library must define +// - BOOST_UTF8_BEGIN_NAMESPACE to the namespace declaration that must be used +// - BOOST_UTF8_END_NAMESPACE to the code to close the previous namespace +// declaration. +// - BOOST_UTF8_DECL -- to the code which must be used for all 'exportable' +// symbols. +// +// For example, program_options library might contain: +// #define BOOST_UTF8_BEGIN_NAMESPACE +// namespace boost { namespace program_options { +// #define BOOST_UTF8_END_NAMESPACE }} +// #define BOOST_UTF8_DECL BOOST_PROGRAM_OPTIONS_DECL +// #include +// +// Essentially, each library will have its own copy of utf8 code, in +// different namespaces. + +// Note:(Robert Ramey). I have made the following alterations in the original +// code. +// a) Rendered utf8_codecvt with using templates +// b) Move longer functions outside class definition to prevent inlining +// and make code smaller +// c) added on a derived class to permit translation to/from current +// locale to utf8 + +// See http://www.boost.org for updates, documentation, and revision history. + +// archives stored as text - note these ar templated on the basic +// stream templates to accommodate wide (and other?) kind of characters +// +// note the fact that on libraries without wide characters, ostream is +// is not a specialization of basic_ostream which in fact is not defined +// in such cases. So we can't use basic_ostream but rather +// use two template parameters +// +// utf8_codecvt_facet +// This is an implementation of a std::codecvt facet for translating +// from UTF-8 externally to UCS-4. Note that this is not tied to +// any specific types in order to allow customization on platforms +// where wchar_t is not big enough. +// +// NOTES: The current implementation jumps through some unpleasant hoops in +// order to deal with signed character types. As a std::codecvt_base::result, +// it is necessary for the ExternType to be convertible to unsigned char. +// I chose not to tie the extern_type explicitly to char. But if any combination +// of types other than is used, then std::codecvt must be +// specialized on those types for this to work. + +#include +#include // for mbstate_t +#include // for std::size_t + +#include +#include + +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std { + using ::mbstate_t; + using ::size_t; +} +#endif + +// maximum lenght of a multibyte string +#define MB_LENGTH_MAX 8 + +BOOST_UTF8_BEGIN_NAMESPACE + +//----------------------------------------------------------------------------// +// // +// utf8_codecvt_facet // +// // +// See utf8_codecvt_facet.ipp for the implementation. // +//----------------------------------------------------------------------------// + + +struct BOOST_UTF8_DECL utf8_codecvt_facet : + public std::codecvt +{ +public: + explicit utf8_codecvt_facet(std::size_t no_locale_manage=0) + : std::codecvt(no_locale_manage) + {} +protected: + virtual std::codecvt_base::result do_in( + std::mbstate_t& state, + const char * from, + const char * from_end, + const char * & from_next, + wchar_t * to, + wchar_t * to_end, + wchar_t*& to_next + ) const; + + virtual std::codecvt_base::result do_out( + std::mbstate_t & state, + const wchar_t * from, + const wchar_t * from_end, + const wchar_t* & from_next, + char * to, + char * to_end, + char * & to_next + ) const; + + bool invalid_continuing_octet(unsigned char octet_1) const { + return (octet_1 < 0x80|| 0xbf< octet_1); + } + + bool invalid_leading_octet(unsigned char octet_1) const { + return (0x7f < octet_1 && octet_1 < 0xc0) || + (octet_1 > 0xfd); + } + + // continuing octets = octets except for the leading octet + static unsigned int get_cont_octet_count(unsigned char lead_octet) { + return get_octet_count(lead_octet) - 1; + } + + static unsigned int get_octet_count(unsigned char lead_octet); + + // How many "continuing octets" will be needed for this word + // == total octets - 1. + int get_cont_octet_out_count(wchar_t word) const ; + + virtual bool do_always_noconv() const BOOST_NOEXCEPT_OR_NOTHROW { + return false; + } + + // UTF-8 isn't really stateful since we rewind on partial conversions + virtual std::codecvt_base::result do_unshift( + std::mbstate_t&, + char * from, + char * /*to*/, + char * & next + ) const { + next = from; + return ok; + } + + virtual int do_encoding() const BOOST_NOEXCEPT_OR_NOTHROW { + const int variable_byte_external_encoding=0; + return variable_byte_external_encoding; + } + + // How many char objects can I process to get <= max_limit + // wchar_t objects? + virtual int do_length( + const std::mbstate_t &, + const char * from, + const char * from_end, + std::size_t max_limit + ) const +#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) + throw() +#endif + ; + virtual int do_length( + std::mbstate_t & s, + const char * from, + const char * from_end, + std::size_t max_limit + ) const +#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) + throw() +#endif + { + return do_length( + const_cast(s), + from, + from_end, + max_limit + ); + } + // Largest possible value do_length(state,from,from_end,1) could return. + virtual int do_max_length() const BOOST_NOEXCEPT_OR_NOTHROW { + return 6; // largest UTF-8 encoding of a UCS-4 character + } +}; + +BOOST_UTF8_END_NAMESPACE + +#endif // BOOST_UTF8_CODECVT_FACET_HPP diff --git a/ThirdParty/boost-Subset/boost/detail/utf8_codecvt_facet.ipp b/ThirdParty/boost-Subset/boost/detail/utf8_codecvt_facet.ipp new file mode 100644 index 0000000000..d39170fdab --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/utf8_codecvt_facet.ipp @@ -0,0 +1,283 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// utf8_codecvt_facet.ipp + +// Copyright (c) 2001 Ronald Garcia, Indiana University (garcia@osl.iu.edu) +// Andrew Lumsdaine, Indiana University (lums@osl.iu.edu). +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Please see the comments in to +// learn how this file should be used. + +#include + +#include // for multi-byte converson routines +#include + +#include +#include + +// If we don't have wstring, then Unicode support +// is not available anyway, so we don't need to even +// compiler this file. This also fixes the problem +// with mingw, which can compile this file, but will +// generate link error when building DLL. +#ifndef BOOST_NO_STD_WSTRING + +BOOST_UTF8_BEGIN_NAMESPACE + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// implementation for wchar_t + +// Translate incoming UTF-8 into UCS-4 +std::codecvt_base::result utf8_codecvt_facet::do_in( + std::mbstate_t& /*state*/, + const char * from, + const char * from_end, + const char * & from_next, + wchar_t * to, + wchar_t * to_end, + wchar_t * & to_next +) const { + // Basic algorithm: The first octet determines how many + // octets total make up the UCS-4 character. The remaining + // "continuing octets" all begin with "10". To convert, subtract + // the amount that specifies the number of octets from the first + // octet. Subtract 0x80 (1000 0000) from each continuing octet, + // then mash the whole lot together. Note that each continuing + // octet only uses 6 bits as unique values, so only shift by + // multiples of 6 to combine. + while (from != from_end && to != to_end) { + + // Error checking on the first octet + if (invalid_leading_octet(*from)){ + from_next = from; + to_next = to; + return std::codecvt_base::error; + } + + // The first octet is adjusted by a value dependent upon + // the number of "continuing octets" encoding the character + const int cont_octet_count = get_cont_octet_count(*from); + const wchar_t octet1_modifier_table[] = { + 0x00, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc + }; + + // The unsigned char conversion is necessary in case char is + // signed (I learned this the hard way) + wchar_t ucs_result = + (unsigned char)(*from++) - octet1_modifier_table[cont_octet_count]; + + // Invariants : + // 1) At the start of the loop, 'i' continuing characters have been + // processed + // 2) *from points to the next continuing character to be processed. + int i = 0; + while(i != cont_octet_count && from != from_end) { + + // Error checking on continuing characters + if (invalid_continuing_octet(*from)) { + from_next = from; + to_next = to; + return std::codecvt_base::error; + } + + ucs_result *= (1 << 6); + + // each continuing character has an extra (10xxxxxx)b attached to + // it that must be removed. + ucs_result += (unsigned char)(*from++) - 0x80; + ++i; + } + + // If the buffer ends with an incomplete unicode character... + if (from == from_end && i != cont_octet_count) { + // rewind "from" to before the current character translation + from_next = from - (i+1); + to_next = to; + return std::codecvt_base::partial; + } + *to++ = ucs_result; + } + from_next = from; + to_next = to; + + // Were we done converting or did we run out of destination space? + if(from == from_end) return std::codecvt_base::ok; + else return std::codecvt_base::partial; +} + +std::codecvt_base::result utf8_codecvt_facet::do_out( + std::mbstate_t& /*state*/, + const wchar_t * from, + const wchar_t * from_end, + const wchar_t * & from_next, + char * to, + char * to_end, + char * & to_next +) const +{ + // RG - consider merging this table with the other one + const wchar_t octet1_modifier_table[] = { + 0x00, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc + }; + + wchar_t max_wchar = (std::numeric_limits::max)(); + while (from != from_end && to != to_end) { + + // Check for invalid UCS-4 character + if (*from > max_wchar) { + from_next = from; + to_next = to; + return std::codecvt_base::error; + } + + int cont_octet_count = get_cont_octet_out_count(*from); + + // RG - comment this formula better + int shift_exponent = (cont_octet_count) * 6; + + // Process the first character + *to++ = static_cast(octet1_modifier_table[cont_octet_count] + + (unsigned char)(*from / (1 << shift_exponent))); + + // Process the continuation characters + // Invariants: At the start of the loop: + // 1) 'i' continuing octets have been generated + // 2) '*to' points to the next location to place an octet + // 3) shift_exponent is 6 more than needed for the next octet + int i = 0; + while (i != cont_octet_count && to != to_end) { + shift_exponent -= 6; + *to++ = static_cast(0x80 + ((*from / (1 << shift_exponent)) % (1 << 6))); + ++i; + } + // If we filled up the out buffer before encoding the character + if(to == to_end && i != cont_octet_count) { + from_next = from; + to_next = to - (i+1); + return std::codecvt_base::partial; + } + ++from; + } + from_next = from; + to_next = to; + // Were we done or did we run out of destination space + if(from == from_end) return std::codecvt_base::ok; + else return std::codecvt_base::partial; +} + +// How many char objects can I process to get <= max_limit +// wchar_t objects? +int utf8_codecvt_facet::do_length( + const std::mbstate_t &, + const char * from, + const char * from_end, + std::size_t max_limit +) const +#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) + throw() +#endif +{ + // RG - this code is confusing! I need a better way to express it. + // and test cases. + + // Invariants: + // 1) last_octet_count has the size of the last measured character + // 2) char_count holds the number of characters shown to fit + // within the bounds so far (no greater than max_limit) + // 3) from_next points to the octet 'last_octet_count' before the + // last measured character. + int last_octet_count=0; + std::size_t char_count = 0; + const char* from_next = from; + // Use "<" because the buffer may represent incomplete characters + while (from_next+last_octet_count <= from_end && char_count <= max_limit) { + from_next += last_octet_count; + last_octet_count = (get_octet_count(*from_next)); + ++char_count; + } + return static_cast(from_next-from_end); +} + +unsigned int utf8_codecvt_facet::get_octet_count( + unsigned char lead_octet +){ + // if the 0-bit (MSB) is 0, then 1 character + if (lead_octet <= 0x7f) return 1; + + // Otherwise the count number of consecutive 1 bits starting at MSB +// assert(0xc0 <= lead_octet && lead_octet <= 0xfd); + + if (0xc0 <= lead_octet && lead_octet <= 0xdf) return 2; + else if (0xe0 <= lead_octet && lead_octet <= 0xef) return 3; + else if (0xf0 <= lead_octet && lead_octet <= 0xf7) return 4; + else if (0xf8 <= lead_octet && lead_octet <= 0xfb) return 5; + else return 6; +} + +namespace detail { + +template +int get_cont_octet_out_count_impl(wchar_t word){ + if (word < 0x80) { + return 0; + } + if (word < 0x800) { + return 1; + } + return 2; +} + +template<> +int get_cont_octet_out_count_impl<4>(wchar_t word){ + if (word < 0x80) { + return 0; + } + if (word < 0x800) { + return 1; + } + + // Note that the following code will generate warnings on some platforms + // where wchar_t is defined as UCS2. The warnings are superfluous as the + // specialization is never instantitiated with such compilers, but this + // can cause problems if warnings are being treated as errors, so we guard + // against that. Including as we do + // should be enough to get WCHAR_MAX defined. +#if !defined(WCHAR_MAX) +# error WCHAR_MAX not defined! +#endif + // cope with VC++ 7.1 or earlier having invalid WCHAR_MAX +#if defined(_MSC_VER) && _MSC_VER <= 1310 // 7.1 or earlier + return 2; +#elif WCHAR_MAX > 0x10000 + + if (word < 0x10000) { + return 2; + } + if (word < 0x200000) { + return 3; + } + if (word < 0x4000000) { + return 4; + } + return 5; + +#else + return 2; +#endif +} + +} // namespace detail + +// How many "continuing octets" will be needed for this word +// == total octets - 1. +int utf8_codecvt_facet::get_cont_octet_out_count( + wchar_t word +) const { + return detail::get_cont_octet_out_count_impl(word); +} +BOOST_UTF8_END_NAMESPACE + +#endif diff --git a/ThirdParty/boost-Subset/boost/detail/winapi/GetCurrentProcess.hpp b/ThirdParty/boost-Subset/boost/detail/winapi/GetCurrentProcess.hpp new file mode 100644 index 0000000000..51206bb4e8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/winapi/GetCurrentProcess.hpp @@ -0,0 +1,29 @@ +// GetCurrentProcess.hpp --------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_GETCURRENTPROCESS_HPP +#define BOOST_DETAIL_WINAPI_GETCURRENTPROCESS_HPP + +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +namespace boost { +namespace detail { +namespace winapi { +#if defined( BOOST_USE_WINDOWS_H ) + using ::GetCurrentProcess; +#else + extern "C" __declspec(dllimport) HANDLE_ WINAPI GetCurrentProcess(); +#endif +} +} +} +#endif // BOOST_DETAIL_WINAPI_GETCURRENTPROCESS_HPP diff --git a/ThirdParty/boost-Subset/boost/detail/winapi/GetCurrentThread.hpp b/ThirdParty/boost-Subset/boost/detail/winapi/GetCurrentThread.hpp new file mode 100644 index 0000000000..595b751d13 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/winapi/GetCurrentThread.hpp @@ -0,0 +1,38 @@ +// GetCurrentThread.hpp --------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_GETCURRENTTHREAD_HPP +#define BOOST_DETAIL_WINAPI_GETCURRENTTHREAD_HPP + +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +namespace boost { +namespace detail { +namespace winapi { +#if defined( UNDER_CE ) +// Windows CE define GetCurrentThread as an inline function in kfuncs.h +inline HANDLE_ GetCurrentThread() +{ + return ::GetCurrentThread(); +} +#else +#if defined( BOOST_USE_WINDOWS_H ) + using ::GetCurrentThread; +#else + extern "C" __declspec(dllimport) HANDLE_ WINAPI GetCurrentThread(); +#endif +#endif +} +} +} + +#endif // BOOST_DETAIL_WINAPI_GETCURRENTTHREAD_HPP diff --git a/ThirdParty/boost-Subset/boost/detail/winapi/GetLastError.hpp b/ThirdParty/boost-Subset/boost/detail/winapi/GetLastError.hpp new file mode 100644 index 0000000000..6e9e2d998a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/winapi/GetLastError.hpp @@ -0,0 +1,31 @@ +// GetLastError.hpp --------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_GETLASTERROR_HPP +#define BOOST_DETAIL_WINAPI_GETLASTERROR_HPP + +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +namespace boost { +namespace detail { +namespace winapi { +#if defined( BOOST_USE_WINDOWS_H ) + using ::GetLastError; +#else + extern "C" __declspec(dllimport) DWORD_ WINAPI + GetLastError(); +#endif +} +} +} + +#endif // BOOST_DETAIL_WINAPI_GETLASTERROR_HPP diff --git a/ThirdParty/boost-Subset/boost/detail/winapi/GetProcessTimes.hpp b/ThirdParty/boost-Subset/boost/detail/winapi/GetProcessTimes.hpp new file mode 100644 index 0000000000..f2860b06bd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/winapi/GetProcessTimes.hpp @@ -0,0 +1,39 @@ +// GetProcessTimes.hpp --------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_GETPROCESSTIMES_HPP +#define BOOST_DETAIL_WINAPI_GETPROCESSTIMES_HPP + +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +namespace boost { +namespace detail { +namespace winapi { +#if !defined(UNDER_CE) // Windows CE does not define GetProcessTimes +#if defined( BOOST_USE_WINDOWS_H ) + using ::GetProcessTimes; +#else + extern "C" __declspec(dllimport) BOOL_ WINAPI + GetProcessTimes( + HANDLE_ hProcess, + LPFILETIME_ lpCreationTime, + LPFILETIME_ lpExitTime, + LPFILETIME_ lpKernelTime, + LPFILETIME_ lpUserTime + ); +#endif +#endif +} +} +} + +#endif // BOOST_DETAIL_WINAPI_GETPROCESSTIMES_HPP diff --git a/ThirdParty/boost-Subset/boost/detail/winapi/GetThreadTimes.hpp b/ThirdParty/boost-Subset/boost/detail/winapi/GetThreadTimes.hpp new file mode 100644 index 0000000000..3428edad22 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/winapi/GetThreadTimes.hpp @@ -0,0 +1,37 @@ +// GetThreadTimes.hpp --------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_GETTHREADTIMES_HPP +#define BOOST_DETAIL_WINAPI_GETTHREADTIMES_HPP + +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +namespace boost { +namespace detail { +namespace winapi { +#if defined( BOOST_USE_WINDOWS_H ) + using ::GetThreadTimes; +#else + extern "C" __declspec(dllimport) BOOL_ WINAPI + GetThreadTimes( + HANDLE_ hThread, + LPFILETIME_ lpCreationTime, + LPFILETIME_ lpExitTime, + LPFILETIME_ lpKernelTime, + LPFILETIME_ lpUserTime + ); +#endif +} +} +} + +#endif // BOOST_DETAIL_WINAPI_GETTHREADTIMES_HPP diff --git a/ThirdParty/boost-Subset/boost/detail/winapi/basic_types.hpp b/ThirdParty/boost-Subset/boost/detail/winapi/basic_types.hpp new file mode 100644 index 0000000000..09d907bdc2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/winapi/basic_types.hpp @@ -0,0 +1,134 @@ +// basic_types.hpp --------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_BASIC_TYPES_HPP +#define BOOST_DETAIL_WINAPI_BASIC_TYPES_HPP + +#include +#include +#include + +#if defined( BOOST_USE_WINDOWS_H ) +# include +#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined(__CYGWIN__) +# include +// @FIXME Which condition must be tested +# ifdef UNDER_CE +# ifndef WINAPI +# ifndef _WIN32_WCE_EMULATION +# define WINAPI __cdecl // Note this doesn't match the desktop definition +# else +# define WINAPI __stdcall +# endif +# endif +# else +# ifndef WINAPI +# define WINAPI __stdcall +# endif +# endif +# ifndef NTAPI +# define NTAPI __stdcall +# endif +#else +# error "Win32 functions not available" +#endif + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +namespace boost { +namespace detail { +namespace winapi { +#if defined( BOOST_USE_WINDOWS_H ) + typedef ::BOOL BOOL_; + typedef ::BOOLEAN BOOLEAN_; + typedef ::PBOOLEAN PBOOLEAN_; + typedef ::BYTE BYTE_; + typedef ::WORD WORD_; + typedef ::DWORD DWORD_; + typedef ::HANDLE HANDLE_; + typedef ::HMODULE HMODULE_; + typedef ::LONG LONG_; + typedef ::ULONG ULONG_; + typedef ::LONGLONG LONGLONG_; + typedef ::ULONGLONG ULONGLONG_; + typedef ::INT_PTR INT_PTR_; + typedef ::UINT_PTR UINT_PTR_; + typedef ::LONG_PTR LONG_PTR_; + typedef ::ULONG_PTR ULONG_PTR_; + typedef ::LARGE_INTEGER LARGE_INTEGER_; + typedef ::PLARGE_INTEGER PLARGE_INTEGER_; + typedef ::PVOID PVOID_; + typedef ::LPVOID LPVOID_; + typedef ::CHAR CHAR_; + typedef ::LPSTR LPSTR_; + typedef ::LPCSTR LPCSTR_; + typedef ::WCHAR WCHAR_; + typedef ::LPWSTR LPWSTR_; + typedef ::LPCWSTR LPCWSTR_; +#else +extern "C" { + typedef int BOOL_; + typedef unsigned char BYTE_; + typedef BYTE_ BOOLEAN_; + typedef BOOLEAN_* PBOOLEAN_; + typedef unsigned short WORD_; + typedef unsigned long DWORD_; + typedef void* HANDLE_; + typedef void* HMODULE_; + + typedef long LONG_; + typedef unsigned long ULONG_; + + typedef boost::int64_t LONGLONG_; + typedef boost::uint64_t ULONGLONG_; + +// @FIXME Which condition must be tested +# ifdef _WIN64 +#if defined(__CYGWIN__) + typedef long INT_PTR_; + typedef unsigned long UINT_PTR_; + typedef long LONG_PTR_; + typedef unsigned long ULONG_PTR_; +#else + typedef __int64 INT_PTR_; + typedef unsigned __int64 UINT_PTR_; + typedef __int64 LONG_PTR_; + typedef unsigned __int64 ULONG_PTR_; +#endif +# else + typedef int INT_PTR_; + typedef unsigned int UINT_PTR_; + typedef long LONG_PTR_; + typedef unsigned long ULONG_PTR_; +# endif + + typedef struct _LARGE_INTEGER { + LONGLONG_ QuadPart; + } LARGE_INTEGER_; + typedef LARGE_INTEGER_ *PLARGE_INTEGER_; + + typedef void *PVOID_; + typedef void *LPVOID_; + typedef const void *LPCVOID_; + + typedef char CHAR_; + typedef CHAR_ *LPSTR_; + typedef const CHAR_ *LPCSTR_; + + typedef wchar_t WCHAR_; + typedef WCHAR_ *LPWSTR_; + typedef const WCHAR_ *LPCWSTR_; +} +#endif +} +} +} + +#endif // BOOST_DETAIL_WINAPI_BASIC_TYPES_HPP diff --git a/ThirdParty/boost-Subset/boost/detail/winapi/config.hpp b/ThirdParty/boost-Subset/boost/detail/winapi/config.hpp new file mode 100644 index 0000000000..2b0cdfbada --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/winapi/config.hpp @@ -0,0 +1,53 @@ +// config.hpp --------------------------------------------------------------// + +// Copyright 2013 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_ +#define BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_ + +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +// These constants reflect _WIN32_WINNT_* macros from sdkddkver.h +// See also: http://msdn.microsoft.com/en-us/library/windows/desktop/aa383745%28v=vs.85%29.aspx#setting_winver_or__win32_winnt +#define BOOST_WINAPI_VERSION_NT4 0x0400 +#define BOOST_WINAPI_VERSION_WIN2K 0x0500 +#define BOOST_WINAPI_VERSION_WINXP 0x0501 +#define BOOST_WINAPI_VERSION_WS03 0x0502 +#define BOOST_WINAPI_VERSION_WIN6 0x0600 +#define BOOST_WINAPI_VERSION_VISTA 0x0600 +#define BOOST_WINAPI_VERSION_WS08 0x0600 +#define BOOST_WINAPI_VERSION_LONGHORN 0x0600 +#define BOOST_WINAPI_VERSION_WIN7 0x0601 +#define BOOST_WINAPI_VERSION_WIN8 0x0602 +#define BOOST_WINAPI_VERSION_WINBLUE 0x0603 + +#if !defined(BOOST_USE_WINAPI_VERSION) +#if defined(_WIN32_WINNT) +#define BOOST_USE_WINAPI_VERSION _WIN32_WINNT +#elif defined(WINVER) +#define BOOST_USE_WINAPI_VERSION WINVER +#else +// By default use Windows XP API +#define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WINXP +#endif +#endif + +#if defined(BOOST_USE_WINDOWS_H) +// We have to define the version macros so that windows.h provides the necessary symbols +#if !defined(_WIN32_WINNT) +#define _WIN32_WINNT BOOST_USE_WINAPI_VERSION +#endif +#if !defined(WINVER) +#define WINVER BOOST_USE_WINAPI_VERSION +#endif +#endif + +#endif // BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_ diff --git a/ThirdParty/boost-Subset/boost/detail/winapi/time.hpp b/ThirdParty/boost-Subset/boost/detail/winapi/time.hpp new file mode 100644 index 0000000000..6a6b447117 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/winapi/time.hpp @@ -0,0 +1,105 @@ +// time.hpp --------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba +// Copyright (c) Microsoft Corporation 2014 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_TIME_HPP +#define BOOST_DETAIL_WINAPI_TIME_HPP + +#include +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +namespace boost { +namespace detail { +namespace winapi { + +#if defined( BOOST_USE_WINDOWS_H ) + + typedef FILETIME FILETIME_; + typedef PFILETIME PFILETIME_; + typedef LPFILETIME LPFILETIME_; + + typedef SYSTEMTIME SYSTEMTIME_; + typedef SYSTEMTIME* PSYSTEMTIME_; + + #ifdef BOOST_HAS_GETSYSTEMTIMEASFILETIME // Windows CE does not define GetSystemTimeAsFileTime + using ::GetSystemTimeAsFileTime; + #endif + #if BOOST_PLAT_WINDOWS_DESKTOP + using ::FileTimeToLocalFileTime; + #endif + using ::GetSystemTime; + using ::SystemTimeToFileTime; + + #if BOOST_PLAT_WINDOWS_DESKTOP + using ::GetTickCount; + #endif + #if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6 + using ::GetTickCount64; + #endif + +#else + +extern "C" { + typedef struct _FILETIME { + DWORD_ dwLowDateTime; + DWORD_ dwHighDateTime; + } FILETIME_, *PFILETIME_, *LPFILETIME_; + + typedef struct _SYSTEMTIME { + WORD_ wYear; + WORD_ wMonth; + WORD_ wDayOfWeek; + WORD_ wDay; + WORD_ wHour; + WORD_ wMinute; + WORD_ wSecond; + WORD_ wMilliseconds; + } SYSTEMTIME_, *PSYSTEMTIME_; + + #ifdef BOOST_HAS_GETSYSTEMTIMEASFILETIME // Windows CE does not define GetSystemTimeAsFileTime + __declspec(dllimport) void WINAPI + GetSystemTimeAsFileTime(FILETIME_* lpFileTime); + #endif + __declspec(dllimport) int WINAPI + FileTimeToLocalFileTime(const FILETIME_* lpFileTime, + FILETIME_* lpLocalFileTime); + __declspec(dllimport) void WINAPI + GetSystemTime(SYSTEMTIME_* lpSystemTime); + __declspec(dllimport) int WINAPI + SystemTimeToFileTime(const SYSTEMTIME_* lpSystemTime, + FILETIME_* lpFileTime); + #if BOOST_PLAT_WINDOWS_DESKTOP + __declspec(dllimport) DWORD_ WINAPI + GetTickCount(); + #endif + #if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6 + __declspec(dllimport) ULONGLONG_ WINAPI + GetTickCount64(); + #endif +} + +#endif + +#ifndef BOOST_HAS_GETSYSTEMTIMEASFILETIME +inline void WINAPI GetSystemTimeAsFileTime(FILETIME_* lpFileTime) +{ + SYSTEMTIME_ st; + GetSystemTime(&st); + SystemTimeToFileTime(&st, lpFileTime); +} +#endif + +} +} +} + +#endif // BOOST_DETAIL_WINAPI_TIME_HPP diff --git a/ThirdParty/boost-Subset/boost/detail/winapi/timers.hpp b/ThirdParty/boost-Subset/boost/detail/winapi/timers.hpp new file mode 100644 index 0000000000..04c6dfbc41 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/winapi/timers.hpp @@ -0,0 +1,44 @@ +// timers.hpp --------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_TIMERS_HPP +#define BOOST_DETAIL_WINAPI_TIMERS_HPP + +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +namespace boost +{ +namespace detail +{ +namespace winapi +{ +#if defined( BOOST_USE_WINDOWS_H ) + using ::QueryPerformanceCounter; + using ::QueryPerformanceFrequency; +#else +extern "C" { + __declspec(dllimport) BOOL_ WINAPI + QueryPerformanceCounter( + LARGE_INTEGER_ *lpPerformanceCount + ); + + __declspec(dllimport) BOOL_ WINAPI + QueryPerformanceFrequency( + LARGE_INTEGER_ *lpFrequency + ); +} +#endif +} +} +} + +#endif // BOOST_DETAIL_WINAPI_TIMERS_HPP diff --git a/ThirdParty/boost-Subset/boost/detail/workaround.hpp b/ThirdParty/boost-Subset/boost/detail/workaround.hpp new file mode 100644 index 0000000000..40b3423b37 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/detail/workaround.hpp @@ -0,0 +1,267 @@ +// Copyright David Abrahams 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef WORKAROUND_DWA2002126_HPP +# define WORKAROUND_DWA2002126_HPP + +// Compiler/library version workaround macro +// +// Usage: +// +// #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +// // workaround for eVC4 and VC6 +// ... // workaround code here +// #endif +// +// When BOOST_STRICT_CONFIG is defined, expands to 0. Otherwise, the +// first argument must be undefined or expand to a numeric +// value. The above expands to: +// +// (BOOST_MSVC) != 0 && (BOOST_MSVC) < 1300 +// +// When used for workarounds that apply to the latest known version +// and all earlier versions of a compiler, the following convention +// should be observed: +// +// #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1301)) +// +// The version number in this case corresponds to the last version in +// which the workaround was known to have been required. When +// BOOST_DETECT_OUTDATED_WORKAROUNDS is not the defined, the macro +// BOOST_TESTED_AT(x) expands to "!= 0", which effectively activates +// the workaround for any version of the compiler. When +// BOOST_DETECT_OUTDATED_WORKAROUNDS is defined, a compiler warning or +// error will be issued if the compiler version exceeds the argument +// to BOOST_TESTED_AT(). This can be used to locate workarounds which +// may be obsoleted by newer versions. + +# ifndef BOOST_STRICT_CONFIG + +#include + +#ifndef __BORLANDC__ +#define __BORLANDC___WORKAROUND_GUARD 1 +#else +#define __BORLANDC___WORKAROUND_GUARD 0 +#endif +#ifndef __CODEGEARC__ +#define __CODEGEARC___WORKAROUND_GUARD 1 +#else +#define __CODEGEARC___WORKAROUND_GUARD 0 +#endif +#ifndef _MSC_VER +#define _MSC_VER_WORKAROUND_GUARD 1 +#else +#define _MSC_VER_WORKAROUND_GUARD 0 +#endif +#ifndef _MSC_FULL_VER +#define _MSC_FULL_VER_WORKAROUND_GUARD 1 +#else +#define _MSC_FULL_VER_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_MSVC +#define BOOST_MSVC_WORKAROUND_GUARD 1 +#else +#define BOOST_MSVC_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_MSVC_FULL_VER +#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 1 +#else +#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 0 +#endif +#ifndef __GNUC__ +#define __GNUC___WORKAROUND_GUARD 1 +#else +#define __GNUC___WORKAROUND_GUARD 0 +#endif +#ifndef __GNUC_MINOR__ +#define __GNUC_MINOR___WORKAROUND_GUARD 1 +#else +#define __GNUC_MINOR___WORKAROUND_GUARD 0 +#endif +#ifndef __GNUC_PATCHLEVEL__ +#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 1 +#else +#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 0 +#endif +#ifndef __IBMCPP__ +#define __IBMCPP___WORKAROUND_GUARD 1 +#else +#define __IBMCPP___WORKAROUND_GUARD 0 +#endif +#ifndef __SUNPRO_CC +#define __SUNPRO_CC_WORKAROUND_GUARD 1 +#else +#define __SUNPRO_CC_WORKAROUND_GUARD 0 +#endif +#ifndef __DECCXX_VER +#define __DECCXX_VER_WORKAROUND_GUARD 1 +#else +#define __DECCXX_VER_WORKAROUND_GUARD 0 +#endif +#ifndef __MWERKS__ +#define __MWERKS___WORKAROUND_GUARD 1 +#else +#define __MWERKS___WORKAROUND_GUARD 0 +#endif +#ifndef __EDG__ +#define __EDG___WORKAROUND_GUARD 1 +#else +#define __EDG___WORKAROUND_GUARD 0 +#endif +#ifndef __EDG_VERSION__ +#define __EDG_VERSION___WORKAROUND_GUARD 1 +#else +#define __EDG_VERSION___WORKAROUND_GUARD 0 +#endif +#ifndef __HP_aCC +#define __HP_aCC_WORKAROUND_GUARD 1 +#else +#define __HP_aCC_WORKAROUND_GUARD 0 +#endif +#ifndef __hpxstd98 +#define __hpxstd98_WORKAROUND_GUARD 1 +#else +#define __hpxstd98_WORKAROUND_GUARD 0 +#endif +#ifndef _CRAYC +#define _CRAYC_WORKAROUND_GUARD 1 +#else +#define _CRAYC_WORKAROUND_GUARD 0 +#endif +#ifndef __DMC__ +#define __DMC___WORKAROUND_GUARD 1 +#else +#define __DMC___WORKAROUND_GUARD 0 +#endif +#ifndef MPW_CPLUS +#define MPW_CPLUS_WORKAROUND_GUARD 1 +#else +#define MPW_CPLUS_WORKAROUND_GUARD 0 +#endif +#ifndef __COMO__ +#define __COMO___WORKAROUND_GUARD 1 +#else +#define __COMO___WORKAROUND_GUARD 0 +#endif +#ifndef __COMO_VERSION__ +#define __COMO_VERSION___WORKAROUND_GUARD 1 +#else +#define __COMO_VERSION___WORKAROUND_GUARD 0 +#endif +#ifndef __INTEL_COMPILER +#define __INTEL_COMPILER_WORKAROUND_GUARD 1 +#else +#define __INTEL_COMPILER_WORKAROUND_GUARD 0 +#endif +#ifndef __ICL +#define __ICL_WORKAROUND_GUARD 1 +#else +#define __ICL_WORKAROUND_GUARD 0 +#endif +#ifndef _COMPILER_VERSION +#define _COMPILER_VERSION_WORKAROUND_GUARD 1 +#else +#define _COMPILER_VERSION_WORKAROUND_GUARD 0 +#endif + +#ifndef _RWSTD_VER +#define _RWSTD_VER_WORKAROUND_GUARD 1 +#else +#define _RWSTD_VER_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_RWSTD_VER +#define BOOST_RWSTD_VER_WORKAROUND_GUARD 1 +#else +#define BOOST_RWSTD_VER_WORKAROUND_GUARD 0 +#endif +#ifndef __GLIBCPP__ +#define __GLIBCPP___WORKAROUND_GUARD 1 +#else +#define __GLIBCPP___WORKAROUND_GUARD 0 +#endif +#ifndef _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC +#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 1 +#else +#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 0 +#endif +#ifndef __SGI_STL_PORT +#define __SGI_STL_PORT_WORKAROUND_GUARD 1 +#else +#define __SGI_STL_PORT_WORKAROUND_GUARD 0 +#endif +#ifndef _STLPORT_VERSION +#define _STLPORT_VERSION_WORKAROUND_GUARD 1 +#else +#define _STLPORT_VERSION_WORKAROUND_GUARD 0 +#endif +#ifndef __LIBCOMO_VERSION__ +#define __LIBCOMO_VERSION___WORKAROUND_GUARD 1 +#else +#define __LIBCOMO_VERSION___WORKAROUND_GUARD 0 +#endif +#ifndef _CPPLIB_VER +#define _CPPLIB_VER_WORKAROUND_GUARD 1 +#else +#define _CPPLIB_VER_WORKAROUND_GUARD 0 +#endif + +#ifndef BOOST_INTEL_CXX_VERSION +#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 1 +#else +#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_INTEL_WIN +#define BOOST_INTEL_WIN_WORKAROUND_GUARD 1 +#else +#define BOOST_INTEL_WIN_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_DINKUMWARE_STDLIB +#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 1 +#else +#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_INTEL +#define BOOST_INTEL_WORKAROUND_GUARD 1 +#else +#define BOOST_INTEL_WORKAROUND_GUARD 0 +#endif +// Always define to zero, if it's used it'll be defined my MPL: +#define BOOST_MPL_CFG_GCC_WORKAROUND_GUARD 0 + +# define BOOST_WORKAROUND(symbol, test) \ + ((symbol ## _WORKAROUND_GUARD + 0 == 0) && \ + (symbol != 0) && (1 % (( (symbol test) ) + 1))) +// ^ ^ ^ ^ +// The extra level of parenthesis nesting above, along with the +// BOOST_OPEN_PAREN indirection below, is required to satisfy the +// broken preprocessor in MWCW 8.3 and earlier. +// +// The basic mechanism works as follows: +// (symbol test) + 1 => if (symbol test) then 2 else 1 +// 1 % ((symbol test) + 1) => if (symbol test) then 1 else 0 +// +// The complication with % is for cooperation with BOOST_TESTED_AT(). +// When "test" is BOOST_TESTED_AT(x) and +// BOOST_DETECT_OUTDATED_WORKAROUNDS is #defined, +// +// symbol test => if (symbol <= x) then 1 else -1 +// (symbol test) + 1 => if (symbol <= x) then 2 else 0 +// 1 % ((symbol test) + 1) => if (symbol <= x) then 1 else divide-by-zero +// + +# ifdef BOOST_DETECT_OUTDATED_WORKAROUNDS +# define BOOST_OPEN_PAREN ( +# define BOOST_TESTED_AT(value) > value) ?(-1): BOOST_OPEN_PAREN 1 +# else +# define BOOST_TESTED_AT(value) != ((value)-(value)) +# endif + +# else + +# define BOOST_WORKAROUND(symbol, test) 0 + +# endif + +#endif // WORKAROUND_DWA2002126_HPP diff --git a/ThirdParty/boost-Subset/boost/enable_shared_from_this.hpp b/ThirdParty/boost-Subset/boost/enable_shared_from_this.hpp new file mode 100644 index 0000000000..b1bb63d9a2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/enable_shared_from_this.hpp @@ -0,0 +1,18 @@ +#ifndef BOOST_ENABLE_SHARED_FROM_THIS_HPP_INCLUDED +#define BOOST_ENABLE_SHARED_FROM_THIS_HPP_INCLUDED + +// +// enable_shared_from_this.hpp +// +// Copyright (c) 2002 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// http://www.boost.org/libs/smart_ptr/enable_shared_from_this.html +// + +#include + +#endif // #ifndef BOOST_ENABLE_SHARED_FROM_THIS_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/exception/current_exception_cast.hpp b/ThirdParty/boost-Subset/boost/exception/current_exception_cast.hpp new file mode 100644 index 0000000000..5d81f00b00 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/exception/current_exception_cast.hpp @@ -0,0 +1,43 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_7E83C166200811DE885E826156D89593 +#define UUID_7E83C166200811DE885E826156D89593 +#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma GCC system_header +#endif +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(push,1) +#endif + +namespace +boost + { + template + inline + E * + current_exception_cast() + { + try + { + throw; + } + catch( + E & e ) + { + return &e; + } + catch( + ...) + { + return 0; + } + } + } + +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(pop) +#endif +#endif diff --git a/ThirdParty/boost-Subset/boost/exception/detail/error_info_impl.hpp b/ThirdParty/boost-Subset/boost/exception/detail/error_info_impl.hpp new file mode 100644 index 0000000000..12e601b556 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/exception/detail/error_info_impl.hpp @@ -0,0 +1,74 @@ +//Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_CE6983AC753411DDA764247956D89593 +#define UUID_CE6983AC753411DDA764247956D89593 +#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma GCC system_header +#endif +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(push,1) +#endif + +#include + +namespace +boost + { + namespace + exception_detail + { + class + error_info_base + { + public: + + virtual std::string name_value_string() const = 0; + + protected: + + virtual + ~error_info_base() throw() + { + } + }; + } + + template + class + error_info: + public exception_detail::error_info_base + { + public: + + typedef T value_type; + + error_info( value_type const & value ); + ~error_info() throw(); + + value_type const & + value() const + { + return value_; + } + + value_type & + value() + { + return value_; + } + + private: + + std::string name_value_string() const; + + value_type value_; + }; + } + +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(pop) +#endif +#endif diff --git a/ThirdParty/boost-Subset/boost/exception/detail/type_info.hpp b/ThirdParty/boost-Subset/boost/exception/detail/type_info.hpp new file mode 100644 index 0000000000..b8c7d48bae --- /dev/null +++ b/ThirdParty/boost-Subset/boost/exception/detail/type_info.hpp @@ -0,0 +1,81 @@ +//Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_C3E1741C754311DDB2834CCA55D89593 +#define UUID_C3E1741C754311DDB2834CCA55D89593 +#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma GCC system_header +#endif +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(push,1) +#endif + +#include +#include +#include +#include +#include + +namespace +boost + { + template + inline + std::string + tag_type_name() + { +#ifdef BOOST_NO_TYPEID + return BOOST_CURRENT_FUNCTION; +#else + return core::demangle(typeid(T*).name()); +#endif + } + + template + inline + std::string + type_name() + { +#ifdef BOOST_NO_TYPEID + return BOOST_CURRENT_FUNCTION; +#else + return core::demangle(typeid(T).name()); +#endif + } + + namespace + exception_detail + { + struct + type_info_ + { + core::typeinfo const * type_; + + explicit + type_info_( core::typeinfo const & type ): + type_(&type) + { + } + + friend + bool + operator<( type_info_ const & a, type_info_ const & b ) + { + return 0!=(a.type_->before(*b.type_)); + } + }; + } + } + +#define BOOST_EXCEPTION_STATIC_TYPEID(T) ::boost::exception_detail::type_info_(BOOST_CORE_TYPEID(T)) + +#ifndef BOOST_NO_RTTI +#define BOOST_EXCEPTION_DYNAMIC_TYPEID(x) ::boost::exception_detail::type_info_(typeid(x)) +#endif + +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(pop) +#endif +#endif diff --git a/ThirdParty/boost-Subset/boost/exception/exception.hpp b/ThirdParty/boost-Subset/boost/exception/exception.hpp new file mode 100644 index 0000000000..d762cf827e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/exception/exception.hpp @@ -0,0 +1,489 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_274DA366004E11DCB1DDFE2E56D89593 +#define UUID_274DA366004E11DCB1DDFE2E56D89593 +#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma GCC system_header +#endif +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(push,1) +#endif + +namespace +boost + { + namespace + exception_detail + { + template + class + refcount_ptr + { + public: + + refcount_ptr(): + px_(0) + { + } + + ~refcount_ptr() + { + release(); + } + + refcount_ptr( refcount_ptr const & x ): + px_(x.px_) + { + add_ref(); + } + + refcount_ptr & + operator=( refcount_ptr const & x ) + { + adopt(x.px_); + return *this; + } + + void + adopt( T * px ) + { + release(); + px_=px; + add_ref(); + } + + T * + get() const + { + return px_; + } + + private: + + T * px_; + + void + add_ref() + { + if( px_ ) + px_->add_ref(); + } + + void + release() + { + if( px_ && px_->release() ) + px_=0; + } + }; + } + + //////////////////////////////////////////////////////////////////////// + + template + class error_info; + + typedef error_info throw_function; + typedef error_info throw_file; + typedef error_info throw_line; + + template <> + class + error_info + { + public: + typedef char const * value_type; + value_type v_; + explicit + error_info( value_type v ): + v_(v) + { + } + }; + + template <> + class + error_info + { + public: + typedef char const * value_type; + value_type v_; + explicit + error_info( value_type v ): + v_(v) + { + } + }; + + template <> + class + error_info + { + public: + typedef int value_type; + value_type v_; + explicit + error_info( value_type v ): + v_(v) + { + } + }; + +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility push (default) +# endif +#endif + class exception; +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility pop +# endif +#endif + + template + class shared_ptr; + + namespace + exception_detail + { + class error_info_base; + struct type_info_; + + struct + error_info_container + { + virtual char const * diagnostic_information( char const * ) const = 0; + virtual shared_ptr get( type_info_ const & ) const = 0; + virtual void set( shared_ptr const &, type_info_ const & ) = 0; + virtual void add_ref() const = 0; + virtual bool release() const = 0; + virtual refcount_ptr clone() const = 0; + + protected: + + ~error_info_container() throw() + { + } + }; + + template + struct get_info; + + template <> + struct get_info; + + template <> + struct get_info; + + template <> + struct get_info; + + char const * get_diagnostic_information( exception const &, char const * ); + + void copy_boost_exception( exception *, exception const * ); + + template + E const & set_info( E const &, error_info const & ); + + template + E const & set_info( E const &, throw_function const & ); + + template + E const & set_info( E const &, throw_file const & ); + + template + E const & set_info( E const &, throw_line const & ); + } + +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility push (default) +# endif +#endif + class + exception + { + // + public: + template void set( typename Tag::type const & ); + template typename Tag::type const * get() const; + // + + protected: + + exception(): + throw_function_(0), + throw_file_(0), + throw_line_(-1) + { + } + +#ifdef __HP_aCC + //On HP aCC, this protected copy constructor prevents throwing boost::exception. + //On all other platforms, the same effect is achieved by the pure virtual destructor. + exception( exception const & x ) throw(): + data_(x.data_), + throw_function_(x.throw_function_), + throw_file_(x.throw_file_), + throw_line_(x.throw_line_) + { + } +#endif + + virtual ~exception() throw() +#ifndef __HP_aCC + = 0 //Workaround for HP aCC, =0 incorrectly leads to link errors. +#endif + ; + +#if (defined(__MWERKS__) && __MWERKS__<=0x3207) || (defined(_MSC_VER) && _MSC_VER<=1310) + public: +#else + private: + + template + friend E const & exception_detail::set_info( E const &, throw_function const & ); + + template + friend E const & exception_detail::set_info( E const &, throw_file const & ); + + template + friend E const & exception_detail::set_info( E const &, throw_line const & ); + + template + friend E const & exception_detail::set_info( E const &, error_info const & ); + + friend char const * exception_detail::get_diagnostic_information( exception const &, char const * ); + + template + friend struct exception_detail::get_info; + friend struct exception_detail::get_info; + friend struct exception_detail::get_info; + friend struct exception_detail::get_info; + friend void exception_detail::copy_boost_exception( exception *, exception const * ); +#endif + mutable exception_detail::refcount_ptr data_; + mutable char const * throw_function_; + mutable char const * throw_file_; + mutable int throw_line_; + }; +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility pop +# endif +#endif + + inline + exception:: + ~exception() throw() + { + } + + namespace + exception_detail + { + template + E const & + set_info( E const & x, throw_function const & y ) + { + x.throw_function_=y.v_; + return x; + } + + template + E const & + set_info( E const & x, throw_file const & y ) + { + x.throw_file_=y.v_; + return x; + } + + template + E const & + set_info( E const & x, throw_line const & y ) + { + x.throw_line_=y.v_; + return x; + } + } + + //////////////////////////////////////////////////////////////////////// + + namespace + exception_detail + { +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility push (default) +# endif +#endif + template + struct + error_info_injector: + public T, + public exception + { + explicit + error_info_injector( T const & x ): + T(x) + { + } + + ~error_info_injector() throw() + { + } + }; +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility pop +# endif +#endif + + struct large_size { char c[256]; }; + large_size dispatch_boost_exception( exception const * ); + + struct small_size { }; + small_size dispatch_boost_exception( void const * ); + + template + struct enable_error_info_helper; + + template + struct + enable_error_info_helper + { + typedef T type; + }; + + template + struct + enable_error_info_helper + { + typedef error_info_injector type; + }; + + template + struct + enable_error_info_return_type + { + typedef typename enable_error_info_helper(0)))>::type type; + }; + } + + template + inline + typename + exception_detail::enable_error_info_return_type::type + enable_error_info( T const & x ) + { + typedef typename exception_detail::enable_error_info_return_type::type rt; + return rt(x); + } + + //////////////////////////////////////////////////////////////////////// + + namespace + exception_detail + { +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility push (default) +# endif +#endif + class + clone_base + { + public: + + virtual clone_base const * clone() const = 0; + virtual void rethrow() const = 0; + + virtual + ~clone_base() throw() + { + } + }; +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility pop +# endif +#endif + + inline + void + copy_boost_exception( exception * a, exception const * b ) + { + refcount_ptr data; + if( error_info_container * d=b->data_.get() ) + data = d->clone(); + a->throw_file_ = b->throw_file_; + a->throw_line_ = b->throw_line_; + a->throw_function_ = b->throw_function_; + a->data_ = data; + } + + inline + void + copy_boost_exception( void *, void const * ) + { + } + + template + class + clone_impl: + public T, + public virtual clone_base + { + struct clone_tag { }; + clone_impl( clone_impl const & x, clone_tag ): + T(x) + { + copy_boost_exception(this,&x); + } + + public: + + explicit + clone_impl( T const & x ): + T(x) + { + copy_boost_exception(this,&x); + } + + ~clone_impl() throw() + { + } + + private: + + clone_base const * + clone() const + { + return new clone_impl(*this,clone_tag()); + } + + void + rethrow() const + { + throw*this; + } + }; + } + + template + inline + exception_detail::clone_impl + enable_current_exception( T const & x ) + { + return exception_detail::clone_impl(x); + } + } + +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(pop) +#endif +#endif diff --git a/ThirdParty/boost-Subset/boost/exception/get_error_info.hpp b/ThirdParty/boost-Subset/boost/exception/get_error_info.hpp new file mode 100644 index 0000000000..96be7632cb --- /dev/null +++ b/ThirdParty/boost-Subset/boost/exception/get_error_info.hpp @@ -0,0 +1,130 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_1A590226753311DD9E4CCF6156D89593 +#define UUID_1A590226753311DD9E4CCF6156D89593 +#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma GCC system_header +#endif +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(push,1) +#endif + +#include +#include +#include +#include + +namespace +boost + { + namespace + exception_detail + { + template + struct + get_info + { + static + typename ErrorInfo::value_type * + get( exception const & x ) + { + if( exception_detail::error_info_container * c=x.data_.get() ) + if( shared_ptr eib = c->get(BOOST_EXCEPTION_STATIC_TYPEID(ErrorInfo)) ) + { +#ifndef BOOST_NO_RTTI + BOOST_ASSERT( 0!=dynamic_cast(eib.get()) ); +#endif + ErrorInfo * w = static_cast(eib.get()); + return &w->value(); + } + return 0; + } + }; + + template <> + struct + get_info + { + static + char const * * + get( exception const & x ) + { + return x.throw_function_ ? &x.throw_function_ : 0; + } + }; + + template <> + struct + get_info + { + static + char const * * + get( exception const & x ) + { + return x.throw_file_ ? &x.throw_file_ : 0; + } + }; + + template <> + struct + get_info + { + static + int * + get( exception const & x ) + { + return x.throw_line_!=-1 ? &x.throw_line_ : 0; + } + }; + + template + struct + get_error_info_return_type + { + typedef R * type; + }; + + template + struct + get_error_info_return_type + { + typedef R const * type; + }; + } + +#ifdef BOOST_NO_RTTI + template + inline + typename ErrorInfo::value_type const * + get_error_info( boost::exception const & x ) + { + return exception_detail::get_info::get(x); + } + template + inline + typename ErrorInfo::value_type * + get_error_info( boost::exception & x ) + { + return exception_detail::get_info::get(x); + } +#else + template + inline + typename exception_detail::get_error_info_return_type::type + get_error_info( E & some_exception ) + { + if( exception const * x = dynamic_cast(&some_exception) ) + return exception_detail::get_info::get(*x); + else + return 0; + } +#endif + } + +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(pop) +#endif +#endif diff --git a/ThirdParty/boost-Subset/boost/filesystem.hpp b/ThirdParty/boost-Subset/boost/filesystem.hpp new file mode 100644 index 0000000000..1a753026c8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/filesystem.hpp @@ -0,0 +1,20 @@ +// boost/filesystem.hpp --------------------------------------------------------------// + +// Copyright Beman Dawes 2010 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +//--------------------------------------------------------------------------------------// + +#ifndef BOOST_FILESYSTEM_FILESYSTEM_HPP +#define BOOST_FILESYSTEM_FILESYSTEM_HPP + +# include +# include +# include +# include + +#endif // BOOST_FILESYSTEM_FILESYSTEM_HPP diff --git a/ThirdParty/boost-Subset/boost/filesystem/config.hpp b/ThirdParty/boost-Subset/boost/filesystem/config.hpp new file mode 100644 index 0000000000..ca695f4114 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/filesystem/config.hpp @@ -0,0 +1,109 @@ +// boost/filesystem/v3/config.hpp ----------------------------------------------------// + +// Copyright Beman Dawes 2003 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +//--------------------------------------------------------------------------------------// + +#ifndef BOOST_FILESYSTEM3_CONFIG_HPP +#define BOOST_FILESYSTEM3_CONFIG_HPP + +# if defined(BOOST_FILESYSTEM_VERSION) && BOOST_FILESYSTEM_VERSION != 3 +# error Compiling Filesystem version 3 file with BOOST_FILESYSTEM_VERSION defined != 3 +# endif + +# if !defined(BOOST_FILESYSTEM_VERSION) +# define BOOST_FILESYSTEM_VERSION 3 +# endif + +#define BOOST_FILESYSTEM_I18N // aid users wishing to compile several versions + +// This header implements separate compilation features as described in +// http://www.boost.org/more/separate_compilation.html + +#include +#include // for BOOST_POSIX_API or BOOST_WINDOWS_API +#include + +// BOOST_FILESYSTEM_DEPRECATED needed for source compiles -----------------------------// + +# ifdef BOOST_FILESYSTEM_SOURCE +# define BOOST_FILESYSTEM_DEPRECATED +# endif + +// throw an exception ----------------------------------------------------------------// +// +// Exceptions were originally thrown via boost::throw_exception(). +// As throw_exception() became more complex, it caused user error reporting +// to be harder to interpret, since the exception reported became much more complex. +// The immediate fix was to throw directly, wrapped in a macro to make any later change +// easier. + +#define BOOST_FILESYSTEM_THROW(EX) throw EX + +# if defined( BOOST_NO_STD_WSTRING ) +# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support +# endif + +// This header implements separate compilation features as described in +// http://www.boost.org/more/separate_compilation.html + +// normalize macros ------------------------------------------------------------------// + +#if !defined(BOOST_FILESYSTEM_DYN_LINK) && !defined(BOOST_FILESYSTEM_STATIC_LINK) \ + && !defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_ALL_STATIC_LINK) +# define BOOST_FILESYSTEM_STATIC_LINK +#endif + +#if defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_FILESYSTEM_DYN_LINK) +# define BOOST_FILESYSTEM_DYN_LINK +#elif defined(BOOST_ALL_STATIC_LINK) && !defined(BOOST_FILESYSTEM_STATIC_LINK) +# define BOOST_FILESYSTEM_STATIC_LINK +#endif + +#if defined(BOOST_FILESYSTEM_DYN_LINK) && defined(BOOST_FILESYSTEM_STATIC_LINK) +# error Must not define both BOOST_FILESYSTEM_DYN_LINK and BOOST_FILESYSTEM_STATIC_LINK +#endif + +#if defined(BOOST_ALL_NO_LIB) && !defined(BOOST_FILESYSTEM_NO_LIB) +# define BOOST_FILESYSTEM_NO_LIB +#endif + +// enable dynamic linking ------------------------------------------------------------// + +#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_FILESYSTEM_DYN_LINK) +# if defined(BOOST_FILESYSTEM_SOURCE) +# define BOOST_FILESYSTEM_DECL BOOST_SYMBOL_EXPORT +# else +# define BOOST_FILESYSTEM_DECL BOOST_SYMBOL_IMPORT +# endif +#else +# define BOOST_FILESYSTEM_DECL +#endif + +// enable automatic library variant selection ----------------------------------------// + +#if !defined(BOOST_FILESYSTEM_SOURCE) && !defined(BOOST_ALL_NO_LIB) \ + && !defined(BOOST_FILESYSTEM_NO_LIB) +// +// Set the name of our library, this will get undef'ed by auto_link.hpp +// once it's done with it: +// +#define BOOST_LIB_NAME boost_filesystem +// +// If we're importing code from a dll, then tell auto_link.hpp about it: +// +#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_FILESYSTEM_DYN_LINK) +# define BOOST_DYN_LINK +#endif +// +// And include the header that does the work: +// +#include +#endif // auto-linking disabled + +#endif // BOOST_FILESYSTEM3_CONFIG_HPP diff --git a/ThirdParty/boost-Subset/boost/filesystem/convenience.hpp b/ThirdParty/boost-Subset/boost/filesystem/convenience.hpp new file mode 100644 index 0000000000..f0bd986909 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/filesystem/convenience.hpp @@ -0,0 +1,58 @@ +// boost/filesystem/convenience.hpp ----------------------------------------// + +// Copyright Beman Dawes, 2002-2005 +// Copyright Vladimir Prus, 2002 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/filesystem + +//----------------------------------------------------------------------------// + +#ifndef BOOST_FILESYSTEM3_CONVENIENCE_HPP +#define BOOST_FILESYSTEM3_CONVENIENCE_HPP + +#include + +# if defined( BOOST_NO_STD_WSTRING ) +# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support +# endif + +#include +#include + +#include // must be the last #include + +namespace boost +{ + namespace filesystem + { + +# ifndef BOOST_FILESYSTEM_NO_DEPRECATED + + inline std::string extension(const path & p) + { + return p.extension().string(); + } + + inline std::string basename(const path & p) + { + return p.stem().string(); + } + + inline path change_extension( const path & p, const path & new_extension ) + { + path new_p( p ); + new_p.replace_extension( new_extension ); + return new_p; + } + +# endif + + + } // namespace filesystem +} // namespace boost + +#include // pops abi_prefix.hpp pragmas +#endif // BOOST_FILESYSTEM3_CONVENIENCE_HPP diff --git a/ThirdParty/boost-Subset/boost/filesystem/detail/utf8_codecvt_facet.hpp b/ThirdParty/boost-Subset/boost/filesystem/detail/utf8_codecvt_facet.hpp new file mode 100644 index 0000000000..3b78fb1b66 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/filesystem/detail/utf8_codecvt_facet.hpp @@ -0,0 +1,24 @@ +// Copyright (c) 2001 Ronald Garcia, Indiana University (garcia@osl.iu.edu) +// Andrew Lumsdaine, Indiana University (lums@osl.iu.edu). + +// Distributed under the Boost Software License, Version 1.0. +// (See http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_FILESYSTEM_UTF8_CODECVT_FACET_HPP +#define BOOST_FILESYSTEM_UTF8_CODECVT_FACET_HPP + +#include + +#define BOOST_UTF8_BEGIN_NAMESPACE \ + namespace boost { namespace filesystem { namespace detail { + +#define BOOST_UTF8_END_NAMESPACE }}} +#define BOOST_UTF8_DECL BOOST_FILESYSTEM_DECL + +#include + +#undef BOOST_UTF8_BEGIN_NAMESPACE +#undef BOOST_UTF8_END_NAMESPACE +#undef BOOST_UTF8_DECL + +#endif diff --git a/ThirdParty/boost-Subset/boost/filesystem/exception.hpp b/ThirdParty/boost-Subset/boost/filesystem/exception.hpp new file mode 100644 index 0000000000..985cd8f715 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/filesystem/exception.hpp @@ -0,0 +1,9 @@ +// boost/filesystem/exception.hpp -----------------------------------------------------// + +// Copyright Beman Dawes 2003 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// This header is no longer used. The contents have been moved to path.hpp. +// It is provided so that user code #includes do not have to be changed. diff --git a/ThirdParty/boost-Subset/boost/filesystem/fstream.hpp b/ThirdParty/boost-Subset/boost/filesystem/fstream.hpp new file mode 100644 index 0000000000..0727238876 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/filesystem/fstream.hpp @@ -0,0 +1,182 @@ +// boost/filesystem/fstream.hpp ------------------------------------------------------// + +// Copyright Beman Dawes 2002 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +//--------------------------------------------------------------------------------------// + +#ifndef BOOST_FILESYSTEM3_FSTREAM_HPP +#define BOOST_FILESYSTEM3_FSTREAM_HPP + +#include + +# if defined( BOOST_NO_STD_WSTRING ) +# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support +# endif + +#include +#include +#include + +#include // must be the last #include + +// on Windows, except for standard libaries known to have wchar_t overloads for +// file stream I/O, use path::string() to get a narrow character c_str() +#if defined(BOOST_WINDOWS_API) \ + && (!defined(_CPPLIB_VER) || _CPPLIB_VER < 405 || defined(_STLPORT_VERSION)) + // !Dinkumware || early Dinkumware || STLPort masquerading as Dinkumware +# define BOOST_FILESYSTEM_C_STR string().c_str() // use narrow, since wide not available +#else // use the native c_str, which will be narrow on POSIX, wide on Windows +# define BOOST_FILESYSTEM_C_STR c_str() +#endif + +namespace boost +{ +namespace filesystem +{ + +//--------------------------------------------------------------------------------------// +// basic_filebuf // +//--------------------------------------------------------------------------------------// + + template < class charT, class traits = std::char_traits > + class basic_filebuf : public std::basic_filebuf + { + private: // disallow copying + basic_filebuf(const basic_filebuf&); + const basic_filebuf& operator=(const basic_filebuf&); + + public: + basic_filebuf() {} + virtual ~basic_filebuf() {} + + basic_filebuf* + open(const path& p, std::ios_base::openmode mode) + { + return std::basic_filebuf::open(p.BOOST_FILESYSTEM_C_STR, mode) + ? this : 0; + } + }; + +//--------------------------------------------------------------------------------------// +// basic_ifstream // +//--------------------------------------------------------------------------------------// + + template < class charT, class traits = std::char_traits > + class basic_ifstream : public std::basic_ifstream + { + private: // disallow copying + basic_ifstream(const basic_ifstream&); + const basic_ifstream& operator=(const basic_ifstream&); + + public: + basic_ifstream() {} + + // use two signatures, rather than one signature with default second + // argument, to workaround VC++ 7.1 bug (ID VSWhidbey 38416) + + explicit basic_ifstream(const path& p) + : std::basic_ifstream(p.BOOST_FILESYSTEM_C_STR, std::ios_base::in) {} + + basic_ifstream(const path& p, std::ios_base::openmode mode) + : std::basic_ifstream(p.BOOST_FILESYSTEM_C_STR, mode) {} + + void open(const path& p) + { std::basic_ifstream::open(p.BOOST_FILESYSTEM_C_STR, std::ios_base::in); } + + void open(const path& p, std::ios_base::openmode mode) + { std::basic_ifstream::open(p.BOOST_FILESYSTEM_C_STR, mode); } + + virtual ~basic_ifstream() {} + }; + +//--------------------------------------------------------------------------------------// +// basic_ofstream // +//--------------------------------------------------------------------------------------// + + template < class charT, class traits = std::char_traits > + class basic_ofstream : public std::basic_ofstream + { + private: // disallow copying + basic_ofstream(const basic_ofstream&); + const basic_ofstream& operator=(const basic_ofstream&); + + public: + basic_ofstream() {} + + // use two signatures, rather than one signature with default second + // argument, to workaround VC++ 7.1 bug (ID VSWhidbey 38416) + + explicit basic_ofstream(const path& p) + : std::basic_ofstream(p.BOOST_FILESYSTEM_C_STR, std::ios_base::out) {} + + basic_ofstream(const path& p, std::ios_base::openmode mode) + : std::basic_ofstream(p.BOOST_FILESYSTEM_C_STR, mode) {} + + void open(const path& p) + { std::basic_ofstream::open(p.BOOST_FILESYSTEM_C_STR, std::ios_base::out); } + + void open(const path& p, std::ios_base::openmode mode) + { std::basic_ofstream::open(p.BOOST_FILESYSTEM_C_STR, mode); } + + virtual ~basic_ofstream() {} + }; + +//--------------------------------------------------------------------------------------// +// basic_fstream // +//--------------------------------------------------------------------------------------// + + template < class charT, class traits = std::char_traits > + class basic_fstream : public std::basic_fstream + { + private: // disallow copying + basic_fstream(const basic_fstream&); + const basic_fstream & operator=(const basic_fstream&); + + public: + basic_fstream() {} + + // use two signatures, rather than one signature with default second + // argument, to workaround VC++ 7.1 bug (ID VSWhidbey 38416) + + explicit basic_fstream(const path& p) + : std::basic_fstream(p.BOOST_FILESYSTEM_C_STR, + std::ios_base::in | std::ios_base::out) {} + + basic_fstream(const path& p, std::ios_base::openmode mode) + : std::basic_fstream(p.BOOST_FILESYSTEM_C_STR, mode) {} + + void open(const path& p) + { std::basic_fstream::open(p.BOOST_FILESYSTEM_C_STR, + std::ios_base::in | std::ios_base::out); } + + void open(const path& p, std::ios_base::openmode mode) + { std::basic_fstream::open(p.BOOST_FILESYSTEM_C_STR, mode); } + + virtual ~basic_fstream() {} + + }; + +//--------------------------------------------------------------------------------------// +// typedefs // +//--------------------------------------------------------------------------------------// + + typedef basic_filebuf filebuf; + typedef basic_ifstream ifstream; + typedef basic_ofstream ofstream; + typedef basic_fstream fstream; + + typedef basic_filebuf wfilebuf; + typedef basic_ifstream wifstream; + typedef basic_ofstream wofstream; + typedef basic_fstream wfstream; + +} // namespace filesystem +} // namespace boost + +#include // pops abi_prefix.hpp pragmas +#endif // BOOST_FILESYSTEM3_FSTREAM_HPP diff --git a/ThirdParty/boost-Subset/boost/filesystem/operations.hpp b/ThirdParty/boost-Subset/boost/filesystem/operations.hpp new file mode 100644 index 0000000000..f0e09b9db7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/filesystem/operations.hpp @@ -0,0 +1,1226 @@ +// boost/filesystem/operations.hpp ---------------------------------------------------// + +// Copyright Beman Dawes 2002-2009 +// Copyright Jan Langer 2002 +// Copyright Dietmar Kuehl 2001 +// Copyright Vladimir Prus 2002 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +//--------------------------------------------------------------------------------------// + +#ifndef BOOST_FILESYSTEM3_OPERATIONS_HPP +#define BOOST_FILESYSTEM3_OPERATIONS_HPP + +#include + +# if defined( BOOST_NO_STD_WSTRING ) +# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support +# endif + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // for pair +#include +#include +#include + +#ifdef BOOST_WINDOWS_API +# include +#endif + +#include // must be the last #include + +//--------------------------------------------------------------------------------------// + +namespace boost +{ + namespace filesystem + { + + //--------------------------------------------------------------------------------------// + // // + // class filesystem_error // + // // + //--------------------------------------------------------------------------------------// + + class BOOST_SYMBOL_VISIBLE filesystem_error : public system::system_error + { + // see http://www.boost.org/more/error_handling.html for design rationale + + // all functions are inline to avoid issues with crossing dll boundaries + + // functions previously throw() are now BOOST_NOEXCEPT_OR_NOTHROW + // functions previously without throw() are now BOOST_NOEXCEPT + + public: + // compiler generates copy constructor and copy assignment + + filesystem_error( + const std::string & what_arg, system::error_code ec) BOOST_NOEXCEPT + : system::system_error(ec, what_arg) + { + try + { + m_imp_ptr.reset(new m_imp); + } + catch (...) { m_imp_ptr.reset(); } + } + + filesystem_error( + const std::string & what_arg, const path& path1_arg, + system::error_code ec) BOOST_NOEXCEPT + : system::system_error(ec, what_arg) + { + try + { + m_imp_ptr.reset(new m_imp); + m_imp_ptr->m_path1 = path1_arg; + } + catch (...) { m_imp_ptr.reset(); } + } + + filesystem_error( + const std::string & what_arg, const path& path1_arg, + const path& path2_arg, system::error_code ec) BOOST_NOEXCEPT + : system::system_error(ec, what_arg) + { + try + { + m_imp_ptr.reset(new m_imp); + m_imp_ptr->m_path1 = path1_arg; + m_imp_ptr->m_path2 = path2_arg; + } + catch (...) { m_imp_ptr.reset(); } + } + + ~filesystem_error() BOOST_NOEXCEPT_OR_NOTHROW{} + + const path& path1() const BOOST_NOEXCEPT + { + static const path empty_path; + return m_imp_ptr.get() ? m_imp_ptr->m_path1 : empty_path; + } + const path& path2() const BOOST_NOEXCEPT + { + static const path empty_path; + return m_imp_ptr.get() ? m_imp_ptr->m_path2 : empty_path; + } + + const char* what() const BOOST_NOEXCEPT_OR_NOTHROW + { + if (!m_imp_ptr.get()) + return system::system_error::what(); + + try + { + if (m_imp_ptr->m_what.empty()) + { + m_imp_ptr->m_what = system::system_error::what(); + if (!m_imp_ptr->m_path1.empty()) + { + m_imp_ptr->m_what += ": \""; + m_imp_ptr->m_what += m_imp_ptr->m_path1.string(); + m_imp_ptr->m_what += "\""; + } + if (!m_imp_ptr->m_path2.empty()) + { + m_imp_ptr->m_what += ", \""; + m_imp_ptr->m_what += m_imp_ptr->m_path2.string(); + m_imp_ptr->m_what += "\""; + } + } + return m_imp_ptr->m_what.c_str(); + } + catch (...) + { + return system::system_error::what(); + } + } + + private: + struct m_imp + { + path m_path1; // may be empty() + path m_path2; // may be empty() + std::string m_what; // not built until needed + }; + boost::shared_ptr m_imp_ptr; + }; + +//--------------------------------------------------------------------------------------// +// file_type // +//--------------------------------------------------------------------------------------// + + enum file_type + { + status_error, +# ifndef BOOST_FILESYSTEM_NO_DEPRECATED + status_unknown = status_error, +# endif + file_not_found, + regular_file, + directory_file, + // the following may not apply to some operating systems or file systems + symlink_file, + block_file, + character_file, + fifo_file, + socket_file, + reparse_file, // Windows: FILE_ATTRIBUTE_REPARSE_POINT that is not a symlink + type_unknown, // file does exist, but isn't one of the above types or + // we don't have strong enough permission to find its type + + _detail_directory_symlink // internal use only; never exposed to users + }; + +//--------------------------------------------------------------------------------------// +// perms // +//--------------------------------------------------------------------------------------// + + enum perms + { + no_perms = 0, // file_not_found is no_perms rather than perms_not_known + + // POSIX equivalent macros given in comments. + // Values are from POSIX and are given in octal per the POSIX standard. + + // permission bits + + owner_read = 0400, // S_IRUSR, Read permission, owner + owner_write = 0200, // S_IWUSR, Write permission, owner + owner_exe = 0100, // S_IXUSR, Execute/search permission, owner + owner_all = 0700, // S_IRWXU, Read, write, execute/search by owner + + group_read = 040, // S_IRGRP, Read permission, group + group_write = 020, // S_IWGRP, Write permission, group + group_exe = 010, // S_IXGRP, Execute/search permission, group + group_all = 070, // S_IRWXG, Read, write, execute/search by group + + others_read = 04, // S_IROTH, Read permission, others + others_write = 02, // S_IWOTH, Write permission, others + others_exe = 01, // S_IXOTH, Execute/search permission, others + others_all = 07, // S_IRWXO, Read, write, execute/search by others + + all_all = 0777, // owner_all|group_all|others_all + + // other POSIX bits + + set_uid_on_exe = 04000, // S_ISUID, Set-user-ID on execution + set_gid_on_exe = 02000, // S_ISGID, Set-group-ID on execution + sticky_bit = 01000, // S_ISVTX, + // (POSIX XSI) On directories, restricted deletion flag + // (V7) 'sticky bit': save swapped text even after use + // (SunOS) On non-directories: don't cache this file + // (SVID-v4.2) On directories: restricted deletion flag + // Also see http://en.wikipedia.org/wiki/Sticky_bit + + perms_mask = 07777, // all_all|set_uid_on_exe|set_gid_on_exe|sticky_bit + + perms_not_known = 0xFFFF, // present when directory_entry cache not loaded + + // options for permissions() function + + add_perms = 0x1000, // adds the given permission bits to the current bits + remove_perms = 0x2000, // removes the given permission bits from the current bits; + // choose add_perms or remove_perms, not both; if neither add_perms + // nor remove_perms is given, replace the current bits with + // the given bits. + + symlink_perms = 0x4000 // on POSIX, don't resolve symlinks; implied on Windows + }; + + BOOST_BITMASK(perms) + +//--------------------------------------------------------------------------------------// +// file_status // +//--------------------------------------------------------------------------------------// + + class BOOST_FILESYSTEM_DECL file_status + { + public: + file_status() : m_value(status_error), m_perms(perms_not_known) {} + explicit file_status(file_type v, perms prms = perms_not_known) + : m_value(v), m_perms(prms) {} + + // observers + file_type type() const { return m_value; } + perms permissions() const { return m_perms; } + + // modifiers + void type(file_type v) { m_value = v; } + void permissions(perms prms) { m_perms = prms; } + + bool operator==(const file_status& rhs) const { return type() == rhs.type() && + permissions() == rhs.permissions(); } + bool operator!=(const file_status& rhs) const { return !(*this == rhs); } + + private: + file_type m_value; + enum perms m_perms; + }; + + inline bool type_present(file_status f) { return f.type() != status_error; } + inline bool permissions_present(file_status f) + {return f.permissions() != perms_not_known;} + inline bool status_known(file_status f) { return type_present(f) && permissions_present(f); } + inline bool exists(file_status f) { return f.type() != status_error + && f.type() != file_not_found; } + inline bool is_regular_file(file_status f){ return f.type() == regular_file; } + inline bool is_directory(file_status f) { return f.type() == directory_file; } + inline bool is_symlink(file_status f) { return f.type() == symlink_file; } + inline bool is_other(file_status f) { return exists(f) && !is_regular_file(f) + && !is_directory(f) && !is_symlink(f); } + +# ifndef BOOST_FILESYSTEM_NO_DEPRECATED + inline bool is_regular(file_status f) { return f.type() == regular_file; } +# endif + + struct space_info + { + // all values are byte counts + boost::uintmax_t capacity; + boost::uintmax_t free; // <= capacity + boost::uintmax_t available; // <= free + }; + + BOOST_SCOPED_ENUM_START(copy_option) + {none=0, fail_if_exists = none, overwrite_if_exists}; + BOOST_SCOPED_ENUM_END + +//--------------------------------------------------------------------------------------// +// implementation details // +//--------------------------------------------------------------------------------------// + + namespace detail + { + // We cannot pass a BOOST_SCOPED_ENUM to a compled function because it will result + // in an undefined reference if the library is compled with -std=c++0x but the use + // is compiled in C++03 mode, or visa versa. See tickets 6124, 6779, 10038. + enum copy_option {none=0, fail_if_exists = none, overwrite_if_exists}; + + BOOST_FILESYSTEM_DECL + file_status status(const path&p, system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + file_status symlink_status(const path& p, system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + bool is_empty(const path& p, system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + path initial_path(system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + path canonical(const path& p, const path& base, system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + void copy(const path& from, const path& to, system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + void copy_directory(const path& from, const path& to, system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + void copy_file(const path& from, const path& to, // See ticket #2925 + detail::copy_option option, system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + void copy_symlink(const path& existing_symlink, const path& new_symlink, system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + bool create_directories(const path& p, system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + bool create_directory(const path& p, system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + void create_directory_symlink(const path& to, const path& from, + system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + void create_hard_link(const path& to, const path& from, system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + void create_symlink(const path& to, const path& from, system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + path current_path(system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + void current_path(const path& p, system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + bool equivalent(const path& p1, const path& p2, system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + boost::uintmax_t file_size(const path& p, system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + boost::uintmax_t hard_link_count(const path& p, system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + std::time_t last_write_time(const path& p, system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + void last_write_time(const path& p, const std::time_t new_time, + system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + void permissions(const path& p, perms prms, system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + path read_symlink(const path& p, system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + // For standardization, if the committee doesn't like "remove", consider "eliminate" + bool remove(const path& p, system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + boost::uintmax_t remove_all(const path& p, system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + void rename(const path& old_p, const path& new_p, system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + void resize_file(const path& p, uintmax_t size, system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + space_info space(const path& p, system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + path system_complete(const path& p, system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + path temp_directory_path(system::error_code* ec=0); + BOOST_FILESYSTEM_DECL + path unique_path(const path& p, system::error_code* ec=0); + } // namespace detail + +//--------------------------------------------------------------------------------------// +// // +// status query functions // +// // +//--------------------------------------------------------------------------------------// + + inline + file_status status(const path& p) {return detail::status(p);} + inline + file_status status(const path& p, system::error_code& ec) + {return detail::status(p, &ec);} + inline + file_status symlink_status(const path& p) {return detail::symlink_status(p);} + inline + file_status symlink_status(const path& p, system::error_code& ec) + {return detail::symlink_status(p, &ec);} + inline + bool exists(const path& p) {return exists(detail::status(p));} + inline + bool exists(const path& p, system::error_code& ec) + {return exists(detail::status(p, &ec));} + inline + bool is_directory(const path& p) {return is_directory(detail::status(p));} + inline + bool is_directory(const path& p, system::error_code& ec) + {return is_directory(detail::status(p, &ec));} + inline + bool is_regular_file(const path& p) {return is_regular_file(detail::status(p));} + inline + bool is_regular_file(const path& p, system::error_code& ec) + {return is_regular_file(detail::status(p, &ec));} + inline + bool is_other(const path& p) {return is_other(detail::status(p));} + inline + bool is_other(const path& p, system::error_code& ec) + {return is_other(detail::status(p, &ec));} + inline + bool is_symlink(const path& p) {return is_symlink(detail::symlink_status(p));} + inline + bool is_symlink(const path& p, system::error_code& ec) + {return is_symlink(detail::symlink_status(p, &ec));} +# ifndef BOOST_FILESYSTEM_NO_DEPRECATED + inline + bool is_regular(const path& p) {return is_regular(detail::status(p));} + inline + bool is_regular(const path& p, system::error_code& ec) + {return is_regular(detail::status(p, &ec));} +# endif + + inline + bool is_empty(const path& p) {return detail::is_empty(p);} + inline + bool is_empty(const path& p, system::error_code& ec) + {return detail::is_empty(p, &ec);} + +//--------------------------------------------------------------------------------------// +// // +// operational functions // +// in alphabetical order, unless otherwise noted // +// // +//--------------------------------------------------------------------------------------// + + // forward declarations + path current_path(); // fwd declaration + path initial_path(); + + BOOST_FILESYSTEM_DECL + path absolute(const path& p, const path& base=current_path()); + // If base.is_absolute(), throws nothing. Thus no need for ec argument + + inline + path canonical(const path& p, const path& base=current_path()) + {return detail::canonical(p, base);} + inline + path canonical(const path& p, system::error_code& ec) + {return detail::canonical(p, current_path(), &ec);} + inline + path canonical(const path& p, const path& base, system::error_code& ec) + {return detail::canonical(p, base, &ec);} + +# ifndef BOOST_FILESYSTEM_NO_DEPRECATED + inline + path complete(const path& p) + { + return absolute(p, initial_path()); + } + + inline + path complete(const path& p, const path& base) + { + return absolute(p, base); + } +# endif + + inline + void copy(const path& from, const path& to) {detail::copy(from, to);} + + inline + void copy(const path& from, const path& to, system::error_code& ec) + {detail::copy(from, to, &ec);} + inline + void copy_directory(const path& from, const path& to) + {detail::copy_directory(from, to);} + inline + void copy_directory(const path& from, const path& to, system::error_code& ec) + {detail::copy_directory(from, to, &ec);} + inline + void copy_file(const path& from, const path& to, // See ticket #2925 + BOOST_SCOPED_ENUM(copy_option) option) + { + detail::copy_file(from, to, static_cast(option)); + } + inline + void copy_file(const path& from, const path& to) + { + detail::copy_file(from, to, detail::fail_if_exists); + } + inline + void copy_file(const path& from, const path& to, // See ticket #2925 + BOOST_SCOPED_ENUM(copy_option) option, system::error_code& ec) + { + detail::copy_file(from, to, static_cast(option), &ec); + } + inline + void copy_file(const path& from, const path& to, system::error_code& ec) + { + detail::copy_file(from, to, detail::fail_if_exists, &ec); + } + inline + void copy_symlink(const path& existing_symlink, + const path& new_symlink) {detail::copy_symlink(existing_symlink, new_symlink);} + + inline + void copy_symlink(const path& existing_symlink, const path& new_symlink, system::error_code& ec) + {detail::copy_symlink(existing_symlink, new_symlink, &ec);} + inline + bool create_directories(const path& p) {return detail::create_directories(p);} + + inline + bool create_directories(const path& p, system::error_code& ec) + {return detail::create_directories(p, &ec);} + inline + bool create_directory(const path& p) {return detail::create_directory(p);} + + inline + bool create_directory(const path& p, system::error_code& ec) + {return detail::create_directory(p, &ec);} + inline + void create_directory_symlink(const path& to, const path& from) + {detail::create_directory_symlink(to, from);} + inline + void create_directory_symlink(const path& to, const path& from, system::error_code& ec) + {detail::create_directory_symlink(to, from, &ec);} + inline + void create_hard_link(const path& to, const path& new_hard_link) {detail::create_hard_link(to, new_hard_link);} + + inline + void create_hard_link(const path& to, const path& new_hard_link, system::error_code& ec) + {detail::create_hard_link(to, new_hard_link, &ec);} + inline + void create_symlink(const path& to, const path& new_symlink) {detail::create_symlink(to, new_symlink);} + + inline + void create_symlink(const path& to, const path& new_symlink, system::error_code& ec) + {detail::create_symlink(to, new_symlink, &ec);} + inline + path current_path() {return detail::current_path();} + + inline + path current_path(system::error_code& ec) {return detail::current_path(&ec);} + + inline + void current_path(const path& p) {detail::current_path(p);} + + inline + void current_path(const path& p, system::error_code& ec) {detail::current_path(p, &ec);} + + inline + bool equivalent(const path& p1, const path& p2) {return detail::equivalent(p1, p2);} + + inline + bool equivalent(const path& p1, const path& p2, system::error_code& ec) + {return detail::equivalent(p1, p2, &ec);} + inline + boost::uintmax_t file_size(const path& p) {return detail::file_size(p);} + + inline + boost::uintmax_t file_size(const path& p, system::error_code& ec) + {return detail::file_size(p, &ec);} + inline + boost::uintmax_t hard_link_count(const path& p) {return detail::hard_link_count(p);} + + inline + boost::uintmax_t hard_link_count(const path& p, system::error_code& ec) + {return detail::hard_link_count(p, &ec);} + inline + path initial_path() {return detail::initial_path();} + + inline + path initial_path(system::error_code& ec) {return detail::initial_path(&ec);} + + template + path initial_path() {return initial_path();} + template + path initial_path(system::error_code& ec) {return detail::initial_path(&ec);} + + inline + std::time_t last_write_time(const path& p) {return detail::last_write_time(p);} + + inline + std::time_t last_write_time(const path& p, system::error_code& ec) + {return detail::last_write_time(p, &ec);} + inline + void last_write_time(const path& p, const std::time_t new_time) + {detail::last_write_time(p, new_time);} + inline + void last_write_time(const path& p, const std::time_t new_time, system::error_code& ec) + {detail::last_write_time(p, new_time, &ec);} + inline + void permissions(const path& p, perms prms) + {detail::permissions(p, prms);} + inline + void permissions(const path& p, perms prms, system::error_code& ec) + {detail::permissions(p, prms, &ec);} + + inline + path read_symlink(const path& p) {return detail::read_symlink(p);} + + inline + path read_symlink(const path& p, system::error_code& ec) + {return detail::read_symlink(p, &ec);} + inline + // For standardization, if the committee doesn't like "remove", consider "eliminate" + bool remove(const path& p) {return detail::remove(p);} + + inline + bool remove(const path& p, system::error_code& ec) {return detail::remove(p, &ec);} + + inline + boost::uintmax_t remove_all(const path& p) {return detail::remove_all(p);} + + inline + boost::uintmax_t remove_all(const path& p, system::error_code& ec) + {return detail::remove_all(p, &ec);} + inline + void rename(const path& old_p, const path& new_p) {detail::rename(old_p, new_p);} + + inline + void rename(const path& old_p, const path& new_p, system::error_code& ec) + {detail::rename(old_p, new_p, &ec);} + inline // name suggested by Scott McMurray + void resize_file(const path& p, uintmax_t size) {detail::resize_file(p, size);} + + inline + void resize_file(const path& p, uintmax_t size, system::error_code& ec) + {detail::resize_file(p, size, &ec);} + inline + space_info space(const path& p) {return detail::space(p);} + + inline + space_info space(const path& p, system::error_code& ec) {return detail::space(p, &ec);} + +# ifndef BOOST_FILESYSTEM_NO_DEPRECATED + inline bool symbolic_link_exists(const path& p) + { return is_symlink(symlink_status(p)); } +# endif + + inline + path system_complete(const path& p) {return detail::system_complete(p);} + + inline + path system_complete(const path& p, system::error_code& ec) + {return detail::system_complete(p, &ec);} + inline + path temp_directory_path() {return detail::temp_directory_path();} + + inline + path temp_directory_path(system::error_code& ec) + {return detail::temp_directory_path(&ec);} + inline + path unique_path(const path& p="%%%%-%%%%-%%%%-%%%%") + { return detail::unique_path(p); } + inline + path unique_path(const path& p, system::error_code& ec) + { return detail::unique_path(p, &ec); } + +//--------------------------------------------------------------------------------------// +// // +// directory_entry // +// // +//--------------------------------------------------------------------------------------// + +// GCC has a problem with a member function named path within a namespace or +// sub-namespace that also has a class named path. The workaround is to always +// fully qualify the name path when it refers to the class name. + +class BOOST_FILESYSTEM_DECL directory_entry +{ +public: + + // compiler generated copy constructor, copy assignment, and destructor apply + + directory_entry() {} + explicit directory_entry(const boost::filesystem::path& p, + file_status st = file_status(), file_status symlink_st=file_status()) + : m_path(p), m_status(st), m_symlink_status(symlink_st) + {} + + void assign(const boost::filesystem::path& p, + file_status st = file_status(), file_status symlink_st = file_status()) + { m_path = p; m_status = st; m_symlink_status = symlink_st; } + + void replace_filename(const boost::filesystem::path& p, + file_status st = file_status(), file_status symlink_st = file_status()) + { + m_path.remove_filename(); + m_path /= p; + m_status = st; + m_symlink_status = symlink_st; + } + +# ifndef BOOST_FILESYSTEM_NO_DEPRECATED + void replace_leaf(const boost::filesystem::path& p, + file_status st, file_status symlink_st) + { replace_filename(p, st, symlink_st); } +# endif + + const boost::filesystem::path& path() const {return m_path;} + file_status status() const {return m_get_status();} + file_status status(system::error_code& ec) const {return m_get_status(&ec);} + file_status symlink_status() const {return m_get_symlink_status();} + file_status symlink_status(system::error_code& ec) const {return m_get_symlink_status(&ec);} + + bool operator==(const directory_entry& rhs) {return m_path == rhs.m_path;} + bool operator!=(const directory_entry& rhs) {return m_path != rhs.m_path;} + bool operator< (const directory_entry& rhs) {return m_path < rhs.m_path;} + bool operator<=(const directory_entry& rhs) {return m_path <= rhs.m_path;} + bool operator> (const directory_entry& rhs) {return m_path > rhs.m_path;} + bool operator>=(const directory_entry& rhs) {return m_path >= rhs.m_path;} + +private: + boost::filesystem::path m_path; + mutable file_status m_status; // stat()-like + mutable file_status m_symlink_status; // lstat()-like + + file_status m_get_status(system::error_code* ec=0) const; + file_status m_get_symlink_status(system::error_code* ec=0) const; +}; // directory_entry + +//--------------------------------------------------------------------------------------// +// // +// directory_iterator helpers // +// // +//--------------------------------------------------------------------------------------// + +class directory_iterator; + +namespace detail +{ + BOOST_FILESYSTEM_DECL + system::error_code dir_itr_close(// never throws() + void *& handle +# if defined(BOOST_POSIX_API) + , void *& buffer +# endif + ); + + struct dir_itr_imp + { + directory_entry dir_entry; + void* handle; + +# ifdef BOOST_POSIX_API + void* buffer; // see dir_itr_increment implementation +# endif + + dir_itr_imp() : handle(0) +# ifdef BOOST_POSIX_API + , buffer(0) +# endif + {} + + ~dir_itr_imp() // never throws + { + dir_itr_close(handle +# if defined(BOOST_POSIX_API) + , buffer +# endif + ); + } + }; + + // see path::iterator: comment below + BOOST_FILESYSTEM_DECL void directory_iterator_construct(directory_iterator& it, + const path& p, system::error_code* ec); + BOOST_FILESYSTEM_DECL void directory_iterator_increment(directory_iterator& it, + system::error_code* ec); + +} // namespace detail + +//--------------------------------------------------------------------------------------// +// // +// directory_iterator // +// // +//--------------------------------------------------------------------------------------// + + class directory_iterator + : public boost::iterator_facade< directory_iterator, + directory_entry, + boost::single_pass_traversal_tag > + { + public: + + directory_iterator(){} // creates the "end" iterator + + // iterator_facade derived classes don't seem to like implementations in + // separate translation unit dll's, so forward to detail functions + explicit directory_iterator(const path& p) + : m_imp(new detail::dir_itr_imp) + { detail::directory_iterator_construct(*this, p, 0); } + + directory_iterator(const path& p, system::error_code& ec) + : m_imp(new detail::dir_itr_imp) + { detail::directory_iterator_construct(*this, p, &ec); } + + ~directory_iterator() {} // never throws + + directory_iterator& increment(system::error_code& ec) + { + detail::directory_iterator_increment(*this, &ec); + return *this; + } + + private: + friend struct detail::dir_itr_imp; + friend BOOST_FILESYSTEM_DECL void detail::directory_iterator_construct(directory_iterator& it, + const path& p, system::error_code* ec); + friend BOOST_FILESYSTEM_DECL void detail::directory_iterator_increment(directory_iterator& it, + system::error_code* ec); + + // shared_ptr provides shallow-copy semantics required for InputIterators. + // m_imp.get()==0 indicates the end iterator. + boost::shared_ptr< detail::dir_itr_imp > m_imp; + + friend class boost::iterator_core_access; + + boost::iterator_facade< + directory_iterator, + directory_entry, + boost::single_pass_traversal_tag >::reference dereference() const + { + BOOST_ASSERT_MSG(m_imp.get(), "attempt to dereference end iterator"); + return m_imp->dir_entry; + } + + void increment() { detail::directory_iterator_increment(*this, 0); } + + bool equal(const directory_iterator& rhs) const + { return m_imp == rhs.m_imp; } + + }; // directory_iterator + + // enable directory_iterator C++11 range-base for statement use --------------------// + + // begin() and end() are only used by a range-based for statement in the context of + // auto - thus the top-level const is stripped - so returning const is harmless and + // emphasizes begin() is just a pass through. + inline + const directory_iterator& begin(const directory_iterator& iter) {return iter;} + inline + directory_iterator end(const directory_iterator&) {return directory_iterator();} + + // enable directory_iterator BOOST_FOREACH -----------------------------------------// + + inline + directory_iterator& range_begin(directory_iterator& iter) {return iter;} + inline + directory_iterator range_begin(const directory_iterator& iter) {return iter;} + inline + directory_iterator range_end(const directory_iterator&) {return directory_iterator();} + } // namespace filesystem + + // namespace boost template specializations + template<> + struct range_mutable_iterator + { typedef boost::filesystem::directory_iterator type; }; + template<> + struct range_const_iterator + { typedef boost::filesystem::directory_iterator type; }; + +namespace filesystem +{ + +//--------------------------------------------------------------------------------------// +// // +// recursive_directory_iterator helpers // +// // +//--------------------------------------------------------------------------------------// + + BOOST_SCOPED_ENUM_START(symlink_option) + { + none, + no_recurse = none, // don't follow directory symlinks (default behavior) + recurse, // follow directory symlinks + _detail_no_push = recurse << 1 // internal use only + }; + BOOST_SCOPED_ENUM_END + + BOOST_BITMASK(BOOST_SCOPED_ENUM(symlink_option)) + + namespace detail + { + struct recur_dir_itr_imp + { + typedef directory_iterator element_type; + std::stack< element_type, std::vector< element_type > > m_stack; + int m_level; + BOOST_SCOPED_ENUM(symlink_option) m_options; + + recur_dir_itr_imp() : m_level(0), m_options(symlink_option::none) {} + + void increment(system::error_code* ec); // ec == 0 means throw on error + + bool push_directory(system::error_code& ec) BOOST_NOEXCEPT; + + void pop(); + + }; + + // Implementation is inline to avoid dynamic linking difficulties with m_stack: + // Microsoft warning C4251, m_stack needs to have dll-interface to be used by + // clients of struct 'boost::filesystem::detail::recur_dir_itr_imp' + + inline + bool recur_dir_itr_imp::push_directory(system::error_code& ec) BOOST_NOEXCEPT + // Returns: true if push occurs, otherwise false. Always returns false on error. + { + ec.clear(); + + // Discover if the iterator is for a directory that needs to be recursed into, + // taking symlinks and options into account. + + if ((m_options & symlink_option::_detail_no_push) == symlink_option::_detail_no_push) + m_options &= ~symlink_option::_detail_no_push; + + else + { + // Logic for following predicate was contributed by Daniel Aarno to handle cyclic + // symlinks correctly and efficiently, fixing ticket #5652. + // if (((m_options & symlink_option::recurse) == symlink_option::recurse + // || !is_symlink(m_stack.top()->symlink_status())) + // && is_directory(m_stack.top()->status())) ... + // The predicate code has since been rewritten to pass error_code arguments, + // per ticket #5653. + + file_status symlink_stat; + + if ((m_options & symlink_option::recurse) != symlink_option::recurse) + { + symlink_stat = m_stack.top()->symlink_status(ec); + if (ec) + return false; + } + + if ((m_options & symlink_option::recurse) == symlink_option::recurse + || !is_symlink(symlink_stat)) + { + file_status stat = m_stack.top()->status(ec); + if (ec || !is_directory(stat)) + return false; + + directory_iterator next(m_stack.top()->path(), ec); + if (!ec && next != directory_iterator()) + { + m_stack.push(next); + ++m_level; + return true; + } + } + } + return false; + } + + inline + void recur_dir_itr_imp::increment(system::error_code* ec) + // ec == 0 means throw on error + // + // Invariant: On return, the top of the iterator stack is the next valid (possibly + // end) iterator, regardless of whether or not an error is reported, and regardless of + // whether any error is reported by exception or error code. In other words, progress + // is always made so a loop on the iterator will always eventually terminate + // regardless of errors. + { + system::error_code ec_push_directory; + + // if various conditions are met, push a directory_iterator into the iterator stack + if (push_directory(ec_push_directory)) + { + if (ec) + ec->clear(); + return; + } + + // Do the actual increment operation on the top iterator in the iterator + // stack, popping the stack if necessary, until either the stack is empty or a + // non-end iterator is reached. + while (!m_stack.empty() && ++m_stack.top() == directory_iterator()) + { + m_stack.pop(); + --m_level; + } + + // report errors if any + if (ec_push_directory) + { + if (ec) + *ec = ec_push_directory; + else + { + BOOST_FILESYSTEM_THROW(filesystem_error( + "filesystem::recursive_directory_iterator directory error", + ec_push_directory)); + } + } + else if (ec) + ec->clear(); + } + + inline + void recur_dir_itr_imp::pop() + { + BOOST_ASSERT_MSG(m_level > 0, + "pop() on recursive_directory_iterator with level < 1"); + + do + { + m_stack.pop(); + --m_level; + } + while (!m_stack.empty() && ++m_stack.top() == directory_iterator()); + } + } // namespace detail + +//--------------------------------------------------------------------------------------// +// // +// recursive_directory_iterator // +// // +//--------------------------------------------------------------------------------------// + + class recursive_directory_iterator + : public boost::iterator_facade< + recursive_directory_iterator, + directory_entry, + boost::single_pass_traversal_tag > + { + public: + + recursive_directory_iterator(){} // creates the "end" iterator + + explicit recursive_directory_iterator(const path& dir_path, + BOOST_SCOPED_ENUM(symlink_option) opt = symlink_option::none) + : m_imp(new detail::recur_dir_itr_imp) + { + m_imp->m_options = opt; + m_imp->m_stack.push(directory_iterator(dir_path)); + if (m_imp->m_stack.top() == directory_iterator()) + { m_imp.reset (); } + } + + recursive_directory_iterator(const path& dir_path, + BOOST_SCOPED_ENUM(symlink_option) opt, + system::error_code & ec) + : m_imp(new detail::recur_dir_itr_imp) + { + m_imp->m_options = opt; + m_imp->m_stack.push(directory_iterator(dir_path, ec)); + if (m_imp->m_stack.top() == directory_iterator()) + { m_imp.reset (); } + } + + recursive_directory_iterator(const path& dir_path, + system::error_code & ec) + : m_imp(new detail::recur_dir_itr_imp) + { + m_imp->m_options = symlink_option::none; + m_imp->m_stack.push(directory_iterator(dir_path, ec)); + if (m_imp->m_stack.top() == directory_iterator()) + { m_imp.reset (); } + } + + recursive_directory_iterator& increment(system::error_code& ec) + { + BOOST_ASSERT_MSG(m_imp.get(), + "increment() on end recursive_directory_iterator"); + m_imp->increment(&ec); + if (m_imp->m_stack.empty()) + m_imp.reset(); // done, so make end iterator + return *this; + } + + int level() const + { + BOOST_ASSERT_MSG(m_imp.get(), + "level() on end recursive_directory_iterator"); + return m_imp->m_level; + } + + bool no_push_pending() const + { + BOOST_ASSERT_MSG(m_imp.get(), + "is_no_push_requested() on end recursive_directory_iterator"); + return (m_imp->m_options & symlink_option::_detail_no_push) + == symlink_option::_detail_no_push; + } + +# ifndef BOOST_FILESYSTEM_NO_DEPRECATED + bool no_push_request() const { return no_push_pending(); } +# endif + + void pop() + { + BOOST_ASSERT_MSG(m_imp.get(), + "pop() on end recursive_directory_iterator"); + m_imp->pop(); + if (m_imp->m_stack.empty()) m_imp.reset(); // done, so make end iterator + } + + void no_push(bool value=true) + { + BOOST_ASSERT_MSG(m_imp.get(), + "no_push() on end recursive_directory_iterator"); + if (value) + m_imp->m_options |= symlink_option::_detail_no_push; + else + m_imp->m_options &= ~symlink_option::_detail_no_push; + } + + file_status status() const + { + BOOST_ASSERT_MSG(m_imp.get(), + "status() on end recursive_directory_iterator"); + return m_imp->m_stack.top()->status(); + } + + file_status symlink_status() const + { + BOOST_ASSERT_MSG(m_imp.get(), + "symlink_status() on end recursive_directory_iterator"); + return m_imp->m_stack.top()->symlink_status(); + } + + private: + + // shared_ptr provides shallow-copy semantics required for InputIterators. + // m_imp.get()==0 indicates the end iterator. + boost::shared_ptr< detail::recur_dir_itr_imp > m_imp; + + friend class boost::iterator_core_access; + + boost::iterator_facade< + recursive_directory_iterator, + directory_entry, + boost::single_pass_traversal_tag >::reference + dereference() const + { + BOOST_ASSERT_MSG(m_imp.get(), + "dereference of end recursive_directory_iterator"); + return *m_imp->m_stack.top(); + } + + void increment() + { + BOOST_ASSERT_MSG(m_imp.get(), + "increment of end recursive_directory_iterator"); + m_imp->increment(0); + if (m_imp->m_stack.empty()) + m_imp.reset(); // done, so make end iterator + } + + bool equal(const recursive_directory_iterator& rhs) const + { return m_imp == rhs.m_imp; } + + }; // recursive directory iterator + + // enable recursive directory iterator C++11 range-base for statement use ----------// + + // begin() and end() are only used by a range-based for statement in the context of + // auto - thus the top-level const is stripped - so returning const is harmless and + // emphasizes begin() is just a pass through. + inline + const recursive_directory_iterator& begin(const recursive_directory_iterator& iter) + {return iter;} + inline + recursive_directory_iterator end(const recursive_directory_iterator&) + {return recursive_directory_iterator();} + + // enable recursive directory iterator BOOST_FOREACH -------------------------------// + + inline + recursive_directory_iterator& range_begin(recursive_directory_iterator& iter) + {return iter;} + inline + recursive_directory_iterator range_begin(const recursive_directory_iterator& iter) + {return iter;} + inline + recursive_directory_iterator range_end(const recursive_directory_iterator&) + {return recursive_directory_iterator();} + } // namespace filesystem + + // namespace boost template specializations + template<> + struct range_mutable_iterator + { typedef boost::filesystem::recursive_directory_iterator type; }; + template<> + struct range_const_iterator + { typedef boost::filesystem::recursive_directory_iterator type; }; + +namespace filesystem +{ + +# if !defined(BOOST_FILESYSTEM_NO_DEPRECATED) + typedef recursive_directory_iterator wrecursive_directory_iterator; +# endif + +// test helper -----------------------------------------------------------------------// + +// Not part of the documented interface since false positives are possible; +// there is no law that says that an OS that has large stat.st_size +// actually supports large file sizes. + + namespace detail + { + BOOST_FILESYSTEM_DECL bool possible_large_file_size_support(); + } + + } // namespace filesystem +} // namespace boost + +#include // pops abi_prefix.hpp pragmas +#endif // BOOST_FILESYSTEM3_OPERATIONS_HPP diff --git a/ThirdParty/boost-Subset/boost/filesystem/path.hpp b/ThirdParty/boost-Subset/boost/filesystem/path.hpp new file mode 100644 index 0000000000..7ae4d2fd0d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/filesystem/path.hpp @@ -0,0 +1,871 @@ +// filesystem path.hpp ---------------------------------------------------------------// + +// Copyright Beman Dawes 2002-2005, 2009 +// Copyright Vladimir Prus 2002 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +// path::stem(), extension(), and replace_extension() are based on +// basename(), extension(), and change_extension() from the original +// filesystem/convenience.hpp header by Vladimir Prus. + +#ifndef BOOST_FILESYSTEM_PATH_HPP +#define BOOST_FILESYSTEM_PATH_HPP + +#include + +# if defined( BOOST_NO_STD_WSTRING ) +# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support +# endif + +#include +#include // includes +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include // must be the last #include + +namespace boost +{ +namespace filesystem +{ + //------------------------------------------------------------------------------------// + // // + // class path // + // // + //------------------------------------------------------------------------------------// + + class BOOST_FILESYSTEM_DECL path + { + public: + + // value_type is the character type used by the operating system API to + // represent paths. + +# ifdef BOOST_WINDOWS_API + typedef wchar_t value_type; + BOOST_STATIC_CONSTEXPR value_type preferred_separator = L'\\'; +# else + typedef char value_type; + BOOST_STATIC_CONSTEXPR value_type preferred_separator = '/'; +# endif + typedef std::basic_string string_type; + typedef std::codecvt codecvt_type; + + + // ----- character encoding conversions ----- + + // Following the principle of least astonishment, path input arguments + // passed to or obtained from the operating system via objects of + // class path behave as if they were directly passed to or + // obtained from the O/S API, unless conversion is explicitly requested. + // + // POSIX specfies that path strings are passed unchanged to and from the + // API. Note that this is different from the POSIX command line utilities, + // which convert according to a locale. + // + // Thus for POSIX, char strings do not undergo conversion. wchar_t strings + // are converted to/from char using the path locale or, if a conversion + // argument is given, using a conversion object modeled on + // std::wstring_convert. + // + // The path locale, which is global to the thread, can be changed by the + // imbue() function. It is initialized to an implementation defined locale. + // + // For Windows, wchar_t strings do not undergo conversion. char strings + // are converted using the "ANSI" or "OEM" code pages, as determined by + // the AreFileApisANSI() function, or, if a conversion argument is given, + // using a conversion object modeled on std::wstring_convert. + // + // See m_pathname comments for further important rationale. + + // TODO: rules needed for operating systems that use / or . + // differently, or format directory paths differently from file paths. + // + // ********************************************************************************** + // + // More work needed: How to handle an operating system that may have + // slash characters or dot characters in valid filenames, either because + // it doesn't follow the POSIX standard, or because it allows MBCS + // filename encodings that may contain slash or dot characters. For + // example, ISO/IEC 2022 (JIS) encoding which allows switching to + // JIS x0208-1983 encoding. A valid filename in this set of encodings is + // 0x1B 0x24 0x42 [switch to X0208-1983] 0x24 0x2F [U+304F Kiragana letter KU] + // ^^^^ + // Note that 0x2F is the ASCII slash character + // + // ********************************************************************************** + + // Supported source arguments: half-open iterator range, container, c-array, + // and single pointer to null terminated string. + + // All source arguments except pointers to null terminated byte strings support + // multi-byte character strings which may have embedded nulls. Embedded null + // support is required for some Asian languages on Windows. + + // "const codecvt_type& cvt=codecvt()" default arguments are not used because this + // limits the impact of locale("") initialization failures on POSIX systems to programs + // that actually depend on locale(""). It further ensures that exceptions thrown + // as a result of such failues occur after main() has started, so can be caught. + + // ----- constructors ----- + + path(){} + + path(const path& p) : m_pathname(p.m_pathname) {} + + template + path(Source const& source, + typename boost::enable_if::type> >::type* =0) + { + path_traits::dispatch(source, m_pathname); + } + + path(const value_type* s) : m_pathname(s) {} + path(value_type* s) : m_pathname(s) {} + path(const string_type& s) : m_pathname(s) {} + path(string_type& s) : m_pathname(s) {} + + template + path(Source const& source, const codecvt_type& cvt) + { + path_traits::dispatch(source, m_pathname, cvt); + } + + template + path(InputIterator begin, InputIterator end) + { + if (begin != end) + { + // convert requires contiguous string, so copy + std::basic_string::value_type> + seq(begin, end); + path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname); + } + } + + template + path(InputIterator begin, InputIterator end, const codecvt_type& cvt) + { + if (begin != end) + { + // convert requires contiguous string, so copy + std::basic_string::value_type> + seq(begin, end); + path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname, cvt); + } + } + + // ----- assignments ----- + + path& operator=(const path& p) + { + m_pathname = p.m_pathname; + return *this; + } + + template + typename boost::enable_if::type>, path&>::type + operator=(Source const& source) + { + m_pathname.clear(); + path_traits::dispatch(source, m_pathname); + return *this; + } + + // value_type overloads + + path& operator=(const value_type* ptr) // required in case ptr overlaps *this + {m_pathname = ptr; return *this;} + path& operator=(value_type* ptr) // required in case ptr overlaps *this + {m_pathname = ptr; return *this;} + path& operator=(const string_type& s) {m_pathname = s; return *this;} + path& operator=(string_type& s) {m_pathname = s; return *this;} + + path& assign(const value_type* ptr, const codecvt_type&) // required in case ptr overlaps *this + {m_pathname = ptr; return *this;} + template + path& assign(Source const& source, const codecvt_type& cvt) + { + m_pathname.clear(); + path_traits::dispatch(source, m_pathname, cvt); + return *this; + } + + template + path& assign(InputIterator begin, InputIterator end) + { + m_pathname.clear(); + if (begin != end) + { + std::basic_string::value_type> + seq(begin, end); + path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname); + } + return *this; + } + + template + path& assign(InputIterator begin, InputIterator end, const codecvt_type& cvt) + { + m_pathname.clear(); + if (begin != end) + { + std::basic_string::value_type> + seq(begin, end); + path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname, cvt); + } + return *this; + } + + // ----- concatenation ----- + + template + typename boost::enable_if::type>, path&>::type + operator+=(Source const& source) + { + return concat(source); + } + + // value_type overloads. Same rationale as for constructors above + path& operator+=(const path& p) { m_pathname += p.m_pathname; return *this; } + path& operator+=(const value_type* ptr) { m_pathname += ptr; return *this; } + path& operator+=(value_type* ptr) { m_pathname += ptr; return *this; } + path& operator+=(const string_type& s) { m_pathname += s; return *this; } + path& operator+=(string_type& s) { m_pathname += s; return *this; } + path& operator+=(value_type c) { m_pathname += c; return *this; } + + template + typename boost::enable_if, path&>::type + operator+=(CharT c) + { + CharT tmp[2]; + tmp[0] = c; + tmp[1] = 0; + return concat(tmp); + } + + template + path& concat(Source const& source) + { + path_traits::dispatch(source, m_pathname); + return *this; + } + + template + path& concat(Source const& source, const codecvt_type& cvt) + { + path_traits::dispatch(source, m_pathname, cvt); + return *this; + } + + template + path& concat(InputIterator begin, InputIterator end) + { + if (begin == end) + return *this; + std::basic_string::value_type> + seq(begin, end); + path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname); + return *this; + } + + template + path& concat(InputIterator begin, InputIterator end, const codecvt_type& cvt) + { + if (begin == end) + return *this; + std::basic_string::value_type> + seq(begin, end); + path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname, cvt); + return *this; + } + + // ----- appends ----- + + // if a separator is added, it is the preferred separator for the platform; + // slash for POSIX, backslash for Windows + + path& operator/=(const path& p); + + template + typename boost::enable_if::type>, path&>::type + operator/=(Source const& source) + { + return append(source); + } + + path& operator/=(const value_type* ptr); + path& operator/=(value_type* ptr) + { + return this->operator/=(const_cast(ptr)); + } + path& operator/=(const string_type& s) { return this->operator/=(path(s)); } + path& operator/=(string_type& s) { return this->operator/=(path(s)); } + + path& append(const value_type* ptr) // required in case ptr overlaps *this + { + this->operator/=(ptr); + return *this; + } + + path& append(const value_type* ptr, const codecvt_type&) // required in case ptr overlaps *this + { + this->operator/=(ptr); + return *this; + } + + template + path& append(Source const& source); + + template + path& append(Source const& source, const codecvt_type& cvt); + + template + path& append(InputIterator begin, InputIterator end); + + template + path& append(InputIterator begin, InputIterator end, const codecvt_type& cvt); + + // ----- modifiers ----- + + void clear() { m_pathname.clear(); } + path& make_preferred() +# ifdef BOOST_POSIX_API + { return *this; } // POSIX no effect +# else // BOOST_WINDOWS_API + ; // change slashes to backslashes +# endif + path& remove_filename(); + path& remove_trailing_separator(); + path& replace_extension(const path& new_extension = path()); + void swap(path& rhs) { m_pathname.swap(rhs.m_pathname); } + + // ----- observers ----- + + // For operating systems that format file paths differently than directory + // paths, return values from observers are formatted as file names unless there + // is a trailing separator, in which case returns are formatted as directory + // paths. POSIX and Windows make no such distinction. + + // Implementations are permitted to return const values or const references. + + // The string or path returned by an observer are specified as being formatted + // as "native" or "generic". + // + // For POSIX, these are all the same format; slashes and backslashes are as input and + // are not modified. + // + // For Windows, native: as input; slashes and backslashes are not modified; + // this is the format of the internally stored string. + // generic: backslashes are converted to slashes + + // ----- native format observers ----- + + const string_type& native() const { return m_pathname; } // Throws: nothing + const value_type* c_str() const { return m_pathname.c_str(); } // Throws: nothing + + template + String string() const; + + template + String string(const codecvt_type& cvt) const; + +# ifdef BOOST_WINDOWS_API + const std::string string() const + { + std::string tmp; + if (!m_pathname.empty()) + path_traits::convert(&*m_pathname.begin(), &*m_pathname.begin()+m_pathname.size(), + tmp); + return tmp; + } + const std::string string(const codecvt_type& cvt) const + { + std::string tmp; + if (!m_pathname.empty()) + path_traits::convert(&*m_pathname.begin(), &*m_pathname.begin()+m_pathname.size(), + tmp, cvt); + return tmp; + } + + // string_type is std::wstring, so there is no conversion + const std::wstring& wstring() const { return m_pathname; } + const std::wstring& wstring(const codecvt_type&) const { return m_pathname; } + +# else // BOOST_POSIX_API + // string_type is std::string, so there is no conversion + const std::string& string() const { return m_pathname; } + const std::string& string(const codecvt_type&) const { return m_pathname; } + + const std::wstring wstring() const + { + std::wstring tmp; + if (!m_pathname.empty()) + path_traits::convert(&*m_pathname.begin(), &*m_pathname.begin()+m_pathname.size(), + tmp); + return tmp; + } + const std::wstring wstring(const codecvt_type& cvt) const + { + std::wstring tmp; + if (!m_pathname.empty()) + path_traits::convert(&*m_pathname.begin(), &*m_pathname.begin()+m_pathname.size(), + tmp, cvt); + return tmp; + } + +# endif + + // ----- generic format observers ----- + + template + String generic_string() const; + + template + String generic_string(const codecvt_type& cvt) const; + +# ifdef BOOST_WINDOWS_API + const std::string generic_string() const; + const std::string generic_string(const codecvt_type& cvt) const; + const std::wstring generic_wstring() const; + const std::wstring generic_wstring(const codecvt_type&) const { return generic_wstring(); }; + +# else // BOOST_POSIX_API + // On POSIX-like systems, the generic format is the same as the native format + const std::string& generic_string() const { return m_pathname; } + const std::string& generic_string(const codecvt_type&) const { return m_pathname; } + const std::wstring generic_wstring() const { return wstring(); } + const std::wstring generic_wstring(const codecvt_type& cvt) const { return wstring(cvt); } + +# endif + + // ----- compare ----- + + int compare(const path& p) const BOOST_NOEXCEPT; // generic, lexicographical + int compare(const std::string& s) const { return compare(path(s)); } + int compare(const value_type* s) const { return compare(path(s)); } + + // ----- decomposition ----- + + path root_path() const; + path root_name() const; // returns 0 or 1 element path + // even on POSIX, root_name() is non-empty() for network paths + path root_directory() const; // returns 0 or 1 element path + path relative_path() const; + path parent_path() const; + path filename() const; // returns 0 or 1 element path + path stem() const; // returns 0 or 1 element path + path extension() const; // returns 0 or 1 element path + + // ----- query ----- + + bool empty() const { return m_pathname.empty(); } // name consistent with std containers + bool has_root_path() const { return has_root_directory() || has_root_name(); } + bool has_root_name() const { return !root_name().empty(); } + bool has_root_directory() const { return !root_directory().empty(); } + bool has_relative_path() const { return !relative_path().empty(); } + bool has_parent_path() const { return !parent_path().empty(); } + bool has_filename() const { return !m_pathname.empty(); } + bool has_stem() const { return !stem().empty(); } + bool has_extension() const { return !extension().empty(); } + bool is_absolute() const + { +# ifdef BOOST_WINDOWS_API + return has_root_name() && has_root_directory(); +# else + return has_root_directory(); +# endif + } + bool is_relative() const { return !is_absolute(); } + + // ----- iterators ----- + + class iterator; + typedef iterator const_iterator; + + iterator begin() const; + iterator end() const; + + // ----- static member functions ----- + + static std::locale imbue(const std::locale& loc); + static const codecvt_type& codecvt(); + + // ----- deprecated functions ----- + +# if defined(BOOST_FILESYSTEM_DEPRECATED) && defined(BOOST_FILESYSTEM_NO_DEPRECATED) +# error both BOOST_FILESYSTEM_DEPRECATED and BOOST_FILESYSTEM_NO_DEPRECATED are defined +# endif + +# if !defined(BOOST_FILESYSTEM_NO_DEPRECATED) + // recently deprecated functions supplied by default + path& normalize() { return m_normalize(); } + path& remove_leaf() { return remove_filename(); } + path leaf() const { return filename(); } + path branch_path() const { return parent_path(); } + bool has_leaf() const { return !m_pathname.empty(); } + bool has_branch_path() const { return !parent_path().empty(); } + bool is_complete() const { return is_absolute(); } +# endif + +# if defined(BOOST_FILESYSTEM_DEPRECATED) + // deprecated functions with enough signature or semantic changes that they are + // not supplied by default + const std::string file_string() const { return string(); } + const std::string directory_string() const { return string(); } + const std::string native_file_string() const { return string(); } + const std::string native_directory_string() const { return string(); } + const string_type external_file_string() const { return native(); } + const string_type external_directory_string() const { return native(); } + + // older functions no longer supported + //typedef bool (*name_check)(const std::string & name); + //basic_path(const string_type& str, name_check) { operator/=(str); } + //basic_path(const typename string_type::value_type* s, name_check) + // { operator/=(s);} + //static bool default_name_check_writable() { return false; } + //static void default_name_check(name_check) {} + //static name_check default_name_check() { return 0; } + //basic_path& canonize(); +# endif + +//--------------------------------------------------------------------------------------// +// class path private members // +//--------------------------------------------------------------------------------------// + + private: +# if defined(_MSC_VER) +# pragma warning(push) // Save warning settings +# pragma warning(disable : 4251) // disable warning: class 'std::basic_string<_Elem,_Traits,_Ax>' +# endif // needs to have dll-interface... +/* + m_pathname has the type, encoding, and format required by the native + operating system. Thus for POSIX and Windows there is no conversion for + passing m_pathname.c_str() to the O/S API or when obtaining a path from the + O/S API. POSIX encoding is unspecified other than for dot and slash + characters; POSIX just treats paths as a sequence of bytes. Windows + encoding is UCS-2 or UTF-16 depending on the version. +*/ + string_type m_pathname; // Windows: as input; backslashes NOT converted to slashes, + // slashes NOT converted to backslashes +# if defined(_MSC_VER) +# pragma warning(pop) // restore warning settings. +# endif + + string_type::size_type m_append_separator_if_needed(); + // Returns: If separator is to be appended, m_pathname.size() before append. Otherwise 0. + // Note: An append is never performed if size()==0, so a returned 0 is unambiguous. + + void m_erase_redundant_separator(string_type::size_type sep_pos); + string_type::size_type m_parent_path_end() const; + + path& m_normalize(); + + // Was qualified; como433beta8 reports: + // warning #427-D: qualified name is not allowed in member declaration + friend class iterator; + friend bool operator<(const path& lhs, const path& rhs); + + // see path::iterator::increment/decrement comment below + static void m_path_iterator_increment(path::iterator & it); + static void m_path_iterator_decrement(path::iterator & it); + + }; // class path + + namespace detail + { + BOOST_FILESYSTEM_DECL + int lex_compare(path::iterator first1, path::iterator last1, + path::iterator first2, path::iterator last2); + BOOST_FILESYSTEM_DECL + const path& dot_path(); + BOOST_FILESYSTEM_DECL + const path& dot_dot_path(); + } + +# ifndef BOOST_FILESYSTEM_NO_DEPRECATED + typedef path wpath; +# endif + + //------------------------------------------------------------------------------------// + // class path::iterator // + //------------------------------------------------------------------------------------// + + class path::iterator + : public boost::iterator_facade< + path::iterator, + path const, + boost::bidirectional_traversal_tag > + { + private: + friend class boost::iterator_core_access; + friend class boost::filesystem::path; + friend void m_path_iterator_increment(path::iterator & it); + friend void m_path_iterator_decrement(path::iterator & it); + + const path& dereference() const { return m_element; } + + bool equal(const iterator & rhs) const + { + return m_path_ptr == rhs.m_path_ptr && m_pos == rhs.m_pos; + } + + // iterator_facade derived classes don't seem to like implementations in + // separate translation unit dll's, so forward to class path static members + void increment() { m_path_iterator_increment(*this); } + void decrement() { m_path_iterator_decrement(*this); } + + path m_element; // current element + const path* m_path_ptr; // path being iterated over + string_type::size_type m_pos; // position of m_element in + // m_path_ptr->m_pathname. + // if m_element is implicit dot, m_pos is the + // position of the last separator in the path. + // end() iterator is indicated by + // m_pos == m_path_ptr->m_pathname.size() + }; // path::iterator + + //------------------------------------------------------------------------------------// + // // + // non-member functions // + // // + //------------------------------------------------------------------------------------// + + // std::lexicographical_compare would infinately recurse because path iterators + // yield paths, so provide a path aware version + inline bool lexicographical_compare(path::iterator first1, path::iterator last1, + path::iterator first2, path::iterator last2) + { return detail::lex_compare(first1, last1, first2, last2) < 0; } + + inline bool operator==(const path& lhs, const path& rhs) {return lhs.compare(rhs) == 0;} + inline bool operator==(const path& lhs, const path::string_type& rhs) {return lhs.compare(rhs) == 0;} + inline bool operator==(const path::string_type& lhs, const path& rhs) {return rhs.compare(lhs) == 0;} + inline bool operator==(const path& lhs, const path::value_type* rhs) {return lhs.compare(rhs) == 0;} + inline bool operator==(const path::value_type* lhs, const path& rhs) {return rhs.compare(lhs) == 0;} + + inline bool operator!=(const path& lhs, const path& rhs) {return lhs.compare(rhs) != 0;} + inline bool operator!=(const path& lhs, const path::string_type& rhs) {return lhs.compare(rhs) != 0;} + inline bool operator!=(const path::string_type& lhs, const path& rhs) {return rhs.compare(lhs) != 0;} + inline bool operator!=(const path& lhs, const path::value_type* rhs) {return lhs.compare(rhs) != 0;} + inline bool operator!=(const path::value_type* lhs, const path& rhs) {return rhs.compare(lhs) != 0;} + + // TODO: why do == and != have additional overloads, but the others don't? + + inline bool operator<(const path& lhs, const path& rhs) {return lhs.compare(rhs) < 0;} + inline bool operator<=(const path& lhs, const path& rhs) {return !(rhs < lhs);} + inline bool operator> (const path& lhs, const path& rhs) {return rhs < lhs;} + inline bool operator>=(const path& lhs, const path& rhs) {return !(lhs < rhs);} + + inline std::size_t hash_value(const path& x) + { +# ifdef BOOST_WINDOWS_API + std::size_t seed = 0; + for(const path::value_type* it = x.c_str(); *it; ++it) + hash_combine(seed, *it == '/' ? L'\\' : *it); + return seed; +# else // BOOST_POSIX_API + return hash_range(x.native().begin(), x.native().end()); +# endif + } + + inline void swap(path& lhs, path& rhs) { lhs.swap(rhs); } + + inline path operator/(const path& lhs, const path& rhs) { return path(lhs) /= rhs; } + + // inserters and extractors + // use boost::io::quoted() to handle spaces in paths + // use '&' as escape character to ease use for Windows paths + + template + inline std::basic_ostream& + operator<<(std::basic_ostream& os, const path& p) + { + return os + << boost::io::quoted(p.template string >(), static_cast('&')); + } + + template + inline std::basic_istream& + operator>>(std::basic_istream& is, path& p) + { + std::basic_string str; + is >> boost::io::quoted(str, static_cast('&')); + p = str; + return is; + } + + // name_checks + + // These functions are holdovers from version 1. It isn't clear they have much + // usefulness, or how to generalize them for later versions. + + BOOST_FILESYSTEM_DECL bool portable_posix_name(const std::string & name); + BOOST_FILESYSTEM_DECL bool windows_name(const std::string & name); + BOOST_FILESYSTEM_DECL bool portable_name(const std::string & name); + BOOST_FILESYSTEM_DECL bool portable_directory_name(const std::string & name); + BOOST_FILESYSTEM_DECL bool portable_file_name(const std::string & name); + BOOST_FILESYSTEM_DECL bool native(const std::string & name); + +//--------------------------------------------------------------------------------------// +// class path member template implementation // +//--------------------------------------------------------------------------------------// + + template + path& path::append(InputIterator begin, InputIterator end) + { + if (begin == end) + return *this; + string_type::size_type sep_pos(m_append_separator_if_needed()); + std::basic_string::value_type> + seq(begin, end); + path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname); + if (sep_pos) + m_erase_redundant_separator(sep_pos); + return *this; + } + + template + path& path::append(InputIterator begin, InputIterator end, const codecvt_type& cvt) + { + if (begin == end) + return *this; + string_type::size_type sep_pos(m_append_separator_if_needed()); + std::basic_string::value_type> + seq(begin, end); + path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname, cvt); + if (sep_pos) + m_erase_redundant_separator(sep_pos); + return *this; + } + + template + path& path::append(Source const& source) + { + if (path_traits::empty(source)) + return *this; + string_type::size_type sep_pos(m_append_separator_if_needed()); + path_traits::dispatch(source, m_pathname); + if (sep_pos) + m_erase_redundant_separator(sep_pos); + return *this; + } + + template + path& path::append(Source const& source, const codecvt_type& cvt) + { + if (path_traits::empty(source)) + return *this; + string_type::size_type sep_pos(m_append_separator_if_needed()); + path_traits::dispatch(source, m_pathname, cvt); + if (sep_pos) + m_erase_redundant_separator(sep_pos); + return *this; + } + +//--------------------------------------------------------------------------------------// +// class path member template specializations // +//--------------------------------------------------------------------------------------// + + template <> inline + std::string path::string() const + { return string(); } + + template <> inline + std::wstring path::string() const + { return wstring(); } + + template <> inline + std::string path::string(const codecvt_type& cvt) const + { return string(cvt); } + + template <> inline + std::wstring path::string(const codecvt_type& cvt) const + { return wstring(cvt); } + + template <> inline + std::string path::generic_string() const + { return generic_string(); } + + template <> inline + std::wstring path::generic_string() const + { return generic_wstring(); } + + template <> inline + std::string path::generic_string(const codecvt_type& cvt) const + { return generic_string(cvt); } + + template <> inline + std::wstring path::generic_string(const codecvt_type& cvt) const + { return generic_wstring(cvt); } + + //--------------------------------------------------------------------------------------// + // path_traits convert function implementations // + // requiring path::codecvt() be visable // + //--------------------------------------------------------------------------------------// + +namespace path_traits +{ // without codecvt + + inline + void convert(const char* from, + const char* from_end, // 0 for null terminated MBCS + std::wstring & to) + { + convert(from, from_end, to, path::codecvt()); + } + + inline + void convert(const wchar_t* from, + const wchar_t* from_end, // 0 for null terminated MBCS + std::string & to) + { + convert(from, from_end, to, path::codecvt()); + } + + inline + void convert(const char* from, + std::wstring & to) + { + BOOST_ASSERT(from); + convert(from, 0, to, path::codecvt()); + } + + inline + void convert(const wchar_t* from, + std::string & to) + { + BOOST_ASSERT(from); + convert(from, 0, to, path::codecvt()); + } +} // namespace path_traits +} // namespace filesystem +} // namespace boost + +//----------------------------------------------------------------------------// + +#include // pops abi_prefix.hpp pragmas + +#endif // BOOST_FILESYSTEM_PATH_HPP diff --git a/ThirdParty/boost-Subset/boost/filesystem/path_traits.hpp b/ThirdParty/boost-Subset/boost/filesystem/path_traits.hpp new file mode 100644 index 0000000000..129044a469 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/filesystem/path_traits.hpp @@ -0,0 +1,352 @@ +// filesystem path_traits.hpp --------------------------------------------------------// + +// Copyright Beman Dawes 2009 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#ifndef BOOST_FILESYSTEM_PATH_TRAITS_HPP +#define BOOST_FILESYSTEM_PATH_TRAITS_HPP + +#include + +# if defined( BOOST_NO_STD_WSTRING ) +# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support +# endif + +#include +#include +#include +#include +#include +#include // for mbstate_t +#include +#include +#include +#include +#include +#include +// #include //**** comment me out **** + +#include // must be the last #include + +namespace boost { namespace filesystem { + + BOOST_FILESYSTEM_DECL const system::error_category& codecvt_error_category(); + // uses std::codecvt_base::result used for error codes: + // + // ok: Conversion successful. + // partial: Not all source characters converted; one or more additional source + // characters are needed to produce the final target character, or the + // size of the target intermediate buffer was too small to hold the result. + // error: A character in the source could not be converted to the target encoding. + // noconv: The source and target characters have the same type and encoding, so no + // conversion was necessary. + + class directory_entry; + +namespace path_traits { + + typedef std::codecvt codecvt_type; + + // is_pathable type trait; allows disabling over-agressive class path member templates + + template + struct is_pathable { static const bool value = false; }; + + template<> struct is_pathable { static const bool value = true; }; + template<> struct is_pathable { static const bool value = true; }; + template<> struct is_pathable { static const bool value = true; }; + template<> struct is_pathable { static const bool value = true; }; + template<> struct is_pathable { static const bool value = true; }; + template<> struct is_pathable { static const bool value = true; }; + template<> struct is_pathable > { static const bool value = true; }; + template<> struct is_pathable > { static const bool value = true; }; + template<> struct is_pathable > { static const bool value = true; }; + template<> struct is_pathable > { static const bool value = true; }; + template<> struct is_pathable { static const bool value = true; }; + + // Pathable empty + + template inline + // disable_if aids broken compilers (IBM, old GCC, etc.) and is harmless for + // conforming compilers. Replace by plain "bool" at some future date (2012?) + typename boost::disable_if, bool>::type + empty(const Container & c) + { return c.begin() == c.end(); } + + template inline + bool empty(T * const & c_str) + { + BOOST_ASSERT(c_str); + return !*c_str; + } + + template inline + bool empty(T (&x)[N]) + { return !x[0]; } + + // value types differ ---------------------------------------------------------------// + // + // A from_end argument of 0 is less efficient than a known end, so use only if needed + + // with codecvt + + BOOST_FILESYSTEM_DECL + void convert(const char* from, + const char* from_end, // 0 for null terminated MBCS + std::wstring & to, + const codecvt_type& cvt); + + BOOST_FILESYSTEM_DECL + void convert(const wchar_t* from, + const wchar_t* from_end, // 0 for null terminated MBCS + std::string & to, + const codecvt_type& cvt); + + inline + void convert(const char* from, + std::wstring & to, + const codecvt_type& cvt) + { + BOOST_ASSERT(from); + convert(from, 0, to, cvt); + } + + inline + void convert(const wchar_t* from, + std::string & to, + const codecvt_type& cvt) + { + BOOST_ASSERT(from); + convert(from, 0, to, cvt); + } + + // without codecvt + + inline + void convert(const char* from, + const char* from_end, // 0 for null terminated MBCS + std::wstring & to); + + inline + void convert(const wchar_t* from, + const wchar_t* from_end, // 0 for null terminated MBCS + std::string & to); + + inline + void convert(const char* from, + std::wstring & to); + + inline + void convert(const wchar_t* from, + std::string & to); + + // value types same -----------------------------------------------------------------// + + // char with codecvt + + inline + void convert(const char* from, const char* from_end, std::string & to, + const codecvt_type&) + { + BOOST_ASSERT(from); + BOOST_ASSERT(from_end); + to.append(from, from_end); + } + + inline + void convert(const char* from, + std::string & to, + const codecvt_type&) + { + BOOST_ASSERT(from); + to += from; + } + + // wchar_t with codecvt + + inline + void convert(const wchar_t* from, const wchar_t* from_end, std::wstring & to, + const codecvt_type&) + { + BOOST_ASSERT(from); + BOOST_ASSERT(from_end); + to.append(from, from_end); + } + + inline + void convert(const wchar_t* from, + std::wstring & to, + const codecvt_type&) + { + BOOST_ASSERT(from); + to += from; + } + + // char without codecvt + + inline + void convert(const char* from, const char* from_end, std::string & to) + { + BOOST_ASSERT(from); + BOOST_ASSERT(from_end); + to.append(from, from_end); + } + + inline + void convert(const char* from, std::string & to) + { + BOOST_ASSERT(from); + to += from; + } + + // wchar_t without codecvt + + inline + void convert(const wchar_t* from, const wchar_t* from_end, std::wstring & to) + { + BOOST_ASSERT(from); + BOOST_ASSERT(from_end); + to.append(from, from_end); + } + + inline + void convert(const wchar_t* from, std::wstring & to) + { + BOOST_ASSERT(from); + to += from; + } + + // Source dispatch -----------------------------------------------------------------// + + // contiguous containers with codecvt + template inline + void dispatch(const std::string& c, U& to, const codecvt_type& cvt) + { + if (c.size()) + convert(&*c.begin(), &*c.begin() + c.size(), to, cvt); + } + template inline + void dispatch(const std::wstring& c, U& to, const codecvt_type& cvt) + { + if (c.size()) + convert(&*c.begin(), &*c.begin() + c.size(), to, cvt); + } + template inline + void dispatch(const std::vector& c, U& to, const codecvt_type& cvt) + { + if (c.size()) + convert(&*c.begin(), &*c.begin() + c.size(), to, cvt); + } + template inline + void dispatch(const std::vector& c, U& to, const codecvt_type& cvt) + { + if (c.size()) + convert(&*c.begin(), &*c.begin() + c.size(), to, cvt); + } + + // contiguous containers without codecvt + template inline + void dispatch(const std::string& c, U& to) + { + if (c.size()) + convert(&*c.begin(), &*c.begin() + c.size(), to); + } + template inline + void dispatch(const std::wstring& c, U& to) + { + if (c.size()) + convert(&*c.begin(), &*c.begin() + c.size(), to); + } + template inline + void dispatch(const std::vector& c, U& to) + { + if (c.size()) + convert(&*c.begin(), &*c.begin() + c.size(), to); + } + template inline + void dispatch(const std::vector& c, U& to) + { + if (c.size()) + convert(&*c.begin(), &*c.begin() + c.size(), to); + } + + // non-contiguous containers with codecvt + template inline + // disable_if aids broken compilers (IBM, old GCC, etc.) and is harmless for + // conforming compilers. Replace by plain "void" at some future date (2012?) + typename boost::disable_if, void>::type + dispatch(const Container & c, U& to, const codecvt_type& cvt) + { + if (c.size()) + { + std::basic_string s(c.begin(), c.end()); + convert(s.c_str(), s.c_str()+s.size(), to, cvt); + } + } + + // c_str + template inline + void dispatch(T * const & c_str, U& to, const codecvt_type& cvt) + { + // std::cout << "dispatch() const T *\n"; + BOOST_ASSERT(c_str); + convert(c_str, to, cvt); + } + + // Note: there is no dispatch on C-style arrays because the array may + // contain a string smaller than the array size. + + BOOST_FILESYSTEM_DECL + void dispatch(const directory_entry & de, +# ifdef BOOST_WINDOWS_API + std::wstring & to, +# else + std::string & to, +# endif + const codecvt_type&); + + // non-contiguous containers without codecvt + template inline + // disable_if aids broken compilers (IBM, old GCC, etc.) and is harmless for + // conforming compilers. Replace by plain "void" at some future date (2012?) + typename boost::disable_if, void>::type + dispatch(const Container & c, U& to) + { + if (c.size()) + { + std::basic_string seq(c.begin(), c.end()); + convert(seq.c_str(), seq.c_str()+seq.size(), to); + } + } + + // c_str + template inline + void dispatch(T * const & c_str, U& to) + { + // std::cout << "dispatch() const T *\n"; + BOOST_ASSERT(c_str); + convert(c_str, to); + } + + // Note: there is no dispatch on C-style arrays because the array may + // contain a string smaller than the array size. + + BOOST_FILESYSTEM_DECL + void dispatch(const directory_entry & de, +# ifdef BOOST_WINDOWS_API + std::wstring & to +# else + std::string & to +# endif + ); + + +}}} // namespace boost::filesystem::path_traits + +#include // pops abi_prefix.hpp pragmas + +#endif // BOOST_FILESYSTEM_PATH_TRAITS_HPP diff --git a/ThirdParty/boost-Subset/boost/function/detail/maybe_include.hpp b/ThirdParty/boost-Subset/boost/function/detail/maybe_include.hpp new file mode 100644 index 0000000000..92f71bb227 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/function/detail/maybe_include.hpp @@ -0,0 +1,267 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#if BOOST_FUNCTION_NUM_ARGS == 0 +# ifndef BOOST_FUNCTION_0 +# define BOOST_FUNCTION_0 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 1 +# ifndef BOOST_FUNCTION_1 +# define BOOST_FUNCTION_1 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 2 +# ifndef BOOST_FUNCTION_2 +# define BOOST_FUNCTION_2 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 3 +# ifndef BOOST_FUNCTION_3 +# define BOOST_FUNCTION_3 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 4 +# ifndef BOOST_FUNCTION_4 +# define BOOST_FUNCTION_4 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 5 +# ifndef BOOST_FUNCTION_5 +# define BOOST_FUNCTION_5 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 6 +# ifndef BOOST_FUNCTION_6 +# define BOOST_FUNCTION_6 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 7 +# ifndef BOOST_FUNCTION_7 +# define BOOST_FUNCTION_7 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 8 +# ifndef BOOST_FUNCTION_8 +# define BOOST_FUNCTION_8 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 9 +# ifndef BOOST_FUNCTION_9 +# define BOOST_FUNCTION_9 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 10 +# ifndef BOOST_FUNCTION_10 +# define BOOST_FUNCTION_10 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 11 +# ifndef BOOST_FUNCTION_11 +# define BOOST_FUNCTION_11 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 12 +# ifndef BOOST_FUNCTION_12 +# define BOOST_FUNCTION_12 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 13 +# ifndef BOOST_FUNCTION_13 +# define BOOST_FUNCTION_13 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 14 +# ifndef BOOST_FUNCTION_14 +# define BOOST_FUNCTION_14 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 15 +# ifndef BOOST_FUNCTION_15 +# define BOOST_FUNCTION_15 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 16 +# ifndef BOOST_FUNCTION_16 +# define BOOST_FUNCTION_16 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 17 +# ifndef BOOST_FUNCTION_17 +# define BOOST_FUNCTION_17 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 18 +# ifndef BOOST_FUNCTION_18 +# define BOOST_FUNCTION_18 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 19 +# ifndef BOOST_FUNCTION_19 +# define BOOST_FUNCTION_19 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 20 +# ifndef BOOST_FUNCTION_20 +# define BOOST_FUNCTION_20 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 21 +# ifndef BOOST_FUNCTION_21 +# define BOOST_FUNCTION_21 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 22 +# ifndef BOOST_FUNCTION_22 +# define BOOST_FUNCTION_22 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 23 +# ifndef BOOST_FUNCTION_23 +# define BOOST_FUNCTION_23 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 24 +# ifndef BOOST_FUNCTION_24 +# define BOOST_FUNCTION_24 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 25 +# ifndef BOOST_FUNCTION_25 +# define BOOST_FUNCTION_25 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 26 +# ifndef BOOST_FUNCTION_26 +# define BOOST_FUNCTION_26 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 27 +# ifndef BOOST_FUNCTION_27 +# define BOOST_FUNCTION_27 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 28 +# ifndef BOOST_FUNCTION_28 +# define BOOST_FUNCTION_28 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 29 +# ifndef BOOST_FUNCTION_29 +# define BOOST_FUNCTION_29 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 30 +# ifndef BOOST_FUNCTION_30 +# define BOOST_FUNCTION_30 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 31 +# ifndef BOOST_FUNCTION_31 +# define BOOST_FUNCTION_31 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 32 +# ifndef BOOST_FUNCTION_32 +# define BOOST_FUNCTION_32 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 33 +# ifndef BOOST_FUNCTION_33 +# define BOOST_FUNCTION_33 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 34 +# ifndef BOOST_FUNCTION_34 +# define BOOST_FUNCTION_34 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 35 +# ifndef BOOST_FUNCTION_35 +# define BOOST_FUNCTION_35 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 36 +# ifndef BOOST_FUNCTION_36 +# define BOOST_FUNCTION_36 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 37 +# ifndef BOOST_FUNCTION_37 +# define BOOST_FUNCTION_37 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 38 +# ifndef BOOST_FUNCTION_38 +# define BOOST_FUNCTION_38 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 39 +# ifndef BOOST_FUNCTION_39 +# define BOOST_FUNCTION_39 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 40 +# ifndef BOOST_FUNCTION_40 +# define BOOST_FUNCTION_40 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 41 +# ifndef BOOST_FUNCTION_41 +# define BOOST_FUNCTION_41 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 42 +# ifndef BOOST_FUNCTION_42 +# define BOOST_FUNCTION_42 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 43 +# ifndef BOOST_FUNCTION_43 +# define BOOST_FUNCTION_43 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 44 +# ifndef BOOST_FUNCTION_44 +# define BOOST_FUNCTION_44 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 45 +# ifndef BOOST_FUNCTION_45 +# define BOOST_FUNCTION_45 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 46 +# ifndef BOOST_FUNCTION_46 +# define BOOST_FUNCTION_46 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 47 +# ifndef BOOST_FUNCTION_47 +# define BOOST_FUNCTION_47 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 48 +# ifndef BOOST_FUNCTION_48 +# define BOOST_FUNCTION_48 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 49 +# ifndef BOOST_FUNCTION_49 +# define BOOST_FUNCTION_49 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 50 +# ifndef BOOST_FUNCTION_50 +# define BOOST_FUNCTION_50 +# include +# endif +#else +# error Cannot handle Boost.Function objects that accept more than 50 arguments! +#endif diff --git a/ThirdParty/boost-Subset/boost/function/detail/prologue.hpp b/ThirdParty/boost-Subset/boost/function/detail/prologue.hpp new file mode 100644 index 0000000000..53d0f05cd3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/function/detail/prologue.hpp @@ -0,0 +1,26 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2002-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#ifndef BOOST_FUNCTION_PROLOGUE_HPP +#define BOOST_FUNCTION_PROLOGUE_HPP +# include +# include +# include // unary_function, binary_function +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +#endif // BOOST_FUNCTION_PROLOGUE_HPP diff --git a/ThirdParty/boost-Subset/boost/function/function0.hpp b/ThirdParty/boost-Subset/boost/function/function0.hpp new file mode 100644 index 0000000000..65a02e5fac --- /dev/null +++ b/ThirdParty/boost-Subset/boost/function/function0.hpp @@ -0,0 +1,12 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2002-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#define BOOST_FUNCTION_NUM_ARGS 0 +#include +#undef BOOST_FUNCTION_NUM_ARGS diff --git a/ThirdParty/boost-Subset/boost/function/function1.hpp b/ThirdParty/boost-Subset/boost/function/function1.hpp new file mode 100644 index 0000000000..9089715155 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/function/function1.hpp @@ -0,0 +1,12 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2002-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#define BOOST_FUNCTION_NUM_ARGS 1 +#include +#undef BOOST_FUNCTION_NUM_ARGS diff --git a/ThirdParty/boost-Subset/boost/function/function2.hpp b/ThirdParty/boost-Subset/boost/function/function2.hpp new file mode 100644 index 0000000000..dc8bf97521 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/function/function2.hpp @@ -0,0 +1,12 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2002-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#define BOOST_FUNCTION_NUM_ARGS 2 +#include +#undef BOOST_FUNCTION_NUM_ARGS diff --git a/ThirdParty/boost-Subset/boost/function/function_base.hpp b/ThirdParty/boost-Subset/boost/function/function_base.hpp new file mode 100644 index 0000000000..35c1995ece --- /dev/null +++ b/ThirdParty/boost-Subset/boost/function/function_base.hpp @@ -0,0 +1,892 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2001-2006 +// Copyright Emil Dotchevski 2007 +// Use, modification and distribution is subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#ifndef BOOST_FUNCTION_BASE_HEADER +#define BOOST_FUNCTION_BASE_HEADER + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef BOOST_NO_SFINAE +# include "boost/utility/enable_if.hpp" +#else +# include "boost/mpl/bool.hpp" +#endif +#include +#include + +#if defined(BOOST_MSVC) +# pragma warning( push ) +# pragma warning( disable : 4793 ) // complaint about native code generation +# pragma warning( disable : 4127 ) // "conditional expression is constant" +#endif + +// Define BOOST_FUNCTION_STD_NS to the namespace that contains type_info. +#ifdef BOOST_NO_STD_TYPEINFO +// Embedded VC++ does not have type_info in namespace std +# define BOOST_FUNCTION_STD_NS +#else +# define BOOST_FUNCTION_STD_NS std +#endif + +// Borrowed from Boost.Python library: determines the cases where we +// need to use std::type_info::name to compare instead of operator==. +#if defined( BOOST_NO_TYPEID ) +# define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) ((X)==(Y)) +#elif defined(__GNUC__) \ + || defined(_AIX) \ + || ( defined(__sgi) && defined(__host_mips)) +# include +# define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) \ + (std::strcmp((X).name(),(Y).name()) == 0) +# else +# define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) ((X)==(Y)) +#endif + +#if defined(__ICL) && __ICL <= 600 || defined(__MWERKS__) && __MWERKS__ < 0x2406 && !defined(BOOST_STRICT_CONFIG) +# define BOOST_FUNCTION_TARGET_FIX(x) x +#else +# define BOOST_FUNCTION_TARGET_FIX(x) +#endif // __ICL etc + +# define BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor,Type) \ + typename ::boost::enable_if_c< \ + !(::boost::is_integral::value), \ + Type>::type + +namespace boost { + namespace detail { + namespace function { + class X; + + /** + * A buffer used to store small function objects in + * boost::function. It is a union containing function pointers, + * object pointers, and a structure that resembles a bound + * member function pointer. + */ + union function_buffer + { + // For pointers to function objects + mutable void* obj_ptr; + + // For pointers to std::type_info objects + struct type_t { + // (get_functor_type_tag, check_functor_type_tag). + const detail::sp_typeinfo* type; + + // Whether the type is const-qualified. + bool const_qualified; + // Whether the type is volatile-qualified. + bool volatile_qualified; + } type; + + // For function pointers of all kinds + mutable void (*func_ptr)(); + + // For bound member pointers + struct bound_memfunc_ptr_t { + void (X::*memfunc_ptr)(int); + void* obj_ptr; + } bound_memfunc_ptr; + + // For references to function objects. We explicitly keep + // track of the cv-qualifiers on the object referenced. + struct obj_ref_t { + mutable void* obj_ptr; + bool is_const_qualified; + bool is_volatile_qualified; + } obj_ref; + + // To relax aliasing constraints + mutable char data; + }; + + /** + * The unusable class is a placeholder for unused function arguments + * It is also completely unusable except that it constructable from + * anything. This helps compilers without partial specialization to + * handle Boost.Function objects returning void. + */ + struct unusable + { + unusable() {} + template unusable(const T&) {} + }; + + /* Determine the return type. This supports compilers that do not support + * void returns or partial specialization by silently changing the return + * type to "unusable". + */ + template struct function_return_type { typedef T type; }; + + template<> + struct function_return_type + { + typedef unusable type; + }; + + // The operation type to perform on the given functor/function pointer + enum functor_manager_operation_type { + clone_functor_tag, + move_functor_tag, + destroy_functor_tag, + check_functor_type_tag, + get_functor_type_tag + }; + + // Tags used to decide between different types of functions + struct function_ptr_tag {}; + struct function_obj_tag {}; + struct member_ptr_tag {}; + struct function_obj_ref_tag {}; + + template + class get_function_tag + { + typedef typename mpl::if_c<(is_pointer::value), + function_ptr_tag, + function_obj_tag>::type ptr_or_obj_tag; + + typedef typename mpl::if_c<(is_member_pointer::value), + member_ptr_tag, + ptr_or_obj_tag>::type ptr_or_obj_or_mem_tag; + + typedef typename mpl::if_c<(is_reference_wrapper::value), + function_obj_ref_tag, + ptr_or_obj_or_mem_tag>::type or_ref_tag; + + public: + typedef or_ref_tag type; + }; + + // The trivial manager does nothing but return the same pointer (if we + // are cloning) or return the null pointer (if we are deleting). + template + struct reference_manager + { + static inline void + manage(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op) + { + switch (op) { + case clone_functor_tag: + out_buffer.obj_ref = in_buffer.obj_ref; + return; + + case move_functor_tag: + out_buffer.obj_ref = in_buffer.obj_ref; + in_buffer.obj_ref.obj_ptr = 0; + return; + + case destroy_functor_tag: + out_buffer.obj_ref.obj_ptr = 0; + return; + + case check_functor_type_tag: + { + const detail::sp_typeinfo& check_type + = *out_buffer.type.type; + + // Check whether we have the same type. We can add + // cv-qualifiers, but we can't take them away. + if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(F)) + && (!in_buffer.obj_ref.is_const_qualified + || out_buffer.type.const_qualified) + && (!in_buffer.obj_ref.is_volatile_qualified + || out_buffer.type.volatile_qualified)) + out_buffer.obj_ptr = in_buffer.obj_ref.obj_ptr; + else + out_buffer.obj_ptr = 0; + } + return; + + case get_functor_type_tag: + out_buffer.type.type = &BOOST_SP_TYPEID(F); + out_buffer.type.const_qualified = in_buffer.obj_ref.is_const_qualified; + out_buffer.type.volatile_qualified = in_buffer.obj_ref.is_volatile_qualified; + return; + } + } + }; + + /** + * Determine if boost::function can use the small-object + * optimization with the function object type F. + */ + template + struct function_allows_small_object_optimization + { + BOOST_STATIC_CONSTANT + (bool, + value = ((sizeof(F) <= sizeof(function_buffer) && + (alignment_of::value + % alignment_of::value == 0)))); + }; + + template + struct functor_wrapper: public F, public A + { + functor_wrapper( F f, A a ): + F(f), + A(a) + { + } + + functor_wrapper(const functor_wrapper& f) : + F(static_cast(f)), + A(static_cast(f)) + { + } + }; + + /** + * The functor_manager class contains a static function "manage" which + * can clone or destroy the given function/function object pointer. + */ + template + struct functor_manager_common + { + typedef Functor functor_type; + + // Function pointers + static inline void + manage_ptr(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op) + { + if (op == clone_functor_tag) + out_buffer.func_ptr = in_buffer.func_ptr; + else if (op == move_functor_tag) { + out_buffer.func_ptr = in_buffer.func_ptr; + in_buffer.func_ptr = 0; + } else if (op == destroy_functor_tag) + out_buffer.func_ptr = 0; + else if (op == check_functor_type_tag) { + const boost::detail::sp_typeinfo& check_type + = *out_buffer.type.type; + if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor))) + out_buffer.obj_ptr = &in_buffer.func_ptr; + else + out_buffer.obj_ptr = 0; + } else /* op == get_functor_type_tag */ { + out_buffer.type.type = &BOOST_SP_TYPEID(Functor); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + } + } + + // Function objects that fit in the small-object buffer. + static inline void + manage_small(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op) + { + if (op == clone_functor_tag || op == move_functor_tag) { + const functor_type* in_functor = + reinterpret_cast(&in_buffer.data); + new (reinterpret_cast(&out_buffer.data)) functor_type(*in_functor); + + if (op == move_functor_tag) { + functor_type* f = reinterpret_cast(&in_buffer.data); + (void)f; // suppress warning about the value of f not being used (MSVC) + f->~Functor(); + } + } else if (op == destroy_functor_tag) { + // Some compilers (Borland, vc6, ...) are unhappy with ~functor_type. + functor_type* f = reinterpret_cast(&out_buffer.data); + (void)f; // suppress warning about the value of f not being used (MSVC) + f->~Functor(); + } else if (op == check_functor_type_tag) { + const detail::sp_typeinfo& check_type + = *out_buffer.type.type; + if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor))) + out_buffer.obj_ptr = &in_buffer.data; + else + out_buffer.obj_ptr = 0; + } else /* op == get_functor_type_tag */ { + out_buffer.type.type = &BOOST_SP_TYPEID(Functor); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + } + } + }; + + template + struct functor_manager + { + private: + typedef Functor functor_type; + + // Function pointers + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, function_ptr_tag) + { + functor_manager_common::manage_ptr(in_buffer,out_buffer,op); + } + + // Function objects that fit in the small-object buffer. + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, mpl::true_) + { + functor_manager_common::manage_small(in_buffer,out_buffer,op); + } + + // Function objects that require heap allocation + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, mpl::false_) + { + if (op == clone_functor_tag) { + // Clone the functor + // GCC 2.95.3 gets the CV qualifiers wrong here, so we + // can't do the static_cast that we should do. + // jewillco: Changing this to static_cast because GCC 2.95.3 is + // obsolete. + const functor_type* f = + static_cast(in_buffer.obj_ptr); + functor_type* new_f = new functor_type(*f); + out_buffer.obj_ptr = new_f; + } else if (op == move_functor_tag) { + out_buffer.obj_ptr = in_buffer.obj_ptr; + in_buffer.obj_ptr = 0; + } else if (op == destroy_functor_tag) { + /* Cast from the void pointer to the functor pointer type */ + functor_type* f = + static_cast(out_buffer.obj_ptr); + delete f; + out_buffer.obj_ptr = 0; + } else if (op == check_functor_type_tag) { + const detail::sp_typeinfo& check_type + = *out_buffer.type.type; + if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor))) + out_buffer.obj_ptr = in_buffer.obj_ptr; + else + out_buffer.obj_ptr = 0; + } else /* op == get_functor_type_tag */ { + out_buffer.type.type = &BOOST_SP_TYPEID(Functor); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + } + } + + // For function objects, we determine whether the function + // object can use the small-object optimization buffer or + // whether we need to allocate it on the heap. + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, function_obj_tag) + { + manager(in_buffer, out_buffer, op, + mpl::bool_<(function_allows_small_object_optimization::value)>()); + } + + // For member pointers, we use the small-object optimization buffer. + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, member_ptr_tag) + { + manager(in_buffer, out_buffer, op, mpl::true_()); + } + + public: + /* Dispatch to an appropriate manager based on whether we have a + function pointer or a function object pointer. */ + static inline void + manage(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op) + { + typedef typename get_function_tag::type tag_type; + switch (op) { + case get_functor_type_tag: + out_buffer.type.type = &BOOST_SP_TYPEID(functor_type); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + return; + + default: + manager(in_buffer, out_buffer, op, tag_type()); + return; + } + } + }; + + template + struct functor_manager_a + { + private: + typedef Functor functor_type; + + // Function pointers + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, function_ptr_tag) + { + functor_manager_common::manage_ptr(in_buffer,out_buffer,op); + } + + // Function objects that fit in the small-object buffer. + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, mpl::true_) + { + functor_manager_common::manage_small(in_buffer,out_buffer,op); + } + + // Function objects that require heap allocation + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, mpl::false_) + { + typedef functor_wrapper functor_wrapper_type; + typedef typename Allocator::template rebind::other + wrapper_allocator_type; + typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type; + + if (op == clone_functor_tag) { + // Clone the functor + // GCC 2.95.3 gets the CV qualifiers wrong here, so we + // can't do the static_cast that we should do. + const functor_wrapper_type* f = + static_cast(in_buffer.obj_ptr); + wrapper_allocator_type wrapper_allocator(static_cast(*f)); + wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1); + wrapper_allocator.construct(copy, *f); + + // Get back to the original pointer type + functor_wrapper_type* new_f = static_cast(copy); + out_buffer.obj_ptr = new_f; + } else if (op == move_functor_tag) { + out_buffer.obj_ptr = in_buffer.obj_ptr; + in_buffer.obj_ptr = 0; + } else if (op == destroy_functor_tag) { + /* Cast from the void pointer to the functor_wrapper_type */ + functor_wrapper_type* victim = + static_cast(in_buffer.obj_ptr); + wrapper_allocator_type wrapper_allocator(static_cast(*victim)); + wrapper_allocator.destroy(victim); + wrapper_allocator.deallocate(victim,1); + out_buffer.obj_ptr = 0; + } else if (op == check_functor_type_tag) { + const detail::sp_typeinfo& check_type + = *out_buffer.type.type; + if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor))) + out_buffer.obj_ptr = in_buffer.obj_ptr; + else + out_buffer.obj_ptr = 0; + } else /* op == get_functor_type_tag */ { + out_buffer.type.type = &BOOST_SP_TYPEID(Functor); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + } + } + + // For function objects, we determine whether the function + // object can use the small-object optimization buffer or + // whether we need to allocate it on the heap. + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, function_obj_tag) + { + manager(in_buffer, out_buffer, op, + mpl::bool_<(function_allows_small_object_optimization::value)>()); + } + + public: + /* Dispatch to an appropriate manager based on whether we have a + function pointer or a function object pointer. */ + static inline void + manage(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op) + { + typedef typename get_function_tag::type tag_type; + switch (op) { + case get_functor_type_tag: + out_buffer.type.type = &BOOST_SP_TYPEID(functor_type); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + return; + + default: + manager(in_buffer, out_buffer, op, tag_type()); + return; + } + } + }; + + // A type that is only used for comparisons against zero + struct useless_clear_type {}; + +#ifdef BOOST_NO_SFINAE + // These routines perform comparisons between a Boost.Function + // object and an arbitrary function object (when the last + // parameter is mpl::bool_) or against zero (when the + // last parameter is mpl::bool_). They are only necessary + // for compilers that don't support SFINAE. + template + bool + compare_equal(const Function& f, const Functor&, int, mpl::bool_) + { return f.empty(); } + + template + bool + compare_not_equal(const Function& f, const Functor&, int, + mpl::bool_) + { return !f.empty(); } + + template + bool + compare_equal(const Function& f, const Functor& g, long, + mpl::bool_) + { + if (const Functor* fp = f.template target()) + return function_equal(*fp, g); + else return false; + } + + template + bool + compare_equal(const Function& f, const reference_wrapper& g, + int, mpl::bool_) + { + if (const Functor* fp = f.template target()) + return fp == g.get_pointer(); + else return false; + } + + template + bool + compare_not_equal(const Function& f, const Functor& g, long, + mpl::bool_) + { + if (const Functor* fp = f.template target()) + return !function_equal(*fp, g); + else return true; + } + + template + bool + compare_not_equal(const Function& f, + const reference_wrapper& g, int, + mpl::bool_) + { + if (const Functor* fp = f.template target()) + return fp != g.get_pointer(); + else return true; + } +#endif // BOOST_NO_SFINAE + + /** + * Stores the "manager" portion of the vtable for a + * boost::function object. + */ + struct vtable_base + { + void (*manager)(const function_buffer& in_buffer, + function_buffer& out_buffer, + functor_manager_operation_type op); + }; + } // end namespace function + } // end namespace detail + +/** + * The function_base class contains the basic elements needed for the + * function1, function2, function3, etc. classes. It is common to all + * functions (and as such can be used to tell if we have one of the + * functionN objects). + */ +class function_base +{ +public: + function_base() : vtable(0) { } + + /** Determine if the function is empty (i.e., has no target). */ + bool empty() const { return !vtable; } + + /** Retrieve the type of the stored function object, or BOOST_SP_TYPEID(void) + if this is empty. */ + const detail::sp_typeinfo& target_type() const + { + if (!vtable) return BOOST_SP_TYPEID(void); + + detail::function::function_buffer type; + get_vtable()->manager(functor, type, detail::function::get_functor_type_tag); + return *type.type.type; + } + + template + Functor* target() + { + if (!vtable) return 0; + + detail::function::function_buffer type_result; + type_result.type.type = &BOOST_SP_TYPEID(Functor); + type_result.type.const_qualified = is_const::value; + type_result.type.volatile_qualified = is_volatile::value; + get_vtable()->manager(functor, type_result, + detail::function::check_functor_type_tag); + return static_cast(type_result.obj_ptr); + } + + template + const Functor* target() const + { + if (!vtable) return 0; + + detail::function::function_buffer type_result; + type_result.type.type = &BOOST_SP_TYPEID(Functor); + type_result.type.const_qualified = true; + type_result.type.volatile_qualified = is_volatile::value; + get_vtable()->manager(functor, type_result, + detail::function::check_functor_type_tag); + // GCC 2.95.3 gets the CV qualifiers wrong here, so we + // can't do the static_cast that we should do. + return static_cast(type_result.obj_ptr); + } + + template + bool contains(const F& f) const + { + if (const F* fp = this->template target()) + { + return function_equal(*fp, f); + } else { + return false; + } + } + +#if defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3 + // GCC 3.3 and newer cannot copy with the global operator==, due to + // problems with instantiation of function return types before it + // has been verified that the argument types match up. + template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator==(Functor g) const + { + if (const Functor* fp = target()) + return function_equal(*fp, g); + else return false; + } + + template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator!=(Functor g) const + { + if (const Functor* fp = target()) + return !function_equal(*fp, g); + else return true; + } +#endif + +public: // should be protected, but GCC 2.95.3 will fail to allow access + detail::function::vtable_base* get_vtable() const { + return reinterpret_cast( + reinterpret_cast(vtable) & ~static_cast(0x01)); + } + + bool has_trivial_copy_and_destroy() const { + return reinterpret_cast(vtable) & 0x01; + } + + detail::function::vtable_base* vtable; + mutable detail::function::function_buffer functor; +}; + +/** + * The bad_function_call exception class is thrown when a boost::function + * object is invoked + */ +class bad_function_call : public std::runtime_error +{ +public: + bad_function_call() : std::runtime_error("call to empty boost::function") {} +}; + +#ifndef BOOST_NO_SFINAE +inline bool operator==(const function_base& f, + detail::function::useless_clear_type*) +{ + return f.empty(); +} + +inline bool operator!=(const function_base& f, + detail::function::useless_clear_type*) +{ + return !f.empty(); +} + +inline bool operator==(detail::function::useless_clear_type*, + const function_base& f) +{ + return f.empty(); +} + +inline bool operator!=(detail::function::useless_clear_type*, + const function_base& f) +{ + return !f.empty(); +} +#endif + +#ifdef BOOST_NO_SFINAE +// Comparisons between boost::function objects and arbitrary function objects +template + inline bool operator==(const function_base& f, Functor g) + { + typedef mpl::bool_<(is_integral::value)> integral; + return detail::function::compare_equal(f, g, 0, integral()); + } + +template + inline bool operator==(Functor g, const function_base& f) + { + typedef mpl::bool_<(is_integral::value)> integral; + return detail::function::compare_equal(f, g, 0, integral()); + } + +template + inline bool operator!=(const function_base& f, Functor g) + { + typedef mpl::bool_<(is_integral::value)> integral; + return detail::function::compare_not_equal(f, g, 0, integral()); + } + +template + inline bool operator!=(Functor g, const function_base& f) + { + typedef mpl::bool_<(is_integral::value)> integral; + return detail::function::compare_not_equal(f, g, 0, integral()); + } +#else + +# if !(defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3) +// Comparisons between boost::function objects and arbitrary function +// objects. GCC 3.3 and before has an obnoxious bug that prevents this +// from working. +template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator==(const function_base& f, Functor g) + { + if (const Functor* fp = f.template target()) + return function_equal(*fp, g); + else return false; + } + +template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator==(Functor g, const function_base& f) + { + if (const Functor* fp = f.template target()) + return function_equal(g, *fp); + else return false; + } + +template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator!=(const function_base& f, Functor g) + { + if (const Functor* fp = f.template target()) + return !function_equal(*fp, g); + else return true; + } + +template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator!=(Functor g, const function_base& f) + { + if (const Functor* fp = f.template target()) + return !function_equal(g, *fp); + else return true; + } +# endif + +template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator==(const function_base& f, reference_wrapper g) + { + if (const Functor* fp = f.template target()) + return fp == g.get_pointer(); + else return false; + } + +template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator==(reference_wrapper g, const function_base& f) + { + if (const Functor* fp = f.template target()) + return g.get_pointer() == fp; + else return false; + } + +template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator!=(const function_base& f, reference_wrapper g) + { + if (const Functor* fp = f.template target()) + return fp != g.get_pointer(); + else return true; + } + +template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator!=(reference_wrapper g, const function_base& f) + { + if (const Functor* fp = f.template target()) + return g.get_pointer() != fp; + else return true; + } + +#endif // Compiler supporting SFINAE + +namespace detail { + namespace function { + inline bool has_empty_target(const function_base* f) + { + return f->empty(); + } + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1310) + inline bool has_empty_target(const void*) + { + return false; + } +#else + inline bool has_empty_target(...) + { + return false; + } +#endif + } // end namespace function +} // end namespace detail +} // end namespace boost + +#undef BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL +#undef BOOST_FUNCTION_COMPARE_TYPE_ID + +#if defined(BOOST_MSVC) +# pragma warning( pop ) +#endif + +#endif // BOOST_FUNCTION_BASE_HEADER diff --git a/ThirdParty/boost-Subset/boost/function/function_fwd.hpp b/ThirdParty/boost-Subset/boost/function/function_fwd.hpp new file mode 100644 index 0000000000..e79b504899 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/function/function_fwd.hpp @@ -0,0 +1,69 @@ +// Boost.Function library +// Copyright (C) Douglas Gregor 2008 +// +// Use, modification and distribution is subject to the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org +#ifndef BOOST_FUNCTION_FWD_HPP +#define BOOST_FUNCTION_FWD_HPP +#include + +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730 && !defined(BOOST_STRICT_CONFIG) +// Work around a compiler bug. +// boost::python::objects::function has to be seen by the compiler before the +// boost::function class template. +namespace boost { namespace python { namespace objects { + class function; +}}} +#endif + +#if defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG) \ + || !(defined(BOOST_STRICT_CONFIG) || !defined(__SUNPRO_CC) || __SUNPRO_CC > 0x540) +# define BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX +#endif + +namespace boost { + class bad_function_call; + +#if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX) + // Preferred syntax + template class function; + + template + inline void swap(function& f1, function& f2) + { + f1.swap(f2); + } +#endif // have partial specialization + + // Portable syntax + template class function0; + template class function1; + template class function2; + template class function3; + template + class function4; + template + class function5; + template + class function6; + template + class function7; + template + class function8; + template + class function9; + template + class function10; +} + +#endif diff --git a/ThirdParty/boost-Subset/boost/function/function_template.hpp b/ThirdParty/boost-Subset/boost/function/function_template.hpp new file mode 100644 index 0000000000..211b81dbe3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/function/function_template.hpp @@ -0,0 +1,1190 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2001-2006 +// Copyright Emil Dotchevski 2007 +// Use, modification and distribution is subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +// Note: this header is a header template and must NOT have multiple-inclusion +// protection. +#include +#include + +#if defined(BOOST_MSVC) +# pragma warning( push ) +# pragma warning( disable : 4127 ) // "conditional expression is constant" +#endif + +#define BOOST_FUNCTION_TEMPLATE_PARMS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, typename T) + +#define BOOST_FUNCTION_TEMPLATE_ARGS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, T) + +#define BOOST_FUNCTION_PARM(J,I,D) BOOST_PP_CAT(T,I) BOOST_PP_CAT(a,I) + +#define BOOST_FUNCTION_PARMS BOOST_PP_ENUM(BOOST_FUNCTION_NUM_ARGS,BOOST_FUNCTION_PARM,BOOST_PP_EMPTY) + +#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES +# define BOOST_FUNCTION_ARGS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, a) +#else +# include +# define BOOST_FUNCTION_ARG(J,I,D) ::boost::forward< BOOST_PP_CAT(T,I) >(BOOST_PP_CAT(a,I)) +# define BOOST_FUNCTION_ARGS BOOST_PP_ENUM(BOOST_FUNCTION_NUM_ARGS,BOOST_FUNCTION_ARG,BOOST_PP_EMPTY) +#endif + +#define BOOST_FUNCTION_ARG_TYPE(J,I,D) \ + typedef BOOST_PP_CAT(T,I) BOOST_PP_CAT(BOOST_PP_CAT(arg, BOOST_PP_INC(I)),_type); + +#define BOOST_FUNCTION_ARG_TYPES BOOST_PP_REPEAT(BOOST_FUNCTION_NUM_ARGS,BOOST_FUNCTION_ARG_TYPE,BOOST_PP_EMPTY) + +// Comma if nonzero number of arguments +#if BOOST_FUNCTION_NUM_ARGS == 0 +# define BOOST_FUNCTION_COMMA +#else +# define BOOST_FUNCTION_COMMA , +#endif // BOOST_FUNCTION_NUM_ARGS > 0 + +// Class names used in this version of the code +#define BOOST_FUNCTION_FUNCTION BOOST_JOIN(function,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_FUNCTION_INVOKER \ + BOOST_JOIN(function_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_VOID_FUNCTION_INVOKER \ + BOOST_JOIN(void_function_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_FUNCTION_OBJ_INVOKER \ + BOOST_JOIN(function_obj_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER \ + BOOST_JOIN(void_function_obj_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_FUNCTION_REF_INVOKER \ + BOOST_JOIN(function_ref_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER \ + BOOST_JOIN(void_function_ref_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_MEMBER_INVOKER \ + BOOST_JOIN(function_mem_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_VOID_MEMBER_INVOKER \ + BOOST_JOIN(function_void_mem_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_GET_FUNCTION_INVOKER \ + BOOST_JOIN(get_function_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER \ + BOOST_JOIN(get_function_obj_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER \ + BOOST_JOIN(get_function_ref_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_GET_MEMBER_INVOKER \ + BOOST_JOIN(get_member_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_GET_INVOKER \ + BOOST_JOIN(get_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_VTABLE BOOST_JOIN(basic_vtable,BOOST_FUNCTION_NUM_ARGS) + +#ifndef BOOST_NO_VOID_RETURNS +# define BOOST_FUNCTION_VOID_RETURN_TYPE void +# define BOOST_FUNCTION_RETURN(X) X +#else +# define BOOST_FUNCTION_VOID_RETURN_TYPE boost::detail::function::unusable +# define BOOST_FUNCTION_RETURN(X) X; return BOOST_FUNCTION_VOID_RETURN_TYPE () +#endif + +namespace boost { + namespace detail { + namespace function { + template< + typename FunctionPtr, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_FUNCTION_INVOKER + { + static R invoke(function_buffer& function_ptr BOOST_FUNCTION_COMMA + BOOST_FUNCTION_PARMS) + { + FunctionPtr f = reinterpret_cast(function_ptr.func_ptr); + return f(BOOST_FUNCTION_ARGS); + } + }; + + template< + typename FunctionPtr, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_VOID_FUNCTION_INVOKER + { + static BOOST_FUNCTION_VOID_RETURN_TYPE + invoke(function_buffer& function_ptr BOOST_FUNCTION_COMMA + BOOST_FUNCTION_PARMS) + + { + FunctionPtr f = reinterpret_cast(function_ptr.func_ptr); + BOOST_FUNCTION_RETURN(f(BOOST_FUNCTION_ARGS)); + } + }; + + template< + typename FunctionObj, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_FUNCTION_OBJ_INVOKER + { + static R invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA + BOOST_FUNCTION_PARMS) + + { + FunctionObj* f; + if (function_allows_small_object_optimization::value) + f = reinterpret_cast(&function_obj_ptr.data); + else + f = reinterpret_cast(function_obj_ptr.obj_ptr); + return (*f)(BOOST_FUNCTION_ARGS); + } + }; + + template< + typename FunctionObj, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER + { + static BOOST_FUNCTION_VOID_RETURN_TYPE + invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA + BOOST_FUNCTION_PARMS) + + { + FunctionObj* f; + if (function_allows_small_object_optimization::value) + f = reinterpret_cast(&function_obj_ptr.data); + else + f = reinterpret_cast(function_obj_ptr.obj_ptr); + BOOST_FUNCTION_RETURN((*f)(BOOST_FUNCTION_ARGS)); + } + }; + + template< + typename FunctionObj, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_FUNCTION_REF_INVOKER + { + static R invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA + BOOST_FUNCTION_PARMS) + + { + FunctionObj* f = + reinterpret_cast(function_obj_ptr.obj_ptr); + return (*f)(BOOST_FUNCTION_ARGS); + } + }; + + template< + typename FunctionObj, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER + { + static BOOST_FUNCTION_VOID_RETURN_TYPE + invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA + BOOST_FUNCTION_PARMS) + + { + FunctionObj* f = + reinterpret_cast(function_obj_ptr.obj_ptr); + BOOST_FUNCTION_RETURN((*f)(BOOST_FUNCTION_ARGS)); + } + }; + +#if BOOST_FUNCTION_NUM_ARGS > 0 + /* Handle invocation of member pointers. */ + template< + typename MemberPtr, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_MEMBER_INVOKER + { + static R invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA + BOOST_FUNCTION_PARMS) + + { + MemberPtr* f = + reinterpret_cast(&function_obj_ptr.data); + return boost::mem_fn(*f)(BOOST_FUNCTION_ARGS); + } + }; + + template< + typename MemberPtr, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_VOID_MEMBER_INVOKER + { + static BOOST_FUNCTION_VOID_RETURN_TYPE + invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA + BOOST_FUNCTION_PARMS) + + { + MemberPtr* f = + reinterpret_cast(&function_obj_ptr.data); + BOOST_FUNCTION_RETURN(boost::mem_fn(*f)(BOOST_FUNCTION_ARGS)); + } + }; +#endif + + template< + typename FunctionPtr, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_GET_FUNCTION_INVOKER + { + typedef typename mpl::if_c<(is_void::value), + BOOST_FUNCTION_VOID_FUNCTION_INVOKER< + FunctionPtr, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >, + BOOST_FUNCTION_FUNCTION_INVOKER< + FunctionPtr, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + > + >::type type; + }; + + template< + typename FunctionObj, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER + { + typedef typename mpl::if_c<(is_void::value), + BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER< + FunctionObj, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >, + BOOST_FUNCTION_FUNCTION_OBJ_INVOKER< + FunctionObj, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + > + >::type type; + }; + + template< + typename FunctionObj, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER + { + typedef typename mpl::if_c<(is_void::value), + BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER< + FunctionObj, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >, + BOOST_FUNCTION_FUNCTION_REF_INVOKER< + FunctionObj, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + > + >::type type; + }; + +#if BOOST_FUNCTION_NUM_ARGS > 0 + /* Retrieve the appropriate invoker for a member pointer. */ + template< + typename MemberPtr, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_GET_MEMBER_INVOKER + { + typedef typename mpl::if_c<(is_void::value), + BOOST_FUNCTION_VOID_MEMBER_INVOKER< + MemberPtr, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >, + BOOST_FUNCTION_MEMBER_INVOKER< + MemberPtr, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + > + >::type type; + }; +#endif + + /* Given the tag returned by get_function_tag, retrieve the + actual invoker that will be used for the given function + object. + + Each specialization contains an "apply" nested class template + that accepts the function object, return type, function + argument types, and allocator. The resulting "apply" class + contains two typedefs, "invoker_type" and "manager_type", + which correspond to the invoker and manager types. */ + template + struct BOOST_FUNCTION_GET_INVOKER { }; + + /* Retrieve the invoker for a function pointer. */ + template<> + struct BOOST_FUNCTION_GET_INVOKER + { + template + struct apply + { + typedef typename BOOST_FUNCTION_GET_FUNCTION_INVOKER< + FunctionPtr, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >::type + invoker_type; + + typedef functor_manager manager_type; + }; + + template + struct apply_a + { + typedef typename BOOST_FUNCTION_GET_FUNCTION_INVOKER< + FunctionPtr, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >::type + invoker_type; + + typedef functor_manager manager_type; + }; + }; + +#if BOOST_FUNCTION_NUM_ARGS > 0 + /* Retrieve the invoker for a member pointer. */ + template<> + struct BOOST_FUNCTION_GET_INVOKER + { + template + struct apply + { + typedef typename BOOST_FUNCTION_GET_MEMBER_INVOKER< + MemberPtr, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >::type + invoker_type; + + typedef functor_manager manager_type; + }; + + template + struct apply_a + { + typedef typename BOOST_FUNCTION_GET_MEMBER_INVOKER< + MemberPtr, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >::type + invoker_type; + + typedef functor_manager manager_type; + }; + }; +#endif + + /* Retrieve the invoker for a function object. */ + template<> + struct BOOST_FUNCTION_GET_INVOKER + { + template + struct apply + { + typedef typename BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER< + FunctionObj, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >::type + invoker_type; + + typedef functor_manager manager_type; + }; + + template + struct apply_a + { + typedef typename BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER< + FunctionObj, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >::type + invoker_type; + + typedef functor_manager_a manager_type; + }; + }; + + /* Retrieve the invoker for a reference to a function object. */ + template<> + struct BOOST_FUNCTION_GET_INVOKER + { + template + struct apply + { + typedef typename BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER< + typename RefWrapper::type, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >::type + invoker_type; + + typedef reference_manager manager_type; + }; + + template + struct apply_a + { + typedef typename BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER< + typename RefWrapper::type, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >::type + invoker_type; + + typedef reference_manager manager_type; + }; + }; + + + /** + * vtable for a specific boost::function instance. This + * structure must be an aggregate so that we can use static + * initialization in boost::function's assign_to and assign_to_a + * members. It therefore cannot have any constructors, + * destructors, base classes, etc. + */ + template + struct BOOST_FUNCTION_VTABLE + { +#ifndef BOOST_NO_VOID_RETURNS + typedef R result_type; +#else + typedef typename function_return_type::type result_type; +#endif // BOOST_NO_VOID_RETURNS + + typedef result_type (*invoker_type)(function_buffer& + BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS); + + template + bool assign_to(F f, function_buffer& functor) const + { + typedef typename get_function_tag::type tag; + return assign_to(f, functor, tag()); + } + template + bool assign_to_a(F f, function_buffer& functor, Allocator a) const + { + typedef typename get_function_tag::type tag; + return assign_to_a(f, functor, a, tag()); + } + + void clear(function_buffer& functor) const + { + if (base.manager) + base.manager(functor, functor, destroy_functor_tag); + } + + private: + // Function pointers + template + bool + assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag) const + { + this->clear(functor); + if (f) { + // should be a reinterpret cast, but some compilers insist + // on giving cv-qualifiers to free functions + functor.func_ptr = reinterpret_cast(f); + return true; + } else { + return false; + } + } + template + bool + assign_to_a(FunctionPtr f, function_buffer& functor, Allocator, function_ptr_tag) const + { + return assign_to(f,functor,function_ptr_tag()); + } + + // Member pointers +#if BOOST_FUNCTION_NUM_ARGS > 0 + template + bool assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag) const + { + // DPG TBD: Add explicit support for member function + // objects, so we invoke through mem_fn() but we retain the + // right target_type() values. + if (f) { + this->assign_to(boost::mem_fn(f), functor); + return true; + } else { + return false; + } + } + template + bool assign_to_a(MemberPtr f, function_buffer& functor, Allocator a, member_ptr_tag) const + { + // DPG TBD: Add explicit support for member function + // objects, so we invoke through mem_fn() but we retain the + // right target_type() values. + if (f) { + this->assign_to_a(boost::mem_fn(f), functor, a); + return true; + } else { + return false; + } + } +#endif // BOOST_FUNCTION_NUM_ARGS > 0 + + // Function objects + // Assign to a function object using the small object optimization + template + void + assign_functor(FunctionObj f, function_buffer& functor, mpl::true_) const + { + new (reinterpret_cast(&functor.data)) FunctionObj(f); + } + template + void + assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, mpl::true_) const + { + assign_functor(f,functor,mpl::true_()); + } + + // Assign to a function object allocated on the heap. + template + void + assign_functor(FunctionObj f, function_buffer& functor, mpl::false_) const + { + functor.obj_ptr = new FunctionObj(f); + } + template + void + assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, mpl::false_) const + { + typedef functor_wrapper functor_wrapper_type; + typedef typename Allocator::template rebind::other + wrapper_allocator_type; + typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type; + wrapper_allocator_type wrapper_allocator(a); + wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1); + wrapper_allocator.construct(copy, functor_wrapper_type(f,a)); + functor_wrapper_type* new_f = static_cast(copy); + functor.obj_ptr = new_f; + } + + template + bool + assign_to(FunctionObj f, function_buffer& functor, function_obj_tag) const + { + if (!boost::detail::function::has_empty_target(boost::addressof(f))) { + assign_functor(f, functor, + mpl::bool_<(function_allows_small_object_optimization::value)>()); + return true; + } else { + return false; + } + } + template + bool + assign_to_a(FunctionObj f, function_buffer& functor, Allocator a, function_obj_tag) const + { + if (!boost::detail::function::has_empty_target(boost::addressof(f))) { + assign_functor_a(f, functor, a, + mpl::bool_<(function_allows_small_object_optimization::value)>()); + return true; + } else { + return false; + } + } + + // Reference to a function object + template + bool + assign_to(const reference_wrapper& f, + function_buffer& functor, function_obj_ref_tag) const + { + functor.obj_ref.obj_ptr = (void *)(f.get_pointer()); + functor.obj_ref.is_const_qualified = is_const::value; + functor.obj_ref.is_volatile_qualified = is_volatile::value; + return true; + } + template + bool + assign_to_a(const reference_wrapper& f, + function_buffer& functor, Allocator, function_obj_ref_tag) const + { + return assign_to(f,functor,function_obj_ref_tag()); + } + + public: + vtable_base base; + invoker_type invoker; + }; + } // end namespace function + } // end namespace detail + + template< + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + class BOOST_FUNCTION_FUNCTION : public function_base + +#if BOOST_FUNCTION_NUM_ARGS == 1 + + , public std::unary_function + +#elif BOOST_FUNCTION_NUM_ARGS == 2 + + , public std::binary_function + +#endif + + { + public: +#ifndef BOOST_NO_VOID_RETURNS + typedef R result_type; +#else + typedef typename boost::detail::function::function_return_type::type + result_type; +#endif // BOOST_NO_VOID_RETURNS + + private: + typedef boost::detail::function::BOOST_FUNCTION_VTABLE< + R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS> + vtable_type; + + vtable_type* get_vtable() const { + return reinterpret_cast( + reinterpret_cast(vtable) & ~static_cast(0x01)); + } + + struct clear_type {}; + + public: + BOOST_STATIC_CONSTANT(int, args = BOOST_FUNCTION_NUM_ARGS); + + // add signature for boost::lambda + template + struct sig + { + typedef result_type type; + }; + +#if BOOST_FUNCTION_NUM_ARGS == 1 + typedef T0 argument_type; +#elif BOOST_FUNCTION_NUM_ARGS == 2 + typedef T0 first_argument_type; + typedef T1 second_argument_type; +#endif + + BOOST_STATIC_CONSTANT(int, arity = BOOST_FUNCTION_NUM_ARGS); + BOOST_FUNCTION_ARG_TYPES + + typedef BOOST_FUNCTION_FUNCTION self_type; + + BOOST_FUNCTION_FUNCTION() : function_base() { } + + // MSVC chokes if the following two constructors are collapsed into + // one with a default parameter. + template + BOOST_FUNCTION_FUNCTION(Functor BOOST_FUNCTION_TARGET_FIX(const &) f +#ifndef BOOST_NO_SFINAE + ,typename boost::enable_if_c< + !(is_integral::value), + int>::type = 0 +#endif // BOOST_NO_SFINAE + ) : + function_base() + { + this->assign_to(f); + } + template + BOOST_FUNCTION_FUNCTION(Functor BOOST_FUNCTION_TARGET_FIX(const &) f, Allocator a +#ifndef BOOST_NO_SFINAE + ,typename boost::enable_if_c< + !(is_integral::value), + int>::type = 0 +#endif // BOOST_NO_SFINAE + ) : + function_base() + { + this->assign_to_a(f,a); + } + +#ifndef BOOST_NO_SFINAE + BOOST_FUNCTION_FUNCTION(clear_type*) : function_base() { } +#else + BOOST_FUNCTION_FUNCTION(int zero) : function_base() + { + BOOST_ASSERT(zero == 0); + } +#endif + + BOOST_FUNCTION_FUNCTION(const BOOST_FUNCTION_FUNCTION& f) : function_base() + { + this->assign_to_own(f); + } + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + BOOST_FUNCTION_FUNCTION(BOOST_FUNCTION_FUNCTION&& f) : function_base() + { + this->move_assign(f); + } +#endif + + ~BOOST_FUNCTION_FUNCTION() { clear(); } + + result_type operator()(BOOST_FUNCTION_PARMS) const + { + if (this->empty()) + boost::throw_exception(bad_function_call()); + + return get_vtable()->invoker + (this->functor BOOST_FUNCTION_COMMA BOOST_FUNCTION_ARGS); + } + + // The distinction between when to use BOOST_FUNCTION_FUNCTION and + // when to use self_type is obnoxious. MSVC cannot handle self_type as + // the return type of these assignment operators, but Borland C++ cannot + // handle BOOST_FUNCTION_FUNCTION as the type of the temporary to + // construct. + template +#ifndef BOOST_NO_SFINAE + typename boost::enable_if_c< + !(is_integral::value), + BOOST_FUNCTION_FUNCTION&>::type +#else + BOOST_FUNCTION_FUNCTION& +#endif + operator=(Functor BOOST_FUNCTION_TARGET_FIX(const &) f) + { + this->clear(); + BOOST_TRY { + this->assign_to(f); + } BOOST_CATCH (...) { + vtable = 0; + BOOST_RETHROW; + } + BOOST_CATCH_END + return *this; + } + template + void assign(Functor BOOST_FUNCTION_TARGET_FIX(const &) f, Allocator a) + { + this->clear(); + BOOST_TRY{ + this->assign_to_a(f,a); + } BOOST_CATCH (...) { + vtable = 0; + BOOST_RETHROW; + } + BOOST_CATCH_END + } + +#ifndef BOOST_NO_SFINAE + BOOST_FUNCTION_FUNCTION& operator=(clear_type*) + { + this->clear(); + return *this; + } +#else + BOOST_FUNCTION_FUNCTION& operator=(int zero) + { + BOOST_ASSERT(zero == 0); + this->clear(); + return *this; + } +#endif + + // Assignment from another BOOST_FUNCTION_FUNCTION + BOOST_FUNCTION_FUNCTION& operator=(const BOOST_FUNCTION_FUNCTION& f) + { + if (&f == this) + return *this; + + this->clear(); + BOOST_TRY { + this->assign_to_own(f); + } BOOST_CATCH (...) { + vtable = 0; + BOOST_RETHROW; + } + BOOST_CATCH_END + return *this; + } + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + // Move assignment from another BOOST_FUNCTION_FUNCTION + BOOST_FUNCTION_FUNCTION& operator=(BOOST_FUNCTION_FUNCTION&& f) + { + + if (&f == this) + return *this; + + this->clear(); + BOOST_TRY { + this->move_assign(f); + } BOOST_CATCH (...) { + vtable = 0; + BOOST_RETHROW; + } + BOOST_CATCH_END + return *this; + } +#endif + + void swap(BOOST_FUNCTION_FUNCTION& other) + { + if (&other == this) + return; + + BOOST_FUNCTION_FUNCTION tmp; + tmp.move_assign(*this); + this->move_assign(other); + other.move_assign(tmp); + } + + // Clear out a target, if there is one + void clear() + { + if (vtable) { + if (!this->has_trivial_copy_and_destroy()) + get_vtable()->clear(this->functor); + vtable = 0; + } + } + +#if (defined __SUNPRO_CC) && (__SUNPRO_CC <= 0x530) && !(defined BOOST_NO_COMPILER_CONFIG) + // Sun C++ 5.3 can't handle the safe_bool idiom, so don't use it + operator bool () const { return !this->empty(); } +#else + private: + struct dummy { + void nonnull() {} + }; + + typedef void (dummy::*safe_bool)(); + + public: + operator safe_bool () const + { return (this->empty())? 0 : &dummy::nonnull; } + + bool operator!() const + { return this->empty(); } +#endif + + private: + void assign_to_own(const BOOST_FUNCTION_FUNCTION& f) + { + if (!f.empty()) { + this->vtable = f.vtable; + if (this->has_trivial_copy_and_destroy()) + this->functor = f.functor; + else + get_vtable()->base.manager(f.functor, this->functor, + boost::detail::function::clone_functor_tag); + } + } + + template + void assign_to(Functor f) + { + using boost::detail::function::vtable_base; + + typedef typename boost::detail::function::get_function_tag::type tag; + typedef boost::detail::function::BOOST_FUNCTION_GET_INVOKER get_invoker; + typedef typename get_invoker:: + template apply + handler_type; + + typedef typename handler_type::invoker_type invoker_type; + typedef typename handler_type::manager_type manager_type; + + // Note: it is extremely important that this initialization use + // static initialization. Otherwise, we will have a race + // condition here in multi-threaded code. See + // http://thread.gmane.org/gmane.comp.lib.boost.devel/164902/. + static const vtable_type stored_vtable = + { { &manager_type::manage }, &invoker_type::invoke }; + + if (stored_vtable.assign_to(f, functor)) { + std::size_t value = reinterpret_cast(&stored_vtable.base); + // coverity[pointless_expression]: suppress coverity warnings on apparant if(const). + if (boost::has_trivial_copy_constructor::value && + boost::has_trivial_destructor::value && + boost::detail::function::function_allows_small_object_optimization::value) + value |= static_cast(0x01); + vtable = reinterpret_cast(value); + } else + vtable = 0; + } + + template + void assign_to_a(Functor f,Allocator a) + { + using boost::detail::function::vtable_base; + + typedef typename boost::detail::function::get_function_tag::type tag; + typedef boost::detail::function::BOOST_FUNCTION_GET_INVOKER get_invoker; + typedef typename get_invoker:: + template apply_a + handler_type; + + typedef typename handler_type::invoker_type invoker_type; + typedef typename handler_type::manager_type manager_type; + + // Note: it is extremely important that this initialization use + // static initialization. Otherwise, we will have a race + // condition here in multi-threaded code. See + // http://thread.gmane.org/gmane.comp.lib.boost.devel/164902/. + static const vtable_type stored_vtable = + { { &manager_type::manage }, &invoker_type::invoke }; + + if (stored_vtable.assign_to_a(f, functor, a)) { + std::size_t value = reinterpret_cast(&stored_vtable.base); + // coverity[pointless_expression]: suppress coverity warnings on apparant if(const). + if (boost::has_trivial_copy_constructor::value && + boost::has_trivial_destructor::value && + boost::detail::function::function_allows_small_object_optimization::value) + value |= static_cast(0x01); + vtable = reinterpret_cast(value); + } else + vtable = 0; + } + + // Moves the value from the specified argument to *this. If the argument + // has its function object allocated on the heap, move_assign will pass + // its buffer to *this, and set the argument's buffer pointer to NULL. + void move_assign(BOOST_FUNCTION_FUNCTION& f) + { + if (&f == this) + return; + + BOOST_TRY { + if (!f.empty()) { + this->vtable = f.vtable; + if (this->has_trivial_copy_and_destroy()) + this->functor = f.functor; + else + get_vtable()->base.manager(f.functor, this->functor, + boost::detail::function::move_functor_tag); + f.vtable = 0; + } else { + clear(); + } + } BOOST_CATCH (...) { + vtable = 0; + BOOST_RETHROW; + } + BOOST_CATCH_END + } + }; + + template + inline void swap(BOOST_FUNCTION_FUNCTION< + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >& f1, + BOOST_FUNCTION_FUNCTION< + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >& f2) + { + f1.swap(f2); + } + +// Poison comparisons between boost::function objects of the same type. +template + void operator==(const BOOST_FUNCTION_FUNCTION< + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS>&, + const BOOST_FUNCTION_FUNCTION< + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS>&); +template + void operator!=(const BOOST_FUNCTION_FUNCTION< + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS>&, + const BOOST_FUNCTION_FUNCTION< + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS>& ); + +#if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX) + +#if BOOST_FUNCTION_NUM_ARGS == 0 +#define BOOST_FUNCTION_PARTIAL_SPEC R (void) +#else +#define BOOST_FUNCTION_PARTIAL_SPEC R (BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS,T)) +#endif + +template +class function + : public BOOST_FUNCTION_FUNCTION +{ + typedef BOOST_FUNCTION_FUNCTION base_type; + typedef function self_type; + + struct clear_type {}; + +public: + + function() : base_type() {} + + template + function(Functor f +#ifndef BOOST_NO_SFINAE + ,typename boost::enable_if_c< + !(is_integral::value), + int>::type = 0 +#endif + ) : + base_type(f) + { + } + template + function(Functor f, Allocator a +#ifndef BOOST_NO_SFINAE + ,typename boost::enable_if_c< + !(is_integral::value), + int>::type = 0 +#endif + ) : + base_type(f,a) + { + } + +#ifndef BOOST_NO_SFINAE + function(clear_type*) : base_type() {} +#endif + + function(const self_type& f) : base_type(static_cast(f)){} + + function(const base_type& f) : base_type(static_cast(f)){} + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + // Move constructors + function(self_type&& f): base_type(static_cast(f)){} + function(base_type&& f): base_type(static_cast(f)){} +#endif + + self_type& operator=(const self_type& f) + { + self_type(f).swap(*this); + return *this; + } + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + self_type& operator=(self_type&& f) + { + self_type(static_cast(f)).swap(*this); + return *this; + } +#endif + + template +#ifndef BOOST_NO_SFINAE + typename boost::enable_if_c< + !(is_integral::value), + self_type&>::type +#else + self_type& +#endif + operator=(Functor f) + { + self_type(f).swap(*this); + return *this; + } + +#ifndef BOOST_NO_SFINAE + self_type& operator=(clear_type*) + { + this->clear(); + return *this; + } +#endif + + self_type& operator=(const base_type& f) + { + self_type(f).swap(*this); + return *this; + } + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + self_type& operator=(base_type&& f) + { + self_type(static_cast(f)).swap(*this); + return *this; + } +#endif +}; + +#undef BOOST_FUNCTION_PARTIAL_SPEC +#endif // have partial specialization + +} // end namespace boost + +// Cleanup after ourselves... +#undef BOOST_FUNCTION_VTABLE +#undef BOOST_FUNCTION_COMMA +#undef BOOST_FUNCTION_FUNCTION +#undef BOOST_FUNCTION_FUNCTION_INVOKER +#undef BOOST_FUNCTION_VOID_FUNCTION_INVOKER +#undef BOOST_FUNCTION_FUNCTION_OBJ_INVOKER +#undef BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER +#undef BOOST_FUNCTION_FUNCTION_REF_INVOKER +#undef BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER +#undef BOOST_FUNCTION_MEMBER_INVOKER +#undef BOOST_FUNCTION_VOID_MEMBER_INVOKER +#undef BOOST_FUNCTION_GET_FUNCTION_INVOKER +#undef BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER +#undef BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER +#undef BOOST_FUNCTION_GET_MEM_FUNCTION_INVOKER +#undef BOOST_FUNCTION_GET_INVOKER +#undef BOOST_FUNCTION_TEMPLATE_PARMS +#undef BOOST_FUNCTION_TEMPLATE_ARGS +#undef BOOST_FUNCTION_PARMS +#undef BOOST_FUNCTION_PARM +#ifdef BOOST_FUNCTION_ARG +# undef BOOST_FUNCTION_ARG +#endif +#undef BOOST_FUNCTION_ARGS +#undef BOOST_FUNCTION_ARG_TYPE +#undef BOOST_FUNCTION_ARG_TYPES +#undef BOOST_FUNCTION_VOID_RETURN_TYPE +#undef BOOST_FUNCTION_RETURN + +#if defined(BOOST_MSVC) +# pragma warning( pop ) +#endif diff --git a/ThirdParty/boost-Subset/boost/function_equal.hpp b/ThirdParty/boost-Subset/boost/function_equal.hpp new file mode 100644 index 0000000000..2d76c75bc9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/function_equal.hpp @@ -0,0 +1,28 @@ +// Copyright Douglas Gregor 2004. +// Copyright 2005 Peter Dimov + +// Use, modification and distribution is subject to +// the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org +#ifndef BOOST_FUNCTION_EQUAL_HPP +#define BOOST_FUNCTION_EQUAL_HPP + +namespace boost { + +template + bool function_equal_impl(const F& f, const G& g, long) + { return f == g; } + +// function_equal_impl needs to be unqualified to pick +// user overloads on two-phase compilers + +template + bool function_equal(const F& f, const G& g) + { return function_equal_impl(f, g, 0); } + +} // end namespace boost + +#endif // BOOST_FUNCTION_EQUAL_HPP diff --git a/ThirdParty/boost-Subset/boost/functional/hash.hpp b/ThirdParty/boost-Subset/boost/functional/hash.hpp new file mode 100644 index 0000000000..44983f19b2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/functional/hash.hpp @@ -0,0 +1,7 @@ + +// Copyright 2005-2009 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include + diff --git a/ThirdParty/boost-Subset/boost/functional/hash/detail/float_functions.hpp b/ThirdParty/boost-Subset/boost/functional/hash/detail/float_functions.hpp new file mode 100644 index 0000000000..f3db52f9cc --- /dev/null +++ b/ThirdParty/boost-Subset/boost/functional/hash/detail/float_functions.hpp @@ -0,0 +1,336 @@ + +// Copyright 2005-2009 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_FLOAT_FUNCTIONS_HPP) +#define BOOST_FUNCTIONAL_HASH_DETAIL_FLOAT_FUNCTIONS_HPP + +#include +#if defined(BOOST_HAS_PRAGMA_ONCE) +#pragma once +#endif + +#include + +// Set BOOST_HASH_CONFORMANT_FLOATS to 1 for libraries known to have +// sufficiently good floating point support to not require any +// workarounds. +// +// When set to 0, the library tries to automatically +// use the best available implementation. This normally works well, but +// breaks when ambiguities are created by odd namespacing of the functions. +// +// Note that if this is set to 0, the library should still take full +// advantage of the platform's floating point support. + +#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) +# define BOOST_HASH_CONFORMANT_FLOATS 0 +#elif defined(__LIBCOMO__) +# define BOOST_HASH_CONFORMANT_FLOATS 0 +#elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER) +// Rogue Wave library: +# define BOOST_HASH_CONFORMANT_FLOATS 0 +#elif defined(_LIBCPP_VERSION) +// libc++ +# define BOOST_HASH_CONFORMANT_FLOATS 1 +#elif defined(__GLIBCPP__) || defined(__GLIBCXX__) +// GNU libstdc++ 3 +# if defined(__GNUC__) && __GNUC__ >= 4 +# define BOOST_HASH_CONFORMANT_FLOATS 1 +# else +# define BOOST_HASH_CONFORMANT_FLOATS 0 +# endif +#elif defined(__STL_CONFIG_H) +// generic SGI STL +# define BOOST_HASH_CONFORMANT_FLOATS 0 +#elif defined(__MSL_CPP__) +// MSL standard lib: +# define BOOST_HASH_CONFORMANT_FLOATS 0 +#elif defined(__IBMCPP__) +// VACPP std lib (probably conformant for much earlier version). +# if __IBMCPP__ >= 1210 +# define BOOST_HASH_CONFORMANT_FLOATS 1 +# else +# define BOOST_HASH_CONFORMANT_FLOATS 0 +# endif +#elif defined(MSIPL_COMPILE_H) +// Modena C++ standard library +# define BOOST_HASH_CONFORMANT_FLOATS 0 +#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER) +// Dinkumware Library (this has to appear after any possible replacement libraries): +# if _CPPLIB_VER >= 405 +# define BOOST_HASH_CONFORMANT_FLOATS 1 +# else +# define BOOST_HASH_CONFORMANT_FLOATS 0 +# endif +#else +# define BOOST_HASH_CONFORMANT_FLOATS 0 +#endif + +#if BOOST_HASH_CONFORMANT_FLOATS + +// The standard library is known to be compliant, so don't use the +// configuration mechanism. + +namespace boost { + namespace hash_detail { + template + struct call_ldexp { + typedef Float float_type; + inline Float operator()(Float x, int y) const { + return std::ldexp(x, y); + } + }; + + template + struct call_frexp { + typedef Float float_type; + inline Float operator()(Float x, int* y) const { + return std::frexp(x, y); + } + }; + + template + struct select_hash_type + { + typedef Float type; + }; + } +} + +#else // BOOST_HASH_CONFORMANT_FLOATS == 0 + +// The C++ standard requires that the C float functions are overloarded +// for float, double and long double in the std namespace, but some of the older +// library implementations don't support this. On some that don't, the C99 +// float functions (frexpf, frexpl, etc.) are available. +// +// The following tries to automatically detect which are available. + +namespace boost { + namespace hash_detail { + + // Returned by dummy versions of the float functions. + + struct not_found { + // Implicitly convertible to float and long double in order to avoid + // a compile error when the dummy float functions are used. + + inline operator float() const { return 0; } + inline operator long double() const { return 0; } + }; + + // A type for detecting the return type of functions. + + template struct is; + template <> struct is { char x[10]; }; + template <> struct is { char x[20]; }; + template <> struct is { char x[30]; }; + template <> struct is { char x[40]; }; + + // Used to convert the return type of a function to a type for sizeof. + + template is float_type(T); + + // call_ldexp + // + // This will get specialized for float and long double + + template struct call_ldexp + { + typedef double float_type; + + inline double operator()(double a, int b) const + { + using namespace std; + return ldexp(a, b); + } + }; + + // call_frexp + // + // This will get specialized for float and long double + + template struct call_frexp + { + typedef double float_type; + + inline double operator()(double a, int* b) const + { + using namespace std; + return frexp(a, b); + } + }; + } +} + +// A namespace for dummy functions to detect when the actual function we want +// isn't available. ldexpl, ldexpf etc. might be added tby the macros below. +// +// AFAICT these have to be outside of the boost namespace, as if they're in +// the boost namespace they'll always be preferable to any other function +// (since the arguments are built in types, ADL can't be used). + +namespace boost_hash_detect_float_functions { + template boost::hash_detail::not_found ldexp(Float, int); + template boost::hash_detail::not_found frexp(Float, int*); +} + +// Macros for generating specializations of call_ldexp and call_frexp. +// +// check_cpp and check_c99 check if the C++ or C99 functions are available. +// +// Then the call_* functions select an appropriate implementation. +// +// I used c99_func in a few places just to get a unique name. +// +// Important: when using 'using namespace' at namespace level, include as +// little as possible in that namespace, as Visual C++ has an odd bug which +// can cause the namespace to be imported at the global level. This seems to +// happen mainly when there's a template in the same namesapce. + +#define BOOST_HASH_CALL_FLOAT_FUNC(cpp_func, c99_func, type1, type2) \ +namespace boost_hash_detect_float_functions { \ + template \ + boost::hash_detail::not_found c99_func(Float, type2); \ +} \ + \ +namespace boost { \ + namespace hash_detail { \ + namespace c99_func##_detect { \ + using namespace std; \ + using namespace boost_hash_detect_float_functions; \ + \ + struct check { \ + static type1 x; \ + static type2 y; \ + BOOST_STATIC_CONSTANT(bool, cpp = \ + sizeof(float_type(cpp_func(x,y))) \ + == sizeof(is)); \ + BOOST_STATIC_CONSTANT(bool, c99 = \ + sizeof(float_type(c99_func(x,y))) \ + == sizeof(is)); \ + }; \ + } \ + \ + template \ + struct call_c99_##c99_func : \ + boost::hash_detail::call_##cpp_func {}; \ + \ + template <> \ + struct call_c99_##c99_func { \ + typedef type1 float_type; \ + \ + template \ + inline type1 operator()(type1 a, T b) const \ + { \ + using namespace std; \ + return c99_func(a, b); \ + } \ + }; \ + \ + template \ + struct call_cpp_##c99_func : \ + call_c99_##c99_func< \ + ::boost::hash_detail::c99_func##_detect::check::c99 \ + > {}; \ + \ + template <> \ + struct call_cpp_##c99_func { \ + typedef type1 float_type; \ + \ + template \ + inline type1 operator()(type1 a, T b) const \ + { \ + using namespace std; \ + return cpp_func(a, b); \ + } \ + }; \ + \ + template <> \ + struct call_##cpp_func : \ + call_cpp_##c99_func< \ + ::boost::hash_detail::c99_func##_detect::check::cpp \ + > {}; \ + } \ +} + +#define BOOST_HASH_CALL_FLOAT_MACRO(cpp_func, c99_func, type1, type2) \ +namespace boost { \ + namespace hash_detail { \ + \ + template <> \ + struct call_##cpp_func { \ + typedef type1 float_type; \ + inline type1 operator()(type1 x, type2 y) const { \ + return c99_func(x, y); \ + } \ + }; \ + } \ +} + +#if defined(ldexpf) +BOOST_HASH_CALL_FLOAT_MACRO(ldexp, ldexpf, float, int) +#else +BOOST_HASH_CALL_FLOAT_FUNC(ldexp, ldexpf, float, int) +#endif + +#if defined(ldexpl) +BOOST_HASH_CALL_FLOAT_MACRO(ldexp, ldexpl, long double, int) +#else +BOOST_HASH_CALL_FLOAT_FUNC(ldexp, ldexpl, long double, int) +#endif + +#if defined(frexpf) +BOOST_HASH_CALL_FLOAT_MACRO(frexp, frexpf, float, int*) +#else +BOOST_HASH_CALL_FLOAT_FUNC(frexp, frexpf, float, int*) +#endif + +#if defined(frexpl) +BOOST_HASH_CALL_FLOAT_MACRO(frexp, frexpl, long double, int*) +#else +BOOST_HASH_CALL_FLOAT_FUNC(frexp, frexpl, long double, int*) +#endif + +#undef BOOST_HASH_CALL_FLOAT_MACRO +#undef BOOST_HASH_CALL_FLOAT_FUNC + + +namespace boost +{ + namespace hash_detail + { + template + struct select_hash_type_impl { + typedef double type; + }; + + template <> + struct select_hash_type_impl { + typedef float type; + }; + + template <> + struct select_hash_type_impl { + typedef long double type; + }; + + + // select_hash_type + // + // If there is support for a particular floating point type, use that + // otherwise use double (there's always support for double). + + template + struct select_hash_type : select_hash_type_impl< + BOOST_DEDUCED_TYPENAME call_ldexp::float_type, + BOOST_DEDUCED_TYPENAME call_frexp::float_type + > {}; + } +} + +#endif // BOOST_HASH_CONFORMANT_FLOATS + +#endif diff --git a/ThirdParty/boost-Subset/boost/functional/hash/detail/hash_float.hpp b/ThirdParty/boost-Subset/boost/functional/hash/detail/hash_float.hpp new file mode 100644 index 0000000000..eb9264f737 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/functional/hash/detail/hash_float.hpp @@ -0,0 +1,271 @@ + +// Copyright 2005-2012 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_HEADER) +#define BOOST_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_HEADER + +#include +#if defined(BOOST_HAS_PRAGMA_ONCE) +#pragma once +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(BOOST_MSVC) +#pragma warning(push) +#if BOOST_MSVC >= 1400 +#pragma warning(disable:6294) // Ill-defined for-loop: initial condition does + // not satisfy test. Loop body not executed +#endif +#endif + +// Can we use fpclassify? + +// STLport +#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) +#define BOOST_HASH_USE_FPCLASSIFY 0 + +// GNU libstdc++ 3 +#elif defined(__GLIBCPP__) || defined(__GLIBCXX__) +# if (defined(__USE_ISOC99) || defined(_GLIBCXX_USE_C99_MATH)) && \ + !(defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) +# define BOOST_HASH_USE_FPCLASSIFY 1 +# else +# define BOOST_HASH_USE_FPCLASSIFY 0 +# endif + +// Everything else +#else +# define BOOST_HASH_USE_FPCLASSIFY 0 +#endif + +namespace boost +{ + namespace hash_detail + { + inline void hash_float_combine(std::size_t& seed, std::size_t value) + { + seed ^= value + (seed<<6) + (seed>>2); + } + + //////////////////////////////////////////////////////////////////////// + // Binary hash function + // + // Only used for floats with known iec559 floats, and certain values in + // numeric_limits + + inline std::size_t hash_binary(char* ptr, std::size_t length) + { + std::size_t seed = 0; + + if (length >= sizeof(std::size_t)) { + std::memcpy(&seed, ptr, sizeof(std::size_t)); + length -= sizeof(std::size_t); + ptr += sizeof(std::size_t); + + while(length >= sizeof(std::size_t)) { + std::size_t buffer = 0; + std::memcpy(&buffer, ptr, sizeof(std::size_t)); + hash_float_combine(seed, buffer); + length -= sizeof(std::size_t); + ptr += sizeof(std::size_t); + } + } + + if (length > 0) { + std::size_t buffer = 0; + std::memcpy(&buffer, ptr, length); + hash_float_combine(seed, buffer); + } + + return seed; + } + + template + struct enable_binary_hash + { + BOOST_STATIC_CONSTANT(bool, value = + std::numeric_limits::is_iec559 && + std::numeric_limits::digits == digits && + std::numeric_limits::radix == 2 && + std::numeric_limits::max_exponent == max_exponent); + }; + + template + inline std::size_t float_hash_impl(Float v, + BOOST_DEDUCED_TYPENAME boost::enable_if_c< + enable_binary_hash::value, + std::size_t>::type) + { + return hash_binary((char*) &v, 4); + } + + + template + inline std::size_t float_hash_impl(Float v, + BOOST_DEDUCED_TYPENAME boost::enable_if_c< + enable_binary_hash::value, + std::size_t>::type) + { + return hash_binary((char*) &v, 8); + } + + template + inline std::size_t float_hash_impl(Float v, + BOOST_DEDUCED_TYPENAME boost::enable_if_c< + enable_binary_hash::value, + std::size_t>::type) + { + return hash_binary((char*) &v, 10); + } + + template + inline std::size_t float_hash_impl(Float v, + BOOST_DEDUCED_TYPENAME boost::enable_if_c< + enable_binary_hash::value, + std::size_t>::type) + { + return hash_binary((char*) &v, 16); + } + + //////////////////////////////////////////////////////////////////////// + // Portable hash function + // + // Used as a fallback when the binary hash function isn't supported. + + template + inline std::size_t float_hash_impl2(T v) + { + boost::hash_detail::call_frexp frexp; + boost::hash_detail::call_ldexp ldexp; + + int exp = 0; + + v = frexp(v, &exp); + + // A postive value is easier to hash, so combine the + // sign with the exponent and use the absolute value. + if(v < 0) { + v = -v; + exp += limits::max_exponent - + limits::min_exponent; + } + + v = ldexp(v, limits::digits); + std::size_t seed = static_cast(v); + v -= static_cast(seed); + + // ceiling(digits(T) * log2(radix(T))/ digits(size_t)) - 1; + std::size_t const length + = (limits::digits * + boost::static_log2::radix>::value + + limits::digits - 1) + / limits::digits; + + for(std::size_t i = 0; i != length; ++i) + { + v = ldexp(v, limits::digits); + std::size_t part = static_cast(v); + v -= static_cast(part); + hash_float_combine(seed, part); + } + + hash_float_combine(seed, exp); + + return seed; + } + +#if !defined(BOOST_HASH_DETAIL_TEST_WITHOUT_GENERIC) + template + inline std::size_t float_hash_impl(T v, ...) + { + typedef BOOST_DEDUCED_TYPENAME select_hash_type::type type; + return float_hash_impl2(static_cast(v)); + } +#endif + } +} + +#if BOOST_HASH_USE_FPCLASSIFY + +#include + +namespace boost +{ + namespace hash_detail + { + template + inline std::size_t float_hash_value(T v) + { +#if defined(fpclassify) + switch (fpclassify(v)) +#elif BOOST_HASH_CONFORMANT_FLOATS + switch (std::fpclassify(v)) +#else + using namespace std; + switch (fpclassify(v)) +#endif + { + case FP_ZERO: + return 0; + case FP_INFINITE: + return (std::size_t)(v > 0 ? -1 : -2); + case FP_NAN: + return (std::size_t)(-3); + case FP_NORMAL: + case FP_SUBNORMAL: + return float_hash_impl(v, 0); + default: + BOOST_ASSERT(0); + return 0; + } + } + } +} + +#else // !BOOST_HASH_USE_FPCLASSIFY + +namespace boost +{ + namespace hash_detail + { + template + inline bool is_zero(T v) + { +#if !defined(__GNUC__) + return v == 0; +#else + // GCC's '-Wfloat-equal' will complain about comparing + // v to 0, but because it disables warnings for system + // headers it won't complain if you use std::equal_to to + // compare with 0. Resulting in this silliness: + return std::equal_to()(v, 0); +#endif + } + + template + inline std::size_t float_hash_value(T v) + { + return boost::hash_detail::is_zero(v) ? 0 : float_hash_impl(v, 0); + } + } +} + +#endif // BOOST_HASH_USE_FPCLASSIFY + +#undef BOOST_HASH_USE_FPCLASSIFY + +#if defined(BOOST_MSVC) +#pragma warning(pop) +#endif + +#endif diff --git a/ThirdParty/boost-Subset/boost/functional/hash/detail/limits.hpp b/ThirdParty/boost-Subset/boost/functional/hash/detail/limits.hpp new file mode 100644 index 0000000000..4a971a6ac2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/functional/hash/detail/limits.hpp @@ -0,0 +1,62 @@ + +// Copyright 2005-2009 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// On some platforms std::limits gives incorrect values for long double. +// This tries to work around them. + +#if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_LIMITS_HEADER) +#define BOOST_FUNCTIONAL_HASH_DETAIL_LIMITS_HEADER + +#include +#if defined(BOOST_HAS_PRAGMA_ONCE) +#pragma once +#endif + +#include + +// On OpenBSD, numeric_limits is not reliable for long doubles, but +// the macros defined in are and support long double when STLport +// doesn't. + +#if defined(__OpenBSD__) || defined(_STLP_NO_LONG_DOUBLE) +#include +#endif + +namespace boost +{ + namespace hash_detail + { + template + struct limits : std::numeric_limits {}; + +#if defined(__OpenBSD__) || defined(_STLP_NO_LONG_DOUBLE) + template <> + struct limits + : std::numeric_limits + { + static long double epsilon() { + return LDBL_EPSILON; + } + + static long double (max)() { + return LDBL_MAX; + } + + static long double (min)() { + return LDBL_MIN; + } + + BOOST_STATIC_CONSTANT(int, digits = LDBL_MANT_DIG); + BOOST_STATIC_CONSTANT(int, max_exponent = LDBL_MAX_EXP); + BOOST_STATIC_CONSTANT(int, min_exponent = LDBL_MIN_EXP); +#if defined(_STLP_NO_LONG_DOUBLE) + BOOST_STATIC_CONSTANT(int, radix = FLT_RADIX); +#endif + }; +#endif // __OpenBSD__ + } +} + +#endif diff --git a/ThirdParty/boost-Subset/boost/functional/hash/extensions.hpp b/ThirdParty/boost-Subset/boost/functional/hash/extensions.hpp new file mode 100644 index 0000000000..eafaefe85d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/functional/hash/extensions.hpp @@ -0,0 +1,318 @@ + +// Copyright 2005-2009 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// Based on Peter Dimov's proposal +// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf +// issue 6.18. + +// This implements the extensions to the standard. +// It's undocumented, so you shouldn't use it.... + +#if !defined(BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP) +#define BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP + +#include +#if defined(BOOST_HAS_PRAGMA_ONCE) +#pragma once +#endif + +#include +#include +#include +#include +#include +#include + +#if !defined(BOOST_NO_CXX11_HDR_ARRAY) +# include +#endif + +#if !defined(BOOST_NO_CXX11_HDR_TUPLE) +# include +#endif + +#if !defined(BOOST_NO_CXX11_HDR_MEMORY) +# include +#endif + +#if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) +#include +#endif + +namespace boost +{ + template + std::size_t hash_value(std::pair const&); + template + std::size_t hash_value(std::vector const&); + template + std::size_t hash_value(std::list const& v); + template + std::size_t hash_value(std::deque const& v); + template + std::size_t hash_value(std::set const& v); + template + std::size_t hash_value(std::multiset const& v); + template + std::size_t hash_value(std::map const& v); + template + std::size_t hash_value(std::multimap const& v); + + template + std::size_t hash_value(std::complex const&); + + template + std::size_t hash_value(std::pair const& v) + { + std::size_t seed = 0; + boost::hash_combine(seed, v.first); + boost::hash_combine(seed, v.second); + return seed; + } + + template + std::size_t hash_value(std::vector const& v) + { + return boost::hash_range(v.begin(), v.end()); + } + + template + std::size_t hash_value(std::list const& v) + { + return boost::hash_range(v.begin(), v.end()); + } + + template + std::size_t hash_value(std::deque const& v) + { + return boost::hash_range(v.begin(), v.end()); + } + + template + std::size_t hash_value(std::set const& v) + { + return boost::hash_range(v.begin(), v.end()); + } + + template + std::size_t hash_value(std::multiset const& v) + { + return boost::hash_range(v.begin(), v.end()); + } + + template + std::size_t hash_value(std::map const& v) + { + return boost::hash_range(v.begin(), v.end()); + } + + template + std::size_t hash_value(std::multimap const& v) + { + return boost::hash_range(v.begin(), v.end()); + } + + template + std::size_t hash_value(std::complex const& v) + { + boost::hash hasher; + std::size_t seed = hasher(v.imag()); + seed ^= hasher(v.real()) + (seed<<6) + (seed>>2); + return seed; + } + +#if !defined(BOOST_NO_CXX11_HDR_ARRAY) + template + std::size_t hash_value(std::array const& v) + { + return boost::hash_range(v.begin(), v.end()); + } +#endif + +#if !defined(BOOST_NO_CXX11_HDR_TUPLE) + namespace hash_detail { + template + inline typename boost::enable_if_c<(I == std::tuple_size::value), + void>::type + hash_combine_tuple(std::size_t&, T const&) + { + } + + template + inline typename boost::enable_if_c<(I < std::tuple_size::value), + void>::type + hash_combine_tuple(std::size_t& seed, T const& v) + { + boost::hash_combine(seed, std::get(v)); + boost::hash_detail::hash_combine_tuple(seed, v); + } + + template + inline std::size_t hash_tuple(T const& v) + { + std::size_t seed = 0; + boost::hash_detail::hash_combine_tuple<0>(seed, v); + return seed; + } + } + +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + template + inline std::size_t hash_value(std::tuple const& v) + { + return boost::hash_detail::hash_tuple(v); + } +#else + + inline std::size_t hash_value(std::tuple<> const& v) + { + return boost::hash_detail::hash_tuple(v); + } + +# define BOOST_HASH_TUPLE_F(z, n, _) \ + template< \ + BOOST_PP_ENUM_PARAMS_Z(z, n, typename A) \ + > \ + inline std::size_t hash_value(std::tuple< \ + BOOST_PP_ENUM_PARAMS_Z(z, n, A) \ + > const& v) \ + { \ + return boost::hash_detail::hash_tuple(v); \ + } + + BOOST_PP_REPEAT_FROM_TO(1, 11, BOOST_HASH_TUPLE_F, _) +# undef BOOST_HASH_TUPLE_F +#endif + +#endif + +#if !defined(BOOST_NO_CXX11_SMART_PTR) + template + inline std::size_t hash_value(std::shared_ptr const& x) { + return boost::hash_value(x.get()); + } + + template + inline std::size_t hash_value(std::unique_ptr const& x) { + return boost::hash_value(x.get()); + } +#endif + + // + // call_hash_impl + // + + // On compilers without function template ordering, this deals with arrays. + +#if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) + namespace hash_detail + { + template + struct call_hash_impl + { + template + struct inner + { + static std::size_t call(T const& v) + { + using namespace boost; + return hash_value(v); + } + }; + }; + + template <> + struct call_hash_impl + { + template + struct inner + { + static std::size_t call(Array const& v) + { + const int size = sizeof(v) / sizeof(*v); + return boost::hash_range(v, v + size); + } + }; + }; + + template + struct call_hash + : public call_hash_impl::value> + ::BOOST_NESTED_TEMPLATE inner + { + }; + } +#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING + + // + // boost::hash + // + + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + + template struct hash + : std::unary_function + { +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) + std::size_t operator()(T const& val) const + { + return hash_value(val); + } +#else + std::size_t operator()(T const& val) const + { + return hash_detail::call_hash::call(val); + } +#endif + }; + +#if BOOST_WORKAROUND(__DMC__, <= 0x848) + template struct hash + : std::unary_function + { + std::size_t operator()(const T* val) const + { + return boost::hash_range(val, val+n); + } + }; +#endif + +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + // On compilers without partial specialization, boost::hash + // has already been declared to deal with pointers, so just + // need to supply the non-pointer version of hash_impl. + + namespace hash_detail + { + template + struct hash_impl; + + template <> + struct hash_impl + { + template + struct inner + : std::unary_function + { +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) + std::size_t operator()(T const& val) const + { + return hash_value(val); + } +#else + std::size_t operator()(T const& val) const + { + return hash_detail::call_hash::call(val); + } +#endif + }; + }; + } +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +} + +#endif diff --git a/ThirdParty/boost-Subset/boost/functional/hash/hash.hpp b/ThirdParty/boost-Subset/boost/functional/hash/hash.hpp new file mode 100644 index 0000000000..3e5ab5bcf9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/functional/hash/hash.hpp @@ -0,0 +1,559 @@ + +// Copyright 2005-2014 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// Based on Peter Dimov's proposal +// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf +// issue 6.18. +// +// This also contains public domain code from MurmurHash. From the +// MurmurHash header: + +// MurmurHash3 was written by Austin Appleby, and is placed in the public +// domain. The author hereby disclaims copyright to this source code. + +#if !defined(BOOST_FUNCTIONAL_HASH_HASH_HPP) +#define BOOST_FUNCTIONAL_HASH_HASH_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#include +#endif + +#if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX) +#include +#endif + +#if defined(BOOST_MSVC) +#pragma warning(push) + +#if BOOST_MSVC >= 1400 +#pragma warning(disable:6295) // Ill-defined for-loop : 'unsigned int' values + // are always of range '0' to '4294967295'. + // Loop executes infinitely. +#endif + +#endif + +#if BOOST_WORKAROUND(__GNUC__, < 3) \ + && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) +#define BOOST_HASH_CHAR_TRAITS string_char_traits +#else +#define BOOST_HASH_CHAR_TRAITS char_traits +#endif + +#if defined(_MSC_VER) +# define BOOST_FUNCTIONAL_HASH_ROTL32(x, r) _rotl(x,r) +#else +# define BOOST_FUNCTIONAL_HASH_ROTL32(x, r) (x << r) | (x >> (32 - r)) +#endif + +namespace boost +{ + namespace hash_detail + { + struct enable_hash_value { typedef std::size_t type; }; + + template struct basic_numbers {}; + template struct long_numbers; + template struct ulong_numbers; + template struct float_numbers {}; + + template <> struct basic_numbers : + boost::hash_detail::enable_hash_value {}; + template <> struct basic_numbers : + boost::hash_detail::enable_hash_value {}; + template <> struct basic_numbers : + boost::hash_detail::enable_hash_value {}; + template <> struct basic_numbers : + boost::hash_detail::enable_hash_value {}; + template <> struct basic_numbers : + boost::hash_detail::enable_hash_value {}; + template <> struct basic_numbers : + boost::hash_detail::enable_hash_value {}; + template <> struct basic_numbers : + boost::hash_detail::enable_hash_value {}; + template <> struct basic_numbers : + boost::hash_detail::enable_hash_value {}; + template <> struct basic_numbers : + boost::hash_detail::enable_hash_value {}; + template <> struct basic_numbers : + boost::hash_detail::enable_hash_value {}; + +#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) + template <> struct basic_numbers : + boost::hash_detail::enable_hash_value {}; +#endif + + // long_numbers is defined like this to allow for separate + // specialization for long_long and int128_type, in case + // they conflict. + template struct long_numbers2 {}; + template struct ulong_numbers2 {}; + template struct long_numbers : long_numbers2 {}; + template struct ulong_numbers : ulong_numbers2 {}; + +#if !defined(BOOST_NO_LONG_LONG) + template <> struct long_numbers : + boost::hash_detail::enable_hash_value {}; + template <> struct ulong_numbers : + boost::hash_detail::enable_hash_value {}; +#endif + +#if defined(BOOST_HAS_INT128) + template <> struct long_numbers2 : + boost::hash_detail::enable_hash_value {}; + template <> struct ulong_numbers2 : + boost::hash_detail::enable_hash_value {}; +#endif + + template <> struct float_numbers : + boost::hash_detail::enable_hash_value {}; + template <> struct float_numbers : + boost::hash_detail::enable_hash_value {}; + template <> struct float_numbers : + boost::hash_detail::enable_hash_value {}; + } + + template + typename boost::hash_detail::basic_numbers::type hash_value(T); + template + typename boost::hash_detail::long_numbers::type hash_value(T); + template + typename boost::hash_detail::ulong_numbers::type hash_value(T); + + template + typename boost::enable_if, std::size_t>::type + hash_value(T); + +#if !BOOST_WORKAROUND(__DMC__, <= 0x848) + template std::size_t hash_value(T* const&); +#else + template std::size_t hash_value(T*); +#endif + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) + template< class T, unsigned N > + std::size_t hash_value(const T (&x)[N]); + + template< class T, unsigned N > + std::size_t hash_value(T (&x)[N]); +#endif + + template + std::size_t hash_value( + std::basic_string, A> const&); + + template + typename boost::hash_detail::float_numbers::type hash_value(T); + +#if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX) + std::size_t hash_value(std::type_index); +#endif + + // Implementation + + namespace hash_detail + { + template + inline std::size_t hash_value_signed(T val) + { + const int size_t_bits = std::numeric_limits::digits; + // ceiling(std::numeric_limits::digits / size_t_bits) - 1 + const int length = (std::numeric_limits::digits - 1) + / size_t_bits; + + std::size_t seed = 0; + T positive = val < 0 ? -1 - val : val; + + // Hopefully, this loop can be unrolled. + for(unsigned int i = length * size_t_bits; i > 0; i -= size_t_bits) + { + seed ^= (std::size_t) (positive >> i) + (seed<<6) + (seed>>2); + } + seed ^= (std::size_t) val + (seed<<6) + (seed>>2); + + return seed; + } + + template + inline std::size_t hash_value_unsigned(T val) + { + const int size_t_bits = std::numeric_limits::digits; + // ceiling(std::numeric_limits::digits / size_t_bits) - 1 + const int length = (std::numeric_limits::digits - 1) + / size_t_bits; + + std::size_t seed = 0; + + // Hopefully, this loop can be unrolled. + for(unsigned int i = length * size_t_bits; i > 0; i -= size_t_bits) + { + seed ^= (std::size_t) (val >> i) + (seed<<6) + (seed>>2); + } + seed ^= (std::size_t) val + (seed<<6) + (seed>>2); + + return seed; + } + + template + inline void hash_combine_impl(SizeT& seed, SizeT value) + { + seed ^= value + 0x9e3779b9 + (seed<<6) + (seed>>2); + } + + template + inline void hash_combine_impl(boost::uint32_t& h1, + boost::uint32_t k1) + { + const uint32_t c1 = 0xcc9e2d51; + const uint32_t c2 = 0x1b873593; + + k1 *= c1; + k1 = BOOST_FUNCTIONAL_HASH_ROTL32(k1,15); + k1 *= c2; + + h1 ^= k1; + h1 = BOOST_FUNCTIONAL_HASH_ROTL32(h1,13); + h1 = h1*5+0xe6546b64; + } + + +// Don't define 64-bit hash combine on platforms with 64 bit integers, +// and also not for 32-bit gcc as it warns about the 64-bit constant. +#if !defined(BOOST_NO_INT64_T) && \ + !(defined(__GNUC__) && ULONG_MAX == 0xffffffff) + + template + inline void hash_combine_impl(boost::uint64_t& h, + boost::uint64_t k) + { + const uint64_t m = UINT64_C(0xc6a4a7935bd1e995); + const int r = 47; + + k *= m; + k ^= k >> r; + k *= m; + + h ^= k; + h *= m; + } + +#endif // BOOST_NO_INT64_T + } + + template + typename boost::hash_detail::basic_numbers::type hash_value(T v) + { + return static_cast(v); + } + + template + typename boost::hash_detail::long_numbers::type hash_value(T v) + { + return hash_detail::hash_value_signed(v); + } + + template + typename boost::hash_detail::ulong_numbers::type hash_value(T v) + { + return hash_detail::hash_value_unsigned(v); + } + + template + typename boost::enable_if, std::size_t>::type + hash_value(T v) + { + return static_cast(v); + } + + // Implementation by Alberto Barbati and Dave Harris. +#if !BOOST_WORKAROUND(__DMC__, <= 0x848) + template std::size_t hash_value(T* const& v) +#else + template std::size_t hash_value(T* v) +#endif + { +#if defined(__VMS) && __INITIAL_POINTER_SIZE == 64 + // for some reason ptrdiff_t on OpenVMS compiler with + // 64 bit is not 64 bit !!! + std::size_t x = static_cast( + reinterpret_cast(v)); +#else + std::size_t x = static_cast( + reinterpret_cast(v)); +#endif + return x + (x >> 3); + } + +#if defined(BOOST_MSVC) +#pragma warning(push) +#if BOOST_MSVC <= 1400 +#pragma warning(disable:4267) // 'argument' : conversion from 'size_t' to + // 'unsigned int', possible loss of data + // A misguided attempt to detect 64-bit + // incompatability. +#endif +#endif + + template + inline void hash_combine(std::size_t& seed, T const& v) + { + boost::hash hasher; + return boost::hash_detail::hash_combine_impl(seed, hasher(v)); + } + +#if defined(BOOST_MSVC) +#pragma warning(pop) +#endif + + template + inline std::size_t hash_range(It first, It last) + { + std::size_t seed = 0; + + for(; first != last; ++first) + { + hash_combine(seed, *first); + } + + return seed; + } + + template + inline void hash_range(std::size_t& seed, It first, It last) + { + for(; first != last; ++first) + { + hash_combine(seed, *first); + } + } + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) + template + inline std::size_t hash_range(T* first, T* last) + { + std::size_t seed = 0; + + for(; first != last; ++first) + { + boost::hash hasher; + seed ^= hasher(*first) + 0x9e3779b9 + (seed<<6) + (seed>>2); + } + + return seed; + } + + template + inline void hash_range(std::size_t& seed, T* first, T* last) + { + for(; first != last; ++first) + { + boost::hash hasher; + seed ^= hasher(*first) + 0x9e3779b9 + (seed<<6) + (seed>>2); + } + } +#endif + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) + template< class T, unsigned N > + inline std::size_t hash_value(const T (&x)[N]) + { + return hash_range(x, x + N); + } + + template< class T, unsigned N > + inline std::size_t hash_value(T (&x)[N]) + { + return hash_range(x, x + N); + } +#endif + + template + inline std::size_t hash_value( + std::basic_string, A> const& v) + { + return hash_range(v.begin(), v.end()); + } + + template + typename boost::hash_detail::float_numbers::type hash_value(T v) + { + return boost::hash_detail::float_hash_value(v); + } + +#if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX) + inline std::size_t hash_value(std::type_index v) + { + return v.hash_code(); + } +#endif + + // + // boost::hash + // + + // Define the specializations required by the standard. The general purpose + // boost::hash is defined later in extensions.hpp if + // BOOST_HASH_NO_EXTENSIONS is not defined. + + // BOOST_HASH_SPECIALIZE - define a specialization for a type which is + // passed by copy. + // + // BOOST_HASH_SPECIALIZE_REF - define a specialization for a type which is + // passed by copy. + // + // These are undefined later. + +#define BOOST_HASH_SPECIALIZE(type) \ + template <> struct hash \ + : public std::unary_function \ + { \ + std::size_t operator()(type v) const \ + { \ + return boost::hash_value(v); \ + } \ + }; + +#define BOOST_HASH_SPECIALIZE_REF(type) \ + template <> struct hash \ + : public std::unary_function \ + { \ + std::size_t operator()(type const& v) const \ + { \ + return boost::hash_value(v); \ + } \ + }; + + BOOST_HASH_SPECIALIZE(bool) + BOOST_HASH_SPECIALIZE(char) + BOOST_HASH_SPECIALIZE(signed char) + BOOST_HASH_SPECIALIZE(unsigned char) +#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) + BOOST_HASH_SPECIALIZE(wchar_t) +#endif + BOOST_HASH_SPECIALIZE(short) + BOOST_HASH_SPECIALIZE(unsigned short) + BOOST_HASH_SPECIALIZE(int) + BOOST_HASH_SPECIALIZE(unsigned int) + BOOST_HASH_SPECIALIZE(long) + BOOST_HASH_SPECIALIZE(unsigned long) + + BOOST_HASH_SPECIALIZE(float) + BOOST_HASH_SPECIALIZE(double) + BOOST_HASH_SPECIALIZE(long double) + + BOOST_HASH_SPECIALIZE_REF(std::string) +#if !defined(BOOST_NO_STD_WSTRING) + BOOST_HASH_SPECIALIZE_REF(std::wstring) +#endif + +#if !defined(BOOST_NO_LONG_LONG) + BOOST_HASH_SPECIALIZE(boost::long_long_type) + BOOST_HASH_SPECIALIZE(boost::ulong_long_type) +#endif + +#if defined(BOOST_HAS_INT128) + BOOST_HASH_SPECIALIZE(boost::int128_type) + BOOST_HASH_SPECIALIZE(boost::uint128_type) +#endif + +#if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX) + BOOST_HASH_SPECIALIZE(std::type_index) +#endif + +#undef BOOST_HASH_SPECIALIZE +#undef BOOST_HASH_SPECIALIZE_REF + +// Specializing boost::hash for pointers. + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + + template + struct hash + : public std::unary_function + { + std::size_t operator()(T* v) const + { +#if !BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) + return boost::hash_value(v); +#else + std::size_t x = static_cast( + reinterpret_cast(v)); + + return x + (x >> 3); +#endif + } + }; + +#else + + // For compilers without partial specialization, we define a + // boost::hash for all remaining types. But hash_impl is only defined + // for pointers in 'extensions.hpp' - so when BOOST_HASH_NO_EXTENSIONS + // is defined there will still be a compile error for types not supported + // in the standard. + + namespace hash_detail + { + template + struct hash_impl; + + template <> + struct hash_impl + { + template + struct inner + : public std::unary_function + { + std::size_t operator()(T val) const + { +#if !BOOST_WORKAROUND(__SUNPRO_CC, <= 590) + return boost::hash_value(val); +#else + std::size_t x = static_cast( + reinterpret_cast(val)); + + return x + (x >> 3); +#endif + } + }; + }; + } + + template struct hash + : public boost::hash_detail::hash_impl::value> + ::BOOST_NESTED_TEMPLATE inner + { + }; + +#endif +} + +#undef BOOST_HASH_CHAR_TRAITS +#undef BOOST_FUNCTIONAL_HASH_ROTL32 + +#if defined(BOOST_MSVC) +#pragma warning(pop) +#endif + +#endif // BOOST_FUNCTIONAL_HASH_HASH_HPP + +// Include this outside of the include guards in case the file is included +// twice - once with BOOST_HASH_NO_EXTENSIONS defined, and then with it +// undefined. + +#if !defined(BOOST_HASH_NO_EXTENSIONS) \ + && !defined(BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP) +#include +#endif diff --git a/ThirdParty/boost-Subset/boost/functional/hash/hash_fwd.hpp b/ThirdParty/boost-Subset/boost/functional/hash/hash_fwd.hpp new file mode 100644 index 0000000000..01fe012ed6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/functional/hash/hash_fwd.hpp @@ -0,0 +1,36 @@ + +// Copyright 2005-2009 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// Based on Peter Dimov's proposal +// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf +// issue 6.18. + +#if !defined(BOOST_FUNCTIONAL_HASH_FWD_HPP) +#define BOOST_FUNCTIONAL_HASH_FWD_HPP + +#include +#if defined(BOOST_HAS_PRAGMA_ONCE) +#pragma once +#endif + +#include +#include + +namespace boost +{ + template struct hash; + + template void hash_combine(std::size_t& seed, T const& v); + + template std::size_t hash_range(It, It); + template void hash_range(std::size_t&, It, It); + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) + template inline std::size_t hash_range(T*, T*); + template inline void hash_range(std::size_t&, T*, T*); +#endif +} + +#endif diff --git a/ThirdParty/boost-Subset/boost/functional/hash_fwd.hpp b/ThirdParty/boost-Subset/boost/functional/hash_fwd.hpp new file mode 100644 index 0000000000..eea9073884 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/functional/hash_fwd.hpp @@ -0,0 +1,11 @@ + +// Copyright 2005-2009 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include +#if defined(BOOST_HAS_PRAGMA_ONCE) +#pragma once +#endif + +#include diff --git a/ThirdParty/boost-Subset/boost/get_pointer.hpp b/ThirdParty/boost-Subset/boost/get_pointer.hpp new file mode 100644 index 0000000000..36e2cd7d0f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/get_pointer.hpp @@ -0,0 +1,76 @@ +// Copyright Peter Dimov and David Abrahams 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef GET_POINTER_DWA20021219_HPP +#define GET_POINTER_DWA20021219_HPP + +#include + +// In order to avoid circular dependencies with Boost.TR1 +// we make sure that our include of doesn't try to +// pull in the TR1 headers: that's why we use this header +// rather than including directly: +#include // std::auto_ptr + +namespace boost { + +// get_pointer(p) extracts a ->* capable pointer from p + +template T * get_pointer(T * p) +{ + return p; +} + +// get_pointer(shared_ptr const & p) has been moved to shared_ptr.hpp + +#if !defined( BOOST_NO_AUTO_PTR ) + +#if defined( __GNUC__ ) && (defined( __GXX_EXPERIMENTAL_CXX0X__ ) || (__cplusplus >= 201103L)) +#if defined( BOOST_GCC ) +#if BOOST_GCC >= 40600 +#define BOOST_CORE_DETAIL_DISABLE_LIBSTDCXX_DEPRECATED_WARNINGS +#endif // BOOST_GCC >= 40600 +#elif defined( __clang__ ) && defined( __has_warning ) +#if __has_warning("-Wdeprecated-declarations") +#define BOOST_CORE_DETAIL_DISABLE_LIBSTDCXX_DEPRECATED_WARNINGS +#endif // __has_warning("-Wdeprecated-declarations") +#endif +#endif // defined( __GNUC__ ) && (defined( __GXX_EXPERIMENTAL_CXX0X__ ) || (__cplusplus >= 201103L)) + +#if defined( BOOST_CORE_DETAIL_DISABLE_LIBSTDCXX_DEPRECATED_WARNINGS ) +// Disable libstdc++ warnings about std::auto_ptr being deprecated in C++11 mode +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#define BOOST_CORE_DETAIL_DISABLED_DEPRECATED_WARNINGS +#endif + +template T * get_pointer(std::auto_ptr const& p) +{ + return p.get(); +} + +#if defined( BOOST_CORE_DETAIL_DISABLE_LIBSTDCXX_DEPRECATED_WARNINGS ) +#pragma GCC diagnostic pop +#undef BOOST_CORE_DETAIL_DISABLE_LIBSTDCXX_DEPRECATED_WARNINGS +#endif + +#endif // !defined( BOOST_NO_AUTO_PTR ) + +#if !defined( BOOST_NO_CXX11_SMART_PTR ) + +template T * get_pointer( std::unique_ptr const& p ) +{ + return p.get(); +} + +template T * get_pointer( std::shared_ptr const& p ) +{ + return p.get(); +} + +#endif + +} // namespace boost + +#endif // GET_POINTER_DWA20021219_HPP diff --git a/ThirdParty/boost-Subset/boost/integer.hpp b/ThirdParty/boost-Subset/boost/integer.hpp new file mode 100644 index 0000000000..9fa0019484 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/integer.hpp @@ -0,0 +1,262 @@ +// boost integer.hpp header file -------------------------------------------// + +// Copyright Beman Dawes and Daryle Walker 1999. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/integer for documentation. + +// Revision History +// 22 Sep 01 Added value-based integer templates. (Daryle Walker) +// 01 Apr 01 Modified to use new header. (John Maddock) +// 30 Jul 00 Add typename syntax fix (Jens Maurer) +// 28 Aug 99 Initial version + +#ifndef BOOST_INTEGER_HPP +#define BOOST_INTEGER_HPP + +#include // self include + +#include // for boost::::boost::integer_traits +#include // for ::std::numeric_limits +#include // for boost::int64_t and BOOST_NO_INTEGRAL_INT64_T +#include + +// +// We simply cannot include this header on gcc without getting copious warnings of the kind: +// +// boost/integer.hpp:77:30: warning: use of C99 long long integer constant +// +// And yet there is no other reasonable implementation, so we declare this a system header +// to suppress these warnings. +// +#if defined(__GNUC__) && (__GNUC__ >= 4) +#pragma GCC system_header +#endif + +namespace boost +{ + + // Helper templates ------------------------------------------------------// + + // fast integers from least integers + // int_fast_t<> works correctly for unsigned too, in spite of the name. + template< typename LeastInt > + struct int_fast_t + { + typedef LeastInt fast; + typedef fast type; + }; // imps may specialize + + namespace detail{ + + // convert category to type + template< int Category > struct int_least_helper {}; // default is empty + template< int Category > struct uint_least_helper {}; // default is empty + + // specializatons: 1=long, 2=int, 3=short, 4=signed char, + // 6=unsigned long, 7=unsigned int, 8=unsigned short, 9=unsigned char + // no specializations for 0 and 5: requests for a type > long are in error +#ifdef BOOST_HAS_LONG_LONG + template<> struct int_least_helper<1> { typedef boost::long_long_type least; }; +#elif defined(BOOST_HAS_MS_INT64) + template<> struct int_least_helper<1> { typedef __int64 least; }; +#endif + template<> struct int_least_helper<2> { typedef long least; }; + template<> struct int_least_helper<3> { typedef int least; }; + template<> struct int_least_helper<4> { typedef short least; }; + template<> struct int_least_helper<5> { typedef signed char least; }; +#ifdef BOOST_HAS_LONG_LONG + template<> struct uint_least_helper<1> { typedef boost::ulong_long_type least; }; +#elif defined(BOOST_HAS_MS_INT64) + template<> struct uint_least_helper<1> { typedef unsigned __int64 least; }; +#endif + template<> struct uint_least_helper<2> { typedef unsigned long least; }; + template<> struct uint_least_helper<3> { typedef unsigned int least; }; + template<> struct uint_least_helper<4> { typedef unsigned short least; }; + template<> struct uint_least_helper<5> { typedef unsigned char least; }; + + template + struct exact_signed_base_helper{}; + template + struct exact_unsigned_base_helper{}; + + template <> struct exact_signed_base_helper { typedef signed char exact; }; + template <> struct exact_unsigned_base_helper { typedef unsigned char exact; }; +#if USHRT_MAX != UCHAR_MAX + template <> struct exact_signed_base_helper { typedef short exact; }; + template <> struct exact_unsigned_base_helper { typedef unsigned short exact; }; +#endif +#if UINT_MAX != USHRT_MAX + template <> struct exact_signed_base_helper { typedef int exact; }; + template <> struct exact_unsigned_base_helper { typedef unsigned int exact; }; +#endif +#if ULONG_MAX != UINT_MAX && ( !defined __TI_COMPILER_VERSION__ || \ + ( __TI_COMPILER_VERSION__ >= 7000000 && !defined __TI_40BIT_LONG__ ) ) + template <> struct exact_signed_base_helper { typedef long exact; }; + template <> struct exact_unsigned_base_helper { typedef unsigned long exact; }; +#endif +#if defined(BOOST_HAS_LONG_LONG) &&\ + ((defined(ULLONG_MAX) && (ULLONG_MAX != ULONG_MAX)) ||\ + (defined(ULONG_LONG_MAX) && (ULONG_LONG_MAX != ULONG_MAX)) ||\ + (defined(ULONGLONG_MAX) && (ULONGLONG_MAX != ULONG_MAX)) ||\ + (defined(_ULLONG_MAX) && (_ULLONG_MAX != ULONG_MAX))) + template <> struct exact_signed_base_helper { typedef boost::long_long_type exact; }; + template <> struct exact_unsigned_base_helper { typedef boost::ulong_long_type exact; }; +#endif + + + } // namespace detail + + // integer templates specifying number of bits ---------------------------// + + // signed + template< int Bits > // bits (including sign) required + struct int_t : public boost::detail::exact_signed_base_helper + { + BOOST_STATIC_ASSERT_MSG(Bits <= (int)(sizeof(boost::intmax_t) * CHAR_BIT), + "No suitable signed integer type with the requested number of bits is available."); + typedef typename boost::detail::int_least_helper + < +#ifdef BOOST_HAS_LONG_LONG + (Bits <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) + +#else + 1 + +#endif + (Bits-1 <= ::std::numeric_limits::digits) + + (Bits-1 <= ::std::numeric_limits::digits) + + (Bits-1 <= ::std::numeric_limits::digits) + + (Bits-1 <= ::std::numeric_limits::digits) + >::least least; + typedef typename int_fast_t::type fast; + }; + + // unsigned + template< int Bits > // bits required + struct uint_t : public boost::detail::exact_unsigned_base_helper + { + BOOST_STATIC_ASSERT_MSG(Bits <= (int)(sizeof(boost::uintmax_t) * CHAR_BIT), + "No suitable unsigned integer type with the requested number of bits is available."); +#if (defined(__BORLANDC__) || defined(__CODEGEAR__)) && defined(BOOST_NO_INTEGRAL_INT64_T) + // It's really not clear why this workaround should be needed... shrug I guess! JM + BOOST_STATIC_CONSTANT(int, s = + 6 + + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits)); + typedef typename detail::int_least_helper< ::boost::uint_t::s>::least least; +#else + typedef typename boost::detail::uint_least_helper + < +#ifdef BOOST_HAS_LONG_LONG + (Bits <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) + +#else + 1 + +#endif + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits) + >::least least; +#endif + typedef typename int_fast_t::type fast; + // int_fast_t<> works correctly for unsigned too, in spite of the name. + }; + + // integer templates specifying extreme value ----------------------------// + + // signed +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG) + template< boost::long_long_type MaxValue > // maximum value to require support +#else + template< long MaxValue > // maximum value to require support +#endif + struct int_max_value_t + { + typedef typename boost::detail::int_least_helper + < +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG) + (MaxValue <= ::boost::integer_traits::const_max) + +#else + 1 + +#endif + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + >::least least; + typedef typename int_fast_t::type fast; + }; + +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG) + template< boost::long_long_type MinValue > // minimum value to require support +#else + template< long MinValue > // minimum value to require support +#endif + struct int_min_value_t + { + typedef typename boost::detail::int_least_helper + < +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG) + (MinValue >= ::boost::integer_traits::const_min) + +#else + 1 + +#endif + (MinValue >= ::boost::integer_traits::const_min) + + (MinValue >= ::boost::integer_traits::const_min) + + (MinValue >= ::boost::integer_traits::const_min) + + (MinValue >= ::boost::integer_traits::const_min) + >::least least; + typedef typename int_fast_t::type fast; + }; + + // unsigned +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) + template< boost::ulong_long_type MaxValue > // minimum value to require support +#else + template< unsigned long MaxValue > // minimum value to require support +#endif + struct uint_value_t + { +#if (defined(__BORLANDC__) || defined(__CODEGEAR__)) + // It's really not clear why this workaround should be needed... shrug I guess! JM +#if defined(BOOST_NO_INTEGRAL_INT64_T) + BOOST_STATIC_CONSTANT(unsigned, which = + 1 + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max)); + typedef typename detail::int_least_helper< ::boost::uint_value_t::which>::least least; +#else // BOOST_NO_INTEGRAL_INT64_T + BOOST_STATIC_CONSTANT(unsigned, which = + 1 + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max)); + typedef typename detail::uint_least_helper< ::boost::uint_value_t::which>::least least; +#endif // BOOST_NO_INTEGRAL_INT64_T +#else + typedef typename boost::detail::uint_least_helper + < +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) + (MaxValue <= ::boost::integer_traits::const_max) + +#else + 1 + +#endif + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + >::least least; +#endif + typedef typename int_fast_t::type fast; + }; + + +} // namespace boost + +#endif // BOOST_INTEGER_HPP diff --git a/ThirdParty/boost-Subset/boost/integer/common_factor_rt.hpp b/ThirdParty/boost-Subset/boost/integer/common_factor_rt.hpp new file mode 100644 index 0000000000..c2b54db8e8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/integer/common_factor_rt.hpp @@ -0,0 +1,460 @@ +// Boost common_factor_rt.hpp header file ----------------------------------// + +// (C) Copyright Daryle Walker and Paul Moore 2001-2002. Permission to copy, +// use, modify, sell and distribute this software is granted provided this +// copyright notice appears in all copies. This software is provided "as is" +// without express or implied warranty, and with no claim as to its suitability +// for any purpose. + +// boostinspect:nolicense (don't complain about the lack of a Boost license) +// (Paul Moore hasn't been in contact for years, so there's no way to change the +// license.) + +// See http://www.boost.org for updates, documentation, and revision history. + +#ifndef BOOST_INTEGER_COMMON_FACTOR_RT_HPP +#define BOOST_INTEGER_COMMON_FACTOR_RT_HPP + +#include // self include + +#include // for BOOST_NESTED_TEMPLATE, etc. +#include // for std::numeric_limits +#include // for CHAR_MIN +#include + +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4127 4244) // Conditional expression is constant +#endif + +namespace boost +{ +namespace integer +{ + + +// Forward declarations for function templates -----------------------------// + +template < typename IntegerType > + IntegerType gcd( IntegerType const &a, IntegerType const &b ); + +template < typename IntegerType > + IntegerType lcm( IntegerType const &a, IntegerType const &b ); + + +// Greatest common divisor evaluator class declaration ---------------------// + +template < typename IntegerType > +class gcd_evaluator +{ +public: + // Types + typedef IntegerType result_type, first_argument_type, second_argument_type; + + // Function object interface + result_type operator ()( first_argument_type const &a, + second_argument_type const &b ) const; + +}; // boost::integer::gcd_evaluator + + +// Least common multiple evaluator class declaration -----------------------// + +template < typename IntegerType > +class lcm_evaluator +{ +public: + // Types + typedef IntegerType result_type, first_argument_type, second_argument_type; + + // Function object interface + result_type operator ()( first_argument_type const &a, + second_argument_type const &b ) const; + +}; // boost::integer::lcm_evaluator + + +// Implementation details --------------------------------------------------// + +namespace detail +{ + // Greatest common divisor for rings (including unsigned integers) + template < typename RingType > + RingType + gcd_euclidean + ( + RingType a, + RingType b + ) + { + // Avoid repeated construction + #ifndef __BORLANDC__ + RingType const zero = static_cast( 0 ); + #else + RingType zero = static_cast( 0 ); + #endif + + // Reduce by GCD-remainder property [GCD(a,b) == GCD(b,a MOD b)] + while ( true ) + { + if ( a == zero ) + return b; + b %= a; + + if ( b == zero ) + return a; + a %= b; + } + } + + // Greatest common divisor for (signed) integers + template < typename IntegerType > + inline + IntegerType + gcd_integer + ( + IntegerType const & a, + IntegerType const & b + ) + { + // Avoid repeated construction + IntegerType const zero = static_cast( 0 ); + IntegerType const result = gcd_euclidean( a, b ); + + return ( result < zero ) ? static_cast(-result) : result; + } + + // Greatest common divisor for unsigned binary integers + template < typename BuiltInUnsigned > + BuiltInUnsigned + gcd_binary + ( + BuiltInUnsigned u, + BuiltInUnsigned v + ) + { + if ( u && v ) + { + // Shift out common factors of 2 + unsigned shifts = 0; + + while ( !(u & 1u) && !(v & 1u) ) + { + ++shifts; + u >>= 1; + v >>= 1; + } + + // Start with the still-even one, if any + BuiltInUnsigned r[] = { u, v }; + unsigned which = static_cast( u & 1u ); + + // Whittle down the values via their differences + do + { +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) + while ( !(r[ which ] & 1u) ) + { + r[ which ] = (r[which] >> 1); + } +#else + // Remove factors of two from the even one + while ( !(r[ which ] & 1u) ) + { + r[ which ] >>= 1; + } +#endif + + // Replace the larger of the two with their difference + if ( r[!which] > r[which] ) + { + which ^= 1u; + } + + r[ which ] -= r[ !which ]; + } + while ( r[which] ); + + // Shift-in the common factor of 2 to the residues' GCD + return r[ !which ] << shifts; + } + else + { + // At least one input is zero, return the other + // (adding since zero is the additive identity) + // or zero if both are zero. + return u + v; + } + } + + // Least common multiple for rings (including unsigned integers) + template < typename RingType > + inline + RingType + lcm_euclidean + ( + RingType const & a, + RingType const & b + ) + { + RingType const zero = static_cast( 0 ); + RingType const temp = gcd_euclidean( a, b ); + + return ( temp != zero ) ? ( a / temp * b ) : zero; + } + + // Least common multiple for (signed) integers + template < typename IntegerType > + inline + IntegerType + lcm_integer + ( + IntegerType const & a, + IntegerType const & b + ) + { + // Avoid repeated construction + IntegerType const zero = static_cast( 0 ); + IntegerType const result = lcm_euclidean( a, b ); + + return ( result < zero ) ? static_cast(-result) : result; + } + + // Function objects to find the best way of computing GCD or LCM +#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + template < typename T, bool IsSpecialized, bool IsSigned > + struct gcd_optimal_evaluator_helper_t + { + T operator ()( T const &a, T const &b ) + { + return gcd_euclidean( a, b ); + } + }; + + template < typename T > + struct gcd_optimal_evaluator_helper_t< T, true, true > + { + T operator ()( T const &a, T const &b ) + { + return gcd_integer( a, b ); + } + }; + + template < typename T > + struct gcd_optimal_evaluator + { + T operator ()( T const &a, T const &b ) + { + typedef ::std::numeric_limits limits_type; + + typedef gcd_optimal_evaluator_helper_t helper_type; + + helper_type solver; + + return solver( a, b ); + } + }; +#else // BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + template < typename T > + struct gcd_optimal_evaluator + { + T operator ()( T const &a, T const &b ) + { + return gcd_integer( a, b ); + } + }; +#endif + + // Specialize for the built-in integers +#define BOOST_PRIVATE_GCD_UF( Ut ) \ + template < > struct gcd_optimal_evaluator \ + { Ut operator ()( Ut a, Ut b ) const { return gcd_binary( a, b ); } } + + BOOST_PRIVATE_GCD_UF( unsigned char ); + BOOST_PRIVATE_GCD_UF( unsigned short ); + BOOST_PRIVATE_GCD_UF( unsigned ); + BOOST_PRIVATE_GCD_UF( unsigned long ); + +#ifdef BOOST_HAS_LONG_LONG + BOOST_PRIVATE_GCD_UF( boost::ulong_long_type ); +#elif defined(BOOST_HAS_MS_INT64) + BOOST_PRIVATE_GCD_UF( unsigned __int64 ); +#endif + +#if CHAR_MIN == 0 + BOOST_PRIVATE_GCD_UF( char ); // char is unsigned +#endif + +#undef BOOST_PRIVATE_GCD_UF + +#define BOOST_PRIVATE_GCD_SF( St, Ut ) \ + template < > struct gcd_optimal_evaluator \ + { St operator ()( St a, St b ) const { Ut const a_abs = \ + static_cast( a < 0 ? -a : +a ), b_abs = static_cast( \ + b < 0 ? -b : +b ); return static_cast( \ + gcd_optimal_evaluator()(a_abs, b_abs) ); } } + + BOOST_PRIVATE_GCD_SF( signed char, unsigned char ); + BOOST_PRIVATE_GCD_SF( short, unsigned short ); + BOOST_PRIVATE_GCD_SF( int, unsigned ); + BOOST_PRIVATE_GCD_SF( long, unsigned long ); + +#if CHAR_MIN < 0 + BOOST_PRIVATE_GCD_SF( char, unsigned char ); // char is signed +#endif + +#ifdef BOOST_HAS_LONG_LONG + BOOST_PRIVATE_GCD_SF( boost::long_long_type, boost::ulong_long_type ); +#elif defined(BOOST_HAS_MS_INT64) + BOOST_PRIVATE_GCD_SF( __int64, unsigned __int64 ); +#endif + +#undef BOOST_PRIVATE_GCD_SF + +#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + template < typename T, bool IsSpecialized, bool IsSigned > + struct lcm_optimal_evaluator_helper_t + { + T operator ()( T const &a, T const &b ) + { + return lcm_euclidean( a, b ); + } + }; + + template < typename T > + struct lcm_optimal_evaluator_helper_t< T, true, true > + { + T operator ()( T const &a, T const &b ) + { + return lcm_integer( a, b ); + } + }; + + template < typename T > + struct lcm_optimal_evaluator + { + T operator ()( T const &a, T const &b ) + { + typedef ::std::numeric_limits limits_type; + + typedef lcm_optimal_evaluator_helper_t helper_type; + + helper_type solver; + + return solver( a, b ); + } + }; +#else // BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + template < typename T > + struct lcm_optimal_evaluator + { + T operator ()( T const &a, T const &b ) + { + return lcm_integer( a, b ); + } + }; +#endif + + // Functions to find the GCD or LCM in the best way + template < typename T > + inline + T + gcd_optimal + ( + T const & a, + T const & b + ) + { + gcd_optimal_evaluator solver; + + return solver( a, b ); + } + + template < typename T > + inline + T + lcm_optimal + ( + T const & a, + T const & b + ) + { + lcm_optimal_evaluator solver; + + return solver( a, b ); + } + +} // namespace detail + + +// Greatest common divisor evaluator member function definition ------------// + +template < typename IntegerType > +inline +typename gcd_evaluator::result_type +gcd_evaluator::operator () +( + first_argument_type const & a, + second_argument_type const & b +) const +{ + return detail::gcd_optimal( a, b ); +} + + +// Least common multiple evaluator member function definition --------------// + +template < typename IntegerType > +inline +typename lcm_evaluator::result_type +lcm_evaluator::operator () +( + first_argument_type const & a, + second_argument_type const & b +) const +{ + return detail::lcm_optimal( a, b ); +} + + +// Greatest common divisor and least common multiple function definitions --// + +template < typename IntegerType > +inline +IntegerType +gcd +( + IntegerType const & a, + IntegerType const & b +) +{ + gcd_evaluator solver; + + return solver( a, b ); +} + +template < typename IntegerType > +inline +IntegerType +lcm +( + IntegerType const & a, + IntegerType const & b +) +{ + lcm_evaluator solver; + + return solver( a, b ); +} + + +} // namespace integer +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#endif // BOOST_INTEGER_COMMON_FACTOR_RT_HPP diff --git a/ThirdParty/boost-Subset/boost/integer/static_log2.hpp b/ThirdParty/boost-Subset/boost/integer/static_log2.hpp new file mode 100644 index 0000000000..56c7a00125 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/integer/static_log2.hpp @@ -0,0 +1,127 @@ +// -------------- Boost static_log2.hpp header file ----------------------- // +// +// Copyright (C) 2001 Daryle Walker. +// Copyright (C) 2003 Vesa Karvonen. +// Copyright (C) 2003 Gennaro Prota. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// --------------------------------------------------- +// See http://www.boost.org/libs/integer for documentation. +// ------------------------------------------------------------------------- // + + +#ifndef BOOST_INTEGER_STATIC_LOG2_HPP +#define BOOST_INTEGER_STATIC_LOG2_HPP + +#include "boost/integer_fwd.hpp" // for boost::intmax_t + +namespace boost { + + namespace detail { + + namespace static_log2_impl { + + // choose_initial_n<> + // + // Recursively doubles its integer argument, until it + // becomes >= of the "width" (C99, 6.2.6.2p4) of + // static_log2_argument_type. + // + // Used to get the maximum power of two less then the width. + // + // Example: if on your platform argument_type has 48 value + // bits it yields n=32. + // + // It's easy to prove that, starting from such a value + // of n, the core algorithm works correctly for any width + // of static_log2_argument_type and that recursion always + // terminates with x = 1 and n = 0 (see the algorithm's + // invariant). + + typedef boost::static_log2_argument_type argument_type; + typedef boost::static_log2_result_type result_type; + + template + struct choose_initial_n { + + BOOST_STATIC_CONSTANT(bool, c = (argument_type(1) << n << n) != 0); + BOOST_STATIC_CONSTANT( + result_type, + value = !c*n + choose_initial_n<2*c*n>::value + ); + + }; + + template <> + struct choose_initial_n<0> { + BOOST_STATIC_CONSTANT(result_type, value = 0); + }; + + + + // start computing from n_zero - must be a power of two + const result_type n_zero = 16; + const result_type initial_n = choose_initial_n::value; + + // static_log2_impl<> + // + // * Invariant: + // 2n + // 1 <= x && x < 2 at the start of each recursion + // (see also choose_initial_n<>) + // + // * Type requirements: + // + // argument_type maybe any unsigned type with at least n_zero + 1 + // value bits. (Note: If larger types will be standardized -e.g. + // unsigned long long- then the argument_type typedef can be + // changed without affecting the rest of the code.) + // + + template + struct static_log2_impl { + + BOOST_STATIC_CONSTANT(bool, c = (x >> n) > 0); // x >= 2**n ? + BOOST_STATIC_CONSTANT( + result_type, + value = c*n + (static_log2_impl< (x>>c*n), n/2 >::value) + ); + + }; + + template <> + struct static_log2_impl<1, 0> { + BOOST_STATIC_CONSTANT(result_type, value = 0); + }; + + } + } // detail + + + + // -------------------------------------- + // static_log2 + // ---------------------------------------- + + template + struct static_log2 { + + BOOST_STATIC_CONSTANT( + static_log2_result_type, + value = detail::static_log2_impl::static_log2_impl::value + ); + + }; + + + template <> + struct static_log2<0> { }; + +} + + + +#endif // include guard diff --git a/ThirdParty/boost-Subset/boost/integer_fwd.hpp b/ThirdParty/boost-Subset/boost/integer_fwd.hpp new file mode 100644 index 0000000000..10577ae294 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/integer_fwd.hpp @@ -0,0 +1,187 @@ +// Boost integer_fwd.hpp header file ---------------------------------------// + +// (C) Copyright Dave Abrahams and Daryle Walker 2001. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/integer for documentation. + +#ifndef BOOST_INTEGER_FWD_HPP +#define BOOST_INTEGER_FWD_HPP + +#include // for UCHAR_MAX, etc. +#include // for std::size_t + +#include // for BOOST_NO_INTRINSIC_WCHAR_T +#include // for std::numeric_limits +#include // For intmax_t + + +namespace boost +{ + +#ifdef BOOST_NO_INTEGRAL_INT64_T + typedef unsigned long static_log2_argument_type; + typedef int static_log2_result_type; + typedef long static_min_max_signed_type; + typedef unsigned long static_min_max_unsigned_type; +#else + typedef boost::uintmax_t static_min_max_unsigned_type; + typedef boost::intmax_t static_min_max_signed_type; + typedef boost::uintmax_t static_log2_argument_type; + typedef int static_log2_result_type; +#endif + +// From ------------------------------------------------// + +// Only has typedefs or using statements, with #conditionals + + +// From -----------------------------------------// + +template < class T > + class integer_traits; + +template < > + class integer_traits< bool >; + +template < > + class integer_traits< char >; + +template < > + class integer_traits< signed char >; + +template < > + class integer_traits< unsigned char >; + +#ifndef BOOST_NO_INTRINSIC_WCHAR_T +template < > + class integer_traits< wchar_t >; +#endif + +template < > + class integer_traits< short >; + +template < > + class integer_traits< unsigned short >; + +template < > + class integer_traits< int >; + +template < > + class integer_traits< unsigned int >; + +template < > + class integer_traits< long >; + +template < > + class integer_traits< unsigned long >; + +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG) +template < > +class integer_traits< ::boost::long_long_type>; + +template < > +class integer_traits< ::boost::ulong_long_type >; +#elif !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_MS_INT64) +template < > +class integer_traits<__int64>; + +template < > +class integer_traits; +#endif + + +// From ------------------------------------------------// + +template < typename LeastInt > + struct int_fast_t; + +template< int Bits > + struct int_t; + +template< int Bits > + struct uint_t; + +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) + template< boost::long_long_type MaxValue > // maximum value to require support +#else + template< long MaxValue > // maximum value to require support +#endif + struct int_max_value_t; + +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) + template< boost::long_long_type MinValue > // minimum value to require support +#else + template< long MinValue > // minimum value to require support +#endif + struct int_min_value_t; + +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) + template< boost::ulong_long_type MaxValue > // maximum value to require support +#else + template< unsigned long MaxValue > // maximum value to require support +#endif + struct uint_value_t; + + +// From -----------------------------------// + +template < std::size_t Bit > + struct high_bit_mask_t; + +template < std::size_t Bits > + struct low_bits_mask_t; + +template < > + struct low_bits_mask_t< ::std::numeric_limits::digits >; + +// From ------------------------------------// + +template + struct static_log2; + +template <> struct static_log2<0u>; + + +// From ---------------------------------// + +template + struct static_signed_min; + +template + struct static_signed_max; + +template + struct static_unsigned_min; + +template + struct static_unsigned_max; + + +// From + +#ifdef BOOST_NO_INTEGRAL_INT64_T + typedef unsigned long static_gcd_type; +#else + typedef boost::uintmax_t static_gcd_type; +#endif + +template < static_gcd_type Value1, static_gcd_type Value2 > + struct static_gcd; +template < static_gcd_type Value1, static_gcd_type Value2 > + struct static_lcm; + + +// From + +template < typename IntegerType > + class gcd_evaluator; +template < typename IntegerType > + class lcm_evaluator; + + +} // namespace boost + + +#endif // BOOST_INTEGER_FWD_HPP diff --git a/ThirdParty/boost-Subset/boost/integer_traits.hpp b/ThirdParty/boost-Subset/boost/integer_traits.hpp new file mode 100644 index 0000000000..94eb00d31e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/integer_traits.hpp @@ -0,0 +1,256 @@ +/* boost integer_traits.hpp header file + * + * Copyright Jens Maurer 2000 + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * $Id$ + * + * Idea by Beman Dawes, Ed Brey, Steve Cleary, and Nathan Myers + */ + +// See http://www.boost.org/libs/integer for documentation. + + +#ifndef BOOST_INTEGER_TRAITS_HPP +#define BOOST_INTEGER_TRAITS_HPP + +#include +#include + +// These are an implementation detail and not part of the interface +#include +// we need wchar.h for WCHAR_MAX/MIN but not all platforms provide it, +// and some may have but not ... +#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) && (!defined(BOOST_NO_CWCHAR) || defined(sun) || defined(__sun) || defined(__QNX__)) +#include +#endif + +// +// We simply cannot include this header on gcc without getting copious warnings of the kind: +// +// ../../../boost/integer_traits.hpp:164:66: warning: use of C99 long long integer constant +// +// And yet there is no other reasonable implementation, so we declare this a system header +// to suppress these warnings. +// +#if defined(__GNUC__) && (__GNUC__ >= 4) +#pragma GCC system_header +#endif + +namespace boost { +template +class integer_traits : public std::numeric_limits +{ +public: + BOOST_STATIC_CONSTANT(bool, is_integral = false); +}; + +namespace detail { +template +class integer_traits_base +{ +public: + BOOST_STATIC_CONSTANT(bool, is_integral = true); + BOOST_STATIC_CONSTANT(T, const_min = min_val); + BOOST_STATIC_CONSTANT(T, const_max = max_val); +}; + +#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION +// A definition is required even for integral static constants +template +const bool integer_traits_base::is_integral; + +template +const T integer_traits_base::const_min; + +template +const T integer_traits_base::const_max; +#endif + +} // namespace detail + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +#ifndef BOOST_NO_INTRINSIC_WCHAR_T +template<> +class integer_traits + : public std::numeric_limits, + // Don't trust WCHAR_MIN and WCHAR_MAX with Mac OS X's native + // library: they are wrong! +#if defined(WCHAR_MIN) && defined(WCHAR_MAX) && !defined(__APPLE__) + public detail::integer_traits_base +#elif defined(__BORLANDC__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__BEOS__) && defined(__GNUC__)) + // No WCHAR_MIN and WCHAR_MAX, whar_t is short and unsigned: + public detail::integer_traits_base +#elif (defined(__sgi) && (!defined(__SGI_STL_PORT) || __SGI_STL_PORT < 0x400))\ + || (defined __APPLE__)\ + || (defined(__OpenBSD__) && defined(__GNUC__))\ + || (defined(__NetBSD__) && defined(__GNUC__))\ + || (defined(__FreeBSD__) && defined(__GNUC__))\ + || (defined(__DragonFly__) && defined(__GNUC__))\ + || (defined(__hpux) && defined(__GNUC__) && (__GNUC__ == 3) && !defined(__SGI_STL_PORT)) + // No WCHAR_MIN and WCHAR_MAX, wchar_t has the same range as int. + // - SGI MIPSpro with native library + // - gcc 3.x on HP-UX + // - Mac OS X with native library + // - gcc on FreeBSD, OpenBSD and NetBSD + public detail::integer_traits_base +#else +#error No WCHAR_MIN and WCHAR_MAX present, please adjust integer_traits<> for your compiler. +#endif +{ }; +#endif // BOOST_NO_INTRINSIC_WCHAR_T + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) +#if defined(ULLONG_MAX) && defined(BOOST_HAS_LONG_LONG) + +template<> +class integer_traits< ::boost::long_long_type> + : public std::numeric_limits< ::boost::long_long_type>, + public detail::integer_traits_base< ::boost::long_long_type, LLONG_MIN, LLONG_MAX> +{ }; + +template<> +class integer_traits< ::boost::ulong_long_type> + : public std::numeric_limits< ::boost::ulong_long_type>, + public detail::integer_traits_base< ::boost::ulong_long_type, 0, ULLONG_MAX> +{ }; + +#elif defined(ULONG_LONG_MAX) && defined(BOOST_HAS_LONG_LONG) + +template<> +class integer_traits< ::boost::long_long_type> : public std::numeric_limits< ::boost::long_long_type>, public detail::integer_traits_base< ::boost::long_long_type, LONG_LONG_MIN, LONG_LONG_MAX>{ }; +template<> +class integer_traits< ::boost::ulong_long_type> + : public std::numeric_limits< ::boost::ulong_long_type>, + public detail::integer_traits_base< ::boost::ulong_long_type, 0, ULONG_LONG_MAX> +{ }; + +#elif defined(ULONGLONG_MAX) && defined(BOOST_HAS_LONG_LONG) + +template<> +class integer_traits< ::boost::long_long_type> + : public std::numeric_limits< ::boost::long_long_type>, + public detail::integer_traits_base< ::boost::long_long_type, LONGLONG_MIN, LONGLONG_MAX> +{ }; + +template<> +class integer_traits< ::boost::ulong_long_type> + : public std::numeric_limits< ::boost::ulong_long_type>, + public detail::integer_traits_base< ::boost::ulong_long_type, 0, ULONGLONG_MAX> +{ }; + +#elif defined(_LLONG_MAX) && defined(_C2) && defined(BOOST_HAS_LONG_LONG) + +template<> +class integer_traits< ::boost::long_long_type> + : public std::numeric_limits< ::boost::long_long_type>, + public detail::integer_traits_base< ::boost::long_long_type, -_LLONG_MAX - _C2, _LLONG_MAX> +{ }; + +template<> +class integer_traits< ::boost::ulong_long_type> + : public std::numeric_limits< ::boost::ulong_long_type>, + public detail::integer_traits_base< ::boost::ulong_long_type, 0, _ULLONG_MAX> +{ }; + +#elif defined(BOOST_HAS_LONG_LONG) +// +// we have long long but no constants, this happens for example with gcc in -ansi mode, +// we'll just have to work out the values for ourselves (assumes 2's compliment representation): +// +template<> +class integer_traits< ::boost::long_long_type> + : public std::numeric_limits< ::boost::long_long_type>, + public detail::integer_traits_base< ::boost::long_long_type, (1LL << (sizeof(::boost::long_long_type) * CHAR_BIT - 1)), ~(1LL << (sizeof(::boost::long_long_type) * CHAR_BIT - 1))> +{ }; + +template<> +class integer_traits< ::boost::ulong_long_type> + : public std::numeric_limits< ::boost::ulong_long_type>, + public detail::integer_traits_base< ::boost::ulong_long_type, 0, ~0uLL> +{ }; + +#elif defined(BOOST_HAS_MS_INT64) + +template<> +class integer_traits< __int64> + : public std::numeric_limits< __int64>, + public detail::integer_traits_base< __int64, _I64_MIN, _I64_MAX> +{ }; + +template<> +class integer_traits< unsigned __int64> + : public std::numeric_limits< unsigned __int64>, + public detail::integer_traits_base< unsigned __int64, 0, _UI64_MAX> +{ }; + +#endif +#endif + +} // namespace boost + +#endif /* BOOST_INTEGER_TRAITS_HPP */ + + + diff --git a/ThirdParty/boost-Subset/boost/intrusive_ptr.hpp b/ThirdParty/boost-Subset/boost/intrusive_ptr.hpp new file mode 100644 index 0000000000..63036dcd6e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/intrusive_ptr.hpp @@ -0,0 +1,18 @@ +#ifndef BOOST_INTRUSIVE_PTR_HPP_INCLUDED +#define BOOST_INTRUSIVE_PTR_HPP_INCLUDED + +// +// intrusive_ptr.hpp +// +// Copyright (c) 2001, 2002 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// See http://www.boost.org/libs/smart_ptr/intrusive_ptr.html for documentation. +// + +#include + +#endif // #ifndef BOOST_INTRUSIVE_PTR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/io/detail/quoted_manip.hpp b/ThirdParty/boost-Subset/boost/io/detail/quoted_manip.hpp new file mode 100644 index 0000000000..502f422aa1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/io/detail/quoted_manip.hpp @@ -0,0 +1,190 @@ +// boost/io/quoted_manip.hpp ---------------------------------------------------------// + +// Copyright Beman Dawes 2010 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page http://www.boost.org/libs/io + +//--------------------------------------------------------------------------------------// + +#ifndef BOOST_IO_QUOTED_MANIP +#define BOOST_IO_QUOTED_MANIP + +#include +#include +#include +#include +#include + +namespace boost +{ + namespace io + { + namespace detail { template struct quoted_proxy; } + + // ------------ public interface ------------------------------------------------// + + // manipulator for const std::basic_string& + template + detail::quoted_proxy const &, Char> + quoted(const std::basic_string& s, + Char escape='\\', Char delim='\"'); + + // manipulator for non-const std::basic_string& + template + detail::quoted_proxy &, Char> + quoted(std::basic_string& s, + Char escape='\\', Char delim='\"'); + + // manipulator for const C-string* + template + detail::quoted_proxy + quoted(const Char* s, Char escape='\\', Char delim='\"'); + + // ----------- implementation details -------------------------------------------// + + namespace detail + { + // proxy used as an argument pack + template + struct quoted_proxy + { + String string; + Char escape; + Char delim; + + quoted_proxy(String s_, Char escape_, Char delim_) + : string(s_), escape(escape_), delim(delim_) {} + private: + // String may be a const type, so disable the assignment operator + quoted_proxy& operator=(const quoted_proxy&); // = deleted + }; + + // abstract away difference between proxies with const or non-const basic_strings + template + std::basic_ostream& + basic_string_inserter_imp(std::basic_ostream& os, + std::basic_string const & string, Char escape, Char delim) + { + os << delim; + typename std::basic_string::const_iterator + end_it = string.end(); + for (typename std::basic_string::const_iterator + it = string.begin(); + it != end_it; + ++it ) + { + if (*it == delim || *it == escape) + os << escape; + os << *it; + } + os << delim; + return os; + } + + // inserter for const std::basic_string& proxies + template + inline + std::basic_ostream& operator<<(std::basic_ostream& os, + const quoted_proxy const &, Char>& proxy) + { + return basic_string_inserter_imp(os, proxy.string, proxy.escape, proxy.delim); + } + + // inserter for non-const std::basic_string& proxies + template + inline + std::basic_ostream& operator<<(std::basic_ostream& os, + const quoted_proxy&, Char>& proxy) + { + return basic_string_inserter_imp(os, proxy.string, proxy.escape, proxy.delim); + } + + // inserter for const C-string* proxies + template + std::basic_ostream& operator<<(std::basic_ostream& os, + const quoted_proxy& proxy) + { + os << proxy.delim; + for (const Char* it = proxy.string; + *it; + ++it ) + { + if (*it == proxy.delim || *it == proxy.escape) + os << proxy.escape; + os << *it; + } + os << proxy.delim; + return os; + } + + // extractor for non-const std::basic_string& proxies + template + std::basic_istream& operator>>(std::basic_istream& is, + const quoted_proxy&, Char>& proxy) + { + proxy.string.clear(); + Char c; + is >> c; + if (c != proxy.delim) + { + is.unget(); + is >> proxy.string; + return is; + } + { + boost::io::ios_flags_saver ifs(is); + is >> std::noskipws; + for (;;) + { + is >> c; + if (!is.good()) // cope with I/O errors or end-of-file + break; + if (c == proxy.escape) + { + is >> c; + if (!is.good()) // cope with I/O errors or end-of-file + break; + } + else if (c == proxy.delim) + break; + proxy.string += c; + } + } + return is; + } + + } // namespace detail + + // manipulator implementation for const std::basic_string& + template + inline detail::quoted_proxy const &, Char> + quoted(const std::basic_string& s, Char escape, Char delim) + { + return detail::quoted_proxy const &, Char> + (s, escape, delim); + } + + // manipulator implementation for non-const std::basic_string& + template + inline detail::quoted_proxy &, Char> + quoted(std::basic_string& s, Char escape, Char delim) + { + return detail::quoted_proxy&, Char> + (s, escape, delim); + } + + // manipulator implementation for const C-string* + template + inline detail::quoted_proxy + quoted(const Char* s, Char escape, Char delim) + { + return detail::quoted_proxy (s, escape, delim); + } + + } // namespace io +} // namespace boost + +#endif // BOOST_IO_QUOTED_MANIP diff --git a/ThirdParty/boost-Subset/boost/io/ios_state.hpp b/ThirdParty/boost-Subset/boost/io/ios_state.hpp new file mode 100644 index 0000000000..07cfb345ff --- /dev/null +++ b/ThirdParty/boost-Subset/boost/io/ios_state.hpp @@ -0,0 +1,439 @@ +// Boost io/ios_state.hpp header file --------------------------------------// + +// Copyright 2002, 2005 Daryle Walker. Use, modification, and distribution +// are subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or a copy at .) + +// See for the library's home page. + +#ifndef BOOST_IO_IOS_STATE_HPP +#define BOOST_IO_IOS_STATE_HPP + +#include // self include +#include + +#include // for std::ios_base, std::basic_ios, etc. +#ifndef BOOST_NO_STD_LOCALE +#include // for std::locale +#endif +#include // for std::basic_ostream +#include // for std::basic_streambuf +#include // for std::char_traits + + +namespace boost +{ +namespace io +{ + + +// Basic stream state saver class declarations -----------------------------// + +class ios_flags_saver +{ +public: + typedef ::std::ios_base state_type; + typedef ::std::ios_base::fmtflags aspect_type; + + explicit ios_flags_saver( state_type &s ) + : s_save_( s ), a_save_( s.flags() ) + {} + ios_flags_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.flags(a) ) + {} + ~ios_flags_saver() + { this->restore(); } + + void restore() + { s_save_.flags( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + + ios_flags_saver& operator=(const ios_flags_saver&); +}; + +class ios_precision_saver +{ +public: + typedef ::std::ios_base state_type; + typedef ::std::streamsize aspect_type; + + explicit ios_precision_saver( state_type &s ) + : s_save_( s ), a_save_( s.precision() ) + {} + ios_precision_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.precision(a) ) + {} + ~ios_precision_saver() + { this->restore(); } + + void restore() + { s_save_.precision( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + + ios_precision_saver& operator=(const ios_precision_saver&); +}; + +class ios_width_saver +{ +public: + typedef ::std::ios_base state_type; + typedef ::std::streamsize aspect_type; + + explicit ios_width_saver( state_type &s ) + : s_save_( s ), a_save_( s.width() ) + {} + ios_width_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.width(a) ) + {} + ~ios_width_saver() + { this->restore(); } + + void restore() + { s_save_.width( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + ios_width_saver& operator=(const ios_width_saver&); +}; + + +// Advanced stream state saver class template declarations -----------------// + +template < typename Ch, class Tr > +class basic_ios_iostate_saver +{ +public: + typedef ::std::basic_ios state_type; + typedef ::std::ios_base::iostate aspect_type; + + explicit basic_ios_iostate_saver( state_type &s ) + : s_save_( s ), a_save_( s.rdstate() ) + {} + basic_ios_iostate_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.rdstate() ) + { s.clear(a); } + ~basic_ios_iostate_saver() + { this->restore(); } + + void restore() + { s_save_.clear( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + basic_ios_iostate_saver& operator=(const basic_ios_iostate_saver&); +}; + +template < typename Ch, class Tr > +class basic_ios_exception_saver +{ +public: + typedef ::std::basic_ios state_type; + typedef ::std::ios_base::iostate aspect_type; + + explicit basic_ios_exception_saver( state_type &s ) + : s_save_( s ), a_save_( s.exceptions() ) + {} +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) + basic_ios_exception_saver( state_type &s, aspect_type a ) +#else + basic_ios_exception_saver( state_type &s, aspect_type const &a ) +#endif + : s_save_( s ), a_save_( s.exceptions() ) + { s.exceptions(a); } + ~basic_ios_exception_saver() + { this->restore(); } + + void restore() + { s_save_.exceptions( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + basic_ios_exception_saver& operator=(const basic_ios_exception_saver&); +}; + +template < typename Ch, class Tr > +class basic_ios_tie_saver +{ +public: + typedef ::std::basic_ios state_type; + typedef ::std::basic_ostream * aspect_type; + + explicit basic_ios_tie_saver( state_type &s ) + : s_save_( s ), a_save_( s.tie() ) + {} + basic_ios_tie_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.tie(a) ) + {} + ~basic_ios_tie_saver() + { this->restore(); } + + void restore() + { s_save_.tie( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + basic_ios_tie_saver& operator=(const basic_ios_tie_saver&); +}; + +template < typename Ch, class Tr > +class basic_ios_rdbuf_saver +{ +public: + typedef ::std::basic_ios state_type; + typedef ::std::basic_streambuf * aspect_type; + + explicit basic_ios_rdbuf_saver( state_type &s ) + : s_save_( s ), a_save_( s.rdbuf() ) + {} + basic_ios_rdbuf_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.rdbuf(a) ) + {} + ~basic_ios_rdbuf_saver() + { this->restore(); } + + void restore() + { s_save_.rdbuf( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + basic_ios_rdbuf_saver& operator=(const basic_ios_rdbuf_saver&); +}; + +template < typename Ch, class Tr > +class basic_ios_fill_saver +{ +public: + typedef ::std::basic_ios state_type; + typedef typename state_type::char_type aspect_type; + + explicit basic_ios_fill_saver( state_type &s ) + : s_save_( s ), a_save_( s.fill() ) + {} + basic_ios_fill_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.fill(a) ) + {} + ~basic_ios_fill_saver() + { this->restore(); } + + void restore() + { s_save_.fill( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + basic_ios_fill_saver& operator=(const basic_ios_fill_saver&); +}; + +#ifndef BOOST_NO_STD_LOCALE +template < typename Ch, class Tr > +class basic_ios_locale_saver +{ +public: + typedef ::std::basic_ios state_type; + typedef ::std::locale aspect_type; + + explicit basic_ios_locale_saver( state_type &s ) + : s_save_( s ), a_save_( s.getloc() ) + {} + basic_ios_locale_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.imbue(a) ) + {} + ~basic_ios_locale_saver() + { this->restore(); } + + void restore() + { s_save_.imbue( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + basic_ios_locale_saver& operator=(const basic_ios_locale_saver&); +}; +#endif + + +// User-defined stream state saver class declarations ----------------------// + +class ios_iword_saver +{ +public: + typedef ::std::ios_base state_type; + typedef int index_type; + typedef long aspect_type; + + explicit ios_iword_saver( state_type &s, index_type i ) + : s_save_( s ), a_save_( s.iword(i) ), i_save_( i ) + {} + ios_iword_saver( state_type &s, index_type i, aspect_type const &a ) + : s_save_( s ), a_save_( s.iword(i) ), i_save_( i ) + { s.iword(i) = a; } + ~ios_iword_saver() + { this->restore(); } + + void restore() + { s_save_.iword( i_save_ ) = a_save_; } + +private: + state_type & s_save_; + aspect_type const a_save_; + index_type const i_save_; + + ios_iword_saver& operator=(const ios_iword_saver&); +}; + +class ios_pword_saver +{ +public: + typedef ::std::ios_base state_type; + typedef int index_type; + typedef void * aspect_type; + + explicit ios_pword_saver( state_type &s, index_type i ) + : s_save_( s ), a_save_( s.pword(i) ), i_save_( i ) + {} + ios_pword_saver( state_type &s, index_type i, aspect_type const &a ) + : s_save_( s ), a_save_( s.pword(i) ), i_save_( i ) + { s.pword(i) = a; } + ~ios_pword_saver() + { this->restore(); } + + void restore() + { s_save_.pword( i_save_ ) = a_save_; } + +private: + state_type & s_save_; + aspect_type const a_save_; + index_type const i_save_; + + ios_pword_saver operator=(const ios_pword_saver&); +}; + + +// Combined stream state saver class (template) declarations ---------------// + +class ios_base_all_saver +{ +public: + typedef ::std::ios_base state_type; + + explicit ios_base_all_saver( state_type &s ) + : s_save_( s ), a1_save_( s.flags() ), a2_save_( s.precision() ) + , a3_save_( s.width() ) + {} + + ~ios_base_all_saver() + { this->restore(); } + + void restore() + { + s_save_.width( a3_save_ ); + s_save_.precision( a2_save_ ); + s_save_.flags( a1_save_ ); + } + +private: + state_type & s_save_; + state_type::fmtflags const a1_save_; + ::std::streamsize const a2_save_; + ::std::streamsize const a3_save_; + + ios_base_all_saver& operator=(const ios_base_all_saver&); +}; + +template < typename Ch, class Tr > +class basic_ios_all_saver +{ +public: + typedef ::std::basic_ios state_type; + + explicit basic_ios_all_saver( state_type &s ) + : s_save_( s ), a1_save_( s.flags() ), a2_save_( s.precision() ) + , a3_save_( s.width() ), a4_save_( s.rdstate() ) + , a5_save_( s.exceptions() ), a6_save_( s.tie() ) + , a7_save_( s.rdbuf() ), a8_save_( s.fill() ) + #ifndef BOOST_NO_STD_LOCALE + , a9_save_( s.getloc() ) + #endif + {} + + ~basic_ios_all_saver() + { this->restore(); } + + void restore() + { + #ifndef BOOST_NO_STD_LOCALE + s_save_.imbue( a9_save_ ); + #endif + s_save_.fill( a8_save_ ); + s_save_.rdbuf( a7_save_ ); + s_save_.tie( a6_save_ ); + s_save_.exceptions( a5_save_ ); + s_save_.clear( a4_save_ ); + s_save_.width( a3_save_ ); + s_save_.precision( a2_save_ ); + s_save_.flags( a1_save_ ); + } + +private: + state_type & s_save_; + typename state_type::fmtflags const a1_save_; + ::std::streamsize const a2_save_; + ::std::streamsize const a3_save_; + typename state_type::iostate const a4_save_; + typename state_type::iostate const a5_save_; + ::std::basic_ostream * const a6_save_; + ::std::basic_streambuf * const a7_save_; + typename state_type::char_type const a8_save_; + #ifndef BOOST_NO_STD_LOCALE + ::std::locale const a9_save_; + #endif + + basic_ios_all_saver& operator=(const basic_ios_all_saver&); +}; + +class ios_all_word_saver +{ +public: + typedef ::std::ios_base state_type; + typedef int index_type; + + ios_all_word_saver( state_type &s, index_type i ) + : s_save_( s ), i_save_( i ), a1_save_( s.iword(i) ) + , a2_save_( s.pword(i) ) + {} + + ~ios_all_word_saver() + { this->restore(); } + + void restore() + { + s_save_.pword( i_save_ ) = a2_save_; + s_save_.iword( i_save_ ) = a1_save_; + } + +private: + state_type & s_save_; + index_type const i_save_; + long const a1_save_; + void * const a2_save_; + + ios_all_word_saver& operator=(const ios_all_word_saver&); +}; + + +} // namespace io +} // namespace boost + + +#endif // BOOST_IO_IOS_STATE_HPP diff --git a/ThirdParty/boost-Subset/boost/io_fwd.hpp b/ThirdParty/boost-Subset/boost/io_fwd.hpp new file mode 100644 index 0000000000..417b81e3e1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/io_fwd.hpp @@ -0,0 +1,67 @@ +// Boost io_fwd.hpp header file --------------------------------------------// + +// Copyright 2002 Daryle Walker. Use, modification, and distribution are subject +// to the Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or a copy at .) + +// See for the library's home page. + +#ifndef BOOST_IO_FWD_HPP +#define BOOST_IO_FWD_HPP + +#include // for std::char_traits (declaration) + + +namespace boost +{ +namespace io +{ + + +// From -------------------------------------------// + +class ios_flags_saver; +class ios_precision_saver; +class ios_width_saver; +class ios_base_all_saver; + +template < typename Ch, class Tr = ::std::char_traits > + class basic_ios_iostate_saver; +template < typename Ch, class Tr = ::std::char_traits > + class basic_ios_exception_saver; +template < typename Ch, class Tr = ::std::char_traits > + class basic_ios_tie_saver; +template < typename Ch, class Tr = ::std::char_traits > + class basic_ios_rdbuf_saver; +template < typename Ch, class Tr = ::std::char_traits > + class basic_ios_fill_saver; +template < typename Ch, class Tr = ::std::char_traits > + class basic_ios_locale_saver; +template < typename Ch, class Tr = ::std::char_traits > + class basic_ios_all_saver; + +typedef basic_ios_iostate_saver ios_iostate_saver; +typedef basic_ios_iostate_saver wios_iostate_saver; +typedef basic_ios_exception_saver ios_exception_saver; +typedef basic_ios_exception_saver wios_exception_saver; +typedef basic_ios_tie_saver ios_tie_saver; +typedef basic_ios_tie_saver wios_tie_saver; +typedef basic_ios_rdbuf_saver ios_rdbuf_saver; +typedef basic_ios_rdbuf_saver wios_rdbuf_saver; +typedef basic_ios_fill_saver ios_fill_saver; +typedef basic_ios_fill_saver wios_fill_saver; +typedef basic_ios_locale_saver ios_locale_saver; +typedef basic_ios_locale_saver wios_locale_saver; +typedef basic_ios_all_saver ios_all_saver; +typedef basic_ios_all_saver wios_all_saver; + +class ios_iword_saver; +class ios_pword_saver; +class ios_all_word_saver; + + +} // namespace io +} // namespace boost + + +#endif // BOOST_IO_FWD_HPP diff --git a/ThirdParty/boost-Subset/boost/is_placeholder.hpp b/ThirdParty/boost-Subset/boost/is_placeholder.hpp new file mode 100644 index 0000000000..5f1b544f94 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/is_placeholder.hpp @@ -0,0 +1,31 @@ +#ifndef BOOST_IS_PLACEHOLDER_HPP_INCLUDED +#define BOOST_IS_PLACEHOLDER_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined( _MSC_VER ) && ( _MSC_VER >= 1020 ) +# pragma once +#endif + + +// is_placeholder.hpp - TR1 is_placeholder metafunction +// +// Copyright (c) 2006 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + + +namespace boost +{ + +template< class T > struct is_placeholder +{ + enum _vt { value = 0 }; +}; + +} // namespace boost + +#endif // #ifndef BOOST_IS_PLACEHOLDER_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/iterator.hpp b/ThirdParty/boost-Subset/boost/iterator.hpp new file mode 100644 index 0000000000..c9c6197950 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/iterator.hpp @@ -0,0 +1,20 @@ +// (C) Copyright Beman Dawes 2000. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_ITERATOR_HPP +#define BOOST_ITERATOR_HPP + +// This header is obsolete and will be deprecated. + +#include +#include // std::ptrdiff_t + +namespace boost +{ + +using std::iterator; + +} // namespace boost + +#endif // BOOST_ITERATOR_HPP diff --git a/ThirdParty/boost-Subset/boost/iterator/detail/config_def.hpp b/ThirdParty/boost-Subset/boost/iterator/detail/config_def.hpp new file mode 100644 index 0000000000..117e75a76d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/iterator/detail/config_def.hpp @@ -0,0 +1,128 @@ +// (C) Copyright David Abrahams 2002. +// (C) Copyright Jeremy Siek 2002. +// (C) Copyright Thomas Witt 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// no include guard multiple inclusion intended + +// +// This is a temporary workaround until the bulk of this is +// available in boost config. +// 23/02/03 thw +// + +#include // for prior +#include + +#ifdef BOOST_ITERATOR_CONFIG_DEF +# error you have nested config_def #inclusion. +#else +# define BOOST_ITERATOR_CONFIG_DEF +#endif + +// We enable this always now. Otherwise, the simple case in +// libs/iterator/test/constant_iterator_arrow.cpp fails to compile +// because the operator-> return is improperly deduced as a non-const +// pointer. +#if 1 || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x531)) + +// Recall that in general, compilers without partial specialization +// can't strip constness. Consider counting_iterator, which normally +// passes a const Value to iterator_facade. As a result, any code +// which makes a std::vector of the iterator's value_type will fail +// when its allocator declares functions overloaded on reference and +// const_reference (the same type). +// +// Furthermore, Borland 5.5.1 drops constness in enough ways that we +// end up using a proxy for operator[] when we otherwise shouldn't. +// Using reference constness gives it an extra hint that it can +// return the value_type from operator[] directly, but is not +// strictly necessary. Not sure how best to resolve this one. + +# define BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY 1 + +#endif + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x5A0)) \ + || (BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 700) && defined(_MSC_VER)) \ + || BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) \ + || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590)) + +# define BOOST_NO_LVALUE_RETURN_DETECTION + +# if 0 // test code + struct v {}; + + typedef char (&no)[3]; + + template + no foo(T const&, ...); + + template + char foo(T&, int); + + + struct value_iterator + { + v operator*() const; + }; + + template + struct lvalue_deref_helper + { + static T& x; + enum { value = (sizeof(foo(*x,0)) == 1) }; + }; + + int z2[(lvalue_deref_helper::value == 1) ? 1 : -1]; + int z[(lvalue_deref_helper::value) == 1 ? -1 : 1 ]; +# endif + +#endif + +#if BOOST_WORKAROUND(__MWERKS__, <=0x2407) +# define BOOST_NO_IS_CONVERTIBLE // "is_convertible doesn't work for simple types" +#endif + +#if BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, < 4) && !defined(__EDG_VERSION__) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) +# define BOOST_NO_IS_CONVERTIBLE_TEMPLATE // The following program fails to compile: + +# if 0 // test code + #include + template + struct foo + { + foo(T); + + template + foo(foo const& other) : p(other.p) { } + + T p; + }; + + bool x = boost::is_convertible, foo >::value; +# endif + +#endif + + +#if !defined(BOOST_MSVC) && (defined(BOOST_NO_SFINAE) || defined(BOOST_NO_IS_CONVERTIBLE) || defined(BOOST_NO_IS_CONVERTIBLE_TEMPLATE)) +# define BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY +#endif + +# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) + +// GCC-2.95 (obsolete) eagerly instantiates templated constructors and conversion +// operators in convertibility checks, causing premature errors. +// +// Borland's problems are harder to diagnose due to lack of an +// instantiation stack backtrace. They may be due in part to the fact +// that it drops cv-qualification willy-nilly in templates. +# define BOOST_NO_ONE_WAY_ITERATOR_INTEROP +# endif + +// no include guard; multiple inclusion intended diff --git a/ThirdParty/boost-Subset/boost/iterator/detail/config_undef.hpp b/ThirdParty/boost-Subset/boost/iterator/detail/config_undef.hpp new file mode 100644 index 0000000000..bf1b8d708c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/iterator/detail/config_undef.hpp @@ -0,0 +1,24 @@ +// (C) Copyright Thomas Witt 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// no include guard multiple inclusion intended + +// +// This is a temporary workaround until the bulk of this is +// available in boost config. +// 23/02/03 thw +// + +#undef BOOST_NO_IS_CONVERTIBLE +#undef BOOST_NO_IS_CONVERTIBLE_TEMPLATE +#undef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY +#undef BOOST_NO_LVALUE_RETURN_DETECTION +#undef BOOST_NO_ONE_WAY_ITERATOR_INTEROP + +#ifdef BOOST_ITERATOR_CONFIG_DEF +# undef BOOST_ITERATOR_CONFIG_DEF +#else +# error missing or nested #include config_def +#endif diff --git a/ThirdParty/boost-Subset/boost/iterator/detail/enable_if.hpp b/ThirdParty/boost-Subset/boost/iterator/detail/enable_if.hpp new file mode 100644 index 0000000000..071f5fe81d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/iterator/detail/enable_if.hpp @@ -0,0 +1,83 @@ +// (C) Copyright David Abrahams 2002. +// (C) Copyright Jeremy Siek 2002. +// (C) Copyright Thomas Witt 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_ENABLE_IF_23022003THW_HPP +#define BOOST_ENABLE_IF_23022003THW_HPP + +#include +#include + +#include + +// +// Boost iterators uses its own enable_if cause we need +// special semantics for deficient compilers. +// 23/02/03 thw +// + +namespace boost +{ + + namespace iterators + { + // + // Base machinery for all kinds of enable if + // + template + struct enabled + { + template + struct base + { + typedef T type; + }; + }; + + // + // For compilers that don't support "Substitution Failure Is Not An Error" + // enable_if falls back to always enabled. See comments + // on operator implementation for consequences. + // + template<> + struct enabled + { + template + struct base + { +#ifdef BOOST_NO_SFINAE + + typedef T type; + + // This way to do it would give a nice error message containing + // invalid overload, but has the big disadvantage that + // there is no reference to user code in the error message. + // + // struct invalid_overload; + // typedef invalid_overload type; + // +#endif + }; + }; + + + template + struct enable_if +# if !defined(BOOST_NO_SFINAE) && !defined(BOOST_NO_IS_CONVERTIBLE) + : enabled<(Cond::value)>::template base +# else + : mpl::identity +# endif + { + }; + + } // namespace iterators + +} // namespace boost + +#include + +#endif // BOOST_ENABLE_IF_23022003THW_HPP diff --git a/ThirdParty/boost-Subset/boost/iterator/detail/facade_iterator_category.hpp b/ThirdParty/boost-Subset/boost/iterator/detail/facade_iterator_category.hpp new file mode 100644 index 0000000000..67fdf446b0 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/iterator/detail/facade_iterator_category.hpp @@ -0,0 +1,193 @@ +// Copyright David Abrahams 2003. Use, modification and distribution is +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef FACADE_ITERATOR_CATEGORY_DWA20031118_HPP +# define FACADE_ITERATOR_CATEGORY_DWA20031118_HPP + +# include + +# include // used in iterator_tag inheritance logic +# include +# include +# include +# include +# include + +# include +# include +# include +# include + +# include + +# include // try to keep this last + +# ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY +# include +# endif + +// +// iterator_category deduction for iterator_facade +// + +namespace boost { +namespace iterators { + +// forward declaration +struct use_default; + +namespace detail { + +struct input_output_iterator_tag + : std::input_iterator_tag +{ + // Using inheritance for only input_iterator_tag helps to avoid + // ambiguities when a stdlib implementation dispatches on a + // function which is overloaded on both input_iterator_tag and + // output_iterator_tag, as STLPort does, in its __valid_range + // function. I claim it's better to avoid the ambiguity in these + // cases. + operator std::output_iterator_tag() const + { + return std::output_iterator_tag(); + } +}; + +// +// True iff the user has explicitly disabled writability of this +// iterator. Pass the iterator_facade's Value parameter and its +// nested ::reference type. +// +template +struct iterator_writability_disabled +# ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY // Adding Thomas' logic? + : mpl::or_< + is_const + , boost::detail::indirect_traits::is_reference_to_const + , is_const + > +# else + : is_const +# endif +{}; + + +// +// Convert an iterator_facade's traversal category, Value parameter, +// and ::reference type to an appropriate old-style category. +// +// Due to changeset 21683, this now never results in a category convertible +// to output_iterator_tag. +// +// Change at: https://svn.boost.org/trac/boost/changeset/21683 +template +struct iterator_facade_default_category + : mpl::eval_if< + mpl::and_< + is_reference + , is_convertible + > + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::if_< + is_convertible + , std::bidirectional_iterator_tag + , std::forward_iterator_tag + > + > + , typename mpl::eval_if< + mpl::and_< + is_convertible + + // check for readability + , is_convertible + > + , mpl::identity + , mpl::identity + > + > +{ +}; + +// True iff T is convertible to an old-style iterator category. +template +struct is_iterator_category + : mpl::or_< + is_convertible + , is_convertible + > +{ +}; + +template +struct is_iterator_traversal + : is_convertible +{}; + +// +// A composite iterator_category tag convertible to Category (a pure +// old-style category) and Traversal (a pure traversal tag). +// Traversal must be a strict increase of the traversal power given by +// Category. +// +template +struct iterator_category_with_traversal + : Category, Traversal +{ + // Make sure this isn't used to build any categories where + // convertibility to Traversal is redundant. Should just use the + // Category element in that case. + BOOST_MPL_ASSERT_NOT(( + is_convertible< + typename iterator_category_to_traversal::type + , Traversal + >)); + + BOOST_MPL_ASSERT((is_iterator_category)); + BOOST_MPL_ASSERT_NOT((is_iterator_category)); + BOOST_MPL_ASSERT_NOT((is_iterator_traversal)); +# if !BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310)) + BOOST_MPL_ASSERT((is_iterator_traversal)); +# endif +}; + +// Computes an iterator_category tag whose traversal is Traversal and +// which is appropriate for an iterator +template +struct facade_iterator_category_impl +{ + BOOST_MPL_ASSERT_NOT((is_iterator_category)); + + typedef typename iterator_facade_default_category< + Traversal,ValueParam,Reference + >::type category; + + typedef typename mpl::if_< + is_same< + Traversal + , typename iterator_category_to_traversal::type + > + , category + , iterator_category_with_traversal + >::type type; +}; + +// +// Compute an iterator_category for iterator_facade +// +template +struct facade_iterator_category + : mpl::eval_if< + is_iterator_category + , mpl::identity // old-style categories are fine as-is + , facade_iterator_category_impl + > +{ +}; + +}}} // namespace boost::iterators::detail + +# include + +#endif // FACADE_ITERATOR_CATEGORY_DWA20031118_HPP diff --git a/ThirdParty/boost-Subset/boost/iterator/interoperable.hpp b/ThirdParty/boost-Subset/boost/iterator/interoperable.hpp new file mode 100644 index 0000000000..6f3c872a27 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/iterator/interoperable.hpp @@ -0,0 +1,54 @@ +// (C) Copyright David Abrahams 2002. +// (C) Copyright Jeremy Siek 2002. +// (C) Copyright Thomas Witt 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_INTEROPERABLE_23022003THW_HPP +# define BOOST_INTEROPERABLE_23022003THW_HPP + +# include +# include + +# include + +# include // must appear last + +namespace boost { +namespace iterators { + + // + // Meta function that determines whether two + // iterator types are considered interoperable. + // + // Two iterator types A,B are considered interoperable if either + // A is convertible to B or vice versa. + // This interoperability definition is in sync with the + // standards requirements on constant/mutable container + // iterators (23.1 [lib.container.requirements]). + // + // For compilers that don't support is_convertible + // is_interoperable gives false positives. See comments + // on operator implementation for consequences. + // + template + struct is_interoperable +# ifdef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY + : mpl::true_ +# else + : mpl::or_< + is_convertible< A, B > + , is_convertible< B, A > > +# endif + { + }; + +} // namespace iterators + +using iterators::is_interoperable; + +} // namespace boost + +# include + +#endif // BOOST_INTEROPERABLE_23022003THW_HPP diff --git a/ThirdParty/boost-Subset/boost/iterator/iterator_adaptor.hpp b/ThirdParty/boost-Subset/boost/iterator/iterator_adaptor.hpp new file mode 100644 index 0000000000..87cfd0583f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/iterator/iterator_adaptor.hpp @@ -0,0 +1,360 @@ +// (C) Copyright David Abrahams 2002. +// (C) Copyright Jeremy Siek 2002. +// (C) Copyright Thomas Witt 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_ITERATOR_ADAPTOR_23022003THW_HPP +#define BOOST_ITERATOR_ADAPTOR_23022003THW_HPP + +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include +#include + +#ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY +# include +#endif + +#include +#include + +#include + +namespace boost { +namespace iterators { + + // Used as a default template argument internally, merely to + // indicate "use the default", this can also be passed by users + // explicitly in order to specify that the default should be used. + struct use_default; + +} // namespace iterators + +using iterators::use_default; + +// the incompleteness of use_default causes massive problems for +// is_convertible (naturally). This workaround is fortunately not +// needed for vc6/vc7. +template +struct is_convertible + : mpl::false_ {}; + +namespace iterators { + + namespace detail + { + + // + // Result type used in enable_if_convertible meta function. + // This can be an incomplete type, as only pointers to + // enable_if_convertible< ... >::type are used. + // We could have used void for this, but conversion to + // void* is just to easy. + // + struct enable_type; + } + + + // + // enable_if for use in adapted iterators constructors. + // + // In order to provide interoperability between adapted constant and + // mutable iterators, adapted iterators will usually provide templated + // conversion constructors of the following form + // + // template + // class adapted_iterator : + // public iterator_adaptor< adapted_iterator, Iterator > + // { + // public: + // + // ... + // + // template + // adapted_iterator( + // OtherIterator const& it + // , typename enable_if_convertible::type* = 0); + // + // ... + // }; + // + // enable_if_convertible is used to remove those overloads from the overload + // set that cannot be instantiated. For all practical purposes only overloads + // for constant/mutable interaction will remain. This has the advantage that + // meta functions like boost::is_convertible do not return false positives, + // as they can only look at the signature of the conversion constructor + // and not at the actual instantiation. + // + // enable_if_interoperable can be safely used in user code. It falls back to + // always enabled for compilers that don't support enable_if or is_convertible. + // There is no need for compiler specific workarounds in user code. + // + // The operators implementation relies on boost::is_convertible not returning + // false positives for user/library defined iterator types. See comments + // on operator implementation for consequences. + // +# if defined(BOOST_NO_IS_CONVERTIBLE) || defined(BOOST_NO_SFINAE) + + template + struct enable_if_convertible + { + typedef boost::iterators::detail::enable_type type; + }; + +# elif BOOST_WORKAROUND(_MSC_FULL_VER, BOOST_TESTED_AT(13102292)) + + // For some reason vc7.1 needs us to "cut off" instantiation + // of is_convertible in a few cases. + template + struct enable_if_convertible + : iterators::enable_if< + mpl::or_< + is_same + , is_convertible + > + , boost::iterators::detail::enable_type + > + {}; + +# else + + template + struct enable_if_convertible + : iterators::enable_if< + is_convertible + , boost::iterators::detail::enable_type + > + {}; + +# endif + + // + // Default template argument handling for iterator_adaptor + // + namespace detail + { + // If T is use_default, return the result of invoking + // DefaultNullaryFn, otherwise return T. + template + struct ia_dflt_help + : mpl::eval_if< + is_same + , DefaultNullaryFn + , mpl::identity + > + { + }; + + // A metafunction which computes an iterator_adaptor's base class, + // a specialization of iterator_facade. + template < + class Derived + , class Base + , class Value + , class Traversal + , class Reference + , class Difference + > + struct iterator_adaptor_base + { + typedef iterator_facade< + Derived + +# ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY + , typename boost::iterators::detail::ia_dflt_help< + Value + , mpl::eval_if< + is_same + , iterator_value + , remove_reference + > + >::type +# else + , typename boost::iterators::detail::ia_dflt_help< + Value, iterator_value + >::type +# endif + + , typename boost::iterators::detail::ia_dflt_help< + Traversal + , iterator_traversal + >::type + + , typename boost::iterators::detail::ia_dflt_help< + Reference + , mpl::eval_if< + is_same + , iterator_reference + , add_reference + > + >::type + + , typename boost::iterators::detail::ia_dflt_help< + Difference, iterator_difference + >::type + > + type; + }; + + // workaround for aC++ CR JAGaf33512 + template + inline void iterator_adaptor_assert_traversal () + { + BOOST_STATIC_ASSERT((is_convertible::value)); + } + } + + // + // Iterator Adaptor + // + // The parameter ordering changed slightly with respect to former + // versions of iterator_adaptor The idea is that when the user needs + // to fiddle with the reference type it is highly likely that the + // iterator category has to be adjusted as well. Any of the + // following four template arguments may be ommitted or explicitly + // replaced by use_default. + // + // Value - if supplied, the value_type of the resulting iterator, unless + // const. If const, a conforming compiler strips constness for the + // value_type. If not supplied, iterator_traits::value_type is used + // + // Category - the traversal category of the resulting iterator. If not + // supplied, iterator_traversal::type is used. + // + // Reference - the reference type of the resulting iterator, and in + // particular, the result type of operator*(). If not supplied but + // Value is supplied, Value& is used. Otherwise + // iterator_traits::reference is used. + // + // Difference - the difference_type of the resulting iterator. If not + // supplied, iterator_traits::difference_type is used. + // + template < + class Derived + , class Base + , class Value = use_default + , class Traversal = use_default + , class Reference = use_default + , class Difference = use_default + > + class iterator_adaptor + : public boost::iterators::detail::iterator_adaptor_base< + Derived, Base, Value, Traversal, Reference, Difference + >::type + { + friend class iterator_core_access; + + protected: + typedef typename boost::iterators::detail::iterator_adaptor_base< + Derived, Base, Value, Traversal, Reference, Difference + >::type super_t; + public: + iterator_adaptor() {} + + explicit iterator_adaptor(Base const &iter) + : m_iterator(iter) + { + } + + typedef Base base_type; + + Base const& base() const + { return m_iterator; } + + protected: + // for convenience in derived classes + typedef iterator_adaptor iterator_adaptor_; + + // + // lvalue access to the Base object for Derived + // + Base const& base_reference() const + { return m_iterator; } + + Base& base_reference() + { return m_iterator; } + + private: + // + // Core iterator interface for iterator_facade. This is private + // to prevent temptation for Derived classes to use it, which + // will often result in an error. Derived classes should use + // base_reference(), above, to get direct access to m_iterator. + // + typename super_t::reference dereference() const + { return *m_iterator; } + + template < + class OtherDerived, class OtherIterator, class V, class C, class R, class D + > + bool equal(iterator_adaptor const& x) const + { + // Maybe readd with same_distance + // BOOST_STATIC_ASSERT( + // (detail::same_category_and_difference::value) + // ); + return m_iterator == x.base(); + } + + typedef typename iterator_category_to_traversal< + typename super_t::iterator_category + >::type my_traversal; + +# define BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(cat) \ + boost::iterators::detail::iterator_adaptor_assert_traversal(); + + void advance(typename super_t::difference_type n) + { + BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(random_access_traversal_tag) + m_iterator += n; + } + + void increment() { ++m_iterator; } + + void decrement() + { + BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(bidirectional_traversal_tag) + --m_iterator; + } + + template < + class OtherDerived, class OtherIterator, class V, class C, class R, class D + > + typename super_t::difference_type distance_to( + iterator_adaptor const& y) const + { + BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(random_access_traversal_tag) + // Maybe readd with same_distance + // BOOST_STATIC_ASSERT( + // (detail::same_category_and_difference::value) + // ); + return y.base() - m_iterator; + } + +# undef BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL + + private: // data members + Base m_iterator; + }; + +} // namespace iterators + +using iterators::iterator_adaptor; +using iterators::enable_if_convertible; + +} // namespace boost + +#include + +#endif // BOOST_ITERATOR_ADAPTOR_23022003THW_HPP diff --git a/ThirdParty/boost-Subset/boost/iterator/iterator_categories.hpp b/ThirdParty/boost-Subset/boost/iterator/iterator_categories.hpp new file mode 100644 index 0000000000..71202c993a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/iterator/iterator_categories.hpp @@ -0,0 +1,215 @@ +// (C) Copyright Jeremy Siek 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_ITERATOR_CATEGORIES_HPP +# define BOOST_ITERATOR_CATEGORIES_HPP + +# include +# include +# include + +# include + +# include +# include +# include +# include + +# include + +# include + +namespace boost { +namespace iterators { + +// +// Traversal Categories +// + +struct no_traversal_tag {}; + +struct incrementable_traversal_tag + : no_traversal_tag +{ +// incrementable_traversal_tag() {} +// incrementable_traversal_tag(std::output_iterator_tag const&) {}; +}; + +struct single_pass_traversal_tag + : incrementable_traversal_tag +{ +// single_pass_traversal_tag() {} +// single_pass_traversal_tag(std::input_iterator_tag const&) {}; +}; + +struct forward_traversal_tag + : single_pass_traversal_tag +{ +// forward_traversal_tag() {} +// forward_traversal_tag(std::forward_iterator_tag const&) {}; +}; + +struct bidirectional_traversal_tag + : forward_traversal_tag +{ +// bidirectional_traversal_tag() {}; +// bidirectional_traversal_tag(std::bidirectional_iterator_tag const&) {}; +}; + +struct random_access_traversal_tag + : bidirectional_traversal_tag +{ +// random_access_traversal_tag() {}; +// random_access_traversal_tag(std::random_access_iterator_tag const&) {}; +}; + +namespace detail +{ + // + // Convert a "strictly old-style" iterator category to a traversal + // tag. This is broken out into a separate metafunction to reduce + // the cost of instantiating iterator_category_to_traversal, below, + // for new-style types. + // + template + struct old_category_to_traversal + : mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , void + > + > + > + > + > + {}; + +} // namespace detail + +// +// Convert an iterator category into a traversal tag +// +template +struct iterator_category_to_traversal + : mpl::eval_if< // if already convertible to a traversal tag, we're done. + is_convertible + , mpl::identity + , boost::iterators::detail::old_category_to_traversal + > +{}; + +// Trait to get an iterator's traversal category +template +struct iterator_traversal + : iterator_category_to_traversal< + typename boost::detail::iterator_traits::iterator_category + > +{}; + +# ifdef BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT +// Hack because BOOST_MPL_AUX_LAMBDA_SUPPORT doesn't seem to work +// out well. Instantiating the nested apply template also +// requires instantiating iterator_traits on the +// placeholder. Instead we just specialize it as a metafunction +// class. +template <> +struct iterator_traversal +{ + template + struct apply : iterator_traversal + {}; +}; +template <> +struct iterator_traversal + : iterator_traversal +{}; +# endif + +// +// Convert an iterator traversal to one of the traversal tags. +// +template +struct pure_traversal_tag + : mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , void + > + > + > + > + > +{ +}; + +// +// Trait to retrieve one of the iterator traversal tags from the iterator category or traversal. +// +template +struct pure_iterator_traversal + : pure_traversal_tag::type> +{}; + +# ifdef BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT +template <> +struct pure_iterator_traversal +{ + template + struct apply : pure_iterator_traversal + {}; +}; +template <> +struct pure_iterator_traversal + : pure_iterator_traversal +{}; +# endif + +} // namespace iterators + +using iterators::no_traversal_tag; +using iterators::incrementable_traversal_tag; +using iterators::single_pass_traversal_tag; +using iterators::forward_traversal_tag; +using iterators::bidirectional_traversal_tag; +using iterators::random_access_traversal_tag; +using iterators::iterator_category_to_traversal; +using iterators::iterator_traversal; + +// This import is needed for backward compatibility with Boost.Range: +// boost/range/detail/demote_iterator_traversal_tag.hpp +// It should be removed when that header is fixed. +namespace detail { +using iterators::pure_traversal_tag; +} // namespace detail + +} // namespace boost + +#include + +#endif // BOOST_ITERATOR_CATEGORIES_HPP diff --git a/ThirdParty/boost-Subset/boost/iterator/iterator_concepts.hpp b/ThirdParty/boost-Subset/boost/iterator/iterator_concepts.hpp new file mode 100644 index 0000000000..1a9f7d6398 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/iterator/iterator_concepts.hpp @@ -0,0 +1,275 @@ +// (C) Copyright Jeremy Siek 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_ITERATOR_CONCEPTS_HPP +#define BOOST_ITERATOR_CONCEPTS_HPP + +#include +#include + +// Use boost::detail::iterator_traits to work around some MSVC/Dinkumware problems. +#include + +#include +#include + +#include +#include +#include +#include + +#include + +// Use boost/limits to work around missing limits headers on some compilers +#include +#include + +#include + +#include + +namespace boost_concepts +{ + // Used a different namespace here (instead of "boost") so that the + // concept descriptions do not take for granted the names in + // namespace boost. + + //=========================================================================== + // Iterator Access Concepts + + BOOST_concept(ReadableIterator,(Iterator)) + : boost::Assignable + , boost::CopyConstructible + + { + typedef BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type value_type; + typedef BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::reference reference; + + BOOST_CONCEPT_USAGE(ReadableIterator) + { + + value_type v = *i; + boost::ignore_unused_variable_warning(v); + } + private: + Iterator i; + }; + + template < + typename Iterator + , typename ValueType = BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type + > + struct WritableIterator + : boost::CopyConstructible + { + BOOST_CONCEPT_USAGE(WritableIterator) + { + *i = v; + } + private: + ValueType v; + Iterator i; + }; + + template < + typename Iterator + , typename ValueType = BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type + > + struct WritableIteratorConcept : WritableIterator {}; + + BOOST_concept(SwappableIterator,(Iterator)) + { + BOOST_CONCEPT_USAGE(SwappableIterator) + { + std::iter_swap(i1, i2); + } + private: + Iterator i1; + Iterator i2; + }; + + BOOST_concept(LvalueIterator,(Iterator)) + { + typedef typename boost::detail::iterator_traits::value_type value_type; + + BOOST_CONCEPT_USAGE(LvalueIterator) + { + value_type& r = const_cast(*i); + boost::ignore_unused_variable_warning(r); + } + private: + Iterator i; + }; + + + //=========================================================================== + // Iterator Traversal Concepts + + BOOST_concept(IncrementableIterator,(Iterator)) + : boost::Assignable + , boost::CopyConstructible + { + typedef typename boost::iterator_traversal::type traversal_category; + + BOOST_CONCEPT_ASSERT(( + boost::Convertible< + traversal_category + , boost::incrementable_traversal_tag + >)); + + BOOST_CONCEPT_USAGE(IncrementableIterator) + { + ++i; + (void)i++; + } + private: + Iterator i; + }; + + BOOST_concept(SinglePassIterator,(Iterator)) + : IncrementableIterator + , boost::EqualityComparable + + { + BOOST_CONCEPT_ASSERT(( + boost::Convertible< + BOOST_DEDUCED_TYPENAME SinglePassIterator::traversal_category + , boost::single_pass_traversal_tag + > )); + }; + + BOOST_concept(ForwardTraversal,(Iterator)) + : SinglePassIterator + , boost::DefaultConstructible + { + typedef typename boost::detail::iterator_traits::difference_type difference_type; + + BOOST_MPL_ASSERT((boost::is_integral)); + BOOST_MPL_ASSERT_RELATION(std::numeric_limits::is_signed, ==, true); + + BOOST_CONCEPT_ASSERT(( + boost::Convertible< + BOOST_DEDUCED_TYPENAME ForwardTraversal::traversal_category + , boost::forward_traversal_tag + > )); + }; + + BOOST_concept(BidirectionalTraversal,(Iterator)) + : ForwardTraversal + { + BOOST_CONCEPT_ASSERT(( + boost::Convertible< + BOOST_DEDUCED_TYPENAME BidirectionalTraversal::traversal_category + , boost::bidirectional_traversal_tag + > )); + + BOOST_CONCEPT_USAGE(BidirectionalTraversal) + { + --i; + (void)i--; + } + private: + Iterator i; + }; + + BOOST_concept(RandomAccessTraversal,(Iterator)) + : BidirectionalTraversal + { + BOOST_CONCEPT_ASSERT(( + boost::Convertible< + BOOST_DEDUCED_TYPENAME RandomAccessTraversal::traversal_category + , boost::random_access_traversal_tag + > )); + + BOOST_CONCEPT_USAGE(RandomAccessTraversal) + { + i += n; + i = i + n; + i = n + i; + i -= n; + i = i - n; + n = i - j; + } + + private: + typename BidirectionalTraversal::difference_type n; + Iterator i, j; + }; + + //=========================================================================== + // Iterator Interoperability + + namespace detail + { + template + void interop_single_pass_constraints(Iterator1 const& i1, Iterator2 const& i2) + { + bool b; + b = i1 == i2; + b = i1 != i2; + + b = i2 == i1; + b = i2 != i1; + boost::ignore_unused_variable_warning(b); + } + + template + void interop_rand_access_constraints( + Iterator1 const& i1, Iterator2 const& i2, + boost::random_access_traversal_tag, boost::random_access_traversal_tag) + { + bool b; + typename boost::detail::iterator_traits::difference_type n; + b = i1 < i2; + b = i1 <= i2; + b = i1 > i2; + b = i1 >= i2; + n = i1 - i2; + + b = i2 < i1; + b = i2 <= i1; + b = i2 > i1; + b = i2 >= i1; + n = i2 - i1; + boost::ignore_unused_variable_warning(b); + boost::ignore_unused_variable_warning(n); + } + + template + void interop_rand_access_constraints( + Iterator1 const&, Iterator2 const&, + boost::single_pass_traversal_tag, boost::single_pass_traversal_tag) + { } + + } // namespace detail + + BOOST_concept(InteroperableIterator,(Iterator)(ConstIterator)) + { + private: + typedef typename boost::iterators::pure_iterator_traversal::type traversal_category; + typedef typename boost::iterators::pure_iterator_traversal::type const_traversal_category; + + public: + BOOST_CONCEPT_ASSERT((SinglePassIterator)); + BOOST_CONCEPT_ASSERT((SinglePassIterator)); + + BOOST_CONCEPT_USAGE(InteroperableIterator) + { + detail::interop_single_pass_constraints(i, ci); + detail::interop_rand_access_constraints(i, ci, traversal_category(), const_traversal_category()); + + ci = i; + } + + private: + Iterator i; + ConstIterator ci; + }; + +} // namespace boost_concepts + +#include + +#endif // BOOST_ITERATOR_CONCEPTS_HPP diff --git a/ThirdParty/boost-Subset/boost/iterator/iterator_facade.hpp b/ThirdParty/boost-Subset/boost/iterator/iterator_facade.hpp new file mode 100644 index 0000000000..7b11d0aec1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/iterator/iterator_facade.hpp @@ -0,0 +1,980 @@ +// (C) Copyright David Abrahams 2002. +// (C) Copyright Jeremy Siek 2002. +// (C) Copyright Thomas Witt 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_ITERATOR_FACADE_23022003THW_HPP +#define BOOST_ITERATOR_FACADE_23022003THW_HPP + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include // this goes last + +namespace boost { +namespace iterators { + + // This forward declaration is required for the friend declaration + // in iterator_core_access + template class iterator_facade; + + namespace detail + { + // A binary metafunction class that always returns bool. VC6 + // ICEs on mpl::always, probably because of the default + // parameters. + struct always_bool2 + { + template + struct apply + { + typedef bool type; + }; + }; + + // The type trait checks if the category or traversal is at least as advanced as the specified required traversal + template< typename CategoryOrTraversal, typename Required > + struct is_traversal_at_least : + public boost::is_convertible< typename iterator_category_to_traversal< CategoryOrTraversal >::type, Required > + {}; + + // + // enable if for use in operator implementation. + // + template < + class Facade1 + , class Facade2 + , class Return + > + struct enable_if_interoperable : + public boost::iterators::enable_if< + is_interoperable< Facade1, Facade2 > + , Return + > + {}; + + // + // enable if for use in implementation of operators specific for random access traversal. + // + template < + class Facade1 + , class Facade2 + , class Return + > + struct enable_if_interoperable_and_random_access_traversal : + public boost::iterators::enable_if< + mpl::and_< + is_interoperable< Facade1, Facade2 > + , is_traversal_at_least< typename iterator_category< Facade1 >::type, random_access_traversal_tag > + , is_traversal_at_least< typename iterator_category< Facade2 >::type, random_access_traversal_tag > + > + , Return + > + {}; + + // + // Generates associated types for an iterator_facade with the + // given parameters. + // + template < + class ValueParam + , class CategoryOrTraversal + , class Reference + , class Difference + > + struct iterator_facade_types + { + typedef typename facade_iterator_category< + CategoryOrTraversal, ValueParam, Reference + >::type iterator_category; + + typedef typename remove_const::type value_type; + + // Not the real associated pointer type + typedef typename mpl::eval_if< + boost::iterators::detail::iterator_writability_disabled + , add_pointer + , add_pointer + >::type pointer; + +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && (BOOST_WORKAROUND(_STLPORT_VERSION, BOOST_TESTED_AT(0x452)) \ + || BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, BOOST_TESTED_AT(310))) \ + || BOOST_WORKAROUND(BOOST_RWSTD_VER, BOOST_TESTED_AT(0x20101)) \ + || BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, <= 310) + + // To interoperate with some broken library/compiler + // combinations, user-defined iterators must be derived from + // std::iterator. It is possible to implement a standard + // library for broken compilers without this limitation. +# define BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE 1 + + typedef + iterator + base; +# endif + }; + + // iterators whose dereference operators reference the same value + // for all iterators into the same sequence (like many input + // iterators) need help with their postfix ++: the referenced + // value must be read and stored away before the increment occurs + // so that *a++ yields the originally referenced element and not + // the next one. + template + class postfix_increment_proxy + { + typedef typename iterator_value::type value_type; + public: + explicit postfix_increment_proxy(Iterator const& x) + : stored_value(*x) + {} + + // Returning a mutable reference allows nonsense like + // (*r++).mutate(), but it imposes fewer assumptions about the + // behavior of the value_type. In particular, recall that + // (*r).mutate() is legal if operator* returns by value. + value_type& + operator*() const + { + return this->stored_value; + } + private: + mutable value_type stored_value; + }; + + // + // In general, we can't determine that such an iterator isn't + // writable -- we also need to store a copy of the old iterator so + // that it can be written into. + template + class writable_postfix_increment_proxy + { + typedef typename iterator_value::type value_type; + public: + explicit writable_postfix_increment_proxy(Iterator const& x) + : stored_value(*x) + , stored_iterator(x) + {} + + // Dereferencing must return a proxy so that both *r++ = o and + // value_type(*r++) can work. In this case, *r is the same as + // *r++, and the conversion operator below is used to ensure + // readability. + writable_postfix_increment_proxy const& + operator*() const + { + return *this; + } + + // Provides readability of *r++ + operator value_type&() const + { + return stored_value; + } + + // Provides writability of *r++ + template + T const& operator=(T const& x) const + { + *this->stored_iterator = x; + return x; + } + + // This overload just in case only non-const objects are writable + template + T& operator=(T& x) const + { + *this->stored_iterator = x; + return x; + } + + // Provides X(r++) + operator Iterator const&() const + { + return stored_iterator; + } + + private: + mutable value_type stored_value; + Iterator stored_iterator; + }; + +# ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + template + struct is_non_proxy_reference_impl + { + static Reference r; + + template + static typename mpl::if_< + is_convertible< + R const volatile* + , Value const volatile* + > + , char[1] + , char[2] + >::type& helper(R const&); + + BOOST_STATIC_CONSTANT(bool, value = sizeof(helper(r)) == 1); + }; + + template + struct is_non_proxy_reference + : mpl::bool_< + is_non_proxy_reference_impl::value + > + {}; +# else + template + struct is_non_proxy_reference + : is_convertible< + typename remove_reference::type + const volatile* + , Value const volatile* + > + {}; +# endif + + // A metafunction to choose the result type of postfix ++ + // + // Because the C++98 input iterator requirements say that *r++ has + // type T (value_type), implementations of some standard + // algorithms like lexicographical_compare may use constructions + // like: + // + // *r++ < *s++ + // + // If *r++ returns a proxy (as required if r is writable but not + // multipass), this sort of expression will fail unless the proxy + // supports the operator<. Since there are any number of such + // operations, we're not going to try to support them. Therefore, + // even if r++ returns a proxy, *r++ will only return a proxy if + // *r also returns a proxy. + template + struct postfix_increment_result + : mpl::eval_if< + mpl::and_< + // A proxy is only needed for readable iterators + is_convertible< + Reference + // Use add_lvalue_reference to form `reference to Value` due to + // some (strict) C++03 compilers (e.g. `gcc -std=c++03`) reject + // 'reference-to-reference' in the template which described in CWG + // DR106. + // http://www.open-std.org/Jtc1/sc22/wg21/docs/cwg_defects.html#106 + , typename add_lvalue_reference::type + > + + // No multipass iterator can have values that disappear + // before positions can be re-visited + , mpl::not_< + is_convertible< + typename iterator_category_to_traversal::type + , forward_traversal_tag + > + > + > + , mpl::if_< + is_non_proxy_reference + , postfix_increment_proxy + , writable_postfix_increment_proxy + > + , mpl::identity + > + {}; + + // operator->() needs special support for input iterators to strictly meet the + // standard's requirements. If *i is not a reference type, we must still + // produce an lvalue to which a pointer can be formed. We do that by + // returning a proxy object containing an instance of the reference object. + template + struct operator_arrow_dispatch // proxy references + { + struct proxy + { + explicit proxy(Reference const & x) : m_ref(x) {} + Reference* operator->() { return boost::addressof(m_ref); } + // This function is needed for MWCW and BCC, which won't call + // operator-> again automatically per 13.3.1.2 para 8 + operator Reference*() { return boost::addressof(m_ref); } + Reference m_ref; + }; + typedef proxy result_type; + static result_type apply(Reference const & x) + { + return result_type(x); + } + }; + + template + struct operator_arrow_dispatch // "real" references + { + typedef Pointer result_type; + static result_type apply(T& x) + { + return boost::addressof(x); + } + }; + + // A proxy return type for operator[], needed to deal with + // iterators that may invalidate referents upon destruction. + // Consider the temporary iterator in *(a + n) + template + class operator_brackets_proxy + { + // Iterator is actually an iterator_facade, so we do not have to + // go through iterator_traits to access the traits. + typedef typename Iterator::reference reference; + typedef typename Iterator::value_type value_type; + + public: + operator_brackets_proxy(Iterator const& iter) + : m_iter(iter) + {} + + operator reference() const + { + return *m_iter; + } + + operator_brackets_proxy& operator=(value_type const& val) + { + *m_iter = val; + return *this; + } + + private: + Iterator m_iter; + }; + + // A metafunction that determines whether operator[] must return a + // proxy, or whether it can simply return a copy of the value_type. + template + struct use_operator_brackets_proxy + : mpl::not_< + mpl::and_< + // Really we want an is_copy_constructible trait here, + // but is_POD will have to suffice in the meantime. + boost::is_POD + , iterator_writability_disabled + > + > + {}; + + template + struct operator_brackets_result + { + typedef typename mpl::if_< + use_operator_brackets_proxy + , operator_brackets_proxy + , Value + >::type type; + }; + + template + operator_brackets_proxy make_operator_brackets_result(Iterator const& iter, mpl::true_) + { + return operator_brackets_proxy(iter); + } + + template + typename Iterator::value_type make_operator_brackets_result(Iterator const& iter, mpl::false_) + { + return *iter; + } + + struct choose_difference_type + { + template + struct apply + : +# ifdef BOOST_NO_ONE_WAY_ITERATOR_INTEROP + iterator_difference +# else + mpl::eval_if< + is_convertible + , iterator_difference + , iterator_difference + > +# endif + {}; + + }; + + template < + class Derived + , class Value + , class CategoryOrTraversal + , class Reference + , class Difference + , bool IsBidirectionalTraversal + , bool IsRandomAccessTraversal + > + class iterator_facade_base; + + } // namespace detail + + + // Macros which describe the declarations of binary operators +# ifdef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY +# define BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, enabler) \ + template < \ + class Derived1, class V1, class TC1, class Reference1, class Difference1 \ + , class Derived2, class V2, class TC2, class Reference2, class Difference2 \ + > \ + prefix typename mpl::apply2::type \ + operator op( \ + iterator_facade const& lhs \ + , iterator_facade const& rhs) +# else +# define BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, enabler) \ + template < \ + class Derived1, class V1, class TC1, class Reference1, class Difference1 \ + , class Derived2, class V2, class TC2, class Reference2, class Difference2 \ + > \ + prefix typename enabler< \ + Derived1, Derived2 \ + , typename mpl::apply2::type \ + >::type \ + operator op( \ + iterator_facade const& lhs \ + , iterator_facade const& rhs) +# endif + +# define BOOST_ITERATOR_FACADE_INTEROP_HEAD(prefix, op, result_type) \ + BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, boost::iterators::detail::enable_if_interoperable) + +# define BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(prefix, op, result_type) \ + BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, boost::iterators::detail::enable_if_interoperable_and_random_access_traversal) + +# define BOOST_ITERATOR_FACADE_PLUS_HEAD(prefix,args) \ + template \ + prefix typename boost::iterators::enable_if< \ + boost::iterators::detail::is_traversal_at_least< TC, boost::iterators::random_access_traversal_tag >, \ + Derived \ + >::type operator+ args + + // + // Helper class for granting access to the iterator core interface. + // + // The simple core interface is used by iterator_facade. The core + // interface of a user/library defined iterator type should not be made public + // so that it does not clutter the public interface. Instead iterator_core_access + // should be made friend so that iterator_facade can access the core + // interface through iterator_core_access. + // + class iterator_core_access + { +# if defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) + // Tasteless as this may seem, making all members public allows member templates + // to work in the absence of member template friends. + public: +# else + + template friend class iterator_facade; + template + friend class detail::iterator_facade_base; + +# define BOOST_ITERATOR_FACADE_RELATION(op) \ + BOOST_ITERATOR_FACADE_INTEROP_HEAD(friend,op, boost::iterators::detail::always_bool2); + + BOOST_ITERATOR_FACADE_RELATION(==) + BOOST_ITERATOR_FACADE_RELATION(!=) + +# undef BOOST_ITERATOR_FACADE_RELATION + +# define BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(op) \ + BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(friend,op, boost::iterators::detail::always_bool2); + + BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<) + BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>) + BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<=) + BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>=) + +# undef BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION + + BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD( + friend, -, boost::iterators::detail::choose_difference_type) + ; + + BOOST_ITERATOR_FACADE_PLUS_HEAD( + friend inline + , (iterator_facade const& + , typename Derived::difference_type) + ) + ; + + BOOST_ITERATOR_FACADE_PLUS_HEAD( + friend inline + , (typename Derived::difference_type + , iterator_facade const&) + ) + ; + +# endif + + template + static typename Facade::reference dereference(Facade const& f) + { + return f.dereference(); + } + + template + static void increment(Facade& f) + { + f.increment(); + } + + template + static void decrement(Facade& f) + { + f.decrement(); + } + + template + static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::true_) + { + return f1.equal(f2); + } + + template + static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::false_) + { + return f2.equal(f1); + } + + template + static void advance(Facade& f, typename Facade::difference_type n) + { + f.advance(n); + } + + template + static typename Facade1::difference_type distance_from( + Facade1 const& f1, Facade2 const& f2, mpl::true_) + { + return -f1.distance_to(f2); + } + + template + static typename Facade2::difference_type distance_from( + Facade1 const& f1, Facade2 const& f2, mpl::false_) + { + return f2.distance_to(f1); + } + + // + // Curiously Recurring Template interface. + // + template + static I& derived(iterator_facade& facade) + { + return *static_cast(&facade); + } + + template + static I const& derived(iterator_facade const& facade) + { + return *static_cast(&facade); + } + + // objects of this class are useless + BOOST_DELETED_FUNCTION(iterator_core_access()) + }; + + namespace detail { + + // Implementation for forward traversal iterators + template < + class Derived + , class Value + , class CategoryOrTraversal + , class Reference + , class Difference + > + class iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, false, false > +# ifdef BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE + : public boost::iterators::detail::iterator_facade_types< + Value, CategoryOrTraversal, Reference, Difference + >::base +# undef BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE +# endif + { + private: + typedef boost::iterators::detail::iterator_facade_types< + Value, CategoryOrTraversal, Reference, Difference + > associated_types; + + typedef boost::iterators::detail::operator_arrow_dispatch< + Reference + , typename associated_types::pointer + > operator_arrow_dispatch_; + + public: + typedef typename associated_types::value_type value_type; + typedef Reference reference; + typedef Difference difference_type; + + typedef typename operator_arrow_dispatch_::result_type pointer; + + typedef typename associated_types::iterator_category iterator_category; + + public: + reference operator*() const + { + return iterator_core_access::dereference(this->derived()); + } + + pointer operator->() const + { + return operator_arrow_dispatch_::apply(*this->derived()); + } + + Derived& operator++() + { + iterator_core_access::increment(this->derived()); + return this->derived(); + } + + protected: + // + // Curiously Recurring Template interface. + // + Derived& derived() + { + return *static_cast(this); + } + + Derived const& derived() const + { + return *static_cast(this); + } + }; + + // Implementation for bidirectional traversal iterators + template < + class Derived + , class Value + , class CategoryOrTraversal + , class Reference + , class Difference + > + class iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, false > : + public iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, false, false > + { + public: + Derived& operator--() + { + iterator_core_access::decrement(this->derived()); + return this->derived(); + } + + Derived operator--(int) + { + Derived tmp(this->derived()); + --*this; + return tmp; + } + }; + + // Implementation for random access traversal iterators + template < + class Derived + , class Value + , class CategoryOrTraversal + , class Reference + , class Difference + > + class iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, true > : + public iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, false > + { + private: + typedef iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, false > base_type; + + public: + typedef typename base_type::reference reference; + typedef typename base_type::difference_type difference_type; + + public: + typename boost::iterators::detail::operator_brackets_result::type + operator[](difference_type n) const + { + typedef boost::iterators::detail::use_operator_brackets_proxy use_proxy; + + return boost::iterators::detail::make_operator_brackets_result( + this->derived() + n + , use_proxy() + ); + } + + Derived& operator+=(difference_type n) + { + iterator_core_access::advance(this->derived(), n); + return this->derived(); + } + + Derived& operator-=(difference_type n) + { + iterator_core_access::advance(this->derived(), -n); + return this->derived(); + } + + Derived operator-(difference_type x) const + { + Derived result(this->derived()); + return result -= x; + } + }; + + } // namespace detail + + // + // iterator_facade - use as a public base class for defining new + // standard-conforming iterators. + // + template < + class Derived // The derived iterator type being constructed + , class Value + , class CategoryOrTraversal + , class Reference = Value& + , class Difference = std::ptrdiff_t + > + class iterator_facade : + public detail::iterator_facade_base< + Derived, + Value, + CategoryOrTraversal, + Reference, + Difference, + detail::is_traversal_at_least< CategoryOrTraversal, bidirectional_traversal_tag >::value, + detail::is_traversal_at_least< CategoryOrTraversal, random_access_traversal_tag >::value + > + { + protected: + // For use by derived classes + typedef iterator_facade iterator_facade_; + }; + + template + inline typename boost::iterators::detail::postfix_increment_result::type + operator++( + iterator_facade& i + , int + ) + { + typename boost::iterators::detail::postfix_increment_result::type + tmp(*static_cast(&i)); + + ++i; + + return tmp; + } + + + // + // Comparison operator implementation. The library supplied operators + // enables the user to provide fully interoperable constant/mutable + // iterator types. I.e. the library provides all operators + // for all mutable/constant iterator combinations. + // + // Note though that this kind of interoperability for constant/mutable + // iterators is not required by the standard for container iterators. + // All the standard asks for is a conversion mutable -> constant. + // Most standard library implementations nowadays provide fully interoperable + // iterator implementations, but there are still heavily used implementations + // that do not provide them. (Actually it's even worse, they do not provide + // them for only a few iterators.) + // + // ?? Maybe a BOOST_ITERATOR_NO_FULL_INTEROPERABILITY macro should + // enable the user to turn off mixed type operators + // + // The library takes care to provide only the right operator overloads. + // I.e. + // + // bool operator==(Iterator, Iterator); + // bool operator==(ConstIterator, Iterator); + // bool operator==(Iterator, ConstIterator); + // bool operator==(ConstIterator, ConstIterator); + // + // ... + // + // In order to do so it uses c++ idioms that are not yet widely supported + // by current compiler releases. The library is designed to degrade gracefully + // in the face of compiler deficiencies. In general compiler + // deficiencies result in less strict error checking and more obscure + // error messages, functionality is not affected. + // + // For full operation compiler support for "Substitution Failure Is Not An Error" + // (aka. enable_if) and boost::is_convertible is required. + // + // The following problems occur if support is lacking. + // + // Pseudo code + // + // --------------- + // AdaptorA a1; + // AdaptorA a2; + // + // // This will result in a no such overload error in full operation + // // If enable_if or is_convertible is not supported + // // The instantiation will fail with an error hopefully indicating that + // // there is no operator== for Iterator1, Iterator2 + // // The same will happen if no enable_if is used to remove + // // false overloads from the templated conversion constructor + // // of AdaptorA. + // + // a1 == a2; + // ---------------- + // + // AdaptorA a; + // AdaptorB b; + // + // // This will result in a no such overload error in full operation + // // If enable_if is not supported the static assert used + // // in the operator implementation will fail. + // // This will accidently work if is_convertible is not supported. + // + // a == b; + // ---------------- + // + +# ifdef BOOST_NO_ONE_WAY_ITERATOR_INTEROP +# define BOOST_ITERATOR_CONVERTIBLE(a,b) mpl::true_() +# else +# define BOOST_ITERATOR_CONVERTIBLE(a,b) is_convertible() +# endif + +# define BOOST_ITERATOR_FACADE_INTEROP(op, result_type, return_prefix, base_op) \ + BOOST_ITERATOR_FACADE_INTEROP_HEAD(inline, op, result_type) \ + { \ + /* For those compilers that do not support enable_if */ \ + BOOST_STATIC_ASSERT(( \ + is_interoperable< Derived1, Derived2 >::value \ + )); \ + return_prefix iterator_core_access::base_op( \ + *static_cast(&lhs) \ + , *static_cast(&rhs) \ + , BOOST_ITERATOR_CONVERTIBLE(Derived2,Derived1) \ + ); \ + } + +# define BOOST_ITERATOR_FACADE_RELATION(op, return_prefix, base_op) \ + BOOST_ITERATOR_FACADE_INTEROP( \ + op \ + , boost::iterators::detail::always_bool2 \ + , return_prefix \ + , base_op \ + ) + + BOOST_ITERATOR_FACADE_RELATION(==, return, equal) + BOOST_ITERATOR_FACADE_RELATION(!=, return !, equal) + +# undef BOOST_ITERATOR_FACADE_RELATION + + +# define BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS(op, result_type, return_prefix, base_op) \ + BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(inline, op, result_type) \ + { \ + /* For those compilers that do not support enable_if */ \ + BOOST_STATIC_ASSERT(( \ + is_interoperable< Derived1, Derived2 >::value && \ + boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived1 >::type, random_access_traversal_tag >::value && \ + boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived2 >::type, random_access_traversal_tag >::value \ + )); \ + return_prefix iterator_core_access::base_op( \ + *static_cast(&lhs) \ + , *static_cast(&rhs) \ + , BOOST_ITERATOR_CONVERTIBLE(Derived2,Derived1) \ + ); \ + } + +# define BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(op, return_prefix, base_op) \ + BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS( \ + op \ + , boost::iterators::detail::always_bool2 \ + , return_prefix \ + , base_op \ + ) + + BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<, return 0 >, distance_from) + BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>, return 0 <, distance_from) + BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<=, return 0 >=, distance_from) + BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>=, return 0 <=, distance_from) + +# undef BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION + + // operator- requires an additional part in the static assertion + BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS( + - + , boost::iterators::detail::choose_difference_type + , return + , distance_from + ) + +# undef BOOST_ITERATOR_FACADE_INTEROP +# undef BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS + +# define BOOST_ITERATOR_FACADE_PLUS(args) \ + BOOST_ITERATOR_FACADE_PLUS_HEAD(inline, args) \ + { \ + Derived tmp(static_cast(i)); \ + return tmp += n; \ + } + + BOOST_ITERATOR_FACADE_PLUS(( + iterator_facade const& i + , typename Derived::difference_type n + )) + + BOOST_ITERATOR_FACADE_PLUS(( + typename Derived::difference_type n + , iterator_facade const& i + )) + +# undef BOOST_ITERATOR_FACADE_PLUS +# undef BOOST_ITERATOR_FACADE_PLUS_HEAD + +# undef BOOST_ITERATOR_FACADE_INTEROP_HEAD +# undef BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD +# undef BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL + +} // namespace iterators + +using iterators::iterator_core_access; +using iterators::iterator_facade; + +} // namespace boost + +#include + +#endif // BOOST_ITERATOR_FACADE_23022003THW_HPP diff --git a/ThirdParty/boost-Subset/boost/iterator/iterator_traits.hpp b/ThirdParty/boost-Subset/boost/iterator/iterator_traits.hpp new file mode 100644 index 0000000000..1a5f1e0d60 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/iterator/iterator_traits.hpp @@ -0,0 +1,60 @@ +// Copyright David Abrahams 2003. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef ITERATOR_TRAITS_DWA200347_HPP +# define ITERATOR_TRAITS_DWA200347_HPP + +# include +# include + +namespace boost { +namespace iterators { + +// Macro for supporting old compilers, no longer needed but kept +// for backwards compatibility (it was documented). +#define BOOST_ITERATOR_CATEGORY iterator_category + + +template +struct iterator_value +{ + typedef typename boost::detail::iterator_traits::value_type type; +}; + +template +struct iterator_reference +{ + typedef typename boost::detail::iterator_traits::reference type; +}; + + +template +struct iterator_pointer +{ + typedef typename boost::detail::iterator_traits::pointer type; +}; + +template +struct iterator_difference +{ + typedef typename boost::detail::iterator_traits::difference_type type; +}; + +template +struct iterator_category +{ + typedef typename boost::detail::iterator_traits::iterator_category type; +}; + +} // namespace iterators + +using iterators::iterator_value; +using iterators::iterator_reference; +using iterators::iterator_pointer; +using iterators::iterator_difference; +using iterators::iterator_category; + +} // namespace boost + +#endif // ITERATOR_TRAITS_DWA200347_HPP diff --git a/ThirdParty/boost-Subset/boost/iterator/reverse_iterator.hpp b/ThirdParty/boost-Subset/boost/iterator/reverse_iterator.hpp new file mode 100644 index 0000000000..3bef39e4b6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/iterator/reverse_iterator.hpp @@ -0,0 +1,74 @@ +// (C) Copyright David Abrahams 2002. +// (C) Copyright Jeremy Siek 2002. +// (C) Copyright Thomas Witt 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_REVERSE_ITERATOR_23022003THW_HPP +#define BOOST_REVERSE_ITERATOR_23022003THW_HPP + +#include +#include +#include + +namespace boost { +namespace iterators { + + // + // + // + template + class reverse_iterator + : public iterator_adaptor< reverse_iterator, Iterator > + { + typedef iterator_adaptor< reverse_iterator, Iterator > super_t; + + friend class iterator_core_access; + + public: + reverse_iterator() {} + + explicit reverse_iterator(Iterator x) + : super_t(x) {} + + template + reverse_iterator( + reverse_iterator const& r + , typename enable_if_convertible::type* = 0 + ) + : super_t(r.base()) + {} + + private: + typename super_t::reference dereference() const { return *boost::prior(this->base()); } + + void increment() { --this->base_reference(); } + void decrement() { ++this->base_reference(); } + + void advance(typename super_t::difference_type n) + { + this->base_reference() += -n; + } + + template + typename super_t::difference_type + distance_to(reverse_iterator const& y) const + { + return this->base_reference() - y.base(); + } + }; + + template + inline reverse_iterator make_reverse_iterator(BidirectionalIterator x) + { + return reverse_iterator(x); + } + +} // namespace iterators + +using iterators::reverse_iterator; +using iterators::make_reverse_iterator; + +} // namespace boost + +#endif // BOOST_REVERSE_ITERATOR_23022003THW_HPP diff --git a/ThirdParty/boost-Subset/boost/lexical_cast.hpp b/ThirdParty/boost-Subset/boost/lexical_cast.hpp new file mode 100644 index 0000000000..a880c0cd9c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/lexical_cast.hpp @@ -0,0 +1,106 @@ +// Copyright Kevlin Henney, 2000-2005. +// Copyright Alexander Nasonov, 2006-2010. +// Copyright Antony Polukhin, 2011-2014. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// what: lexical_cast custom keyword cast +// who: contributed by Kevlin Henney, +// enhanced with contributions from Terje Slettebo, +// with additional fixes and suggestions from Gennaro Prota, +// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov, +// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann, +// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters +// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014 + +#ifndef BOOST_LEXICAL_CAST_INCLUDED +#define BOOST_LEXICAL_CAST_INCLUDED + +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_WSTRING) +#define BOOST_LCAST_NO_WCHAR_T +#endif + +#include +#include +#include +#include + +namespace boost +{ + template + inline Target lexical_cast(const Source &arg) + { + boost::value_initialized result; + + if (!boost::conversion::detail::try_lexical_convert(arg, get(result))) { + boost::conversion::detail::throw_bad_cast(); + } + + return get(result); + } + + template + inline Target lexical_cast(const char* chars, std::size_t count) + { + return ::boost::lexical_cast( + ::boost::iterator_range(chars, chars + count) + ); + } + + template + inline Target lexical_cast(const unsigned char* chars, std::size_t count) + { + return ::boost::lexical_cast( + ::boost::iterator_range(chars, chars + count) + ); + } + + template + inline Target lexical_cast(const signed char* chars, std::size_t count) + { + return ::boost::lexical_cast( + ::boost::iterator_range(chars, chars + count) + ); + } + +#ifndef BOOST_LCAST_NO_WCHAR_T + template + inline Target lexical_cast(const wchar_t* chars, std::size_t count) + { + return ::boost::lexical_cast( + ::boost::iterator_range(chars, chars + count) + ); + } +#endif +#ifndef BOOST_NO_CXX11_CHAR16_T + template + inline Target lexical_cast(const char16_t* chars, std::size_t count) + { + return ::boost::lexical_cast( + ::boost::iterator_range(chars, chars + count) + ); + } +#endif +#ifndef BOOST_NO_CXX11_CHAR32_T + template + inline Target lexical_cast(const char32_t* chars, std::size_t count) + { + return ::boost::lexical_cast( + ::boost::iterator_range(chars, chars + count) + ); + } +#endif + +} // namespace boost + +#undef BOOST_LCAST_NO_WCHAR_T + +#endif // BOOST_LEXICAL_CAST_INCLUDED + diff --git a/ThirdParty/boost-Subset/boost/lexical_cast/bad_lexical_cast.hpp b/ThirdParty/boost-Subset/boost/lexical_cast/bad_lexical_cast.hpp new file mode 100644 index 0000000000..093121565e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/lexical_cast/bad_lexical_cast.hpp @@ -0,0 +1,101 @@ +// Copyright Kevlin Henney, 2000-2005. +// Copyright Alexander Nasonov, 2006-2010. +// Copyright Antony Polukhin, 2011-2014. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// what: lexical_cast custom keyword cast +// who: contributed by Kevlin Henney, +// enhanced with contributions from Terje Slettebo, +// with additional fixes and suggestions from Gennaro Prota, +// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov, +// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann, +// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters +// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014 + +#ifndef BOOST_LEXICAL_CAST_BAD_LEXICAL_CAST_HPP +#define BOOST_LEXICAL_CAST_BAD_LEXICAL_CAST_HPP + +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +#include +#include +#include + +namespace boost +{ + // exception used to indicate runtime lexical_cast failure + class BOOST_SYMBOL_VISIBLE bad_lexical_cast : + // workaround MSVC bug with std::bad_cast when _HAS_EXCEPTIONS == 0 +#if defined(BOOST_MSVC) && defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS + public std::exception +#else + public std::bad_cast +#endif + +#if defined(__BORLANDC__) && BOOST_WORKAROUND( __BORLANDC__, < 0x560 ) + // under bcc32 5.5.1 bad_cast doesn't derive from exception + , public std::exception +#endif + + { + public: + bad_lexical_cast() BOOST_NOEXCEPT +#ifndef BOOST_NO_TYPEID + : source(&typeid(void)), target(&typeid(void)) +#endif + {} + + virtual const char *what() const BOOST_NOEXCEPT_OR_NOTHROW { + return "bad lexical cast: " + "source type value could not be interpreted as target"; + } + + virtual ~bad_lexical_cast() BOOST_NOEXCEPT_OR_NOTHROW + {} + +#ifndef BOOST_NO_TYPEID + bad_lexical_cast( + const std::type_info &source_type_arg, + const std::type_info &target_type_arg) BOOST_NOEXCEPT + : source(&source_type_arg), target(&target_type_arg) + {} + + const std::type_info &source_type() const BOOST_NOEXCEPT { + return *source; + } + + const std::type_info &target_type() const BOOST_NOEXCEPT { + return *target; + } + + private: + const std::type_info *source; + const std::type_info *target; +#endif + }; + + namespace conversion { namespace detail { +#ifdef BOOST_NO_TYPEID + template + inline void throw_bad_cast() { + boost::throw_exception(bad_lexical_cast()); + } +#else + template + inline void throw_bad_cast() { + boost::throw_exception(bad_lexical_cast(typeid(S), typeid(T))); + } +#endif + }} // namespace conversion::detail + + +} // namespace boost + +#endif // BOOST_LEXICAL_CAST_BAD_LEXICAL_CAST_HPP + diff --git a/ThirdParty/boost-Subset/boost/lexical_cast/detail/converter_lexical.hpp b/ThirdParty/boost-Subset/boost/lexical_cast/detail/converter_lexical.hpp new file mode 100644 index 0000000000..6a7878bdbe --- /dev/null +++ b/ThirdParty/boost-Subset/boost/lexical_cast/detail/converter_lexical.hpp @@ -0,0 +1,495 @@ +// Copyright Kevlin Henney, 2000-2005. +// Copyright Alexander Nasonov, 2006-2010. +// Copyright Antony Polukhin, 2011-2014. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// what: lexical_cast custom keyword cast +// who: contributed by Kevlin Henney, +// enhanced with contributions from Terje Slettebo, +// with additional fixes and suggestions from Gennaro Prota, +// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov, +// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann, +// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters +// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014 + +#ifndef BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_HPP +#define BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_HPP + +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_WSTRING) +#define BOOST_LCAST_NO_WCHAR_T +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#ifndef BOOST_NO_CXX11_HDR_ARRAY +#include +#endif + +#include +#include +#include + +#include + +namespace boost { + + namespace detail // normalize_single_byte_char + { + // Converts signed/unsigned char to char + template < class Char > + struct normalize_single_byte_char + { + typedef Char type; + }; + + template <> + struct normalize_single_byte_char< signed char > + { + typedef char type; + }; + + template <> + struct normalize_single_byte_char< unsigned char > + { + typedef char type; + }; + } + + namespace detail // deduce_character_type_later + { + // Helper type, meaning that stram character for T must be deduced + // at Stage 2 (See deduce_source_char and deduce_target_char) + template < class T > struct deduce_character_type_later {}; + } + + namespace detail // stream_char_common + { + // Selectors to choose stream character type (common for Source and Target) + // Returns one of char, wchar_t, char16_t, char32_t or deduce_character_type_later types + // Executed on Stage 1 (See deduce_source_char and deduce_target_char) + template < typename Type > + struct stream_char_common: public boost::mpl::if_c< + boost::detail::is_character< Type >::value, + Type, + boost::detail::deduce_character_type_later< Type > + > {}; + + template < typename Char > + struct stream_char_common< Char* >: public boost::mpl::if_c< + boost::detail::is_character< Char >::value, + Char, + boost::detail::deduce_character_type_later< Char* > + > {}; + + template < typename Char > + struct stream_char_common< const Char* >: public boost::mpl::if_c< + boost::detail::is_character< Char >::value, + Char, + boost::detail::deduce_character_type_later< const Char* > + > {}; + + template < typename Char > + struct stream_char_common< boost::iterator_range< Char* > >: public boost::mpl::if_c< + boost::detail::is_character< Char >::value, + Char, + boost::detail::deduce_character_type_later< boost::iterator_range< Char* > > + > {}; + + template < typename Char > + struct stream_char_common< boost::iterator_range< const Char* > >: public boost::mpl::if_c< + boost::detail::is_character< Char >::value, + Char, + boost::detail::deduce_character_type_later< boost::iterator_range< const Char* > > + > {}; + + template < class Char, class Traits, class Alloc > + struct stream_char_common< std::basic_string< Char, Traits, Alloc > > + { + typedef Char type; + }; + + template < class Char, class Traits, class Alloc > + struct stream_char_common< boost::container::basic_string< Char, Traits, Alloc > > + { + typedef Char type; + }; + + template < typename Char, std::size_t N > + struct stream_char_common< boost::array< Char, N > >: public boost::mpl::if_c< + boost::detail::is_character< Char >::value, + Char, + boost::detail::deduce_character_type_later< boost::array< Char, N > > + > {}; + + template < typename Char, std::size_t N > + struct stream_char_common< boost::array< const Char, N > >: public boost::mpl::if_c< + boost::detail::is_character< Char >::value, + Char, + boost::detail::deduce_character_type_later< boost::array< const Char, N > > + > {}; + +#ifndef BOOST_NO_CXX11_HDR_ARRAY + template < typename Char, std::size_t N > + struct stream_char_common< std::array >: public boost::mpl::if_c< + boost::detail::is_character< Char >::value, + Char, + boost::detail::deduce_character_type_later< std::array< Char, N > > + > {}; + + template < typename Char, std::size_t N > + struct stream_char_common< std::array< const Char, N > >: public boost::mpl::if_c< + boost::detail::is_character< Char >::value, + Char, + boost::detail::deduce_character_type_later< std::array< const Char, N > > + > {}; +#endif + +#ifdef BOOST_HAS_INT128 + template <> struct stream_char_common< boost::int128_type >: public boost::mpl::identity< char > {}; + template <> struct stream_char_common< boost::uint128_type >: public boost::mpl::identity< char > {}; +#endif + +#if !defined(BOOST_LCAST_NO_WCHAR_T) && defined(BOOST_NO_INTRINSIC_WCHAR_T) + template <> + struct stream_char_common< wchar_t > + { + typedef char type; + }; +#endif + } + + namespace detail // deduce_source_char_impl + { + // If type T is `deduce_character_type_later` type, then tries to deduce + // character type using boost::has_left_shift metafunction. + // Otherwise supplied type T is a character type, that must be normalized + // using normalize_single_byte_char. + // Executed at Stage 2 (See deduce_source_char and deduce_target_char) + template < class Char > + struct deduce_source_char_impl + { + typedef BOOST_DEDUCED_TYPENAME boost::detail::normalize_single_byte_char< Char >::type type; + }; + + template < class T > + struct deduce_source_char_impl< deduce_character_type_later< T > > + { + typedef boost::has_left_shift< std::basic_ostream< char >, T > result_t; + +#if defined(BOOST_LCAST_NO_WCHAR_T) + BOOST_STATIC_ASSERT_MSG((result_t::value), + "Source type is not std::ostream`able and std::wostream`s are not supported by your STL implementation"); + typedef char type; +#else + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< + result_t::value, char, wchar_t + >::type type; + + BOOST_STATIC_ASSERT_MSG((result_t::value || boost::has_left_shift< std::basic_ostream< type >, T >::value), + "Source type is neither std::ostream`able nor std::wostream`able"); +#endif + }; + } + + namespace detail // deduce_target_char_impl + { + // If type T is `deduce_character_type_later` type, then tries to deduce + // character type using boost::has_right_shift metafunction. + // Otherwise supplied type T is a character type, that must be normalized + // using normalize_single_byte_char. + // Executed at Stage 2 (See deduce_source_char and deduce_target_char) + template < class Char > + struct deduce_target_char_impl + { + typedef BOOST_DEDUCED_TYPENAME normalize_single_byte_char< Char >::type type; + }; + + template < class T > + struct deduce_target_char_impl< deduce_character_type_later > + { + typedef boost::has_right_shift, T > result_t; + +#if defined(BOOST_LCAST_NO_WCHAR_T) + BOOST_STATIC_ASSERT_MSG((result_t::value), + "Target type is not std::istream`able and std::wistream`s are not supported by your STL implementation"); + typedef char type; +#else + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< + result_t::value, char, wchar_t + >::type type; + + BOOST_STATIC_ASSERT_MSG((result_t::value || boost::has_right_shift, T >::value), + "Target type is neither std::istream`able nor std::wistream`able"); +#endif + }; + } + + namespace detail // deduce_target_char and deduce_source_char + { + // We deduce stream character types in two stages. + // + // Stage 1 is common for Target and Source. At Stage 1 we get + // non normalized character type (may contain unsigned/signed char) + // or deduce_character_type_later where T is the original type. + // Stage 1 is executed by stream_char_common + // + // At Stage 2 we normalize character types or try to deduce character + // type using metafunctions. + // Stage 2 is executed by deduce_target_char_impl and + // deduce_source_char_impl + // + // deduce_target_char and deduce_source_char functions combine + // both stages + + template < class T > + struct deduce_target_char + { + typedef BOOST_DEDUCED_TYPENAME stream_char_common< T >::type stage1_type; + typedef BOOST_DEDUCED_TYPENAME deduce_target_char_impl< stage1_type >::type stage2_type; + + typedef stage2_type type; + }; + + template < class T > + struct deduce_source_char + { + typedef BOOST_DEDUCED_TYPENAME stream_char_common< T >::type stage1_type; + typedef BOOST_DEDUCED_TYPENAME deduce_source_char_impl< stage1_type >::type stage2_type; + + typedef stage2_type type; + }; + } + + namespace detail // extract_char_traits template + { + // We are attempting to get char_traits<> from T + // template parameter. Otherwise we'll be using std::char_traits + template < class Char, class T > + struct extract_char_traits + : boost::false_type + { + typedef std::char_traits< Char > trait_t; + }; + + template < class Char, class Traits, class Alloc > + struct extract_char_traits< Char, std::basic_string< Char, Traits, Alloc > > + : boost::true_type + { + typedef Traits trait_t; + }; + + template < class Char, class Traits, class Alloc> + struct extract_char_traits< Char, boost::container::basic_string< Char, Traits, Alloc > > + : boost::true_type + { + typedef Traits trait_t; + }; + } + + namespace detail // array_to_pointer_decay + { + template + struct array_to_pointer_decay + { + typedef T type; + }; + + template + struct array_to_pointer_decay + { + typedef const T * type; + }; + } + + namespace detail // lcast_src_length + { + // Return max. length of string representation of Source; + template< class Source, // Source type of lexical_cast. + class Enable = void // helper type + > + struct lcast_src_length + { + BOOST_STATIC_CONSTANT(std::size_t, value = 1); + }; + + // Helper for integral types. + // Notes on length calculation: + // Max length for 32bit int with grouping "\1" and thousands_sep ',': + // "-2,1,4,7,4,8,3,6,4,7" + // ^ - is_signed + // ^ - 1 digit not counted by digits10 + // ^^^^^^^^^^^^^^^^^^ - digits10 * 2 + // + // Constant is_specialized is used instead of constant 1 + // to prevent buffer overflow in a rare case when + // doesn't add missing specialization for + // numeric_limits for some integral type T. + // When is_specialized is false, the whole expression is 0. + template + struct lcast_src_length< + Source, BOOST_DEDUCED_TYPENAME boost::enable_if >::type + > + { +#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + BOOST_STATIC_CONSTANT(std::size_t, value = + std::numeric_limits::is_signed + + std::numeric_limits::is_specialized + /* == 1 */ + std::numeric_limits::digits10 * 2 + ); +#else + BOOST_STATIC_CONSTANT(std::size_t, value = 156); + BOOST_STATIC_ASSERT(sizeof(Source) * CHAR_BIT <= 256); +#endif + }; + +#ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION + // Helper for floating point types. + // -1.23456789e-123456 + // ^ sign + // ^ leading digit + // ^ decimal point + // ^^^^^^^^ lcast_precision::value + // ^ "e" + // ^ exponent sign + // ^^^^^^ exponent (assumed 6 or less digits) + // sign + leading digit + decimal point + "e" + exponent sign == 5 + template + struct lcast_src_length< + Source, BOOST_DEDUCED_TYPENAME boost::enable_if >::type + > + { + BOOST_STATIC_ASSERT( + std::numeric_limits::max_exponent10 <= 999999L && + std::numeric_limits::min_exponent10 >= -999999L + ); + + BOOST_STATIC_CONSTANT(std::size_t, value = + 5 + lcast_precision::value + 6 + ); + }; +#endif // #ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION + } + + namespace detail // lexical_cast_stream_traits + { + template + struct lexical_cast_stream_traits { + typedef BOOST_DEDUCED_TYPENAME boost::detail::array_to_pointer_decay::type src; + typedef BOOST_DEDUCED_TYPENAME boost::remove_cv::type no_cv_src; + + typedef boost::detail::deduce_source_char deduce_src_char_metafunc; + typedef BOOST_DEDUCED_TYPENAME deduce_src_char_metafunc::type src_char_t; + typedef BOOST_DEDUCED_TYPENAME boost::detail::deduce_target_char::type target_char_t; + + typedef BOOST_DEDUCED_TYPENAME boost::detail::widest_char< + target_char_t, src_char_t + >::type char_type; + +#if !defined(BOOST_NO_CXX11_CHAR16_T) && defined(BOOST_NO_CXX11_UNICODE_LITERALS) + BOOST_STATIC_ASSERT_MSG(( !boost::is_same::value + && !boost::is_same::value), + "Your compiler does not have full support for char16_t" ); +#endif +#if !defined(BOOST_NO_CXX11_CHAR32_T) && defined(BOOST_NO_CXX11_UNICODE_LITERALS) + BOOST_STATIC_ASSERT_MSG(( !boost::is_same::value + && !boost::is_same::value), + "Your compiler does not have full support for char32_t" ); +#endif + + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< + boost::detail::extract_char_traits::value, + BOOST_DEDUCED_TYPENAME boost::detail::extract_char_traits, + BOOST_DEDUCED_TYPENAME boost::detail::extract_char_traits + >::type::trait_t traits; + + typedef boost::mpl::bool_ + < + boost::is_same::value && // source is not a wide character based type + (sizeof(char) != sizeof(target_char_t)) && // target type is based on wide character + (!(boost::detail::is_character::value)) + > is_string_widening_required_t; + + typedef boost::mpl::bool_ + < + !(boost::is_integral::value || + boost::detail::is_character< + BOOST_DEDUCED_TYPENAME deduce_src_char_metafunc::stage1_type // if we did not get character type at stage1 + >::value // then we have no optimization for that type + ) + > is_source_input_not_optimized_t; + + // If we have an optimized conversion for + // Source, we do not need to construct stringbuf. + BOOST_STATIC_CONSTANT(bool, requires_stringbuf = + (is_string_widening_required_t::value || is_source_input_not_optimized_t::value) + ); + + typedef boost::detail::lcast_src_length len_t; + }; + } + + namespace detail + { + template + struct lexical_converter_impl + { + typedef lexical_cast_stream_traits stream_trait; + + typedef detail::lexical_istream_limited_src< + BOOST_DEDUCED_TYPENAME stream_trait::char_type, + BOOST_DEDUCED_TYPENAME stream_trait::traits, + stream_trait::requires_stringbuf, + stream_trait::len_t::value + 1 + > i_interpreter_type; + + typedef detail::lexical_ostream_limited_src< + BOOST_DEDUCED_TYPENAME stream_trait::char_type, + BOOST_DEDUCED_TYPENAME stream_trait::traits + > o_interpreter_type; + + static inline bool try_convert(const Source& arg, Target& result) { + i_interpreter_type i_interpreter; + + // Disabling ADL, by directly specifying operators. + if (!(i_interpreter.operator <<(arg))) + return false; + + o_interpreter_type out(i_interpreter.cbegin(), i_interpreter.cend()); + + // Disabling ADL, by directly specifying operators. + if(!(out.operator >>(result))) + return false; + + return true; + } + }; + } + +} // namespace boost + +#undef BOOST_LCAST_NO_WCHAR_T + +#endif // BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_HPP + diff --git a/ThirdParty/boost-Subset/boost/lexical_cast/detail/converter_lexical_streams.hpp b/ThirdParty/boost-Subset/boost/lexical_cast/detail/converter_lexical_streams.hpp new file mode 100644 index 0000000000..ba8d3b4dc3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/lexical_cast/detail/converter_lexical_streams.hpp @@ -0,0 +1,787 @@ +// Copyright Kevlin Henney, 2000-2005. +// Copyright Alexander Nasonov, 2006-2010. +// Copyright Antony Polukhin, 2011-2014. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// what: lexical_cast custom keyword cast +// who: contributed by Kevlin Henney, +// enhanced with contributions from Terje Slettebo, +// with additional fixes and suggestions from Gennaro Prota, +// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov, +// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann, +// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters +// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014 + +#ifndef BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_STREAMS_HPP +#define BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_STREAMS_HPP + +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + + +#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_WSTRING) +#define BOOST_LCAST_NO_WCHAR_T +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#ifndef BOOST_NO_STD_LOCALE +# include +#else +# ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE + // Getting error at this point means, that your STL library is old/lame/misconfigured. + // If nothing can be done with STL library, define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE, + // but beware: lexical_cast will understand only 'C' locale delimeters and thousands + // separators. +# error "Unable to use header. Define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE to force " +# error "boost::lexical_cast to use only 'C' locale during conversions." +# endif +#endif + +#ifdef BOOST_NO_STRINGSTREAM +#include +#else +#include +#endif + +#include +#include +#include + +#include + +#ifndef BOOST_NO_CXX11_HDR_ARRAY +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef BOOST_NO_CWCHAR +# include +#endif + +namespace boost { + + namespace detail // basic_unlockedbuf + { + // acts as a stream buffer which wraps around a pair of pointers + // and gives acces to internals + template + class basic_unlockedbuf : public basic_pointerbuf { + public: + typedef basic_pointerbuf base_type; + typedef BOOST_DEDUCED_TYPENAME base_type::streamsize streamsize; + +#ifndef BOOST_NO_USING_TEMPLATE + using base_type::pptr; + using base_type::pbase; + using base_type::setbuf; +#else + charT* pptr() const { return base_type::pptr(); } + charT* pbase() const { return base_type::pbase(); } + BufferType* setbuf(char_type* s, streamsize n) { return base_type::setbuf(s, n); } +#endif + }; + } + + namespace detail + { + struct do_not_construct_out_stream_t{}; + + template + struct out_stream_helper_trait { +#if defined(BOOST_NO_STRINGSTREAM) + typedef std::ostrstream out_stream_t; + typedef void buffer_t; +#elif defined(BOOST_NO_STD_LOCALE) + typedef std::ostringstream out_stream_t; + typedef basic_unlockedbuf buffer_t; +#else + typedef std::basic_ostringstream + out_stream_t; + typedef basic_unlockedbuf, CharT> + buffer_t; +#endif + }; + } + + namespace detail // optimized stream wrappers + { + template< class CharT // a result of widest_char transformation + , class Traits + , bool RequiresStringbuffer + , std::size_t CharacterBufferSize + > + class lexical_istream_limited_src: boost::noncopyable { + typedef BOOST_DEDUCED_TYPENAME out_stream_helper_trait::buffer_t + buffer_t; + + typedef BOOST_DEDUCED_TYPENAME out_stream_helper_trait::out_stream_t + out_stream_t; + + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< + RequiresStringbuffer, + out_stream_t, + do_not_construct_out_stream_t + >::type deduced_out_stream_t; + + // A string representation of Source is written to `buffer`. + deduced_out_stream_t out_stream; + CharT buffer[CharacterBufferSize]; + + // After the `operator <<` finishes, `[start, finish)` is + // the range to output by `operator >>` + const CharT* start; + const CharT* finish; + + public: + lexical_istream_limited_src() BOOST_NOEXCEPT + : start(buffer) + , finish(buffer + CharacterBufferSize) + {} + + const CharT* cbegin() const BOOST_NOEXCEPT { + return start; + } + + const CharT* cend() const BOOST_NOEXCEPT { + return finish; + } + + private: + // Undefined: + lexical_istream_limited_src(lexical_istream_limited_src const&); + void operator=(lexical_istream_limited_src const&); + +/************************************ HELPER FUNCTIONS FOR OPERATORS << ( ... ) ********************************/ + bool shl_char(CharT ch) BOOST_NOEXCEPT { + Traits::assign(buffer[0], ch); + finish = start + 1; + return true; + } + +#ifndef BOOST_LCAST_NO_WCHAR_T + template + bool shl_char(T ch) { + BOOST_STATIC_ASSERT_MSG(( sizeof(T) <= sizeof(CharT)) , + "boost::lexical_cast does not support narrowing of char types." + "Use boost::locale instead" ); +#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE + std::locale loc; + CharT const w = BOOST_USE_FACET(std::ctype, loc).widen(ch); +#else + CharT const w = static_cast(ch); +#endif + Traits::assign(buffer[0], w); + finish = start + 1; + return true; + } +#endif + + bool shl_char_array(CharT const* str) BOOST_NOEXCEPT { + start = str; + finish = start + Traits::length(str); + return true; + } + + template + bool shl_char_array(T const* str) { + BOOST_STATIC_ASSERT_MSG(( sizeof(T) <= sizeof(CharT)), + "boost::lexical_cast does not support narrowing of char types." + "Use boost::locale instead" ); + return shl_input_streamable(str); + } + + bool shl_char_array_limited(CharT const* str, std::size_t max_size) BOOST_NOEXCEPT { + start = str; + finish = std::find(start, start + max_size, Traits::to_char_type(0)); + return true; + } + + template + bool shl_input_streamable(InputStreamable& input) { +#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_LOCALE) + // If you have compilation error at this point, than your STL library + // does not support such conversions. Try updating it. + BOOST_STATIC_ASSERT((boost::is_same::value)); +#endif + +#ifndef BOOST_NO_EXCEPTIONS + out_stream.exceptions(std::ios::badbit); + try { +#endif + bool const result = !(out_stream << input).fail(); + const buffer_t* const p = static_cast( + static_cast*>(out_stream.rdbuf()) + ); + start = p->pbase(); + finish = p->pptr(); + return result; +#ifndef BOOST_NO_EXCEPTIONS + } catch (const ::std::ios_base::failure& /*f*/) { + return false; + } +#endif + } + + template + inline bool shl_unsigned(const T n) { + CharT* tmp_finish = buffer + CharacterBufferSize; + start = lcast_put_unsigned(n, tmp_finish).convert(); + finish = tmp_finish; + return true; + } + + template + inline bool shl_signed(const T n) { + CharT* tmp_finish = buffer + CharacterBufferSize; + typedef BOOST_DEDUCED_TYPENAME boost::make_unsigned::type utype; + CharT* tmp_start = lcast_put_unsigned(lcast_to_unsigned(n), tmp_finish).convert(); + if (n < 0) { + --tmp_start; + CharT const minus = lcast_char_constants::minus; + Traits::assign(*tmp_start, minus); + } + start = tmp_start; + finish = tmp_finish; + return true; + } + + template + bool shl_real_type(const T& val, SomeCharT* /*begin*/) { + lcast_set_precision(out_stream, &val); + return shl_input_streamable(val); + } + + bool shl_real_type(float val, char* begin) { + using namespace std; + const double val_as_double = val; + finish = start + +#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) + sprintf_s(begin, CharacterBufferSize, +#else + sprintf(begin, +#endif + "%.*g", static_cast(boost::detail::lcast_get_precision()), val_as_double); + return finish > start; + } + + bool shl_real_type(double val, char* begin) { + using namespace std; + finish = start + +#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) + sprintf_s(begin, CharacterBufferSize, +#else + sprintf(begin, +#endif + "%.*g", static_cast(boost::detail::lcast_get_precision()), val); + return finish > start; + } + +#ifndef __MINGW32__ + bool shl_real_type(long double val, char* begin) { + using namespace std; + finish = start + +#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) + sprintf_s(begin, CharacterBufferSize, +#else + sprintf(begin, +#endif + "%.*Lg", static_cast(boost::detail::lcast_get_precision()), val ); + return finish > start; + } +#endif + + +#if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_SWPRINTF) && !defined(__MINGW32__) + bool shl_real_type(float val, wchar_t* begin) { + using namespace std; + const double val_as_double = val; + finish = start + swprintf(begin, CharacterBufferSize, + L"%.*g", + static_cast(boost::detail::lcast_get_precision()), + val_as_double ); + return finish > start; + } + + bool shl_real_type(double val, wchar_t* begin) { + using namespace std; + finish = start + swprintf(begin, CharacterBufferSize, + L"%.*g", static_cast(boost::detail::lcast_get_precision()), val ); + return finish > start; + } + + bool shl_real_type(long double val, wchar_t* begin) { + using namespace std; + finish = start + swprintf(begin, CharacterBufferSize, + L"%.*Lg", static_cast(boost::detail::lcast_get_precision()), val ); + return finish > start; + } +#endif + template + bool shl_real(T val) { + CharT* tmp_finish = buffer + CharacterBufferSize; + if (put_inf_nan(buffer, tmp_finish, val)) { + finish = tmp_finish; + return true; + } + + return shl_real_type(val, static_cast(buffer)); + } + +/************************************ OPERATORS << ( ... ) ********************************/ + public: + template + bool operator<<(std::basic_string const& str) BOOST_NOEXCEPT { + start = str.data(); + finish = start + str.length(); + return true; + } + + template + bool operator<<(boost::container::basic_string const& str) BOOST_NOEXCEPT { + start = str.data(); + finish = start + str.length(); + return true; + } + + bool operator<<(bool value) BOOST_NOEXCEPT { + CharT const czero = lcast_char_constants::zero; + Traits::assign(buffer[0], Traits::to_char_type(czero + value)); + finish = start + 1; + return true; + } + + template + BOOST_DEDUCED_TYPENAME boost::disable_if, bool>::type + operator<<(const iterator_range& rng) BOOST_NOEXCEPT { + return (*this) << iterator_range(rng.begin(), rng.end()); + } + + bool operator<<(const iterator_range& rng) BOOST_NOEXCEPT { + start = rng.begin(); + finish = rng.end(); + return true; + } + + bool operator<<(const iterator_range& rng) BOOST_NOEXCEPT { + return (*this) << iterator_range( + reinterpret_cast(rng.begin()), + reinterpret_cast(rng.end()) + ); + } + + bool operator<<(const iterator_range& rng) BOOST_NOEXCEPT { + return (*this) << iterator_range( + reinterpret_cast(rng.begin()), + reinterpret_cast(rng.end()) + ); + } + + bool operator<<(char ch) { return shl_char(ch); } + bool operator<<(unsigned char ch) { return ((*this) << static_cast(ch)); } + bool operator<<(signed char ch) { return ((*this) << static_cast(ch)); } +#if !defined(BOOST_LCAST_NO_WCHAR_T) + bool operator<<(wchar_t const* str) { return shl_char_array(str); } + bool operator<<(wchar_t * str) { return shl_char_array(str); } +#ifndef BOOST_NO_INTRINSIC_WCHAR_T + bool operator<<(wchar_t ch) { return shl_char(ch); } +#endif +#endif +#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) + bool operator<<(char16_t ch) { return shl_char(ch); } + bool operator<<(char16_t * str) { return shl_char_array(str); } + bool operator<<(char16_t const * str) { return shl_char_array(str); } +#endif +#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) + bool operator<<(char32_t ch) { return shl_char(ch); } + bool operator<<(char32_t * str) { return shl_char_array(str); } + bool operator<<(char32_t const * str) { return shl_char_array(str); } +#endif + bool operator<<(unsigned char const* ch) { return ((*this) << reinterpret_cast(ch)); } + bool operator<<(unsigned char * ch) { return ((*this) << reinterpret_cast(ch)); } + bool operator<<(signed char const* ch) { return ((*this) << reinterpret_cast(ch)); } + bool operator<<(signed char * ch) { return ((*this) << reinterpret_cast(ch)); } + bool operator<<(char const* str) { return shl_char_array(str); } + bool operator<<(char* str) { return shl_char_array(str); } + bool operator<<(short n) { return shl_signed(n); } + bool operator<<(int n) { return shl_signed(n); } + bool operator<<(long n) { return shl_signed(n); } + bool operator<<(unsigned short n) { return shl_unsigned(n); } + bool operator<<(unsigned int n) { return shl_unsigned(n); } + bool operator<<(unsigned long n) { return shl_unsigned(n); } + +#if defined(BOOST_HAS_LONG_LONG) + bool operator<<(boost::ulong_long_type n) { return shl_unsigned(n); } + bool operator<<(boost::long_long_type n) { return shl_signed(n); } +#elif defined(BOOST_HAS_MS_INT64) + bool operator<<(unsigned __int64 n) { return shl_unsigned(n); } + bool operator<<( __int64 n) { return shl_signed(n); } +#endif + +#ifdef BOOST_HAS_INT128 + bool operator<<(const boost::uint128_type& n) { return shl_unsigned(n); } + bool operator<<(const boost::int128_type& n) { return shl_signed(n); } +#endif + bool operator<<(float val) { return shl_real(val); } + bool operator<<(double val) { return shl_real(val); } + bool operator<<(long double val) { +#ifndef __MINGW32__ + return shl_real(val); +#else + return shl_real(static_cast(val)); +#endif + } + + // Adding constness to characters. Constness does not change layout + template + BOOST_DEDUCED_TYPENAME boost::disable_if, bool>::type + operator<<(boost::array const& input) BOOST_NOEXCEPT { + BOOST_STATIC_ASSERT_MSG( + (sizeof(boost::array) == sizeof(boost::array)), + "boost::array and boost::array must have exactly the same layout." + ); + return ((*this) << reinterpret_cast const& >(input)); + } + + template + bool operator<<(boost::array const& input) BOOST_NOEXCEPT { + return shl_char_array_limited(input.begin(), N); + } + + template + bool operator<<(boost::array const& input) BOOST_NOEXCEPT { + return ((*this) << reinterpret_cast const& >(input)); + } + + template + bool operator<<(boost::array const& input) BOOST_NOEXCEPT { + return ((*this) << reinterpret_cast const& >(input)); + } + +#ifndef BOOST_NO_CXX11_HDR_ARRAY + // Making a Boost.Array from std::array + template + bool operator<<(std::array const& input) BOOST_NOEXCEPT { + BOOST_STATIC_ASSERT_MSG( + (sizeof(std::array) == sizeof(boost::array)), + "std::array and boost::array must have exactly the same layout. " + "Bug in implementation of std::array or boost::array." + ); + return ((*this) << reinterpret_cast const& >(input)); + } +#endif + template + bool operator<<(const InStreamable& input) { return shl_input_streamable(input); } + }; + + + template + class lexical_ostream_limited_src: boost::noncopyable { + //`[start, finish)` is the range to output by `operator >>` + const CharT* start; + const CharT* const finish; + + public: + lexical_ostream_limited_src(const CharT* begin, const CharT* end) BOOST_NOEXCEPT + : start(begin) + , finish(end) + {} + +/************************************ HELPER FUNCTIONS FOR OPERATORS >> ( ... ) ********************************/ + private: + template + bool shr_unsigned(Type& output) { + if (start == finish) return false; + CharT const minus = lcast_char_constants::minus; + CharT const plus = lcast_char_constants::plus; + bool const has_minus = Traits::eq(minus, *start); + + /* We won`t use `start' any more, so no need in decrementing it after */ + if (has_minus || Traits::eq(plus, *start)) { + ++start; + } + + bool const succeed = lcast_ret_unsigned(output, start, finish).convert(); + + if (has_minus) { + output = static_cast(0u - output); + } + + return succeed; + } + + template + bool shr_signed(Type& output) { + if (start == finish) return false; + CharT const minus = lcast_char_constants::minus; + CharT const plus = lcast_char_constants::plus; + typedef BOOST_DEDUCED_TYPENAME make_unsigned::type utype; + utype out_tmp = 0; + bool const has_minus = Traits::eq(minus, *start); + + /* We won`t use `start' any more, so no need in decrementing it after */ + if (has_minus || Traits::eq(plus, *start)) { + ++start; + } + + bool succeed = lcast_ret_unsigned(out_tmp, start, finish).convert(); + if (has_minus) { + utype const comp_val = (static_cast(1) << std::numeric_limits::digits); + succeed = succeed && out_tmp<=comp_val; + output = static_cast(0u - out_tmp); + } else { + utype const comp_val = static_cast((std::numeric_limits::max)()); + succeed = succeed && out_tmp<=comp_val; + output = static_cast(out_tmp); + } + return succeed; + } + + template + bool shr_using_base_class(InputStreamable& output) + { + BOOST_STATIC_ASSERT_MSG( + (!boost::is_pointer::value), + "boost::lexical_cast can not convert to pointers" + ); + +#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_LOCALE) + BOOST_STATIC_ASSERT_MSG((boost::is_same::value), + "boost::lexical_cast can not convert, because your STL library does not " + "support such conversions. Try updating it." + ); +#endif + typedef BOOST_DEDUCED_TYPENAME out_stream_helper_trait::buffer_t + buffer_t; + +#if defined(BOOST_NO_STRINGSTREAM) + std::istrstream stream(start, finish - start); +#else + + buffer_t buf; + // Usually `istream` and `basic_istream` do not modify + // content of buffer; `buffer_t` assures that this is true + buf.setbuf(const_cast(start), finish - start); +#if defined(BOOST_NO_STD_LOCALE) + std::istream stream(&buf); +#else + std::basic_istream stream(&buf); +#endif // BOOST_NO_STD_LOCALE +#endif // BOOST_NO_STRINGSTREAM + +#ifndef BOOST_NO_EXCEPTIONS + stream.exceptions(std::ios::badbit); + try { +#endif + stream.unsetf(std::ios::skipws); + lcast_set_precision(stream, static_cast(0)); + + return (stream >> output) + && (stream.get() == Traits::eof()); + +#ifndef BOOST_NO_EXCEPTIONS + } catch (const ::std::ios_base::failure& /*f*/) { + return false; + } +#endif + } + + template + inline bool shr_xchar(T& output) BOOST_NOEXCEPT { + BOOST_STATIC_ASSERT_MSG(( sizeof(CharT) == sizeof(T) ), + "boost::lexical_cast does not support narrowing of character types." + "Use boost::locale instead" ); + bool const ok = (finish - start == 1); + if (ok) { + CharT out; + Traits::assign(out, *start); + output = static_cast(out); + } + return ok; + } + + template + bool shr_std_array(ArrayT& output) BOOST_NOEXCEPT { + using namespace std; + const std::size_t size = static_cast(finish - start); + if (size > N - 1) { // `-1` because we need to store \0 at the end + return false; + } + + memcpy(&output[0], start, size * sizeof(CharT)); + output[size] = Traits::to_char_type(0); + return true; + } + +/************************************ OPERATORS >> ( ... ) ********************************/ + public: + bool operator>>(unsigned short& output) { return shr_unsigned(output); } + bool operator>>(unsigned int& output) { return shr_unsigned(output); } + bool operator>>(unsigned long int& output) { return shr_unsigned(output); } + bool operator>>(short& output) { return shr_signed(output); } + bool operator>>(int& output) { return shr_signed(output); } + bool operator>>(long int& output) { return shr_signed(output); } +#if defined(BOOST_HAS_LONG_LONG) + bool operator>>(boost::ulong_long_type& output) { return shr_unsigned(output); } + bool operator>>(boost::long_long_type& output) { return shr_signed(output); } +#elif defined(BOOST_HAS_MS_INT64) + bool operator>>(unsigned __int64& output) { return shr_unsigned(output); } + bool operator>>(__int64& output) { return shr_signed(output); } +#endif + +#ifdef BOOST_HAS_INT128 + bool operator>>(boost::uint128_type& output) { return shr_unsigned(output); } + bool operator>>(boost::int128_type& output) { return shr_signed(output); } +#endif + + bool operator>>(char& output) { return shr_xchar(output); } + bool operator>>(unsigned char& output) { return shr_xchar(output); } + bool operator>>(signed char& output) { return shr_xchar(output); } +#if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_INTRINSIC_WCHAR_T) + bool operator>>(wchar_t& output) { return shr_xchar(output); } +#endif +#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) + bool operator>>(char16_t& output) { return shr_xchar(output); } +#endif +#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) + bool operator>>(char32_t& output) { return shr_xchar(output); } +#endif + template + bool operator>>(std::basic_string& str) { + str.assign(start, finish); return true; + } + + template + bool operator>>(boost::container::basic_string& str) { + str.assign(start, finish); return true; + } + + template + bool operator>>(boost::array& output) BOOST_NOEXCEPT { + return shr_std_array(output); + } + + template + bool operator>>(boost::array& output) BOOST_NOEXCEPT { + return ((*this) >> reinterpret_cast& >(output)); + } + + template + bool operator>>(boost::array& output) BOOST_NOEXCEPT { + return ((*this) >> reinterpret_cast& >(output)); + } + +#ifndef BOOST_NO_CXX11_HDR_ARRAY + template + bool operator>>(std::array& output) BOOST_NOEXCEPT { + BOOST_STATIC_ASSERT_MSG( + (sizeof(boost::array) == sizeof(boost::array)), + "std::array and boost::array must have exactly the same layout." + ); + return ((*this) >> reinterpret_cast& >(output)); + } +#endif + + bool operator>>(bool& output) BOOST_NOEXCEPT { + output = false; // Suppress warning about uninitalized variable + + if (start == finish) return false; + CharT const zero = lcast_char_constants::zero; + CharT const plus = lcast_char_constants::plus; + CharT const minus = lcast_char_constants::minus; + + const CharT* const dec_finish = finish - 1; + output = Traits::eq(*dec_finish, zero + 1); + if (!output && !Traits::eq(*dec_finish, zero)) { + return false; // Does not ends on '0' or '1' + } + + if (start == dec_finish) return true; + + // We may have sign at the beginning + if (Traits::eq(plus, *start) || (Traits::eq(minus, *start) && !output)) { + ++ start; + } + + // Skipping zeros + while (start != dec_finish) { + if (!Traits::eq(zero, *start)) { + return false; // Not a zero => error + } + + ++ start; + } + + return true; + } + + private: + // Not optimised converter + template + bool float_types_converter_internal(T& output) { + if (parse_inf_nan(start, finish, output)) return true; + bool const return_value = shr_using_base_class(output); + + /* Some compilers and libraries successfully + * parse 'inf', 'INFINITY', '1.0E', '1.0E-'... + * We are trying to provide a unified behaviour, + * so we just forbid such conversions (as some + * of the most popular compilers/libraries do) + * */ + CharT const minus = lcast_char_constants::minus; + CharT const plus = lcast_char_constants::plus; + CharT const capital_e = lcast_char_constants::capital_e; + CharT const lowercase_e = lcast_char_constants::lowercase_e; + if ( return_value && + ( + Traits::eq(*(finish-1), lowercase_e) // 1.0e + || Traits::eq(*(finish-1), capital_e) // 1.0E + || Traits::eq(*(finish-1), minus) // 1.0e- or 1.0E- + || Traits::eq(*(finish-1), plus) // 1.0e+ or 1.0E+ + ) + ) return false; + + return return_value; + } + + public: + bool operator>>(float& output) { return float_types_converter_internal(output); } + bool operator>>(double& output) { return float_types_converter_internal(output); } + bool operator>>(long double& output) { return float_types_converter_internal(output); } + + // Generic istream-based algorithm. + // lcast_streambuf_for_target::value is true. + template + bool operator>>(InputStreamable& output) { + return shr_using_base_class(output); + } + }; + } +} // namespace boost + +#undef BOOST_LCAST_NO_WCHAR_T + +#endif // BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_HPP + diff --git a/ThirdParty/boost-Subset/boost/lexical_cast/detail/converter_numeric.hpp b/ThirdParty/boost-Subset/boost/lexical_cast/detail/converter_numeric.hpp new file mode 100644 index 0000000000..a6cc8e77b8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/lexical_cast/detail/converter_numeric.hpp @@ -0,0 +1,194 @@ +// Copyright Kevlin Henney, 2000-2005. +// Copyright Alexander Nasonov, 2006-2010. +// Copyright Antony Polukhin, 2011-2014. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// what: lexical_cast custom keyword cast +// who: contributed by Kevlin Henney, +// enhanced with contributions from Terje Slettebo, +// with additional fixes and suggestions from Gennaro Prota, +// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov, +// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann, +// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters +// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014 + +#ifndef BOOST_LEXICAL_CAST_DETAIL_CONVERTER_NUMERIC_HPP +#define BOOST_LEXICAL_CAST_DETAIL_CONVERTER_NUMERIC_HPP + +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace boost { namespace detail { + +template +struct detect_precision_loss +{ + typedef Source source_type; + typedef boost::numeric::Trunc Rounder; + typedef BOOST_DEDUCED_TYPENAME mpl::if_< + boost::is_arithmetic, Source, Source const& + >::type argument_type ; + + static inline source_type nearbyint(argument_type s, bool& is_ok) BOOST_NOEXCEPT { + const source_type near_int = Rounder::nearbyint(s); + if (near_int && is_ok) { + const source_type orig_div_round = s / near_int; + const source_type eps = std::numeric_limits::epsilon(); + + is_ok = !((orig_div_round > 1 ? orig_div_round - 1 : 1 - orig_div_round) > eps); + } + + return s; + } + + typedef typename Rounder::round_style round_style; +}; + +template +struct fake_precision_loss: public Base +{ + typedef Source source_type ; + typedef BOOST_DEDUCED_TYPENAME mpl::if_< + boost::is_arithmetic, Source, Source const& + >::type argument_type ; + + static inline source_type nearbyint(argument_type s, bool& /*is_ok*/) BOOST_NOEXCEPT { + return s; + } +}; + +struct nothrow_overflow_handler +{ + inline bool operator() ( boost::numeric::range_check_result r ) const BOOST_NOEXCEPT { + return (r == boost::numeric::cInRange); + } +}; + +template +inline bool noexcept_numeric_convert(const Source& arg, Target& result) BOOST_NOEXCEPT { + typedef boost::numeric::converter< + Target, + Source, + boost::numeric::conversion_traits, + nothrow_overflow_handler, + detect_precision_loss + > converter_orig_t; + + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< + boost::is_base_of< detect_precision_loss, converter_orig_t >::value, + converter_orig_t, + fake_precision_loss + >::type converter_t; + + bool res = nothrow_overflow_handler()(converter_t::out_of_range(arg)); + result = converter_t::low_level_convert(converter_t::nearbyint(arg, res)); + return res; +} + +template +struct lexical_cast_dynamic_num_not_ignoring_minus +{ + static inline bool try_convert(const Source &arg, Target& result) BOOST_NOEXCEPT { + return noexcept_numeric_convert(arg, result); + } +}; + +template +struct lexical_cast_dynamic_num_ignoring_minus +{ + static inline bool try_convert(const Source &arg, Target& result) BOOST_NOEXCEPT { + typedef BOOST_DEDUCED_TYPENAME boost::mpl::eval_if_c< + boost::is_float::value, + boost::mpl::identity, + boost::make_unsigned + >::type usource_t; + + if (arg < 0) { + const bool res = noexcept_numeric_convert(0u - arg, result); + result = static_cast(0u - result); + return res; + } else { + return noexcept_numeric_convert(arg, result); + } + } +}; + +/* + * lexical_cast_dynamic_num follows the rules: + * 1) If Source can be converted to Target without precision loss and + * without overflows, then assign Source to Target and return + * + * 2) If Source is less than 0 and Target is an unsigned integer, + * then negate Source, check the requirements of rule 1) and if + * successful, assign static_casted Source to Target and return + * + * 3) Otherwise throw a bad_lexical_cast exception + * + * + * Rule 2) required because boost::lexical_cast has the behavior of + * stringstream, which uses the rules of scanf for conversions. And + * in the C99 standard for unsigned input value minus sign is + * optional, so if a negative number is read, no errors will arise + * and the result will be the two's complement. + */ +template +struct dynamic_num_converter_impl +{ + static inline bool try_convert(const Source &arg, Target& result) BOOST_NOEXCEPT { + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< + boost::is_unsigned::value && + (boost::is_signed::value || boost::is_float::value) && + !(boost::is_same::value) && + !(boost::is_same::value), + lexical_cast_dynamic_num_ignoring_minus, + lexical_cast_dynamic_num_not_ignoring_minus + >::type caster_type; + +#if 0 + + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_< + BOOST_DEDUCED_TYPENAME boost::mpl::and_< + boost::is_unsigned, + boost::mpl::or_< + boost::is_signed, + boost::is_float + >, + boost::mpl::not_< + boost::is_same + >, + boost::mpl::not_< + boost::is_same + > + >::type, + lexical_cast_dynamic_num_ignoring_minus, + lexical_cast_dynamic_num_not_ignoring_minus + >::type caster_type; + +#endif + + return caster_type::try_convert(arg, result); + } +}; + +}} // namespace boost::detail + +#endif // BOOST_LEXICAL_CAST_DETAIL_CONVERTER_NUMERIC_HPP + diff --git a/ThirdParty/boost-Subset/boost/lexical_cast/detail/inf_nan.hpp b/ThirdParty/boost-Subset/boost/lexical_cast/detail/inf_nan.hpp new file mode 100644 index 0000000000..c10457ecd2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/lexical_cast/detail/inf_nan.hpp @@ -0,0 +1,197 @@ +// Copyright Kevlin Henney, 2000-2005. +// Copyright Alexander Nasonov, 2006-2010. +// Copyright Antony Polukhin, 2011-2014. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// what: lexical_cast custom keyword cast +// who: contributed by Kevlin Henney, +// enhanced with contributions from Terje Slettebo, +// with additional fixes and suggestions from Gennaro Prota, +// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov, +// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann, +// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters +// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014 + +#ifndef BOOST_LEXICAL_CAST_DETAIL_INF_NAN_HPP +#define BOOST_LEXICAL_CAST_DETAIL_INF_NAN_HPP + +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_WSTRING) +#define BOOST_LCAST_NO_WCHAR_T +#endif + +#include +#include +#include +#include +#include +#include + +#include + +namespace boost { + namespace detail + { + template + bool lc_iequal(const CharT* val, const CharT* lcase, const CharT* ucase, unsigned int len) BOOST_NOEXCEPT { + for( unsigned int i=0; i < len; ++i ) { + if ( val[i] != lcase[i] && val[i] != ucase[i] ) return false; + } + + return true; + } + + /* Returns true and sets the correct value if found NaN or Inf. */ + template + inline bool parse_inf_nan_impl(const CharT* begin, const CharT* end, T& value + , const CharT* lc_NAN, const CharT* lc_nan + , const CharT* lc_INFINITY, const CharT* lc_infinity + , const CharT opening_brace, const CharT closing_brace) BOOST_NOEXCEPT + { + using namespace std; + if (begin == end) return false; + const CharT minus = lcast_char_constants::minus; + const CharT plus = lcast_char_constants::plus; + const int inifinity_size = 8; // == sizeof("infinity") - 1 + + /* Parsing +/- */ + bool const has_minus = (*begin == minus); + if (has_minus || *begin == plus) { + ++ begin; + } + + if (end - begin < 3) return false; + if (lc_iequal(begin, lc_nan, lc_NAN, 3)) { + begin += 3; + if (end != begin) { + /* It is 'nan(...)' or some bad input*/ + + if (end - begin < 2) return false; // bad input + -- end; + if (*begin != opening_brace || *end != closing_brace) return false; // bad input + } + + if( !has_minus ) value = std::numeric_limits::quiet_NaN(); + else value = (boost::math::changesign) (std::numeric_limits::quiet_NaN()); + return true; + } else if ( + ( /* 'INF' or 'inf' */ + end - begin == 3 // 3 == sizeof('inf') - 1 + && lc_iequal(begin, lc_infinity, lc_INFINITY, 3) + ) + || + ( /* 'INFINITY' or 'infinity' */ + end - begin == inifinity_size + && lc_iequal(begin, lc_infinity, lc_INFINITY, inifinity_size) + ) + ) + { + if( !has_minus ) value = std::numeric_limits::infinity(); + else value = (boost::math::changesign) (std::numeric_limits::infinity()); + return true; + } + + return false; + } + + template + bool put_inf_nan_impl(CharT* begin, CharT*& end, const T& value + , const CharT* lc_nan + , const CharT* lc_infinity) BOOST_NOEXCEPT + { + using namespace std; + const CharT minus = lcast_char_constants::minus; + if ((boost::math::isnan)(value)) { + if ((boost::math::signbit)(value)) { + *begin = minus; + ++ begin; + } + + memcpy(begin, lc_nan, 3 * sizeof(CharT)); + end = begin + 3; + return true; + } else if ((boost::math::isinf)(value)) { + if ((boost::math::signbit)(value)) { + *begin = minus; + ++ begin; + } + + memcpy(begin, lc_infinity, 3 * sizeof(CharT)); + end = begin + 3; + return true; + } + + return false; + } + + +#ifndef BOOST_LCAST_NO_WCHAR_T + template + bool parse_inf_nan(const wchar_t* begin, const wchar_t* end, T& value) BOOST_NOEXCEPT { + return parse_inf_nan_impl(begin, end, value + , L"NAN", L"nan" + , L"INFINITY", L"infinity" + , L'(', L')'); + } + + template + bool put_inf_nan(wchar_t* begin, wchar_t*& end, const T& value) BOOST_NOEXCEPT { + return put_inf_nan_impl(begin, end, value, L"nan", L"infinity"); + } + +#endif +#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) + template + bool parse_inf_nan(const char16_t* begin, const char16_t* end, T& value) BOOST_NOEXCEPT { + return parse_inf_nan_impl(begin, end, value + , u"NAN", u"nan" + , u"INFINITY", u"infinity" + , u'(', u')'); + } + + template + bool put_inf_nan(char16_t* begin, char16_t*& end, const T& value) BOOST_NOEXCEPT { + return put_inf_nan_impl(begin, end, value, u"nan", u"infinity"); + } +#endif +#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) + template + bool parse_inf_nan(const char32_t* begin, const char32_t* end, T& value) BOOST_NOEXCEPT { + return parse_inf_nan_impl(begin, end, value + , U"NAN", U"nan" + , U"INFINITY", U"infinity" + , U'(', U')'); + } + + template + bool put_inf_nan(char32_t* begin, char32_t*& end, const T& value) BOOST_NOEXCEPT { + return put_inf_nan_impl(begin, end, value, U"nan", U"infinity"); + } +#endif + + template + bool parse_inf_nan(const CharT* begin, const CharT* end, T& value) BOOST_NOEXCEPT { + return parse_inf_nan_impl(begin, end, value + , "NAN", "nan" + , "INFINITY", "infinity" + , '(', ')'); + } + + template + bool put_inf_nan(CharT* begin, CharT*& end, const T& value) BOOST_NOEXCEPT { + return put_inf_nan_impl(begin, end, value, "nan", "infinity"); + } + } +} // namespace boost + +#undef BOOST_LCAST_NO_WCHAR_T + +#endif // BOOST_LEXICAL_CAST_DETAIL_INF_NAN_HPP + diff --git a/ThirdParty/boost-Subset/boost/lexical_cast/detail/is_character.hpp b/ThirdParty/boost-Subset/boost/lexical_cast/detail/is_character.hpp new file mode 100644 index 0000000000..732c39f8e8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/lexical_cast/detail/is_character.hpp @@ -0,0 +1,58 @@ +// Copyright Kevlin Henney, 2000-2005. +// Copyright Alexander Nasonov, 2006-2010. +// Copyright Antony Polukhin, 2011-2014. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// what: lexical_cast custom keyword cast +// who: contributed by Kevlin Henney, +// enhanced with contributions from Terje Slettebo, +// with additional fixes and suggestions from Gennaro Prota, +// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov, +// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann, +// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters +// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014 + +#ifndef BOOST_LEXICAL_CAST_DETAIL_IS_CHARACTER_HPP +#define BOOST_LEXICAL_CAST_DETAIL_IS_CHARACTER_HPP + +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +#include +#include + +namespace boost { + + namespace detail // is_character<...> + { + // returns true, if T is one of the character types + template < typename T > + struct is_character + { + typedef BOOST_DEDUCED_TYPENAME boost::mpl::bool_< + boost::is_same< T, char >::value || + #if !defined(BOOST_NO_STRINGSTREAM) && !defined(BOOST_NO_STD_WSTRING) + boost::is_same< T, wchar_t >::value || + #endif + #ifndef BOOST_NO_CXX11_CHAR16_T + boost::is_same< T, char16_t >::value || + #endif + #ifndef BOOST_NO_CXX11_CHAR32_T + boost::is_same< T, char32_t >::value || + #endif + boost::is_same< T, unsigned char >::value || + boost::is_same< T, signed char >::value + > type; + + BOOST_STATIC_CONSTANT(bool, value = (type::value) ); + }; + } +} + +#endif // BOOST_LEXICAL_CAST_DETAIL_IS_CHARACTER_HPP + diff --git a/ThirdParty/boost-Subset/boost/lexical_cast/detail/lcast_char_constants.hpp b/ThirdParty/boost-Subset/boost/lexical_cast/detail/lcast_char_constants.hpp new file mode 100644 index 0000000000..fd651ee3e9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/lexical_cast/detail/lcast_char_constants.hpp @@ -0,0 +1,46 @@ +// Copyright Kevlin Henney, 2000-2005. +// Copyright Alexander Nasonov, 2006-2010. +// Copyright Antony Polukhin, 2011-2014. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// what: lexical_cast custom keyword cast +// who: contributed by Kevlin Henney, +// enhanced with contributions from Terje Slettebo, +// with additional fixes and suggestions from Gennaro Prota, +// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov, +// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann, +// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters +// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014 + +#ifndef BOOST_LEXICAL_CAST_DETAIL_LCAST_CHAR_CONSTANTS_HPP +#define BOOST_LEXICAL_CAST_DETAIL_LCAST_CHAR_CONSTANTS_HPP + +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +namespace boost +{ + namespace detail // '0', '-', '+', 'e', 'E' and '.' constants + { + template < typename Char > + struct lcast_char_constants { + // We check in tests assumption that static casted character is + // equal to correctly written C++ literal: U'0' == static_cast('0') + BOOST_STATIC_CONSTANT(Char, zero = static_cast('0')); + BOOST_STATIC_CONSTANT(Char, minus = static_cast('-')); + BOOST_STATIC_CONSTANT(Char, plus = static_cast('+')); + BOOST_STATIC_CONSTANT(Char, lowercase_e = static_cast('e')); + BOOST_STATIC_CONSTANT(Char, capital_e = static_cast('E')); + BOOST_STATIC_CONSTANT(Char, c_decimal_separator = static_cast('.')); + }; + } +} // namespace boost + + +#endif // BOOST_LEXICAL_CAST_DETAIL_LCAST_CHAR_CONSTANTS_HPP + diff --git a/ThirdParty/boost-Subset/boost/lexical_cast/detail/lcast_unsigned_converters.hpp b/ThirdParty/boost-Subset/boost/lexical_cast/detail/lcast_unsigned_converters.hpp new file mode 100644 index 0000000000..268961ee72 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/lexical_cast/detail/lcast_unsigned_converters.hpp @@ -0,0 +1,294 @@ +// Copyright Kevlin Henney, 2000-2005. +// Copyright Alexander Nasonov, 2006-2010. +// Copyright Antony Polukhin, 2011-2014. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// what: lexical_cast custom keyword cast +// who: contributed by Kevlin Henney, +// enhanced with contributions from Terje Slettebo, +// with additional fixes and suggestions from Gennaro Prota, +// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov, +// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann, +// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters +// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014 + +#ifndef BOOST_LEXICAL_CAST_DETAIL_LCAST_UNSIGNED_CONVERTERS_HPP +#define BOOST_LEXICAL_CAST_DETAIL_LCAST_UNSIGNED_CONVERTERS_HPP + +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#ifndef BOOST_NO_STD_LOCALE +# include +#else +# ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE + // Getting error at this point means, that your STL library is old/lame/misconfigured. + // If nothing can be done with STL library, define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE, + // but beware: lexical_cast will understand only 'C' locale delimeters and thousands + // separators. +# error "Unable to use header. Define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE to force " +# error "boost::lexical_cast to use only 'C' locale during conversions." +# endif +#endif + +#include +#include +#include +#include + +namespace boost +{ + namespace detail // lcast_to_unsigned + { + template + inline + BOOST_DEDUCED_TYPENAME boost::make_unsigned::type lcast_to_unsigned(const T value) BOOST_NOEXCEPT { + typedef BOOST_DEDUCED_TYPENAME boost::make_unsigned::type result_type; + return value < 0 + ? static_cast(0u - static_cast(value)) + : static_cast(value); + } + } + + namespace detail // lcast_put_unsigned + { + template + class lcast_put_unsigned: boost::noncopyable { + typedef BOOST_DEDUCED_TYPENAME Traits::int_type int_type; + BOOST_DEDUCED_TYPENAME boost::mpl::if_c< + (sizeof(int_type) > sizeof(T)) + , int_type + , T + >::type m_value; + CharT* m_finish; + CharT const m_czero; + int_type const m_zero; + + public: + lcast_put_unsigned(const T n_param, CharT* finish) BOOST_NOEXCEPT + : m_value(n_param), m_finish(finish) + , m_czero(lcast_char_constants::zero), m_zero(Traits::to_int_type(m_czero)) + { +#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + BOOST_STATIC_ASSERT(!std::numeric_limits::is_signed); +#endif + } + + CharT* convert() { +#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE + std::locale loc; + if (loc == std::locale::classic()) { + return main_convert_loop(); + } + + typedef std::numpunct numpunct; + numpunct const& np = BOOST_USE_FACET(numpunct, loc); + std::string const grouping = np.grouping(); + std::string::size_type const grouping_size = grouping.size(); + + if (!grouping_size || grouping[0] <= 0) { + return main_convert_loop(); + } + +#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + // Check that ulimited group is unreachable: + BOOST_STATIC_ASSERT(std::numeric_limits::digits10 < CHAR_MAX); +#endif + CharT const thousands_sep = np.thousands_sep(); + std::string::size_type group = 0; // current group number + char last_grp_size = grouping[0]; + char left = last_grp_size; + + do { + if (left == 0) { + ++group; + if (group < grouping_size) { + char const grp_size = grouping[group]; + last_grp_size = (grp_size <= 0 ? static_cast(CHAR_MAX) : grp_size); + } + + left = last_grp_size; + --m_finish; + Traits::assign(*m_finish, thousands_sep); + } + + --left; + } while (main_convert_iteration()); + + return m_finish; +#else + return main_convert_loop(); +#endif + } + + private: + inline bool main_convert_iteration() BOOST_NOEXCEPT { + --m_finish; + int_type const digit = static_cast(m_value % 10U); + Traits::assign(*m_finish, Traits::to_char_type(m_zero + digit)); + m_value /= 10; + return !!m_value; // suppressing warnings + } + + inline CharT* main_convert_loop() BOOST_NOEXCEPT { + while (main_convert_iteration()); + return m_finish; + } + }; + } + + namespace detail // lcast_ret_unsigned + { + template + class lcast_ret_unsigned: boost::noncopyable { + bool m_multiplier_overflowed; + T m_multiplier; + T& m_value; + const CharT* const m_begin; + const CharT* m_end; + + public: + lcast_ret_unsigned(T& value, const CharT* const begin, const CharT* end) BOOST_NOEXCEPT + : m_multiplier_overflowed(false), m_multiplier(1), m_value(value), m_begin(begin), m_end(end) + { +#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + BOOST_STATIC_ASSERT(!std::numeric_limits::is_signed); + + // GCC when used with flag -std=c++0x may not have std::numeric_limits + // specializations for __int128 and unsigned __int128 types. + // Try compilation with -std=gnu++0x or -std=gnu++11. + // + // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40856 + BOOST_STATIC_ASSERT_MSG(std::numeric_limits::is_specialized, + "std::numeric_limits are not specialized for integral type passed to boost::lexical_cast" + ); +#endif + } + + inline bool convert() { + CharT const czero = lcast_char_constants::zero; + --m_end; + m_value = static_cast(0); + + if (m_begin > m_end || *m_end < czero || *m_end >= czero + 10) + return false; + m_value = static_cast(*m_end - czero); + --m_end; + +#ifdef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE + return main_convert_loop(); +#else + std::locale loc; + if (loc == std::locale::classic()) { + return main_convert_loop(); + } + + typedef std::numpunct numpunct; + numpunct const& np = BOOST_USE_FACET(numpunct, loc); + std::string const& grouping = np.grouping(); + std::string::size_type const grouping_size = grouping.size(); + + /* According to Programming languages - C++ + * we MUST check for correct grouping + */ + if (!grouping_size || grouping[0] <= 0) { + return main_convert_loop(); + } + + unsigned char current_grouping = 0; + CharT const thousands_sep = np.thousands_sep(); + char remained = static_cast(grouping[current_grouping] - 1); + + for (;m_end >= m_begin; --m_end) + { + if (remained) { + if (!main_convert_iteration()) { + return false; + } + --remained; + } else { + if ( !Traits::eq(*m_end, thousands_sep) ) //|| begin == end ) return false; + { + /* + * According to Programming languages - C++ + * Digit grouping is checked. That is, the positions of discarded + * separators is examined for consistency with + * use_facet >(loc ).grouping() + * + * BUT what if there is no separators at all and grouping() + * is not empty? Well, we have no extraced separators, so we + * won`t check them for consistency. This will allow us to + * work with "C" locale from other locales + */ + return main_convert_loop(); + } else { + if (m_begin == m_end) return false; + if (current_grouping < grouping_size - 1) ++current_grouping; + remained = grouping[current_grouping]; + } + } + } /*for*/ + + return true; +#endif + } + + private: + // Iteration that does not care about grouping/separators and assumes that all + // input characters are digits + inline bool main_convert_iteration() BOOST_NOEXCEPT { + CharT const czero = lcast_char_constants::zero; + T const maxv = (std::numeric_limits::max)(); + + m_multiplier_overflowed = m_multiplier_overflowed || (maxv/10 < m_multiplier); + m_multiplier = static_cast(m_multiplier * 10); + + T const dig_value = static_cast(*m_end - czero); + T const new_sub_value = static_cast(m_multiplier * dig_value); + + // We must correctly handle situations like `000000000000000000000000000001`. + // So we take care of overflow only if `dig_value` is not '0'. + if (*m_end < czero || *m_end >= czero + 10 // checking for correct digit + || (dig_value && ( // checking for overflow of ... + m_multiplier_overflowed // ... multiplier + || static_cast(maxv / dig_value) < m_multiplier // ... subvalue + || static_cast(maxv - new_sub_value) < m_value // ... whole expression + )) + ) return false; + + m_value = static_cast(m_value + new_sub_value); + + return true; + } + + bool main_convert_loop() BOOST_NOEXCEPT { + for ( ; m_end >= m_begin; --m_end) { + if (!main_convert_iteration()) { + return false; + } + } + + return true; + } + }; + } +} // namespace boost + +#endif // BOOST_LEXICAL_CAST_DETAIL_LCAST_UNSIGNED_CONVERTERS_HPP + diff --git a/ThirdParty/boost-Subset/boost/lexical_cast/detail/widest_char.hpp b/ThirdParty/boost-Subset/boost/lexical_cast/detail/widest_char.hpp new file mode 100644 index 0000000000..013aaf119d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/lexical_cast/detail/widest_char.hpp @@ -0,0 +1,40 @@ +// Copyright Kevlin Henney, 2000-2005. +// Copyright Alexander Nasonov, 2006-2010. +// Copyright Antony Polukhin, 2011-2014. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// what: lexical_cast custom keyword cast +// who: contributed by Kevlin Henney, +// enhanced with contributions from Terje Slettebo, +// with additional fixes and suggestions from Gennaro Prota, +// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov, +// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann, +// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters +// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014 + +#ifndef BOOST_LEXICAL_CAST_DETAIL_WIDEST_CHAR_HPP +#define BOOST_LEXICAL_CAST_DETAIL_WIDEST_CHAR_HPP + +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +namespace boost { namespace detail { + + template + struct widest_char { + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< + (sizeof(TargetChar) > sizeof(SourceChar)) + , TargetChar + , SourceChar + >::type type; + }; + +}} // namespace boost::detail + +#endif // BOOST_LEXICAL_CAST_DETAIL_WIDEST_CHAR_HPP + diff --git a/ThirdParty/boost-Subset/boost/lexical_cast/try_lexical_convert.hpp b/ThirdParty/boost-Subset/boost/lexical_cast/try_lexical_convert.hpp new file mode 100644 index 0000000000..66270eee76 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/lexical_cast/try_lexical_convert.hpp @@ -0,0 +1,199 @@ +// Copyright Kevlin Henney, 2000-2005. +// Copyright Alexander Nasonov, 2006-2010. +// Copyright Antony Polukhin, 2011-2014. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// what: lexical_cast custom keyword cast +// who: contributed by Kevlin Henney, +// enhanced with contributions from Terje Slettebo, +// with additional fixes and suggestions from Gennaro Prota, +// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov, +// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann, +// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters +// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014 + +#ifndef BOOST_LEXICAL_CAST_TRY_LEXICAL_CONVERT_HPP +#define BOOST_LEXICAL_CAST_TRY_LEXICAL_CONVERT_HPP + +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +namespace boost { + namespace detail + { + template + struct is_stdstring + : boost::false_type + {}; + + template + struct is_stdstring< std::basic_string > + : boost::true_type + {}; + + template + struct is_stdstring< boost::container::basic_string > + : boost::true_type + {}; + + template + struct is_arithmetic_and_not_xchars + { + typedef boost::mpl::bool_< + !(boost::detail::is_character::value) && + !(boost::detail::is_character::value) && + boost::is_arithmetic::value && + boost::is_arithmetic::value + > type; + + BOOST_STATIC_CONSTANT(bool, value = ( + type::value + )); + }; + + /* + * is_xchar_to_xchar::value is true, + * Target and Souce are char types of the same size 1 (char, signed char, unsigned char). + */ + template + struct is_xchar_to_xchar + { + typedef boost::mpl::bool_< + sizeof(Source) == sizeof(Target) && + sizeof(Source) == sizeof(char) && + boost::detail::is_character::value && + boost::detail::is_character::value + > type; + + BOOST_STATIC_CONSTANT(bool, value = ( + type::value + )); + }; + + template + struct is_char_array_to_stdstring + : boost::false_type + {}; + + template + struct is_char_array_to_stdstring< std::basic_string, CharT* > + : boost::true_type + {}; + + template + struct is_char_array_to_stdstring< std::basic_string, const CharT* > + : boost::true_type + {}; + + template + struct is_char_array_to_stdstring< boost::container::basic_string, CharT* > + : boost::true_type + {}; + + template + struct is_char_array_to_stdstring< boost::container::basic_string, const CharT* > + : boost::true_type + {}; + + template + struct copy_converter_impl + { +// MSVC fail to forward an array (DevDiv#555157 "SILENT BAD CODEGEN triggered by perfect forwarding", +// fixed in 2013 RTM). +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && (!defined(BOOST_MSVC) || BOOST_MSVC >= 1800) + template + static inline bool try_convert(T&& arg, Target& result) { + result = static_cast(arg); // eqaul to `result = std::forward(arg);` + return true; + } +#else + static inline bool try_convert(const Source& arg, Target& result) { + result = arg; + return true; + } +#endif + }; + } + + namespace conversion { namespace detail { + + template + inline bool try_lexical_convert(const Source& arg, Target& result) + { + typedef BOOST_DEDUCED_TYPENAME boost::detail::array_to_pointer_decay::type src; + + typedef boost::mpl::bool_< + boost::detail::is_xchar_to_xchar::value || + boost::detail::is_char_array_to_stdstring::value || + ( + boost::is_same::value && + boost::detail::is_stdstring::value + ) || + ( + boost::is_same::value && + boost::detail::is_character::value + ) + > shall_we_copy_t; + + typedef boost::detail::is_arithmetic_and_not_xchars + shall_we_copy_with_dynamic_check_t; + + // We do evaluate second `if_` lazily to avoid unnecessary instantiations + // of `shall_we_copy_with_dynamic_check_t` and improve compilation times. + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< + shall_we_copy_t::value, + boost::mpl::identity >, + boost::mpl::if_< + shall_we_copy_with_dynamic_check_t, + boost::detail::dynamic_num_converter_impl, + boost::detail::lexical_converter_impl + > + >::type caster_type_lazy; + + typedef BOOST_DEDUCED_TYPENAME caster_type_lazy::type caster_type; + + return caster_type::try_convert(arg, result); + } + + template + inline bool try_lexical_convert(const CharacterT* chars, std::size_t count, Target& result) + { + BOOST_STATIC_ASSERT_MSG( + boost::detail::is_character::value, + "This overload of try_lexical_convert is meant to be used only with arrays of characters." + ); + return ::boost::conversion::detail::try_lexical_convert( + ::boost::iterator_range(chars, chars + count), result + ); + } + + }} // namespace conversion::detail + + namespace conversion { + // ADL barrier + using ::boost::conversion::detail::try_lexical_convert; + } + +} // namespace boost + +#endif // BOOST_LEXICAL_CAST_TRY_LEXICAL_CONVERT_HPP + diff --git a/ThirdParty/boost-Subset/boost/limits.hpp b/ThirdParty/boost-Subset/boost/limits.hpp new file mode 100644 index 0000000000..47d8155611 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/limits.hpp @@ -0,0 +1,146 @@ + +// (C) Copyright John maddock 1999. +// (C) David Abrahams 2002. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// use this header as a workaround for missing + +// See http://www.boost.org/libs/compatibility/index.html for documentation. + +#ifndef BOOST_LIMITS +#define BOOST_LIMITS + +#include + +#ifdef BOOST_NO_LIMITS +# error "There is no std::numeric_limits suppport available." +#else +# include +#endif + +#if (defined(BOOST_HAS_LONG_LONG) && defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS)) \ + || (defined(BOOST_HAS_MS_INT64) && defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS)) +// Add missing specializations for numeric_limits: +#ifdef BOOST_HAS_MS_INT64 +# define BOOST_LLT __int64 +# define BOOST_ULLT unsigned __int64 +#else +# define BOOST_LLT ::boost::long_long_type +# define BOOST_ULLT ::boost::ulong_long_type +#endif + +#include // for CHAR_BIT + +namespace std +{ + template<> + class numeric_limits + { + public: + + BOOST_STATIC_CONSTANT(bool, is_specialized = true); +#ifdef BOOST_HAS_MS_INT64 + static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0x8000000000000000i64; } + static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0x7FFFFFFFFFFFFFFFi64; } +#elif defined(LLONG_MAX) + static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LLONG_MIN; } + static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LLONG_MAX; } +#elif defined(LONGLONG_MAX) + static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LONGLONG_MIN; } + static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LONGLONG_MAX; } +#else + static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 1LL << (sizeof(BOOST_LLT) * CHAR_BIT - 1); } + static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ~(min)(); } +#endif + BOOST_STATIC_CONSTANT(int, digits = sizeof(BOOST_LLT) * CHAR_BIT -1); + BOOST_STATIC_CONSTANT(int, digits10 = (CHAR_BIT * sizeof (BOOST_LLT) - 1) * 301L / 1000); + BOOST_STATIC_CONSTANT(bool, is_signed = true); + BOOST_STATIC_CONSTANT(bool, is_integer = true); + BOOST_STATIC_CONSTANT(bool, is_exact = true); + BOOST_STATIC_CONSTANT(int, radix = 2); + static BOOST_LLT epsilon() throw() { return 0; }; + static BOOST_LLT round_error() throw() { return 0; }; + + BOOST_STATIC_CONSTANT(int, min_exponent = 0); + BOOST_STATIC_CONSTANT(int, min_exponent10 = 0); + BOOST_STATIC_CONSTANT(int, max_exponent = 0); + BOOST_STATIC_CONSTANT(int, max_exponent10 = 0); + + BOOST_STATIC_CONSTANT(bool, has_infinity = false); + BOOST_STATIC_CONSTANT(bool, has_quiet_NaN = false); + BOOST_STATIC_CONSTANT(bool, has_signaling_NaN = false); + BOOST_STATIC_CONSTANT(bool, has_denorm = false); + BOOST_STATIC_CONSTANT(bool, has_denorm_loss = false); + static BOOST_LLT infinity() throw() { return 0; }; + static BOOST_LLT quiet_NaN() throw() { return 0; }; + static BOOST_LLT signaling_NaN() throw() { return 0; }; + static BOOST_LLT denorm_min() throw() { return 0; }; + + BOOST_STATIC_CONSTANT(bool, is_iec559 = false); + BOOST_STATIC_CONSTANT(bool, is_bounded = true); + BOOST_STATIC_CONSTANT(bool, is_modulo = true); + + BOOST_STATIC_CONSTANT(bool, traps = false); + BOOST_STATIC_CONSTANT(bool, tinyness_before = false); + BOOST_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero); + + }; + + template<> + class numeric_limits + { + public: + + BOOST_STATIC_CONSTANT(bool, is_specialized = true); +#ifdef BOOST_HAS_MS_INT64 + static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0ui64; } + static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0xFFFFFFFFFFFFFFFFui64; } +#elif defined(ULLONG_MAX) && defined(ULLONG_MIN) + static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULLONG_MIN; } + static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULLONG_MAX; } +#elif defined(ULONGLONG_MAX) && defined(ULONGLONG_MIN) + static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULONGLONG_MIN; } + static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULONGLONG_MAX; } +#else + static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0uLL; } + static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ~0uLL; } +#endif + BOOST_STATIC_CONSTANT(int, digits = sizeof(BOOST_LLT) * CHAR_BIT); + BOOST_STATIC_CONSTANT(int, digits10 = (CHAR_BIT * sizeof (BOOST_LLT)) * 301L / 1000); + BOOST_STATIC_CONSTANT(bool, is_signed = false); + BOOST_STATIC_CONSTANT(bool, is_integer = true); + BOOST_STATIC_CONSTANT(bool, is_exact = true); + BOOST_STATIC_CONSTANT(int, radix = 2); + static BOOST_ULLT epsilon() throw() { return 0; }; + static BOOST_ULLT round_error() throw() { return 0; }; + + BOOST_STATIC_CONSTANT(int, min_exponent = 0); + BOOST_STATIC_CONSTANT(int, min_exponent10 = 0); + BOOST_STATIC_CONSTANT(int, max_exponent = 0); + BOOST_STATIC_CONSTANT(int, max_exponent10 = 0); + + BOOST_STATIC_CONSTANT(bool, has_infinity = false); + BOOST_STATIC_CONSTANT(bool, has_quiet_NaN = false); + BOOST_STATIC_CONSTANT(bool, has_signaling_NaN = false); + BOOST_STATIC_CONSTANT(bool, has_denorm = false); + BOOST_STATIC_CONSTANT(bool, has_denorm_loss = false); + static BOOST_ULLT infinity() throw() { return 0; }; + static BOOST_ULLT quiet_NaN() throw() { return 0; }; + static BOOST_ULLT signaling_NaN() throw() { return 0; }; + static BOOST_ULLT denorm_min() throw() { return 0; }; + + BOOST_STATIC_CONSTANT(bool, is_iec559 = false); + BOOST_STATIC_CONSTANT(bool, is_bounded = true); + BOOST_STATIC_CONSTANT(bool, is_modulo = true); + + BOOST_STATIC_CONSTANT(bool, traps = false); + BOOST_STATIC_CONSTANT(bool, tinyness_before = false); + BOOST_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero); + + }; +} +#endif + +#endif + diff --git a/ThirdParty/boost-Subset/boost/make_shared.hpp b/ThirdParty/boost-Subset/boost/make_shared.hpp new file mode 100644 index 0000000000..c04938f9b3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/make_shared.hpp @@ -0,0 +1,17 @@ +#ifndef BOOST_MAKE_SHARED_HPP_INCLUDED +#define BOOST_MAKE_SHARED_HPP_INCLUDED + +// make_shared.hpp +// +// Copyright (c) 2007, 2008 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// See http://www.boost.org/libs/smart_ptr/make_shared.html +// for documentation. + +#include + +#endif // #ifndef BOOST_MAKE_SHARED_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/math/policies/policy.hpp b/ThirdParty/boost-Subset/boost/math/policies/policy.hpp new file mode 100644 index 0000000000..71309fa116 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/math/policies/policy.hpp @@ -0,0 +1,996 @@ +// Copyright John Maddock 2007. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MATH_POLICY_HPP +#define BOOST_MATH_POLICY_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +// Sadly we do need the .h versions of these to be sure of getting +// FLT_MANT_DIG etc. +#include +#include +#include +#include + +namespace boost{ namespace math{ + +namespace tools{ + +template +int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)); +template +T epsilon(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)); + +} + +namespace policies{ + +// +// Define macros for our default policies, if they're not defined already: +// +#ifndef BOOST_MATH_DOMAIN_ERROR_POLICY +#define BOOST_MATH_DOMAIN_ERROR_POLICY throw_on_error +#endif +#ifndef BOOST_MATH_POLE_ERROR_POLICY +#define BOOST_MATH_POLE_ERROR_POLICY throw_on_error +#endif +#ifndef BOOST_MATH_OVERFLOW_ERROR_POLICY +#define BOOST_MATH_OVERFLOW_ERROR_POLICY throw_on_error +#endif +#ifndef BOOST_MATH_EVALUATION_ERROR_POLICY +#define BOOST_MATH_EVALUATION_ERROR_POLICY throw_on_error +#endif +#ifndef BOOST_MATH_ROUNDING_ERROR_POLICY +#define BOOST_MATH_ROUNDING_ERROR_POLICY throw_on_error +#endif +#ifndef BOOST_MATH_UNDERFLOW_ERROR_POLICY +#define BOOST_MATH_UNDERFLOW_ERROR_POLICY ignore_error +#endif +#ifndef BOOST_MATH_DENORM_ERROR_POLICY +#define BOOST_MATH_DENORM_ERROR_POLICY ignore_error +#endif +#ifndef BOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY +#define BOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY ignore_error +#endif +#ifndef BOOST_MATH_DIGITS10_POLICY +#define BOOST_MATH_DIGITS10_POLICY 0 +#endif +#ifndef BOOST_MATH_PROMOTE_FLOAT_POLICY +#define BOOST_MATH_PROMOTE_FLOAT_POLICY true +#endif +#ifndef BOOST_MATH_PROMOTE_DOUBLE_POLICY +#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false +#else +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY true +#endif +#endif +#ifndef BOOST_MATH_DISCRETE_QUANTILE_POLICY +#define BOOST_MATH_DISCRETE_QUANTILE_POLICY integer_round_outwards +#endif +#ifndef BOOST_MATH_ASSERT_UNDEFINED_POLICY +#define BOOST_MATH_ASSERT_UNDEFINED_POLICY true +#endif +#ifndef BOOST_MATH_MAX_SERIES_ITERATION_POLICY +#define BOOST_MATH_MAX_SERIES_ITERATION_POLICY 1000000 +#endif +#ifndef BOOST_MATH_MAX_ROOT_ITERATION_POLICY +#define BOOST_MATH_MAX_ROOT_ITERATION_POLICY 200 +#endif + +#if !defined(__BORLANDC__) +#define BOOST_MATH_META_INT(type, name, Default)\ + template struct name : public boost::mpl::int_{};\ + namespace detail{\ + template \ + char test_is_valid_arg(const name*);\ + char test_is_default_arg(const name*);\ + template struct is_##name##_imp\ + {\ + template static char test(const name*);\ + static double test(...);\ + BOOST_STATIC_CONSTANT(bool, value = sizeof(test(static_cast(0))) == 1);\ + };\ + }\ + template struct is_##name : public boost::mpl::bool_< ::boost::math::policies::detail::is_##name##_imp::value>{}; + +#define BOOST_MATH_META_BOOL(name, Default)\ + template struct name : public boost::mpl::bool_{};\ + namespace detail{\ + template \ + char test_is_valid_arg(const name*);\ + char test_is_default_arg(const name*);\ + template struct is_##name##_imp\ + {\ + template static char test(const name*);\ + static double test(...);\ + BOOST_STATIC_CONSTANT(bool, value = sizeof(test(static_cast(0))) == 1);\ + };\ + }\ + template struct is_##name : public boost::mpl::bool_< ::boost::math::policies::detail::is_##name##_imp::value>{}; +#else +#define BOOST_MATH_META_INT(Type, name, Default)\ + template struct name : public boost::mpl::int_{};\ + namespace detail{\ + template \ + char test_is_valid_arg(const name*);\ + char test_is_default_arg(const name*);\ + template struct is_##name##_tester\ + {\ + template static char test(const name&);\ + static double test(...);\ + };\ + template struct is_##name##_imp\ + {\ + static T inst;\ + BOOST_STATIC_CONSTANT(bool, value = sizeof( ::boost::math::policies::detail::is_##name##_tester::test(inst)) == 1);\ + };\ + }\ + template struct is_##name : public boost::mpl::bool_< ::boost::math::policies::detail::is_##name##_imp::value>\ + {\ + template struct apply{ typedef is_##name type; };\ + }; + +#define BOOST_MATH_META_BOOL(name, Default)\ + template struct name : public boost::mpl::bool_{};\ + namespace detail{\ + template \ + char test_is_valid_arg(const name*);\ + char test_is_default_arg(const name*);\ + template struct is_##name##_tester\ + {\ + template static char test(const name&);\ + static double test(...);\ + };\ + template struct is_##name##_imp\ + {\ + static T inst;\ + BOOST_STATIC_CONSTANT(bool, value = sizeof( ::boost::math::policies::detail::is_##name##_tester::test(inst)) == 1);\ + };\ + }\ + template struct is_##name : public boost::mpl::bool_< ::boost::math::policies::detail::is_##name##_imp::value>\ + {\ + template struct apply{ typedef is_##name type; };\ + }; +#endif +// +// Begin by defining policy types for error handling: +// +enum error_policy_type +{ + throw_on_error = 0, + errno_on_error = 1, + ignore_error = 2, + user_error = 3 +}; + +BOOST_MATH_META_INT(error_policy_type, domain_error, BOOST_MATH_DOMAIN_ERROR_POLICY) +BOOST_MATH_META_INT(error_policy_type, pole_error, BOOST_MATH_POLE_ERROR_POLICY) +BOOST_MATH_META_INT(error_policy_type, overflow_error, BOOST_MATH_OVERFLOW_ERROR_POLICY) +BOOST_MATH_META_INT(error_policy_type, underflow_error, BOOST_MATH_UNDERFLOW_ERROR_POLICY) +BOOST_MATH_META_INT(error_policy_type, denorm_error, BOOST_MATH_DENORM_ERROR_POLICY) +BOOST_MATH_META_INT(error_policy_type, evaluation_error, BOOST_MATH_EVALUATION_ERROR_POLICY) +BOOST_MATH_META_INT(error_policy_type, rounding_error, BOOST_MATH_ROUNDING_ERROR_POLICY) +BOOST_MATH_META_INT(error_policy_type, indeterminate_result_error, BOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY) + +// +// Policy types for internal promotion: +// +BOOST_MATH_META_BOOL(promote_float, BOOST_MATH_PROMOTE_FLOAT_POLICY) +BOOST_MATH_META_BOOL(promote_double, BOOST_MATH_PROMOTE_DOUBLE_POLICY) +BOOST_MATH_META_BOOL(assert_undefined, BOOST_MATH_ASSERT_UNDEFINED_POLICY) +// +// Policy types for discrete quantiles: +// +enum discrete_quantile_policy_type +{ + real, + integer_round_outwards, + integer_round_inwards, + integer_round_down, + integer_round_up, + integer_round_nearest +}; + +BOOST_MATH_META_INT(discrete_quantile_policy_type, discrete_quantile, BOOST_MATH_DISCRETE_QUANTILE_POLICY) +// +// Precision: +// +BOOST_MATH_META_INT(int, digits10, BOOST_MATH_DIGITS10_POLICY) +BOOST_MATH_META_INT(int, digits2, 0) +// +// Iterations: +// +BOOST_MATH_META_INT(unsigned long, max_series_iterations, BOOST_MATH_MAX_SERIES_ITERATION_POLICY) +BOOST_MATH_META_INT(unsigned long, max_root_iterations, BOOST_MATH_MAX_ROOT_ITERATION_POLICY) +// +// Define the names for each possible policy: +// +#define BOOST_MATH_PARAMETER(name)\ + BOOST_PARAMETER_TEMPLATE_KEYWORD(name##_name)\ + BOOST_PARAMETER_NAME(name##_name) + +struct default_policy{}; + +namespace detail{ +// +// Trait to work out bits precision from digits10 and digits2: +// +template +struct precision +{ + // + // Now work out the precision: + // + typedef typename mpl::if_c< + (Digits10::value == 0), + digits2<0>, + digits2<((Digits10::value + 1) * 1000L) / 301L> + >::type digits2_type; +public: +#ifdef __BORLANDC__ + typedef typename mpl::if_c< + (Digits2::value > ::boost::math::policies::detail::precision::digits2_type::value), + Digits2, digits2_type>::type type; +#else + typedef typename mpl::if_c< + (Digits2::value > digits2_type::value), + Digits2, digits2_type>::type type; +#endif +}; + +template +struct select_result +{ + typedef A type; +}; +template +struct select_result +{ + typedef typename mpl::deref::type type; +}; + +template +struct find_arg +{ +private: + typedef typename mpl::find_if::type iter; + typedef typename mpl::end::type end_type; +public: + typedef typename select_result< + DefaultType, iter, + ::boost::is_same::value>::type type; +}; + +double test_is_valid_arg(...); +double test_is_default_arg(...); +char test_is_valid_arg(const default_policy*); +char test_is_default_arg(const default_policy*); + +template +struct is_valid_policy_imp +{ + BOOST_STATIC_CONSTANT(bool, value = sizeof(::boost::math::policies::detail::test_is_valid_arg(static_cast(0))) == 1); +}; + +template +struct is_default_policy_imp +{ + BOOST_STATIC_CONSTANT(bool, value = sizeof(::boost::math::policies::detail::test_is_default_arg(static_cast(0))) == 1); +}; + +template struct is_valid_policy +: public mpl::bool_< + ::boost::math::policies::detail::is_valid_policy_imp::value> +{}; + +template struct is_default_policy +: public mpl::bool_< + ::boost::math::policies::detail::is_default_policy_imp::value> +{ + template + struct apply + { + typedef is_default_policy type; + }; +}; + +template +struct append_N +{ + typedef typename mpl::push_back::type new_seq; + typedef typename append_N::type type; +}; + +template +struct append_N +{ + typedef Seq type; +}; + +// +// Traits class to work out what template parameters our default +// policy<> class will have when modified for forwarding: +// +template +struct default_args +{ + typedef promote_float arg1; + typedef promote_double arg2; +}; + +template <> +struct default_args +{ + typedef default_policy arg1; + typedef default_policy arg2; +}; + +template <> +struct default_args +{ + typedef promote_float arg1; + typedef default_policy arg2; +}; + +template <> +struct default_args +{ + typedef promote_double arg1; + typedef default_policy arg2; +}; + +typedef default_args::arg1 forwarding_arg1; +typedef default_args::arg2 forwarding_arg2; + +} // detail +// +// Now define the policy type with enough arguments to handle all +// the policies: +// +template +struct policy +{ +private: + // + // Validate all our arguments: + // + BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy::value); + BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy::value); + BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy::value); + BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy::value); + BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy::value); + BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy::value); + BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy::value); + BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy::value); + BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy::value); + BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy::value); + BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy::value); + BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy::value); + BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy::value); + // + // Typelist of the arguments: + // + typedef mpl::list arg_list; + +public: + typedef typename detail::find_arg, domain_error<> >::type domain_error_type; + typedef typename detail::find_arg, pole_error<> >::type pole_error_type; + typedef typename detail::find_arg, overflow_error<> >::type overflow_error_type; + typedef typename detail::find_arg, underflow_error<> >::type underflow_error_type; + typedef typename detail::find_arg, denorm_error<> >::type denorm_error_type; + typedef typename detail::find_arg, evaluation_error<> >::type evaluation_error_type; + typedef typename detail::find_arg, rounding_error<> >::type rounding_error_type; + typedef typename detail::find_arg, indeterminate_result_error<> >::type indeterminate_result_error_type; +private: + // + // Now work out the precision: + // + typedef typename detail::find_arg, digits10<> >::type digits10_type; + typedef typename detail::find_arg, digits2<> >::type bits_precision_type; +public: + typedef typename detail::precision::type precision_type; + // + // Internal promotion: + // + typedef typename detail::find_arg, promote_float<> >::type promote_float_type; + typedef typename detail::find_arg, promote_double<> >::type promote_double_type; + // + // Discrete quantiles: + // + typedef typename detail::find_arg, discrete_quantile<> >::type discrete_quantile_type; + // + // Mathematically undefined properties: + // + typedef typename detail::find_arg, assert_undefined<> >::type assert_undefined_type; + // + // Max iterations: + // + typedef typename detail::find_arg, max_series_iterations<> >::type max_series_iterations_type; + typedef typename detail::find_arg, max_root_iterations<> >::type max_root_iterations_type; +}; +// +// These full specializations are defined to reduce the amount of +// template instantiations that have to take place when using the default +// policies, they have quite a large impact on compile times: +// +template <> +struct policy +{ +public: + typedef domain_error<> domain_error_type; + typedef pole_error<> pole_error_type; + typedef overflow_error<> overflow_error_type; + typedef underflow_error<> underflow_error_type; + typedef denorm_error<> denorm_error_type; + typedef evaluation_error<> evaluation_error_type; + typedef rounding_error<> rounding_error_type; + typedef indeterminate_result_error<> indeterminate_result_error_type; +#if BOOST_MATH_DIGITS10_POLICY == 0 + typedef digits2<> precision_type; +#else + typedef detail::precision, digits2<> >::type precision_type; +#endif + typedef promote_float<> promote_float_type; + typedef promote_double<> promote_double_type; + typedef discrete_quantile<> discrete_quantile_type; + typedef assert_undefined<> assert_undefined_type; + typedef max_series_iterations<> max_series_iterations_type; + typedef max_root_iterations<> max_root_iterations_type; +}; + +template <> +struct policy +{ +public: + typedef domain_error<> domain_error_type; + typedef pole_error<> pole_error_type; + typedef overflow_error<> overflow_error_type; + typedef underflow_error<> underflow_error_type; + typedef denorm_error<> denorm_error_type; + typedef evaluation_error<> evaluation_error_type; + typedef rounding_error<> rounding_error_type; + typedef indeterminate_result_error<> indeterminate_result_error_type; +#if BOOST_MATH_DIGITS10_POLICY == 0 + typedef digits2<> precision_type; +#else + typedef detail::precision, digits2<> >::type precision_type; +#endif + typedef promote_float promote_float_type; + typedef promote_double promote_double_type; + typedef discrete_quantile<> discrete_quantile_type; + typedef assert_undefined<> assert_undefined_type; + typedef max_series_iterations<> max_series_iterations_type; + typedef max_root_iterations<> max_root_iterations_type; +}; + +template +struct normalise +{ +private: + typedef mpl::list arg_list; + typedef typename detail::find_arg, typename Policy::domain_error_type >::type domain_error_type; + typedef typename detail::find_arg, typename Policy::pole_error_type >::type pole_error_type; + typedef typename detail::find_arg, typename Policy::overflow_error_type >::type overflow_error_type; + typedef typename detail::find_arg, typename Policy::underflow_error_type >::type underflow_error_type; + typedef typename detail::find_arg, typename Policy::denorm_error_type >::type denorm_error_type; + typedef typename detail::find_arg, typename Policy::evaluation_error_type >::type evaluation_error_type; + typedef typename detail::find_arg, typename Policy::rounding_error_type >::type rounding_error_type; + typedef typename detail::find_arg, typename Policy::indeterminate_result_error_type >::type indeterminate_result_error_type; + // + // Now work out the precision: + // + typedef typename detail::find_arg, digits10<> >::type digits10_type; + typedef typename detail::find_arg, typename Policy::precision_type >::type bits_precision_type; + typedef typename detail::precision::type precision_type; + // + // Internal promotion: + // + typedef typename detail::find_arg, typename Policy::promote_float_type >::type promote_float_type; + typedef typename detail::find_arg, typename Policy::promote_double_type >::type promote_double_type; + // + // Discrete quantiles: + // + typedef typename detail::find_arg, typename Policy::discrete_quantile_type >::type discrete_quantile_type; + // + // Mathematically undefined properties: + // + typedef typename detail::find_arg, typename Policy::assert_undefined_type >::type assert_undefined_type; + // + // Max iterations: + // + typedef typename detail::find_arg, typename Policy::max_series_iterations_type>::type max_series_iterations_type; + typedef typename detail::find_arg, typename Policy::max_root_iterations_type>::type max_root_iterations_type; + // + // Define a typelist of the policies: + // + typedef mpl::vector< + domain_error_type, + pole_error_type, + overflow_error_type, + underflow_error_type, + denorm_error_type, + evaluation_error_type, + rounding_error_type, + indeterminate_result_error_type, + precision_type, + promote_float_type, + promote_double_type, + discrete_quantile_type, + assert_undefined_type, + max_series_iterations_type, + max_root_iterations_type> result_list; + // + // Remove all the policies that are the same as the default: + // + typedef typename mpl::remove_if >::type reduced_list; + // + // Pad out the list with defaults: + // + typedef typename detail::append_N::value)>::type result_type; +public: + typedef policy< + typename mpl::at >::type, + typename mpl::at >::type, + typename mpl::at >::type, + typename mpl::at >::type, + typename mpl::at >::type, + typename mpl::at >::type, + typename mpl::at >::type, + typename mpl::at >::type, + typename mpl::at >::type, + typename mpl::at >::type, + typename mpl::at >::type, + typename mpl::at >::type, + typename mpl::at >::type > type; +}; +// +// Full specialisation to speed up compilation of the common case: +// +template <> +struct normalise, + promote_float, + promote_double, + discrete_quantile<>, + assert_undefined<>, + default_policy, + default_policy, + default_policy, + default_policy, + default_policy, + default_policy, + default_policy> +{ + typedef policy type; +}; + +template <> +struct normalise, + promote_float, + promote_double, + discrete_quantile<>, + assert_undefined<>, + default_policy, + default_policy, + default_policy, + default_policy, + default_policy, + default_policy, + default_policy> +{ + typedef policy type; +}; + +inline policy<> make_policy() +{ return policy<>(); } + +template +inline typename normalise, A1>::type make_policy(const A1&) +{ + typedef typename normalise, A1>::type result_type; + return result_type(); +} + +template +inline typename normalise, A1, A2>::type make_policy(const A1&, const A2&) +{ + typedef typename normalise, A1, A2>::type result_type; + return result_type(); +} + +template +inline typename normalise, A1, A2, A3>::type make_policy(const A1&, const A2&, const A3&) +{ + typedef typename normalise, A1, A2, A3>::type result_type; + return result_type(); +} + +template +inline typename normalise, A1, A2, A3, A4>::type make_policy(const A1&, const A2&, const A3&, const A4&) +{ + typedef typename normalise, A1, A2, A3, A4>::type result_type; + return result_type(); +} + +template +inline typename normalise, A1, A2, A3, A4, A5>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&) +{ + typedef typename normalise, A1, A2, A3, A4, A5>::type result_type; + return result_type(); +} + +template +inline typename normalise, A1, A2, A3, A4, A5, A6>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&) +{ + typedef typename normalise, A1, A2, A3, A4, A5, A6>::type result_type; + return result_type(); +} + +template +inline typename normalise, A1, A2, A3, A4, A5, A6, A7>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&) +{ + typedef typename normalise, A1, A2, A3, A4, A5, A6, A7>::type result_type; + return result_type(); +} + +template +inline typename normalise, A1, A2, A3, A4, A5, A6, A7, A8>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&) +{ + typedef typename normalise, A1, A2, A3, A4, A5, A6, A7, A8>::type result_type; + return result_type(); +} + +template +inline typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&) +{ + typedef typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9>::type result_type; + return result_type(); +} + +template +inline typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&, const A10&) +{ + typedef typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>::type result_type; + return result_type(); +} + +template +inline typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&, const A10&, const A11&) +{ + typedef typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>::type result_type; + return result_type(); +} + +// +// Traits class to handle internal promotion: +// +template +struct evaluation +{ + typedef Real type; +}; + +template +struct evaluation +{ + typedef typename mpl::if_::type type; +}; + +template +struct evaluation +{ + typedef typename mpl::if_::type type; +}; + +#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + +template +struct basic_digits : public mpl::int_<0>{ }; +template <> +struct basic_digits : public mpl::int_{ }; +template <> +struct basic_digits : public mpl::int_{ }; +template <> +struct basic_digits : public mpl::int_{ }; + +template +struct precision +{ + BOOST_STATIC_ASSERT( ::std::numeric_limits::radix == 2); + typedef typename Policy::precision_type precision_type; + typedef basic_digits digits_t; + typedef typename mpl::if_< + mpl::equal_to >, + // Possibly unknown precision: + precision_type, + typename mpl::if_< + mpl::or_, mpl::less_equal > >, + // Default case, full precision for RealType: + digits2< ::std::numeric_limits::digits>, + // User customised precision: + precision_type + >::type + >::type type; +}; + +template +struct precision +{ + typedef digits2 type; +}; +template +struct precision +{ + typedef digits2 type; +}; +template +struct precision +{ + typedef digits2 type; +}; + +#else + +template +struct precision +{ + BOOST_STATIC_ASSERT((::std::numeric_limits::radix == 2) || ((::std::numeric_limits::is_specialized == 0) || (::std::numeric_limits::digits == 0))); +#ifndef __BORLANDC__ + typedef typename Policy::precision_type precision_type; + typedef typename mpl::if_c< + ((::std::numeric_limits::is_specialized == 0) || (::std::numeric_limits::digits == 0)), + // Possibly unknown precision: + precision_type, + typename mpl::if_c< + ((::std::numeric_limits::digits <= precision_type::value) + || (Policy::precision_type::value <= 0)), + // Default case, full precision for RealType: + digits2< ::std::numeric_limits::digits>, + // User customised precision: + precision_type + >::type + >::type type; +#else + typedef typename Policy::precision_type precision_type; + typedef mpl::int_< ::std::numeric_limits::digits> digits_t; + typedef mpl::bool_< ::std::numeric_limits::is_specialized> spec_t; + typedef typename mpl::if_< + mpl::or_, mpl::equal_to > >, + // Possibly unknown precision: + precision_type, + typename mpl::if_< + mpl::or_, mpl::less_equal > >, + // Default case, full precision for RealType: + digits2< ::std::numeric_limits::digits>, + // User customised precision: + precision_type + >::type + >::type type; +#endif +}; + +#endif + +#ifdef BOOST_MATH_USE_FLOAT128 + +template +struct precision +{ + typedef mpl::int_<113> type; +}; + +#endif + +namespace detail{ + +template +inline int digits_imp(mpl::true_ const&) +{ +#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + BOOST_STATIC_ASSERT( ::std::numeric_limits::is_specialized); +#else + BOOST_ASSERT(::std::numeric_limits::is_specialized); +#endif + typedef typename boost::math::policies::precision::type p_t; + return p_t::value; +} + +template +inline int digits_imp(mpl::false_ const&) +{ + return tools::digits(); +} + +} // namespace detail + +template +inline int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) +{ + typedef mpl::bool_< std::numeric_limits::is_specialized > tag_type; + return detail::digits_imp(tag_type()); +} +template +inline int digits_base10(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) +{ + return boost::math::policies::digits() * 301 / 1000L; +} + +template +inline unsigned long get_max_series_iterations() +{ + typedef typename Policy::max_series_iterations_type iter_type; + return iter_type::value; +} + +template +inline unsigned long get_max_root_iterations() +{ + typedef typename Policy::max_root_iterations_type iter_type; + return iter_type::value; +} + +namespace detail{ + +template +struct series_factor_calc +{ + static T get() + { + return ldexp(T(1.0), 1 - Digits::value); + } +}; + +template +struct series_factor_calc +{ + static T get() + { + return boost::math::tools::epsilon(); + } +}; +template +struct series_factor_calc +{ + static T get() + { + static const boost::uintmax_t v = static_cast(1u) << (Digits::value - 1); + return 1 / static_cast(v); + } +}; +template +struct series_factor_calc +{ + static T get() + { + return boost::math::tools::epsilon(); + } +}; + +template +inline T get_epsilon_imp(mpl::true_ const&) +{ +#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + BOOST_STATIC_ASSERT( ::std::numeric_limits::is_specialized); + BOOST_STATIC_ASSERT( ::std::numeric_limits::radix == 2); +#else + BOOST_ASSERT(::std::numeric_limits::is_specialized); + BOOST_ASSERT(::std::numeric_limits::radix == 2); +#endif + typedef typename boost::math::policies::precision::type p_t; + typedef mpl::bool_::digits> is_small_int; + typedef mpl::bool_= std::numeric_limits::digits> is_default_value; + return series_factor_calc::get(); +} + +template +inline T get_epsilon_imp(mpl::false_ const&) +{ + return tools::epsilon(); +} + +} // namespace detail + +template +inline T get_epsilon(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) +{ + typedef mpl::bool_< (std::numeric_limits::is_specialized && (std::numeric_limits::radix == 2)) > tag_type; + return detail::get_epsilon_imp(tag_type()); +} + +namespace detail{ + +template +char test_is_policy(const policy*); +double test_is_policy(...); + +template +struct is_policy_imp +{ + BOOST_STATIC_CONSTANT(bool, value = (sizeof(::boost::math::policies::detail::test_is_policy(static_cast(0))) == 1)); +}; + +} + +template +struct is_policy : public mpl::bool_< ::boost::math::policies::detail::is_policy_imp

::value> {}; + +// +// Helper traits class for distribution error handling: +// +template +struct constructor_error_check +{ + typedef typename Policy::domain_error_type domain_error_type; + typedef typename mpl::if_c< + (domain_error_type::value == throw_on_error) || (domain_error_type::value == user_error), + mpl::true_, + mpl::false_>::type type; +}; + +template +struct method_error_check +{ + typedef typename Policy::domain_error_type domain_error_type; + typedef typename mpl::if_c< + (domain_error_type::value == throw_on_error) && (domain_error_type::value != user_error), + mpl::false_, + mpl::true_>::type type; +}; + +}}} // namespaces + +#endif // BOOST_MATH_POLICY_HPP + + + diff --git a/ThirdParty/boost-Subset/boost/math/special_functions/detail/fp_traits.hpp b/ThirdParty/boost-Subset/boost/math/special_functions/detail/fp_traits.hpp new file mode 100644 index 0000000000..09dc5169aa --- /dev/null +++ b/ThirdParty/boost-Subset/boost/math/special_functions/detail/fp_traits.hpp @@ -0,0 +1,580 @@ +// fp_traits.hpp + +#ifndef BOOST_MATH_FP_TRAITS_HPP +#define BOOST_MATH_FP_TRAITS_HPP + +// Copyright (c) 2006 Johan Rade + +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) + +/* +To support old compilers, care has been taken to avoid partial template +specialization and meta function forwarding. +With these techniques, the code could be simplified. +*/ + +#if defined(__vms) && defined(__DECCXX) && !__IEEE_FLOAT +// The VAX floating point formats are used (for float and double) +# define BOOST_FPCLASSIFY_VAX_FORMAT +#endif + +#include + +#include +#include +#include +#include +#include + +#ifdef BOOST_NO_STDC_NAMESPACE + namespace std{ using ::memcpy; } +#endif + +#ifndef FP_NORMAL + +#define FP_ZERO 0 +#define FP_NORMAL 1 +#define FP_INFINITE 2 +#define FP_NAN 3 +#define FP_SUBNORMAL 4 + +#else + +#define BOOST_HAS_FPCLASSIFY + +#ifndef fpclassify +# if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) \ + && defined(_GLIBCXX_USE_C99_MATH) \ + && !(defined(_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC) \ + && (_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC != 0)) +# ifdef _STLP_VENDOR_CSTD +# if _STLPORT_VERSION >= 0x520 +# define BOOST_FPCLASSIFY_PREFIX ::__std_alias:: +# else +# define BOOST_FPCLASSIFY_PREFIX ::_STLP_VENDOR_CSTD:: +# endif +# else +# define BOOST_FPCLASSIFY_PREFIX ::std:: +# endif +# else +# undef BOOST_HAS_FPCLASSIFY +# define BOOST_FPCLASSIFY_PREFIX +# endif +#elif (defined(__HP_aCC) && !defined(__hppa)) +// aCC 6 appears to do "#define fpclassify fpclassify" which messes us up a bit! +# define BOOST_FPCLASSIFY_PREFIX :: +#else +# define BOOST_FPCLASSIFY_PREFIX +#endif + +#ifdef __MINGW32__ +# undef BOOST_HAS_FPCLASSIFY +#endif + +#endif + + +//------------------------------------------------------------------------------ + +namespace boost { +namespace math { +namespace detail { + +//------------------------------------------------------------------------------ + +/* +The following classes are used to tag the different methods that are used +for floating point classification +*/ + +struct native_tag {}; +template +struct generic_tag {}; +struct ieee_tag {}; +struct ieee_copy_all_bits_tag : public ieee_tag {}; +struct ieee_copy_leading_bits_tag : public ieee_tag {}; + +#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +// +// These helper functions are used only when numeric_limits<> +// members are not compile time constants: +// +inline bool is_generic_tag_false(const generic_tag*) +{ + return true; +} +inline bool is_generic_tag_false(const void*) +{ + return false; +} +#endif + +//------------------------------------------------------------------------------ + +/* +Most processors support three different floating point precisions: +single precision (32 bits), double precision (64 bits) +and extended double precision (80 - 128 bits, depending on the processor) + +Note that the C++ type long double can be implemented +both as double precision and extended double precision. +*/ + +struct unknown_precision{}; +struct single_precision {}; +struct double_precision {}; +struct extended_double_precision {}; + +// native_tag version -------------------------------------------------------------- + +template struct fp_traits_native +{ + typedef native_tag method; +}; + +// generic_tag version ------------------------------------------------------------- + +template struct fp_traits_non_native +{ +#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + typedef generic_tag::is_specialized> method; +#else + typedef generic_tag method; +#endif +}; + +// ieee_tag versions --------------------------------------------------------------- + +/* +These specializations of fp_traits_non_native contain information needed +to "parse" the binary representation of a floating point number. + +Typedef members: + + bits -- the target type when copying the leading bytes of a floating + point number. It is a typedef for uint32_t or uint64_t. + + method -- tells us whether all bytes are copied or not. + It is a typedef for ieee_copy_all_bits_tag or ieee_copy_leading_bits_tag. + +Static data members: + + sign, exponent, flag, significand -- bit masks that give the meaning of the + bits in the leading bytes. + +Static function members: + + get_bits(), set_bits() -- provide access to the leading bytes. + +*/ + +// ieee_tag version, float (32 bits) ----------------------------------------------- + +#ifndef BOOST_FPCLASSIFY_VAX_FORMAT + +template<> struct fp_traits_non_native +{ + typedef ieee_copy_all_bits_tag method; + + BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u); + BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7f800000); + BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00000000); + BOOST_STATIC_CONSTANT(uint32_t, significand = 0x007fffff); + + typedef uint32_t bits; + static void get_bits(float x, uint32_t& a) { std::memcpy(&a, &x, 4); } + static void set_bits(float& x, uint32_t a) { std::memcpy(&x, &a, 4); } +}; + +// ieee_tag version, double (64 bits) ---------------------------------------------- + +#if defined(BOOST_NO_INT64_T) || defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) \ + || defined(__BORLANDC__) || defined(__CODEGEAR__) + +template<> struct fp_traits_non_native +{ + typedef ieee_copy_leading_bits_tag method; + + BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u); + BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7ff00000); + BOOST_STATIC_CONSTANT(uint32_t, flag = 0); + BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff); + + typedef uint32_t bits; + + static void get_bits(double x, uint32_t& a) + { + std::memcpy(&a, reinterpret_cast(&x) + offset_, 4); + } + + static void set_bits(double& x, uint32_t a) + { + std::memcpy(reinterpret_cast(&x) + offset_, &a, 4); + } + +private: + +#if defined(BOOST_BIG_ENDIAN) + BOOST_STATIC_CONSTANT(int, offset_ = 0); +#elif defined(BOOST_LITTLE_ENDIAN) + BOOST_STATIC_CONSTANT(int, offset_ = 4); +#else + BOOST_STATIC_ASSERT(false); +#endif +}; + +//.............................................................................. + +#else + +template<> struct fp_traits_non_native +{ + typedef ieee_copy_all_bits_tag method; + + static const uint64_t sign = ((uint64_t)0x80000000u) << 32; + static const uint64_t exponent = ((uint64_t)0x7ff00000) << 32; + static const uint64_t flag = 0; + static const uint64_t significand + = (((uint64_t)0x000fffff) << 32) + ((uint64_t)0xffffffffu); + + typedef uint64_t bits; + static void get_bits(double x, uint64_t& a) { std::memcpy(&a, &x, 8); } + static void set_bits(double& x, uint64_t a) { std::memcpy(&x, &a, 8); } +}; + +#endif + +#endif // #ifndef BOOST_FPCLASSIFY_VAX_FORMAT + +// long double (64 bits) ------------------------------------------------------- + +#if defined(BOOST_NO_INT64_T) || defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)\ + || defined(__BORLANDC__) || defined(__CODEGEAR__) + +template<> struct fp_traits_non_native +{ + typedef ieee_copy_leading_bits_tag method; + + BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u); + BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7ff00000); + BOOST_STATIC_CONSTANT(uint32_t, flag = 0); + BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff); + + typedef uint32_t bits; + + static void get_bits(long double x, uint32_t& a) + { + std::memcpy(&a, reinterpret_cast(&x) + offset_, 4); + } + + static void set_bits(long double& x, uint32_t a) + { + std::memcpy(reinterpret_cast(&x) + offset_, &a, 4); + } + +private: + +#if defined(BOOST_BIG_ENDIAN) + BOOST_STATIC_CONSTANT(int, offset_ = 0); +#elif defined(BOOST_LITTLE_ENDIAN) + BOOST_STATIC_CONSTANT(int, offset_ = 4); +#else + BOOST_STATIC_ASSERT(false); +#endif +}; + +//.............................................................................. + +#else + +template<> struct fp_traits_non_native +{ + typedef ieee_copy_all_bits_tag method; + + static const uint64_t sign = (uint64_t)0x80000000u << 32; + static const uint64_t exponent = (uint64_t)0x7ff00000 << 32; + static const uint64_t flag = 0; + static const uint64_t significand + = ((uint64_t)0x000fffff << 32) + (uint64_t)0xffffffffu; + + typedef uint64_t bits; + static void get_bits(long double x, uint64_t& a) { std::memcpy(&a, &x, 8); } + static void set_bits(long double& x, uint64_t a) { std::memcpy(&x, &a, 8); } +}; + +#endif + + +// long double (>64 bits), x86 and x64 ----------------------------------------- + +#if defined(__i386) || defined(__i386__) || defined(_M_IX86) \ + || defined(__amd64) || defined(__amd64__) || defined(_M_AMD64) \ + || defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) + +// Intel extended double precision format (80 bits) + +template<> +struct fp_traits_non_native +{ + typedef ieee_copy_leading_bits_tag method; + + BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u); + BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7fff0000); + BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00008000); + BOOST_STATIC_CONSTANT(uint32_t, significand = 0x00007fff); + + typedef uint32_t bits; + + static void get_bits(long double x, uint32_t& a) + { + std::memcpy(&a, reinterpret_cast(&x) + 6, 4); + } + + static void set_bits(long double& x, uint32_t a) + { + std::memcpy(reinterpret_cast(&x) + 6, &a, 4); + } +}; + + +// long double (>64 bits), Itanium --------------------------------------------- + +#elif defined(__ia64) || defined(__ia64__) || defined(_M_IA64) + +// The floating point format is unknown at compile time +// No template specialization is provided. +// The generic_tag definition is used. + +// The Itanium supports both +// the Intel extended double precision format (80 bits) and +// the IEEE extended double precision format with 15 exponent bits (128 bits). + +#elif defined(__GNUC__) && (LDBL_MANT_DIG == 106) + +// +// Define nothing here and fall though to generic_tag: +// We have GCC's "double double" in effect, and any attempt +// to handle it via bit-fiddling is pretty much doomed to fail... +// + +// long double (>64 bits), PowerPC --------------------------------------------- + +#elif defined(__powerpc) || defined(__powerpc__) || defined(__POWERPC__) \ + || defined(__ppc) || defined(__ppc__) || defined(__PPC__) + +// PowerPC extended double precision format (128 bits) + +template<> +struct fp_traits_non_native +{ + typedef ieee_copy_leading_bits_tag method; + + BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u); + BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7ff00000); + BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00000000); + BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff); + + typedef uint32_t bits; + + static void get_bits(long double x, uint32_t& a) + { + std::memcpy(&a, reinterpret_cast(&x) + offset_, 4); + } + + static void set_bits(long double& x, uint32_t a) + { + std::memcpy(reinterpret_cast(&x) + offset_, &a, 4); + } + +private: + +#if defined(BOOST_BIG_ENDIAN) + BOOST_STATIC_CONSTANT(int, offset_ = 0); +#elif defined(BOOST_LITTLE_ENDIAN) + BOOST_STATIC_CONSTANT(int, offset_ = 12); +#else + BOOST_STATIC_ASSERT(false); +#endif +}; + + +// long double (>64 bits), Motorola 68K ---------------------------------------- + +#elif defined(__m68k) || defined(__m68k__) \ + || defined(__mc68000) || defined(__mc68000__) \ + +// Motorola extended double precision format (96 bits) + +// It is the same format as the Intel extended double precision format, +// except that 1) it is big-endian, 2) the 3rd and 4th byte are padding, and +// 3) the flag bit is not set for infinity + +template<> +struct fp_traits_non_native +{ + typedef ieee_copy_leading_bits_tag method; + + BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u); + BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7fff0000); + BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00008000); + BOOST_STATIC_CONSTANT(uint32_t, significand = 0x00007fff); + + // copy 1st, 2nd, 5th and 6th byte. 3rd and 4th byte are padding. + + typedef uint32_t bits; + + static void get_bits(long double x, uint32_t& a) + { + std::memcpy(&a, &x, 2); + std::memcpy(reinterpret_cast(&a) + 2, + reinterpret_cast(&x) + 4, 2); + } + + static void set_bits(long double& x, uint32_t a) + { + std::memcpy(&x, &a, 2); + std::memcpy(reinterpret_cast(&x) + 4, + reinterpret_cast(&a) + 2, 2); + } +}; + + +// long double (>64 bits), All other processors -------------------------------- + +#else + +// IEEE extended double precision format with 15 exponent bits (128 bits) + +template<> +struct fp_traits_non_native +{ + typedef ieee_copy_leading_bits_tag method; + + BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u); + BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7fff0000); + BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00000000); + BOOST_STATIC_CONSTANT(uint32_t, significand = 0x0000ffff); + + typedef uint32_t bits; + + static void get_bits(long double x, uint32_t& a) + { + std::memcpy(&a, reinterpret_cast(&x) + offset_, 4); + } + + static void set_bits(long double& x, uint32_t a) + { + std::memcpy(reinterpret_cast(&x) + offset_, &a, 4); + } + +private: + +#if defined(BOOST_BIG_ENDIAN) + BOOST_STATIC_CONSTANT(int, offset_ = 0); +#elif defined(BOOST_LITTLE_ENDIAN) + BOOST_STATIC_CONSTANT(int, offset_ = 12); +#else + BOOST_STATIC_ASSERT(false); +#endif +}; + +#endif + +//------------------------------------------------------------------------------ + +// size_to_precision is a type switch for converting a C++ floating point type +// to the corresponding precision type. + +template struct size_to_precision +{ + typedef unknown_precision type; +}; + +template<> struct size_to_precision<4, true> +{ + typedef single_precision type; +}; + +template<> struct size_to_precision<8, true> +{ + typedef double_precision type; +}; + +template<> struct size_to_precision<10, true> +{ + typedef extended_double_precision type; +}; + +template<> struct size_to_precision<12, true> +{ + typedef extended_double_precision type; +}; + +template<> struct size_to_precision<16, true> +{ + typedef extended_double_precision type; +}; + +//------------------------------------------------------------------------------ +// +// Figure out whether to use native classification functions based on +// whether T is a built in floating point type or not: +// +template +struct select_native +{ + typedef BOOST_DEDUCED_TYPENAME size_to_precision::value>::type precision; + typedef fp_traits_non_native type; +}; +template<> +struct select_native +{ + typedef fp_traits_native type; +}; +template<> +struct select_native +{ + typedef fp_traits_native type; +}; +template<> +struct select_native +{ + typedef fp_traits_native type; +}; + +//------------------------------------------------------------------------------ + +// fp_traits is a type switch that selects the right fp_traits_non_native + +#if (defined(BOOST_MATH_USE_C99) && !(defined(__GNUC__) && (__GNUC__ < 4))) \ + && !defined(__hpux) \ + && !defined(__DECCXX)\ + && !defined(__osf__) \ + && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)\ + && !defined(__FAST_MATH__)\ + && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY)\ + && !defined(BOOST_INTEL)\ + && !defined(sun) +# define BOOST_MATH_USE_STD_FPCLASSIFY +#endif + +template struct fp_traits +{ + typedef BOOST_DEDUCED_TYPENAME size_to_precision::value>::type precision; +#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY) + typedef typename select_native::type type; +#else + typedef fp_traits_non_native type; +#endif + typedef fp_traits_non_native sign_change_type; +}; + +//------------------------------------------------------------------------------ + +} // namespace detail +} // namespace math +} // namespace boost + +#endif diff --git a/ThirdParty/boost-Subset/boost/math/special_functions/detail/round_fwd.hpp b/ThirdParty/boost-Subset/boost/math/special_functions/detail/round_fwd.hpp new file mode 100644 index 0000000000..8c45a7d75a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/math/special_functions/detail/round_fwd.hpp @@ -0,0 +1,93 @@ +// Copyright John Maddock 2008. + +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MATH_SPECIAL_ROUND_FWD_HPP +#define BOOST_MATH_SPECIAL_ROUND_FWD_HPP + +#include +#include + +#ifdef _MSC_VER +#pragma once +#endif + +namespace boost +{ + namespace math + { + + template + typename tools::promote_args::type trunc(const T& v, const Policy& pol); + template + typename tools::promote_args::type trunc(const T& v); + template + int itrunc(const T& v, const Policy& pol); + template + int itrunc(const T& v); + template + long ltrunc(const T& v, const Policy& pol); + template + long ltrunc(const T& v); +#ifdef BOOST_HAS_LONG_LONG + template + boost::long_long_type lltrunc(const T& v, const Policy& pol); + template + boost::long_long_type lltrunc(const T& v); +#endif + template + typename tools::promote_args::type round(const T& v, const Policy& pol); + template + typename tools::promote_args::type round(const T& v); + template + int iround(const T& v, const Policy& pol); + template + int iround(const T& v); + template + long lround(const T& v, const Policy& pol); + template + long lround(const T& v); +#ifdef BOOST_HAS_LONG_LONG + template + boost::long_long_type llround(const T& v, const Policy& pol); + template + boost::long_long_type llround(const T& v); +#endif + template + T modf(const T& v, T* ipart, const Policy& pol); + template + T modf(const T& v, T* ipart); + template + T modf(const T& v, int* ipart, const Policy& pol); + template + T modf(const T& v, int* ipart); + template + T modf(const T& v, long* ipart, const Policy& pol); + template + T modf(const T& v, long* ipart); +#ifdef BOOST_HAS_LONG_LONG + template + T modf(const T& v, boost::long_long_type* ipart, const Policy& pol); + template + T modf(const T& v, boost::long_long_type* ipart); +#endif + + } +} + +#undef BOOST_MATH_STD_USING +#define BOOST_MATH_STD_USING BOOST_MATH_STD_USING_CORE\ + using boost::math::round;\ + using boost::math::iround;\ + using boost::math::lround;\ + using boost::math::trunc;\ + using boost::math::itrunc;\ + using boost::math::ltrunc;\ + using boost::math::modf; + + +#endif // BOOST_MATH_SPECIAL_ROUND_FWD_HPP + diff --git a/ThirdParty/boost-Subset/boost/math/special_functions/fpclassify.hpp b/ThirdParty/boost-Subset/boost/math/special_functions/fpclassify.hpp new file mode 100644 index 0000000000..8e75fae0f2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/math/special_functions/fpclassify.hpp @@ -0,0 +1,606 @@ +// Copyright John Maddock 2005-2008. +// Copyright (c) 2006-2008 Johan Rade +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MATH_FPCLASSIFY_HPP +#define BOOST_MATH_FPCLASSIFY_HPP + +#ifdef _MSC_VER +#pragma once +#endif + +#include +#include +#include +#include +#include +#include +#include +/*! + \file fpclassify.hpp + \brief Classify floating-point value as normal, subnormal, zero, infinite, or NaN. + \version 1.0 + \author John Maddock + */ + +/* + +1. If the platform is C99 compliant, then the native floating point +classification functions are used. However, note that we must only +define the functions which call std::fpclassify etc if that function +really does exist: otherwise a compiler may reject the code even though +the template is never instantiated. + +2. If the platform is not C99 compliant, and the binary format for +a floating point type (float, double or long double) can be determined +at compile time, then the following algorithm is used: + + If all exponent bits, the flag bit (if there is one), + and all significand bits are 0, then the number is zero. + + If all exponent bits and the flag bit (if there is one) are 0, + and at least one significand bit is 1, then the number is subnormal. + + If all exponent bits are 1 and all significand bits are 0, + then the number is infinity. + + If all exponent bits are 1 and at least one significand bit is 1, + then the number is a not-a-number. + + Otherwise the number is normal. + + This algorithm works for the IEEE 754 representation, + and also for several non IEEE 754 formats. + + Most formats have the structure + sign bit + exponent bits + significand bits. + + A few have the structure + sign bit + exponent bits + flag bit + significand bits. + The flag bit is 0 for zero and subnormal numbers, + and 1 for normal numbers and NaN. + It is 0 (Motorola 68K) or 1 (Intel) for infinity. + + To get the bits, the four or eight most significant bytes are copied + into an uint32_t or uint64_t and bit masks are applied. + This covers all the exponent bits and the flag bit (if there is one), + but not always all the significand bits. + Some of the functions below have two implementations, + depending on whether all the significand bits are copied or not. + +3. If the platform is not C99 compliant, and the binary format for +a floating point type (float, double or long double) can not be determined +at compile time, then comparison with std::numeric_limits values +is used. + +*/ + +#if defined(_MSC_VER) || defined(__BORLANDC__) +#include +#endif + +#ifdef BOOST_NO_STDC_NAMESPACE + namespace std{ using ::abs; using ::fabs; } +#endif + +namespace boost{ + +// +// This must not be located in any namespace under boost::math +// otherwise we can get into an infinite loop if isnan is +// a #define for "isnan" ! +// +namespace math_detail{ + +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4800) +#endif + +template +inline bool is_nan_helper(T t, const boost::true_type&) +{ +#ifdef isnan + return isnan(t); +#elif defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY) || !defined(BOOST_HAS_FPCLASSIFY) + (void)t; + return false; +#else // BOOST_HAS_FPCLASSIFY + return (BOOST_FPCLASSIFY_PREFIX fpclassify(t) == (int)FP_NAN); +#endif +} + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +template +inline bool is_nan_helper(T, const boost::false_type&) +{ + return false; +} + +} + +namespace math{ + +namespace detail{ + +#ifdef BOOST_MATH_USE_STD_FPCLASSIFY +template +inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const native_tag&) +{ + return (std::fpclassify)(t); +} +#endif + +template +inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const generic_tag&) +{ + BOOST_MATH_INSTRUMENT_VARIABLE(t); + + // whenever possible check for Nan's first: +#if defined(BOOST_HAS_FPCLASSIFY) && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY) + if(::boost::math_detail::is_nan_helper(t, ::boost::is_floating_point())) + return FP_NAN; +#elif defined(isnan) + if(boost::math_detail::is_nan_helper(t, ::boost::is_floating_point())) + return FP_NAN; +#elif defined(_MSC_VER) || defined(__BORLANDC__) + if(::_isnan(boost::math::tools::real_cast(t))) + return FP_NAN; +#endif + // std::fabs broken on a few systems especially for long long!!!! + T at = (t < T(0)) ? -t : t; + + // Use a process of exclusion to figure out + // what kind of type we have, this relies on + // IEEE conforming reals that will treat + // Nan's as unordered. Some compilers + // don't do this once optimisations are + // turned on, hence the check for nan's above. + if(at <= (std::numeric_limits::max)()) + { + if(at >= (std::numeric_limits::min)()) + return FP_NORMAL; + return (at != 0) ? FP_SUBNORMAL : FP_ZERO; + } + else if(at > (std::numeric_limits::max)()) + return FP_INFINITE; + return FP_NAN; +} + +template +inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const generic_tag&) +{ +#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + if(std::numeric_limits::is_specialized) + return fpclassify_imp(t, generic_tag()); +#endif + // + // An unknown type with no numeric_limits support, + // so what are we supposed to do we do here? + // + BOOST_MATH_INSTRUMENT_VARIABLE(t); + + return t == 0 ? FP_ZERO : FP_NORMAL; +} + +template +int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_all_bits_tag) +{ + typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; + + BOOST_MATH_INSTRUMENT_VARIABLE(x); + + BOOST_DEDUCED_TYPENAME traits::bits a; + traits::get_bits(x,a); + BOOST_MATH_INSTRUMENT_VARIABLE(a); + a &= traits::exponent | traits::flag | traits::significand; + BOOST_MATH_INSTRUMENT_VARIABLE((traits::exponent | traits::flag | traits::significand)); + BOOST_MATH_INSTRUMENT_VARIABLE(a); + + if(a <= traits::significand) { + if(a == 0) + return FP_ZERO; + else + return FP_SUBNORMAL; + } + + if(a < traits::exponent) return FP_NORMAL; + + a &= traits::significand; + if(a == 0) return FP_INFINITE; + + return FP_NAN; +} + +template +int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_leading_bits_tag) +{ + typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; + + BOOST_MATH_INSTRUMENT_VARIABLE(x); + + BOOST_DEDUCED_TYPENAME traits::bits a; + traits::get_bits(x,a); + a &= traits::exponent | traits::flag | traits::significand; + + if(a <= traits::significand) { + if(x == 0) + return FP_ZERO; + else + return FP_SUBNORMAL; + } + + if(a < traits::exponent) return FP_NORMAL; + + a &= traits::significand; + traits::set_bits(x,a); + if(x == 0) return FP_INFINITE; + + return FP_NAN; +} + +#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && (defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) || defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)) +inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(long double t, const native_tag&) +{ + return boost::math::detail::fpclassify_imp(t, generic_tag()); +} +#endif + +} // namespace detail + +template +inline int fpclassify BOOST_NO_MACRO_EXPAND(T t) +{ + typedef typename detail::fp_traits::type traits; + typedef typename traits::method method; + typedef typename tools::promote_args_permissive::type value_type; +#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + if(std::numeric_limits::is_specialized && detail::is_generic_tag_false(static_cast(0))) + return detail::fpclassify_imp(static_cast(t), detail::generic_tag()); + return detail::fpclassify_imp(static_cast(t), method()); +#else + return detail::fpclassify_imp(static_cast(t), method()); +#endif +} + +#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template <> +inline int fpclassify BOOST_NO_MACRO_EXPAND(long double t) +{ + typedef detail::fp_traits::type traits; + typedef traits::method method; + typedef long double value_type; +#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + if(std::numeric_limits::is_specialized && detail::is_generic_tag_false(static_cast(0))) + return detail::fpclassify_imp(static_cast(t), detail::generic_tag()); + return detail::fpclassify_imp(static_cast(t), method()); +#else + return detail::fpclassify_imp(static_cast(t), method()); +#endif +} +#endif + +namespace detail { + +#ifdef BOOST_MATH_USE_STD_FPCLASSIFY + template + inline bool isfinite_impl(T x, native_tag const&) + { + return (std::isfinite)(x); + } +#endif + + template + inline bool isfinite_impl(T x, generic_tag const&) + { + return x >= -(std::numeric_limits::max)() + && x <= (std::numeric_limits::max)(); + } + + template + inline bool isfinite_impl(T x, generic_tag const&) + { +#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + if(std::numeric_limits::is_specialized) + return isfinite_impl(x, generic_tag()); +#endif + (void)x; // warning suppression. + return true; + } + + template + inline bool isfinite_impl(T x, ieee_tag const&) + { + typedef BOOST_DEDUCED_TYPENAME detail::fp_traits::type traits; + BOOST_DEDUCED_TYPENAME traits::bits a; + traits::get_bits(x,a); + a &= traits::exponent; + return a != traits::exponent; + } + +#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) +inline bool isfinite_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&) +{ + return boost::math::detail::isfinite_impl(t, generic_tag()); +} +#endif + +} + +template +inline bool (isfinite)(T x) +{ //!< \brief return true if floating-point type t is finite. + typedef typename detail::fp_traits::type traits; + typedef typename traits::method method; + // typedef typename boost::is_floating_point::type fp_tag; + typedef typename tools::promote_args_permissive::type value_type; + return detail::isfinite_impl(static_cast(x), method()); +} + +#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template<> +inline bool (isfinite)(long double x) +{ //!< \brief return true if floating-point type t is finite. + typedef detail::fp_traits::type traits; + typedef traits::method method; + //typedef boost::is_floating_point::type fp_tag; + typedef long double value_type; + return detail::isfinite_impl(static_cast(x), method()); +} +#endif + +//------------------------------------------------------------------------------ + +namespace detail { + +#ifdef BOOST_MATH_USE_STD_FPCLASSIFY + template + inline bool isnormal_impl(T x, native_tag const&) + { + return (std::isnormal)(x); + } +#endif + + template + inline bool isnormal_impl(T x, generic_tag const&) + { + if(x < 0) x = -x; + return x >= (std::numeric_limits::min)() + && x <= (std::numeric_limits::max)(); + } + + template + inline bool isnormal_impl(T x, generic_tag const&) + { +#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + if(std::numeric_limits::is_specialized) + return isnormal_impl(x, generic_tag()); +#endif + return !(x == 0); + } + + template + inline bool isnormal_impl(T x, ieee_tag const&) + { + typedef BOOST_DEDUCED_TYPENAME detail::fp_traits::type traits; + BOOST_DEDUCED_TYPENAME traits::bits a; + traits::get_bits(x,a); + a &= traits::exponent | traits::flag; + return (a != 0) && (a < traits::exponent); + } + +#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) +inline bool isnormal_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&) +{ + return boost::math::detail::isnormal_impl(t, generic_tag()); +} +#endif + +} + +template +inline bool (isnormal)(T x) +{ + typedef typename detail::fp_traits::type traits; + typedef typename traits::method method; + //typedef typename boost::is_floating_point::type fp_tag; + typedef typename tools::promote_args_permissive::type value_type; + return detail::isnormal_impl(static_cast(x), method()); +} + +#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template<> +inline bool (isnormal)(long double x) +{ + typedef detail::fp_traits::type traits; + typedef traits::method method; + //typedef boost::is_floating_point::type fp_tag; + typedef long double value_type; + return detail::isnormal_impl(static_cast(x), method()); +} +#endif + +//------------------------------------------------------------------------------ + +namespace detail { + +#ifdef BOOST_MATH_USE_STD_FPCLASSIFY + template + inline bool isinf_impl(T x, native_tag const&) + { + return (std::isinf)(x); + } +#endif + + template + inline bool isinf_impl(T x, generic_tag const&) + { + (void)x; // in case the compiler thinks that x is unused because std::numeric_limits::has_infinity is false + return std::numeric_limits::has_infinity + && ( x == std::numeric_limits::infinity() + || x == -std::numeric_limits::infinity()); + } + + template + inline bool isinf_impl(T x, generic_tag const&) + { +#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + if(std::numeric_limits::is_specialized) + return isinf_impl(x, generic_tag()); +#endif + (void)x; // warning suppression. + return false; + } + + template + inline bool isinf_impl(T x, ieee_copy_all_bits_tag const&) + { + typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; + + BOOST_DEDUCED_TYPENAME traits::bits a; + traits::get_bits(x,a); + a &= traits::exponent | traits::significand; + return a == traits::exponent; + } + + template + inline bool isinf_impl(T x, ieee_copy_leading_bits_tag const&) + { + typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; + + BOOST_DEDUCED_TYPENAME traits::bits a; + traits::get_bits(x,a); + a &= traits::exponent | traits::significand; + if(a != traits::exponent) + return false; + + traits::set_bits(x,0); + return x == 0; + } + +#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) +inline bool isinf_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&) +{ + return boost::math::detail::isinf_impl(t, generic_tag()); +} +#endif + +} // namespace detail + +template +inline bool (isinf)(T x) +{ + typedef typename detail::fp_traits::type traits; + typedef typename traits::method method; + // typedef typename boost::is_floating_point::type fp_tag; + typedef typename tools::promote_args_permissive::type value_type; + return detail::isinf_impl(static_cast(x), method()); +} + +#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template<> +inline bool (isinf)(long double x) +{ + typedef detail::fp_traits::type traits; + typedef traits::method method; + //typedef boost::is_floating_point::type fp_tag; + typedef long double value_type; + return detail::isinf_impl(static_cast(x), method()); +} +#endif + +//------------------------------------------------------------------------------ + +namespace detail { + +#ifdef BOOST_MATH_USE_STD_FPCLASSIFY + template + inline bool isnan_impl(T x, native_tag const&) + { + return (std::isnan)(x); + } +#endif + + template + inline bool isnan_impl(T x, generic_tag const&) + { + return std::numeric_limits::has_infinity + ? !(x <= std::numeric_limits::infinity()) + : x != x; + } + + template + inline bool isnan_impl(T x, generic_tag const&) + { +#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + if(std::numeric_limits::is_specialized) + return isnan_impl(x, generic_tag()); +#endif + (void)x; // warning suppression + return false; + } + + template + inline bool isnan_impl(T x, ieee_copy_all_bits_tag const&) + { + typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; + + BOOST_DEDUCED_TYPENAME traits::bits a; + traits::get_bits(x,a); + a &= traits::exponent | traits::significand; + return a > traits::exponent; + } + + template + inline bool isnan_impl(T x, ieee_copy_leading_bits_tag const&) + { + typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; + + BOOST_DEDUCED_TYPENAME traits::bits a; + traits::get_bits(x,a); + + a &= traits::exponent | traits::significand; + if(a < traits::exponent) + return false; + + a &= traits::significand; + traits::set_bits(x,a); + return x != 0; + } + +} // namespace detail + +template +inline bool (isnan)(T x) +{ //!< \brief return true if floating-point type t is NaN (Not A Number). + typedef typename detail::fp_traits::type traits; + typedef typename traits::method method; + // typedef typename boost::is_floating_point::type fp_tag; + return detail::isnan_impl(x, method()); +} + +#ifdef isnan +template <> inline bool isnan BOOST_NO_MACRO_EXPAND(float t){ return ::boost::math_detail::is_nan_helper(t, boost::true_type()); } +template <> inline bool isnan BOOST_NO_MACRO_EXPAND(double t){ return ::boost::math_detail::is_nan_helper(t, boost::true_type()); } +template <> inline bool isnan BOOST_NO_MACRO_EXPAND(long double t){ return ::boost::math_detail::is_nan_helper(t, boost::true_type()); } +#elif defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS) +template<> +inline bool (isnan)(long double x) +{ //!< \brief return true if floating-point type t is NaN (Not A Number). + typedef detail::fp_traits::type traits; + typedef traits::method method; + //typedef boost::is_floating_point::type fp_tag; + return detail::isnan_impl(x, method()); +} +#endif + +} // namespace math +} // namespace boost + +#endif // BOOST_MATH_FPCLASSIFY_HPP + diff --git a/ThirdParty/boost-Subset/boost/math/special_functions/math_fwd.hpp b/ThirdParty/boost-Subset/boost/math/special_functions/math_fwd.hpp new file mode 100644 index 0000000000..96f60726a6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/math/special_functions/math_fwd.hpp @@ -0,0 +1,1573 @@ +// math_fwd.hpp + +// TODO revise completely for new distribution classes. + +// Copyright Paul A. Bristow 2006. +// Copyright John Maddock 2006. + +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) + +// Omnibus list of forward declarations of math special functions. + +// IT = Integer type. +// RT = Real type (built-in floating-point types, float, double, long double) & User Defined Types +// AT = Integer or Real type + +#ifndef BOOST_MATH_SPECIAL_MATH_FWD_HPP +#define BOOST_MATH_SPECIAL_MATH_FWD_HPP + +#ifdef _MSC_VER +#pragma once +#endif + +#include +#include // for argument promotion. +#include +#include +#include +#include + +#define BOOST_NO_MACRO_EXPAND /**/ + +namespace boost +{ + namespace math + { // Math functions (in roughly alphabetic order). + + // Beta functions. + template + typename tools::promote_args::type + beta(RT1 a, RT2 b); // Beta function (2 arguments). + + template + typename tools::promote_args::type + beta(RT1 a, RT2 b, A x); // Beta function (3 arguments). + + template + typename tools::promote_args::type + beta(RT1 a, RT2 b, RT3 x, const Policy& pol); // Beta function (3 arguments). + + template + typename tools::promote_args::type + betac(RT1 a, RT2 b, RT3 x); + + template + typename tools::promote_args::type + betac(RT1 a, RT2 b, RT3 x, const Policy& pol); + + template + typename tools::promote_args::type + ibeta(RT1 a, RT2 b, RT3 x); // Incomplete beta function. + + template + typename tools::promote_args::type + ibeta(RT1 a, RT2 b, RT3 x, const Policy& pol); // Incomplete beta function. + + template + typename tools::promote_args::type + ibetac(RT1 a, RT2 b, RT3 x); // Incomplete beta complement function. + + template + typename tools::promote_args::type + ibetac(RT1 a, RT2 b, RT3 x, const Policy& pol); // Incomplete beta complement function. + + template + typename tools::promote_args::type + ibeta_inv(T1 a, T2 b, T3 p, T4* py); + + template + typename tools::promote_args::type + ibeta_inv(T1 a, T2 b, T3 p, T4* py, const Policy& pol); + + template + typename tools::promote_args::type + ibeta_inv(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function. + + template + typename tools::promote_args::type + ibeta_inv(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function. + + template + typename tools::promote_args::type + ibeta_inva(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function. + + template + typename tools::promote_args::type + ibeta_inva(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function. + + template + typename tools::promote_args::type + ibeta_invb(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function. + + template + typename tools::promote_args::type + ibeta_invb(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function. + + template + typename tools::promote_args::type + ibetac_inv(T1 a, T2 b, T3 q, T4* py); + + template + typename tools::promote_args::type + ibetac_inv(T1 a, T2 b, T3 q, T4* py, const Policy& pol); + + template + typename tools::promote_args::type + ibetac_inv(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function. + + template + typename tools::promote_args::type + ibetac_inv(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function. + + template + typename tools::promote_args::type + ibetac_inva(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function. + + template + typename tools::promote_args::type + ibetac_inva(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function. + + template + typename tools::promote_args::type + ibetac_invb(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function. + + template + typename tools::promote_args::type + ibetac_invb(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function. + + template + typename tools::promote_args::type + ibeta_derivative(RT1 a, RT2 b, RT3 x); // derivative of incomplete beta + + template + typename tools::promote_args::type + ibeta_derivative(RT1 a, RT2 b, RT3 x, const Policy& pol); // derivative of incomplete beta + + // Binomial: + template + T binomial_coefficient(unsigned n, unsigned k, const Policy& pol); + template + T binomial_coefficient(unsigned n, unsigned k); + + // erf & erfc error functions. + template // Error function. + typename tools::promote_args::type erf(RT z); + template // Error function. + typename tools::promote_args::type erf(RT z, const Policy&); + + template // Error function complement. + typename tools::promote_args::type erfc(RT z); + template // Error function complement. + typename tools::promote_args::type erfc(RT z, const Policy&); + + template // Error function inverse. + typename tools::promote_args::type erf_inv(RT z); + template // Error function inverse. + typename tools::promote_args::type erf_inv(RT z, const Policy& pol); + + template // Error function complement inverse. + typename tools::promote_args::type erfc_inv(RT z); + template // Error function complement inverse. + typename tools::promote_args::type erfc_inv(RT z, const Policy& pol); + + // Polynomials: + template + typename tools::promote_args::type + legendre_next(unsigned l, T1 x, T2 Pl, T3 Plm1); + + template + typename tools::promote_args::type + legendre_p(int l, T x); + + template + typename boost::enable_if_c::value, typename tools::promote_args::type>::type + legendre_p(int l, T x, const Policy& pol); + + template + typename tools::promote_args::type + legendre_q(unsigned l, T x); + + template + typename boost::enable_if_c::value, typename tools::promote_args::type>::type + legendre_q(unsigned l, T x, const Policy& pol); + + template + typename tools::promote_args::type + legendre_next(unsigned l, unsigned m, T1 x, T2 Pl, T3 Plm1); + + template + typename tools::promote_args::type + legendre_p(int l, int m, T x); + + template + typename tools::promote_args::type + legendre_p(int l, int m, T x, const Policy& pol); + + template + typename tools::promote_args::type + laguerre_next(unsigned n, T1 x, T2 Ln, T3 Lnm1); + + template + typename tools::promote_args::type + laguerre_next(unsigned n, unsigned l, T1 x, T2 Pl, T3 Plm1); + + template + typename tools::promote_args::type + laguerre(unsigned n, T x); + + template + typename tools::promote_args::type + laguerre(unsigned n, unsigned m, T x, const Policy& pol); + + template + struct laguerre_result + { + typedef typename mpl::if_< + policies::is_policy, + typename tools::promote_args::type, + typename tools::promote_args::type + >::type type; + }; + + template + typename laguerre_result::type + laguerre(unsigned n, T1 m, T2 x); + + template + typename tools::promote_args::type + hermite(unsigned n, T x); + + template + typename tools::promote_args::type + hermite(unsigned n, T x, const Policy& pol); + + template + typename tools::promote_args::type + hermite_next(unsigned n, T1 x, T2 Hn, T3 Hnm1); + + template + std::complex::type> + spherical_harmonic(unsigned n, int m, T1 theta, T2 phi); + + template + std::complex::type> + spherical_harmonic(unsigned n, int m, T1 theta, T2 phi, const Policy& pol); + + template + typename tools::promote_args::type + spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi); + + template + typename tools::promote_args::type + spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi, const Policy& pol); + + template + typename tools::promote_args::type + spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi); + + template + typename tools::promote_args::type + spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol); + + // Elliptic integrals: + template + typename tools::promote_args::type + ellint_rf(T1 x, T2 y, T3 z); + + template + typename tools::promote_args::type + ellint_rf(T1 x, T2 y, T3 z, const Policy& pol); + + template + typename tools::promote_args::type + ellint_rd(T1 x, T2 y, T3 z); + + template + typename tools::promote_args::type + ellint_rd(T1 x, T2 y, T3 z, const Policy& pol); + + template + typename tools::promote_args::type + ellint_rc(T1 x, T2 y); + + template + typename tools::promote_args::type + ellint_rc(T1 x, T2 y, const Policy& pol); + + template + typename tools::promote_args::type + ellint_rj(T1 x, T2 y, T3 z, T4 p); + + template + typename tools::promote_args::type + ellint_rj(T1 x, T2 y, T3 z, T4 p, const Policy& pol); + + template + typename tools::promote_args::type + ellint_rg(T1 x, T2 y, T3 z); + + template + typename tools::promote_args::type + ellint_rg(T1 x, T2 y, T3 z, const Policy& pol); + + template + typename tools::promote_args::type ellint_2(T k); + + template + typename tools::promote_args::type ellint_2(T1 k, T2 phi); + + template + typename tools::promote_args::type ellint_2(T1 k, T2 phi, const Policy& pol); + + template + typename tools::promote_args::type ellint_1(T k); + + template + typename tools::promote_args::type ellint_1(T1 k, T2 phi); + + template + typename tools::promote_args::type ellint_1(T1 k, T2 phi, const Policy& pol); + + template + typename tools::promote_args::type ellint_d(T k); + + template + typename tools::promote_args::type ellint_d(T1 k, T2 phi); + + template + typename tools::promote_args::type ellint_d(T1 k, T2 phi, const Policy& pol); + + template + typename tools::promote_args::type jacobi_zeta(T1 k, T2 phi); + + template + typename tools::promote_args::type jacobi_zeta(T1 k, T2 phi, const Policy& pol); + + template + typename tools::promote_args::type heuman_lambda(T1 k, T2 phi); + + template + typename tools::promote_args::type heuman_lambda(T1 k, T2 phi, const Policy& pol); + + namespace detail{ + + template + struct ellint_3_result + { + typedef typename mpl::if_< + policies::is_policy, + typename tools::promote_args::type, + typename tools::promote_args::type + >::type type; + }; + + } // namespace detail + + + template + typename detail::ellint_3_result::type ellint_3(T1 k, T2 v, T3 phi); + + template + typename tools::promote_args::type ellint_3(T1 k, T2 v, T3 phi, const Policy& pol); + + template + typename tools::promote_args::type ellint_3(T1 k, T2 v); + + // Factorial functions. + // Note: not for integral types, at present. + template + struct max_factorial; + template + RT factorial(unsigned int); + template + RT factorial(unsigned int, const Policy& pol); + template + RT unchecked_factorial(unsigned int BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(RT)); + template + RT double_factorial(unsigned i); + template + RT double_factorial(unsigned i, const Policy& pol); + + template + typename tools::promote_args::type falling_factorial(RT x, unsigned n); + + template + typename tools::promote_args::type falling_factorial(RT x, unsigned n, const Policy& pol); + + template + typename tools::promote_args::type rising_factorial(RT x, int n); + + template + typename tools::promote_args::type rising_factorial(RT x, int n, const Policy& pol); + + // Gamma functions. + template + typename tools::promote_args::type tgamma(RT z); + + template + typename tools::promote_args::type tgamma1pm1(RT z); + + template + typename tools::promote_args::type tgamma1pm1(RT z, const Policy& pol); + + template + typename tools::promote_args::type tgamma(RT1 a, RT2 z); + + template + typename tools::promote_args::type tgamma(RT1 a, RT2 z, const Policy& pol); + + template + typename tools::promote_args::type lgamma(RT z, int* sign); + + template + typename tools::promote_args::type lgamma(RT z, int* sign, const Policy& pol); + + template + typename tools::promote_args::type lgamma(RT x); + + template + typename tools::promote_args::type lgamma(RT x, const Policy& pol); + + template + typename tools::promote_args::type tgamma_lower(RT1 a, RT2 z); + + template + typename tools::promote_args::type tgamma_lower(RT1 a, RT2 z, const Policy&); + + template + typename tools::promote_args::type gamma_q(RT1 a, RT2 z); + + template + typename tools::promote_args::type gamma_q(RT1 a, RT2 z, const Policy&); + + template + typename tools::promote_args::type gamma_p(RT1 a, RT2 z); + + template + typename tools::promote_args::type gamma_p(RT1 a, RT2 z, const Policy&); + + template + typename tools::promote_args::type tgamma_delta_ratio(T1 z, T2 delta); + + template + typename tools::promote_args::type tgamma_delta_ratio(T1 z, T2 delta, const Policy&); + + template + typename tools::promote_args::type tgamma_ratio(T1 a, T2 b); + + template + typename tools::promote_args::type tgamma_ratio(T1 a, T2 b, const Policy&); + + template + typename tools::promote_args::type gamma_p_derivative(T1 a, T2 x); + + template + typename tools::promote_args::type gamma_p_derivative(T1 a, T2 x, const Policy&); + + // gamma inverse. + template + typename tools::promote_args::type gamma_p_inv(T1 a, T2 p); + + template + typename tools::promote_args::type gamma_p_inva(T1 a, T2 p, const Policy&); + + template + typename tools::promote_args::type gamma_p_inva(T1 a, T2 p); + + template + typename tools::promote_args::type gamma_p_inv(T1 a, T2 p, const Policy&); + + template + typename tools::promote_args::type gamma_q_inv(T1 a, T2 q); + + template + typename tools::promote_args::type gamma_q_inv(T1 a, T2 q, const Policy&); + + template + typename tools::promote_args::type gamma_q_inva(T1 a, T2 q); + + template + typename tools::promote_args::type gamma_q_inva(T1 a, T2 q, const Policy&); + + // digamma: + template + typename tools::promote_args::type digamma(T x); + + template + typename tools::promote_args::type digamma(T x, const Policy&); + + // trigamma: + template + typename tools::promote_args::type trigamma(T x); + + template + typename tools::promote_args::type trigamma(T x, const Policy&); + + // polygamma: + template + typename tools::promote_args::type polygamma(int n, T x); + + template + typename tools::promote_args::type polygamma(int n, T x, const Policy&); + + // Hypotenuse function sqrt(x ^ 2 + y ^ 2). + template + typename tools::promote_args::type + hypot(T1 x, T2 y); + + template + typename tools::promote_args::type + hypot(T1 x, T2 y, const Policy&); + + // cbrt - cube root. + template + typename tools::promote_args::type cbrt(RT z); + + template + typename tools::promote_args::type cbrt(RT z, const Policy&); + + // log1p is log(x + 1) + template + typename tools::promote_args::type log1p(T); + + template + typename tools::promote_args::type log1p(T, const Policy&); + + // log1pmx is log(x + 1) - x + template + typename tools::promote_args::type log1pmx(T); + + template + typename tools::promote_args::type log1pmx(T, const Policy&); + + // Exp (x) minus 1 functions. + template + typename tools::promote_args::type expm1(T); + + template + typename tools::promote_args::type expm1(T, const Policy&); + + // Power - 1 + template + typename tools::promote_args::type + powm1(const T1 a, const T2 z); + + template + typename tools::promote_args::type + powm1(const T1 a, const T2 z, const Policy&); + + // sqrt(1+x) - 1 + template + typename tools::promote_args::type sqrt1pm1(const T& val); + + template + typename tools::promote_args::type sqrt1pm1(const T& val, const Policy&); + + // sinus cardinals: + template + typename tools::promote_args::type sinc_pi(T x); + + template + typename tools::promote_args::type sinc_pi(T x, const Policy&); + + template + typename tools::promote_args::type sinhc_pi(T x); + + template + typename tools::promote_args::type sinhc_pi(T x, const Policy&); + + // inverse hyperbolics: + template + typename tools::promote_args::type asinh(T x); + + template + typename tools::promote_args::type asinh(T x, const Policy&); + + template + typename tools::promote_args::type acosh(T x); + + template + typename tools::promote_args::type acosh(T x, const Policy&); + + template + typename tools::promote_args::type atanh(T x); + + template + typename tools::promote_args::type atanh(T x, const Policy&); + + namespace detail{ + + typedef mpl::int_<0> bessel_no_int_tag; // No integer optimisation possible. + typedef mpl::int_<1> bessel_maybe_int_tag; // Maybe integer optimisation. + typedef mpl::int_<2> bessel_int_tag; // Definite integer optimistaion. + + template + struct bessel_traits + { + typedef typename tools::promote_args< + T1, T2 + >::type result_type; + + typedef typename policies::precision::type precision_type; + + typedef typename mpl::if_< + mpl::or_< + mpl::less_equal >, + mpl::greater > >, + bessel_no_int_tag, + typename mpl::if_< + is_integral, + bessel_int_tag, + bessel_maybe_int_tag + >::type + >::type optimisation_tag; + }; + } // detail + + // Bessel functions: + template + typename detail::bessel_traits::result_type cyl_bessel_j(T1 v, T2 x, const Policy& pol); + template + typename detail::bessel_traits::result_type cyl_bessel_j_prime(T1 v, T2 x, const Policy& pol); + + template + typename detail::bessel_traits >::result_type cyl_bessel_j(T1 v, T2 x); + template + typename detail::bessel_traits >::result_type cyl_bessel_j_prime(T1 v, T2 x); + + template + typename detail::bessel_traits::result_type sph_bessel(unsigned v, T x, const Policy& pol); + template + typename detail::bessel_traits::result_type sph_bessel_prime(unsigned v, T x, const Policy& pol); + + template + typename detail::bessel_traits >::result_type sph_bessel(unsigned v, T x); + template + typename detail::bessel_traits >::result_type sph_bessel_prime(unsigned v, T x); + + template + typename detail::bessel_traits::result_type cyl_bessel_i(T1 v, T2 x, const Policy& pol); + template + typename detail::bessel_traits::result_type cyl_bessel_i_prime(T1 v, T2 x, const Policy& pol); + + template + typename detail::bessel_traits >::result_type cyl_bessel_i(T1 v, T2 x); + template + typename detail::bessel_traits >::result_type cyl_bessel_i_prime(T1 v, T2 x); + + template + typename detail::bessel_traits::result_type cyl_bessel_k(T1 v, T2 x, const Policy& pol); + template + typename detail::bessel_traits::result_type cyl_bessel_k_prime(T1 v, T2 x, const Policy& pol); + + template + typename detail::bessel_traits >::result_type cyl_bessel_k(T1 v, T2 x); + template + typename detail::bessel_traits >::result_type cyl_bessel_k_prime(T1 v, T2 x); + + template + typename detail::bessel_traits::result_type cyl_neumann(T1 v, T2 x, const Policy& pol); + template + typename detail::bessel_traits::result_type cyl_neumann_prime(T1 v, T2 x, const Policy& pol); + + template + typename detail::bessel_traits >::result_type cyl_neumann(T1 v, T2 x); + template + typename detail::bessel_traits >::result_type cyl_neumann_prime(T1 v, T2 x); + + template + typename detail::bessel_traits::result_type sph_neumann(unsigned v, T x, const Policy& pol); + template + typename detail::bessel_traits::result_type sph_neumann_prime(unsigned v, T x, const Policy& pol); + + template + typename detail::bessel_traits >::result_type sph_neumann(unsigned v, T x); + template + typename detail::bessel_traits >::result_type sph_neumann_prime(unsigned v, T x); + + template + typename detail::bessel_traits::result_type cyl_bessel_j_zero(T v, int m, const Policy& pol); + + template + typename detail::bessel_traits >::result_type cyl_bessel_j_zero(T v, int m); + + template + OutputIterator cyl_bessel_j_zero(T v, + int start_index, + unsigned number_of_zeros, + OutputIterator out_it); + + template + OutputIterator cyl_bessel_j_zero(T v, + int start_index, + unsigned number_of_zeros, + OutputIterator out_it, + const Policy&); + + template + typename detail::bessel_traits::result_type cyl_neumann_zero(T v, int m, const Policy& pol); + + template + typename detail::bessel_traits >::result_type cyl_neumann_zero(T v, int m); + + template + OutputIterator cyl_neumann_zero(T v, + int start_index, + unsigned number_of_zeros, + OutputIterator out_it); + + template + OutputIterator cyl_neumann_zero(T v, + int start_index, + unsigned number_of_zeros, + OutputIterator out_it, + const Policy&); + + template + std::complex >::result_type> cyl_hankel_1(T1 v, T2 x); + + template + std::complex::result_type> cyl_hankel_1(T1 v, T2 x, const Policy& pol); + + template + std::complex::result_type> cyl_hankel_2(T1 v, T2 x, const Policy& pol); + + template + std::complex >::result_type> cyl_hankel_2(T1 v, T2 x); + + template + std::complex::result_type> sph_hankel_1(T1 v, T2 x, const Policy& pol); + + template + std::complex >::result_type> sph_hankel_1(T1 v, T2 x); + + template + std::complex::result_type> sph_hankel_2(T1 v, T2 x, const Policy& pol); + + template + std::complex >::result_type> sph_hankel_2(T1 v, T2 x); + + template + typename tools::promote_args::type airy_ai(T x, const Policy&); + + template + typename tools::promote_args::type airy_ai(T x); + + template + typename tools::promote_args::type airy_bi(T x, const Policy&); + + template + typename tools::promote_args::type airy_bi(T x); + + template + typename tools::promote_args::type airy_ai_prime(T x, const Policy&); + + template + typename tools::promote_args::type airy_ai_prime(T x); + + template + typename tools::promote_args::type airy_bi_prime(T x, const Policy&); + + template + typename tools::promote_args::type airy_bi_prime(T x); + + template + T airy_ai_zero(int m); + template + T airy_ai_zero(int m, const Policy&); + + template + OutputIterator airy_ai_zero( + int start_index, + unsigned number_of_zeros, + OutputIterator out_it); + template + OutputIterator airy_ai_zero( + int start_index, + unsigned number_of_zeros, + OutputIterator out_it, + const Policy&); + + template + T airy_bi_zero(int m); + template + T airy_bi_zero(int m, const Policy&); + + template + OutputIterator airy_bi_zero( + int start_index, + unsigned number_of_zeros, + OutputIterator out_it); + template + OutputIterator airy_bi_zero( + int start_index, + unsigned number_of_zeros, + OutputIterator out_it, + const Policy&); + + template + typename tools::promote_args::type sin_pi(T x, const Policy&); + + template + typename tools::promote_args::type sin_pi(T x); + + template + typename tools::promote_args::type cos_pi(T x, const Policy&); + + template + typename tools::promote_args::type cos_pi(T x); + + template + int fpclassify BOOST_NO_MACRO_EXPAND(T t); + + template + bool isfinite BOOST_NO_MACRO_EXPAND(T z); + + template + bool isinf BOOST_NO_MACRO_EXPAND(T t); + + template + bool isnan BOOST_NO_MACRO_EXPAND(T t); + + template + bool isnormal BOOST_NO_MACRO_EXPAND(T t); + + template + int signbit BOOST_NO_MACRO_EXPAND(T x); + + template + int sign BOOST_NO_MACRO_EXPAND(const T& z); + + template + typename tools::promote_args_permissive::type copysign BOOST_NO_MACRO_EXPAND(const T& x, const U& y); + + template + typename tools::promote_args_permissive::type changesign BOOST_NO_MACRO_EXPAND(const T& z); + + // Exponential integrals: + namespace detail{ + + template + struct expint_result + { + typedef typename mpl::if_< + policies::is_policy, + typename tools::promote_args::type, + typename tools::promote_args::type + >::type type; + }; + + } // namespace detail + + template + typename tools::promote_args::type expint(unsigned n, T z, const Policy&); + + template + typename detail::expint_result::type expint(T const z, U const u); + + template + typename tools::promote_args::type expint(T z); + + // Zeta: + template + typename tools::promote_args::type zeta(T s, const Policy&); + + // Owen's T function: + template + typename tools::promote_args::type owens_t(T1 h, T2 a, const Policy& pol); + + template + typename tools::promote_args::type owens_t(T1 h, T2 a); + + // Jacobi Functions: + template + typename tools::promote_args::type jacobi_elliptic(T k, U theta, V* pcn, V* pdn, const Policy&); + + template + typename tools::promote_args::type jacobi_elliptic(T k, U theta, V* pcn = 0, V* pdn = 0); + + template + typename tools::promote_args::type jacobi_sn(U k, T theta, const Policy& pol); + + template + typename tools::promote_args::type jacobi_sn(U k, T theta); + + template + typename tools::promote_args::type jacobi_cn(T k, U theta, const Policy& pol); + + template + typename tools::promote_args::type jacobi_cn(T k, U theta); + + template + typename tools::promote_args::type jacobi_dn(T k, U theta, const Policy& pol); + + template + typename tools::promote_args::type jacobi_dn(T k, U theta); + + template + typename tools::promote_args::type jacobi_cd(T k, U theta, const Policy& pol); + + template + typename tools::promote_args::type jacobi_cd(T k, U theta); + + template + typename tools::promote_args::type jacobi_dc(T k, U theta, const Policy& pol); + + template + typename tools::promote_args::type jacobi_dc(T k, U theta); + + template + typename tools::promote_args::type jacobi_ns(T k, U theta, const Policy& pol); + + template + typename tools::promote_args::type jacobi_ns(T k, U theta); + + template + typename tools::promote_args::type jacobi_sd(T k, U theta, const Policy& pol); + + template + typename tools::promote_args::type jacobi_sd(T k, U theta); + + template + typename tools::promote_args::type jacobi_ds(T k, U theta, const Policy& pol); + + template + typename tools::promote_args::type jacobi_ds(T k, U theta); + + template + typename tools::promote_args::type jacobi_nc(T k, U theta, const Policy& pol); + + template + typename tools::promote_args::type jacobi_nc(T k, U theta); + + template + typename tools::promote_args::type jacobi_nd(T k, U theta, const Policy& pol); + + template + typename tools::promote_args::type jacobi_nd(T k, U theta); + + template + typename tools::promote_args::type jacobi_sc(T k, U theta, const Policy& pol); + + template + typename tools::promote_args::type jacobi_sc(T k, U theta); + + template + typename tools::promote_args::type jacobi_cs(T k, U theta, const Policy& pol); + + template + typename tools::promote_args::type jacobi_cs(T k, U theta); + + + template + typename tools::promote_args::type zeta(T s); + + // pow: + template + typename tools::promote_args::type pow(T base, const Policy& policy); + + template + typename tools::promote_args::type pow(T base); + + // next: + template + typename tools::promote_args::type nextafter(const T&, const U&, const Policy&); + template + typename tools::promote_args::type nextafter(const T&, const U&); + template + typename tools::promote_args::type float_next(const T&, const Policy&); + template + typename tools::promote_args::type float_next(const T&); + template + typename tools::promote_args::type float_prior(const T&, const Policy&); + template + typename tools::promote_args::type float_prior(const T&); + template + typename tools::promote_args::type float_distance(const T&, const U&, const Policy&); + template + typename tools::promote_args::type float_distance(const T&, const U&); + template + typename tools::promote_args::type float_advance(T val, int distance, const Policy& pol); + template + typename tools::promote_args::type float_advance(const T& val, int distance); + + template + T unchecked_bernoulli_b2n(const std::size_t n); + template + T bernoulli_b2n(const int i, const Policy &pol); + template + T bernoulli_b2n(const int i); + template + OutputIterator bernoulli_b2n(const int start_index, + const unsigned number_of_bernoullis_b2n, + OutputIterator out_it, + const Policy& pol); + template + OutputIterator bernoulli_b2n(const int start_index, + const unsigned number_of_bernoullis_b2n, + OutputIterator out_it); + template + T tangent_t2n(const int i, const Policy &pol); + template + T tangent_t2n(const int i); + template + OutputIterator tangent_t2n(const int start_index, + const unsigned number_of_bernoullis_b2n, + OutputIterator out_it, + const Policy& pol); + template + OutputIterator tangent_t2n(const int start_index, + const unsigned number_of_bernoullis_b2n, + OutputIterator out_it); + + } // namespace math +} // namespace boost + +#ifdef BOOST_HAS_LONG_LONG +#define BOOST_MATH_DETAIL_LL_FUNC(Policy)\ + \ + template \ + inline T modf(const T& v, boost::long_long_type* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\ + \ + template \ + inline boost::long_long_type lltrunc(const T& v){ using boost::math::lltrunc; return lltrunc(v, Policy()); }\ + \ + template \ + inline boost::long_long_type llround(const T& v){ using boost::math::llround; return llround(v, Policy()); }\ + +#else +#define BOOST_MATH_DETAIL_LL_FUNC(Policy) +#endif + +#define BOOST_MATH_DECLARE_SPECIAL_FUNCTIONS(Policy)\ + \ + BOOST_MATH_DETAIL_LL_FUNC(Policy)\ + \ + template \ + inline typename boost::math::tools::promote_args::type \ + beta(RT1 a, RT2 b) { return ::boost::math::beta(a, b, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type \ + beta(RT1 a, RT2 b, A x){ return ::boost::math::beta(a, b, x, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type \ + betac(RT1 a, RT2 b, RT3 x) { return ::boost::math::betac(a, b, x, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type \ + ibeta(RT1 a, RT2 b, RT3 x){ return ::boost::math::ibeta(a, b, x, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type \ + ibetac(RT1 a, RT2 b, RT3 x){ return ::boost::math::ibetac(a, b, x, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type \ + ibeta_inv(T1 a, T2 b, T3 p, T4* py){ return ::boost::math::ibeta_inv(a, b, p, py, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type \ + ibeta_inv(RT1 a, RT2 b, RT3 p){ return ::boost::math::ibeta_inv(a, b, p, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type \ + ibetac_inv(T1 a, T2 b, T3 q, T4* py){ return ::boost::math::ibetac_inv(a, b, q, py, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type \ + ibeta_inva(RT1 a, RT2 b, RT3 p){ return ::boost::math::ibeta_inva(a, b, p, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type \ + ibetac_inva(T1 a, T2 b, T3 q){ return ::boost::math::ibetac_inva(a, b, q, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type \ + ibeta_invb(RT1 a, RT2 b, RT3 p){ return ::boost::math::ibeta_invb(a, b, p, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type \ + ibetac_invb(T1 a, T2 b, T3 q){ return ::boost::math::ibetac_invb(a, b, q, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type \ + ibetac_inv(RT1 a, RT2 b, RT3 q){ return ::boost::math::ibetac_inv(a, b, q, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type \ + ibeta_derivative(RT1 a, RT2 b, RT3 x){ return ::boost::math::ibeta_derivative(a, b, x, Policy()); }\ +\ + template T binomial_coefficient(unsigned n, unsigned k){ return ::boost::math::binomial_coefficient(n, k, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type erf(RT z) { return ::boost::math::erf(z, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type erfc(RT z){ return ::boost::math::erfc(z, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type erf_inv(RT z) { return ::boost::math::erf_inv(z, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type erfc_inv(RT z){ return ::boost::math::erfc_inv(z, Policy()); }\ +\ + using boost::math::legendre_next;\ +\ + template \ + inline typename boost::math::tools::promote_args::type \ + legendre_p(int l, T x){ return ::boost::math::legendre_p(l, x, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type \ + legendre_q(unsigned l, T x){ return ::boost::math::legendre_q(l, x, Policy()); }\ +\ + using ::boost::math::legendre_next;\ +\ + template \ + inline typename boost::math::tools::promote_args::type \ + legendre_p(int l, int m, T x){ return ::boost::math::legendre_p(l, m, x, Policy()); }\ +\ + using ::boost::math::laguerre_next;\ +\ + template \ + inline typename boost::math::tools::promote_args::type \ + laguerre(unsigned n, T x){ return ::boost::math::laguerre(n, x, Policy()); }\ +\ + template \ + inline typename boost::math::laguerre_result::type \ + laguerre(unsigned n, T1 m, T2 x) { return ::boost::math::laguerre(n, m, x, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type \ + hermite(unsigned n, T x){ return ::boost::math::hermite(n, x, Policy()); }\ +\ + using boost::math::hermite_next;\ +\ + template \ + inline std::complex::type> \ + spherical_harmonic(unsigned n, int m, T1 theta, T2 phi){ return boost::math::spherical_harmonic(n, m, theta, phi, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type \ + spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi){ return ::boost::math::spherical_harmonic_r(n, m, theta, phi, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type \ + spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi){ return boost::math::spherical_harmonic_i(n, m, theta, phi, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type \ + spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);\ +\ + template \ + inline typename boost::math::tools::promote_args::type \ + ellint_rf(T1 x, T2 y, T3 z){ return ::boost::math::ellint_rf(x, y, z, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type \ + ellint_rd(T1 x, T2 y, T3 z){ return ::boost::math::ellint_rd(x, y, z, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type \ + ellint_rc(T1 x, T2 y){ return ::boost::math::ellint_rc(x, y, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type \ + ellint_rj(T1 x, T2 y, T3 z, T4 p){ return boost::math::ellint_rj(x, y, z, p, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type \ + ellint_rg(T1 x, T2 y, T3 z){ return ::boost::math::ellint_rg(x, y, z, Policy()); }\ + \ + template \ + inline typename boost::math::tools::promote_args::type ellint_2(T k){ return boost::math::ellint_2(k, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type ellint_2(T1 k, T2 phi){ return boost::math::ellint_2(k, phi, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type ellint_d(T k){ return boost::math::ellint_d(k, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type ellint_d(T1 k, T2 phi){ return boost::math::ellint_d(k, phi, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type jacobi_zeta(T1 k, T2 phi){ return boost::math::jacobi_zeta(k, phi, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type heuman_lambda(T1 k, T2 phi){ return boost::math::heuman_lambda(k, phi, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type ellint_1(T k){ return boost::math::ellint_1(k, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type ellint_1(T1 k, T2 phi){ return boost::math::ellint_1(k, phi, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type ellint_3(T1 k, T2 v, T3 phi){ return boost::math::ellint_3(k, v, phi, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type ellint_3(T1 k, T2 v){ return boost::math::ellint_3(k, v, Policy()); }\ +\ + using boost::math::max_factorial;\ + template \ + inline RT factorial(unsigned int i) { return boost::math::factorial(i, Policy()); }\ + using boost::math::unchecked_factorial;\ + template \ + inline RT double_factorial(unsigned i){ return boost::math::double_factorial(i, Policy()); }\ + template \ + inline typename boost::math::tools::promote_args::type falling_factorial(RT x, unsigned n){ return boost::math::falling_factorial(x, n, Policy()); }\ + template \ + inline typename boost::math::tools::promote_args::type rising_factorial(RT x, unsigned n){ return boost::math::rising_factorial(x, n, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type tgamma(RT z){ return boost::math::tgamma(z, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type tgamma1pm1(RT z){ return boost::math::tgamma1pm1(z, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type tgamma(RT1 a, RT2 z){ return boost::math::tgamma(a, z, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type lgamma(RT z, int* sign){ return boost::math::lgamma(z, sign, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type lgamma(RT x){ return boost::math::lgamma(x, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type tgamma_lower(RT1 a, RT2 z){ return boost::math::tgamma_lower(a, z, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type gamma_q(RT1 a, RT2 z){ return boost::math::gamma_q(a, z, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type gamma_p(RT1 a, RT2 z){ return boost::math::gamma_p(a, z, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type tgamma_delta_ratio(T1 z, T2 delta){ return boost::math::tgamma_delta_ratio(z, delta, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type tgamma_ratio(T1 a, T2 b) { return boost::math::tgamma_ratio(a, b, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type gamma_p_derivative(T1 a, T2 x){ return boost::math::gamma_p_derivative(a, x, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type gamma_p_inv(T1 a, T2 p){ return boost::math::gamma_p_inv(a, p, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type gamma_p_inva(T1 a, T2 p){ return boost::math::gamma_p_inva(a, p, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type gamma_q_inv(T1 a, T2 q){ return boost::math::gamma_q_inv(a, q, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type gamma_q_inva(T1 a, T2 q){ return boost::math::gamma_q_inva(a, q, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type digamma(T x){ return boost::math::digamma(x, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type trigamma(T x){ return boost::math::trigamma(x, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type polygamma(int n, T x){ return boost::math::polygamma(n, x, Policy()); }\ + \ + template \ + inline typename boost::math::tools::promote_args::type \ + hypot(T1 x, T2 y){ return boost::math::hypot(x, y, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type cbrt(RT z){ return boost::math::cbrt(z, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type log1p(T x){ return boost::math::log1p(x, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type log1pmx(T x){ return boost::math::log1pmx(x, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type expm1(T x){ return boost::math::expm1(x, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type \ + powm1(const T1 a, const T2 z){ return boost::math::powm1(a, z, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type sqrt1pm1(const T& val){ return boost::math::sqrt1pm1(val, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type sinc_pi(T x){ return boost::math::sinc_pi(x, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type sinhc_pi(T x){ return boost::math::sinhc_pi(x, Policy()); }\ +\ + template\ + inline typename boost::math::tools::promote_args::type asinh(const T x){ return boost::math::asinh(x, Policy()); }\ +\ + template\ + inline typename boost::math::tools::promote_args::type acosh(const T x){ return boost::math::acosh(x, Policy()); }\ +\ + template\ + inline typename boost::math::tools::promote_args::type atanh(const T x){ return boost::math::atanh(x, Policy()); }\ +\ + template \ + inline typename boost::math::detail::bessel_traits::result_type cyl_bessel_j(T1 v, T2 x)\ + { return boost::math::cyl_bessel_j(v, x, Policy()); }\ +\ + template \ + inline typename boost::math::detail::bessel_traits::result_type cyl_bessel_j_prime(T1 v, T2 x)\ + { return boost::math::cyl_bessel_j_prime(v, x, Policy()); }\ +\ + template \ + inline typename boost::math::detail::bessel_traits::result_type sph_bessel(unsigned v, T x)\ + { return boost::math::sph_bessel(v, x, Policy()); }\ +\ + template \ + inline typename boost::math::detail::bessel_traits::result_type sph_bessel_prime(unsigned v, T x)\ + { return boost::math::sph_bessel_prime(v, x, Policy()); }\ +\ + template \ + inline typename boost::math::detail::bessel_traits::result_type \ + cyl_bessel_i(T1 v, T2 x) { return boost::math::cyl_bessel_i(v, x, Policy()); }\ +\ + template \ + inline typename boost::math::detail::bessel_traits::result_type \ + cyl_bessel_i_prime(T1 v, T2 x) { return boost::math::cyl_bessel_i_prime(v, x, Policy()); }\ +\ + template \ + inline typename boost::math::detail::bessel_traits::result_type \ + cyl_bessel_k(T1 v, T2 x) { return boost::math::cyl_bessel_k(v, x, Policy()); }\ +\ + template \ + inline typename boost::math::detail::bessel_traits::result_type \ + cyl_bessel_k_prime(T1 v, T2 x) { return boost::math::cyl_bessel_k_prime(v, x, Policy()); }\ +\ + template \ + inline typename boost::math::detail::bessel_traits::result_type \ + cyl_neumann(T1 v, T2 x){ return boost::math::cyl_neumann(v, x, Policy()); }\ +\ + template \ + inline typename boost::math::detail::bessel_traits::result_type \ + cyl_neumann_prime(T1 v, T2 x){ return boost::math::cyl_neumann_prime(v, x, Policy()); }\ +\ + template \ + inline typename boost::math::detail::bessel_traits::result_type \ + sph_neumann(unsigned v, T x){ return boost::math::sph_neumann(v, x, Policy()); }\ +\ + template \ + inline typename boost::math::detail::bessel_traits::result_type \ + sph_neumann_prime(unsigned v, T x){ return boost::math::sph_neumann_prime(v, x, Policy()); }\ +\ + template \ + inline typename boost::math::detail::bessel_traits::result_type cyl_bessel_j_zero(T v, int m)\ + { return boost::math::cyl_bessel_j_zero(v, m, Policy()); }\ +\ +template \ + inline void cyl_bessel_j_zero(T v,\ + int start_index,\ + unsigned number_of_zeros,\ + OutputIterator out_it)\ + { boost::math::cyl_bessel_j_zero(v, start_index, number_of_zeros, out_it, Policy()); }\ +\ + template \ + inline typename boost::math::detail::bessel_traits::result_type cyl_neumann_zero(T v, int m)\ + { return boost::math::cyl_neumann_zero(v, m, Policy()); }\ +\ +template \ + inline void cyl_neumann_zero(T v,\ + int start_index,\ + unsigned number_of_zeros,\ + OutputIterator out_it)\ + { boost::math::cyl_neumann_zero(v, start_index, number_of_zeros, out_it, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type sin_pi(T x){ return boost::math::sin_pi(x); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type cos_pi(T x){ return boost::math::cos_pi(x); }\ +\ + using boost::math::fpclassify;\ + using boost::math::isfinite;\ + using boost::math::isinf;\ + using boost::math::isnan;\ + using boost::math::isnormal;\ + using boost::math::signbit;\ + using boost::math::sign;\ + using boost::math::copysign;\ + using boost::math::changesign;\ + \ + template \ + inline typename boost::math::tools::promote_args::type expint(T const& z, U const& u)\ + { return boost::math::expint(z, u, Policy()); }\ + \ + template \ + inline typename boost::math::tools::promote_args::type expint(T z){ return boost::math::expint(z, Policy()); }\ + \ + template \ + inline typename boost::math::tools::promote_args::type zeta(T s){ return boost::math::zeta(s, Policy()); }\ + \ + template \ + inline T round(const T& v){ using boost::math::round; return round(v, Policy()); }\ + \ + template \ + inline int iround(const T& v){ using boost::math::iround; return iround(v, Policy()); }\ + \ + template \ + inline long lround(const T& v){ using boost::math::lround; return lround(v, Policy()); }\ + \ + template \ + inline T trunc(const T& v){ using boost::math::trunc; return trunc(v, Policy()); }\ + \ + template \ + inline int itrunc(const T& v){ using boost::math::itrunc; return itrunc(v, Policy()); }\ + \ + template \ + inline long ltrunc(const T& v){ using boost::math::ltrunc; return ltrunc(v, Policy()); }\ + \ + template \ + inline T modf(const T& v, T* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\ + \ + template \ + inline T modf(const T& v, int* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\ + \ + template \ + inline T modf(const T& v, long* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\ + \ + template \ + inline typename boost::math::tools::promote_args::type pow(T v){ return boost::math::pow(v, Policy()); }\ + \ + template T nextafter(const T& a, const T& b){ return boost::math::nextafter(a, b, Policy()); }\ + template T float_next(const T& a){ return boost::math::float_next(a, Policy()); }\ + template T float_prior(const T& a){ return boost::math::float_prior(a, Policy()); }\ + template T float_distance(const T& a, const T& b){ return boost::math::float_distance(a, b, Policy()); }\ + \ + template \ + inline typename boost::math::tools::promote_args::type owens_t(RT1 a, RT2 z){ return boost::math::owens_t(a, z, Policy()); }\ + \ + template \ + inline std::complex::result_type> cyl_hankel_1(T1 v, T2 x)\ + { return boost::math::cyl_hankel_1(v, x, Policy()); }\ + \ + template \ + inline std::complex::result_type> cyl_hankel_2(T1 v, T2 x)\ + { return boost::math::cyl_hankel_2(v, x, Policy()); }\ + \ + template \ + inline std::complex::result_type> sph_hankel_1(T1 v, T2 x)\ + { return boost::math::sph_hankel_1(v, x, Policy()); }\ + \ + template \ + inline std::complex::result_type> sph_hankel_2(T1 v, T2 x)\ + { return boost::math::sph_hankel_2(v, x, Policy()); }\ + \ + template \ + inline typename boost::math::tools::promote_args::type jacobi_elliptic(T k, T theta, T* pcn, T* pdn)\ + { return boost::math::jacobi_elliptic(k, theta, pcn, pdn, Policy()); }\ + \ + template \ + inline typename boost::math::tools::promote_args::type jacobi_sn(U k, T theta)\ + { return boost::math::jacobi_sn(k, theta, Policy()); }\ + \ + template \ + inline typename boost::math::tools::promote_args::type jacobi_cn(T k, U theta)\ + { return boost::math::jacobi_cn(k, theta, Policy()); }\ + \ + template \ + inline typename boost::math::tools::promote_args::type jacobi_dn(T k, U theta)\ + { return boost::math::jacobi_dn(k, theta, Policy()); }\ + \ + template \ + inline typename boost::math::tools::promote_args::type jacobi_cd(T k, U theta)\ + { return boost::math::jacobi_cd(k, theta, Policy()); }\ + \ + template \ + inline typename boost::math::tools::promote_args::type jacobi_dc(T k, U theta)\ + { return boost::math::jacobi_dc(k, theta, Policy()); }\ + \ + template \ + inline typename boost::math::tools::promote_args::type jacobi_ns(T k, U theta)\ + { return boost::math::jacobi_ns(k, theta, Policy()); }\ + \ + template \ + inline typename boost::math::tools::promote_args::type jacobi_sd(T k, U theta)\ + { return boost::math::jacobi_sd(k, theta, Policy()); }\ + \ + template \ + inline typename boost::math::tools::promote_args::type jacobi_ds(T k, U theta)\ + { return boost::math::jacobi_ds(k, theta, Policy()); }\ + \ + template \ + inline typename boost::math::tools::promote_args::type jacobi_nc(T k, U theta)\ + { return boost::math::jacobi_nc(k, theta, Policy()); }\ + \ + template \ + inline typename boost::math::tools::promote_args::type jacobi_nd(T k, U theta)\ + { return boost::math::jacobi_nd(k, theta, Policy()); }\ + \ + template \ + inline typename boost::math::tools::promote_args::type jacobi_sc(T k, U theta)\ + { return boost::math::jacobi_sc(k, theta, Policy()); }\ + \ + template \ + inline typename boost::math::tools::promote_args::type jacobi_cs(T k, U theta)\ + { return boost::math::jacobi_cs(k, theta, Policy()); }\ + \ + template \ + inline typename boost::math::tools::promote_args::type airy_ai(T x)\ + { return boost::math::airy_ai(x, Policy()); }\ + \ + template \ + inline typename boost::math::tools::promote_args::type airy_bi(T x)\ + { return boost::math::airy_bi(x, Policy()); }\ + \ + template \ + inline typename boost::math::tools::promote_args::type airy_ai_prime(T x)\ + { return boost::math::airy_ai_prime(x, Policy()); }\ + \ + template \ + inline typename boost::math::tools::promote_args::type airy_bi_prime(T x)\ + { return boost::math::airy_bi_prime(x, Policy()); }\ + \ + template \ + inline T airy_ai_zero(int m)\ + { return boost::math::airy_ai_zero(m, Policy()); }\ + template \ + OutputIterator airy_ai_zero(int start_index, unsigned number_of_zeros, OutputIterator out_it)\ + { return boost::math::airy_ai_zero(start_index, number_of_zeros, out_it, Policy()); }\ + \ + template \ + inline T airy_bi_zero(int m)\ + { return boost::math::airy_bi_zero(m, Policy()); }\ + template \ + OutputIterator airy_bi_zero(int start_index, unsigned number_of_zeros, OutputIterator out_it)\ + { return boost::math::airy_bi_zero(start_index, number_of_zeros, out_it, Policy()); }\ + \ + template \ + T bernoulli_b2n(const int i)\ + { return boost::math::bernoulli_b2n(i, Policy()); }\ + template \ + OutputIterator bernoulli_b2n(int start_index, unsigned number_of_bernoullis_b2n, OutputIterator out_it)\ + { return boost::math::bernoulli_b2n(start_index, number_of_bernoullis_b2n, out_it, Policy()); }\ + \ + template \ + T tangent_t2n(const int i)\ + { return boost::math::tangent_t2n(i, Policy()); }\ + template \ + OutputIterator tangent_t2n(int start_index, unsigned number_of_bernoullis_b2n, OutputIterator out_it)\ + { return boost::math::tangent_t2n(start_index, number_of_bernoullis_b2n, out_it, Policy()); }\ + \ + + + + + +#endif // BOOST_MATH_SPECIAL_MATH_FWD_HPP + + diff --git a/ThirdParty/boost-Subset/boost/math/special_functions/sign.hpp b/ThirdParty/boost-Subset/boost/math/special_functions/sign.hpp new file mode 100644 index 0000000000..3324c90a87 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/math/special_functions/sign.hpp @@ -0,0 +1,194 @@ +// (C) Copyright John Maddock 2006. +// (C) Copyright Johan Rade 2006. +// (C) Copyright Paul A. Bristow 2011 (added changesign). + +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MATH_TOOLS_SIGN_HPP +#define BOOST_MATH_TOOLS_SIGN_HPP + +#ifdef _MSC_VER +#pragma once +#endif + +#include +#include +#include + +namespace boost{ namespace math{ + +namespace detail { + + // signbit + +#ifdef BOOST_MATH_USE_STD_FPCLASSIFY + template + inline int signbit_impl(T x, native_tag const&) + { + return (std::signbit)(x); + } +#endif + + // Generic versions first, note that these do not handle + // signed zero or NaN. + + template + inline int signbit_impl(T x, generic_tag const&) + { + return x < 0; + } + + template + inline int signbit_impl(T x, generic_tag const&) + { + return x < 0; + } + +#if defined(__GNUC__) && (LDBL_MANT_DIG == 106) + // + // Special handling for GCC's "double double" type, + // in this case the sign is the same as the sign we + // get by casting to double, no overflow/underflow + // can occur since the exponents are the same magnitude + // for the two types: + // + inline int signbit_impl(long double x, generic_tag const&) + { + return (boost::math::signbit)(static_cast(x)); + } + inline int signbit_impl(long double x, generic_tag const&) + { + return (boost::math::signbit)(static_cast(x)); + } +#endif + + template + inline int signbit_impl(T x, ieee_copy_all_bits_tag const&) + { + typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; + + BOOST_DEDUCED_TYPENAME traits::bits a; + traits::get_bits(x,a); + return a & traits::sign ? 1 : 0; + } + + template + inline int signbit_impl(T x, ieee_copy_leading_bits_tag const&) + { + typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; + + BOOST_DEDUCED_TYPENAME traits::bits a; + traits::get_bits(x,a); + + return a & traits::sign ? 1 : 0; + } + + // Changesign + + // Generic versions first, note that these do not handle + // signed zero or NaN. + + template + inline T (changesign_impl)(T x, generic_tag const&) + { + return -x; + } + + template + inline T (changesign_impl)(T x, generic_tag const&) + { + return -x; + } +#if defined(__GNUC__) && (LDBL_MANT_DIG == 106) + // + // Special handling for GCC's "double double" type, + // in this case we need to change the sign of both + // components of the "double double": + // + inline long double (changesign_impl)(long double x, generic_tag const&) + { + double* pd = reinterpret_cast(&x); + pd[0] = boost::math::changesign(pd[0]); + pd[1] = boost::math::changesign(pd[1]); + return x; + } + inline long double (changesign_impl)(long double x, generic_tag const&) + { + double* pd = reinterpret_cast(&x); + pd[0] = boost::math::changesign(pd[0]); + pd[1] = boost::math::changesign(pd[1]); + return x; + } +#endif + + template + inline T changesign_impl(T x, ieee_copy_all_bits_tag const&) + { + typedef BOOST_DEDUCED_TYPENAME fp_traits::sign_change_type traits; + + BOOST_DEDUCED_TYPENAME traits::bits a; + traits::get_bits(x,a); + a ^= traits::sign; + traits::set_bits(x,a); + return x; + } + + template + inline T (changesign_impl)(T x, ieee_copy_leading_bits_tag const&) + { + typedef BOOST_DEDUCED_TYPENAME fp_traits::sign_change_type traits; + + BOOST_DEDUCED_TYPENAME traits::bits a; + traits::get_bits(x,a); + a ^= traits::sign; + traits::set_bits(x,a); + return x; + } + + +} // namespace detail + +template int (signbit)(T x) +{ + typedef typename detail::fp_traits::type traits; + typedef typename traits::method method; + // typedef typename boost::is_floating_point::type fp_tag; + typedef typename tools::promote_args_permissive::type result_type; + return detail::signbit_impl(static_cast(x), method()); +} + +template +inline int sign BOOST_NO_MACRO_EXPAND(const T& z) +{ + return (z == 0) ? 0 : (boost::math::signbit)(z) ? -1 : 1; +} + +template typename tools::promote_args_permissive::type (changesign)(const T& x) +{ //!< \brief return unchanged binary pattern of x, except for change of sign bit. + typedef typename detail::fp_traits::sign_change_type traits; + typedef typename traits::method method; + // typedef typename boost::is_floating_point::type fp_tag; + typedef typename tools::promote_args_permissive::type result_type; + + return detail::changesign_impl(static_cast(x), method()); +} + +template +inline typename tools::promote_args_permissive::type + copysign BOOST_NO_MACRO_EXPAND(const T& x, const U& y) +{ + BOOST_MATH_STD_USING + typedef typename tools::promote_args_permissive::type result_type; + return (boost::math::signbit)(static_cast(x)) != (boost::math::signbit)(static_cast(y)) + ? (boost::math::changesign)(static_cast(x)) : static_cast(x); +} + +} // namespace math +} // namespace boost + + +#endif // BOOST_MATH_TOOLS_SIGN_HPP + + diff --git a/ThirdParty/boost-Subset/boost/math/tools/config.hpp b/ThirdParty/boost-Subset/boost/math/tools/config.hpp new file mode 100644 index 0000000000..e88f578db7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/math/tools/config.hpp @@ -0,0 +1,409 @@ +// Copyright (c) 2006-7 John Maddock +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MATH_TOOLS_CONFIG_HPP +#define BOOST_MATH_TOOLS_CONFIG_HPP + +#ifdef _MSC_VER +#pragma once +#endif + +#include +#include // for boost::uintmax_t +#include +#include +#include // for min and max +#include +#include +#include +#if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) +# include +#endif +#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +# include +#endif + +#include + +#if (defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__NetBSD__) \ + || (defined(__hppa) && !defined(__OpenBSD__)) || (defined(__NO_LONG_DOUBLE_MATH) && (DBL_MANT_DIG != LDBL_MANT_DIG))) \ + && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS) +# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +#endif +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) +// +// Borland post 5.8.2 uses Dinkumware's std C lib which +// doesn't have true long double precision. Earlier +// versions are problematic too: +// +# define BOOST_MATH_NO_REAL_CONCEPT_TESTS +# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +# define BOOST_MATH_CONTROL_FP _control87(MCW_EM,MCW_EM) +# include +#endif +#ifdef __IBMCPP__ +// +// For reasons I don't unserstand, the tests with IMB's compiler all +// pass at long double precision, but fail with real_concept, those tests +// are disabled for now. (JM 2012). +# define BOOST_MATH_NO_REAL_CONCEPT_TESTS +#endif +#ifdef sun +// Any use of __float128 in program startup code causes a segfault (tested JM 2015, Solaris 11). +# define BOOST_MATH_DISABLE_FLOAT128 +#endif +#ifdef __HAIKU__ +// +// Not sure what's up with the math detection on Haiku, but linking fails with +// float128 code enabled, and we don't have an implementation of __expl, so +// disabling long double functions for now as well. +# define BOOST_MATH_DISABLE_FLOAT128 +# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +#endif +#if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) && ((LDBL_MANT_DIG == 106) || (__LDBL_MANT_DIG__ == 106)) && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS) +// +// Darwin's rather strange "double double" is rather hard to +// support, it should be possible given enough effort though... +// +# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +#endif +#if defined(unix) && defined(__INTEL_COMPILER) && (__INTEL_COMPILER <= 1000) && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS) +// +// Intel compiler prior to version 10 has sporadic problems +// calling the long double overloads of the std lib math functions: +// calling ::powl is OK, but std::pow(long double, long double) +// may segfault depending upon the value of the arguments passed +// and the specific Linux distribution. +// +// We'll be conservative and disable long double support for this compiler. +// +// Comment out this #define and try building the tests to determine whether +// your Intel compiler version has this issue or not. +// +# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +#endif +#if defined(unix) && defined(__INTEL_COMPILER) +// +// Intel compiler has sporadic issues compiling std::fpclassify depending on +// the exact OS version used. Use our own code for this as we know it works +// well on Intel processors: +// +#define BOOST_MATH_DISABLE_STD_FPCLASSIFY +#endif + +#if defined(BOOST_MSVC) && !defined(_WIN32_WCE) + // Better safe than sorry, our tests don't support hardware exceptions: +# define BOOST_MATH_CONTROL_FP _control87(MCW_EM,MCW_EM) +#endif + +#ifdef __IBMCPP__ +# define BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS +#endif + +#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)) +# define BOOST_MATH_USE_C99 +#endif + +#if (defined(__hpux) && !defined(__hppa)) +# define BOOST_MATH_USE_C99 +#endif + +#if defined(__GNUC__) && defined(_GLIBCXX_USE_C99) +# define BOOST_MATH_USE_C99 +#endif + +#if defined(_LIBCPP_VERSION) && !defined(_MSC_VER) +# define BOOST_MATH_USE_C99 +#endif + +#if defined(__CYGWIN__) || defined(__HP_aCC) || defined(BOOST_INTEL) \ + || defined(BOOST_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) \ + || (defined(__GNUC__) && !defined(BOOST_MATH_USE_C99))\ + || defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS) +# define BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY +#endif + +#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) + +# include "boost/type.hpp" +# include "boost/non_type.hpp" + +# define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t) boost::type* = 0 +# define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t) boost::type* +# define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v) boost::non_type* = 0 +# define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) boost::non_type* + +# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(t) \ + , BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t) +# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) \ + , BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t) +# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) \ + , BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v) +# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) \ + , BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) + +#else + +// no workaround needed: expand to nothing + +# define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t) +# define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t) +# define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v) +# define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) + +# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(t) +# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) +# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) +# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) + + +#endif // __SUNPRO_CC + +#if (defined(__SUNPRO_CC) || defined(__hppa) || defined(__GNUC__)) && !defined(BOOST_MATH_SMALL_CONSTANT) +// Sun's compiler emits a hard error if a constant underflows, +// as does aCC on PA-RISC, while gcc issues a large number of warnings: +# define BOOST_MATH_SMALL_CONSTANT(x) 0.0 +#else +# define BOOST_MATH_SMALL_CONSTANT(x) x +#endif + + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1400) +// +// Define if constants too large for a float cause "bad" +// values to be stored in the data, rather than infinity +// or a suitably large value. +// +# define BOOST_MATH_BUGGY_LARGE_FLOAT_CONSTANTS +#endif +// +// Tune performance options for specific compilers: +// +#ifdef BOOST_MSVC +# define BOOST_MATH_POLY_METHOD 2 +#elif defined(BOOST_INTEL) +# define BOOST_MATH_POLY_METHOD 2 +# define BOOST_MATH_RATIONAL_METHOD 2 +#elif defined(__GNUC__) +# define BOOST_MATH_POLY_METHOD 3 +# define BOOST_MATH_RATIONAL_METHOD 3 +# define BOOST_MATH_INT_TABLE_TYPE(RT, IT) RT +# define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##.0L +#endif + +#if defined(BOOST_NO_LONG_LONG) && !defined(BOOST_MATH_INT_TABLE_TYPE) +# define BOOST_MATH_INT_TABLE_TYPE(RT, IT) RT +# define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##.0L +#endif + +// +// The maximum order of polynomial that will be evaluated +// via an unrolled specialisation: +// +#ifndef BOOST_MATH_MAX_POLY_ORDER +# define BOOST_MATH_MAX_POLY_ORDER 17 +#endif +// +// Set the method used to evaluate polynomials and rationals: +// +#ifndef BOOST_MATH_POLY_METHOD +# define BOOST_MATH_POLY_METHOD 1 +#endif +#ifndef BOOST_MATH_RATIONAL_METHOD +# define BOOST_MATH_RATIONAL_METHOD 0 +#endif +// +// decide whether to store constants as integers or reals: +// +#ifndef BOOST_MATH_INT_TABLE_TYPE +# define BOOST_MATH_INT_TABLE_TYPE(RT, IT) IT +#endif +#ifndef BOOST_MATH_INT_VALUE_SUFFIX +# define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##SUF +#endif +// +// Test whether to support __float128: +// +#if defined(_GLIBCXX_USE_FLOAT128) && defined(BOOST_GCC) && !defined(__STRICT_ANSI__) \ + && !defined(BOOST_MATH_DISABLE_FLOAT128) || defined(BOOST_MATH_USE_FLOAT128) +// +// Only enable this when the compiler really is GCC as clang and probably +// intel too don't support __float128 yet :-( +// +#ifndef BOOST_MATH_USE_FLOAT128 +# define BOOST_MATH_USE_FLOAT128 +#endif + +# if defined(BOOST_INTEL) && defined(BOOST_INTEL_CXX_VERSION) && (BOOST_INTEL_CXX_VERSION >= 1310) && defined(__GNUC__) +# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) +# define BOOST_MATH_FLOAT128_TYPE __float128 +# endif +# elif defined(__GNUC__) +# define BOOST_MATH_FLOAT128_TYPE __float128 +# endif + +# ifndef BOOST_MATH_FLOAT128_TYPE +# define BOOST_MATH_FLOAT128_TYPE _Quad +# endif +#endif +// +// Check for WinCE with no iostream support: +// +#if defined(_WIN32_WCE) && !defined(__SGI_STL_PORT) +# define BOOST_MATH_NO_LEXICAL_CAST +#endif + +// +// Helper macro for controlling the FP behaviour: +// +#ifndef BOOST_MATH_CONTROL_FP +# define BOOST_MATH_CONTROL_FP +#endif +// +// Helper macro for using statements: +// +#define BOOST_MATH_STD_USING_CORE \ + using std::abs;\ + using std::acos;\ + using std::cos;\ + using std::fmod;\ + using std::modf;\ + using std::tan;\ + using std::asin;\ + using std::cosh;\ + using std::frexp;\ + using std::pow;\ + using std::tanh;\ + using std::atan;\ + using std::exp;\ + using std::ldexp;\ + using std::sin;\ + using std::atan2;\ + using std::fabs;\ + using std::log;\ + using std::sinh;\ + using std::ceil;\ + using std::floor;\ + using std::log10;\ + using std::sqrt; + +#define BOOST_MATH_STD_USING BOOST_MATH_STD_USING_CORE + +namespace boost{ namespace math{ +namespace tools +{ + +template +inline T max BOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c) +{ + return (std::max)((std::max)(a, b), c); +} + +template +inline T max BOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c, T d) +{ + return (std::max)((std::max)(a, b), (std::max)(c, d)); +} + +} // namespace tools + +template +void suppress_unused_variable_warning(const T&) +{ +} + +namespace detail{ + +template +struct is_integer_for_rounding +{ + static const bool value = boost::is_integral::value +#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + || (std::numeric_limits::is_specialized && std::numeric_limits::is_integer) +#endif + ; +}; + +} + +}} // namespace boost namespace math + +#ifdef __GLIBC_PREREQ +# if __GLIBC_PREREQ(2,14) +# define BOOST_MATH_HAVE_FIXED_GLIBC +# endif +#endif + +#if ((defined(__linux__) && !defined(__UCLIBC__) && !defined(BOOST_MATH_HAVE_FIXED_GLIBC)) || defined(__QNX__) || defined(__IBMCPP__)) && !defined(BOOST_NO_FENV_H) +// +// This code was introduced in response to this glibc bug: http://sourceware.org/bugzilla/show_bug.cgi?id=2445 +// Basically powl and expl can return garbage when the result is small and certain exception flags are set +// on entrance to these functions. This appears to have been fixed in Glibc 2.14 (May 2011). +// Much more information in this message thread: https://groups.google.com/forum/#!topic/boost-list/ZT99wtIFlb4 +// + + #include + +# ifdef FE_ALL_EXCEPT + +namespace boost{ namespace math{ + namespace detail + { + struct fpu_guard + { + fpu_guard() + { + fegetexceptflag(&m_flags, FE_ALL_EXCEPT); + feclearexcept(FE_ALL_EXCEPT); + } + ~fpu_guard() + { + fesetexceptflag(&m_flags, FE_ALL_EXCEPT); + } + private: + fexcept_t m_flags; + }; + + } // namespace detail + }} // namespaces + +# define BOOST_FPU_EXCEPTION_GUARD boost::math::detail::fpu_guard local_guard_object; +# define BOOST_MATH_INSTRUMENT_FPU do{ fexcept_t cpu_flags; fegetexceptflag(&cpu_flags, FE_ALL_EXCEPT); BOOST_MATH_INSTRUMENT_VARIABLE(cpu_flags); } while(0); + +# else + +# define BOOST_FPU_EXCEPTION_GUARD +# define BOOST_MATH_INSTRUMENT_FPU + +# endif + +#else // All other platforms. +# define BOOST_FPU_EXCEPTION_GUARD +# define BOOST_MATH_INSTRUMENT_FPU +#endif + +#ifdef BOOST_MATH_INSTRUMENT + +# include +# include +# include + +# define BOOST_MATH_INSTRUMENT_CODE(x) \ + std::cout << std::setprecision(35) << __FILE__ << ":" << __LINE__ << " " << x << std::endl; +# define BOOST_MATH_INSTRUMENT_VARIABLE(name) BOOST_MATH_INSTRUMENT_CODE(BOOST_STRINGIZE(name) << " = " << name) + +#else + +# define BOOST_MATH_INSTRUMENT_CODE(x) +# define BOOST_MATH_INSTRUMENT_VARIABLE(name) + +#endif + +#endif // BOOST_MATH_TOOLS_CONFIG_HPP + + + + + diff --git a/ThirdParty/boost-Subset/boost/math/tools/promotion.hpp b/ThirdParty/boost-Subset/boost/math/tools/promotion.hpp new file mode 100644 index 0000000000..b3ad204077 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/math/tools/promotion.hpp @@ -0,0 +1,175 @@ +// boost\math\tools\promotion.hpp + +// Copyright John Maddock 2006. +// Copyright Paul A. Bristow 2006. + +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) + +// Promote arguments functions to allow math functions to have arguments +// provided as integer OR real (floating-point, built-in or UDT) +// (called ArithmeticType in functions that use promotion) +// that help to reduce the risk of creating multiple instantiations. +// Allows creation of an inline wrapper that forwards to a foo(RT, RT) function, +// so you never get to instantiate any mixed foo(RT, IT) functions. + +#ifndef BOOST_MATH_PROMOTION_HPP +#define BOOST_MATH_PROMOTION_HPP + +#ifdef _MSC_VER +#pragma once +#endif + +// Boost type traits: +#include +#include // for boost::is_floating_point; +#include // for boost::is_integral +#include // for boost::is_convertible +#include // for boost::is_same +#include // for boost::remove_cv +// Boost Template meta programming: +#include // for boost::mpl::if_c. +#include // for boost::mpl::if_c. +#include // for boost::mpl::if_c. +#include // for boost::mpl::if_c. + +#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +#include +#endif + +namespace boost +{ + namespace math + { + namespace tools + { + // If either T1 or T2 is an integer type, + // pretend it was a double (for the purposes of further analysis). + // Then pick the wider of the two floating-point types + // as the actual signature to forward to. + // For example: + // foo(int, short) -> double foo(double, double); + // foo(int, float) -> double foo(double, double); + // Note: NOT float foo(float, float) + // foo(int, double) -> foo(double, double); + // foo(double, float) -> double foo(double, double); + // foo(double, float) -> double foo(double, double); + // foo(any-int-or-float-type, long double) -> foo(long double, long double); + // but ONLY float foo(float, float) is unchanged. + // So the only way to get an entirely float version is to call foo(1.F, 2.F), + // But since most (all?) the math functions convert to double internally, + // probably there would not be the hoped-for gain by using float here. + + // This follows the C-compatible conversion rules of pow, etc + // where pow(int, float) is converted to pow(double, double). + + template + struct promote_arg + { // If T is integral type, then promote to double. + typedef typename mpl::if_, double, T>::type type; + }; + // These full specialisations reduce mpl::if_ usage and speed up + // compilation: + template <> struct promote_arg { typedef float type; }; + template <> struct promote_arg{ typedef double type; }; + template <> struct promote_arg { typedef long double type; }; + template <> struct promote_arg { typedef double type; }; + + template + struct promote_args_2 + { // Promote, if necessary, & pick the wider of the two floating-point types. + // for both parameter types, if integral promote to double. + typedef typename promote_arg::type T1P; // T1 perhaps promoted. + typedef typename promote_arg::type T2P; // T2 perhaps promoted. + + typedef typename mpl::if_< + typename mpl::and_, is_floating_point >::type, // both T1P and T2P are floating-point? + typename mpl::if_< typename mpl::or_, is_same >::type, // either long double? + long double, // then result type is long double. + typename mpl::if_< typename mpl::or_, is_same >::type, // either double? + double, // result type is double. + float // else result type is float. + >::type + >::type, + // else one or the other is a user-defined type: + typename mpl::if_< typename mpl::and_ >, ::boost::is_convertible >, T2P, T1P>::type>::type type; + }; // promote_arg2 + // These full specialisations reduce mpl::if_ usage and speed up + // compilation: + template <> struct promote_args_2 { typedef float type; }; + template <> struct promote_args_2{ typedef double type; }; + template <> struct promote_args_2 { typedef long double type; }; + template <> struct promote_args_2 { typedef double type; }; + template <> struct promote_args_2 { typedef double type; }; + template <> struct promote_args_2 { typedef double type; }; + template <> struct promote_args_2 { typedef double type; }; + template <> struct promote_args_2 { typedef double type; }; + template <> struct promote_args_2 { typedef long double type; }; + template <> struct promote_args_2 { typedef long double type; }; + template <> struct promote_args_2 { typedef double type; }; + template <> struct promote_args_2 { typedef double type; }; + template <> struct promote_args_2 { typedef long double type; }; + template <> struct promote_args_2 { typedef long double type; }; + template <> struct promote_args_2 { typedef long double type; }; + template <> struct promote_args_2 { typedef long double type; }; + + template + struct promote_args + { + typedef typename promote_args_2< + typename remove_cv::type, + typename promote_args_2< + typename remove_cv::type, + typename promote_args_2< + typename remove_cv::type, + typename promote_args_2< + typename remove_cv::type, + typename promote_args_2< + typename remove_cv::type, typename remove_cv::type + >::type + >::type + >::type + >::type + >::type type; + +#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + // + // Guard against use of long double if it's not supported: + // + BOOST_STATIC_ASSERT_MSG((0 == ::boost::is_same::value), "Sorry, but this platform does not have sufficient long double support for the special functions to be reliably implemented."); +#endif + }; + + // + // This struct is the same as above, but has no static assert on long double usage, + // it should be used only on functions that can be implemented for long double + // even when std lib support is missing or broken for that type. + // + template + struct promote_args_permissive + { + typedef typename promote_args_2< + typename remove_cv::type, + typename promote_args_2< + typename remove_cv::type, + typename promote_args_2< + typename remove_cv::type, + typename promote_args_2< + typename remove_cv::type, + typename promote_args_2< + typename remove_cv::type, typename remove_cv::type + >::type + >::type + >::type + >::type + >::type type; + }; + + } // namespace tools + } // namespace math +} // namespace boost + +#endif // BOOST_MATH_PROMOTION_HPP + diff --git a/ThirdParty/boost-Subset/boost/math/tools/real_cast.hpp b/ThirdParty/boost-Subset/boost/math/tools/real_cast.hpp new file mode 100644 index 0000000000..9b854e3014 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/math/tools/real_cast.hpp @@ -0,0 +1,29 @@ +// Copyright John Maddock 2006. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MATH_TOOLS_REAL_CAST_HPP +#define BOOST_MATH_TOOLS_REAL_CAST_HPP + +#ifdef _MSC_VER +#pragma once +#endif + +namespace boost{ namespace math +{ + namespace tools + { + template + inline To real_cast(T t) + { + return static_cast(t); + } + } // namespace tools +} // namespace math +} // namespace boost + +#endif // BOOST_MATH_TOOLS_REAL_CAST_HPP + + + diff --git a/ThirdParty/boost-Subset/boost/math/tools/user.hpp b/ThirdParty/boost-Subset/boost/math/tools/user.hpp new file mode 100644 index 0000000000..08a7e53d9e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/math/tools/user.hpp @@ -0,0 +1,105 @@ +// Copyright John Maddock 2007. +// Copyright Paul A. Bristow 2007. + +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MATH_TOOLS_USER_HPP +#define BOOST_MATH_TOOLS_USER_HPP + +#ifdef _MSC_VER +#pragma once +#endif + +// This file can be modified by the user to change the default policies. +// See "Changing the Policy Defaults" in documentation. + +// define this if the platform has no long double functions, +// or if the long double versions have only double precision: +// +// #define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +// +// Performance tuning options: +// +// #define BOOST_MATH_POLY_METHOD 3 +// #define BOOST_MATH_RATIONAL_METHOD 3 +// +// The maximum order of polynomial that will be evaluated +// via an unrolled specialisation: +// +// #define BOOST_MATH_MAX_POLY_ORDER 17 +// +// decide whether to store constants as integers or reals: +// +// #define BOOST_MATH_INT_TABLE_TYPE(RT, IT) IT + +// +// Default policies follow: +// +// Domain errors: +// +// #define BOOST_MATH_DOMAIN_ERROR_POLICY throw_on_error +// +// Pole errors: +// +// #define BOOST_MATH_POLE_ERROR_POLICY throw_on_error +// +// Overflow Errors: +// +// #define BOOST_MATH_OVERFLOW_ERROR_POLICY throw_on_error +// +// Internal Evaluation Errors: +// +// #define BOOST_MATH_EVALUATION_ERROR_POLICY throw_on_error +// +// Underfow: +// +// #define BOOST_MATH_UNDERFLOW_ERROR_POLICY ignore_error +// +// Denorms: +// +// #define BOOST_MATH_DENORM_ERROR_POLICY ignore_error +// +// Max digits to use for internal calculations: +// +// #define BOOST_MATH_DIGITS10_POLICY 0 +// +// Promote floats to doubles internally? +// +// #define BOOST_MATH_PROMOTE_FLOAT_POLICY true +// +// Promote doubles to long double internally: +// +// #define BOOST_MATH_PROMOTE_DOUBLE_POLICY true +// +// What do discrete quantiles return? +// +// #define BOOST_MATH_DISCRETE_QUANTILE_POLICY integer_round_outwards +// +// If a function is mathematically undefined +// (for example the Cauchy distribution has no mean), +// then do we stop the code from compiling? +// +// #define BOOST_MATH_ASSERT_UNDEFINED_POLICY true +// +// Maximum series iterstions permitted: +// +// #define BOOST_MATH_MAX_SERIES_ITERATION_POLICY 1000000 +// +// Maximum root finding steps permitted: +// +// define BOOST_MATH_MAX_ROOT_ITERATION_POLICY 200 +// +// Enable use of __float128 in numeric constants: +// +// #define BOOST_MATH_USE_FLOAT128 +// +// Disable use of __float128 in numeric_constants even if the compiler looks to support it: +// +// #define BOOST_MATH_DISABLE_FLOAT128 + +#endif // BOOST_MATH_TOOLS_USER_HPP + + diff --git a/ThirdParty/boost-Subset/boost/mem_fn.hpp b/ThirdParty/boost-Subset/boost/mem_fn.hpp new file mode 100644 index 0000000000..3bcd2c548b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mem_fn.hpp @@ -0,0 +1,24 @@ +#ifndef BOOST_MEM_FN_HPP_INCLUDED +#define BOOST_MEM_FN_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// mem_fn.hpp - a generalization of std::mem_fun[_ref] +// +// Copyright (c) 2009 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// See http://www.boost.org/libs/bind/mem_fn.html for documentation. +// + +#include + +#endif // #ifndef BOOST_MEM_FN_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/move/core.hpp b/ThirdParty/boost-Subset/boost/move/core.hpp new file mode 100644 index 0000000000..55486e6b45 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/move/core.hpp @@ -0,0 +1,497 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2012-2012. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +//! \file +//! This header implements macros to define movable classes and +//! move-aware functions + +#ifndef BOOST_MOVE_CORE_HPP +#define BOOST_MOVE_CORE_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +#include +#include + +//boost_move_no_copy_constructor_or_assign typedef +//used to detect noncopyable types for other Boost libraries. +#if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) || defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + #define BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE) \ + private:\ + TYPE(TYPE &);\ + TYPE& operator=(TYPE &);\ + public:\ + typedef int boost_move_no_copy_constructor_or_assign; \ + private:\ + // +#else + #define BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE) \ + public:\ + TYPE(TYPE const &) = delete;\ + TYPE& operator=(TYPE const &) = delete;\ + public:\ + typedef int boost_move_no_copy_constructor_or_assign; \ + private:\ + // +#endif //BOOST_NO_CXX11_DELETED_FUNCTIONS + +#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) + + #include + + #if defined(BOOST_MOVE_ADDRESS_SANITIZER_ON) + #define BOOST_MOVE_TO_RV_CAST(RV_TYPE, ARG) reinterpret_cast(ARG) + #else + #define BOOST_MOVE_TO_RV_CAST(RV_TYPE, ARG) static_cast(ARG) + #endif + + //Move emulation rv breaks standard aliasing rules so add workarounds for some compilers + #if defined(__GNUC__) && (__GNUC__ >= 4) && \ + (\ + defined(BOOST_GCC) || \ + (defined(BOOST_INTEL) && (BOOST_INTEL_CXX_VERSION >= 1300)) \ + ) + #define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS __attribute__((__may_alias__)) + #else + #define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS + #endif + + namespace boost { + + ////////////////////////////////////////////////////////////////////////////// + // + // struct rv + // + ////////////////////////////////////////////////////////////////////////////// + template + class rv + : public ::boost::move_detail::if_c + < ::boost::move_detail::is_class::value + , T + , ::boost::move_detail::nat + >::type + { + rv(); + ~rv() throw(); + rv(rv const&); + void operator=(rv const&); + } BOOST_MOVE_ATTRIBUTE_MAY_ALIAS; + + + ////////////////////////////////////////////////////////////////////////////// + // + // is_rv + // + ////////////////////////////////////////////////////////////////////////////// + + namespace move_detail { + + template + struct is_rv + //Derive from integral constant because some Boost code assummes it has + //a "type" internal typedef + : integral_constant::value > + {}; + + template + struct is_not_rv + { + static const bool value = !is_rv::value; + }; + + } //namespace move_detail { + + ////////////////////////////////////////////////////////////////////////////// + // + // has_move_emulation_enabled + // + ////////////////////////////////////////////////////////////////////////////// + template + struct has_move_emulation_enabled + : ::boost::move_detail::has_move_emulation_enabled_impl + {}; + + template + struct has_move_emulation_disabled + { + static const bool value = !::boost::move_detail::has_move_emulation_enabled_impl::value; + }; + + } //namespace boost { + + #define BOOST_RV_REF(TYPE)\ + ::boost::rv< TYPE >& \ + // + + #define BOOST_RV_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2)\ + ::boost::rv< TYPE >& \ + // + + #define BOOST_RV_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\ + ::boost::rv< TYPE >& \ + // + + #define BOOST_RV_REF_BEG\ + ::boost::rv< \ + // + + #define BOOST_RV_REF_END\ + >& \ + // + + #define BOOST_RV_REF_BEG_IF_CXX11 \ + \ + // + + #define BOOST_RV_REF_END_IF_CXX11 \ + \ + // + + #define BOOST_FWD_REF(TYPE)\ + const TYPE & \ + // + + #define BOOST_COPY_ASSIGN_REF(TYPE)\ + const ::boost::rv< TYPE >& \ + // + + #define BOOST_COPY_ASSIGN_REF_BEG \ + const ::boost::rv< \ + // + + #define BOOST_COPY_ASSIGN_REF_END \ + >& \ + // + + #define BOOST_COPY_ASSIGN_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2)\ + const ::boost::rv< TYPE >& \ + // + + #define BOOST_COPY_ASSIGN_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\ + const ::boost::rv< TYPE >& \ + // + + #define BOOST_CATCH_CONST_RLVALUE(TYPE)\ + const ::boost::rv< TYPE >& \ + // + + namespace boost { + namespace move_detail { + + template + inline typename ::boost::move_detail::enable_if_c + < ::boost::move_detail::is_lvalue_reference::value || + !::boost::has_move_emulation_enabled::value + , T&>::type + move_return(T& x) BOOST_NOEXCEPT + { + return x; + } + + template + inline typename ::boost::move_detail::enable_if_c + < !::boost::move_detail::is_lvalue_reference::value && + ::boost::has_move_emulation_enabled::value + , ::boost::rv&>::type + move_return(T& x) BOOST_NOEXCEPT + { + return *BOOST_MOVE_TO_RV_CAST(::boost::rv*, ::boost::move_detail::addressof(x)); + } + + template + inline typename ::boost::move_detail::enable_if_c + < !::boost::move_detail::is_lvalue_reference::value && + ::boost::has_move_emulation_enabled::value + , ::boost::rv&>::type + move_return(::boost::rv& x) BOOST_NOEXCEPT + { + return x; + } + + } //namespace move_detail { + } //namespace boost { + + #define BOOST_MOVE_RET(RET_TYPE, REF)\ + boost::move_detail::move_return< RET_TYPE >(REF) + // + + #define BOOST_MOVE_BASE(BASE_TYPE, ARG) \ + ::boost::move((BASE_TYPE&)(ARG)) + // + + ////////////////////////////////////////////////////////////////////////////// + // + // BOOST_MOVABLE_BUT_NOT_COPYABLE + // + ////////////////////////////////////////////////////////////////////////////// + #define BOOST_MOVABLE_BUT_NOT_COPYABLE(TYPE)\ + BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE)\ + public:\ + operator ::boost::rv&() \ + { return *BOOST_MOVE_TO_RV_CAST(::boost::rv*, this); }\ + operator const ::boost::rv&() const \ + { return *BOOST_MOVE_TO_RV_CAST(const ::boost::rv*, this); }\ + private:\ + // + + ////////////////////////////////////////////////////////////////////////////// + // + // BOOST_COPYABLE_AND_MOVABLE + // + ////////////////////////////////////////////////////////////////////////////// + + #define BOOST_COPYABLE_AND_MOVABLE(TYPE)\ + public:\ + TYPE& operator=(TYPE &t)\ + { this->operator=(const_cast(t)); return *this;}\ + public:\ + operator ::boost::rv&() \ + { return *BOOST_MOVE_TO_RV_CAST(::boost::rv*, this); }\ + operator const ::boost::rv&() const \ + { return *BOOST_MOVE_TO_RV_CAST(const ::boost::rv*, this); }\ + private:\ + // + + #define BOOST_COPYABLE_AND_MOVABLE_ALT(TYPE)\ + public:\ + operator ::boost::rv&() \ + { return *BOOST_MOVE_TO_RV_CAST(::boost::rv*, this); }\ + operator const ::boost::rv&() const \ + { return *BOOST_MOVE_TO_RV_CAST(const ::boost::rv*, this); }\ + private:\ + // + + namespace boost{ + namespace move_detail{ + + template< class T> + struct forward_type + { typedef const T &type; }; + + template< class T> + struct forward_type< boost::rv > + { typedef T type; }; + + }} + +#else //BOOST_NO_CXX11_RVALUE_REFERENCES + + //! This macro marks a type as movable but not copyable, disabling copy construction + //! and assignment. The user will need to write a move constructor/assignment as explained + //! in the documentation to fully write a movable but not copyable class. + #define BOOST_MOVABLE_BUT_NOT_COPYABLE(TYPE)\ + BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE)\ + public:\ + typedef int boost_move_emulation_t;\ + // + + //! This macro marks a type as copyable and movable. + //! The user will need to write a move constructor/assignment and a copy assignment + //! as explained in the documentation to fully write a copyable and movable class. + #define BOOST_COPYABLE_AND_MOVABLE(TYPE)\ + // + + #if !defined(BOOST_MOVE_DOXYGEN_INVOKED) + #define BOOST_COPYABLE_AND_MOVABLE_ALT(TYPE)\ + // + #endif //#if !defined(BOOST_MOVE_DOXYGEN_INVOKED) + + namespace boost { + + //!This trait yields to a compile-time true boolean if T was marked as + //!BOOST_MOVABLE_BUT_NOT_COPYABLE or BOOST_COPYABLE_AND_MOVABLE and + //!rvalue references are not available on the platform. False otherwise. + template + struct has_move_emulation_enabled + { + static const bool value = false; + }; + + template + struct has_move_emulation_disabled + { + static const bool value = true; + }; + + } //namespace boost{ + + //!This macro is used to achieve portable syntax in move + //!constructors and assignments for classes marked as + //!BOOST_COPYABLE_AND_MOVABLE or BOOST_MOVABLE_BUT_NOT_COPYABLE + #define BOOST_RV_REF(TYPE)\ + TYPE && \ + // + + //!This macro is used to achieve portable syntax in move + //!constructors and assignments for template classes marked as + //!BOOST_COPYABLE_AND_MOVABLE or BOOST_MOVABLE_BUT_NOT_COPYABLE. + //!As macros have problems with comma-separated template arguments, + //!the template argument must be preceded with BOOST_RV_REF_BEG + //!and ended with BOOST_RV_REF_END + #define BOOST_RV_REF_BEG\ + \ + // + + //!This macro is used to achieve portable syntax in move + //!constructors and assignments for template classes marked as + //!BOOST_COPYABLE_AND_MOVABLE or BOOST_MOVABLE_BUT_NOT_COPYABLE. + //!As macros have problems with comma-separated template arguments, + //!the template argument must be preceded with BOOST_RV_REF_BEG + //!and ended with BOOST_RV_REF_END + #define BOOST_RV_REF_END\ + && \ + // + + //!This macro expands to BOOST_RV_REF_BEG if BOOST_NO_CXX11_RVALUE_REFERENCES + //!is not defined, empty otherwise + #define BOOST_RV_REF_BEG_IF_CXX11 \ + BOOST_RV_REF_BEG \ + // + + //!This macro expands to BOOST_RV_REF_END if BOOST_NO_CXX11_RVALUE_REFERENCES + //!is not defined, empty otherwise + #define BOOST_RV_REF_END_IF_CXX11 \ + BOOST_RV_REF_END \ + // + + //!This macro is used to achieve portable syntax in copy + //!assignment for classes marked as BOOST_COPYABLE_AND_MOVABLE. + #define BOOST_COPY_ASSIGN_REF(TYPE)\ + const TYPE & \ + // + + //! This macro is used to implement portable perfect forwarding + //! as explained in the documentation. + #define BOOST_FWD_REF(TYPE)\ + TYPE && \ + // + + #if !defined(BOOST_MOVE_DOXYGEN_INVOKED) + + #define BOOST_RV_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2)\ + TYPE && \ + // + + #define BOOST_RV_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\ + TYPE && \ + // + + #define BOOST_COPY_ASSIGN_REF_BEG \ + const \ + // + + #define BOOST_COPY_ASSIGN_REF_END \ + & \ + // + + #define BOOST_COPY_ASSIGN_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2)\ + const TYPE & \ + // + + #define BOOST_COPY_ASSIGN_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\ + const TYPE& \ + // + + #define BOOST_CATCH_CONST_RLVALUE(TYPE)\ + const TYPE & \ + // + + #endif //#if !defined(BOOST_MOVE_DOXYGEN_INVOKED) + + #if !defined(BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG) || defined(BOOST_MOVE_DOXYGEN_INVOKED) + + //!This macro is used to achieve portable move return semantics. + //!The C++11 Standard allows implicit move returns when the object to be returned + //!is designated by a lvalue and: + //! - The criteria for elision of a copy operation are met OR + //! - The criteria would be met save for the fact that the source object is a function parameter + //! + //!For C++11 conforming compilers this macros only yields to REF: + //! return BOOST_MOVE_RET(RET_TYPE, REF); -> return REF; + //! + //!For compilers without rvalue references + //!this macro does an explicit move if the move emulation is activated + //!and the return type (RET_TYPE) is not a reference. + //! + //!For non-conforming compilers with rvalue references like Visual 2010 & 2012, + //!an explicit move is performed if RET_TYPE is not a reference. + //! + //! Caution: When using this macro in non-conforming or C++03 + //!compilers, a move will be performed even if the C++11 standard does not allow it + //!(e.g. returning a static variable). The user is responsible for using this macro + //!only to return local objects that met C++11 criteria. + #define BOOST_MOVE_RET(RET_TYPE, REF)\ + REF + // + + #else //!defined(BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG) || defined(BOOST_MOVE_DOXYGEN_INVOKED) + + #include + + namespace boost { + namespace move_detail { + + template + inline typename ::boost::move_detail::enable_if_c + < ::boost::move_detail::is_lvalue_reference::value + , T&>::type + move_return(T& x) BOOST_NOEXCEPT + { + return x; + } + + template + inline typename ::boost::move_detail::enable_if_c + < !::boost::move_detail::is_lvalue_reference::value + , Ret && >::type + move_return(T&& t) BOOST_NOEXCEPT + { + return static_cast< Ret&& >(t); + } + + } //namespace move_detail { + } //namespace boost { + + #define BOOST_MOVE_RET(RET_TYPE, REF)\ + boost::move_detail::move_return< RET_TYPE >(REF) + // + + #endif //!defined(BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG) || defined(BOOST_MOVE_DOXYGEN_INVOKED) + + //!This macro is used to achieve portable optimal move constructors. + //! + //!When implementing the move constructor, in C++03 compilers the moved-from argument must be + //!cast to the base type before calling `::boost::move()` due to rvalue reference limitations. + //! + //!In C++11 compilers the cast from a rvalue reference of a derived type to a rvalue reference of + //!a base type is implicit. + #define BOOST_MOVE_BASE(BASE_TYPE, ARG) \ + ::boost::move((BASE_TYPE&)(ARG)) + // + + namespace boost { + namespace move_detail { + + template< class T> struct forward_type { typedef T type; }; + + }} + +#endif //BOOST_NO_CXX11_RVALUE_REFERENCES + +#include + +#endif //#ifndef BOOST_MOVE_CORE_HPP diff --git a/ThirdParty/boost-Subset/boost/move/detail/config_begin.hpp b/ThirdParty/boost-Subset/boost/move/detail/config_begin.hpp new file mode 100644 index 0000000000..342390b816 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/move/detail/config_begin.hpp @@ -0,0 +1,19 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2012-2012. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// +#ifndef BOOST_CONFIG_HPP +#include +#endif + +#ifdef BOOST_MSVC +# pragma warning (push) +# pragma warning (disable : 4324) // structure was padded due to __declspec(align()) +# pragma warning (disable : 4675) // "function": resolved overload was found by argument-dependent lookup +# pragma warning (disable : 4996) // "function": was declared deprecated (_CRT_SECURE_NO_DEPRECATE/_SCL_SECURE_NO_WARNINGS) +#endif diff --git a/ThirdParty/boost-Subset/boost/move/detail/config_end.hpp b/ThirdParty/boost-Subset/boost/move/detail/config_end.hpp new file mode 100644 index 0000000000..71a99e93c9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/move/detail/config_end.hpp @@ -0,0 +1,12 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2012-2012. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// +#if defined BOOST_MSVC +# pragma warning (pop) +#endif diff --git a/ThirdParty/boost-Subset/boost/move/detail/meta_utils.hpp b/ThirdParty/boost-Subset/boost/move/detail/meta_utils.hpp new file mode 100644 index 0000000000..a8a61dbd7b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/move/detail/meta_utils.hpp @@ -0,0 +1,559 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2012-2015. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +//! \file + +#ifndef BOOST_MOVE_DETAIL_META_UTILS_HPP +#define BOOST_MOVE_DETAIL_META_UTILS_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif +#include +#include //for std::size_t + +//Small meta-typetraits to support move + +namespace boost { + +//Forward declare boost::rv +template class rv; + +namespace move_detail { + +////////////////////////////////////// +// is_different +////////////////////////////////////// +template +struct is_different +{ + static const bool value = !is_same::value; +}; + +////////////////////////////////////// +// apply +////////////////////////////////////// +template +struct apply +{ + typedef typename F::template apply::type type; +}; + +////////////////////////////////////// +// bool_ +////////////////////////////////////// + +template< bool C_ > +struct bool_ : integral_constant +{ + operator bool() const { return C_; } + bool operator()() const { return C_; } +}; + +typedef bool_ true_; +typedef bool_ false_; + +////////////////////////////////////// +// nat +////////////////////////////////////// +struct nat{}; + +////////////////////////////////////// +// yes_type/no_type +////////////////////////////////////// +typedef char yes_type; + +struct no_type +{ + char _[2]; +}; + +////////////////////////////////////// +// natify +////////////////////////////////////// +template struct natify{}; + +////////////////////////////////////// +// remove_reference +////////////////////////////////////// +template +struct remove_reference +{ + typedef T type; +}; + +template +struct remove_reference +{ + typedef T type; +}; + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + +template +struct remove_reference +{ + typedef T type; +}; + +#else + +template +struct remove_reference< rv > +{ + typedef T type; +}; + +template +struct remove_reference< rv &> +{ + typedef T type; +}; + +template +struct remove_reference< const rv &> +{ + typedef T type; +}; + +#endif + +////////////////////////////////////// +// remove_pointer +////////////////////////////////////// + +template< class T > struct remove_pointer { typedef T type; }; +template< class T > struct remove_pointer { typedef T type; }; +template< class T > struct remove_pointer { typedef T type; }; +template< class T > struct remove_pointer { typedef T type; }; +template< class T > struct remove_pointer { typedef T type; }; + +////////////////////////////////////// +// add_pointer +////////////////////////////////////// +template< class T > +struct add_pointer +{ + typedef typename remove_reference::type* type; +}; + +////////////////////////////////////// +// add_const +////////////////////////////////////// +template +struct add_const +{ + typedef const T type; +}; + +template +struct add_const +{ + typedef const T& type; +}; + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + +template +struct add_const +{ + typedef T&& type; +}; + +#endif + +////////////////////////////////////// +// add_lvalue_reference +////////////////////////////////////// +template +struct add_lvalue_reference +{ typedef T& type; }; + +template struct add_lvalue_reference { typedef T& type; }; +template<> struct add_lvalue_reference { typedef void type; }; +template<> struct add_lvalue_reference { typedef const void type; }; +template<> struct add_lvalue_reference { typedef volatile void type; }; +template<> struct add_lvalue_reference{ typedef const volatile void type; }; + +template +struct add_const_lvalue_reference +{ + typedef typename remove_reference::type t_unreferenced; + typedef typename add_const::type t_unreferenced_const; + typedef typename add_lvalue_reference + ::type type; +}; + +////////////////////////////////////// +// is_lvalue_reference +////////////////////////////////////// +template +struct is_lvalue_reference +{ + static const bool value = false; +}; + +template +struct is_lvalue_reference +{ + static const bool value = true; +}; + + +////////////////////////////////////// +// identity +////////////////////////////////////// +template +struct identity +{ + typedef T type; + typedef typename add_const_lvalue_reference::type reference; + reference operator()(reference t) + { return t; } +}; + +////////////////////////////////////// +// is_class_or_union +////////////////////////////////////// +template +struct is_class_or_union +{ + struct twochar { char dummy[2]; }; + template + static char is_class_or_union_tester(void(U::*)(void)); + template + static twochar is_class_or_union_tester(...); + static const bool value = sizeof(is_class_or_union_tester(0)) == sizeof(char); +}; + +////////////////////////////////////// +// addressof +////////////////////////////////////// +template +struct addr_impl_ref +{ + T & v_; + inline addr_impl_ref( T & v ): v_( v ) {} + inline operator T& () const { return v_; } + + private: + addr_impl_ref & operator=(const addr_impl_ref &); +}; + +template +struct addressof_impl +{ + static inline T * f( T & v, long ) + { + return reinterpret_cast( + &const_cast(reinterpret_cast(v))); + } + + static inline T * f( T * v, int ) + { return v; } +}; + +template +inline T * addressof( T & v ) +{ + return ::boost::move_detail::addressof_impl::f + ( ::boost::move_detail::addr_impl_ref( v ), 0 ); +} + +////////////////////////////////////// +// has_pointer_type +////////////////////////////////////// +template +struct has_pointer_type +{ + struct two { char c[2]; }; + template static two test(...); + template static char test(typename U::pointer* = 0); + static const bool value = sizeof(test(0)) == 1; +}; + +////////////////////////////////////// +// is_convertible +////////////////////////////////////// +#if defined(_MSC_VER) && (_MSC_VER >= 1400) + +//use intrinsic since in MSVC +//overaligned types can't go through ellipsis +template +struct is_convertible +{ + static const bool value = __is_convertible_to(T, U); +}; + +#else + +template +class is_convertible +{ + typedef typename add_lvalue_reference::type t_reference; + typedef char true_t; + class false_t { char dummy[2]; }; + static false_t dispatch(...); + static true_t dispatch(U); + static t_reference trigger(); + public: + static const bool value = sizeof(dispatch(trigger())) == sizeof(true_t); +}; + +#endif + +template< + bool C + , typename F1 + , typename F2 + > +struct eval_if_c + : if_c::type +{}; + +template< + typename C + , typename T1 + , typename T2 + > +struct eval_if + : if_::type +{}; + +template +struct enable_if_convertible + : enable_if< is_convertible, R> +{}; + +template +struct disable_if_convertible + : disable_if< is_convertible, R> +{}; + +////////////////////////////////////////////////////////////////////////////// +// +// and_ +// +////////////////////////////////////////////////////////////////////////////// +template +struct and_impl + : and_impl +{}; + +template<> +struct and_impl +{ + static const bool value = true; +}; + +template +struct and_impl +{ + static const bool value = false; +}; + +template +struct and_ + : and_impl +{}; + +////////////////////////////////////////////////////////////////////////////// +// +// or_ +// +////////////////////////////////////////////////////////////////////////////// +template +struct or_impl + : or_impl +{}; + +template<> +struct or_impl +{ + static const bool value = false; +}; + +template +struct or_impl +{ + static const bool value = true; +}; + +template +struct or_ + : or_impl +{}; + +////////////////////////////////////////////////////////////////////////////// +// +// not_ +// +////////////////////////////////////////////////////////////////////////////// +template +struct not_ +{ + static const bool value = !T::value; +}; + +////////////////////////////////////////////////////////////////////////////// +// +// enable_if_and / disable_if_and / enable_if_or / disable_if_or +// +////////////////////////////////////////////////////////////////////////////// + +template +struct enable_if_and + : enable_if_c< and_::value, R> +{}; + +template +struct disable_if_and + : disable_if_c< and_::value, R> +{}; + +template +struct enable_if_or + : enable_if_c< or_::value, R> +{}; + +template +struct disable_if_or + : disable_if_c< or_::value, R> +{}; + +////////////////////////////////////////////////////////////////////////////// +// +// has_move_emulation_enabled_impl +// +////////////////////////////////////////////////////////////////////////////// +template +struct has_move_emulation_enabled_impl + : is_convertible< T, ::boost::rv& > +{}; + +template +struct has_move_emulation_enabled_impl +{ static const bool value = false; }; + +template +struct has_move_emulation_enabled_impl< ::boost::rv > +{ static const bool value = false; }; + +////////////////////////////////////////////////////////////////////////////// +// +// is_rv_impl +// +////////////////////////////////////////////////////////////////////////////// + +template +struct is_rv_impl +{ static const bool value = false; }; + +template +struct is_rv_impl< rv > +{ static const bool value = true; }; + +template +struct is_rv_impl< const rv > +{ static const bool value = true; }; + +// Code from Jeffrey Lee Hellrung, many thanks + +template< class T > +struct is_rvalue_reference +{ static const bool value = false; }; + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + +template< class T > +struct is_rvalue_reference< T&& > +{ static const bool value = true; }; + +#else // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + +template< class T > +struct is_rvalue_reference< boost::rv& > +{ static const bool value = true; }; + +template< class T > +struct is_rvalue_reference< const boost::rv& > +{ static const bool value = true; }; + +#endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + +template< class T > +struct add_rvalue_reference +{ typedef T&& type; }; + +#else // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + +namespace detail_add_rvalue_reference +{ + template< class T + , bool emulation = has_move_emulation_enabled_impl::value + , bool rv = is_rv_impl::value > + struct add_rvalue_reference_impl { typedef T type; }; + + template< class T, bool emulation> + struct add_rvalue_reference_impl< T, emulation, true > { typedef T & type; }; + + template< class T, bool rv > + struct add_rvalue_reference_impl< T, true, rv > { typedef ::boost::rv& type; }; +} // namespace detail_add_rvalue_reference + +template< class T > +struct add_rvalue_reference + : detail_add_rvalue_reference::add_rvalue_reference_impl +{ }; + +template< class T > +struct add_rvalue_reference +{ typedef T & type; }; + +#endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + +template< class T > struct remove_rvalue_reference { typedef T type; }; + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + template< class T > struct remove_rvalue_reference< T&& > { typedef T type; }; +#else // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + template< class T > struct remove_rvalue_reference< rv > { typedef T type; }; + template< class T > struct remove_rvalue_reference< const rv > { typedef T type; }; + template< class T > struct remove_rvalue_reference< volatile rv > { typedef T type; }; + template< class T > struct remove_rvalue_reference< const volatile rv > { typedef T type; }; + template< class T > struct remove_rvalue_reference< rv& > { typedef T type; }; + template< class T > struct remove_rvalue_reference< const rv& > { typedef T type; }; + template< class T > struct remove_rvalue_reference< volatile rv& > { typedef T type; }; + template< class T > struct remove_rvalue_reference< const volatile rv& >{ typedef T type; }; +#endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + +// Ideas from Boost.Move review, Jeffrey Lee Hellrung: +// +//- TypeTraits metafunctions is_lvalue_reference, add_lvalue_reference, and remove_lvalue_reference ? +// Perhaps add_reference and remove_reference can be modified so that they behave wrt emulated rvalue +// references the same as wrt real rvalue references, i.e., add_reference< rv& > -> T& rather than +// rv& (since T&& & -> T&). +// +//- Add'l TypeTraits has_[trivial_]move_{constructor,assign}...? +// +//- An as_lvalue(T& x) function, which amounts to an identity operation in C++0x, but strips emulated +// rvalue references in C++03. This may be necessary to prevent "accidental moves". + +} //namespace move_detail { +} //namespace boost { + +#endif //#ifndef BOOST_MOVE_DETAIL_META_UTILS_HPP diff --git a/ThirdParty/boost-Subset/boost/move/detail/meta_utils_core.hpp b/ThirdParty/boost-Subset/boost/move/detail/meta_utils_core.hpp new file mode 100644 index 0000000000..4d715a060a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/move/detail/meta_utils_core.hpp @@ -0,0 +1,120 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2015-2015. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +//! \file + +#ifndef BOOST_MOVE_DETAIL_META_UTILS_CORE_HPP +#define BOOST_MOVE_DETAIL_META_UTILS_CORE_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +//Small meta-typetraits to support move + +namespace boost { +namespace move_detail { + +////////////////////////////////////// +// if_c +////////////////////////////////////// +template +struct if_c +{ + typedef T1 type; +}; + +template +struct if_c +{ + typedef T2 type; +}; + +////////////////////////////////////// +// if_ +////////////////////////////////////// +template +struct if_ : if_c<0 != T1::value, T2, T3> +{}; + +////////////////////////////////////// +// enable_if_c +////////////////////////////////////// +template +struct enable_if_c +{ + typedef T type; +}; + +template +struct enable_if_c {}; + +////////////////////////////////////// +// enable_if +////////////////////////////////////// +template +struct enable_if : enable_if_c {}; + +////////////////////////////////////// +// disable_if_c +////////////////////////////////////// +template +struct disable_if_c + : enable_if_c +{}; + +////////////////////////////////////// +// disable_if +////////////////////////////////////// +template +struct disable_if : enable_if_c {}; + +////////////////////////////////////// +// integral_constant +////////////////////////////////////// +template +struct integral_constant +{ + static const T value = v; + typedef T value_type; + typedef integral_constant type; + + operator T() const { return value; } + T operator()() const { return value; } +}; + +typedef integral_constant true_type; +typedef integral_constant false_type; + + +////////////////////////////////////// +// is_same +////////////////////////////////////// +template +struct is_same +{ + static const bool value = false; +}; + +template +struct is_same +{ + static const bool value = true; +}; + +} //namespace move_detail { +} //namespace boost { + +#endif //#ifndef BOOST_MOVE_DETAIL_META_UTILS_CORE_HPP diff --git a/ThirdParty/boost-Subset/boost/move/detail/type_traits.hpp b/ThirdParty/boost-Subset/boost/move/detail/type_traits.hpp new file mode 100644 index 0000000000..ab79fb128b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/move/detail/type_traits.hpp @@ -0,0 +1,1078 @@ +////////////////////////////////////////////////////////////////////////////// +// (C) Copyright John Maddock 2000. +// (C) Copyright Ion Gaztanaga 2005-2015. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/move for documentation. +// +// The alignment and Type traits implementation comes from +// John Maddock's TypeTraits library. +// +// Some other tricks come from Howard Hinnant's papers and StackOverflow replies +////////////////////////////////////////////////////////////////////////////// +#ifndef BOOST_MOVE_DETAIL_TYPE_TRAITS_HPP +#define BOOST_MOVE_DETAIL_TYPE_TRAITS_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +#include +#include + +// move/detail +#include +// other +#include +#include +// std +#include + +//Use of Boost.TypeTraits leads to long preprocessed source code due to +//MPL dependencies. We'll use intrinsics directly and make or own +//simplified version of TypeTraits. +//If someday Boost.TypeTraits dependencies are minimized, we should +//revisit this file redirecting code to Boost.TypeTraits traits. + +//These traits don't care about volatile, reference or other checks +//made by Boost.TypeTraits because no volatile or reference types +//can be hold in Boost.Containers. This helps to avoid any Boost.TypeTraits +//dependency. + +// Helper macros for builtin compiler support. +// If your compiler has builtin support for any of the following +// traits concepts, then redefine the appropriate macros to pick +// up on the compiler support: +// +// (these should largely ignore cv-qualifiers) +// BOOST_MOVE_IS_POD(T) should evaluate to true if T is a POD type +// BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) should evaluate to true if "T x;" has no effect +// BOOST_MOVE_HAS_TRIVIAL_COPY(T) should evaluate to true if T(t) <==> memcpy +// BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) should evaluate to true if T(boost::move(t)) <==> memcpy +// BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy +// BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) should evaluate to true if t = boost::move(u) <==> memcpy +// BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) should evaluate to true if ~T() has no effect +// BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) should evaluate to true if "T x;" can not throw +// BOOST_MOVE_HAS_NOTHROW_COPY(T) should evaluate to true if T(t) can not throw +// BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) should evaluate to true if t = u can not throw +// BOOST_MOVE_IS_ENUM(T) should evaluate to true it t is a union type. +// +// The following can also be defined: when detected our implementation is greatly simplified. +// +// BOOST_ALIGNMENT_OF(T) should evaluate to the alignment requirements of type T. + +#if defined(__MSL_CPP__) && (__MSL_CPP__ >= 0x8000) + // Metrowerks compiler is acquiring intrinsic type traits support + // post version 8. We hook into the published interface to pick up + // user defined specializations as well as compiler intrinsics as + // and when they become available: +# include +# define BOOST_MOVE_IS_UNION(T) BOOST_STD_EXTENSION_NAMESPACE::is_union::value +# define BOOST_MOVE_IS_POD(T) BOOST_STD_EXTENSION_NAMESPACE::is_POD::value +# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_default_ctor::value +# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_copy_ctor::value +# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_assignment::value +# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_dtor::value +#endif + +#if (defined(BOOST_MSVC) && defined(BOOST_MSVC_FULL_VER) && (BOOST_MSVC_FULL_VER >=140050215))\ + || (defined(BOOST_INTEL) && defined(_MSC_VER) && (_MSC_VER >= 1500)) +# define BOOST_MOVE_IS_UNION(T) __is_union(T) +# define BOOST_MOVE_IS_POD(T) (__is_pod(T) && __has_trivial_constructor(T)) +# define BOOST_MOVE_IS_EMPTY(T) __is_empty(T) +# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) +# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T)|| ::boost::move_detail::is_pod::value) +# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) || ::boost::move_detail::is_pod::value) +# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) || ::boost::move_detail::is_pod::value) +# define BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) || ::boost::move_detail::is_trivially_default_constructible::value) +# define BOOST_MOVE_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) || ::boost::move_detail::is_trivially_copy_constructible::value) +# define BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) || ::boost::move_detail::is_trivially_copy_assignable::value) + +# define BOOST_MOVE_IS_ENUM(T) __is_enum(T) +# if defined(_MSC_VER) && (_MSC_VER >= 1700) +# define BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) (__has_trivial_move_constructor(T) || ::boost::move_detail::is_pod::value) +# define BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) (__has_trivial_move_assign(T) || ::boost::move_detail::is_pod::value) +# endif +#endif + +#if defined(BOOST_CLANG) && defined(__has_feature) + +# if __has_feature(is_union) +# define BOOST_MOVE_IS_UNION(T) __is_union(T) +# endif +# if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_pod) +# define BOOST_MOVE_IS_POD(T) __is_pod(T) +# endif +# if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_empty) +# define BOOST_MOVE_IS_EMPTY(T) __is_empty(T) +# endif +# if __has_feature(has_trivial_constructor) +# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) +# endif +# if __has_feature(has_trivial_copy) +# //There are problems with deleted copy constructors detected as trivially copyable. +# //http://stackoverflow.com/questions/12754886/has-trivial-copy-behaves-differently-in-clang-and-gcc-whos-right +# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && ::boost::move_detail::is_copy_constructible::value) +# endif +# if __has_feature(has_trivial_assign) +# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) ) +# endif +# if __has_feature(has_trivial_destructor) +# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T) +# endif +# if __has_feature(has_nothrow_constructor) +# define BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T) +# endif +# if __has_feature(has_nothrow_copy) +# define BOOST_MOVE_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T)) +# endif +# if __has_feature(is_nothrow_copy_assignable) +# define BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T)) +# endif +# if __has_feature(is_enum) +# define BOOST_MOVE_IS_ENUM(T) __is_enum(T) +# endif +# if __has_feature(has_trivial_move_constructor) +# define BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) __has_trivial_move_constructor(T) +# endif +# if __has_feature(has_trivial_move_assign) +# define BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) __has_trivial_move_assign(T) +# endif +# define BOOST_MOVE_ALIGNMENT_OF(T) __alignof(T) +#endif + +#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) && !defined(__GCCXML__))) && !defined(BOOST_CLANG) + +#ifdef BOOST_INTEL +# define BOOST_MOVE_INTEL_TT_OPTS || ::boost::move_detail::is_pod::value +#else +# define BOOST_MOVE_INTEL_TT_OPTS +#endif + +# define BOOST_MOVE_IS_UNION(T) __is_union(T) +# define BOOST_MOVE_IS_POD(T) __is_pod(T) +# define BOOST_MOVE_IS_EMPTY(T) __is_empty(T) +# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) ((__has_trivial_constructor(T) BOOST_MOVE_INTEL_TT_OPTS)) +# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) ((__has_trivial_copy(T) BOOST_MOVE_INTEL_TT_OPTS)) +# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) ((__has_trivial_assign(T) BOOST_MOVE_INTEL_TT_OPTS) ) +# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) BOOST_MOVE_INTEL_TT_OPTS) +# define BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) BOOST_MOVE_INTEL_TT_OPTS) +# define BOOST_MOVE_HAS_NOTHROW_COPY(T) ((__has_nothrow_copy(T) BOOST_MOVE_INTEL_TT_OPTS)) +# define BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) ((__has_nothrow_assign(T) BOOST_MOVE_INTEL_TT_OPTS)) + +# define BOOST_MOVE_IS_ENUM(T) __is_enum(T) +# if (!defined(unix) && !defined(__unix__)) || defined(__LP64__) + // GCC sometimes lies about alignment requirements + // of type double on 32-bit unix platforms, use the + // old implementation instead in that case: +# define BOOST_MOVE_ALIGNMENT_OF(T) __alignof__(T) +# endif +#endif + +#if defined(__ghs__) && (__GHS_VERSION_NUMBER >= 600) + +# define BOOST_MOVE_IS_UNION(T) __is_union(T) +# define BOOST_MOVE_IS_POD(T) __is_pod(T) +# define BOOST_MOVE_IS_EMPTY(T) __is_empty(T) +# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) +# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T)) +# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T)) +# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T) +# define BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T) +# define BOOST_MOVE_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T)) +# define BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T)) + +# define BOOST_MOVE_IS_ENUM(T) __is_enum(T) +# define BOOST_MOVE_ALIGNMENT_OF(T) __alignof__(T) +#endif + +# if defined(__CODEGEARC__) +# define BOOST_MOVE_IS_UNION(T) __is_union(T) +# define BOOST_MOVE_IS_POD(T) __is_pod(T) +# define BOOST_MOVE_IS_EMPTY(T) __is_empty(T) +# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) (__has_trivial_default_constructor(T)) +# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) (__has_trivial_copy_constructor(T)) +# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T)) +# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T)) +# define BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_default_constructor(T)) +# define BOOST_MOVE_HAS_NOTHROW_COPY(T) (__has_nothrow_copy_constructor(T)) +# define BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T)) + +# define BOOST_MOVE_IS_ENUM(T) __is_enum(T) +# define BOOST_MOVE_ALIGNMENT_OF(T) alignof(T) + +#endif + +//Fallback definitions + +#ifdef BOOST_MOVE_IS_UNION + #define BOOST_MOVE_IS_UNION_IMPL(T) BOOST_MOVE_IS_UNION(T) +#else + #define BOOST_MOVE_IS_UNION_IMPL(T) false +#endif + +#ifdef BOOST_MOVE_IS_POD + //in some compilers the intrinsic is limited to class types so add scalar and void + #define BOOST_MOVE_IS_POD_IMPL(T) (::boost::move_detail::is_scalar::value ||\ + ::boost::move_detail::is_void::value ||\ + BOOST_MOVE_IS_POD(T)) +#else + #define BOOST_MOVE_IS_POD_IMPL(T) \ + (::boost::move_detail::is_scalar::value || ::boost::move_detail::is_void::value) +#endif + +#ifdef BOOST_MOVE_IS_EMPTY + #define BOOST_MOVE_IS_EMPTY_IMPL(T) BOOST_MOVE_IS_EMPTY(T) +#else + #define BOOST_MOVE_IS_EMPTY_IMPL(T) ::boost::move_detail::is_empty_nonintrinsic::value +#endif + +#ifdef BOOST_MOVE_HAS_TRIVIAL_COPY + #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_COPY(T) +#else + #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR + #define BOOST_MOVE_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) +#else + #define BOOST_MOVE_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_TRIVIAL_COPY + #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_COPY(T) +#else + #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR + #define BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) +#else + #define BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_TRIVIAL_ASSIGN + #define BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T) BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) +#else + #define BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN + #define BOOST_MOVE_IS_TRIVIALLY_MOVE_ASSIGNABLE(T) BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) +#else + #define BOOST_MOVE_IS_TRIVIALLY_MOVE_ASSIGNABLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR + #define BOOST_MOVE_IS_TRIVIALLY_DESTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) +#else + #define BOOST_MOVE_IS_TRIVIALLY_DESTRUCTIBLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR + #define BOOST_MOVE_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) +#else + #define BOOST_MOVE_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_NOTHROW_COPY + #define BOOST_MOVE_IS_NOTHROW_COPY_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_NOTHROW_COPY(T) +#else + #define BOOST_MOVE_IS_NOTHROW_COPY_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_NOTHROW_MOVE + #define BOOST_MOVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_NOTHROW_MOVE(T) +#else + #define BOOST_MOVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_NOTHROW_ASSIGN + #define BOOST_MOVE_IS_NOTHROW_COPY_ASSIGNABLE(T) BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) +#else + #define BOOST_MOVE_IS_NOTHROW_COPY_ASSIGNABLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_NOTHROW_MOVE_ASSIGN + #define BOOST_MOVE_IS_NOTHROW_MOVE_ASSIGNABLE(T) BOOST_MOVE_HAS_NOTHROW_MOVE_ASSIGN(T) +#else + #define BOOST_MOVE_IS_NOTHROW_MOVE_ASSIGNABLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_IS_ENUM + #define BOOST_MOVE_IS_ENUM_IMPL(T) BOOST_MOVE_IS_ENUM(T) +#else + #define BOOST_MOVE_IS_ENUM_IMPL(T) ::boost::move_detail::is_enum_nonintrinsic::value +#endif + +namespace boost { +namespace move_detail { + +////////////////////////// +// is_reference +////////////////////////// +template +struct is_reference +{ static const bool value = false; }; + +template +struct is_reference +{ static const bool value = true; }; + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +template +struct is_reference +{ static const bool value = true; }; +#endif + +////////////////////////// +// is_pointer +////////////////////////// +template +struct is_pointer +{ static const bool value = false; }; + +template +struct is_pointer +{ static const bool value = true; }; + +////////////////////////// +// is_const +////////////////////////// +template +struct is_const +{ static const bool value = false; }; + +template +struct is_const +{ static const bool value = true; }; + +////////////////////////// +// unvoid_ref +////////////////////////// +template struct unvoid_ref : add_lvalue_reference{}; +template <> struct unvoid_ref { typedef unvoid_ref & type; }; +template <> struct unvoid_ref { typedef unvoid_ref & type; }; +template <> struct unvoid_ref { typedef unvoid_ref & type; }; +template <> struct unvoid_ref { typedef unvoid_ref & type; }; + +template +struct add_reference : add_lvalue_reference +{}; + +////////////////////////// +// add_const_reference +////////////////////////// +template +struct add_const_reference +{ typedef const T &type; }; + +template +struct add_const_reference +{ typedef T& type; }; + +////////////////////////// +// add_const_if_c +////////////////////////// +template +struct add_const_if_c + : if_c::type, T> +{}; + +////////////////////////// +// remove_const +////////////////////////// +template +struct remove_const +{ typedef T type; }; + +template +struct remove_const< const T> +{ typedef T type; }; + +////////////////////////// +// remove_cv +////////////////////////// +template struct remove_cv { typedef T type; }; +template struct remove_cv { typedef T type; }; +template struct remove_cv { typedef T type; }; +template struct remove_cv { typedef T type; }; + +////////////////////////// +// make_unsigned +////////////////////////// +template +struct make_unsigned_impl { typedef T type; }; +template <> struct make_unsigned_impl { typedef unsigned char type; }; +template <> struct make_unsigned_impl { typedef unsigned short type; }; +template <> struct make_unsigned_impl { typedef unsigned int type; }; +template <> struct make_unsigned_impl { typedef unsigned long type; }; +#ifdef BOOST_HAS_LONG_LONG +template <> struct make_unsigned_impl< ::boost::long_long_type > { typedef ::boost::ulong_long_type type; }; +#endif + +template +struct make_unsigned + : make_unsigned_impl::type> +{}; + +////////////////////////// +// is_floating_point +////////////////////////// +template struct is_floating_point_cv { static const bool value = false; }; +template<> struct is_floating_point_cv { static const bool value = true; }; +template<> struct is_floating_point_cv { static const bool value = true; }; +template<> struct is_floating_point_cv { static const bool value = true; }; + +template +struct is_floating_point + : is_floating_point_cv::type> +{}; + +////////////////////////// +// is_integral +////////////////////////// +template struct is_integral_cv { static const bool value = false; }; +template<> struct is_integral_cv< bool>{ static const bool value = true; }; +template<> struct is_integral_cv< char>{ static const bool value = true; }; +template<> struct is_integral_cv< unsigned char>{ static const bool value = true; }; +template<> struct is_integral_cv< signed char>{ static const bool value = true; }; +#ifndef BOOST_NO_CXX11_CHAR16_T +template<> struct is_integral_cv< char16_t>{ static const bool value = true; }; +#endif +#ifndef BOOST_NO_CXX11_CHAR32_T +template<> struct is_integral_cv< char32_t>{ static const bool value = true; }; +#endif +#ifndef BOOST_NO_INTRINSIC_WCHAR_T +template<> struct is_integral_cv< wchar_t>{ static const bool value = true; }; +#endif +template<> struct is_integral_cv< short>{ static const bool value = true; }; +template<> struct is_integral_cv< unsigned short>{ static const bool value = true; }; +template<> struct is_integral_cv< int>{ static const bool value = true; }; +template<> struct is_integral_cv< unsigned int>{ static const bool value = true; }; +template<> struct is_integral_cv< long>{ static const bool value = true; }; +template<> struct is_integral_cv< unsigned long>{ static const bool value = true; }; +#ifdef BOOST_HAS_LONG_LONG +template<> struct is_integral_cv< ::boost:: long_long_type>{ static const bool value = true; }; +template<> struct is_integral_cv< ::boost::ulong_long_type>{ static const bool value = true; }; +#endif + +template +struct is_integral + : public is_integral_cv::type> +{}; + +////////////////////////////////////// +// remove_all_extents +////////////////////////////////////// +template +struct remove_all_extents +{ typedef T type;}; + +template +struct remove_all_extents +{ typedef typename remove_all_extents::type type; }; + +template +struct remove_all_extents +{ typedef typename remove_all_extents::type type;}; + +////////////////////////// +// is_scalar +////////////////////////// +template +struct is_scalar +{ static const bool value = is_integral::value || is_floating_point::value; }; + +////////////////////////// +// is_void +////////////////////////// +template +struct is_void_cv +{ static const bool value = false; }; + +template<> +struct is_void_cv +{ static const bool value = true; }; + +template +struct is_void + : is_void_cv::type> +{}; + +////////////////////////////////////// +// is_array +////////////////////////////////////// +template +struct is_array +{ static const bool value = false; }; + +template +struct is_array +{ static const bool value = true; }; + +template +struct is_array +{ static const bool value = true; }; + +////////////////////////////////////// +// is_member_pointer +////////////////////////////////////// +template struct is_member_pointer_cv { static const bool value = false; }; +template struct is_member_pointer_cv { static const bool value = true; }; + +template +struct is_member_pointer + : is_member_pointer_cv::type> +{}; + +////////////////////////////////////// +// is_nullptr_t +////////////////////////////////////// +template +struct is_nullptr_t_cv +{ static const bool value = false; }; + +#if !defined(BOOST_NO_CXX11_NULLPTR) +template <> +struct is_nullptr_t_cv + #if !defined(BOOST_NO_CXX11_DECLTYPE) + + #else + + #endif +{ static const bool value = true; }; +#endif + +template +struct is_nullptr_t + : is_nullptr_t_cv::type> +{}; + +////////////////////////////////////// +// is_function +////////////////////////////////////// +//Inspired by libc++, thanks to Howard Hinnant +//For a function to pointer an lvalue of function type T can be implicitly converted to a prvalue +//pointer to that function. This does not apply to non-static member functions because lvalues +//that refer to non-static member functions do not exist. +template +struct is_reference_convertible_to_pointer +{ + struct twochar { char dummy[2]; }; + template static char test(U*); + template static twochar test(...); + static T& source(); + static const bool value = sizeof(char) == sizeof(test(source())); +}; +//Filter out: +// - class types that might have implicit conversions +// - void (to avoid forming a reference to void later) +// - references (e.g.: filtering reference to functions) +// - nullptr_t (convertible to pointer) +template < class T + , bool Filter = is_class_or_union::value || + is_void::value || + is_reference::value || + is_nullptr_t::value > +struct is_function_impl +{ static const bool value = is_reference_convertible_to_pointer::value; }; + +template +struct is_function_impl +{ static const bool value = false; }; + +template +struct is_function + : is_function_impl +{}; + +////////////////////////////////////// +// is_union +////////////////////////////////////// +template +struct is_union_noextents_cv +{ static const bool value = BOOST_MOVE_IS_UNION_IMPL(T); }; + +template +struct is_union + : is_union_noextents_cv::type>::type> +{}; + +////////////////////////////////////// +// is_class +////////////////////////////////////// +template +struct is_class +{ + static const bool value = is_class_or_union::value && ! is_union::value; +}; + + +////////////////////////////////////// +// is_arithmetic +////////////////////////////////////// +template +struct is_arithmetic +{ + static const bool value = is_floating_point::value || + is_integral::value; +}; + +////////////////////////////////////// +// is_member_function_pointer +////////////////////////////////////// +template +struct is_member_function_pointer_cv +{ + static const bool value = false; +}; + +template +struct is_member_function_pointer_cv + : is_function +{}; + +template +struct is_member_function_pointer + : is_member_function_pointer_cv::type> +{}; + +////////////////////////////////////// +// is_enum +////////////////////////////////////// +#if !defined(BOOST_MOVE_IS_ENUM) +//Based on (http://howardhinnant.github.io/TypeHiearchy.pdf) +template +struct is_enum_nonintrinsic +{ + static const bool value = !is_arithmetic::value && + !is_reference::value && + !is_class_or_union::value && + !is_array::value && + !is_void::value && + !is_nullptr_t::value && + !is_member_pointer::value && + !is_pointer::value && + !is_function::value; +}; +#endif + +template +struct is_enum +{ static const bool value = BOOST_MOVE_IS_ENUM_IMPL(T); }; + +////////////////////////////////////// +// is_pod +////////////////////////////////////// +template +struct is_pod_noextents_cv //for non-c++11 compilers, a safe fallback +{ static const bool value = BOOST_MOVE_IS_POD_IMPL(T); }; + +template +struct is_pod + : is_pod_noextents_cv::type>::type> +{}; + +////////////////////////////////////// +// is_empty +////////////////////////////////////// +#if !defined(BOOST_MOVE_IS_EMPTY) + +template +struct empty_helper_t1 : public T +{ + empty_helper_t1(); // hh compiler bug workaround + int i[256]; + private: + + empty_helper_t1(const empty_helper_t1&); + empty_helper_t1& operator=(const empty_helper_t1&); +}; + +struct empty_helper_t2 { int i[256]; }; + +template ::value > +struct is_empty_nonintrinsic +{ + static const bool value = false; +}; + +template +struct is_empty_nonintrinsic +{ + static const bool value = sizeof(empty_helper_t1) == sizeof(empty_helper_t2); +}; +#endif + +template +struct is_empty +{ static const bool value = BOOST_MOVE_IS_EMPTY_IMPL(T); }; + + +template +struct has_boost_move_no_copy_constructor_or_assign_type +{ + template + static yes_type test(typename U::boost_move_no_copy_constructor_or_assign*); + + template + static no_type test(...); + + static const bool value = sizeof(test(0)) == sizeof(yes_type); +}; + +////////////////////////////////////// +// is_copy_constructible +////////////////////////////////////// +#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_CXX11_DECLTYPE) \ + && !defined(BOOST_INTEL_CXX_VERSION) && \ + !(defined(BOOST_MSVC) && _MSC_VER == 1800) +#define BOOST_MOVE_TT_CXX11_IS_COPY_CONSTRUCTIBLE +#endif + +template +struct is_copy_constructible +{ + // Intel compiler has problems with SFINAE for copy constructors and deleted functions: + // + // error: function *function_name* cannot be referenced -- it is a deleted function + // static yes_type test(U&, decltype(U(boost::declval()))* = 0); + // ^ + // MSVC 12.0 (Visual 2013) has problems when the copy constructor has been deleted. See: + // https://connect.microsoft.com/VisualStudio/feedback/details/800328/std-is-copy-constructible-is-broken + #if defined(BOOST_MOVE_TT_CXX11_IS_COPY_CONSTRUCTIBLE) + template static typename add_reference::type source(); + static no_type test(...); + #ifdef BOOST_NO_CXX11_DECLTYPE + template + static yes_type test(U&, bool_()))>* = 0); + #else + template + static yes_type test(U&, decltype(U(source()))* = 0); + #endif + static const bool value = sizeof(test(source())) == sizeof(yes_type); + #else + static const bool value = !has_boost_move_no_copy_constructor_or_assign_type::value; + #endif +}; + + +////////////////////////////////////// +// is_copy_assignable +////////////////////////////////////// +#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_CXX11_DECLTYPE) \ + && !defined(BOOST_INTEL_CXX_VERSION) && \ + !(defined(BOOST_MSVC) && _MSC_VER == 1800) +#define BOOST_MOVE_TT_CXX11_IS_COPY_ASSIGNABLE +#endif + +template +struct is_copy_assignable +{ +// Intel compiler has problems with SFINAE for copy constructors and deleted functions: +// +// error: function *function_name* cannot be referenced -- it is a deleted function +// static boost::type_traits::yes_type test(T1&, decltype(T1(boost::declval()))* = 0); +// ^ +// +// MSVC 12.0 (Visual 2013) has problems when the copy constructor has been deleted. See: +// https://connect.microsoft.com/VisualStudio/feedback/details/800328/std-is-copy-constructible-is-broken +#if defined(BOOST_MOVE_TT_CXX11_IS_COPY_ASSIGNABLE) + typedef char yes_type; + struct no_type { char dummy[2]; }; + + template static typename add_reference::type source(); + template static decltype(source() = source(), yes_type() ) test(int); + template static no_type test(...); + + static const bool value = sizeof(test(0)) == sizeof(yes_type); +#else + static const bool value = !has_boost_move_no_copy_constructor_or_assign_type::value; +#endif +}; + +////////////////////////////////////// +// is_trivially_destructible +////////////////////////////////////// +template +struct is_trivially_destructible +{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_DESTRUCTIBLE(T); }; + +////////////////////////////////////// +// is_trivially_default_constructible +////////////////////////////////////// +template +struct is_trivially_default_constructible +{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE(T); }; + +////////////////////////////////////// +// is_trivially_copy_constructible +////////////////////////////////////// +template +struct is_trivially_copy_constructible +{ + //In several compilers BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE return true even with + //deleted copy constructors so make sure the type is copy constructible. + static const bool value = ::boost::move_detail::is_pod::value || + ( ::boost::move_detail::is_copy_constructible::value && + BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) ); +}; + +////////////////////////////////////// +// is_trivially_move_constructible +////////////////////////////////////// +template +struct is_trivially_move_constructible +{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T); }; + +////////////////////////////////////// +// is_trivially_copy_assignable +////////////////////////////////////// +template +struct is_trivially_copy_assignable +{ + //In several compilers BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE return true even with + //deleted copy constructors so make sure the type is copy constructible. + static const bool value = ::boost::move_detail::is_pod::value || + ( ::boost::move_detail::is_copy_assignable::value && + BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T) ); +}; + +////////////////////////////////////// +// is_trivially_move_assignable +////////////////////////////////////// +template +struct is_trivially_move_assignable +{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_MOVE_ASSIGNABLE(T); }; + +////////////////////////////////////// +// is_nothrow_default_constructible +////////////////////////////////////// +template +struct is_nothrow_default_constructible + : is_pod +{ static const bool value = BOOST_MOVE_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE(T); }; + +////////////////////////////////////// +// is_nothrow_copy_constructible +////////////////////////////////////// +template +struct is_nothrow_copy_constructible +{ static const bool value = BOOST_MOVE_IS_NOTHROW_COPY_CONSTRUCTIBLE(T); }; + +////////////////////////////////////// +// is_nothrow_move_constructible +////////////////////////////////////// +template +struct is_nothrow_move_constructible +{ static const bool value = BOOST_MOVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE(T); }; + +////////////////////////////////////// +// is_nothrow_copy_assignable +////////////////////////////////////// +template +struct is_nothrow_copy_assignable +{ static const bool value = BOOST_MOVE_IS_NOTHROW_COPY_ASSIGNABLE(T); }; + +////////////////////////////////////// +// is_nothrow_move_assignable +////////////////////////////////////// +template +struct is_nothrow_move_assignable +{ static const bool value = BOOST_MOVE_IS_NOTHROW_MOVE_ASSIGNABLE(T); }; + +////////////////////////////////////// +// is_nothrow_swappable +////////////////////////////////////// +template +struct is_nothrow_swappable +{ + static const bool value = is_empty::value || is_pod::value; +}; + +////////////////////////////////////// +// alignment_of +////////////////////////////////////// +template +struct alignment_of_hack +{ + T t1; + char c; + T t2; + alignment_of_hack(); +}; + +template +struct alignment_logic +{ static const std::size_t value = A < S ? A : S; }; + +template< typename T > +struct alignment_of_impl +#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1400) + // With MSVC both the native __alignof operator + // and our own logic gets things wrong from time to time :-( + // Using a combination of the two seems to make the most of a bad job: + : alignment_logic< sizeof(alignment_of_hack) - 2*sizeof(T), __alignof(T)> +{}; +#elif !defined(BOOST_MOVE_ALIGNMENT_OF) + : alignment_logic< sizeof(alignment_of_hack) - 2*sizeof(T), sizeof(T)> +{}; +#else +{ static const std::size_t value = BOOST_MOVE_ALIGNMENT_OF(T); }; +#endif + +template< typename T > +struct alignment_of + : alignment_of_impl +{}; + +class alignment_dummy; +typedef void (*function_ptr)(); +typedef int (alignment_dummy::*member_ptr); +typedef int (alignment_dummy::*member_function_ptr)(); +struct alignment_struct +{ long double dummy[4]; }; + +///////////////////////////// +// max_align_t +///////////////////////////// +//This is not standard, but should work with all compilers +union max_align +{ + char char_; + short short_; + int int_; + long long_; + #ifdef BOOST_HAS_LONG_LONG + ::boost::long_long_type long_long_; + #endif + float float_; + double double_; + void * void_ptr_; + long double long_double_[4]; + alignment_dummy *unknown_class_ptr_; + function_ptr function_ptr_; + member_function_ptr member_function_ptr_; + alignment_struct alignment_struct_; +}; + +typedef union max_align max_align_t; + +///////////////////////////// +// aligned_storage +///////////////////////////// + +#if !defined(BOOST_NO_ALIGNMENT) + +template +struct aligned_storage_impl; + +#define BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(A)\ +template\ +struct BOOST_ALIGNMENT(A) aligned_storage_impl\ +{\ + char dummy[Len];\ + typedef aligned_storage_impl type;\ +};\ +// + +//Up to 4K alignment (typical page size) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x1) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x2) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x4) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x8) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x10) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x20) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x40) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x80) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x100) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x200) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x400) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x800) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x1000) + +#undef BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT + +#else //BOOST_NO_ALIGNMENT + +template +union aligned_union +{ + T aligner; + char dummy[Len]; +}; + +template +struct aligned_next; + +template +struct aligned_next +{ + BOOST_STATIC_ASSERT((alignment_of::value == Align)); + typedef aligned_union type; +}; + +//End of search defaults to max_align_t +template +struct aligned_next +{ typedef aligned_union type; }; + +//Now define a search list through types +#define BOOST_MOVE_ALIGNED_NEXT_STEP(TYPE, NEXT_TYPE)\ + template\ + struct aligned_next\ + : aligned_next::value>\ + {};\ + // + BOOST_MOVE_ALIGNED_NEXT_STEP(long double, max_align_t) + BOOST_MOVE_ALIGNED_NEXT_STEP(double, long double) + #ifdef BOOST_HAS_LONG_LONG + BOOST_MOVE_ALIGNED_NEXT_STEP(::boost::long_long_type, double) + BOOST_MOVE_ALIGNED_NEXT_STEP(long, ::boost::long_long_type) + #else + BOOST_MOVE_ALIGNED_NEXT_STEP(long, double) + #endif + BOOST_MOVE_ALIGNED_NEXT_STEP(int, long) + BOOST_MOVE_ALIGNED_NEXT_STEP(short, int) + BOOST_MOVE_ALIGNED_NEXT_STEP(char, short) +#undef BOOST_MOVE_ALIGNED_NEXT_STEP + +template +struct aligned_storage_impl + : aligned_next::value> +{}; + +#endif + +template::value> +struct aligned_storage +{ + //Sanity checks for input parameters + BOOST_STATIC_ASSERT(Align > 0); + + //Sanity checks for output type + typedef typename aligned_storage_impl::type type; + static const std::size_t value = alignment_of::value; + BOOST_STATIC_ASSERT(value >= Align); + BOOST_STATIC_ASSERT((value % Align) == 0); + + //Just in case someone instantiates aligned_storage + //instead of aligned_storage::type (typical error). + private: + aligned_storage(); +}; + +} //namespace move_detail { +} //namespace boost { + +#include + +#endif //#ifndef BOOST_MOVE_DETAIL_TYPE_TRAITS_HPP diff --git a/ThirdParty/boost-Subset/boost/move/detail/workaround.hpp b/ThirdParty/boost-Subset/boost/move/detail/workaround.hpp new file mode 100644 index 0000000000..b3f81b117f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/move/detail/workaround.hpp @@ -0,0 +1,55 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2014-2014. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/interprocess for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_MOVE_DETAIL_WORKAROUND_HPP +#define BOOST_MOVE_DETAIL_WORKAROUND_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + #define BOOST_MOVE_PERFECT_FORWARDING +#endif + +#if defined(__has_feature) + #define BOOST_MOVE_HAS_FEATURE __has_feature +#else + #define BOOST_MOVE_HAS_FEATURE(x) 0 +#endif + +#if BOOST_MOVE_HAS_FEATURE(address_sanitizer) || defined(__SANITIZE_ADDRESS__) + #define BOOST_MOVE_ADDRESS_SANITIZER_ON +#endif + +//Macros for documentation purposes. For code, expands to the argument +#define BOOST_MOVE_IMPDEF(TYPE) TYPE +#define BOOST_MOVE_SEEDOC(TYPE) TYPE +#define BOOST_MOVE_DOC0PTR(TYPE) TYPE +#define BOOST_MOVE_DOC1ST(TYPE1, TYPE2) TYPE2 +#define BOOST_MOVE_I , +#define BOOST_MOVE_DOCIGN(T1) T1 + +#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 5) && !defined(__clang__) + //Pre-standard rvalue binding rules + #define BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES +#elif defined(_MSC_VER) && (_MSC_VER == 1600) + //Standard rvalue binding rules but with some bugs + #define BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG + #define BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG +#elif defined(_MSC_VER) && (_MSC_VER == 1700) + #define BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG +#endif + +#endif //#ifndef BOOST_MOVE_DETAIL_WORKAROUND_HPP diff --git a/ThirdParty/boost-Subset/boost/move/traits.hpp b/ThirdParty/boost-Subset/boost/move/traits.hpp new file mode 100644 index 0000000000..b48b8f61d2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/move/traits.hpp @@ -0,0 +1,77 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2009-2012. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +//! \file + +#ifndef BOOST_MOVE_TRAITS_HPP +#define BOOST_MOVE_TRAITS_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +#include + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +#include +#endif +#include +#include + +namespace boost { + +//! If this trait yields to true +//! (has_trivial_destructor_after_move <T>::value == true) +//! means that if T is used as argument of a move construction/assignment, +//! there is no need to call T's destructor. +//! This optimization tipically is used to improve containers' performance. +//! +//! By default this trait is true if the type has trivial destructor, +//! every class should specialize this trait if it wants to improve performance +//! when inserted in containers. +template +struct has_trivial_destructor_after_move + : ::boost::move_detail::is_trivially_destructible +{}; + +//! By default this traits returns +//!

boost::is_nothrow_move_constructible::value && boost::is_nothrow_move_assignable::value 
. +//! Classes with non-throwing move constructor +//! and assignment can specialize this trait to obtain some performance improvements. +template +struct has_nothrow_move +{ + static const bool value = boost::move_detail::is_nothrow_move_constructible::value && + boost::move_detail::is_nothrow_move_assignable::value; +}; + +namespace move_detail { + +template +struct is_nothrow_move_constructible_or_uncopyable +{ + //The standard requires is_nothrow_move_constructible for move_if_noexcept + //but a user (usually in C++03) might specialize has_nothrow_move which includes it + static const bool value = is_nothrow_move_constructible::value || + has_nothrow_move::value || + !is_copy_constructible::value; +}; + +} //move_detail { +} //namespace boost { + +#include + +#endif //#ifndef BOOST_MOVE_TRAITS_HPP diff --git a/ThirdParty/boost-Subset/boost/move/utility.hpp b/ThirdParty/boost-Subset/boost/move/utility.hpp new file mode 100644 index 0000000000..8f9c20b65f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/move/utility.hpp @@ -0,0 +1,149 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2012-2012. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +//! \file +//! This header includes core utilities from and defines +//! some more advanced utilities such as: + +#ifndef BOOST_MOVE_MOVE_UTILITY_HPP +#define BOOST_MOVE_MOVE_UTILITY_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +#include +#include +#include + +#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) + + namespace boost { + + ////////////////////////////////////////////////////////////////////////////// + // + // move_if_noexcept() + // + ////////////////////////////////////////////////////////////////////////////// + + template + inline typename ::boost::move_detail::enable_if_c + < enable_move_utility_emulation::value && !has_move_emulation_enabled::value + , typename ::boost::move_detail::add_const::type & + >::type + move_if_noexcept(T& x) BOOST_NOEXCEPT + { + return x; + } + + template + inline typename ::boost::move_detail::enable_if_c + < enable_move_utility_emulation::value && has_move_emulation_enabled::value + && ::boost::move_detail::is_nothrow_move_constructible_or_uncopyable::value, rv&>::type + move_if_noexcept(T& x) BOOST_NOEXCEPT + { + return *static_cast* >(::boost::move_detail::addressof(x)); + } + + template + inline typename ::boost::move_detail::enable_if_c + < enable_move_utility_emulation::value && has_move_emulation_enabled::value + && ::boost::move_detail::is_nothrow_move_constructible_or_uncopyable::value + , rv& + >::type + move_if_noexcept(rv& x) BOOST_NOEXCEPT + { + return x; + } + + template + inline typename ::boost::move_detail::enable_if_c + < enable_move_utility_emulation::value && has_move_emulation_enabled::value + && !::boost::move_detail::is_nothrow_move_constructible_or_uncopyable::value + , typename ::boost::move_detail::add_const::type & + >::type + move_if_noexcept(T& x) BOOST_NOEXCEPT + { + return x; + } + + template + inline typename ::boost::move_detail::enable_if_c + < enable_move_utility_emulation::value && has_move_emulation_enabled::value + && !::boost::move_detail::is_nothrow_move_constructible_or_uncopyable::value + , typename ::boost::move_detail::add_const::type & + >::type + move_if_noexcept(rv& x) BOOST_NOEXCEPT + { + return x; + } + + } //namespace boost + +#else //#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) + + #if defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE) + #include + + namespace boost{ + + using ::std::move_if_noexcept; + + } //namespace boost + + #else //!BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE + + namespace boost { + + ////////////////////////////////////////////////////////////////////////////// + // + // move_if_noexcept() + // + ////////////////////////////////////////////////////////////////////////////// + #if defined(BOOST_MOVE_DOXYGEN_INVOKED) + //! This function provides a way to convert a reference into a rvalue reference + //! in compilers with rvalue references. For other compilers converts T & into + //! ::boost::rv & so that move emulation is activated. Reference + //! would be converted to rvalue reference only if input type is nothrow move + //! constructible or if it has no copy constructor. In all other cases const + //! reference would be returned + template + rvalue_reference_or_const_lvalue_reference move_if_noexcept(input_reference) noexcept; + + #else //BOOST_MOVE_DOXYGEN_INVOKED + + template + typename ::boost::move_detail::enable_if_c + < ::boost::move_detail::is_nothrow_move_constructible_or_uncopyable::value, T&&>::type + move_if_noexcept(T& x) BOOST_NOEXCEPT + { return ::boost::move(x); } + + template + typename ::boost::move_detail::enable_if_c + < !::boost::move_detail::is_nothrow_move_constructible_or_uncopyable::value, const T&>::type + move_if_noexcept(T& x) BOOST_NOEXCEPT + { return x; } + + #endif //BOOST_MOVE_DOXYGEN_INVOKED + + } //namespace boost { + + #endif //#if defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE) + +#endif //BOOST_NO_CXX11_RVALUE_REFERENCES + +#include + +#endif //#ifndef BOOST_MOVE_MOVE_UTILITY_HPP diff --git a/ThirdParty/boost-Subset/boost/move/utility_core.hpp b/ThirdParty/boost-Subset/boost/move/utility_core.hpp new file mode 100644 index 0000000000..89e4f07f8b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/move/utility_core.hpp @@ -0,0 +1,315 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2012-2012. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +//! \file +//! This header defines core utilities to ease the development +//! of move-aware functions. This header minimizes dependencies +//! from other libraries. + +#ifndef BOOST_MOVE_MOVE_UTILITY_CORE_HPP +#define BOOST_MOVE_MOVE_UTILITY_CORE_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +#include +#include +#include +#include + +#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) + + namespace boost { + + template + struct enable_move_utility_emulation + { + static const bool value = true; + }; + + ////////////////////////////////////////////////////////////////////////////// + // + // move() + // + ////////////////////////////////////////////////////////////////////////////// + + template + inline typename ::boost::move_detail::enable_if_and + < T & + , enable_move_utility_emulation + , has_move_emulation_disabled + >::type + move(T& x) BOOST_NOEXCEPT + { + return x; + } + + template + inline typename ::boost::move_detail::enable_if_and + < rv& + , enable_move_utility_emulation + , has_move_emulation_enabled + >::type + move(T& x) BOOST_NOEXCEPT + { + return *BOOST_MOVE_TO_RV_CAST(::boost::rv*, ::boost::move_detail::addressof(x) ); + } + + template + inline typename ::boost::move_detail::enable_if_and + < rv& + , enable_move_utility_emulation + , has_move_emulation_enabled + >::type + move(rv& x) BOOST_NOEXCEPT + { + return x; + } + + ////////////////////////////////////////////////////////////////////////////// + // + // forward() + // + ////////////////////////////////////////////////////////////////////////////// + + template + inline typename ::boost::move_detail::enable_if_and + < T & + , enable_move_utility_emulation + , ::boost::move_detail::is_rv + >::type + forward(const typename ::boost::move_detail::identity::type &x) BOOST_NOEXCEPT + { + return const_cast(x); + } + + template + inline typename ::boost::move_detail::enable_if_and + < const T & + , enable_move_utility_emulation + , ::boost::move_detail::is_not_rv + >::type + forward(const typename ::boost::move_detail::identity::type &x) BOOST_NOEXCEPT + { + return x; + } + + ////////////////////////////////////////////////////////////////////////////// + // + // move_if_not_lvalue_reference() + // + ////////////////////////////////////////////////////////////////////////////// + + template + inline typename ::boost::move_detail::enable_if_and + < T & + , enable_move_utility_emulation + , ::boost::move_detail::is_rv + >::type + move_if_not_lvalue_reference(const typename ::boost::move_detail::identity::type &x) BOOST_NOEXCEPT + { + return const_cast(x); + } + + template + inline typename ::boost::move_detail::enable_if_and + < typename ::boost::move_detail::add_lvalue_reference::type + , enable_move_utility_emulation + , ::boost::move_detail::is_not_rv + , ::boost::move_detail::or_ + < ::boost::move_detail::is_lvalue_reference + , has_move_emulation_disabled + > + >::type + move_if_not_lvalue_reference(typename ::boost::move_detail::remove_reference::type &x) BOOST_NOEXCEPT + { + return x; + } + + template + inline typename ::boost::move_detail::enable_if_and + < rv& + , enable_move_utility_emulation + , ::boost::move_detail::is_not_rv + , ::boost::move_detail::and_ + < ::boost::move_detail::not_< ::boost::move_detail::is_lvalue_reference > + , has_move_emulation_enabled + > + >::type + move_if_not_lvalue_reference(typename ::boost::move_detail::remove_reference::type &x) BOOST_NOEXCEPT + { + return move(x); + } + + } //namespace boost + +#else //#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) + + #if defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE) + #include + + namespace boost{ + + using ::std::move; + using ::std::forward; + + } //namespace boost + + #else //!BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE + + namespace boost { + + //! This trait's internal boolean `value` is false in compilers with rvalue references + //! and true in compilers without rvalue references. + //! + //! A user can specialize this trait for a type T to false to SFINAE out `move` and `forward` + //! so that the user can define a different move emulation for that type in namespace boost + //! (e.g. another Boost library for its types) and avoid any overload ambiguity. + template + struct enable_move_utility_emulation + { + static const bool value = false; + }; + + ////////////////////////////////////////////////////////////////////////////// + // + // move + // + ////////////////////////////////////////////////////////////////////////////// + + #if defined(BOOST_MOVE_DOXYGEN_INVOKED) + //! This function provides a way to convert a reference into a rvalue reference + //! in compilers with rvalue references. For other compilers if `T` is Boost.Move + //! enabled type then it converts `T&` into ::boost::rv & so that + //! move emulation is activated, else it returns `T &`. + template + rvalue_reference move(input_reference) noexcept; + + #elif defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES) + + //Old move approach, lvalues could bind to rvalue references + template + inline typename ::boost::move_detail::remove_reference::type && move(T&& t) BOOST_NOEXCEPT + { return t; } + + #else //BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES + + template + inline typename ::boost::move_detail::remove_reference::type && move(T&& t) BOOST_NOEXCEPT + { return static_cast::type &&>(t); } + + #endif //BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES + + ////////////////////////////////////////////////////////////////////////////// + // + // forward + // + ////////////////////////////////////////////////////////////////////////////// + + + #if defined(BOOST_MOVE_DOXYGEN_INVOKED) + //! This function provides limited form of forwarding that is usually enough for + //! in-place construction and avoids the exponential overloading for + //! achieve the limited forwarding in C++03. + //! + //! For compilers with rvalue references this function provides perfect forwarding. + //! + //! Otherwise: + //! * If input_reference binds to const ::boost::rv & then it output_reference is + //! ::boost::rv & + //! + //! * Else, output_reference is equal to input_reference. + template output_reference forward(input_reference) noexcept; + #elif defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES) + + //Old move approach, lvalues could bind to rvalue references + + template + inline T&& forward(typename ::boost::move_detail::identity::type&& t) BOOST_NOEXCEPT + { return t; } + + #else //Old move + + template + inline T&& forward(typename ::boost::move_detail::remove_reference::type& t) BOOST_NOEXCEPT + { return static_cast(t); } + + template + inline T&& forward(typename ::boost::move_detail::remove_reference::type&& t) BOOST_NOEXCEPT + { + //"boost::forward error: 'T' is a lvalue reference, can't forward as rvalue."; + BOOST_STATIC_ASSERT(!boost::move_detail::is_lvalue_reference::value); + return static_cast(t); + } + + #endif //BOOST_MOVE_DOXYGEN_INVOKED + + ////////////////////////////////////////////////////////////////////////////// + // + // move_if_not_lvalue_reference + // + ////////////////////////////////////////////////////////////////////////////// + + + #if defined(BOOST_MOVE_DOXYGEN_INVOKED) + template output_reference move_if_not_lvalue_reference(input_reference) noexcept; + #elif defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES) + + //Old move approach, lvalues could bind to rvalue references + + template + inline T&& move_if_not_lvalue_reference(typename ::boost::move_detail::identity::type&& t) BOOST_NOEXCEPT + { return t; } + + #else //Old move + + template + inline T&& move_if_not_lvalue_reference(typename ::boost::move_detail::remove_reference::type& t) BOOST_NOEXCEPT + { return static_cast(t); } + + template + inline T&& move_if_not_lvalue_reference(typename ::boost::move_detail::remove_reference::type&& t) BOOST_NOEXCEPT + { + //"boost::forward error: 'T' is a lvalue reference, can't forward as rvalue."; + BOOST_STATIC_ASSERT(!boost::move_detail::is_lvalue_reference::value); + return static_cast(t); + } + + #endif //BOOST_MOVE_DOXYGEN_INVOKED + + } //namespace boost { + + #endif //#if defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE) + +#endif //BOOST_NO_CXX11_RVALUE_REFERENCES + +#if !defined(BOOST_MOVE_DOXYGEN_INVOKED) + +namespace boost{ +namespace move_detail{ + +template +typename boost::move_detail::add_rvalue_reference::type declval(); + +} //namespace move_detail{ +} //namespace boost{ + +#endif //#if !defined(BOOST_MOVE_DOXYGEN_INVOKED) + + +#include + +#endif //#ifndef BOOST_MOVE_MOVE_UTILITY_CORE_HPP diff --git a/ThirdParty/boost-Subset/boost/mpl/O1_size.hpp b/ThirdParty/boost-Subset/boost/mpl/O1_size.hpp new file mode 100644 index 0000000000..98bd3a7459 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/O1_size.hpp @@ -0,0 +1,40 @@ + +#ifndef BOOST_MPL_O1_SIZE_HPP_INCLUDED +#define BOOST_MPL_O1_SIZE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +// returns sequence size if it's an O(1) operation; otherwise returns -1 +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + > +struct O1_size + : O1_size_impl< typename sequence_tag::type > + ::template apply< Sequence > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1, O1_size, (Sequence)) +}; + +BOOST_MPL_AUX_NA_SPEC(1, O1_size) + +}} + +#endif // BOOST_MPL_O1_SIZE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/O1_size_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/O1_size_fwd.hpp new file mode 100644 index 0000000000..c84a7a56ae --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/O1_size_fwd.hpp @@ -0,0 +1,24 @@ + +#ifndef BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED +#define BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct O1_size_impl; +template< typename Sequence > struct O1_size; + +}} + +#endif // BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/advance.hpp b/ThirdParty/boost-Subset/boost/mpl/advance.hpp new file mode 100644 index 0000000000..1af600417f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/advance.hpp @@ -0,0 +1,76 @@ + +#ifndef BOOST_MPL_ADVANCE_HPP_INCLUDED +#define BOOST_MPL_ADVANCE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +// default implementation for forward/bidirectional iterators +template< typename Tag > +struct advance_impl +{ + template< typename Iterator, typename N > struct apply + { + typedef typename less< N,long_<0> >::type backward_; + typedef typename if_< backward_, negate, N >::type offset_; + + typedef typename if_< + backward_ + , aux::advance_backward< BOOST_MPL_AUX_VALUE_WKND(offset_)::value > + , aux::advance_forward< BOOST_MPL_AUX_VALUE_WKND(offset_)::value > + >::type f_; + + typedef typename apply_wrap1::type type; + }; +}; + + +template< + typename BOOST_MPL_AUX_NA_PARAM(Iterator) + , typename BOOST_MPL_AUX_NA_PARAM(N) + > +struct advance + : advance_impl< typename tag::type > + ::template apply +{ +}; + +template< + typename Iterator + , BOOST_MPL_AUX_NTTP_DECL(long, N) + > +struct advance_c + : advance_impl< typename tag::type > + ::template apply > +{ +}; + +BOOST_MPL_AUX_NA_SPEC(2, advance) + +}} + +#endif // BOOST_MPL_ADVANCE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/advance_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/advance_fwd.hpp new file mode 100644 index 0000000000..803841019d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/advance_fwd.hpp @@ -0,0 +1,28 @@ + +#ifndef BOOST_MPL_ADVANCE_FWD_HPP_INCLUDED +#define BOOST_MPL_ADVANCE_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +namespace boost { namespace mpl { + +BOOST_MPL_AUX_COMMON_NAME_WKND(advance) + +template< typename Tag > struct advance_impl; +template< typename Iterator, typename N > struct advance; + +}} + +#endif // BOOST_MPL_ADVANCE_FWD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/always.hpp b/ThirdParty/boost-Subset/boost/mpl/always.hpp new file mode 100644 index 0000000000..5fe71321e1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/always.hpp @@ -0,0 +1,38 @@ + +#ifndef BOOST_MPL_ALWAYS_HPP_INCLUDED +#define BOOST_MPL_ALWAYS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +namespace boost { namespace mpl { + +template< typename Value > struct always +{ + template< + BOOST_MPL_PP_DEFAULT_PARAMS(BOOST_MPL_LIMIT_METAFUNCTION_ARITY, typename T, na) + > + struct apply + { + typedef Value type; + }; +}; + +BOOST_MPL_AUX_ARITY_SPEC(0, always) + +}} + +#endif // BOOST_MPL_ALWAYS_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/and.hpp b/ThirdParty/boost-Subset/boost/mpl/and.hpp new file mode 100644 index 0000000000..454aaf2e96 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/and.hpp @@ -0,0 +1,60 @@ + +#ifndef BOOST_MPL_AND_HPP_INCLUDED +#define BOOST_MPL_AND_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# include +# include +# include +# include + +// agurt, 19/may/04: workaround a conflict with header's +// 'or' and 'and' macros, see http://tinyurl.com/3et69; 'defined(and)' +// has to be checked in a separate condition, otherwise GCC complains +// about 'and' being an alternative token +#if defined(_MSC_VER) && !defined(__clang__) +#ifndef __GCCXML__ +#if defined(and) +# pragma push_macro("and") +# undef and +# define and(x) +#endif +#endif +#endif + +# define BOOST_MPL_PREPROCESSED_HEADER and.hpp +# include + +#if defined(_MSC_VER) && !defined(__clang__) +#ifndef __GCCXML__ +#if defined(and) +# pragma pop_macro("and") +#endif +#endif +#endif + +#else + +# define AUX778076_OP_NAME and_ +# define AUX778076_OP_VALUE1 false +# define AUX778076_OP_VALUE2 true +# include + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_AND_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/apply.hpp b/ThirdParty/boost-Subset/boost/mpl/apply.hpp new file mode 100644 index 0000000000..581eb6810e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/apply.hpp @@ -0,0 +1,229 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_APPLY_HPP_INCLUDED +#define BOOST_MPL_APPLY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include +# include +# include +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER apply.hpp +# include + +#else + +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include + +# include +# include +# include +# include + +namespace boost { namespace mpl { + +// local macros, #undef-ined at the end of the header +# define AUX778076_APPLY_PARAMS(param) \ + BOOST_MPL_PP_PARAMS( \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ + , param \ + ) \ + /**/ + +# define AUX778076_APPLY_DEF_PARAMS(param, value) \ + BOOST_MPL_PP_DEFAULT_PARAMS( \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ + , param \ + , value \ + ) \ + /**/ + +# define AUX778076_APPLY_N_PARAMS(n, param) \ + BOOST_MPL_PP_PARAMS(n, param) \ + /**/ + +# define AUX778076_APPLY_N_COMMA_PARAMS(n, param) \ + BOOST_PP_COMMA_IF(n) \ + BOOST_MPL_PP_PARAMS(n, param) \ + /**/ + +# define AUX778076_APPLY_N_PARTIAL_SPEC_PARAMS(n, param, def) \ + BOOST_PP_COMMA_IF(n) \ + BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \ + /**/ + +# define AUX778076_APPLY_N_SPEC_PARAMS(n, param) \ + BOOST_MPL_PP_ENUM(BOOST_PP_INC(n), param) \ + /**/ + + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) +#include BOOST_PP_ITERATE() + +# if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE) +// real C++ version is already taken care of +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +namespace aux { +// apply_count_args +#define AUX778076_COUNT_ARGS_PREFIX apply +#define AUX778076_COUNT_ARGS_DEFAULT na +#define AUX778076_COUNT_ARGS_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY +#include +} + + +template< + typename F, AUX778076_APPLY_DEF_PARAMS(typename T, na) + > +struct apply + : aux::apply_chooser< + aux::apply_count_args< AUX778076_APPLY_PARAMS(T) >::value + >::template result_< F, AUX778076_APPLY_PARAMS(T) >::type +{ +}; + +# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +# endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE + +# undef AUX778076_APPLY_N_SPEC_PARAMS +# undef AUX778076_APPLY_N_PARTIAL_SPEC_PARAMS +# undef AUX778076_APPLY_N_COMMA_PARAMS +# undef AUX778076_APPLY_N_PARAMS +# undef AUX778076_APPLY_DEF_PARAMS +# undef AUX778076_APPLY_PARAMS + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_APPLY_HPP_INCLUDED + +///// iteration, depth == 1 + +// For gcc 4.4 compatability, we must include the +// BOOST_PP_ITERATION_DEPTH test inside an #else clause. +#else // BOOST_PP_IS_ITERATING +#if BOOST_PP_ITERATION_DEPTH() == 1 + +# define i_ BOOST_PP_FRAME_ITERATION(1) + +template< + typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(apply,i_) +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) + : BOOST_PP_CAT(apply_wrap,i_)< + typename lambda::type + AUX778076_APPLY_N_COMMA_PARAMS(i_, T) + > +{ +#else +{ + typedef typename BOOST_PP_CAT(apply_wrap,i_)< + typename lambda::type + AUX778076_APPLY_N_COMMA_PARAMS(i_, T) + >::type type; +#endif + BOOST_MPL_AUX_LAMBDA_SUPPORT( + BOOST_PP_INC(i_) + , BOOST_PP_CAT(apply,i_) + , (F AUX778076_APPLY_N_COMMA_PARAMS(i_,T)) + ) +}; + + +#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) +/// workaround for ETI bug +template<> +struct BOOST_PP_CAT(apply,i_) +{ + typedef int type; +}; +#endif + +# if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE) +# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +#if i_ == BOOST_MPL_LIMIT_METAFUNCTION_ARITY +/// primary template (not a specialization!) +template< + typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T) + > +struct apply + : BOOST_PP_CAT(apply,i_)< F AUX778076_APPLY_N_COMMA_PARAMS(i_, T) > +{ +}; +#else +template< + typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T) + > +struct apply< F AUX778076_APPLY_N_PARTIAL_SPEC_PARAMS(i_, T, na) > + : BOOST_PP_CAT(apply,i_)< F AUX778076_APPLY_N_COMMA_PARAMS(i_, T) > +{ +}; +#endif + +# else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE) +namespace aux { + +template<> +struct apply_chooser +{ + template< + typename F, AUX778076_APPLY_PARAMS(typename T) + > + struct result_ + { + typedef BOOST_PP_CAT(apply,i_)< + F AUX778076_APPLY_N_COMMA_PARAMS(i_, T) + > type; + }; +}; + +} // namespace aux +#endif + +# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +# endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE + +# undef i_ + +#endif // BOOST_PP_ITERATION_DEPTH() +#endif // BOOST_PP_IS_ITERATING diff --git a/ThirdParty/boost-Subset/boost/mpl/apply_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/apply_fwd.hpp new file mode 100644 index 0000000000..5f5fa78916 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/apply_fwd.hpp @@ -0,0 +1,107 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_APPLY_FWD_HPP_INCLUDED +#define BOOST_MPL_APPLY_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER apply_fwd.hpp +# include + +#else + +# include +# include +# include +# include +# include + +# include +# include +# include + +// agurt, 15/jan/02: top-level 'apply' template gives an ICE on MSVC +// (for known reasons) +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +# define BOOST_MPL_CFG_NO_APPLY_TEMPLATE +#endif + +namespace boost { namespace mpl { + +// local macro, #undef-ined at the end of the header +# define AUX778076_APPLY_DEF_PARAMS(param, value) \ + BOOST_MPL_PP_DEFAULT_PARAMS( \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ + , param \ + , value \ + ) \ + /**/ + +# define AUX778076_APPLY_N_COMMA_PARAMS(n, param) \ + BOOST_PP_COMMA_IF(n) \ + BOOST_MPL_PP_PARAMS(n, param) \ + /**/ + +# if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE) + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +// forward declaration +template< + typename F, AUX778076_APPLY_DEF_PARAMS(typename T, na) + > +struct apply; +#else +namespace aux { +template< BOOST_AUX_NTTP_DECL(int, arity_) > struct apply_chooser; +} +#endif + +# endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) +#include BOOST_PP_ITERATE() + + +# undef AUX778076_APPLY_N_COMMA_PARAMS +# undef AUX778076_APPLY_DEF_PARAMS + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_APPLY_FWD_HPP_INCLUDED + +///// iteration + +#else +#define i_ BOOST_PP_FRAME_ITERATION(1) + +template< + typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(apply,i_); + +#undef i_ +#endif // BOOST_PP_IS_ITERATING diff --git a/ThirdParty/boost-Subset/boost/mpl/apply_wrap.hpp b/ThirdParty/boost-Subset/boost/mpl/apply_wrap.hpp new file mode 100644 index 0000000000..b807779cfa --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/apply_wrap.hpp @@ -0,0 +1,234 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_APPLY_WRAP_HPP_INCLUDED +#define BOOST_MPL_APPLY_WRAP_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2008 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER apply_wrap.hpp +# include + +#else + +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include + +# include +# include +# include +# include + + +namespace boost { namespace mpl { + +// local macros, #undef-ined at the end of the header +# define AUX778076_APPLY_WRAP_PARAMS(n, param) \ + BOOST_MPL_PP_PARAMS(n, param) \ + /**/ + +# define AUX778076_APPLY_WRAP_SPEC_PARAMS(n, param) \ + BOOST_MPL_PP_ENUM(BOOST_PP_INC(n), param) \ + /**/ + + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) +#include BOOST_PP_ITERATE() + + +# undef AUX778076_APPLY_WRAP_SPEC_PARAMS +# undef AUX778076_APPLY_WRAP_PARAMS + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_APPLY_WRAP_HPP_INCLUDED + +///// iteration, depth == 1 + +// For gcc 4.4 compatability, we must include the +// BOOST_PP_ITERATION_DEPTH test inside an #else clause. +#else // BOOST_PP_IS_ITERATING +#if BOOST_PP_ITERATION_DEPTH() == 1 + +# define i_ BOOST_PP_FRAME_ITERATION(1) + +# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +// MSVC version + +#define AUX778076_MSVC_DTW_NAME BOOST_PP_CAT(msvc_apply,i_) +#define AUX778076_MSVC_DTW_ORIGINAL_NAME apply +#define AUX778076_MSVC_DTW_ARITY i_ +#include + +template< + typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(apply_wrap,i_) +{ + // Metafunction forwarding confuses vc6 + typedef typename BOOST_PP_CAT(msvc_apply,i_)::template result_< + AUX778076_APPLY_WRAP_PARAMS(i_, T) + >::type type; +}; + +# elif defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +// MWCW/Borland version + +template< + int N, typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(apply_wrap_impl,i_); + +#define BOOST_PP_ITERATION_PARAMS_2 \ + (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY - i_, )) +#include BOOST_PP_ITERATE() + +template< + typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(apply_wrap,i_) + : BOOST_PP_CAT(apply_wrap_impl,i_)< + ::boost::mpl::aux::arity::value + , F + BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T) + >::type +{ +}; + +# else +// ISO98 C++, with minor concession to vc7 + +template< + typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) +#if i_ == 0 + , typename has_apply_ = typename aux::has_apply::type +#endif + > +struct BOOST_PP_CAT(apply_wrap,i_) +// metafunction forwarding confuses MSVC 7.0 +#if !BOOST_WORKAROUND(BOOST_MSVC, == 1300) + : F::template apply< AUX778076_APPLY_WRAP_PARAMS(i_, T) > +{ +#else +{ + typedef typename F::template apply< + AUX778076_APPLY_WRAP_PARAMS(i_, T) + >::type type; +#endif +}; + +#if i_ == 0 && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +template< typename F > +struct BOOST_PP_CAT(apply_wrap,i_) + : F::apply +{ +}; +#endif + +# endif // workarounds + +#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) +/// workaround for ETI bug +template<> +struct BOOST_PP_CAT(apply_wrap,i_) +{ + typedef int type; +}; +#endif + +# undef i_ + +///// iteration, depth == 2 + +#elif BOOST_PP_ITERATION_DEPTH() == 2 + +# define j_ BOOST_PP_FRAME_ITERATION(2) + +#if i_ == 0 && j_ == 0 \ + && defined(BOOST_MPL_CFG_BCC590_WORKAROUNDS) \ + && !defined(BOOST_MPL_CFG_NO_HAS_APPLY) + +template< typename F, bool F_has_apply > +struct apply_wrap_impl0_bcb { + typedef typename F::template apply< na > type; +}; + +template< typename F > +struct apply_wrap_impl0_bcb< F, true > { + typedef typename F::apply type; +}; + +template< + typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(apply_wrap_impl,i_)< + BOOST_MPL_PP_ADD(i_, j_) + , F + BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T) + > +{ + typedef apply_wrap_impl0_bcb< F, aux::has_apply< F >::value >::type type; +}; +#else + +template< + typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(apply_wrap_impl,i_)< + BOOST_MPL_PP_ADD(i_, j_) + , F + BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T) + > +{ + typedef typename F::template apply< + AUX778076_APPLY_WRAP_PARAMS(i_, T) +#if i_ == 0 && j_ == 0 +/// since the defaults are "lost", we have to pass *something* even for nullary +/// metafunction classes + na +#else + BOOST_PP_COMMA_IF(BOOST_PP_AND(i_, j_)) BOOST_MPL_PP_ENUM(j_, na) +#endif + > type; +}; + +#endif + +# undef j_ + +#endif // BOOST_PP_ITERATION_DEPTH() +#endif // BOOST_PP_IS_ITERATING diff --git a/ThirdParty/boost-Subset/boost/mpl/arg.hpp b/ThirdParty/boost-Subset/boost/mpl/arg.hpp new file mode 100644 index 0000000000..f51adfaeab --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/arg.hpp @@ -0,0 +1,131 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_ARG_HPP_INCLUDED +#define BOOST_MPL_ARG_HPP_INCLUDED + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include +# include +# include +#endif + +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER arg.hpp +# include + +#else + +# include +# include +# include +# include +# include +# include + +# include +# include +# include + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +// local macro, #undef-ined at the end of the header +#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +# define AUX778076_ARG_N_DEFAULT_PARAMS(param,value) \ + BOOST_MPL_PP_DEFAULT_PARAMS( \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ + , param \ + , value \ + ) \ + /**/ +#else +# define AUX778076_ARG_N_DEFAULT_PARAMS(param,value) \ + BOOST_MPL_PP_PARAMS( \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ + , param \ + ) \ + /**/ +#endif + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) +#include BOOST_PP_ITERATE() + + +# undef AUX778076_ARG_N_DEFAULT_PARAMS + +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int,arg) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_ARG_HPP_INCLUDED + +///// iteration + +#else +#define i_ BOOST_PP_FRAME_ITERATION(1) + +#if i_ > 0 + +template<> struct arg +{ + BOOST_STATIC_CONSTANT(int, value = i_); + typedef arg next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + AUX778076_ARG_N_DEFAULT_PARAMS(typename U, na) + > + struct apply + { + typedef BOOST_PP_CAT(U,i_) type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +#else + +template<> struct arg<-1> +{ + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + AUX778076_ARG_N_DEFAULT_PARAMS(typename U, na) + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +#endif // i_ > 0 + +#undef i_ +#endif // BOOST_PP_IS_ITERATING diff --git a/ThirdParty/boost-Subset/boost/mpl/arg_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/arg_fwd.hpp new file mode 100644 index 0000000000..7346dc3555 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/arg_fwd.hpp @@ -0,0 +1,28 @@ + +#ifndef BOOST_MPL_ARG_FWD_HPP_INCLUDED +#define BOOST_MPL_ARG_FWD_HPP_INCLUDED + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct arg; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(arg) + +#endif // BOOST_MPL_ARG_FWD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/assert.hpp b/ThirdParty/boost-Subset/boost/mpl/assert.hpp new file mode 100644 index 0000000000..4d860a4cae --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/assert.hpp @@ -0,0 +1,439 @@ + +#ifndef BOOST_MPL_ASSERT_HPP_INCLUDED +#define BOOST_MPL_ASSERT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2006 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include // make sure 'size_t' is placed into 'std' +#include + +#if BOOST_WORKAROUND(BOOST_MSVC, == 1700) +#include +#endif + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ + || (BOOST_MPL_CFG_GCC != 0) \ + || BOOST_WORKAROUND(__IBMCPP__, <= 600) +# define BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES +#endif + +#if BOOST_WORKAROUND(__MWERKS__, < 0x3202) \ + || BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ + || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +# define BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER +#endif + +// agurt, 10/nov/06: use enums for Borland (which cannot cope with static constants) +// and GCC (which issues "unused variable" warnings when static constants are used +// at a function scope) +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ + || (BOOST_MPL_CFG_GCC != 0) || (BOOST_MPL_CFG_GPU != 0) +# define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) enum { expr } +#else +# define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) BOOST_STATIC_CONSTANT(T, expr) +#endif + + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +struct failed {}; + +// agurt, 24/aug/04: MSVC 7.1 workaround here and below: return/accept +// 'assert' by reference; can't apply it unconditionally -- apparently it +// degrades the quality of GCC diagnostics +#if BOOST_WORKAROUND(BOOST_MSVC, == 1310) +# define AUX778076_ASSERT_ARG(x) x& +#else +# define AUX778076_ASSERT_ARG(x) x +#endif + +template< bool C > struct assert { typedef void* type; }; +template<> struct assert { typedef AUX778076_ASSERT_ARG(assert) type; }; + +template< bool C > +int assertion_failed( typename assert::type ); + +template< bool C > +struct assertion +{ + static int failed( assert ); +}; + +template<> +struct assertion +{ + static int failed( void* ); +}; + +struct assert_ +{ +#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) + template< typename T1, typename T2 = na, typename T3 = na, typename T4 = na > struct types {}; +#endif + static assert_ const arg; + enum relations { equal = 1, not_equal, greater, greater_equal, less, less_equal }; +}; + + +#if !defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES) + +bool operator==( failed, failed ); +bool operator!=( failed, failed ); +bool operator>( failed, failed ); +bool operator>=( failed, failed ); +bool operator<( failed, failed ); +bool operator<=( failed, failed ); + +#if defined(__EDG_VERSION__) +template< bool (*)(failed, failed), long x, long y > struct assert_relation {}; +# define BOOST_MPL_AUX_ASSERT_RELATION(x, y, r) assert_relation +#else +template< BOOST_MPL_AUX_NTTP_DECL(long, x), BOOST_MPL_AUX_NTTP_DECL(long, y), bool (*)(failed, failed) > +struct assert_relation {}; +# define BOOST_MPL_AUX_ASSERT_RELATION(x, y, r) assert_relation +#endif + +#else // BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES + +boost::mpl::aux::weighted_tag<1>::type operator==( assert_, assert_ ); +boost::mpl::aux::weighted_tag<2>::type operator!=( assert_, assert_ ); +boost::mpl::aux::weighted_tag<3>::type operator>( assert_, assert_ ); +boost::mpl::aux::weighted_tag<4>::type operator>=( assert_, assert_ ); +boost::mpl::aux::weighted_tag<5>::type operator<( assert_, assert_ ); +boost::mpl::aux::weighted_tag<6>::type operator<=( assert_, assert_ ); + +template< assert_::relations r, long x, long y > struct assert_relation {}; + +#endif + +#if BOOST_WORKAROUND(BOOST_MSVC, == 1700) + +template +struct extract_assert_pred; + +template +struct extract_assert_pred { typedef Pred type; }; + +template +struct eval_assert { + typedef typename extract_assert_pred::type P; + typedef typename P::type p_type; + typedef typename ::boost::mpl::if_c), + failed ************ P::************ + >::type type; +}; + +template +struct eval_assert_not { + typedef typename extract_assert_pred::type P; + typedef typename P::type p_type; + typedef typename ::boost::mpl::if_c), + failed ************ ::boost::mpl::not_

::************ + >::type type; +}; + +template< typename T > +T make_assert_arg(); + +#elif !defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER) + +template< bool > struct assert_arg_pred_impl { typedef int type; }; +template<> struct assert_arg_pred_impl { typedef void* type; }; + +template< typename P > struct assert_arg_pred +{ + typedef typename P::type p_type; + typedef typename assert_arg_pred_impl< p_type::value >::type type; +}; + +template< typename P > struct assert_arg_pred_not +{ + typedef typename P::type p_type; + BOOST_MPL_AUX_ASSERT_CONSTANT( bool, p = !p_type::value ); + typedef typename assert_arg_pred_impl

::type type; +}; + +template< typename Pred > +failed ************ (Pred::************ + assert_arg( void (*)(Pred), typename assert_arg_pred::type ) + ); + +template< typename Pred > +failed ************ (boost::mpl::not_::************ + assert_not_arg( void (*)(Pred), typename assert_arg_pred_not::type ) + ); + +template< typename Pred > +AUX778076_ASSERT_ARG(assert) +assert_arg( void (*)(Pred), typename assert_arg_pred_not::type ); + +template< typename Pred > +AUX778076_ASSERT_ARG(assert) +assert_not_arg( void (*)(Pred), typename assert_arg_pred::type ); + + +#else // BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER + +template< bool c, typename Pred > struct assert_arg_type_impl +{ + typedef failed ************ Pred::* mwcw83_wknd; + typedef mwcw83_wknd ************* type; +}; + +template< typename Pred > struct assert_arg_type_impl +{ + typedef AUX778076_ASSERT_ARG(assert) type; +}; + +template< typename Pred > struct assert_arg_type + : assert_arg_type_impl< BOOST_MPL_AUX_VALUE_WKND(BOOST_MPL_AUX_NESTED_TYPE_WKND(Pred))::value, Pred > +{ +}; + +template< typename Pred > +typename assert_arg_type::type +assert_arg(void (*)(Pred), int); + +template< typename Pred > +typename assert_arg_type< boost::mpl::not_ >::type +assert_not_arg(void (*)(Pred), int); + +# if !defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES) +template< long x, long y, bool (*r)(failed, failed) > +typename assert_arg_type_impl< false,BOOST_MPL_AUX_ASSERT_RELATION(x,y,r) >::type +assert_rel_arg( BOOST_MPL_AUX_ASSERT_RELATION(x,y,r) ); +# else +template< assert_::relations r, long x, long y > +typename assert_arg_type_impl< false,assert_relation >::type +assert_rel_arg( assert_relation ); +# endif + +#endif // BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER + +#undef AUX778076_ASSERT_ARG + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +#if BOOST_WORKAROUND(BOOST_MSVC, == 1700) + +// BOOST_MPL_ASSERT((pred)) + +#define BOOST_MPL_ASSERT(pred) \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ + std::size_t \ + , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ + boost::mpl::assertion_failed( \ + boost::mpl::make_assert_arg< \ + typename boost::mpl::eval_assert::type \ + >() \ + ) \ + ) \ + ) \ +/**/ + +// BOOST_MPL_ASSERT_NOT((pred)) + +#define BOOST_MPL_ASSERT_NOT(pred) \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ + std::size_t \ + , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ + boost::mpl::assertion_failed( \ + boost::mpl::make_assert_arg< \ + typename boost::mpl::eval_assert_not::type \ + >() \ + ) \ + ) \ + ) \ +/**/ + +#else + +// BOOST_MPL_ASSERT((pred)) + +#define BOOST_MPL_ASSERT(pred) \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ + std::size_t \ + , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ + boost::mpl::assertion_failed( \ + boost::mpl::assert_arg( (void (*) pred)0, 1 ) \ + ) \ + ) \ + ) \ +/**/ + +// BOOST_MPL_ASSERT_NOT((pred)) + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +# define BOOST_MPL_ASSERT_NOT(pred) \ +enum { \ + BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ + boost::mpl::assertion::failed( \ + boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \ + ) \ + ) \ +}\ +/**/ +#else +# define BOOST_MPL_ASSERT_NOT(pred) \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ + std::size_t \ + , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ + boost::mpl::assertion_failed( \ + boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \ + ) \ + ) \ + ) \ +/**/ +#endif + +#endif + +// BOOST_MPL_ASSERT_RELATION(x, ==|!=|<=|<|>=|>, y) + +#if defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES) + +# if !defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER) +// agurt, 9/nov/06: 'enum' below is a workaround for gcc 4.0.4/4.1.1 bugs #29522 and #29518 +# define BOOST_MPL_ASSERT_RELATION_IMPL(counter, x, rel, y) \ +enum { BOOST_PP_CAT(mpl_assert_rel_value,counter) = (x rel y) }; \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ + std::size_t \ + , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \ + boost::mpl::assertion_failed( \ + (boost::mpl::failed ************ ( boost::mpl::assert_relation< \ + boost::mpl::assert_::relations( sizeof( \ + boost::mpl::assert_::arg rel boost::mpl::assert_::arg \ + ) ) \ + , x \ + , y \ + >::************)) 0 ) \ + ) \ + ) \ +/**/ +# else +# define BOOST_MPL_ASSERT_RELATION_IMPL(counter, x, rel, y) \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ + std::size_t \ + , BOOST_PP_CAT(mpl_assert_rel,counter) = sizeof( \ + boost::mpl::assert_::arg rel boost::mpl::assert_::arg \ + ) \ + ); \ +BOOST_MPL_AUX_ASSERT_CONSTANT( bool, BOOST_PP_CAT(mpl_assert_rel_value,counter) = (x rel y) ); \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ + std::size_t \ + , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \ + boost::mpl::assertion_failed( \ + boost::mpl::assert_rel_arg( boost::mpl::assert_relation< \ + boost::mpl::assert_::relations(BOOST_PP_CAT(mpl_assert_rel,counter)) \ + , x \ + , y \ + >() ) \ + ) \ + ) \ + ) \ +/**/ +# endif + +# define BOOST_MPL_ASSERT_RELATION(x, rel, y) \ +BOOST_MPL_ASSERT_RELATION_IMPL(BOOST_MPL_AUX_PP_COUNTER(), x, rel, y) \ +/**/ + +#else // !BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES + +# if defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER) +# define BOOST_MPL_ASSERT_RELATION(x, rel, y) \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ + std::size_t \ + , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ + boost::mpl::assertion_failed<(x rel y)>( boost::mpl::assert_rel_arg( \ + boost::mpl::BOOST_MPL_AUX_ASSERT_RELATION(x,y,(&boost::mpl::operator rel))() \ + ) ) \ + ) \ + ) \ +/**/ +# else +# define BOOST_MPL_ASSERT_RELATION(x, rel, y) \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ + std::size_t \ + , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ + boost::mpl::assertion_failed<(x rel y)>( (boost::mpl::failed ************ ( \ + boost::mpl::BOOST_MPL_AUX_ASSERT_RELATION(x,y,(&boost::mpl::operator rel))::************))0 ) \ + ) \ + ) \ +/**/ +# endif + +#endif + + +// BOOST_MPL_ASSERT_MSG( (pred::value), USER_PROVIDED_MESSAGE, (types) ) + +#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) +# define BOOST_MPL_ASSERT_MSG_IMPL( counter, c, msg, types_ ) \ +struct msg; \ +typedef struct BOOST_PP_CAT(msg,counter) : boost::mpl::assert_ \ +{ \ + using boost::mpl::assert_::types; \ + static boost::mpl::failed ************ (msg::************ assert_arg()) types_ \ + { return 0; } \ +} BOOST_PP_CAT(mpl_assert_arg,counter); \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ + std::size_t \ + , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \ + boost::mpl::assertion<(c)>::failed( BOOST_PP_CAT(mpl_assert_arg,counter)::assert_arg() ) \ + ) \ + ) \ +/**/ +#else +# define BOOST_MPL_ASSERT_MSG_IMPL( counter, c, msg, types_ ) \ +struct msg; \ +typedef struct BOOST_PP_CAT(msg,counter) : boost::mpl::assert_ \ +{ \ + static boost::mpl::failed ************ (msg::************ assert_arg()) types_ \ + { return 0; } \ +} BOOST_PP_CAT(mpl_assert_arg,counter); \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ + std::size_t \ + , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \ + boost::mpl::assertion_failed<(c)>( BOOST_PP_CAT(mpl_assert_arg,counter)::assert_arg() ) \ + ) \ + ) \ +/**/ +#endif + +#define BOOST_MPL_ASSERT_MSG( c, msg, types_ ) \ +BOOST_MPL_ASSERT_MSG_IMPL( BOOST_MPL_AUX_PP_COUNTER(), c, msg, types_ ) \ +/**/ + +#endif // BOOST_MPL_ASSERT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/at.hpp b/ThirdParty/boost-Subset/boost/mpl/at.hpp new file mode 100644 index 0000000000..aa90e59c16 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/at.hpp @@ -0,0 +1,52 @@ + +#ifndef BOOST_MPL_AT_HPP_INCLUDED +#define BOOST_MPL_AT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(N) + > +struct at + : at_impl< typename sequence_tag::type > + ::template apply< Sequence,N > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,at,(Sequence,N)) +}; + +template< + typename Sequence + , BOOST_MPL_AUX_NTTP_DECL(long, N) + > +struct at_c + : at_impl< typename sequence_tag::type > + ::template apply< Sequence,mpl::long_ > +{ +}; + +BOOST_MPL_AUX_NA_SPEC(2, at) + +}} + +#endif // BOOST_MPL_AT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/at_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/at_fwd.hpp new file mode 100644 index 0000000000..6aaae38351 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/at_fwd.hpp @@ -0,0 +1,24 @@ + +#ifndef BOOST_MPL_AT_FWD_HPP_INCLUDED +#define BOOST_MPL_AT_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct at_impl; +template< typename Sequence, typename N > struct at; + +}} + +#endif // BOOST_MPL_AT_FWD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/O1_size_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/O1_size_impl.hpp new file mode 100644 index 0000000000..3bcbd0f787 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/O1_size_impl.hpp @@ -0,0 +1,87 @@ + +#ifndef BOOST_MPL_O1_SIZE_IMPL_HPP_INCLUDED +#define BOOST_MPL_O1_SIZE_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +// default implementation - returns 'Sequence::size' if sequence has a 'size' +// member, and -1 otherwise; conrete sequences might override it by +// specializing either the 'O1_size_impl' or the primary 'O1_size' template + +# if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ + && !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) + +namespace aux { +template< typename Sequence > struct O1_size_impl + : Sequence::size +{ +}; +} + +template< typename Tag > +struct O1_size_impl +{ + template< typename Sequence > struct apply +#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) + : if_< + aux::has_size + , aux::O1_size_impl + , long_<-1> + >::type + { +#else + { + typedef typename if_< + aux::has_size + , aux::O1_size_impl + , long_<-1> + >::type type; + + BOOST_STATIC_CONSTANT(long, value = + (if_< + aux::has_size + , aux::O1_size_impl + , long_<-1> + >::type::value) + ); +#endif + }; +}; + +# else // BOOST_MSVC + +template< typename Tag > +struct O1_size_impl +{ + template< typename Sequence > struct apply + : long_<-1> + { + }; +}; + +# endif + +}} + +#endif // BOOST_MPL_O1_SIZE_IMPL_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/adl_barrier.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/adl_barrier.hpp new file mode 100644 index 0000000000..3968c242ad --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/adl_barrier.hpp @@ -0,0 +1,48 @@ + +#ifndef BOOST_MPL_AUX_ADL_BARRIER_HPP_INCLUDED +#define BOOST_MPL_AUX_ADL_BARRIER_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE) + +# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE mpl_ +# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN namespace mpl_ { +# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE } +# define BOOST_MPL_AUX_ADL_BARRIER_DECL(type) \ + namespace boost { namespace mpl { \ + using ::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::type; \ + } } \ +/**/ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +namespace BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE { namespace aux {} } +namespace boost { namespace mpl { using namespace BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE; +namespace aux { using namespace BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::aux; } +}} +#endif + +#else // BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE + +# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE boost::mpl +# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN namespace boost { namespace mpl { +# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE }} +# define BOOST_MPL_AUX_ADL_BARRIER_DECL(type) /**/ + +#endif + +#endif // BOOST_MPL_AUX_ADL_BARRIER_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/advance_backward.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/advance_backward.hpp new file mode 100644 index 0000000000..df56793211 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/advance_backward.hpp @@ -0,0 +1,128 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_AUX778076_ADVANCE_BACKWARD_HPP_INCLUDED +#define BOOST_MPL_AUX778076_ADVANCE_BACKWARD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER advance_backward.hpp +# include + +#else + +# include +# include +# include + +# include +# include +# include + +namespace boost { namespace mpl { namespace aux { + +// forward declaration +template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct advance_backward; + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_UNROLLING, )) +# include BOOST_PP_ITERATE() + +// implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING +template< BOOST_MPL_AUX_NTTP_DECL(long, N) > +struct advance_backward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_backward + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - BOOST_MPL_LIMIT_UNROLLING) < 0 + ? 0 + : N - BOOST_MPL_LIMIT_UNROLLING + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_AUX778076_ADVANCE_BACKWARD_HPP_INCLUDED + +///// iteration, depth == 1 + +// For gcc 4.4 compatability, we must include the +// BOOST_PP_ITERATION_DEPTH test inside an #else clause. +#else // BOOST_PP_IS_ITERATING +#if BOOST_PP_ITERATION_DEPTH() == 1 +#define i_ BOOST_PP_FRAME_ITERATION(1) + +template<> +struct advance_backward< BOOST_PP_FRAME_ITERATION(1) > +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + +#if i_ > 0 +# define BOOST_PP_ITERATION_PARAMS_2 \ + (3,(1, BOOST_PP_FRAME_ITERATION(1), )) +# include BOOST_PP_ITERATE() +#endif + + typedef BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(1)) type; + }; + +#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) + /// ETI workaround + template<> struct apply + { + typedef int type; + }; +#endif +}; + +#undef i_ + +///// iteration, depth == 2 + +#elif BOOST_PP_ITERATION_DEPTH() == 2 + +# define AUX778076_ITER_0 BOOST_PP_CAT(iter,BOOST_PP_DEC(BOOST_PP_FRAME_ITERATION(2))) +# define AUX778076_ITER_1 BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(2)) + + typedef typename prior::type AUX778076_ITER_1; + +# undef AUX778076_ITER_1 +# undef AUX778076_ITER_0 + +#endif // BOOST_PP_ITERATION_DEPTH() +#endif // BOOST_PP_IS_ITERATING diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/advance_forward.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/advance_forward.hpp new file mode 100644 index 0000000000..62b0101c67 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/advance_forward.hpp @@ -0,0 +1,127 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_AUX_ADVANCE_FORWARD_HPP_INCLUDED +#define BOOST_MPL_AUX_ADVANCE_FORWARD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER advance_forward.hpp +# include + +#else + +# include +# include +# include + +# include +# include +# include + +namespace boost { namespace mpl { namespace aux { + +// forward declaration +template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct advance_forward; + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_UNROLLING, )) +# include BOOST_PP_ITERATE() + +// implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING +template< BOOST_MPL_AUX_NTTP_DECL(long, N) > +struct advance_forward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_forward + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - BOOST_MPL_LIMIT_UNROLLING) < 0 + ? 0 + : N - BOOST_MPL_LIMIT_UNROLLING + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_AUX_ADVANCE_FORWARD_HPP_INCLUDED + +///// iteration, depth == 1 + +// For gcc 4.4 compatability, we must include the +// BOOST_PP_ITERATION_DEPTH test inside an #else clause. +#else // BOOST_PP_IS_ITERATING +#if BOOST_PP_ITERATION_DEPTH() == 1 +#define i_ BOOST_PP_FRAME_ITERATION(1) + +template<> +struct advance_forward< BOOST_PP_FRAME_ITERATION(1) > +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + +#if i_ > 0 +# define BOOST_PP_ITERATION_PARAMS_2 \ + (3,(1, i_, )) +# include BOOST_PP_ITERATE() +#endif + typedef BOOST_PP_CAT(iter,i_) type; + }; + +#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) + /// ETI workaround + template<> struct apply + { + typedef int type; + }; +#endif +}; + +#undef i_ + +///// iteration, depth == 2 + +#elif BOOST_PP_ITERATION_DEPTH() == 2 + +# define AUX778076_ITER_0 BOOST_PP_CAT(iter,BOOST_PP_DEC(BOOST_PP_FRAME_ITERATION(2))) +# define AUX778076_ITER_1 BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(2)) + + typedef typename next::type AUX778076_ITER_1; + +# undef AUX778076_ITER_1 +# undef AUX778076_ITER_0 + +#endif // BOOST_PP_ITERATION_DEPTH() +#endif // BOOST_PP_IS_ITERATING diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/arg_typedef.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/arg_typedef.hpp new file mode 100644 index 0000000000..362db16006 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/arg_typedef.hpp @@ -0,0 +1,31 @@ + +#ifndef BOOST_MPL_AUX_ARG_TYPEDEF_HPP_INCLUDED +#define BOOST_MPL_AUX_ARG_TYPEDEF_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +#if defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) \ + || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) + +# define BOOST_MPL_AUX_ARG_TYPEDEF(T, name) typedef T name; + +#else + +# define BOOST_MPL_AUX_ARG_TYPEDEF(T, name) /**/ + +#endif + +#endif // BOOST_MPL_AUX_ARG_TYPEDEF_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/arithmetic_op.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/arithmetic_op.hpp new file mode 100644 index 0000000000..0171db5db6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/arithmetic_op.hpp @@ -0,0 +1,92 @@ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include +#endif + +#if !defined(AUX778076_OP_PREFIX) +# define AUX778076_OP_PREFIX AUX778076_OP_NAME +#endif + +#include +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER AUX778076_OP_PREFIX.hpp +# include + +#else + +# include +# include + + +namespace boost { namespace mpl { + +#if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC) +namespace aux { +template< typename T, T n1, T n2 > +struct BOOST_PP_CAT(AUX778076_OP_PREFIX,_wknd) +{ + BOOST_STATIC_CONSTANT(T, value = (n1 AUX778076_OP_TOKEN n2)); + typedef integral_c type; +}; +} +#endif + +template<> +struct AUX778076_OP_IMPL_NAME +{ + template< typename N1, typename N2 > struct apply +#if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC) + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + AUX778076_OP_TOKEN BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > +#else + : aux::BOOST_PP_CAT(AUX778076_OP_PREFIX,_wknd)< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type +#endif + { + }; +}; + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#undef AUX778076_OP_TAG_NAME +#undef AUX778076_OP_IMPL_NAME +#undef AUX778076_OP_ARITY +#undef AUX778076_OP_PREFIX +#undef AUX778076_OP_NAME +#undef AUX778076_OP_TOKEN diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/arity.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/arity.hpp new file mode 100644 index 0000000000..d13ab4aded --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/arity.hpp @@ -0,0 +1,39 @@ + +#ifndef BOOST_MPL_AUX_ARITY_HPP_INCLUDED +#define BOOST_MPL_AUX_ARITY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) + +# include +# include + +namespace boost { namespace mpl { namespace aux { + +// agurt, 15/mar/02: it's possible to implement the template so that it will +// "just work" and do not require any specialization, but not on the compilers +// that require the arity workaround in the first place +template< typename F, BOOST_MPL_AUX_NTTP_DECL(int, N) > +struct arity +{ + BOOST_STATIC_CONSTANT(int, value = N); +}; + +}}} + +#endif // BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES + +#endif // BOOST_MPL_AUX_ARITY_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/arity_spec.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/arity_spec.hpp new file mode 100644 index 0000000000..7c8221428d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/arity_spec.hpp @@ -0,0 +1,67 @@ + +#ifndef BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED +#define BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +# define BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,type,name) \ +namespace aux { \ +template< BOOST_MPL_AUX_NTTP_DECL(int, N), BOOST_MPL_PP_PARAMS(i,type T) > \ +struct arity< \ + name< BOOST_MPL_PP_PARAMS(i,T) > \ + , N \ + > \ +{ \ + BOOST_STATIC_CONSTANT(int \ + , value = BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ + ); \ +}; \ +} \ +/**/ +#else +# define BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,type,name) /**/ +#endif + +# define BOOST_MPL_AUX_ARITY_SPEC(i,name) \ + BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,typename,name) \ +/**/ + + +#if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \ + && !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) +# define BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(i, name) \ +namespace aux { \ +template< BOOST_MPL_PP_PARAMS(i,typename T) > \ +struct template_arity< name > \ + : int_ \ +{ \ +}; \ +} \ +/**/ +#else +# define BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(i, name) /**/ +#endif + + +#endif // BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/at_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/at_impl.hpp new file mode 100644 index 0000000000..923937480e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/at_impl.hpp @@ -0,0 +1,45 @@ + +#ifndef BOOST_MPL_AUX_AT_IMPL_HPP_INCLUDED +#define BOOST_MPL_AUX_AT_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include + +namespace boost { namespace mpl { + +// default implementation; conrete sequences might override it by +// specializing either the 'at_impl' or the primary 'at' template + +template< typename Tag > +struct at_impl +{ + template< typename Sequence, typename N > struct apply + { + typedef typename advance< + typename begin::type + , N + >::type iter_; + + typedef typename deref::type type; + }; +}; + +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2, at_impl) + +}} + +#endif // BOOST_MPL_AUX_AT_IMPL_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/begin_end_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/begin_end_impl.hpp new file mode 100644 index 0000000000..58b70dd101 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/begin_end_impl.hpp @@ -0,0 +1,101 @@ + +#ifndef BOOST_MPL_AUX_BEGIN_END_IMPL_HPP_INCLUDED +#define BOOST_MPL_AUX_BEGIN_END_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + + +namespace aux { + +template< typename Sequence > +struct begin_type +{ + typedef typename Sequence::begin type; +}; +template< typename Sequence > +struct end_type +{ + typedef typename Sequence::end type; +}; + +} + +// default implementation; conrete sequences might override it by +// specializing either the 'begin_impl/end_impl' or the primary +// 'begin/end' templates + +template< typename Tag > +struct begin_impl +{ + template< typename Sequence > struct apply + { + typedef typename eval_if, + aux::begin_type, void_>::type type; + }; +}; + +template< typename Tag > +struct end_impl +{ + template< typename Sequence > struct apply + { + typedef typename eval_if, + aux::end_type, void_>::type type; + }; +}; + +// specialize 'begin_trait/end_trait' for two pre-defined tags + +# define AUX778076_IMPL_SPEC(name, tag, result) \ +template<> \ +struct name##_impl \ +{ \ + template< typename Sequence > struct apply \ + { \ + typedef result type; \ + }; \ +}; \ +/**/ + +// a sequence with nested 'begin/end' typedefs; just query them +AUX778076_IMPL_SPEC(begin, nested_begin_end_tag, typename Sequence::begin) +AUX778076_IMPL_SPEC(end, nested_begin_end_tag, typename Sequence::end) + +// if a type 'T' does not contain 'begin/end' or 'tag' members +// and doesn't specialize either 'begin/end' or 'begin_impl/end_impl' +// templates, then we end up here +AUX778076_IMPL_SPEC(begin, non_sequence_tag, void_) +AUX778076_IMPL_SPEC(end, non_sequence_tag, void_) +AUX778076_IMPL_SPEC(begin, na, void_) +AUX778076_IMPL_SPEC(end, na, void_) + +# undef AUX778076_IMPL_SPEC + + +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(1,begin_impl) +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(1,end_impl) + +}} + +#endif // BOOST_MPL_AUX_BEGIN_END_IMPL_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/clear_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/clear_impl.hpp new file mode 100644 index 0000000000..20b270c0ce --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/clear_impl.hpp @@ -0,0 +1,35 @@ + +#ifndef BOOST_MPL_AUX_CLEAR_IMPL_HPP_INCLUDED +#define BOOST_MPL_AUX_CLEAR_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +namespace boost { namespace mpl { + +// no default implementation; the definition is needed to make MSVC happy + +template< typename Tag > +struct clear_impl +{ + template< typename Sequence > struct apply; +}; + +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, clear_impl) + +}} + +#endif // BOOST_MPL_AUX_CLEAR_IMPL_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/common_name_wknd.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/common_name_wknd.hpp new file mode 100644 index 0000000000..00758b243e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/common_name_wknd.hpp @@ -0,0 +1,34 @@ + +#ifndef BOOST_MPL_AUX_COMMON_NAME_WKND_HPP_INCLUDED +#define BOOST_MPL_AUX_COMMON_NAME_WKND_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if BOOST_WORKAROUND(__BORLANDC__, < 0x561) +// agurt, 12/nov/02: to suppress the bogus "Cannot have both a template class +// and function named 'xxx'" diagnostic +# define BOOST_MPL_AUX_COMMON_NAME_WKND(name) \ +namespace name_##wknd { \ +template< typename > void name(); \ +} \ +/**/ + +#else + +# define BOOST_MPL_AUX_COMMON_NAME_WKND(name) /**/ + +#endif // __BORLANDC__ + +#endif // BOOST_MPL_AUX_COMMON_NAME_WKND_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/comparison_op.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/comparison_op.hpp new file mode 100644 index 0000000000..2df72d300a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/comparison_op.hpp @@ -0,0 +1,83 @@ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +#endif + +#if !defined(AUX778076_OP_PREFIX) +# define AUX778076_OP_PREFIX AUX778076_OP_NAME +#endif + +#define AUX778076_OP_ARITY 2 + +#include +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER AUX778076_OP_PREFIX.hpp +# include + +#else + +# include +# include + +namespace boost { namespace mpl { + +// MSVC workaround: implement less in terms of greater +#if 0 AUX778076_OP_TOKEN 1 && !(1 AUX778076_OP_TOKEN 0) && !(0 AUX778076_OP_TOKEN 0) +# define AUX778076_OP(N1, N2) \ + ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) \ +/**/ +#else +# define AUX778076_OP(N1, N2) \ + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value \ + AUX778076_OP_TOKEN BOOST_MPL_AUX_VALUE_WKND(N2)::value \ + ) \ +/**/ +#endif + +template<> +struct AUX778076_OP_IMPL_NAME +{ + template< typename N1, typename N2 > struct apply +#if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC) + : bool_< AUX778076_OP(N1, N2) > + { +#else + { + BOOST_STATIC_CONSTANT(bool, value = AUX778076_OP(N1, N2)); + typedef bool_ type; +#endif + }; +}; + +#undef AUX778076_OP + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#undef AUX778076_OP_TAG_NAME +#undef AUX778076_OP_IMPL_NAME +#undef AUX778076_OP_ARITY +#undef AUX778076_OP_PREFIX +#undef AUX778076_OP_NAME +#undef AUX778076_OP_TOKEN diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/adl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/adl.hpp new file mode 100644 index 0000000000..e9bdf1156b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/adl.hpp @@ -0,0 +1,40 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_ADL_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_ADL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include + +// agurt, 25/apr/04: technically, the ADL workaround is only needed for GCC, +// but putting everything expect public, user-specializable metafunctions into +// a separate global namespace has a nice side effect of reducing the length +// of template instantiation symbols, so we apply the workaround on all +// platforms that can handle it + +#if !defined(BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE) \ + && ( BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ + || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) \ + || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) \ + || BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, BOOST_TESTED_AT(810)) \ + ) + +# define BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_ADL_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/arrays.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/arrays.hpp new file mode 100644 index 0000000000..a9ea68ad67 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/arrays.hpp @@ -0,0 +1,30 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_ARRAYS_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_ARRAYS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && ( BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ + || BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ + ) + +# define BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_ARRAYS_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/bcc.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/bcc.hpp new file mode 100644 index 0000000000..fe4941a598 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/bcc.hpp @@ -0,0 +1,28 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_BCC_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_BCC_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2008 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date: 2004-09-02 10:41:37 -0500 (Thu, 02 Sep 2004) $ +// $Revision: 24874 $ + +#include + +#if !defined(BOOST_MPL_CFG_BCC590_WORKAROUNDS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && BOOST_WORKAROUND(__BORLANDC__, >= 0x590) \ + && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) + +# define BOOST_MPL_CFG_BCC590_WORKAROUNDS + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_BCC_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/bind.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/bind.hpp new file mode 100644 index 0000000000..10bcb94b8b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/bind.hpp @@ -0,0 +1,33 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED + +// Copyright David Abrahams 2002 +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && ( BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ + ) + +# define BOOST_MPL_CFG_NO_BIND_TEMPLATE + +#endif + +//#define BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT + +#endif // BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/compiler.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/compiler.hpp new file mode 100644 index 0000000000..7d3e3b6622 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/compiler.hpp @@ -0,0 +1,66 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_COMPILER_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_COMPILER_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2008 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_CFG_COMPILER_DIR) + +# include +# include +# include +# include +# include +# include + +# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +# define BOOST_MPL_CFG_COMPILER_DIR msvc60 + +# elif BOOST_WORKAROUND(BOOST_MSVC, == 1300) +# define BOOST_MPL_CFG_COMPILER_DIR msvc70 + +# elif BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) +# define BOOST_MPL_CFG_COMPILER_DIR gcc + +# elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) +# if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +# define BOOST_MPL_CFG_COMPILER_DIR bcc551 +# elif BOOST_WORKAROUND(__BORLANDC__, >= 0x590) +# define BOOST_MPL_CFG_COMPILER_DIR bcc +# else +# define BOOST_MPL_CFG_COMPILER_DIR bcc_pre590 +# endif + +# elif BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +# define BOOST_MPL_CFG_COMPILER_DIR dmc + +# elif defined(__MWERKS__) +# if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +# define BOOST_MPL_CFG_COMPILER_DIR mwcw +# else +# define BOOST_MPL_CFG_COMPILER_DIR plain +# endif + +# elif defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +# define BOOST_MPL_CFG_COMPILER_DIR no_ctps + +# elif defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) +# define BOOST_MPL_CFG_COMPILER_DIR no_ttp + +# else +# define BOOST_MPL_CFG_COMPILER_DIR plain +# endif + +#endif // BOOST_MPL_CFG_COMPILER_DIR + +#endif // BOOST_MPL_AUX_CONFIG_COMPILER_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/ctps.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/ctps.hpp new file mode 100644 index 0000000000..af78f47ffd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/ctps.hpp @@ -0,0 +1,30 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_CTPS_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_CTPS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && BOOST_WORKAROUND(__BORLANDC__, < 0x582) + +# define BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC + +#endif + +// BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION is defined in + +#endif // BOOST_MPL_AUX_CONFIG_CTPS_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/dependent_nttp.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/dependent_nttp.hpp new file mode 100644 index 0000000000..5c2e24dbbd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/dependent_nttp.hpp @@ -0,0 +1,35 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_DEPENDENT_NTTP_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_DEPENDENT_NTTP_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +// GCC and EDG-based compilers incorrectly reject the following code: +// template< typename T, T n > struct a; +// template< typename T > struct b; +// template< typename T, T n > struct b< a > {}; + +#if !defined(BOOST_MPL_CFG_NO_DEPENDENT_NONTYPE_PARAMETER_IN_PARTIAL_SPEC) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && ( BOOST_WORKAROUND(__EDG_VERSION__, BOOST_TESTED_AT(300)) \ + || BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0302)) \ + ) + +# define BOOST_MPL_CFG_NO_DEPENDENT_NONTYPE_PARAMETER_IN_PARTIAL_SPEC + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_DEPENDENT_NTTP_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp new file mode 100644 index 0000000000..9f8ea8c67f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp @@ -0,0 +1,27 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_DMC_AMBIGUOUS_CTPS_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_DMC_AMBIGUOUS_CTPS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if !defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) + +# define BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_DMC_AMBIGUOUS_CTPS_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/dtp.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/dtp.hpp new file mode 100644 index 0000000000..4379b6b2fc --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/dtp.hpp @@ -0,0 +1,46 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_DTP_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_DTP_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +// MWCW 7.x-8.0 "losts" default template parameters of nested class +// templates when their owner classes are passed as arguments to other +// templates; Borland 5.5.1 "forgets" them from the very beginning (if +// the owner class is a class template), and Borland 5.6 isn't even +// able to compile a definition of nested class template with DTP + +#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && BOOST_WORKAROUND(__BORLANDC__, >= 0x560) \ + && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) + +# define BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES + +#endif + + +#if !defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && ( BOOST_WORKAROUND(__MWERKS__, <= 0x3001) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ + || defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) \ + ) + +# define BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_DTP_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/eti.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/eti.hpp new file mode 100644 index 0000000000..519d433d35 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/eti.hpp @@ -0,0 +1,47 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +// flags for MSVC 6.5's so-called "early template instantiation bug" +#if !defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && BOOST_WORKAROUND(BOOST_MSVC, < 1300) + +# define BOOST_MPL_CFG_MSVC_60_ETI_BUG + +#endif + +#if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && BOOST_WORKAROUND(BOOST_MSVC, == 1300) + +# define BOOST_MPL_CFG_MSVC_70_ETI_BUG + +#endif + +#if !defined(BOOST_MPL_CFG_MSVC_ETI_BUG) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && ( defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) \ + || defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) \ + ) + +# define BOOST_MPL_CFG_MSVC_ETI_BUG + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/forwarding.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/forwarding.hpp new file mode 100644 index 0000000000..b4296ad961 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/forwarding.hpp @@ -0,0 +1,27 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_FORWARDING_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_FORWARDING_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) + +# define BOOST_MPL_CFG_NO_NESTED_FORWARDING + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_FORWARDING_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/gcc.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/gcc.hpp new file mode 100644 index 0000000000..080495de17 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/gcc.hpp @@ -0,0 +1,23 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_GCC_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_GCC_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if defined(__GNUC__) && !defined(__EDG_VERSION__) +# define BOOST_MPL_CFG_GCC ((__GNUC__ << 8) | __GNUC_MINOR__) +#else +# define BOOST_MPL_CFG_GCC 0 +#endif + +#endif // BOOST_MPL_AUX_CONFIG_GCC_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/gpu.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/gpu.hpp new file mode 100644 index 0000000000..0e5ed784c4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/gpu.hpp @@ -0,0 +1,35 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_GPU_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_GPU_HPP_INCLUDED + +// Copyright Eric Niebler 2014 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if !defined(BOOST_MPL_CFG_GPU_ENABLED) \ + +# define BOOST_MPL_CFG_GPU_ENABLED BOOST_GPU_ENABLED + +#endif + +#if defined __CUDACC__ + +# define BOOST_MPL_CFG_GPU 1 + +#else + +# define BOOST_MPL_CFG_GPU 0 + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_GPU_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/has_apply.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/has_apply.hpp new file mode 100644 index 0000000000..4dc01c6647 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/has_apply.hpp @@ -0,0 +1,32 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_HAS_APPLY_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_HAS_APPLY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_HAS_APPLY) \ + && ( defined(BOOST_MPL_CFG_NO_HAS_XXX) \ + || BOOST_WORKAROUND(__EDG_VERSION__, < 300) \ + || BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ + || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) \ + ) + +# define BOOST_MPL_CFG_NO_HAS_APPLY + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_HAS_APPLY_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/has_xxx.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/has_xxx.hpp new file mode 100644 index 0000000000..b0f2f8c23e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/has_xxx.hpp @@ -0,0 +1,34 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_HAS_XXX_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_HAS_XXX_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// Copyright David Abrahams 2002-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +// agurt, 11/jan/03: signals a stub-only 'has_xxx' implementation + +#if !defined(BOOST_MPL_CFG_NO_HAS_XXX) \ + && ( defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION) \ + || BOOST_WORKAROUND(__GNUC__, <= 2) \ + || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) \ + ) + +# define BOOST_MPL_CFG_NO_HAS_XXX +# define BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_HAS_XXX_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/integral.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/integral.hpp new file mode 100644 index 0000000000..144542d9c3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/integral.hpp @@ -0,0 +1,38 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_INTEGRAL_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_INTEGRAL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +#if !defined(BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) + +# define BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS + +#endif + +#if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && ( BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ + || BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \ + ) + +# define BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_INTEGRAL_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/intel.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/intel.hpp new file mode 100644 index 0000000000..5bd9159173 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/intel.hpp @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_INTEL_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_INTEL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + + +// BOOST_INTEL_CXX_VERSION is defined here: +#include + +#endif // BOOST_MPL_AUX_CONFIG_INTEL_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/lambda.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/lambda.hpp new file mode 100644 index 0000000000..93fbafe071 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/lambda.hpp @@ -0,0 +1,32 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_LAMBDA_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_LAMBDA_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +// agurt, 15/jan/02: full-fledged implementation requires both +// template template parameters _and_ partial specialization + +#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) \ + && ( defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) \ + || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + ) + +# define BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_LAMBDA_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/msvc.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/msvc.hpp new file mode 100644 index 0000000000..8a6b924627 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/msvc.hpp @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_MSVC_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_MSVC_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + + +// BOOST_MSVC is defined here: +#include + +#endif // BOOST_MPL_AUX_CONFIG_MSVC_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/msvc_typename.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/msvc_typename.hpp new file mode 100644 index 0000000000..feedc16db8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/msvc_typename.hpp @@ -0,0 +1,26 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_MSVC_TYPENAME_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_MSVC_TYPENAME_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +# define BOOST_MSVC_TYPENAME +#else +# define BOOST_MSVC_TYPENAME typename +#endif + +#endif // BOOST_MPL_AUX_CONFIG_MSVC_TYPENAME_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/nttp.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/nttp.hpp new file mode 100644 index 0000000000..11125a9bff --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/nttp.hpp @@ -0,0 +1,41 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +// MSVC 6.5 ICE-s on the code as simple as this (see "aux_/nttp_decl.hpp" +// for a workaround): +// +// namespace std { +// template< typename Char > struct string; +// } +// +// void foo(std::string); +// +// namespace boost { namespace mpl { +// template< int > struct arg; +// }} + +#if !defined(BOOST_MPL_CFG_NTTP_BUG) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && BOOST_WORKAROUND(BOOST_MSVC, < 1300) + +# define BOOST_MPL_CFG_NTTP_BUG + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/overload_resolution.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/overload_resolution.hpp new file mode 100644 index 0000000000..61e4486e9b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/overload_resolution.hpp @@ -0,0 +1,29 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if !defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && ( BOOST_WORKAROUND(__BORLANDC__, < 0x590) \ + || BOOST_WORKAROUND(__MWERKS__, < 0x3001) \ + ) + +# define BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/pp_counter.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/pp_counter.hpp new file mode 100644 index 0000000000..e7fb8d66c6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/pp_counter.hpp @@ -0,0 +1,26 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_PP_COUNTER_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_PP_COUNTER_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2006 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_AUX_PP_COUNTER) +# include +# if BOOST_WORKAROUND(BOOST_MSVC, >= 1300) +# define BOOST_MPL_AUX_PP_COUNTER() __COUNTER__ +# else +# define BOOST_MPL_AUX_PP_COUNTER() __LINE__ +# endif +#endif + +#endif // BOOST_MPL_AUX_CONFIG_PP_COUNTER_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/preprocessor.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/preprocessor.hpp new file mode 100644 index 0000000000..82ebc68fe0 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/preprocessor.hpp @@ -0,0 +1,39 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if !defined(BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION) \ + && ( BOOST_WORKAROUND(__MWERKS__, <= 0x3003) \ + || BOOST_WORKAROUND(__BORLANDC__, < 0x582) \ + || BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(502)) \ + ) + +# define BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION + +#endif + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) +# define BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES +#endif + +#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) \ + && BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +# define BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING +#endif + + +#endif // BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/static_constant.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/static_constant.hpp new file mode 100644 index 0000000000..ece38fb0e9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/static_constant.hpp @@ -0,0 +1,25 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_STATIC_CONSTANT_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_STATIC_CONSTANT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +// BOOST_STATIC_CONSTANT is defined here: +# include +#else +// undef the macro for the preprocessing mode +# undef BOOST_STATIC_CONSTANT +#endif + +#endif // BOOST_MPL_AUX_CONFIG_STATIC_CONSTANT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/ttp.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/ttp.hpp new file mode 100644 index 0000000000..3aff3f84df --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/ttp.hpp @@ -0,0 +1,41 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_TTP_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_TTP_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) \ + && ( defined(BOOST_NO_TEMPLATE_TEMPLATES) \ + || BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x590) ) \ + ) + +# define BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS + +#endif + + +#if !defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0302)) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ + ) + +# define BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_TTP_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/typeof.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/typeof.hpp new file mode 100644 index 0000000000..cde6179c67 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/typeof.hpp @@ -0,0 +1,38 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_TYPEOF_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_TYPEOF_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if !defined(BOOST_MPL_CFG_HAS_TYPEOF) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && ( defined(BOOST_MPL_CFG_GCC) && BOOST_MPL_CFG_GCC >= 0x0302 \ + || defined(__MWERKS__) && __MWERKS__ >= 0x3000 \ + ) + +# define BOOST_MPL_CFG_HAS_TYPEOF + +#endif + + +#if !defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && defined(BOOST_MPL_CFG_HAS_TYPEOF) + +# define BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_TYPEOF_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/use_preprocessed.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/use_preprocessed.hpp new file mode 100644 index 0000000000..8fd5c60755 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/use_preprocessed.hpp @@ -0,0 +1,19 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +// #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/config/workaround.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/config/workaround.hpp new file mode 100644 index 0000000000..82c632982d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/config/workaround.hpp @@ -0,0 +1,19 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#endif // BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/contains_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/contains_impl.hpp new file mode 100644 index 0000000000..b80caeafed --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/contains_impl.hpp @@ -0,0 +1,61 @@ + +#ifndef BOOST_MPL_AUX_CONTAINS_IMPL_HPP_INCLUDED +#define BOOST_MPL_AUX_CONTAINS_IMPL_HPP_INCLUDED + +// Copyright Eric Friedman 2002 +// Copyright Aleksey Gurtovoy 2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace boost { namespace mpl { + +template< typename Tag > +struct contains_impl +{ + template< typename Sequence, typename T > struct apply +#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) + : not_< is_same< + typename find::type + , typename end::type + > > + { +#else + { + typedef not_< is_same< + typename find::type + , typename end::type + > > type; + + BOOST_STATIC_CONSTANT(bool, value = + (not_< is_same< + typename find::type + , typename end::type + > >::value) + ); +#endif + }; +}; + +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2,contains_impl) + +}} + +#endif // BOOST_MPL_AUX_CONTAINS_IMPL_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/count_args.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/count_args.hpp new file mode 100644 index 0000000000..b432d370eb --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/count_args.hpp @@ -0,0 +1,105 @@ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +#if !defined(AUX778076_COUNT_ARGS_PARAM_NAME) +# define AUX778076_COUNT_ARGS_PARAM_NAME T +#endif + +#if !defined(AUX778076_COUNT_ARGS_TEMPLATE_PARAM) +# define AUX778076_COUNT_ARGS_TEMPLATE_PARAM typename AUX778076_COUNT_ARGS_PARAM_NAME +#endif + +// local macros, #undef-ined at the end of the header + +#if !defined(AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES) + +# include +# include + +# define AUX778076_COUNT_ARGS_REPEAT BOOST_MPL_PP_REPEAT +# define AUX778076_COUNT_ARGS_PARAMS(param) \ + BOOST_MPL_PP_PARAMS( \ + AUX778076_COUNT_ARGS_ARITY \ + , param \ + ) \ + /**/ + +#else + +# include +# include +# include + +# define AUX778076_COUNT_ARGS_REPEAT BOOST_PP_REPEAT +# define AUX778076_COUNT_ARGS_PARAMS(param) \ + BOOST_PP_ENUM_SHIFTED_PARAMS( \ + BOOST_PP_INC(AUX778076_COUNT_ARGS_ARITY) \ + , param \ + ) \ + /**/ + +#endif // AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES + + +#define AUX778076_IS_ARG_TEMPLATE_NAME \ + BOOST_PP_CAT(is_,BOOST_PP_CAT(AUX778076_COUNT_ARGS_PREFIX,_arg)) \ +/**/ + +#define AUX778076_COUNT_ARGS_FUNC(unused, i, param) \ + BOOST_PP_EXPR_IF(i, +) \ + AUX778076_IS_ARG_TEMPLATE_NAME::value \ +/**/ + +// is__arg +template< AUX778076_COUNT_ARGS_TEMPLATE_PARAM > +struct AUX778076_IS_ARG_TEMPLATE_NAME +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct AUX778076_IS_ARG_TEMPLATE_NAME +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +// _count_args +template< + AUX778076_COUNT_ARGS_PARAMS(AUX778076_COUNT_ARGS_TEMPLATE_PARAM) + > +struct BOOST_PP_CAT(AUX778076_COUNT_ARGS_PREFIX,_count_args) +{ + BOOST_STATIC_CONSTANT(int, value = AUX778076_COUNT_ARGS_REPEAT( + AUX778076_COUNT_ARGS_ARITY + , AUX778076_COUNT_ARGS_FUNC + , AUX778076_COUNT_ARGS_PARAM_NAME + )); +}; + +#undef AUX778076_COUNT_ARGS_FUNC +#undef AUX778076_IS_ARG_TEMPLATE_NAME +#undef AUX778076_COUNT_ARGS_PARAMS +#undef AUX778076_COUNT_ARGS_REPEAT + +#undef AUX778076_COUNT_ARGS_ARITY +#undef AUX778076_COUNT_ARGS_DEFAULT +#undef AUX778076_COUNT_ARGS_PREFIX +#undef AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES +#undef AUX778076_COUNT_ARGS_TEMPLATE_PARAM +#undef AUX778076_COUNT_ARGS_PARAM_NAME diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/find_if_pred.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/find_if_pred.hpp new file mode 100644 index 0000000000..c07d89d6c7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/find_if_pred.hpp @@ -0,0 +1,31 @@ + +#ifndef BOOST_MPL_AUX_FIND_IF_PRED_HPP_INCLUDED +#define BOOST_MPL_AUX_FIND_IF_PRED_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Eric Friedman 2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +#include +#include + +namespace boost { namespace mpl { namespace aux { + +template< typename Predicate > +struct find_if_pred +{ + template< typename Iterator > + struct apply + { + typedef not_< aux::iter_apply1 > type; + }; +}; + +}}} + +#endif // BOOST_MPL_AUX_FIND_IF_PRED_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/fold_impl.hpp new file mode 100644 index 0000000000..97c88c5b29 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/fold_impl.hpp @@ -0,0 +1,43 @@ + +#ifndef BOOST_MPL_AUX_FOLD_IMPL_HPP_INCLUDED +#define BOOST_MPL_AUX_FOLD_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include +# include +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +# include +# include +# endif +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER fold_impl.hpp +# include + +#else + +# define AUX778076_FOLD_IMPL_OP(iter) typename deref::type +# define AUX778076_FOLD_IMPL_NAME_PREFIX fold +# include + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_AUX_FOLD_IMPL_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/fold_impl_body.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/fold_impl_body.hpp new file mode 100644 index 0000000000..02dd645f72 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/fold_impl_body.hpp @@ -0,0 +1,365 @@ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +#if !defined(BOOST_PP_IS_ITERATING) + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +# include +# include +# include +# include +# include +# include + +# include +# include +# include + +// local macros, #undef-ined at the end of the header + +# define AUX778076_ITER_FOLD_STEP(unused, i, unused2) \ + typedef typename apply2< \ + ForwardOp \ + , BOOST_PP_CAT(state,i) \ + , AUX778076_FOLD_IMPL_OP(BOOST_PP_CAT(iter,i)) \ + >::type BOOST_PP_CAT(state,BOOST_PP_INC(i)); \ + typedef typename mpl::next::type \ + BOOST_PP_CAT(iter,BOOST_PP_INC(i)); \ + /**/ + +# define AUX778076_FOLD_IMPL_NAME \ + BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_impl) \ + /**/ + +# define AUX778076_FOLD_CHUNK_NAME \ + BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_chunk) \ + /**/ + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration +template< + BOOST_MPL_AUX_NTTP_DECL(int, N) + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct AUX778076_FOLD_IMPL_NAME; + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +# if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_UNROLLING, )) +# include BOOST_PP_ITERATE() + +// implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING +template< + BOOST_MPL_AUX_NTTP_DECL(int, N) + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct AUX778076_FOLD_IMPL_NAME +{ + typedef AUX778076_FOLD_IMPL_NAME< + BOOST_MPL_LIMIT_UNROLLING + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef AUX778076_FOLD_IMPL_NAME< + ( (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 : N - BOOST_MPL_LIMIT_UNROLLING ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +// fallback implementation for sequences of unknown size +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct AUX778076_FOLD_IMPL_NAME<-1,First,Last,State,ForwardOp> + : AUX778076_FOLD_IMPL_NAME< + -1 + , typename mpl::next::type + , Last + , typename apply2::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct AUX778076_FOLD_IMPL_NAME<-1,Last,Last,State,ForwardOp> +{ + typedef State state; + typedef Last iterator; +}; + +# else // BOOST_WORKAROUND(__BORLANDC__, < 0x600) + +// Borland have some serious problems with the unrolled version, so +// we always use a basic implementation +template< + BOOST_MPL_AUX_NTTP_DECL(int, N) + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct AUX778076_FOLD_IMPL_NAME +{ + typedef AUX778076_FOLD_IMPL_NAME< + -1 + , typename mpl::next::type + , Last + , typename apply2::type + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + typedef state type; +}; + +template< + BOOST_MPL_AUX_NTTP_DECL(int, N) + , typename Last + , typename State + , typename ForwardOp + > +struct AUX778076_FOLD_IMPL_NAME +{ + typedef State state; + typedef Last iterator; + typedef state type; +}; + +# endif // BOOST_WORKAROUND(__BORLANDC__, < 0x600) + +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > +struct AUX778076_FOLD_CHUNK_NAME; + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_UNROLLING, )) +# include BOOST_PP_ITERATE() + +// implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > +struct AUX778076_FOLD_CHUNK_NAME +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef AUX778076_FOLD_IMPL_NAME< + BOOST_MPL_LIMIT_UNROLLING + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef AUX778076_FOLD_IMPL_NAME< + ( (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 : N - BOOST_MPL_LIMIT_UNROLLING ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +// fallback implementation for sequences of unknown size +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step); + +template< + typename Last + , typename State + > +struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_null_step) +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct AUX778076_FOLD_CHUNK_NAME<-1> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same::type + , BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_null_step) + , BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step) + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; + +#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) + /// ETI workaround + template<> struct result_ + { + typedef int state; + typedef int iterator; + }; +#endif +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step) +{ + // can't inherit here - it breaks MSVC 7.0 + typedef AUX778076_FOLD_CHUNK_NAME<-1>::template result_< + typename mpl::next::type + , Last + , typename apply2::type + , ForwardOp + > chunk_; + + typedef typename chunk_::state state; + typedef typename chunk_::iterator iterator; +}; + +template< + BOOST_MPL_AUX_NTTP_DECL(int, N) + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct AUX778076_FOLD_IMPL_NAME + : AUX778076_FOLD_CHUNK_NAME + ::template result_ +{ +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +}}} + +# undef AUX778076_FOLD_IMPL_NAME +# undef AUX778076_FOLD_CHUNK_NAME +# undef AUX778076_ITER_FOLD_STEP + +#undef AUX778076_FOLD_IMPL_OP +#undef AUX778076_FOLD_IMPL_NAME_PREFIX + +///// iteration + +#else + +# define n_ BOOST_PP_FRAME_ITERATION(1) + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct AUX778076_FOLD_IMPL_NAME +{ + typedef First iter0; + typedef State state0; + + BOOST_MPL_PP_REPEAT(n_, AUX778076_ITER_FOLD_STEP, unused) + + typedef BOOST_PP_CAT(state,n_) state; + typedef BOOST_PP_CAT(iter,n_) iterator; +}; + +#else + +template<> struct AUX778076_FOLD_CHUNK_NAME +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + + BOOST_MPL_PP_REPEAT(n_, AUX778076_ITER_FOLD_STEP, unused) + + typedef BOOST_PP_CAT(state,n_) state; + typedef BOOST_PP_CAT(iter,n_) iterator; + }; + +#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) + /// ETI workaround + template<> struct result_ + { + typedef int state; + typedef int iterator; + }; +#endif +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +# undef n_ + +#endif // BOOST_PP_IS_ITERATING diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/full_lambda.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/full_lambda.hpp new file mode 100644 index 0000000000..918aff5c09 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/full_lambda.hpp @@ -0,0 +1,354 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED +#define BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) +# include +# endif +#endif + +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER full_lambda.hpp +# include + +#else + +# include +# include +# include +# include +# include +# include + +# include +# include +# include +# include + +namespace boost { namespace mpl { + +// local macros, #undef-ined at the end of the header +# define AUX778076_LAMBDA_PARAMS(i_, param) \ + BOOST_MPL_PP_PARAMS(i_, param) \ + /**/ + +# define AUX778076_BIND_PARAMS(param) \ + BOOST_MPL_PP_PARAMS( \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ + , param \ + ) \ + /**/ + +# define AUX778076_BIND_N_PARAMS(i_, param) \ + BOOST_PP_COMMA_IF(i_) \ + BOOST_MPL_PP_PARAMS(i_, param) \ + /**/ + +# define AUX778076_ARITY_PARAM(param) \ + BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(param) \ + /**/ + + +#define n_ BOOST_MPL_LIMIT_METAFUNCTION_ARITY +namespace aux { + +template< + BOOST_MPL_PP_DEFAULT_PARAMS(n_,bool C,false) + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< BOOST_MPL_PP_ENUM(n_,false) > + : false_ +{ +}; + +} // namespace aux +#undef n_ + +template< + typename T + , typename Tag + AUX778076_ARITY_PARAM(typename Arity) + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + + +template< int N, typename Tag > +struct lambda< arg,Tag AUX778076_ARITY_PARAM(int_<-1>) > +{ + typedef true_ is_le; + typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 + typedef mpl::protect type; +}; + + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) +#include BOOST_PP_ITERATE() + +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< mpl::protect,Tag AUX778076_ARITY_PARAM(int_<1>) > +{ + typedef false_ is_le; + typedef mpl::protect result_; + typedef result_ type; +}; + +/// specializations for the main 'bind' form +template< + typename F, AUX778076_BIND_PARAMS(typename T) + , typename Tag + > +struct lambda< + bind + , Tag + AUX778076_ARITY_PARAM(int_) + > +{ + typedef false_ is_le; + typedef bind result_; + typedef result_ type; +}; + + +#if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) + +template< + typename F + , typename Tag1 + , typename Tag2 + , typename Arity + > +struct lambda< + lambda + , Tag2 + , int_<3> + > +{ + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + + typedef typename l1::is_le is_le; + typedef bind1< quote1, typename l1::result_ > arity_; + typedef lambda< typename if_::type,Tag2 > l3; + + typedef aux::le_result3 le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +#elif !defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) + +/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars +template< + typename F, typename Tag1, typename Tag2 + > +struct lambda< + lambda< F,Tag1 > + , Tag2 + > +{ + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + + typedef typename l1::is_le is_le; + typedef aux::le_result2 le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +#endif + +# undef AUX778076_ARITY_PARAM +# undef AUX778076_BIND_N_PARAMS +# undef AUX778076_BIND_PARAMS +# undef AUX778076_LAMBDA_PARAMS + +#if !defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) +BOOST_MPL_AUX_NA_SPEC(2, lambda) +#else +BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda) +#endif + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED + +///// iteration, depth == 1 + +// For gcc 4.4 compatability, we must include the +// BOOST_PP_ITERATION_DEPTH test inside an #else clause. +#else // BOOST_PP_IS_ITERATING +#if BOOST_PP_ITERATION_DEPTH() == 1 +#define i_ BOOST_PP_FRAME_ITERATION(1) + +#if i_ > 0 + +namespace aux { + +# define AUX778076_RESULT(unused, i_, T) \ + BOOST_PP_COMMA_IF(i_) \ + typename BOOST_PP_CAT(T, BOOST_PP_INC(i_))::result_ \ + /**/ + +# define AUX778076_TYPE(unused, i_, T) \ + BOOST_PP_COMMA_IF(i_) \ + typename BOOST_PP_CAT(T, BOOST_PP_INC(i_))::type \ + /**/ + +template< + typename IsLE, typename Tag + , template< AUX778076_LAMBDA_PARAMS(i_, typename P) > class F + , AUX778076_LAMBDA_PARAMS(i_, typename L) + > +struct BOOST_PP_CAT(le_result,i_) +{ + typedef F< + BOOST_MPL_PP_REPEAT(i_, AUX778076_TYPE, L) + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< AUX778076_LAMBDA_PARAMS(i_, typename P) > class F + , AUX778076_LAMBDA_PARAMS(i_, typename L) + > +struct BOOST_PP_CAT(le_result,i_)< true_,Tag,F,AUX778076_LAMBDA_PARAMS(i_, L) > +{ + typedef BOOST_PP_CAT(bind,i_)< + BOOST_PP_CAT(quote,i_) + , BOOST_MPL_PP_REPEAT(i_, AUX778076_RESULT, L) + > result_; + + typedef mpl::protect type; +}; + +# undef AUX778076_TYPE +# undef AUX778076_RESULT + +} // namespace aux + + +# define AUX778076_LAMBDA_TYPEDEF(unused, i_, T) \ + typedef lambda< BOOST_PP_CAT(T, BOOST_PP_INC(i_)), Tag > \ + BOOST_PP_CAT(l,BOOST_PP_INC(i_)); \ +/**/ + +# define AUX778076_IS_LE_TYPEDEF(unused, i_, unused2) \ + typedef typename BOOST_PP_CAT(l,BOOST_PP_INC(i_))::is_le \ + BOOST_PP_CAT(is_le,BOOST_PP_INC(i_)); \ +/**/ + +# define AUX778076_IS_LAMBDA_EXPR(unused, i_, unused2) \ + BOOST_PP_COMMA_IF(i_) \ + BOOST_PP_CAT(is_le,BOOST_PP_INC(i_))::value \ +/**/ + +template< + template< AUX778076_LAMBDA_PARAMS(i_, typename P) > class F + , AUX778076_LAMBDA_PARAMS(i_, typename T) + , typename Tag + > +struct lambda< + F + , Tag + AUX778076_ARITY_PARAM(int_) + > +{ + BOOST_MPL_PP_REPEAT(i_, AUX778076_LAMBDA_TYPEDEF, T) + BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LE_TYPEDEF, unused) + + typedef typename aux::lambda_or< + BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LAMBDA_EXPR, unused) + >::type is_le; + + typedef aux::BOOST_PP_CAT(le_result,i_)< + is_le, Tag, F, AUX778076_LAMBDA_PARAMS(i_, l) + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + + +# undef AUX778076_IS_LAMBDA_EXPR +# undef AUX778076_IS_LE_TYPEDEF +# undef AUX778076_LAMBDA_TYPEDEF + +#endif // i_ > 0 + +template< + typename F AUX778076_BIND_N_PARAMS(i_, typename T) + , typename Tag + > +struct lambda< + BOOST_PP_CAT(bind,i_) + , Tag + AUX778076_ARITY_PARAM(int_) + > +{ + typedef false_ is_le; + typedef BOOST_PP_CAT(bind,i_)< + F + AUX778076_BIND_N_PARAMS(i_, T) + > result_; + + typedef result_ type; +}; + +#undef i_ +#endif // BOOST_PP_ITERATION_DEPTH() +#endif // BOOST_PP_IS_ITERATING diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/has_apply.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/has_apply.hpp new file mode 100644 index 0000000000..9c16a35498 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/has_apply.hpp @@ -0,0 +1,32 @@ + +#ifndef BOOST_MPL_AUX_HAS_APPLY_HPP_INCLUDED +#define BOOST_MPL_AUX_HAS_APPLY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +namespace boost { namespace mpl { namespace aux { +#if !defined(BOOST_MPL_CFG_NO_HAS_APPLY) +BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_apply, apply, false) +#else +template< typename T, typename fallback_ = false_ > +struct has_apply + : fallback_ +{ +}; +#endif +}}} + +#endif // BOOST_MPL_AUX_HAS_APPLY_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/has_begin.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/has_begin.hpp new file mode 100644 index 0000000000..4ee415cbb9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/has_begin.hpp @@ -0,0 +1,23 @@ + +#ifndef BOOST_MPL_AUX_HAS_BEGIN_HPP_INCLUDED +#define BOOST_MPL_AUX_HAS_BEGIN_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +namespace boost { namespace mpl { namespace aux { +BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_begin, begin, true) +}}} + +#endif // BOOST_MPL_AUX_HAS_BEGIN_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/has_rebind.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/has_rebind.hpp new file mode 100644 index 0000000000..eb4eda613c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/has_rebind.hpp @@ -0,0 +1,99 @@ + +#ifndef BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED +#define BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +#if BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION) +# include +#elif BOOST_WORKAROUND(BOOST_MSVC, < 1300) +# include +# include +# include +# include +#elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) +# include +# include +# include +# include +# include +#else +# include +# include +# include +#endif + +namespace boost { namespace mpl { namespace aux { + +#if BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION) + +BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_rebind, rebind, false) + +#elif BOOST_WORKAROUND(BOOST_MSVC, < 1300) + +BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_rebind_impl, rebind, false) + +template< typename T > +struct has_rebind + : if_< + msvc_is_class + , has_rebind_impl + , bool_ + >::type +{ +}; + +#else // the rest + +template< typename T > struct has_rebind_tag {}; +no_tag operator|(has_rebind_tag, void const volatile*); + +# if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) +template< typename T > +struct has_rebind +{ + static has_rebind_tag* get(); + BOOST_STATIC_CONSTANT(bool, value = + sizeof(has_rebind_tag() | get()) == sizeof(yes_tag) + ); +}; +# else // __BORLANDC__ +template< typename T > +struct has_rebind_impl +{ + static T* get(); + BOOST_STATIC_CONSTANT(bool, value = + sizeof(has_rebind_tag() | get()) == sizeof(yes_tag) + ); +}; + +template< typename T > +struct has_rebind + : if_< + is_class + , has_rebind_impl + , bool_ + >::type +{ +}; +# endif // __BORLANDC__ + +#endif + +}}} + +#endif // BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/has_size.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/has_size.hpp new file mode 100644 index 0000000000..ff29913f9b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/has_size.hpp @@ -0,0 +1,23 @@ + +#ifndef BOOST_MPL_AUX_HAS_SIZE_HPP_INCLUDED +#define BOOST_MPL_AUX_HAS_SIZE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +namespace boost { namespace mpl { namespace aux { +BOOST_MPL_HAS_XXX_TRAIT_DEF(size) +}}} + +#endif // BOOST_MPL_AUX_HAS_SIZE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/has_tag.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/has_tag.hpp new file mode 100644 index 0000000000..3912a76af6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/has_tag.hpp @@ -0,0 +1,23 @@ + +#ifndef BOOST_MPL_AUX_HAS_TAG_HPP_INCLUDED +#define BOOST_MPL_AUX_HAS_TAG_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +namespace boost { namespace mpl { namespace aux { +BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_tag, tag, false) +}}} + +#endif // BOOST_MPL_AUX_HAS_TAG_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/has_type.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/has_type.hpp new file mode 100644 index 0000000000..6744ef5b06 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/has_type.hpp @@ -0,0 +1,23 @@ + +#ifndef BOOST_MPL_AUX_HAS_TYPE_HPP_INCLUDED +#define BOOST_MPL_AUX_HAS_TYPE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +namespace boost { namespace mpl { namespace aux { +BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_type, type, true) +}}} + +#endif // BOOST_MPL_AUX_HAS_TYPE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/include_preprocessed.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/include_preprocessed.hpp new file mode 100644 index 0000000000..c13434c8eb --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/include_preprocessed.hpp @@ -0,0 +1,42 @@ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +// Copyright Aleksey Gurtovoy 2000-2006 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include + +#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) +# define AUX778076_PREPROCESSED_HEADER \ + BOOST_MPL_CFG_COMPILER_DIR/BOOST_MPL_PREPROCESSED_HEADER \ +/**/ +#else +# define AUX778076_PREPROCESSED_HEADER \ + BOOST_PP_CAT(BOOST_MPL_CFG_COMPILER_DIR,/)##BOOST_MPL_PREPROCESSED_HEADER \ +/**/ +#endif + +#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(700)) +# define AUX778076_INCLUDE_STRING BOOST_PP_STRINGIZE(boost/mpl/aux_/preprocessed/AUX778076_PREPROCESSED_HEADER) +# include AUX778076_INCLUDE_STRING +# undef AUX778076_INCLUDE_STRING +#else +# include BOOST_PP_STRINGIZE(boost/mpl/aux_/preprocessed/AUX778076_PREPROCESSED_HEADER) +#endif + +# undef AUX778076_PREPROCESSED_HEADER + +#undef BOOST_MPL_PREPROCESSED_HEADER diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/inserter_algorithm.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/inserter_algorithm.hpp new file mode 100644 index 0000000000..20ae8161c7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/inserter_algorithm.hpp @@ -0,0 +1,159 @@ + +#ifndef BOOST_MPL_AUX_INSERTER_ALGORITHM_HPP_INCLUDED +#define BOOST_MPL_AUX_INSERTER_ALGORITHM_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright David Abrahams 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +# define BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(arity, name) \ +BOOST_MPL_AUX_COMMON_NAME_WKND(name) \ +template< \ + BOOST_MPL_PP_DEFAULT_PARAMS(arity, typename P, na) \ + > \ +struct name \ + : aux::name##_impl \ +{ \ +}; \ +\ +template< \ + BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), typename P) \ + > \ +struct name< BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P),na > \ + : if_< has_push_back< typename clear::type> \ + , aux::name##_impl< \ + BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \ + , back_inserter< typename clear::type > \ + > \ + , aux::reverse_##name##_impl< \ + BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \ + , front_inserter< typename clear::type > \ + > \ + >::type \ +{ \ +}; \ +\ +template< \ + BOOST_MPL_PP_DEFAULT_PARAMS(arity, typename P, na) \ + > \ +struct reverse_##name \ + : aux::reverse_##name##_impl \ +{ \ +}; \ +\ +template< \ + BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), typename P) \ + > \ +struct reverse_##name< BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P),na > \ + : if_< has_push_back \ + , aux::reverse_##name##_impl< \ + BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \ + , back_inserter< typename clear::type > \ + > \ + , aux::name##_impl< \ + BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \ + , front_inserter< typename clear::type > \ + > \ + >::type \ +{ \ +}; \ +BOOST_MPL_AUX_NA_SPEC(arity, name) \ +BOOST_MPL_AUX_NA_SPEC(arity, reverse_##name) \ +/**/ + +#else + +# define BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(arity, name) \ +BOOST_MPL_AUX_COMMON_NAME_WKND(name) \ +template< \ + BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), typename P) \ + > \ +struct def_##name##_impl \ + : if_< has_push_back \ + , aux::name##_impl< \ + BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \ + , back_inserter< typename clear::type > \ + > \ + , aux::reverse_##name##_impl< \ + BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \ + , front_inserter< typename clear::type > \ + > \ + >::type \ +{ \ +}; \ +\ +template< \ + BOOST_MPL_PP_DEFAULT_PARAMS(arity, typename P, na) \ + > \ +struct name \ +{ \ + typedef typename eval_if< \ + is_na \ + , def_##name##_impl \ + , aux::name##_impl \ + >::type type; \ +}; \ +\ +template< \ + BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), typename P) \ + > \ +struct def_reverse_##name##_impl \ + : if_< has_push_back \ + , aux::reverse_##name##_impl< \ + BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \ + , back_inserter< typename clear::type > \ + > \ + , aux::name##_impl< \ + BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \ + , front_inserter< typename clear::type > \ + > \ + >::type \ +{ \ +}; \ +template< \ + BOOST_MPL_PP_DEFAULT_PARAMS(arity, typename P, na) \ + > \ +struct reverse_##name \ +{ \ + typedef typename eval_if< \ + is_na \ + , def_reverse_##name##_impl \ + , aux::reverse_##name##_impl \ + >::type type; \ +}; \ +BOOST_MPL_AUX_NA_SPEC(arity, name) \ +BOOST_MPL_AUX_NA_SPEC(arity, reverse_##name) \ +/**/ + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#endif // BOOST_MPL_AUX_INSERTER_ALGORITHM_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/integral_wrapper.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/integral_wrapper.hpp new file mode 100644 index 0000000000..6bc05f7e96 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/integral_wrapper.hpp @@ -0,0 +1,93 @@ + +// Copyright Aleksey Gurtovoy 2000-2006 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! + +#include +#include +#include +#include +#include + +#include + +#if !defined(AUX_WRAPPER_NAME) +# define AUX_WRAPPER_NAME BOOST_PP_CAT(AUX_WRAPPER_VALUE_TYPE,_) +#endif + +#if !defined(AUX_WRAPPER_PARAMS) +# define AUX_WRAPPER_PARAMS(N) BOOST_MPL_AUX_NTTP_DECL(AUX_WRAPPER_VALUE_TYPE, N) +#endif + +#if !defined(AUX_WRAPPER_INST) +# if BOOST_WORKAROUND(__MWERKS__, <= 0x2407) +# define AUX_WRAPPER_INST(value) AUX_WRAPPER_NAME< value > +# else +# define AUX_WRAPPER_INST(value) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::AUX_WRAPPER_NAME< value > +# endif +#endif + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +template< AUX_WRAPPER_PARAMS(N) > +struct AUX_WRAPPER_NAME +{ + BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, value = N); +// agurt, 08/mar/03: SGI MIPSpro C++ workaround, have to #ifdef because some +// other compilers (e.g. MSVC) are not particulary happy about it +#if BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + typedef struct AUX_WRAPPER_NAME type; +#else + typedef AUX_WRAPPER_NAME type; +#endif + typedef AUX_WRAPPER_VALUE_TYPE value_type; + typedef integral_c_tag tag; + +// have to #ifdef here: some compilers don't like the 'N + 1' form (MSVC), +// while some other don't like 'value + 1' (Borland), and some don't like +// either +#if BOOST_WORKAROUND(__EDG_VERSION__, <= 243) + private: + BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, next_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1))); + BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, prior_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N - 1))); + public: + typedef AUX_WRAPPER_INST(next_value) next; + typedef AUX_WRAPPER_INST(prior_value) prior; +#elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \ + || BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(502)) \ + || (BOOST_WORKAROUND(__HP_aCC, <= 53800) && (BOOST_WORKAROUND(__hpxstd98, != 1))) + typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1)) ) next; + typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N - 1)) ) prior; +#else + typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value + 1)) ) next; + typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value - 1)) ) prior; +#endif + + // enables uniform function call syntax for families of overloaded + // functions that return objects of both arithmetic ('int', 'long', + // 'double', etc.) and wrapped integral types (for an example, see + // "mpl/example/power.cpp") + BOOST_CONSTEXPR operator AUX_WRAPPER_VALUE_TYPE() const { return static_cast(this->value); } +}; + +#if !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) +template< AUX_WRAPPER_PARAMS(N) > +AUX_WRAPPER_VALUE_TYPE const AUX_WRAPPER_INST(N)::value; +#endif + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +#undef AUX_WRAPPER_NAME +#undef AUX_WRAPPER_PARAMS +#undef AUX_WRAPPER_INST +#undef AUX_WRAPPER_VALUE_TYPE diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/is_msvc_eti_arg.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/is_msvc_eti_arg.hpp new file mode 100644 index 0000000000..4989940bad --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/is_msvc_eti_arg.hpp @@ -0,0 +1,64 @@ + +#ifndef BOOST_MPL_AUX_IS_MSVC_ETI_ARG_HPP_INCLUDED +#define BOOST_MPL_AUX_IS_MSVC_ETI_ARG_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +namespace boost { namespace mpl { namespace aux { + +#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) + +#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) + +template< typename T > +struct is_msvc_eti_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +#else // BOOST_MPL_CFG_MSVC_60_ETI_BUG + +struct eti_int_convertible +{ + eti_int_convertible(int); +}; + +template< typename T > +struct is_msvc_eti_arg +{ + static no_tag test(...); + static yes_tag test(eti_int_convertible); + static T& get(); + + BOOST_STATIC_CONSTANT(bool, value = + sizeof(test(get())) == sizeof(yes_tag) + ); +}; + +#endif + +template<> +struct is_msvc_eti_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +#endif // BOOST_MPL_CFG_MSVC_ETI_BUG + +}}} + +#endif // BOOST_MPL_AUX_IS_MSVC_ETI_ARG_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/iter_apply.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/iter_apply.hpp new file mode 100644 index 0000000000..41dfdfadd5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/iter_apply.hpp @@ -0,0 +1,47 @@ + +#ifndef BOOST_MPL_ITER_APPLY_HPP_INCLUDED +#define BOOST_MPL_ITER_APPLY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +namespace boost { namespace mpl { namespace aux { + +template< + typename F + , typename Iterator + > +struct iter_apply1 + : apply1< F,typename deref::type > +{ +}; + +template< + typename F + , typename Iterator1 + , typename Iterator2 + > +struct iter_apply2 + : apply2< + F + , typename deref::type + , typename deref::type + > +{ +}; + +}}} + +#endif // BOOST_MPL_ITER_APPLY_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/iter_fold_if_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/iter_fold_if_impl.hpp new file mode 100644 index 0000000000..6372e83de4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/iter_fold_if_impl.hpp @@ -0,0 +1,210 @@ + +#ifndef BOOST_MPL_AUX_ITER_FOLD_IF_IMPL_HPP_INCLUDED +#define BOOST_MPL_AUX_ITER_FOLD_IF_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include +# include +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER iter_fold_if_impl.hpp +# include + +#else + +# include +# include +# include +# include +# include +# include + +namespace boost { namespace mpl { namespace aux { + +template< typename Iterator, typename State > +struct iter_fold_if_null_step +{ + typedef State state; + typedef Iterator iterator; +}; + +template< bool > +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef typename apply2::type state; + typedef typename IteratorOp::type iterator; + }; +}; + +template<> +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef State state; + typedef Iterator iterator; + }; +}; + +// agurt, 25/jun/02: MSVC 6.5 workaround, had to get rid of inheritance +// here and in 'iter_fold_if_backward_step', because sometimes it interfered +// with the "early template instantiation bug" in _really_ ugly ways +template< + typename Iterator + , typename State + , typename ForwardOp + , typename Predicate + > +struct iter_fold_if_forward_step +{ + typedef typename apply2::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,ForwardOp,mpl::next > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename BackwardOp + , typename Predicate + > +struct iter_fold_if_backward_step +{ + typedef typename apply2::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,BackwardOp,identity > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + + +// local macros, #undef-ined at the end of the header + +# define AUX_ITER_FOLD_FORWARD_STEP(unused, i, unused2) \ + typedef iter_fold_if_forward_step< \ + typename BOOST_PP_CAT(forward_step,i)::iterator \ + , typename BOOST_PP_CAT(forward_step,i)::state \ + , ForwardOp \ + , ForwardPredicate \ + > BOOST_PP_CAT(forward_step, BOOST_PP_INC(i)); \ + /**/ + +# define AUX_ITER_FOLD_BACKWARD_STEP_FUNC(i) \ + typedef iter_fold_if_backward_step< \ + typename BOOST_PP_CAT(forward_step,BOOST_PP_DEC(i))::iterator \ + , typename BOOST_PP_CAT(backward_step,i)::state \ + , BackwardOp \ + , BackwardPredicate \ + > BOOST_PP_CAT(backward_step,BOOST_PP_DEC(i)); \ + /**/ + +# define AUX_ITER_FOLD_BACKWARD_STEP(unused, i, unused2) \ + AUX_ITER_FOLD_BACKWARD_STEP_FUNC( \ + BOOST_PP_SUB_D(1,BOOST_MPL_LIMIT_UNROLLING,i) \ + ) \ + /**/ + +# define AUX_LAST_FORWARD_STEP \ + BOOST_PP_CAT(forward_step, BOOST_MPL_LIMIT_UNROLLING) \ + /**/ + +# define AUX_LAST_BACKWARD_STEP \ + BOOST_PP_CAT(backward_step, BOOST_MPL_LIMIT_UNROLLING) \ + /**/ + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename ForwardPredicate + , typename BackwardOp + , typename BackwardPredicate + > +struct iter_fold_if_impl +{ + private: + typedef iter_fold_if_null_step forward_step0; + BOOST_PP_REPEAT( + BOOST_MPL_LIMIT_UNROLLING + , AUX_ITER_FOLD_FORWARD_STEP + , unused + ) + + typedef typename if_< + typename AUX_LAST_FORWARD_STEP::not_last + , iter_fold_if_impl< + typename AUX_LAST_FORWARD_STEP::iterator + , typename AUX_LAST_FORWARD_STEP::state + , ForwardOp + , ForwardPredicate + , BackwardOp + , BackwardPredicate + > + , iter_fold_if_null_step< + typename AUX_LAST_FORWARD_STEP::iterator + , typename AUX_LAST_FORWARD_STEP::state + > + >::type AUX_LAST_BACKWARD_STEP; + + BOOST_PP_REPEAT( + BOOST_MPL_LIMIT_UNROLLING + , AUX_ITER_FOLD_BACKWARD_STEP + , unused + ) + + public: + typedef typename backward_step0::state state; + typedef typename AUX_LAST_BACKWARD_STEP::iterator iterator; +}; + +# undef AUX_LAST_BACKWARD_STEP +# undef AUX_LAST_FORWARD_STEP +# undef AUX_ITER_FOLD_BACKWARD_STEP +# undef AUX_ITER_FOLD_BACKWARD_STEP_FUNC +# undef AUX_ITER_FOLD_FORWARD_STEP + +}}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_AUX_ITER_FOLD_IF_IMPL_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/iter_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/iter_fold_impl.hpp new file mode 100644 index 0000000000..b4d2922f51 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/iter_fold_impl.hpp @@ -0,0 +1,42 @@ + +#ifndef BOOST_MPL_AUX_ITER_FOLD_IMPL_HPP_INCLUDED +#define BOOST_MPL_AUX_ITER_FOLD_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +# include +# include +# endif +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER iter_fold_impl.hpp +# include + +#else + +# define AUX778076_FOLD_IMPL_OP(iter) iter +# define AUX778076_FOLD_IMPL_NAME_PREFIX iter_fold +# include + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_AUX_ITER_FOLD_IMPL_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/lambda_arity_param.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/lambda_arity_param.hpp new file mode 100644 index 0000000000..63cfcd4f17 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/lambda_arity_param.hpp @@ -0,0 +1,25 @@ + +#ifndef BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED +#define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if !defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) +# define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(param) +#else +# define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(param) , param +#endif + +#endif // BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/lambda_no_ctps.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/lambda_no_ctps.hpp new file mode 100644 index 0000000000..9e0d0203a7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/lambda_no_ctps.hpp @@ -0,0 +1,193 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED +#define BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER lambda_no_ctps.hpp +# include + +#else + +# include +# include +# include +# include +# include +# include +# include + +# include +# include +# include +# include + +namespace boost { namespace mpl { + +# define AUX778076_LAMBDA_PARAMS(i_, param) \ + BOOST_MPL_PP_PARAMS(i_, param) \ + /**/ + +namespace aux { + +#define n_ BOOST_MPL_LIMIT_METAFUNCTION_ARITY +template< + BOOST_MPL_PP_DEFAULT_PARAMS(n_,bool C,false) + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< BOOST_MPL_PP_ENUM(n_,false) > + : false_ +{ +}; +#undef n_ + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ + { + typedef T type; + typedef is_placeholder is_le; + }; +}; + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) +#include BOOST_PP_ITERATE() + +} // namespace aux + +template< + typename T + , typename Tag + , typename Protect + > +struct lambda +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity::type arity_; + typedef typename aux::lambda_impl + ::template result_< T,Tag,Protect > l_; + + typedef typename l_::type type; + typedef typename l_::is_le is_le; + + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; + +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +# undef AUX778076_LAMBDA_PARAMS + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED + +///// iteration, depth == 1 + +#else + +#define i_ BOOST_PP_FRAME_ITERATION(1) + +# define AUX778076_LAMBDA_TYPEDEF(unused, i_, F) \ + typedef lambda< \ + typename F::BOOST_PP_CAT(arg,BOOST_PP_INC(i_)) \ + , Tag \ + , false_ \ + > BOOST_PP_CAT(l,BOOST_PP_INC(i_)); \ + /**/ + +# define AUX778076_IS_LE_TYPEDEF(unused, i_, unused2) \ + typedef typename BOOST_PP_CAT(l,BOOST_PP_INC(i_))::is_le \ + BOOST_PP_CAT(is_le,BOOST_PP_INC(i_)); \ + /**/ + +# define AUX778076_IS_LAMBDA_EXPR(unused, i_, unused2) \ + BOOST_PP_COMMA_IF(i_) \ + BOOST_MPL_AUX_MSVC_VALUE_WKND(BOOST_PP_CAT(is_le,BOOST_PP_INC(i_)))::value \ + /**/ + +# define AUX778076_LAMBDA_RESULT(unused, i_, unused2) \ + , typename BOOST_PP_CAT(l,BOOST_PP_INC(i_))::type \ + /**/ + +template<> struct lambda_impl< int_ > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + BOOST_MPL_PP_REPEAT(i_, AUX778076_LAMBDA_TYPEDEF, F) + BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LE_TYPEDEF, unused) + + typedef aux::lambda_or< + BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LAMBDA_EXPR, unused) + > is_le; + + typedef BOOST_PP_CAT(bind,i_)< + typename F::rebind + BOOST_MPL_PP_REPEAT(i_, AUX778076_LAMBDA_RESULT, unused) + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +# undef AUX778076_LAMBDA_RESULT +# undef AUX778076_IS_LAMBDA_EXPR +# undef AUX778076_IS_LE_TYPEDEF +# undef AUX778076_LAMBDA_TYPEDEF + +#undef i_ + +#endif // BOOST_PP_IS_ITERATING diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/lambda_spec.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/lambda_spec.hpp new file mode 100644 index 0000000000..6ffacc0a6d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/lambda_spec.hpp @@ -0,0 +1,49 @@ + +#ifndef BOOST_MPL_AUX_LAMBDA_SPEC_HPP_INCLUDED +#define BOOST_MPL_AUX_LAMBDA_SPEC_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2007 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) + +# define BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(i, name) \ +template< \ + BOOST_MPL_PP_PARAMS(i, typename T) \ + , typename Tag \ + > \ +struct lambda< \ + name< BOOST_MPL_PP_PARAMS(i, T) > \ + , Tag \ + BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_) \ + > \ +{ \ + typedef false_ is_le; \ + typedef name< BOOST_MPL_PP_PARAMS(i, T) > result_; \ + typedef result_ type; \ +}; \ +/**/ + +#else + +# define BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(i, name) /**/ + +#endif + +#endif // BOOST_MPL_AUX_LAMBDA_SPEC_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/lambda_support.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/lambda_support.hpp new file mode 100644 index 0000000000..5b2af58583 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/lambda_support.hpp @@ -0,0 +1,169 @@ + +#ifndef BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED +#define BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) + +# define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) /**/ +# define BOOST_MPL_AUX_LAMBDA_SUPPORT(i,name,params) /**/ + +#else + +# include +# include +# include +# include +# include +# include +# include + +# include +# include +# include +# include + +# define BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC(R,typedef_,i,param) \ + typedef_ param BOOST_PP_CAT(arg,BOOST_PP_INC(i)); \ + /**/ + +// agurt, 07/mar/03: restore an old revision for the sake of SGI MIPSpro C++ +#if BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + +# define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \ + typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_ arity; \ + BOOST_PP_LIST_FOR_EACH_I_R( \ + 1 \ + , BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \ + , typedef \ + , BOOST_PP_TUPLE_TO_LIST(i,params) \ + ) \ + struct rebind \ + { \ + template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \ + : name< BOOST_MPL_PP_PARAMS(i,U) > \ + { \ + }; \ + }; \ + /**/ + +# define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ + BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \ + /**/ + +#elif BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION) +// agurt, 18/jan/03: old EDG-based compilers actually enforce 11.4 para 9 +// (in strict mode), so we have to provide an alternative to the +// MSVC-optimized implementation + +# define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ + typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_ arity; \ + BOOST_PP_LIST_FOR_EACH_I_R( \ + 1 \ + , BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \ + , typedef \ + , BOOST_PP_TUPLE_TO_LIST(i,params) \ + ) \ + struct rebind; \ +/**/ + +# define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ +}; \ +template< BOOST_MPL_PP_PARAMS(i,typename T) > \ +struct name::rebind \ +{ \ + template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \ + : name< BOOST_MPL_PP_PARAMS(i,U) > \ + { \ + }; \ +/**/ + +#else // __EDG_VERSION__ + +namespace boost { namespace mpl { namespace aux { +template< typename T > struct has_rebind_tag; +}}} + +# define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ + typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_ arity; \ + BOOST_PP_LIST_FOR_EACH_I_R( \ + 1 \ + , BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \ + , typedef \ + , BOOST_PP_TUPLE_TO_LIST(i,params) \ + ) \ + friend class BOOST_PP_CAT(name,_rebind); \ + typedef BOOST_PP_CAT(name,_rebind) rebind; \ +/**/ + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) +# define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \ +template< BOOST_MPL_PP_PARAMS(i,typename T) > \ +::boost::mpl::aux::yes_tag operator|( \ + ::boost::mpl::aux::has_rebind_tag \ + , name* \ + ); \ +::boost::mpl::aux::no_tag operator|( \ + ::boost::mpl::aux::has_rebind_tag \ + , name< BOOST_MPL_PP_ENUM(i,::boost::mpl::na) >* \ + ); \ +/**/ +#elif !BOOST_WORKAROUND(BOOST_MSVC, < 1300) +# define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \ +template< BOOST_MPL_PP_PARAMS(i,typename T) > \ +::boost::mpl::aux::yes_tag operator|( \ + ::boost::mpl::aux::has_rebind_tag \ + , ::boost::mpl::aux::has_rebind_tag< name >* \ + ); \ +/**/ +#else +# define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) /**/ +#endif + +# if !defined(__BORLANDC__) +# define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ +}; \ +BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \ +class BOOST_PP_CAT(name,_rebind) \ +{ \ + public: \ + template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \ + : name< BOOST_MPL_PP_PARAMS(i,U) > \ + { \ + }; \ +/**/ +# else +# define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ +}; \ +BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \ +class BOOST_PP_CAT(name,_rebind) \ +{ \ + public: \ + template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \ + { \ + typedef typename name< BOOST_MPL_PP_PARAMS(i,U) >::type type; \ + }; \ +/**/ +# endif // __BORLANDC__ + +#endif // __EDG_VERSION__ + +#endif // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT + +#endif // BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/largest_int.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/largest_int.hpp new file mode 100644 index 0000000000..feaa1eca72 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/largest_int.hpp @@ -0,0 +1,63 @@ + +#ifndef BOOST_MPL_AUX_LARGEST_INT_HPP_INCLUDED +#define BOOST_MPL_AUX_LARGEST_INT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include + +namespace boost { namespace mpl { namespace aux { + +template< typename T > struct integral_rank; + +template<> struct integral_rank : int_<1> {}; +template<> struct integral_rank : int_<2> {}; +template<> struct integral_rank : int_<3> {}; +template<> struct integral_rank : int_<4> {}; +#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) +template<> struct integral_rank : int_<5> {}; +#endif +template<> struct integral_rank : int_<6> {}; +template<> struct integral_rank : int_<7> {}; +template<> struct integral_rank : int_<8> {}; +template<> struct integral_rank : int_<9> {}; +template<> struct integral_rank : int_<10> {}; +template<> struct integral_rank : int_<11> {}; + +#if defined(BOOST_HAS_LONG_LONG) +template<> struct integral_rank : int_<12> {}; +template<> struct integral_rank: int_<13> {}; +#endif + +template< typename T1, typename T2 > struct largest_int +#if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC) + : if_c< + ( integral_rank::value >= integral_rank::value ) + , T1 + , T2 + > +{ +#else +{ + enum { rank1 = integral_rank::value }; + enum { rank2 = integral_rank::value }; + typedef typename if_c< (rank1 >= rank2),T1,T2 >::type type; +#endif +}; + +}}} + +#endif // BOOST_MPL_AUX_LARGEST_INT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/logical_op.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/logical_op.hpp new file mode 100644 index 0000000000..0ba2510262 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/logical_op.hpp @@ -0,0 +1,165 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include +# include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +namespace boost { namespace mpl { + +# define AUX778076_PARAMS(param, sub) \ + BOOST_MPL_PP_PARAMS( \ + BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY, sub) \ + , param \ + ) \ + /**/ + +# define AUX778076_SHIFTED_PARAMS(param, sub) \ + BOOST_MPL_PP_EXT_PARAMS( \ + 2, BOOST_MPL_PP_SUB(BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY), sub) \ + , param \ + ) \ + /**/ + +# define AUX778076_SPEC_PARAMS(param) \ + BOOST_MPL_PP_ENUM( \ + BOOST_PP_DEC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) \ + , param \ + ) \ + /**/ + +namespace aux { + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< bool C_, AUX778076_PARAMS(typename T, 1) > +struct BOOST_PP_CAT(AUX778076_OP_NAME,impl) + : BOOST_PP_CAT(AUX778076_OP_VALUE1,_) +{ +}; + +template< AUX778076_PARAMS(typename T, 1) > +struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)< AUX778076_OP_VALUE2,AUX778076_PARAMS(T, 1) > + : BOOST_PP_CAT(AUX778076_OP_NAME,impl)< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , AUX778076_SHIFTED_PARAMS(T, 1) + , BOOST_PP_CAT(AUX778076_OP_VALUE2,_) + > +{ +}; + +template<> +struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)< + AUX778076_OP_VALUE2 + , AUX778076_SPEC_PARAMS(BOOST_PP_CAT(AUX778076_OP_VALUE2,_)) + > + : BOOST_PP_CAT(AUX778076_OP_VALUE2,_) +{ +}; + +#else + +template< bool C_ > struct BOOST_PP_CAT(AUX778076_OP_NAME,impl) +{ + template< AUX778076_PARAMS(typename T, 1) > struct result_ + : BOOST_PP_CAT(AUX778076_OP_VALUE1,_) + { + }; +}; + +template<> struct BOOST_PP_CAT(AUX778076_OP_NAME,impl) +{ + template< AUX778076_PARAMS(typename T, 1) > struct result_ + : BOOST_PP_CAT(AUX778076_OP_NAME,impl)< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + >::template result_< AUX778076_SHIFTED_PARAMS(T,1),BOOST_PP_CAT(AUX778076_OP_VALUE2,_) > + { + }; + +#if BOOST_WORKAROUND(BOOST_MSVC, == 1300) + template<> struct result_ + : BOOST_PP_CAT(AUX778076_OP_VALUE2,_) + { + }; +}; +#else +}; + +template<> +struct BOOST_PP_CAT(AUX778076_OP_NAME,impl) + ::result_< AUX778076_SPEC_PARAMS(BOOST_PP_CAT(AUX778076_OP_VALUE2,_)) > + : BOOST_PP_CAT(AUX778076_OP_VALUE2,_) +{ +}; +#endif // BOOST_MSVC == 1300 + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + BOOST_MPL_PP_DEF_PARAMS_TAIL(2, typename T, BOOST_PP_CAT(AUX778076_OP_VALUE2,_)) + > +struct AUX778076_OP_NAME +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + : aux::BOOST_PP_CAT(AUX778076_OP_NAME,impl)< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , AUX778076_SHIFTED_PARAMS(T,0) + > +#else + : aux::BOOST_PP_CAT(AUX778076_OP_NAME,impl)< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + >::template result_< AUX778076_SHIFTED_PARAMS(T,0) > +#endif +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + BOOST_MPL_LIMIT_METAFUNCTION_ARITY + , AUX778076_OP_NAME + , (AUX778076_PARAMS(T, 0)) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , BOOST_MPL_LIMIT_METAFUNCTION_ARITY + , AUX778076_OP_NAME + ) + +}} + +#undef AUX778076_SPEC_PARAMS +#undef AUX778076_SHIFTED_PARAMS +#undef AUX778076_PARAMS +#undef AUX778076_OP_NAME +#undef AUX778076_OP_VALUE1 +#undef AUX778076_OP_VALUE2 diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/msvc_dtw.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/msvc_dtw.hpp new file mode 100644 index 0000000000..d595b231f3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/msvc_dtw.hpp @@ -0,0 +1,68 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! + +#include + +// local macros, #undef-ined at the end of the header +#define AUX778076_DTW_PARAMS(param) \ + BOOST_MPL_PP_PARAMS(AUX778076_MSVC_DTW_ARITY, param) \ +/**/ + +#define AUX778076_DTW_ORIGINAL_NAME \ + AUX778076_MSVC_DTW_ORIGINAL_NAME \ +/**/ + +// warning: not a well-formed C++ +// workaround for MSVC 6.5's "dependent template typedef bug" + +template< typename F> +struct AUX778076_MSVC_DTW_NAME +{ + template< bool > struct f_ : F {}; + template<> struct f_ + { +#if AUX778076_MSVC_DTW_ARITY > 0 + template< AUX778076_DTW_PARAMS(typename P) > struct AUX778076_DTW_ORIGINAL_NAME + { + typedef int type; + }; + }; + + template< AUX778076_DTW_PARAMS(typename T) > struct result_ + : f_< aux::msvc_never_true::value > + ::template AUX778076_DTW_ORIGINAL_NAME< AUX778076_DTW_PARAMS(T) > + { + }; +#else + template< typename P = int > struct AUX778076_DTW_ORIGINAL_NAME + { + typedef int type; + }; + }; + + template< typename T = int > struct result_ + : f_< aux::msvc_never_true::value > + ::template AUX778076_DTW_ORIGINAL_NAME<> + { + }; +#endif +}; + +#undef AUX778076_DTW_ORIGINAL_NAME +#undef AUX778076_DTW_PARAMS + +#undef AUX778076_MSVC_DTW_NAME +#undef AUX778076_MSVC_DTW_ORIGINAL_NAME +#undef AUX778076_MSVC_DTW_ARITY diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/msvc_eti_base.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/msvc_eti_base.hpp new file mode 100644 index 0000000000..0d8ace6964 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/msvc_eti_base.hpp @@ -0,0 +1,77 @@ + +#ifndef BOOST_MPL_AUX_MSVC_ETI_BASE_HPP_INCLUDED +#define BOOST_MPL_AUX_MSVC_ETI_BASE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include + +namespace boost { namespace mpl { namespace aux { + +#if defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) + +template< bool > struct msvc_eti_base_impl +{ + template< typename T > struct result_ + : T + { + typedef T type; + }; +}; + +template<> struct msvc_eti_base_impl +{ + template< typename T > struct result_ + { + typedef result_ type; + typedef result_ first; + typedef result_ second; + typedef result_ tag; + enum { value = 0 }; + }; +}; + +template< typename T > struct msvc_eti_base + : msvc_eti_base_impl< is_msvc_eti_arg::value > + ::template result_ +{ +}; + +#else // !BOOST_MPL_CFG_MSVC_70_ETI_BUG + +template< typename T > struct msvc_eti_base + : T +{ +#if BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) + msvc_eti_base(); +#endif + typedef T type; +}; + +#endif + +template<> struct msvc_eti_base +{ + typedef msvc_eti_base type; + typedef msvc_eti_base first; + typedef msvc_eti_base second; + typedef msvc_eti_base tag; + enum { value = 0 }; +}; + +}}} + +#endif // BOOST_MPL_AUX_MSVC_ETI_BASE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/msvc_is_class.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/msvc_is_class.hpp new file mode 100644 index 0000000000..acd40e3307 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/msvc_is_class.hpp @@ -0,0 +1,58 @@ + +#ifndef BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED +#define BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include + +#include + +namespace boost { namespace mpl { namespace aux { + +template< typename T > struct is_class_helper +{ + typedef int (T::* type)(); +}; + +// MSVC 6.x-specific lightweight 'is_class' implementation; +// Distinguishing feature: does not instantiate the type being tested. +template< typename T > +struct msvc_is_class_impl +{ + template< typename U> + static yes_tag test(type_wrapper*, /*typename*/ is_class_helper::type = 0); + static no_tag test(void const volatile*, ...); + + enum { value = sizeof(test((type_wrapper*)0)) == sizeof(yes_tag) }; + typedef bool_ type; +}; + +// agurt, 17/sep/04: have to check for 'is_reference' upfront to avoid ICEs in +// complex metaprograms +template< typename T > +struct msvc_is_class + : if_< + is_reference + , false_ + , msvc_is_class_impl + >::type +{ +}; + +}}} + +#endif // BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/msvc_never_true.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/msvc_never_true.hpp new file mode 100644 index 0000000000..2df9b81172 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/msvc_never_true.hpp @@ -0,0 +1,34 @@ + +#ifndef BOOST_MPL_AUX_MSVC_NEVER_TRUE_HPP_INCLUDED +#define BOOST_MPL_AUX_MSVC_NEVER_TRUE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + +namespace boost { namespace mpl { namespace aux { + +template< typename T > +struct msvc_never_true +{ + enum { value = false }; +}; + +}}} + +#endif // BOOST_MSVC + +#endif // BOOST_MPL_AUX_MSVC_NEVER_TRUE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/msvc_type.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/msvc_type.hpp new file mode 100644 index 0000000000..bea244f319 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/msvc_type.hpp @@ -0,0 +1,62 @@ + +#ifndef BOOST_MPL_AUX_MSVC_TYPE_HPP_INCLUDED +#define BOOST_MPL_AUX_MSVC_TYPE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +namespace boost { namespace mpl { namespace aux { + +#if defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) + +template< bool > struct msvc_type_impl +{ + template< typename T > struct result_ + { + typedef typename T::type type; + }; +}; + +template<> struct msvc_type_impl +{ + template< typename T > struct result_ + { + typedef result_ type; + }; +}; + +template< typename T > struct msvc_type + : msvc_type_impl< is_msvc_eti_arg::value > + ::template result_ +{ +}; + +#else // BOOST_MPL_CFG_MSVC_70_ETI_BUG + +template< typename T > struct msvc_type +{ + typedef typename T::type type; +}; + +template<> struct msvc_type +{ + typedef int type; +}; + +#endif + +}}} + +#endif // BOOST_MPL_AUX_MSVC_TYPE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/na.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/na.hpp new file mode 100644 index 0000000000..f079c1e78c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/na.hpp @@ -0,0 +1,95 @@ + +#ifndef BOOST_MPL_AUX_NA_HPP_INCLUDED +#define BOOST_MPL_AUX_NA_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include + +namespace boost { namespace mpl { + +template< typename T > +struct is_na + : false_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + using false_::value; +#endif +}; + +template<> +struct is_na + : true_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + using true_::value; +#endif +}; + +template< typename T > +struct is_not_na + : true_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + using true_::value; +#endif +}; + +template<> +struct is_not_na + : false_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + using false_::value; +#endif +}; + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +template< typename T, typename U > struct if_na +{ + typedef T type; +}; + +template< typename U > struct if_na +{ + typedef U type; +}; +#else +template< typename T > struct if_na_impl +{ + template< typename U > struct apply + { + typedef T type; + }; +}; + +template<> struct if_na_impl +{ + template< typename U > struct apply + { + typedef U type; + }; +}; + +template< typename T, typename U > struct if_na + : if_na_impl::template apply +{ +}; +#endif + +}} + +#endif // BOOST_MPL_AUX_NA_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/na_assert.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/na_assert.hpp new file mode 100644 index 0000000000..1983c09061 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/na_assert.hpp @@ -0,0 +1,34 @@ + +#ifndef BOOST_MPL_AUX_NA_ASSERT_HPP_INCLUDED +#define BOOST_MPL_AUX_NA_ASSERT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +#if !BOOST_WORKAROUND(_MSC_FULL_VER, <= 140050601) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 243) +# include +# define BOOST_MPL_AUX_ASSERT_NOT_NA(x) \ + BOOST_MPL_ASSERT_NOT((boost::mpl::is_na)) \ +/**/ +#else +# include +# define BOOST_MPL_AUX_ASSERT_NOT_NA(x) \ + BOOST_STATIC_ASSERT(!boost::mpl::is_na::value) \ +/**/ +#endif + +#endif // BOOST_MPL_AUX_NA_ASSERT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/na_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/na_fwd.hpp new file mode 100644 index 0000000000..4388241939 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/na_fwd.hpp @@ -0,0 +1,31 @@ + +#ifndef BOOST_MPL_AUX_NA_FWD_HPP_INCLUDED +#define BOOST_MPL_AUX_NA_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +// n.a. == not available +struct na +{ + typedef na type; + enum { value = 0 }; +}; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(na) + +#endif // BOOST_MPL_AUX_NA_FWD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/na_spec.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/na_spec.hpp new file mode 100644 index 0000000000..d052fce18e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/na_spec.hpp @@ -0,0 +1,175 @@ + +#ifndef BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED +#define BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include +# include +# include +# include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#define BOOST_MPL_AUX_NA_PARAMS(i) \ + BOOST_MPL_PP_ENUM(i, na) \ +/**/ + +#if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +# define BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \ +namespace aux { \ +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > \ +struct arity< \ + name< BOOST_MPL_AUX_NA_PARAMS(i) > \ + , N \ + > \ + : int_< BOOST_MPL_LIMIT_METAFUNCTION_ARITY > \ +{ \ +}; \ +} \ +/**/ +#else +# define BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) /**/ +#endif + +#define BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \ +template<> \ +struct name< BOOST_MPL_AUX_NA_PARAMS(i) > \ +{ \ + template< \ + BOOST_MPL_PP_PARAMS(i, typename T) \ + BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, typename T, na) \ + > \ + struct apply \ + : name< BOOST_MPL_PP_PARAMS(i, T) > \ + { \ + }; \ +}; \ +/**/ + +#if defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) +# define BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \ +template<> \ +struct lambda< \ + name< BOOST_MPL_AUX_NA_PARAMS(i) > \ + , void_ \ + , true_ \ + > \ +{ \ + typedef false_ is_le; \ + typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \ +}; \ +template<> \ +struct lambda< \ + name< BOOST_MPL_AUX_NA_PARAMS(i) > \ + , void_ \ + , false_ \ + > \ +{ \ + typedef false_ is_le; \ + typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \ +}; \ +/**/ +#else +# define BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \ +template< typename Tag > \ +struct lambda< \ + name< BOOST_MPL_AUX_NA_PARAMS(i) > \ + , Tag \ + BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_<-1>) \ + > \ +{ \ + typedef false_ is_le; \ + typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > result_; \ + typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \ +}; \ +/**/ +#endif + +#if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \ + || defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) \ + && defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION) +# define BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) \ +namespace aux { \ +template< BOOST_MPL_PP_PARAMS(j, typename T) > \ +struct template_arity< \ + name< BOOST_MPL_PP_PARAMS(j, T) > \ + > \ + : int_ \ +{ \ +}; \ +\ +template<> \ +struct template_arity< \ + name< BOOST_MPL_PP_ENUM(i, na) > \ + > \ + : int_<-1> \ +{ \ +}; \ +} \ +/**/ +#else +# define BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) /**/ +#endif + +#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) +# define BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \ +template<> \ +struct name< BOOST_MPL_PP_ENUM(i, int) > \ +{ \ + typedef int type; \ + enum { value = 0 }; \ +}; \ +/**/ +#else +# define BOOST_MPL_AUX_NA_SPEC_ETI(i, name) /**/ +#endif + +#define BOOST_MPL_AUX_NA_PARAM(param) param = na + +#define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \ +BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \ +BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \ +BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \ +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, i, name) \ +/**/ + +#define BOOST_MPL_AUX_NA_SPEC(i, name) \ +BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \ +BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \ +/**/ + +#define BOOST_MPL_AUX_NA_SPEC2(i, j, name) \ +BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \ +BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \ +BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \ +BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \ +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) \ +/**/ + + +#endif // BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/nested_type_wknd.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/nested_type_wknd.hpp new file mode 100644 index 0000000000..4207abdbc5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/nested_type_wknd.hpp @@ -0,0 +1,48 @@ + +#ifndef BOOST_MPL_AUX_NESTED_TYPE_WKND_HPP_INCLUDED +#define BOOST_MPL_AUX_NESTED_TYPE_WKND_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +#if BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0302)) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \ + || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x530)) \ + || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) + +namespace boost { namespace mpl { namespace aux { +template< typename T > struct nested_type_wknd + : T::type +{ +}; +}}} + +#if BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +# define BOOST_MPL_AUX_NESTED_TYPE_WKND(T) \ + aux::nested_type_wknd \ +/**/ +#else +# define BOOST_MPL_AUX_NESTED_TYPE_WKND(T) \ + ::boost::mpl::aux::nested_type_wknd \ +/**/ +#endif + +#else // !BOOST_MPL_CFG_GCC et al. + +# define BOOST_MPL_AUX_NESTED_TYPE_WKND(T) T::type + +#endif + +#endif // BOOST_MPL_AUX_NESTED_TYPE_WKND_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/nttp_decl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/nttp_decl.hpp new file mode 100644 index 0000000000..8c344d874d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/nttp_decl.hpp @@ -0,0 +1,35 @@ + +#ifndef BOOST_MPL_AUX_NTTP_DECL_HPP_INCLUDED +#define BOOST_MPL_AUX_NTTP_DECL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if defined(BOOST_MPL_CFG_NTTP_BUG) + +typedef bool _mpl_nttp_bool; +typedef int _mpl_nttp_int; +typedef unsigned _mpl_nttp_unsigned; +typedef long _mpl_nttp_long; + +# include +# define BOOST_MPL_AUX_NTTP_DECL(T, x) BOOST_PP_CAT(_mpl_nttp_,T) x /**/ + +#else + +# define BOOST_MPL_AUX_NTTP_DECL(T, x) T x /**/ + +#endif + +#endif // BOOST_MPL_AUX_NTTP_DECL_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/numeric_cast_utils.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/numeric_cast_utils.hpp new file mode 100644 index 0000000000..a7ac85a99d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/numeric_cast_utils.hpp @@ -0,0 +1,77 @@ + +#ifndef BOOST_MPL_AUX_NUMERIC_CAST_HPP_INCLUDED +#define BOOST_MPL_AUX_NUMERIC_CAST_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +namespace boost { namespace mpl { namespace aux { + +template< + typename F + , typename Tag1 + , typename Tag2 + > +struct cast1st_impl +{ + template< typename N1, typename N2 > struct apply +#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) + : apply_wrap2< + F + , typename apply_wrap1< BOOST_MPL_AUX_NUMERIC_CAST,N1 >::type + , N2 + > + { +#else + { + typedef typename apply_wrap2< + F + , typename apply_wrap1< BOOST_MPL_AUX_NUMERIC_CAST,N1 >::type + , N2 + >::type type; +#endif + }; +}; + +template< + typename F + , typename Tag1 + , typename Tag2 + > +struct cast2nd_impl +{ + template< typename N1, typename N2 > struct apply +#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) + : apply_wrap2< + F + , N1 + , typename apply_wrap1< BOOST_MPL_AUX_NUMERIC_CAST,N2 >::type + > + { +#else + { + typedef typename apply_wrap2< + F + , N1 + , typename apply_wrap1< BOOST_MPL_AUX_NUMERIC_CAST,N2 >::type + >::type type; +#endif + }; +}; + +}}} + +#endif // BOOST_MPL_AUX_NUMERIC_CAST_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/numeric_op.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/numeric_op.hpp new file mode 100644 index 0000000000..5492557013 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/numeric_op.hpp @@ -0,0 +1,315 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +#endif + +#include + +#if defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + || defined(BOOST_MPL_PREPROCESSING_MODE) + +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include + +# include +# include +# include +# include + + +#if !defined(AUX778076_OP_ARITY) +# define AUX778076_OP_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY +#endif + +#if !defined(AUX778076_OP_IMPL_NAME) +# define AUX778076_OP_IMPL_NAME BOOST_PP_CAT(AUX778076_OP_PREFIX,_impl) +#endif + +#if !defined(AUX778076_OP_TAG_NAME) +# define AUX778076_OP_TAG_NAME BOOST_PP_CAT(AUX778076_OP_PREFIX,_tag) +#endif + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct AUX778076_OP_IMPL_NAME + : if_c< + ( tag1_ > tag2_ ) +#else + > +struct AUX778076_OP_IMPL_NAME + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) +#endif + , aux::cast2nd_impl< AUX778076_OP_IMPL_NAME,Tag1,Tag2 > + , aux::cast1st_impl< AUX778076_OP_IMPL_NAME,Tag1,Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct AUX778076_OP_IMPL_NAME +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +template< typename Tag > struct AUX778076_OP_IMPL_NAME +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct AUX778076_OP_IMPL_NAME +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; +#else +template<> struct AUX778076_OP_IMPL_NAME +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct AUX778076_OP_IMPL_NAME +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; +#endif + + +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && BOOST_WORKAROUND(BOOST_MSVC, >= 1300) +template< typename T > struct AUX778076_OP_TAG_NAME + : tag +{ +}; +#else +template< typename T > struct AUX778076_OP_TAG_NAME +{ + typedef typename T::tag type; +}; +#endif + + +#if AUX778076_OP_ARITY != 2 + +# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +# define AUX778076_OP_RIGHT_OPERAND(unused, i, N) , BOOST_PP_CAT(N, BOOST_MPL_PP_ADD(i, 2))> +# define AUX778076_OP_N_CALLS(i, N) \ + BOOST_MPL_PP_REPEAT( BOOST_PP_DEC(i), BOOST_MPL_PP_REPEAT_IDENTITY_FUNC, AUX778076_OP_NAME< ) \ + N1 BOOST_MPL_PP_REPEAT( BOOST_MPL_PP_SUB(i, 1), AUX778076_OP_RIGHT_OPERAND, N ) \ +/**/ + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + BOOST_MPL_PP_DEF_PARAMS_TAIL(2, typename N, na) + > +struct AUX778076_OP_NAME + : AUX778076_OP_N_CALLS(AUX778076_OP_ARITY, N) +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + AUX778076_OP_ARITY + , AUX778076_OP_NAME + , ( BOOST_MPL_PP_PARAMS(AUX778076_OP_ARITY, N) ) + ) +}; + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,( BOOST_PP_DEC(AUX778076_OP_ARITY), 2, )) +#include BOOST_PP_ITERATE() + +# undef AUX778076_OP_N_CALLS +# undef AUX778076_OP_RIGHT_OPERAND + +# else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +/// forward declaration +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct BOOST_PP_CAT(AUX778076_OP_NAME,2); + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + BOOST_MPL_PP_DEF_PARAMS_TAIL(2, typename N, na) + > +struct AUX778076_OP_NAME +#if BOOST_WORKAROUND(BOOST_MSVC, == 1300) + : aux::msvc_eti_base< typename if_< +#else + : if_< +#endif + is_na + , BOOST_PP_CAT(AUX778076_OP_NAME,2) + , AUX778076_OP_NAME< + BOOST_PP_CAT(AUX778076_OP_NAME,2) + , BOOST_MPL_PP_EXT_PARAMS(3, BOOST_PP_INC(AUX778076_OP_ARITY), N) + > + >::type +#if BOOST_WORKAROUND(BOOST_MSVC, == 1300) + > +#endif +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + AUX778076_OP_ARITY + , AUX778076_OP_NAME + , ( BOOST_MPL_PP_PARAMS(AUX778076_OP_ARITY, N) ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct BOOST_PP_CAT(AUX778076_OP_NAME,2) + +#endif + +#else // AUX778076_OP_ARITY == 2 + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct AUX778076_OP_NAME + +#endif + +#if !defined(BOOST_MPL_CFG_MSVC_ETI_BUG) + : AUX778076_OP_IMPL_NAME< + typename AUX778076_OP_TAG_NAME::type + , typename AUX778076_OP_TAG_NAME::type + >::template apply::type +#else + : aux::msvc_eti_base< typename apply_wrap2< + AUX778076_OP_IMPL_NAME< + typename AUX778076_OP_TAG_NAME::type + , typename AUX778076_OP_TAG_NAME::type + > + , N1 + , N2 + >::type >::type +#endif +{ +#if AUX778076_OP_ARITY != 2 + +# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + AUX778076_OP_ARITY + , AUX778076_OP_NAME + , ( BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(2, N, na) ) + ) +# else + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, BOOST_PP_CAT(AUX778076_OP_NAME,2), (N1, N2)) +# endif + +#else + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, AUX778076_OP_NAME, (N1, N2)) +#endif +}; + +BOOST_MPL_AUX_NA_SPEC2(2, AUX778076_OP_ARITY, AUX778076_OP_NAME) + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +///// iteration, depth == 1 + +// For gcc 4.4 compatability, we must include the +// BOOST_PP_ITERATION_DEPTH test inside an #else clause. +#else // BOOST_PP_IS_ITERATING +#if BOOST_PP_ITERATION_DEPTH() == 1 + +# define i_ BOOST_PP_FRAME_ITERATION(1) + +template< + BOOST_MPL_PP_PARAMS(i_, typename N) + > +struct AUX778076_OP_NAME +#if i_ != 2 + : AUX778076_OP_N_CALLS(i_, N) +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + AUX778076_OP_ARITY + , AUX778076_OP_NAME + , ( BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(i_, N, na) ) + ) +}; +#endif + +# undef i_ + +#endif // BOOST_PP_ITERATION_DEPTH() +#endif // BOOST_PP_IS_ITERATING diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/advance_backward.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/advance_backward.hpp new file mode 100644 index 0000000000..5cb50dc0c2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/advance_backward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_backward; +template<> +struct advance_backward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_backward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_backward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_backward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_backward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef typename prior::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_backward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/advance_forward.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/advance_forward.hpp new file mode 100644 index 0000000000..9654ee330b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/advance_forward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_forward; +template<> +struct advance_forward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_forward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_forward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_forward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_forward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef typename next::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_forward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/and.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/and.hpp new file mode 100644 index 0000000000..f34568902d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/and.hpp @@ -0,0 +1,69 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "and.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct and_impl + : false_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct and_impl< true,T1,T2,T3,T4 > + : and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , true_ + > +{ +}; + +template<> +struct and_impl< + true + , true_, true_, true_, true_ + > + : true_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = true_, typename T4 = true_, typename T5 = true_ + > +struct and_ + + : aux::and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , and_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , and_ + ) + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/apply.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/apply.hpp new file mode 100644 index 0000000000..bce7c2c3ab --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/apply.hpp @@ -0,0 +1,169 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0 + + : apply_wrap0< + typename lambda::type + + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) +}; + +template< + typename F + > +struct apply< F,na,na,na,na,na > + : apply0 +{ +}; + +template< + typename F, typename T1 + > +struct apply1 + + : apply_wrap1< + typename lambda::type + , T1 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) +}; + +template< + typename F, typename T1 + > +struct apply< F,T1,na,na,na,na > + : apply1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct apply2 + + : apply_wrap2< + typename lambda::type + , T1, T2 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) +}; + +template< + typename F, typename T1, typename T2 + > +struct apply< F,T1,T2,na,na,na > + : apply2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3 + + : apply_wrap3< + typename lambda::type + , T1, T2, T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply< F,T1,T2,T3,na,na > + : apply3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4 + + : apply_wrap4< + typename lambda::type + , T1, T2, T3, T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply< F,T1,T2,T3,T4,na > + : apply4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5 + + : apply_wrap5< + typename lambda::type + , T1, T2, T3, T4, T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) +}; + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply + : apply5< F,T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/apply_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/apply_fwd.hpp new file mode 100644 index 0000000000..1ba706ff2a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/apply_fwd.hpp @@ -0,0 +1,52 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply; + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/apply_wrap.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/apply_wrap.hpp new file mode 100644 index 0000000000..45b75c78ec --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/apply_wrap.hpp @@ -0,0 +1,461 @@ + +// Copyright Aleksey Gurtovoy 2000-2008 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + int N, typename F + > +struct apply_wrap_impl0; + +template< typename F, bool F_has_apply > +struct apply_wrap_impl0_bcb { + typedef typename F::template apply type; +}; + +template< typename F > +struct apply_wrap_impl0_bcb< F,true > { + typedef typename F::apply type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 0 + , F + + > +{ + typedef apply_wrap_impl0_bcb< F, aux::has_apply::value >::type type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 1 + , F + + > +{ + typedef typename F::template apply< + + na + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 2 + , F + + > +{ + typedef typename F::template apply< + + na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 3 + , F + + > +{ + typedef typename F::template apply< + + na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 4 + , F + + > +{ + typedef typename F::template apply< + + na, na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 5 + , F + + > +{ + typedef typename F::template apply< + + na, na, na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap0 + : apply_wrap_impl0< + ::boost::mpl::aux::arity< F,0 >::value + , F + + >::type +{ +}; + +template< + int N, typename F, typename T1 + > +struct apply_wrap_impl1; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 1 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 2 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 3 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 4 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 5 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na, na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap1 + : apply_wrap_impl1< + ::boost::mpl::aux::arity< F,1 >::value + , F + , T1 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2 + > +struct apply_wrap_impl2; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 2 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 3 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 4 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na, na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 5 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na, na, na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap2 + : apply_wrap_impl2< + ::boost::mpl::aux::arity< F,2 >::value + , F + , T1, T2 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 3 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 4 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 5 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + , na, na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap3 + : apply_wrap_impl3< + ::boost::mpl::aux::arity< F,3 >::value + , F + , T1, T2, T3 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4< + 4 + , F + , T1, T2, T3, T4 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4< + 5 + , F + , T1, T2, T3, T4 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap4 + : apply_wrap_impl4< + ::boost::mpl::aux::arity< F,4 >::value + , F + , T1, T2, T3, T4 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap_impl5; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap_impl5< + 5 + , F + , T1, T2, T3, T4, T5 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4, T5 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap5 + : apply_wrap_impl5< + ::boost::mpl::aux::arity< F,5 >::value + , F + , T1, T2, T3, T4, T5 + >::type +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/arg.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/arg.hpp new file mode 100644 index 0000000000..3ac43401af --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/arg.hpp @@ -0,0 +1,117 @@ + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > +{ + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<1> +{ + BOOST_STATIC_CONSTANT(int, value = 1); + typedef arg<2> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<2> +{ + BOOST_STATIC_CONSTANT(int, value = 2); + typedef arg<3> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + typedef U2 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<3> +{ + BOOST_STATIC_CONSTANT(int, value = 3); + typedef arg<4> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + typedef U3 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<4> +{ + BOOST_STATIC_CONSTANT(int, value = 4); + typedef arg<5> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + typedef U4 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<5> +{ + BOOST_STATIC_CONSTANT(int, value = 5); + typedef arg<6> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + typedef U5 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp new file mode 100644 index 0000000000..74b0029912 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp @@ -0,0 +1,300 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "basic_bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; + + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/bind.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/bind.hpp new file mode 100644 index 0000000000..e769a0cb9d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/bind.hpp @@ -0,0 +1,397 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + typename T + , typename Arg + > +struct replace_unnamed_arg +{ + typedef Arg next; + typedef T type; +}; + +template< + typename Arg + > +struct replace_unnamed_arg< arg< -1 >, Arg > +{ + typedef typename Arg::next next; + typedef Arg type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + typedef aux::replace_unnamed_arg< T5,n5 > r5; + typedef typename r5::type a5; + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/bind_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/bind_fwd.hpp new file mode 100644 index 0000000000..962b5c98bc --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/bind_fwd.hpp @@ -0,0 +1,46 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/bitand.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/bitand.hpp new file mode 100644 index 0000000000..527b6894fc --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/bitand.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitand_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitand_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitand_< N1,N2,N3,N4,na > + + : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitand_< N1,N2,N3,na,na > + + : bitand_< bitand_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitand_< N1,N2,na,na,na > + : bitand_impl< + typename bitand_tag::type + , typename bitand_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + & BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/bitor.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/bitor.hpp new file mode 100644 index 0000000000..3f0d5caa5a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/bitor.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitor_< N1,N2,N3,N4,na > + + : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitor_< N1,N2,N3,na,na > + + : bitor_< bitor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitor_< N1,N2,na,na,na > + : bitor_impl< + typename bitor_tag::type + , typename bitor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + | BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/bitxor.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/bitxor.hpp new file mode 100644 index 0000000000..06996c03b8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/bitxor.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitxor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitxor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitxor_< N1,N2,N3,N4,na > + + : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitxor_< N1,N2,N3,na,na > + + : bitxor_< bitxor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitxor_< N1,N2,na,na,na > + : bitxor_impl< + typename bitxor_tag::type + , typename bitxor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/deque.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/deque.hpp new file mode 100644 index 0000000000..06505c9360 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/deque.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "deque.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct deque; + +template< + + > +struct deque< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct deque< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct deque< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct deque< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct deque< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct deque< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct deque< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct deque + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/divides.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/divides.hpp new file mode 100644 index 0000000000..6b4178a9c7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/divides.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct divides_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , divides + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct divides< N1,N2,N3,N4,na > + + : divides< divides< divides< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct divides< N1,N2,N3,na,na > + + : divides< divides< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct divides< N1,N2,na,na,na > + : divides_impl< + typename divides_tag::type + , typename divides_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + / BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/equal_to.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/equal_to.hpp new file mode 100644 index 0000000000..901a93c2f4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/equal_to.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + + : equal_to_impl< + typename equal_to_tag::type + , typename equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/fold_impl.hpp new file mode 100644 index 0000000000..45ab4e7c6d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl +{ + typedef fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,First,Last,State,ForwardOp > + : fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp new file mode 100644 index 0000000000..8b2bf59063 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp @@ -0,0 +1,558 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "full_lambda.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Arity + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg,Tag, int_< -1 > > +{ + typedef true_ is_le; + typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 + typedef mpl::protect type; +}; + +template< + typename F + , typename Tag + > +struct lambda< + bind0 + , Tag + , int_<1> + > +{ + typedef false_ is_le; + typedef bind0< + F + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1 +{ + typedef F< + typename L1::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1< true_,Tag,F,L1 > +{ + typedef bind1< + quote1< F,Tag > + , typename L1::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1 > class F + , typename T1 + , typename Tag + > +struct lambda< + F + , Tag + , int_<1> + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1 + , typename Tag + > +struct lambda< + bind1< F,T1 > + , Tag + , int_<2> + > +{ + typedef false_ is_le; + typedef bind1< + F + , T1 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2 +{ + typedef F< + typename L1::type, typename L2::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2< true_,Tag,F,L1,L2 > +{ + typedef bind2< + quote2< F,Tag > + , typename L1::result_, typename L2::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + , typename Tag + > +struct lambda< + F< T1,T2 > + , Tag + , int_<2> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2 + , typename Tag + > +struct lambda< + bind2< F,T1,T2 > + , Tag + , int_<3> + > +{ + typedef false_ is_le; + typedef bind2< + F + , T1, T2 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3< true_,Tag,F,L1,L2,L3 > +{ + typedef bind3< + quote3< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + F< T1,T2,T3 > + , Tag + , int_<3> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + , int_<4> + > +{ + typedef false_ is_le; + typedef bind3< + F + , T1, T2, T3 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > +{ + typedef bind4< + quote4< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4 > + , Tag + , int_<4> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + , int_<5> + > +{ + typedef false_ is_le; + typedef bind4< + F + , T1, T2, T3, T4 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type, typename L5::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > +{ + typedef bind5< + quote5< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4,T5 > + , Tag + , int_<5> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + , int_<6> + > +{ + typedef false_ is_le; + typedef bind5< + F + , T1, T2, T3, T4, T5 + > result_; + + typedef result_ type; +}; + +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< mpl::protect,Tag, int_<1> > +{ + typedef false_ is_le; + typedef mpl::protect result_; + typedef result_ type; +}; + +/// specializations for the main 'bind' form + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + , int_<6> + > +{ + typedef false_ is_le; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; +}; + +template< + typename F + , typename Tag1 + , typename Tag2 + , typename Arity + > +struct lambda< + lambda< F,Tag1,Arity > + , Tag2 + , int_<3> + > +{ + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef bind1< quote1, typename l1::result_ > arity_; + typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3; + typedef aux::le_result3 le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda) + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/greater.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/greater.hpp new file mode 100644 index 0000000000..3d1c3dcead --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/greater.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + + : greater_impl< + typename greater_tag::type + , typename greater_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/greater_equal.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/greater_equal.hpp new file mode 100644 index 0000000000..fb011866e7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/greater_equal.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + + : greater_equal_impl< + typename greater_equal_tag::type + , typename greater_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/inherit.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/inherit.hpp new file mode 100644 index 0000000000..6adcc0142e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/inherit.hpp @@ -0,0 +1,139 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : T1, T2 +{ + typedef inherit2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +template< typename T1 > +struct inherit2< T1,empty_base > +{ + typedef T1 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) +}; + +template< typename T2 > +struct inherit2< empty_base,T2 > +{ + typedef T2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) +}; + +template<> +struct inherit2< empty_base,empty_base > +{ + typedef empty_base type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1, typename T2, typename T3, typename T4, typename T5 + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/iter_fold_if_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/iter_fold_if_impl.hpp new file mode 100644 index 0000000000..b767e95862 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/iter_fold_if_impl.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< typename Iterator, typename State > +struct iter_fold_if_null_step +{ + typedef State state; + typedef Iterator iterator; +}; + +template< bool > +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef typename apply2< StateOp,State,Iterator >::type state; + typedef typename IteratorOp::type iterator; + }; +}; + +template<> +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef State state; + typedef Iterator iterator; + }; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename Predicate + > +struct iter_fold_if_forward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename BackwardOp + , typename Predicate + > +struct iter_fold_if_backward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,BackwardOp, identity > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename ForwardPredicate + , typename BackwardOp + , typename BackwardPredicate + > +struct iter_fold_if_impl +{ + private: + typedef iter_fold_if_null_step< Iterator,State > forward_step0; + typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; + typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; + typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; + typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; + + + typedef typename if_< + typename forward_step4::not_last + , iter_fold_if_impl< + typename forward_step4::iterator + , typename forward_step4::state + , ForwardOp + , ForwardPredicate + , BackwardOp + , BackwardPredicate + > + , iter_fold_if_null_step< + typename forward_step4::iterator + , typename forward_step4::state + > + >::type backward_step4; + + typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; + typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; + typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; + typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; + + + public: + typedef typename backward_step0::state state; + typedef typename backward_step4::iterator iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/iter_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/iter_fold_impl.hpp new file mode 100644 index 0000000000..1dd216c8aa --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/iter_fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl +{ + typedef iter_fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,First,Last,State,ForwardOp > + : iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp new file mode 100644 index 0000000000..75b30ce32f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp @@ -0,0 +1,229 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ + { + typedef T type; + typedef is_placeholder is_le; + }; +}; + +template<> struct lambda_impl< int_<1> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + + typedef bind1< + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<2> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; + + typedef bind2< + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<3> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; + + typedef bind3< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<4> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; + + typedef bind4< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<5> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; + + typedef bind5< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Protect + > +struct lambda +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity::type arity_; + typedef typename aux::lambda_impl + ::template result_< T,Tag,Protect > l_; + + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; + +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/less.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/less.hpp new file mode 100644 index 0000000000..0b6ce1d4bf --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/less.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + + : less_impl< + typename less_tag::type + , typename less_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/less_equal.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/less_equal.hpp new file mode 100644 index 0000000000..0010e08451 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/less_equal.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + + : less_equal_impl< + typename less_equal_tag::type + , typename less_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/list.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/list.hpp new file mode 100644 index 0000000000..cbd58acd86 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/list.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct list; + +template< + + > +struct list< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list0< > +{ + typedef list0< >::type type; +}; + +template< + typename T0 + > +struct list< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list1 +{ + typedef typename list1::type type; +}; + +template< + typename T0, typename T1 + > +struct list< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list2< T0,T1 > +{ + typedef typename list2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct list< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list3< T0,T1,T2 > +{ + typedef typename list3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct list< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list4< T0,T1,T2,T3 > +{ + typedef typename list4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct list< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list5< T0,T1,T2,T3,T4 > +{ + typedef typename list5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct list< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list + : list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/list_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/list_c.hpp new file mode 100644 index 0000000000..495c3f7f19 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/list_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct list_c; + +template< + typename T + > +struct list_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list0_c +{ + typedef typename list0_c::type type; +}; + +template< + typename T, long C0 + > +struct list_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list1_c< T,C0 > +{ + typedef typename list1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct list_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list2_c< T,C0,C1 > +{ + typedef typename list2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct list_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list3_c< T,C0,C1,C2 > +{ + typedef typename list3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct list_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list4_c< T,C0,C1,C2,C3 > +{ + typedef typename list4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct list_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c + : list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/map.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/map.hpp new file mode 100644 index 0000000000..80ef156e49 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/map.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map; + +template< + + > +struct map< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map0< > +{ + typedef map0< >::type type; +}; + +template< + typename T0 + > +struct map< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map1 +{ + typedef typename map1::type type; +}; + +template< + typename T0, typename T1 + > +struct map< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map2< T0,T1 > +{ + typedef typename map2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct map< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map3< T0,T1,T2 > +{ + typedef typename map3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct map< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map4< T0,T1,T2,T3 > +{ + typedef typename map4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct map< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map5< T0,T1,T2,T3,T4 > +{ + typedef typename map5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct map< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map + : map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/minus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/minus.hpp new file mode 100644 index 0000000000..cfddc15b78 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/minus.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , minus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct minus< N1,N2,N3,N4,na > + + : minus< minus< minus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct minus< N1,N2,N3,na,na > + + : minus< minus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct minus< N1,N2,na,na,na > + : minus_impl< + typename minus_tag::type + , typename minus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + - BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/modulus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/modulus.hpp new file mode 100644 index 0000000000..eb5eff07e2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/modulus.hpp @@ -0,0 +1,101 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct modulus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + + : modulus_impl< + typename modulus_tag::type + , typename modulus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + % BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/not_equal_to.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/not_equal_to.hpp new file mode 100644 index 0000000000..68356eee4d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/not_equal_to.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct not_equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + + : not_equal_to_impl< + typename not_equal_to_tag::type + , typename not_equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/or.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/or.hpp new file mode 100644 index 0000000000..ff7ce9fd58 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/or.hpp @@ -0,0 +1,69 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "or.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct or_impl + : true_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct or_impl< false,T1,T2,T3,T4 > + : or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , false_ + > +{ +}; + +template<> +struct or_impl< + false + , false_, false_, false_, false_ + > + : false_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = false_, typename T4 = false_, typename T5 = false_ + > +struct or_ + + : aux::or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , or_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , or_ + ) + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/placeholders.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/placeholders.hpp new file mode 100644 index 0000000000..b306bbbcb9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/placeholders.hpp @@ -0,0 +1,105 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg< -1 > _; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +} + +}} + +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<1> _1; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<2> _2; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<3> _3; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<4> _4; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<5> _5; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<6> _6; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +} + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/plus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/plus.hpp new file mode 100644 index 0000000000..82539abc4c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/plus.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , plus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct plus< N1,N2,N3,N4,na > + + : plus< plus< plus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct plus< N1,N2,N3,na,na > + + : plus< plus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct plus< N1,N2,na,na,na > + : plus_impl< + typename plus_tag::type + , typename plus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + + BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/quote.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/quote.hpp new file mode 100644 index 0000000000..677a3f9bab --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/quote.hpp @@ -0,0 +1,119 @@ + +// Copyright Aleksey Gurtovoy 2000-2008 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "quote.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< typename T, bool has_type_ > +struct quote_impl + +{ + typedef typename T::type type; +}; + +template< typename T > +struct quote_impl< T,false > +{ + typedef T type; +}; + +template< + template< typename P1 > class F + , typename Tag = void_ + > +struct quote1 +{ + template< typename U1 > struct apply + + { + typedef typename quote_impl< + F + , aux::has_type< F >::value + >::type type; + }; +}; + +template< + template< typename P1, typename P2 > class F + , typename Tag = void_ + > +struct quote2 +{ + template< typename U1, typename U2 > struct apply + + { + typedef typename quote_impl< + F< U1,U2 > + , aux::has_type< F< U1,U2 > >::value + >::type type; + }; +}; + +template< + template< typename P1, typename P2, typename P3 > class F + , typename Tag = void_ + > +struct quote3 +{ + template< typename U1, typename U2, typename U3 > struct apply + + { + typedef typename quote_impl< + F< U1,U2,U3 > + , aux::has_type< F< U1,U2,U3 > >::value + >::type type; + }; +}; + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename Tag = void_ + > +struct quote4 +{ + template< + typename U1, typename U2, typename U3, typename U4 + > + struct apply + + { + typedef typename quote_impl< + F< U1,U2,U3,U4 > + , aux::has_type< F< U1,U2,U3,U4 > >::value + >::type type; + }; +}; + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename Tag = void_ + > +struct quote5 +{ + template< + typename U1, typename U2, typename U3, typename U4 + , typename U5 + > + struct apply + + { + typedef typename quote_impl< + F< U1,U2,U3,U4,U5 > + , aux::has_type< F< U1,U2,U3,U4,U5 > >::value + >::type type; + }; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/reverse_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/reverse_fold_impl.hpp new file mode 100644 index 0000000000..372f0d260a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/reverse_fold_impl.hpp @@ -0,0 +1,295 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< long N > +struct reverse_fold_chunk; + +template<> struct reverse_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct reverse_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; +}; + +template<> struct reverse_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; +}; + +template<> struct reverse_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; +}; + +template<> struct reverse_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; +}; + +template< long N > +struct reverse_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step; + +template< + typename Last + , typename State + > +struct reverse_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_fold_null_step< Last,State > + , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step +{ + typedef reverse_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename deref::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl + : reverse_fold_chunk + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/reverse_iter_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/reverse_iter_fold_impl.hpp new file mode 100644 index 0000000000..44aadf7a6d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/reverse_iter_fold_impl.hpp @@ -0,0 +1,295 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl; + +template< long N > +struct reverse_iter_fold_chunk; + +template<> struct reverse_iter_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; +}; + +template< long N > +struct reverse_iter_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_step; + +template< + typename Last + , typename State + > +struct reverse_iter_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_iter_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_iter_fold_null_step< Last,State > + , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_step +{ + typedef reverse_iter_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl + : reverse_iter_fold_chunk + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/set.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/set.hpp new file mode 100644 index 0000000000..ace3a4f07c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/set.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set; + +template< + + > +struct set< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set0< > +{ + typedef set0< >::type type; +}; + +template< + typename T0 + > +struct set< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set1 +{ + typedef typename set1::type type; +}; + +template< + typename T0, typename T1 + > +struct set< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set2< T0,T1 > +{ + typedef typename set2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct set< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set3< T0,T1,T2 > +{ + typedef typename set3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct set< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set4< T0,T1,T2,T3 > +{ + typedef typename set4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct set< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set5< T0,T1,T2,T3,T4 > +{ + typedef typename set5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct set< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set + : set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/set_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/set_c.hpp new file mode 100644 index 0000000000..4e6993ce27 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/set_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "set_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct set_c; + +template< + typename T + > +struct set_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set0_c +{ + typedef typename set0_c::type type; +}; + +template< + typename T, long C0 + > +struct set_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set1_c< T,C0 > +{ + typedef typename set1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct set_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set2_c< T,C0,C1 > +{ + typedef typename set2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct set_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set3_c< T,C0,C1,C2 > +{ + typedef typename set3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct set_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set4_c< T,C0,C1,C2,C3 > +{ + typedef typename set4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct set_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : set17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : set18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : set19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct set_c + : set20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/shift_left.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/shift_left.hpp new file mode 100644 index 0000000000..6d19e94ed3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/shift_left.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_left_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + + : shift_left_impl< + typename shift_left_tag::type + , typename shift_left_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + << BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/shift_right.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/shift_right.hpp new file mode 100644 index 0000000000..dd31d97cec --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/shift_right.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_right_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + + : shift_right_impl< + typename shift_right_tag::type + , typename shift_right_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + >> BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/template_arity.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/template_arity.hpp new file mode 100644 index 0000000000..b24a0a7e7f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/template_arity.hpp @@ -0,0 +1,40 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "template_arity.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< bool > +struct template_arity_impl +{ + template< typename F > struct result_ + : mpl::int_< -1 > + { + }; +}; + +template<> +struct template_arity_impl +{ + template< typename F > struct result_ + : F::arity + { + }; +}; + +template< typename F > +struct template_arity + : template_arity_impl< ::boost::mpl::aux::has_rebind::value > + ::template result_ +{ +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/times.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/times.hpp new file mode 100644 index 0000000000..ab100f1cb3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/times.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + : times< times< times< times< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , times + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct times< N1,N2,N3,N4,na > + + : times< times< times< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct times< N1,N2,N3,na,na > + + : times< times< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct times< N1,N2,na,na,na > + : times_impl< + typename times_tag::type + , typename times_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + * BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/unpack_args.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/unpack_args.hpp new file mode 100644 index 0000000000..f391dc1ab8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/unpack_args.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< int size, typename F, typename Args > +struct unpack_args_impl; + +template< typename F, typename Args > +struct unpack_args_impl< 0,F,Args > + : apply0< + F + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 1,F,Args > + : apply1< + F + , typename at_c< Args,0 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 2,F,Args > + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 3,F,Args > + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 4,F,Args > + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 5,F,Args > + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > +{ +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + { + typedef typename aux::unpack_args_impl< + size::value + , F + , Args + >::type type; + + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/vector.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/vector.hpp new file mode 100644 index 0000000000..803e217850 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/vector.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct vector; + +template< + + > +struct vector< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct vector< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct vector< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct vector< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct vector< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct vector< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct vector< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/vector_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/vector_c.hpp new file mode 100644 index 0000000000..643b7fd636 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc/vector_c.hpp @@ -0,0 +1,309 @@ + +// Copyright Aleksey Gurtovoy 2000-2008 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct vector_c; + +template< + typename T + > +struct vector_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector0_c +{ + typedef typename vector0_c::type type; +}; + +template< + typename T, long C0 + > +struct vector_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector1_c< T, T(C0) > +{ + typedef typename vector1_c< T, T(C0) >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct vector_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector2_c< T, T(C0), T(C1) > +{ + typedef typename vector2_c< T, T(C0), T(C1) >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct vector_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector3_c< T, T(C0), T(C1), T(C2) > +{ + typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct vector_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > +{ + typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct vector_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > +{ + typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > +{ + typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > +{ + typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > +{ + typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > +{ + typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > +{ + typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > +{ + typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > +{ + typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > +{ + typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > +{ + typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > +{ + typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > +{ + typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > +{ + typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > +{ + typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > +{ + typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c + : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > +{ + typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/advance_backward.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/advance_backward.hpp new file mode 100644 index 0000000000..26de94cea1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/advance_backward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_backward; +template<> +struct advance_backward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_backward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_backward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_backward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_backward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef typename prior::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_backward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/advance_forward.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/advance_forward.hpp new file mode 100644 index 0000000000..b137cc72af --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/advance_forward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_forward; +template<> +struct advance_forward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_forward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_forward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_forward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_forward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef typename next::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_forward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/and.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/and.hpp new file mode 100644 index 0000000000..010ad1fc84 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/and.hpp @@ -0,0 +1,69 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/and.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct and_impl + : false_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct and_impl< true,T1,T2,T3,T4 > + : and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , true_ + > +{ +}; + +template<> +struct and_impl< + true + , true_, true_, true_, true_ + > + : true_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = true_, typename T4 = true_, typename T5 = true_ + > +struct and_ + + : aux::and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , and_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , and_ + ) + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/apply.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/apply.hpp new file mode 100644 index 0000000000..e08eaccf03 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/apply.hpp @@ -0,0 +1,169 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0 + + : apply_wrap0< + typename lambda::type + + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) +}; + +template< + typename F + > +struct apply< F,na,na,na,na,na > + : apply0 +{ +}; + +template< + typename F, typename T1 + > +struct apply1 + + : apply_wrap1< + typename lambda::type + , T1 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) +}; + +template< + typename F, typename T1 + > +struct apply< F,T1,na,na,na,na > + : apply1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct apply2 + + : apply_wrap2< + typename lambda::type + , T1, T2 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) +}; + +template< + typename F, typename T1, typename T2 + > +struct apply< F,T1,T2,na,na,na > + : apply2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3 + + : apply_wrap3< + typename lambda::type + , T1, T2, T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply< F,T1,T2,T3,na,na > + : apply3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4 + + : apply_wrap4< + typename lambda::type + , T1, T2, T3, T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply< F,T1,T2,T3,T4,na > + : apply4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5 + + : apply_wrap5< + typename lambda::type + , T1, T2, T3, T4, T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) +}; + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply + : apply5< F,T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/apply_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/apply_fwd.hpp new file mode 100644 index 0000000000..b2ed5d5130 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/apply_fwd.hpp @@ -0,0 +1,52 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply; + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/apply_wrap.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/apply_wrap.hpp new file mode 100644 index 0000000000..2ffe7091bc --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/apply_wrap.hpp @@ -0,0 +1,456 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + int N, typename F + > +struct apply_wrap_impl0; + +template< + typename F + > +struct apply_wrap_impl0< + 0 + , F + + > +{ + typedef typename F::template apply< + +/// since the defaults are "lost", we have to pass *something* even for nullary +/// metafunction classes + na + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 1 + , F + + > +{ + typedef typename F::template apply< + + na + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 2 + , F + + > +{ + typedef typename F::template apply< + + na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 3 + , F + + > +{ + typedef typename F::template apply< + + na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 4 + , F + + > +{ + typedef typename F::template apply< + + na, na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 5 + , F + + > +{ + typedef typename F::template apply< + + na, na, na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap0 + : apply_wrap_impl0< + ::boost::mpl::aux::arity< F,0 >::value + , F + + >::type +{ +}; + +template< + int N, typename F, typename T1 + > +struct apply_wrap_impl1; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 1 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 2 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 3 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 4 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 5 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na, na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap1 + : apply_wrap_impl1< + ::boost::mpl::aux::arity< F,1 >::value + , F + , T1 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2 + > +struct apply_wrap_impl2; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 2 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 3 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 4 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na, na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 5 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na, na, na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap2 + : apply_wrap_impl2< + ::boost::mpl::aux::arity< F,2 >::value + , F + , T1, T2 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 3 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 4 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 5 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + , na, na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap3 + : apply_wrap_impl3< + ::boost::mpl::aux::arity< F,3 >::value + , F + , T1, T2, T3 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4< + 4 + , F + , T1, T2, T3, T4 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4< + 5 + , F + , T1, T2, T3, T4 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap4 + : apply_wrap_impl4< + ::boost::mpl::aux::arity< F,4 >::value + , F + , T1, T2, T3, T4 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap_impl5; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap_impl5< + 5 + , F + , T1, T2, T3, T4, T5 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4, T5 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap5 + : apply_wrap_impl5< + ::boost::mpl::aux::arity< F,5 >::value + , F + , T1, T2, T3, T4, T5 + >::type +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/arg.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/arg.hpp new file mode 100644 index 0000000000..6f2f8a8070 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/arg.hpp @@ -0,0 +1,123 @@ + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > +{ + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<1> +{ + BOOST_STATIC_CONSTANT(int, value = 1); + typedef arg<2> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<2> +{ + BOOST_STATIC_CONSTANT(int, value = 2); + typedef arg<3> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U2 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<3> +{ + BOOST_STATIC_CONSTANT(int, value = 3); + typedef arg<4> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U3 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<4> +{ + BOOST_STATIC_CONSTANT(int, value = 4); + typedef arg<5> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U4 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<5> +{ + BOOST_STATIC_CONSTANT(int, value = 5); + typedef arg<6> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U5 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/basic_bind.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/basic_bind.hpp new file mode 100644 index 0000000000..a29daa0bca --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/basic_bind.hpp @@ -0,0 +1,306 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; + + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/bind.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/bind.hpp new file mode 100644 index 0000000000..34b1b5c8b3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/bind.hpp @@ -0,0 +1,403 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + typename T + , typename Arg + > +struct replace_unnamed_arg +{ + typedef Arg next; + typedef T type; +}; + +template< + typename Arg + > +struct replace_unnamed_arg< arg< -1 >, Arg > +{ + typedef typename Arg::next next; + typedef Arg type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + typedef aux::replace_unnamed_arg< T5,n5 > r5; + typedef typename r5::type a5; + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/bind_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/bind_fwd.hpp new file mode 100644 index 0000000000..022cba3461 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/bind_fwd.hpp @@ -0,0 +1,46 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/bitand.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/bitand.hpp new file mode 100644 index 0000000000..0bbf54ea26 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/bitand.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitand_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitand_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitand_< N1,N2,N3,N4,na > + + : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitand_< N1,N2,N3,na,na > + + : bitand_< bitand_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitand_< N1,N2,na,na,na > + : bitand_impl< + typename bitand_tag::type + , typename bitand_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + & BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/bitor.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/bitor.hpp new file mode 100644 index 0000000000..55b31cb8a9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/bitor.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitor_< N1,N2,N3,N4,na > + + : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitor_< N1,N2,N3,na,na > + + : bitor_< bitor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitor_< N1,N2,na,na,na > + : bitor_impl< + typename bitor_tag::type + , typename bitor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + | BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/bitxor.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/bitxor.hpp new file mode 100644 index 0000000000..ec1939151d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/bitxor.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitxor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitxor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitxor_< N1,N2,N3,N4,na > + + : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitxor_< N1,N2,N3,na,na > + + : bitxor_< bitxor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitxor_< N1,N2,na,na,na > + : bitxor_impl< + typename bitxor_tag::type + , typename bitxor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/deque.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/deque.hpp new file mode 100644 index 0000000000..de67398a37 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/deque.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/deque.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct deque; + +template< + + > +struct deque< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct deque< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct deque< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct deque< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct deque< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct deque< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct deque< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct deque + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/divides.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/divides.hpp new file mode 100644 index 0000000000..86f16826f7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/divides.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct divides_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , divides + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct divides< N1,N2,N3,N4,na > + + : divides< divides< divides< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct divides< N1,N2,N3,na,na > + + : divides< divides< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct divides< N1,N2,na,na,na > + : divides_impl< + typename divides_tag::type + , typename divides_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + / BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/equal_to.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/equal_to.hpp new file mode 100644 index 0000000000..62c994589f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/equal_to.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + + : equal_to_impl< + typename equal_to_tag::type + , typename equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/fold_impl.hpp new file mode 100644 index 0000000000..9e7a29300d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl +{ + typedef fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,First,Last,State,ForwardOp > + : fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp new file mode 100644 index 0000000000..e3eef71b1e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp @@ -0,0 +1,558 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Arity + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg,Tag, int_< -1 > > +{ + typedef true_ is_le; + typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 + typedef mpl::protect type; +}; + +template< + typename F + , typename Tag + > +struct lambda< + bind0 + , Tag + , int_<1> + > +{ + typedef false_ is_le; + typedef bind0< + F + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1 +{ + typedef F< + typename L1::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1< true_,Tag,F,L1 > +{ + typedef bind1< + quote1< F,Tag > + , typename L1::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1 > class F + , typename T1 + , typename Tag + > +struct lambda< + F + , Tag + , int_<1> + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1 + , typename Tag + > +struct lambda< + bind1< F,T1 > + , Tag + , int_<2> + > +{ + typedef false_ is_le; + typedef bind1< + F + , T1 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2 +{ + typedef F< + typename L1::type, typename L2::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2< true_,Tag,F,L1,L2 > +{ + typedef bind2< + quote2< F,Tag > + , typename L1::result_, typename L2::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + , typename Tag + > +struct lambda< + F< T1,T2 > + , Tag + , int_<2> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2 + , typename Tag + > +struct lambda< + bind2< F,T1,T2 > + , Tag + , int_<3> + > +{ + typedef false_ is_le; + typedef bind2< + F + , T1, T2 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3< true_,Tag,F,L1,L2,L3 > +{ + typedef bind3< + quote3< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + F< T1,T2,T3 > + , Tag + , int_<3> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + , int_<4> + > +{ + typedef false_ is_le; + typedef bind3< + F + , T1, T2, T3 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > +{ + typedef bind4< + quote4< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4 > + , Tag + , int_<4> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + , int_<5> + > +{ + typedef false_ is_le; + typedef bind4< + F + , T1, T2, T3, T4 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type, typename L5::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > +{ + typedef bind5< + quote5< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4,T5 > + , Tag + , int_<5> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + , int_<6> + > +{ + typedef false_ is_le; + typedef bind5< + F + , T1, T2, T3, T4, T5 + > result_; + + typedef result_ type; +}; + +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< mpl::protect,Tag, int_<1> > +{ + typedef false_ is_le; + typedef mpl::protect result_; + typedef result_ type; +}; + +/// specializations for the main 'bind' form + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + , int_<6> + > +{ + typedef false_ is_le; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; +}; + +template< + typename F + , typename Tag1 + , typename Tag2 + , typename Arity + > +struct lambda< + lambda< F,Tag1,Arity > + , Tag2 + , int_<3> + > +{ + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef bind1< quote1, typename l1::result_ > arity_; + typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3; + typedef aux::le_result3 le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda) + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/greater.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/greater.hpp new file mode 100644 index 0000000000..14d8e08bff --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/greater.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + + : greater_impl< + typename greater_tag::type + , typename greater_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/greater_equal.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/greater_equal.hpp new file mode 100644 index 0000000000..2603f9184a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/greater_equal.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + + : greater_equal_impl< + typename greater_equal_tag::type + , typename greater_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/inherit.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/inherit.hpp new file mode 100644 index 0000000000..00f31c4226 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/inherit.hpp @@ -0,0 +1,141 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : T1, T2 +{ + typedef inherit2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +template< typename T1 > +struct inherit2< T1,empty_base > +{ + typedef T1 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) +}; + +template< typename T2 > +struct inherit2< empty_base,T2 > +{ + typedef T2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) +}; + +template<> +struct inherit2< empty_base,empty_base > +{ + typedef empty_base type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/iter_fold_if_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/iter_fold_if_impl.hpp new file mode 100644 index 0000000000..695179584d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/iter_fold_if_impl.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< typename Iterator, typename State > +struct iter_fold_if_null_step +{ + typedef State state; + typedef Iterator iterator; +}; + +template< bool > +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef typename apply2< StateOp,State,Iterator >::type state; + typedef typename IteratorOp::type iterator; + }; +}; + +template<> +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef State state; + typedef Iterator iterator; + }; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename Predicate + > +struct iter_fold_if_forward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename BackwardOp + , typename Predicate + > +struct iter_fold_if_backward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,BackwardOp, identity > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename ForwardPredicate + , typename BackwardOp + , typename BackwardPredicate + > +struct iter_fold_if_impl +{ + private: + typedef iter_fold_if_null_step< Iterator,State > forward_step0; + typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; + typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; + typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; + typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; + + + typedef typename if_< + typename forward_step4::not_last + , iter_fold_if_impl< + typename forward_step4::iterator + , typename forward_step4::state + , ForwardOp + , ForwardPredicate + , BackwardOp + , BackwardPredicate + > + , iter_fold_if_null_step< + typename forward_step4::iterator + , typename forward_step4::state + > + >::type backward_step4; + + typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; + typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; + typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; + typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; + + + public: + typedef typename backward_step0::state state; + typedef typename backward_step4::iterator iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/iter_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/iter_fold_impl.hpp new file mode 100644 index 0000000000..805790e86d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/iter_fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl +{ + typedef iter_fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,First,Last,State,ForwardOp > + : iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/lambda_no_ctps.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/lambda_no_ctps.hpp new file mode 100644 index 0000000000..890a198a46 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/lambda_no_ctps.hpp @@ -0,0 +1,229 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ + { + typedef T type; + typedef is_placeholder is_le; + }; +}; + +template<> struct lambda_impl< int_<1> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + + typedef bind1< + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<2> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; + + typedef bind2< + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<3> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; + + typedef bind3< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<4> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; + + typedef bind4< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<5> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; + + typedef bind5< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Protect + > +struct lambda +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity::type arity_; + typedef typename aux::lambda_impl + ::template result_< T,Tag,Protect > l_; + + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; + +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/less.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/less.hpp new file mode 100644 index 0000000000..4fe3cd17c4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/less.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + + : less_impl< + typename less_tag::type + , typename less_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/less_equal.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/less_equal.hpp new file mode 100644 index 0000000000..ca2894f6f9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/less_equal.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + + : less_equal_impl< + typename less_equal_tag::type + , typename less_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/list.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/list.hpp new file mode 100644 index 0000000000..4e8ad53d21 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/list.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct list; + +template< + + > +struct list< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list0< > +{ + typedef list0< >::type type; +}; + +template< + typename T0 + > +struct list< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list1 +{ + typedef typename list1::type type; +}; + +template< + typename T0, typename T1 + > +struct list< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list2< T0,T1 > +{ + typedef typename list2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct list< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list3< T0,T1,T2 > +{ + typedef typename list3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct list< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list4< T0,T1,T2,T3 > +{ + typedef typename list4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct list< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list5< T0,T1,T2,T3,T4 > +{ + typedef typename list5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct list< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list + : list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/list_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/list_c.hpp new file mode 100644 index 0000000000..0b48a7f8e1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/list_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct list_c; + +template< + typename T + > +struct list_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list0_c +{ + typedef typename list0_c::type type; +}; + +template< + typename T, long C0 + > +struct list_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list1_c< T,C0 > +{ + typedef typename list1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct list_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list2_c< T,C0,C1 > +{ + typedef typename list2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct list_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list3_c< T,C0,C1,C2 > +{ + typedef typename list3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct list_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list4_c< T,C0,C1,C2,C3 > +{ + typedef typename list4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct list_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c + : list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/map.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/map.hpp new file mode 100644 index 0000000000..837e013771 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/map.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map; + +template< + + > +struct map< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map0< > +{ + typedef map0< >::type type; +}; + +template< + typename T0 + > +struct map< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map1 +{ + typedef typename map1::type type; +}; + +template< + typename T0, typename T1 + > +struct map< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map2< T0,T1 > +{ + typedef typename map2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct map< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map3< T0,T1,T2 > +{ + typedef typename map3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct map< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map4< T0,T1,T2,T3 > +{ + typedef typename map4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct map< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map5< T0,T1,T2,T3,T4 > +{ + typedef typename map5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct map< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map + : map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/minus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/minus.hpp new file mode 100644 index 0000000000..71d4913766 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/minus.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , minus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct minus< N1,N2,N3,N4,na > + + : minus< minus< minus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct minus< N1,N2,N3,na,na > + + : minus< minus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct minus< N1,N2,na,na,na > + : minus_impl< + typename minus_tag::type + , typename minus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + - BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/modulus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/modulus.hpp new file mode 100644 index 0000000000..224b34930c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/modulus.hpp @@ -0,0 +1,101 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct modulus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + + : modulus_impl< + typename modulus_tag::type + , typename modulus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + % BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/not_equal_to.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/not_equal_to.hpp new file mode 100644 index 0000000000..98b21b1e22 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/not_equal_to.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct not_equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + + : not_equal_to_impl< + typename not_equal_to_tag::type + , typename not_equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/or.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/or.hpp new file mode 100644 index 0000000000..31e1aaa4e6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/or.hpp @@ -0,0 +1,69 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/or.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct or_impl + : true_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct or_impl< false,T1,T2,T3,T4 > + : or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , false_ + > +{ +}; + +template<> +struct or_impl< + false + , false_, false_, false_, false_ + > + : false_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = false_, typename T4 = false_, typename T5 = false_ + > +struct or_ + + : aux::or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , or_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , or_ + ) + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/placeholders.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/placeholders.hpp new file mode 100644 index 0000000000..ff97364b9b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/placeholders.hpp @@ -0,0 +1,105 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg< -1 > _; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +} + +}} + +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<1> _1; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<2> _2; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<3> _3; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<4> _4; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<5> _5; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<6> _6; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +} + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/plus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/plus.hpp new file mode 100644 index 0000000000..a9f6ee79a5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/plus.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , plus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct plus< N1,N2,N3,N4,na > + + : plus< plus< plus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct plus< N1,N2,N3,na,na > + + : plus< plus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct plus< N1,N2,na,na,na > + : plus_impl< + typename plus_tag::type + , typename plus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + + BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/quote.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/quote.hpp new file mode 100644 index 0000000000..e7a7f00196 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/quote.hpp @@ -0,0 +1,11 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/quote.hpp" header +// -- DO NOT modify by hand! + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/reverse_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/reverse_fold_impl.hpp new file mode 100644 index 0000000000..7a07414adf --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/reverse_fold_impl.hpp @@ -0,0 +1,295 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< long N > +struct reverse_fold_chunk; + +template<> struct reverse_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct reverse_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; +}; + +template<> struct reverse_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; +}; + +template<> struct reverse_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; +}; + +template<> struct reverse_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; +}; + +template< long N > +struct reverse_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step; + +template< + typename Last + , typename State + > +struct reverse_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_fold_null_step< Last,State > + , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step +{ + typedef reverse_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename deref::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl + : reverse_fold_chunk + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/reverse_iter_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/reverse_iter_fold_impl.hpp new file mode 100644 index 0000000000..39a4057b77 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/reverse_iter_fold_impl.hpp @@ -0,0 +1,295 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl; + +template< long N > +struct reverse_iter_fold_chunk; + +template<> struct reverse_iter_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; +}; + +template< long N > +struct reverse_iter_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_step; + +template< + typename Last + , typename State + > +struct reverse_iter_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_iter_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_iter_fold_null_step< Last,State > + , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_step +{ + typedef reverse_iter_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl + : reverse_iter_fold_chunk + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/set.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/set.hpp new file mode 100644 index 0000000000..5721922e11 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/set.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set; + +template< + + > +struct set< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set0< > +{ + typedef set0< >::type type; +}; + +template< + typename T0 + > +struct set< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set1 +{ + typedef typename set1::type type; +}; + +template< + typename T0, typename T1 + > +struct set< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set2< T0,T1 > +{ + typedef typename set2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct set< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set3< T0,T1,T2 > +{ + typedef typename set3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct set< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set4< T0,T1,T2,T3 > +{ + typedef typename set4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct set< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set5< T0,T1,T2,T3,T4 > +{ + typedef typename set5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct set< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set + : set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/set_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/set_c.hpp new file mode 100644 index 0000000000..cbeb932c13 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/set_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct set_c; + +template< + typename T + > +struct set_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set0_c +{ + typedef typename set0_c::type type; +}; + +template< + typename T, long C0 + > +struct set_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set1_c< T,C0 > +{ + typedef typename set1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct set_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set2_c< T,C0,C1 > +{ + typedef typename set2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct set_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set3_c< T,C0,C1,C2 > +{ + typedef typename set3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct set_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set4_c< T,C0,C1,C2,C3 > +{ + typedef typename set4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct set_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : set17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : set18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : set19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct set_c + : set20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/shift_left.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/shift_left.hpp new file mode 100644 index 0000000000..b5b181ce19 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/shift_left.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_left_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + + : shift_left_impl< + typename shift_left_tag::type + , typename shift_left_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + << BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/shift_right.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/shift_right.hpp new file mode 100644 index 0000000000..f7a342e989 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/shift_right.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_right_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + + : shift_right_impl< + typename shift_right_tag::type + , typename shift_right_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + >> BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/template_arity.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/template_arity.hpp new file mode 100644 index 0000000000..1164f0f8c2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/template_arity.hpp @@ -0,0 +1,40 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< bool > +struct template_arity_impl +{ + template< typename F > struct result_ + : mpl::int_< -1 > + { + }; +}; + +template<> +struct template_arity_impl +{ + template< typename F > struct result_ + : F::arity + { + }; +}; + +template< typename F > +struct template_arity + : template_arity_impl< ::boost::mpl::aux::has_rebind::value > + ::template result_ +{ +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/times.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/times.hpp new file mode 100644 index 0000000000..cb97cc4e13 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/times.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + : times< times< times< times< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , times + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct times< N1,N2,N3,N4,na > + + : times< times< times< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct times< N1,N2,N3,na,na > + + : times< times< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct times< N1,N2,na,na,na > + : times_impl< + typename times_tag::type + , typename times_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + * BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/unpack_args.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/unpack_args.hpp new file mode 100644 index 0000000000..ef7c2b016e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/unpack_args.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< int size, typename F, typename Args > +struct unpack_args_impl; + +template< typename F, typename Args > +struct unpack_args_impl< 0,F,Args > + : apply0< + F + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 1,F,Args > + : apply1< + F + , typename at_c< Args,0 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 2,F,Args > + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 3,F,Args > + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 4,F,Args > + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 5,F,Args > + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > +{ +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + { + typedef typename aux::unpack_args_impl< + size::value + , F + , Args + >::type type; + + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/vector.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/vector.hpp new file mode 100644 index 0000000000..bfa9565a53 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/vector.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct vector; + +template< + + > +struct vector< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct vector< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct vector< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct vector< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct vector< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct vector< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct vector< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/vector_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/vector_c.hpp new file mode 100644 index 0000000000..0f1560d7f1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc551/vector_c.hpp @@ -0,0 +1,309 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct vector_c; + +template< + typename T + > +struct vector_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector0_c +{ + typedef typename vector0_c::type type; +}; + +template< + typename T, long C0 + > +struct vector_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector1_c< T, T(C0) > +{ + typedef typename vector1_c< T, T(C0) >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct vector_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector2_c< T, T(C0), T(C1) > +{ + typedef typename vector2_c< T, T(C0), T(C1) >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct vector_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector3_c< T, T(C0), T(C1), T(C2) > +{ + typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct vector_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > +{ + typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct vector_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > +{ + typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > +{ + typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > +{ + typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > +{ + typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > +{ + typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > +{ + typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > +{ + typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > +{ + typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > +{ + typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > +{ + typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > +{ + typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > +{ + typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > +{ + typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > +{ + typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > +{ + typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c + : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > +{ + typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/advance_backward.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/advance_backward.hpp new file mode 100644 index 0000000000..5cb50dc0c2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/advance_backward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_backward; +template<> +struct advance_backward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_backward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_backward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_backward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_backward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef typename prior::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_backward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/advance_forward.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/advance_forward.hpp new file mode 100644 index 0000000000..9654ee330b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/advance_forward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_forward; +template<> +struct advance_forward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_forward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_forward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_forward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_forward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef typename next::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_forward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/and.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/and.hpp new file mode 100644 index 0000000000..f34568902d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/and.hpp @@ -0,0 +1,69 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "and.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct and_impl + : false_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct and_impl< true,T1,T2,T3,T4 > + : and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , true_ + > +{ +}; + +template<> +struct and_impl< + true + , true_, true_, true_, true_ + > + : true_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = true_, typename T4 = true_, typename T5 = true_ + > +struct and_ + + : aux::and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , and_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , and_ + ) + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/apply.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/apply.hpp new file mode 100644 index 0000000000..bce7c2c3ab --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/apply.hpp @@ -0,0 +1,169 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0 + + : apply_wrap0< + typename lambda::type + + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) +}; + +template< + typename F + > +struct apply< F,na,na,na,na,na > + : apply0 +{ +}; + +template< + typename F, typename T1 + > +struct apply1 + + : apply_wrap1< + typename lambda::type + , T1 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) +}; + +template< + typename F, typename T1 + > +struct apply< F,T1,na,na,na,na > + : apply1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct apply2 + + : apply_wrap2< + typename lambda::type + , T1, T2 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) +}; + +template< + typename F, typename T1, typename T2 + > +struct apply< F,T1,T2,na,na,na > + : apply2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3 + + : apply_wrap3< + typename lambda::type + , T1, T2, T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply< F,T1,T2,T3,na,na > + : apply3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4 + + : apply_wrap4< + typename lambda::type + , T1, T2, T3, T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply< F,T1,T2,T3,T4,na > + : apply4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5 + + : apply_wrap5< + typename lambda::type + , T1, T2, T3, T4, T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) +}; + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply + : apply5< F,T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/apply_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/apply_fwd.hpp new file mode 100644 index 0000000000..1ba706ff2a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/apply_fwd.hpp @@ -0,0 +1,52 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply; + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/apply_wrap.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/apply_wrap.hpp new file mode 100644 index 0000000000..d88129dadf --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/apply_wrap.hpp @@ -0,0 +1,456 @@ + +// Copyright Aleksey Gurtovoy 2000-2008 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + int N, typename F + > +struct apply_wrap_impl0; + +template< + typename F + > +struct apply_wrap_impl0< + 0 + , F + + > +{ + typedef typename F::template apply< + +/// since the defaults are "lost", we have to pass *something* even for nullary +/// metafunction classes + na + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 1 + , F + + > +{ + typedef typename F::template apply< + + na + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 2 + , F + + > +{ + typedef typename F::template apply< + + na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 3 + , F + + > +{ + typedef typename F::template apply< + + na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 4 + , F + + > +{ + typedef typename F::template apply< + + na, na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 5 + , F + + > +{ + typedef typename F::template apply< + + na, na, na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap0 + : apply_wrap_impl0< + ::boost::mpl::aux::arity< F,0 >::value + , F + + >::type +{ +}; + +template< + int N, typename F, typename T1 + > +struct apply_wrap_impl1; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 1 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 2 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 3 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 4 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 5 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na, na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap1 + : apply_wrap_impl1< + ::boost::mpl::aux::arity< F,1 >::value + , F + , T1 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2 + > +struct apply_wrap_impl2; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 2 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 3 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 4 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na, na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 5 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na, na, na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap2 + : apply_wrap_impl2< + ::boost::mpl::aux::arity< F,2 >::value + , F + , T1, T2 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 3 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 4 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 5 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + , na, na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap3 + : apply_wrap_impl3< + ::boost::mpl::aux::arity< F,3 >::value + , F + , T1, T2, T3 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4< + 4 + , F + , T1, T2, T3, T4 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4< + 5 + , F + , T1, T2, T3, T4 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap4 + : apply_wrap_impl4< + ::boost::mpl::aux::arity< F,4 >::value + , F + , T1, T2, T3, T4 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap_impl5; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap_impl5< + 5 + , F + , T1, T2, T3, T4, T5 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4, T5 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap5 + : apply_wrap_impl5< + ::boost::mpl::aux::arity< F,5 >::value + , F + , T1, T2, T3, T4, T5 + >::type +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/arg.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/arg.hpp new file mode 100644 index 0000000000..3ac43401af --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/arg.hpp @@ -0,0 +1,117 @@ + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > +{ + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<1> +{ + BOOST_STATIC_CONSTANT(int, value = 1); + typedef arg<2> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<2> +{ + BOOST_STATIC_CONSTANT(int, value = 2); + typedef arg<3> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + typedef U2 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<3> +{ + BOOST_STATIC_CONSTANT(int, value = 3); + typedef arg<4> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + typedef U3 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<4> +{ + BOOST_STATIC_CONSTANT(int, value = 4); + typedef arg<5> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + typedef U4 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<5> +{ + BOOST_STATIC_CONSTANT(int, value = 5); + typedef arg<6> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + typedef U5 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/basic_bind.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/basic_bind.hpp new file mode 100644 index 0000000000..74b0029912 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/basic_bind.hpp @@ -0,0 +1,300 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "basic_bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; + + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/bind.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/bind.hpp new file mode 100644 index 0000000000..e769a0cb9d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/bind.hpp @@ -0,0 +1,397 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + typename T + , typename Arg + > +struct replace_unnamed_arg +{ + typedef Arg next; + typedef T type; +}; + +template< + typename Arg + > +struct replace_unnamed_arg< arg< -1 >, Arg > +{ + typedef typename Arg::next next; + typedef Arg type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1, typename U2, typename U3, typename U4, typename U5 + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + typedef aux::replace_unnamed_arg< T5,n5 > r5; + typedef typename r5::type a5; + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/bind_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/bind_fwd.hpp new file mode 100644 index 0000000000..962b5c98bc --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/bind_fwd.hpp @@ -0,0 +1,46 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/bitand.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/bitand.hpp new file mode 100644 index 0000000000..527b6894fc --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/bitand.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitand_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitand_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitand_< N1,N2,N3,N4,na > + + : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitand_< N1,N2,N3,na,na > + + : bitand_< bitand_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitand_< N1,N2,na,na,na > + : bitand_impl< + typename bitand_tag::type + , typename bitand_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + & BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/bitor.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/bitor.hpp new file mode 100644 index 0000000000..3f0d5caa5a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/bitor.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitor_< N1,N2,N3,N4,na > + + : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitor_< N1,N2,N3,na,na > + + : bitor_< bitor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitor_< N1,N2,na,na,na > + : bitor_impl< + typename bitor_tag::type + , typename bitor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + | BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/bitxor.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/bitxor.hpp new file mode 100644 index 0000000000..06996c03b8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/bitxor.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitxor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitxor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitxor_< N1,N2,N3,N4,na > + + : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitxor_< N1,N2,N3,na,na > + + : bitxor_< bitxor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitxor_< N1,N2,na,na,na > + : bitxor_impl< + typename bitxor_tag::type + , typename bitxor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/deque.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/deque.hpp new file mode 100644 index 0000000000..06505c9360 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/deque.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "deque.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct deque; + +template< + + > +struct deque< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct deque< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct deque< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct deque< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct deque< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct deque< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct deque< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct deque + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/divides.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/divides.hpp new file mode 100644 index 0000000000..6b4178a9c7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/divides.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct divides_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , divides + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct divides< N1,N2,N3,N4,na > + + : divides< divides< divides< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct divides< N1,N2,N3,na,na > + + : divides< divides< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct divides< N1,N2,na,na,na > + : divides_impl< + typename divides_tag::type + , typename divides_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + / BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/equal_to.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/equal_to.hpp new file mode 100644 index 0000000000..901a93c2f4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/equal_to.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + + : equal_to_impl< + typename equal_to_tag::type + , typename equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/fold_impl.hpp new file mode 100644 index 0000000000..45ab4e7c6d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl +{ + typedef fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,First,Last,State,ForwardOp > + : fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/full_lambda.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/full_lambda.hpp new file mode 100644 index 0000000000..8b2bf59063 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/full_lambda.hpp @@ -0,0 +1,558 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "full_lambda.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Arity + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg,Tag, int_< -1 > > +{ + typedef true_ is_le; + typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 + typedef mpl::protect type; +}; + +template< + typename F + , typename Tag + > +struct lambda< + bind0 + , Tag + , int_<1> + > +{ + typedef false_ is_le; + typedef bind0< + F + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1 +{ + typedef F< + typename L1::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1< true_,Tag,F,L1 > +{ + typedef bind1< + quote1< F,Tag > + , typename L1::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1 > class F + , typename T1 + , typename Tag + > +struct lambda< + F + , Tag + , int_<1> + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1 + , typename Tag + > +struct lambda< + bind1< F,T1 > + , Tag + , int_<2> + > +{ + typedef false_ is_le; + typedef bind1< + F + , T1 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2 +{ + typedef F< + typename L1::type, typename L2::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2< true_,Tag,F,L1,L2 > +{ + typedef bind2< + quote2< F,Tag > + , typename L1::result_, typename L2::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + , typename Tag + > +struct lambda< + F< T1,T2 > + , Tag + , int_<2> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2 + , typename Tag + > +struct lambda< + bind2< F,T1,T2 > + , Tag + , int_<3> + > +{ + typedef false_ is_le; + typedef bind2< + F + , T1, T2 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3< true_,Tag,F,L1,L2,L3 > +{ + typedef bind3< + quote3< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + F< T1,T2,T3 > + , Tag + , int_<3> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + , int_<4> + > +{ + typedef false_ is_le; + typedef bind3< + F + , T1, T2, T3 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > +{ + typedef bind4< + quote4< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4 > + , Tag + , int_<4> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + , int_<5> + > +{ + typedef false_ is_le; + typedef bind4< + F + , T1, T2, T3, T4 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type, typename L5::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > +{ + typedef bind5< + quote5< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4,T5 > + , Tag + , int_<5> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + , int_<6> + > +{ + typedef false_ is_le; + typedef bind5< + F + , T1, T2, T3, T4, T5 + > result_; + + typedef result_ type; +}; + +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< mpl::protect,Tag, int_<1> > +{ + typedef false_ is_le; + typedef mpl::protect result_; + typedef result_ type; +}; + +/// specializations for the main 'bind' form + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + , int_<6> + > +{ + typedef false_ is_le; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; +}; + +template< + typename F + , typename Tag1 + , typename Tag2 + , typename Arity + > +struct lambda< + lambda< F,Tag1,Arity > + , Tag2 + , int_<3> + > +{ + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef bind1< quote1, typename l1::result_ > arity_; + typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3; + typedef aux::le_result3 le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda) + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/greater.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/greater.hpp new file mode 100644 index 0000000000..3d1c3dcead --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/greater.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + + : greater_impl< + typename greater_tag::type + , typename greater_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/greater_equal.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/greater_equal.hpp new file mode 100644 index 0000000000..fb011866e7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/greater_equal.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + + : greater_equal_impl< + typename greater_equal_tag::type + , typename greater_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/inherit.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/inherit.hpp new file mode 100644 index 0000000000..6adcc0142e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/inherit.hpp @@ -0,0 +1,139 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : T1, T2 +{ + typedef inherit2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +template< typename T1 > +struct inherit2< T1,empty_base > +{ + typedef T1 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) +}; + +template< typename T2 > +struct inherit2< empty_base,T2 > +{ + typedef T2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) +}; + +template<> +struct inherit2< empty_base,empty_base > +{ + typedef empty_base type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1, typename T2, typename T3, typename T4, typename T5 + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/iter_fold_if_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/iter_fold_if_impl.hpp new file mode 100644 index 0000000000..b767e95862 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/iter_fold_if_impl.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< typename Iterator, typename State > +struct iter_fold_if_null_step +{ + typedef State state; + typedef Iterator iterator; +}; + +template< bool > +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef typename apply2< StateOp,State,Iterator >::type state; + typedef typename IteratorOp::type iterator; + }; +}; + +template<> +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef State state; + typedef Iterator iterator; + }; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename Predicate + > +struct iter_fold_if_forward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename BackwardOp + , typename Predicate + > +struct iter_fold_if_backward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,BackwardOp, identity > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename ForwardPredicate + , typename BackwardOp + , typename BackwardPredicate + > +struct iter_fold_if_impl +{ + private: + typedef iter_fold_if_null_step< Iterator,State > forward_step0; + typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; + typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; + typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; + typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; + + + typedef typename if_< + typename forward_step4::not_last + , iter_fold_if_impl< + typename forward_step4::iterator + , typename forward_step4::state + , ForwardOp + , ForwardPredicate + , BackwardOp + , BackwardPredicate + > + , iter_fold_if_null_step< + typename forward_step4::iterator + , typename forward_step4::state + > + >::type backward_step4; + + typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; + typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; + typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; + typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; + + + public: + typedef typename backward_step0::state state; + typedef typename backward_step4::iterator iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/iter_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/iter_fold_impl.hpp new file mode 100644 index 0000000000..1dd216c8aa --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/iter_fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl +{ + typedef iter_fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,First,Last,State,ForwardOp > + : iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/lambda_no_ctps.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/lambda_no_ctps.hpp new file mode 100644 index 0000000000..75b30ce32f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/lambda_no_ctps.hpp @@ -0,0 +1,229 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ + { + typedef T type; + typedef is_placeholder is_le; + }; +}; + +template<> struct lambda_impl< int_<1> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + + typedef bind1< + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<2> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; + + typedef bind2< + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<3> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; + + typedef bind3< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<4> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; + + typedef bind4< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<5> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; + + typedef bind5< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Protect + > +struct lambda +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity::type arity_; + typedef typename aux::lambda_impl + ::template result_< T,Tag,Protect > l_; + + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; + +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/less.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/less.hpp new file mode 100644 index 0000000000..0b6ce1d4bf --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/less.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + + : less_impl< + typename less_tag::type + , typename less_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/less_equal.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/less_equal.hpp new file mode 100644 index 0000000000..0010e08451 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/less_equal.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + + : less_equal_impl< + typename less_equal_tag::type + , typename less_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/list.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/list.hpp new file mode 100644 index 0000000000..cbd58acd86 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/list.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct list; + +template< + + > +struct list< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list0< > +{ + typedef list0< >::type type; +}; + +template< + typename T0 + > +struct list< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list1 +{ + typedef typename list1::type type; +}; + +template< + typename T0, typename T1 + > +struct list< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list2< T0,T1 > +{ + typedef typename list2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct list< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list3< T0,T1,T2 > +{ + typedef typename list3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct list< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list4< T0,T1,T2,T3 > +{ + typedef typename list4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct list< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list5< T0,T1,T2,T3,T4 > +{ + typedef typename list5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct list< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list + : list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/list_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/list_c.hpp new file mode 100644 index 0000000000..495c3f7f19 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/list_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct list_c; + +template< + typename T + > +struct list_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list0_c +{ + typedef typename list0_c::type type; +}; + +template< + typename T, long C0 + > +struct list_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list1_c< T,C0 > +{ + typedef typename list1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct list_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list2_c< T,C0,C1 > +{ + typedef typename list2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct list_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list3_c< T,C0,C1,C2 > +{ + typedef typename list3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct list_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list4_c< T,C0,C1,C2,C3 > +{ + typedef typename list4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct list_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c + : list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/map.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/map.hpp new file mode 100644 index 0000000000..80ef156e49 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/map.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map; + +template< + + > +struct map< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map0< > +{ + typedef map0< >::type type; +}; + +template< + typename T0 + > +struct map< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map1 +{ + typedef typename map1::type type; +}; + +template< + typename T0, typename T1 + > +struct map< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map2< T0,T1 > +{ + typedef typename map2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct map< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map3< T0,T1,T2 > +{ + typedef typename map3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct map< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map4< T0,T1,T2,T3 > +{ + typedef typename map4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct map< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map5< T0,T1,T2,T3,T4 > +{ + typedef typename map5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct map< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map + : map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/minus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/minus.hpp new file mode 100644 index 0000000000..cfddc15b78 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/minus.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , minus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct minus< N1,N2,N3,N4,na > + + : minus< minus< minus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct minus< N1,N2,N3,na,na > + + : minus< minus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct minus< N1,N2,na,na,na > + : minus_impl< + typename minus_tag::type + , typename minus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + - BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/modulus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/modulus.hpp new file mode 100644 index 0000000000..eb5eff07e2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/modulus.hpp @@ -0,0 +1,101 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct modulus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + + : modulus_impl< + typename modulus_tag::type + , typename modulus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + % BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/not_equal_to.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/not_equal_to.hpp new file mode 100644 index 0000000000..68356eee4d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/not_equal_to.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct not_equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + + : not_equal_to_impl< + typename not_equal_to_tag::type + , typename not_equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/or.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/or.hpp new file mode 100644 index 0000000000..ff7ce9fd58 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/or.hpp @@ -0,0 +1,69 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "or.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct or_impl + : true_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct or_impl< false,T1,T2,T3,T4 > + : or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , false_ + > +{ +}; + +template<> +struct or_impl< + false + , false_, false_, false_, false_ + > + : false_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = false_, typename T4 = false_, typename T5 = false_ + > +struct or_ + + : aux::or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , or_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , or_ + ) + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/placeholders.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/placeholders.hpp new file mode 100644 index 0000000000..b306bbbcb9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/placeholders.hpp @@ -0,0 +1,105 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg< -1 > _; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +} + +}} + +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<1> _1; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<2> _2; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<3> _3; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<4> _4; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<5> _5; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<6> _6; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +} + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/plus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/plus.hpp new file mode 100644 index 0000000000..82539abc4c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/plus.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , plus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct plus< N1,N2,N3,N4,na > + + : plus< plus< plus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct plus< N1,N2,N3,na,na > + + : plus< plus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct plus< N1,N2,na,na,na > + : plus_impl< + typename plus_tag::type + , typename plus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + + BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/quote.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/quote.hpp new file mode 100644 index 0000000000..7f9d18bc30 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/quote.hpp @@ -0,0 +1,11 @@ + +// Copyright Aleksey Gurtovoy 2000-2008 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "quote.hpp" header +// -- DO NOT modify by hand! + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/reverse_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/reverse_fold_impl.hpp new file mode 100644 index 0000000000..372f0d260a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/reverse_fold_impl.hpp @@ -0,0 +1,295 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< long N > +struct reverse_fold_chunk; + +template<> struct reverse_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct reverse_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; +}; + +template<> struct reverse_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; +}; + +template<> struct reverse_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; +}; + +template<> struct reverse_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; +}; + +template< long N > +struct reverse_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step; + +template< + typename Last + , typename State + > +struct reverse_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_fold_null_step< Last,State > + , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step +{ + typedef reverse_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename deref::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl + : reverse_fold_chunk + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/reverse_iter_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/reverse_iter_fold_impl.hpp new file mode 100644 index 0000000000..44aadf7a6d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/reverse_iter_fold_impl.hpp @@ -0,0 +1,295 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl; + +template< long N > +struct reverse_iter_fold_chunk; + +template<> struct reverse_iter_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; +}; + +template< long N > +struct reverse_iter_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_step; + +template< + typename Last + , typename State + > +struct reverse_iter_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_iter_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_iter_fold_null_step< Last,State > + , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_step +{ + typedef reverse_iter_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl + : reverse_iter_fold_chunk + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/set.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/set.hpp new file mode 100644 index 0000000000..ace3a4f07c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/set.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set; + +template< + + > +struct set< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set0< > +{ + typedef set0< >::type type; +}; + +template< + typename T0 + > +struct set< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set1 +{ + typedef typename set1::type type; +}; + +template< + typename T0, typename T1 + > +struct set< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set2< T0,T1 > +{ + typedef typename set2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct set< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set3< T0,T1,T2 > +{ + typedef typename set3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct set< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set4< T0,T1,T2,T3 > +{ + typedef typename set4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct set< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set5< T0,T1,T2,T3,T4 > +{ + typedef typename set5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct set< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set + : set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/set_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/set_c.hpp new file mode 100644 index 0000000000..4e6993ce27 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/set_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "set_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct set_c; + +template< + typename T + > +struct set_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set0_c +{ + typedef typename set0_c::type type; +}; + +template< + typename T, long C0 + > +struct set_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set1_c< T,C0 > +{ + typedef typename set1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct set_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set2_c< T,C0,C1 > +{ + typedef typename set2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct set_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set3_c< T,C0,C1,C2 > +{ + typedef typename set3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct set_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set4_c< T,C0,C1,C2,C3 > +{ + typedef typename set4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct set_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : set17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : set18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : set19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct set_c + : set20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/shift_left.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/shift_left.hpp new file mode 100644 index 0000000000..6d19e94ed3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/shift_left.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_left_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + + : shift_left_impl< + typename shift_left_tag::type + , typename shift_left_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + << BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/shift_right.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/shift_right.hpp new file mode 100644 index 0000000000..dd31d97cec --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/shift_right.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_right_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + + : shift_right_impl< + typename shift_right_tag::type + , typename shift_right_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + >> BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/template_arity.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/template_arity.hpp new file mode 100644 index 0000000000..b24a0a7e7f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/template_arity.hpp @@ -0,0 +1,40 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "template_arity.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< bool > +struct template_arity_impl +{ + template< typename F > struct result_ + : mpl::int_< -1 > + { + }; +}; + +template<> +struct template_arity_impl +{ + template< typename F > struct result_ + : F::arity + { + }; +}; + +template< typename F > +struct template_arity + : template_arity_impl< ::boost::mpl::aux::has_rebind::value > + ::template result_ +{ +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/times.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/times.hpp new file mode 100644 index 0000000000..ab100f1cb3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/times.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + : times< times< times< times< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , times + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct times< N1,N2,N3,N4,na > + + : times< times< times< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct times< N1,N2,N3,na,na > + + : times< times< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct times< N1,N2,na,na,na > + : times_impl< + typename times_tag::type + , typename times_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + * BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/unpack_args.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/unpack_args.hpp new file mode 100644 index 0000000000..f391dc1ab8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/unpack_args.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< int size, typename F, typename Args > +struct unpack_args_impl; + +template< typename F, typename Args > +struct unpack_args_impl< 0,F,Args > + : apply0< + F + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 1,F,Args > + : apply1< + F + , typename at_c< Args,0 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 2,F,Args > + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 3,F,Args > + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 4,F,Args > + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 5,F,Args > + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > +{ +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + { + typedef typename aux::unpack_args_impl< + size::value + , F + , Args + >::type type; + + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/vector.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/vector.hpp new file mode 100644 index 0000000000..803e217850 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/vector.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct vector; + +template< + + > +struct vector< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct vector< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct vector< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct vector< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct vector< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct vector< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct vector< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/vector_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/vector_c.hpp new file mode 100644 index 0000000000..643b7fd636 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/bcc_pre590/vector_c.hpp @@ -0,0 +1,309 @@ + +// Copyright Aleksey Gurtovoy 2000-2008 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct vector_c; + +template< + typename T + > +struct vector_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector0_c +{ + typedef typename vector0_c::type type; +}; + +template< + typename T, long C0 + > +struct vector_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector1_c< T, T(C0) > +{ + typedef typename vector1_c< T, T(C0) >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct vector_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector2_c< T, T(C0), T(C1) > +{ + typedef typename vector2_c< T, T(C0), T(C1) >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct vector_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector3_c< T, T(C0), T(C1), T(C2) > +{ + typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct vector_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > +{ + typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct vector_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > +{ + typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > +{ + typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > +{ + typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > +{ + typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > +{ + typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > +{ + typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > +{ + typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > +{ + typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > +{ + typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > +{ + typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > +{ + typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > +{ + typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > +{ + typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > +{ + typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > +{ + typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c + : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > +{ + typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/advance_backward.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/advance_backward.hpp new file mode 100644 index 0000000000..26de94cea1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/advance_backward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_backward; +template<> +struct advance_backward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_backward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_backward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_backward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_backward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef typename prior::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_backward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/advance_forward.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/advance_forward.hpp new file mode 100644 index 0000000000..b137cc72af --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/advance_forward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_forward; +template<> +struct advance_forward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_forward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_forward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_forward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_forward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef typename next::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_forward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/and.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/and.hpp new file mode 100644 index 0000000000..010ad1fc84 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/and.hpp @@ -0,0 +1,69 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/and.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct and_impl + : false_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct and_impl< true,T1,T2,T3,T4 > + : and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , true_ + > +{ +}; + +template<> +struct and_impl< + true + , true_, true_, true_, true_ + > + : true_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = true_, typename T4 = true_, typename T5 = true_ + > +struct and_ + + : aux::and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , and_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , and_ + ) + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/apply.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/apply.hpp new file mode 100644 index 0000000000..e08eaccf03 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/apply.hpp @@ -0,0 +1,169 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0 + + : apply_wrap0< + typename lambda::type + + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) +}; + +template< + typename F + > +struct apply< F,na,na,na,na,na > + : apply0 +{ +}; + +template< + typename F, typename T1 + > +struct apply1 + + : apply_wrap1< + typename lambda::type + , T1 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) +}; + +template< + typename F, typename T1 + > +struct apply< F,T1,na,na,na,na > + : apply1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct apply2 + + : apply_wrap2< + typename lambda::type + , T1, T2 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) +}; + +template< + typename F, typename T1, typename T2 + > +struct apply< F,T1,T2,na,na,na > + : apply2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3 + + : apply_wrap3< + typename lambda::type + , T1, T2, T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply< F,T1,T2,T3,na,na > + : apply3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4 + + : apply_wrap4< + typename lambda::type + , T1, T2, T3, T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply< F,T1,T2,T3,T4,na > + : apply4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5 + + : apply_wrap5< + typename lambda::type + , T1, T2, T3, T4, T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) +}; + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply + : apply5< F,T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/apply_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/apply_fwd.hpp new file mode 100644 index 0000000000..b2ed5d5130 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/apply_fwd.hpp @@ -0,0 +1,52 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply; + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/apply_wrap.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/apply_wrap.hpp new file mode 100644 index 0000000000..34d51a1a58 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/apply_wrap.hpp @@ -0,0 +1,84 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + + , typename has_apply_ = typename aux::has_apply::type + + > +struct apply_wrap0 + + : F::template apply< > +{ +}; + +template< typename F > +struct apply_wrap0< F,true_ > + : F::apply +{ +}; + +template< + typename F, typename T1 + + > +struct apply_wrap1 + + : F::template apply +{ +}; + +template< + typename F, typename T1, typename T2 + + > +struct apply_wrap2 + + : F::template apply< T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + + > +struct apply_wrap3 + + : F::template apply< T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + + > +struct apply_wrap4 + + : F::template apply< T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + + > +struct apply_wrap5 + + : F::template apply< T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/arg.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/arg.hpp new file mode 100644 index 0000000000..6f2f8a8070 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/arg.hpp @@ -0,0 +1,123 @@ + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > +{ + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<1> +{ + BOOST_STATIC_CONSTANT(int, value = 1); + typedef arg<2> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<2> +{ + BOOST_STATIC_CONSTANT(int, value = 2); + typedef arg<3> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U2 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<3> +{ + BOOST_STATIC_CONSTANT(int, value = 3); + typedef arg<4> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U3 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<4> +{ + BOOST_STATIC_CONSTANT(int, value = 4); + typedef arg<5> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U4 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<5> +{ + BOOST_STATIC_CONSTANT(int, value = 5); + typedef arg<6> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U5 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/basic_bind.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/basic_bind.hpp new file mode 100644 index 0000000000..1e73429418 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/basic_bind.hpp @@ -0,0 +1,406 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > +{ + typedef bind< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +template< + typename F, int dummy_ + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F, int dummy_ + > +struct bind< F,na,na,na,na,na > + : bind0 +{ +}; + +template< + typename F, typename T1, int dummy_ + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1, int dummy_ + > +struct bind< F,T1,na,na,na,na > + : bind1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2, int dummy_ + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2, int dummy_ + > +struct bind< F,T1,T2,na,na,na > + : bind2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, int dummy_ + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3, int dummy_ + > +struct bind< F,T1,T2,T3,na,na > + : bind3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , int dummy_ + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , int dummy_ + > +struct bind< F,T1,T2,T3,T4,na > + : bind4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, int dummy_ + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; + + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, int dummy_ + > +struct bind + : bind5< F,T1,T2,T3,T4,T5 > +{ +}; + +/// if_/eval_if specializations +template< template< typename T1, typename T2, typename T3 > class F, typename Tag > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct if_; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< if_,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef typename if_< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/bind.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/bind.hpp new file mode 100644 index 0000000000..94bfe1fef7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/bind.hpp @@ -0,0 +1,515 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + typename T + , typename Arg + > +struct replace_unnamed_arg +{ + typedef Arg next; + typedef T type; +}; + +template< + typename Arg + > +struct replace_unnamed_arg< arg< -1 >, Arg > +{ + typedef typename Arg::next next; + typedef Arg type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > +{ + typedef bind< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +template< + typename F, int dummy_ + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F, int dummy_ + > +struct bind< F,na,na,na,na,na > + : bind0 +{ +}; + +template< + typename F, typename T1, int dummy_ + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1, int dummy_ + > +struct bind< F,T1,na,na,na,na > + : bind1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2, int dummy_ + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2, int dummy_ + > +struct bind< F,T1,T2,na,na,na > + : bind2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, int dummy_ + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3, int dummy_ + > +struct bind< F,T1,T2,T3,na,na > + : bind3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , int dummy_ + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , int dummy_ + > +struct bind< F,T1,T2,T3,T4,na > + : bind4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, int dummy_ + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + typedef aux::replace_unnamed_arg< T5,n5 > r5; + typedef typename r5::type a5; + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, int dummy_ + > +struct bind + : bind5< F,T1,T2,T3,T4,T5 > +{ +}; + +/// if_/eval_if specializations +template< template< typename T1, typename T2, typename T3 > class F, typename Tag > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct if_; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< if_,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef typename if_< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/bind_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/bind_fwd.hpp new file mode 100644 index 0000000000..181bc77faa --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/bind_fwd.hpp @@ -0,0 +1,53 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, int dummy_ = 0 + > +struct bind; + +template< + typename F, int dummy_ = 0 + > +struct bind0; + +template< + typename F, typename T1, int dummy_ = 0 + > +struct bind1; + +template< + typename F, typename T1, typename T2, int dummy_ = 0 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3, int dummy_ = 0 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , int dummy_ = 0 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, int dummy_ = 0 + > +struct bind5; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/bitand.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/bitand.hpp new file mode 100644 index 0000000000..0bbf54ea26 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/bitand.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitand_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitand_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitand_< N1,N2,N3,N4,na > + + : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitand_< N1,N2,N3,na,na > + + : bitand_< bitand_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitand_< N1,N2,na,na,na > + : bitand_impl< + typename bitand_tag::type + , typename bitand_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + & BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/bitor.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/bitor.hpp new file mode 100644 index 0000000000..55b31cb8a9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/bitor.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitor_< N1,N2,N3,N4,na > + + : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitor_< N1,N2,N3,na,na > + + : bitor_< bitor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitor_< N1,N2,na,na,na > + : bitor_impl< + typename bitor_tag::type + , typename bitor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + | BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/bitxor.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/bitxor.hpp new file mode 100644 index 0000000000..ec1939151d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/bitxor.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitxor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitxor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitxor_< N1,N2,N3,N4,na > + + : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitxor_< N1,N2,N3,na,na > + + : bitxor_< bitxor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitxor_< N1,N2,na,na,na > + : bitxor_impl< + typename bitxor_tag::type + , typename bitxor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/deque.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/deque.hpp new file mode 100644 index 0000000000..de67398a37 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/deque.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/deque.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct deque; + +template< + + > +struct deque< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct deque< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct deque< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct deque< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct deque< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct deque< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct deque< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct deque + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/divides.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/divides.hpp new file mode 100644 index 0000000000..86f16826f7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/divides.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct divides_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , divides + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct divides< N1,N2,N3,N4,na > + + : divides< divides< divides< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct divides< N1,N2,N3,na,na > + + : divides< divides< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct divides< N1,N2,na,na,na > + : divides_impl< + typename divides_tag::type + , typename divides_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + / BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/equal_to.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/equal_to.hpp new file mode 100644 index 0000000000..62c994589f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/equal_to.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + + : equal_to_impl< + typename equal_to_tag::type + , typename equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/fold_impl.hpp new file mode 100644 index 0000000000..9e7a29300d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl +{ + typedef fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,First,Last,State,ForwardOp > + : fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/full_lambda.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/full_lambda.hpp new file mode 100644 index 0000000000..026418ccc9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/full_lambda.hpp @@ -0,0 +1,536 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +} // namespace aux + +template< + typename T + , typename Tag + + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg, Tag > +{ + typedef true_ is_le; + typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 + typedef mpl::protect type; +}; + +template< + typename F + , typename Tag + > +struct lambda< + bind0 + , Tag + + > +{ + typedef false_ is_le; + typedef bind0< + F + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1 +{ + typedef F< + typename L1::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1< true_,Tag,F,L1 > +{ + typedef bind1< + quote1< F,Tag > + , typename L1::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1 > class F + , typename T1 + , typename Tag + > +struct lambda< + F + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1 + , typename Tag + > +struct lambda< + bind1< F,T1 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind1< + F + , T1 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2 +{ + typedef F< + typename L1::type, typename L2::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2< true_,Tag,F,L1,L2 > +{ + typedef bind2< + quote2< F,Tag > + , typename L1::result_, typename L2::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + , typename Tag + > +struct lambda< + F< T1,T2 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2 + , typename Tag + > +struct lambda< + bind2< F,T1,T2 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind2< + F + , T1, T2 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3< true_,Tag,F,L1,L2,L3 > +{ + typedef bind3< + quote3< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + F< T1,T2,T3 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind3< + F + , T1, T2, T3 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > +{ + typedef bind4< + quote4< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind4< + F + , T1, T2, T3, T4 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type, typename L5::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > +{ + typedef bind5< + quote5< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind5< + F + , T1, T2, T3, T4, T5 + > result_; + + typedef result_ type; +}; + +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< mpl::protect, Tag > +{ + typedef false_ is_le; + typedef mpl::protect result_; + typedef result_ type; +}; + +/// specializations for the main 'bind' form + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; +}; + +BOOST_MPL_AUX_NA_SPEC(2, lambda) + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/greater.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/greater.hpp new file mode 100644 index 0000000000..14d8e08bff --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/greater.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + + : greater_impl< + typename greater_tag::type + , typename greater_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/greater_equal.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/greater_equal.hpp new file mode 100644 index 0000000000..2603f9184a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/greater_equal.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + + : greater_equal_impl< + typename greater_equal_tag::type + , typename greater_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/inherit.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/inherit.hpp new file mode 100644 index 0000000000..00f31c4226 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/inherit.hpp @@ -0,0 +1,141 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : T1, T2 +{ + typedef inherit2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +template< typename T1 > +struct inherit2< T1,empty_base > +{ + typedef T1 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) +}; + +template< typename T2 > +struct inherit2< empty_base,T2 > +{ + typedef T2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) +}; + +template<> +struct inherit2< empty_base,empty_base > +{ + typedef empty_base type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/iter_fold_if_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/iter_fold_if_impl.hpp new file mode 100644 index 0000000000..695179584d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/iter_fold_if_impl.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< typename Iterator, typename State > +struct iter_fold_if_null_step +{ + typedef State state; + typedef Iterator iterator; +}; + +template< bool > +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef typename apply2< StateOp,State,Iterator >::type state; + typedef typename IteratorOp::type iterator; + }; +}; + +template<> +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef State state; + typedef Iterator iterator; + }; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename Predicate + > +struct iter_fold_if_forward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename BackwardOp + , typename Predicate + > +struct iter_fold_if_backward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,BackwardOp, identity > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename ForwardPredicate + , typename BackwardOp + , typename BackwardPredicate + > +struct iter_fold_if_impl +{ + private: + typedef iter_fold_if_null_step< Iterator,State > forward_step0; + typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; + typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; + typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; + typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; + + + typedef typename if_< + typename forward_step4::not_last + , iter_fold_if_impl< + typename forward_step4::iterator + , typename forward_step4::state + , ForwardOp + , ForwardPredicate + , BackwardOp + , BackwardPredicate + > + , iter_fold_if_null_step< + typename forward_step4::iterator + , typename forward_step4::state + > + >::type backward_step4; + + typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; + typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; + typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; + typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; + + + public: + typedef typename backward_step0::state state; + typedef typename backward_step4::iterator iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/iter_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/iter_fold_impl.hpp new file mode 100644 index 0000000000..805790e86d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/iter_fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl +{ + typedef iter_fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,First,Last,State,ForwardOp > + : iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/lambda_no_ctps.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/lambda_no_ctps.hpp new file mode 100644 index 0000000000..890a198a46 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/lambda_no_ctps.hpp @@ -0,0 +1,229 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ + { + typedef T type; + typedef is_placeholder is_le; + }; +}; + +template<> struct lambda_impl< int_<1> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + + typedef bind1< + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<2> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; + + typedef bind2< + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<3> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; + + typedef bind3< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<4> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; + + typedef bind4< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<5> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; + + typedef bind5< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Protect + > +struct lambda +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity::type arity_; + typedef typename aux::lambda_impl + ::template result_< T,Tag,Protect > l_; + + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; + +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/less.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/less.hpp new file mode 100644 index 0000000000..4fe3cd17c4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/less.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + + : less_impl< + typename less_tag::type + , typename less_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/less_equal.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/less_equal.hpp new file mode 100644 index 0000000000..ca2894f6f9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/less_equal.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + + : less_equal_impl< + typename less_equal_tag::type + , typename less_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/list.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/list.hpp new file mode 100644 index 0000000000..4e8ad53d21 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/list.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct list; + +template< + + > +struct list< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list0< > +{ + typedef list0< >::type type; +}; + +template< + typename T0 + > +struct list< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list1 +{ + typedef typename list1::type type; +}; + +template< + typename T0, typename T1 + > +struct list< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list2< T0,T1 > +{ + typedef typename list2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct list< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list3< T0,T1,T2 > +{ + typedef typename list3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct list< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list4< T0,T1,T2,T3 > +{ + typedef typename list4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct list< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list5< T0,T1,T2,T3,T4 > +{ + typedef typename list5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct list< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list + : list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/list_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/list_c.hpp new file mode 100644 index 0000000000..0b48a7f8e1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/list_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct list_c; + +template< + typename T + > +struct list_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list0_c +{ + typedef typename list0_c::type type; +}; + +template< + typename T, long C0 + > +struct list_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list1_c< T,C0 > +{ + typedef typename list1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct list_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list2_c< T,C0,C1 > +{ + typedef typename list2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct list_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list3_c< T,C0,C1,C2 > +{ + typedef typename list3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct list_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list4_c< T,C0,C1,C2,C3 > +{ + typedef typename list4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct list_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c + : list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/map.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/map.hpp new file mode 100644 index 0000000000..837e013771 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/map.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map; + +template< + + > +struct map< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map0< > +{ + typedef map0< >::type type; +}; + +template< + typename T0 + > +struct map< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map1 +{ + typedef typename map1::type type; +}; + +template< + typename T0, typename T1 + > +struct map< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map2< T0,T1 > +{ + typedef typename map2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct map< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map3< T0,T1,T2 > +{ + typedef typename map3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct map< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map4< T0,T1,T2,T3 > +{ + typedef typename map4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct map< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map5< T0,T1,T2,T3,T4 > +{ + typedef typename map5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct map< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map + : map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/minus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/minus.hpp new file mode 100644 index 0000000000..71d4913766 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/minus.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , minus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct minus< N1,N2,N3,N4,na > + + : minus< minus< minus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct minus< N1,N2,N3,na,na > + + : minus< minus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct minus< N1,N2,na,na,na > + : minus_impl< + typename minus_tag::type + , typename minus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + - BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/modulus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/modulus.hpp new file mode 100644 index 0000000000..224b34930c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/modulus.hpp @@ -0,0 +1,101 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct modulus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + + : modulus_impl< + typename modulus_tag::type + , typename modulus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + % BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/not_equal_to.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/not_equal_to.hpp new file mode 100644 index 0000000000..98b21b1e22 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/not_equal_to.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct not_equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + + : not_equal_to_impl< + typename not_equal_to_tag::type + , typename not_equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/or.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/or.hpp new file mode 100644 index 0000000000..31e1aaa4e6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/or.hpp @@ -0,0 +1,69 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/or.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct or_impl + : true_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct or_impl< false,T1,T2,T3,T4 > + : or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , false_ + > +{ +}; + +template<> +struct or_impl< + false + , false_, false_, false_, false_ + > + : false_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = false_, typename T4 = false_, typename T5 = false_ + > +struct or_ + + : aux::or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , or_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , or_ + ) + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/placeholders.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/placeholders.hpp new file mode 100644 index 0000000000..ff97364b9b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/placeholders.hpp @@ -0,0 +1,105 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg< -1 > _; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +} + +}} + +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<1> _1; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<2> _2; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<3> _3; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<4> _4; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<5> _5; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<6> _6; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +} + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/plus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/plus.hpp new file mode 100644 index 0000000000..a9f6ee79a5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/plus.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , plus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct plus< N1,N2,N3,N4,na > + + : plus< plus< plus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct plus< N1,N2,N3,na,na > + + : plus< plus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct plus< N1,N2,na,na,na > + : plus_impl< + typename plus_tag::type + , typename plus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + + BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/quote.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/quote.hpp new file mode 100644 index 0000000000..d7d0420e4d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/quote.hpp @@ -0,0 +1,123 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/quote.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< typename T, bool has_type_ > +struct quote_impl + : T +{ +}; + +template< typename T > +struct quote_impl< T,false > +{ + typedef T type; +}; + +template< + template< typename P1 > class F + , typename Tag = void_ + > +struct quote1 +{ + template< typename U1 > struct apply + + : quote_impl< + F + , aux::has_type< F >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2 > class F + , typename Tag = void_ + > +struct quote2 +{ + template< typename U1, typename U2 > struct apply + + : quote_impl< + F< U1,U2 > + , aux::has_type< F< U1,U2 > >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3 > class F + , typename Tag = void_ + > +struct quote3 +{ + template< typename U1, typename U2, typename U3 > struct apply + + : quote_impl< + F< U1,U2,U3 > + , aux::has_type< F< U1,U2,U3 > >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename Tag = void_ + > +struct quote4 +{ + template< + typename U1, typename U2, typename U3, typename U4 + > + struct apply + + : quote_impl< + F< U1,U2,U3,U4 > + , aux::has_type< F< U1,U2,U3,U4 > >::value + > + + { + }; +}; + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename Tag = void_ + > +struct quote5 +{ + template< + typename U1, typename U2, typename U3, typename U4 + , typename U5 + > + struct apply + + : quote_impl< + F< U1,U2,U3,U4,U5 > + , aux::has_type< F< U1,U2,U3,U4,U5 > >::value + > + + { + }; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/reverse_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/reverse_fold_impl.hpp new file mode 100644 index 0000000000..c468684c91 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/reverse_fold_impl.hpp @@ -0,0 +1,231 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename deref::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/reverse_iter_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/reverse_iter_fold_impl.hpp new file mode 100644 index 0000000000..658f92a7c3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/reverse_iter_fold_impl.hpp @@ -0,0 +1,231 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/set.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/set.hpp new file mode 100644 index 0000000000..5721922e11 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/set.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set; + +template< + + > +struct set< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set0< > +{ + typedef set0< >::type type; +}; + +template< + typename T0 + > +struct set< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set1 +{ + typedef typename set1::type type; +}; + +template< + typename T0, typename T1 + > +struct set< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set2< T0,T1 > +{ + typedef typename set2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct set< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set3< T0,T1,T2 > +{ + typedef typename set3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct set< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set4< T0,T1,T2,T3 > +{ + typedef typename set4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct set< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set5< T0,T1,T2,T3,T4 > +{ + typedef typename set5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct set< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set + : set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/set_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/set_c.hpp new file mode 100644 index 0000000000..cbeb932c13 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/set_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct set_c; + +template< + typename T + > +struct set_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set0_c +{ + typedef typename set0_c::type type; +}; + +template< + typename T, long C0 + > +struct set_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set1_c< T,C0 > +{ + typedef typename set1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct set_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set2_c< T,C0,C1 > +{ + typedef typename set2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct set_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set3_c< T,C0,C1,C2 > +{ + typedef typename set3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct set_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set4_c< T,C0,C1,C2,C3 > +{ + typedef typename set4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct set_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : set17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : set18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : set19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct set_c + : set20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/shift_left.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/shift_left.hpp new file mode 100644 index 0000000000..b5b181ce19 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/shift_left.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_left_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + + : shift_left_impl< + typename shift_left_tag::type + , typename shift_left_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + << BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/shift_right.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/shift_right.hpp new file mode 100644 index 0000000000..f7a342e989 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/shift_right.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_right_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + + : shift_right_impl< + typename shift_right_tag::type + , typename shift_right_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + >> BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/template_arity.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/template_arity.hpp new file mode 100644 index 0000000000..a23fc23846 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/template_arity.hpp @@ -0,0 +1,11 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header +// -- DO NOT modify by hand! + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/times.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/times.hpp new file mode 100644 index 0000000000..cb97cc4e13 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/times.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + : times< times< times< times< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , times + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct times< N1,N2,N3,N4,na > + + : times< times< times< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct times< N1,N2,N3,na,na > + + : times< times< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct times< N1,N2,na,na,na > + : times_impl< + typename times_tag::type + , typename times_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + * BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/unpack_args.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/unpack_args.hpp new file mode 100644 index 0000000000..2194ce9d11 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/unpack_args.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< int size, typename F, typename Args > +struct unpack_args_impl; + +template< typename F, typename Args > +struct unpack_args_impl< 0,F,Args > + : apply0< + F + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 1,F,Args > + : apply1< + F + , typename at_c< Args,0 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 2,F,Args > + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 3,F,Args > + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 4,F,Args > + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 5,F,Args > + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > +{ +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + + : aux::unpack_args_impl< size::value,F, Args > + + { + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/vector.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/vector.hpp new file mode 100644 index 0000000000..bfa9565a53 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/vector.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct vector; + +template< + + > +struct vector< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct vector< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct vector< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct vector< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct vector< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct vector< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct vector< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/vector_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/vector_c.hpp new file mode 100644 index 0000000000..0f1560d7f1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/dmc/vector_c.hpp @@ -0,0 +1,309 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct vector_c; + +template< + typename T + > +struct vector_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector0_c +{ + typedef typename vector0_c::type type; +}; + +template< + typename T, long C0 + > +struct vector_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector1_c< T, T(C0) > +{ + typedef typename vector1_c< T, T(C0) >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct vector_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector2_c< T, T(C0), T(C1) > +{ + typedef typename vector2_c< T, T(C0), T(C1) >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct vector_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector3_c< T, T(C0), T(C1), T(C2) > +{ + typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct vector_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > +{ + typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct vector_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > +{ + typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > +{ + typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > +{ + typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > +{ + typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > +{ + typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > +{ + typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > +{ + typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > +{ + typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > +{ + typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > +{ + typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > +{ + typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > +{ + typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > +{ + typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > +{ + typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > +{ + typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c + : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > +{ + typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp new file mode 100644 index 0000000000..26de94cea1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_backward; +template<> +struct advance_backward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_backward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_backward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_backward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_backward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef typename prior::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_backward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp new file mode 100644 index 0000000000..b137cc72af --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_forward; +template<> +struct advance_forward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_forward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_forward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_forward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_forward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef typename next::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_forward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/and.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/and.hpp new file mode 100644 index 0000000000..010ad1fc84 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/and.hpp @@ -0,0 +1,69 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/and.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct and_impl + : false_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct and_impl< true,T1,T2,T3,T4 > + : and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , true_ + > +{ +}; + +template<> +struct and_impl< + true + , true_, true_, true_, true_ + > + : true_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = true_, typename T4 = true_, typename T5 = true_ + > +struct and_ + + : aux::and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , and_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , and_ + ) + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/apply.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/apply.hpp new file mode 100644 index 0000000000..e08eaccf03 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/apply.hpp @@ -0,0 +1,169 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0 + + : apply_wrap0< + typename lambda::type + + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) +}; + +template< + typename F + > +struct apply< F,na,na,na,na,na > + : apply0 +{ +}; + +template< + typename F, typename T1 + > +struct apply1 + + : apply_wrap1< + typename lambda::type + , T1 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) +}; + +template< + typename F, typename T1 + > +struct apply< F,T1,na,na,na,na > + : apply1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct apply2 + + : apply_wrap2< + typename lambda::type + , T1, T2 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) +}; + +template< + typename F, typename T1, typename T2 + > +struct apply< F,T1,T2,na,na,na > + : apply2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3 + + : apply_wrap3< + typename lambda::type + , T1, T2, T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply< F,T1,T2,T3,na,na > + : apply3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4 + + : apply_wrap4< + typename lambda::type + , T1, T2, T3, T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply< F,T1,T2,T3,T4,na > + : apply4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5 + + : apply_wrap5< + typename lambda::type + , T1, T2, T3, T4, T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) +}; + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply + : apply5< F,T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp new file mode 100644 index 0000000000..b2ed5d5130 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp @@ -0,0 +1,52 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply; + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp new file mode 100644 index 0000000000..34d51a1a58 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp @@ -0,0 +1,84 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + + , typename has_apply_ = typename aux::has_apply::type + + > +struct apply_wrap0 + + : F::template apply< > +{ +}; + +template< typename F > +struct apply_wrap0< F,true_ > + : F::apply +{ +}; + +template< + typename F, typename T1 + + > +struct apply_wrap1 + + : F::template apply +{ +}; + +template< + typename F, typename T1, typename T2 + + > +struct apply_wrap2 + + : F::template apply< T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + + > +struct apply_wrap3 + + : F::template apply< T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + + > +struct apply_wrap4 + + : F::template apply< T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + + > +struct apply_wrap5 + + : F::template apply< T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/arg.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/arg.hpp new file mode 100644 index 0000000000..6f2f8a8070 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/arg.hpp @@ -0,0 +1,123 @@ + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > +{ + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<1> +{ + BOOST_STATIC_CONSTANT(int, value = 1); + typedef arg<2> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<2> +{ + BOOST_STATIC_CONSTANT(int, value = 2); + typedef arg<3> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U2 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<3> +{ + BOOST_STATIC_CONSTANT(int, value = 3); + typedef arg<4> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U3 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<4> +{ + BOOST_STATIC_CONSTANT(int, value = 4); + typedef arg<5> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U4 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<5> +{ + BOOST_STATIC_CONSTANT(int, value = 5); + typedef arg<6> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U5 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp new file mode 100644 index 0000000000..b0702324aa --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp @@ -0,0 +1,440 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > +{ + typedef bind< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F + > +struct bind< F,na,na,na,na,na > + : bind0 +{ +}; + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1 + > +struct bind< F,T1,na,na,na,na > + : bind1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2 + > +struct bind< F,T1,T2,na,na,na > + : bind2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind< F,T1,T2,T3,na,na > + : bind3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind< F,T1,T2,T3,T4,na > + : bind4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; + + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind + : bind5< F,T1,T2,T3,T4,T5 > +{ +}; + +/// if_/eval_if specializations +template< template< typename T1, typename T2, typename T3 > class F, typename Tag > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct if_; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< if_,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef typename if_< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +template< + template< typename T1, typename T2, typename T3 > class F, typename Tag + > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct eval_if; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< eval_if,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef typename eval_if< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/bind.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/bind.hpp new file mode 100644 index 0000000000..0e9513a649 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/bind.hpp @@ -0,0 +1,561 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + typename T + , typename Arg + > +struct replace_unnamed_arg +{ + typedef Arg next; + typedef T type; +}; + +template< + typename Arg + > +struct replace_unnamed_arg< arg< -1 >, Arg > +{ + typedef typename Arg::next next; + typedef Arg type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > +{ + typedef bind< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F + > +struct bind< F,na,na,na,na,na > + : bind0 +{ +}; + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1 + > +struct bind< F,T1,na,na,na,na > + : bind1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2 + > +struct bind< F,T1,T2,na,na,na > + : bind2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind< F,T1,T2,T3,na,na > + : bind3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind< F,T1,T2,T3,T4,na > + : bind4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + typedef aux::replace_unnamed_arg< T5,n5 > r5; + typedef typename r5::type a5; + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind + : bind5< F,T1,T2,T3,T4,T5 > +{ +}; + +/// if_/eval_if specializations +template< template< typename T1, typename T2, typename T3 > class F, typename Tag > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct if_; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< if_,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef typename if_< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +template< + template< typename T1, typename T2, typename T3 > class F, typename Tag + > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct eval_if; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< eval_if,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef typename eval_if< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp new file mode 100644 index 0000000000..c4a5060ff8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp @@ -0,0 +1,52 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct bind; + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/bitand.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/bitand.hpp new file mode 100644 index 0000000000..0bbf54ea26 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/bitand.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitand_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitand_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitand_< N1,N2,N3,N4,na > + + : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitand_< N1,N2,N3,na,na > + + : bitand_< bitand_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitand_< N1,N2,na,na,na > + : bitand_impl< + typename bitand_tag::type + , typename bitand_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + & BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/bitor.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/bitor.hpp new file mode 100644 index 0000000000..55b31cb8a9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/bitor.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitor_< N1,N2,N3,N4,na > + + : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitor_< N1,N2,N3,na,na > + + : bitor_< bitor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitor_< N1,N2,na,na,na > + : bitor_impl< + typename bitor_tag::type + , typename bitor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + | BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp new file mode 100644 index 0000000000..ec1939151d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitxor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitxor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitxor_< N1,N2,N3,N4,na > + + : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitxor_< N1,N2,N3,na,na > + + : bitxor_< bitxor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitxor_< N1,N2,na,na,na > + : bitxor_impl< + typename bitxor_tag::type + , typename bitxor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/deque.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/deque.hpp new file mode 100644 index 0000000000..de67398a37 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/deque.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/deque.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct deque; + +template< + + > +struct deque< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct deque< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct deque< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct deque< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct deque< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct deque< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct deque< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct deque + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/divides.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/divides.hpp new file mode 100644 index 0000000000..86f16826f7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/divides.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct divides_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , divides + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct divides< N1,N2,N3,N4,na > + + : divides< divides< divides< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct divides< N1,N2,N3,na,na > + + : divides< divides< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct divides< N1,N2,na,na,na > + : divides_impl< + typename divides_tag::type + , typename divides_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + / BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp new file mode 100644 index 0000000000..62c994589f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + + : equal_to_impl< + typename equal_to_tag::type + , typename equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp new file mode 100644 index 0000000000..9e7a29300d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl +{ + typedef fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,First,Last,State,ForwardOp > + : fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp new file mode 100644 index 0000000000..e3eef71b1e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp @@ -0,0 +1,558 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Arity + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg,Tag, int_< -1 > > +{ + typedef true_ is_le; + typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 + typedef mpl::protect type; +}; + +template< + typename F + , typename Tag + > +struct lambda< + bind0 + , Tag + , int_<1> + > +{ + typedef false_ is_le; + typedef bind0< + F + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1 +{ + typedef F< + typename L1::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1< true_,Tag,F,L1 > +{ + typedef bind1< + quote1< F,Tag > + , typename L1::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1 > class F + , typename T1 + , typename Tag + > +struct lambda< + F + , Tag + , int_<1> + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1 + , typename Tag + > +struct lambda< + bind1< F,T1 > + , Tag + , int_<2> + > +{ + typedef false_ is_le; + typedef bind1< + F + , T1 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2 +{ + typedef F< + typename L1::type, typename L2::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2< true_,Tag,F,L1,L2 > +{ + typedef bind2< + quote2< F,Tag > + , typename L1::result_, typename L2::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + , typename Tag + > +struct lambda< + F< T1,T2 > + , Tag + , int_<2> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2 + , typename Tag + > +struct lambda< + bind2< F,T1,T2 > + , Tag + , int_<3> + > +{ + typedef false_ is_le; + typedef bind2< + F + , T1, T2 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3< true_,Tag,F,L1,L2,L3 > +{ + typedef bind3< + quote3< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + F< T1,T2,T3 > + , Tag + , int_<3> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + , int_<4> + > +{ + typedef false_ is_le; + typedef bind3< + F + , T1, T2, T3 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > +{ + typedef bind4< + quote4< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4 > + , Tag + , int_<4> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + , int_<5> + > +{ + typedef false_ is_le; + typedef bind4< + F + , T1, T2, T3, T4 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type, typename L5::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > +{ + typedef bind5< + quote5< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4,T5 > + , Tag + , int_<5> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + , int_<6> + > +{ + typedef false_ is_le; + typedef bind5< + F + , T1, T2, T3, T4, T5 + > result_; + + typedef result_ type; +}; + +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< mpl::protect,Tag, int_<1> > +{ + typedef false_ is_le; + typedef mpl::protect result_; + typedef result_ type; +}; + +/// specializations for the main 'bind' form + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + , int_<6> + > +{ + typedef false_ is_le; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; +}; + +template< + typename F + , typename Tag1 + , typename Tag2 + , typename Arity + > +struct lambda< + lambda< F,Tag1,Arity > + , Tag2 + , int_<3> + > +{ + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef bind1< quote1, typename l1::result_ > arity_; + typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3; + typedef aux::le_result3 le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda) + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/greater.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/greater.hpp new file mode 100644 index 0000000000..14d8e08bff --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/greater.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + + : greater_impl< + typename greater_tag::type + , typename greater_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp new file mode 100644 index 0000000000..2603f9184a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + + : greater_equal_impl< + typename greater_equal_tag::type + , typename greater_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/inherit.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/inherit.hpp new file mode 100644 index 0000000000..00f31c4226 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/inherit.hpp @@ -0,0 +1,141 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : T1, T2 +{ + typedef inherit2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +template< typename T1 > +struct inherit2< T1,empty_base > +{ + typedef T1 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) +}; + +template< typename T2 > +struct inherit2< empty_base,T2 > +{ + typedef T2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) +}; + +template<> +struct inherit2< empty_base,empty_base > +{ + typedef empty_base type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp new file mode 100644 index 0000000000..695179584d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< typename Iterator, typename State > +struct iter_fold_if_null_step +{ + typedef State state; + typedef Iterator iterator; +}; + +template< bool > +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef typename apply2< StateOp,State,Iterator >::type state; + typedef typename IteratorOp::type iterator; + }; +}; + +template<> +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef State state; + typedef Iterator iterator; + }; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename Predicate + > +struct iter_fold_if_forward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename BackwardOp + , typename Predicate + > +struct iter_fold_if_backward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,BackwardOp, identity > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename ForwardPredicate + , typename BackwardOp + , typename BackwardPredicate + > +struct iter_fold_if_impl +{ + private: + typedef iter_fold_if_null_step< Iterator,State > forward_step0; + typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; + typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; + typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; + typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; + + + typedef typename if_< + typename forward_step4::not_last + , iter_fold_if_impl< + typename forward_step4::iterator + , typename forward_step4::state + , ForwardOp + , ForwardPredicate + , BackwardOp + , BackwardPredicate + > + , iter_fold_if_null_step< + typename forward_step4::iterator + , typename forward_step4::state + > + >::type backward_step4; + + typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; + typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; + typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; + typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; + + + public: + typedef typename backward_step0::state state; + typedef typename backward_step4::iterator iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp new file mode 100644 index 0000000000..805790e86d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl +{ + typedef iter_fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,First,Last,State,ForwardOp > + : iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp new file mode 100644 index 0000000000..890a198a46 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp @@ -0,0 +1,229 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ + { + typedef T type; + typedef is_placeholder is_le; + }; +}; + +template<> struct lambda_impl< int_<1> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + + typedef bind1< + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<2> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; + + typedef bind2< + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<3> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; + + typedef bind3< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<4> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; + + typedef bind4< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<5> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; + + typedef bind5< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Protect + > +struct lambda +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity::type arity_; + typedef typename aux::lambda_impl + ::template result_< T,Tag,Protect > l_; + + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; + +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/less.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/less.hpp new file mode 100644 index 0000000000..4fe3cd17c4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/less.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + + : less_impl< + typename less_tag::type + , typename less_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp new file mode 100644 index 0000000000..ca2894f6f9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + + : less_equal_impl< + typename less_equal_tag::type + , typename less_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/list.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/list.hpp new file mode 100644 index 0000000000..4e8ad53d21 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/list.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct list; + +template< + + > +struct list< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list0< > +{ + typedef list0< >::type type; +}; + +template< + typename T0 + > +struct list< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list1 +{ + typedef typename list1::type type; +}; + +template< + typename T0, typename T1 + > +struct list< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list2< T0,T1 > +{ + typedef typename list2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct list< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list3< T0,T1,T2 > +{ + typedef typename list3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct list< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list4< T0,T1,T2,T3 > +{ + typedef typename list4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct list< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list5< T0,T1,T2,T3,T4 > +{ + typedef typename list5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct list< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list + : list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/list_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/list_c.hpp new file mode 100644 index 0000000000..0b48a7f8e1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/list_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct list_c; + +template< + typename T + > +struct list_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list0_c +{ + typedef typename list0_c::type type; +}; + +template< + typename T, long C0 + > +struct list_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list1_c< T,C0 > +{ + typedef typename list1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct list_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list2_c< T,C0,C1 > +{ + typedef typename list2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct list_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list3_c< T,C0,C1,C2 > +{ + typedef typename list3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct list_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list4_c< T,C0,C1,C2,C3 > +{ + typedef typename list4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct list_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c + : list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/map.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/map.hpp new file mode 100644 index 0000000000..837e013771 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/map.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map; + +template< + + > +struct map< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map0< > +{ + typedef map0< >::type type; +}; + +template< + typename T0 + > +struct map< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map1 +{ + typedef typename map1::type type; +}; + +template< + typename T0, typename T1 + > +struct map< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map2< T0,T1 > +{ + typedef typename map2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct map< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map3< T0,T1,T2 > +{ + typedef typename map3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct map< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map4< T0,T1,T2,T3 > +{ + typedef typename map4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct map< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map5< T0,T1,T2,T3,T4 > +{ + typedef typename map5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct map< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map + : map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/minus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/minus.hpp new file mode 100644 index 0000000000..71d4913766 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/minus.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , minus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct minus< N1,N2,N3,N4,na > + + : minus< minus< minus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct minus< N1,N2,N3,na,na > + + : minus< minus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct minus< N1,N2,na,na,na > + : minus_impl< + typename minus_tag::type + , typename minus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + - BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/modulus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/modulus.hpp new file mode 100644 index 0000000000..224b34930c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/modulus.hpp @@ -0,0 +1,101 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct modulus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + + : modulus_impl< + typename modulus_tag::type + , typename modulus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + % BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp new file mode 100644 index 0000000000..98b21b1e22 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct not_equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + + : not_equal_to_impl< + typename not_equal_to_tag::type + , typename not_equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/or.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/or.hpp new file mode 100644 index 0000000000..31e1aaa4e6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/or.hpp @@ -0,0 +1,69 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/or.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct or_impl + : true_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct or_impl< false,T1,T2,T3,T4 > + : or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , false_ + > +{ +}; + +template<> +struct or_impl< + false + , false_, false_, false_, false_ + > + : false_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = false_, typename T4 = false_, typename T5 = false_ + > +struct or_ + + : aux::or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , or_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , or_ + ) + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp new file mode 100644 index 0000000000..ff97364b9b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp @@ -0,0 +1,105 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg< -1 > _; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +} + +}} + +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<1> _1; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<2> _2; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<3> _3; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<4> _4; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<5> _5; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<6> _6; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +} + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/plus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/plus.hpp new file mode 100644 index 0000000000..a9f6ee79a5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/plus.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , plus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct plus< N1,N2,N3,N4,na > + + : plus< plus< plus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct plus< N1,N2,N3,na,na > + + : plus< plus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct plus< N1,N2,na,na,na > + : plus_impl< + typename plus_tag::type + , typename plus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + + BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/quote.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/quote.hpp new file mode 100644 index 0000000000..020f093965 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/quote.hpp @@ -0,0 +1,123 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/quote.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< typename T, bool has_type_ > +struct quote_impl +{ + typedef typename T::type type; +}; + +template< typename T > +struct quote_impl< T,false > +{ + typedef T type; +}; + +template< + template< typename P1 > class F + , typename Tag = void_ + > +struct quote1 +{ + template< typename U1 > struct apply + + : quote_impl< + F + , aux::has_type< F >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2 > class F + , typename Tag = void_ + > +struct quote2 +{ + template< typename U1, typename U2 > struct apply + + : quote_impl< + F< U1,U2 > + , aux::has_type< F< U1,U2 > >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3 > class F + , typename Tag = void_ + > +struct quote3 +{ + template< typename U1, typename U2, typename U3 > struct apply + + : quote_impl< + F< U1,U2,U3 > + , aux::has_type< F< U1,U2,U3 > >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename Tag = void_ + > +struct quote4 +{ + template< + typename U1, typename U2, typename U3, typename U4 + > + struct apply + + : quote_impl< + F< U1,U2,U3,U4 > + , aux::has_type< F< U1,U2,U3,U4 > >::value + > + + { + }; +}; + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename Tag = void_ + > +struct quote5 +{ + template< + typename U1, typename U2, typename U3, typename U4 + , typename U5 + > + struct apply + + : quote_impl< + F< U1,U2,U3,U4,U5 > + , aux::has_type< F< U1,U2,U3,U4,U5 > >::value + > + + { + }; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp new file mode 100644 index 0000000000..c468684c91 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp @@ -0,0 +1,231 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename deref::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp new file mode 100644 index 0000000000..658f92a7c3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp @@ -0,0 +1,231 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/set.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/set.hpp new file mode 100644 index 0000000000..5721922e11 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/set.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set; + +template< + + > +struct set< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set0< > +{ + typedef set0< >::type type; +}; + +template< + typename T0 + > +struct set< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set1 +{ + typedef typename set1::type type; +}; + +template< + typename T0, typename T1 + > +struct set< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set2< T0,T1 > +{ + typedef typename set2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct set< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set3< T0,T1,T2 > +{ + typedef typename set3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct set< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set4< T0,T1,T2,T3 > +{ + typedef typename set4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct set< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set5< T0,T1,T2,T3,T4 > +{ + typedef typename set5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct set< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set + : set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/set_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/set_c.hpp new file mode 100644 index 0000000000..cbeb932c13 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/set_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct set_c; + +template< + typename T + > +struct set_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set0_c +{ + typedef typename set0_c::type type; +}; + +template< + typename T, long C0 + > +struct set_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set1_c< T,C0 > +{ + typedef typename set1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct set_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set2_c< T,C0,C1 > +{ + typedef typename set2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct set_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set3_c< T,C0,C1,C2 > +{ + typedef typename set3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct set_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set4_c< T,C0,C1,C2,C3 > +{ + typedef typename set4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct set_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : set17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : set18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : set19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct set_c + : set20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp new file mode 100644 index 0000000000..b5b181ce19 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_left_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + + : shift_left_impl< + typename shift_left_tag::type + , typename shift_left_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + << BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/shift_right.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/shift_right.hpp new file mode 100644 index 0000000000..f7a342e989 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/shift_right.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_right_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + + : shift_right_impl< + typename shift_right_tag::type + , typename shift_right_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + >> BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp new file mode 100644 index 0000000000..daec4b8a8e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// *Preprocessed* version of the main "template_arity.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { +template< int N > struct arity_tag +{ + typedef char (&type)[N + 1]; +}; + +template< + int C1, int C2, int C3, int C4, int C5, int C6 + > +struct max_arity +{ + BOOST_STATIC_CONSTANT(int, value = + ( C6 > 0 ? C6 : ( C5 > 0 ? C5 : ( C4 > 0 ? C4 : ( C3 > 0 ? C3 : ( C2 > 0 ? C2 : ( C1 > 0 ? C1 : -1 ) ) ) ) ) ) + ); +}; + +arity_tag<0>::type arity_helper(...); + +template< + template< typename P1 > class F + , typename T1 + > +typename arity_tag<1>::type +arity_helper(type_wrapper< F >, arity_tag<1>); + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + > +typename arity_tag<2>::type +arity_helper(type_wrapper< F< T1,T2 > >, arity_tag<2>); + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + > +typename arity_tag<3>::type +arity_helper(type_wrapper< F< T1,T2,T3 > >, arity_tag<3>); + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + > +typename arity_tag<4>::type +arity_helper(type_wrapper< F< T1,T2,T3,T4 > >, arity_tag<4>); + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + > +typename arity_tag<5>::type +arity_helper(type_wrapper< F< T1,T2,T3,T4,T5 > >, arity_tag<5>); + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6 + > +typename arity_tag<6>::type +arity_helper(type_wrapper< F< T1,T2,T3,T4,T5,T6 > >, arity_tag<6>); +template< typename F, int N > +struct template_arity_impl +{ + BOOST_STATIC_CONSTANT(int, value = + sizeof(::boost::mpl::aux::arity_helper(type_wrapper(), arity_tag())) - 1 + ); +}; + +template< typename F > +struct template_arity +{ + BOOST_STATIC_CONSTANT(int, value = ( + max_arity< template_arity_impl< F,1 >::value, template_arity_impl< F,2 >::value, template_arity_impl< F,3 >::value, template_arity_impl< F,4 >::value, template_arity_impl< F,5 >::value, template_arity_impl< F,6 >::value >::value + )); + typedef mpl::int_ type; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/times.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/times.hpp new file mode 100644 index 0000000000..cb97cc4e13 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/times.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + : times< times< times< times< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , times + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct times< N1,N2,N3,N4,na > + + : times< times< times< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct times< N1,N2,N3,na,na > + + : times< times< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct times< N1,N2,na,na,na > + : times_impl< + typename times_tag::type + , typename times_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + * BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp new file mode 100644 index 0000000000..2194ce9d11 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< int size, typename F, typename Args > +struct unpack_args_impl; + +template< typename F, typename Args > +struct unpack_args_impl< 0,F,Args > + : apply0< + F + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 1,F,Args > + : apply1< + F + , typename at_c< Args,0 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 2,F,Args > + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 3,F,Args > + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 4,F,Args > + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 5,F,Args > + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > +{ +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + + : aux::unpack_args_impl< size::value,F, Args > + + { + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/vector.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/vector.hpp new file mode 100644 index 0000000000..bfa9565a53 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/vector.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct vector; + +template< + + > +struct vector< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct vector< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct vector< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct vector< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct vector< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct vector< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct vector< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp new file mode 100644 index 0000000000..0f1560d7f1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp @@ -0,0 +1,309 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct vector_c; + +template< + typename T + > +struct vector_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector0_c +{ + typedef typename vector0_c::type type; +}; + +template< + typename T, long C0 + > +struct vector_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector1_c< T, T(C0) > +{ + typedef typename vector1_c< T, T(C0) >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct vector_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector2_c< T, T(C0), T(C1) > +{ + typedef typename vector2_c< T, T(C0), T(C1) >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct vector_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector3_c< T, T(C0), T(C1), T(C2) > +{ + typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct vector_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > +{ + typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct vector_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > +{ + typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > +{ + typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > +{ + typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > +{ + typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > +{ + typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > +{ + typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > +{ + typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > +{ + typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > +{ + typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > +{ + typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > +{ + typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > +{ + typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > +{ + typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > +{ + typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > +{ + typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c + : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > +{ + typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/advance_backward.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/advance_backward.hpp new file mode 100644 index 0000000000..36337c8a34 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/advance_backward.hpp @@ -0,0 +1,132 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_backward; +template<> +struct advance_backward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; + + /// ETI workaround + template<> struct apply + { + typedef int type; + }; + +}; + +template<> +struct advance_backward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef iter1 type; + }; + + /// ETI workaround + template<> struct apply + { + typedef int type; + }; + +}; + +template<> +struct advance_backward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef iter2 type; + }; + + /// ETI workaround + template<> struct apply + { + typedef int type; + }; + +}; + +template<> +struct advance_backward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef iter3 type; + }; + + /// ETI workaround + template<> struct apply + { + typedef int type; + }; + +}; + +template<> +struct advance_backward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef typename prior::type iter4; + typedef iter4 type; + }; + + /// ETI workaround + template<> struct apply + { + typedef int type; + }; + +}; + +template< long N > +struct advance_backward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/advance_forward.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/advance_forward.hpp new file mode 100644 index 0000000000..4ffbe78da7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/advance_forward.hpp @@ -0,0 +1,132 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_forward; +template<> +struct advance_forward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; + + /// ETI workaround + template<> struct apply + { + typedef int type; + }; + +}; + +template<> +struct advance_forward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef iter1 type; + }; + + /// ETI workaround + template<> struct apply + { + typedef int type; + }; + +}; + +template<> +struct advance_forward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef iter2 type; + }; + + /// ETI workaround + template<> struct apply + { + typedef int type; + }; + +}; + +template<> +struct advance_forward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef iter3 type; + }; + + /// ETI workaround + template<> struct apply + { + typedef int type; + }; + +}; + +template<> +struct advance_forward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef typename next::type iter4; + typedef iter4 type; + }; + + /// ETI workaround + template<> struct apply + { + typedef int type; + }; + +}; + +template< long N > +struct advance_forward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/and.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/and.hpp new file mode 100644 index 0000000000..555c800167 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/and.hpp @@ -0,0 +1,73 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/and.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< bool C_ > struct and_impl +{ + template< + typename T1, typename T2, typename T3, typename T4 + > + struct result_ + : false_ + { + }; +}; + +template<> struct and_impl +{ + template< + typename T1, typename T2, typename T3, typename T4 + > + struct result_ + : and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + >::template result_< T2,T3,T4,true_ > + { + }; +}; + +template<> +struct and_impl + ::result_< true_,true_,true_,true_ > + : true_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = true_, typename T4 = true_, typename T5 = true_ + > +struct and_ + + : aux::and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + >::template result_< T2,T3,T4,T5 > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , and_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , and_ + ) + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/apply.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/apply.hpp new file mode 100644 index 0000000000..a3e2929ff8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/apply.hpp @@ -0,0 +1,166 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0 + +{ + typedef typename apply_wrap0< + typename lambda::type + + >::type type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) +}; + +/// workaround for ETI bug +template<> +struct apply0 +{ + typedef int type; +}; + +template< + typename F, typename T1 + > +struct apply1 + +{ + typedef typename apply_wrap1< + typename lambda::type + , T1 + >::type type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) +}; + +/// workaround for ETI bug +template<> +struct apply1< int,int > +{ + typedef int type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply2 + +{ + typedef typename apply_wrap2< + typename lambda::type + , T1, T2 + >::type type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) +}; + +/// workaround for ETI bug +template<> +struct apply2< int,int,int > +{ + typedef int type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3 + +{ + typedef typename apply_wrap3< + typename lambda::type + , T1, T2, T3 + >::type type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) +}; + +/// workaround for ETI bug +template<> +struct apply3< int,int,int,int > +{ + typedef int type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4 + +{ + typedef typename apply_wrap4< + typename lambda::type + , T1, T2, T3, T4 + >::type type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) +}; + +/// workaround for ETI bug +template<> +struct apply4< int,int,int,int,int > +{ + typedef int type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5 + +{ + typedef typename apply_wrap5< + typename lambda::type + , T1, T2, T3, T4, T5 + >::type type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) +}; + +/// workaround for ETI bug +template<> +struct apply5< int,int,int,int,int,int > +{ + typedef int type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/apply_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/apply_fwd.hpp new file mode 100644 index 0000000000..f0f86c1766 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/apply_fwd.hpp @@ -0,0 +1,46 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/apply_wrap.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/apply_wrap.hpp new file mode 100644 index 0000000000..4e89507d90 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/apply_wrap.hpp @@ -0,0 +1,247 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< typename F> +struct msvc_apply0 +{ + template< bool > struct f_ : F {}; + template<> struct f_ + { + template< typename P = int > struct apply + { + typedef int type; + }; + }; + + template< typename T = int > struct result_ + : f_< aux::msvc_never_true::value > + ::template apply<> + { + }; + +}; + +template< + typename F + > +struct apply_wrap0 +{ + typedef typename msvc_apply0::template result_< + + >::type type; +}; + +/// workaround for ETI bug +template<> +struct apply_wrap0 +{ + typedef int type; +}; + +template< typename F> +struct msvc_apply1 +{ + template< bool > struct f_ : F {}; + template<> struct f_ + { + template< typename P1 > struct apply + { + typedef int type; + }; + }; + + template< typename T1 > struct result_ + : f_< aux::msvc_never_true::value > + ::template apply + { + }; +}; + +template< + typename F, typename T1 + > +struct apply_wrap1 +{ + typedef typename msvc_apply1::template result_< + T1 + >::type type; +}; + +/// workaround for ETI bug +template<> +struct apply_wrap1< int,int > +{ + typedef int type; +}; + +template< typename F> +struct msvc_apply2 +{ + template< bool > struct f_ : F {}; + template<> struct f_ + { + template< typename P1, typename P2 > struct apply + { + typedef int type; + }; + }; + + template< typename T1, typename T2 > struct result_ + : f_< aux::msvc_never_true::value > + ::template apply< T1,T2 > + { + }; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap2 +{ + typedef typename msvc_apply2::template result_< + T1, T2 + >::type type; +}; + +/// workaround for ETI bug +template<> +struct apply_wrap2< int,int,int > +{ + typedef int type; +}; + +template< typename F> +struct msvc_apply3 +{ + template< bool > struct f_ : F {}; + template<> struct f_ + { + template< typename P1, typename P2, typename P3 > struct apply + { + typedef int type; + }; + }; + + template< typename T1, typename T2, typename T3 > struct result_ + : f_< aux::msvc_never_true::value > + ::template apply< T1,T2,T3 > + { + }; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap3 +{ + typedef typename msvc_apply3::template result_< + T1, T2, T3 + >::type type; +}; + +/// workaround for ETI bug +template<> +struct apply_wrap3< int,int,int,int > +{ + typedef int type; +}; + +template< typename F> +struct msvc_apply4 +{ + template< bool > struct f_ : F {}; + template<> struct f_ + { + template< + typename P1, typename P2, typename P3, typename P4 + > + struct apply + { + typedef int type; + }; + }; + + template< + typename T1, typename T2, typename T3, typename T4 + > + struct result_ + : f_< aux::msvc_never_true::value > + ::template apply< T1,T2,T3,T4 > + { + }; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap4 +{ + typedef typename msvc_apply4::template result_< + T1, T2, T3, T4 + >::type type; +}; + +/// workaround for ETI bug +template<> +struct apply_wrap4< int,int,int,int,int > +{ + typedef int type; +}; + +template< typename F> +struct msvc_apply5 +{ + template< bool > struct f_ : F {}; + template<> struct f_ + { + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + struct apply + { + typedef int type; + }; + }; + + template< + typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + : f_< aux::msvc_never_true::value > + ::template apply< T1,T2,T3,T4,T5 > + { + }; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap5 +{ + typedef typename msvc_apply5::template result_< + T1, T2, T3, T4, T5 + >::type type; +}; + +/// workaround for ETI bug +template<> +struct apply_wrap5< int,int,int,int,int,int > +{ + typedef int type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/arg.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/arg.hpp new file mode 100644 index 0000000000..6f2f8a8070 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/arg.hpp @@ -0,0 +1,123 @@ + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > +{ + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<1> +{ + BOOST_STATIC_CONSTANT(int, value = 1); + typedef arg<2> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<2> +{ + BOOST_STATIC_CONSTANT(int, value = 2); + typedef arg<3> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U2 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<3> +{ + BOOST_STATIC_CONSTANT(int, value = 3); + typedef arg<4> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U3 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<4> +{ + BOOST_STATIC_CONSTANT(int, value = 4); + typedef arg<5> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U4 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<5> +{ + BOOST_STATIC_CONSTANT(int, value = 5); + typedef arg<6> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U5 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/basic_bind.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/basic_bind.hpp new file mode 100644 index 0000000000..4f12a40f04 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/basic_bind.hpp @@ -0,0 +1,328 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< bool > +struct resolve_arg_impl +{ + template< + typename T, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > + struct result_ + { + typedef T type; + }; +}; + +template<> +struct resolve_arg_impl +{ + template< + typename T, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > + struct result_ + { + typedef typename apply_wrap5< + T + , U1, U2, U3, U4, U5 + >::type type; + }; +}; + +template< typename T > struct is_bind_template; + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg + : resolve_arg_impl< is_bind_template::value > + ::template result_< T,U1,U2,U3,U4,U5 > +{ +}; + +template< int arity_ > struct bind_chooser; + +aux::no_tag is_bind_helper(...); +template< typename T > aux::no_tag is_bind_helper(protect*); + +template< int N > +aux::yes_tag is_bind_helper(arg*); + +template< bool is_ref_ = true > +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = false); + }; +}; + +template<> +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = + sizeof(aux::is_bind_helper(static_cast(0))) + == sizeof(aux::yes_tag) + ); + }; +}; + +template< typename T > struct is_bind_template + : is_bind_template_impl< ::boost::detail::is_reference_impl::value > + ::template result_ +{ +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F + > +aux::yes_tag +is_bind_helper(bind0*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1 + > +aux::yes_tag +is_bind_helper(bind1< F,T1 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2 + > +aux::yes_tag +is_bind_helper(bind2< F,T1,T2 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3 + > +aux::yes_tag +is_bind_helper(bind3< F,T1,T2,T3 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +aux::yes_tag +is_bind_helper(bind4< F,T1,T2,T3,T4 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; + + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +aux::yes_tag +is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/bind.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/bind.hpp new file mode 100644 index 0000000000..53c76e8f2a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/bind.hpp @@ -0,0 +1,432 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< bool > +struct resolve_arg_impl +{ + template< + typename T, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > + struct result_ + { + typedef T type; + }; +}; + +template<> +struct resolve_arg_impl +{ + template< + typename T, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > + struct result_ + { + typedef typename apply_wrap5< + T + , U1, U2, U3, U4, U5 + >::type type; + }; +}; + +template< typename T > struct is_bind_template; + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg + : resolve_arg_impl< is_bind_template::value > + ::template result_< T,U1,U2,U3,U4,U5 > +{ +}; + +template< typename T > +struct replace_unnamed_arg_impl +{ + template< typename Arg > struct result_ + { + typedef Arg next; + typedef T type; + }; +}; + +template<> +struct replace_unnamed_arg_impl< arg< -1 > > +{ + template< typename Arg > struct result_ + { + typedef typename next::type next; + typedef Arg type; + }; +}; + +template< typename T, typename Arg > +struct replace_unnamed_arg + : replace_unnamed_arg_impl::template result_ +{ +}; + +template< int arity_ > struct bind_chooser; + +aux::no_tag is_bind_helper(...); +template< typename T > aux::no_tag is_bind_helper(protect*); + +template< int N > +aux::yes_tag is_bind_helper(arg*); + +template< bool is_ref_ = true > +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = false); + }; +}; + +template<> +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = + sizeof(aux::is_bind_helper(static_cast(0))) + == sizeof(aux::yes_tag) + ); + }; +}; + +template< typename T > struct is_bind_template + : is_bind_template_impl< ::boost::detail::is_reference_impl::value > + ::template result_ +{ +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F + > +aux::yes_tag +is_bind_helper(bind0*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1 + > +aux::yes_tag +is_bind_helper(bind1< F,T1 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2 + > +aux::yes_tag +is_bind_helper(bind2< F,T1,T2 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3 + > +aux::yes_tag +is_bind_helper(bind3< F,T1,T2,T3 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +aux::yes_tag +is_bind_helper(bind4< F,T1,T2,T3,T4 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + typedef aux::replace_unnamed_arg< T5,n5 > r5; + typedef typename r5::type a5; + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +aux::yes_tag +is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/bind_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/bind_fwd.hpp new file mode 100644 index 0000000000..022cba3461 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/bind_fwd.hpp @@ -0,0 +1,46 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/bitand.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/bitand.hpp new file mode 100644 index 0000000000..e96cf1a726 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/bitand.hpp @@ -0,0 +1,149 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct bitand_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitand_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitand_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct bitand_2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + + : if_< + + is_na + , bitand_2< N1,N2 > + , bitand_< + bitand_2< N1,N2 > + , N3, N4, N5 + > + >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitand_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct bitand_2 + : aux::msvc_eti_base< typename apply_wrap2< + bitand_impl< + typename bitand_tag::type + , typename bitand_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitand_2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct bitand_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 & n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::bitand_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/bitor.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/bitor.hpp new file mode 100644 index 0000000000..bbc96ab7ae --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/bitor.hpp @@ -0,0 +1,149 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct bitor_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitor_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitor_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct bitor_2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + + : if_< + + is_na + , bitor_2< N1,N2 > + , bitor_< + bitor_2< N1,N2 > + , N3, N4, N5 + > + >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct bitor_2 + : aux::msvc_eti_base< typename apply_wrap2< + bitor_impl< + typename bitor_tag::type + , typename bitor_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitor_2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct bitor_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 | n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::bitor_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/bitxor.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/bitxor.hpp new file mode 100644 index 0000000000..4c1429712c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/bitxor.hpp @@ -0,0 +1,149 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct bitxor_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitxor_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitxor_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct bitxor_2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + + : if_< + + is_na + , bitxor_2< N1,N2 > + , bitxor_< + bitxor_2< N1,N2 > + , N3, N4, N5 + > + >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitxor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct bitxor_2 + : aux::msvc_eti_base< typename apply_wrap2< + bitxor_impl< + typename bitxor_tag::type + , typename bitxor_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitxor_2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct bitxor_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 ^ n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::bitxor_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/deque.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/deque.hpp new file mode 100644 index 0000000000..a0445d9dfd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/deque.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/deque.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct deque_chooser; + +} + +namespace aux { + +template<> +struct deque_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef vector0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_deque_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_deque_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct deque_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct deque_impl +{ + typedef aux::deque_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::deque_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct deque + : aux::deque_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::deque_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/divides.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/divides.hpp new file mode 100644 index 0000000000..7681491922 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/divides.hpp @@ -0,0 +1,148 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct divides_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct divides_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct divides_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct divides2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + + : if_< + + is_na + , divides2< N1,N2 > + , divides< + divides2< N1,N2 > + , N3, N4, N5 + > + >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , divides + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct divides2 + : aux::msvc_eti_base< typename apply_wrap2< + divides_impl< + typename divides_tag::type + , typename divides_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, divides2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct divides_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 / n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::divides_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/equal_to.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/equal_to.hpp new file mode 100644 index 0000000000..64e9065027 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/equal_to.hpp @@ -0,0 +1,102 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct equal_to_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct equal_to_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct equal_to_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + : aux::msvc_eti_base< typename apply_wrap2< + equal_to_impl< + typename equal_to_tag::type + , typename equal_to_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/fold_impl.hpp new file mode 100644 index 0000000000..4b3c69076a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/fold_impl.hpp @@ -0,0 +1,293 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl; + +template< int N > +struct fold_chunk; + +template<> struct fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template< int N > +struct fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_step; + +template< + typename Last + , typename State + > +struct fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , fold_null_step< Last,State > + , fold_step< First,Last,State,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_step +{ + typedef fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2::type>::type + , ForwardOp + > chunk_; + + typedef typename chunk_::state state; + typedef typename chunk_::iterator iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl + : fold_chunk + ::template result_< First,Last,State,ForwardOp > +{ +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp new file mode 100644 index 0000000000..bf818731eb --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp @@ -0,0 +1,554 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +} // namespace aux + +template< + typename T + , typename Tag + + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg, Tag > +{ + typedef true_ is_le; + typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 + typedef mpl::protect type; +}; + +template< + typename F + , typename Tag + > +struct lambda< + bind0 + , Tag + + > +{ + typedef false_ is_le; + typedef bind0< + F + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1 +{ + typedef F< + typename L1::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1< true_,Tag,F,L1 > +{ + typedef bind1< + quote1< F,Tag > + , typename L1::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1 > class F + , typename T1 + , typename Tag + > +struct lambda< + F + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1 + , typename Tag + > +struct lambda< + bind1< F,T1 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind1< + F + , T1 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2 +{ + typedef F< + typename L1::type, typename L2::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2< true_,Tag,F,L1,L2 > +{ + typedef bind2< + quote2< F,Tag > + , typename L1::result_, typename L2::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + , typename Tag + > +struct lambda< + F< T1,T2 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2 + , typename Tag + > +struct lambda< + bind2< F,T1,T2 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind2< + F + , T1, T2 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3< true_,Tag,F,L1,L2,L3 > +{ + typedef bind3< + quote3< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + F< T1,T2,T3 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind3< + F + , T1, T2, T3 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > +{ + typedef bind4< + quote4< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind4< + F + , T1, T2, T3, T4 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type, typename L5::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > +{ + typedef bind5< + quote5< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind5< + F + , T1, T2, T3, T4, T5 + > result_; + + typedef result_ type; +}; + +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< mpl::protect, Tag > +{ + typedef false_ is_le; + typedef mpl::protect result_; + typedef result_ type; +}; + +/// specializations for the main 'bind' form + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; +}; + +/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars + +template< + typename F, typename Tag1, typename Tag2 + > +struct lambda< + lambda< F,Tag1 > + , Tag2 + > +{ + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef aux::le_result2 le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +BOOST_MPL_AUX_NA_SPEC(2, lambda) + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/greater.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/greater.hpp new file mode 100644 index 0000000000..5f5662dedd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/greater.hpp @@ -0,0 +1,102 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct greater_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct greater_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct greater_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + : aux::msvc_eti_base< typename apply_wrap2< + greater_impl< + typename greater_tag::type + , typename greater_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/greater_equal.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/greater_equal.hpp new file mode 100644 index 0000000000..ae776fcc5b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/greater_equal.hpp @@ -0,0 +1,102 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct greater_equal_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct greater_equal_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct greater_equal_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + : aux::msvc_eti_base< typename apply_wrap2< + greater_equal_impl< + typename greater_equal_tag::type + , typename greater_equal_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/inherit.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/inherit.hpp new file mode 100644 index 0000000000..233a1ec30c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/inherit.hpp @@ -0,0 +1,166 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C1, bool C2 > +struct inherit2_impl +{ + template< typename Derived, typename T1, typename T2 > struct result_ + : T1, T2 + { + typedef Derived type_; + }; +}; + +template<> +struct inherit2_impl< false,true > +{ + template< typename Derived, typename T1, typename T2 > struct result_ + : T1 + { + typedef T1 type_; + }; +}; + +template<> +struct inherit2_impl< true,false > +{ + template< typename Derived, typename T1, typename T2 > struct result_ + : T2 + { + typedef T2 type_; + }; +}; + +template<> +struct inherit2_impl< true,true > +{ + template< typename Derived, typename T1, typename T2 > struct result_ + { + typedef T1 type_; + }; +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : aux::inherit2_impl< + is_empty_base::value + , is_empty_base::value + >::template result_< inherit2< T1,T2 >,T1, T2 > +{ + typedef typename inherit2::type_ type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/iter_fold_if_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/iter_fold_if_impl.hpp new file mode 100644 index 0000000000..695179584d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/iter_fold_if_impl.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< typename Iterator, typename State > +struct iter_fold_if_null_step +{ + typedef State state; + typedef Iterator iterator; +}; + +template< bool > +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef typename apply2< StateOp,State,Iterator >::type state; + typedef typename IteratorOp::type iterator; + }; +}; + +template<> +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef State state; + typedef Iterator iterator; + }; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename Predicate + > +struct iter_fold_if_forward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename BackwardOp + , typename Predicate + > +struct iter_fold_if_backward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,BackwardOp, identity > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename ForwardPredicate + , typename BackwardOp + , typename BackwardPredicate + > +struct iter_fold_if_impl +{ + private: + typedef iter_fold_if_null_step< Iterator,State > forward_step0; + typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; + typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; + typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; + typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; + + + typedef typename if_< + typename forward_step4::not_last + , iter_fold_if_impl< + typename forward_step4::iterator + , typename forward_step4::state + , ForwardOp + , ForwardPredicate + , BackwardOp + , BackwardPredicate + > + , iter_fold_if_null_step< + typename forward_step4::iterator + , typename forward_step4::state + > + >::type backward_step4; + + typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; + typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; + typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; + typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; + + + public: + typedef typename backward_step0::state state; + typedef typename backward_step4::iterator iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/iter_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/iter_fold_impl.hpp new file mode 100644 index 0000000000..69aadc46b6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/iter_fold_impl.hpp @@ -0,0 +1,293 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl; + +template< int N > +struct iter_fold_chunk; + +template<> struct iter_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct iter_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct iter_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct iter_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct iter_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template< int N > +struct iter_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef iter_fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_step; + +template< + typename Last + , typename State + > +struct iter_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct iter_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , iter_fold_null_step< Last,State > + , iter_fold_step< First,Last,State,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_step +{ + typedef iter_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > chunk_; + + typedef typename chunk_::state state; + typedef typename chunk_::iterator iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl + : iter_fold_chunk + ::template result_< First,Last,State,ForwardOp > +{ +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/lambda_no_ctps.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/lambda_no_ctps.hpp new file mode 100644 index 0000000000..890a198a46 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/lambda_no_ctps.hpp @@ -0,0 +1,229 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ + { + typedef T type; + typedef is_placeholder is_le; + }; +}; + +template<> struct lambda_impl< int_<1> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + + typedef bind1< + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<2> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; + + typedef bind2< + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<3> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; + + typedef bind3< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<4> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; + + typedef bind4< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<5> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; + + typedef bind5< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Protect + > +struct lambda +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity::type arity_; + typedef typename aux::lambda_impl + ::template result_< T,Tag,Protect > l_; + + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; + +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/less.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/less.hpp new file mode 100644 index 0000000000..951f060827 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/less.hpp @@ -0,0 +1,102 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct less_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct less_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct less_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + : aux::msvc_eti_base< typename apply_wrap2< + less_impl< + typename less_tag::type + , typename less_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > + BOOST_MPL_AUX_VALUE_WKND(N1)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/less_equal.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/less_equal.hpp new file mode 100644 index 0000000000..a56e692e3e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/less_equal.hpp @@ -0,0 +1,102 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct less_equal_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct less_equal_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct less_equal_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + : aux::msvc_eti_base< typename apply_wrap2< + less_equal_impl< + typename less_equal_tag::type + , typename less_equal_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/list.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/list.hpp new file mode 100644 index 0000000000..e5ea456c9e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/list.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct list_chooser; + +} + +namespace aux { + +template<> +struct list_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef list0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_list_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_list_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct list_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list_impl +{ + typedef aux::list_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::list_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct list + : aux::list_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::list_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/list_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/list_c.hpp new file mode 100644 index 0000000000..ab25482f55 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/list_c.hpp @@ -0,0 +1,534 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct list_c_chooser; + +} + +namespace aux { + +template<> +struct list_c_chooser<0> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list0_c< + T + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<1> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list1_c< + T, C0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<2> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list2_c< + T, C0, C1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<3> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list3_c< + T, C0, C1, C2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<4> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list4_c< + T, C0, C1, C2, C3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<5> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list5_c< + T, C0, C1, C2, C3, C4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<6> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list6_c< + T, C0, C1, C2, C3, C4, C5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<7> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list7_c< + T, C0, C1, C2, C3, C4, C5, C6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<8> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list8_c< + T, C0, C1, C2, C3, C4, C5, C6, C7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<9> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list9_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<10> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list10_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<11> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list11_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<12> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list12_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<13> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list13_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<14> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<15> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<16> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<17> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<18> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<19> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<20> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< long C > +struct is_list_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_list_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 + , long C9, long C10, long C11, long C12, long C13, long C14, long C15 + , long C16, long C17, long C18, long C19, long C20 + > +struct list_c_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + ); + +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c_impl +{ + typedef aux::list_c_count_args< + C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + > arg_num_; + + typedef typename aux::list_c_chooser< arg_num_::value > + ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +} // namespace aux + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct list_c + : aux::list_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type +{ + typedef typename aux::list_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/map.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/map.hpp new file mode 100644 index 0000000000..970e0b7602 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/map.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct map_chooser; + +} + +namespace aux { + +template<> +struct map_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef map0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_map_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_map_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct map_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map_impl +{ + typedef aux::map_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::map_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map + : aux::map_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::map_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/minus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/minus.hpp new file mode 100644 index 0000000000..b47f328574 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/minus.hpp @@ -0,0 +1,148 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct minus_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct minus_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct minus_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct minus2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + + : if_< + + is_na + , minus2< N1,N2 > + , minus< + minus2< N1,N2 > + , N3, N4, N5 + > + >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , minus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct minus2 + : aux::msvc_eti_base< typename apply_wrap2< + minus_impl< + typename minus_tag::type + , typename minus_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, minus2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct minus_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 - n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::minus_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/modulus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/modulus.hpp new file mode 100644 index 0000000000..c12b3f9ff6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/modulus.hpp @@ -0,0 +1,115 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct modulus_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct modulus_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct modulus_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + : aux::msvc_eti_base< typename apply_wrap2< + modulus_impl< + typename modulus_tag::type + , typename modulus_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct modulus_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 % n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::modulus_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/not_equal_to.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/not_equal_to.hpp new file mode 100644 index 0000000000..6e56b1e89f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/not_equal_to.hpp @@ -0,0 +1,102 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct not_equal_to_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct not_equal_to_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct not_equal_to_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + : aux::msvc_eti_base< typename apply_wrap2< + not_equal_to_impl< + typename not_equal_to_tag::type + , typename not_equal_to_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/or.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/or.hpp new file mode 100644 index 0000000000..3f7394e7cc --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/or.hpp @@ -0,0 +1,73 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/or.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< bool C_ > struct or_impl +{ + template< + typename T1, typename T2, typename T3, typename T4 + > + struct result_ + : true_ + { + }; +}; + +template<> struct or_impl +{ + template< + typename T1, typename T2, typename T3, typename T4 + > + struct result_ + : or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + >::template result_< T2,T3,T4,false_ > + { + }; +}; + +template<> +struct or_impl + ::result_< false_,false_,false_,false_ > + : false_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = false_, typename T4 = false_, typename T5 = false_ + > +struct or_ + + : aux::or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + >::template result_< T2,T3,T4,T5 > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , or_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , or_ + ) + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/placeholders.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/placeholders.hpp new file mode 100644 index 0000000000..ff97364b9b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/placeholders.hpp @@ -0,0 +1,105 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg< -1 > _; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +} + +}} + +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<1> _1; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<2> _2; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<3> _3; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<4> _4; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<5> _5; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<6> _6; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +} + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/plus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/plus.hpp new file mode 100644 index 0000000000..105233537b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/plus.hpp @@ -0,0 +1,148 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct plus_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct plus_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct plus_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct plus2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + + : if_< + + is_na + , plus2< N1,N2 > + , plus< + plus2< N1,N2 > + , N3, N4, N5 + > + >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , plus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct plus2 + : aux::msvc_eti_base< typename apply_wrap2< + plus_impl< + typename plus_tag::type + , typename plus_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, plus2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct plus_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 + n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::plus_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/quote.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/quote.hpp new file mode 100644 index 0000000000..e7a7f00196 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/quote.hpp @@ -0,0 +1,11 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/quote.hpp" header +// -- DO NOT modify by hand! + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/reverse_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/reverse_fold_impl.hpp new file mode 100644 index 0000000000..adf15b633d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/reverse_fold_impl.hpp @@ -0,0 +1,343 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< long N > +struct reverse_fold_chunk; + +template<> struct reverse_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct reverse_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct reverse_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct reverse_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct reverse_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template< long N > +struct reverse_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step; + +template< + typename Last + , typename State + > +struct reverse_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_fold_null_step< Last,State > + , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step +{ + typedef reverse_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename deref::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl + : reverse_fold_chunk + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/reverse_iter_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/reverse_iter_fold_impl.hpp new file mode 100644 index 0000000000..208ad97069 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/reverse_iter_fold_impl.hpp @@ -0,0 +1,343 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl; + +template< long N > +struct reverse_iter_fold_chunk; + +template<> struct reverse_iter_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct reverse_iter_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct reverse_iter_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct reverse_iter_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct reverse_iter_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template< long N > +struct reverse_iter_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_step; + +template< + typename Last + , typename State + > +struct reverse_iter_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_iter_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_iter_fold_null_step< Last,State > + , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_step +{ + typedef reverse_iter_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl + : reverse_iter_fold_chunk + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/set.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/set.hpp new file mode 100644 index 0000000000..95aaa5cbdf --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/set.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct set_chooser; + +} + +namespace aux { + +template<> +struct set_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef set0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_set_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_set_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct set_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set_impl +{ + typedef aux::set_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::set_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set + : aux::set_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::set_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/set_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/set_c.hpp new file mode 100644 index 0000000000..1ff34f9032 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/set_c.hpp @@ -0,0 +1,534 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct set_c_chooser; + +} + +namespace aux { + +template<> +struct set_c_chooser<0> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set0_c< + T + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<1> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set1_c< + T, C0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<2> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set2_c< + T, C0, C1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<3> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set3_c< + T, C0, C1, C2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<4> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set4_c< + T, C0, C1, C2, C3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<5> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set5_c< + T, C0, C1, C2, C3, C4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<6> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set6_c< + T, C0, C1, C2, C3, C4, C5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<7> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set7_c< + T, C0, C1, C2, C3, C4, C5, C6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<8> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set8_c< + T, C0, C1, C2, C3, C4, C5, C6, C7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<9> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set9_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<10> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set10_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<11> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set11_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<12> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set12_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<13> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set13_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<14> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<15> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<16> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<17> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<18> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<19> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<20> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< long C > +struct is_set_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_set_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 + , long C9, long C10, long C11, long C12, long C13, long C14, long C15 + , long C16, long C17, long C18, long C19, long C20 + > +struct set_c_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + ); + +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct set_c_impl +{ + typedef aux::set_c_count_args< + C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + > arg_num_; + + typedef typename aux::set_c_chooser< arg_num_::value > + ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +} // namespace aux + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct set_c + : aux::set_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type +{ + typedef typename aux::set_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/shift_left.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/shift_left.hpp new file mode 100644 index 0000000000..3861ca1db1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/shift_left.hpp @@ -0,0 +1,114 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct shift_left_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct shift_left_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct shift_left_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + : aux::msvc_eti_base< typename apply_wrap2< + shift_left_impl< + typename shift_left_tag::type + , typename shift_left_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, typename Shift, T n, Shift s > +struct shift_left_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n << s)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + : aux::shift_left_wknd< + typename N::value_type + , typename S::value_type + , N::value + , S::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/shift_right.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/shift_right.hpp new file mode 100644 index 0000000000..24ea0948e7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/shift_right.hpp @@ -0,0 +1,114 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct shift_right_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct shift_right_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct shift_right_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + : aux::msvc_eti_base< typename apply_wrap2< + shift_right_impl< + typename shift_right_tag::type + , typename shift_right_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, typename Shift, T n, Shift s > +struct shift_right_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n >> s)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + : aux::shift_right_wknd< + typename N::value_type + , typename S::value_type + , N::value + , S::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/template_arity.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/template_arity.hpp new file mode 100644 index 0000000000..1668771349 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/template_arity.hpp @@ -0,0 +1,46 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< bool > +struct template_arity_impl +{ + template< typename F > struct result_ + : mpl::int_< -1 > + { + }; +}; + +template<> +struct template_arity_impl +{ + template< typename F > struct result_ + : F::arity + { + }; +}; + +template< typename F > +struct template_arity + : template_arity_impl< ::boost::mpl::aux::has_rebind::value > + ::template result_ +{ +}; + +template<> +struct template_arity + : mpl::int_< -1 > +{ +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/times.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/times.hpp new file mode 100644 index 0000000000..dee7fd4427 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/times.hpp @@ -0,0 +1,148 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct times_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct times_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct times_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct times2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + + : if_< + + is_na + , times2< N1,N2 > + , times< + times2< N1,N2 > + , N3, N4, N5 + > + >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , times + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct times2 + : aux::msvc_eti_base< typename apply_wrap2< + times_impl< + typename times_tag::type + , typename times_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, times2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct times_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 * n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::times_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/unpack_args.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/unpack_args.hpp new file mode 100644 index 0000000000..26533dd423 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/unpack_args.hpp @@ -0,0 +1,109 @@ + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< BOOST_MPL_AUX_NTTP_DECL(int, size) > struct unpack_args_impl +{ + template< typename F, typename Args > struct apply; +}; + +template<> struct unpack_args_impl<0> +{ + template< typename F, typename Args > struct apply + : apply0< + F + > + { + }; +}; + +template<> struct unpack_args_impl<1> +{ + template< typename F, typename Args > struct apply + : apply1< + F + , typename at_c< Args,0 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<2> +{ + template< typename F, typename Args > struct apply + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<3> +{ + template< typename F, typename Args > struct apply + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<4> +{ + template< typename F, typename Args > struct apply + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<5> +{ + template< typename F, typename Args > struct apply + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > + { + }; +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + + : aux::unpack_args_impl< size::value > + ::template apply< F,Args > + + { + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/vector.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/vector.hpp new file mode 100644 index 0000000000..a6c7b6219a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/vector.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct vector_chooser; + +} + +namespace aux { + +template<> +struct vector_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef vector0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_vector_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_vector_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct vector_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector_impl +{ + typedef aux::vector_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::vector_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct vector + : aux::vector_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::vector_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/vector_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/vector_c.hpp new file mode 100644 index 0000000000..c522d0826f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc60/vector_c.hpp @@ -0,0 +1,534 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct vector_c_chooser; + +} + +namespace aux { + +template<> +struct vector_c_chooser<0> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector0_c< + T + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<1> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector1_c< + T, T(C0) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<2> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector2_c< + T, T(C0), T(C1) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<3> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector3_c< + T, T(C0), T(C1), T(C2) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<4> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector4_c< + T, T(C0), T(C1), T(C2), T(C3) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<5> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector5_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<6> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector6_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<7> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector7_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<8> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector8_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<9> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector9_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<10> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector10_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<11> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector11_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<12> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector12_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<13> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector13_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<14> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector14_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<15> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector15_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<16> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector16_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<17> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector17_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<18> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector18_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<19> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector19_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<20> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector20_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< long C > +struct is_vector_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_vector_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 + , long C9, long C10, long C11, long C12, long C13, long C14, long C15 + , long C16, long C17, long C18, long C19, long C20 + > +struct vector_c_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + ); + +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c_impl +{ + typedef aux::vector_c_count_args< + C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + > arg_num_; + + typedef typename aux::vector_c_chooser< arg_num_::value > + ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +} // namespace aux + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct vector_c + : aux::vector_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type +{ + typedef typename aux::vector_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/advance_backward.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/advance_backward.hpp new file mode 100644 index 0000000000..26de94cea1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/advance_backward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_backward; +template<> +struct advance_backward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_backward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_backward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_backward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_backward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef typename prior::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_backward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/advance_forward.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/advance_forward.hpp new file mode 100644 index 0000000000..b137cc72af --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/advance_forward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_forward; +template<> +struct advance_forward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_forward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_forward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_forward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_forward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef typename next::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_forward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/and.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/and.hpp new file mode 100644 index 0000000000..e58640a41c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/and.hpp @@ -0,0 +1,71 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/and.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< bool C_ > struct and_impl +{ + template< + typename T1, typename T2, typename T3, typename T4 + > + struct result_ + : false_ + { + }; +}; + +template<> struct and_impl +{ + template< + typename T1, typename T2, typename T3, typename T4 + > + struct result_ + : and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + >::template result_< T2,T3,T4,true_ > + { + }; + + template<> struct result_< true_,true_,true_,true_ > + : true_ + { + }; +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = true_, typename T4 = true_, typename T5 = true_ + > +struct and_ + + : aux::and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + >::template result_< T2,T3,T4,T5 > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , and_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , and_ + ) + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/apply.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/apply.hpp new file mode 100644 index 0000000000..d46d030968 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/apply.hpp @@ -0,0 +1,160 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0 + + : apply_wrap0< + typename lambda::type + + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) +}; + +/// workaround for ETI bug +template<> +struct apply0 +{ + typedef int type; +}; + +template< + typename F, typename T1 + > +struct apply1 + + : apply_wrap1< + typename lambda::type + , T1 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) +}; + +/// workaround for ETI bug +template<> +struct apply1< int,int > +{ + typedef int type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply2 + + : apply_wrap2< + typename lambda::type + , T1, T2 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) +}; + +/// workaround for ETI bug +template<> +struct apply2< int,int,int > +{ + typedef int type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3 + + : apply_wrap3< + typename lambda::type + , T1, T2, T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) +}; + +/// workaround for ETI bug +template<> +struct apply3< int,int,int,int > +{ + typedef int type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4 + + : apply_wrap4< + typename lambda::type + , T1, T2, T3, T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) +}; + +/// workaround for ETI bug +template<> +struct apply4< int,int,int,int,int > +{ + typedef int type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5 + + : apply_wrap5< + typename lambda::type + , T1, T2, T3, T4, T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) +}; + +/// workaround for ETI bug +template<> +struct apply5< int,int,int,int,int,int > +{ + typedef int type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/apply_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/apply_fwd.hpp new file mode 100644 index 0000000000..f0f86c1766 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/apply_fwd.hpp @@ -0,0 +1,46 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/apply_wrap.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/apply_wrap.hpp new file mode 100644 index 0000000000..d30751793c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/apply_wrap.hpp @@ -0,0 +1,138 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + + , typename has_apply_ = typename aux::has_apply::type + + > +struct apply_wrap0 + +{ + typedef typename F::template apply< + + >::type type; + +}; + +/// workaround for ETI bug +template<> +struct apply_wrap0 +{ + typedef int type; +}; + +template< + typename F, typename T1 + + > +struct apply_wrap1 + +{ + typedef typename F::template apply< + T1 + >::type type; + +}; + +/// workaround for ETI bug +template<> +struct apply_wrap1< int,int > +{ + typedef int type; +}; + +template< + typename F, typename T1, typename T2 + + > +struct apply_wrap2 + +{ + typedef typename F::template apply< + T1, T2 + >::type type; + +}; + +/// workaround for ETI bug +template<> +struct apply_wrap2< int,int,int > +{ + typedef int type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + + > +struct apply_wrap3 + +{ + typedef typename F::template apply< + T1, T2, T3 + >::type type; + +}; + +/// workaround for ETI bug +template<> +struct apply_wrap3< int,int,int,int > +{ + typedef int type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + + > +struct apply_wrap4 + +{ + typedef typename F::template apply< + T1, T2, T3, T4 + >::type type; + +}; + +/// workaround for ETI bug +template<> +struct apply_wrap4< int,int,int,int,int > +{ + typedef int type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + + > +struct apply_wrap5 + +{ + typedef typename F::template apply< + T1, T2, T3, T4, T5 + >::type type; + +}; + +/// workaround for ETI bug +template<> +struct apply_wrap5< int,int,int,int,int,int > +{ + typedef int type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/arg.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/arg.hpp new file mode 100644 index 0000000000..6f2f8a8070 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/arg.hpp @@ -0,0 +1,123 @@ + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > +{ + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<1> +{ + BOOST_STATIC_CONSTANT(int, value = 1); + typedef arg<2> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<2> +{ + BOOST_STATIC_CONSTANT(int, value = 2); + typedef arg<3> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U2 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<3> +{ + BOOST_STATIC_CONSTANT(int, value = 3); + typedef arg<4> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U3 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<4> +{ + BOOST_STATIC_CONSTANT(int, value = 4); + typedef arg<5> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U4 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<5> +{ + BOOST_STATIC_CONSTANT(int, value = 5); + typedef arg<6> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U5 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/basic_bind.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/basic_bind.hpp new file mode 100644 index 0000000000..4f12a40f04 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/basic_bind.hpp @@ -0,0 +1,328 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< bool > +struct resolve_arg_impl +{ + template< + typename T, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > + struct result_ + { + typedef T type; + }; +}; + +template<> +struct resolve_arg_impl +{ + template< + typename T, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > + struct result_ + { + typedef typename apply_wrap5< + T + , U1, U2, U3, U4, U5 + >::type type; + }; +}; + +template< typename T > struct is_bind_template; + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg + : resolve_arg_impl< is_bind_template::value > + ::template result_< T,U1,U2,U3,U4,U5 > +{ +}; + +template< int arity_ > struct bind_chooser; + +aux::no_tag is_bind_helper(...); +template< typename T > aux::no_tag is_bind_helper(protect*); + +template< int N > +aux::yes_tag is_bind_helper(arg*); + +template< bool is_ref_ = true > +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = false); + }; +}; + +template<> +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = + sizeof(aux::is_bind_helper(static_cast(0))) + == sizeof(aux::yes_tag) + ); + }; +}; + +template< typename T > struct is_bind_template + : is_bind_template_impl< ::boost::detail::is_reference_impl::value > + ::template result_ +{ +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F + > +aux::yes_tag +is_bind_helper(bind0*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1 + > +aux::yes_tag +is_bind_helper(bind1< F,T1 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2 + > +aux::yes_tag +is_bind_helper(bind2< F,T1,T2 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3 + > +aux::yes_tag +is_bind_helper(bind3< F,T1,T2,T3 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +aux::yes_tag +is_bind_helper(bind4< F,T1,T2,T3,T4 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; + + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +aux::yes_tag +is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/bind.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/bind.hpp new file mode 100644 index 0000000000..53c76e8f2a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/bind.hpp @@ -0,0 +1,432 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< bool > +struct resolve_arg_impl +{ + template< + typename T, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > + struct result_ + { + typedef T type; + }; +}; + +template<> +struct resolve_arg_impl +{ + template< + typename T, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > + struct result_ + { + typedef typename apply_wrap5< + T + , U1, U2, U3, U4, U5 + >::type type; + }; +}; + +template< typename T > struct is_bind_template; + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg + : resolve_arg_impl< is_bind_template::value > + ::template result_< T,U1,U2,U3,U4,U5 > +{ +}; + +template< typename T > +struct replace_unnamed_arg_impl +{ + template< typename Arg > struct result_ + { + typedef Arg next; + typedef T type; + }; +}; + +template<> +struct replace_unnamed_arg_impl< arg< -1 > > +{ + template< typename Arg > struct result_ + { + typedef typename next::type next; + typedef Arg type; + }; +}; + +template< typename T, typename Arg > +struct replace_unnamed_arg + : replace_unnamed_arg_impl::template result_ +{ +}; + +template< int arity_ > struct bind_chooser; + +aux::no_tag is_bind_helper(...); +template< typename T > aux::no_tag is_bind_helper(protect*); + +template< int N > +aux::yes_tag is_bind_helper(arg*); + +template< bool is_ref_ = true > +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = false); + }; +}; + +template<> +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = + sizeof(aux::is_bind_helper(static_cast(0))) + == sizeof(aux::yes_tag) + ); + }; +}; + +template< typename T > struct is_bind_template + : is_bind_template_impl< ::boost::detail::is_reference_impl::value > + ::template result_ +{ +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F + > +aux::yes_tag +is_bind_helper(bind0*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1 + > +aux::yes_tag +is_bind_helper(bind1< F,T1 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2 + > +aux::yes_tag +is_bind_helper(bind2< F,T1,T2 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3 + > +aux::yes_tag +is_bind_helper(bind3< F,T1,T2,T3 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +aux::yes_tag +is_bind_helper(bind4< F,T1,T2,T3,T4 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + typedef aux::replace_unnamed_arg< T5,n5 > r5; + typedef typename r5::type a5; + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +aux::yes_tag +is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/bind_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/bind_fwd.hpp new file mode 100644 index 0000000000..022cba3461 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/bind_fwd.hpp @@ -0,0 +1,46 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/bitand.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/bitand.hpp new file mode 100644 index 0000000000..e54b4ce1d4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/bitand.hpp @@ -0,0 +1,151 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct bitand_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitand_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitand_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitand_tag + : tag< T,na > +{ +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct bitand_2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + + : aux::msvc_eti_base< typename if_< + + is_na + , bitand_2< N1,N2 > + , bitand_< + bitand_2< N1,N2 > + , N3, N4, N5 + > + >::type + + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitand_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct bitand_2 + : aux::msvc_eti_base< typename apply_wrap2< + bitand_impl< + typename bitand_tag::type + , typename bitand_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitand_2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct bitand_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 & n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::bitand_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/bitor.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/bitor.hpp new file mode 100644 index 0000000000..3b465b332a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/bitor.hpp @@ -0,0 +1,151 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct bitor_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitor_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitor_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitor_tag + : tag< T,na > +{ +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct bitor_2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + + : aux::msvc_eti_base< typename if_< + + is_na + , bitor_2< N1,N2 > + , bitor_< + bitor_2< N1,N2 > + , N3, N4, N5 + > + >::type + + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct bitor_2 + : aux::msvc_eti_base< typename apply_wrap2< + bitor_impl< + typename bitor_tag::type + , typename bitor_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitor_2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct bitor_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 | n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::bitor_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/bitxor.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/bitxor.hpp new file mode 100644 index 0000000000..f7c5d439c8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/bitxor.hpp @@ -0,0 +1,151 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct bitxor_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitxor_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitxor_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitxor_tag + : tag< T,na > +{ +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct bitxor_2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + + : aux::msvc_eti_base< typename if_< + + is_na + , bitxor_2< N1,N2 > + , bitxor_< + bitxor_2< N1,N2 > + , N3, N4, N5 + > + >::type + + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitxor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct bitxor_2 + : aux::msvc_eti_base< typename apply_wrap2< + bitxor_impl< + typename bitxor_tag::type + , typename bitxor_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitxor_2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct bitxor_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 ^ n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::bitxor_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/deque.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/deque.hpp new file mode 100644 index 0000000000..a0445d9dfd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/deque.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/deque.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct deque_chooser; + +} + +namespace aux { + +template<> +struct deque_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef vector0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_deque_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_deque_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct deque_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct deque_impl +{ + typedef aux::deque_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::deque_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct deque + : aux::deque_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::deque_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/divides.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/divides.hpp new file mode 100644 index 0000000000..0c60c4317a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/divides.hpp @@ -0,0 +1,150 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct divides_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct divides_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct divides_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct divides_tag + : tag< T,na > +{ +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct divides2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + + : aux::msvc_eti_base< typename if_< + + is_na + , divides2< N1,N2 > + , divides< + divides2< N1,N2 > + , N3, N4, N5 + > + >::type + + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , divides + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct divides2 + : aux::msvc_eti_base< typename apply_wrap2< + divides_impl< + typename divides_tag::type + , typename divides_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, divides2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct divides_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 / n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::divides_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/equal_to.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/equal_to.hpp new file mode 100644 index 0000000000..107912b17f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/equal_to.hpp @@ -0,0 +1,102 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct equal_to_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct equal_to_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct equal_to_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct equal_to_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + : aux::msvc_eti_base< typename apply_wrap2< + equal_to_impl< + typename equal_to_tag::type + , typename equal_to_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/fold_impl.hpp new file mode 100644 index 0000000000..58066d81f6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/fold_impl.hpp @@ -0,0 +1,245 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl; + +template< int N > +struct fold_chunk; + +template<> struct fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; + }; +}; + +template<> struct fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; + }; +}; + +template<> struct fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; + }; +}; + +template<> struct fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; + }; +}; + +template< int N > +struct fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_step; + +template< + typename Last + , typename State + > +struct fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , fold_null_step< Last,State > + , fold_step< First,Last,State,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_step +{ + typedef fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2::type>::type + , ForwardOp + > chunk_; + + typedef typename chunk_::state state; + typedef typename chunk_::iterator iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl + : fold_chunk + ::template result_< First,Last,State,ForwardOp > +{ +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp new file mode 100644 index 0000000000..bf818731eb --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp @@ -0,0 +1,554 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +} // namespace aux + +template< + typename T + , typename Tag + + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg, Tag > +{ + typedef true_ is_le; + typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 + typedef mpl::protect type; +}; + +template< + typename F + , typename Tag + > +struct lambda< + bind0 + , Tag + + > +{ + typedef false_ is_le; + typedef bind0< + F + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1 +{ + typedef F< + typename L1::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1< true_,Tag,F,L1 > +{ + typedef bind1< + quote1< F,Tag > + , typename L1::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1 > class F + , typename T1 + , typename Tag + > +struct lambda< + F + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1 + , typename Tag + > +struct lambda< + bind1< F,T1 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind1< + F + , T1 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2 +{ + typedef F< + typename L1::type, typename L2::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2< true_,Tag,F,L1,L2 > +{ + typedef bind2< + quote2< F,Tag > + , typename L1::result_, typename L2::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + , typename Tag + > +struct lambda< + F< T1,T2 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2 + , typename Tag + > +struct lambda< + bind2< F,T1,T2 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind2< + F + , T1, T2 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3< true_,Tag,F,L1,L2,L3 > +{ + typedef bind3< + quote3< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + F< T1,T2,T3 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind3< + F + , T1, T2, T3 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > +{ + typedef bind4< + quote4< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind4< + F + , T1, T2, T3, T4 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type, typename L5::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > +{ + typedef bind5< + quote5< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind5< + F + , T1, T2, T3, T4, T5 + > result_; + + typedef result_ type; +}; + +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< mpl::protect, Tag > +{ + typedef false_ is_le; + typedef mpl::protect result_; + typedef result_ type; +}; + +/// specializations for the main 'bind' form + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; +}; + +/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars + +template< + typename F, typename Tag1, typename Tag2 + > +struct lambda< + lambda< F,Tag1 > + , Tag2 + > +{ + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef aux::le_result2 le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +BOOST_MPL_AUX_NA_SPEC(2, lambda) + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/greater.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/greater.hpp new file mode 100644 index 0000000000..f60a86064a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/greater.hpp @@ -0,0 +1,102 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct greater_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct greater_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct greater_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + : aux::msvc_eti_base< typename apply_wrap2< + greater_impl< + typename greater_tag::type + , typename greater_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/greater_equal.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/greater_equal.hpp new file mode 100644 index 0000000000..2ab09fd562 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/greater_equal.hpp @@ -0,0 +1,102 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct greater_equal_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct greater_equal_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct greater_equal_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_equal_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + : aux::msvc_eti_base< typename apply_wrap2< + greater_equal_impl< + typename greater_equal_tag::type + , typename greater_equal_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/inherit.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/inherit.hpp new file mode 100644 index 0000000000..233a1ec30c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/inherit.hpp @@ -0,0 +1,166 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C1, bool C2 > +struct inherit2_impl +{ + template< typename Derived, typename T1, typename T2 > struct result_ + : T1, T2 + { + typedef Derived type_; + }; +}; + +template<> +struct inherit2_impl< false,true > +{ + template< typename Derived, typename T1, typename T2 > struct result_ + : T1 + { + typedef T1 type_; + }; +}; + +template<> +struct inherit2_impl< true,false > +{ + template< typename Derived, typename T1, typename T2 > struct result_ + : T2 + { + typedef T2 type_; + }; +}; + +template<> +struct inherit2_impl< true,true > +{ + template< typename Derived, typename T1, typename T2 > struct result_ + { + typedef T1 type_; + }; +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : aux::inherit2_impl< + is_empty_base::value + , is_empty_base::value + >::template result_< inherit2< T1,T2 >,T1, T2 > +{ + typedef typename inherit2::type_ type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/iter_fold_if_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/iter_fold_if_impl.hpp new file mode 100644 index 0000000000..695179584d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/iter_fold_if_impl.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< typename Iterator, typename State > +struct iter_fold_if_null_step +{ + typedef State state; + typedef Iterator iterator; +}; + +template< bool > +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef typename apply2< StateOp,State,Iterator >::type state; + typedef typename IteratorOp::type iterator; + }; +}; + +template<> +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef State state; + typedef Iterator iterator; + }; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename Predicate + > +struct iter_fold_if_forward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename BackwardOp + , typename Predicate + > +struct iter_fold_if_backward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,BackwardOp, identity > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename ForwardPredicate + , typename BackwardOp + , typename BackwardPredicate + > +struct iter_fold_if_impl +{ + private: + typedef iter_fold_if_null_step< Iterator,State > forward_step0; + typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; + typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; + typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; + typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; + + + typedef typename if_< + typename forward_step4::not_last + , iter_fold_if_impl< + typename forward_step4::iterator + , typename forward_step4::state + , ForwardOp + , ForwardPredicate + , BackwardOp + , BackwardPredicate + > + , iter_fold_if_null_step< + typename forward_step4::iterator + , typename forward_step4::state + > + >::type backward_step4; + + typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; + typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; + typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; + typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; + + + public: + typedef typename backward_step0::state state; + typedef typename backward_step4::iterator iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/iter_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/iter_fold_impl.hpp new file mode 100644 index 0000000000..50ea754f2e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/iter_fold_impl.hpp @@ -0,0 +1,245 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl; + +template< int N > +struct iter_fold_chunk; + +template<> struct iter_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct iter_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; + }; +}; + +template<> struct iter_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; + }; +}; + +template<> struct iter_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; + }; +}; + +template<> struct iter_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; + }; +}; + +template< int N > +struct iter_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef iter_fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_step; + +template< + typename Last + , typename State + > +struct iter_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct iter_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , iter_fold_null_step< Last,State > + , iter_fold_step< First,Last,State,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_step +{ + typedef iter_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > chunk_; + + typedef typename chunk_::state state; + typedef typename chunk_::iterator iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl + : iter_fold_chunk + ::template result_< First,Last,State,ForwardOp > +{ +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/lambda_no_ctps.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/lambda_no_ctps.hpp new file mode 100644 index 0000000000..890a198a46 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/lambda_no_ctps.hpp @@ -0,0 +1,229 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ + { + typedef T type; + typedef is_placeholder is_le; + }; +}; + +template<> struct lambda_impl< int_<1> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + + typedef bind1< + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<2> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; + + typedef bind2< + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<3> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; + + typedef bind3< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<4> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; + + typedef bind4< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<5> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; + + typedef bind5< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Protect + > +struct lambda +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity::type arity_; + typedef typename aux::lambda_impl + ::template result_< T,Tag,Protect > l_; + + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; + +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/less.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/less.hpp new file mode 100644 index 0000000000..72338def7e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/less.hpp @@ -0,0 +1,102 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct less_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct less_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct less_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + : aux::msvc_eti_base< typename apply_wrap2< + less_impl< + typename less_tag::type + , typename less_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > + BOOST_MPL_AUX_VALUE_WKND(N1)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/less_equal.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/less_equal.hpp new file mode 100644 index 0000000000..b588697559 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/less_equal.hpp @@ -0,0 +1,102 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct less_equal_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct less_equal_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct less_equal_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_equal_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + : aux::msvc_eti_base< typename apply_wrap2< + less_equal_impl< + typename less_equal_tag::type + , typename less_equal_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/list.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/list.hpp new file mode 100644 index 0000000000..e5ea456c9e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/list.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct list_chooser; + +} + +namespace aux { + +template<> +struct list_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef list0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_list_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_list_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct list_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list_impl +{ + typedef aux::list_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::list_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct list + : aux::list_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::list_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/list_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/list_c.hpp new file mode 100644 index 0000000000..ab25482f55 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/list_c.hpp @@ -0,0 +1,534 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct list_c_chooser; + +} + +namespace aux { + +template<> +struct list_c_chooser<0> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list0_c< + T + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<1> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list1_c< + T, C0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<2> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list2_c< + T, C0, C1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<3> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list3_c< + T, C0, C1, C2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<4> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list4_c< + T, C0, C1, C2, C3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<5> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list5_c< + T, C0, C1, C2, C3, C4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<6> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list6_c< + T, C0, C1, C2, C3, C4, C5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<7> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list7_c< + T, C0, C1, C2, C3, C4, C5, C6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<8> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list8_c< + T, C0, C1, C2, C3, C4, C5, C6, C7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<9> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list9_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<10> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list10_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<11> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list11_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<12> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list12_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<13> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list13_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<14> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<15> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<16> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<17> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<18> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<19> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<20> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< long C > +struct is_list_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_list_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 + , long C9, long C10, long C11, long C12, long C13, long C14, long C15 + , long C16, long C17, long C18, long C19, long C20 + > +struct list_c_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + ); + +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c_impl +{ + typedef aux::list_c_count_args< + C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + > arg_num_; + + typedef typename aux::list_c_chooser< arg_num_::value > + ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +} // namespace aux + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct list_c + : aux::list_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type +{ + typedef typename aux::list_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/map.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/map.hpp new file mode 100644 index 0000000000..970e0b7602 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/map.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct map_chooser; + +} + +namespace aux { + +template<> +struct map_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef map0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_map_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_map_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct map_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map_impl +{ + typedef aux::map_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::map_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map + : aux::map_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::map_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/minus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/minus.hpp new file mode 100644 index 0000000000..3237fa6847 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/minus.hpp @@ -0,0 +1,150 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct minus_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct minus_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct minus_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct minus_tag + : tag< T,na > +{ +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct minus2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + + : aux::msvc_eti_base< typename if_< + + is_na + , minus2< N1,N2 > + , minus< + minus2< N1,N2 > + , N3, N4, N5 + > + >::type + + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , minus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct minus2 + : aux::msvc_eti_base< typename apply_wrap2< + minus_impl< + typename minus_tag::type + , typename minus_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, minus2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct minus_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 - n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::minus_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/modulus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/modulus.hpp new file mode 100644 index 0000000000..9c672c0f19 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/modulus.hpp @@ -0,0 +1,115 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct modulus_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct modulus_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct modulus_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct modulus_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + : aux::msvc_eti_base< typename apply_wrap2< + modulus_impl< + typename modulus_tag::type + , typename modulus_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct modulus_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 % n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::modulus_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/not_equal_to.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/not_equal_to.hpp new file mode 100644 index 0000000000..1e48e7f7af --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/not_equal_to.hpp @@ -0,0 +1,102 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct not_equal_to_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct not_equal_to_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct not_equal_to_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct not_equal_to_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + : aux::msvc_eti_base< typename apply_wrap2< + not_equal_to_impl< + typename not_equal_to_tag::type + , typename not_equal_to_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/or.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/or.hpp new file mode 100644 index 0000000000..8d0ba0a47a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/or.hpp @@ -0,0 +1,71 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/or.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< bool C_ > struct or_impl +{ + template< + typename T1, typename T2, typename T3, typename T4 + > + struct result_ + : true_ + { + }; +}; + +template<> struct or_impl +{ + template< + typename T1, typename T2, typename T3, typename T4 + > + struct result_ + : or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + >::template result_< T2,T3,T4,false_ > + { + }; + + template<> struct result_< false_,false_,false_,false_ > + : false_ + { + }; +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = false_, typename T4 = false_, typename T5 = false_ + > +struct or_ + + : aux::or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + >::template result_< T2,T3,T4,T5 > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , or_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , or_ + ) + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/placeholders.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/placeholders.hpp new file mode 100644 index 0000000000..ff97364b9b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/placeholders.hpp @@ -0,0 +1,105 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg< -1 > _; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +} + +}} + +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<1> _1; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<2> _2; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<3> _3; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<4> _4; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<5> _5; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<6> _6; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +} + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/plus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/plus.hpp new file mode 100644 index 0000000000..c8f3355e75 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/plus.hpp @@ -0,0 +1,150 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct plus_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct plus_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct plus_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct plus_tag + : tag< T,na > +{ +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct plus2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + + : aux::msvc_eti_base< typename if_< + + is_na + , plus2< N1,N2 > + , plus< + plus2< N1,N2 > + , N3, N4, N5 + > + >::type + + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , plus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct plus2 + : aux::msvc_eti_base< typename apply_wrap2< + plus_impl< + typename plus_tag::type + , typename plus_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, plus2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct plus_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 + n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::plus_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/quote.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/quote.hpp new file mode 100644 index 0000000000..b85880ffdd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/quote.hpp @@ -0,0 +1,116 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/quote.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { +template< bool > struct quote_impl +{ + template< typename T > struct result_ + : T + { + }; +}; + +template<> struct quote_impl +{ + template< typename T > struct result_ + { + typedef T type; + }; +}; + +template< + template< typename P1 > class F + , typename Tag = void_ + > +struct quote1 +{ + template< typename U1 > struct apply + + : quote_impl< aux::has_type< F >::value > + ::template result_< F > + + { + }; +}; + +template< + template< typename P1, typename P2 > class F + , typename Tag = void_ + > +struct quote2 +{ + template< typename U1, typename U2 > struct apply + + : quote_impl< aux::has_type< F< U1,U2 > >::value > + ::template result_< F< U1,U2 > > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3 > class F + , typename Tag = void_ + > +struct quote3 +{ + template< typename U1, typename U2, typename U3 > struct apply + + : quote_impl< aux::has_type< F< U1,U2,U3 > >::value > + ::template result_< F< U1,U2,U3 > > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename Tag = void_ + > +struct quote4 +{ + template< + typename U1, typename U2, typename U3, typename U4 + > + struct apply + + : quote_impl< aux::has_type< F< U1,U2,U3,U4 > >::value > + ::template result_< F< U1,U2,U3,U4 > > + + { + }; +}; + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename Tag = void_ + > +struct quote5 +{ + template< + typename U1, typename U2, typename U3, typename U4 + , typename U5 + > + struct apply + + : quote_impl< aux::has_type< F< U1,U2,U3,U4,U5 > >::value > + ::template result_< F< U1,U2,U3,U4,U5 > > + + { + }; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/reverse_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/reverse_fold_impl.hpp new file mode 100644 index 0000000000..7a07414adf --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/reverse_fold_impl.hpp @@ -0,0 +1,295 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< long N > +struct reverse_fold_chunk; + +template<> struct reverse_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct reverse_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; +}; + +template<> struct reverse_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; +}; + +template<> struct reverse_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; +}; + +template<> struct reverse_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; +}; + +template< long N > +struct reverse_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step; + +template< + typename Last + , typename State + > +struct reverse_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_fold_null_step< Last,State > + , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step +{ + typedef reverse_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename deref::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl + : reverse_fold_chunk + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/reverse_iter_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/reverse_iter_fold_impl.hpp new file mode 100644 index 0000000000..39a4057b77 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/reverse_iter_fold_impl.hpp @@ -0,0 +1,295 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl; + +template< long N > +struct reverse_iter_fold_chunk; + +template<> struct reverse_iter_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; +}; + +template< long N > +struct reverse_iter_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_step; + +template< + typename Last + , typename State + > +struct reverse_iter_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_iter_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_iter_fold_null_step< Last,State > + , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_step +{ + typedef reverse_iter_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl + : reverse_iter_fold_chunk + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/set.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/set.hpp new file mode 100644 index 0000000000..95aaa5cbdf --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/set.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct set_chooser; + +} + +namespace aux { + +template<> +struct set_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef set0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_set_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_set_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct set_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set_impl +{ + typedef aux::set_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::set_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set + : aux::set_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::set_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/set_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/set_c.hpp new file mode 100644 index 0000000000..1ff34f9032 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/set_c.hpp @@ -0,0 +1,534 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct set_c_chooser; + +} + +namespace aux { + +template<> +struct set_c_chooser<0> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set0_c< + T + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<1> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set1_c< + T, C0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<2> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set2_c< + T, C0, C1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<3> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set3_c< + T, C0, C1, C2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<4> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set4_c< + T, C0, C1, C2, C3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<5> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set5_c< + T, C0, C1, C2, C3, C4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<6> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set6_c< + T, C0, C1, C2, C3, C4, C5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<7> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set7_c< + T, C0, C1, C2, C3, C4, C5, C6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<8> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set8_c< + T, C0, C1, C2, C3, C4, C5, C6, C7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<9> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set9_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<10> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set10_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<11> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set11_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<12> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set12_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<13> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set13_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<14> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<15> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<16> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<17> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<18> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<19> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<20> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< long C > +struct is_set_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_set_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 + , long C9, long C10, long C11, long C12, long C13, long C14, long C15 + , long C16, long C17, long C18, long C19, long C20 + > +struct set_c_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + ); + +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct set_c_impl +{ + typedef aux::set_c_count_args< + C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + > arg_num_; + + typedef typename aux::set_c_chooser< arg_num_::value > + ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +} // namespace aux + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct set_c + : aux::set_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type +{ + typedef typename aux::set_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/shift_left.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/shift_left.hpp new file mode 100644 index 0000000000..176fc00007 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/shift_left.hpp @@ -0,0 +1,114 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct shift_left_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct shift_left_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct shift_left_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_left_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + : aux::msvc_eti_base< typename apply_wrap2< + shift_left_impl< + typename shift_left_tag::type + , typename shift_left_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, typename Shift, T n, Shift s > +struct shift_left_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n << s)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + : aux::shift_left_wknd< + typename N::value_type + , typename S::value_type + , N::value + , S::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/shift_right.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/shift_right.hpp new file mode 100644 index 0000000000..6b6e01ff36 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/shift_right.hpp @@ -0,0 +1,114 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct shift_right_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct shift_right_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct shift_right_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_right_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + : aux::msvc_eti_base< typename apply_wrap2< + shift_right_impl< + typename shift_right_tag::type + , typename shift_right_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, typename Shift, T n, Shift s > +struct shift_right_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n >> s)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + : aux::shift_right_wknd< + typename N::value_type + , typename S::value_type + , N::value + , S::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/template_arity.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/template_arity.hpp new file mode 100644 index 0000000000..1668771349 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/template_arity.hpp @@ -0,0 +1,46 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< bool > +struct template_arity_impl +{ + template< typename F > struct result_ + : mpl::int_< -1 > + { + }; +}; + +template<> +struct template_arity_impl +{ + template< typename F > struct result_ + : F::arity + { + }; +}; + +template< typename F > +struct template_arity + : template_arity_impl< ::boost::mpl::aux::has_rebind::value > + ::template result_ +{ +}; + +template<> +struct template_arity + : mpl::int_< -1 > +{ +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/times.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/times.hpp new file mode 100644 index 0000000000..a6ae333cca --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/times.hpp @@ -0,0 +1,150 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct times_impl + : if_c< + ( tag1_ > tag2_ ) + , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct times_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct times_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct times_tag + : tag< T,na > +{ +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct times2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + + : aux::msvc_eti_base< typename if_< + + is_na + , times2< N1,N2 > + , times< + times2< N1,N2 > + , N3, N4, N5 + > + >::type + + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , times + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct times2 + : aux::msvc_eti_base< typename apply_wrap2< + times_impl< + typename times_tag::type + , typename times_tag::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, times2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct times_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 * n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::times_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/unpack_args.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/unpack_args.hpp new file mode 100644 index 0000000000..26533dd423 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/unpack_args.hpp @@ -0,0 +1,109 @@ + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< BOOST_MPL_AUX_NTTP_DECL(int, size) > struct unpack_args_impl +{ + template< typename F, typename Args > struct apply; +}; + +template<> struct unpack_args_impl<0> +{ + template< typename F, typename Args > struct apply + : apply0< + F + > + { + }; +}; + +template<> struct unpack_args_impl<1> +{ + template< typename F, typename Args > struct apply + : apply1< + F + , typename at_c< Args,0 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<2> +{ + template< typename F, typename Args > struct apply + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<3> +{ + template< typename F, typename Args > struct apply + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<4> +{ + template< typename F, typename Args > struct apply + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<5> +{ + template< typename F, typename Args > struct apply + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > + { + }; +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + + : aux::unpack_args_impl< size::value > + ::template apply< F,Args > + + { + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/vector.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/vector.hpp new file mode 100644 index 0000000000..a6c7b6219a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/vector.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct vector_chooser; + +} + +namespace aux { + +template<> +struct vector_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef vector0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_vector_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_vector_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct vector_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector_impl +{ + typedef aux::vector_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::vector_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct vector + : aux::vector_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::vector_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/vector_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/vector_c.hpp new file mode 100644 index 0000000000..c522d0826f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/msvc70/vector_c.hpp @@ -0,0 +1,534 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct vector_c_chooser; + +} + +namespace aux { + +template<> +struct vector_c_chooser<0> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector0_c< + T + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<1> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector1_c< + T, T(C0) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<2> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector2_c< + T, T(C0), T(C1) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<3> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector3_c< + T, T(C0), T(C1), T(C2) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<4> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector4_c< + T, T(C0), T(C1), T(C2), T(C3) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<5> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector5_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<6> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector6_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<7> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector7_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<8> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector8_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<9> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector9_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<10> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector10_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<11> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector11_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<12> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector12_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<13> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector13_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<14> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector14_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<15> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector15_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<16> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector16_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<17> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector17_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<18> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector18_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<19> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector19_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<20> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector20_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< long C > +struct is_vector_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_vector_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 + , long C9, long C10, long C11, long C12, long C13, long C14, long C15 + , long C16, long C17, long C18, long C19, long C20 + > +struct vector_c_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + ); + +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c_impl +{ + typedef aux::vector_c_count_args< + C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + > arg_num_; + + typedef typename aux::vector_c_chooser< arg_num_::value > + ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +} // namespace aux + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct vector_c + : aux::vector_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type +{ + typedef typename aux::vector_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/advance_backward.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/advance_backward.hpp new file mode 100644 index 0000000000..26de94cea1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/advance_backward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_backward; +template<> +struct advance_backward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_backward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_backward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_backward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_backward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef typename prior::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_backward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/advance_forward.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/advance_forward.hpp new file mode 100644 index 0000000000..b137cc72af --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/advance_forward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_forward; +template<> +struct advance_forward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_forward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_forward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_forward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_forward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef typename next::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_forward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/and.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/and.hpp new file mode 100644 index 0000000000..010ad1fc84 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/and.hpp @@ -0,0 +1,69 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/and.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct and_impl + : false_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct and_impl< true,T1,T2,T3,T4 > + : and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , true_ + > +{ +}; + +template<> +struct and_impl< + true + , true_, true_, true_, true_ + > + : true_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = true_, typename T4 = true_, typename T5 = true_ + > +struct and_ + + : aux::and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , and_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , and_ + ) + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/apply.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/apply.hpp new file mode 100644 index 0000000000..e08eaccf03 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/apply.hpp @@ -0,0 +1,169 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0 + + : apply_wrap0< + typename lambda::type + + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) +}; + +template< + typename F + > +struct apply< F,na,na,na,na,na > + : apply0 +{ +}; + +template< + typename F, typename T1 + > +struct apply1 + + : apply_wrap1< + typename lambda::type + , T1 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) +}; + +template< + typename F, typename T1 + > +struct apply< F,T1,na,na,na,na > + : apply1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct apply2 + + : apply_wrap2< + typename lambda::type + , T1, T2 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) +}; + +template< + typename F, typename T1, typename T2 + > +struct apply< F,T1,T2,na,na,na > + : apply2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3 + + : apply_wrap3< + typename lambda::type + , T1, T2, T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply< F,T1,T2,T3,na,na > + : apply3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4 + + : apply_wrap4< + typename lambda::type + , T1, T2, T3, T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply< F,T1,T2,T3,T4,na > + : apply4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5 + + : apply_wrap5< + typename lambda::type + , T1, T2, T3, T4, T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) +}; + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply + : apply5< F,T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/apply_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/apply_fwd.hpp new file mode 100644 index 0000000000..b2ed5d5130 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/apply_fwd.hpp @@ -0,0 +1,52 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply; + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/apply_wrap.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/apply_wrap.hpp new file mode 100644 index 0000000000..2ffe7091bc --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/apply_wrap.hpp @@ -0,0 +1,456 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + int N, typename F + > +struct apply_wrap_impl0; + +template< + typename F + > +struct apply_wrap_impl0< + 0 + , F + + > +{ + typedef typename F::template apply< + +/// since the defaults are "lost", we have to pass *something* even for nullary +/// metafunction classes + na + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 1 + , F + + > +{ + typedef typename F::template apply< + + na + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 2 + , F + + > +{ + typedef typename F::template apply< + + na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 3 + , F + + > +{ + typedef typename F::template apply< + + na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 4 + , F + + > +{ + typedef typename F::template apply< + + na, na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 5 + , F + + > +{ + typedef typename F::template apply< + + na, na, na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap0 + : apply_wrap_impl0< + ::boost::mpl::aux::arity< F,0 >::value + , F + + >::type +{ +}; + +template< + int N, typename F, typename T1 + > +struct apply_wrap_impl1; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 1 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 2 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 3 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 4 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 5 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na, na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap1 + : apply_wrap_impl1< + ::boost::mpl::aux::arity< F,1 >::value + , F + , T1 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2 + > +struct apply_wrap_impl2; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 2 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 3 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 4 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na, na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 5 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na, na, na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap2 + : apply_wrap_impl2< + ::boost::mpl::aux::arity< F,2 >::value + , F + , T1, T2 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 3 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 4 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 5 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + , na, na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap3 + : apply_wrap_impl3< + ::boost::mpl::aux::arity< F,3 >::value + , F + , T1, T2, T3 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4< + 4 + , F + , T1, T2, T3, T4 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4< + 5 + , F + , T1, T2, T3, T4 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap4 + : apply_wrap_impl4< + ::boost::mpl::aux::arity< F,4 >::value + , F + , T1, T2, T3, T4 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap_impl5; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap_impl5< + 5 + , F + , T1, T2, T3, T4, T5 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4, T5 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap5 + : apply_wrap_impl5< + ::boost::mpl::aux::arity< F,5 >::value + , F + , T1, T2, T3, T4, T5 + >::type +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/arg.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/arg.hpp new file mode 100644 index 0000000000..6f2f8a8070 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/arg.hpp @@ -0,0 +1,123 @@ + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > +{ + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<1> +{ + BOOST_STATIC_CONSTANT(int, value = 1); + typedef arg<2> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<2> +{ + BOOST_STATIC_CONSTANT(int, value = 2); + typedef arg<3> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U2 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<3> +{ + BOOST_STATIC_CONSTANT(int, value = 3); + typedef arg<4> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U3 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<4> +{ + BOOST_STATIC_CONSTANT(int, value = 4); + typedef arg<5> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U4 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<5> +{ + BOOST_STATIC_CONSTANT(int, value = 5); + typedef arg<6> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U5 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/basic_bind.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/basic_bind.hpp new file mode 100644 index 0000000000..b0702324aa --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/basic_bind.hpp @@ -0,0 +1,440 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > +{ + typedef bind< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F + > +struct bind< F,na,na,na,na,na > + : bind0 +{ +}; + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1 + > +struct bind< F,T1,na,na,na,na > + : bind1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2 + > +struct bind< F,T1,T2,na,na,na > + : bind2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind< F,T1,T2,T3,na,na > + : bind3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind< F,T1,T2,T3,T4,na > + : bind4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; + + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind + : bind5< F,T1,T2,T3,T4,T5 > +{ +}; + +/// if_/eval_if specializations +template< template< typename T1, typename T2, typename T3 > class F, typename Tag > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct if_; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< if_,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef typename if_< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +template< + template< typename T1, typename T2, typename T3 > class F, typename Tag + > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct eval_if; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< eval_if,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef typename eval_if< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/bind.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/bind.hpp new file mode 100644 index 0000000000..0e9513a649 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/bind.hpp @@ -0,0 +1,561 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + typename T + , typename Arg + > +struct replace_unnamed_arg +{ + typedef Arg next; + typedef T type; +}; + +template< + typename Arg + > +struct replace_unnamed_arg< arg< -1 >, Arg > +{ + typedef typename Arg::next next; + typedef Arg type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > +{ + typedef bind< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F + > +struct bind< F,na,na,na,na,na > + : bind0 +{ +}; + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1 + > +struct bind< F,T1,na,na,na,na > + : bind1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2 + > +struct bind< F,T1,T2,na,na,na > + : bind2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind< F,T1,T2,T3,na,na > + : bind3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind< F,T1,T2,T3,T4,na > + : bind4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + typedef aux::replace_unnamed_arg< T5,n5 > r5; + typedef typename r5::type a5; + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind + : bind5< F,T1,T2,T3,T4,T5 > +{ +}; + +/// if_/eval_if specializations +template< template< typename T1, typename T2, typename T3 > class F, typename Tag > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct if_; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< if_,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef typename if_< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +template< + template< typename T1, typename T2, typename T3 > class F, typename Tag + > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct eval_if; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< eval_if,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef typename eval_if< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/bind_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/bind_fwd.hpp new file mode 100644 index 0000000000..c4a5060ff8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/bind_fwd.hpp @@ -0,0 +1,52 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct bind; + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/bitand.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/bitand.hpp new file mode 100644 index 0000000000..0bbf54ea26 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/bitand.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitand_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitand_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitand_< N1,N2,N3,N4,na > + + : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitand_< N1,N2,N3,na,na > + + : bitand_< bitand_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitand_< N1,N2,na,na,na > + : bitand_impl< + typename bitand_tag::type + , typename bitand_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + & BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/bitor.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/bitor.hpp new file mode 100644 index 0000000000..55b31cb8a9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/bitor.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitor_< N1,N2,N3,N4,na > + + : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitor_< N1,N2,N3,na,na > + + : bitor_< bitor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitor_< N1,N2,na,na,na > + : bitor_impl< + typename bitor_tag::type + , typename bitor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + | BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/bitxor.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/bitxor.hpp new file mode 100644 index 0000000000..ec1939151d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/bitxor.hpp @@ -0,0 +1,147 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitxor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitxor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitxor_< N1,N2,N3,N4,na > + + : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitxor_< N1,N2,N3,na,na > + + : bitxor_< bitxor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitxor_< N1,N2,na,na,na > + : bitxor_impl< + typename bitxor_tag::type + , typename bitxor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/deque.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/deque.hpp new file mode 100644 index 0000000000..de67398a37 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/deque.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/deque.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct deque; + +template< + + > +struct deque< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct deque< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct deque< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct deque< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct deque< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct deque< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct deque< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct deque + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/divides.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/divides.hpp new file mode 100644 index 0000000000..86f16826f7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/divides.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct divides_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , divides + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct divides< N1,N2,N3,N4,na > + + : divides< divides< divides< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct divides< N1,N2,N3,na,na > + + : divides< divides< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct divides< N1,N2,na,na,na > + : divides_impl< + typename divides_tag::type + , typename divides_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + / BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/equal_to.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/equal_to.hpp new file mode 100644 index 0000000000..62c994589f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/equal_to.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + + : equal_to_impl< + typename equal_to_tag::type + , typename equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/fold_impl.hpp new file mode 100644 index 0000000000..9e7a29300d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl +{ + typedef fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,First,Last,State,ForwardOp > + : fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp new file mode 100644 index 0000000000..bf818731eb --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp @@ -0,0 +1,554 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +} // namespace aux + +template< + typename T + , typename Tag + + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg, Tag > +{ + typedef true_ is_le; + typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 + typedef mpl::protect type; +}; + +template< + typename F + , typename Tag + > +struct lambda< + bind0 + , Tag + + > +{ + typedef false_ is_le; + typedef bind0< + F + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1 +{ + typedef F< + typename L1::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1< true_,Tag,F,L1 > +{ + typedef bind1< + quote1< F,Tag > + , typename L1::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1 > class F + , typename T1 + , typename Tag + > +struct lambda< + F + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1 + , typename Tag + > +struct lambda< + bind1< F,T1 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind1< + F + , T1 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2 +{ + typedef F< + typename L1::type, typename L2::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2< true_,Tag,F,L1,L2 > +{ + typedef bind2< + quote2< F,Tag > + , typename L1::result_, typename L2::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + , typename Tag + > +struct lambda< + F< T1,T2 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2 + , typename Tag + > +struct lambda< + bind2< F,T1,T2 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind2< + F + , T1, T2 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3< true_,Tag,F,L1,L2,L3 > +{ + typedef bind3< + quote3< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + F< T1,T2,T3 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind3< + F + , T1, T2, T3 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > +{ + typedef bind4< + quote4< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind4< + F + , T1, T2, T3, T4 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type, typename L5::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > +{ + typedef bind5< + quote5< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind5< + F + , T1, T2, T3, T4, T5 + > result_; + + typedef result_ type; +}; + +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< mpl::protect, Tag > +{ + typedef false_ is_le; + typedef mpl::protect result_; + typedef result_ type; +}; + +/// specializations for the main 'bind' form + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; +}; + +/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars + +template< + typename F, typename Tag1, typename Tag2 + > +struct lambda< + lambda< F,Tag1 > + , Tag2 + > +{ + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef aux::le_result2 le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +BOOST_MPL_AUX_NA_SPEC(2, lambda) + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/greater.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/greater.hpp new file mode 100644 index 0000000000..14d8e08bff --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/greater.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + + : greater_impl< + typename greater_tag::type + , typename greater_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/greater_equal.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/greater_equal.hpp new file mode 100644 index 0000000000..2603f9184a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/greater_equal.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + + : greater_equal_impl< + typename greater_equal_tag::type + , typename greater_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/inherit.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/inherit.hpp new file mode 100644 index 0000000000..00f31c4226 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/inherit.hpp @@ -0,0 +1,141 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : T1, T2 +{ + typedef inherit2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +template< typename T1 > +struct inherit2< T1,empty_base > +{ + typedef T1 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) +}; + +template< typename T2 > +struct inherit2< empty_base,T2 > +{ + typedef T2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) +}; + +template<> +struct inherit2< empty_base,empty_base > +{ + typedef empty_base type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/iter_fold_if_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/iter_fold_if_impl.hpp new file mode 100644 index 0000000000..695179584d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/iter_fold_if_impl.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< typename Iterator, typename State > +struct iter_fold_if_null_step +{ + typedef State state; + typedef Iterator iterator; +}; + +template< bool > +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef typename apply2< StateOp,State,Iterator >::type state; + typedef typename IteratorOp::type iterator; + }; +}; + +template<> +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef State state; + typedef Iterator iterator; + }; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename Predicate + > +struct iter_fold_if_forward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename BackwardOp + , typename Predicate + > +struct iter_fold_if_backward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,BackwardOp, identity > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename ForwardPredicate + , typename BackwardOp + , typename BackwardPredicate + > +struct iter_fold_if_impl +{ + private: + typedef iter_fold_if_null_step< Iterator,State > forward_step0; + typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; + typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; + typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; + typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; + + + typedef typename if_< + typename forward_step4::not_last + , iter_fold_if_impl< + typename forward_step4::iterator + , typename forward_step4::state + , ForwardOp + , ForwardPredicate + , BackwardOp + , BackwardPredicate + > + , iter_fold_if_null_step< + typename forward_step4::iterator + , typename forward_step4::state + > + >::type backward_step4; + + typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; + typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; + typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; + typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; + + + public: + typedef typename backward_step0::state state; + typedef typename backward_step4::iterator iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/iter_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/iter_fold_impl.hpp new file mode 100644 index 0000000000..805790e86d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/iter_fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl +{ + typedef iter_fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,First,Last,State,ForwardOp > + : iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp new file mode 100644 index 0000000000..890a198a46 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp @@ -0,0 +1,229 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ + { + typedef T type; + typedef is_placeholder is_le; + }; +}; + +template<> struct lambda_impl< int_<1> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + + typedef bind1< + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<2> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; + + typedef bind2< + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<3> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; + + typedef bind3< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<4> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; + + typedef bind4< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<5> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; + + typedef bind5< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Protect + > +struct lambda +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity::type arity_; + typedef typename aux::lambda_impl + ::template result_< T,Tag,Protect > l_; + + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; + +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/less.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/less.hpp new file mode 100644 index 0000000000..4fe3cd17c4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/less.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + + : less_impl< + typename less_tag::type + , typename less_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/less_equal.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/less_equal.hpp new file mode 100644 index 0000000000..ca2894f6f9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/less_equal.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + + : less_equal_impl< + typename less_equal_tag::type + , typename less_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/list.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/list.hpp new file mode 100644 index 0000000000..4e8ad53d21 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/list.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct list; + +template< + + > +struct list< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list0< > +{ + typedef list0< >::type type; +}; + +template< + typename T0 + > +struct list< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list1 +{ + typedef typename list1::type type; +}; + +template< + typename T0, typename T1 + > +struct list< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list2< T0,T1 > +{ + typedef typename list2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct list< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list3< T0,T1,T2 > +{ + typedef typename list3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct list< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list4< T0,T1,T2,T3 > +{ + typedef typename list4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct list< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list5< T0,T1,T2,T3,T4 > +{ + typedef typename list5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct list< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list + : list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/list_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/list_c.hpp new file mode 100644 index 0000000000..0b48a7f8e1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/list_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct list_c; + +template< + typename T + > +struct list_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list0_c +{ + typedef typename list0_c::type type; +}; + +template< + typename T, long C0 + > +struct list_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list1_c< T,C0 > +{ + typedef typename list1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct list_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list2_c< T,C0,C1 > +{ + typedef typename list2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct list_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list3_c< T,C0,C1,C2 > +{ + typedef typename list3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct list_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list4_c< T,C0,C1,C2,C3 > +{ + typedef typename list4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct list_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c + : list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/map.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/map.hpp new file mode 100644 index 0000000000..837e013771 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/map.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map; + +template< + + > +struct map< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map0< > +{ + typedef map0< >::type type; +}; + +template< + typename T0 + > +struct map< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map1 +{ + typedef typename map1::type type; +}; + +template< + typename T0, typename T1 + > +struct map< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map2< T0,T1 > +{ + typedef typename map2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct map< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map3< T0,T1,T2 > +{ + typedef typename map3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct map< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map4< T0,T1,T2,T3 > +{ + typedef typename map4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct map< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map5< T0,T1,T2,T3,T4 > +{ + typedef typename map5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct map< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map + : map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/minus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/minus.hpp new file mode 100644 index 0000000000..71d4913766 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/minus.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , minus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct minus< N1,N2,N3,N4,na > + + : minus< minus< minus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct minus< N1,N2,N3,na,na > + + : minus< minus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct minus< N1,N2,na,na,na > + : minus_impl< + typename minus_tag::type + , typename minus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + - BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/modulus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/modulus.hpp new file mode 100644 index 0000000000..224b34930c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/modulus.hpp @@ -0,0 +1,101 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct modulus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + + : modulus_impl< + typename modulus_tag::type + , typename modulus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + % BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/not_equal_to.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/not_equal_to.hpp new file mode 100644 index 0000000000..98b21b1e22 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/not_equal_to.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct not_equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + + : not_equal_to_impl< + typename not_equal_to_tag::type + , typename not_equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/or.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/or.hpp new file mode 100644 index 0000000000..31e1aaa4e6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/or.hpp @@ -0,0 +1,69 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/or.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct or_impl + : true_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct or_impl< false,T1,T2,T3,T4 > + : or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , false_ + > +{ +}; + +template<> +struct or_impl< + false + , false_, false_, false_, false_ + > + : false_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = false_, typename T4 = false_, typename T5 = false_ + > +struct or_ + + : aux::or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , or_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , or_ + ) + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/placeholders.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/placeholders.hpp new file mode 100644 index 0000000000..ff97364b9b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/placeholders.hpp @@ -0,0 +1,105 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg< -1 > _; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +} + +}} + +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<1> _1; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<2> _2; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<3> _3; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<4> _4; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<5> _5; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<6> _6; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +} + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/plus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/plus.hpp new file mode 100644 index 0000000000..a9f6ee79a5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/plus.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , plus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct plus< N1,N2,N3,N4,na > + + : plus< plus< plus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct plus< N1,N2,N3,na,na > + + : plus< plus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct plus< N1,N2,na,na,na > + : plus_impl< + typename plus_tag::type + , typename plus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + + BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/quote.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/quote.hpp new file mode 100644 index 0000000000..d7d0420e4d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/quote.hpp @@ -0,0 +1,123 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/quote.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< typename T, bool has_type_ > +struct quote_impl + : T +{ +}; + +template< typename T > +struct quote_impl< T,false > +{ + typedef T type; +}; + +template< + template< typename P1 > class F + , typename Tag = void_ + > +struct quote1 +{ + template< typename U1 > struct apply + + : quote_impl< + F + , aux::has_type< F >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2 > class F + , typename Tag = void_ + > +struct quote2 +{ + template< typename U1, typename U2 > struct apply + + : quote_impl< + F< U1,U2 > + , aux::has_type< F< U1,U2 > >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3 > class F + , typename Tag = void_ + > +struct quote3 +{ + template< typename U1, typename U2, typename U3 > struct apply + + : quote_impl< + F< U1,U2,U3 > + , aux::has_type< F< U1,U2,U3 > >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename Tag = void_ + > +struct quote4 +{ + template< + typename U1, typename U2, typename U3, typename U4 + > + struct apply + + : quote_impl< + F< U1,U2,U3,U4 > + , aux::has_type< F< U1,U2,U3,U4 > >::value + > + + { + }; +}; + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename Tag = void_ + > +struct quote5 +{ + template< + typename U1, typename U2, typename U3, typename U4 + , typename U5 + > + struct apply + + : quote_impl< + F< U1,U2,U3,U4,U5 > + , aux::has_type< F< U1,U2,U3,U4,U5 > >::value + > + + { + }; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/reverse_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/reverse_fold_impl.hpp new file mode 100644 index 0000000000..c468684c91 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/reverse_fold_impl.hpp @@ -0,0 +1,231 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename deref::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/reverse_iter_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/reverse_iter_fold_impl.hpp new file mode 100644 index 0000000000..658f92a7c3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/reverse_iter_fold_impl.hpp @@ -0,0 +1,231 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/set.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/set.hpp new file mode 100644 index 0000000000..5721922e11 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/set.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set; + +template< + + > +struct set< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set0< > +{ + typedef set0< >::type type; +}; + +template< + typename T0 + > +struct set< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set1 +{ + typedef typename set1::type type; +}; + +template< + typename T0, typename T1 + > +struct set< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set2< T0,T1 > +{ + typedef typename set2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct set< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set3< T0,T1,T2 > +{ + typedef typename set3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct set< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set4< T0,T1,T2,T3 > +{ + typedef typename set4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct set< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set5< T0,T1,T2,T3,T4 > +{ + typedef typename set5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct set< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set + : set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/set_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/set_c.hpp new file mode 100644 index 0000000000..cbeb932c13 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/set_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct set_c; + +template< + typename T + > +struct set_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set0_c +{ + typedef typename set0_c::type type; +}; + +template< + typename T, long C0 + > +struct set_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set1_c< T,C0 > +{ + typedef typename set1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct set_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set2_c< T,C0,C1 > +{ + typedef typename set2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct set_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set3_c< T,C0,C1,C2 > +{ + typedef typename set3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct set_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set4_c< T,C0,C1,C2,C3 > +{ + typedef typename set4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct set_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : set17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : set18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : set19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct set_c + : set20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/shift_left.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/shift_left.hpp new file mode 100644 index 0000000000..b5b181ce19 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/shift_left.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_left_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + + : shift_left_impl< + typename shift_left_tag::type + , typename shift_left_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + << BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/shift_right.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/shift_right.hpp new file mode 100644 index 0000000000..f7a342e989 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/shift_right.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_right_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + + : shift_right_impl< + typename shift_right_tag::type + , typename shift_right_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + >> BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/template_arity.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/template_arity.hpp new file mode 100644 index 0000000000..a23fc23846 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/template_arity.hpp @@ -0,0 +1,11 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header +// -- DO NOT modify by hand! + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/times.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/times.hpp new file mode 100644 index 0000000000..cb97cc4e13 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/times.hpp @@ -0,0 +1,146 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + : times< times< times< times< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , times + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct times< N1,N2,N3,N4,na > + + : times< times< times< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct times< N1,N2,N3,na,na > + + : times< times< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct times< N1,N2,na,na,na > + : times_impl< + typename times_tag::type + , typename times_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + * BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/unpack_args.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/unpack_args.hpp new file mode 100644 index 0000000000..2194ce9d11 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/unpack_args.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< int size, typename F, typename Args > +struct unpack_args_impl; + +template< typename F, typename Args > +struct unpack_args_impl< 0,F,Args > + : apply0< + F + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 1,F,Args > + : apply1< + F + , typename at_c< Args,0 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 2,F,Args > + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 3,F,Args > + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 4,F,Args > + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 5,F,Args > + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > +{ +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + + : aux::unpack_args_impl< size::value,F, Args > + + { + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/vector.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/vector.hpp new file mode 100644 index 0000000000..bfa9565a53 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/vector.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct vector; + +template< + + > +struct vector< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct vector< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct vector< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct vector< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct vector< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct vector< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct vector< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/vector_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/vector_c.hpp new file mode 100644 index 0000000000..0f1560d7f1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/mwcw/vector_c.hpp @@ -0,0 +1,309 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct vector_c; + +template< + typename T + > +struct vector_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector0_c +{ + typedef typename vector0_c::type type; +}; + +template< + typename T, long C0 + > +struct vector_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector1_c< T, T(C0) > +{ + typedef typename vector1_c< T, T(C0) >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct vector_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector2_c< T, T(C0), T(C1) > +{ + typedef typename vector2_c< T, T(C0), T(C1) >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct vector_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector3_c< T, T(C0), T(C1), T(C2) > +{ + typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct vector_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > +{ + typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct vector_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > +{ + typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > +{ + typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > +{ + typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > +{ + typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > +{ + typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > +{ + typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > +{ + typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > +{ + typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > +{ + typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > +{ + typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > +{ + typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > +{ + typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > +{ + typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > +{ + typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > +{ + typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c + : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > +{ + typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp new file mode 100644 index 0000000000..26de94cea1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_backward; +template<> +struct advance_backward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_backward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_backward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_backward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_backward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef typename prior::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_backward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp new file mode 100644 index 0000000000..b137cc72af --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_forward; +template<> +struct advance_forward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_forward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_forward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_forward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_forward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef typename next::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_forward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/and.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/and.hpp new file mode 100644 index 0000000000..555c800167 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/and.hpp @@ -0,0 +1,73 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/and.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< bool C_ > struct and_impl +{ + template< + typename T1, typename T2, typename T3, typename T4 + > + struct result_ + : false_ + { + }; +}; + +template<> struct and_impl +{ + template< + typename T1, typename T2, typename T3, typename T4 + > + struct result_ + : and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + >::template result_< T2,T3,T4,true_ > + { + }; +}; + +template<> +struct and_impl + ::result_< true_,true_,true_,true_ > + : true_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = true_, typename T4 = true_, typename T5 = true_ + > +struct and_ + + : aux::and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + >::template result_< T2,T3,T4,T5 > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , and_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , and_ + ) + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp new file mode 100644 index 0000000000..9838e799b5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp @@ -0,0 +1,268 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0 + + : apply_wrap0< + typename lambda::type + + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) +}; + +namespace aux { + +template<> +struct apply_chooser<0> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef apply0< + F + > type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1 + > +struct apply1 + + : apply_wrap1< + typename lambda::type + , T1 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) +}; + +namespace aux { + +template<> +struct apply_chooser<1> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef apply1< + F, T1 + > type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1, typename T2 + > +struct apply2 + + : apply_wrap2< + typename lambda::type + , T1, T2 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) +}; + +namespace aux { + +template<> +struct apply_chooser<2> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef apply2< + F, T1, T2 + > type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3 + + : apply_wrap3< + typename lambda::type + , T1, T2, T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) +}; + +namespace aux { + +template<> +struct apply_chooser<3> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef apply3< + F, T1, T2, T3 + > type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4 + + : apply_wrap4< + typename lambda::type + , T1, T2, T3, T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) +}; + +namespace aux { + +template<> +struct apply_chooser<4> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef apply4< + F, T1, T2, T3, T4 + > type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5 + + : apply_wrap5< + typename lambda::type + , T1, T2, T3, T4, T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) +}; + +namespace aux { + +template<> +struct apply_chooser<5> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef apply5< + F, T1, T2, T3, T4, T5 + > type; + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_apply_arg +{ + static bool const value = true; +}; + +template<> +struct is_apply_arg +{ + static bool const value = false; +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + > +struct apply_count_args +{ + static int const value = is_apply_arg::value + is_apply_arg::value + is_apply_arg::value + is_apply_arg::value + is_apply_arg::value; + +}; + +} + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply + : aux::apply_chooser< + aux::apply_count_args< T1,T2,T3,T4,T5 >::value + >::template result_< F,T1,T2,T3,T4,T5 >::type +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp new file mode 100644 index 0000000000..7de6dad088 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp @@ -0,0 +1,50 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< BOOST_AUX_NTTP_DECL(int, arity_) > struct apply_chooser; +} + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp new file mode 100644 index 0000000000..efa213dfed --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp @@ -0,0 +1,78 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + + , typename has_apply_ = typename aux::has_apply::type + + > +struct apply_wrap0 + + : F::template apply< > +{ +}; + +template< + typename F, typename T1 + + > +struct apply_wrap1 + + : F::template apply +{ +}; + +template< + typename F, typename T1, typename T2 + + > +struct apply_wrap2 + + : F::template apply< T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + + > +struct apply_wrap3 + + : F::template apply< T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + + > +struct apply_wrap4 + + : F::template apply< T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + + > +struct apply_wrap5 + + : F::template apply< T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp new file mode 100644 index 0000000000..6f2f8a8070 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp @@ -0,0 +1,123 @@ + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > +{ + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<1> +{ + BOOST_STATIC_CONSTANT(int, value = 1); + typedef arg<2> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<2> +{ + BOOST_STATIC_CONSTANT(int, value = 2); + typedef arg<3> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U2 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<3> +{ + BOOST_STATIC_CONSTANT(int, value = 3); + typedef arg<4> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U3 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<4> +{ + BOOST_STATIC_CONSTANT(int, value = 4); + typedef arg<5> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U4 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<5> +{ + BOOST_STATIC_CONSTANT(int, value = 5); + typedef arg<6> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U5 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp new file mode 100644 index 0000000000..254e5b8886 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp @@ -0,0 +1,486 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< bool > +struct resolve_arg_impl +{ + template< + typename T, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > + struct result_ + { + typedef T type; + }; +}; + +template<> +struct resolve_arg_impl +{ + template< + typename T, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > + struct result_ + { + typedef typename apply_wrap5< + T + , U1, U2, U3, U4, U5 + >::type type; + }; +}; + +template< typename T > struct is_bind_template; + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg + : resolve_arg_impl< is_bind_template::value > + ::template result_< T,U1,U2,U3,U4,U5 > +{ +}; + +template< int arity_ > struct bind_chooser; + +aux::no_tag is_bind_helper(...); +template< typename T > aux::no_tag is_bind_helper(protect*); + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +aux::yes_tag is_bind_helper(bind< F,T1,T2,T3,T4,T5 >*); + +template< int N > +aux::yes_tag is_bind_helper(arg*); + +template< bool is_ref_ = true > +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = false); + }; +}; + +template<> +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = + sizeof(aux::is_bind_helper(static_cast(0))) + == sizeof(aux::yes_tag) + ); + }; +}; + +template< typename T > struct is_bind_template + : is_bind_template_impl< ::boost::detail::is_reference_impl::value > + ::template result_ +{ +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F + > +aux::yes_tag +is_bind_helper(bind0*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +namespace aux { + +template<> +struct bind_chooser<0> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef bind0 type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1 + > +aux::yes_tag +is_bind_helper(bind1< F,T1 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +namespace aux { + +template<> +struct bind_chooser<1> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef bind1< F,T1 > type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2 + > +aux::yes_tag +is_bind_helper(bind2< F,T1,T2 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +namespace aux { + +template<> +struct bind_chooser<2> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef bind2< F,T1,T2 > type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3 + > +aux::yes_tag +is_bind_helper(bind3< F,T1,T2,T3 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +namespace aux { + +template<> +struct bind_chooser<3> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef bind3< F,T1,T2,T3 > type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +aux::yes_tag +is_bind_helper(bind4< F,T1,T2,T3,T4 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +namespace aux { + +template<> +struct bind_chooser<4> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef bind4< F,T1,T2,T3,T4 > type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; + + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +aux::yes_tag +is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) + +namespace aux { + +template<> +struct bind_chooser<5> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef bind5< F,T1,T2,T3,T4,T5 > type; + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_bind_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_bind_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + > +struct bind_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_bind_arg::value + is_bind_arg::value + + is_bind_arg::value + is_bind_arg::value + + is_bind_arg::value + ); + +}; + +} + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind + : aux::bind_chooser< + aux::bind_count_args< T1,T2,T3,T4,T5 >::value + >::template result_< F,T1,T2,T3,T4,T5 >::type +{ +}; + +BOOST_MPL_AUX_ARITY_SPEC( + 6 + , bind + ) + +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC( + 6 + , bind + ) +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp new file mode 100644 index 0000000000..12062b425b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp @@ -0,0 +1,590 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< bool > +struct resolve_arg_impl +{ + template< + typename T, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > + struct result_ + { + typedef T type; + }; +}; + +template<> +struct resolve_arg_impl +{ + template< + typename T, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > + struct result_ + { + typedef typename apply_wrap5< + T + , U1, U2, U3, U4, U5 + >::type type; + }; +}; + +template< typename T > struct is_bind_template; + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg + : resolve_arg_impl< is_bind_template::value > + ::template result_< T,U1,U2,U3,U4,U5 > +{ +}; + +template< typename T > +struct replace_unnamed_arg_impl +{ + template< typename Arg > struct result_ + { + typedef Arg next; + typedef T type; + }; +}; + +template<> +struct replace_unnamed_arg_impl< arg< -1 > > +{ + template< typename Arg > struct result_ + { + typedef typename next::type next; + typedef Arg type; + }; +}; + +template< typename T, typename Arg > +struct replace_unnamed_arg + : replace_unnamed_arg_impl::template result_ +{ +}; + +template< int arity_ > struct bind_chooser; + +aux::no_tag is_bind_helper(...); +template< typename T > aux::no_tag is_bind_helper(protect*); + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +aux::yes_tag is_bind_helper(bind< F,T1,T2,T3,T4,T5 >*); + +template< int N > +aux::yes_tag is_bind_helper(arg*); + +template< bool is_ref_ = true > +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = false); + }; +}; + +template<> +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = + sizeof(aux::is_bind_helper(static_cast(0))) + == sizeof(aux::yes_tag) + ); + }; +}; + +template< typename T > struct is_bind_template + : is_bind_template_impl< ::boost::detail::is_reference_impl::value > + ::template result_ +{ +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F + > +aux::yes_tag +is_bind_helper(bind0*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +namespace aux { + +template<> +struct bind_chooser<0> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef bind0 type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1 + > +aux::yes_tag +is_bind_helper(bind1< F,T1 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +namespace aux { + +template<> +struct bind_chooser<1> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef bind1< F,T1 > type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2 + > +aux::yes_tag +is_bind_helper(bind2< F,T1,T2 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +namespace aux { + +template<> +struct bind_chooser<2> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef bind2< F,T1,T2 > type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3 + > +aux::yes_tag +is_bind_helper(bind3< F,T1,T2,T3 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +namespace aux { + +template<> +struct bind_chooser<3> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef bind3< F,T1,T2,T3 > type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +aux::yes_tag +is_bind_helper(bind4< F,T1,T2,T3,T4 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +namespace aux { + +template<> +struct bind_chooser<4> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef bind4< F,T1,T2,T3,T4 > type; + }; +}; + +} // namespace aux + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + typedef aux::replace_unnamed_arg< T5,n5 > r5; + typedef typename r5::type a5; + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +aux::yes_tag +is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) + +namespace aux { + +template<> +struct bind_chooser<5> +{ + template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + { + typedef bind5< F,T1,T2,T3,T4,T5 > type; + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_bind_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_bind_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + > +struct bind_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_bind_arg::value + is_bind_arg::value + + is_bind_arg::value + is_bind_arg::value + + is_bind_arg::value + ); + +}; + +} + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind + : aux::bind_chooser< + aux::bind_count_args< T1,T2,T3,T4,T5 >::value + >::template result_< F,T1,T2,T3,T4,T5 >::type +{ +}; + +BOOST_MPL_AUX_ARITY_SPEC( + 6 + , bind + ) + +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC( + 6 + , bind + ) +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp new file mode 100644 index 0000000000..c4a5060ff8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp @@ -0,0 +1,52 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct bind; + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp new file mode 100644 index 0000000000..020d6ba4c6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp @@ -0,0 +1,134 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitand_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitand_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitand_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct bitand_2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + + : if_< + + is_na + , bitand_2< N1,N2 > + , bitand_< + bitand_2< N1,N2 > + , N3, N4, N5 + > + >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitand_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct bitand_2 + : bitand_impl< + typename bitand_tag::type + , typename bitand_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitand_2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + & BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp new file mode 100644 index 0000000000..0474877675 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp @@ -0,0 +1,134 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitor_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitor_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct bitor_2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + + : if_< + + is_na + , bitor_2< N1,N2 > + , bitor_< + bitor_2< N1,N2 > + , N3, N4, N5 + > + >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct bitor_2 + : bitor_impl< + typename bitor_tag::type + , typename bitor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitor_2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + | BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp new file mode 100644 index 0000000000..42a9758bbd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp @@ -0,0 +1,134 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitxor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitxor_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct bitxor_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct bitxor_2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + + : if_< + + is_na + , bitxor_2< N1,N2 > + , bitxor_< + bitxor_2< N1,N2 > + , N3, N4, N5 + > + >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitxor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct bitxor_2 + : bitxor_impl< + typename bitxor_tag::type + , typename bitxor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitxor_2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/deque.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/deque.hpp new file mode 100644 index 0000000000..a0445d9dfd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/deque.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/deque.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct deque_chooser; + +} + +namespace aux { + +template<> +struct deque_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef vector0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct deque_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_deque_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_deque_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct deque_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + + is_deque_arg::value + is_deque_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct deque_impl +{ + typedef aux::deque_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::deque_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct deque + : aux::deque_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::deque_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/divides.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/divides.hpp new file mode 100644 index 0000000000..00636dcbf2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/divides.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct divides_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct divides_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct divides_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct divides2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + + : if_< + + is_na + , divides2< N1,N2 > + , divides< + divides2< N1,N2 > + , N3, N4, N5 + > + >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , divides + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct divides2 + : divides_impl< + typename divides_tag::type + , typename divides_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, divides2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + / BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp new file mode 100644 index 0000000000..b14cdda3b9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct equal_to_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct equal_to_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + + : equal_to_impl< + typename equal_to_tag::type + , typename equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp new file mode 100644 index 0000000000..58066d81f6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp @@ -0,0 +1,245 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl; + +template< int N > +struct fold_chunk; + +template<> struct fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; + }; +}; + +template<> struct fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; + }; +}; + +template<> struct fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; + }; +}; + +template<> struct fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; + }; +}; + +template< int N > +struct fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_step; + +template< + typename Last + , typename State + > +struct fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , fold_null_step< Last,State > + , fold_step< First,Last,State,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_step +{ + typedef fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2::type>::type + , ForwardOp + > chunk_; + + typedef typename chunk_::state state; + typedef typename chunk_::iterator iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl + : fold_chunk + ::template result_< First,Last,State,ForwardOp > +{ +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp new file mode 100644 index 0000000000..bf818731eb --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp @@ -0,0 +1,554 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +} // namespace aux + +template< + typename T + , typename Tag + + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg, Tag > +{ + typedef true_ is_le; + typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 + typedef mpl::protect type; +}; + +template< + typename F + , typename Tag + > +struct lambda< + bind0 + , Tag + + > +{ + typedef false_ is_le; + typedef bind0< + F + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1 +{ + typedef F< + typename L1::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1< true_,Tag,F,L1 > +{ + typedef bind1< + quote1< F,Tag > + , typename L1::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1 > class F + , typename T1 + , typename Tag + > +struct lambda< + F + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1 + , typename Tag + > +struct lambda< + bind1< F,T1 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind1< + F + , T1 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2 +{ + typedef F< + typename L1::type, typename L2::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2< true_,Tag,F,L1,L2 > +{ + typedef bind2< + quote2< F,Tag > + , typename L1::result_, typename L2::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + , typename Tag + > +struct lambda< + F< T1,T2 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2 + , typename Tag + > +struct lambda< + bind2< F,T1,T2 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind2< + F + , T1, T2 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3< true_,Tag,F,L1,L2,L3 > +{ + typedef bind3< + quote3< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + F< T1,T2,T3 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind3< + F + , T1, T2, T3 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > +{ + typedef bind4< + quote4< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind4< + F + , T1, T2, T3, T4 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type, typename L5::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > +{ + typedef bind5< + quote5< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind5< + F + , T1, T2, T3, T4, T5 + > result_; + + typedef result_ type; +}; + +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< mpl::protect, Tag > +{ + typedef false_ is_le; + typedef mpl::protect result_; + typedef result_ type; +}; + +/// specializations for the main 'bind' form + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; +}; + +/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars + +template< + typename F, typename Tag1, typename Tag2 + > +struct lambda< + lambda< F,Tag1 > + , Tag2 + > +{ + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef aux::le_result2 le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +BOOST_MPL_AUX_NA_SPEC(2, lambda) + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/greater.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/greater.hpp new file mode 100644 index 0000000000..6fdf8badbe --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/greater.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct greater_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct greater_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + + : greater_impl< + typename greater_tag::type + , typename greater_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp new file mode 100644 index 0000000000..f848eef98c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct greater_equal_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct greater_equal_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + + : greater_equal_impl< + typename greater_equal_tag::type + , typename greater_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp new file mode 100644 index 0000000000..233a1ec30c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp @@ -0,0 +1,166 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C1, bool C2 > +struct inherit2_impl +{ + template< typename Derived, typename T1, typename T2 > struct result_ + : T1, T2 + { + typedef Derived type_; + }; +}; + +template<> +struct inherit2_impl< false,true > +{ + template< typename Derived, typename T1, typename T2 > struct result_ + : T1 + { + typedef T1 type_; + }; +}; + +template<> +struct inherit2_impl< true,false > +{ + template< typename Derived, typename T1, typename T2 > struct result_ + : T2 + { + typedef T2 type_; + }; +}; + +template<> +struct inherit2_impl< true,true > +{ + template< typename Derived, typename T1, typename T2 > struct result_ + { + typedef T1 type_; + }; +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : aux::inherit2_impl< + is_empty_base::value + , is_empty_base::value + >::template result_< inherit2< T1,T2 >,T1, T2 > +{ + typedef typename inherit2::type_ type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp new file mode 100644 index 0000000000..695179584d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< typename Iterator, typename State > +struct iter_fold_if_null_step +{ + typedef State state; + typedef Iterator iterator; +}; + +template< bool > +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef typename apply2< StateOp,State,Iterator >::type state; + typedef typename IteratorOp::type iterator; + }; +}; + +template<> +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef State state; + typedef Iterator iterator; + }; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename Predicate + > +struct iter_fold_if_forward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename BackwardOp + , typename Predicate + > +struct iter_fold_if_backward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,BackwardOp, identity > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename ForwardPredicate + , typename BackwardOp + , typename BackwardPredicate + > +struct iter_fold_if_impl +{ + private: + typedef iter_fold_if_null_step< Iterator,State > forward_step0; + typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; + typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; + typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; + typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; + + + typedef typename if_< + typename forward_step4::not_last + , iter_fold_if_impl< + typename forward_step4::iterator + , typename forward_step4::state + , ForwardOp + , ForwardPredicate + , BackwardOp + , BackwardPredicate + > + , iter_fold_if_null_step< + typename forward_step4::iterator + , typename forward_step4::state + > + >::type backward_step4; + + typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; + typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; + typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; + typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; + + + public: + typedef typename backward_step0::state state; + typedef typename backward_step4::iterator iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp new file mode 100644 index 0000000000..50ea754f2e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp @@ -0,0 +1,245 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl; + +template< int N > +struct iter_fold_chunk; + +template<> struct iter_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct iter_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; + }; +}; + +template<> struct iter_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; + }; +}; + +template<> struct iter_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; + }; +}; + +template<> struct iter_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; + }; +}; + +template< int N > +struct iter_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef iter_fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_step; + +template< + typename Last + , typename State + > +struct iter_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct iter_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , iter_fold_null_step< Last,State > + , iter_fold_step< First,Last,State,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_step +{ + typedef iter_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > chunk_; + + typedef typename chunk_::state state; + typedef typename chunk_::iterator iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl + : iter_fold_chunk + ::template result_< First,Last,State,ForwardOp > +{ +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp new file mode 100644 index 0000000000..890a198a46 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp @@ -0,0 +1,229 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ + { + typedef T type; + typedef is_placeholder is_le; + }; +}; + +template<> struct lambda_impl< int_<1> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + + typedef bind1< + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<2> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; + + typedef bind2< + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<3> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; + + typedef bind3< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<4> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; + + typedef bind4< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<5> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; + + typedef bind5< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Protect + > +struct lambda +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity::type arity_; + typedef typename aux::lambda_impl + ::template result_< T,Tag,Protect > l_; + + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; + +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/less.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/less.hpp new file mode 100644 index 0000000000..7fb35e1077 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/less.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct less_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct less_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + + : less_impl< + typename less_tag::type + , typename less_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp new file mode 100644 index 0000000000..206ecdcf93 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct less_equal_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct less_equal_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + + : less_equal_impl< + typename less_equal_tag::type + , typename less_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/list.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/list.hpp new file mode 100644 index 0000000000..e5ea456c9e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/list.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct list_chooser; + +} + +namespace aux { + +template<> +struct list_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef list0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_list_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_list_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct list_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list_impl +{ + typedef aux::list_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::list_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct list + : aux::list_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::list_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp new file mode 100644 index 0000000000..ab25482f55 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp @@ -0,0 +1,534 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct list_c_chooser; + +} + +namespace aux { + +template<> +struct list_c_chooser<0> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list0_c< + T + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<1> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list1_c< + T, C0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<2> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list2_c< + T, C0, C1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<3> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list3_c< + T, C0, C1, C2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<4> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list4_c< + T, C0, C1, C2, C3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<5> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list5_c< + T, C0, C1, C2, C3, C4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<6> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list6_c< + T, C0, C1, C2, C3, C4, C5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<7> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list7_c< + T, C0, C1, C2, C3, C4, C5, C6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<8> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list8_c< + T, C0, C1, C2, C3, C4, C5, C6, C7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<9> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list9_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<10> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list10_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<11> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list11_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<12> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list12_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<13> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list13_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<14> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<15> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<16> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<17> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<18> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<19> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<20> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< long C > +struct is_list_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_list_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 + , long C9, long C10, long C11, long C12, long C13, long C14, long C15 + , long C16, long C17, long C18, long C19, long C20 + > +struct list_c_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + ); + +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c_impl +{ + typedef aux::list_c_count_args< + C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + > arg_num_; + + typedef typename aux::list_c_chooser< arg_num_::value > + ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +} // namespace aux + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct list_c + : aux::list_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type +{ + typedef typename aux::list_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/map.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/map.hpp new file mode 100644 index 0000000000..970e0b7602 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/map.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct map_chooser; + +} + +namespace aux { + +template<> +struct map_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef map0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_map_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_map_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct map_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + + is_map_arg::value + is_map_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map_impl +{ + typedef aux::map_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::map_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map + : aux::map_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::map_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp new file mode 100644 index 0000000000..7b49450a55 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct minus_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct minus_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct minus2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + + : if_< + + is_na + , minus2< N1,N2 > + , minus< + minus2< N1,N2 > + , N3, N4, N5 + > + >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , minus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct minus2 + : minus_impl< + typename minus_tag::type + , typename minus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, minus2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + - BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp new file mode 100644 index 0000000000..8badbab5b1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp @@ -0,0 +1,101 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct modulus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct modulus_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct modulus_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + + : modulus_impl< + typename modulus_tag::type + , typename modulus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + % BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp new file mode 100644 index 0000000000..d87d8cd11e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct not_equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct not_equal_to_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct not_equal_to_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + + : not_equal_to_impl< + typename not_equal_to_tag::type + , typename not_equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/or.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/or.hpp new file mode 100644 index 0000000000..3f7394e7cc --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/or.hpp @@ -0,0 +1,73 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/or.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< bool C_ > struct or_impl +{ + template< + typename T1, typename T2, typename T3, typename T4 + > + struct result_ + : true_ + { + }; +}; + +template<> struct or_impl +{ + template< + typename T1, typename T2, typename T3, typename T4 + > + struct result_ + : or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + >::template result_< T2,T3,T4,false_ > + { + }; +}; + +template<> +struct or_impl + ::result_< false_,false_,false_,false_ > + : false_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = false_, typename T4 = false_, typename T5 = false_ + > +struct or_ + + : aux::or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + >::template result_< T2,T3,T4,T5 > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , or_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , or_ + ) + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp new file mode 100644 index 0000000000..ff97364b9b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp @@ -0,0 +1,105 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg< -1 > _; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +} + +}} + +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<1> _1; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<2> _2; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<3> _3; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<4> _4; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<5> _5; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<6> _6; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +} + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp new file mode 100644 index 0000000000..a55b24c450 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct plus_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct plus_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct plus2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + + : if_< + + is_na + , plus2< N1,N2 > + , plus< + plus2< N1,N2 > + , N3, N4, N5 + > + >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , plus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct plus2 + : plus_impl< + typename plus_tag::type + , typename plus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, plus2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + + BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp new file mode 100644 index 0000000000..b85880ffdd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp @@ -0,0 +1,116 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/quote.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { +template< bool > struct quote_impl +{ + template< typename T > struct result_ + : T + { + }; +}; + +template<> struct quote_impl +{ + template< typename T > struct result_ + { + typedef T type; + }; +}; + +template< + template< typename P1 > class F + , typename Tag = void_ + > +struct quote1 +{ + template< typename U1 > struct apply + + : quote_impl< aux::has_type< F >::value > + ::template result_< F > + + { + }; +}; + +template< + template< typename P1, typename P2 > class F + , typename Tag = void_ + > +struct quote2 +{ + template< typename U1, typename U2 > struct apply + + : quote_impl< aux::has_type< F< U1,U2 > >::value > + ::template result_< F< U1,U2 > > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3 > class F + , typename Tag = void_ + > +struct quote3 +{ + template< typename U1, typename U2, typename U3 > struct apply + + : quote_impl< aux::has_type< F< U1,U2,U3 > >::value > + ::template result_< F< U1,U2,U3 > > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename Tag = void_ + > +struct quote4 +{ + template< + typename U1, typename U2, typename U3, typename U4 + > + struct apply + + : quote_impl< aux::has_type< F< U1,U2,U3,U4 > >::value > + ::template result_< F< U1,U2,U3,U4 > > + + { + }; +}; + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename Tag = void_ + > +struct quote5 +{ + template< + typename U1, typename U2, typename U3, typename U4 + , typename U5 + > + struct apply + + : quote_impl< aux::has_type< F< U1,U2,U3,U4,U5 > >::value > + ::template result_< F< U1,U2,U3,U4,U5 > > + + { + }; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp new file mode 100644 index 0000000000..7a07414adf --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp @@ -0,0 +1,295 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< long N > +struct reverse_fold_chunk; + +template<> struct reverse_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct reverse_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; +}; + +template<> struct reverse_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; +}; + +template<> struct reverse_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; +}; + +template<> struct reverse_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; +}; + +template< long N > +struct reverse_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step; + +template< + typename Last + , typename State + > +struct reverse_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_fold_null_step< Last,State > + , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step +{ + typedef reverse_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename deref::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl + : reverse_fold_chunk + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp new file mode 100644 index 0000000000..39a4057b77 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp @@ -0,0 +1,295 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl; + +template< long N > +struct reverse_iter_fold_chunk; + +template<> struct reverse_iter_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; +}; + +template< long N > +struct reverse_iter_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_step; + +template< + typename Last + , typename State + > +struct reverse_iter_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_iter_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_iter_fold_null_step< Last,State > + , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_step +{ + typedef reverse_iter_fold_chunk< -1 >::template result_< + typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl + : reverse_iter_fold_chunk + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/set.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/set.hpp new file mode 100644 index 0000000000..95aaa5cbdf --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/set.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct set_chooser; + +} + +namespace aux { + +template<> +struct set_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef set0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_set_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_set_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct set_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + + is_set_arg::value + is_set_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set_impl +{ + typedef aux::set_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::set_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set + : aux::set_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::set_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/set_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/set_c.hpp new file mode 100644 index 0000000000..1ff34f9032 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/set_c.hpp @@ -0,0 +1,534 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct set_c_chooser; + +} + +namespace aux { + +template<> +struct set_c_chooser<0> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set0_c< + T + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<1> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set1_c< + T, C0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<2> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set2_c< + T, C0, C1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<3> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set3_c< + T, C0, C1, C2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<4> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set4_c< + T, C0, C1, C2, C3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<5> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set5_c< + T, C0, C1, C2, C3, C4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<6> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set6_c< + T, C0, C1, C2, C3, C4, C5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<7> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set7_c< + T, C0, C1, C2, C3, C4, C5, C6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<8> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set8_c< + T, C0, C1, C2, C3, C4, C5, C6, C7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<9> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set9_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<10> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set10_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<11> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set11_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<12> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set12_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<13> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set13_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<14> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<15> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<16> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<17> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<18> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<19> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_c_chooser<20> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename set20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< long C > +struct is_set_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_set_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 + , long C9, long C10, long C11, long C12, long C13, long C14, long C15 + , long C16, long C17, long C18, long C19, long C20 + > +struct set_c_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + + is_set_c_arg::value + is_set_c_arg::value + ); + +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct set_c_impl +{ + typedef aux::set_c_count_args< + C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + > arg_num_; + + typedef typename aux::set_c_chooser< arg_num_::value > + ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +} // namespace aux + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct set_c + : aux::set_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type +{ + typedef typename aux::set_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp new file mode 100644 index 0000000000..d14a5e4886 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_left_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct shift_left_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct shift_left_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + + : shift_left_impl< + typename shift_left_tag::type + , typename shift_left_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + << BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp new file mode 100644 index 0000000000..08c4915ebd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_right_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct shift_right_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct shift_right_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + + : shift_right_impl< + typename shift_right_tag::type + , typename shift_right_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + >> BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp new file mode 100644 index 0000000000..1164f0f8c2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp @@ -0,0 +1,40 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< bool > +struct template_arity_impl +{ + template< typename F > struct result_ + : mpl::int_< -1 > + { + }; +}; + +template<> +struct template_arity_impl +{ + template< typename F > struct result_ + : F::arity + { + }; +}; + +template< typename F > +struct template_arity + : template_arity_impl< ::boost::mpl::aux::has_rebind::value > + ::template result_ +{ +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/times.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/times.hpp new file mode 100644 index 0000000000..fd773cc842 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/times.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct times_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct times_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +/// forward declaration + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct times2; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + + : if_< + + is_na + , times2< N1,N2 > + , times< + times2< N1,N2 > + , N3, N4, N5 + > + >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , times + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct times2 + : times_impl< + typename times_tag::type + , typename times_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, times2, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + * BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp new file mode 100644 index 0000000000..26533dd423 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp @@ -0,0 +1,109 @@ + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< BOOST_MPL_AUX_NTTP_DECL(int, size) > struct unpack_args_impl +{ + template< typename F, typename Args > struct apply; +}; + +template<> struct unpack_args_impl<0> +{ + template< typename F, typename Args > struct apply + : apply0< + F + > + { + }; +}; + +template<> struct unpack_args_impl<1> +{ + template< typename F, typename Args > struct apply + : apply1< + F + , typename at_c< Args,0 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<2> +{ + template< typename F, typename Args > struct apply + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<3> +{ + template< typename F, typename Args > struct apply + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<4> +{ + template< typename F, typename Args > struct apply + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<5> +{ + template< typename F, typename Args > struct apply + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > + { + }; +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + + : aux::unpack_args_impl< size::value > + ::template apply< F,Args > + + { + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp new file mode 100644 index 0000000000..a6c7b6219a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp @@ -0,0 +1,556 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct vector_chooser; + +} + +namespace aux { + +template<> +struct vector_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef vector0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_vector_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_vector_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct vector_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + ); + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector_impl +{ + typedef aux::vector_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::vector_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct vector + : aux::vector_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::vector_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp new file mode 100644 index 0000000000..c522d0826f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp @@ -0,0 +1,534 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct vector_c_chooser; + +} + +namespace aux { + +template<> +struct vector_c_chooser<0> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector0_c< + T + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<1> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector1_c< + T, T(C0) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<2> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector2_c< + T, T(C0), T(C1) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<3> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector3_c< + T, T(C0), T(C1), T(C2) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<4> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector4_c< + T, T(C0), T(C1), T(C2), T(C3) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<5> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector5_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<6> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector6_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<7> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector7_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<8> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector8_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<9> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector9_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<10> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector10_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<11> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector11_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<12> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector12_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<13> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector13_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<14> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector14_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<15> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector15_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<16> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector16_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<17> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector17_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<18> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector18_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<19> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector19_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<20> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector20_c< + T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< long C > +struct is_vector_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template<> +struct is_vector_c_arg +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template< + long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 + , long C9, long C10, long C11, long C12, long C13, long C14, long C15 + , long C16, long C17, long C18, long C19, long C20 + > +struct vector_c_count_args +{ + BOOST_STATIC_CONSTANT(int, value = + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + ); + +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c_impl +{ + typedef aux::vector_c_count_args< + C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + > arg_num_; + + typedef typename aux::vector_c_chooser< arg_num_::value > + ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +} // namespace aux + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct vector_c + : aux::vector_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type +{ + typedef typename aux::vector_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp new file mode 100644 index 0000000000..26de94cea1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_backward; +template<> +struct advance_backward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_backward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_backward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_backward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_backward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef typename prior::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_backward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp new file mode 100644 index 0000000000..b137cc72af --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_forward; +template<> +struct advance_forward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_forward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_forward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_forward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_forward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef typename next::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_forward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/and.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/and.hpp new file mode 100644 index 0000000000..010ad1fc84 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/and.hpp @@ -0,0 +1,69 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/and.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct and_impl + : false_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct and_impl< true,T1,T2,T3,T4 > + : and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , true_ + > +{ +}; + +template<> +struct and_impl< + true + , true_, true_, true_, true_ + > + : true_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = true_, typename T4 = true_, typename T5 = true_ + > +struct and_ + + : aux::and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , and_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , and_ + ) + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp new file mode 100644 index 0000000000..e08eaccf03 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp @@ -0,0 +1,169 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0 + + : apply_wrap0< + typename lambda::type + + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) +}; + +template< + typename F + > +struct apply< F,na,na,na,na,na > + : apply0 +{ +}; + +template< + typename F, typename T1 + > +struct apply1 + + : apply_wrap1< + typename lambda::type + , T1 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) +}; + +template< + typename F, typename T1 + > +struct apply< F,T1,na,na,na,na > + : apply1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct apply2 + + : apply_wrap2< + typename lambda::type + , T1, T2 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) +}; + +template< + typename F, typename T1, typename T2 + > +struct apply< F,T1,T2,na,na,na > + : apply2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3 + + : apply_wrap3< + typename lambda::type + , T1, T2, T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply< F,T1,T2,T3,na,na > + : apply3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4 + + : apply_wrap4< + typename lambda::type + , T1, T2, T3, T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply< F,T1,T2,T3,T4,na > + : apply4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5 + + : apply_wrap5< + typename lambda::type + , T1, T2, T3, T4, T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) +}; + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply + : apply5< F,T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp new file mode 100644 index 0000000000..b2ed5d5130 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp @@ -0,0 +1,52 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply; + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp new file mode 100644 index 0000000000..34d51a1a58 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp @@ -0,0 +1,84 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + + , typename has_apply_ = typename aux::has_apply::type + + > +struct apply_wrap0 + + : F::template apply< > +{ +}; + +template< typename F > +struct apply_wrap0< F,true_ > + : F::apply +{ +}; + +template< + typename F, typename T1 + + > +struct apply_wrap1 + + : F::template apply +{ +}; + +template< + typename F, typename T1, typename T2 + + > +struct apply_wrap2 + + : F::template apply< T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + + > +struct apply_wrap3 + + : F::template apply< T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + + > +struct apply_wrap4 + + : F::template apply< T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + + > +struct apply_wrap5 + + : F::template apply< T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp new file mode 100644 index 0000000000..6f2f8a8070 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp @@ -0,0 +1,123 @@ + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > +{ + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<1> +{ + BOOST_STATIC_CONSTANT(int, value = 1); + typedef arg<2> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<2> +{ + BOOST_STATIC_CONSTANT(int, value = 2); + typedef arg<3> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U2 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<3> +{ + BOOST_STATIC_CONSTANT(int, value = 3); + typedef arg<4> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U3 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<4> +{ + BOOST_STATIC_CONSTANT(int, value = 4); + typedef arg<5> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U4 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<5> +{ + BOOST_STATIC_CONSTANT(int, value = 5); + typedef arg<6> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U5 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp new file mode 100644 index 0000000000..095b84dd9b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp @@ -0,0 +1,369 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > +{ + typedef bind< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F + > +struct bind< F,na,na,na,na,na > + : bind0 +{ +}; + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1 + > +struct bind< F,T1,na,na,na,na > + : bind1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2 + > +struct bind< F,T1,T2,na,na,na > + : bind2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind< F,T1,T2,T3,na,na > + : bind3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind< F,T1,T2,T3,T4,na > + : bind4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; + + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind + : bind5< F,T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp new file mode 100644 index 0000000000..28914408ab --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp @@ -0,0 +1,466 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + typename T + , typename Arg + > +struct replace_unnamed_arg +{ + typedef Arg next; + typedef T type; +}; + +template< + typename Arg + > +struct replace_unnamed_arg< arg< -1 >, Arg > +{ + typedef typename Arg::next next; + typedef Arg type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > +{ + typedef bind< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F + > +struct bind< F,na,na,na,na,na > + : bind0 +{ +}; + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1 + > +struct bind< F,T1,na,na,na,na > + : bind1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2 + > +struct bind< F,T1,T2,na,na,na > + : bind2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind< F,T1,T2,T3,na,na > + : bind3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind< F,T1,T2,T3,T4,na > + : bind4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + typedef aux::replace_unnamed_arg< T5,n5 > r5; + typedef typename r5::type a5; + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind + : bind5< F,T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp new file mode 100644 index 0000000000..c4a5060ff8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp @@ -0,0 +1,52 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct bind; + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp new file mode 100644 index 0000000000..282771bce5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp @@ -0,0 +1,157 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitand_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitand_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitand_< N1,N2,N3,N4,na > + + : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitand_< N1,N2,N3,na,na > + + : bitand_< bitand_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitand_< N1,N2,na,na,na > + : bitand_impl< + typename bitand_tag::type + , typename bitand_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct bitand_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 & n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::bitand_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp new file mode 100644 index 0000000000..bc9c1989db --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp @@ -0,0 +1,157 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitor_< N1,N2,N3,N4,na > + + : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitor_< N1,N2,N3,na,na > + + : bitor_< bitor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitor_< N1,N2,na,na,na > + : bitor_impl< + typename bitor_tag::type + , typename bitor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct bitor_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 | n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::bitor_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp new file mode 100644 index 0000000000..76ce540b4e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp @@ -0,0 +1,157 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitxor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitxor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitxor_< N1,N2,N3,N4,na > + + : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitxor_< N1,N2,N3,na,na > + + : bitxor_< bitxor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitxor_< N1,N2,na,na,na > + : bitxor_impl< + typename bitxor_tag::type + , typename bitxor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct bitxor_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 ^ n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::bitxor_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/deque.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/deque.hpp new file mode 100644 index 0000000000..de67398a37 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/deque.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/deque.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct deque; + +template< + + > +struct deque< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct deque< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct deque< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct deque< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct deque< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct deque< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct deque< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct deque + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp new file mode 100644 index 0000000000..9bc7fb192a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp @@ -0,0 +1,156 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct divides_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , divides + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct divides< N1,N2,N3,N4,na > + + : divides< divides< divides< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct divides< N1,N2,N3,na,na > + + : divides< divides< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct divides< N1,N2,na,na,na > + : divides_impl< + typename divides_tag::type + , typename divides_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct divides_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 / n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::divides_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp new file mode 100644 index 0000000000..fa2dc4a25a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp @@ -0,0 +1,98 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + + : equal_to_impl< + typename equal_to_tag::type + , typename equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp new file mode 100644 index 0000000000..9e7a29300d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl +{ + typedef fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,First,Last,State,ForwardOp > + : fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp new file mode 100644 index 0000000000..bf818731eb --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp @@ -0,0 +1,554 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +} // namespace aux + +template< + typename T + , typename Tag + + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg, Tag > +{ + typedef true_ is_le; + typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 + typedef mpl::protect type; +}; + +template< + typename F + , typename Tag + > +struct lambda< + bind0 + , Tag + + > +{ + typedef false_ is_le; + typedef bind0< + F + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1 +{ + typedef F< + typename L1::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1< true_,Tag,F,L1 > +{ + typedef bind1< + quote1< F,Tag > + , typename L1::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1 > class F + , typename T1 + , typename Tag + > +struct lambda< + F + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1 + , typename Tag + > +struct lambda< + bind1< F,T1 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind1< + F + , T1 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2 +{ + typedef F< + typename L1::type, typename L2::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2< true_,Tag,F,L1,L2 > +{ + typedef bind2< + quote2< F,Tag > + , typename L1::result_, typename L2::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + , typename Tag + > +struct lambda< + F< T1,T2 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2 + , typename Tag + > +struct lambda< + bind2< F,T1,T2 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind2< + F + , T1, T2 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3< true_,Tag,F,L1,L2,L3 > +{ + typedef bind3< + quote3< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + F< T1,T2,T3 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind3< + F + , T1, T2, T3 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > +{ + typedef bind4< + quote4< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind4< + F + , T1, T2, T3, T4 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type, typename L5::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > +{ + typedef bind5< + quote5< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind5< + F + , T1, T2, T3, T4, T5 + > result_; + + typedef result_ type; +}; + +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< mpl::protect, Tag > +{ + typedef false_ is_le; + typedef mpl::protect result_; + typedef result_ type; +}; + +/// specializations for the main 'bind' form + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; +}; + +/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars + +template< + typename F, typename Tag1, typename Tag2 + > +struct lambda< + lambda< F,Tag1 > + , Tag2 + > +{ + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef aux::le_result2 le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +BOOST_MPL_AUX_NA_SPEC(2, lambda) + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp new file mode 100644 index 0000000000..faa3f2ba9a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp @@ -0,0 +1,98 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + + : greater_impl< + typename greater_tag::type + , typename greater_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp new file mode 100644 index 0000000000..392d142d92 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp @@ -0,0 +1,98 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + + : greater_equal_impl< + typename greater_equal_tag::type + , typename greater_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp new file mode 100644 index 0000000000..00f31c4226 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp @@ -0,0 +1,141 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : T1, T2 +{ + typedef inherit2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +template< typename T1 > +struct inherit2< T1,empty_base > +{ + typedef T1 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) +}; + +template< typename T2 > +struct inherit2< empty_base,T2 > +{ + typedef T2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) +}; + +template<> +struct inherit2< empty_base,empty_base > +{ + typedef empty_base type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp new file mode 100644 index 0000000000..695179584d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< typename Iterator, typename State > +struct iter_fold_if_null_step +{ + typedef State state; + typedef Iterator iterator; +}; + +template< bool > +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef typename apply2< StateOp,State,Iterator >::type state; + typedef typename IteratorOp::type iterator; + }; +}; + +template<> +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef State state; + typedef Iterator iterator; + }; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename Predicate + > +struct iter_fold_if_forward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename BackwardOp + , typename Predicate + > +struct iter_fold_if_backward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,BackwardOp, identity > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename ForwardPredicate + , typename BackwardOp + , typename BackwardPredicate + > +struct iter_fold_if_impl +{ + private: + typedef iter_fold_if_null_step< Iterator,State > forward_step0; + typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; + typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; + typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; + typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; + + + typedef typename if_< + typename forward_step4::not_last + , iter_fold_if_impl< + typename forward_step4::iterator + , typename forward_step4::state + , ForwardOp + , ForwardPredicate + , BackwardOp + , BackwardPredicate + > + , iter_fold_if_null_step< + typename forward_step4::iterator + , typename forward_step4::state + > + >::type backward_step4; + + typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; + typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; + typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; + typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; + + + public: + typedef typename backward_step0::state state; + typedef typename backward_step4::iterator iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp new file mode 100644 index 0000000000..805790e86d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl +{ + typedef iter_fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,First,Last,State,ForwardOp > + : iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp new file mode 100644 index 0000000000..890a198a46 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp @@ -0,0 +1,229 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ + { + typedef T type; + typedef is_placeholder is_le; + }; +}; + +template<> struct lambda_impl< int_<1> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + + typedef bind1< + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<2> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; + + typedef bind2< + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<3> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; + + typedef bind3< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<4> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; + + typedef bind4< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<5> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; + + typedef bind5< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Protect + > +struct lambda +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity::type arity_; + typedef typename aux::lambda_impl + ::template result_< T,Tag,Protect > l_; + + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; + +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/less.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/less.hpp new file mode 100644 index 0000000000..6451680fe8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/less.hpp @@ -0,0 +1,98 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + + : less_impl< + typename less_tag::type + , typename less_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > + BOOST_MPL_AUX_VALUE_WKND(N1)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp new file mode 100644 index 0000000000..00ae0d3ecb --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp @@ -0,0 +1,98 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + + : less_equal_impl< + typename less_equal_tag::type + , typename less_equal_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/list.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/list.hpp new file mode 100644 index 0000000000..4e8ad53d21 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/list.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct list; + +template< + + > +struct list< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list0< > +{ + typedef list0< >::type type; +}; + +template< + typename T0 + > +struct list< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list1 +{ + typedef typename list1::type type; +}; + +template< + typename T0, typename T1 + > +struct list< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list2< T0,T1 > +{ + typedef typename list2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct list< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list3< T0,T1,T2 > +{ + typedef typename list3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct list< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list4< T0,T1,T2,T3 > +{ + typedef typename list4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct list< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list5< T0,T1,T2,T3,T4 > +{ + typedef typename list5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct list< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list + : list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp new file mode 100644 index 0000000000..0b48a7f8e1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct list_c; + +template< + typename T + > +struct list_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list0_c +{ + typedef typename list0_c::type type; +}; + +template< + typename T, long C0 + > +struct list_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list1_c< T,C0 > +{ + typedef typename list1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct list_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list2_c< T,C0,C1 > +{ + typedef typename list2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct list_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list3_c< T,C0,C1,C2 > +{ + typedef typename list3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct list_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list4_c< T,C0,C1,C2,C3 > +{ + typedef typename list4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct list_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c + : list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/map.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/map.hpp new file mode 100644 index 0000000000..837e013771 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/map.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map; + +template< + + > +struct map< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map0< > +{ + typedef map0< >::type type; +}; + +template< + typename T0 + > +struct map< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map1 +{ + typedef typename map1::type type; +}; + +template< + typename T0, typename T1 + > +struct map< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map2< T0,T1 > +{ + typedef typename map2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct map< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map3< T0,T1,T2 > +{ + typedef typename map3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct map< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map4< T0,T1,T2,T3 > +{ + typedef typename map4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct map< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map5< T0,T1,T2,T3,T4 > +{ + typedef typename map5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct map< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map + : map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp new file mode 100644 index 0000000000..bb67c59a52 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp @@ -0,0 +1,156 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , minus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct minus< N1,N2,N3,N4,na > + + : minus< minus< minus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct minus< N1,N2,N3,na,na > + + : minus< minus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct minus< N1,N2,na,na,na > + : minus_impl< + typename minus_tag::type + , typename minus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct minus_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 - n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::minus_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp new file mode 100644 index 0000000000..6fd0cab37a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp @@ -0,0 +1,111 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct modulus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + + : modulus_impl< + typename modulus_tag::type + , typename modulus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct modulus_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 % n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::modulus_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp new file mode 100644 index 0000000000..7c940a5b07 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp @@ -0,0 +1,98 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct not_equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + + : not_equal_to_impl< + typename not_equal_to_tag::type + , typename not_equal_to_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + BOOST_STATIC_CONSTANT(bool, value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + ); + typedef bool_ type; + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/or.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/or.hpp new file mode 100644 index 0000000000..31e1aaa4e6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/or.hpp @@ -0,0 +1,69 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/or.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct or_impl + : true_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct or_impl< false,T1,T2,T3,T4 > + : or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , false_ + > +{ +}; + +template<> +struct or_impl< + false + , false_, false_, false_, false_ + > + : false_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = false_, typename T4 = false_, typename T5 = false_ + > +struct or_ + + : aux::or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , or_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , or_ + ) + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp new file mode 100644 index 0000000000..ff97364b9b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp @@ -0,0 +1,105 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg< -1 > _; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +} + +}} + +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<1> _1; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<2> _2; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<3> _3; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<4> _4; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<5> _5; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<6> _6; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +} + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp new file mode 100644 index 0000000000..cecead75ab --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp @@ -0,0 +1,156 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , plus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct plus< N1,N2,N3,N4,na > + + : plus< plus< plus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct plus< N1,N2,N3,na,na > + + : plus< plus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct plus< N1,N2,na,na,na > + : plus_impl< + typename plus_tag::type + , typename plus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct plus_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 + n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::plus_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp new file mode 100644 index 0000000000..e7a7f00196 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp @@ -0,0 +1,11 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/quote.hpp" header +// -- DO NOT modify by hand! + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp new file mode 100644 index 0000000000..c468684c91 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp @@ -0,0 +1,231 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename deref::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp new file mode 100644 index 0000000000..658f92a7c3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp @@ -0,0 +1,231 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/set.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/set.hpp new file mode 100644 index 0000000000..5721922e11 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/set.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set; + +template< + + > +struct set< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set0< > +{ + typedef set0< >::type type; +}; + +template< + typename T0 + > +struct set< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set1 +{ + typedef typename set1::type type; +}; + +template< + typename T0, typename T1 + > +struct set< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set2< T0,T1 > +{ + typedef typename set2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct set< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set3< T0,T1,T2 > +{ + typedef typename set3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct set< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set4< T0,T1,T2,T3 > +{ + typedef typename set4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct set< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set5< T0,T1,T2,T3,T4 > +{ + typedef typename set5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct set< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set + : set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/set_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/set_c.hpp new file mode 100644 index 0000000000..cbeb932c13 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/set_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct set_c; + +template< + typename T + > +struct set_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set0_c +{ + typedef typename set0_c::type type; +}; + +template< + typename T, long C0 + > +struct set_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set1_c< T,C0 > +{ + typedef typename set1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct set_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set2_c< T,C0,C1 > +{ + typedef typename set2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct set_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set3_c< T,C0,C1,C2 > +{ + typedef typename set3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct set_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set4_c< T,C0,C1,C2,C3 > +{ + typedef typename set4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct set_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : set17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : set18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : set19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct set_c + : set20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp new file mode 100644 index 0000000000..7ef4672522 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp @@ -0,0 +1,110 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_left_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + + : shift_left_impl< + typename shift_left_tag::type + , typename shift_left_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, typename Shift, T n, Shift s > +struct shift_left_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n << s)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + : aux::shift_left_wknd< + typename N::value_type + , typename S::value_type + , N::value + , S::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp new file mode 100644 index 0000000000..91a98f7385 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp @@ -0,0 +1,110 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_right_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + + : shift_right_impl< + typename shift_right_tag::type + , typename shift_right_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, typename Shift, T n, Shift s > +struct shift_right_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n >> s)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + : aux::shift_right_wknd< + typename N::value_type + , typename S::value_type + , N::value + , S::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp new file mode 100644 index 0000000000..1164f0f8c2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp @@ -0,0 +1,40 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< bool > +struct template_arity_impl +{ + template< typename F > struct result_ + : mpl::int_< -1 > + { + }; +}; + +template<> +struct template_arity_impl +{ + template< typename F > struct result_ + : F::arity + { + }; +}; + +template< typename F > +struct template_arity + : template_arity_impl< ::boost::mpl::aux::has_rebind::value > + ::template result_ +{ +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/times.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/times.hpp new file mode 100644 index 0000000000..d019b57247 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/times.hpp @@ -0,0 +1,156 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + : times< times< times< times< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , times + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct times< N1,N2,N3,N4,na > + + : times< times< times< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct times< N1,N2,N3,na,na > + + : times< times< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct times< N1,N2,na,na,na > + : times_impl< + typename times_tag::type + , typename times_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct times_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n1 * n2)); + typedef integral_c< T,value > type; +}; + +} + +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::times_wknd< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp new file mode 100644 index 0000000000..2194ce9d11 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< int size, typename F, typename Args > +struct unpack_args_impl; + +template< typename F, typename Args > +struct unpack_args_impl< 0,F,Args > + : apply0< + F + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 1,F,Args > + : apply1< + F + , typename at_c< Args,0 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 2,F,Args > + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 3,F,Args > + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 4,F,Args > + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 5,F,Args > + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > +{ +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + + : aux::unpack_args_impl< size::value,F, Args > + + { + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp new file mode 100644 index 0000000000..bfa9565a53 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct vector; + +template< + + > +struct vector< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct vector< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct vector< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct vector< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct vector< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct vector< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct vector< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp new file mode 100644 index 0000000000..0f1560d7f1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp @@ -0,0 +1,309 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct vector_c; + +template< + typename T + > +struct vector_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector0_c +{ + typedef typename vector0_c::type type; +}; + +template< + typename T, long C0 + > +struct vector_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector1_c< T, T(C0) > +{ + typedef typename vector1_c< T, T(C0) >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct vector_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector2_c< T, T(C0), T(C1) > +{ + typedef typename vector2_c< T, T(C0), T(C1) >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct vector_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector3_c< T, T(C0), T(C1), T(C2) > +{ + typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct vector_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > +{ + typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct vector_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > +{ + typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > +{ + typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > +{ + typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > +{ + typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > +{ + typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > +{ + typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > +{ + typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > +{ + typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > +{ + typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > +{ + typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > +{ + typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > +{ + typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > +{ + typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > +{ + typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > +{ + typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c + : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > +{ + typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp new file mode 100644 index 0000000000..26de94cea1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_backward; +template<> +struct advance_backward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_backward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_backward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_backward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_backward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef typename prior::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_backward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp new file mode 100644 index 0000000000..b137cc72af --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_forward; +template<> +struct advance_forward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_forward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_forward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_forward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_forward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef typename next::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_forward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/and.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/and.hpp new file mode 100644 index 0000000000..163913f81a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/and.hpp @@ -0,0 +1,64 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/and.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct and_impl + : false_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct and_impl< true,T1,T2,T3,T4 > + : and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , true_ + > +{ +}; + +template<> +struct and_impl< + true + , true_, true_, true_, true_ + > + : true_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = true_, typename T4 = true_, typename T5 = true_ + > +struct and_ + + : aux::and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , and_ + ) + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/apply.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/apply.hpp new file mode 100644 index 0000000000..89d9e4b4ea --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/apply.hpp @@ -0,0 +1,139 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0 + + : apply_wrap0< + typename lambda::type + + > +{ +}; + +template< + typename F + > +struct apply< F,na,na,na,na,na > + : apply0 +{ +}; + +template< + typename F, typename T1 + > +struct apply1 + + : apply_wrap1< + typename lambda::type + , T1 + > +{ +}; + +template< + typename F, typename T1 + > +struct apply< F,T1,na,na,na,na > + : apply1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct apply2 + + : apply_wrap2< + typename lambda::type + , T1, T2 + > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct apply< F,T1,T2,na,na,na > + : apply2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3 + + : apply_wrap3< + typename lambda::type + , T1, T2, T3 + > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply< F,T1,T2,T3,na,na > + : apply3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4 + + : apply_wrap4< + typename lambda::type + , T1, T2, T3, T4 + > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply< F,T1,T2,T3,T4,na > + : apply4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5 + + : apply_wrap5< + typename lambda::type + , T1, T2, T3, T4, T5 + > +{ +}; + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply + : apply5< F,T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp new file mode 100644 index 0000000000..b2ed5d5130 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp @@ -0,0 +1,52 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply; + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp new file mode 100644 index 0000000000..34d51a1a58 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp @@ -0,0 +1,84 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + + , typename has_apply_ = typename aux::has_apply::type + + > +struct apply_wrap0 + + : F::template apply< > +{ +}; + +template< typename F > +struct apply_wrap0< F,true_ > + : F::apply +{ +}; + +template< + typename F, typename T1 + + > +struct apply_wrap1 + + : F::template apply +{ +}; + +template< + typename F, typename T1, typename T2 + + > +struct apply_wrap2 + + : F::template apply< T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + + > +struct apply_wrap3 + + : F::template apply< T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + + > +struct apply_wrap4 + + : F::template apply< T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + + > +struct apply_wrap5 + + : F::template apply< T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/arg.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/arg.hpp new file mode 100644 index 0000000000..6f2f8a8070 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/arg.hpp @@ -0,0 +1,123 @@ + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > +{ + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<1> +{ + BOOST_STATIC_CONSTANT(int, value = 1); + typedef arg<2> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<2> +{ + BOOST_STATIC_CONSTANT(int, value = 2); + typedef arg<3> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U2 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<3> +{ + BOOST_STATIC_CONSTANT(int, value = 3); + typedef arg<4> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U3 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<4> +{ + BOOST_STATIC_CONSTANT(int, value = 4); + typedef arg<5> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U4 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<5> +{ + BOOST_STATIC_CONSTANT(int, value = 5); + typedef arg<6> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U5 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp new file mode 100644 index 0000000000..b0702324aa --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp @@ -0,0 +1,440 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > +{ + typedef bind< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F + > +struct bind< F,na,na,na,na,na > + : bind0 +{ +}; + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1 + > +struct bind< F,T1,na,na,na,na > + : bind1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2 + > +struct bind< F,T1,T2,na,na,na > + : bind2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind< F,T1,T2,T3,na,na > + : bind3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind< F,T1,T2,T3,T4,na > + : bind4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; + + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind + : bind5< F,T1,T2,T3,T4,T5 > +{ +}; + +/// if_/eval_if specializations +template< template< typename T1, typename T2, typename T3 > class F, typename Tag > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct if_; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< if_,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef typename if_< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +template< + template< typename T1, typename T2, typename T3 > class F, typename Tag + > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct eval_if; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< eval_if,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef typename eval_if< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/bind.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/bind.hpp new file mode 100644 index 0000000000..0e9513a649 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/bind.hpp @@ -0,0 +1,561 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + typename T + , typename Arg + > +struct replace_unnamed_arg +{ + typedef Arg next; + typedef T type; +}; + +template< + typename Arg + > +struct replace_unnamed_arg< arg< -1 >, Arg > +{ + typedef typename Arg::next next; + typedef Arg type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > +{ + typedef bind< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) + +template< + typename F + > +struct bind< F,na,na,na,na,na > + : bind0 +{ +}; + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1 + > +struct bind< F,T1,na,na,na,na > + : bind1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2 + > +struct bind< F,T1,T2,na,na,na > + : bind2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind< F,T1,T2,T3,na,na > + : bind3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind< F,T1,T2,T3,T4,na > + : bind4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + typedef aux::replace_unnamed_arg< T5,n5 > r5; + typedef typename r5::type a5; + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind + : bind5< F,T1,T2,T3,T4,T5 > +{ +}; + +/// if_/eval_if specializations +template< template< typename T1, typename T2, typename T3 > class F, typename Tag > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct if_; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< if_,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef typename if_< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +template< + template< typename T1, typename T2, typename T3 > class F, typename Tag + > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct eval_if; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< eval_if,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef typename eval_if< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp new file mode 100644 index 0000000000..c4a5060ff8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp @@ -0,0 +1,52 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct bind; + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/bitand.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/bitand.hpp new file mode 100644 index 0000000000..ee40fb3d3f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/bitand.hpp @@ -0,0 +1,142 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitand_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitand_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> +{ +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitand_< N1,N2,N3,N4,na > + + : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitand_< N1,N2,N3,na,na > + + : bitand_< bitand_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitand_< N1,N2,na,na,na > + : bitand_impl< + typename bitand_tag::type + , typename bitand_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + & BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/bitor.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/bitor.hpp new file mode 100644 index 0000000000..1e28d3b07e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/bitor.hpp @@ -0,0 +1,142 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> +{ +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitor_< N1,N2,N3,N4,na > + + : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitor_< N1,N2,N3,na,na > + + : bitor_< bitor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitor_< N1,N2,na,na,na > + : bitor_impl< + typename bitor_tag::type + , typename bitor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + | BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/bitxor.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/bitxor.hpp new file mode 100644 index 0000000000..2ba879d67b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/bitxor.hpp @@ -0,0 +1,142 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitxor_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct bitxor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> +{ +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitxor_< N1,N2,N3,N4,na > + + : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitxor_< N1,N2,N3,na,na > + + : bitxor_< bitxor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitxor_< N1,N2,na,na,na > + : bitxor_impl< + typename bitxor_tag::type + , typename bitxor_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/deque.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/deque.hpp new file mode 100644 index 0000000000..de67398a37 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/deque.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/deque.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct deque; + +template< + + > +struct deque< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct deque< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct deque< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct deque< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct deque< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct deque< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct deque< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct deque< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct deque + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/divides.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/divides.hpp new file mode 100644 index 0000000000..f365d62dfa --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/divides.hpp @@ -0,0 +1,141 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct divides_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct divides_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> +{ +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct divides< N1,N2,N3,N4,na > + + : divides< divides< divides< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct divides< N1,N2,N3,na,na > + + : divides< divides< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct divides< N1,N2,na,na,na > + : divides_impl< + typename divides_tag::type + , typename divides_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + / BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/equal_to.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/equal_to.hpp new file mode 100644 index 0000000000..bbc6bf0dc1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/equal_to.hpp @@ -0,0 +1,92 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + + : equal_to_impl< + typename equal_to_tag::type + , typename equal_to_tag::type + >::template apply< N1,N2 >::type +{ +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp new file mode 100644 index 0000000000..9e7a29300d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl +{ + typedef fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,First,Last,State,ForwardOp > + : fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp new file mode 100644 index 0000000000..bf818731eb --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp @@ -0,0 +1,554 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +} // namespace aux + +template< + typename T + , typename Tag + + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg, Tag > +{ + typedef true_ is_le; + typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 + typedef mpl::protect type; +}; + +template< + typename F + , typename Tag + > +struct lambda< + bind0 + , Tag + + > +{ + typedef false_ is_le; + typedef bind0< + F + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1 +{ + typedef F< + typename L1::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1< true_,Tag,F,L1 > +{ + typedef bind1< + quote1< F,Tag > + , typename L1::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1 > class F + , typename T1 + , typename Tag + > +struct lambda< + F + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1 + , typename Tag + > +struct lambda< + bind1< F,T1 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind1< + F + , T1 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2 +{ + typedef F< + typename L1::type, typename L2::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2< true_,Tag,F,L1,L2 > +{ + typedef bind2< + quote2< F,Tag > + , typename L1::result_, typename L2::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + , typename Tag + > +struct lambda< + F< T1,T2 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2 + , typename Tag + > +struct lambda< + bind2< F,T1,T2 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind2< + F + , T1, T2 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3< true_,Tag,F,L1,L2,L3 > +{ + typedef bind3< + quote3< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + F< T1,T2,T3 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind3< + F + , T1, T2, T3 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > +{ + typedef bind4< + quote4< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind4< + F + , T1, T2, T3, T4 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type, typename L5::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > +{ + typedef bind5< + quote5< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind5< + F + , T1, T2, T3, T4, T5 + > result_; + + typedef result_ type; +}; + +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< mpl::protect, Tag > +{ + typedef false_ is_le; + typedef mpl::protect result_; + typedef result_ type; +}; + +/// specializations for the main 'bind' form + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; +}; + +/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars + +template< + typename F, typename Tag1, typename Tag2 + > +struct lambda< + lambda< F,Tag1 > + , Tag2 + > +{ + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef aux::le_result2 le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +BOOST_MPL_AUX_NA_SPEC(2, lambda) + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/greater.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/greater.hpp new file mode 100644 index 0000000000..38c8bb3add --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/greater.hpp @@ -0,0 +1,92 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + + : greater_impl< + typename greater_tag::type + , typename greater_tag::type + >::template apply< N1,N2 >::type +{ +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp new file mode 100644 index 0000000000..2aa8370f0f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp @@ -0,0 +1,92 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct greater_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + + : greater_equal_impl< + typename greater_equal_tag::type + , typename greater_equal_tag::type + >::template apply< N1,N2 >::type +{ +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/inherit.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/inherit.hpp new file mode 100644 index 0000000000..8b34e718c3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/inherit.hpp @@ -0,0 +1,125 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : T1, T2 +{ + typedef inherit2 type; +}; + +template< typename T1 > +struct inherit2< T1,empty_base > +{ + typedef T1 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) +}; + +template< typename T2 > +struct inherit2< empty_base,T2 > +{ + typedef T2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) +}; + +template<> +struct inherit2< empty_base,empty_base > +{ + typedef empty_base type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp new file mode 100644 index 0000000000..695179584d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< typename Iterator, typename State > +struct iter_fold_if_null_step +{ + typedef State state; + typedef Iterator iterator; +}; + +template< bool > +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef typename apply2< StateOp,State,Iterator >::type state; + typedef typename IteratorOp::type iterator; + }; +}; + +template<> +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef State state; + typedef Iterator iterator; + }; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename Predicate + > +struct iter_fold_if_forward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename BackwardOp + , typename Predicate + > +struct iter_fold_if_backward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,BackwardOp, identity > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename ForwardPredicate + , typename BackwardOp + , typename BackwardPredicate + > +struct iter_fold_if_impl +{ + private: + typedef iter_fold_if_null_step< Iterator,State > forward_step0; + typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; + typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; + typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; + typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; + + + typedef typename if_< + typename forward_step4::not_last + , iter_fold_if_impl< + typename forward_step4::iterator + , typename forward_step4::state + , ForwardOp + , ForwardPredicate + , BackwardOp + , BackwardPredicate + > + , iter_fold_if_null_step< + typename forward_step4::iterator + , typename forward_step4::state + > + >::type backward_step4; + + typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; + typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; + typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; + typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; + + + public: + typedef typename backward_step0::state state; + typedef typename backward_step4::iterator iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp new file mode 100644 index 0000000000..805790e86d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl +{ + typedef iter_fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,First,Last,State,ForwardOp > + : iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp new file mode 100644 index 0000000000..f8f109c2bd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp @@ -0,0 +1,228 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ + { + typedef T type; + typedef is_placeholder is_le; + }; +}; + +template<> struct lambda_impl< int_<1> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + + typedef bind1< + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<2> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; + + typedef bind2< + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<3> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; + + typedef bind3< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<4> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; + + typedef bind4< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<5> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; + + typedef bind5< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, mpl::protect, bind_ > + , identity + >::type type_; + + typedef typename type_::type type; + }; +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Protect + > +struct lambda +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity::type arity_; + typedef typename aux::lambda_impl + ::template result_< T,Tag,Protect > l_; + + typedef typename l_::type type; + typedef typename l_::is_le is_le; +}; + +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/less.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/less.hpp new file mode 100644 index 0000000000..928d0e3087 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/less.hpp @@ -0,0 +1,92 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + + : less_impl< + typename less_tag::type + , typename less_tag::type + >::template apply< N1,N2 >::type +{ +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/less_equal.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/less_equal.hpp new file mode 100644 index 0000000000..364cd967a7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/less_equal.hpp @@ -0,0 +1,92 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_equal_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct less_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + + : less_equal_impl< + typename less_equal_tag::type + , typename less_equal_tag::type + >::template apply< N1,N2 >::type +{ +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/list.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/list.hpp new file mode 100644 index 0000000000..4e8ad53d21 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/list.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct list; + +template< + + > +struct list< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list0< > +{ + typedef list0< >::type type; +}; + +template< + typename T0 + > +struct list< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list1 +{ + typedef typename list1::type type; +}; + +template< + typename T0, typename T1 + > +struct list< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list2< T0,T1 > +{ + typedef typename list2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct list< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list3< T0,T1,T2 > +{ + typedef typename list3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct list< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list4< T0,T1,T2,T3 > +{ + typedef typename list4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct list< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list5< T0,T1,T2,T3,T4 > +{ + typedef typename list5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct list< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list + : list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/list_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/list_c.hpp new file mode 100644 index 0000000000..0b48a7f8e1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/list_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct list_c; + +template< + typename T + > +struct list_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list0_c +{ + typedef typename list0_c::type type; +}; + +template< + typename T, long C0 + > +struct list_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list1_c< T,C0 > +{ + typedef typename list1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct list_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list2_c< T,C0,C1 > +{ + typedef typename list2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct list_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list3_c< T,C0,C1,C2 > +{ + typedef typename list3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct list_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list4_c< T,C0,C1,C2,C3 > +{ + typedef typename list4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct list_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c + : list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/map.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/map.hpp new file mode 100644 index 0000000000..837e013771 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/map.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map; + +template< + + > +struct map< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map0< > +{ + typedef map0< >::type type; +}; + +template< + typename T0 + > +struct map< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map1 +{ + typedef typename map1::type type; +}; + +template< + typename T0, typename T1 + > +struct map< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map2< T0,T1 > +{ + typedef typename map2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct map< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map3< T0,T1,T2 > +{ + typedef typename map3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct map< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map4< T0,T1,T2,T3 > +{ + typedef typename map4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct map< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map5< T0,T1,T2,T3,T4 > +{ + typedef typename map5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct map< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map + : map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/minus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/minus.hpp new file mode 100644 index 0000000000..0b8b5ceeb7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/minus.hpp @@ -0,0 +1,141 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct minus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> +{ +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct minus< N1,N2,N3,N4,na > + + : minus< minus< minus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct minus< N1,N2,N3,na,na > + + : minus< minus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct minus< N1,N2,na,na,na > + : minus_impl< + typename minus_tag::type + , typename minus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + - BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/modulus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/modulus.hpp new file mode 100644 index 0000000000..6a64e49a81 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/modulus.hpp @@ -0,0 +1,99 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct modulus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct modulus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + + : modulus_impl< + typename modulus_tag::type + , typename modulus_tag::type + >::template apply< N1,N2 >::type +{ +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + % BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp new file mode 100644 index 0000000000..c08d7f06d7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp @@ -0,0 +1,92 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct not_equal_to_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct not_equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + + : not_equal_to_impl< + typename not_equal_to_tag::type + , typename not_equal_to_tag::type + >::template apply< N1,N2 >::type +{ +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/or.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/or.hpp new file mode 100644 index 0000000000..986b2e0ea4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/or.hpp @@ -0,0 +1,64 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/or.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct or_impl + : true_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct or_impl< false,T1,T2,T3,T4 > + : or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , false_ + > +{ +}; + +template<> +struct or_impl< + false + , false_, false_, false_, false_ + > + : false_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = false_, typename T4 = false_, typename T5 = false_ + > +struct or_ + + : aux::or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , or_ + ) + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/placeholders.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/placeholders.hpp new file mode 100644 index 0000000000..ff97364b9b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/placeholders.hpp @@ -0,0 +1,105 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg< -1 > _; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +} + +}} + +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<1> _1; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<2> _2; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<3> _3; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<4> _4; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<5> _5; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +} + +}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<6> _6; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +} + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/plus.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/plus.hpp new file mode 100644 index 0000000000..ed2e432dc8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/plus.hpp @@ -0,0 +1,141 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct plus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> +{ +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct plus< N1,N2,N3,N4,na > + + : plus< plus< plus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct plus< N1,N2,N3,na,na > + + : plus< plus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct plus< N1,N2,na,na,na > + : plus_impl< + typename plus_tag::type + , typename plus_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + + BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/quote.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/quote.hpp new file mode 100644 index 0000000000..d7d0420e4d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/quote.hpp @@ -0,0 +1,123 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/quote.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< typename T, bool has_type_ > +struct quote_impl + : T +{ +}; + +template< typename T > +struct quote_impl< T,false > +{ + typedef T type; +}; + +template< + template< typename P1 > class F + , typename Tag = void_ + > +struct quote1 +{ + template< typename U1 > struct apply + + : quote_impl< + F + , aux::has_type< F >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2 > class F + , typename Tag = void_ + > +struct quote2 +{ + template< typename U1, typename U2 > struct apply + + : quote_impl< + F< U1,U2 > + , aux::has_type< F< U1,U2 > >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3 > class F + , typename Tag = void_ + > +struct quote3 +{ + template< typename U1, typename U2, typename U3 > struct apply + + : quote_impl< + F< U1,U2,U3 > + , aux::has_type< F< U1,U2,U3 > >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename Tag = void_ + > +struct quote4 +{ + template< + typename U1, typename U2, typename U3, typename U4 + > + struct apply + + : quote_impl< + F< U1,U2,U3,U4 > + , aux::has_type< F< U1,U2,U3,U4 > >::value + > + + { + }; +}; + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename Tag = void_ + > +struct quote5 +{ + template< + typename U1, typename U2, typename U3, typename U4 + , typename U5 + > + struct apply + + : quote_impl< + F< U1,U2,U3,U4,U5 > + , aux::has_type< F< U1,U2,U3,U4,U5 > >::value + > + + { + }; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp new file mode 100644 index 0000000000..c468684c91 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp @@ -0,0 +1,231 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename deref::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp new file mode 100644 index 0000000000..658f92a7c3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp @@ -0,0 +1,231 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/set.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/set.hpp new file mode 100644 index 0000000000..5721922e11 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/set.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set; + +template< + + > +struct set< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set0< > +{ + typedef set0< >::type type; +}; + +template< + typename T0 + > +struct set< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set1 +{ + typedef typename set1::type type; +}; + +template< + typename T0, typename T1 + > +struct set< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set2< T0,T1 > +{ + typedef typename set2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct set< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set3< T0,T1,T2 > +{ + typedef typename set3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct set< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set4< T0,T1,T2,T3 > +{ + typedef typename set4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct set< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set5< T0,T1,T2,T3,T4 > +{ + typedef typename set5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct set< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set + : set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/set_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/set_c.hpp new file mode 100644 index 0000000000..cbeb932c13 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/set_c.hpp @@ -0,0 +1,328 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/set_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct set_c; + +template< + typename T + > +struct set_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set0_c +{ + typedef typename set0_c::type type; +}; + +template< + typename T, long C0 + > +struct set_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set1_c< T,C0 > +{ + typedef typename set1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct set_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set2_c< T,C0,C1 > +{ + typedef typename set2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct set_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set3_c< T,C0,C1,C2 > +{ + typedef typename set3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct set_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set4_c< T,C0,C1,C2,C3 > +{ + typedef typename set4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct set_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : set16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : set17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : set18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct set_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : set19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct set_c + : set20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/shift_left.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/shift_left.hpp new file mode 100644 index 0000000000..cf9c837d6a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/shift_left.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_left_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_left_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + + : shift_left_impl< + typename shift_left_tag::type + , typename shift_left_tag::type + >::template apply< N1,N2 >::type +{ +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + << BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/shift_right.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/shift_right.hpp new file mode 100644 index 0000000000..477229f24e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/shift_right.hpp @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_right_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct shift_right_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + + : shift_right_impl< + typename shift_right_tag::type + , typename shift_right_tag::type + >::template apply< N1,N2 >::type +{ +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename S > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + >> BOOST_MPL_AUX_VALUE_WKND(S)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/template_arity.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/template_arity.hpp new file mode 100644 index 0000000000..a23fc23846 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/template_arity.hpp @@ -0,0 +1,11 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header +// -- DO NOT modify by hand! + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/times.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/times.hpp new file mode 100644 index 0000000000..ca88d405f0 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/times.hpp @@ -0,0 +1,141 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct times_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + : times< times< times< times< N1,N2 >, N3>, N4>, N5> +{ +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct times< N1,N2,N3,N4,na > + + : times< times< times< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct times< N1,N2,N3,na,na > + + : times< times< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct times< N1,N2,na,na,na > + : times_impl< + typename times_tag::type + , typename times_tag::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + * BOOST_MPL_AUX_VALUE_WKND(N2)::value + ) + > + { + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/unpack_args.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/unpack_args.hpp new file mode 100644 index 0000000000..2194ce9d11 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/unpack_args.hpp @@ -0,0 +1,94 @@ + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< int size, typename F, typename Args > +struct unpack_args_impl; + +template< typename F, typename Args > +struct unpack_args_impl< 0,F,Args > + : apply0< + F + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 1,F,Args > + : apply1< + F + , typename at_c< Args,0 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 2,F,Args > + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 3,F,Args > + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 4,F,Args > + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 5,F,Args > + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > +{ +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + + : aux::unpack_args_impl< size::value,F, Args > + + { + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/vector.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/vector.hpp new file mode 100644 index 0000000000..bfa9565a53 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/vector.hpp @@ -0,0 +1,323 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct vector; + +template< + + > +struct vector< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct vector< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct vector< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct vector< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct vector< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct vector< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct vector< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/vector_c.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/vector_c.hpp new file mode 100644 index 0000000000..0f1560d7f1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessed/plain/vector_c.hpp @@ -0,0 +1,309 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct vector_c; + +template< + typename T + > +struct vector_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector0_c +{ + typedef typename vector0_c::type type; +}; + +template< + typename T, long C0 + > +struct vector_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector1_c< T, T(C0) > +{ + typedef typename vector1_c< T, T(C0) >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct vector_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector2_c< T, T(C0), T(C1) > +{ + typedef typename vector2_c< T, T(C0), T(C1) >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct vector_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector3_c< T, T(C0), T(C1), T(C2) > +{ + typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct vector_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > +{ + typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct vector_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > +{ + typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > +{ + typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > +{ + typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > +{ + typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > +{ + typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > +{ + typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > +{ + typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > +{ + typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > +{ + typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > +{ + typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > +{ + typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > +{ + typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > +{ + typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > +{ + typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > +{ + typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c + : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > +{ + typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; +}; + +}} + diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/add.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/add.hpp new file mode 100644 index 0000000000..53e646ef6a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/add.hpp @@ -0,0 +1,65 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_ADD_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_ADD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +# include + +#if defined(BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION) +# include + +# define BOOST_MPL_PP_ADD(i,j) \ + BOOST_MPL_PP_ADD_DELAY(i,j) \ + /**/ + +# define BOOST_MPL_PP_ADD_DELAY(i,j) \ + BOOST_PP_CAT(BOOST_MPL_PP_TUPLE_11_ELEM_##i,BOOST_MPL_PP_ADD_##j) \ + /**/ +#else +# define BOOST_MPL_PP_ADD(i,j) \ + BOOST_MPL_PP_ADD_DELAY(i,j) \ + /**/ + +# define BOOST_MPL_PP_ADD_DELAY(i,j) \ + BOOST_MPL_PP_TUPLE_11_ELEM_##i BOOST_MPL_PP_ADD_##j \ + /**/ +#endif + +# define BOOST_MPL_PP_ADD_0 (0,1,2,3,4,5,6,7,8,9,10) +# define BOOST_MPL_PP_ADD_1 (1,2,3,4,5,6,7,8,9,10,0) +# define BOOST_MPL_PP_ADD_2 (2,3,4,5,6,7,8,9,10,0,0) +# define BOOST_MPL_PP_ADD_3 (3,4,5,6,7,8,9,10,0,0,0) +# define BOOST_MPL_PP_ADD_4 (4,5,6,7,8,9,10,0,0,0,0) +# define BOOST_MPL_PP_ADD_5 (5,6,7,8,9,10,0,0,0,0,0) +# define BOOST_MPL_PP_ADD_6 (6,7,8,9,10,0,0,0,0,0,0) +# define BOOST_MPL_PP_ADD_7 (7,8,9,10,0,0,0,0,0,0,0) +# define BOOST_MPL_PP_ADD_8 (8,9,10,0,0,0,0,0,0,0,0) +# define BOOST_MPL_PP_ADD_9 (9,10,0,0,0,0,0,0,0,0,0) +# define BOOST_MPL_PP_ADD_10 (10,0,0,0,0,0,0,0,0,0,0) + +#else + +# include + +# define BOOST_MPL_PP_ADD(i,j) \ + BOOST_PP_ADD(i,j) \ + /**/ + +#endif + +#endif // BOOST_MPL_AUX_PREPROCESSOR_ADD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/def_params_tail.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/def_params_tail.hpp new file mode 100644 index 0000000000..cab3989d1c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/def_params_tail.hpp @@ -0,0 +1,105 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_DEF_PARAMS_TAIL_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_DEF_PARAMS_TAIL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +#include +#include +#include +#include + +// BOOST_MPL_PP_DEF_PARAMS_TAIL(1,T,value): , T1 = value, .., Tn = value +// BOOST_MPL_PP_DEF_PARAMS_TAIL(2,T,value): , T2 = value, .., Tn = value +// BOOST_MPL_PP_DEF_PARAMS_TAIL(n,T,value): + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +# include +# include + +# define BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, value_func) \ + BOOST_MPL_PP_DEF_PARAMS_TAIL_DELAY_1( \ + i \ + , BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY,i) \ + , param \ + , value_func \ + ) \ + /**/ + +# define BOOST_MPL_PP_DEF_PARAMS_TAIL_DELAY_1(i, n, param, value_func) \ + BOOST_MPL_PP_DEF_PARAMS_TAIL_DELAY_2(i,n,param,value_func) \ + /**/ + +# define BOOST_MPL_PP_DEF_PARAMS_TAIL_DELAY_2(i, n, param, value_func) \ + BOOST_PP_COMMA_IF(BOOST_PP_AND(i,n)) \ + BOOST_MPL_PP_DEF_PARAMS_TAIL_##i(n,param,value_func) \ + /**/ + +# define BOOST_MPL_PP_DEF_PARAMS_TAIL_0(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##1 v(),p##2 v(),p##3 v(),p##4 v(),p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v()) +# define BOOST_MPL_PP_DEF_PARAMS_TAIL_1(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##2 v(),p##3 v(),p##4 v(),p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v(),p1) +# define BOOST_MPL_PP_DEF_PARAMS_TAIL_2(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##3 v(),p##4 v(),p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v(),p1,p2) +# define BOOST_MPL_PP_DEF_PARAMS_TAIL_3(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##4 v(),p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v(),p1,p2,p3) +# define BOOST_MPL_PP_DEF_PARAMS_TAIL_4(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v(),p1,p2,p3,p4) +# define BOOST_MPL_PP_DEF_PARAMS_TAIL_5(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##6 v(),p##7 v(),p##8 v(),p##9 v(),p1,p2,p3,p4,p5) +# define BOOST_MPL_PP_DEF_PARAMS_TAIL_6(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##7 v(),p##8 v(),p##9 v(),p1,p2,p3,p4,p5,p6) +# define BOOST_MPL_PP_DEF_PARAMS_TAIL_7(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##8 v(),p##9 v(),p1,p2,p3,p4,p5,p6,p7) +# define BOOST_MPL_PP_DEF_PARAMS_TAIL_8(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##9 v(),p1,p2,p3,p4,p5,p6,p7,p8) +# define BOOST_MPL_PP_DEF_PARAMS_TAIL_9(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p1,p2,p3,p4,p5,p6,p7,p8,p9) + +#else + +# include +# include +# include +# include +# include +# include + +# define BOOST_MPL_PP_AUX_TAIL_PARAM_FUNC(unused, i, op) \ + , BOOST_PP_CAT( \ + BOOST_PP_TUPLE_ELEM(3, 1, op) \ + , BOOST_PP_ADD_D(1, i, BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(3, 0, op))) \ + ) BOOST_PP_TUPLE_ELEM(3, 2, op)() \ + /**/ + +# define BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, value_func) \ + BOOST_PP_REPEAT( \ + BOOST_PP_SUB_D(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, i) \ + , BOOST_MPL_PP_AUX_TAIL_PARAM_FUNC \ + , (i, param, value_func) \ + ) \ + /**/ + + +#endif // BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES + +#define BOOST_MPL_PP_DEF_PARAMS_TAIL(i, param, value) \ + BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, BOOST_PP_IDENTITY(=value)) \ + /**/ + +#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +# define BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, param, value) \ + BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, BOOST_PP_IDENTITY(=value)) \ + /**/ +#else +# define BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, param, value) \ + BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, BOOST_PP_EMPTY) \ + /**/ +#endif + +#endif // BOOST_MPL_AUX_PREPROCESSOR_DEF_PARAMS_TAIL_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/default_params.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/default_params.hpp new file mode 100644 index 0000000000..c3548c6c9b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/default_params.hpp @@ -0,0 +1,67 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_DEFAULT_PARAMS_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_DEFAULT_PARAMS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +// BOOST_MPL_PP_DEFAULT_PARAMS(0,T,int): +// BOOST_MPL_PP_DEFAULT_PARAMS(1,T,int): T1 = int +// BOOST_MPL_PP_DEFAULT_PARAMS(2,T,int): T1 = int, T2 = int +// BOOST_MPL_PP_DEFAULT_PARAMS(n,T,int): T1 = int, T2 = int, .., Tn = int + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +# include + +# define BOOST_MPL_PP_DEFAULT_PARAMS(n,p,v) \ + BOOST_PP_CAT(BOOST_MPL_PP_DEFAULT_PARAMS_,n)(p,v) \ + /**/ + +# define BOOST_MPL_PP_DEFAULT_PARAMS_0(p,v) +# define BOOST_MPL_PP_DEFAULT_PARAMS_1(p,v) p##1=v +# define BOOST_MPL_PP_DEFAULT_PARAMS_2(p,v) p##1=v,p##2=v +# define BOOST_MPL_PP_DEFAULT_PARAMS_3(p,v) p##1=v,p##2=v,p##3=v +# define BOOST_MPL_PP_DEFAULT_PARAMS_4(p,v) p##1=v,p##2=v,p##3=v,p##4=v +# define BOOST_MPL_PP_DEFAULT_PARAMS_5(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v +# define BOOST_MPL_PP_DEFAULT_PARAMS_6(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v,p##6=v +# define BOOST_MPL_PP_DEFAULT_PARAMS_7(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v,p##6=v,p##7=v +# define BOOST_MPL_PP_DEFAULT_PARAMS_8(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v,p##6=v,p##7=v,p##8=v +# define BOOST_MPL_PP_DEFAULT_PARAMS_9(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v,p##6=v,p##7=v,p##8=v,p##9=v + +#else + +# include +# include +# include +# include +# include + +# define BOOST_MPL_PP_AUX_DEFAULT_PARAM_FUNC(unused, i, pv) \ + BOOST_PP_COMMA_IF(i) \ + BOOST_PP_CAT( BOOST_PP_TUPLE_ELEM(2,0,pv), BOOST_PP_INC(i) ) \ + = BOOST_PP_TUPLE_ELEM(2,1,pv) \ + /**/ + +# define BOOST_MPL_PP_DEFAULT_PARAMS(n, param, value) \ + BOOST_PP_REPEAT( \ + n \ + , BOOST_MPL_PP_AUX_DEFAULT_PARAM_FUNC \ + , (param,value) \ + ) \ + /**/ + +#endif + +#endif // BOOST_MPL_AUX_PREPROCESSOR_DEFAULT_PARAMS_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/enum.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/enum.hpp new file mode 100644 index 0000000000..64c5e6a8f6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/enum.hpp @@ -0,0 +1,62 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_ENUM_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_ENUM_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +// BOOST_MPL_PP_ENUM(0,int): +// BOOST_MPL_PP_ENUM(1,int): int +// BOOST_MPL_PP_ENUM(2,int): int, int +// BOOST_MPL_PP_ENUM(n,int): int, int, .., int + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +# include + +# define BOOST_MPL_PP_ENUM(n, param) \ + BOOST_PP_CAT(BOOST_MPL_PP_ENUM_,n)(param) \ + /**/ + +# define BOOST_MPL_PP_ENUM_0(p) +# define BOOST_MPL_PP_ENUM_1(p) p +# define BOOST_MPL_PP_ENUM_2(p) p,p +# define BOOST_MPL_PP_ENUM_3(p) p,p,p +# define BOOST_MPL_PP_ENUM_4(p) p,p,p,p +# define BOOST_MPL_PP_ENUM_5(p) p,p,p,p,p +# define BOOST_MPL_PP_ENUM_6(p) p,p,p,p,p,p +# define BOOST_MPL_PP_ENUM_7(p) p,p,p,p,p,p,p +# define BOOST_MPL_PP_ENUM_8(p) p,p,p,p,p,p,p,p +# define BOOST_MPL_PP_ENUM_9(p) p,p,p,p,p,p,p,p,p + +#else + +# include +# include + +# define BOOST_MPL_PP_AUX_ENUM_FUNC(unused, i, param) \ + BOOST_PP_COMMA_IF(i) param \ + /**/ + +# define BOOST_MPL_PP_ENUM(n, param) \ + BOOST_PP_REPEAT( \ + n \ + , BOOST_MPL_PP_AUX_ENUM_FUNC \ + , param \ + ) \ + /**/ + +#endif + +#endif // BOOST_MPL_AUX_PREPROCESSOR_ENUM_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/ext_params.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/ext_params.hpp new file mode 100644 index 0000000000..f5e6e502cd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/ext_params.hpp @@ -0,0 +1,78 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_EXT_PARAMS_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_EXT_PARAMS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +// BOOST_MPL_PP_EXT_PARAMS(2,2,T): +// BOOST_MPL_PP_EXT_PARAMS(2,3,T): T2 +// BOOST_MPL_PP_EXT_PARAMS(2,4,T): T2, T3 +// BOOST_MPL_PP_EXT_PARAMS(2,n,T): T2, T3, .., Tn-1 + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +# include +# include + +# define BOOST_MPL_PP_EXT_PARAMS(i,j,p) \ + BOOST_MPL_PP_EXT_PARAMS_DELAY_1(i,BOOST_MPL_PP_SUB(j,i),p) \ + /**/ + +# define BOOST_MPL_PP_EXT_PARAMS_DELAY_1(i,n,p) \ + BOOST_MPL_PP_EXT_PARAMS_DELAY_2(i,n,p) \ + /**/ + +# define BOOST_MPL_PP_EXT_PARAMS_DELAY_2(i,n,p) \ + BOOST_MPL_PP_EXT_PARAMS_##i(n,p) \ + /**/ + +# define BOOST_MPL_PP_EXT_PARAMS_1(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##1,p##2,p##3,p##4,p##5,p##6,p##7,p##8,p##9) +# define BOOST_MPL_PP_EXT_PARAMS_2(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##2,p##3,p##4,p##5,p##6,p##7,p##8,p##9,p1) +# define BOOST_MPL_PP_EXT_PARAMS_3(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##3,p##4,p##5,p##6,p##7,p##8,p##9,p1,p2) +# define BOOST_MPL_PP_EXT_PARAMS_4(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##4,p##5,p##6,p##7,p##8,p##9,p1,p2,p3) +# define BOOST_MPL_PP_EXT_PARAMS_5(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##5,p##6,p##7,p##8,p##9,p1,p2,p3,p4) +# define BOOST_MPL_PP_EXT_PARAMS_6(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##6,p##7,p##8,p##9,p1,p2,p3,p4,p5) +# define BOOST_MPL_PP_EXT_PARAMS_7(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##7,p##8,p##9,p1,p2,p3,p4,p5,p6) +# define BOOST_MPL_PP_EXT_PARAMS_8(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##8,p##9,p1,p2,p3,p4,p5,p6,p7) +# define BOOST_MPL_PP_EXT_PARAMS_9(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##9,p1,p2,p3,p4,p5,p6,p7,p8) + +#else + +# include +# include +# include +# include +# include +# include + +# define BOOST_MPL_PP_AUX_EXT_PARAM_FUNC(unused, i, op) \ + BOOST_PP_COMMA_IF(i) \ + BOOST_PP_CAT( \ + BOOST_PP_TUPLE_ELEM(2,1,op) \ + , BOOST_PP_ADD_D(1, i, BOOST_PP_TUPLE_ELEM(2,0,op)) \ + ) \ + /**/ + +# define BOOST_MPL_PP_EXT_PARAMS(i, j, param) \ + BOOST_PP_REPEAT( \ + BOOST_PP_SUB_D(1,j,i) \ + , BOOST_MPL_PP_AUX_EXT_PARAM_FUNC \ + , (i,param) \ + ) \ + /**/ + +#endif + +#endif // BOOST_MPL_AUX_PREPROCESSOR_EXT_PARAMS_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/filter_params.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/filter_params.hpp new file mode 100644 index 0000000000..7c0df4f7d5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/filter_params.hpp @@ -0,0 +1,28 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_FILTER_PARAMS_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_FILTER_PARAMS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#define BOOST_MPL_PP_FILTER_PARAMS_0(p1,p2,p3,p4,p5,p6,p7,p8,p9) +#define BOOST_MPL_PP_FILTER_PARAMS_1(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1 +#define BOOST_MPL_PP_FILTER_PARAMS_2(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2 +#define BOOST_MPL_PP_FILTER_PARAMS_3(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3 +#define BOOST_MPL_PP_FILTER_PARAMS_4(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4 +#define BOOST_MPL_PP_FILTER_PARAMS_5(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4,p5 +#define BOOST_MPL_PP_FILTER_PARAMS_6(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4,p5,p6 +#define BOOST_MPL_PP_FILTER_PARAMS_7(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4,p5,p6,p7 +#define BOOST_MPL_PP_FILTER_PARAMS_8(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4,p5,p6,p7,p8 +#define BOOST_MPL_PP_FILTER_PARAMS_9(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4,p5,p6,p7,p8,p9 + +#endif // BOOST_MPL_AUX_PREPROCESSOR_FILTER_PARAMS_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/params.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/params.hpp new file mode 100644 index 0000000000..acad321903 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/params.hpp @@ -0,0 +1,65 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_PARAMS_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_PARAMS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +// BOOST_MPL_PP_PARAMS(0,T): +// BOOST_MPL_PP_PARAMS(1,T): T1 +// BOOST_MPL_PP_PARAMS(2,T): T1, T2 +// BOOST_MPL_PP_PARAMS(n,T): T1, T2, .., Tn + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +# include + +# define BOOST_MPL_PP_PARAMS(n,p) \ + BOOST_PP_CAT(BOOST_MPL_PP_PARAMS_,n)(p) \ + /**/ + +# define BOOST_MPL_PP_PARAMS_0(p) +# define BOOST_MPL_PP_PARAMS_1(p) p##1 +# define BOOST_MPL_PP_PARAMS_2(p) p##1,p##2 +# define BOOST_MPL_PP_PARAMS_3(p) p##1,p##2,p##3 +# define BOOST_MPL_PP_PARAMS_4(p) p##1,p##2,p##3,p##4 +# define BOOST_MPL_PP_PARAMS_5(p) p##1,p##2,p##3,p##4,p##5 +# define BOOST_MPL_PP_PARAMS_6(p) p##1,p##2,p##3,p##4,p##5,p##6 +# define BOOST_MPL_PP_PARAMS_7(p) p##1,p##2,p##3,p##4,p##5,p##6,p##7 +# define BOOST_MPL_PP_PARAMS_8(p) p##1,p##2,p##3,p##4,p##5,p##6,p##7,p##8 +# define BOOST_MPL_PP_PARAMS_9(p) p##1,p##2,p##3,p##4,p##5,p##6,p##7,p##8,p##9 + +#else + +# include +# include +# include +# include + +# define BOOST_MPL_PP_AUX_PARAM_FUNC(unused, i, param) \ + BOOST_PP_COMMA_IF(i) \ + BOOST_PP_CAT(param, BOOST_PP_INC(i)) \ + /**/ + +# define BOOST_MPL_PP_PARAMS(n, param) \ + BOOST_PP_REPEAT( \ + n \ + , BOOST_MPL_PP_AUX_PARAM_FUNC \ + , param \ + ) \ + /**/ + +#endif + +#endif // BOOST_MPL_AUX_PREPROCESSOR_PARAMS_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/partial_spec_params.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/partial_spec_params.hpp new file mode 100644 index 0000000000..de5535cea8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/partial_spec_params.hpp @@ -0,0 +1,32 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_PARTIAL_SPEC_PARAMS_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_PARTIAL_SPEC_PARAMS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include + +#define BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \ +BOOST_MPL_PP_PARAMS(n, param) \ +BOOST_PP_COMMA_IF(BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY,n)) \ +BOOST_MPL_PP_ENUM( \ + BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY,n) \ + , def \ + ) \ +/**/ + +#endif // BOOST_MPL_AUX_PREPROCESSOR_PARTIAL_SPEC_PARAMS_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/range.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/range.hpp new file mode 100644 index 0000000000..d66eeb559c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/range.hpp @@ -0,0 +1,30 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_RANGE_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_RANGE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +#define BOOST_MPL_PP_RANGE_ITEM(z,n,_) (n) + +#define BOOST_MPL_PP_RANGE(first, length) \ + BOOST_PP_SEQ_SUBSEQ( \ + BOOST_PP_REPEAT(BOOST_PP_ADD(first,length), BOOST_MPL_PP_RANGE_ITEM, _), \ + first, length \ + ) \ +/**/ + +#endif // BOOST_MPL_AUX_PREPROCESSOR_RANGE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/repeat.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/repeat.hpp new file mode 100644 index 0000000000..0511367665 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/repeat.hpp @@ -0,0 +1,51 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_REPEAT_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_REPEAT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +# include + +# define BOOST_MPL_PP_REPEAT(n,f,param) \ + BOOST_PP_CAT(BOOST_MPL_PP_REPEAT_,n)(f,param) \ + /**/ + +# define BOOST_MPL_PP_REPEAT_0(f,p) +# define BOOST_MPL_PP_REPEAT_1(f,p) f(0,0,p) +# define BOOST_MPL_PP_REPEAT_2(f,p) f(0,0,p) f(0,1,p) +# define BOOST_MPL_PP_REPEAT_3(f,p) f(0,0,p) f(0,1,p) f(0,2,p) +# define BOOST_MPL_PP_REPEAT_4(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) +# define BOOST_MPL_PP_REPEAT_5(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) +# define BOOST_MPL_PP_REPEAT_6(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) +# define BOOST_MPL_PP_REPEAT_7(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) f(0,6,p) +# define BOOST_MPL_PP_REPEAT_8(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) f(0,6,p) f(0,7,p) +# define BOOST_MPL_PP_REPEAT_9(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) f(0,6,p) f(0,7,p) f(0,8,p) +# define BOOST_MPL_PP_REPEAT_10(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) f(0,6,p) f(0,7,p) f(0,8,p) f(0,9,p) + +#else + +# include + +# define BOOST_MPL_PP_REPEAT(n,f,param) \ + BOOST_PP_REPEAT(n,f,param) \ + /**/ + +#endif + +#define BOOST_MPL_PP_REPEAT_IDENTITY_FUNC(unused1, unused2, x) x + +#endif // BOOST_MPL_AUX_PREPROCESSOR_REPEAT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/sub.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/sub.hpp new file mode 100644 index 0000000000..c794c749fa --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/sub.hpp @@ -0,0 +1,65 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_SUB_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_SUB_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +# include + +#if defined(BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION) +# include + +# define BOOST_MPL_PP_SUB(i,j) \ + BOOST_MPL_PP_SUB_DELAY(i,j) \ + /**/ + +# define BOOST_MPL_PP_SUB_DELAY(i,j) \ + BOOST_PP_CAT(BOOST_MPL_PP_TUPLE_11_ELEM_##i,BOOST_MPL_PP_SUB_##j) \ + /**/ +#else +# define BOOST_MPL_PP_SUB(i,j) \ + BOOST_MPL_PP_SUB_DELAY(i,j) \ + /**/ + +# define BOOST_MPL_PP_SUB_DELAY(i,j) \ + BOOST_MPL_PP_TUPLE_11_ELEM_##i BOOST_MPL_PP_SUB_##j \ + /**/ +#endif + +# define BOOST_MPL_PP_SUB_0 (0,1,2,3,4,5,6,7,8,9,10) +# define BOOST_MPL_PP_SUB_1 (0,0,1,2,3,4,5,6,7,8,9) +# define BOOST_MPL_PP_SUB_2 (0,0,0,1,2,3,4,5,6,7,8) +# define BOOST_MPL_PP_SUB_3 (0,0,0,0,1,2,3,4,5,6,7) +# define BOOST_MPL_PP_SUB_4 (0,0,0,0,0,1,2,3,4,5,6) +# define BOOST_MPL_PP_SUB_5 (0,0,0,0,0,0,1,2,3,4,5) +# define BOOST_MPL_PP_SUB_6 (0,0,0,0,0,0,0,1,2,3,4) +# define BOOST_MPL_PP_SUB_7 (0,0,0,0,0,0,0,0,1,2,3) +# define BOOST_MPL_PP_SUB_8 (0,0,0,0,0,0,0,0,0,1,2) +# define BOOST_MPL_PP_SUB_9 (0,0,0,0,0,0,0,0,0,0,1) +# define BOOST_MPL_PP_SUB_10 (0,0,0,0,0,0,0,0,0,0,0) + +#else + +# include + +# define BOOST_MPL_PP_SUB(i,j) \ + BOOST_PP_SUB(i,j) \ + /**/ + +#endif + +#endif // BOOST_MPL_AUX_PREPROCESSOR_SUB_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/tuple.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/tuple.hpp new file mode 100644 index 0000000000..755bbc58e4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/preprocessor/tuple.hpp @@ -0,0 +1,29 @@ + +#ifndef BOOST_MPL_AUX_PREPROCESSOR_TUPLE_HPP_INCLUDED +#define BOOST_MPL_AUX_PREPROCESSOR_TUPLE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#define BOOST_MPL_PP_TUPLE_11_ELEM_0(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e0 +#define BOOST_MPL_PP_TUPLE_11_ELEM_1(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e1 +#define BOOST_MPL_PP_TUPLE_11_ELEM_2(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e2 +#define BOOST_MPL_PP_TUPLE_11_ELEM_3(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e3 +#define BOOST_MPL_PP_TUPLE_11_ELEM_4(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e4 +#define BOOST_MPL_PP_TUPLE_11_ELEM_5(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e5 +#define BOOST_MPL_PP_TUPLE_11_ELEM_6(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e6 +#define BOOST_MPL_PP_TUPLE_11_ELEM_7(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e7 +#define BOOST_MPL_PP_TUPLE_11_ELEM_8(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e8 +#define BOOST_MPL_PP_TUPLE_11_ELEM_9(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e9 +#define BOOST_MPL_PP_TUPLE_11_ELEM_10(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e10 + +#endif // BOOST_MPL_AUX_PREPROCESSOR_TUPLE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/push_back_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/push_back_impl.hpp new file mode 100644 index 0000000000..27e7a60443 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/push_back_impl.hpp @@ -0,0 +1,70 @@ + +#ifndef BOOST_MPL_AUX_PUSH_BACK_IMPL_HPP_INCLUDED +#define BOOST_MPL_AUX_PUSH_BACK_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2008 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include + +#include + +namespace boost { namespace mpl { + +struct has_push_back_arg {}; + +// agurt 05/feb/04: no default implementation; the stub definition is needed +// to enable the default 'has_push_back' implementation below +template< typename Tag > +struct push_back_impl +{ + template< typename Sequence, typename T > struct apply + { + // should be instantiated only in the context of 'has_push_back_impl'; + // if you've got an assert here, you are requesting a 'push_back' + // specialization that doesn't exist. + BOOST_MPL_ASSERT_MSG( + ( boost::is_same< T, has_push_back_arg >::value ) + , REQUESTED_PUSH_BACK_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST + , ( Sequence ) + ); + }; +}; + +template< typename Tag > +struct has_push_back_impl +{ + template< typename Seq > struct apply +#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) + : aux::has_type< push_back< Seq, has_push_back_arg > > + { +#else + { + typedef aux::has_type< push_back< Seq, has_push_back_arg > > type; + BOOST_STATIC_CONSTANT(bool, value = + (aux::has_type< push_back< Seq, has_push_back_arg > >::value) + ); +#endif + }; +}; + +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2, push_back_impl) +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, has_push_back_impl) + +}} + +#endif // BOOST_MPL_AUX_PUSH_BACK_IMPL_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/push_front_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/push_front_impl.hpp new file mode 100644 index 0000000000..5b83ee7645 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/push_front_impl.hpp @@ -0,0 +1,71 @@ + +#ifndef BOOST_MPL_AUX_PUSH_FRONT_IMPL_HPP_INCLUDED +#define BOOST_MPL_AUX_PUSH_FRONT_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2008 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include + +#include + +namespace boost { namespace mpl { + +struct has_push_front_arg {}; + +// agurt 05/feb/04: no default implementation; the stub definition is needed +// to enable the default 'has_push_front' implementation below + +template< typename Tag > +struct push_front_impl +{ + template< typename Sequence, typename T > struct apply + { + // should be instantiated only in the context of 'has_push_front_impl'; + // if you've got an assert here, you are requesting a 'push_front' + // specialization that doesn't exist. + BOOST_MPL_ASSERT_MSG( + ( boost::is_same< T, has_push_front_arg >::value ) + , REQUESTED_PUSH_FRONT_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST + , ( Sequence ) + ); + }; +}; + +template< typename Tag > +struct has_push_front_impl +{ + template< typename Seq > struct apply +#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) + : aux::has_type< push_front< Seq, has_push_front_arg > > + { +#else + { + typedef aux::has_type< push_front< Seq, has_push_front_arg > > type; + BOOST_STATIC_CONSTANT(bool, value = + (aux::has_type< push_front< Seq, has_push_front_arg > >::value) + ); +#endif + }; +}; + +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2, push_front_impl) +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, has_push_front_impl) + +}} + +#endif // BOOST_MPL_AUX_PUSH_FRONT_IMPL_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/reverse_fold_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/reverse_fold_impl.hpp new file mode 100644 index 0000000000..a27a35fa13 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/reverse_fold_impl.hpp @@ -0,0 +1,44 @@ + +#ifndef BOOST_MPL_AUX_REVERSE_FOLD_IMPL_HPP_INCLUDED +#define BOOST_MPL_AUX_REVERSE_FOLD_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include +# include +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + || defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) +# include +# include +# endif +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER reverse_fold_impl.hpp +# include + +#else + +# define AUX778076_FOLD_IMPL_OP(iter) typename deref::type +# define AUX778076_FOLD_IMPL_NAME_PREFIX reverse_fold +# include + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_AUX_REVERSE_FOLD_IMPL_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/reverse_fold_impl_body.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/reverse_fold_impl_body.hpp new file mode 100644 index 0000000000..0f80010667 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/reverse_fold_impl_body.hpp @@ -0,0 +1,412 @@ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! + +#if !defined(BOOST_PP_IS_ITERATING) + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +# include +# include +# include +# include + +# include +# include +# include +# include +# include + +// local macros, #undef-ined at the end of the header + +# define AUX778076_ITER_FOLD_FORWARD_STEP(unused, n_, unused2) \ + typedef typename apply2< \ + ForwardOp \ + , BOOST_PP_CAT(fwd_state,n_) \ + , AUX778076_FOLD_IMPL_OP(BOOST_PP_CAT(iter,n_)) \ + >::type BOOST_PP_CAT(fwd_state,BOOST_PP_INC(n_)); \ + typedef typename mpl::next::type \ + BOOST_PP_CAT(iter,BOOST_PP_INC(n_)); \ + /**/ + +# define AUX778076_ITER_FOLD_BACKWARD_STEP_FUNC(n_) \ + typedef typename apply2< \ + BackwardOp \ + , BOOST_PP_CAT(bkwd_state,n_) \ + , AUX778076_FOLD_IMPL_OP(BOOST_PP_CAT(iter,BOOST_PP_DEC(n_))) \ + >::type BOOST_PP_CAT(bkwd_state,BOOST_PP_DEC(n_)); \ + /**/ + +# define AUX778076_ITER_FOLD_BACKWARD_STEP(unused, n_, j) \ + AUX778076_ITER_FOLD_BACKWARD_STEP_FUNC( \ + BOOST_PP_SUB_D(1,j,n_) \ + ) \ + /**/ + +# define AUX778076_FIRST_BACKWARD_STATE_TYPEDEF(n_) \ + typedef typename nested_chunk::state BOOST_PP_CAT(bkwd_state,n_); + /**/ + +# define AUX778076_FOLD_IMPL_NAME \ + BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_impl) \ + /**/ + +# define AUX778076_FOLD_CHUNK_NAME \ + BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_chunk) \ + /**/ + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration +template< + BOOST_MPL_AUX_NTTP_DECL(long, N) + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct AUX778076_FOLD_IMPL_NAME; + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_UNROLLING, )) +# include BOOST_PP_ITERATE() + +// implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING +template< + BOOST_MPL_AUX_NTTP_DECL(long, N) + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct AUX778076_FOLD_IMPL_NAME +{ + typedef First iter0; + typedef State fwd_state0; + + BOOST_MPL_PP_REPEAT( + BOOST_MPL_LIMIT_UNROLLING + , AUX778076_ITER_FOLD_FORWARD_STEP + , unused + ) + + typedef AUX778076_FOLD_IMPL_NAME< + ( (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 : N - BOOST_MPL_LIMIT_UNROLLING ) + , BOOST_PP_CAT(iter,BOOST_MPL_LIMIT_UNROLLING) + , Last + , BOOST_PP_CAT(fwd_state,BOOST_MPL_LIMIT_UNROLLING) + , BackwardOp + , ForwardOp + > nested_chunk; + + AUX778076_FIRST_BACKWARD_STATE_TYPEDEF(BOOST_MPL_LIMIT_UNROLLING) + + BOOST_MPL_PP_REPEAT( + BOOST_MPL_LIMIT_UNROLLING + , AUX778076_ITER_FOLD_BACKWARD_STEP + , BOOST_MPL_LIMIT_UNROLLING + ) + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +// fallback implementation for sequences of unknown size +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct AUX778076_FOLD_IMPL_NAME<-1,First,Last,State,BackwardOp,ForwardOp> +{ + typedef AUX778076_FOLD_IMPL_NAME< + -1 + , typename mpl::next::type + , Last + , typename apply2::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , AUX778076_FOLD_IMPL_OP(First) + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct AUX778076_FOLD_IMPL_NAME<-1,Last,Last,State,BackwardOp,ForwardOp> +{ + typedef State state; + typedef Last iterator; +}; + +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +template< BOOST_MPL_AUX_NTTP_DECL(long, N) > +struct AUX778076_FOLD_CHUNK_NAME; + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_UNROLLING, )) +# include BOOST_PP_ITERATE() + +// implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING +template< BOOST_MPL_AUX_NTTP_DECL(long, N) > +struct AUX778076_FOLD_CHUNK_NAME +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + + BOOST_MPL_PP_REPEAT( + BOOST_MPL_LIMIT_UNROLLING + , AUX778076_ITER_FOLD_FORWARD_STEP + , unused + ) + + typedef AUX778076_FOLD_IMPL_NAME< + ( (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 : N - BOOST_MPL_LIMIT_UNROLLING ) + , BOOST_PP_CAT(iter,BOOST_MPL_LIMIT_UNROLLING) + , Last + , BOOST_PP_CAT(fwd_state,BOOST_MPL_LIMIT_UNROLLING) + , BackwardOp + , ForwardOp + > nested_chunk; + + AUX778076_FIRST_BACKWARD_STATE_TYPEDEF(BOOST_MPL_LIMIT_UNROLLING) + + BOOST_MPL_PP_REPEAT( + BOOST_MPL_LIMIT_UNROLLING + , AUX778076_ITER_FOLD_BACKWARD_STEP + , BOOST_MPL_LIMIT_UNROLLING + ) + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +// fallback implementation for sequences of unknown size +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step); + +template< + typename Last + , typename State + > +struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_null_step) +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct AUX778076_FOLD_CHUNK_NAME<-1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same::type + , BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_null_step) + , BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step) + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; + +#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) + /// ETI workaround + template<> struct result_ + { + typedef int state; + typedef int iterator; + }; +#endif +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step) +{ + typedef AUX778076_FOLD_CHUNK_NAME<-1>::template result_< + typename mpl::next::type + , Last + , typename apply2::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , AUX778076_FOLD_IMPL_OP(First) + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + BOOST_MPL_AUX_NTTP_DECL(long, N) + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct AUX778076_FOLD_IMPL_NAME + : AUX778076_FOLD_CHUNK_NAME + ::template result_ +{ +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +}}} + +# undef AUX778076_FIRST_BACKWARD_STATE_TYPEDEF +# undef AUX778076_ITER_FOLD_BACKWARD_STEP +# undef AUX778076_ITER_FOLD_BACKWARD_STEP_FUNC +# undef AUX778076_ITER_FOLD_FORWARD_STEP + +#undef AUX778076_FOLD_IMPL_OP +#undef AUX778076_FOLD_IMPL_NAME_PREFIX + +///// iteration + +#else + +# define n_ BOOST_PP_FRAME_ITERATION(1) + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct AUX778076_FOLD_IMPL_NAME +{ + typedef First iter0; + typedef State fwd_state0; + + BOOST_MPL_PP_REPEAT( + n_ + , AUX778076_ITER_FOLD_FORWARD_STEP + , unused + ) + + typedef BOOST_PP_CAT(fwd_state,n_) BOOST_PP_CAT(bkwd_state,n_); + + BOOST_MPL_PP_REPEAT( + n_ + , AUX778076_ITER_FOLD_BACKWARD_STEP + , n_ + ) + + typedef bkwd_state0 state; + typedef BOOST_PP_CAT(iter,n_) iterator; +}; + +#else + +template<> struct AUX778076_FOLD_CHUNK_NAME +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + + BOOST_MPL_PP_REPEAT( + n_ + , AUX778076_ITER_FOLD_FORWARD_STEP + , unused + ) + + typedef BOOST_PP_CAT(fwd_state,n_) BOOST_PP_CAT(bkwd_state,n_); + + BOOST_MPL_PP_REPEAT( + n_ + , AUX778076_ITER_FOLD_BACKWARD_STEP + , n_ + ) + + typedef bkwd_state0 state; + typedef BOOST_PP_CAT(iter,n_) iterator; + }; + +#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) + /// ETI workaround + template<> struct result_ + { + typedef int state; + typedef int iterator; + }; +#endif +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +# undef n_ + +#endif // BOOST_PP_IS_ITERATING diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/sequence_wrapper.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/sequence_wrapper.hpp new file mode 100644 index 0000000000..3f5e553039 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/sequence_wrapper.hpp @@ -0,0 +1,292 @@ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +// Copyright Aleksey Gurtovoy 2000-2008 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +# include +# include +# include + +# include +# include +# include +# include +# include +# include +# include +# include + +#if defined(BOOST_MPL_PREPROCESSING_MODE) +# undef LONG_MAX +#endif + +namespace boost { namespace mpl { + +#if !defined(AUX778076_SEQUENCE_BASE_NAME) +# define AUX778076_SEQUENCE_BASE_NAME AUX778076_SEQUENCE_NAME +#endif + +#if !defined(AUX778076_SEQUENCE_INTEGRAL_WRAPPER) + +# define AUX778076_SEQUENCE_PARAM_NAME T +# define AUX778076_SEQUENCE_TEMPLATE_PARAM typename T +# define AUX778076_SEQUENCE_DEFAULT na + +# define AUX778076_SEQUENCE_NAME_N(n) \ + BOOST_PP_CAT(AUX778076_SEQUENCE_BASE_NAME,n) \ + /**/ + +# define AUX778076_SEQUENCE_PARAMS() \ + BOOST_PP_ENUM_PARAMS( \ + AUX778076_SEQUENCE_LIMIT \ + , AUX778076_SEQUENCE_TEMPLATE_PARAM \ + ) \ + /**/ + +# define AUX778076_SEQUENCE_ARGS() \ + BOOST_PP_ENUM_PARAMS( \ + AUX778076_SEQUENCE_LIMIT \ + , T \ + ) \ + /**/ + +# define AUX778076_SEQUENCE_DEFAULT_PARAMS() \ + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( \ + AUX778076_SEQUENCE_LIMIT \ + , AUX778076_SEQUENCE_TEMPLATE_PARAM \ + , AUX778076_SEQUENCE_DEFAULT \ + ) \ + /**/ + +# define AUX778076_SEQUENCE_N_PARAMS(n) \ + BOOST_PP_ENUM_PARAMS(n, AUX778076_SEQUENCE_TEMPLATE_PARAM) \ + /**/ + +# define AUX778076_SEQUENCE_N_ARGS(n) \ + BOOST_PP_ENUM_PARAMS(n, T) \ + /**/ + +# define AUX778076_SEQUENCE_N_PARTIAL_SPEC_ARGS(n) \ + BOOST_PP_ENUM_PARAMS(n, T) \ + BOOST_PP_COMMA_IF(n) \ + BOOST_PP_ENUM( \ + BOOST_PP_SUB_D(1,AUX778076_SEQUENCE_LIMIT,n) \ + , BOOST_PP_TUPLE_ELEM_3_2 \ + , AUX778076_SEQUENCE_DEFAULT \ + ) \ + /**/ + +#else // AUX778076_SEQUENCE_INTEGRAL_WRAPPER + +# define AUX778076_SEQUENCE_PARAM_NAME C +# define AUX778076_SEQUENCE_TEMPLATE_PARAM BOOST_MPL_AUX_NTTP_DECL(long, C) +# define AUX778076_SEQUENCE_DEFAULT LONG_MAX + +# define AUX778076_SEQUENCE_PARAMS() \ + typename T, BOOST_PP_ENUM_PARAMS( \ + AUX778076_SEQUENCE_LIMIT \ + , AUX778076_SEQUENCE_TEMPLATE_PARAM \ + ) \ + /**/ + +# define AUX778076_SEQUENCE_ARGS() \ + T, BOOST_PP_ENUM_PARAMS( \ + AUX778076_SEQUENCE_LIMIT \ + , C \ + ) \ + /**/ + +# define AUX778076_SEQUENCE_DEFAULT_PARAMS() \ + typename T, \ + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( \ + AUX778076_SEQUENCE_LIMIT \ + , AUX778076_SEQUENCE_TEMPLATE_PARAM \ + , AUX778076_SEQUENCE_DEFAULT \ + ) \ + /**/ + +# define AUX778076_SEQUENCE_N_PARAMS(n) \ + typename T BOOST_PP_COMMA_IF(n) \ + BOOST_PP_ENUM_PARAMS(n, AUX778076_SEQUENCE_TEMPLATE_PARAM) \ + /**/ + +# if !defined(AUX778076_SEQUENCE_CONVERT_CN_TO) +# define AUX778076_SEQUENCE_CONVERT_CN_TO(z,n,TARGET) BOOST_PP_CAT(C,n) +# endif + +# define AUX778076_SEQUENCE_N_ARGS(n) \ + T BOOST_PP_COMMA_IF(n) \ + BOOST_PP_ENUM(n,AUX778076_SEQUENCE_CONVERT_CN_TO,T) \ + /**/ + +# define AUX778076_SEQUENCE_N_PARTIAL_SPEC_ARGS(n) \ + T, BOOST_PP_ENUM_PARAMS(n, C) \ + BOOST_PP_COMMA_IF(n) \ + BOOST_PP_ENUM( \ + BOOST_PP_SUB_D(1,AUX778076_SEQUENCE_LIMIT,n) \ + , BOOST_PP_TUPLE_ELEM_3_2 \ + , AUX778076_SEQUENCE_DEFAULT \ + ) \ + /**/ + +#endif // AUX778076_SEQUENCE_INTEGRAL_WRAPPER + + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +// forward declaration +template< + AUX778076_SEQUENCE_DEFAULT_PARAMS() + > +struct AUX778076_SEQUENCE_NAME; +#else +namespace aux { +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > +struct BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_chooser); +} +#endif + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, AUX778076_SEQUENCE_LIMIT, )) +#include BOOST_PP_ITERATE() + +// real C++ version is already taken care of +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +namespace aux { +// ???_count_args +#define AUX778076_COUNT_ARGS_PREFIX AUX778076_SEQUENCE_NAME +#define AUX778076_COUNT_ARGS_DEFAULT AUX778076_SEQUENCE_DEFAULT +#define AUX778076_COUNT_ARGS_PARAM_NAME AUX778076_SEQUENCE_PARAM_NAME +#define AUX778076_COUNT_ARGS_TEMPLATE_PARAM AUX778076_SEQUENCE_TEMPLATE_PARAM +#define AUX778076_COUNT_ARGS_ARITY AUX778076_SEQUENCE_LIMIT +#define AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES +#include + +template< + AUX778076_SEQUENCE_PARAMS() + > +struct BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_impl) +{ + typedef aux::BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_count_args)< + BOOST_PP_ENUM_PARAMS(AUX778076_SEQUENCE_LIMIT, AUX778076_SEQUENCE_PARAM_NAME) + > arg_num_; + + typedef typename aux::BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_chooser)< arg_num_::value > + ::template result_< AUX778076_SEQUENCE_ARGS() >::type type; +}; + +} // namespace aux + +template< + AUX778076_SEQUENCE_DEFAULT_PARAMS() + > +struct AUX778076_SEQUENCE_NAME + : aux::BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_impl)< + AUX778076_SEQUENCE_ARGS() + >::type +{ + typedef typename aux::BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_impl)< + AUX778076_SEQUENCE_ARGS() + >::type type; +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +# undef AUX778076_SEQUENCE_N_PARTIAL_SPEC_ARGS +# undef AUX778076_SEQUENCE_N_ARGS +# undef AUX778076_SEQUENCE_CONVERT_CN_TO +# undef AUX778076_SEQUENCE_N_PARAMS +# undef AUX778076_SEQUENCE_DEFAULT_PARAMS +# undef AUX778076_SEQUENCE_ARGS +# undef AUX778076_SEQUENCE_PARAMS +# undef AUX778076_SEQUENCE_NAME_N +# undef AUX778076_SEQUENCE_DEFAULT +# undef AUX778076_SEQUENCE_TEMPLATE_PARAM +# undef AUX778076_SEQUENCE_PARAM_NAME +# undef AUX778076_SEQUENCE_LIMIT +# undef AUX778076_SEQUENCE_BASE_NAME +# undef AUX778076_SEQUENCE_NAME +# undef AUX778076_SEQUENCE_INTEGRAL_WRAPPER + +}} + +///// iteration + +#else +#define i_ BOOST_PP_FRAME_ITERATION(1) + +# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +#if i_ == AUX778076_SEQUENCE_LIMIT + +/// primary template (not a specialization!) +template< + AUX778076_SEQUENCE_N_PARAMS(i_) + > +struct AUX778076_SEQUENCE_NAME + : AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) > +{ + typedef typename AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) >::type type; +}; + +#else + +template< + AUX778076_SEQUENCE_N_PARAMS(i_) + > +struct AUX778076_SEQUENCE_NAME< AUX778076_SEQUENCE_N_PARTIAL_SPEC_ARGS(i_) > + : AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) > +{ +#if i_ > 0 || defined(AUX778076_SEQUENCE_INTEGRAL_WRAPPER) + typedef typename AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) >::type type; +#else + typedef AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) >::type type; +#endif +}; + +#endif // i_ == AUX778076_SEQUENCE_LIMIT + +# else + +namespace aux { + +template<> +struct BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_chooser) +{ + template< + AUX778076_SEQUENCE_PARAMS() + > + struct result_ + { +#if i_ > 0 || defined(AUX778076_SEQUENCE_INTEGRAL_WRAPPER) + typedef typename AUX778076_SEQUENCE_NAME_N(i_)< + AUX778076_SEQUENCE_N_ARGS(i_) + >::type type; +#else + typedef AUX778076_SEQUENCE_NAME_N(i_)< + AUX778076_SEQUENCE_N_ARGS(i_) + >::type type; +#endif + }; +}; + +} // namespace aux + +# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#undef i_ +#endif // BOOST_PP_IS_ITERATING diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/size_impl.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/size_impl.hpp new file mode 100644 index 0000000000..50f5ee9189 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/size_impl.hpp @@ -0,0 +1,52 @@ + +#ifndef BOOST_MPL_AUX_SIZE_IMPL_HPP_INCLUDED +#define BOOST_MPL_AUX_SIZE_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +// default implementation; conrete sequences might override it by +// specializing either the 'size_impl' or the primary 'size' template + +template< typename Tag > +struct size_impl +{ + template< typename Sequence > struct apply +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) + : distance< + typename begin::type + , typename end::type + > + { +#else + { + typedef typename distance< + typename begin::type + , typename end::type + >::type type; +#endif + }; +}; + +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, size_impl) + +}} + +#endif // BOOST_MPL_AUX_SIZE_IMPL_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/static_cast.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/static_cast.hpp new file mode 100644 index 0000000000..f72d1c7c9b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/static_cast.hpp @@ -0,0 +1,27 @@ + +#ifndef BOOST_MPL_AUX_STATIC_CAST_HPP_INCLUDED +#define BOOST_MPL_AUX_STATIC_CAST_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \ + || BOOST_WORKAROUND(__GNUC__, < 3) \ + || BOOST_WORKAROUND(__MWERKS__, <= 0x3001) +# define BOOST_MPL_AUX_STATIC_CAST(T, expr) (T)(expr) +#else +# define BOOST_MPL_AUX_STATIC_CAST(T, expr) static_cast(expr) +#endif + +#endif // BOOST_MPL_AUX_STATIC_CAST_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/template_arity.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/template_arity.hpp new file mode 100644 index 0000000000..f011159825 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/template_arity.hpp @@ -0,0 +1,189 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED +#define BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) +# if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) +# include +# endif +# else +# include +# endif +#endif + +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER template_arity.hpp +# include + +#else + +# if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) +# if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) + +# include +# include +# include +# include +# include + +# include +# include +# include +# include +# include + +# define AUX778076_ARITY BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) + +namespace boost { namespace mpl { namespace aux { + +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct arity_tag +{ + typedef char (&type)[N + 1]; +}; + +# define AUX778076_MAX_ARITY_OP(unused, state, i_) \ + ( BOOST_PP_CAT(C,i_) > 0 ? BOOST_PP_CAT(C,i_) : state ) \ +/**/ + +template< + BOOST_MPL_PP_PARAMS(AUX778076_ARITY, BOOST_MPL_AUX_NTTP_DECL(int, C)) + > +struct max_arity +{ + BOOST_STATIC_CONSTANT(int, value = + BOOST_PP_SEQ_FOLD_LEFT( + AUX778076_MAX_ARITY_OP + , -1 + , BOOST_MPL_PP_RANGE(1, AUX778076_ARITY) + ) + ); +}; + +# undef AUX778076_MAX_ARITY_OP + +arity_tag<0>::type arity_helper(...); + +# define BOOST_PP_ITERATION_LIMITS (1, AUX778076_ARITY) +# define BOOST_PP_FILENAME_1 +# include BOOST_PP_ITERATE() + +template< typename F, BOOST_MPL_AUX_NTTP_DECL(int, N) > +struct template_arity_impl +{ + BOOST_STATIC_CONSTANT(int, value = + sizeof(::boost::mpl::aux::arity_helper(type_wrapper(),arity_tag())) - 1 + ); +}; + +# define AUX778076_TEMPLATE_ARITY_IMPL_INVOCATION(unused, i_, F) \ + BOOST_PP_COMMA_IF(i_) template_arity_impl::value \ +/**/ + +template< typename F > +struct template_arity +{ + BOOST_STATIC_CONSTANT(int, value = ( + max_arity< BOOST_MPL_PP_REPEAT( + AUX778076_ARITY + , AUX778076_TEMPLATE_ARITY_IMPL_INVOCATION + , F + ) >::value + )); + + typedef mpl::int_ type; +}; + +# undef AUX778076_TEMPLATE_ARITY_IMPL_INVOCATION + +# undef AUX778076_ARITY + +}}} + +# endif // BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING +# else // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT + +# include + +namespace boost { namespace mpl { namespace aux { + +template< bool > +struct template_arity_impl +{ + template< typename F > struct result_ + : mpl::int_<-1> + { + }; +}; + +template<> +struct template_arity_impl +{ + template< typename F > struct result_ + : F::arity + { + }; +}; + +template< typename F > +struct template_arity + : template_arity_impl< ::boost::mpl::aux::has_rebind::value > + ::template result_ +{ +}; + +#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) +template<> +struct template_arity + : mpl::int_<-1> +{ +}; +#endif + +}}} + +# endif // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED + +///// iteration + +#else +#define i_ BOOST_PP_FRAME_ITERATION(1) + +template< + template< BOOST_MPL_PP_PARAMS(i_, typename P) > class F + , BOOST_MPL_PP_PARAMS(i_, typename T) + > +typename arity_tag::type +arity_helper(type_wrapper< F >, arity_tag); + +#undef i_ +#endif // BOOST_PP_IS_ITERATING diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/template_arity_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/template_arity_fwd.hpp new file mode 100644 index 0000000000..19d63a3961 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/template_arity_fwd.hpp @@ -0,0 +1,23 @@ + +#ifndef BOOST_MPL_AUX_TEMPLATE_ARITY_FWD_HPP_INCLUDED +#define BOOST_MPL_AUX_TEMPLATE_ARITY_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { namespace aux { + +template< typename F > struct template_arity; + +}}} + +#endif // BOOST_MPL_AUX_TEMPLATE_ARITY_FWD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/traits_lambda_spec.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/traits_lambda_spec.hpp new file mode 100644 index 0000000000..4a7ff26b58 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/traits_lambda_spec.hpp @@ -0,0 +1,63 @@ + +#ifndef BOOST_MPL_AUX_TRAITS_LAMBDA_SPEC_HPP_INCLUDED +#define BOOST_MPL_AUX_TRAITS_LAMBDA_SPEC_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2008 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) + +# define BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(i, trait) /**/ + +#elif !defined(BOOST_MPL_CFG_MSVC_ETI_BUG) + +# define BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(i, trait) \ +template<> struct trait \ +{ \ + template< BOOST_MPL_PP_PARAMS(i, typename T) > struct apply \ + { \ + }; \ +}; \ +/**/ + +#else + +# define BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(i, trait) \ +template<> struct trait \ +{ \ + template< BOOST_MPL_PP_PARAMS(i, typename T) > struct apply \ + { \ + }; \ +}; \ +template<> struct trait \ +{ \ + template< BOOST_MPL_PP_PARAMS(i, typename T) > struct apply \ + { \ + typedef int type; \ + }; \ +}; \ +/**/ + +#endif // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT + + +#define BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(i, trait) \ + BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(i, trait) \ + template<> struct trait {}; \ +/**/ + +#endif // BOOST_MPL_AUX_TRAITS_LAMBDA_SPEC_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/type_wrapper.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/type_wrapper.hpp new file mode 100644 index 0000000000..f3ac3079a9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/type_wrapper.hpp @@ -0,0 +1,47 @@ + +#ifndef BOOST_MPL_AUX_TYPE_WRAPPER_HPP_INCLUDED +#define BOOST_MPL_AUX_TYPE_WRAPPER_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Peter Dimov 2000-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +namespace boost { namespace mpl { namespace aux { + +template< typename T > struct type_wrapper +{ + typedef T type; +}; + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +// agurt 08/may/03: a complicated way to extract the wrapped type; need it +// mostly for the sake of GCC (3.2.x), which ICEs if you try to extract the +// nested 'type' from 'type_wrapper' when the latter was the result of a +// 'typeof' expression +template< typename T > struct wrapped_type; + +template< typename T > struct wrapped_type< type_wrapper > +{ + typedef T type; +}; +#else +template< typename W > struct wrapped_type +{ + typedef typename W::type type; +}; +#endif + +}}} + +#endif // BOOST_MPL_AUX_TYPE_WRAPPER_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/unwrap.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/unwrap.hpp new file mode 100644 index 0000000000..caeb97d7d3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/unwrap.hpp @@ -0,0 +1,51 @@ + +#ifndef BOOST_MPL_AUX_UNWRAP_HPP_INCLUDED +#define BOOST_MPL_AUX_UNWRAP_HPP_INCLUDED + +// Copyright Peter Dimov and Multi Media Ltd 2001, 2002 +// Copyright David Abrahams 2001 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +namespace boost { namespace mpl { namespace aux { + +template< typename F > +BOOST_MPL_CFG_GPU_ENABLED +inline +F& unwrap(F& f, long) +{ + return f; +} + +template< typename F > +BOOST_MPL_CFG_GPU_ENABLED +inline +F& +unwrap(reference_wrapper& f, int) +{ + return f; +} + +template< typename F > +BOOST_MPL_CFG_GPU_ENABLED +inline +F& +unwrap(reference_wrapper const& f, int) +{ + return f; +} + +}}} + +#endif // BOOST_MPL_AUX_UNWRAP_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/value_wknd.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/value_wknd.hpp new file mode 100644 index 0000000000..23fefde021 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/value_wknd.hpp @@ -0,0 +1,89 @@ + +#ifndef BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED +#define BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include + +#if defined(BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS) \ + || defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) + +# include + +namespace boost { namespace mpl { namespace aux { +template< typename C_ > struct value_wknd + : C_ +{ +}; + +#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) +template<> struct value_wknd + : int_<1> +{ + using int_<1>::value; +}; +#endif +}}} + + +#if !defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) +# define BOOST_MPL_AUX_VALUE_WKND(C) \ + ::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::aux::value_wknd< C > \ +/**/ +# define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) BOOST_MPL_AUX_VALUE_WKND(C) +#else +# define BOOST_MPL_AUX_VALUE_WKND(C) C +# define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) \ + ::boost::mpl::aux::value_wknd< C > \ +/**/ +#endif + +#else // BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS + +# define BOOST_MPL_AUX_VALUE_WKND(C) C +# define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) C + +#endif + +#if BOOST_WORKAROUND(__EDG_VERSION__, <= 238) +# define BOOST_MPL_AUX_NESTED_VALUE_WKND(T, C) \ + BOOST_MPL_AUX_STATIC_CAST(T, C::value) \ +/**/ +#else +# define BOOST_MPL_AUX_NESTED_VALUE_WKND(T, C) \ + BOOST_MPL_AUX_VALUE_WKND(C)::value \ +/**/ +#endif + + +namespace boost { namespace mpl { namespace aux { + +template< typename T > struct value_type_wknd +{ + typedef typename T::value_type type; +}; + +#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) +template<> struct value_type_wknd +{ + typedef int type; +}; +#endif + +}}} + +#endif // BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/aux_/yes_no.hpp b/ThirdParty/boost-Subset/boost/mpl/aux_/yes_no.hpp new file mode 100644 index 0000000000..21a18a21c2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/aux_/yes_no.hpp @@ -0,0 +1,58 @@ + +#ifndef BOOST_MPL_AUX_YES_NO_HPP_INCLUDED +#define BOOST_MPL_AUX_YES_NO_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include + + +namespace boost { namespace mpl { namespace aux { + +typedef char (&no_tag)[1]; +typedef char (&yes_tag)[2]; + +template< bool C_ > struct yes_no_tag +{ + typedef no_tag type; +}; + +template<> struct yes_no_tag +{ + typedef yes_tag type; +}; + + +template< BOOST_MPL_AUX_NTTP_DECL(long, n) > struct weighted_tag +{ +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) + typedef char (&type)[n]; +#else + char buf[n]; + typedef weighted_tag type; +#endif +}; + +#if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES) +template<> struct weighted_tag<0> +{ + typedef char (&type)[1]; +}; +#endif + +}}} + +#endif // BOOST_MPL_AUX_YES_NO_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/back_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/back_fwd.hpp new file mode 100644 index 0000000000..119722c31a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/back_fwd.hpp @@ -0,0 +1,24 @@ + +#ifndef BOOST_MPL_BACK_FWD_HPP_INCLUDED +#define BOOST_MPL_BACK_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct back_impl; +template< typename Sequence > struct back; + +}} + +#endif // BOOST_MPL_BACK_FWD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/back_inserter.hpp b/ThirdParty/boost-Subset/boost/mpl/back_inserter.hpp new file mode 100644 index 0000000000..8fc4083c3a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/back_inserter.hpp @@ -0,0 +1,34 @@ + +#ifndef BOOST_MPL_BACK_INSERTER_HPP_INCLUDED +#define BOOST_MPL_BACK_INSERTER_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright David Abrahams 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +namespace boost { +namespace mpl { + +template< + typename Sequence + > +struct back_inserter + : inserter< Sequence,push_back<> > +{ +}; + +}} + +#endif // BOOST_MPL_BACK_INSERTER_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/begin_end.hpp b/ThirdParty/boost-Subset/boost/mpl/begin_end.hpp new file mode 100644 index 0000000000..b7074afd20 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/begin_end.hpp @@ -0,0 +1,57 @@ + +#ifndef BOOST_MPL_BEGIN_END_HPP_INCLUDED +#define BOOST_MPL_BEGIN_END_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +// agurt, 13/sep/02: switched from inheritance to typedef; MSVC is more +// happy this way (less ETI-related errors), and it doesn't affect +// anything else +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + > +struct begin +{ + typedef typename sequence_tag::type tag_; + typedef typename begin_impl< tag_ > + ::template apply< Sequence >::type type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,begin,(Sequence)) +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + > +struct end +{ + typedef typename sequence_tag::type tag_; + typedef typename end_impl< tag_ > + ::template apply< Sequence >::type type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,end,(Sequence)) +}; + +BOOST_MPL_AUX_NA_SPEC(1, begin) +BOOST_MPL_AUX_NA_SPEC(1, end) + +}} + +#endif // BOOST_MPL_BEGIN_END_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/begin_end_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/begin_end_fwd.hpp new file mode 100644 index 0000000000..70ef9efec4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/begin_end_fwd.hpp @@ -0,0 +1,27 @@ + +#ifndef BOOST_MPL_BEGIN_END_FWD_HPP_INCLUDED +#define BOOST_MPL_BEGIN_END_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct begin_impl; +template< typename Tag > struct end_impl; + +template< typename Sequence > struct begin; +template< typename Sequence > struct end; + +}} + +#endif // BOOST_MPL_BEGIN_END_FWD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/bind.hpp b/ThirdParty/boost-Subset/boost/mpl/bind.hpp new file mode 100644 index 0000000000..63ee3f27e2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/bind.hpp @@ -0,0 +1,551 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_BIND_HPP_INCLUDED +#define BOOST_MPL_BIND_HPP_INCLUDED + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +# include +# endif +#endif + +#include +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# if defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) +# define BOOST_MPL_PREPROCESSED_HEADER basic_bind.hpp +# else +# define BOOST_MPL_PREPROCESSED_HEADER bind.hpp +# endif +# include + +#else + +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include + +# include +# include +# include +# include + +namespace boost { namespace mpl { + +// local macros, #undef-ined at the end of the header +# define AUX778076_APPLY \ + BOOST_PP_CAT(apply_wrap,BOOST_MPL_LIMIT_METAFUNCTION_ARITY) \ + /**/ + +# if defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) +# define AUX778076_DMC_PARAM() , int dummy_ +# else +# define AUX778076_DMC_PARAM() +# endif + +# define AUX778076_BIND_PARAMS(param) \ + BOOST_MPL_PP_PARAMS( \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ + , param \ + ) \ + /**/ + +# define AUX778076_BIND_DEFAULT_PARAMS(param, value) \ + BOOST_MPL_PP_DEFAULT_PARAMS( \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ + , param \ + , value \ + ) \ + /**/ + +# define AUX778076_BIND_N_PARAMS(n, param) \ + BOOST_PP_COMMA_IF(n) BOOST_MPL_PP_PARAMS(n, param) \ + /**/ + +# define AUX778076_BIND_N_SPEC_PARAMS(n, param, def) \ + BOOST_PP_COMMA_IF(n) \ + BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \ + /**/ + +#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +# define AUX778076_BIND_NESTED_DEFAULT_PARAMS(param, value) \ + AUX778076_BIND_DEFAULT_PARAMS(param, value) \ + /**/ +#else +# define AUX778076_BIND_NESTED_DEFAULT_PARAMS(param, value) \ + AUX778076_BIND_PARAMS(param) \ + /**/ +#endif + +namespace aux { + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< + typename T, AUX778076_BIND_PARAMS(typename U) + > +struct resolve_bind_arg +{ + typedef T type; +}; + +# if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) + +template< + typename T + , typename Arg + > +struct replace_unnamed_arg +{ + typedef Arg next; + typedef T type; +}; + +template< + typename Arg + > +struct replace_unnamed_arg< arg<-1>,Arg > +{ + typedef typename Arg::next next; + typedef Arg type; +}; + +# endif // BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT + +template< + BOOST_MPL_AUX_NTTP_DECL(int, N), AUX778076_BIND_PARAMS(typename U) + > +struct resolve_bind_arg< arg,AUX778076_BIND_PARAMS(U) > +{ + typedef typename AUX778076_APPLY, AUX778076_BIND_PARAMS(U)>::type type; +}; + +#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) +template< + typename F, AUX778076_BIND_PARAMS(typename T), AUX778076_BIND_PARAMS(typename U) + > +struct resolve_bind_arg< bind,AUX778076_BIND_PARAMS(U) > +{ + typedef bind f_; + typedef typename AUX778076_APPLY::type type; +}; +#endif + +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +// agurt, 15/jan/02: it's not a intended to be used as a function class, and +// MSVC6.5 has problems with 'apply' name here (the code compiles, but doesn't +// work), so I went with the 'result_' here, and in all other similar cases +template< bool > +struct resolve_arg_impl +{ + template< typename T, AUX778076_BIND_PARAMS(typename U) > struct result_ + { + typedef T type; + }; +}; + +template<> +struct resolve_arg_impl +{ + template< typename T, AUX778076_BIND_PARAMS(typename U) > struct result_ + { + typedef typename AUX778076_APPLY< + T + , AUX778076_BIND_PARAMS(U) + >::type type; + }; +}; + +// for 'resolve_bind_arg' +template< typename T > struct is_bind_template; + +template< + typename T, AUX778076_BIND_PARAMS(typename U) + > +struct resolve_bind_arg + : resolve_arg_impl< is_bind_template::value > + ::template result_< T,AUX778076_BIND_PARAMS(U) > +{ +}; + +# if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) + +template< typename T > +struct replace_unnamed_arg_impl +{ + template< typename Arg > struct result_ + { + typedef Arg next; + typedef T type; + }; +}; + +template<> +struct replace_unnamed_arg_impl< arg<-1> > +{ + template< typename Arg > struct result_ + { + typedef typename next::type next; + typedef Arg type; + }; +}; + +template< typename T, typename Arg > +struct replace_unnamed_arg + : replace_unnamed_arg_impl::template result_ +{ +}; + +# endif // BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT + +// agurt, 10/mar/02: the forward declaration has to appear before any of +// 'is_bind_helper' overloads, otherwise MSVC6.5 issues an ICE on it +template< BOOST_MPL_AUX_NTTP_DECL(int, arity_) > struct bind_chooser; + +aux::no_tag is_bind_helper(...); +template< typename T > aux::no_tag is_bind_helper(protect*); + +// overload for "main" form +// agurt, 15/mar/02: MSVC 6.5 fails to properly resolve the overload +// in case if we use 'aux::type_wrapper< bind<...> >' here, and all +// 'bind' instantiations form a complete type anyway +#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) +template< + typename F, AUX778076_BIND_PARAMS(typename T) + > +aux::yes_tag is_bind_helper(bind*); +#endif + +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > +aux::yes_tag is_bind_helper(arg*); + +template< bool is_ref_ = true > +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = false); + }; +}; + +template<> +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = + sizeof(aux::is_bind_helper(static_cast(0))) + == sizeof(aux::yes_tag) + ); + }; +}; + +template< typename T > struct is_bind_template + : is_bind_template_impl< ::boost::detail::is_reference_impl::value > + ::template result_ +{ +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +} // namespace aux + + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) +#include BOOST_PP_ITERATE() + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) +/// if_/eval_if specializations +# define AUX778076_SPEC_NAME if_ +# define BOOST_PP_ITERATION_PARAMS_1 (3,(3, 3, )) +# include BOOST_PP_ITERATE() + +#if !defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) +# define AUX778076_SPEC_NAME eval_if +# define BOOST_PP_ITERATION_PARAMS_1 (3,(3, 3, )) +# include BOOST_PP_ITERATE() +#endif +#endif + +// real C++ version is already taken care of +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) + +namespace aux { +// apply_count_args +#define AUX778076_COUNT_ARGS_PREFIX bind +#define AUX778076_COUNT_ARGS_DEFAULT na +#define AUX778076_COUNT_ARGS_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY +#include +} + +// bind +template< + typename F, AUX778076_BIND_PARAMS(typename T) AUX778076_DMC_PARAM() + > +struct bind + : aux::bind_chooser< + aux::bind_count_args::value + >::template result_< F,AUX778076_BIND_PARAMS(T) >::type +{ +}; + +BOOST_MPL_AUX_ARITY_SPEC( + BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) + , bind + ) + +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC( + BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) + , bind + ) + + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +# undef AUX778076_BIND_NESTED_DEFAULT_PARAMS +# undef AUX778076_BIND_N_SPEC_PARAMS +# undef AUX778076_BIND_N_PARAMS +# undef AUX778076_BIND_DEFAULT_PARAMS +# undef AUX778076_BIND_PARAMS +# undef AUX778076_DMC_PARAM +# undef AUX778076_APPLY + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_BIND_HPP_INCLUDED + +///// iteration, depth == 1 + +// For gcc 4.4 compatability, we must include the +// BOOST_PP_ITERATION_DEPTH test inside an #else clause. +#else // BOOST_PP_IS_ITERATING +#if BOOST_PP_ITERATION_DEPTH() == 1 + +# define i_ BOOST_PP_FRAME_ITERATION(1) + +#if defined(AUX778076_SPEC_NAME) + +// lazy metafunction specialization +template< template< BOOST_MPL_PP_PARAMS(i_, typename T) > class F, typename Tag > +struct BOOST_PP_CAT(quote,i_); + +template< BOOST_MPL_PP_PARAMS(i_, typename T) > struct AUX778076_SPEC_NAME; + +template< + typename Tag AUX778076_BIND_N_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(bind,i_)< + BOOST_PP_CAT(quote,i_) + AUX778076_BIND_N_PARAMS(i_,T) + > +{ + template< + AUX778076_BIND_NESTED_DEFAULT_PARAMS(typename U, na) + > + struct apply + { + private: + typedef mpl::arg<1> n1; +# define BOOST_PP_ITERATION_PARAMS_2 (3,(1, i_, )) +# include BOOST_PP_ITERATE() + + typedef typename AUX778076_SPEC_NAME< + typename t1::type + , BOOST_MPL_PP_EXT_PARAMS(2, BOOST_PP_INC(i_), t) + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +#undef AUX778076_SPEC_NAME + +#else // AUX778076_SPEC_NAME + +template< + typename F AUX778076_BIND_N_PARAMS(i_, typename T) AUX778076_DMC_PARAM() + > +struct BOOST_PP_CAT(bind,i_) +{ + template< + AUX778076_BIND_NESTED_DEFAULT_PARAMS(typename U, na) + > + struct apply + { + private: +# if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) + + typedef aux::replace_unnamed_arg< F,mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg::type f_; + /// +# else + typedef typename aux::resolve_bind_arg::type f_; + +# endif // BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT + +# if i_ > 0 +# define BOOST_PP_ITERATION_PARAMS_2 (3,(1, i_, )) +# include BOOST_PP_ITERATE() +# endif + + public: + +# define AUX778076_ARG(unused, i_, t) \ + BOOST_PP_COMMA_IF(i_) \ + typename BOOST_PP_CAT(t,BOOST_PP_INC(i_))::type \ +/**/ + + typedef typename BOOST_PP_CAT(apply_wrap,i_)< + f_ + BOOST_PP_COMMA_IF(i_) BOOST_MPL_PP_REPEAT(i_, AUX778076_ARG, t) + >::type type; + +# undef AUX778076_ARG + }; +}; + +namespace aux { + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< + typename F AUX778076_BIND_N_PARAMS(i_, typename T), AUX778076_BIND_PARAMS(typename U) + > +struct resolve_bind_arg< + BOOST_PP_CAT(bind,i_),AUX778076_BIND_PARAMS(U) + > +{ + typedef BOOST_PP_CAT(bind,i_) f_; + typedef typename AUX778076_APPLY::type type; +}; + +#else + +template< + typename F AUX778076_BIND_N_PARAMS(i_, typename T) + > +aux::yes_tag +is_bind_helper(BOOST_PP_CAT(bind,i_)*); + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(BOOST_PP_INC(i_), BOOST_PP_CAT(bind,i_)) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(BOOST_PP_INC(i_), BOOST_PP_CAT(bind,i_)) + +# if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) +# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +#if i_ == BOOST_MPL_LIMIT_METAFUNCTION_ARITY +/// primary template (not a specialization!) +template< + typename F AUX778076_BIND_N_PARAMS(i_, typename T) AUX778076_DMC_PARAM() + > +struct bind + : BOOST_PP_CAT(bind,i_) +{ +}; +#else +template< + typename F AUX778076_BIND_N_PARAMS(i_, typename T) AUX778076_DMC_PARAM() + > +struct bind< F AUX778076_BIND_N_SPEC_PARAMS(i_, T, na) > + : BOOST_PP_CAT(bind,i_) +{ +}; +#endif + +# else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +namespace aux { + +template<> +struct bind_chooser +{ + template< + typename F, AUX778076_BIND_PARAMS(typename T) + > + struct result_ + { + typedef BOOST_PP_CAT(bind,i_)< F AUX778076_BIND_N_PARAMS(i_,T) > type; + }; +}; + +} // namespace aux + +# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +# endif // BOOST_MPL_CFG_NO_BIND_TEMPLATE + +#endif // AUX778076_SPEC_NAME + +# undef i_ + +///// iteration, depth == 2 + +#elif BOOST_PP_ITERATION_DEPTH() == 2 + +# define j_ BOOST_PP_FRAME_ITERATION(2) +# if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) + + typedef aux::replace_unnamed_arg< BOOST_PP_CAT(T,j_),BOOST_PP_CAT(n,j_) > BOOST_PP_CAT(r,j_); + typedef typename BOOST_PP_CAT(r,j_)::type BOOST_PP_CAT(a,j_); + typedef typename BOOST_PP_CAT(r,j_)::next BOOST_PP_CAT(n,BOOST_PP_INC(j_)); + typedef aux::resolve_bind_arg BOOST_PP_CAT(t,j_); + /// +# else + typedef aux::resolve_bind_arg< BOOST_PP_CAT(T,j_),AUX778076_BIND_PARAMS(U)> BOOST_PP_CAT(t,j_); + +# endif +# undef j_ + +#endif // BOOST_PP_ITERATION_DEPTH() +#endif // BOOST_PP_IS_ITERATING diff --git a/ThirdParty/boost-Subset/boost/mpl/bind_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/bind_fwd.hpp new file mode 100644 index 0000000000..4746edd60b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/bind_fwd.hpp @@ -0,0 +1,99 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_BIND_FWD_HPP_INCLUDED +#define BOOST_MPL_BIND_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +#endif + +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER bind_fwd.hpp +# include + +#else + +# include +# include +# include +# include + +# include +# include +# include + +namespace boost { namespace mpl { + +// local macros, #undef-ined at the end of the header + +# if defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) +# define AUX778076_DMC_PARAM() , int dummy_ = 0 +# else +# define AUX778076_DMC_PARAM() +# endif + +# define AUX778076_BIND_DEFAULT_PARAMS(param, value) \ + BOOST_MPL_PP_DEFAULT_PARAMS( \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ + , param \ + , value \ + ) \ + AUX778076_DMC_PARAM() \ + /**/ + +# define AUX778076_BIND_N_PARAMS(n, param) \ + BOOST_PP_COMMA_IF(n) BOOST_MPL_PP_PARAMS(n, param) \ + AUX778076_DMC_PARAM() \ + /**/ + +#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) +template< + typename F, AUX778076_BIND_DEFAULT_PARAMS(typename T, na) + > +struct bind; +#endif + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) +#include BOOST_PP_ITERATE() + +# undef AUX778076_BIND_N_PARAMS +# undef AUX778076_BIND_DEFAULT_PARAMS +# undef AUX778076_DMC_PARAM +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_BIND_FWD_HPP_INCLUDED + +///// iteration + +#else +#define i_ BOOST_PP_FRAME_ITERATION(1) + +template< + typename F AUX778076_BIND_N_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(bind,i_); + +#undef i_ +#endif // BOOST_PP_IS_ITERATING diff --git a/ThirdParty/boost-Subset/boost/mpl/bool.hpp b/ThirdParty/boost-Subset/boost/mpl/bool.hpp new file mode 100644 index 0000000000..0a6180cedf --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/bool.hpp @@ -0,0 +1,39 @@ + +#ifndef BOOST_MPL_BOOL_HPP_INCLUDED +#define BOOST_MPL_BOOL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +template< bool C_ > struct bool_ +{ + BOOST_STATIC_CONSTANT(bool, value = C_); + typedef integral_c_tag tag; + typedef bool_ type; + typedef bool value_type; + BOOST_CONSTEXPR operator bool() const { return this->value; } +}; + +#if !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) +template< bool C_ > +bool const bool_::value; +#endif + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +#endif // BOOST_MPL_BOOL_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/bool_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/bool_fwd.hpp new file mode 100644 index 0000000000..e629252848 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/bool_fwd.hpp @@ -0,0 +1,33 @@ + +#ifndef BOOST_MPL_BOOL_FWD_HPP_INCLUDED +#define BOOST_MPL_BOOL_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +template< bool C_ > struct bool_; + +// shorcuts +typedef bool_ true_; +typedef bool_ false_; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +BOOST_MPL_AUX_ADL_BARRIER_DECL(bool_) +BOOST_MPL_AUX_ADL_BARRIER_DECL(true_) +BOOST_MPL_AUX_ADL_BARRIER_DECL(false_) + +#endif // BOOST_MPL_BOOL_FWD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/clear.hpp b/ThirdParty/boost-Subset/boost/mpl/clear.hpp new file mode 100644 index 0000000000..c6b95edf4b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/clear.hpp @@ -0,0 +1,39 @@ + +#ifndef BOOST_MPL_CLEAR_HPP_INCLUDED +#define BOOST_MPL_CLEAR_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + > +struct clear + : clear_impl< typename sequence_tag::type > + ::template apply< Sequence > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,clear,(Sequence)) +}; + +BOOST_MPL_AUX_NA_SPEC(1, clear) + +}} + +#endif // BOOST_MPL_CLEAR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/clear_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/clear_fwd.hpp new file mode 100644 index 0000000000..d14a1d2b24 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/clear_fwd.hpp @@ -0,0 +1,24 @@ + +#ifndef BOOST_MPL_CLEAR_FWD_HPP_INCLUDED +#define BOOST_MPL_CLEAR_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct clear_impl; +template< typename Sequence > struct clear; + +}} + +#endif // BOOST_MPL_CLEAR_FWD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/comparison.hpp b/ThirdParty/boost-Subset/boost/mpl/comparison.hpp new file mode 100644 index 0000000000..99dca9dd80 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/comparison.hpp @@ -0,0 +1,24 @@ + +#ifndef BOOST_MPL_COMPARISON_HPP_INCLUDED +#define BOOST_MPL_COMPARISON_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include + +#endif // BOOST_MPL_COMPARISON_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/contains.hpp b/ThirdParty/boost-Subset/boost/mpl/contains.hpp new file mode 100644 index 0000000000..02c2aa4f8b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/contains.hpp @@ -0,0 +1,41 @@ + +#ifndef BOOST_MPL_CONTAINS_HPP_INCLUDED +#define BOOST_MPL_CONTAINS_HPP_INCLUDED + +// Copyright Eric Friedman 2002 +// Copyright Aleksey Gurtovoy 2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(T) + > +struct contains + : contains_impl< typename sequence_tag::type > + ::template apply< Sequence,T > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,contains,(Sequence,T)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, contains) + +}} + +#endif // BOOST_MPL_CONTAINS_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/contains_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/contains_fwd.hpp new file mode 100644 index 0000000000..c7c667285d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/contains_fwd.hpp @@ -0,0 +1,25 @@ + +#ifndef BOOST_MPL_CONTAINS_FWD_HPP_INCLUDED +#define BOOST_MPL_CONTAINS_FWD_HPP_INCLUDED + +// Copyright Eric Friedman 2002 +// Copyright Aleksey Gurtovoy 2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct contains_impl; +template< typename Sequence, typename T > struct contains; + +}} + +#endif // BOOST_MPL_CONTAINS_FWD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/copy.hpp b/ThirdParty/boost-Subset/boost/mpl/copy.hpp new file mode 100644 index 0000000000..6eafba3982 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/copy.hpp @@ -0,0 +1,58 @@ + +#ifndef BOOST_MPL_COPY_HPP_INCLUDED +#define BOOST_MPL_COPY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright David Abrahams 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename Sequence + , typename Inserter + > +struct copy_impl + : fold< + Sequence + , typename Inserter::state + , typename Inserter::operation + > +{ +}; + +template< + typename Sequence + , typename Inserter + > +struct reverse_copy_impl + : reverse_fold< + Sequence + , typename Inserter::state + , typename Inserter::operation + > +{ +}; + +} // namespace aux + +BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(2, copy) + +}} + +#endif // BOOST_MPL_COPY_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/deref.hpp b/ThirdParty/boost-Subset/boost/mpl/deref.hpp new file mode 100644 index 0000000000..1105ec9038 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/deref.hpp @@ -0,0 +1,41 @@ + +#ifndef BOOST_MPL_DEREF_HPP_INCLUDED +#define BOOST_MPL_DEREF_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(Iterator) + > +struct deref +{ +#if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) + typedef typename Iterator::type type; +#else + typedef typename aux::msvc_type::type type; +#endif + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,deref,(Iterator)) +}; + +BOOST_MPL_AUX_NA_SPEC(1, deref) + +}} + +#endif // BOOST_MPL_DEREF_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/distance.hpp b/ThirdParty/boost-Subset/boost/mpl/distance.hpp new file mode 100644 index 0000000000..95f4f33510 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/distance.hpp @@ -0,0 +1,78 @@ + +#ifndef BOOST_MPL_DISTANCE_HPP_INCLUDED +#define BOOST_MPL_DISTANCE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +namespace boost { namespace mpl { + +// default implementation for forward/bidirectional iterators +template< typename Tag > struct distance_impl +{ + template< typename First, typename Last > struct apply +#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) + : aux::msvc_eti_base< typename iter_fold< + iterator_range + , mpl::long_<0> + , next<> + >::type > + { +#else + { + typedef typename iter_fold< + iterator_range + , mpl::long_<0> + , next<> + >::type type; + + BOOST_STATIC_CONSTANT(long, value = + (iter_fold< + iterator_range + , mpl::long_<0> + , next<> + >::type::value) + ); +#endif + }; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(First) + , typename BOOST_MPL_AUX_NA_PARAM(Last) + > +struct distance + : distance_impl< typename tag::type > + ::template apply +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, distance, (First, Last)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, distance) + +}} + +#endif // BOOST_MPL_DISTANCE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/distance_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/distance_fwd.hpp new file mode 100644 index 0000000000..a69a7c5140 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/distance_fwd.hpp @@ -0,0 +1,28 @@ + +#ifndef BOOST_MPL_DISTANCE_FWD_HPP_INCLUDED +#define BOOST_MPL_DISTANCE_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +namespace boost { namespace mpl { + +BOOST_MPL_AUX_COMMON_NAME_WKND(distance) + +template< typename Tag > struct distance_impl; +template< typename First, typename Last > struct distance; + +}} + +#endif // BOOST_MPL_DISTANCE_FWD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/empty_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/empty_fwd.hpp new file mode 100644 index 0000000000..551c9660ab --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/empty_fwd.hpp @@ -0,0 +1,24 @@ + +#ifndef BOOST_MPL_EMPTY_FWD_HPP_INCLUDED +#define BOOST_MPL_EMPTY_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct empty_impl; +template< typename Sequence > struct empty; + +}} + +#endif // BOOST_MPL_EMPTY_FWD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/equal_to.hpp b/ThirdParty/boost-Subset/boost/mpl/equal_to.hpp new file mode 100644 index 0000000000..5dfc87dbe2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/equal_to.hpp @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_EQUAL_TO_HPP_INCLUDED +#define BOOST_MPL_EQUAL_TO_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#define AUX778076_OP_NAME equal_to +#define AUX778076_OP_TOKEN == +#include + +#endif // BOOST_MPL_EQUAL_TO_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/eval_if.hpp b/ThirdParty/boost-Subset/boost/mpl/eval_if.hpp new file mode 100644 index 0000000000..e892703fd8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/eval_if.hpp @@ -0,0 +1,71 @@ + +#ifndef BOOST_MPL_EVAL_IF_HPP_INCLUDED +#define BOOST_MPL_EVAL_IF_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(C) + , typename BOOST_MPL_AUX_NA_PARAM(F1) + , typename BOOST_MPL_AUX_NA_PARAM(F2) + > +struct eval_if +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ + || ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, >= 0x0300) \ + && BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) \ + ) +{ + typedef typename if_::type f_; + typedef typename f_::type type; +#else + : if_::type +{ +#endif + BOOST_MPL_AUX_LAMBDA_SUPPORT(3,eval_if,(C,F1,F2)) +}; + +// (almost) copy & paste in order to save one more +// recursively nested template instantiation to user +template< + bool C + , typename F1 + , typename F2 + > +struct eval_if_c +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ + || ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, >= 0x0300) \ + && BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) \ + ) +{ + typedef typename if_c::type f_; + typedef typename f_::type type; +#else + : if_c::type +{ +#endif +}; + +BOOST_MPL_AUX_NA_SPEC(3, eval_if) + +}} + +#endif // BOOST_MPL_EVAL_IF_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/find.hpp b/ThirdParty/boost-Subset/boost/mpl/find.hpp new file mode 100644 index 0000000000..31a8b0eb89 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/find.hpp @@ -0,0 +1,38 @@ + +#ifndef BOOST_MPL_FIND_HPP_INCLUDED +#define BOOST_MPL_FIND_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(T) + > +struct find + : find_if< Sequence,same_as > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,find,(Sequence,T)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, find) + +}} + +#endif // BOOST_MPL_FIND_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/find_if.hpp b/ThirdParty/boost-Subset/boost/mpl/find_if.hpp new file mode 100644 index 0000000000..83a007e77e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/find_if.hpp @@ -0,0 +1,50 @@ + +#ifndef BOOST_MPL_FIND_IF_HPP_INCLUDED +#define BOOST_MPL_FIND_IF_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +BOOST_MPL_AUX_COMMON_NAME_WKND(find_if) + +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(Predicate) + > +struct find_if +{ + typedef typename iter_fold_if< + Sequence + , void + , mpl::arg<1> // ignore + , protect< aux::find_if_pred > + >::type result_; + + typedef typename second::type type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,find_if,(Sequence,Predicate)) +}; + +BOOST_MPL_AUX_NA_SPEC(2,find_if) + +}} + +#endif // BOOST_MPL_FIND_IF_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/fold.hpp b/ThirdParty/boost-Subset/boost/mpl/fold.hpp new file mode 100644 index 0000000000..0bc67ef3d6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/fold.hpp @@ -0,0 +1,48 @@ + +#ifndef BOOST_MPL_FOLD_HPP_INCLUDED +#define BOOST_MPL_FOLD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(State) + , typename BOOST_MPL_AUX_NA_PARAM(ForwardOp) + > +struct fold +{ + typedef typename aux::fold_impl< + ::boost::mpl::O1_size::value + , typename begin::type + , typename end::type + , State + , ForwardOp + >::state type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT(3,fold,(Sequence,State,ForwardOp)) +}; + +BOOST_MPL_AUX_NA_SPEC(3, fold) + +}} + +#endif // BOOST_MPL_FOLD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/for_each.hpp b/ThirdParty/boost-Subset/boost/mpl/for_each.hpp new file mode 100644 index 0000000000..6b40ce1663 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/for_each.hpp @@ -0,0 +1,123 @@ + +#ifndef BOOST_MPL_FOR_EACH_HPP_INCLUDED +#define BOOST_MPL_FOR_EACH_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2008 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +namespace boost { namespace mpl { + +namespace aux { + +template< bool done = true > +struct for_each_impl +{ + template< + typename Iterator + , typename LastIterator + , typename TransformFunc + , typename F + > + BOOST_MPL_CFG_GPU_ENABLED + static void execute( + Iterator* + , LastIterator* + , TransformFunc* + , F + ) + { + } +}; + +template<> +struct for_each_impl +{ + template< + typename Iterator + , typename LastIterator + , typename TransformFunc + , typename F + > + BOOST_MPL_CFG_GPU_ENABLED + static void execute( + Iterator* + , LastIterator* + , TransformFunc* + , F f + ) + { + typedef typename deref::type item; + typedef typename apply1::type arg; + + // dwa 2002/9/10 -- make sure not to invoke undefined behavior + // when we pass arg. + value_initialized x; + aux::unwrap(f, 0)(boost::get(x)); + + typedef typename mpl::next::type iter; + for_each_impl::value> + ::execute( static_cast(0), static_cast(0), static_cast(0), f); + } +}; + +} // namespace aux + +// agurt, 17/mar/02: pointer default parameters are necessary to workaround +// MSVC 6.5 function template signature's mangling bug +template< + typename Sequence + , typename TransformOp + , typename F + > +BOOST_MPL_CFG_GPU_ENABLED +inline +void for_each(F f, Sequence* = 0, TransformOp* = 0) +{ + BOOST_MPL_ASSERT(( is_sequence )); + + typedef typename begin::type first; + typedef typename end::type last; + + aux::for_each_impl< boost::is_same::value > + ::execute(static_cast(0), static_cast(0), static_cast(0), f); +} + +template< + typename Sequence + , typename F + > +BOOST_MPL_CFG_GPU_ENABLED +inline +void for_each(F f, Sequence* = 0) +{ + // jfalcou: fully qualifying this call so it doesnt clash with phoenix::for_each + // ons ome compilers -- done on 02/28/2011 + boost::mpl::for_each >(f); +} + +}} + +#endif // BOOST_MPL_FOR_EACH_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/front_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/front_fwd.hpp new file mode 100644 index 0000000000..f01282a77b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/front_fwd.hpp @@ -0,0 +1,24 @@ + +#ifndef BOOST_MPL_FRONT_FWD_HPP_INCLUDED +#define BOOST_MPL_FRONT_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct front_impl; +template< typename Sequence > struct front; + +}} + +#endif // BOOST_MPL_FRONT_FWD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/front_inserter.hpp b/ThirdParty/boost-Subset/boost/mpl/front_inserter.hpp new file mode 100644 index 0000000000..0a6b197ef8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/front_inserter.hpp @@ -0,0 +1,33 @@ + +#ifndef BOOST_MPL_FRONT_INSERTER_HPP_INCLUDED +#define BOOST_MPL_FRONT_INSERTER_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright David Abrahams 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +namespace boost { namespace mpl { + +template< + typename Sequence + > +struct front_inserter + : inserter< Sequence,push_front<> > +{ +}; + +}} + +#endif // BOOST_MPL_FRONT_INSERTER_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/greater.hpp b/ThirdParty/boost-Subset/boost/mpl/greater.hpp new file mode 100644 index 0000000000..b1f0a2cf13 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/greater.hpp @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_GREATER_HPP_INCLUDED +#define BOOST_MPL_GREATER_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#define AUX778076_OP_NAME greater +#define AUX778076_OP_TOKEN > +#include + +#endif // BOOST_MPL_GREATER_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/greater_equal.hpp b/ThirdParty/boost-Subset/boost/mpl/greater_equal.hpp new file mode 100644 index 0000000000..7a06a62e8e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/greater_equal.hpp @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_GREATER_EQUAL_HPP_INCLUDED +#define BOOST_MPL_GREATER_EQUAL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#define AUX778076_OP_NAME greater_equal +#define AUX778076_OP_TOKEN >= +#include + +#endif // BOOST_MPL_GREATER_EQUAL_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/has_xxx.hpp b/ThirdParty/boost-Subset/boost/mpl/has_xxx.hpp new file mode 100644 index 0000000000..82e67ddca4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/has_xxx.hpp @@ -0,0 +1,647 @@ + +#ifndef BOOST_MPL_HAS_XXX_HPP_INCLUDED +#define BOOST_MPL_HAS_XXX_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2006 +// Copyright David Abrahams 2002-2003 +// Copyright Daniel Walker 2007 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x590) ) +# include +#endif + +#if !defined(BOOST_MPL_CFG_NO_HAS_XXX) + +# if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + +// agurt, 11/sep/02: MSVC-specific version (< 7.1), based on a USENET +// newsgroup's posting by John Madsen (comp.lang.c++.moderated, +// 1999-11-12 19:17:06 GMT); the code is _not_ standard-conforming, but +// it works way more reliably than the SFINAE-based implementation + +// Modified dwa 8/Oct/02 to handle reference types. + +# include +# include + +namespace boost { namespace mpl { namespace aux { + +struct has_xxx_tag; + +#if BOOST_WORKAROUND(BOOST_MSVC, == 1300) +template< typename U > struct msvc_incomplete_array +{ + typedef char (&type)[sizeof(U) + 1]; +}; +#endif + +template< typename T > +struct msvc_is_incomplete +{ + // MSVC is capable of some kinds of SFINAE. If U is an incomplete + // type, it won't pick the second overload + static char tester(...); + +#if BOOST_WORKAROUND(BOOST_MSVC, == 1300) + template< typename U > + static typename msvc_incomplete_array::type tester(type_wrapper); +#else + template< typename U > + static char (& tester(type_wrapper) )[sizeof(U)+1]; +#endif + + BOOST_STATIC_CONSTANT(bool, value = + sizeof(tester(type_wrapper())) == 1 + ); +}; + +template<> +struct msvc_is_incomplete +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +}}} + +# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, default_) \ +template< typename T, typename name = ::boost::mpl::aux::has_xxx_tag > \ +struct BOOST_PP_CAT(trait,_impl) : T \ +{ \ + static boost::mpl::aux::no_tag \ + test(void(*)(::boost::mpl::aux::has_xxx_tag)); \ + \ + static boost::mpl::aux::yes_tag test(...); \ + \ + BOOST_STATIC_CONSTANT(bool, value = \ + sizeof(test(static_cast(0))) \ + != sizeof(boost::mpl::aux::no_tag) \ + ); \ + typedef boost::mpl::bool_ type; \ +}; \ +\ +template< typename T, typename fallback_ = boost::mpl::bool_ > \ +struct trait \ + : boost::mpl::if_c< \ + boost::mpl::aux::msvc_is_incomplete::value \ + , boost::mpl::bool_ \ + , BOOST_PP_CAT(trait,_impl) \ + >::type \ +{ \ +}; \ +\ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, void) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, bool) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, char) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed char) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned char) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed short) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned short) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed int) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned int) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed long) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned long) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, float) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, double) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, long double) \ +/**/ + +# define BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, T) \ +template<> struct trait \ +{ \ + BOOST_STATIC_CONSTANT(bool, value = false); \ + typedef boost::mpl::bool_ type; \ +}; \ +/**/ + +#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) +# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \ + BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \ + BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, wchar_t) \ +/**/ +#else +# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \ + BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \ +/**/ +#endif + + +// SFINAE-based implementations below are derived from a USENET newsgroup's +// posting by Rani Sharoni (comp.lang.c++.moderated, 2002-03-17 07:45:09 PST) + +# elif BOOST_WORKAROUND(BOOST_MSVC, <= 1400) \ + || (BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1800)) && defined(__CUDACC__)) \ + || BOOST_WORKAROUND(__IBMCPP__, <= 700) + +// MSVC 7.1 & MSVC 8.0 & VACPP + +// agurt, 15/jun/05: replace overload-based SFINAE implementation with SFINAE +// applied to partial specialization to fix some apparently random failures +// (thanks to Daniel Wallin for researching this!) + +# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \ +template< typename T > \ +struct BOOST_PP_CAT(trait, _msvc_sfinae_helper) \ +{ \ + typedef void type; \ +};\ +\ +template< typename T, typename U = void > \ +struct BOOST_PP_CAT(trait,_impl_) \ +{ \ + BOOST_STATIC_CONSTANT(bool, value = false); \ + typedef boost::mpl::bool_ type; \ +}; \ +\ +template< typename T > \ +struct BOOST_PP_CAT(trait,_impl_)< \ + T \ + , typename BOOST_PP_CAT(trait, _msvc_sfinae_helper)< typename T::name >::type \ + > \ +{ \ + BOOST_STATIC_CONSTANT(bool, value = true); \ + typedef boost::mpl::bool_ type; \ +}; \ +\ +template< typename T, typename fallback_ = boost::mpl::bool_ > \ +struct trait \ + : BOOST_PP_CAT(trait,_impl_) \ +{ \ +}; \ +/**/ + +# elif BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x590) ) + +# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_BCB_DEF(trait, trait_tester, name, default_) \ +template< typename T, bool IS_CLASS > \ +struct trait_tester \ +{ \ + BOOST_STATIC_CONSTANT( bool, value = false ); \ +}; \ +template< typename T > \ +struct trait_tester< T, true > \ +{ \ + struct trait_tester_impl \ + { \ + template < class U > \ + static int resolve( boost::mpl::aux::type_wrapper const volatile * \ + , boost::mpl::aux::type_wrapper* = 0 ); \ + static char resolve( ... ); \ + }; \ + typedef boost::mpl::aux::type_wrapper t_; \ + BOOST_STATIC_CONSTANT( bool, value = ( sizeof( trait_tester_impl::resolve( static_cast< t_ * >(0) ) ) == sizeof(int) ) ); \ +}; \ +template< typename T, typename fallback_ = boost::mpl::bool_ > \ +struct trait \ +{ \ + BOOST_STATIC_CONSTANT( bool, value = (trait_tester< T, boost::is_class< T >::value >::value) ); \ + typedef boost::mpl::bool_< trait< T, fallback_ >::value > type; \ +}; + +# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \ + BOOST_MPL_HAS_XXX_TRAIT_NAMED_BCB_DEF( trait \ + , BOOST_PP_CAT(trait,_tester) \ + , name \ + , default_ ) \ +/**/ + +# else // other SFINAE-capable compilers + +# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \ +template< typename T, typename fallback_ = boost::mpl::bool_ > \ +struct trait \ +{ \ + struct gcc_3_2_wknd \ + { \ + template< typename U > \ + static boost::mpl::aux::yes_tag test( \ + boost::mpl::aux::type_wrapper const volatile* \ + , boost::mpl::aux::type_wrapper* = 0 \ + ); \ + \ + static boost::mpl::aux::no_tag test(...); \ + }; \ + \ + typedef boost::mpl::aux::type_wrapper t_; \ + BOOST_STATIC_CONSTANT(bool, value = \ + sizeof(gcc_3_2_wknd::test(static_cast(0))) \ + == sizeof(boost::mpl::aux::yes_tag) \ + ); \ + typedef boost::mpl::bool_ type; \ +}; \ +/**/ + +# endif // BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + + +#else // BOOST_MPL_CFG_NO_HAS_XXX + +// placeholder implementation + +# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \ +template< typename T, typename fallback_ = boost::mpl::bool_ > \ +struct trait \ +{ \ + BOOST_STATIC_CONSTANT(bool, value = fallback_::value); \ + typedef fallback_ type; \ +}; \ +/**/ + +#endif + +#define BOOST_MPL_HAS_XXX_TRAIT_DEF(name) \ + BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(BOOST_PP_CAT(has_,name), name, false) \ +/**/ + + +#if !defined(BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE) + +// Create a boolean Metafunction to detect a nested template +// member. This implementation is based on a USENET newsgroup's +// posting by Aleksey Gurtovoy (comp.lang.c++.moderated, 2002-03-19), +// Rani Sharoni's USENET posting cited above, the non-template has_xxx +// implementations above, and discussion on the Boost mailing list. + +# if !defined(BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES) +# if BOOST_WORKAROUND(BOOST_MSVC, <= 1400) +# define BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES 1 +# else +# define BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES 0 +# endif +# endif + +# if !defined(BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION) +# if (defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS)) +# define BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION 1 +# else +# define BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION 0 +# endif +# endif + +# if !defined(BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE) +# if BOOST_WORKAROUND(BOOST_MSVC, <= 1400) +# define BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE 1 +# else +# define BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE 0 +# endif +# endif + +// NOTE: Many internal implementation macros take a Boost.Preprocessor +// array argument called args which is of the following form. +// ( 4, ( trait, name, max_arity, default_ ) ) + +# define BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args) \ + BOOST_PP_CAT(BOOST_PP_ARRAY_ELEM(0, args) , _introspect) \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) \ + BOOST_PP_CAT(BOOST_PP_CAT(BOOST_PP_ARRAY_ELEM(0, args) , _substitute), n) \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args) \ + BOOST_PP_CAT(BOOST_PP_ARRAY_ELEM(0, args) , _test) \ + /**/ + +// Thanks to Guillaume Melquiond for pointing out the need for the +// "substitute" template as an argument to the overloaded test +// functions to get SFINAE to work for member templates with the +// correct name but different number of arguments. +# define BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE(z, n, args) \ + template< \ + template< BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(n), typename V) > class V \ + > \ + struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) { \ + }; \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_SUBSTITUTE(args, substitute_macro) \ + BOOST_PP_REPEAT( \ + BOOST_PP_ARRAY_ELEM(2, args) \ + , BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE \ + , args \ + ) \ + /**/ + +# if !BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION +# define BOOST_MPL_HAS_MEMBER_REJECT(args, member_macro) \ + template< typename V > \ + static boost::mpl::aux::no_tag \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)(...); \ + /**/ +# else +# define BOOST_MPL_HAS_MEMBER_REJECT(args, member_macro) \ + static boost::mpl::aux::no_tag \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)(...); \ + /**/ +# endif + +# if !BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES +# define BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT(z, n, args) \ + template< typename V > \ + static boost::mpl::aux::yes_tag \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \ + boost::mpl::aux::type_wrapper< V > const volatile* \ + , BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) < \ + V::template BOOST_PP_ARRAY_ELEM(1, args) \ + >* = 0 \ + ); \ + /**/ +# define BOOST_MPL_HAS_MEMBER_ACCEPT(args, member_macro) \ + BOOST_PP_REPEAT( \ + BOOST_PP_ARRAY_ELEM(2, args) \ + , BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT \ + , args \ + ) \ + /**/ +# else +# define BOOST_MPL_HAS_MEMBER_ACCEPT(args, member_macro) \ + template< typename V > \ + static boost::mpl::aux::yes_tag \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \ + V const volatile* \ + , member_macro(args, V, T)* = 0 \ + ); \ + /**/ +# endif + +# if !BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION +# define BOOST_MPL_HAS_MEMBER_TEST(args) \ + sizeof(BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)< U >(0)) \ + == sizeof(boost::mpl::aux::yes_tag) \ + /**/ +# else +# if !BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES +# define BOOST_MPL_HAS_MEMBER_TEST(args) \ + sizeof( \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \ + static_cast< boost::mpl::aux::type_wrapper< U >* >(0) \ + ) \ + ) == sizeof(boost::mpl::aux::yes_tag) \ + /**/ +# else +# define BOOST_MPL_HAS_MEMBER_TEST(args) \ + sizeof( \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \ + static_cast< U* >(0) \ + ) \ + ) == sizeof(boost::mpl::aux::yes_tag) \ + /**/ +# endif +# endif + +# define BOOST_MPL_HAS_MEMBER_INTROSPECT( \ + args, substitute_macro, member_macro \ + ) \ + template< typename U > \ + struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args) { \ + BOOST_MPL_HAS_MEMBER_SUBSTITUTE(args, substitute_macro) \ + BOOST_MPL_HAS_MEMBER_REJECT(args, member_macro) \ + BOOST_MPL_HAS_MEMBER_ACCEPT(args, member_macro) \ + BOOST_STATIC_CONSTANT( \ + bool, value = BOOST_MPL_HAS_MEMBER_TEST(args) \ + ); \ + typedef boost::mpl::bool_< value > type; \ + }; \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_IMPLEMENTATION( \ + args, introspect_macro, substitute_macro, member_macro \ + ) \ + template< \ + typename T \ + , typename fallback_ \ + = boost::mpl::bool_< BOOST_PP_ARRAY_ELEM(3, args) > \ + > \ + class BOOST_PP_ARRAY_ELEM(0, args) { \ + introspect_macro(args, substitute_macro, member_macro) \ + public: \ + static const bool value \ + = BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args)< T >::value; \ + typedef typename BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args)< \ + T \ + >::type type; \ + }; \ + /**/ + +// BOOST_MPL_HAS_MEMBER_WITH_FUNCTION_SFINAE expands to the full +// implementation of the function-based metafunction. Compile with -E +// to see the preprocessor output for this macro. +# define BOOST_MPL_HAS_MEMBER_WITH_FUNCTION_SFINAE( \ + args, substitute_macro, member_macro \ + ) \ + BOOST_MPL_HAS_MEMBER_IMPLEMENTATION( \ + args \ + , BOOST_MPL_HAS_MEMBER_INTROSPECT \ + , substitute_macro \ + , member_macro \ + ) \ + /**/ + +# if BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE + +# if !defined(BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE) +# if BOOST_WORKAROUND(BOOST_MSVC, <= 1400) +# define BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE 1 +# endif +# endif + +# if !BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE +# define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ + args, n \ + ) \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) \ + /**/ +# else +# define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ + args, n \ + ) \ + BOOST_PP_CAT( \ + boost_mpl_has_xxx_ \ + , BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) \ + ) \ + /**/ +# endif + +# define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME( \ + args \ + ) \ + BOOST_PP_CAT( \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ + args, 0 \ + ) \ + , _tag \ + ) \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE_WITH_TEMPLATE_SFINAE( \ + z, n, args \ + ) \ + template< \ + template< BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(n), typename U) > class U \ + > \ + struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ + args, n \ + ) { \ + typedef \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME(args) \ + type; \ + }; \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_SUBSTITUTE_WITH_TEMPLATE_SFINAE( \ + args, substitute_macro \ + ) \ + typedef void \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME(args); \ + BOOST_PP_REPEAT( \ + BOOST_PP_ARRAY_ELEM(2, args) \ + , BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE_WITH_TEMPLATE_SFINAE \ + , args \ + ) \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_REJECT_WITH_TEMPLATE_SFINAE( \ + args, member_macro \ + ) \ + template< \ + typename U \ + , typename V \ + = BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME(args) \ + > \ + struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args) { \ + BOOST_STATIC_CONSTANT(bool, value = false); \ + typedef boost::mpl::bool_< value > type; \ + }; \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT_WITH_TEMPLATE_SFINAE( \ + z, n, args \ + ) \ + template< typename U > \ + struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)< \ + U \ + , typename \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ + args, n \ + )< \ + BOOST_MSVC_TYPENAME U::BOOST_PP_ARRAY_ELEM(1, args)< > \ + >::type \ + > { \ + BOOST_STATIC_CONSTANT(bool, value = true); \ + typedef boost::mpl::bool_< value > type; \ + }; \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_ACCEPT_WITH_TEMPLATE_SFINAE( \ + args, member_macro \ + ) \ + BOOST_PP_REPEAT( \ + BOOST_PP_ARRAY_ELEM(2, args) \ + , BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT_WITH_TEMPLATE_SFINAE \ + , args \ + ) \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_INTROSPECT_WITH_TEMPLATE_SFINAE( \ + args, substitute_macro, member_macro \ + ) \ + BOOST_MPL_HAS_MEMBER_REJECT_WITH_TEMPLATE_SFINAE(args, member_macro) \ + BOOST_MPL_HAS_MEMBER_ACCEPT_WITH_TEMPLATE_SFINAE(args, member_macro) \ + template< typename U > \ + struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args) \ + : BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)< U > { \ + }; \ + /**/ + +// BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE expands to the full +// implementation of the template-based metafunction. Compile with -E +// to see the preprocessor output for this macro. +// +// Note that if BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE is +// defined BOOST_MPL_HAS_MEMBER_SUBSTITUTE_WITH_TEMPLATE_SFINAE needs +// to be expanded at namespace level before +// BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE can be used. +# define BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE( \ + args, substitute_macro, member_macro \ + ) \ + BOOST_MPL_HAS_MEMBER_SUBSTITUTE_WITH_TEMPLATE_SFINAE( \ + args, substitute_macro \ + ) \ + BOOST_MPL_HAS_MEMBER_IMPLEMENTATION( \ + args \ + , BOOST_MPL_HAS_MEMBER_INTROSPECT_WITH_TEMPLATE_SFINAE \ + , substitute_macro \ + , member_macro \ + ) \ + /**/ + +# endif // BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE + +// Note: In the current implementation the parameter and access macros +// are no longer expanded. +# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1400) +# define BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, default_) \ + BOOST_MPL_HAS_MEMBER_WITH_FUNCTION_SFINAE( \ + ( 4, ( trait, name, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, default_ ) ) \ + , BOOST_MPL_HAS_MEMBER_TEMPLATE_SUBSTITUTE_PARAMETER \ + , BOOST_MPL_HAS_MEMBER_TEMPLATE_ACCESS \ + ) \ + /**/ +# else +# define BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, default_) \ + BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE( \ + ( 4, ( trait, name, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, default_ ) ) \ + , BOOST_MPL_HAS_MEMBER_TEMPLATE_SUBSTITUTE_PARAMETER \ + , BOOST_MPL_HAS_MEMBER_TEMPLATE_ACCESS \ + ) \ + /**/ +# endif + +#else // BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE + +// placeholder implementation + +# define BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, default_) \ + template< typename T \ + , typename fallback_ = boost::mpl::bool_< default_ > > \ + struct trait { \ + BOOST_STATIC_CONSTANT(bool, value = fallback_::value); \ + typedef fallback_ type; \ + }; \ + /**/ + +#endif // BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE + +# define BOOST_MPL_HAS_XXX_TEMPLATE_DEF(name) \ + BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF( \ + BOOST_PP_CAT(has_, name), name, false \ + ) \ + /**/ + +#endif // BOOST_MPL_HAS_XXX_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/identity.hpp b/ThirdParty/boost-Subset/boost/mpl/identity.hpp new file mode 100644 index 0000000000..190d2f53f6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/identity.hpp @@ -0,0 +1,45 @@ + +#ifndef BOOST_MPL_IDENTITY_HPP_INCLUDED +#define BOOST_MPL_IDENTITY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T) + > +struct identity +{ + typedef T type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(1, identity, (T)) +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(T) + > +struct make_identity +{ + typedef identity type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(1, make_identity, (T)) +}; + +BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, identity) +BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, make_identity) + +}} + +#endif // BOOST_MPL_IDENTITY_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/if.hpp b/ThirdParty/boost-Subset/boost/mpl/if.hpp new file mode 100644 index 0000000000..b6bdf6c692 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/if.hpp @@ -0,0 +1,135 @@ + +#ifndef BOOST_MPL_IF_HPP_INCLUDED +#define BOOST_MPL_IF_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< + bool C + , typename T1 + , typename T2 + > +struct if_c +{ + typedef T1 type; +}; + +template< + typename T1 + , typename T2 + > +struct if_c +{ + typedef T2 type; +}; + +// agurt, 05/sep/04: nondescriptive parameter names for the sake of DigitalMars +// (and possibly MWCW < 8.0); see http://article.gmane.org/gmane.comp.lib.boost.devel/108959 +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename BOOST_MPL_AUX_NA_PARAM(T3) + > +struct if_ +{ + private: + // agurt, 02/jan/03: two-step 'type' definition for the sake of aCC + typedef if_c< +#if defined(BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS) + BOOST_MPL_AUX_VALUE_WKND(T1)::value +#else + BOOST_MPL_AUX_STATIC_CAST(bool, BOOST_MPL_AUX_VALUE_WKND(T1)::value) +#endif + , T2 + , T3 + > almost_type_; + + public: + typedef typename almost_type_::type type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT(3,if_,(T1,T2,T3)) +}; + +#else + +// no partial class template specialization + +namespace aux { + +template< bool C > +struct if_impl +{ + template< typename T1, typename T2 > struct result_ + { + typedef T1 type; + }; +}; + +template<> +struct if_impl +{ + template< typename T1, typename T2 > struct result_ + { + typedef T2 type; + }; +}; + +} // namespace aux + +template< + bool C_ + , typename T1 + , typename T2 + > +struct if_c +{ + typedef typename aux::if_impl< C_ > + ::template result_::type type; +}; + +// (almost) copy & paste in order to save one more +// recursively nested template instantiation to user +template< + typename BOOST_MPL_AUX_NA_PARAM(C_) + , typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct if_ +{ + enum { msvc_wknd_ = BOOST_MPL_AUX_MSVC_VALUE_WKND(C_)::value }; + + typedef typename aux::if_impl< BOOST_MPL_AUX_STATIC_CAST(bool, msvc_wknd_) > + ::template result_::type type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT(3,if_,(C_,T1,T2)) +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +BOOST_MPL_AUX_NA_SPEC(3, if_) + +}} + +#endif // BOOST_MPL_IF_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/inserter.hpp b/ThirdParty/boost-Subset/boost/mpl/inserter.hpp new file mode 100644 index 0000000000..964df7f692 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/inserter.hpp @@ -0,0 +1,32 @@ + +#ifndef BOOST_MPL_INSERTER_HPP_INCLUDED +#define BOOST_MPL_INSERTER_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright David Abrahams 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< + typename Sequence + , typename Operation + > +struct inserter +{ + typedef Sequence state; + typedef Operation operation; +}; + +}} + +#endif // BOOST_MPL_INSERTER_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/int.hpp b/ThirdParty/boost-Subset/boost/mpl/int.hpp new file mode 100644 index 0000000000..b7fa0a765f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/int.hpp @@ -0,0 +1,22 @@ + +#ifndef BOOST_MPL_INT_HPP_INCLUDED +#define BOOST_MPL_INT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#define AUX_WRAPPER_VALUE_TYPE int +#include + +#endif // BOOST_MPL_INT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/int_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/int_fwd.hpp new file mode 100644 index 0000000000..03d20c1cd6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/int_fwd.hpp @@ -0,0 +1,27 @@ + +#ifndef BOOST_MPL_INT_FWD_HPP_INCLUDED +#define BOOST_MPL_INT_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct int_; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(int_) + +#endif // BOOST_MPL_INT_FWD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/integral_c.hpp b/ThirdParty/boost-Subset/boost/mpl/integral_c.hpp new file mode 100644 index 0000000000..7a692dcab6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/integral_c.hpp @@ -0,0 +1,51 @@ + +#ifndef BOOST_MPL_INTEGRAL_C_HPP_INCLUDED +#define BOOST_MPL_INTEGRAL_C_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2006 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include + +#if BOOST_WORKAROUND(__HP_aCC, <= 53800) +// the type of non-type template arguments may not depend on template arguments +# define AUX_WRAPPER_PARAMS(N) typename T, long N +#else +# define AUX_WRAPPER_PARAMS(N) typename T, T N +#endif + +#define AUX_WRAPPER_NAME integral_c +#define AUX_WRAPPER_VALUE_TYPE T +#define AUX_WRAPPER_INST(value) AUX_WRAPPER_NAME< T, value > +#include + + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !BOOST_WORKAROUND(__BORLANDC__, <= 0x551) +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +// 'bool' constant doesn't have 'next'/'prior' members +template< bool C > +struct integral_c +{ + BOOST_STATIC_CONSTANT(bool, value = C); + typedef integral_c_tag tag; + typedef integral_c type; + typedef bool value_type; + operator bool() const { return this->value; } +}; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +#endif + +#endif // BOOST_MPL_INTEGRAL_C_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/integral_c_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/integral_c_fwd.hpp new file mode 100644 index 0000000000..05e311daa1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/integral_c_fwd.hpp @@ -0,0 +1,32 @@ + +#ifndef BOOST_MPL_INTEGRAL_C_FWD_HPP_INCLUDED +#define BOOST_MPL_INTEGRAL_C_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2006 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +#if BOOST_WORKAROUND(__HP_aCC, <= 53800) +// the type of non-type template arguments may not depend on template arguments +template< typename T, long N > struct integral_c; +#else +template< typename T, T N > struct integral_c; +#endif + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(integral_c) + +#endif // BOOST_MPL_INTEGRAL_C_FWD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/integral_c_tag.hpp b/ThirdParty/boost-Subset/boost/mpl/integral_c_tag.hpp new file mode 100644 index 0000000000..b6046920f8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/integral_c_tag.hpp @@ -0,0 +1,26 @@ + +#ifndef BOOST_MPL_INTEGRAL_C_TAG_HPP_INCLUDED +#define BOOST_MPL_INTEGRAL_C_TAG_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + + +#include +#include + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +struct integral_c_tag { BOOST_STATIC_CONSTANT(int, value = 0); }; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(integral_c_tag) + +#endif // BOOST_MPL_INTEGRAL_C_TAG_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/is_placeholder.hpp b/ThirdParty/boost-Subset/boost/mpl/is_placeholder.hpp new file mode 100644 index 0000000000..9f79ef102c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/is_placeholder.hpp @@ -0,0 +1,67 @@ + +#ifndef BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED +#define BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< typename T > +struct is_placeholder + : bool_ +{ +}; + +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > +struct is_placeholder< arg > + : bool_ +{ +}; + +#else + +namespace aux { + +aux::no_tag is_placeholder_helper(...); + +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > +aux::yes_tag is_placeholder_helper(aux::type_wrapper< arg >*); + +} // namespace aux + +template< typename T > +struct is_placeholder +{ + static aux::type_wrapper* get(); + BOOST_STATIC_CONSTANT(bool, value = + sizeof(aux::is_placeholder_helper(get())) == sizeof(aux::yes_tag) + ); + + typedef bool_ type; +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +}} + +#endif // BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/is_sequence.hpp b/ThirdParty/boost-Subset/boost/mpl/is_sequence.hpp new file mode 100644 index 0000000000..68e036fa91 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/is_sequence.hpp @@ -0,0 +1,112 @@ + +#ifndef BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED +#define BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +# include +#elif BOOST_WORKAROUND(BOOST_MSVC, == 1300) +# include +#endif + +#include + +namespace boost { namespace mpl { + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + +namespace aux { + +// agurt, 11/jun/03: +// MSVC 6.5/7.0 fails if 'has_begin' is instantiated on a class type that has a +// 'begin' member that doesn't name a type; e.g. 'has_begin< std::vector >' +// would fail; requiring 'T' to have _both_ 'tag' and 'begin' members workarounds +// the issue for most real-world cases +template< typename T > struct is_sequence_impl + : and_< + identity< aux::has_tag > + , identity< aux::has_begin > + > +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T) + > +struct is_sequence + : if_< +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + aux::msvc_is_class +#else + boost::is_class +#endif + , aux::is_sequence_impl + , bool_ + >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1, is_sequence, (T)) +}; + +#elif defined(BOOST_MPL_CFG_NO_HAS_XXX) + +template< + typename BOOST_MPL_AUX_NA_PARAM(T) + > +struct is_sequence + : bool_ +{ +}; + +#else + +template< + typename BOOST_MPL_AUX_NA_PARAM(T) + > +struct is_sequence + : not_< is_same< typename begin::type, void_ > > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1, is_sequence, (T)) +}; + +#endif // BOOST_MSVC + +#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) +template<> struct is_sequence + : bool_ +{ +}; +#endif + +BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, is_sequence) + +}} + +#endif // BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/iter_fold.hpp b/ThirdParty/boost-Subset/boost/mpl/iter_fold.hpp new file mode 100644 index 0000000000..1b56b79040 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/iter_fold.hpp @@ -0,0 +1,49 @@ + +#ifndef BOOST_MPL_ITER_FOLD_HPP_INCLUDED +#define BOOST_MPL_ITER_FOLD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(State) + , typename BOOST_MPL_AUX_NA_PARAM(ForwardOp) + > +struct iter_fold +{ + typedef typename aux::iter_fold_impl< + ::boost::mpl::O1_size::value + , typename begin::type + , typename end::type + , State + , typename lambda::type + >::state type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT(3,iter_fold,(Sequence,State,ForwardOp)) +}; + +BOOST_MPL_AUX_NA_SPEC(3, iter_fold) + +}} + +#endif // BOOST_MPL_ITER_FOLD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/iter_fold_if.hpp b/ThirdParty/boost-Subset/boost/mpl/iter_fold_if.hpp new file mode 100644 index 0000000000..0115b7b224 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/iter_fold_if.hpp @@ -0,0 +1,117 @@ + +#ifndef BOOST_MPL_ITER_FOLD_IF_HPP_INCLUDED +#define BOOST_MPL_ITER_FOLD_IF_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright Eric Friedman 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace boost { namespace mpl { + +namespace aux { + +template< typename Predicate, typename LastIterator > +struct iter_fold_if_pred +{ + template< typename State, typename Iterator > struct apply +#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) + : and_< + not_< is_same > + , apply1 + > + { +#else + { + typedef and_< + not_< is_same > + , apply1 + > type; +#endif + }; +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(State) + , typename BOOST_MPL_AUX_NA_PARAM(ForwardOp) + , typename BOOST_MPL_AUX_NA_PARAM(ForwardPredicate) + , typename BOOST_MPL_AUX_NA_PARAM(BackwardOp) + , typename BOOST_MPL_AUX_NA_PARAM(BackwardPredicate) + > +struct iter_fold_if +{ + + typedef typename begin::type first_; + typedef typename end::type last_; + + typedef typename eval_if< + is_na + , if_< is_na, always, always > + , identity + >::type backward_pred_; + +// cwpro8 doesn't like 'cut-off' type here (use typedef instead) +#if !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) && !BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) + struct result_ : +#else + typedef +#endif + aux::iter_fold_if_impl< + first_ + , State + , ForwardOp + , protect< aux::iter_fold_if_pred< ForwardPredicate,last_ > > + , BackwardOp + , backward_pred_ + > +#if !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) && !BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) + { }; +#else + result_; +#endif + +public: + + typedef pair< + typename result_::state + , typename result_::iterator + > type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , iter_fold_if + , (Sequence,State,ForwardOp,ForwardPredicate,BackwardOp,BackwardPredicate) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(6, iter_fold_if) + +}} + +#endif // BOOST_MPL_ITER_FOLD_IF_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/iterator_range.hpp b/ThirdParty/boost-Subset/boost/mpl/iterator_range.hpp new file mode 100644 index 0000000000..a637e2241a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/iterator_range.hpp @@ -0,0 +1,42 @@ + +#ifndef BOOST_MPL_ITERATOR_RANGE_HPP_INCLUDED +#define BOOST_MPL_ITERATOR_RANGE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +namespace boost { namespace mpl { + +struct iterator_range_tag; + +template< + typename BOOST_MPL_AUX_NA_PARAM(First) + , typename BOOST_MPL_AUX_NA_PARAM(Last) + > +struct iterator_range +{ + typedef iterator_range_tag tag; + typedef iterator_range type; + typedef First begin; + typedef Last end; + + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,iterator_range,(First,Last)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, iterator_range) + +}} + +#endif // BOOST_MPL_ITERATOR_RANGE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/iterator_tags.hpp b/ThirdParty/boost-Subset/boost/mpl/iterator_tags.hpp new file mode 100644 index 0000000000..7c3116ab45 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/iterator_tags.hpp @@ -0,0 +1,27 @@ + +#ifndef BOOST_MPL_ITERATOR_TAG_HPP_INCLUDED +#define BOOST_MPL_ITERATOR_TAG_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +namespace boost { namespace mpl { + +struct forward_iterator_tag : int_<0> { typedef forward_iterator_tag type; }; +struct bidirectional_iterator_tag : int_<1> { typedef bidirectional_iterator_tag type; }; +struct random_access_iterator_tag : int_<2> { typedef random_access_iterator_tag type; }; + +}} + +#endif // BOOST_MPL_ITERATOR_TAG_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/lambda.hpp b/ThirdParty/boost-Subset/boost/mpl/lambda.hpp new file mode 100644 index 0000000000..cc8f6075ce --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/lambda.hpp @@ -0,0 +1,29 @@ + +#ifndef BOOST_MPL_LAMBDA_HPP_INCLUDED +#define BOOST_MPL_LAMBDA_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) +# include +#else +# include +# include +# define BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS +#endif + +#endif // BOOST_MPL_LAMBDA_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/lambda_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/lambda_fwd.hpp new file mode 100644 index 0000000000..57b0426410 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/lambda_fwd.hpp @@ -0,0 +1,57 @@ + +#ifndef BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED +#define BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) + +# include +# include +# include + +namespace boost { namespace mpl { + +template< + typename T = na + , typename Tag = void_ + BOOST_MPL_AUX_LAMBDA_ARITY_PARAM( + typename Arity = int_< aux::template_arity::value > + ) + > +struct lambda; + +}} + +#else // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT + +# include + +namespace boost { namespace mpl { + +template< + typename T = na + , typename Tag = void_ + , typename Protect = true_ + > +struct lambda; + +}} + +#endif + +#endif // BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/less.hpp b/ThirdParty/boost-Subset/boost/mpl/less.hpp new file mode 100644 index 0000000000..63da5aa4ef --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/less.hpp @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_LESS_HPP_INCLUDED +#define BOOST_MPL_LESS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#define AUX778076_OP_NAME less +#define AUX778076_OP_TOKEN < +#include + +#endif // BOOST_MPL_LESS_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/less_equal.hpp b/ThirdParty/boost-Subset/boost/mpl/less_equal.hpp new file mode 100644 index 0000000000..3d668c2790 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/less_equal.hpp @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_LESS_EQUAL_HPP_INCLUDED +#define BOOST_MPL_LESS_EQUAL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#define AUX778076_OP_NAME less_equal +#define AUX778076_OP_TOKEN <= +#include + +#endif // BOOST_MPL_LESS_EQUAL_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/limits/arity.hpp b/ThirdParty/boost-Subset/boost/mpl/limits/arity.hpp new file mode 100644 index 0000000000..8c3eb362ce --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/limits/arity.hpp @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_LIMITS_ARITY_HPP_INCLUDED +#define BOOST_MPL_LIMITS_ARITY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) +# define BOOST_MPL_LIMIT_METAFUNCTION_ARITY 5 +#endif + +#endif // BOOST_MPL_LIMITS_ARITY_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/limits/list.hpp b/ThirdParty/boost-Subset/boost/mpl/limits/list.hpp new file mode 100644 index 0000000000..b22d6a7b81 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/limits/list.hpp @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_LIMITS_LIST_HPP_INCLUDED +#define BOOST_MPL_LIMITS_LIST_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_LIMIT_LIST_SIZE) +# define BOOST_MPL_LIMIT_LIST_SIZE 20 +#endif + +#endif // BOOST_MPL_LIMITS_LIST_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/limits/unrolling.hpp b/ThirdParty/boost-Subset/boost/mpl/limits/unrolling.hpp new file mode 100644 index 0000000000..6dba94222e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/limits/unrolling.hpp @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_LIMITS_UNROLLING_HPP_INCLUDED +#define BOOST_MPL_LIMITS_UNROLLING_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_LIMIT_UNROLLING) +# define BOOST_MPL_LIMIT_UNROLLING 4 +#endif + +#endif // BOOST_MPL_LIMITS_UNROLLING_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/limits/vector.hpp b/ThirdParty/boost-Subset/boost/mpl/limits/vector.hpp new file mode 100644 index 0000000000..9007589168 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/limits/vector.hpp @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_LIMITS_VECTOR_HPP_INCLUDED +#define BOOST_MPL_LIMITS_VECTOR_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_LIMIT_VECTOR_SIZE) +# define BOOST_MPL_LIMIT_VECTOR_SIZE 20 +#endif + +#endif // BOOST_MPL_LIMITS_VECTOR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/list.hpp b/ThirdParty/boost-Subset/boost/mpl/list.hpp new file mode 100644 index 0000000000..cff8a4ddd8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list.hpp @@ -0,0 +1,57 @@ + +#ifndef BOOST_MPL_LIST_HPP_INCLUDED +#define BOOST_MPL_LIST_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include + +# include +# include +# include + +#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) +# define AUX778076_LIST_HEADER \ + BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE).hpp \ + /**/ +#else +# define AUX778076_LIST_HEADER \ + BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE)##.hpp \ + /**/ +#endif + +# include BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_LIST_HEADER) +# undef AUX778076_LIST_HEADER +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER list.hpp +# include + +#else + +# include + +# define AUX778076_SEQUENCE_NAME list +# define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_LIST_SIZE +# include + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_LIST_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/list/aux_/O1_size.hpp b/ThirdParty/boost-Subset/boost/mpl/list/aux_/O1_size.hpp new file mode 100644 index 0000000000..ccbc3f1b32 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/aux_/O1_size.hpp @@ -0,0 +1,33 @@ + +#ifndef BOOST_MPL_LIST_AUX_O1_SIZE_HPP_INCLUDED +#define BOOST_MPL_LIST_AUX_O1_SIZE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +namespace boost { namespace mpl { + +template<> +struct O1_size_impl< aux::list_tag > +{ + template< typename List > struct apply + : List::size + { + }; +}; + +}} + +#endif // BOOST_MPL_LIST_AUX_O1_SIZE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/list/aux_/begin_end.hpp b/ThirdParty/boost-Subset/boost/mpl/list/aux_/begin_end.hpp new file mode 100644 index 0000000000..b568bee21c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/aux_/begin_end.hpp @@ -0,0 +1,44 @@ + +#ifndef BOOST_MPL_LIST_AUX_BEGIN_END_HPP_INCLUDED +#define BOOST_MPL_LIST_AUX_BEGIN_END_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include + +namespace boost { namespace mpl { + +template<> +struct begin_impl< aux::list_tag > +{ + template< typename List > struct apply + { + typedef l_iter type; + }; +}; + +template<> +struct end_impl< aux::list_tag > +{ + template< typename > struct apply + { + typedef l_iter type; + }; +}; + +}} + +#endif // BOOST_MPL_LIST_AUX_BEGIN_END_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/list/aux_/clear.hpp b/ThirdParty/boost-Subset/boost/mpl/list/aux_/clear.hpp new file mode 100644 index 0000000000..b16162f7c0 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/aux_/clear.hpp @@ -0,0 +1,34 @@ + +#ifndef BOOST_MPL_LIST_AUX_CLEAR_HPP_INCLUDED +#define BOOST_MPL_LIST_AUX_CLEAR_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +namespace boost { namespace mpl { + +template<> +struct clear_impl< aux::list_tag > +{ + template< typename List > struct apply + { + typedef l_end type; + }; +}; + +}} + +#endif // BOOST_MPL_LIST_AUX_CLEAR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/list/aux_/empty.hpp b/ThirdParty/boost-Subset/boost/mpl/list/aux_/empty.hpp new file mode 100644 index 0000000000..95f9243947 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/aux_/empty.hpp @@ -0,0 +1,34 @@ + +#ifndef BOOST_MPL_LIST_AUX_EMPTY_HPP_INCLUDED +#define BOOST_MPL_LIST_AUX_EMPTY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +namespace boost { namespace mpl { + +template<> +struct empty_impl< aux::list_tag > +{ + template< typename List > struct apply + : not_ + { + }; +}; + +}} + +#endif // BOOST_MPL_LIST_AUX_EMPTY_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/list/aux_/front.hpp b/ThirdParty/boost-Subset/boost/mpl/list/aux_/front.hpp new file mode 100644 index 0000000000..9bea1fd342 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/aux_/front.hpp @@ -0,0 +1,33 @@ + +#ifndef BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED +#define BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +namespace boost { namespace mpl { + +template<> +struct front_impl< aux::list_tag > +{ + template< typename List > struct apply + { + typedef typename List::item type; + }; +}; + +}} + +#endif // BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/list/aux_/include_preprocessed.hpp b/ThirdParty/boost-Subset/boost/mpl/list/aux_/include_preprocessed.hpp new file mode 100644 index 0000000000..4f7cab2609 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/aux_/include_preprocessed.hpp @@ -0,0 +1,35 @@ + +// Copyright Aleksey Gurtovoy 2001-2006 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! + +#include + +#include +#include + +# define AUX778076_HEADER \ + aux_/preprocessed/plain/BOOST_MPL_PREPROCESSED_HEADER \ +/**/ + +#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(700)) +# define AUX778076_INCLUDE_STRING BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_HEADER) +# include AUX778076_INCLUDE_STRING +# undef AUX778076_INCLUDE_STRING +#else +# include BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_HEADER) +#endif + +# undef AUX778076_HEADER + +#undef BOOST_MPL_PREPROCESSED_HEADER diff --git a/ThirdParty/boost-Subset/boost/mpl/list/aux_/item.hpp b/ThirdParty/boost-Subset/boost/mpl/list/aux_/item.hpp new file mode 100644 index 0000000000..8505deb284 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/aux_/item.hpp @@ -0,0 +1,55 @@ + +#ifndef BOOST_MPL_LIST_AUX_NODE_HPP_INCLUDED +#define BOOST_MPL_LIST_AUX_NODE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include + +namespace boost { namespace mpl { + +template< + typename Size + , typename T + , typename Next + > +struct l_item +{ +// agurt, 17/jul/03: to facilitate the deficient 'is_sequence' implementation +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + typedef int begin; +#endif + typedef aux::list_tag tag; + typedef l_item type; + + typedef Size size; + typedef T item; + typedef Next next; +}; + +struct l_end +{ +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + typedef int begin; +#endif + typedef aux::list_tag tag; + typedef l_end type; + typedef long_<0> size; +}; + +}} + +#endif // BOOST_MPL_LIST_AUX_NODE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/list/aux_/iterator.hpp b/ThirdParty/boost-Subset/boost/mpl/list/aux_/iterator.hpp new file mode 100644 index 0000000000..6b5ea78630 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/aux_/iterator.hpp @@ -0,0 +1,76 @@ + +#ifndef BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED +#define BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< typename Node > +struct l_iter +{ + typedef aux::l_iter_tag tag; + typedef forward_iterator_tag category; +}; + +template< typename Node > +struct deref< l_iter > +{ + typedef typename Node::item type; +}; + +template< typename Node > +struct next< l_iter > +{ + typedef l_iter< typename Node::next > type; +}; + +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +template< typename Node > +struct l_iter +{ + typedef aux::l_iter_tag tag; + typedef forward_iterator_tag category; + typedef typename Node::item type; + typedef l_iter< typename mpl::next::type > next; +}; + +#endif + + +template<> struct l_iter +{ + typedef aux::l_iter_tag tag; + typedef forward_iterator_tag category; +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + typedef na type; + typedef l_iter next; +#endif +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, l_iter) + +}} + +#endif // BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/list/aux_/numbered.hpp b/ThirdParty/boost-Subset/boost/mpl/list/aux_/numbered.hpp new file mode 100644 index 0000000000..0cd49a6d36 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/aux_/numbered.hpp @@ -0,0 +1,68 @@ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +// Copyright Peter Dimov 2000-2002 +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if defined(BOOST_PP_IS_ITERATING) + +#include +#include +#include +#include + +#define i BOOST_PP_FRAME_ITERATION(1) + +#if i == 1 + +template< + BOOST_PP_ENUM_PARAMS(i, typename T) + > +struct list1 + : l_item< + long_<1> + , T0 + , l_end + > +{ + typedef list1 type; +}; + +#else + +# define MPL_AUX_LIST_TAIL(list, i, T) \ + BOOST_PP_CAT(list,BOOST_PP_DEC(i))< \ + BOOST_PP_ENUM_SHIFTED_PARAMS(i, T) \ + > \ + /**/ + +template< + BOOST_PP_ENUM_PARAMS(i, typename T) + > +struct BOOST_PP_CAT(list,i) + : l_item< + long_ + , T0 + , MPL_AUX_LIST_TAIL(list,i,T) + > +{ + typedef BOOST_PP_CAT(list,i) type; +}; + +# undef MPL_AUX_LIST_TAIL + +#endif // i == 1 + +#undef i + +#endif // BOOST_PP_IS_ITERATING diff --git a/ThirdParty/boost-Subset/boost/mpl/list/aux_/numbered_c.hpp b/ThirdParty/boost-Subset/boost/mpl/list/aux_/numbered_c.hpp new file mode 100644 index 0000000000..0006fd6cfc --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/aux_/numbered_c.hpp @@ -0,0 +1,71 @@ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if defined(BOOST_PP_IS_ITERATING) + +#include +#include +#include +#include + +#define i BOOST_PP_FRAME_ITERATION(1) + +#if i == 1 + +template< + typename T + , BOOST_PP_ENUM_PARAMS(i, T C) + > +struct list1_c + : l_item< + long_<1> + , integral_c + , l_end + > +{ + typedef list1_c type; + typedef T value_type; +}; + +#else + +# define MPL_AUX_LIST_C_TAIL(list, i, C) \ + BOOST_PP_CAT(BOOST_PP_CAT(list,BOOST_PP_DEC(i)),_c) \ + /**/ + +template< + typename T + , BOOST_PP_ENUM_PARAMS(i, T C) + > +struct BOOST_PP_CAT(BOOST_PP_CAT(list,i),_c) + : l_item< + long_ + , integral_c + , MPL_AUX_LIST_C_TAIL(list,i,C) + > +{ + typedef BOOST_PP_CAT(BOOST_PP_CAT(list,i),_c) type; + typedef T value_type; +}; + +# undef MPL_AUX_LIST_C_TAIL + +#endif // i == 1 + +#undef i + +#endif // BOOST_PP_IS_ITERATING diff --git a/ThirdParty/boost-Subset/boost/mpl/list/aux_/pop_front.hpp b/ThirdParty/boost-Subset/boost/mpl/list/aux_/pop_front.hpp new file mode 100644 index 0000000000..46a0414569 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/aux_/pop_front.hpp @@ -0,0 +1,34 @@ + +#ifndef BOOST_MPL_LIST_AUX_POP_FRONT_HPP_INCLUDED +#define BOOST_MPL_LIST_AUX_POP_FRONT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +namespace boost { namespace mpl { + +template<> +struct pop_front_impl< aux::list_tag > +{ + template< typename List > struct apply + { + typedef typename mpl::next::type type; + }; +}; + +}} + +#endif // BOOST_MPL_LIST_AUX_POP_FRONT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list10.hpp b/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list10.hpp new file mode 100644 index 0000000000..99368d2c18 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list10.hpp @@ -0,0 +1,149 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list/list10.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 + > +struct list1 + : l_item< + long_<1> + , T0 + , l_end + > +{ + typedef list1 type; +}; + +template< + typename T0, typename T1 + > +struct list2 + : l_item< + long_<2> + , T0 + , list1 + > +{ + typedef list2 type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct list3 + : l_item< + long_<3> + , T0 + , list2< T1,T2 > + > +{ + typedef list3 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct list4 + : l_item< + long_<4> + , T0 + , list3< T1,T2,T3 > + > +{ + typedef list4 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct list5 + : l_item< + long_<5> + , T0 + , list4< T1,T2,T3,T4 > + > +{ + typedef list5 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct list6 + : l_item< + long_<6> + , T0 + , list5< T1,T2,T3,T4,T5 > + > +{ + typedef list6 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct list7 + : l_item< + long_<7> + , T0 + , list6< T1,T2,T3,T4,T5,T6 > + > +{ + typedef list7 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct list8 + : l_item< + long_<8> + , T0 + , list7< T1,T2,T3,T4,T5,T6,T7 > + > +{ + typedef list8 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct list9 + : l_item< + long_<9> + , T0 + , list8< T1,T2,T3,T4,T5,T6,T7,T8 > + > +{ + typedef list9 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct list10 + : l_item< + long_<10> + , T0 + , list9< T1,T2,T3,T4,T5,T6,T7,T8,T9 > + > +{ + typedef list10 type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp b/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp new file mode 100644 index 0000000000..7133d71216 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp @@ -0,0 +1,164 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list/list10_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T + , T C0 + > +struct list1_c + : l_item< + long_<1> + , integral_c< T,C0 > + , l_end + > +{ + typedef list1_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1 + > +struct list2_c + : l_item< + long_<2> + , integral_c< T,C0 > + , list1_c< T,C1 > + > +{ + typedef list2_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2 + > +struct list3_c + : l_item< + long_<3> + , integral_c< T,C0 > + , list2_c< T,C1,C2 > + > +{ + typedef list3_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3 + > +struct list4_c + : l_item< + long_<4> + , integral_c< T,C0 > + , list3_c< T,C1,C2,C3 > + > +{ + typedef list4_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4 + > +struct list5_c + : l_item< + long_<5> + , integral_c< T,C0 > + , list4_c< T,C1,C2,C3,C4 > + > +{ + typedef list5_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5 + > +struct list6_c + : l_item< + long_<6> + , integral_c< T,C0 > + , list5_c< T,C1,C2,C3,C4,C5 > + > +{ + typedef list6_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6 + > +struct list7_c + : l_item< + long_<7> + , integral_c< T,C0 > + , list6_c< T,C1,C2,C3,C4,C5,C6 > + > +{ + typedef list7_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7 + > +struct list8_c + : l_item< + long_<8> + , integral_c< T,C0 > + , list7_c< T,C1,C2,C3,C4,C5,C6,C7 > + > +{ + typedef list8_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8 + > +struct list9_c + : l_item< + long_<9> + , integral_c< T,C0 > + , list8_c< T,C1,C2,C3,C4,C5,C6,C7,C8 > + > +{ + typedef list9_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9 + > +struct list10_c + : l_item< + long_<10> + , integral_c< T,C0 > + , list9_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9 > + > +{ + typedef list10_c type; + typedef T value_type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list20.hpp b/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list20.hpp new file mode 100644 index 0000000000..750e495f3f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list20.hpp @@ -0,0 +1,169 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list/list20.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct list11 + : l_item< + long_<11> + , T0 + , list10< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > + > +{ + typedef list11 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct list12 + : l_item< + long_<12> + , T0 + , list11< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > + > +{ + typedef list12 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct list13 + : l_item< + long_<13> + , T0 + , list12< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > + > +{ + typedef list13 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct list14 + : l_item< + long_<14> + , T0 + , list13< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > + > +{ + typedef list14 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct list15 + : l_item< + long_<15> + , T0 + , list14< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 > + > +{ + typedef list15 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct list16 + : l_item< + long_<16> + , T0 + , list15< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 > + > +{ + typedef list16 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct list17 + : l_item< + long_<17> + , T0 + , list16< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 > + > +{ + typedef list17 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct list18 + : l_item< + long_<18> + , T0 + , list17< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 > + > +{ + typedef list18 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct list19 + : l_item< + long_<19> + , T0 + , list18< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 > + > +{ + typedef list19 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list20 + : l_item< + long_<20> + , T0 + , list19< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 > + > +{ + typedef list20 type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp b/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp new file mode 100644 index 0000000000..7f15acf3e9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp @@ -0,0 +1,173 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list/list20_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + > +struct list11_c + : l_item< + long_<11> + , integral_c< T,C0 > + , list10_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > + > +{ + typedef list11_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11 + > +struct list12_c + : l_item< + long_<12> + , integral_c< T,C0 > + , list11_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > + > +{ + typedef list12_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12 + > +struct list13_c + : l_item< + long_<13> + , integral_c< T,C0 > + , list12_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > + > +{ + typedef list13_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13 + > +struct list14_c + : l_item< + long_<14> + , integral_c< T,C0 > + , list13_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 > + > +{ + typedef list14_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14 + > +struct list15_c + : l_item< + long_<15> + , integral_c< T,C0 > + , list14_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 > + > +{ + typedef list15_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15 + > +struct list16_c + : l_item< + long_<16> + , integral_c< T,C0 > + , list15_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 > + > +{ + typedef list16_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16 + > +struct list17_c + : l_item< + long_<17> + , integral_c< T,C0 > + , list16_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 > + > +{ + typedef list17_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17 + > +struct list18_c + : l_item< + long_<18> + , integral_c< T,C0 > + , list17_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 > + > +{ + typedef list18_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18 + > +struct list19_c + : l_item< + long_<19> + , integral_c< T,C0 > + , list18_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 > + > +{ + typedef list19_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19 + > +struct list20_c + : l_item< + long_<20> + , integral_c< T,C0 > + , list19_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 > + > +{ + typedef list20_c type; + typedef T value_type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list30.hpp b/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list30.hpp new file mode 100644 index 0000000000..5459101196 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list30.hpp @@ -0,0 +1,189 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list/list30.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20 + > +struct list21 + : l_item< + long_<21> + , T0 + , list20< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20 > + > +{ + typedef list21 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21 + > +struct list22 + : l_item< + long_<22> + , T0 + , list21< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21 > + > +{ + typedef list22 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22 + > +struct list23 + : l_item< + long_<23> + , T0 + , list22< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22 > + > +{ + typedef list23 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23 + > +struct list24 + : l_item< + long_<24> + , T0 + , list23< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23 > + > +{ + typedef list24 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + > +struct list25 + : l_item< + long_<25> + , T0 + , list24< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24 > + > +{ + typedef list25 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25 + > +struct list26 + : l_item< + long_<26> + , T0 + , list25< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25 > + > +{ + typedef list26 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26 + > +struct list27 + : l_item< + long_<27> + , T0 + , list26< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26 > + > +{ + typedef list27 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27 + > +struct list28 + : l_item< + long_<28> + , T0 + , list27< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27 > + > +{ + typedef list28 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28 + > +struct list29 + : l_item< + long_<29> + , T0 + , list28< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28 > + > +{ + typedef list29 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + > +struct list30 + : l_item< + long_<30> + , T0 + , list29< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29 > + > +{ + typedef list30 type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp b/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp new file mode 100644 index 0000000000..5393d792bd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp @@ -0,0 +1,183 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list/list30_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + > +struct list21_c + : l_item< + long_<21> + , integral_c< T,C0 > + , list20_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20 > + > +{ + typedef list21_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21 + > +struct list22_c + : l_item< + long_<22> + , integral_c< T,C0 > + , list21_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21 > + > +{ + typedef list22_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22 + > +struct list23_c + : l_item< + long_<23> + , integral_c< T,C0 > + , list22_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22 > + > +{ + typedef list23_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23 + > +struct list24_c + : l_item< + long_<24> + , integral_c< T,C0 > + , list23_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23 > + > +{ + typedef list24_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24 + > +struct list25_c + : l_item< + long_<25> + , integral_c< T,C0 > + , list24_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24 > + > +{ + typedef list25_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25 + > +struct list26_c + : l_item< + long_<26> + , integral_c< T,C0 > + , list25_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25 > + > +{ + typedef list26_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26 + > +struct list27_c + : l_item< + long_<27> + , integral_c< T,C0 > + , list26_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26 > + > +{ + typedef list27_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27 + > +struct list28_c + : l_item< + long_<28> + , integral_c< T,C0 > + , list27_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27 > + > +{ + typedef list28_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28 + > +struct list29_c + : l_item< + long_<29> + , integral_c< T,C0 > + , list28_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28 > + > +{ + typedef list29_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29 + > +struct list30_c + : l_item< + long_<30> + , integral_c< T,C0 > + , list29_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29 > + > +{ + typedef list30_c type; + typedef T value_type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list40.hpp b/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list40.hpp new file mode 100644 index 0000000000..68c6761364 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list40.hpp @@ -0,0 +1,209 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list/list40.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30 + > +struct list31 + : l_item< + long_<31> + , T0 + , list30< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30 > + > +{ + typedef list31 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31 + > +struct list32 + : l_item< + long_<32> + , T0 + , list31< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31 > + > +{ + typedef list32 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32 + > +struct list33 + : l_item< + long_<33> + , T0 + , list32< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32 > + > +{ + typedef list33 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33 + > +struct list34 + : l_item< + long_<34> + , T0 + , list33< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33 > + > +{ + typedef list34 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + > +struct list35 + : l_item< + long_<35> + , T0 + , list34< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34 > + > +{ + typedef list35 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35 + > +struct list36 + : l_item< + long_<36> + , T0 + , list35< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35 > + > +{ + typedef list36 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36 + > +struct list37 + : l_item< + long_<37> + , T0 + , list36< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36 > + > +{ + typedef list37 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37 + > +struct list38 + : l_item< + long_<38> + , T0 + , list37< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37 > + > +{ + typedef list38 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38 + > +struct list39 + : l_item< + long_<39> + , T0 + , list38< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38 > + > +{ + typedef list39 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + > +struct list40 + : l_item< + long_<40> + , T0 + , list39< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39 > + > +{ + typedef list40 type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp b/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp new file mode 100644 index 0000000000..0c51ba2095 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp @@ -0,0 +1,193 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list/list40_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + > +struct list31_c + : l_item< + long_<31> + , integral_c< T,C0 > + , list30_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30 > + > +{ + typedef list31_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31 + > +struct list32_c + : l_item< + long_<32> + , integral_c< T,C0 > + , list31_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31 > + > +{ + typedef list32_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32 + > +struct list33_c + : l_item< + long_<33> + , integral_c< T,C0 > + , list32_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32 > + > +{ + typedef list33_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33 + > +struct list34_c + : l_item< + long_<34> + , integral_c< T,C0 > + , list33_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33 > + > +{ + typedef list34_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34 + > +struct list35_c + : l_item< + long_<35> + , integral_c< T,C0 > + , list34_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34 > + > +{ + typedef list35_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35 + > +struct list36_c + : l_item< + long_<36> + , integral_c< T,C0 > + , list35_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35 > + > +{ + typedef list36_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36 + > +struct list37_c + : l_item< + long_<37> + , integral_c< T,C0 > + , list36_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36 > + > +{ + typedef list37_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37 + > +struct list38_c + : l_item< + long_<38> + , integral_c< T,C0 > + , list37_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37 > + > +{ + typedef list38_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38 + > +struct list39_c + : l_item< + long_<39> + , integral_c< T,C0 > + , list38_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38 > + > +{ + typedef list39_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39 + > +struct list40_c + : l_item< + long_<40> + , integral_c< T,C0 > + , list39_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39 > + > +{ + typedef list40_c type; + typedef T value_type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list50.hpp b/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list50.hpp new file mode 100644 index 0000000000..4cc22da278 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list50.hpp @@ -0,0 +1,229 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list/list50.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40 + > +struct list41 + : l_item< + long_<41> + , T0 + , list40< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40 > + > +{ + typedef list41 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41 + > +struct list42 + : l_item< + long_<42> + , T0 + , list41< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41 > + > +{ + typedef list42 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42 + > +struct list43 + : l_item< + long_<43> + , T0 + , list42< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42 > + > +{ + typedef list43 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43 + > +struct list44 + : l_item< + long_<44> + , T0 + , list43< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43 > + > +{ + typedef list44 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + > +struct list45 + : l_item< + long_<45> + , T0 + , list44< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44 > + > +{ + typedef list45 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + , typename T45 + > +struct list46 + : l_item< + long_<46> + , T0 + , list45< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45 > + > +{ + typedef list46 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + , typename T45, typename T46 + > +struct list47 + : l_item< + long_<47> + , T0 + , list46< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46 > + > +{ + typedef list47 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + , typename T45, typename T46, typename T47 + > +struct list48 + : l_item< + long_<48> + , T0 + , list47< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47 > + > +{ + typedef list48 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + , typename T45, typename T46, typename T47, typename T48 + > +struct list49 + : l_item< + long_<49> + , T0 + , list48< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48 > + > +{ + typedef list49 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + , typename T45, typename T46, typename T47, typename T48, typename T49 + > +struct list50 + : l_item< + long_<50> + , T0 + , list49< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48,T49 > + > +{ + typedef list50 type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp b/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp new file mode 100644 index 0000000000..28c061d5bf --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp @@ -0,0 +1,203 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/list/list50_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + > +struct list41_c + : l_item< + long_<41> + , integral_c< T,C0 > + , list40_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40 > + > +{ + typedef list41_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41 + > +struct list42_c + : l_item< + long_<42> + , integral_c< T,C0 > + , list41_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41 > + > +{ + typedef list42_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42 + > +struct list43_c + : l_item< + long_<43> + , integral_c< T,C0 > + , list42_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42 > + > +{ + typedef list43_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42, T C43 + > +struct list44_c + : l_item< + long_<44> + , integral_c< T,C0 > + , list43_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43 > + > +{ + typedef list44_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42, T C43, T C44 + > +struct list45_c + : l_item< + long_<45> + , integral_c< T,C0 > + , list44_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44 > + > +{ + typedef list45_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42, T C43, T C44, T C45 + > +struct list46_c + : l_item< + long_<46> + , integral_c< T,C0 > + , list45_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45 > + > +{ + typedef list46_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42, T C43, T C44, T C45, T C46 + > +struct list47_c + : l_item< + long_<47> + , integral_c< T,C0 > + , list46_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46 > + > +{ + typedef list47_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42, T C43, T C44, T C45, T C46, T C47 + > +struct list48_c + : l_item< + long_<48> + , integral_c< T,C0 > + , list47_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47 > + > +{ + typedef list48_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48 + > +struct list49_c + : l_item< + long_<49> + , integral_c< T,C0 > + , list48_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47,C48 > + > +{ + typedef list49_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48, T C49 + > +struct list50_c + : l_item< + long_<50> + , integral_c< T,C0 > + , list49_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47,C48,C49 > + > +{ + typedef list50_c type; + typedef T value_type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/list/aux_/push_back.hpp b/ThirdParty/boost-Subset/boost/mpl/list/aux_/push_back.hpp new file mode 100644 index 0000000000..8f3b73e430 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/aux_/push_back.hpp @@ -0,0 +1,36 @@ + +#ifndef BOOST_MPL_LIST_AUX_PUSH_BACK_HPP_INCLUDED +#define BOOST_MPL_LIST_AUX_PUSH_BACK_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +namespace boost { namespace mpl { + +template< typename Tag > struct has_push_back_impl; + +template<> +struct has_push_back_impl< aux::list_tag > +{ + template< typename Seq > struct apply + : false_ + { + }; +}; + +}} + +#endif // BOOST_MPL_LIST_AUX_PUSH_BACK_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/list/aux_/push_front.hpp b/ThirdParty/boost-Subset/boost/mpl/list/aux_/push_front.hpp new file mode 100644 index 0000000000..fcfbe4ab3e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/aux_/push_front.hpp @@ -0,0 +1,39 @@ + +#ifndef BOOST_MPL_LIST_AUX_PUSH_FRONT_HPP_INCLUDED +#define BOOST_MPL_LIST_AUX_PUSH_FRONT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include + +namespace boost { namespace mpl { + +template<> +struct push_front_impl< aux::list_tag > +{ + template< typename List, typename T > struct apply + { + typedef l_item< + typename next::type + , T + , typename List::type + > type; + }; +}; + +}} + +#endif // BOOST_MPL_LIST_AUX_PUSH_FRONT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/list/aux_/size.hpp b/ThirdParty/boost-Subset/boost/mpl/list/aux_/size.hpp new file mode 100644 index 0000000000..f5e7feafda --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/aux_/size.hpp @@ -0,0 +1,33 @@ + +#ifndef BOOST_MPL_LIST_AUX_SIZE_HPP_INCLUDED +#define BOOST_MPL_LIST_AUX_SIZE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +namespace boost { namespace mpl { + +template<> +struct size_impl< aux::list_tag > +{ + template< typename List > struct apply + : List::size + { + }; +}; + +}} + +#endif // BOOST_MPL_LIST_AUX_SIZE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/list/aux_/tag.hpp b/ThirdParty/boost-Subset/boost/mpl/list/aux_/tag.hpp new file mode 100644 index 0000000000..f5ed2bbfe6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/aux_/tag.hpp @@ -0,0 +1,24 @@ + +#ifndef BOOST_MPL_LIST_AUX_TAG_HPP_INCLUDED +#define BOOST_MPL_LIST_AUX_TAG_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { namespace aux { + +struct list_tag; +struct l_iter_tag; + +}}} + +#endif // BOOST_MPL_LIST_AUX_TAG_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/list/list0.hpp b/ThirdParty/boost-Subset/boost/mpl/list/list0.hpp new file mode 100644 index 0000000000..8e06b8d088 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/list0.hpp @@ -0,0 +1,42 @@ + +#ifndef BOOST_MPL_LIST_LIST0_HPP_INCLUDED +#define BOOST_MPL_LIST_LIST0_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +template< typename Dummy = na > struct list0; + +template<> struct list0 + : l_end +{ + typedef l_end type; +}; + +}} + +#endif // BOOST_MPL_LIST_LIST0_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/list/list0_c.hpp b/ThirdParty/boost-Subset/boost/mpl/list/list0_c.hpp new file mode 100644 index 0000000000..807ca1c2c9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/list0_c.hpp @@ -0,0 +1,31 @@ + +#ifndef BOOST_MPL_LIST_LIST0_C_HPP_INCLUDED +#define BOOST_MPL_LIST_LIST0_C_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +namespace boost { namespace mpl { + +template< typename T > struct list0_c + : l_end +{ + typedef l_end type; + typedef T value_type; +}; + +}} + +#endif // BOOST_MPL_LIST_LIST0_C_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/list/list10.hpp b/ThirdParty/boost-Subset/boost/mpl/list/list10.hpp new file mode 100644 index 0000000000..d32d0d8c77 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/list10.hpp @@ -0,0 +1,43 @@ + +#ifndef BOOST_MPL_LIST_LIST10_HPP_INCLUDED +#define BOOST_MPL_LIST_LIST10_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER list10.hpp +# include + +#else + +# include + +namespace boost { namespace mpl { + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(1, 10, )) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_LIST_LIST10_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/list/list10_c.hpp b/ThirdParty/boost-Subset/boost/mpl/list/list10_c.hpp new file mode 100644 index 0000000000..25c8f9defb --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/list10_c.hpp @@ -0,0 +1,43 @@ + +#ifndef BOOST_MPL_LIST_LIST10_C_HPP_INCLUDED +#define BOOST_MPL_LIST_LIST10_C_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER list10_c.hpp +# include + +#else + +# include + +namespace boost { namespace mpl { + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(1, 10, )) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_LIST_LIST10_C_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/list/list20.hpp b/ThirdParty/boost-Subset/boost/mpl/list/list20.hpp new file mode 100644 index 0000000000..724cabd237 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/list20.hpp @@ -0,0 +1,43 @@ + +#ifndef BOOST_MPL_LIST_LIST20_HPP_INCLUDED +#define BOOST_MPL_LIST_LIST20_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER list20.hpp +# include + +#else + +# include + +namespace boost { namespace mpl { + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(11, 20, )) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_LIST_LIST20_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/list/list20_c.hpp b/ThirdParty/boost-Subset/boost/mpl/list/list20_c.hpp new file mode 100644 index 0000000000..0026f695ac --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/list20_c.hpp @@ -0,0 +1,43 @@ + +#ifndef BOOST_MPL_LIST_LIST20_C_HPP_INCLUDED +#define BOOST_MPL_LIST_LIST20_C_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER list20_c.hpp +# include + +#else + +# include + +namespace boost { namespace mpl { + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(11, 20, )) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_LIST_LIST20_C_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/list/list30.hpp b/ThirdParty/boost-Subset/boost/mpl/list/list30.hpp new file mode 100644 index 0000000000..a9004c7376 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/list30.hpp @@ -0,0 +1,43 @@ + +#ifndef BOOST_MPL_LIST_LIST30_HPP_INCLUDED +#define BOOST_MPL_LIST_LIST30_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER list30.hpp +# include + +#else + +# include + +namespace boost { namespace mpl { + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(21, 30, )) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_LIST_LIST30_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/list/list30_c.hpp b/ThirdParty/boost-Subset/boost/mpl/list/list30_c.hpp new file mode 100644 index 0000000000..c996574778 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/list30_c.hpp @@ -0,0 +1,43 @@ + +#ifndef BOOST_MPL_LIST_LIST30_C_HPP_INCLUDED +#define BOOST_MPL_LIST_LIST30_C_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER list30_c.hpp +# include + +#else + +# include + +namespace boost { namespace mpl { + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(21, 30, )) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_LIST_LIST30_C_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/list/list40.hpp b/ThirdParty/boost-Subset/boost/mpl/list/list40.hpp new file mode 100644 index 0000000000..02f869efbe --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/list40.hpp @@ -0,0 +1,43 @@ + +#ifndef BOOST_MPL_LIST_LIST40_HPP_INCLUDED +#define BOOST_MPL_LIST_LIST40_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER list40.hpp +# include + +#else + +# include + +namespace boost { namespace mpl { + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(31, 40, )) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_LIST_LIST40_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/list/list40_c.hpp b/ThirdParty/boost-Subset/boost/mpl/list/list40_c.hpp new file mode 100644 index 0000000000..808d599dd9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/list40_c.hpp @@ -0,0 +1,43 @@ + +#ifndef BOOST_MPL_LIST_LIST40_C_HPP_INCLUDED +#define BOOST_MPL_LIST_LIST40_C_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER list40_c.hpp +# include + +#else + +# include + +namespace boost { namespace mpl { + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(31, 40, )) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_LIST_LIST40_C_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/list/list50.hpp b/ThirdParty/boost-Subset/boost/mpl/list/list50.hpp new file mode 100644 index 0000000000..f16c68ceba --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/list50.hpp @@ -0,0 +1,43 @@ + +#ifndef BOOST_MPL_LIST_LIST50_HPP_INCLUDED +#define BOOST_MPL_LIST_LIST50_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER list50.hpp +# include + +#else + +# include + +namespace boost { namespace mpl { + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(41, 50, )) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_LIST_LIST50_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/list/list50_c.hpp b/ThirdParty/boost-Subset/boost/mpl/list/list50_c.hpp new file mode 100644 index 0000000000..20692d898e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/list/list50_c.hpp @@ -0,0 +1,43 @@ + +#ifndef BOOST_MPL_LIST_LIST50_C_HPP_INCLUDED +#define BOOST_MPL_LIST_LIST50_C_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER list50_c.hpp +# include + +#else + +# include + +namespace boost { namespace mpl { + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(41, 50, )) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_LIST_LIST50_C_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/logical.hpp b/ThirdParty/boost-Subset/boost/mpl/logical.hpp new file mode 100644 index 0000000000..c8236b5fe8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/logical.hpp @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_LOGICAL_HPP_INCLUDED +#define BOOST_MPL_LOGICAL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +#endif // BOOST_MPL_LOGICAL_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/long.hpp b/ThirdParty/boost-Subset/boost/mpl/long.hpp new file mode 100644 index 0000000000..c455267341 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/long.hpp @@ -0,0 +1,22 @@ + +#ifndef BOOST_MPL_LONG_HPP_INCLUDED +#define BOOST_MPL_LONG_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#define AUX_WRAPPER_VALUE_TYPE long +#include + +#endif // BOOST_MPL_LONG_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/long_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/long_fwd.hpp new file mode 100644 index 0000000000..5f62f2b81c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/long_fwd.hpp @@ -0,0 +1,27 @@ + +#ifndef BOOST_MPL_LONG_FWD_HPP_INCLUDED +#define BOOST_MPL_LONG_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct long_; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(long_) + +#endif // BOOST_MPL_LONG_FWD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/minus.hpp b/ThirdParty/boost-Subset/boost/mpl/minus.hpp new file mode 100644 index 0000000000..9f29f74b54 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/minus.hpp @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_MINUS_HPP_INCLUDED +#define BOOST_MPL_MINUS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#define AUX778076_OP_NAME minus +#define AUX778076_OP_TOKEN - +#include + +#endif // BOOST_MPL_MINUS_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/multiplies.hpp b/ThirdParty/boost-Subset/boost/mpl/multiplies.hpp new file mode 100644 index 0000000000..53c39d98a4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/multiplies.hpp @@ -0,0 +1,53 @@ + +#ifndef BOOST_MPL_MULTIPLIES_HPP_INCLUDED +#define BOOST_MPL_MULTIPLIES_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include + +// backward compatibility header, deprecated + +namespace boost { namespace mpl { + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +# define AUX778076_OP_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY +#else +# define AUX778076_OP_ARITY 2 +#endif + +template< + BOOST_MPL_PP_DEFAULT_PARAMS(AUX778076_OP_ARITY, typename N, na) + > +struct multiplies + : times< BOOST_MPL_PP_PARAMS(AUX778076_OP_ARITY, N) > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + AUX778076_OP_ARITY + , multiplies + , ( BOOST_MPL_PP_PARAMS(AUX778076_OP_ARITY, N) ) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(AUX778076_OP_ARITY, multiplies) + +#undef AUX778076_OP_ARITY + +}} + +#endif // BOOST_MPL_MULTIPLIES_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/negate.hpp b/ThirdParty/boost-Subset/boost/mpl/negate.hpp new file mode 100644 index 0000000000..d6aa065459 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/negate.hpp @@ -0,0 +1,81 @@ + +#ifndef BOOST_MPL_NEGATE_HPP_INCLUDED +#define BOOST_MPL_NEGATE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +template< typename Tag > struct negate_impl; + +template< typename T > struct negate_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N) + > +struct negate +#if !defined(BOOST_MPL_CFG_MSVC_ETI_BUG) + : negate_impl< + typename negate_tag::type + >::template apply::type +#else + : aux::msvc_eti_base< typename apply_wrap1< + negate_impl< typename negate_tag::type > + , N + >::type >::type +#endif +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1, negate, (N)) +}; + +BOOST_MPL_AUX_NA_SPEC(1, negate) + + +#if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC) +namespace aux { +template< typename T, T n > struct negate_wknd +{ + BOOST_STATIC_CONSTANT(T, value = -n); + typedef integral_c type; +}; +} +#endif + +template<> +struct negate_impl +{ +#if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC) + template< typename N > struct apply + : aux::negate_wknd< typename N::value_type, N::value > +#else + template< typename N > struct apply + : integral_c< typename N::value_type, (-N::value) > +#endif + { + }; +}; + +}} + +#endif // BOOST_MPL_NEGATE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/next.hpp b/ThirdParty/boost-Subset/boost/mpl/next.hpp new file mode 100644 index 0000000000..954b2226c6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/next.hpp @@ -0,0 +1,19 @@ + +#ifndef BOOST_MPL_NEXT_HPP_INCLUDED +#define BOOST_MPL_NEXT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#endif // BOOST_MPL_NEXT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/next_prior.hpp b/ThirdParty/boost-Subset/boost/mpl/next_prior.hpp new file mode 100644 index 0000000000..d45fa20eaa --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/next_prior.hpp @@ -0,0 +1,49 @@ + +#ifndef BOOST_MPL_NEXT_PRIOR_HPP_INCLUDED +#define BOOST_MPL_NEXT_PRIOR_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +namespace boost { namespace mpl { + +BOOST_MPL_AUX_COMMON_NAME_WKND(next) +BOOST_MPL_AUX_COMMON_NAME_WKND(prior) + +template< + typename BOOST_MPL_AUX_NA_PARAM(T) + > +struct next +{ + typedef typename T::next type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,next,(T)) +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(T) + > +struct prior +{ + typedef typename T::prior type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,prior,(T)) +}; + +BOOST_MPL_AUX_NA_SPEC(1, next) +BOOST_MPL_AUX_NA_SPEC(1, prior) + +}} + +#endif // BOOST_MPL_NEXT_PRIOR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/not.hpp b/ThirdParty/boost-Subset/boost/mpl/not.hpp new file mode 100644 index 0000000000..d5f6025579 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/not.hpp @@ -0,0 +1,51 @@ + +#ifndef BOOST_MPL_NOT_HPP_INCLUDED +#define BOOST_MPL_NOT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +namespace aux { + +template< BOOST_MPL_AUX_NTTP_DECL(long, C_) > // 'long' is intentional here +struct not_impl + : bool_ +{ +}; + +} // namespace aux + + +template< + typename BOOST_MPL_AUX_NA_PARAM(T) + > +struct not_ + : aux::not_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T)::value + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,not_,(T)) +}; + +BOOST_MPL_AUX_NA_SPEC(1,not_) + +}} + +#endif // BOOST_MPL_NOT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/not_equal_to.hpp b/ThirdParty/boost-Subset/boost/mpl/not_equal_to.hpp new file mode 100644 index 0000000000..11ef3424c9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/not_equal_to.hpp @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_NOT_EQUAL_TO_HPP_INCLUDED +#define BOOST_MPL_NOT_EQUAL_TO_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#define AUX778076_OP_NAME not_equal_to +#define AUX778076_OP_TOKEN != +#include + +#endif // BOOST_MPL_NOT_EQUAL_TO_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/numeric_cast.hpp b/ThirdParty/boost-Subset/boost/mpl/numeric_cast.hpp new file mode 100644 index 0000000000..6541470445 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/numeric_cast.hpp @@ -0,0 +1,41 @@ + +#ifndef BOOST_MPL_NUMERIC_CAST_HPP_INCLUDED +#define BOOST_MPL_NUMERIC_CAST_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +// agurt 21/sep/04: portability macro for the sake of MSVC 6.x-7.0; +// resolves conflicts with 'boost::numeric_cast' function template. +// use it in your own code _only_ if you care about compatibility with +// these outdated compilers! +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570) ) +# define BOOST_MPL_AUX_NUMERIC_CAST numeric_cast_ +#else +# define BOOST_MPL_AUX_NUMERIC_CAST numeric_cast +#endif + +namespace boost { namespace mpl { + +// no default implementation; the definition is needed to make MSVC happy + +template< typename SourceTag, typename TargetTag > struct BOOST_MPL_AUX_NUMERIC_CAST +{ + template< typename N > struct apply; +}; + +}} + +#endif // BOOST_MPL_NUMERIC_CAST_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/or.hpp b/ThirdParty/boost-Subset/boost/mpl/or.hpp new file mode 100644 index 0000000000..f9704d5166 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/or.hpp @@ -0,0 +1,61 @@ + +#ifndef BOOST_MPL_OR_HPP_INCLUDED +#define BOOST_MPL_OR_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# include +# include +# include +# include +# include + +// agurt, 19/may/04: workaround a conflict with header's +// 'or' and 'and' macros, see http://tinyurl.com/3et69; 'defined(or)' +// has to be checked in a separate condition, otherwise GCC complains +// about 'or' being an alternative token +#if defined(_MSC_VER) && !defined(__clang__) +#ifndef __GCCXML__ +#if defined(or) +# pragma push_macro("or") +# undef or +# define or(x) +#endif +#endif +#endif + +# define BOOST_MPL_PREPROCESSED_HEADER or.hpp +# include + +#if defined(_MSC_VER) && !defined(__clang__) +#ifndef __GCCXML__ +#if defined(or) +# pragma pop_macro("or") +#endif +#endif +#endif + +#else + +# define AUX778076_OP_NAME or_ +# define AUX778076_OP_VALUE1 true +# define AUX778076_OP_VALUE2 false +# include + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_OR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/pair.hpp b/ThirdParty/boost-Subset/boost/mpl/pair.hpp new file mode 100644 index 0000000000..67c01d73ce --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/pair.hpp @@ -0,0 +1,70 @@ + +#ifndef BOOST_MPL_PAIR_HPP_INCLUDED +#define BOOST_MPL_PAIR_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct pair +{ + typedef pair type; + typedef T1 first; + typedef T2 second; + + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,pair,(T1,T2)) +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(P) + > +struct first +{ +#if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) + typedef typename P::first type; +#else + typedef typename aux::msvc_eti_base

::first type; +#endif + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,first,(P)) +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(P) + > +struct second +{ +#if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) + typedef typename P::second type; +#else + typedef typename aux::msvc_eti_base

::second type; +#endif + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,second,(P)) +}; + + +BOOST_MPL_AUX_NA_SPEC_NO_ETI(2, pair) +BOOST_MPL_AUX_NA_SPEC(1, first) +BOOST_MPL_AUX_NA_SPEC(1, second) + +}} + +#endif // BOOST_MPL_PAIR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/placeholders.hpp b/ThirdParty/boost-Subset/boost/mpl/placeholders.hpp new file mode 100644 index 0000000000..df0373ca57 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/placeholders.hpp @@ -0,0 +1,100 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED +#define BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include + +# if !defined(BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE) +# define BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(type) \ + using ::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::type; \ + /**/ +# else +# define BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(type) /**/ +# endif + +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER placeholders.hpp +# include + +#else + +# include +# include +# include +# include + +// watch out for GNU gettext users, who #define _(x) +#if !defined(_) || defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<-1> _; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +} + +}} +#endif + +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY + 1, )) +#include BOOST_PP_ITERATE() + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED + +///// iteration + +#else +#define i_ BOOST_PP_FRAME_ITERATION(1) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +typedef arg BOOST_PP_CAT(_,i_); + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(BOOST_PP_CAT(_,i_)) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::BOOST_PP_CAT(_,i_); +} + +}} + +#undef i_ +#endif // BOOST_PP_IS_ITERATING diff --git a/ThirdParty/boost-Subset/boost/mpl/plus.hpp b/ThirdParty/boost-Subset/boost/mpl/plus.hpp new file mode 100644 index 0000000000..455920b5d1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/plus.hpp @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_PLUS_HPP_INCLUDED +#define BOOST_MPL_PLUS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#define AUX778076_OP_NAME plus +#define AUX778076_OP_TOKEN + +#include + +#endif // BOOST_MPL_PLUS_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/pop_back_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/pop_back_fwd.hpp new file mode 100644 index 0000000000..70957046cd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/pop_back_fwd.hpp @@ -0,0 +1,24 @@ + +#ifndef BOOST_MPL_POP_BACK_FWD_HPP_INCLUDED +#define BOOST_MPL_POP_BACK_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct pop_back_impl; +template< typename Sequence > struct pop_back; + +}} + +#endif // BOOST_MPL_POP_BACK_FWD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/pop_front_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/pop_front_fwd.hpp new file mode 100644 index 0000000000..719c8b218a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/pop_front_fwd.hpp @@ -0,0 +1,24 @@ + +#ifndef BOOST_MPL_POP_FRONT_FWD_HPP_INCLUDED +#define BOOST_MPL_POP_FRONT_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct pop_front_impl; +template< typename Sequence > struct pop_front; + +}} + +#endif // BOOST_MPL_POP_FRONT_FWD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/prior.hpp b/ThirdParty/boost-Subset/boost/mpl/prior.hpp new file mode 100644 index 0000000000..849802cfa1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/prior.hpp @@ -0,0 +1,19 @@ + +#ifndef BOOST_MPL_PRIOR_HPP_INCLUDED +#define BOOST_MPL_PRIOR_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#endif // BOOST_MPL_PRIOR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/protect.hpp b/ThirdParty/boost-Subset/boost/mpl/protect.hpp new file mode 100644 index 0000000000..80574c2750 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/protect.hpp @@ -0,0 +1,55 @@ + +#ifndef BOOST_MPL_PROTECT_HPP_INCLUDED +#define BOOST_MPL_PROTECT_HPP_INCLUDED + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T) + , int not_le_ = 0 + > +struct protect : T +{ +#if BOOST_WORKAROUND(__EDG_VERSION__, == 238) + typedef mpl::protect type; +#else + typedef protect type; +#endif +}; + +#if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +namespace aux { +template< BOOST_MPL_AUX_NTTP_DECL(int, N), typename T > +struct arity< protect, N > + : arity +{ +}; +} // namespace aux +#endif + +BOOST_MPL_AUX_NA_SPEC_MAIN(1, protect) +#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(1, 1, protect) +#endif + +}} + +#endif // BOOST_MPL_PROTECT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/push_back.hpp b/ThirdParty/boost-Subset/boost/mpl/push_back.hpp new file mode 100644 index 0000000000..95a2587be6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/push_back.hpp @@ -0,0 +1,53 @@ + +#ifndef BOOST_MPL_PUSH_BACK_HPP_INCLUDED +#define BOOST_MPL_PUSH_BACK_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(T) + > +struct push_back + : push_back_impl< typename sequence_tag::type > + ::template apply< Sequence,T > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,push_back,(Sequence,T)) +}; + + +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + > +struct has_push_back + : has_push_back_impl< typename sequence_tag::type > + ::template apply< Sequence > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,has_push_back,(Sequence)) +}; + + +BOOST_MPL_AUX_NA_SPEC(2, push_back) +BOOST_MPL_AUX_NA_SPEC(1, has_push_back) + +}} + +#endif // BOOST_MPL_PUSH_BACK_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/push_back_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/push_back_fwd.hpp new file mode 100644 index 0000000000..7a4f7a754a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/push_back_fwd.hpp @@ -0,0 +1,24 @@ + +#ifndef BOOST_MPL_PUSH_BACK_FWD_HPP_INCLUDED +#define BOOST_MPL_PUSH_BACK_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct push_back_impl; +template< typename Sequence, typename T > struct push_back; + +}} + +#endif // BOOST_MPL_PUSH_BACK_FWD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/push_front.hpp b/ThirdParty/boost-Subset/boost/mpl/push_front.hpp new file mode 100644 index 0000000000..e4d0dfb7fb --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/push_front.hpp @@ -0,0 +1,52 @@ + +#ifndef BOOST_MPL_PUSH_FRONT_HPP_INCLUDED +#define BOOST_MPL_PUSH_FRONT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(T) + > +struct push_front + : push_front_impl< typename sequence_tag::type > + ::template apply< Sequence,T > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,push_front,(Sequence,T)) +}; + + +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + > +struct has_push_front + : has_push_front_impl< typename sequence_tag::type > + ::template apply< Sequence > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,has_push_front,(Sequence)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, push_front) +BOOST_MPL_AUX_NA_SPEC(1, has_push_front) + +}} + +#endif // BOOST_MPL_PUSH_FRONT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/push_front_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/push_front_fwd.hpp new file mode 100644 index 0000000000..d6ad5af572 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/push_front_fwd.hpp @@ -0,0 +1,24 @@ + +#ifndef BOOST_MPL_PUSH_FRONT_FWD_HPP_INCLUDED +#define BOOST_MPL_PUSH_FRONT_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct push_front_impl; +template< typename Sequence, typename T > struct push_front; + +}} + +#endif // BOOST_MPL_PUSH_FRONT_FWD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/quote.hpp b/ThirdParty/boost-Subset/boost/mpl/quote.hpp new file mode 100644 index 0000000000..242c2e7afb --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/quote.hpp @@ -0,0 +1,151 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_QUOTE_HPP_INCLUDED +#define BOOST_MPL_QUOTE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2008 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +#endif + +#include +#include + +#if defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) \ + && !defined(BOOST_MPL_CFG_BCC590_WORKAROUNDS) +# define BOOST_MPL_CFG_NO_QUOTE_TEMPLATE +#endif + +#if !defined(BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS) \ + && defined(BOOST_MPL_CFG_NO_HAS_XXX) +# define BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER quote.hpp +# include + +#else + +# include +# include +# include +# include + +# include +# include + +#if !defined(BOOST_MPL_CFG_NO_QUOTE_TEMPLATE) + +namespace boost { namespace mpl { + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< typename T, bool has_type_ > +struct quote_impl +// GCC has a problem with metafunction forwarding when T is a +// specialization of a template called 'type'. +# if BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4)) \ + && BOOST_WORKAROUND(__GNUC_MINOR__, BOOST_TESTED_AT(0)) \ + && BOOST_WORKAROUND(__GNUC_PATCHLEVEL__, BOOST_TESTED_AT(2)) +{ + typedef typename T::type type; +}; +# else + : T +{ +}; +# endif + +template< typename T > +struct quote_impl +{ + typedef T type; +}; + +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +template< bool > struct quote_impl +{ + template< typename T > struct result_ + : T + { + }; +}; + +template<> struct quote_impl +{ + template< typename T > struct result_ + { + typedef T type; + }; +}; + +#endif + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) +#include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_QUOTE_TEMPLATE + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_QUOTE_HPP_INCLUDED + +///// iteration + +#else +#define i_ BOOST_PP_FRAME_ITERATION(1) + +template< + template< BOOST_MPL_PP_PARAMS(i_, typename P) > class F + , typename Tag = void_ + > +struct BOOST_PP_CAT(quote,i_) +{ + template< BOOST_MPL_PP_PARAMS(i_, typename U) > struct apply +#if defined(BOOST_MPL_CFG_BCC590_WORKAROUNDS) + { + typedef typename quote_impl< + F< BOOST_MPL_PP_PARAMS(i_, U) > + , aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value + >::type type; + }; +#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + : quote_impl< + F< BOOST_MPL_PP_PARAMS(i_, U) > + , aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value + > + { + }; +#else + : quote_impl< aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value > + ::template result_< F< BOOST_MPL_PP_PARAMS(i_, U) > > + { + }; +#endif +}; + +#undef i_ +#endif // BOOST_PP_IS_ITERATING diff --git a/ThirdParty/boost-Subset/boost/mpl/remove_if.hpp b/ThirdParty/boost-Subset/boost/mpl/remove_if.hpp new file mode 100644 index 0000000000..bbe6564b09 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/remove_if.hpp @@ -0,0 +1,83 @@ + +#ifndef BOOST_MPL_REMOVE_IF_HPP_INCLUDED +#define BOOST_MPL_REMOVE_IF_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright David Abrahams 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +namespace aux { + +template< typename Pred, typename InsertOp > struct remove_if_helper +{ + template< typename Sequence, typename U > struct apply + { + typedef typename eval_if< + typename apply1::type + , identity + , apply2 + >::type type; + }; +}; + +template< + typename Sequence + , typename Predicate + , typename Inserter + > +struct remove_if_impl + : fold< + Sequence + , typename Inserter::state + , protect< aux::remove_if_helper< + typename lambda::type + , typename Inserter::operation + > > + > +{ +}; + +template< + typename Sequence + , typename Predicate + , typename Inserter + > +struct reverse_remove_if_impl + : reverse_fold< + Sequence + , typename Inserter::state + , protect< aux::remove_if_helper< + typename lambda::type + , typename Inserter::operation + > > + > +{ +}; + +} // namespace aux + +BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(3, remove_if) + +}} + +#endif // BOOST_MPL_REMOVE_IF_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/reverse_fold.hpp b/ThirdParty/boost-Subset/boost/mpl/reverse_fold.hpp new file mode 100644 index 0000000000..87c26a9a84 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/reverse_fold.hpp @@ -0,0 +1,50 @@ + +#ifndef BOOST_MPL_REVERSE_FOLD_HPP_INCLUDED +#define BOOST_MPL_REVERSE_FOLD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(State) + , typename BOOST_MPL_AUX_NA_PARAM(BackwardOp) + , typename ForwardOp = arg<1> + > +struct reverse_fold +{ + typedef typename aux::reverse_fold_impl< + ::boost::mpl::O1_size::value + , typename begin::type + , typename end::type + , State + , BackwardOp + , ForwardOp + >::state type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT(3,reverse_fold,(Sequence,State,BackwardOp)) +}; + +BOOST_MPL_AUX_NA_SPEC(3, reverse_fold) + +}} + +#endif // BOOST_MPL_REVERSE_FOLD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/same_as.hpp b/ThirdParty/boost-Subset/boost/mpl/same_as.hpp new file mode 100644 index 0000000000..4be20bc33e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/same_as.hpp @@ -0,0 +1,55 @@ + +#ifndef BOOST_MPL_SAME_AS_HPP_INCLUDED +#define BOOST_MPL_SAME_AS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include + +#include + +namespace boost { namespace mpl { + +template< typename T1 > +struct same_as +{ + template< typename T2 > struct apply +#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) + : is_same + { +#else + { + typedef typename is_same::type type; +#endif + }; +}; + +template< typename T1 > +struct not_same_as +{ + template< typename T2 > struct apply +#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) + : not_< is_same > + { +#else + { + typedef typename not_< is_same >::type type; +#endif + }; +}; + +}} + +#endif // BOOST_MPL_SAME_AS_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/sequence_tag.hpp b/ThirdParty/boost-Subset/boost/mpl/sequence_tag.hpp new file mode 100644 index 0000000000..f87d92b28b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/sequence_tag.hpp @@ -0,0 +1,124 @@ + +#ifndef BOOST_MPL_SEQUENCE_TAG_HPP_INCLUDED +#define BOOST_MPL_SEQUENCE_TAG_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +// agurt, 27/nov/02: have to use a simplistic 'sequence_tag' implementation +// on MSVC to avoid dreadful "internal structure overflow" error +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ + || defined(BOOST_MPL_CFG_NO_HAS_XXX) + +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + > +struct sequence_tag +{ + typedef typename Sequence::tag type; +}; + +#elif BOOST_WORKAROUND(BOOST_MSVC, == 1300) + +// agurt, 07/feb/03: workaround for what seems to be MSVC 7.0-specific ETI issue + +namespace aux { + +template< bool > +struct sequence_tag_impl +{ + template< typename Sequence > struct result_ + { + typedef typename Sequence::tag type; + }; +}; + +template<> +struct sequence_tag_impl +{ + template< typename Sequence > struct result_ + { + typedef int type; + }; +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + > +struct sequence_tag + : aux::sequence_tag_impl< !aux::is_msvc_eti_arg::value > + ::template result_ +{ +}; + +#else + +namespace aux { + +template< bool has_tag_, bool has_begin_ > +struct sequence_tag_impl +{ + // agurt 24/nov/02: MSVC 6.5 gets confused in 'sequence_tag_impl' + // specialization below, if we name it 'result_' here + template< typename Sequence > struct result2_; +}; + +# define AUX_CLASS_SEQUENCE_TAG_SPEC(has_tag, has_begin, result_type) \ +template<> struct sequence_tag_impl \ +{ \ + template< typename Sequence > struct result2_ \ + { \ + typedef result_type type; \ + }; \ +}; \ +/**/ + +AUX_CLASS_SEQUENCE_TAG_SPEC(true, true, typename Sequence::tag) +AUX_CLASS_SEQUENCE_TAG_SPEC(true, false, typename Sequence::tag) +AUX_CLASS_SEQUENCE_TAG_SPEC(false, true, nested_begin_end_tag) +AUX_CLASS_SEQUENCE_TAG_SPEC(false, false, non_sequence_tag) + +# undef AUX_CLASS_SEQUENCE_TAG_SPEC + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + > +struct sequence_tag + : aux::sequence_tag_impl< + ::boost::mpl::aux::has_tag::value + , ::boost::mpl::aux::has_begin::value + >::template result2_ +{ +}; + +#endif // BOOST_MSVC + +BOOST_MPL_AUX_NA_SPEC(1, sequence_tag) + +}} + +#endif // BOOST_MPL_SEQUENCE_TAG_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/sequence_tag_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/sequence_tag_fwd.hpp new file mode 100644 index 0000000000..4b0ed6f6b7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/sequence_tag_fwd.hpp @@ -0,0 +1,26 @@ + +#ifndef BOOST_MPL_SEQUENCE_TAG_FWD_HPP_INCLUDED +#define BOOST_MPL_SEQUENCE_TAG_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +struct nested_begin_end_tag; +struct non_sequence_tag; + +template< typename Sequence > struct sequence_tag; + +}} + +#endif // BOOST_MPL_SEQUENCE_TAG_FWD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/size.hpp b/ThirdParty/boost-Subset/boost/mpl/size.hpp new file mode 100644 index 0000000000..12ffefbb78 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/size.hpp @@ -0,0 +1,42 @@ + +#ifndef BOOST_MPL_SIZE_HPP_INCLUDED +#define BOOST_MPL_SIZE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + > +struct size + : aux::msvc_eti_base< + typename size_impl< typename sequence_tag::type > + ::template apply< Sequence >::type + >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1, size, (Sequence)) +}; + +BOOST_MPL_AUX_NA_SPEC(1, size) + +}} + +#endif // BOOST_MPL_SIZE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/size_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/size_fwd.hpp new file mode 100644 index 0000000000..c72628dd1e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/size_fwd.hpp @@ -0,0 +1,24 @@ + +#ifndef BOOST_MPL_SIZE_FWD_HPP_INCLUDED +#define BOOST_MPL_SIZE_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct size_impl; +template< typename Sequence > struct size; + +}} + +#endif // BOOST_MPL_SIZE_FWD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/size_t.hpp b/ThirdParty/boost-Subset/boost/mpl/size_t.hpp new file mode 100644 index 0000000000..99e9b41d0d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/size_t.hpp @@ -0,0 +1,25 @@ + +#ifndef BOOST_MPL_SIZE_T_HPP_INCLUDED +#define BOOST_MPL_SIZE_T_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#define AUX_WRAPPER_VALUE_TYPE std::size_t +#define AUX_WRAPPER_NAME size_t +#define AUX_WRAPPER_PARAMS(N) std::size_t N + +#include + +#endif // BOOST_MPL_SIZE_T_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/size_t_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/size_t_fwd.hpp new file mode 100644 index 0000000000..ffdf4b32dc --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/size_t_fwd.hpp @@ -0,0 +1,28 @@ + +#ifndef BOOST_MPL_SIZE_T_FWD_HPP_INCLUDED +#define BOOST_MPL_SIZE_T_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include // make sure 'size_t' is placed into 'std' +#include + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +template< std::size_t N > struct size_t; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(size_t) + +#endif // BOOST_MPL_SIZE_T_FWD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/tag.hpp b/ThirdParty/boost-Subset/boost/mpl/tag.hpp new file mode 100644 index 0000000000..858627753d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/tag.hpp @@ -0,0 +1,52 @@ + +#ifndef BOOST_MPL_TAG_HPP_INCLUDED +#define BOOST_MPL_TAG_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include + +namespace boost { namespace mpl { + +namespace aux { +template< typename T > struct tag_impl +{ + typedef typename T::tag type; +}; +} + +template< typename T, typename Default = void_ > struct tag +#if !defined(BOOST_MPL_CFG_MSVC_ETI_BUG) + : if_< + aux::has_tag + , aux::tag_impl + , Default + >::type +{ +#else +{ + typedef typename eval_if< + aux::has_tag + , aux::tag_impl + , Default + >::type type; + +#endif +}; + +}} + +#endif // BOOST_MPL_TAG_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/times.hpp b/ThirdParty/boost-Subset/boost/mpl/times.hpp new file mode 100644 index 0000000000..f309557c6b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/times.hpp @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_TIMES_HPP_INCLUDED +#define BOOST_MPL_TIMES_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#define AUX778076_OP_NAME times +#define AUX778076_OP_TOKEN * +#include + +#endif // BOOST_MPL_TIMES_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector.hpp b/ThirdParty/boost-Subset/boost/mpl/vector.hpp new file mode 100644 index 0000000000..479983d5ce --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector.hpp @@ -0,0 +1,57 @@ + +#ifndef BOOST_MPL_VECTOR_HPP_INCLUDED +#define BOOST_MPL_VECTOR_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include + +# include +# include +# include + +#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) +# define AUX778076_VECTOR_HEADER \ + BOOST_PP_CAT(vector, BOOST_MPL_LIMIT_VECTOR_SIZE).hpp \ + /**/ +#else +# define AUX778076_VECTOR_HEADER \ + BOOST_PP_CAT(vector, BOOST_MPL_LIMIT_VECTOR_SIZE)##.hpp \ + /**/ +#endif + +# include BOOST_PP_STRINGIZE(boost/mpl/vector/AUX778076_VECTOR_HEADER) +# undef AUX778076_VECTOR_HEADER +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER vector.hpp +# include + +#else + +# include + +# define AUX778076_SEQUENCE_NAME vector +# define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_VECTOR_SIZE +# include + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_VECTOR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/O1_size.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/O1_size.hpp new file mode 100644 index 0000000000..ac9e3cf887 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/O1_size.hpp @@ -0,0 +1,56 @@ + +#ifndef BOOST_MPL_VECTOR_AUX_O1_SIZE_HPP_INCLUDED +#define BOOST_MPL_VECTOR_AUX_O1_SIZE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +template<> +struct O1_size_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + : Vector::size + { + }; +}; + +#else + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< long N > +struct O1_size_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + : mpl::long_ + { + }; +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES + +}} + +#endif // BOOST_MPL_VECTOR_AUX_O1_SIZE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/at.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/at.hpp new file mode 100644 index 0000000000..0a7583ccf1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/at.hpp @@ -0,0 +1,116 @@ + +#ifndef BOOST_MPL_VECTOR_AUX_AT_HPP_INCLUDED +#define BOOST_MPL_VECTOR_AUX_AT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +template< typename Vector, long n_ > +struct v_at_impl +{ + typedef long_< (Vector::lower_bound_::value + n_) > index_; + typedef __typeof__( Vector::item_(index_()) ) type; +}; + + +template< typename Vector, long n_ > +struct v_at + : aux::wrapped_type< typename v_at_impl::type > +{ +}; + +template<> +struct at_impl< aux::vector_tag > +{ + template< typename Vector, typename N > struct apply + : v_at< + Vector + , BOOST_MPL_AUX_VALUE_WKND(N)::value + > + { + }; +}; + +#else + +# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) + +template< typename Vector, BOOST_MPL_AUX_NTTP_DECL(long, n_) > struct v_at; + +template< BOOST_MPL_AUX_NTTP_DECL(long, n_) > +struct at_impl< aux::vector_tag > +{ + template< typename Vector, typename N > struct apply +#if !defined(__BORLANDC__) + : v_at< + Vector + , BOOST_MPL_AUX_VALUE_WKND(N)::value + > + { +#else + { + typedef typename v_at< + Vector + , BOOST_MPL_AUX_VALUE_WKND(N)::value + >::type type; +#endif + }; +}; + +# else + +namespace aux { + +template< BOOST_MPL_AUX_NTTP_DECL(long, n_) > struct v_at_impl +{ + template< typename V > struct result_; +}; + +// to work around ETI, etc. +template<> struct v_at_impl<-1> +{ + template< typename V > struct result_ + { + typedef void_ type; + }; +}; + +} // namespace aux + +template< typename T, BOOST_MPL_AUX_NTTP_DECL(long, n_) > +struct v_at + : aux::v_at_impl::template result_ +{ +}; + +# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES + +}} + +#endif // BOOST_MPL_VECTOR_AUX_AT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/back.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/back.hpp new file mode 100644 index 0000000000..b66363ec11 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/back.hpp @@ -0,0 +1,59 @@ + +#ifndef BOOST_MPL_VECTOR_AUX_BACK_HPP_INCLUDED +#define BOOST_MPL_VECTOR_AUX_BACK_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +template<> +struct back_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + : v_at< + Vector + , prior::type::value + > + { + }; +}; + +#else + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< long n_ > +struct back_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES + +}} + +#endif // BOOST_MPL_VECTOR_AUX_BACK_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/begin_end.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/begin_end.hpp new file mode 100644 index 0000000000..aa34451566 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/begin_end.hpp @@ -0,0 +1,49 @@ + +#ifndef BOOST_MPL_VECTOR_AUX_BEGIN_END_HPP_INCLUDED +#define BOOST_MPL_VECTOR_AUX_BEGIN_END_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +# include +# include +# include + +namespace boost { namespace mpl { + +template<> +struct begin_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef v_iter type; + }; +}; + +template<> +struct end_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef v_iter type; + }; +}; + +}} + +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES + +#endif // BOOST_MPL_VECTOR_AUX_BEGIN_END_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/clear.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/clear.hpp new file mode 100644 index 0000000000..b06d8be752 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/clear.hpp @@ -0,0 +1,55 @@ + +#ifndef BOOST_MPL_VECTOR_AUX_CLEAR_HPP_INCLUDED +#define BOOST_MPL_VECTOR_AUX_CLEAR_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +template<> +struct clear_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +#else + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< long N > +struct clear_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES + +}} + +#endif // BOOST_MPL_VECTOR_AUX_CLEAR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/empty.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/empty.hpp new file mode 100644 index 0000000000..5490a5f72f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/empty.hpp @@ -0,0 +1,68 @@ + +#ifndef BOOST_MPL_VECTOR_AUX_EMPTY_HPP_INCLUDED +#define BOOST_MPL_VECTOR_AUX_EMPTY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +template<> +struct empty_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + : is_same< + typename Vector::lower_bound_ + , typename Vector::upper_bound_ + > + { + }; +}; + +#else + +template<> +struct empty_impl< aux::vector_tag<0> > +{ + template< typename Vector > struct apply + : true_ + { + }; +}; + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< long N > +struct empty_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES + +}} + +#endif // BOOST_MPL_VECTOR_AUX_EMPTY_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/front.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/front.hpp new file mode 100644 index 0000000000..a358db52cf --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/front.hpp @@ -0,0 +1,56 @@ + +#ifndef BOOST_MPL_VECTOR_AUX_FRONT_HPP_INCLUDED +#define BOOST_MPL_VECTOR_AUX_FRONT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2008 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +template<> +struct front_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + : v_at + { + }; +}; + +#else + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< BOOST_MPL_AUX_NTTP_DECL(long, n_) > +struct front_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES + +}} + +#endif // BOOST_MPL_VECTOR_AUX_FRONT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/include_preprocessed.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/include_preprocessed.hpp new file mode 100644 index 0000000000..a676116f60 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/include_preprocessed.hpp @@ -0,0 +1,55 @@ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +// Copyright Aleksey Gurtovoy 2000-2006 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include + +#include +#include + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) +# define AUX778076_INCLUDE_DIR typeof_based +#elif defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + || defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) +# define AUX778076_INCLUDE_DIR no_ctps +#else +# define AUX778076_INCLUDE_DIR plain +#endif + +#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) +# define AUX778076_HEADER \ + AUX778076_INCLUDE_DIR/BOOST_MPL_PREPROCESSED_HEADER \ +/**/ +#else +# define AUX778076_HEADER \ + BOOST_PP_CAT(AUX778076_INCLUDE_DIR,/)##BOOST_MPL_PREPROCESSED_HEADER \ +/**/ +#endif + + +#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(700)) +# define AUX778076_INCLUDE_STRING BOOST_PP_STRINGIZE(boost/mpl/vector/aux_/preprocessed/AUX778076_HEADER) +# include AUX778076_INCLUDE_STRING +# undef AUX778076_INCLUDE_STRING +#else +# include BOOST_PP_STRINGIZE(boost/mpl/vector/aux_/preprocessed/AUX778076_HEADER) +#endif + +# undef AUX778076_HEADER +# undef AUX778076_INCLUDE_DIR + +#undef BOOST_MPL_PREPROCESSED_HEADER diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/item.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/item.hpp new file mode 100644 index 0000000000..71538ceb41 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/item.hpp @@ -0,0 +1,103 @@ + +#ifndef BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED +#define BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +template< + typename T + , typename Base + , int at_front = 0 + > +struct v_item + : Base +{ + typedef typename Base::upper_bound_ index_; + typedef typename next::type upper_bound_; + typedef typename next::type size; + typedef Base base; + typedef v_item type; + + // agurt 10/sep/04: MWCW <= 9.3 workaround here and below; the compiler + // breaks if using declaration comes _before_ the new overload + static aux::type_wrapper item_(index_); + using Base::item_; +}; + +template< + typename T + , typename Base + > +struct v_item + : Base +{ + typedef typename prior::type index_; + typedef index_ lower_bound_; + typedef typename next::type size; + typedef Base base; + typedef v_item type; + + static aux::type_wrapper item_(index_); + using Base::item_; +}; + +// "erasure" item +template< + typename Base + , int at_front + > +struct v_mask + : Base +{ + typedef typename prior::type index_; + typedef index_ upper_bound_; + typedef typename prior::type size; + typedef Base base; + typedef v_mask type; + + static aux::type_wrapper item_(index_); + using Base::item_; +}; + +template< + typename Base + > +struct v_mask + : Base +{ + typedef typename Base::lower_bound_ index_; + typedef typename next::type lower_bound_; + typedef typename prior::type size; + typedef Base base; + typedef v_mask type; + + static aux::type_wrapper item_(index_); + using Base::item_; +}; + +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES + +}} + +#endif // BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/iterator.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/iterator.hpp new file mode 100644 index 0000000000..32df315696 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/iterator.hpp @@ -0,0 +1,130 @@ + +#ifndef BOOST_MPL_AUX_VECTOR_ITERATOR_HPP_INCLUDED +#define BOOST_MPL_AUX_VECTOR_ITERATOR_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +template< + typename Vector + , BOOST_MPL_AUX_NTTP_DECL(long, n_) + > +struct v_iter +{ + typedef aux::v_iter_tag tag; + typedef random_access_iterator_tag category; + typedef typename v_at::type type; + + typedef Vector vector_; + typedef mpl::long_ pos; + +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + enum { + next_ = n_ + 1 + , prior_ = n_ - 1 + , pos_ = n_ + }; + + typedef v_iter next; + typedef v_iter prior; +#endif + +}; + + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< + typename Vector + , BOOST_MPL_AUX_NTTP_DECL(long, n_) + > +struct next< v_iter > +{ + typedef v_iter type; +}; + +template< + typename Vector + , BOOST_MPL_AUX_NTTP_DECL(long, n_) + > +struct prior< v_iter > +{ + typedef v_iter type; +}; + +template< + typename Vector + , BOOST_MPL_AUX_NTTP_DECL(long, n_) + , typename Distance + > +struct advance< v_iter,Distance> +{ + typedef v_iter< + Vector + , (n_ + BOOST_MPL_AUX_NESTED_VALUE_WKND(long, Distance)) + > type; +}; + +template< + typename Vector + , BOOST_MPL_AUX_NTTP_DECL(long, n_) + , BOOST_MPL_AUX_NTTP_DECL(long, m_) + > +struct distance< v_iter, v_iter > + : mpl::long_<(m_ - n_)> +{ +}; + +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +template<> struct advance_impl +{ + template< typename Iterator, typename N > struct apply + { + enum { pos_ = Iterator::pos_, n_ = N::value }; + typedef v_iter< + typename Iterator::vector_ + , (pos_ + n_) + > type; + }; +}; + +template<> struct distance_impl +{ + template< typename Iter1, typename Iter2 > struct apply + { + enum { pos1_ = Iter1::pos_, pos2_ = Iter2::pos_ }; + typedef long_<( pos2_ - pos1_ )> type; + BOOST_STATIC_CONSTANT(long, value = ( pos2_ - pos1_ )); + }; +}; + +#endif + +}} + +#endif // BOOST_MPL_AUX_VECTOR_ITERATOR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/numbered.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/numbered.hpp new file mode 100644 index 0000000000..b3f03873ba --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/numbered.hpp @@ -0,0 +1,218 @@ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +#if defined(BOOST_PP_IS_ITERATING) + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include + +#define i_ BOOST_PP_FRAME_ITERATION(1) + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +# define AUX778076_VECTOR_TAIL(vector, i_, T) \ + BOOST_PP_CAT(vector,i_)< \ + BOOST_PP_ENUM_PARAMS(i_, T) \ + > \ + /**/ + +#if i_ > 0 +template< + BOOST_PP_ENUM_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(vector,i_) + : v_item< + BOOST_PP_CAT(T,BOOST_PP_DEC(i_)) + , AUX778076_VECTOR_TAIL(vector,BOOST_PP_DEC(i_),T) + > +{ + typedef BOOST_PP_CAT(vector,i_) type; +}; +#endif + +# undef AUX778076_VECTOR_TAIL + +#else // "brute force" implementation + +# if i_ > 0 + +template< + BOOST_PP_ENUM_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(vector,i_) +{ + typedef aux::vector_tag tag; + typedef BOOST_PP_CAT(vector,i_) type; + +# define AUX778076_VECTOR_ITEM(unused, i_, unused2) \ + typedef BOOST_PP_CAT(T,i_) BOOST_PP_CAT(item,i_); \ + /**/ + + BOOST_PP_REPEAT(i_, AUX778076_VECTOR_ITEM, unused) +# undef AUX778076_VECTOR_ITEM + typedef void_ BOOST_PP_CAT(item,i_); + typedef BOOST_PP_CAT(T,BOOST_PP_DEC(i_)) back; + + // Borland forces us to use 'type' here (instead of the class name) + typedef v_iter begin; + typedef v_iter end; +}; + +template<> +struct push_front_impl< aux::vector_tag > +{ + template< typename Vector, typename T > struct apply + { + typedef BOOST_PP_CAT(vector,i_)< + T + BOOST_PP_COMMA_IF(BOOST_PP_DEC(i_)) + BOOST_PP_ENUM_PARAMS(BOOST_PP_DEC(i_), typename Vector::item) + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef BOOST_PP_CAT(vector,BOOST_PP_DEC(i_))< + BOOST_PP_ENUM_SHIFTED_PARAMS(i_, typename Vector::item) + > type; + }; +}; + + +template<> +struct push_back_impl< aux::vector_tag > +{ + template< typename Vector, typename T > struct apply + { + typedef BOOST_PP_CAT(vector,i_)< + BOOST_PP_ENUM_PARAMS(BOOST_PP_DEC(i_), typename Vector::item) + BOOST_PP_COMMA_IF(BOOST_PP_DEC(i_)) + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef BOOST_PP_CAT(vector,BOOST_PP_DEC(i_))< + BOOST_PP_ENUM_PARAMS(BOOST_PP_DEC(i_), typename Vector::item) + > type; + }; +}; + +# endif // i_ > 0 + +# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) + +template< typename V > +struct v_at +{ + typedef typename V::BOOST_PP_CAT(item,i_) type; +}; + +# else + +namespace aux { +template<> struct v_at_impl +{ + template< typename V_ > struct result_ + { + typedef typename V_::BOOST_PP_CAT(item,i_) type; + }; +}; +} + +template<> +struct at_impl< aux::vector_tag > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +#if i_ > 0 +template<> +struct front_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; +#endif + +template<> +struct size_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + : long_ + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag > + : size_impl< aux::vector_tag > +{ +}; + +template<> +struct clear_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES + +#undef i_ + +#endif // BOOST_PP_IS_ITERATING diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/numbered_c.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/numbered_c.hpp new file mode 100644 index 0000000000..4c159f948c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/numbered_c.hpp @@ -0,0 +1,77 @@ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +#if defined(BOOST_PP_IS_ITERATING) + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include + +#define i_ BOOST_PP_FRAME_ITERATION(1) + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +# define AUX778076_VECTOR_TAIL(vector, i_, C) \ + BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c) \ + /**/ + +#if i_ > 0 +template< + typename T + , BOOST_PP_ENUM_PARAMS(i_, T C) + > +struct BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c) + : v_item< + integral_c + , AUX778076_VECTOR_TAIL(vector,BOOST_PP_DEC(i_),C) + > +{ + typedef BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c) type; + typedef T value_type; +}; +#endif + +# undef AUX778076_VECTOR_TAIL + +#else // "brute force" implementation + +# define AUX778076_VECTOR_C_PARAM_FUNC(unused, i_, param) \ + BOOST_PP_COMMA_IF(i_) \ + integral_c \ + /**/ + +template< + typename T + , BOOST_PP_ENUM_PARAMS(i_, T C) + > +struct BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c) + : BOOST_PP_CAT(vector,i_)< BOOST_PP_REPEAT(i_,AUX778076_VECTOR_C_PARAM_FUNC,C) > +{ + typedef BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c) type; + typedef T value_type; +}; + +# undef AUX778076_VECTOR_C_PARAM_FUNC + +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES + +#undef i_ + +#endif // BOOST_PP_IS_ITERATING diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/pop_back.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/pop_back.hpp new file mode 100644 index 0000000000..1d95e355c0 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/pop_back.hpp @@ -0,0 +1,40 @@ + +#ifndef BOOST_MPL_VECTOR_AUX_POP_BACK_HPP_INCLUDED +#define BOOST_MPL_VECTOR_AUX_POP_BACK_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +# include +# include + +namespace boost { namespace mpl { + +template<> +struct pop_back_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef v_mask type; + }; +}; + +}} + +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES + +#endif // BOOST_MPL_VECTOR_AUX_POP_BACK_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/pop_front.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/pop_front.hpp new file mode 100644 index 0000000000..c94b8711c4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/pop_front.hpp @@ -0,0 +1,40 @@ + +#ifndef BOOST_MPL_VECTOR_AUX_POP_FRONT_HPP_INCLUDED +#define BOOST_MPL_VECTOR_AUX_POP_FRONT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +# include +# include + +namespace boost { namespace mpl { + +template<> +struct pop_front_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef v_mask type; + }; +}; + +}} + +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES + +#endif // BOOST_MPL_VECTOR_AUX_POP_FRONT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10.hpp new file mode 100644 index 0000000000..c79a1ac606 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10.hpp @@ -0,0 +1,1528 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector10.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template<> struct v_at_impl<0> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item0 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<0> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct size_impl< aux::vector_tag<0> > +{ + template< typename Vector > struct apply + : long_<0> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<0> > + : size_impl< aux::vector_tag<0> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<0> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0 + > +struct vector1 +{ + typedef aux::vector_tag<1> tag; + typedef vector1 type; + typedef T0 item0; + typedef void_ item1; + typedef T0 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,1 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<0> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector1< + T + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<1> > +{ + template< typename Vector > struct apply + { + typedef vector0< + + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<0> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector1< + + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<1> > +{ + template< typename Vector > struct apply + { + typedef vector0< + + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<1> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item1 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<1> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<1> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<1> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<1> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<1> > +{ + template< typename Vector > struct apply + : long_<1> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<1> > + : size_impl< aux::vector_tag<1> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<1> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1 + > +struct vector2 +{ + typedef aux::vector_tag<2> tag; + typedef vector2 type; + typedef T0 item0; + typedef T1 item1; + + + typedef void_ item2; + typedef T1 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,2 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<1> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector2< + T + , + typename Vector::item0 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<2> > +{ + template< typename Vector > struct apply + { + typedef vector1< + typename Vector::item1 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<1> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector2< + typename Vector::item0 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<2> > +{ + template< typename Vector > struct apply + { + typedef vector1< + typename Vector::item0 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<2> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item2 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<2> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<2> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<2> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<2> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<2> > +{ + template< typename Vector > struct apply + : long_<2> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<2> > + : size_impl< aux::vector_tag<2> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<2> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2 + > +struct vector3 +{ + typedef aux::vector_tag<3> tag; + typedef vector3 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + + + typedef void_ item3; + typedef T2 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,3 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<2> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector3< + T + , + typename Vector::item0, typename Vector::item1 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<3> > +{ + template< typename Vector > struct apply + { + typedef vector2< + typename Vector::item1, typename Vector::item2 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<2> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector3< + typename Vector::item0, typename Vector::item1 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<3> > +{ + template< typename Vector > struct apply + { + typedef vector2< + typename Vector::item0, typename Vector::item1 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<3> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item3 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<3> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<3> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<3> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<3> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<3> > +{ + template< typename Vector > struct apply + : long_<3> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<3> > + : size_impl< aux::vector_tag<3> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<3> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct vector4 +{ + typedef aux::vector_tag<4> tag; + typedef vector4 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + + + typedef void_ item4; + typedef T3 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,4 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<3> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector4< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<4> > +{ + template< typename Vector > struct apply + { + typedef vector3< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<3> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector4< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<4> > +{ + template< typename Vector > struct apply + { + typedef vector3< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<4> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item4 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<4> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<4> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<4> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<4> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<4> > +{ + template< typename Vector > struct apply + : long_<4> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<4> > + : size_impl< aux::vector_tag<4> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<4> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct vector5 +{ + typedef aux::vector_tag<5> tag; + typedef vector5 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + + + typedef void_ item5; + typedef T4 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,5 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<4> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector5< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<5> > +{ + template< typename Vector > struct apply + { + typedef vector4< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<4> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector5< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<5> > +{ + template< typename Vector > struct apply + { + typedef vector4< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<5> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item5 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<5> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<5> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<5> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<5> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<5> > +{ + template< typename Vector > struct apply + : long_<5> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<5> > + : size_impl< aux::vector_tag<5> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<5> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct vector6 +{ + typedef aux::vector_tag<6> tag; + typedef vector6 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + + + typedef void_ item6; + typedef T5 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,6 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<5> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector6< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<6> > +{ + template< typename Vector > struct apply + { + typedef vector5< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<5> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector6< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<6> > +{ + template< typename Vector > struct apply + { + typedef vector5< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<6> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item6 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<6> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<6> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<6> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<6> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<6> > +{ + template< typename Vector > struct apply + : long_<6> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<6> > + : size_impl< aux::vector_tag<6> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<6> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct vector7 +{ + typedef aux::vector_tag<7> tag; + typedef vector7 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + + + typedef void_ item7; + typedef T6 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,7 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<6> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector7< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<7> > +{ + template< typename Vector > struct apply + { + typedef vector6< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<6> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector7< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<7> > +{ + template< typename Vector > struct apply + { + typedef vector6< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<7> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item7 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<7> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<7> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<7> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<7> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<7> > +{ + template< typename Vector > struct apply + : long_<7> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<7> > + : size_impl< aux::vector_tag<7> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<7> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct vector8 +{ + typedef aux::vector_tag<8> tag; + typedef vector8 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + + + typedef void_ item8; + typedef T7 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,8 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<7> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector8< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<8> > +{ + template< typename Vector > struct apply + { + typedef vector7< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<7> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector8< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<8> > +{ + template< typename Vector > struct apply + { + typedef vector7< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<8> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item8 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<8> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<8> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<8> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<8> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<8> > +{ + template< typename Vector > struct apply + : long_<8> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<8> > + : size_impl< aux::vector_tag<8> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<8> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct vector9 +{ + typedef aux::vector_tag<9> tag; + typedef vector9 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + + + typedef void_ item9; + typedef T8 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,9 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<8> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector9< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<9> > +{ + template< typename Vector > struct apply + { + typedef vector8< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<8> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector9< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<9> > +{ + template< typename Vector > struct apply + { + typedef vector8< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<9> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item9 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<9> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<9> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<9> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<9> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<9> > +{ + template< typename Vector > struct apply + : long_<9> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<9> > + : size_impl< aux::vector_tag<9> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<9> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct vector10 +{ + typedef aux::vector_tag<10> tag; + typedef vector10 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + + + typedef void_ item10; + typedef T9 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,10 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<9> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector10< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<10> > +{ + template< typename Vector > struct apply + { + typedef vector9< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<9> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector10< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<10> > +{ + template< typename Vector > struct apply + { + typedef vector9< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<10> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item10 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<10> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<10> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<10> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<10> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<10> > +{ + template< typename Vector > struct apply + : long_<10> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<10> > + : size_impl< aux::vector_tag<10> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<10> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10_c.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10_c.hpp new file mode 100644 index 0000000000..8b36f6a3ed --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10_c.hpp @@ -0,0 +1,149 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector10_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T + , T C0 + > +struct vector1_c + : vector1< integral_c< T,C0 > > +{ + typedef vector1_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1 + > +struct vector2_c + : vector2< integral_c< T,C0 >, integral_c< T,C1 > > +{ + typedef vector2_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2 + > +struct vector3_c + : vector3< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > > +{ + typedef vector3_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3 + > +struct vector4_c + : vector4< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >, integral_c + > +{ + typedef vector4_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4 + > +struct vector5_c + : vector5< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 > + > +{ + typedef vector5_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5 + > +struct vector6_c + : vector6< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 > + > +{ + typedef vector6_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6 + > +struct vector7_c + : vector7< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c + > +{ + typedef vector7_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7 + > +struct vector8_c + : vector8< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 > + > +{ + typedef vector8_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8 + > +struct vector9_c + : vector9< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 > + > +{ + typedef vector9_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9 + > +struct vector10_c + : vector10< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + > +{ + typedef vector10_c type; + typedef T value_type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20.hpp new file mode 100644 index 0000000000..eb92a7814c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20.hpp @@ -0,0 +1,1804 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector20.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector11 +{ + typedef aux::vector_tag<11> tag; + typedef vector11 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + + + typedef void_ item11; + typedef T10 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,11 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<10> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector11< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<11> > +{ + template< typename Vector > struct apply + { + typedef vector10< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<10> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector11< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<11> > +{ + template< typename Vector > struct apply + { + typedef vector10< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<11> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item11 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<11> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<11> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<11> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<11> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<11> > +{ + template< typename Vector > struct apply + : long_<11> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<11> > + : size_impl< aux::vector_tag<11> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<11> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector12 +{ + typedef aux::vector_tag<12> tag; + typedef vector12 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + + + typedef void_ item12; + typedef T11 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,12 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<11> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector12< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<12> > +{ + template< typename Vector > struct apply + { + typedef vector11< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<11> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector12< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<12> > +{ + template< typename Vector > struct apply + { + typedef vector11< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<12> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item12 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<12> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<12> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<12> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<12> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<12> > +{ + template< typename Vector > struct apply + : long_<12> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<12> > + : size_impl< aux::vector_tag<12> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<12> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector13 +{ + typedef aux::vector_tag<13> tag; + typedef vector13 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + + + typedef void_ item13; + typedef T12 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,13 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<12> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector13< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<13> > +{ + template< typename Vector > struct apply + { + typedef vector12< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<12> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector13< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<13> > +{ + template< typename Vector > struct apply + { + typedef vector12< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<13> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item13 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<13> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<13> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<13> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<13> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<13> > +{ + template< typename Vector > struct apply + : long_<13> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<13> > + : size_impl< aux::vector_tag<13> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<13> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector14 +{ + typedef aux::vector_tag<14> tag; + typedef vector14 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + + + typedef void_ item14; + typedef T13 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,14 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<13> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector14< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<14> > +{ + template< typename Vector > struct apply + { + typedef vector13< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<13> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector14< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<14> > +{ + template< typename Vector > struct apply + { + typedef vector13< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<14> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item14 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<14> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<14> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<14> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<14> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<14> > +{ + template< typename Vector > struct apply + : long_<14> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<14> > + : size_impl< aux::vector_tag<14> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<14> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector15 +{ + typedef aux::vector_tag<15> tag; + typedef vector15 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + + + typedef void_ item15; + typedef T14 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,15 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<14> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector15< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<15> > +{ + template< typename Vector > struct apply + { + typedef vector14< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<14> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector15< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<15> > +{ + template< typename Vector > struct apply + { + typedef vector14< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<15> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item15 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<15> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<15> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<15> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<15> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<15> > +{ + template< typename Vector > struct apply + : long_<15> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<15> > + : size_impl< aux::vector_tag<15> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<15> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector16 +{ + typedef aux::vector_tag<16> tag; + typedef vector16 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + + + typedef void_ item16; + typedef T15 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,16 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<15> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector16< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<16> > +{ + template< typename Vector > struct apply + { + typedef vector15< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<15> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector16< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<16> > +{ + template< typename Vector > struct apply + { + typedef vector15< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<16> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item16 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<16> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<16> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<16> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<16> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<16> > +{ + template< typename Vector > struct apply + : long_<16> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<16> > + : size_impl< aux::vector_tag<16> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<16> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector17 +{ + typedef aux::vector_tag<17> tag; + typedef vector17 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + + + typedef void_ item17; + typedef T16 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,17 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<16> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector17< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<17> > +{ + template< typename Vector > struct apply + { + typedef vector16< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<16> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector17< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<17> > +{ + template< typename Vector > struct apply + { + typedef vector16< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<17> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item17 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<17> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<17> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<17> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<17> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<17> > +{ + template< typename Vector > struct apply + : long_<17> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<17> > + : size_impl< aux::vector_tag<17> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<17> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector18 +{ + typedef aux::vector_tag<18> tag; + typedef vector18 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + + + typedef void_ item18; + typedef T17 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,18 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<17> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector18< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<18> > +{ + template< typename Vector > struct apply + { + typedef vector17< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<17> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector18< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<18> > +{ + template< typename Vector > struct apply + { + typedef vector17< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<18> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item18 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<18> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<18> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<18> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<18> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<18> > +{ + template< typename Vector > struct apply + : long_<18> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<18> > + : size_impl< aux::vector_tag<18> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<18> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector19 +{ + typedef aux::vector_tag<19> tag; + typedef vector19 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + + + typedef void_ item19; + typedef T18 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,19 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<18> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector19< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<19> > +{ + template< typename Vector > struct apply + { + typedef vector18< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<18> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector19< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<19> > +{ + template< typename Vector > struct apply + { + typedef vector18< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<19> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item19 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<19> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<19> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<19> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<19> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<19> > +{ + template< typename Vector > struct apply + : long_<19> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<19> > + : size_impl< aux::vector_tag<19> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<19> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector20 +{ + typedef aux::vector_tag<20> tag; + typedef vector20 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + + + typedef void_ item20; + typedef T19 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,20 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<19> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector20< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<20> > +{ + template< typename Vector > struct apply + { + typedef vector19< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<19> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector20< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<20> > +{ + template< typename Vector > struct apply + { + typedef vector19< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<20> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item20 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<20> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<20> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<20> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<20> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<20> > +{ + template< typename Vector > struct apply + : long_<20> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<20> > + : size_impl< aux::vector_tag<20> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<20> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20_c.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20_c.hpp new file mode 100644 index 0000000000..56ca53f4ea --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20_c.hpp @@ -0,0 +1,195 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector20_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + > +struct vector11_c + : vector11< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >, integral_c + > +{ + typedef vector11_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11 + > +struct vector12_c + : vector12< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 > + > +{ + typedef vector12_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12 + > +struct vector13_c + : vector13< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + > +{ + typedef vector13_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13 + > +struct vector14_c + : vector14< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >, integral_c + > +{ + typedef vector14_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14 + > +struct vector15_c + : vector15< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 > + > +{ + typedef vector15_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15 + > +struct vector16_c + : vector16< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + > +{ + typedef vector16_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16 + > +struct vector17_c + : vector17< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >, integral_c + > +{ + typedef vector17_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17 + > +struct vector18_c + : vector18< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 > + > +{ + typedef vector18_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18 + > +struct vector19_c + : vector19< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + > +{ + typedef vector19_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19 + > +struct vector20_c + : vector20< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >, integral_c + > +{ + typedef vector20_c type; + typedef T value_type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30.hpp new file mode 100644 index 0000000000..a685019b48 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30.hpp @@ -0,0 +1,2124 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector30.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20 + > +struct vector21 +{ + typedef aux::vector_tag<21> tag; + typedef vector21 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + + + typedef void_ item21; + typedef T20 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,21 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<20> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector21< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<21> > +{ + template< typename Vector > struct apply + { + typedef vector20< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<20> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector21< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<21> > +{ + template< typename Vector > struct apply + { + typedef vector20< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<21> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item21 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<21> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<21> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<21> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<21> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<21> > +{ + template< typename Vector > struct apply + : long_<21> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<21> > + : size_impl< aux::vector_tag<21> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<21> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21 + > +struct vector22 +{ + typedef aux::vector_tag<22> tag; + typedef vector22 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + + + typedef void_ item22; + typedef T21 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,22 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<21> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector22< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<22> > +{ + template< typename Vector > struct apply + { + typedef vector21< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<21> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector22< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<22> > +{ + template< typename Vector > struct apply + { + typedef vector21< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<22> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item22 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<22> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<22> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<22> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<22> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<22> > +{ + template< typename Vector > struct apply + : long_<22> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<22> > + : size_impl< aux::vector_tag<22> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<22> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22 + > +struct vector23 +{ + typedef aux::vector_tag<23> tag; + typedef vector23 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + + + typedef void_ item23; + typedef T22 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,23 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<22> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector23< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<23> > +{ + template< typename Vector > struct apply + { + typedef vector22< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<22> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector23< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<23> > +{ + template< typename Vector > struct apply + { + typedef vector22< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<23> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item23 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<23> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<23> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<23> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<23> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<23> > +{ + template< typename Vector > struct apply + : long_<23> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<23> > + : size_impl< aux::vector_tag<23> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<23> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23 + > +struct vector24 +{ + typedef aux::vector_tag<24> tag; + typedef vector24 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + + + typedef void_ item24; + typedef T23 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,24 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<23> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector24< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<24> > +{ + template< typename Vector > struct apply + { + typedef vector23< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<23> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector24< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<24> > +{ + template< typename Vector > struct apply + { + typedef vector23< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<24> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item24 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<24> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<24> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<24> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<24> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<24> > +{ + template< typename Vector > struct apply + : long_<24> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<24> > + : size_impl< aux::vector_tag<24> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<24> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + > +struct vector25 +{ + typedef aux::vector_tag<25> tag; + typedef vector25 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + + + typedef void_ item25; + typedef T24 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,25 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<24> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector25< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<25> > +{ + template< typename Vector > struct apply + { + typedef vector24< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<24> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector25< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<25> > +{ + template< typename Vector > struct apply + { + typedef vector24< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<25> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item25 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<25> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<25> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<25> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<25> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<25> > +{ + template< typename Vector > struct apply + : long_<25> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<25> > + : size_impl< aux::vector_tag<25> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<25> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25 + > +struct vector26 +{ + typedef aux::vector_tag<26> tag; + typedef vector26 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + + + typedef void_ item26; + typedef T25 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,26 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<25> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector26< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<26> > +{ + template< typename Vector > struct apply + { + typedef vector25< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<25> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector26< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<26> > +{ + template< typename Vector > struct apply + { + typedef vector25< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<26> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item26 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<26> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<26> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<26> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<26> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<26> > +{ + template< typename Vector > struct apply + : long_<26> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<26> > + : size_impl< aux::vector_tag<26> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<26> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26 + > +struct vector27 +{ + typedef aux::vector_tag<27> tag; + typedef vector27 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + + + typedef void_ item27; + typedef T26 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,27 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<26> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector27< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<27> > +{ + template< typename Vector > struct apply + { + typedef vector26< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<26> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector27< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<27> > +{ + template< typename Vector > struct apply + { + typedef vector26< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<27> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item27 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<27> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<27> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<27> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<27> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<27> > +{ + template< typename Vector > struct apply + : long_<27> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<27> > + : size_impl< aux::vector_tag<27> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<27> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27 + > +struct vector28 +{ + typedef aux::vector_tag<28> tag; + typedef vector28 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + + + typedef void_ item28; + typedef T27 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,28 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<27> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector28< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<28> > +{ + template< typename Vector > struct apply + { + typedef vector27< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<27> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector28< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<28> > +{ + template< typename Vector > struct apply + { + typedef vector27< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<28> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item28 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<28> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<28> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<28> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<28> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<28> > +{ + template< typename Vector > struct apply + : long_<28> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<28> > + : size_impl< aux::vector_tag<28> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<28> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28 + > +struct vector29 +{ + typedef aux::vector_tag<29> tag; + typedef vector29 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + + + typedef void_ item29; + typedef T28 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,29 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<28> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector29< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<29> > +{ + template< typename Vector > struct apply + { + typedef vector28< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<28> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector29< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<29> > +{ + template< typename Vector > struct apply + { + typedef vector28< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<29> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item29 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<29> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<29> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<29> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<29> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<29> > +{ + template< typename Vector > struct apply + : long_<29> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<29> > + : size_impl< aux::vector_tag<29> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<29> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + > +struct vector30 +{ + typedef aux::vector_tag<30> tag; + typedef vector30 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + + + typedef void_ item30; + typedef T29 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,30 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<29> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector30< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<30> > +{ + template< typename Vector > struct apply + { + typedef vector29< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<29> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector30< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<30> > +{ + template< typename Vector > struct apply + { + typedef vector29< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<30> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item30 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<30> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<30> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<30> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<30> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<30> > +{ + template< typename Vector > struct apply + : long_<30> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<30> > + : size_impl< aux::vector_tag<30> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<30> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30_c.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30_c.hpp new file mode 100644 index 0000000000..6251dbc546 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30_c.hpp @@ -0,0 +1,238 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector30_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + > +struct vector21_c + : vector21< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 > + > +{ + typedef vector21_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21 + > +struct vector22_c + : vector22< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + > +{ + typedef vector22_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22 + > +struct vector23_c + : vector23< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >, integral_c + > +{ + typedef vector23_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23 + > +struct vector24_c + : vector24< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 > + > +{ + typedef vector24_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24 + > +struct vector25_c + : vector25< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + > +{ + typedef vector25_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25 + > +struct vector26_c + : vector26< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >, integral_c + > +{ + typedef vector26_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26 + > +struct vector27_c + : vector27< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 > + > +{ + typedef vector27_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27 + > +struct vector28_c + : vector28< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + > +{ + typedef vector28_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28 + > +struct vector29_c + : vector29< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >, integral_c + > +{ + typedef vector29_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29 + > +struct vector30_c + : vector30< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 > + > +{ + typedef vector30_c type; + typedef T value_type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40.hpp new file mode 100644 index 0000000000..1ed648a9d0 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40.hpp @@ -0,0 +1,2444 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector40.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30 + > +struct vector31 +{ + typedef aux::vector_tag<31> tag; + typedef vector31 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + + + typedef void_ item31; + typedef T30 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,31 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<30> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector31< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<31> > +{ + template< typename Vector > struct apply + { + typedef vector30< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<30> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector31< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<31> > +{ + template< typename Vector > struct apply + { + typedef vector30< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<31> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item31 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<31> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<31> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<31> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<31> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<31> > +{ + template< typename Vector > struct apply + : long_<31> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<31> > + : size_impl< aux::vector_tag<31> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<31> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31 + > +struct vector32 +{ + typedef aux::vector_tag<32> tag; + typedef vector32 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + + + typedef void_ item32; + typedef T31 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,32 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<31> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector32< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<32> > +{ + template< typename Vector > struct apply + { + typedef vector31< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<31> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector32< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<32> > +{ + template< typename Vector > struct apply + { + typedef vector31< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<32> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item32 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<32> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<32> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<32> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<32> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<32> > +{ + template< typename Vector > struct apply + : long_<32> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<32> > + : size_impl< aux::vector_tag<32> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<32> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32 + > +struct vector33 +{ + typedef aux::vector_tag<33> tag; + typedef vector33 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + + + typedef void_ item33; + typedef T32 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,33 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<32> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector33< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<33> > +{ + template< typename Vector > struct apply + { + typedef vector32< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<32> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector33< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<33> > +{ + template< typename Vector > struct apply + { + typedef vector32< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<33> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item33 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<33> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<33> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<33> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<33> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<33> > +{ + template< typename Vector > struct apply + : long_<33> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<33> > + : size_impl< aux::vector_tag<33> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<33> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33 + > +struct vector34 +{ + typedef aux::vector_tag<34> tag; + typedef vector34 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + + + typedef void_ item34; + typedef T33 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,34 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<33> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector34< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<34> > +{ + template< typename Vector > struct apply + { + typedef vector33< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<33> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector34< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<34> > +{ + template< typename Vector > struct apply + { + typedef vector33< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<34> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item34 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<34> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<34> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<34> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<34> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<34> > +{ + template< typename Vector > struct apply + : long_<34> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<34> > + : size_impl< aux::vector_tag<34> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<34> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + > +struct vector35 +{ + typedef aux::vector_tag<35> tag; + typedef vector35 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + + + typedef void_ item35; + typedef T34 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,35 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<34> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector35< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<35> > +{ + template< typename Vector > struct apply + { + typedef vector34< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<34> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector35< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<35> > +{ + template< typename Vector > struct apply + { + typedef vector34< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<35> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item35 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<35> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<35> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<35> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<35> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<35> > +{ + template< typename Vector > struct apply + : long_<35> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<35> > + : size_impl< aux::vector_tag<35> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<35> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35 + > +struct vector36 +{ + typedef aux::vector_tag<36> tag; + typedef vector36 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + + + typedef void_ item36; + typedef T35 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,36 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<35> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector36< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<36> > +{ + template< typename Vector > struct apply + { + typedef vector35< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<35> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector36< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<36> > +{ + template< typename Vector > struct apply + { + typedef vector35< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<36> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item36 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<36> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<36> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<36> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<36> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<36> > +{ + template< typename Vector > struct apply + : long_<36> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<36> > + : size_impl< aux::vector_tag<36> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<36> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36 + > +struct vector37 +{ + typedef aux::vector_tag<37> tag; + typedef vector37 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + typedef T36 item36; + + + typedef void_ item37; + typedef T36 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,37 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<36> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector37< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<37> > +{ + template< typename Vector > struct apply + { + typedef vector36< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35, typename Vector::item36 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<36> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector37< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<37> > +{ + template< typename Vector > struct apply + { + typedef vector36< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<37> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item37 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<37> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<37> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<37> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<37> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<37> > +{ + template< typename Vector > struct apply + : long_<37> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<37> > + : size_impl< aux::vector_tag<37> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<37> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37 + > +struct vector38 +{ + typedef aux::vector_tag<38> tag; + typedef vector38 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + typedef T36 item36; + typedef T37 item37; + + + typedef void_ item38; + typedef T37 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,38 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<37> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector38< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<38> > +{ + template< typename Vector > struct apply + { + typedef vector37< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35, typename Vector::item36 + , typename Vector::item37 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<37> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector38< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<38> > +{ + template< typename Vector > struct apply + { + typedef vector37< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<38> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item38 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<38> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<38> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<38> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<38> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<38> > +{ + template< typename Vector > struct apply + : long_<38> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<38> > + : size_impl< aux::vector_tag<38> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<38> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38 + > +struct vector39 +{ + typedef aux::vector_tag<39> tag; + typedef vector39 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + typedef T36 item36; + typedef T37 item37; + typedef T38 item38; + + + typedef void_ item39; + typedef T38 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,39 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<38> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector39< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<39> > +{ + template< typename Vector > struct apply + { + typedef vector38< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35, typename Vector::item36 + , typename Vector::item37, typename Vector::item38 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<38> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector39< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<39> > +{ + template< typename Vector > struct apply + { + typedef vector38< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<39> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item39 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<39> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<39> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<39> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<39> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<39> > +{ + template< typename Vector > struct apply + : long_<39> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<39> > + : size_impl< aux::vector_tag<39> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<39> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + > +struct vector40 +{ + typedef aux::vector_tag<40> tag; + typedef vector40 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + typedef T36 item36; + typedef T37 item37; + typedef T38 item38; + typedef T39 item39; + + + typedef void_ item40; + typedef T39 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,40 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<39> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector40< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<40> > +{ + template< typename Vector > struct apply + { + typedef vector39< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35, typename Vector::item36 + , typename Vector::item37, typename Vector::item38 + , typename Vector::item39 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<39> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector40< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<40> > +{ + template< typename Vector > struct apply + { + typedef vector39< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<40> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item40 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<40> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<40> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<40> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<40> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<40> > +{ + template< typename Vector > struct apply + : long_<40> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<40> > + : size_impl< aux::vector_tag<40> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<40> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40_c.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40_c.hpp new file mode 100644 index 0000000000..ba0ffa88ee --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40_c.hpp @@ -0,0 +1,281 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector40_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + > +struct vector31_c + : vector31< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + > +{ + typedef vector31_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31 + > +struct vector32_c + : vector32< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >, integral_c + > +{ + typedef vector32_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32 + > +struct vector33_c + : vector33< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 > + > +{ + typedef vector33_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33 + > +struct vector34_c + : vector34< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + > +{ + typedef vector34_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34 + > +struct vector35_c + : vector35< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >, integral_c + > +{ + typedef vector35_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35 + > +struct vector36_c + : vector36< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 > + > +{ + typedef vector36_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36 + > +struct vector37_c + : vector37< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + > +{ + typedef vector37_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37 + > +struct vector38_c + : vector38< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >, integral_c + > +{ + typedef vector38_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38 + > +struct vector39_c + : vector39< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 > + > +{ + typedef vector39_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39 + > +struct vector40_c + : vector40< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + > +{ + typedef vector40_c type; + typedef T value_type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50.hpp new file mode 100644 index 0000000000..3da323a998 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50.hpp @@ -0,0 +1,2764 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector50.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40 + > +struct vector41 +{ + typedef aux::vector_tag<41> tag; + typedef vector41 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + typedef T36 item36; + typedef T37 item37; + typedef T38 item38; + typedef T39 item39; + typedef T40 item40; + + + typedef void_ item41; + typedef T40 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,41 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<40> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector41< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<41> > +{ + template< typename Vector > struct apply + { + typedef vector40< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35, typename Vector::item36 + , typename Vector::item37, typename Vector::item38 + , typename Vector::item39, typename Vector::item40 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<40> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector41< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<41> > +{ + template< typename Vector > struct apply + { + typedef vector40< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<41> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item41 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<41> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<41> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<41> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<41> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<41> > +{ + template< typename Vector > struct apply + : long_<41> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<41> > + : size_impl< aux::vector_tag<41> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<41> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41 + > +struct vector42 +{ + typedef aux::vector_tag<42> tag; + typedef vector42 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + typedef T36 item36; + typedef T37 item37; + typedef T38 item38; + typedef T39 item39; + typedef T40 item40; + typedef T41 item41; + + + typedef void_ item42; + typedef T41 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,42 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<41> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector42< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<42> > +{ + template< typename Vector > struct apply + { + typedef vector41< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35, typename Vector::item36 + , typename Vector::item37, typename Vector::item38 + , typename Vector::item39, typename Vector::item40 + , typename Vector::item41 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<41> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector42< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<42> > +{ + template< typename Vector > struct apply + { + typedef vector41< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<42> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item42 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<42> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<42> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<42> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<42> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<42> > +{ + template< typename Vector > struct apply + : long_<42> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<42> > + : size_impl< aux::vector_tag<42> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<42> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42 + > +struct vector43 +{ + typedef aux::vector_tag<43> tag; + typedef vector43 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + typedef T36 item36; + typedef T37 item37; + typedef T38 item38; + typedef T39 item39; + typedef T40 item40; + typedef T41 item41; + typedef T42 item42; + + + typedef void_ item43; + typedef T42 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,43 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<42> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector43< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<43> > +{ + template< typename Vector > struct apply + { + typedef vector42< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35, typename Vector::item36 + , typename Vector::item37, typename Vector::item38 + , typename Vector::item39, typename Vector::item40 + , typename Vector::item41, typename Vector::item42 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<42> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector43< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<43> > +{ + template< typename Vector > struct apply + { + typedef vector42< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<43> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item43 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<43> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<43> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<43> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<43> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<43> > +{ + template< typename Vector > struct apply + : long_<43> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<43> > + : size_impl< aux::vector_tag<43> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<43> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43 + > +struct vector44 +{ + typedef aux::vector_tag<44> tag; + typedef vector44 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + typedef T36 item36; + typedef T37 item37; + typedef T38 item38; + typedef T39 item39; + typedef T40 item40; + typedef T41 item41; + typedef T42 item42; + typedef T43 item43; + + + typedef void_ item44; + typedef T43 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,44 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<43> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector44< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<44> > +{ + template< typename Vector > struct apply + { + typedef vector43< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35, typename Vector::item36 + , typename Vector::item37, typename Vector::item38 + , typename Vector::item39, typename Vector::item40 + , typename Vector::item41, typename Vector::item42 + , typename Vector::item43 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<43> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector44< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<44> > +{ + template< typename Vector > struct apply + { + typedef vector43< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<44> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item44 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<44> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<44> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<44> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<44> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<44> > +{ + template< typename Vector > struct apply + : long_<44> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<44> > + : size_impl< aux::vector_tag<44> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<44> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + > +struct vector45 +{ + typedef aux::vector_tag<45> tag; + typedef vector45 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + typedef T36 item36; + typedef T37 item37; + typedef T38 item38; + typedef T39 item39; + typedef T40 item40; + typedef T41 item41; + typedef T42 item42; + typedef T43 item43; + typedef T44 item44; + + + typedef void_ item45; + typedef T44 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,45 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<44> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector45< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<45> > +{ + template< typename Vector > struct apply + { + typedef vector44< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35, typename Vector::item36 + , typename Vector::item37, typename Vector::item38 + , typename Vector::item39, typename Vector::item40 + , typename Vector::item41, typename Vector::item42 + , typename Vector::item43, typename Vector::item44 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<44> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector45< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<45> > +{ + template< typename Vector > struct apply + { + typedef vector44< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<45> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item45 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<45> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<45> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<45> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<45> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<45> > +{ + template< typename Vector > struct apply + : long_<45> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<45> > + : size_impl< aux::vector_tag<45> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<45> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + , typename T45 + > +struct vector46 +{ + typedef aux::vector_tag<46> tag; + typedef vector46 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + typedef T36 item36; + typedef T37 item37; + typedef T38 item38; + typedef T39 item39; + typedef T40 item40; + typedef T41 item41; + typedef T42 item42; + typedef T43 item43; + typedef T44 item44; + typedef T45 item45; + + + typedef void_ item46; + typedef T45 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,46 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<45> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector46< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<46> > +{ + template< typename Vector > struct apply + { + typedef vector45< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35, typename Vector::item36 + , typename Vector::item37, typename Vector::item38 + , typename Vector::item39, typename Vector::item40 + , typename Vector::item41, typename Vector::item42 + , typename Vector::item43, typename Vector::item44 + , typename Vector::item45 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<45> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector46< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<46> > +{ + template< typename Vector > struct apply + { + typedef vector45< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<46> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item46 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<46> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<46> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<46> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<46> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<46> > +{ + template< typename Vector > struct apply + : long_<46> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<46> > + : size_impl< aux::vector_tag<46> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<46> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + , typename T45, typename T46 + > +struct vector47 +{ + typedef aux::vector_tag<47> tag; + typedef vector47 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + typedef T36 item36; + typedef T37 item37; + typedef T38 item38; + typedef T39 item39; + typedef T40 item40; + typedef T41 item41; + typedef T42 item42; + typedef T43 item43; + typedef T44 item44; + typedef T45 item45; + typedef T46 item46; + + + typedef void_ item47; + typedef T46 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,47 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<46> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector47< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<47> > +{ + template< typename Vector > struct apply + { + typedef vector46< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35, typename Vector::item36 + , typename Vector::item37, typename Vector::item38 + , typename Vector::item39, typename Vector::item40 + , typename Vector::item41, typename Vector::item42 + , typename Vector::item43, typename Vector::item44 + , typename Vector::item45, typename Vector::item46 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<46> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector47< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<47> > +{ + template< typename Vector > struct apply + { + typedef vector46< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<47> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item47 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<47> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<47> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<47> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<47> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<47> > +{ + template< typename Vector > struct apply + : long_<47> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<47> > + : size_impl< aux::vector_tag<47> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<47> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + , typename T45, typename T46, typename T47 + > +struct vector48 +{ + typedef aux::vector_tag<48> tag; + typedef vector48 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + typedef T36 item36; + typedef T37 item37; + typedef T38 item38; + typedef T39 item39; + typedef T40 item40; + typedef T41 item41; + typedef T42 item42; + typedef T43 item43; + typedef T44 item44; + typedef T45 item45; + typedef T46 item46; + typedef T47 item47; + + + typedef void_ item48; + typedef T47 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,48 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<47> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector48< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<48> > +{ + template< typename Vector > struct apply + { + typedef vector47< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35, typename Vector::item36 + , typename Vector::item37, typename Vector::item38 + , typename Vector::item39, typename Vector::item40 + , typename Vector::item41, typename Vector::item42 + , typename Vector::item43, typename Vector::item44 + , typename Vector::item45, typename Vector::item46 + , typename Vector::item47 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<47> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector48< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<48> > +{ + template< typename Vector > struct apply + { + typedef vector47< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<48> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item48 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<48> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<48> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<48> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<48> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<48> > +{ + template< typename Vector > struct apply + : long_<48> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<48> > + : size_impl< aux::vector_tag<48> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<48> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + , typename T45, typename T46, typename T47, typename T48 + > +struct vector49 +{ + typedef aux::vector_tag<49> tag; + typedef vector49 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + typedef T36 item36; + typedef T37 item37; + typedef T38 item38; + typedef T39 item39; + typedef T40 item40; + typedef T41 item41; + typedef T42 item42; + typedef T43 item43; + typedef T44 item44; + typedef T45 item45; + typedef T46 item46; + typedef T47 item47; + typedef T48 item48; + + + typedef void_ item49; + typedef T48 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,49 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<48> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector49< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46, typename Vector::item47 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<49> > +{ + template< typename Vector > struct apply + { + typedef vector48< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35, typename Vector::item36 + , typename Vector::item37, typename Vector::item38 + , typename Vector::item39, typename Vector::item40 + , typename Vector::item41, typename Vector::item42 + , typename Vector::item43, typename Vector::item44 + , typename Vector::item45, typename Vector::item46 + , typename Vector::item47, typename Vector::item48 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<48> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector49< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46, typename Vector::item47 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<49> > +{ + template< typename Vector > struct apply + { + typedef vector48< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46, typename Vector::item47 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<49> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item49 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<49> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<49> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<49> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<49> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<49> > +{ + template< typename Vector > struct apply + : long_<49> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<49> > + : size_impl< aux::vector_tag<49> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<49> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + , typename T45, typename T46, typename T47, typename T48, typename T49 + > +struct vector50 +{ + typedef aux::vector_tag<50> tag; + typedef vector50 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + typedef T36 item36; + typedef T37 item37; + typedef T38 item38; + typedef T39 item39; + typedef T40 item40; + typedef T41 item41; + typedef T42 item42; + typedef T43 item43; + typedef T44 item44; + typedef T45 item45; + typedef T46 item46; + typedef T47 item47; + typedef T48 item48; + typedef T49 item49; + + + typedef void_ item50; + typedef T49 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,50 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<49> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector50< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46, typename Vector::item47 + , typename Vector::item48 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<50> > +{ + template< typename Vector > struct apply + { + typedef vector49< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35, typename Vector::item36 + , typename Vector::item37, typename Vector::item38 + , typename Vector::item39, typename Vector::item40 + , typename Vector::item41, typename Vector::item42 + , typename Vector::item43, typename Vector::item44 + , typename Vector::item45, typename Vector::item46 + , typename Vector::item47, typename Vector::item48 + , typename Vector::item49 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<49> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector50< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46, typename Vector::item47 + , typename Vector::item48 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<50> > +{ + template< typename Vector > struct apply + { + typedef vector49< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46, typename Vector::item47 + , typename Vector::item48 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<50> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item50 type; + }; +}; + +} + +template<> +struct at_impl< aux::vector_tag<50> > +{ + template< typename V_, typename N > struct apply + { + typedef typename aux::v_at_impl + ::template result_::type type; + }; +}; + +template<> +struct front_impl< aux::vector_tag<50> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +template<> +struct back_impl< aux::vector_tag<50> > +{ + template< typename Vector > struct apply + { + typedef typename Vector::back type; + }; +}; + +template<> +struct empty_impl< aux::vector_tag<50> > +{ + template< typename Vector > struct apply + : false_ + { + }; +}; + +template<> +struct size_impl< aux::vector_tag<50> > +{ + template< typename Vector > struct apply + : long_<50> + { + }; +}; + +template<> +struct O1_size_impl< aux::vector_tag<50> > + : size_impl< aux::vector_tag<50> > +{ +}; + +template<> +struct clear_impl< aux::vector_tag<50> > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50_c.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50_c.hpp new file mode 100644 index 0000000000..e07f2b3ad5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50_c.hpp @@ -0,0 +1,325 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector50_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + > +struct vector41_c + : vector41< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 >, integral_c + > +{ + typedef vector41_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41 + > +struct vector42_c + : vector42< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 > + > +{ + typedef vector42_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42 + > +struct vector43_c + : vector43< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > + > +{ + typedef vector43_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42, T C43 + > +struct vector44_c + : vector44< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 >, integral_c + > +{ + typedef vector44_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42, T C43, T C44 + > +struct vector45_c + : vector45< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > + , integral_c< T,C43 >, integral_c< T,C44 > + > +{ + typedef vector45_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42, T C43, T C44, T C45 + > +struct vector46_c + : vector46< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > + , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 > + > +{ + typedef vector46_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42, T C43, T C44, T C45, T C46 + > +struct vector47_c + : vector47< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > + , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 >, integral_c + > +{ + typedef vector47_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42, T C43, T C44, T C45, T C46, T C47 + > +struct vector48_c + : vector48< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > + , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 > + , integral_c< T,C46 >, integral_c< T,C47 > + > +{ + typedef vector48_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48 + > +struct vector49_c + : vector49< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > + , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 > + , integral_c< T,C46 >, integral_c< T,C47 >, integral_c< T,C48 > + > +{ + typedef vector49_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48, T C49 + > +struct vector50_c + : vector50< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > + , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 > + , integral_c< T,C46 >, integral_c< T,C47 >, integral_c< T,C48 >, integral_c + > +{ + typedef vector50_c type; + typedef T value_type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector10.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector10.hpp new file mode 100644 index 0000000000..88bbd3b318 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector10.hpp @@ -0,0 +1,829 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector10.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< typename V > +struct v_at< V,0 > +{ + typedef typename V::item0 type; +}; + +template< + typename T0 + > +struct vector1 +{ + typedef aux::vector_tag<1> tag; + typedef vector1 type; + typedef T0 item0; + typedef void_ item1; + typedef T0 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,1 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<0> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector1< + T + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<1> > +{ + template< typename Vector > struct apply + { + typedef vector0< + + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<0> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector1< + + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<1> > +{ + template< typename Vector > struct apply + { + typedef vector0< + + > type; + }; +}; + +template< typename V > +struct v_at< V,1 > +{ + typedef typename V::item1 type; +}; + +template< + typename T0, typename T1 + > +struct vector2 +{ + typedef aux::vector_tag<2> tag; + typedef vector2 type; + typedef T0 item0; + typedef T1 item1; + + + typedef void_ item2; + typedef T1 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,2 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<1> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector2< + T + , + typename Vector::item0 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<2> > +{ + template< typename Vector > struct apply + { + typedef vector1< + typename Vector::item1 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<1> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector2< + typename Vector::item0 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<2> > +{ + template< typename Vector > struct apply + { + typedef vector1< + typename Vector::item0 + > type; + }; +}; + +template< typename V > +struct v_at< V,2 > +{ + typedef typename V::item2 type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct vector3 +{ + typedef aux::vector_tag<3> tag; + typedef vector3 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + + + typedef void_ item3; + typedef T2 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,3 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<2> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector3< + T + , + typename Vector::item0, typename Vector::item1 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<3> > +{ + template< typename Vector > struct apply + { + typedef vector2< + typename Vector::item1, typename Vector::item2 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<2> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector3< + typename Vector::item0, typename Vector::item1 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<3> > +{ + template< typename Vector > struct apply + { + typedef vector2< + typename Vector::item0, typename Vector::item1 + > type; + }; +}; + +template< typename V > +struct v_at< V,3 > +{ + typedef typename V::item3 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct vector4 +{ + typedef aux::vector_tag<4> tag; + typedef vector4 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + + + typedef void_ item4; + typedef T3 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,4 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<3> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector4< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<4> > +{ + template< typename Vector > struct apply + { + typedef vector3< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<3> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector4< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<4> > +{ + template< typename Vector > struct apply + { + typedef vector3< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2 + > type; + }; +}; + +template< typename V > +struct v_at< V,4 > +{ + typedef typename V::item4 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct vector5 +{ + typedef aux::vector_tag<5> tag; + typedef vector5 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + + + typedef void_ item5; + typedef T4 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,5 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<4> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector5< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<5> > +{ + template< typename Vector > struct apply + { + typedef vector4< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<4> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector5< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<5> > +{ + template< typename Vector > struct apply + { + typedef vector4< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + > type; + }; +}; + +template< typename V > +struct v_at< V,5 > +{ + typedef typename V::item5 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct vector6 +{ + typedef aux::vector_tag<6> tag; + typedef vector6 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + + + typedef void_ item6; + typedef T5 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,6 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<5> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector6< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<6> > +{ + template< typename Vector > struct apply + { + typedef vector5< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<5> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector6< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<6> > +{ + template< typename Vector > struct apply + { + typedef vector5< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4 + > type; + }; +}; + +template< typename V > +struct v_at< V,6 > +{ + typedef typename V::item6 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct vector7 +{ + typedef aux::vector_tag<7> tag; + typedef vector7 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + + + typedef void_ item7; + typedef T6 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,7 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<6> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector7< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<7> > +{ + template< typename Vector > struct apply + { + typedef vector6< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<6> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector7< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<7> > +{ + template< typename Vector > struct apply + { + typedef vector6< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + > type; + }; +}; + +template< typename V > +struct v_at< V,7 > +{ + typedef typename V::item7 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct vector8 +{ + typedef aux::vector_tag<8> tag; + typedef vector8 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + + + typedef void_ item8; + typedef T7 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,8 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<7> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector8< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<8> > +{ + template< typename Vector > struct apply + { + typedef vector7< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<7> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector8< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<8> > +{ + template< typename Vector > struct apply + { + typedef vector7< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6 + > type; + }; +}; + +template< typename V > +struct v_at< V,8 > +{ + typedef typename V::item8 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct vector9 +{ + typedef aux::vector_tag<9> tag; + typedef vector9 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + + + typedef void_ item9; + typedef T8 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,9 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<8> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector9< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<9> > +{ + template< typename Vector > struct apply + { + typedef vector8< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<8> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector9< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<9> > +{ + template< typename Vector > struct apply + { + typedef vector8< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + > type; + }; +}; + +template< typename V > +struct v_at< V,9 > +{ + typedef typename V::item9 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct vector10 +{ + typedef aux::vector_tag<10> tag; + typedef vector10 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + + + typedef void_ item10; + typedef T9 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,10 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<9> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector10< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<10> > +{ + template< typename Vector > struct apply + { + typedef vector9< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<9> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector10< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<10> > +{ + template< typename Vector > struct apply + { + typedef vector9< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8 + > type; + }; +}; + +template< typename V > +struct v_at< V,10 > +{ + typedef typename V::item10 type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector10_c.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector10_c.hpp new file mode 100644 index 0000000000..8b36f6a3ed --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector10_c.hpp @@ -0,0 +1,149 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector10_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T + , T C0 + > +struct vector1_c + : vector1< integral_c< T,C0 > > +{ + typedef vector1_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1 + > +struct vector2_c + : vector2< integral_c< T,C0 >, integral_c< T,C1 > > +{ + typedef vector2_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2 + > +struct vector3_c + : vector3< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > > +{ + typedef vector3_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3 + > +struct vector4_c + : vector4< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >, integral_c + > +{ + typedef vector4_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4 + > +struct vector5_c + : vector5< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 > + > +{ + typedef vector5_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5 + > +struct vector6_c + : vector6< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 > + > +{ + typedef vector6_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6 + > +struct vector7_c + : vector7< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c + > +{ + typedef vector7_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7 + > +struct vector8_c + : vector8< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 > + > +{ + typedef vector8_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8 + > +struct vector9_c + : vector9< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 > + > +{ + typedef vector9_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9 + > +struct vector10_c + : vector10< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + > +{ + typedef vector10_c type; + typedef T value_type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector20.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector20.hpp new file mode 100644 index 0000000000..8c6c8bbb97 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector20.hpp @@ -0,0 +1,1144 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector20.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector11 +{ + typedef aux::vector_tag<11> tag; + typedef vector11 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + + + typedef void_ item11; + typedef T10 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,11 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<10> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector11< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<11> > +{ + template< typename Vector > struct apply + { + typedef vector10< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<10> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector11< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<11> > +{ + template< typename Vector > struct apply + { + typedef vector10< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + > type; + }; +}; + +template< typename V > +struct v_at< V,11 > +{ + typedef typename V::item11 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector12 +{ + typedef aux::vector_tag<12> tag; + typedef vector12 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + + + typedef void_ item12; + typedef T11 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,12 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<11> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector12< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<12> > +{ + template< typename Vector > struct apply + { + typedef vector11< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<11> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector12< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<12> > +{ + template< typename Vector > struct apply + { + typedef vector11< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10 + > type; + }; +}; + +template< typename V > +struct v_at< V,12 > +{ + typedef typename V::item12 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector13 +{ + typedef aux::vector_tag<13> tag; + typedef vector13 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + + + typedef void_ item13; + typedef T12 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,13 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<12> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector13< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<13> > +{ + template< typename Vector > struct apply + { + typedef vector12< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<12> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector13< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<13> > +{ + template< typename Vector > struct apply + { + typedef vector12< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + > type; + }; +}; + +template< typename V > +struct v_at< V,13 > +{ + typedef typename V::item13 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector14 +{ + typedef aux::vector_tag<14> tag; + typedef vector14 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + + + typedef void_ item14; + typedef T13 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,14 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<13> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector14< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<14> > +{ + template< typename Vector > struct apply + { + typedef vector13< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<13> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector14< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<14> > +{ + template< typename Vector > struct apply + { + typedef vector13< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12 + > type; + }; +}; + +template< typename V > +struct v_at< V,14 > +{ + typedef typename V::item14 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector15 +{ + typedef aux::vector_tag<15> tag; + typedef vector15 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + + + typedef void_ item15; + typedef T14 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,15 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<14> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector15< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<15> > +{ + template< typename Vector > struct apply + { + typedef vector14< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<14> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector15< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<15> > +{ + template< typename Vector > struct apply + { + typedef vector14< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + > type; + }; +}; + +template< typename V > +struct v_at< V,15 > +{ + typedef typename V::item15 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector16 +{ + typedef aux::vector_tag<16> tag; + typedef vector16 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + + + typedef void_ item16; + typedef T15 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,16 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<15> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector16< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<16> > +{ + template< typename Vector > struct apply + { + typedef vector15< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<15> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector16< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<16> > +{ + template< typename Vector > struct apply + { + typedef vector15< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14 + > type; + }; +}; + +template< typename V > +struct v_at< V,16 > +{ + typedef typename V::item16 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector17 +{ + typedef aux::vector_tag<17> tag; + typedef vector17 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + + + typedef void_ item17; + typedef T16 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,17 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<16> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector17< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<17> > +{ + template< typename Vector > struct apply + { + typedef vector16< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<16> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector17< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<17> > +{ + template< typename Vector > struct apply + { + typedef vector16< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + > type; + }; +}; + +template< typename V > +struct v_at< V,17 > +{ + typedef typename V::item17 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector18 +{ + typedef aux::vector_tag<18> tag; + typedef vector18 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + + + typedef void_ item18; + typedef T17 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,18 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<17> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector18< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<18> > +{ + template< typename Vector > struct apply + { + typedef vector17< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<17> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector18< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<18> > +{ + template< typename Vector > struct apply + { + typedef vector17< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16 + > type; + }; +}; + +template< typename V > +struct v_at< V,18 > +{ + typedef typename V::item18 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector19 +{ + typedef aux::vector_tag<19> tag; + typedef vector19 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + + + typedef void_ item19; + typedef T18 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,19 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<18> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector19< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<19> > +{ + template< typename Vector > struct apply + { + typedef vector18< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<18> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector19< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<19> > +{ + template< typename Vector > struct apply + { + typedef vector18< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + > type; + }; +}; + +template< typename V > +struct v_at< V,19 > +{ + typedef typename V::item19 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector20 +{ + typedef aux::vector_tag<20> tag; + typedef vector20 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + + + typedef void_ item20; + typedef T19 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,20 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<19> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector20< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<20> > +{ + template< typename Vector > struct apply + { + typedef vector19< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<19> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector20< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<20> > +{ + template< typename Vector > struct apply + { + typedef vector19< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18 + > type; + }; +}; + +template< typename V > +struct v_at< V,20 > +{ + typedef typename V::item20 type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector20_c.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector20_c.hpp new file mode 100644 index 0000000000..56ca53f4ea --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector20_c.hpp @@ -0,0 +1,195 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector20_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + > +struct vector11_c + : vector11< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >, integral_c + > +{ + typedef vector11_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11 + > +struct vector12_c + : vector12< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 > + > +{ + typedef vector12_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12 + > +struct vector13_c + : vector13< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + > +{ + typedef vector13_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13 + > +struct vector14_c + : vector14< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >, integral_c + > +{ + typedef vector14_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14 + > +struct vector15_c + : vector15< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 > + > +{ + typedef vector15_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15 + > +struct vector16_c + : vector16< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + > +{ + typedef vector16_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16 + > +struct vector17_c + : vector17< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >, integral_c + > +{ + typedef vector17_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17 + > +struct vector18_c + : vector18< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 > + > +{ + typedef vector18_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18 + > +struct vector19_c + : vector19< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + > +{ + typedef vector19_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19 + > +struct vector20_c + : vector20< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >, integral_c + > +{ + typedef vector20_c type; + typedef T value_type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector30.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector30.hpp new file mode 100644 index 0000000000..b7da8e76b6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector30.hpp @@ -0,0 +1,1464 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector30.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20 + > +struct vector21 +{ + typedef aux::vector_tag<21> tag; + typedef vector21 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + + + typedef void_ item21; + typedef T20 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,21 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<20> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector21< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<21> > +{ + template< typename Vector > struct apply + { + typedef vector20< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<20> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector21< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<21> > +{ + template< typename Vector > struct apply + { + typedef vector20< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + > type; + }; +}; + +template< typename V > +struct v_at< V,21 > +{ + typedef typename V::item21 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21 + > +struct vector22 +{ + typedef aux::vector_tag<22> tag; + typedef vector22 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + + + typedef void_ item22; + typedef T21 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,22 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<21> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector22< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<22> > +{ + template< typename Vector > struct apply + { + typedef vector21< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<21> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector22< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<22> > +{ + template< typename Vector > struct apply + { + typedef vector21< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20 + > type; + }; +}; + +template< typename V > +struct v_at< V,22 > +{ + typedef typename V::item22 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22 + > +struct vector23 +{ + typedef aux::vector_tag<23> tag; + typedef vector23 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + + + typedef void_ item23; + typedef T22 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,23 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<22> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector23< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<23> > +{ + template< typename Vector > struct apply + { + typedef vector22< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<22> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector23< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<23> > +{ + template< typename Vector > struct apply + { + typedef vector22< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + > type; + }; +}; + +template< typename V > +struct v_at< V,23 > +{ + typedef typename V::item23 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23 + > +struct vector24 +{ + typedef aux::vector_tag<24> tag; + typedef vector24 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + + + typedef void_ item24; + typedef T23 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,24 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<23> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector24< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<24> > +{ + template< typename Vector > struct apply + { + typedef vector23< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<23> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector24< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<24> > +{ + template< typename Vector > struct apply + { + typedef vector23< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22 + > type; + }; +}; + +template< typename V > +struct v_at< V,24 > +{ + typedef typename V::item24 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + > +struct vector25 +{ + typedef aux::vector_tag<25> tag; + typedef vector25 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + + + typedef void_ item25; + typedef T24 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,25 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<24> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector25< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<25> > +{ + template< typename Vector > struct apply + { + typedef vector24< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<24> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector25< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<25> > +{ + template< typename Vector > struct apply + { + typedef vector24< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + > type; + }; +}; + +template< typename V > +struct v_at< V,25 > +{ + typedef typename V::item25 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25 + > +struct vector26 +{ + typedef aux::vector_tag<26> tag; + typedef vector26 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + + + typedef void_ item26; + typedef T25 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,26 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<25> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector26< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<26> > +{ + template< typename Vector > struct apply + { + typedef vector25< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<25> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector26< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<26> > +{ + template< typename Vector > struct apply + { + typedef vector25< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24 + > type; + }; +}; + +template< typename V > +struct v_at< V,26 > +{ + typedef typename V::item26 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26 + > +struct vector27 +{ + typedef aux::vector_tag<27> tag; + typedef vector27 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + + + typedef void_ item27; + typedef T26 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,27 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<26> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector27< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<27> > +{ + template< typename Vector > struct apply + { + typedef vector26< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<26> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector27< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<27> > +{ + template< typename Vector > struct apply + { + typedef vector26< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + > type; + }; +}; + +template< typename V > +struct v_at< V,27 > +{ + typedef typename V::item27 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27 + > +struct vector28 +{ + typedef aux::vector_tag<28> tag; + typedef vector28 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + + + typedef void_ item28; + typedef T27 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,28 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<27> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector28< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<28> > +{ + template< typename Vector > struct apply + { + typedef vector27< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<27> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector28< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<28> > +{ + template< typename Vector > struct apply + { + typedef vector27< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26 + > type; + }; +}; + +template< typename V > +struct v_at< V,28 > +{ + typedef typename V::item28 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28 + > +struct vector29 +{ + typedef aux::vector_tag<29> tag; + typedef vector29 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + + + typedef void_ item29; + typedef T28 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,29 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<28> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector29< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<29> > +{ + template< typename Vector > struct apply + { + typedef vector28< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<28> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector29< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<29> > +{ + template< typename Vector > struct apply + { + typedef vector28< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + > type; + }; +}; + +template< typename V > +struct v_at< V,29 > +{ + typedef typename V::item29 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + > +struct vector30 +{ + typedef aux::vector_tag<30> tag; + typedef vector30 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + + + typedef void_ item30; + typedef T29 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,30 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<29> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector30< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<30> > +{ + template< typename Vector > struct apply + { + typedef vector29< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<29> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector30< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<30> > +{ + template< typename Vector > struct apply + { + typedef vector29< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28 + > type; + }; +}; + +template< typename V > +struct v_at< V,30 > +{ + typedef typename V::item30 type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector30_c.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector30_c.hpp new file mode 100644 index 0000000000..6251dbc546 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector30_c.hpp @@ -0,0 +1,238 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector30_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + > +struct vector21_c + : vector21< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 > + > +{ + typedef vector21_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21 + > +struct vector22_c + : vector22< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + > +{ + typedef vector22_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22 + > +struct vector23_c + : vector23< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >, integral_c + > +{ + typedef vector23_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23 + > +struct vector24_c + : vector24< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 > + > +{ + typedef vector24_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24 + > +struct vector25_c + : vector25< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + > +{ + typedef vector25_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25 + > +struct vector26_c + : vector26< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >, integral_c + > +{ + typedef vector26_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26 + > +struct vector27_c + : vector27< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 > + > +{ + typedef vector27_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27 + > +struct vector28_c + : vector28< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + > +{ + typedef vector28_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28 + > +struct vector29_c + : vector29< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >, integral_c + > +{ + typedef vector29_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29 + > +struct vector30_c + : vector30< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 > + > +{ + typedef vector30_c type; + typedef T value_type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector40.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector40.hpp new file mode 100644 index 0000000000..7487be4b06 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector40.hpp @@ -0,0 +1,1784 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector40.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30 + > +struct vector31 +{ + typedef aux::vector_tag<31> tag; + typedef vector31 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + + + typedef void_ item31; + typedef T30 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,31 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<30> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector31< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<31> > +{ + template< typename Vector > struct apply + { + typedef vector30< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<30> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector31< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<31> > +{ + template< typename Vector > struct apply + { + typedef vector30< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + > type; + }; +}; + +template< typename V > +struct v_at< V,31 > +{ + typedef typename V::item31 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31 + > +struct vector32 +{ + typedef aux::vector_tag<32> tag; + typedef vector32 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + + + typedef void_ item32; + typedef T31 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,32 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<31> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector32< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<32> > +{ + template< typename Vector > struct apply + { + typedef vector31< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<31> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector32< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<32> > +{ + template< typename Vector > struct apply + { + typedef vector31< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30 + > type; + }; +}; + +template< typename V > +struct v_at< V,32 > +{ + typedef typename V::item32 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32 + > +struct vector33 +{ + typedef aux::vector_tag<33> tag; + typedef vector33 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + + + typedef void_ item33; + typedef T32 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,33 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<32> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector33< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<33> > +{ + template< typename Vector > struct apply + { + typedef vector32< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<32> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector33< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<33> > +{ + template< typename Vector > struct apply + { + typedef vector32< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + > type; + }; +}; + +template< typename V > +struct v_at< V,33 > +{ + typedef typename V::item33 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33 + > +struct vector34 +{ + typedef aux::vector_tag<34> tag; + typedef vector34 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + + + typedef void_ item34; + typedef T33 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,34 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<33> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector34< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<34> > +{ + template< typename Vector > struct apply + { + typedef vector33< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<33> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector34< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<34> > +{ + template< typename Vector > struct apply + { + typedef vector33< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32 + > type; + }; +}; + +template< typename V > +struct v_at< V,34 > +{ + typedef typename V::item34 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + > +struct vector35 +{ + typedef aux::vector_tag<35> tag; + typedef vector35 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + + + typedef void_ item35; + typedef T34 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,35 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<34> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector35< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<35> > +{ + template< typename Vector > struct apply + { + typedef vector34< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<34> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector35< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<35> > +{ + template< typename Vector > struct apply + { + typedef vector34< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + > type; + }; +}; + +template< typename V > +struct v_at< V,35 > +{ + typedef typename V::item35 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35 + > +struct vector36 +{ + typedef aux::vector_tag<36> tag; + typedef vector36 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + + + typedef void_ item36; + typedef T35 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,36 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<35> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector36< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<36> > +{ + template< typename Vector > struct apply + { + typedef vector35< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<35> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector36< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<36> > +{ + template< typename Vector > struct apply + { + typedef vector35< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34 + > type; + }; +}; + +template< typename V > +struct v_at< V,36 > +{ + typedef typename V::item36 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36 + > +struct vector37 +{ + typedef aux::vector_tag<37> tag; + typedef vector37 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + typedef T36 item36; + + + typedef void_ item37; + typedef T36 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,37 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<36> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector37< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<37> > +{ + template< typename Vector > struct apply + { + typedef vector36< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35, typename Vector::item36 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<36> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector37< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<37> > +{ + template< typename Vector > struct apply + { + typedef vector36< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + > type; + }; +}; + +template< typename V > +struct v_at< V,37 > +{ + typedef typename V::item37 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37 + > +struct vector38 +{ + typedef aux::vector_tag<38> tag; + typedef vector38 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + typedef T36 item36; + typedef T37 item37; + + + typedef void_ item38; + typedef T37 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,38 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<37> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector38< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<38> > +{ + template< typename Vector > struct apply + { + typedef vector37< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35, typename Vector::item36 + , typename Vector::item37 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<37> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector38< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<38> > +{ + template< typename Vector > struct apply + { + typedef vector37< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36 + > type; + }; +}; + +template< typename V > +struct v_at< V,38 > +{ + typedef typename V::item38 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38 + > +struct vector39 +{ + typedef aux::vector_tag<39> tag; + typedef vector39 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + typedef T36 item36; + typedef T37 item37; + typedef T38 item38; + + + typedef void_ item39; + typedef T38 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,39 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<38> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector39< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<39> > +{ + template< typename Vector > struct apply + { + typedef vector38< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35, typename Vector::item36 + , typename Vector::item37, typename Vector::item38 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<38> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector39< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<39> > +{ + template< typename Vector > struct apply + { + typedef vector38< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + > type; + }; +}; + +template< typename V > +struct v_at< V,39 > +{ + typedef typename V::item39 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + > +struct vector40 +{ + typedef aux::vector_tag<40> tag; + typedef vector40 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + typedef T36 item36; + typedef T37 item37; + typedef T38 item38; + typedef T39 item39; + + + typedef void_ item40; + typedef T39 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,40 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<39> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector40< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<40> > +{ + template< typename Vector > struct apply + { + typedef vector39< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35, typename Vector::item36 + , typename Vector::item37, typename Vector::item38 + , typename Vector::item39 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<39> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector40< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<40> > +{ + template< typename Vector > struct apply + { + typedef vector39< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38 + > type; + }; +}; + +template< typename V > +struct v_at< V,40 > +{ + typedef typename V::item40 type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector40_c.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector40_c.hpp new file mode 100644 index 0000000000..ba0ffa88ee --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector40_c.hpp @@ -0,0 +1,281 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector40_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + > +struct vector31_c + : vector31< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + > +{ + typedef vector31_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31 + > +struct vector32_c + : vector32< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >, integral_c + > +{ + typedef vector32_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32 + > +struct vector33_c + : vector33< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 > + > +{ + typedef vector33_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33 + > +struct vector34_c + : vector34< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + > +{ + typedef vector34_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34 + > +struct vector35_c + : vector35< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >, integral_c + > +{ + typedef vector35_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35 + > +struct vector36_c + : vector36< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 > + > +{ + typedef vector36_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36 + > +struct vector37_c + : vector37< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + > +{ + typedef vector37_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37 + > +struct vector38_c + : vector38< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >, integral_c + > +{ + typedef vector38_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38 + > +struct vector39_c + : vector39< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 > + > +{ + typedef vector39_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39 + > +struct vector40_c + : vector40< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + > +{ + typedef vector40_c type; + typedef T value_type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector50.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector50.hpp new file mode 100644 index 0000000000..5a4c6d75df --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector50.hpp @@ -0,0 +1,2104 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector50.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40 + > +struct vector41 +{ + typedef aux::vector_tag<41> tag; + typedef vector41 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + typedef T36 item36; + typedef T37 item37; + typedef T38 item38; + typedef T39 item39; + typedef T40 item40; + + + typedef void_ item41; + typedef T40 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,41 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<40> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector41< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<41> > +{ + template< typename Vector > struct apply + { + typedef vector40< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35, typename Vector::item36 + , typename Vector::item37, typename Vector::item38 + , typename Vector::item39, typename Vector::item40 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<40> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector41< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<41> > +{ + template< typename Vector > struct apply + { + typedef vector40< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + > type; + }; +}; + +template< typename V > +struct v_at< V,41 > +{ + typedef typename V::item41 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41 + > +struct vector42 +{ + typedef aux::vector_tag<42> tag; + typedef vector42 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + typedef T36 item36; + typedef T37 item37; + typedef T38 item38; + typedef T39 item39; + typedef T40 item40; + typedef T41 item41; + + + typedef void_ item42; + typedef T41 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,42 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<41> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector42< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<42> > +{ + template< typename Vector > struct apply + { + typedef vector41< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35, typename Vector::item36 + , typename Vector::item37, typename Vector::item38 + , typename Vector::item39, typename Vector::item40 + , typename Vector::item41 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<41> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector42< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<42> > +{ + template< typename Vector > struct apply + { + typedef vector41< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40 + > type; + }; +}; + +template< typename V > +struct v_at< V,42 > +{ + typedef typename V::item42 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42 + > +struct vector43 +{ + typedef aux::vector_tag<43> tag; + typedef vector43 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + typedef T36 item36; + typedef T37 item37; + typedef T38 item38; + typedef T39 item39; + typedef T40 item40; + typedef T41 item41; + typedef T42 item42; + + + typedef void_ item43; + typedef T42 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,43 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<42> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector43< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<43> > +{ + template< typename Vector > struct apply + { + typedef vector42< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35, typename Vector::item36 + , typename Vector::item37, typename Vector::item38 + , typename Vector::item39, typename Vector::item40 + , typename Vector::item41, typename Vector::item42 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<42> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector43< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<43> > +{ + template< typename Vector > struct apply + { + typedef vector42< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + > type; + }; +}; + +template< typename V > +struct v_at< V,43 > +{ + typedef typename V::item43 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43 + > +struct vector44 +{ + typedef aux::vector_tag<44> tag; + typedef vector44 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + typedef T36 item36; + typedef T37 item37; + typedef T38 item38; + typedef T39 item39; + typedef T40 item40; + typedef T41 item41; + typedef T42 item42; + typedef T43 item43; + + + typedef void_ item44; + typedef T43 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,44 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<43> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector44< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<44> > +{ + template< typename Vector > struct apply + { + typedef vector43< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35, typename Vector::item36 + , typename Vector::item37, typename Vector::item38 + , typename Vector::item39, typename Vector::item40 + , typename Vector::item41, typename Vector::item42 + , typename Vector::item43 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<43> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector44< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<44> > +{ + template< typename Vector > struct apply + { + typedef vector43< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42 + > type; + }; +}; + +template< typename V > +struct v_at< V,44 > +{ + typedef typename V::item44 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + > +struct vector45 +{ + typedef aux::vector_tag<45> tag; + typedef vector45 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + typedef T36 item36; + typedef T37 item37; + typedef T38 item38; + typedef T39 item39; + typedef T40 item40; + typedef T41 item41; + typedef T42 item42; + typedef T43 item43; + typedef T44 item44; + + + typedef void_ item45; + typedef T44 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,45 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<44> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector45< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<45> > +{ + template< typename Vector > struct apply + { + typedef vector44< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35, typename Vector::item36 + , typename Vector::item37, typename Vector::item38 + , typename Vector::item39, typename Vector::item40 + , typename Vector::item41, typename Vector::item42 + , typename Vector::item43, typename Vector::item44 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<44> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector45< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<45> > +{ + template< typename Vector > struct apply + { + typedef vector44< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + > type; + }; +}; + +template< typename V > +struct v_at< V,45 > +{ + typedef typename V::item45 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + , typename T45 + > +struct vector46 +{ + typedef aux::vector_tag<46> tag; + typedef vector46 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + typedef T36 item36; + typedef T37 item37; + typedef T38 item38; + typedef T39 item39; + typedef T40 item40; + typedef T41 item41; + typedef T42 item42; + typedef T43 item43; + typedef T44 item44; + typedef T45 item45; + + + typedef void_ item46; + typedef T45 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,46 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<45> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector46< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<46> > +{ + template< typename Vector > struct apply + { + typedef vector45< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35, typename Vector::item36 + , typename Vector::item37, typename Vector::item38 + , typename Vector::item39, typename Vector::item40 + , typename Vector::item41, typename Vector::item42 + , typename Vector::item43, typename Vector::item44 + , typename Vector::item45 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<45> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector46< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<46> > +{ + template< typename Vector > struct apply + { + typedef vector45< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44 + > type; + }; +}; + +template< typename V > +struct v_at< V,46 > +{ + typedef typename V::item46 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + , typename T45, typename T46 + > +struct vector47 +{ + typedef aux::vector_tag<47> tag; + typedef vector47 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + typedef T36 item36; + typedef T37 item37; + typedef T38 item38; + typedef T39 item39; + typedef T40 item40; + typedef T41 item41; + typedef T42 item42; + typedef T43 item43; + typedef T44 item44; + typedef T45 item45; + typedef T46 item46; + + + typedef void_ item47; + typedef T46 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,47 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<46> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector47< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<47> > +{ + template< typename Vector > struct apply + { + typedef vector46< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35, typename Vector::item36 + , typename Vector::item37, typename Vector::item38 + , typename Vector::item39, typename Vector::item40 + , typename Vector::item41, typename Vector::item42 + , typename Vector::item43, typename Vector::item44 + , typename Vector::item45, typename Vector::item46 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<46> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector47< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<47> > +{ + template< typename Vector > struct apply + { + typedef vector46< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + > type; + }; +}; + +template< typename V > +struct v_at< V,47 > +{ + typedef typename V::item47 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + , typename T45, typename T46, typename T47 + > +struct vector48 +{ + typedef aux::vector_tag<48> tag; + typedef vector48 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + typedef T36 item36; + typedef T37 item37; + typedef T38 item38; + typedef T39 item39; + typedef T40 item40; + typedef T41 item41; + typedef T42 item42; + typedef T43 item43; + typedef T44 item44; + typedef T45 item45; + typedef T46 item46; + typedef T47 item47; + + + typedef void_ item48; + typedef T47 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,48 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<47> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector48< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<48> > +{ + template< typename Vector > struct apply + { + typedef vector47< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35, typename Vector::item36 + , typename Vector::item37, typename Vector::item38 + , typename Vector::item39, typename Vector::item40 + , typename Vector::item41, typename Vector::item42 + , typename Vector::item43, typename Vector::item44 + , typename Vector::item45, typename Vector::item46 + , typename Vector::item47 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<47> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector48< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<48> > +{ + template< typename Vector > struct apply + { + typedef vector47< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46 + > type; + }; +}; + +template< typename V > +struct v_at< V,48 > +{ + typedef typename V::item48 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + , typename T45, typename T46, typename T47, typename T48 + > +struct vector49 +{ + typedef aux::vector_tag<49> tag; + typedef vector49 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + typedef T36 item36; + typedef T37 item37; + typedef T38 item38; + typedef T39 item39; + typedef T40 item40; + typedef T41 item41; + typedef T42 item42; + typedef T43 item43; + typedef T44 item44; + typedef T45 item45; + typedef T46 item46; + typedef T47 item47; + typedef T48 item48; + + + typedef void_ item49; + typedef T48 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,49 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<48> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector49< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46, typename Vector::item47 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<49> > +{ + template< typename Vector > struct apply + { + typedef vector48< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35, typename Vector::item36 + , typename Vector::item37, typename Vector::item38 + , typename Vector::item39, typename Vector::item40 + , typename Vector::item41, typename Vector::item42 + , typename Vector::item43, typename Vector::item44 + , typename Vector::item45, typename Vector::item46 + , typename Vector::item47, typename Vector::item48 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<48> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector49< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46, typename Vector::item47 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<49> > +{ + template< typename Vector > struct apply + { + typedef vector48< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46, typename Vector::item47 + > type; + }; +}; + +template< typename V > +struct v_at< V,49 > +{ + typedef typename V::item49 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + , typename T45, typename T46, typename T47, typename T48, typename T49 + > +struct vector50 +{ + typedef aux::vector_tag<50> tag; + typedef vector50 type; + typedef T0 item0; + typedef T1 item1; + typedef T2 item2; + typedef T3 item3; + typedef T4 item4; + typedef T5 item5; + typedef T6 item6; + typedef T7 item7; + typedef T8 item8; + typedef T9 item9; + typedef T10 item10; + typedef T11 item11; + typedef T12 item12; + typedef T13 item13; + typedef T14 item14; + typedef T15 item15; + typedef T16 item16; + typedef T17 item17; + typedef T18 item18; + typedef T19 item19; + typedef T20 item20; + typedef T21 item21; + typedef T22 item22; + typedef T23 item23; + typedef T24 item24; + typedef T25 item25; + typedef T26 item26; + typedef T27 item27; + typedef T28 item28; + typedef T29 item29; + typedef T30 item30; + typedef T31 item31; + typedef T32 item32; + typedef T33 item33; + typedef T34 item34; + typedef T35 item35; + typedef T36 item36; + typedef T37 item37; + typedef T38 item38; + typedef T39 item39; + typedef T40 item40; + typedef T41 item41; + typedef T42 item42; + typedef T43 item43; + typedef T44 item44; + typedef T45 item45; + typedef T46 item46; + typedef T47 item47; + typedef T48 item48; + typedef T49 item49; + + + typedef void_ item50; + typedef T49 back; + typedef v_iter< type,0 > begin; + typedef v_iter< type,50 > end; +}; + +template<> +struct push_front_impl< aux::vector_tag<49> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector50< + T + , + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46, typename Vector::item47 + , typename Vector::item48 + > type; + }; +}; + +template<> +struct pop_front_impl< aux::vector_tag<50> > +{ + template< typename Vector > struct apply + { + typedef vector49< + typename Vector::item1, typename Vector::item2 + , typename Vector::item3, typename Vector::item4 + , typename Vector::item5, typename Vector::item6 + , typename Vector::item7, typename Vector::item8 + , typename Vector::item9, typename Vector::item10 + , typename Vector::item11, typename Vector::item12 + , typename Vector::item13, typename Vector::item14 + , typename Vector::item15, typename Vector::item16 + , typename Vector::item17, typename Vector::item18 + , typename Vector::item19, typename Vector::item20 + , typename Vector::item21, typename Vector::item22 + , typename Vector::item23, typename Vector::item24 + , typename Vector::item25, typename Vector::item26 + , typename Vector::item27, typename Vector::item28 + , typename Vector::item29, typename Vector::item30 + , typename Vector::item31, typename Vector::item32 + , typename Vector::item33, typename Vector::item34 + , typename Vector::item35, typename Vector::item36 + , typename Vector::item37, typename Vector::item38 + , typename Vector::item39, typename Vector::item40 + , typename Vector::item41, typename Vector::item42 + , typename Vector::item43, typename Vector::item44 + , typename Vector::item45, typename Vector::item46 + , typename Vector::item47, typename Vector::item48 + , typename Vector::item49 + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<49> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector50< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46, typename Vector::item47 + , typename Vector::item48 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<50> > +{ + template< typename Vector > struct apply + { + typedef vector49< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46, typename Vector::item47 + , typename Vector::item48 + > type; + }; +}; + +template< typename V > +struct v_at< V,50 > +{ + typedef typename V::item50 type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector50_c.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector50_c.hpp new file mode 100644 index 0000000000..e07f2b3ad5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/plain/vector50_c.hpp @@ -0,0 +1,325 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector50_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + > +struct vector41_c + : vector41< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 >, integral_c + > +{ + typedef vector41_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41 + > +struct vector42_c + : vector42< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 > + > +{ + typedef vector42_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42 + > +struct vector43_c + : vector43< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > + > +{ + typedef vector43_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42, T C43 + > +struct vector44_c + : vector44< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 >, integral_c + > +{ + typedef vector44_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42, T C43, T C44 + > +struct vector45_c + : vector45< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > + , integral_c< T,C43 >, integral_c< T,C44 > + > +{ + typedef vector45_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42, T C43, T C44, T C45 + > +struct vector46_c + : vector46< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > + , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 > + > +{ + typedef vector46_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42, T C43, T C44, T C45, T C46 + > +struct vector47_c + : vector47< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > + , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 >, integral_c + > +{ + typedef vector47_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42, T C43, T C44, T C45, T C46, T C47 + > +struct vector48_c + : vector48< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > + , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 > + , integral_c< T,C46 >, integral_c< T,C47 > + > +{ + typedef vector48_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48 + > +struct vector49_c + : vector49< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > + , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 > + , integral_c< T,C46 >, integral_c< T,C47 >, integral_c< T,C48 > + > +{ + typedef vector49_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48, T C49 + > +struct vector50_c + : vector50< + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > + , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 > + , integral_c< T,C46 >, integral_c< T,C47 >, integral_c< T,C48 >, integral_c + > +{ + typedef vector50_c type; + typedef T value_type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp new file mode 100644 index 0000000000..e4c640709a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp @@ -0,0 +1,139 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector10.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 + > +struct vector1 + : v_item< + T0 + , vector0< > + > +{ + typedef vector1 type; +}; + +template< + typename T0, typename T1 + > +struct vector2 + : v_item< + T1 + , vector1 + > +{ + typedef vector2 type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct vector3 + : v_item< + T2 + , vector2< T0,T1 > + > +{ + typedef vector3 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct vector4 + : v_item< + T3 + , vector3< T0,T1,T2 > + > +{ + typedef vector4 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct vector5 + : v_item< + T4 + , vector4< T0,T1,T2,T3 > + > +{ + typedef vector5 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct vector6 + : v_item< + T5 + , vector5< T0,T1,T2,T3,T4 > + > +{ + typedef vector6 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct vector7 + : v_item< + T6 + , vector6< T0,T1,T2,T3,T4,T5 > + > +{ + typedef vector7 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct vector8 + : v_item< + T7 + , vector7< T0,T1,T2,T3,T4,T5,T6 > + > +{ + typedef vector8 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct vector9 + : v_item< + T8 + , vector8< T0,T1,T2,T3,T4,T5,T6,T7 > + > +{ + typedef vector9 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct vector10 + : v_item< + T9 + , vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > + > +{ + typedef vector10 type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10_c.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10_c.hpp new file mode 100644 index 0000000000..18eabc64da --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10_c.hpp @@ -0,0 +1,154 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector10_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T + , T C0 + > +struct vector1_c + : v_item< + integral_c< T,C0 > + , vector0_c + > +{ + typedef vector1_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1 + > +struct vector2_c + : v_item< + integral_c< T,C1 > + , vector1_c< T,C0 > + > +{ + typedef vector2_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2 + > +struct vector3_c + : v_item< + integral_c< T,C2 > + , vector2_c< T,C0,C1 > + > +{ + typedef vector3_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3 + > +struct vector4_c + : v_item< + integral_c< T,C3 > + , vector3_c< T,C0,C1,C2 > + > +{ + typedef vector4_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4 + > +struct vector5_c + : v_item< + integral_c< T,C4 > + , vector4_c< T,C0,C1,C2,C3 > + > +{ + typedef vector5_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5 + > +struct vector6_c + : v_item< + integral_c< T,C5 > + , vector5_c< T,C0,C1,C2,C3,C4 > + > +{ + typedef vector6_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6 + > +struct vector7_c + : v_item< + integral_c< T,C6 > + , vector6_c< T,C0,C1,C2,C3,C4,C5 > + > +{ + typedef vector7_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7 + > +struct vector8_c + : v_item< + integral_c< T,C7 > + , vector7_c< T,C0,C1,C2,C3,C4,C5,C6 > + > +{ + typedef vector8_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8 + > +struct vector9_c + : v_item< + integral_c< T,C8 > + , vector8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > + > +{ + typedef vector9_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9 + > +struct vector10_c + : v_item< + integral_c< T,C9 > + , vector9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > + > +{ + typedef vector10_c type; + typedef T value_type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp new file mode 100644 index 0000000000..78ccac4e91 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp @@ -0,0 +1,159 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector20.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector11 + : v_item< + T10 + , vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > + > +{ + typedef vector11 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector12 + : v_item< + T11 + , vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > + > +{ + typedef vector12 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector13 + : v_item< + T12 + , vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > + > +{ + typedef vector13 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector14 + : v_item< + T13 + , vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > + > +{ + typedef vector14 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector15 + : v_item< + T14 + , vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > + > +{ + typedef vector15 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector16 + : v_item< + T15 + , vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 > + > +{ + typedef vector16 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector17 + : v_item< + T16 + , vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 > + > +{ + typedef vector17 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector18 + : v_item< + T17 + , vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 > + > +{ + typedef vector18 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector19 + : v_item< + T18 + , vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 > + > +{ + typedef vector19 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector20 + : v_item< + T19 + , vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 > + > +{ + typedef vector20 type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20_c.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20_c.hpp new file mode 100644 index 0000000000..4bf6742306 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20_c.hpp @@ -0,0 +1,163 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector20_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + > +struct vector11_c + : v_item< + integral_c< T,C10 > + , vector10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > + > +{ + typedef vector11_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11 + > +struct vector12_c + : v_item< + integral_c< T,C11 > + , vector11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > + > +{ + typedef vector12_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12 + > +struct vector13_c + : v_item< + integral_c< T,C12 > + , vector12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > + > +{ + typedef vector13_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13 + > +struct vector14_c + : v_item< + integral_c< T,C13 > + , vector13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > + > +{ + typedef vector14_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14 + > +struct vector15_c + : v_item< + integral_c< T,C14 > + , vector14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 > + > +{ + typedef vector15_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15 + > +struct vector16_c + : v_item< + integral_c< T,C15 > + , vector15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 > + > +{ + typedef vector16_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16 + > +struct vector17_c + : v_item< + integral_c< T,C16 > + , vector16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 > + > +{ + typedef vector17_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17 + > +struct vector18_c + : v_item< + integral_c< T,C17 > + , vector17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 > + > +{ + typedef vector18_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18 + > +struct vector19_c + : v_item< + integral_c< T,C18 > + , vector18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 > + > +{ + typedef vector19_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19 + > +struct vector20_c + : v_item< + integral_c< T,C19 > + , vector19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 > + > +{ + typedef vector20_c type; + typedef T value_type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30.hpp new file mode 100644 index 0000000000..c4049906f3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30.hpp @@ -0,0 +1,179 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector30.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20 + > +struct vector21 + : v_item< + T20 + , vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 > + > +{ + typedef vector21 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21 + > +struct vector22 + : v_item< + T21 + , vector21< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20 > + > +{ + typedef vector22 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22 + > +struct vector23 + : v_item< + T22 + , vector22< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21 > + > +{ + typedef vector23 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23 + > +struct vector24 + : v_item< + T23 + , vector23< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22 > + > +{ + typedef vector24 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + > +struct vector25 + : v_item< + T24 + , vector24< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23 > + > +{ + typedef vector25 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25 + > +struct vector26 + : v_item< + T25 + , vector25< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24 > + > +{ + typedef vector26 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26 + > +struct vector27 + : v_item< + T26 + , vector26< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25 > + > +{ + typedef vector27 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27 + > +struct vector28 + : v_item< + T27 + , vector27< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26 > + > +{ + typedef vector28 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28 + > +struct vector29 + : v_item< + T28 + , vector28< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27 > + > +{ + typedef vector29 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + > +struct vector30 + : v_item< + T29 + , vector29< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28 > + > +{ + typedef vector30 type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30_c.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30_c.hpp new file mode 100644 index 0000000000..5741bb4b65 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30_c.hpp @@ -0,0 +1,173 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector30_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + > +struct vector21_c + : v_item< + integral_c< T,C20 > + , vector20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 > + > +{ + typedef vector21_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21 + > +struct vector22_c + : v_item< + integral_c< T,C21 > + , vector21_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20 > + > +{ + typedef vector22_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22 + > +struct vector23_c + : v_item< + integral_c< T,C22 > + , vector22_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21 > + > +{ + typedef vector23_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23 + > +struct vector24_c + : v_item< + integral_c< T,C23 > + , vector23_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22 > + > +{ + typedef vector24_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24 + > +struct vector25_c + : v_item< + integral_c< T,C24 > + , vector24_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23 > + > +{ + typedef vector25_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25 + > +struct vector26_c + : v_item< + integral_c< T,C25 > + , vector25_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24 > + > +{ + typedef vector26_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26 + > +struct vector27_c + : v_item< + integral_c< T,C26 > + , vector26_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25 > + > +{ + typedef vector27_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27 + > +struct vector28_c + : v_item< + integral_c< T,C27 > + , vector27_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26 > + > +{ + typedef vector28_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28 + > +struct vector29_c + : v_item< + integral_c< T,C28 > + , vector28_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27 > + > +{ + typedef vector29_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29 + > +struct vector30_c + : v_item< + integral_c< T,C29 > + , vector29_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28 > + > +{ + typedef vector30_c type; + typedef T value_type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40.hpp new file mode 100644 index 0000000000..debcf7027d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40.hpp @@ -0,0 +1,199 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector40.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30 + > +struct vector31 + : v_item< + T30 + , vector30< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29 > + > +{ + typedef vector31 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31 + > +struct vector32 + : v_item< + T31 + , vector31< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30 > + > +{ + typedef vector32 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32 + > +struct vector33 + : v_item< + T32 + , vector32< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31 > + > +{ + typedef vector33 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33 + > +struct vector34 + : v_item< + T33 + , vector33< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32 > + > +{ + typedef vector34 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + > +struct vector35 + : v_item< + T34 + , vector34< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33 > + > +{ + typedef vector35 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35 + > +struct vector36 + : v_item< + T35 + , vector35< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34 > + > +{ + typedef vector36 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36 + > +struct vector37 + : v_item< + T36 + , vector36< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35 > + > +{ + typedef vector37 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37 + > +struct vector38 + : v_item< + T37 + , vector37< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36 > + > +{ + typedef vector38 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38 + > +struct vector39 + : v_item< + T38 + , vector38< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37 > + > +{ + typedef vector39 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + > +struct vector40 + : v_item< + T39 + , vector39< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38 > + > +{ + typedef vector40 type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40_c.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40_c.hpp new file mode 100644 index 0000000000..88d742e0a5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40_c.hpp @@ -0,0 +1,183 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector40_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + > +struct vector31_c + : v_item< + integral_c< T,C30 > + , vector30_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29 > + > +{ + typedef vector31_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31 + > +struct vector32_c + : v_item< + integral_c< T,C31 > + , vector31_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30 > + > +{ + typedef vector32_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32 + > +struct vector33_c + : v_item< + integral_c< T,C32 > + , vector32_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31 > + > +{ + typedef vector33_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33 + > +struct vector34_c + : v_item< + integral_c< T,C33 > + , vector33_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32 > + > +{ + typedef vector34_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34 + > +struct vector35_c + : v_item< + integral_c< T,C34 > + , vector34_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33 > + > +{ + typedef vector35_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35 + > +struct vector36_c + : v_item< + integral_c< T,C35 > + , vector35_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34 > + > +{ + typedef vector36_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36 + > +struct vector37_c + : v_item< + integral_c< T,C36 > + , vector36_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35 > + > +{ + typedef vector37_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37 + > +struct vector38_c + : v_item< + integral_c< T,C37 > + , vector37_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36 > + > +{ + typedef vector38_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38 + > +struct vector39_c + : v_item< + integral_c< T,C38 > + , vector38_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37 > + > +{ + typedef vector39_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39 + > +struct vector40_c + : v_item< + integral_c< T,C39 > + , vector39_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38 > + > +{ + typedef vector40_c type; + typedef T value_type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50.hpp new file mode 100644 index 0000000000..8db06df454 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50.hpp @@ -0,0 +1,219 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector50.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40 + > +struct vector41 + : v_item< + T40 + , vector40< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39 > + > +{ + typedef vector41 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41 + > +struct vector42 + : v_item< + T41 + , vector41< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40 > + > +{ + typedef vector42 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42 + > +struct vector43 + : v_item< + T42 + , vector42< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41 > + > +{ + typedef vector43 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43 + > +struct vector44 + : v_item< + T43 + , vector43< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42 > + > +{ + typedef vector44 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + > +struct vector45 + : v_item< + T44 + , vector44< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43 > + > +{ + typedef vector45 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + , typename T45 + > +struct vector46 + : v_item< + T45 + , vector45< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44 > + > +{ + typedef vector46 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + , typename T45, typename T46 + > +struct vector47 + : v_item< + T46 + , vector46< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45 > + > +{ + typedef vector47 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + , typename T45, typename T46, typename T47 + > +struct vector48 + : v_item< + T47 + , vector47< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46 > + > +{ + typedef vector48 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + , typename T45, typename T46, typename T47, typename T48 + > +struct vector49 + : v_item< + T48 + , vector48< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47 > + > +{ + typedef vector49 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + , typename T45, typename T46, typename T47, typename T48, typename T49 + > +struct vector50 + : v_item< + T49 + , vector49< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48 > + > +{ + typedef vector50 type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50_c.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50_c.hpp new file mode 100644 index 0000000000..f56d6aff06 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50_c.hpp @@ -0,0 +1,193 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/vector/vector50_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + > +struct vector41_c + : v_item< + integral_c< T,C40 > + , vector40_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39 > + > +{ + typedef vector41_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41 + > +struct vector42_c + : v_item< + integral_c< T,C41 > + , vector41_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40 > + > +{ + typedef vector42_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42 + > +struct vector43_c + : v_item< + integral_c< T,C42 > + , vector42_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41 > + > +{ + typedef vector43_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42, T C43 + > +struct vector44_c + : v_item< + integral_c< T,C43 > + , vector43_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42 > + > +{ + typedef vector44_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42, T C43, T C44 + > +struct vector45_c + : v_item< + integral_c< T,C44 > + , vector44_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43 > + > +{ + typedef vector45_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42, T C43, T C44, T C45 + > +struct vector46_c + : v_item< + integral_c< T,C45 > + , vector45_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44 > + > +{ + typedef vector46_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42, T C43, T C44, T C45, T C46 + > +struct vector47_c + : v_item< + integral_c< T,C46 > + , vector46_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45 > + > +{ + typedef vector47_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42, T C43, T C44, T C45, T C46, T C47 + > +struct vector48_c + : v_item< + integral_c< T,C47 > + , vector47_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46 > + > +{ + typedef vector48_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48 + > +struct vector49_c + : v_item< + integral_c< T,C48 > + , vector48_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47 > + > +{ + typedef vector49_c type; + typedef T value_type; +}; + +template< + typename T + , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 + , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 + , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 + , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 + , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48, T C49 + > +struct vector50_c + : v_item< + integral_c< T,C49 > + , vector49_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47,C48 > + > +{ + typedef vector50_c type; + typedef T value_type; +}; + +}} diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/push_back.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/push_back.hpp new file mode 100644 index 0000000000..527828c9ba --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/push_back.hpp @@ -0,0 +1,40 @@ + +#ifndef BOOST_MPL_VECTOR_AUX_PUSH_BACK_HPP_INCLUDED +#define BOOST_MPL_VECTOR_AUX_PUSH_BACK_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +# include +# include + +namespace boost { namespace mpl { + +template<> +struct push_back_impl< aux::vector_tag > +{ + template< typename Vector, typename T > struct apply + { + typedef v_item type; + }; +}; + +}} + +#endif + +#endif // BOOST_MPL_VECTOR_AUX_PUSH_BACK_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/push_front.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/push_front.hpp new file mode 100644 index 0000000000..f315de58b7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/push_front.hpp @@ -0,0 +1,40 @@ + +#ifndef BOOST_MPL_VECTOR_AUX_PUSH_FRONT_HPP_INCLUDED +#define BOOST_MPL_VECTOR_AUX_PUSH_FRONT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +# include +# include + +namespace boost { namespace mpl { + +template<> +struct push_front_impl< aux::vector_tag > +{ + template< typename Vector, typename T > struct apply + { + typedef v_item type; + }; +}; + +}} + +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES + +#endif // BOOST_MPL_VECTOR_AUX_PUSH_FRONT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/size.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/size.hpp new file mode 100644 index 0000000000..c131e8866d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/size.hpp @@ -0,0 +1,49 @@ + +#ifndef BOOST_MPL_VECTOR_AUX_SIZE_HPP_INCLUDED +#define BOOST_MPL_VECTOR_AUX_SIZE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +template<> +struct size_impl< aux::vector_tag > + : O1_size_impl< aux::vector_tag > +{ +}; + +#else + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< long N > +struct size_impl< aux::vector_tag > + : O1_size_impl< aux::vector_tag > +{ +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES + +}} + +#endif // BOOST_MPL_VECTOR_AUX_SIZE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/tag.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/tag.hpp new file mode 100644 index 0000000000..90d16e38c0 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/tag.hpp @@ -0,0 +1,32 @@ + +#ifndef BOOST_MPL_VECTOR_AUX_TAG_HPP_INCLUDED +#define BOOST_MPL_VECTOR_AUX_TAG_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +namespace boost { namespace mpl { namespace aux { + +struct v_iter_tag; + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) +struct vector_tag; +#else +template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct vector_tag; +#endif + +}}} + +#endif // BOOST_MPL_VECTOR_AUX_TAG_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/aux_/vector0.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/vector0.hpp new file mode 100644 index 0000000000..402667360d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/aux_/vector0.hpp @@ -0,0 +1,52 @@ + +#ifndef BOOST_MPL_VECTOR_AUX_VECTOR0_HPP_INCLUDED +#define BOOST_MPL_VECTOR_AUX_VECTOR0_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include + +#include +#include +#include + +namespace boost { namespace mpl { + +template< typename Dummy = na > struct vector0; + +template<> struct vector0 +{ +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + typedef aux::vector_tag tag; + typedef vector0 type; + typedef long_<32768> lower_bound_; + typedef lower_bound_ upper_bound_; + typedef long_<0> size; + + static aux::type_wrapper item_(...); +#else + typedef aux::vector_tag<0> tag; + typedef vector0 type; + typedef void_ item0; + + typedef v_iter,0> begin; + typedef v_iter,0> end; +#endif +}; + +}} + +#endif // BOOST_MPL_VECTOR_AUX_VECTOR0_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/vector0.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/vector0.hpp new file mode 100644 index 0000000000..39759ddc24 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/vector0.hpp @@ -0,0 +1,34 @@ + +#ifndef BOOST_MPL_VECTOR_VECTOR0_HPP_INCLUDED +#define BOOST_MPL_VECTOR_VECTOR0_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // BOOST_MPL_VECTOR_VECTOR0_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/vector0_c.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/vector0_c.hpp new file mode 100644 index 0000000000..0e60215ddd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/vector0_c.hpp @@ -0,0 +1,31 @@ + +#ifndef BOOST_MPL_VECTOR_VECTOR0_C_HPP_INCLUDED +#define BOOST_MPL_VECTOR_VECTOR0_C_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include + +namespace boost { namespace mpl { + +template< typename T > struct vector0_c + : vector0<> +{ + typedef vector0_c type; + typedef T value_type; +}; + +}} + +#endif // BOOST_MPL_VECTOR_VECTOR0_C_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/vector10.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/vector10.hpp new file mode 100644 index 0000000000..53a2a163ae --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/vector10.hpp @@ -0,0 +1,45 @@ + +#ifndef BOOST_MPL_VECTOR_VECTOR10_HPP_INCLUDED +#define BOOST_MPL_VECTOR_VECTOR10_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER vector10.hpp +# include + +#else + +# include +# include +# include + +namespace boost { namespace mpl { + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, 10, )) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_VECTOR_VECTOR10_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/vector10_c.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/vector10_c.hpp new file mode 100644 index 0000000000..be52d2f7f3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/vector10_c.hpp @@ -0,0 +1,46 @@ + +#ifndef BOOST_MPL_VECTOR_VECTOR10_C_HPP_INCLUDED +#define BOOST_MPL_VECTOR_VECTOR10_C_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER vector10_c.hpp +# include + +#else + +# include +# include +# include + +namespace boost { namespace mpl { + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(1, 10, )) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_VECTOR_VECTOR10_C_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/vector20.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/vector20.hpp new file mode 100644 index 0000000000..96d1b9f45c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/vector20.hpp @@ -0,0 +1,45 @@ + +#ifndef BOOST_MPL_VECTOR_VECTOR20_HPP_INCLUDED +#define BOOST_MPL_VECTOR_VECTOR20_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER vector20.hpp +# include + +#else + +# include +# include +# include + +namespace boost { namespace mpl { + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(11, 20, )) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_VECTOR_VECTOR20_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/vector20_c.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/vector20_c.hpp new file mode 100644 index 0000000000..3913f26026 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/vector20_c.hpp @@ -0,0 +1,46 @@ + +#ifndef BOOST_MPL_VECTOR_VECTOR20_C_HPP_INCLUDED +#define BOOST_MPL_VECTOR_VECTOR20_C_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER vector20_c.hpp +# include + +#else + +# include +# include +# include + +namespace boost { namespace mpl { + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(11, 20, )) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_VECTOR_VECTOR20_C_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/vector30.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/vector30.hpp new file mode 100644 index 0000000000..b2f0a5eb05 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/vector30.hpp @@ -0,0 +1,45 @@ + +#ifndef BOOST_MPL_VECTOR_VECTOR30_HPP_INCLUDED +#define BOOST_MPL_VECTOR_VECTOR30_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER vector30.hpp +# include + +#else + +# include +# include +# include + +namespace boost { namespace mpl { + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(21, 30, )) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_VECTOR_VECTOR30_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/vector30_c.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/vector30_c.hpp new file mode 100644 index 0000000000..94cdab465a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/vector30_c.hpp @@ -0,0 +1,47 @@ + +#ifndef BOOST_MPL_VECTOR_VECTOR30_C_HPP_INCLUDED +#define BOOST_MPL_VECTOR_VECTOR30_C_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER vector30_c.hpp +# include + +#else + +# include +# include +# include +# include + +namespace boost { namespace mpl { + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(21, 30, )) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_USE_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_VECTOR_VECTOR30_C_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/vector40.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/vector40.hpp new file mode 100644 index 0000000000..2d2ef8195c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/vector40.hpp @@ -0,0 +1,45 @@ + +#ifndef BOOST_MPL_VECTOR_VECTOR40_HPP_INCLUDED +#define BOOST_MPL_VECTOR_VECTOR40_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER vector40.hpp +# include + +#else + +# include +# include +# include + +namespace boost { namespace mpl { + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(31, 40, )) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_VECTOR_VECTOR40_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/vector40_c.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/vector40_c.hpp new file mode 100644 index 0000000000..25e2ebf3d2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/vector40_c.hpp @@ -0,0 +1,46 @@ + +#ifndef BOOST_MPL_VECTOR_VECTOR40_C_HPP_INCLUDED +#define BOOST_MPL_VECTOR_VECTOR40_C_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER vector40_c.hpp +# include + +#else + +# include +# include +# include + +namespace boost { namespace mpl { + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(31, 40, )) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_VECTOR_VECTOR40_C_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/vector50.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/vector50.hpp new file mode 100644 index 0000000000..dc2d5c20a4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/vector50.hpp @@ -0,0 +1,45 @@ + +#ifndef BOOST_MPL_VECTOR_VECTOR50_HPP_INCLUDED +#define BOOST_MPL_VECTOR_VECTOR50_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER vector50.hpp +# include + +#else + +# include +# include +# include + +namespace boost { namespace mpl { + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(41, 50, )) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_VECTOR_VECTOR50_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/vector/vector50_c.hpp b/ThirdParty/boost-Subset/boost/mpl/vector/vector50_c.hpp new file mode 100644 index 0000000000..7388bf404b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/vector/vector50_c.hpp @@ -0,0 +1,46 @@ + +#ifndef BOOST_MPL_VECTOR_VECTOR50_C_HPP_INCLUDED +#define BOOST_MPL_VECTOR_VECTOR50_C_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER vector50_c.hpp +# include + +#else + +# include +# include +# include + +namespace boost { namespace mpl { + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(41, 50, )) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_VECTOR_VECTOR50_C_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/void.hpp b/ThirdParty/boost-Subset/boost/mpl/void.hpp new file mode 100644 index 0000000000..3dcbdd1d0e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/void.hpp @@ -0,0 +1,76 @@ + +#ifndef BOOST_MPL_VOID_HPP_INCLUDED +#define BOOST_MPL_VOID_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +// [JDG Feb-4-2003] made void_ a complete type to allow it to be +// instantiated so that it can be passed in as an object that can be +// used to select an overloaded function. Possible use includes signaling +// a zero arity functor evaluation call. +struct void_ { typedef void_ type; }; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +namespace boost { namespace mpl { + +template< typename T > +struct is_void_ + : false_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + using false_::value; +#endif +}; + +template<> +struct is_void_ + : true_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + using true_::value; +#endif +}; + +template< typename T > +struct is_not_void_ + : true_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + using true_::value; +#endif +}; + +template<> +struct is_not_void_ + : false_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + using false_::value; +#endif +}; + +BOOST_MPL_AUX_NA_SPEC(1, is_void_) +BOOST_MPL_AUX_NA_SPEC(1, is_not_void_) + +}} + +#endif // BOOST_MPL_VOID_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/mpl/void_fwd.hpp b/ThirdParty/boost-Subset/boost/mpl/void_fwd.hpp new file mode 100644 index 0000000000..86078b5c9e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/mpl/void_fwd.hpp @@ -0,0 +1,26 @@ + +#ifndef BOOST_MPL_VOID_FWD_HPP_INCLUDED +#define BOOST_MPL_VOID_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +struct void_; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(void_) + +#endif // BOOST_MPL_VOID_FWD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/next_prior.hpp b/ThirdParty/boost-Subset/boost/next_prior.hpp new file mode 100644 index 0000000000..7854ec436a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/next_prior.hpp @@ -0,0 +1,165 @@ +// Boost next_prior.hpp header file ---------------------------------------// + +// (C) Copyright Dave Abrahams and Daniel Walker 1999-2003. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/utility for documentation. + +// Revision History +// 13 Dec 2003 Added next(x, n) and prior(x, n) (Daniel Walker) + +#ifndef BOOST_NEXT_PRIOR_HPP_INCLUDED +#define BOOST_NEXT_PRIOR_HPP_INCLUDED + +#include +#if defined(_MSC_VER) && _MSC_VER <= 1310 +#include +#include +#endif +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + +// Helper functions for classes like bidirectional iterators not supporting +// operator+ and operator- +// +// Usage: +// const std::list::iterator p = get_some_iterator(); +// const std::list::iterator prev = boost::prior(p); +// const std::list::iterator next = boost::next(prev, 2); + +// Contributed by Dave Abrahams + +namespace next_prior_detail { + +template< typename T, typename Distance, bool HasPlus = has_plus< T, Distance >::value > +struct next_impl2 +{ + static T call(T x, Distance n) + { + std::advance(x, n); + return x; + } +}; + +template< typename T, typename Distance > +struct next_impl2< T, Distance, true > +{ + static T call(T x, Distance n) + { + return x + n; + } +}; + + +template< typename T, typename Distance, bool HasPlusAssign = has_plus_assign< T, Distance >::value > +struct next_impl1 : + public next_impl2< T, Distance > +{ +}; + +template< typename T, typename Distance > +struct next_impl1< T, Distance, true > +{ + static T call(T x, Distance n) + { + x += n; + return x; + } +}; + + +template< + typename T, + typename Distance, + typename PromotedDistance = typename integral_promotion< Distance >::type, +#if !defined(_MSC_VER) || _MSC_VER > 1310 + bool IsUInt = is_unsigned< PromotedDistance >::value +#else + // MSVC 7.1 has problems with applying is_unsigned to non-integral types + bool IsUInt = mpl::and_< is_integral< PromotedDistance >, is_unsigned< PromotedDistance > >::value +#endif +> +struct prior_impl3 +{ + static T call(T x, Distance n) + { + std::advance(x, -n); + return x; + } +}; + +template< typename T, typename Distance, typename PromotedDistance > +struct prior_impl3< T, Distance, PromotedDistance, true > +{ + static T call(T x, Distance n) + { + typedef typename make_signed< PromotedDistance >::type signed_distance; + std::advance(x, -static_cast< signed_distance >(static_cast< PromotedDistance >(n))); + return x; + } +}; + + +template< typename T, typename Distance, bool HasMinus = has_minus< T, Distance >::value > +struct prior_impl2 : + public prior_impl3< T, Distance > +{ +}; + +template< typename T, typename Distance > +struct prior_impl2< T, Distance, true > +{ + static T call(T x, Distance n) + { + return x - n; + } +}; + + +template< typename T, typename Distance, bool HasMinusAssign = has_minus_assign< T, Distance >::value > +struct prior_impl1 : + public prior_impl2< T, Distance > +{ +}; + +template< typename T, typename Distance > +struct prior_impl1< T, Distance, true > +{ + static T call(T x, Distance n) + { + x -= n; + return x; + } +}; + +} // namespace next_prior_detail + +template +inline T next(T x) { return ++x; } + +template +inline T next(T x, Distance n) +{ + return next_prior_detail::next_impl1< T, Distance >::call(x, n); +} + +template +inline T prior(T x) { return --x; } + +template +inline T prior(T x, Distance n) +{ + return next_prior_detail::prior_impl1< T, Distance >::call(x, n); +} + +} // namespace boost + +#endif // BOOST_NEXT_PRIOR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/non_type.hpp b/ThirdParty/boost-Subset/boost/non_type.hpp new file mode 100644 index 0000000000..896aed4d34 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/non_type.hpp @@ -0,0 +1,27 @@ +// ------------------------------------- +// +// (C) Copyright Gennaro Prota 2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// ------------------------------------------------------ + +#ifndef BOOST_NON_TYPE_HPP_GP_20030417 +#define BOOST_NON_TYPE_HPP_GP_20030417 + + +namespace boost { + + // Just a simple "envelope" for non-type template parameters. Useful + // to work around some MSVC deficiencies. + + template + struct non_type { }; + + +} + + +#endif // include guard diff --git a/ThirdParty/boost-Subset/boost/noncopyable.hpp b/ThirdParty/boost-Subset/boost/noncopyable.hpp new file mode 100644 index 0000000000..e998ee864a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/noncopyable.hpp @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2014 Glen Fernandes + * + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NONCOPYABLE_HPP +#define BOOST_NONCOPYABLE_HPP + +// The header file at this path is deprecated; +// use boost/core/noncopyable.hpp instead. + +#include + +#endif diff --git a/ThirdParty/boost-Subset/boost/none.hpp b/ThirdParty/boost-Subset/boost/none.hpp new file mode 100644 index 0000000000..87a6c707ce --- /dev/null +++ b/ThirdParty/boost-Subset/boost/none.hpp @@ -0,0 +1,53 @@ +// Copyright (C) 2003, Fernando Luis Cacciola Carballal. +// Copyright (C) 2014 Andrzej Krzemienski. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/optional for documentation. +// +// You are welcome to contact the author at: +// fernando_cacciola@hotmail.com +// +#ifndef BOOST_NONE_17SEP2003_HPP +#define BOOST_NONE_17SEP2003_HPP + +#include "boost/none_t.hpp" + +// NOTE: Borland users have to include this header outside any precompiled headers +// (bcc<=5.64 cannot include instance data in a precompiled header) +// -- * To be verified, now that there's no unnamed namespace + +namespace boost { + +#ifdef BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE +none_t const none = (static_cast(0)) ; +#else + +namespace detail { namespace optional_detail { + + // the trick here is to make boost::none defined once as a global but in a header file + template + struct none_instance + { + static const T instance; + }; + + template + const T none_instance::instance = T(); // global, but because 'tis a template, no cpp file required + +} } // namespace detail::optional_detail + + +namespace { + // TU-local + const none_t& none = detail::optional_detail::none_instance::instance; +} + +#endif + +} // namespace boost + +#endif + diff --git a/ThirdParty/boost-Subset/boost/none_t.hpp b/ThirdParty/boost-Subset/boost/none_t.hpp new file mode 100644 index 0000000000..13ce455b16 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/none_t.hpp @@ -0,0 +1,28 @@ +// Copyright (C) 2003, Fernando Luis Cacciola Carballal. +// Copyright (C) 2014 Andrzej Krzemienski. +// +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/optional for documentation. +// +// You are welcome to contact the author at: +// fernando_cacciola@hotmail.com +// +#ifndef BOOST_NONE_T_17SEP2003_HPP +#define BOOST_NONE_T_17SEP2003_HPP + +namespace boost { + +#ifdef BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE +namespace detail { struct none_helper{}; } +typedef int detail::none_helper::*none_t ; +#else +class none_t {}; +#endif + +} // namespace boost + +#endif + diff --git a/ThirdParty/boost-Subset/boost/numeric/conversion/bounds.hpp b/ThirdParty/boost-Subset/boost/numeric/conversion/bounds.hpp new file mode 100644 index 0000000000..e4c7c7deee --- /dev/null +++ b/ThirdParty/boost-Subset/boost/numeric/conversion/bounds.hpp @@ -0,0 +1,24 @@ +// (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/numeric/conversion +// +// Contact the author at: fernando_cacciola@hotmail.com +// +#ifndef BOOST_NUMERIC_CONVERSION_BOUNDS_12NOV2002_HPP +#define BOOST_NUMERIC_CONVERSION_BOUNDS_12NOV2002_HPP + +#include "boost/numeric/conversion/detail/bounds.hpp" + +namespace boost { namespace numeric +{ + +template +struct bounds : boundsdetail::get_impl::type +{} ; + +} } // namespace boost::numeric + +#endif diff --git a/ThirdParty/boost-Subset/boost/numeric/conversion/cast.hpp b/ThirdParty/boost-Subset/boost/numeric/conversion/cast.hpp new file mode 100644 index 0000000000..1ee02518bc --- /dev/null +++ b/ThirdParty/boost-Subset/boost/numeric/conversion/cast.hpp @@ -0,0 +1,61 @@ +// (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/numeric/conversion +// +// Contact the author at: fernando_cacciola@hotmail.com +// +// +// Revision History +// +// 19 Nov 2001 Syntatic changes as suggested by Darin Adler (Fernando Cacciola) +// 08 Nov 2001 Fixes to accommodate MSVC (Fernando Cacciola) +// 04 Nov 2001 Fixes to accommodate gcc2.92 (Fernando Cacciola) +// 30 Oct 2001 Some fixes suggested by Daryle Walker (Fernando Cacciola) +// 25 Oct 2001 Initial boostification (Fernando Cacciola) +// 23 Jan 2004 Inital add to cvs (post review)s +// 22 Jun 2011 Added support for specializing cast policies via numeric_cast_traits (Brandon Kohn). +// +#ifndef BOOST_NUMERIC_CONVERSION_CAST_25OCT2001_HPP +#define BOOST_NUMERIC_CONVERSION_CAST_25OCT2001_HPP + +#include + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) + +# include + +#else + +#include +#include +#include + +namespace boost +{ + template + inline Target numeric_cast( Source arg ) + { + typedef numeric::conversion_traits conv_traits; + typedef numeric::numeric_cast_traits cast_traits; + typedef boost::numeric::converter + < + Target, + Source, + conv_traits, + typename cast_traits::overflow_policy, + typename cast_traits::rounding_policy, + boost::numeric::raw_converter< conv_traits >, + typename cast_traits::range_checking_policy + > converter; + return converter::convert(arg); + } + + using numeric::bad_numeric_cast; +} // namespace boost + +#endif + +#endif diff --git a/ThirdParty/boost-Subset/boost/numeric/conversion/conversion_traits.hpp b/ThirdParty/boost-Subset/boost/numeric/conversion/conversion_traits.hpp new file mode 100644 index 0000000000..6da6178ad6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/numeric/conversion/conversion_traits.hpp @@ -0,0 +1,39 @@ +// (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/numeric/conversion +// +// Contact the author at: fernando_cacciola@hotmail.com +// +#ifndef BOOST_NUMERIC_CONVERSION_CONVERSION_TRAITS_FLC_12NOV2002_HPP +#define BOOST_NUMERIC_CONVERSION_CONVERSION_TRAITS_FLC_12NOV2002_HPP + +#include "boost/numeric/conversion/detail/conversion_traits.hpp" +#include "boost/detail/workaround.hpp" +#include "boost/config.hpp" + +namespace boost { namespace numeric +{ + +template +struct conversion_traits + : convdetail::get_conversion_traits::type +{ +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + typedef typename convdetail::get_conversion_traits::type base_; + typedef typename base_::target_type target_type; + typedef typename base_::source_type source_type; + typedef typename base_::result_type result_type; + typedef typename base_::argument_type argument_type; +#endif +} ; + +} } // namespace boost::numeric + +#endif +// +/////////////////////////////////////////////////////////////////////////////////////////////// + + diff --git a/ThirdParty/boost-Subset/boost/numeric/conversion/converter.hpp b/ThirdParty/boost-Subset/boost/numeric/conversion/converter.hpp new file mode 100644 index 0000000000..331caddea5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/numeric/conversion/converter.hpp @@ -0,0 +1,68 @@ +// (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/numeric/conversion +// +// Contact the author at: fernando_cacciola@hotmail.com +// +#ifndef BOOST_NUMERIC_CONVERSION_CONVERTER_FLC_12NOV2002_HPP +#define BOOST_NUMERIC_CONVERSION_CONVERTER_FLC_12NOV2002_HPP + +#include "boost/numeric/conversion/conversion_traits.hpp" +#include "boost/numeric/conversion/converter_policies.hpp" + +#include "boost/numeric/conversion/detail/converter.hpp" + +namespace boost { namespace numeric +{ + +template, + class OverflowHandler = def_overflow_handler, + class Float2IntRounder = Trunc< BOOST_DEDUCED_TYPENAME Traits::source_type> , + class RawConverter = raw_converter, + class UserRangeChecker = UseInternalRangeChecker + > +struct converter : convdetail::get_converter_impl::type +{ + typedef Traits traits ; + + typedef typename Traits::argument_type argument_type ; + typedef typename Traits::result_type result_type ; + + result_type operator() ( argument_type s ) const { return this->convert(s) ; } +} ; + + + +template , + class UserRangeChecker = UseInternalRangeChecker + > +struct make_converter_from +{ + template, + class RawConverter = raw_converter + > + struct to + { + typedef converter type ; + } ; + +} ; + +} } // namespace boost::numeric + +#endif + + diff --git a/ThirdParty/boost-Subset/boost/numeric/conversion/converter_policies.hpp b/ThirdParty/boost-Subset/boost/numeric/conversion/converter_policies.hpp new file mode 100644 index 0000000000..e7a5e67ce9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/numeric/conversion/converter_policies.hpp @@ -0,0 +1,194 @@ +// (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/numeric/conversion +// +// Contact the author at: fernando_cacciola@hotmail.com +// +#ifndef BOOST_NUMERIC_CONVERSION_CONVERTER_POLICIES_FLC_12NOV2002_HPP +#define BOOST_NUMERIC_CONVERSION_CONVERTER_POLICIES_FLC_12NOV2002_HPP + +#include // for std::bad_cast + +#include // for std::floor and std::ceil +#include + +#include + +#include "boost/type_traits/is_arithmetic.hpp" + +#include "boost/mpl/if.hpp" +#include "boost/mpl/integral_c.hpp" + +namespace boost { namespace numeric +{ + +template +struct Trunc +{ + typedef S source_type ; + + typedef typename mpl::if_< is_arithmetic,S,S const&>::type argument_type ; + + static source_type nearbyint ( argument_type s ) + { +#if !defined(BOOST_NO_STDC_NAMESPACE) + using std::floor ; + using std::ceil ; +#endif + + return s < static_cast(0) ? ceil(s) : floor(s) ; + } + + typedef mpl::integral_c< std::float_round_style, std::round_toward_zero> round_style ; +} ; + + + +template +struct Floor +{ + typedef S source_type ; + + typedef typename mpl::if_< is_arithmetic,S,S const&>::type argument_type ; + + static source_type nearbyint ( argument_type s ) + { +#if !defined(BOOST_NO_STDC_NAMESPACE) + using std::floor ; +#endif + + return floor(s) ; + } + + typedef mpl::integral_c< std::float_round_style, std::round_toward_neg_infinity> round_style ; +} ; + +template +struct Ceil +{ + typedef S source_type ; + + typedef typename mpl::if_< is_arithmetic,S,S const&>::type argument_type ; + + static source_type nearbyint ( argument_type s ) + { +#if !defined(BOOST_NO_STDC_NAMESPACE) + using std::ceil ; +#endif + + return ceil(s) ; + } + + typedef mpl::integral_c< std::float_round_style, std::round_toward_infinity> round_style ; +} ; + +template +struct RoundEven +{ + typedef S source_type ; + + typedef typename mpl::if_< is_arithmetic,S,S const&>::type argument_type ; + + static source_type nearbyint ( argument_type s ) + { + // Algorithm contributed by Guillaume Melquiond + +#if !defined(BOOST_NO_STDC_NAMESPACE) + using std::floor ; + using std::ceil ; +#endif + + // only works inside the range not at the boundaries + S prev = floor(s); + S next = ceil(s); + + S rt = (s - prev) - (next - s); // remainder type + + S const zero(0.0); + S const two(2.0); + + if ( rt < zero ) + return prev; + else if ( rt > zero ) + return next; + else + { + bool is_prev_even = two * floor(prev / two) == prev ; + return ( is_prev_even ? prev : next ) ; + } + } + + typedef mpl::integral_c< std::float_round_style, std::round_to_nearest> round_style ; +} ; + + +enum range_check_result +{ + cInRange = 0 , + cNegOverflow = 1 , + cPosOverflow = 2 +} ; + +class bad_numeric_cast : public std::bad_cast +{ + public: + + virtual const char * what() const throw() + { return "bad numeric conversion: overflow"; } +}; + +class negative_overflow : public bad_numeric_cast +{ + public: + + virtual const char * what() const throw() + { return "bad numeric conversion: negative overflow"; } +}; +class positive_overflow : public bad_numeric_cast +{ + public: + + virtual const char * what() const throw() + { return "bad numeric conversion: positive overflow"; } +}; + +struct def_overflow_handler +{ + void operator() ( range_check_result r ) // throw(negative_overflow,positive_overflow) + { +#ifndef BOOST_NO_EXCEPTIONS + if ( r == cNegOverflow ) + throw negative_overflow() ; + else if ( r == cPosOverflow ) + throw positive_overflow() ; +#else + if ( r == cNegOverflow ) + ::boost::throw_exception(negative_overflow()) ; + else if ( r == cPosOverflow ) + ::boost::throw_exception(positive_overflow()) ; +#endif + } +} ; + +struct silent_overflow_handler +{ + void operator() ( range_check_result ) {} // throw() +} ; + +template +struct raw_converter +{ + typedef typename Traits::result_type result_type ; + typedef typename Traits::argument_type argument_type ; + + static result_type low_level_convert ( argument_type s ) { return static_cast(s) ; } +} ; + +struct UseInternalRangeChecker {} ; + +} } // namespace boost::numeric + +#endif diff --git a/ThirdParty/boost-Subset/boost/numeric/conversion/detail/bounds.hpp b/ThirdParty/boost-Subset/boost/numeric/conversion/detail/bounds.hpp new file mode 100644 index 0000000000..67342b8e57 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/numeric/conversion/detail/bounds.hpp @@ -0,0 +1,58 @@ +// (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/numeric/conversion +// +// Contact the author at: fernando_cacciola@hotmail.com +// +#ifndef BOOST_NUMERIC_CONVERSION_BOUNDS_DETAIL_FLC_12NOV2002_HPP +#define BOOST_NUMERIC_CONVERSION_BOUNDS_DETAIL_FLC_12NOV2002_HPP + +#include "boost/limits.hpp" +#include "boost/config.hpp" +#include "boost/mpl/if.hpp" + +namespace boost { namespace numeric { namespace boundsdetail +{ + template + class Integral + { + typedef std::numeric_limits limits ; + + public : + + static N lowest () { return limits::min BOOST_PREVENT_MACRO_SUBSTITUTION (); } + static N highest () { return limits::max BOOST_PREVENT_MACRO_SUBSTITUTION (); } + static N smallest() { return static_cast(1); } + } ; + + template + class Float + { + typedef std::numeric_limits limits ; + + public : + + static N lowest () { return static_cast(-limits::max BOOST_PREVENT_MACRO_SUBSTITUTION ()) ; } + static N highest () { return limits::max BOOST_PREVENT_MACRO_SUBSTITUTION (); } + static N smallest() { return limits::min BOOST_PREVENT_MACRO_SUBSTITUTION (); } + } ; + + template + struct get_impl + { + typedef mpl::bool_< ::std::numeric_limits::is_integer > is_int ; + + typedef Integral impl_int ; + typedef Float impl_float ; + + typedef typename mpl::if_::type type ; + } ; + +} } } // namespace boost::numeric::boundsdetail. + +#endif +// +/////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/ThirdParty/boost-Subset/boost/numeric/conversion/detail/conversion_traits.hpp b/ThirdParty/boost-Subset/boost/numeric/conversion/detail/conversion_traits.hpp new file mode 100644 index 0000000000..ed25349c67 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/numeric/conversion/detail/conversion_traits.hpp @@ -0,0 +1,97 @@ +// (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/numeric/conversion +// +// Contact the author at: fernando_cacciola@hotmail.com +// +#ifndef BOOST_NUMERIC_CONVERSION_DETAIL_CONVERSION_TRAITS_FLC_12NOV2002_HPP +#define BOOST_NUMERIC_CONVERSION_DETAIL_CONVERSION_TRAITS_FLC_12NOV2002_HPP + +#include "boost/type_traits/is_arithmetic.hpp" +#include "boost/type_traits/is_same.hpp" +#include "boost/type_traits/remove_cv.hpp" + +#include "boost/numeric/conversion/detail/meta.hpp" +#include "boost/numeric/conversion/detail/int_float_mixture.hpp" +#include "boost/numeric/conversion/detail/sign_mixture.hpp" +#include "boost/numeric/conversion/detail/udt_builtin_mixture.hpp" +#include "boost/numeric/conversion/detail/is_subranged.hpp" + +namespace boost { namespace numeric { namespace convdetail +{ + //------------------------------------------------------------------- + // Implementation of the Conversion Traits for T != S + // + // This is a VISIBLE base class of the user-level conversion_traits<> class. + //------------------------------------------------------------------- + template + struct non_trivial_traits_impl + { + typedef typename get_int_float_mixture ::type int_float_mixture ; + typedef typename get_sign_mixture ::type sign_mixture ; + typedef typename get_udt_builtin_mixture ::type udt_builtin_mixture ; + + typedef typename get_is_subranged::type subranged ; + + typedef mpl::false_ trivial ; + + typedef T target_type ; + typedef S source_type ; + typedef T result_type ; + + typedef typename mpl::if_< is_arithmetic, S, S const&>::type argument_type ; + + typedef typename mpl::if_::type supertype ; + typedef typename mpl::if_::type subtype ; + } ; + + //------------------------------------------------------------------- + // Implementation of the Conversion Traits for T == S + // + // This is a VISIBLE base class of the user-level conversion_traits<> class. + //------------------------------------------------------------------- + template + struct trivial_traits_impl + { + typedef typename get_int_float_mixture ::type int_float_mixture ; + typedef typename get_sign_mixture ::type sign_mixture ; + typedef typename get_udt_builtin_mixture::type udt_builtin_mixture ; + + typedef mpl::false_ subranged ; + typedef mpl::true_ trivial ; + + typedef N target_type ; + typedef N source_type ; + typedef N const& result_type ; + typedef N const& argument_type ; + + typedef N supertype ; + typedef N subtype ; + + } ; + + //------------------------------------------------------------------- + // Top level implementation selector. + //------------------------------------------------------------------- + template + struct get_conversion_traits + { + typedef typename remove_cv::type target_type ; + typedef typename remove_cv::type source_type ; + + typedef typename is_same::type is_trivial ; + + typedef trivial_traits_impl trivial_imp ; + typedef non_trivial_traits_impl non_trivial_imp ; + + typedef typename mpl::if_::type type ; + } ; + +} } } // namespace boost::numeric::convdetail + +#endif + + diff --git a/ThirdParty/boost-Subset/boost/numeric/conversion/detail/converter.hpp b/ThirdParty/boost-Subset/boost/numeric/conversion/detail/converter.hpp new file mode 100644 index 0000000000..10550f8daa --- /dev/null +++ b/ThirdParty/boost-Subset/boost/numeric/conversion/detail/converter.hpp @@ -0,0 +1,602 @@ +// (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/numeric/conversion +// +// Contact the author at: fernando_cacciola@hotmail.com +// +#ifndef BOOST_NUMERIC_CONVERSION_DETAIL_CONVERTER_FLC_12NOV2002_HPP +#define BOOST_NUMERIC_CONVERSION_DETAIL_CONVERTER_FLC_12NOV2002_HPP + +#include + +#include "boost/numeric/conversion/detail/meta.hpp" +#include "boost/numeric/conversion/detail/conversion_traits.hpp" +#include "boost/numeric/conversion/bounds.hpp" + +#include "boost/type_traits/is_same.hpp" + +#include "boost/mpl/integral_c.hpp" + +namespace boost { namespace numeric { namespace convdetail +{ + // Integral Constants representing rounding modes + typedef mpl::integral_c round2zero_c ; + typedef mpl::integral_c round2nearest_c ; + typedef mpl::integral_c round2inf_c ; + typedef mpl::integral_c round2neg_inf_c ; + + // Metafunction: + // + // for_round_style::type + // + // {RoundStyle} Integral Constant specifying a round style as declared above. + // {RoundToZero,RoundToNearest,RoundToInf,RoundToNegInf} arbitrary types. + // + // Selects one of the 4 types according to the value of RoundStyle. + // + template + struct for_round_style + { + typedef ct_switch4 selector ; + + typedef typename selector::type type ; + } ; + + + + + + + + + + + + + + + + + + +//-------------------------------------------------------------------------- +// Range Checking Logic. +// +// The range checking logic is built up by combining 1 or 2 predicates. +// Each predicate is encapsulated in a template class and exposes +// the static member function 'apply'. +// +//-------------------------------------------------------------------------- + + + // Because a particular logic can combine either 1 or two predicates, the following + // tags are used to allow the predicate applier to receive 2 preds, but optimize away + // one of them if it is 'non-applicable' + struct non_applicable { typedef mpl::false_ do_apply ; } ; + struct applicable { typedef mpl::true_ do_apply ; } ; + + + //-------------------------------------------------------------------------- + // + // Range Checking Logic implementations. + // + // The following classes, collectivelly named 'Predicates', are instantiated within + // the corresponding range checkers. + // Their static member function 'apply' is called to perform the actual range checking logic. + //-------------------------------------------------------------------------- + + // s < Lowest(T) ? cNegOverflow : cInRange + // + template + struct LT_LoT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + return s < static_cast(bounds::lowest()) ? cNegOverflow : cInRange ; + } + } ; + + // s < 0 ? cNegOverflow : cInRange + // + template + struct LT_Zero : applicable + { + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + return s < static_cast(0) ? cNegOverflow : cInRange ; + } + } ; + + // s <= Lowest(T)-1 ? cNegOverflow : cInRange + // + template + struct LE_PrevLoT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + return s <= static_cast(bounds::lowest()) - static_cast(1.0) + ? cNegOverflow : cInRange ; + } + } ; + + // s < Lowest(T)-0.5 ? cNegOverflow : cInRange + // + template + struct LT_HalfPrevLoT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + return s < static_cast(bounds::lowest()) - static_cast(0.5) + ? cNegOverflow : cInRange ; + } + } ; + + // s > Highest(T) ? cPosOverflow : cInRange + // + template + struct GT_HiT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + return s > static_cast(bounds::highest()) + ? cPosOverflow : cInRange ; + } + } ; + + // s >= Lowest(T) + 1 ? cPosOverflow : cInRange + // + template + struct GE_SuccHiT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + return s >= static_cast(bounds::highest()) + static_cast(1.0) + ? cPosOverflow : cInRange ; + } + } ; + + // s >= Lowest(T) + 0.5 ? cPosgOverflow : cInRange + // + template + struct GT_HalfSuccHiT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + return s >= static_cast(bounds::highest()) + static_cast(0.5) + ? cPosOverflow : cInRange ; + } + } ; + + + //-------------------------------------------------------------------------- + // + // Predicate Combiner. + // + // This helper classes are used to possibly combine the range checking logic + // individually performed by the predicates + // + //-------------------------------------------------------------------------- + + + // Applies both predicates: first 'PredA', and if it equals 'cInRange', 'PredB' + template + struct applyBoth + { + typedef typename PredA::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + range_check_result r = PredA::apply(s) ; + if ( r == cInRange ) + r = PredB::apply(s); + return r ; + } + } ; + + template + struct combine + { + typedef applyBoth Both ; + typedef void NNone ; // 'None' is defined as a macro in (/usr/X11R6/include/X11/X.h) + + typedef typename PredA::do_apply do_applyA ; + typedef typename PredB::do_apply do_applyB ; + + typedef typename for_both::type type ; + } ; + + + + + + + + + + + + +//-------------------------------------------------------------------------- +// Range Checker classes. +// +// The following classes are VISIBLE base classes of the user-level converter<> class. +// They supply the optimized 'out_of_range()' and 'validate_range()' static member functions +// visible in the user interface. +// +//-------------------------------------------------------------------------- + + // Dummy range checker. + template + struct dummy_range_checker + { + typedef typename Traits::argument_type argument_type ; + + static range_check_result out_of_range ( argument_type ) { return cInRange ; } + static void validate_range ( argument_type ) {} + } ; + + // Generic range checker. + // + // All the range checking logic for all possible combinations of source and target + // can be arranged in terms of one or two predicates, which test overflow on both neg/pos 'sides' + // of the ranges. + // + // These predicates are given here as IsNegOverflow and IsPosOverflow. + // + template + struct generic_range_checker + { + typedef OverflowHandler overflow_handler ; + + typedef typename Traits::argument_type argument_type ; + + static range_check_result out_of_range ( argument_type s ) + { + typedef typename combine::type Predicate ; + + return Predicate::apply(s); + } + + static void validate_range ( argument_type s ) + { OverflowHandler()( out_of_range(s) ) ; } + } ; + + + +//-------------------------------------------------------------------------- +// +// Selectors for the optimized Range Checker class. +// +//-------------------------------------------------------------------------- + + template + struct GetRC_Sig2Sig_or_Unsig2Unsig + { + typedef dummy_range_checker Dummy ; + + typedef LT_LoT Pred1 ; + typedef GT_HiT Pred2 ; + + typedef generic_range_checker Normal ; + + typedef typename Traits::subranged subranged ; + + typedef typename mpl::if_::type type ; + } ; + + template + struct GetRC_Sig2Unsig + { + typedef LT_Zero Pred1 ; + typedef GT_HiT Pred2 ; + + typedef generic_range_checker ChoiceA ; + + typedef generic_range_checker ChoiceB ; + + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + + typedef typename subranged_Unsig2Sig::type oposite_subranged ; + + typedef typename mpl::not_::type positively_subranged ; + + typedef typename mpl::if_::type type ; + } ; + + template + struct GetRC_Unsig2Sig + { + typedef GT_HiT Pred1 ; + + typedef generic_range_checker type ; + } ; + + template + struct GetRC_Int2Int + { + typedef GetRC_Sig2Sig_or_Unsig2Unsig Sig2SigQ ; + typedef GetRC_Sig2Unsig Sig2UnsigQ ; + typedef GetRC_Unsig2Sig Unsig2SigQ ; + typedef Sig2SigQ Unsig2UnsigQ ; + + typedef typename Traits::sign_mixture sign_mixture ; + + typedef typename + for_sign_mixture::type + selector ; + + typedef typename selector::type type ; + } ; + + template + struct GetRC_Int2Float + { + typedef dummy_range_checker type ; + } ; + + template + struct GetRC_Float2Int + { + typedef LE_PrevLoT Pred1 ; + typedef GE_SuccHiT Pred2 ; + typedef LT_HalfPrevLoT Pred3 ; + typedef GT_HalfSuccHiT Pred4 ; + typedef GT_HiT Pred5 ; + typedef LT_LoT Pred6 ; + + typedef generic_range_checker ToZero ; + typedef generic_range_checker ToNearest ; + typedef generic_range_checker ToInf ; + typedef generic_range_checker ToNegInf ; + + typedef typename Float2IntRounder::round_style round_style ; + + typedef typename for_round_style::type type ; + } ; + + template + struct GetRC_Float2Float + { + typedef dummy_range_checker Dummy ; + + typedef LT_LoT Pred1 ; + typedef GT_HiT Pred2 ; + + typedef generic_range_checker Normal ; + + typedef typename Traits::subranged subranged ; + + typedef typename mpl::if_::type type ; + } ; + + template + struct GetRC_BuiltIn2BuiltIn + { + typedef GetRC_Int2Int Int2IntQ ; + typedef GetRC_Int2Float Int2FloatQ ; + typedef GetRC_Float2Int Float2IntQ ; + typedef GetRC_Float2Float Float2FloatQ ; + + typedef typename Traits::int_float_mixture int_float_mixture ; + + typedef typename for_int_float_mixture::type selector ; + + typedef typename selector::type type ; + } ; + + template + struct GetRC + { + typedef GetRC_BuiltIn2BuiltIn BuiltIn2BuiltInQ ; + + typedef dummy_range_checker Dummy ; + + typedef mpl::identity DummyQ ; + + typedef typename Traits::udt_builtin_mixture udt_builtin_mixture ; + + typedef typename for_udt_builtin_mixture::type selector ; + + typedef typename selector::type type ; + } ; + + + + +//-------------------------------------------------------------------------- +// Converter classes. +// +// The following classes are VISIBLE base classes of the user-level converter<> class. +// They supply the optimized 'nearbyint()' and 'convert()' static member functions +// visible in the user interface. +// +//-------------------------------------------------------------------------- + + // + // Trivial Converter : used when (cv-unqualified) T == (cv-unqualified) S + // + template + struct trivial_converter_impl : public std::unary_function< BOOST_DEDUCED_TYPENAME Traits::argument_type + ,BOOST_DEDUCED_TYPENAME Traits::result_type + > + ,public dummy_range_checker + { + typedef Traits traits ; + + typedef typename Traits::source_type source_type ; + typedef typename Traits::argument_type argument_type ; + typedef typename Traits::result_type result_type ; + + static result_type low_level_convert ( argument_type s ) { return s ; } + static source_type nearbyint ( argument_type s ) { return s ; } + static result_type convert ( argument_type s ) { return s ; } + } ; + + + // + // Rounding Converter : used for float to integral conversions. + // + template + struct rounding_converter : public std::unary_function< BOOST_DEDUCED_TYPENAME Traits::argument_type + ,BOOST_DEDUCED_TYPENAME Traits::result_type + > + ,public RangeChecker + ,public Float2IntRounder + ,public RawConverter + { + typedef RangeChecker RangeCheckerBase ; + typedef Float2IntRounder Float2IntRounderBase ; + typedef RawConverter RawConverterBase ; + + typedef Traits traits ; + + typedef typename Traits::source_type source_type ; + typedef typename Traits::argument_type argument_type ; + typedef typename Traits::result_type result_type ; + + static result_type convert ( argument_type s ) + { + RangeCheckerBase::validate_range(s); + source_type s1 = Float2IntRounderBase::nearbyint(s); + return RawConverterBase::low_level_convert(s1); + } + } ; + + + // + // Non-Rounding Converter : used for all other conversions. + // + template + struct non_rounding_converter : public std::unary_function< BOOST_DEDUCED_TYPENAME Traits::argument_type + ,BOOST_DEDUCED_TYPENAME Traits::result_type + > + ,public RangeChecker + ,public RawConverter + { + typedef RangeChecker RangeCheckerBase ; + typedef RawConverter RawConverterBase ; + + typedef Traits traits ; + + typedef typename Traits::source_type source_type ; + typedef typename Traits::argument_type argument_type ; + typedef typename Traits::result_type result_type ; + + static source_type nearbyint ( argument_type s ) { return s ; } + + static result_type convert ( argument_type s ) + { + RangeCheckerBase::validate_range(s); + return RawConverterBase::low_level_convert(s); + } + } ; + + + + +//-------------------------------------------------------------------------- +// +// Selectors for the optimized Converter class. +// +//-------------------------------------------------------------------------- + + template + struct get_non_trivial_converter + { + typedef GetRC InternalRangeCheckerQ ; + + typedef is_same use_internal_RC ; + + typedef mpl::identity UserRangeCheckerQ ; + + typedef typename + mpl::eval_if::type + RangeChecker ; + + typedef non_rounding_converter NonRounding ; + typedef rounding_converter Rounding ; + + typedef mpl::identity NonRoundingQ ; + typedef mpl::identity RoundingQ ; + + typedef typename Traits::int_float_mixture int_float_mixture ; + + typedef typename + for_int_float_mixture::type + selector ; + + typedef typename selector::type type ; + } ; + + template< class Traits + ,class OverflowHandler + ,class Float2IntRounder + ,class RawConverter + ,class UserRangeChecker + > + struct get_converter_impl + { +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT( 0x0561 ) ) + // bcc55 prefers sometimes template parameters to be explicit local types. + // (notice that is is illegal to reuse the names like this) + typedef Traits Traits ; + typedef OverflowHandler OverflowHandler ; + typedef Float2IntRounder Float2IntRounder ; + typedef RawConverter RawConverter ; + typedef UserRangeChecker UserRangeChecker ; +#endif + + typedef trivial_converter_impl Trivial ; + typedef mpl::identity TrivialQ ; + + typedef get_non_trivial_converter< Traits + ,OverflowHandler + ,Float2IntRounder + ,RawConverter + ,UserRangeChecker + > NonTrivialQ ; + + typedef typename Traits::trivial trivial ; + + typedef typename mpl::eval_if::type type ; + } ; + +} } } // namespace boost::numeric::convdetail + +#endif + + diff --git a/ThirdParty/boost-Subset/boost/numeric/conversion/detail/int_float_mixture.hpp b/ThirdParty/boost-Subset/boost/numeric/conversion/detail/int_float_mixture.hpp new file mode 100644 index 0000000000..464e52753f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/numeric/conversion/detail/int_float_mixture.hpp @@ -0,0 +1,72 @@ +// (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/numeric/conversion +// +// Contact the author at: fernando_cacciola@hotmail.com +// +#ifndef BOOST_NUMERIC_CONVERSION_DETAIL_INT_FLOAT_MIXTURE_FLC_12NOV2002_HPP +#define BOOST_NUMERIC_CONVERSION_DETAIL_INT_FLOAT_MIXTURE_FLC_12NOV2002_HPP + +#include "boost/config.hpp" +#include "boost/limits.hpp" + +#include "boost/numeric/conversion/int_float_mixture_enum.hpp" +#include "boost/numeric/conversion/detail/meta.hpp" + +#include "boost/mpl/integral_c.hpp" + +namespace boost { namespace numeric { namespace convdetail +{ + // Integral Constants for 'IntFloatMixture' + typedef mpl::integral_c int2int_c ; + typedef mpl::integral_c int2float_c ; + typedef mpl::integral_c float2int_c ; + typedef mpl::integral_c float2float_c ; + + // Metafunction: + // + // get_int_float_mixture::type + // + // Selects the appropriate Int-Float Mixture Integral Constant for the combination T,S. + // + template + struct get_int_float_mixture + { + typedef mpl::bool_< ::std::numeric_limits::is_integer > S_int ; + typedef mpl::bool_< ::std::numeric_limits::is_integer > T_int ; + + typedef typename + for_both::type + type ; + } ; + + // Metafunction: + // + // for_int_float_mixture::type + // + // {Mixture} is one of the Integral Constants for Mixture, declared above. + // {int_int,int_float,float_int,float_float} are aribtrary types. (not metafunctions) + // + // According to the value of 'IntFloatMixture', selects the corresponding type. + // + template + struct for_int_float_mixture + { + typedef typename + ct_switch4::type + type ; + } ; + +} } } // namespace boost::numeric::convdetail + +#endif +// +/////////////////////////////////////////////////////////////////////////////////////////////// + + diff --git a/ThirdParty/boost-Subset/boost/numeric/conversion/detail/is_subranged.hpp b/ThirdParty/boost-Subset/boost/numeric/conversion/detail/is_subranged.hpp new file mode 100644 index 0000000000..b5e7fe8f1e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/numeric/conversion/detail/is_subranged.hpp @@ -0,0 +1,234 @@ +// (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/numeric/conversion +// +// Contact the author at: fernando_cacciola@hotmail.com +// +#ifndef BOOST_NUMERIC_CONVERSION_DETAIL_IS_SUBRANGED_FLC_12NOV2002_HPP +#define BOOST_NUMERIC_CONVERSION_DETAIL_IS_SUBRANGED_FLC_12NOV2002_HPP + +#include "boost/config.hpp" +#include "boost/limits.hpp" + +#include "boost/mpl/int.hpp" +#include "boost/mpl/multiplies.hpp" +#include "boost/mpl/less.hpp" +#include "boost/mpl/equal_to.hpp" + +#include "boost/type_traits/is_same.hpp" + +#include "boost/numeric/conversion/detail/meta.hpp" +#include "boost/numeric/conversion/detail/int_float_mixture.hpp" +#include "boost/numeric/conversion/detail/sign_mixture.hpp" +#include "boost/numeric/conversion/detail/udt_builtin_mixture.hpp" + +namespace boost { namespace numeric { namespace convdetail +{ + //--------------------------------------------------------------- + // Implementations of the compile time predicate "T is subranged" + //--------------------------------------------------------------- + + // for integral to integral conversions + template + struct subranged_Sig2Unsig + { + // Signed to unsigned conversions are 'subranged' because of possible loose + // of negative values. + typedef mpl::true_ type ; + } ; + + // for unsigned integral to signed integral conversions + template + struct subranged_Unsig2Sig + { + // IMPORTANT NOTE: + // + // This code assumes that signed/unsigned integral values are represented + // such that: + // + // numeric_limits::digits + 1 == numeric_limits::digits + // + // The '+1' is required since numeric_limits<>::digits gives 1 bit less for signed integral types. + // + // This fact is used by the following logic: + // + // if ( (numeric_limits::digits+1) < (2*numeric_limits::digits) ) + // then the conversion is subranged. + // + + typedef mpl::int_< ::std::numeric_limits::digits > S_digits ; + typedef mpl::int_< ::std::numeric_limits::digits > T_digits ; + + // T is signed, so take digits+1 + typedef typename T_digits::next u_T_digits ; + + typedef mpl::int_<2> Two ; + + typedef typename mpl::multiplies::type S_digits_times_2 ; + + typedef typename mpl::less::type type ; + } ; + + // for integral to integral conversions of the same sign. + template + struct subranged_SameSign + { + // An integral conversion of the same sign is subranged if digits(T) < digits(S). + + typedef mpl::int_< ::std::numeric_limits::digits > S_digits ; + typedef mpl::int_< ::std::numeric_limits::digits > T_digits ; + + typedef typename mpl::less::type type ; + } ; + + // for integral to float conversions + template + struct subranged_Int2Float + { + typedef mpl::false_ type ; + } ; + + // for float to integral conversions + template + struct subranged_Float2Int + { + typedef mpl::true_ type ; + } ; + + // for float to float conversions + template + struct subranged_Float2Float + { + // If both T and S are floats, + // compare exponent bits and if they match, mantisa bits. + + typedef mpl::int_< ::std::numeric_limits::digits > S_mantisa ; + typedef mpl::int_< ::std::numeric_limits::digits > T_mantisa ; + + typedef mpl::int_< ::std::numeric_limits::max_exponent > S_exponent ; + typedef mpl::int_< ::std::numeric_limits::max_exponent > T_exponent ; + + typedef typename mpl::less::type T_smaller_exponent ; + + typedef typename mpl::equal_to::type equal_exponents ; + + typedef mpl::less T_smaller_mantisa ; + + typedef mpl::eval_if not_bigger_exponent_case ; + + typedef typename + mpl::eval_if::type + type ; + } ; + + // for Udt to built-in conversions + template + struct subranged_Udt2BuiltIn + { + typedef mpl::true_ type ; + } ; + + // for built-in to Udt conversions + template + struct subranged_BuiltIn2Udt + { + typedef mpl::false_ type ; + } ; + + // for Udt to Udt conversions + template + struct subranged_Udt2Udt + { + typedef mpl::false_ type ; + } ; + + //------------------------------------------------------------------- + // Selectors for the implementations of the subranged predicate + //------------------------------------------------------------------- + + template + struct get_subranged_Int2Int + { + typedef subranged_SameSign Sig2Sig ; + typedef subranged_Sig2Unsig Sig2Unsig ; + typedef subranged_Unsig2Sig Unsig2Sig ; + typedef Sig2Sig Unsig2Unsig ; + + typedef typename get_sign_mixture::type sign_mixture ; + + typedef typename + for_sign_mixture::type + type ; + } ; + + template + struct get_subranged_BuiltIn2BuiltIn + { + typedef get_subranged_Int2Int Int2IntQ ; + + typedef subranged_Int2Float Int2Float ; + typedef subranged_Float2Int Float2Int ; + typedef subranged_Float2Float Float2Float ; + + typedef mpl::identity Int2FloatQ ; + typedef mpl::identity Float2IntQ ; + typedef mpl::identity Float2FloatQ ; + + typedef typename get_int_float_mixture::type int_float_mixture ; + + typedef for_int_float_mixture for_ ; + + typedef typename for_::type selected ; + + typedef typename selected::type type ; + } ; + + template + struct get_subranged + { + typedef get_subranged_BuiltIn2BuiltIn BuiltIn2BuiltInQ ; + + typedef subranged_BuiltIn2Udt BuiltIn2Udt ; + typedef subranged_Udt2BuiltIn Udt2BuiltIn ; + typedef subranged_Udt2Udt Udt2Udt ; + + typedef mpl::identity BuiltIn2UdtQ ; + typedef mpl::identity Udt2BuiltInQ ; + typedef mpl::identity Udt2UdtQ ; + + typedef typename get_udt_builtin_mixture::type udt_builtin_mixture ; + + typedef typename + for_udt_builtin_mixture::type + selected ; + + typedef typename selected::type selected2 ; + + typedef typename selected2::type type ; + } ; + + + //------------------------------------------------------------------- + // Top level implementation selector. + //------------------------------------------------------------------- + template + struct get_is_subranged + { + typedef get_subranged non_trivial_case ; + typedef mpl::identity trivial_case ; + + typedef is_same is_trivial ; + + typedef typename mpl::if_::type selected ; + + typedef typename selected::type type ; + } ; + +} } } // namespace boost::numeric::convdetail + +#endif + + diff --git a/ThirdParty/boost-Subset/boost/numeric/conversion/detail/meta.hpp b/ThirdParty/boost-Subset/boost/numeric/conversion/detail/meta.hpp new file mode 100644 index 0000000000..246a1b4702 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/numeric/conversion/detail/meta.hpp @@ -0,0 +1,120 @@ +// (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/numeric/conversion +// +// Contact the author at: fernando_cacciola@hotmail.com +// +#ifndef BOOST_NUMERIC_CONVERSION_DETAIL_META_FLC_12NOV2002_HPP +#define BOOST_NUMERIC_CONVERSION_DETAIL_META_FLC_12NOV2002_HPP + +#include "boost/type_traits/remove_cv.hpp" + +#include "boost/mpl/if.hpp" +#include "boost/mpl/eval_if.hpp" +#include "boost/mpl/equal_to.hpp" +#include "boost/mpl/not.hpp" +#include "boost/mpl/and.hpp" +#include "boost/mpl/bool.hpp" +#include "boost/mpl/identity.hpp" + +namespace boost { namespace numeric { namespace convdetail +{ + template< class T1, class T2> + struct equal_to + { + #if !defined(__BORLANDC__) + + enum { x = ( BOOST_MPL_AUX_VALUE_WKND(T1)::value == BOOST_MPL_AUX_VALUE_WKND(T2)::value ) }; + + BOOST_STATIC_CONSTANT(bool, value = x); + + typedef mpl::bool_ type; + + #else + + BOOST_STATIC_CONSTANT(bool, value = ( + BOOST_MPL_AUX_VALUE_WKND(T1)::value + == BOOST_MPL_AUX_VALUE_WKND(T2)::value + )); + + typedef mpl::bool_<( + BOOST_MPL_AUX_VALUE_WKND(T1)::value + == BOOST_MPL_AUX_VALUE_WKND(T2)::value + )> type; + #endif + }; + +// Metafunction: + // + // ct_switch4::type + // + // {Value,Case(X)Val} are Integral Constants (such as: mpl::int_<>) + // {Case(X)Type,DefaultType} are arbitrary types. (not metafunctions) + // + // Returns Case(X)Type if Val==Case(X)Val; DefaultType otherwise. + // + template + struct ct_switch4 + { + typedef mpl::identity Case0TypeQ ; + typedef mpl::identity Case1TypeQ ; + + typedef equal_to is_case0 ; + typedef equal_to is_case1 ; + typedef equal_to is_case2 ; + + typedef mpl::if_ choose_2_3Q ; + typedef mpl::eval_if choose_1_2_3Q ; + + typedef typename + mpl::eval_if::type + type ; + } ; + + + + + // Metafunction: + // + // for_both::type + // + // {exp0,expr1} are Boolean Integral Constants + // {TT,TF,FT,FF} are aribtrary types. (not metafunctions) + // + // According to the combined boolean value of 'expr0 && expr1', selects the corresponding type. + // + template + struct for_both + { + typedef mpl::identity TF_Q ; + typedef mpl::identity TT_Q ; + + typedef typename mpl::not_::type not_expr0 ; + typedef typename mpl::not_::type not_expr1 ; + + typedef typename mpl::and_::type caseTT ; + typedef typename mpl::and_::type caseTF ; + typedef typename mpl::and_::type caseFT ; + + typedef mpl::if_ choose_FT_FF_Q ; + typedef mpl::eval_if choose_TF_FT_FF_Q ; + + typedef typename mpl::eval_if::type type ; + } ; + +} } } // namespace boost::numeric::convdetail + +#endif + + diff --git a/ThirdParty/boost-Subset/boost/numeric/conversion/detail/numeric_cast_traits.hpp b/ThirdParty/boost-Subset/boost/numeric/conversion/detail/numeric_cast_traits.hpp new file mode 100644 index 0000000000..150490d935 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/numeric/conversion/detail/numeric_cast_traits.hpp @@ -0,0 +1,138 @@ +// +//! Copyright (c) 2011-2012 +//! Brandon Kohn +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#if !defined(BOOST_NUMERIC_CONVERSION_DONT_USE_PREPROCESSED_FILES) + + #include + + #if !defined(BOOST_NO_LONG_LONG) + #include + #endif + +#else +#if !BOOST_PP_IS_ITERATING + + #include + #include + #include + + #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES) + #pragma wave option(preserve: 2, line: 0, output: "preprocessed/numeric_cast_traits_common.hpp") + #endif +// +//! Copyright (c) 2011-2012 +//! Brandon Kohn +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES) + #pragma wave option(preserve: 1) + #endif + + //! These are the assumed common built in fundamental types (not typedefs/macros.) + #define BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES() \ + (char) \ + (signed char) \ + (unsigned char) \ + (short) \ + (unsigned short) \ + (int) \ + (unsigned int) \ + (long) \ + (unsigned long) \ + (float) \ + (double) \ + (long double) \ + /***/ + + #define BOOST_NUMERIC_CONVERSION_SEQ_A() BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES() + #define BOOST_NUMERIC_CONVERSION_SEQ_B() BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES() + +namespace boost { namespace numeric { + + #define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_NUMERIC_CONVERSION_SEQ_A())), )) + #include BOOST_PP_ITERATE() + +}}//namespace boost::numeric; + + #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES) + #pragma wave option(output: null) + #endif + + #if ( defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES) ) || !defined(BOOST_NO_LONG_LONG) + + #undef BOOST_NUMERIC_CONVERSION_SEQ_A + #undef BOOST_NUMERIC_CONVERSION_SEQ_B + + #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES) + #pragma wave option(preserve: 2, line: 0, output: "preprocessed/numeric_cast_traits_long_long.hpp") + #endif + +// +//! Copyright (c) 2011-2012 +//! Brandon Kohn +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES) + #pragma wave option(preserve: 1) + #endif + +namespace boost { namespace numeric { + + #define BOOST_NUMERIC_CONVERSION_SEQ_A() BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES()(boost::long_long_type)(boost::ulong_long_type) + #define BOOST_NUMERIC_CONVERSION_SEQ_B() (boost::long_long_type)(boost::ulong_long_type) + + #define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_NUMERIC_CONVERSION_SEQ_A())), )) + #include BOOST_PP_ITERATE() + +}}//namespace boost::numeric; + + #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES) + #pragma wave option(output: null) + #endif + + #endif + + #undef BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES + #undef BOOST_NUMERIC_CONVERSION_SEQ_A + #undef BOOST_NUMERIC_CONVERSION_SEQ_B + +#elif BOOST_PP_ITERATION_DEPTH() == 1 + + #define BOOST_PP_ITERATION_PARAMS_2 (3, (0, BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_NUMERIC_CONVERSION_SEQ_B())), )) + #include BOOST_PP_ITERATE() + +#elif BOOST_PP_ITERATION_DEPTH() == 2 + + //! Generate default traits for the specified source and target. + #define BOOST_NUMERIC_CONVERSION_A BOOST_PP_FRAME_ITERATION(1) + #define BOOST_NUMERIC_CONVERSION_B BOOST_PP_FRAME_ITERATION(2) + + template <> + struct numeric_cast_traits + < + BOOST_PP_SEQ_ELEM(BOOST_NUMERIC_CONVERSION_A, BOOST_NUMERIC_CONVERSION_SEQ_A()) + , BOOST_PP_SEQ_ELEM(BOOST_NUMERIC_CONVERSION_B, BOOST_NUMERIC_CONVERSION_SEQ_B()) + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + #undef BOOST_NUMERIC_CONVERSION_A + #undef BOOST_NUMERIC_CONVERSION_B + +#endif//! Depth 2. +#endif// BOOST_NUMERIC_CONVERSION_DONT_USE_PREPROCESSED_FILES diff --git a/ThirdParty/boost-Subset/boost/numeric/conversion/detail/old_numeric_cast.hpp b/ThirdParty/boost-Subset/boost/numeric/conversion/detail/old_numeric_cast.hpp new file mode 100644 index 0000000000..47b86d2c8c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/numeric/conversion/detail/old_numeric_cast.hpp @@ -0,0 +1,339 @@ +// boost cast.hpp header file ----------------------------------------------// + +// (C) Copyright Kevlin Henney and Dave Abrahams 1999. +// Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/conversion for Documentation. + +// Revision History +// 23 JUN 05 Code extracted from /boost/cast.hpp into this new header. +// Keeps this legacy version of numeric_cast<> for old compilers +// wich can't compile the new version in /boost/numeric/conversion/cast.hpp +// (Fernando Cacciola) +// 02 Apr 01 Removed BOOST_NO_LIMITS workarounds and included +// instead (the workaround did not +// actually compile when BOOST_NO_LIMITS was defined in +// any case, so we loose nothing). (John Maddock) +// 21 Jan 01 Undid a bug I introduced yesterday. numeric_cast<> never +// worked with stock GCC; trying to get it to do that broke +// vc-stlport. +// 20 Jan 01 Moved BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS to config.hpp. +// Removed unused BOOST_EXPLICIT_TARGET macro. Moved +// boost::detail::type to boost/type.hpp. Made it compile with +// stock gcc again (Dave Abrahams) +// 29 Nov 00 Remove nested namespace cast, cleanup spacing before Formal +// Review (Beman Dawes) +// 19 Oct 00 Fix numeric_cast for floating-point types (Dave Abrahams) +// 15 Jul 00 Suppress numeric_cast warnings for GCC, Borland and MSVC +// (Dave Abrahams) +// 30 Jun 00 More MSVC6 wordarounds. See comments below. (Dave Abrahams) +// 28 Jun 00 Removed implicit_cast<>. See comment below. (Beman Dawes) +// 27 Jun 00 More MSVC6 workarounds +// 15 Jun 00 Add workarounds for MSVC6 +// 2 Feb 00 Remove bad_numeric_cast ";" syntax error (Doncho Angelov) +// 26 Jan 00 Add missing throw() to bad_numeric_cast::what(0 (Adam Levar) +// 29 Dec 99 Change using declarations so usages in other namespaces work +// correctly (Dave Abrahams) +// 23 Sep 99 Change polymorphic_downcast assert to also detect M.I. errors +// as suggested Darin Adler and improved by Valentin Bonnard. +// 2 Sep 99 Remove controversial asserts, simplify, rename. +// 30 Aug 99 Move to cast.hpp, replace value_cast with numeric_cast, +// place in nested namespace. +// 3 Aug 99 Initial version + +#ifndef BOOST_OLD_NUMERIC_CAST_HPP +#define BOOST_OLD_NUMERIC_CAST_HPP + +# include +# include +# include +# include +# include +# include + +// It has been demonstrated numerous times that MSVC 6.0 fails silently at link +// time if you use a template function which has template parameters that don't +// appear in the function's argument list. +// +// TODO: Add this to config.hpp? +// FLC: This macro is repeated in boost/cast.hpp but only locally (is undefined at the bottom) +// so is OK to reproduce it here. +# if defined(BOOST_MSVC) && BOOST_MSVC < 1300 +# define BOOST_EXPLICIT_DEFAULT_TARGET , ::boost::type* = 0 +# else +# define BOOST_EXPLICIT_DEFAULT_TARGET +# endif + +namespace boost +{ + using numeric::bad_numeric_cast; + +// LEGACY numeric_cast [only for some old broken compilers] --------------------------------------// + +// Contributed by Kevlin Henney + +// numeric_cast ------------------------------------------------------------// + +#if !defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) || defined(BOOST_SGI_CPP_LIMITS) + + namespace detail + { + template + struct signed_numeric_limits : std::numeric_limits + { + static inline T min BOOST_PREVENT_MACRO_SUBSTITUTION () + { + return (std::numeric_limits::min)() >= 0 + // unary minus causes integral promotion, thus the static_cast<> + ? static_cast(-(std::numeric_limits::max)()) + : (std::numeric_limits::min)(); + }; + }; + + // Move to namespace boost in utility.hpp? + template + struct fixed_numeric_limits_base + : public if_true< std::numeric_limits::is_signed > + ::BOOST_NESTED_TEMPLATE then< signed_numeric_limits, + std::numeric_limits + >::type + {}; + + template + struct fixed_numeric_limits + : fixed_numeric_limits_base::is_specialized)> + {}; + +# ifdef BOOST_HAS_LONG_LONG + // cover implementations which supply no specialization for long + // long / unsigned long long. Not intended to be full + // numeric_limits replacements, but good enough for numeric_cast<> + template <> + struct fixed_numeric_limits_base< ::boost::long_long_type, false> + { + BOOST_STATIC_CONSTANT(bool, is_specialized = true); + BOOST_STATIC_CONSTANT(bool, is_signed = true); + static ::boost::long_long_type max BOOST_PREVENT_MACRO_SUBSTITUTION () + { +# ifdef LONGLONG_MAX + return LONGLONG_MAX; +# else + return 9223372036854775807LL; // hope this is portable +# endif + } + + static ::boost::long_long_type min BOOST_PREVENT_MACRO_SUBSTITUTION () + { +# ifdef LONGLONG_MIN + return LONGLONG_MIN; +# else + return -( 9223372036854775807LL )-1; // hope this is portable +# endif + } + }; + + template <> + struct fixed_numeric_limits_base< ::boost::ulong_long_type, false> + { + BOOST_STATIC_CONSTANT(bool, is_specialized = true); + BOOST_STATIC_CONSTANT(bool, is_signed = false); + static ::boost::ulong_long_type max BOOST_PREVENT_MACRO_SUBSTITUTION () + { +# ifdef ULONGLONG_MAX + return ULONGLONG_MAX; +# else + return 0xffffffffffffffffULL; // hope this is portable +# endif + } + + static ::boost::ulong_long_type min BOOST_PREVENT_MACRO_SUBSTITUTION () { return 0; } + }; +# endif + } // namespace detail + +// less_than_type_min - + // x_is_signed should be numeric_limits::is_signed + // y_is_signed should be numeric_limits::is_signed + // y_min should be numeric_limits::min() + // + // check(x, y_min) returns true iff x < y_min without invoking comparisons + // between signed and unsigned values. + // + // "poor man's partial specialization" is in use here. + template + struct less_than_type_min + { + template + static bool check(X x, Y y_min) + { return x < y_min; } + }; + + template <> + struct less_than_type_min + { + template + static bool check(X, Y) + { return false; } + }; + + template <> + struct less_than_type_min + { + template + static bool check(X x, Y) + { return x < 0; } + }; + + // greater_than_type_max - + // same_sign should be: + // numeric_limits::is_signed == numeric_limits::is_signed + // y_max should be numeric_limits::max() + // + // check(x, y_max) returns true iff x > y_max without invoking comparisons + // between signed and unsigned values. + // + // "poor man's partial specialization" is in use here. + template + struct greater_than_type_max; + + template<> + struct greater_than_type_max + { + template + static inline bool check(X x, Y y_max) + { return x > y_max; } + }; + + template <> + struct greater_than_type_max + { + // What does the standard say about this? I think it's right, and it + // will work with every compiler I know of. + template + static inline bool check(X x, Y) + { return x >= 0 && static_cast(static_cast(x)) != x; } + +# if defined(BOOST_MSVC) && BOOST_MSVC < 1300 + // MSVC6 can't static_cast unsigned __int64 -> floating types +# define BOOST_UINT64_CAST(src_type) \ + static inline bool check(src_type x, unsigned __int64) \ + { \ + if (x < 0) return false; \ + unsigned __int64 y = static_cast(x); \ + bool odd = y & 0x1; \ + __int64 div2 = static_cast<__int64>(y >> 1); \ + return ((static_cast(div2) * 2.0) + odd) != x; \ + } + + BOOST_UINT64_CAST(long double); + BOOST_UINT64_CAST(double); + BOOST_UINT64_CAST(float); +# undef BOOST_UINT64_CAST +# endif + }; + + template<> + struct greater_than_type_max + { + template + static inline bool check(X x, Y y_max) + { return x > y_max; } + }; + + template <> + struct greater_than_type_max + { + // What does the standard say about this? I think it's right, and it + // will work with every compiler I know of. + template + static inline bool check(X x, Y) + { return static_cast(static_cast(x)) != x; } + }; + +#else // use #pragma hacks if available + + namespace detail + { +# if BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4018) +# pragma warning(disable : 4146) +#elif defined(__BORLANDC__) +# pragma option push -w-8041 +# endif + + // Move to namespace boost in utility.hpp? + template + struct fixed_numeric_limits : public std::numeric_limits + { + static inline T min BOOST_PREVENT_MACRO_SUBSTITUTION () + { + return std::numeric_limits::is_signed && (std::numeric_limits::min)() >= 0 + ? T(-(std::numeric_limits::max)()) : (std::numeric_limits::min)(); + } + }; + +# if BOOST_MSVC +# pragma warning(pop) +#elif defined(__BORLANDC__) +# pragma option pop +# endif + } // namespace detail + +#endif + + template + inline Target numeric_cast(Source arg BOOST_EXPLICIT_DEFAULT_TARGET) + { + // typedefs abbreviating respective trait classes + typedef detail::fixed_numeric_limits arg_traits; + typedef detail::fixed_numeric_limits result_traits; + +#if defined(BOOST_STRICT_CONFIG) \ + || (!defined(__HP_aCC) || __HP_aCC > 33900) \ + && (!defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) \ + || defined(BOOST_SGI_CPP_LIMITS)) + // typedefs that act as compile time assertions + // (to be replaced by boost compile time assertions + // as and when they become available and are stable) + typedef bool argument_must_be_numeric[arg_traits::is_specialized]; + typedef bool result_must_be_numeric[result_traits::is_specialized]; + + const bool arg_is_signed = arg_traits::is_signed; + const bool result_is_signed = result_traits::is_signed; + const bool same_sign = arg_is_signed == result_is_signed; + + if (less_than_type_min::check(arg, (result_traits::min)()) + || greater_than_type_max::check(arg, (result_traits::max)()) + ) + +#else // We need to use #pragma hacks if available + +# if BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4018) +#elif defined(__BORLANDC__) +#pragma option push -w-8012 +# endif + if ((arg < 0 && !result_traits::is_signed) // loss of negative range + || (arg_traits::is_signed && arg < (result_traits::min)()) // underflow + || arg > (result_traits::max)()) // overflow +# if BOOST_MSVC +# pragma warning(pop) +#elif defined(__BORLANDC__) +#pragma option pop +# endif +#endif + { + throw bad_numeric_cast(); + } + return static_cast(arg); + } // numeric_cast + +# undef BOOST_EXPLICIT_DEFAULT_TARGET + +} // namespace boost + +#endif // BOOST_OLD_NUMERIC_CAST_HPP diff --git a/ThirdParty/boost-Subset/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp b/ThirdParty/boost-Subset/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp new file mode 100644 index 0000000000..01dc9321b3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp @@ -0,0 +1,1741 @@ +// +//! Copyright (c) 2011-2012 +//! Brandon Kohn +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + + + +namespace boost { namespace numeric { + + template <> + struct numeric_cast_traits + < + char + , char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + char + , signed char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + char + , unsigned char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + char + , short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + char + , unsigned short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + char + , int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + char + , unsigned int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + char + , long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + char + , unsigned long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + char + , float + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + char + , double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + char + , long double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + signed char + , char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + signed char + , signed char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + signed char + , unsigned char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + signed char + , short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + signed char + , unsigned short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + signed char + , int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + signed char + , unsigned int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + signed char + , long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + signed char + , unsigned long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + signed char + , float + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + signed char + , double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + signed char + , long double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned char + , char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned char + , signed char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned char + , unsigned char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned char + , short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned char + , unsigned short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned char + , int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned char + , unsigned int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned char + , long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned char + , unsigned long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned char + , float + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned char + , double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned char + , long double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + short + , char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + short + , signed char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + short + , unsigned char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + short + , short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + short + , unsigned short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + short + , int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + short + , unsigned int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + short + , long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + short + , unsigned long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + short + , float + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + short + , double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + short + , long double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned short + , char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned short + , signed char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned short + , unsigned char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned short + , short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned short + , unsigned short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned short + , int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned short + , unsigned int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned short + , long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned short + , unsigned long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned short + , float + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned short + , double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned short + , long double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + int + , char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + int + , signed char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + int + , unsigned char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + int + , short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + int + , unsigned short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + int + , int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + int + , unsigned int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + int + , long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + int + , unsigned long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + int + , float + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + int + , double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + int + , long double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned int + , char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned int + , signed char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned int + , unsigned char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned int + , short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned int + , unsigned short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned int + , int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned int + , unsigned int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned int + , long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned int + , unsigned long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned int + , float + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned int + , double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned int + , long double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long + , char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long + , signed char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long + , unsigned char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long + , short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long + , unsigned short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long + , int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long + , unsigned int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long + , long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long + , unsigned long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long + , float + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long + , double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long + , long double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned long + , char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned long + , signed char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned long + , unsigned char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned long + , short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned long + , unsigned short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned long + , int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned long + , unsigned int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned long + , long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned long + , unsigned long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned long + , float + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned long + , double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned long + , long double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + float + , char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + float + , signed char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + float + , unsigned char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + float + , short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + float + , unsigned short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + float + , int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + float + , unsigned int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + float + , long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + float + , unsigned long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + float + , float + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + float + , double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + float + , long double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + double + , char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + double + , signed char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + double + , unsigned char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + double + , short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + double + , unsigned short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + double + , int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + double + , unsigned int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + double + , long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + double + , unsigned long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + double + , float + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + double + , double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + double + , long double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long double + , char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long double + , signed char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long double + , unsigned char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long double + , short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long double + , unsigned short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long double + , int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long double + , unsigned int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long double + , long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long double + , unsigned long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long double + , float + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long double + , double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long double + , long double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; +}} diff --git a/ThirdParty/boost-Subset/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp b/ThirdParty/boost-Subset/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp new file mode 100644 index 0000000000..b358b9c41f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp @@ -0,0 +1,347 @@ +// +//! Copyright (c) 2011-2012 +//! Brandon Kohn +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +namespace boost { namespace numeric { + + + template <> + struct numeric_cast_traits + < + char + , boost::long_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + char + , boost::ulong_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + signed char + , boost::long_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + signed char + , boost::ulong_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned char + , boost::long_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned char + , boost::ulong_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + short + , boost::long_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + short + , boost::ulong_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned short + , boost::long_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned short + , boost::ulong_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + int + , boost::long_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + int + , boost::ulong_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned int + , boost::long_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned int + , boost::ulong_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long + , boost::long_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long + , boost::ulong_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned long + , boost::long_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned long + , boost::ulong_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + float + , boost::long_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + float + , boost::ulong_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + double + , boost::long_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + double + , boost::ulong_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long double + , boost::long_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long double + , boost::ulong_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + boost::long_long_type + , boost::long_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + boost::long_long_type + , boost::ulong_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + boost::ulong_long_type + , boost::long_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + boost::ulong_long_type + , boost::ulong_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; +}} diff --git a/ThirdParty/boost-Subset/boost/numeric/conversion/detail/sign_mixture.hpp b/ThirdParty/boost-Subset/boost/numeric/conversion/detail/sign_mixture.hpp new file mode 100644 index 0000000000..c7f9e42afe --- /dev/null +++ b/ThirdParty/boost-Subset/boost/numeric/conversion/detail/sign_mixture.hpp @@ -0,0 +1,72 @@ +// (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/numeric/conversion +// +// Contact the author at: fernando_cacciola@hotmail.com +// +#ifndef BOOST_NUMERIC_CONVERSION_DETAIL_SIGN_MIXTURE_FLC_12NOV2002_HPP +#define BOOST_NUMERIC_CONVERSION_DETAIL_SIGN_MIXTURE_FLC_12NOV2002_HPP + +#include "boost/config.hpp" +#include "boost/limits.hpp" + +#include "boost/numeric/conversion/sign_mixture_enum.hpp" +#include "boost/numeric/conversion/detail/meta.hpp" + +#include "boost/mpl/integral_c.hpp" + +namespace boost { namespace numeric { namespace convdetail +{ + // Integral Constants for 'SignMixture' + typedef mpl::integral_c unsig2unsig_c ; + typedef mpl::integral_c sig2sig_c ; + typedef mpl::integral_c sig2unsig_c ; + typedef mpl::integral_c unsig2sig_c ; + + // Metafunction: + // + // get_sign_mixture::type + // + // Selects the appropriate SignMixture Integral Constant for the combination T,S. + // + template + struct get_sign_mixture + { + typedef mpl::bool_< ::std::numeric_limits::is_signed > S_signed ; + typedef mpl::bool_< ::std::numeric_limits::is_signed > T_signed ; + + typedef typename + for_both::type + type ; + } ; + + // Metafunction: + // + // for_sign_mixture::type + // + // {SignMixture} is one of the Integral Constants for SignMixture, declared above. + // {Sig2Sig,Sig2Unsig,Unsig2Sig,Unsig2Unsig} are aribtrary types. (not metafunctions) + // + // According to the value of 'SignMixture', selects the corresponding type. + // + template + struct for_sign_mixture + { + typedef typename + ct_switch4::type + type ; + } ; + +} } } // namespace boost::numeric::convdetail + +#endif +// +/////////////////////////////////////////////////////////////////////////////////////////////// + + diff --git a/ThirdParty/boost-Subset/boost/numeric/conversion/detail/udt_builtin_mixture.hpp b/ThirdParty/boost-Subset/boost/numeric/conversion/detail/udt_builtin_mixture.hpp new file mode 100644 index 0000000000..36dbc491b5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/numeric/conversion/detail/udt_builtin_mixture.hpp @@ -0,0 +1,69 @@ +// (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/numeric/conversion +// +// Contact the author at: fernando_cacciola@hotmail.com +// +#ifndef BOOST_NUMERIC_CONVERSION_DETAIL_UDT_BUILTIN_MIXTURE_FLC_12NOV2002_HPP +#define BOOST_NUMERIC_CONVERSION_DETAIL_UDT_BUILTIN_MIXTURE_FLC_12NOV2002_HPP + +#include "boost/type_traits/is_arithmetic.hpp" + +#include "boost/numeric/conversion/udt_builtin_mixture_enum.hpp" +#include "boost/numeric/conversion/detail/meta.hpp" + +#include "boost/mpl/integral_c.hpp" + +namespace boost { namespace numeric { namespace convdetail +{ + // Integral Constants for 'UdtMixture' + typedef mpl::integral_c builtin2builtin_c ; + typedef mpl::integral_c builtin2udt_c ; + typedef mpl::integral_c udt2builtin_c ; + typedef mpl::integral_c udt2udt_c ; + + // Metafunction: + // + // for_udt_mixture::type + // + // {UdtMixture} is one of the Integral Constants for UdMixture, declared above. + // {BuiltIn2BuiltIn,BuiltIn2Udt,Udt2BuiltIn,Udt2Udt} are aribtrary types. (not metafunctions) + // + // According to the value of 'UdtMixture', selects the corresponding type. + // + template + struct for_udt_builtin_mixture + { + typedef typename + ct_switch4::type + type ; + } ; + + // Metafunction: + // + // get_udt_mixture::type + // + // Selects the appropriate UdtMixture Integral Constant for the combination T,S. + // + template + struct get_udt_builtin_mixture + { + typedef is_arithmetic S_builtin ; + typedef is_arithmetic T_builtin ; + + typedef typename + for_both::type + type ; + } ; + +} } } // namespace boost::numeric::convdetail + +#endif + + diff --git a/ThirdParty/boost-Subset/boost/numeric/conversion/int_float_mixture_enum.hpp b/ThirdParty/boost-Subset/boost/numeric/conversion/int_float_mixture_enum.hpp new file mode 100644 index 0000000000..d0c2daacfc --- /dev/null +++ b/ThirdParty/boost-Subset/boost/numeric/conversion/int_float_mixture_enum.hpp @@ -0,0 +1,29 @@ +// (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/numeric/conversion +// +// Contact the author at: fernando_cacciola@hotmail.com +// +#ifndef BOOST_NUMERIC_CONVERSION_INT_FLOAT_MIXTURE_ENUM_FLC_12NOV2002_HPP +#define BOOST_NUMERIC_CONVERSION_INT_FLOAT_MIXTURE_ENUM_FLC_12NOV2002_HPP + +namespace boost { namespace numeric +{ + enum int_float_mixture_enum + { + integral_to_integral + ,integral_to_float + ,float_to_integral + ,float_to_float + } ; + +} } // namespace boost::numeric + +#endif +// +/////////////////////////////////////////////////////////////////////////////////////////////// + + diff --git a/ThirdParty/boost-Subset/boost/numeric/conversion/numeric_cast_traits.hpp b/ThirdParty/boost-Subset/boost/numeric/conversion/numeric_cast_traits.hpp new file mode 100644 index 0000000000..e24296bc7e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/numeric/conversion/numeric_cast_traits.hpp @@ -0,0 +1,31 @@ +// +//! Copyright (c) 2011 +//! Brandon Kohn +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef BOOST_NUMERIC_CAST_TRAITS_HPP +#define BOOST_NUMERIC_CAST_TRAITS_HPP + +#include + +namespace boost { namespace numeric { + + template + struct numeric_cast_traits + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + +}}//namespace boost::numeric; + +#if !defined( BOOST_NUMERIC_CONVERSION_RELAX_BUILT_IN_CAST_TRAITS ) +#include +#include +#endif//!defined BOOST_NUMERIC_CONVERSION_RELAX_BUILT_IN_CAST_TRAITS + +#endif//BOOST_NUMERIC_CAST_TRAITS_HPP diff --git a/ThirdParty/boost-Subset/boost/numeric/conversion/sign_mixture_enum.hpp b/ThirdParty/boost-Subset/boost/numeric/conversion/sign_mixture_enum.hpp new file mode 100644 index 0000000000..1525f8d33c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/numeric/conversion/sign_mixture_enum.hpp @@ -0,0 +1,29 @@ +// (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/numeric/conversion +// +// Contact the author at: fernando_cacciola@hotmail.com +// +#ifndef BOOST_NUMERIC_CONVERSION_SIGN_MIXTURE_ENUM_FLC_12NOV2002_HPP +#define BOOST_NUMERIC_CONVERSION_SIGN_MIXTURE_ENUM_FLC_12NOV2002_HPP + +namespace boost { namespace numeric +{ + enum sign_mixture_enum + { + unsigned_to_unsigned + ,signed_to_signed + ,signed_to_unsigned + ,unsigned_to_signed + } ; + +} } // namespace boost::numeric + +#endif +// +/////////////////////////////////////////////////////////////////////////////////////////////// + + diff --git a/ThirdParty/boost-Subset/boost/numeric/conversion/udt_builtin_mixture_enum.hpp b/ThirdParty/boost-Subset/boost/numeric/conversion/udt_builtin_mixture_enum.hpp new file mode 100644 index 0000000000..2540e80630 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/numeric/conversion/udt_builtin_mixture_enum.hpp @@ -0,0 +1,26 @@ +// (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/numeric/conversion +// +// Contact the author at: fernando_cacciola@hotmail.com +// +#ifndef BOOST_NUMERIC_CONVERSION_UDT_BUILTIN_MIXTURE_ENUM_FLC_12NOV2002_HPP +#define BOOST_NUMERIC_CONVERSION_UDT_BUILTIN_MIXTURE_ENUM_FLC_12NOV2002_HPP + +namespace boost { namespace numeric +{ + enum udt_builtin_mixture_enum + { + builtin_to_builtin + ,builtin_to_udt + ,udt_to_builtin + ,udt_to_udt + } ; + +} } // namespace boost::numeric + +#endif + diff --git a/ThirdParty/boost-Subset/boost/operators.hpp b/ThirdParty/boost-Subset/boost/operators.hpp new file mode 100644 index 0000000000..82c374ebb5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/operators.hpp @@ -0,0 +1,948 @@ +// Boost operators.hpp header file ----------------------------------------// + +// (C) Copyright David Abrahams, Jeremy Siek, Daryle Walker 1999-2001. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/utility/operators.htm for documentation. + +// Revision History +// 16 Dec 10 Limit warning suppression for 4284 to older versions of VC++ +// (Matthew Bradbury, fixes #4432) +// 07 Aug 08 Added "euclidean" spelling. (Daniel Frey) +// 03 Apr 08 Make sure "convertible to bool" is sufficient +// for T::operator<, etc. (Daniel Frey) +// 24 May 07 Changed empty_base to depend on T, see +// http://svn.boost.org/trac/boost/ticket/979 +// 21 Oct 02 Modified implementation of operators to allow compilers with a +// correct named return value optimization (NRVO) to produce optimal +// code. (Daniel Frey) +// 02 Dec 01 Bug fixed in random_access_iteratable. (Helmut Zeisel) +// 28 Sep 01 Factored out iterator operator groups. (Daryle Walker) +// 27 Aug 01 'left' form for non commutative operators added; +// additional classes for groups of related operators added; +// workaround for empty base class optimization +// bug of GCC 3.0 (Helmut Zeisel) +// 25 Jun 01 output_iterator_helper changes: removed default template +// parameters, added support for self-proxying, additional +// documentation and tests (Aleksey Gurtovoy) +// 29 May 01 Added operator classes for << and >>. Added input and output +// iterator helper classes. Added classes to connect equality and +// relational operators. Added classes for groups of related +// operators. Reimplemented example operator and iterator helper +// classes in terms of the new groups. (Daryle Walker, with help +// from Alexy Gurtovoy) +// 11 Feb 01 Fixed bugs in the iterator helpers which prevented explicitly +// supplied arguments from actually being used (Dave Abrahams) +// 04 Jul 00 Fixed NO_OPERATORS_IN_NAMESPACE bugs, major cleanup and +// refactoring of compiler workarounds, additional documentation +// (Alexy Gurtovoy and Mark Rodgers with some help and prompting from +// Dave Abrahams) +// 28 Jun 00 General cleanup and integration of bugfixes from Mark Rodgers and +// Jeremy Siek (Dave Abrahams) +// 20 Jun 00 Changes to accommodate Borland C++Builder 4 and Borland C++ 5.5 +// (Mark Rodgers) +// 20 Jun 00 Minor fixes to the prior revision (Aleksey Gurtovoy) +// 10 Jun 00 Support for the base class chaining technique was added +// (Aleksey Gurtovoy). See documentation and the comments below +// for the details. +// 12 Dec 99 Initial version with iterator operators (Jeremy Siek) +// 18 Nov 99 Change name "divideable" to "dividable", remove unnecessary +// specializations of dividable, subtractable, modable (Ed Brey) +// 17 Nov 99 Add comments (Beman Dawes) +// Remove unnecessary specialization of operators<> (Ed Brey) +// 15 Nov 99 Fix less_than_comparable second operand type for first two +// operators.(Beman Dawes) +// 12 Nov 99 Add operators templates (Ed Brey) +// 11 Nov 99 Add single template parameter version for compilers without +// partial specialization (Beman Dawes) +// 10 Nov 99 Initial version + +// 10 Jun 00: +// An additional optional template parameter was added to most of +// operator templates to support the base class chaining technique (see +// documentation for the details). Unfortunately, a straightforward +// implementation of this change would have broken compatibility with the +// previous version of the library by making it impossible to use the same +// template name (e.g. 'addable') for both the 1- and 2-argument versions of +// an operator template. This implementation solves the backward-compatibility +// issue at the cost of some simplicity. +// +// One of the complications is an existence of special auxiliary class template +// 'is_chained_base<>' (see 'detail' namespace below), which is used +// to determine whether its template parameter is a library's operator template +// or not. You have to specialize 'is_chained_base<>' for each new +// operator template you add to the library. +// +// However, most of the non-trivial implementation details are hidden behind +// several local macros defined below, and as soon as you understand them, +// you understand the whole library implementation. + +#ifndef BOOST_OPERATORS_HPP +#define BOOST_OPERATORS_HPP + +#include +#include +#include + +#if defined(__sgi) && !defined(__GNUC__) +# pragma set woff 1234 +#endif + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1600) +# pragma warning( disable : 4284 ) // complaint about return type of +#endif // operator-> not begin a UDT + +namespace boost { +namespace detail { + +template class empty_base {}; + +} // namespace detail +} // namespace boost + +// In this section we supply the xxxx1 and xxxx2 forms of the operator +// templates, which are explicitly targeted at the 1-type-argument and +// 2-type-argument operator forms, respectively. Some compilers get confused +// when inline friend functions are overloaded in namespaces other than the +// global namespace. When BOOST_NO_OPERATORS_IN_NAMESPACE is defined, all of +// these templates must go in the global namespace. + +#ifndef BOOST_NO_OPERATORS_IN_NAMESPACE +namespace boost +{ +#endif + +// Basic operator classes (contributed by Dave Abrahams) ------------------// + +// Note that friend functions defined in a class are implicitly inline. +// See the C++ std, 11.4 [class.friend] paragraph 5 + +template > +struct less_than_comparable2 : B +{ + friend bool operator<=(const T& x, const U& y) { return !static_cast(x > y); } + friend bool operator>=(const T& x, const U& y) { return !static_cast(x < y); } + friend bool operator>(const U& x, const T& y) { return y < x; } + friend bool operator<(const U& x, const T& y) { return y > x; } + friend bool operator<=(const U& x, const T& y) { return !static_cast(y < x); } + friend bool operator>=(const U& x, const T& y) { return !static_cast(y > x); } +}; + +template > +struct less_than_comparable1 : B +{ + friend bool operator>(const T& x, const T& y) { return y < x; } + friend bool operator<=(const T& x, const T& y) { return !static_cast(y < x); } + friend bool operator>=(const T& x, const T& y) { return !static_cast(x < y); } +}; + +template > +struct equality_comparable2 : B +{ + friend bool operator==(const U& y, const T& x) { return x == y; } + friend bool operator!=(const U& y, const T& x) { return !static_cast(x == y); } + friend bool operator!=(const T& y, const U& x) { return !static_cast(y == x); } +}; + +template > +struct equality_comparable1 : B +{ + friend bool operator!=(const T& x, const T& y) { return !static_cast(x == y); } +}; + +// A macro which produces "name_2left" from "name". +#define BOOST_OPERATOR2_LEFT(name) name##2##_##left + +// NRVO-friendly implementation (contributed by Daniel Frey) ---------------// + +#if defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) + +// This is the optimal implementation for ISO/ANSI C++, +// but it requires the compiler to implement the NRVO. +// If the compiler has no NRVO, this is the best symmetric +// implementation available. + +#define BOOST_BINARY_OPERATOR_COMMUTATIVE( NAME, OP ) \ +template > \ +struct NAME##2 : B \ +{ \ + friend T operator OP( const T& lhs, const U& rhs ) \ + { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ + friend T operator OP( const U& lhs, const T& rhs ) \ + { T nrv( rhs ); nrv OP##= lhs; return nrv; } \ +}; \ + \ +template > \ +struct NAME##1 : B \ +{ \ + friend T operator OP( const T& lhs, const T& rhs ) \ + { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ +}; + +#define BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( NAME, OP ) \ +template > \ +struct NAME##2 : B \ +{ \ + friend T operator OP( const T& lhs, const U& rhs ) \ + { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ +}; \ + \ +template > \ +struct BOOST_OPERATOR2_LEFT(NAME) : B \ +{ \ + friend T operator OP( const U& lhs, const T& rhs ) \ + { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ +}; \ + \ +template > \ +struct NAME##1 : B \ +{ \ + friend T operator OP( const T& lhs, const T& rhs ) \ + { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ +}; + +#else // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) + +// For compilers without NRVO the following code is optimal, but not +// symmetric! Note that the implementation of +// BOOST_OPERATOR2_LEFT(NAME) only looks cool, but doesn't provide +// optimization opportunities to the compiler :) + +#define BOOST_BINARY_OPERATOR_COMMUTATIVE( NAME, OP ) \ +template > \ +struct NAME##2 : B \ +{ \ + friend T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \ + friend T operator OP( const U& lhs, T rhs ) { return rhs OP##= lhs; } \ +}; \ + \ +template > \ +struct NAME##1 : B \ +{ \ + friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \ +}; + +#define BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( NAME, OP ) \ +template > \ +struct NAME##2 : B \ +{ \ + friend T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \ +}; \ + \ +template > \ +struct BOOST_OPERATOR2_LEFT(NAME) : B \ +{ \ + friend T operator OP( const U& lhs, const T& rhs ) \ + { return T( lhs ) OP##= rhs; } \ +}; \ + \ +template > \ +struct NAME##1 : B \ +{ \ + friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \ +}; + +#endif // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) + +BOOST_BINARY_OPERATOR_COMMUTATIVE( multipliable, * ) +BOOST_BINARY_OPERATOR_COMMUTATIVE( addable, + ) +BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( subtractable, - ) +BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( dividable, / ) +BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( modable, % ) +BOOST_BINARY_OPERATOR_COMMUTATIVE( xorable, ^ ) +BOOST_BINARY_OPERATOR_COMMUTATIVE( andable, & ) +BOOST_BINARY_OPERATOR_COMMUTATIVE( orable, | ) + +#undef BOOST_BINARY_OPERATOR_COMMUTATIVE +#undef BOOST_BINARY_OPERATOR_NON_COMMUTATIVE +#undef BOOST_OPERATOR2_LEFT + +// incrementable and decrementable contributed by Jeremy Siek + +template > +struct incrementable : B +{ + friend T operator++(T& x, int) + { + incrementable_type nrv(x); + ++x; + return nrv; + } +private: // The use of this typedef works around a Borland bug + typedef T incrementable_type; +}; + +template > +struct decrementable : B +{ + friend T operator--(T& x, int) + { + decrementable_type nrv(x); + --x; + return nrv; + } +private: // The use of this typedef works around a Borland bug + typedef T decrementable_type; +}; + +// Iterator operator classes (contributed by Jeremy Siek) ------------------// + +template > +struct dereferenceable : B +{ + P operator->() const + { + return &*static_cast(*this); + } +}; + +template > +struct indexable : B +{ + R operator[](I n) const + { + return *(static_cast(*this) + n); + } +}; + +// More operator classes (contributed by Daryle Walker) --------------------// +// (NRVO-friendly implementation contributed by Daniel Frey) ---------------// + +#if defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) + +#define BOOST_BINARY_OPERATOR( NAME, OP ) \ +template > \ +struct NAME##2 : B \ +{ \ + friend T operator OP( const T& lhs, const U& rhs ) \ + { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ +}; \ + \ +template > \ +struct NAME##1 : B \ +{ \ + friend T operator OP( const T& lhs, const T& rhs ) \ + { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ +}; + +#else // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) + +#define BOOST_BINARY_OPERATOR( NAME, OP ) \ +template > \ +struct NAME##2 : B \ +{ \ + friend T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \ +}; \ + \ +template > \ +struct NAME##1 : B \ +{ \ + friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \ +}; + +#endif // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) + +BOOST_BINARY_OPERATOR( left_shiftable, << ) +BOOST_BINARY_OPERATOR( right_shiftable, >> ) + +#undef BOOST_BINARY_OPERATOR + +template > +struct equivalent2 : B +{ + friend bool operator==(const T& x, const U& y) + { + return !static_cast(x < y) && !static_cast(x > y); + } +}; + +template > +struct equivalent1 : B +{ + friend bool operator==(const T&x, const T&y) + { + return !static_cast(x < y) && !static_cast(y < x); + } +}; + +template > +struct partially_ordered2 : B +{ + friend bool operator<=(const T& x, const U& y) + { return static_cast(x < y) || static_cast(x == y); } + friend bool operator>=(const T& x, const U& y) + { return static_cast(x > y) || static_cast(x == y); } + friend bool operator>(const U& x, const T& y) + { return y < x; } + friend bool operator<(const U& x, const T& y) + { return y > x; } + friend bool operator<=(const U& x, const T& y) + { return static_cast(y > x) || static_cast(y == x); } + friend bool operator>=(const U& x, const T& y) + { return static_cast(y < x) || static_cast(y == x); } +}; + +template > +struct partially_ordered1 : B +{ + friend bool operator>(const T& x, const T& y) + { return y < x; } + friend bool operator<=(const T& x, const T& y) + { return static_cast(x < y) || static_cast(x == y); } + friend bool operator>=(const T& x, const T& y) + { return static_cast(y < x) || static_cast(x == y); } +}; + +// Combined operator classes (contributed by Daryle Walker) ----------------// + +template > +struct totally_ordered2 + : less_than_comparable2 > {}; + +template > +struct totally_ordered1 + : less_than_comparable1 > {}; + +template > +struct additive2 + : addable2 > {}; + +template > +struct additive1 + : addable1 > {}; + +template > +struct multiplicative2 + : multipliable2 > {}; + +template > +struct multiplicative1 + : multipliable1 > {}; + +template > +struct integer_multiplicative2 + : multiplicative2 > {}; + +template > +struct integer_multiplicative1 + : multiplicative1 > {}; + +template > +struct arithmetic2 + : additive2 > {}; + +template > +struct arithmetic1 + : additive1 > {}; + +template > +struct integer_arithmetic2 + : additive2 > {}; + +template > +struct integer_arithmetic1 + : additive1 > {}; + +template > +struct bitwise2 + : xorable2 > > {}; + +template > +struct bitwise1 + : xorable1 > > {}; + +template > +struct unit_steppable + : incrementable > {}; + +template > +struct shiftable2 + : left_shiftable2 > {}; + +template > +struct shiftable1 + : left_shiftable1 > {}; + +template > +struct ring_operators2 + : additive2 > > {}; + +template > +struct ring_operators1 + : additive1 > {}; + +template > +struct ordered_ring_operators2 + : ring_operators2 > {}; + +template > +struct ordered_ring_operators1 + : ring_operators1 > {}; + +template > +struct field_operators2 + : ring_operators2 > > {}; + +template > +struct field_operators1 + : ring_operators1 > {}; + +template > +struct ordered_field_operators2 + : field_operators2 > {}; + +template > +struct ordered_field_operators1 + : field_operators1 > {}; + +template > +struct euclidian_ring_operators2 + : ring_operators2 > > > > {}; + +template > +struct euclidian_ring_operators1 + : ring_operators1 > > {}; + +template > +struct ordered_euclidian_ring_operators2 + : totally_ordered2 > {}; + +template > +struct ordered_euclidian_ring_operators1 + : totally_ordered1 > {}; + +template > +struct euclidean_ring_operators2 + : ring_operators2 > > > > {}; + +template > +struct euclidean_ring_operators1 + : ring_operators1 > > {}; + +template > +struct ordered_euclidean_ring_operators2 + : totally_ordered2 > {}; + +template > +struct ordered_euclidean_ring_operators1 + : totally_ordered1 > {}; + +template > +struct input_iteratable + : equality_comparable1 > > {}; + +template > +struct output_iteratable + : incrementable {}; + +template > +struct forward_iteratable + : input_iteratable {}; + +template > +struct bidirectional_iteratable + : forward_iteratable > {}; + +// To avoid repeated derivation from equality_comparable, +// which is an indirect base class of bidirectional_iterable, +// random_access_iteratable must not be derived from totally_ordered1 +// but from less_than_comparable1 only. (Helmut Zeisel, 02-Dec-2001) +template > +struct random_access_iteratable + : bidirectional_iteratable > > > {}; + +#ifndef BOOST_NO_OPERATORS_IN_NAMESPACE +} // namespace boost +#endif // BOOST_NO_OPERATORS_IN_NAMESPACE + + +// BOOST_IMPORT_TEMPLATE1 .. BOOST_IMPORT_TEMPLATE4 - +// +// When BOOST_NO_OPERATORS_IN_NAMESPACE is defined we need a way to import an +// operator template into the boost namespace. BOOST_IMPORT_TEMPLATE1 is used +// for one-argument forms of operator templates; BOOST_IMPORT_TEMPLATE2 for +// two-argument forms. Note that these macros expect to be invoked from within +// boost. + +#ifndef BOOST_NO_OPERATORS_IN_NAMESPACE + + // The template is already in boost so we have nothing to do. +# define BOOST_IMPORT_TEMPLATE4(template_name) +# define BOOST_IMPORT_TEMPLATE3(template_name) +# define BOOST_IMPORT_TEMPLATE2(template_name) +# define BOOST_IMPORT_TEMPLATE1(template_name) + +#else // BOOST_NO_OPERATORS_IN_NAMESPACE + +# ifndef BOOST_NO_USING_TEMPLATE + + // Bring the names in with a using-declaration + // to avoid stressing the compiler. +# define BOOST_IMPORT_TEMPLATE4(template_name) using ::template_name; +# define BOOST_IMPORT_TEMPLATE3(template_name) using ::template_name; +# define BOOST_IMPORT_TEMPLATE2(template_name) using ::template_name; +# define BOOST_IMPORT_TEMPLATE1(template_name) using ::template_name; + +# else + + // Otherwise, because a Borland C++ 5.5 bug prevents a using declaration + // from working, we are forced to use inheritance for that compiler. +# define BOOST_IMPORT_TEMPLATE4(template_name) \ + template > \ + struct template_name : ::template_name {}; + +# define BOOST_IMPORT_TEMPLATE3(template_name) \ + template > \ + struct template_name : ::template_name {}; + +# define BOOST_IMPORT_TEMPLATE2(template_name) \ + template > \ + struct template_name : ::template_name {}; + +# define BOOST_IMPORT_TEMPLATE1(template_name) \ + template > \ + struct template_name : ::template_name {}; + +# endif // BOOST_NO_USING_TEMPLATE + +#endif // BOOST_NO_OPERATORS_IN_NAMESPACE + +// +// Here's where we put it all together, defining the xxxx forms of the templates +// in namespace boost. We also define specializations of is_chained_base<> for +// the xxxx, xxxx1, and xxxx2 templates, importing them into boost:: as +// necessary. +// + +// is_chained_base<> - a traits class used to distinguish whether an operator +// template argument is being used for base class chaining, or is specifying a +// 2nd argument type. + +namespace boost { +// A type parameter is used instead of a plain bool because Borland's compiler +// didn't cope well with the more obvious non-type template parameter. +namespace detail { + struct true_t {}; + struct false_t {}; +} // namespace detail + +// Unspecialized version assumes that most types are not being used for base +// class chaining. We specialize for the operator templates defined in this +// library. +template struct is_chained_base { + typedef ::boost::detail::false_t value; +}; + +} // namespace boost + +// Import a 4-type-argument operator template into boost (if necessary) and +// provide a specialization of 'is_chained_base<>' for it. +# define BOOST_OPERATOR_TEMPLATE4(template_name4) \ + BOOST_IMPORT_TEMPLATE4(template_name4) \ + template \ + struct is_chained_base< ::boost::template_name4 > { \ + typedef ::boost::detail::true_t value; \ + }; + +// Import a 3-type-argument operator template into boost (if necessary) and +// provide a specialization of 'is_chained_base<>' for it. +# define BOOST_OPERATOR_TEMPLATE3(template_name3) \ + BOOST_IMPORT_TEMPLATE3(template_name3) \ + template \ + struct is_chained_base< ::boost::template_name3 > { \ + typedef ::boost::detail::true_t value; \ + }; + +// Import a 2-type-argument operator template into boost (if necessary) and +// provide a specialization of 'is_chained_base<>' for it. +# define BOOST_OPERATOR_TEMPLATE2(template_name2) \ + BOOST_IMPORT_TEMPLATE2(template_name2) \ + template \ + struct is_chained_base< ::boost::template_name2 > { \ + typedef ::boost::detail::true_t value; \ + }; + +// Import a 1-type-argument operator template into boost (if necessary) and +// provide a specialization of 'is_chained_base<>' for it. +# define BOOST_OPERATOR_TEMPLATE1(template_name1) \ + BOOST_IMPORT_TEMPLATE1(template_name1) \ + template \ + struct is_chained_base< ::boost::template_name1 > { \ + typedef ::boost::detail::true_t value; \ + }; + +// BOOST_OPERATOR_TEMPLATE(template_name) defines template_name<> such that it +// can be used for specifying both 1-argument and 2-argument forms. Requires the +// existence of two previously defined class templates named '1' +// and '2' which must implement the corresponding 1- and 2- +// argument forms. +// +// The template type parameter O == is_chained_base::value is used to +// distinguish whether the 2nd argument to is being used for +// base class chaining from another boost operator template or is describing a +// 2nd operand type. O == true_t only when U is actually an another operator +// template from the library. Partial specialization is used to select an +// implementation in terms of either '1' or '2'. +// + +# define BOOST_OPERATOR_TEMPLATE(template_name) \ +template \ + ,class O = typename is_chained_base::value \ + > \ +struct template_name : template_name##2 {}; \ + \ +template \ +struct template_name \ + : template_name##1 {}; \ + \ +template \ +struct template_name \ + : template_name##1 {}; \ + \ +template \ +struct is_chained_base< ::boost::template_name > { \ + typedef ::boost::detail::true_t value; \ +}; \ + \ +BOOST_OPERATOR_TEMPLATE2(template_name##2) \ +BOOST_OPERATOR_TEMPLATE1(template_name##1) + + + +namespace boost { + +BOOST_OPERATOR_TEMPLATE(less_than_comparable) +BOOST_OPERATOR_TEMPLATE(equality_comparable) +BOOST_OPERATOR_TEMPLATE(multipliable) +BOOST_OPERATOR_TEMPLATE(addable) +BOOST_OPERATOR_TEMPLATE(subtractable) +BOOST_OPERATOR_TEMPLATE2(subtractable2_left) +BOOST_OPERATOR_TEMPLATE(dividable) +BOOST_OPERATOR_TEMPLATE2(dividable2_left) +BOOST_OPERATOR_TEMPLATE(modable) +BOOST_OPERATOR_TEMPLATE2(modable2_left) +BOOST_OPERATOR_TEMPLATE(xorable) +BOOST_OPERATOR_TEMPLATE(andable) +BOOST_OPERATOR_TEMPLATE(orable) + +BOOST_OPERATOR_TEMPLATE1(incrementable) +BOOST_OPERATOR_TEMPLATE1(decrementable) + +BOOST_OPERATOR_TEMPLATE2(dereferenceable) +BOOST_OPERATOR_TEMPLATE3(indexable) + +BOOST_OPERATOR_TEMPLATE(left_shiftable) +BOOST_OPERATOR_TEMPLATE(right_shiftable) +BOOST_OPERATOR_TEMPLATE(equivalent) +BOOST_OPERATOR_TEMPLATE(partially_ordered) + +BOOST_OPERATOR_TEMPLATE(totally_ordered) +BOOST_OPERATOR_TEMPLATE(additive) +BOOST_OPERATOR_TEMPLATE(multiplicative) +BOOST_OPERATOR_TEMPLATE(integer_multiplicative) +BOOST_OPERATOR_TEMPLATE(arithmetic) +BOOST_OPERATOR_TEMPLATE(integer_arithmetic) +BOOST_OPERATOR_TEMPLATE(bitwise) +BOOST_OPERATOR_TEMPLATE1(unit_steppable) +BOOST_OPERATOR_TEMPLATE(shiftable) +BOOST_OPERATOR_TEMPLATE(ring_operators) +BOOST_OPERATOR_TEMPLATE(ordered_ring_operators) +BOOST_OPERATOR_TEMPLATE(field_operators) +BOOST_OPERATOR_TEMPLATE(ordered_field_operators) +BOOST_OPERATOR_TEMPLATE(euclidian_ring_operators) +BOOST_OPERATOR_TEMPLATE(ordered_euclidian_ring_operators) +BOOST_OPERATOR_TEMPLATE(euclidean_ring_operators) +BOOST_OPERATOR_TEMPLATE(ordered_euclidean_ring_operators) +BOOST_OPERATOR_TEMPLATE2(input_iteratable) +BOOST_OPERATOR_TEMPLATE1(output_iteratable) +BOOST_OPERATOR_TEMPLATE2(forward_iteratable) +BOOST_OPERATOR_TEMPLATE2(bidirectional_iteratable) +BOOST_OPERATOR_TEMPLATE4(random_access_iteratable) + +#undef BOOST_OPERATOR_TEMPLATE +#undef BOOST_OPERATOR_TEMPLATE4 +#undef BOOST_OPERATOR_TEMPLATE3 +#undef BOOST_OPERATOR_TEMPLATE2 +#undef BOOST_OPERATOR_TEMPLATE1 +#undef BOOST_IMPORT_TEMPLATE1 +#undef BOOST_IMPORT_TEMPLATE2 +#undef BOOST_IMPORT_TEMPLATE3 +#undef BOOST_IMPORT_TEMPLATE4 + +// The following 'operators' classes can only be used portably if the derived class +// declares ALL of the required member operators. +template +struct operators2 + : totally_ordered2 > > {}; + +template +struct operators : operators2 {}; + +template struct operators + : totally_ordered > > > {}; + +// Iterator helper classes (contributed by Jeremy Siek) -------------------// +// (Input and output iterator helpers contributed by Daryle Walker) -------// +// (Changed to use combined operator classes by Daryle Walker) ------------// +template +struct input_iterator_helper + : input_iteratable > {}; + +template +struct output_iterator_helper + : output_iteratable > +{ + T& operator*() { return static_cast(*this); } + T& operator++() { return static_cast(*this); } +}; + +template +struct forward_iterator_helper + : forward_iteratable > {}; + +template +struct bidirectional_iterator_helper + : bidirectional_iteratable > {}; + +template +struct random_access_iterator_helper + : random_access_iteratable > +{ + friend D requires_difference_operator(const T& x, const T& y) { + return x - y; + } +}; // random_access_iterator_helper + +} // namespace boost + +#if defined(__sgi) && !defined(__GNUC__) +#pragma reset woff 1234 +#endif + +#endif // BOOST_OPERATORS_HPP diff --git a/ThirdParty/boost-Subset/boost/optional.hpp b/ThirdParty/boost-Subset/boost/optional.hpp new file mode 100644 index 0000000000..40cf12e656 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/optional.hpp @@ -0,0 +1,18 @@ +// Copyright (C) 2003, Fernando Luis Cacciola Carballal. +// +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/optional for documentation. +// +// You are welcome to contact the author at: +// fernando_cacciola@hotmail.com +// +#ifndef BOOST_OPTIONAL_FLC_19NOV2002_HPP +#define BOOST_OPTIONAL_FLC_19NOV2002_HPP + +#include "boost/optional/optional.hpp" + +#endif + diff --git a/ThirdParty/boost-Subset/boost/optional/bad_optional_access.hpp b/ThirdParty/boost-Subset/boost/optional/bad_optional_access.hpp new file mode 100644 index 0000000000..cabf43fbac --- /dev/null +++ b/ThirdParty/boost-Subset/boost/optional/bad_optional_access.hpp @@ -0,0 +1,32 @@ +// Copyright (C) 2014, Andrzej Krzemienski. +// +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/optional for documentation. +// +// You are welcome to contact the author at: +// akrzemi1@gmail.com +// +#ifndef BOOST_BAD_OPTIONAL_ACCESS_22MAY2014_HPP +#define BOOST_BAD_OPTIONAL_ACCESS_22MAY2014_HPP + +#include +#if __cplusplus < 201103L +#include // to make converting-ctor std::string(char const*) visible +#endif + +namespace boost { + +class bad_optional_access : public std::logic_error +{ +public: + bad_optional_access() + : std::logic_error("Attempted to access the value of an uninitialized optional object.") + {} +}; + +} // namespace boost + +#endif diff --git a/ThirdParty/boost-Subset/boost/optional/optional.hpp b/ThirdParty/boost-Subset/boost/optional/optional.hpp new file mode 100644 index 0000000000..9def94ede8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/optional/optional.hpp @@ -0,0 +1,1567 @@ +// Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal. +// Copyright (C) 2014, 2015 Andrzej Krzemienski. +// +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/optional for documentation. +// +// You are welcome to contact the author at: +// fernando_cacciola@hotmail.com +// +// Revisions: +// 27 Apr 2008 (improved swap) Fernando Cacciola, Niels Dekker, Thorsten Ottosen +// 05 May 2014 (Added move semantics) Andrzej Krzemienski +// +#ifndef BOOST_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP +#define BOOST_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#if (defined BOOST_NO_CXX11_RVALUE_REFERENCES) || (defined BOOST_OPTIONAL_CONFIG_NO_RVALUE_REFERENCES) +#define BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES +#endif + +#if BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION,<=700) +// AFAICT only Intel 7 correctly resolves the overload set +// that includes the in-place factory taking functions, +// so for the other icc versions, in-place factory support +// is disabled +#define BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT +#endif + +#if BOOST_WORKAROUND(__BORLANDC__, <= 0x551) +// BCB (5.5.1) cannot parse the nested template struct in an inplace factory. +#define BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT +#endif + +#if !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) \ + && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581) ) +// BCB (up to 5.64) has the following bug: +// If there is a member function/operator template of the form +// template mfunc( Expr expr ) ; +// some calls are resolved to this even if there are other better matches. +// The effect of this bug is that calls to converting ctors and assignments +// are incrorrectly sink to this general catch-all member function template as shown above. +#define BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION +#endif + +#if defined(__GNUC__) && !defined(__INTEL_COMPILER) +// GCC since 3.3 has may_alias attribute that helps to alleviate optimizer issues with +// regard to violation of the strict aliasing rules. The optional< T > storage type is marked +// with this attribute in order to let the compiler know that it will alias objects of type T +// and silence compilation warnings. +#define BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS +#endif + +// Daniel Wallin discovered that bind/apply.hpp badly interacts with the apply<> +// member template of a factory as used in the optional<> implementation. +// He proposed this simple fix which is to move the call to apply<> outside +// namespace boost. +namespace boost_optional_detail +{ + template + inline void construct(Factory const& factory, void* address) + { + factory.BOOST_NESTED_TEMPLATE apply(address); + } +} + + +namespace boost { + +class in_place_factory_base ; +class typed_in_place_factory_base ; + +// This forward is needed to refer to namespace scope swap from the member swap +template void swap ( optional& x, optional& y ); + +namespace optional_detail { +// This local class is used instead of that in "aligned_storage.hpp" +// because I've found the 'official' class to ICE BCB5.5 +// when some types are used with optional<> +// (due to sizeof() passed down as a non-type template parameter) +template +class aligned_storage +{ + // Borland ICEs if unnamed unions are used for this! + union + // This works around GCC warnings about breaking strict aliasing rules when casting storage address to T* +#if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS) + __attribute__((__may_alias__)) +#endif + dummy_u + { + char data[ sizeof(T) ]; + BOOST_DEDUCED_TYPENAME type_with_alignment< + ::boost::alignment_of::value >::type aligner_; + } dummy_ ; + + public: + +#if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS) + void const* address() const { return &dummy_; } + void * address() { return &dummy_; } +#else + void const* address() const { return dummy_.data; } + void * address() { return dummy_.data; } +#endif +} ; + +template +struct types_when_isnt_ref +{ + typedef T const& reference_const_type ; + typedef T & reference_type ; +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + typedef T && rval_reference_type ; + typedef T && reference_type_of_temporary_wrapper; +#ifdef BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES + // GCC 4.4 has support for an early draft of rvalue references. The conforming version below + // causes warnings about returning references to a temporary. + static T&& move(T&& r) { return r; } +#else + static rval_reference_type move(reference_type r) { return boost::move(r); } +#endif +#endif + typedef T const* pointer_const_type ; + typedef T * pointer_type ; + typedef T const& argument_type ; +} ; + +template +struct types_when_is_ref +{ + typedef BOOST_DEDUCED_TYPENAME remove_reference::type raw_type ; + + typedef raw_type& reference_const_type ; + typedef raw_type& reference_type ; +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + typedef BOOST_DEDUCED_TYPENAME remove_const::type&& rval_reference_type ; + typedef raw_type& reference_type_of_temporary_wrapper; + static reference_type move(reference_type r) { return r; } +#endif + typedef raw_type* pointer_const_type ; + typedef raw_type* pointer_type ; + typedef raw_type& argument_type ; +} ; + +template +void prevent_binding_rvalue_ref_to_optional_lvalue_ref() +{ +#ifndef BOOST_OPTIONAL_CONFIG_ALLOW_BINDING_TO_RVALUES + BOOST_STATIC_ASSERT_MSG( + !boost::is_lvalue_reference::value || !boost::is_rvalue_reference::value, + "binding rvalue references to optional lvalue references is disallowed"); +#endif +} + +struct optional_tag {} ; + +template +class optional_base : public optional_tag +{ + private : + + typedef +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) + BOOST_DEDUCED_TYPENAME +#endif + ::boost::detail::make_reference_content::type internal_type ; + + typedef aligned_storage storage_type ; + + typedef types_when_isnt_ref types_when_not_ref ; + typedef types_when_is_ref types_when_ref ; + + typedef optional_base this_type ; + + protected : + + typedef T value_type ; + + typedef mpl::true_ is_reference_tag ; + typedef mpl::false_ is_not_reference_tag ; + + typedef BOOST_DEDUCED_TYPENAME is_reference::type is_reference_predicate ; + + public: + typedef BOOST_DEDUCED_TYPENAME mpl::if_::type types ; + + protected: + typedef BOOST_DEDUCED_TYPENAME types::reference_type reference_type ; + typedef BOOST_DEDUCED_TYPENAME types::reference_const_type reference_const_type ; +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + typedef BOOST_DEDUCED_TYPENAME types::rval_reference_type rval_reference_type ; + typedef BOOST_DEDUCED_TYPENAME types::reference_type_of_temporary_wrapper reference_type_of_temporary_wrapper ; +#endif + typedef BOOST_DEDUCED_TYPENAME types::pointer_type pointer_type ; + typedef BOOST_DEDUCED_TYPENAME types::pointer_const_type pointer_const_type ; + typedef BOOST_DEDUCED_TYPENAME types::argument_type argument_type ; + + // Creates an optional uninitialized. + // No-throw + optional_base() + : + m_initialized(false) {} + + // Creates an optional uninitialized. + // No-throw + optional_base ( none_t ) + : + m_initialized(false) {} + + // Creates an optional initialized with 'val'. + // Can throw if T::T(T const&) does + optional_base ( argument_type val ) + : + m_initialized(false) + { + construct(val); + } + +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + // move-construct an optional initialized from an rvalue-ref to 'val'. + // Can throw if T::T(T&&) does + optional_base ( rval_reference_type val ) + : + m_initialized(false) + { + construct( boost::move(val) ); + } +#endif + + // Creates an optional initialized with 'val' IFF cond is true, otherwise creates an uninitialzed optional. + // Can throw if T::T(T const&) does + optional_base ( bool cond, argument_type val ) + : + m_initialized(false) + { + if ( cond ) + construct(val); + } + + // Creates a deep copy of another optional + // Can throw if T::T(T const&) does + optional_base ( optional_base const& rhs ) + : + m_initialized(false) + { + if ( rhs.is_initialized() ) + construct(rhs.get_impl()); + } + +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + // Creates a deep move of another optional + // Can throw if T::T(T&&) does + optional_base ( optional_base&& rhs ) + : + m_initialized(false) + { + if ( rhs.is_initialized() ) + construct( boost::move(rhs.get_impl()) ); + } +#endif + +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + + template + explicit optional_base ( Expr&& expr, PtrExpr const* tag ) + : + m_initialized(false) + { + construct(boost::forward(expr),tag); + } + +#else + // This is used for both converting and in-place constructions. + // Derived classes use the 'tag' to select the appropriate + // implementation (the correct 'construct()' overload) + template + explicit optional_base ( Expr const& expr, Expr const* tag ) + : + m_initialized(false) + { + construct(expr,tag); + } + +#endif + + + // No-throw (assuming T::~T() doesn't) + ~optional_base() { destroy() ; } + + // Assigns from another optional (deep-copies the rhs value) + void assign ( optional_base const& rhs ) + { + if (is_initialized()) + { + if ( rhs.is_initialized() ) + assign_value(rhs.get_impl(), is_reference_predicate() ); + else destroy(); + } + else + { + if ( rhs.is_initialized() ) + construct(rhs.get_impl()); + } + } + +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + // Assigns from another optional (deep-moves the rhs value) + void assign ( optional_base&& rhs ) + { + if (is_initialized()) + { + if ( rhs.is_initialized() ) + assign_value(boost::move(rhs.get_impl()), is_reference_predicate() ); + else destroy(); + } + else + { + if ( rhs.is_initialized() ) + construct(boost::move(rhs.get_impl())); + } + } +#endif + + // Assigns from another _convertible_ optional (deep-copies the rhs value) + template + void assign ( optional const& rhs ) + { + if (is_initialized()) + { + if ( rhs.is_initialized() ) +#ifndef BOOST_OPTIONAL_CONFIG_RESTORE_ASSIGNMENT_OF_NONCONVERTIBLE_TYPES + assign_value(rhs.get(), is_reference_predicate() ); +#else + assign_value(static_cast(rhs.get()), is_reference_predicate() ); +#endif + + else destroy(); + } + else + { + if ( rhs.is_initialized() ) +#ifndef BOOST_OPTIONAL_CONFIG_RESTORE_ASSIGNMENT_OF_NONCONVERTIBLE_TYPES + construct(rhs.get()); +#else + construct(static_cast(rhs.get())); +#endif + } + } + +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + // move-assigns from another _convertible_ optional (deep-moves from the rhs value) + template + void assign ( optional&& rhs ) + { + typedef BOOST_DEDUCED_TYPENAME optional::rval_reference_type ref_type; + if (is_initialized()) + { + if ( rhs.is_initialized() ) + assign_value(static_cast(rhs.get()), is_reference_predicate() ); + else destroy(); + } + else + { + if ( rhs.is_initialized() ) + construct(static_cast(rhs.get())); + } + } +#endif + + // Assigns from a T (deep-copies the rhs value) + void assign ( argument_type val ) + { + if (is_initialized()) + assign_value(val, is_reference_predicate() ); + else construct(val); + } + +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + // Assigns from a T (deep-moves the rhs value) + void assign ( rval_reference_type val ) + { + if (is_initialized()) + assign_value( boost::move(val), is_reference_predicate() ); + else construct( boost::move(val) ); + } +#endif + + // Assigns from "none", destroying the current value, if any, leaving this UNINITIALIZED + // No-throw (assuming T::~T() doesn't) + void assign ( none_t ) BOOST_NOEXCEPT { destroy(); } + +#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT + +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + template + void assign_expr ( Expr&& expr, ExprPtr const* tag ) + { + if (is_initialized()) + assign_expr_to_initialized(boost::forward(expr),tag); + else construct(boost::forward(expr),tag); + } +#else + template + void assign_expr ( Expr const& expr, Expr const* tag ) + { + if (is_initialized()) + assign_expr_to_initialized(expr,tag); + else construct(expr,tag); + } +#endif + +#endif + + public : + + // **DEPPRECATED** Destroys the current value, if any, leaving this UNINITIALIZED + // No-throw (assuming T::~T() doesn't) + void reset() BOOST_NOEXCEPT { destroy(); } + + // **DEPPRECATED** Replaces the current value -if any- with 'val' + void reset ( argument_type val ) { assign(val); } + + // Returns a pointer to the value if this is initialized, otherwise, + // returns NULL. + // No-throw + pointer_const_type get_ptr() const { return m_initialized ? get_ptr_impl() : 0 ; } + pointer_type get_ptr() { return m_initialized ? get_ptr_impl() : 0 ; } + + bool is_initialized() const { return m_initialized ; } + + protected : + + void construct ( argument_type val ) + { + ::new (m_storage.address()) internal_type(val) ; + m_initialized = true ; + } + +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + void construct ( rval_reference_type val ) + { + ::new (m_storage.address()) internal_type( types::move(val) ) ; + m_initialized = true ; + } +#endif + + +#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES) + // Constructs in-place + // upon exception *this is always uninitialized + template + void emplace_assign ( Args&&... args ) + { + destroy(); + ::new (m_storage.address()) internal_type( boost::forward(args)... ); + m_initialized = true ; + } +#elif (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) + template + void emplace_assign ( Arg&& arg ) + { + destroy(); + ::new (m_storage.address()) internal_type( boost::forward(arg) ); + m_initialized = true ; + } + + void emplace_assign () + { + destroy(); + ::new (m_storage.address()) internal_type(); + m_initialized = true ; + } +#else + template + void emplace_assign ( const Arg& arg ) + { + destroy(); + ::new (m_storage.address()) internal_type( arg ); + m_initialized = true ; + } + + template + void emplace_assign ( Arg& arg ) + { + destroy(); + ::new (m_storage.address()) internal_type( arg ); + m_initialized = true ; + } + + void emplace_assign () + { + destroy(); + ::new (m_storage.address()) internal_type(); + m_initialized = true ; + } +#endif + +#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT + +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + // Constructs in-place using the given factory + template + void construct ( Expr&& factory, in_place_factory_base const* ) + { + BOOST_STATIC_ASSERT ( ::boost::mpl::not_::value ) ; + boost_optional_detail::construct(factory, m_storage.address()); + m_initialized = true ; + } + + // Constructs in-place using the given typed factory + template + void construct ( Expr&& factory, typed_in_place_factory_base const* ) + { + BOOST_STATIC_ASSERT ( ::boost::mpl::not_::value ) ; + factory.apply(m_storage.address()) ; + m_initialized = true ; + } + + template + void assign_expr_to_initialized ( Expr&& factory, in_place_factory_base const* tag ) + { + destroy(); + construct(factory,tag); + } + + // Constructs in-place using the given typed factory + template + void assign_expr_to_initialized ( Expr&& factory, typed_in_place_factory_base const* tag ) + { + destroy(); + construct(factory,tag); + } + +#else + // Constructs in-place using the given factory + template + void construct ( Expr const& factory, in_place_factory_base const* ) + { + BOOST_STATIC_ASSERT ( ::boost::mpl::not_::value ) ; + boost_optional_detail::construct(factory, m_storage.address()); + m_initialized = true ; + } + + // Constructs in-place using the given typed factory + template + void construct ( Expr const& factory, typed_in_place_factory_base const* ) + { + BOOST_STATIC_ASSERT ( ::boost::mpl::not_::value ) ; + factory.apply(m_storage.address()) ; + m_initialized = true ; + } + + template + void assign_expr_to_initialized ( Expr const& factory, in_place_factory_base const* tag ) + { + destroy(); + construct(factory,tag); + } + + // Constructs in-place using the given typed factory + template + void assign_expr_to_initialized ( Expr const& factory, typed_in_place_factory_base const* tag ) + { + destroy(); + construct(factory,tag); + } +#endif + +#endif + +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + // Constructs using any expression implicitly convertible to the single argument + // of a one-argument T constructor. + // Converting constructions of optional from optional uses this function with + // 'Expr' being of type 'U' and relying on a converting constructor of T from U. + template + void construct ( Expr&& expr, void const* ) + { + new (m_storage.address()) internal_type(boost::forward(expr)) ; + m_initialized = true ; + } + + // Assigns using a form any expression implicitly convertible to the single argument + // of a T's assignment operator. + // Converting assignments of optional from optional uses this function with + // 'Expr' being of type 'U' and relying on a converting assignment of T from U. + template + void assign_expr_to_initialized ( Expr&& expr, void const* ) + { + assign_value(boost::forward(expr), is_reference_predicate()); + } +#else + // Constructs using any expression implicitly convertible to the single argument + // of a one-argument T constructor. + // Converting constructions of optional from optional uses this function with + // 'Expr' being of type 'U' and relying on a converting constructor of T from U. + template + void construct ( Expr const& expr, void const* ) + { + new (m_storage.address()) internal_type(expr) ; + m_initialized = true ; + } + + // Assigns using a form any expression implicitly convertible to the single argument + // of a T's assignment operator. + // Converting assignments of optional from optional uses this function with + // 'Expr' being of type 'U' and relying on a converting assignment of T from U. + template + void assign_expr_to_initialized ( Expr const& expr, void const* ) + { + assign_value(expr, is_reference_predicate()); + } + +#endif + +#ifdef BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION + // BCB5.64 (and probably lower versions) workaround. + // The in-place factories are supported by means of catch-all constructors + // and assignment operators (the functions are parameterized in terms of + // an arbitrary 'Expr' type) + // This compiler incorrectly resolves the overload set and sinks optional and optional + // to the 'Expr'-taking functions even though explicit overloads are present for them. + // Thus, the following overload is needed to properly handle the case when the 'lhs' + // is another optional. + // + // For VC<=70 compilers this workaround dosen't work becasue the comnpiler issues and error + // instead of choosing the wrong overload + // +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + // Notice that 'Expr' will be optional or optional (but not optional_base<..>) + template + void construct ( Expr&& expr, optional_tag const* ) + { + if ( expr.is_initialized() ) + { + // An exception can be thrown here. + // It it happens, THIS will be left uninitialized. + new (m_storage.address()) internal_type(types::move(expr.get())) ; + m_initialized = true ; + } + } +#else + // Notice that 'Expr' will be optional or optional (but not optional_base<..>) + template + void construct ( Expr const& expr, optional_tag const* ) + { + if ( expr.is_initialized() ) + { + // An exception can be thrown here. + // It it happens, THIS will be left uninitialized. + new (m_storage.address()) internal_type(expr.get()) ; + m_initialized = true ; + } + } +#endif +#endif // defined BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION + + void assign_value ( argument_type val, is_not_reference_tag ) { get_impl() = val; } + void assign_value ( argument_type val, is_reference_tag ) { construct(val); } +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + void assign_value ( rval_reference_type val, is_not_reference_tag ) { get_impl() = static_cast(val); } + void assign_value ( rval_reference_type val, is_reference_tag ) { construct( static_cast(val) ); } +#endif + + void destroy() + { + if ( m_initialized ) + destroy_impl(is_reference_predicate()) ; + } + + reference_const_type get_impl() const { return dereference(get_object(), is_reference_predicate() ) ; } + reference_type get_impl() { return dereference(get_object(), is_reference_predicate() ) ; } + + pointer_const_type get_ptr_impl() const { return cast_ptr(get_object(), is_reference_predicate() ) ; } + pointer_type get_ptr_impl() { return cast_ptr(get_object(), is_reference_predicate() ) ; } + + private : + + // internal_type can be either T or reference_content +#if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS) + // This workaround is supposed to silence GCC warnings about broken strict aliasing rules + internal_type const* get_object() const + { + union { void const* ap_pvoid; internal_type const* as_ptype; } caster = { m_storage.address() }; + return caster.as_ptype; + } + internal_type * get_object() + { + union { void* ap_pvoid; internal_type* as_ptype; } caster = { m_storage.address() }; + return caster.as_ptype; + } +#else + internal_type const* get_object() const { return static_cast(m_storage.address()); } + internal_type * get_object() { return static_cast (m_storage.address()); } +#endif + + // reference_content lacks an implicit conversion to T&, so the following is needed to obtain a proper reference. + reference_const_type dereference( internal_type const* p, is_not_reference_tag ) const { return *p ; } + reference_type dereference( internal_type* p, is_not_reference_tag ) { return *p ; } + reference_const_type dereference( internal_type const* p, is_reference_tag ) const { return p->get() ; } + reference_type dereference( internal_type* p, is_reference_tag ) { return p->get() ; } + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581)) + void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->internal_type::~internal_type() ; m_initialized = false ; } +#else + void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->~T() ; m_initialized = false ; } +#endif + + void destroy_impl ( is_reference_tag ) { m_initialized = false ; } + + // If T is of reference type, trying to get a pointer to the held value must result in a compile-time error. + // Decent compilers should disallow conversions from reference_content* to T*, but just in case, + // the following olverloads are used to filter out the case and guarantee an error in case of T being a reference. + pointer_const_type cast_ptr( internal_type const* p, is_not_reference_tag ) const { return p ; } + pointer_type cast_ptr( internal_type * p, is_not_reference_tag ) { return p ; } + pointer_const_type cast_ptr( internal_type const* p, is_reference_tag ) const { return &p->get() ; } + pointer_type cast_ptr( internal_type * p, is_reference_tag ) { return &p->get() ; } + + bool m_initialized ; + storage_type m_storage ; +} ; + +} // namespace optional_detail + +template +class optional : public optional_detail::optional_base +{ + typedef optional_detail::optional_base base ; + + public : + + typedef optional this_type ; + + typedef BOOST_DEDUCED_TYPENAME base::value_type value_type ; + typedef BOOST_DEDUCED_TYPENAME base::reference_type reference_type ; + typedef BOOST_DEDUCED_TYPENAME base::reference_const_type reference_const_type ; +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + typedef BOOST_DEDUCED_TYPENAME base::rval_reference_type rval_reference_type ; + typedef BOOST_DEDUCED_TYPENAME base::reference_type_of_temporary_wrapper reference_type_of_temporary_wrapper ; +#endif + typedef BOOST_DEDUCED_TYPENAME base::pointer_type pointer_type ; + typedef BOOST_DEDUCED_TYPENAME base::pointer_const_type pointer_const_type ; + typedef BOOST_DEDUCED_TYPENAME base::argument_type argument_type ; + + // Creates an optional uninitialized. + // No-throw + optional() BOOST_NOEXCEPT : base() {} + + // Creates an optional uninitialized. + // No-throw + optional( none_t none_ ) BOOST_NOEXCEPT : base(none_) {} + + // Creates an optional initialized with 'val'. + // Can throw if T::T(T const&) does + optional ( argument_type val ) : base(val) {} + +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + // Creates an optional initialized with 'move(val)'. + // Can throw if T::T(T &&) does + optional ( rval_reference_type val ) : base( boost::forward(val) ) + {optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref();} +#endif + + // Creates an optional initialized with 'val' IFF cond is true, otherwise creates an uninitialized optional. + // Can throw if T::T(T const&) does + optional ( bool cond, argument_type val ) : base(cond,val) {} + + // NOTE: MSVC needs templated versions first + + // Creates a deep copy of another convertible optional + // Requires a valid conversion from U to T. + // Can throw if T::T(U const&) does + template + explicit optional ( optional const& rhs ) + : + base() + { + if ( rhs.is_initialized() ) + this->construct(rhs.get()); + } + +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + // Creates a deep move of another convertible optional + // Requires a valid conversion from U to T. + // Can throw if T::T(U&&) does + template + explicit optional ( optional && rhs ) + : + base() + { + if ( rhs.is_initialized() ) + this->construct( boost::move(rhs.get()) ); + } +#endif + +#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT + // Creates an optional with an expression which can be either + // (a) An instance of InPlaceFactory (i.e. in_place(a,b,...,n); + // (b) An instance of TypedInPlaceFactory ( i.e. in_place(a,b,...,n); + // (c) Any expression implicitly convertible to the single type + // of a one-argument T's constructor. + // (d*) Weak compilers (BCB) might also resolved Expr as optional and optional + // even though explicit overloads are present for these. + // Depending on the above some T ctor is called. + // Can throw if the resolved T ctor throws. +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + + + template + explicit optional ( Expr&& expr, + BOOST_DEDUCED_TYPENAME boost::disable_if_c< + (boost::is_base_of::type>::value) || + boost::is_same::type, none_t>::value >::type* = 0 + ) + : base(boost::forward(expr),boost::addressof(expr)) + {optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref();} + +#else + template + explicit optional ( Expr const& expr ) : base(expr,boost::addressof(expr)) {} +#endif // !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES +#endif // !defined BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT + + // Creates a deep copy of another optional + // Can throw if T::T(T const&) does + optional ( optional const& rhs ) : base( static_cast(rhs) ) {} + +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + // Creates a deep move of another optional + // Can throw if T::T(T&&) does + optional ( optional && rhs ) + BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible::value) + : base( boost::move(rhs) ) + {} + +#endif + // No-throw (assuming T::~T() doesn't) + ~optional() {} + +#if !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) && !defined(BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION) + // Assigns from an expression. See corresponding constructor. + // Basic Guarantee: If the resolved T ctor throws, this is left UNINITIALIZED +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + + template + BOOST_DEDUCED_TYPENAME boost::disable_if_c< + boost::is_base_of::type>::value || + boost::is_same::type, none_t>::value, + optional& + >::type + operator= ( Expr&& expr ) + { + optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref(); + this->assign_expr(boost::forward(expr),boost::addressof(expr)); + return *this ; + } + +#else + template + optional& operator= ( Expr const& expr ) + { + this->assign_expr(expr,boost::addressof(expr)); + return *this ; + } +#endif // !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES +#endif // !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) && !defined(BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION) + + // Copy-assigns from another convertible optional (converts && deep-copies the rhs value) + // Requires a valid conversion from U to T. + // Basic Guarantee: If T::T( U const& ) throws, this is left UNINITIALIZED + template + optional& operator= ( optional const& rhs ) + { + this->assign(rhs); + return *this ; + } + +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + // Move-assigns from another convertible optional (converts && deep-moves the rhs value) + // Requires a valid conversion from U to T. + // Basic Guarantee: If T::T( U && ) throws, this is left UNINITIALIZED + template + optional& operator= ( optional && rhs ) + { + this->assign(boost::move(rhs)); + return *this ; + } +#endif + + // Assigns from another optional (deep-copies the rhs value) + // Basic Guarantee: If T::T( T const& ) throws, this is left UNINITIALIZED + // (NOTE: On BCB, this operator is not actually called and left is left UNMODIFIED in case of a throw) + optional& operator= ( optional const& rhs ) + { + this->assign( static_cast(rhs) ) ; + return *this ; + } + +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + // Assigns from another optional (deep-moves the rhs value) + optional& operator= ( optional && rhs ) + BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible::value && ::boost::is_nothrow_move_assignable::value) + { + this->assign( static_cast(rhs) ) ; + return *this ; + } +#endif + + // Assigns from a T (deep-copies the rhs value) + // Basic Guarantee: If T::( T const& ) throws, this is left UNINITIALIZED + optional& operator= ( argument_type val ) + { + this->assign( val ) ; + return *this ; + } + +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + // Assigns from a T (deep-moves the rhs value) + optional& operator= ( rval_reference_type val ) + { + optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref(); + this->assign( boost::move(val) ) ; + return *this ; + } +#endif + + // Assigns from a "none" + // Which destroys the current value, if any, leaving this UNINITIALIZED + // No-throw (assuming T::~T() doesn't) + optional& operator= ( none_t none_ ) BOOST_NOEXCEPT + { + this->assign( none_ ) ; + return *this ; + } + +#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES) + // Constructs in-place + // upon exception *this is always uninitialized + template + void emplace ( Args&&... args ) + { + this->emplace_assign( boost::forward(args)... ); + } +#elif (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) + template + void emplace ( Arg&& arg ) + { + this->emplace_assign( boost::forward(arg) ); + } + + void emplace () + { + this->emplace_assign(); + } +#else + template + void emplace ( const Arg& arg ) + { + this->emplace_assign( arg ); + } + + template + void emplace ( Arg& arg ) + { + this->emplace_assign( arg ); + } + + void emplace () + { + this->emplace_assign(); + } +#endif + + void swap( optional & arg ) + BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible::value && ::boost::is_nothrow_move_assignable::value) + { + // allow for Koenig lookup + boost::swap(*this, arg); + } + + + // Returns a reference to the value if this is initialized, otherwise, + // the behaviour is UNDEFINED + // No-throw + reference_const_type get() const { BOOST_ASSERT(this->is_initialized()) ; return this->get_impl(); } + reference_type get() { BOOST_ASSERT(this->is_initialized()) ; return this->get_impl(); } + + // Returns a copy of the value if this is initialized, 'v' otherwise + reference_const_type get_value_or ( reference_const_type v ) const { return this->is_initialized() ? get() : v ; } + reference_type get_value_or ( reference_type v ) { return this->is_initialized() ? get() : v ; } + + // Returns a pointer to the value if this is initialized, otherwise, + // the behaviour is UNDEFINED + // No-throw + pointer_const_type operator->() const { BOOST_ASSERT(this->is_initialized()) ; return this->get_ptr_impl() ; } + pointer_type operator->() { BOOST_ASSERT(this->is_initialized()) ; return this->get_ptr_impl() ; } + + // Returns a reference to the value if this is initialized, otherwise, + // the behaviour is UNDEFINED + // No-throw +#if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) + reference_const_type operator *() const& { return this->get() ; } + reference_type operator *() & { return this->get() ; } + reference_type_of_temporary_wrapper operator *() && { return base::types::move(this->get()) ; } +#else + reference_const_type operator *() const { return this->get() ; } + reference_type operator *() { return this->get() ; } +#endif // !defined BOOST_NO_CXX11_REF_QUALIFIERS + +#if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) + reference_const_type value() const& + { + if (this->is_initialized()) + return this->get() ; + else + throw_exception(bad_optional_access()); + } + + reference_type value() & + { + if (this->is_initialized()) + return this->get() ; + else + throw_exception(bad_optional_access()); + } + + reference_type_of_temporary_wrapper value() && + { + if (this->is_initialized()) + return base::types::move(this->get()) ; + else + throw_exception(bad_optional_access()); + } + +#else + reference_const_type value() const + { + if (this->is_initialized()) + return this->get() ; + else + throw_exception(bad_optional_access()); + } + + reference_type value() + { + if (this->is_initialized()) + return this->get() ; + else + throw_exception(bad_optional_access()); + } +#endif + + +#ifndef BOOST_NO_CXX11_REF_QUALIFIERS + template + value_type value_or ( U&& v ) const& + { + if (this->is_initialized()) + return get(); + else + return boost::forward(v); + } + + template + value_type value_or ( U&& v ) && + { + if (this->is_initialized()) + return base::types::move(get()); + else + return boost::forward(v); + } +#elif !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + template + value_type value_or ( U&& v ) const + { + if (this->is_initialized()) + return get(); + else + return boost::forward(v); + } +#else + template + value_type value_or ( U const& v ) const + { + if (this->is_initialized()) + return get(); + else + return v; + } + + template + value_type value_or ( U& v ) const + { + if (this->is_initialized()) + return get(); + else + return v; + } +#endif + + +#ifndef BOOST_NO_CXX11_REF_QUALIFIERS + template + value_type value_or_eval ( F f ) const& + { + if (this->is_initialized()) + return get(); + else + return f(); + } + + template + value_type value_or_eval ( F f ) && + { + if (this->is_initialized()) + return base::types::move(get()); + else + return f(); + } +#else + template + value_type value_or_eval ( F f ) const + { + if (this->is_initialized()) + return get(); + else + return f(); + } +#endif + + bool operator!() const BOOST_NOEXCEPT { return !this->is_initialized() ; } + + BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT() +} ; + +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES +template +class optional +{ + BOOST_STATIC_ASSERT_MSG(sizeof(T) == 0, "Optional rvalue references are illegal."); +} ; +#endif + +// Returns optional(v) +template +inline +optional make_optional ( T const& v ) +{ + return optional(v); +} + +// Returns optional(cond,v) +template +inline +optional make_optional ( bool cond, T const& v ) +{ + return optional(cond,v); +} + +// Returns a reference to the value if this is initialized, otherwise, the behaviour is UNDEFINED. +// No-throw +template +inline +BOOST_DEDUCED_TYPENAME optional::reference_const_type +get ( optional const& opt ) +{ + return opt.get() ; +} + +template +inline +BOOST_DEDUCED_TYPENAME optional::reference_type +get ( optional& opt ) +{ + return opt.get() ; +} + +// Returns a pointer to the value if this is initialized, otherwise, returns NULL. +// No-throw +template +inline +BOOST_DEDUCED_TYPENAME optional::pointer_const_type +get ( optional const* opt ) +{ + return opt->get_ptr() ; +} + +template +inline +BOOST_DEDUCED_TYPENAME optional::pointer_type +get ( optional* opt ) +{ + return opt->get_ptr() ; +} + +// Returns a reference to the value if this is initialized, otherwise, the behaviour is UNDEFINED. +// No-throw +template +inline +BOOST_DEDUCED_TYPENAME optional::reference_const_type +get_optional_value_or ( optional const& opt, BOOST_DEDUCED_TYPENAME optional::reference_const_type v ) +{ + return opt.get_value_or(v) ; +} + +template +inline +BOOST_DEDUCED_TYPENAME optional::reference_type +get_optional_value_or ( optional& opt, BOOST_DEDUCED_TYPENAME optional::reference_type v ) +{ + return opt.get_value_or(v) ; +} + +// Returns a pointer to the value if this is initialized, otherwise, returns NULL. +// No-throw +template +inline +BOOST_DEDUCED_TYPENAME optional::pointer_const_type +get_pointer ( optional const& opt ) +{ + return opt.get_ptr() ; +} + +template +inline +BOOST_DEDUCED_TYPENAME optional::pointer_type +get_pointer ( optional& opt ) +{ + return opt.get_ptr() ; +} + +// The following declaration prevents a bug where operator safe-bool is used upon streaming optional object if you forget the IO header. +template +std::basic_ostream& +operator<<(std::basic_ostream& os, optional_detail::optional_tag const&) +{ + BOOST_STATIC_ASSERT_MSG(sizeof(CharType) == 0, "If you want to output boost::optional, include header "); + return os; +} + +// optional's relational operators ( ==, !=, <, >, <=, >= ) have deep-semantics (compare values). +// WARNING: This is UNLIKE pointers. Use equal_pointees()/less_pointess() in generic code instead. + + +// +// optional vs optional cases +// + +template +inline +bool operator == ( optional const& x, optional const& y ) +{ return equal_pointees(x,y); } + +template +inline +bool operator < ( optional const& x, optional const& y ) +{ return less_pointees(x,y); } + +template +inline +bool operator != ( optional const& x, optional const& y ) +{ return !( x == y ) ; } + +template +inline +bool operator > ( optional const& x, optional const& y ) +{ return y < x ; } + +template +inline +bool operator <= ( optional const& x, optional const& y ) +{ return !( y < x ) ; } + +template +inline +bool operator >= ( optional const& x, optional const& y ) +{ return !( x < y ) ; } + + +// +// optional vs T cases +// +template +inline +bool operator == ( optional const& x, T const& y ) +{ return equal_pointees(x, optional(y)); } + +template +inline +bool operator < ( optional const& x, T const& y ) +{ return less_pointees(x, optional(y)); } + +template +inline +bool operator != ( optional const& x, T const& y ) +{ return !( x == y ) ; } + +template +inline +bool operator > ( optional const& x, T const& y ) +{ return y < x ; } + +template +inline +bool operator <= ( optional const& x, T const& y ) +{ return !( y < x ) ; } + +template +inline +bool operator >= ( optional const& x, T const& y ) +{ return !( x < y ) ; } + +// +// T vs optional cases +// + +template +inline +bool operator == ( T const& x, optional const& y ) +{ return equal_pointees( optional(x), y ); } + +template +inline +bool operator < ( T const& x, optional const& y ) +{ return less_pointees( optional(x), y ); } + +template +inline +bool operator != ( T const& x, optional const& y ) +{ return !( x == y ) ; } + +template +inline +bool operator > ( T const& x, optional const& y ) +{ return y < x ; } + +template +inline +bool operator <= ( T const& x, optional const& y ) +{ return !( y < x ) ; } + +template +inline +bool operator >= ( T const& x, optional const& y ) +{ return !( x < y ) ; } + + +// +// optional vs none cases +// + +template +inline +bool operator == ( optional const& x, none_t ) BOOST_NOEXCEPT +{ return !x; } + +template +inline +bool operator < ( optional const& x, none_t ) +{ return less_pointees(x,optional() ); } + +template +inline +bool operator != ( optional const& x, none_t ) BOOST_NOEXCEPT +{ return bool(x); } + +template +inline +bool operator > ( optional const& x, none_t y ) +{ return y < x ; } + +template +inline +bool operator <= ( optional const& x, none_t y ) +{ return !( y < x ) ; } + +template +inline +bool operator >= ( optional const& x, none_t y ) +{ return !( x < y ) ; } + +// +// none vs optional cases +// + +template +inline +bool operator == ( none_t , optional const& y ) BOOST_NOEXCEPT +{ return !y; } + +template +inline +bool operator < ( none_t , optional const& y ) +{ return less_pointees(optional() ,y); } + +template +inline +bool operator != ( none_t, optional const& y ) BOOST_NOEXCEPT +{ return bool(y); } + +template +inline +bool operator > ( none_t x, optional const& y ) +{ return y < x ; } + +template +inline +bool operator <= ( none_t x, optional const& y ) +{ return !( y < x ) ; } + +template +inline +bool operator >= ( none_t x, optional const& y ) +{ return !( x < y ) ; } + +namespace optional_detail { + +template struct swap_selector; + +template<> +struct swap_selector +{ + template + static void optional_swap ( optional& x, optional& y ) + { + const bool hasX = !!x; + const bool hasY = !!y; + + if ( !hasX && !hasY ) + return; + + if( !hasX ) + x.emplace(); + else if ( !hasY ) + y.emplace(); + + // Boost.Utility.Swap will take care of ADL and workarounds for broken compilers + boost::swap(x.get(),y.get()); + + if( !hasX ) + y = boost::none ; + else if( !hasY ) + x = boost::none ; + } +}; + +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES +template<> +struct swap_selector +{ + template + static void optional_swap ( optional& x, optional& y ) + //BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible::value && BOOST_NOEXCEPT_EXPR(boost::swap(*x, *y))) + { + if(x) + { + if (y) + { + boost::swap(*x, *y); + } + else + { + y = boost::move(*x); + x = boost::none; + } + } + else + { + if (y) + { + x = boost::move(*y); + y = boost::none; + } + } + } +}; +#else +template<> +struct swap_selector +{ + template + static void optional_swap ( optional& x, optional& y ) + { + const bool hasX = !!x; + const bool hasY = !!y; + + if ( !hasX && hasY ) + { + x = y.get(); + y = boost::none ; + } + else if ( hasX && !hasY ) + { + y = x.get(); + x = boost::none ; + } + else if ( hasX && hasY ) + { + // Boost.Utility.Swap will take care of ADL and workarounds for broken compilers + boost::swap(x.get(),y.get()); + } + } +}; +#endif // !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + +} // namespace optional_detail + +#if (!defined BOOST_NO_CXX11_RVALUE_REFERENCES) && (!defined BOOST_CONFIG_RESTORE_OBSOLETE_SWAP_IMPLEMENTATION) + +template +struct optional_swap_should_use_default_constructor : boost::false_type {} ; + +#else + +template +struct optional_swap_should_use_default_constructor : has_nothrow_default_constructor {} ; + +#endif //BOOST_NO_CXX11_RVALUE_REFERENCES + +template inline void swap ( optional& x, optional& y ) + //BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible::value && BOOST_NOEXCEPT_EXPR(boost::swap(*x, *y))) +{ + optional_detail::swap_selector::value>::optional_swap(x, y); +} + +} // namespace boost + +#endif diff --git a/ThirdParty/boost-Subset/boost/optional/optional_fwd.hpp b/ThirdParty/boost-Subset/boost/optional/optional_fwd.hpp new file mode 100644 index 0000000000..fb59682df6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/optional/optional_fwd.hpp @@ -0,0 +1,30 @@ +// Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal. +// +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/optional for documentation. +// +// You are welcome to contact the author at: +// fernando_cacciola@hotmail.com +// +// Revisions: +// 10 May 2008 (added swap related forward declaration) Niels Dekker +// +#ifndef BOOST_OPTIONAL_OPTIONAL_FWD_FLC_19NOV2002_HPP +#define BOOST_OPTIONAL_OPTIONAL_FWD_FLC_19NOV2002_HPP + + +namespace boost { + +template class optional ; + +template void swap ( optional& , optional& ); + +template struct optional_swap_should_use_default_constructor ; + +} // namespace boost + +#endif + diff --git a/ThirdParty/boost-Subset/boost/predef.h b/ThirdParty/boost-Subset/boost/predef.h new file mode 100644 index 0000000000..36d731fa41 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef.h @@ -0,0 +1,23 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#if !defined(BOOST_PREDEF_H) || defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS) +#ifndef BOOST_PREDEF_H +#define BOOST_PREDEF_H +#endif + +#include +#include +#include +#include +#include +#include +#include + +#include + +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/architecture.h b/ThirdParty/boost-Subset/boost/predef/architecture.h new file mode 100644 index 0000000000..c433d437bd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/architecture.h @@ -0,0 +1,32 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#if !defined(BOOST_PREDEF_ARCHITECTURE_H) || defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS) +#ifndef BOOST_PREDEF_ARCHITECTURE_H +#define BOOST_PREDEF_ARCHITECTURE_H +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +/*#include */ + +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/architecture/alpha.h b/ThirdParty/boost-Subset/boost/predef/architecture/alpha.h new file mode 100644 index 0000000000..5bcade18b1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/architecture/alpha.h @@ -0,0 +1,59 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_ALPHA_H +#define BOOST_PREDEF_ARCHITECTURE_ALPHA_H + +#include +#include + +/*` +[heading `BOOST_ARCH_ALPHA`] + +[@http://en.wikipedia.org/wiki/DEC_Alpha DEC Alpha] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + [[`__alpha__`] [__predef_detection__]] + [[`__alpha`] [__predef_detection__]] + [[`_M_ALPHA`] [__predef_detection__]] + + [[`__alpha_ev4__`] [4.0.0]] + [[`__alpha_ev5__`] [5.0.0]] + [[`__alpha_ev6__`] [6.0.0]] + ] + */ + +#define BOOST_ARCH_ALPHA BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__alpha__) || defined(__alpha) || \ + defined(_M_ALPHA) +# undef BOOST_ARCH_ALPHA +# if !defined(BOOST_ARCH_ALPHA) && defined(__alpha_ev4__) +# define BOOST_ARCH_ALPHA BOOST_VERSION_NUMBER(4,0,0) +# endif +# if !defined(BOOST_ARCH_ALPHA) && defined(__alpha_ev5__) +# define BOOST_ARCH_ALPHA BOOST_VERSION_NUMBER(5,0,0) +# endif +# if !defined(BOOST_ARCH_ALPHA) && defined(__alpha_ev6__) +# define BOOST_ARCH_ALPHA BOOST_VERSION_NUMBER(6,0,0) +# endif +# if !defined(BOOST_ARCH_ALPHA) +# define BOOST_ARCH_ALPHA BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_ALPHA +# define BOOST_ARCH_ALPHA_AVAILABLE +#endif + +#define BOOST_ARCH_ALPHA_NAME "DEC Alpha" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_ALPHA,BOOST_ARCH_ALPHA_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/architecture/arm.h b/ThirdParty/boost-Subset/boost/predef/architecture/arm.h new file mode 100644 index 0000000000..b200c62777 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/architecture/arm.h @@ -0,0 +1,70 @@ +/* +Copyright Rene Rivera 2008-2015 +Copyright Franz Detro 2014 +Copyright (c) Microsoft Corporation 2014 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_ARM_H +#define BOOST_PREDEF_ARCHITECTURE_ARM_H + +#include +#include + +/*` +[heading `BOOST_ARCH_ARM`] + +[@http://en.wikipedia.org/wiki/ARM_architecture ARM] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__arm__`] [__predef_detection__]] + [[`__arm64`] [__predef_detection__]] + [[`__thumb__`] [__predef_detection__]] + [[`__TARGET_ARCH_ARM`] [__predef_detection__]] + [[`__TARGET_ARCH_THUMB`] [__predef_detection__]] + [[`_M_ARM`] [__predef_detection__]] + + [[`__arm64`] [8.0.0]] + [[`__TARGET_ARCH_ARM`] [V.0.0]] + [[`__TARGET_ARCH_THUMB`] [V.0.0]] + [[`_M_ARM`] [V.0.0]] + ] + */ + +#define BOOST_ARCH_ARM BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__arm__) || defined(__arm64) || defined(__thumb__) || \ + defined(__TARGET_ARCH_ARM) || defined(__TARGET_ARCH_THUMB) || \ + defined(_M_ARM) +# undef BOOST_ARCH_ARM +# if !defined(BOOST_ARCH_ARM) && defined(__arm64) +# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(8,0,0) +# endif +# if !defined(BOOST_ARCH_ARM) && defined(__TARGET_ARCH_ARM) +# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(__TARGET_ARCH_ARM,0,0) +# endif +# if !defined(BOOST_ARCH_ARM) && defined(__TARGET_ARCH_THUMB) +# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(__TARGET_ARCH_THUMB,0,0) +# endif +# if !defined(BOOST_ARCH_ARM) && defined(_M_ARM) +# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(_M_ARM,0,0) +# endif +# if !defined(BOOST_ARCH_ARM) +# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_ARM +# define BOOST_ARCH_ARM_AVAILABLE +#endif + +#define BOOST_ARCH_ARM_NAME "ARM" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_ARM,BOOST_ARCH_ARM_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/architecture/blackfin.h b/ThirdParty/boost-Subset/boost/predef/architecture/blackfin.h new file mode 100644 index 0000000000..84c58a25e9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/architecture/blackfin.h @@ -0,0 +1,46 @@ +/* +Copyright Rene Rivera 2013-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_BLACKFIN_H +#define BOOST_PREDEF_ARCHITECTURE_BLACKFIN_H + +#include +#include + +/*` +[heading `BOOST_ARCH_BLACKFIN`] + +Blackfin Processors from Analog Devices. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__bfin__`] [__predef_detection__]] + [[`__BFIN__`] [__predef_detection__]] + [[`bfin`] [__predef_detection__]] + [[`BFIN`] [__predef_detection__]] + ] + */ + +#define BOOST_ARCH_BLACKFIN BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__bfin__) || defined(__BFIN__) || \ + defined(bfin) || defined(BFIN) +# undef BOOST_ARCH_BLACKFIN +# define BOOST_ARCH_BLACKFIN BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_BLACKFIN +# define BOOST_ARCH_BLACKFIN_AVAILABLE +#endif + +#define BOOST_ARCH_BLACKFIN_NAME "Blackfin" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_BLACKFIN,BOOST_ARCH_BLACKFIN_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/architecture/convex.h b/ThirdParty/boost-Subset/boost/predef/architecture/convex.h new file mode 100644 index 0000000000..ac783a9cc1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/architecture/convex.h @@ -0,0 +1,65 @@ +/* +Copyright Rene Rivera 2011-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_CONVEX_H +#define BOOST_PREDEF_ARCHITECTURE_CONVEX_H + +#include +#include + +/*` +[heading `BOOST_ARCH_CONVEX`] + +[@http://en.wikipedia.org/wiki/Convex_Computer Convex Computer] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__convex__`] [__predef_detection__]] + + [[`__convex_c1__`] [1.0.0]] + [[`__convex_c2__`] [2.0.0]] + [[`__convex_c32__`] [3.2.0]] + [[`__convex_c34__`] [3.4.0]] + [[`__convex_c38__`] [3.8.0]] + ] + */ + +#define BOOST_ARCH_CONVEX BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__convex__) +# undef BOOST_ARCH_CONVEX +# if !defined(BOOST_ARCH_CONVEX) && defined(__convex_c1__) +# define BOOST_ARCH_CONVEX BOOST_VERSION_NUMBER(1,0,0) +# endif +# if !defined(BOOST_ARCH_CONVEX) && defined(__convex_c2__) +# define BOOST_ARCH_CONVEX BOOST_VERSION_NUMBER(2,0,0) +# endif +# if !defined(BOOST_ARCH_CONVEX) && defined(__convex_c32__) +# define BOOST_ARCH_CONVEX BOOST_VERSION_NUMBER(3,2,0) +# endif +# if !defined(BOOST_ARCH_CONVEX) && defined(__convex_c34__) +# define BOOST_ARCH_CONVEX BOOST_VERSION_NUMBER(3,4,0) +# endif +# if !defined(BOOST_ARCH_CONVEX) && defined(__convex_c38__) +# define BOOST_ARCH_CONVEX BOOST_VERSION_NUMBER(3,8,0) +# endif +# if !defined(BOOST_ARCH_CONVEX) +# define BOOST_ARCH_CONVEX BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_CONVEX +# define BOOST_ARCH_CONVEX_AVAILABLE +#endif + +#define BOOST_ARCH_CONVEX_NAME "Convex Computer" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_CONVEX,BOOST_ARCH_CONVEX_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/architecture/ia64.h b/ThirdParty/boost-Subset/boost/predef/architecture/ia64.h new file mode 100644 index 0000000000..9b1972bd39 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/architecture/ia64.h @@ -0,0 +1,49 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_IA64_H +#define BOOST_PREDEF_ARCHITECTURE_IA64_H + +#include +#include + +/*` +[heading `BOOST_ARCH_IA64`] + +[@http://en.wikipedia.org/wiki/Ia64 Intel Itanium 64] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__ia64__`] [__predef_detection__]] + [[`_IA64`] [__predef_detection__]] + [[`__IA64__`] [__predef_detection__]] + [[`__ia64`] [__predef_detection__]] + [[`_M_IA64`] [__predef_detection__]] + [[`__itanium__`] [__predef_detection__]] + ] + */ + +#define BOOST_ARCH_IA64 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__ia64__) || defined(_IA64) || \ + defined(__IA64__) || defined(__ia64) || \ + defined(_M_IA64) || defined(__itanium__) +# undef BOOST_ARCH_IA64 +# define BOOST_ARCH_IA64 BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_IA64 +# define BOOST_ARCH_IA64_AVAILABLE +#endif + +#define BOOST_ARCH_IA64_NAME "Intel Itanium 64" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_IA64,BOOST_ARCH_IA64_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/architecture/m68k.h b/ThirdParty/boost-Subset/boost/predef/architecture/m68k.h new file mode 100644 index 0000000000..63ed5f8479 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/architecture/m68k.h @@ -0,0 +1,82 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_M68K_H +#define BOOST_PREDEF_ARCHITECTURE_M68K_H + +#include +#include + +/*` +[heading `BOOST_ARCH_M68K`] + +[@http://en.wikipedia.org/wiki/M68k Motorola 68k] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__m68k__`] [__predef_detection__]] + [[`M68000`] [__predef_detection__]] + + [[`__mc68060__`] [6.0.0]] + [[`mc68060`] [6.0.0]] + [[`__mc68060`] [6.0.0]] + [[`__mc68040__`] [4.0.0]] + [[`mc68040`] [4.0.0]] + [[`__mc68040`] [4.0.0]] + [[`__mc68030__`] [3.0.0]] + [[`mc68030`] [3.0.0]] + [[`__mc68030`] [3.0.0]] + [[`__mc68020__`] [2.0.0]] + [[`mc68020`] [2.0.0]] + [[`__mc68020`] [2.0.0]] + [[`__mc68010__`] [1.0.0]] + [[`mc68010`] [1.0.0]] + [[`__mc68010`] [1.0.0]] + [[`__mc68000__`] [0.0.1]] + [[`mc68000`] [0.0.1]] + [[`__mc68000`] [0.0.1]] + ] + */ + +#define BOOST_ARCH_M68K BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__m68k__) || defined(M68000) +# undef BOOST_ARCH_M68K +# if !defined(BOOST_ARCH_M68K) && (defined(__mc68060__) || defined(mc68060) || defined(__mc68060)) +# define BOOST_ARCH_M68K BOOST_VERSION_NUMBER(6,0,0) +# endif +# if !defined(BOOST_ARCH_M68K) && (defined(__mc68040__) || defined(mc68040) || defined(__mc68040)) +# define BOOST_ARCH_M68K BOOST_VERSION_NUMBER(4,0,0) +# endif +# if !defined(BOOST_ARCH_M68K) && (defined(__mc68030__) || defined(mc68030) || defined(__mc68030)) +# define BOOST_ARCH_M68K BOOST_VERSION_NUMBER(3,0,0) +# endif +# if !defined(BOOST_ARCH_M68K) && (defined(__mc68020__) || defined(mc68020) || defined(__mc68020)) +# define BOOST_ARCH_M68K BOOST_VERSION_NUMBER(2,0,0) +# endif +# if !defined(BOOST_ARCH_M68K) && (defined(__mc68010__) || defined(mc68010) || defined(__mc68010)) +# define BOOST_ARCH_M68K BOOST_VERSION_NUMBER(1,0,0) +# endif +# if !defined(BOOST_ARCH_M68K) && (defined(__mc68000__) || defined(mc68000) || defined(__mc68000)) +# define BOOST_ARCH_M68K BOOST_VERSION_NUMBER_AVAILABLE +# endif +# if !defined(BOOST_ARCH_M68K) +# define BOOST_ARCH_M68K BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_M68K +# define BOOST_ARCH_M68K_AVAILABLE +#endif + +#define BOOST_ARCH_M68K_NAME "Motorola 68k" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_M68K,BOOST_ARCH_M68K_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/architecture/mips.h b/ThirdParty/boost-Subset/boost/predef/architecture/mips.h new file mode 100644 index 0000000000..0189d7dbd6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/architecture/mips.h @@ -0,0 +1,73 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_MIPS_H +#define BOOST_PREDEF_ARCHITECTURE_MIPS_H + +#include +#include + +/*` +[heading `BOOST_ARCH_MIPS`] + +[@http://en.wikipedia.org/wiki/MIPS_architecture MIPS] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__mips__`] [__predef_detection__]] + [[`__mips`] [__predef_detection__]] + [[`__MIPS__`] [__predef_detection__]] + + [[`__mips`] [V.0.0]] + [[`_MIPS_ISA_MIPS1`] [1.0.0]] + [[`_R3000`] [1.0.0]] + [[`_MIPS_ISA_MIPS2`] [2.0.0]] + [[`__MIPS_ISA2__`] [2.0.0]] + [[`_R4000`] [2.0.0]] + [[`_MIPS_ISA_MIPS3`] [3.0.0]] + [[`__MIPS_ISA3__`] [3.0.0]] + [[`_MIPS_ISA_MIPS4`] [4.0.0]] + [[`__MIPS_ISA4__`] [4.0.0]] + ] + */ + +#define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__mips__) || defined(__mips) || \ + defined(__MIPS__) +# undef BOOST_ARCH_MIPS +# if !defined(BOOST_ARCH_MIPS) && (defined(__mips)) +# define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(__mips,0,0) +# endif +# if !defined(BOOST_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS1) || defined(_R3000)) +# define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(1,0,0) +# endif +# if !defined(BOOST_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS2) || defined(__MIPS_ISA2__) || defined(_R4000)) +# define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(2,0,0) +# endif +# if !defined(BOOST_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS3) || defined(__MIPS_ISA3__)) +# define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(3,0,0) +# endif +# if !defined(BOOST_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS4) || defined(__MIPS_ISA4__)) +# define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(4,0,0) +# endif +# if !defined(BOOST_ARCH_MIPS) +# define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_MIPS +# define BOOST_ARCH_MIPS_AVAILABLE +#endif + +#define BOOST_ARCH_MIPS_NAME "MIPS" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_MIPS,BOOST_ARCH_MIPS_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/architecture/parisc.h b/ThirdParty/boost-Subset/boost/predef/architecture/parisc.h new file mode 100644 index 0000000000..7c7625f912 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/architecture/parisc.h @@ -0,0 +1,64 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_PARISC_H +#define BOOST_PREDEF_ARCHITECTURE_PARISC_H + +#include +#include + +/*` +[heading `BOOST_ARCH_PARISK`] + +[@http://en.wikipedia.org/wiki/PA-RISC_family HP/PA RISC] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__hppa__`] [__predef_detection__]] + [[`__hppa`] [__predef_detection__]] + [[`__HPPA__`] [__predef_detection__]] + + [[`_PA_RISC1_0`] [1.0.0]] + [[`_PA_RISC1_1`] [1.1.0]] + [[`__HPPA11__`] [1.1.0]] + [[`__PA7100__`] [1.1.0]] + [[`_PA_RISC2_0`] [2.0.0]] + [[`__RISC2_0__`] [2.0.0]] + [[`__HPPA20__`] [2.0.0]] + [[`__PA8000__`] [2.0.0]] + ] + */ + +#define BOOST_ARCH_PARISC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__hppa__) || defined(__hppa) || defined(__HPPA__) +# undef BOOST_ARCH_PARISC +# if !defined(BOOST_ARCH_PARISC) && (defined(_PA_RISC1_0)) +# define BOOST_ARCH_PARISC BOOST_VERSION_NUMBER(1,0,0) +# endif +# if !defined(BOOST_ARCH_PARISC) && (defined(_PA_RISC1_1) || defined(__HPPA11__) || defined(__PA7100__)) +# define BOOST_ARCH_PARISC BOOST_VERSION_NUMBER(1,1,0) +# endif +# if !defined(BOOST_ARCH_PARISC) && (defined(_PA_RISC2_0) || defined(__RISC2_0__) || defined(__HPPA20__) || defined(__PA8000__)) +# define BOOST_ARCH_PARISC BOOST_VERSION_NUMBER(2,0,0) +# endif +# if !defined(BOOST_ARCH_PARISC) +# define BOOST_ARCH_PARISC BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_PARISC +# define BOOST_ARCH_PARISC_AVAILABLE +#endif + +#define BOOST_ARCH_PARISC_NAME "HP/PA RISC" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_PARISC,BOOST_ARCH_PARISC_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/architecture/ppc.h b/ThirdParty/boost-Subset/boost/predef/architecture/ppc.h new file mode 100644 index 0000000000..e8c57c91f2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/architecture/ppc.h @@ -0,0 +1,72 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_PPC_H +#define BOOST_PREDEF_ARCHITECTURE_PPC_H + +#include +#include + +/*` +[heading `BOOST_ARCH_PPC`] + +[@http://en.wikipedia.org/wiki/PowerPC PowerPC] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__powerpc`] [__predef_detection__]] + [[`__powerpc__`] [__predef_detection__]] + [[`__POWERPC__`] [__predef_detection__]] + [[`__ppc__`] [__predef_detection__]] + [[`_M_PPC`] [__predef_detection__]] + [[`_ARCH_PPC`] [__predef_detection__]] + [[`__PPCGECKO__`] [__predef_detection__]] + [[`__PPCBROADWAY__`] [__predef_detection__]] + [[`_XENON`] [__predef_detection__]] + + [[`__ppc601__`] [6.1.0]] + [[`_ARCH_601`] [6.1.0]] + [[`__ppc603__`] [6.3.0]] + [[`_ARCH_603`] [6.3.0]] + [[`__ppc604__`] [6.4.0]] + [[`__ppc604__`] [6.4.0]] + ] + */ + +#define BOOST_ARCH_PPC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__powerpc) || defined(__powerpc__) || \ + defined(__POWERPC__) || defined(__ppc__) || \ + defined(_M_PPC) || defined(_ARCH_PPC) || \ + defined(__PPCGECKO__) || defined(__PPCBROADWAY__) || \ + defined(_XENON) +# undef BOOST_ARCH_PPC +# if !defined (BOOST_ARCH_PPC) && (defined(__ppc601__) || defined(_ARCH_601)) +# define BOOST_ARCH_PPC BOOST_VERSION_NUMBER(6,1,0) +# endif +# if !defined (BOOST_ARCH_PPC) && (defined(__ppc603__) || defined(_ARCH_603)) +# define BOOST_ARCH_PPC BOOST_VERSION_NUMBER(6,3,0) +# endif +# if !defined (BOOST_ARCH_PPC) && (defined(__ppc604__) || defined(__ppc604__)) +# define BOOST_ARCH_PPC BOOST_VERSION_NUMBER(6,4,0) +# endif +# if !defined (BOOST_ARCH_PPC) +# define BOOST_ARCH_PPC BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_PPC +# define BOOST_ARCH_PPC_AVAILABLE +#endif + +#define BOOST_ARCH_PPC_NAME "PowerPC" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_PPC,BOOST_ARCH_PPC_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/architecture/pyramid.h b/ThirdParty/boost-Subset/boost/predef/architecture/pyramid.h new file mode 100644 index 0000000000..4f13253807 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/architecture/pyramid.h @@ -0,0 +1,42 @@ +/* +Copyright Rene Rivera 2011-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_PYRAMID_H +#define BOOST_PREDEF_ARCHITECTURE_PYRAMID_H + +#include +#include + +/*` +[heading `BOOST_ARCH_PYRAMID`] + +Pyramid 9810 architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`pyr`] [__predef_detection__]] + ] + */ + +#define BOOST_ARCH_PYRAMID BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(pyr) +# undef BOOST_ARCH_PYRAMID +# define BOOST_ARCH_PYRAMID BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_PYRAMID +# define BOOST_ARCH_PYRAMID_AVAILABLE +#endif + +#define BOOST_ARCH_PYRAMID_NAME "Pyramid 9810" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_PYRAMID,BOOST_ARCH_PYRAMID_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/architecture/rs6k.h b/ThirdParty/boost-Subset/boost/predef/architecture/rs6k.h new file mode 100644 index 0000000000..8a6e9b6b53 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/architecture/rs6k.h @@ -0,0 +1,56 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_RS6K_H +#define BOOST_PREDEF_ARCHITECTURE_RS6K_H + +#include +#include + +/*` +[heading `BOOST_ARCH_RS6000`] + +[@http://en.wikipedia.org/wiki/RS/6000 RS/6000] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__THW_RS6000`] [__predef_detection__]] + [[`_IBMR2`] [__predef_detection__]] + [[`_POWER`] [__predef_detection__]] + [[`_ARCH_PWR`] [__predef_detection__]] + [[`_ARCH_PWR2`] [__predef_detection__]] + ] + */ + +#define BOOST_ARCH_RS6000 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__THW_RS6000) || defined(_IBMR2) || \ + defined(_POWER) || defined(_ARCH_PWR) || \ + defined(_ARCH_PWR2) +# undef BOOST_ARCH_RS6000 +# define BOOST_ARCH_RS6000 BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_RS6000 +# define BOOST_ARCH_RS6000_AVAILABLE +#endif + +#define BOOST_ARCH_RS6000_NAME "RS/6000" + +#define BOOST_ARCH_PWR BOOST_ARCH_RS6000 + +#if BOOST_ARCH_PWR +# define BOOST_ARCH_PWR_AVAILABLE +#endif + +#define BOOST_ARCH_PWR_NAME BOOST_ARCH_RS6000_NAME + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_RS6000,BOOST_ARCH_RS6000_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/architecture/sparc.h b/ThirdParty/boost-Subset/boost/predef/architecture/sparc.h new file mode 100644 index 0000000000..a89a5100b8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/architecture/sparc.h @@ -0,0 +1,54 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_SPARC_H +#define BOOST_PREDEF_ARCHITECTURE_SPARC_H + +#include +#include + +/*` +[heading `BOOST_ARCH_SPARC`] + +[@http://en.wikipedia.org/wiki/SPARC SPARC] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__sparc__`] [__predef_detection__]] + [[`__sparc`] [__predef_detection__]] + + [[`__sparcv9`] [9.0.0]] + [[`__sparcv8`] [8.0.0]] + ] + */ + +#define BOOST_ARCH_SPARC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__sparc__) || defined(__sparc) +# undef BOOST_ARCH_SPARC +# if !defined(BOOST_ARCH_SPARC) && defined(__sparcv9) +# define BOOST_ARCH_SPARC BOOST_VERSION_NUMBER(9,0,0) +# endif +# if !defined(BOOST_ARCH_SPARC) && defined(__sparcv8) +# define BOOST_ARCH_SPARC BOOST_VERSION_NUMBER(8,0,0) +# endif +# if !defined(BOOST_ARCH_SPARC) +# define BOOST_ARCH_SPARC BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_SPARC +# define BOOST_ARCH_SPARC_AVAILABLE +#endif + +#define BOOST_ARCH_SPARC_NAME "SPARC" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_SPARC,BOOST_ARCH_SPARC_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/architecture/superh.h b/ThirdParty/boost-Subset/boost/predef/architecture/superh.h new file mode 100644 index 0000000000..da0529e5e0 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/architecture/superh.h @@ -0,0 +1,67 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_SUPERH_H +#define BOOST_PREDEF_ARCHITECTURE_SUPERH_H + +#include +#include + +/*` +[heading `BOOST_ARCH_SH`] + +[@http://en.wikipedia.org/wiki/SuperH SuperH] architecture: +If available versions \[1-5\] are specifically detected. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__sh__`] [__predef_detection__]] + + [[`__SH5__`] [5.0.0]] + [[`__SH4__`] [4.0.0]] + [[`__sh3__`] [3.0.0]] + [[`__SH3__`] [3.0.0]] + [[`__sh2__`] [2.0.0]] + [[`__sh1__`] [1.0.0]] + ] + */ + +#define BOOST_ARCH_SH BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__sh__) +# undef BOOST_ARCH_SH +# if !defined(BOOST_ARCH_SH) && (defined(__SH5__)) +# define BOOST_ARCH_SH BOOST_VERSION_NUMBER(5,0,0) +# endif +# if !defined(BOOST_ARCH_SH) && (defined(__SH4__)) +# define BOOST_ARCH_SH BOOST_VERSION_NUMBER(4,0,0) +# endif +# if !defined(BOOST_ARCH_SH) && (defined(__sh3__) || defined(__SH3__)) +# define BOOST_ARCH_SH BOOST_VERSION_NUMBER(3,0,0) +# endif +# if !defined(BOOST_ARCH_SH) && (defined(__sh2__)) +# define BOOST_ARCH_SH BOOST_VERSION_NUMBER(2,0,0) +# endif +# if !defined(BOOST_ARCH_SH) && (defined(__sh1__)) +# define BOOST_ARCH_SH BOOST_VERSION_NUMBER(1,0,0) +# endif +# if !defined(BOOST_ARCH_SH) +# define BOOST_ARCH_SH BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_SH +# define BOOST_ARCH_SH_AVAILABLE +#endif + +#define BOOST_ARCH_SH_NAME "SuperH" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_SH,BOOST_ARCH_SH_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/architecture/sys370.h b/ThirdParty/boost-Subset/boost/predef/architecture/sys370.h new file mode 100644 index 0000000000..cfd85dc803 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/architecture/sys370.h @@ -0,0 +1,43 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_SYS370_H +#define BOOST_PREDEF_ARCHITECTURE_SYS370_H + +#include +#include + +/*` +[heading `BOOST_ARCH_SYS370`] + +[@http://en.wikipedia.org/wiki/System/370 System/370] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__370__`] [__predef_detection__]] + [[`__THW_370__`] [__predef_detection__]] + ] + */ + +#define BOOST_ARCH_SYS370 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__370__) || defined(__THW_370__) +# undef BOOST_ARCH_SYS370 +# define BOOST_ARCH_SYS370 BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_SYS370 +# define BOOST_ARCH_SYS370_AVAILABLE +#endif + +#define BOOST_ARCH_SYS370_NAME "System/370" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_SYS370,BOOST_ARCH_SYS370_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/architecture/sys390.h b/ThirdParty/boost-Subset/boost/predef/architecture/sys390.h new file mode 100644 index 0000000000..47aff6acd6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/architecture/sys390.h @@ -0,0 +1,43 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_SYS390_H +#define BOOST_PREDEF_ARCHITECTURE_SYS390_H + +#include +#include + +/*` +[heading `BOOST_ARCH_SYS390`] + +[@http://en.wikipedia.org/wiki/System/390 System/390] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__s390__`] [__predef_detection__]] + [[`__s390x__`] [__predef_detection__]] + ] + */ + +#define BOOST_ARCH_SYS390 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__s390__) || defined(__s390x__) +# undef BOOST_ARCH_SYS390 +# define BOOST_ARCH_SYS390 BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_SYS390 +# define BOOST_ARCH_SYS390_AVAILABLE +#endif + +#define BOOST_ARCH_SYS390_NAME "System/390" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_SYS390,BOOST_ARCH_SYS390_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/architecture/x86.h b/ThirdParty/boost-Subset/boost/predef/architecture/x86.h new file mode 100644 index 0000000000..0ef3ef45ef --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/architecture/x86.h @@ -0,0 +1,38 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#include +#include + +#ifndef BOOST_PREDEF_ARCHITECTURE_X86_H +#define BOOST_PREDEF_ARCHITECTURE_X86_H + +/*` +[heading `BOOST_ARCH_X86`] + +[@http://en.wikipedia.org/wiki/X86 Intel x86] architecture. This is +a category to indicate that either `BOOST_ARCH_X86_32` or +`BOOST_ARCH_X86_64` is detected. + */ + +#define BOOST_ARCH_X86 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if BOOST_ARCH_X86_32 || BOOST_ARCH_X86_64 +# undef BOOST_ARCH_X86 +# define BOOST_ARCH_X86 BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_X86 +# define BOOST_ARCH_X86_AVAILABLE +#endif + +#define BOOST_ARCH_X86_NAME "Intel x86" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_X86,BOOST_ARCH_X86_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/architecture/x86/32.h b/ThirdParty/boost-Subset/boost/predef/architecture/x86/32.h new file mode 100644 index 0000000000..17fbff554a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/architecture/x86/32.h @@ -0,0 +1,87 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_X86_32_H +#define BOOST_PREDEF_ARCHITECTURE_X86_32_H + +#include +#include + +/*` +[heading `BOOST_ARCH_X86_32`] + +[@http://en.wikipedia.org/wiki/X86 Intel x86] architecture: +If available versions \[3-6\] are specifically detected. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`i386`] [__predef_detection__]] + [[`__i386__`] [__predef_detection__]] + [[`__i486__`] [__predef_detection__]] + [[`__i586__`] [__predef_detection__]] + [[`__i686__`] [__predef_detection__]] + [[`__i386`] [__predef_detection__]] + [[`_M_IX86`] [__predef_detection__]] + [[`_X86_`] [__predef_detection__]] + [[`__THW_INTEL__`] [__predef_detection__]] + [[`__I86__`] [__predef_detection__]] + [[`__INTEL__`] [__predef_detection__]] + + [[`__I86__`] [V.0.0]] + [[`_M_IX86`] [V.0.0]] + [[`__i686__`] [6.0.0]] + [[`__i586__`] [5.0.0]] + [[`__i486__`] [4.0.0]] + [[`__i386__`] [3.0.0]] + ] + */ + +#define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(i386) || defined(__i386__) || \ + defined(__i486__) || defined(__i586__) || \ + defined(__i686__) || defined(__i386) || \ + defined(_M_IX86) || defined(_X86_) || \ + defined(__THW_INTEL__) || defined(__I86__) || \ + defined(__INTEL__) +# undef BOOST_ARCH_X86_32 +# if !defined(BOOST_ARCH_X86_32) && defined(__I86__) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(__I86__,0,0) +# endif +# if !defined(BOOST_ARCH_X86_32) && defined(_M_IX86) +# define BOOST_ARCH_X86_32 BOOST_PREDEF_MAKE_10_VV00(_M_IX86) +# endif +# if !defined(BOOST_ARCH_X86_32) && defined(__i686__) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(6,0,0) +# endif +# if !defined(BOOST_ARCH_X86_32) && defined(__i586__) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(5,0,0) +# endif +# if !defined(BOOST_ARCH_X86_32) && defined(__i486__) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(4,0,0) +# endif +# if !defined(BOOST_ARCH_X86_32) && defined(__i386__) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(3,0,0) +# endif +# if !defined(BOOST_ARCH_X86_32) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_X86_32 +# define BOOST_ARCH_X86_32_AVAILABLE +#endif + +#define BOOST_ARCH_X86_32_NAME "Intel x86-32" + +#include + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_X86_32,BOOST_ARCH_X86_32_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/architecture/x86/64.h b/ThirdParty/boost-Subset/boost/predef/architecture/x86/64.h new file mode 100644 index 0000000000..f761c92596 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/architecture/x86/64.h @@ -0,0 +1,50 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_X86_64_H +#define BOOST_PREDEF_ARCHITECTURE_X86_64_H + +#include +#include + +/*` +[heading `BOOST_ARCH_X86_64`] + +[@http://en.wikipedia.org/wiki/Ia64 Intel IA-64] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__x86_64`] [__predef_detection__]] + [[`__x86_64__`] [__predef_detection__]] + [[`__amd64__`] [__predef_detection__]] + [[`__amd64`] [__predef_detection__]] + [[`_M_X64`] [__predef_detection__]] + ] + */ + +#define BOOST_ARCH_X86_64 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__x86_64) || defined(__x86_64__) || \ + defined(__amd64__) || defined(__amd64) || \ + defined(_M_X64) +# undef BOOST_ARCH_X86_64 +# define BOOST_ARCH_X86_64 BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_X86_64 +# define BOOST_ARCH_X86_64_AVAILABLE +#endif + +#define BOOST_ARCH_X86_64_NAME "Intel x86-64" + +#include + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_X86_64,BOOST_ARCH_X86_64_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/architecture/z.h b/ThirdParty/boost-Subset/boost/predef/architecture/z.h new file mode 100644 index 0000000000..3d218aa264 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/architecture/z.h @@ -0,0 +1,42 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_Z_H +#define BOOST_PREDEF_ARCHITECTURE_Z_H + +#include +#include + +/*` +[heading `BOOST_ARCH_Z`] + +[@http://en.wikipedia.org/wiki/Z/Architecture z/Architecture] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__SYSC_ZARCH__`] [__predef_detection__]] + ] + */ + +#define BOOST_ARCH_Z BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__SYSC_ZARCH__) +# undef BOOST_ARCH_Z +# define BOOST_ARCH_Z BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_Z +# define BOOST_ARCH_Z_AVAILABLE +#endif + +#define BOOST_ARCH_Z_NAME "z/Architecture" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_Z,BOOST_ARCH_Z_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/compiler.h b/ThirdParty/boost-Subset/boost/predef/compiler.h new file mode 100644 index 0000000000..61a4c527ab --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler.h @@ -0,0 +1,43 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#if !defined(BOOST_PREDEF_COMPILER_H) || defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS) +#ifndef BOOST_PREDEF_COMPILER_H +#define BOOST_PREDEF_COMPILER_H +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/borland.h b/ThirdParty/boost-Subset/boost/predef/compiler/borland.h new file mode 100644 index 0000000000..3677cca7fd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/borland.h @@ -0,0 +1,63 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_BORLAND_H +#define BOOST_PREDEF_COMPILER_BORLAND_H + +#include +#include + +/*` +[heading `BOOST_COMP_BORLAND`] + +[@http://en.wikipedia.org/wiki/C_plus_plus_builder Borland C++] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__BORLANDC__`] [__predef_detection__]] + [[`__CODEGEARC__`] [__predef_detection__]] + + [[`__BORLANDC__`] [V.R.P]] + [[`__CODEGEARC__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_BORLAND BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__BORLANDC__) || defined(__CODEGEARC__) +# if !defined(BOOST_COMP_BORLAND_DETECTION) && (defined(__CODEGEARC__)) +# define BOOST_COMP_BORLAND_DETECTION BOOST_PREDEF_MAKE_0X_VVRP(__CODEGEARC__) +# endif +# if !defined(BOOST_COMP_BORLAND_DETECTION) +# define BOOST_COMP_BORLAND_DETECTION BOOST_PREDEF_MAKE_0X_VVRP(__BORLANDC__) +# endif +#endif + +#ifdef BOOST_COMP_BORLAND_DETECTION +# define BOOST_COMP_BORLAND_AVAILABLE +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_BORLAND_EMULATED BOOST_COMP_BORLAND_DETECTION +# else +# undef BOOST_COMP_BORLAND +# define BOOST_COMP_BORLAND BOOST_COMP_BORLAND_DETECTION +# endif +# include +#endif + +#define BOOST_COMP_BORLAND_NAME "Borland C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_BORLAND,BOOST_COMP_BORLAND_NAME) + +#ifdef BOOST_COMP_BORLAND_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_BORLAND_EMULATED,BOOST_COMP_BORLAND_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/clang.h b/ThirdParty/boost-Subset/boost/predef/compiler/clang.h new file mode 100644 index 0000000000..56678fe6a5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/clang.h @@ -0,0 +1,56 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_CLANG_H +#define BOOST_PREDEF_COMPILER_CLANG_H + +#include +#include + +/*` +[heading `BOOST_COMP_CLANG`] + +[@http://en.wikipedia.org/wiki/Clang Clang] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__clang__`] [__predef_detection__]] + + [[`__clang_major__`, `__clang_minor__`, `__clang_patchlevel__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_CLANG BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__clang__) +# define BOOST_COMP_CLANG_DETECTION BOOST_VERSION_NUMBER(__clang_major__,__clang_minor__,__clang_patchlevel__) +#endif + +#ifdef BOOST_COMP_CLANG_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_CLANG_EMULATED BOOST_COMP_CLANG_DETECTION +# else +# undef BOOST_COMP_CLANG +# define BOOST_COMP_CLANG BOOST_COMP_CLANG_DETECTION +# endif +# define BOOST_COMP_CLANG_AVAILABLE +# include +#endif + +#define BOOST_COMP_CLANG_NAME "Clang" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_CLANG,BOOST_COMP_CLANG_NAME) + +#ifdef BOOST_COMP_CLANG_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_CLANG_EMULATED,BOOST_COMP_CLANG_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/comeau.h b/ThirdParty/boost-Subset/boost/predef/compiler/comeau.h new file mode 100644 index 0000000000..15a4564896 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/comeau.h @@ -0,0 +1,61 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_COMEAU_H +#define BOOST_PREDEF_COMPILER_COMEAU_H + +#include +#include + +#define BOOST_COMP_COMO BOOST_VERSION_NUMBER_NOT_AVAILABLE + +/*` +[heading `BOOST_COMP_COMO`] + +[@http://en.wikipedia.org/wiki/Comeau_C/C%2B%2B Comeau C++] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__COMO__`] [__predef_detection__]] + + [[`__COMO_VERSION__`] [V.R.P]] + ] + */ + +#if defined(__COMO__) +# if !defined(BOOST_COMP_COMO_DETECTION) && defined(__COMO_VERSION__) +# define BOOST_COMP_COMO_DETECTION BOOST_PREDEF_MAKE_0X_VRP(__COMO_VERSION__) +# endif +# if !defined(BOOST_COMP_COMO_DETECTION) +# define BOOST_COMP_COMO_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_COMO_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_COMO_EMULATED BOOST_COMP_COMO_DETECTION +# else +# undef BOOST_COMP_COMO +# define BOOST_COMP_COMO BOOST_COMP_COMO_DETECTION +# endif +# define BOOST_COMP_COMO_AVAILABLE +# include +#endif + +#define BOOST_COMP_COMO_NAME "Comeau C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_COMO,BOOST_COMP_COMO_NAME) + +#ifdef BOOST_COMP_COMO_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_COMO_EMULATED,BOOST_COMP_COMO_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/compaq.h b/ThirdParty/boost-Subset/boost/predef/compiler/compaq.h new file mode 100644 index 0000000000..96a79e6756 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/compaq.h @@ -0,0 +1,66 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_COMPAQ_H +#define BOOST_PREDEF_COMPILER_COMPAQ_H + +#include +#include + +/*` +[heading `BOOST_COMP_DEC`] + +[@http://www.openvms.compaq.com/openvms/brochures/deccplus/ Compaq C/C++] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__DECCXX`] [__predef_detection__]] + [[`__DECC`] [__predef_detection__]] + + [[`__DECCXX_VER`] [V.R.P]] + [[`__DECC_VER`] [V.R.P]] + ] + */ + +#define BOOST_COMP_DEC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__DECC) || defined(__DECCXX) +# if !defined(BOOST_COMP_DEC_DETECTION) && defined(__DECCXX_VER) +# define BOOST_COMP_DEC_DETECTION BOOST_PREDEF_MAKE_10_VVRR0PP00(__DECCXX_VER) +# endif +# if !defined(BOOST_COMP_DEC_DETECTION) && defined(__DECC_VER) +# define BOOST_COMP_DEC_DETECTION BOOST_PREDEF_MAKE_10_VVRR0PP00(__DECC_VER) +# endif +# if !defined(BOOST_COMP_DEC_DETECTION) +# define BOOST_COM_DEC_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_DEC_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_DEC_EMULATED BOOST_COMP_DEC_DETECTION +# else +# undef BOOST_COMP_DEC +# define BOOST_COMP_DEC BOOST_COMP_DEC_DETECTION +# endif +# define BOOST_COMP_DEC_AVAILABLE +# include +#endif + +#define BOOST_COMP_DEC_NAME "Compaq C/C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_DEC,BOOST_COMP_DEC_NAME) + +#ifdef BOOST_COMP_DEC_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_DEC_EMULATED,BOOST_COMP_DEC_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/diab.h b/ThirdParty/boost-Subset/boost/predef/compiler/diab.h new file mode 100644 index 0000000000..f5a37de7d3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/diab.h @@ -0,0 +1,56 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_DIAB_H +#define BOOST_PREDEF_COMPILER_DIAB_H + +#include +#include + +/*` +[heading `BOOST_COMP_DIAB`] + +[@http://www.windriver.com/products/development_suite/wind_river_compiler/ Diab C/C++] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__DCC__`] [__predef_detection__]] + + [[`__VERSION_NUMBER__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_DIAB BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__DCC__) +# define BOOST_COMP_DIAB_DETECTION BOOST_PREDEF_MAKE_10_VRPP(__VERSION_NUMBER__) +#endif + +#ifdef BOOST_COMP_DIAB_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_DIAB_EMULATED BOOST_COMP_DIAB_DETECTION +# else +# undef BOOST_COMP_DIAB +# define BOOST_COMP_DIAB BOOST_COMP_DIAB_DETECTION +# endif +# define BOOST_COMP_DIAB_AVAILABLE +# include +#endif + +#define BOOST_COMP_DIAB_NAME "Diab C/C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_DIAB,BOOST_COMP_DIAB_NAME) + +#ifdef BOOST_COMP_DIAB_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_DIAB_EMULATED,BOOST_COMP_DIAB_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/digitalmars.h b/ThirdParty/boost-Subset/boost/predef/compiler/digitalmars.h new file mode 100644 index 0000000000..9bd58502e0 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/digitalmars.h @@ -0,0 +1,56 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_DIGITALMARS_H +#define BOOST_PREDEF_COMPILER_DIGITALMARS_H + +#include +#include + +/*` +[heading `BOOST_COMP_DMC`] + +[@http://en.wikipedia.org/wiki/Digital_Mars Digital Mars] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__DMC__`] [__predef_detection__]] + + [[`__DMC__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_DMC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__DMC__) +# define BOOST_COMP_DMC_DETECTION BOOST_PREDEF_MAKE_0X_VRP(__DMC__) +#endif + +#ifdef BOOST_COMP_DMC_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_DMC_EMULATED BOOST_COMP_DMC_DETECTION +# else +# undef BOOST_COMP_DMC +# define BOOST_COMP_DMC BOOST_COMP_DMC_DETECTION +# endif +# define BOOST_COMP_DMC_AVAILABLE +# include +#endif + +#define BOOST_COMP_DMC_NAME "Digital Mars" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_DMC,BOOST_COMP_DMC_NAME) + +#ifdef BOOST_COMP_DMC_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_DMC_EMULATED,BOOST_COMP_DMC_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/dignus.h b/ThirdParty/boost-Subset/boost/predef/compiler/dignus.h new file mode 100644 index 0000000000..c65d3dc764 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/dignus.h @@ -0,0 +1,56 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_DIGNUS_H +#define BOOST_PREDEF_COMPILER_DIGNUS_H + +#include +#include + +/*` +[heading `BOOST_COMP_SYSC`] + +[@http://www.dignus.com/dcxx/ Dignus Systems/C++] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__SYSC__`] [__predef_detection__]] + + [[`__SYSC_VER__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_SYSC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__SYSC__) +# define BOOST_COMP_SYSC_DETECTION BOOST_PREDEF_MAKE_10_VRRPP(__SYSC_VER__) +#endif + +#ifdef BOOST_COMP_SYSC_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_SYSC_EMULATED BOOST_COMP_SYSC_DETECTION +# else +# undef BOOST_COMP_SYSC +# define BOOST_COMP_SYSC BOOST_COMP_SYSC_DETECTION +# endif +# define BOOST_COMP_SYSC_AVAILABLE +# include +#endif + +#define BOOST_COMP_SYSC_NAME "Dignus Systems/C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_SYSC,BOOST_COMP_SYSC_NAME) + +#ifdef BOOST_COMP_SYSC_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_SYSC_EMULATED,BOOST_COMP_SYSC_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/edg.h b/ThirdParty/boost-Subset/boost/predef/compiler/edg.h new file mode 100644 index 0000000000..2ffb9b0a6d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/edg.h @@ -0,0 +1,56 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_EDG_H +#define BOOST_PREDEF_COMPILER_EDG_H + +#include +#include + +/*` +[heading `BOOST_COMP_EDG`] + +[@http://en.wikipedia.org/wiki/Edison_Design_Group EDG C++ Frontend] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__EDG__`] [__predef_detection__]] + + [[`__EDG_VERSION__`] [V.R.0]] + ] + */ + +#define BOOST_COMP_EDG BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__EDG__) +# define BOOST_COMP_EDG_DETECTION BOOST_PREDEF_MAKE_10_VRR(__EDG_VERSION__) +#endif + +#ifdef BOOST_COMP_EDG_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_EDG_EMULATED BOOST_COMP_EDG_DETECTION +# else +# undef BOOST_COMP_EDG +# define BOOST_COMP_EDG BOOST_COMP_EDG_DETECTION +# endif +# define BOOST_COMP_EDG_AVAILABLE +# include +#endif + +#define BOOST_COMP_EDG_NAME "EDG C++ Frontend" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_EDG,BOOST_COMP_EDG_NAME) + +#ifdef BOOST_COMP_EDG_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_EDG_EMULATED,BOOST_COMP_EDG_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/ekopath.h b/ThirdParty/boost-Subset/boost/predef/compiler/ekopath.h new file mode 100644 index 0000000000..e5cde36752 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/ekopath.h @@ -0,0 +1,57 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_EKOPATH_H +#define BOOST_PREDEF_COMPILER_EKOPATH_H + +#include +#include + +/*` +[heading `BOOST_COMP_PATH`] + +[@http://en.wikipedia.org/wiki/PathScale EKOpath] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__PATHCC__`] [__predef_detection__]] + + [[`__PATHCC__`, `__PATHCC_MINOR__`, `__PATHCC_PATCHLEVEL__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_PATH BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__PATHCC__) +# define BOOST_COMP_PATH_DETECTION \ + BOOST_VERSION_NUMBER(__PATHCC__,__PATHCC_MINOR__,__PATHCC_PATCHLEVEL__) +#endif + +#ifdef BOOST_COMP_PATH_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_PATH_EMULATED BOOST_COMP_PATH_DETECTION +# else +# undef BOOST_COMP_PATH +# define BOOST_COMP_PATH BOOST_COMP_PATH_DETECTION +# endif +# define BOOST_COMP_PATH_AVAILABLE +# include +#endif + +#define BOOST_COMP_PATH_NAME "EKOpath" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_PATH,BOOST_COMP_PATH_NAME) + +#ifdef BOOST_COMP_PATH_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_PATH_EMULATED,BOOST_COMP_PATH_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/gcc.h b/ThirdParty/boost-Subset/boost/predef/compiler/gcc.h new file mode 100644 index 0000000000..c2d7fff178 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/gcc.h @@ -0,0 +1,68 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_GCC_H +#define BOOST_PREDEF_COMPILER_GCC_H + +/* Other compilers that emulate this one need to be detected first. */ + +#include + +#include +#include + +/*` +[heading `BOOST_COMP_GNUC`] + +[@http://en.wikipedia.org/wiki/GNU_Compiler_Collection Gnu GCC C/C++] compiler. +Version number available as major, minor, and patch (if available). + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__GNUC__`] [__predef_detection__]] + + [[`__GNUC__`, `__GNUC_MINOR__`, `__GNUC_PATCHLEVEL__`] [V.R.P]] + [[`__GNUC__`, `__GNUC_MINOR__`] [V.R.0]] + ] + */ + +#define BOOST_COMP_GNUC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__GNUC__) +# if !defined(BOOST_COMP_GNUC_DETECTION) && defined(__GNUC_PATCHLEVEL__) +# define BOOST_COMP_GNUC_DETECTION \ + BOOST_VERSION_NUMBER(__GNUC__,__GNUC_MINOR__,__GNUC_PATCHLEVEL__) +# endif +# if !defined(BOOST_COMP_GNUC_DETECTION) +# define BOOST_COMP_GNUC_DETECTION \ + BOOST_VERSION_NUMBER(__GNUC__,__GNUC_MINOR__,0) +# endif +#endif + +#ifdef BOOST_COMP_GNUC_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_GNUC_EMULATED BOOST_COMP_GNUC_DETECTION +# else +# undef BOOST_COMP_GNUC +# define BOOST_COMP_GNUC BOOST_COMP_GNUC_DETECTION +# endif +# define BOOST_COMP_GNUC_AVAILABLE +# include +#endif + +#define BOOST_COMP_GNUC_NAME "Gnu GCC C/C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_GNUC,BOOST_COMP_GNUC_NAME) + +#ifdef BOOST_COMP_GNUC_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_GNUC_EMULATED,BOOST_COMP_GNUC_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/gcc_xml.h b/ThirdParty/boost-Subset/boost/predef/compiler/gcc_xml.h new file mode 100644 index 0000000000..acae600c81 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/gcc_xml.h @@ -0,0 +1,53 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_GCC_XML_H +#define BOOST_PREDEF_COMPILER_GCC_XML_H + +#include +#include + +/*` +[heading `BOOST_COMP_GCCXML`] + +[@http://www.gccxml.org/ GCC XML] compiler. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__GCCXML__`] [__predef_detection__]] + ] + */ + +#define BOOST_COMP_GCCXML BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__GCCXML__) +# define BOOST_COMP_GCCXML_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#ifdef BOOST_COMP_GCCXML_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_GCCXML_EMULATED BOOST_COMP_GCCXML_DETECTION +# else +# undef BOOST_COMP_GCCXML +# define BOOST_COMP_GCCXML BOOST_COMP_GCCXML_DETECTION +# endif +# define BOOST_COMP_GCCXML_AVAILABLE +# include +#endif + +#define BOOST_COMP_GCCXML_NAME "GCC XML" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_GCCXML,BOOST_COMP_GCCXML_NAME) + +#ifdef BOOST_COMP_GCCXML_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_GCCXML_EMULATED,BOOST_COMP_GCCXML_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/greenhills.h b/ThirdParty/boost-Subset/boost/predef/compiler/greenhills.h new file mode 100644 index 0000000000..23b8f017d8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/greenhills.h @@ -0,0 +1,66 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_GREENHILLS_H +#define BOOST_PREDEF_COMPILER_GREENHILLS_H + +#include +#include + +/*` +[heading `BOOST_COMP_GHS`] + +[@http://en.wikipedia.org/wiki/Green_Hills_Software Green Hills C/C++] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__ghs`] [__predef_detection__]] + [[`__ghs__`] [__predef_detection__]] + + [[`__GHS_VERSION_NUMBER__`] [V.R.P]] + [[`__ghs`] [V.R.P]] + ] + */ + +#define BOOST_COMP_GHS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__ghs) || defined(__ghs__) +# if !defined(BOOST_COMP_GHS_DETECTION) && defined(__GHS_VERSION_NUMBER__) +# define BOOST_COMP_GHS_DETECTION BOOST_PREDEF_MAKE_10_VRP(__GHS_VERSION_NUMBER__) +# endif +# if !defined(BOOST_COMP_GHS_DETECTION) && defined(__ghs) +# define BOOST_COMP_GHS_DETECTION BOOST_PREDEF_MAKE_10_VRP(__ghs) +# endif +# if !defined(BOOST_COMP_GHS_DETECTION) +# define BOOST_COMP_GHS_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_GHS_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_GHS_EMULATED BOOST_COMP_GHS_DETECTION +# else +# undef BOOST_COMP_GHS +# define BOOST_COMP_GHS BOOST_COMP_GHS_DETECTION +# endif +# define BOOST_COMP_GHS_AVAILABLE +# include +#endif + +#define BOOST_COMP_GHS_NAME "Green Hills C/C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_GHS,BOOST_COMP_GHS_NAME) + +#ifdef BOOST_COMP_GHS_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_GHS_EMULATED,BOOST_COMP_GHS_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/hp_acc.h b/ThirdParty/boost-Subset/boost/predef/compiler/hp_acc.h new file mode 100644 index 0000000000..7b3ffe9068 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/hp_acc.h @@ -0,0 +1,61 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_HP_ACC_H +#define BOOST_PREDEF_COMPILER_HP_ACC_H + +#include +#include + +/*` +[heading `BOOST_COMP_HPACC`] + +HP aC++ compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__HP_aCC`] [__predef_detection__]] + + [[`__HP_aCC`] [V.R.P]] + ] + */ + +#define BOOST_COMP_HPACC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__HP_aCC) +# if !defined(BOOST_COMP_HPACC_DETECTION) && (__HP_aCC > 1) +# define BOOST_COMP_HPACC_DETECTION BOOST_PREDEF_MAKE_10_VVRRPP(__HP_aCC) +# endif +# if !defined(BOOST_COMP_HPACC_DETECTION) +# define BOOST_COMP_HPACC_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_HPACC_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_HPACC_EMULATED BOOST_COMP_HPACC_DETECTION +# else +# undef BOOST_COMP_HPACC +# define BOOST_COMP_HPACC BOOST_COMP_HPACC_DETECTION +# endif +# define BOOST_COMP_HPACC_AVAILABLE +# include +#endif + +#define BOOST_COMP_HPACC_NAME "HP aC++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_HPACC,BOOST_COMP_HPACC_NAME) + +#ifdef BOOST_COMP_HPACC_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_HPACC_EMULATED,BOOST_COMP_HPACC_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/iar.h b/ThirdParty/boost-Subset/boost/predef/compiler/iar.h new file mode 100644 index 0000000000..237f492e29 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/iar.h @@ -0,0 +1,56 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_IAR_H +#define BOOST_PREDEF_COMPILER_IAR_H + +#include +#include + +/*` +[heading `BOOST_COMP_IAR`] + +IAR C/C++ compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__IAR_SYSTEMS_ICC__`] [__predef_detection__]] + + [[`__VER__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_IAR BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__IAR_SYSTEMS_ICC__) +# define BOOST_COMP_IAR_DETECTION BOOST_PREDEF_MAKE_10_VVRR(__VER__) +#endif + +#ifdef BOOST_COMP_IAR_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_IAR_EMULATED BOOST_COMP_IAR_DETECTION +# else +# undef BOOST_COMP_IAR +# define BOOST_COMP_IAR BOOST_COMP_IAR_DETECTION +# endif +# define BOOST_COMP_IAR_AVAILABLE +# include +#endif + +#define BOOST_COMP_IAR_NAME "IAR C/C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_IAR,BOOST_COMP_IAR_NAME) + +#ifdef BOOST_COMP_IAR_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_IAR_EMULATED,BOOST_COMP_IAR_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/ibm.h b/ThirdParty/boost-Subset/boost/predef/compiler/ibm.h new file mode 100644 index 0000000000..6931ebd884 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/ibm.h @@ -0,0 +1,72 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_IBM_H +#define BOOST_PREDEF_COMPILER_IBM_H + +#include +#include + +/*` +[heading `BOOST_COMP_IBM`] + +[@http://en.wikipedia.org/wiki/VisualAge IBM XL C/C++] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__IBMCPP__`] [__predef_detection__]] + [[`__xlC__`] [__predef_detection__]] + [[`__xlc__`] [__predef_detection__]] + + [[`__COMPILER_VER__`] [V.R.P]] + [[`__xlC__`] [V.R.P]] + [[`__xlc__`] [V.R.P]] + [[`__IBMCPP__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_IBM BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__IBMCPP__) || defined(__xlC__) || defined(__xlc__) +# if !defined(BOOST_COMP_IBM_DETECTION) && defined(__COMPILER_VER__) +# define BOOST_COMP_IBM_DETECTION BOOST_PREDEF_MAKE_0X_VRRPPPP(__COMPILER_VER__) +# endif +# if !defined(BOOST_COMP_IBM_DETECTION) && defined(__xlC__) +# define BOOST_COMP_IBM_DETECTION BOOST_PREDEF_MAKE_0X_VVRR(__xlC__) +# endif +# if !defined(BOOST_COMP_IBM_DETECTION) && defined(__xlc__) +# define BOOST_COMP_IBM_DETECTION BOOST_PREDEF_MAKE_0X_VVRR(__xlc__) +# endif +# if !defined(BOOST_COMP_IBM_DETECTION) +# define BOOST_COMP_IBM_DETECTION BOOST_PREDEF_MAKE_10_VRP(__IBMCPP__) +# endif +#endif + +#ifdef BOOST_COMP_IBM_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_IBM_EMULATED BOOST_COMP_IBM_DETECTION +# else +# undef BOOST_COMP_IBM +# define BOOST_COMP_IBM BOOST_COMP_IBM_DETECTION +# endif +# define BOOST_COMP_IBM_AVAILABLE +# include +#endif + +#define BOOST_COMP_IBM_NAME "IBM XL C/C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_IBM,BOOST_COMP_IBM_NAME) + +#ifdef BOOST_COMP_IBM_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_IBM_EMULATED,BOOST_COMP_IBM_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/intel.h b/ThirdParty/boost-Subset/boost/predef/compiler/intel.h new file mode 100644 index 0000000000..65bde6778a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/intel.h @@ -0,0 +1,65 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_INTEL_H +#define BOOST_PREDEF_COMPILER_INTEL_H + +#include +#include + +/*` +[heading `BOOST_COMP_INTEL`] + +[@http://en.wikipedia.org/wiki/Intel_C%2B%2B Intel C/C++] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__INTEL_COMPILER`] [__predef_detection__]] + [[`__ICL`] [__predef_detection__]] + [[`__ICC`] [__predef_detection__]] + [[`__ECC`] [__predef_detection__]] + + [[`__INTEL_COMPILER`] [V.R.P]] + ] + */ + +#define BOOST_COMP_INTEL BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || \ + defined(__ECC) +# if !defined(BOOST_COMP_INTEL_DETECTION) && defined(__INTEL_COMPILER) +# define BOOST_COMP_INTEL_DETECTION BOOST_PREDEF_MAKE_10_VRP(__INTEL_COMPILER) +# endif +# if !defined(BOOST_COMP_INTEL_DETECTION) +# define BOOST_COMP_INTEL_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_INTEL_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_INTEL_EMULATED BOOST_COMP_INTEL_DETECTION +# else +# undef BOOST_COMP_INTEL +# define BOOST_COMP_INTEL BOOST_COMP_INTEL_DETECTION +# endif +# define BOOST_COMP_INTEL_AVAILABLE +# include +#endif + +#define BOOST_COMP_INTEL_NAME "Intel C/C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_INTEL,BOOST_COMP_INTEL_NAME) + +#ifdef BOOST_COMP_INTEL_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_INTEL_EMULATED,BOOST_COMP_INTEL_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/kai.h b/ThirdParty/boost-Subset/boost/predef/compiler/kai.h new file mode 100644 index 0000000000..68ce84e146 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/kai.h @@ -0,0 +1,56 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_KAI_H +#define BOOST_PREDEF_COMPILER_KAI_H + +#include +#include + +/*` +[heading `BOOST_COMP_KCC`] + +Kai C++ compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__KCC`] [__predef_detection__]] + + [[`__KCC_VERSION`] [V.R.P]] + ] + */ + +#define BOOST_COMP_KCC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__KCC) +# define BOOST_COMP_KCC_DETECTION BOOST_PREDEF_MAKE_0X_VRPP(__KCC_VERSION) +#endif + +#ifdef BOOST_COMP_KCC_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_KCC_EMULATED BOOST_COMP_KCC_DETECTION +# else +# undef BOOST_COMP_KCC +# define BOOST_COMP_KCC BOOST_COMP_KCC_DETECTION +# endif +# define BOOST_COMP_KCC_AVAILABLE +# include +#endif + +#define BOOST_COMP_KCC_NAME "Kai C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_KCC,BOOST_COMP_KCC_NAME) + +#ifdef BOOST_COMP_KCC_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_KCC_EMULATED,BOOST_COMP_KCC_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/llvm.h b/ThirdParty/boost-Subset/boost/predef/compiler/llvm.h new file mode 100644 index 0000000000..de654eb8ce --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/llvm.h @@ -0,0 +1,57 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_LLVM_H +#define BOOST_PREDEF_COMPILER_LLVM_H + +/* Other compilers that emulate this one need to be detected first. */ + +#include + +#include +#include + +/*` +[heading `BOOST_COMP_LLVM`] + +[@http://en.wikipedia.org/wiki/LLVM LLVM] compiler. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__llvm__`] [__predef_detection__]] + ] + */ + +#define BOOST_COMP_LLVM BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__llvm__) +# define BOOST_COMP_LLVM_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#ifdef BOOST_COMP_LLVM_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_LLVM_EMULATED BOOST_COMP_LLVM_DETECTION +# else +# undef BOOST_COMP_LLVM +# define BOOST_COMP_LLVM BOOST_COMP_LLVM_DETECTION +# endif +# define BOOST_COMP_LLVM_AVAILABLE +# include +#endif + +#define BOOST_COMP_LLVM_NAME "LLVM" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_LLVM,BOOST_COMP_LLVM_NAME) + +#ifdef BOOST_COMP_LLVM_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_LLVM_EMULATED,BOOST_COMP_LLVM_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/metaware.h b/ThirdParty/boost-Subset/boost/predef/compiler/metaware.h new file mode 100644 index 0000000000..1a32039cef --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/metaware.h @@ -0,0 +1,53 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_METAWARE_H +#define BOOST_PREDEF_COMPILER_METAWARE_H + +#include +#include + +/*` +[heading `BOOST_COMP_HIGHC`] + +MetaWare High C/C++ compiler. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__HIGHC__`] [__predef_detection__]] + ] + */ + +#define BOOST_COMP_HIGHC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__HIGHC__) +# define BOOST_COMP_HIGHC_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#ifdef BOOST_COMP_HIGHC_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_HIGHC_EMULATED BOOST_COMP_HIGHC_DETECTION +# else +# undef BOOST_COMP_HIGHC +# define BOOST_COMP_HIGHC BOOST_COMP_HIGHC_DETECTION +# endif +# define BOOST_COMP_HIGHC_AVAILABLE +# include +#endif + +#define BOOST_COMP_HIGHC_NAME "MetaWare High C/C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_HIGHC,BOOST_COMP_HIGHC_NAME) + +#ifdef BOOST_COMP_HIGHC_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_HIGHC_EMULATED,BOOST_COMP_HIGHC_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/metrowerks.h b/ThirdParty/boost-Subset/boost/predef/compiler/metrowerks.h new file mode 100644 index 0000000000..f2d739b958 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/metrowerks.h @@ -0,0 +1,77 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_METROWERKS_H +#define BOOST_PREDEF_COMPILER_METROWERKS_H + +#include +#include + +/*` +[heading `BOOST_COMP_MWERKS`] + +[@http://en.wikipedia.org/wiki/CodeWarrior Metrowerks CodeWarrior] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__MWERKS__`] [__predef_detection__]] + [[`__CWCC__`] [__predef_detection__]] + + [[`__CWCC__`] [V.R.P]] + [[`__MWERKS__`] [V.R.P >= 4.2.0]] + [[`__MWERKS__`] [9.R.0]] + [[`__MWERKS__`] [8.R.0]] + ] + */ + +#define BOOST_COMP_MWERKS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__MWERKS__) || defined(__CWCC__) +# if !defined(BOOST_COMP_MWERKS_DETECTION) && defined(__CWCC__) +# define BOOST_COMP_MWERKS_DETECTION BOOST_PREDEF_MAKE_0X_VRPP(__CWCC__) +# endif +# if !defined(BOOST_COMP_MWERKS_DETECTION) && (__MWERKS__ >= 0x4200) +# define BOOST_COMP_MWERKS_DETECTION BOOST_PREDEF_MAKE_0X_VRPP(__MWERKS__) +# endif +# if !defined(BOOST_COMP_MWERKS_DETECTION) && (__MWERKS__ >= 0x3204) // note the "skip": 04->9.3 +# define BOOST_COMP_MWERKS_DETECTION BOOST_VERSION_NUMBER(9,(__MWERKS__)%100-1,0) +# endif +# if !defined(BOOST_COMP_MWERKS_DETECTION) && (__MWERKS__ >= 0x3200) +# define BOOST_COMP_MWERKS_DETECTION BOOST_VERSION_NUMBER(9,(__MWERKS__)%100,0) +# endif +# if !defined(BOOST_COMP_MWERKS_DETECTION) && (__MWERKS__ >= 0x3000) +# define BOOST_COMP_MWERKS_DETECTION BOOST_VERSION_NUMBER(8,(__MWERKS__)%100,0) +# endif +# if !defined(BOOST_COMP_MWERKS_DETECTION) +# define BOOST_COMP_MWERKS_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_MWERKS_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_MWERKS_EMULATED BOOST_COMP_MWERKS_DETECTION +# else +# undef BOOST_COMP_MWERKS +# define BOOST_COMP_MWERKS BOOST_COMP_MWERKS_DETECTION +# endif +# define BOOST_COMP_MWERKS_AVAILABLE +# include +#endif + +#define BOOST_COMP_MWERKS_NAME "Metrowerks CodeWarrior" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MWERKS,BOOST_COMP_MWERKS_NAME) + +#ifdef BOOST_COMP_MWERKS_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MWERKS_EMULATED,BOOST_COMP_MWERKS_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/microtec.h b/ThirdParty/boost-Subset/boost/predef/compiler/microtec.h new file mode 100644 index 0000000000..066a6d2ad9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/microtec.h @@ -0,0 +1,53 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_MICROTEC_H +#define BOOST_PREDEF_COMPILER_MICROTEC_H + +#include +#include + +/*` +[heading `BOOST_COMP_MRI`] + +[@http://www.mentor.com/microtec/ Microtec C/C++] compiler. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`_MRI`] [__predef_detection__]] + ] + */ + +#define BOOST_COMP_MRI BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(_MRI) +# define BOOST_COMP_MRI_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#ifdef BOOST_COMP_MRI_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_MRI_EMULATED BOOST_COMP_MRI_DETECTION +# else +# undef BOOST_COMP_MRI +# define BOOST_COMP_MRI BOOST_COMP_MRI_DETECTION +# endif +# define BOOST_COMP_MRI_AVAILABLE +# include +#endif + +#define BOOST_COMP_MRI_NAME "Microtec C/C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MRI,BOOST_COMP_MRI_NAME) + +#ifdef BOOST_COMP_MRI_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MRI_EMULATED,BOOST_COMP_MRI_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/mpw.h b/ThirdParty/boost-Subset/boost/predef/compiler/mpw.h new file mode 100644 index 0000000000..118330646e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/mpw.h @@ -0,0 +1,63 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_MPW_H +#define BOOST_PREDEF_COMPILER_MPW_H + +#include +#include + +/*` +[heading `BOOST_COMP_MPW`] + +[@http://en.wikipedia.org/wiki/Macintosh_Programmer%27s_Workshop MPW C++] compiler. +Version number available as major, and minor. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__MRC__`] [__predef_detection__]] + [[`MPW_C`] [__predef_detection__]] + [[`MPW_CPLUS`] [__predef_detection__]] + + [[`__MRC__`] [V.R.0]] + ] + */ + +#define BOOST_COMP_MPW BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__MRC__) || defined(MPW_C) || defined(MPW_CPLUS) +# if !defined(BOOST_COMP_MPW_DETECTION) && defined(__MRC__) +# define BOOST_COMP_MPW_DETECTION BOOST_PREDEF_MAKE_0X_VVRR(__MRC__) +# endif +# if !defined(BOOST_COMP_MPW_DETECTION) +# define BOOST_COMP_MPW_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_MPW_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_MPW_EMULATED BOOST_COMP_MPW_DETECTION +# else +# undef BOOST_COMP_MPW +# define BOOST_COMP_MPW BOOST_COMP_MPW_DETECTION +# endif +# define BOOST_COMP_MPW_AVAILABLE +# include +#endif + +#define BOOST_COMP_MPW_NAME "MPW C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MPW,BOOST_COMP_MPW_NAME) + +#ifdef BOOST_COMP_MPW_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MPW_EMULATED,BOOST_COMP_MPW_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/palm.h b/ThirdParty/boost-Subset/boost/predef/compiler/palm.h new file mode 100644 index 0000000000..707925a651 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/palm.h @@ -0,0 +1,56 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_PALM_H +#define BOOST_PREDEF_COMPILER_PALM_H + +#include +#include + +/*` +[heading `BOOST_COMP_PALM`] + +Palm C/C++ compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`_PACC_VER`] [__predef_detection__]] + + [[`_PACC_VER`] [V.R.P]] + ] + */ + +#define BOOST_COMP_PALM BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(_PACC_VER) +# define BOOST_COMP_PALM_DETECTION BOOST_PREDEF_MAKE_0X_VRRPP000(_PACC_VER) +#endif + +#ifdef BOOST_COMP_PALM_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_PALM_EMULATED BOOST_COMP_PALM_DETECTION +# else +# undef BOOST_COMP_PALM +# define BOOST_COMP_PALM BOOST_COMP_PALM_DETECTION +# endif +# define BOOST_COMP_PALM_AVAILABLE +# include +#endif + +#define BOOST_COMP_PALM_NAME "Palm C/C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_PALM,BOOST_COMP_PALM_NAME) + +#ifdef BOOST_COMP_PALM_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_PALM_EMULATED,BOOST_COMP_PALM_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/pgi.h b/ThirdParty/boost-Subset/boost/predef/compiler/pgi.h new file mode 100644 index 0000000000..e016aeb080 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/pgi.h @@ -0,0 +1,60 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_PGI_H +#define BOOST_PREDEF_COMPILER_PGI_H + +#include +#include + +/*` +[heading `BOOST_COMP_PGI`] + +[@http://en.wikipedia.org/wiki/The_Portland_Group Portland Group C/C++] compiler. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__PGI`] [__predef_detection__]] + + [[`__PGIC__`, `__PGIC_MINOR__`, `__PGIC_PATCHLEVEL__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_PGI BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__PGI) +# if !defined(BOOST_COMP_PGI_DETECTION) && (defined(__PGIC__) && defined(__PGIC_MINOR__) && defined(__PGIC_PATCHLEVEL__)) +# define BOOST_COMP_PGI_DETECTION BOOST_VERSION_NUMBER(__PGIC__,__PGIC_MINOR__,__PGIC_PATCHLEVEL__) +# endif +# if !defined(BOOST_COMP_PGI_DETECTION) +# define BOOST_COMP_PGI_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_PGI_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_PGI_EMULATED BOOST_COMP_PGI_DETECTION +# else +# undef BOOST_COMP_PGI +# define BOOST_COMP_PGI BOOST_COMP_PGI_DETECTION +# endif +# define BOOST_COMP_PGI_AVAILABLE +# include +#endif + +#define BOOST_COMP_PGI_NAME "Portland Group C/C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_PGI,BOOST_COMP_PGI_NAME) + +#ifdef BOOST_COMP_PGI_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_PGI_EMULATED,BOOST_COMP_PGI_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/sgi_mipspro.h b/ThirdParty/boost-Subset/boost/predef/compiler/sgi_mipspro.h new file mode 100644 index 0000000000..00739f0c3c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/sgi_mipspro.h @@ -0,0 +1,66 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_SGI_MIPSPRO_H +#define BOOST_PREDEF_COMPILER_SGI_MIPSPRO_H + +#include +#include + +/*` +[heading `BOOST_COMP_SGI`] + +[@http://en.wikipedia.org/wiki/MIPSpro SGI MIPSpro] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__sgi`] [__predef_detection__]] + [[`sgi`] [__predef_detection__]] + + [[`_SGI_COMPILER_VERSION`] [V.R.P]] + [[`_COMPILER_VERSION`] [V.R.P]] + ] + */ + +#define BOOST_COMP_SGI BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__sgi) || defined(sgi) +# if !defined(BOOST_COMP_SGI_DETECTION) && defined(_SGI_COMPILER_VERSION) +# define BOOST_COMP_SGI_DETECTION BOOST_PREDEF_MAKE_10_VRP(_SGI_COMPILER_VERSION) +# endif +# if !defined(BOOST_COMP_SGI_DETECTION) && defined(_COMPILER_VERSION) +# define BOOST_COMP_SGI_DETECTION BOOST_PREDEF_MAKE_10_VRP(_COMPILER_VERSION) +# endif +# if !defined(BOOST_COMP_SGI_DETECTION) +# define BOOST_COMP_SGI_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_SGI_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_SGI_EMULATED BOOST_COMP_SGI_DETECTION +# else +# undef BOOST_COMP_SGI +# define BOOST_COMP_SGI BOOST_COMP_SGI_DETECTION +# endif +# define BOOST_COMP_SGI_AVAILABLE +# include +#endif + +#define BOOST_COMP_SGI_NAME "SGI MIPSpro" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_SGI,BOOST_COMP_SGI_NAME) + +#ifdef BOOST_COMP_SGI_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_SGI_EMULATED,BOOST_COMP_SGI_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/sunpro.h b/ThirdParty/boost-Subset/boost/predef/compiler/sunpro.h new file mode 100644 index 0000000000..92c3926013 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/sunpro.h @@ -0,0 +1,76 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_SUNPRO_H +#define BOOST_PREDEF_COMPILER_SUNPRO_H + +#include +#include + +/*` +[heading `BOOST_COMP_SUNPRO`] + +[@http://en.wikipedia.org/wiki/Oracle_Solaris_Studio Oracle Solaris Studio] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__SUNPRO_CC`] [__predef_detection__]] + [[`__SUNPRO_C`] [__predef_detection__]] + + [[`__SUNPRO_CC`] [V.R.P]] + [[`__SUNPRO_C`] [V.R.P]] + [[`__SUNPRO_CC`] [VV.RR.P]] + [[`__SUNPRO_C`] [VV.RR.P]] + ] + */ + +#define BOOST_COMP_SUNPRO BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__SUNPRO_CC) || defined(__SUNPRO_C) +# if !defined(BOOST_COMP_SUNPRO_DETECTION) && defined(__SUNPRO_CC) +# if (__SUNPRO_CC < 0x5100) +# define BOOST_COMP_SUNPRO_DETECTION BOOST_PREDEF_MAKE_0X_VRP(__SUNPRO_CC) +# else +# define BOOST_COMP_SUNPRO_DETECTION BOOST_PREDEF_MAKE_0X_VVRRP(__SUNPRO_CC) +# endif +# endif +# if !defined(BOOST_COMP_SUNPRO_DETECTION) && defined(__SUNPRO_C) +# if (__SUNPRO_C < 0x5100) +# define BOOST_COMP_SUNPRO_DETECTION BOOST_PREDEF_MAKE_0X_VRP(__SUNPRO_C) +# else +# define BOOST_COMP_SUNPRO_DETECTION BOOST_PREDEF_MAKE_0X_VVRRP(__SUNPRO_C) +# endif +# endif +# if !defined(BOOST_COMP_SUNPRO_DETECTION) +# define BOOST_COMP_SUNPRO_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_SUNPRO_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_SUNPRO_EMULATED BOOST_COMP_SUNPRO_DETECTION +# else +# undef BOOST_COMP_SUNPRO +# define BOOST_COMP_SUNPRO BOOST_COMP_SUNPRO_DETECTION +# endif +# define BOOST_COMP_SUNPRO_AVAILABLE +# include +#endif + +#define BOOST_COMP_SUNPRO_NAME "Oracle Solaris Studio" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_SUNPRO,BOOST_COMP_SUNPRO_NAME) + +#ifdef BOOST_COMP_SUNPRO_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_SUNPRO_EMULATED,BOOST_COMP_SUNPRO_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/tendra.h b/ThirdParty/boost-Subset/boost/predef/compiler/tendra.h new file mode 100644 index 0000000000..c2bc5e4ef5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/tendra.h @@ -0,0 +1,53 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_TENDRA_H +#define BOOST_PREDEF_COMPILER_TENDRA_H + +#include +#include + +/*` +[heading `BOOST_COMP_TENDRA`] + +[@http://en.wikipedia.org/wiki/TenDRA_Compiler TenDRA C/C++] compiler. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__TenDRA__`] [__predef_detection__]] + ] + */ + +#define BOOST_COMP_TENDRA BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__TenDRA__) +# define BOOST_COMP_TENDRA_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#ifdef BOOST_COMP_TENDRA_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_TENDRA_EMULATED BOOST_COMP_TENDRA_DETECTION +# else +# undef BOOST_COMP_TENDRA +# define BOOST_COMP_TENDRA BOOST_COMP_TENDRA_DETECTION +# endif +# define BOOST_COMP_TENDRA_AVAILABLE +# include +#endif + +#define BOOST_COMP_TENDRA_NAME "TenDRA C/C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_TENDRA,BOOST_COMP_TENDRA_NAME) + +#ifdef BOOST_COMP_TENDRA_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_TENDRA_EMULATED,BOOST_COMP_TENDRA_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/visualc.h b/ThirdParty/boost-Subset/boost/predef/compiler/visualc.h new file mode 100644 index 0000000000..9481d9d9fd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/visualc.h @@ -0,0 +1,91 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_VISUALC_H +#define BOOST_PREDEF_COMPILER_VISUALC_H + +/* Other compilers that emulate this one need to be detected first. */ + +#include + +#include +#include + +/*` +[heading `BOOST_COMP_MSVC`] + +[@http://en.wikipedia.org/wiki/Visual_studio Microsoft Visual C/C++] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`_MSC_VER`] [__predef_detection__]] + + [[`_MSC_FULL_VER`] [V.R.P]] + [[`_MSC_VER`] [V.R.0]] + ] + */ + +#define BOOST_COMP_MSVC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(_MSC_VER) +# if !defined (_MSC_FULL_VER) +# define BOOST_COMP_MSVC_BUILD 0 +# else + /* how many digits does the build number have? */ +# if _MSC_FULL_VER / 10000 == _MSC_VER + /* four digits */ +# define BOOST_COMP_MSVC_BUILD (_MSC_FULL_VER % 10000) +# elif _MSC_FULL_VER / 100000 == _MSC_VER + /* five digits */ +# define BOOST_COMP_MSVC_BUILD (_MSC_FULL_VER % 100000) +# else +# error "Cannot determine build number from _MSC_FULL_VER" +# endif +# endif + /* + VS2014 was skipped in the release sequence for MS. Which + means that the compiler and VS product versions are no longer + in sync. Hence we need to use different formulas for + mapping from MSC version to VS product version. + */ +# if (_MSC_VER >= 1900) +# define BOOST_COMP_MSVC_DETECTION BOOST_VERSION_NUMBER(\ + _MSC_VER/100-5,\ + _MSC_VER%100,\ + BOOST_COMP_MSVC_BUILD) +# else +# define BOOST_COMP_MSVC_DETECTION BOOST_VERSION_NUMBER(\ + _MSC_VER/100-6,\ + _MSC_VER%100,\ + BOOST_COMP_MSVC_BUILD) +# endif +#endif + +#ifdef BOOST_COMP_MSVC_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_MSVC_EMULATED BOOST_COMP_MSVC_DETECTION +# else +# undef BOOST_COMP_MSVC +# define BOOST_COMP_MSVC BOOST_COMP_MSVC_DETECTION +# endif +# define BOOST_COMP_MSVC_AVAILABLE +# include +#endif + +#define BOOST_COMP_MSVC_NAME "Microsoft Visual C/C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MSVC,BOOST_COMP_MSVC_NAME) + +#ifdef BOOST_COMP_MSVC_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MSVC_EMULATED,BOOST_COMP_MSVC_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/compiler/watcom.h b/ThirdParty/boost-Subset/boost/predef/compiler/watcom.h new file mode 100644 index 0000000000..b0e7776d06 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/compiler/watcom.h @@ -0,0 +1,56 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_WATCOM_H +#define BOOST_PREDEF_COMPILER_WATCOM_H + +#include +#include + +/*` +[heading `BOOST_COMP_WATCOM`] + +[@http://en.wikipedia.org/wiki/Watcom Watcom C++] compiler. +Version number available as major, and minor. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__WATCOMC__`] [__predef_detection__]] + + [[`__WATCOMC__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_WATCOM BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__WATCOMC__) +# define BOOST_COMP_WATCOM_DETECTION BOOST_PREDEF_MAKE_10_VVRR(__WATCOMC__) +#endif + +#ifdef BOOST_COMP_WATCOM_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_WATCOM_EMULATED BOOST_COMP_WATCOM_DETECTION +# else +# undef BOOST_COMP_WATCOM +# define BOOST_COMP_WATCOM BOOST_COMP_WATCOM_DETECTION +# endif +# define BOOST_COMP_WATCOM_AVAILABLE +# include +#endif + +#define BOOST_COMP_WATCOM_NAME "Watcom C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_WATCOM,BOOST_COMP_WATCOM_NAME) + +#ifdef BOOST_COMP_WATCOM_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_WATCOM_EMULATED,BOOST_COMP_WATCOM_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/detail/_cassert.h b/ThirdParty/boost-Subset/boost/predef/detail/_cassert.h new file mode 100644 index 0000000000..ccae4950d3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/detail/_cassert.h @@ -0,0 +1,17 @@ +/* +Copyright Rene Rivera 2011-2012 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_DETAIL__CASSERT_H +#define BOOST_PREDEF_DETAIL__CASSERT_H + +#if defined(__cpluplus) +#include +#else +#include +#endif + +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/detail/_exception.h b/ThirdParty/boost-Subset/boost/predef/detail/_exception.h new file mode 100644 index 0000000000..ca58c79d32 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/detail/_exception.h @@ -0,0 +1,15 @@ +/* +Copyright Rene Rivera 2011-2012 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_DETAIL__EXCEPTION_H +#define BOOST_PREDEF_DETAIL__EXCEPTION_H + +#if defined(__cpluplus) +#include +#endif + +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/detail/comp_detected.h b/ThirdParty/boost-Subset/boost/predef/detail/comp_detected.h new file mode 100644 index 0000000000..fda1801b65 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/detail/comp_detected.h @@ -0,0 +1,10 @@ +/* +Copyright Rene Rivera 2014 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_DETAIL_COMP_DETECTED +#define BOOST_PREDEF_DETAIL_COMP_DETECTED 1 +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/detail/endian_compat.h b/ThirdParty/boost-Subset/boost/predef/detail/endian_compat.h new file mode 100644 index 0000000000..7725e6823c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/detail/endian_compat.h @@ -0,0 +1,26 @@ +/* +Copyright Rene Rivera 2013 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_DETAIL_ENDIAN_COMPAT_H +#define BOOST_PREDEF_DETAIL_ENDIAN_COMPAT_H + +#include + +#if BOOST_ENDIAN_BIG_BYTE +# define BOOST_BIG_ENDIAN +# define BOOST_BYTE_ORDER 4321 +#endif +#if BOOST_ENDIAN_LITTLE_BYTE +# define BOOST_LITTLE_ENDIAN +# define BOOST_BYTE_ORDER 1234 +#endif +#if BOOST_ENDIAN_LITTLE_WORD +# define BOOST_PDP_ENDIAN +# define BOOST_BYTE_ORDER 2134 +#endif + +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/detail/os_detected.h b/ThirdParty/boost-Subset/boost/predef/detail/os_detected.h new file mode 100644 index 0000000000..08e10f993a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/detail/os_detected.h @@ -0,0 +1,10 @@ +/* +Copyright Rene Rivera 2013 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_DETAIL_OS_DETECTED +#define BOOST_PREDEF_DETAIL_OS_DETECTED 1 +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/detail/platform_detected.h b/ThirdParty/boost-Subset/boost/predef/detail/platform_detected.h new file mode 100644 index 0000000000..4faf6938d8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/detail/platform_detected.h @@ -0,0 +1,10 @@ +/* +Copyright Rene Rivera 2014 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_DETAIL_PLAT_DETECTED +#define BOOST_PREDEF_DETAIL_PLAT_DETECTED 1 +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/detail/test.h b/ThirdParty/boost-Subset/boost/predef/detail/test.h new file mode 100644 index 0000000000..546a9e407d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/detail/test.h @@ -0,0 +1,17 @@ +/* +Copyright Rene Rivera 2011-2012 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_DETAIL_TEST_H +#define BOOST_PREDEF_DETAIL_TEST_H + +#if !defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS) + +#define BOOST_PREDEF_DECLARE_TEST(x,s) + +#endif + +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/language.h b/ThirdParty/boost-Subset/boost/predef/language.h new file mode 100644 index 0000000000..0a317d5ece --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/language.h @@ -0,0 +1,17 @@ +/* +Copyright Rene Rivera 2011-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#if !defined(BOOST_PREDEF_LANGUAGE_H) || defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS) +#ifndef BOOST_PREDEF_LANGUAGE_H +#define BOOST_PREDEF_LANGUAGE_H +#endif + +#include +#include +#include + +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/language/objc.h b/ThirdParty/boost-Subset/boost/predef/language/objc.h new file mode 100644 index 0000000000..24e3ad3c5c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/language/objc.h @@ -0,0 +1,42 @@ +/* +Copyright Rene Rivera 2011-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LANGUAGE_OBJC_H +#define BOOST_PREDEF_LANGUAGE_OBJC_H + +#include +#include + +/*` +[heading `BOOST_LANG_OBJC`] + +[@http://en.wikipedia.org/wiki/Objective-C Objective-C] language. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__OBJC__`] [__predef_detection__]] + ] + */ + +#define BOOST_LANG_OBJC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__OBJC__) +# undef BOOST_LANG_OBJC +# define BOOST_LANG_OBJC BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_LANG_OBJC +# define BOOST_LANG_OBJC_AVAILABLE +#endif + +#define BOOST_LANG_OBJC_NAME "Objective-C" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LANG_OBJC,BOOST_LANG_OBJC_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/language/stdc.h b/ThirdParty/boost-Subset/boost/predef/language/stdc.h new file mode 100644 index 0000000000..db25c12dc0 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/language/stdc.h @@ -0,0 +1,53 @@ +/* +Copyright Rene Rivera 2011-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LANGUAGE_STDC_H +#define BOOST_PREDEF_LANGUAGE_STDC_H + +#include +#include + +/*` +[heading `BOOST_LANG_STDC`] + +[@http://en.wikipedia.org/wiki/C_(programming_language) Standard C] language. +If available, the year of the standard is detected as YYYY.MM.1 from the Epoc date. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__STDC__`] [__predef_detection__]] + + [[`__STDC_VERSION__`] [V.R.P]] + ] + */ + +#define BOOST_LANG_STDC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__STDC__) +# undef BOOST_LANG_STDC +# if defined(__STDC_VERSION__) +# if (__STDC_VERSION__ > 100) +# define BOOST_LANG_STDC BOOST_PREDEF_MAKE_YYYYMM(__STDC_VERSION__) +# else +# define BOOST_LANG_STDC BOOST_VERSION_NUMBER_AVAILABLE +# endif +# else +# define BOOST_LANG_STDC BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_LANG_STDC +# define BOOST_LANG_STDC_AVAILABLE +#endif + +#define BOOST_LANG_STDC_NAME "Standard C" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LANG_STDC,BOOST_LANG_STDC_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/language/stdcpp.h b/ThirdParty/boost-Subset/boost/predef/language/stdcpp.h new file mode 100644 index 0000000000..34dc8c7deb --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/language/stdcpp.h @@ -0,0 +1,121 @@ +/* +Copyright Rene Rivera 2011-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LANGUAGE_STDCPP_H +#define BOOST_PREDEF_LANGUAGE_STDCPP_H + +#include +#include + +/*` +[heading `BOOST_LANG_STDCPP`] + +[@http://en.wikipedia.org/wiki/C%2B%2B Standard C++] language. +If available, the year of the standard is detected as YYYY.MM.1 from the Epoc date. +Because of the way the C++ standardization process works the +defined version year will not be the commonly known year of the standard. +Specifically the defined versions are: + +[table Detected Version Number vs. C++ Standard Year + [[Detected Version Number] [Standard Year] [C++ Standard]] + [[27.11.1] [1998] [ISO/IEC 14882:1998]] + [[41.12.1] [2011] [ISO/IEC 14882:2011]] +] + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__cplusplus`] [__predef_detection__]] + + [[`__cplusplus`] [YYYY.MM.1]] + ] + */ + +#define BOOST_LANG_STDCPP BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__cplusplus) +# undef BOOST_LANG_STDCPP +# if (__cplusplus > 100) +# define BOOST_LANG_STDCPP BOOST_PREDEF_MAKE_YYYYMM(__cplusplus) +# else +# define BOOST_LANG_STDCPP BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_LANG_STDCPP +# define BOOST_LANG_STDCPP_AVAILABLE +#endif + +#define BOOST_LANG_STDCPP_NAME "Standard C++" + +/*` +[heading `BOOST_LANG_STDCPPCLI`] + +[@http://en.wikipedia.org/wiki/C%2B%2B/CLI Standard C++/CLI] language. +If available, the year of the standard is detected as YYYY.MM.1 from the Epoc date. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__cplusplus_cli`] [__predef_detection__]] + + [[`__cplusplus_cli`] [YYYY.MM.1]] + ] + */ + +#define BOOST_LANG_STDCPPCLI BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__cplusplus_cli) +# undef BOOST_LANG_STDCPPCLI +# if (__cplusplus_cli > 100) +# define BOOST_LANG_STDCPPCLI BOOST_PREDEF_MAKE_YYYYMM(__cplusplus_cli) +# else +# define BOOST_LANG_STDCPPCLI BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_LANG_STDCPPCLI +# define BOOST_LANG_STDCPPCLI_AVAILABLE +#endif + +#define BOOST_LANG_STDCPPCLI_NAME "Standard C++/CLI" + +/*` +[heading `BOOST_LANG_STDECPP`] + +[@http://en.wikipedia.org/wiki/Embedded_C%2B%2B Standard Embedded C++] language. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__embedded_cplusplus`] [__predef_detection__]] + ] + */ + +#define BOOST_LANG_STDECPP BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__embedded_cplusplus) +# undef BOOST_LANG_STDECPP +# define BOOST_LANG_STDECPP BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_LANG_STDECPP +# define BOOST_LANG_STDECPP_AVAILABLE +#endif + +#define BOOST_LANG_STDECPP_NAME "Standard Embedded C++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LANG_STDCPP,BOOST_LANG_STDCPP_NAME) + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LANG_STDCPPCLI,BOOST_LANG_STDCPPCLI_NAME) + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LANG_STDECPP,BOOST_LANG_STDECPP_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/library.h b/ThirdParty/boost-Subset/boost/predef/library.h new file mode 100644 index 0000000000..40518a90d8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/library.h @@ -0,0 +1,16 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#if !defined(BOOST_PREDEF_LIBRARY_H) || defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS) +#ifndef BOOST_PREDEF_LIBRARY_H +#define BOOST_PREDEF_LIBRARY_H +#endif + +#include +#include + +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/library/c.h b/ThirdParty/boost-Subset/boost/predef/library/c.h new file mode 100644 index 0000000000..fa8841e827 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/library/c.h @@ -0,0 +1,20 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#if !defined(BOOST_PREDEF_LIBRARY_C_H) || defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS) +#ifndef BOOST_PREDEF_LIBRARY_C_H +#define BOOST_PREDEF_LIBRARY_C_H +#endif + +#include + +#include +#include +#include +#include + +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/library/c/_prefix.h b/ThirdParty/boost-Subset/boost/predef/library/c/_prefix.h new file mode 100644 index 0000000000..12bcb0fb3f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/library/c/_prefix.h @@ -0,0 +1,13 @@ +/* +Copyright Rene Rivera 2008-2013 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_C__PREFIX_H +#define BOOST_PREDEF_LIBRARY_C__PREFIX_H + +#include + +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/library/c/gnu.h b/ThirdParty/boost-Subset/boost/predef/library/c/gnu.h new file mode 100644 index 0000000000..9e4ca89d64 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/library/c/gnu.h @@ -0,0 +1,61 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_C_GNU_H +#define BOOST_PREDEF_LIBRARY_C_GNU_H + +#include +#include + +#include + +#if defined(__STDC__) +#include +#elif defined(__cplusplus) +#include +#endif + +/*` +[heading `BOOST_LIB_C_GNU`] + +[@http://en.wikipedia.org/wiki/Glibc GNU glibc] Standard C library. +Version number available as major, and minor. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__GLIBC__`] [__predef_detection__]] + [[`__GNU_LIBRARY__`] [__predef_detection__]] + + [[`__GLIBC__`, `__GLIBC_MINOR__`] [V.R.0]] + [[`__GNU_LIBRARY__`, `__GNU_LIBRARY_MINOR__`] [V.R.0]] + ] + */ + +#define BOOST_LIB_C_GNU BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__GLIBC__) || defined(__GNU_LIBRARY__) +# undef BOOST_LIB_C_GNU +# if defined(__GLIBC__) +# define BOOST_LIB_C_GNU \ + BOOST_VERSION_NUMBER(__GLIBC__,__GLIBC_MINOR__,0) +# else +# define BOOST_LIB_C_GNU \ + BOOST_VERSION_NUMBER(__GNU_LIBRARY__,__GNU_LIBRARY_MINOR__,0) +# endif +#endif + +#if BOOST_LIB_C_GNU +# define BOOST_LIB_C_GNU_AVAILABLE +#endif + +#define BOOST_LIB_C_GNU_NAME "GNU" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_C_GNU,BOOST_LIB_C_GNU_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/library/c/uc.h b/ThirdParty/boost-Subset/boost/predef/library/c/uc.h new file mode 100644 index 0000000000..03081e94c6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/library/c/uc.h @@ -0,0 +1,47 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_C_UC_H +#define BOOST_PREDEF_LIBRARY_C_UC_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_C_UC`] + +[@http://en.wikipedia.org/wiki/Uclibc uClibc] Standard C library. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__UCLIBC__`] [__predef_detection__]] + + [[`__UCLIBC_MAJOR__`, `__UCLIBC_MINOR__`, `__UCLIBC_SUBLEVEL__`] [V.R.P]] + ] + */ + +#define BOOST_LIB_C_UC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__UCLIBC__) +# undef BOOST_LIB_C_UC +# define BOOST_LIB_C_UC BOOST_VERSION_NUMBER(\ + __UCLIBC_MAJOR__,__UCLIBC_MINOR__,__UCLIBC_SUBLEVEL__) +#endif + +#if BOOST_LIB_C_UC +# define BOOST_LIB_C_UC_AVAILABLE +#endif + +#define BOOST_LIB_C_UC_NAME "uClibc" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_C_UC,BOOST_LIB_C_UC_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/library/c/vms.h b/ThirdParty/boost-Subset/boost/predef/library/c/vms.h new file mode 100644 index 0000000000..685f1a77d6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/library/c/vms.h @@ -0,0 +1,47 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_C_VMS_H +#define BOOST_PREDEF_LIBRARY_C_VMS_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_C_VMS`] + +VMS libc Standard C library. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__CRTL_VER`] [__predef_detection__]] + + [[`__CRTL_VER`] [V.R.P]] + ] + */ + +#define BOOST_LIB_C_VMS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__CRTL_VER) +# undef BOOST_LIB_C_VMS +# define BOOST_LIB_C_VMS BOOST_PREDEF_MAKE_10_VVRR0PP00(__CRTL_VER) +#endif + +#if BOOST_LIB_C_VMS +# define BOOST_LIB_C_VMS_AVAILABLE +#endif + +#define BOOST_LIB_C_VMS_NAME "VMS" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_C_VMS,BOOST_LIB_C_VMS_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/library/c/zos.h b/ThirdParty/boost-Subset/boost/predef/library/c/zos.h new file mode 100644 index 0000000000..222d35539f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/library/c/zos.h @@ -0,0 +1,56 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_C_ZOS_H +#define BOOST_PREDEF_LIBRARY_C_ZOS_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_C_ZOS`] + +z/OS libc Standard C library. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__LIBREL__`] [__predef_detection__]] + + [[`__LIBREL__`] [V.R.P]] + [[`__TARGET_LIB__`] [V.R.P]] + ] + */ + +#define BOOST_LIB_C_ZOS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__LIBREL__) +# undef BOOST_LIB_C_ZOS +# if !defined(BOOST_LIB_C_ZOS) && defined(__LIBREL__) +# define BOOST_LIB_C_ZOS BOOST_PREDEF_MAKE_0X_VRRPPPP(__LIBREL__) +# endif +# if !defined(BOOST_LIB_C_ZOS) && defined(__TARGET_LIB__) +# define BOOST_LIB_C_ZOS BOOST_PREDEF_MAKE_0X_VRRPPPP(__TARGET_LIB__) +# endif +# if !defined(BOOST_LIB_C_ZOS) +# define BOOST_LIB_C_ZOS BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_LIB_C_ZOS +# define BOOST_LIB_C_ZOS_AVAILABLE +#endif + +#define BOOST_LIB_C_ZOS_NAME "z/OS" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_C_ZOS,BOOST_LIB_C_ZOS_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/library/std.h b/ThirdParty/boost-Subset/boost/predef/library/std.h new file mode 100644 index 0000000000..403b6ff37a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/library/std.h @@ -0,0 +1,25 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ +#if !defined(BOOST_PREDEF_LIBRARY_STD_H) || defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS) +#ifndef BOOST_PREDEF_LIBRARY_STD_H +#define BOOST_PREDEF_LIBRARY_STD_H +#endif + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/library/std/_prefix.h b/ThirdParty/boost-Subset/boost/predef/library/std/_prefix.h new file mode 100644 index 0000000000..932b8557b1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/library/std/_prefix.h @@ -0,0 +1,23 @@ +/* +Copyright Rene Rivera 2008-2013 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_PREDEF_LIBRARY_STD__PREFIX_H +#define BOOST_PREDEF_LIBRARY_STD__PREFIX_H + +/* +We need to include an STD header to gives us the context +of which library we are using. The "smallest" code-wise header +seems to be . Boost uses but as far +as I can tell (RR) it's not a stand-alone header in most +implementations. Using also has the benefit of +being available in EC++, so we get a chance to make this work +for embedded users. And since it's not a header impacted by TR1 +there's no magic needed for inclusion in the face of the +Boost.TR1 library. +*/ +#include + +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/library/std/cxx.h b/ThirdParty/boost-Subset/boost/predef/library/std/cxx.h new file mode 100644 index 0000000000..07b52cd6af --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/library/std/cxx.h @@ -0,0 +1,46 @@ +/* +Copyright Rene Rivera 2011-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_CXX_H +#define BOOST_PREDEF_LIBRARY_STD_CXX_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_CXX`] + +[@http://libcxx.llvm.org/ libc++] C++ Standard Library. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`_LIBCPP_VERSION`] [__predef_detection__]] + + [[`_LIBCPP_VERSION`] [V.0.P]] + ] + */ + +#define BOOST_LIB_STD_CXX BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(_LIBCPP_VERSION) +# undef BOOST_LIB_STD_CXX +# define BOOST_LIB_STD_CXX BOOST_PREDEF_MAKE_10_VPPP(_LIBCPP_VERSION) +#endif + +#if BOOST_LIB_STD_CXX +# define BOOST_LIB_STD_CXX_AVAILABLE +#endif + +#define BOOST_LIB_STD_CXX_NAME "libc++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_CXX,BOOST_LIB_STD_CXX_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/library/std/dinkumware.h b/ThirdParty/boost-Subset/boost/predef/library/std/dinkumware.h new file mode 100644 index 0000000000..0fc077605d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/library/std/dinkumware.h @@ -0,0 +1,52 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_DINKUMWARE_H +#define BOOST_PREDEF_LIBRARY_STD_DINKUMWARE_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_DINKUMWARE`] + +[@http://en.wikipedia.org/wiki/Dinkumware Dinkumware] Standard C++ Library. +If available version number as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`_YVALS`, `__IBMCPP__`] [__predef_detection__]] + [[`_CPPLIB_VER`] [__predef_detection__]] + + [[`_CPPLIB_VER`] [V.R.0]] + ] + */ + +#define BOOST_LIB_STD_DINKUMWARE BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER) +# undef BOOST_LIB_STD_DINKUMWARE +# if defined(_CPPLIB_VER) +# define BOOST_LIB_STD_DINKUMWARE BOOST_PREDEF_MAKE_10_VVRR(_CPPLIB_VER) +# else +# define BOOST_LIB_STD_DINKUMWARE BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_LIB_STD_DINKUMWARE +# define BOOST_LIB_STD_DINKUMWARE_AVAILABLE +#endif + +#define BOOST_LIB_STD_DINKUMWARE_NAME "Dinkumware" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_DINKUMWARE,BOOST_LIB_STD_DINKUMWARE_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/library/std/libcomo.h b/ThirdParty/boost-Subset/boost/predef/library/std/libcomo.h new file mode 100644 index 0000000000..97d4a53d6f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/library/std/libcomo.h @@ -0,0 +1,47 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_LIBCOMO_H +#define BOOST_PREDEF_LIBRARY_STD_LIBCOMO_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_COMO`] + +[@http://www.comeaucomputing.com/libcomo/ Comeau Computing] Standard C++ Library. +Version number available as major. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__LIBCOMO__`] [__predef_detection__]] + + [[`__LIBCOMO_VERSION__`] [V.0.0]] + ] + */ + +#define BOOST_LIB_STD_COMO BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__LIBCOMO__) +# undef BOOST_LIB_STD_COMO +# define BOOST_LIB_STD_COMO BOOST_VERSION_NUMBER(__LIBCOMO_VERSION__,0,0) +#endif + +#if BOOST_LIB_STD_COMO +# define BOOST_LIB_STD_COMO_AVAILABLE +#endif + +#define BOOST_LIB_STD_COMO_NAME "Comeau Computing" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_COMO,BOOST_LIB_STD_COMO_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/library/std/modena.h b/ThirdParty/boost-Subset/boost/predef/library/std/modena.h new file mode 100644 index 0000000000..b67ac62f17 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/library/std/modena.h @@ -0,0 +1,45 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_MODENA_H +#define BOOST_PREDEF_LIBRARY_STD_MODENA_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_MSIPL`] + +[@http://modena.us/ Modena Software Lib++] Standard C++ Library. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`MSIPL_COMPILE_H`] [__predef_detection__]] + [[`__MSIPL_COMPILE_H`] [__predef_detection__]] + ] + */ + +#define BOOST_LIB_STD_MSIPL BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(MSIPL_COMPILE_H) || defined(__MSIPL_COMPILE_H) +# undef BOOST_LIB_STD_MSIPL +# define BOOST_LIB_STD_MSIPL BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_LIB_STD_MSIPL +# define BOOST_LIB_STD_MSIPL_AVAILABLE +#endif + +#define BOOST_LIB_STD_MSIPL_NAME "Modena Software Lib++" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_MSIPL,BOOST_LIB_STD_MSIPL_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/library/std/msl.h b/ThirdParty/boost-Subset/boost/predef/library/std/msl.h new file mode 100644 index 0000000000..d73c74c6d8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/library/std/msl.h @@ -0,0 +1,53 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_MSL_H +#define BOOST_PREDEF_LIBRARY_STD_MSL_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_MSL`] + +[@http://www.freescale.com/ Metrowerks] Standard C++ Library. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__MSL_CPP__`] [__predef_detection__]] + [[`__MSL__`] [__predef_detection__]] + + [[`__MSL_CPP__`] [V.R.P]] + [[`__MSL__`] [V.R.P]] + ] + */ + +#define BOOST_LIB_STD_MSL BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__MSL_CPP__) || defined(__MSL__) +# undef BOOST_LIB_STD_MSL +# if defined(__MSL_CPP__) +# define BOOST_LIB_STD_MSL BOOST_PREDEF_MAKE_0X_VRPP(__MSL_CPP__) +# else +# define BOOST_LIB_STD_MSL BOOST_PREDEF_MAKE_0X_VRPP(__MSL__) +# endif +#endif + +#if BOOST_LIB_STD_MSL +# define BOOST_LIB_STD_MSL_AVAILABLE +#endif + +#define BOOST_LIB_STD_MSL_NAME "Metrowerks" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_MSL,BOOST_LIB_STD_MSL_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/library/std/roguewave.h b/ThirdParty/boost-Subset/boost/predef/library/std/roguewave.h new file mode 100644 index 0000000000..9c3f288b6f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/library/std/roguewave.h @@ -0,0 +1,56 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_ROGUEWAVE_H +#define BOOST_PREDEF_LIBRARY_STD_ROGUEWAVE_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_RW`] + +[@http://stdcxx.apache.org/ Roguewave] Standard C++ library. +If available version number as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__STD_RWCOMPILER_H__`] [__predef_detection__]] + [[`_RWSTD_VER`] [__predef_detection__]] + + [[`_RWSTD_VER`] [V.R.P]] + ] + */ + +#define BOOST_LIB_STD_RW BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER) +# undef BOOST_LIB_STD_RW +# if defined(_RWSTD_VER) +# if _RWSTD_VER < 0x010000 +# define BOOST_LIB_STD_RW BOOST_PREDEF_MAKE_0X_VVRRP(_RWSTD_VER) +# else +# define BOOST_LIB_STD_RW BOOST_PREDEF_MAKE_0X_VVRRPP(_RWSTD_VER) +# endif +# else +# define BOOST_LIB_STD_RW BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_LIB_STD_RW +# define BOOST_LIB_STD_RW_AVAILABLE +#endif + +#define BOOST_LIB_STD_RW_NAME "Roguewave" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_RW,BOOST_LIB_STD_RW_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/library/std/sgi.h b/ThirdParty/boost-Subset/boost/predef/library/std/sgi.h new file mode 100644 index 0000000000..5d19bbac4d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/library/std/sgi.h @@ -0,0 +1,51 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_SGI_H +#define BOOST_PREDEF_LIBRARY_STD_SGI_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_SGI`] + +[@http://www.sgi.com/tech/stl/ SGI] Standard C++ library. +If available version number as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__STL_CONFIG_H`] [__predef_detection__]] + + [[`__SGI_STL`] [V.R.P]] + ] + */ + +#define BOOST_LIB_STD_SGI BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__STL_CONFIG_H) +# undef BOOST_LIB_STD_SGI +# if defined(__SGI_STL) +# define BOOST_LIB_STD_SGI BOOST_PREDEF_MAKE_0X_VRP(__SGI_STL) +# else +# define BOOST_LIB_STD_SGI BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_LIB_STD_SGI +# define BOOST_LIB_STD_SGI_AVAILABLE +#endif + +#define BOOST_LIB_STD_SGI_NAME "SGI" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_SGI,BOOST_LIB_STD_SGI_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/library/std/stdcpp3.h b/ThirdParty/boost-Subset/boost/predef/library/std/stdcpp3.h new file mode 100644 index 0000000000..c9802924a7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/library/std/stdcpp3.h @@ -0,0 +1,53 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_STDCPP3_H +#define BOOST_PREDEF_LIBRARY_STD_STDCPP3_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_GNU`] + +[@http://gcc.gnu.org/libstdc++/ GNU libstdc++] Standard C++ library. +Version number available as year (from 1970), month, and day. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__GLIBCXX__`] [__predef_detection__]] + [[`__GLIBCPP__`] [__predef_detection__]] + + [[`__GLIBCXX__`] [V.R.P]] + [[`__GLIBCPP__`] [V.R.P]] + ] + */ + +#define BOOST_LIB_STD_GNU BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__GLIBCPP__) || defined(__GLIBCXX__) +# undef BOOST_LIB_STD_GNU +# if defined(__GLIBCXX__) +# define BOOST_LIB_STD_GNU BOOST_PREDEF_MAKE_YYYYMMDD(__GLIBCXX__) +# else +# define BOOST_LIB_STD_GNU BOOST_PREDEF_MAKE_YYYYMMDD(__GLIBCPP__) +# endif +#endif + +#if BOOST_LIB_STD_GNU +# define BOOST_LIB_STD_GNU_AVAILABLE +#endif + +#define BOOST_LIB_STD_GNU_NAME "GNU" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_GNU,BOOST_LIB_STD_GNU_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/library/std/stlport.h b/ThirdParty/boost-Subset/boost/predef/library/std/stlport.h new file mode 100644 index 0000000000..c09483bd9f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/library/std/stlport.h @@ -0,0 +1,59 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_STLPORT_H +#define BOOST_PREDEF_LIBRARY_STD_STLPORT_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_STLPORT`] + +[@http://sourceforge.net/projects/stlport/ STLport Standard C++] library. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__SGI_STL_PORT`] [__predef_detection__]] + [[`_STLPORT_VERSION`] [__predef_detection__]] + + [[`_STLPORT_MAJOR`, `_STLPORT_MINOR`, `_STLPORT_PATCHLEVEL`] [V.R.P]] + [[`_STLPORT_VERSION`] [V.R.P]] + [[`__SGI_STL_PORT`] [V.R.P]] + ] + */ + +#define BOOST_LIB_STD_STLPORT BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) +# undef BOOST_LIB_STD_STLPORT +# if !defined(BOOST_LIB_STD_STLPORT) && defined(_STLPORT_MAJOR) +# define BOOST_LIB_STD_STLPORT \ + BOOST_VERSION_NUMBER(_STLPORT_MAJOR,_STLPORT_MINOR,_STLPORT_PATCHLEVEL) +# endif +# if !defined(BOOST_LIB_STD_STLPORT) && defined(_STLPORT_VERSION) +# define BOOST_LIB_STD_STLPORT BOOST_PREDEF_MAKE_0X_VRP(_STLPORT_VERSION) +# endif +# if !defined(BOOST_LIB_STD_STLPORT) +# define BOOST_LIB_STD_STLPORT BOOST_PREDEF_MAKE_0X_VRP(__SGI_STL_PORT) +# endif +#endif + +#if BOOST_LIB_STD_STLPORT +# define BOOST_LIB_STD_STLPORT_AVAILABLE +#endif + +#define BOOST_LIB_STD_STLPORT_NAME "STLport" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_STLPORT,BOOST_LIB_STD_STLPORT_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/library/std/vacpp.h b/ThirdParty/boost-Subset/boost/predef/library/std/vacpp.h new file mode 100644 index 0000000000..632f846c20 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/library/std/vacpp.h @@ -0,0 +1,44 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_VACPP_H +#define BOOST_PREDEF_LIBRARY_STD_VACPP_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_IBM`] + +[@http://www.ibm.com/software/awdtools/xlcpp/ IBM VACPP Standard C++] library. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__IBMCPP__`] [__predef_detection__]] + ] + */ + +#define BOOST_LIB_STD_IBM BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__IBMCPP__) +# undef BOOST_LIB_STD_IBM +# define BOOST_LIB_STD_IBM BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_LIB_STD_IBM +# define BOOST_LIB_STD_IBM_AVAILABLE +#endif + +#define BOOST_LIB_STD_IBM_NAME "IBM VACPP" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_IBM,BOOST_LIB_STD_IBM_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/make.h b/ThirdParty/boost-Subset/boost/predef/make.h new file mode 100644 index 0000000000..4f2f9ee761 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/make.h @@ -0,0 +1,89 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ +#include + +#ifndef BOOST_PREDEF_MAKE_H +#define BOOST_PREDEF_MAKE_H + +/* +Shorthands for the common version number formats used by vendors... +*/ + +/*` +[heading `BOOST_PREDEF_MAKE_..` macros] + +These set of macros decompose common vendor version number +macros which are composed version, revision, and patch digits. +The naming convention indicates: + +* The base of the specified version number. "`BOOST_PREDEF_MAKE_0X`" for + hexadecimal digits, and "`BOOST_PREDEF_MAKE_10`" for decimal digits. +* The format of the vendor version number. Where "`V`" indicates the version digits, + "`R`" indicates the revision digits, "`P`" indicates the patch digits, and "`0`" + indicates an ignored digit. + +Macros are: +*/ +/*` `BOOST_PREDEF_MAKE_0X_VRP(V)` */ +#define BOOST_PREDEF_MAKE_0X_VRP(V) BOOST_VERSION_NUMBER((V&0xF00)>>8,(V&0xF0)>>4,(V&0xF)) +/*` `BOOST_PREDEF_MAKE_0X_VVRP(V)` */ +#define BOOST_PREDEF_MAKE_0X_VVRP(V) BOOST_VERSION_NUMBER((V&0xFF00)>>8,(V&0xF0)>>4,(V&0xF)) +/*` `BOOST_PREDEF_MAKE_0X_VRPP(V)` */ +#define BOOST_PREDEF_MAKE_0X_VRPP(V) BOOST_VERSION_NUMBER((V&0xF000)>>12,(V&0xF00)>>8,(V&0xFF)) +/*` `BOOST_PREDEF_MAKE_0X_VVRR(V)` */ +#define BOOST_PREDEF_MAKE_0X_VVRR(V) BOOST_VERSION_NUMBER((V&0xFF00)>>8,(V&0xFF),0) +/*` `BOOST_PREDEF_MAKE_0X_VRRPPPP(V)` */ +#define BOOST_PREDEF_MAKE_0X_VRRPPPP(V) BOOST_VERSION_NUMBER((V&0xF000000)>>24,(V&0xFF0000)>>16,(V&0xFFFF)) +/*` `BOOST_PREDEF_MAKE_0X_VVRRP(V)` */ +#define BOOST_PREDEF_MAKE_0X_VVRRP(V) BOOST_VERSION_NUMBER((V&0xFF000)>>12,(V&0xFF0)>>4,(V&0xF)) +/*` `BOOST_PREDEF_MAKE_0X_VRRPP000(V)` */ +#define BOOST_PREDEF_MAKE_0X_VRRPP000(V) BOOST_VERSION_NUMBER((V&0xF0000000)>>28,(V&0xFF00000)>>20,(V&0xFF000)>>12) +/*` `BOOST_PREDEF_MAKE_0X_VVRRPP(V)` */ +#define BOOST_PREDEF_MAKE_0X_VVRRPP(V) BOOST_VERSION_NUMBER((V&0xFF0000)>>16,(V&0xFF00)>>8,(V&0xFF)) +/*` `BOOST_PREDEF_MAKE_10_VPPP(V)` */ +#define BOOST_PREDEF_MAKE_10_VPPP(V) BOOST_VERSION_NUMBER(((V)/1000)%10,0,(V)%1000) +/*` `BOOST_PREDEF_MAKE_10_VRP(V)` */ +#define BOOST_PREDEF_MAKE_10_VRP(V) BOOST_VERSION_NUMBER(((V)/100)%10,((V)/10)%10,(V)%10) +/*` `BOOST_PREDEF_MAKE_10_VRP000(V)` */ +#define BOOST_PREDEF_MAKE_10_VRP000(V) BOOST_VERSION_NUMBER(((V)/100000)%10,((V)/10000)%10,((V)/1000)%10) +/*` `BOOST_PREDEF_MAKE_10_VRPP(V)` */ +#define BOOST_PREDEF_MAKE_10_VRPP(V) BOOST_VERSION_NUMBER(((V)/1000)%10,((V)/100)%10,(V)%100) +/*` `BOOST_PREDEF_MAKE_10_VRR(V)` */ +#define BOOST_PREDEF_MAKE_10_VRR(V) BOOST_VERSION_NUMBER(((V)/100)%10,(V)%100,0) +/*` `BOOST_PREDEF_MAKE_10_VRRPP(V)` */ +#define BOOST_PREDEF_MAKE_10_VRRPP(V) BOOST_VERSION_NUMBER(((V)/10000)%10,((V)/100)%100,(V)%100) +/*` `BOOST_PREDEF_MAKE_10_VRR000(V)` */ +#define BOOST_PREDEF_MAKE_10_VRR000(V) BOOST_VERSION_NUMBER(((V)/100000)%10,((V)/1000)%100,0) +/*` `BOOST_PREDEF_MAKE_10_VV00(V)` */ +#define BOOST_PREDEF_MAKE_10_VV00(V) BOOST_VERSION_NUMBER(((V)/100)%100,0,0) +/*` `BOOST_PREDEF_MAKE_10_VVRR(V)` */ +#define BOOST_PREDEF_MAKE_10_VVRR(V) BOOST_VERSION_NUMBER(((V)/100)%100,(V)%100,0) +/*` `BOOST_PREDEF_MAKE_10_VVRRPP(V)` */ +#define BOOST_PREDEF_MAKE_10_VVRRPP(V) BOOST_VERSION_NUMBER(((V)/10000)%100,((V)/100)%100,(V)%100) +/*` `BOOST_PREDEF_MAKE_10_VVRR0PP00(V)` */ +#define BOOST_PREDEF_MAKE_10_VVRR0PP00(V) BOOST_VERSION_NUMBER(((V)/10000000)%100,((V)/100000)%100,((V)/100)%100) +/*` `BOOST_PREDEF_MAKE_10_VVRR0PPPP(V)` */ +#define BOOST_PREDEF_MAKE_10_VVRR0PPPP(V) BOOST_VERSION_NUMBER(((V)/10000000)%100,((V)/100000)%100,(V)%10000) +/*` `BOOST_PREDEF_MAKE_10_VVRR00PP00(V)` */ +#define BOOST_PREDEF_MAKE_10_VVRR00PP00(V) BOOST_VERSION_NUMBER(((V)/100000000)%100,((V)/1000000)%100,((V)/100)%100) +/*` +[heading `BOOST_PREDEF_MAKE_*..` date macros] + +Date decomposition macros return a date in the relative to the 1970 +Epoch date. If the month is not available, January 1st is used as the month and day. +If the day is not available, but the month is, the 1st of the month is used as the day. +*/ +/*` `BOOST_PREDEF_MAKE_DATE(Y,M,D)` */ +#define BOOST_PREDEF_MAKE_DATE(Y,M,D) BOOST_VERSION_NUMBER((Y)%10000-1970,(M)%100,(D)%100) +/*` `BOOST_PREDEF_MAKE_YYYYMMDD(V)` */ +#define BOOST_PREDEF_MAKE_YYYYMMDD(V) BOOST_PREDEF_MAKE_DATE(((V)/10000)%10000,((V)/100)%100,(V)%100) +/*` `BOOST_PREDEF_MAKE_YYYY(V)` */ +#define BOOST_PREDEF_MAKE_YYYY(V) BOOST_PREDEF_MAKE_DATE(V,1,1) +/*` `BOOST_PREDEF_MAKE_YYYYMM(V)` */ +#define BOOST_PREDEF_MAKE_YYYYMM(V) BOOST_PREDEF_MAKE_DATE((V)/100,(V)%100,1) + +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/os.h b/ThirdParty/boost-Subset/boost/predef/os.h new file mode 100644 index 0000000000..bedf99ec54 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/os.h @@ -0,0 +1,33 @@ +/* +Copyright Rene Rivera 2008-2015 +Copyright Franz Detro 2014 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#if !defined(BOOST_PREDEF_OS_H) || defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS) +#ifndef BOOST_PREDEF_OS_H +#define BOOST_PREDEF_OS_H +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/os/aix.h b/ThirdParty/boost-Subset/boost/predef/os/aix.h new file mode 100644 index 0000000000..3e5a953f1b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/os/aix.h @@ -0,0 +1,66 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_AIX_H +#define BOOST_PREDEF_OS_AIX_H + +#include +#include + +/*` +[heading `BOOST_OS_AIX`] + +[@http://en.wikipedia.org/wiki/AIX_operating_system IBM AIX] operating system. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`_AIX`] [__predef_detection__]] + [[`__TOS_AIX__`] [__predef_detection__]] + + [[`_AIX43`] [4.3.0]] + [[`_AIX41`] [4.1.0]] + [[`_AIX32`] [3.2.0]] + [[`_AIX3`] [3.0.0]] + ] + */ + +#define BOOST_OS_AIX BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(_AIX) || defined(__TOS_AIX__) \ + ) +# undef BOOST_OS_AIX +# if !defined(BOOST_OS_AIX) && defined(_AIX43) +# define BOOST_OS_AIX BOOST_VERSION_NUMBER(4,3,0) +# endif +# if !defined(BOOST_OS_AIX) && defined(_AIX41) +# define BOOST_OS_AIX BOOST_VERSION_NUMBER(4,1,0) +# endif +# if !defined(BOOST_OS_AIX) && defined(_AIX32) +# define BOOST_OS_AIX BOOST_VERSION_NUMBER(3,2,0) +# endif +# if !defined(BOOST_OS_AIX) && defined(_AIX3) +# define BOOST_OS_AIX BOOST_VERSION_NUMBER(3,0,0) +# endif +# if !defined(BOOST_OS_AIX) +# define BOOST_OS_AIX BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_OS_AIX +# define BOOST_OS_AIX_AVAILABLE +# include +#endif + +#define BOOST_OS_AIX_NAME "IBM AIX" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_AIX,BOOST_OS_AIX_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/os/amigaos.h b/ThirdParty/boost-Subset/boost/predef/os/amigaos.h new file mode 100644 index 0000000000..7b32ddf59c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/os/amigaos.h @@ -0,0 +1,46 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_AMIGAOS_H +#define BOOST_PREDEF_OS_AMIGAOS_H + +#include +#include + +/*` +[heading `BOOST_OS_AMIGAOS`] + +[@http://en.wikipedia.org/wiki/AmigaOS AmigaOS] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`AMIGA`] [__predef_detection__]] + [[`__amigaos__`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_AMIGAOS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(AMIGA) || defined(__amigaos__) \ + ) +# undef BOOST_OS_AMIGAOS +# define BOOST_OS_AMIGAOS BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_AMIGAOS +# define BOOST_OS_AMIGAOS_AVAILABLE +# include +#endif + +#define BOOST_OS_AMIGAOS_NAME "AmigaOS" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_AMIGAOS,BOOST_OS_AMIGAOS_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/os/android.h b/ThirdParty/boost-Subset/boost/predef/os/android.h new file mode 100644 index 0000000000..00836e7fce --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/os/android.h @@ -0,0 +1,45 @@ +/* +Copyright Rene Rivera 2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_ADROID_H +#define BOOST_PREDEF_OS_ADROID_H + +#include +#include + +/*` +[heading `BOOST_OS_ANDROID`] + +[@http://en.wikipedia.org/wiki/Android_%28operating_system%29 Android] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__ANDROID__`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_ANDROID BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__ANDROID__) \ + ) +# undef BOOST_OS_ANDROID +# define BOOST_OS_ANDROID BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_ANDROID +# define BOOST_OS_ANDROID_AVAILABLE +# include +#endif + +#define BOOST_OS_ANDROID_NAME "Android" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_ANDROID,BOOST_OS_ANDROID_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/os/beos.h b/ThirdParty/boost-Subset/boost/predef/os/beos.h new file mode 100644 index 0000000000..19f4cb71e3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/os/beos.h @@ -0,0 +1,45 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_BEOS_H +#define BOOST_PREDEF_OS_BEOS_H + +#include +#include + +/*` +[heading `BOOST_OS_BEOS`] + +[@http://en.wikipedia.org/wiki/BeOS BeOS] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__BEOS__`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_BEOS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__BEOS__) \ + ) +# undef BOOST_OS_BEOS +# define BOOST_OS_BEOS BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_BEOS +# define BOOST_OS_BEOS_AVAILABLE +# include +#endif + +#define BOOST_OS_BEOS_NAME "BeOS" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BEOS,BOOST_OS_BEOS_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/os/bsd.h b/ThirdParty/boost-Subset/boost/predef/os/bsd.h new file mode 100644 index 0000000000..fad9aed787 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/os/bsd.h @@ -0,0 +1,103 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_BSD_H +#define BOOST_PREDEF_OS_BSD_H + +/* Special case: OSX will define BSD predefs if the sys/param.h + * header is included. We can guard against that, but only if we + * detect OSX first. Hence we will force include OSX detection + * before doing any BSD detection. + */ +#include + +#include +#include + +/*` +[heading `BOOST_OS_BSD`] + +[@http://en.wikipedia.org/wiki/Berkeley_Software_Distribution BSD] operating system. + +BSD has various branch operating systems possible and each detected +individually. This detects the following variations and sets a specific +version number macro to match: + +* `BOOST_OS_BSD_DRAGONFLY` [@http://en.wikipedia.org/wiki/DragonFly_BSD DragonFly BSD] +* `BOOST_OS_BSD_FREE` [@http://en.wikipedia.org/wiki/Freebsd FreeBSD] +* `BOOST_OS_BSD_BSDI` [@http://en.wikipedia.org/wiki/BSD/OS BSDi BSD/OS] +* `BOOST_OS_BSD_NET` [@http://en.wikipedia.org/wiki/Netbsd NetBSD] +* `BOOST_OS_BSD_OPEN` [@http://en.wikipedia.org/wiki/Openbsd OpenBSD] + +[note The general `BOOST_OS_BSD` is set in all cases to indicate some form +of BSD. If the above variants is detected the corresponding macro is also set.] + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`BSD`] [__predef_detection__]] + [[`_SYSTYPE_BSD`] [__predef_detection__]] + + [[`BSD4_2`] [4.2.0]] + [[`BSD4_3`] [4.3.0]] + [[`BSD4_4`] [4.4.0]] + [[`BSD`] [V.R.0]] + ] + */ + +#include +#include +#include +#include +#include + +#ifndef BOOST_OS_BSD +#define BOOST_OS_BSD BOOST_VERSION_NUMBER_NOT_AVAILABLE +#endif + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(BSD) || \ + defined(_SYSTYPE_BSD) \ + ) +# undef BOOST_OS_BSD +# include +# if !defined(BOOST_OS_BSD) && defined(BSD4_4) +# define BOOST_OS_BSD BOOST_VERSION_NUMBER(4,4,0) +# endif +# if !defined(BOOST_OS_BSD) && defined(BSD4_3) +# define BOOST_OS_BSD BOOST_VERSION_NUMBER(4,3,0) +# endif +# if !defined(BOOST_OS_BSD) && defined(BSD4_2) +# define BOOST_OS_BSD BOOST_VERSION_NUMBER(4,2,0) +# endif +# if !defined(BOOST_OS_BSD) && defined(BSD) +# define BOOST_OS_BSD BOOST_PREDEF_MAKE_10_VVRR(BSD) +# endif +# if !defined(BOOST_OS_BSD) +# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_OS_BSD +# define BOOST_OS_BSD_AVAILABLE +# include +#endif + +#define BOOST_OS_BSD_NAME "BSD" + +#else + +#include +#include +#include +#include +#include + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD,BOOST_OS_BSD_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/os/bsd/bsdi.h b/ThirdParty/boost-Subset/boost/predef/os/bsd/bsdi.h new file mode 100644 index 0000000000..afdcd3eb7c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/os/bsd/bsdi.h @@ -0,0 +1,48 @@ +/* +Copyright Rene Rivera 2012-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_BSD_BSDI_H +#define BOOST_PREDEF_OS_BSD_BSDI_H + +#include + +/*` +[heading `BOOST_OS_BSD_BSDI`] + +[@http://en.wikipedia.org/wiki/BSD/OS BSDi BSD/OS] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__bsdi__`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_BSD_BSDI BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__bsdi__) \ + ) +# ifndef BOOST_OS_BSD_AVAILABLE +# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE +# define BOOST_OS_BSD_AVAILABLE +# endif +# undef BOOST_OS_BSD_BSDI +# define BOOST_OS_BSD_BSDI BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_BSD_BSDI +# define BOOST_OS_BSD_BSDI_AVAILABLE +# include +#endif + +#define BOOST_OS_BSD_BSDI_NAME "BSDi BSD/OS" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_BSDI,BOOST_OS_BSD_BSDI_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/os/bsd/dragonfly.h b/ThirdParty/boost-Subset/boost/predef/os/bsd/dragonfly.h new file mode 100644 index 0000000000..1d075798a1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/os/bsd/dragonfly.h @@ -0,0 +1,50 @@ +/* +Copyright Rene Rivera 2012-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_BSD_DRAGONFLY_H +#define BOOST_PREDEF_OS_BSD_DRAGONFLY_H + +#include + +/*` +[heading `BOOST_OS_BSD_DRAGONFLY`] + +[@http://en.wikipedia.org/wiki/DragonFly_BSD DragonFly BSD] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__DragonFly__`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_BSD_DRAGONFLY BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__DragonFly__) \ + ) +# ifndef BOOST_OS_BSD_AVAILABLE +# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE +# define BOOST_OS_BSD_AVAILABLE +# endif +# undef BOOST_OS_BSD_DRAGONFLY +# if defined(__DragonFly__) +# define BOOST_OS_DRAGONFLY_BSD BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_OS_BSD_DRAGONFLY +# define BOOST_OS_BSD_DRAGONFLY_AVAILABLE +# include +#endif + +#define BOOST_OS_BSD_DRAGONFLY_NAME "DragonFly BSD" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_DRAGONFLY,BOOST_OS_BSD_DRAGONFLY_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/os/bsd/free.h b/ThirdParty/boost-Subset/boost/predef/os/bsd/free.h new file mode 100644 index 0000000000..248011ae7a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/os/bsd/free.h @@ -0,0 +1,60 @@ +/* +Copyright Rene Rivera 2012-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_BSD_FREE_H +#define BOOST_PREDEF_OS_BSD_FREE_H + +#include + +/*` +[heading `BOOST_OS_BSD_FREE`] + +[@http://en.wikipedia.org/wiki/Freebsd FreeBSD] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__FreeBSD__`] [__predef_detection__]] + + [[`__FreeBSD_version`] [V.R.P]] + ] + */ + +#define BOOST_OS_BSD_FREE BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__FreeBSD__) \ + ) +# ifndef BOOST_OS_BSD_AVAILABLE +# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE +# define BOOST_OS_BSD_AVAILABLE +# endif +# undef BOOST_OS_BSD_FREE +# if defined(__FreeBSD_version) +# if __FreeBSD_version < 500000 +# define BOOST_OS_BSD_FREE \ + BOOST_PREDEF_MAKE_10_VRP000(__FreeBSD_version) +# else +# define BOOST_OS_BSD_FREE \ + BOOST_PREDEF_MAKE_10_VRR000(__FreeBSD_version) +# endif +# else +# define BOOST_OS_BSD_FREE BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_OS_BSD_FREE +# define BOOST_OS_BSD_FREE_AVAILABLE +# include +#endif + +#define BOOST_OS_BSD_FREE_NAME "Free BSD" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_FREE,BOOST_OS_BSD_FREE_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/os/bsd/net.h b/ThirdParty/boost-Subset/boost/predef/os/bsd/net.h new file mode 100644 index 0000000000..387cbde54f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/os/bsd/net.h @@ -0,0 +1,84 @@ +/* +Copyright Rene Rivera 2012-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_BSD_NET_H +#define BOOST_PREDEF_OS_BSD_NET_H + +#include + +/*` +[heading `BOOST_OS_BSD_NET`] + +[@http://en.wikipedia.org/wiki/Netbsd NetBSD] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__NETBSD__`] [__predef_detection__]] + [[`__NetBSD__`] [__predef_detection__]] + + [[`__NETBSD_version`] [V.R.P]] + [[`NetBSD0_8`] [0.8.0]] + [[`NetBSD0_9`] [0.9.0]] + [[`NetBSD1_0`] [1.0.0]] + [[`__NetBSD_Version`] [V.R.P]] + ] + */ + +#define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__NETBSD__) || defined(__NetBSD__) \ + ) +# ifndef BOOST_OS_BSD_AVAILABLE +# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE +# define BOOST_OS_BSD_AVAILABLE +# endif +# undef BOOST_OS_BSD_NET +# if defined(__NETBSD__) +# if defined(__NETBSD_version) +# if __NETBSD_version < 500000 +# define BOOST_OS_BSD_NET \ + BOOST_PREDEF_MAKE_10_VRP000(__NETBSD_version) +# else +# define BOOST_OS_BSD_NET \ + BOOST_PREDEF_MAKE_10_VRR000(__NETBSD_version) +# endif +# else +# define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER_AVAILABLE +# endif +# elif defined(__NetBSD__) +# if !defined(BOOST_OS_BSD_NET) && defined(NetBSD0_8) +# define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER(0,8,0) +# endif +# if !defined(BOOST_OS_BSD_NET) && defined(NetBSD0_9) +# define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER(0,9,0) +# endif +# if !defined(BOOST_OS_BSD_NET) && defined(NetBSD1_0) +# define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER(1,0,0) +# endif +# if !defined(BOOST_OS_BSD_NET) && defined(__NetBSD_Version) +# define BOOST_OS_BSD_NET \ + BOOST_PREDEF_MAKE_10_VVRR00PP00(__NetBSD_Version) +# endif +# if !defined(BOOST_OS_BSD_NET) +# define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER_AVAILABLE +# endif +# endif +#endif + +#if BOOST_OS_BSD_NET +# define BOOST_OS_BSD_NET_AVAILABLE +# include +#endif + +#define BOOST_OS_BSD_NET_NAME "DragonFly BSD" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_NET,BOOST_OS_BSD_NET_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/os/bsd/open.h b/ThirdParty/boost-Subset/boost/predef/os/bsd/open.h new file mode 100644 index 0000000000..423103ac5c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/os/bsd/open.h @@ -0,0 +1,171 @@ +/* +Copyright Rene Rivera 2012-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_BSD_OPEN_H +#define BOOST_PREDEF_OS_BSD_OPEN_H + +#include + +/*` +[heading `BOOST_OS_BSD_OPEN`] + +[@http://en.wikipedia.org/wiki/Openbsd OpenBSD] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__OpenBSD__`] [__predef_detection__]] + + [[`OpenBSD2_0`] [2.0.0]] + [[`OpenBSD2_1`] [2.1.0]] + [[`OpenBSD2_2`] [2.2.0]] + [[`OpenBSD2_3`] [2.3.0]] + [[`OpenBSD2_4`] [2.4.0]] + [[`OpenBSD2_5`] [2.5.0]] + [[`OpenBSD2_6`] [2.6.0]] + [[`OpenBSD2_7`] [2.7.0]] + [[`OpenBSD2_8`] [2.8.0]] + [[`OpenBSD2_9`] [2.9.0]] + [[`OpenBSD3_0`] [3.0.0]] + [[`OpenBSD3_1`] [3.1.0]] + [[`OpenBSD3_2`] [3.2.0]] + [[`OpenBSD3_3`] [3.3.0]] + [[`OpenBSD3_4`] [3.4.0]] + [[`OpenBSD3_5`] [3.5.0]] + [[`OpenBSD3_6`] [3.6.0]] + [[`OpenBSD3_7`] [3.7.0]] + [[`OpenBSD3_8`] [3.8.0]] + [[`OpenBSD3_9`] [3.9.0]] + [[`OpenBSD4_0`] [4.0.0]] + [[`OpenBSD4_1`] [4.1.0]] + [[`OpenBSD4_2`] [4.2.0]] + [[`OpenBSD4_3`] [4.3.0]] + [[`OpenBSD4_4`] [4.4.0]] + [[`OpenBSD4_5`] [4.5.0]] + [[`OpenBSD4_6`] [4.6.0]] + [[`OpenBSD4_7`] [4.7.0]] + [[`OpenBSD4_8`] [4.8.0]] + [[`OpenBSD4_9`] [4.9.0]] + ] + */ + +#define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__OpenBSD__) \ + ) +# ifndef BOOST_OS_BSD_AVAILABLE +# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE +# define BOOST_OS_BSD_AVAILABLE +# endif +# undef BOOST_OS_BSD_OPEN +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_0) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,0,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_1) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,1,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_2) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,2,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_3) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,3,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_4) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,4,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_5) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,5,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_6) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,6,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_7) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,7,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_8) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,8,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_9) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,9,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_0) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,0,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_1) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,1,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_2) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,2,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_3) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,3,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_4) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,4,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_5) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,5,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_6) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,6,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_7) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,7,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_8) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,8,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_9) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,9,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_0) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,0,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_1) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,1,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_2) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,2,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_3) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,3,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_4) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,4,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_5) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,5,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_6) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,6,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_7) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,7,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_8) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,8,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_9) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,9,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_OS_BSD_OPEN +# define BOOST_OS_BSD_OPEN_AVAILABLE +# include +#endif + +#define BOOST_OS_BSD_OPEN_NAME "OpenBSD" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_OPEN,BOOST_OS_BSD_OPEN_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/os/cygwin.h b/ThirdParty/boost-Subset/boost/predef/os/cygwin.h new file mode 100644 index 0000000000..1985c97edc --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/os/cygwin.h @@ -0,0 +1,45 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_CYGWIN_H +#define BOOST_PREDEF_OS_CYGWIN_H + +#include +#include + +/*` +[heading `BOOST_OS_CYGWIN`] + +[@http://en.wikipedia.org/wiki/Cygwin Cygwin] evironment. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__CYGWIN__`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_CYGWIN BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__CYGWIN__) \ + ) +# undef BOOST_OS_CYGWIN +# define BOOST_OS_CGYWIN BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_CYGWIN +# define BOOST_OS_CYGWIN_AVAILABLE +# include +#endif + +#define BOOST_OS_CYGWIN_NAME "Cygwin" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_CYGWIN,BOOST_OS_CYGWIN_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/os/haiku.h b/ThirdParty/boost-Subset/boost/predef/os/haiku.h new file mode 100644 index 0000000000..d79dbeac88 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/os/haiku.h @@ -0,0 +1,46 @@ +/* +Copyright Jessica Hamilton 2014 +Copyright Rene Rivera 2014-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_HAIKU_H +#define BOOST_PREDEF_OS_HAIKU_H + +#include +#include + +/*` +[heading `BOOST_OS_HAIKU`] + +[@http://en.wikipedia.org/wiki/Haiku_(operating_system) Haiku] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__HAIKU__`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_HAIKU BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__HAIKU__) \ + ) +# undef BOOST_OS_HAIKU +# define BOOST_OS_HAIKU BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_HAIKU +# define BOOST_OS_HAIKU_AVAILABLE +# include +#endif + +#define BOOST_OS_HAIKU_NAME "Haiku" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_HAIKU,BOOST_OS_HAIKU_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/os/hpux.h b/ThirdParty/boost-Subset/boost/predef/os/hpux.h new file mode 100644 index 0000000000..29243f4879 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/os/hpux.h @@ -0,0 +1,47 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_HPUX_H +#define BOOST_PREDEF_OS_HPUX_H + +#include +#include + +/*` +[heading `BOOST_OS_HPUX`] + +[@http://en.wikipedia.org/wiki/HP-UX HP-UX] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`hpux`] [__predef_detection__]] + [[`_hpux`] [__predef_detection__]] + [[`__hpux`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_HPUX BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(hpux) || defined(_hpux) || defined(__hpux) \ + ) +# undef BOOST_OS_HPUX +# define BOOST_OS_HPUX BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_HPUX +# define BOOST_OS_HPUX_AVAILABLE +# include +#endif + +#define BOOST_OS_HPUX_NAME "HP-UX" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_HPUX,BOOST_OS_HPUX_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/os/ios.h b/ThirdParty/boost-Subset/boost/predef/os/ios.h new file mode 100644 index 0000000000..f853815a6d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/os/ios.h @@ -0,0 +1,51 @@ +/* +Copyright Franz Detro 2014 +Copyright Rene Rivera 2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_IOS_H +#define BOOST_PREDEF_OS_IOS_H + +#include +#include + +/*` +[heading `BOOST_OS_IOS`] + +[@http://en.wikipedia.org/wiki/iOS iOS] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__APPLE__`] [__predef_detection__]] + [[`__MACH__`] [__predef_detection__]] + [[`__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__`] [__predef_detection__]] + + [[`__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__`] [__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__*1000]] + ] + */ + +#define BOOST_OS_IOS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__APPLE__) && defined(__MACH__) && \ + defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) \ + ) +# undef BOOST_OS_IOS +# define BOOST_OS_IOS (__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__*1000) +#endif + +#if BOOST_OS_IOS +# define BOOST_OS_IOS_AVAILABLE +# include +#endif + +#define BOOST_OS_IOS_NAME "iOS" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_IOS,BOOST_OS_IOS_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/os/irix.h b/ThirdParty/boost-Subset/boost/predef/os/irix.h new file mode 100644 index 0000000000..fa6ac41dcd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/os/irix.h @@ -0,0 +1,46 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_IRIX_H +#define BOOST_PREDEF_OS_IRIX_H + +#include +#include + +/*` +[heading `BOOST_OS_IRIX`] + +[@http://en.wikipedia.org/wiki/Irix IRIX] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`sgi`] [__predef_detection__]] + [[`__sgi`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_IRIX BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(sgi) || defined(__sgi) \ + ) +# undef BOOST_OS_IRIX +# define BOOST_OS_IRIX BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_IRIX +# define BOOST_OS_IRIX_AVAILABLE +# include +#endif + +#define BOOST_OS_IRIX_NAME "IRIX" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_IRIX,BOOST_OS_IRIX_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/os/linux.h b/ThirdParty/boost-Subset/boost/predef/os/linux.h new file mode 100644 index 0000000000..a297d08954 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/os/linux.h @@ -0,0 +1,46 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_LINUX_H +#define BOOST_PREDEF_OS_LINUX_H + +#include +#include + +/*` +[heading `BOOST_OS_LINUX`] + +[@http://en.wikipedia.org/wiki/Linux Linux] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`linux`] [__predef_detection__]] + [[`__linux`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_LINUX BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(linux) || defined(__linux) \ + ) +# undef BOOST_OS_LINUX +# define BOOST_OS_LINUX BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_LINUX +# define BOOST_OS_LINUX_AVAILABLE +# include +#endif + +#define BOOST_OS_LINUX_NAME "Linux" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_LINUX,BOOST_OS_LINUX_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/os/macos.h b/ThirdParty/boost-Subset/boost/predef/os/macos.h new file mode 100644 index 0000000000..4afb30d087 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/os/macos.h @@ -0,0 +1,65 @@ +/* +Copyright Rene Rivera 2008-2015 +Copyright Franz Detro 2014 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_MACOS_H +#define BOOST_PREDEF_OS_MACOS_H + +/* Special case: iOS will define the same predefs as MacOS, and additionally + '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__'. We can guard against that, + but only if we detect iOS first. Hence we will force include iOS detection + * before doing any MacOS detection. + */ +#include + +#include +#include + +/*` +[heading `BOOST_OS_MACOS`] + +[@http://en.wikipedia.org/wiki/Mac_OS Mac OS] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`macintosh`] [__predef_detection__]] + [[`Macintosh`] [__predef_detection__]] + [[`__APPLE__`] [__predef_detection__]] + [[`__MACH__`] [__predef_detection__]] + + [[`__APPLE__`, `__MACH__`] [10.0.0]] + [[ /otherwise/ ] [9.0.0]] + ] + */ + +#define BOOST_OS_MACOS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(macintosh) || defined(Macintosh) || \ + (defined(__APPLE__) && defined(__MACH__)) \ + ) +# undef BOOST_OS_MACOS +# if !defined(BOOST_OS_MACOS) && defined(__APPLE__) && defined(__MACH__) +# define BOOST_OS_MACOS BOOST_VERSION_NUMBER(10,0,0) +# endif +# if !defined(BOOST_OS_MACOS) +# define BOOST_OS_MACOS BOOST_VERSION_NUMBER(9,0,0) +# endif +#endif + +#if BOOST_OS_MACOS +# define BOOST_OS_MACOS_AVAILABLE +# include +#endif + +#define BOOST_OS_MACOS_NAME "Mac OS" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_MACOS,BOOST_OS_MACOS_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/os/os400.h b/ThirdParty/boost-Subset/boost/predef/os/os400.h new file mode 100644 index 0000000000..b3446c26c9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/os/os400.h @@ -0,0 +1,45 @@ +/* +Copyright Rene Rivera 2011-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_OS400_H +#define BOOST_PREDEF_OS_OS400_H + +#include +#include + +/*` +[heading `BOOST_OS_OS400`] + +[@http://en.wikipedia.org/wiki/IBM_i IBM OS/400] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__OS400__`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_OS400 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__OS400__) \ + ) +# undef BOOST_OS_OS400 +# define BOOST_OS_OS400 BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_OS400 +# define BOOST_OS_OS400_AVAILABLE +# include +#endif + +#define BOOST_OS_OS400_NAME "IBM OS/400" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_OS400,BOOST_OS_OS400_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/os/qnxnto.h b/ThirdParty/boost-Subset/boost/predef/os/qnxnto.h new file mode 100644 index 0000000000..e76fbf2781 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/os/qnxnto.h @@ -0,0 +1,59 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_QNXNTO_H +#define BOOST_PREDEF_OS_QNXNTO_H + +#include +#include + +/*` +[heading `BOOST_OS_QNX`] + +[@http://en.wikipedia.org/wiki/QNX QNX] operating system. +Version number available as major, and minor if possible. And +version 4 is specifically detected. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__QNX__`] [__predef_detection__]] + [[`__QNXNTO__`] [__predef_detection__]] + + [[`_NTO_VERSION`] [V.R.0]] + [[`__QNX__`] [4.0.0]] + ] + */ + +#define BOOST_OS_QNX BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__QNX__) || defined(__QNXNTO__) \ + ) +# undef BOOST_OS_QNX +# if !defined(BOOST_OS_QNX) && defined(_NTO_VERSION) +# define BOOST_OS_QNX BOOST_PREDEF_MAKE_10_VVRR(_NTO_VERSION) +# endif +# if !defined(BOOST_OS_QNX) && defined(__QNX__) +# define BOOST_OS_QNX BOOST_VERSION_NUMBER(4,0,0) +# endif +# if !defined(BOOST_OS_QNX) +# define BOOST_OS_QNX BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_OS_QNX +# define BOOST_OS_QNX_AVAILABLE +# include +#endif + +#define BOOST_OS_QNX_NAME "QNX" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_QNX,BOOST_OS_QNX_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/os/solaris.h b/ThirdParty/boost-Subset/boost/predef/os/solaris.h new file mode 100644 index 0000000000..75ddc91dae --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/os/solaris.h @@ -0,0 +1,46 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_SOLARIS_H +#define BOOST_PREDEF_OS_SOLARIS_H + +#include +#include + +/*` +[heading `BOOST_OS_SOLARIS`] + +[@http://en.wikipedia.org/wiki/Solaris_Operating_Environment Solaris] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`sun`] [__predef_detection__]] + [[`__sun`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_SOLARIS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(sun) || defined(__sun) \ + ) +# undef BOOST_OS_SOLARIS +# define BOOST_OS_SOLARIS BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_SOLARIS +# define BOOST_OS_SOLARIS_AVAILABLE +# include +#endif + +#define BOOST_OS_SOLARIS_NAME "Solaris" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_SOLARIS,BOOST_OS_SOLARIS_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/os/unix.h b/ThirdParty/boost-Subset/boost/predef/os/unix.h new file mode 100644 index 0000000000..a60710427a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/os/unix.h @@ -0,0 +1,76 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_UNIX_H +#define BOOST_PREDEF_OS_UNIX_H + +#include +#include + +/*` +[heading `BOOST_OS_UNIX`] + +[@http://en.wikipedia.org/wiki/Unix Unix Environment] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`unix`] [__predef_detection__]] + [[`__unix`] [__predef_detection__]] + [[`_XOPEN_SOURCE`] [__predef_detection__]] + [[`_POSIX_SOURCE`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_UNIX BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(unix) || defined(__unix) || \ + defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE) +# undef BOOST_OS_UNIX +# define BOOST_OS_UNIX BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_UNIX +# define BOOST_OS_UNIX_AVAILABLE +#endif + +#define BOOST_OS_UNIX_NAME "Unix Environment" + +/*` +[heading `BOOST_OS_SVR4`] + +[@http://en.wikipedia.org/wiki/UNIX_System_V SVR4 Environment] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__sysv__`] [__predef_detection__]] + [[`__SVR4`] [__predef_detection__]] + [[`__svr4__`] [__predef_detection__]] + [[`_SYSTYPE_SVR4`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_SVR4 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__sysv__) || defined(__SVR4) || \ + defined(__svr4__) || defined(_SYSTYPE_SVR4) +# undef BOOST_OS_SVR4 +# define BOOST_OS_SVR4 BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_SVR4 +# define BOOST_OS_SVR4_AVAILABLE +#endif + +#define BOOST_OS_SVR4_NAME "SVR4 Environment" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_UNIX,BOOST_OS_UNIX_NAME) +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_SVR4,BOOST_OS_SVR4_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/os/vms.h b/ThirdParty/boost-Subset/boost/predef/os/vms.h new file mode 100644 index 0000000000..2f8f786d4e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/os/vms.h @@ -0,0 +1,52 @@ +/* +Copyright Rene Rivera 2011-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_VMS_H +#define BOOST_PREDEF_OS_VMS_H + +#include +#include + +/*` +[heading `BOOST_OS_VMS`] + +[@http://en.wikipedia.org/wiki/Vms VMS] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`VMS`] [__predef_detection__]] + [[`__VMS`] [__predef_detection__]] + + [[`__VMS_VER`] [V.R.P]] + ] + */ + +#define BOOST_OS_VMS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(VMS) || defined(__VMS) \ + ) +# undef BOOST_OS_VMS +# if defined(__VMS_VER) +# define BOOST_OS_VMS BOOST_PREDEF_MAKE_10_VVRR00PP00(__VMS_VER) +# else +# define BOOST_OS_VMS BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_OS_VMS +# define BOOST_OS_VMS_AVAILABLE +# include +#endif + +#define BOOST_OS_VMS_NAME "VMS" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_VMS,BOOST_OS_VMS_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/os/windows.h b/ThirdParty/boost-Subset/boost/predef/os/windows.h new file mode 100644 index 0000000000..9db4390950 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/os/windows.h @@ -0,0 +1,51 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OS_WINDOWS_H +#define BOOST_PREDEF_OS_WINDOWS_H + +#include +#include + +/*` +[heading `BOOST_OS_WINDOWS`] + +[@http://en.wikipedia.org/wiki/Category:Microsoft_Windows Microsoft Windows] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`_WIN32`] [__predef_detection__]] + [[`_WIN64`] [__predef_detection__]] + [[`__WIN32__`] [__predef_detection__]] + [[`__TOS_WIN__`] [__predef_detection__]] + [[`__WINDOWS__`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_WINDOWS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(_WIN32) || defined(_WIN64) || \ + defined(__WIN32__) || defined(__TOS_WIN__) || \ + defined(__WINDOWS__) \ + ) +# undef BOOST_OS_WINDOWS +# define BOOST_OS_WINDOWS BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_WINDOWS +# define BOOST_OS_WINDOWS_AVAILABLE +# include +#endif + +#define BOOST_OS_WINDOWS_NAME "Microsoft Windows" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_WINDOWS,BOOST_OS_WINDOWS_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/other.h b/ThirdParty/boost-Subset/boost/predef/other.h new file mode 100644 index 0000000000..c09ad4945f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/other.h @@ -0,0 +1,16 @@ +/* +Copyright Rene Rivera 2013-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#if !defined(BOOST_PREDEF_OTHER_H) || defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS) +#ifndef BOOST_PREDEF_OTHER_H +#define BOOST_PREDEF_OTHER_H +#endif + +#include +/*#include */ + +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/other/endian.h b/ThirdParty/boost-Subset/boost/predef/other/endian.h new file mode 100644 index 0000000000..6d1f43ff4d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/other/endian.h @@ -0,0 +1,204 @@ +/* +Copyright Rene Rivera 2013-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ENDIAN_H +#define BOOST_PREDEF_ENDIAN_H + +#include +#include +#include +#include +#include +#include + +/*` +[heading `BOOST_ENDIAN_*`] + +Detection of endian memory ordering. There are four defined macros +in this header that define the various generally possible endian +memory orderings: + +* `BOOST_ENDIAN_BIG_BYTE`, byte-swapped big-endian. +* `BOOST_ENDIAN_BIG_WORD`, word-swapped big-endian. +* `BOOST_ENDIAN_LITTLE_BYTE`, byte-swapped little-endian. +* `BOOST_ENDIAN_LITTLE_WORD`, word-swapped little-endian. + +The detection is conservative in that it only identifies endianness +that it knows for certain. In particular bi-endianness is not +indicated as is it not practically possible to determine the +endianness from anything but an operating system provided +header. And the currently known headers do not define that +programatic bi-endianness is available. + +This implementation is a compilation of various publicly available +information and acquired knowledge: + +# The indispensable documentation of "Pre-defined Compiler Macros" + [@http://sourceforge.net/p/predef/wiki/Endianness Endianness]. +# The various endian specifications available in the + [@http://wikipedia.org/ Wikipedia] computer architecture pages. +# Generally available searches for headers that define endianness. + */ + +#define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_NOT_AVAILABLE +#define BOOST_ENDIAN_BIG_WORD BOOST_VERSION_NUMBER_NOT_AVAILABLE +#define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_NOT_AVAILABLE +#define BOOST_ENDIAN_LITTLE_WORD BOOST_VERSION_NUMBER_NOT_AVAILABLE + +/* GNU libc provides a header defining __BYTE_ORDER, or _BYTE_ORDER. + * And some OSs provide some for of endian header also. + */ +#if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_BIG_WORD && \ + !BOOST_ENDIAN_LITTLE_BYTE && !BOOST_ENDIAN_LITTLE_WORD +# if BOOST_LIB_C_GNU || BOOST_OS_ANDROID +# include +# else +# if BOOST_OS_MACOS +# include +# else +# if BOOST_OS_BSD +# if BOOST_OS_BSD_OPEN +# include +# else +# include +# endif +# endif +# endif +# endif +# if defined(__BYTE_ORDER) +# if defined(__BIG_ENDIAN) && (__BYTE_ORDER == __BIG_ENDIAN) +# undef BOOST_ENDIAN_BIG_BYTE +# define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE +# endif +# if defined(__LITTLE_ENDIAN) && (__BYTE_ORDER == __LITTLE_ENDIAN) +# undef BOOST_ENDIAN_LITTLE_BYTE +# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE +# endif +# if defined(__PDP_ENDIAN) && (__BYTE_ORDER == __PDP_ENDIAN) +# undef BOOST_ENDIAN_LITTLE_WORD +# define BOOST_ENDIAN_LITTLE_WORD BOOST_VERSION_NUMBER_AVAILABLE +# endif +# endif +# if !defined(__BYTE_ORDER) && defined(_BYTE_ORDER) +# if defined(_BIG_ENDIAN) && (_BYTE_ORDER == _BIG_ENDIAN) +# undef BOOST_ENDIAN_BIG_BYTE +# define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE +# endif +# if defined(_LITTLE_ENDIAN) && (_BYTE_ORDER == _LITTLE_ENDIAN) +# undef BOOST_ENDIAN_LITTLE_BYTE +# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE +# endif +# if defined(_PDP_ENDIAN) && (_BYTE_ORDER == _PDP_ENDIAN) +# undef BOOST_ENDIAN_LITTLE_WORD +# define BOOST_ENDIAN_LITTLE_WORD BOOST_VERSION_NUMBER_AVAILABLE +# endif +# endif +#endif + +/* Built-in byte-swpped big-endian macros. + */ +#if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_BIG_WORD && \ + !BOOST_ENDIAN_LITTLE_BYTE && !BOOST_ENDIAN_LITTLE_WORD +# if (defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)) || \ + (defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN)) || \ + defined(__ARMEB__) || \ + defined(__THUMBEB__) || \ + defined(__AARCH64EB__) || \ + defined(_MIPSEB) || \ + defined(__MIPSEB) || \ + defined(__MIPSEB__) +# undef BOOST_ENDIAN_BIG_BYTE +# define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +/* Built-in byte-swpped little-endian macros. + */ +#if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_BIG_WORD && \ + !BOOST_ENDIAN_LITTLE_BYTE && !BOOST_ENDIAN_LITTLE_WORD +# if (defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)) || \ + (defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN)) || \ + defined(__ARMEL__) || \ + defined(__THUMBEL__) || \ + defined(__AARCH64EL__) || \ + defined(_MIPSEL) || \ + defined(__MIPSEL) || \ + defined(__MIPSEL__) +# undef BOOST_ENDIAN_LITTLE_BYTE +# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +/* Some architectures are strictly one endianess (as opposed + * the current common bi-endianess). + */ +#if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_BIG_WORD && \ + !BOOST_ENDIAN_LITTLE_BYTE && !BOOST_ENDIAN_LITTLE_WORD +# include +# if BOOST_ARCH_M68K || \ + BOOST_ARCH_PARISC || \ + BOOST_ARCH_SPARC || \ + BOOST_ARCH_SYS370 || \ + BOOST_ARCH_SYS390 || \ + BOOST_ARCH_Z +# undef BOOST_ENDIAN_BIG_BYTE +# define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE +# endif +# if BOOST_ARCH_AMD64 || \ + BOOST_ARCH_IA64 || \ + BOOST_ARCH_X86 || \ + BOOST_ARCH_BLACKFIN +# undef BOOST_ENDIAN_LITTLE_BYTE +# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +/* Windows on ARM, if not otherwise detected/specified, is always + * byte-swaped little-endian. + */ +#if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_BIG_WORD && \ + !BOOST_ENDIAN_LITTLE_BYTE && !BOOST_ENDIAN_LITTLE_WORD +# if BOOST_ARCH_ARM +# include +# if BOOST_OS_WINDOWS +# undef BOOST_ENDIAN_LITTLE_BYTE +# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE +# endif +# endif +#endif + +#if BOOST_ENDIAN_BIG_BYTE +# define BOOST_ENDIAN_BIG_BYTE_AVAILABLE +#endif +#if BOOST_ENDIAN_BIG_WORD +# define BOOST_ENDIAN_BIG_WORD_BYTE_AVAILABLE +#endif +#if BOOST_ENDIAN_LITTLE_BYTE +# define BOOST_ENDIAN_LITTLE_BYTE_AVAILABLE +#endif +#if BOOST_ENDIAN_LITTLE_WORD +# define BOOST_ENDIAN_LITTLE_WORD_BYTE_AVAILABLE +#endif + +#define BOOST_ENDIAN_BIG_BYTE_NAME "Byte-Swapped Big-Endian" +#define BOOST_ENDIAN_BIG_WORD_NAME "Word-Swapped Big-Endian" +#define BOOST_ENDIAN_LITTLE_BYTE_NAME "Byte-Swapped Little-Endian" +#define BOOST_ENDIAN_LITTLE_WORD_NAME "Word-Swapped Little-Endian" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ENDIAN_BIG_BYTE,BOOST_ENDIAN_BIG_BYTE_NAME) + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ENDIAN_BIG_WORD,BOOST_ENDIAN_BIG_WORD_NAME) + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ENDIAN_LITTLE_BYTE,BOOST_ENDIAN_LITTLE_BYTE_NAME) + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ENDIAN_LITTLE_WORD,BOOST_ENDIAN_LITTLE_WORD_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/platform.h b/ThirdParty/boost-Subset/boost/predef/platform.h new file mode 100644 index 0000000000..c0c8706e8a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/platform.h @@ -0,0 +1,21 @@ +/* +Copyright Rene Rivera 2013-2015 +Copyright (c) Microsoft Corporation 2014 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#if !defined(BOOST_PREDEF_PLATFORM_H) || defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS) +#ifndef BOOST_PREDEF_PLATFORM_H +#define BOOST_PREDEF_PLATFORM_H +#endif + +#include +#include +#include +#include +#include +/*#include */ + +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/platform/mingw.h b/ThirdParty/boost-Subset/boost/predef/platform/mingw.h new file mode 100644 index 0000000000..64c5837364 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/platform/mingw.h @@ -0,0 +1,69 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_COMPILER_MINGW_H +#define BOOST_PREDEF_COMPILER_MINGW_H + +#include +#include + +/*` +[heading `BOOST_PLAT_MINGW`] + +[@http://en.wikipedia.org/wiki/MinGW MinGW] platform. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__MINGW32__`] [__predef_detection__]] + [[`__MINGW64__`] [__predef_detection__]] + + [[`__MINGW64_VERSION_MAJOR`, `__MINGW64_VERSION_MINOR`] [V.R.0]] + [[`__MINGW32_VERSION_MAJOR`, `__MINGW32_VERSION_MINOR`] [V.R.0]] + ] + */ + +#define BOOST_PLAT_MINGW BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__MINGW32__) || defined(__MINGW64__) +# include <_mingw.h> +# if !defined(BOOST_PLAT_MINGW_DETECTION) && (defined(__MINGW64_VERSION_MAJOR) && defined(__MINGW64_VERSION_MINOR)) +# define BOOST_PLAT_MINGW_DETECTION \ + BOOST_VERSION_NUMBER(__MINGW64_VERSION_MAJOR,__MINGW64_VERSION_MINOR,0) +# endif +# if !defined(BOOST_PLAT_MINGW_DETECTION) && (defined(__MINGW32_VERSION_MAJOR) && defined(__MINGW32_VERSION_MINOR)) +# define BOOST_PLAT_MINGW_DETECTION \ + BOOST_VERSION_NUMBER(__MINGW32_MAJOR_VERSION,__MINGW32_MINOR_VERSION,0) +# endif +# if !defined(BOOST_PLAT_MINGW_DETECTION) +# define BOOST_PLAT_MINGW_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_PLAT_MINGW_DETECTION +# define BOOST_PLAT_MINGW_AVAILABLE +# if defined(BOOST_PREDEF_DETAIL_PLAT_DETECTED) +# define BOOST_PLAT_MINGW_EMULATED BOOST_PLAT_MINGW_DETECTION +# else +# undef BOOST_PLAT_MINGW +# define BOOST_PLAT_MINGW BOOST_PLAT_MINGW_DETECTION +# endif +# include +#endif + +#define BOOST_PLAT_MINGW_NAME "MinGW" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_MINGW,BOOST_PLAT_MINGW_NAME) + +#ifdef BOOST_PLAT_MINGW_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_MINGW_EMULATED,BOOST_PLAT_MINGW_NAME) +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/platform/windows_desktop.h b/ThirdParty/boost-Subset/boost/predef/platform/windows_desktop.h new file mode 100644 index 0000000000..2fd7d5d80c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/platform/windows_desktop.h @@ -0,0 +1,45 @@ +/* +Copyright (c) Microsoft Corporation 2014 +Copyright Rene Rivera 2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_PLAT_WINDOWS_DESKTOP_H +#define BOOST_PREDEF_PLAT_WINDOWS_DESKTOP_H + +#include +#include +#include + +/*` +[heading `BOOST_PLAT_WINDOWS_DESKTOP`] + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`!WINAPI_FAMILY`] [__predef_detection__]] + [[`WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP`] [__predef_detection__]] + ] + */ + +#define BOOST_PLAT_WINDOWS_DESKTOP BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if BOOST_OS_WINDOWS && \ + ( !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP) ) +# undef BOOST_PLAT_WINDOWS_DESKTOP +# define BOOST_PLAT_WINDOWS_DESKTOP BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_PLAT_WINDOWS_DESKTOP +# define BOOST_PLAT_WINDOWS_DESKTOP_AVALIABLE +# include +#endif + +#define BOOST_PLAT_WINDOWS_DESKTOP_NAME "Windows Desktop" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_WINDOWS_DESKTOP,BOOST_PLAT_WINDOWS_DESKTOP_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/platform/windows_phone.h b/ThirdParty/boost-Subset/boost/predef/platform/windows_phone.h new file mode 100644 index 0000000000..495c9180f9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/platform/windows_phone.h @@ -0,0 +1,43 @@ +/* +Copyright (c) Microsoft Corporation 2014 +Copyright Rene Rivera 2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_PLAT_WINDOWS_PHONE_H +#define BOOST_PREDEF_PLAT_WINDOWS_PHONE_H + +#include +#include +#include + +/*` +[heading `BOOST_PLAT_WINDOWS_PHONE`] + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP`] [__predef_detection__]] + ] + */ + +#define BOOST_PLAT_WINDOWS_PHONE BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if BOOST_OS_WINDOWS && defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP +# undef BOOST_PLAT_WINDOWS_PHONE +# define BOOST_PLAT_WINDOWS_PHONE BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_PLAT_WINDOWS_PHONE +# define BOOST_PLAT_WINDOWS_PHONE_AVALIABLE +# include +#endif + +#define BOOST_PLAT_WINDOWS_PHONE_NAME "Windows Phone" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_WINDOWS_PHONE,BOOST_PLAT_WINDOWS_PHONE_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/platform/windows_runtime.h b/ThirdParty/boost-Subset/boost/predef/platform/windows_runtime.h new file mode 100644 index 0000000000..902428e567 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/platform/windows_runtime.h @@ -0,0 +1,45 @@ +/* +Copyright (c) Microsoft Corporation 2014 +Copyright Rene Rivera 2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_PLAT_WINDOWS_RUNTIME_H +#define BOOST_PREDEF_PLAT_WINDOWS_RUNTIME_H + +#include +#include +#include + +/*` +[heading `BOOST_PLAT_WINDOWS_RUNTIME`] + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`WINAPI_FAMILY == WINAPI_FAMILY_APP`] [__predef_detection__]] + [[`WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP`] [__predef_detection__]] + ] + */ + +#define BOOST_PLAT_WINDOWS_RUNTIME BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if BOOST_OS_WINDOWS && defined(WINAPI_FAMILY) && \ + ( WINAPI_FAMILY == WINAPI_FAMILY_APP || WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP ) +# undef BOOST_PLAT_WINDOWS_RUNTIME +# define BOOST_PLAT_WINDOWS_RUNTIME BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_PLAT_WINDOWS_RUNTIME +# define BOOST_PLAT_WINDOWS_RUNTIME_AVALIABLE +# include +#endif + +#define BOOST_PLAT_WINDOWS_RUNTIME_NAME "Windows Runtime" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_WINDOWS_RUNTIME,BOOST_PLAT_WINDOWS_RUNTIME_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/platform/windows_store.h b/ThirdParty/boost-Subset/boost/predef/platform/windows_store.h new file mode 100644 index 0000000000..d65821c5de --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/platform/windows_store.h @@ -0,0 +1,43 @@ +/* +Copyright (c) Microsoft Corporation 2014 +Copyright Rene Rivera 2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_PLAT_WINDOWS_STORE_H +#define BOOST_PREDEF_PLAT_WINDOWS_STORE_H + +#include +#include +#include + +/*` +[heading `BOOST_PLAT_WINDOWS_STORE`] + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`WINAPI_FAMILY == WINAPI_FAMILY_APP`] [__predef_detection__]] + ] + */ + +#define BOOST_PLAT_WINDOWS_STORE BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if BOOST_OS_WINDOWS && defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_APP +# undef BOOST_PLAT_WINDOWS_STORE +# define BOOST_PLAT_WINDOWS_STORE BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_PLAT_WINDOWS_STORE +# define BOOST_PLAT_WINDOWS_STORE_AVALIABLE +# include +#endif + +#define BOOST_PLAT_WINDOWS_STORE_NAME "Windows Store" + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_WINDOWS_STORE,BOOST_PLAT_WINDOWS_STORE_NAME) diff --git a/ThirdParty/boost-Subset/boost/predef/version.h b/ThirdParty/boost-Subset/boost/predef/version.h new file mode 100644 index 0000000000..1d57cbbf99 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/version.h @@ -0,0 +1,15 @@ +/* +Copyright Rene Rivera 2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_VERSION_H +#define BOOST_PREDEF_VERSION_H + +#include + +#define BOOST_PREDEF_VERSION BOOST_VERSION_NUMBER(1,3,0) + +#endif diff --git a/ThirdParty/boost-Subset/boost/predef/version_number.h b/ThirdParty/boost-Subset/boost/predef/version_number.h new file mode 100644 index 0000000000..3903a36b70 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/predef/version_number.h @@ -0,0 +1,53 @@ +/* +Copyright Rene Rivera 2005, 2008-2013 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_VERSION_NUMBER_H +#define BOOST_PREDEF_VERSION_NUMBER_H + +/*` +[heading `BOOST_VERSION_NUMBER`] + +`` +BOOST_VERSION_NUMBER(major,minor,patch) +`` + +Defines standard version numbers, with these properties: + +* Decimal base whole numbers in the range \[0,1000000000). + The number range is designed to allow for a (2,2,5) triplet. + Which fits within a 32 bit value. +* The `major` number can be in the \[0,99\] range. +* The `minor` number can be in the \[0,99\] range. +* The `patch` number can be in the \[0,99999\] range. +* Values can be specified in any base. As the defined value + is an constant expression. +* Value can be directly used in both preprocessor and compiler + expressions for comparison to other similarly defined values. +* The implementation enforces the individual ranges for the + major, minor, and patch numbers. And values over the ranges + are truncated (modulo). + +*/ +#define BOOST_VERSION_NUMBER(major,minor,patch) \ + ( (((major)%100)*10000000) + (((minor)%100)*100000) + ((patch)%100000) ) + +#define BOOST_VERSION_NUMBER_MAX \ + BOOST_VERSION_NUMBER(99,99,99999) + +#define BOOST_VERSION_NUMBER_ZERO \ + BOOST_VERSION_NUMBER(0,0,0) + +#define BOOST_VERSION_NUMBER_MIN \ + BOOST_VERSION_NUMBER(0,0,1) + +#define BOOST_VERSION_NUMBER_AVAILABLE \ + BOOST_VERSION_NUMBER_MIN + +#define BOOST_VERSION_NUMBER_NOT_AVAILABLE \ + BOOST_VERSION_NUMBER_ZERO + +#endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/arithmetic/add.hpp b/ThirdParty/boost-Subset/boost/preprocessor/arithmetic/add.hpp new file mode 100644 index 0000000000..5a29f554f5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/arithmetic/add.hpp @@ -0,0 +1,51 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ARITHMETIC_ADD_HPP +# define BOOST_PREPROCESSOR_ARITHMETIC_ADD_HPP +# +# include +# include +# include +# include +# include +# +# /* BOOST_PP_ADD */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ADD(x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_ADD_P, BOOST_PP_ADD_O, (x, y))) +# else +# define BOOST_PP_ADD(x, y) BOOST_PP_ADD_I(x, y) +# define BOOST_PP_ADD_I(x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_ADD_P, BOOST_PP_ADD_O, (x, y))) +# endif +# +# define BOOST_PP_ADD_P(d, xy) BOOST_PP_TUPLE_ELEM(2, 1, xy) +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_ADD_O(d, xy) BOOST_PP_ADD_O_I xy +# else +# define BOOST_PP_ADD_O(d, xy) BOOST_PP_ADD_O_I(BOOST_PP_TUPLE_ELEM(2, 0, xy), BOOST_PP_TUPLE_ELEM(2, 1, xy)) +# endif +# +# define BOOST_PP_ADD_O_I(x, y) (BOOST_PP_INC(x), BOOST_PP_DEC(y)) +# +# /* BOOST_PP_ADD_D */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ADD_D(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_ADD_P, BOOST_PP_ADD_O, (x, y))) +# else +# define BOOST_PP_ADD_D(d, x, y) BOOST_PP_ADD_D_I(d, x, y) +# define BOOST_PP_ADD_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_ADD_P, BOOST_PP_ADD_O, (x, y))) +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/arithmetic/dec.hpp b/ThirdParty/boost-Subset/boost/preprocessor/arithmetic/dec.hpp new file mode 100644 index 0000000000..23dd0a35a1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/arithmetic/dec.hpp @@ -0,0 +1,289 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ARITHMETIC_DEC_HPP +# define BOOST_PREPROCESSOR_ARITHMETIC_DEC_HPP +# +# include +# +# /* BOOST_PP_DEC */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_DEC(x) BOOST_PP_DEC_I(x) +# else +# define BOOST_PP_DEC(x) BOOST_PP_DEC_OO((x)) +# define BOOST_PP_DEC_OO(par) BOOST_PP_DEC_I ## par +# endif +# +# define BOOST_PP_DEC_I(x) BOOST_PP_DEC_ ## x +# +# define BOOST_PP_DEC_0 0 +# define BOOST_PP_DEC_1 0 +# define BOOST_PP_DEC_2 1 +# define BOOST_PP_DEC_3 2 +# define BOOST_PP_DEC_4 3 +# define BOOST_PP_DEC_5 4 +# define BOOST_PP_DEC_6 5 +# define BOOST_PP_DEC_7 6 +# define BOOST_PP_DEC_8 7 +# define BOOST_PP_DEC_9 8 +# define BOOST_PP_DEC_10 9 +# define BOOST_PP_DEC_11 10 +# define BOOST_PP_DEC_12 11 +# define BOOST_PP_DEC_13 12 +# define BOOST_PP_DEC_14 13 +# define BOOST_PP_DEC_15 14 +# define BOOST_PP_DEC_16 15 +# define BOOST_PP_DEC_17 16 +# define BOOST_PP_DEC_18 17 +# define BOOST_PP_DEC_19 18 +# define BOOST_PP_DEC_20 19 +# define BOOST_PP_DEC_21 20 +# define BOOST_PP_DEC_22 21 +# define BOOST_PP_DEC_23 22 +# define BOOST_PP_DEC_24 23 +# define BOOST_PP_DEC_25 24 +# define BOOST_PP_DEC_26 25 +# define BOOST_PP_DEC_27 26 +# define BOOST_PP_DEC_28 27 +# define BOOST_PP_DEC_29 28 +# define BOOST_PP_DEC_30 29 +# define BOOST_PP_DEC_31 30 +# define BOOST_PP_DEC_32 31 +# define BOOST_PP_DEC_33 32 +# define BOOST_PP_DEC_34 33 +# define BOOST_PP_DEC_35 34 +# define BOOST_PP_DEC_36 35 +# define BOOST_PP_DEC_37 36 +# define BOOST_PP_DEC_38 37 +# define BOOST_PP_DEC_39 38 +# define BOOST_PP_DEC_40 39 +# define BOOST_PP_DEC_41 40 +# define BOOST_PP_DEC_42 41 +# define BOOST_PP_DEC_43 42 +# define BOOST_PP_DEC_44 43 +# define BOOST_PP_DEC_45 44 +# define BOOST_PP_DEC_46 45 +# define BOOST_PP_DEC_47 46 +# define BOOST_PP_DEC_48 47 +# define BOOST_PP_DEC_49 48 +# define BOOST_PP_DEC_50 49 +# define BOOST_PP_DEC_51 50 +# define BOOST_PP_DEC_52 51 +# define BOOST_PP_DEC_53 52 +# define BOOST_PP_DEC_54 53 +# define BOOST_PP_DEC_55 54 +# define BOOST_PP_DEC_56 55 +# define BOOST_PP_DEC_57 56 +# define BOOST_PP_DEC_58 57 +# define BOOST_PP_DEC_59 58 +# define BOOST_PP_DEC_60 59 +# define BOOST_PP_DEC_61 60 +# define BOOST_PP_DEC_62 61 +# define BOOST_PP_DEC_63 62 +# define BOOST_PP_DEC_64 63 +# define BOOST_PP_DEC_65 64 +# define BOOST_PP_DEC_66 65 +# define BOOST_PP_DEC_67 66 +# define BOOST_PP_DEC_68 67 +# define BOOST_PP_DEC_69 68 +# define BOOST_PP_DEC_70 69 +# define BOOST_PP_DEC_71 70 +# define BOOST_PP_DEC_72 71 +# define BOOST_PP_DEC_73 72 +# define BOOST_PP_DEC_74 73 +# define BOOST_PP_DEC_75 74 +# define BOOST_PP_DEC_76 75 +# define BOOST_PP_DEC_77 76 +# define BOOST_PP_DEC_78 77 +# define BOOST_PP_DEC_79 78 +# define BOOST_PP_DEC_80 79 +# define BOOST_PP_DEC_81 80 +# define BOOST_PP_DEC_82 81 +# define BOOST_PP_DEC_83 82 +# define BOOST_PP_DEC_84 83 +# define BOOST_PP_DEC_85 84 +# define BOOST_PP_DEC_86 85 +# define BOOST_PP_DEC_87 86 +# define BOOST_PP_DEC_88 87 +# define BOOST_PP_DEC_89 88 +# define BOOST_PP_DEC_90 89 +# define BOOST_PP_DEC_91 90 +# define BOOST_PP_DEC_92 91 +# define BOOST_PP_DEC_93 92 +# define BOOST_PP_DEC_94 93 +# define BOOST_PP_DEC_95 94 +# define BOOST_PP_DEC_96 95 +# define BOOST_PP_DEC_97 96 +# define BOOST_PP_DEC_98 97 +# define BOOST_PP_DEC_99 98 +# define BOOST_PP_DEC_100 99 +# define BOOST_PP_DEC_101 100 +# define BOOST_PP_DEC_102 101 +# define BOOST_PP_DEC_103 102 +# define BOOST_PP_DEC_104 103 +# define BOOST_PP_DEC_105 104 +# define BOOST_PP_DEC_106 105 +# define BOOST_PP_DEC_107 106 +# define BOOST_PP_DEC_108 107 +# define BOOST_PP_DEC_109 108 +# define BOOST_PP_DEC_110 109 +# define BOOST_PP_DEC_111 110 +# define BOOST_PP_DEC_112 111 +# define BOOST_PP_DEC_113 112 +# define BOOST_PP_DEC_114 113 +# define BOOST_PP_DEC_115 114 +# define BOOST_PP_DEC_116 115 +# define BOOST_PP_DEC_117 116 +# define BOOST_PP_DEC_118 117 +# define BOOST_PP_DEC_119 118 +# define BOOST_PP_DEC_120 119 +# define BOOST_PP_DEC_121 120 +# define BOOST_PP_DEC_122 121 +# define BOOST_PP_DEC_123 122 +# define BOOST_PP_DEC_124 123 +# define BOOST_PP_DEC_125 124 +# define BOOST_PP_DEC_126 125 +# define BOOST_PP_DEC_127 126 +# define BOOST_PP_DEC_128 127 +# define BOOST_PP_DEC_129 128 +# define BOOST_PP_DEC_130 129 +# define BOOST_PP_DEC_131 130 +# define BOOST_PP_DEC_132 131 +# define BOOST_PP_DEC_133 132 +# define BOOST_PP_DEC_134 133 +# define BOOST_PP_DEC_135 134 +# define BOOST_PP_DEC_136 135 +# define BOOST_PP_DEC_137 136 +# define BOOST_PP_DEC_138 137 +# define BOOST_PP_DEC_139 138 +# define BOOST_PP_DEC_140 139 +# define BOOST_PP_DEC_141 140 +# define BOOST_PP_DEC_142 141 +# define BOOST_PP_DEC_143 142 +# define BOOST_PP_DEC_144 143 +# define BOOST_PP_DEC_145 144 +# define BOOST_PP_DEC_146 145 +# define BOOST_PP_DEC_147 146 +# define BOOST_PP_DEC_148 147 +# define BOOST_PP_DEC_149 148 +# define BOOST_PP_DEC_150 149 +# define BOOST_PP_DEC_151 150 +# define BOOST_PP_DEC_152 151 +# define BOOST_PP_DEC_153 152 +# define BOOST_PP_DEC_154 153 +# define BOOST_PP_DEC_155 154 +# define BOOST_PP_DEC_156 155 +# define BOOST_PP_DEC_157 156 +# define BOOST_PP_DEC_158 157 +# define BOOST_PP_DEC_159 158 +# define BOOST_PP_DEC_160 159 +# define BOOST_PP_DEC_161 160 +# define BOOST_PP_DEC_162 161 +# define BOOST_PP_DEC_163 162 +# define BOOST_PP_DEC_164 163 +# define BOOST_PP_DEC_165 164 +# define BOOST_PP_DEC_166 165 +# define BOOST_PP_DEC_167 166 +# define BOOST_PP_DEC_168 167 +# define BOOST_PP_DEC_169 168 +# define BOOST_PP_DEC_170 169 +# define BOOST_PP_DEC_171 170 +# define BOOST_PP_DEC_172 171 +# define BOOST_PP_DEC_173 172 +# define BOOST_PP_DEC_174 173 +# define BOOST_PP_DEC_175 174 +# define BOOST_PP_DEC_176 175 +# define BOOST_PP_DEC_177 176 +# define BOOST_PP_DEC_178 177 +# define BOOST_PP_DEC_179 178 +# define BOOST_PP_DEC_180 179 +# define BOOST_PP_DEC_181 180 +# define BOOST_PP_DEC_182 181 +# define BOOST_PP_DEC_183 182 +# define BOOST_PP_DEC_184 183 +# define BOOST_PP_DEC_185 184 +# define BOOST_PP_DEC_186 185 +# define BOOST_PP_DEC_187 186 +# define BOOST_PP_DEC_188 187 +# define BOOST_PP_DEC_189 188 +# define BOOST_PP_DEC_190 189 +# define BOOST_PP_DEC_191 190 +# define BOOST_PP_DEC_192 191 +# define BOOST_PP_DEC_193 192 +# define BOOST_PP_DEC_194 193 +# define BOOST_PP_DEC_195 194 +# define BOOST_PP_DEC_196 195 +# define BOOST_PP_DEC_197 196 +# define BOOST_PP_DEC_198 197 +# define BOOST_PP_DEC_199 198 +# define BOOST_PP_DEC_200 199 +# define BOOST_PP_DEC_201 200 +# define BOOST_PP_DEC_202 201 +# define BOOST_PP_DEC_203 202 +# define BOOST_PP_DEC_204 203 +# define BOOST_PP_DEC_205 204 +# define BOOST_PP_DEC_206 205 +# define BOOST_PP_DEC_207 206 +# define BOOST_PP_DEC_208 207 +# define BOOST_PP_DEC_209 208 +# define BOOST_PP_DEC_210 209 +# define BOOST_PP_DEC_211 210 +# define BOOST_PP_DEC_212 211 +# define BOOST_PP_DEC_213 212 +# define BOOST_PP_DEC_214 213 +# define BOOST_PP_DEC_215 214 +# define BOOST_PP_DEC_216 215 +# define BOOST_PP_DEC_217 216 +# define BOOST_PP_DEC_218 217 +# define BOOST_PP_DEC_219 218 +# define BOOST_PP_DEC_220 219 +# define BOOST_PP_DEC_221 220 +# define BOOST_PP_DEC_222 221 +# define BOOST_PP_DEC_223 222 +# define BOOST_PP_DEC_224 223 +# define BOOST_PP_DEC_225 224 +# define BOOST_PP_DEC_226 225 +# define BOOST_PP_DEC_227 226 +# define BOOST_PP_DEC_228 227 +# define BOOST_PP_DEC_229 228 +# define BOOST_PP_DEC_230 229 +# define BOOST_PP_DEC_231 230 +# define BOOST_PP_DEC_232 231 +# define BOOST_PP_DEC_233 232 +# define BOOST_PP_DEC_234 233 +# define BOOST_PP_DEC_235 234 +# define BOOST_PP_DEC_236 235 +# define BOOST_PP_DEC_237 236 +# define BOOST_PP_DEC_238 237 +# define BOOST_PP_DEC_239 238 +# define BOOST_PP_DEC_240 239 +# define BOOST_PP_DEC_241 240 +# define BOOST_PP_DEC_242 241 +# define BOOST_PP_DEC_243 242 +# define BOOST_PP_DEC_244 243 +# define BOOST_PP_DEC_245 244 +# define BOOST_PP_DEC_246 245 +# define BOOST_PP_DEC_247 246 +# define BOOST_PP_DEC_248 247 +# define BOOST_PP_DEC_249 248 +# define BOOST_PP_DEC_250 249 +# define BOOST_PP_DEC_251 250 +# define BOOST_PP_DEC_252 251 +# define BOOST_PP_DEC_253 252 +# define BOOST_PP_DEC_254 253 +# define BOOST_PP_DEC_255 254 +# define BOOST_PP_DEC_256 255 +# define BOOST_PP_DEC_257 256 +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/arithmetic/detail/div_base.hpp b/ThirdParty/boost-Subset/boost/preprocessor/arithmetic/detail/div_base.hpp new file mode 100644 index 0000000000..106632a3de --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/arithmetic/detail/div_base.hpp @@ -0,0 +1,61 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ARITHMETIC_DETAIL_DIV_BASE_HPP +# define BOOST_PREPROCESSOR_ARITHMETIC_DETAIL_DIV_BASE_HPP +# +# include +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_DIV_BASE */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_DIV_BASE(x, y) BOOST_PP_WHILE(BOOST_PP_DIV_BASE_P, BOOST_PP_DIV_BASE_O, (0, x, y)) +# else +# define BOOST_PP_DIV_BASE(x, y) BOOST_PP_DIV_BASE_I(x, y) +# define BOOST_PP_DIV_BASE_I(x, y) BOOST_PP_WHILE(BOOST_PP_DIV_BASE_P, BOOST_PP_DIV_BASE_O, (0, x, y)) +# endif +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() +# define BOOST_PP_DIV_BASE_P(d, rxy) BOOST_PP_DIV_BASE_P_IM(d, BOOST_PP_TUPLE_REM_3 rxy) +# define BOOST_PP_DIV_BASE_P_IM(d, im) BOOST_PP_DIV_BASE_P_I(d, im) +# else +# define BOOST_PP_DIV_BASE_P(d, rxy) BOOST_PP_DIV_BASE_P_I(d, BOOST_PP_TUPLE_ELEM(3, 0, rxy), BOOST_PP_TUPLE_ELEM(3, 1, rxy), BOOST_PP_TUPLE_ELEM(3, 2, rxy)) +# endif +# +# define BOOST_PP_DIV_BASE_P_I(d, r, x, y) BOOST_PP_LESS_EQUAL_D(d, y, x) +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() +# define BOOST_PP_DIV_BASE_O(d, rxy) BOOST_PP_DIV_BASE_O_IM(d, BOOST_PP_TUPLE_REM_3 rxy) +# define BOOST_PP_DIV_BASE_O_IM(d, im) BOOST_PP_DIV_BASE_O_I(d, im) +# else +# define BOOST_PP_DIV_BASE_O(d, rxy) BOOST_PP_DIV_BASE_O_I(d, BOOST_PP_TUPLE_ELEM(3, 0, rxy), BOOST_PP_TUPLE_ELEM(3, 1, rxy), BOOST_PP_TUPLE_ELEM(3, 2, rxy)) +# endif +# +# define BOOST_PP_DIV_BASE_O_I(d, r, x, y) (BOOST_PP_INC(r), BOOST_PP_SUB_D(d, x, y), y) +# +# /* BOOST_PP_DIV_BASE_D */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_DIV_BASE_D(d, x, y) BOOST_PP_WHILE_ ## d(BOOST_PP_DIV_BASE_P, BOOST_PP_DIV_BASE_O, (0, x, y)) +# else +# define BOOST_PP_DIV_BASE_D(d, x, y) BOOST_PP_DIV_BASE_D_I(d, x, y) +# define BOOST_PP_DIV_BASE_D_I(d, x, y) BOOST_PP_WHILE_ ## d(BOOST_PP_DIV_BASE_P, BOOST_PP_DIV_BASE_O, (0, x, y)) +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/arithmetic/inc.hpp b/ThirdParty/boost-Subset/boost/preprocessor/arithmetic/inc.hpp new file mode 100644 index 0000000000..1597ab85c3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/arithmetic/inc.hpp @@ -0,0 +1,288 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ARITHMETIC_INC_HPP +# define BOOST_PREPROCESSOR_ARITHMETIC_INC_HPP +# +# include +# +# /* BOOST_PP_INC */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_INC(x) BOOST_PP_INC_I(x) +# else +# define BOOST_PP_INC(x) BOOST_PP_INC_OO((x)) +# define BOOST_PP_INC_OO(par) BOOST_PP_INC_I ## par +# endif +# +# define BOOST_PP_INC_I(x) BOOST_PP_INC_ ## x +# +# define BOOST_PP_INC_0 1 +# define BOOST_PP_INC_1 2 +# define BOOST_PP_INC_2 3 +# define BOOST_PP_INC_3 4 +# define BOOST_PP_INC_4 5 +# define BOOST_PP_INC_5 6 +# define BOOST_PP_INC_6 7 +# define BOOST_PP_INC_7 8 +# define BOOST_PP_INC_8 9 +# define BOOST_PP_INC_9 10 +# define BOOST_PP_INC_10 11 +# define BOOST_PP_INC_11 12 +# define BOOST_PP_INC_12 13 +# define BOOST_PP_INC_13 14 +# define BOOST_PP_INC_14 15 +# define BOOST_PP_INC_15 16 +# define BOOST_PP_INC_16 17 +# define BOOST_PP_INC_17 18 +# define BOOST_PP_INC_18 19 +# define BOOST_PP_INC_19 20 +# define BOOST_PP_INC_20 21 +# define BOOST_PP_INC_21 22 +# define BOOST_PP_INC_22 23 +# define BOOST_PP_INC_23 24 +# define BOOST_PP_INC_24 25 +# define BOOST_PP_INC_25 26 +# define BOOST_PP_INC_26 27 +# define BOOST_PP_INC_27 28 +# define BOOST_PP_INC_28 29 +# define BOOST_PP_INC_29 30 +# define BOOST_PP_INC_30 31 +# define BOOST_PP_INC_31 32 +# define BOOST_PP_INC_32 33 +# define BOOST_PP_INC_33 34 +# define BOOST_PP_INC_34 35 +# define BOOST_PP_INC_35 36 +# define BOOST_PP_INC_36 37 +# define BOOST_PP_INC_37 38 +# define BOOST_PP_INC_38 39 +# define BOOST_PP_INC_39 40 +# define BOOST_PP_INC_40 41 +# define BOOST_PP_INC_41 42 +# define BOOST_PP_INC_42 43 +# define BOOST_PP_INC_43 44 +# define BOOST_PP_INC_44 45 +# define BOOST_PP_INC_45 46 +# define BOOST_PP_INC_46 47 +# define BOOST_PP_INC_47 48 +# define BOOST_PP_INC_48 49 +# define BOOST_PP_INC_49 50 +# define BOOST_PP_INC_50 51 +# define BOOST_PP_INC_51 52 +# define BOOST_PP_INC_52 53 +# define BOOST_PP_INC_53 54 +# define BOOST_PP_INC_54 55 +# define BOOST_PP_INC_55 56 +# define BOOST_PP_INC_56 57 +# define BOOST_PP_INC_57 58 +# define BOOST_PP_INC_58 59 +# define BOOST_PP_INC_59 60 +# define BOOST_PP_INC_60 61 +# define BOOST_PP_INC_61 62 +# define BOOST_PP_INC_62 63 +# define BOOST_PP_INC_63 64 +# define BOOST_PP_INC_64 65 +# define BOOST_PP_INC_65 66 +# define BOOST_PP_INC_66 67 +# define BOOST_PP_INC_67 68 +# define BOOST_PP_INC_68 69 +# define BOOST_PP_INC_69 70 +# define BOOST_PP_INC_70 71 +# define BOOST_PP_INC_71 72 +# define BOOST_PP_INC_72 73 +# define BOOST_PP_INC_73 74 +# define BOOST_PP_INC_74 75 +# define BOOST_PP_INC_75 76 +# define BOOST_PP_INC_76 77 +# define BOOST_PP_INC_77 78 +# define BOOST_PP_INC_78 79 +# define BOOST_PP_INC_79 80 +# define BOOST_PP_INC_80 81 +# define BOOST_PP_INC_81 82 +# define BOOST_PP_INC_82 83 +# define BOOST_PP_INC_83 84 +# define BOOST_PP_INC_84 85 +# define BOOST_PP_INC_85 86 +# define BOOST_PP_INC_86 87 +# define BOOST_PP_INC_87 88 +# define BOOST_PP_INC_88 89 +# define BOOST_PP_INC_89 90 +# define BOOST_PP_INC_90 91 +# define BOOST_PP_INC_91 92 +# define BOOST_PP_INC_92 93 +# define BOOST_PP_INC_93 94 +# define BOOST_PP_INC_94 95 +# define BOOST_PP_INC_95 96 +# define BOOST_PP_INC_96 97 +# define BOOST_PP_INC_97 98 +# define BOOST_PP_INC_98 99 +# define BOOST_PP_INC_99 100 +# define BOOST_PP_INC_100 101 +# define BOOST_PP_INC_101 102 +# define BOOST_PP_INC_102 103 +# define BOOST_PP_INC_103 104 +# define BOOST_PP_INC_104 105 +# define BOOST_PP_INC_105 106 +# define BOOST_PP_INC_106 107 +# define BOOST_PP_INC_107 108 +# define BOOST_PP_INC_108 109 +# define BOOST_PP_INC_109 110 +# define BOOST_PP_INC_110 111 +# define BOOST_PP_INC_111 112 +# define BOOST_PP_INC_112 113 +# define BOOST_PP_INC_113 114 +# define BOOST_PP_INC_114 115 +# define BOOST_PP_INC_115 116 +# define BOOST_PP_INC_116 117 +# define BOOST_PP_INC_117 118 +# define BOOST_PP_INC_118 119 +# define BOOST_PP_INC_119 120 +# define BOOST_PP_INC_120 121 +# define BOOST_PP_INC_121 122 +# define BOOST_PP_INC_122 123 +# define BOOST_PP_INC_123 124 +# define BOOST_PP_INC_124 125 +# define BOOST_PP_INC_125 126 +# define BOOST_PP_INC_126 127 +# define BOOST_PP_INC_127 128 +# define BOOST_PP_INC_128 129 +# define BOOST_PP_INC_129 130 +# define BOOST_PP_INC_130 131 +# define BOOST_PP_INC_131 132 +# define BOOST_PP_INC_132 133 +# define BOOST_PP_INC_133 134 +# define BOOST_PP_INC_134 135 +# define BOOST_PP_INC_135 136 +# define BOOST_PP_INC_136 137 +# define BOOST_PP_INC_137 138 +# define BOOST_PP_INC_138 139 +# define BOOST_PP_INC_139 140 +# define BOOST_PP_INC_140 141 +# define BOOST_PP_INC_141 142 +# define BOOST_PP_INC_142 143 +# define BOOST_PP_INC_143 144 +# define BOOST_PP_INC_144 145 +# define BOOST_PP_INC_145 146 +# define BOOST_PP_INC_146 147 +# define BOOST_PP_INC_147 148 +# define BOOST_PP_INC_148 149 +# define BOOST_PP_INC_149 150 +# define BOOST_PP_INC_150 151 +# define BOOST_PP_INC_151 152 +# define BOOST_PP_INC_152 153 +# define BOOST_PP_INC_153 154 +# define BOOST_PP_INC_154 155 +# define BOOST_PP_INC_155 156 +# define BOOST_PP_INC_156 157 +# define BOOST_PP_INC_157 158 +# define BOOST_PP_INC_158 159 +# define BOOST_PP_INC_159 160 +# define BOOST_PP_INC_160 161 +# define BOOST_PP_INC_161 162 +# define BOOST_PP_INC_162 163 +# define BOOST_PP_INC_163 164 +# define BOOST_PP_INC_164 165 +# define BOOST_PP_INC_165 166 +# define BOOST_PP_INC_166 167 +# define BOOST_PP_INC_167 168 +# define BOOST_PP_INC_168 169 +# define BOOST_PP_INC_169 170 +# define BOOST_PP_INC_170 171 +# define BOOST_PP_INC_171 172 +# define BOOST_PP_INC_172 173 +# define BOOST_PP_INC_173 174 +# define BOOST_PP_INC_174 175 +# define BOOST_PP_INC_175 176 +# define BOOST_PP_INC_176 177 +# define BOOST_PP_INC_177 178 +# define BOOST_PP_INC_178 179 +# define BOOST_PP_INC_179 180 +# define BOOST_PP_INC_180 181 +# define BOOST_PP_INC_181 182 +# define BOOST_PP_INC_182 183 +# define BOOST_PP_INC_183 184 +# define BOOST_PP_INC_184 185 +# define BOOST_PP_INC_185 186 +# define BOOST_PP_INC_186 187 +# define BOOST_PP_INC_187 188 +# define BOOST_PP_INC_188 189 +# define BOOST_PP_INC_189 190 +# define BOOST_PP_INC_190 191 +# define BOOST_PP_INC_191 192 +# define BOOST_PP_INC_192 193 +# define BOOST_PP_INC_193 194 +# define BOOST_PP_INC_194 195 +# define BOOST_PP_INC_195 196 +# define BOOST_PP_INC_196 197 +# define BOOST_PP_INC_197 198 +# define BOOST_PP_INC_198 199 +# define BOOST_PP_INC_199 200 +# define BOOST_PP_INC_200 201 +# define BOOST_PP_INC_201 202 +# define BOOST_PP_INC_202 203 +# define BOOST_PP_INC_203 204 +# define BOOST_PP_INC_204 205 +# define BOOST_PP_INC_205 206 +# define BOOST_PP_INC_206 207 +# define BOOST_PP_INC_207 208 +# define BOOST_PP_INC_208 209 +# define BOOST_PP_INC_209 210 +# define BOOST_PP_INC_210 211 +# define BOOST_PP_INC_211 212 +# define BOOST_PP_INC_212 213 +# define BOOST_PP_INC_213 214 +# define BOOST_PP_INC_214 215 +# define BOOST_PP_INC_215 216 +# define BOOST_PP_INC_216 217 +# define BOOST_PP_INC_217 218 +# define BOOST_PP_INC_218 219 +# define BOOST_PP_INC_219 220 +# define BOOST_PP_INC_220 221 +# define BOOST_PP_INC_221 222 +# define BOOST_PP_INC_222 223 +# define BOOST_PP_INC_223 224 +# define BOOST_PP_INC_224 225 +# define BOOST_PP_INC_225 226 +# define BOOST_PP_INC_226 227 +# define BOOST_PP_INC_227 228 +# define BOOST_PP_INC_228 229 +# define BOOST_PP_INC_229 230 +# define BOOST_PP_INC_230 231 +# define BOOST_PP_INC_231 232 +# define BOOST_PP_INC_232 233 +# define BOOST_PP_INC_233 234 +# define BOOST_PP_INC_234 235 +# define BOOST_PP_INC_235 236 +# define BOOST_PP_INC_236 237 +# define BOOST_PP_INC_237 238 +# define BOOST_PP_INC_238 239 +# define BOOST_PP_INC_239 240 +# define BOOST_PP_INC_240 241 +# define BOOST_PP_INC_241 242 +# define BOOST_PP_INC_242 243 +# define BOOST_PP_INC_243 244 +# define BOOST_PP_INC_244 245 +# define BOOST_PP_INC_245 246 +# define BOOST_PP_INC_246 247 +# define BOOST_PP_INC_247 248 +# define BOOST_PP_INC_248 249 +# define BOOST_PP_INC_249 250 +# define BOOST_PP_INC_250 251 +# define BOOST_PP_INC_251 252 +# define BOOST_PP_INC_252 253 +# define BOOST_PP_INC_253 254 +# define BOOST_PP_INC_254 255 +# define BOOST_PP_INC_255 256 +# define BOOST_PP_INC_256 256 +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/arithmetic/mod.hpp b/ThirdParty/boost-Subset/boost/preprocessor/arithmetic/mod.hpp new file mode 100644 index 0000000000..62489d1dbd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/arithmetic/mod.hpp @@ -0,0 +1,39 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ARITHMETIC_MOD_HPP +# define BOOST_PREPROCESSOR_ARITHMETIC_MOD_HPP +# +# include +# include +# include +# +# /* BOOST_PP_MOD */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_MOD(x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE(x, y)) +# else +# define BOOST_PP_MOD(x, y) BOOST_PP_MOD_I(x, y) +# define BOOST_PP_MOD_I(x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE(x, y)) +# endif +# +# /* BOOST_PP_MOD_D */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_MOD_D(d, x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE_D(d, x, y)) +# else +# define BOOST_PP_MOD_D(d, x, y) BOOST_PP_MOD_D_I(d, x, y) +# define BOOST_PP_MOD_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE_D(d, x, y)) +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/arithmetic/sub.hpp b/ThirdParty/boost-Subset/boost/preprocessor/arithmetic/sub.hpp new file mode 100644 index 0000000000..5262cdaff8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/arithmetic/sub.hpp @@ -0,0 +1,50 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ARITHMETIC_SUB_HPP +# define BOOST_PREPROCESSOR_ARITHMETIC_SUB_HPP +# +# include +# include +# include +# include +# +# /* BOOST_PP_SUB */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SUB(x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y))) +# else +# define BOOST_PP_SUB(x, y) BOOST_PP_SUB_I(x, y) +# define BOOST_PP_SUB_I(x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y))) +# endif +# +# define BOOST_PP_SUB_P(d, xy) BOOST_PP_TUPLE_ELEM(2, 1, xy) +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_SUB_O(d, xy) BOOST_PP_SUB_O_I xy +# else +# define BOOST_PP_SUB_O(d, xy) BOOST_PP_SUB_O_I(BOOST_PP_TUPLE_ELEM(2, 0, xy), BOOST_PP_TUPLE_ELEM(2, 1, xy)) +# endif +# +# define BOOST_PP_SUB_O_I(x, y) (BOOST_PP_DEC(x), BOOST_PP_DEC(y)) +# +# /* BOOST_PP_SUB_D */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SUB_D(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y))) +# else +# define BOOST_PP_SUB_D(d, x, y) BOOST_PP_SUB_D_I(d, x, y) +# define BOOST_PP_SUB_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y))) +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/array/data.hpp b/ThirdParty/boost-Subset/boost/preprocessor/array/data.hpp new file mode 100644 index 0000000000..10c926a750 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/array/data.hpp @@ -0,0 +1,28 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ARRAY_DATA_HPP +# define BOOST_PREPROCESSOR_ARRAY_DATA_HPP +# +# include +# include +# +# /* BOOST_PP_ARRAY_DATA */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ARRAY_DATA(array) BOOST_PP_TUPLE_ELEM(2, 1, array) +# else +# define BOOST_PP_ARRAY_DATA(array) BOOST_PP_ARRAY_DATA_I(array) +# define BOOST_PP_ARRAY_DATA_I(array) BOOST_PP_ARRAY_DATA_II array +# define BOOST_PP_ARRAY_DATA_II(size, data) data +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/array/elem.hpp b/ThirdParty/boost-Subset/boost/preprocessor/array/elem.hpp new file mode 100644 index 0000000000..105ba24e31 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/array/elem.hpp @@ -0,0 +1,29 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ARRAY_ELEM_HPP +# define BOOST_PREPROCESSOR_ARRAY_ELEM_HPP +# +# include +# include +# include +# include +# +# /* BOOST_PP_ARRAY_ELEM */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ARRAY_ELEM(i, array) BOOST_PP_TUPLE_ELEM(BOOST_PP_ARRAY_SIZE(array), i, BOOST_PP_ARRAY_DATA(array)) +# else +# define BOOST_PP_ARRAY_ELEM(i, array) BOOST_PP_ARRAY_ELEM_I(i, array) +# define BOOST_PP_ARRAY_ELEM_I(i, array) BOOST_PP_TUPLE_ELEM(BOOST_PP_ARRAY_SIZE(array), i, BOOST_PP_ARRAY_DATA(array)) +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/array/size.hpp b/ThirdParty/boost-Subset/boost/preprocessor/array/size.hpp new file mode 100644 index 0000000000..3f370ee41b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/array/size.hpp @@ -0,0 +1,28 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ARRAY_SIZE_HPP +# define BOOST_PREPROCESSOR_ARRAY_SIZE_HPP +# +# include +# include +# +# /* BOOST_PP_ARRAY_SIZE */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ARRAY_SIZE(array) BOOST_PP_TUPLE_ELEM(2, 0, array) +# else +# define BOOST_PP_ARRAY_SIZE(array) BOOST_PP_ARRAY_SIZE_I(array) +# define BOOST_PP_ARRAY_SIZE_I(array) BOOST_PP_ARRAY_SIZE_II array +# define BOOST_PP_ARRAY_SIZE_II(size, data) size +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/cat.hpp b/ThirdParty/boost-Subset/boost/preprocessor/cat.hpp new file mode 100644 index 0000000000..5e52850d48 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/cat.hpp @@ -0,0 +1,35 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_CAT_HPP +# define BOOST_PREPROCESSOR_CAT_HPP +# +# include +# +# /* BOOST_PP_CAT */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_CAT(a, b) BOOST_PP_CAT_I(a, b) +# else +# define BOOST_PP_CAT(a, b) BOOST_PP_CAT_OO((a, b)) +# define BOOST_PP_CAT_OO(par) BOOST_PP_CAT_I ## par +# endif +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_CAT_I(a, b) a ## b +# else +# define BOOST_PP_CAT_I(a, b) BOOST_PP_CAT_II(~, a ## b) +# define BOOST_PP_CAT_II(p, res) res +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/comma_if.hpp b/ThirdParty/boost-Subset/boost/preprocessor/comma_if.hpp new file mode 100644 index 0000000000..9ceb079555 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/comma_if.hpp @@ -0,0 +1,17 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_COMMA_IF_HPP +# define BOOST_PREPROCESSOR_COMMA_IF_HPP +# +# include +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/comparison/equal.hpp b/ThirdParty/boost-Subset/boost/preprocessor/comparison/equal.hpp new file mode 100644 index 0000000000..d299efe586 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/comparison/equal.hpp @@ -0,0 +1,34 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_COMPARISON_EQUAL_HPP +# define BOOST_PREPROCESSOR_COMPARISON_EQUAL_HPP +# +# include +# include +# include +# +# /* BOOST_PP_EQUAL */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_EQUAL(x, y) BOOST_PP_COMPL(BOOST_PP_NOT_EQUAL(x, y)) +# else +# define BOOST_PP_EQUAL(x, y) BOOST_PP_EQUAL_I(x, y) +# define BOOST_PP_EQUAL_I(x, y) BOOST_PP_COMPL(BOOST_PP_NOT_EQUAL(x, y)) +# endif +# +# /* BOOST_PP_EQUAL_D */ +# +# define BOOST_PP_EQUAL_D(d, x, y) BOOST_PP_EQUAL(x, y) +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/comparison/less_equal.hpp b/ThirdParty/boost-Subset/boost/preprocessor/comparison/less_equal.hpp new file mode 100644 index 0000000000..1302d5470a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/comparison/less_equal.hpp @@ -0,0 +1,39 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_COMPARISON_LESS_EQUAL_HPP +# define BOOST_PREPROCESSOR_COMPARISON_LESS_EQUAL_HPP +# +# include +# include +# include +# +# /* BOOST_PP_LESS_EQUAL */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_LESS_EQUAL(x, y) BOOST_PP_NOT(BOOST_PP_SUB(x, y)) +# else +# define BOOST_PP_LESS_EQUAL(x, y) BOOST_PP_LESS_EQUAL_I(x, y) +# define BOOST_PP_LESS_EQUAL_I(x, y) BOOST_PP_NOT(BOOST_PP_SUB(x, y)) +# endif +# +# /* BOOST_PP_LESS_EQUAL_D */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_LESS_EQUAL_D(d, x, y) BOOST_PP_NOT(BOOST_PP_SUB_D(d, x, y)) +# else +# define BOOST_PP_LESS_EQUAL_D(d, x, y) BOOST_PP_LESS_EQUAL_D_I(d, x, y) +# define BOOST_PP_LESS_EQUAL_D_I(d, x, y) BOOST_PP_NOT(BOOST_PP_SUB_D(d, x, y)) +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/comparison/not_equal.hpp b/ThirdParty/boost-Subset/boost/preprocessor/comparison/not_equal.hpp new file mode 100644 index 0000000000..b4b0eae129 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/comparison/not_equal.hpp @@ -0,0 +1,814 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_COMPARISON_NOT_EQUAL_HPP +# define BOOST_PREPROCESSOR_COMPARISON_NOT_EQUAL_HPP +# +# include +# include +# include +# +# /* BOOST_PP_NOT_EQUAL */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_NOT_EQUAL(x, y) BOOST_PP_NOT_EQUAL_I(x, y) +# else +# define BOOST_PP_NOT_EQUAL(x, y) BOOST_PP_NOT_EQUAL_OO((x, y)) +# define BOOST_PP_NOT_EQUAL_OO(par) BOOST_PP_NOT_EQUAL_I ## par +# endif +# +# define BOOST_PP_NOT_EQUAL_I(x, y) BOOST_PP_CAT(BOOST_PP_NOT_EQUAL_CHECK_, BOOST_PP_NOT_EQUAL_ ## x(0, BOOST_PP_NOT_EQUAL_ ## y)) +# +# /* BOOST_PP_NOT_EQUAL_D */ +# +# define BOOST_PP_NOT_EQUAL_D(d, x, y) BOOST_PP_NOT_EQUAL(x, y) +# +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NIL 1 +# +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_0(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_1(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_2(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_3(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_4(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_5(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_6(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_7(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_8(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_9(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_10(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_11(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_12(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_13(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_14(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_15(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_16(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_17(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_18(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_19(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_20(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_21(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_22(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_23(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_24(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_25(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_26(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_27(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_28(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_29(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_30(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_31(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_32(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_33(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_34(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_35(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_36(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_37(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_38(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_39(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_40(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_41(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_42(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_43(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_44(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_45(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_46(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_47(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_48(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_49(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_50(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_51(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_52(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_53(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_54(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_55(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_56(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_57(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_58(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_59(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_60(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_61(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_62(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_63(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_64(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_65(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_66(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_67(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_68(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_69(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_70(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_71(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_72(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_73(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_74(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_75(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_76(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_77(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_78(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_79(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_80(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_81(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_82(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_83(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_84(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_85(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_86(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_87(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_88(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_89(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_90(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_91(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_92(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_93(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_94(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_95(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_96(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_97(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_98(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_99(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_100(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_101(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_102(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_103(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_104(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_105(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_106(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_107(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_108(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_109(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_110(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_111(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_112(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_113(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_114(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_115(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_116(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_117(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_118(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_119(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_120(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_121(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_122(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_123(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_124(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_125(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_126(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_127(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_128(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_129(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_130(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_131(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_132(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_133(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_134(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_135(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_136(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_137(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_138(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_139(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_140(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_141(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_142(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_143(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_144(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_145(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_146(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_147(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_148(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_149(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_150(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_151(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_152(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_153(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_154(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_155(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_156(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_157(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_158(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_159(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_160(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_161(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_162(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_163(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_164(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_165(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_166(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_167(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_168(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_169(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_170(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_171(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_172(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_173(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_174(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_175(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_176(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_177(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_178(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_179(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_180(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_181(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_182(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_183(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_184(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_185(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_186(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_187(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_188(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_189(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_190(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_191(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_192(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_193(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_194(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_195(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_196(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_197(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_198(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_199(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_200(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_201(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_202(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_203(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_204(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_205(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_206(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_207(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_208(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_209(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_210(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_211(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_212(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_213(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_214(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_215(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_216(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_217(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_218(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_219(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_220(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_221(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_222(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_223(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_224(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_225(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_226(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_227(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_228(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_229(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_230(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_231(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_232(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_233(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_234(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_235(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_236(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_237(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_238(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_239(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_240(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_241(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_242(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_243(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_244(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_245(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_246(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_247(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_248(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_249(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_250(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_251(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_252(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_253(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_254(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_255(c, y) 0 +# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_256(c, y) 0 +# +#if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() +# define BOOST_PP_NOT_EQUAL_0(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_1(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_2(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_3(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_4(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_5(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_6(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_7(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_8(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_9(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_10(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_11(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_12(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_13(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_14(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_15(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_16(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_17(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_18(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_19(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_20(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_21(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_22(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_23(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_24(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_25(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_26(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_27(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_28(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_29(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_30(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_31(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_32(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_33(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_34(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_35(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_36(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_37(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_38(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_39(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_40(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_41(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_42(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_43(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_44(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_45(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_46(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_47(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_48(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_49(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_50(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_51(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_52(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_53(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_54(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_55(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_56(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_57(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_58(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_59(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_60(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_61(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_62(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_63(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_64(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_65(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_66(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_67(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_68(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_69(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_70(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_71(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_72(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_73(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_74(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_75(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_76(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_77(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_78(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_79(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_80(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_81(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_82(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_83(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_84(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_85(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_86(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_87(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_88(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_89(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_90(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_91(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_92(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_93(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_94(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_95(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_96(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_97(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_98(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_99(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_100(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_101(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_102(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_103(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_104(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_105(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_106(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_107(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_108(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_109(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_110(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_111(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_112(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_113(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_114(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_115(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_116(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_117(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_118(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_119(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_120(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_121(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_122(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_123(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_124(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_125(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_126(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_127(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_128(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_129(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_130(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_131(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_132(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_133(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_134(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_135(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_136(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_137(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_138(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_139(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_140(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_141(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_142(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_143(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_144(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_145(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_146(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_147(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_148(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_149(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_150(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_151(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_152(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_153(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_154(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_155(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_156(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_157(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_158(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_159(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_160(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_161(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_162(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_163(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_164(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_165(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_166(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_167(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_168(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_169(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_170(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_171(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_172(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_173(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_174(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_175(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_176(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_177(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_178(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_179(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_180(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_181(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_182(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_183(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_184(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_185(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_186(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_187(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_188(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_189(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_190(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_191(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_192(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_193(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_194(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_195(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_196(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_197(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_198(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_199(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_200(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_201(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_202(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_203(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_204(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_205(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_206(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_207(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_208(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_209(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_210(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_211(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_212(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_213(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_214(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_215(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_216(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_217(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_218(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_219(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_220(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_221(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_222(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_223(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_224(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_225(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_226(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_227(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_228(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_229(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_230(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_231(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_232(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_233(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_234(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_235(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_236(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_237(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_238(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_239(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_240(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_241(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_242(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_243(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_244(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_245(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_246(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_247(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_248(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_249(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_250(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_251(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_252(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_253(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_254(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_255(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_256(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) +# else +# define BOOST_PP_NOT_EQUAL_0(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_1(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_2(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_3(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_4(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_5(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_6(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_7(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_8(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_9(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_10(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_11(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_12(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_13(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_14(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_15(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_16(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_17(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_18(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_19(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_20(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_21(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_22(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_23(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_24(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_25(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_26(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_27(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_28(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_29(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_30(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_31(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_32(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_33(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_34(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_35(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_36(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_37(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_38(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_39(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_40(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_41(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_42(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_43(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_44(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_45(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_46(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_47(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_48(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_49(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_50(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_51(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_52(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_53(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_54(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_55(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_56(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_57(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_58(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_59(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_60(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_61(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_62(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_63(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_64(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_65(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_66(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_67(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_68(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_69(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_70(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_71(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_72(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_73(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_74(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_75(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_76(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_77(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_78(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_79(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_80(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_81(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_82(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_83(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_84(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_85(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_86(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_87(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_88(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_89(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_90(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_91(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_92(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_93(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_94(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_95(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_96(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_97(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_98(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_99(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_100(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_101(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_102(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_103(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_104(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_105(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_106(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_107(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_108(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_109(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_110(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_111(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_112(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_113(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_114(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_115(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_116(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_117(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_118(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_119(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_120(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_121(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_122(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_123(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_124(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_125(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_126(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_127(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_128(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_129(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_130(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_131(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_132(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_133(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_134(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_135(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_136(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_137(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_138(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_139(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_140(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_141(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_142(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_143(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_144(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_145(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_146(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_147(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_148(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_149(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_150(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_151(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_152(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_153(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_154(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_155(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_156(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_157(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_158(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_159(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_160(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_161(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_162(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_163(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_164(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_165(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_166(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_167(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_168(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_169(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_170(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_171(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_172(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_173(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_174(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_175(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_176(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_177(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_178(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_179(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_180(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_181(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_182(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_183(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_184(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_185(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_186(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_187(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_188(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_189(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_190(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_191(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_192(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_193(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_194(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_195(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_196(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_197(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_198(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_199(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_200(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_201(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_202(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_203(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_204(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_205(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_206(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_207(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_208(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_209(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_210(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_211(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_212(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_213(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_214(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_215(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_216(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_217(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_218(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_219(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_220(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_221(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_222(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_223(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_224(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_225(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_226(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_227(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_228(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_229(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_230(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_231(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_232(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_233(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_234(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_235(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_236(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_237(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_238(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_239(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_240(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_241(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_242(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_243(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_244(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_245(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_246(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_247(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_248(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_249(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_250(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_251(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_252(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_253(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_254(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_255(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# define BOOST_PP_NOT_EQUAL_256(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/config/config.hpp b/ThirdParty/boost-Subset/boost/preprocessor/config/config.hpp new file mode 100644 index 0000000000..835b283b7e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/config/config.hpp @@ -0,0 +1,104 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002-2011. * +# * (C) Copyright Edward Diener 2011. * +# * Distributed under the Boost Software License, Version 1.0. (See * +# * accompanying file LICENSE_1_0.txt or copy at * +# * http://www.boost.org/LICENSE_1_0.txt) * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_CONFIG_CONFIG_HPP +# define BOOST_PREPROCESSOR_CONFIG_CONFIG_HPP +# +# /* BOOST_PP_CONFIG_FLAGS */ +# +# define BOOST_PP_CONFIG_STRICT() 0x0001 +# define BOOST_PP_CONFIG_IDEAL() 0x0002 +# +# define BOOST_PP_CONFIG_MSVC() 0x0004 +# define BOOST_PP_CONFIG_MWCC() 0x0008 +# define BOOST_PP_CONFIG_BCC() 0x0010 +# define BOOST_PP_CONFIG_EDG() 0x0020 +# define BOOST_PP_CONFIG_DMC() 0x0040 +# +# ifndef BOOST_PP_CONFIG_FLAGS +# if defined(__GCCXML__) +# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) +# elif defined(__WAVE__) +# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) +# elif defined(__MWERKS__) && __MWERKS__ >= 0x3200 +# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) +# elif defined(__EDG__) || defined(__EDG_VERSION__) +# if defined(_MSC_VER) && (defined(__INTELLISENSE__) || __EDG_VERSION__ >= 308) +# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MSVC()) +# else +# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_EDG() | BOOST_PP_CONFIG_STRICT()) +# endif +# elif defined(__MWERKS__) +# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MWCC()) +# elif defined(__DMC__) +# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_DMC()) +# elif defined(__BORLANDC__) && __BORLANDC__ >= 0x581 +# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) +# elif defined(__BORLANDC__) || defined(__IBMC__) || defined(__IBMCPP__) || defined(__SUNPRO_CC) +# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_BCC()) +# elif defined(_MSC_VER) && !defined(__clang__) +# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MSVC()) +# else +# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) +# endif +# endif +# +# /* BOOST_PP_CONFIG_EXTENDED_LINE_INFO */ +# +# ifndef BOOST_PP_CONFIG_EXTENDED_LINE_INFO +# define BOOST_PP_CONFIG_EXTENDED_LINE_INFO 0 +# endif +# +# /* BOOST_PP_CONFIG_ERRORS */ +# +# ifndef BOOST_PP_CONFIG_ERRORS +# ifdef NDEBUG +# define BOOST_PP_CONFIG_ERRORS 0 +# else +# define BOOST_PP_CONFIG_ERRORS 1 +# endif +# endif +# +# /* BOOST_PP_VARIADICS */ +# +# define BOOST_PP_VARIADICS_MSVC 0 +# if !defined BOOST_PP_VARIADICS +# /* variadic support explicitly disabled for all untested compilers */ +# if defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || ( defined __SUNPRO_CC && __SUNPRO_CC < 0x5130 ) || defined __HP_aCC && !defined __EDG__ || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI +# define BOOST_PP_VARIADICS 0 +# /* VC++ (C/C++) */ +# elif defined _MSC_VER && _MSC_VER >= 1400 && (!defined __EDG__ || defined(__INTELLISENSE__)) && !defined __clang__ +# define BOOST_PP_VARIADICS 1 +# undef BOOST_PP_VARIADICS_MSVC +# define BOOST_PP_VARIADICS_MSVC 1 +# /* Wave (C/C++), GCC (C++) */ +# elif defined __WAVE__ && __WAVE_HAS_VARIADICS__ || defined __GNUC__ && defined __GXX_EXPERIMENTAL_CXX0X__ && __GXX_EXPERIMENTAL_CXX0X__ +# define BOOST_PP_VARIADICS 1 +# /* EDG-based (C/C++), GCC (C), and unknown (C/C++) */ +# elif !defined __cplusplus && __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L +# define BOOST_PP_VARIADICS 1 +# else +# define BOOST_PP_VARIADICS 0 +# endif +# elif !BOOST_PP_VARIADICS + 1 < 2 +# undef BOOST_PP_VARIADICS +# define BOOST_PP_VARIADICS 1 +# if defined _MSC_VER && _MSC_VER >= 1400 && (defined(__INTELLISENSE__) || !(defined __EDG__ || defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __clang__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI)) +# undef BOOST_PP_VARIADICS_MSVC +# define BOOST_PP_VARIADICS_MSVC 1 +# endif +# else +# undef BOOST_PP_VARIADICS +# define BOOST_PP_VARIADICS 0 +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/control/deduce_d.hpp b/ThirdParty/boost-Subset/boost/preprocessor/control/deduce_d.hpp new file mode 100644 index 0000000000..a0276b0f19 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/control/deduce_d.hpp @@ -0,0 +1,22 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_CONTROL_DEDUCE_D_HPP +# define BOOST_PREPROCESSOR_CONTROL_DEDUCE_D_HPP +# +# include +# include +# +# /* BOOST_PP_DEDUCE_D */ +# +# define BOOST_PP_DEDUCE_D() BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256) +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/control/detail/dmc/while.hpp b/ThirdParty/boost-Subset/boost/preprocessor/control/detail/dmc/while.hpp new file mode 100644 index 0000000000..95c3135b32 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/control/detail/dmc/while.hpp @@ -0,0 +1,536 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_CONTROL_DETAIL_WHILE_HPP +# define BOOST_PREPROCESSOR_CONTROL_DETAIL_WHILE_HPP +# +# include +# include +# include +# +# define BOOST_PP_WHILE_1(p, o, s) BOOST_PP_WHILE_1_C(BOOST_PP_BOOL(p##(2, s)), p, o, s) +# define BOOST_PP_WHILE_2(p, o, s) BOOST_PP_WHILE_2_C(BOOST_PP_BOOL(p##(3, s)), p, o, s) +# define BOOST_PP_WHILE_3(p, o, s) BOOST_PP_WHILE_3_C(BOOST_PP_BOOL(p##(4, s)), p, o, s) +# define BOOST_PP_WHILE_4(p, o, s) BOOST_PP_WHILE_4_C(BOOST_PP_BOOL(p##(5, s)), p, o, s) +# define BOOST_PP_WHILE_5(p, o, s) BOOST_PP_WHILE_5_C(BOOST_PP_BOOL(p##(6, s)), p, o, s) +# define BOOST_PP_WHILE_6(p, o, s) BOOST_PP_WHILE_6_C(BOOST_PP_BOOL(p##(7, s)), p, o, s) +# define BOOST_PP_WHILE_7(p, o, s) BOOST_PP_WHILE_7_C(BOOST_PP_BOOL(p##(8, s)), p, o, s) +# define BOOST_PP_WHILE_8(p, o, s) BOOST_PP_WHILE_8_C(BOOST_PP_BOOL(p##(9, s)), p, o, s) +# define BOOST_PP_WHILE_9(p, o, s) BOOST_PP_WHILE_9_C(BOOST_PP_BOOL(p##(10, s)), p, o, s) +# define BOOST_PP_WHILE_10(p, o, s) BOOST_PP_WHILE_10_C(BOOST_PP_BOOL(p##(11, s)), p, o, s) +# define BOOST_PP_WHILE_11(p, o, s) BOOST_PP_WHILE_11_C(BOOST_PP_BOOL(p##(12, s)), p, o, s) +# define BOOST_PP_WHILE_12(p, o, s) BOOST_PP_WHILE_12_C(BOOST_PP_BOOL(p##(13, s)), p, o, s) +# define BOOST_PP_WHILE_13(p, o, s) BOOST_PP_WHILE_13_C(BOOST_PP_BOOL(p##(14, s)), p, o, s) +# define BOOST_PP_WHILE_14(p, o, s) BOOST_PP_WHILE_14_C(BOOST_PP_BOOL(p##(15, s)), p, o, s) +# define BOOST_PP_WHILE_15(p, o, s) BOOST_PP_WHILE_15_C(BOOST_PP_BOOL(p##(16, s)), p, o, s) +# define BOOST_PP_WHILE_16(p, o, s) BOOST_PP_WHILE_16_C(BOOST_PP_BOOL(p##(17, s)), p, o, s) +# define BOOST_PP_WHILE_17(p, o, s) BOOST_PP_WHILE_17_C(BOOST_PP_BOOL(p##(18, s)), p, o, s) +# define BOOST_PP_WHILE_18(p, o, s) BOOST_PP_WHILE_18_C(BOOST_PP_BOOL(p##(19, s)), p, o, s) +# define BOOST_PP_WHILE_19(p, o, s) BOOST_PP_WHILE_19_C(BOOST_PP_BOOL(p##(20, s)), p, o, s) +# define BOOST_PP_WHILE_20(p, o, s) BOOST_PP_WHILE_20_C(BOOST_PP_BOOL(p##(21, s)), p, o, s) +# define BOOST_PP_WHILE_21(p, o, s) BOOST_PP_WHILE_21_C(BOOST_PP_BOOL(p##(22, s)), p, o, s) +# define BOOST_PP_WHILE_22(p, o, s) BOOST_PP_WHILE_22_C(BOOST_PP_BOOL(p##(23, s)), p, o, s) +# define BOOST_PP_WHILE_23(p, o, s) BOOST_PP_WHILE_23_C(BOOST_PP_BOOL(p##(24, s)), p, o, s) +# define BOOST_PP_WHILE_24(p, o, s) BOOST_PP_WHILE_24_C(BOOST_PP_BOOL(p##(25, s)), p, o, s) +# define BOOST_PP_WHILE_25(p, o, s) BOOST_PP_WHILE_25_C(BOOST_PP_BOOL(p##(26, s)), p, o, s) +# define BOOST_PP_WHILE_26(p, o, s) BOOST_PP_WHILE_26_C(BOOST_PP_BOOL(p##(27, s)), p, o, s) +# define BOOST_PP_WHILE_27(p, o, s) BOOST_PP_WHILE_27_C(BOOST_PP_BOOL(p##(28, s)), p, o, s) +# define BOOST_PP_WHILE_28(p, o, s) BOOST_PP_WHILE_28_C(BOOST_PP_BOOL(p##(29, s)), p, o, s) +# define BOOST_PP_WHILE_29(p, o, s) BOOST_PP_WHILE_29_C(BOOST_PP_BOOL(p##(30, s)), p, o, s) +# define BOOST_PP_WHILE_30(p, o, s) BOOST_PP_WHILE_30_C(BOOST_PP_BOOL(p##(31, s)), p, o, s) +# define BOOST_PP_WHILE_31(p, o, s) BOOST_PP_WHILE_31_C(BOOST_PP_BOOL(p##(32, s)), p, o, s) +# define BOOST_PP_WHILE_32(p, o, s) BOOST_PP_WHILE_32_C(BOOST_PP_BOOL(p##(33, s)), p, o, s) +# define BOOST_PP_WHILE_33(p, o, s) BOOST_PP_WHILE_33_C(BOOST_PP_BOOL(p##(34, s)), p, o, s) +# define BOOST_PP_WHILE_34(p, o, s) BOOST_PP_WHILE_34_C(BOOST_PP_BOOL(p##(35, s)), p, o, s) +# define BOOST_PP_WHILE_35(p, o, s) BOOST_PP_WHILE_35_C(BOOST_PP_BOOL(p##(36, s)), p, o, s) +# define BOOST_PP_WHILE_36(p, o, s) BOOST_PP_WHILE_36_C(BOOST_PP_BOOL(p##(37, s)), p, o, s) +# define BOOST_PP_WHILE_37(p, o, s) BOOST_PP_WHILE_37_C(BOOST_PP_BOOL(p##(38, s)), p, o, s) +# define BOOST_PP_WHILE_38(p, o, s) BOOST_PP_WHILE_38_C(BOOST_PP_BOOL(p##(39, s)), p, o, s) +# define BOOST_PP_WHILE_39(p, o, s) BOOST_PP_WHILE_39_C(BOOST_PP_BOOL(p##(40, s)), p, o, s) +# define BOOST_PP_WHILE_40(p, o, s) BOOST_PP_WHILE_40_C(BOOST_PP_BOOL(p##(41, s)), p, o, s) +# define BOOST_PP_WHILE_41(p, o, s) BOOST_PP_WHILE_41_C(BOOST_PP_BOOL(p##(42, s)), p, o, s) +# define BOOST_PP_WHILE_42(p, o, s) BOOST_PP_WHILE_42_C(BOOST_PP_BOOL(p##(43, s)), p, o, s) +# define BOOST_PP_WHILE_43(p, o, s) BOOST_PP_WHILE_43_C(BOOST_PP_BOOL(p##(44, s)), p, o, s) +# define BOOST_PP_WHILE_44(p, o, s) BOOST_PP_WHILE_44_C(BOOST_PP_BOOL(p##(45, s)), p, o, s) +# define BOOST_PP_WHILE_45(p, o, s) BOOST_PP_WHILE_45_C(BOOST_PP_BOOL(p##(46, s)), p, o, s) +# define BOOST_PP_WHILE_46(p, o, s) BOOST_PP_WHILE_46_C(BOOST_PP_BOOL(p##(47, s)), p, o, s) +# define BOOST_PP_WHILE_47(p, o, s) BOOST_PP_WHILE_47_C(BOOST_PP_BOOL(p##(48, s)), p, o, s) +# define BOOST_PP_WHILE_48(p, o, s) BOOST_PP_WHILE_48_C(BOOST_PP_BOOL(p##(49, s)), p, o, s) +# define BOOST_PP_WHILE_49(p, o, s) BOOST_PP_WHILE_49_C(BOOST_PP_BOOL(p##(50, s)), p, o, s) +# define BOOST_PP_WHILE_50(p, o, s) BOOST_PP_WHILE_50_C(BOOST_PP_BOOL(p##(51, s)), p, o, s) +# define BOOST_PP_WHILE_51(p, o, s) BOOST_PP_WHILE_51_C(BOOST_PP_BOOL(p##(52, s)), p, o, s) +# define BOOST_PP_WHILE_52(p, o, s) BOOST_PP_WHILE_52_C(BOOST_PP_BOOL(p##(53, s)), p, o, s) +# define BOOST_PP_WHILE_53(p, o, s) BOOST_PP_WHILE_53_C(BOOST_PP_BOOL(p##(54, s)), p, o, s) +# define BOOST_PP_WHILE_54(p, o, s) BOOST_PP_WHILE_54_C(BOOST_PP_BOOL(p##(55, s)), p, o, s) +# define BOOST_PP_WHILE_55(p, o, s) BOOST_PP_WHILE_55_C(BOOST_PP_BOOL(p##(56, s)), p, o, s) +# define BOOST_PP_WHILE_56(p, o, s) BOOST_PP_WHILE_56_C(BOOST_PP_BOOL(p##(57, s)), p, o, s) +# define BOOST_PP_WHILE_57(p, o, s) BOOST_PP_WHILE_57_C(BOOST_PP_BOOL(p##(58, s)), p, o, s) +# define BOOST_PP_WHILE_58(p, o, s) BOOST_PP_WHILE_58_C(BOOST_PP_BOOL(p##(59, s)), p, o, s) +# define BOOST_PP_WHILE_59(p, o, s) BOOST_PP_WHILE_59_C(BOOST_PP_BOOL(p##(60, s)), p, o, s) +# define BOOST_PP_WHILE_60(p, o, s) BOOST_PP_WHILE_60_C(BOOST_PP_BOOL(p##(61, s)), p, o, s) +# define BOOST_PP_WHILE_61(p, o, s) BOOST_PP_WHILE_61_C(BOOST_PP_BOOL(p##(62, s)), p, o, s) +# define BOOST_PP_WHILE_62(p, o, s) BOOST_PP_WHILE_62_C(BOOST_PP_BOOL(p##(63, s)), p, o, s) +# define BOOST_PP_WHILE_63(p, o, s) BOOST_PP_WHILE_63_C(BOOST_PP_BOOL(p##(64, s)), p, o, s) +# define BOOST_PP_WHILE_64(p, o, s) BOOST_PP_WHILE_64_C(BOOST_PP_BOOL(p##(65, s)), p, o, s) +# define BOOST_PP_WHILE_65(p, o, s) BOOST_PP_WHILE_65_C(BOOST_PP_BOOL(p##(66, s)), p, o, s) +# define BOOST_PP_WHILE_66(p, o, s) BOOST_PP_WHILE_66_C(BOOST_PP_BOOL(p##(67, s)), p, o, s) +# define BOOST_PP_WHILE_67(p, o, s) BOOST_PP_WHILE_67_C(BOOST_PP_BOOL(p##(68, s)), p, o, s) +# define BOOST_PP_WHILE_68(p, o, s) BOOST_PP_WHILE_68_C(BOOST_PP_BOOL(p##(69, s)), p, o, s) +# define BOOST_PP_WHILE_69(p, o, s) BOOST_PP_WHILE_69_C(BOOST_PP_BOOL(p##(70, s)), p, o, s) +# define BOOST_PP_WHILE_70(p, o, s) BOOST_PP_WHILE_70_C(BOOST_PP_BOOL(p##(71, s)), p, o, s) +# define BOOST_PP_WHILE_71(p, o, s) BOOST_PP_WHILE_71_C(BOOST_PP_BOOL(p##(72, s)), p, o, s) +# define BOOST_PP_WHILE_72(p, o, s) BOOST_PP_WHILE_72_C(BOOST_PP_BOOL(p##(73, s)), p, o, s) +# define BOOST_PP_WHILE_73(p, o, s) BOOST_PP_WHILE_73_C(BOOST_PP_BOOL(p##(74, s)), p, o, s) +# define BOOST_PP_WHILE_74(p, o, s) BOOST_PP_WHILE_74_C(BOOST_PP_BOOL(p##(75, s)), p, o, s) +# define BOOST_PP_WHILE_75(p, o, s) BOOST_PP_WHILE_75_C(BOOST_PP_BOOL(p##(76, s)), p, o, s) +# define BOOST_PP_WHILE_76(p, o, s) BOOST_PP_WHILE_76_C(BOOST_PP_BOOL(p##(77, s)), p, o, s) +# define BOOST_PP_WHILE_77(p, o, s) BOOST_PP_WHILE_77_C(BOOST_PP_BOOL(p##(78, s)), p, o, s) +# define BOOST_PP_WHILE_78(p, o, s) BOOST_PP_WHILE_78_C(BOOST_PP_BOOL(p##(79, s)), p, o, s) +# define BOOST_PP_WHILE_79(p, o, s) BOOST_PP_WHILE_79_C(BOOST_PP_BOOL(p##(80, s)), p, o, s) +# define BOOST_PP_WHILE_80(p, o, s) BOOST_PP_WHILE_80_C(BOOST_PP_BOOL(p##(81, s)), p, o, s) +# define BOOST_PP_WHILE_81(p, o, s) BOOST_PP_WHILE_81_C(BOOST_PP_BOOL(p##(82, s)), p, o, s) +# define BOOST_PP_WHILE_82(p, o, s) BOOST_PP_WHILE_82_C(BOOST_PP_BOOL(p##(83, s)), p, o, s) +# define BOOST_PP_WHILE_83(p, o, s) BOOST_PP_WHILE_83_C(BOOST_PP_BOOL(p##(84, s)), p, o, s) +# define BOOST_PP_WHILE_84(p, o, s) BOOST_PP_WHILE_84_C(BOOST_PP_BOOL(p##(85, s)), p, o, s) +# define BOOST_PP_WHILE_85(p, o, s) BOOST_PP_WHILE_85_C(BOOST_PP_BOOL(p##(86, s)), p, o, s) +# define BOOST_PP_WHILE_86(p, o, s) BOOST_PP_WHILE_86_C(BOOST_PP_BOOL(p##(87, s)), p, o, s) +# define BOOST_PP_WHILE_87(p, o, s) BOOST_PP_WHILE_87_C(BOOST_PP_BOOL(p##(88, s)), p, o, s) +# define BOOST_PP_WHILE_88(p, o, s) BOOST_PP_WHILE_88_C(BOOST_PP_BOOL(p##(89, s)), p, o, s) +# define BOOST_PP_WHILE_89(p, o, s) BOOST_PP_WHILE_89_C(BOOST_PP_BOOL(p##(90, s)), p, o, s) +# define BOOST_PP_WHILE_90(p, o, s) BOOST_PP_WHILE_90_C(BOOST_PP_BOOL(p##(91, s)), p, o, s) +# define BOOST_PP_WHILE_91(p, o, s) BOOST_PP_WHILE_91_C(BOOST_PP_BOOL(p##(92, s)), p, o, s) +# define BOOST_PP_WHILE_92(p, o, s) BOOST_PP_WHILE_92_C(BOOST_PP_BOOL(p##(93, s)), p, o, s) +# define BOOST_PP_WHILE_93(p, o, s) BOOST_PP_WHILE_93_C(BOOST_PP_BOOL(p##(94, s)), p, o, s) +# define BOOST_PP_WHILE_94(p, o, s) BOOST_PP_WHILE_94_C(BOOST_PP_BOOL(p##(95, s)), p, o, s) +# define BOOST_PP_WHILE_95(p, o, s) BOOST_PP_WHILE_95_C(BOOST_PP_BOOL(p##(96, s)), p, o, s) +# define BOOST_PP_WHILE_96(p, o, s) BOOST_PP_WHILE_96_C(BOOST_PP_BOOL(p##(97, s)), p, o, s) +# define BOOST_PP_WHILE_97(p, o, s) BOOST_PP_WHILE_97_C(BOOST_PP_BOOL(p##(98, s)), p, o, s) +# define BOOST_PP_WHILE_98(p, o, s) BOOST_PP_WHILE_98_C(BOOST_PP_BOOL(p##(99, s)), p, o, s) +# define BOOST_PP_WHILE_99(p, o, s) BOOST_PP_WHILE_99_C(BOOST_PP_BOOL(p##(100, s)), p, o, s) +# define BOOST_PP_WHILE_100(p, o, s) BOOST_PP_WHILE_100_C(BOOST_PP_BOOL(p##(101, s)), p, o, s) +# define BOOST_PP_WHILE_101(p, o, s) BOOST_PP_WHILE_101_C(BOOST_PP_BOOL(p##(102, s)), p, o, s) +# define BOOST_PP_WHILE_102(p, o, s) BOOST_PP_WHILE_102_C(BOOST_PP_BOOL(p##(103, s)), p, o, s) +# define BOOST_PP_WHILE_103(p, o, s) BOOST_PP_WHILE_103_C(BOOST_PP_BOOL(p##(104, s)), p, o, s) +# define BOOST_PP_WHILE_104(p, o, s) BOOST_PP_WHILE_104_C(BOOST_PP_BOOL(p##(105, s)), p, o, s) +# define BOOST_PP_WHILE_105(p, o, s) BOOST_PP_WHILE_105_C(BOOST_PP_BOOL(p##(106, s)), p, o, s) +# define BOOST_PP_WHILE_106(p, o, s) BOOST_PP_WHILE_106_C(BOOST_PP_BOOL(p##(107, s)), p, o, s) +# define BOOST_PP_WHILE_107(p, o, s) BOOST_PP_WHILE_107_C(BOOST_PP_BOOL(p##(108, s)), p, o, s) +# define BOOST_PP_WHILE_108(p, o, s) BOOST_PP_WHILE_108_C(BOOST_PP_BOOL(p##(109, s)), p, o, s) +# define BOOST_PP_WHILE_109(p, o, s) BOOST_PP_WHILE_109_C(BOOST_PP_BOOL(p##(110, s)), p, o, s) +# define BOOST_PP_WHILE_110(p, o, s) BOOST_PP_WHILE_110_C(BOOST_PP_BOOL(p##(111, s)), p, o, s) +# define BOOST_PP_WHILE_111(p, o, s) BOOST_PP_WHILE_111_C(BOOST_PP_BOOL(p##(112, s)), p, o, s) +# define BOOST_PP_WHILE_112(p, o, s) BOOST_PP_WHILE_112_C(BOOST_PP_BOOL(p##(113, s)), p, o, s) +# define BOOST_PP_WHILE_113(p, o, s) BOOST_PP_WHILE_113_C(BOOST_PP_BOOL(p##(114, s)), p, o, s) +# define BOOST_PP_WHILE_114(p, o, s) BOOST_PP_WHILE_114_C(BOOST_PP_BOOL(p##(115, s)), p, o, s) +# define BOOST_PP_WHILE_115(p, o, s) BOOST_PP_WHILE_115_C(BOOST_PP_BOOL(p##(116, s)), p, o, s) +# define BOOST_PP_WHILE_116(p, o, s) BOOST_PP_WHILE_116_C(BOOST_PP_BOOL(p##(117, s)), p, o, s) +# define BOOST_PP_WHILE_117(p, o, s) BOOST_PP_WHILE_117_C(BOOST_PP_BOOL(p##(118, s)), p, o, s) +# define BOOST_PP_WHILE_118(p, o, s) BOOST_PP_WHILE_118_C(BOOST_PP_BOOL(p##(119, s)), p, o, s) +# define BOOST_PP_WHILE_119(p, o, s) BOOST_PP_WHILE_119_C(BOOST_PP_BOOL(p##(120, s)), p, o, s) +# define BOOST_PP_WHILE_120(p, o, s) BOOST_PP_WHILE_120_C(BOOST_PP_BOOL(p##(121, s)), p, o, s) +# define BOOST_PP_WHILE_121(p, o, s) BOOST_PP_WHILE_121_C(BOOST_PP_BOOL(p##(122, s)), p, o, s) +# define BOOST_PP_WHILE_122(p, o, s) BOOST_PP_WHILE_122_C(BOOST_PP_BOOL(p##(123, s)), p, o, s) +# define BOOST_PP_WHILE_123(p, o, s) BOOST_PP_WHILE_123_C(BOOST_PP_BOOL(p##(124, s)), p, o, s) +# define BOOST_PP_WHILE_124(p, o, s) BOOST_PP_WHILE_124_C(BOOST_PP_BOOL(p##(125, s)), p, o, s) +# define BOOST_PP_WHILE_125(p, o, s) BOOST_PP_WHILE_125_C(BOOST_PP_BOOL(p##(126, s)), p, o, s) +# define BOOST_PP_WHILE_126(p, o, s) BOOST_PP_WHILE_126_C(BOOST_PP_BOOL(p##(127, s)), p, o, s) +# define BOOST_PP_WHILE_127(p, o, s) BOOST_PP_WHILE_127_C(BOOST_PP_BOOL(p##(128, s)), p, o, s) +# define BOOST_PP_WHILE_128(p, o, s) BOOST_PP_WHILE_128_C(BOOST_PP_BOOL(p##(129, s)), p, o, s) +# define BOOST_PP_WHILE_129(p, o, s) BOOST_PP_WHILE_129_C(BOOST_PP_BOOL(p##(130, s)), p, o, s) +# define BOOST_PP_WHILE_130(p, o, s) BOOST_PP_WHILE_130_C(BOOST_PP_BOOL(p##(131, s)), p, o, s) +# define BOOST_PP_WHILE_131(p, o, s) BOOST_PP_WHILE_131_C(BOOST_PP_BOOL(p##(132, s)), p, o, s) +# define BOOST_PP_WHILE_132(p, o, s) BOOST_PP_WHILE_132_C(BOOST_PP_BOOL(p##(133, s)), p, o, s) +# define BOOST_PP_WHILE_133(p, o, s) BOOST_PP_WHILE_133_C(BOOST_PP_BOOL(p##(134, s)), p, o, s) +# define BOOST_PP_WHILE_134(p, o, s) BOOST_PP_WHILE_134_C(BOOST_PP_BOOL(p##(135, s)), p, o, s) +# define BOOST_PP_WHILE_135(p, o, s) BOOST_PP_WHILE_135_C(BOOST_PP_BOOL(p##(136, s)), p, o, s) +# define BOOST_PP_WHILE_136(p, o, s) BOOST_PP_WHILE_136_C(BOOST_PP_BOOL(p##(137, s)), p, o, s) +# define BOOST_PP_WHILE_137(p, o, s) BOOST_PP_WHILE_137_C(BOOST_PP_BOOL(p##(138, s)), p, o, s) +# define BOOST_PP_WHILE_138(p, o, s) BOOST_PP_WHILE_138_C(BOOST_PP_BOOL(p##(139, s)), p, o, s) +# define BOOST_PP_WHILE_139(p, o, s) BOOST_PP_WHILE_139_C(BOOST_PP_BOOL(p##(140, s)), p, o, s) +# define BOOST_PP_WHILE_140(p, o, s) BOOST_PP_WHILE_140_C(BOOST_PP_BOOL(p##(141, s)), p, o, s) +# define BOOST_PP_WHILE_141(p, o, s) BOOST_PP_WHILE_141_C(BOOST_PP_BOOL(p##(142, s)), p, o, s) +# define BOOST_PP_WHILE_142(p, o, s) BOOST_PP_WHILE_142_C(BOOST_PP_BOOL(p##(143, s)), p, o, s) +# define BOOST_PP_WHILE_143(p, o, s) BOOST_PP_WHILE_143_C(BOOST_PP_BOOL(p##(144, s)), p, o, s) +# define BOOST_PP_WHILE_144(p, o, s) BOOST_PP_WHILE_144_C(BOOST_PP_BOOL(p##(145, s)), p, o, s) +# define BOOST_PP_WHILE_145(p, o, s) BOOST_PP_WHILE_145_C(BOOST_PP_BOOL(p##(146, s)), p, o, s) +# define BOOST_PP_WHILE_146(p, o, s) BOOST_PP_WHILE_146_C(BOOST_PP_BOOL(p##(147, s)), p, o, s) +# define BOOST_PP_WHILE_147(p, o, s) BOOST_PP_WHILE_147_C(BOOST_PP_BOOL(p##(148, s)), p, o, s) +# define BOOST_PP_WHILE_148(p, o, s) BOOST_PP_WHILE_148_C(BOOST_PP_BOOL(p##(149, s)), p, o, s) +# define BOOST_PP_WHILE_149(p, o, s) BOOST_PP_WHILE_149_C(BOOST_PP_BOOL(p##(150, s)), p, o, s) +# define BOOST_PP_WHILE_150(p, o, s) BOOST_PP_WHILE_150_C(BOOST_PP_BOOL(p##(151, s)), p, o, s) +# define BOOST_PP_WHILE_151(p, o, s) BOOST_PP_WHILE_151_C(BOOST_PP_BOOL(p##(152, s)), p, o, s) +# define BOOST_PP_WHILE_152(p, o, s) BOOST_PP_WHILE_152_C(BOOST_PP_BOOL(p##(153, s)), p, o, s) +# define BOOST_PP_WHILE_153(p, o, s) BOOST_PP_WHILE_153_C(BOOST_PP_BOOL(p##(154, s)), p, o, s) +# define BOOST_PP_WHILE_154(p, o, s) BOOST_PP_WHILE_154_C(BOOST_PP_BOOL(p##(155, s)), p, o, s) +# define BOOST_PP_WHILE_155(p, o, s) BOOST_PP_WHILE_155_C(BOOST_PP_BOOL(p##(156, s)), p, o, s) +# define BOOST_PP_WHILE_156(p, o, s) BOOST_PP_WHILE_156_C(BOOST_PP_BOOL(p##(157, s)), p, o, s) +# define BOOST_PP_WHILE_157(p, o, s) BOOST_PP_WHILE_157_C(BOOST_PP_BOOL(p##(158, s)), p, o, s) +# define BOOST_PP_WHILE_158(p, o, s) BOOST_PP_WHILE_158_C(BOOST_PP_BOOL(p##(159, s)), p, o, s) +# define BOOST_PP_WHILE_159(p, o, s) BOOST_PP_WHILE_159_C(BOOST_PP_BOOL(p##(160, s)), p, o, s) +# define BOOST_PP_WHILE_160(p, o, s) BOOST_PP_WHILE_160_C(BOOST_PP_BOOL(p##(161, s)), p, o, s) +# define BOOST_PP_WHILE_161(p, o, s) BOOST_PP_WHILE_161_C(BOOST_PP_BOOL(p##(162, s)), p, o, s) +# define BOOST_PP_WHILE_162(p, o, s) BOOST_PP_WHILE_162_C(BOOST_PP_BOOL(p##(163, s)), p, o, s) +# define BOOST_PP_WHILE_163(p, o, s) BOOST_PP_WHILE_163_C(BOOST_PP_BOOL(p##(164, s)), p, o, s) +# define BOOST_PP_WHILE_164(p, o, s) BOOST_PP_WHILE_164_C(BOOST_PP_BOOL(p##(165, s)), p, o, s) +# define BOOST_PP_WHILE_165(p, o, s) BOOST_PP_WHILE_165_C(BOOST_PP_BOOL(p##(166, s)), p, o, s) +# define BOOST_PP_WHILE_166(p, o, s) BOOST_PP_WHILE_166_C(BOOST_PP_BOOL(p##(167, s)), p, o, s) +# define BOOST_PP_WHILE_167(p, o, s) BOOST_PP_WHILE_167_C(BOOST_PP_BOOL(p##(168, s)), p, o, s) +# define BOOST_PP_WHILE_168(p, o, s) BOOST_PP_WHILE_168_C(BOOST_PP_BOOL(p##(169, s)), p, o, s) +# define BOOST_PP_WHILE_169(p, o, s) BOOST_PP_WHILE_169_C(BOOST_PP_BOOL(p##(170, s)), p, o, s) +# define BOOST_PP_WHILE_170(p, o, s) BOOST_PP_WHILE_170_C(BOOST_PP_BOOL(p##(171, s)), p, o, s) +# define BOOST_PP_WHILE_171(p, o, s) BOOST_PP_WHILE_171_C(BOOST_PP_BOOL(p##(172, s)), p, o, s) +# define BOOST_PP_WHILE_172(p, o, s) BOOST_PP_WHILE_172_C(BOOST_PP_BOOL(p##(173, s)), p, o, s) +# define BOOST_PP_WHILE_173(p, o, s) BOOST_PP_WHILE_173_C(BOOST_PP_BOOL(p##(174, s)), p, o, s) +# define BOOST_PP_WHILE_174(p, o, s) BOOST_PP_WHILE_174_C(BOOST_PP_BOOL(p##(175, s)), p, o, s) +# define BOOST_PP_WHILE_175(p, o, s) BOOST_PP_WHILE_175_C(BOOST_PP_BOOL(p##(176, s)), p, o, s) +# define BOOST_PP_WHILE_176(p, o, s) BOOST_PP_WHILE_176_C(BOOST_PP_BOOL(p##(177, s)), p, o, s) +# define BOOST_PP_WHILE_177(p, o, s) BOOST_PP_WHILE_177_C(BOOST_PP_BOOL(p##(178, s)), p, o, s) +# define BOOST_PP_WHILE_178(p, o, s) BOOST_PP_WHILE_178_C(BOOST_PP_BOOL(p##(179, s)), p, o, s) +# define BOOST_PP_WHILE_179(p, o, s) BOOST_PP_WHILE_179_C(BOOST_PP_BOOL(p##(180, s)), p, o, s) +# define BOOST_PP_WHILE_180(p, o, s) BOOST_PP_WHILE_180_C(BOOST_PP_BOOL(p##(181, s)), p, o, s) +# define BOOST_PP_WHILE_181(p, o, s) BOOST_PP_WHILE_181_C(BOOST_PP_BOOL(p##(182, s)), p, o, s) +# define BOOST_PP_WHILE_182(p, o, s) BOOST_PP_WHILE_182_C(BOOST_PP_BOOL(p##(183, s)), p, o, s) +# define BOOST_PP_WHILE_183(p, o, s) BOOST_PP_WHILE_183_C(BOOST_PP_BOOL(p##(184, s)), p, o, s) +# define BOOST_PP_WHILE_184(p, o, s) BOOST_PP_WHILE_184_C(BOOST_PP_BOOL(p##(185, s)), p, o, s) +# define BOOST_PP_WHILE_185(p, o, s) BOOST_PP_WHILE_185_C(BOOST_PP_BOOL(p##(186, s)), p, o, s) +# define BOOST_PP_WHILE_186(p, o, s) BOOST_PP_WHILE_186_C(BOOST_PP_BOOL(p##(187, s)), p, o, s) +# define BOOST_PP_WHILE_187(p, o, s) BOOST_PP_WHILE_187_C(BOOST_PP_BOOL(p##(188, s)), p, o, s) +# define BOOST_PP_WHILE_188(p, o, s) BOOST_PP_WHILE_188_C(BOOST_PP_BOOL(p##(189, s)), p, o, s) +# define BOOST_PP_WHILE_189(p, o, s) BOOST_PP_WHILE_189_C(BOOST_PP_BOOL(p##(190, s)), p, o, s) +# define BOOST_PP_WHILE_190(p, o, s) BOOST_PP_WHILE_190_C(BOOST_PP_BOOL(p##(191, s)), p, o, s) +# define BOOST_PP_WHILE_191(p, o, s) BOOST_PP_WHILE_191_C(BOOST_PP_BOOL(p##(192, s)), p, o, s) +# define BOOST_PP_WHILE_192(p, o, s) BOOST_PP_WHILE_192_C(BOOST_PP_BOOL(p##(193, s)), p, o, s) +# define BOOST_PP_WHILE_193(p, o, s) BOOST_PP_WHILE_193_C(BOOST_PP_BOOL(p##(194, s)), p, o, s) +# define BOOST_PP_WHILE_194(p, o, s) BOOST_PP_WHILE_194_C(BOOST_PP_BOOL(p##(195, s)), p, o, s) +# define BOOST_PP_WHILE_195(p, o, s) BOOST_PP_WHILE_195_C(BOOST_PP_BOOL(p##(196, s)), p, o, s) +# define BOOST_PP_WHILE_196(p, o, s) BOOST_PP_WHILE_196_C(BOOST_PP_BOOL(p##(197, s)), p, o, s) +# define BOOST_PP_WHILE_197(p, o, s) BOOST_PP_WHILE_197_C(BOOST_PP_BOOL(p##(198, s)), p, o, s) +# define BOOST_PP_WHILE_198(p, o, s) BOOST_PP_WHILE_198_C(BOOST_PP_BOOL(p##(199, s)), p, o, s) +# define BOOST_PP_WHILE_199(p, o, s) BOOST_PP_WHILE_199_C(BOOST_PP_BOOL(p##(200, s)), p, o, s) +# define BOOST_PP_WHILE_200(p, o, s) BOOST_PP_WHILE_200_C(BOOST_PP_BOOL(p##(201, s)), p, o, s) +# define BOOST_PP_WHILE_201(p, o, s) BOOST_PP_WHILE_201_C(BOOST_PP_BOOL(p##(202, s)), p, o, s) +# define BOOST_PP_WHILE_202(p, o, s) BOOST_PP_WHILE_202_C(BOOST_PP_BOOL(p##(203, s)), p, o, s) +# define BOOST_PP_WHILE_203(p, o, s) BOOST_PP_WHILE_203_C(BOOST_PP_BOOL(p##(204, s)), p, o, s) +# define BOOST_PP_WHILE_204(p, o, s) BOOST_PP_WHILE_204_C(BOOST_PP_BOOL(p##(205, s)), p, o, s) +# define BOOST_PP_WHILE_205(p, o, s) BOOST_PP_WHILE_205_C(BOOST_PP_BOOL(p##(206, s)), p, o, s) +# define BOOST_PP_WHILE_206(p, o, s) BOOST_PP_WHILE_206_C(BOOST_PP_BOOL(p##(207, s)), p, o, s) +# define BOOST_PP_WHILE_207(p, o, s) BOOST_PP_WHILE_207_C(BOOST_PP_BOOL(p##(208, s)), p, o, s) +# define BOOST_PP_WHILE_208(p, o, s) BOOST_PP_WHILE_208_C(BOOST_PP_BOOL(p##(209, s)), p, o, s) +# define BOOST_PP_WHILE_209(p, o, s) BOOST_PP_WHILE_209_C(BOOST_PP_BOOL(p##(210, s)), p, o, s) +# define BOOST_PP_WHILE_210(p, o, s) BOOST_PP_WHILE_210_C(BOOST_PP_BOOL(p##(211, s)), p, o, s) +# define BOOST_PP_WHILE_211(p, o, s) BOOST_PP_WHILE_211_C(BOOST_PP_BOOL(p##(212, s)), p, o, s) +# define BOOST_PP_WHILE_212(p, o, s) BOOST_PP_WHILE_212_C(BOOST_PP_BOOL(p##(213, s)), p, o, s) +# define BOOST_PP_WHILE_213(p, o, s) BOOST_PP_WHILE_213_C(BOOST_PP_BOOL(p##(214, s)), p, o, s) +# define BOOST_PP_WHILE_214(p, o, s) BOOST_PP_WHILE_214_C(BOOST_PP_BOOL(p##(215, s)), p, o, s) +# define BOOST_PP_WHILE_215(p, o, s) BOOST_PP_WHILE_215_C(BOOST_PP_BOOL(p##(216, s)), p, o, s) +# define BOOST_PP_WHILE_216(p, o, s) BOOST_PP_WHILE_216_C(BOOST_PP_BOOL(p##(217, s)), p, o, s) +# define BOOST_PP_WHILE_217(p, o, s) BOOST_PP_WHILE_217_C(BOOST_PP_BOOL(p##(218, s)), p, o, s) +# define BOOST_PP_WHILE_218(p, o, s) BOOST_PP_WHILE_218_C(BOOST_PP_BOOL(p##(219, s)), p, o, s) +# define BOOST_PP_WHILE_219(p, o, s) BOOST_PP_WHILE_219_C(BOOST_PP_BOOL(p##(220, s)), p, o, s) +# define BOOST_PP_WHILE_220(p, o, s) BOOST_PP_WHILE_220_C(BOOST_PP_BOOL(p##(221, s)), p, o, s) +# define BOOST_PP_WHILE_221(p, o, s) BOOST_PP_WHILE_221_C(BOOST_PP_BOOL(p##(222, s)), p, o, s) +# define BOOST_PP_WHILE_222(p, o, s) BOOST_PP_WHILE_222_C(BOOST_PP_BOOL(p##(223, s)), p, o, s) +# define BOOST_PP_WHILE_223(p, o, s) BOOST_PP_WHILE_223_C(BOOST_PP_BOOL(p##(224, s)), p, o, s) +# define BOOST_PP_WHILE_224(p, o, s) BOOST_PP_WHILE_224_C(BOOST_PP_BOOL(p##(225, s)), p, o, s) +# define BOOST_PP_WHILE_225(p, o, s) BOOST_PP_WHILE_225_C(BOOST_PP_BOOL(p##(226, s)), p, o, s) +# define BOOST_PP_WHILE_226(p, o, s) BOOST_PP_WHILE_226_C(BOOST_PP_BOOL(p##(227, s)), p, o, s) +# define BOOST_PP_WHILE_227(p, o, s) BOOST_PP_WHILE_227_C(BOOST_PP_BOOL(p##(228, s)), p, o, s) +# define BOOST_PP_WHILE_228(p, o, s) BOOST_PP_WHILE_228_C(BOOST_PP_BOOL(p##(229, s)), p, o, s) +# define BOOST_PP_WHILE_229(p, o, s) BOOST_PP_WHILE_229_C(BOOST_PP_BOOL(p##(230, s)), p, o, s) +# define BOOST_PP_WHILE_230(p, o, s) BOOST_PP_WHILE_230_C(BOOST_PP_BOOL(p##(231, s)), p, o, s) +# define BOOST_PP_WHILE_231(p, o, s) BOOST_PP_WHILE_231_C(BOOST_PP_BOOL(p##(232, s)), p, o, s) +# define BOOST_PP_WHILE_232(p, o, s) BOOST_PP_WHILE_232_C(BOOST_PP_BOOL(p##(233, s)), p, o, s) +# define BOOST_PP_WHILE_233(p, o, s) BOOST_PP_WHILE_233_C(BOOST_PP_BOOL(p##(234, s)), p, o, s) +# define BOOST_PP_WHILE_234(p, o, s) BOOST_PP_WHILE_234_C(BOOST_PP_BOOL(p##(235, s)), p, o, s) +# define BOOST_PP_WHILE_235(p, o, s) BOOST_PP_WHILE_235_C(BOOST_PP_BOOL(p##(236, s)), p, o, s) +# define BOOST_PP_WHILE_236(p, o, s) BOOST_PP_WHILE_236_C(BOOST_PP_BOOL(p##(237, s)), p, o, s) +# define BOOST_PP_WHILE_237(p, o, s) BOOST_PP_WHILE_237_C(BOOST_PP_BOOL(p##(238, s)), p, o, s) +# define BOOST_PP_WHILE_238(p, o, s) BOOST_PP_WHILE_238_C(BOOST_PP_BOOL(p##(239, s)), p, o, s) +# define BOOST_PP_WHILE_239(p, o, s) BOOST_PP_WHILE_239_C(BOOST_PP_BOOL(p##(240, s)), p, o, s) +# define BOOST_PP_WHILE_240(p, o, s) BOOST_PP_WHILE_240_C(BOOST_PP_BOOL(p##(241, s)), p, o, s) +# define BOOST_PP_WHILE_241(p, o, s) BOOST_PP_WHILE_241_C(BOOST_PP_BOOL(p##(242, s)), p, o, s) +# define BOOST_PP_WHILE_242(p, o, s) BOOST_PP_WHILE_242_C(BOOST_PP_BOOL(p##(243, s)), p, o, s) +# define BOOST_PP_WHILE_243(p, o, s) BOOST_PP_WHILE_243_C(BOOST_PP_BOOL(p##(244, s)), p, o, s) +# define BOOST_PP_WHILE_244(p, o, s) BOOST_PP_WHILE_244_C(BOOST_PP_BOOL(p##(245, s)), p, o, s) +# define BOOST_PP_WHILE_245(p, o, s) BOOST_PP_WHILE_245_C(BOOST_PP_BOOL(p##(246, s)), p, o, s) +# define BOOST_PP_WHILE_246(p, o, s) BOOST_PP_WHILE_246_C(BOOST_PP_BOOL(p##(247, s)), p, o, s) +# define BOOST_PP_WHILE_247(p, o, s) BOOST_PP_WHILE_247_C(BOOST_PP_BOOL(p##(248, s)), p, o, s) +# define BOOST_PP_WHILE_248(p, o, s) BOOST_PP_WHILE_248_C(BOOST_PP_BOOL(p##(249, s)), p, o, s) +# define BOOST_PP_WHILE_249(p, o, s) BOOST_PP_WHILE_249_C(BOOST_PP_BOOL(p##(250, s)), p, o, s) +# define BOOST_PP_WHILE_250(p, o, s) BOOST_PP_WHILE_250_C(BOOST_PP_BOOL(p##(251, s)), p, o, s) +# define BOOST_PP_WHILE_251(p, o, s) BOOST_PP_WHILE_251_C(BOOST_PP_BOOL(p##(252, s)), p, o, s) +# define BOOST_PP_WHILE_252(p, o, s) BOOST_PP_WHILE_252_C(BOOST_PP_BOOL(p##(253, s)), p, o, s) +# define BOOST_PP_WHILE_253(p, o, s) BOOST_PP_WHILE_253_C(BOOST_PP_BOOL(p##(254, s)), p, o, s) +# define BOOST_PP_WHILE_254(p, o, s) BOOST_PP_WHILE_254_C(BOOST_PP_BOOL(p##(255, s)), p, o, s) +# define BOOST_PP_WHILE_255(p, o, s) BOOST_PP_WHILE_255_C(BOOST_PP_BOOL(p##(256, s)), p, o, s) +# define BOOST_PP_WHILE_256(p, o, s) BOOST_PP_WHILE_256_C(BOOST_PP_BOOL(p##(257, s)), p, o, s) +# +# define BOOST_PP_WHILE_1_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_2, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(2, s)) +# define BOOST_PP_WHILE_2_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_3, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(3, s)) +# define BOOST_PP_WHILE_3_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_4, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(4, s)) +# define BOOST_PP_WHILE_4_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_5, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(5, s)) +# define BOOST_PP_WHILE_5_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_6, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(6, s)) +# define BOOST_PP_WHILE_6_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_7, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(7, s)) +# define BOOST_PP_WHILE_7_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_8, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(8, s)) +# define BOOST_PP_WHILE_8_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_9, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(9, s)) +# define BOOST_PP_WHILE_9_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_10, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(10, s)) +# define BOOST_PP_WHILE_10_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_11, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(11, s)) +# define BOOST_PP_WHILE_11_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_12, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(12, s)) +# define BOOST_PP_WHILE_12_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_13, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(13, s)) +# define BOOST_PP_WHILE_13_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_14, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(14, s)) +# define BOOST_PP_WHILE_14_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_15, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(15, s)) +# define BOOST_PP_WHILE_15_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_16, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(16, s)) +# define BOOST_PP_WHILE_16_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_17, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(17, s)) +# define BOOST_PP_WHILE_17_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_18, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(18, s)) +# define BOOST_PP_WHILE_18_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_19, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(19, s)) +# define BOOST_PP_WHILE_19_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_20, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(20, s)) +# define BOOST_PP_WHILE_20_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_21, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(21, s)) +# define BOOST_PP_WHILE_21_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_22, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(22, s)) +# define BOOST_PP_WHILE_22_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_23, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(23, s)) +# define BOOST_PP_WHILE_23_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_24, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(24, s)) +# define BOOST_PP_WHILE_24_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_25, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(25, s)) +# define BOOST_PP_WHILE_25_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_26, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(26, s)) +# define BOOST_PP_WHILE_26_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_27, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(27, s)) +# define BOOST_PP_WHILE_27_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_28, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(28, s)) +# define BOOST_PP_WHILE_28_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_29, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(29, s)) +# define BOOST_PP_WHILE_29_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_30, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(30, s)) +# define BOOST_PP_WHILE_30_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_31, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(31, s)) +# define BOOST_PP_WHILE_31_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_32, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(32, s)) +# define BOOST_PP_WHILE_32_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_33, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(33, s)) +# define BOOST_PP_WHILE_33_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_34, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(34, s)) +# define BOOST_PP_WHILE_34_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_35, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(35, s)) +# define BOOST_PP_WHILE_35_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_36, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(36, s)) +# define BOOST_PP_WHILE_36_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_37, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(37, s)) +# define BOOST_PP_WHILE_37_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_38, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(38, s)) +# define BOOST_PP_WHILE_38_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_39, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(39, s)) +# define BOOST_PP_WHILE_39_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_40, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(40, s)) +# define BOOST_PP_WHILE_40_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_41, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(41, s)) +# define BOOST_PP_WHILE_41_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_42, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(42, s)) +# define BOOST_PP_WHILE_42_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_43, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(43, s)) +# define BOOST_PP_WHILE_43_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_44, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(44, s)) +# define BOOST_PP_WHILE_44_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_45, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(45, s)) +# define BOOST_PP_WHILE_45_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_46, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(46, s)) +# define BOOST_PP_WHILE_46_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_47, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(47, s)) +# define BOOST_PP_WHILE_47_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_48, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(48, s)) +# define BOOST_PP_WHILE_48_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_49, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(49, s)) +# define BOOST_PP_WHILE_49_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_50, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(50, s)) +# define BOOST_PP_WHILE_50_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_51, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(51, s)) +# define BOOST_PP_WHILE_51_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_52, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(52, s)) +# define BOOST_PP_WHILE_52_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_53, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(53, s)) +# define BOOST_PP_WHILE_53_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_54, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(54, s)) +# define BOOST_PP_WHILE_54_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_55, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(55, s)) +# define BOOST_PP_WHILE_55_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_56, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(56, s)) +# define BOOST_PP_WHILE_56_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_57, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(57, s)) +# define BOOST_PP_WHILE_57_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_58, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(58, s)) +# define BOOST_PP_WHILE_58_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_59, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(59, s)) +# define BOOST_PP_WHILE_59_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_60, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(60, s)) +# define BOOST_PP_WHILE_60_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_61, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(61, s)) +# define BOOST_PP_WHILE_61_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_62, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(62, s)) +# define BOOST_PP_WHILE_62_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_63, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(63, s)) +# define BOOST_PP_WHILE_63_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_64, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(64, s)) +# define BOOST_PP_WHILE_64_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_65, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(65, s)) +# define BOOST_PP_WHILE_65_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_66, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(66, s)) +# define BOOST_PP_WHILE_66_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_67, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(67, s)) +# define BOOST_PP_WHILE_67_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_68, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(68, s)) +# define BOOST_PP_WHILE_68_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_69, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(69, s)) +# define BOOST_PP_WHILE_69_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_70, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(70, s)) +# define BOOST_PP_WHILE_70_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_71, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(71, s)) +# define BOOST_PP_WHILE_71_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_72, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(72, s)) +# define BOOST_PP_WHILE_72_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_73, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(73, s)) +# define BOOST_PP_WHILE_73_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_74, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(74, s)) +# define BOOST_PP_WHILE_74_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_75, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(75, s)) +# define BOOST_PP_WHILE_75_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_76, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(76, s)) +# define BOOST_PP_WHILE_76_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_77, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(77, s)) +# define BOOST_PP_WHILE_77_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_78, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(78, s)) +# define BOOST_PP_WHILE_78_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_79, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(79, s)) +# define BOOST_PP_WHILE_79_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_80, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(80, s)) +# define BOOST_PP_WHILE_80_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_81, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(81, s)) +# define BOOST_PP_WHILE_81_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_82, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(82, s)) +# define BOOST_PP_WHILE_82_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_83, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(83, s)) +# define BOOST_PP_WHILE_83_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_84, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(84, s)) +# define BOOST_PP_WHILE_84_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_85, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(85, s)) +# define BOOST_PP_WHILE_85_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_86, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(86, s)) +# define BOOST_PP_WHILE_86_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_87, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(87, s)) +# define BOOST_PP_WHILE_87_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_88, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(88, s)) +# define BOOST_PP_WHILE_88_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_89, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(89, s)) +# define BOOST_PP_WHILE_89_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_90, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(90, s)) +# define BOOST_PP_WHILE_90_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_91, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(91, s)) +# define BOOST_PP_WHILE_91_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_92, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(92, s)) +# define BOOST_PP_WHILE_92_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_93, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(93, s)) +# define BOOST_PP_WHILE_93_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_94, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(94, s)) +# define BOOST_PP_WHILE_94_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_95, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(95, s)) +# define BOOST_PP_WHILE_95_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_96, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(96, s)) +# define BOOST_PP_WHILE_96_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_97, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(97, s)) +# define BOOST_PP_WHILE_97_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_98, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(98, s)) +# define BOOST_PP_WHILE_98_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_99, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(99, s)) +# define BOOST_PP_WHILE_99_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_100, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(100, s)) +# define BOOST_PP_WHILE_100_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_101, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(101, s)) +# define BOOST_PP_WHILE_101_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_102, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(102, s)) +# define BOOST_PP_WHILE_102_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_103, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(103, s)) +# define BOOST_PP_WHILE_103_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_104, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(104, s)) +# define BOOST_PP_WHILE_104_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_105, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(105, s)) +# define BOOST_PP_WHILE_105_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_106, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(106, s)) +# define BOOST_PP_WHILE_106_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_107, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(107, s)) +# define BOOST_PP_WHILE_107_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_108, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(108, s)) +# define BOOST_PP_WHILE_108_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_109, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(109, s)) +# define BOOST_PP_WHILE_109_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_110, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(110, s)) +# define BOOST_PP_WHILE_110_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_111, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(111, s)) +# define BOOST_PP_WHILE_111_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_112, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(112, s)) +# define BOOST_PP_WHILE_112_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_113, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(113, s)) +# define BOOST_PP_WHILE_113_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_114, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(114, s)) +# define BOOST_PP_WHILE_114_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_115, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(115, s)) +# define BOOST_PP_WHILE_115_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_116, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(116, s)) +# define BOOST_PP_WHILE_116_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_117, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(117, s)) +# define BOOST_PP_WHILE_117_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_118, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(118, s)) +# define BOOST_PP_WHILE_118_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_119, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(119, s)) +# define BOOST_PP_WHILE_119_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_120, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(120, s)) +# define BOOST_PP_WHILE_120_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_121, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(121, s)) +# define BOOST_PP_WHILE_121_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_122, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(122, s)) +# define BOOST_PP_WHILE_122_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_123, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(123, s)) +# define BOOST_PP_WHILE_123_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_124, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(124, s)) +# define BOOST_PP_WHILE_124_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_125, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(125, s)) +# define BOOST_PP_WHILE_125_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_126, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(126, s)) +# define BOOST_PP_WHILE_126_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_127, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(127, s)) +# define BOOST_PP_WHILE_127_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_128, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(128, s)) +# define BOOST_PP_WHILE_128_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_129, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(129, s)) +# define BOOST_PP_WHILE_129_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_130, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(130, s)) +# define BOOST_PP_WHILE_130_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_131, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(131, s)) +# define BOOST_PP_WHILE_131_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_132, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(132, s)) +# define BOOST_PP_WHILE_132_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_133, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(133, s)) +# define BOOST_PP_WHILE_133_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_134, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(134, s)) +# define BOOST_PP_WHILE_134_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_135, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(135, s)) +# define BOOST_PP_WHILE_135_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_136, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(136, s)) +# define BOOST_PP_WHILE_136_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_137, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(137, s)) +# define BOOST_PP_WHILE_137_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_138, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(138, s)) +# define BOOST_PP_WHILE_138_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_139, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(139, s)) +# define BOOST_PP_WHILE_139_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_140, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(140, s)) +# define BOOST_PP_WHILE_140_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_141, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(141, s)) +# define BOOST_PP_WHILE_141_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_142, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(142, s)) +# define BOOST_PP_WHILE_142_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_143, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(143, s)) +# define BOOST_PP_WHILE_143_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_144, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(144, s)) +# define BOOST_PP_WHILE_144_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_145, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(145, s)) +# define BOOST_PP_WHILE_145_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_146, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(146, s)) +# define BOOST_PP_WHILE_146_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_147, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(147, s)) +# define BOOST_PP_WHILE_147_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_148, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(148, s)) +# define BOOST_PP_WHILE_148_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_149, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(149, s)) +# define BOOST_PP_WHILE_149_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_150, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(150, s)) +# define BOOST_PP_WHILE_150_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_151, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(151, s)) +# define BOOST_PP_WHILE_151_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_152, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(152, s)) +# define BOOST_PP_WHILE_152_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_153, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(153, s)) +# define BOOST_PP_WHILE_153_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_154, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(154, s)) +# define BOOST_PP_WHILE_154_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_155, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(155, s)) +# define BOOST_PP_WHILE_155_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_156, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(156, s)) +# define BOOST_PP_WHILE_156_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_157, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(157, s)) +# define BOOST_PP_WHILE_157_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_158, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(158, s)) +# define BOOST_PP_WHILE_158_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_159, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(159, s)) +# define BOOST_PP_WHILE_159_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_160, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(160, s)) +# define BOOST_PP_WHILE_160_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_161, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(161, s)) +# define BOOST_PP_WHILE_161_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_162, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(162, s)) +# define BOOST_PP_WHILE_162_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_163, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(163, s)) +# define BOOST_PP_WHILE_163_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_164, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(164, s)) +# define BOOST_PP_WHILE_164_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_165, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(165, s)) +# define BOOST_PP_WHILE_165_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_166, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(166, s)) +# define BOOST_PP_WHILE_166_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_167, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(167, s)) +# define BOOST_PP_WHILE_167_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_168, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(168, s)) +# define BOOST_PP_WHILE_168_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_169, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(169, s)) +# define BOOST_PP_WHILE_169_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_170, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(170, s)) +# define BOOST_PP_WHILE_170_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_171, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(171, s)) +# define BOOST_PP_WHILE_171_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_172, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(172, s)) +# define BOOST_PP_WHILE_172_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_173, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(173, s)) +# define BOOST_PP_WHILE_173_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_174, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(174, s)) +# define BOOST_PP_WHILE_174_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_175, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(175, s)) +# define BOOST_PP_WHILE_175_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_176, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(176, s)) +# define BOOST_PP_WHILE_176_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_177, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(177, s)) +# define BOOST_PP_WHILE_177_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_178, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(178, s)) +# define BOOST_PP_WHILE_178_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_179, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(179, s)) +# define BOOST_PP_WHILE_179_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_180, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(180, s)) +# define BOOST_PP_WHILE_180_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_181, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(181, s)) +# define BOOST_PP_WHILE_181_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_182, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(182, s)) +# define BOOST_PP_WHILE_182_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_183, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(183, s)) +# define BOOST_PP_WHILE_183_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_184, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(184, s)) +# define BOOST_PP_WHILE_184_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_185, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(185, s)) +# define BOOST_PP_WHILE_185_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_186, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(186, s)) +# define BOOST_PP_WHILE_186_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_187, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(187, s)) +# define BOOST_PP_WHILE_187_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_188, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(188, s)) +# define BOOST_PP_WHILE_188_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_189, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(189, s)) +# define BOOST_PP_WHILE_189_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_190, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(190, s)) +# define BOOST_PP_WHILE_190_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_191, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(191, s)) +# define BOOST_PP_WHILE_191_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_192, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(192, s)) +# define BOOST_PP_WHILE_192_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_193, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(193, s)) +# define BOOST_PP_WHILE_193_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_194, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(194, s)) +# define BOOST_PP_WHILE_194_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_195, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(195, s)) +# define BOOST_PP_WHILE_195_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_196, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(196, s)) +# define BOOST_PP_WHILE_196_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_197, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(197, s)) +# define BOOST_PP_WHILE_197_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_198, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(198, s)) +# define BOOST_PP_WHILE_198_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_199, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(199, s)) +# define BOOST_PP_WHILE_199_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_200, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(200, s)) +# define BOOST_PP_WHILE_200_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_201, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(201, s)) +# define BOOST_PP_WHILE_201_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_202, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(202, s)) +# define BOOST_PP_WHILE_202_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_203, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(203, s)) +# define BOOST_PP_WHILE_203_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_204, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(204, s)) +# define BOOST_PP_WHILE_204_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_205, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(205, s)) +# define BOOST_PP_WHILE_205_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_206, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(206, s)) +# define BOOST_PP_WHILE_206_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_207, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(207, s)) +# define BOOST_PP_WHILE_207_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_208, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(208, s)) +# define BOOST_PP_WHILE_208_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_209, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(209, s)) +# define BOOST_PP_WHILE_209_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_210, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(210, s)) +# define BOOST_PP_WHILE_210_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_211, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(211, s)) +# define BOOST_PP_WHILE_211_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_212, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(212, s)) +# define BOOST_PP_WHILE_212_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_213, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(213, s)) +# define BOOST_PP_WHILE_213_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_214, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(214, s)) +# define BOOST_PP_WHILE_214_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_215, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(215, s)) +# define BOOST_PP_WHILE_215_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_216, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(216, s)) +# define BOOST_PP_WHILE_216_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_217, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(217, s)) +# define BOOST_PP_WHILE_217_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_218, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(218, s)) +# define BOOST_PP_WHILE_218_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_219, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(219, s)) +# define BOOST_PP_WHILE_219_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_220, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(220, s)) +# define BOOST_PP_WHILE_220_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_221, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(221, s)) +# define BOOST_PP_WHILE_221_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_222, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(222, s)) +# define BOOST_PP_WHILE_222_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_223, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(223, s)) +# define BOOST_PP_WHILE_223_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_224, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(224, s)) +# define BOOST_PP_WHILE_224_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_225, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(225, s)) +# define BOOST_PP_WHILE_225_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_226, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(226, s)) +# define BOOST_PP_WHILE_226_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_227, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(227, s)) +# define BOOST_PP_WHILE_227_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_228, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(228, s)) +# define BOOST_PP_WHILE_228_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_229, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(229, s)) +# define BOOST_PP_WHILE_229_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_230, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(230, s)) +# define BOOST_PP_WHILE_230_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_231, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(231, s)) +# define BOOST_PP_WHILE_231_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_232, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(232, s)) +# define BOOST_PP_WHILE_232_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_233, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(233, s)) +# define BOOST_PP_WHILE_233_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_234, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(234, s)) +# define BOOST_PP_WHILE_234_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_235, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(235, s)) +# define BOOST_PP_WHILE_235_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_236, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(236, s)) +# define BOOST_PP_WHILE_236_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_237, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(237, s)) +# define BOOST_PP_WHILE_237_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_238, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(238, s)) +# define BOOST_PP_WHILE_238_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_239, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(239, s)) +# define BOOST_PP_WHILE_239_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_240, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(240, s)) +# define BOOST_PP_WHILE_240_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_241, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(241, s)) +# define BOOST_PP_WHILE_241_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_242, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(242, s)) +# define BOOST_PP_WHILE_242_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_243, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(243, s)) +# define BOOST_PP_WHILE_243_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_244, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(244, s)) +# define BOOST_PP_WHILE_244_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_245, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(245, s)) +# define BOOST_PP_WHILE_245_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_246, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(246, s)) +# define BOOST_PP_WHILE_246_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_247, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(247, s)) +# define BOOST_PP_WHILE_247_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_248, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(248, s)) +# define BOOST_PP_WHILE_248_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_249, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(249, s)) +# define BOOST_PP_WHILE_249_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_250, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(250, s)) +# define BOOST_PP_WHILE_250_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_251, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(251, s)) +# define BOOST_PP_WHILE_251_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_252, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(252, s)) +# define BOOST_PP_WHILE_252_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_253, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(253, s)) +# define BOOST_PP_WHILE_253_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_254, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(254, s)) +# define BOOST_PP_WHILE_254_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_255, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(255, s)) +# define BOOST_PP_WHILE_255_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_256, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(256, s)) +# define BOOST_PP_WHILE_256_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_257, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(257, s)) +# +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/control/detail/edg/while.hpp b/ThirdParty/boost-Subset/boost/preprocessor/control/detail/edg/while.hpp new file mode 100644 index 0000000000..ce28eb22e1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/control/detail/edg/while.hpp @@ -0,0 +1,534 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_CONTROL_DETAIL_EDG_WHILE_HPP +# define BOOST_PREPROCESSOR_CONTROL_DETAIL_EDG_WHILE_HPP +# +# include +# include +# +# define BOOST_PP_WHILE_1(p, o, s) BOOST_PP_WHILE_1_I(p, o, s) +# define BOOST_PP_WHILE_2(p, o, s) BOOST_PP_WHILE_2_I(p, o, s) +# define BOOST_PP_WHILE_3(p, o, s) BOOST_PP_WHILE_3_I(p, o, s) +# define BOOST_PP_WHILE_4(p, o, s) BOOST_PP_WHILE_4_I(p, o, s) +# define BOOST_PP_WHILE_5(p, o, s) BOOST_PP_WHILE_5_I(p, o, s) +# define BOOST_PP_WHILE_6(p, o, s) BOOST_PP_WHILE_6_I(p, o, s) +# define BOOST_PP_WHILE_7(p, o, s) BOOST_PP_WHILE_7_I(p, o, s) +# define BOOST_PP_WHILE_8(p, o, s) BOOST_PP_WHILE_8_I(p, o, s) +# define BOOST_PP_WHILE_9(p, o, s) BOOST_PP_WHILE_9_I(p, o, s) +# define BOOST_PP_WHILE_10(p, o, s) BOOST_PP_WHILE_10_I(p, o, s) +# define BOOST_PP_WHILE_11(p, o, s) BOOST_PP_WHILE_11_I(p, o, s) +# define BOOST_PP_WHILE_12(p, o, s) BOOST_PP_WHILE_12_I(p, o, s) +# define BOOST_PP_WHILE_13(p, o, s) BOOST_PP_WHILE_13_I(p, o, s) +# define BOOST_PP_WHILE_14(p, o, s) BOOST_PP_WHILE_14_I(p, o, s) +# define BOOST_PP_WHILE_15(p, o, s) BOOST_PP_WHILE_15_I(p, o, s) +# define BOOST_PP_WHILE_16(p, o, s) BOOST_PP_WHILE_16_I(p, o, s) +# define BOOST_PP_WHILE_17(p, o, s) BOOST_PP_WHILE_17_I(p, o, s) +# define BOOST_PP_WHILE_18(p, o, s) BOOST_PP_WHILE_18_I(p, o, s) +# define BOOST_PP_WHILE_19(p, o, s) BOOST_PP_WHILE_19_I(p, o, s) +# define BOOST_PP_WHILE_20(p, o, s) BOOST_PP_WHILE_20_I(p, o, s) +# define BOOST_PP_WHILE_21(p, o, s) BOOST_PP_WHILE_21_I(p, o, s) +# define BOOST_PP_WHILE_22(p, o, s) BOOST_PP_WHILE_22_I(p, o, s) +# define BOOST_PP_WHILE_23(p, o, s) BOOST_PP_WHILE_23_I(p, o, s) +# define BOOST_PP_WHILE_24(p, o, s) BOOST_PP_WHILE_24_I(p, o, s) +# define BOOST_PP_WHILE_25(p, o, s) BOOST_PP_WHILE_25_I(p, o, s) +# define BOOST_PP_WHILE_26(p, o, s) BOOST_PP_WHILE_26_I(p, o, s) +# define BOOST_PP_WHILE_27(p, o, s) BOOST_PP_WHILE_27_I(p, o, s) +# define BOOST_PP_WHILE_28(p, o, s) BOOST_PP_WHILE_28_I(p, o, s) +# define BOOST_PP_WHILE_29(p, o, s) BOOST_PP_WHILE_29_I(p, o, s) +# define BOOST_PP_WHILE_30(p, o, s) BOOST_PP_WHILE_30_I(p, o, s) +# define BOOST_PP_WHILE_31(p, o, s) BOOST_PP_WHILE_31_I(p, o, s) +# define BOOST_PP_WHILE_32(p, o, s) BOOST_PP_WHILE_32_I(p, o, s) +# define BOOST_PP_WHILE_33(p, o, s) BOOST_PP_WHILE_33_I(p, o, s) +# define BOOST_PP_WHILE_34(p, o, s) BOOST_PP_WHILE_34_I(p, o, s) +# define BOOST_PP_WHILE_35(p, o, s) BOOST_PP_WHILE_35_I(p, o, s) +# define BOOST_PP_WHILE_36(p, o, s) BOOST_PP_WHILE_36_I(p, o, s) +# define BOOST_PP_WHILE_37(p, o, s) BOOST_PP_WHILE_37_I(p, o, s) +# define BOOST_PP_WHILE_38(p, o, s) BOOST_PP_WHILE_38_I(p, o, s) +# define BOOST_PP_WHILE_39(p, o, s) BOOST_PP_WHILE_39_I(p, o, s) +# define BOOST_PP_WHILE_40(p, o, s) BOOST_PP_WHILE_40_I(p, o, s) +# define BOOST_PP_WHILE_41(p, o, s) BOOST_PP_WHILE_41_I(p, o, s) +# define BOOST_PP_WHILE_42(p, o, s) BOOST_PP_WHILE_42_I(p, o, s) +# define BOOST_PP_WHILE_43(p, o, s) BOOST_PP_WHILE_43_I(p, o, s) +# define BOOST_PP_WHILE_44(p, o, s) BOOST_PP_WHILE_44_I(p, o, s) +# define BOOST_PP_WHILE_45(p, o, s) BOOST_PP_WHILE_45_I(p, o, s) +# define BOOST_PP_WHILE_46(p, o, s) BOOST_PP_WHILE_46_I(p, o, s) +# define BOOST_PP_WHILE_47(p, o, s) BOOST_PP_WHILE_47_I(p, o, s) +# define BOOST_PP_WHILE_48(p, o, s) BOOST_PP_WHILE_48_I(p, o, s) +# define BOOST_PP_WHILE_49(p, o, s) BOOST_PP_WHILE_49_I(p, o, s) +# define BOOST_PP_WHILE_50(p, o, s) BOOST_PP_WHILE_50_I(p, o, s) +# define BOOST_PP_WHILE_51(p, o, s) BOOST_PP_WHILE_51_I(p, o, s) +# define BOOST_PP_WHILE_52(p, o, s) BOOST_PP_WHILE_52_I(p, o, s) +# define BOOST_PP_WHILE_53(p, o, s) BOOST_PP_WHILE_53_I(p, o, s) +# define BOOST_PP_WHILE_54(p, o, s) BOOST_PP_WHILE_54_I(p, o, s) +# define BOOST_PP_WHILE_55(p, o, s) BOOST_PP_WHILE_55_I(p, o, s) +# define BOOST_PP_WHILE_56(p, o, s) BOOST_PP_WHILE_56_I(p, o, s) +# define BOOST_PP_WHILE_57(p, o, s) BOOST_PP_WHILE_57_I(p, o, s) +# define BOOST_PP_WHILE_58(p, o, s) BOOST_PP_WHILE_58_I(p, o, s) +# define BOOST_PP_WHILE_59(p, o, s) BOOST_PP_WHILE_59_I(p, o, s) +# define BOOST_PP_WHILE_60(p, o, s) BOOST_PP_WHILE_60_I(p, o, s) +# define BOOST_PP_WHILE_61(p, o, s) BOOST_PP_WHILE_61_I(p, o, s) +# define BOOST_PP_WHILE_62(p, o, s) BOOST_PP_WHILE_62_I(p, o, s) +# define BOOST_PP_WHILE_63(p, o, s) BOOST_PP_WHILE_63_I(p, o, s) +# define BOOST_PP_WHILE_64(p, o, s) BOOST_PP_WHILE_64_I(p, o, s) +# define BOOST_PP_WHILE_65(p, o, s) BOOST_PP_WHILE_65_I(p, o, s) +# define BOOST_PP_WHILE_66(p, o, s) BOOST_PP_WHILE_66_I(p, o, s) +# define BOOST_PP_WHILE_67(p, o, s) BOOST_PP_WHILE_67_I(p, o, s) +# define BOOST_PP_WHILE_68(p, o, s) BOOST_PP_WHILE_68_I(p, o, s) +# define BOOST_PP_WHILE_69(p, o, s) BOOST_PP_WHILE_69_I(p, o, s) +# define BOOST_PP_WHILE_70(p, o, s) BOOST_PP_WHILE_70_I(p, o, s) +# define BOOST_PP_WHILE_71(p, o, s) BOOST_PP_WHILE_71_I(p, o, s) +# define BOOST_PP_WHILE_72(p, o, s) BOOST_PP_WHILE_72_I(p, o, s) +# define BOOST_PP_WHILE_73(p, o, s) BOOST_PP_WHILE_73_I(p, o, s) +# define BOOST_PP_WHILE_74(p, o, s) BOOST_PP_WHILE_74_I(p, o, s) +# define BOOST_PP_WHILE_75(p, o, s) BOOST_PP_WHILE_75_I(p, o, s) +# define BOOST_PP_WHILE_76(p, o, s) BOOST_PP_WHILE_76_I(p, o, s) +# define BOOST_PP_WHILE_77(p, o, s) BOOST_PP_WHILE_77_I(p, o, s) +# define BOOST_PP_WHILE_78(p, o, s) BOOST_PP_WHILE_78_I(p, o, s) +# define BOOST_PP_WHILE_79(p, o, s) BOOST_PP_WHILE_79_I(p, o, s) +# define BOOST_PP_WHILE_80(p, o, s) BOOST_PP_WHILE_80_I(p, o, s) +# define BOOST_PP_WHILE_81(p, o, s) BOOST_PP_WHILE_81_I(p, o, s) +# define BOOST_PP_WHILE_82(p, o, s) BOOST_PP_WHILE_82_I(p, o, s) +# define BOOST_PP_WHILE_83(p, o, s) BOOST_PP_WHILE_83_I(p, o, s) +# define BOOST_PP_WHILE_84(p, o, s) BOOST_PP_WHILE_84_I(p, o, s) +# define BOOST_PP_WHILE_85(p, o, s) BOOST_PP_WHILE_85_I(p, o, s) +# define BOOST_PP_WHILE_86(p, o, s) BOOST_PP_WHILE_86_I(p, o, s) +# define BOOST_PP_WHILE_87(p, o, s) BOOST_PP_WHILE_87_I(p, o, s) +# define BOOST_PP_WHILE_88(p, o, s) BOOST_PP_WHILE_88_I(p, o, s) +# define BOOST_PP_WHILE_89(p, o, s) BOOST_PP_WHILE_89_I(p, o, s) +# define BOOST_PP_WHILE_90(p, o, s) BOOST_PP_WHILE_90_I(p, o, s) +# define BOOST_PP_WHILE_91(p, o, s) BOOST_PP_WHILE_91_I(p, o, s) +# define BOOST_PP_WHILE_92(p, o, s) BOOST_PP_WHILE_92_I(p, o, s) +# define BOOST_PP_WHILE_93(p, o, s) BOOST_PP_WHILE_93_I(p, o, s) +# define BOOST_PP_WHILE_94(p, o, s) BOOST_PP_WHILE_94_I(p, o, s) +# define BOOST_PP_WHILE_95(p, o, s) BOOST_PP_WHILE_95_I(p, o, s) +# define BOOST_PP_WHILE_96(p, o, s) BOOST_PP_WHILE_96_I(p, o, s) +# define BOOST_PP_WHILE_97(p, o, s) BOOST_PP_WHILE_97_I(p, o, s) +# define BOOST_PP_WHILE_98(p, o, s) BOOST_PP_WHILE_98_I(p, o, s) +# define BOOST_PP_WHILE_99(p, o, s) BOOST_PP_WHILE_99_I(p, o, s) +# define BOOST_PP_WHILE_100(p, o, s) BOOST_PP_WHILE_100_I(p, o, s) +# define BOOST_PP_WHILE_101(p, o, s) BOOST_PP_WHILE_101_I(p, o, s) +# define BOOST_PP_WHILE_102(p, o, s) BOOST_PP_WHILE_102_I(p, o, s) +# define BOOST_PP_WHILE_103(p, o, s) BOOST_PP_WHILE_103_I(p, o, s) +# define BOOST_PP_WHILE_104(p, o, s) BOOST_PP_WHILE_104_I(p, o, s) +# define BOOST_PP_WHILE_105(p, o, s) BOOST_PP_WHILE_105_I(p, o, s) +# define BOOST_PP_WHILE_106(p, o, s) BOOST_PP_WHILE_106_I(p, o, s) +# define BOOST_PP_WHILE_107(p, o, s) BOOST_PP_WHILE_107_I(p, o, s) +# define BOOST_PP_WHILE_108(p, o, s) BOOST_PP_WHILE_108_I(p, o, s) +# define BOOST_PP_WHILE_109(p, o, s) BOOST_PP_WHILE_109_I(p, o, s) +# define BOOST_PP_WHILE_110(p, o, s) BOOST_PP_WHILE_110_I(p, o, s) +# define BOOST_PP_WHILE_111(p, o, s) BOOST_PP_WHILE_111_I(p, o, s) +# define BOOST_PP_WHILE_112(p, o, s) BOOST_PP_WHILE_112_I(p, o, s) +# define BOOST_PP_WHILE_113(p, o, s) BOOST_PP_WHILE_113_I(p, o, s) +# define BOOST_PP_WHILE_114(p, o, s) BOOST_PP_WHILE_114_I(p, o, s) +# define BOOST_PP_WHILE_115(p, o, s) BOOST_PP_WHILE_115_I(p, o, s) +# define BOOST_PP_WHILE_116(p, o, s) BOOST_PP_WHILE_116_I(p, o, s) +# define BOOST_PP_WHILE_117(p, o, s) BOOST_PP_WHILE_117_I(p, o, s) +# define BOOST_PP_WHILE_118(p, o, s) BOOST_PP_WHILE_118_I(p, o, s) +# define BOOST_PP_WHILE_119(p, o, s) BOOST_PP_WHILE_119_I(p, o, s) +# define BOOST_PP_WHILE_120(p, o, s) BOOST_PP_WHILE_120_I(p, o, s) +# define BOOST_PP_WHILE_121(p, o, s) BOOST_PP_WHILE_121_I(p, o, s) +# define BOOST_PP_WHILE_122(p, o, s) BOOST_PP_WHILE_122_I(p, o, s) +# define BOOST_PP_WHILE_123(p, o, s) BOOST_PP_WHILE_123_I(p, o, s) +# define BOOST_PP_WHILE_124(p, o, s) BOOST_PP_WHILE_124_I(p, o, s) +# define BOOST_PP_WHILE_125(p, o, s) BOOST_PP_WHILE_125_I(p, o, s) +# define BOOST_PP_WHILE_126(p, o, s) BOOST_PP_WHILE_126_I(p, o, s) +# define BOOST_PP_WHILE_127(p, o, s) BOOST_PP_WHILE_127_I(p, o, s) +# define BOOST_PP_WHILE_128(p, o, s) BOOST_PP_WHILE_128_I(p, o, s) +# define BOOST_PP_WHILE_129(p, o, s) BOOST_PP_WHILE_129_I(p, o, s) +# define BOOST_PP_WHILE_130(p, o, s) BOOST_PP_WHILE_130_I(p, o, s) +# define BOOST_PP_WHILE_131(p, o, s) BOOST_PP_WHILE_131_I(p, o, s) +# define BOOST_PP_WHILE_132(p, o, s) BOOST_PP_WHILE_132_I(p, o, s) +# define BOOST_PP_WHILE_133(p, o, s) BOOST_PP_WHILE_133_I(p, o, s) +# define BOOST_PP_WHILE_134(p, o, s) BOOST_PP_WHILE_134_I(p, o, s) +# define BOOST_PP_WHILE_135(p, o, s) BOOST_PP_WHILE_135_I(p, o, s) +# define BOOST_PP_WHILE_136(p, o, s) BOOST_PP_WHILE_136_I(p, o, s) +# define BOOST_PP_WHILE_137(p, o, s) BOOST_PP_WHILE_137_I(p, o, s) +# define BOOST_PP_WHILE_138(p, o, s) BOOST_PP_WHILE_138_I(p, o, s) +# define BOOST_PP_WHILE_139(p, o, s) BOOST_PP_WHILE_139_I(p, o, s) +# define BOOST_PP_WHILE_140(p, o, s) BOOST_PP_WHILE_140_I(p, o, s) +# define BOOST_PP_WHILE_141(p, o, s) BOOST_PP_WHILE_141_I(p, o, s) +# define BOOST_PP_WHILE_142(p, o, s) BOOST_PP_WHILE_142_I(p, o, s) +# define BOOST_PP_WHILE_143(p, o, s) BOOST_PP_WHILE_143_I(p, o, s) +# define BOOST_PP_WHILE_144(p, o, s) BOOST_PP_WHILE_144_I(p, o, s) +# define BOOST_PP_WHILE_145(p, o, s) BOOST_PP_WHILE_145_I(p, o, s) +# define BOOST_PP_WHILE_146(p, o, s) BOOST_PP_WHILE_146_I(p, o, s) +# define BOOST_PP_WHILE_147(p, o, s) BOOST_PP_WHILE_147_I(p, o, s) +# define BOOST_PP_WHILE_148(p, o, s) BOOST_PP_WHILE_148_I(p, o, s) +# define BOOST_PP_WHILE_149(p, o, s) BOOST_PP_WHILE_149_I(p, o, s) +# define BOOST_PP_WHILE_150(p, o, s) BOOST_PP_WHILE_150_I(p, o, s) +# define BOOST_PP_WHILE_151(p, o, s) BOOST_PP_WHILE_151_I(p, o, s) +# define BOOST_PP_WHILE_152(p, o, s) BOOST_PP_WHILE_152_I(p, o, s) +# define BOOST_PP_WHILE_153(p, o, s) BOOST_PP_WHILE_153_I(p, o, s) +# define BOOST_PP_WHILE_154(p, o, s) BOOST_PP_WHILE_154_I(p, o, s) +# define BOOST_PP_WHILE_155(p, o, s) BOOST_PP_WHILE_155_I(p, o, s) +# define BOOST_PP_WHILE_156(p, o, s) BOOST_PP_WHILE_156_I(p, o, s) +# define BOOST_PP_WHILE_157(p, o, s) BOOST_PP_WHILE_157_I(p, o, s) +# define BOOST_PP_WHILE_158(p, o, s) BOOST_PP_WHILE_158_I(p, o, s) +# define BOOST_PP_WHILE_159(p, o, s) BOOST_PP_WHILE_159_I(p, o, s) +# define BOOST_PP_WHILE_160(p, o, s) BOOST_PP_WHILE_160_I(p, o, s) +# define BOOST_PP_WHILE_161(p, o, s) BOOST_PP_WHILE_161_I(p, o, s) +# define BOOST_PP_WHILE_162(p, o, s) BOOST_PP_WHILE_162_I(p, o, s) +# define BOOST_PP_WHILE_163(p, o, s) BOOST_PP_WHILE_163_I(p, o, s) +# define BOOST_PP_WHILE_164(p, o, s) BOOST_PP_WHILE_164_I(p, o, s) +# define BOOST_PP_WHILE_165(p, o, s) BOOST_PP_WHILE_165_I(p, o, s) +# define BOOST_PP_WHILE_166(p, o, s) BOOST_PP_WHILE_166_I(p, o, s) +# define BOOST_PP_WHILE_167(p, o, s) BOOST_PP_WHILE_167_I(p, o, s) +# define BOOST_PP_WHILE_168(p, o, s) BOOST_PP_WHILE_168_I(p, o, s) +# define BOOST_PP_WHILE_169(p, o, s) BOOST_PP_WHILE_169_I(p, o, s) +# define BOOST_PP_WHILE_170(p, o, s) BOOST_PP_WHILE_170_I(p, o, s) +# define BOOST_PP_WHILE_171(p, o, s) BOOST_PP_WHILE_171_I(p, o, s) +# define BOOST_PP_WHILE_172(p, o, s) BOOST_PP_WHILE_172_I(p, o, s) +# define BOOST_PP_WHILE_173(p, o, s) BOOST_PP_WHILE_173_I(p, o, s) +# define BOOST_PP_WHILE_174(p, o, s) BOOST_PP_WHILE_174_I(p, o, s) +# define BOOST_PP_WHILE_175(p, o, s) BOOST_PP_WHILE_175_I(p, o, s) +# define BOOST_PP_WHILE_176(p, o, s) BOOST_PP_WHILE_176_I(p, o, s) +# define BOOST_PP_WHILE_177(p, o, s) BOOST_PP_WHILE_177_I(p, o, s) +# define BOOST_PP_WHILE_178(p, o, s) BOOST_PP_WHILE_178_I(p, o, s) +# define BOOST_PP_WHILE_179(p, o, s) BOOST_PP_WHILE_179_I(p, o, s) +# define BOOST_PP_WHILE_180(p, o, s) BOOST_PP_WHILE_180_I(p, o, s) +# define BOOST_PP_WHILE_181(p, o, s) BOOST_PP_WHILE_181_I(p, o, s) +# define BOOST_PP_WHILE_182(p, o, s) BOOST_PP_WHILE_182_I(p, o, s) +# define BOOST_PP_WHILE_183(p, o, s) BOOST_PP_WHILE_183_I(p, o, s) +# define BOOST_PP_WHILE_184(p, o, s) BOOST_PP_WHILE_184_I(p, o, s) +# define BOOST_PP_WHILE_185(p, o, s) BOOST_PP_WHILE_185_I(p, o, s) +# define BOOST_PP_WHILE_186(p, o, s) BOOST_PP_WHILE_186_I(p, o, s) +# define BOOST_PP_WHILE_187(p, o, s) BOOST_PP_WHILE_187_I(p, o, s) +# define BOOST_PP_WHILE_188(p, o, s) BOOST_PP_WHILE_188_I(p, o, s) +# define BOOST_PP_WHILE_189(p, o, s) BOOST_PP_WHILE_189_I(p, o, s) +# define BOOST_PP_WHILE_190(p, o, s) BOOST_PP_WHILE_190_I(p, o, s) +# define BOOST_PP_WHILE_191(p, o, s) BOOST_PP_WHILE_191_I(p, o, s) +# define BOOST_PP_WHILE_192(p, o, s) BOOST_PP_WHILE_192_I(p, o, s) +# define BOOST_PP_WHILE_193(p, o, s) BOOST_PP_WHILE_193_I(p, o, s) +# define BOOST_PP_WHILE_194(p, o, s) BOOST_PP_WHILE_194_I(p, o, s) +# define BOOST_PP_WHILE_195(p, o, s) BOOST_PP_WHILE_195_I(p, o, s) +# define BOOST_PP_WHILE_196(p, o, s) BOOST_PP_WHILE_196_I(p, o, s) +# define BOOST_PP_WHILE_197(p, o, s) BOOST_PP_WHILE_197_I(p, o, s) +# define BOOST_PP_WHILE_198(p, o, s) BOOST_PP_WHILE_198_I(p, o, s) +# define BOOST_PP_WHILE_199(p, o, s) BOOST_PP_WHILE_199_I(p, o, s) +# define BOOST_PP_WHILE_200(p, o, s) BOOST_PP_WHILE_200_I(p, o, s) +# define BOOST_PP_WHILE_201(p, o, s) BOOST_PP_WHILE_201_I(p, o, s) +# define BOOST_PP_WHILE_202(p, o, s) BOOST_PP_WHILE_202_I(p, o, s) +# define BOOST_PP_WHILE_203(p, o, s) BOOST_PP_WHILE_203_I(p, o, s) +# define BOOST_PP_WHILE_204(p, o, s) BOOST_PP_WHILE_204_I(p, o, s) +# define BOOST_PP_WHILE_205(p, o, s) BOOST_PP_WHILE_205_I(p, o, s) +# define BOOST_PP_WHILE_206(p, o, s) BOOST_PP_WHILE_206_I(p, o, s) +# define BOOST_PP_WHILE_207(p, o, s) BOOST_PP_WHILE_207_I(p, o, s) +# define BOOST_PP_WHILE_208(p, o, s) BOOST_PP_WHILE_208_I(p, o, s) +# define BOOST_PP_WHILE_209(p, o, s) BOOST_PP_WHILE_209_I(p, o, s) +# define BOOST_PP_WHILE_210(p, o, s) BOOST_PP_WHILE_210_I(p, o, s) +# define BOOST_PP_WHILE_211(p, o, s) BOOST_PP_WHILE_211_I(p, o, s) +# define BOOST_PP_WHILE_212(p, o, s) BOOST_PP_WHILE_212_I(p, o, s) +# define BOOST_PP_WHILE_213(p, o, s) BOOST_PP_WHILE_213_I(p, o, s) +# define BOOST_PP_WHILE_214(p, o, s) BOOST_PP_WHILE_214_I(p, o, s) +# define BOOST_PP_WHILE_215(p, o, s) BOOST_PP_WHILE_215_I(p, o, s) +# define BOOST_PP_WHILE_216(p, o, s) BOOST_PP_WHILE_216_I(p, o, s) +# define BOOST_PP_WHILE_217(p, o, s) BOOST_PP_WHILE_217_I(p, o, s) +# define BOOST_PP_WHILE_218(p, o, s) BOOST_PP_WHILE_218_I(p, o, s) +# define BOOST_PP_WHILE_219(p, o, s) BOOST_PP_WHILE_219_I(p, o, s) +# define BOOST_PP_WHILE_220(p, o, s) BOOST_PP_WHILE_220_I(p, o, s) +# define BOOST_PP_WHILE_221(p, o, s) BOOST_PP_WHILE_221_I(p, o, s) +# define BOOST_PP_WHILE_222(p, o, s) BOOST_PP_WHILE_222_I(p, o, s) +# define BOOST_PP_WHILE_223(p, o, s) BOOST_PP_WHILE_223_I(p, o, s) +# define BOOST_PP_WHILE_224(p, o, s) BOOST_PP_WHILE_224_I(p, o, s) +# define BOOST_PP_WHILE_225(p, o, s) BOOST_PP_WHILE_225_I(p, o, s) +# define BOOST_PP_WHILE_226(p, o, s) BOOST_PP_WHILE_226_I(p, o, s) +# define BOOST_PP_WHILE_227(p, o, s) BOOST_PP_WHILE_227_I(p, o, s) +# define BOOST_PP_WHILE_228(p, o, s) BOOST_PP_WHILE_228_I(p, o, s) +# define BOOST_PP_WHILE_229(p, o, s) BOOST_PP_WHILE_229_I(p, o, s) +# define BOOST_PP_WHILE_230(p, o, s) BOOST_PP_WHILE_230_I(p, o, s) +# define BOOST_PP_WHILE_231(p, o, s) BOOST_PP_WHILE_231_I(p, o, s) +# define BOOST_PP_WHILE_232(p, o, s) BOOST_PP_WHILE_232_I(p, o, s) +# define BOOST_PP_WHILE_233(p, o, s) BOOST_PP_WHILE_233_I(p, o, s) +# define BOOST_PP_WHILE_234(p, o, s) BOOST_PP_WHILE_234_I(p, o, s) +# define BOOST_PP_WHILE_235(p, o, s) BOOST_PP_WHILE_235_I(p, o, s) +# define BOOST_PP_WHILE_236(p, o, s) BOOST_PP_WHILE_236_I(p, o, s) +# define BOOST_PP_WHILE_237(p, o, s) BOOST_PP_WHILE_237_I(p, o, s) +# define BOOST_PP_WHILE_238(p, o, s) BOOST_PP_WHILE_238_I(p, o, s) +# define BOOST_PP_WHILE_239(p, o, s) BOOST_PP_WHILE_239_I(p, o, s) +# define BOOST_PP_WHILE_240(p, o, s) BOOST_PP_WHILE_240_I(p, o, s) +# define BOOST_PP_WHILE_241(p, o, s) BOOST_PP_WHILE_241_I(p, o, s) +# define BOOST_PP_WHILE_242(p, o, s) BOOST_PP_WHILE_242_I(p, o, s) +# define BOOST_PP_WHILE_243(p, o, s) BOOST_PP_WHILE_243_I(p, o, s) +# define BOOST_PP_WHILE_244(p, o, s) BOOST_PP_WHILE_244_I(p, o, s) +# define BOOST_PP_WHILE_245(p, o, s) BOOST_PP_WHILE_245_I(p, o, s) +# define BOOST_PP_WHILE_246(p, o, s) BOOST_PP_WHILE_246_I(p, o, s) +# define BOOST_PP_WHILE_247(p, o, s) BOOST_PP_WHILE_247_I(p, o, s) +# define BOOST_PP_WHILE_248(p, o, s) BOOST_PP_WHILE_248_I(p, o, s) +# define BOOST_PP_WHILE_249(p, o, s) BOOST_PP_WHILE_249_I(p, o, s) +# define BOOST_PP_WHILE_250(p, o, s) BOOST_PP_WHILE_250_I(p, o, s) +# define BOOST_PP_WHILE_251(p, o, s) BOOST_PP_WHILE_251_I(p, o, s) +# define BOOST_PP_WHILE_252(p, o, s) BOOST_PP_WHILE_252_I(p, o, s) +# define BOOST_PP_WHILE_253(p, o, s) BOOST_PP_WHILE_253_I(p, o, s) +# define BOOST_PP_WHILE_254(p, o, s) BOOST_PP_WHILE_254_I(p, o, s) +# define BOOST_PP_WHILE_255(p, o, s) BOOST_PP_WHILE_255_I(p, o, s) +# define BOOST_PP_WHILE_256(p, o, s) BOOST_PP_WHILE_256_I(p, o, s) +# +# define BOOST_PP_WHILE_1_I(p, o, s) BOOST_PP_IF(p(2, s), BOOST_PP_WHILE_2, s BOOST_PP_TUPLE_EAT_3)(p, o, o(2, s)) +# define BOOST_PP_WHILE_2_I(p, o, s) BOOST_PP_IF(p(3, s), BOOST_PP_WHILE_3, s BOOST_PP_TUPLE_EAT_3)(p, o, o(3, s)) +# define BOOST_PP_WHILE_3_I(p, o, s) BOOST_PP_IF(p(4, s), BOOST_PP_WHILE_4, s BOOST_PP_TUPLE_EAT_3)(p, o, o(4, s)) +# define BOOST_PP_WHILE_4_I(p, o, s) BOOST_PP_IF(p(5, s), BOOST_PP_WHILE_5, s BOOST_PP_TUPLE_EAT_3)(p, o, o(5, s)) +# define BOOST_PP_WHILE_5_I(p, o, s) BOOST_PP_IF(p(6, s), BOOST_PP_WHILE_6, s BOOST_PP_TUPLE_EAT_3)(p, o, o(6, s)) +# define BOOST_PP_WHILE_6_I(p, o, s) BOOST_PP_IF(p(7, s), BOOST_PP_WHILE_7, s BOOST_PP_TUPLE_EAT_3)(p, o, o(7, s)) +# define BOOST_PP_WHILE_7_I(p, o, s) BOOST_PP_IF(p(8, s), BOOST_PP_WHILE_8, s BOOST_PP_TUPLE_EAT_3)(p, o, o(8, s)) +# define BOOST_PP_WHILE_8_I(p, o, s) BOOST_PP_IF(p(9, s), BOOST_PP_WHILE_9, s BOOST_PP_TUPLE_EAT_3)(p, o, o(9, s)) +# define BOOST_PP_WHILE_9_I(p, o, s) BOOST_PP_IF(p(10, s), BOOST_PP_WHILE_10, s BOOST_PP_TUPLE_EAT_3)(p, o, o(10, s)) +# define BOOST_PP_WHILE_10_I(p, o, s) BOOST_PP_IF(p(11, s), BOOST_PP_WHILE_11, s BOOST_PP_TUPLE_EAT_3)(p, o, o(11, s)) +# define BOOST_PP_WHILE_11_I(p, o, s) BOOST_PP_IF(p(12, s), BOOST_PP_WHILE_12, s BOOST_PP_TUPLE_EAT_3)(p, o, o(12, s)) +# define BOOST_PP_WHILE_12_I(p, o, s) BOOST_PP_IF(p(13, s), BOOST_PP_WHILE_13, s BOOST_PP_TUPLE_EAT_3)(p, o, o(13, s)) +# define BOOST_PP_WHILE_13_I(p, o, s) BOOST_PP_IF(p(14, s), BOOST_PP_WHILE_14, s BOOST_PP_TUPLE_EAT_3)(p, o, o(14, s)) +# define BOOST_PP_WHILE_14_I(p, o, s) BOOST_PP_IF(p(15, s), BOOST_PP_WHILE_15, s BOOST_PP_TUPLE_EAT_3)(p, o, o(15, s)) +# define BOOST_PP_WHILE_15_I(p, o, s) BOOST_PP_IF(p(16, s), BOOST_PP_WHILE_16, s BOOST_PP_TUPLE_EAT_3)(p, o, o(16, s)) +# define BOOST_PP_WHILE_16_I(p, o, s) BOOST_PP_IF(p(17, s), BOOST_PP_WHILE_17, s BOOST_PP_TUPLE_EAT_3)(p, o, o(17, s)) +# define BOOST_PP_WHILE_17_I(p, o, s) BOOST_PP_IF(p(18, s), BOOST_PP_WHILE_18, s BOOST_PP_TUPLE_EAT_3)(p, o, o(18, s)) +# define BOOST_PP_WHILE_18_I(p, o, s) BOOST_PP_IF(p(19, s), BOOST_PP_WHILE_19, s BOOST_PP_TUPLE_EAT_3)(p, o, o(19, s)) +# define BOOST_PP_WHILE_19_I(p, o, s) BOOST_PP_IF(p(20, s), BOOST_PP_WHILE_20, s BOOST_PP_TUPLE_EAT_3)(p, o, o(20, s)) +# define BOOST_PP_WHILE_20_I(p, o, s) BOOST_PP_IF(p(21, s), BOOST_PP_WHILE_21, s BOOST_PP_TUPLE_EAT_3)(p, o, o(21, s)) +# define BOOST_PP_WHILE_21_I(p, o, s) BOOST_PP_IF(p(22, s), BOOST_PP_WHILE_22, s BOOST_PP_TUPLE_EAT_3)(p, o, o(22, s)) +# define BOOST_PP_WHILE_22_I(p, o, s) BOOST_PP_IF(p(23, s), BOOST_PP_WHILE_23, s BOOST_PP_TUPLE_EAT_3)(p, o, o(23, s)) +# define BOOST_PP_WHILE_23_I(p, o, s) BOOST_PP_IF(p(24, s), BOOST_PP_WHILE_24, s BOOST_PP_TUPLE_EAT_3)(p, o, o(24, s)) +# define BOOST_PP_WHILE_24_I(p, o, s) BOOST_PP_IF(p(25, s), BOOST_PP_WHILE_25, s BOOST_PP_TUPLE_EAT_3)(p, o, o(25, s)) +# define BOOST_PP_WHILE_25_I(p, o, s) BOOST_PP_IF(p(26, s), BOOST_PP_WHILE_26, s BOOST_PP_TUPLE_EAT_3)(p, o, o(26, s)) +# define BOOST_PP_WHILE_26_I(p, o, s) BOOST_PP_IF(p(27, s), BOOST_PP_WHILE_27, s BOOST_PP_TUPLE_EAT_3)(p, o, o(27, s)) +# define BOOST_PP_WHILE_27_I(p, o, s) BOOST_PP_IF(p(28, s), BOOST_PP_WHILE_28, s BOOST_PP_TUPLE_EAT_3)(p, o, o(28, s)) +# define BOOST_PP_WHILE_28_I(p, o, s) BOOST_PP_IF(p(29, s), BOOST_PP_WHILE_29, s BOOST_PP_TUPLE_EAT_3)(p, o, o(29, s)) +# define BOOST_PP_WHILE_29_I(p, o, s) BOOST_PP_IF(p(30, s), BOOST_PP_WHILE_30, s BOOST_PP_TUPLE_EAT_3)(p, o, o(30, s)) +# define BOOST_PP_WHILE_30_I(p, o, s) BOOST_PP_IF(p(31, s), BOOST_PP_WHILE_31, s BOOST_PP_TUPLE_EAT_3)(p, o, o(31, s)) +# define BOOST_PP_WHILE_31_I(p, o, s) BOOST_PP_IF(p(32, s), BOOST_PP_WHILE_32, s BOOST_PP_TUPLE_EAT_3)(p, o, o(32, s)) +# define BOOST_PP_WHILE_32_I(p, o, s) BOOST_PP_IF(p(33, s), BOOST_PP_WHILE_33, s BOOST_PP_TUPLE_EAT_3)(p, o, o(33, s)) +# define BOOST_PP_WHILE_33_I(p, o, s) BOOST_PP_IF(p(34, s), BOOST_PP_WHILE_34, s BOOST_PP_TUPLE_EAT_3)(p, o, o(34, s)) +# define BOOST_PP_WHILE_34_I(p, o, s) BOOST_PP_IF(p(35, s), BOOST_PP_WHILE_35, s BOOST_PP_TUPLE_EAT_3)(p, o, o(35, s)) +# define BOOST_PP_WHILE_35_I(p, o, s) BOOST_PP_IF(p(36, s), BOOST_PP_WHILE_36, s BOOST_PP_TUPLE_EAT_3)(p, o, o(36, s)) +# define BOOST_PP_WHILE_36_I(p, o, s) BOOST_PP_IF(p(37, s), BOOST_PP_WHILE_37, s BOOST_PP_TUPLE_EAT_3)(p, o, o(37, s)) +# define BOOST_PP_WHILE_37_I(p, o, s) BOOST_PP_IF(p(38, s), BOOST_PP_WHILE_38, s BOOST_PP_TUPLE_EAT_3)(p, o, o(38, s)) +# define BOOST_PP_WHILE_38_I(p, o, s) BOOST_PP_IF(p(39, s), BOOST_PP_WHILE_39, s BOOST_PP_TUPLE_EAT_3)(p, o, o(39, s)) +# define BOOST_PP_WHILE_39_I(p, o, s) BOOST_PP_IF(p(40, s), BOOST_PP_WHILE_40, s BOOST_PP_TUPLE_EAT_3)(p, o, o(40, s)) +# define BOOST_PP_WHILE_40_I(p, o, s) BOOST_PP_IF(p(41, s), BOOST_PP_WHILE_41, s BOOST_PP_TUPLE_EAT_3)(p, o, o(41, s)) +# define BOOST_PP_WHILE_41_I(p, o, s) BOOST_PP_IF(p(42, s), BOOST_PP_WHILE_42, s BOOST_PP_TUPLE_EAT_3)(p, o, o(42, s)) +# define BOOST_PP_WHILE_42_I(p, o, s) BOOST_PP_IF(p(43, s), BOOST_PP_WHILE_43, s BOOST_PP_TUPLE_EAT_3)(p, o, o(43, s)) +# define BOOST_PP_WHILE_43_I(p, o, s) BOOST_PP_IF(p(44, s), BOOST_PP_WHILE_44, s BOOST_PP_TUPLE_EAT_3)(p, o, o(44, s)) +# define BOOST_PP_WHILE_44_I(p, o, s) BOOST_PP_IF(p(45, s), BOOST_PP_WHILE_45, s BOOST_PP_TUPLE_EAT_3)(p, o, o(45, s)) +# define BOOST_PP_WHILE_45_I(p, o, s) BOOST_PP_IF(p(46, s), BOOST_PP_WHILE_46, s BOOST_PP_TUPLE_EAT_3)(p, o, o(46, s)) +# define BOOST_PP_WHILE_46_I(p, o, s) BOOST_PP_IF(p(47, s), BOOST_PP_WHILE_47, s BOOST_PP_TUPLE_EAT_3)(p, o, o(47, s)) +# define BOOST_PP_WHILE_47_I(p, o, s) BOOST_PP_IF(p(48, s), BOOST_PP_WHILE_48, s BOOST_PP_TUPLE_EAT_3)(p, o, o(48, s)) +# define BOOST_PP_WHILE_48_I(p, o, s) BOOST_PP_IF(p(49, s), BOOST_PP_WHILE_49, s BOOST_PP_TUPLE_EAT_3)(p, o, o(49, s)) +# define BOOST_PP_WHILE_49_I(p, o, s) BOOST_PP_IF(p(50, s), BOOST_PP_WHILE_50, s BOOST_PP_TUPLE_EAT_3)(p, o, o(50, s)) +# define BOOST_PP_WHILE_50_I(p, o, s) BOOST_PP_IF(p(51, s), BOOST_PP_WHILE_51, s BOOST_PP_TUPLE_EAT_3)(p, o, o(51, s)) +# define BOOST_PP_WHILE_51_I(p, o, s) BOOST_PP_IF(p(52, s), BOOST_PP_WHILE_52, s BOOST_PP_TUPLE_EAT_3)(p, o, o(52, s)) +# define BOOST_PP_WHILE_52_I(p, o, s) BOOST_PP_IF(p(53, s), BOOST_PP_WHILE_53, s BOOST_PP_TUPLE_EAT_3)(p, o, o(53, s)) +# define BOOST_PP_WHILE_53_I(p, o, s) BOOST_PP_IF(p(54, s), BOOST_PP_WHILE_54, s BOOST_PP_TUPLE_EAT_3)(p, o, o(54, s)) +# define BOOST_PP_WHILE_54_I(p, o, s) BOOST_PP_IF(p(55, s), BOOST_PP_WHILE_55, s BOOST_PP_TUPLE_EAT_3)(p, o, o(55, s)) +# define BOOST_PP_WHILE_55_I(p, o, s) BOOST_PP_IF(p(56, s), BOOST_PP_WHILE_56, s BOOST_PP_TUPLE_EAT_3)(p, o, o(56, s)) +# define BOOST_PP_WHILE_56_I(p, o, s) BOOST_PP_IF(p(57, s), BOOST_PP_WHILE_57, s BOOST_PP_TUPLE_EAT_3)(p, o, o(57, s)) +# define BOOST_PP_WHILE_57_I(p, o, s) BOOST_PP_IF(p(58, s), BOOST_PP_WHILE_58, s BOOST_PP_TUPLE_EAT_3)(p, o, o(58, s)) +# define BOOST_PP_WHILE_58_I(p, o, s) BOOST_PP_IF(p(59, s), BOOST_PP_WHILE_59, s BOOST_PP_TUPLE_EAT_3)(p, o, o(59, s)) +# define BOOST_PP_WHILE_59_I(p, o, s) BOOST_PP_IF(p(60, s), BOOST_PP_WHILE_60, s BOOST_PP_TUPLE_EAT_3)(p, o, o(60, s)) +# define BOOST_PP_WHILE_60_I(p, o, s) BOOST_PP_IF(p(61, s), BOOST_PP_WHILE_61, s BOOST_PP_TUPLE_EAT_3)(p, o, o(61, s)) +# define BOOST_PP_WHILE_61_I(p, o, s) BOOST_PP_IF(p(62, s), BOOST_PP_WHILE_62, s BOOST_PP_TUPLE_EAT_3)(p, o, o(62, s)) +# define BOOST_PP_WHILE_62_I(p, o, s) BOOST_PP_IF(p(63, s), BOOST_PP_WHILE_63, s BOOST_PP_TUPLE_EAT_3)(p, o, o(63, s)) +# define BOOST_PP_WHILE_63_I(p, o, s) BOOST_PP_IF(p(64, s), BOOST_PP_WHILE_64, s BOOST_PP_TUPLE_EAT_3)(p, o, o(64, s)) +# define BOOST_PP_WHILE_64_I(p, o, s) BOOST_PP_IF(p(65, s), BOOST_PP_WHILE_65, s BOOST_PP_TUPLE_EAT_3)(p, o, o(65, s)) +# define BOOST_PP_WHILE_65_I(p, o, s) BOOST_PP_IF(p(66, s), BOOST_PP_WHILE_66, s BOOST_PP_TUPLE_EAT_3)(p, o, o(66, s)) +# define BOOST_PP_WHILE_66_I(p, o, s) BOOST_PP_IF(p(67, s), BOOST_PP_WHILE_67, s BOOST_PP_TUPLE_EAT_3)(p, o, o(67, s)) +# define BOOST_PP_WHILE_67_I(p, o, s) BOOST_PP_IF(p(68, s), BOOST_PP_WHILE_68, s BOOST_PP_TUPLE_EAT_3)(p, o, o(68, s)) +# define BOOST_PP_WHILE_68_I(p, o, s) BOOST_PP_IF(p(69, s), BOOST_PP_WHILE_69, s BOOST_PP_TUPLE_EAT_3)(p, o, o(69, s)) +# define BOOST_PP_WHILE_69_I(p, o, s) BOOST_PP_IF(p(70, s), BOOST_PP_WHILE_70, s BOOST_PP_TUPLE_EAT_3)(p, o, o(70, s)) +# define BOOST_PP_WHILE_70_I(p, o, s) BOOST_PP_IF(p(71, s), BOOST_PP_WHILE_71, s BOOST_PP_TUPLE_EAT_3)(p, o, o(71, s)) +# define BOOST_PP_WHILE_71_I(p, o, s) BOOST_PP_IF(p(72, s), BOOST_PP_WHILE_72, s BOOST_PP_TUPLE_EAT_3)(p, o, o(72, s)) +# define BOOST_PP_WHILE_72_I(p, o, s) BOOST_PP_IF(p(73, s), BOOST_PP_WHILE_73, s BOOST_PP_TUPLE_EAT_3)(p, o, o(73, s)) +# define BOOST_PP_WHILE_73_I(p, o, s) BOOST_PP_IF(p(74, s), BOOST_PP_WHILE_74, s BOOST_PP_TUPLE_EAT_3)(p, o, o(74, s)) +# define BOOST_PP_WHILE_74_I(p, o, s) BOOST_PP_IF(p(75, s), BOOST_PP_WHILE_75, s BOOST_PP_TUPLE_EAT_3)(p, o, o(75, s)) +# define BOOST_PP_WHILE_75_I(p, o, s) BOOST_PP_IF(p(76, s), BOOST_PP_WHILE_76, s BOOST_PP_TUPLE_EAT_3)(p, o, o(76, s)) +# define BOOST_PP_WHILE_76_I(p, o, s) BOOST_PP_IF(p(77, s), BOOST_PP_WHILE_77, s BOOST_PP_TUPLE_EAT_3)(p, o, o(77, s)) +# define BOOST_PP_WHILE_77_I(p, o, s) BOOST_PP_IF(p(78, s), BOOST_PP_WHILE_78, s BOOST_PP_TUPLE_EAT_3)(p, o, o(78, s)) +# define BOOST_PP_WHILE_78_I(p, o, s) BOOST_PP_IF(p(79, s), BOOST_PP_WHILE_79, s BOOST_PP_TUPLE_EAT_3)(p, o, o(79, s)) +# define BOOST_PP_WHILE_79_I(p, o, s) BOOST_PP_IF(p(80, s), BOOST_PP_WHILE_80, s BOOST_PP_TUPLE_EAT_3)(p, o, o(80, s)) +# define BOOST_PP_WHILE_80_I(p, o, s) BOOST_PP_IF(p(81, s), BOOST_PP_WHILE_81, s BOOST_PP_TUPLE_EAT_3)(p, o, o(81, s)) +# define BOOST_PP_WHILE_81_I(p, o, s) BOOST_PP_IF(p(82, s), BOOST_PP_WHILE_82, s BOOST_PP_TUPLE_EAT_3)(p, o, o(82, s)) +# define BOOST_PP_WHILE_82_I(p, o, s) BOOST_PP_IF(p(83, s), BOOST_PP_WHILE_83, s BOOST_PP_TUPLE_EAT_3)(p, o, o(83, s)) +# define BOOST_PP_WHILE_83_I(p, o, s) BOOST_PP_IF(p(84, s), BOOST_PP_WHILE_84, s BOOST_PP_TUPLE_EAT_3)(p, o, o(84, s)) +# define BOOST_PP_WHILE_84_I(p, o, s) BOOST_PP_IF(p(85, s), BOOST_PP_WHILE_85, s BOOST_PP_TUPLE_EAT_3)(p, o, o(85, s)) +# define BOOST_PP_WHILE_85_I(p, o, s) BOOST_PP_IF(p(86, s), BOOST_PP_WHILE_86, s BOOST_PP_TUPLE_EAT_3)(p, o, o(86, s)) +# define BOOST_PP_WHILE_86_I(p, o, s) BOOST_PP_IF(p(87, s), BOOST_PP_WHILE_87, s BOOST_PP_TUPLE_EAT_3)(p, o, o(87, s)) +# define BOOST_PP_WHILE_87_I(p, o, s) BOOST_PP_IF(p(88, s), BOOST_PP_WHILE_88, s BOOST_PP_TUPLE_EAT_3)(p, o, o(88, s)) +# define BOOST_PP_WHILE_88_I(p, o, s) BOOST_PP_IF(p(89, s), BOOST_PP_WHILE_89, s BOOST_PP_TUPLE_EAT_3)(p, o, o(89, s)) +# define BOOST_PP_WHILE_89_I(p, o, s) BOOST_PP_IF(p(90, s), BOOST_PP_WHILE_90, s BOOST_PP_TUPLE_EAT_3)(p, o, o(90, s)) +# define BOOST_PP_WHILE_90_I(p, o, s) BOOST_PP_IF(p(91, s), BOOST_PP_WHILE_91, s BOOST_PP_TUPLE_EAT_3)(p, o, o(91, s)) +# define BOOST_PP_WHILE_91_I(p, o, s) BOOST_PP_IF(p(92, s), BOOST_PP_WHILE_92, s BOOST_PP_TUPLE_EAT_3)(p, o, o(92, s)) +# define BOOST_PP_WHILE_92_I(p, o, s) BOOST_PP_IF(p(93, s), BOOST_PP_WHILE_93, s BOOST_PP_TUPLE_EAT_3)(p, o, o(93, s)) +# define BOOST_PP_WHILE_93_I(p, o, s) BOOST_PP_IF(p(94, s), BOOST_PP_WHILE_94, s BOOST_PP_TUPLE_EAT_3)(p, o, o(94, s)) +# define BOOST_PP_WHILE_94_I(p, o, s) BOOST_PP_IF(p(95, s), BOOST_PP_WHILE_95, s BOOST_PP_TUPLE_EAT_3)(p, o, o(95, s)) +# define BOOST_PP_WHILE_95_I(p, o, s) BOOST_PP_IF(p(96, s), BOOST_PP_WHILE_96, s BOOST_PP_TUPLE_EAT_3)(p, o, o(96, s)) +# define BOOST_PP_WHILE_96_I(p, o, s) BOOST_PP_IF(p(97, s), BOOST_PP_WHILE_97, s BOOST_PP_TUPLE_EAT_3)(p, o, o(97, s)) +# define BOOST_PP_WHILE_97_I(p, o, s) BOOST_PP_IF(p(98, s), BOOST_PP_WHILE_98, s BOOST_PP_TUPLE_EAT_3)(p, o, o(98, s)) +# define BOOST_PP_WHILE_98_I(p, o, s) BOOST_PP_IF(p(99, s), BOOST_PP_WHILE_99, s BOOST_PP_TUPLE_EAT_3)(p, o, o(99, s)) +# define BOOST_PP_WHILE_99_I(p, o, s) BOOST_PP_IF(p(100, s), BOOST_PP_WHILE_100, s BOOST_PP_TUPLE_EAT_3)(p, o, o(100, s)) +# define BOOST_PP_WHILE_100_I(p, o, s) BOOST_PP_IF(p(101, s), BOOST_PP_WHILE_101, s BOOST_PP_TUPLE_EAT_3)(p, o, o(101, s)) +# define BOOST_PP_WHILE_101_I(p, o, s) BOOST_PP_IF(p(102, s), BOOST_PP_WHILE_102, s BOOST_PP_TUPLE_EAT_3)(p, o, o(102, s)) +# define BOOST_PP_WHILE_102_I(p, o, s) BOOST_PP_IF(p(103, s), BOOST_PP_WHILE_103, s BOOST_PP_TUPLE_EAT_3)(p, o, o(103, s)) +# define BOOST_PP_WHILE_103_I(p, o, s) BOOST_PP_IF(p(104, s), BOOST_PP_WHILE_104, s BOOST_PP_TUPLE_EAT_3)(p, o, o(104, s)) +# define BOOST_PP_WHILE_104_I(p, o, s) BOOST_PP_IF(p(105, s), BOOST_PP_WHILE_105, s BOOST_PP_TUPLE_EAT_3)(p, o, o(105, s)) +# define BOOST_PP_WHILE_105_I(p, o, s) BOOST_PP_IF(p(106, s), BOOST_PP_WHILE_106, s BOOST_PP_TUPLE_EAT_3)(p, o, o(106, s)) +# define BOOST_PP_WHILE_106_I(p, o, s) BOOST_PP_IF(p(107, s), BOOST_PP_WHILE_107, s BOOST_PP_TUPLE_EAT_3)(p, o, o(107, s)) +# define BOOST_PP_WHILE_107_I(p, o, s) BOOST_PP_IF(p(108, s), BOOST_PP_WHILE_108, s BOOST_PP_TUPLE_EAT_3)(p, o, o(108, s)) +# define BOOST_PP_WHILE_108_I(p, o, s) BOOST_PP_IF(p(109, s), BOOST_PP_WHILE_109, s BOOST_PP_TUPLE_EAT_3)(p, o, o(109, s)) +# define BOOST_PP_WHILE_109_I(p, o, s) BOOST_PP_IF(p(110, s), BOOST_PP_WHILE_110, s BOOST_PP_TUPLE_EAT_3)(p, o, o(110, s)) +# define BOOST_PP_WHILE_110_I(p, o, s) BOOST_PP_IF(p(111, s), BOOST_PP_WHILE_111, s BOOST_PP_TUPLE_EAT_3)(p, o, o(111, s)) +# define BOOST_PP_WHILE_111_I(p, o, s) BOOST_PP_IF(p(112, s), BOOST_PP_WHILE_112, s BOOST_PP_TUPLE_EAT_3)(p, o, o(112, s)) +# define BOOST_PP_WHILE_112_I(p, o, s) BOOST_PP_IF(p(113, s), BOOST_PP_WHILE_113, s BOOST_PP_TUPLE_EAT_3)(p, o, o(113, s)) +# define BOOST_PP_WHILE_113_I(p, o, s) BOOST_PP_IF(p(114, s), BOOST_PP_WHILE_114, s BOOST_PP_TUPLE_EAT_3)(p, o, o(114, s)) +# define BOOST_PP_WHILE_114_I(p, o, s) BOOST_PP_IF(p(115, s), BOOST_PP_WHILE_115, s BOOST_PP_TUPLE_EAT_3)(p, o, o(115, s)) +# define BOOST_PP_WHILE_115_I(p, o, s) BOOST_PP_IF(p(116, s), BOOST_PP_WHILE_116, s BOOST_PP_TUPLE_EAT_3)(p, o, o(116, s)) +# define BOOST_PP_WHILE_116_I(p, o, s) BOOST_PP_IF(p(117, s), BOOST_PP_WHILE_117, s BOOST_PP_TUPLE_EAT_3)(p, o, o(117, s)) +# define BOOST_PP_WHILE_117_I(p, o, s) BOOST_PP_IF(p(118, s), BOOST_PP_WHILE_118, s BOOST_PP_TUPLE_EAT_3)(p, o, o(118, s)) +# define BOOST_PP_WHILE_118_I(p, o, s) BOOST_PP_IF(p(119, s), BOOST_PP_WHILE_119, s BOOST_PP_TUPLE_EAT_3)(p, o, o(119, s)) +# define BOOST_PP_WHILE_119_I(p, o, s) BOOST_PP_IF(p(120, s), BOOST_PP_WHILE_120, s BOOST_PP_TUPLE_EAT_3)(p, o, o(120, s)) +# define BOOST_PP_WHILE_120_I(p, o, s) BOOST_PP_IF(p(121, s), BOOST_PP_WHILE_121, s BOOST_PP_TUPLE_EAT_3)(p, o, o(121, s)) +# define BOOST_PP_WHILE_121_I(p, o, s) BOOST_PP_IF(p(122, s), BOOST_PP_WHILE_122, s BOOST_PP_TUPLE_EAT_3)(p, o, o(122, s)) +# define BOOST_PP_WHILE_122_I(p, o, s) BOOST_PP_IF(p(123, s), BOOST_PP_WHILE_123, s BOOST_PP_TUPLE_EAT_3)(p, o, o(123, s)) +# define BOOST_PP_WHILE_123_I(p, o, s) BOOST_PP_IF(p(124, s), BOOST_PP_WHILE_124, s BOOST_PP_TUPLE_EAT_3)(p, o, o(124, s)) +# define BOOST_PP_WHILE_124_I(p, o, s) BOOST_PP_IF(p(125, s), BOOST_PP_WHILE_125, s BOOST_PP_TUPLE_EAT_3)(p, o, o(125, s)) +# define BOOST_PP_WHILE_125_I(p, o, s) BOOST_PP_IF(p(126, s), BOOST_PP_WHILE_126, s BOOST_PP_TUPLE_EAT_3)(p, o, o(126, s)) +# define BOOST_PP_WHILE_126_I(p, o, s) BOOST_PP_IF(p(127, s), BOOST_PP_WHILE_127, s BOOST_PP_TUPLE_EAT_3)(p, o, o(127, s)) +# define BOOST_PP_WHILE_127_I(p, o, s) BOOST_PP_IF(p(128, s), BOOST_PP_WHILE_128, s BOOST_PP_TUPLE_EAT_3)(p, o, o(128, s)) +# define BOOST_PP_WHILE_128_I(p, o, s) BOOST_PP_IF(p(129, s), BOOST_PP_WHILE_129, s BOOST_PP_TUPLE_EAT_3)(p, o, o(129, s)) +# define BOOST_PP_WHILE_129_I(p, o, s) BOOST_PP_IF(p(130, s), BOOST_PP_WHILE_130, s BOOST_PP_TUPLE_EAT_3)(p, o, o(130, s)) +# define BOOST_PP_WHILE_130_I(p, o, s) BOOST_PP_IF(p(131, s), BOOST_PP_WHILE_131, s BOOST_PP_TUPLE_EAT_3)(p, o, o(131, s)) +# define BOOST_PP_WHILE_131_I(p, o, s) BOOST_PP_IF(p(132, s), BOOST_PP_WHILE_132, s BOOST_PP_TUPLE_EAT_3)(p, o, o(132, s)) +# define BOOST_PP_WHILE_132_I(p, o, s) BOOST_PP_IF(p(133, s), BOOST_PP_WHILE_133, s BOOST_PP_TUPLE_EAT_3)(p, o, o(133, s)) +# define BOOST_PP_WHILE_133_I(p, o, s) BOOST_PP_IF(p(134, s), BOOST_PP_WHILE_134, s BOOST_PP_TUPLE_EAT_3)(p, o, o(134, s)) +# define BOOST_PP_WHILE_134_I(p, o, s) BOOST_PP_IF(p(135, s), BOOST_PP_WHILE_135, s BOOST_PP_TUPLE_EAT_3)(p, o, o(135, s)) +# define BOOST_PP_WHILE_135_I(p, o, s) BOOST_PP_IF(p(136, s), BOOST_PP_WHILE_136, s BOOST_PP_TUPLE_EAT_3)(p, o, o(136, s)) +# define BOOST_PP_WHILE_136_I(p, o, s) BOOST_PP_IF(p(137, s), BOOST_PP_WHILE_137, s BOOST_PP_TUPLE_EAT_3)(p, o, o(137, s)) +# define BOOST_PP_WHILE_137_I(p, o, s) BOOST_PP_IF(p(138, s), BOOST_PP_WHILE_138, s BOOST_PP_TUPLE_EAT_3)(p, o, o(138, s)) +# define BOOST_PP_WHILE_138_I(p, o, s) BOOST_PP_IF(p(139, s), BOOST_PP_WHILE_139, s BOOST_PP_TUPLE_EAT_3)(p, o, o(139, s)) +# define BOOST_PP_WHILE_139_I(p, o, s) BOOST_PP_IF(p(140, s), BOOST_PP_WHILE_140, s BOOST_PP_TUPLE_EAT_3)(p, o, o(140, s)) +# define BOOST_PP_WHILE_140_I(p, o, s) BOOST_PP_IF(p(141, s), BOOST_PP_WHILE_141, s BOOST_PP_TUPLE_EAT_3)(p, o, o(141, s)) +# define BOOST_PP_WHILE_141_I(p, o, s) BOOST_PP_IF(p(142, s), BOOST_PP_WHILE_142, s BOOST_PP_TUPLE_EAT_3)(p, o, o(142, s)) +# define BOOST_PP_WHILE_142_I(p, o, s) BOOST_PP_IF(p(143, s), BOOST_PP_WHILE_143, s BOOST_PP_TUPLE_EAT_3)(p, o, o(143, s)) +# define BOOST_PP_WHILE_143_I(p, o, s) BOOST_PP_IF(p(144, s), BOOST_PP_WHILE_144, s BOOST_PP_TUPLE_EAT_3)(p, o, o(144, s)) +# define BOOST_PP_WHILE_144_I(p, o, s) BOOST_PP_IF(p(145, s), BOOST_PP_WHILE_145, s BOOST_PP_TUPLE_EAT_3)(p, o, o(145, s)) +# define BOOST_PP_WHILE_145_I(p, o, s) BOOST_PP_IF(p(146, s), BOOST_PP_WHILE_146, s BOOST_PP_TUPLE_EAT_3)(p, o, o(146, s)) +# define BOOST_PP_WHILE_146_I(p, o, s) BOOST_PP_IF(p(147, s), BOOST_PP_WHILE_147, s BOOST_PP_TUPLE_EAT_3)(p, o, o(147, s)) +# define BOOST_PP_WHILE_147_I(p, o, s) BOOST_PP_IF(p(148, s), BOOST_PP_WHILE_148, s BOOST_PP_TUPLE_EAT_3)(p, o, o(148, s)) +# define BOOST_PP_WHILE_148_I(p, o, s) BOOST_PP_IF(p(149, s), BOOST_PP_WHILE_149, s BOOST_PP_TUPLE_EAT_3)(p, o, o(149, s)) +# define BOOST_PP_WHILE_149_I(p, o, s) BOOST_PP_IF(p(150, s), BOOST_PP_WHILE_150, s BOOST_PP_TUPLE_EAT_3)(p, o, o(150, s)) +# define BOOST_PP_WHILE_150_I(p, o, s) BOOST_PP_IF(p(151, s), BOOST_PP_WHILE_151, s BOOST_PP_TUPLE_EAT_3)(p, o, o(151, s)) +# define BOOST_PP_WHILE_151_I(p, o, s) BOOST_PP_IF(p(152, s), BOOST_PP_WHILE_152, s BOOST_PP_TUPLE_EAT_3)(p, o, o(152, s)) +# define BOOST_PP_WHILE_152_I(p, o, s) BOOST_PP_IF(p(153, s), BOOST_PP_WHILE_153, s BOOST_PP_TUPLE_EAT_3)(p, o, o(153, s)) +# define BOOST_PP_WHILE_153_I(p, o, s) BOOST_PP_IF(p(154, s), BOOST_PP_WHILE_154, s BOOST_PP_TUPLE_EAT_3)(p, o, o(154, s)) +# define BOOST_PP_WHILE_154_I(p, o, s) BOOST_PP_IF(p(155, s), BOOST_PP_WHILE_155, s BOOST_PP_TUPLE_EAT_3)(p, o, o(155, s)) +# define BOOST_PP_WHILE_155_I(p, o, s) BOOST_PP_IF(p(156, s), BOOST_PP_WHILE_156, s BOOST_PP_TUPLE_EAT_3)(p, o, o(156, s)) +# define BOOST_PP_WHILE_156_I(p, o, s) BOOST_PP_IF(p(157, s), BOOST_PP_WHILE_157, s BOOST_PP_TUPLE_EAT_3)(p, o, o(157, s)) +# define BOOST_PP_WHILE_157_I(p, o, s) BOOST_PP_IF(p(158, s), BOOST_PP_WHILE_158, s BOOST_PP_TUPLE_EAT_3)(p, o, o(158, s)) +# define BOOST_PP_WHILE_158_I(p, o, s) BOOST_PP_IF(p(159, s), BOOST_PP_WHILE_159, s BOOST_PP_TUPLE_EAT_3)(p, o, o(159, s)) +# define BOOST_PP_WHILE_159_I(p, o, s) BOOST_PP_IF(p(160, s), BOOST_PP_WHILE_160, s BOOST_PP_TUPLE_EAT_3)(p, o, o(160, s)) +# define BOOST_PP_WHILE_160_I(p, o, s) BOOST_PP_IF(p(161, s), BOOST_PP_WHILE_161, s BOOST_PP_TUPLE_EAT_3)(p, o, o(161, s)) +# define BOOST_PP_WHILE_161_I(p, o, s) BOOST_PP_IF(p(162, s), BOOST_PP_WHILE_162, s BOOST_PP_TUPLE_EAT_3)(p, o, o(162, s)) +# define BOOST_PP_WHILE_162_I(p, o, s) BOOST_PP_IF(p(163, s), BOOST_PP_WHILE_163, s BOOST_PP_TUPLE_EAT_3)(p, o, o(163, s)) +# define BOOST_PP_WHILE_163_I(p, o, s) BOOST_PP_IF(p(164, s), BOOST_PP_WHILE_164, s BOOST_PP_TUPLE_EAT_3)(p, o, o(164, s)) +# define BOOST_PP_WHILE_164_I(p, o, s) BOOST_PP_IF(p(165, s), BOOST_PP_WHILE_165, s BOOST_PP_TUPLE_EAT_3)(p, o, o(165, s)) +# define BOOST_PP_WHILE_165_I(p, o, s) BOOST_PP_IF(p(166, s), BOOST_PP_WHILE_166, s BOOST_PP_TUPLE_EAT_3)(p, o, o(166, s)) +# define BOOST_PP_WHILE_166_I(p, o, s) BOOST_PP_IF(p(167, s), BOOST_PP_WHILE_167, s BOOST_PP_TUPLE_EAT_3)(p, o, o(167, s)) +# define BOOST_PP_WHILE_167_I(p, o, s) BOOST_PP_IF(p(168, s), BOOST_PP_WHILE_168, s BOOST_PP_TUPLE_EAT_3)(p, o, o(168, s)) +# define BOOST_PP_WHILE_168_I(p, o, s) BOOST_PP_IF(p(169, s), BOOST_PP_WHILE_169, s BOOST_PP_TUPLE_EAT_3)(p, o, o(169, s)) +# define BOOST_PP_WHILE_169_I(p, o, s) BOOST_PP_IF(p(170, s), BOOST_PP_WHILE_170, s BOOST_PP_TUPLE_EAT_3)(p, o, o(170, s)) +# define BOOST_PP_WHILE_170_I(p, o, s) BOOST_PP_IF(p(171, s), BOOST_PP_WHILE_171, s BOOST_PP_TUPLE_EAT_3)(p, o, o(171, s)) +# define BOOST_PP_WHILE_171_I(p, o, s) BOOST_PP_IF(p(172, s), BOOST_PP_WHILE_172, s BOOST_PP_TUPLE_EAT_3)(p, o, o(172, s)) +# define BOOST_PP_WHILE_172_I(p, o, s) BOOST_PP_IF(p(173, s), BOOST_PP_WHILE_173, s BOOST_PP_TUPLE_EAT_3)(p, o, o(173, s)) +# define BOOST_PP_WHILE_173_I(p, o, s) BOOST_PP_IF(p(174, s), BOOST_PP_WHILE_174, s BOOST_PP_TUPLE_EAT_3)(p, o, o(174, s)) +# define BOOST_PP_WHILE_174_I(p, o, s) BOOST_PP_IF(p(175, s), BOOST_PP_WHILE_175, s BOOST_PP_TUPLE_EAT_3)(p, o, o(175, s)) +# define BOOST_PP_WHILE_175_I(p, o, s) BOOST_PP_IF(p(176, s), BOOST_PP_WHILE_176, s BOOST_PP_TUPLE_EAT_3)(p, o, o(176, s)) +# define BOOST_PP_WHILE_176_I(p, o, s) BOOST_PP_IF(p(177, s), BOOST_PP_WHILE_177, s BOOST_PP_TUPLE_EAT_3)(p, o, o(177, s)) +# define BOOST_PP_WHILE_177_I(p, o, s) BOOST_PP_IF(p(178, s), BOOST_PP_WHILE_178, s BOOST_PP_TUPLE_EAT_3)(p, o, o(178, s)) +# define BOOST_PP_WHILE_178_I(p, o, s) BOOST_PP_IF(p(179, s), BOOST_PP_WHILE_179, s BOOST_PP_TUPLE_EAT_3)(p, o, o(179, s)) +# define BOOST_PP_WHILE_179_I(p, o, s) BOOST_PP_IF(p(180, s), BOOST_PP_WHILE_180, s BOOST_PP_TUPLE_EAT_3)(p, o, o(180, s)) +# define BOOST_PP_WHILE_180_I(p, o, s) BOOST_PP_IF(p(181, s), BOOST_PP_WHILE_181, s BOOST_PP_TUPLE_EAT_3)(p, o, o(181, s)) +# define BOOST_PP_WHILE_181_I(p, o, s) BOOST_PP_IF(p(182, s), BOOST_PP_WHILE_182, s BOOST_PP_TUPLE_EAT_3)(p, o, o(182, s)) +# define BOOST_PP_WHILE_182_I(p, o, s) BOOST_PP_IF(p(183, s), BOOST_PP_WHILE_183, s BOOST_PP_TUPLE_EAT_3)(p, o, o(183, s)) +# define BOOST_PP_WHILE_183_I(p, o, s) BOOST_PP_IF(p(184, s), BOOST_PP_WHILE_184, s BOOST_PP_TUPLE_EAT_3)(p, o, o(184, s)) +# define BOOST_PP_WHILE_184_I(p, o, s) BOOST_PP_IF(p(185, s), BOOST_PP_WHILE_185, s BOOST_PP_TUPLE_EAT_3)(p, o, o(185, s)) +# define BOOST_PP_WHILE_185_I(p, o, s) BOOST_PP_IF(p(186, s), BOOST_PP_WHILE_186, s BOOST_PP_TUPLE_EAT_3)(p, o, o(186, s)) +# define BOOST_PP_WHILE_186_I(p, o, s) BOOST_PP_IF(p(187, s), BOOST_PP_WHILE_187, s BOOST_PP_TUPLE_EAT_3)(p, o, o(187, s)) +# define BOOST_PP_WHILE_187_I(p, o, s) BOOST_PP_IF(p(188, s), BOOST_PP_WHILE_188, s BOOST_PP_TUPLE_EAT_3)(p, o, o(188, s)) +# define BOOST_PP_WHILE_188_I(p, o, s) BOOST_PP_IF(p(189, s), BOOST_PP_WHILE_189, s BOOST_PP_TUPLE_EAT_3)(p, o, o(189, s)) +# define BOOST_PP_WHILE_189_I(p, o, s) BOOST_PP_IF(p(190, s), BOOST_PP_WHILE_190, s BOOST_PP_TUPLE_EAT_3)(p, o, o(190, s)) +# define BOOST_PP_WHILE_190_I(p, o, s) BOOST_PP_IF(p(191, s), BOOST_PP_WHILE_191, s BOOST_PP_TUPLE_EAT_3)(p, o, o(191, s)) +# define BOOST_PP_WHILE_191_I(p, o, s) BOOST_PP_IF(p(192, s), BOOST_PP_WHILE_192, s BOOST_PP_TUPLE_EAT_3)(p, o, o(192, s)) +# define BOOST_PP_WHILE_192_I(p, o, s) BOOST_PP_IF(p(193, s), BOOST_PP_WHILE_193, s BOOST_PP_TUPLE_EAT_3)(p, o, o(193, s)) +# define BOOST_PP_WHILE_193_I(p, o, s) BOOST_PP_IF(p(194, s), BOOST_PP_WHILE_194, s BOOST_PP_TUPLE_EAT_3)(p, o, o(194, s)) +# define BOOST_PP_WHILE_194_I(p, o, s) BOOST_PP_IF(p(195, s), BOOST_PP_WHILE_195, s BOOST_PP_TUPLE_EAT_3)(p, o, o(195, s)) +# define BOOST_PP_WHILE_195_I(p, o, s) BOOST_PP_IF(p(196, s), BOOST_PP_WHILE_196, s BOOST_PP_TUPLE_EAT_3)(p, o, o(196, s)) +# define BOOST_PP_WHILE_196_I(p, o, s) BOOST_PP_IF(p(197, s), BOOST_PP_WHILE_197, s BOOST_PP_TUPLE_EAT_3)(p, o, o(197, s)) +# define BOOST_PP_WHILE_197_I(p, o, s) BOOST_PP_IF(p(198, s), BOOST_PP_WHILE_198, s BOOST_PP_TUPLE_EAT_3)(p, o, o(198, s)) +# define BOOST_PP_WHILE_198_I(p, o, s) BOOST_PP_IF(p(199, s), BOOST_PP_WHILE_199, s BOOST_PP_TUPLE_EAT_3)(p, o, o(199, s)) +# define BOOST_PP_WHILE_199_I(p, o, s) BOOST_PP_IF(p(200, s), BOOST_PP_WHILE_200, s BOOST_PP_TUPLE_EAT_3)(p, o, o(200, s)) +# define BOOST_PP_WHILE_200_I(p, o, s) BOOST_PP_IF(p(201, s), BOOST_PP_WHILE_201, s BOOST_PP_TUPLE_EAT_3)(p, o, o(201, s)) +# define BOOST_PP_WHILE_201_I(p, o, s) BOOST_PP_IF(p(202, s), BOOST_PP_WHILE_202, s BOOST_PP_TUPLE_EAT_3)(p, o, o(202, s)) +# define BOOST_PP_WHILE_202_I(p, o, s) BOOST_PP_IF(p(203, s), BOOST_PP_WHILE_203, s BOOST_PP_TUPLE_EAT_3)(p, o, o(203, s)) +# define BOOST_PP_WHILE_203_I(p, o, s) BOOST_PP_IF(p(204, s), BOOST_PP_WHILE_204, s BOOST_PP_TUPLE_EAT_3)(p, o, o(204, s)) +# define BOOST_PP_WHILE_204_I(p, o, s) BOOST_PP_IF(p(205, s), BOOST_PP_WHILE_205, s BOOST_PP_TUPLE_EAT_3)(p, o, o(205, s)) +# define BOOST_PP_WHILE_205_I(p, o, s) BOOST_PP_IF(p(206, s), BOOST_PP_WHILE_206, s BOOST_PP_TUPLE_EAT_3)(p, o, o(206, s)) +# define BOOST_PP_WHILE_206_I(p, o, s) BOOST_PP_IF(p(207, s), BOOST_PP_WHILE_207, s BOOST_PP_TUPLE_EAT_3)(p, o, o(207, s)) +# define BOOST_PP_WHILE_207_I(p, o, s) BOOST_PP_IF(p(208, s), BOOST_PP_WHILE_208, s BOOST_PP_TUPLE_EAT_3)(p, o, o(208, s)) +# define BOOST_PP_WHILE_208_I(p, o, s) BOOST_PP_IF(p(209, s), BOOST_PP_WHILE_209, s BOOST_PP_TUPLE_EAT_3)(p, o, o(209, s)) +# define BOOST_PP_WHILE_209_I(p, o, s) BOOST_PP_IF(p(210, s), BOOST_PP_WHILE_210, s BOOST_PP_TUPLE_EAT_3)(p, o, o(210, s)) +# define BOOST_PP_WHILE_210_I(p, o, s) BOOST_PP_IF(p(211, s), BOOST_PP_WHILE_211, s BOOST_PP_TUPLE_EAT_3)(p, o, o(211, s)) +# define BOOST_PP_WHILE_211_I(p, o, s) BOOST_PP_IF(p(212, s), BOOST_PP_WHILE_212, s BOOST_PP_TUPLE_EAT_3)(p, o, o(212, s)) +# define BOOST_PP_WHILE_212_I(p, o, s) BOOST_PP_IF(p(213, s), BOOST_PP_WHILE_213, s BOOST_PP_TUPLE_EAT_3)(p, o, o(213, s)) +# define BOOST_PP_WHILE_213_I(p, o, s) BOOST_PP_IF(p(214, s), BOOST_PP_WHILE_214, s BOOST_PP_TUPLE_EAT_3)(p, o, o(214, s)) +# define BOOST_PP_WHILE_214_I(p, o, s) BOOST_PP_IF(p(215, s), BOOST_PP_WHILE_215, s BOOST_PP_TUPLE_EAT_3)(p, o, o(215, s)) +# define BOOST_PP_WHILE_215_I(p, o, s) BOOST_PP_IF(p(216, s), BOOST_PP_WHILE_216, s BOOST_PP_TUPLE_EAT_3)(p, o, o(216, s)) +# define BOOST_PP_WHILE_216_I(p, o, s) BOOST_PP_IF(p(217, s), BOOST_PP_WHILE_217, s BOOST_PP_TUPLE_EAT_3)(p, o, o(217, s)) +# define BOOST_PP_WHILE_217_I(p, o, s) BOOST_PP_IF(p(218, s), BOOST_PP_WHILE_218, s BOOST_PP_TUPLE_EAT_3)(p, o, o(218, s)) +# define BOOST_PP_WHILE_218_I(p, o, s) BOOST_PP_IF(p(219, s), BOOST_PP_WHILE_219, s BOOST_PP_TUPLE_EAT_3)(p, o, o(219, s)) +# define BOOST_PP_WHILE_219_I(p, o, s) BOOST_PP_IF(p(220, s), BOOST_PP_WHILE_220, s BOOST_PP_TUPLE_EAT_3)(p, o, o(220, s)) +# define BOOST_PP_WHILE_220_I(p, o, s) BOOST_PP_IF(p(221, s), BOOST_PP_WHILE_221, s BOOST_PP_TUPLE_EAT_3)(p, o, o(221, s)) +# define BOOST_PP_WHILE_221_I(p, o, s) BOOST_PP_IF(p(222, s), BOOST_PP_WHILE_222, s BOOST_PP_TUPLE_EAT_3)(p, o, o(222, s)) +# define BOOST_PP_WHILE_222_I(p, o, s) BOOST_PP_IF(p(223, s), BOOST_PP_WHILE_223, s BOOST_PP_TUPLE_EAT_3)(p, o, o(223, s)) +# define BOOST_PP_WHILE_223_I(p, o, s) BOOST_PP_IF(p(224, s), BOOST_PP_WHILE_224, s BOOST_PP_TUPLE_EAT_3)(p, o, o(224, s)) +# define BOOST_PP_WHILE_224_I(p, o, s) BOOST_PP_IF(p(225, s), BOOST_PP_WHILE_225, s BOOST_PP_TUPLE_EAT_3)(p, o, o(225, s)) +# define BOOST_PP_WHILE_225_I(p, o, s) BOOST_PP_IF(p(226, s), BOOST_PP_WHILE_226, s BOOST_PP_TUPLE_EAT_3)(p, o, o(226, s)) +# define BOOST_PP_WHILE_226_I(p, o, s) BOOST_PP_IF(p(227, s), BOOST_PP_WHILE_227, s BOOST_PP_TUPLE_EAT_3)(p, o, o(227, s)) +# define BOOST_PP_WHILE_227_I(p, o, s) BOOST_PP_IF(p(228, s), BOOST_PP_WHILE_228, s BOOST_PP_TUPLE_EAT_3)(p, o, o(228, s)) +# define BOOST_PP_WHILE_228_I(p, o, s) BOOST_PP_IF(p(229, s), BOOST_PP_WHILE_229, s BOOST_PP_TUPLE_EAT_3)(p, o, o(229, s)) +# define BOOST_PP_WHILE_229_I(p, o, s) BOOST_PP_IF(p(230, s), BOOST_PP_WHILE_230, s BOOST_PP_TUPLE_EAT_3)(p, o, o(230, s)) +# define BOOST_PP_WHILE_230_I(p, o, s) BOOST_PP_IF(p(231, s), BOOST_PP_WHILE_231, s BOOST_PP_TUPLE_EAT_3)(p, o, o(231, s)) +# define BOOST_PP_WHILE_231_I(p, o, s) BOOST_PP_IF(p(232, s), BOOST_PP_WHILE_232, s BOOST_PP_TUPLE_EAT_3)(p, o, o(232, s)) +# define BOOST_PP_WHILE_232_I(p, o, s) BOOST_PP_IF(p(233, s), BOOST_PP_WHILE_233, s BOOST_PP_TUPLE_EAT_3)(p, o, o(233, s)) +# define BOOST_PP_WHILE_233_I(p, o, s) BOOST_PP_IF(p(234, s), BOOST_PP_WHILE_234, s BOOST_PP_TUPLE_EAT_3)(p, o, o(234, s)) +# define BOOST_PP_WHILE_234_I(p, o, s) BOOST_PP_IF(p(235, s), BOOST_PP_WHILE_235, s BOOST_PP_TUPLE_EAT_3)(p, o, o(235, s)) +# define BOOST_PP_WHILE_235_I(p, o, s) BOOST_PP_IF(p(236, s), BOOST_PP_WHILE_236, s BOOST_PP_TUPLE_EAT_3)(p, o, o(236, s)) +# define BOOST_PP_WHILE_236_I(p, o, s) BOOST_PP_IF(p(237, s), BOOST_PP_WHILE_237, s BOOST_PP_TUPLE_EAT_3)(p, o, o(237, s)) +# define BOOST_PP_WHILE_237_I(p, o, s) BOOST_PP_IF(p(238, s), BOOST_PP_WHILE_238, s BOOST_PP_TUPLE_EAT_3)(p, o, o(238, s)) +# define BOOST_PP_WHILE_238_I(p, o, s) BOOST_PP_IF(p(239, s), BOOST_PP_WHILE_239, s BOOST_PP_TUPLE_EAT_3)(p, o, o(239, s)) +# define BOOST_PP_WHILE_239_I(p, o, s) BOOST_PP_IF(p(240, s), BOOST_PP_WHILE_240, s BOOST_PP_TUPLE_EAT_3)(p, o, o(240, s)) +# define BOOST_PP_WHILE_240_I(p, o, s) BOOST_PP_IF(p(241, s), BOOST_PP_WHILE_241, s BOOST_PP_TUPLE_EAT_3)(p, o, o(241, s)) +# define BOOST_PP_WHILE_241_I(p, o, s) BOOST_PP_IF(p(242, s), BOOST_PP_WHILE_242, s BOOST_PP_TUPLE_EAT_3)(p, o, o(242, s)) +# define BOOST_PP_WHILE_242_I(p, o, s) BOOST_PP_IF(p(243, s), BOOST_PP_WHILE_243, s BOOST_PP_TUPLE_EAT_3)(p, o, o(243, s)) +# define BOOST_PP_WHILE_243_I(p, o, s) BOOST_PP_IF(p(244, s), BOOST_PP_WHILE_244, s BOOST_PP_TUPLE_EAT_3)(p, o, o(244, s)) +# define BOOST_PP_WHILE_244_I(p, o, s) BOOST_PP_IF(p(245, s), BOOST_PP_WHILE_245, s BOOST_PP_TUPLE_EAT_3)(p, o, o(245, s)) +# define BOOST_PP_WHILE_245_I(p, o, s) BOOST_PP_IF(p(246, s), BOOST_PP_WHILE_246, s BOOST_PP_TUPLE_EAT_3)(p, o, o(246, s)) +# define BOOST_PP_WHILE_246_I(p, o, s) BOOST_PP_IF(p(247, s), BOOST_PP_WHILE_247, s BOOST_PP_TUPLE_EAT_3)(p, o, o(247, s)) +# define BOOST_PP_WHILE_247_I(p, o, s) BOOST_PP_IF(p(248, s), BOOST_PP_WHILE_248, s BOOST_PP_TUPLE_EAT_3)(p, o, o(248, s)) +# define BOOST_PP_WHILE_248_I(p, o, s) BOOST_PP_IF(p(249, s), BOOST_PP_WHILE_249, s BOOST_PP_TUPLE_EAT_3)(p, o, o(249, s)) +# define BOOST_PP_WHILE_249_I(p, o, s) BOOST_PP_IF(p(250, s), BOOST_PP_WHILE_250, s BOOST_PP_TUPLE_EAT_3)(p, o, o(250, s)) +# define BOOST_PP_WHILE_250_I(p, o, s) BOOST_PP_IF(p(251, s), BOOST_PP_WHILE_251, s BOOST_PP_TUPLE_EAT_3)(p, o, o(251, s)) +# define BOOST_PP_WHILE_251_I(p, o, s) BOOST_PP_IF(p(252, s), BOOST_PP_WHILE_252, s BOOST_PP_TUPLE_EAT_3)(p, o, o(252, s)) +# define BOOST_PP_WHILE_252_I(p, o, s) BOOST_PP_IF(p(253, s), BOOST_PP_WHILE_253, s BOOST_PP_TUPLE_EAT_3)(p, o, o(253, s)) +# define BOOST_PP_WHILE_253_I(p, o, s) BOOST_PP_IF(p(254, s), BOOST_PP_WHILE_254, s BOOST_PP_TUPLE_EAT_3)(p, o, o(254, s)) +# define BOOST_PP_WHILE_254_I(p, o, s) BOOST_PP_IF(p(255, s), BOOST_PP_WHILE_255, s BOOST_PP_TUPLE_EAT_3)(p, o, o(255, s)) +# define BOOST_PP_WHILE_255_I(p, o, s) BOOST_PP_IF(p(256, s), BOOST_PP_WHILE_256, s BOOST_PP_TUPLE_EAT_3)(p, o, o(256, s)) +# define BOOST_PP_WHILE_256_I(p, o, s) BOOST_PP_IF(p(257, s), BOOST_PP_WHILE_257, s BOOST_PP_TUPLE_EAT_3)(p, o, o(257, s)) +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/control/detail/msvc/while.hpp b/ThirdParty/boost-Subset/boost/preprocessor/control/detail/msvc/while.hpp new file mode 100644 index 0000000000..e543e41b71 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/control/detail/msvc/while.hpp @@ -0,0 +1,277 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_CONTROL_DETAIL_MSVC_WHILE_HPP +# define BOOST_PREPROCESSOR_CONTROL_DETAIL_MSVC_WHILE_HPP +# +# include +# include +# +# define BOOST_PP_WHILE_1(p, o, s) BOOST_PP_IF(p(2, s), BOOST_PP_WHILE_2, s BOOST_PP_TUPLE_EAT_3)(p, o, o(2, s)) +# define BOOST_PP_WHILE_2(p, o, s) BOOST_PP_IF(p(3, s), BOOST_PP_WHILE_3, s BOOST_PP_TUPLE_EAT_3)(p, o, o(3, s)) +# define BOOST_PP_WHILE_3(p, o, s) BOOST_PP_IF(p(4, s), BOOST_PP_WHILE_4, s BOOST_PP_TUPLE_EAT_3)(p, o, o(4, s)) +# define BOOST_PP_WHILE_4(p, o, s) BOOST_PP_IF(p(5, s), BOOST_PP_WHILE_5, s BOOST_PP_TUPLE_EAT_3)(p, o, o(5, s)) +# define BOOST_PP_WHILE_5(p, o, s) BOOST_PP_IF(p(6, s), BOOST_PP_WHILE_6, s BOOST_PP_TUPLE_EAT_3)(p, o, o(6, s)) +# define BOOST_PP_WHILE_6(p, o, s) BOOST_PP_IF(p(7, s), BOOST_PP_WHILE_7, s BOOST_PP_TUPLE_EAT_3)(p, o, o(7, s)) +# define BOOST_PP_WHILE_7(p, o, s) BOOST_PP_IF(p(8, s), BOOST_PP_WHILE_8, s BOOST_PP_TUPLE_EAT_3)(p, o, o(8, s)) +# define BOOST_PP_WHILE_8(p, o, s) BOOST_PP_IF(p(9, s), BOOST_PP_WHILE_9, s BOOST_PP_TUPLE_EAT_3)(p, o, o(9, s)) +# define BOOST_PP_WHILE_9(p, o, s) BOOST_PP_IF(p(10, s), BOOST_PP_WHILE_10, s BOOST_PP_TUPLE_EAT_3)(p, o, o(10, s)) +# define BOOST_PP_WHILE_10(p, o, s) BOOST_PP_IF(p(11, s), BOOST_PP_WHILE_11, s BOOST_PP_TUPLE_EAT_3)(p, o, o(11, s)) +# define BOOST_PP_WHILE_11(p, o, s) BOOST_PP_IF(p(12, s), BOOST_PP_WHILE_12, s BOOST_PP_TUPLE_EAT_3)(p, o, o(12, s)) +# define BOOST_PP_WHILE_12(p, o, s) BOOST_PP_IF(p(13, s), BOOST_PP_WHILE_13, s BOOST_PP_TUPLE_EAT_3)(p, o, o(13, s)) +# define BOOST_PP_WHILE_13(p, o, s) BOOST_PP_IF(p(14, s), BOOST_PP_WHILE_14, s BOOST_PP_TUPLE_EAT_3)(p, o, o(14, s)) +# define BOOST_PP_WHILE_14(p, o, s) BOOST_PP_IF(p(15, s), BOOST_PP_WHILE_15, s BOOST_PP_TUPLE_EAT_3)(p, o, o(15, s)) +# define BOOST_PP_WHILE_15(p, o, s) BOOST_PP_IF(p(16, s), BOOST_PP_WHILE_16, s BOOST_PP_TUPLE_EAT_3)(p, o, o(16, s)) +# define BOOST_PP_WHILE_16(p, o, s) BOOST_PP_IF(p(17, s), BOOST_PP_WHILE_17, s BOOST_PP_TUPLE_EAT_3)(p, o, o(17, s)) +# define BOOST_PP_WHILE_17(p, o, s) BOOST_PP_IF(p(18, s), BOOST_PP_WHILE_18, s BOOST_PP_TUPLE_EAT_3)(p, o, o(18, s)) +# define BOOST_PP_WHILE_18(p, o, s) BOOST_PP_IF(p(19, s), BOOST_PP_WHILE_19, s BOOST_PP_TUPLE_EAT_3)(p, o, o(19, s)) +# define BOOST_PP_WHILE_19(p, o, s) BOOST_PP_IF(p(20, s), BOOST_PP_WHILE_20, s BOOST_PP_TUPLE_EAT_3)(p, o, o(20, s)) +# define BOOST_PP_WHILE_20(p, o, s) BOOST_PP_IF(p(21, s), BOOST_PP_WHILE_21, s BOOST_PP_TUPLE_EAT_3)(p, o, o(21, s)) +# define BOOST_PP_WHILE_21(p, o, s) BOOST_PP_IF(p(22, s), BOOST_PP_WHILE_22, s BOOST_PP_TUPLE_EAT_3)(p, o, o(22, s)) +# define BOOST_PP_WHILE_22(p, o, s) BOOST_PP_IF(p(23, s), BOOST_PP_WHILE_23, s BOOST_PP_TUPLE_EAT_3)(p, o, o(23, s)) +# define BOOST_PP_WHILE_23(p, o, s) BOOST_PP_IF(p(24, s), BOOST_PP_WHILE_24, s BOOST_PP_TUPLE_EAT_3)(p, o, o(24, s)) +# define BOOST_PP_WHILE_24(p, o, s) BOOST_PP_IF(p(25, s), BOOST_PP_WHILE_25, s BOOST_PP_TUPLE_EAT_3)(p, o, o(25, s)) +# define BOOST_PP_WHILE_25(p, o, s) BOOST_PP_IF(p(26, s), BOOST_PP_WHILE_26, s BOOST_PP_TUPLE_EAT_3)(p, o, o(26, s)) +# define BOOST_PP_WHILE_26(p, o, s) BOOST_PP_IF(p(27, s), BOOST_PP_WHILE_27, s BOOST_PP_TUPLE_EAT_3)(p, o, o(27, s)) +# define BOOST_PP_WHILE_27(p, o, s) BOOST_PP_IF(p(28, s), BOOST_PP_WHILE_28, s BOOST_PP_TUPLE_EAT_3)(p, o, o(28, s)) +# define BOOST_PP_WHILE_28(p, o, s) BOOST_PP_IF(p(29, s), BOOST_PP_WHILE_29, s BOOST_PP_TUPLE_EAT_3)(p, o, o(29, s)) +# define BOOST_PP_WHILE_29(p, o, s) BOOST_PP_IF(p(30, s), BOOST_PP_WHILE_30, s BOOST_PP_TUPLE_EAT_3)(p, o, o(30, s)) +# define BOOST_PP_WHILE_30(p, o, s) BOOST_PP_IF(p(31, s), BOOST_PP_WHILE_31, s BOOST_PP_TUPLE_EAT_3)(p, o, o(31, s)) +# define BOOST_PP_WHILE_31(p, o, s) BOOST_PP_IF(p(32, s), BOOST_PP_WHILE_32, s BOOST_PP_TUPLE_EAT_3)(p, o, o(32, s)) +# define BOOST_PP_WHILE_32(p, o, s) BOOST_PP_IF(p(33, s), BOOST_PP_WHILE_33, s BOOST_PP_TUPLE_EAT_3)(p, o, o(33, s)) +# define BOOST_PP_WHILE_33(p, o, s) BOOST_PP_IF(p(34, s), BOOST_PP_WHILE_34, s BOOST_PP_TUPLE_EAT_3)(p, o, o(34, s)) +# define BOOST_PP_WHILE_34(p, o, s) BOOST_PP_IF(p(35, s), BOOST_PP_WHILE_35, s BOOST_PP_TUPLE_EAT_3)(p, o, o(35, s)) +# define BOOST_PP_WHILE_35(p, o, s) BOOST_PP_IF(p(36, s), BOOST_PP_WHILE_36, s BOOST_PP_TUPLE_EAT_3)(p, o, o(36, s)) +# define BOOST_PP_WHILE_36(p, o, s) BOOST_PP_IF(p(37, s), BOOST_PP_WHILE_37, s BOOST_PP_TUPLE_EAT_3)(p, o, o(37, s)) +# define BOOST_PP_WHILE_37(p, o, s) BOOST_PP_IF(p(38, s), BOOST_PP_WHILE_38, s BOOST_PP_TUPLE_EAT_3)(p, o, o(38, s)) +# define BOOST_PP_WHILE_38(p, o, s) BOOST_PP_IF(p(39, s), BOOST_PP_WHILE_39, s BOOST_PP_TUPLE_EAT_3)(p, o, o(39, s)) +# define BOOST_PP_WHILE_39(p, o, s) BOOST_PP_IF(p(40, s), BOOST_PP_WHILE_40, s BOOST_PP_TUPLE_EAT_3)(p, o, o(40, s)) +# define BOOST_PP_WHILE_40(p, o, s) BOOST_PP_IF(p(41, s), BOOST_PP_WHILE_41, s BOOST_PP_TUPLE_EAT_3)(p, o, o(41, s)) +# define BOOST_PP_WHILE_41(p, o, s) BOOST_PP_IF(p(42, s), BOOST_PP_WHILE_42, s BOOST_PP_TUPLE_EAT_3)(p, o, o(42, s)) +# define BOOST_PP_WHILE_42(p, o, s) BOOST_PP_IF(p(43, s), BOOST_PP_WHILE_43, s BOOST_PP_TUPLE_EAT_3)(p, o, o(43, s)) +# define BOOST_PP_WHILE_43(p, o, s) BOOST_PP_IF(p(44, s), BOOST_PP_WHILE_44, s BOOST_PP_TUPLE_EAT_3)(p, o, o(44, s)) +# define BOOST_PP_WHILE_44(p, o, s) BOOST_PP_IF(p(45, s), BOOST_PP_WHILE_45, s BOOST_PP_TUPLE_EAT_3)(p, o, o(45, s)) +# define BOOST_PP_WHILE_45(p, o, s) BOOST_PP_IF(p(46, s), BOOST_PP_WHILE_46, s BOOST_PP_TUPLE_EAT_3)(p, o, o(46, s)) +# define BOOST_PP_WHILE_46(p, o, s) BOOST_PP_IF(p(47, s), BOOST_PP_WHILE_47, s BOOST_PP_TUPLE_EAT_3)(p, o, o(47, s)) +# define BOOST_PP_WHILE_47(p, o, s) BOOST_PP_IF(p(48, s), BOOST_PP_WHILE_48, s BOOST_PP_TUPLE_EAT_3)(p, o, o(48, s)) +# define BOOST_PP_WHILE_48(p, o, s) BOOST_PP_IF(p(49, s), BOOST_PP_WHILE_49, s BOOST_PP_TUPLE_EAT_3)(p, o, o(49, s)) +# define BOOST_PP_WHILE_49(p, o, s) BOOST_PP_IF(p(50, s), BOOST_PP_WHILE_50, s BOOST_PP_TUPLE_EAT_3)(p, o, o(50, s)) +# define BOOST_PP_WHILE_50(p, o, s) BOOST_PP_IF(p(51, s), BOOST_PP_WHILE_51, s BOOST_PP_TUPLE_EAT_3)(p, o, o(51, s)) +# define BOOST_PP_WHILE_51(p, o, s) BOOST_PP_IF(p(52, s), BOOST_PP_WHILE_52, s BOOST_PP_TUPLE_EAT_3)(p, o, o(52, s)) +# define BOOST_PP_WHILE_52(p, o, s) BOOST_PP_IF(p(53, s), BOOST_PP_WHILE_53, s BOOST_PP_TUPLE_EAT_3)(p, o, o(53, s)) +# define BOOST_PP_WHILE_53(p, o, s) BOOST_PP_IF(p(54, s), BOOST_PP_WHILE_54, s BOOST_PP_TUPLE_EAT_3)(p, o, o(54, s)) +# define BOOST_PP_WHILE_54(p, o, s) BOOST_PP_IF(p(55, s), BOOST_PP_WHILE_55, s BOOST_PP_TUPLE_EAT_3)(p, o, o(55, s)) +# define BOOST_PP_WHILE_55(p, o, s) BOOST_PP_IF(p(56, s), BOOST_PP_WHILE_56, s BOOST_PP_TUPLE_EAT_3)(p, o, o(56, s)) +# define BOOST_PP_WHILE_56(p, o, s) BOOST_PP_IF(p(57, s), BOOST_PP_WHILE_57, s BOOST_PP_TUPLE_EAT_3)(p, o, o(57, s)) +# define BOOST_PP_WHILE_57(p, o, s) BOOST_PP_IF(p(58, s), BOOST_PP_WHILE_58, s BOOST_PP_TUPLE_EAT_3)(p, o, o(58, s)) +# define BOOST_PP_WHILE_58(p, o, s) BOOST_PP_IF(p(59, s), BOOST_PP_WHILE_59, s BOOST_PP_TUPLE_EAT_3)(p, o, o(59, s)) +# define BOOST_PP_WHILE_59(p, o, s) BOOST_PP_IF(p(60, s), BOOST_PP_WHILE_60, s BOOST_PP_TUPLE_EAT_3)(p, o, o(60, s)) +# define BOOST_PP_WHILE_60(p, o, s) BOOST_PP_IF(p(61, s), BOOST_PP_WHILE_61, s BOOST_PP_TUPLE_EAT_3)(p, o, o(61, s)) +# define BOOST_PP_WHILE_61(p, o, s) BOOST_PP_IF(p(62, s), BOOST_PP_WHILE_62, s BOOST_PP_TUPLE_EAT_3)(p, o, o(62, s)) +# define BOOST_PP_WHILE_62(p, o, s) BOOST_PP_IF(p(63, s), BOOST_PP_WHILE_63, s BOOST_PP_TUPLE_EAT_3)(p, o, o(63, s)) +# define BOOST_PP_WHILE_63(p, o, s) BOOST_PP_IF(p(64, s), BOOST_PP_WHILE_64, s BOOST_PP_TUPLE_EAT_3)(p, o, o(64, s)) +# define BOOST_PP_WHILE_64(p, o, s) BOOST_PP_IF(p(65, s), BOOST_PP_WHILE_65, s BOOST_PP_TUPLE_EAT_3)(p, o, o(65, s)) +# define BOOST_PP_WHILE_65(p, o, s) BOOST_PP_IF(p(66, s), BOOST_PP_WHILE_66, s BOOST_PP_TUPLE_EAT_3)(p, o, o(66, s)) +# define BOOST_PP_WHILE_66(p, o, s) BOOST_PP_IF(p(67, s), BOOST_PP_WHILE_67, s BOOST_PP_TUPLE_EAT_3)(p, o, o(67, s)) +# define BOOST_PP_WHILE_67(p, o, s) BOOST_PP_IF(p(68, s), BOOST_PP_WHILE_68, s BOOST_PP_TUPLE_EAT_3)(p, o, o(68, s)) +# define BOOST_PP_WHILE_68(p, o, s) BOOST_PP_IF(p(69, s), BOOST_PP_WHILE_69, s BOOST_PP_TUPLE_EAT_3)(p, o, o(69, s)) +# define BOOST_PP_WHILE_69(p, o, s) BOOST_PP_IF(p(70, s), BOOST_PP_WHILE_70, s BOOST_PP_TUPLE_EAT_3)(p, o, o(70, s)) +# define BOOST_PP_WHILE_70(p, o, s) BOOST_PP_IF(p(71, s), BOOST_PP_WHILE_71, s BOOST_PP_TUPLE_EAT_3)(p, o, o(71, s)) +# define BOOST_PP_WHILE_71(p, o, s) BOOST_PP_IF(p(72, s), BOOST_PP_WHILE_72, s BOOST_PP_TUPLE_EAT_3)(p, o, o(72, s)) +# define BOOST_PP_WHILE_72(p, o, s) BOOST_PP_IF(p(73, s), BOOST_PP_WHILE_73, s BOOST_PP_TUPLE_EAT_3)(p, o, o(73, s)) +# define BOOST_PP_WHILE_73(p, o, s) BOOST_PP_IF(p(74, s), BOOST_PP_WHILE_74, s BOOST_PP_TUPLE_EAT_3)(p, o, o(74, s)) +# define BOOST_PP_WHILE_74(p, o, s) BOOST_PP_IF(p(75, s), BOOST_PP_WHILE_75, s BOOST_PP_TUPLE_EAT_3)(p, o, o(75, s)) +# define BOOST_PP_WHILE_75(p, o, s) BOOST_PP_IF(p(76, s), BOOST_PP_WHILE_76, s BOOST_PP_TUPLE_EAT_3)(p, o, o(76, s)) +# define BOOST_PP_WHILE_76(p, o, s) BOOST_PP_IF(p(77, s), BOOST_PP_WHILE_77, s BOOST_PP_TUPLE_EAT_3)(p, o, o(77, s)) +# define BOOST_PP_WHILE_77(p, o, s) BOOST_PP_IF(p(78, s), BOOST_PP_WHILE_78, s BOOST_PP_TUPLE_EAT_3)(p, o, o(78, s)) +# define BOOST_PP_WHILE_78(p, o, s) BOOST_PP_IF(p(79, s), BOOST_PP_WHILE_79, s BOOST_PP_TUPLE_EAT_3)(p, o, o(79, s)) +# define BOOST_PP_WHILE_79(p, o, s) BOOST_PP_IF(p(80, s), BOOST_PP_WHILE_80, s BOOST_PP_TUPLE_EAT_3)(p, o, o(80, s)) +# define BOOST_PP_WHILE_80(p, o, s) BOOST_PP_IF(p(81, s), BOOST_PP_WHILE_81, s BOOST_PP_TUPLE_EAT_3)(p, o, o(81, s)) +# define BOOST_PP_WHILE_81(p, o, s) BOOST_PP_IF(p(82, s), BOOST_PP_WHILE_82, s BOOST_PP_TUPLE_EAT_3)(p, o, o(82, s)) +# define BOOST_PP_WHILE_82(p, o, s) BOOST_PP_IF(p(83, s), BOOST_PP_WHILE_83, s BOOST_PP_TUPLE_EAT_3)(p, o, o(83, s)) +# define BOOST_PP_WHILE_83(p, o, s) BOOST_PP_IF(p(84, s), BOOST_PP_WHILE_84, s BOOST_PP_TUPLE_EAT_3)(p, o, o(84, s)) +# define BOOST_PP_WHILE_84(p, o, s) BOOST_PP_IF(p(85, s), BOOST_PP_WHILE_85, s BOOST_PP_TUPLE_EAT_3)(p, o, o(85, s)) +# define BOOST_PP_WHILE_85(p, o, s) BOOST_PP_IF(p(86, s), BOOST_PP_WHILE_86, s BOOST_PP_TUPLE_EAT_3)(p, o, o(86, s)) +# define BOOST_PP_WHILE_86(p, o, s) BOOST_PP_IF(p(87, s), BOOST_PP_WHILE_87, s BOOST_PP_TUPLE_EAT_3)(p, o, o(87, s)) +# define BOOST_PP_WHILE_87(p, o, s) BOOST_PP_IF(p(88, s), BOOST_PP_WHILE_88, s BOOST_PP_TUPLE_EAT_3)(p, o, o(88, s)) +# define BOOST_PP_WHILE_88(p, o, s) BOOST_PP_IF(p(89, s), BOOST_PP_WHILE_89, s BOOST_PP_TUPLE_EAT_3)(p, o, o(89, s)) +# define BOOST_PP_WHILE_89(p, o, s) BOOST_PP_IF(p(90, s), BOOST_PP_WHILE_90, s BOOST_PP_TUPLE_EAT_3)(p, o, o(90, s)) +# define BOOST_PP_WHILE_90(p, o, s) BOOST_PP_IF(p(91, s), BOOST_PP_WHILE_91, s BOOST_PP_TUPLE_EAT_3)(p, o, o(91, s)) +# define BOOST_PP_WHILE_91(p, o, s) BOOST_PP_IF(p(92, s), BOOST_PP_WHILE_92, s BOOST_PP_TUPLE_EAT_3)(p, o, o(92, s)) +# define BOOST_PP_WHILE_92(p, o, s) BOOST_PP_IF(p(93, s), BOOST_PP_WHILE_93, s BOOST_PP_TUPLE_EAT_3)(p, o, o(93, s)) +# define BOOST_PP_WHILE_93(p, o, s) BOOST_PP_IF(p(94, s), BOOST_PP_WHILE_94, s BOOST_PP_TUPLE_EAT_3)(p, o, o(94, s)) +# define BOOST_PP_WHILE_94(p, o, s) BOOST_PP_IF(p(95, s), BOOST_PP_WHILE_95, s BOOST_PP_TUPLE_EAT_3)(p, o, o(95, s)) +# define BOOST_PP_WHILE_95(p, o, s) BOOST_PP_IF(p(96, s), BOOST_PP_WHILE_96, s BOOST_PP_TUPLE_EAT_3)(p, o, o(96, s)) +# define BOOST_PP_WHILE_96(p, o, s) BOOST_PP_IF(p(97, s), BOOST_PP_WHILE_97, s BOOST_PP_TUPLE_EAT_3)(p, o, o(97, s)) +# define BOOST_PP_WHILE_97(p, o, s) BOOST_PP_IF(p(98, s), BOOST_PP_WHILE_98, s BOOST_PP_TUPLE_EAT_3)(p, o, o(98, s)) +# define BOOST_PP_WHILE_98(p, o, s) BOOST_PP_IF(p(99, s), BOOST_PP_WHILE_99, s BOOST_PP_TUPLE_EAT_3)(p, o, o(99, s)) +# define BOOST_PP_WHILE_99(p, o, s) BOOST_PP_IF(p(100, s), BOOST_PP_WHILE_100, s BOOST_PP_TUPLE_EAT_3)(p, o, o(100, s)) +# define BOOST_PP_WHILE_100(p, o, s) BOOST_PP_IF(p(101, s), BOOST_PP_WHILE_101, s BOOST_PP_TUPLE_EAT_3)(p, o, o(101, s)) +# define BOOST_PP_WHILE_101(p, o, s) BOOST_PP_IF(p(102, s), BOOST_PP_WHILE_102, s BOOST_PP_TUPLE_EAT_3)(p, o, o(102, s)) +# define BOOST_PP_WHILE_102(p, o, s) BOOST_PP_IF(p(103, s), BOOST_PP_WHILE_103, s BOOST_PP_TUPLE_EAT_3)(p, o, o(103, s)) +# define BOOST_PP_WHILE_103(p, o, s) BOOST_PP_IF(p(104, s), BOOST_PP_WHILE_104, s BOOST_PP_TUPLE_EAT_3)(p, o, o(104, s)) +# define BOOST_PP_WHILE_104(p, o, s) BOOST_PP_IF(p(105, s), BOOST_PP_WHILE_105, s BOOST_PP_TUPLE_EAT_3)(p, o, o(105, s)) +# define BOOST_PP_WHILE_105(p, o, s) BOOST_PP_IF(p(106, s), BOOST_PP_WHILE_106, s BOOST_PP_TUPLE_EAT_3)(p, o, o(106, s)) +# define BOOST_PP_WHILE_106(p, o, s) BOOST_PP_IF(p(107, s), BOOST_PP_WHILE_107, s BOOST_PP_TUPLE_EAT_3)(p, o, o(107, s)) +# define BOOST_PP_WHILE_107(p, o, s) BOOST_PP_IF(p(108, s), BOOST_PP_WHILE_108, s BOOST_PP_TUPLE_EAT_3)(p, o, o(108, s)) +# define BOOST_PP_WHILE_108(p, o, s) BOOST_PP_IF(p(109, s), BOOST_PP_WHILE_109, s BOOST_PP_TUPLE_EAT_3)(p, o, o(109, s)) +# define BOOST_PP_WHILE_109(p, o, s) BOOST_PP_IF(p(110, s), BOOST_PP_WHILE_110, s BOOST_PP_TUPLE_EAT_3)(p, o, o(110, s)) +# define BOOST_PP_WHILE_110(p, o, s) BOOST_PP_IF(p(111, s), BOOST_PP_WHILE_111, s BOOST_PP_TUPLE_EAT_3)(p, o, o(111, s)) +# define BOOST_PP_WHILE_111(p, o, s) BOOST_PP_IF(p(112, s), BOOST_PP_WHILE_112, s BOOST_PP_TUPLE_EAT_3)(p, o, o(112, s)) +# define BOOST_PP_WHILE_112(p, o, s) BOOST_PP_IF(p(113, s), BOOST_PP_WHILE_113, s BOOST_PP_TUPLE_EAT_3)(p, o, o(113, s)) +# define BOOST_PP_WHILE_113(p, o, s) BOOST_PP_IF(p(114, s), BOOST_PP_WHILE_114, s BOOST_PP_TUPLE_EAT_3)(p, o, o(114, s)) +# define BOOST_PP_WHILE_114(p, o, s) BOOST_PP_IF(p(115, s), BOOST_PP_WHILE_115, s BOOST_PP_TUPLE_EAT_3)(p, o, o(115, s)) +# define BOOST_PP_WHILE_115(p, o, s) BOOST_PP_IF(p(116, s), BOOST_PP_WHILE_116, s BOOST_PP_TUPLE_EAT_3)(p, o, o(116, s)) +# define BOOST_PP_WHILE_116(p, o, s) BOOST_PP_IF(p(117, s), BOOST_PP_WHILE_117, s BOOST_PP_TUPLE_EAT_3)(p, o, o(117, s)) +# define BOOST_PP_WHILE_117(p, o, s) BOOST_PP_IF(p(118, s), BOOST_PP_WHILE_118, s BOOST_PP_TUPLE_EAT_3)(p, o, o(118, s)) +# define BOOST_PP_WHILE_118(p, o, s) BOOST_PP_IF(p(119, s), BOOST_PP_WHILE_119, s BOOST_PP_TUPLE_EAT_3)(p, o, o(119, s)) +# define BOOST_PP_WHILE_119(p, o, s) BOOST_PP_IF(p(120, s), BOOST_PP_WHILE_120, s BOOST_PP_TUPLE_EAT_3)(p, o, o(120, s)) +# define BOOST_PP_WHILE_120(p, o, s) BOOST_PP_IF(p(121, s), BOOST_PP_WHILE_121, s BOOST_PP_TUPLE_EAT_3)(p, o, o(121, s)) +# define BOOST_PP_WHILE_121(p, o, s) BOOST_PP_IF(p(122, s), BOOST_PP_WHILE_122, s BOOST_PP_TUPLE_EAT_3)(p, o, o(122, s)) +# define BOOST_PP_WHILE_122(p, o, s) BOOST_PP_IF(p(123, s), BOOST_PP_WHILE_123, s BOOST_PP_TUPLE_EAT_3)(p, o, o(123, s)) +# define BOOST_PP_WHILE_123(p, o, s) BOOST_PP_IF(p(124, s), BOOST_PP_WHILE_124, s BOOST_PP_TUPLE_EAT_3)(p, o, o(124, s)) +# define BOOST_PP_WHILE_124(p, o, s) BOOST_PP_IF(p(125, s), BOOST_PP_WHILE_125, s BOOST_PP_TUPLE_EAT_3)(p, o, o(125, s)) +# define BOOST_PP_WHILE_125(p, o, s) BOOST_PP_IF(p(126, s), BOOST_PP_WHILE_126, s BOOST_PP_TUPLE_EAT_3)(p, o, o(126, s)) +# define BOOST_PP_WHILE_126(p, o, s) BOOST_PP_IF(p(127, s), BOOST_PP_WHILE_127, s BOOST_PP_TUPLE_EAT_3)(p, o, o(127, s)) +# define BOOST_PP_WHILE_127(p, o, s) BOOST_PP_IF(p(128, s), BOOST_PP_WHILE_128, s BOOST_PP_TUPLE_EAT_3)(p, o, o(128, s)) +# define BOOST_PP_WHILE_128(p, o, s) BOOST_PP_IF(p(129, s), BOOST_PP_WHILE_129, s BOOST_PP_TUPLE_EAT_3)(p, o, o(129, s)) +# define BOOST_PP_WHILE_129(p, o, s) BOOST_PP_IF(p(130, s), BOOST_PP_WHILE_130, s BOOST_PP_TUPLE_EAT_3)(p, o, o(130, s)) +# define BOOST_PP_WHILE_130(p, o, s) BOOST_PP_IF(p(131, s), BOOST_PP_WHILE_131, s BOOST_PP_TUPLE_EAT_3)(p, o, o(131, s)) +# define BOOST_PP_WHILE_131(p, o, s) BOOST_PP_IF(p(132, s), BOOST_PP_WHILE_132, s BOOST_PP_TUPLE_EAT_3)(p, o, o(132, s)) +# define BOOST_PP_WHILE_132(p, o, s) BOOST_PP_IF(p(133, s), BOOST_PP_WHILE_133, s BOOST_PP_TUPLE_EAT_3)(p, o, o(133, s)) +# define BOOST_PP_WHILE_133(p, o, s) BOOST_PP_IF(p(134, s), BOOST_PP_WHILE_134, s BOOST_PP_TUPLE_EAT_3)(p, o, o(134, s)) +# define BOOST_PP_WHILE_134(p, o, s) BOOST_PP_IF(p(135, s), BOOST_PP_WHILE_135, s BOOST_PP_TUPLE_EAT_3)(p, o, o(135, s)) +# define BOOST_PP_WHILE_135(p, o, s) BOOST_PP_IF(p(136, s), BOOST_PP_WHILE_136, s BOOST_PP_TUPLE_EAT_3)(p, o, o(136, s)) +# define BOOST_PP_WHILE_136(p, o, s) BOOST_PP_IF(p(137, s), BOOST_PP_WHILE_137, s BOOST_PP_TUPLE_EAT_3)(p, o, o(137, s)) +# define BOOST_PP_WHILE_137(p, o, s) BOOST_PP_IF(p(138, s), BOOST_PP_WHILE_138, s BOOST_PP_TUPLE_EAT_3)(p, o, o(138, s)) +# define BOOST_PP_WHILE_138(p, o, s) BOOST_PP_IF(p(139, s), BOOST_PP_WHILE_139, s BOOST_PP_TUPLE_EAT_3)(p, o, o(139, s)) +# define BOOST_PP_WHILE_139(p, o, s) BOOST_PP_IF(p(140, s), BOOST_PP_WHILE_140, s BOOST_PP_TUPLE_EAT_3)(p, o, o(140, s)) +# define BOOST_PP_WHILE_140(p, o, s) BOOST_PP_IF(p(141, s), BOOST_PP_WHILE_141, s BOOST_PP_TUPLE_EAT_3)(p, o, o(141, s)) +# define BOOST_PP_WHILE_141(p, o, s) BOOST_PP_IF(p(142, s), BOOST_PP_WHILE_142, s BOOST_PP_TUPLE_EAT_3)(p, o, o(142, s)) +# define BOOST_PP_WHILE_142(p, o, s) BOOST_PP_IF(p(143, s), BOOST_PP_WHILE_143, s BOOST_PP_TUPLE_EAT_3)(p, o, o(143, s)) +# define BOOST_PP_WHILE_143(p, o, s) BOOST_PP_IF(p(144, s), BOOST_PP_WHILE_144, s BOOST_PP_TUPLE_EAT_3)(p, o, o(144, s)) +# define BOOST_PP_WHILE_144(p, o, s) BOOST_PP_IF(p(145, s), BOOST_PP_WHILE_145, s BOOST_PP_TUPLE_EAT_3)(p, o, o(145, s)) +# define BOOST_PP_WHILE_145(p, o, s) BOOST_PP_IF(p(146, s), BOOST_PP_WHILE_146, s BOOST_PP_TUPLE_EAT_3)(p, o, o(146, s)) +# define BOOST_PP_WHILE_146(p, o, s) BOOST_PP_IF(p(147, s), BOOST_PP_WHILE_147, s BOOST_PP_TUPLE_EAT_3)(p, o, o(147, s)) +# define BOOST_PP_WHILE_147(p, o, s) BOOST_PP_IF(p(148, s), BOOST_PP_WHILE_148, s BOOST_PP_TUPLE_EAT_3)(p, o, o(148, s)) +# define BOOST_PP_WHILE_148(p, o, s) BOOST_PP_IF(p(149, s), BOOST_PP_WHILE_149, s BOOST_PP_TUPLE_EAT_3)(p, o, o(149, s)) +# define BOOST_PP_WHILE_149(p, o, s) BOOST_PP_IF(p(150, s), BOOST_PP_WHILE_150, s BOOST_PP_TUPLE_EAT_3)(p, o, o(150, s)) +# define BOOST_PP_WHILE_150(p, o, s) BOOST_PP_IF(p(151, s), BOOST_PP_WHILE_151, s BOOST_PP_TUPLE_EAT_3)(p, o, o(151, s)) +# define BOOST_PP_WHILE_151(p, o, s) BOOST_PP_IF(p(152, s), BOOST_PP_WHILE_152, s BOOST_PP_TUPLE_EAT_3)(p, o, o(152, s)) +# define BOOST_PP_WHILE_152(p, o, s) BOOST_PP_IF(p(153, s), BOOST_PP_WHILE_153, s BOOST_PP_TUPLE_EAT_3)(p, o, o(153, s)) +# define BOOST_PP_WHILE_153(p, o, s) BOOST_PP_IF(p(154, s), BOOST_PP_WHILE_154, s BOOST_PP_TUPLE_EAT_3)(p, o, o(154, s)) +# define BOOST_PP_WHILE_154(p, o, s) BOOST_PP_IF(p(155, s), BOOST_PP_WHILE_155, s BOOST_PP_TUPLE_EAT_3)(p, o, o(155, s)) +# define BOOST_PP_WHILE_155(p, o, s) BOOST_PP_IF(p(156, s), BOOST_PP_WHILE_156, s BOOST_PP_TUPLE_EAT_3)(p, o, o(156, s)) +# define BOOST_PP_WHILE_156(p, o, s) BOOST_PP_IF(p(157, s), BOOST_PP_WHILE_157, s BOOST_PP_TUPLE_EAT_3)(p, o, o(157, s)) +# define BOOST_PP_WHILE_157(p, o, s) BOOST_PP_IF(p(158, s), BOOST_PP_WHILE_158, s BOOST_PP_TUPLE_EAT_3)(p, o, o(158, s)) +# define BOOST_PP_WHILE_158(p, o, s) BOOST_PP_IF(p(159, s), BOOST_PP_WHILE_159, s BOOST_PP_TUPLE_EAT_3)(p, o, o(159, s)) +# define BOOST_PP_WHILE_159(p, o, s) BOOST_PP_IF(p(160, s), BOOST_PP_WHILE_160, s BOOST_PP_TUPLE_EAT_3)(p, o, o(160, s)) +# define BOOST_PP_WHILE_160(p, o, s) BOOST_PP_IF(p(161, s), BOOST_PP_WHILE_161, s BOOST_PP_TUPLE_EAT_3)(p, o, o(161, s)) +# define BOOST_PP_WHILE_161(p, o, s) BOOST_PP_IF(p(162, s), BOOST_PP_WHILE_162, s BOOST_PP_TUPLE_EAT_3)(p, o, o(162, s)) +# define BOOST_PP_WHILE_162(p, o, s) BOOST_PP_IF(p(163, s), BOOST_PP_WHILE_163, s BOOST_PP_TUPLE_EAT_3)(p, o, o(163, s)) +# define BOOST_PP_WHILE_163(p, o, s) BOOST_PP_IF(p(164, s), BOOST_PP_WHILE_164, s BOOST_PP_TUPLE_EAT_3)(p, o, o(164, s)) +# define BOOST_PP_WHILE_164(p, o, s) BOOST_PP_IF(p(165, s), BOOST_PP_WHILE_165, s BOOST_PP_TUPLE_EAT_3)(p, o, o(165, s)) +# define BOOST_PP_WHILE_165(p, o, s) BOOST_PP_IF(p(166, s), BOOST_PP_WHILE_166, s BOOST_PP_TUPLE_EAT_3)(p, o, o(166, s)) +# define BOOST_PP_WHILE_166(p, o, s) BOOST_PP_IF(p(167, s), BOOST_PP_WHILE_167, s BOOST_PP_TUPLE_EAT_3)(p, o, o(167, s)) +# define BOOST_PP_WHILE_167(p, o, s) BOOST_PP_IF(p(168, s), BOOST_PP_WHILE_168, s BOOST_PP_TUPLE_EAT_3)(p, o, o(168, s)) +# define BOOST_PP_WHILE_168(p, o, s) BOOST_PP_IF(p(169, s), BOOST_PP_WHILE_169, s BOOST_PP_TUPLE_EAT_3)(p, o, o(169, s)) +# define BOOST_PP_WHILE_169(p, o, s) BOOST_PP_IF(p(170, s), BOOST_PP_WHILE_170, s BOOST_PP_TUPLE_EAT_3)(p, o, o(170, s)) +# define BOOST_PP_WHILE_170(p, o, s) BOOST_PP_IF(p(171, s), BOOST_PP_WHILE_171, s BOOST_PP_TUPLE_EAT_3)(p, o, o(171, s)) +# define BOOST_PP_WHILE_171(p, o, s) BOOST_PP_IF(p(172, s), BOOST_PP_WHILE_172, s BOOST_PP_TUPLE_EAT_3)(p, o, o(172, s)) +# define BOOST_PP_WHILE_172(p, o, s) BOOST_PP_IF(p(173, s), BOOST_PP_WHILE_173, s BOOST_PP_TUPLE_EAT_3)(p, o, o(173, s)) +# define BOOST_PP_WHILE_173(p, o, s) BOOST_PP_IF(p(174, s), BOOST_PP_WHILE_174, s BOOST_PP_TUPLE_EAT_3)(p, o, o(174, s)) +# define BOOST_PP_WHILE_174(p, o, s) BOOST_PP_IF(p(175, s), BOOST_PP_WHILE_175, s BOOST_PP_TUPLE_EAT_3)(p, o, o(175, s)) +# define BOOST_PP_WHILE_175(p, o, s) BOOST_PP_IF(p(176, s), BOOST_PP_WHILE_176, s BOOST_PP_TUPLE_EAT_3)(p, o, o(176, s)) +# define BOOST_PP_WHILE_176(p, o, s) BOOST_PP_IF(p(177, s), BOOST_PP_WHILE_177, s BOOST_PP_TUPLE_EAT_3)(p, o, o(177, s)) +# define BOOST_PP_WHILE_177(p, o, s) BOOST_PP_IF(p(178, s), BOOST_PP_WHILE_178, s BOOST_PP_TUPLE_EAT_3)(p, o, o(178, s)) +# define BOOST_PP_WHILE_178(p, o, s) BOOST_PP_IF(p(179, s), BOOST_PP_WHILE_179, s BOOST_PP_TUPLE_EAT_3)(p, o, o(179, s)) +# define BOOST_PP_WHILE_179(p, o, s) BOOST_PP_IF(p(180, s), BOOST_PP_WHILE_180, s BOOST_PP_TUPLE_EAT_3)(p, o, o(180, s)) +# define BOOST_PP_WHILE_180(p, o, s) BOOST_PP_IF(p(181, s), BOOST_PP_WHILE_181, s BOOST_PP_TUPLE_EAT_3)(p, o, o(181, s)) +# define BOOST_PP_WHILE_181(p, o, s) BOOST_PP_IF(p(182, s), BOOST_PP_WHILE_182, s BOOST_PP_TUPLE_EAT_3)(p, o, o(182, s)) +# define BOOST_PP_WHILE_182(p, o, s) BOOST_PP_IF(p(183, s), BOOST_PP_WHILE_183, s BOOST_PP_TUPLE_EAT_3)(p, o, o(183, s)) +# define BOOST_PP_WHILE_183(p, o, s) BOOST_PP_IF(p(184, s), BOOST_PP_WHILE_184, s BOOST_PP_TUPLE_EAT_3)(p, o, o(184, s)) +# define BOOST_PP_WHILE_184(p, o, s) BOOST_PP_IF(p(185, s), BOOST_PP_WHILE_185, s BOOST_PP_TUPLE_EAT_3)(p, o, o(185, s)) +# define BOOST_PP_WHILE_185(p, o, s) BOOST_PP_IF(p(186, s), BOOST_PP_WHILE_186, s BOOST_PP_TUPLE_EAT_3)(p, o, o(186, s)) +# define BOOST_PP_WHILE_186(p, o, s) BOOST_PP_IF(p(187, s), BOOST_PP_WHILE_187, s BOOST_PP_TUPLE_EAT_3)(p, o, o(187, s)) +# define BOOST_PP_WHILE_187(p, o, s) BOOST_PP_IF(p(188, s), BOOST_PP_WHILE_188, s BOOST_PP_TUPLE_EAT_3)(p, o, o(188, s)) +# define BOOST_PP_WHILE_188(p, o, s) BOOST_PP_IF(p(189, s), BOOST_PP_WHILE_189, s BOOST_PP_TUPLE_EAT_3)(p, o, o(189, s)) +# define BOOST_PP_WHILE_189(p, o, s) BOOST_PP_IF(p(190, s), BOOST_PP_WHILE_190, s BOOST_PP_TUPLE_EAT_3)(p, o, o(190, s)) +# define BOOST_PP_WHILE_190(p, o, s) BOOST_PP_IF(p(191, s), BOOST_PP_WHILE_191, s BOOST_PP_TUPLE_EAT_3)(p, o, o(191, s)) +# define BOOST_PP_WHILE_191(p, o, s) BOOST_PP_IF(p(192, s), BOOST_PP_WHILE_192, s BOOST_PP_TUPLE_EAT_3)(p, o, o(192, s)) +# define BOOST_PP_WHILE_192(p, o, s) BOOST_PP_IF(p(193, s), BOOST_PP_WHILE_193, s BOOST_PP_TUPLE_EAT_3)(p, o, o(193, s)) +# define BOOST_PP_WHILE_193(p, o, s) BOOST_PP_IF(p(194, s), BOOST_PP_WHILE_194, s BOOST_PP_TUPLE_EAT_3)(p, o, o(194, s)) +# define BOOST_PP_WHILE_194(p, o, s) BOOST_PP_IF(p(195, s), BOOST_PP_WHILE_195, s BOOST_PP_TUPLE_EAT_3)(p, o, o(195, s)) +# define BOOST_PP_WHILE_195(p, o, s) BOOST_PP_IF(p(196, s), BOOST_PP_WHILE_196, s BOOST_PP_TUPLE_EAT_3)(p, o, o(196, s)) +# define BOOST_PP_WHILE_196(p, o, s) BOOST_PP_IF(p(197, s), BOOST_PP_WHILE_197, s BOOST_PP_TUPLE_EAT_3)(p, o, o(197, s)) +# define BOOST_PP_WHILE_197(p, o, s) BOOST_PP_IF(p(198, s), BOOST_PP_WHILE_198, s BOOST_PP_TUPLE_EAT_3)(p, o, o(198, s)) +# define BOOST_PP_WHILE_198(p, o, s) BOOST_PP_IF(p(199, s), BOOST_PP_WHILE_199, s BOOST_PP_TUPLE_EAT_3)(p, o, o(199, s)) +# define BOOST_PP_WHILE_199(p, o, s) BOOST_PP_IF(p(200, s), BOOST_PP_WHILE_200, s BOOST_PP_TUPLE_EAT_3)(p, o, o(200, s)) +# define BOOST_PP_WHILE_200(p, o, s) BOOST_PP_IF(p(201, s), BOOST_PP_WHILE_201, s BOOST_PP_TUPLE_EAT_3)(p, o, o(201, s)) +# define BOOST_PP_WHILE_201(p, o, s) BOOST_PP_IF(p(202, s), BOOST_PP_WHILE_202, s BOOST_PP_TUPLE_EAT_3)(p, o, o(202, s)) +# define BOOST_PP_WHILE_202(p, o, s) BOOST_PP_IF(p(203, s), BOOST_PP_WHILE_203, s BOOST_PP_TUPLE_EAT_3)(p, o, o(203, s)) +# define BOOST_PP_WHILE_203(p, o, s) BOOST_PP_IF(p(204, s), BOOST_PP_WHILE_204, s BOOST_PP_TUPLE_EAT_3)(p, o, o(204, s)) +# define BOOST_PP_WHILE_204(p, o, s) BOOST_PP_IF(p(205, s), BOOST_PP_WHILE_205, s BOOST_PP_TUPLE_EAT_3)(p, o, o(205, s)) +# define BOOST_PP_WHILE_205(p, o, s) BOOST_PP_IF(p(206, s), BOOST_PP_WHILE_206, s BOOST_PP_TUPLE_EAT_3)(p, o, o(206, s)) +# define BOOST_PP_WHILE_206(p, o, s) BOOST_PP_IF(p(207, s), BOOST_PP_WHILE_207, s BOOST_PP_TUPLE_EAT_3)(p, o, o(207, s)) +# define BOOST_PP_WHILE_207(p, o, s) BOOST_PP_IF(p(208, s), BOOST_PP_WHILE_208, s BOOST_PP_TUPLE_EAT_3)(p, o, o(208, s)) +# define BOOST_PP_WHILE_208(p, o, s) BOOST_PP_IF(p(209, s), BOOST_PP_WHILE_209, s BOOST_PP_TUPLE_EAT_3)(p, o, o(209, s)) +# define BOOST_PP_WHILE_209(p, o, s) BOOST_PP_IF(p(210, s), BOOST_PP_WHILE_210, s BOOST_PP_TUPLE_EAT_3)(p, o, o(210, s)) +# define BOOST_PP_WHILE_210(p, o, s) BOOST_PP_IF(p(211, s), BOOST_PP_WHILE_211, s BOOST_PP_TUPLE_EAT_3)(p, o, o(211, s)) +# define BOOST_PP_WHILE_211(p, o, s) BOOST_PP_IF(p(212, s), BOOST_PP_WHILE_212, s BOOST_PP_TUPLE_EAT_3)(p, o, o(212, s)) +# define BOOST_PP_WHILE_212(p, o, s) BOOST_PP_IF(p(213, s), BOOST_PP_WHILE_213, s BOOST_PP_TUPLE_EAT_3)(p, o, o(213, s)) +# define BOOST_PP_WHILE_213(p, o, s) BOOST_PP_IF(p(214, s), BOOST_PP_WHILE_214, s BOOST_PP_TUPLE_EAT_3)(p, o, o(214, s)) +# define BOOST_PP_WHILE_214(p, o, s) BOOST_PP_IF(p(215, s), BOOST_PP_WHILE_215, s BOOST_PP_TUPLE_EAT_3)(p, o, o(215, s)) +# define BOOST_PP_WHILE_215(p, o, s) BOOST_PP_IF(p(216, s), BOOST_PP_WHILE_216, s BOOST_PP_TUPLE_EAT_3)(p, o, o(216, s)) +# define BOOST_PP_WHILE_216(p, o, s) BOOST_PP_IF(p(217, s), BOOST_PP_WHILE_217, s BOOST_PP_TUPLE_EAT_3)(p, o, o(217, s)) +# define BOOST_PP_WHILE_217(p, o, s) BOOST_PP_IF(p(218, s), BOOST_PP_WHILE_218, s BOOST_PP_TUPLE_EAT_3)(p, o, o(218, s)) +# define BOOST_PP_WHILE_218(p, o, s) BOOST_PP_IF(p(219, s), BOOST_PP_WHILE_219, s BOOST_PP_TUPLE_EAT_3)(p, o, o(219, s)) +# define BOOST_PP_WHILE_219(p, o, s) BOOST_PP_IF(p(220, s), BOOST_PP_WHILE_220, s BOOST_PP_TUPLE_EAT_3)(p, o, o(220, s)) +# define BOOST_PP_WHILE_220(p, o, s) BOOST_PP_IF(p(221, s), BOOST_PP_WHILE_221, s BOOST_PP_TUPLE_EAT_3)(p, o, o(221, s)) +# define BOOST_PP_WHILE_221(p, o, s) BOOST_PP_IF(p(222, s), BOOST_PP_WHILE_222, s BOOST_PP_TUPLE_EAT_3)(p, o, o(222, s)) +# define BOOST_PP_WHILE_222(p, o, s) BOOST_PP_IF(p(223, s), BOOST_PP_WHILE_223, s BOOST_PP_TUPLE_EAT_3)(p, o, o(223, s)) +# define BOOST_PP_WHILE_223(p, o, s) BOOST_PP_IF(p(224, s), BOOST_PP_WHILE_224, s BOOST_PP_TUPLE_EAT_3)(p, o, o(224, s)) +# define BOOST_PP_WHILE_224(p, o, s) BOOST_PP_IF(p(225, s), BOOST_PP_WHILE_225, s BOOST_PP_TUPLE_EAT_3)(p, o, o(225, s)) +# define BOOST_PP_WHILE_225(p, o, s) BOOST_PP_IF(p(226, s), BOOST_PP_WHILE_226, s BOOST_PP_TUPLE_EAT_3)(p, o, o(226, s)) +# define BOOST_PP_WHILE_226(p, o, s) BOOST_PP_IF(p(227, s), BOOST_PP_WHILE_227, s BOOST_PP_TUPLE_EAT_3)(p, o, o(227, s)) +# define BOOST_PP_WHILE_227(p, o, s) BOOST_PP_IF(p(228, s), BOOST_PP_WHILE_228, s BOOST_PP_TUPLE_EAT_3)(p, o, o(228, s)) +# define BOOST_PP_WHILE_228(p, o, s) BOOST_PP_IF(p(229, s), BOOST_PP_WHILE_229, s BOOST_PP_TUPLE_EAT_3)(p, o, o(229, s)) +# define BOOST_PP_WHILE_229(p, o, s) BOOST_PP_IF(p(230, s), BOOST_PP_WHILE_230, s BOOST_PP_TUPLE_EAT_3)(p, o, o(230, s)) +# define BOOST_PP_WHILE_230(p, o, s) BOOST_PP_IF(p(231, s), BOOST_PP_WHILE_231, s BOOST_PP_TUPLE_EAT_3)(p, o, o(231, s)) +# define BOOST_PP_WHILE_231(p, o, s) BOOST_PP_IF(p(232, s), BOOST_PP_WHILE_232, s BOOST_PP_TUPLE_EAT_3)(p, o, o(232, s)) +# define BOOST_PP_WHILE_232(p, o, s) BOOST_PP_IF(p(233, s), BOOST_PP_WHILE_233, s BOOST_PP_TUPLE_EAT_3)(p, o, o(233, s)) +# define BOOST_PP_WHILE_233(p, o, s) BOOST_PP_IF(p(234, s), BOOST_PP_WHILE_234, s BOOST_PP_TUPLE_EAT_3)(p, o, o(234, s)) +# define BOOST_PP_WHILE_234(p, o, s) BOOST_PP_IF(p(235, s), BOOST_PP_WHILE_235, s BOOST_PP_TUPLE_EAT_3)(p, o, o(235, s)) +# define BOOST_PP_WHILE_235(p, o, s) BOOST_PP_IF(p(236, s), BOOST_PP_WHILE_236, s BOOST_PP_TUPLE_EAT_3)(p, o, o(236, s)) +# define BOOST_PP_WHILE_236(p, o, s) BOOST_PP_IF(p(237, s), BOOST_PP_WHILE_237, s BOOST_PP_TUPLE_EAT_3)(p, o, o(237, s)) +# define BOOST_PP_WHILE_237(p, o, s) BOOST_PP_IF(p(238, s), BOOST_PP_WHILE_238, s BOOST_PP_TUPLE_EAT_3)(p, o, o(238, s)) +# define BOOST_PP_WHILE_238(p, o, s) BOOST_PP_IF(p(239, s), BOOST_PP_WHILE_239, s BOOST_PP_TUPLE_EAT_3)(p, o, o(239, s)) +# define BOOST_PP_WHILE_239(p, o, s) BOOST_PP_IF(p(240, s), BOOST_PP_WHILE_240, s BOOST_PP_TUPLE_EAT_3)(p, o, o(240, s)) +# define BOOST_PP_WHILE_240(p, o, s) BOOST_PP_IF(p(241, s), BOOST_PP_WHILE_241, s BOOST_PP_TUPLE_EAT_3)(p, o, o(241, s)) +# define BOOST_PP_WHILE_241(p, o, s) BOOST_PP_IF(p(242, s), BOOST_PP_WHILE_242, s BOOST_PP_TUPLE_EAT_3)(p, o, o(242, s)) +# define BOOST_PP_WHILE_242(p, o, s) BOOST_PP_IF(p(243, s), BOOST_PP_WHILE_243, s BOOST_PP_TUPLE_EAT_3)(p, o, o(243, s)) +# define BOOST_PP_WHILE_243(p, o, s) BOOST_PP_IF(p(244, s), BOOST_PP_WHILE_244, s BOOST_PP_TUPLE_EAT_3)(p, o, o(244, s)) +# define BOOST_PP_WHILE_244(p, o, s) BOOST_PP_IF(p(245, s), BOOST_PP_WHILE_245, s BOOST_PP_TUPLE_EAT_3)(p, o, o(245, s)) +# define BOOST_PP_WHILE_245(p, o, s) BOOST_PP_IF(p(246, s), BOOST_PP_WHILE_246, s BOOST_PP_TUPLE_EAT_3)(p, o, o(246, s)) +# define BOOST_PP_WHILE_246(p, o, s) BOOST_PP_IF(p(247, s), BOOST_PP_WHILE_247, s BOOST_PP_TUPLE_EAT_3)(p, o, o(247, s)) +# define BOOST_PP_WHILE_247(p, o, s) BOOST_PP_IF(p(248, s), BOOST_PP_WHILE_248, s BOOST_PP_TUPLE_EAT_3)(p, o, o(248, s)) +# define BOOST_PP_WHILE_248(p, o, s) BOOST_PP_IF(p(249, s), BOOST_PP_WHILE_249, s BOOST_PP_TUPLE_EAT_3)(p, o, o(249, s)) +# define BOOST_PP_WHILE_249(p, o, s) BOOST_PP_IF(p(250, s), BOOST_PP_WHILE_250, s BOOST_PP_TUPLE_EAT_3)(p, o, o(250, s)) +# define BOOST_PP_WHILE_250(p, o, s) BOOST_PP_IF(p(251, s), BOOST_PP_WHILE_251, s BOOST_PP_TUPLE_EAT_3)(p, o, o(251, s)) +# define BOOST_PP_WHILE_251(p, o, s) BOOST_PP_IF(p(252, s), BOOST_PP_WHILE_252, s BOOST_PP_TUPLE_EAT_3)(p, o, o(252, s)) +# define BOOST_PP_WHILE_252(p, o, s) BOOST_PP_IF(p(253, s), BOOST_PP_WHILE_253, s BOOST_PP_TUPLE_EAT_3)(p, o, o(253, s)) +# define BOOST_PP_WHILE_253(p, o, s) BOOST_PP_IF(p(254, s), BOOST_PP_WHILE_254, s BOOST_PP_TUPLE_EAT_3)(p, o, o(254, s)) +# define BOOST_PP_WHILE_254(p, o, s) BOOST_PP_IF(p(255, s), BOOST_PP_WHILE_255, s BOOST_PP_TUPLE_EAT_3)(p, o, o(255, s)) +# define BOOST_PP_WHILE_255(p, o, s) BOOST_PP_IF(p(256, s), BOOST_PP_WHILE_256, s BOOST_PP_TUPLE_EAT_3)(p, o, o(256, s)) +# define BOOST_PP_WHILE_256(p, o, s) BOOST_PP_IF(p(257, s), BOOST_PP_WHILE_257, s BOOST_PP_TUPLE_EAT_3)(p, o, o(257, s)) +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/control/detail/while.hpp b/ThirdParty/boost-Subset/boost/preprocessor/control/detail/while.hpp new file mode 100644 index 0000000000..7315e1de9d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/control/detail/while.hpp @@ -0,0 +1,536 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_CONTROL_DETAIL_WHILE_HPP +# define BOOST_PREPROCESSOR_CONTROL_DETAIL_WHILE_HPP +# +# include +# include +# include +# +# define BOOST_PP_WHILE_1(p, o, s) BOOST_PP_WHILE_1_C(BOOST_PP_BOOL(p(2, s)), p, o, s) +# define BOOST_PP_WHILE_2(p, o, s) BOOST_PP_WHILE_2_C(BOOST_PP_BOOL(p(3, s)), p, o, s) +# define BOOST_PP_WHILE_3(p, o, s) BOOST_PP_WHILE_3_C(BOOST_PP_BOOL(p(4, s)), p, o, s) +# define BOOST_PP_WHILE_4(p, o, s) BOOST_PP_WHILE_4_C(BOOST_PP_BOOL(p(5, s)), p, o, s) +# define BOOST_PP_WHILE_5(p, o, s) BOOST_PP_WHILE_5_C(BOOST_PP_BOOL(p(6, s)), p, o, s) +# define BOOST_PP_WHILE_6(p, o, s) BOOST_PP_WHILE_6_C(BOOST_PP_BOOL(p(7, s)), p, o, s) +# define BOOST_PP_WHILE_7(p, o, s) BOOST_PP_WHILE_7_C(BOOST_PP_BOOL(p(8, s)), p, o, s) +# define BOOST_PP_WHILE_8(p, o, s) BOOST_PP_WHILE_8_C(BOOST_PP_BOOL(p(9, s)), p, o, s) +# define BOOST_PP_WHILE_9(p, o, s) BOOST_PP_WHILE_9_C(BOOST_PP_BOOL(p(10, s)), p, o, s) +# define BOOST_PP_WHILE_10(p, o, s) BOOST_PP_WHILE_10_C(BOOST_PP_BOOL(p(11, s)), p, o, s) +# define BOOST_PP_WHILE_11(p, o, s) BOOST_PP_WHILE_11_C(BOOST_PP_BOOL(p(12, s)), p, o, s) +# define BOOST_PP_WHILE_12(p, o, s) BOOST_PP_WHILE_12_C(BOOST_PP_BOOL(p(13, s)), p, o, s) +# define BOOST_PP_WHILE_13(p, o, s) BOOST_PP_WHILE_13_C(BOOST_PP_BOOL(p(14, s)), p, o, s) +# define BOOST_PP_WHILE_14(p, o, s) BOOST_PP_WHILE_14_C(BOOST_PP_BOOL(p(15, s)), p, o, s) +# define BOOST_PP_WHILE_15(p, o, s) BOOST_PP_WHILE_15_C(BOOST_PP_BOOL(p(16, s)), p, o, s) +# define BOOST_PP_WHILE_16(p, o, s) BOOST_PP_WHILE_16_C(BOOST_PP_BOOL(p(17, s)), p, o, s) +# define BOOST_PP_WHILE_17(p, o, s) BOOST_PP_WHILE_17_C(BOOST_PP_BOOL(p(18, s)), p, o, s) +# define BOOST_PP_WHILE_18(p, o, s) BOOST_PP_WHILE_18_C(BOOST_PP_BOOL(p(19, s)), p, o, s) +# define BOOST_PP_WHILE_19(p, o, s) BOOST_PP_WHILE_19_C(BOOST_PP_BOOL(p(20, s)), p, o, s) +# define BOOST_PP_WHILE_20(p, o, s) BOOST_PP_WHILE_20_C(BOOST_PP_BOOL(p(21, s)), p, o, s) +# define BOOST_PP_WHILE_21(p, o, s) BOOST_PP_WHILE_21_C(BOOST_PP_BOOL(p(22, s)), p, o, s) +# define BOOST_PP_WHILE_22(p, o, s) BOOST_PP_WHILE_22_C(BOOST_PP_BOOL(p(23, s)), p, o, s) +# define BOOST_PP_WHILE_23(p, o, s) BOOST_PP_WHILE_23_C(BOOST_PP_BOOL(p(24, s)), p, o, s) +# define BOOST_PP_WHILE_24(p, o, s) BOOST_PP_WHILE_24_C(BOOST_PP_BOOL(p(25, s)), p, o, s) +# define BOOST_PP_WHILE_25(p, o, s) BOOST_PP_WHILE_25_C(BOOST_PP_BOOL(p(26, s)), p, o, s) +# define BOOST_PP_WHILE_26(p, o, s) BOOST_PP_WHILE_26_C(BOOST_PP_BOOL(p(27, s)), p, o, s) +# define BOOST_PP_WHILE_27(p, o, s) BOOST_PP_WHILE_27_C(BOOST_PP_BOOL(p(28, s)), p, o, s) +# define BOOST_PP_WHILE_28(p, o, s) BOOST_PP_WHILE_28_C(BOOST_PP_BOOL(p(29, s)), p, o, s) +# define BOOST_PP_WHILE_29(p, o, s) BOOST_PP_WHILE_29_C(BOOST_PP_BOOL(p(30, s)), p, o, s) +# define BOOST_PP_WHILE_30(p, o, s) BOOST_PP_WHILE_30_C(BOOST_PP_BOOL(p(31, s)), p, o, s) +# define BOOST_PP_WHILE_31(p, o, s) BOOST_PP_WHILE_31_C(BOOST_PP_BOOL(p(32, s)), p, o, s) +# define BOOST_PP_WHILE_32(p, o, s) BOOST_PP_WHILE_32_C(BOOST_PP_BOOL(p(33, s)), p, o, s) +# define BOOST_PP_WHILE_33(p, o, s) BOOST_PP_WHILE_33_C(BOOST_PP_BOOL(p(34, s)), p, o, s) +# define BOOST_PP_WHILE_34(p, o, s) BOOST_PP_WHILE_34_C(BOOST_PP_BOOL(p(35, s)), p, o, s) +# define BOOST_PP_WHILE_35(p, o, s) BOOST_PP_WHILE_35_C(BOOST_PP_BOOL(p(36, s)), p, o, s) +# define BOOST_PP_WHILE_36(p, o, s) BOOST_PP_WHILE_36_C(BOOST_PP_BOOL(p(37, s)), p, o, s) +# define BOOST_PP_WHILE_37(p, o, s) BOOST_PP_WHILE_37_C(BOOST_PP_BOOL(p(38, s)), p, o, s) +# define BOOST_PP_WHILE_38(p, o, s) BOOST_PP_WHILE_38_C(BOOST_PP_BOOL(p(39, s)), p, o, s) +# define BOOST_PP_WHILE_39(p, o, s) BOOST_PP_WHILE_39_C(BOOST_PP_BOOL(p(40, s)), p, o, s) +# define BOOST_PP_WHILE_40(p, o, s) BOOST_PP_WHILE_40_C(BOOST_PP_BOOL(p(41, s)), p, o, s) +# define BOOST_PP_WHILE_41(p, o, s) BOOST_PP_WHILE_41_C(BOOST_PP_BOOL(p(42, s)), p, o, s) +# define BOOST_PP_WHILE_42(p, o, s) BOOST_PP_WHILE_42_C(BOOST_PP_BOOL(p(43, s)), p, o, s) +# define BOOST_PP_WHILE_43(p, o, s) BOOST_PP_WHILE_43_C(BOOST_PP_BOOL(p(44, s)), p, o, s) +# define BOOST_PP_WHILE_44(p, o, s) BOOST_PP_WHILE_44_C(BOOST_PP_BOOL(p(45, s)), p, o, s) +# define BOOST_PP_WHILE_45(p, o, s) BOOST_PP_WHILE_45_C(BOOST_PP_BOOL(p(46, s)), p, o, s) +# define BOOST_PP_WHILE_46(p, o, s) BOOST_PP_WHILE_46_C(BOOST_PP_BOOL(p(47, s)), p, o, s) +# define BOOST_PP_WHILE_47(p, o, s) BOOST_PP_WHILE_47_C(BOOST_PP_BOOL(p(48, s)), p, o, s) +# define BOOST_PP_WHILE_48(p, o, s) BOOST_PP_WHILE_48_C(BOOST_PP_BOOL(p(49, s)), p, o, s) +# define BOOST_PP_WHILE_49(p, o, s) BOOST_PP_WHILE_49_C(BOOST_PP_BOOL(p(50, s)), p, o, s) +# define BOOST_PP_WHILE_50(p, o, s) BOOST_PP_WHILE_50_C(BOOST_PP_BOOL(p(51, s)), p, o, s) +# define BOOST_PP_WHILE_51(p, o, s) BOOST_PP_WHILE_51_C(BOOST_PP_BOOL(p(52, s)), p, o, s) +# define BOOST_PP_WHILE_52(p, o, s) BOOST_PP_WHILE_52_C(BOOST_PP_BOOL(p(53, s)), p, o, s) +# define BOOST_PP_WHILE_53(p, o, s) BOOST_PP_WHILE_53_C(BOOST_PP_BOOL(p(54, s)), p, o, s) +# define BOOST_PP_WHILE_54(p, o, s) BOOST_PP_WHILE_54_C(BOOST_PP_BOOL(p(55, s)), p, o, s) +# define BOOST_PP_WHILE_55(p, o, s) BOOST_PP_WHILE_55_C(BOOST_PP_BOOL(p(56, s)), p, o, s) +# define BOOST_PP_WHILE_56(p, o, s) BOOST_PP_WHILE_56_C(BOOST_PP_BOOL(p(57, s)), p, o, s) +# define BOOST_PP_WHILE_57(p, o, s) BOOST_PP_WHILE_57_C(BOOST_PP_BOOL(p(58, s)), p, o, s) +# define BOOST_PP_WHILE_58(p, o, s) BOOST_PP_WHILE_58_C(BOOST_PP_BOOL(p(59, s)), p, o, s) +# define BOOST_PP_WHILE_59(p, o, s) BOOST_PP_WHILE_59_C(BOOST_PP_BOOL(p(60, s)), p, o, s) +# define BOOST_PP_WHILE_60(p, o, s) BOOST_PP_WHILE_60_C(BOOST_PP_BOOL(p(61, s)), p, o, s) +# define BOOST_PP_WHILE_61(p, o, s) BOOST_PP_WHILE_61_C(BOOST_PP_BOOL(p(62, s)), p, o, s) +# define BOOST_PP_WHILE_62(p, o, s) BOOST_PP_WHILE_62_C(BOOST_PP_BOOL(p(63, s)), p, o, s) +# define BOOST_PP_WHILE_63(p, o, s) BOOST_PP_WHILE_63_C(BOOST_PP_BOOL(p(64, s)), p, o, s) +# define BOOST_PP_WHILE_64(p, o, s) BOOST_PP_WHILE_64_C(BOOST_PP_BOOL(p(65, s)), p, o, s) +# define BOOST_PP_WHILE_65(p, o, s) BOOST_PP_WHILE_65_C(BOOST_PP_BOOL(p(66, s)), p, o, s) +# define BOOST_PP_WHILE_66(p, o, s) BOOST_PP_WHILE_66_C(BOOST_PP_BOOL(p(67, s)), p, o, s) +# define BOOST_PP_WHILE_67(p, o, s) BOOST_PP_WHILE_67_C(BOOST_PP_BOOL(p(68, s)), p, o, s) +# define BOOST_PP_WHILE_68(p, o, s) BOOST_PP_WHILE_68_C(BOOST_PP_BOOL(p(69, s)), p, o, s) +# define BOOST_PP_WHILE_69(p, o, s) BOOST_PP_WHILE_69_C(BOOST_PP_BOOL(p(70, s)), p, o, s) +# define BOOST_PP_WHILE_70(p, o, s) BOOST_PP_WHILE_70_C(BOOST_PP_BOOL(p(71, s)), p, o, s) +# define BOOST_PP_WHILE_71(p, o, s) BOOST_PP_WHILE_71_C(BOOST_PP_BOOL(p(72, s)), p, o, s) +# define BOOST_PP_WHILE_72(p, o, s) BOOST_PP_WHILE_72_C(BOOST_PP_BOOL(p(73, s)), p, o, s) +# define BOOST_PP_WHILE_73(p, o, s) BOOST_PP_WHILE_73_C(BOOST_PP_BOOL(p(74, s)), p, o, s) +# define BOOST_PP_WHILE_74(p, o, s) BOOST_PP_WHILE_74_C(BOOST_PP_BOOL(p(75, s)), p, o, s) +# define BOOST_PP_WHILE_75(p, o, s) BOOST_PP_WHILE_75_C(BOOST_PP_BOOL(p(76, s)), p, o, s) +# define BOOST_PP_WHILE_76(p, o, s) BOOST_PP_WHILE_76_C(BOOST_PP_BOOL(p(77, s)), p, o, s) +# define BOOST_PP_WHILE_77(p, o, s) BOOST_PP_WHILE_77_C(BOOST_PP_BOOL(p(78, s)), p, o, s) +# define BOOST_PP_WHILE_78(p, o, s) BOOST_PP_WHILE_78_C(BOOST_PP_BOOL(p(79, s)), p, o, s) +# define BOOST_PP_WHILE_79(p, o, s) BOOST_PP_WHILE_79_C(BOOST_PP_BOOL(p(80, s)), p, o, s) +# define BOOST_PP_WHILE_80(p, o, s) BOOST_PP_WHILE_80_C(BOOST_PP_BOOL(p(81, s)), p, o, s) +# define BOOST_PP_WHILE_81(p, o, s) BOOST_PP_WHILE_81_C(BOOST_PP_BOOL(p(82, s)), p, o, s) +# define BOOST_PP_WHILE_82(p, o, s) BOOST_PP_WHILE_82_C(BOOST_PP_BOOL(p(83, s)), p, o, s) +# define BOOST_PP_WHILE_83(p, o, s) BOOST_PP_WHILE_83_C(BOOST_PP_BOOL(p(84, s)), p, o, s) +# define BOOST_PP_WHILE_84(p, o, s) BOOST_PP_WHILE_84_C(BOOST_PP_BOOL(p(85, s)), p, o, s) +# define BOOST_PP_WHILE_85(p, o, s) BOOST_PP_WHILE_85_C(BOOST_PP_BOOL(p(86, s)), p, o, s) +# define BOOST_PP_WHILE_86(p, o, s) BOOST_PP_WHILE_86_C(BOOST_PP_BOOL(p(87, s)), p, o, s) +# define BOOST_PP_WHILE_87(p, o, s) BOOST_PP_WHILE_87_C(BOOST_PP_BOOL(p(88, s)), p, o, s) +# define BOOST_PP_WHILE_88(p, o, s) BOOST_PP_WHILE_88_C(BOOST_PP_BOOL(p(89, s)), p, o, s) +# define BOOST_PP_WHILE_89(p, o, s) BOOST_PP_WHILE_89_C(BOOST_PP_BOOL(p(90, s)), p, o, s) +# define BOOST_PP_WHILE_90(p, o, s) BOOST_PP_WHILE_90_C(BOOST_PP_BOOL(p(91, s)), p, o, s) +# define BOOST_PP_WHILE_91(p, o, s) BOOST_PP_WHILE_91_C(BOOST_PP_BOOL(p(92, s)), p, o, s) +# define BOOST_PP_WHILE_92(p, o, s) BOOST_PP_WHILE_92_C(BOOST_PP_BOOL(p(93, s)), p, o, s) +# define BOOST_PP_WHILE_93(p, o, s) BOOST_PP_WHILE_93_C(BOOST_PP_BOOL(p(94, s)), p, o, s) +# define BOOST_PP_WHILE_94(p, o, s) BOOST_PP_WHILE_94_C(BOOST_PP_BOOL(p(95, s)), p, o, s) +# define BOOST_PP_WHILE_95(p, o, s) BOOST_PP_WHILE_95_C(BOOST_PP_BOOL(p(96, s)), p, o, s) +# define BOOST_PP_WHILE_96(p, o, s) BOOST_PP_WHILE_96_C(BOOST_PP_BOOL(p(97, s)), p, o, s) +# define BOOST_PP_WHILE_97(p, o, s) BOOST_PP_WHILE_97_C(BOOST_PP_BOOL(p(98, s)), p, o, s) +# define BOOST_PP_WHILE_98(p, o, s) BOOST_PP_WHILE_98_C(BOOST_PP_BOOL(p(99, s)), p, o, s) +# define BOOST_PP_WHILE_99(p, o, s) BOOST_PP_WHILE_99_C(BOOST_PP_BOOL(p(100, s)), p, o, s) +# define BOOST_PP_WHILE_100(p, o, s) BOOST_PP_WHILE_100_C(BOOST_PP_BOOL(p(101, s)), p, o, s) +# define BOOST_PP_WHILE_101(p, o, s) BOOST_PP_WHILE_101_C(BOOST_PP_BOOL(p(102, s)), p, o, s) +# define BOOST_PP_WHILE_102(p, o, s) BOOST_PP_WHILE_102_C(BOOST_PP_BOOL(p(103, s)), p, o, s) +# define BOOST_PP_WHILE_103(p, o, s) BOOST_PP_WHILE_103_C(BOOST_PP_BOOL(p(104, s)), p, o, s) +# define BOOST_PP_WHILE_104(p, o, s) BOOST_PP_WHILE_104_C(BOOST_PP_BOOL(p(105, s)), p, o, s) +# define BOOST_PP_WHILE_105(p, o, s) BOOST_PP_WHILE_105_C(BOOST_PP_BOOL(p(106, s)), p, o, s) +# define BOOST_PP_WHILE_106(p, o, s) BOOST_PP_WHILE_106_C(BOOST_PP_BOOL(p(107, s)), p, o, s) +# define BOOST_PP_WHILE_107(p, o, s) BOOST_PP_WHILE_107_C(BOOST_PP_BOOL(p(108, s)), p, o, s) +# define BOOST_PP_WHILE_108(p, o, s) BOOST_PP_WHILE_108_C(BOOST_PP_BOOL(p(109, s)), p, o, s) +# define BOOST_PP_WHILE_109(p, o, s) BOOST_PP_WHILE_109_C(BOOST_PP_BOOL(p(110, s)), p, o, s) +# define BOOST_PP_WHILE_110(p, o, s) BOOST_PP_WHILE_110_C(BOOST_PP_BOOL(p(111, s)), p, o, s) +# define BOOST_PP_WHILE_111(p, o, s) BOOST_PP_WHILE_111_C(BOOST_PP_BOOL(p(112, s)), p, o, s) +# define BOOST_PP_WHILE_112(p, o, s) BOOST_PP_WHILE_112_C(BOOST_PP_BOOL(p(113, s)), p, o, s) +# define BOOST_PP_WHILE_113(p, o, s) BOOST_PP_WHILE_113_C(BOOST_PP_BOOL(p(114, s)), p, o, s) +# define BOOST_PP_WHILE_114(p, o, s) BOOST_PP_WHILE_114_C(BOOST_PP_BOOL(p(115, s)), p, o, s) +# define BOOST_PP_WHILE_115(p, o, s) BOOST_PP_WHILE_115_C(BOOST_PP_BOOL(p(116, s)), p, o, s) +# define BOOST_PP_WHILE_116(p, o, s) BOOST_PP_WHILE_116_C(BOOST_PP_BOOL(p(117, s)), p, o, s) +# define BOOST_PP_WHILE_117(p, o, s) BOOST_PP_WHILE_117_C(BOOST_PP_BOOL(p(118, s)), p, o, s) +# define BOOST_PP_WHILE_118(p, o, s) BOOST_PP_WHILE_118_C(BOOST_PP_BOOL(p(119, s)), p, o, s) +# define BOOST_PP_WHILE_119(p, o, s) BOOST_PP_WHILE_119_C(BOOST_PP_BOOL(p(120, s)), p, o, s) +# define BOOST_PP_WHILE_120(p, o, s) BOOST_PP_WHILE_120_C(BOOST_PP_BOOL(p(121, s)), p, o, s) +# define BOOST_PP_WHILE_121(p, o, s) BOOST_PP_WHILE_121_C(BOOST_PP_BOOL(p(122, s)), p, o, s) +# define BOOST_PP_WHILE_122(p, o, s) BOOST_PP_WHILE_122_C(BOOST_PP_BOOL(p(123, s)), p, o, s) +# define BOOST_PP_WHILE_123(p, o, s) BOOST_PP_WHILE_123_C(BOOST_PP_BOOL(p(124, s)), p, o, s) +# define BOOST_PP_WHILE_124(p, o, s) BOOST_PP_WHILE_124_C(BOOST_PP_BOOL(p(125, s)), p, o, s) +# define BOOST_PP_WHILE_125(p, o, s) BOOST_PP_WHILE_125_C(BOOST_PP_BOOL(p(126, s)), p, o, s) +# define BOOST_PP_WHILE_126(p, o, s) BOOST_PP_WHILE_126_C(BOOST_PP_BOOL(p(127, s)), p, o, s) +# define BOOST_PP_WHILE_127(p, o, s) BOOST_PP_WHILE_127_C(BOOST_PP_BOOL(p(128, s)), p, o, s) +# define BOOST_PP_WHILE_128(p, o, s) BOOST_PP_WHILE_128_C(BOOST_PP_BOOL(p(129, s)), p, o, s) +# define BOOST_PP_WHILE_129(p, o, s) BOOST_PP_WHILE_129_C(BOOST_PP_BOOL(p(130, s)), p, o, s) +# define BOOST_PP_WHILE_130(p, o, s) BOOST_PP_WHILE_130_C(BOOST_PP_BOOL(p(131, s)), p, o, s) +# define BOOST_PP_WHILE_131(p, o, s) BOOST_PP_WHILE_131_C(BOOST_PP_BOOL(p(132, s)), p, o, s) +# define BOOST_PP_WHILE_132(p, o, s) BOOST_PP_WHILE_132_C(BOOST_PP_BOOL(p(133, s)), p, o, s) +# define BOOST_PP_WHILE_133(p, o, s) BOOST_PP_WHILE_133_C(BOOST_PP_BOOL(p(134, s)), p, o, s) +# define BOOST_PP_WHILE_134(p, o, s) BOOST_PP_WHILE_134_C(BOOST_PP_BOOL(p(135, s)), p, o, s) +# define BOOST_PP_WHILE_135(p, o, s) BOOST_PP_WHILE_135_C(BOOST_PP_BOOL(p(136, s)), p, o, s) +# define BOOST_PP_WHILE_136(p, o, s) BOOST_PP_WHILE_136_C(BOOST_PP_BOOL(p(137, s)), p, o, s) +# define BOOST_PP_WHILE_137(p, o, s) BOOST_PP_WHILE_137_C(BOOST_PP_BOOL(p(138, s)), p, o, s) +# define BOOST_PP_WHILE_138(p, o, s) BOOST_PP_WHILE_138_C(BOOST_PP_BOOL(p(139, s)), p, o, s) +# define BOOST_PP_WHILE_139(p, o, s) BOOST_PP_WHILE_139_C(BOOST_PP_BOOL(p(140, s)), p, o, s) +# define BOOST_PP_WHILE_140(p, o, s) BOOST_PP_WHILE_140_C(BOOST_PP_BOOL(p(141, s)), p, o, s) +# define BOOST_PP_WHILE_141(p, o, s) BOOST_PP_WHILE_141_C(BOOST_PP_BOOL(p(142, s)), p, o, s) +# define BOOST_PP_WHILE_142(p, o, s) BOOST_PP_WHILE_142_C(BOOST_PP_BOOL(p(143, s)), p, o, s) +# define BOOST_PP_WHILE_143(p, o, s) BOOST_PP_WHILE_143_C(BOOST_PP_BOOL(p(144, s)), p, o, s) +# define BOOST_PP_WHILE_144(p, o, s) BOOST_PP_WHILE_144_C(BOOST_PP_BOOL(p(145, s)), p, o, s) +# define BOOST_PP_WHILE_145(p, o, s) BOOST_PP_WHILE_145_C(BOOST_PP_BOOL(p(146, s)), p, o, s) +# define BOOST_PP_WHILE_146(p, o, s) BOOST_PP_WHILE_146_C(BOOST_PP_BOOL(p(147, s)), p, o, s) +# define BOOST_PP_WHILE_147(p, o, s) BOOST_PP_WHILE_147_C(BOOST_PP_BOOL(p(148, s)), p, o, s) +# define BOOST_PP_WHILE_148(p, o, s) BOOST_PP_WHILE_148_C(BOOST_PP_BOOL(p(149, s)), p, o, s) +# define BOOST_PP_WHILE_149(p, o, s) BOOST_PP_WHILE_149_C(BOOST_PP_BOOL(p(150, s)), p, o, s) +# define BOOST_PP_WHILE_150(p, o, s) BOOST_PP_WHILE_150_C(BOOST_PP_BOOL(p(151, s)), p, o, s) +# define BOOST_PP_WHILE_151(p, o, s) BOOST_PP_WHILE_151_C(BOOST_PP_BOOL(p(152, s)), p, o, s) +# define BOOST_PP_WHILE_152(p, o, s) BOOST_PP_WHILE_152_C(BOOST_PP_BOOL(p(153, s)), p, o, s) +# define BOOST_PP_WHILE_153(p, o, s) BOOST_PP_WHILE_153_C(BOOST_PP_BOOL(p(154, s)), p, o, s) +# define BOOST_PP_WHILE_154(p, o, s) BOOST_PP_WHILE_154_C(BOOST_PP_BOOL(p(155, s)), p, o, s) +# define BOOST_PP_WHILE_155(p, o, s) BOOST_PP_WHILE_155_C(BOOST_PP_BOOL(p(156, s)), p, o, s) +# define BOOST_PP_WHILE_156(p, o, s) BOOST_PP_WHILE_156_C(BOOST_PP_BOOL(p(157, s)), p, o, s) +# define BOOST_PP_WHILE_157(p, o, s) BOOST_PP_WHILE_157_C(BOOST_PP_BOOL(p(158, s)), p, o, s) +# define BOOST_PP_WHILE_158(p, o, s) BOOST_PP_WHILE_158_C(BOOST_PP_BOOL(p(159, s)), p, o, s) +# define BOOST_PP_WHILE_159(p, o, s) BOOST_PP_WHILE_159_C(BOOST_PP_BOOL(p(160, s)), p, o, s) +# define BOOST_PP_WHILE_160(p, o, s) BOOST_PP_WHILE_160_C(BOOST_PP_BOOL(p(161, s)), p, o, s) +# define BOOST_PP_WHILE_161(p, o, s) BOOST_PP_WHILE_161_C(BOOST_PP_BOOL(p(162, s)), p, o, s) +# define BOOST_PP_WHILE_162(p, o, s) BOOST_PP_WHILE_162_C(BOOST_PP_BOOL(p(163, s)), p, o, s) +# define BOOST_PP_WHILE_163(p, o, s) BOOST_PP_WHILE_163_C(BOOST_PP_BOOL(p(164, s)), p, o, s) +# define BOOST_PP_WHILE_164(p, o, s) BOOST_PP_WHILE_164_C(BOOST_PP_BOOL(p(165, s)), p, o, s) +# define BOOST_PP_WHILE_165(p, o, s) BOOST_PP_WHILE_165_C(BOOST_PP_BOOL(p(166, s)), p, o, s) +# define BOOST_PP_WHILE_166(p, o, s) BOOST_PP_WHILE_166_C(BOOST_PP_BOOL(p(167, s)), p, o, s) +# define BOOST_PP_WHILE_167(p, o, s) BOOST_PP_WHILE_167_C(BOOST_PP_BOOL(p(168, s)), p, o, s) +# define BOOST_PP_WHILE_168(p, o, s) BOOST_PP_WHILE_168_C(BOOST_PP_BOOL(p(169, s)), p, o, s) +# define BOOST_PP_WHILE_169(p, o, s) BOOST_PP_WHILE_169_C(BOOST_PP_BOOL(p(170, s)), p, o, s) +# define BOOST_PP_WHILE_170(p, o, s) BOOST_PP_WHILE_170_C(BOOST_PP_BOOL(p(171, s)), p, o, s) +# define BOOST_PP_WHILE_171(p, o, s) BOOST_PP_WHILE_171_C(BOOST_PP_BOOL(p(172, s)), p, o, s) +# define BOOST_PP_WHILE_172(p, o, s) BOOST_PP_WHILE_172_C(BOOST_PP_BOOL(p(173, s)), p, o, s) +# define BOOST_PP_WHILE_173(p, o, s) BOOST_PP_WHILE_173_C(BOOST_PP_BOOL(p(174, s)), p, o, s) +# define BOOST_PP_WHILE_174(p, o, s) BOOST_PP_WHILE_174_C(BOOST_PP_BOOL(p(175, s)), p, o, s) +# define BOOST_PP_WHILE_175(p, o, s) BOOST_PP_WHILE_175_C(BOOST_PP_BOOL(p(176, s)), p, o, s) +# define BOOST_PP_WHILE_176(p, o, s) BOOST_PP_WHILE_176_C(BOOST_PP_BOOL(p(177, s)), p, o, s) +# define BOOST_PP_WHILE_177(p, o, s) BOOST_PP_WHILE_177_C(BOOST_PP_BOOL(p(178, s)), p, o, s) +# define BOOST_PP_WHILE_178(p, o, s) BOOST_PP_WHILE_178_C(BOOST_PP_BOOL(p(179, s)), p, o, s) +# define BOOST_PP_WHILE_179(p, o, s) BOOST_PP_WHILE_179_C(BOOST_PP_BOOL(p(180, s)), p, o, s) +# define BOOST_PP_WHILE_180(p, o, s) BOOST_PP_WHILE_180_C(BOOST_PP_BOOL(p(181, s)), p, o, s) +# define BOOST_PP_WHILE_181(p, o, s) BOOST_PP_WHILE_181_C(BOOST_PP_BOOL(p(182, s)), p, o, s) +# define BOOST_PP_WHILE_182(p, o, s) BOOST_PP_WHILE_182_C(BOOST_PP_BOOL(p(183, s)), p, o, s) +# define BOOST_PP_WHILE_183(p, o, s) BOOST_PP_WHILE_183_C(BOOST_PP_BOOL(p(184, s)), p, o, s) +# define BOOST_PP_WHILE_184(p, o, s) BOOST_PP_WHILE_184_C(BOOST_PP_BOOL(p(185, s)), p, o, s) +# define BOOST_PP_WHILE_185(p, o, s) BOOST_PP_WHILE_185_C(BOOST_PP_BOOL(p(186, s)), p, o, s) +# define BOOST_PP_WHILE_186(p, o, s) BOOST_PP_WHILE_186_C(BOOST_PP_BOOL(p(187, s)), p, o, s) +# define BOOST_PP_WHILE_187(p, o, s) BOOST_PP_WHILE_187_C(BOOST_PP_BOOL(p(188, s)), p, o, s) +# define BOOST_PP_WHILE_188(p, o, s) BOOST_PP_WHILE_188_C(BOOST_PP_BOOL(p(189, s)), p, o, s) +# define BOOST_PP_WHILE_189(p, o, s) BOOST_PP_WHILE_189_C(BOOST_PP_BOOL(p(190, s)), p, o, s) +# define BOOST_PP_WHILE_190(p, o, s) BOOST_PP_WHILE_190_C(BOOST_PP_BOOL(p(191, s)), p, o, s) +# define BOOST_PP_WHILE_191(p, o, s) BOOST_PP_WHILE_191_C(BOOST_PP_BOOL(p(192, s)), p, o, s) +# define BOOST_PP_WHILE_192(p, o, s) BOOST_PP_WHILE_192_C(BOOST_PP_BOOL(p(193, s)), p, o, s) +# define BOOST_PP_WHILE_193(p, o, s) BOOST_PP_WHILE_193_C(BOOST_PP_BOOL(p(194, s)), p, o, s) +# define BOOST_PP_WHILE_194(p, o, s) BOOST_PP_WHILE_194_C(BOOST_PP_BOOL(p(195, s)), p, o, s) +# define BOOST_PP_WHILE_195(p, o, s) BOOST_PP_WHILE_195_C(BOOST_PP_BOOL(p(196, s)), p, o, s) +# define BOOST_PP_WHILE_196(p, o, s) BOOST_PP_WHILE_196_C(BOOST_PP_BOOL(p(197, s)), p, o, s) +# define BOOST_PP_WHILE_197(p, o, s) BOOST_PP_WHILE_197_C(BOOST_PP_BOOL(p(198, s)), p, o, s) +# define BOOST_PP_WHILE_198(p, o, s) BOOST_PP_WHILE_198_C(BOOST_PP_BOOL(p(199, s)), p, o, s) +# define BOOST_PP_WHILE_199(p, o, s) BOOST_PP_WHILE_199_C(BOOST_PP_BOOL(p(200, s)), p, o, s) +# define BOOST_PP_WHILE_200(p, o, s) BOOST_PP_WHILE_200_C(BOOST_PP_BOOL(p(201, s)), p, o, s) +# define BOOST_PP_WHILE_201(p, o, s) BOOST_PP_WHILE_201_C(BOOST_PP_BOOL(p(202, s)), p, o, s) +# define BOOST_PP_WHILE_202(p, o, s) BOOST_PP_WHILE_202_C(BOOST_PP_BOOL(p(203, s)), p, o, s) +# define BOOST_PP_WHILE_203(p, o, s) BOOST_PP_WHILE_203_C(BOOST_PP_BOOL(p(204, s)), p, o, s) +# define BOOST_PP_WHILE_204(p, o, s) BOOST_PP_WHILE_204_C(BOOST_PP_BOOL(p(205, s)), p, o, s) +# define BOOST_PP_WHILE_205(p, o, s) BOOST_PP_WHILE_205_C(BOOST_PP_BOOL(p(206, s)), p, o, s) +# define BOOST_PP_WHILE_206(p, o, s) BOOST_PP_WHILE_206_C(BOOST_PP_BOOL(p(207, s)), p, o, s) +# define BOOST_PP_WHILE_207(p, o, s) BOOST_PP_WHILE_207_C(BOOST_PP_BOOL(p(208, s)), p, o, s) +# define BOOST_PP_WHILE_208(p, o, s) BOOST_PP_WHILE_208_C(BOOST_PP_BOOL(p(209, s)), p, o, s) +# define BOOST_PP_WHILE_209(p, o, s) BOOST_PP_WHILE_209_C(BOOST_PP_BOOL(p(210, s)), p, o, s) +# define BOOST_PP_WHILE_210(p, o, s) BOOST_PP_WHILE_210_C(BOOST_PP_BOOL(p(211, s)), p, o, s) +# define BOOST_PP_WHILE_211(p, o, s) BOOST_PP_WHILE_211_C(BOOST_PP_BOOL(p(212, s)), p, o, s) +# define BOOST_PP_WHILE_212(p, o, s) BOOST_PP_WHILE_212_C(BOOST_PP_BOOL(p(213, s)), p, o, s) +# define BOOST_PP_WHILE_213(p, o, s) BOOST_PP_WHILE_213_C(BOOST_PP_BOOL(p(214, s)), p, o, s) +# define BOOST_PP_WHILE_214(p, o, s) BOOST_PP_WHILE_214_C(BOOST_PP_BOOL(p(215, s)), p, o, s) +# define BOOST_PP_WHILE_215(p, o, s) BOOST_PP_WHILE_215_C(BOOST_PP_BOOL(p(216, s)), p, o, s) +# define BOOST_PP_WHILE_216(p, o, s) BOOST_PP_WHILE_216_C(BOOST_PP_BOOL(p(217, s)), p, o, s) +# define BOOST_PP_WHILE_217(p, o, s) BOOST_PP_WHILE_217_C(BOOST_PP_BOOL(p(218, s)), p, o, s) +# define BOOST_PP_WHILE_218(p, o, s) BOOST_PP_WHILE_218_C(BOOST_PP_BOOL(p(219, s)), p, o, s) +# define BOOST_PP_WHILE_219(p, o, s) BOOST_PP_WHILE_219_C(BOOST_PP_BOOL(p(220, s)), p, o, s) +# define BOOST_PP_WHILE_220(p, o, s) BOOST_PP_WHILE_220_C(BOOST_PP_BOOL(p(221, s)), p, o, s) +# define BOOST_PP_WHILE_221(p, o, s) BOOST_PP_WHILE_221_C(BOOST_PP_BOOL(p(222, s)), p, o, s) +# define BOOST_PP_WHILE_222(p, o, s) BOOST_PP_WHILE_222_C(BOOST_PP_BOOL(p(223, s)), p, o, s) +# define BOOST_PP_WHILE_223(p, o, s) BOOST_PP_WHILE_223_C(BOOST_PP_BOOL(p(224, s)), p, o, s) +# define BOOST_PP_WHILE_224(p, o, s) BOOST_PP_WHILE_224_C(BOOST_PP_BOOL(p(225, s)), p, o, s) +# define BOOST_PP_WHILE_225(p, o, s) BOOST_PP_WHILE_225_C(BOOST_PP_BOOL(p(226, s)), p, o, s) +# define BOOST_PP_WHILE_226(p, o, s) BOOST_PP_WHILE_226_C(BOOST_PP_BOOL(p(227, s)), p, o, s) +# define BOOST_PP_WHILE_227(p, o, s) BOOST_PP_WHILE_227_C(BOOST_PP_BOOL(p(228, s)), p, o, s) +# define BOOST_PP_WHILE_228(p, o, s) BOOST_PP_WHILE_228_C(BOOST_PP_BOOL(p(229, s)), p, o, s) +# define BOOST_PP_WHILE_229(p, o, s) BOOST_PP_WHILE_229_C(BOOST_PP_BOOL(p(230, s)), p, o, s) +# define BOOST_PP_WHILE_230(p, o, s) BOOST_PP_WHILE_230_C(BOOST_PP_BOOL(p(231, s)), p, o, s) +# define BOOST_PP_WHILE_231(p, o, s) BOOST_PP_WHILE_231_C(BOOST_PP_BOOL(p(232, s)), p, o, s) +# define BOOST_PP_WHILE_232(p, o, s) BOOST_PP_WHILE_232_C(BOOST_PP_BOOL(p(233, s)), p, o, s) +# define BOOST_PP_WHILE_233(p, o, s) BOOST_PP_WHILE_233_C(BOOST_PP_BOOL(p(234, s)), p, o, s) +# define BOOST_PP_WHILE_234(p, o, s) BOOST_PP_WHILE_234_C(BOOST_PP_BOOL(p(235, s)), p, o, s) +# define BOOST_PP_WHILE_235(p, o, s) BOOST_PP_WHILE_235_C(BOOST_PP_BOOL(p(236, s)), p, o, s) +# define BOOST_PP_WHILE_236(p, o, s) BOOST_PP_WHILE_236_C(BOOST_PP_BOOL(p(237, s)), p, o, s) +# define BOOST_PP_WHILE_237(p, o, s) BOOST_PP_WHILE_237_C(BOOST_PP_BOOL(p(238, s)), p, o, s) +# define BOOST_PP_WHILE_238(p, o, s) BOOST_PP_WHILE_238_C(BOOST_PP_BOOL(p(239, s)), p, o, s) +# define BOOST_PP_WHILE_239(p, o, s) BOOST_PP_WHILE_239_C(BOOST_PP_BOOL(p(240, s)), p, o, s) +# define BOOST_PP_WHILE_240(p, o, s) BOOST_PP_WHILE_240_C(BOOST_PP_BOOL(p(241, s)), p, o, s) +# define BOOST_PP_WHILE_241(p, o, s) BOOST_PP_WHILE_241_C(BOOST_PP_BOOL(p(242, s)), p, o, s) +# define BOOST_PP_WHILE_242(p, o, s) BOOST_PP_WHILE_242_C(BOOST_PP_BOOL(p(243, s)), p, o, s) +# define BOOST_PP_WHILE_243(p, o, s) BOOST_PP_WHILE_243_C(BOOST_PP_BOOL(p(244, s)), p, o, s) +# define BOOST_PP_WHILE_244(p, o, s) BOOST_PP_WHILE_244_C(BOOST_PP_BOOL(p(245, s)), p, o, s) +# define BOOST_PP_WHILE_245(p, o, s) BOOST_PP_WHILE_245_C(BOOST_PP_BOOL(p(246, s)), p, o, s) +# define BOOST_PP_WHILE_246(p, o, s) BOOST_PP_WHILE_246_C(BOOST_PP_BOOL(p(247, s)), p, o, s) +# define BOOST_PP_WHILE_247(p, o, s) BOOST_PP_WHILE_247_C(BOOST_PP_BOOL(p(248, s)), p, o, s) +# define BOOST_PP_WHILE_248(p, o, s) BOOST_PP_WHILE_248_C(BOOST_PP_BOOL(p(249, s)), p, o, s) +# define BOOST_PP_WHILE_249(p, o, s) BOOST_PP_WHILE_249_C(BOOST_PP_BOOL(p(250, s)), p, o, s) +# define BOOST_PP_WHILE_250(p, o, s) BOOST_PP_WHILE_250_C(BOOST_PP_BOOL(p(251, s)), p, o, s) +# define BOOST_PP_WHILE_251(p, o, s) BOOST_PP_WHILE_251_C(BOOST_PP_BOOL(p(252, s)), p, o, s) +# define BOOST_PP_WHILE_252(p, o, s) BOOST_PP_WHILE_252_C(BOOST_PP_BOOL(p(253, s)), p, o, s) +# define BOOST_PP_WHILE_253(p, o, s) BOOST_PP_WHILE_253_C(BOOST_PP_BOOL(p(254, s)), p, o, s) +# define BOOST_PP_WHILE_254(p, o, s) BOOST_PP_WHILE_254_C(BOOST_PP_BOOL(p(255, s)), p, o, s) +# define BOOST_PP_WHILE_255(p, o, s) BOOST_PP_WHILE_255_C(BOOST_PP_BOOL(p(256, s)), p, o, s) +# define BOOST_PP_WHILE_256(p, o, s) BOOST_PP_WHILE_256_C(BOOST_PP_BOOL(p(257, s)), p, o, s) +# +# define BOOST_PP_WHILE_1_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_2, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(2, s)) +# define BOOST_PP_WHILE_2_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_3, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(3, s)) +# define BOOST_PP_WHILE_3_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_4, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(4, s)) +# define BOOST_PP_WHILE_4_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_5, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(5, s)) +# define BOOST_PP_WHILE_5_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_6, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(6, s)) +# define BOOST_PP_WHILE_6_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_7, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(7, s)) +# define BOOST_PP_WHILE_7_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_8, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(8, s)) +# define BOOST_PP_WHILE_8_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_9, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(9, s)) +# define BOOST_PP_WHILE_9_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_10, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(10, s)) +# define BOOST_PP_WHILE_10_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_11, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(11, s)) +# define BOOST_PP_WHILE_11_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_12, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(12, s)) +# define BOOST_PP_WHILE_12_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_13, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(13, s)) +# define BOOST_PP_WHILE_13_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_14, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(14, s)) +# define BOOST_PP_WHILE_14_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_15, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(15, s)) +# define BOOST_PP_WHILE_15_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_16, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(16, s)) +# define BOOST_PP_WHILE_16_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_17, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(17, s)) +# define BOOST_PP_WHILE_17_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_18, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(18, s)) +# define BOOST_PP_WHILE_18_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_19, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(19, s)) +# define BOOST_PP_WHILE_19_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_20, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(20, s)) +# define BOOST_PP_WHILE_20_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_21, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(21, s)) +# define BOOST_PP_WHILE_21_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_22, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(22, s)) +# define BOOST_PP_WHILE_22_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_23, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(23, s)) +# define BOOST_PP_WHILE_23_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_24, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(24, s)) +# define BOOST_PP_WHILE_24_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_25, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(25, s)) +# define BOOST_PP_WHILE_25_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_26, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(26, s)) +# define BOOST_PP_WHILE_26_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_27, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(27, s)) +# define BOOST_PP_WHILE_27_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_28, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(28, s)) +# define BOOST_PP_WHILE_28_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_29, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(29, s)) +# define BOOST_PP_WHILE_29_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_30, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(30, s)) +# define BOOST_PP_WHILE_30_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_31, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(31, s)) +# define BOOST_PP_WHILE_31_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_32, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(32, s)) +# define BOOST_PP_WHILE_32_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_33, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(33, s)) +# define BOOST_PP_WHILE_33_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_34, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(34, s)) +# define BOOST_PP_WHILE_34_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_35, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(35, s)) +# define BOOST_PP_WHILE_35_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_36, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(36, s)) +# define BOOST_PP_WHILE_36_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_37, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(37, s)) +# define BOOST_PP_WHILE_37_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_38, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(38, s)) +# define BOOST_PP_WHILE_38_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_39, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(39, s)) +# define BOOST_PP_WHILE_39_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_40, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(40, s)) +# define BOOST_PP_WHILE_40_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_41, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(41, s)) +# define BOOST_PP_WHILE_41_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_42, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(42, s)) +# define BOOST_PP_WHILE_42_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_43, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(43, s)) +# define BOOST_PP_WHILE_43_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_44, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(44, s)) +# define BOOST_PP_WHILE_44_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_45, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(45, s)) +# define BOOST_PP_WHILE_45_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_46, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(46, s)) +# define BOOST_PP_WHILE_46_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_47, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(47, s)) +# define BOOST_PP_WHILE_47_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_48, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(48, s)) +# define BOOST_PP_WHILE_48_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_49, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(49, s)) +# define BOOST_PP_WHILE_49_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_50, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(50, s)) +# define BOOST_PP_WHILE_50_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_51, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(51, s)) +# define BOOST_PP_WHILE_51_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_52, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(52, s)) +# define BOOST_PP_WHILE_52_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_53, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(53, s)) +# define BOOST_PP_WHILE_53_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_54, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(54, s)) +# define BOOST_PP_WHILE_54_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_55, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(55, s)) +# define BOOST_PP_WHILE_55_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_56, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(56, s)) +# define BOOST_PP_WHILE_56_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_57, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(57, s)) +# define BOOST_PP_WHILE_57_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_58, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(58, s)) +# define BOOST_PP_WHILE_58_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_59, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(59, s)) +# define BOOST_PP_WHILE_59_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_60, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(60, s)) +# define BOOST_PP_WHILE_60_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_61, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(61, s)) +# define BOOST_PP_WHILE_61_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_62, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(62, s)) +# define BOOST_PP_WHILE_62_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_63, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(63, s)) +# define BOOST_PP_WHILE_63_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_64, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(64, s)) +# define BOOST_PP_WHILE_64_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_65, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(65, s)) +# define BOOST_PP_WHILE_65_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_66, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(66, s)) +# define BOOST_PP_WHILE_66_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_67, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(67, s)) +# define BOOST_PP_WHILE_67_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_68, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(68, s)) +# define BOOST_PP_WHILE_68_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_69, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(69, s)) +# define BOOST_PP_WHILE_69_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_70, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(70, s)) +# define BOOST_PP_WHILE_70_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_71, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(71, s)) +# define BOOST_PP_WHILE_71_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_72, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(72, s)) +# define BOOST_PP_WHILE_72_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_73, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(73, s)) +# define BOOST_PP_WHILE_73_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_74, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(74, s)) +# define BOOST_PP_WHILE_74_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_75, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(75, s)) +# define BOOST_PP_WHILE_75_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_76, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(76, s)) +# define BOOST_PP_WHILE_76_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_77, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(77, s)) +# define BOOST_PP_WHILE_77_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_78, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(78, s)) +# define BOOST_PP_WHILE_78_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_79, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(79, s)) +# define BOOST_PP_WHILE_79_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_80, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(80, s)) +# define BOOST_PP_WHILE_80_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_81, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(81, s)) +# define BOOST_PP_WHILE_81_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_82, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(82, s)) +# define BOOST_PP_WHILE_82_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_83, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(83, s)) +# define BOOST_PP_WHILE_83_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_84, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(84, s)) +# define BOOST_PP_WHILE_84_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_85, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(85, s)) +# define BOOST_PP_WHILE_85_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_86, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(86, s)) +# define BOOST_PP_WHILE_86_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_87, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(87, s)) +# define BOOST_PP_WHILE_87_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_88, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(88, s)) +# define BOOST_PP_WHILE_88_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_89, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(89, s)) +# define BOOST_PP_WHILE_89_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_90, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(90, s)) +# define BOOST_PP_WHILE_90_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_91, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(91, s)) +# define BOOST_PP_WHILE_91_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_92, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(92, s)) +# define BOOST_PP_WHILE_92_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_93, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(93, s)) +# define BOOST_PP_WHILE_93_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_94, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(94, s)) +# define BOOST_PP_WHILE_94_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_95, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(95, s)) +# define BOOST_PP_WHILE_95_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_96, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(96, s)) +# define BOOST_PP_WHILE_96_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_97, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(97, s)) +# define BOOST_PP_WHILE_97_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_98, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(98, s)) +# define BOOST_PP_WHILE_98_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_99, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(99, s)) +# define BOOST_PP_WHILE_99_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_100, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(100, s)) +# define BOOST_PP_WHILE_100_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_101, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(101, s)) +# define BOOST_PP_WHILE_101_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_102, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(102, s)) +# define BOOST_PP_WHILE_102_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_103, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(103, s)) +# define BOOST_PP_WHILE_103_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_104, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(104, s)) +# define BOOST_PP_WHILE_104_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_105, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(105, s)) +# define BOOST_PP_WHILE_105_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_106, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(106, s)) +# define BOOST_PP_WHILE_106_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_107, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(107, s)) +# define BOOST_PP_WHILE_107_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_108, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(108, s)) +# define BOOST_PP_WHILE_108_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_109, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(109, s)) +# define BOOST_PP_WHILE_109_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_110, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(110, s)) +# define BOOST_PP_WHILE_110_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_111, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(111, s)) +# define BOOST_PP_WHILE_111_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_112, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(112, s)) +# define BOOST_PP_WHILE_112_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_113, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(113, s)) +# define BOOST_PP_WHILE_113_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_114, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(114, s)) +# define BOOST_PP_WHILE_114_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_115, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(115, s)) +# define BOOST_PP_WHILE_115_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_116, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(116, s)) +# define BOOST_PP_WHILE_116_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_117, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(117, s)) +# define BOOST_PP_WHILE_117_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_118, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(118, s)) +# define BOOST_PP_WHILE_118_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_119, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(119, s)) +# define BOOST_PP_WHILE_119_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_120, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(120, s)) +# define BOOST_PP_WHILE_120_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_121, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(121, s)) +# define BOOST_PP_WHILE_121_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_122, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(122, s)) +# define BOOST_PP_WHILE_122_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_123, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(123, s)) +# define BOOST_PP_WHILE_123_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_124, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(124, s)) +# define BOOST_PP_WHILE_124_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_125, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(125, s)) +# define BOOST_PP_WHILE_125_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_126, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(126, s)) +# define BOOST_PP_WHILE_126_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_127, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(127, s)) +# define BOOST_PP_WHILE_127_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_128, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(128, s)) +# define BOOST_PP_WHILE_128_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_129, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(129, s)) +# define BOOST_PP_WHILE_129_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_130, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(130, s)) +# define BOOST_PP_WHILE_130_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_131, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(131, s)) +# define BOOST_PP_WHILE_131_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_132, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(132, s)) +# define BOOST_PP_WHILE_132_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_133, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(133, s)) +# define BOOST_PP_WHILE_133_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_134, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(134, s)) +# define BOOST_PP_WHILE_134_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_135, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(135, s)) +# define BOOST_PP_WHILE_135_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_136, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(136, s)) +# define BOOST_PP_WHILE_136_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_137, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(137, s)) +# define BOOST_PP_WHILE_137_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_138, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(138, s)) +# define BOOST_PP_WHILE_138_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_139, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(139, s)) +# define BOOST_PP_WHILE_139_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_140, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(140, s)) +# define BOOST_PP_WHILE_140_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_141, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(141, s)) +# define BOOST_PP_WHILE_141_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_142, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(142, s)) +# define BOOST_PP_WHILE_142_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_143, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(143, s)) +# define BOOST_PP_WHILE_143_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_144, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(144, s)) +# define BOOST_PP_WHILE_144_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_145, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(145, s)) +# define BOOST_PP_WHILE_145_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_146, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(146, s)) +# define BOOST_PP_WHILE_146_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_147, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(147, s)) +# define BOOST_PP_WHILE_147_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_148, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(148, s)) +# define BOOST_PP_WHILE_148_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_149, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(149, s)) +# define BOOST_PP_WHILE_149_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_150, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(150, s)) +# define BOOST_PP_WHILE_150_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_151, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(151, s)) +# define BOOST_PP_WHILE_151_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_152, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(152, s)) +# define BOOST_PP_WHILE_152_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_153, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(153, s)) +# define BOOST_PP_WHILE_153_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_154, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(154, s)) +# define BOOST_PP_WHILE_154_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_155, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(155, s)) +# define BOOST_PP_WHILE_155_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_156, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(156, s)) +# define BOOST_PP_WHILE_156_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_157, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(157, s)) +# define BOOST_PP_WHILE_157_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_158, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(158, s)) +# define BOOST_PP_WHILE_158_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_159, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(159, s)) +# define BOOST_PP_WHILE_159_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_160, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(160, s)) +# define BOOST_PP_WHILE_160_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_161, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(161, s)) +# define BOOST_PP_WHILE_161_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_162, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(162, s)) +# define BOOST_PP_WHILE_162_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_163, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(163, s)) +# define BOOST_PP_WHILE_163_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_164, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(164, s)) +# define BOOST_PP_WHILE_164_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_165, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(165, s)) +# define BOOST_PP_WHILE_165_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_166, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(166, s)) +# define BOOST_PP_WHILE_166_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_167, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(167, s)) +# define BOOST_PP_WHILE_167_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_168, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(168, s)) +# define BOOST_PP_WHILE_168_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_169, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(169, s)) +# define BOOST_PP_WHILE_169_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_170, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(170, s)) +# define BOOST_PP_WHILE_170_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_171, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(171, s)) +# define BOOST_PP_WHILE_171_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_172, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(172, s)) +# define BOOST_PP_WHILE_172_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_173, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(173, s)) +# define BOOST_PP_WHILE_173_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_174, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(174, s)) +# define BOOST_PP_WHILE_174_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_175, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(175, s)) +# define BOOST_PP_WHILE_175_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_176, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(176, s)) +# define BOOST_PP_WHILE_176_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_177, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(177, s)) +# define BOOST_PP_WHILE_177_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_178, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(178, s)) +# define BOOST_PP_WHILE_178_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_179, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(179, s)) +# define BOOST_PP_WHILE_179_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_180, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(180, s)) +# define BOOST_PP_WHILE_180_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_181, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(181, s)) +# define BOOST_PP_WHILE_181_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_182, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(182, s)) +# define BOOST_PP_WHILE_182_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_183, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(183, s)) +# define BOOST_PP_WHILE_183_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_184, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(184, s)) +# define BOOST_PP_WHILE_184_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_185, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(185, s)) +# define BOOST_PP_WHILE_185_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_186, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(186, s)) +# define BOOST_PP_WHILE_186_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_187, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(187, s)) +# define BOOST_PP_WHILE_187_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_188, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(188, s)) +# define BOOST_PP_WHILE_188_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_189, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(189, s)) +# define BOOST_PP_WHILE_189_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_190, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(190, s)) +# define BOOST_PP_WHILE_190_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_191, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(191, s)) +# define BOOST_PP_WHILE_191_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_192, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(192, s)) +# define BOOST_PP_WHILE_192_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_193, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(193, s)) +# define BOOST_PP_WHILE_193_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_194, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(194, s)) +# define BOOST_PP_WHILE_194_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_195, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(195, s)) +# define BOOST_PP_WHILE_195_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_196, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(196, s)) +# define BOOST_PP_WHILE_196_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_197, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(197, s)) +# define BOOST_PP_WHILE_197_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_198, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(198, s)) +# define BOOST_PP_WHILE_198_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_199, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(199, s)) +# define BOOST_PP_WHILE_199_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_200, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(200, s)) +# define BOOST_PP_WHILE_200_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_201, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(201, s)) +# define BOOST_PP_WHILE_201_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_202, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(202, s)) +# define BOOST_PP_WHILE_202_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_203, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(203, s)) +# define BOOST_PP_WHILE_203_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_204, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(204, s)) +# define BOOST_PP_WHILE_204_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_205, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(205, s)) +# define BOOST_PP_WHILE_205_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_206, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(206, s)) +# define BOOST_PP_WHILE_206_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_207, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(207, s)) +# define BOOST_PP_WHILE_207_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_208, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(208, s)) +# define BOOST_PP_WHILE_208_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_209, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(209, s)) +# define BOOST_PP_WHILE_209_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_210, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(210, s)) +# define BOOST_PP_WHILE_210_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_211, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(211, s)) +# define BOOST_PP_WHILE_211_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_212, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(212, s)) +# define BOOST_PP_WHILE_212_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_213, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(213, s)) +# define BOOST_PP_WHILE_213_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_214, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(214, s)) +# define BOOST_PP_WHILE_214_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_215, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(215, s)) +# define BOOST_PP_WHILE_215_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_216, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(216, s)) +# define BOOST_PP_WHILE_216_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_217, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(217, s)) +# define BOOST_PP_WHILE_217_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_218, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(218, s)) +# define BOOST_PP_WHILE_218_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_219, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(219, s)) +# define BOOST_PP_WHILE_219_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_220, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(220, s)) +# define BOOST_PP_WHILE_220_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_221, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(221, s)) +# define BOOST_PP_WHILE_221_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_222, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(222, s)) +# define BOOST_PP_WHILE_222_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_223, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(223, s)) +# define BOOST_PP_WHILE_223_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_224, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(224, s)) +# define BOOST_PP_WHILE_224_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_225, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(225, s)) +# define BOOST_PP_WHILE_225_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_226, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(226, s)) +# define BOOST_PP_WHILE_226_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_227, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(227, s)) +# define BOOST_PP_WHILE_227_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_228, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(228, s)) +# define BOOST_PP_WHILE_228_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_229, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(229, s)) +# define BOOST_PP_WHILE_229_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_230, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(230, s)) +# define BOOST_PP_WHILE_230_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_231, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(231, s)) +# define BOOST_PP_WHILE_231_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_232, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(232, s)) +# define BOOST_PP_WHILE_232_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_233, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(233, s)) +# define BOOST_PP_WHILE_233_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_234, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(234, s)) +# define BOOST_PP_WHILE_234_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_235, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(235, s)) +# define BOOST_PP_WHILE_235_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_236, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(236, s)) +# define BOOST_PP_WHILE_236_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_237, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(237, s)) +# define BOOST_PP_WHILE_237_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_238, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(238, s)) +# define BOOST_PP_WHILE_238_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_239, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(239, s)) +# define BOOST_PP_WHILE_239_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_240, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(240, s)) +# define BOOST_PP_WHILE_240_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_241, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(241, s)) +# define BOOST_PP_WHILE_241_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_242, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(242, s)) +# define BOOST_PP_WHILE_242_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_243, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(243, s)) +# define BOOST_PP_WHILE_243_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_244, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(244, s)) +# define BOOST_PP_WHILE_244_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_245, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(245, s)) +# define BOOST_PP_WHILE_245_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_246, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(246, s)) +# define BOOST_PP_WHILE_246_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_247, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(247, s)) +# define BOOST_PP_WHILE_247_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_248, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(248, s)) +# define BOOST_PP_WHILE_248_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_249, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(249, s)) +# define BOOST_PP_WHILE_249_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_250, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(250, s)) +# define BOOST_PP_WHILE_250_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_251, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(251, s)) +# define BOOST_PP_WHILE_251_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_252, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(252, s)) +# define BOOST_PP_WHILE_252_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_253, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(253, s)) +# define BOOST_PP_WHILE_253_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_254, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(254, s)) +# define BOOST_PP_WHILE_254_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_255, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(255, s)) +# define BOOST_PP_WHILE_255_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_256, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(256, s)) +# define BOOST_PP_WHILE_256_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_257, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(257, s)) +# +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/control/expr_if.hpp b/ThirdParty/boost-Subset/boost/preprocessor/control/expr_if.hpp new file mode 100644 index 0000000000..0e1ab512fb --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/control/expr_if.hpp @@ -0,0 +1,30 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_CONTROL_EXPR_IF_HPP +# define BOOST_PREPROCESSOR_CONTROL_EXPR_IF_HPP +# +# include +# include +# include +# +# /* BOOST_PP_EXPR_IF */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_EXPR_IF(cond, expr) BOOST_PP_EXPR_IIF(BOOST_PP_BOOL(cond), expr) +# else +# define BOOST_PP_EXPR_IF(cond, expr) BOOST_PP_EXPR_IF_I(cond, expr) +# define BOOST_PP_EXPR_IF_I(cond, expr) BOOST_PP_EXPR_IIF(BOOST_PP_BOOL(cond), expr) +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/control/expr_iif.hpp b/ThirdParty/boost-Subset/boost/preprocessor/control/expr_iif.hpp new file mode 100644 index 0000000000..58f45a48f5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/control/expr_iif.hpp @@ -0,0 +1,31 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_CONTROL_EXPR_IIF_HPP +# define BOOST_PREPROCESSOR_CONTROL_EXPR_IIF_HPP +# +# include +# +# /* BOOST_PP_EXPR_IIF */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_EXPR_IIF(bit, expr) BOOST_PP_EXPR_IIF_I(bit, expr) +# else +# define BOOST_PP_EXPR_IIF(bit, expr) BOOST_PP_EXPR_IIF_OO((bit, expr)) +# define BOOST_PP_EXPR_IIF_OO(par) BOOST_PP_EXPR_IIF_I ## par +# endif +# +# define BOOST_PP_EXPR_IIF_I(bit, expr) BOOST_PP_EXPR_IIF_ ## bit(expr) +# +# define BOOST_PP_EXPR_IIF_0(expr) +# define BOOST_PP_EXPR_IIF_1(expr) expr +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/control/if.hpp b/ThirdParty/boost-Subset/boost/preprocessor/control/if.hpp new file mode 100644 index 0000000000..52cfc3dabb --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/control/if.hpp @@ -0,0 +1,30 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_CONTROL_IF_HPP +# define BOOST_PREPROCESSOR_CONTROL_IF_HPP +# +# include +# include +# include +# +# /* BOOST_PP_IF */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_IF(cond, t, f) BOOST_PP_IIF(BOOST_PP_BOOL(cond), t, f) +# else +# define BOOST_PP_IF(cond, t, f) BOOST_PP_IF_I(cond, t, f) +# define BOOST_PP_IF_I(cond, t, f) BOOST_PP_IIF(BOOST_PP_BOOL(cond), t, f) +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/control/iif.hpp b/ThirdParty/boost-Subset/boost/preprocessor/control/iif.hpp new file mode 100644 index 0000000000..fd0781793f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/control/iif.hpp @@ -0,0 +1,34 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_CONTROL_IIF_HPP +# define BOOST_PREPROCESSOR_CONTROL_IIF_HPP +# +# include +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_IIF(bit, t, f) BOOST_PP_IIF_I(bit, t, f) +# else +# define BOOST_PP_IIF(bit, t, f) BOOST_PP_IIF_OO((bit, t, f)) +# define BOOST_PP_IIF_OO(par) BOOST_PP_IIF_I ## par +# endif +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_IIF_I(bit, t, f) BOOST_PP_IIF_ ## bit(t, f) +# else +# define BOOST_PP_IIF_I(bit, t, f) BOOST_PP_IIF_II(BOOST_PP_IIF_ ## bit(t, f)) +# define BOOST_PP_IIF_II(id) id +# endif +# +# define BOOST_PP_IIF_0(t, f) f +# define BOOST_PP_IIF_1(t, f) t +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/control/while.hpp b/ThirdParty/boost-Subset/boost/preprocessor/control/while.hpp new file mode 100644 index 0000000000..e8a65fffc7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/control/while.hpp @@ -0,0 +1,312 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_CONTROL_WHILE_HPP +# define BOOST_PREPROCESSOR_CONTROL_WHILE_HPP +# +# include +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_WHILE */ +# +# if 0 +# define BOOST_PP_WHILE(pred, op, state) +# endif +# +# define BOOST_PP_WHILE BOOST_PP_CAT(BOOST_PP_WHILE_, BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256)) +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_WHILE_P(n) BOOST_PP_BITAND(BOOST_PP_CAT(BOOST_PP_WHILE_CHECK_, BOOST_PP_WHILE_ ## n(BOOST_PP_WHILE_F, BOOST_PP_NIL, BOOST_PP_NIL)), BOOST_PP_BITAND(BOOST_PP_CAT(BOOST_PP_LIST_FOLD_LEFT_CHECK_, BOOST_PP_LIST_FOLD_LEFT_ ## n(BOOST_PP_NIL, BOOST_PP_NIL, BOOST_PP_NIL)), BOOST_PP_CAT(BOOST_PP_LIST_FOLD_RIGHT_CHECK_, BOOST_PP_LIST_FOLD_RIGHT_ ## n(BOOST_PP_NIL, BOOST_PP_NIL, BOOST_PP_NIL)))) +# else +# define BOOST_PP_WHILE_P(n) BOOST_PP_BITAND(BOOST_PP_CAT(BOOST_PP_WHILE_CHECK_, BOOST_PP_WHILE_ ## n(BOOST_PP_WHILE_F, BOOST_PP_NIL, BOOST_PP_NIL)), BOOST_PP_CAT(BOOST_PP_LIST_FOLD_LEFT_CHECK_, BOOST_PP_LIST_FOLD_LEFT_ ## n(BOOST_PP_NIL, BOOST_PP_NIL, BOOST_PP_NIL))) +# endif +# +# define BOOST_PP_WHILE_F(d, _) 0 +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# include +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# include +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() +# include +# else +# include +# endif +# +# define BOOST_PP_WHILE_257(p, o, s) BOOST_PP_ERROR(0x0001) +# +# define BOOST_PP_WHILE_CHECK_BOOST_PP_NIL 1 +# +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_1(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_2(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_3(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_4(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_5(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_6(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_7(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_8(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_9(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_10(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_11(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_12(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_13(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_14(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_15(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_16(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_17(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_18(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_19(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_20(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_21(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_22(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_23(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_24(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_25(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_26(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_27(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_28(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_29(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_30(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_31(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_32(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_33(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_34(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_35(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_36(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_37(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_38(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_39(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_40(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_41(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_42(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_43(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_44(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_45(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_46(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_47(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_48(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_49(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_50(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_51(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_52(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_53(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_54(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_55(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_56(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_57(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_58(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_59(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_60(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_61(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_62(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_63(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_64(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_65(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_66(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_67(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_68(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_69(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_70(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_71(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_72(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_73(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_74(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_75(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_76(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_77(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_78(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_79(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_80(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_81(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_82(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_83(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_84(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_85(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_86(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_87(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_88(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_89(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_90(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_91(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_92(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_93(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_94(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_95(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_96(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_97(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_98(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_99(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_100(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_101(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_102(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_103(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_104(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_105(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_106(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_107(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_108(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_109(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_110(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_111(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_112(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_113(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_114(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_115(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_116(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_117(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_118(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_119(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_120(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_121(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_122(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_123(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_124(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_125(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_126(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_127(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_128(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_129(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_130(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_131(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_132(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_133(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_134(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_135(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_136(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_137(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_138(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_139(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_140(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_141(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_142(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_143(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_144(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_145(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_146(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_147(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_148(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_149(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_150(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_151(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_152(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_153(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_154(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_155(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_156(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_157(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_158(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_159(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_160(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_161(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_162(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_163(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_164(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_165(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_166(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_167(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_168(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_169(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_170(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_171(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_172(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_173(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_174(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_175(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_176(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_177(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_178(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_179(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_180(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_181(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_182(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_183(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_184(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_185(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_186(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_187(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_188(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_189(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_190(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_191(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_192(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_193(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_194(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_195(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_196(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_197(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_198(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_199(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_200(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_201(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_202(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_203(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_204(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_205(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_206(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_207(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_208(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_209(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_210(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_211(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_212(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_213(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_214(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_215(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_216(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_217(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_218(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_219(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_220(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_221(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_222(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_223(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_224(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_225(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_226(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_227(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_228(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_229(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_230(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_231(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_232(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_233(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_234(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_235(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_236(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_237(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_238(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_239(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_240(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_241(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_242(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_243(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_244(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_245(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_246(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_247(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_248(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_249(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_250(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_251(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_252(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_253(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_254(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_255(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_256(p, o, s) 0 +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/debug/error.hpp b/ThirdParty/boost-Subset/boost/preprocessor/debug/error.hpp new file mode 100644 index 0000000000..c8ae5e7505 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/debug/error.hpp @@ -0,0 +1,33 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_DEBUG_ERROR_HPP +# define BOOST_PREPROCESSOR_DEBUG_ERROR_HPP +# +# include +# include +# +# /* BOOST_PP_ERROR */ +# +# if BOOST_PP_CONFIG_ERRORS +# define BOOST_PP_ERROR(code) BOOST_PP_CAT(BOOST_PP_ERROR_, code) +# endif +# +# define BOOST_PP_ERROR_0x0000 BOOST_PP_ERROR(0x0000, BOOST_PP_INDEX_OUT_OF_BOUNDS) +# define BOOST_PP_ERROR_0x0001 BOOST_PP_ERROR(0x0001, BOOST_PP_WHILE_OVERFLOW) +# define BOOST_PP_ERROR_0x0002 BOOST_PP_ERROR(0x0002, BOOST_PP_FOR_OVERFLOW) +# define BOOST_PP_ERROR_0x0003 BOOST_PP_ERROR(0x0003, BOOST_PP_REPEAT_OVERFLOW) +# define BOOST_PP_ERROR_0x0004 BOOST_PP_ERROR(0x0004, BOOST_PP_LIST_FOLD_OVERFLOW) +# define BOOST_PP_ERROR_0x0005 BOOST_PP_ERROR(0x0005, BOOST_PP_SEQ_FOLD_OVERFLOW) +# define BOOST_PP_ERROR_0x0006 BOOST_PP_ERROR(0x0006, BOOST_PP_ARITHMETIC_OVERFLOW) +# define BOOST_PP_ERROR_0x0007 BOOST_PP_ERROR(0x0007, BOOST_PP_DIVISION_BY_ZERO) +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/dec.hpp b/ThirdParty/boost-Subset/boost/preprocessor/dec.hpp new file mode 100644 index 0000000000..d57206470b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/dec.hpp @@ -0,0 +1,17 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_DEC_HPP +# define BOOST_PREPROCESSOR_DEC_HPP +# +# include +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/detail/auto_rec.hpp b/ThirdParty/boost-Subset/boost/preprocessor/detail/auto_rec.hpp new file mode 100644 index 0000000000..39de1d0028 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/detail/auto_rec.hpp @@ -0,0 +1,293 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() +# include +# else +# +# ifndef BOOST_PREPROCESSOR_DETAIL_AUTO_REC_HPP +# define BOOST_PREPROCESSOR_DETAIL_AUTO_REC_HPP +# +# include +# +# /* BOOST_PP_AUTO_REC */ +# +# define BOOST_PP_AUTO_REC(pred, n) BOOST_PP_NODE_ENTRY_ ## n(pred) +# +# define BOOST_PP_NODE_ENTRY_256(p) BOOST_PP_NODE_128(p)(p)(p)(p)(p)(p)(p)(p) +# define BOOST_PP_NODE_ENTRY_128(p) BOOST_PP_NODE_64(p)(p)(p)(p)(p)(p)(p) +# define BOOST_PP_NODE_ENTRY_64(p) BOOST_PP_NODE_32(p)(p)(p)(p)(p)(p) +# define BOOST_PP_NODE_ENTRY_32(p) BOOST_PP_NODE_16(p)(p)(p)(p)(p) +# define BOOST_PP_NODE_ENTRY_16(p) BOOST_PP_NODE_8(p)(p)(p)(p) +# define BOOST_PP_NODE_ENTRY_8(p) BOOST_PP_NODE_4(p)(p)(p) +# define BOOST_PP_NODE_ENTRY_4(p) BOOST_PP_NODE_2(p)(p) +# define BOOST_PP_NODE_ENTRY_2(p) BOOST_PP_NODE_1(p) +# +# define BOOST_PP_NODE_128(p) BOOST_PP_IIF(p(128), BOOST_PP_NODE_64, BOOST_PP_NODE_192) +# define BOOST_PP_NODE_64(p) BOOST_PP_IIF(p(64), BOOST_PP_NODE_32, BOOST_PP_NODE_96) +# define BOOST_PP_NODE_32(p) BOOST_PP_IIF(p(32), BOOST_PP_NODE_16, BOOST_PP_NODE_48) +# define BOOST_PP_NODE_16(p) BOOST_PP_IIF(p(16), BOOST_PP_NODE_8, BOOST_PP_NODE_24) +# define BOOST_PP_NODE_8(p) BOOST_PP_IIF(p(8), BOOST_PP_NODE_4, BOOST_PP_NODE_12) +# define BOOST_PP_NODE_4(p) BOOST_PP_IIF(p(4), BOOST_PP_NODE_2, BOOST_PP_NODE_6) +# define BOOST_PP_NODE_2(p) BOOST_PP_IIF(p(2), BOOST_PP_NODE_1, BOOST_PP_NODE_3) +# define BOOST_PP_NODE_1(p) BOOST_PP_IIF(p(1), 1, 2) +# define BOOST_PP_NODE_3(p) BOOST_PP_IIF(p(3), 3, 4) +# define BOOST_PP_NODE_6(p) BOOST_PP_IIF(p(6), BOOST_PP_NODE_5, BOOST_PP_NODE_7) +# define BOOST_PP_NODE_5(p) BOOST_PP_IIF(p(5), 5, 6) +# define BOOST_PP_NODE_7(p) BOOST_PP_IIF(p(7), 7, 8) +# define BOOST_PP_NODE_12(p) BOOST_PP_IIF(p(12), BOOST_PP_NODE_10, BOOST_PP_NODE_14) +# define BOOST_PP_NODE_10(p) BOOST_PP_IIF(p(10), BOOST_PP_NODE_9, BOOST_PP_NODE_11) +# define BOOST_PP_NODE_9(p) BOOST_PP_IIF(p(9), 9, 10) +# define BOOST_PP_NODE_11(p) BOOST_PP_IIF(p(11), 11, 12) +# define BOOST_PP_NODE_14(p) BOOST_PP_IIF(p(14), BOOST_PP_NODE_13, BOOST_PP_NODE_15) +# define BOOST_PP_NODE_13(p) BOOST_PP_IIF(p(13), 13, 14) +# define BOOST_PP_NODE_15(p) BOOST_PP_IIF(p(15), 15, 16) +# define BOOST_PP_NODE_24(p) BOOST_PP_IIF(p(24), BOOST_PP_NODE_20, BOOST_PP_NODE_28) +# define BOOST_PP_NODE_20(p) BOOST_PP_IIF(p(20), BOOST_PP_NODE_18, BOOST_PP_NODE_22) +# define BOOST_PP_NODE_18(p) BOOST_PP_IIF(p(18), BOOST_PP_NODE_17, BOOST_PP_NODE_19) +# define BOOST_PP_NODE_17(p) BOOST_PP_IIF(p(17), 17, 18) +# define BOOST_PP_NODE_19(p) BOOST_PP_IIF(p(19), 19, 20) +# define BOOST_PP_NODE_22(p) BOOST_PP_IIF(p(22), BOOST_PP_NODE_21, BOOST_PP_NODE_23) +# define BOOST_PP_NODE_21(p) BOOST_PP_IIF(p(21), 21, 22) +# define BOOST_PP_NODE_23(p) BOOST_PP_IIF(p(23), 23, 24) +# define BOOST_PP_NODE_28(p) BOOST_PP_IIF(p(28), BOOST_PP_NODE_26, BOOST_PP_NODE_30) +# define BOOST_PP_NODE_26(p) BOOST_PP_IIF(p(26), BOOST_PP_NODE_25, BOOST_PP_NODE_27) +# define BOOST_PP_NODE_25(p) BOOST_PP_IIF(p(25), 25, 26) +# define BOOST_PP_NODE_27(p) BOOST_PP_IIF(p(27), 27, 28) +# define BOOST_PP_NODE_30(p) BOOST_PP_IIF(p(30), BOOST_PP_NODE_29, BOOST_PP_NODE_31) +# define BOOST_PP_NODE_29(p) BOOST_PP_IIF(p(29), 29, 30) +# define BOOST_PP_NODE_31(p) BOOST_PP_IIF(p(31), 31, 32) +# define BOOST_PP_NODE_48(p) BOOST_PP_IIF(p(48), BOOST_PP_NODE_40, BOOST_PP_NODE_56) +# define BOOST_PP_NODE_40(p) BOOST_PP_IIF(p(40), BOOST_PP_NODE_36, BOOST_PP_NODE_44) +# define BOOST_PP_NODE_36(p) BOOST_PP_IIF(p(36), BOOST_PP_NODE_34, BOOST_PP_NODE_38) +# define BOOST_PP_NODE_34(p) BOOST_PP_IIF(p(34), BOOST_PP_NODE_33, BOOST_PP_NODE_35) +# define BOOST_PP_NODE_33(p) BOOST_PP_IIF(p(33), 33, 34) +# define BOOST_PP_NODE_35(p) BOOST_PP_IIF(p(35), 35, 36) +# define BOOST_PP_NODE_38(p) BOOST_PP_IIF(p(38), BOOST_PP_NODE_37, BOOST_PP_NODE_39) +# define BOOST_PP_NODE_37(p) BOOST_PP_IIF(p(37), 37, 38) +# define BOOST_PP_NODE_39(p) BOOST_PP_IIF(p(39), 39, 40) +# define BOOST_PP_NODE_44(p) BOOST_PP_IIF(p(44), BOOST_PP_NODE_42, BOOST_PP_NODE_46) +# define BOOST_PP_NODE_42(p) BOOST_PP_IIF(p(42), BOOST_PP_NODE_41, BOOST_PP_NODE_43) +# define BOOST_PP_NODE_41(p) BOOST_PP_IIF(p(41), 41, 42) +# define BOOST_PP_NODE_43(p) BOOST_PP_IIF(p(43), 43, 44) +# define BOOST_PP_NODE_46(p) BOOST_PP_IIF(p(46), BOOST_PP_NODE_45, BOOST_PP_NODE_47) +# define BOOST_PP_NODE_45(p) BOOST_PP_IIF(p(45), 45, 46) +# define BOOST_PP_NODE_47(p) BOOST_PP_IIF(p(47), 47, 48) +# define BOOST_PP_NODE_56(p) BOOST_PP_IIF(p(56), BOOST_PP_NODE_52, BOOST_PP_NODE_60) +# define BOOST_PP_NODE_52(p) BOOST_PP_IIF(p(52), BOOST_PP_NODE_50, BOOST_PP_NODE_54) +# define BOOST_PP_NODE_50(p) BOOST_PP_IIF(p(50), BOOST_PP_NODE_49, BOOST_PP_NODE_51) +# define BOOST_PP_NODE_49(p) BOOST_PP_IIF(p(49), 49, 50) +# define BOOST_PP_NODE_51(p) BOOST_PP_IIF(p(51), 51, 52) +# define BOOST_PP_NODE_54(p) BOOST_PP_IIF(p(54), BOOST_PP_NODE_53, BOOST_PP_NODE_55) +# define BOOST_PP_NODE_53(p) BOOST_PP_IIF(p(53), 53, 54) +# define BOOST_PP_NODE_55(p) BOOST_PP_IIF(p(55), 55, 56) +# define BOOST_PP_NODE_60(p) BOOST_PP_IIF(p(60), BOOST_PP_NODE_58, BOOST_PP_NODE_62) +# define BOOST_PP_NODE_58(p) BOOST_PP_IIF(p(58), BOOST_PP_NODE_57, BOOST_PP_NODE_59) +# define BOOST_PP_NODE_57(p) BOOST_PP_IIF(p(57), 57, 58) +# define BOOST_PP_NODE_59(p) BOOST_PP_IIF(p(59), 59, 60) +# define BOOST_PP_NODE_62(p) BOOST_PP_IIF(p(62), BOOST_PP_NODE_61, BOOST_PP_NODE_63) +# define BOOST_PP_NODE_61(p) BOOST_PP_IIF(p(61), 61, 62) +# define BOOST_PP_NODE_63(p) BOOST_PP_IIF(p(63), 63, 64) +# define BOOST_PP_NODE_96(p) BOOST_PP_IIF(p(96), BOOST_PP_NODE_80, BOOST_PP_NODE_112) +# define BOOST_PP_NODE_80(p) BOOST_PP_IIF(p(80), BOOST_PP_NODE_72, BOOST_PP_NODE_88) +# define BOOST_PP_NODE_72(p) BOOST_PP_IIF(p(72), BOOST_PP_NODE_68, BOOST_PP_NODE_76) +# define BOOST_PP_NODE_68(p) BOOST_PP_IIF(p(68), BOOST_PP_NODE_66, BOOST_PP_NODE_70) +# define BOOST_PP_NODE_66(p) BOOST_PP_IIF(p(66), BOOST_PP_NODE_65, BOOST_PP_NODE_67) +# define BOOST_PP_NODE_65(p) BOOST_PP_IIF(p(65), 65, 66) +# define BOOST_PP_NODE_67(p) BOOST_PP_IIF(p(67), 67, 68) +# define BOOST_PP_NODE_70(p) BOOST_PP_IIF(p(70), BOOST_PP_NODE_69, BOOST_PP_NODE_71) +# define BOOST_PP_NODE_69(p) BOOST_PP_IIF(p(69), 69, 70) +# define BOOST_PP_NODE_71(p) BOOST_PP_IIF(p(71), 71, 72) +# define BOOST_PP_NODE_76(p) BOOST_PP_IIF(p(76), BOOST_PP_NODE_74, BOOST_PP_NODE_78) +# define BOOST_PP_NODE_74(p) BOOST_PP_IIF(p(74), BOOST_PP_NODE_73, BOOST_PP_NODE_75) +# define BOOST_PP_NODE_73(p) BOOST_PP_IIF(p(73), 73, 74) +# define BOOST_PP_NODE_75(p) BOOST_PP_IIF(p(75), 75, 76) +# define BOOST_PP_NODE_78(p) BOOST_PP_IIF(p(78), BOOST_PP_NODE_77, BOOST_PP_NODE_79) +# define BOOST_PP_NODE_77(p) BOOST_PP_IIF(p(77), 77, 78) +# define BOOST_PP_NODE_79(p) BOOST_PP_IIF(p(79), 79, 80) +# define BOOST_PP_NODE_88(p) BOOST_PP_IIF(p(88), BOOST_PP_NODE_84, BOOST_PP_NODE_92) +# define BOOST_PP_NODE_84(p) BOOST_PP_IIF(p(84), BOOST_PP_NODE_82, BOOST_PP_NODE_86) +# define BOOST_PP_NODE_82(p) BOOST_PP_IIF(p(82), BOOST_PP_NODE_81, BOOST_PP_NODE_83) +# define BOOST_PP_NODE_81(p) BOOST_PP_IIF(p(81), 81, 82) +# define BOOST_PP_NODE_83(p) BOOST_PP_IIF(p(83), 83, 84) +# define BOOST_PP_NODE_86(p) BOOST_PP_IIF(p(86), BOOST_PP_NODE_85, BOOST_PP_NODE_87) +# define BOOST_PP_NODE_85(p) BOOST_PP_IIF(p(85), 85, 86) +# define BOOST_PP_NODE_87(p) BOOST_PP_IIF(p(87), 87, 88) +# define BOOST_PP_NODE_92(p) BOOST_PP_IIF(p(92), BOOST_PP_NODE_90, BOOST_PP_NODE_94) +# define BOOST_PP_NODE_90(p) BOOST_PP_IIF(p(90), BOOST_PP_NODE_89, BOOST_PP_NODE_91) +# define BOOST_PP_NODE_89(p) BOOST_PP_IIF(p(89), 89, 90) +# define BOOST_PP_NODE_91(p) BOOST_PP_IIF(p(91), 91, 92) +# define BOOST_PP_NODE_94(p) BOOST_PP_IIF(p(94), BOOST_PP_NODE_93, BOOST_PP_NODE_95) +# define BOOST_PP_NODE_93(p) BOOST_PP_IIF(p(93), 93, 94) +# define BOOST_PP_NODE_95(p) BOOST_PP_IIF(p(95), 95, 96) +# define BOOST_PP_NODE_112(p) BOOST_PP_IIF(p(112), BOOST_PP_NODE_104, BOOST_PP_NODE_120) +# define BOOST_PP_NODE_104(p) BOOST_PP_IIF(p(104), BOOST_PP_NODE_100, BOOST_PP_NODE_108) +# define BOOST_PP_NODE_100(p) BOOST_PP_IIF(p(100), BOOST_PP_NODE_98, BOOST_PP_NODE_102) +# define BOOST_PP_NODE_98(p) BOOST_PP_IIF(p(98), BOOST_PP_NODE_97, BOOST_PP_NODE_99) +# define BOOST_PP_NODE_97(p) BOOST_PP_IIF(p(97), 97, 98) +# define BOOST_PP_NODE_99(p) BOOST_PP_IIF(p(99), 99, 100) +# define BOOST_PP_NODE_102(p) BOOST_PP_IIF(p(102), BOOST_PP_NODE_101, BOOST_PP_NODE_103) +# define BOOST_PP_NODE_101(p) BOOST_PP_IIF(p(101), 101, 102) +# define BOOST_PP_NODE_103(p) BOOST_PP_IIF(p(103), 103, 104) +# define BOOST_PP_NODE_108(p) BOOST_PP_IIF(p(108), BOOST_PP_NODE_106, BOOST_PP_NODE_110) +# define BOOST_PP_NODE_106(p) BOOST_PP_IIF(p(106), BOOST_PP_NODE_105, BOOST_PP_NODE_107) +# define BOOST_PP_NODE_105(p) BOOST_PP_IIF(p(105), 105, 106) +# define BOOST_PP_NODE_107(p) BOOST_PP_IIF(p(107), 107, 108) +# define BOOST_PP_NODE_110(p) BOOST_PP_IIF(p(110), BOOST_PP_NODE_109, BOOST_PP_NODE_111) +# define BOOST_PP_NODE_109(p) BOOST_PP_IIF(p(109), 109, 110) +# define BOOST_PP_NODE_111(p) BOOST_PP_IIF(p(111), 111, 112) +# define BOOST_PP_NODE_120(p) BOOST_PP_IIF(p(120), BOOST_PP_NODE_116, BOOST_PP_NODE_124) +# define BOOST_PP_NODE_116(p) BOOST_PP_IIF(p(116), BOOST_PP_NODE_114, BOOST_PP_NODE_118) +# define BOOST_PP_NODE_114(p) BOOST_PP_IIF(p(114), BOOST_PP_NODE_113, BOOST_PP_NODE_115) +# define BOOST_PP_NODE_113(p) BOOST_PP_IIF(p(113), 113, 114) +# define BOOST_PP_NODE_115(p) BOOST_PP_IIF(p(115), 115, 116) +# define BOOST_PP_NODE_118(p) BOOST_PP_IIF(p(118), BOOST_PP_NODE_117, BOOST_PP_NODE_119) +# define BOOST_PP_NODE_117(p) BOOST_PP_IIF(p(117), 117, 118) +# define BOOST_PP_NODE_119(p) BOOST_PP_IIF(p(119), 119, 120) +# define BOOST_PP_NODE_124(p) BOOST_PP_IIF(p(124), BOOST_PP_NODE_122, BOOST_PP_NODE_126) +# define BOOST_PP_NODE_122(p) BOOST_PP_IIF(p(122), BOOST_PP_NODE_121, BOOST_PP_NODE_123) +# define BOOST_PP_NODE_121(p) BOOST_PP_IIF(p(121), 121, 122) +# define BOOST_PP_NODE_123(p) BOOST_PP_IIF(p(123), 123, 124) +# define BOOST_PP_NODE_126(p) BOOST_PP_IIF(p(126), BOOST_PP_NODE_125, BOOST_PP_NODE_127) +# define BOOST_PP_NODE_125(p) BOOST_PP_IIF(p(125), 125, 126) +# define BOOST_PP_NODE_127(p) BOOST_PP_IIF(p(127), 127, 128) +# define BOOST_PP_NODE_192(p) BOOST_PP_IIF(p(192), BOOST_PP_NODE_160, BOOST_PP_NODE_224) +# define BOOST_PP_NODE_160(p) BOOST_PP_IIF(p(160), BOOST_PP_NODE_144, BOOST_PP_NODE_176) +# define BOOST_PP_NODE_144(p) BOOST_PP_IIF(p(144), BOOST_PP_NODE_136, BOOST_PP_NODE_152) +# define BOOST_PP_NODE_136(p) BOOST_PP_IIF(p(136), BOOST_PP_NODE_132, BOOST_PP_NODE_140) +# define BOOST_PP_NODE_132(p) BOOST_PP_IIF(p(132), BOOST_PP_NODE_130, BOOST_PP_NODE_134) +# define BOOST_PP_NODE_130(p) BOOST_PP_IIF(p(130), BOOST_PP_NODE_129, BOOST_PP_NODE_131) +# define BOOST_PP_NODE_129(p) BOOST_PP_IIF(p(129), 129, 130) +# define BOOST_PP_NODE_131(p) BOOST_PP_IIF(p(131), 131, 132) +# define BOOST_PP_NODE_134(p) BOOST_PP_IIF(p(134), BOOST_PP_NODE_133, BOOST_PP_NODE_135) +# define BOOST_PP_NODE_133(p) BOOST_PP_IIF(p(133), 133, 134) +# define BOOST_PP_NODE_135(p) BOOST_PP_IIF(p(135), 135, 136) +# define BOOST_PP_NODE_140(p) BOOST_PP_IIF(p(140), BOOST_PP_NODE_138, BOOST_PP_NODE_142) +# define BOOST_PP_NODE_138(p) BOOST_PP_IIF(p(138), BOOST_PP_NODE_137, BOOST_PP_NODE_139) +# define BOOST_PP_NODE_137(p) BOOST_PP_IIF(p(137), 137, 138) +# define BOOST_PP_NODE_139(p) BOOST_PP_IIF(p(139), 139, 140) +# define BOOST_PP_NODE_142(p) BOOST_PP_IIF(p(142), BOOST_PP_NODE_141, BOOST_PP_NODE_143) +# define BOOST_PP_NODE_141(p) BOOST_PP_IIF(p(141), 141, 142) +# define BOOST_PP_NODE_143(p) BOOST_PP_IIF(p(143), 143, 144) +# define BOOST_PP_NODE_152(p) BOOST_PP_IIF(p(152), BOOST_PP_NODE_148, BOOST_PP_NODE_156) +# define BOOST_PP_NODE_148(p) BOOST_PP_IIF(p(148), BOOST_PP_NODE_146, BOOST_PP_NODE_150) +# define BOOST_PP_NODE_146(p) BOOST_PP_IIF(p(146), BOOST_PP_NODE_145, BOOST_PP_NODE_147) +# define BOOST_PP_NODE_145(p) BOOST_PP_IIF(p(145), 145, 146) +# define BOOST_PP_NODE_147(p) BOOST_PP_IIF(p(147), 147, 148) +# define BOOST_PP_NODE_150(p) BOOST_PP_IIF(p(150), BOOST_PP_NODE_149, BOOST_PP_NODE_151) +# define BOOST_PP_NODE_149(p) BOOST_PP_IIF(p(149), 149, 150) +# define BOOST_PP_NODE_151(p) BOOST_PP_IIF(p(151), 151, 152) +# define BOOST_PP_NODE_156(p) BOOST_PP_IIF(p(156), BOOST_PP_NODE_154, BOOST_PP_NODE_158) +# define BOOST_PP_NODE_154(p) BOOST_PP_IIF(p(154), BOOST_PP_NODE_153, BOOST_PP_NODE_155) +# define BOOST_PP_NODE_153(p) BOOST_PP_IIF(p(153), 153, 154) +# define BOOST_PP_NODE_155(p) BOOST_PP_IIF(p(155), 155, 156) +# define BOOST_PP_NODE_158(p) BOOST_PP_IIF(p(158), BOOST_PP_NODE_157, BOOST_PP_NODE_159) +# define BOOST_PP_NODE_157(p) BOOST_PP_IIF(p(157), 157, 158) +# define BOOST_PP_NODE_159(p) BOOST_PP_IIF(p(159), 159, 160) +# define BOOST_PP_NODE_176(p) BOOST_PP_IIF(p(176), BOOST_PP_NODE_168, BOOST_PP_NODE_184) +# define BOOST_PP_NODE_168(p) BOOST_PP_IIF(p(168), BOOST_PP_NODE_164, BOOST_PP_NODE_172) +# define BOOST_PP_NODE_164(p) BOOST_PP_IIF(p(164), BOOST_PP_NODE_162, BOOST_PP_NODE_166) +# define BOOST_PP_NODE_162(p) BOOST_PP_IIF(p(162), BOOST_PP_NODE_161, BOOST_PP_NODE_163) +# define BOOST_PP_NODE_161(p) BOOST_PP_IIF(p(161), 161, 162) +# define BOOST_PP_NODE_163(p) BOOST_PP_IIF(p(163), 163, 164) +# define BOOST_PP_NODE_166(p) BOOST_PP_IIF(p(166), BOOST_PP_NODE_165, BOOST_PP_NODE_167) +# define BOOST_PP_NODE_165(p) BOOST_PP_IIF(p(165), 165, 166) +# define BOOST_PP_NODE_167(p) BOOST_PP_IIF(p(167), 167, 168) +# define BOOST_PP_NODE_172(p) BOOST_PP_IIF(p(172), BOOST_PP_NODE_170, BOOST_PP_NODE_174) +# define BOOST_PP_NODE_170(p) BOOST_PP_IIF(p(170), BOOST_PP_NODE_169, BOOST_PP_NODE_171) +# define BOOST_PP_NODE_169(p) BOOST_PP_IIF(p(169), 169, 170) +# define BOOST_PP_NODE_171(p) BOOST_PP_IIF(p(171), 171, 172) +# define BOOST_PP_NODE_174(p) BOOST_PP_IIF(p(174), BOOST_PP_NODE_173, BOOST_PP_NODE_175) +# define BOOST_PP_NODE_173(p) BOOST_PP_IIF(p(173), 173, 174) +# define BOOST_PP_NODE_175(p) BOOST_PP_IIF(p(175), 175, 176) +# define BOOST_PP_NODE_184(p) BOOST_PP_IIF(p(184), BOOST_PP_NODE_180, BOOST_PP_NODE_188) +# define BOOST_PP_NODE_180(p) BOOST_PP_IIF(p(180), BOOST_PP_NODE_178, BOOST_PP_NODE_182) +# define BOOST_PP_NODE_178(p) BOOST_PP_IIF(p(178), BOOST_PP_NODE_177, BOOST_PP_NODE_179) +# define BOOST_PP_NODE_177(p) BOOST_PP_IIF(p(177), 177, 178) +# define BOOST_PP_NODE_179(p) BOOST_PP_IIF(p(179), 179, 180) +# define BOOST_PP_NODE_182(p) BOOST_PP_IIF(p(182), BOOST_PP_NODE_181, BOOST_PP_NODE_183) +# define BOOST_PP_NODE_181(p) BOOST_PP_IIF(p(181), 181, 182) +# define BOOST_PP_NODE_183(p) BOOST_PP_IIF(p(183), 183, 184) +# define BOOST_PP_NODE_188(p) BOOST_PP_IIF(p(188), BOOST_PP_NODE_186, BOOST_PP_NODE_190) +# define BOOST_PP_NODE_186(p) BOOST_PP_IIF(p(186), BOOST_PP_NODE_185, BOOST_PP_NODE_187) +# define BOOST_PP_NODE_185(p) BOOST_PP_IIF(p(185), 185, 186) +# define BOOST_PP_NODE_187(p) BOOST_PP_IIF(p(187), 187, 188) +# define BOOST_PP_NODE_190(p) BOOST_PP_IIF(p(190), BOOST_PP_NODE_189, BOOST_PP_NODE_191) +# define BOOST_PP_NODE_189(p) BOOST_PP_IIF(p(189), 189, 190) +# define BOOST_PP_NODE_191(p) BOOST_PP_IIF(p(191), 191, 192) +# define BOOST_PP_NODE_224(p) BOOST_PP_IIF(p(224), BOOST_PP_NODE_208, BOOST_PP_NODE_240) +# define BOOST_PP_NODE_208(p) BOOST_PP_IIF(p(208), BOOST_PP_NODE_200, BOOST_PP_NODE_216) +# define BOOST_PP_NODE_200(p) BOOST_PP_IIF(p(200), BOOST_PP_NODE_196, BOOST_PP_NODE_204) +# define BOOST_PP_NODE_196(p) BOOST_PP_IIF(p(196), BOOST_PP_NODE_194, BOOST_PP_NODE_198) +# define BOOST_PP_NODE_194(p) BOOST_PP_IIF(p(194), BOOST_PP_NODE_193, BOOST_PP_NODE_195) +# define BOOST_PP_NODE_193(p) BOOST_PP_IIF(p(193), 193, 194) +# define BOOST_PP_NODE_195(p) BOOST_PP_IIF(p(195), 195, 196) +# define BOOST_PP_NODE_198(p) BOOST_PP_IIF(p(198), BOOST_PP_NODE_197, BOOST_PP_NODE_199) +# define BOOST_PP_NODE_197(p) BOOST_PP_IIF(p(197), 197, 198) +# define BOOST_PP_NODE_199(p) BOOST_PP_IIF(p(199), 199, 200) +# define BOOST_PP_NODE_204(p) BOOST_PP_IIF(p(204), BOOST_PP_NODE_202, BOOST_PP_NODE_206) +# define BOOST_PP_NODE_202(p) BOOST_PP_IIF(p(202), BOOST_PP_NODE_201, BOOST_PP_NODE_203) +# define BOOST_PP_NODE_201(p) BOOST_PP_IIF(p(201), 201, 202) +# define BOOST_PP_NODE_203(p) BOOST_PP_IIF(p(203), 203, 204) +# define BOOST_PP_NODE_206(p) BOOST_PP_IIF(p(206), BOOST_PP_NODE_205, BOOST_PP_NODE_207) +# define BOOST_PP_NODE_205(p) BOOST_PP_IIF(p(205), 205, 206) +# define BOOST_PP_NODE_207(p) BOOST_PP_IIF(p(207), 207, 208) +# define BOOST_PP_NODE_216(p) BOOST_PP_IIF(p(216), BOOST_PP_NODE_212, BOOST_PP_NODE_220) +# define BOOST_PP_NODE_212(p) BOOST_PP_IIF(p(212), BOOST_PP_NODE_210, BOOST_PP_NODE_214) +# define BOOST_PP_NODE_210(p) BOOST_PP_IIF(p(210), BOOST_PP_NODE_209, BOOST_PP_NODE_211) +# define BOOST_PP_NODE_209(p) BOOST_PP_IIF(p(209), 209, 210) +# define BOOST_PP_NODE_211(p) BOOST_PP_IIF(p(211), 211, 212) +# define BOOST_PP_NODE_214(p) BOOST_PP_IIF(p(214), BOOST_PP_NODE_213, BOOST_PP_NODE_215) +# define BOOST_PP_NODE_213(p) BOOST_PP_IIF(p(213), 213, 214) +# define BOOST_PP_NODE_215(p) BOOST_PP_IIF(p(215), 215, 216) +# define BOOST_PP_NODE_220(p) BOOST_PP_IIF(p(220), BOOST_PP_NODE_218, BOOST_PP_NODE_222) +# define BOOST_PP_NODE_218(p) BOOST_PP_IIF(p(218), BOOST_PP_NODE_217, BOOST_PP_NODE_219) +# define BOOST_PP_NODE_217(p) BOOST_PP_IIF(p(217), 217, 218) +# define BOOST_PP_NODE_219(p) BOOST_PP_IIF(p(219), 219, 220) +# define BOOST_PP_NODE_222(p) BOOST_PP_IIF(p(222), BOOST_PP_NODE_221, BOOST_PP_NODE_223) +# define BOOST_PP_NODE_221(p) BOOST_PP_IIF(p(221), 221, 222) +# define BOOST_PP_NODE_223(p) BOOST_PP_IIF(p(223), 223, 224) +# define BOOST_PP_NODE_240(p) BOOST_PP_IIF(p(240), BOOST_PP_NODE_232, BOOST_PP_NODE_248) +# define BOOST_PP_NODE_232(p) BOOST_PP_IIF(p(232), BOOST_PP_NODE_228, BOOST_PP_NODE_236) +# define BOOST_PP_NODE_228(p) BOOST_PP_IIF(p(228), BOOST_PP_NODE_226, BOOST_PP_NODE_230) +# define BOOST_PP_NODE_226(p) BOOST_PP_IIF(p(226), BOOST_PP_NODE_225, BOOST_PP_NODE_227) +# define BOOST_PP_NODE_225(p) BOOST_PP_IIF(p(225), 225, 226) +# define BOOST_PP_NODE_227(p) BOOST_PP_IIF(p(227), 227, 228) +# define BOOST_PP_NODE_230(p) BOOST_PP_IIF(p(230), BOOST_PP_NODE_229, BOOST_PP_NODE_231) +# define BOOST_PP_NODE_229(p) BOOST_PP_IIF(p(229), 229, 230) +# define BOOST_PP_NODE_231(p) BOOST_PP_IIF(p(231), 231, 232) +# define BOOST_PP_NODE_236(p) BOOST_PP_IIF(p(236), BOOST_PP_NODE_234, BOOST_PP_NODE_238) +# define BOOST_PP_NODE_234(p) BOOST_PP_IIF(p(234), BOOST_PP_NODE_233, BOOST_PP_NODE_235) +# define BOOST_PP_NODE_233(p) BOOST_PP_IIF(p(233), 233, 234) +# define BOOST_PP_NODE_235(p) BOOST_PP_IIF(p(235), 235, 236) +# define BOOST_PP_NODE_238(p) BOOST_PP_IIF(p(238), BOOST_PP_NODE_237, BOOST_PP_NODE_239) +# define BOOST_PP_NODE_237(p) BOOST_PP_IIF(p(237), 237, 238) +# define BOOST_PP_NODE_239(p) BOOST_PP_IIF(p(239), 239, 240) +# define BOOST_PP_NODE_248(p) BOOST_PP_IIF(p(248), BOOST_PP_NODE_244, BOOST_PP_NODE_252) +# define BOOST_PP_NODE_244(p) BOOST_PP_IIF(p(244), BOOST_PP_NODE_242, BOOST_PP_NODE_246) +# define BOOST_PP_NODE_242(p) BOOST_PP_IIF(p(242), BOOST_PP_NODE_241, BOOST_PP_NODE_243) +# define BOOST_PP_NODE_241(p) BOOST_PP_IIF(p(241), 241, 242) +# define BOOST_PP_NODE_243(p) BOOST_PP_IIF(p(243), 243, 244) +# define BOOST_PP_NODE_246(p) BOOST_PP_IIF(p(246), BOOST_PP_NODE_245, BOOST_PP_NODE_247) +# define BOOST_PP_NODE_245(p) BOOST_PP_IIF(p(245), 245, 246) +# define BOOST_PP_NODE_247(p) BOOST_PP_IIF(p(247), 247, 248) +# define BOOST_PP_NODE_252(p) BOOST_PP_IIF(p(252), BOOST_PP_NODE_250, BOOST_PP_NODE_254) +# define BOOST_PP_NODE_250(p) BOOST_PP_IIF(p(250), BOOST_PP_NODE_249, BOOST_PP_NODE_251) +# define BOOST_PP_NODE_249(p) BOOST_PP_IIF(p(249), 249, 250) +# define BOOST_PP_NODE_251(p) BOOST_PP_IIF(p(251), 251, 252) +# define BOOST_PP_NODE_254(p) BOOST_PP_IIF(p(254), BOOST_PP_NODE_253, BOOST_PP_NODE_255) +# define BOOST_PP_NODE_253(p) BOOST_PP_IIF(p(253), 253, 254) +# define BOOST_PP_NODE_255(p) BOOST_PP_IIF(p(255), 255, 256) +# +# endif +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/detail/check.hpp b/ThirdParty/boost-Subset/boost/preprocessor/detail/check.hpp new file mode 100644 index 0000000000..63f8ff9166 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/detail/check.hpp @@ -0,0 +1,48 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_DETAIL_CHECK_HPP +# define BOOST_PREPROCESSOR_DETAIL_CHECK_HPP +# +# include +# include +# +# /* BOOST_PP_CHECK */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_CHECK(x, type) BOOST_PP_CHECK_D(x, type) +# else +# define BOOST_PP_CHECK(x, type) BOOST_PP_CHECK_OO((x, type)) +# define BOOST_PP_CHECK_OO(par) BOOST_PP_CHECK_D ## par +# endif +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() +# define BOOST_PP_CHECK_D(x, type) BOOST_PP_CHECK_1(BOOST_PP_CAT(BOOST_PP_CHECK_RESULT_, type x)) +# define BOOST_PP_CHECK_1(chk) BOOST_PP_CHECK_2(chk) +# define BOOST_PP_CHECK_2(res, _) res +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_CHECK_D(x, type) BOOST_PP_CHECK_1(type x) +# define BOOST_PP_CHECK_1(chk) BOOST_PP_CHECK_2(chk) +# define BOOST_PP_CHECK_2(chk) BOOST_PP_CHECK_3((BOOST_PP_CHECK_RESULT_ ## chk)) +# define BOOST_PP_CHECK_3(im) BOOST_PP_CHECK_5(BOOST_PP_CHECK_4 im) +# define BOOST_PP_CHECK_4(res, _) res +# define BOOST_PP_CHECK_5(res) res +# else /* DMC */ +# define BOOST_PP_CHECK_D(x, type) BOOST_PP_CHECK_OO((type x)) +# define BOOST_PP_CHECK_OO(par) BOOST_PP_CHECK_0 ## par +# define BOOST_PP_CHECK_0(chk) BOOST_PP_CHECK_1(BOOST_PP_CAT(BOOST_PP_CHECK_RESULT_, chk)) +# define BOOST_PP_CHECK_1(chk) BOOST_PP_CHECK_2(chk) +# define BOOST_PP_CHECK_2(res, _) res +# endif +# +# define BOOST_PP_CHECK_RESULT_1 1, BOOST_PP_NIL +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/detail/dmc/auto_rec.hpp b/ThirdParty/boost-Subset/boost/preprocessor/detail/dmc/auto_rec.hpp new file mode 100644 index 0000000000..37fbe04157 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/detail/dmc/auto_rec.hpp @@ -0,0 +1,286 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_DETAIL_AUTO_REC_HPP +# define BOOST_PREPROCESSOR_DETAIL_AUTO_REC_HPP +# +# include +# +# /* BOOST_PP_AUTO_REC */ +# +# define BOOST_PP_AUTO_REC(pred, n) BOOST_PP_NODE_ENTRY_ ## n(pred) +# +# define BOOST_PP_NODE_ENTRY_256(p) BOOST_PP_NODE_128(p)(p)(p)(p)(p)(p)(p)(p) +# define BOOST_PP_NODE_ENTRY_128(p) BOOST_PP_NODE_64(p)(p)(p)(p)(p)(p)(p) +# define BOOST_PP_NODE_ENTRY_64(p) BOOST_PP_NODE_32(p)(p)(p)(p)(p)(p) +# define BOOST_PP_NODE_ENTRY_32(p) BOOST_PP_NODE_16(p)(p)(p)(p)(p) +# define BOOST_PP_NODE_ENTRY_16(p) BOOST_PP_NODE_8(p)(p)(p)(p) +# define BOOST_PP_NODE_ENTRY_8(p) BOOST_PP_NODE_4(p)(p)(p) +# define BOOST_PP_NODE_ENTRY_4(p) BOOST_PP_NODE_2(p)(p) +# define BOOST_PP_NODE_ENTRY_2(p) BOOST_PP_NODE_1(p) +# +# define BOOST_PP_NODE_128(p) BOOST_PP_IIF(p##(128), BOOST_PP_NODE_64, BOOST_PP_NODE_192) +# define BOOST_PP_NODE_64(p) BOOST_PP_IIF(p##(64), BOOST_PP_NODE_32, BOOST_PP_NODE_96) +# define BOOST_PP_NODE_32(p) BOOST_PP_IIF(p##(32), BOOST_PP_NODE_16, BOOST_PP_NODE_48) +# define BOOST_PP_NODE_16(p) BOOST_PP_IIF(p##(16), BOOST_PP_NODE_8, BOOST_PP_NODE_24) +# define BOOST_PP_NODE_8(p) BOOST_PP_IIF(p##(8), BOOST_PP_NODE_4, BOOST_PP_NODE_12) +# define BOOST_PP_NODE_4(p) BOOST_PP_IIF(p##(4), BOOST_PP_NODE_2, BOOST_PP_NODE_6) +# define BOOST_PP_NODE_2(p) BOOST_PP_IIF(p##(2), BOOST_PP_NODE_1, BOOST_PP_NODE_3) +# define BOOST_PP_NODE_1(p) BOOST_PP_IIF(p##(1), 1, 2) +# define BOOST_PP_NODE_3(p) BOOST_PP_IIF(p##(3), 3, 4) +# define BOOST_PP_NODE_6(p) BOOST_PP_IIF(p##(6), BOOST_PP_NODE_5, BOOST_PP_NODE_7) +# define BOOST_PP_NODE_5(p) BOOST_PP_IIF(p##(5), 5, 6) +# define BOOST_PP_NODE_7(p) BOOST_PP_IIF(p##(7), 7, 8) +# define BOOST_PP_NODE_12(p) BOOST_PP_IIF(p##(12), BOOST_PP_NODE_10, BOOST_PP_NODE_14) +# define BOOST_PP_NODE_10(p) BOOST_PP_IIF(p##(10), BOOST_PP_NODE_9, BOOST_PP_NODE_11) +# define BOOST_PP_NODE_9(p) BOOST_PP_IIF(p##(9), 9, 10) +# define BOOST_PP_NODE_11(p) BOOST_PP_IIF(p##(11), 11, 12) +# define BOOST_PP_NODE_14(p) BOOST_PP_IIF(p##(14), BOOST_PP_NODE_13, BOOST_PP_NODE_15) +# define BOOST_PP_NODE_13(p) BOOST_PP_IIF(p##(13), 13, 14) +# define BOOST_PP_NODE_15(p) BOOST_PP_IIF(p##(15), 15, 16) +# define BOOST_PP_NODE_24(p) BOOST_PP_IIF(p##(24), BOOST_PP_NODE_20, BOOST_PP_NODE_28) +# define BOOST_PP_NODE_20(p) BOOST_PP_IIF(p##(20), BOOST_PP_NODE_18, BOOST_PP_NODE_22) +# define BOOST_PP_NODE_18(p) BOOST_PP_IIF(p##(18), BOOST_PP_NODE_17, BOOST_PP_NODE_19) +# define BOOST_PP_NODE_17(p) BOOST_PP_IIF(p##(17), 17, 18) +# define BOOST_PP_NODE_19(p) BOOST_PP_IIF(p##(19), 19, 20) +# define BOOST_PP_NODE_22(p) BOOST_PP_IIF(p##(22), BOOST_PP_NODE_21, BOOST_PP_NODE_23) +# define BOOST_PP_NODE_21(p) BOOST_PP_IIF(p##(21), 21, 22) +# define BOOST_PP_NODE_23(p) BOOST_PP_IIF(p##(23), 23, 24) +# define BOOST_PP_NODE_28(p) BOOST_PP_IIF(p##(28), BOOST_PP_NODE_26, BOOST_PP_NODE_30) +# define BOOST_PP_NODE_26(p) BOOST_PP_IIF(p##(26), BOOST_PP_NODE_25, BOOST_PP_NODE_27) +# define BOOST_PP_NODE_25(p) BOOST_PP_IIF(p##(25), 25, 26) +# define BOOST_PP_NODE_27(p) BOOST_PP_IIF(p##(27), 27, 28) +# define BOOST_PP_NODE_30(p) BOOST_PP_IIF(p##(30), BOOST_PP_NODE_29, BOOST_PP_NODE_31) +# define BOOST_PP_NODE_29(p) BOOST_PP_IIF(p##(29), 29, 30) +# define BOOST_PP_NODE_31(p) BOOST_PP_IIF(p##(31), 31, 32) +# define BOOST_PP_NODE_48(p) BOOST_PP_IIF(p##(48), BOOST_PP_NODE_40, BOOST_PP_NODE_56) +# define BOOST_PP_NODE_40(p) BOOST_PP_IIF(p##(40), BOOST_PP_NODE_36, BOOST_PP_NODE_44) +# define BOOST_PP_NODE_36(p) BOOST_PP_IIF(p##(36), BOOST_PP_NODE_34, BOOST_PP_NODE_38) +# define BOOST_PP_NODE_34(p) BOOST_PP_IIF(p##(34), BOOST_PP_NODE_33, BOOST_PP_NODE_35) +# define BOOST_PP_NODE_33(p) BOOST_PP_IIF(p##(33), 33, 34) +# define BOOST_PP_NODE_35(p) BOOST_PP_IIF(p##(35), 35, 36) +# define BOOST_PP_NODE_38(p) BOOST_PP_IIF(p##(38), BOOST_PP_NODE_37, BOOST_PP_NODE_39) +# define BOOST_PP_NODE_37(p) BOOST_PP_IIF(p##(37), 37, 38) +# define BOOST_PP_NODE_39(p) BOOST_PP_IIF(p##(39), 39, 40) +# define BOOST_PP_NODE_44(p) BOOST_PP_IIF(p##(44), BOOST_PP_NODE_42, BOOST_PP_NODE_46) +# define BOOST_PP_NODE_42(p) BOOST_PP_IIF(p##(42), BOOST_PP_NODE_41, BOOST_PP_NODE_43) +# define BOOST_PP_NODE_41(p) BOOST_PP_IIF(p##(41), 41, 42) +# define BOOST_PP_NODE_43(p) BOOST_PP_IIF(p##(43), 43, 44) +# define BOOST_PP_NODE_46(p) BOOST_PP_IIF(p##(46), BOOST_PP_NODE_45, BOOST_PP_NODE_47) +# define BOOST_PP_NODE_45(p) BOOST_PP_IIF(p##(45), 45, 46) +# define BOOST_PP_NODE_47(p) BOOST_PP_IIF(p##(47), 47, 48) +# define BOOST_PP_NODE_56(p) BOOST_PP_IIF(p##(56), BOOST_PP_NODE_52, BOOST_PP_NODE_60) +# define BOOST_PP_NODE_52(p) BOOST_PP_IIF(p##(52), BOOST_PP_NODE_50, BOOST_PP_NODE_54) +# define BOOST_PP_NODE_50(p) BOOST_PP_IIF(p##(50), BOOST_PP_NODE_49, BOOST_PP_NODE_51) +# define BOOST_PP_NODE_49(p) BOOST_PP_IIF(p##(49), 49, 50) +# define BOOST_PP_NODE_51(p) BOOST_PP_IIF(p##(51), 51, 52) +# define BOOST_PP_NODE_54(p) BOOST_PP_IIF(p##(54), BOOST_PP_NODE_53, BOOST_PP_NODE_55) +# define BOOST_PP_NODE_53(p) BOOST_PP_IIF(p##(53), 53, 54) +# define BOOST_PP_NODE_55(p) BOOST_PP_IIF(p##(55), 55, 56) +# define BOOST_PP_NODE_60(p) BOOST_PP_IIF(p##(60), BOOST_PP_NODE_58, BOOST_PP_NODE_62) +# define BOOST_PP_NODE_58(p) BOOST_PP_IIF(p##(58), BOOST_PP_NODE_57, BOOST_PP_NODE_59) +# define BOOST_PP_NODE_57(p) BOOST_PP_IIF(p##(57), 57, 58) +# define BOOST_PP_NODE_59(p) BOOST_PP_IIF(p##(59), 59, 60) +# define BOOST_PP_NODE_62(p) BOOST_PP_IIF(p##(62), BOOST_PP_NODE_61, BOOST_PP_NODE_63) +# define BOOST_PP_NODE_61(p) BOOST_PP_IIF(p##(61), 61, 62) +# define BOOST_PP_NODE_63(p) BOOST_PP_IIF(p##(63), 63, 64) +# define BOOST_PP_NODE_96(p) BOOST_PP_IIF(p##(96), BOOST_PP_NODE_80, BOOST_PP_NODE_112) +# define BOOST_PP_NODE_80(p) BOOST_PP_IIF(p##(80), BOOST_PP_NODE_72, BOOST_PP_NODE_88) +# define BOOST_PP_NODE_72(p) BOOST_PP_IIF(p##(72), BOOST_PP_NODE_68, BOOST_PP_NODE_76) +# define BOOST_PP_NODE_68(p) BOOST_PP_IIF(p##(68), BOOST_PP_NODE_66, BOOST_PP_NODE_70) +# define BOOST_PP_NODE_66(p) BOOST_PP_IIF(p##(66), BOOST_PP_NODE_65, BOOST_PP_NODE_67) +# define BOOST_PP_NODE_65(p) BOOST_PP_IIF(p##(65), 65, 66) +# define BOOST_PP_NODE_67(p) BOOST_PP_IIF(p##(67), 67, 68) +# define BOOST_PP_NODE_70(p) BOOST_PP_IIF(p##(70), BOOST_PP_NODE_69, BOOST_PP_NODE_71) +# define BOOST_PP_NODE_69(p) BOOST_PP_IIF(p##(69), 69, 70) +# define BOOST_PP_NODE_71(p) BOOST_PP_IIF(p##(71), 71, 72) +# define BOOST_PP_NODE_76(p) BOOST_PP_IIF(p##(76), BOOST_PP_NODE_74, BOOST_PP_NODE_78) +# define BOOST_PP_NODE_74(p) BOOST_PP_IIF(p##(74), BOOST_PP_NODE_73, BOOST_PP_NODE_75) +# define BOOST_PP_NODE_73(p) BOOST_PP_IIF(p##(73), 73, 74) +# define BOOST_PP_NODE_75(p) BOOST_PP_IIF(p##(75), 75, 76) +# define BOOST_PP_NODE_78(p) BOOST_PP_IIF(p##(78), BOOST_PP_NODE_77, BOOST_PP_NODE_79) +# define BOOST_PP_NODE_77(p) BOOST_PP_IIF(p##(77), 77, 78) +# define BOOST_PP_NODE_79(p) BOOST_PP_IIF(p##(79), 79, 80) +# define BOOST_PP_NODE_88(p) BOOST_PP_IIF(p##(88), BOOST_PP_NODE_84, BOOST_PP_NODE_92) +# define BOOST_PP_NODE_84(p) BOOST_PP_IIF(p##(84), BOOST_PP_NODE_82, BOOST_PP_NODE_86) +# define BOOST_PP_NODE_82(p) BOOST_PP_IIF(p##(82), BOOST_PP_NODE_81, BOOST_PP_NODE_83) +# define BOOST_PP_NODE_81(p) BOOST_PP_IIF(p##(81), 81, 82) +# define BOOST_PP_NODE_83(p) BOOST_PP_IIF(p##(83), 83, 84) +# define BOOST_PP_NODE_86(p) BOOST_PP_IIF(p##(86), BOOST_PP_NODE_85, BOOST_PP_NODE_87) +# define BOOST_PP_NODE_85(p) BOOST_PP_IIF(p##(85), 85, 86) +# define BOOST_PP_NODE_87(p) BOOST_PP_IIF(p##(87), 87, 88) +# define BOOST_PP_NODE_92(p) BOOST_PP_IIF(p##(92), BOOST_PP_NODE_90, BOOST_PP_NODE_94) +# define BOOST_PP_NODE_90(p) BOOST_PP_IIF(p##(90), BOOST_PP_NODE_89, BOOST_PP_NODE_91) +# define BOOST_PP_NODE_89(p) BOOST_PP_IIF(p##(89), 89, 90) +# define BOOST_PP_NODE_91(p) BOOST_PP_IIF(p##(91), 91, 92) +# define BOOST_PP_NODE_94(p) BOOST_PP_IIF(p##(94), BOOST_PP_NODE_93, BOOST_PP_NODE_95) +# define BOOST_PP_NODE_93(p) BOOST_PP_IIF(p##(93), 93, 94) +# define BOOST_PP_NODE_95(p) BOOST_PP_IIF(p##(95), 95, 96) +# define BOOST_PP_NODE_112(p) BOOST_PP_IIF(p##(112), BOOST_PP_NODE_104, BOOST_PP_NODE_120) +# define BOOST_PP_NODE_104(p) BOOST_PP_IIF(p##(104), BOOST_PP_NODE_100, BOOST_PP_NODE_108) +# define BOOST_PP_NODE_100(p) BOOST_PP_IIF(p##(100), BOOST_PP_NODE_98, BOOST_PP_NODE_102) +# define BOOST_PP_NODE_98(p) BOOST_PP_IIF(p##(98), BOOST_PP_NODE_97, BOOST_PP_NODE_99) +# define BOOST_PP_NODE_97(p) BOOST_PP_IIF(p##(97), 97, 98) +# define BOOST_PP_NODE_99(p) BOOST_PP_IIF(p##(99), 99, 100) +# define BOOST_PP_NODE_102(p) BOOST_PP_IIF(p##(102), BOOST_PP_NODE_101, BOOST_PP_NODE_103) +# define BOOST_PP_NODE_101(p) BOOST_PP_IIF(p##(101), 101, 102) +# define BOOST_PP_NODE_103(p) BOOST_PP_IIF(p##(103), 103, 104) +# define BOOST_PP_NODE_108(p) BOOST_PP_IIF(p##(108), BOOST_PP_NODE_106, BOOST_PP_NODE_110) +# define BOOST_PP_NODE_106(p) BOOST_PP_IIF(p##(106), BOOST_PP_NODE_105, BOOST_PP_NODE_107) +# define BOOST_PP_NODE_105(p) BOOST_PP_IIF(p##(105), 105, 106) +# define BOOST_PP_NODE_107(p) BOOST_PP_IIF(p##(107), 107, 108) +# define BOOST_PP_NODE_110(p) BOOST_PP_IIF(p##(110), BOOST_PP_NODE_109, BOOST_PP_NODE_111) +# define BOOST_PP_NODE_109(p) BOOST_PP_IIF(p##(109), 109, 110) +# define BOOST_PP_NODE_111(p) BOOST_PP_IIF(p##(111), 111, 112) +# define BOOST_PP_NODE_120(p) BOOST_PP_IIF(p##(120), BOOST_PP_NODE_116, BOOST_PP_NODE_124) +# define BOOST_PP_NODE_116(p) BOOST_PP_IIF(p##(116), BOOST_PP_NODE_114, BOOST_PP_NODE_118) +# define BOOST_PP_NODE_114(p) BOOST_PP_IIF(p##(114), BOOST_PP_NODE_113, BOOST_PP_NODE_115) +# define BOOST_PP_NODE_113(p) BOOST_PP_IIF(p##(113), 113, 114) +# define BOOST_PP_NODE_115(p) BOOST_PP_IIF(p##(115), 115, 116) +# define BOOST_PP_NODE_118(p) BOOST_PP_IIF(p##(118), BOOST_PP_NODE_117, BOOST_PP_NODE_119) +# define BOOST_PP_NODE_117(p) BOOST_PP_IIF(p##(117), 117, 118) +# define BOOST_PP_NODE_119(p) BOOST_PP_IIF(p##(119), 119, 120) +# define BOOST_PP_NODE_124(p) BOOST_PP_IIF(p##(124), BOOST_PP_NODE_122, BOOST_PP_NODE_126) +# define BOOST_PP_NODE_122(p) BOOST_PP_IIF(p##(122), BOOST_PP_NODE_121, BOOST_PP_NODE_123) +# define BOOST_PP_NODE_121(p) BOOST_PP_IIF(p##(121), 121, 122) +# define BOOST_PP_NODE_123(p) BOOST_PP_IIF(p##(123), 123, 124) +# define BOOST_PP_NODE_126(p) BOOST_PP_IIF(p##(126), BOOST_PP_NODE_125, BOOST_PP_NODE_127) +# define BOOST_PP_NODE_125(p) BOOST_PP_IIF(p##(125), 125, 126) +# define BOOST_PP_NODE_127(p) BOOST_PP_IIF(p##(127), 127, 128) +# define BOOST_PP_NODE_192(p) BOOST_PP_IIF(p##(192), BOOST_PP_NODE_160, BOOST_PP_NODE_224) +# define BOOST_PP_NODE_160(p) BOOST_PP_IIF(p##(160), BOOST_PP_NODE_144, BOOST_PP_NODE_176) +# define BOOST_PP_NODE_144(p) BOOST_PP_IIF(p##(144), BOOST_PP_NODE_136, BOOST_PP_NODE_152) +# define BOOST_PP_NODE_136(p) BOOST_PP_IIF(p##(136), BOOST_PP_NODE_132, BOOST_PP_NODE_140) +# define BOOST_PP_NODE_132(p) BOOST_PP_IIF(p##(132), BOOST_PP_NODE_130, BOOST_PP_NODE_134) +# define BOOST_PP_NODE_130(p) BOOST_PP_IIF(p##(130), BOOST_PP_NODE_129, BOOST_PP_NODE_131) +# define BOOST_PP_NODE_129(p) BOOST_PP_IIF(p##(129), 129, 130) +# define BOOST_PP_NODE_131(p) BOOST_PP_IIF(p##(131), 131, 132) +# define BOOST_PP_NODE_134(p) BOOST_PP_IIF(p##(134), BOOST_PP_NODE_133, BOOST_PP_NODE_135) +# define BOOST_PP_NODE_133(p) BOOST_PP_IIF(p##(133), 133, 134) +# define BOOST_PP_NODE_135(p) BOOST_PP_IIF(p##(135), 135, 136) +# define BOOST_PP_NODE_140(p) BOOST_PP_IIF(p##(140), BOOST_PP_NODE_138, BOOST_PP_NODE_142) +# define BOOST_PP_NODE_138(p) BOOST_PP_IIF(p##(138), BOOST_PP_NODE_137, BOOST_PP_NODE_139) +# define BOOST_PP_NODE_137(p) BOOST_PP_IIF(p##(137), 137, 138) +# define BOOST_PP_NODE_139(p) BOOST_PP_IIF(p##(139), 139, 140) +# define BOOST_PP_NODE_142(p) BOOST_PP_IIF(p##(142), BOOST_PP_NODE_141, BOOST_PP_NODE_143) +# define BOOST_PP_NODE_141(p) BOOST_PP_IIF(p##(141), 141, 142) +# define BOOST_PP_NODE_143(p) BOOST_PP_IIF(p##(143), 143, 144) +# define BOOST_PP_NODE_152(p) BOOST_PP_IIF(p##(152), BOOST_PP_NODE_148, BOOST_PP_NODE_156) +# define BOOST_PP_NODE_148(p) BOOST_PP_IIF(p##(148), BOOST_PP_NODE_146, BOOST_PP_NODE_150) +# define BOOST_PP_NODE_146(p) BOOST_PP_IIF(p##(146), BOOST_PP_NODE_145, BOOST_PP_NODE_147) +# define BOOST_PP_NODE_145(p) BOOST_PP_IIF(p##(145), 145, 146) +# define BOOST_PP_NODE_147(p) BOOST_PP_IIF(p##(147), 147, 148) +# define BOOST_PP_NODE_150(p) BOOST_PP_IIF(p##(150), BOOST_PP_NODE_149, BOOST_PP_NODE_151) +# define BOOST_PP_NODE_149(p) BOOST_PP_IIF(p##(149), 149, 150) +# define BOOST_PP_NODE_151(p) BOOST_PP_IIF(p##(151), 151, 152) +# define BOOST_PP_NODE_156(p) BOOST_PP_IIF(p##(156), BOOST_PP_NODE_154, BOOST_PP_NODE_158) +# define BOOST_PP_NODE_154(p) BOOST_PP_IIF(p##(154), BOOST_PP_NODE_153, BOOST_PP_NODE_155) +# define BOOST_PP_NODE_153(p) BOOST_PP_IIF(p##(153), 153, 154) +# define BOOST_PP_NODE_155(p) BOOST_PP_IIF(p##(155), 155, 156) +# define BOOST_PP_NODE_158(p) BOOST_PP_IIF(p##(158), BOOST_PP_NODE_157, BOOST_PP_NODE_159) +# define BOOST_PP_NODE_157(p) BOOST_PP_IIF(p##(157), 157, 158) +# define BOOST_PP_NODE_159(p) BOOST_PP_IIF(p##(159), 159, 160) +# define BOOST_PP_NODE_176(p) BOOST_PP_IIF(p##(176), BOOST_PP_NODE_168, BOOST_PP_NODE_184) +# define BOOST_PP_NODE_168(p) BOOST_PP_IIF(p##(168), BOOST_PP_NODE_164, BOOST_PP_NODE_172) +# define BOOST_PP_NODE_164(p) BOOST_PP_IIF(p##(164), BOOST_PP_NODE_162, BOOST_PP_NODE_166) +# define BOOST_PP_NODE_162(p) BOOST_PP_IIF(p##(162), BOOST_PP_NODE_161, BOOST_PP_NODE_163) +# define BOOST_PP_NODE_161(p) BOOST_PP_IIF(p##(161), 161, 162) +# define BOOST_PP_NODE_163(p) BOOST_PP_IIF(p##(163), 163, 164) +# define BOOST_PP_NODE_166(p) BOOST_PP_IIF(p##(166), BOOST_PP_NODE_165, BOOST_PP_NODE_167) +# define BOOST_PP_NODE_165(p) BOOST_PP_IIF(p##(165), 165, 166) +# define BOOST_PP_NODE_167(p) BOOST_PP_IIF(p##(167), 167, 168) +# define BOOST_PP_NODE_172(p) BOOST_PP_IIF(p##(172), BOOST_PP_NODE_170, BOOST_PP_NODE_174) +# define BOOST_PP_NODE_170(p) BOOST_PP_IIF(p##(170), BOOST_PP_NODE_169, BOOST_PP_NODE_171) +# define BOOST_PP_NODE_169(p) BOOST_PP_IIF(p##(169), 169, 170) +# define BOOST_PP_NODE_171(p) BOOST_PP_IIF(p##(171), 171, 172) +# define BOOST_PP_NODE_174(p) BOOST_PP_IIF(p##(174), BOOST_PP_NODE_173, BOOST_PP_NODE_175) +# define BOOST_PP_NODE_173(p) BOOST_PP_IIF(p##(173), 173, 174) +# define BOOST_PP_NODE_175(p) BOOST_PP_IIF(p##(175), 175, 176) +# define BOOST_PP_NODE_184(p) BOOST_PP_IIF(p##(184), BOOST_PP_NODE_180, BOOST_PP_NODE_188) +# define BOOST_PP_NODE_180(p) BOOST_PP_IIF(p##(180), BOOST_PP_NODE_178, BOOST_PP_NODE_182) +# define BOOST_PP_NODE_178(p) BOOST_PP_IIF(p##(178), BOOST_PP_NODE_177, BOOST_PP_NODE_179) +# define BOOST_PP_NODE_177(p) BOOST_PP_IIF(p##(177), 177, 178) +# define BOOST_PP_NODE_179(p) BOOST_PP_IIF(p##(179), 179, 180) +# define BOOST_PP_NODE_182(p) BOOST_PP_IIF(p##(182), BOOST_PP_NODE_181, BOOST_PP_NODE_183) +# define BOOST_PP_NODE_181(p) BOOST_PP_IIF(p##(181), 181, 182) +# define BOOST_PP_NODE_183(p) BOOST_PP_IIF(p##(183), 183, 184) +# define BOOST_PP_NODE_188(p) BOOST_PP_IIF(p##(188), BOOST_PP_NODE_186, BOOST_PP_NODE_190) +# define BOOST_PP_NODE_186(p) BOOST_PP_IIF(p##(186), BOOST_PP_NODE_185, BOOST_PP_NODE_187) +# define BOOST_PP_NODE_185(p) BOOST_PP_IIF(p##(185), 185, 186) +# define BOOST_PP_NODE_187(p) BOOST_PP_IIF(p##(187), 187, 188) +# define BOOST_PP_NODE_190(p) BOOST_PP_IIF(p##(190), BOOST_PP_NODE_189, BOOST_PP_NODE_191) +# define BOOST_PP_NODE_189(p) BOOST_PP_IIF(p##(189), 189, 190) +# define BOOST_PP_NODE_191(p) BOOST_PP_IIF(p##(191), 191, 192) +# define BOOST_PP_NODE_224(p) BOOST_PP_IIF(p##(224), BOOST_PP_NODE_208, BOOST_PP_NODE_240) +# define BOOST_PP_NODE_208(p) BOOST_PP_IIF(p##(208), BOOST_PP_NODE_200, BOOST_PP_NODE_216) +# define BOOST_PP_NODE_200(p) BOOST_PP_IIF(p##(200), BOOST_PP_NODE_196, BOOST_PP_NODE_204) +# define BOOST_PP_NODE_196(p) BOOST_PP_IIF(p##(196), BOOST_PP_NODE_194, BOOST_PP_NODE_198) +# define BOOST_PP_NODE_194(p) BOOST_PP_IIF(p##(194), BOOST_PP_NODE_193, BOOST_PP_NODE_195) +# define BOOST_PP_NODE_193(p) BOOST_PP_IIF(p##(193), 193, 194) +# define BOOST_PP_NODE_195(p) BOOST_PP_IIF(p##(195), 195, 196) +# define BOOST_PP_NODE_198(p) BOOST_PP_IIF(p##(198), BOOST_PP_NODE_197, BOOST_PP_NODE_199) +# define BOOST_PP_NODE_197(p) BOOST_PP_IIF(p##(197), 197, 198) +# define BOOST_PP_NODE_199(p) BOOST_PP_IIF(p##(199), 199, 200) +# define BOOST_PP_NODE_204(p) BOOST_PP_IIF(p##(204), BOOST_PP_NODE_202, BOOST_PP_NODE_206) +# define BOOST_PP_NODE_202(p) BOOST_PP_IIF(p##(202), BOOST_PP_NODE_201, BOOST_PP_NODE_203) +# define BOOST_PP_NODE_201(p) BOOST_PP_IIF(p##(201), 201, 202) +# define BOOST_PP_NODE_203(p) BOOST_PP_IIF(p##(203), 203, 204) +# define BOOST_PP_NODE_206(p) BOOST_PP_IIF(p##(206), BOOST_PP_NODE_205, BOOST_PP_NODE_207) +# define BOOST_PP_NODE_205(p) BOOST_PP_IIF(p##(205), 205, 206) +# define BOOST_PP_NODE_207(p) BOOST_PP_IIF(p##(207), 207, 208) +# define BOOST_PP_NODE_216(p) BOOST_PP_IIF(p##(216), BOOST_PP_NODE_212, BOOST_PP_NODE_220) +# define BOOST_PP_NODE_212(p) BOOST_PP_IIF(p##(212), BOOST_PP_NODE_210, BOOST_PP_NODE_214) +# define BOOST_PP_NODE_210(p) BOOST_PP_IIF(p##(210), BOOST_PP_NODE_209, BOOST_PP_NODE_211) +# define BOOST_PP_NODE_209(p) BOOST_PP_IIF(p##(209), 209, 210) +# define BOOST_PP_NODE_211(p) BOOST_PP_IIF(p##(211), 211, 212) +# define BOOST_PP_NODE_214(p) BOOST_PP_IIF(p##(214), BOOST_PP_NODE_213, BOOST_PP_NODE_215) +# define BOOST_PP_NODE_213(p) BOOST_PP_IIF(p##(213), 213, 214) +# define BOOST_PP_NODE_215(p) BOOST_PP_IIF(p##(215), 215, 216) +# define BOOST_PP_NODE_220(p) BOOST_PP_IIF(p##(220), BOOST_PP_NODE_218, BOOST_PP_NODE_222) +# define BOOST_PP_NODE_218(p) BOOST_PP_IIF(p##(218), BOOST_PP_NODE_217, BOOST_PP_NODE_219) +# define BOOST_PP_NODE_217(p) BOOST_PP_IIF(p##(217), 217, 218) +# define BOOST_PP_NODE_219(p) BOOST_PP_IIF(p##(219), 219, 220) +# define BOOST_PP_NODE_222(p) BOOST_PP_IIF(p##(222), BOOST_PP_NODE_221, BOOST_PP_NODE_223) +# define BOOST_PP_NODE_221(p) BOOST_PP_IIF(p##(221), 221, 222) +# define BOOST_PP_NODE_223(p) BOOST_PP_IIF(p##(223), 223, 224) +# define BOOST_PP_NODE_240(p) BOOST_PP_IIF(p##(240), BOOST_PP_NODE_232, BOOST_PP_NODE_248) +# define BOOST_PP_NODE_232(p) BOOST_PP_IIF(p##(232), BOOST_PP_NODE_228, BOOST_PP_NODE_236) +# define BOOST_PP_NODE_228(p) BOOST_PP_IIF(p##(228), BOOST_PP_NODE_226, BOOST_PP_NODE_230) +# define BOOST_PP_NODE_226(p) BOOST_PP_IIF(p##(226), BOOST_PP_NODE_225, BOOST_PP_NODE_227) +# define BOOST_PP_NODE_225(p) BOOST_PP_IIF(p##(225), 225, 226) +# define BOOST_PP_NODE_227(p) BOOST_PP_IIF(p##(227), 227, 228) +# define BOOST_PP_NODE_230(p) BOOST_PP_IIF(p##(230), BOOST_PP_NODE_229, BOOST_PP_NODE_231) +# define BOOST_PP_NODE_229(p) BOOST_PP_IIF(p##(229), 229, 230) +# define BOOST_PP_NODE_231(p) BOOST_PP_IIF(p##(231), 231, 232) +# define BOOST_PP_NODE_236(p) BOOST_PP_IIF(p##(236), BOOST_PP_NODE_234, BOOST_PP_NODE_238) +# define BOOST_PP_NODE_234(p) BOOST_PP_IIF(p##(234), BOOST_PP_NODE_233, BOOST_PP_NODE_235) +# define BOOST_PP_NODE_233(p) BOOST_PP_IIF(p##(233), 233, 234) +# define BOOST_PP_NODE_235(p) BOOST_PP_IIF(p##(235), 235, 236) +# define BOOST_PP_NODE_238(p) BOOST_PP_IIF(p##(238), BOOST_PP_NODE_237, BOOST_PP_NODE_239) +# define BOOST_PP_NODE_237(p) BOOST_PP_IIF(p##(237), 237, 238) +# define BOOST_PP_NODE_239(p) BOOST_PP_IIF(p##(239), 239, 240) +# define BOOST_PP_NODE_248(p) BOOST_PP_IIF(p##(248), BOOST_PP_NODE_244, BOOST_PP_NODE_252) +# define BOOST_PP_NODE_244(p) BOOST_PP_IIF(p##(244), BOOST_PP_NODE_242, BOOST_PP_NODE_246) +# define BOOST_PP_NODE_242(p) BOOST_PP_IIF(p##(242), BOOST_PP_NODE_241, BOOST_PP_NODE_243) +# define BOOST_PP_NODE_241(p) BOOST_PP_IIF(p##(241), 241, 242) +# define BOOST_PP_NODE_243(p) BOOST_PP_IIF(p##(243), 243, 244) +# define BOOST_PP_NODE_246(p) BOOST_PP_IIF(p##(246), BOOST_PP_NODE_245, BOOST_PP_NODE_247) +# define BOOST_PP_NODE_245(p) BOOST_PP_IIF(p##(245), 245, 246) +# define BOOST_PP_NODE_247(p) BOOST_PP_IIF(p##(247), 247, 248) +# define BOOST_PP_NODE_252(p) BOOST_PP_IIF(p##(252), BOOST_PP_NODE_250, BOOST_PP_NODE_254) +# define BOOST_PP_NODE_250(p) BOOST_PP_IIF(p##(250), BOOST_PP_NODE_249, BOOST_PP_NODE_251) +# define BOOST_PP_NODE_249(p) BOOST_PP_IIF(p##(249), 249, 250) +# define BOOST_PP_NODE_251(p) BOOST_PP_IIF(p##(251), 251, 252) +# define BOOST_PP_NODE_254(p) BOOST_PP_IIF(p##(254), BOOST_PP_NODE_253, BOOST_PP_NODE_255) +# define BOOST_PP_NODE_253(p) BOOST_PP_IIF(p##(253), 253, 254) +# define BOOST_PP_NODE_255(p) BOOST_PP_IIF(p##(255), 255, 256) +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/detail/is_binary.hpp b/ThirdParty/boost-Subset/boost/preprocessor/detail/is_binary.hpp new file mode 100644 index 0000000000..3428833d64 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/detail/is_binary.hpp @@ -0,0 +1,30 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_DETAIL_IS_BINARY_HPP +# define BOOST_PREPROCESSOR_DETAIL_IS_BINARY_HPP +# +# include +# include +# +# /* BOOST_PP_IS_BINARY */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_IS_BINARY(x) BOOST_PP_CHECK(x, BOOST_PP_IS_BINARY_CHECK) +# else +# define BOOST_PP_IS_BINARY(x) BOOST_PP_IS_BINARY_I(x) +# define BOOST_PP_IS_BINARY_I(x) BOOST_PP_CHECK(x, BOOST_PP_IS_BINARY_CHECK) +# endif +# +# define BOOST_PP_IS_BINARY_CHECK(a, b) 1 +# define BOOST_PP_CHECK_RESULT_BOOST_PP_IS_BINARY_CHECK 0, BOOST_PP_NIL +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/detail/is_unary.hpp b/ThirdParty/boost-Subset/boost/preprocessor/detail/is_unary.hpp new file mode 100644 index 0000000000..e73cdfb76a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/detail/is_unary.hpp @@ -0,0 +1,30 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_DETAIL_IS_UNARY_HPP +# define BOOST_PREPROCESSOR_DETAIL_IS_UNARY_HPP +# +# include +# include +# +# /* BOOST_PP_IS_UNARY */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_IS_UNARY(x) BOOST_PP_CHECK(x, BOOST_PP_IS_UNARY_CHECK) +# else +# define BOOST_PP_IS_UNARY(x) BOOST_PP_IS_UNARY_I(x) +# define BOOST_PP_IS_UNARY_I(x) BOOST_PP_CHECK(x, BOOST_PP_IS_UNARY_CHECK) +# endif +# +# define BOOST_PP_IS_UNARY_CHECK(a) 1 +# define BOOST_PP_CHECK_RESULT_BOOST_PP_IS_UNARY_CHECK 0, BOOST_PP_NIL +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/detail/split.hpp b/ThirdParty/boost-Subset/boost/preprocessor/detail/split.hpp new file mode 100644 index 0000000000..f28a72375d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/detail/split.hpp @@ -0,0 +1,35 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# ifndef BOOST_PREPROCESSOR_DETAIL_SPLIT_HPP +# define BOOST_PREPROCESSOR_DETAIL_SPLIT_HPP +# +# include +# +# /* BOOST_PP_SPLIT */ +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_SPLIT(n, im) BOOST_PP_SPLIT_I((n, im)) +# define BOOST_PP_SPLIT_I(par) BOOST_PP_SPLIT_II ## par +# define BOOST_PP_SPLIT_II(n, a, b) BOOST_PP_SPLIT_ ## n(a, b) +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_SPLIT(n, im) BOOST_PP_SPLIT_I(n((im))) +# define BOOST_PP_SPLIT_I(n) BOOST_PP_SPLIT_ID(BOOST_PP_SPLIT_II_ ## n) +# define BOOST_PP_SPLIT_II_0(s) BOOST_PP_SPLIT_ID(BOOST_PP_SPLIT_0 s) +# define BOOST_PP_SPLIT_II_1(s) BOOST_PP_SPLIT_ID(BOOST_PP_SPLIT_1 s) +# define BOOST_PP_SPLIT_ID(id) id +# else +# define BOOST_PP_SPLIT(n, im) BOOST_PP_SPLIT_I(n)(im) +# define BOOST_PP_SPLIT_I(n) BOOST_PP_SPLIT_ ## n +# endif +# +# define BOOST_PP_SPLIT_0(a, b) a +# define BOOST_PP_SPLIT_1(a, b) b +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/empty.hpp b/ThirdParty/boost-Subset/boost/preprocessor/empty.hpp new file mode 100644 index 0000000000..116ef744e0 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/empty.hpp @@ -0,0 +1,17 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_EMPTY_HPP +# define BOOST_PREPROCESSOR_EMPTY_HPP +# +# include +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/enum.hpp b/ThirdParty/boost-Subset/boost/preprocessor/enum.hpp new file mode 100644 index 0000000000..ae05bb0c18 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/enum.hpp @@ -0,0 +1,17 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ENUM_HPP +# define BOOST_PREPROCESSOR_ENUM_HPP +# +# include +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/enum_params.hpp b/ThirdParty/boost-Subset/boost/preprocessor/enum_params.hpp new file mode 100644 index 0000000000..414f8aa6a2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/enum_params.hpp @@ -0,0 +1,17 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ENUM_PARAMS_HPP +# define BOOST_PREPROCESSOR_ENUM_PARAMS_HPP +# +# include +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/enum_params_with_a_default.hpp b/ThirdParty/boost-Subset/boost/preprocessor/enum_params_with_a_default.hpp new file mode 100644 index 0000000000..fd1ad4ccaa --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/enum_params_with_a_default.hpp @@ -0,0 +1,17 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ENUM_PARAMS_WITH_A_DEFAULT_HPP +# define BOOST_PREPROCESSOR_ENUM_PARAMS_WITH_A_DEFAULT_HPP +# +# include +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/enum_shifted_params.hpp b/ThirdParty/boost-Subset/boost/preprocessor/enum_shifted_params.hpp new file mode 100644 index 0000000000..462c6424eb --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/enum_shifted_params.hpp @@ -0,0 +1,17 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ENUM_SHIFTED_PARAMS_HPP +# define BOOST_PREPROCESSOR_ENUM_SHIFTED_PARAMS_HPP +# +# include +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/expr_if.hpp b/ThirdParty/boost-Subset/boost/preprocessor/expr_if.hpp new file mode 100644 index 0000000000..f93e29bc61 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/expr_if.hpp @@ -0,0 +1,17 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_EXPR_IF_HPP +# define BOOST_PREPROCESSOR_EXPR_IF_HPP +# +# include +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/facilities/detail/is_empty.hpp b/ThirdParty/boost-Subset/boost/preprocessor/facilities/detail/is_empty.hpp new file mode 100644 index 0000000000..e0449701e8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/facilities/detail/is_empty.hpp @@ -0,0 +1,55 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Edward Diener 2014. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +#ifndef BOOST_PREPROCESSOR_DETAIL_IS_EMPTY_HPP +#define BOOST_PREPROCESSOR_DETAIL_IS_EMPTY_HPP + +#include + +#if BOOST_PP_VARIADICS_MSVC + +# pragma warning(once:4002) + +#define BOOST_PP_DETAIL_IS_EMPTY_IIF_0(t, b) b +#define BOOST_PP_DETAIL_IS_EMPTY_IIF_1(t, b) t + +#else + +#define BOOST_PP_DETAIL_IS_EMPTY_IIF_0(t, ...) __VA_ARGS__ +#define BOOST_PP_DETAIL_IS_EMPTY_IIF_1(t, ...) t + +#endif + +#if BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400 + +#define BOOST_PP_DETAIL_IS_EMPTY_PROCESS(param) \ + BOOST_PP_IS_BEGIN_PARENS \ + ( \ + BOOST_PP_DETAIL_IS_EMPTY_NON_FUNCTION_C param () \ + ) \ +/**/ + +#else + +#define BOOST_PP_DETAIL_IS_EMPTY_PROCESS(...) \ + BOOST_PP_IS_BEGIN_PARENS \ + ( \ + BOOST_PP_DETAIL_IS_EMPTY_NON_FUNCTION_C __VA_ARGS__ () \ + ) \ +/**/ + +#endif + +#define BOOST_PP_DETAIL_IS_EMPTY_PRIMITIVE_CAT(a, b) a ## b +#define BOOST_PP_DETAIL_IS_EMPTY_IIF(bit) BOOST_PP_DETAIL_IS_EMPTY_PRIMITIVE_CAT(BOOST_PP_DETAIL_IS_EMPTY_IIF_,bit) +#define BOOST_PP_DETAIL_IS_EMPTY_NON_FUNCTION_C(...) () + +#endif /* BOOST_PREPROCESSOR_DETAIL_IS_EMPTY_HPP */ diff --git a/ThirdParty/boost-Subset/boost/preprocessor/facilities/empty.hpp b/ThirdParty/boost-Subset/boost/preprocessor/facilities/empty.hpp new file mode 100644 index 0000000000..6f215dc511 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/facilities/empty.hpp @@ -0,0 +1,23 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_FACILITIES_EMPTY_HPP +# define BOOST_PREPROCESSOR_FACILITIES_EMPTY_HPP +# +# include +# +# /* BOOST_PP_EMPTY */ +# +# define BOOST_PP_EMPTY() +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/facilities/expand.hpp b/ThirdParty/boost-Subset/boost/preprocessor/facilities/expand.hpp new file mode 100644 index 0000000000..c8661a1c22 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/facilities/expand.hpp @@ -0,0 +1,28 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_FACILITIES_EXPAND_HPP +# define BOOST_PREPROCESSOR_FACILITIES_EXPAND_HPP +# +# include +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() +# define BOOST_PP_EXPAND(x) BOOST_PP_EXPAND_I(x) +# else +# define BOOST_PP_EXPAND(x) BOOST_PP_EXPAND_OO((x)) +# define BOOST_PP_EXPAND_OO(par) BOOST_PP_EXPAND_I ## par +# endif +# +# define BOOST_PP_EXPAND_I(x) x +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/facilities/identity.hpp b/ThirdParty/boost-Subset/boost/preprocessor/facilities/identity.hpp new file mode 100644 index 0000000000..13ec4cab88 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/facilities/identity.hpp @@ -0,0 +1,23 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_FACILITIES_IDENTITY_HPP +# define BOOST_PREPROCESSOR_FACILITIES_IDENTITY_HPP +# +# include +# +# /* BOOST_PP_IDENTITY */ +# +# define BOOST_PP_IDENTITY(item) item BOOST_PP_EMPTY +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/facilities/intercept.hpp b/ThirdParty/boost-Subset/boost/preprocessor/facilities/intercept.hpp new file mode 100644 index 0000000000..41dcc6a980 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/facilities/intercept.hpp @@ -0,0 +1,277 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_FACILITIES_INTERCEPT_HPP +# define BOOST_PREPROCESSOR_FACILITIES_INTERCEPT_HPP +# +# /* BOOST_PP_INTERCEPT */ +# +# define BOOST_PP_INTERCEPT BOOST_PP_INTERCEPT_ +# +# define BOOST_PP_INTERCEPT_0 +# define BOOST_PP_INTERCEPT_1 +# define BOOST_PP_INTERCEPT_2 +# define BOOST_PP_INTERCEPT_3 +# define BOOST_PP_INTERCEPT_4 +# define BOOST_PP_INTERCEPT_5 +# define BOOST_PP_INTERCEPT_6 +# define BOOST_PP_INTERCEPT_7 +# define BOOST_PP_INTERCEPT_8 +# define BOOST_PP_INTERCEPT_9 +# define BOOST_PP_INTERCEPT_10 +# define BOOST_PP_INTERCEPT_11 +# define BOOST_PP_INTERCEPT_12 +# define BOOST_PP_INTERCEPT_13 +# define BOOST_PP_INTERCEPT_14 +# define BOOST_PP_INTERCEPT_15 +# define BOOST_PP_INTERCEPT_16 +# define BOOST_PP_INTERCEPT_17 +# define BOOST_PP_INTERCEPT_18 +# define BOOST_PP_INTERCEPT_19 +# define BOOST_PP_INTERCEPT_20 +# define BOOST_PP_INTERCEPT_21 +# define BOOST_PP_INTERCEPT_22 +# define BOOST_PP_INTERCEPT_23 +# define BOOST_PP_INTERCEPT_24 +# define BOOST_PP_INTERCEPT_25 +# define BOOST_PP_INTERCEPT_26 +# define BOOST_PP_INTERCEPT_27 +# define BOOST_PP_INTERCEPT_28 +# define BOOST_PP_INTERCEPT_29 +# define BOOST_PP_INTERCEPT_30 +# define BOOST_PP_INTERCEPT_31 +# define BOOST_PP_INTERCEPT_32 +# define BOOST_PP_INTERCEPT_33 +# define BOOST_PP_INTERCEPT_34 +# define BOOST_PP_INTERCEPT_35 +# define BOOST_PP_INTERCEPT_36 +# define BOOST_PP_INTERCEPT_37 +# define BOOST_PP_INTERCEPT_38 +# define BOOST_PP_INTERCEPT_39 +# define BOOST_PP_INTERCEPT_40 +# define BOOST_PP_INTERCEPT_41 +# define BOOST_PP_INTERCEPT_42 +# define BOOST_PP_INTERCEPT_43 +# define BOOST_PP_INTERCEPT_44 +# define BOOST_PP_INTERCEPT_45 +# define BOOST_PP_INTERCEPT_46 +# define BOOST_PP_INTERCEPT_47 +# define BOOST_PP_INTERCEPT_48 +# define BOOST_PP_INTERCEPT_49 +# define BOOST_PP_INTERCEPT_50 +# define BOOST_PP_INTERCEPT_51 +# define BOOST_PP_INTERCEPT_52 +# define BOOST_PP_INTERCEPT_53 +# define BOOST_PP_INTERCEPT_54 +# define BOOST_PP_INTERCEPT_55 +# define BOOST_PP_INTERCEPT_56 +# define BOOST_PP_INTERCEPT_57 +# define BOOST_PP_INTERCEPT_58 +# define BOOST_PP_INTERCEPT_59 +# define BOOST_PP_INTERCEPT_60 +# define BOOST_PP_INTERCEPT_61 +# define BOOST_PP_INTERCEPT_62 +# define BOOST_PP_INTERCEPT_63 +# define BOOST_PP_INTERCEPT_64 +# define BOOST_PP_INTERCEPT_65 +# define BOOST_PP_INTERCEPT_66 +# define BOOST_PP_INTERCEPT_67 +# define BOOST_PP_INTERCEPT_68 +# define BOOST_PP_INTERCEPT_69 +# define BOOST_PP_INTERCEPT_70 +# define BOOST_PP_INTERCEPT_71 +# define BOOST_PP_INTERCEPT_72 +# define BOOST_PP_INTERCEPT_73 +# define BOOST_PP_INTERCEPT_74 +# define BOOST_PP_INTERCEPT_75 +# define BOOST_PP_INTERCEPT_76 +# define BOOST_PP_INTERCEPT_77 +# define BOOST_PP_INTERCEPT_78 +# define BOOST_PP_INTERCEPT_79 +# define BOOST_PP_INTERCEPT_80 +# define BOOST_PP_INTERCEPT_81 +# define BOOST_PP_INTERCEPT_82 +# define BOOST_PP_INTERCEPT_83 +# define BOOST_PP_INTERCEPT_84 +# define BOOST_PP_INTERCEPT_85 +# define BOOST_PP_INTERCEPT_86 +# define BOOST_PP_INTERCEPT_87 +# define BOOST_PP_INTERCEPT_88 +# define BOOST_PP_INTERCEPT_89 +# define BOOST_PP_INTERCEPT_90 +# define BOOST_PP_INTERCEPT_91 +# define BOOST_PP_INTERCEPT_92 +# define BOOST_PP_INTERCEPT_93 +# define BOOST_PP_INTERCEPT_94 +# define BOOST_PP_INTERCEPT_95 +# define BOOST_PP_INTERCEPT_96 +# define BOOST_PP_INTERCEPT_97 +# define BOOST_PP_INTERCEPT_98 +# define BOOST_PP_INTERCEPT_99 +# define BOOST_PP_INTERCEPT_100 +# define BOOST_PP_INTERCEPT_101 +# define BOOST_PP_INTERCEPT_102 +# define BOOST_PP_INTERCEPT_103 +# define BOOST_PP_INTERCEPT_104 +# define BOOST_PP_INTERCEPT_105 +# define BOOST_PP_INTERCEPT_106 +# define BOOST_PP_INTERCEPT_107 +# define BOOST_PP_INTERCEPT_108 +# define BOOST_PP_INTERCEPT_109 +# define BOOST_PP_INTERCEPT_110 +# define BOOST_PP_INTERCEPT_111 +# define BOOST_PP_INTERCEPT_112 +# define BOOST_PP_INTERCEPT_113 +# define BOOST_PP_INTERCEPT_114 +# define BOOST_PP_INTERCEPT_115 +# define BOOST_PP_INTERCEPT_116 +# define BOOST_PP_INTERCEPT_117 +# define BOOST_PP_INTERCEPT_118 +# define BOOST_PP_INTERCEPT_119 +# define BOOST_PP_INTERCEPT_120 +# define BOOST_PP_INTERCEPT_121 +# define BOOST_PP_INTERCEPT_122 +# define BOOST_PP_INTERCEPT_123 +# define BOOST_PP_INTERCEPT_124 +# define BOOST_PP_INTERCEPT_125 +# define BOOST_PP_INTERCEPT_126 +# define BOOST_PP_INTERCEPT_127 +# define BOOST_PP_INTERCEPT_128 +# define BOOST_PP_INTERCEPT_129 +# define BOOST_PP_INTERCEPT_130 +# define BOOST_PP_INTERCEPT_131 +# define BOOST_PP_INTERCEPT_132 +# define BOOST_PP_INTERCEPT_133 +# define BOOST_PP_INTERCEPT_134 +# define BOOST_PP_INTERCEPT_135 +# define BOOST_PP_INTERCEPT_136 +# define BOOST_PP_INTERCEPT_137 +# define BOOST_PP_INTERCEPT_138 +# define BOOST_PP_INTERCEPT_139 +# define BOOST_PP_INTERCEPT_140 +# define BOOST_PP_INTERCEPT_141 +# define BOOST_PP_INTERCEPT_142 +# define BOOST_PP_INTERCEPT_143 +# define BOOST_PP_INTERCEPT_144 +# define BOOST_PP_INTERCEPT_145 +# define BOOST_PP_INTERCEPT_146 +# define BOOST_PP_INTERCEPT_147 +# define BOOST_PP_INTERCEPT_148 +# define BOOST_PP_INTERCEPT_149 +# define BOOST_PP_INTERCEPT_150 +# define BOOST_PP_INTERCEPT_151 +# define BOOST_PP_INTERCEPT_152 +# define BOOST_PP_INTERCEPT_153 +# define BOOST_PP_INTERCEPT_154 +# define BOOST_PP_INTERCEPT_155 +# define BOOST_PP_INTERCEPT_156 +# define BOOST_PP_INTERCEPT_157 +# define BOOST_PP_INTERCEPT_158 +# define BOOST_PP_INTERCEPT_159 +# define BOOST_PP_INTERCEPT_160 +# define BOOST_PP_INTERCEPT_161 +# define BOOST_PP_INTERCEPT_162 +# define BOOST_PP_INTERCEPT_163 +# define BOOST_PP_INTERCEPT_164 +# define BOOST_PP_INTERCEPT_165 +# define BOOST_PP_INTERCEPT_166 +# define BOOST_PP_INTERCEPT_167 +# define BOOST_PP_INTERCEPT_168 +# define BOOST_PP_INTERCEPT_169 +# define BOOST_PP_INTERCEPT_170 +# define BOOST_PP_INTERCEPT_171 +# define BOOST_PP_INTERCEPT_172 +# define BOOST_PP_INTERCEPT_173 +# define BOOST_PP_INTERCEPT_174 +# define BOOST_PP_INTERCEPT_175 +# define BOOST_PP_INTERCEPT_176 +# define BOOST_PP_INTERCEPT_177 +# define BOOST_PP_INTERCEPT_178 +# define BOOST_PP_INTERCEPT_179 +# define BOOST_PP_INTERCEPT_180 +# define BOOST_PP_INTERCEPT_181 +# define BOOST_PP_INTERCEPT_182 +# define BOOST_PP_INTERCEPT_183 +# define BOOST_PP_INTERCEPT_184 +# define BOOST_PP_INTERCEPT_185 +# define BOOST_PP_INTERCEPT_186 +# define BOOST_PP_INTERCEPT_187 +# define BOOST_PP_INTERCEPT_188 +# define BOOST_PP_INTERCEPT_189 +# define BOOST_PP_INTERCEPT_190 +# define BOOST_PP_INTERCEPT_191 +# define BOOST_PP_INTERCEPT_192 +# define BOOST_PP_INTERCEPT_193 +# define BOOST_PP_INTERCEPT_194 +# define BOOST_PP_INTERCEPT_195 +# define BOOST_PP_INTERCEPT_196 +# define BOOST_PP_INTERCEPT_197 +# define BOOST_PP_INTERCEPT_198 +# define BOOST_PP_INTERCEPT_199 +# define BOOST_PP_INTERCEPT_200 +# define BOOST_PP_INTERCEPT_201 +# define BOOST_PP_INTERCEPT_202 +# define BOOST_PP_INTERCEPT_203 +# define BOOST_PP_INTERCEPT_204 +# define BOOST_PP_INTERCEPT_205 +# define BOOST_PP_INTERCEPT_206 +# define BOOST_PP_INTERCEPT_207 +# define BOOST_PP_INTERCEPT_208 +# define BOOST_PP_INTERCEPT_209 +# define BOOST_PP_INTERCEPT_210 +# define BOOST_PP_INTERCEPT_211 +# define BOOST_PP_INTERCEPT_212 +# define BOOST_PP_INTERCEPT_213 +# define BOOST_PP_INTERCEPT_214 +# define BOOST_PP_INTERCEPT_215 +# define BOOST_PP_INTERCEPT_216 +# define BOOST_PP_INTERCEPT_217 +# define BOOST_PP_INTERCEPT_218 +# define BOOST_PP_INTERCEPT_219 +# define BOOST_PP_INTERCEPT_220 +# define BOOST_PP_INTERCEPT_221 +# define BOOST_PP_INTERCEPT_222 +# define BOOST_PP_INTERCEPT_223 +# define BOOST_PP_INTERCEPT_224 +# define BOOST_PP_INTERCEPT_225 +# define BOOST_PP_INTERCEPT_226 +# define BOOST_PP_INTERCEPT_227 +# define BOOST_PP_INTERCEPT_228 +# define BOOST_PP_INTERCEPT_229 +# define BOOST_PP_INTERCEPT_230 +# define BOOST_PP_INTERCEPT_231 +# define BOOST_PP_INTERCEPT_232 +# define BOOST_PP_INTERCEPT_233 +# define BOOST_PP_INTERCEPT_234 +# define BOOST_PP_INTERCEPT_235 +# define BOOST_PP_INTERCEPT_236 +# define BOOST_PP_INTERCEPT_237 +# define BOOST_PP_INTERCEPT_238 +# define BOOST_PP_INTERCEPT_239 +# define BOOST_PP_INTERCEPT_240 +# define BOOST_PP_INTERCEPT_241 +# define BOOST_PP_INTERCEPT_242 +# define BOOST_PP_INTERCEPT_243 +# define BOOST_PP_INTERCEPT_244 +# define BOOST_PP_INTERCEPT_245 +# define BOOST_PP_INTERCEPT_246 +# define BOOST_PP_INTERCEPT_247 +# define BOOST_PP_INTERCEPT_248 +# define BOOST_PP_INTERCEPT_249 +# define BOOST_PP_INTERCEPT_250 +# define BOOST_PP_INTERCEPT_251 +# define BOOST_PP_INTERCEPT_252 +# define BOOST_PP_INTERCEPT_253 +# define BOOST_PP_INTERCEPT_254 +# define BOOST_PP_INTERCEPT_255 +# define BOOST_PP_INTERCEPT_256 +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/facilities/is_1.hpp b/ThirdParty/boost-Subset/boost/preprocessor/facilities/is_1.hpp new file mode 100644 index 0000000000..f286dcdd19 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/facilities/is_1.hpp @@ -0,0 +1,23 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2003. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_FACILITIES_IS_1_HPP +# define BOOST_PREPROCESSOR_FACILITIES_IS_1_HPP +# +# include +# include +# +# /* BOOST_PP_IS_1 */ +# +# define BOOST_PP_IS_1(x) BOOST_PP_IS_EMPTY(BOOST_PP_CAT(BOOST_PP_IS_1_HELPER_, x)) +# define BOOST_PP_IS_1_HELPER_1 +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/facilities/is_empty.hpp b/ThirdParty/boost-Subset/boost/preprocessor/facilities/is_empty.hpp new file mode 100644 index 0000000000..46aadd3529 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/facilities/is_empty.hpp @@ -0,0 +1,56 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2003. +# * (C) Copyright Edward Diener 2014. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_HPP +# define BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_HPP +# +# include +# +# if BOOST_PP_VARIADICS +# +# include +# +# else +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# include +# include +# else +# include +# include +# endif +# +# /* BOOST_PP_IS_EMPTY */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_IS_EMPTY(x) BOOST_PP_IS_EMPTY_I(x BOOST_PP_IS_EMPTY_HELPER) +# define BOOST_PP_IS_EMPTY_I(contents) BOOST_PP_TUPLE_ELEM(2, 1, (BOOST_PP_IS_EMPTY_DEF_ ## contents())) +# define BOOST_PP_IS_EMPTY_DEF_BOOST_PP_IS_EMPTY_HELPER 1, BOOST_PP_IDENTITY(1) +# define BOOST_PP_IS_EMPTY_HELPER() , 0 +# else +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_IS_EMPTY(x) BOOST_PP_IS_EMPTY_I(BOOST_PP_IS_EMPTY_HELPER x ()) +# define BOOST_PP_IS_EMPTY_I(test) BOOST_PP_IS_EMPTY_II(BOOST_PP_SPLIT(0, BOOST_PP_CAT(BOOST_PP_IS_EMPTY_DEF_, test))) +# define BOOST_PP_IS_EMPTY_II(id) id +# else +# define BOOST_PP_IS_EMPTY(x) BOOST_PP_IS_EMPTY_I((BOOST_PP_IS_EMPTY_HELPER x ())) +# define BOOST_PP_IS_EMPTY_I(par) BOOST_PP_IS_EMPTY_II ## par +# define BOOST_PP_IS_EMPTY_II(test) BOOST_PP_SPLIT(0, BOOST_PP_CAT(BOOST_PP_IS_EMPTY_DEF_, test)) +# endif +# define BOOST_PP_IS_EMPTY_HELPER() 1 +# define BOOST_PP_IS_EMPTY_DEF_1 1, BOOST_PP_NIL +# define BOOST_PP_IS_EMPTY_DEF_BOOST_PP_IS_EMPTY_HELPER 0, BOOST_PP_NIL +# endif +# +# endif /* BOOST_PP_VARIADICS */ +# +# endif /* BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_HPP */ diff --git a/ThirdParty/boost-Subset/boost/preprocessor/facilities/is_empty_variadic.hpp b/ThirdParty/boost-Subset/boost/preprocessor/facilities/is_empty_variadic.hpp new file mode 100644 index 0000000000..eee4062d79 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/facilities/is_empty_variadic.hpp @@ -0,0 +1,57 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Edward Diener 2014. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_VARIADIC_HPP +# define BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_VARIADIC_HPP +# +# include +# +# if BOOST_PP_VARIADICS +# +# include +# include +# +#if BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400 +# +#define BOOST_PP_IS_EMPTY(param) \ + BOOST_PP_DETAIL_IS_EMPTY_IIF \ + ( \ + BOOST_PP_IS_BEGIN_PARENS \ + ( \ + param \ + ) \ + ) \ + ( \ + BOOST_PP_IS_EMPTY_ZERO, \ + BOOST_PP_DETAIL_IS_EMPTY_PROCESS \ + ) \ + (param) \ +/**/ +#define BOOST_PP_IS_EMPTY_ZERO(param) 0 +# else +#define BOOST_PP_IS_EMPTY(...) \ + BOOST_PP_DETAIL_IS_EMPTY_IIF \ + ( \ + BOOST_PP_IS_BEGIN_PARENS \ + ( \ + __VA_ARGS__ \ + ) \ + ) \ + ( \ + BOOST_PP_IS_EMPTY_ZERO, \ + BOOST_PP_DETAIL_IS_EMPTY_PROCESS \ + ) \ + (__VA_ARGS__) \ +/**/ +#define BOOST_PP_IS_EMPTY_ZERO(...) 0 +# endif /* BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400 */ +# endif /* BOOST_PP_VARIADICS */ +# endif /* BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_VARIADIC_HPP */ diff --git a/ThirdParty/boost-Subset/boost/preprocessor/facilities/overload.hpp b/ThirdParty/boost-Subset/boost/preprocessor/facilities/overload.hpp new file mode 100644 index 0000000000..1576316d7f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/facilities/overload.hpp @@ -0,0 +1,25 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2011. * +# * (C) Copyright Edward Diener 2011. * +# * Distributed under the Boost Software License, Version 1.0. (See * +# * accompanying file LICENSE_1_0.txt or copy at * +# * http://www.boost.org/LICENSE_1_0.txt) * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_FACILITIES_OVERLOAD_HPP +# define BOOST_PREPROCESSOR_FACILITIES_OVERLOAD_HPP +# +# include +# include +# +# /* BOOST_PP_OVERLOAD */ +# +# if BOOST_PP_VARIADICS +# define BOOST_PP_OVERLOAD(prefix, ...) BOOST_PP_CAT(prefix, BOOST_PP_VARIADIC_SIZE(__VA_ARGS__)) +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/identity.hpp b/ThirdParty/boost-Subset/boost/preprocessor/identity.hpp new file mode 100644 index 0000000000..847dd13296 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/identity.hpp @@ -0,0 +1,17 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_IDENTITY_HPP +# define BOOST_PREPROCESSOR_IDENTITY_HPP +# +# include +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/if.hpp b/ThirdParty/boost-Subset/boost/preprocessor/if.hpp new file mode 100644 index 0000000000..f1783f717e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/if.hpp @@ -0,0 +1,17 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_IF_HPP +# define BOOST_PREPROCESSOR_IF_HPP +# +# include +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/inc.hpp b/ThirdParty/boost-Subset/boost/preprocessor/inc.hpp new file mode 100644 index 0000000000..b98d3a67c5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/inc.hpp @@ -0,0 +1,17 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_INC_HPP +# define BOOST_PREPROCESSOR_INC_HPP +# +# include +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iterate.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iterate.hpp new file mode 100644 index 0000000000..e720ec8a84 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iterate.hpp @@ -0,0 +1,17 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ITERATE_HPP +# define BOOST_PREPROCESSOR_ITERATE_HPP +# +# include +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/lower1.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/lower1.hpp new file mode 100644 index 0000000000..6694d0ba0b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/lower1.hpp @@ -0,0 +1,99 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_ITERATION_START_1 +# +# undef BOOST_PP_ITERATION_START_1_DIGIT_1 +# undef BOOST_PP_ITERATION_START_1_DIGIT_2 +# undef BOOST_PP_ITERATION_START_1_DIGIT_3 +# undef BOOST_PP_ITERATION_START_1_DIGIT_4 +# undef BOOST_PP_ITERATION_START_1_DIGIT_5 +# undef BOOST_PP_ITERATION_START_1_DIGIT_6 +# undef BOOST_PP_ITERATION_START_1_DIGIT_7 +# undef BOOST_PP_ITERATION_START_1_DIGIT_8 +# undef BOOST_PP_ITERATION_START_1_DIGIT_9 +# undef BOOST_PP_ITERATION_START_1_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_ITERATION_START_1_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_ITERATION_START_1_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_ITERATION_START_1_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_ITERATION_START_1_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_ITERATION_START_1_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_ITERATION_START_1_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_ITERATION_START_1_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_ITERATION_START_1_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_ITERATION_START_1_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_ITERATION_START_1_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_ITERATION_START_1_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_ITERATION_START_1_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_ITERATION_START_1_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_ITERATION_START_1_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_ITERATION_START_1_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_ITERATION_START_1_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_ITERATION_START_1_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_ITERATION_START_1_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_ITERATION_START_1_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_ITERATION_START_1_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_ITERATION_START_1_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_ITERATION_START_1_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_ITERATION_START_1_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_ITERATION_START_1_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_ITERATION_START_1_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_ITERATION_START_1_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_ITERATION_START_1_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_ITERATION_START_1_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_ITERATION_START_1_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_ITERATION_START_1_DIGIT_1 9 +# endif +# +# if BOOST_PP_ITERATION_START_1_DIGIT_3 +# define BOOST_PP_ITERATION_START_1 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_START_1_DIGIT_3, BOOST_PP_ITERATION_START_1_DIGIT_2, BOOST_PP_ITERATION_START_1_DIGIT_1) +# elif BOOST_PP_ITERATION_START_1_DIGIT_2 +# define BOOST_PP_ITERATION_START_1 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_START_1_DIGIT_2, BOOST_PP_ITERATION_START_1_DIGIT_1) +# else +# define BOOST_PP_ITERATION_START_1 BOOST_PP_ITERATION_START_1_DIGIT_1 +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/lower2.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/lower2.hpp new file mode 100644 index 0000000000..ece21fc810 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/lower2.hpp @@ -0,0 +1,99 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_ITERATION_START_2 +# +# undef BOOST_PP_ITERATION_START_2_DIGIT_1 +# undef BOOST_PP_ITERATION_START_2_DIGIT_2 +# undef BOOST_PP_ITERATION_START_2_DIGIT_3 +# undef BOOST_PP_ITERATION_START_2_DIGIT_4 +# undef BOOST_PP_ITERATION_START_2_DIGIT_5 +# undef BOOST_PP_ITERATION_START_2_DIGIT_6 +# undef BOOST_PP_ITERATION_START_2_DIGIT_7 +# undef BOOST_PP_ITERATION_START_2_DIGIT_8 +# undef BOOST_PP_ITERATION_START_2_DIGIT_9 +# undef BOOST_PP_ITERATION_START_2_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_ITERATION_START_2_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_ITERATION_START_2_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_ITERATION_START_2_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_ITERATION_START_2_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_ITERATION_START_2_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_ITERATION_START_2_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_ITERATION_START_2_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_ITERATION_START_2_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_ITERATION_START_2_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_ITERATION_START_2_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_ITERATION_START_2_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_ITERATION_START_2_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_ITERATION_START_2_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_ITERATION_START_2_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_ITERATION_START_2_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_ITERATION_START_2_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_ITERATION_START_2_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_ITERATION_START_2_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_ITERATION_START_2_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_ITERATION_START_2_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_ITERATION_START_2_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_ITERATION_START_2_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_ITERATION_START_2_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_ITERATION_START_2_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_ITERATION_START_2_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_ITERATION_START_2_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_ITERATION_START_2_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_ITERATION_START_2_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_ITERATION_START_2_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_ITERATION_START_2_DIGIT_1 9 +# endif +# +# if BOOST_PP_ITERATION_START_2_DIGIT_3 +# define BOOST_PP_ITERATION_START_2 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_START_2_DIGIT_3, BOOST_PP_ITERATION_START_2_DIGIT_2, BOOST_PP_ITERATION_START_2_DIGIT_1) +# elif BOOST_PP_ITERATION_START_2_DIGIT_2 +# define BOOST_PP_ITERATION_START_2 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_START_2_DIGIT_2, BOOST_PP_ITERATION_START_2_DIGIT_1) +# else +# define BOOST_PP_ITERATION_START_2 BOOST_PP_ITERATION_START_2_DIGIT_1 +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/lower3.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/lower3.hpp new file mode 100644 index 0000000000..8429eac7a1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/lower3.hpp @@ -0,0 +1,99 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_ITERATION_START_3 +# +# undef BOOST_PP_ITERATION_START_3_DIGIT_1 +# undef BOOST_PP_ITERATION_START_3_DIGIT_2 +# undef BOOST_PP_ITERATION_START_3_DIGIT_3 +# undef BOOST_PP_ITERATION_START_3_DIGIT_4 +# undef BOOST_PP_ITERATION_START_3_DIGIT_5 +# undef BOOST_PP_ITERATION_START_3_DIGIT_6 +# undef BOOST_PP_ITERATION_START_3_DIGIT_7 +# undef BOOST_PP_ITERATION_START_3_DIGIT_8 +# undef BOOST_PP_ITERATION_START_3_DIGIT_9 +# undef BOOST_PP_ITERATION_START_3_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_ITERATION_START_3_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_ITERATION_START_3_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_ITERATION_START_3_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_ITERATION_START_3_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_ITERATION_START_3_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_ITERATION_START_3_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_ITERATION_START_3_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_ITERATION_START_3_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_ITERATION_START_3_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_ITERATION_START_3_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_ITERATION_START_3_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_ITERATION_START_3_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_ITERATION_START_3_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_ITERATION_START_3_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_ITERATION_START_3_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_ITERATION_START_3_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_ITERATION_START_3_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_ITERATION_START_3_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_ITERATION_START_3_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_ITERATION_START_3_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_ITERATION_START_3_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_ITERATION_START_3_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_ITERATION_START_3_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_ITERATION_START_3_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_ITERATION_START_3_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_ITERATION_START_3_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_ITERATION_START_3_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_ITERATION_START_3_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_ITERATION_START_3_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_ITERATION_START_3_DIGIT_1 9 +# endif +# +# if BOOST_PP_ITERATION_START_3_DIGIT_3 +# define BOOST_PP_ITERATION_START_3 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_START_3_DIGIT_3, BOOST_PP_ITERATION_START_3_DIGIT_2, BOOST_PP_ITERATION_START_3_DIGIT_1) +# elif BOOST_PP_ITERATION_START_3_DIGIT_2 +# define BOOST_PP_ITERATION_START_3 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_START_3_DIGIT_2, BOOST_PP_ITERATION_START_3_DIGIT_1) +# else +# define BOOST_PP_ITERATION_START_3 BOOST_PP_ITERATION_START_3_DIGIT_1 +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/lower4.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/lower4.hpp new file mode 100644 index 0000000000..ba0832f284 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/lower4.hpp @@ -0,0 +1,99 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_ITERATION_START_4 +# +# undef BOOST_PP_ITERATION_START_4_DIGIT_1 +# undef BOOST_PP_ITERATION_START_4_DIGIT_2 +# undef BOOST_PP_ITERATION_START_4_DIGIT_3 +# undef BOOST_PP_ITERATION_START_4_DIGIT_4 +# undef BOOST_PP_ITERATION_START_4_DIGIT_5 +# undef BOOST_PP_ITERATION_START_4_DIGIT_6 +# undef BOOST_PP_ITERATION_START_4_DIGIT_7 +# undef BOOST_PP_ITERATION_START_4_DIGIT_8 +# undef BOOST_PP_ITERATION_START_4_DIGIT_9 +# undef BOOST_PP_ITERATION_START_4_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_ITERATION_START_4_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_ITERATION_START_4_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_ITERATION_START_4_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_ITERATION_START_4_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_ITERATION_START_4_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_ITERATION_START_4_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_ITERATION_START_4_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_ITERATION_START_4_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_ITERATION_START_4_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_ITERATION_START_4_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_ITERATION_START_4_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_ITERATION_START_4_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_ITERATION_START_4_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_ITERATION_START_4_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_ITERATION_START_4_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_ITERATION_START_4_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_ITERATION_START_4_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_ITERATION_START_4_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_ITERATION_START_4_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_ITERATION_START_4_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_ITERATION_START_4_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_ITERATION_START_4_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_ITERATION_START_4_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_ITERATION_START_4_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_ITERATION_START_4_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_ITERATION_START_4_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_ITERATION_START_4_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_ITERATION_START_4_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_ITERATION_START_4_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_ITERATION_START_4_DIGIT_1 9 +# endif +# +# if BOOST_PP_ITERATION_START_4_DIGIT_3 +# define BOOST_PP_ITERATION_START_4 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_START_4_DIGIT_3, BOOST_PP_ITERATION_START_4_DIGIT_2, BOOST_PP_ITERATION_START_4_DIGIT_1) +# elif BOOST_PP_ITERATION_START_4_DIGIT_2 +# define BOOST_PP_ITERATION_START_4 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_START_4_DIGIT_2, BOOST_PP_ITERATION_START_4_DIGIT_1) +# else +# define BOOST_PP_ITERATION_START_4 BOOST_PP_ITERATION_START_4_DIGIT_1 +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/lower5.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/lower5.hpp new file mode 100644 index 0000000000..f4888c7b57 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/lower5.hpp @@ -0,0 +1,99 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_ITERATION_START_5 +# +# undef BOOST_PP_ITERATION_START_5_DIGIT_1 +# undef BOOST_PP_ITERATION_START_5_DIGIT_2 +# undef BOOST_PP_ITERATION_START_5_DIGIT_3 +# undef BOOST_PP_ITERATION_START_5_DIGIT_4 +# undef BOOST_PP_ITERATION_START_5_DIGIT_5 +# undef BOOST_PP_ITERATION_START_5_DIGIT_6 +# undef BOOST_PP_ITERATION_START_5_DIGIT_7 +# undef BOOST_PP_ITERATION_START_5_DIGIT_8 +# undef BOOST_PP_ITERATION_START_5_DIGIT_9 +# undef BOOST_PP_ITERATION_START_5_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_ITERATION_START_5_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_ITERATION_START_5_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_ITERATION_START_5_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_ITERATION_START_5_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_ITERATION_START_5_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_ITERATION_START_5_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_ITERATION_START_5_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_ITERATION_START_5_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_ITERATION_START_5_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_ITERATION_START_5_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_ITERATION_START_5_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_ITERATION_START_5_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_ITERATION_START_5_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_ITERATION_START_5_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_ITERATION_START_5_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_ITERATION_START_5_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_ITERATION_START_5_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_ITERATION_START_5_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_ITERATION_START_5_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_ITERATION_START_5_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_ITERATION_START_5_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_ITERATION_START_5_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_ITERATION_START_5_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_ITERATION_START_5_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_ITERATION_START_5_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_ITERATION_START_5_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_ITERATION_START_5_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_ITERATION_START_5_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_ITERATION_START_5_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_ITERATION_START_5_DIGIT_1 9 +# endif +# +# if BOOST_PP_ITERATION_START_5_DIGIT_3 +# define BOOST_PP_ITERATION_START_5 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_START_5_DIGIT_3, BOOST_PP_ITERATION_START_5_DIGIT_2, BOOST_PP_ITERATION_START_5_DIGIT_1) +# elif BOOST_PP_ITERATION_START_5_DIGIT_2 +# define BOOST_PP_ITERATION_START_5 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_START_5_DIGIT_2, BOOST_PP_ITERATION_START_5_DIGIT_1) +# else +# define BOOST_PP_ITERATION_START_5 BOOST_PP_ITERATION_START_5_DIGIT_1 +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/upper1.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/upper1.hpp new file mode 100644 index 0000000000..50d0fcfa32 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/upper1.hpp @@ -0,0 +1,99 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_ITERATION_FINISH_1 +# +# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_1 +# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_2 +# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_3 +# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_4 +# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_5 +# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_6 +# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_7 +# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_8 +# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_9 +# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 9 +# endif +# +# if BOOST_PP_ITERATION_FINISH_1_DIGIT_3 +# define BOOST_PP_ITERATION_FINISH_1 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_FINISH_1_DIGIT_3, BOOST_PP_ITERATION_FINISH_1_DIGIT_2, BOOST_PP_ITERATION_FINISH_1_DIGIT_1) +# elif BOOST_PP_ITERATION_FINISH_1_DIGIT_2 +# define BOOST_PP_ITERATION_FINISH_1 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_FINISH_1_DIGIT_2, BOOST_PP_ITERATION_FINISH_1_DIGIT_1) +# else +# define BOOST_PP_ITERATION_FINISH_1 BOOST_PP_ITERATION_FINISH_1_DIGIT_1 +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/upper2.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/upper2.hpp new file mode 100644 index 0000000000..faef6f49e3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/upper2.hpp @@ -0,0 +1,99 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_ITERATION_FINISH_2 +# +# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_1 +# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_2 +# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_3 +# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_4 +# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_5 +# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_6 +# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_7 +# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_8 +# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_9 +# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 9 +# endif +# +# if BOOST_PP_ITERATION_FINISH_2_DIGIT_3 +# define BOOST_PP_ITERATION_FINISH_2 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_FINISH_2_DIGIT_3, BOOST_PP_ITERATION_FINISH_2_DIGIT_2, BOOST_PP_ITERATION_FINISH_2_DIGIT_1) +# elif BOOST_PP_ITERATION_FINISH_2_DIGIT_2 +# define BOOST_PP_ITERATION_FINISH_2 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_FINISH_2_DIGIT_2, BOOST_PP_ITERATION_FINISH_2_DIGIT_1) +# else +# define BOOST_PP_ITERATION_FINISH_2 BOOST_PP_ITERATION_FINISH_2_DIGIT_1 +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/upper3.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/upper3.hpp new file mode 100644 index 0000000000..38d9adec46 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/upper3.hpp @@ -0,0 +1,99 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_ITERATION_FINISH_3 +# +# undef BOOST_PP_ITERATION_FINISH_3_DIGIT_1 +# undef BOOST_PP_ITERATION_FINISH_3_DIGIT_2 +# undef BOOST_PP_ITERATION_FINISH_3_DIGIT_3 +# undef BOOST_PP_ITERATION_FINISH_3_DIGIT_4 +# undef BOOST_PP_ITERATION_FINISH_3_DIGIT_5 +# undef BOOST_PP_ITERATION_FINISH_3_DIGIT_6 +# undef BOOST_PP_ITERATION_FINISH_3_DIGIT_7 +# undef BOOST_PP_ITERATION_FINISH_3_DIGIT_8 +# undef BOOST_PP_ITERATION_FINISH_3_DIGIT_9 +# undef BOOST_PP_ITERATION_FINISH_3_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 9 +# endif +# +# if BOOST_PP_ITERATION_FINISH_3_DIGIT_3 +# define BOOST_PP_ITERATION_FINISH_3 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_FINISH_3_DIGIT_3, BOOST_PP_ITERATION_FINISH_3_DIGIT_2, BOOST_PP_ITERATION_FINISH_3_DIGIT_1) +# elif BOOST_PP_ITERATION_FINISH_3_DIGIT_2 +# define BOOST_PP_ITERATION_FINISH_3 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_FINISH_3_DIGIT_2, BOOST_PP_ITERATION_FINISH_3_DIGIT_1) +# else +# define BOOST_PP_ITERATION_FINISH_3 BOOST_PP_ITERATION_FINISH_3_DIGIT_1 +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/upper4.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/upper4.hpp new file mode 100644 index 0000000000..7f771c2ce7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/upper4.hpp @@ -0,0 +1,99 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_ITERATION_FINISH_4 +# +# undef BOOST_PP_ITERATION_FINISH_4_DIGIT_1 +# undef BOOST_PP_ITERATION_FINISH_4_DIGIT_2 +# undef BOOST_PP_ITERATION_FINISH_4_DIGIT_3 +# undef BOOST_PP_ITERATION_FINISH_4_DIGIT_4 +# undef BOOST_PP_ITERATION_FINISH_4_DIGIT_5 +# undef BOOST_PP_ITERATION_FINISH_4_DIGIT_6 +# undef BOOST_PP_ITERATION_FINISH_4_DIGIT_7 +# undef BOOST_PP_ITERATION_FINISH_4_DIGIT_8 +# undef BOOST_PP_ITERATION_FINISH_4_DIGIT_9 +# undef BOOST_PP_ITERATION_FINISH_4_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 9 +# endif +# +# if BOOST_PP_ITERATION_FINISH_4_DIGIT_3 +# define BOOST_PP_ITERATION_FINISH_4 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_FINISH_4_DIGIT_3, BOOST_PP_ITERATION_FINISH_4_DIGIT_2, BOOST_PP_ITERATION_FINISH_4_DIGIT_1) +# elif BOOST_PP_ITERATION_FINISH_4_DIGIT_2 +# define BOOST_PP_ITERATION_FINISH_4 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_FINISH_4_DIGIT_2, BOOST_PP_ITERATION_FINISH_4_DIGIT_1) +# else +# define BOOST_PP_ITERATION_FINISH_4 BOOST_PP_ITERATION_FINISH_4_DIGIT_1 +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/upper5.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/upper5.hpp new file mode 100644 index 0000000000..9f27d5884d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/bounds/upper5.hpp @@ -0,0 +1,99 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_ITERATION_FINISH_5 +# +# undef BOOST_PP_ITERATION_FINISH_5_DIGIT_1 +# undef BOOST_PP_ITERATION_FINISH_5_DIGIT_2 +# undef BOOST_PP_ITERATION_FINISH_5_DIGIT_3 +# undef BOOST_PP_ITERATION_FINISH_5_DIGIT_4 +# undef BOOST_PP_ITERATION_FINISH_5_DIGIT_5 +# undef BOOST_PP_ITERATION_FINISH_5_DIGIT_6 +# undef BOOST_PP_ITERATION_FINISH_5_DIGIT_7 +# undef BOOST_PP_ITERATION_FINISH_5_DIGIT_8 +# undef BOOST_PP_ITERATION_FINISH_5_DIGIT_9 +# undef BOOST_PP_ITERATION_FINISH_5_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 9 +# endif +# +# if BOOST_PP_ITERATION_FINISH_5_DIGIT_3 +# define BOOST_PP_ITERATION_FINISH_5 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_FINISH_5_DIGIT_3, BOOST_PP_ITERATION_FINISH_5_DIGIT_2, BOOST_PP_ITERATION_FINISH_5_DIGIT_1) +# elif BOOST_PP_ITERATION_FINISH_5_DIGIT_2 +# define BOOST_PP_ITERATION_FINISH_5 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_FINISH_5_DIGIT_2, BOOST_PP_ITERATION_FINISH_5_DIGIT_1) +# else +# define BOOST_PP_ITERATION_FINISH_5 BOOST_PP_ITERATION_FINISH_5_DIGIT_1 +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/finish.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/finish.hpp new file mode 100644 index 0000000000..0236944cac --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/finish.hpp @@ -0,0 +1,99 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_LOCAL_FE +# +# undef BOOST_PP_LOCAL_FE_DIGIT_1 +# undef BOOST_PP_LOCAL_FE_DIGIT_2 +# undef BOOST_PP_LOCAL_FE_DIGIT_3 +# undef BOOST_PP_LOCAL_FE_DIGIT_4 +# undef BOOST_PP_LOCAL_FE_DIGIT_5 +# undef BOOST_PP_LOCAL_FE_DIGIT_6 +# undef BOOST_PP_LOCAL_FE_DIGIT_7 +# undef BOOST_PP_LOCAL_FE_DIGIT_8 +# undef BOOST_PP_LOCAL_FE_DIGIT_9 +# undef BOOST_PP_LOCAL_FE_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_LOCAL_FE_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_LOCAL_FE_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_LOCAL_FE_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_LOCAL_FE_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_LOCAL_FE_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_LOCAL_FE_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_LOCAL_FE_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_LOCAL_FE_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_LOCAL_FE_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_LOCAL_FE_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_LOCAL_FE_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_LOCAL_FE_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_LOCAL_FE_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_LOCAL_FE_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_LOCAL_FE_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_LOCAL_FE_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_LOCAL_FE_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_LOCAL_FE_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_LOCAL_FE_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_LOCAL_FE_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_LOCAL_FE_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_LOCAL_FE_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_LOCAL_FE_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_LOCAL_FE_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_LOCAL_FE_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_LOCAL_FE_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_LOCAL_FE_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_LOCAL_FE_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_LOCAL_FE_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_LOCAL_FE_DIGIT_1 9 +# endif +# +# if BOOST_PP_LOCAL_FE_DIGIT_3 +# define BOOST_PP_LOCAL_FE() BOOST_PP_SLOT_CC_3(BOOST_PP_LOCAL_FE_DIGIT_3, BOOST_PP_LOCAL_FE_DIGIT_2, BOOST_PP_LOCAL_FE_DIGIT_1) +# elif BOOST_PP_LOCAL_FE_DIGIT_2 +# define BOOST_PP_LOCAL_FE() BOOST_PP_SLOT_CC_2(BOOST_PP_LOCAL_FE_DIGIT_2, BOOST_PP_LOCAL_FE_DIGIT_1) +# else +# define BOOST_PP_LOCAL_FE() BOOST_PP_LOCAL_FE_DIGIT_1 +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/forward1.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/forward1.hpp new file mode 100644 index 0000000000..3c6a45802f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/forward1.hpp @@ -0,0 +1,1342 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# if defined(BOOST_PP_ITERATION_LIMITS) +# if !defined(BOOST_PP_FILENAME_1) +# error BOOST_PP_ERROR: depth #1 filename is not defined +# endif +# define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_ITERATION_LIMITS) +# include +# define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_ITERATION_LIMITS) +# include +# define BOOST_PP_ITERATION_FLAGS_1() 0 +# undef BOOST_PP_ITERATION_LIMITS +# elif defined(BOOST_PP_ITERATION_PARAMS_1) +# define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ITERATION_PARAMS_1) +# include +# define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(1, BOOST_PP_ITERATION_PARAMS_1) +# include +# define BOOST_PP_FILENAME_1 BOOST_PP_ARRAY_ELEM(2, BOOST_PP_ITERATION_PARAMS_1) +# if BOOST_PP_ARRAY_SIZE(BOOST_PP_ITERATION_PARAMS_1) >= 4 +# define BOOST_PP_ITERATION_FLAGS_1() BOOST_PP_ARRAY_ELEM(3, BOOST_PP_ITERATION_PARAMS_1) +# else +# define BOOST_PP_ITERATION_FLAGS_1() 0 +# endif +# else +# error BOOST_PP_ERROR: depth #1 iteration boundaries or filename not defined +# endif +# +# undef BOOST_PP_ITERATION_DEPTH +# define BOOST_PP_ITERATION_DEPTH() 1 +# +# define BOOST_PP_IS_ITERATING 1 +# +# if (BOOST_PP_ITERATION_START_1) > (BOOST_PP_ITERATION_FINISH_1) +# include +# else +# if BOOST_PP_ITERATION_START_1 <= 0 && BOOST_PP_ITERATION_FINISH_1 >= 0 +# define BOOST_PP_ITERATION_1 0 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 1 && BOOST_PP_ITERATION_FINISH_1 >= 1 +# define BOOST_PP_ITERATION_1 1 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 2 && BOOST_PP_ITERATION_FINISH_1 >= 2 +# define BOOST_PP_ITERATION_1 2 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 3 && BOOST_PP_ITERATION_FINISH_1 >= 3 +# define BOOST_PP_ITERATION_1 3 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 4 && BOOST_PP_ITERATION_FINISH_1 >= 4 +# define BOOST_PP_ITERATION_1 4 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 5 && BOOST_PP_ITERATION_FINISH_1 >= 5 +# define BOOST_PP_ITERATION_1 5 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 6 && BOOST_PP_ITERATION_FINISH_1 >= 6 +# define BOOST_PP_ITERATION_1 6 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 7 && BOOST_PP_ITERATION_FINISH_1 >= 7 +# define BOOST_PP_ITERATION_1 7 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 8 && BOOST_PP_ITERATION_FINISH_1 >= 8 +# define BOOST_PP_ITERATION_1 8 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 9 && BOOST_PP_ITERATION_FINISH_1 >= 9 +# define BOOST_PP_ITERATION_1 9 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 10 && BOOST_PP_ITERATION_FINISH_1 >= 10 +# define BOOST_PP_ITERATION_1 10 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 11 && BOOST_PP_ITERATION_FINISH_1 >= 11 +# define BOOST_PP_ITERATION_1 11 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 12 && BOOST_PP_ITERATION_FINISH_1 >= 12 +# define BOOST_PP_ITERATION_1 12 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 13 && BOOST_PP_ITERATION_FINISH_1 >= 13 +# define BOOST_PP_ITERATION_1 13 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 14 && BOOST_PP_ITERATION_FINISH_1 >= 14 +# define BOOST_PP_ITERATION_1 14 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 15 && BOOST_PP_ITERATION_FINISH_1 >= 15 +# define BOOST_PP_ITERATION_1 15 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 16 && BOOST_PP_ITERATION_FINISH_1 >= 16 +# define BOOST_PP_ITERATION_1 16 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 17 && BOOST_PP_ITERATION_FINISH_1 >= 17 +# define BOOST_PP_ITERATION_1 17 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 18 && BOOST_PP_ITERATION_FINISH_1 >= 18 +# define BOOST_PP_ITERATION_1 18 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 19 && BOOST_PP_ITERATION_FINISH_1 >= 19 +# define BOOST_PP_ITERATION_1 19 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 20 && BOOST_PP_ITERATION_FINISH_1 >= 20 +# define BOOST_PP_ITERATION_1 20 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 21 && BOOST_PP_ITERATION_FINISH_1 >= 21 +# define BOOST_PP_ITERATION_1 21 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 22 && BOOST_PP_ITERATION_FINISH_1 >= 22 +# define BOOST_PP_ITERATION_1 22 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 23 && BOOST_PP_ITERATION_FINISH_1 >= 23 +# define BOOST_PP_ITERATION_1 23 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 24 && BOOST_PP_ITERATION_FINISH_1 >= 24 +# define BOOST_PP_ITERATION_1 24 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 25 && BOOST_PP_ITERATION_FINISH_1 >= 25 +# define BOOST_PP_ITERATION_1 25 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 26 && BOOST_PP_ITERATION_FINISH_1 >= 26 +# define BOOST_PP_ITERATION_1 26 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 27 && BOOST_PP_ITERATION_FINISH_1 >= 27 +# define BOOST_PP_ITERATION_1 27 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 28 && BOOST_PP_ITERATION_FINISH_1 >= 28 +# define BOOST_PP_ITERATION_1 28 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 29 && BOOST_PP_ITERATION_FINISH_1 >= 29 +# define BOOST_PP_ITERATION_1 29 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 30 && BOOST_PP_ITERATION_FINISH_1 >= 30 +# define BOOST_PP_ITERATION_1 30 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 31 && BOOST_PP_ITERATION_FINISH_1 >= 31 +# define BOOST_PP_ITERATION_1 31 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 32 && BOOST_PP_ITERATION_FINISH_1 >= 32 +# define BOOST_PP_ITERATION_1 32 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 33 && BOOST_PP_ITERATION_FINISH_1 >= 33 +# define BOOST_PP_ITERATION_1 33 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 34 && BOOST_PP_ITERATION_FINISH_1 >= 34 +# define BOOST_PP_ITERATION_1 34 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 35 && BOOST_PP_ITERATION_FINISH_1 >= 35 +# define BOOST_PP_ITERATION_1 35 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 36 && BOOST_PP_ITERATION_FINISH_1 >= 36 +# define BOOST_PP_ITERATION_1 36 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 37 && BOOST_PP_ITERATION_FINISH_1 >= 37 +# define BOOST_PP_ITERATION_1 37 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 38 && BOOST_PP_ITERATION_FINISH_1 >= 38 +# define BOOST_PP_ITERATION_1 38 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 39 && BOOST_PP_ITERATION_FINISH_1 >= 39 +# define BOOST_PP_ITERATION_1 39 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 40 && BOOST_PP_ITERATION_FINISH_1 >= 40 +# define BOOST_PP_ITERATION_1 40 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 41 && BOOST_PP_ITERATION_FINISH_1 >= 41 +# define BOOST_PP_ITERATION_1 41 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 42 && BOOST_PP_ITERATION_FINISH_1 >= 42 +# define BOOST_PP_ITERATION_1 42 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 43 && BOOST_PP_ITERATION_FINISH_1 >= 43 +# define BOOST_PP_ITERATION_1 43 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 44 && BOOST_PP_ITERATION_FINISH_1 >= 44 +# define BOOST_PP_ITERATION_1 44 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 45 && BOOST_PP_ITERATION_FINISH_1 >= 45 +# define BOOST_PP_ITERATION_1 45 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 46 && BOOST_PP_ITERATION_FINISH_1 >= 46 +# define BOOST_PP_ITERATION_1 46 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 47 && BOOST_PP_ITERATION_FINISH_1 >= 47 +# define BOOST_PP_ITERATION_1 47 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 48 && BOOST_PP_ITERATION_FINISH_1 >= 48 +# define BOOST_PP_ITERATION_1 48 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 49 && BOOST_PP_ITERATION_FINISH_1 >= 49 +# define BOOST_PP_ITERATION_1 49 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 50 && BOOST_PP_ITERATION_FINISH_1 >= 50 +# define BOOST_PP_ITERATION_1 50 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 51 && BOOST_PP_ITERATION_FINISH_1 >= 51 +# define BOOST_PP_ITERATION_1 51 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 52 && BOOST_PP_ITERATION_FINISH_1 >= 52 +# define BOOST_PP_ITERATION_1 52 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 53 && BOOST_PP_ITERATION_FINISH_1 >= 53 +# define BOOST_PP_ITERATION_1 53 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 54 && BOOST_PP_ITERATION_FINISH_1 >= 54 +# define BOOST_PP_ITERATION_1 54 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 55 && BOOST_PP_ITERATION_FINISH_1 >= 55 +# define BOOST_PP_ITERATION_1 55 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 56 && BOOST_PP_ITERATION_FINISH_1 >= 56 +# define BOOST_PP_ITERATION_1 56 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 57 && BOOST_PP_ITERATION_FINISH_1 >= 57 +# define BOOST_PP_ITERATION_1 57 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 58 && BOOST_PP_ITERATION_FINISH_1 >= 58 +# define BOOST_PP_ITERATION_1 58 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 59 && BOOST_PP_ITERATION_FINISH_1 >= 59 +# define BOOST_PP_ITERATION_1 59 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 60 && BOOST_PP_ITERATION_FINISH_1 >= 60 +# define BOOST_PP_ITERATION_1 60 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 61 && BOOST_PP_ITERATION_FINISH_1 >= 61 +# define BOOST_PP_ITERATION_1 61 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 62 && BOOST_PP_ITERATION_FINISH_1 >= 62 +# define BOOST_PP_ITERATION_1 62 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 63 && BOOST_PP_ITERATION_FINISH_1 >= 63 +# define BOOST_PP_ITERATION_1 63 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 64 && BOOST_PP_ITERATION_FINISH_1 >= 64 +# define BOOST_PP_ITERATION_1 64 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 65 && BOOST_PP_ITERATION_FINISH_1 >= 65 +# define BOOST_PP_ITERATION_1 65 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 66 && BOOST_PP_ITERATION_FINISH_1 >= 66 +# define BOOST_PP_ITERATION_1 66 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 67 && BOOST_PP_ITERATION_FINISH_1 >= 67 +# define BOOST_PP_ITERATION_1 67 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 68 && BOOST_PP_ITERATION_FINISH_1 >= 68 +# define BOOST_PP_ITERATION_1 68 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 69 && BOOST_PP_ITERATION_FINISH_1 >= 69 +# define BOOST_PP_ITERATION_1 69 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 70 && BOOST_PP_ITERATION_FINISH_1 >= 70 +# define BOOST_PP_ITERATION_1 70 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 71 && BOOST_PP_ITERATION_FINISH_1 >= 71 +# define BOOST_PP_ITERATION_1 71 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 72 && BOOST_PP_ITERATION_FINISH_1 >= 72 +# define BOOST_PP_ITERATION_1 72 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 73 && BOOST_PP_ITERATION_FINISH_1 >= 73 +# define BOOST_PP_ITERATION_1 73 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 74 && BOOST_PP_ITERATION_FINISH_1 >= 74 +# define BOOST_PP_ITERATION_1 74 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 75 && BOOST_PP_ITERATION_FINISH_1 >= 75 +# define BOOST_PP_ITERATION_1 75 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 76 && BOOST_PP_ITERATION_FINISH_1 >= 76 +# define BOOST_PP_ITERATION_1 76 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 77 && BOOST_PP_ITERATION_FINISH_1 >= 77 +# define BOOST_PP_ITERATION_1 77 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 78 && BOOST_PP_ITERATION_FINISH_1 >= 78 +# define BOOST_PP_ITERATION_1 78 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 79 && BOOST_PP_ITERATION_FINISH_1 >= 79 +# define BOOST_PP_ITERATION_1 79 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 80 && BOOST_PP_ITERATION_FINISH_1 >= 80 +# define BOOST_PP_ITERATION_1 80 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 81 && BOOST_PP_ITERATION_FINISH_1 >= 81 +# define BOOST_PP_ITERATION_1 81 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 82 && BOOST_PP_ITERATION_FINISH_1 >= 82 +# define BOOST_PP_ITERATION_1 82 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 83 && BOOST_PP_ITERATION_FINISH_1 >= 83 +# define BOOST_PP_ITERATION_1 83 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 84 && BOOST_PP_ITERATION_FINISH_1 >= 84 +# define BOOST_PP_ITERATION_1 84 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 85 && BOOST_PP_ITERATION_FINISH_1 >= 85 +# define BOOST_PP_ITERATION_1 85 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 86 && BOOST_PP_ITERATION_FINISH_1 >= 86 +# define BOOST_PP_ITERATION_1 86 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 87 && BOOST_PP_ITERATION_FINISH_1 >= 87 +# define BOOST_PP_ITERATION_1 87 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 88 && BOOST_PP_ITERATION_FINISH_1 >= 88 +# define BOOST_PP_ITERATION_1 88 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 89 && BOOST_PP_ITERATION_FINISH_1 >= 89 +# define BOOST_PP_ITERATION_1 89 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 90 && BOOST_PP_ITERATION_FINISH_1 >= 90 +# define BOOST_PP_ITERATION_1 90 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 91 && BOOST_PP_ITERATION_FINISH_1 >= 91 +# define BOOST_PP_ITERATION_1 91 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 92 && BOOST_PP_ITERATION_FINISH_1 >= 92 +# define BOOST_PP_ITERATION_1 92 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 93 && BOOST_PP_ITERATION_FINISH_1 >= 93 +# define BOOST_PP_ITERATION_1 93 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 94 && BOOST_PP_ITERATION_FINISH_1 >= 94 +# define BOOST_PP_ITERATION_1 94 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 95 && BOOST_PP_ITERATION_FINISH_1 >= 95 +# define BOOST_PP_ITERATION_1 95 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 96 && BOOST_PP_ITERATION_FINISH_1 >= 96 +# define BOOST_PP_ITERATION_1 96 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 97 && BOOST_PP_ITERATION_FINISH_1 >= 97 +# define BOOST_PP_ITERATION_1 97 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 98 && BOOST_PP_ITERATION_FINISH_1 >= 98 +# define BOOST_PP_ITERATION_1 98 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 99 && BOOST_PP_ITERATION_FINISH_1 >= 99 +# define BOOST_PP_ITERATION_1 99 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 100 && BOOST_PP_ITERATION_FINISH_1 >= 100 +# define BOOST_PP_ITERATION_1 100 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 101 && BOOST_PP_ITERATION_FINISH_1 >= 101 +# define BOOST_PP_ITERATION_1 101 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 102 && BOOST_PP_ITERATION_FINISH_1 >= 102 +# define BOOST_PP_ITERATION_1 102 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 103 && BOOST_PP_ITERATION_FINISH_1 >= 103 +# define BOOST_PP_ITERATION_1 103 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 104 && BOOST_PP_ITERATION_FINISH_1 >= 104 +# define BOOST_PP_ITERATION_1 104 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 105 && BOOST_PP_ITERATION_FINISH_1 >= 105 +# define BOOST_PP_ITERATION_1 105 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 106 && BOOST_PP_ITERATION_FINISH_1 >= 106 +# define BOOST_PP_ITERATION_1 106 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 107 && BOOST_PP_ITERATION_FINISH_1 >= 107 +# define BOOST_PP_ITERATION_1 107 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 108 && BOOST_PP_ITERATION_FINISH_1 >= 108 +# define BOOST_PP_ITERATION_1 108 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 109 && BOOST_PP_ITERATION_FINISH_1 >= 109 +# define BOOST_PP_ITERATION_1 109 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 110 && BOOST_PP_ITERATION_FINISH_1 >= 110 +# define BOOST_PP_ITERATION_1 110 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 111 && BOOST_PP_ITERATION_FINISH_1 >= 111 +# define BOOST_PP_ITERATION_1 111 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 112 && BOOST_PP_ITERATION_FINISH_1 >= 112 +# define BOOST_PP_ITERATION_1 112 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 113 && BOOST_PP_ITERATION_FINISH_1 >= 113 +# define BOOST_PP_ITERATION_1 113 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 114 && BOOST_PP_ITERATION_FINISH_1 >= 114 +# define BOOST_PP_ITERATION_1 114 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 115 && BOOST_PP_ITERATION_FINISH_1 >= 115 +# define BOOST_PP_ITERATION_1 115 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 116 && BOOST_PP_ITERATION_FINISH_1 >= 116 +# define BOOST_PP_ITERATION_1 116 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 117 && BOOST_PP_ITERATION_FINISH_1 >= 117 +# define BOOST_PP_ITERATION_1 117 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 118 && BOOST_PP_ITERATION_FINISH_1 >= 118 +# define BOOST_PP_ITERATION_1 118 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 119 && BOOST_PP_ITERATION_FINISH_1 >= 119 +# define BOOST_PP_ITERATION_1 119 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 120 && BOOST_PP_ITERATION_FINISH_1 >= 120 +# define BOOST_PP_ITERATION_1 120 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 121 && BOOST_PP_ITERATION_FINISH_1 >= 121 +# define BOOST_PP_ITERATION_1 121 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 122 && BOOST_PP_ITERATION_FINISH_1 >= 122 +# define BOOST_PP_ITERATION_1 122 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 123 && BOOST_PP_ITERATION_FINISH_1 >= 123 +# define BOOST_PP_ITERATION_1 123 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 124 && BOOST_PP_ITERATION_FINISH_1 >= 124 +# define BOOST_PP_ITERATION_1 124 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 125 && BOOST_PP_ITERATION_FINISH_1 >= 125 +# define BOOST_PP_ITERATION_1 125 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 126 && BOOST_PP_ITERATION_FINISH_1 >= 126 +# define BOOST_PP_ITERATION_1 126 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 127 && BOOST_PP_ITERATION_FINISH_1 >= 127 +# define BOOST_PP_ITERATION_1 127 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 128 && BOOST_PP_ITERATION_FINISH_1 >= 128 +# define BOOST_PP_ITERATION_1 128 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 129 && BOOST_PP_ITERATION_FINISH_1 >= 129 +# define BOOST_PP_ITERATION_1 129 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 130 && BOOST_PP_ITERATION_FINISH_1 >= 130 +# define BOOST_PP_ITERATION_1 130 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 131 && BOOST_PP_ITERATION_FINISH_1 >= 131 +# define BOOST_PP_ITERATION_1 131 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 132 && BOOST_PP_ITERATION_FINISH_1 >= 132 +# define BOOST_PP_ITERATION_1 132 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 133 && BOOST_PP_ITERATION_FINISH_1 >= 133 +# define BOOST_PP_ITERATION_1 133 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 134 && BOOST_PP_ITERATION_FINISH_1 >= 134 +# define BOOST_PP_ITERATION_1 134 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 135 && BOOST_PP_ITERATION_FINISH_1 >= 135 +# define BOOST_PP_ITERATION_1 135 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 136 && BOOST_PP_ITERATION_FINISH_1 >= 136 +# define BOOST_PP_ITERATION_1 136 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 137 && BOOST_PP_ITERATION_FINISH_1 >= 137 +# define BOOST_PP_ITERATION_1 137 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 138 && BOOST_PP_ITERATION_FINISH_1 >= 138 +# define BOOST_PP_ITERATION_1 138 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 139 && BOOST_PP_ITERATION_FINISH_1 >= 139 +# define BOOST_PP_ITERATION_1 139 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 140 && BOOST_PP_ITERATION_FINISH_1 >= 140 +# define BOOST_PP_ITERATION_1 140 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 141 && BOOST_PP_ITERATION_FINISH_1 >= 141 +# define BOOST_PP_ITERATION_1 141 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 142 && BOOST_PP_ITERATION_FINISH_1 >= 142 +# define BOOST_PP_ITERATION_1 142 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 143 && BOOST_PP_ITERATION_FINISH_1 >= 143 +# define BOOST_PP_ITERATION_1 143 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 144 && BOOST_PP_ITERATION_FINISH_1 >= 144 +# define BOOST_PP_ITERATION_1 144 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 145 && BOOST_PP_ITERATION_FINISH_1 >= 145 +# define BOOST_PP_ITERATION_1 145 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 146 && BOOST_PP_ITERATION_FINISH_1 >= 146 +# define BOOST_PP_ITERATION_1 146 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 147 && BOOST_PP_ITERATION_FINISH_1 >= 147 +# define BOOST_PP_ITERATION_1 147 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 148 && BOOST_PP_ITERATION_FINISH_1 >= 148 +# define BOOST_PP_ITERATION_1 148 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 149 && BOOST_PP_ITERATION_FINISH_1 >= 149 +# define BOOST_PP_ITERATION_1 149 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 150 && BOOST_PP_ITERATION_FINISH_1 >= 150 +# define BOOST_PP_ITERATION_1 150 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 151 && BOOST_PP_ITERATION_FINISH_1 >= 151 +# define BOOST_PP_ITERATION_1 151 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 152 && BOOST_PP_ITERATION_FINISH_1 >= 152 +# define BOOST_PP_ITERATION_1 152 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 153 && BOOST_PP_ITERATION_FINISH_1 >= 153 +# define BOOST_PP_ITERATION_1 153 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 154 && BOOST_PP_ITERATION_FINISH_1 >= 154 +# define BOOST_PP_ITERATION_1 154 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 155 && BOOST_PP_ITERATION_FINISH_1 >= 155 +# define BOOST_PP_ITERATION_1 155 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 156 && BOOST_PP_ITERATION_FINISH_1 >= 156 +# define BOOST_PP_ITERATION_1 156 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 157 && BOOST_PP_ITERATION_FINISH_1 >= 157 +# define BOOST_PP_ITERATION_1 157 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 158 && BOOST_PP_ITERATION_FINISH_1 >= 158 +# define BOOST_PP_ITERATION_1 158 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 159 && BOOST_PP_ITERATION_FINISH_1 >= 159 +# define BOOST_PP_ITERATION_1 159 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 160 && BOOST_PP_ITERATION_FINISH_1 >= 160 +# define BOOST_PP_ITERATION_1 160 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 161 && BOOST_PP_ITERATION_FINISH_1 >= 161 +# define BOOST_PP_ITERATION_1 161 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 162 && BOOST_PP_ITERATION_FINISH_1 >= 162 +# define BOOST_PP_ITERATION_1 162 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 163 && BOOST_PP_ITERATION_FINISH_1 >= 163 +# define BOOST_PP_ITERATION_1 163 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 164 && BOOST_PP_ITERATION_FINISH_1 >= 164 +# define BOOST_PP_ITERATION_1 164 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 165 && BOOST_PP_ITERATION_FINISH_1 >= 165 +# define BOOST_PP_ITERATION_1 165 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 166 && BOOST_PP_ITERATION_FINISH_1 >= 166 +# define BOOST_PP_ITERATION_1 166 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 167 && BOOST_PP_ITERATION_FINISH_1 >= 167 +# define BOOST_PP_ITERATION_1 167 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 168 && BOOST_PP_ITERATION_FINISH_1 >= 168 +# define BOOST_PP_ITERATION_1 168 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 169 && BOOST_PP_ITERATION_FINISH_1 >= 169 +# define BOOST_PP_ITERATION_1 169 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 170 && BOOST_PP_ITERATION_FINISH_1 >= 170 +# define BOOST_PP_ITERATION_1 170 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 171 && BOOST_PP_ITERATION_FINISH_1 >= 171 +# define BOOST_PP_ITERATION_1 171 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 172 && BOOST_PP_ITERATION_FINISH_1 >= 172 +# define BOOST_PP_ITERATION_1 172 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 173 && BOOST_PP_ITERATION_FINISH_1 >= 173 +# define BOOST_PP_ITERATION_1 173 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 174 && BOOST_PP_ITERATION_FINISH_1 >= 174 +# define BOOST_PP_ITERATION_1 174 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 175 && BOOST_PP_ITERATION_FINISH_1 >= 175 +# define BOOST_PP_ITERATION_1 175 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 176 && BOOST_PP_ITERATION_FINISH_1 >= 176 +# define BOOST_PP_ITERATION_1 176 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 177 && BOOST_PP_ITERATION_FINISH_1 >= 177 +# define BOOST_PP_ITERATION_1 177 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 178 && BOOST_PP_ITERATION_FINISH_1 >= 178 +# define BOOST_PP_ITERATION_1 178 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 179 && BOOST_PP_ITERATION_FINISH_1 >= 179 +# define BOOST_PP_ITERATION_1 179 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 180 && BOOST_PP_ITERATION_FINISH_1 >= 180 +# define BOOST_PP_ITERATION_1 180 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 181 && BOOST_PP_ITERATION_FINISH_1 >= 181 +# define BOOST_PP_ITERATION_1 181 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 182 && BOOST_PP_ITERATION_FINISH_1 >= 182 +# define BOOST_PP_ITERATION_1 182 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 183 && BOOST_PP_ITERATION_FINISH_1 >= 183 +# define BOOST_PP_ITERATION_1 183 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 184 && BOOST_PP_ITERATION_FINISH_1 >= 184 +# define BOOST_PP_ITERATION_1 184 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 185 && BOOST_PP_ITERATION_FINISH_1 >= 185 +# define BOOST_PP_ITERATION_1 185 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 186 && BOOST_PP_ITERATION_FINISH_1 >= 186 +# define BOOST_PP_ITERATION_1 186 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 187 && BOOST_PP_ITERATION_FINISH_1 >= 187 +# define BOOST_PP_ITERATION_1 187 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 188 && BOOST_PP_ITERATION_FINISH_1 >= 188 +# define BOOST_PP_ITERATION_1 188 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 189 && BOOST_PP_ITERATION_FINISH_1 >= 189 +# define BOOST_PP_ITERATION_1 189 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 190 && BOOST_PP_ITERATION_FINISH_1 >= 190 +# define BOOST_PP_ITERATION_1 190 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 191 && BOOST_PP_ITERATION_FINISH_1 >= 191 +# define BOOST_PP_ITERATION_1 191 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 192 && BOOST_PP_ITERATION_FINISH_1 >= 192 +# define BOOST_PP_ITERATION_1 192 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 193 && BOOST_PP_ITERATION_FINISH_1 >= 193 +# define BOOST_PP_ITERATION_1 193 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 194 && BOOST_PP_ITERATION_FINISH_1 >= 194 +# define BOOST_PP_ITERATION_1 194 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 195 && BOOST_PP_ITERATION_FINISH_1 >= 195 +# define BOOST_PP_ITERATION_1 195 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 196 && BOOST_PP_ITERATION_FINISH_1 >= 196 +# define BOOST_PP_ITERATION_1 196 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 197 && BOOST_PP_ITERATION_FINISH_1 >= 197 +# define BOOST_PP_ITERATION_1 197 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 198 && BOOST_PP_ITERATION_FINISH_1 >= 198 +# define BOOST_PP_ITERATION_1 198 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 199 && BOOST_PP_ITERATION_FINISH_1 >= 199 +# define BOOST_PP_ITERATION_1 199 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 200 && BOOST_PP_ITERATION_FINISH_1 >= 200 +# define BOOST_PP_ITERATION_1 200 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 201 && BOOST_PP_ITERATION_FINISH_1 >= 201 +# define BOOST_PP_ITERATION_1 201 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 202 && BOOST_PP_ITERATION_FINISH_1 >= 202 +# define BOOST_PP_ITERATION_1 202 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 203 && BOOST_PP_ITERATION_FINISH_1 >= 203 +# define BOOST_PP_ITERATION_1 203 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 204 && BOOST_PP_ITERATION_FINISH_1 >= 204 +# define BOOST_PP_ITERATION_1 204 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 205 && BOOST_PP_ITERATION_FINISH_1 >= 205 +# define BOOST_PP_ITERATION_1 205 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 206 && BOOST_PP_ITERATION_FINISH_1 >= 206 +# define BOOST_PP_ITERATION_1 206 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 207 && BOOST_PP_ITERATION_FINISH_1 >= 207 +# define BOOST_PP_ITERATION_1 207 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 208 && BOOST_PP_ITERATION_FINISH_1 >= 208 +# define BOOST_PP_ITERATION_1 208 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 209 && BOOST_PP_ITERATION_FINISH_1 >= 209 +# define BOOST_PP_ITERATION_1 209 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 210 && BOOST_PP_ITERATION_FINISH_1 >= 210 +# define BOOST_PP_ITERATION_1 210 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 211 && BOOST_PP_ITERATION_FINISH_1 >= 211 +# define BOOST_PP_ITERATION_1 211 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 212 && BOOST_PP_ITERATION_FINISH_1 >= 212 +# define BOOST_PP_ITERATION_1 212 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 213 && BOOST_PP_ITERATION_FINISH_1 >= 213 +# define BOOST_PP_ITERATION_1 213 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 214 && BOOST_PP_ITERATION_FINISH_1 >= 214 +# define BOOST_PP_ITERATION_1 214 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 215 && BOOST_PP_ITERATION_FINISH_1 >= 215 +# define BOOST_PP_ITERATION_1 215 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 216 && BOOST_PP_ITERATION_FINISH_1 >= 216 +# define BOOST_PP_ITERATION_1 216 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 217 && BOOST_PP_ITERATION_FINISH_1 >= 217 +# define BOOST_PP_ITERATION_1 217 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 218 && BOOST_PP_ITERATION_FINISH_1 >= 218 +# define BOOST_PP_ITERATION_1 218 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 219 && BOOST_PP_ITERATION_FINISH_1 >= 219 +# define BOOST_PP_ITERATION_1 219 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 220 && BOOST_PP_ITERATION_FINISH_1 >= 220 +# define BOOST_PP_ITERATION_1 220 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 221 && BOOST_PP_ITERATION_FINISH_1 >= 221 +# define BOOST_PP_ITERATION_1 221 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 222 && BOOST_PP_ITERATION_FINISH_1 >= 222 +# define BOOST_PP_ITERATION_1 222 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 223 && BOOST_PP_ITERATION_FINISH_1 >= 223 +# define BOOST_PP_ITERATION_1 223 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 224 && BOOST_PP_ITERATION_FINISH_1 >= 224 +# define BOOST_PP_ITERATION_1 224 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 225 && BOOST_PP_ITERATION_FINISH_1 >= 225 +# define BOOST_PP_ITERATION_1 225 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 226 && BOOST_PP_ITERATION_FINISH_1 >= 226 +# define BOOST_PP_ITERATION_1 226 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 227 && BOOST_PP_ITERATION_FINISH_1 >= 227 +# define BOOST_PP_ITERATION_1 227 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 228 && BOOST_PP_ITERATION_FINISH_1 >= 228 +# define BOOST_PP_ITERATION_1 228 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 229 && BOOST_PP_ITERATION_FINISH_1 >= 229 +# define BOOST_PP_ITERATION_1 229 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 230 && BOOST_PP_ITERATION_FINISH_1 >= 230 +# define BOOST_PP_ITERATION_1 230 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 231 && BOOST_PP_ITERATION_FINISH_1 >= 231 +# define BOOST_PP_ITERATION_1 231 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 232 && BOOST_PP_ITERATION_FINISH_1 >= 232 +# define BOOST_PP_ITERATION_1 232 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 233 && BOOST_PP_ITERATION_FINISH_1 >= 233 +# define BOOST_PP_ITERATION_1 233 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 234 && BOOST_PP_ITERATION_FINISH_1 >= 234 +# define BOOST_PP_ITERATION_1 234 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 235 && BOOST_PP_ITERATION_FINISH_1 >= 235 +# define BOOST_PP_ITERATION_1 235 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 236 && BOOST_PP_ITERATION_FINISH_1 >= 236 +# define BOOST_PP_ITERATION_1 236 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 237 && BOOST_PP_ITERATION_FINISH_1 >= 237 +# define BOOST_PP_ITERATION_1 237 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 238 && BOOST_PP_ITERATION_FINISH_1 >= 238 +# define BOOST_PP_ITERATION_1 238 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 239 && BOOST_PP_ITERATION_FINISH_1 >= 239 +# define BOOST_PP_ITERATION_1 239 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 240 && BOOST_PP_ITERATION_FINISH_1 >= 240 +# define BOOST_PP_ITERATION_1 240 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 241 && BOOST_PP_ITERATION_FINISH_1 >= 241 +# define BOOST_PP_ITERATION_1 241 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 242 && BOOST_PP_ITERATION_FINISH_1 >= 242 +# define BOOST_PP_ITERATION_1 242 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 243 && BOOST_PP_ITERATION_FINISH_1 >= 243 +# define BOOST_PP_ITERATION_1 243 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 244 && BOOST_PP_ITERATION_FINISH_1 >= 244 +# define BOOST_PP_ITERATION_1 244 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 245 && BOOST_PP_ITERATION_FINISH_1 >= 245 +# define BOOST_PP_ITERATION_1 245 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 246 && BOOST_PP_ITERATION_FINISH_1 >= 246 +# define BOOST_PP_ITERATION_1 246 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 247 && BOOST_PP_ITERATION_FINISH_1 >= 247 +# define BOOST_PP_ITERATION_1 247 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 248 && BOOST_PP_ITERATION_FINISH_1 >= 248 +# define BOOST_PP_ITERATION_1 248 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 249 && BOOST_PP_ITERATION_FINISH_1 >= 249 +# define BOOST_PP_ITERATION_1 249 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 250 && BOOST_PP_ITERATION_FINISH_1 >= 250 +# define BOOST_PP_ITERATION_1 250 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 251 && BOOST_PP_ITERATION_FINISH_1 >= 251 +# define BOOST_PP_ITERATION_1 251 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 252 && BOOST_PP_ITERATION_FINISH_1 >= 252 +# define BOOST_PP_ITERATION_1 252 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 253 && BOOST_PP_ITERATION_FINISH_1 >= 253 +# define BOOST_PP_ITERATION_1 253 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 254 && BOOST_PP_ITERATION_FINISH_1 >= 254 +# define BOOST_PP_ITERATION_1 254 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 255 && BOOST_PP_ITERATION_FINISH_1 >= 255 +# define BOOST_PP_ITERATION_1 255 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_START_1 <= 256 && BOOST_PP_ITERATION_FINISH_1 >= 256 +# define BOOST_PP_ITERATION_1 256 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# endif +# +# undef BOOST_PP_IS_ITERATING +# +# undef BOOST_PP_ITERATION_DEPTH +# define BOOST_PP_ITERATION_DEPTH() 0 +# +# undef BOOST_PP_ITERATION_START_1 +# undef BOOST_PP_ITERATION_FINISH_1 +# undef BOOST_PP_FILENAME_1 +# +# undef BOOST_PP_ITERATION_FLAGS_1 +# undef BOOST_PP_ITERATION_PARAMS_1 diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/forward2.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/forward2.hpp new file mode 100644 index 0000000000..e61a329d33 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/forward2.hpp @@ -0,0 +1,1338 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# if defined(BOOST_PP_ITERATION_LIMITS) +# if !defined(BOOST_PP_FILENAME_2) +# error BOOST_PP_ERROR: depth #2 filename is not defined +# endif +# define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_ITERATION_LIMITS) +# include +# define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_ITERATION_LIMITS) +# include +# define BOOST_PP_ITERATION_FLAGS_2() 0 +# undef BOOST_PP_ITERATION_LIMITS +# elif defined(BOOST_PP_ITERATION_PARAMS_2) +# define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ITERATION_PARAMS_2) +# include +# define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(1, BOOST_PP_ITERATION_PARAMS_2) +# include +# define BOOST_PP_FILENAME_2 BOOST_PP_ARRAY_ELEM(2, BOOST_PP_ITERATION_PARAMS_2) +# if BOOST_PP_ARRAY_SIZE(BOOST_PP_ITERATION_PARAMS_2) >= 4 +# define BOOST_PP_ITERATION_FLAGS_2() BOOST_PP_ARRAY_ELEM(3, BOOST_PP_ITERATION_PARAMS_2) +# else +# define BOOST_PP_ITERATION_FLAGS_2() 0 +# endif +# else +# error BOOST_PP_ERROR: depth #2 iteration boundaries or filename not defined +# endif +# +# undef BOOST_PP_ITERATION_DEPTH +# define BOOST_PP_ITERATION_DEPTH() 2 +# +# if (BOOST_PP_ITERATION_START_2) > (BOOST_PP_ITERATION_FINISH_2) +# include +# else +# if BOOST_PP_ITERATION_START_2 <= 0 && BOOST_PP_ITERATION_FINISH_2 >= 0 +# define BOOST_PP_ITERATION_2 0 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 1 && BOOST_PP_ITERATION_FINISH_2 >= 1 +# define BOOST_PP_ITERATION_2 1 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 2 && BOOST_PP_ITERATION_FINISH_2 >= 2 +# define BOOST_PP_ITERATION_2 2 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 3 && BOOST_PP_ITERATION_FINISH_2 >= 3 +# define BOOST_PP_ITERATION_2 3 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 4 && BOOST_PP_ITERATION_FINISH_2 >= 4 +# define BOOST_PP_ITERATION_2 4 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 5 && BOOST_PP_ITERATION_FINISH_2 >= 5 +# define BOOST_PP_ITERATION_2 5 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 6 && BOOST_PP_ITERATION_FINISH_2 >= 6 +# define BOOST_PP_ITERATION_2 6 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 7 && BOOST_PP_ITERATION_FINISH_2 >= 7 +# define BOOST_PP_ITERATION_2 7 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 8 && BOOST_PP_ITERATION_FINISH_2 >= 8 +# define BOOST_PP_ITERATION_2 8 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 9 && BOOST_PP_ITERATION_FINISH_2 >= 9 +# define BOOST_PP_ITERATION_2 9 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 10 && BOOST_PP_ITERATION_FINISH_2 >= 10 +# define BOOST_PP_ITERATION_2 10 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 11 && BOOST_PP_ITERATION_FINISH_2 >= 11 +# define BOOST_PP_ITERATION_2 11 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 12 && BOOST_PP_ITERATION_FINISH_2 >= 12 +# define BOOST_PP_ITERATION_2 12 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 13 && BOOST_PP_ITERATION_FINISH_2 >= 13 +# define BOOST_PP_ITERATION_2 13 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 14 && BOOST_PP_ITERATION_FINISH_2 >= 14 +# define BOOST_PP_ITERATION_2 14 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 15 && BOOST_PP_ITERATION_FINISH_2 >= 15 +# define BOOST_PP_ITERATION_2 15 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 16 && BOOST_PP_ITERATION_FINISH_2 >= 16 +# define BOOST_PP_ITERATION_2 16 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 17 && BOOST_PP_ITERATION_FINISH_2 >= 17 +# define BOOST_PP_ITERATION_2 17 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 18 && BOOST_PP_ITERATION_FINISH_2 >= 18 +# define BOOST_PP_ITERATION_2 18 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 19 && BOOST_PP_ITERATION_FINISH_2 >= 19 +# define BOOST_PP_ITERATION_2 19 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 20 && BOOST_PP_ITERATION_FINISH_2 >= 20 +# define BOOST_PP_ITERATION_2 20 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 21 && BOOST_PP_ITERATION_FINISH_2 >= 21 +# define BOOST_PP_ITERATION_2 21 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 22 && BOOST_PP_ITERATION_FINISH_2 >= 22 +# define BOOST_PP_ITERATION_2 22 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 23 && BOOST_PP_ITERATION_FINISH_2 >= 23 +# define BOOST_PP_ITERATION_2 23 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 24 && BOOST_PP_ITERATION_FINISH_2 >= 24 +# define BOOST_PP_ITERATION_2 24 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 25 && BOOST_PP_ITERATION_FINISH_2 >= 25 +# define BOOST_PP_ITERATION_2 25 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 26 && BOOST_PP_ITERATION_FINISH_2 >= 26 +# define BOOST_PP_ITERATION_2 26 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 27 && BOOST_PP_ITERATION_FINISH_2 >= 27 +# define BOOST_PP_ITERATION_2 27 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 28 && BOOST_PP_ITERATION_FINISH_2 >= 28 +# define BOOST_PP_ITERATION_2 28 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 29 && BOOST_PP_ITERATION_FINISH_2 >= 29 +# define BOOST_PP_ITERATION_2 29 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 30 && BOOST_PP_ITERATION_FINISH_2 >= 30 +# define BOOST_PP_ITERATION_2 30 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 31 && BOOST_PP_ITERATION_FINISH_2 >= 31 +# define BOOST_PP_ITERATION_2 31 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 32 && BOOST_PP_ITERATION_FINISH_2 >= 32 +# define BOOST_PP_ITERATION_2 32 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 33 && BOOST_PP_ITERATION_FINISH_2 >= 33 +# define BOOST_PP_ITERATION_2 33 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 34 && BOOST_PP_ITERATION_FINISH_2 >= 34 +# define BOOST_PP_ITERATION_2 34 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 35 && BOOST_PP_ITERATION_FINISH_2 >= 35 +# define BOOST_PP_ITERATION_2 35 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 36 && BOOST_PP_ITERATION_FINISH_2 >= 36 +# define BOOST_PP_ITERATION_2 36 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 37 && BOOST_PP_ITERATION_FINISH_2 >= 37 +# define BOOST_PP_ITERATION_2 37 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 38 && BOOST_PP_ITERATION_FINISH_2 >= 38 +# define BOOST_PP_ITERATION_2 38 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 39 && BOOST_PP_ITERATION_FINISH_2 >= 39 +# define BOOST_PP_ITERATION_2 39 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 40 && BOOST_PP_ITERATION_FINISH_2 >= 40 +# define BOOST_PP_ITERATION_2 40 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 41 && BOOST_PP_ITERATION_FINISH_2 >= 41 +# define BOOST_PP_ITERATION_2 41 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 42 && BOOST_PP_ITERATION_FINISH_2 >= 42 +# define BOOST_PP_ITERATION_2 42 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 43 && BOOST_PP_ITERATION_FINISH_2 >= 43 +# define BOOST_PP_ITERATION_2 43 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 44 && BOOST_PP_ITERATION_FINISH_2 >= 44 +# define BOOST_PP_ITERATION_2 44 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 45 && BOOST_PP_ITERATION_FINISH_2 >= 45 +# define BOOST_PP_ITERATION_2 45 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 46 && BOOST_PP_ITERATION_FINISH_2 >= 46 +# define BOOST_PP_ITERATION_2 46 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 47 && BOOST_PP_ITERATION_FINISH_2 >= 47 +# define BOOST_PP_ITERATION_2 47 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 48 && BOOST_PP_ITERATION_FINISH_2 >= 48 +# define BOOST_PP_ITERATION_2 48 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 49 && BOOST_PP_ITERATION_FINISH_2 >= 49 +# define BOOST_PP_ITERATION_2 49 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 50 && BOOST_PP_ITERATION_FINISH_2 >= 50 +# define BOOST_PP_ITERATION_2 50 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 51 && BOOST_PP_ITERATION_FINISH_2 >= 51 +# define BOOST_PP_ITERATION_2 51 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 52 && BOOST_PP_ITERATION_FINISH_2 >= 52 +# define BOOST_PP_ITERATION_2 52 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 53 && BOOST_PP_ITERATION_FINISH_2 >= 53 +# define BOOST_PP_ITERATION_2 53 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 54 && BOOST_PP_ITERATION_FINISH_2 >= 54 +# define BOOST_PP_ITERATION_2 54 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 55 && BOOST_PP_ITERATION_FINISH_2 >= 55 +# define BOOST_PP_ITERATION_2 55 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 56 && BOOST_PP_ITERATION_FINISH_2 >= 56 +# define BOOST_PP_ITERATION_2 56 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 57 && BOOST_PP_ITERATION_FINISH_2 >= 57 +# define BOOST_PP_ITERATION_2 57 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 58 && BOOST_PP_ITERATION_FINISH_2 >= 58 +# define BOOST_PP_ITERATION_2 58 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 59 && BOOST_PP_ITERATION_FINISH_2 >= 59 +# define BOOST_PP_ITERATION_2 59 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 60 && BOOST_PP_ITERATION_FINISH_2 >= 60 +# define BOOST_PP_ITERATION_2 60 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 61 && BOOST_PP_ITERATION_FINISH_2 >= 61 +# define BOOST_PP_ITERATION_2 61 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 62 && BOOST_PP_ITERATION_FINISH_2 >= 62 +# define BOOST_PP_ITERATION_2 62 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 63 && BOOST_PP_ITERATION_FINISH_2 >= 63 +# define BOOST_PP_ITERATION_2 63 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 64 && BOOST_PP_ITERATION_FINISH_2 >= 64 +# define BOOST_PP_ITERATION_2 64 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 65 && BOOST_PP_ITERATION_FINISH_2 >= 65 +# define BOOST_PP_ITERATION_2 65 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 66 && BOOST_PP_ITERATION_FINISH_2 >= 66 +# define BOOST_PP_ITERATION_2 66 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 67 && BOOST_PP_ITERATION_FINISH_2 >= 67 +# define BOOST_PP_ITERATION_2 67 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 68 && BOOST_PP_ITERATION_FINISH_2 >= 68 +# define BOOST_PP_ITERATION_2 68 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 69 && BOOST_PP_ITERATION_FINISH_2 >= 69 +# define BOOST_PP_ITERATION_2 69 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 70 && BOOST_PP_ITERATION_FINISH_2 >= 70 +# define BOOST_PP_ITERATION_2 70 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 71 && BOOST_PP_ITERATION_FINISH_2 >= 71 +# define BOOST_PP_ITERATION_2 71 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 72 && BOOST_PP_ITERATION_FINISH_2 >= 72 +# define BOOST_PP_ITERATION_2 72 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 73 && BOOST_PP_ITERATION_FINISH_2 >= 73 +# define BOOST_PP_ITERATION_2 73 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 74 && BOOST_PP_ITERATION_FINISH_2 >= 74 +# define BOOST_PP_ITERATION_2 74 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 75 && BOOST_PP_ITERATION_FINISH_2 >= 75 +# define BOOST_PP_ITERATION_2 75 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 76 && BOOST_PP_ITERATION_FINISH_2 >= 76 +# define BOOST_PP_ITERATION_2 76 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 77 && BOOST_PP_ITERATION_FINISH_2 >= 77 +# define BOOST_PP_ITERATION_2 77 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 78 && BOOST_PP_ITERATION_FINISH_2 >= 78 +# define BOOST_PP_ITERATION_2 78 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 79 && BOOST_PP_ITERATION_FINISH_2 >= 79 +# define BOOST_PP_ITERATION_2 79 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 80 && BOOST_PP_ITERATION_FINISH_2 >= 80 +# define BOOST_PP_ITERATION_2 80 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 81 && BOOST_PP_ITERATION_FINISH_2 >= 81 +# define BOOST_PP_ITERATION_2 81 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 82 && BOOST_PP_ITERATION_FINISH_2 >= 82 +# define BOOST_PP_ITERATION_2 82 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 83 && BOOST_PP_ITERATION_FINISH_2 >= 83 +# define BOOST_PP_ITERATION_2 83 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 84 && BOOST_PP_ITERATION_FINISH_2 >= 84 +# define BOOST_PP_ITERATION_2 84 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 85 && BOOST_PP_ITERATION_FINISH_2 >= 85 +# define BOOST_PP_ITERATION_2 85 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 86 && BOOST_PP_ITERATION_FINISH_2 >= 86 +# define BOOST_PP_ITERATION_2 86 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 87 && BOOST_PP_ITERATION_FINISH_2 >= 87 +# define BOOST_PP_ITERATION_2 87 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 88 && BOOST_PP_ITERATION_FINISH_2 >= 88 +# define BOOST_PP_ITERATION_2 88 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 89 && BOOST_PP_ITERATION_FINISH_2 >= 89 +# define BOOST_PP_ITERATION_2 89 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 90 && BOOST_PP_ITERATION_FINISH_2 >= 90 +# define BOOST_PP_ITERATION_2 90 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 91 && BOOST_PP_ITERATION_FINISH_2 >= 91 +# define BOOST_PP_ITERATION_2 91 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 92 && BOOST_PP_ITERATION_FINISH_2 >= 92 +# define BOOST_PP_ITERATION_2 92 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 93 && BOOST_PP_ITERATION_FINISH_2 >= 93 +# define BOOST_PP_ITERATION_2 93 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 94 && BOOST_PP_ITERATION_FINISH_2 >= 94 +# define BOOST_PP_ITERATION_2 94 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 95 && BOOST_PP_ITERATION_FINISH_2 >= 95 +# define BOOST_PP_ITERATION_2 95 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 96 && BOOST_PP_ITERATION_FINISH_2 >= 96 +# define BOOST_PP_ITERATION_2 96 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 97 && BOOST_PP_ITERATION_FINISH_2 >= 97 +# define BOOST_PP_ITERATION_2 97 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 98 && BOOST_PP_ITERATION_FINISH_2 >= 98 +# define BOOST_PP_ITERATION_2 98 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 99 && BOOST_PP_ITERATION_FINISH_2 >= 99 +# define BOOST_PP_ITERATION_2 99 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 100 && BOOST_PP_ITERATION_FINISH_2 >= 100 +# define BOOST_PP_ITERATION_2 100 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 101 && BOOST_PP_ITERATION_FINISH_2 >= 101 +# define BOOST_PP_ITERATION_2 101 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 102 && BOOST_PP_ITERATION_FINISH_2 >= 102 +# define BOOST_PP_ITERATION_2 102 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 103 && BOOST_PP_ITERATION_FINISH_2 >= 103 +# define BOOST_PP_ITERATION_2 103 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 104 && BOOST_PP_ITERATION_FINISH_2 >= 104 +# define BOOST_PP_ITERATION_2 104 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 105 && BOOST_PP_ITERATION_FINISH_2 >= 105 +# define BOOST_PP_ITERATION_2 105 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 106 && BOOST_PP_ITERATION_FINISH_2 >= 106 +# define BOOST_PP_ITERATION_2 106 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 107 && BOOST_PP_ITERATION_FINISH_2 >= 107 +# define BOOST_PP_ITERATION_2 107 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 108 && BOOST_PP_ITERATION_FINISH_2 >= 108 +# define BOOST_PP_ITERATION_2 108 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 109 && BOOST_PP_ITERATION_FINISH_2 >= 109 +# define BOOST_PP_ITERATION_2 109 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 110 && BOOST_PP_ITERATION_FINISH_2 >= 110 +# define BOOST_PP_ITERATION_2 110 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 111 && BOOST_PP_ITERATION_FINISH_2 >= 111 +# define BOOST_PP_ITERATION_2 111 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 112 && BOOST_PP_ITERATION_FINISH_2 >= 112 +# define BOOST_PP_ITERATION_2 112 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 113 && BOOST_PP_ITERATION_FINISH_2 >= 113 +# define BOOST_PP_ITERATION_2 113 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 114 && BOOST_PP_ITERATION_FINISH_2 >= 114 +# define BOOST_PP_ITERATION_2 114 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 115 && BOOST_PP_ITERATION_FINISH_2 >= 115 +# define BOOST_PP_ITERATION_2 115 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 116 && BOOST_PP_ITERATION_FINISH_2 >= 116 +# define BOOST_PP_ITERATION_2 116 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 117 && BOOST_PP_ITERATION_FINISH_2 >= 117 +# define BOOST_PP_ITERATION_2 117 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 118 && BOOST_PP_ITERATION_FINISH_2 >= 118 +# define BOOST_PP_ITERATION_2 118 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 119 && BOOST_PP_ITERATION_FINISH_2 >= 119 +# define BOOST_PP_ITERATION_2 119 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 120 && BOOST_PP_ITERATION_FINISH_2 >= 120 +# define BOOST_PP_ITERATION_2 120 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 121 && BOOST_PP_ITERATION_FINISH_2 >= 121 +# define BOOST_PP_ITERATION_2 121 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 122 && BOOST_PP_ITERATION_FINISH_2 >= 122 +# define BOOST_PP_ITERATION_2 122 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 123 && BOOST_PP_ITERATION_FINISH_2 >= 123 +# define BOOST_PP_ITERATION_2 123 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 124 && BOOST_PP_ITERATION_FINISH_2 >= 124 +# define BOOST_PP_ITERATION_2 124 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 125 && BOOST_PP_ITERATION_FINISH_2 >= 125 +# define BOOST_PP_ITERATION_2 125 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 126 && BOOST_PP_ITERATION_FINISH_2 >= 126 +# define BOOST_PP_ITERATION_2 126 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 127 && BOOST_PP_ITERATION_FINISH_2 >= 127 +# define BOOST_PP_ITERATION_2 127 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 128 && BOOST_PP_ITERATION_FINISH_2 >= 128 +# define BOOST_PP_ITERATION_2 128 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 129 && BOOST_PP_ITERATION_FINISH_2 >= 129 +# define BOOST_PP_ITERATION_2 129 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 130 && BOOST_PP_ITERATION_FINISH_2 >= 130 +# define BOOST_PP_ITERATION_2 130 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 131 && BOOST_PP_ITERATION_FINISH_2 >= 131 +# define BOOST_PP_ITERATION_2 131 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 132 && BOOST_PP_ITERATION_FINISH_2 >= 132 +# define BOOST_PP_ITERATION_2 132 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 133 && BOOST_PP_ITERATION_FINISH_2 >= 133 +# define BOOST_PP_ITERATION_2 133 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 134 && BOOST_PP_ITERATION_FINISH_2 >= 134 +# define BOOST_PP_ITERATION_2 134 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 135 && BOOST_PP_ITERATION_FINISH_2 >= 135 +# define BOOST_PP_ITERATION_2 135 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 136 && BOOST_PP_ITERATION_FINISH_2 >= 136 +# define BOOST_PP_ITERATION_2 136 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 137 && BOOST_PP_ITERATION_FINISH_2 >= 137 +# define BOOST_PP_ITERATION_2 137 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 138 && BOOST_PP_ITERATION_FINISH_2 >= 138 +# define BOOST_PP_ITERATION_2 138 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 139 && BOOST_PP_ITERATION_FINISH_2 >= 139 +# define BOOST_PP_ITERATION_2 139 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 140 && BOOST_PP_ITERATION_FINISH_2 >= 140 +# define BOOST_PP_ITERATION_2 140 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 141 && BOOST_PP_ITERATION_FINISH_2 >= 141 +# define BOOST_PP_ITERATION_2 141 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 142 && BOOST_PP_ITERATION_FINISH_2 >= 142 +# define BOOST_PP_ITERATION_2 142 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 143 && BOOST_PP_ITERATION_FINISH_2 >= 143 +# define BOOST_PP_ITERATION_2 143 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 144 && BOOST_PP_ITERATION_FINISH_2 >= 144 +# define BOOST_PP_ITERATION_2 144 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 145 && BOOST_PP_ITERATION_FINISH_2 >= 145 +# define BOOST_PP_ITERATION_2 145 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 146 && BOOST_PP_ITERATION_FINISH_2 >= 146 +# define BOOST_PP_ITERATION_2 146 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 147 && BOOST_PP_ITERATION_FINISH_2 >= 147 +# define BOOST_PP_ITERATION_2 147 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 148 && BOOST_PP_ITERATION_FINISH_2 >= 148 +# define BOOST_PP_ITERATION_2 148 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 149 && BOOST_PP_ITERATION_FINISH_2 >= 149 +# define BOOST_PP_ITERATION_2 149 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 150 && BOOST_PP_ITERATION_FINISH_2 >= 150 +# define BOOST_PP_ITERATION_2 150 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 151 && BOOST_PP_ITERATION_FINISH_2 >= 151 +# define BOOST_PP_ITERATION_2 151 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 152 && BOOST_PP_ITERATION_FINISH_2 >= 152 +# define BOOST_PP_ITERATION_2 152 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 153 && BOOST_PP_ITERATION_FINISH_2 >= 153 +# define BOOST_PP_ITERATION_2 153 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 154 && BOOST_PP_ITERATION_FINISH_2 >= 154 +# define BOOST_PP_ITERATION_2 154 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 155 && BOOST_PP_ITERATION_FINISH_2 >= 155 +# define BOOST_PP_ITERATION_2 155 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 156 && BOOST_PP_ITERATION_FINISH_2 >= 156 +# define BOOST_PP_ITERATION_2 156 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 157 && BOOST_PP_ITERATION_FINISH_2 >= 157 +# define BOOST_PP_ITERATION_2 157 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 158 && BOOST_PP_ITERATION_FINISH_2 >= 158 +# define BOOST_PP_ITERATION_2 158 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 159 && BOOST_PP_ITERATION_FINISH_2 >= 159 +# define BOOST_PP_ITERATION_2 159 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 160 && BOOST_PP_ITERATION_FINISH_2 >= 160 +# define BOOST_PP_ITERATION_2 160 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 161 && BOOST_PP_ITERATION_FINISH_2 >= 161 +# define BOOST_PP_ITERATION_2 161 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 162 && BOOST_PP_ITERATION_FINISH_2 >= 162 +# define BOOST_PP_ITERATION_2 162 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 163 && BOOST_PP_ITERATION_FINISH_2 >= 163 +# define BOOST_PP_ITERATION_2 163 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 164 && BOOST_PP_ITERATION_FINISH_2 >= 164 +# define BOOST_PP_ITERATION_2 164 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 165 && BOOST_PP_ITERATION_FINISH_2 >= 165 +# define BOOST_PP_ITERATION_2 165 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 166 && BOOST_PP_ITERATION_FINISH_2 >= 166 +# define BOOST_PP_ITERATION_2 166 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 167 && BOOST_PP_ITERATION_FINISH_2 >= 167 +# define BOOST_PP_ITERATION_2 167 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 168 && BOOST_PP_ITERATION_FINISH_2 >= 168 +# define BOOST_PP_ITERATION_2 168 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 169 && BOOST_PP_ITERATION_FINISH_2 >= 169 +# define BOOST_PP_ITERATION_2 169 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 170 && BOOST_PP_ITERATION_FINISH_2 >= 170 +# define BOOST_PP_ITERATION_2 170 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 171 && BOOST_PP_ITERATION_FINISH_2 >= 171 +# define BOOST_PP_ITERATION_2 171 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 172 && BOOST_PP_ITERATION_FINISH_2 >= 172 +# define BOOST_PP_ITERATION_2 172 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 173 && BOOST_PP_ITERATION_FINISH_2 >= 173 +# define BOOST_PP_ITERATION_2 173 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 174 && BOOST_PP_ITERATION_FINISH_2 >= 174 +# define BOOST_PP_ITERATION_2 174 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 175 && BOOST_PP_ITERATION_FINISH_2 >= 175 +# define BOOST_PP_ITERATION_2 175 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 176 && BOOST_PP_ITERATION_FINISH_2 >= 176 +# define BOOST_PP_ITERATION_2 176 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 177 && BOOST_PP_ITERATION_FINISH_2 >= 177 +# define BOOST_PP_ITERATION_2 177 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 178 && BOOST_PP_ITERATION_FINISH_2 >= 178 +# define BOOST_PP_ITERATION_2 178 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 179 && BOOST_PP_ITERATION_FINISH_2 >= 179 +# define BOOST_PP_ITERATION_2 179 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 180 && BOOST_PP_ITERATION_FINISH_2 >= 180 +# define BOOST_PP_ITERATION_2 180 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 181 && BOOST_PP_ITERATION_FINISH_2 >= 181 +# define BOOST_PP_ITERATION_2 181 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 182 && BOOST_PP_ITERATION_FINISH_2 >= 182 +# define BOOST_PP_ITERATION_2 182 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 183 && BOOST_PP_ITERATION_FINISH_2 >= 183 +# define BOOST_PP_ITERATION_2 183 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 184 && BOOST_PP_ITERATION_FINISH_2 >= 184 +# define BOOST_PP_ITERATION_2 184 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 185 && BOOST_PP_ITERATION_FINISH_2 >= 185 +# define BOOST_PP_ITERATION_2 185 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 186 && BOOST_PP_ITERATION_FINISH_2 >= 186 +# define BOOST_PP_ITERATION_2 186 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 187 && BOOST_PP_ITERATION_FINISH_2 >= 187 +# define BOOST_PP_ITERATION_2 187 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 188 && BOOST_PP_ITERATION_FINISH_2 >= 188 +# define BOOST_PP_ITERATION_2 188 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 189 && BOOST_PP_ITERATION_FINISH_2 >= 189 +# define BOOST_PP_ITERATION_2 189 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 190 && BOOST_PP_ITERATION_FINISH_2 >= 190 +# define BOOST_PP_ITERATION_2 190 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 191 && BOOST_PP_ITERATION_FINISH_2 >= 191 +# define BOOST_PP_ITERATION_2 191 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 192 && BOOST_PP_ITERATION_FINISH_2 >= 192 +# define BOOST_PP_ITERATION_2 192 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 193 && BOOST_PP_ITERATION_FINISH_2 >= 193 +# define BOOST_PP_ITERATION_2 193 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 194 && BOOST_PP_ITERATION_FINISH_2 >= 194 +# define BOOST_PP_ITERATION_2 194 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 195 && BOOST_PP_ITERATION_FINISH_2 >= 195 +# define BOOST_PP_ITERATION_2 195 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 196 && BOOST_PP_ITERATION_FINISH_2 >= 196 +# define BOOST_PP_ITERATION_2 196 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 197 && BOOST_PP_ITERATION_FINISH_2 >= 197 +# define BOOST_PP_ITERATION_2 197 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 198 && BOOST_PP_ITERATION_FINISH_2 >= 198 +# define BOOST_PP_ITERATION_2 198 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 199 && BOOST_PP_ITERATION_FINISH_2 >= 199 +# define BOOST_PP_ITERATION_2 199 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 200 && BOOST_PP_ITERATION_FINISH_2 >= 200 +# define BOOST_PP_ITERATION_2 200 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 201 && BOOST_PP_ITERATION_FINISH_2 >= 201 +# define BOOST_PP_ITERATION_2 201 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 202 && BOOST_PP_ITERATION_FINISH_2 >= 202 +# define BOOST_PP_ITERATION_2 202 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 203 && BOOST_PP_ITERATION_FINISH_2 >= 203 +# define BOOST_PP_ITERATION_2 203 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 204 && BOOST_PP_ITERATION_FINISH_2 >= 204 +# define BOOST_PP_ITERATION_2 204 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 205 && BOOST_PP_ITERATION_FINISH_2 >= 205 +# define BOOST_PP_ITERATION_2 205 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 206 && BOOST_PP_ITERATION_FINISH_2 >= 206 +# define BOOST_PP_ITERATION_2 206 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 207 && BOOST_PP_ITERATION_FINISH_2 >= 207 +# define BOOST_PP_ITERATION_2 207 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 208 && BOOST_PP_ITERATION_FINISH_2 >= 208 +# define BOOST_PP_ITERATION_2 208 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 209 && BOOST_PP_ITERATION_FINISH_2 >= 209 +# define BOOST_PP_ITERATION_2 209 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 210 && BOOST_PP_ITERATION_FINISH_2 >= 210 +# define BOOST_PP_ITERATION_2 210 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 211 && BOOST_PP_ITERATION_FINISH_2 >= 211 +# define BOOST_PP_ITERATION_2 211 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 212 && BOOST_PP_ITERATION_FINISH_2 >= 212 +# define BOOST_PP_ITERATION_2 212 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 213 && BOOST_PP_ITERATION_FINISH_2 >= 213 +# define BOOST_PP_ITERATION_2 213 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 214 && BOOST_PP_ITERATION_FINISH_2 >= 214 +# define BOOST_PP_ITERATION_2 214 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 215 && BOOST_PP_ITERATION_FINISH_2 >= 215 +# define BOOST_PP_ITERATION_2 215 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 216 && BOOST_PP_ITERATION_FINISH_2 >= 216 +# define BOOST_PP_ITERATION_2 216 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 217 && BOOST_PP_ITERATION_FINISH_2 >= 217 +# define BOOST_PP_ITERATION_2 217 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 218 && BOOST_PP_ITERATION_FINISH_2 >= 218 +# define BOOST_PP_ITERATION_2 218 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 219 && BOOST_PP_ITERATION_FINISH_2 >= 219 +# define BOOST_PP_ITERATION_2 219 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 220 && BOOST_PP_ITERATION_FINISH_2 >= 220 +# define BOOST_PP_ITERATION_2 220 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 221 && BOOST_PP_ITERATION_FINISH_2 >= 221 +# define BOOST_PP_ITERATION_2 221 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 222 && BOOST_PP_ITERATION_FINISH_2 >= 222 +# define BOOST_PP_ITERATION_2 222 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 223 && BOOST_PP_ITERATION_FINISH_2 >= 223 +# define BOOST_PP_ITERATION_2 223 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 224 && BOOST_PP_ITERATION_FINISH_2 >= 224 +# define BOOST_PP_ITERATION_2 224 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 225 && BOOST_PP_ITERATION_FINISH_2 >= 225 +# define BOOST_PP_ITERATION_2 225 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 226 && BOOST_PP_ITERATION_FINISH_2 >= 226 +# define BOOST_PP_ITERATION_2 226 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 227 && BOOST_PP_ITERATION_FINISH_2 >= 227 +# define BOOST_PP_ITERATION_2 227 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 228 && BOOST_PP_ITERATION_FINISH_2 >= 228 +# define BOOST_PP_ITERATION_2 228 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 229 && BOOST_PP_ITERATION_FINISH_2 >= 229 +# define BOOST_PP_ITERATION_2 229 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 230 && BOOST_PP_ITERATION_FINISH_2 >= 230 +# define BOOST_PP_ITERATION_2 230 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 231 && BOOST_PP_ITERATION_FINISH_2 >= 231 +# define BOOST_PP_ITERATION_2 231 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 232 && BOOST_PP_ITERATION_FINISH_2 >= 232 +# define BOOST_PP_ITERATION_2 232 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 233 && BOOST_PP_ITERATION_FINISH_2 >= 233 +# define BOOST_PP_ITERATION_2 233 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 234 && BOOST_PP_ITERATION_FINISH_2 >= 234 +# define BOOST_PP_ITERATION_2 234 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 235 && BOOST_PP_ITERATION_FINISH_2 >= 235 +# define BOOST_PP_ITERATION_2 235 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 236 && BOOST_PP_ITERATION_FINISH_2 >= 236 +# define BOOST_PP_ITERATION_2 236 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 237 && BOOST_PP_ITERATION_FINISH_2 >= 237 +# define BOOST_PP_ITERATION_2 237 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 238 && BOOST_PP_ITERATION_FINISH_2 >= 238 +# define BOOST_PP_ITERATION_2 238 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 239 && BOOST_PP_ITERATION_FINISH_2 >= 239 +# define BOOST_PP_ITERATION_2 239 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 240 && BOOST_PP_ITERATION_FINISH_2 >= 240 +# define BOOST_PP_ITERATION_2 240 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 241 && BOOST_PP_ITERATION_FINISH_2 >= 241 +# define BOOST_PP_ITERATION_2 241 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 242 && BOOST_PP_ITERATION_FINISH_2 >= 242 +# define BOOST_PP_ITERATION_2 242 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 243 && BOOST_PP_ITERATION_FINISH_2 >= 243 +# define BOOST_PP_ITERATION_2 243 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 244 && BOOST_PP_ITERATION_FINISH_2 >= 244 +# define BOOST_PP_ITERATION_2 244 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 245 && BOOST_PP_ITERATION_FINISH_2 >= 245 +# define BOOST_PP_ITERATION_2 245 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 246 && BOOST_PP_ITERATION_FINISH_2 >= 246 +# define BOOST_PP_ITERATION_2 246 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 247 && BOOST_PP_ITERATION_FINISH_2 >= 247 +# define BOOST_PP_ITERATION_2 247 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 248 && BOOST_PP_ITERATION_FINISH_2 >= 248 +# define BOOST_PP_ITERATION_2 248 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 249 && BOOST_PP_ITERATION_FINISH_2 >= 249 +# define BOOST_PP_ITERATION_2 249 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 250 && BOOST_PP_ITERATION_FINISH_2 >= 250 +# define BOOST_PP_ITERATION_2 250 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 251 && BOOST_PP_ITERATION_FINISH_2 >= 251 +# define BOOST_PP_ITERATION_2 251 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 252 && BOOST_PP_ITERATION_FINISH_2 >= 252 +# define BOOST_PP_ITERATION_2 252 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 253 && BOOST_PP_ITERATION_FINISH_2 >= 253 +# define BOOST_PP_ITERATION_2 253 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 254 && BOOST_PP_ITERATION_FINISH_2 >= 254 +# define BOOST_PP_ITERATION_2 254 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 255 && BOOST_PP_ITERATION_FINISH_2 >= 255 +# define BOOST_PP_ITERATION_2 255 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_START_2 <= 256 && BOOST_PP_ITERATION_FINISH_2 >= 256 +# define BOOST_PP_ITERATION_2 256 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# endif +# +# undef BOOST_PP_ITERATION_DEPTH +# define BOOST_PP_ITERATION_DEPTH() 1 +# +# undef BOOST_PP_ITERATION_START_2 +# undef BOOST_PP_ITERATION_FINISH_2 +# undef BOOST_PP_FILENAME_2 +# +# undef BOOST_PP_ITERATION_FLAGS_2 +# undef BOOST_PP_ITERATION_PARAMS_2 diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/forward3.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/forward3.hpp new file mode 100644 index 0000000000..e68966f757 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/forward3.hpp @@ -0,0 +1,1338 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# if defined(BOOST_PP_ITERATION_LIMITS) +# if !defined(BOOST_PP_FILENAME_3) +# error BOOST_PP_ERROR: depth #3 filename is not defined +# endif +# define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_ITERATION_LIMITS) +# include +# define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_ITERATION_LIMITS) +# include +# define BOOST_PP_ITERATION_FLAGS_3() 0 +# undef BOOST_PP_ITERATION_LIMITS +# elif defined(BOOST_PP_ITERATION_PARAMS_3) +# define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ITERATION_PARAMS_3) +# include +# define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(1, BOOST_PP_ITERATION_PARAMS_3) +# include +# define BOOST_PP_FILENAME_3 BOOST_PP_ARRAY_ELEM(2, BOOST_PP_ITERATION_PARAMS_3) +# if BOOST_PP_ARRAY_SIZE(BOOST_PP_ITERATION_PARAMS_3) >= 4 +# define BOOST_PP_ITERATION_FLAGS_3() BOOST_PP_ARRAY_ELEM(3, BOOST_PP_ITERATION_PARAMS_3) +# else +# define BOOST_PP_ITERATION_FLAGS_3() 0 +# endif +# else +# error BOOST_PP_ERROR: depth #3 iteration boundaries or filename not defined +# endif +# +# undef BOOST_PP_ITERATION_DEPTH +# define BOOST_PP_ITERATION_DEPTH() 3 +# +# if (BOOST_PP_ITERATION_START_3) > (BOOST_PP_ITERATION_FINISH_3) +# include +# else +# if BOOST_PP_ITERATION_START_3 <= 0 && BOOST_PP_ITERATION_FINISH_3 >= 0 +# define BOOST_PP_ITERATION_3 0 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 1 && BOOST_PP_ITERATION_FINISH_3 >= 1 +# define BOOST_PP_ITERATION_3 1 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 2 && BOOST_PP_ITERATION_FINISH_3 >= 2 +# define BOOST_PP_ITERATION_3 2 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 3 && BOOST_PP_ITERATION_FINISH_3 >= 3 +# define BOOST_PP_ITERATION_3 3 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 4 && BOOST_PP_ITERATION_FINISH_3 >= 4 +# define BOOST_PP_ITERATION_3 4 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 5 && BOOST_PP_ITERATION_FINISH_3 >= 5 +# define BOOST_PP_ITERATION_3 5 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 6 && BOOST_PP_ITERATION_FINISH_3 >= 6 +# define BOOST_PP_ITERATION_3 6 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 7 && BOOST_PP_ITERATION_FINISH_3 >= 7 +# define BOOST_PP_ITERATION_3 7 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 8 && BOOST_PP_ITERATION_FINISH_3 >= 8 +# define BOOST_PP_ITERATION_3 8 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 9 && BOOST_PP_ITERATION_FINISH_3 >= 9 +# define BOOST_PP_ITERATION_3 9 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 10 && BOOST_PP_ITERATION_FINISH_3 >= 10 +# define BOOST_PP_ITERATION_3 10 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 11 && BOOST_PP_ITERATION_FINISH_3 >= 11 +# define BOOST_PP_ITERATION_3 11 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 12 && BOOST_PP_ITERATION_FINISH_3 >= 12 +# define BOOST_PP_ITERATION_3 12 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 13 && BOOST_PP_ITERATION_FINISH_3 >= 13 +# define BOOST_PP_ITERATION_3 13 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 14 && BOOST_PP_ITERATION_FINISH_3 >= 14 +# define BOOST_PP_ITERATION_3 14 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 15 && BOOST_PP_ITERATION_FINISH_3 >= 15 +# define BOOST_PP_ITERATION_3 15 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 16 && BOOST_PP_ITERATION_FINISH_3 >= 16 +# define BOOST_PP_ITERATION_3 16 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 17 && BOOST_PP_ITERATION_FINISH_3 >= 17 +# define BOOST_PP_ITERATION_3 17 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 18 && BOOST_PP_ITERATION_FINISH_3 >= 18 +# define BOOST_PP_ITERATION_3 18 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 19 && BOOST_PP_ITERATION_FINISH_3 >= 19 +# define BOOST_PP_ITERATION_3 19 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 20 && BOOST_PP_ITERATION_FINISH_3 >= 20 +# define BOOST_PP_ITERATION_3 20 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 21 && BOOST_PP_ITERATION_FINISH_3 >= 21 +# define BOOST_PP_ITERATION_3 21 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 22 && BOOST_PP_ITERATION_FINISH_3 >= 22 +# define BOOST_PP_ITERATION_3 22 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 23 && BOOST_PP_ITERATION_FINISH_3 >= 23 +# define BOOST_PP_ITERATION_3 23 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 24 && BOOST_PP_ITERATION_FINISH_3 >= 24 +# define BOOST_PP_ITERATION_3 24 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 25 && BOOST_PP_ITERATION_FINISH_3 >= 25 +# define BOOST_PP_ITERATION_3 25 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 26 && BOOST_PP_ITERATION_FINISH_3 >= 26 +# define BOOST_PP_ITERATION_3 26 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 27 && BOOST_PP_ITERATION_FINISH_3 >= 27 +# define BOOST_PP_ITERATION_3 27 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 28 && BOOST_PP_ITERATION_FINISH_3 >= 28 +# define BOOST_PP_ITERATION_3 28 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 29 && BOOST_PP_ITERATION_FINISH_3 >= 29 +# define BOOST_PP_ITERATION_3 29 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 30 && BOOST_PP_ITERATION_FINISH_3 >= 30 +# define BOOST_PP_ITERATION_3 30 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 31 && BOOST_PP_ITERATION_FINISH_3 >= 31 +# define BOOST_PP_ITERATION_3 31 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 32 && BOOST_PP_ITERATION_FINISH_3 >= 32 +# define BOOST_PP_ITERATION_3 32 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 33 && BOOST_PP_ITERATION_FINISH_3 >= 33 +# define BOOST_PP_ITERATION_3 33 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 34 && BOOST_PP_ITERATION_FINISH_3 >= 34 +# define BOOST_PP_ITERATION_3 34 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 35 && BOOST_PP_ITERATION_FINISH_3 >= 35 +# define BOOST_PP_ITERATION_3 35 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 36 && BOOST_PP_ITERATION_FINISH_3 >= 36 +# define BOOST_PP_ITERATION_3 36 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 37 && BOOST_PP_ITERATION_FINISH_3 >= 37 +# define BOOST_PP_ITERATION_3 37 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 38 && BOOST_PP_ITERATION_FINISH_3 >= 38 +# define BOOST_PP_ITERATION_3 38 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 39 && BOOST_PP_ITERATION_FINISH_3 >= 39 +# define BOOST_PP_ITERATION_3 39 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 40 && BOOST_PP_ITERATION_FINISH_3 >= 40 +# define BOOST_PP_ITERATION_3 40 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 41 && BOOST_PP_ITERATION_FINISH_3 >= 41 +# define BOOST_PP_ITERATION_3 41 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 42 && BOOST_PP_ITERATION_FINISH_3 >= 42 +# define BOOST_PP_ITERATION_3 42 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 43 && BOOST_PP_ITERATION_FINISH_3 >= 43 +# define BOOST_PP_ITERATION_3 43 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 44 && BOOST_PP_ITERATION_FINISH_3 >= 44 +# define BOOST_PP_ITERATION_3 44 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 45 && BOOST_PP_ITERATION_FINISH_3 >= 45 +# define BOOST_PP_ITERATION_3 45 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 46 && BOOST_PP_ITERATION_FINISH_3 >= 46 +# define BOOST_PP_ITERATION_3 46 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 47 && BOOST_PP_ITERATION_FINISH_3 >= 47 +# define BOOST_PP_ITERATION_3 47 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 48 && BOOST_PP_ITERATION_FINISH_3 >= 48 +# define BOOST_PP_ITERATION_3 48 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 49 && BOOST_PP_ITERATION_FINISH_3 >= 49 +# define BOOST_PP_ITERATION_3 49 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 50 && BOOST_PP_ITERATION_FINISH_3 >= 50 +# define BOOST_PP_ITERATION_3 50 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 51 && BOOST_PP_ITERATION_FINISH_3 >= 51 +# define BOOST_PP_ITERATION_3 51 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 52 && BOOST_PP_ITERATION_FINISH_3 >= 52 +# define BOOST_PP_ITERATION_3 52 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 53 && BOOST_PP_ITERATION_FINISH_3 >= 53 +# define BOOST_PP_ITERATION_3 53 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 54 && BOOST_PP_ITERATION_FINISH_3 >= 54 +# define BOOST_PP_ITERATION_3 54 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 55 && BOOST_PP_ITERATION_FINISH_3 >= 55 +# define BOOST_PP_ITERATION_3 55 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 56 && BOOST_PP_ITERATION_FINISH_3 >= 56 +# define BOOST_PP_ITERATION_3 56 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 57 && BOOST_PP_ITERATION_FINISH_3 >= 57 +# define BOOST_PP_ITERATION_3 57 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 58 && BOOST_PP_ITERATION_FINISH_3 >= 58 +# define BOOST_PP_ITERATION_3 58 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 59 && BOOST_PP_ITERATION_FINISH_3 >= 59 +# define BOOST_PP_ITERATION_3 59 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 60 && BOOST_PP_ITERATION_FINISH_3 >= 60 +# define BOOST_PP_ITERATION_3 60 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 61 && BOOST_PP_ITERATION_FINISH_3 >= 61 +# define BOOST_PP_ITERATION_3 61 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 62 && BOOST_PP_ITERATION_FINISH_3 >= 62 +# define BOOST_PP_ITERATION_3 62 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 63 && BOOST_PP_ITERATION_FINISH_3 >= 63 +# define BOOST_PP_ITERATION_3 63 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 64 && BOOST_PP_ITERATION_FINISH_3 >= 64 +# define BOOST_PP_ITERATION_3 64 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 65 && BOOST_PP_ITERATION_FINISH_3 >= 65 +# define BOOST_PP_ITERATION_3 65 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 66 && BOOST_PP_ITERATION_FINISH_3 >= 66 +# define BOOST_PP_ITERATION_3 66 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 67 && BOOST_PP_ITERATION_FINISH_3 >= 67 +# define BOOST_PP_ITERATION_3 67 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 68 && BOOST_PP_ITERATION_FINISH_3 >= 68 +# define BOOST_PP_ITERATION_3 68 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 69 && BOOST_PP_ITERATION_FINISH_3 >= 69 +# define BOOST_PP_ITERATION_3 69 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 70 && BOOST_PP_ITERATION_FINISH_3 >= 70 +# define BOOST_PP_ITERATION_3 70 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 71 && BOOST_PP_ITERATION_FINISH_3 >= 71 +# define BOOST_PP_ITERATION_3 71 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 72 && BOOST_PP_ITERATION_FINISH_3 >= 72 +# define BOOST_PP_ITERATION_3 72 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 73 && BOOST_PP_ITERATION_FINISH_3 >= 73 +# define BOOST_PP_ITERATION_3 73 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 74 && BOOST_PP_ITERATION_FINISH_3 >= 74 +# define BOOST_PP_ITERATION_3 74 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 75 && BOOST_PP_ITERATION_FINISH_3 >= 75 +# define BOOST_PP_ITERATION_3 75 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 76 && BOOST_PP_ITERATION_FINISH_3 >= 76 +# define BOOST_PP_ITERATION_3 76 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 77 && BOOST_PP_ITERATION_FINISH_3 >= 77 +# define BOOST_PP_ITERATION_3 77 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 78 && BOOST_PP_ITERATION_FINISH_3 >= 78 +# define BOOST_PP_ITERATION_3 78 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 79 && BOOST_PP_ITERATION_FINISH_3 >= 79 +# define BOOST_PP_ITERATION_3 79 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 80 && BOOST_PP_ITERATION_FINISH_3 >= 80 +# define BOOST_PP_ITERATION_3 80 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 81 && BOOST_PP_ITERATION_FINISH_3 >= 81 +# define BOOST_PP_ITERATION_3 81 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 82 && BOOST_PP_ITERATION_FINISH_3 >= 82 +# define BOOST_PP_ITERATION_3 82 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 83 && BOOST_PP_ITERATION_FINISH_3 >= 83 +# define BOOST_PP_ITERATION_3 83 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 84 && BOOST_PP_ITERATION_FINISH_3 >= 84 +# define BOOST_PP_ITERATION_3 84 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 85 && BOOST_PP_ITERATION_FINISH_3 >= 85 +# define BOOST_PP_ITERATION_3 85 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 86 && BOOST_PP_ITERATION_FINISH_3 >= 86 +# define BOOST_PP_ITERATION_3 86 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 87 && BOOST_PP_ITERATION_FINISH_3 >= 87 +# define BOOST_PP_ITERATION_3 87 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 88 && BOOST_PP_ITERATION_FINISH_3 >= 88 +# define BOOST_PP_ITERATION_3 88 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 89 && BOOST_PP_ITERATION_FINISH_3 >= 89 +# define BOOST_PP_ITERATION_3 89 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 90 && BOOST_PP_ITERATION_FINISH_3 >= 90 +# define BOOST_PP_ITERATION_3 90 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 91 && BOOST_PP_ITERATION_FINISH_3 >= 91 +# define BOOST_PP_ITERATION_3 91 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 92 && BOOST_PP_ITERATION_FINISH_3 >= 92 +# define BOOST_PP_ITERATION_3 92 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 93 && BOOST_PP_ITERATION_FINISH_3 >= 93 +# define BOOST_PP_ITERATION_3 93 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 94 && BOOST_PP_ITERATION_FINISH_3 >= 94 +# define BOOST_PP_ITERATION_3 94 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 95 && BOOST_PP_ITERATION_FINISH_3 >= 95 +# define BOOST_PP_ITERATION_3 95 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 96 && BOOST_PP_ITERATION_FINISH_3 >= 96 +# define BOOST_PP_ITERATION_3 96 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 97 && BOOST_PP_ITERATION_FINISH_3 >= 97 +# define BOOST_PP_ITERATION_3 97 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 98 && BOOST_PP_ITERATION_FINISH_3 >= 98 +# define BOOST_PP_ITERATION_3 98 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 99 && BOOST_PP_ITERATION_FINISH_3 >= 99 +# define BOOST_PP_ITERATION_3 99 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 100 && BOOST_PP_ITERATION_FINISH_3 >= 100 +# define BOOST_PP_ITERATION_3 100 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 101 && BOOST_PP_ITERATION_FINISH_3 >= 101 +# define BOOST_PP_ITERATION_3 101 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 102 && BOOST_PP_ITERATION_FINISH_3 >= 102 +# define BOOST_PP_ITERATION_3 102 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 103 && BOOST_PP_ITERATION_FINISH_3 >= 103 +# define BOOST_PP_ITERATION_3 103 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 104 && BOOST_PP_ITERATION_FINISH_3 >= 104 +# define BOOST_PP_ITERATION_3 104 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 105 && BOOST_PP_ITERATION_FINISH_3 >= 105 +# define BOOST_PP_ITERATION_3 105 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 106 && BOOST_PP_ITERATION_FINISH_3 >= 106 +# define BOOST_PP_ITERATION_3 106 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 107 && BOOST_PP_ITERATION_FINISH_3 >= 107 +# define BOOST_PP_ITERATION_3 107 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 108 && BOOST_PP_ITERATION_FINISH_3 >= 108 +# define BOOST_PP_ITERATION_3 108 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 109 && BOOST_PP_ITERATION_FINISH_3 >= 109 +# define BOOST_PP_ITERATION_3 109 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 110 && BOOST_PP_ITERATION_FINISH_3 >= 110 +# define BOOST_PP_ITERATION_3 110 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 111 && BOOST_PP_ITERATION_FINISH_3 >= 111 +# define BOOST_PP_ITERATION_3 111 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 112 && BOOST_PP_ITERATION_FINISH_3 >= 112 +# define BOOST_PP_ITERATION_3 112 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 113 && BOOST_PP_ITERATION_FINISH_3 >= 113 +# define BOOST_PP_ITERATION_3 113 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 114 && BOOST_PP_ITERATION_FINISH_3 >= 114 +# define BOOST_PP_ITERATION_3 114 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 115 && BOOST_PP_ITERATION_FINISH_3 >= 115 +# define BOOST_PP_ITERATION_3 115 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 116 && BOOST_PP_ITERATION_FINISH_3 >= 116 +# define BOOST_PP_ITERATION_3 116 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 117 && BOOST_PP_ITERATION_FINISH_3 >= 117 +# define BOOST_PP_ITERATION_3 117 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 118 && BOOST_PP_ITERATION_FINISH_3 >= 118 +# define BOOST_PP_ITERATION_3 118 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 119 && BOOST_PP_ITERATION_FINISH_3 >= 119 +# define BOOST_PP_ITERATION_3 119 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 120 && BOOST_PP_ITERATION_FINISH_3 >= 120 +# define BOOST_PP_ITERATION_3 120 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 121 && BOOST_PP_ITERATION_FINISH_3 >= 121 +# define BOOST_PP_ITERATION_3 121 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 122 && BOOST_PP_ITERATION_FINISH_3 >= 122 +# define BOOST_PP_ITERATION_3 122 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 123 && BOOST_PP_ITERATION_FINISH_3 >= 123 +# define BOOST_PP_ITERATION_3 123 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 124 && BOOST_PP_ITERATION_FINISH_3 >= 124 +# define BOOST_PP_ITERATION_3 124 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 125 && BOOST_PP_ITERATION_FINISH_3 >= 125 +# define BOOST_PP_ITERATION_3 125 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 126 && BOOST_PP_ITERATION_FINISH_3 >= 126 +# define BOOST_PP_ITERATION_3 126 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 127 && BOOST_PP_ITERATION_FINISH_3 >= 127 +# define BOOST_PP_ITERATION_3 127 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 128 && BOOST_PP_ITERATION_FINISH_3 >= 128 +# define BOOST_PP_ITERATION_3 128 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 129 && BOOST_PP_ITERATION_FINISH_3 >= 129 +# define BOOST_PP_ITERATION_3 129 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 130 && BOOST_PP_ITERATION_FINISH_3 >= 130 +# define BOOST_PP_ITERATION_3 130 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 131 && BOOST_PP_ITERATION_FINISH_3 >= 131 +# define BOOST_PP_ITERATION_3 131 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 132 && BOOST_PP_ITERATION_FINISH_3 >= 132 +# define BOOST_PP_ITERATION_3 132 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 133 && BOOST_PP_ITERATION_FINISH_3 >= 133 +# define BOOST_PP_ITERATION_3 133 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 134 && BOOST_PP_ITERATION_FINISH_3 >= 134 +# define BOOST_PP_ITERATION_3 134 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 135 && BOOST_PP_ITERATION_FINISH_3 >= 135 +# define BOOST_PP_ITERATION_3 135 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 136 && BOOST_PP_ITERATION_FINISH_3 >= 136 +# define BOOST_PP_ITERATION_3 136 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 137 && BOOST_PP_ITERATION_FINISH_3 >= 137 +# define BOOST_PP_ITERATION_3 137 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 138 && BOOST_PP_ITERATION_FINISH_3 >= 138 +# define BOOST_PP_ITERATION_3 138 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 139 && BOOST_PP_ITERATION_FINISH_3 >= 139 +# define BOOST_PP_ITERATION_3 139 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 140 && BOOST_PP_ITERATION_FINISH_3 >= 140 +# define BOOST_PP_ITERATION_3 140 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 141 && BOOST_PP_ITERATION_FINISH_3 >= 141 +# define BOOST_PP_ITERATION_3 141 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 142 && BOOST_PP_ITERATION_FINISH_3 >= 142 +# define BOOST_PP_ITERATION_3 142 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 143 && BOOST_PP_ITERATION_FINISH_3 >= 143 +# define BOOST_PP_ITERATION_3 143 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 144 && BOOST_PP_ITERATION_FINISH_3 >= 144 +# define BOOST_PP_ITERATION_3 144 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 145 && BOOST_PP_ITERATION_FINISH_3 >= 145 +# define BOOST_PP_ITERATION_3 145 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 146 && BOOST_PP_ITERATION_FINISH_3 >= 146 +# define BOOST_PP_ITERATION_3 146 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 147 && BOOST_PP_ITERATION_FINISH_3 >= 147 +# define BOOST_PP_ITERATION_3 147 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 148 && BOOST_PP_ITERATION_FINISH_3 >= 148 +# define BOOST_PP_ITERATION_3 148 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 149 && BOOST_PP_ITERATION_FINISH_3 >= 149 +# define BOOST_PP_ITERATION_3 149 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 150 && BOOST_PP_ITERATION_FINISH_3 >= 150 +# define BOOST_PP_ITERATION_3 150 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 151 && BOOST_PP_ITERATION_FINISH_3 >= 151 +# define BOOST_PP_ITERATION_3 151 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 152 && BOOST_PP_ITERATION_FINISH_3 >= 152 +# define BOOST_PP_ITERATION_3 152 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 153 && BOOST_PP_ITERATION_FINISH_3 >= 153 +# define BOOST_PP_ITERATION_3 153 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 154 && BOOST_PP_ITERATION_FINISH_3 >= 154 +# define BOOST_PP_ITERATION_3 154 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 155 && BOOST_PP_ITERATION_FINISH_3 >= 155 +# define BOOST_PP_ITERATION_3 155 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 156 && BOOST_PP_ITERATION_FINISH_3 >= 156 +# define BOOST_PP_ITERATION_3 156 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 157 && BOOST_PP_ITERATION_FINISH_3 >= 157 +# define BOOST_PP_ITERATION_3 157 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 158 && BOOST_PP_ITERATION_FINISH_3 >= 158 +# define BOOST_PP_ITERATION_3 158 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 159 && BOOST_PP_ITERATION_FINISH_3 >= 159 +# define BOOST_PP_ITERATION_3 159 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 160 && BOOST_PP_ITERATION_FINISH_3 >= 160 +# define BOOST_PP_ITERATION_3 160 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 161 && BOOST_PP_ITERATION_FINISH_3 >= 161 +# define BOOST_PP_ITERATION_3 161 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 162 && BOOST_PP_ITERATION_FINISH_3 >= 162 +# define BOOST_PP_ITERATION_3 162 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 163 && BOOST_PP_ITERATION_FINISH_3 >= 163 +# define BOOST_PP_ITERATION_3 163 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 164 && BOOST_PP_ITERATION_FINISH_3 >= 164 +# define BOOST_PP_ITERATION_3 164 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 165 && BOOST_PP_ITERATION_FINISH_3 >= 165 +# define BOOST_PP_ITERATION_3 165 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 166 && BOOST_PP_ITERATION_FINISH_3 >= 166 +# define BOOST_PP_ITERATION_3 166 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 167 && BOOST_PP_ITERATION_FINISH_3 >= 167 +# define BOOST_PP_ITERATION_3 167 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 168 && BOOST_PP_ITERATION_FINISH_3 >= 168 +# define BOOST_PP_ITERATION_3 168 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 169 && BOOST_PP_ITERATION_FINISH_3 >= 169 +# define BOOST_PP_ITERATION_3 169 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 170 && BOOST_PP_ITERATION_FINISH_3 >= 170 +# define BOOST_PP_ITERATION_3 170 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 171 && BOOST_PP_ITERATION_FINISH_3 >= 171 +# define BOOST_PP_ITERATION_3 171 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 172 && BOOST_PP_ITERATION_FINISH_3 >= 172 +# define BOOST_PP_ITERATION_3 172 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 173 && BOOST_PP_ITERATION_FINISH_3 >= 173 +# define BOOST_PP_ITERATION_3 173 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 174 && BOOST_PP_ITERATION_FINISH_3 >= 174 +# define BOOST_PP_ITERATION_3 174 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 175 && BOOST_PP_ITERATION_FINISH_3 >= 175 +# define BOOST_PP_ITERATION_3 175 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 176 && BOOST_PP_ITERATION_FINISH_3 >= 176 +# define BOOST_PP_ITERATION_3 176 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 177 && BOOST_PP_ITERATION_FINISH_3 >= 177 +# define BOOST_PP_ITERATION_3 177 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 178 && BOOST_PP_ITERATION_FINISH_3 >= 178 +# define BOOST_PP_ITERATION_3 178 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 179 && BOOST_PP_ITERATION_FINISH_3 >= 179 +# define BOOST_PP_ITERATION_3 179 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 180 && BOOST_PP_ITERATION_FINISH_3 >= 180 +# define BOOST_PP_ITERATION_3 180 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 181 && BOOST_PP_ITERATION_FINISH_3 >= 181 +# define BOOST_PP_ITERATION_3 181 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 182 && BOOST_PP_ITERATION_FINISH_3 >= 182 +# define BOOST_PP_ITERATION_3 182 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 183 && BOOST_PP_ITERATION_FINISH_3 >= 183 +# define BOOST_PP_ITERATION_3 183 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 184 && BOOST_PP_ITERATION_FINISH_3 >= 184 +# define BOOST_PP_ITERATION_3 184 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 185 && BOOST_PP_ITERATION_FINISH_3 >= 185 +# define BOOST_PP_ITERATION_3 185 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 186 && BOOST_PP_ITERATION_FINISH_3 >= 186 +# define BOOST_PP_ITERATION_3 186 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 187 && BOOST_PP_ITERATION_FINISH_3 >= 187 +# define BOOST_PP_ITERATION_3 187 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 188 && BOOST_PP_ITERATION_FINISH_3 >= 188 +# define BOOST_PP_ITERATION_3 188 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 189 && BOOST_PP_ITERATION_FINISH_3 >= 189 +# define BOOST_PP_ITERATION_3 189 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 190 && BOOST_PP_ITERATION_FINISH_3 >= 190 +# define BOOST_PP_ITERATION_3 190 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 191 && BOOST_PP_ITERATION_FINISH_3 >= 191 +# define BOOST_PP_ITERATION_3 191 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 192 && BOOST_PP_ITERATION_FINISH_3 >= 192 +# define BOOST_PP_ITERATION_3 192 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 193 && BOOST_PP_ITERATION_FINISH_3 >= 193 +# define BOOST_PP_ITERATION_3 193 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 194 && BOOST_PP_ITERATION_FINISH_3 >= 194 +# define BOOST_PP_ITERATION_3 194 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 195 && BOOST_PP_ITERATION_FINISH_3 >= 195 +# define BOOST_PP_ITERATION_3 195 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 196 && BOOST_PP_ITERATION_FINISH_3 >= 196 +# define BOOST_PP_ITERATION_3 196 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 197 && BOOST_PP_ITERATION_FINISH_3 >= 197 +# define BOOST_PP_ITERATION_3 197 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 198 && BOOST_PP_ITERATION_FINISH_3 >= 198 +# define BOOST_PP_ITERATION_3 198 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 199 && BOOST_PP_ITERATION_FINISH_3 >= 199 +# define BOOST_PP_ITERATION_3 199 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 200 && BOOST_PP_ITERATION_FINISH_3 >= 200 +# define BOOST_PP_ITERATION_3 200 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 201 && BOOST_PP_ITERATION_FINISH_3 >= 201 +# define BOOST_PP_ITERATION_3 201 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 202 && BOOST_PP_ITERATION_FINISH_3 >= 202 +# define BOOST_PP_ITERATION_3 202 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 203 && BOOST_PP_ITERATION_FINISH_3 >= 203 +# define BOOST_PP_ITERATION_3 203 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 204 && BOOST_PP_ITERATION_FINISH_3 >= 204 +# define BOOST_PP_ITERATION_3 204 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 205 && BOOST_PP_ITERATION_FINISH_3 >= 205 +# define BOOST_PP_ITERATION_3 205 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 206 && BOOST_PP_ITERATION_FINISH_3 >= 206 +# define BOOST_PP_ITERATION_3 206 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 207 && BOOST_PP_ITERATION_FINISH_3 >= 207 +# define BOOST_PP_ITERATION_3 207 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 208 && BOOST_PP_ITERATION_FINISH_3 >= 208 +# define BOOST_PP_ITERATION_3 208 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 209 && BOOST_PP_ITERATION_FINISH_3 >= 209 +# define BOOST_PP_ITERATION_3 209 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 210 && BOOST_PP_ITERATION_FINISH_3 >= 210 +# define BOOST_PP_ITERATION_3 210 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 211 && BOOST_PP_ITERATION_FINISH_3 >= 211 +# define BOOST_PP_ITERATION_3 211 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 212 && BOOST_PP_ITERATION_FINISH_3 >= 212 +# define BOOST_PP_ITERATION_3 212 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 213 && BOOST_PP_ITERATION_FINISH_3 >= 213 +# define BOOST_PP_ITERATION_3 213 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 214 && BOOST_PP_ITERATION_FINISH_3 >= 214 +# define BOOST_PP_ITERATION_3 214 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 215 && BOOST_PP_ITERATION_FINISH_3 >= 215 +# define BOOST_PP_ITERATION_3 215 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 216 && BOOST_PP_ITERATION_FINISH_3 >= 216 +# define BOOST_PP_ITERATION_3 216 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 217 && BOOST_PP_ITERATION_FINISH_3 >= 217 +# define BOOST_PP_ITERATION_3 217 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 218 && BOOST_PP_ITERATION_FINISH_3 >= 218 +# define BOOST_PP_ITERATION_3 218 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 219 && BOOST_PP_ITERATION_FINISH_3 >= 219 +# define BOOST_PP_ITERATION_3 219 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 220 && BOOST_PP_ITERATION_FINISH_3 >= 220 +# define BOOST_PP_ITERATION_3 220 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 221 && BOOST_PP_ITERATION_FINISH_3 >= 221 +# define BOOST_PP_ITERATION_3 221 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 222 && BOOST_PP_ITERATION_FINISH_3 >= 222 +# define BOOST_PP_ITERATION_3 222 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 223 && BOOST_PP_ITERATION_FINISH_3 >= 223 +# define BOOST_PP_ITERATION_3 223 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 224 && BOOST_PP_ITERATION_FINISH_3 >= 224 +# define BOOST_PP_ITERATION_3 224 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 225 && BOOST_PP_ITERATION_FINISH_3 >= 225 +# define BOOST_PP_ITERATION_3 225 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 226 && BOOST_PP_ITERATION_FINISH_3 >= 226 +# define BOOST_PP_ITERATION_3 226 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 227 && BOOST_PP_ITERATION_FINISH_3 >= 227 +# define BOOST_PP_ITERATION_3 227 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 228 && BOOST_PP_ITERATION_FINISH_3 >= 228 +# define BOOST_PP_ITERATION_3 228 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 229 && BOOST_PP_ITERATION_FINISH_3 >= 229 +# define BOOST_PP_ITERATION_3 229 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 230 && BOOST_PP_ITERATION_FINISH_3 >= 230 +# define BOOST_PP_ITERATION_3 230 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 231 && BOOST_PP_ITERATION_FINISH_3 >= 231 +# define BOOST_PP_ITERATION_3 231 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 232 && BOOST_PP_ITERATION_FINISH_3 >= 232 +# define BOOST_PP_ITERATION_3 232 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 233 && BOOST_PP_ITERATION_FINISH_3 >= 233 +# define BOOST_PP_ITERATION_3 233 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 234 && BOOST_PP_ITERATION_FINISH_3 >= 234 +# define BOOST_PP_ITERATION_3 234 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 235 && BOOST_PP_ITERATION_FINISH_3 >= 235 +# define BOOST_PP_ITERATION_3 235 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 236 && BOOST_PP_ITERATION_FINISH_3 >= 236 +# define BOOST_PP_ITERATION_3 236 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 237 && BOOST_PP_ITERATION_FINISH_3 >= 237 +# define BOOST_PP_ITERATION_3 237 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 238 && BOOST_PP_ITERATION_FINISH_3 >= 238 +# define BOOST_PP_ITERATION_3 238 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 239 && BOOST_PP_ITERATION_FINISH_3 >= 239 +# define BOOST_PP_ITERATION_3 239 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 240 && BOOST_PP_ITERATION_FINISH_3 >= 240 +# define BOOST_PP_ITERATION_3 240 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 241 && BOOST_PP_ITERATION_FINISH_3 >= 241 +# define BOOST_PP_ITERATION_3 241 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 242 && BOOST_PP_ITERATION_FINISH_3 >= 242 +# define BOOST_PP_ITERATION_3 242 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 243 && BOOST_PP_ITERATION_FINISH_3 >= 243 +# define BOOST_PP_ITERATION_3 243 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 244 && BOOST_PP_ITERATION_FINISH_3 >= 244 +# define BOOST_PP_ITERATION_3 244 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 245 && BOOST_PP_ITERATION_FINISH_3 >= 245 +# define BOOST_PP_ITERATION_3 245 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 246 && BOOST_PP_ITERATION_FINISH_3 >= 246 +# define BOOST_PP_ITERATION_3 246 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 247 && BOOST_PP_ITERATION_FINISH_3 >= 247 +# define BOOST_PP_ITERATION_3 247 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 248 && BOOST_PP_ITERATION_FINISH_3 >= 248 +# define BOOST_PP_ITERATION_3 248 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 249 && BOOST_PP_ITERATION_FINISH_3 >= 249 +# define BOOST_PP_ITERATION_3 249 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 250 && BOOST_PP_ITERATION_FINISH_3 >= 250 +# define BOOST_PP_ITERATION_3 250 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 251 && BOOST_PP_ITERATION_FINISH_3 >= 251 +# define BOOST_PP_ITERATION_3 251 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 252 && BOOST_PP_ITERATION_FINISH_3 >= 252 +# define BOOST_PP_ITERATION_3 252 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 253 && BOOST_PP_ITERATION_FINISH_3 >= 253 +# define BOOST_PP_ITERATION_3 253 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 254 && BOOST_PP_ITERATION_FINISH_3 >= 254 +# define BOOST_PP_ITERATION_3 254 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 255 && BOOST_PP_ITERATION_FINISH_3 >= 255 +# define BOOST_PP_ITERATION_3 255 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_START_3 <= 256 && BOOST_PP_ITERATION_FINISH_3 >= 256 +# define BOOST_PP_ITERATION_3 256 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# endif +# +# undef BOOST_PP_ITERATION_DEPTH +# define BOOST_PP_ITERATION_DEPTH() 2 +# +# undef BOOST_PP_ITERATION_START_3 +# undef BOOST_PP_ITERATION_FINISH_3 +# undef BOOST_PP_FILENAME_3 +# +# undef BOOST_PP_ITERATION_FLAGS_3 +# undef BOOST_PP_ITERATION_PARAMS_3 diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/forward4.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/forward4.hpp new file mode 100644 index 0000000000..1b4f58874c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/forward4.hpp @@ -0,0 +1,1338 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# if defined(BOOST_PP_ITERATION_LIMITS) +# if !defined(BOOST_PP_FILENAME_4) +# error BOOST_PP_ERROR: depth #4 filename is not defined +# endif +# define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_ITERATION_LIMITS) +# include +# define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_ITERATION_LIMITS) +# include +# define BOOST_PP_ITERATION_FLAGS_4() 0 +# undef BOOST_PP_ITERATION_LIMITS +# elif defined(BOOST_PP_ITERATION_PARAMS_4) +# define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ITERATION_PARAMS_4) +# include +# define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(1, BOOST_PP_ITERATION_PARAMS_4) +# include +# define BOOST_PP_FILENAME_4 BOOST_PP_ARRAY_ELEM(2, BOOST_PP_ITERATION_PARAMS_4) +# if BOOST_PP_ARRAY_SIZE(BOOST_PP_ITERATION_PARAMS_4) >= 4 +# define BOOST_PP_ITERATION_FLAGS_4() BOOST_PP_ARRAY_ELEM(3, BOOST_PP_ITERATION_PARAMS_4) +# else +# define BOOST_PP_ITERATION_FLAGS_4() 0 +# endif +# else +# error BOOST_PP_ERROR: depth #4 iteration boundaries or filename not defined +# endif +# +# undef BOOST_PP_ITERATION_DEPTH +# define BOOST_PP_ITERATION_DEPTH() 4 +# +# if (BOOST_PP_ITERATION_START_4) > (BOOST_PP_ITERATION_FINISH_4) +# include +# else +# if BOOST_PP_ITERATION_START_4 <= 0 && BOOST_PP_ITERATION_FINISH_4 >= 0 +# define BOOST_PP_ITERATION_4 0 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 1 && BOOST_PP_ITERATION_FINISH_4 >= 1 +# define BOOST_PP_ITERATION_4 1 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 2 && BOOST_PP_ITERATION_FINISH_4 >= 2 +# define BOOST_PP_ITERATION_4 2 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 3 && BOOST_PP_ITERATION_FINISH_4 >= 3 +# define BOOST_PP_ITERATION_4 3 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 4 && BOOST_PP_ITERATION_FINISH_4 >= 4 +# define BOOST_PP_ITERATION_4 4 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 5 && BOOST_PP_ITERATION_FINISH_4 >= 5 +# define BOOST_PP_ITERATION_4 5 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 6 && BOOST_PP_ITERATION_FINISH_4 >= 6 +# define BOOST_PP_ITERATION_4 6 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 7 && BOOST_PP_ITERATION_FINISH_4 >= 7 +# define BOOST_PP_ITERATION_4 7 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 8 && BOOST_PP_ITERATION_FINISH_4 >= 8 +# define BOOST_PP_ITERATION_4 8 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 9 && BOOST_PP_ITERATION_FINISH_4 >= 9 +# define BOOST_PP_ITERATION_4 9 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 10 && BOOST_PP_ITERATION_FINISH_4 >= 10 +# define BOOST_PP_ITERATION_4 10 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 11 && BOOST_PP_ITERATION_FINISH_4 >= 11 +# define BOOST_PP_ITERATION_4 11 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 12 && BOOST_PP_ITERATION_FINISH_4 >= 12 +# define BOOST_PP_ITERATION_4 12 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 13 && BOOST_PP_ITERATION_FINISH_4 >= 13 +# define BOOST_PP_ITERATION_4 13 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 14 && BOOST_PP_ITERATION_FINISH_4 >= 14 +# define BOOST_PP_ITERATION_4 14 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 15 && BOOST_PP_ITERATION_FINISH_4 >= 15 +# define BOOST_PP_ITERATION_4 15 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 16 && BOOST_PP_ITERATION_FINISH_4 >= 16 +# define BOOST_PP_ITERATION_4 16 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 17 && BOOST_PP_ITERATION_FINISH_4 >= 17 +# define BOOST_PP_ITERATION_4 17 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 18 && BOOST_PP_ITERATION_FINISH_4 >= 18 +# define BOOST_PP_ITERATION_4 18 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 19 && BOOST_PP_ITERATION_FINISH_4 >= 19 +# define BOOST_PP_ITERATION_4 19 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 20 && BOOST_PP_ITERATION_FINISH_4 >= 20 +# define BOOST_PP_ITERATION_4 20 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 21 && BOOST_PP_ITERATION_FINISH_4 >= 21 +# define BOOST_PP_ITERATION_4 21 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 22 && BOOST_PP_ITERATION_FINISH_4 >= 22 +# define BOOST_PP_ITERATION_4 22 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 23 && BOOST_PP_ITERATION_FINISH_4 >= 23 +# define BOOST_PP_ITERATION_4 23 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 24 && BOOST_PP_ITERATION_FINISH_4 >= 24 +# define BOOST_PP_ITERATION_4 24 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 25 && BOOST_PP_ITERATION_FINISH_4 >= 25 +# define BOOST_PP_ITERATION_4 25 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 26 && BOOST_PP_ITERATION_FINISH_4 >= 26 +# define BOOST_PP_ITERATION_4 26 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 27 && BOOST_PP_ITERATION_FINISH_4 >= 27 +# define BOOST_PP_ITERATION_4 27 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 28 && BOOST_PP_ITERATION_FINISH_4 >= 28 +# define BOOST_PP_ITERATION_4 28 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 29 && BOOST_PP_ITERATION_FINISH_4 >= 29 +# define BOOST_PP_ITERATION_4 29 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 30 && BOOST_PP_ITERATION_FINISH_4 >= 30 +# define BOOST_PP_ITERATION_4 30 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 31 && BOOST_PP_ITERATION_FINISH_4 >= 31 +# define BOOST_PP_ITERATION_4 31 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 32 && BOOST_PP_ITERATION_FINISH_4 >= 32 +# define BOOST_PP_ITERATION_4 32 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 33 && BOOST_PP_ITERATION_FINISH_4 >= 33 +# define BOOST_PP_ITERATION_4 33 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 34 && BOOST_PP_ITERATION_FINISH_4 >= 34 +# define BOOST_PP_ITERATION_4 34 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 35 && BOOST_PP_ITERATION_FINISH_4 >= 35 +# define BOOST_PP_ITERATION_4 35 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 36 && BOOST_PP_ITERATION_FINISH_4 >= 36 +# define BOOST_PP_ITERATION_4 36 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 37 && BOOST_PP_ITERATION_FINISH_4 >= 37 +# define BOOST_PP_ITERATION_4 37 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 38 && BOOST_PP_ITERATION_FINISH_4 >= 38 +# define BOOST_PP_ITERATION_4 38 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 39 && BOOST_PP_ITERATION_FINISH_4 >= 39 +# define BOOST_PP_ITERATION_4 39 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 40 && BOOST_PP_ITERATION_FINISH_4 >= 40 +# define BOOST_PP_ITERATION_4 40 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 41 && BOOST_PP_ITERATION_FINISH_4 >= 41 +# define BOOST_PP_ITERATION_4 41 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 42 && BOOST_PP_ITERATION_FINISH_4 >= 42 +# define BOOST_PP_ITERATION_4 42 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 43 && BOOST_PP_ITERATION_FINISH_4 >= 43 +# define BOOST_PP_ITERATION_4 43 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 44 && BOOST_PP_ITERATION_FINISH_4 >= 44 +# define BOOST_PP_ITERATION_4 44 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 45 && BOOST_PP_ITERATION_FINISH_4 >= 45 +# define BOOST_PP_ITERATION_4 45 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 46 && BOOST_PP_ITERATION_FINISH_4 >= 46 +# define BOOST_PP_ITERATION_4 46 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 47 && BOOST_PP_ITERATION_FINISH_4 >= 47 +# define BOOST_PP_ITERATION_4 47 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 48 && BOOST_PP_ITERATION_FINISH_4 >= 48 +# define BOOST_PP_ITERATION_4 48 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 49 && BOOST_PP_ITERATION_FINISH_4 >= 49 +# define BOOST_PP_ITERATION_4 49 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 50 && BOOST_PP_ITERATION_FINISH_4 >= 50 +# define BOOST_PP_ITERATION_4 50 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 51 && BOOST_PP_ITERATION_FINISH_4 >= 51 +# define BOOST_PP_ITERATION_4 51 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 52 && BOOST_PP_ITERATION_FINISH_4 >= 52 +# define BOOST_PP_ITERATION_4 52 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 53 && BOOST_PP_ITERATION_FINISH_4 >= 53 +# define BOOST_PP_ITERATION_4 53 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 54 && BOOST_PP_ITERATION_FINISH_4 >= 54 +# define BOOST_PP_ITERATION_4 54 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 55 && BOOST_PP_ITERATION_FINISH_4 >= 55 +# define BOOST_PP_ITERATION_4 55 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 56 && BOOST_PP_ITERATION_FINISH_4 >= 56 +# define BOOST_PP_ITERATION_4 56 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 57 && BOOST_PP_ITERATION_FINISH_4 >= 57 +# define BOOST_PP_ITERATION_4 57 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 58 && BOOST_PP_ITERATION_FINISH_4 >= 58 +# define BOOST_PP_ITERATION_4 58 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 59 && BOOST_PP_ITERATION_FINISH_4 >= 59 +# define BOOST_PP_ITERATION_4 59 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 60 && BOOST_PP_ITERATION_FINISH_4 >= 60 +# define BOOST_PP_ITERATION_4 60 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 61 && BOOST_PP_ITERATION_FINISH_4 >= 61 +# define BOOST_PP_ITERATION_4 61 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 62 && BOOST_PP_ITERATION_FINISH_4 >= 62 +# define BOOST_PP_ITERATION_4 62 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 63 && BOOST_PP_ITERATION_FINISH_4 >= 63 +# define BOOST_PP_ITERATION_4 63 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 64 && BOOST_PP_ITERATION_FINISH_4 >= 64 +# define BOOST_PP_ITERATION_4 64 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 65 && BOOST_PP_ITERATION_FINISH_4 >= 65 +# define BOOST_PP_ITERATION_4 65 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 66 && BOOST_PP_ITERATION_FINISH_4 >= 66 +# define BOOST_PP_ITERATION_4 66 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 67 && BOOST_PP_ITERATION_FINISH_4 >= 67 +# define BOOST_PP_ITERATION_4 67 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 68 && BOOST_PP_ITERATION_FINISH_4 >= 68 +# define BOOST_PP_ITERATION_4 68 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 69 && BOOST_PP_ITERATION_FINISH_4 >= 69 +# define BOOST_PP_ITERATION_4 69 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 70 && BOOST_PP_ITERATION_FINISH_4 >= 70 +# define BOOST_PP_ITERATION_4 70 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 71 && BOOST_PP_ITERATION_FINISH_4 >= 71 +# define BOOST_PP_ITERATION_4 71 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 72 && BOOST_PP_ITERATION_FINISH_4 >= 72 +# define BOOST_PP_ITERATION_4 72 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 73 && BOOST_PP_ITERATION_FINISH_4 >= 73 +# define BOOST_PP_ITERATION_4 73 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 74 && BOOST_PP_ITERATION_FINISH_4 >= 74 +# define BOOST_PP_ITERATION_4 74 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 75 && BOOST_PP_ITERATION_FINISH_4 >= 75 +# define BOOST_PP_ITERATION_4 75 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 76 && BOOST_PP_ITERATION_FINISH_4 >= 76 +# define BOOST_PP_ITERATION_4 76 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 77 && BOOST_PP_ITERATION_FINISH_4 >= 77 +# define BOOST_PP_ITERATION_4 77 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 78 && BOOST_PP_ITERATION_FINISH_4 >= 78 +# define BOOST_PP_ITERATION_4 78 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 79 && BOOST_PP_ITERATION_FINISH_4 >= 79 +# define BOOST_PP_ITERATION_4 79 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 80 && BOOST_PP_ITERATION_FINISH_4 >= 80 +# define BOOST_PP_ITERATION_4 80 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 81 && BOOST_PP_ITERATION_FINISH_4 >= 81 +# define BOOST_PP_ITERATION_4 81 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 82 && BOOST_PP_ITERATION_FINISH_4 >= 82 +# define BOOST_PP_ITERATION_4 82 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 83 && BOOST_PP_ITERATION_FINISH_4 >= 83 +# define BOOST_PP_ITERATION_4 83 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 84 && BOOST_PP_ITERATION_FINISH_4 >= 84 +# define BOOST_PP_ITERATION_4 84 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 85 && BOOST_PP_ITERATION_FINISH_4 >= 85 +# define BOOST_PP_ITERATION_4 85 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 86 && BOOST_PP_ITERATION_FINISH_4 >= 86 +# define BOOST_PP_ITERATION_4 86 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 87 && BOOST_PP_ITERATION_FINISH_4 >= 87 +# define BOOST_PP_ITERATION_4 87 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 88 && BOOST_PP_ITERATION_FINISH_4 >= 88 +# define BOOST_PP_ITERATION_4 88 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 89 && BOOST_PP_ITERATION_FINISH_4 >= 89 +# define BOOST_PP_ITERATION_4 89 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 90 && BOOST_PP_ITERATION_FINISH_4 >= 90 +# define BOOST_PP_ITERATION_4 90 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 91 && BOOST_PP_ITERATION_FINISH_4 >= 91 +# define BOOST_PP_ITERATION_4 91 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 92 && BOOST_PP_ITERATION_FINISH_4 >= 92 +# define BOOST_PP_ITERATION_4 92 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 93 && BOOST_PP_ITERATION_FINISH_4 >= 93 +# define BOOST_PP_ITERATION_4 93 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 94 && BOOST_PP_ITERATION_FINISH_4 >= 94 +# define BOOST_PP_ITERATION_4 94 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 95 && BOOST_PP_ITERATION_FINISH_4 >= 95 +# define BOOST_PP_ITERATION_4 95 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 96 && BOOST_PP_ITERATION_FINISH_4 >= 96 +# define BOOST_PP_ITERATION_4 96 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 97 && BOOST_PP_ITERATION_FINISH_4 >= 97 +# define BOOST_PP_ITERATION_4 97 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 98 && BOOST_PP_ITERATION_FINISH_4 >= 98 +# define BOOST_PP_ITERATION_4 98 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 99 && BOOST_PP_ITERATION_FINISH_4 >= 99 +# define BOOST_PP_ITERATION_4 99 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 100 && BOOST_PP_ITERATION_FINISH_4 >= 100 +# define BOOST_PP_ITERATION_4 100 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 101 && BOOST_PP_ITERATION_FINISH_4 >= 101 +# define BOOST_PP_ITERATION_4 101 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 102 && BOOST_PP_ITERATION_FINISH_4 >= 102 +# define BOOST_PP_ITERATION_4 102 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 103 && BOOST_PP_ITERATION_FINISH_4 >= 103 +# define BOOST_PP_ITERATION_4 103 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 104 && BOOST_PP_ITERATION_FINISH_4 >= 104 +# define BOOST_PP_ITERATION_4 104 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 105 && BOOST_PP_ITERATION_FINISH_4 >= 105 +# define BOOST_PP_ITERATION_4 105 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 106 && BOOST_PP_ITERATION_FINISH_4 >= 106 +# define BOOST_PP_ITERATION_4 106 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 107 && BOOST_PP_ITERATION_FINISH_4 >= 107 +# define BOOST_PP_ITERATION_4 107 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 108 && BOOST_PP_ITERATION_FINISH_4 >= 108 +# define BOOST_PP_ITERATION_4 108 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 109 && BOOST_PP_ITERATION_FINISH_4 >= 109 +# define BOOST_PP_ITERATION_4 109 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 110 && BOOST_PP_ITERATION_FINISH_4 >= 110 +# define BOOST_PP_ITERATION_4 110 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 111 && BOOST_PP_ITERATION_FINISH_4 >= 111 +# define BOOST_PP_ITERATION_4 111 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 112 && BOOST_PP_ITERATION_FINISH_4 >= 112 +# define BOOST_PP_ITERATION_4 112 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 113 && BOOST_PP_ITERATION_FINISH_4 >= 113 +# define BOOST_PP_ITERATION_4 113 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 114 && BOOST_PP_ITERATION_FINISH_4 >= 114 +# define BOOST_PP_ITERATION_4 114 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 115 && BOOST_PP_ITERATION_FINISH_4 >= 115 +# define BOOST_PP_ITERATION_4 115 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 116 && BOOST_PP_ITERATION_FINISH_4 >= 116 +# define BOOST_PP_ITERATION_4 116 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 117 && BOOST_PP_ITERATION_FINISH_4 >= 117 +# define BOOST_PP_ITERATION_4 117 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 118 && BOOST_PP_ITERATION_FINISH_4 >= 118 +# define BOOST_PP_ITERATION_4 118 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 119 && BOOST_PP_ITERATION_FINISH_4 >= 119 +# define BOOST_PP_ITERATION_4 119 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 120 && BOOST_PP_ITERATION_FINISH_4 >= 120 +# define BOOST_PP_ITERATION_4 120 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 121 && BOOST_PP_ITERATION_FINISH_4 >= 121 +# define BOOST_PP_ITERATION_4 121 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 122 && BOOST_PP_ITERATION_FINISH_4 >= 122 +# define BOOST_PP_ITERATION_4 122 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 123 && BOOST_PP_ITERATION_FINISH_4 >= 123 +# define BOOST_PP_ITERATION_4 123 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 124 && BOOST_PP_ITERATION_FINISH_4 >= 124 +# define BOOST_PP_ITERATION_4 124 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 125 && BOOST_PP_ITERATION_FINISH_4 >= 125 +# define BOOST_PP_ITERATION_4 125 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 126 && BOOST_PP_ITERATION_FINISH_4 >= 126 +# define BOOST_PP_ITERATION_4 126 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 127 && BOOST_PP_ITERATION_FINISH_4 >= 127 +# define BOOST_PP_ITERATION_4 127 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 128 && BOOST_PP_ITERATION_FINISH_4 >= 128 +# define BOOST_PP_ITERATION_4 128 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 129 && BOOST_PP_ITERATION_FINISH_4 >= 129 +# define BOOST_PP_ITERATION_4 129 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 130 && BOOST_PP_ITERATION_FINISH_4 >= 130 +# define BOOST_PP_ITERATION_4 130 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 131 && BOOST_PP_ITERATION_FINISH_4 >= 131 +# define BOOST_PP_ITERATION_4 131 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 132 && BOOST_PP_ITERATION_FINISH_4 >= 132 +# define BOOST_PP_ITERATION_4 132 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 133 && BOOST_PP_ITERATION_FINISH_4 >= 133 +# define BOOST_PP_ITERATION_4 133 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 134 && BOOST_PP_ITERATION_FINISH_4 >= 134 +# define BOOST_PP_ITERATION_4 134 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 135 && BOOST_PP_ITERATION_FINISH_4 >= 135 +# define BOOST_PP_ITERATION_4 135 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 136 && BOOST_PP_ITERATION_FINISH_4 >= 136 +# define BOOST_PP_ITERATION_4 136 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 137 && BOOST_PP_ITERATION_FINISH_4 >= 137 +# define BOOST_PP_ITERATION_4 137 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 138 && BOOST_PP_ITERATION_FINISH_4 >= 138 +# define BOOST_PP_ITERATION_4 138 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 139 && BOOST_PP_ITERATION_FINISH_4 >= 139 +# define BOOST_PP_ITERATION_4 139 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 140 && BOOST_PP_ITERATION_FINISH_4 >= 140 +# define BOOST_PP_ITERATION_4 140 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 141 && BOOST_PP_ITERATION_FINISH_4 >= 141 +# define BOOST_PP_ITERATION_4 141 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 142 && BOOST_PP_ITERATION_FINISH_4 >= 142 +# define BOOST_PP_ITERATION_4 142 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 143 && BOOST_PP_ITERATION_FINISH_4 >= 143 +# define BOOST_PP_ITERATION_4 143 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 144 && BOOST_PP_ITERATION_FINISH_4 >= 144 +# define BOOST_PP_ITERATION_4 144 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 145 && BOOST_PP_ITERATION_FINISH_4 >= 145 +# define BOOST_PP_ITERATION_4 145 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 146 && BOOST_PP_ITERATION_FINISH_4 >= 146 +# define BOOST_PP_ITERATION_4 146 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 147 && BOOST_PP_ITERATION_FINISH_4 >= 147 +# define BOOST_PP_ITERATION_4 147 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 148 && BOOST_PP_ITERATION_FINISH_4 >= 148 +# define BOOST_PP_ITERATION_4 148 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 149 && BOOST_PP_ITERATION_FINISH_4 >= 149 +# define BOOST_PP_ITERATION_4 149 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 150 && BOOST_PP_ITERATION_FINISH_4 >= 150 +# define BOOST_PP_ITERATION_4 150 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 151 && BOOST_PP_ITERATION_FINISH_4 >= 151 +# define BOOST_PP_ITERATION_4 151 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 152 && BOOST_PP_ITERATION_FINISH_4 >= 152 +# define BOOST_PP_ITERATION_4 152 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 153 && BOOST_PP_ITERATION_FINISH_4 >= 153 +# define BOOST_PP_ITERATION_4 153 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 154 && BOOST_PP_ITERATION_FINISH_4 >= 154 +# define BOOST_PP_ITERATION_4 154 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 155 && BOOST_PP_ITERATION_FINISH_4 >= 155 +# define BOOST_PP_ITERATION_4 155 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 156 && BOOST_PP_ITERATION_FINISH_4 >= 156 +# define BOOST_PP_ITERATION_4 156 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 157 && BOOST_PP_ITERATION_FINISH_4 >= 157 +# define BOOST_PP_ITERATION_4 157 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 158 && BOOST_PP_ITERATION_FINISH_4 >= 158 +# define BOOST_PP_ITERATION_4 158 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 159 && BOOST_PP_ITERATION_FINISH_4 >= 159 +# define BOOST_PP_ITERATION_4 159 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 160 && BOOST_PP_ITERATION_FINISH_4 >= 160 +# define BOOST_PP_ITERATION_4 160 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 161 && BOOST_PP_ITERATION_FINISH_4 >= 161 +# define BOOST_PP_ITERATION_4 161 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 162 && BOOST_PP_ITERATION_FINISH_4 >= 162 +# define BOOST_PP_ITERATION_4 162 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 163 && BOOST_PP_ITERATION_FINISH_4 >= 163 +# define BOOST_PP_ITERATION_4 163 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 164 && BOOST_PP_ITERATION_FINISH_4 >= 164 +# define BOOST_PP_ITERATION_4 164 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 165 && BOOST_PP_ITERATION_FINISH_4 >= 165 +# define BOOST_PP_ITERATION_4 165 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 166 && BOOST_PP_ITERATION_FINISH_4 >= 166 +# define BOOST_PP_ITERATION_4 166 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 167 && BOOST_PP_ITERATION_FINISH_4 >= 167 +# define BOOST_PP_ITERATION_4 167 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 168 && BOOST_PP_ITERATION_FINISH_4 >= 168 +# define BOOST_PP_ITERATION_4 168 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 169 && BOOST_PP_ITERATION_FINISH_4 >= 169 +# define BOOST_PP_ITERATION_4 169 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 170 && BOOST_PP_ITERATION_FINISH_4 >= 170 +# define BOOST_PP_ITERATION_4 170 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 171 && BOOST_PP_ITERATION_FINISH_4 >= 171 +# define BOOST_PP_ITERATION_4 171 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 172 && BOOST_PP_ITERATION_FINISH_4 >= 172 +# define BOOST_PP_ITERATION_4 172 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 173 && BOOST_PP_ITERATION_FINISH_4 >= 173 +# define BOOST_PP_ITERATION_4 173 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 174 && BOOST_PP_ITERATION_FINISH_4 >= 174 +# define BOOST_PP_ITERATION_4 174 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 175 && BOOST_PP_ITERATION_FINISH_4 >= 175 +# define BOOST_PP_ITERATION_4 175 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 176 && BOOST_PP_ITERATION_FINISH_4 >= 176 +# define BOOST_PP_ITERATION_4 176 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 177 && BOOST_PP_ITERATION_FINISH_4 >= 177 +# define BOOST_PP_ITERATION_4 177 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 178 && BOOST_PP_ITERATION_FINISH_4 >= 178 +# define BOOST_PP_ITERATION_4 178 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 179 && BOOST_PP_ITERATION_FINISH_4 >= 179 +# define BOOST_PP_ITERATION_4 179 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 180 && BOOST_PP_ITERATION_FINISH_4 >= 180 +# define BOOST_PP_ITERATION_4 180 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 181 && BOOST_PP_ITERATION_FINISH_4 >= 181 +# define BOOST_PP_ITERATION_4 181 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 182 && BOOST_PP_ITERATION_FINISH_4 >= 182 +# define BOOST_PP_ITERATION_4 182 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 183 && BOOST_PP_ITERATION_FINISH_4 >= 183 +# define BOOST_PP_ITERATION_4 183 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 184 && BOOST_PP_ITERATION_FINISH_4 >= 184 +# define BOOST_PP_ITERATION_4 184 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 185 && BOOST_PP_ITERATION_FINISH_4 >= 185 +# define BOOST_PP_ITERATION_4 185 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 186 && BOOST_PP_ITERATION_FINISH_4 >= 186 +# define BOOST_PP_ITERATION_4 186 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 187 && BOOST_PP_ITERATION_FINISH_4 >= 187 +# define BOOST_PP_ITERATION_4 187 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 188 && BOOST_PP_ITERATION_FINISH_4 >= 188 +# define BOOST_PP_ITERATION_4 188 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 189 && BOOST_PP_ITERATION_FINISH_4 >= 189 +# define BOOST_PP_ITERATION_4 189 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 190 && BOOST_PP_ITERATION_FINISH_4 >= 190 +# define BOOST_PP_ITERATION_4 190 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 191 && BOOST_PP_ITERATION_FINISH_4 >= 191 +# define BOOST_PP_ITERATION_4 191 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 192 && BOOST_PP_ITERATION_FINISH_4 >= 192 +# define BOOST_PP_ITERATION_4 192 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 193 && BOOST_PP_ITERATION_FINISH_4 >= 193 +# define BOOST_PP_ITERATION_4 193 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 194 && BOOST_PP_ITERATION_FINISH_4 >= 194 +# define BOOST_PP_ITERATION_4 194 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 195 && BOOST_PP_ITERATION_FINISH_4 >= 195 +# define BOOST_PP_ITERATION_4 195 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 196 && BOOST_PP_ITERATION_FINISH_4 >= 196 +# define BOOST_PP_ITERATION_4 196 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 197 && BOOST_PP_ITERATION_FINISH_4 >= 197 +# define BOOST_PP_ITERATION_4 197 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 198 && BOOST_PP_ITERATION_FINISH_4 >= 198 +# define BOOST_PP_ITERATION_4 198 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 199 && BOOST_PP_ITERATION_FINISH_4 >= 199 +# define BOOST_PP_ITERATION_4 199 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 200 && BOOST_PP_ITERATION_FINISH_4 >= 200 +# define BOOST_PP_ITERATION_4 200 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 201 && BOOST_PP_ITERATION_FINISH_4 >= 201 +# define BOOST_PP_ITERATION_4 201 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 202 && BOOST_PP_ITERATION_FINISH_4 >= 202 +# define BOOST_PP_ITERATION_4 202 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 203 && BOOST_PP_ITERATION_FINISH_4 >= 203 +# define BOOST_PP_ITERATION_4 203 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 204 && BOOST_PP_ITERATION_FINISH_4 >= 204 +# define BOOST_PP_ITERATION_4 204 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 205 && BOOST_PP_ITERATION_FINISH_4 >= 205 +# define BOOST_PP_ITERATION_4 205 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 206 && BOOST_PP_ITERATION_FINISH_4 >= 206 +# define BOOST_PP_ITERATION_4 206 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 207 && BOOST_PP_ITERATION_FINISH_4 >= 207 +# define BOOST_PP_ITERATION_4 207 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 208 && BOOST_PP_ITERATION_FINISH_4 >= 208 +# define BOOST_PP_ITERATION_4 208 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 209 && BOOST_PP_ITERATION_FINISH_4 >= 209 +# define BOOST_PP_ITERATION_4 209 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 210 && BOOST_PP_ITERATION_FINISH_4 >= 210 +# define BOOST_PP_ITERATION_4 210 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 211 && BOOST_PP_ITERATION_FINISH_4 >= 211 +# define BOOST_PP_ITERATION_4 211 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 212 && BOOST_PP_ITERATION_FINISH_4 >= 212 +# define BOOST_PP_ITERATION_4 212 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 213 && BOOST_PP_ITERATION_FINISH_4 >= 213 +# define BOOST_PP_ITERATION_4 213 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 214 && BOOST_PP_ITERATION_FINISH_4 >= 214 +# define BOOST_PP_ITERATION_4 214 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 215 && BOOST_PP_ITERATION_FINISH_4 >= 215 +# define BOOST_PP_ITERATION_4 215 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 216 && BOOST_PP_ITERATION_FINISH_4 >= 216 +# define BOOST_PP_ITERATION_4 216 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 217 && BOOST_PP_ITERATION_FINISH_4 >= 217 +# define BOOST_PP_ITERATION_4 217 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 218 && BOOST_PP_ITERATION_FINISH_4 >= 218 +# define BOOST_PP_ITERATION_4 218 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 219 && BOOST_PP_ITERATION_FINISH_4 >= 219 +# define BOOST_PP_ITERATION_4 219 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 220 && BOOST_PP_ITERATION_FINISH_4 >= 220 +# define BOOST_PP_ITERATION_4 220 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 221 && BOOST_PP_ITERATION_FINISH_4 >= 221 +# define BOOST_PP_ITERATION_4 221 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 222 && BOOST_PP_ITERATION_FINISH_4 >= 222 +# define BOOST_PP_ITERATION_4 222 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 223 && BOOST_PP_ITERATION_FINISH_4 >= 223 +# define BOOST_PP_ITERATION_4 223 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 224 && BOOST_PP_ITERATION_FINISH_4 >= 224 +# define BOOST_PP_ITERATION_4 224 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 225 && BOOST_PP_ITERATION_FINISH_4 >= 225 +# define BOOST_PP_ITERATION_4 225 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 226 && BOOST_PP_ITERATION_FINISH_4 >= 226 +# define BOOST_PP_ITERATION_4 226 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 227 && BOOST_PP_ITERATION_FINISH_4 >= 227 +# define BOOST_PP_ITERATION_4 227 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 228 && BOOST_PP_ITERATION_FINISH_4 >= 228 +# define BOOST_PP_ITERATION_4 228 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 229 && BOOST_PP_ITERATION_FINISH_4 >= 229 +# define BOOST_PP_ITERATION_4 229 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 230 && BOOST_PP_ITERATION_FINISH_4 >= 230 +# define BOOST_PP_ITERATION_4 230 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 231 && BOOST_PP_ITERATION_FINISH_4 >= 231 +# define BOOST_PP_ITERATION_4 231 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 232 && BOOST_PP_ITERATION_FINISH_4 >= 232 +# define BOOST_PP_ITERATION_4 232 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 233 && BOOST_PP_ITERATION_FINISH_4 >= 233 +# define BOOST_PP_ITERATION_4 233 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 234 && BOOST_PP_ITERATION_FINISH_4 >= 234 +# define BOOST_PP_ITERATION_4 234 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 235 && BOOST_PP_ITERATION_FINISH_4 >= 235 +# define BOOST_PP_ITERATION_4 235 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 236 && BOOST_PP_ITERATION_FINISH_4 >= 236 +# define BOOST_PP_ITERATION_4 236 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 237 && BOOST_PP_ITERATION_FINISH_4 >= 237 +# define BOOST_PP_ITERATION_4 237 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 238 && BOOST_PP_ITERATION_FINISH_4 >= 238 +# define BOOST_PP_ITERATION_4 238 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 239 && BOOST_PP_ITERATION_FINISH_4 >= 239 +# define BOOST_PP_ITERATION_4 239 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 240 && BOOST_PP_ITERATION_FINISH_4 >= 240 +# define BOOST_PP_ITERATION_4 240 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 241 && BOOST_PP_ITERATION_FINISH_4 >= 241 +# define BOOST_PP_ITERATION_4 241 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 242 && BOOST_PP_ITERATION_FINISH_4 >= 242 +# define BOOST_PP_ITERATION_4 242 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 243 && BOOST_PP_ITERATION_FINISH_4 >= 243 +# define BOOST_PP_ITERATION_4 243 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 244 && BOOST_PP_ITERATION_FINISH_4 >= 244 +# define BOOST_PP_ITERATION_4 244 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 245 && BOOST_PP_ITERATION_FINISH_4 >= 245 +# define BOOST_PP_ITERATION_4 245 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 246 && BOOST_PP_ITERATION_FINISH_4 >= 246 +# define BOOST_PP_ITERATION_4 246 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 247 && BOOST_PP_ITERATION_FINISH_4 >= 247 +# define BOOST_PP_ITERATION_4 247 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 248 && BOOST_PP_ITERATION_FINISH_4 >= 248 +# define BOOST_PP_ITERATION_4 248 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 249 && BOOST_PP_ITERATION_FINISH_4 >= 249 +# define BOOST_PP_ITERATION_4 249 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 250 && BOOST_PP_ITERATION_FINISH_4 >= 250 +# define BOOST_PP_ITERATION_4 250 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 251 && BOOST_PP_ITERATION_FINISH_4 >= 251 +# define BOOST_PP_ITERATION_4 251 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 252 && BOOST_PP_ITERATION_FINISH_4 >= 252 +# define BOOST_PP_ITERATION_4 252 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 253 && BOOST_PP_ITERATION_FINISH_4 >= 253 +# define BOOST_PP_ITERATION_4 253 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 254 && BOOST_PP_ITERATION_FINISH_4 >= 254 +# define BOOST_PP_ITERATION_4 254 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 255 && BOOST_PP_ITERATION_FINISH_4 >= 255 +# define BOOST_PP_ITERATION_4 255 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_START_4 <= 256 && BOOST_PP_ITERATION_FINISH_4 >= 256 +# define BOOST_PP_ITERATION_4 256 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# endif +# +# undef BOOST_PP_ITERATION_DEPTH +# define BOOST_PP_ITERATION_DEPTH() 3 +# +# undef BOOST_PP_ITERATION_START_4 +# undef BOOST_PP_ITERATION_FINISH_4 +# undef BOOST_PP_FILENAME_4 +# +# undef BOOST_PP_ITERATION_FLAGS_4 +# undef BOOST_PP_ITERATION_PARAMS_4 diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/forward5.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/forward5.hpp new file mode 100644 index 0000000000..7617607c6c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/forward5.hpp @@ -0,0 +1,1338 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# if defined(BOOST_PP_ITERATION_LIMITS) +# if !defined(BOOST_PP_FILENAME_5) +# error BOOST_PP_ERROR: depth #5 filename is not defined +# endif +# define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_ITERATION_LIMITS) +# include +# define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_ITERATION_LIMITS) +# include +# define BOOST_PP_ITERATION_FLAGS_5() 0 +# undef BOOST_PP_ITERATION_LIMITS +# elif defined(BOOST_PP_ITERATION_PARAMS_5) +# define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ITERATION_PARAMS_5) +# include +# define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(1, BOOST_PP_ITERATION_PARAMS_5) +# include +# define BOOST_PP_FILENAME_5 BOOST_PP_ARRAY_ELEM(2, BOOST_PP_ITERATION_PARAMS_5) +# if BOOST_PP_ARRAY_SIZE(BOOST_PP_ITERATION_PARAMS_5) >= 4 +# define BOOST_PP_ITERATION_FLAGS_5() BOOST_PP_ARRAY_ELEM(3, BOOST_PP_ITERATION_PARAMS_5) +# else +# define BOOST_PP_ITERATION_FLAGS_5() 0 +# endif +# else +# error BOOST_PP_ERROR: depth #5 iteration boundaries or filename not defined +# endif +# +# undef BOOST_PP_ITERATION_DEPTH +# define BOOST_PP_ITERATION_DEPTH() 5 +# +# if (BOOST_PP_ITERATION_START_5) > (BOOST_PP_ITERATION_FINISH_5) +# include +# else +# if BOOST_PP_ITERATION_START_5 <= 0 && BOOST_PP_ITERATION_FINISH_5 >= 0 +# define BOOST_PP_ITERATION_5 0 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 1 && BOOST_PP_ITERATION_FINISH_5 >= 1 +# define BOOST_PP_ITERATION_5 1 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 2 && BOOST_PP_ITERATION_FINISH_5 >= 2 +# define BOOST_PP_ITERATION_5 2 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 3 && BOOST_PP_ITERATION_FINISH_5 >= 3 +# define BOOST_PP_ITERATION_5 3 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 4 && BOOST_PP_ITERATION_FINISH_5 >= 4 +# define BOOST_PP_ITERATION_5 4 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 5 && BOOST_PP_ITERATION_FINISH_5 >= 5 +# define BOOST_PP_ITERATION_5 5 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 6 && BOOST_PP_ITERATION_FINISH_5 >= 6 +# define BOOST_PP_ITERATION_5 6 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 7 && BOOST_PP_ITERATION_FINISH_5 >= 7 +# define BOOST_PP_ITERATION_5 7 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 8 && BOOST_PP_ITERATION_FINISH_5 >= 8 +# define BOOST_PP_ITERATION_5 8 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 9 && BOOST_PP_ITERATION_FINISH_5 >= 9 +# define BOOST_PP_ITERATION_5 9 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 10 && BOOST_PP_ITERATION_FINISH_5 >= 10 +# define BOOST_PP_ITERATION_5 10 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 11 && BOOST_PP_ITERATION_FINISH_5 >= 11 +# define BOOST_PP_ITERATION_5 11 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 12 && BOOST_PP_ITERATION_FINISH_5 >= 12 +# define BOOST_PP_ITERATION_5 12 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 13 && BOOST_PP_ITERATION_FINISH_5 >= 13 +# define BOOST_PP_ITERATION_5 13 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 14 && BOOST_PP_ITERATION_FINISH_5 >= 14 +# define BOOST_PP_ITERATION_5 14 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 15 && BOOST_PP_ITERATION_FINISH_5 >= 15 +# define BOOST_PP_ITERATION_5 15 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 16 && BOOST_PP_ITERATION_FINISH_5 >= 16 +# define BOOST_PP_ITERATION_5 16 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 17 && BOOST_PP_ITERATION_FINISH_5 >= 17 +# define BOOST_PP_ITERATION_5 17 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 18 && BOOST_PP_ITERATION_FINISH_5 >= 18 +# define BOOST_PP_ITERATION_5 18 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 19 && BOOST_PP_ITERATION_FINISH_5 >= 19 +# define BOOST_PP_ITERATION_5 19 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 20 && BOOST_PP_ITERATION_FINISH_5 >= 20 +# define BOOST_PP_ITERATION_5 20 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 21 && BOOST_PP_ITERATION_FINISH_5 >= 21 +# define BOOST_PP_ITERATION_5 21 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 22 && BOOST_PP_ITERATION_FINISH_5 >= 22 +# define BOOST_PP_ITERATION_5 22 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 23 && BOOST_PP_ITERATION_FINISH_5 >= 23 +# define BOOST_PP_ITERATION_5 23 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 24 && BOOST_PP_ITERATION_FINISH_5 >= 24 +# define BOOST_PP_ITERATION_5 24 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 25 && BOOST_PP_ITERATION_FINISH_5 >= 25 +# define BOOST_PP_ITERATION_5 25 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 26 && BOOST_PP_ITERATION_FINISH_5 >= 26 +# define BOOST_PP_ITERATION_5 26 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 27 && BOOST_PP_ITERATION_FINISH_5 >= 27 +# define BOOST_PP_ITERATION_5 27 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 28 && BOOST_PP_ITERATION_FINISH_5 >= 28 +# define BOOST_PP_ITERATION_5 28 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 29 && BOOST_PP_ITERATION_FINISH_5 >= 29 +# define BOOST_PP_ITERATION_5 29 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 30 && BOOST_PP_ITERATION_FINISH_5 >= 30 +# define BOOST_PP_ITERATION_5 30 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 31 && BOOST_PP_ITERATION_FINISH_5 >= 31 +# define BOOST_PP_ITERATION_5 31 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 32 && BOOST_PP_ITERATION_FINISH_5 >= 32 +# define BOOST_PP_ITERATION_5 32 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 33 && BOOST_PP_ITERATION_FINISH_5 >= 33 +# define BOOST_PP_ITERATION_5 33 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 34 && BOOST_PP_ITERATION_FINISH_5 >= 34 +# define BOOST_PP_ITERATION_5 34 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 35 && BOOST_PP_ITERATION_FINISH_5 >= 35 +# define BOOST_PP_ITERATION_5 35 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 36 && BOOST_PP_ITERATION_FINISH_5 >= 36 +# define BOOST_PP_ITERATION_5 36 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 37 && BOOST_PP_ITERATION_FINISH_5 >= 37 +# define BOOST_PP_ITERATION_5 37 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 38 && BOOST_PP_ITERATION_FINISH_5 >= 38 +# define BOOST_PP_ITERATION_5 38 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 39 && BOOST_PP_ITERATION_FINISH_5 >= 39 +# define BOOST_PP_ITERATION_5 39 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 40 && BOOST_PP_ITERATION_FINISH_5 >= 40 +# define BOOST_PP_ITERATION_5 40 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 41 && BOOST_PP_ITERATION_FINISH_5 >= 41 +# define BOOST_PP_ITERATION_5 41 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 42 && BOOST_PP_ITERATION_FINISH_5 >= 42 +# define BOOST_PP_ITERATION_5 42 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 43 && BOOST_PP_ITERATION_FINISH_5 >= 43 +# define BOOST_PP_ITERATION_5 43 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 44 && BOOST_PP_ITERATION_FINISH_5 >= 44 +# define BOOST_PP_ITERATION_5 44 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 45 && BOOST_PP_ITERATION_FINISH_5 >= 45 +# define BOOST_PP_ITERATION_5 45 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 46 && BOOST_PP_ITERATION_FINISH_5 >= 46 +# define BOOST_PP_ITERATION_5 46 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 47 && BOOST_PP_ITERATION_FINISH_5 >= 47 +# define BOOST_PP_ITERATION_5 47 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 48 && BOOST_PP_ITERATION_FINISH_5 >= 48 +# define BOOST_PP_ITERATION_5 48 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 49 && BOOST_PP_ITERATION_FINISH_5 >= 49 +# define BOOST_PP_ITERATION_5 49 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 50 && BOOST_PP_ITERATION_FINISH_5 >= 50 +# define BOOST_PP_ITERATION_5 50 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 51 && BOOST_PP_ITERATION_FINISH_5 >= 51 +# define BOOST_PP_ITERATION_5 51 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 52 && BOOST_PP_ITERATION_FINISH_5 >= 52 +# define BOOST_PP_ITERATION_5 52 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 53 && BOOST_PP_ITERATION_FINISH_5 >= 53 +# define BOOST_PP_ITERATION_5 53 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 54 && BOOST_PP_ITERATION_FINISH_5 >= 54 +# define BOOST_PP_ITERATION_5 54 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 55 && BOOST_PP_ITERATION_FINISH_5 >= 55 +# define BOOST_PP_ITERATION_5 55 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 56 && BOOST_PP_ITERATION_FINISH_5 >= 56 +# define BOOST_PP_ITERATION_5 56 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 57 && BOOST_PP_ITERATION_FINISH_5 >= 57 +# define BOOST_PP_ITERATION_5 57 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 58 && BOOST_PP_ITERATION_FINISH_5 >= 58 +# define BOOST_PP_ITERATION_5 58 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 59 && BOOST_PP_ITERATION_FINISH_5 >= 59 +# define BOOST_PP_ITERATION_5 59 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 60 && BOOST_PP_ITERATION_FINISH_5 >= 60 +# define BOOST_PP_ITERATION_5 60 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 61 && BOOST_PP_ITERATION_FINISH_5 >= 61 +# define BOOST_PP_ITERATION_5 61 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 62 && BOOST_PP_ITERATION_FINISH_5 >= 62 +# define BOOST_PP_ITERATION_5 62 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 63 && BOOST_PP_ITERATION_FINISH_5 >= 63 +# define BOOST_PP_ITERATION_5 63 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 64 && BOOST_PP_ITERATION_FINISH_5 >= 64 +# define BOOST_PP_ITERATION_5 64 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 65 && BOOST_PP_ITERATION_FINISH_5 >= 65 +# define BOOST_PP_ITERATION_5 65 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 66 && BOOST_PP_ITERATION_FINISH_5 >= 66 +# define BOOST_PP_ITERATION_5 66 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 67 && BOOST_PP_ITERATION_FINISH_5 >= 67 +# define BOOST_PP_ITERATION_5 67 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 68 && BOOST_PP_ITERATION_FINISH_5 >= 68 +# define BOOST_PP_ITERATION_5 68 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 69 && BOOST_PP_ITERATION_FINISH_5 >= 69 +# define BOOST_PP_ITERATION_5 69 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 70 && BOOST_PP_ITERATION_FINISH_5 >= 70 +# define BOOST_PP_ITERATION_5 70 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 71 && BOOST_PP_ITERATION_FINISH_5 >= 71 +# define BOOST_PP_ITERATION_5 71 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 72 && BOOST_PP_ITERATION_FINISH_5 >= 72 +# define BOOST_PP_ITERATION_5 72 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 73 && BOOST_PP_ITERATION_FINISH_5 >= 73 +# define BOOST_PP_ITERATION_5 73 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 74 && BOOST_PP_ITERATION_FINISH_5 >= 74 +# define BOOST_PP_ITERATION_5 74 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 75 && BOOST_PP_ITERATION_FINISH_5 >= 75 +# define BOOST_PP_ITERATION_5 75 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 76 && BOOST_PP_ITERATION_FINISH_5 >= 76 +# define BOOST_PP_ITERATION_5 76 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 77 && BOOST_PP_ITERATION_FINISH_5 >= 77 +# define BOOST_PP_ITERATION_5 77 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 78 && BOOST_PP_ITERATION_FINISH_5 >= 78 +# define BOOST_PP_ITERATION_5 78 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 79 && BOOST_PP_ITERATION_FINISH_5 >= 79 +# define BOOST_PP_ITERATION_5 79 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 80 && BOOST_PP_ITERATION_FINISH_5 >= 80 +# define BOOST_PP_ITERATION_5 80 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 81 && BOOST_PP_ITERATION_FINISH_5 >= 81 +# define BOOST_PP_ITERATION_5 81 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 82 && BOOST_PP_ITERATION_FINISH_5 >= 82 +# define BOOST_PP_ITERATION_5 82 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 83 && BOOST_PP_ITERATION_FINISH_5 >= 83 +# define BOOST_PP_ITERATION_5 83 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 84 && BOOST_PP_ITERATION_FINISH_5 >= 84 +# define BOOST_PP_ITERATION_5 84 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 85 && BOOST_PP_ITERATION_FINISH_5 >= 85 +# define BOOST_PP_ITERATION_5 85 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 86 && BOOST_PP_ITERATION_FINISH_5 >= 86 +# define BOOST_PP_ITERATION_5 86 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 87 && BOOST_PP_ITERATION_FINISH_5 >= 87 +# define BOOST_PP_ITERATION_5 87 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 88 && BOOST_PP_ITERATION_FINISH_5 >= 88 +# define BOOST_PP_ITERATION_5 88 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 89 && BOOST_PP_ITERATION_FINISH_5 >= 89 +# define BOOST_PP_ITERATION_5 89 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 90 && BOOST_PP_ITERATION_FINISH_5 >= 90 +# define BOOST_PP_ITERATION_5 90 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 91 && BOOST_PP_ITERATION_FINISH_5 >= 91 +# define BOOST_PP_ITERATION_5 91 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 92 && BOOST_PP_ITERATION_FINISH_5 >= 92 +# define BOOST_PP_ITERATION_5 92 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 93 && BOOST_PP_ITERATION_FINISH_5 >= 93 +# define BOOST_PP_ITERATION_5 93 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 94 && BOOST_PP_ITERATION_FINISH_5 >= 94 +# define BOOST_PP_ITERATION_5 94 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 95 && BOOST_PP_ITERATION_FINISH_5 >= 95 +# define BOOST_PP_ITERATION_5 95 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 96 && BOOST_PP_ITERATION_FINISH_5 >= 96 +# define BOOST_PP_ITERATION_5 96 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 97 && BOOST_PP_ITERATION_FINISH_5 >= 97 +# define BOOST_PP_ITERATION_5 97 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 98 && BOOST_PP_ITERATION_FINISH_5 >= 98 +# define BOOST_PP_ITERATION_5 98 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 99 && BOOST_PP_ITERATION_FINISH_5 >= 99 +# define BOOST_PP_ITERATION_5 99 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 100 && BOOST_PP_ITERATION_FINISH_5 >= 100 +# define BOOST_PP_ITERATION_5 100 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 101 && BOOST_PP_ITERATION_FINISH_5 >= 101 +# define BOOST_PP_ITERATION_5 101 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 102 && BOOST_PP_ITERATION_FINISH_5 >= 102 +# define BOOST_PP_ITERATION_5 102 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 103 && BOOST_PP_ITERATION_FINISH_5 >= 103 +# define BOOST_PP_ITERATION_5 103 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 104 && BOOST_PP_ITERATION_FINISH_5 >= 104 +# define BOOST_PP_ITERATION_5 104 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 105 && BOOST_PP_ITERATION_FINISH_5 >= 105 +# define BOOST_PP_ITERATION_5 105 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 106 && BOOST_PP_ITERATION_FINISH_5 >= 106 +# define BOOST_PP_ITERATION_5 106 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 107 && BOOST_PP_ITERATION_FINISH_5 >= 107 +# define BOOST_PP_ITERATION_5 107 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 108 && BOOST_PP_ITERATION_FINISH_5 >= 108 +# define BOOST_PP_ITERATION_5 108 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 109 && BOOST_PP_ITERATION_FINISH_5 >= 109 +# define BOOST_PP_ITERATION_5 109 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 110 && BOOST_PP_ITERATION_FINISH_5 >= 110 +# define BOOST_PP_ITERATION_5 110 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 111 && BOOST_PP_ITERATION_FINISH_5 >= 111 +# define BOOST_PP_ITERATION_5 111 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 112 && BOOST_PP_ITERATION_FINISH_5 >= 112 +# define BOOST_PP_ITERATION_5 112 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 113 && BOOST_PP_ITERATION_FINISH_5 >= 113 +# define BOOST_PP_ITERATION_5 113 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 114 && BOOST_PP_ITERATION_FINISH_5 >= 114 +# define BOOST_PP_ITERATION_5 114 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 115 && BOOST_PP_ITERATION_FINISH_5 >= 115 +# define BOOST_PP_ITERATION_5 115 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 116 && BOOST_PP_ITERATION_FINISH_5 >= 116 +# define BOOST_PP_ITERATION_5 116 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 117 && BOOST_PP_ITERATION_FINISH_5 >= 117 +# define BOOST_PP_ITERATION_5 117 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 118 && BOOST_PP_ITERATION_FINISH_5 >= 118 +# define BOOST_PP_ITERATION_5 118 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 119 && BOOST_PP_ITERATION_FINISH_5 >= 119 +# define BOOST_PP_ITERATION_5 119 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 120 && BOOST_PP_ITERATION_FINISH_5 >= 120 +# define BOOST_PP_ITERATION_5 120 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 121 && BOOST_PP_ITERATION_FINISH_5 >= 121 +# define BOOST_PP_ITERATION_5 121 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 122 && BOOST_PP_ITERATION_FINISH_5 >= 122 +# define BOOST_PP_ITERATION_5 122 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 123 && BOOST_PP_ITERATION_FINISH_5 >= 123 +# define BOOST_PP_ITERATION_5 123 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 124 && BOOST_PP_ITERATION_FINISH_5 >= 124 +# define BOOST_PP_ITERATION_5 124 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 125 && BOOST_PP_ITERATION_FINISH_5 >= 125 +# define BOOST_PP_ITERATION_5 125 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 126 && BOOST_PP_ITERATION_FINISH_5 >= 126 +# define BOOST_PP_ITERATION_5 126 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 127 && BOOST_PP_ITERATION_FINISH_5 >= 127 +# define BOOST_PP_ITERATION_5 127 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 128 && BOOST_PP_ITERATION_FINISH_5 >= 128 +# define BOOST_PP_ITERATION_5 128 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 129 && BOOST_PP_ITERATION_FINISH_5 >= 129 +# define BOOST_PP_ITERATION_5 129 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 130 && BOOST_PP_ITERATION_FINISH_5 >= 130 +# define BOOST_PP_ITERATION_5 130 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 131 && BOOST_PP_ITERATION_FINISH_5 >= 131 +# define BOOST_PP_ITERATION_5 131 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 132 && BOOST_PP_ITERATION_FINISH_5 >= 132 +# define BOOST_PP_ITERATION_5 132 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 133 && BOOST_PP_ITERATION_FINISH_5 >= 133 +# define BOOST_PP_ITERATION_5 133 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 134 && BOOST_PP_ITERATION_FINISH_5 >= 134 +# define BOOST_PP_ITERATION_5 134 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 135 && BOOST_PP_ITERATION_FINISH_5 >= 135 +# define BOOST_PP_ITERATION_5 135 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 136 && BOOST_PP_ITERATION_FINISH_5 >= 136 +# define BOOST_PP_ITERATION_5 136 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 137 && BOOST_PP_ITERATION_FINISH_5 >= 137 +# define BOOST_PP_ITERATION_5 137 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 138 && BOOST_PP_ITERATION_FINISH_5 >= 138 +# define BOOST_PP_ITERATION_5 138 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 139 && BOOST_PP_ITERATION_FINISH_5 >= 139 +# define BOOST_PP_ITERATION_5 139 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 140 && BOOST_PP_ITERATION_FINISH_5 >= 140 +# define BOOST_PP_ITERATION_5 140 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 141 && BOOST_PP_ITERATION_FINISH_5 >= 141 +# define BOOST_PP_ITERATION_5 141 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 142 && BOOST_PP_ITERATION_FINISH_5 >= 142 +# define BOOST_PP_ITERATION_5 142 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 143 && BOOST_PP_ITERATION_FINISH_5 >= 143 +# define BOOST_PP_ITERATION_5 143 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 144 && BOOST_PP_ITERATION_FINISH_5 >= 144 +# define BOOST_PP_ITERATION_5 144 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 145 && BOOST_PP_ITERATION_FINISH_5 >= 145 +# define BOOST_PP_ITERATION_5 145 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 146 && BOOST_PP_ITERATION_FINISH_5 >= 146 +# define BOOST_PP_ITERATION_5 146 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 147 && BOOST_PP_ITERATION_FINISH_5 >= 147 +# define BOOST_PP_ITERATION_5 147 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 148 && BOOST_PP_ITERATION_FINISH_5 >= 148 +# define BOOST_PP_ITERATION_5 148 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 149 && BOOST_PP_ITERATION_FINISH_5 >= 149 +# define BOOST_PP_ITERATION_5 149 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 150 && BOOST_PP_ITERATION_FINISH_5 >= 150 +# define BOOST_PP_ITERATION_5 150 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 151 && BOOST_PP_ITERATION_FINISH_5 >= 151 +# define BOOST_PP_ITERATION_5 151 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 152 && BOOST_PP_ITERATION_FINISH_5 >= 152 +# define BOOST_PP_ITERATION_5 152 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 153 && BOOST_PP_ITERATION_FINISH_5 >= 153 +# define BOOST_PP_ITERATION_5 153 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 154 && BOOST_PP_ITERATION_FINISH_5 >= 154 +# define BOOST_PP_ITERATION_5 154 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 155 && BOOST_PP_ITERATION_FINISH_5 >= 155 +# define BOOST_PP_ITERATION_5 155 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 156 && BOOST_PP_ITERATION_FINISH_5 >= 156 +# define BOOST_PP_ITERATION_5 156 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 157 && BOOST_PP_ITERATION_FINISH_5 >= 157 +# define BOOST_PP_ITERATION_5 157 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 158 && BOOST_PP_ITERATION_FINISH_5 >= 158 +# define BOOST_PP_ITERATION_5 158 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 159 && BOOST_PP_ITERATION_FINISH_5 >= 159 +# define BOOST_PP_ITERATION_5 159 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 160 && BOOST_PP_ITERATION_FINISH_5 >= 160 +# define BOOST_PP_ITERATION_5 160 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 161 && BOOST_PP_ITERATION_FINISH_5 >= 161 +# define BOOST_PP_ITERATION_5 161 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 162 && BOOST_PP_ITERATION_FINISH_5 >= 162 +# define BOOST_PP_ITERATION_5 162 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 163 && BOOST_PP_ITERATION_FINISH_5 >= 163 +# define BOOST_PP_ITERATION_5 163 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 164 && BOOST_PP_ITERATION_FINISH_5 >= 164 +# define BOOST_PP_ITERATION_5 164 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 165 && BOOST_PP_ITERATION_FINISH_5 >= 165 +# define BOOST_PP_ITERATION_5 165 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 166 && BOOST_PP_ITERATION_FINISH_5 >= 166 +# define BOOST_PP_ITERATION_5 166 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 167 && BOOST_PP_ITERATION_FINISH_5 >= 167 +# define BOOST_PP_ITERATION_5 167 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 168 && BOOST_PP_ITERATION_FINISH_5 >= 168 +# define BOOST_PP_ITERATION_5 168 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 169 && BOOST_PP_ITERATION_FINISH_5 >= 169 +# define BOOST_PP_ITERATION_5 169 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 170 && BOOST_PP_ITERATION_FINISH_5 >= 170 +# define BOOST_PP_ITERATION_5 170 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 171 && BOOST_PP_ITERATION_FINISH_5 >= 171 +# define BOOST_PP_ITERATION_5 171 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 172 && BOOST_PP_ITERATION_FINISH_5 >= 172 +# define BOOST_PP_ITERATION_5 172 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 173 && BOOST_PP_ITERATION_FINISH_5 >= 173 +# define BOOST_PP_ITERATION_5 173 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 174 && BOOST_PP_ITERATION_FINISH_5 >= 174 +# define BOOST_PP_ITERATION_5 174 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 175 && BOOST_PP_ITERATION_FINISH_5 >= 175 +# define BOOST_PP_ITERATION_5 175 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 176 && BOOST_PP_ITERATION_FINISH_5 >= 176 +# define BOOST_PP_ITERATION_5 176 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 177 && BOOST_PP_ITERATION_FINISH_5 >= 177 +# define BOOST_PP_ITERATION_5 177 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 178 && BOOST_PP_ITERATION_FINISH_5 >= 178 +# define BOOST_PP_ITERATION_5 178 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 179 && BOOST_PP_ITERATION_FINISH_5 >= 179 +# define BOOST_PP_ITERATION_5 179 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 180 && BOOST_PP_ITERATION_FINISH_5 >= 180 +# define BOOST_PP_ITERATION_5 180 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 181 && BOOST_PP_ITERATION_FINISH_5 >= 181 +# define BOOST_PP_ITERATION_5 181 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 182 && BOOST_PP_ITERATION_FINISH_5 >= 182 +# define BOOST_PP_ITERATION_5 182 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 183 && BOOST_PP_ITERATION_FINISH_5 >= 183 +# define BOOST_PP_ITERATION_5 183 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 184 && BOOST_PP_ITERATION_FINISH_5 >= 184 +# define BOOST_PP_ITERATION_5 184 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 185 && BOOST_PP_ITERATION_FINISH_5 >= 185 +# define BOOST_PP_ITERATION_5 185 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 186 && BOOST_PP_ITERATION_FINISH_5 >= 186 +# define BOOST_PP_ITERATION_5 186 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 187 && BOOST_PP_ITERATION_FINISH_5 >= 187 +# define BOOST_PP_ITERATION_5 187 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 188 && BOOST_PP_ITERATION_FINISH_5 >= 188 +# define BOOST_PP_ITERATION_5 188 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 189 && BOOST_PP_ITERATION_FINISH_5 >= 189 +# define BOOST_PP_ITERATION_5 189 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 190 && BOOST_PP_ITERATION_FINISH_5 >= 190 +# define BOOST_PP_ITERATION_5 190 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 191 && BOOST_PP_ITERATION_FINISH_5 >= 191 +# define BOOST_PP_ITERATION_5 191 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 192 && BOOST_PP_ITERATION_FINISH_5 >= 192 +# define BOOST_PP_ITERATION_5 192 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 193 && BOOST_PP_ITERATION_FINISH_5 >= 193 +# define BOOST_PP_ITERATION_5 193 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 194 && BOOST_PP_ITERATION_FINISH_5 >= 194 +# define BOOST_PP_ITERATION_5 194 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 195 && BOOST_PP_ITERATION_FINISH_5 >= 195 +# define BOOST_PP_ITERATION_5 195 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 196 && BOOST_PP_ITERATION_FINISH_5 >= 196 +# define BOOST_PP_ITERATION_5 196 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 197 && BOOST_PP_ITERATION_FINISH_5 >= 197 +# define BOOST_PP_ITERATION_5 197 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 198 && BOOST_PP_ITERATION_FINISH_5 >= 198 +# define BOOST_PP_ITERATION_5 198 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 199 && BOOST_PP_ITERATION_FINISH_5 >= 199 +# define BOOST_PP_ITERATION_5 199 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 200 && BOOST_PP_ITERATION_FINISH_5 >= 200 +# define BOOST_PP_ITERATION_5 200 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 201 && BOOST_PP_ITERATION_FINISH_5 >= 201 +# define BOOST_PP_ITERATION_5 201 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 202 && BOOST_PP_ITERATION_FINISH_5 >= 202 +# define BOOST_PP_ITERATION_5 202 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 203 && BOOST_PP_ITERATION_FINISH_5 >= 203 +# define BOOST_PP_ITERATION_5 203 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 204 && BOOST_PP_ITERATION_FINISH_5 >= 204 +# define BOOST_PP_ITERATION_5 204 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 205 && BOOST_PP_ITERATION_FINISH_5 >= 205 +# define BOOST_PP_ITERATION_5 205 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 206 && BOOST_PP_ITERATION_FINISH_5 >= 206 +# define BOOST_PP_ITERATION_5 206 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 207 && BOOST_PP_ITERATION_FINISH_5 >= 207 +# define BOOST_PP_ITERATION_5 207 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 208 && BOOST_PP_ITERATION_FINISH_5 >= 208 +# define BOOST_PP_ITERATION_5 208 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 209 && BOOST_PP_ITERATION_FINISH_5 >= 209 +# define BOOST_PP_ITERATION_5 209 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 210 && BOOST_PP_ITERATION_FINISH_5 >= 210 +# define BOOST_PP_ITERATION_5 210 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 211 && BOOST_PP_ITERATION_FINISH_5 >= 211 +# define BOOST_PP_ITERATION_5 211 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 212 && BOOST_PP_ITERATION_FINISH_5 >= 212 +# define BOOST_PP_ITERATION_5 212 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 213 && BOOST_PP_ITERATION_FINISH_5 >= 213 +# define BOOST_PP_ITERATION_5 213 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 214 && BOOST_PP_ITERATION_FINISH_5 >= 214 +# define BOOST_PP_ITERATION_5 214 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 215 && BOOST_PP_ITERATION_FINISH_5 >= 215 +# define BOOST_PP_ITERATION_5 215 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 216 && BOOST_PP_ITERATION_FINISH_5 >= 216 +# define BOOST_PP_ITERATION_5 216 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 217 && BOOST_PP_ITERATION_FINISH_5 >= 217 +# define BOOST_PP_ITERATION_5 217 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 218 && BOOST_PP_ITERATION_FINISH_5 >= 218 +# define BOOST_PP_ITERATION_5 218 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 219 && BOOST_PP_ITERATION_FINISH_5 >= 219 +# define BOOST_PP_ITERATION_5 219 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 220 && BOOST_PP_ITERATION_FINISH_5 >= 220 +# define BOOST_PP_ITERATION_5 220 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 221 && BOOST_PP_ITERATION_FINISH_5 >= 221 +# define BOOST_PP_ITERATION_5 221 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 222 && BOOST_PP_ITERATION_FINISH_5 >= 222 +# define BOOST_PP_ITERATION_5 222 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 223 && BOOST_PP_ITERATION_FINISH_5 >= 223 +# define BOOST_PP_ITERATION_5 223 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 224 && BOOST_PP_ITERATION_FINISH_5 >= 224 +# define BOOST_PP_ITERATION_5 224 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 225 && BOOST_PP_ITERATION_FINISH_5 >= 225 +# define BOOST_PP_ITERATION_5 225 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 226 && BOOST_PP_ITERATION_FINISH_5 >= 226 +# define BOOST_PP_ITERATION_5 226 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 227 && BOOST_PP_ITERATION_FINISH_5 >= 227 +# define BOOST_PP_ITERATION_5 227 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 228 && BOOST_PP_ITERATION_FINISH_5 >= 228 +# define BOOST_PP_ITERATION_5 228 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 229 && BOOST_PP_ITERATION_FINISH_5 >= 229 +# define BOOST_PP_ITERATION_5 229 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 230 && BOOST_PP_ITERATION_FINISH_5 >= 230 +# define BOOST_PP_ITERATION_5 230 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 231 && BOOST_PP_ITERATION_FINISH_5 >= 231 +# define BOOST_PP_ITERATION_5 231 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 232 && BOOST_PP_ITERATION_FINISH_5 >= 232 +# define BOOST_PP_ITERATION_5 232 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 233 && BOOST_PP_ITERATION_FINISH_5 >= 233 +# define BOOST_PP_ITERATION_5 233 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 234 && BOOST_PP_ITERATION_FINISH_5 >= 234 +# define BOOST_PP_ITERATION_5 234 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 235 && BOOST_PP_ITERATION_FINISH_5 >= 235 +# define BOOST_PP_ITERATION_5 235 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 236 && BOOST_PP_ITERATION_FINISH_5 >= 236 +# define BOOST_PP_ITERATION_5 236 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 237 && BOOST_PP_ITERATION_FINISH_5 >= 237 +# define BOOST_PP_ITERATION_5 237 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 238 && BOOST_PP_ITERATION_FINISH_5 >= 238 +# define BOOST_PP_ITERATION_5 238 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 239 && BOOST_PP_ITERATION_FINISH_5 >= 239 +# define BOOST_PP_ITERATION_5 239 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 240 && BOOST_PP_ITERATION_FINISH_5 >= 240 +# define BOOST_PP_ITERATION_5 240 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 241 && BOOST_PP_ITERATION_FINISH_5 >= 241 +# define BOOST_PP_ITERATION_5 241 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 242 && BOOST_PP_ITERATION_FINISH_5 >= 242 +# define BOOST_PP_ITERATION_5 242 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 243 && BOOST_PP_ITERATION_FINISH_5 >= 243 +# define BOOST_PP_ITERATION_5 243 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 244 && BOOST_PP_ITERATION_FINISH_5 >= 244 +# define BOOST_PP_ITERATION_5 244 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 245 && BOOST_PP_ITERATION_FINISH_5 >= 245 +# define BOOST_PP_ITERATION_5 245 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 246 && BOOST_PP_ITERATION_FINISH_5 >= 246 +# define BOOST_PP_ITERATION_5 246 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 247 && BOOST_PP_ITERATION_FINISH_5 >= 247 +# define BOOST_PP_ITERATION_5 247 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 248 && BOOST_PP_ITERATION_FINISH_5 >= 248 +# define BOOST_PP_ITERATION_5 248 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 249 && BOOST_PP_ITERATION_FINISH_5 >= 249 +# define BOOST_PP_ITERATION_5 249 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 250 && BOOST_PP_ITERATION_FINISH_5 >= 250 +# define BOOST_PP_ITERATION_5 250 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 251 && BOOST_PP_ITERATION_FINISH_5 >= 251 +# define BOOST_PP_ITERATION_5 251 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 252 && BOOST_PP_ITERATION_FINISH_5 >= 252 +# define BOOST_PP_ITERATION_5 252 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 253 && BOOST_PP_ITERATION_FINISH_5 >= 253 +# define BOOST_PP_ITERATION_5 253 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 254 && BOOST_PP_ITERATION_FINISH_5 >= 254 +# define BOOST_PP_ITERATION_5 254 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 255 && BOOST_PP_ITERATION_FINISH_5 >= 255 +# define BOOST_PP_ITERATION_5 255 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_START_5 <= 256 && BOOST_PP_ITERATION_FINISH_5 >= 256 +# define BOOST_PP_ITERATION_5 256 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# endif +# +# undef BOOST_PP_ITERATION_DEPTH +# define BOOST_PP_ITERATION_DEPTH() 4 +# +# undef BOOST_PP_ITERATION_START_5 +# undef BOOST_PP_ITERATION_FINISH_5 +# undef BOOST_PP_FILENAME_5 +# +# undef BOOST_PP_ITERATION_FLAGS_5 +# undef BOOST_PP_ITERATION_PARAMS_5 diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/reverse1.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/reverse1.hpp new file mode 100644 index 0000000000..bf88d2f3a7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/reverse1.hpp @@ -0,0 +1,1296 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# if BOOST_PP_ITERATION_FINISH_1 <= 256 && BOOST_PP_ITERATION_START_1 >= 256 +# define BOOST_PP_ITERATION_1 256 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 255 && BOOST_PP_ITERATION_START_1 >= 255 +# define BOOST_PP_ITERATION_1 255 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 254 && BOOST_PP_ITERATION_START_1 >= 254 +# define BOOST_PP_ITERATION_1 254 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 253 && BOOST_PP_ITERATION_START_1 >= 253 +# define BOOST_PP_ITERATION_1 253 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 252 && BOOST_PP_ITERATION_START_1 >= 252 +# define BOOST_PP_ITERATION_1 252 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 251 && BOOST_PP_ITERATION_START_1 >= 251 +# define BOOST_PP_ITERATION_1 251 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 250 && BOOST_PP_ITERATION_START_1 >= 250 +# define BOOST_PP_ITERATION_1 250 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 249 && BOOST_PP_ITERATION_START_1 >= 249 +# define BOOST_PP_ITERATION_1 249 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 248 && BOOST_PP_ITERATION_START_1 >= 248 +# define BOOST_PP_ITERATION_1 248 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 247 && BOOST_PP_ITERATION_START_1 >= 247 +# define BOOST_PP_ITERATION_1 247 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 246 && BOOST_PP_ITERATION_START_1 >= 246 +# define BOOST_PP_ITERATION_1 246 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 245 && BOOST_PP_ITERATION_START_1 >= 245 +# define BOOST_PP_ITERATION_1 245 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 244 && BOOST_PP_ITERATION_START_1 >= 244 +# define BOOST_PP_ITERATION_1 244 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 243 && BOOST_PP_ITERATION_START_1 >= 243 +# define BOOST_PP_ITERATION_1 243 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 242 && BOOST_PP_ITERATION_START_1 >= 242 +# define BOOST_PP_ITERATION_1 242 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 241 && BOOST_PP_ITERATION_START_1 >= 241 +# define BOOST_PP_ITERATION_1 241 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 240 && BOOST_PP_ITERATION_START_1 >= 240 +# define BOOST_PP_ITERATION_1 240 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 239 && BOOST_PP_ITERATION_START_1 >= 239 +# define BOOST_PP_ITERATION_1 239 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 238 && BOOST_PP_ITERATION_START_1 >= 238 +# define BOOST_PP_ITERATION_1 238 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 237 && BOOST_PP_ITERATION_START_1 >= 237 +# define BOOST_PP_ITERATION_1 237 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 236 && BOOST_PP_ITERATION_START_1 >= 236 +# define BOOST_PP_ITERATION_1 236 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 235 && BOOST_PP_ITERATION_START_1 >= 235 +# define BOOST_PP_ITERATION_1 235 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 234 && BOOST_PP_ITERATION_START_1 >= 234 +# define BOOST_PP_ITERATION_1 234 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 233 && BOOST_PP_ITERATION_START_1 >= 233 +# define BOOST_PP_ITERATION_1 233 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 232 && BOOST_PP_ITERATION_START_1 >= 232 +# define BOOST_PP_ITERATION_1 232 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 231 && BOOST_PP_ITERATION_START_1 >= 231 +# define BOOST_PP_ITERATION_1 231 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 230 && BOOST_PP_ITERATION_START_1 >= 230 +# define BOOST_PP_ITERATION_1 230 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 229 && BOOST_PP_ITERATION_START_1 >= 229 +# define BOOST_PP_ITERATION_1 229 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 228 && BOOST_PP_ITERATION_START_1 >= 228 +# define BOOST_PP_ITERATION_1 228 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 227 && BOOST_PP_ITERATION_START_1 >= 227 +# define BOOST_PP_ITERATION_1 227 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 226 && BOOST_PP_ITERATION_START_1 >= 226 +# define BOOST_PP_ITERATION_1 226 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 225 && BOOST_PP_ITERATION_START_1 >= 225 +# define BOOST_PP_ITERATION_1 225 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 224 && BOOST_PP_ITERATION_START_1 >= 224 +# define BOOST_PP_ITERATION_1 224 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 223 && BOOST_PP_ITERATION_START_1 >= 223 +# define BOOST_PP_ITERATION_1 223 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 222 && BOOST_PP_ITERATION_START_1 >= 222 +# define BOOST_PP_ITERATION_1 222 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 221 && BOOST_PP_ITERATION_START_1 >= 221 +# define BOOST_PP_ITERATION_1 221 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 220 && BOOST_PP_ITERATION_START_1 >= 220 +# define BOOST_PP_ITERATION_1 220 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 219 && BOOST_PP_ITERATION_START_1 >= 219 +# define BOOST_PP_ITERATION_1 219 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 218 && BOOST_PP_ITERATION_START_1 >= 218 +# define BOOST_PP_ITERATION_1 218 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 217 && BOOST_PP_ITERATION_START_1 >= 217 +# define BOOST_PP_ITERATION_1 217 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 216 && BOOST_PP_ITERATION_START_1 >= 216 +# define BOOST_PP_ITERATION_1 216 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 215 && BOOST_PP_ITERATION_START_1 >= 215 +# define BOOST_PP_ITERATION_1 215 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 214 && BOOST_PP_ITERATION_START_1 >= 214 +# define BOOST_PP_ITERATION_1 214 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 213 && BOOST_PP_ITERATION_START_1 >= 213 +# define BOOST_PP_ITERATION_1 213 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 212 && BOOST_PP_ITERATION_START_1 >= 212 +# define BOOST_PP_ITERATION_1 212 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 211 && BOOST_PP_ITERATION_START_1 >= 211 +# define BOOST_PP_ITERATION_1 211 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 210 && BOOST_PP_ITERATION_START_1 >= 210 +# define BOOST_PP_ITERATION_1 210 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 209 && BOOST_PP_ITERATION_START_1 >= 209 +# define BOOST_PP_ITERATION_1 209 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 208 && BOOST_PP_ITERATION_START_1 >= 208 +# define BOOST_PP_ITERATION_1 208 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 207 && BOOST_PP_ITERATION_START_1 >= 207 +# define BOOST_PP_ITERATION_1 207 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 206 && BOOST_PP_ITERATION_START_1 >= 206 +# define BOOST_PP_ITERATION_1 206 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 205 && BOOST_PP_ITERATION_START_1 >= 205 +# define BOOST_PP_ITERATION_1 205 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 204 && BOOST_PP_ITERATION_START_1 >= 204 +# define BOOST_PP_ITERATION_1 204 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 203 && BOOST_PP_ITERATION_START_1 >= 203 +# define BOOST_PP_ITERATION_1 203 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 202 && BOOST_PP_ITERATION_START_1 >= 202 +# define BOOST_PP_ITERATION_1 202 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 201 && BOOST_PP_ITERATION_START_1 >= 201 +# define BOOST_PP_ITERATION_1 201 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 200 && BOOST_PP_ITERATION_START_1 >= 200 +# define BOOST_PP_ITERATION_1 200 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 199 && BOOST_PP_ITERATION_START_1 >= 199 +# define BOOST_PP_ITERATION_1 199 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 198 && BOOST_PP_ITERATION_START_1 >= 198 +# define BOOST_PP_ITERATION_1 198 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 197 && BOOST_PP_ITERATION_START_1 >= 197 +# define BOOST_PP_ITERATION_1 197 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 196 && BOOST_PP_ITERATION_START_1 >= 196 +# define BOOST_PP_ITERATION_1 196 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 195 && BOOST_PP_ITERATION_START_1 >= 195 +# define BOOST_PP_ITERATION_1 195 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 194 && BOOST_PP_ITERATION_START_1 >= 194 +# define BOOST_PP_ITERATION_1 194 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 193 && BOOST_PP_ITERATION_START_1 >= 193 +# define BOOST_PP_ITERATION_1 193 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 192 && BOOST_PP_ITERATION_START_1 >= 192 +# define BOOST_PP_ITERATION_1 192 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 191 && BOOST_PP_ITERATION_START_1 >= 191 +# define BOOST_PP_ITERATION_1 191 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 190 && BOOST_PP_ITERATION_START_1 >= 190 +# define BOOST_PP_ITERATION_1 190 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 189 && BOOST_PP_ITERATION_START_1 >= 189 +# define BOOST_PP_ITERATION_1 189 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 188 && BOOST_PP_ITERATION_START_1 >= 188 +# define BOOST_PP_ITERATION_1 188 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 187 && BOOST_PP_ITERATION_START_1 >= 187 +# define BOOST_PP_ITERATION_1 187 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 186 && BOOST_PP_ITERATION_START_1 >= 186 +# define BOOST_PP_ITERATION_1 186 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 185 && BOOST_PP_ITERATION_START_1 >= 185 +# define BOOST_PP_ITERATION_1 185 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 184 && BOOST_PP_ITERATION_START_1 >= 184 +# define BOOST_PP_ITERATION_1 184 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 183 && BOOST_PP_ITERATION_START_1 >= 183 +# define BOOST_PP_ITERATION_1 183 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 182 && BOOST_PP_ITERATION_START_1 >= 182 +# define BOOST_PP_ITERATION_1 182 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 181 && BOOST_PP_ITERATION_START_1 >= 181 +# define BOOST_PP_ITERATION_1 181 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 180 && BOOST_PP_ITERATION_START_1 >= 180 +# define BOOST_PP_ITERATION_1 180 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 179 && BOOST_PP_ITERATION_START_1 >= 179 +# define BOOST_PP_ITERATION_1 179 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 178 && BOOST_PP_ITERATION_START_1 >= 178 +# define BOOST_PP_ITERATION_1 178 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 177 && BOOST_PP_ITERATION_START_1 >= 177 +# define BOOST_PP_ITERATION_1 177 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 176 && BOOST_PP_ITERATION_START_1 >= 176 +# define BOOST_PP_ITERATION_1 176 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 175 && BOOST_PP_ITERATION_START_1 >= 175 +# define BOOST_PP_ITERATION_1 175 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 174 && BOOST_PP_ITERATION_START_1 >= 174 +# define BOOST_PP_ITERATION_1 174 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 173 && BOOST_PP_ITERATION_START_1 >= 173 +# define BOOST_PP_ITERATION_1 173 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 172 && BOOST_PP_ITERATION_START_1 >= 172 +# define BOOST_PP_ITERATION_1 172 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 171 && BOOST_PP_ITERATION_START_1 >= 171 +# define BOOST_PP_ITERATION_1 171 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 170 && BOOST_PP_ITERATION_START_1 >= 170 +# define BOOST_PP_ITERATION_1 170 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 169 && BOOST_PP_ITERATION_START_1 >= 169 +# define BOOST_PP_ITERATION_1 169 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 168 && BOOST_PP_ITERATION_START_1 >= 168 +# define BOOST_PP_ITERATION_1 168 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 167 && BOOST_PP_ITERATION_START_1 >= 167 +# define BOOST_PP_ITERATION_1 167 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 166 && BOOST_PP_ITERATION_START_1 >= 166 +# define BOOST_PP_ITERATION_1 166 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 165 && BOOST_PP_ITERATION_START_1 >= 165 +# define BOOST_PP_ITERATION_1 165 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 164 && BOOST_PP_ITERATION_START_1 >= 164 +# define BOOST_PP_ITERATION_1 164 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 163 && BOOST_PP_ITERATION_START_1 >= 163 +# define BOOST_PP_ITERATION_1 163 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 162 && BOOST_PP_ITERATION_START_1 >= 162 +# define BOOST_PP_ITERATION_1 162 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 161 && BOOST_PP_ITERATION_START_1 >= 161 +# define BOOST_PP_ITERATION_1 161 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 160 && BOOST_PP_ITERATION_START_1 >= 160 +# define BOOST_PP_ITERATION_1 160 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 159 && BOOST_PP_ITERATION_START_1 >= 159 +# define BOOST_PP_ITERATION_1 159 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 158 && BOOST_PP_ITERATION_START_1 >= 158 +# define BOOST_PP_ITERATION_1 158 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 157 && BOOST_PP_ITERATION_START_1 >= 157 +# define BOOST_PP_ITERATION_1 157 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 156 && BOOST_PP_ITERATION_START_1 >= 156 +# define BOOST_PP_ITERATION_1 156 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 155 && BOOST_PP_ITERATION_START_1 >= 155 +# define BOOST_PP_ITERATION_1 155 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 154 && BOOST_PP_ITERATION_START_1 >= 154 +# define BOOST_PP_ITERATION_1 154 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 153 && BOOST_PP_ITERATION_START_1 >= 153 +# define BOOST_PP_ITERATION_1 153 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 152 && BOOST_PP_ITERATION_START_1 >= 152 +# define BOOST_PP_ITERATION_1 152 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 151 && BOOST_PP_ITERATION_START_1 >= 151 +# define BOOST_PP_ITERATION_1 151 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 150 && BOOST_PP_ITERATION_START_1 >= 150 +# define BOOST_PP_ITERATION_1 150 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 149 && BOOST_PP_ITERATION_START_1 >= 149 +# define BOOST_PP_ITERATION_1 149 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 148 && BOOST_PP_ITERATION_START_1 >= 148 +# define BOOST_PP_ITERATION_1 148 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 147 && BOOST_PP_ITERATION_START_1 >= 147 +# define BOOST_PP_ITERATION_1 147 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 146 && BOOST_PP_ITERATION_START_1 >= 146 +# define BOOST_PP_ITERATION_1 146 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 145 && BOOST_PP_ITERATION_START_1 >= 145 +# define BOOST_PP_ITERATION_1 145 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 144 && BOOST_PP_ITERATION_START_1 >= 144 +# define BOOST_PP_ITERATION_1 144 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 143 && BOOST_PP_ITERATION_START_1 >= 143 +# define BOOST_PP_ITERATION_1 143 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 142 && BOOST_PP_ITERATION_START_1 >= 142 +# define BOOST_PP_ITERATION_1 142 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 141 && BOOST_PP_ITERATION_START_1 >= 141 +# define BOOST_PP_ITERATION_1 141 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 140 && BOOST_PP_ITERATION_START_1 >= 140 +# define BOOST_PP_ITERATION_1 140 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 139 && BOOST_PP_ITERATION_START_1 >= 139 +# define BOOST_PP_ITERATION_1 139 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 138 && BOOST_PP_ITERATION_START_1 >= 138 +# define BOOST_PP_ITERATION_1 138 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 137 && BOOST_PP_ITERATION_START_1 >= 137 +# define BOOST_PP_ITERATION_1 137 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 136 && BOOST_PP_ITERATION_START_1 >= 136 +# define BOOST_PP_ITERATION_1 136 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 135 && BOOST_PP_ITERATION_START_1 >= 135 +# define BOOST_PP_ITERATION_1 135 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 134 && BOOST_PP_ITERATION_START_1 >= 134 +# define BOOST_PP_ITERATION_1 134 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 133 && BOOST_PP_ITERATION_START_1 >= 133 +# define BOOST_PP_ITERATION_1 133 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 132 && BOOST_PP_ITERATION_START_1 >= 132 +# define BOOST_PP_ITERATION_1 132 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 131 && BOOST_PP_ITERATION_START_1 >= 131 +# define BOOST_PP_ITERATION_1 131 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 130 && BOOST_PP_ITERATION_START_1 >= 130 +# define BOOST_PP_ITERATION_1 130 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 129 && BOOST_PP_ITERATION_START_1 >= 129 +# define BOOST_PP_ITERATION_1 129 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 128 && BOOST_PP_ITERATION_START_1 >= 128 +# define BOOST_PP_ITERATION_1 128 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 127 && BOOST_PP_ITERATION_START_1 >= 127 +# define BOOST_PP_ITERATION_1 127 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 126 && BOOST_PP_ITERATION_START_1 >= 126 +# define BOOST_PP_ITERATION_1 126 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 125 && BOOST_PP_ITERATION_START_1 >= 125 +# define BOOST_PP_ITERATION_1 125 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 124 && BOOST_PP_ITERATION_START_1 >= 124 +# define BOOST_PP_ITERATION_1 124 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 123 && BOOST_PP_ITERATION_START_1 >= 123 +# define BOOST_PP_ITERATION_1 123 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 122 && BOOST_PP_ITERATION_START_1 >= 122 +# define BOOST_PP_ITERATION_1 122 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 121 && BOOST_PP_ITERATION_START_1 >= 121 +# define BOOST_PP_ITERATION_1 121 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 120 && BOOST_PP_ITERATION_START_1 >= 120 +# define BOOST_PP_ITERATION_1 120 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 119 && BOOST_PP_ITERATION_START_1 >= 119 +# define BOOST_PP_ITERATION_1 119 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 118 && BOOST_PP_ITERATION_START_1 >= 118 +# define BOOST_PP_ITERATION_1 118 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 117 && BOOST_PP_ITERATION_START_1 >= 117 +# define BOOST_PP_ITERATION_1 117 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 116 && BOOST_PP_ITERATION_START_1 >= 116 +# define BOOST_PP_ITERATION_1 116 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 115 && BOOST_PP_ITERATION_START_1 >= 115 +# define BOOST_PP_ITERATION_1 115 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 114 && BOOST_PP_ITERATION_START_1 >= 114 +# define BOOST_PP_ITERATION_1 114 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 113 && BOOST_PP_ITERATION_START_1 >= 113 +# define BOOST_PP_ITERATION_1 113 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 112 && BOOST_PP_ITERATION_START_1 >= 112 +# define BOOST_PP_ITERATION_1 112 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 111 && BOOST_PP_ITERATION_START_1 >= 111 +# define BOOST_PP_ITERATION_1 111 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 110 && BOOST_PP_ITERATION_START_1 >= 110 +# define BOOST_PP_ITERATION_1 110 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 109 && BOOST_PP_ITERATION_START_1 >= 109 +# define BOOST_PP_ITERATION_1 109 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 108 && BOOST_PP_ITERATION_START_1 >= 108 +# define BOOST_PP_ITERATION_1 108 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 107 && BOOST_PP_ITERATION_START_1 >= 107 +# define BOOST_PP_ITERATION_1 107 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 106 && BOOST_PP_ITERATION_START_1 >= 106 +# define BOOST_PP_ITERATION_1 106 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 105 && BOOST_PP_ITERATION_START_1 >= 105 +# define BOOST_PP_ITERATION_1 105 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 104 && BOOST_PP_ITERATION_START_1 >= 104 +# define BOOST_PP_ITERATION_1 104 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 103 && BOOST_PP_ITERATION_START_1 >= 103 +# define BOOST_PP_ITERATION_1 103 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 102 && BOOST_PP_ITERATION_START_1 >= 102 +# define BOOST_PP_ITERATION_1 102 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 101 && BOOST_PP_ITERATION_START_1 >= 101 +# define BOOST_PP_ITERATION_1 101 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 100 && BOOST_PP_ITERATION_START_1 >= 100 +# define BOOST_PP_ITERATION_1 100 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 99 && BOOST_PP_ITERATION_START_1 >= 99 +# define BOOST_PP_ITERATION_1 99 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 98 && BOOST_PP_ITERATION_START_1 >= 98 +# define BOOST_PP_ITERATION_1 98 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 97 && BOOST_PP_ITERATION_START_1 >= 97 +# define BOOST_PP_ITERATION_1 97 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 96 && BOOST_PP_ITERATION_START_1 >= 96 +# define BOOST_PP_ITERATION_1 96 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 95 && BOOST_PP_ITERATION_START_1 >= 95 +# define BOOST_PP_ITERATION_1 95 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 94 && BOOST_PP_ITERATION_START_1 >= 94 +# define BOOST_PP_ITERATION_1 94 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 93 && BOOST_PP_ITERATION_START_1 >= 93 +# define BOOST_PP_ITERATION_1 93 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 92 && BOOST_PP_ITERATION_START_1 >= 92 +# define BOOST_PP_ITERATION_1 92 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 91 && BOOST_PP_ITERATION_START_1 >= 91 +# define BOOST_PP_ITERATION_1 91 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 90 && BOOST_PP_ITERATION_START_1 >= 90 +# define BOOST_PP_ITERATION_1 90 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 89 && BOOST_PP_ITERATION_START_1 >= 89 +# define BOOST_PP_ITERATION_1 89 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 88 && BOOST_PP_ITERATION_START_1 >= 88 +# define BOOST_PP_ITERATION_1 88 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 87 && BOOST_PP_ITERATION_START_1 >= 87 +# define BOOST_PP_ITERATION_1 87 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 86 && BOOST_PP_ITERATION_START_1 >= 86 +# define BOOST_PP_ITERATION_1 86 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 85 && BOOST_PP_ITERATION_START_1 >= 85 +# define BOOST_PP_ITERATION_1 85 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 84 && BOOST_PP_ITERATION_START_1 >= 84 +# define BOOST_PP_ITERATION_1 84 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 83 && BOOST_PP_ITERATION_START_1 >= 83 +# define BOOST_PP_ITERATION_1 83 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 82 && BOOST_PP_ITERATION_START_1 >= 82 +# define BOOST_PP_ITERATION_1 82 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 81 && BOOST_PP_ITERATION_START_1 >= 81 +# define BOOST_PP_ITERATION_1 81 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 80 && BOOST_PP_ITERATION_START_1 >= 80 +# define BOOST_PP_ITERATION_1 80 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 79 && BOOST_PP_ITERATION_START_1 >= 79 +# define BOOST_PP_ITERATION_1 79 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 78 && BOOST_PP_ITERATION_START_1 >= 78 +# define BOOST_PP_ITERATION_1 78 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 77 && BOOST_PP_ITERATION_START_1 >= 77 +# define BOOST_PP_ITERATION_1 77 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 76 && BOOST_PP_ITERATION_START_1 >= 76 +# define BOOST_PP_ITERATION_1 76 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 75 && BOOST_PP_ITERATION_START_1 >= 75 +# define BOOST_PP_ITERATION_1 75 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 74 && BOOST_PP_ITERATION_START_1 >= 74 +# define BOOST_PP_ITERATION_1 74 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 73 && BOOST_PP_ITERATION_START_1 >= 73 +# define BOOST_PP_ITERATION_1 73 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 72 && BOOST_PP_ITERATION_START_1 >= 72 +# define BOOST_PP_ITERATION_1 72 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 71 && BOOST_PP_ITERATION_START_1 >= 71 +# define BOOST_PP_ITERATION_1 71 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 70 && BOOST_PP_ITERATION_START_1 >= 70 +# define BOOST_PP_ITERATION_1 70 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 69 && BOOST_PP_ITERATION_START_1 >= 69 +# define BOOST_PP_ITERATION_1 69 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 68 && BOOST_PP_ITERATION_START_1 >= 68 +# define BOOST_PP_ITERATION_1 68 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 67 && BOOST_PP_ITERATION_START_1 >= 67 +# define BOOST_PP_ITERATION_1 67 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 66 && BOOST_PP_ITERATION_START_1 >= 66 +# define BOOST_PP_ITERATION_1 66 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 65 && BOOST_PP_ITERATION_START_1 >= 65 +# define BOOST_PP_ITERATION_1 65 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 64 && BOOST_PP_ITERATION_START_1 >= 64 +# define BOOST_PP_ITERATION_1 64 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 63 && BOOST_PP_ITERATION_START_1 >= 63 +# define BOOST_PP_ITERATION_1 63 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 62 && BOOST_PP_ITERATION_START_1 >= 62 +# define BOOST_PP_ITERATION_1 62 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 61 && BOOST_PP_ITERATION_START_1 >= 61 +# define BOOST_PP_ITERATION_1 61 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 60 && BOOST_PP_ITERATION_START_1 >= 60 +# define BOOST_PP_ITERATION_1 60 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 59 && BOOST_PP_ITERATION_START_1 >= 59 +# define BOOST_PP_ITERATION_1 59 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 58 && BOOST_PP_ITERATION_START_1 >= 58 +# define BOOST_PP_ITERATION_1 58 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 57 && BOOST_PP_ITERATION_START_1 >= 57 +# define BOOST_PP_ITERATION_1 57 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 56 && BOOST_PP_ITERATION_START_1 >= 56 +# define BOOST_PP_ITERATION_1 56 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 55 && BOOST_PP_ITERATION_START_1 >= 55 +# define BOOST_PP_ITERATION_1 55 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 54 && BOOST_PP_ITERATION_START_1 >= 54 +# define BOOST_PP_ITERATION_1 54 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 53 && BOOST_PP_ITERATION_START_1 >= 53 +# define BOOST_PP_ITERATION_1 53 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 52 && BOOST_PP_ITERATION_START_1 >= 52 +# define BOOST_PP_ITERATION_1 52 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 51 && BOOST_PP_ITERATION_START_1 >= 51 +# define BOOST_PP_ITERATION_1 51 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 50 && BOOST_PP_ITERATION_START_1 >= 50 +# define BOOST_PP_ITERATION_1 50 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 49 && BOOST_PP_ITERATION_START_1 >= 49 +# define BOOST_PP_ITERATION_1 49 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 48 && BOOST_PP_ITERATION_START_1 >= 48 +# define BOOST_PP_ITERATION_1 48 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 47 && BOOST_PP_ITERATION_START_1 >= 47 +# define BOOST_PP_ITERATION_1 47 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 46 && BOOST_PP_ITERATION_START_1 >= 46 +# define BOOST_PP_ITERATION_1 46 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 45 && BOOST_PP_ITERATION_START_1 >= 45 +# define BOOST_PP_ITERATION_1 45 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 44 && BOOST_PP_ITERATION_START_1 >= 44 +# define BOOST_PP_ITERATION_1 44 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 43 && BOOST_PP_ITERATION_START_1 >= 43 +# define BOOST_PP_ITERATION_1 43 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 42 && BOOST_PP_ITERATION_START_1 >= 42 +# define BOOST_PP_ITERATION_1 42 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 41 && BOOST_PP_ITERATION_START_1 >= 41 +# define BOOST_PP_ITERATION_1 41 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 40 && BOOST_PP_ITERATION_START_1 >= 40 +# define BOOST_PP_ITERATION_1 40 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 39 && BOOST_PP_ITERATION_START_1 >= 39 +# define BOOST_PP_ITERATION_1 39 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 38 && BOOST_PP_ITERATION_START_1 >= 38 +# define BOOST_PP_ITERATION_1 38 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 37 && BOOST_PP_ITERATION_START_1 >= 37 +# define BOOST_PP_ITERATION_1 37 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 36 && BOOST_PP_ITERATION_START_1 >= 36 +# define BOOST_PP_ITERATION_1 36 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 35 && BOOST_PP_ITERATION_START_1 >= 35 +# define BOOST_PP_ITERATION_1 35 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 34 && BOOST_PP_ITERATION_START_1 >= 34 +# define BOOST_PP_ITERATION_1 34 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 33 && BOOST_PP_ITERATION_START_1 >= 33 +# define BOOST_PP_ITERATION_1 33 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 32 && BOOST_PP_ITERATION_START_1 >= 32 +# define BOOST_PP_ITERATION_1 32 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 31 && BOOST_PP_ITERATION_START_1 >= 31 +# define BOOST_PP_ITERATION_1 31 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 30 && BOOST_PP_ITERATION_START_1 >= 30 +# define BOOST_PP_ITERATION_1 30 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 29 && BOOST_PP_ITERATION_START_1 >= 29 +# define BOOST_PP_ITERATION_1 29 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 28 && BOOST_PP_ITERATION_START_1 >= 28 +# define BOOST_PP_ITERATION_1 28 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 27 && BOOST_PP_ITERATION_START_1 >= 27 +# define BOOST_PP_ITERATION_1 27 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 26 && BOOST_PP_ITERATION_START_1 >= 26 +# define BOOST_PP_ITERATION_1 26 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 25 && BOOST_PP_ITERATION_START_1 >= 25 +# define BOOST_PP_ITERATION_1 25 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 24 && BOOST_PP_ITERATION_START_1 >= 24 +# define BOOST_PP_ITERATION_1 24 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 23 && BOOST_PP_ITERATION_START_1 >= 23 +# define BOOST_PP_ITERATION_1 23 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 22 && BOOST_PP_ITERATION_START_1 >= 22 +# define BOOST_PP_ITERATION_1 22 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 21 && BOOST_PP_ITERATION_START_1 >= 21 +# define BOOST_PP_ITERATION_1 21 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 20 && BOOST_PP_ITERATION_START_1 >= 20 +# define BOOST_PP_ITERATION_1 20 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 19 && BOOST_PP_ITERATION_START_1 >= 19 +# define BOOST_PP_ITERATION_1 19 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 18 && BOOST_PP_ITERATION_START_1 >= 18 +# define BOOST_PP_ITERATION_1 18 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 17 && BOOST_PP_ITERATION_START_1 >= 17 +# define BOOST_PP_ITERATION_1 17 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 16 && BOOST_PP_ITERATION_START_1 >= 16 +# define BOOST_PP_ITERATION_1 16 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 15 && BOOST_PP_ITERATION_START_1 >= 15 +# define BOOST_PP_ITERATION_1 15 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 14 && BOOST_PP_ITERATION_START_1 >= 14 +# define BOOST_PP_ITERATION_1 14 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 13 && BOOST_PP_ITERATION_START_1 >= 13 +# define BOOST_PP_ITERATION_1 13 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 12 && BOOST_PP_ITERATION_START_1 >= 12 +# define BOOST_PP_ITERATION_1 12 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 11 && BOOST_PP_ITERATION_START_1 >= 11 +# define BOOST_PP_ITERATION_1 11 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 10 && BOOST_PP_ITERATION_START_1 >= 10 +# define BOOST_PP_ITERATION_1 10 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 9 && BOOST_PP_ITERATION_START_1 >= 9 +# define BOOST_PP_ITERATION_1 9 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 8 && BOOST_PP_ITERATION_START_1 >= 8 +# define BOOST_PP_ITERATION_1 8 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 7 && BOOST_PP_ITERATION_START_1 >= 7 +# define BOOST_PP_ITERATION_1 7 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 6 && BOOST_PP_ITERATION_START_1 >= 6 +# define BOOST_PP_ITERATION_1 6 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 5 && BOOST_PP_ITERATION_START_1 >= 5 +# define BOOST_PP_ITERATION_1 5 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 4 && BOOST_PP_ITERATION_START_1 >= 4 +# define BOOST_PP_ITERATION_1 4 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 3 && BOOST_PP_ITERATION_START_1 >= 3 +# define BOOST_PP_ITERATION_1 3 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 2 && BOOST_PP_ITERATION_START_1 >= 2 +# define BOOST_PP_ITERATION_1 2 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 1 && BOOST_PP_ITERATION_START_1 >= 1 +# define BOOST_PP_ITERATION_1 1 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif +# if BOOST_PP_ITERATION_FINISH_1 <= 0 && BOOST_PP_ITERATION_START_1 >= 0 +# define BOOST_PP_ITERATION_1 0 +# include BOOST_PP_FILENAME_1 +# undef BOOST_PP_ITERATION_1 +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/reverse2.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/reverse2.hpp new file mode 100644 index 0000000000..521bd249be --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/reverse2.hpp @@ -0,0 +1,1296 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# if BOOST_PP_ITERATION_FINISH_2 <= 256 && BOOST_PP_ITERATION_START_2 >= 256 +# define BOOST_PP_ITERATION_2 256 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 255 && BOOST_PP_ITERATION_START_2 >= 255 +# define BOOST_PP_ITERATION_2 255 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 254 && BOOST_PP_ITERATION_START_2 >= 254 +# define BOOST_PP_ITERATION_2 254 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 253 && BOOST_PP_ITERATION_START_2 >= 253 +# define BOOST_PP_ITERATION_2 253 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 252 && BOOST_PP_ITERATION_START_2 >= 252 +# define BOOST_PP_ITERATION_2 252 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 251 && BOOST_PP_ITERATION_START_2 >= 251 +# define BOOST_PP_ITERATION_2 251 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 250 && BOOST_PP_ITERATION_START_2 >= 250 +# define BOOST_PP_ITERATION_2 250 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 249 && BOOST_PP_ITERATION_START_2 >= 249 +# define BOOST_PP_ITERATION_2 249 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 248 && BOOST_PP_ITERATION_START_2 >= 248 +# define BOOST_PP_ITERATION_2 248 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 247 && BOOST_PP_ITERATION_START_2 >= 247 +# define BOOST_PP_ITERATION_2 247 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 246 && BOOST_PP_ITERATION_START_2 >= 246 +# define BOOST_PP_ITERATION_2 246 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 245 && BOOST_PP_ITERATION_START_2 >= 245 +# define BOOST_PP_ITERATION_2 245 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 244 && BOOST_PP_ITERATION_START_2 >= 244 +# define BOOST_PP_ITERATION_2 244 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 243 && BOOST_PP_ITERATION_START_2 >= 243 +# define BOOST_PP_ITERATION_2 243 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 242 && BOOST_PP_ITERATION_START_2 >= 242 +# define BOOST_PP_ITERATION_2 242 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 241 && BOOST_PP_ITERATION_START_2 >= 241 +# define BOOST_PP_ITERATION_2 241 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 240 && BOOST_PP_ITERATION_START_2 >= 240 +# define BOOST_PP_ITERATION_2 240 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 239 && BOOST_PP_ITERATION_START_2 >= 239 +# define BOOST_PP_ITERATION_2 239 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 238 && BOOST_PP_ITERATION_START_2 >= 238 +# define BOOST_PP_ITERATION_2 238 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 237 && BOOST_PP_ITERATION_START_2 >= 237 +# define BOOST_PP_ITERATION_2 237 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 236 && BOOST_PP_ITERATION_START_2 >= 236 +# define BOOST_PP_ITERATION_2 236 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 235 && BOOST_PP_ITERATION_START_2 >= 235 +# define BOOST_PP_ITERATION_2 235 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 234 && BOOST_PP_ITERATION_START_2 >= 234 +# define BOOST_PP_ITERATION_2 234 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 233 && BOOST_PP_ITERATION_START_2 >= 233 +# define BOOST_PP_ITERATION_2 233 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 232 && BOOST_PP_ITERATION_START_2 >= 232 +# define BOOST_PP_ITERATION_2 232 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 231 && BOOST_PP_ITERATION_START_2 >= 231 +# define BOOST_PP_ITERATION_2 231 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 230 && BOOST_PP_ITERATION_START_2 >= 230 +# define BOOST_PP_ITERATION_2 230 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 229 && BOOST_PP_ITERATION_START_2 >= 229 +# define BOOST_PP_ITERATION_2 229 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 228 && BOOST_PP_ITERATION_START_2 >= 228 +# define BOOST_PP_ITERATION_2 228 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 227 && BOOST_PP_ITERATION_START_2 >= 227 +# define BOOST_PP_ITERATION_2 227 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 226 && BOOST_PP_ITERATION_START_2 >= 226 +# define BOOST_PP_ITERATION_2 226 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 225 && BOOST_PP_ITERATION_START_2 >= 225 +# define BOOST_PP_ITERATION_2 225 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 224 && BOOST_PP_ITERATION_START_2 >= 224 +# define BOOST_PP_ITERATION_2 224 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 223 && BOOST_PP_ITERATION_START_2 >= 223 +# define BOOST_PP_ITERATION_2 223 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 222 && BOOST_PP_ITERATION_START_2 >= 222 +# define BOOST_PP_ITERATION_2 222 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 221 && BOOST_PP_ITERATION_START_2 >= 221 +# define BOOST_PP_ITERATION_2 221 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 220 && BOOST_PP_ITERATION_START_2 >= 220 +# define BOOST_PP_ITERATION_2 220 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 219 && BOOST_PP_ITERATION_START_2 >= 219 +# define BOOST_PP_ITERATION_2 219 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 218 && BOOST_PP_ITERATION_START_2 >= 218 +# define BOOST_PP_ITERATION_2 218 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 217 && BOOST_PP_ITERATION_START_2 >= 217 +# define BOOST_PP_ITERATION_2 217 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 216 && BOOST_PP_ITERATION_START_2 >= 216 +# define BOOST_PP_ITERATION_2 216 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 215 && BOOST_PP_ITERATION_START_2 >= 215 +# define BOOST_PP_ITERATION_2 215 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 214 && BOOST_PP_ITERATION_START_2 >= 214 +# define BOOST_PP_ITERATION_2 214 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 213 && BOOST_PP_ITERATION_START_2 >= 213 +# define BOOST_PP_ITERATION_2 213 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 212 && BOOST_PP_ITERATION_START_2 >= 212 +# define BOOST_PP_ITERATION_2 212 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 211 && BOOST_PP_ITERATION_START_2 >= 211 +# define BOOST_PP_ITERATION_2 211 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 210 && BOOST_PP_ITERATION_START_2 >= 210 +# define BOOST_PP_ITERATION_2 210 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 209 && BOOST_PP_ITERATION_START_2 >= 209 +# define BOOST_PP_ITERATION_2 209 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 208 && BOOST_PP_ITERATION_START_2 >= 208 +# define BOOST_PP_ITERATION_2 208 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 207 && BOOST_PP_ITERATION_START_2 >= 207 +# define BOOST_PP_ITERATION_2 207 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 206 && BOOST_PP_ITERATION_START_2 >= 206 +# define BOOST_PP_ITERATION_2 206 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 205 && BOOST_PP_ITERATION_START_2 >= 205 +# define BOOST_PP_ITERATION_2 205 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 204 && BOOST_PP_ITERATION_START_2 >= 204 +# define BOOST_PP_ITERATION_2 204 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 203 && BOOST_PP_ITERATION_START_2 >= 203 +# define BOOST_PP_ITERATION_2 203 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 202 && BOOST_PP_ITERATION_START_2 >= 202 +# define BOOST_PP_ITERATION_2 202 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 201 && BOOST_PP_ITERATION_START_2 >= 201 +# define BOOST_PP_ITERATION_2 201 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 200 && BOOST_PP_ITERATION_START_2 >= 200 +# define BOOST_PP_ITERATION_2 200 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 199 && BOOST_PP_ITERATION_START_2 >= 199 +# define BOOST_PP_ITERATION_2 199 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 198 && BOOST_PP_ITERATION_START_2 >= 198 +# define BOOST_PP_ITERATION_2 198 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 197 && BOOST_PP_ITERATION_START_2 >= 197 +# define BOOST_PP_ITERATION_2 197 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 196 && BOOST_PP_ITERATION_START_2 >= 196 +# define BOOST_PP_ITERATION_2 196 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 195 && BOOST_PP_ITERATION_START_2 >= 195 +# define BOOST_PP_ITERATION_2 195 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 194 && BOOST_PP_ITERATION_START_2 >= 194 +# define BOOST_PP_ITERATION_2 194 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 193 && BOOST_PP_ITERATION_START_2 >= 193 +# define BOOST_PP_ITERATION_2 193 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 192 && BOOST_PP_ITERATION_START_2 >= 192 +# define BOOST_PP_ITERATION_2 192 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 191 && BOOST_PP_ITERATION_START_2 >= 191 +# define BOOST_PP_ITERATION_2 191 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 190 && BOOST_PP_ITERATION_START_2 >= 190 +# define BOOST_PP_ITERATION_2 190 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 189 && BOOST_PP_ITERATION_START_2 >= 189 +# define BOOST_PP_ITERATION_2 189 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 188 && BOOST_PP_ITERATION_START_2 >= 188 +# define BOOST_PP_ITERATION_2 188 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 187 && BOOST_PP_ITERATION_START_2 >= 187 +# define BOOST_PP_ITERATION_2 187 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 186 && BOOST_PP_ITERATION_START_2 >= 186 +# define BOOST_PP_ITERATION_2 186 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 185 && BOOST_PP_ITERATION_START_2 >= 185 +# define BOOST_PP_ITERATION_2 185 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 184 && BOOST_PP_ITERATION_START_2 >= 184 +# define BOOST_PP_ITERATION_2 184 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 183 && BOOST_PP_ITERATION_START_2 >= 183 +# define BOOST_PP_ITERATION_2 183 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 182 && BOOST_PP_ITERATION_START_2 >= 182 +# define BOOST_PP_ITERATION_2 182 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 181 && BOOST_PP_ITERATION_START_2 >= 181 +# define BOOST_PP_ITERATION_2 181 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 180 && BOOST_PP_ITERATION_START_2 >= 180 +# define BOOST_PP_ITERATION_2 180 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 179 && BOOST_PP_ITERATION_START_2 >= 179 +# define BOOST_PP_ITERATION_2 179 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 178 && BOOST_PP_ITERATION_START_2 >= 178 +# define BOOST_PP_ITERATION_2 178 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 177 && BOOST_PP_ITERATION_START_2 >= 177 +# define BOOST_PP_ITERATION_2 177 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 176 && BOOST_PP_ITERATION_START_2 >= 176 +# define BOOST_PP_ITERATION_2 176 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 175 && BOOST_PP_ITERATION_START_2 >= 175 +# define BOOST_PP_ITERATION_2 175 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 174 && BOOST_PP_ITERATION_START_2 >= 174 +# define BOOST_PP_ITERATION_2 174 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 173 && BOOST_PP_ITERATION_START_2 >= 173 +# define BOOST_PP_ITERATION_2 173 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 172 && BOOST_PP_ITERATION_START_2 >= 172 +# define BOOST_PP_ITERATION_2 172 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 171 && BOOST_PP_ITERATION_START_2 >= 171 +# define BOOST_PP_ITERATION_2 171 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 170 && BOOST_PP_ITERATION_START_2 >= 170 +# define BOOST_PP_ITERATION_2 170 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 169 && BOOST_PP_ITERATION_START_2 >= 169 +# define BOOST_PP_ITERATION_2 169 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 168 && BOOST_PP_ITERATION_START_2 >= 168 +# define BOOST_PP_ITERATION_2 168 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 167 && BOOST_PP_ITERATION_START_2 >= 167 +# define BOOST_PP_ITERATION_2 167 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 166 && BOOST_PP_ITERATION_START_2 >= 166 +# define BOOST_PP_ITERATION_2 166 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 165 && BOOST_PP_ITERATION_START_2 >= 165 +# define BOOST_PP_ITERATION_2 165 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 164 && BOOST_PP_ITERATION_START_2 >= 164 +# define BOOST_PP_ITERATION_2 164 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 163 && BOOST_PP_ITERATION_START_2 >= 163 +# define BOOST_PP_ITERATION_2 163 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 162 && BOOST_PP_ITERATION_START_2 >= 162 +# define BOOST_PP_ITERATION_2 162 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 161 && BOOST_PP_ITERATION_START_2 >= 161 +# define BOOST_PP_ITERATION_2 161 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 160 && BOOST_PP_ITERATION_START_2 >= 160 +# define BOOST_PP_ITERATION_2 160 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 159 && BOOST_PP_ITERATION_START_2 >= 159 +# define BOOST_PP_ITERATION_2 159 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 158 && BOOST_PP_ITERATION_START_2 >= 158 +# define BOOST_PP_ITERATION_2 158 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 157 && BOOST_PP_ITERATION_START_2 >= 157 +# define BOOST_PP_ITERATION_2 157 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 156 && BOOST_PP_ITERATION_START_2 >= 156 +# define BOOST_PP_ITERATION_2 156 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 155 && BOOST_PP_ITERATION_START_2 >= 155 +# define BOOST_PP_ITERATION_2 155 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 154 && BOOST_PP_ITERATION_START_2 >= 154 +# define BOOST_PP_ITERATION_2 154 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 153 && BOOST_PP_ITERATION_START_2 >= 153 +# define BOOST_PP_ITERATION_2 153 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 152 && BOOST_PP_ITERATION_START_2 >= 152 +# define BOOST_PP_ITERATION_2 152 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 151 && BOOST_PP_ITERATION_START_2 >= 151 +# define BOOST_PP_ITERATION_2 151 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 150 && BOOST_PP_ITERATION_START_2 >= 150 +# define BOOST_PP_ITERATION_2 150 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 149 && BOOST_PP_ITERATION_START_2 >= 149 +# define BOOST_PP_ITERATION_2 149 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 148 && BOOST_PP_ITERATION_START_2 >= 148 +# define BOOST_PP_ITERATION_2 148 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 147 && BOOST_PP_ITERATION_START_2 >= 147 +# define BOOST_PP_ITERATION_2 147 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 146 && BOOST_PP_ITERATION_START_2 >= 146 +# define BOOST_PP_ITERATION_2 146 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 145 && BOOST_PP_ITERATION_START_2 >= 145 +# define BOOST_PP_ITERATION_2 145 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 144 && BOOST_PP_ITERATION_START_2 >= 144 +# define BOOST_PP_ITERATION_2 144 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 143 && BOOST_PP_ITERATION_START_2 >= 143 +# define BOOST_PP_ITERATION_2 143 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 142 && BOOST_PP_ITERATION_START_2 >= 142 +# define BOOST_PP_ITERATION_2 142 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 141 && BOOST_PP_ITERATION_START_2 >= 141 +# define BOOST_PP_ITERATION_2 141 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 140 && BOOST_PP_ITERATION_START_2 >= 140 +# define BOOST_PP_ITERATION_2 140 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 139 && BOOST_PP_ITERATION_START_2 >= 139 +# define BOOST_PP_ITERATION_2 139 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 138 && BOOST_PP_ITERATION_START_2 >= 138 +# define BOOST_PP_ITERATION_2 138 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 137 && BOOST_PP_ITERATION_START_2 >= 137 +# define BOOST_PP_ITERATION_2 137 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 136 && BOOST_PP_ITERATION_START_2 >= 136 +# define BOOST_PP_ITERATION_2 136 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 135 && BOOST_PP_ITERATION_START_2 >= 135 +# define BOOST_PP_ITERATION_2 135 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 134 && BOOST_PP_ITERATION_START_2 >= 134 +# define BOOST_PP_ITERATION_2 134 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 133 && BOOST_PP_ITERATION_START_2 >= 133 +# define BOOST_PP_ITERATION_2 133 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 132 && BOOST_PP_ITERATION_START_2 >= 132 +# define BOOST_PP_ITERATION_2 132 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 131 && BOOST_PP_ITERATION_START_2 >= 131 +# define BOOST_PP_ITERATION_2 131 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 130 && BOOST_PP_ITERATION_START_2 >= 130 +# define BOOST_PP_ITERATION_2 130 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 129 && BOOST_PP_ITERATION_START_2 >= 129 +# define BOOST_PP_ITERATION_2 129 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 128 && BOOST_PP_ITERATION_START_2 >= 128 +# define BOOST_PP_ITERATION_2 128 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 127 && BOOST_PP_ITERATION_START_2 >= 127 +# define BOOST_PP_ITERATION_2 127 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 126 && BOOST_PP_ITERATION_START_2 >= 126 +# define BOOST_PP_ITERATION_2 126 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 125 && BOOST_PP_ITERATION_START_2 >= 125 +# define BOOST_PP_ITERATION_2 125 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 124 && BOOST_PP_ITERATION_START_2 >= 124 +# define BOOST_PP_ITERATION_2 124 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 123 && BOOST_PP_ITERATION_START_2 >= 123 +# define BOOST_PP_ITERATION_2 123 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 122 && BOOST_PP_ITERATION_START_2 >= 122 +# define BOOST_PP_ITERATION_2 122 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 121 && BOOST_PP_ITERATION_START_2 >= 121 +# define BOOST_PP_ITERATION_2 121 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 120 && BOOST_PP_ITERATION_START_2 >= 120 +# define BOOST_PP_ITERATION_2 120 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 119 && BOOST_PP_ITERATION_START_2 >= 119 +# define BOOST_PP_ITERATION_2 119 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 118 && BOOST_PP_ITERATION_START_2 >= 118 +# define BOOST_PP_ITERATION_2 118 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 117 && BOOST_PP_ITERATION_START_2 >= 117 +# define BOOST_PP_ITERATION_2 117 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 116 && BOOST_PP_ITERATION_START_2 >= 116 +# define BOOST_PP_ITERATION_2 116 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 115 && BOOST_PP_ITERATION_START_2 >= 115 +# define BOOST_PP_ITERATION_2 115 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 114 && BOOST_PP_ITERATION_START_2 >= 114 +# define BOOST_PP_ITERATION_2 114 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 113 && BOOST_PP_ITERATION_START_2 >= 113 +# define BOOST_PP_ITERATION_2 113 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 112 && BOOST_PP_ITERATION_START_2 >= 112 +# define BOOST_PP_ITERATION_2 112 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 111 && BOOST_PP_ITERATION_START_2 >= 111 +# define BOOST_PP_ITERATION_2 111 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 110 && BOOST_PP_ITERATION_START_2 >= 110 +# define BOOST_PP_ITERATION_2 110 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 109 && BOOST_PP_ITERATION_START_2 >= 109 +# define BOOST_PP_ITERATION_2 109 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 108 && BOOST_PP_ITERATION_START_2 >= 108 +# define BOOST_PP_ITERATION_2 108 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 107 && BOOST_PP_ITERATION_START_2 >= 107 +# define BOOST_PP_ITERATION_2 107 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 106 && BOOST_PP_ITERATION_START_2 >= 106 +# define BOOST_PP_ITERATION_2 106 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 105 && BOOST_PP_ITERATION_START_2 >= 105 +# define BOOST_PP_ITERATION_2 105 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 104 && BOOST_PP_ITERATION_START_2 >= 104 +# define BOOST_PP_ITERATION_2 104 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 103 && BOOST_PP_ITERATION_START_2 >= 103 +# define BOOST_PP_ITERATION_2 103 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 102 && BOOST_PP_ITERATION_START_2 >= 102 +# define BOOST_PP_ITERATION_2 102 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 101 && BOOST_PP_ITERATION_START_2 >= 101 +# define BOOST_PP_ITERATION_2 101 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 100 && BOOST_PP_ITERATION_START_2 >= 100 +# define BOOST_PP_ITERATION_2 100 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 99 && BOOST_PP_ITERATION_START_2 >= 99 +# define BOOST_PP_ITERATION_2 99 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 98 && BOOST_PP_ITERATION_START_2 >= 98 +# define BOOST_PP_ITERATION_2 98 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 97 && BOOST_PP_ITERATION_START_2 >= 97 +# define BOOST_PP_ITERATION_2 97 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 96 && BOOST_PP_ITERATION_START_2 >= 96 +# define BOOST_PP_ITERATION_2 96 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 95 && BOOST_PP_ITERATION_START_2 >= 95 +# define BOOST_PP_ITERATION_2 95 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 94 && BOOST_PP_ITERATION_START_2 >= 94 +# define BOOST_PP_ITERATION_2 94 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 93 && BOOST_PP_ITERATION_START_2 >= 93 +# define BOOST_PP_ITERATION_2 93 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 92 && BOOST_PP_ITERATION_START_2 >= 92 +# define BOOST_PP_ITERATION_2 92 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 91 && BOOST_PP_ITERATION_START_2 >= 91 +# define BOOST_PP_ITERATION_2 91 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 90 && BOOST_PP_ITERATION_START_2 >= 90 +# define BOOST_PP_ITERATION_2 90 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 89 && BOOST_PP_ITERATION_START_2 >= 89 +# define BOOST_PP_ITERATION_2 89 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 88 && BOOST_PP_ITERATION_START_2 >= 88 +# define BOOST_PP_ITERATION_2 88 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 87 && BOOST_PP_ITERATION_START_2 >= 87 +# define BOOST_PP_ITERATION_2 87 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 86 && BOOST_PP_ITERATION_START_2 >= 86 +# define BOOST_PP_ITERATION_2 86 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 85 && BOOST_PP_ITERATION_START_2 >= 85 +# define BOOST_PP_ITERATION_2 85 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 84 && BOOST_PP_ITERATION_START_2 >= 84 +# define BOOST_PP_ITERATION_2 84 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 83 && BOOST_PP_ITERATION_START_2 >= 83 +# define BOOST_PP_ITERATION_2 83 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 82 && BOOST_PP_ITERATION_START_2 >= 82 +# define BOOST_PP_ITERATION_2 82 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 81 && BOOST_PP_ITERATION_START_2 >= 81 +# define BOOST_PP_ITERATION_2 81 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 80 && BOOST_PP_ITERATION_START_2 >= 80 +# define BOOST_PP_ITERATION_2 80 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 79 && BOOST_PP_ITERATION_START_2 >= 79 +# define BOOST_PP_ITERATION_2 79 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 78 && BOOST_PP_ITERATION_START_2 >= 78 +# define BOOST_PP_ITERATION_2 78 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 77 && BOOST_PP_ITERATION_START_2 >= 77 +# define BOOST_PP_ITERATION_2 77 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 76 && BOOST_PP_ITERATION_START_2 >= 76 +# define BOOST_PP_ITERATION_2 76 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 75 && BOOST_PP_ITERATION_START_2 >= 75 +# define BOOST_PP_ITERATION_2 75 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 74 && BOOST_PP_ITERATION_START_2 >= 74 +# define BOOST_PP_ITERATION_2 74 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 73 && BOOST_PP_ITERATION_START_2 >= 73 +# define BOOST_PP_ITERATION_2 73 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 72 && BOOST_PP_ITERATION_START_2 >= 72 +# define BOOST_PP_ITERATION_2 72 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 71 && BOOST_PP_ITERATION_START_2 >= 71 +# define BOOST_PP_ITERATION_2 71 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 70 && BOOST_PP_ITERATION_START_2 >= 70 +# define BOOST_PP_ITERATION_2 70 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 69 && BOOST_PP_ITERATION_START_2 >= 69 +# define BOOST_PP_ITERATION_2 69 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 68 && BOOST_PP_ITERATION_START_2 >= 68 +# define BOOST_PP_ITERATION_2 68 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 67 && BOOST_PP_ITERATION_START_2 >= 67 +# define BOOST_PP_ITERATION_2 67 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 66 && BOOST_PP_ITERATION_START_2 >= 66 +# define BOOST_PP_ITERATION_2 66 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 65 && BOOST_PP_ITERATION_START_2 >= 65 +# define BOOST_PP_ITERATION_2 65 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 64 && BOOST_PP_ITERATION_START_2 >= 64 +# define BOOST_PP_ITERATION_2 64 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 63 && BOOST_PP_ITERATION_START_2 >= 63 +# define BOOST_PP_ITERATION_2 63 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 62 && BOOST_PP_ITERATION_START_2 >= 62 +# define BOOST_PP_ITERATION_2 62 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 61 && BOOST_PP_ITERATION_START_2 >= 61 +# define BOOST_PP_ITERATION_2 61 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 60 && BOOST_PP_ITERATION_START_2 >= 60 +# define BOOST_PP_ITERATION_2 60 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 59 && BOOST_PP_ITERATION_START_2 >= 59 +# define BOOST_PP_ITERATION_2 59 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 58 && BOOST_PP_ITERATION_START_2 >= 58 +# define BOOST_PP_ITERATION_2 58 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 57 && BOOST_PP_ITERATION_START_2 >= 57 +# define BOOST_PP_ITERATION_2 57 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 56 && BOOST_PP_ITERATION_START_2 >= 56 +# define BOOST_PP_ITERATION_2 56 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 55 && BOOST_PP_ITERATION_START_2 >= 55 +# define BOOST_PP_ITERATION_2 55 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 54 && BOOST_PP_ITERATION_START_2 >= 54 +# define BOOST_PP_ITERATION_2 54 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 53 && BOOST_PP_ITERATION_START_2 >= 53 +# define BOOST_PP_ITERATION_2 53 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 52 && BOOST_PP_ITERATION_START_2 >= 52 +# define BOOST_PP_ITERATION_2 52 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 51 && BOOST_PP_ITERATION_START_2 >= 51 +# define BOOST_PP_ITERATION_2 51 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 50 && BOOST_PP_ITERATION_START_2 >= 50 +# define BOOST_PP_ITERATION_2 50 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 49 && BOOST_PP_ITERATION_START_2 >= 49 +# define BOOST_PP_ITERATION_2 49 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 48 && BOOST_PP_ITERATION_START_2 >= 48 +# define BOOST_PP_ITERATION_2 48 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 47 && BOOST_PP_ITERATION_START_2 >= 47 +# define BOOST_PP_ITERATION_2 47 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 46 && BOOST_PP_ITERATION_START_2 >= 46 +# define BOOST_PP_ITERATION_2 46 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 45 && BOOST_PP_ITERATION_START_2 >= 45 +# define BOOST_PP_ITERATION_2 45 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 44 && BOOST_PP_ITERATION_START_2 >= 44 +# define BOOST_PP_ITERATION_2 44 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 43 && BOOST_PP_ITERATION_START_2 >= 43 +# define BOOST_PP_ITERATION_2 43 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 42 && BOOST_PP_ITERATION_START_2 >= 42 +# define BOOST_PP_ITERATION_2 42 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 41 && BOOST_PP_ITERATION_START_2 >= 41 +# define BOOST_PP_ITERATION_2 41 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 40 && BOOST_PP_ITERATION_START_2 >= 40 +# define BOOST_PP_ITERATION_2 40 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 39 && BOOST_PP_ITERATION_START_2 >= 39 +# define BOOST_PP_ITERATION_2 39 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 38 && BOOST_PP_ITERATION_START_2 >= 38 +# define BOOST_PP_ITERATION_2 38 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 37 && BOOST_PP_ITERATION_START_2 >= 37 +# define BOOST_PP_ITERATION_2 37 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 36 && BOOST_PP_ITERATION_START_2 >= 36 +# define BOOST_PP_ITERATION_2 36 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 35 && BOOST_PP_ITERATION_START_2 >= 35 +# define BOOST_PP_ITERATION_2 35 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 34 && BOOST_PP_ITERATION_START_2 >= 34 +# define BOOST_PP_ITERATION_2 34 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 33 && BOOST_PP_ITERATION_START_2 >= 33 +# define BOOST_PP_ITERATION_2 33 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 32 && BOOST_PP_ITERATION_START_2 >= 32 +# define BOOST_PP_ITERATION_2 32 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 31 && BOOST_PP_ITERATION_START_2 >= 31 +# define BOOST_PP_ITERATION_2 31 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 30 && BOOST_PP_ITERATION_START_2 >= 30 +# define BOOST_PP_ITERATION_2 30 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 29 && BOOST_PP_ITERATION_START_2 >= 29 +# define BOOST_PP_ITERATION_2 29 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 28 && BOOST_PP_ITERATION_START_2 >= 28 +# define BOOST_PP_ITERATION_2 28 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 27 && BOOST_PP_ITERATION_START_2 >= 27 +# define BOOST_PP_ITERATION_2 27 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 26 && BOOST_PP_ITERATION_START_2 >= 26 +# define BOOST_PP_ITERATION_2 26 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 25 && BOOST_PP_ITERATION_START_2 >= 25 +# define BOOST_PP_ITERATION_2 25 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 24 && BOOST_PP_ITERATION_START_2 >= 24 +# define BOOST_PP_ITERATION_2 24 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 23 && BOOST_PP_ITERATION_START_2 >= 23 +# define BOOST_PP_ITERATION_2 23 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 22 && BOOST_PP_ITERATION_START_2 >= 22 +# define BOOST_PP_ITERATION_2 22 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 21 && BOOST_PP_ITERATION_START_2 >= 21 +# define BOOST_PP_ITERATION_2 21 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 20 && BOOST_PP_ITERATION_START_2 >= 20 +# define BOOST_PP_ITERATION_2 20 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 19 && BOOST_PP_ITERATION_START_2 >= 19 +# define BOOST_PP_ITERATION_2 19 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 18 && BOOST_PP_ITERATION_START_2 >= 18 +# define BOOST_PP_ITERATION_2 18 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 17 && BOOST_PP_ITERATION_START_2 >= 17 +# define BOOST_PP_ITERATION_2 17 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 16 && BOOST_PP_ITERATION_START_2 >= 16 +# define BOOST_PP_ITERATION_2 16 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 15 && BOOST_PP_ITERATION_START_2 >= 15 +# define BOOST_PP_ITERATION_2 15 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 14 && BOOST_PP_ITERATION_START_2 >= 14 +# define BOOST_PP_ITERATION_2 14 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 13 && BOOST_PP_ITERATION_START_2 >= 13 +# define BOOST_PP_ITERATION_2 13 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 12 && BOOST_PP_ITERATION_START_2 >= 12 +# define BOOST_PP_ITERATION_2 12 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 11 && BOOST_PP_ITERATION_START_2 >= 11 +# define BOOST_PP_ITERATION_2 11 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 10 && BOOST_PP_ITERATION_START_2 >= 10 +# define BOOST_PP_ITERATION_2 10 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 9 && BOOST_PP_ITERATION_START_2 >= 9 +# define BOOST_PP_ITERATION_2 9 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 8 && BOOST_PP_ITERATION_START_2 >= 8 +# define BOOST_PP_ITERATION_2 8 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 7 && BOOST_PP_ITERATION_START_2 >= 7 +# define BOOST_PP_ITERATION_2 7 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 6 && BOOST_PP_ITERATION_START_2 >= 6 +# define BOOST_PP_ITERATION_2 6 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 5 && BOOST_PP_ITERATION_START_2 >= 5 +# define BOOST_PP_ITERATION_2 5 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 4 && BOOST_PP_ITERATION_START_2 >= 4 +# define BOOST_PP_ITERATION_2 4 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 3 && BOOST_PP_ITERATION_START_2 >= 3 +# define BOOST_PP_ITERATION_2 3 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 2 && BOOST_PP_ITERATION_START_2 >= 2 +# define BOOST_PP_ITERATION_2 2 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 1 && BOOST_PP_ITERATION_START_2 >= 1 +# define BOOST_PP_ITERATION_2 1 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif +# if BOOST_PP_ITERATION_FINISH_2 <= 0 && BOOST_PP_ITERATION_START_2 >= 0 +# define BOOST_PP_ITERATION_2 0 +# include BOOST_PP_FILENAME_2 +# undef BOOST_PP_ITERATION_2 +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/reverse3.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/reverse3.hpp new file mode 100644 index 0000000000..0a655149c9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/reverse3.hpp @@ -0,0 +1,1296 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# if BOOST_PP_ITERATION_FINISH_3 <= 256 && BOOST_PP_ITERATION_START_3 >= 256 +# define BOOST_PP_ITERATION_3 256 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 255 && BOOST_PP_ITERATION_START_3 >= 255 +# define BOOST_PP_ITERATION_3 255 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 254 && BOOST_PP_ITERATION_START_3 >= 254 +# define BOOST_PP_ITERATION_3 254 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 253 && BOOST_PP_ITERATION_START_3 >= 253 +# define BOOST_PP_ITERATION_3 253 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 252 && BOOST_PP_ITERATION_START_3 >= 252 +# define BOOST_PP_ITERATION_3 252 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 251 && BOOST_PP_ITERATION_START_3 >= 251 +# define BOOST_PP_ITERATION_3 251 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 250 && BOOST_PP_ITERATION_START_3 >= 250 +# define BOOST_PP_ITERATION_3 250 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 249 && BOOST_PP_ITERATION_START_3 >= 249 +# define BOOST_PP_ITERATION_3 249 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 248 && BOOST_PP_ITERATION_START_3 >= 248 +# define BOOST_PP_ITERATION_3 248 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 247 && BOOST_PP_ITERATION_START_3 >= 247 +# define BOOST_PP_ITERATION_3 247 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 246 && BOOST_PP_ITERATION_START_3 >= 246 +# define BOOST_PP_ITERATION_3 246 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 245 && BOOST_PP_ITERATION_START_3 >= 245 +# define BOOST_PP_ITERATION_3 245 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 244 && BOOST_PP_ITERATION_START_3 >= 244 +# define BOOST_PP_ITERATION_3 244 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 243 && BOOST_PP_ITERATION_START_3 >= 243 +# define BOOST_PP_ITERATION_3 243 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 242 && BOOST_PP_ITERATION_START_3 >= 242 +# define BOOST_PP_ITERATION_3 242 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 241 && BOOST_PP_ITERATION_START_3 >= 241 +# define BOOST_PP_ITERATION_3 241 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 240 && BOOST_PP_ITERATION_START_3 >= 240 +# define BOOST_PP_ITERATION_3 240 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 239 && BOOST_PP_ITERATION_START_3 >= 239 +# define BOOST_PP_ITERATION_3 239 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 238 && BOOST_PP_ITERATION_START_3 >= 238 +# define BOOST_PP_ITERATION_3 238 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 237 && BOOST_PP_ITERATION_START_3 >= 237 +# define BOOST_PP_ITERATION_3 237 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 236 && BOOST_PP_ITERATION_START_3 >= 236 +# define BOOST_PP_ITERATION_3 236 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 235 && BOOST_PP_ITERATION_START_3 >= 235 +# define BOOST_PP_ITERATION_3 235 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 234 && BOOST_PP_ITERATION_START_3 >= 234 +# define BOOST_PP_ITERATION_3 234 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 233 && BOOST_PP_ITERATION_START_3 >= 233 +# define BOOST_PP_ITERATION_3 233 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 232 && BOOST_PP_ITERATION_START_3 >= 232 +# define BOOST_PP_ITERATION_3 232 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 231 && BOOST_PP_ITERATION_START_3 >= 231 +# define BOOST_PP_ITERATION_3 231 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 230 && BOOST_PP_ITERATION_START_3 >= 230 +# define BOOST_PP_ITERATION_3 230 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 229 && BOOST_PP_ITERATION_START_3 >= 229 +# define BOOST_PP_ITERATION_3 229 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 228 && BOOST_PP_ITERATION_START_3 >= 228 +# define BOOST_PP_ITERATION_3 228 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 227 && BOOST_PP_ITERATION_START_3 >= 227 +# define BOOST_PP_ITERATION_3 227 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 226 && BOOST_PP_ITERATION_START_3 >= 226 +# define BOOST_PP_ITERATION_3 226 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 225 && BOOST_PP_ITERATION_START_3 >= 225 +# define BOOST_PP_ITERATION_3 225 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 224 && BOOST_PP_ITERATION_START_3 >= 224 +# define BOOST_PP_ITERATION_3 224 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 223 && BOOST_PP_ITERATION_START_3 >= 223 +# define BOOST_PP_ITERATION_3 223 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 222 && BOOST_PP_ITERATION_START_3 >= 222 +# define BOOST_PP_ITERATION_3 222 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 221 && BOOST_PP_ITERATION_START_3 >= 221 +# define BOOST_PP_ITERATION_3 221 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 220 && BOOST_PP_ITERATION_START_3 >= 220 +# define BOOST_PP_ITERATION_3 220 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 219 && BOOST_PP_ITERATION_START_3 >= 219 +# define BOOST_PP_ITERATION_3 219 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 218 && BOOST_PP_ITERATION_START_3 >= 218 +# define BOOST_PP_ITERATION_3 218 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 217 && BOOST_PP_ITERATION_START_3 >= 217 +# define BOOST_PP_ITERATION_3 217 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 216 && BOOST_PP_ITERATION_START_3 >= 216 +# define BOOST_PP_ITERATION_3 216 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 215 && BOOST_PP_ITERATION_START_3 >= 215 +# define BOOST_PP_ITERATION_3 215 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 214 && BOOST_PP_ITERATION_START_3 >= 214 +# define BOOST_PP_ITERATION_3 214 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 213 && BOOST_PP_ITERATION_START_3 >= 213 +# define BOOST_PP_ITERATION_3 213 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 212 && BOOST_PP_ITERATION_START_3 >= 212 +# define BOOST_PP_ITERATION_3 212 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 211 && BOOST_PP_ITERATION_START_3 >= 211 +# define BOOST_PP_ITERATION_3 211 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 210 && BOOST_PP_ITERATION_START_3 >= 210 +# define BOOST_PP_ITERATION_3 210 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 209 && BOOST_PP_ITERATION_START_3 >= 209 +# define BOOST_PP_ITERATION_3 209 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 208 && BOOST_PP_ITERATION_START_3 >= 208 +# define BOOST_PP_ITERATION_3 208 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 207 && BOOST_PP_ITERATION_START_3 >= 207 +# define BOOST_PP_ITERATION_3 207 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 206 && BOOST_PP_ITERATION_START_3 >= 206 +# define BOOST_PP_ITERATION_3 206 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 205 && BOOST_PP_ITERATION_START_3 >= 205 +# define BOOST_PP_ITERATION_3 205 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 204 && BOOST_PP_ITERATION_START_3 >= 204 +# define BOOST_PP_ITERATION_3 204 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 203 && BOOST_PP_ITERATION_START_3 >= 203 +# define BOOST_PP_ITERATION_3 203 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 202 && BOOST_PP_ITERATION_START_3 >= 202 +# define BOOST_PP_ITERATION_3 202 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 201 && BOOST_PP_ITERATION_START_3 >= 201 +# define BOOST_PP_ITERATION_3 201 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 200 && BOOST_PP_ITERATION_START_3 >= 200 +# define BOOST_PP_ITERATION_3 200 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 199 && BOOST_PP_ITERATION_START_3 >= 199 +# define BOOST_PP_ITERATION_3 199 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 198 && BOOST_PP_ITERATION_START_3 >= 198 +# define BOOST_PP_ITERATION_3 198 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 197 && BOOST_PP_ITERATION_START_3 >= 197 +# define BOOST_PP_ITERATION_3 197 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 196 && BOOST_PP_ITERATION_START_3 >= 196 +# define BOOST_PP_ITERATION_3 196 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 195 && BOOST_PP_ITERATION_START_3 >= 195 +# define BOOST_PP_ITERATION_3 195 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 194 && BOOST_PP_ITERATION_START_3 >= 194 +# define BOOST_PP_ITERATION_3 194 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 193 && BOOST_PP_ITERATION_START_3 >= 193 +# define BOOST_PP_ITERATION_3 193 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 192 && BOOST_PP_ITERATION_START_3 >= 192 +# define BOOST_PP_ITERATION_3 192 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 191 && BOOST_PP_ITERATION_START_3 >= 191 +# define BOOST_PP_ITERATION_3 191 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 190 && BOOST_PP_ITERATION_START_3 >= 190 +# define BOOST_PP_ITERATION_3 190 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 189 && BOOST_PP_ITERATION_START_3 >= 189 +# define BOOST_PP_ITERATION_3 189 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 188 && BOOST_PP_ITERATION_START_3 >= 188 +# define BOOST_PP_ITERATION_3 188 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 187 && BOOST_PP_ITERATION_START_3 >= 187 +# define BOOST_PP_ITERATION_3 187 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 186 && BOOST_PP_ITERATION_START_3 >= 186 +# define BOOST_PP_ITERATION_3 186 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 185 && BOOST_PP_ITERATION_START_3 >= 185 +# define BOOST_PP_ITERATION_3 185 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 184 && BOOST_PP_ITERATION_START_3 >= 184 +# define BOOST_PP_ITERATION_3 184 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 183 && BOOST_PP_ITERATION_START_3 >= 183 +# define BOOST_PP_ITERATION_3 183 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 182 && BOOST_PP_ITERATION_START_3 >= 182 +# define BOOST_PP_ITERATION_3 182 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 181 && BOOST_PP_ITERATION_START_3 >= 181 +# define BOOST_PP_ITERATION_3 181 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 180 && BOOST_PP_ITERATION_START_3 >= 180 +# define BOOST_PP_ITERATION_3 180 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 179 && BOOST_PP_ITERATION_START_3 >= 179 +# define BOOST_PP_ITERATION_3 179 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 178 && BOOST_PP_ITERATION_START_3 >= 178 +# define BOOST_PP_ITERATION_3 178 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 177 && BOOST_PP_ITERATION_START_3 >= 177 +# define BOOST_PP_ITERATION_3 177 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 176 && BOOST_PP_ITERATION_START_3 >= 176 +# define BOOST_PP_ITERATION_3 176 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 175 && BOOST_PP_ITERATION_START_3 >= 175 +# define BOOST_PP_ITERATION_3 175 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 174 && BOOST_PP_ITERATION_START_3 >= 174 +# define BOOST_PP_ITERATION_3 174 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 173 && BOOST_PP_ITERATION_START_3 >= 173 +# define BOOST_PP_ITERATION_3 173 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 172 && BOOST_PP_ITERATION_START_3 >= 172 +# define BOOST_PP_ITERATION_3 172 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 171 && BOOST_PP_ITERATION_START_3 >= 171 +# define BOOST_PP_ITERATION_3 171 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 170 && BOOST_PP_ITERATION_START_3 >= 170 +# define BOOST_PP_ITERATION_3 170 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 169 && BOOST_PP_ITERATION_START_3 >= 169 +# define BOOST_PP_ITERATION_3 169 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 168 && BOOST_PP_ITERATION_START_3 >= 168 +# define BOOST_PP_ITERATION_3 168 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 167 && BOOST_PP_ITERATION_START_3 >= 167 +# define BOOST_PP_ITERATION_3 167 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 166 && BOOST_PP_ITERATION_START_3 >= 166 +# define BOOST_PP_ITERATION_3 166 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 165 && BOOST_PP_ITERATION_START_3 >= 165 +# define BOOST_PP_ITERATION_3 165 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 164 && BOOST_PP_ITERATION_START_3 >= 164 +# define BOOST_PP_ITERATION_3 164 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 163 && BOOST_PP_ITERATION_START_3 >= 163 +# define BOOST_PP_ITERATION_3 163 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 162 && BOOST_PP_ITERATION_START_3 >= 162 +# define BOOST_PP_ITERATION_3 162 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 161 && BOOST_PP_ITERATION_START_3 >= 161 +# define BOOST_PP_ITERATION_3 161 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 160 && BOOST_PP_ITERATION_START_3 >= 160 +# define BOOST_PP_ITERATION_3 160 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 159 && BOOST_PP_ITERATION_START_3 >= 159 +# define BOOST_PP_ITERATION_3 159 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 158 && BOOST_PP_ITERATION_START_3 >= 158 +# define BOOST_PP_ITERATION_3 158 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 157 && BOOST_PP_ITERATION_START_3 >= 157 +# define BOOST_PP_ITERATION_3 157 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 156 && BOOST_PP_ITERATION_START_3 >= 156 +# define BOOST_PP_ITERATION_3 156 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 155 && BOOST_PP_ITERATION_START_3 >= 155 +# define BOOST_PP_ITERATION_3 155 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 154 && BOOST_PP_ITERATION_START_3 >= 154 +# define BOOST_PP_ITERATION_3 154 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 153 && BOOST_PP_ITERATION_START_3 >= 153 +# define BOOST_PP_ITERATION_3 153 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 152 && BOOST_PP_ITERATION_START_3 >= 152 +# define BOOST_PP_ITERATION_3 152 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 151 && BOOST_PP_ITERATION_START_3 >= 151 +# define BOOST_PP_ITERATION_3 151 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 150 && BOOST_PP_ITERATION_START_3 >= 150 +# define BOOST_PP_ITERATION_3 150 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 149 && BOOST_PP_ITERATION_START_3 >= 149 +# define BOOST_PP_ITERATION_3 149 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 148 && BOOST_PP_ITERATION_START_3 >= 148 +# define BOOST_PP_ITERATION_3 148 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 147 && BOOST_PP_ITERATION_START_3 >= 147 +# define BOOST_PP_ITERATION_3 147 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 146 && BOOST_PP_ITERATION_START_3 >= 146 +# define BOOST_PP_ITERATION_3 146 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 145 && BOOST_PP_ITERATION_START_3 >= 145 +# define BOOST_PP_ITERATION_3 145 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 144 && BOOST_PP_ITERATION_START_3 >= 144 +# define BOOST_PP_ITERATION_3 144 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 143 && BOOST_PP_ITERATION_START_3 >= 143 +# define BOOST_PP_ITERATION_3 143 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 142 && BOOST_PP_ITERATION_START_3 >= 142 +# define BOOST_PP_ITERATION_3 142 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 141 && BOOST_PP_ITERATION_START_3 >= 141 +# define BOOST_PP_ITERATION_3 141 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 140 && BOOST_PP_ITERATION_START_3 >= 140 +# define BOOST_PP_ITERATION_3 140 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 139 && BOOST_PP_ITERATION_START_3 >= 139 +# define BOOST_PP_ITERATION_3 139 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 138 && BOOST_PP_ITERATION_START_3 >= 138 +# define BOOST_PP_ITERATION_3 138 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 137 && BOOST_PP_ITERATION_START_3 >= 137 +# define BOOST_PP_ITERATION_3 137 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 136 && BOOST_PP_ITERATION_START_3 >= 136 +# define BOOST_PP_ITERATION_3 136 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 135 && BOOST_PP_ITERATION_START_3 >= 135 +# define BOOST_PP_ITERATION_3 135 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 134 && BOOST_PP_ITERATION_START_3 >= 134 +# define BOOST_PP_ITERATION_3 134 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 133 && BOOST_PP_ITERATION_START_3 >= 133 +# define BOOST_PP_ITERATION_3 133 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 132 && BOOST_PP_ITERATION_START_3 >= 132 +# define BOOST_PP_ITERATION_3 132 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 131 && BOOST_PP_ITERATION_START_3 >= 131 +# define BOOST_PP_ITERATION_3 131 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 130 && BOOST_PP_ITERATION_START_3 >= 130 +# define BOOST_PP_ITERATION_3 130 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 129 && BOOST_PP_ITERATION_START_3 >= 129 +# define BOOST_PP_ITERATION_3 129 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 128 && BOOST_PP_ITERATION_START_3 >= 128 +# define BOOST_PP_ITERATION_3 128 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 127 && BOOST_PP_ITERATION_START_3 >= 127 +# define BOOST_PP_ITERATION_3 127 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 126 && BOOST_PP_ITERATION_START_3 >= 126 +# define BOOST_PP_ITERATION_3 126 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 125 && BOOST_PP_ITERATION_START_3 >= 125 +# define BOOST_PP_ITERATION_3 125 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 124 && BOOST_PP_ITERATION_START_3 >= 124 +# define BOOST_PP_ITERATION_3 124 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 123 && BOOST_PP_ITERATION_START_3 >= 123 +# define BOOST_PP_ITERATION_3 123 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 122 && BOOST_PP_ITERATION_START_3 >= 122 +# define BOOST_PP_ITERATION_3 122 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 121 && BOOST_PP_ITERATION_START_3 >= 121 +# define BOOST_PP_ITERATION_3 121 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 120 && BOOST_PP_ITERATION_START_3 >= 120 +# define BOOST_PP_ITERATION_3 120 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 119 && BOOST_PP_ITERATION_START_3 >= 119 +# define BOOST_PP_ITERATION_3 119 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 118 && BOOST_PP_ITERATION_START_3 >= 118 +# define BOOST_PP_ITERATION_3 118 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 117 && BOOST_PP_ITERATION_START_3 >= 117 +# define BOOST_PP_ITERATION_3 117 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 116 && BOOST_PP_ITERATION_START_3 >= 116 +# define BOOST_PP_ITERATION_3 116 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 115 && BOOST_PP_ITERATION_START_3 >= 115 +# define BOOST_PP_ITERATION_3 115 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 114 && BOOST_PP_ITERATION_START_3 >= 114 +# define BOOST_PP_ITERATION_3 114 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 113 && BOOST_PP_ITERATION_START_3 >= 113 +# define BOOST_PP_ITERATION_3 113 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 112 && BOOST_PP_ITERATION_START_3 >= 112 +# define BOOST_PP_ITERATION_3 112 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 111 && BOOST_PP_ITERATION_START_3 >= 111 +# define BOOST_PP_ITERATION_3 111 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 110 && BOOST_PP_ITERATION_START_3 >= 110 +# define BOOST_PP_ITERATION_3 110 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 109 && BOOST_PP_ITERATION_START_3 >= 109 +# define BOOST_PP_ITERATION_3 109 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 108 && BOOST_PP_ITERATION_START_3 >= 108 +# define BOOST_PP_ITERATION_3 108 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 107 && BOOST_PP_ITERATION_START_3 >= 107 +# define BOOST_PP_ITERATION_3 107 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 106 && BOOST_PP_ITERATION_START_3 >= 106 +# define BOOST_PP_ITERATION_3 106 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 105 && BOOST_PP_ITERATION_START_3 >= 105 +# define BOOST_PP_ITERATION_3 105 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 104 && BOOST_PP_ITERATION_START_3 >= 104 +# define BOOST_PP_ITERATION_3 104 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 103 && BOOST_PP_ITERATION_START_3 >= 103 +# define BOOST_PP_ITERATION_3 103 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 102 && BOOST_PP_ITERATION_START_3 >= 102 +# define BOOST_PP_ITERATION_3 102 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 101 && BOOST_PP_ITERATION_START_3 >= 101 +# define BOOST_PP_ITERATION_3 101 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 100 && BOOST_PP_ITERATION_START_3 >= 100 +# define BOOST_PP_ITERATION_3 100 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 99 && BOOST_PP_ITERATION_START_3 >= 99 +# define BOOST_PP_ITERATION_3 99 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 98 && BOOST_PP_ITERATION_START_3 >= 98 +# define BOOST_PP_ITERATION_3 98 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 97 && BOOST_PP_ITERATION_START_3 >= 97 +# define BOOST_PP_ITERATION_3 97 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 96 && BOOST_PP_ITERATION_START_3 >= 96 +# define BOOST_PP_ITERATION_3 96 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 95 && BOOST_PP_ITERATION_START_3 >= 95 +# define BOOST_PP_ITERATION_3 95 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 94 && BOOST_PP_ITERATION_START_3 >= 94 +# define BOOST_PP_ITERATION_3 94 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 93 && BOOST_PP_ITERATION_START_3 >= 93 +# define BOOST_PP_ITERATION_3 93 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 92 && BOOST_PP_ITERATION_START_3 >= 92 +# define BOOST_PP_ITERATION_3 92 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 91 && BOOST_PP_ITERATION_START_3 >= 91 +# define BOOST_PP_ITERATION_3 91 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 90 && BOOST_PP_ITERATION_START_3 >= 90 +# define BOOST_PP_ITERATION_3 90 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 89 && BOOST_PP_ITERATION_START_3 >= 89 +# define BOOST_PP_ITERATION_3 89 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 88 && BOOST_PP_ITERATION_START_3 >= 88 +# define BOOST_PP_ITERATION_3 88 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 87 && BOOST_PP_ITERATION_START_3 >= 87 +# define BOOST_PP_ITERATION_3 87 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 86 && BOOST_PP_ITERATION_START_3 >= 86 +# define BOOST_PP_ITERATION_3 86 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 85 && BOOST_PP_ITERATION_START_3 >= 85 +# define BOOST_PP_ITERATION_3 85 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 84 && BOOST_PP_ITERATION_START_3 >= 84 +# define BOOST_PP_ITERATION_3 84 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 83 && BOOST_PP_ITERATION_START_3 >= 83 +# define BOOST_PP_ITERATION_3 83 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 82 && BOOST_PP_ITERATION_START_3 >= 82 +# define BOOST_PP_ITERATION_3 82 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 81 && BOOST_PP_ITERATION_START_3 >= 81 +# define BOOST_PP_ITERATION_3 81 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 80 && BOOST_PP_ITERATION_START_3 >= 80 +# define BOOST_PP_ITERATION_3 80 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 79 && BOOST_PP_ITERATION_START_3 >= 79 +# define BOOST_PP_ITERATION_3 79 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 78 && BOOST_PP_ITERATION_START_3 >= 78 +# define BOOST_PP_ITERATION_3 78 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 77 && BOOST_PP_ITERATION_START_3 >= 77 +# define BOOST_PP_ITERATION_3 77 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 76 && BOOST_PP_ITERATION_START_3 >= 76 +# define BOOST_PP_ITERATION_3 76 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 75 && BOOST_PP_ITERATION_START_3 >= 75 +# define BOOST_PP_ITERATION_3 75 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 74 && BOOST_PP_ITERATION_START_3 >= 74 +# define BOOST_PP_ITERATION_3 74 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 73 && BOOST_PP_ITERATION_START_3 >= 73 +# define BOOST_PP_ITERATION_3 73 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 72 && BOOST_PP_ITERATION_START_3 >= 72 +# define BOOST_PP_ITERATION_3 72 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 71 && BOOST_PP_ITERATION_START_3 >= 71 +# define BOOST_PP_ITERATION_3 71 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 70 && BOOST_PP_ITERATION_START_3 >= 70 +# define BOOST_PP_ITERATION_3 70 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 69 && BOOST_PP_ITERATION_START_3 >= 69 +# define BOOST_PP_ITERATION_3 69 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 68 && BOOST_PP_ITERATION_START_3 >= 68 +# define BOOST_PP_ITERATION_3 68 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 67 && BOOST_PP_ITERATION_START_3 >= 67 +# define BOOST_PP_ITERATION_3 67 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 66 && BOOST_PP_ITERATION_START_3 >= 66 +# define BOOST_PP_ITERATION_3 66 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 65 && BOOST_PP_ITERATION_START_3 >= 65 +# define BOOST_PP_ITERATION_3 65 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 64 && BOOST_PP_ITERATION_START_3 >= 64 +# define BOOST_PP_ITERATION_3 64 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 63 && BOOST_PP_ITERATION_START_3 >= 63 +# define BOOST_PP_ITERATION_3 63 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 62 && BOOST_PP_ITERATION_START_3 >= 62 +# define BOOST_PP_ITERATION_3 62 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 61 && BOOST_PP_ITERATION_START_3 >= 61 +# define BOOST_PP_ITERATION_3 61 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 60 && BOOST_PP_ITERATION_START_3 >= 60 +# define BOOST_PP_ITERATION_3 60 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 59 && BOOST_PP_ITERATION_START_3 >= 59 +# define BOOST_PP_ITERATION_3 59 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 58 && BOOST_PP_ITERATION_START_3 >= 58 +# define BOOST_PP_ITERATION_3 58 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 57 && BOOST_PP_ITERATION_START_3 >= 57 +# define BOOST_PP_ITERATION_3 57 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 56 && BOOST_PP_ITERATION_START_3 >= 56 +# define BOOST_PP_ITERATION_3 56 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 55 && BOOST_PP_ITERATION_START_3 >= 55 +# define BOOST_PP_ITERATION_3 55 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 54 && BOOST_PP_ITERATION_START_3 >= 54 +# define BOOST_PP_ITERATION_3 54 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 53 && BOOST_PP_ITERATION_START_3 >= 53 +# define BOOST_PP_ITERATION_3 53 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 52 && BOOST_PP_ITERATION_START_3 >= 52 +# define BOOST_PP_ITERATION_3 52 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 51 && BOOST_PP_ITERATION_START_3 >= 51 +# define BOOST_PP_ITERATION_3 51 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 50 && BOOST_PP_ITERATION_START_3 >= 50 +# define BOOST_PP_ITERATION_3 50 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 49 && BOOST_PP_ITERATION_START_3 >= 49 +# define BOOST_PP_ITERATION_3 49 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 48 && BOOST_PP_ITERATION_START_3 >= 48 +# define BOOST_PP_ITERATION_3 48 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 47 && BOOST_PP_ITERATION_START_3 >= 47 +# define BOOST_PP_ITERATION_3 47 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 46 && BOOST_PP_ITERATION_START_3 >= 46 +# define BOOST_PP_ITERATION_3 46 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 45 && BOOST_PP_ITERATION_START_3 >= 45 +# define BOOST_PP_ITERATION_3 45 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 44 && BOOST_PP_ITERATION_START_3 >= 44 +# define BOOST_PP_ITERATION_3 44 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 43 && BOOST_PP_ITERATION_START_3 >= 43 +# define BOOST_PP_ITERATION_3 43 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 42 && BOOST_PP_ITERATION_START_3 >= 42 +# define BOOST_PP_ITERATION_3 42 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 41 && BOOST_PP_ITERATION_START_3 >= 41 +# define BOOST_PP_ITERATION_3 41 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 40 && BOOST_PP_ITERATION_START_3 >= 40 +# define BOOST_PP_ITERATION_3 40 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 39 && BOOST_PP_ITERATION_START_3 >= 39 +# define BOOST_PP_ITERATION_3 39 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 38 && BOOST_PP_ITERATION_START_3 >= 38 +# define BOOST_PP_ITERATION_3 38 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 37 && BOOST_PP_ITERATION_START_3 >= 37 +# define BOOST_PP_ITERATION_3 37 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 36 && BOOST_PP_ITERATION_START_3 >= 36 +# define BOOST_PP_ITERATION_3 36 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 35 && BOOST_PP_ITERATION_START_3 >= 35 +# define BOOST_PP_ITERATION_3 35 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 34 && BOOST_PP_ITERATION_START_3 >= 34 +# define BOOST_PP_ITERATION_3 34 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 33 && BOOST_PP_ITERATION_START_3 >= 33 +# define BOOST_PP_ITERATION_3 33 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 32 && BOOST_PP_ITERATION_START_3 >= 32 +# define BOOST_PP_ITERATION_3 32 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 31 && BOOST_PP_ITERATION_START_3 >= 31 +# define BOOST_PP_ITERATION_3 31 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 30 && BOOST_PP_ITERATION_START_3 >= 30 +# define BOOST_PP_ITERATION_3 30 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 29 && BOOST_PP_ITERATION_START_3 >= 29 +# define BOOST_PP_ITERATION_3 29 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 28 && BOOST_PP_ITERATION_START_3 >= 28 +# define BOOST_PP_ITERATION_3 28 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 27 && BOOST_PP_ITERATION_START_3 >= 27 +# define BOOST_PP_ITERATION_3 27 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 26 && BOOST_PP_ITERATION_START_3 >= 26 +# define BOOST_PP_ITERATION_3 26 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 25 && BOOST_PP_ITERATION_START_3 >= 25 +# define BOOST_PP_ITERATION_3 25 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 24 && BOOST_PP_ITERATION_START_3 >= 24 +# define BOOST_PP_ITERATION_3 24 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 23 && BOOST_PP_ITERATION_START_3 >= 23 +# define BOOST_PP_ITERATION_3 23 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 22 && BOOST_PP_ITERATION_START_3 >= 22 +# define BOOST_PP_ITERATION_3 22 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 21 && BOOST_PP_ITERATION_START_3 >= 21 +# define BOOST_PP_ITERATION_3 21 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 20 && BOOST_PP_ITERATION_START_3 >= 20 +# define BOOST_PP_ITERATION_3 20 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 19 && BOOST_PP_ITERATION_START_3 >= 19 +# define BOOST_PP_ITERATION_3 19 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 18 && BOOST_PP_ITERATION_START_3 >= 18 +# define BOOST_PP_ITERATION_3 18 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 17 && BOOST_PP_ITERATION_START_3 >= 17 +# define BOOST_PP_ITERATION_3 17 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 16 && BOOST_PP_ITERATION_START_3 >= 16 +# define BOOST_PP_ITERATION_3 16 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 15 && BOOST_PP_ITERATION_START_3 >= 15 +# define BOOST_PP_ITERATION_3 15 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 14 && BOOST_PP_ITERATION_START_3 >= 14 +# define BOOST_PP_ITERATION_3 14 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 13 && BOOST_PP_ITERATION_START_3 >= 13 +# define BOOST_PP_ITERATION_3 13 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 12 && BOOST_PP_ITERATION_START_3 >= 12 +# define BOOST_PP_ITERATION_3 12 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 11 && BOOST_PP_ITERATION_START_3 >= 11 +# define BOOST_PP_ITERATION_3 11 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 10 && BOOST_PP_ITERATION_START_3 >= 10 +# define BOOST_PP_ITERATION_3 10 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 9 && BOOST_PP_ITERATION_START_3 >= 9 +# define BOOST_PP_ITERATION_3 9 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 8 && BOOST_PP_ITERATION_START_3 >= 8 +# define BOOST_PP_ITERATION_3 8 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 7 && BOOST_PP_ITERATION_START_3 >= 7 +# define BOOST_PP_ITERATION_3 7 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 6 && BOOST_PP_ITERATION_START_3 >= 6 +# define BOOST_PP_ITERATION_3 6 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 5 && BOOST_PP_ITERATION_START_3 >= 5 +# define BOOST_PP_ITERATION_3 5 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 4 && BOOST_PP_ITERATION_START_3 >= 4 +# define BOOST_PP_ITERATION_3 4 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 3 && BOOST_PP_ITERATION_START_3 >= 3 +# define BOOST_PP_ITERATION_3 3 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 2 && BOOST_PP_ITERATION_START_3 >= 2 +# define BOOST_PP_ITERATION_3 2 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 1 && BOOST_PP_ITERATION_START_3 >= 1 +# define BOOST_PP_ITERATION_3 1 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif +# if BOOST_PP_ITERATION_FINISH_3 <= 0 && BOOST_PP_ITERATION_START_3 >= 0 +# define BOOST_PP_ITERATION_3 0 +# include BOOST_PP_FILENAME_3 +# undef BOOST_PP_ITERATION_3 +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/reverse4.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/reverse4.hpp new file mode 100644 index 0000000000..3bcfba04e0 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/reverse4.hpp @@ -0,0 +1,1296 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# if BOOST_PP_ITERATION_FINISH_4 <= 256 && BOOST_PP_ITERATION_START_4 >= 256 +# define BOOST_PP_ITERATION_4 256 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 255 && BOOST_PP_ITERATION_START_4 >= 255 +# define BOOST_PP_ITERATION_4 255 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 254 && BOOST_PP_ITERATION_START_4 >= 254 +# define BOOST_PP_ITERATION_4 254 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 253 && BOOST_PP_ITERATION_START_4 >= 253 +# define BOOST_PP_ITERATION_4 253 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 252 && BOOST_PP_ITERATION_START_4 >= 252 +# define BOOST_PP_ITERATION_4 252 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 251 && BOOST_PP_ITERATION_START_4 >= 251 +# define BOOST_PP_ITERATION_4 251 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 250 && BOOST_PP_ITERATION_START_4 >= 250 +# define BOOST_PP_ITERATION_4 250 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 249 && BOOST_PP_ITERATION_START_4 >= 249 +# define BOOST_PP_ITERATION_4 249 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 248 && BOOST_PP_ITERATION_START_4 >= 248 +# define BOOST_PP_ITERATION_4 248 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 247 && BOOST_PP_ITERATION_START_4 >= 247 +# define BOOST_PP_ITERATION_4 247 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 246 && BOOST_PP_ITERATION_START_4 >= 246 +# define BOOST_PP_ITERATION_4 246 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 245 && BOOST_PP_ITERATION_START_4 >= 245 +# define BOOST_PP_ITERATION_4 245 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 244 && BOOST_PP_ITERATION_START_4 >= 244 +# define BOOST_PP_ITERATION_4 244 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 243 && BOOST_PP_ITERATION_START_4 >= 243 +# define BOOST_PP_ITERATION_4 243 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 242 && BOOST_PP_ITERATION_START_4 >= 242 +# define BOOST_PP_ITERATION_4 242 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 241 && BOOST_PP_ITERATION_START_4 >= 241 +# define BOOST_PP_ITERATION_4 241 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 240 && BOOST_PP_ITERATION_START_4 >= 240 +# define BOOST_PP_ITERATION_4 240 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 239 && BOOST_PP_ITERATION_START_4 >= 239 +# define BOOST_PP_ITERATION_4 239 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 238 && BOOST_PP_ITERATION_START_4 >= 238 +# define BOOST_PP_ITERATION_4 238 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 237 && BOOST_PP_ITERATION_START_4 >= 237 +# define BOOST_PP_ITERATION_4 237 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 236 && BOOST_PP_ITERATION_START_4 >= 236 +# define BOOST_PP_ITERATION_4 236 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 235 && BOOST_PP_ITERATION_START_4 >= 235 +# define BOOST_PP_ITERATION_4 235 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 234 && BOOST_PP_ITERATION_START_4 >= 234 +# define BOOST_PP_ITERATION_4 234 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 233 && BOOST_PP_ITERATION_START_4 >= 233 +# define BOOST_PP_ITERATION_4 233 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 232 && BOOST_PP_ITERATION_START_4 >= 232 +# define BOOST_PP_ITERATION_4 232 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 231 && BOOST_PP_ITERATION_START_4 >= 231 +# define BOOST_PP_ITERATION_4 231 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 230 && BOOST_PP_ITERATION_START_4 >= 230 +# define BOOST_PP_ITERATION_4 230 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 229 && BOOST_PP_ITERATION_START_4 >= 229 +# define BOOST_PP_ITERATION_4 229 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 228 && BOOST_PP_ITERATION_START_4 >= 228 +# define BOOST_PP_ITERATION_4 228 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 227 && BOOST_PP_ITERATION_START_4 >= 227 +# define BOOST_PP_ITERATION_4 227 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 226 && BOOST_PP_ITERATION_START_4 >= 226 +# define BOOST_PP_ITERATION_4 226 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 225 && BOOST_PP_ITERATION_START_4 >= 225 +# define BOOST_PP_ITERATION_4 225 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 224 && BOOST_PP_ITERATION_START_4 >= 224 +# define BOOST_PP_ITERATION_4 224 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 223 && BOOST_PP_ITERATION_START_4 >= 223 +# define BOOST_PP_ITERATION_4 223 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 222 && BOOST_PP_ITERATION_START_4 >= 222 +# define BOOST_PP_ITERATION_4 222 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 221 && BOOST_PP_ITERATION_START_4 >= 221 +# define BOOST_PP_ITERATION_4 221 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 220 && BOOST_PP_ITERATION_START_4 >= 220 +# define BOOST_PP_ITERATION_4 220 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 219 && BOOST_PP_ITERATION_START_4 >= 219 +# define BOOST_PP_ITERATION_4 219 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 218 && BOOST_PP_ITERATION_START_4 >= 218 +# define BOOST_PP_ITERATION_4 218 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 217 && BOOST_PP_ITERATION_START_4 >= 217 +# define BOOST_PP_ITERATION_4 217 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 216 && BOOST_PP_ITERATION_START_4 >= 216 +# define BOOST_PP_ITERATION_4 216 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 215 && BOOST_PP_ITERATION_START_4 >= 215 +# define BOOST_PP_ITERATION_4 215 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 214 && BOOST_PP_ITERATION_START_4 >= 214 +# define BOOST_PP_ITERATION_4 214 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 213 && BOOST_PP_ITERATION_START_4 >= 213 +# define BOOST_PP_ITERATION_4 213 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 212 && BOOST_PP_ITERATION_START_4 >= 212 +# define BOOST_PP_ITERATION_4 212 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 211 && BOOST_PP_ITERATION_START_4 >= 211 +# define BOOST_PP_ITERATION_4 211 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 210 && BOOST_PP_ITERATION_START_4 >= 210 +# define BOOST_PP_ITERATION_4 210 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 209 && BOOST_PP_ITERATION_START_4 >= 209 +# define BOOST_PP_ITERATION_4 209 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 208 && BOOST_PP_ITERATION_START_4 >= 208 +# define BOOST_PP_ITERATION_4 208 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 207 && BOOST_PP_ITERATION_START_4 >= 207 +# define BOOST_PP_ITERATION_4 207 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 206 && BOOST_PP_ITERATION_START_4 >= 206 +# define BOOST_PP_ITERATION_4 206 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 205 && BOOST_PP_ITERATION_START_4 >= 205 +# define BOOST_PP_ITERATION_4 205 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 204 && BOOST_PP_ITERATION_START_4 >= 204 +# define BOOST_PP_ITERATION_4 204 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 203 && BOOST_PP_ITERATION_START_4 >= 203 +# define BOOST_PP_ITERATION_4 203 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 202 && BOOST_PP_ITERATION_START_4 >= 202 +# define BOOST_PP_ITERATION_4 202 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 201 && BOOST_PP_ITERATION_START_4 >= 201 +# define BOOST_PP_ITERATION_4 201 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 200 && BOOST_PP_ITERATION_START_4 >= 200 +# define BOOST_PP_ITERATION_4 200 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 199 && BOOST_PP_ITERATION_START_4 >= 199 +# define BOOST_PP_ITERATION_4 199 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 198 && BOOST_PP_ITERATION_START_4 >= 198 +# define BOOST_PP_ITERATION_4 198 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 197 && BOOST_PP_ITERATION_START_4 >= 197 +# define BOOST_PP_ITERATION_4 197 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 196 && BOOST_PP_ITERATION_START_4 >= 196 +# define BOOST_PP_ITERATION_4 196 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 195 && BOOST_PP_ITERATION_START_4 >= 195 +# define BOOST_PP_ITERATION_4 195 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 194 && BOOST_PP_ITERATION_START_4 >= 194 +# define BOOST_PP_ITERATION_4 194 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 193 && BOOST_PP_ITERATION_START_4 >= 193 +# define BOOST_PP_ITERATION_4 193 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 192 && BOOST_PP_ITERATION_START_4 >= 192 +# define BOOST_PP_ITERATION_4 192 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 191 && BOOST_PP_ITERATION_START_4 >= 191 +# define BOOST_PP_ITERATION_4 191 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 190 && BOOST_PP_ITERATION_START_4 >= 190 +# define BOOST_PP_ITERATION_4 190 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 189 && BOOST_PP_ITERATION_START_4 >= 189 +# define BOOST_PP_ITERATION_4 189 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 188 && BOOST_PP_ITERATION_START_4 >= 188 +# define BOOST_PP_ITERATION_4 188 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 187 && BOOST_PP_ITERATION_START_4 >= 187 +# define BOOST_PP_ITERATION_4 187 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 186 && BOOST_PP_ITERATION_START_4 >= 186 +# define BOOST_PP_ITERATION_4 186 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 185 && BOOST_PP_ITERATION_START_4 >= 185 +# define BOOST_PP_ITERATION_4 185 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 184 && BOOST_PP_ITERATION_START_4 >= 184 +# define BOOST_PP_ITERATION_4 184 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 183 && BOOST_PP_ITERATION_START_4 >= 183 +# define BOOST_PP_ITERATION_4 183 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 182 && BOOST_PP_ITERATION_START_4 >= 182 +# define BOOST_PP_ITERATION_4 182 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 181 && BOOST_PP_ITERATION_START_4 >= 181 +# define BOOST_PP_ITERATION_4 181 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 180 && BOOST_PP_ITERATION_START_4 >= 180 +# define BOOST_PP_ITERATION_4 180 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 179 && BOOST_PP_ITERATION_START_4 >= 179 +# define BOOST_PP_ITERATION_4 179 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 178 && BOOST_PP_ITERATION_START_4 >= 178 +# define BOOST_PP_ITERATION_4 178 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 177 && BOOST_PP_ITERATION_START_4 >= 177 +# define BOOST_PP_ITERATION_4 177 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 176 && BOOST_PP_ITERATION_START_4 >= 176 +# define BOOST_PP_ITERATION_4 176 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 175 && BOOST_PP_ITERATION_START_4 >= 175 +# define BOOST_PP_ITERATION_4 175 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 174 && BOOST_PP_ITERATION_START_4 >= 174 +# define BOOST_PP_ITERATION_4 174 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 173 && BOOST_PP_ITERATION_START_4 >= 173 +# define BOOST_PP_ITERATION_4 173 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 172 && BOOST_PP_ITERATION_START_4 >= 172 +# define BOOST_PP_ITERATION_4 172 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 171 && BOOST_PP_ITERATION_START_4 >= 171 +# define BOOST_PP_ITERATION_4 171 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 170 && BOOST_PP_ITERATION_START_4 >= 170 +# define BOOST_PP_ITERATION_4 170 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 169 && BOOST_PP_ITERATION_START_4 >= 169 +# define BOOST_PP_ITERATION_4 169 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 168 && BOOST_PP_ITERATION_START_4 >= 168 +# define BOOST_PP_ITERATION_4 168 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 167 && BOOST_PP_ITERATION_START_4 >= 167 +# define BOOST_PP_ITERATION_4 167 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 166 && BOOST_PP_ITERATION_START_4 >= 166 +# define BOOST_PP_ITERATION_4 166 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 165 && BOOST_PP_ITERATION_START_4 >= 165 +# define BOOST_PP_ITERATION_4 165 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 164 && BOOST_PP_ITERATION_START_4 >= 164 +# define BOOST_PP_ITERATION_4 164 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 163 && BOOST_PP_ITERATION_START_4 >= 163 +# define BOOST_PP_ITERATION_4 163 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 162 && BOOST_PP_ITERATION_START_4 >= 162 +# define BOOST_PP_ITERATION_4 162 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 161 && BOOST_PP_ITERATION_START_4 >= 161 +# define BOOST_PP_ITERATION_4 161 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 160 && BOOST_PP_ITERATION_START_4 >= 160 +# define BOOST_PP_ITERATION_4 160 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 159 && BOOST_PP_ITERATION_START_4 >= 159 +# define BOOST_PP_ITERATION_4 159 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 158 && BOOST_PP_ITERATION_START_4 >= 158 +# define BOOST_PP_ITERATION_4 158 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 157 && BOOST_PP_ITERATION_START_4 >= 157 +# define BOOST_PP_ITERATION_4 157 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 156 && BOOST_PP_ITERATION_START_4 >= 156 +# define BOOST_PP_ITERATION_4 156 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 155 && BOOST_PP_ITERATION_START_4 >= 155 +# define BOOST_PP_ITERATION_4 155 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 154 && BOOST_PP_ITERATION_START_4 >= 154 +# define BOOST_PP_ITERATION_4 154 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 153 && BOOST_PP_ITERATION_START_4 >= 153 +# define BOOST_PP_ITERATION_4 153 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 152 && BOOST_PP_ITERATION_START_4 >= 152 +# define BOOST_PP_ITERATION_4 152 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 151 && BOOST_PP_ITERATION_START_4 >= 151 +# define BOOST_PP_ITERATION_4 151 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 150 && BOOST_PP_ITERATION_START_4 >= 150 +# define BOOST_PP_ITERATION_4 150 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 149 && BOOST_PP_ITERATION_START_4 >= 149 +# define BOOST_PP_ITERATION_4 149 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 148 && BOOST_PP_ITERATION_START_4 >= 148 +# define BOOST_PP_ITERATION_4 148 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 147 && BOOST_PP_ITERATION_START_4 >= 147 +# define BOOST_PP_ITERATION_4 147 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 146 && BOOST_PP_ITERATION_START_4 >= 146 +# define BOOST_PP_ITERATION_4 146 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 145 && BOOST_PP_ITERATION_START_4 >= 145 +# define BOOST_PP_ITERATION_4 145 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 144 && BOOST_PP_ITERATION_START_4 >= 144 +# define BOOST_PP_ITERATION_4 144 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 143 && BOOST_PP_ITERATION_START_4 >= 143 +# define BOOST_PP_ITERATION_4 143 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 142 && BOOST_PP_ITERATION_START_4 >= 142 +# define BOOST_PP_ITERATION_4 142 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 141 && BOOST_PP_ITERATION_START_4 >= 141 +# define BOOST_PP_ITERATION_4 141 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 140 && BOOST_PP_ITERATION_START_4 >= 140 +# define BOOST_PP_ITERATION_4 140 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 139 && BOOST_PP_ITERATION_START_4 >= 139 +# define BOOST_PP_ITERATION_4 139 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 138 && BOOST_PP_ITERATION_START_4 >= 138 +# define BOOST_PP_ITERATION_4 138 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 137 && BOOST_PP_ITERATION_START_4 >= 137 +# define BOOST_PP_ITERATION_4 137 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 136 && BOOST_PP_ITERATION_START_4 >= 136 +# define BOOST_PP_ITERATION_4 136 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 135 && BOOST_PP_ITERATION_START_4 >= 135 +# define BOOST_PP_ITERATION_4 135 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 134 && BOOST_PP_ITERATION_START_4 >= 134 +# define BOOST_PP_ITERATION_4 134 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 133 && BOOST_PP_ITERATION_START_4 >= 133 +# define BOOST_PP_ITERATION_4 133 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 132 && BOOST_PP_ITERATION_START_4 >= 132 +# define BOOST_PP_ITERATION_4 132 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 131 && BOOST_PP_ITERATION_START_4 >= 131 +# define BOOST_PP_ITERATION_4 131 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 130 && BOOST_PP_ITERATION_START_4 >= 130 +# define BOOST_PP_ITERATION_4 130 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 129 && BOOST_PP_ITERATION_START_4 >= 129 +# define BOOST_PP_ITERATION_4 129 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 128 && BOOST_PP_ITERATION_START_4 >= 128 +# define BOOST_PP_ITERATION_4 128 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 127 && BOOST_PP_ITERATION_START_4 >= 127 +# define BOOST_PP_ITERATION_4 127 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 126 && BOOST_PP_ITERATION_START_4 >= 126 +# define BOOST_PP_ITERATION_4 126 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 125 && BOOST_PP_ITERATION_START_4 >= 125 +# define BOOST_PP_ITERATION_4 125 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 124 && BOOST_PP_ITERATION_START_4 >= 124 +# define BOOST_PP_ITERATION_4 124 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 123 && BOOST_PP_ITERATION_START_4 >= 123 +# define BOOST_PP_ITERATION_4 123 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 122 && BOOST_PP_ITERATION_START_4 >= 122 +# define BOOST_PP_ITERATION_4 122 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 121 && BOOST_PP_ITERATION_START_4 >= 121 +# define BOOST_PP_ITERATION_4 121 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 120 && BOOST_PP_ITERATION_START_4 >= 120 +# define BOOST_PP_ITERATION_4 120 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 119 && BOOST_PP_ITERATION_START_4 >= 119 +# define BOOST_PP_ITERATION_4 119 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 118 && BOOST_PP_ITERATION_START_4 >= 118 +# define BOOST_PP_ITERATION_4 118 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 117 && BOOST_PP_ITERATION_START_4 >= 117 +# define BOOST_PP_ITERATION_4 117 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 116 && BOOST_PP_ITERATION_START_4 >= 116 +# define BOOST_PP_ITERATION_4 116 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 115 && BOOST_PP_ITERATION_START_4 >= 115 +# define BOOST_PP_ITERATION_4 115 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 114 && BOOST_PP_ITERATION_START_4 >= 114 +# define BOOST_PP_ITERATION_4 114 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 113 && BOOST_PP_ITERATION_START_4 >= 113 +# define BOOST_PP_ITERATION_4 113 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 112 && BOOST_PP_ITERATION_START_4 >= 112 +# define BOOST_PP_ITERATION_4 112 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 111 && BOOST_PP_ITERATION_START_4 >= 111 +# define BOOST_PP_ITERATION_4 111 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 110 && BOOST_PP_ITERATION_START_4 >= 110 +# define BOOST_PP_ITERATION_4 110 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 109 && BOOST_PP_ITERATION_START_4 >= 109 +# define BOOST_PP_ITERATION_4 109 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 108 && BOOST_PP_ITERATION_START_4 >= 108 +# define BOOST_PP_ITERATION_4 108 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 107 && BOOST_PP_ITERATION_START_4 >= 107 +# define BOOST_PP_ITERATION_4 107 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 106 && BOOST_PP_ITERATION_START_4 >= 106 +# define BOOST_PP_ITERATION_4 106 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 105 && BOOST_PP_ITERATION_START_4 >= 105 +# define BOOST_PP_ITERATION_4 105 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 104 && BOOST_PP_ITERATION_START_4 >= 104 +# define BOOST_PP_ITERATION_4 104 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 103 && BOOST_PP_ITERATION_START_4 >= 103 +# define BOOST_PP_ITERATION_4 103 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 102 && BOOST_PP_ITERATION_START_4 >= 102 +# define BOOST_PP_ITERATION_4 102 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 101 && BOOST_PP_ITERATION_START_4 >= 101 +# define BOOST_PP_ITERATION_4 101 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 100 && BOOST_PP_ITERATION_START_4 >= 100 +# define BOOST_PP_ITERATION_4 100 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 99 && BOOST_PP_ITERATION_START_4 >= 99 +# define BOOST_PP_ITERATION_4 99 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 98 && BOOST_PP_ITERATION_START_4 >= 98 +# define BOOST_PP_ITERATION_4 98 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 97 && BOOST_PP_ITERATION_START_4 >= 97 +# define BOOST_PP_ITERATION_4 97 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 96 && BOOST_PP_ITERATION_START_4 >= 96 +# define BOOST_PP_ITERATION_4 96 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 95 && BOOST_PP_ITERATION_START_4 >= 95 +# define BOOST_PP_ITERATION_4 95 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 94 && BOOST_PP_ITERATION_START_4 >= 94 +# define BOOST_PP_ITERATION_4 94 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 93 && BOOST_PP_ITERATION_START_4 >= 93 +# define BOOST_PP_ITERATION_4 93 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 92 && BOOST_PP_ITERATION_START_4 >= 92 +# define BOOST_PP_ITERATION_4 92 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 91 && BOOST_PP_ITERATION_START_4 >= 91 +# define BOOST_PP_ITERATION_4 91 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 90 && BOOST_PP_ITERATION_START_4 >= 90 +# define BOOST_PP_ITERATION_4 90 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 89 && BOOST_PP_ITERATION_START_4 >= 89 +# define BOOST_PP_ITERATION_4 89 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 88 && BOOST_PP_ITERATION_START_4 >= 88 +# define BOOST_PP_ITERATION_4 88 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 87 && BOOST_PP_ITERATION_START_4 >= 87 +# define BOOST_PP_ITERATION_4 87 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 86 && BOOST_PP_ITERATION_START_4 >= 86 +# define BOOST_PP_ITERATION_4 86 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 85 && BOOST_PP_ITERATION_START_4 >= 85 +# define BOOST_PP_ITERATION_4 85 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 84 && BOOST_PP_ITERATION_START_4 >= 84 +# define BOOST_PP_ITERATION_4 84 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 83 && BOOST_PP_ITERATION_START_4 >= 83 +# define BOOST_PP_ITERATION_4 83 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 82 && BOOST_PP_ITERATION_START_4 >= 82 +# define BOOST_PP_ITERATION_4 82 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 81 && BOOST_PP_ITERATION_START_4 >= 81 +# define BOOST_PP_ITERATION_4 81 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 80 && BOOST_PP_ITERATION_START_4 >= 80 +# define BOOST_PP_ITERATION_4 80 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 79 && BOOST_PP_ITERATION_START_4 >= 79 +# define BOOST_PP_ITERATION_4 79 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 78 && BOOST_PP_ITERATION_START_4 >= 78 +# define BOOST_PP_ITERATION_4 78 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 77 && BOOST_PP_ITERATION_START_4 >= 77 +# define BOOST_PP_ITERATION_4 77 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 76 && BOOST_PP_ITERATION_START_4 >= 76 +# define BOOST_PP_ITERATION_4 76 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 75 && BOOST_PP_ITERATION_START_4 >= 75 +# define BOOST_PP_ITERATION_4 75 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 74 && BOOST_PP_ITERATION_START_4 >= 74 +# define BOOST_PP_ITERATION_4 74 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 73 && BOOST_PP_ITERATION_START_4 >= 73 +# define BOOST_PP_ITERATION_4 73 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 72 && BOOST_PP_ITERATION_START_4 >= 72 +# define BOOST_PP_ITERATION_4 72 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 71 && BOOST_PP_ITERATION_START_4 >= 71 +# define BOOST_PP_ITERATION_4 71 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 70 && BOOST_PP_ITERATION_START_4 >= 70 +# define BOOST_PP_ITERATION_4 70 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 69 && BOOST_PP_ITERATION_START_4 >= 69 +# define BOOST_PP_ITERATION_4 69 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 68 && BOOST_PP_ITERATION_START_4 >= 68 +# define BOOST_PP_ITERATION_4 68 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 67 && BOOST_PP_ITERATION_START_4 >= 67 +# define BOOST_PP_ITERATION_4 67 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 66 && BOOST_PP_ITERATION_START_4 >= 66 +# define BOOST_PP_ITERATION_4 66 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 65 && BOOST_PP_ITERATION_START_4 >= 65 +# define BOOST_PP_ITERATION_4 65 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 64 && BOOST_PP_ITERATION_START_4 >= 64 +# define BOOST_PP_ITERATION_4 64 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 63 && BOOST_PP_ITERATION_START_4 >= 63 +# define BOOST_PP_ITERATION_4 63 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 62 && BOOST_PP_ITERATION_START_4 >= 62 +# define BOOST_PP_ITERATION_4 62 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 61 && BOOST_PP_ITERATION_START_4 >= 61 +# define BOOST_PP_ITERATION_4 61 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 60 && BOOST_PP_ITERATION_START_4 >= 60 +# define BOOST_PP_ITERATION_4 60 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 59 && BOOST_PP_ITERATION_START_4 >= 59 +# define BOOST_PP_ITERATION_4 59 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 58 && BOOST_PP_ITERATION_START_4 >= 58 +# define BOOST_PP_ITERATION_4 58 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 57 && BOOST_PP_ITERATION_START_4 >= 57 +# define BOOST_PP_ITERATION_4 57 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 56 && BOOST_PP_ITERATION_START_4 >= 56 +# define BOOST_PP_ITERATION_4 56 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 55 && BOOST_PP_ITERATION_START_4 >= 55 +# define BOOST_PP_ITERATION_4 55 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 54 && BOOST_PP_ITERATION_START_4 >= 54 +# define BOOST_PP_ITERATION_4 54 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 53 && BOOST_PP_ITERATION_START_4 >= 53 +# define BOOST_PP_ITERATION_4 53 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 52 && BOOST_PP_ITERATION_START_4 >= 52 +# define BOOST_PP_ITERATION_4 52 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 51 && BOOST_PP_ITERATION_START_4 >= 51 +# define BOOST_PP_ITERATION_4 51 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 50 && BOOST_PP_ITERATION_START_4 >= 50 +# define BOOST_PP_ITERATION_4 50 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 49 && BOOST_PP_ITERATION_START_4 >= 49 +# define BOOST_PP_ITERATION_4 49 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 48 && BOOST_PP_ITERATION_START_4 >= 48 +# define BOOST_PP_ITERATION_4 48 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 47 && BOOST_PP_ITERATION_START_4 >= 47 +# define BOOST_PP_ITERATION_4 47 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 46 && BOOST_PP_ITERATION_START_4 >= 46 +# define BOOST_PP_ITERATION_4 46 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 45 && BOOST_PP_ITERATION_START_4 >= 45 +# define BOOST_PP_ITERATION_4 45 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 44 && BOOST_PP_ITERATION_START_4 >= 44 +# define BOOST_PP_ITERATION_4 44 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 43 && BOOST_PP_ITERATION_START_4 >= 43 +# define BOOST_PP_ITERATION_4 43 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 42 && BOOST_PP_ITERATION_START_4 >= 42 +# define BOOST_PP_ITERATION_4 42 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 41 && BOOST_PP_ITERATION_START_4 >= 41 +# define BOOST_PP_ITERATION_4 41 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 40 && BOOST_PP_ITERATION_START_4 >= 40 +# define BOOST_PP_ITERATION_4 40 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 39 && BOOST_PP_ITERATION_START_4 >= 39 +# define BOOST_PP_ITERATION_4 39 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 38 && BOOST_PP_ITERATION_START_4 >= 38 +# define BOOST_PP_ITERATION_4 38 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 37 && BOOST_PP_ITERATION_START_4 >= 37 +# define BOOST_PP_ITERATION_4 37 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 36 && BOOST_PP_ITERATION_START_4 >= 36 +# define BOOST_PP_ITERATION_4 36 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 35 && BOOST_PP_ITERATION_START_4 >= 35 +# define BOOST_PP_ITERATION_4 35 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 34 && BOOST_PP_ITERATION_START_4 >= 34 +# define BOOST_PP_ITERATION_4 34 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 33 && BOOST_PP_ITERATION_START_4 >= 33 +# define BOOST_PP_ITERATION_4 33 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 32 && BOOST_PP_ITERATION_START_4 >= 32 +# define BOOST_PP_ITERATION_4 32 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 31 && BOOST_PP_ITERATION_START_4 >= 31 +# define BOOST_PP_ITERATION_4 31 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 30 && BOOST_PP_ITERATION_START_4 >= 30 +# define BOOST_PP_ITERATION_4 30 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 29 && BOOST_PP_ITERATION_START_4 >= 29 +# define BOOST_PP_ITERATION_4 29 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 28 && BOOST_PP_ITERATION_START_4 >= 28 +# define BOOST_PP_ITERATION_4 28 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 27 && BOOST_PP_ITERATION_START_4 >= 27 +# define BOOST_PP_ITERATION_4 27 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 26 && BOOST_PP_ITERATION_START_4 >= 26 +# define BOOST_PP_ITERATION_4 26 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 25 && BOOST_PP_ITERATION_START_4 >= 25 +# define BOOST_PP_ITERATION_4 25 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 24 && BOOST_PP_ITERATION_START_4 >= 24 +# define BOOST_PP_ITERATION_4 24 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 23 && BOOST_PP_ITERATION_START_4 >= 23 +# define BOOST_PP_ITERATION_4 23 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 22 && BOOST_PP_ITERATION_START_4 >= 22 +# define BOOST_PP_ITERATION_4 22 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 21 && BOOST_PP_ITERATION_START_4 >= 21 +# define BOOST_PP_ITERATION_4 21 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 20 && BOOST_PP_ITERATION_START_4 >= 20 +# define BOOST_PP_ITERATION_4 20 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 19 && BOOST_PP_ITERATION_START_4 >= 19 +# define BOOST_PP_ITERATION_4 19 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 18 && BOOST_PP_ITERATION_START_4 >= 18 +# define BOOST_PP_ITERATION_4 18 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 17 && BOOST_PP_ITERATION_START_4 >= 17 +# define BOOST_PP_ITERATION_4 17 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 16 && BOOST_PP_ITERATION_START_4 >= 16 +# define BOOST_PP_ITERATION_4 16 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 15 && BOOST_PP_ITERATION_START_4 >= 15 +# define BOOST_PP_ITERATION_4 15 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 14 && BOOST_PP_ITERATION_START_4 >= 14 +# define BOOST_PP_ITERATION_4 14 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 13 && BOOST_PP_ITERATION_START_4 >= 13 +# define BOOST_PP_ITERATION_4 13 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 12 && BOOST_PP_ITERATION_START_4 >= 12 +# define BOOST_PP_ITERATION_4 12 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 11 && BOOST_PP_ITERATION_START_4 >= 11 +# define BOOST_PP_ITERATION_4 11 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 10 && BOOST_PP_ITERATION_START_4 >= 10 +# define BOOST_PP_ITERATION_4 10 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 9 && BOOST_PP_ITERATION_START_4 >= 9 +# define BOOST_PP_ITERATION_4 9 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 8 && BOOST_PP_ITERATION_START_4 >= 8 +# define BOOST_PP_ITERATION_4 8 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 7 && BOOST_PP_ITERATION_START_4 >= 7 +# define BOOST_PP_ITERATION_4 7 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 6 && BOOST_PP_ITERATION_START_4 >= 6 +# define BOOST_PP_ITERATION_4 6 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 5 && BOOST_PP_ITERATION_START_4 >= 5 +# define BOOST_PP_ITERATION_4 5 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 4 && BOOST_PP_ITERATION_START_4 >= 4 +# define BOOST_PP_ITERATION_4 4 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 3 && BOOST_PP_ITERATION_START_4 >= 3 +# define BOOST_PP_ITERATION_4 3 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 2 && BOOST_PP_ITERATION_START_4 >= 2 +# define BOOST_PP_ITERATION_4 2 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 1 && BOOST_PP_ITERATION_START_4 >= 1 +# define BOOST_PP_ITERATION_4 1 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif +# if BOOST_PP_ITERATION_FINISH_4 <= 0 && BOOST_PP_ITERATION_START_4 >= 0 +# define BOOST_PP_ITERATION_4 0 +# include BOOST_PP_FILENAME_4 +# undef BOOST_PP_ITERATION_4 +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/reverse5.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/reverse5.hpp new file mode 100644 index 0000000000..225a557f89 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/iter/reverse5.hpp @@ -0,0 +1,1296 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# if BOOST_PP_ITERATION_FINISH_5 <= 256 && BOOST_PP_ITERATION_START_5 >= 256 +# define BOOST_PP_ITERATION_5 256 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 255 && BOOST_PP_ITERATION_START_5 >= 255 +# define BOOST_PP_ITERATION_5 255 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 254 && BOOST_PP_ITERATION_START_5 >= 254 +# define BOOST_PP_ITERATION_5 254 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 253 && BOOST_PP_ITERATION_START_5 >= 253 +# define BOOST_PP_ITERATION_5 253 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 252 && BOOST_PP_ITERATION_START_5 >= 252 +# define BOOST_PP_ITERATION_5 252 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 251 && BOOST_PP_ITERATION_START_5 >= 251 +# define BOOST_PP_ITERATION_5 251 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 250 && BOOST_PP_ITERATION_START_5 >= 250 +# define BOOST_PP_ITERATION_5 250 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 249 && BOOST_PP_ITERATION_START_5 >= 249 +# define BOOST_PP_ITERATION_5 249 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 248 && BOOST_PP_ITERATION_START_5 >= 248 +# define BOOST_PP_ITERATION_5 248 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 247 && BOOST_PP_ITERATION_START_5 >= 247 +# define BOOST_PP_ITERATION_5 247 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 246 && BOOST_PP_ITERATION_START_5 >= 246 +# define BOOST_PP_ITERATION_5 246 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 245 && BOOST_PP_ITERATION_START_5 >= 245 +# define BOOST_PP_ITERATION_5 245 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 244 && BOOST_PP_ITERATION_START_5 >= 244 +# define BOOST_PP_ITERATION_5 244 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 243 && BOOST_PP_ITERATION_START_5 >= 243 +# define BOOST_PP_ITERATION_5 243 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 242 && BOOST_PP_ITERATION_START_5 >= 242 +# define BOOST_PP_ITERATION_5 242 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 241 && BOOST_PP_ITERATION_START_5 >= 241 +# define BOOST_PP_ITERATION_5 241 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 240 && BOOST_PP_ITERATION_START_5 >= 240 +# define BOOST_PP_ITERATION_5 240 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 239 && BOOST_PP_ITERATION_START_5 >= 239 +# define BOOST_PP_ITERATION_5 239 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 238 && BOOST_PP_ITERATION_START_5 >= 238 +# define BOOST_PP_ITERATION_5 238 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 237 && BOOST_PP_ITERATION_START_5 >= 237 +# define BOOST_PP_ITERATION_5 237 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 236 && BOOST_PP_ITERATION_START_5 >= 236 +# define BOOST_PP_ITERATION_5 236 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 235 && BOOST_PP_ITERATION_START_5 >= 235 +# define BOOST_PP_ITERATION_5 235 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 234 && BOOST_PP_ITERATION_START_5 >= 234 +# define BOOST_PP_ITERATION_5 234 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 233 && BOOST_PP_ITERATION_START_5 >= 233 +# define BOOST_PP_ITERATION_5 233 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 232 && BOOST_PP_ITERATION_START_5 >= 232 +# define BOOST_PP_ITERATION_5 232 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 231 && BOOST_PP_ITERATION_START_5 >= 231 +# define BOOST_PP_ITERATION_5 231 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 230 && BOOST_PP_ITERATION_START_5 >= 230 +# define BOOST_PP_ITERATION_5 230 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 229 && BOOST_PP_ITERATION_START_5 >= 229 +# define BOOST_PP_ITERATION_5 229 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 228 && BOOST_PP_ITERATION_START_5 >= 228 +# define BOOST_PP_ITERATION_5 228 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 227 && BOOST_PP_ITERATION_START_5 >= 227 +# define BOOST_PP_ITERATION_5 227 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 226 && BOOST_PP_ITERATION_START_5 >= 226 +# define BOOST_PP_ITERATION_5 226 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 225 && BOOST_PP_ITERATION_START_5 >= 225 +# define BOOST_PP_ITERATION_5 225 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 224 && BOOST_PP_ITERATION_START_5 >= 224 +# define BOOST_PP_ITERATION_5 224 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 223 && BOOST_PP_ITERATION_START_5 >= 223 +# define BOOST_PP_ITERATION_5 223 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 222 && BOOST_PP_ITERATION_START_5 >= 222 +# define BOOST_PP_ITERATION_5 222 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 221 && BOOST_PP_ITERATION_START_5 >= 221 +# define BOOST_PP_ITERATION_5 221 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 220 && BOOST_PP_ITERATION_START_5 >= 220 +# define BOOST_PP_ITERATION_5 220 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 219 && BOOST_PP_ITERATION_START_5 >= 219 +# define BOOST_PP_ITERATION_5 219 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 218 && BOOST_PP_ITERATION_START_5 >= 218 +# define BOOST_PP_ITERATION_5 218 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 217 && BOOST_PP_ITERATION_START_5 >= 217 +# define BOOST_PP_ITERATION_5 217 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 216 && BOOST_PP_ITERATION_START_5 >= 216 +# define BOOST_PP_ITERATION_5 216 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 215 && BOOST_PP_ITERATION_START_5 >= 215 +# define BOOST_PP_ITERATION_5 215 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 214 && BOOST_PP_ITERATION_START_5 >= 214 +# define BOOST_PP_ITERATION_5 214 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 213 && BOOST_PP_ITERATION_START_5 >= 213 +# define BOOST_PP_ITERATION_5 213 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 212 && BOOST_PP_ITERATION_START_5 >= 212 +# define BOOST_PP_ITERATION_5 212 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 211 && BOOST_PP_ITERATION_START_5 >= 211 +# define BOOST_PP_ITERATION_5 211 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 210 && BOOST_PP_ITERATION_START_5 >= 210 +# define BOOST_PP_ITERATION_5 210 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 209 && BOOST_PP_ITERATION_START_5 >= 209 +# define BOOST_PP_ITERATION_5 209 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 208 && BOOST_PP_ITERATION_START_5 >= 208 +# define BOOST_PP_ITERATION_5 208 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 207 && BOOST_PP_ITERATION_START_5 >= 207 +# define BOOST_PP_ITERATION_5 207 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 206 && BOOST_PP_ITERATION_START_5 >= 206 +# define BOOST_PP_ITERATION_5 206 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 205 && BOOST_PP_ITERATION_START_5 >= 205 +# define BOOST_PP_ITERATION_5 205 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 204 && BOOST_PP_ITERATION_START_5 >= 204 +# define BOOST_PP_ITERATION_5 204 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 203 && BOOST_PP_ITERATION_START_5 >= 203 +# define BOOST_PP_ITERATION_5 203 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 202 && BOOST_PP_ITERATION_START_5 >= 202 +# define BOOST_PP_ITERATION_5 202 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 201 && BOOST_PP_ITERATION_START_5 >= 201 +# define BOOST_PP_ITERATION_5 201 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 200 && BOOST_PP_ITERATION_START_5 >= 200 +# define BOOST_PP_ITERATION_5 200 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 199 && BOOST_PP_ITERATION_START_5 >= 199 +# define BOOST_PP_ITERATION_5 199 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 198 && BOOST_PP_ITERATION_START_5 >= 198 +# define BOOST_PP_ITERATION_5 198 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 197 && BOOST_PP_ITERATION_START_5 >= 197 +# define BOOST_PP_ITERATION_5 197 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 196 && BOOST_PP_ITERATION_START_5 >= 196 +# define BOOST_PP_ITERATION_5 196 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 195 && BOOST_PP_ITERATION_START_5 >= 195 +# define BOOST_PP_ITERATION_5 195 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 194 && BOOST_PP_ITERATION_START_5 >= 194 +# define BOOST_PP_ITERATION_5 194 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 193 && BOOST_PP_ITERATION_START_5 >= 193 +# define BOOST_PP_ITERATION_5 193 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 192 && BOOST_PP_ITERATION_START_5 >= 192 +# define BOOST_PP_ITERATION_5 192 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 191 && BOOST_PP_ITERATION_START_5 >= 191 +# define BOOST_PP_ITERATION_5 191 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 190 && BOOST_PP_ITERATION_START_5 >= 190 +# define BOOST_PP_ITERATION_5 190 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 189 && BOOST_PP_ITERATION_START_5 >= 189 +# define BOOST_PP_ITERATION_5 189 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 188 && BOOST_PP_ITERATION_START_5 >= 188 +# define BOOST_PP_ITERATION_5 188 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 187 && BOOST_PP_ITERATION_START_5 >= 187 +# define BOOST_PP_ITERATION_5 187 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 186 && BOOST_PP_ITERATION_START_5 >= 186 +# define BOOST_PP_ITERATION_5 186 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 185 && BOOST_PP_ITERATION_START_5 >= 185 +# define BOOST_PP_ITERATION_5 185 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 184 && BOOST_PP_ITERATION_START_5 >= 184 +# define BOOST_PP_ITERATION_5 184 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 183 && BOOST_PP_ITERATION_START_5 >= 183 +# define BOOST_PP_ITERATION_5 183 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 182 && BOOST_PP_ITERATION_START_5 >= 182 +# define BOOST_PP_ITERATION_5 182 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 181 && BOOST_PP_ITERATION_START_5 >= 181 +# define BOOST_PP_ITERATION_5 181 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 180 && BOOST_PP_ITERATION_START_5 >= 180 +# define BOOST_PP_ITERATION_5 180 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 179 && BOOST_PP_ITERATION_START_5 >= 179 +# define BOOST_PP_ITERATION_5 179 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 178 && BOOST_PP_ITERATION_START_5 >= 178 +# define BOOST_PP_ITERATION_5 178 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 177 && BOOST_PP_ITERATION_START_5 >= 177 +# define BOOST_PP_ITERATION_5 177 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 176 && BOOST_PP_ITERATION_START_5 >= 176 +# define BOOST_PP_ITERATION_5 176 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 175 && BOOST_PP_ITERATION_START_5 >= 175 +# define BOOST_PP_ITERATION_5 175 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 174 && BOOST_PP_ITERATION_START_5 >= 174 +# define BOOST_PP_ITERATION_5 174 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 173 && BOOST_PP_ITERATION_START_5 >= 173 +# define BOOST_PP_ITERATION_5 173 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 172 && BOOST_PP_ITERATION_START_5 >= 172 +# define BOOST_PP_ITERATION_5 172 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 171 && BOOST_PP_ITERATION_START_5 >= 171 +# define BOOST_PP_ITERATION_5 171 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 170 && BOOST_PP_ITERATION_START_5 >= 170 +# define BOOST_PP_ITERATION_5 170 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 169 && BOOST_PP_ITERATION_START_5 >= 169 +# define BOOST_PP_ITERATION_5 169 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 168 && BOOST_PP_ITERATION_START_5 >= 168 +# define BOOST_PP_ITERATION_5 168 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 167 && BOOST_PP_ITERATION_START_5 >= 167 +# define BOOST_PP_ITERATION_5 167 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 166 && BOOST_PP_ITERATION_START_5 >= 166 +# define BOOST_PP_ITERATION_5 166 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 165 && BOOST_PP_ITERATION_START_5 >= 165 +# define BOOST_PP_ITERATION_5 165 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 164 && BOOST_PP_ITERATION_START_5 >= 164 +# define BOOST_PP_ITERATION_5 164 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 163 && BOOST_PP_ITERATION_START_5 >= 163 +# define BOOST_PP_ITERATION_5 163 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 162 && BOOST_PP_ITERATION_START_5 >= 162 +# define BOOST_PP_ITERATION_5 162 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 161 && BOOST_PP_ITERATION_START_5 >= 161 +# define BOOST_PP_ITERATION_5 161 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 160 && BOOST_PP_ITERATION_START_5 >= 160 +# define BOOST_PP_ITERATION_5 160 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 159 && BOOST_PP_ITERATION_START_5 >= 159 +# define BOOST_PP_ITERATION_5 159 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 158 && BOOST_PP_ITERATION_START_5 >= 158 +# define BOOST_PP_ITERATION_5 158 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 157 && BOOST_PP_ITERATION_START_5 >= 157 +# define BOOST_PP_ITERATION_5 157 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 156 && BOOST_PP_ITERATION_START_5 >= 156 +# define BOOST_PP_ITERATION_5 156 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 155 && BOOST_PP_ITERATION_START_5 >= 155 +# define BOOST_PP_ITERATION_5 155 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 154 && BOOST_PP_ITERATION_START_5 >= 154 +# define BOOST_PP_ITERATION_5 154 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 153 && BOOST_PP_ITERATION_START_5 >= 153 +# define BOOST_PP_ITERATION_5 153 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 152 && BOOST_PP_ITERATION_START_5 >= 152 +# define BOOST_PP_ITERATION_5 152 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 151 && BOOST_PP_ITERATION_START_5 >= 151 +# define BOOST_PP_ITERATION_5 151 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 150 && BOOST_PP_ITERATION_START_5 >= 150 +# define BOOST_PP_ITERATION_5 150 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 149 && BOOST_PP_ITERATION_START_5 >= 149 +# define BOOST_PP_ITERATION_5 149 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 148 && BOOST_PP_ITERATION_START_5 >= 148 +# define BOOST_PP_ITERATION_5 148 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 147 && BOOST_PP_ITERATION_START_5 >= 147 +# define BOOST_PP_ITERATION_5 147 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 146 && BOOST_PP_ITERATION_START_5 >= 146 +# define BOOST_PP_ITERATION_5 146 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 145 && BOOST_PP_ITERATION_START_5 >= 145 +# define BOOST_PP_ITERATION_5 145 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 144 && BOOST_PP_ITERATION_START_5 >= 144 +# define BOOST_PP_ITERATION_5 144 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 143 && BOOST_PP_ITERATION_START_5 >= 143 +# define BOOST_PP_ITERATION_5 143 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 142 && BOOST_PP_ITERATION_START_5 >= 142 +# define BOOST_PP_ITERATION_5 142 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 141 && BOOST_PP_ITERATION_START_5 >= 141 +# define BOOST_PP_ITERATION_5 141 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 140 && BOOST_PP_ITERATION_START_5 >= 140 +# define BOOST_PP_ITERATION_5 140 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 139 && BOOST_PP_ITERATION_START_5 >= 139 +# define BOOST_PP_ITERATION_5 139 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 138 && BOOST_PP_ITERATION_START_5 >= 138 +# define BOOST_PP_ITERATION_5 138 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 137 && BOOST_PP_ITERATION_START_5 >= 137 +# define BOOST_PP_ITERATION_5 137 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 136 && BOOST_PP_ITERATION_START_5 >= 136 +# define BOOST_PP_ITERATION_5 136 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 135 && BOOST_PP_ITERATION_START_5 >= 135 +# define BOOST_PP_ITERATION_5 135 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 134 && BOOST_PP_ITERATION_START_5 >= 134 +# define BOOST_PP_ITERATION_5 134 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 133 && BOOST_PP_ITERATION_START_5 >= 133 +# define BOOST_PP_ITERATION_5 133 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 132 && BOOST_PP_ITERATION_START_5 >= 132 +# define BOOST_PP_ITERATION_5 132 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 131 && BOOST_PP_ITERATION_START_5 >= 131 +# define BOOST_PP_ITERATION_5 131 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 130 && BOOST_PP_ITERATION_START_5 >= 130 +# define BOOST_PP_ITERATION_5 130 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 129 && BOOST_PP_ITERATION_START_5 >= 129 +# define BOOST_PP_ITERATION_5 129 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 128 && BOOST_PP_ITERATION_START_5 >= 128 +# define BOOST_PP_ITERATION_5 128 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 127 && BOOST_PP_ITERATION_START_5 >= 127 +# define BOOST_PP_ITERATION_5 127 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 126 && BOOST_PP_ITERATION_START_5 >= 126 +# define BOOST_PP_ITERATION_5 126 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 125 && BOOST_PP_ITERATION_START_5 >= 125 +# define BOOST_PP_ITERATION_5 125 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 124 && BOOST_PP_ITERATION_START_5 >= 124 +# define BOOST_PP_ITERATION_5 124 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 123 && BOOST_PP_ITERATION_START_5 >= 123 +# define BOOST_PP_ITERATION_5 123 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 122 && BOOST_PP_ITERATION_START_5 >= 122 +# define BOOST_PP_ITERATION_5 122 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 121 && BOOST_PP_ITERATION_START_5 >= 121 +# define BOOST_PP_ITERATION_5 121 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 120 && BOOST_PP_ITERATION_START_5 >= 120 +# define BOOST_PP_ITERATION_5 120 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 119 && BOOST_PP_ITERATION_START_5 >= 119 +# define BOOST_PP_ITERATION_5 119 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 118 && BOOST_PP_ITERATION_START_5 >= 118 +# define BOOST_PP_ITERATION_5 118 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 117 && BOOST_PP_ITERATION_START_5 >= 117 +# define BOOST_PP_ITERATION_5 117 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 116 && BOOST_PP_ITERATION_START_5 >= 116 +# define BOOST_PP_ITERATION_5 116 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 115 && BOOST_PP_ITERATION_START_5 >= 115 +# define BOOST_PP_ITERATION_5 115 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 114 && BOOST_PP_ITERATION_START_5 >= 114 +# define BOOST_PP_ITERATION_5 114 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 113 && BOOST_PP_ITERATION_START_5 >= 113 +# define BOOST_PP_ITERATION_5 113 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 112 && BOOST_PP_ITERATION_START_5 >= 112 +# define BOOST_PP_ITERATION_5 112 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 111 && BOOST_PP_ITERATION_START_5 >= 111 +# define BOOST_PP_ITERATION_5 111 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 110 && BOOST_PP_ITERATION_START_5 >= 110 +# define BOOST_PP_ITERATION_5 110 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 109 && BOOST_PP_ITERATION_START_5 >= 109 +# define BOOST_PP_ITERATION_5 109 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 108 && BOOST_PP_ITERATION_START_5 >= 108 +# define BOOST_PP_ITERATION_5 108 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 107 && BOOST_PP_ITERATION_START_5 >= 107 +# define BOOST_PP_ITERATION_5 107 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 106 && BOOST_PP_ITERATION_START_5 >= 106 +# define BOOST_PP_ITERATION_5 106 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 105 && BOOST_PP_ITERATION_START_5 >= 105 +# define BOOST_PP_ITERATION_5 105 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 104 && BOOST_PP_ITERATION_START_5 >= 104 +# define BOOST_PP_ITERATION_5 104 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 103 && BOOST_PP_ITERATION_START_5 >= 103 +# define BOOST_PP_ITERATION_5 103 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 102 && BOOST_PP_ITERATION_START_5 >= 102 +# define BOOST_PP_ITERATION_5 102 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 101 && BOOST_PP_ITERATION_START_5 >= 101 +# define BOOST_PP_ITERATION_5 101 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 100 && BOOST_PP_ITERATION_START_5 >= 100 +# define BOOST_PP_ITERATION_5 100 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 99 && BOOST_PP_ITERATION_START_5 >= 99 +# define BOOST_PP_ITERATION_5 99 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 98 && BOOST_PP_ITERATION_START_5 >= 98 +# define BOOST_PP_ITERATION_5 98 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 97 && BOOST_PP_ITERATION_START_5 >= 97 +# define BOOST_PP_ITERATION_5 97 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 96 && BOOST_PP_ITERATION_START_5 >= 96 +# define BOOST_PP_ITERATION_5 96 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 95 && BOOST_PP_ITERATION_START_5 >= 95 +# define BOOST_PP_ITERATION_5 95 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 94 && BOOST_PP_ITERATION_START_5 >= 94 +# define BOOST_PP_ITERATION_5 94 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 93 && BOOST_PP_ITERATION_START_5 >= 93 +# define BOOST_PP_ITERATION_5 93 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 92 && BOOST_PP_ITERATION_START_5 >= 92 +# define BOOST_PP_ITERATION_5 92 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 91 && BOOST_PP_ITERATION_START_5 >= 91 +# define BOOST_PP_ITERATION_5 91 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 90 && BOOST_PP_ITERATION_START_5 >= 90 +# define BOOST_PP_ITERATION_5 90 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 89 && BOOST_PP_ITERATION_START_5 >= 89 +# define BOOST_PP_ITERATION_5 89 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 88 && BOOST_PP_ITERATION_START_5 >= 88 +# define BOOST_PP_ITERATION_5 88 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 87 && BOOST_PP_ITERATION_START_5 >= 87 +# define BOOST_PP_ITERATION_5 87 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 86 && BOOST_PP_ITERATION_START_5 >= 86 +# define BOOST_PP_ITERATION_5 86 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 85 && BOOST_PP_ITERATION_START_5 >= 85 +# define BOOST_PP_ITERATION_5 85 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 84 && BOOST_PP_ITERATION_START_5 >= 84 +# define BOOST_PP_ITERATION_5 84 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 83 && BOOST_PP_ITERATION_START_5 >= 83 +# define BOOST_PP_ITERATION_5 83 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 82 && BOOST_PP_ITERATION_START_5 >= 82 +# define BOOST_PP_ITERATION_5 82 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 81 && BOOST_PP_ITERATION_START_5 >= 81 +# define BOOST_PP_ITERATION_5 81 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 80 && BOOST_PP_ITERATION_START_5 >= 80 +# define BOOST_PP_ITERATION_5 80 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 79 && BOOST_PP_ITERATION_START_5 >= 79 +# define BOOST_PP_ITERATION_5 79 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 78 && BOOST_PP_ITERATION_START_5 >= 78 +# define BOOST_PP_ITERATION_5 78 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 77 && BOOST_PP_ITERATION_START_5 >= 77 +# define BOOST_PP_ITERATION_5 77 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 76 && BOOST_PP_ITERATION_START_5 >= 76 +# define BOOST_PP_ITERATION_5 76 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 75 && BOOST_PP_ITERATION_START_5 >= 75 +# define BOOST_PP_ITERATION_5 75 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 74 && BOOST_PP_ITERATION_START_5 >= 74 +# define BOOST_PP_ITERATION_5 74 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 73 && BOOST_PP_ITERATION_START_5 >= 73 +# define BOOST_PP_ITERATION_5 73 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 72 && BOOST_PP_ITERATION_START_5 >= 72 +# define BOOST_PP_ITERATION_5 72 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 71 && BOOST_PP_ITERATION_START_5 >= 71 +# define BOOST_PP_ITERATION_5 71 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 70 && BOOST_PP_ITERATION_START_5 >= 70 +# define BOOST_PP_ITERATION_5 70 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 69 && BOOST_PP_ITERATION_START_5 >= 69 +# define BOOST_PP_ITERATION_5 69 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 68 && BOOST_PP_ITERATION_START_5 >= 68 +# define BOOST_PP_ITERATION_5 68 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 67 && BOOST_PP_ITERATION_START_5 >= 67 +# define BOOST_PP_ITERATION_5 67 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 66 && BOOST_PP_ITERATION_START_5 >= 66 +# define BOOST_PP_ITERATION_5 66 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 65 && BOOST_PP_ITERATION_START_5 >= 65 +# define BOOST_PP_ITERATION_5 65 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 64 && BOOST_PP_ITERATION_START_5 >= 64 +# define BOOST_PP_ITERATION_5 64 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 63 && BOOST_PP_ITERATION_START_5 >= 63 +# define BOOST_PP_ITERATION_5 63 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 62 && BOOST_PP_ITERATION_START_5 >= 62 +# define BOOST_PP_ITERATION_5 62 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 61 && BOOST_PP_ITERATION_START_5 >= 61 +# define BOOST_PP_ITERATION_5 61 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 60 && BOOST_PP_ITERATION_START_5 >= 60 +# define BOOST_PP_ITERATION_5 60 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 59 && BOOST_PP_ITERATION_START_5 >= 59 +# define BOOST_PP_ITERATION_5 59 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 58 && BOOST_PP_ITERATION_START_5 >= 58 +# define BOOST_PP_ITERATION_5 58 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 57 && BOOST_PP_ITERATION_START_5 >= 57 +# define BOOST_PP_ITERATION_5 57 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 56 && BOOST_PP_ITERATION_START_5 >= 56 +# define BOOST_PP_ITERATION_5 56 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 55 && BOOST_PP_ITERATION_START_5 >= 55 +# define BOOST_PP_ITERATION_5 55 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 54 && BOOST_PP_ITERATION_START_5 >= 54 +# define BOOST_PP_ITERATION_5 54 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 53 && BOOST_PP_ITERATION_START_5 >= 53 +# define BOOST_PP_ITERATION_5 53 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 52 && BOOST_PP_ITERATION_START_5 >= 52 +# define BOOST_PP_ITERATION_5 52 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 51 && BOOST_PP_ITERATION_START_5 >= 51 +# define BOOST_PP_ITERATION_5 51 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 50 && BOOST_PP_ITERATION_START_5 >= 50 +# define BOOST_PP_ITERATION_5 50 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 49 && BOOST_PP_ITERATION_START_5 >= 49 +# define BOOST_PP_ITERATION_5 49 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 48 && BOOST_PP_ITERATION_START_5 >= 48 +# define BOOST_PP_ITERATION_5 48 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 47 && BOOST_PP_ITERATION_START_5 >= 47 +# define BOOST_PP_ITERATION_5 47 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 46 && BOOST_PP_ITERATION_START_5 >= 46 +# define BOOST_PP_ITERATION_5 46 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 45 && BOOST_PP_ITERATION_START_5 >= 45 +# define BOOST_PP_ITERATION_5 45 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 44 && BOOST_PP_ITERATION_START_5 >= 44 +# define BOOST_PP_ITERATION_5 44 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 43 && BOOST_PP_ITERATION_START_5 >= 43 +# define BOOST_PP_ITERATION_5 43 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 42 && BOOST_PP_ITERATION_START_5 >= 42 +# define BOOST_PP_ITERATION_5 42 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 41 && BOOST_PP_ITERATION_START_5 >= 41 +# define BOOST_PP_ITERATION_5 41 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 40 && BOOST_PP_ITERATION_START_5 >= 40 +# define BOOST_PP_ITERATION_5 40 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 39 && BOOST_PP_ITERATION_START_5 >= 39 +# define BOOST_PP_ITERATION_5 39 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 38 && BOOST_PP_ITERATION_START_5 >= 38 +# define BOOST_PP_ITERATION_5 38 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 37 && BOOST_PP_ITERATION_START_5 >= 37 +# define BOOST_PP_ITERATION_5 37 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 36 && BOOST_PP_ITERATION_START_5 >= 36 +# define BOOST_PP_ITERATION_5 36 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 35 && BOOST_PP_ITERATION_START_5 >= 35 +# define BOOST_PP_ITERATION_5 35 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 34 && BOOST_PP_ITERATION_START_5 >= 34 +# define BOOST_PP_ITERATION_5 34 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 33 && BOOST_PP_ITERATION_START_5 >= 33 +# define BOOST_PP_ITERATION_5 33 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 32 && BOOST_PP_ITERATION_START_5 >= 32 +# define BOOST_PP_ITERATION_5 32 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 31 && BOOST_PP_ITERATION_START_5 >= 31 +# define BOOST_PP_ITERATION_5 31 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 30 && BOOST_PP_ITERATION_START_5 >= 30 +# define BOOST_PP_ITERATION_5 30 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 29 && BOOST_PP_ITERATION_START_5 >= 29 +# define BOOST_PP_ITERATION_5 29 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 28 && BOOST_PP_ITERATION_START_5 >= 28 +# define BOOST_PP_ITERATION_5 28 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 27 && BOOST_PP_ITERATION_START_5 >= 27 +# define BOOST_PP_ITERATION_5 27 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 26 && BOOST_PP_ITERATION_START_5 >= 26 +# define BOOST_PP_ITERATION_5 26 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 25 && BOOST_PP_ITERATION_START_5 >= 25 +# define BOOST_PP_ITERATION_5 25 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 24 && BOOST_PP_ITERATION_START_5 >= 24 +# define BOOST_PP_ITERATION_5 24 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 23 && BOOST_PP_ITERATION_START_5 >= 23 +# define BOOST_PP_ITERATION_5 23 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 22 && BOOST_PP_ITERATION_START_5 >= 22 +# define BOOST_PP_ITERATION_5 22 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 21 && BOOST_PP_ITERATION_START_5 >= 21 +# define BOOST_PP_ITERATION_5 21 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 20 && BOOST_PP_ITERATION_START_5 >= 20 +# define BOOST_PP_ITERATION_5 20 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 19 && BOOST_PP_ITERATION_START_5 >= 19 +# define BOOST_PP_ITERATION_5 19 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 18 && BOOST_PP_ITERATION_START_5 >= 18 +# define BOOST_PP_ITERATION_5 18 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 17 && BOOST_PP_ITERATION_START_5 >= 17 +# define BOOST_PP_ITERATION_5 17 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 16 && BOOST_PP_ITERATION_START_5 >= 16 +# define BOOST_PP_ITERATION_5 16 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 15 && BOOST_PP_ITERATION_START_5 >= 15 +# define BOOST_PP_ITERATION_5 15 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 14 && BOOST_PP_ITERATION_START_5 >= 14 +# define BOOST_PP_ITERATION_5 14 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 13 && BOOST_PP_ITERATION_START_5 >= 13 +# define BOOST_PP_ITERATION_5 13 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 12 && BOOST_PP_ITERATION_START_5 >= 12 +# define BOOST_PP_ITERATION_5 12 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 11 && BOOST_PP_ITERATION_START_5 >= 11 +# define BOOST_PP_ITERATION_5 11 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 10 && BOOST_PP_ITERATION_START_5 >= 10 +# define BOOST_PP_ITERATION_5 10 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 9 && BOOST_PP_ITERATION_START_5 >= 9 +# define BOOST_PP_ITERATION_5 9 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 8 && BOOST_PP_ITERATION_START_5 >= 8 +# define BOOST_PP_ITERATION_5 8 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 7 && BOOST_PP_ITERATION_START_5 >= 7 +# define BOOST_PP_ITERATION_5 7 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 6 && BOOST_PP_ITERATION_START_5 >= 6 +# define BOOST_PP_ITERATION_5 6 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 5 && BOOST_PP_ITERATION_START_5 >= 5 +# define BOOST_PP_ITERATION_5 5 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 4 && BOOST_PP_ITERATION_START_5 >= 4 +# define BOOST_PP_ITERATION_5 4 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 3 && BOOST_PP_ITERATION_START_5 >= 3 +# define BOOST_PP_ITERATION_5 3 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 2 && BOOST_PP_ITERATION_START_5 >= 2 +# define BOOST_PP_ITERATION_5 2 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 1 && BOOST_PP_ITERATION_START_5 >= 1 +# define BOOST_PP_ITERATION_5 1 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif +# if BOOST_PP_ITERATION_FINISH_5 <= 0 && BOOST_PP_ITERATION_START_5 >= 0 +# define BOOST_PP_ITERATION_5 0 +# include BOOST_PP_FILENAME_5 +# undef BOOST_PP_ITERATION_5 +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/local.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/local.hpp new file mode 100644 index 0000000000..ccddd5e0f0 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/local.hpp @@ -0,0 +1,812 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# if !defined(BOOST_PP_LOCAL_LIMITS) +# error BOOST_PP_ERROR: local iteration boundaries are not defined +# elif !defined(BOOST_PP_LOCAL_MACRO) +# error BOOST_PP_ERROR: local iteration target macro is not defined +# else +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_LOCAL_S BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_LOCAL_LIMITS) +# define BOOST_PP_LOCAL_F BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_LOCAL_LIMITS) +# else +# define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_LOCAL_LIMITS) +# include +# define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_LOCAL_LIMITS) +# include +# define BOOST_PP_LOCAL_S BOOST_PP_LOCAL_SE() +# define BOOST_PP_LOCAL_F BOOST_PP_LOCAL_FE() +# endif +# endif +# +# if (BOOST_PP_LOCAL_S) > (BOOST_PP_LOCAL_F) +# include +# else +# if BOOST_PP_LOCAL_C(0) + BOOST_PP_LOCAL_MACRO(0) +# endif +# if BOOST_PP_LOCAL_C(1) + BOOST_PP_LOCAL_MACRO(1) +# endif +# if BOOST_PP_LOCAL_C(2) + BOOST_PP_LOCAL_MACRO(2) +# endif +# if BOOST_PP_LOCAL_C(3) + BOOST_PP_LOCAL_MACRO(3) +# endif +# if BOOST_PP_LOCAL_C(4) + BOOST_PP_LOCAL_MACRO(4) +# endif +# if BOOST_PP_LOCAL_C(5) + BOOST_PP_LOCAL_MACRO(5) +# endif +# if BOOST_PP_LOCAL_C(6) + BOOST_PP_LOCAL_MACRO(6) +# endif +# if BOOST_PP_LOCAL_C(7) + BOOST_PP_LOCAL_MACRO(7) +# endif +# if BOOST_PP_LOCAL_C(8) + BOOST_PP_LOCAL_MACRO(8) +# endif +# if BOOST_PP_LOCAL_C(9) + BOOST_PP_LOCAL_MACRO(9) +# endif +# if BOOST_PP_LOCAL_C(10) + BOOST_PP_LOCAL_MACRO(10) +# endif +# if BOOST_PP_LOCAL_C(11) + BOOST_PP_LOCAL_MACRO(11) +# endif +# if BOOST_PP_LOCAL_C(12) + BOOST_PP_LOCAL_MACRO(12) +# endif +# if BOOST_PP_LOCAL_C(13) + BOOST_PP_LOCAL_MACRO(13) +# endif +# if BOOST_PP_LOCAL_C(14) + BOOST_PP_LOCAL_MACRO(14) +# endif +# if BOOST_PP_LOCAL_C(15) + BOOST_PP_LOCAL_MACRO(15) +# endif +# if BOOST_PP_LOCAL_C(16) + BOOST_PP_LOCAL_MACRO(16) +# endif +# if BOOST_PP_LOCAL_C(17) + BOOST_PP_LOCAL_MACRO(17) +# endif +# if BOOST_PP_LOCAL_C(18) + BOOST_PP_LOCAL_MACRO(18) +# endif +# if BOOST_PP_LOCAL_C(19) + BOOST_PP_LOCAL_MACRO(19) +# endif +# if BOOST_PP_LOCAL_C(20) + BOOST_PP_LOCAL_MACRO(20) +# endif +# if BOOST_PP_LOCAL_C(21) + BOOST_PP_LOCAL_MACRO(21) +# endif +# if BOOST_PP_LOCAL_C(22) + BOOST_PP_LOCAL_MACRO(22) +# endif +# if BOOST_PP_LOCAL_C(23) + BOOST_PP_LOCAL_MACRO(23) +# endif +# if BOOST_PP_LOCAL_C(24) + BOOST_PP_LOCAL_MACRO(24) +# endif +# if BOOST_PP_LOCAL_C(25) + BOOST_PP_LOCAL_MACRO(25) +# endif +# if BOOST_PP_LOCAL_C(26) + BOOST_PP_LOCAL_MACRO(26) +# endif +# if BOOST_PP_LOCAL_C(27) + BOOST_PP_LOCAL_MACRO(27) +# endif +# if BOOST_PP_LOCAL_C(28) + BOOST_PP_LOCAL_MACRO(28) +# endif +# if BOOST_PP_LOCAL_C(29) + BOOST_PP_LOCAL_MACRO(29) +# endif +# if BOOST_PP_LOCAL_C(30) + BOOST_PP_LOCAL_MACRO(30) +# endif +# if BOOST_PP_LOCAL_C(31) + BOOST_PP_LOCAL_MACRO(31) +# endif +# if BOOST_PP_LOCAL_C(32) + BOOST_PP_LOCAL_MACRO(32) +# endif +# if BOOST_PP_LOCAL_C(33) + BOOST_PP_LOCAL_MACRO(33) +# endif +# if BOOST_PP_LOCAL_C(34) + BOOST_PP_LOCAL_MACRO(34) +# endif +# if BOOST_PP_LOCAL_C(35) + BOOST_PP_LOCAL_MACRO(35) +# endif +# if BOOST_PP_LOCAL_C(36) + BOOST_PP_LOCAL_MACRO(36) +# endif +# if BOOST_PP_LOCAL_C(37) + BOOST_PP_LOCAL_MACRO(37) +# endif +# if BOOST_PP_LOCAL_C(38) + BOOST_PP_LOCAL_MACRO(38) +# endif +# if BOOST_PP_LOCAL_C(39) + BOOST_PP_LOCAL_MACRO(39) +# endif +# if BOOST_PP_LOCAL_C(40) + BOOST_PP_LOCAL_MACRO(40) +# endif +# if BOOST_PP_LOCAL_C(41) + BOOST_PP_LOCAL_MACRO(41) +# endif +# if BOOST_PP_LOCAL_C(42) + BOOST_PP_LOCAL_MACRO(42) +# endif +# if BOOST_PP_LOCAL_C(43) + BOOST_PP_LOCAL_MACRO(43) +# endif +# if BOOST_PP_LOCAL_C(44) + BOOST_PP_LOCAL_MACRO(44) +# endif +# if BOOST_PP_LOCAL_C(45) + BOOST_PP_LOCAL_MACRO(45) +# endif +# if BOOST_PP_LOCAL_C(46) + BOOST_PP_LOCAL_MACRO(46) +# endif +# if BOOST_PP_LOCAL_C(47) + BOOST_PP_LOCAL_MACRO(47) +# endif +# if BOOST_PP_LOCAL_C(48) + BOOST_PP_LOCAL_MACRO(48) +# endif +# if BOOST_PP_LOCAL_C(49) + BOOST_PP_LOCAL_MACRO(49) +# endif +# if BOOST_PP_LOCAL_C(50) + BOOST_PP_LOCAL_MACRO(50) +# endif +# if BOOST_PP_LOCAL_C(51) + BOOST_PP_LOCAL_MACRO(51) +# endif +# if BOOST_PP_LOCAL_C(52) + BOOST_PP_LOCAL_MACRO(52) +# endif +# if BOOST_PP_LOCAL_C(53) + BOOST_PP_LOCAL_MACRO(53) +# endif +# if BOOST_PP_LOCAL_C(54) + BOOST_PP_LOCAL_MACRO(54) +# endif +# if BOOST_PP_LOCAL_C(55) + BOOST_PP_LOCAL_MACRO(55) +# endif +# if BOOST_PP_LOCAL_C(56) + BOOST_PP_LOCAL_MACRO(56) +# endif +# if BOOST_PP_LOCAL_C(57) + BOOST_PP_LOCAL_MACRO(57) +# endif +# if BOOST_PP_LOCAL_C(58) + BOOST_PP_LOCAL_MACRO(58) +# endif +# if BOOST_PP_LOCAL_C(59) + BOOST_PP_LOCAL_MACRO(59) +# endif +# if BOOST_PP_LOCAL_C(60) + BOOST_PP_LOCAL_MACRO(60) +# endif +# if BOOST_PP_LOCAL_C(61) + BOOST_PP_LOCAL_MACRO(61) +# endif +# if BOOST_PP_LOCAL_C(62) + BOOST_PP_LOCAL_MACRO(62) +# endif +# if BOOST_PP_LOCAL_C(63) + BOOST_PP_LOCAL_MACRO(63) +# endif +# if BOOST_PP_LOCAL_C(64) + BOOST_PP_LOCAL_MACRO(64) +# endif +# if BOOST_PP_LOCAL_C(65) + BOOST_PP_LOCAL_MACRO(65) +# endif +# if BOOST_PP_LOCAL_C(66) + BOOST_PP_LOCAL_MACRO(66) +# endif +# if BOOST_PP_LOCAL_C(67) + BOOST_PP_LOCAL_MACRO(67) +# endif +# if BOOST_PP_LOCAL_C(68) + BOOST_PP_LOCAL_MACRO(68) +# endif +# if BOOST_PP_LOCAL_C(69) + BOOST_PP_LOCAL_MACRO(69) +# endif +# if BOOST_PP_LOCAL_C(70) + BOOST_PP_LOCAL_MACRO(70) +# endif +# if BOOST_PP_LOCAL_C(71) + BOOST_PP_LOCAL_MACRO(71) +# endif +# if BOOST_PP_LOCAL_C(72) + BOOST_PP_LOCAL_MACRO(72) +# endif +# if BOOST_PP_LOCAL_C(73) + BOOST_PP_LOCAL_MACRO(73) +# endif +# if BOOST_PP_LOCAL_C(74) + BOOST_PP_LOCAL_MACRO(74) +# endif +# if BOOST_PP_LOCAL_C(75) + BOOST_PP_LOCAL_MACRO(75) +# endif +# if BOOST_PP_LOCAL_C(76) + BOOST_PP_LOCAL_MACRO(76) +# endif +# if BOOST_PP_LOCAL_C(77) + BOOST_PP_LOCAL_MACRO(77) +# endif +# if BOOST_PP_LOCAL_C(78) + BOOST_PP_LOCAL_MACRO(78) +# endif +# if BOOST_PP_LOCAL_C(79) + BOOST_PP_LOCAL_MACRO(79) +# endif +# if BOOST_PP_LOCAL_C(80) + BOOST_PP_LOCAL_MACRO(80) +# endif +# if BOOST_PP_LOCAL_C(81) + BOOST_PP_LOCAL_MACRO(81) +# endif +# if BOOST_PP_LOCAL_C(82) + BOOST_PP_LOCAL_MACRO(82) +# endif +# if BOOST_PP_LOCAL_C(83) + BOOST_PP_LOCAL_MACRO(83) +# endif +# if BOOST_PP_LOCAL_C(84) + BOOST_PP_LOCAL_MACRO(84) +# endif +# if BOOST_PP_LOCAL_C(85) + BOOST_PP_LOCAL_MACRO(85) +# endif +# if BOOST_PP_LOCAL_C(86) + BOOST_PP_LOCAL_MACRO(86) +# endif +# if BOOST_PP_LOCAL_C(87) + BOOST_PP_LOCAL_MACRO(87) +# endif +# if BOOST_PP_LOCAL_C(88) + BOOST_PP_LOCAL_MACRO(88) +# endif +# if BOOST_PP_LOCAL_C(89) + BOOST_PP_LOCAL_MACRO(89) +# endif +# if BOOST_PP_LOCAL_C(90) + BOOST_PP_LOCAL_MACRO(90) +# endif +# if BOOST_PP_LOCAL_C(91) + BOOST_PP_LOCAL_MACRO(91) +# endif +# if BOOST_PP_LOCAL_C(92) + BOOST_PP_LOCAL_MACRO(92) +# endif +# if BOOST_PP_LOCAL_C(93) + BOOST_PP_LOCAL_MACRO(93) +# endif +# if BOOST_PP_LOCAL_C(94) + BOOST_PP_LOCAL_MACRO(94) +# endif +# if BOOST_PP_LOCAL_C(95) + BOOST_PP_LOCAL_MACRO(95) +# endif +# if BOOST_PP_LOCAL_C(96) + BOOST_PP_LOCAL_MACRO(96) +# endif +# if BOOST_PP_LOCAL_C(97) + BOOST_PP_LOCAL_MACRO(97) +# endif +# if BOOST_PP_LOCAL_C(98) + BOOST_PP_LOCAL_MACRO(98) +# endif +# if BOOST_PP_LOCAL_C(99) + BOOST_PP_LOCAL_MACRO(99) +# endif +# if BOOST_PP_LOCAL_C(100) + BOOST_PP_LOCAL_MACRO(100) +# endif +# if BOOST_PP_LOCAL_C(101) + BOOST_PP_LOCAL_MACRO(101) +# endif +# if BOOST_PP_LOCAL_C(102) + BOOST_PP_LOCAL_MACRO(102) +# endif +# if BOOST_PP_LOCAL_C(103) + BOOST_PP_LOCAL_MACRO(103) +# endif +# if BOOST_PP_LOCAL_C(104) + BOOST_PP_LOCAL_MACRO(104) +# endif +# if BOOST_PP_LOCAL_C(105) + BOOST_PP_LOCAL_MACRO(105) +# endif +# if BOOST_PP_LOCAL_C(106) + BOOST_PP_LOCAL_MACRO(106) +# endif +# if BOOST_PP_LOCAL_C(107) + BOOST_PP_LOCAL_MACRO(107) +# endif +# if BOOST_PP_LOCAL_C(108) + BOOST_PP_LOCAL_MACRO(108) +# endif +# if BOOST_PP_LOCAL_C(109) + BOOST_PP_LOCAL_MACRO(109) +# endif +# if BOOST_PP_LOCAL_C(110) + BOOST_PP_LOCAL_MACRO(110) +# endif +# if BOOST_PP_LOCAL_C(111) + BOOST_PP_LOCAL_MACRO(111) +# endif +# if BOOST_PP_LOCAL_C(112) + BOOST_PP_LOCAL_MACRO(112) +# endif +# if BOOST_PP_LOCAL_C(113) + BOOST_PP_LOCAL_MACRO(113) +# endif +# if BOOST_PP_LOCAL_C(114) + BOOST_PP_LOCAL_MACRO(114) +# endif +# if BOOST_PP_LOCAL_C(115) + BOOST_PP_LOCAL_MACRO(115) +# endif +# if BOOST_PP_LOCAL_C(116) + BOOST_PP_LOCAL_MACRO(116) +# endif +# if BOOST_PP_LOCAL_C(117) + BOOST_PP_LOCAL_MACRO(117) +# endif +# if BOOST_PP_LOCAL_C(118) + BOOST_PP_LOCAL_MACRO(118) +# endif +# if BOOST_PP_LOCAL_C(119) + BOOST_PP_LOCAL_MACRO(119) +# endif +# if BOOST_PP_LOCAL_C(120) + BOOST_PP_LOCAL_MACRO(120) +# endif +# if BOOST_PP_LOCAL_C(121) + BOOST_PP_LOCAL_MACRO(121) +# endif +# if BOOST_PP_LOCAL_C(122) + BOOST_PP_LOCAL_MACRO(122) +# endif +# if BOOST_PP_LOCAL_C(123) + BOOST_PP_LOCAL_MACRO(123) +# endif +# if BOOST_PP_LOCAL_C(124) + BOOST_PP_LOCAL_MACRO(124) +# endif +# if BOOST_PP_LOCAL_C(125) + BOOST_PP_LOCAL_MACRO(125) +# endif +# if BOOST_PP_LOCAL_C(126) + BOOST_PP_LOCAL_MACRO(126) +# endif +# if BOOST_PP_LOCAL_C(127) + BOOST_PP_LOCAL_MACRO(127) +# endif +# if BOOST_PP_LOCAL_C(128) + BOOST_PP_LOCAL_MACRO(128) +# endif +# if BOOST_PP_LOCAL_C(129) + BOOST_PP_LOCAL_MACRO(129) +# endif +# if BOOST_PP_LOCAL_C(130) + BOOST_PP_LOCAL_MACRO(130) +# endif +# if BOOST_PP_LOCAL_C(131) + BOOST_PP_LOCAL_MACRO(131) +# endif +# if BOOST_PP_LOCAL_C(132) + BOOST_PP_LOCAL_MACRO(132) +# endif +# if BOOST_PP_LOCAL_C(133) + BOOST_PP_LOCAL_MACRO(133) +# endif +# if BOOST_PP_LOCAL_C(134) + BOOST_PP_LOCAL_MACRO(134) +# endif +# if BOOST_PP_LOCAL_C(135) + BOOST_PP_LOCAL_MACRO(135) +# endif +# if BOOST_PP_LOCAL_C(136) + BOOST_PP_LOCAL_MACRO(136) +# endif +# if BOOST_PP_LOCAL_C(137) + BOOST_PP_LOCAL_MACRO(137) +# endif +# if BOOST_PP_LOCAL_C(138) + BOOST_PP_LOCAL_MACRO(138) +# endif +# if BOOST_PP_LOCAL_C(139) + BOOST_PP_LOCAL_MACRO(139) +# endif +# if BOOST_PP_LOCAL_C(140) + BOOST_PP_LOCAL_MACRO(140) +# endif +# if BOOST_PP_LOCAL_C(141) + BOOST_PP_LOCAL_MACRO(141) +# endif +# if BOOST_PP_LOCAL_C(142) + BOOST_PP_LOCAL_MACRO(142) +# endif +# if BOOST_PP_LOCAL_C(143) + BOOST_PP_LOCAL_MACRO(143) +# endif +# if BOOST_PP_LOCAL_C(144) + BOOST_PP_LOCAL_MACRO(144) +# endif +# if BOOST_PP_LOCAL_C(145) + BOOST_PP_LOCAL_MACRO(145) +# endif +# if BOOST_PP_LOCAL_C(146) + BOOST_PP_LOCAL_MACRO(146) +# endif +# if BOOST_PP_LOCAL_C(147) + BOOST_PP_LOCAL_MACRO(147) +# endif +# if BOOST_PP_LOCAL_C(148) + BOOST_PP_LOCAL_MACRO(148) +# endif +# if BOOST_PP_LOCAL_C(149) + BOOST_PP_LOCAL_MACRO(149) +# endif +# if BOOST_PP_LOCAL_C(150) + BOOST_PP_LOCAL_MACRO(150) +# endif +# if BOOST_PP_LOCAL_C(151) + BOOST_PP_LOCAL_MACRO(151) +# endif +# if BOOST_PP_LOCAL_C(152) + BOOST_PP_LOCAL_MACRO(152) +# endif +# if BOOST_PP_LOCAL_C(153) + BOOST_PP_LOCAL_MACRO(153) +# endif +# if BOOST_PP_LOCAL_C(154) + BOOST_PP_LOCAL_MACRO(154) +# endif +# if BOOST_PP_LOCAL_C(155) + BOOST_PP_LOCAL_MACRO(155) +# endif +# if BOOST_PP_LOCAL_C(156) + BOOST_PP_LOCAL_MACRO(156) +# endif +# if BOOST_PP_LOCAL_C(157) + BOOST_PP_LOCAL_MACRO(157) +# endif +# if BOOST_PP_LOCAL_C(158) + BOOST_PP_LOCAL_MACRO(158) +# endif +# if BOOST_PP_LOCAL_C(159) + BOOST_PP_LOCAL_MACRO(159) +# endif +# if BOOST_PP_LOCAL_C(160) + BOOST_PP_LOCAL_MACRO(160) +# endif +# if BOOST_PP_LOCAL_C(161) + BOOST_PP_LOCAL_MACRO(161) +# endif +# if BOOST_PP_LOCAL_C(162) + BOOST_PP_LOCAL_MACRO(162) +# endif +# if BOOST_PP_LOCAL_C(163) + BOOST_PP_LOCAL_MACRO(163) +# endif +# if BOOST_PP_LOCAL_C(164) + BOOST_PP_LOCAL_MACRO(164) +# endif +# if BOOST_PP_LOCAL_C(165) + BOOST_PP_LOCAL_MACRO(165) +# endif +# if BOOST_PP_LOCAL_C(166) + BOOST_PP_LOCAL_MACRO(166) +# endif +# if BOOST_PP_LOCAL_C(167) + BOOST_PP_LOCAL_MACRO(167) +# endif +# if BOOST_PP_LOCAL_C(168) + BOOST_PP_LOCAL_MACRO(168) +# endif +# if BOOST_PP_LOCAL_C(169) + BOOST_PP_LOCAL_MACRO(169) +# endif +# if BOOST_PP_LOCAL_C(170) + BOOST_PP_LOCAL_MACRO(170) +# endif +# if BOOST_PP_LOCAL_C(171) + BOOST_PP_LOCAL_MACRO(171) +# endif +# if BOOST_PP_LOCAL_C(172) + BOOST_PP_LOCAL_MACRO(172) +# endif +# if BOOST_PP_LOCAL_C(173) + BOOST_PP_LOCAL_MACRO(173) +# endif +# if BOOST_PP_LOCAL_C(174) + BOOST_PP_LOCAL_MACRO(174) +# endif +# if BOOST_PP_LOCAL_C(175) + BOOST_PP_LOCAL_MACRO(175) +# endif +# if BOOST_PP_LOCAL_C(176) + BOOST_PP_LOCAL_MACRO(176) +# endif +# if BOOST_PP_LOCAL_C(177) + BOOST_PP_LOCAL_MACRO(177) +# endif +# if BOOST_PP_LOCAL_C(178) + BOOST_PP_LOCAL_MACRO(178) +# endif +# if BOOST_PP_LOCAL_C(179) + BOOST_PP_LOCAL_MACRO(179) +# endif +# if BOOST_PP_LOCAL_C(180) + BOOST_PP_LOCAL_MACRO(180) +# endif +# if BOOST_PP_LOCAL_C(181) + BOOST_PP_LOCAL_MACRO(181) +# endif +# if BOOST_PP_LOCAL_C(182) + BOOST_PP_LOCAL_MACRO(182) +# endif +# if BOOST_PP_LOCAL_C(183) + BOOST_PP_LOCAL_MACRO(183) +# endif +# if BOOST_PP_LOCAL_C(184) + BOOST_PP_LOCAL_MACRO(184) +# endif +# if BOOST_PP_LOCAL_C(185) + BOOST_PP_LOCAL_MACRO(185) +# endif +# if BOOST_PP_LOCAL_C(186) + BOOST_PP_LOCAL_MACRO(186) +# endif +# if BOOST_PP_LOCAL_C(187) + BOOST_PP_LOCAL_MACRO(187) +# endif +# if BOOST_PP_LOCAL_C(188) + BOOST_PP_LOCAL_MACRO(188) +# endif +# if BOOST_PP_LOCAL_C(189) + BOOST_PP_LOCAL_MACRO(189) +# endif +# if BOOST_PP_LOCAL_C(190) + BOOST_PP_LOCAL_MACRO(190) +# endif +# if BOOST_PP_LOCAL_C(191) + BOOST_PP_LOCAL_MACRO(191) +# endif +# if BOOST_PP_LOCAL_C(192) + BOOST_PP_LOCAL_MACRO(192) +# endif +# if BOOST_PP_LOCAL_C(193) + BOOST_PP_LOCAL_MACRO(193) +# endif +# if BOOST_PP_LOCAL_C(194) + BOOST_PP_LOCAL_MACRO(194) +# endif +# if BOOST_PP_LOCAL_C(195) + BOOST_PP_LOCAL_MACRO(195) +# endif +# if BOOST_PP_LOCAL_C(196) + BOOST_PP_LOCAL_MACRO(196) +# endif +# if BOOST_PP_LOCAL_C(197) + BOOST_PP_LOCAL_MACRO(197) +# endif +# if BOOST_PP_LOCAL_C(198) + BOOST_PP_LOCAL_MACRO(198) +# endif +# if BOOST_PP_LOCAL_C(199) + BOOST_PP_LOCAL_MACRO(199) +# endif +# if BOOST_PP_LOCAL_C(200) + BOOST_PP_LOCAL_MACRO(200) +# endif +# if BOOST_PP_LOCAL_C(201) + BOOST_PP_LOCAL_MACRO(201) +# endif +# if BOOST_PP_LOCAL_C(202) + BOOST_PP_LOCAL_MACRO(202) +# endif +# if BOOST_PP_LOCAL_C(203) + BOOST_PP_LOCAL_MACRO(203) +# endif +# if BOOST_PP_LOCAL_C(204) + BOOST_PP_LOCAL_MACRO(204) +# endif +# if BOOST_PP_LOCAL_C(205) + BOOST_PP_LOCAL_MACRO(205) +# endif +# if BOOST_PP_LOCAL_C(206) + BOOST_PP_LOCAL_MACRO(206) +# endif +# if BOOST_PP_LOCAL_C(207) + BOOST_PP_LOCAL_MACRO(207) +# endif +# if BOOST_PP_LOCAL_C(208) + BOOST_PP_LOCAL_MACRO(208) +# endif +# if BOOST_PP_LOCAL_C(209) + BOOST_PP_LOCAL_MACRO(209) +# endif +# if BOOST_PP_LOCAL_C(210) + BOOST_PP_LOCAL_MACRO(210) +# endif +# if BOOST_PP_LOCAL_C(211) + BOOST_PP_LOCAL_MACRO(211) +# endif +# if BOOST_PP_LOCAL_C(212) + BOOST_PP_LOCAL_MACRO(212) +# endif +# if BOOST_PP_LOCAL_C(213) + BOOST_PP_LOCAL_MACRO(213) +# endif +# if BOOST_PP_LOCAL_C(214) + BOOST_PP_LOCAL_MACRO(214) +# endif +# if BOOST_PP_LOCAL_C(215) + BOOST_PP_LOCAL_MACRO(215) +# endif +# if BOOST_PP_LOCAL_C(216) + BOOST_PP_LOCAL_MACRO(216) +# endif +# if BOOST_PP_LOCAL_C(217) + BOOST_PP_LOCAL_MACRO(217) +# endif +# if BOOST_PP_LOCAL_C(218) + BOOST_PP_LOCAL_MACRO(218) +# endif +# if BOOST_PP_LOCAL_C(219) + BOOST_PP_LOCAL_MACRO(219) +# endif +# if BOOST_PP_LOCAL_C(220) + BOOST_PP_LOCAL_MACRO(220) +# endif +# if BOOST_PP_LOCAL_C(221) + BOOST_PP_LOCAL_MACRO(221) +# endif +# if BOOST_PP_LOCAL_C(222) + BOOST_PP_LOCAL_MACRO(222) +# endif +# if BOOST_PP_LOCAL_C(223) + BOOST_PP_LOCAL_MACRO(223) +# endif +# if BOOST_PP_LOCAL_C(224) + BOOST_PP_LOCAL_MACRO(224) +# endif +# if BOOST_PP_LOCAL_C(225) + BOOST_PP_LOCAL_MACRO(225) +# endif +# if BOOST_PP_LOCAL_C(226) + BOOST_PP_LOCAL_MACRO(226) +# endif +# if BOOST_PP_LOCAL_C(227) + BOOST_PP_LOCAL_MACRO(227) +# endif +# if BOOST_PP_LOCAL_C(228) + BOOST_PP_LOCAL_MACRO(228) +# endif +# if BOOST_PP_LOCAL_C(229) + BOOST_PP_LOCAL_MACRO(229) +# endif +# if BOOST_PP_LOCAL_C(230) + BOOST_PP_LOCAL_MACRO(230) +# endif +# if BOOST_PP_LOCAL_C(231) + BOOST_PP_LOCAL_MACRO(231) +# endif +# if BOOST_PP_LOCAL_C(232) + BOOST_PP_LOCAL_MACRO(232) +# endif +# if BOOST_PP_LOCAL_C(233) + BOOST_PP_LOCAL_MACRO(233) +# endif +# if BOOST_PP_LOCAL_C(234) + BOOST_PP_LOCAL_MACRO(234) +# endif +# if BOOST_PP_LOCAL_C(235) + BOOST_PP_LOCAL_MACRO(235) +# endif +# if BOOST_PP_LOCAL_C(236) + BOOST_PP_LOCAL_MACRO(236) +# endif + +# if BOOST_PP_LOCAL_C(237) + BOOST_PP_LOCAL_MACRO(237) +# endif +# if BOOST_PP_LOCAL_C(238) + BOOST_PP_LOCAL_MACRO(238) +# endif +# if BOOST_PP_LOCAL_C(239) + BOOST_PP_LOCAL_MACRO(239) +# endif +# if BOOST_PP_LOCAL_C(240) + BOOST_PP_LOCAL_MACRO(240) +# endif +# if BOOST_PP_LOCAL_C(241) + BOOST_PP_LOCAL_MACRO(241) +# endif +# if BOOST_PP_LOCAL_C(242) + BOOST_PP_LOCAL_MACRO(242) +# endif +# if BOOST_PP_LOCAL_C(243) + BOOST_PP_LOCAL_MACRO(243) +# endif +# if BOOST_PP_LOCAL_C(244) + BOOST_PP_LOCAL_MACRO(244) +# endif +# if BOOST_PP_LOCAL_C(245) + BOOST_PP_LOCAL_MACRO(245) +# endif +# if BOOST_PP_LOCAL_C(246) + BOOST_PP_LOCAL_MACRO(246) +# endif +# if BOOST_PP_LOCAL_C(247) + BOOST_PP_LOCAL_MACRO(247) +# endif +# if BOOST_PP_LOCAL_C(248) + BOOST_PP_LOCAL_MACRO(248) +# endif +# if BOOST_PP_LOCAL_C(249) + BOOST_PP_LOCAL_MACRO(249) +# endif +# if BOOST_PP_LOCAL_C(250) + BOOST_PP_LOCAL_MACRO(250) +# endif +# if BOOST_PP_LOCAL_C(251) + BOOST_PP_LOCAL_MACRO(251) +# endif +# if BOOST_PP_LOCAL_C(252) + BOOST_PP_LOCAL_MACRO(252) +# endif +# if BOOST_PP_LOCAL_C(253) + BOOST_PP_LOCAL_MACRO(253) +# endif +# if BOOST_PP_LOCAL_C(254) + BOOST_PP_LOCAL_MACRO(254) +# endif +# if BOOST_PP_LOCAL_C(255) + BOOST_PP_LOCAL_MACRO(255) +# endif +# if BOOST_PP_LOCAL_C(256) + BOOST_PP_LOCAL_MACRO(256) +# endif +# endif +# +# undef BOOST_PP_LOCAL_LIMITS +# +# undef BOOST_PP_LOCAL_S +# undef BOOST_PP_LOCAL_F +# +# undef BOOST_PP_LOCAL_MACRO diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/rlocal.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/rlocal.hpp new file mode 100644 index 0000000000..413afa09d1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/rlocal.hpp @@ -0,0 +1,782 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# if BOOST_PP_LOCAL_R(256) + BOOST_PP_LOCAL_MACRO(256) +# endif +# if BOOST_PP_LOCAL_R(255) + BOOST_PP_LOCAL_MACRO(255) +# endif +# if BOOST_PP_LOCAL_R(254) + BOOST_PP_LOCAL_MACRO(254) +# endif +# if BOOST_PP_LOCAL_R(253) + BOOST_PP_LOCAL_MACRO(253) +# endif +# if BOOST_PP_LOCAL_R(252) + BOOST_PP_LOCAL_MACRO(252) +# endif +# if BOOST_PP_LOCAL_R(251) + BOOST_PP_LOCAL_MACRO(251) +# endif +# if BOOST_PP_LOCAL_R(250) + BOOST_PP_LOCAL_MACRO(250) +# endif +# if BOOST_PP_LOCAL_R(249) + BOOST_PP_LOCAL_MACRO(249) +# endif +# if BOOST_PP_LOCAL_R(248) + BOOST_PP_LOCAL_MACRO(248) +# endif +# if BOOST_PP_LOCAL_R(247) + BOOST_PP_LOCAL_MACRO(247) +# endif +# if BOOST_PP_LOCAL_R(246) + BOOST_PP_LOCAL_MACRO(246) +# endif +# if BOOST_PP_LOCAL_R(245) + BOOST_PP_LOCAL_MACRO(245) +# endif +# if BOOST_PP_LOCAL_R(244) + BOOST_PP_LOCAL_MACRO(244) +# endif +# if BOOST_PP_LOCAL_R(243) + BOOST_PP_LOCAL_MACRO(243) +# endif +# if BOOST_PP_LOCAL_R(242) + BOOST_PP_LOCAL_MACRO(242) +# endif +# if BOOST_PP_LOCAL_R(241) + BOOST_PP_LOCAL_MACRO(241) +# endif +# if BOOST_PP_LOCAL_R(240) + BOOST_PP_LOCAL_MACRO(240) +# endif +# if BOOST_PP_LOCAL_R(239) + BOOST_PP_LOCAL_MACRO(239) +# endif +# if BOOST_PP_LOCAL_R(238) + BOOST_PP_LOCAL_MACRO(238) +# endif +# if BOOST_PP_LOCAL_R(237) + BOOST_PP_LOCAL_MACRO(237) +# endif +# if BOOST_PP_LOCAL_R(236) + BOOST_PP_LOCAL_MACRO(236) +# endif +# if BOOST_PP_LOCAL_R(235) + BOOST_PP_LOCAL_MACRO(235) +# endif +# if BOOST_PP_LOCAL_R(234) + BOOST_PP_LOCAL_MACRO(234) +# endif +# if BOOST_PP_LOCAL_R(233) + BOOST_PP_LOCAL_MACRO(233) +# endif +# if BOOST_PP_LOCAL_R(232) + BOOST_PP_LOCAL_MACRO(232) +# endif +# if BOOST_PP_LOCAL_R(231) + BOOST_PP_LOCAL_MACRO(231) +# endif +# if BOOST_PP_LOCAL_R(230) + BOOST_PP_LOCAL_MACRO(230) +# endif +# if BOOST_PP_LOCAL_R(229) + BOOST_PP_LOCAL_MACRO(229) +# endif +# if BOOST_PP_LOCAL_R(228) + BOOST_PP_LOCAL_MACRO(228) +# endif +# if BOOST_PP_LOCAL_R(227) + BOOST_PP_LOCAL_MACRO(227) +# endif +# if BOOST_PP_LOCAL_R(226) + BOOST_PP_LOCAL_MACRO(226) +# endif +# if BOOST_PP_LOCAL_R(225) + BOOST_PP_LOCAL_MACRO(225) +# endif +# if BOOST_PP_LOCAL_R(224) + BOOST_PP_LOCAL_MACRO(224) +# endif +# if BOOST_PP_LOCAL_R(223) + BOOST_PP_LOCAL_MACRO(223) +# endif +# if BOOST_PP_LOCAL_R(222) + BOOST_PP_LOCAL_MACRO(222) +# endif +# if BOOST_PP_LOCAL_R(221) + BOOST_PP_LOCAL_MACRO(221) +# endif +# if BOOST_PP_LOCAL_R(220) + BOOST_PP_LOCAL_MACRO(220) +# endif +# if BOOST_PP_LOCAL_R(219) + BOOST_PP_LOCAL_MACRO(219) +# endif +# if BOOST_PP_LOCAL_R(218) + BOOST_PP_LOCAL_MACRO(218) +# endif +# if BOOST_PP_LOCAL_R(217) + BOOST_PP_LOCAL_MACRO(217) +# endif +# if BOOST_PP_LOCAL_R(216) + BOOST_PP_LOCAL_MACRO(216) +# endif +# if BOOST_PP_LOCAL_R(215) + BOOST_PP_LOCAL_MACRO(215) +# endif +# if BOOST_PP_LOCAL_R(214) + BOOST_PP_LOCAL_MACRO(214) +# endif +# if BOOST_PP_LOCAL_R(213) + BOOST_PP_LOCAL_MACRO(213) +# endif +# if BOOST_PP_LOCAL_R(212) + BOOST_PP_LOCAL_MACRO(212) +# endif +# if BOOST_PP_LOCAL_R(211) + BOOST_PP_LOCAL_MACRO(211) +# endif +# if BOOST_PP_LOCAL_R(210) + BOOST_PP_LOCAL_MACRO(210) +# endif +# if BOOST_PP_LOCAL_R(209) + BOOST_PP_LOCAL_MACRO(209) +# endif +# if BOOST_PP_LOCAL_R(208) + BOOST_PP_LOCAL_MACRO(208) +# endif +# if BOOST_PP_LOCAL_R(207) + BOOST_PP_LOCAL_MACRO(207) +# endif +# if BOOST_PP_LOCAL_R(206) + BOOST_PP_LOCAL_MACRO(206) +# endif +# if BOOST_PP_LOCAL_R(205) + BOOST_PP_LOCAL_MACRO(205) +# endif +# if BOOST_PP_LOCAL_R(204) + BOOST_PP_LOCAL_MACRO(204) +# endif +# if BOOST_PP_LOCAL_R(203) + BOOST_PP_LOCAL_MACRO(203) +# endif +# if BOOST_PP_LOCAL_R(202) + BOOST_PP_LOCAL_MACRO(202) +# endif +# if BOOST_PP_LOCAL_R(201) + BOOST_PP_LOCAL_MACRO(201) +# endif +# if BOOST_PP_LOCAL_R(200) + BOOST_PP_LOCAL_MACRO(200) +# endif +# if BOOST_PP_LOCAL_R(199) + BOOST_PP_LOCAL_MACRO(199) +# endif +# if BOOST_PP_LOCAL_R(198) + BOOST_PP_LOCAL_MACRO(198) +# endif +# if BOOST_PP_LOCAL_R(197) + BOOST_PP_LOCAL_MACRO(197) +# endif +# if BOOST_PP_LOCAL_R(196) + BOOST_PP_LOCAL_MACRO(196) +# endif +# if BOOST_PP_LOCAL_R(195) + BOOST_PP_LOCAL_MACRO(195) +# endif +# if BOOST_PP_LOCAL_R(194) + BOOST_PP_LOCAL_MACRO(194) +# endif +# if BOOST_PP_LOCAL_R(193) + BOOST_PP_LOCAL_MACRO(193) +# endif +# if BOOST_PP_LOCAL_R(192) + BOOST_PP_LOCAL_MACRO(192) +# endif +# if BOOST_PP_LOCAL_R(191) + BOOST_PP_LOCAL_MACRO(191) +# endif +# if BOOST_PP_LOCAL_R(190) + BOOST_PP_LOCAL_MACRO(190) +# endif +# if BOOST_PP_LOCAL_R(189) + BOOST_PP_LOCAL_MACRO(189) +# endif +# if BOOST_PP_LOCAL_R(188) + BOOST_PP_LOCAL_MACRO(188) +# endif +# if BOOST_PP_LOCAL_R(187) + BOOST_PP_LOCAL_MACRO(187) +# endif +# if BOOST_PP_LOCAL_R(186) + BOOST_PP_LOCAL_MACRO(186) +# endif +# if BOOST_PP_LOCAL_R(185) + BOOST_PP_LOCAL_MACRO(185) +# endif +# if BOOST_PP_LOCAL_R(184) + BOOST_PP_LOCAL_MACRO(184) +# endif +# if BOOST_PP_LOCAL_R(183) + BOOST_PP_LOCAL_MACRO(183) +# endif +# if BOOST_PP_LOCAL_R(182) + BOOST_PP_LOCAL_MACRO(182) +# endif +# if BOOST_PP_LOCAL_R(181) + BOOST_PP_LOCAL_MACRO(181) +# endif +# if BOOST_PP_LOCAL_R(180) + BOOST_PP_LOCAL_MACRO(180) +# endif +# if BOOST_PP_LOCAL_R(179) + BOOST_PP_LOCAL_MACRO(179) +# endif +# if BOOST_PP_LOCAL_R(178) + BOOST_PP_LOCAL_MACRO(178) +# endif +# if BOOST_PP_LOCAL_R(177) + BOOST_PP_LOCAL_MACRO(177) +# endif +# if BOOST_PP_LOCAL_R(176) + BOOST_PP_LOCAL_MACRO(176) +# endif +# if BOOST_PP_LOCAL_R(175) + BOOST_PP_LOCAL_MACRO(175) +# endif +# if BOOST_PP_LOCAL_R(174) + BOOST_PP_LOCAL_MACRO(174) +# endif +# if BOOST_PP_LOCAL_R(173) + BOOST_PP_LOCAL_MACRO(173) +# endif +# if BOOST_PP_LOCAL_R(172) + BOOST_PP_LOCAL_MACRO(172) +# endif +# if BOOST_PP_LOCAL_R(171) + BOOST_PP_LOCAL_MACRO(171) +# endif +# if BOOST_PP_LOCAL_R(170) + BOOST_PP_LOCAL_MACRO(170) +# endif +# if BOOST_PP_LOCAL_R(169) + BOOST_PP_LOCAL_MACRO(169) +# endif +# if BOOST_PP_LOCAL_R(168) + BOOST_PP_LOCAL_MACRO(168) +# endif +# if BOOST_PP_LOCAL_R(167) + BOOST_PP_LOCAL_MACRO(167) +# endif +# if BOOST_PP_LOCAL_R(166) + BOOST_PP_LOCAL_MACRO(166) +# endif +# if BOOST_PP_LOCAL_R(165) + BOOST_PP_LOCAL_MACRO(165) +# endif +# if BOOST_PP_LOCAL_R(164) + BOOST_PP_LOCAL_MACRO(164) +# endif +# if BOOST_PP_LOCAL_R(163) + BOOST_PP_LOCAL_MACRO(163) +# endif +# if BOOST_PP_LOCAL_R(162) + BOOST_PP_LOCAL_MACRO(162) +# endif +# if BOOST_PP_LOCAL_R(161) + BOOST_PP_LOCAL_MACRO(161) +# endif +# if BOOST_PP_LOCAL_R(160) + BOOST_PP_LOCAL_MACRO(160) +# endif +# if BOOST_PP_LOCAL_R(159) + BOOST_PP_LOCAL_MACRO(159) +# endif +# if BOOST_PP_LOCAL_R(158) + BOOST_PP_LOCAL_MACRO(158) +# endif +# if BOOST_PP_LOCAL_R(157) + BOOST_PP_LOCAL_MACRO(157) +# endif +# if BOOST_PP_LOCAL_R(156) + BOOST_PP_LOCAL_MACRO(156) +# endif +# if BOOST_PP_LOCAL_R(155) + BOOST_PP_LOCAL_MACRO(155) +# endif +# if BOOST_PP_LOCAL_R(154) + BOOST_PP_LOCAL_MACRO(154) +# endif +# if BOOST_PP_LOCAL_R(153) + BOOST_PP_LOCAL_MACRO(153) +# endif +# if BOOST_PP_LOCAL_R(152) + BOOST_PP_LOCAL_MACRO(152) +# endif +# if BOOST_PP_LOCAL_R(151) + BOOST_PP_LOCAL_MACRO(151) +# endif +# if BOOST_PP_LOCAL_R(150) + BOOST_PP_LOCAL_MACRO(150) +# endif +# if BOOST_PP_LOCAL_R(149) + BOOST_PP_LOCAL_MACRO(149) +# endif +# if BOOST_PP_LOCAL_R(148) + BOOST_PP_LOCAL_MACRO(148) +# endif +# if BOOST_PP_LOCAL_R(147) + BOOST_PP_LOCAL_MACRO(147) +# endif +# if BOOST_PP_LOCAL_R(146) + BOOST_PP_LOCAL_MACRO(146) +# endif +# if BOOST_PP_LOCAL_R(145) + BOOST_PP_LOCAL_MACRO(145) +# endif +# if BOOST_PP_LOCAL_R(144) + BOOST_PP_LOCAL_MACRO(144) +# endif +# if BOOST_PP_LOCAL_R(143) + BOOST_PP_LOCAL_MACRO(143) +# endif +# if BOOST_PP_LOCAL_R(142) + BOOST_PP_LOCAL_MACRO(142) +# endif +# if BOOST_PP_LOCAL_R(141) + BOOST_PP_LOCAL_MACRO(141) +# endif +# if BOOST_PP_LOCAL_R(140) + BOOST_PP_LOCAL_MACRO(140) +# endif +# if BOOST_PP_LOCAL_R(139) + BOOST_PP_LOCAL_MACRO(139) +# endif +# if BOOST_PP_LOCAL_R(138) + BOOST_PP_LOCAL_MACRO(138) +# endif +# if BOOST_PP_LOCAL_R(137) + BOOST_PP_LOCAL_MACRO(137) +# endif +# if BOOST_PP_LOCAL_R(136) + BOOST_PP_LOCAL_MACRO(136) +# endif +# if BOOST_PP_LOCAL_R(135) + BOOST_PP_LOCAL_MACRO(135) +# endif +# if BOOST_PP_LOCAL_R(134) + BOOST_PP_LOCAL_MACRO(134) +# endif +# if BOOST_PP_LOCAL_R(133) + BOOST_PP_LOCAL_MACRO(133) +# endif +# if BOOST_PP_LOCAL_R(132) + BOOST_PP_LOCAL_MACRO(132) +# endif +# if BOOST_PP_LOCAL_R(131) + BOOST_PP_LOCAL_MACRO(131) +# endif +# if BOOST_PP_LOCAL_R(130) + BOOST_PP_LOCAL_MACRO(130) +# endif +# if BOOST_PP_LOCAL_R(129) + BOOST_PP_LOCAL_MACRO(129) +# endif +# if BOOST_PP_LOCAL_R(128) + BOOST_PP_LOCAL_MACRO(128) +# endif +# if BOOST_PP_LOCAL_R(127) + BOOST_PP_LOCAL_MACRO(127) +# endif +# if BOOST_PP_LOCAL_R(126) + BOOST_PP_LOCAL_MACRO(126) +# endif +# if BOOST_PP_LOCAL_R(125) + BOOST_PP_LOCAL_MACRO(125) +# endif +# if BOOST_PP_LOCAL_R(124) + BOOST_PP_LOCAL_MACRO(124) +# endif +# if BOOST_PP_LOCAL_R(123) + BOOST_PP_LOCAL_MACRO(123) +# endif +# if BOOST_PP_LOCAL_R(122) + BOOST_PP_LOCAL_MACRO(122) +# endif +# if BOOST_PP_LOCAL_R(121) + BOOST_PP_LOCAL_MACRO(121) +# endif +# if BOOST_PP_LOCAL_R(120) + BOOST_PP_LOCAL_MACRO(120) +# endif +# if BOOST_PP_LOCAL_R(119) + BOOST_PP_LOCAL_MACRO(119) +# endif +# if BOOST_PP_LOCAL_R(118) + BOOST_PP_LOCAL_MACRO(118) +# endif +# if BOOST_PP_LOCAL_R(117) + BOOST_PP_LOCAL_MACRO(117) +# endif +# if BOOST_PP_LOCAL_R(116) + BOOST_PP_LOCAL_MACRO(116) +# endif +# if BOOST_PP_LOCAL_R(115) + BOOST_PP_LOCAL_MACRO(115) +# endif +# if BOOST_PP_LOCAL_R(114) + BOOST_PP_LOCAL_MACRO(114) +# endif +# if BOOST_PP_LOCAL_R(113) + BOOST_PP_LOCAL_MACRO(113) +# endif +# if BOOST_PP_LOCAL_R(112) + BOOST_PP_LOCAL_MACRO(112) +# endif +# if BOOST_PP_LOCAL_R(111) + BOOST_PP_LOCAL_MACRO(111) +# endif +# if BOOST_PP_LOCAL_R(110) + BOOST_PP_LOCAL_MACRO(110) +# endif +# if BOOST_PP_LOCAL_R(109) + BOOST_PP_LOCAL_MACRO(109) +# endif +# if BOOST_PP_LOCAL_R(108) + BOOST_PP_LOCAL_MACRO(108) +# endif +# if BOOST_PP_LOCAL_R(107) + BOOST_PP_LOCAL_MACRO(107) +# endif +# if BOOST_PP_LOCAL_R(106) + BOOST_PP_LOCAL_MACRO(106) +# endif +# if BOOST_PP_LOCAL_R(105) + BOOST_PP_LOCAL_MACRO(105) +# endif +# if BOOST_PP_LOCAL_R(104) + BOOST_PP_LOCAL_MACRO(104) +# endif +# if BOOST_PP_LOCAL_R(103) + BOOST_PP_LOCAL_MACRO(103) +# endif +# if BOOST_PP_LOCAL_R(102) + BOOST_PP_LOCAL_MACRO(102) +# endif +# if BOOST_PP_LOCAL_R(101) + BOOST_PP_LOCAL_MACRO(101) +# endif +# if BOOST_PP_LOCAL_R(100) + BOOST_PP_LOCAL_MACRO(100) +# endif +# if BOOST_PP_LOCAL_R(99) + BOOST_PP_LOCAL_MACRO(99) +# endif +# if BOOST_PP_LOCAL_R(98) + BOOST_PP_LOCAL_MACRO(98) +# endif +# if BOOST_PP_LOCAL_R(97) + BOOST_PP_LOCAL_MACRO(97) +# endif +# if BOOST_PP_LOCAL_R(96) + BOOST_PP_LOCAL_MACRO(96) +# endif +# if BOOST_PP_LOCAL_R(95) + BOOST_PP_LOCAL_MACRO(95) +# endif +# if BOOST_PP_LOCAL_R(94) + BOOST_PP_LOCAL_MACRO(94) +# endif +# if BOOST_PP_LOCAL_R(93) + BOOST_PP_LOCAL_MACRO(93) +# endif +# if BOOST_PP_LOCAL_R(92) + BOOST_PP_LOCAL_MACRO(92) +# endif +# if BOOST_PP_LOCAL_R(91) + BOOST_PP_LOCAL_MACRO(91) +# endif +# if BOOST_PP_LOCAL_R(90) + BOOST_PP_LOCAL_MACRO(90) +# endif +# if BOOST_PP_LOCAL_R(89) + BOOST_PP_LOCAL_MACRO(89) +# endif +# if BOOST_PP_LOCAL_R(88) + BOOST_PP_LOCAL_MACRO(88) +# endif +# if BOOST_PP_LOCAL_R(87) + BOOST_PP_LOCAL_MACRO(87) +# endif +# if BOOST_PP_LOCAL_R(86) + BOOST_PP_LOCAL_MACRO(86) +# endif +# if BOOST_PP_LOCAL_R(85) + BOOST_PP_LOCAL_MACRO(85) +# endif +# if BOOST_PP_LOCAL_R(84) + BOOST_PP_LOCAL_MACRO(84) +# endif +# if BOOST_PP_LOCAL_R(83) + BOOST_PP_LOCAL_MACRO(83) +# endif +# if BOOST_PP_LOCAL_R(82) + BOOST_PP_LOCAL_MACRO(82) +# endif +# if BOOST_PP_LOCAL_R(81) + BOOST_PP_LOCAL_MACRO(81) +# endif +# if BOOST_PP_LOCAL_R(80) + BOOST_PP_LOCAL_MACRO(80) +# endif +# if BOOST_PP_LOCAL_R(79) + BOOST_PP_LOCAL_MACRO(79) +# endif +# if BOOST_PP_LOCAL_R(78) + BOOST_PP_LOCAL_MACRO(78) +# endif +# if BOOST_PP_LOCAL_R(77) + BOOST_PP_LOCAL_MACRO(77) +# endif +# if BOOST_PP_LOCAL_R(76) + BOOST_PP_LOCAL_MACRO(76) +# endif +# if BOOST_PP_LOCAL_R(75) + BOOST_PP_LOCAL_MACRO(75) +# endif +# if BOOST_PP_LOCAL_R(74) + BOOST_PP_LOCAL_MACRO(74) +# endif +# if BOOST_PP_LOCAL_R(73) + BOOST_PP_LOCAL_MACRO(73) +# endif +# if BOOST_PP_LOCAL_R(72) + BOOST_PP_LOCAL_MACRO(72) +# endif +# if BOOST_PP_LOCAL_R(71) + BOOST_PP_LOCAL_MACRO(71) +# endif +# if BOOST_PP_LOCAL_R(70) + BOOST_PP_LOCAL_MACRO(70) +# endif +# if BOOST_PP_LOCAL_R(69) + BOOST_PP_LOCAL_MACRO(69) +# endif +# if BOOST_PP_LOCAL_R(68) + BOOST_PP_LOCAL_MACRO(68) +# endif +# if BOOST_PP_LOCAL_R(67) + BOOST_PP_LOCAL_MACRO(67) +# endif +# if BOOST_PP_LOCAL_R(66) + BOOST_PP_LOCAL_MACRO(66) +# endif +# if BOOST_PP_LOCAL_R(65) + BOOST_PP_LOCAL_MACRO(65) +# endif +# if BOOST_PP_LOCAL_R(64) + BOOST_PP_LOCAL_MACRO(64) +# endif +# if BOOST_PP_LOCAL_R(63) + BOOST_PP_LOCAL_MACRO(63) +# endif +# if BOOST_PP_LOCAL_R(62) + BOOST_PP_LOCAL_MACRO(62) +# endif +# if BOOST_PP_LOCAL_R(61) + BOOST_PP_LOCAL_MACRO(61) +# endif +# if BOOST_PP_LOCAL_R(60) + BOOST_PP_LOCAL_MACRO(60) +# endif +# if BOOST_PP_LOCAL_R(59) + BOOST_PP_LOCAL_MACRO(59) +# endif +# if BOOST_PP_LOCAL_R(58) + BOOST_PP_LOCAL_MACRO(58) +# endif +# if BOOST_PP_LOCAL_R(57) + BOOST_PP_LOCAL_MACRO(57) +# endif +# if BOOST_PP_LOCAL_R(56) + BOOST_PP_LOCAL_MACRO(56) +# endif +# if BOOST_PP_LOCAL_R(55) + BOOST_PP_LOCAL_MACRO(55) +# endif +# if BOOST_PP_LOCAL_R(54) + BOOST_PP_LOCAL_MACRO(54) +# endif +# if BOOST_PP_LOCAL_R(53) + BOOST_PP_LOCAL_MACRO(53) +# endif +# if BOOST_PP_LOCAL_R(52) + BOOST_PP_LOCAL_MACRO(52) +# endif +# if BOOST_PP_LOCAL_R(51) + BOOST_PP_LOCAL_MACRO(51) +# endif +# if BOOST_PP_LOCAL_R(50) + BOOST_PP_LOCAL_MACRO(50) +# endif +# if BOOST_PP_LOCAL_R(49) + BOOST_PP_LOCAL_MACRO(49) +# endif +# if BOOST_PP_LOCAL_R(48) + BOOST_PP_LOCAL_MACRO(48) +# endif +# if BOOST_PP_LOCAL_R(47) + BOOST_PP_LOCAL_MACRO(47) +# endif +# if BOOST_PP_LOCAL_R(46) + BOOST_PP_LOCAL_MACRO(46) +# endif +# if BOOST_PP_LOCAL_R(45) + BOOST_PP_LOCAL_MACRO(45) +# endif +# if BOOST_PP_LOCAL_R(44) + BOOST_PP_LOCAL_MACRO(44) +# endif +# if BOOST_PP_LOCAL_R(43) + BOOST_PP_LOCAL_MACRO(43) +# endif +# if BOOST_PP_LOCAL_R(42) + BOOST_PP_LOCAL_MACRO(42) +# endif +# if BOOST_PP_LOCAL_R(41) + BOOST_PP_LOCAL_MACRO(41) +# endif +# if BOOST_PP_LOCAL_R(40) + BOOST_PP_LOCAL_MACRO(40) +# endif +# if BOOST_PP_LOCAL_R(39) + BOOST_PP_LOCAL_MACRO(39) +# endif +# if BOOST_PP_LOCAL_R(38) + BOOST_PP_LOCAL_MACRO(38) +# endif +# if BOOST_PP_LOCAL_R(37) + BOOST_PP_LOCAL_MACRO(37) +# endif +# if BOOST_PP_LOCAL_R(36) + BOOST_PP_LOCAL_MACRO(36) +# endif +# if BOOST_PP_LOCAL_R(35) + BOOST_PP_LOCAL_MACRO(35) +# endif +# if BOOST_PP_LOCAL_R(34) + BOOST_PP_LOCAL_MACRO(34) +# endif +# if BOOST_PP_LOCAL_R(33) + BOOST_PP_LOCAL_MACRO(33) +# endif +# if BOOST_PP_LOCAL_R(32) + BOOST_PP_LOCAL_MACRO(32) +# endif +# if BOOST_PP_LOCAL_R(31) + BOOST_PP_LOCAL_MACRO(31) +# endif +# if BOOST_PP_LOCAL_R(30) + BOOST_PP_LOCAL_MACRO(30) +# endif +# if BOOST_PP_LOCAL_R(29) + BOOST_PP_LOCAL_MACRO(29) +# endif +# if BOOST_PP_LOCAL_R(28) + BOOST_PP_LOCAL_MACRO(28) +# endif +# if BOOST_PP_LOCAL_R(27) + BOOST_PP_LOCAL_MACRO(27) +# endif +# if BOOST_PP_LOCAL_R(26) + BOOST_PP_LOCAL_MACRO(26) +# endif +# if BOOST_PP_LOCAL_R(25) + BOOST_PP_LOCAL_MACRO(25) +# endif +# if BOOST_PP_LOCAL_R(24) + BOOST_PP_LOCAL_MACRO(24) +# endif +# if BOOST_PP_LOCAL_R(23) + BOOST_PP_LOCAL_MACRO(23) +# endif +# if BOOST_PP_LOCAL_R(22) + BOOST_PP_LOCAL_MACRO(22) +# endif +# if BOOST_PP_LOCAL_R(21) + BOOST_PP_LOCAL_MACRO(21) +# endif +# if BOOST_PP_LOCAL_R(20) + BOOST_PP_LOCAL_MACRO(20) +# endif +# if BOOST_PP_LOCAL_R(19) + BOOST_PP_LOCAL_MACRO(19) +# endif +# if BOOST_PP_LOCAL_R(18) + BOOST_PP_LOCAL_MACRO(18) +# endif +# if BOOST_PP_LOCAL_R(17) + BOOST_PP_LOCAL_MACRO(17) +# endif +# if BOOST_PP_LOCAL_R(16) + BOOST_PP_LOCAL_MACRO(16) +# endif +# if BOOST_PP_LOCAL_R(15) + BOOST_PP_LOCAL_MACRO(15) +# endif +# if BOOST_PP_LOCAL_R(14) + BOOST_PP_LOCAL_MACRO(14) +# endif +# if BOOST_PP_LOCAL_R(13) + BOOST_PP_LOCAL_MACRO(13) +# endif +# if BOOST_PP_LOCAL_R(12) + BOOST_PP_LOCAL_MACRO(12) +# endif +# if BOOST_PP_LOCAL_R(11) + BOOST_PP_LOCAL_MACRO(11) +# endif +# if BOOST_PP_LOCAL_R(10) + BOOST_PP_LOCAL_MACRO(10) +# endif +# if BOOST_PP_LOCAL_R(9) + BOOST_PP_LOCAL_MACRO(9) +# endif +# if BOOST_PP_LOCAL_R(8) + BOOST_PP_LOCAL_MACRO(8) +# endif +# if BOOST_PP_LOCAL_R(7) + BOOST_PP_LOCAL_MACRO(7) +# endif +# if BOOST_PP_LOCAL_R(6) + BOOST_PP_LOCAL_MACRO(6) +# endif +# if BOOST_PP_LOCAL_R(5) + BOOST_PP_LOCAL_MACRO(5) +# endif +# if BOOST_PP_LOCAL_R(4) + BOOST_PP_LOCAL_MACRO(4) +# endif +# if BOOST_PP_LOCAL_R(3) + BOOST_PP_LOCAL_MACRO(3) +# endif +# if BOOST_PP_LOCAL_R(2) + BOOST_PP_LOCAL_MACRO(2) +# endif +# if BOOST_PP_LOCAL_R(1) + BOOST_PP_LOCAL_MACRO(1) +# endif +# if BOOST_PP_LOCAL_R(0) + BOOST_PP_LOCAL_MACRO(0) +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/self.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/self.hpp new file mode 100644 index 0000000000..757185c1f2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/self.hpp @@ -0,0 +1,21 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# if !defined(BOOST_PP_INDIRECT_SELF) +# error BOOST_PP_ERROR: no indirect file to include +# endif +# +# define BOOST_PP_IS_SELFISH 1 +# +# include BOOST_PP_INDIRECT_SELF +# +# undef BOOST_PP_IS_SELFISH +# undef BOOST_PP_INDIRECT_SELF diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/start.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/start.hpp new file mode 100644 index 0000000000..cbf0381848 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iteration/detail/start.hpp @@ -0,0 +1,99 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_LOCAL_SE +# +# undef BOOST_PP_LOCAL_SE_DIGIT_1 +# undef BOOST_PP_LOCAL_SE_DIGIT_2 +# undef BOOST_PP_LOCAL_SE_DIGIT_3 +# undef BOOST_PP_LOCAL_SE_DIGIT_4 +# undef BOOST_PP_LOCAL_SE_DIGIT_5 +# undef BOOST_PP_LOCAL_SE_DIGIT_6 +# undef BOOST_PP_LOCAL_SE_DIGIT_7 +# undef BOOST_PP_LOCAL_SE_DIGIT_8 +# undef BOOST_PP_LOCAL_SE_DIGIT_9 +# undef BOOST_PP_LOCAL_SE_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_LOCAL_SE_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_LOCAL_SE_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_LOCAL_SE_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_LOCAL_SE_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_LOCAL_SE_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_LOCAL_SE_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_LOCAL_SE_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_LOCAL_SE_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_LOCAL_SE_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_LOCAL_SE_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_LOCAL_SE_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_LOCAL_SE_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_LOCAL_SE_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_LOCAL_SE_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_LOCAL_SE_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_LOCAL_SE_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_LOCAL_SE_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_LOCAL_SE_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_LOCAL_SE_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_LOCAL_SE_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_LOCAL_SE_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_LOCAL_SE_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_LOCAL_SE_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_LOCAL_SE_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_LOCAL_SE_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_LOCAL_SE_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_LOCAL_SE_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_LOCAL_SE_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_LOCAL_SE_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_LOCAL_SE_DIGIT_1 9 +# endif +# +# if BOOST_PP_LOCAL_SE_DIGIT_3 +# define BOOST_PP_LOCAL_SE() BOOST_PP_SLOT_CC_3(BOOST_PP_LOCAL_SE_DIGIT_3, BOOST_PP_LOCAL_SE_DIGIT_2, BOOST_PP_LOCAL_SE_DIGIT_1) +# elif BOOST_PP_LOCAL_SE_DIGIT_2 +# define BOOST_PP_LOCAL_SE() BOOST_PP_SLOT_CC_2(BOOST_PP_LOCAL_SE_DIGIT_2, BOOST_PP_LOCAL_SE_DIGIT_1) +# else +# define BOOST_PP_LOCAL_SE() BOOST_PP_LOCAL_SE_DIGIT_1 +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iteration/iterate.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iteration/iterate.hpp new file mode 100644 index 0000000000..8f861e71f6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iteration/iterate.hpp @@ -0,0 +1,82 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ITERATION_ITERATE_HPP +# define BOOST_PREPROCESSOR_ITERATION_ITERATE_HPP +# +# include +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_ITERATION_DEPTH */ +# +# define BOOST_PP_ITERATION_DEPTH() 0 +# +# /* BOOST_PP_ITERATION */ +# +# define BOOST_PP_ITERATION() BOOST_PP_CAT(BOOST_PP_ITERATION_, BOOST_PP_ITERATION_DEPTH()) +# +# /* BOOST_PP_ITERATION_START && BOOST_PP_ITERATION_FINISH */ +# +# define BOOST_PP_ITERATION_START() BOOST_PP_CAT(BOOST_PP_ITERATION_START_, BOOST_PP_ITERATION_DEPTH()) +# define BOOST_PP_ITERATION_FINISH() BOOST_PP_CAT(BOOST_PP_ITERATION_FINISH_, BOOST_PP_ITERATION_DEPTH()) +# +# /* BOOST_PP_ITERATION_FLAGS */ +# +# define BOOST_PP_ITERATION_FLAGS() (BOOST_PP_CAT(BOOST_PP_ITERATION_FLAGS_, BOOST_PP_ITERATION_DEPTH())()) +# +# /* BOOST_PP_FRAME_ITERATION */ +# +# define BOOST_PP_FRAME_ITERATION(i) BOOST_PP_CAT(BOOST_PP_ITERATION_, i) +# +# /* BOOST_PP_FRAME_START && BOOST_PP_FRAME_FINISH */ +# +# define BOOST_PP_FRAME_START(i) BOOST_PP_CAT(BOOST_PP_ITERATION_START_, i) +# define BOOST_PP_FRAME_FINISH(i) BOOST_PP_CAT(BOOST_PP_ITERATION_FINISH_, i) +# +# /* BOOST_PP_FRAME_FLAGS */ +# +# define BOOST_PP_FRAME_FLAGS(i) (BOOST_PP_CAT(BOOST_PP_ITERATION_FLAGS_, i)()) +# +# /* BOOST_PP_RELATIVE_ITERATION */ +# +# define BOOST_PP_RELATIVE_ITERATION(i) BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_) +# +# define BOOST_PP_RELATIVE_0(m) BOOST_PP_CAT(m, BOOST_PP_ITERATION_DEPTH()) +# define BOOST_PP_RELATIVE_1(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH())) +# define BOOST_PP_RELATIVE_2(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH()))) +# define BOOST_PP_RELATIVE_3(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH())))) +# define BOOST_PP_RELATIVE_4(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH()))))) +# +# /* BOOST_PP_RELATIVE_START && BOOST_PP_RELATIVE_FINISH */ +# +# define BOOST_PP_RELATIVE_START(i) BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_START_) +# define BOOST_PP_RELATIVE_FINISH(i) BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_FINISH_) +# +# /* BOOST_PP_RELATIVE_FLAGS */ +# +# define BOOST_PP_RELATIVE_FLAGS(i) (BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_FLAGS_)()) +# +# /* BOOST_PP_ITERATE */ +# +# define BOOST_PP_ITERATE() BOOST_PP_CAT(BOOST_PP_ITERATE_, BOOST_PP_INC(BOOST_PP_ITERATION_DEPTH())) +# +# define BOOST_PP_ITERATE_1 +# define BOOST_PP_ITERATE_2 +# define BOOST_PP_ITERATE_3 +# define BOOST_PP_ITERATE_4 +# define BOOST_PP_ITERATE_5 +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iteration/local.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iteration/local.hpp new file mode 100644 index 0000000000..289fb1aff7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iteration/local.hpp @@ -0,0 +1,26 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ITERATION_LOCAL_HPP +# define BOOST_PREPROCESSOR_ITERATION_LOCAL_HPP +# +# include +# include +# include +# +# /* BOOST_PP_LOCAL_ITERATE */ +# +# define BOOST_PP_LOCAL_ITERATE() +# +# define BOOST_PP_LOCAL_C(n) (BOOST_PP_LOCAL_S) <= n && (BOOST_PP_LOCAL_F) >= n +# define BOOST_PP_LOCAL_R(n) (BOOST_PP_LOCAL_F) <= n && (BOOST_PP_LOCAL_S) >= n +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/iteration/self.hpp b/ThirdParty/boost-Subset/boost/preprocessor/iteration/self.hpp new file mode 100644 index 0000000000..6e0464c976 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/iteration/self.hpp @@ -0,0 +1,19 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ITERATION_SELF_HPP +# define BOOST_PREPROCESSOR_ITERATION_SELF_HPP +# +# /* BOOST_PP_INCLUDE_SELF */ +# +# define BOOST_PP_INCLUDE_SELF() +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/list/adt.hpp b/ThirdParty/boost-Subset/boost/preprocessor/list/adt.hpp new file mode 100644 index 0000000000..b4f12bab63 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/list/adt.hpp @@ -0,0 +1,73 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * +# * See http://www.boost.org for most recent version. +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# ifndef BOOST_PREPROCESSOR_LIST_ADT_HPP +# define BOOST_PREPROCESSOR_LIST_ADT_HPP +# +# include +# include +# include +# include +# +# /* BOOST_PP_LIST_CONS */ +# +# define BOOST_PP_LIST_CONS(head, tail) (head, tail) +# +# /* BOOST_PP_LIST_NIL */ +# +# define BOOST_PP_LIST_NIL BOOST_PP_NIL +# +# /* BOOST_PP_LIST_FIRST */ +# +# define BOOST_PP_LIST_FIRST(list) BOOST_PP_LIST_FIRST_D(list) +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_LIST_FIRST_D(list) BOOST_PP_LIST_FIRST_I list +# else +# define BOOST_PP_LIST_FIRST_D(list) BOOST_PP_LIST_FIRST_I ## list +# endif +# +# define BOOST_PP_LIST_FIRST_I(head, tail) head +# +# /* BOOST_PP_LIST_REST */ +# +# define BOOST_PP_LIST_REST(list) BOOST_PP_LIST_REST_D(list) +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_LIST_REST_D(list) BOOST_PP_LIST_REST_I list +# else +# define BOOST_PP_LIST_REST_D(list) BOOST_PP_LIST_REST_I ## list +# endif +# +# define BOOST_PP_LIST_REST_I(head, tail) tail +# +# /* BOOST_PP_LIST_IS_CONS */ +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_BCC() +# define BOOST_PP_LIST_IS_CONS(list) BOOST_PP_LIST_IS_CONS_D(list) +# define BOOST_PP_LIST_IS_CONS_D(list) BOOST_PP_LIST_IS_CONS_ ## list +# define BOOST_PP_LIST_IS_CONS_(head, tail) 1 +# define BOOST_PP_LIST_IS_CONS_BOOST_PP_NIL 0 +# else +# define BOOST_PP_LIST_IS_CONS(list) BOOST_PP_IS_BINARY(list) +# endif +# +# /* BOOST_PP_LIST_IS_NIL */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_BCC() +# define BOOST_PP_LIST_IS_NIL(list) BOOST_PP_COMPL(BOOST_PP_IS_BINARY(list)) +# else +# define BOOST_PP_LIST_IS_NIL(list) BOOST_PP_COMPL(BOOST_PP_LIST_IS_CONS(list)) +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/list/append.hpp b/ThirdParty/boost-Subset/boost/preprocessor/list/append.hpp new file mode 100644 index 0000000000..26e9d74e09 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/list/append.hpp @@ -0,0 +1,40 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LIST_APPEND_HPP +# define BOOST_PREPROCESSOR_LIST_APPEND_HPP +# +# include +# include +# +# /* BOOST_PP_LIST_APPEND */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_LIST_APPEND(a, b) BOOST_PP_LIST_FOLD_RIGHT(BOOST_PP_LIST_APPEND_O, b, a) +# else +# define BOOST_PP_LIST_APPEND(a, b) BOOST_PP_LIST_APPEND_I(a, b) +# define BOOST_PP_LIST_APPEND_I(a, b) BOOST_PP_LIST_FOLD_RIGHT(BOOST_PP_LIST_APPEND_O, b, a) +# endif +# +# define BOOST_PP_LIST_APPEND_O(d, s, x) (x, s) +# +# /* BOOST_PP_LIST_APPEND_D */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_LIST_APPEND_D(d, a, b) BOOST_PP_LIST_FOLD_RIGHT_ ## d(BOOST_PP_LIST_APPEND_O, b, a) +# else +# define BOOST_PP_LIST_APPEND_D(d, a, b) BOOST_PP_LIST_APPEND_D_I(d, a, b) +# define BOOST_PP_LIST_APPEND_D_I(d, a, b) BOOST_PP_LIST_FOLD_RIGHT_ ## d(BOOST_PP_LIST_APPEND_O, b, a) +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/list/detail/dmc/fold_left.hpp b/ThirdParty/boost-Subset/boost/preprocessor/list/detail/dmc/fold_left.hpp new file mode 100644 index 0000000000..844ac5b8ab --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/list/detail/dmc/fold_left.hpp @@ -0,0 +1,279 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LIST_DETAIL_FOLD_LEFT_HPP +# define BOOST_PREPROCESSOR_LIST_DETAIL_FOLD_LEFT_HPP +# +# include +# include +# include +# include +# +# define BOOST_PP_LIST_FOLD_LEFT_1(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_2, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(2, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_2(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_3, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(3, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_3(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_4, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(4, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_4(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_5, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(5, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_5(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_6, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(6, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_6(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_7, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(7, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_7(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_8, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(8, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_8(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_9, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(9, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_9(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_10, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(10, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_10(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_11, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(11, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_11(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_12, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(12, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_12(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_13, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(13, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_13(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_14, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(14, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_14(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_15, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(15, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_15(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_16, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(16, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_16(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_17, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(17, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_17(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_18, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(18, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_18(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_19, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(19, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_19(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_20, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(20, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_20(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_21, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(21, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_21(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_22, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(22, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_22(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_23, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(23, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_23(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_24, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(24, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_24(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_25, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(25, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_25(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_26, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(26, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_26(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_27, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(27, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_27(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_28, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(28, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_28(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_29, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(29, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_29(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_30, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(30, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_30(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_31, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(31, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_31(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_32, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(32, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_32(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_33, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(33, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_33(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_34, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(34, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_34(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_35, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(35, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_35(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_36, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(36, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_36(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_37, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(37, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_37(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_38, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(38, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_38(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_39, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(39, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_39(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_40, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(40, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_40(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_41, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(41, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_41(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_42, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(42, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_42(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_43, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(43, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_43(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_44, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(44, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_44(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_45, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(45, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_45(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_46, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(46, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_46(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_47, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(47, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_47(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_48, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(48, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_48(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_49, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(49, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_49(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_50, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(50, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_50(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_51, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(51, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_51(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_52, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(52, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_52(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_53, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(53, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_53(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_54, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(54, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_54(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_55, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(55, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_55(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_56, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(56, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_56(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_57, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(57, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_57(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_58, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(58, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_58(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_59, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(59, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_59(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_60, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(60, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_60(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_61, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(61, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_61(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_62, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(62, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_62(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_63, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(63, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_63(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_64, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(64, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_64(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_65, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(65, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_65(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_66, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(66, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_66(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_67, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(67, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_67(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_68, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(68, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_68(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_69, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(69, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_69(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_70, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(70, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_70(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_71, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(71, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_71(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_72, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(72, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_72(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_73, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(73, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_73(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_74, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(74, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_74(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_75, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(75, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_75(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_76, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(76, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_76(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_77, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(77, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_77(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_78, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(78, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_78(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_79, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(79, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_79(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_80, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(80, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_80(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_81, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(81, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_81(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_82, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(82, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_82(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_83, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(83, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_83(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_84, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(84, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_84(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_85, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(85, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_85(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_86, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(86, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_86(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_87, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(87, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_87(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_88, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(88, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_88(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_89, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(89, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_89(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_90, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(90, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_90(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_91, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(91, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_91(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_92, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(92, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_92(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_93, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(93, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_93(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_94, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(94, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_94(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_95, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(95, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_95(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_96, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(96, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_96(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_97, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(97, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_97(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_98, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(98, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_98(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_99, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(99, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_99(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_100, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(100, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_100(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_101, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(101, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_101(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_102, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(102, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_102(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_103, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(103, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_103(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_104, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(104, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_104(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_105, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(105, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_105(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_106, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(106, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_106(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_107, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(107, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_107(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_108, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(108, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_108(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_109, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(109, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_109(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_110, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(110, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_110(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_111, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(111, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_111(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_112, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(112, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_112(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_113, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(113, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_113(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_114, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(114, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_114(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_115, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(115, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_115(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_116, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(116, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_116(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_117, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(117, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_117(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_118, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(118, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_118(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_119, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(119, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_119(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_120, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(120, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_120(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_121, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(121, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_121(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_122, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(122, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_122(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_123, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(123, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_123(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_124, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(124, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_124(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_125, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(125, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_125(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_126, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(126, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_126(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_127, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(127, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_127(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_128, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(128, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_128(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_129, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(129, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_129(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_130, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(130, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_130(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_131, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(131, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_131(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_132, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(132, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_132(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_133, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(133, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_133(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_134, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(134, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_134(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_135, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(135, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_135(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_136, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(136, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_136(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_137, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(137, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_137(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_138, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(138, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_138(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_139, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(139, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_139(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_140, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(140, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_140(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_141, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(141, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_141(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_142, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(142, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_142(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_143, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(143, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_143(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_144, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(144, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_144(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_145, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(145, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_145(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_146, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(146, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_146(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_147, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(147, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_147(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_148, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(148, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_148(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_149, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(149, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_149(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_150, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(150, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_150(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_151, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(151, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_151(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_152, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(152, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_152(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_153, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(153, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_153(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_154, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(154, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_154(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_155, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(155, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_155(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_156, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(156, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_156(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_157, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(157, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_157(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_158, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(158, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_158(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_159, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(159, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_159(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_160, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(160, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_160(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_161, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(161, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_161(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_162, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(162, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_162(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_163, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(163, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_163(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_164, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(164, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_164(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_165, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(165, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_165(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_166, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(166, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_166(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_167, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(167, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_167(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_168, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(168, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_168(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_169, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(169, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_169(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_170, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(170, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_170(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_171, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(171, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_171(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_172, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(172, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_172(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_173, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(173, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_173(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_174, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(174, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_174(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_175, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(175, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_175(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_176, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(176, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_176(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_177, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(177, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_177(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_178, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(178, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_178(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_179, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(179, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_179(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_180, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(180, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_180(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_181, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(181, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_181(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_182, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(182, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_182(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_183, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(183, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_183(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_184, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(184, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_184(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_185, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(185, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_185(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_186, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(186, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_186(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_187, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(187, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_187(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_188, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(188, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_188(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_189, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(189, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_189(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_190, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(190, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_190(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_191, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(191, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_191(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_192, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(192, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_192(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_193, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(193, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_193(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_194, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(194, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_194(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_195, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(195, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_195(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_196, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(196, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_196(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_197, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(197, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_197(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_198, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(198, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_198(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_199, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(199, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_199(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_200, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(200, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_200(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_201, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(201, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_201(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_202, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(202, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_202(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_203, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(203, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_203(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_204, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(204, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_204(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_205, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(205, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_205(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_206, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(206, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_206(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_207, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(207, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_207(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_208, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(208, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_208(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_209, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(209, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_209(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_210, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(210, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_210(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_211, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(211, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_211(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_212, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(212, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_212(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_213, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(213, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_213(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_214, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(214, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_214(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_215, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(215, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_215(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_216, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(216, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_216(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_217, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(217, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_217(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_218, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(218, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_218(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_219, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(219, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_219(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_220, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(220, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_220(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_221, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(221, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_221(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_222, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(222, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_222(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_223, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(223, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_223(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_224, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(224, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_224(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_225, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(225, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_225(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_226, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(226, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_226(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_227, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(227, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_227(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_228, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(228, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_228(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_229, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(229, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_229(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_230, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(230, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_230(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_231, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(231, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_231(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_232, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(232, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_232(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_233, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(233, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_233(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_234, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(234, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_234(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_235, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(235, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_235(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_236, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(236, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_236(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_237, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(237, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_237(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_238, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(238, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_238(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_239, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(239, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_239(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_240, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(240, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_240(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_241, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(241, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_241(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_242, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(242, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_242(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_243, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(243, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_243(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_244, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(244, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_244(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_245, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(245, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_245(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_246, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(246, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_246(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_247, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(247, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_247(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_248, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(248, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_248(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_249, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(249, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_249(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_250, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(250, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_250(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_251, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(251, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_251(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_252, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(252, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_252(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_253, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(253, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_253(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_254, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(254, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_254(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_255, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(255, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_255(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_256, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(256, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_256(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_257, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(257, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/list/detail/edg/fold_left.hpp b/ThirdParty/boost-Subset/boost/preprocessor/list/detail/edg/fold_left.hpp new file mode 100644 index 0000000000..ae9524f979 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/list/detail/edg/fold_left.hpp @@ -0,0 +1,536 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LIST_DETAIL_EDG_FOLD_LEFT_HPP +# define BOOST_PREPROCESSOR_LIST_DETAIL_EDG_FOLD_LEFT_HPP +# +# include +# include +# include +# include +# +# define BOOST_PP_LIST_FOLD_LEFT_1(o, s, l) BOOST_PP_LIST_FOLD_LEFT_1_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_2(o, s, l) BOOST_PP_LIST_FOLD_LEFT_2_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_3(o, s, l) BOOST_PP_LIST_FOLD_LEFT_3_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_4(o, s, l) BOOST_PP_LIST_FOLD_LEFT_4_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_5(o, s, l) BOOST_PP_LIST_FOLD_LEFT_5_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_6(o, s, l) BOOST_PP_LIST_FOLD_LEFT_6_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_7(o, s, l) BOOST_PP_LIST_FOLD_LEFT_7_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_8(o, s, l) BOOST_PP_LIST_FOLD_LEFT_8_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_9(o, s, l) BOOST_PP_LIST_FOLD_LEFT_9_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_10(o, s, l) BOOST_PP_LIST_FOLD_LEFT_10_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_11(o, s, l) BOOST_PP_LIST_FOLD_LEFT_11_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_12(o, s, l) BOOST_PP_LIST_FOLD_LEFT_12_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_13(o, s, l) BOOST_PP_LIST_FOLD_LEFT_13_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_14(o, s, l) BOOST_PP_LIST_FOLD_LEFT_14_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_15(o, s, l) BOOST_PP_LIST_FOLD_LEFT_15_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_16(o, s, l) BOOST_PP_LIST_FOLD_LEFT_16_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_17(o, s, l) BOOST_PP_LIST_FOLD_LEFT_17_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_18(o, s, l) BOOST_PP_LIST_FOLD_LEFT_18_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_19(o, s, l) BOOST_PP_LIST_FOLD_LEFT_19_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_20(o, s, l) BOOST_PP_LIST_FOLD_LEFT_20_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_21(o, s, l) BOOST_PP_LIST_FOLD_LEFT_21_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_22(o, s, l) BOOST_PP_LIST_FOLD_LEFT_22_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_23(o, s, l) BOOST_PP_LIST_FOLD_LEFT_23_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_24(o, s, l) BOOST_PP_LIST_FOLD_LEFT_24_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_25(o, s, l) BOOST_PP_LIST_FOLD_LEFT_25_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_26(o, s, l) BOOST_PP_LIST_FOLD_LEFT_26_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_27(o, s, l) BOOST_PP_LIST_FOLD_LEFT_27_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_28(o, s, l) BOOST_PP_LIST_FOLD_LEFT_28_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_29(o, s, l) BOOST_PP_LIST_FOLD_LEFT_29_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_30(o, s, l) BOOST_PP_LIST_FOLD_LEFT_30_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_31(o, s, l) BOOST_PP_LIST_FOLD_LEFT_31_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_32(o, s, l) BOOST_PP_LIST_FOLD_LEFT_32_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_33(o, s, l) BOOST_PP_LIST_FOLD_LEFT_33_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_34(o, s, l) BOOST_PP_LIST_FOLD_LEFT_34_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_35(o, s, l) BOOST_PP_LIST_FOLD_LEFT_35_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_36(o, s, l) BOOST_PP_LIST_FOLD_LEFT_36_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_37(o, s, l) BOOST_PP_LIST_FOLD_LEFT_37_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_38(o, s, l) BOOST_PP_LIST_FOLD_LEFT_38_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_39(o, s, l) BOOST_PP_LIST_FOLD_LEFT_39_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_40(o, s, l) BOOST_PP_LIST_FOLD_LEFT_40_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_41(o, s, l) BOOST_PP_LIST_FOLD_LEFT_41_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_42(o, s, l) BOOST_PP_LIST_FOLD_LEFT_42_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_43(o, s, l) BOOST_PP_LIST_FOLD_LEFT_43_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_44(o, s, l) BOOST_PP_LIST_FOLD_LEFT_44_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_45(o, s, l) BOOST_PP_LIST_FOLD_LEFT_45_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_46(o, s, l) BOOST_PP_LIST_FOLD_LEFT_46_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_47(o, s, l) BOOST_PP_LIST_FOLD_LEFT_47_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_48(o, s, l) BOOST_PP_LIST_FOLD_LEFT_48_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_49(o, s, l) BOOST_PP_LIST_FOLD_LEFT_49_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_50(o, s, l) BOOST_PP_LIST_FOLD_LEFT_50_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_51(o, s, l) BOOST_PP_LIST_FOLD_LEFT_51_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_52(o, s, l) BOOST_PP_LIST_FOLD_LEFT_52_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_53(o, s, l) BOOST_PP_LIST_FOLD_LEFT_53_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_54(o, s, l) BOOST_PP_LIST_FOLD_LEFT_54_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_55(o, s, l) BOOST_PP_LIST_FOLD_LEFT_55_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_56(o, s, l) BOOST_PP_LIST_FOLD_LEFT_56_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_57(o, s, l) BOOST_PP_LIST_FOLD_LEFT_57_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_58(o, s, l) BOOST_PP_LIST_FOLD_LEFT_58_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_59(o, s, l) BOOST_PP_LIST_FOLD_LEFT_59_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_60(o, s, l) BOOST_PP_LIST_FOLD_LEFT_60_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_61(o, s, l) BOOST_PP_LIST_FOLD_LEFT_61_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_62(o, s, l) BOOST_PP_LIST_FOLD_LEFT_62_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_63(o, s, l) BOOST_PP_LIST_FOLD_LEFT_63_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_64(o, s, l) BOOST_PP_LIST_FOLD_LEFT_64_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_65(o, s, l) BOOST_PP_LIST_FOLD_LEFT_65_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_66(o, s, l) BOOST_PP_LIST_FOLD_LEFT_66_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_67(o, s, l) BOOST_PP_LIST_FOLD_LEFT_67_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_68(o, s, l) BOOST_PP_LIST_FOLD_LEFT_68_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_69(o, s, l) BOOST_PP_LIST_FOLD_LEFT_69_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_70(o, s, l) BOOST_PP_LIST_FOLD_LEFT_70_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_71(o, s, l) BOOST_PP_LIST_FOLD_LEFT_71_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_72(o, s, l) BOOST_PP_LIST_FOLD_LEFT_72_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_73(o, s, l) BOOST_PP_LIST_FOLD_LEFT_73_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_74(o, s, l) BOOST_PP_LIST_FOLD_LEFT_74_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_75(o, s, l) BOOST_PP_LIST_FOLD_LEFT_75_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_76(o, s, l) BOOST_PP_LIST_FOLD_LEFT_76_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_77(o, s, l) BOOST_PP_LIST_FOLD_LEFT_77_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_78(o, s, l) BOOST_PP_LIST_FOLD_LEFT_78_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_79(o, s, l) BOOST_PP_LIST_FOLD_LEFT_79_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_80(o, s, l) BOOST_PP_LIST_FOLD_LEFT_80_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_81(o, s, l) BOOST_PP_LIST_FOLD_LEFT_81_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_82(o, s, l) BOOST_PP_LIST_FOLD_LEFT_82_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_83(o, s, l) BOOST_PP_LIST_FOLD_LEFT_83_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_84(o, s, l) BOOST_PP_LIST_FOLD_LEFT_84_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_85(o, s, l) BOOST_PP_LIST_FOLD_LEFT_85_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_86(o, s, l) BOOST_PP_LIST_FOLD_LEFT_86_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_87(o, s, l) BOOST_PP_LIST_FOLD_LEFT_87_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_88(o, s, l) BOOST_PP_LIST_FOLD_LEFT_88_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_89(o, s, l) BOOST_PP_LIST_FOLD_LEFT_89_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_90(o, s, l) BOOST_PP_LIST_FOLD_LEFT_90_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_91(o, s, l) BOOST_PP_LIST_FOLD_LEFT_91_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_92(o, s, l) BOOST_PP_LIST_FOLD_LEFT_92_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_93(o, s, l) BOOST_PP_LIST_FOLD_LEFT_93_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_94(o, s, l) BOOST_PP_LIST_FOLD_LEFT_94_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_95(o, s, l) BOOST_PP_LIST_FOLD_LEFT_95_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_96(o, s, l) BOOST_PP_LIST_FOLD_LEFT_96_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_97(o, s, l) BOOST_PP_LIST_FOLD_LEFT_97_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_98(o, s, l) BOOST_PP_LIST_FOLD_LEFT_98_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_99(o, s, l) BOOST_PP_LIST_FOLD_LEFT_99_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_100(o, s, l) BOOST_PP_LIST_FOLD_LEFT_100_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_101(o, s, l) BOOST_PP_LIST_FOLD_LEFT_101_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_102(o, s, l) BOOST_PP_LIST_FOLD_LEFT_102_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_103(o, s, l) BOOST_PP_LIST_FOLD_LEFT_103_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_104(o, s, l) BOOST_PP_LIST_FOLD_LEFT_104_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_105(o, s, l) BOOST_PP_LIST_FOLD_LEFT_105_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_106(o, s, l) BOOST_PP_LIST_FOLD_LEFT_106_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_107(o, s, l) BOOST_PP_LIST_FOLD_LEFT_107_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_108(o, s, l) BOOST_PP_LIST_FOLD_LEFT_108_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_109(o, s, l) BOOST_PP_LIST_FOLD_LEFT_109_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_110(o, s, l) BOOST_PP_LIST_FOLD_LEFT_110_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_111(o, s, l) BOOST_PP_LIST_FOLD_LEFT_111_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_112(o, s, l) BOOST_PP_LIST_FOLD_LEFT_112_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_113(o, s, l) BOOST_PP_LIST_FOLD_LEFT_113_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_114(o, s, l) BOOST_PP_LIST_FOLD_LEFT_114_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_115(o, s, l) BOOST_PP_LIST_FOLD_LEFT_115_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_116(o, s, l) BOOST_PP_LIST_FOLD_LEFT_116_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_117(o, s, l) BOOST_PP_LIST_FOLD_LEFT_117_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_118(o, s, l) BOOST_PP_LIST_FOLD_LEFT_118_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_119(o, s, l) BOOST_PP_LIST_FOLD_LEFT_119_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_120(o, s, l) BOOST_PP_LIST_FOLD_LEFT_120_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_121(o, s, l) BOOST_PP_LIST_FOLD_LEFT_121_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_122(o, s, l) BOOST_PP_LIST_FOLD_LEFT_122_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_123(o, s, l) BOOST_PP_LIST_FOLD_LEFT_123_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_124(o, s, l) BOOST_PP_LIST_FOLD_LEFT_124_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_125(o, s, l) BOOST_PP_LIST_FOLD_LEFT_125_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_126(o, s, l) BOOST_PP_LIST_FOLD_LEFT_126_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_127(o, s, l) BOOST_PP_LIST_FOLD_LEFT_127_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_128(o, s, l) BOOST_PP_LIST_FOLD_LEFT_128_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_129(o, s, l) BOOST_PP_LIST_FOLD_LEFT_129_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_130(o, s, l) BOOST_PP_LIST_FOLD_LEFT_130_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_131(o, s, l) BOOST_PP_LIST_FOLD_LEFT_131_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_132(o, s, l) BOOST_PP_LIST_FOLD_LEFT_132_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_133(o, s, l) BOOST_PP_LIST_FOLD_LEFT_133_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_134(o, s, l) BOOST_PP_LIST_FOLD_LEFT_134_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_135(o, s, l) BOOST_PP_LIST_FOLD_LEFT_135_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_136(o, s, l) BOOST_PP_LIST_FOLD_LEFT_136_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_137(o, s, l) BOOST_PP_LIST_FOLD_LEFT_137_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_138(o, s, l) BOOST_PP_LIST_FOLD_LEFT_138_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_139(o, s, l) BOOST_PP_LIST_FOLD_LEFT_139_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_140(o, s, l) BOOST_PP_LIST_FOLD_LEFT_140_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_141(o, s, l) BOOST_PP_LIST_FOLD_LEFT_141_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_142(o, s, l) BOOST_PP_LIST_FOLD_LEFT_142_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_143(o, s, l) BOOST_PP_LIST_FOLD_LEFT_143_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_144(o, s, l) BOOST_PP_LIST_FOLD_LEFT_144_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_145(o, s, l) BOOST_PP_LIST_FOLD_LEFT_145_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_146(o, s, l) BOOST_PP_LIST_FOLD_LEFT_146_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_147(o, s, l) BOOST_PP_LIST_FOLD_LEFT_147_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_148(o, s, l) BOOST_PP_LIST_FOLD_LEFT_148_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_149(o, s, l) BOOST_PP_LIST_FOLD_LEFT_149_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_150(o, s, l) BOOST_PP_LIST_FOLD_LEFT_150_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_151(o, s, l) BOOST_PP_LIST_FOLD_LEFT_151_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_152(o, s, l) BOOST_PP_LIST_FOLD_LEFT_152_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_153(o, s, l) BOOST_PP_LIST_FOLD_LEFT_153_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_154(o, s, l) BOOST_PP_LIST_FOLD_LEFT_154_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_155(o, s, l) BOOST_PP_LIST_FOLD_LEFT_155_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_156(o, s, l) BOOST_PP_LIST_FOLD_LEFT_156_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_157(o, s, l) BOOST_PP_LIST_FOLD_LEFT_157_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_158(o, s, l) BOOST_PP_LIST_FOLD_LEFT_158_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_159(o, s, l) BOOST_PP_LIST_FOLD_LEFT_159_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_160(o, s, l) BOOST_PP_LIST_FOLD_LEFT_160_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_161(o, s, l) BOOST_PP_LIST_FOLD_LEFT_161_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_162(o, s, l) BOOST_PP_LIST_FOLD_LEFT_162_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_163(o, s, l) BOOST_PP_LIST_FOLD_LEFT_163_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_164(o, s, l) BOOST_PP_LIST_FOLD_LEFT_164_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_165(o, s, l) BOOST_PP_LIST_FOLD_LEFT_165_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_166(o, s, l) BOOST_PP_LIST_FOLD_LEFT_166_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_167(o, s, l) BOOST_PP_LIST_FOLD_LEFT_167_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_168(o, s, l) BOOST_PP_LIST_FOLD_LEFT_168_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_169(o, s, l) BOOST_PP_LIST_FOLD_LEFT_169_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_170(o, s, l) BOOST_PP_LIST_FOLD_LEFT_170_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_171(o, s, l) BOOST_PP_LIST_FOLD_LEFT_171_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_172(o, s, l) BOOST_PP_LIST_FOLD_LEFT_172_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_173(o, s, l) BOOST_PP_LIST_FOLD_LEFT_173_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_174(o, s, l) BOOST_PP_LIST_FOLD_LEFT_174_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_175(o, s, l) BOOST_PP_LIST_FOLD_LEFT_175_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_176(o, s, l) BOOST_PP_LIST_FOLD_LEFT_176_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_177(o, s, l) BOOST_PP_LIST_FOLD_LEFT_177_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_178(o, s, l) BOOST_PP_LIST_FOLD_LEFT_178_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_179(o, s, l) BOOST_PP_LIST_FOLD_LEFT_179_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_180(o, s, l) BOOST_PP_LIST_FOLD_LEFT_180_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_181(o, s, l) BOOST_PP_LIST_FOLD_LEFT_181_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_182(o, s, l) BOOST_PP_LIST_FOLD_LEFT_182_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_183(o, s, l) BOOST_PP_LIST_FOLD_LEFT_183_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_184(o, s, l) BOOST_PP_LIST_FOLD_LEFT_184_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_185(o, s, l) BOOST_PP_LIST_FOLD_LEFT_185_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_186(o, s, l) BOOST_PP_LIST_FOLD_LEFT_186_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_187(o, s, l) BOOST_PP_LIST_FOLD_LEFT_187_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_188(o, s, l) BOOST_PP_LIST_FOLD_LEFT_188_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_189(o, s, l) BOOST_PP_LIST_FOLD_LEFT_189_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_190(o, s, l) BOOST_PP_LIST_FOLD_LEFT_190_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_191(o, s, l) BOOST_PP_LIST_FOLD_LEFT_191_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_192(o, s, l) BOOST_PP_LIST_FOLD_LEFT_192_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_193(o, s, l) BOOST_PP_LIST_FOLD_LEFT_193_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_194(o, s, l) BOOST_PP_LIST_FOLD_LEFT_194_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_195(o, s, l) BOOST_PP_LIST_FOLD_LEFT_195_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_196(o, s, l) BOOST_PP_LIST_FOLD_LEFT_196_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_197(o, s, l) BOOST_PP_LIST_FOLD_LEFT_197_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_198(o, s, l) BOOST_PP_LIST_FOLD_LEFT_198_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_199(o, s, l) BOOST_PP_LIST_FOLD_LEFT_199_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_200(o, s, l) BOOST_PP_LIST_FOLD_LEFT_200_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_201(o, s, l) BOOST_PP_LIST_FOLD_LEFT_201_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_202(o, s, l) BOOST_PP_LIST_FOLD_LEFT_202_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_203(o, s, l) BOOST_PP_LIST_FOLD_LEFT_203_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_204(o, s, l) BOOST_PP_LIST_FOLD_LEFT_204_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_205(o, s, l) BOOST_PP_LIST_FOLD_LEFT_205_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_206(o, s, l) BOOST_PP_LIST_FOLD_LEFT_206_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_207(o, s, l) BOOST_PP_LIST_FOLD_LEFT_207_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_208(o, s, l) BOOST_PP_LIST_FOLD_LEFT_208_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_209(o, s, l) BOOST_PP_LIST_FOLD_LEFT_209_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_210(o, s, l) BOOST_PP_LIST_FOLD_LEFT_210_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_211(o, s, l) BOOST_PP_LIST_FOLD_LEFT_211_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_212(o, s, l) BOOST_PP_LIST_FOLD_LEFT_212_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_213(o, s, l) BOOST_PP_LIST_FOLD_LEFT_213_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_214(o, s, l) BOOST_PP_LIST_FOLD_LEFT_214_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_215(o, s, l) BOOST_PP_LIST_FOLD_LEFT_215_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_216(o, s, l) BOOST_PP_LIST_FOLD_LEFT_216_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_217(o, s, l) BOOST_PP_LIST_FOLD_LEFT_217_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_218(o, s, l) BOOST_PP_LIST_FOLD_LEFT_218_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_219(o, s, l) BOOST_PP_LIST_FOLD_LEFT_219_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_220(o, s, l) BOOST_PP_LIST_FOLD_LEFT_220_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_221(o, s, l) BOOST_PP_LIST_FOLD_LEFT_221_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_222(o, s, l) BOOST_PP_LIST_FOLD_LEFT_222_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_223(o, s, l) BOOST_PP_LIST_FOLD_LEFT_223_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_224(o, s, l) BOOST_PP_LIST_FOLD_LEFT_224_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_225(o, s, l) BOOST_PP_LIST_FOLD_LEFT_225_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_226(o, s, l) BOOST_PP_LIST_FOLD_LEFT_226_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_227(o, s, l) BOOST_PP_LIST_FOLD_LEFT_227_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_228(o, s, l) BOOST_PP_LIST_FOLD_LEFT_228_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_229(o, s, l) BOOST_PP_LIST_FOLD_LEFT_229_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_230(o, s, l) BOOST_PP_LIST_FOLD_LEFT_230_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_231(o, s, l) BOOST_PP_LIST_FOLD_LEFT_231_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_232(o, s, l) BOOST_PP_LIST_FOLD_LEFT_232_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_233(o, s, l) BOOST_PP_LIST_FOLD_LEFT_233_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_234(o, s, l) BOOST_PP_LIST_FOLD_LEFT_234_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_235(o, s, l) BOOST_PP_LIST_FOLD_LEFT_235_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_236(o, s, l) BOOST_PP_LIST_FOLD_LEFT_236_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_237(o, s, l) BOOST_PP_LIST_FOLD_LEFT_237_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_238(o, s, l) BOOST_PP_LIST_FOLD_LEFT_238_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_239(o, s, l) BOOST_PP_LIST_FOLD_LEFT_239_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_240(o, s, l) BOOST_PP_LIST_FOLD_LEFT_240_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_241(o, s, l) BOOST_PP_LIST_FOLD_LEFT_241_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_242(o, s, l) BOOST_PP_LIST_FOLD_LEFT_242_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_243(o, s, l) BOOST_PP_LIST_FOLD_LEFT_243_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_244(o, s, l) BOOST_PP_LIST_FOLD_LEFT_244_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_245(o, s, l) BOOST_PP_LIST_FOLD_LEFT_245_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_246(o, s, l) BOOST_PP_LIST_FOLD_LEFT_246_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_247(o, s, l) BOOST_PP_LIST_FOLD_LEFT_247_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_248(o, s, l) BOOST_PP_LIST_FOLD_LEFT_248_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_249(o, s, l) BOOST_PP_LIST_FOLD_LEFT_249_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_250(o, s, l) BOOST_PP_LIST_FOLD_LEFT_250_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_251(o, s, l) BOOST_PP_LIST_FOLD_LEFT_251_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_252(o, s, l) BOOST_PP_LIST_FOLD_LEFT_252_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_253(o, s, l) BOOST_PP_LIST_FOLD_LEFT_253_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_254(o, s, l) BOOST_PP_LIST_FOLD_LEFT_254_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_255(o, s, l) BOOST_PP_LIST_FOLD_LEFT_255_D(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_256(o, s, l) BOOST_PP_LIST_FOLD_LEFT_256_D(o, s, l) +# +# define BOOST_PP_LIST_FOLD_LEFT_1_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_2, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(2, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_2_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_3, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(3, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_3_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_4, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(4, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_4_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_5, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(5, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_5_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_6, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(6, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_6_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_7, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(7, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_7_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_8, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(8, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_8_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_9, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(9, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_9_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_10, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(10, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_10_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_11, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(11, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_11_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_12, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(12, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_12_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_13, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(13, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_13_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_14, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(14, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_14_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_15, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(15, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_15_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_16, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(16, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_16_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_17, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(17, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_17_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_18, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(18, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_18_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_19, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(19, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_19_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_20, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(20, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_20_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_21, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(21, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_21_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_22, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(22, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_22_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_23, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(23, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_23_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_24, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(24, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_24_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_25, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(25, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_25_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_26, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(26, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_26_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_27, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(27, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_27_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_28, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(28, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_28_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_29, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(29, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_29_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_30, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(30, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_30_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_31, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(31, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_31_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_32, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(32, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_32_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_33, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(33, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_33_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_34, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(34, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_34_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_35, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(35, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_35_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_36, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(36, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_36_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_37, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(37, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_37_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_38, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(38, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_38_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_39, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(39, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_39_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_40, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(40, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_40_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_41, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(41, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_41_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_42, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(42, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_42_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_43, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(43, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_43_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_44, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(44, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_44_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_45, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(45, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_45_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_46, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(46, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_46_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_47, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(47, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_47_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_48, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(48, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_48_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_49, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(49, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_49_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_50, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(50, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_50_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_51, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(51, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_51_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_52, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(52, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_52_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_53, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(53, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_53_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_54, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(54, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_54_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_55, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(55, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_55_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_56, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(56, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_56_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_57, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(57, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_57_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_58, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(58, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_58_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_59, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(59, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_59_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_60, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(60, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_60_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_61, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(61, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_61_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_62, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(62, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_62_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_63, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(63, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_63_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_64, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(64, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_64_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_65, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(65, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_65_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_66, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(66, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_66_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_67, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(67, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_67_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_68, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(68, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_68_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_69, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(69, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_69_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_70, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(70, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_70_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_71, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(71, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_71_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_72, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(72, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_72_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_73, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(73, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_73_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_74, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(74, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_74_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_75, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(75, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_75_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_76, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(76, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_76_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_77, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(77, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_77_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_78, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(78, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_78_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_79, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(79, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_79_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_80, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(80, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_80_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_81, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(81, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_81_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_82, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(82, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_82_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_83, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(83, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_83_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_84, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(84, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_84_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_85, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(85, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_85_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_86, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(86, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_86_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_87, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(87, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_87_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_88, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(88, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_88_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_89, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(89, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_89_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_90, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(90, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_90_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_91, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(91, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_91_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_92, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(92, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_92_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_93, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(93, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_93_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_94, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(94, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_94_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_95, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(95, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_95_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_96, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(96, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_96_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_97, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(97, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_97_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_98, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(98, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_98_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_99, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(99, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_99_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_100, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(100, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_100_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_101, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(101, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_101_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_102, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(102, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_102_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_103, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(103, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_103_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_104, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(104, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_104_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_105, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(105, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_105_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_106, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(106, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_106_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_107, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(107, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_107_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_108, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(108, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_108_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_109, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(109, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_109_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_110, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(110, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_110_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_111, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(111, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_111_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_112, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(112, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_112_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_113, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(113, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_113_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_114, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(114, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_114_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_115, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(115, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_115_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_116, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(116, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_116_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_117, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(117, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_117_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_118, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(118, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_118_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_119, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(119, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_119_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_120, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(120, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_120_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_121, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(121, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_121_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_122, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(122, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_122_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_123, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(123, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_123_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_124, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(124, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_124_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_125, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(125, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_125_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_126, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(126, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_126_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_127, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(127, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_127_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_128, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(128, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_128_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_129, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(129, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_129_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_130, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(130, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_130_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_131, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(131, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_131_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_132, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(132, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_132_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_133, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(133, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_133_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_134, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(134, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_134_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_135, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(135, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_135_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_136, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(136, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_136_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_137, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(137, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_137_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_138, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(138, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_138_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_139, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(139, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_139_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_140, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(140, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_140_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_141, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(141, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_141_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_142, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(142, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_142_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_143, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(143, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_143_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_144, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(144, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_144_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_145, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(145, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_145_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_146, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(146, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_146_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_147, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(147, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_147_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_148, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(148, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_148_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_149, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(149, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_149_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_150, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(150, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_150_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_151, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(151, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_151_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_152, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(152, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_152_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_153, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(153, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_153_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_154, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(154, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_154_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_155, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(155, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_155_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_156, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(156, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_156_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_157, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(157, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_157_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_158, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(158, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_158_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_159, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(159, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_159_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_160, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(160, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_160_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_161, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(161, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_161_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_162, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(162, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_162_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_163, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(163, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_163_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_164, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(164, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_164_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_165, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(165, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_165_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_166, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(166, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_166_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_167, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(167, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_167_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_168, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(168, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_168_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_169, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(169, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_169_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_170, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(170, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_170_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_171, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(171, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_171_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_172, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(172, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_172_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_173, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(173, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_173_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_174, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(174, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_174_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_175, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(175, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_175_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_176, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(176, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_176_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_177, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(177, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_177_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_178, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(178, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_178_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_179, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(179, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_179_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_180, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(180, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_180_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_181, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(181, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_181_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_182, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(182, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_182_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_183, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(183, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_183_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_184, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(184, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_184_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_185, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(185, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_185_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_186, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(186, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_186_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_187, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(187, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_187_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_188, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(188, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_188_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_189, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(189, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_189_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_190, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(190, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_190_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_191, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(191, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_191_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_192, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(192, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_192_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_193, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(193, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_193_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_194, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(194, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_194_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_195, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(195, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_195_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_196, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(196, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_196_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_197, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(197, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_197_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_198, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(198, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_198_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_199, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(199, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_199_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_200, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(200, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_200_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_201, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(201, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_201_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_202, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(202, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_202_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_203, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(203, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_203_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_204, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(204, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_204_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_205, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(205, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_205_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_206, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(206, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_206_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_207, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(207, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_207_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_208, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(208, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_208_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_209, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(209, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_209_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_210, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(210, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_210_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_211, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(211, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_211_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_212, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(212, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_212_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_213, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(213, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_213_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_214, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(214, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_214_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_215, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(215, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_215_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_216, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(216, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_216_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_217, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(217, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_217_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_218, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(218, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_218_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_219, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(219, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_219_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_220, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(220, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_220_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_221, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(221, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_221_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_222, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(222, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_222_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_223, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(223, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_223_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_224, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(224, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_224_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_225, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(225, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_225_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_226, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(226, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_226_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_227, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(227, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_227_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_228, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(228, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_228_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_229, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(229, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_229_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_230, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(230, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_230_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_231, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(231, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_231_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_232, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(232, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_232_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_233, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(233, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_233_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_234, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(234, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_234_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_235, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(235, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_235_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_236, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(236, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_236_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_237, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(237, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_237_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_238, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(238, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_238_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_239, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(239, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_239_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_240, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(240, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_240_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_241, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(241, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_241_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_242, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(242, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_242_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_243, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(243, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_243_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_244, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(244, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_244_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_245, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(245, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_245_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_246, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(246, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_246_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_247, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(247, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_247_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_248, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(248, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_248_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_249, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(249, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_249_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_250, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(250, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_250_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_251, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(251, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_251_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_252, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(252, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_252_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_253, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(253, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_253_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_254, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(254, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_254_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_255, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(255, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_255_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_256, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(256, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_256_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_257, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(257, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/list/detail/edg/fold_right.hpp b/ThirdParty/boost-Subset/boost/preprocessor/list/detail/edg/fold_right.hpp new file mode 100644 index 0000000000..d372d2e6d5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/list/detail/edg/fold_right.hpp @@ -0,0 +1,794 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LIST_DETAIL_EDG_FOLD_RIGHT_HPP +# define BOOST_PREPROCESSOR_LIST_DETAIL_EDG_FOLD_RIGHT_HPP +# +# include +# include +# include +# +# define BOOST_PP_LIST_FOLD_RIGHT_1(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_1_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_2(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_2_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_3(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_3_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_4(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_4_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_5(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_5_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_6(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_6_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_7(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_7_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_8(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_8_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_9(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_9_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_10(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_10_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_11(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_11_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_12(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_12_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_13(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_13_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_14(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_14_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_15(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_15_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_16(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_16_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_17(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_17_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_18(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_18_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_19(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_19_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_20(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_20_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_21(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_21_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_22(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_22_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_23(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_23_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_24(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_24_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_25(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_25_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_26(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_26_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_27(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_27_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_28(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_28_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_29(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_29_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_30(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_30_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_31(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_31_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_32(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_32_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_33(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_33_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_34(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_34_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_35(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_35_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_36(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_36_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_37(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_37_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_38(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_38_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_39(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_39_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_40(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_40_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_41(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_41_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_42(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_42_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_43(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_43_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_44(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_44_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_45(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_45_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_46(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_46_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_47(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_47_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_48(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_48_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_49(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_49_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_50(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_50_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_51(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_51_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_52(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_52_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_53(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_53_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_54(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_54_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_55(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_55_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_56(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_56_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_57(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_57_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_58(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_58_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_59(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_59_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_60(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_60_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_61(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_61_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_62(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_62_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_63(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_63_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_64(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_64_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_65(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_65_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_66(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_66_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_67(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_67_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_68(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_68_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_69(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_69_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_70(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_70_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_71(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_71_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_72(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_72_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_73(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_73_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_74(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_74_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_75(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_75_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_76(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_76_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_77(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_77_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_78(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_78_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_79(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_79_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_80(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_80_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_81(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_81_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_82(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_82_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_83(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_83_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_84(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_84_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_85(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_85_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_86(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_86_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_87(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_87_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_88(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_88_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_89(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_89_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_90(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_90_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_91(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_91_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_92(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_92_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_93(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_93_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_94(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_94_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_95(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_95_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_96(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_96_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_97(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_97_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_98(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_98_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_99(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_99_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_100(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_100_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_101(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_101_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_102(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_102_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_103(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_103_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_104(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_104_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_105(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_105_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_106(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_106_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_107(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_107_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_108(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_108_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_109(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_109_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_110(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_110_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_111(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_111_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_112(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_112_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_113(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_113_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_114(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_114_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_115(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_115_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_116(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_116_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_117(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_117_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_118(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_118_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_119(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_119_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_120(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_120_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_121(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_121_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_122(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_122_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_123(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_123_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_124(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_124_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_125(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_125_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_126(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_126_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_127(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_127_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_128(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_128_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_129(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_129_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_130(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_130_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_131(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_131_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_132(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_132_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_133(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_133_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_134(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_134_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_135(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_135_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_136(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_136_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_137(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_137_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_138(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_138_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_139(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_139_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_140(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_140_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_141(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_141_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_142(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_142_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_143(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_143_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_144(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_144_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_145(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_145_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_146(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_146_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_147(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_147_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_148(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_148_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_149(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_149_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_150(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_150_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_151(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_151_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_152(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_152_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_153(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_153_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_154(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_154_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_155(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_155_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_156(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_156_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_157(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_157_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_158(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_158_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_159(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_159_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_160(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_160_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_161(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_161_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_162(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_162_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_163(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_163_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_164(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_164_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_165(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_165_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_166(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_166_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_167(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_167_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_168(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_168_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_169(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_169_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_170(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_170_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_171(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_171_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_172(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_172_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_173(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_173_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_174(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_174_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_175(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_175_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_176(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_176_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_177(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_177_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_178(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_178_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_179(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_179_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_180(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_180_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_181(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_181_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_182(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_182_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_183(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_183_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_184(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_184_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_185(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_185_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_186(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_186_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_187(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_187_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_188(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_188_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_189(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_189_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_190(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_190_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_191(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_191_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_192(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_192_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_193(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_193_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_194(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_194_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_195(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_195_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_196(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_196_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_197(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_197_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_198(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_198_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_199(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_199_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_200(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_200_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_201(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_201_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_202(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_202_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_203(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_203_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_204(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_204_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_205(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_205_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_206(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_206_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_207(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_207_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_208(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_208_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_209(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_209_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_210(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_210_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_211(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_211_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_212(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_212_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_213(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_213_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_214(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_214_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_215(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_215_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_216(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_216_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_217(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_217_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_218(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_218_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_219(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_219_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_220(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_220_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_221(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_221_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_222(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_222_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_223(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_223_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_224(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_224_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_225(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_225_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_226(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_226_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_227(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_227_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_228(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_228_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_229(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_229_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_230(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_230_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_231(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_231_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_232(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_232_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_233(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_233_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_234(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_234_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_235(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_235_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_236(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_236_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_237(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_237_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_238(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_238_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_239(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_239_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_240(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_240_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_241(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_241_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_242(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_242_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_243(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_243_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_244(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_244_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_245(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_245_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_246(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_246_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_247(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_247_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_248(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_248_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_249(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_249_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_250(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_250_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_251(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_251_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_252(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_252_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_253(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_253_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_254(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_254_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_255(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_255_D(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_256(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_256_D(o, s, l) +# +# define BOOST_PP_LIST_FOLD_RIGHT_1_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(2, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_2, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_2_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(3, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_3, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_3_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(4, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_4, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_4_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(5, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_5, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_5_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(6, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_6, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_6_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(7, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_7, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_7_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(8, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_8, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_8_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(9, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_9, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_9_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(10, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_10, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_10_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(11, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_11, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_11_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(12, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_12, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_12_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(13, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_13, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_13_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(14, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_14, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_14_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(15, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_15, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_15_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(16, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_16, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_16_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(17, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_17, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_17_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(18, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_18, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_18_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(19, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_19, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_19_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(20, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_20, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_20_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(21, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_21, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_21_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(22, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_22, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_22_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(23, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_23, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_23_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(24, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_24, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_24_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(25, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_25, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_25_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(26, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_26, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_26_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(27, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_27, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_27_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(28, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_28, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_28_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(29, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_29, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_29_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(30, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_30, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_30_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(31, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_31, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_31_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(32, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_32, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_32_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(33, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_33, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_33_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(34, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_34, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_34_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(35, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_35, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_35_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(36, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_36, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_36_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(37, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_37, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_37_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(38, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_38, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_38_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(39, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_39, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_39_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(40, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_40, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_40_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(41, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_41, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_41_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(42, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_42, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_42_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(43, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_43, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_43_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(44, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_44, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_44_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(45, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_45, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_45_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(46, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_46, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_46_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(47, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_47, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_47_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(48, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_48, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_48_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(49, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_49, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_49_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(50, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_50, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_50_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(51, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_51, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_51_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(52, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_52, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_52_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(53, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_53, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_53_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(54, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_54, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_54_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(55, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_55, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_55_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(56, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_56, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_56_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(57, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_57, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_57_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(58, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_58, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_58_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(59, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_59, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_59_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(60, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_60, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_60_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(61, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_61, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_61_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(62, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_62, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_62_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(63, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_63, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_63_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(64, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_64, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_64_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(65, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_65, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_65_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(66, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_66, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_66_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(67, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_67, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_67_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(68, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_68, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_68_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(69, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_69, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_69_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(70, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_70, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_70_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(71, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_71, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_71_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(72, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_72, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_72_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(73, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_73, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_73_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(74, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_74, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_74_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(75, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_75, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_75_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(76, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_76, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_76_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(77, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_77, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_77_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(78, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_78, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_78_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(79, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_79, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_79_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(80, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_80, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_80_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(81, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_81, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_81_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(82, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_82, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_82_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(83, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_83, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_83_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(84, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_84, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_84_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(85, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_85, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_85_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(86, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_86, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_86_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(87, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_87, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_87_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(88, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_88, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_88_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(89, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_89, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_89_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(90, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_90, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_90_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(91, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_91, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_91_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(92, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_92, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_92_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(93, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_93, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_93_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(94, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_94, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_94_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(95, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_95, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_95_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(96, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_96, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_96_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(97, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_97, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_97_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(98, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_98, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_98_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(99, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_99, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_99_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(100, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_100, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_100_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(101, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_101, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_101_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(102, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_102, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_102_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(103, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_103, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_103_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(104, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_104, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_104_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(105, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_105, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_105_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(106, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_106, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_106_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(107, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_107, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_107_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(108, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_108, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_108_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(109, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_109, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_109_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(110, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_110, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_110_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(111, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_111, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_111_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(112, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_112, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_112_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(113, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_113, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_113_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(114, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_114, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_114_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(115, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_115, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_115_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(116, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_116, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_116_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(117, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_117, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_117_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(118, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_118, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_118_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(119, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_119, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_119_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(120, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_120, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_120_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(121, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_121, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_121_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(122, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_122, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_122_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(123, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_123, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_123_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(124, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_124, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_124_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(125, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_125, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_125_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(126, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_126, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_126_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(127, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_127, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_127_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(128, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_128, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_128_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(129, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_129, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_129_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(130, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_130, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_130_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(131, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_131, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_131_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(132, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_132, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_132_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(133, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_133, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_133_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(134, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_134, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_134_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(135, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_135, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_135_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(136, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_136, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_136_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(137, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_137, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_137_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(138, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_138, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_138_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(139, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_139, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_139_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(140, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_140, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_140_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(141, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_141, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_141_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(142, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_142, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_142_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(143, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_143, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_143_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(144, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_144, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_144_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(145, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_145, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_145_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(146, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_146, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_146_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(147, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_147, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_147_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(148, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_148, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_148_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(149, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_149, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_149_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(150, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_150, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_150_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(151, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_151, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_151_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(152, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_152, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_152_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(153, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_153, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_153_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(154, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_154, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_154_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(155, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_155, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_155_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(156, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_156, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_156_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(157, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_157, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_157_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(158, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_158, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_158_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(159, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_159, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_159_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(160, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_160, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_160_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(161, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_161, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_161_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(162, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_162, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_162_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(163, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_163, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_163_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(164, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_164, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_164_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(165, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_165, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_165_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(166, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_166, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_166_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(167, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_167, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_167_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(168, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_168, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_168_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(169, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_169, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_169_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(170, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_170, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_170_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(171, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_171, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_171_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(172, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_172, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_172_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(173, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_173, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_173_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(174, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_174, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_174_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(175, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_175, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_175_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(176, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_176, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_176_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(177, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_177, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_177_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(178, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_178, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_178_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(179, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_179, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_179_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(180, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_180, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_180_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(181, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_181, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_181_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(182, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_182, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_182_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(183, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_183, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_183_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(184, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_184, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_184_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(185, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_185, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_185_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(186, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_186, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_186_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(187, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_187, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_187_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(188, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_188, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_188_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(189, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_189, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_189_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(190, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_190, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_190_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(191, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_191, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_191_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(192, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_192, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_192_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(193, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_193, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_193_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(194, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_194, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_194_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(195, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_195, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_195_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(196, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_196, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_196_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(197, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_197, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_197_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(198, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_198, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_198_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(199, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_199, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_199_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(200, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_200, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_200_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(201, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_201, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_201_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(202, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_202, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_202_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(203, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_203, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_203_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(204, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_204, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_204_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(205, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_205, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_205_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(206, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_206, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_206_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(207, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_207, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_207_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(208, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_208, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_208_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(209, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_209, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_209_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(210, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_210, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_210_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(211, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_211, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_211_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(212, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_212, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_212_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(213, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_213, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_213_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(214, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_214, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_214_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(215, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_215, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_215_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(216, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_216, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_216_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(217, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_217, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_217_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(218, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_218, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_218_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(219, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_219, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_219_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(220, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_220, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_220_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(221, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_221, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_221_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(222, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_222, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_222_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(223, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_223, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_223_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(224, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_224, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_224_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(225, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_225, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_225_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(226, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_226, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_226_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(227, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_227, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_227_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(228, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_228, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_228_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(229, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_229, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_229_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(230, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_230, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_230_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(231, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_231, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_231_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(232, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_232, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_232_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(233, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_233, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_233_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(234, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_234, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_234_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(235, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_235, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_235_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(236, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_236, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_236_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(237, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_237, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_237_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(238, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_238, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_238_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(239, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_239, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_239_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(240, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_240, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_240_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(241, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_241, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_241_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(242, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_242, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_242_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(243, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_243, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_243_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(244, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_244, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_244_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(245, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_245, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_245_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(246, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_246, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_246_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(247, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_247, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_247_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(248, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_248, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_248_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(249, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_249, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_249_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(250, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_250, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_250_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(251, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_251, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_251_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(252, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_252, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_252_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(253, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_253, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_253_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(254, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_254, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_254_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(255, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_255, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_255_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(256, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_256, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# define BOOST_PP_LIST_FOLD_RIGHT_256_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(257, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_257, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) +# +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_NIL 1 +# +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_1(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_2(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_3(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_4(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_5(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_6(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_7(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_8(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_9(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_10(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_11(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_12(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_13(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_14(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_15(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_16(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_17(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_18(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_19(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_20(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_21(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_22(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_23(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_24(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_25(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_26(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_27(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_28(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_29(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_30(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_31(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_32(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_33(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_34(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_35(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_36(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_37(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_38(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_39(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_40(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_41(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_42(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_43(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_44(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_45(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_46(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_47(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_48(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_49(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_50(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_51(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_52(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_53(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_54(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_55(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_56(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_57(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_58(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_59(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_60(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_61(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_62(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_63(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_64(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_65(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_66(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_67(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_68(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_69(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_70(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_71(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_72(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_73(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_74(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_75(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_76(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_77(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_78(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_79(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_80(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_81(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_82(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_83(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_84(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_85(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_86(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_87(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_88(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_89(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_90(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_91(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_92(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_93(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_94(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_95(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_96(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_97(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_98(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_99(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_100(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_101(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_102(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_103(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_104(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_105(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_106(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_107(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_108(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_109(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_110(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_111(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_112(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_113(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_114(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_115(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_116(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_117(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_118(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_119(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_120(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_121(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_122(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_123(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_124(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_125(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_126(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_127(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_128(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_129(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_130(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_131(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_132(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_133(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_134(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_135(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_136(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_137(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_138(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_139(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_140(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_141(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_142(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_143(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_144(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_145(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_146(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_147(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_148(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_149(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_150(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_151(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_152(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_153(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_154(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_155(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_156(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_157(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_158(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_159(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_160(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_161(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_162(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_163(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_164(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_165(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_166(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_167(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_168(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_169(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_170(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_171(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_172(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_173(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_174(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_175(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_176(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_177(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_178(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_179(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_180(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_181(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_182(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_183(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_184(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_185(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_186(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_187(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_188(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_189(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_190(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_191(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_192(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_193(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_194(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_195(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_196(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_197(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_198(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_199(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_200(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_201(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_202(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_203(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_204(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_205(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_206(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_207(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_208(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_209(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_210(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_211(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_212(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_213(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_214(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_215(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_216(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_217(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_218(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_219(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_220(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_221(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_222(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_223(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_224(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_225(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_226(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_227(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_228(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_229(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_230(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_231(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_232(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_233(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_234(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_235(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_236(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_237(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_238(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_239(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_240(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_241(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_242(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_243(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_244(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_245(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_246(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_247(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_248(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_249(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_250(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_251(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_252(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_253(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_254(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_255(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_256(o, s, l) 0 +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/list/detail/fold_left.hpp b/ThirdParty/boost-Subset/boost/preprocessor/list/detail/fold_left.hpp new file mode 100644 index 0000000000..f5fcab7335 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/list/detail/fold_left.hpp @@ -0,0 +1,279 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LIST_DETAIL_FOLD_LEFT_HPP +# define BOOST_PREPROCESSOR_LIST_DETAIL_FOLD_LEFT_HPP +# +# include +# include +# include +# include +# +# define BOOST_PP_LIST_FOLD_LEFT_1(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_2, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(2, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_2(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_3, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(3, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_3(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_4, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(4, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_4(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_5, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(5, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_5(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_6, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(6, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_6(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_7, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(7, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_7(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_8, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(8, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_8(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_9, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(9, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_9(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_10, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(10, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_10(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_11, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(11, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_11(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_12, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(12, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_12(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_13, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(13, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_13(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_14, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(14, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_14(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_15, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(15, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_15(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_16, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(16, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_16(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_17, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(17, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_17(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_18, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(18, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_18(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_19, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(19, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_19(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_20, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(20, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_20(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_21, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(21, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_21(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_22, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(22, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_22(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_23, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(23, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_23(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_24, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(24, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_24(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_25, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(25, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_25(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_26, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(26, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_26(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_27, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(27, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_27(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_28, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(28, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_28(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_29, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(29, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_29(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_30, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(30, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_30(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_31, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(31, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_31(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_32, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(32, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_32(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_33, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(33, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_33(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_34, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(34, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_34(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_35, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(35, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_35(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_36, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(36, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_36(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_37, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(37, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_37(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_38, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(38, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_38(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_39, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(39, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_39(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_40, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(40, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_40(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_41, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(41, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_41(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_42, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(42, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_42(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_43, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(43, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_43(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_44, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(44, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_44(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_45, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(45, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_45(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_46, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(46, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_46(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_47, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(47, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_47(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_48, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(48, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_48(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_49, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(49, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_49(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_50, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(50, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_50(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_51, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(51, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_51(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_52, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(52, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_52(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_53, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(53, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_53(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_54, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(54, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_54(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_55, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(55, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_55(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_56, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(56, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_56(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_57, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(57, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_57(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_58, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(58, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_58(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_59, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(59, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_59(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_60, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(60, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_60(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_61, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(61, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_61(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_62, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(62, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_62(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_63, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(63, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_63(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_64, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(64, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_64(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_65, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(65, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_65(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_66, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(66, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_66(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_67, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(67, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_67(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_68, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(68, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_68(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_69, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(69, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_69(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_70, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(70, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_70(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_71, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(71, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_71(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_72, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(72, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_72(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_73, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(73, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_73(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_74, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(74, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_74(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_75, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(75, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_75(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_76, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(76, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_76(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_77, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(77, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_77(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_78, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(78, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_78(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_79, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(79, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_79(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_80, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(80, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_80(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_81, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(81, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_81(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_82, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(82, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_82(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_83, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(83, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_83(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_84, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(84, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_84(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_85, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(85, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_85(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_86, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(86, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_86(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_87, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(87, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_87(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_88, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(88, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_88(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_89, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(89, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_89(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_90, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(90, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_90(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_91, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(91, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_91(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_92, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(92, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_92(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_93, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(93, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_93(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_94, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(94, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_94(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_95, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(95, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_95(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_96, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(96, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_96(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_97, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(97, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_97(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_98, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(98, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_98(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_99, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(99, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_99(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_100, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(100, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_100(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_101, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(101, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_101(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_102, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(102, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_102(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_103, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(103, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_103(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_104, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(104, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_104(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_105, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(105, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_105(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_106, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(106, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_106(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_107, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(107, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_107(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_108, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(108, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_108(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_109, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(109, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_109(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_110, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(110, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_110(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_111, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(111, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_111(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_112, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(112, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_112(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_113, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(113, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_113(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_114, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(114, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_114(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_115, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(115, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_115(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_116, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(116, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_116(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_117, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(117, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_117(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_118, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(118, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_118(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_119, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(119, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_119(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_120, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(120, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_120(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_121, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(121, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_121(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_122, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(122, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_122(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_123, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(123, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_123(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_124, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(124, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_124(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_125, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(125, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_125(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_126, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(126, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_126(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_127, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(127, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_127(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_128, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(128, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_128(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_129, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(129, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_129(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_130, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(130, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_130(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_131, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(131, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_131(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_132, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(132, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_132(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_133, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(133, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_133(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_134, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(134, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_134(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_135, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(135, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_135(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_136, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(136, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_136(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_137, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(137, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_137(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_138, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(138, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_138(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_139, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(139, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_139(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_140, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(140, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_140(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_141, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(141, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_141(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_142, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(142, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_142(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_143, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(143, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_143(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_144, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(144, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_144(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_145, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(145, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_145(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_146, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(146, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_146(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_147, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(147, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_147(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_148, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(148, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_148(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_149, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(149, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_149(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_150, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(150, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_150(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_151, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(151, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_151(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_152, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(152, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_152(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_153, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(153, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_153(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_154, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(154, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_154(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_155, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(155, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_155(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_156, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(156, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_156(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_157, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(157, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_157(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_158, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(158, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_158(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_159, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(159, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_159(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_160, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(160, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_160(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_161, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(161, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_161(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_162, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(162, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_162(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_163, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(163, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_163(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_164, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(164, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_164(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_165, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(165, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_165(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_166, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(166, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_166(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_167, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(167, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_167(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_168, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(168, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_168(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_169, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(169, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_169(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_170, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(170, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_170(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_171, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(171, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_171(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_172, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(172, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_172(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_173, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(173, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_173(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_174, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(174, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_174(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_175, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(175, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_175(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_176, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(176, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_176(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_177, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(177, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_177(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_178, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(178, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_178(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_179, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(179, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_179(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_180, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(180, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_180(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_181, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(181, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_181(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_182, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(182, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_182(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_183, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(183, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_183(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_184, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(184, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_184(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_185, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(185, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_185(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_186, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(186, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_186(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_187, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(187, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_187(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_188, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(188, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_188(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_189, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(189, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_189(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_190, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(190, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_190(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_191, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(191, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_191(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_192, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(192, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_192(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_193, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(193, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_193(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_194, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(194, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_194(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_195, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(195, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_195(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_196, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(196, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_196(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_197, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(197, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_197(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_198, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(198, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_198(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_199, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(199, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_199(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_200, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(200, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_200(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_201, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(201, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_201(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_202, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(202, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_202(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_203, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(203, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_203(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_204, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(204, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_204(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_205, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(205, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_205(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_206, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(206, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_206(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_207, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(207, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_207(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_208, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(208, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_208(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_209, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(209, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_209(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_210, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(210, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_210(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_211, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(211, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_211(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_212, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(212, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_212(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_213, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(213, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_213(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_214, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(214, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_214(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_215, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(215, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_215(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_216, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(216, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_216(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_217, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(217, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_217(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_218, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(218, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_218(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_219, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(219, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_219(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_220, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(220, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_220(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_221, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(221, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_221(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_222, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(222, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_222(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_223, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(223, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_223(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_224, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(224, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_224(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_225, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(225, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_225(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_226, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(226, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_226(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_227, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(227, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_227(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_228, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(228, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_228(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_229, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(229, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_229(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_230, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(230, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_230(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_231, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(231, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_231(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_232, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(232, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_232(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_233, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(233, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_233(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_234, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(234, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_234(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_235, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(235, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_235(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_236, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(236, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_236(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_237, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(237, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_237(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_238, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(238, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_238(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_239, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(239, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_239(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_240, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(240, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_240(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_241, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(241, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_241(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_242, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(242, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_242(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_243, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(243, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_243(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_244, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(244, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_244(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_245, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(245, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_245(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_246, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(246, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_246(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_247, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(247, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_247(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_248, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(248, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_248(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_249, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(249, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_249(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_250, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(250, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_250(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_251, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(251, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_251(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_252, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(252, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_252(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_253, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(253, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_253(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_254, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(254, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_254(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_255, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(255, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_255(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_256, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(256, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# define BOOST_PP_LIST_FOLD_LEFT_256(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_257, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(257, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/list/detail/fold_right.hpp b/ThirdParty/boost-Subset/boost/preprocessor/list/detail/fold_right.hpp new file mode 100644 index 0000000000..29146d504b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/list/detail/fold_right.hpp @@ -0,0 +1,277 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LIST_DETAIL_FOLD_RIGHT_HPP +# define BOOST_PREPROCESSOR_LIST_DETAIL_FOLD_RIGHT_HPP +# +# include +# include +# +# define BOOST_PP_LIST_FOLD_RIGHT_1(o, s, l) BOOST_PP_LIST_FOLD_LEFT_1(o, s, BOOST_PP_LIST_REVERSE_D(1, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_2(o, s, l) BOOST_PP_LIST_FOLD_LEFT_2(o, s, BOOST_PP_LIST_REVERSE_D(2, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_3(o, s, l) BOOST_PP_LIST_FOLD_LEFT_3(o, s, BOOST_PP_LIST_REVERSE_D(3, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_4(o, s, l) BOOST_PP_LIST_FOLD_LEFT_4(o, s, BOOST_PP_LIST_REVERSE_D(4, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_5(o, s, l) BOOST_PP_LIST_FOLD_LEFT_5(o, s, BOOST_PP_LIST_REVERSE_D(5, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_6(o, s, l) BOOST_PP_LIST_FOLD_LEFT_6(o, s, BOOST_PP_LIST_REVERSE_D(6, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_7(o, s, l) BOOST_PP_LIST_FOLD_LEFT_7(o, s, BOOST_PP_LIST_REVERSE_D(7, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_8(o, s, l) BOOST_PP_LIST_FOLD_LEFT_8(o, s, BOOST_PP_LIST_REVERSE_D(8, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_9(o, s, l) BOOST_PP_LIST_FOLD_LEFT_9(o, s, BOOST_PP_LIST_REVERSE_D(9, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_10(o, s, l) BOOST_PP_LIST_FOLD_LEFT_10(o, s, BOOST_PP_LIST_REVERSE_D(10, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_11(o, s, l) BOOST_PP_LIST_FOLD_LEFT_11(o, s, BOOST_PP_LIST_REVERSE_D(11, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_12(o, s, l) BOOST_PP_LIST_FOLD_LEFT_12(o, s, BOOST_PP_LIST_REVERSE_D(12, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_13(o, s, l) BOOST_PP_LIST_FOLD_LEFT_13(o, s, BOOST_PP_LIST_REVERSE_D(13, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_14(o, s, l) BOOST_PP_LIST_FOLD_LEFT_14(o, s, BOOST_PP_LIST_REVERSE_D(14, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_15(o, s, l) BOOST_PP_LIST_FOLD_LEFT_15(o, s, BOOST_PP_LIST_REVERSE_D(15, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_16(o, s, l) BOOST_PP_LIST_FOLD_LEFT_16(o, s, BOOST_PP_LIST_REVERSE_D(16, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_17(o, s, l) BOOST_PP_LIST_FOLD_LEFT_17(o, s, BOOST_PP_LIST_REVERSE_D(17, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_18(o, s, l) BOOST_PP_LIST_FOLD_LEFT_18(o, s, BOOST_PP_LIST_REVERSE_D(18, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_19(o, s, l) BOOST_PP_LIST_FOLD_LEFT_19(o, s, BOOST_PP_LIST_REVERSE_D(19, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_20(o, s, l) BOOST_PP_LIST_FOLD_LEFT_20(o, s, BOOST_PP_LIST_REVERSE_D(20, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_21(o, s, l) BOOST_PP_LIST_FOLD_LEFT_21(o, s, BOOST_PP_LIST_REVERSE_D(21, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_22(o, s, l) BOOST_PP_LIST_FOLD_LEFT_22(o, s, BOOST_PP_LIST_REVERSE_D(22, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_23(o, s, l) BOOST_PP_LIST_FOLD_LEFT_23(o, s, BOOST_PP_LIST_REVERSE_D(23, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_24(o, s, l) BOOST_PP_LIST_FOLD_LEFT_24(o, s, BOOST_PP_LIST_REVERSE_D(24, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_25(o, s, l) BOOST_PP_LIST_FOLD_LEFT_25(o, s, BOOST_PP_LIST_REVERSE_D(25, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_26(o, s, l) BOOST_PP_LIST_FOLD_LEFT_26(o, s, BOOST_PP_LIST_REVERSE_D(26, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_27(o, s, l) BOOST_PP_LIST_FOLD_LEFT_27(o, s, BOOST_PP_LIST_REVERSE_D(27, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_28(o, s, l) BOOST_PP_LIST_FOLD_LEFT_28(o, s, BOOST_PP_LIST_REVERSE_D(28, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_29(o, s, l) BOOST_PP_LIST_FOLD_LEFT_29(o, s, BOOST_PP_LIST_REVERSE_D(29, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_30(o, s, l) BOOST_PP_LIST_FOLD_LEFT_30(o, s, BOOST_PP_LIST_REVERSE_D(30, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_31(o, s, l) BOOST_PP_LIST_FOLD_LEFT_31(o, s, BOOST_PP_LIST_REVERSE_D(31, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_32(o, s, l) BOOST_PP_LIST_FOLD_LEFT_32(o, s, BOOST_PP_LIST_REVERSE_D(32, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_33(o, s, l) BOOST_PP_LIST_FOLD_LEFT_33(o, s, BOOST_PP_LIST_REVERSE_D(33, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_34(o, s, l) BOOST_PP_LIST_FOLD_LEFT_34(o, s, BOOST_PP_LIST_REVERSE_D(34, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_35(o, s, l) BOOST_PP_LIST_FOLD_LEFT_35(o, s, BOOST_PP_LIST_REVERSE_D(35, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_36(o, s, l) BOOST_PP_LIST_FOLD_LEFT_36(o, s, BOOST_PP_LIST_REVERSE_D(36, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_37(o, s, l) BOOST_PP_LIST_FOLD_LEFT_37(o, s, BOOST_PP_LIST_REVERSE_D(37, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_38(o, s, l) BOOST_PP_LIST_FOLD_LEFT_38(o, s, BOOST_PP_LIST_REVERSE_D(38, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_39(o, s, l) BOOST_PP_LIST_FOLD_LEFT_39(o, s, BOOST_PP_LIST_REVERSE_D(39, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_40(o, s, l) BOOST_PP_LIST_FOLD_LEFT_40(o, s, BOOST_PP_LIST_REVERSE_D(40, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_41(o, s, l) BOOST_PP_LIST_FOLD_LEFT_41(o, s, BOOST_PP_LIST_REVERSE_D(41, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_42(o, s, l) BOOST_PP_LIST_FOLD_LEFT_42(o, s, BOOST_PP_LIST_REVERSE_D(42, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_43(o, s, l) BOOST_PP_LIST_FOLD_LEFT_43(o, s, BOOST_PP_LIST_REVERSE_D(43, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_44(o, s, l) BOOST_PP_LIST_FOLD_LEFT_44(o, s, BOOST_PP_LIST_REVERSE_D(44, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_45(o, s, l) BOOST_PP_LIST_FOLD_LEFT_45(o, s, BOOST_PP_LIST_REVERSE_D(45, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_46(o, s, l) BOOST_PP_LIST_FOLD_LEFT_46(o, s, BOOST_PP_LIST_REVERSE_D(46, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_47(o, s, l) BOOST_PP_LIST_FOLD_LEFT_47(o, s, BOOST_PP_LIST_REVERSE_D(47, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_48(o, s, l) BOOST_PP_LIST_FOLD_LEFT_48(o, s, BOOST_PP_LIST_REVERSE_D(48, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_49(o, s, l) BOOST_PP_LIST_FOLD_LEFT_49(o, s, BOOST_PP_LIST_REVERSE_D(49, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_50(o, s, l) BOOST_PP_LIST_FOLD_LEFT_50(o, s, BOOST_PP_LIST_REVERSE_D(50, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_51(o, s, l) BOOST_PP_LIST_FOLD_LEFT_51(o, s, BOOST_PP_LIST_REVERSE_D(51, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_52(o, s, l) BOOST_PP_LIST_FOLD_LEFT_52(o, s, BOOST_PP_LIST_REVERSE_D(52, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_53(o, s, l) BOOST_PP_LIST_FOLD_LEFT_53(o, s, BOOST_PP_LIST_REVERSE_D(53, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_54(o, s, l) BOOST_PP_LIST_FOLD_LEFT_54(o, s, BOOST_PP_LIST_REVERSE_D(54, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_55(o, s, l) BOOST_PP_LIST_FOLD_LEFT_55(o, s, BOOST_PP_LIST_REVERSE_D(55, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_56(o, s, l) BOOST_PP_LIST_FOLD_LEFT_56(o, s, BOOST_PP_LIST_REVERSE_D(56, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_57(o, s, l) BOOST_PP_LIST_FOLD_LEFT_57(o, s, BOOST_PP_LIST_REVERSE_D(57, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_58(o, s, l) BOOST_PP_LIST_FOLD_LEFT_58(o, s, BOOST_PP_LIST_REVERSE_D(58, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_59(o, s, l) BOOST_PP_LIST_FOLD_LEFT_59(o, s, BOOST_PP_LIST_REVERSE_D(59, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_60(o, s, l) BOOST_PP_LIST_FOLD_LEFT_60(o, s, BOOST_PP_LIST_REVERSE_D(60, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_61(o, s, l) BOOST_PP_LIST_FOLD_LEFT_61(o, s, BOOST_PP_LIST_REVERSE_D(61, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_62(o, s, l) BOOST_PP_LIST_FOLD_LEFT_62(o, s, BOOST_PP_LIST_REVERSE_D(62, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_63(o, s, l) BOOST_PP_LIST_FOLD_LEFT_63(o, s, BOOST_PP_LIST_REVERSE_D(63, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_64(o, s, l) BOOST_PP_LIST_FOLD_LEFT_64(o, s, BOOST_PP_LIST_REVERSE_D(64, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_65(o, s, l) BOOST_PP_LIST_FOLD_LEFT_65(o, s, BOOST_PP_LIST_REVERSE_D(65, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_66(o, s, l) BOOST_PP_LIST_FOLD_LEFT_66(o, s, BOOST_PP_LIST_REVERSE_D(66, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_67(o, s, l) BOOST_PP_LIST_FOLD_LEFT_67(o, s, BOOST_PP_LIST_REVERSE_D(67, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_68(o, s, l) BOOST_PP_LIST_FOLD_LEFT_68(o, s, BOOST_PP_LIST_REVERSE_D(68, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_69(o, s, l) BOOST_PP_LIST_FOLD_LEFT_69(o, s, BOOST_PP_LIST_REVERSE_D(69, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_70(o, s, l) BOOST_PP_LIST_FOLD_LEFT_70(o, s, BOOST_PP_LIST_REVERSE_D(70, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_71(o, s, l) BOOST_PP_LIST_FOLD_LEFT_71(o, s, BOOST_PP_LIST_REVERSE_D(71, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_72(o, s, l) BOOST_PP_LIST_FOLD_LEFT_72(o, s, BOOST_PP_LIST_REVERSE_D(72, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_73(o, s, l) BOOST_PP_LIST_FOLD_LEFT_73(o, s, BOOST_PP_LIST_REVERSE_D(73, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_74(o, s, l) BOOST_PP_LIST_FOLD_LEFT_74(o, s, BOOST_PP_LIST_REVERSE_D(74, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_75(o, s, l) BOOST_PP_LIST_FOLD_LEFT_75(o, s, BOOST_PP_LIST_REVERSE_D(75, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_76(o, s, l) BOOST_PP_LIST_FOLD_LEFT_76(o, s, BOOST_PP_LIST_REVERSE_D(76, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_77(o, s, l) BOOST_PP_LIST_FOLD_LEFT_77(o, s, BOOST_PP_LIST_REVERSE_D(77, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_78(o, s, l) BOOST_PP_LIST_FOLD_LEFT_78(o, s, BOOST_PP_LIST_REVERSE_D(78, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_79(o, s, l) BOOST_PP_LIST_FOLD_LEFT_79(o, s, BOOST_PP_LIST_REVERSE_D(79, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_80(o, s, l) BOOST_PP_LIST_FOLD_LEFT_80(o, s, BOOST_PP_LIST_REVERSE_D(80, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_81(o, s, l) BOOST_PP_LIST_FOLD_LEFT_81(o, s, BOOST_PP_LIST_REVERSE_D(81, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_82(o, s, l) BOOST_PP_LIST_FOLD_LEFT_82(o, s, BOOST_PP_LIST_REVERSE_D(82, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_83(o, s, l) BOOST_PP_LIST_FOLD_LEFT_83(o, s, BOOST_PP_LIST_REVERSE_D(83, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_84(o, s, l) BOOST_PP_LIST_FOLD_LEFT_84(o, s, BOOST_PP_LIST_REVERSE_D(84, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_85(o, s, l) BOOST_PP_LIST_FOLD_LEFT_85(o, s, BOOST_PP_LIST_REVERSE_D(85, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_86(o, s, l) BOOST_PP_LIST_FOLD_LEFT_86(o, s, BOOST_PP_LIST_REVERSE_D(86, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_87(o, s, l) BOOST_PP_LIST_FOLD_LEFT_87(o, s, BOOST_PP_LIST_REVERSE_D(87, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_88(o, s, l) BOOST_PP_LIST_FOLD_LEFT_88(o, s, BOOST_PP_LIST_REVERSE_D(88, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_89(o, s, l) BOOST_PP_LIST_FOLD_LEFT_89(o, s, BOOST_PP_LIST_REVERSE_D(89, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_90(o, s, l) BOOST_PP_LIST_FOLD_LEFT_90(o, s, BOOST_PP_LIST_REVERSE_D(90, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_91(o, s, l) BOOST_PP_LIST_FOLD_LEFT_91(o, s, BOOST_PP_LIST_REVERSE_D(91, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_92(o, s, l) BOOST_PP_LIST_FOLD_LEFT_92(o, s, BOOST_PP_LIST_REVERSE_D(92, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_93(o, s, l) BOOST_PP_LIST_FOLD_LEFT_93(o, s, BOOST_PP_LIST_REVERSE_D(93, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_94(o, s, l) BOOST_PP_LIST_FOLD_LEFT_94(o, s, BOOST_PP_LIST_REVERSE_D(94, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_95(o, s, l) BOOST_PP_LIST_FOLD_LEFT_95(o, s, BOOST_PP_LIST_REVERSE_D(95, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_96(o, s, l) BOOST_PP_LIST_FOLD_LEFT_96(o, s, BOOST_PP_LIST_REVERSE_D(96, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_97(o, s, l) BOOST_PP_LIST_FOLD_LEFT_97(o, s, BOOST_PP_LIST_REVERSE_D(97, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_98(o, s, l) BOOST_PP_LIST_FOLD_LEFT_98(o, s, BOOST_PP_LIST_REVERSE_D(98, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_99(o, s, l) BOOST_PP_LIST_FOLD_LEFT_99(o, s, BOOST_PP_LIST_REVERSE_D(99, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_100(o, s, l) BOOST_PP_LIST_FOLD_LEFT_100(o, s, BOOST_PP_LIST_REVERSE_D(100, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_101(o, s, l) BOOST_PP_LIST_FOLD_LEFT_101(o, s, BOOST_PP_LIST_REVERSE_D(101, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_102(o, s, l) BOOST_PP_LIST_FOLD_LEFT_102(o, s, BOOST_PP_LIST_REVERSE_D(102, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_103(o, s, l) BOOST_PP_LIST_FOLD_LEFT_103(o, s, BOOST_PP_LIST_REVERSE_D(103, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_104(o, s, l) BOOST_PP_LIST_FOLD_LEFT_104(o, s, BOOST_PP_LIST_REVERSE_D(104, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_105(o, s, l) BOOST_PP_LIST_FOLD_LEFT_105(o, s, BOOST_PP_LIST_REVERSE_D(105, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_106(o, s, l) BOOST_PP_LIST_FOLD_LEFT_106(o, s, BOOST_PP_LIST_REVERSE_D(106, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_107(o, s, l) BOOST_PP_LIST_FOLD_LEFT_107(o, s, BOOST_PP_LIST_REVERSE_D(107, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_108(o, s, l) BOOST_PP_LIST_FOLD_LEFT_108(o, s, BOOST_PP_LIST_REVERSE_D(108, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_109(o, s, l) BOOST_PP_LIST_FOLD_LEFT_109(o, s, BOOST_PP_LIST_REVERSE_D(109, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_110(o, s, l) BOOST_PP_LIST_FOLD_LEFT_110(o, s, BOOST_PP_LIST_REVERSE_D(110, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_111(o, s, l) BOOST_PP_LIST_FOLD_LEFT_111(o, s, BOOST_PP_LIST_REVERSE_D(111, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_112(o, s, l) BOOST_PP_LIST_FOLD_LEFT_112(o, s, BOOST_PP_LIST_REVERSE_D(112, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_113(o, s, l) BOOST_PP_LIST_FOLD_LEFT_113(o, s, BOOST_PP_LIST_REVERSE_D(113, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_114(o, s, l) BOOST_PP_LIST_FOLD_LEFT_114(o, s, BOOST_PP_LIST_REVERSE_D(114, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_115(o, s, l) BOOST_PP_LIST_FOLD_LEFT_115(o, s, BOOST_PP_LIST_REVERSE_D(115, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_116(o, s, l) BOOST_PP_LIST_FOLD_LEFT_116(o, s, BOOST_PP_LIST_REVERSE_D(116, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_117(o, s, l) BOOST_PP_LIST_FOLD_LEFT_117(o, s, BOOST_PP_LIST_REVERSE_D(117, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_118(o, s, l) BOOST_PP_LIST_FOLD_LEFT_118(o, s, BOOST_PP_LIST_REVERSE_D(118, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_119(o, s, l) BOOST_PP_LIST_FOLD_LEFT_119(o, s, BOOST_PP_LIST_REVERSE_D(119, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_120(o, s, l) BOOST_PP_LIST_FOLD_LEFT_120(o, s, BOOST_PP_LIST_REVERSE_D(120, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_121(o, s, l) BOOST_PP_LIST_FOLD_LEFT_121(o, s, BOOST_PP_LIST_REVERSE_D(121, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_122(o, s, l) BOOST_PP_LIST_FOLD_LEFT_122(o, s, BOOST_PP_LIST_REVERSE_D(122, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_123(o, s, l) BOOST_PP_LIST_FOLD_LEFT_123(o, s, BOOST_PP_LIST_REVERSE_D(123, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_124(o, s, l) BOOST_PP_LIST_FOLD_LEFT_124(o, s, BOOST_PP_LIST_REVERSE_D(124, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_125(o, s, l) BOOST_PP_LIST_FOLD_LEFT_125(o, s, BOOST_PP_LIST_REVERSE_D(125, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_126(o, s, l) BOOST_PP_LIST_FOLD_LEFT_126(o, s, BOOST_PP_LIST_REVERSE_D(126, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_127(o, s, l) BOOST_PP_LIST_FOLD_LEFT_127(o, s, BOOST_PP_LIST_REVERSE_D(127, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_128(o, s, l) BOOST_PP_LIST_FOLD_LEFT_128(o, s, BOOST_PP_LIST_REVERSE_D(128, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_129(o, s, l) BOOST_PP_LIST_FOLD_LEFT_129(o, s, BOOST_PP_LIST_REVERSE_D(129, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_130(o, s, l) BOOST_PP_LIST_FOLD_LEFT_130(o, s, BOOST_PP_LIST_REVERSE_D(130, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_131(o, s, l) BOOST_PP_LIST_FOLD_LEFT_131(o, s, BOOST_PP_LIST_REVERSE_D(131, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_132(o, s, l) BOOST_PP_LIST_FOLD_LEFT_132(o, s, BOOST_PP_LIST_REVERSE_D(132, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_133(o, s, l) BOOST_PP_LIST_FOLD_LEFT_133(o, s, BOOST_PP_LIST_REVERSE_D(133, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_134(o, s, l) BOOST_PP_LIST_FOLD_LEFT_134(o, s, BOOST_PP_LIST_REVERSE_D(134, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_135(o, s, l) BOOST_PP_LIST_FOLD_LEFT_135(o, s, BOOST_PP_LIST_REVERSE_D(135, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_136(o, s, l) BOOST_PP_LIST_FOLD_LEFT_136(o, s, BOOST_PP_LIST_REVERSE_D(136, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_137(o, s, l) BOOST_PP_LIST_FOLD_LEFT_137(o, s, BOOST_PP_LIST_REVERSE_D(137, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_138(o, s, l) BOOST_PP_LIST_FOLD_LEFT_138(o, s, BOOST_PP_LIST_REVERSE_D(138, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_139(o, s, l) BOOST_PP_LIST_FOLD_LEFT_139(o, s, BOOST_PP_LIST_REVERSE_D(139, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_140(o, s, l) BOOST_PP_LIST_FOLD_LEFT_140(o, s, BOOST_PP_LIST_REVERSE_D(140, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_141(o, s, l) BOOST_PP_LIST_FOLD_LEFT_141(o, s, BOOST_PP_LIST_REVERSE_D(141, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_142(o, s, l) BOOST_PP_LIST_FOLD_LEFT_142(o, s, BOOST_PP_LIST_REVERSE_D(142, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_143(o, s, l) BOOST_PP_LIST_FOLD_LEFT_143(o, s, BOOST_PP_LIST_REVERSE_D(143, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_144(o, s, l) BOOST_PP_LIST_FOLD_LEFT_144(o, s, BOOST_PP_LIST_REVERSE_D(144, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_145(o, s, l) BOOST_PP_LIST_FOLD_LEFT_145(o, s, BOOST_PP_LIST_REVERSE_D(145, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_146(o, s, l) BOOST_PP_LIST_FOLD_LEFT_146(o, s, BOOST_PP_LIST_REVERSE_D(146, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_147(o, s, l) BOOST_PP_LIST_FOLD_LEFT_147(o, s, BOOST_PP_LIST_REVERSE_D(147, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_148(o, s, l) BOOST_PP_LIST_FOLD_LEFT_148(o, s, BOOST_PP_LIST_REVERSE_D(148, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_149(o, s, l) BOOST_PP_LIST_FOLD_LEFT_149(o, s, BOOST_PP_LIST_REVERSE_D(149, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_150(o, s, l) BOOST_PP_LIST_FOLD_LEFT_150(o, s, BOOST_PP_LIST_REVERSE_D(150, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_151(o, s, l) BOOST_PP_LIST_FOLD_LEFT_151(o, s, BOOST_PP_LIST_REVERSE_D(151, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_152(o, s, l) BOOST_PP_LIST_FOLD_LEFT_152(o, s, BOOST_PP_LIST_REVERSE_D(152, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_153(o, s, l) BOOST_PP_LIST_FOLD_LEFT_153(o, s, BOOST_PP_LIST_REVERSE_D(153, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_154(o, s, l) BOOST_PP_LIST_FOLD_LEFT_154(o, s, BOOST_PP_LIST_REVERSE_D(154, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_155(o, s, l) BOOST_PP_LIST_FOLD_LEFT_155(o, s, BOOST_PP_LIST_REVERSE_D(155, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_156(o, s, l) BOOST_PP_LIST_FOLD_LEFT_156(o, s, BOOST_PP_LIST_REVERSE_D(156, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_157(o, s, l) BOOST_PP_LIST_FOLD_LEFT_157(o, s, BOOST_PP_LIST_REVERSE_D(157, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_158(o, s, l) BOOST_PP_LIST_FOLD_LEFT_158(o, s, BOOST_PP_LIST_REVERSE_D(158, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_159(o, s, l) BOOST_PP_LIST_FOLD_LEFT_159(o, s, BOOST_PP_LIST_REVERSE_D(159, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_160(o, s, l) BOOST_PP_LIST_FOLD_LEFT_160(o, s, BOOST_PP_LIST_REVERSE_D(160, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_161(o, s, l) BOOST_PP_LIST_FOLD_LEFT_161(o, s, BOOST_PP_LIST_REVERSE_D(161, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_162(o, s, l) BOOST_PP_LIST_FOLD_LEFT_162(o, s, BOOST_PP_LIST_REVERSE_D(162, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_163(o, s, l) BOOST_PP_LIST_FOLD_LEFT_163(o, s, BOOST_PP_LIST_REVERSE_D(163, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_164(o, s, l) BOOST_PP_LIST_FOLD_LEFT_164(o, s, BOOST_PP_LIST_REVERSE_D(164, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_165(o, s, l) BOOST_PP_LIST_FOLD_LEFT_165(o, s, BOOST_PP_LIST_REVERSE_D(165, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_166(o, s, l) BOOST_PP_LIST_FOLD_LEFT_166(o, s, BOOST_PP_LIST_REVERSE_D(166, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_167(o, s, l) BOOST_PP_LIST_FOLD_LEFT_167(o, s, BOOST_PP_LIST_REVERSE_D(167, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_168(o, s, l) BOOST_PP_LIST_FOLD_LEFT_168(o, s, BOOST_PP_LIST_REVERSE_D(168, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_169(o, s, l) BOOST_PP_LIST_FOLD_LEFT_169(o, s, BOOST_PP_LIST_REVERSE_D(169, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_170(o, s, l) BOOST_PP_LIST_FOLD_LEFT_170(o, s, BOOST_PP_LIST_REVERSE_D(170, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_171(o, s, l) BOOST_PP_LIST_FOLD_LEFT_171(o, s, BOOST_PP_LIST_REVERSE_D(171, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_172(o, s, l) BOOST_PP_LIST_FOLD_LEFT_172(o, s, BOOST_PP_LIST_REVERSE_D(172, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_173(o, s, l) BOOST_PP_LIST_FOLD_LEFT_173(o, s, BOOST_PP_LIST_REVERSE_D(173, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_174(o, s, l) BOOST_PP_LIST_FOLD_LEFT_174(o, s, BOOST_PP_LIST_REVERSE_D(174, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_175(o, s, l) BOOST_PP_LIST_FOLD_LEFT_175(o, s, BOOST_PP_LIST_REVERSE_D(175, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_176(o, s, l) BOOST_PP_LIST_FOLD_LEFT_176(o, s, BOOST_PP_LIST_REVERSE_D(176, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_177(o, s, l) BOOST_PP_LIST_FOLD_LEFT_177(o, s, BOOST_PP_LIST_REVERSE_D(177, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_178(o, s, l) BOOST_PP_LIST_FOLD_LEFT_178(o, s, BOOST_PP_LIST_REVERSE_D(178, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_179(o, s, l) BOOST_PP_LIST_FOLD_LEFT_179(o, s, BOOST_PP_LIST_REVERSE_D(179, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_180(o, s, l) BOOST_PP_LIST_FOLD_LEFT_180(o, s, BOOST_PP_LIST_REVERSE_D(180, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_181(o, s, l) BOOST_PP_LIST_FOLD_LEFT_181(o, s, BOOST_PP_LIST_REVERSE_D(181, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_182(o, s, l) BOOST_PP_LIST_FOLD_LEFT_182(o, s, BOOST_PP_LIST_REVERSE_D(182, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_183(o, s, l) BOOST_PP_LIST_FOLD_LEFT_183(o, s, BOOST_PP_LIST_REVERSE_D(183, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_184(o, s, l) BOOST_PP_LIST_FOLD_LEFT_184(o, s, BOOST_PP_LIST_REVERSE_D(184, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_185(o, s, l) BOOST_PP_LIST_FOLD_LEFT_185(o, s, BOOST_PP_LIST_REVERSE_D(185, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_186(o, s, l) BOOST_PP_LIST_FOLD_LEFT_186(o, s, BOOST_PP_LIST_REVERSE_D(186, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_187(o, s, l) BOOST_PP_LIST_FOLD_LEFT_187(o, s, BOOST_PP_LIST_REVERSE_D(187, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_188(o, s, l) BOOST_PP_LIST_FOLD_LEFT_188(o, s, BOOST_PP_LIST_REVERSE_D(188, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_189(o, s, l) BOOST_PP_LIST_FOLD_LEFT_189(o, s, BOOST_PP_LIST_REVERSE_D(189, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_190(o, s, l) BOOST_PP_LIST_FOLD_LEFT_190(o, s, BOOST_PP_LIST_REVERSE_D(190, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_191(o, s, l) BOOST_PP_LIST_FOLD_LEFT_191(o, s, BOOST_PP_LIST_REVERSE_D(191, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_192(o, s, l) BOOST_PP_LIST_FOLD_LEFT_192(o, s, BOOST_PP_LIST_REVERSE_D(192, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_193(o, s, l) BOOST_PP_LIST_FOLD_LEFT_193(o, s, BOOST_PP_LIST_REVERSE_D(193, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_194(o, s, l) BOOST_PP_LIST_FOLD_LEFT_194(o, s, BOOST_PP_LIST_REVERSE_D(194, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_195(o, s, l) BOOST_PP_LIST_FOLD_LEFT_195(o, s, BOOST_PP_LIST_REVERSE_D(195, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_196(o, s, l) BOOST_PP_LIST_FOLD_LEFT_196(o, s, BOOST_PP_LIST_REVERSE_D(196, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_197(o, s, l) BOOST_PP_LIST_FOLD_LEFT_197(o, s, BOOST_PP_LIST_REVERSE_D(197, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_198(o, s, l) BOOST_PP_LIST_FOLD_LEFT_198(o, s, BOOST_PP_LIST_REVERSE_D(198, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_199(o, s, l) BOOST_PP_LIST_FOLD_LEFT_199(o, s, BOOST_PP_LIST_REVERSE_D(199, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_200(o, s, l) BOOST_PP_LIST_FOLD_LEFT_200(o, s, BOOST_PP_LIST_REVERSE_D(200, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_201(o, s, l) BOOST_PP_LIST_FOLD_LEFT_201(o, s, BOOST_PP_LIST_REVERSE_D(201, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_202(o, s, l) BOOST_PP_LIST_FOLD_LEFT_202(o, s, BOOST_PP_LIST_REVERSE_D(202, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_203(o, s, l) BOOST_PP_LIST_FOLD_LEFT_203(o, s, BOOST_PP_LIST_REVERSE_D(203, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_204(o, s, l) BOOST_PP_LIST_FOLD_LEFT_204(o, s, BOOST_PP_LIST_REVERSE_D(204, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_205(o, s, l) BOOST_PP_LIST_FOLD_LEFT_205(o, s, BOOST_PP_LIST_REVERSE_D(205, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_206(o, s, l) BOOST_PP_LIST_FOLD_LEFT_206(o, s, BOOST_PP_LIST_REVERSE_D(206, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_207(o, s, l) BOOST_PP_LIST_FOLD_LEFT_207(o, s, BOOST_PP_LIST_REVERSE_D(207, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_208(o, s, l) BOOST_PP_LIST_FOLD_LEFT_208(o, s, BOOST_PP_LIST_REVERSE_D(208, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_209(o, s, l) BOOST_PP_LIST_FOLD_LEFT_209(o, s, BOOST_PP_LIST_REVERSE_D(209, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_210(o, s, l) BOOST_PP_LIST_FOLD_LEFT_210(o, s, BOOST_PP_LIST_REVERSE_D(210, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_211(o, s, l) BOOST_PP_LIST_FOLD_LEFT_211(o, s, BOOST_PP_LIST_REVERSE_D(211, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_212(o, s, l) BOOST_PP_LIST_FOLD_LEFT_212(o, s, BOOST_PP_LIST_REVERSE_D(212, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_213(o, s, l) BOOST_PP_LIST_FOLD_LEFT_213(o, s, BOOST_PP_LIST_REVERSE_D(213, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_214(o, s, l) BOOST_PP_LIST_FOLD_LEFT_214(o, s, BOOST_PP_LIST_REVERSE_D(214, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_215(o, s, l) BOOST_PP_LIST_FOLD_LEFT_215(o, s, BOOST_PP_LIST_REVERSE_D(215, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_216(o, s, l) BOOST_PP_LIST_FOLD_LEFT_216(o, s, BOOST_PP_LIST_REVERSE_D(216, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_217(o, s, l) BOOST_PP_LIST_FOLD_LEFT_217(o, s, BOOST_PP_LIST_REVERSE_D(217, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_218(o, s, l) BOOST_PP_LIST_FOLD_LEFT_218(o, s, BOOST_PP_LIST_REVERSE_D(218, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_219(o, s, l) BOOST_PP_LIST_FOLD_LEFT_219(o, s, BOOST_PP_LIST_REVERSE_D(219, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_220(o, s, l) BOOST_PP_LIST_FOLD_LEFT_220(o, s, BOOST_PP_LIST_REVERSE_D(220, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_221(o, s, l) BOOST_PP_LIST_FOLD_LEFT_221(o, s, BOOST_PP_LIST_REVERSE_D(221, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_222(o, s, l) BOOST_PP_LIST_FOLD_LEFT_222(o, s, BOOST_PP_LIST_REVERSE_D(222, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_223(o, s, l) BOOST_PP_LIST_FOLD_LEFT_223(o, s, BOOST_PP_LIST_REVERSE_D(223, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_224(o, s, l) BOOST_PP_LIST_FOLD_LEFT_224(o, s, BOOST_PP_LIST_REVERSE_D(224, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_225(o, s, l) BOOST_PP_LIST_FOLD_LEFT_225(o, s, BOOST_PP_LIST_REVERSE_D(225, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_226(o, s, l) BOOST_PP_LIST_FOLD_LEFT_226(o, s, BOOST_PP_LIST_REVERSE_D(226, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_227(o, s, l) BOOST_PP_LIST_FOLD_LEFT_227(o, s, BOOST_PP_LIST_REVERSE_D(227, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_228(o, s, l) BOOST_PP_LIST_FOLD_LEFT_228(o, s, BOOST_PP_LIST_REVERSE_D(228, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_229(o, s, l) BOOST_PP_LIST_FOLD_LEFT_229(o, s, BOOST_PP_LIST_REVERSE_D(229, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_230(o, s, l) BOOST_PP_LIST_FOLD_LEFT_230(o, s, BOOST_PP_LIST_REVERSE_D(230, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_231(o, s, l) BOOST_PP_LIST_FOLD_LEFT_231(o, s, BOOST_PP_LIST_REVERSE_D(231, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_232(o, s, l) BOOST_PP_LIST_FOLD_LEFT_232(o, s, BOOST_PP_LIST_REVERSE_D(232, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_233(o, s, l) BOOST_PP_LIST_FOLD_LEFT_233(o, s, BOOST_PP_LIST_REVERSE_D(233, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_234(o, s, l) BOOST_PP_LIST_FOLD_LEFT_234(o, s, BOOST_PP_LIST_REVERSE_D(234, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_235(o, s, l) BOOST_PP_LIST_FOLD_LEFT_235(o, s, BOOST_PP_LIST_REVERSE_D(235, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_236(o, s, l) BOOST_PP_LIST_FOLD_LEFT_236(o, s, BOOST_PP_LIST_REVERSE_D(236, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_237(o, s, l) BOOST_PP_LIST_FOLD_LEFT_237(o, s, BOOST_PP_LIST_REVERSE_D(237, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_238(o, s, l) BOOST_PP_LIST_FOLD_LEFT_238(o, s, BOOST_PP_LIST_REVERSE_D(238, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_239(o, s, l) BOOST_PP_LIST_FOLD_LEFT_239(o, s, BOOST_PP_LIST_REVERSE_D(239, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_240(o, s, l) BOOST_PP_LIST_FOLD_LEFT_240(o, s, BOOST_PP_LIST_REVERSE_D(240, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_241(o, s, l) BOOST_PP_LIST_FOLD_LEFT_241(o, s, BOOST_PP_LIST_REVERSE_D(241, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_242(o, s, l) BOOST_PP_LIST_FOLD_LEFT_242(o, s, BOOST_PP_LIST_REVERSE_D(242, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_243(o, s, l) BOOST_PP_LIST_FOLD_LEFT_243(o, s, BOOST_PP_LIST_REVERSE_D(243, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_244(o, s, l) BOOST_PP_LIST_FOLD_LEFT_244(o, s, BOOST_PP_LIST_REVERSE_D(244, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_245(o, s, l) BOOST_PP_LIST_FOLD_LEFT_245(o, s, BOOST_PP_LIST_REVERSE_D(245, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_246(o, s, l) BOOST_PP_LIST_FOLD_LEFT_246(o, s, BOOST_PP_LIST_REVERSE_D(246, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_247(o, s, l) BOOST_PP_LIST_FOLD_LEFT_247(o, s, BOOST_PP_LIST_REVERSE_D(247, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_248(o, s, l) BOOST_PP_LIST_FOLD_LEFT_248(o, s, BOOST_PP_LIST_REVERSE_D(248, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_249(o, s, l) BOOST_PP_LIST_FOLD_LEFT_249(o, s, BOOST_PP_LIST_REVERSE_D(249, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_250(o, s, l) BOOST_PP_LIST_FOLD_LEFT_250(o, s, BOOST_PP_LIST_REVERSE_D(250, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_251(o, s, l) BOOST_PP_LIST_FOLD_LEFT_251(o, s, BOOST_PP_LIST_REVERSE_D(251, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_252(o, s, l) BOOST_PP_LIST_FOLD_LEFT_252(o, s, BOOST_PP_LIST_REVERSE_D(252, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_253(o, s, l) BOOST_PP_LIST_FOLD_LEFT_253(o, s, BOOST_PP_LIST_REVERSE_D(253, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_254(o, s, l) BOOST_PP_LIST_FOLD_LEFT_254(o, s, BOOST_PP_LIST_REVERSE_D(254, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_255(o, s, l) BOOST_PP_LIST_FOLD_LEFT_255(o, s, BOOST_PP_LIST_REVERSE_D(255, l)) +# define BOOST_PP_LIST_FOLD_RIGHT_256(o, s, l) BOOST_PP_LIST_FOLD_LEFT_256(o, s, BOOST_PP_LIST_REVERSE_D(256, l)) +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/list/fold_left.hpp b/ThirdParty/boost-Subset/boost/preprocessor/list/fold_left.hpp new file mode 100644 index 0000000000..f235aec8e7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/list/fold_left.hpp @@ -0,0 +1,303 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LIST_FOLD_LEFT_HPP +# define BOOST_PREPROCESSOR_LIST_FOLD_LEFT_HPP +# +# include +# include +# include +# include +# +# /* BOOST_PP_LIST_FOLD_LEFT */ +# +# if 0 +# define BOOST_PP_LIST_FOLD_LEFT(op, state, list) +# endif +# +# define BOOST_PP_LIST_FOLD_LEFT BOOST_PP_CAT(BOOST_PP_LIST_FOLD_LEFT_, BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256)) +# +# define BOOST_PP_LIST_FOLD_LEFT_257(o, s, l) BOOST_PP_ERROR(0x0004) +# +# define BOOST_PP_LIST_FOLD_LEFT_D(d, o, s, l) BOOST_PP_LIST_FOLD_LEFT_ ## d(o, s, l) +# define BOOST_PP_LIST_FOLD_LEFT_2ND BOOST_PP_LIST_FOLD_LEFT +# define BOOST_PP_LIST_FOLD_LEFT_2ND_D BOOST_PP_LIST_FOLD_LEFT_D +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# include +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() +# include +# else +# include +# endif +# +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_NIL 1 +# +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_1(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_2(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_3(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_4(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_5(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_6(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_7(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_8(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_9(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_10(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_11(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_12(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_13(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_14(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_15(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_16(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_17(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_18(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_19(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_20(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_21(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_22(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_23(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_24(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_25(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_26(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_27(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_28(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_29(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_30(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_31(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_32(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_33(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_34(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_35(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_36(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_37(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_38(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_39(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_40(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_41(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_42(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_43(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_44(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_45(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_46(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_47(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_48(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_49(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_50(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_51(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_52(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_53(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_54(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_55(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_56(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_57(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_58(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_59(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_60(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_61(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_62(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_63(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_64(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_65(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_66(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_67(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_68(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_69(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_70(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_71(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_72(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_73(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_74(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_75(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_76(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_77(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_78(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_79(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_80(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_81(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_82(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_83(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_84(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_85(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_86(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_87(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_88(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_89(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_90(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_91(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_92(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_93(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_94(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_95(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_96(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_97(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_98(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_99(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_100(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_101(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_102(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_103(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_104(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_105(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_106(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_107(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_108(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_109(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_110(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_111(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_112(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_113(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_114(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_115(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_116(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_117(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_118(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_119(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_120(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_121(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_122(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_123(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_124(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_125(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_126(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_127(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_128(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_129(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_130(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_131(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_132(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_133(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_134(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_135(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_136(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_137(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_138(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_139(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_140(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_141(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_142(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_143(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_144(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_145(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_146(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_147(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_148(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_149(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_150(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_151(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_152(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_153(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_154(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_155(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_156(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_157(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_158(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_159(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_160(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_161(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_162(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_163(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_164(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_165(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_166(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_167(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_168(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_169(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_170(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_171(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_172(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_173(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_174(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_175(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_176(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_177(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_178(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_179(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_180(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_181(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_182(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_183(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_184(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_185(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_186(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_187(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_188(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_189(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_190(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_191(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_192(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_193(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_194(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_195(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_196(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_197(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_198(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_199(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_200(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_201(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_202(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_203(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_204(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_205(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_206(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_207(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_208(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_209(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_210(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_211(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_212(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_213(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_214(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_215(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_216(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_217(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_218(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_219(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_220(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_221(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_222(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_223(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_224(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_225(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_226(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_227(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_228(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_229(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_230(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_231(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_232(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_233(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_234(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_235(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_236(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_237(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_238(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_239(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_240(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_241(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_242(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_243(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_244(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_245(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_246(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_247(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_248(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_249(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_250(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_251(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_252(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_253(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_254(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_255(o, s, l) 0 +# define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_256(o, s, l) 0 +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/list/fold_right.hpp b/ThirdParty/boost-Subset/boost/preprocessor/list/fold_right.hpp new file mode 100644 index 0000000000..ce18afef28 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/list/fold_right.hpp @@ -0,0 +1,40 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LIST_FOLD_RIGHT_HPP +# define BOOST_PREPROCESSOR_LIST_FOLD_RIGHT_HPP +# +# include +# include +# include +# include +# +# if 0 +# define BOOST_PP_LIST_FOLD_RIGHT(op, state, list) +# endif +# +# define BOOST_PP_LIST_FOLD_RIGHT BOOST_PP_CAT(BOOST_PP_LIST_FOLD_RIGHT_, BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256)) +# +# define BOOST_PP_LIST_FOLD_RIGHT_257(o, s, l) BOOST_PP_ERROR(0x0004) +# +# define BOOST_PP_LIST_FOLD_RIGHT_D(d, o, s, l) BOOST_PP_LIST_FOLD_RIGHT_ ## d(o, s, l) +# define BOOST_PP_LIST_FOLD_RIGHT_2ND BOOST_PP_LIST_FOLD_RIGHT +# define BOOST_PP_LIST_FOLD_RIGHT_2ND_D BOOST_PP_LIST_FOLD_RIGHT_D +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# include +# else +# include +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/list/for_each_i.hpp b/ThirdParty/boost-Subset/boost/preprocessor/list/for_each_i.hpp new file mode 100644 index 0000000000..8f02e2e317 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/list/for_each_i.hpp @@ -0,0 +1,65 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LIST_LIST_FOR_EACH_I_HPP +# define BOOST_PREPROCESSOR_LIST_LIST_FOR_EACH_I_HPP +# +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_LIST_FOR_EACH_I */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_LIST_FOR_EACH_I(macro, data, list) BOOST_PP_FOR((macro, data, list, 0), BOOST_PP_LIST_FOR_EACH_I_P, BOOST_PP_LIST_FOR_EACH_I_O, BOOST_PP_LIST_FOR_EACH_I_M) +# else +# define BOOST_PP_LIST_FOR_EACH_I(macro, data, list) BOOST_PP_LIST_FOR_EACH_I_I(macro, data, list) +# define BOOST_PP_LIST_FOR_EACH_I_I(macro, data, list) BOOST_PP_FOR((macro, data, list, 0), BOOST_PP_LIST_FOR_EACH_I_P, BOOST_PP_LIST_FOR_EACH_I_O, BOOST_PP_LIST_FOR_EACH_I_M) +# endif +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() +# define BOOST_PP_LIST_FOR_EACH_I_P(r, x) BOOST_PP_LIST_FOR_EACH_I_P_D x +# define BOOST_PP_LIST_FOR_EACH_I_P_D(m, d, l, i) BOOST_PP_LIST_IS_CONS(l) +# else +# define BOOST_PP_LIST_FOR_EACH_I_P(r, x) BOOST_PP_LIST_IS_CONS(BOOST_PP_TUPLE_ELEM(4, 2, x)) +# endif +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_LIST_FOR_EACH_I_O(r, x) BOOST_PP_LIST_FOR_EACH_I_O_D x +# define BOOST_PP_LIST_FOR_EACH_I_O_D(m, d, l, i) (m, d, BOOST_PP_LIST_REST(l), BOOST_PP_INC(i)) +# else +# define BOOST_PP_LIST_FOR_EACH_I_O(r, x) (BOOST_PP_TUPLE_ELEM(4, 0, x), BOOST_PP_TUPLE_ELEM(4, 1, x), BOOST_PP_LIST_REST(BOOST_PP_TUPLE_ELEM(4, 2, x)), BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(4, 3, x))) +# endif +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_LIST_FOR_EACH_I_M(r, x) BOOST_PP_LIST_FOR_EACH_I_M_D(r, BOOST_PP_TUPLE_ELEM(4, 0, x), BOOST_PP_TUPLE_ELEM(4, 1, x), BOOST_PP_TUPLE_ELEM(4, 2, x), BOOST_PP_TUPLE_ELEM(4, 3, x)) +# else +# define BOOST_PP_LIST_FOR_EACH_I_M(r, x) BOOST_PP_LIST_FOR_EACH_I_M_I(r, BOOST_PP_TUPLE_REM_4 x) +# define BOOST_PP_LIST_FOR_EACH_I_M_I(r, x_e) BOOST_PP_LIST_FOR_EACH_I_M_D(r, x_e) +# endif +# +# define BOOST_PP_LIST_FOR_EACH_I_M_D(r, m, d, l, i) m(r, d, i, BOOST_PP_LIST_FIRST(l)) +# +# /* BOOST_PP_LIST_FOR_EACH_I_R */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_LIST_FOR_EACH_I_R(r, macro, data, list) BOOST_PP_FOR_ ## r((macro, data, list, 0), BOOST_PP_LIST_FOR_EACH_I_P, BOOST_PP_LIST_FOR_EACH_I_O, BOOST_PP_LIST_FOR_EACH_I_M) +# else +# define BOOST_PP_LIST_FOR_EACH_I_R(r, macro, data, list) BOOST_PP_LIST_FOR_EACH_I_R_I(r, macro, data, list) +# define BOOST_PP_LIST_FOR_EACH_I_R_I(r, macro, data, list) BOOST_PP_FOR_ ## r((macro, data, list, 0), BOOST_PP_LIST_FOR_EACH_I_P, BOOST_PP_LIST_FOR_EACH_I_O, BOOST_PP_LIST_FOR_EACH_I_M) +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/list/reverse.hpp b/ThirdParty/boost-Subset/boost/preprocessor/list/reverse.hpp new file mode 100644 index 0000000000..651da05711 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/list/reverse.hpp @@ -0,0 +1,40 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LIST_REVERSE_HPP +# define BOOST_PREPROCESSOR_LIST_REVERSE_HPP +# +# include +# include +# +# /* BOOST_PP_LIST_REVERSE */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_LIST_REVERSE(list) BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_LIST_REVERSE_O, BOOST_PP_NIL, list) +# else +# define BOOST_PP_LIST_REVERSE(list) BOOST_PP_LIST_REVERSE_I(list) +# define BOOST_PP_LIST_REVERSE_I(list) BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_LIST_REVERSE_O, BOOST_PP_NIL, list) +# endif +# +# define BOOST_PP_LIST_REVERSE_O(d, s, x) (x, s) +# +# /* BOOST_PP_LIST_REVERSE_D */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_LIST_REVERSE_D(d, list) BOOST_PP_LIST_FOLD_LEFT_ ## d(BOOST_PP_LIST_REVERSE_O, BOOST_PP_NIL, list) +# else +# define BOOST_PP_LIST_REVERSE_D(d, list) BOOST_PP_LIST_REVERSE_D_I(d, list) +# define BOOST_PP_LIST_REVERSE_D_I(d, list) BOOST_PP_LIST_FOLD_LEFT_ ## d(BOOST_PP_LIST_REVERSE_O, BOOST_PP_NIL, list) +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/list/transform.hpp b/ThirdParty/boost-Subset/boost/preprocessor/list/transform.hpp new file mode 100644 index 0000000000..840f3067c7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/list/transform.hpp @@ -0,0 +1,49 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LIST_TRANSFORM_HPP +# define BOOST_PREPROCESSOR_LIST_TRANSFORM_HPP +# +# include +# include +# include +# include +# +# /* BOOST_PP_LIST_TRANSFORM */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_LIST_TRANSFORM(op, data, list) BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_LIST_FOLD_RIGHT(BOOST_PP_LIST_TRANSFORM_O, (op, data, BOOST_PP_NIL), list)) +# else +# define BOOST_PP_LIST_TRANSFORM(op, data, list) BOOST_PP_LIST_TRANSFORM_I(op, data, list) +# define BOOST_PP_LIST_TRANSFORM_I(op, data, list) BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_LIST_FOLD_RIGHT(BOOST_PP_LIST_TRANSFORM_O, (op, data, BOOST_PP_NIL), list)) +# endif +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_LIST_TRANSFORM_O(d, odr, elem) BOOST_PP_LIST_TRANSFORM_O_D(d, BOOST_PP_TUPLE_ELEM(3, 0, odr), BOOST_PP_TUPLE_ELEM(3, 1, odr), BOOST_PP_TUPLE_ELEM(3, 2, odr), elem) +# else +# define BOOST_PP_LIST_TRANSFORM_O(d, odr, elem) BOOST_PP_LIST_TRANSFORM_O_I(d, BOOST_PP_TUPLE_REM_3 odr, elem) +# define BOOST_PP_LIST_TRANSFORM_O_I(d, im, elem) BOOST_PP_LIST_TRANSFORM_O_D(d, im, elem) +# endif +# +# define BOOST_PP_LIST_TRANSFORM_O_D(d, op, data, res, elem) (op, data, (op(d, data, elem), res)) +# +# /* BOOST_PP_LIST_TRANSFORM_D */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_LIST_TRANSFORM_D(d, op, data, list) BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_LIST_FOLD_RIGHT_ ## d(BOOST_PP_LIST_TRANSFORM_O, (op, data, BOOST_PP_NIL), list)) +# else +# define BOOST_PP_LIST_TRANSFORM_D(d, op, data, list) BOOST_PP_LIST_TRANSFORM_D_I(d, op, data, list) +# define BOOST_PP_LIST_TRANSFORM_D_I(d, op, data, list) BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_LIST_FOLD_RIGHT_ ## d(BOOST_PP_LIST_TRANSFORM_O, (op, data, BOOST_PP_NIL), list)) +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/logical/and.hpp b/ThirdParty/boost-Subset/boost/preprocessor/logical/and.hpp new file mode 100644 index 0000000000..8590365e58 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/logical/and.hpp @@ -0,0 +1,30 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LOGICAL_AND_HPP +# define BOOST_PREPROCESSOR_LOGICAL_AND_HPP +# +# include +# include +# include +# +# /* BOOST_PP_AND */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_AND(p, q) BOOST_PP_BITAND(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) +# else +# define BOOST_PP_AND(p, q) BOOST_PP_AND_I(p, q) +# define BOOST_PP_AND_I(p, q) BOOST_PP_BITAND(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/logical/bitand.hpp b/ThirdParty/boost-Subset/boost/preprocessor/logical/bitand.hpp new file mode 100644 index 0000000000..74e9527f20 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/logical/bitand.hpp @@ -0,0 +1,38 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LOGICAL_BITAND_HPP +# define BOOST_PREPROCESSOR_LOGICAL_BITAND_HPP +# +# include +# +# /* BOOST_PP_BITAND */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_BITAND(x, y) BOOST_PP_BITAND_I(x, y) +# else +# define BOOST_PP_BITAND(x, y) BOOST_PP_BITAND_OO((x, y)) +# define BOOST_PP_BITAND_OO(par) BOOST_PP_BITAND_I ## par +# endif +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_BITAND_I(x, y) BOOST_PP_BITAND_ ## x ## y +# else +# define BOOST_PP_BITAND_I(x, y) BOOST_PP_BITAND_ID(BOOST_PP_BITAND_ ## x ## y) +# define BOOST_PP_BITAND_ID(res) res +# endif +# +# define BOOST_PP_BITAND_00 0 +# define BOOST_PP_BITAND_01 0 +# define BOOST_PP_BITAND_10 0 +# define BOOST_PP_BITAND_11 1 +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/logical/bitor.hpp b/ThirdParty/boost-Subset/boost/preprocessor/logical/bitor.hpp new file mode 100644 index 0000000000..c0bc2c66ae --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/logical/bitor.hpp @@ -0,0 +1,38 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LOGICAL_BITOR_HPP +# define BOOST_PREPROCESSOR_LOGICAL_BITOR_HPP +# +# include +# +# /* BOOST_PP_BITOR */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_BITOR(x, y) BOOST_PP_BITOR_I(x, y) +# else +# define BOOST_PP_BITOR(x, y) BOOST_PP_BITOR_OO((x, y)) +# define BOOST_PP_BITOR_OO(par) BOOST_PP_BITOR_I ## par +# endif +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_BITOR_I(x, y) BOOST_PP_BITOR_ ## x ## y +# else +# define BOOST_PP_BITOR_I(x, y) BOOST_PP_BITOR_ID(BOOST_PP_BITOR_ ## x ## y) +# define BOOST_PP_BITOR_ID(id) id +# endif +# +# define BOOST_PP_BITOR_00 0 +# define BOOST_PP_BITOR_01 1 +# define BOOST_PP_BITOR_10 1 +# define BOOST_PP_BITOR_11 1 +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/logical/bool.hpp b/ThirdParty/boost-Subset/boost/preprocessor/logical/bool.hpp new file mode 100644 index 0000000000..fc01b5ba50 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/logical/bool.hpp @@ -0,0 +1,288 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LOGICAL_BOOL_HPP +# define BOOST_PREPROCESSOR_LOGICAL_BOOL_HPP +# +# include +# +# /* BOOST_PP_BOOL */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_BOOL(x) BOOST_PP_BOOL_I(x) +# else +# define BOOST_PP_BOOL(x) BOOST_PP_BOOL_OO((x)) +# define BOOST_PP_BOOL_OO(par) BOOST_PP_BOOL_I ## par +# endif +# +# define BOOST_PP_BOOL_I(x) BOOST_PP_BOOL_ ## x +# +# define BOOST_PP_BOOL_0 0 +# define BOOST_PP_BOOL_1 1 +# define BOOST_PP_BOOL_2 1 +# define BOOST_PP_BOOL_3 1 +# define BOOST_PP_BOOL_4 1 +# define BOOST_PP_BOOL_5 1 +# define BOOST_PP_BOOL_6 1 +# define BOOST_PP_BOOL_7 1 +# define BOOST_PP_BOOL_8 1 +# define BOOST_PP_BOOL_9 1 +# define BOOST_PP_BOOL_10 1 +# define BOOST_PP_BOOL_11 1 +# define BOOST_PP_BOOL_12 1 +# define BOOST_PP_BOOL_13 1 +# define BOOST_PP_BOOL_14 1 +# define BOOST_PP_BOOL_15 1 +# define BOOST_PP_BOOL_16 1 +# define BOOST_PP_BOOL_17 1 +# define BOOST_PP_BOOL_18 1 +# define BOOST_PP_BOOL_19 1 +# define BOOST_PP_BOOL_20 1 +# define BOOST_PP_BOOL_21 1 +# define BOOST_PP_BOOL_22 1 +# define BOOST_PP_BOOL_23 1 +# define BOOST_PP_BOOL_24 1 +# define BOOST_PP_BOOL_25 1 +# define BOOST_PP_BOOL_26 1 +# define BOOST_PP_BOOL_27 1 +# define BOOST_PP_BOOL_28 1 +# define BOOST_PP_BOOL_29 1 +# define BOOST_PP_BOOL_30 1 +# define BOOST_PP_BOOL_31 1 +# define BOOST_PP_BOOL_32 1 +# define BOOST_PP_BOOL_33 1 +# define BOOST_PP_BOOL_34 1 +# define BOOST_PP_BOOL_35 1 +# define BOOST_PP_BOOL_36 1 +# define BOOST_PP_BOOL_37 1 +# define BOOST_PP_BOOL_38 1 +# define BOOST_PP_BOOL_39 1 +# define BOOST_PP_BOOL_40 1 +# define BOOST_PP_BOOL_41 1 +# define BOOST_PP_BOOL_42 1 +# define BOOST_PP_BOOL_43 1 +# define BOOST_PP_BOOL_44 1 +# define BOOST_PP_BOOL_45 1 +# define BOOST_PP_BOOL_46 1 +# define BOOST_PP_BOOL_47 1 +# define BOOST_PP_BOOL_48 1 +# define BOOST_PP_BOOL_49 1 +# define BOOST_PP_BOOL_50 1 +# define BOOST_PP_BOOL_51 1 +# define BOOST_PP_BOOL_52 1 +# define BOOST_PP_BOOL_53 1 +# define BOOST_PP_BOOL_54 1 +# define BOOST_PP_BOOL_55 1 +# define BOOST_PP_BOOL_56 1 +# define BOOST_PP_BOOL_57 1 +# define BOOST_PP_BOOL_58 1 +# define BOOST_PP_BOOL_59 1 +# define BOOST_PP_BOOL_60 1 +# define BOOST_PP_BOOL_61 1 +# define BOOST_PP_BOOL_62 1 +# define BOOST_PP_BOOL_63 1 +# define BOOST_PP_BOOL_64 1 +# define BOOST_PP_BOOL_65 1 +# define BOOST_PP_BOOL_66 1 +# define BOOST_PP_BOOL_67 1 +# define BOOST_PP_BOOL_68 1 +# define BOOST_PP_BOOL_69 1 +# define BOOST_PP_BOOL_70 1 +# define BOOST_PP_BOOL_71 1 +# define BOOST_PP_BOOL_72 1 +# define BOOST_PP_BOOL_73 1 +# define BOOST_PP_BOOL_74 1 +# define BOOST_PP_BOOL_75 1 +# define BOOST_PP_BOOL_76 1 +# define BOOST_PP_BOOL_77 1 +# define BOOST_PP_BOOL_78 1 +# define BOOST_PP_BOOL_79 1 +# define BOOST_PP_BOOL_80 1 +# define BOOST_PP_BOOL_81 1 +# define BOOST_PP_BOOL_82 1 +# define BOOST_PP_BOOL_83 1 +# define BOOST_PP_BOOL_84 1 +# define BOOST_PP_BOOL_85 1 +# define BOOST_PP_BOOL_86 1 +# define BOOST_PP_BOOL_87 1 +# define BOOST_PP_BOOL_88 1 +# define BOOST_PP_BOOL_89 1 +# define BOOST_PP_BOOL_90 1 +# define BOOST_PP_BOOL_91 1 +# define BOOST_PP_BOOL_92 1 +# define BOOST_PP_BOOL_93 1 +# define BOOST_PP_BOOL_94 1 +# define BOOST_PP_BOOL_95 1 +# define BOOST_PP_BOOL_96 1 +# define BOOST_PP_BOOL_97 1 +# define BOOST_PP_BOOL_98 1 +# define BOOST_PP_BOOL_99 1 +# define BOOST_PP_BOOL_100 1 +# define BOOST_PP_BOOL_101 1 +# define BOOST_PP_BOOL_102 1 +# define BOOST_PP_BOOL_103 1 +# define BOOST_PP_BOOL_104 1 +# define BOOST_PP_BOOL_105 1 +# define BOOST_PP_BOOL_106 1 +# define BOOST_PP_BOOL_107 1 +# define BOOST_PP_BOOL_108 1 +# define BOOST_PP_BOOL_109 1 +# define BOOST_PP_BOOL_110 1 +# define BOOST_PP_BOOL_111 1 +# define BOOST_PP_BOOL_112 1 +# define BOOST_PP_BOOL_113 1 +# define BOOST_PP_BOOL_114 1 +# define BOOST_PP_BOOL_115 1 +# define BOOST_PP_BOOL_116 1 +# define BOOST_PP_BOOL_117 1 +# define BOOST_PP_BOOL_118 1 +# define BOOST_PP_BOOL_119 1 +# define BOOST_PP_BOOL_120 1 +# define BOOST_PP_BOOL_121 1 +# define BOOST_PP_BOOL_122 1 +# define BOOST_PP_BOOL_123 1 +# define BOOST_PP_BOOL_124 1 +# define BOOST_PP_BOOL_125 1 +# define BOOST_PP_BOOL_126 1 +# define BOOST_PP_BOOL_127 1 +# define BOOST_PP_BOOL_128 1 +# define BOOST_PP_BOOL_129 1 +# define BOOST_PP_BOOL_130 1 +# define BOOST_PP_BOOL_131 1 +# define BOOST_PP_BOOL_132 1 +# define BOOST_PP_BOOL_133 1 +# define BOOST_PP_BOOL_134 1 +# define BOOST_PP_BOOL_135 1 +# define BOOST_PP_BOOL_136 1 +# define BOOST_PP_BOOL_137 1 +# define BOOST_PP_BOOL_138 1 +# define BOOST_PP_BOOL_139 1 +# define BOOST_PP_BOOL_140 1 +# define BOOST_PP_BOOL_141 1 +# define BOOST_PP_BOOL_142 1 +# define BOOST_PP_BOOL_143 1 +# define BOOST_PP_BOOL_144 1 +# define BOOST_PP_BOOL_145 1 +# define BOOST_PP_BOOL_146 1 +# define BOOST_PP_BOOL_147 1 +# define BOOST_PP_BOOL_148 1 +# define BOOST_PP_BOOL_149 1 +# define BOOST_PP_BOOL_150 1 +# define BOOST_PP_BOOL_151 1 +# define BOOST_PP_BOOL_152 1 +# define BOOST_PP_BOOL_153 1 +# define BOOST_PP_BOOL_154 1 +# define BOOST_PP_BOOL_155 1 +# define BOOST_PP_BOOL_156 1 +# define BOOST_PP_BOOL_157 1 +# define BOOST_PP_BOOL_158 1 +# define BOOST_PP_BOOL_159 1 +# define BOOST_PP_BOOL_160 1 +# define BOOST_PP_BOOL_161 1 +# define BOOST_PP_BOOL_162 1 +# define BOOST_PP_BOOL_163 1 +# define BOOST_PP_BOOL_164 1 +# define BOOST_PP_BOOL_165 1 +# define BOOST_PP_BOOL_166 1 +# define BOOST_PP_BOOL_167 1 +# define BOOST_PP_BOOL_168 1 +# define BOOST_PP_BOOL_169 1 +# define BOOST_PP_BOOL_170 1 +# define BOOST_PP_BOOL_171 1 +# define BOOST_PP_BOOL_172 1 +# define BOOST_PP_BOOL_173 1 +# define BOOST_PP_BOOL_174 1 +# define BOOST_PP_BOOL_175 1 +# define BOOST_PP_BOOL_176 1 +# define BOOST_PP_BOOL_177 1 +# define BOOST_PP_BOOL_178 1 +# define BOOST_PP_BOOL_179 1 +# define BOOST_PP_BOOL_180 1 +# define BOOST_PP_BOOL_181 1 +# define BOOST_PP_BOOL_182 1 +# define BOOST_PP_BOOL_183 1 +# define BOOST_PP_BOOL_184 1 +# define BOOST_PP_BOOL_185 1 +# define BOOST_PP_BOOL_186 1 +# define BOOST_PP_BOOL_187 1 +# define BOOST_PP_BOOL_188 1 +# define BOOST_PP_BOOL_189 1 +# define BOOST_PP_BOOL_190 1 +# define BOOST_PP_BOOL_191 1 +# define BOOST_PP_BOOL_192 1 +# define BOOST_PP_BOOL_193 1 +# define BOOST_PP_BOOL_194 1 +# define BOOST_PP_BOOL_195 1 +# define BOOST_PP_BOOL_196 1 +# define BOOST_PP_BOOL_197 1 +# define BOOST_PP_BOOL_198 1 +# define BOOST_PP_BOOL_199 1 +# define BOOST_PP_BOOL_200 1 +# define BOOST_PP_BOOL_201 1 +# define BOOST_PP_BOOL_202 1 +# define BOOST_PP_BOOL_203 1 +# define BOOST_PP_BOOL_204 1 +# define BOOST_PP_BOOL_205 1 +# define BOOST_PP_BOOL_206 1 +# define BOOST_PP_BOOL_207 1 +# define BOOST_PP_BOOL_208 1 +# define BOOST_PP_BOOL_209 1 +# define BOOST_PP_BOOL_210 1 +# define BOOST_PP_BOOL_211 1 +# define BOOST_PP_BOOL_212 1 +# define BOOST_PP_BOOL_213 1 +# define BOOST_PP_BOOL_214 1 +# define BOOST_PP_BOOL_215 1 +# define BOOST_PP_BOOL_216 1 +# define BOOST_PP_BOOL_217 1 +# define BOOST_PP_BOOL_218 1 +# define BOOST_PP_BOOL_219 1 +# define BOOST_PP_BOOL_220 1 +# define BOOST_PP_BOOL_221 1 +# define BOOST_PP_BOOL_222 1 +# define BOOST_PP_BOOL_223 1 +# define BOOST_PP_BOOL_224 1 +# define BOOST_PP_BOOL_225 1 +# define BOOST_PP_BOOL_226 1 +# define BOOST_PP_BOOL_227 1 +# define BOOST_PP_BOOL_228 1 +# define BOOST_PP_BOOL_229 1 +# define BOOST_PP_BOOL_230 1 +# define BOOST_PP_BOOL_231 1 +# define BOOST_PP_BOOL_232 1 +# define BOOST_PP_BOOL_233 1 +# define BOOST_PP_BOOL_234 1 +# define BOOST_PP_BOOL_235 1 +# define BOOST_PP_BOOL_236 1 +# define BOOST_PP_BOOL_237 1 +# define BOOST_PP_BOOL_238 1 +# define BOOST_PP_BOOL_239 1 +# define BOOST_PP_BOOL_240 1 +# define BOOST_PP_BOOL_241 1 +# define BOOST_PP_BOOL_242 1 +# define BOOST_PP_BOOL_243 1 +# define BOOST_PP_BOOL_244 1 +# define BOOST_PP_BOOL_245 1 +# define BOOST_PP_BOOL_246 1 +# define BOOST_PP_BOOL_247 1 +# define BOOST_PP_BOOL_248 1 +# define BOOST_PP_BOOL_249 1 +# define BOOST_PP_BOOL_250 1 +# define BOOST_PP_BOOL_251 1 +# define BOOST_PP_BOOL_252 1 +# define BOOST_PP_BOOL_253 1 +# define BOOST_PP_BOOL_254 1 +# define BOOST_PP_BOOL_255 1 +# define BOOST_PP_BOOL_256 1 +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/logical/compl.hpp b/ThirdParty/boost-Subset/boost/preprocessor/logical/compl.hpp new file mode 100644 index 0000000000..ad4c7a4ca6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/logical/compl.hpp @@ -0,0 +1,36 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LOGICAL_COMPL_HPP +# define BOOST_PREPROCESSOR_LOGICAL_COMPL_HPP +# +# include +# +# /* BOOST_PP_COMPL */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_COMPL(x) BOOST_PP_COMPL_I(x) +# else +# define BOOST_PP_COMPL(x) BOOST_PP_COMPL_OO((x)) +# define BOOST_PP_COMPL_OO(par) BOOST_PP_COMPL_I ## par +# endif +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_COMPL_I(x) BOOST_PP_COMPL_ ## x +# else +# define BOOST_PP_COMPL_I(x) BOOST_PP_COMPL_ID(BOOST_PP_COMPL_ ## x) +# define BOOST_PP_COMPL_ID(id) id +# endif +# +# define BOOST_PP_COMPL_0 1 +# define BOOST_PP_COMPL_1 0 +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/logical/not.hpp b/ThirdParty/boost-Subset/boost/preprocessor/logical/not.hpp new file mode 100644 index 0000000000..b509d3fca6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/logical/not.hpp @@ -0,0 +1,30 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LOGICAL_NOT_HPP +# define BOOST_PREPROCESSOR_LOGICAL_NOT_HPP +# +# include +# include +# include +# +# /* BOOST_PP_NOT */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_NOT(x) BOOST_PP_COMPL(BOOST_PP_BOOL(x)) +# else +# define BOOST_PP_NOT(x) BOOST_PP_NOT_I(x) +# define BOOST_PP_NOT_I(x) BOOST_PP_COMPL(BOOST_PP_BOOL(x)) +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/logical/or.hpp b/ThirdParty/boost-Subset/boost/preprocessor/logical/or.hpp new file mode 100644 index 0000000000..88d52071a0 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/logical/or.hpp @@ -0,0 +1,30 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LOGICAL_OR_HPP +# define BOOST_PREPROCESSOR_LOGICAL_OR_HPP +# +# include +# include +# include +# +# /* BOOST_PP_OR */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_OR(p, q) BOOST_PP_BITOR(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) +# else +# define BOOST_PP_OR(p, q) BOOST_PP_OR_I(p, q) +# define BOOST_PP_OR_I(p, q) BOOST_PP_BITOR(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/punctuation/comma.hpp b/ThirdParty/boost-Subset/boost/preprocessor/punctuation/comma.hpp new file mode 100644 index 0000000000..38c2e0e7e7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/punctuation/comma.hpp @@ -0,0 +1,21 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_PUNCTUATION_COMMA_HPP +# define BOOST_PREPROCESSOR_PUNCTUATION_COMMA_HPP +# +# /* BOOST_PP_COMMA */ +# +# define BOOST_PP_COMMA() , +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/punctuation/comma_if.hpp b/ThirdParty/boost-Subset/boost/preprocessor/punctuation/comma_if.hpp new file mode 100644 index 0000000000..c711f366a4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/punctuation/comma_if.hpp @@ -0,0 +1,31 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_PUNCTUATION_COMMA_IF_HPP +# define BOOST_PREPROCESSOR_PUNCTUATION_COMMA_IF_HPP +# +# include +# include +# include +# include +# +# /* BOOST_PP_COMMA_IF */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_COMMA_IF(cond) BOOST_PP_IF(cond, BOOST_PP_COMMA, BOOST_PP_EMPTY)() +# else +# define BOOST_PP_COMMA_IF(cond) BOOST_PP_COMMA_IF_I(cond) +# define BOOST_PP_COMMA_IF_I(cond) BOOST_PP_IF(cond, BOOST_PP_COMMA, BOOST_PP_EMPTY)() +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/punctuation/detail/is_begin_parens.hpp b/ThirdParty/boost-Subset/boost/preprocessor/punctuation/detail/is_begin_parens.hpp new file mode 100644 index 0000000000..c94ccf3c6f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/punctuation/detail/is_begin_parens.hpp @@ -0,0 +1,48 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Edward Diener 2014. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +#ifndef BOOST_PREPROCESSOR_DETAIL_IS_BEGIN_PARENS_HPP +#define BOOST_PREPROCESSOR_DETAIL_IS_BEGIN_PARENS_HPP + +#if BOOST_PP_VARIADICS_MSVC + +#include + +#define BOOST_PP_DETAIL_VD_IBP_CAT(a, b) BOOST_PP_DETAIL_VD_IBP_CAT_I(a, b) +#define BOOST_PP_DETAIL_VD_IBP_CAT_I(a, b) BOOST_PP_DETAIL_VD_IBP_CAT_II(a ## b) +#define BOOST_PP_DETAIL_VD_IBP_CAT_II(res) res + +#define BOOST_PP_DETAIL_IBP_SPLIT(i, ...) \ + BOOST_PP_DETAIL_VD_IBP_CAT(BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(BOOST_PP_DETAIL_IBP_SPLIT_,i)(__VA_ARGS__),BOOST_PP_EMPTY()) \ +/**/ + +#define BOOST_PP_DETAIL_IBP_IS_VARIADIC_C(...) 1 1 + +#else + +#define BOOST_PP_DETAIL_IBP_SPLIT(i, ...) \ + BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(BOOST_PP_DETAIL_IBP_SPLIT_,i)(__VA_ARGS__) \ +/**/ + +#define BOOST_PP_DETAIL_IBP_IS_VARIADIC_C(...) 1 + +#endif /* BOOST_PP_VARIADICS_MSVC */ + +#define BOOST_PP_DETAIL_IBP_SPLIT_0(a, ...) a +#define BOOST_PP_DETAIL_IBP_SPLIT_1(a, ...) __VA_ARGS__ + +#define BOOST_PP_DETAIL_IBP_CAT(a, ...) BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(a,__VA_ARGS__) +#define BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(a, ...) a ## __VA_ARGS__ + +#define BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_1 1, +#define BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_BOOST_PP_DETAIL_IBP_IS_VARIADIC_C 0, + +#endif /* BOOST_PREPROCESSOR_DETAIL_IS_BEGIN_PARENS_HPP */ diff --git a/ThirdParty/boost-Subset/boost/preprocessor/punctuation/is_begin_parens.hpp b/ThirdParty/boost-Subset/boost/preprocessor/punctuation/is_begin_parens.hpp new file mode 100644 index 0000000000..20b32bc2be --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/punctuation/is_begin_parens.hpp @@ -0,0 +1,51 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Edward Diener 2014. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_IS_BEGIN_PARENS_HPP +# define BOOST_PREPROCESSOR_IS_BEGIN_PARENS_HPP + +# include + +#if BOOST_PP_VARIADICS + +#include + +#if BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400 + +#define BOOST_PP_IS_BEGIN_PARENS(param) \ + BOOST_PP_DETAIL_IBP_SPLIT \ + ( \ + 0, \ + BOOST_PP_DETAIL_IBP_CAT \ + ( \ + BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_, \ + BOOST_PP_DETAIL_IBP_IS_VARIADIC_C param \ + ) \ + ) \ +/**/ + +#else + +#define BOOST_PP_IS_BEGIN_PARENS(...) \ + BOOST_PP_DETAIL_IBP_SPLIT \ + ( \ + 0, \ + BOOST_PP_DETAIL_IBP_CAT \ + ( \ + BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_, \ + BOOST_PP_DETAIL_IBP_IS_VARIADIC_C __VA_ARGS__ \ + ) \ + ) \ +/**/ + +#endif /* BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400 */ +#endif /* BOOST_PP_VARIADICS */ +#endif /* BOOST_PREPROCESSOR_IS_BEGIN_PARENS_HPP */ diff --git a/ThirdParty/boost-Subset/boost/preprocessor/repeat.hpp b/ThirdParty/boost-Subset/boost/preprocessor/repeat.hpp new file mode 100644 index 0000000000..7c47ee8b01 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/repeat.hpp @@ -0,0 +1,17 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPEAT_HPP +# define BOOST_PREPROCESSOR_REPEAT_HPP +# +# include +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/repeat_from_to.hpp b/ThirdParty/boost-Subset/boost/preprocessor/repeat_from_to.hpp new file mode 100644 index 0000000000..4ddc3be04b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/repeat_from_to.hpp @@ -0,0 +1,17 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPEAT_FROM_TO_HPP +# define BOOST_PREPROCESSOR_REPEAT_FROM_TO_HPP +# +# include +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/repetition/detail/dmc/for.hpp b/ThirdParty/boost-Subset/boost/preprocessor/repetition/detail/dmc/for.hpp new file mode 100644 index 0000000000..1d907ff387 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/repetition/detail/dmc/for.hpp @@ -0,0 +1,536 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_DETAIL_FOR_HPP +# define BOOST_PREPROCESSOR_REPETITION_DETAIL_FOR_HPP +# +# include +# include +# include +# include +# +# define BOOST_PP_FOR_1(s, p, o, m) BOOST_PP_FOR_1_C(BOOST_PP_BOOL(p##(2, s)), s, p, o, m) +# define BOOST_PP_FOR_2(s, p, o, m) BOOST_PP_FOR_2_C(BOOST_PP_BOOL(p##(3, s)), s, p, o, m) +# define BOOST_PP_FOR_3(s, p, o, m) BOOST_PP_FOR_3_C(BOOST_PP_BOOL(p##(4, s)), s, p, o, m) +# define BOOST_PP_FOR_4(s, p, o, m) BOOST_PP_FOR_4_C(BOOST_PP_BOOL(p##(5, s)), s, p, o, m) +# define BOOST_PP_FOR_5(s, p, o, m) BOOST_PP_FOR_5_C(BOOST_PP_BOOL(p##(6, s)), s, p, o, m) +# define BOOST_PP_FOR_6(s, p, o, m) BOOST_PP_FOR_6_C(BOOST_PP_BOOL(p##(7, s)), s, p, o, m) +# define BOOST_PP_FOR_7(s, p, o, m) BOOST_PP_FOR_7_C(BOOST_PP_BOOL(p##(8, s)), s, p, o, m) +# define BOOST_PP_FOR_8(s, p, o, m) BOOST_PP_FOR_8_C(BOOST_PP_BOOL(p##(9, s)), s, p, o, m) +# define BOOST_PP_FOR_9(s, p, o, m) BOOST_PP_FOR_9_C(BOOST_PP_BOOL(p##(10, s)), s, p, o, m) +# define BOOST_PP_FOR_10(s, p, o, m) BOOST_PP_FOR_10_C(BOOST_PP_BOOL(p##(11, s)), s, p, o, m) +# define BOOST_PP_FOR_11(s, p, o, m) BOOST_PP_FOR_11_C(BOOST_PP_BOOL(p##(12, s)), s, p, o, m) +# define BOOST_PP_FOR_12(s, p, o, m) BOOST_PP_FOR_12_C(BOOST_PP_BOOL(p##(13, s)), s, p, o, m) +# define BOOST_PP_FOR_13(s, p, o, m) BOOST_PP_FOR_13_C(BOOST_PP_BOOL(p##(14, s)), s, p, o, m) +# define BOOST_PP_FOR_14(s, p, o, m) BOOST_PP_FOR_14_C(BOOST_PP_BOOL(p##(15, s)), s, p, o, m) +# define BOOST_PP_FOR_15(s, p, o, m) BOOST_PP_FOR_15_C(BOOST_PP_BOOL(p##(16, s)), s, p, o, m) +# define BOOST_PP_FOR_16(s, p, o, m) BOOST_PP_FOR_16_C(BOOST_PP_BOOL(p##(17, s)), s, p, o, m) +# define BOOST_PP_FOR_17(s, p, o, m) BOOST_PP_FOR_17_C(BOOST_PP_BOOL(p##(18, s)), s, p, o, m) +# define BOOST_PP_FOR_18(s, p, o, m) BOOST_PP_FOR_18_C(BOOST_PP_BOOL(p##(19, s)), s, p, o, m) +# define BOOST_PP_FOR_19(s, p, o, m) BOOST_PP_FOR_19_C(BOOST_PP_BOOL(p##(20, s)), s, p, o, m) +# define BOOST_PP_FOR_20(s, p, o, m) BOOST_PP_FOR_20_C(BOOST_PP_BOOL(p##(21, s)), s, p, o, m) +# define BOOST_PP_FOR_21(s, p, o, m) BOOST_PP_FOR_21_C(BOOST_PP_BOOL(p##(22, s)), s, p, o, m) +# define BOOST_PP_FOR_22(s, p, o, m) BOOST_PP_FOR_22_C(BOOST_PP_BOOL(p##(23, s)), s, p, o, m) +# define BOOST_PP_FOR_23(s, p, o, m) BOOST_PP_FOR_23_C(BOOST_PP_BOOL(p##(24, s)), s, p, o, m) +# define BOOST_PP_FOR_24(s, p, o, m) BOOST_PP_FOR_24_C(BOOST_PP_BOOL(p##(25, s)), s, p, o, m) +# define BOOST_PP_FOR_25(s, p, o, m) BOOST_PP_FOR_25_C(BOOST_PP_BOOL(p##(26, s)), s, p, o, m) +# define BOOST_PP_FOR_26(s, p, o, m) BOOST_PP_FOR_26_C(BOOST_PP_BOOL(p##(27, s)), s, p, o, m) +# define BOOST_PP_FOR_27(s, p, o, m) BOOST_PP_FOR_27_C(BOOST_PP_BOOL(p##(28, s)), s, p, o, m) +# define BOOST_PP_FOR_28(s, p, o, m) BOOST_PP_FOR_28_C(BOOST_PP_BOOL(p##(29, s)), s, p, o, m) +# define BOOST_PP_FOR_29(s, p, o, m) BOOST_PP_FOR_29_C(BOOST_PP_BOOL(p##(30, s)), s, p, o, m) +# define BOOST_PP_FOR_30(s, p, o, m) BOOST_PP_FOR_30_C(BOOST_PP_BOOL(p##(31, s)), s, p, o, m) +# define BOOST_PP_FOR_31(s, p, o, m) BOOST_PP_FOR_31_C(BOOST_PP_BOOL(p##(32, s)), s, p, o, m) +# define BOOST_PP_FOR_32(s, p, o, m) BOOST_PP_FOR_32_C(BOOST_PP_BOOL(p##(33, s)), s, p, o, m) +# define BOOST_PP_FOR_33(s, p, o, m) BOOST_PP_FOR_33_C(BOOST_PP_BOOL(p##(34, s)), s, p, o, m) +# define BOOST_PP_FOR_34(s, p, o, m) BOOST_PP_FOR_34_C(BOOST_PP_BOOL(p##(35, s)), s, p, o, m) +# define BOOST_PP_FOR_35(s, p, o, m) BOOST_PP_FOR_35_C(BOOST_PP_BOOL(p##(36, s)), s, p, o, m) +# define BOOST_PP_FOR_36(s, p, o, m) BOOST_PP_FOR_36_C(BOOST_PP_BOOL(p##(37, s)), s, p, o, m) +# define BOOST_PP_FOR_37(s, p, o, m) BOOST_PP_FOR_37_C(BOOST_PP_BOOL(p##(38, s)), s, p, o, m) +# define BOOST_PP_FOR_38(s, p, o, m) BOOST_PP_FOR_38_C(BOOST_PP_BOOL(p##(39, s)), s, p, o, m) +# define BOOST_PP_FOR_39(s, p, o, m) BOOST_PP_FOR_39_C(BOOST_PP_BOOL(p##(40, s)), s, p, o, m) +# define BOOST_PP_FOR_40(s, p, o, m) BOOST_PP_FOR_40_C(BOOST_PP_BOOL(p##(41, s)), s, p, o, m) +# define BOOST_PP_FOR_41(s, p, o, m) BOOST_PP_FOR_41_C(BOOST_PP_BOOL(p##(42, s)), s, p, o, m) +# define BOOST_PP_FOR_42(s, p, o, m) BOOST_PP_FOR_42_C(BOOST_PP_BOOL(p##(43, s)), s, p, o, m) +# define BOOST_PP_FOR_43(s, p, o, m) BOOST_PP_FOR_43_C(BOOST_PP_BOOL(p##(44, s)), s, p, o, m) +# define BOOST_PP_FOR_44(s, p, o, m) BOOST_PP_FOR_44_C(BOOST_PP_BOOL(p##(45, s)), s, p, o, m) +# define BOOST_PP_FOR_45(s, p, o, m) BOOST_PP_FOR_45_C(BOOST_PP_BOOL(p##(46, s)), s, p, o, m) +# define BOOST_PP_FOR_46(s, p, o, m) BOOST_PP_FOR_46_C(BOOST_PP_BOOL(p##(47, s)), s, p, o, m) +# define BOOST_PP_FOR_47(s, p, o, m) BOOST_PP_FOR_47_C(BOOST_PP_BOOL(p##(48, s)), s, p, o, m) +# define BOOST_PP_FOR_48(s, p, o, m) BOOST_PP_FOR_48_C(BOOST_PP_BOOL(p##(49, s)), s, p, o, m) +# define BOOST_PP_FOR_49(s, p, o, m) BOOST_PP_FOR_49_C(BOOST_PP_BOOL(p##(50, s)), s, p, o, m) +# define BOOST_PP_FOR_50(s, p, o, m) BOOST_PP_FOR_50_C(BOOST_PP_BOOL(p##(51, s)), s, p, o, m) +# define BOOST_PP_FOR_51(s, p, o, m) BOOST_PP_FOR_51_C(BOOST_PP_BOOL(p##(52, s)), s, p, o, m) +# define BOOST_PP_FOR_52(s, p, o, m) BOOST_PP_FOR_52_C(BOOST_PP_BOOL(p##(53, s)), s, p, o, m) +# define BOOST_PP_FOR_53(s, p, o, m) BOOST_PP_FOR_53_C(BOOST_PP_BOOL(p##(54, s)), s, p, o, m) +# define BOOST_PP_FOR_54(s, p, o, m) BOOST_PP_FOR_54_C(BOOST_PP_BOOL(p##(55, s)), s, p, o, m) +# define BOOST_PP_FOR_55(s, p, o, m) BOOST_PP_FOR_55_C(BOOST_PP_BOOL(p##(56, s)), s, p, o, m) +# define BOOST_PP_FOR_56(s, p, o, m) BOOST_PP_FOR_56_C(BOOST_PP_BOOL(p##(57, s)), s, p, o, m) +# define BOOST_PP_FOR_57(s, p, o, m) BOOST_PP_FOR_57_C(BOOST_PP_BOOL(p##(58, s)), s, p, o, m) +# define BOOST_PP_FOR_58(s, p, o, m) BOOST_PP_FOR_58_C(BOOST_PP_BOOL(p##(59, s)), s, p, o, m) +# define BOOST_PP_FOR_59(s, p, o, m) BOOST_PP_FOR_59_C(BOOST_PP_BOOL(p##(60, s)), s, p, o, m) +# define BOOST_PP_FOR_60(s, p, o, m) BOOST_PP_FOR_60_C(BOOST_PP_BOOL(p##(61, s)), s, p, o, m) +# define BOOST_PP_FOR_61(s, p, o, m) BOOST_PP_FOR_61_C(BOOST_PP_BOOL(p##(62, s)), s, p, o, m) +# define BOOST_PP_FOR_62(s, p, o, m) BOOST_PP_FOR_62_C(BOOST_PP_BOOL(p##(63, s)), s, p, o, m) +# define BOOST_PP_FOR_63(s, p, o, m) BOOST_PP_FOR_63_C(BOOST_PP_BOOL(p##(64, s)), s, p, o, m) +# define BOOST_PP_FOR_64(s, p, o, m) BOOST_PP_FOR_64_C(BOOST_PP_BOOL(p##(65, s)), s, p, o, m) +# define BOOST_PP_FOR_65(s, p, o, m) BOOST_PP_FOR_65_C(BOOST_PP_BOOL(p##(66, s)), s, p, o, m) +# define BOOST_PP_FOR_66(s, p, o, m) BOOST_PP_FOR_66_C(BOOST_PP_BOOL(p##(67, s)), s, p, o, m) +# define BOOST_PP_FOR_67(s, p, o, m) BOOST_PP_FOR_67_C(BOOST_PP_BOOL(p##(68, s)), s, p, o, m) +# define BOOST_PP_FOR_68(s, p, o, m) BOOST_PP_FOR_68_C(BOOST_PP_BOOL(p##(69, s)), s, p, o, m) +# define BOOST_PP_FOR_69(s, p, o, m) BOOST_PP_FOR_69_C(BOOST_PP_BOOL(p##(70, s)), s, p, o, m) +# define BOOST_PP_FOR_70(s, p, o, m) BOOST_PP_FOR_70_C(BOOST_PP_BOOL(p##(71, s)), s, p, o, m) +# define BOOST_PP_FOR_71(s, p, o, m) BOOST_PP_FOR_71_C(BOOST_PP_BOOL(p##(72, s)), s, p, o, m) +# define BOOST_PP_FOR_72(s, p, o, m) BOOST_PP_FOR_72_C(BOOST_PP_BOOL(p##(73, s)), s, p, o, m) +# define BOOST_PP_FOR_73(s, p, o, m) BOOST_PP_FOR_73_C(BOOST_PP_BOOL(p##(74, s)), s, p, o, m) +# define BOOST_PP_FOR_74(s, p, o, m) BOOST_PP_FOR_74_C(BOOST_PP_BOOL(p##(75, s)), s, p, o, m) +# define BOOST_PP_FOR_75(s, p, o, m) BOOST_PP_FOR_75_C(BOOST_PP_BOOL(p##(76, s)), s, p, o, m) +# define BOOST_PP_FOR_76(s, p, o, m) BOOST_PP_FOR_76_C(BOOST_PP_BOOL(p##(77, s)), s, p, o, m) +# define BOOST_PP_FOR_77(s, p, o, m) BOOST_PP_FOR_77_C(BOOST_PP_BOOL(p##(78, s)), s, p, o, m) +# define BOOST_PP_FOR_78(s, p, o, m) BOOST_PP_FOR_78_C(BOOST_PP_BOOL(p##(79, s)), s, p, o, m) +# define BOOST_PP_FOR_79(s, p, o, m) BOOST_PP_FOR_79_C(BOOST_PP_BOOL(p##(80, s)), s, p, o, m) +# define BOOST_PP_FOR_80(s, p, o, m) BOOST_PP_FOR_80_C(BOOST_PP_BOOL(p##(81, s)), s, p, o, m) +# define BOOST_PP_FOR_81(s, p, o, m) BOOST_PP_FOR_81_C(BOOST_PP_BOOL(p##(82, s)), s, p, o, m) +# define BOOST_PP_FOR_82(s, p, o, m) BOOST_PP_FOR_82_C(BOOST_PP_BOOL(p##(83, s)), s, p, o, m) +# define BOOST_PP_FOR_83(s, p, o, m) BOOST_PP_FOR_83_C(BOOST_PP_BOOL(p##(84, s)), s, p, o, m) +# define BOOST_PP_FOR_84(s, p, o, m) BOOST_PP_FOR_84_C(BOOST_PP_BOOL(p##(85, s)), s, p, o, m) +# define BOOST_PP_FOR_85(s, p, o, m) BOOST_PP_FOR_85_C(BOOST_PP_BOOL(p##(86, s)), s, p, o, m) +# define BOOST_PP_FOR_86(s, p, o, m) BOOST_PP_FOR_86_C(BOOST_PP_BOOL(p##(87, s)), s, p, o, m) +# define BOOST_PP_FOR_87(s, p, o, m) BOOST_PP_FOR_87_C(BOOST_PP_BOOL(p##(88, s)), s, p, o, m) +# define BOOST_PP_FOR_88(s, p, o, m) BOOST_PP_FOR_88_C(BOOST_PP_BOOL(p##(89, s)), s, p, o, m) +# define BOOST_PP_FOR_89(s, p, o, m) BOOST_PP_FOR_89_C(BOOST_PP_BOOL(p##(90, s)), s, p, o, m) +# define BOOST_PP_FOR_90(s, p, o, m) BOOST_PP_FOR_90_C(BOOST_PP_BOOL(p##(91, s)), s, p, o, m) +# define BOOST_PP_FOR_91(s, p, o, m) BOOST_PP_FOR_91_C(BOOST_PP_BOOL(p##(92, s)), s, p, o, m) +# define BOOST_PP_FOR_92(s, p, o, m) BOOST_PP_FOR_92_C(BOOST_PP_BOOL(p##(93, s)), s, p, o, m) +# define BOOST_PP_FOR_93(s, p, o, m) BOOST_PP_FOR_93_C(BOOST_PP_BOOL(p##(94, s)), s, p, o, m) +# define BOOST_PP_FOR_94(s, p, o, m) BOOST_PP_FOR_94_C(BOOST_PP_BOOL(p##(95, s)), s, p, o, m) +# define BOOST_PP_FOR_95(s, p, o, m) BOOST_PP_FOR_95_C(BOOST_PP_BOOL(p##(96, s)), s, p, o, m) +# define BOOST_PP_FOR_96(s, p, o, m) BOOST_PP_FOR_96_C(BOOST_PP_BOOL(p##(97, s)), s, p, o, m) +# define BOOST_PP_FOR_97(s, p, o, m) BOOST_PP_FOR_97_C(BOOST_PP_BOOL(p##(98, s)), s, p, o, m) +# define BOOST_PP_FOR_98(s, p, o, m) BOOST_PP_FOR_98_C(BOOST_PP_BOOL(p##(99, s)), s, p, o, m) +# define BOOST_PP_FOR_99(s, p, o, m) BOOST_PP_FOR_99_C(BOOST_PP_BOOL(p##(100, s)), s, p, o, m) +# define BOOST_PP_FOR_100(s, p, o, m) BOOST_PP_FOR_100_C(BOOST_PP_BOOL(p##(101, s)), s, p, o, m) +# define BOOST_PP_FOR_101(s, p, o, m) BOOST_PP_FOR_101_C(BOOST_PP_BOOL(p##(102, s)), s, p, o, m) +# define BOOST_PP_FOR_102(s, p, o, m) BOOST_PP_FOR_102_C(BOOST_PP_BOOL(p##(103, s)), s, p, o, m) +# define BOOST_PP_FOR_103(s, p, o, m) BOOST_PP_FOR_103_C(BOOST_PP_BOOL(p##(104, s)), s, p, o, m) +# define BOOST_PP_FOR_104(s, p, o, m) BOOST_PP_FOR_104_C(BOOST_PP_BOOL(p##(105, s)), s, p, o, m) +# define BOOST_PP_FOR_105(s, p, o, m) BOOST_PP_FOR_105_C(BOOST_PP_BOOL(p##(106, s)), s, p, o, m) +# define BOOST_PP_FOR_106(s, p, o, m) BOOST_PP_FOR_106_C(BOOST_PP_BOOL(p##(107, s)), s, p, o, m) +# define BOOST_PP_FOR_107(s, p, o, m) BOOST_PP_FOR_107_C(BOOST_PP_BOOL(p##(108, s)), s, p, o, m) +# define BOOST_PP_FOR_108(s, p, o, m) BOOST_PP_FOR_108_C(BOOST_PP_BOOL(p##(109, s)), s, p, o, m) +# define BOOST_PP_FOR_109(s, p, o, m) BOOST_PP_FOR_109_C(BOOST_PP_BOOL(p##(110, s)), s, p, o, m) +# define BOOST_PP_FOR_110(s, p, o, m) BOOST_PP_FOR_110_C(BOOST_PP_BOOL(p##(111, s)), s, p, o, m) +# define BOOST_PP_FOR_111(s, p, o, m) BOOST_PP_FOR_111_C(BOOST_PP_BOOL(p##(112, s)), s, p, o, m) +# define BOOST_PP_FOR_112(s, p, o, m) BOOST_PP_FOR_112_C(BOOST_PP_BOOL(p##(113, s)), s, p, o, m) +# define BOOST_PP_FOR_113(s, p, o, m) BOOST_PP_FOR_113_C(BOOST_PP_BOOL(p##(114, s)), s, p, o, m) +# define BOOST_PP_FOR_114(s, p, o, m) BOOST_PP_FOR_114_C(BOOST_PP_BOOL(p##(115, s)), s, p, o, m) +# define BOOST_PP_FOR_115(s, p, o, m) BOOST_PP_FOR_115_C(BOOST_PP_BOOL(p##(116, s)), s, p, o, m) +# define BOOST_PP_FOR_116(s, p, o, m) BOOST_PP_FOR_116_C(BOOST_PP_BOOL(p##(117, s)), s, p, o, m) +# define BOOST_PP_FOR_117(s, p, o, m) BOOST_PP_FOR_117_C(BOOST_PP_BOOL(p##(118, s)), s, p, o, m) +# define BOOST_PP_FOR_118(s, p, o, m) BOOST_PP_FOR_118_C(BOOST_PP_BOOL(p##(119, s)), s, p, o, m) +# define BOOST_PP_FOR_119(s, p, o, m) BOOST_PP_FOR_119_C(BOOST_PP_BOOL(p##(120, s)), s, p, o, m) +# define BOOST_PP_FOR_120(s, p, o, m) BOOST_PP_FOR_120_C(BOOST_PP_BOOL(p##(121, s)), s, p, o, m) +# define BOOST_PP_FOR_121(s, p, o, m) BOOST_PP_FOR_121_C(BOOST_PP_BOOL(p##(122, s)), s, p, o, m) +# define BOOST_PP_FOR_122(s, p, o, m) BOOST_PP_FOR_122_C(BOOST_PP_BOOL(p##(123, s)), s, p, o, m) +# define BOOST_PP_FOR_123(s, p, o, m) BOOST_PP_FOR_123_C(BOOST_PP_BOOL(p##(124, s)), s, p, o, m) +# define BOOST_PP_FOR_124(s, p, o, m) BOOST_PP_FOR_124_C(BOOST_PP_BOOL(p##(125, s)), s, p, o, m) +# define BOOST_PP_FOR_125(s, p, o, m) BOOST_PP_FOR_125_C(BOOST_PP_BOOL(p##(126, s)), s, p, o, m) +# define BOOST_PP_FOR_126(s, p, o, m) BOOST_PP_FOR_126_C(BOOST_PP_BOOL(p##(127, s)), s, p, o, m) +# define BOOST_PP_FOR_127(s, p, o, m) BOOST_PP_FOR_127_C(BOOST_PP_BOOL(p##(128, s)), s, p, o, m) +# define BOOST_PP_FOR_128(s, p, o, m) BOOST_PP_FOR_128_C(BOOST_PP_BOOL(p##(129, s)), s, p, o, m) +# define BOOST_PP_FOR_129(s, p, o, m) BOOST_PP_FOR_129_C(BOOST_PP_BOOL(p##(130, s)), s, p, o, m) +# define BOOST_PP_FOR_130(s, p, o, m) BOOST_PP_FOR_130_C(BOOST_PP_BOOL(p##(131, s)), s, p, o, m) +# define BOOST_PP_FOR_131(s, p, o, m) BOOST_PP_FOR_131_C(BOOST_PP_BOOL(p##(132, s)), s, p, o, m) +# define BOOST_PP_FOR_132(s, p, o, m) BOOST_PP_FOR_132_C(BOOST_PP_BOOL(p##(133, s)), s, p, o, m) +# define BOOST_PP_FOR_133(s, p, o, m) BOOST_PP_FOR_133_C(BOOST_PP_BOOL(p##(134, s)), s, p, o, m) +# define BOOST_PP_FOR_134(s, p, o, m) BOOST_PP_FOR_134_C(BOOST_PP_BOOL(p##(135, s)), s, p, o, m) +# define BOOST_PP_FOR_135(s, p, o, m) BOOST_PP_FOR_135_C(BOOST_PP_BOOL(p##(136, s)), s, p, o, m) +# define BOOST_PP_FOR_136(s, p, o, m) BOOST_PP_FOR_136_C(BOOST_PP_BOOL(p##(137, s)), s, p, o, m) +# define BOOST_PP_FOR_137(s, p, o, m) BOOST_PP_FOR_137_C(BOOST_PP_BOOL(p##(138, s)), s, p, o, m) +# define BOOST_PP_FOR_138(s, p, o, m) BOOST_PP_FOR_138_C(BOOST_PP_BOOL(p##(139, s)), s, p, o, m) +# define BOOST_PP_FOR_139(s, p, o, m) BOOST_PP_FOR_139_C(BOOST_PP_BOOL(p##(140, s)), s, p, o, m) +# define BOOST_PP_FOR_140(s, p, o, m) BOOST_PP_FOR_140_C(BOOST_PP_BOOL(p##(141, s)), s, p, o, m) +# define BOOST_PP_FOR_141(s, p, o, m) BOOST_PP_FOR_141_C(BOOST_PP_BOOL(p##(142, s)), s, p, o, m) +# define BOOST_PP_FOR_142(s, p, o, m) BOOST_PP_FOR_142_C(BOOST_PP_BOOL(p##(143, s)), s, p, o, m) +# define BOOST_PP_FOR_143(s, p, o, m) BOOST_PP_FOR_143_C(BOOST_PP_BOOL(p##(144, s)), s, p, o, m) +# define BOOST_PP_FOR_144(s, p, o, m) BOOST_PP_FOR_144_C(BOOST_PP_BOOL(p##(145, s)), s, p, o, m) +# define BOOST_PP_FOR_145(s, p, o, m) BOOST_PP_FOR_145_C(BOOST_PP_BOOL(p##(146, s)), s, p, o, m) +# define BOOST_PP_FOR_146(s, p, o, m) BOOST_PP_FOR_146_C(BOOST_PP_BOOL(p##(147, s)), s, p, o, m) +# define BOOST_PP_FOR_147(s, p, o, m) BOOST_PP_FOR_147_C(BOOST_PP_BOOL(p##(148, s)), s, p, o, m) +# define BOOST_PP_FOR_148(s, p, o, m) BOOST_PP_FOR_148_C(BOOST_PP_BOOL(p##(149, s)), s, p, o, m) +# define BOOST_PP_FOR_149(s, p, o, m) BOOST_PP_FOR_149_C(BOOST_PP_BOOL(p##(150, s)), s, p, o, m) +# define BOOST_PP_FOR_150(s, p, o, m) BOOST_PP_FOR_150_C(BOOST_PP_BOOL(p##(151, s)), s, p, o, m) +# define BOOST_PP_FOR_151(s, p, o, m) BOOST_PP_FOR_151_C(BOOST_PP_BOOL(p##(152, s)), s, p, o, m) +# define BOOST_PP_FOR_152(s, p, o, m) BOOST_PP_FOR_152_C(BOOST_PP_BOOL(p##(153, s)), s, p, o, m) +# define BOOST_PP_FOR_153(s, p, o, m) BOOST_PP_FOR_153_C(BOOST_PP_BOOL(p##(154, s)), s, p, o, m) +# define BOOST_PP_FOR_154(s, p, o, m) BOOST_PP_FOR_154_C(BOOST_PP_BOOL(p##(155, s)), s, p, o, m) +# define BOOST_PP_FOR_155(s, p, o, m) BOOST_PP_FOR_155_C(BOOST_PP_BOOL(p##(156, s)), s, p, o, m) +# define BOOST_PP_FOR_156(s, p, o, m) BOOST_PP_FOR_156_C(BOOST_PP_BOOL(p##(157, s)), s, p, o, m) +# define BOOST_PP_FOR_157(s, p, o, m) BOOST_PP_FOR_157_C(BOOST_PP_BOOL(p##(158, s)), s, p, o, m) +# define BOOST_PP_FOR_158(s, p, o, m) BOOST_PP_FOR_158_C(BOOST_PP_BOOL(p##(159, s)), s, p, o, m) +# define BOOST_PP_FOR_159(s, p, o, m) BOOST_PP_FOR_159_C(BOOST_PP_BOOL(p##(160, s)), s, p, o, m) +# define BOOST_PP_FOR_160(s, p, o, m) BOOST_PP_FOR_160_C(BOOST_PP_BOOL(p##(161, s)), s, p, o, m) +# define BOOST_PP_FOR_161(s, p, o, m) BOOST_PP_FOR_161_C(BOOST_PP_BOOL(p##(162, s)), s, p, o, m) +# define BOOST_PP_FOR_162(s, p, o, m) BOOST_PP_FOR_162_C(BOOST_PP_BOOL(p##(163, s)), s, p, o, m) +# define BOOST_PP_FOR_163(s, p, o, m) BOOST_PP_FOR_163_C(BOOST_PP_BOOL(p##(164, s)), s, p, o, m) +# define BOOST_PP_FOR_164(s, p, o, m) BOOST_PP_FOR_164_C(BOOST_PP_BOOL(p##(165, s)), s, p, o, m) +# define BOOST_PP_FOR_165(s, p, o, m) BOOST_PP_FOR_165_C(BOOST_PP_BOOL(p##(166, s)), s, p, o, m) +# define BOOST_PP_FOR_166(s, p, o, m) BOOST_PP_FOR_166_C(BOOST_PP_BOOL(p##(167, s)), s, p, o, m) +# define BOOST_PP_FOR_167(s, p, o, m) BOOST_PP_FOR_167_C(BOOST_PP_BOOL(p##(168, s)), s, p, o, m) +# define BOOST_PP_FOR_168(s, p, o, m) BOOST_PP_FOR_168_C(BOOST_PP_BOOL(p##(169, s)), s, p, o, m) +# define BOOST_PP_FOR_169(s, p, o, m) BOOST_PP_FOR_169_C(BOOST_PP_BOOL(p##(170, s)), s, p, o, m) +# define BOOST_PP_FOR_170(s, p, o, m) BOOST_PP_FOR_170_C(BOOST_PP_BOOL(p##(171, s)), s, p, o, m) +# define BOOST_PP_FOR_171(s, p, o, m) BOOST_PP_FOR_171_C(BOOST_PP_BOOL(p##(172, s)), s, p, o, m) +# define BOOST_PP_FOR_172(s, p, o, m) BOOST_PP_FOR_172_C(BOOST_PP_BOOL(p##(173, s)), s, p, o, m) +# define BOOST_PP_FOR_173(s, p, o, m) BOOST_PP_FOR_173_C(BOOST_PP_BOOL(p##(174, s)), s, p, o, m) +# define BOOST_PP_FOR_174(s, p, o, m) BOOST_PP_FOR_174_C(BOOST_PP_BOOL(p##(175, s)), s, p, o, m) +# define BOOST_PP_FOR_175(s, p, o, m) BOOST_PP_FOR_175_C(BOOST_PP_BOOL(p##(176, s)), s, p, o, m) +# define BOOST_PP_FOR_176(s, p, o, m) BOOST_PP_FOR_176_C(BOOST_PP_BOOL(p##(177, s)), s, p, o, m) +# define BOOST_PP_FOR_177(s, p, o, m) BOOST_PP_FOR_177_C(BOOST_PP_BOOL(p##(178, s)), s, p, o, m) +# define BOOST_PP_FOR_178(s, p, o, m) BOOST_PP_FOR_178_C(BOOST_PP_BOOL(p##(179, s)), s, p, o, m) +# define BOOST_PP_FOR_179(s, p, o, m) BOOST_PP_FOR_179_C(BOOST_PP_BOOL(p##(180, s)), s, p, o, m) +# define BOOST_PP_FOR_180(s, p, o, m) BOOST_PP_FOR_180_C(BOOST_PP_BOOL(p##(181, s)), s, p, o, m) +# define BOOST_PP_FOR_181(s, p, o, m) BOOST_PP_FOR_181_C(BOOST_PP_BOOL(p##(182, s)), s, p, o, m) +# define BOOST_PP_FOR_182(s, p, o, m) BOOST_PP_FOR_182_C(BOOST_PP_BOOL(p##(183, s)), s, p, o, m) +# define BOOST_PP_FOR_183(s, p, o, m) BOOST_PP_FOR_183_C(BOOST_PP_BOOL(p##(184, s)), s, p, o, m) +# define BOOST_PP_FOR_184(s, p, o, m) BOOST_PP_FOR_184_C(BOOST_PP_BOOL(p##(185, s)), s, p, o, m) +# define BOOST_PP_FOR_185(s, p, o, m) BOOST_PP_FOR_185_C(BOOST_PP_BOOL(p##(186, s)), s, p, o, m) +# define BOOST_PP_FOR_186(s, p, o, m) BOOST_PP_FOR_186_C(BOOST_PP_BOOL(p##(187, s)), s, p, o, m) +# define BOOST_PP_FOR_187(s, p, o, m) BOOST_PP_FOR_187_C(BOOST_PP_BOOL(p##(188, s)), s, p, o, m) +# define BOOST_PP_FOR_188(s, p, o, m) BOOST_PP_FOR_188_C(BOOST_PP_BOOL(p##(189, s)), s, p, o, m) +# define BOOST_PP_FOR_189(s, p, o, m) BOOST_PP_FOR_189_C(BOOST_PP_BOOL(p##(190, s)), s, p, o, m) +# define BOOST_PP_FOR_190(s, p, o, m) BOOST_PP_FOR_190_C(BOOST_PP_BOOL(p##(191, s)), s, p, o, m) +# define BOOST_PP_FOR_191(s, p, o, m) BOOST_PP_FOR_191_C(BOOST_PP_BOOL(p##(192, s)), s, p, o, m) +# define BOOST_PP_FOR_192(s, p, o, m) BOOST_PP_FOR_192_C(BOOST_PP_BOOL(p##(193, s)), s, p, o, m) +# define BOOST_PP_FOR_193(s, p, o, m) BOOST_PP_FOR_193_C(BOOST_PP_BOOL(p##(194, s)), s, p, o, m) +# define BOOST_PP_FOR_194(s, p, o, m) BOOST_PP_FOR_194_C(BOOST_PP_BOOL(p##(195, s)), s, p, o, m) +# define BOOST_PP_FOR_195(s, p, o, m) BOOST_PP_FOR_195_C(BOOST_PP_BOOL(p##(196, s)), s, p, o, m) +# define BOOST_PP_FOR_196(s, p, o, m) BOOST_PP_FOR_196_C(BOOST_PP_BOOL(p##(197, s)), s, p, o, m) +# define BOOST_PP_FOR_197(s, p, o, m) BOOST_PP_FOR_197_C(BOOST_PP_BOOL(p##(198, s)), s, p, o, m) +# define BOOST_PP_FOR_198(s, p, o, m) BOOST_PP_FOR_198_C(BOOST_PP_BOOL(p##(199, s)), s, p, o, m) +# define BOOST_PP_FOR_199(s, p, o, m) BOOST_PP_FOR_199_C(BOOST_PP_BOOL(p##(200, s)), s, p, o, m) +# define BOOST_PP_FOR_200(s, p, o, m) BOOST_PP_FOR_200_C(BOOST_PP_BOOL(p##(201, s)), s, p, o, m) +# define BOOST_PP_FOR_201(s, p, o, m) BOOST_PP_FOR_201_C(BOOST_PP_BOOL(p##(202, s)), s, p, o, m) +# define BOOST_PP_FOR_202(s, p, o, m) BOOST_PP_FOR_202_C(BOOST_PP_BOOL(p##(203, s)), s, p, o, m) +# define BOOST_PP_FOR_203(s, p, o, m) BOOST_PP_FOR_203_C(BOOST_PP_BOOL(p##(204, s)), s, p, o, m) +# define BOOST_PP_FOR_204(s, p, o, m) BOOST_PP_FOR_204_C(BOOST_PP_BOOL(p##(205, s)), s, p, o, m) +# define BOOST_PP_FOR_205(s, p, o, m) BOOST_PP_FOR_205_C(BOOST_PP_BOOL(p##(206, s)), s, p, o, m) +# define BOOST_PP_FOR_206(s, p, o, m) BOOST_PP_FOR_206_C(BOOST_PP_BOOL(p##(207, s)), s, p, o, m) +# define BOOST_PP_FOR_207(s, p, o, m) BOOST_PP_FOR_207_C(BOOST_PP_BOOL(p##(208, s)), s, p, o, m) +# define BOOST_PP_FOR_208(s, p, o, m) BOOST_PP_FOR_208_C(BOOST_PP_BOOL(p##(209, s)), s, p, o, m) +# define BOOST_PP_FOR_209(s, p, o, m) BOOST_PP_FOR_209_C(BOOST_PP_BOOL(p##(210, s)), s, p, o, m) +# define BOOST_PP_FOR_210(s, p, o, m) BOOST_PP_FOR_210_C(BOOST_PP_BOOL(p##(211, s)), s, p, o, m) +# define BOOST_PP_FOR_211(s, p, o, m) BOOST_PP_FOR_211_C(BOOST_PP_BOOL(p##(212, s)), s, p, o, m) +# define BOOST_PP_FOR_212(s, p, o, m) BOOST_PP_FOR_212_C(BOOST_PP_BOOL(p##(213, s)), s, p, o, m) +# define BOOST_PP_FOR_213(s, p, o, m) BOOST_PP_FOR_213_C(BOOST_PP_BOOL(p##(214, s)), s, p, o, m) +# define BOOST_PP_FOR_214(s, p, o, m) BOOST_PP_FOR_214_C(BOOST_PP_BOOL(p##(215, s)), s, p, o, m) +# define BOOST_PP_FOR_215(s, p, o, m) BOOST_PP_FOR_215_C(BOOST_PP_BOOL(p##(216, s)), s, p, o, m) +# define BOOST_PP_FOR_216(s, p, o, m) BOOST_PP_FOR_216_C(BOOST_PP_BOOL(p##(217, s)), s, p, o, m) +# define BOOST_PP_FOR_217(s, p, o, m) BOOST_PP_FOR_217_C(BOOST_PP_BOOL(p##(218, s)), s, p, o, m) +# define BOOST_PP_FOR_218(s, p, o, m) BOOST_PP_FOR_218_C(BOOST_PP_BOOL(p##(219, s)), s, p, o, m) +# define BOOST_PP_FOR_219(s, p, o, m) BOOST_PP_FOR_219_C(BOOST_PP_BOOL(p##(220, s)), s, p, o, m) +# define BOOST_PP_FOR_220(s, p, o, m) BOOST_PP_FOR_220_C(BOOST_PP_BOOL(p##(221, s)), s, p, o, m) +# define BOOST_PP_FOR_221(s, p, o, m) BOOST_PP_FOR_221_C(BOOST_PP_BOOL(p##(222, s)), s, p, o, m) +# define BOOST_PP_FOR_222(s, p, o, m) BOOST_PP_FOR_222_C(BOOST_PP_BOOL(p##(223, s)), s, p, o, m) +# define BOOST_PP_FOR_223(s, p, o, m) BOOST_PP_FOR_223_C(BOOST_PP_BOOL(p##(224, s)), s, p, o, m) +# define BOOST_PP_FOR_224(s, p, o, m) BOOST_PP_FOR_224_C(BOOST_PP_BOOL(p##(225, s)), s, p, o, m) +# define BOOST_PP_FOR_225(s, p, o, m) BOOST_PP_FOR_225_C(BOOST_PP_BOOL(p##(226, s)), s, p, o, m) +# define BOOST_PP_FOR_226(s, p, o, m) BOOST_PP_FOR_226_C(BOOST_PP_BOOL(p##(227, s)), s, p, o, m) +# define BOOST_PP_FOR_227(s, p, o, m) BOOST_PP_FOR_227_C(BOOST_PP_BOOL(p##(228, s)), s, p, o, m) +# define BOOST_PP_FOR_228(s, p, o, m) BOOST_PP_FOR_228_C(BOOST_PP_BOOL(p##(229, s)), s, p, o, m) +# define BOOST_PP_FOR_229(s, p, o, m) BOOST_PP_FOR_229_C(BOOST_PP_BOOL(p##(230, s)), s, p, o, m) +# define BOOST_PP_FOR_230(s, p, o, m) BOOST_PP_FOR_230_C(BOOST_PP_BOOL(p##(231, s)), s, p, o, m) +# define BOOST_PP_FOR_231(s, p, o, m) BOOST_PP_FOR_231_C(BOOST_PP_BOOL(p##(232, s)), s, p, o, m) +# define BOOST_PP_FOR_232(s, p, o, m) BOOST_PP_FOR_232_C(BOOST_PP_BOOL(p##(233, s)), s, p, o, m) +# define BOOST_PP_FOR_233(s, p, o, m) BOOST_PP_FOR_233_C(BOOST_PP_BOOL(p##(234, s)), s, p, o, m) +# define BOOST_PP_FOR_234(s, p, o, m) BOOST_PP_FOR_234_C(BOOST_PP_BOOL(p##(235, s)), s, p, o, m) +# define BOOST_PP_FOR_235(s, p, o, m) BOOST_PP_FOR_235_C(BOOST_PP_BOOL(p##(236, s)), s, p, o, m) +# define BOOST_PP_FOR_236(s, p, o, m) BOOST_PP_FOR_236_C(BOOST_PP_BOOL(p##(237, s)), s, p, o, m) +# define BOOST_PP_FOR_237(s, p, o, m) BOOST_PP_FOR_237_C(BOOST_PP_BOOL(p##(238, s)), s, p, o, m) +# define BOOST_PP_FOR_238(s, p, o, m) BOOST_PP_FOR_238_C(BOOST_PP_BOOL(p##(239, s)), s, p, o, m) +# define BOOST_PP_FOR_239(s, p, o, m) BOOST_PP_FOR_239_C(BOOST_PP_BOOL(p##(240, s)), s, p, o, m) +# define BOOST_PP_FOR_240(s, p, o, m) BOOST_PP_FOR_240_C(BOOST_PP_BOOL(p##(241, s)), s, p, o, m) +# define BOOST_PP_FOR_241(s, p, o, m) BOOST_PP_FOR_241_C(BOOST_PP_BOOL(p##(242, s)), s, p, o, m) +# define BOOST_PP_FOR_242(s, p, o, m) BOOST_PP_FOR_242_C(BOOST_PP_BOOL(p##(243, s)), s, p, o, m) +# define BOOST_PP_FOR_243(s, p, o, m) BOOST_PP_FOR_243_C(BOOST_PP_BOOL(p##(244, s)), s, p, o, m) +# define BOOST_PP_FOR_244(s, p, o, m) BOOST_PP_FOR_244_C(BOOST_PP_BOOL(p##(245, s)), s, p, o, m) +# define BOOST_PP_FOR_245(s, p, o, m) BOOST_PP_FOR_245_C(BOOST_PP_BOOL(p##(246, s)), s, p, o, m) +# define BOOST_PP_FOR_246(s, p, o, m) BOOST_PP_FOR_246_C(BOOST_PP_BOOL(p##(247, s)), s, p, o, m) +# define BOOST_PP_FOR_247(s, p, o, m) BOOST_PP_FOR_247_C(BOOST_PP_BOOL(p##(248, s)), s, p, o, m) +# define BOOST_PP_FOR_248(s, p, o, m) BOOST_PP_FOR_248_C(BOOST_PP_BOOL(p##(249, s)), s, p, o, m) +# define BOOST_PP_FOR_249(s, p, o, m) BOOST_PP_FOR_249_C(BOOST_PP_BOOL(p##(250, s)), s, p, o, m) +# define BOOST_PP_FOR_250(s, p, o, m) BOOST_PP_FOR_250_C(BOOST_PP_BOOL(p##(251, s)), s, p, o, m) +# define BOOST_PP_FOR_251(s, p, o, m) BOOST_PP_FOR_251_C(BOOST_PP_BOOL(p##(252, s)), s, p, o, m) +# define BOOST_PP_FOR_252(s, p, o, m) BOOST_PP_FOR_252_C(BOOST_PP_BOOL(p##(253, s)), s, p, o, m) +# define BOOST_PP_FOR_253(s, p, o, m) BOOST_PP_FOR_253_C(BOOST_PP_BOOL(p##(254, s)), s, p, o, m) +# define BOOST_PP_FOR_254(s, p, o, m) BOOST_PP_FOR_254_C(BOOST_PP_BOOL(p##(255, s)), s, p, o, m) +# define BOOST_PP_FOR_255(s, p, o, m) BOOST_PP_FOR_255_C(BOOST_PP_BOOL(p##(256, s)), s, p, o, m) +# define BOOST_PP_FOR_256(s, p, o, m) BOOST_PP_FOR_256_C(BOOST_PP_BOOL(p##(257, s)), s, p, o, m) +# +# define BOOST_PP_FOR_1_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(2, s) BOOST_PP_IIF(c, BOOST_PP_FOR_2, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(2, s), p, o, m) +# define BOOST_PP_FOR_2_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(3, s) BOOST_PP_IIF(c, BOOST_PP_FOR_3, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(3, s), p, o, m) +# define BOOST_PP_FOR_3_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(4, s) BOOST_PP_IIF(c, BOOST_PP_FOR_4, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(4, s), p, o, m) +# define BOOST_PP_FOR_4_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(5, s) BOOST_PP_IIF(c, BOOST_PP_FOR_5, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(5, s), p, o, m) +# define BOOST_PP_FOR_5_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(6, s) BOOST_PP_IIF(c, BOOST_PP_FOR_6, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(6, s), p, o, m) +# define BOOST_PP_FOR_6_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(7, s) BOOST_PP_IIF(c, BOOST_PP_FOR_7, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(7, s), p, o, m) +# define BOOST_PP_FOR_7_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(8, s) BOOST_PP_IIF(c, BOOST_PP_FOR_8, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(8, s), p, o, m) +# define BOOST_PP_FOR_8_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(9, s) BOOST_PP_IIF(c, BOOST_PP_FOR_9, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(9, s), p, o, m) +# define BOOST_PP_FOR_9_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(10, s) BOOST_PP_IIF(c, BOOST_PP_FOR_10, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(10, s), p, o, m) +# define BOOST_PP_FOR_10_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(11, s) BOOST_PP_IIF(c, BOOST_PP_FOR_11, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(11, s), p, o, m) +# define BOOST_PP_FOR_11_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(12, s) BOOST_PP_IIF(c, BOOST_PP_FOR_12, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(12, s), p, o, m) +# define BOOST_PP_FOR_12_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(13, s) BOOST_PP_IIF(c, BOOST_PP_FOR_13, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(13, s), p, o, m) +# define BOOST_PP_FOR_13_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(14, s) BOOST_PP_IIF(c, BOOST_PP_FOR_14, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(14, s), p, o, m) +# define BOOST_PP_FOR_14_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(15, s) BOOST_PP_IIF(c, BOOST_PP_FOR_15, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(15, s), p, o, m) +# define BOOST_PP_FOR_15_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(16, s) BOOST_PP_IIF(c, BOOST_PP_FOR_16, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(16, s), p, o, m) +# define BOOST_PP_FOR_16_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(17, s) BOOST_PP_IIF(c, BOOST_PP_FOR_17, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(17, s), p, o, m) +# define BOOST_PP_FOR_17_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(18, s) BOOST_PP_IIF(c, BOOST_PP_FOR_18, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(18, s), p, o, m) +# define BOOST_PP_FOR_18_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(19, s) BOOST_PP_IIF(c, BOOST_PP_FOR_19, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(19, s), p, o, m) +# define BOOST_PP_FOR_19_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(20, s) BOOST_PP_IIF(c, BOOST_PP_FOR_20, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(20, s), p, o, m) +# define BOOST_PP_FOR_20_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(21, s) BOOST_PP_IIF(c, BOOST_PP_FOR_21, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(21, s), p, o, m) +# define BOOST_PP_FOR_21_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(22, s) BOOST_PP_IIF(c, BOOST_PP_FOR_22, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(22, s), p, o, m) +# define BOOST_PP_FOR_22_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(23, s) BOOST_PP_IIF(c, BOOST_PP_FOR_23, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(23, s), p, o, m) +# define BOOST_PP_FOR_23_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(24, s) BOOST_PP_IIF(c, BOOST_PP_FOR_24, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(24, s), p, o, m) +# define BOOST_PP_FOR_24_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(25, s) BOOST_PP_IIF(c, BOOST_PP_FOR_25, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(25, s), p, o, m) +# define BOOST_PP_FOR_25_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(26, s) BOOST_PP_IIF(c, BOOST_PP_FOR_26, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(26, s), p, o, m) +# define BOOST_PP_FOR_26_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(27, s) BOOST_PP_IIF(c, BOOST_PP_FOR_27, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(27, s), p, o, m) +# define BOOST_PP_FOR_27_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(28, s) BOOST_PP_IIF(c, BOOST_PP_FOR_28, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(28, s), p, o, m) +# define BOOST_PP_FOR_28_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(29, s) BOOST_PP_IIF(c, BOOST_PP_FOR_29, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(29, s), p, o, m) +# define BOOST_PP_FOR_29_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(30, s) BOOST_PP_IIF(c, BOOST_PP_FOR_30, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(30, s), p, o, m) +# define BOOST_PP_FOR_30_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(31, s) BOOST_PP_IIF(c, BOOST_PP_FOR_31, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(31, s), p, o, m) +# define BOOST_PP_FOR_31_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(32, s) BOOST_PP_IIF(c, BOOST_PP_FOR_32, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(32, s), p, o, m) +# define BOOST_PP_FOR_32_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(33, s) BOOST_PP_IIF(c, BOOST_PP_FOR_33, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(33, s), p, o, m) +# define BOOST_PP_FOR_33_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(34, s) BOOST_PP_IIF(c, BOOST_PP_FOR_34, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(34, s), p, o, m) +# define BOOST_PP_FOR_34_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(35, s) BOOST_PP_IIF(c, BOOST_PP_FOR_35, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(35, s), p, o, m) +# define BOOST_PP_FOR_35_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(36, s) BOOST_PP_IIF(c, BOOST_PP_FOR_36, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(36, s), p, o, m) +# define BOOST_PP_FOR_36_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(37, s) BOOST_PP_IIF(c, BOOST_PP_FOR_37, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(37, s), p, o, m) +# define BOOST_PP_FOR_37_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(38, s) BOOST_PP_IIF(c, BOOST_PP_FOR_38, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(38, s), p, o, m) +# define BOOST_PP_FOR_38_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(39, s) BOOST_PP_IIF(c, BOOST_PP_FOR_39, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(39, s), p, o, m) +# define BOOST_PP_FOR_39_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(40, s) BOOST_PP_IIF(c, BOOST_PP_FOR_40, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(40, s), p, o, m) +# define BOOST_PP_FOR_40_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(41, s) BOOST_PP_IIF(c, BOOST_PP_FOR_41, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(41, s), p, o, m) +# define BOOST_PP_FOR_41_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(42, s) BOOST_PP_IIF(c, BOOST_PP_FOR_42, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(42, s), p, o, m) +# define BOOST_PP_FOR_42_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(43, s) BOOST_PP_IIF(c, BOOST_PP_FOR_43, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(43, s), p, o, m) +# define BOOST_PP_FOR_43_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(44, s) BOOST_PP_IIF(c, BOOST_PP_FOR_44, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(44, s), p, o, m) +# define BOOST_PP_FOR_44_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(45, s) BOOST_PP_IIF(c, BOOST_PP_FOR_45, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(45, s), p, o, m) +# define BOOST_PP_FOR_45_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(46, s) BOOST_PP_IIF(c, BOOST_PP_FOR_46, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(46, s), p, o, m) +# define BOOST_PP_FOR_46_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(47, s) BOOST_PP_IIF(c, BOOST_PP_FOR_47, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(47, s), p, o, m) +# define BOOST_PP_FOR_47_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(48, s) BOOST_PP_IIF(c, BOOST_PP_FOR_48, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(48, s), p, o, m) +# define BOOST_PP_FOR_48_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(49, s) BOOST_PP_IIF(c, BOOST_PP_FOR_49, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(49, s), p, o, m) +# define BOOST_PP_FOR_49_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(50, s) BOOST_PP_IIF(c, BOOST_PP_FOR_50, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(50, s), p, o, m) +# define BOOST_PP_FOR_50_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(51, s) BOOST_PP_IIF(c, BOOST_PP_FOR_51, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(51, s), p, o, m) +# define BOOST_PP_FOR_51_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(52, s) BOOST_PP_IIF(c, BOOST_PP_FOR_52, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(52, s), p, o, m) +# define BOOST_PP_FOR_52_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(53, s) BOOST_PP_IIF(c, BOOST_PP_FOR_53, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(53, s), p, o, m) +# define BOOST_PP_FOR_53_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(54, s) BOOST_PP_IIF(c, BOOST_PP_FOR_54, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(54, s), p, o, m) +# define BOOST_PP_FOR_54_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(55, s) BOOST_PP_IIF(c, BOOST_PP_FOR_55, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(55, s), p, o, m) +# define BOOST_PP_FOR_55_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(56, s) BOOST_PP_IIF(c, BOOST_PP_FOR_56, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(56, s), p, o, m) +# define BOOST_PP_FOR_56_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(57, s) BOOST_PP_IIF(c, BOOST_PP_FOR_57, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(57, s), p, o, m) +# define BOOST_PP_FOR_57_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(58, s) BOOST_PP_IIF(c, BOOST_PP_FOR_58, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(58, s), p, o, m) +# define BOOST_PP_FOR_58_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(59, s) BOOST_PP_IIF(c, BOOST_PP_FOR_59, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(59, s), p, o, m) +# define BOOST_PP_FOR_59_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(60, s) BOOST_PP_IIF(c, BOOST_PP_FOR_60, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(60, s), p, o, m) +# define BOOST_PP_FOR_60_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(61, s) BOOST_PP_IIF(c, BOOST_PP_FOR_61, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(61, s), p, o, m) +# define BOOST_PP_FOR_61_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(62, s) BOOST_PP_IIF(c, BOOST_PP_FOR_62, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(62, s), p, o, m) +# define BOOST_PP_FOR_62_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(63, s) BOOST_PP_IIF(c, BOOST_PP_FOR_63, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(63, s), p, o, m) +# define BOOST_PP_FOR_63_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(64, s) BOOST_PP_IIF(c, BOOST_PP_FOR_64, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(64, s), p, o, m) +# define BOOST_PP_FOR_64_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(65, s) BOOST_PP_IIF(c, BOOST_PP_FOR_65, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(65, s), p, o, m) +# define BOOST_PP_FOR_65_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(66, s) BOOST_PP_IIF(c, BOOST_PP_FOR_66, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(66, s), p, o, m) +# define BOOST_PP_FOR_66_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(67, s) BOOST_PP_IIF(c, BOOST_PP_FOR_67, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(67, s), p, o, m) +# define BOOST_PP_FOR_67_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(68, s) BOOST_PP_IIF(c, BOOST_PP_FOR_68, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(68, s), p, o, m) +# define BOOST_PP_FOR_68_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(69, s) BOOST_PP_IIF(c, BOOST_PP_FOR_69, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(69, s), p, o, m) +# define BOOST_PP_FOR_69_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(70, s) BOOST_PP_IIF(c, BOOST_PP_FOR_70, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(70, s), p, o, m) +# define BOOST_PP_FOR_70_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(71, s) BOOST_PP_IIF(c, BOOST_PP_FOR_71, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(71, s), p, o, m) +# define BOOST_PP_FOR_71_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(72, s) BOOST_PP_IIF(c, BOOST_PP_FOR_72, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(72, s), p, o, m) +# define BOOST_PP_FOR_72_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(73, s) BOOST_PP_IIF(c, BOOST_PP_FOR_73, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(73, s), p, o, m) +# define BOOST_PP_FOR_73_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(74, s) BOOST_PP_IIF(c, BOOST_PP_FOR_74, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(74, s), p, o, m) +# define BOOST_PP_FOR_74_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(75, s) BOOST_PP_IIF(c, BOOST_PP_FOR_75, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(75, s), p, o, m) +# define BOOST_PP_FOR_75_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(76, s) BOOST_PP_IIF(c, BOOST_PP_FOR_76, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(76, s), p, o, m) +# define BOOST_PP_FOR_76_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(77, s) BOOST_PP_IIF(c, BOOST_PP_FOR_77, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(77, s), p, o, m) +# define BOOST_PP_FOR_77_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(78, s) BOOST_PP_IIF(c, BOOST_PP_FOR_78, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(78, s), p, o, m) +# define BOOST_PP_FOR_78_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(79, s) BOOST_PP_IIF(c, BOOST_PP_FOR_79, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(79, s), p, o, m) +# define BOOST_PP_FOR_79_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(80, s) BOOST_PP_IIF(c, BOOST_PP_FOR_80, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(80, s), p, o, m) +# define BOOST_PP_FOR_80_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(81, s) BOOST_PP_IIF(c, BOOST_PP_FOR_81, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(81, s), p, o, m) +# define BOOST_PP_FOR_81_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(82, s) BOOST_PP_IIF(c, BOOST_PP_FOR_82, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(82, s), p, o, m) +# define BOOST_PP_FOR_82_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(83, s) BOOST_PP_IIF(c, BOOST_PP_FOR_83, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(83, s), p, o, m) +# define BOOST_PP_FOR_83_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(84, s) BOOST_PP_IIF(c, BOOST_PP_FOR_84, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(84, s), p, o, m) +# define BOOST_PP_FOR_84_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(85, s) BOOST_PP_IIF(c, BOOST_PP_FOR_85, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(85, s), p, o, m) +# define BOOST_PP_FOR_85_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(86, s) BOOST_PP_IIF(c, BOOST_PP_FOR_86, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(86, s), p, o, m) +# define BOOST_PP_FOR_86_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(87, s) BOOST_PP_IIF(c, BOOST_PP_FOR_87, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(87, s), p, o, m) +# define BOOST_PP_FOR_87_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(88, s) BOOST_PP_IIF(c, BOOST_PP_FOR_88, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(88, s), p, o, m) +# define BOOST_PP_FOR_88_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(89, s) BOOST_PP_IIF(c, BOOST_PP_FOR_89, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(89, s), p, o, m) +# define BOOST_PP_FOR_89_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(90, s) BOOST_PP_IIF(c, BOOST_PP_FOR_90, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(90, s), p, o, m) +# define BOOST_PP_FOR_90_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(91, s) BOOST_PP_IIF(c, BOOST_PP_FOR_91, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(91, s), p, o, m) +# define BOOST_PP_FOR_91_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(92, s) BOOST_PP_IIF(c, BOOST_PP_FOR_92, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(92, s), p, o, m) +# define BOOST_PP_FOR_92_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(93, s) BOOST_PP_IIF(c, BOOST_PP_FOR_93, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(93, s), p, o, m) +# define BOOST_PP_FOR_93_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(94, s) BOOST_PP_IIF(c, BOOST_PP_FOR_94, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(94, s), p, o, m) +# define BOOST_PP_FOR_94_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(95, s) BOOST_PP_IIF(c, BOOST_PP_FOR_95, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(95, s), p, o, m) +# define BOOST_PP_FOR_95_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(96, s) BOOST_PP_IIF(c, BOOST_PP_FOR_96, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(96, s), p, o, m) +# define BOOST_PP_FOR_96_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(97, s) BOOST_PP_IIF(c, BOOST_PP_FOR_97, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(97, s), p, o, m) +# define BOOST_PP_FOR_97_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(98, s) BOOST_PP_IIF(c, BOOST_PP_FOR_98, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(98, s), p, o, m) +# define BOOST_PP_FOR_98_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(99, s) BOOST_PP_IIF(c, BOOST_PP_FOR_99, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(99, s), p, o, m) +# define BOOST_PP_FOR_99_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(100, s) BOOST_PP_IIF(c, BOOST_PP_FOR_100, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(100, s), p, o, m) +# define BOOST_PP_FOR_100_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(101, s) BOOST_PP_IIF(c, BOOST_PP_FOR_101, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(101, s), p, o, m) +# define BOOST_PP_FOR_101_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(102, s) BOOST_PP_IIF(c, BOOST_PP_FOR_102, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(102, s), p, o, m) +# define BOOST_PP_FOR_102_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(103, s) BOOST_PP_IIF(c, BOOST_PP_FOR_103, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(103, s), p, o, m) +# define BOOST_PP_FOR_103_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(104, s) BOOST_PP_IIF(c, BOOST_PP_FOR_104, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(104, s), p, o, m) +# define BOOST_PP_FOR_104_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(105, s) BOOST_PP_IIF(c, BOOST_PP_FOR_105, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(105, s), p, o, m) +# define BOOST_PP_FOR_105_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(106, s) BOOST_PP_IIF(c, BOOST_PP_FOR_106, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(106, s), p, o, m) +# define BOOST_PP_FOR_106_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(107, s) BOOST_PP_IIF(c, BOOST_PP_FOR_107, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(107, s), p, o, m) +# define BOOST_PP_FOR_107_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(108, s) BOOST_PP_IIF(c, BOOST_PP_FOR_108, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(108, s), p, o, m) +# define BOOST_PP_FOR_108_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(109, s) BOOST_PP_IIF(c, BOOST_PP_FOR_109, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(109, s), p, o, m) +# define BOOST_PP_FOR_109_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(110, s) BOOST_PP_IIF(c, BOOST_PP_FOR_110, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(110, s), p, o, m) +# define BOOST_PP_FOR_110_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(111, s) BOOST_PP_IIF(c, BOOST_PP_FOR_111, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(111, s), p, o, m) +# define BOOST_PP_FOR_111_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(112, s) BOOST_PP_IIF(c, BOOST_PP_FOR_112, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(112, s), p, o, m) +# define BOOST_PP_FOR_112_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(113, s) BOOST_PP_IIF(c, BOOST_PP_FOR_113, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(113, s), p, o, m) +# define BOOST_PP_FOR_113_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(114, s) BOOST_PP_IIF(c, BOOST_PP_FOR_114, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(114, s), p, o, m) +# define BOOST_PP_FOR_114_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(115, s) BOOST_PP_IIF(c, BOOST_PP_FOR_115, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(115, s), p, o, m) +# define BOOST_PP_FOR_115_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(116, s) BOOST_PP_IIF(c, BOOST_PP_FOR_116, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(116, s), p, o, m) +# define BOOST_PP_FOR_116_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(117, s) BOOST_PP_IIF(c, BOOST_PP_FOR_117, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(117, s), p, o, m) +# define BOOST_PP_FOR_117_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(118, s) BOOST_PP_IIF(c, BOOST_PP_FOR_118, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(118, s), p, o, m) +# define BOOST_PP_FOR_118_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(119, s) BOOST_PP_IIF(c, BOOST_PP_FOR_119, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(119, s), p, o, m) +# define BOOST_PP_FOR_119_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(120, s) BOOST_PP_IIF(c, BOOST_PP_FOR_120, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(120, s), p, o, m) +# define BOOST_PP_FOR_120_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(121, s) BOOST_PP_IIF(c, BOOST_PP_FOR_121, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(121, s), p, o, m) +# define BOOST_PP_FOR_121_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(122, s) BOOST_PP_IIF(c, BOOST_PP_FOR_122, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(122, s), p, o, m) +# define BOOST_PP_FOR_122_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(123, s) BOOST_PP_IIF(c, BOOST_PP_FOR_123, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(123, s), p, o, m) +# define BOOST_PP_FOR_123_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(124, s) BOOST_PP_IIF(c, BOOST_PP_FOR_124, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(124, s), p, o, m) +# define BOOST_PP_FOR_124_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(125, s) BOOST_PP_IIF(c, BOOST_PP_FOR_125, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(125, s), p, o, m) +# define BOOST_PP_FOR_125_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(126, s) BOOST_PP_IIF(c, BOOST_PP_FOR_126, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(126, s), p, o, m) +# define BOOST_PP_FOR_126_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(127, s) BOOST_PP_IIF(c, BOOST_PP_FOR_127, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(127, s), p, o, m) +# define BOOST_PP_FOR_127_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(128, s) BOOST_PP_IIF(c, BOOST_PP_FOR_128, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(128, s), p, o, m) +# define BOOST_PP_FOR_128_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(129, s) BOOST_PP_IIF(c, BOOST_PP_FOR_129, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(129, s), p, o, m) +# define BOOST_PP_FOR_129_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(130, s) BOOST_PP_IIF(c, BOOST_PP_FOR_130, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(130, s), p, o, m) +# define BOOST_PP_FOR_130_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(131, s) BOOST_PP_IIF(c, BOOST_PP_FOR_131, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(131, s), p, o, m) +# define BOOST_PP_FOR_131_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(132, s) BOOST_PP_IIF(c, BOOST_PP_FOR_132, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(132, s), p, o, m) +# define BOOST_PP_FOR_132_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(133, s) BOOST_PP_IIF(c, BOOST_PP_FOR_133, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(133, s), p, o, m) +# define BOOST_PP_FOR_133_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(134, s) BOOST_PP_IIF(c, BOOST_PP_FOR_134, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(134, s), p, o, m) +# define BOOST_PP_FOR_134_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(135, s) BOOST_PP_IIF(c, BOOST_PP_FOR_135, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(135, s), p, o, m) +# define BOOST_PP_FOR_135_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(136, s) BOOST_PP_IIF(c, BOOST_PP_FOR_136, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(136, s), p, o, m) +# define BOOST_PP_FOR_136_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(137, s) BOOST_PP_IIF(c, BOOST_PP_FOR_137, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(137, s), p, o, m) +# define BOOST_PP_FOR_137_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(138, s) BOOST_PP_IIF(c, BOOST_PP_FOR_138, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(138, s), p, o, m) +# define BOOST_PP_FOR_138_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(139, s) BOOST_PP_IIF(c, BOOST_PP_FOR_139, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(139, s), p, o, m) +# define BOOST_PP_FOR_139_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(140, s) BOOST_PP_IIF(c, BOOST_PP_FOR_140, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(140, s), p, o, m) +# define BOOST_PP_FOR_140_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(141, s) BOOST_PP_IIF(c, BOOST_PP_FOR_141, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(141, s), p, o, m) +# define BOOST_PP_FOR_141_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(142, s) BOOST_PP_IIF(c, BOOST_PP_FOR_142, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(142, s), p, o, m) +# define BOOST_PP_FOR_142_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(143, s) BOOST_PP_IIF(c, BOOST_PP_FOR_143, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(143, s), p, o, m) +# define BOOST_PP_FOR_143_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(144, s) BOOST_PP_IIF(c, BOOST_PP_FOR_144, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(144, s), p, o, m) +# define BOOST_PP_FOR_144_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(145, s) BOOST_PP_IIF(c, BOOST_PP_FOR_145, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(145, s), p, o, m) +# define BOOST_PP_FOR_145_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(146, s) BOOST_PP_IIF(c, BOOST_PP_FOR_146, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(146, s), p, o, m) +# define BOOST_PP_FOR_146_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(147, s) BOOST_PP_IIF(c, BOOST_PP_FOR_147, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(147, s), p, o, m) +# define BOOST_PP_FOR_147_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(148, s) BOOST_PP_IIF(c, BOOST_PP_FOR_148, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(148, s), p, o, m) +# define BOOST_PP_FOR_148_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(149, s) BOOST_PP_IIF(c, BOOST_PP_FOR_149, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(149, s), p, o, m) +# define BOOST_PP_FOR_149_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(150, s) BOOST_PP_IIF(c, BOOST_PP_FOR_150, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(150, s), p, o, m) +# define BOOST_PP_FOR_150_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(151, s) BOOST_PP_IIF(c, BOOST_PP_FOR_151, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(151, s), p, o, m) +# define BOOST_PP_FOR_151_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(152, s) BOOST_PP_IIF(c, BOOST_PP_FOR_152, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(152, s), p, o, m) +# define BOOST_PP_FOR_152_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(153, s) BOOST_PP_IIF(c, BOOST_PP_FOR_153, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(153, s), p, o, m) +# define BOOST_PP_FOR_153_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(154, s) BOOST_PP_IIF(c, BOOST_PP_FOR_154, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(154, s), p, o, m) +# define BOOST_PP_FOR_154_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(155, s) BOOST_PP_IIF(c, BOOST_PP_FOR_155, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(155, s), p, o, m) +# define BOOST_PP_FOR_155_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(156, s) BOOST_PP_IIF(c, BOOST_PP_FOR_156, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(156, s), p, o, m) +# define BOOST_PP_FOR_156_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(157, s) BOOST_PP_IIF(c, BOOST_PP_FOR_157, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(157, s), p, o, m) +# define BOOST_PP_FOR_157_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(158, s) BOOST_PP_IIF(c, BOOST_PP_FOR_158, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(158, s), p, o, m) +# define BOOST_PP_FOR_158_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(159, s) BOOST_PP_IIF(c, BOOST_PP_FOR_159, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(159, s), p, o, m) +# define BOOST_PP_FOR_159_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(160, s) BOOST_PP_IIF(c, BOOST_PP_FOR_160, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(160, s), p, o, m) +# define BOOST_PP_FOR_160_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(161, s) BOOST_PP_IIF(c, BOOST_PP_FOR_161, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(161, s), p, o, m) +# define BOOST_PP_FOR_161_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(162, s) BOOST_PP_IIF(c, BOOST_PP_FOR_162, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(162, s), p, o, m) +# define BOOST_PP_FOR_162_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(163, s) BOOST_PP_IIF(c, BOOST_PP_FOR_163, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(163, s), p, o, m) +# define BOOST_PP_FOR_163_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(164, s) BOOST_PP_IIF(c, BOOST_PP_FOR_164, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(164, s), p, o, m) +# define BOOST_PP_FOR_164_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(165, s) BOOST_PP_IIF(c, BOOST_PP_FOR_165, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(165, s), p, o, m) +# define BOOST_PP_FOR_165_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(166, s) BOOST_PP_IIF(c, BOOST_PP_FOR_166, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(166, s), p, o, m) +# define BOOST_PP_FOR_166_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(167, s) BOOST_PP_IIF(c, BOOST_PP_FOR_167, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(167, s), p, o, m) +# define BOOST_PP_FOR_167_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(168, s) BOOST_PP_IIF(c, BOOST_PP_FOR_168, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(168, s), p, o, m) +# define BOOST_PP_FOR_168_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(169, s) BOOST_PP_IIF(c, BOOST_PP_FOR_169, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(169, s), p, o, m) +# define BOOST_PP_FOR_169_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(170, s) BOOST_PP_IIF(c, BOOST_PP_FOR_170, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(170, s), p, o, m) +# define BOOST_PP_FOR_170_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(171, s) BOOST_PP_IIF(c, BOOST_PP_FOR_171, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(171, s), p, o, m) +# define BOOST_PP_FOR_171_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(172, s) BOOST_PP_IIF(c, BOOST_PP_FOR_172, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(172, s), p, o, m) +# define BOOST_PP_FOR_172_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(173, s) BOOST_PP_IIF(c, BOOST_PP_FOR_173, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(173, s), p, o, m) +# define BOOST_PP_FOR_173_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(174, s) BOOST_PP_IIF(c, BOOST_PP_FOR_174, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(174, s), p, o, m) +# define BOOST_PP_FOR_174_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(175, s) BOOST_PP_IIF(c, BOOST_PP_FOR_175, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(175, s), p, o, m) +# define BOOST_PP_FOR_175_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(176, s) BOOST_PP_IIF(c, BOOST_PP_FOR_176, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(176, s), p, o, m) +# define BOOST_PP_FOR_176_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(177, s) BOOST_PP_IIF(c, BOOST_PP_FOR_177, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(177, s), p, o, m) +# define BOOST_PP_FOR_177_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(178, s) BOOST_PP_IIF(c, BOOST_PP_FOR_178, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(178, s), p, o, m) +# define BOOST_PP_FOR_178_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(179, s) BOOST_PP_IIF(c, BOOST_PP_FOR_179, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(179, s), p, o, m) +# define BOOST_PP_FOR_179_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(180, s) BOOST_PP_IIF(c, BOOST_PP_FOR_180, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(180, s), p, o, m) +# define BOOST_PP_FOR_180_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(181, s) BOOST_PP_IIF(c, BOOST_PP_FOR_181, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(181, s), p, o, m) +# define BOOST_PP_FOR_181_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(182, s) BOOST_PP_IIF(c, BOOST_PP_FOR_182, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(182, s), p, o, m) +# define BOOST_PP_FOR_182_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(183, s) BOOST_PP_IIF(c, BOOST_PP_FOR_183, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(183, s), p, o, m) +# define BOOST_PP_FOR_183_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(184, s) BOOST_PP_IIF(c, BOOST_PP_FOR_184, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(184, s), p, o, m) +# define BOOST_PP_FOR_184_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(185, s) BOOST_PP_IIF(c, BOOST_PP_FOR_185, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(185, s), p, o, m) +# define BOOST_PP_FOR_185_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(186, s) BOOST_PP_IIF(c, BOOST_PP_FOR_186, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(186, s), p, o, m) +# define BOOST_PP_FOR_186_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(187, s) BOOST_PP_IIF(c, BOOST_PP_FOR_187, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(187, s), p, o, m) +# define BOOST_PP_FOR_187_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(188, s) BOOST_PP_IIF(c, BOOST_PP_FOR_188, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(188, s), p, o, m) +# define BOOST_PP_FOR_188_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(189, s) BOOST_PP_IIF(c, BOOST_PP_FOR_189, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(189, s), p, o, m) +# define BOOST_PP_FOR_189_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(190, s) BOOST_PP_IIF(c, BOOST_PP_FOR_190, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(190, s), p, o, m) +# define BOOST_PP_FOR_190_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(191, s) BOOST_PP_IIF(c, BOOST_PP_FOR_191, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(191, s), p, o, m) +# define BOOST_PP_FOR_191_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(192, s) BOOST_PP_IIF(c, BOOST_PP_FOR_192, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(192, s), p, o, m) +# define BOOST_PP_FOR_192_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(193, s) BOOST_PP_IIF(c, BOOST_PP_FOR_193, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(193, s), p, o, m) +# define BOOST_PP_FOR_193_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(194, s) BOOST_PP_IIF(c, BOOST_PP_FOR_194, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(194, s), p, o, m) +# define BOOST_PP_FOR_194_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(195, s) BOOST_PP_IIF(c, BOOST_PP_FOR_195, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(195, s), p, o, m) +# define BOOST_PP_FOR_195_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(196, s) BOOST_PP_IIF(c, BOOST_PP_FOR_196, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(196, s), p, o, m) +# define BOOST_PP_FOR_196_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(197, s) BOOST_PP_IIF(c, BOOST_PP_FOR_197, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(197, s), p, o, m) +# define BOOST_PP_FOR_197_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(198, s) BOOST_PP_IIF(c, BOOST_PP_FOR_198, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(198, s), p, o, m) +# define BOOST_PP_FOR_198_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(199, s) BOOST_PP_IIF(c, BOOST_PP_FOR_199, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(199, s), p, o, m) +# define BOOST_PP_FOR_199_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(200, s) BOOST_PP_IIF(c, BOOST_PP_FOR_200, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(200, s), p, o, m) +# define BOOST_PP_FOR_200_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(201, s) BOOST_PP_IIF(c, BOOST_PP_FOR_201, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(201, s), p, o, m) +# define BOOST_PP_FOR_201_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(202, s) BOOST_PP_IIF(c, BOOST_PP_FOR_202, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(202, s), p, o, m) +# define BOOST_PP_FOR_202_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(203, s) BOOST_PP_IIF(c, BOOST_PP_FOR_203, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(203, s), p, o, m) +# define BOOST_PP_FOR_203_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(204, s) BOOST_PP_IIF(c, BOOST_PP_FOR_204, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(204, s), p, o, m) +# define BOOST_PP_FOR_204_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(205, s) BOOST_PP_IIF(c, BOOST_PP_FOR_205, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(205, s), p, o, m) +# define BOOST_PP_FOR_205_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(206, s) BOOST_PP_IIF(c, BOOST_PP_FOR_206, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(206, s), p, o, m) +# define BOOST_PP_FOR_206_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(207, s) BOOST_PP_IIF(c, BOOST_PP_FOR_207, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(207, s), p, o, m) +# define BOOST_PP_FOR_207_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(208, s) BOOST_PP_IIF(c, BOOST_PP_FOR_208, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(208, s), p, o, m) +# define BOOST_PP_FOR_208_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(209, s) BOOST_PP_IIF(c, BOOST_PP_FOR_209, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(209, s), p, o, m) +# define BOOST_PP_FOR_209_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(210, s) BOOST_PP_IIF(c, BOOST_PP_FOR_210, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(210, s), p, o, m) +# define BOOST_PP_FOR_210_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(211, s) BOOST_PP_IIF(c, BOOST_PP_FOR_211, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(211, s), p, o, m) +# define BOOST_PP_FOR_211_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(212, s) BOOST_PP_IIF(c, BOOST_PP_FOR_212, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(212, s), p, o, m) +# define BOOST_PP_FOR_212_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(213, s) BOOST_PP_IIF(c, BOOST_PP_FOR_213, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(213, s), p, o, m) +# define BOOST_PP_FOR_213_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(214, s) BOOST_PP_IIF(c, BOOST_PP_FOR_214, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(214, s), p, o, m) +# define BOOST_PP_FOR_214_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(215, s) BOOST_PP_IIF(c, BOOST_PP_FOR_215, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(215, s), p, o, m) +# define BOOST_PP_FOR_215_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(216, s) BOOST_PP_IIF(c, BOOST_PP_FOR_216, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(216, s), p, o, m) +# define BOOST_PP_FOR_216_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(217, s) BOOST_PP_IIF(c, BOOST_PP_FOR_217, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(217, s), p, o, m) +# define BOOST_PP_FOR_217_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(218, s) BOOST_PP_IIF(c, BOOST_PP_FOR_218, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(218, s), p, o, m) +# define BOOST_PP_FOR_218_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(219, s) BOOST_PP_IIF(c, BOOST_PP_FOR_219, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(219, s), p, o, m) +# define BOOST_PP_FOR_219_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(220, s) BOOST_PP_IIF(c, BOOST_PP_FOR_220, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(220, s), p, o, m) +# define BOOST_PP_FOR_220_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(221, s) BOOST_PP_IIF(c, BOOST_PP_FOR_221, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(221, s), p, o, m) +# define BOOST_PP_FOR_221_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(222, s) BOOST_PP_IIF(c, BOOST_PP_FOR_222, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(222, s), p, o, m) +# define BOOST_PP_FOR_222_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(223, s) BOOST_PP_IIF(c, BOOST_PP_FOR_223, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(223, s), p, o, m) +# define BOOST_PP_FOR_223_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(224, s) BOOST_PP_IIF(c, BOOST_PP_FOR_224, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(224, s), p, o, m) +# define BOOST_PP_FOR_224_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(225, s) BOOST_PP_IIF(c, BOOST_PP_FOR_225, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(225, s), p, o, m) +# define BOOST_PP_FOR_225_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(226, s) BOOST_PP_IIF(c, BOOST_PP_FOR_226, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(226, s), p, o, m) +# define BOOST_PP_FOR_226_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(227, s) BOOST_PP_IIF(c, BOOST_PP_FOR_227, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(227, s), p, o, m) +# define BOOST_PP_FOR_227_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(228, s) BOOST_PP_IIF(c, BOOST_PP_FOR_228, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(228, s), p, o, m) +# define BOOST_PP_FOR_228_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(229, s) BOOST_PP_IIF(c, BOOST_PP_FOR_229, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(229, s), p, o, m) +# define BOOST_PP_FOR_229_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(230, s) BOOST_PP_IIF(c, BOOST_PP_FOR_230, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(230, s), p, o, m) +# define BOOST_PP_FOR_230_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(231, s) BOOST_PP_IIF(c, BOOST_PP_FOR_231, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(231, s), p, o, m) +# define BOOST_PP_FOR_231_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(232, s) BOOST_PP_IIF(c, BOOST_PP_FOR_232, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(232, s), p, o, m) +# define BOOST_PP_FOR_232_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(233, s) BOOST_PP_IIF(c, BOOST_PP_FOR_233, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(233, s), p, o, m) +# define BOOST_PP_FOR_233_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(234, s) BOOST_PP_IIF(c, BOOST_PP_FOR_234, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(234, s), p, o, m) +# define BOOST_PP_FOR_234_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(235, s) BOOST_PP_IIF(c, BOOST_PP_FOR_235, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(235, s), p, o, m) +# define BOOST_PP_FOR_235_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(236, s) BOOST_PP_IIF(c, BOOST_PP_FOR_236, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(236, s), p, o, m) +# define BOOST_PP_FOR_236_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(237, s) BOOST_PP_IIF(c, BOOST_PP_FOR_237, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(237, s), p, o, m) +# define BOOST_PP_FOR_237_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(238, s) BOOST_PP_IIF(c, BOOST_PP_FOR_238, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(238, s), p, o, m) +# define BOOST_PP_FOR_238_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(239, s) BOOST_PP_IIF(c, BOOST_PP_FOR_239, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(239, s), p, o, m) +# define BOOST_PP_FOR_239_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(240, s) BOOST_PP_IIF(c, BOOST_PP_FOR_240, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(240, s), p, o, m) +# define BOOST_PP_FOR_240_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(241, s) BOOST_PP_IIF(c, BOOST_PP_FOR_241, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(241, s), p, o, m) +# define BOOST_PP_FOR_241_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(242, s) BOOST_PP_IIF(c, BOOST_PP_FOR_242, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(242, s), p, o, m) +# define BOOST_PP_FOR_242_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(243, s) BOOST_PP_IIF(c, BOOST_PP_FOR_243, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(243, s), p, o, m) +# define BOOST_PP_FOR_243_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(244, s) BOOST_PP_IIF(c, BOOST_PP_FOR_244, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(244, s), p, o, m) +# define BOOST_PP_FOR_244_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(245, s) BOOST_PP_IIF(c, BOOST_PP_FOR_245, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(245, s), p, o, m) +# define BOOST_PP_FOR_245_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(246, s) BOOST_PP_IIF(c, BOOST_PP_FOR_246, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(246, s), p, o, m) +# define BOOST_PP_FOR_246_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(247, s) BOOST_PP_IIF(c, BOOST_PP_FOR_247, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(247, s), p, o, m) +# define BOOST_PP_FOR_247_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(248, s) BOOST_PP_IIF(c, BOOST_PP_FOR_248, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(248, s), p, o, m) +# define BOOST_PP_FOR_248_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(249, s) BOOST_PP_IIF(c, BOOST_PP_FOR_249, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(249, s), p, o, m) +# define BOOST_PP_FOR_249_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(250, s) BOOST_PP_IIF(c, BOOST_PP_FOR_250, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(250, s), p, o, m) +# define BOOST_PP_FOR_250_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(251, s) BOOST_PP_IIF(c, BOOST_PP_FOR_251, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(251, s), p, o, m) +# define BOOST_PP_FOR_251_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(252, s) BOOST_PP_IIF(c, BOOST_PP_FOR_252, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(252, s), p, o, m) +# define BOOST_PP_FOR_252_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(253, s) BOOST_PP_IIF(c, BOOST_PP_FOR_253, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(253, s), p, o, m) +# define BOOST_PP_FOR_253_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(254, s) BOOST_PP_IIF(c, BOOST_PP_FOR_254, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(254, s), p, o, m) +# define BOOST_PP_FOR_254_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(255, s) BOOST_PP_IIF(c, BOOST_PP_FOR_255, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(255, s), p, o, m) +# define BOOST_PP_FOR_255_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(256, s) BOOST_PP_IIF(c, BOOST_PP_FOR_256, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(256, s), p, o, m) +# define BOOST_PP_FOR_256_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(257, s) BOOST_PP_IIF(c, BOOST_PP_FOR_257, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(257, s), p, o, m) +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/repetition/detail/edg/for.hpp b/ThirdParty/boost-Subset/boost/preprocessor/repetition/detail/edg/for.hpp new file mode 100644 index 0000000000..212921a63c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/repetition/detail/edg/for.hpp @@ -0,0 +1,534 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_DETAIL_EDG_FOR_HPP +# define BOOST_PREPROCESSOR_REPETITION_DETAIL_EDG_FOR_HPP +# +# include +# include +# +# define BOOST_PP_FOR_1(s, p, o, m) BOOST_PP_FOR_1_I(s, p, o, m) +# define BOOST_PP_FOR_2(s, p, o, m) BOOST_PP_FOR_2_I(s, p, o, m) +# define BOOST_PP_FOR_3(s, p, o, m) BOOST_PP_FOR_3_I(s, p, o, m) +# define BOOST_PP_FOR_4(s, p, o, m) BOOST_PP_FOR_4_I(s, p, o, m) +# define BOOST_PP_FOR_5(s, p, o, m) BOOST_PP_FOR_5_I(s, p, o, m) +# define BOOST_PP_FOR_6(s, p, o, m) BOOST_PP_FOR_6_I(s, p, o, m) +# define BOOST_PP_FOR_7(s, p, o, m) BOOST_PP_FOR_7_I(s, p, o, m) +# define BOOST_PP_FOR_8(s, p, o, m) BOOST_PP_FOR_8_I(s, p, o, m) +# define BOOST_PP_FOR_9(s, p, o, m) BOOST_PP_FOR_9_I(s, p, o, m) +# define BOOST_PP_FOR_10(s, p, o, m) BOOST_PP_FOR_10_I(s, p, o, m) +# define BOOST_PP_FOR_11(s, p, o, m) BOOST_PP_FOR_11_I(s, p, o, m) +# define BOOST_PP_FOR_12(s, p, o, m) BOOST_PP_FOR_12_I(s, p, o, m) +# define BOOST_PP_FOR_13(s, p, o, m) BOOST_PP_FOR_13_I(s, p, o, m) +# define BOOST_PP_FOR_14(s, p, o, m) BOOST_PP_FOR_14_I(s, p, o, m) +# define BOOST_PP_FOR_15(s, p, o, m) BOOST_PP_FOR_15_I(s, p, o, m) +# define BOOST_PP_FOR_16(s, p, o, m) BOOST_PP_FOR_16_I(s, p, o, m) +# define BOOST_PP_FOR_17(s, p, o, m) BOOST_PP_FOR_17_I(s, p, o, m) +# define BOOST_PP_FOR_18(s, p, o, m) BOOST_PP_FOR_18_I(s, p, o, m) +# define BOOST_PP_FOR_19(s, p, o, m) BOOST_PP_FOR_19_I(s, p, o, m) +# define BOOST_PP_FOR_20(s, p, o, m) BOOST_PP_FOR_20_I(s, p, o, m) +# define BOOST_PP_FOR_21(s, p, o, m) BOOST_PP_FOR_21_I(s, p, o, m) +# define BOOST_PP_FOR_22(s, p, o, m) BOOST_PP_FOR_22_I(s, p, o, m) +# define BOOST_PP_FOR_23(s, p, o, m) BOOST_PP_FOR_23_I(s, p, o, m) +# define BOOST_PP_FOR_24(s, p, o, m) BOOST_PP_FOR_24_I(s, p, o, m) +# define BOOST_PP_FOR_25(s, p, o, m) BOOST_PP_FOR_25_I(s, p, o, m) +# define BOOST_PP_FOR_26(s, p, o, m) BOOST_PP_FOR_26_I(s, p, o, m) +# define BOOST_PP_FOR_27(s, p, o, m) BOOST_PP_FOR_27_I(s, p, o, m) +# define BOOST_PP_FOR_28(s, p, o, m) BOOST_PP_FOR_28_I(s, p, o, m) +# define BOOST_PP_FOR_29(s, p, o, m) BOOST_PP_FOR_29_I(s, p, o, m) +# define BOOST_PP_FOR_30(s, p, o, m) BOOST_PP_FOR_30_I(s, p, o, m) +# define BOOST_PP_FOR_31(s, p, o, m) BOOST_PP_FOR_31_I(s, p, o, m) +# define BOOST_PP_FOR_32(s, p, o, m) BOOST_PP_FOR_32_I(s, p, o, m) +# define BOOST_PP_FOR_33(s, p, o, m) BOOST_PP_FOR_33_I(s, p, o, m) +# define BOOST_PP_FOR_34(s, p, o, m) BOOST_PP_FOR_34_I(s, p, o, m) +# define BOOST_PP_FOR_35(s, p, o, m) BOOST_PP_FOR_35_I(s, p, o, m) +# define BOOST_PP_FOR_36(s, p, o, m) BOOST_PP_FOR_36_I(s, p, o, m) +# define BOOST_PP_FOR_37(s, p, o, m) BOOST_PP_FOR_37_I(s, p, o, m) +# define BOOST_PP_FOR_38(s, p, o, m) BOOST_PP_FOR_38_I(s, p, o, m) +# define BOOST_PP_FOR_39(s, p, o, m) BOOST_PP_FOR_39_I(s, p, o, m) +# define BOOST_PP_FOR_40(s, p, o, m) BOOST_PP_FOR_40_I(s, p, o, m) +# define BOOST_PP_FOR_41(s, p, o, m) BOOST_PP_FOR_41_I(s, p, o, m) +# define BOOST_PP_FOR_42(s, p, o, m) BOOST_PP_FOR_42_I(s, p, o, m) +# define BOOST_PP_FOR_43(s, p, o, m) BOOST_PP_FOR_43_I(s, p, o, m) +# define BOOST_PP_FOR_44(s, p, o, m) BOOST_PP_FOR_44_I(s, p, o, m) +# define BOOST_PP_FOR_45(s, p, o, m) BOOST_PP_FOR_45_I(s, p, o, m) +# define BOOST_PP_FOR_46(s, p, o, m) BOOST_PP_FOR_46_I(s, p, o, m) +# define BOOST_PP_FOR_47(s, p, o, m) BOOST_PP_FOR_47_I(s, p, o, m) +# define BOOST_PP_FOR_48(s, p, o, m) BOOST_PP_FOR_48_I(s, p, o, m) +# define BOOST_PP_FOR_49(s, p, o, m) BOOST_PP_FOR_49_I(s, p, o, m) +# define BOOST_PP_FOR_50(s, p, o, m) BOOST_PP_FOR_50_I(s, p, o, m) +# define BOOST_PP_FOR_51(s, p, o, m) BOOST_PP_FOR_51_I(s, p, o, m) +# define BOOST_PP_FOR_52(s, p, o, m) BOOST_PP_FOR_52_I(s, p, o, m) +# define BOOST_PP_FOR_53(s, p, o, m) BOOST_PP_FOR_53_I(s, p, o, m) +# define BOOST_PP_FOR_54(s, p, o, m) BOOST_PP_FOR_54_I(s, p, o, m) +# define BOOST_PP_FOR_55(s, p, o, m) BOOST_PP_FOR_55_I(s, p, o, m) +# define BOOST_PP_FOR_56(s, p, o, m) BOOST_PP_FOR_56_I(s, p, o, m) +# define BOOST_PP_FOR_57(s, p, o, m) BOOST_PP_FOR_57_I(s, p, o, m) +# define BOOST_PP_FOR_58(s, p, o, m) BOOST_PP_FOR_58_I(s, p, o, m) +# define BOOST_PP_FOR_59(s, p, o, m) BOOST_PP_FOR_59_I(s, p, o, m) +# define BOOST_PP_FOR_60(s, p, o, m) BOOST_PP_FOR_60_I(s, p, o, m) +# define BOOST_PP_FOR_61(s, p, o, m) BOOST_PP_FOR_61_I(s, p, o, m) +# define BOOST_PP_FOR_62(s, p, o, m) BOOST_PP_FOR_62_I(s, p, o, m) +# define BOOST_PP_FOR_63(s, p, o, m) BOOST_PP_FOR_63_I(s, p, o, m) +# define BOOST_PP_FOR_64(s, p, o, m) BOOST_PP_FOR_64_I(s, p, o, m) +# define BOOST_PP_FOR_65(s, p, o, m) BOOST_PP_FOR_65_I(s, p, o, m) +# define BOOST_PP_FOR_66(s, p, o, m) BOOST_PP_FOR_66_I(s, p, o, m) +# define BOOST_PP_FOR_67(s, p, o, m) BOOST_PP_FOR_67_I(s, p, o, m) +# define BOOST_PP_FOR_68(s, p, o, m) BOOST_PP_FOR_68_I(s, p, o, m) +# define BOOST_PP_FOR_69(s, p, o, m) BOOST_PP_FOR_69_I(s, p, o, m) +# define BOOST_PP_FOR_70(s, p, o, m) BOOST_PP_FOR_70_I(s, p, o, m) +# define BOOST_PP_FOR_71(s, p, o, m) BOOST_PP_FOR_71_I(s, p, o, m) +# define BOOST_PP_FOR_72(s, p, o, m) BOOST_PP_FOR_72_I(s, p, o, m) +# define BOOST_PP_FOR_73(s, p, o, m) BOOST_PP_FOR_73_I(s, p, o, m) +# define BOOST_PP_FOR_74(s, p, o, m) BOOST_PP_FOR_74_I(s, p, o, m) +# define BOOST_PP_FOR_75(s, p, o, m) BOOST_PP_FOR_75_I(s, p, o, m) +# define BOOST_PP_FOR_76(s, p, o, m) BOOST_PP_FOR_76_I(s, p, o, m) +# define BOOST_PP_FOR_77(s, p, o, m) BOOST_PP_FOR_77_I(s, p, o, m) +# define BOOST_PP_FOR_78(s, p, o, m) BOOST_PP_FOR_78_I(s, p, o, m) +# define BOOST_PP_FOR_79(s, p, o, m) BOOST_PP_FOR_79_I(s, p, o, m) +# define BOOST_PP_FOR_80(s, p, o, m) BOOST_PP_FOR_80_I(s, p, o, m) +# define BOOST_PP_FOR_81(s, p, o, m) BOOST_PP_FOR_81_I(s, p, o, m) +# define BOOST_PP_FOR_82(s, p, o, m) BOOST_PP_FOR_82_I(s, p, o, m) +# define BOOST_PP_FOR_83(s, p, o, m) BOOST_PP_FOR_83_I(s, p, o, m) +# define BOOST_PP_FOR_84(s, p, o, m) BOOST_PP_FOR_84_I(s, p, o, m) +# define BOOST_PP_FOR_85(s, p, o, m) BOOST_PP_FOR_85_I(s, p, o, m) +# define BOOST_PP_FOR_86(s, p, o, m) BOOST_PP_FOR_86_I(s, p, o, m) +# define BOOST_PP_FOR_87(s, p, o, m) BOOST_PP_FOR_87_I(s, p, o, m) +# define BOOST_PP_FOR_88(s, p, o, m) BOOST_PP_FOR_88_I(s, p, o, m) +# define BOOST_PP_FOR_89(s, p, o, m) BOOST_PP_FOR_89_I(s, p, o, m) +# define BOOST_PP_FOR_90(s, p, o, m) BOOST_PP_FOR_90_I(s, p, o, m) +# define BOOST_PP_FOR_91(s, p, o, m) BOOST_PP_FOR_91_I(s, p, o, m) +# define BOOST_PP_FOR_92(s, p, o, m) BOOST_PP_FOR_92_I(s, p, o, m) +# define BOOST_PP_FOR_93(s, p, o, m) BOOST_PP_FOR_93_I(s, p, o, m) +# define BOOST_PP_FOR_94(s, p, o, m) BOOST_PP_FOR_94_I(s, p, o, m) +# define BOOST_PP_FOR_95(s, p, o, m) BOOST_PP_FOR_95_I(s, p, o, m) +# define BOOST_PP_FOR_96(s, p, o, m) BOOST_PP_FOR_96_I(s, p, o, m) +# define BOOST_PP_FOR_97(s, p, o, m) BOOST_PP_FOR_97_I(s, p, o, m) +# define BOOST_PP_FOR_98(s, p, o, m) BOOST_PP_FOR_98_I(s, p, o, m) +# define BOOST_PP_FOR_99(s, p, o, m) BOOST_PP_FOR_99_I(s, p, o, m) +# define BOOST_PP_FOR_100(s, p, o, m) BOOST_PP_FOR_100_I(s, p, o, m) +# define BOOST_PP_FOR_101(s, p, o, m) BOOST_PP_FOR_101_I(s, p, o, m) +# define BOOST_PP_FOR_102(s, p, o, m) BOOST_PP_FOR_102_I(s, p, o, m) +# define BOOST_PP_FOR_103(s, p, o, m) BOOST_PP_FOR_103_I(s, p, o, m) +# define BOOST_PP_FOR_104(s, p, o, m) BOOST_PP_FOR_104_I(s, p, o, m) +# define BOOST_PP_FOR_105(s, p, o, m) BOOST_PP_FOR_105_I(s, p, o, m) +# define BOOST_PP_FOR_106(s, p, o, m) BOOST_PP_FOR_106_I(s, p, o, m) +# define BOOST_PP_FOR_107(s, p, o, m) BOOST_PP_FOR_107_I(s, p, o, m) +# define BOOST_PP_FOR_108(s, p, o, m) BOOST_PP_FOR_108_I(s, p, o, m) +# define BOOST_PP_FOR_109(s, p, o, m) BOOST_PP_FOR_109_I(s, p, o, m) +# define BOOST_PP_FOR_110(s, p, o, m) BOOST_PP_FOR_110_I(s, p, o, m) +# define BOOST_PP_FOR_111(s, p, o, m) BOOST_PP_FOR_111_I(s, p, o, m) +# define BOOST_PP_FOR_112(s, p, o, m) BOOST_PP_FOR_112_I(s, p, o, m) +# define BOOST_PP_FOR_113(s, p, o, m) BOOST_PP_FOR_113_I(s, p, o, m) +# define BOOST_PP_FOR_114(s, p, o, m) BOOST_PP_FOR_114_I(s, p, o, m) +# define BOOST_PP_FOR_115(s, p, o, m) BOOST_PP_FOR_115_I(s, p, o, m) +# define BOOST_PP_FOR_116(s, p, o, m) BOOST_PP_FOR_116_I(s, p, o, m) +# define BOOST_PP_FOR_117(s, p, o, m) BOOST_PP_FOR_117_I(s, p, o, m) +# define BOOST_PP_FOR_118(s, p, o, m) BOOST_PP_FOR_118_I(s, p, o, m) +# define BOOST_PP_FOR_119(s, p, o, m) BOOST_PP_FOR_119_I(s, p, o, m) +# define BOOST_PP_FOR_120(s, p, o, m) BOOST_PP_FOR_120_I(s, p, o, m) +# define BOOST_PP_FOR_121(s, p, o, m) BOOST_PP_FOR_121_I(s, p, o, m) +# define BOOST_PP_FOR_122(s, p, o, m) BOOST_PP_FOR_122_I(s, p, o, m) +# define BOOST_PP_FOR_123(s, p, o, m) BOOST_PP_FOR_123_I(s, p, o, m) +# define BOOST_PP_FOR_124(s, p, o, m) BOOST_PP_FOR_124_I(s, p, o, m) +# define BOOST_PP_FOR_125(s, p, o, m) BOOST_PP_FOR_125_I(s, p, o, m) +# define BOOST_PP_FOR_126(s, p, o, m) BOOST_PP_FOR_126_I(s, p, o, m) +# define BOOST_PP_FOR_127(s, p, o, m) BOOST_PP_FOR_127_I(s, p, o, m) +# define BOOST_PP_FOR_128(s, p, o, m) BOOST_PP_FOR_128_I(s, p, o, m) +# define BOOST_PP_FOR_129(s, p, o, m) BOOST_PP_FOR_129_I(s, p, o, m) +# define BOOST_PP_FOR_130(s, p, o, m) BOOST_PP_FOR_130_I(s, p, o, m) +# define BOOST_PP_FOR_131(s, p, o, m) BOOST_PP_FOR_131_I(s, p, o, m) +# define BOOST_PP_FOR_132(s, p, o, m) BOOST_PP_FOR_132_I(s, p, o, m) +# define BOOST_PP_FOR_133(s, p, o, m) BOOST_PP_FOR_133_I(s, p, o, m) +# define BOOST_PP_FOR_134(s, p, o, m) BOOST_PP_FOR_134_I(s, p, o, m) +# define BOOST_PP_FOR_135(s, p, o, m) BOOST_PP_FOR_135_I(s, p, o, m) +# define BOOST_PP_FOR_136(s, p, o, m) BOOST_PP_FOR_136_I(s, p, o, m) +# define BOOST_PP_FOR_137(s, p, o, m) BOOST_PP_FOR_137_I(s, p, o, m) +# define BOOST_PP_FOR_138(s, p, o, m) BOOST_PP_FOR_138_I(s, p, o, m) +# define BOOST_PP_FOR_139(s, p, o, m) BOOST_PP_FOR_139_I(s, p, o, m) +# define BOOST_PP_FOR_140(s, p, o, m) BOOST_PP_FOR_140_I(s, p, o, m) +# define BOOST_PP_FOR_141(s, p, o, m) BOOST_PP_FOR_141_I(s, p, o, m) +# define BOOST_PP_FOR_142(s, p, o, m) BOOST_PP_FOR_142_I(s, p, o, m) +# define BOOST_PP_FOR_143(s, p, o, m) BOOST_PP_FOR_143_I(s, p, o, m) +# define BOOST_PP_FOR_144(s, p, o, m) BOOST_PP_FOR_144_I(s, p, o, m) +# define BOOST_PP_FOR_145(s, p, o, m) BOOST_PP_FOR_145_I(s, p, o, m) +# define BOOST_PP_FOR_146(s, p, o, m) BOOST_PP_FOR_146_I(s, p, o, m) +# define BOOST_PP_FOR_147(s, p, o, m) BOOST_PP_FOR_147_I(s, p, o, m) +# define BOOST_PP_FOR_148(s, p, o, m) BOOST_PP_FOR_148_I(s, p, o, m) +# define BOOST_PP_FOR_149(s, p, o, m) BOOST_PP_FOR_149_I(s, p, o, m) +# define BOOST_PP_FOR_150(s, p, o, m) BOOST_PP_FOR_150_I(s, p, o, m) +# define BOOST_PP_FOR_151(s, p, o, m) BOOST_PP_FOR_151_I(s, p, o, m) +# define BOOST_PP_FOR_152(s, p, o, m) BOOST_PP_FOR_152_I(s, p, o, m) +# define BOOST_PP_FOR_153(s, p, o, m) BOOST_PP_FOR_153_I(s, p, o, m) +# define BOOST_PP_FOR_154(s, p, o, m) BOOST_PP_FOR_154_I(s, p, o, m) +# define BOOST_PP_FOR_155(s, p, o, m) BOOST_PP_FOR_155_I(s, p, o, m) +# define BOOST_PP_FOR_156(s, p, o, m) BOOST_PP_FOR_156_I(s, p, o, m) +# define BOOST_PP_FOR_157(s, p, o, m) BOOST_PP_FOR_157_I(s, p, o, m) +# define BOOST_PP_FOR_158(s, p, o, m) BOOST_PP_FOR_158_I(s, p, o, m) +# define BOOST_PP_FOR_159(s, p, o, m) BOOST_PP_FOR_159_I(s, p, o, m) +# define BOOST_PP_FOR_160(s, p, o, m) BOOST_PP_FOR_160_I(s, p, o, m) +# define BOOST_PP_FOR_161(s, p, o, m) BOOST_PP_FOR_161_I(s, p, o, m) +# define BOOST_PP_FOR_162(s, p, o, m) BOOST_PP_FOR_162_I(s, p, o, m) +# define BOOST_PP_FOR_163(s, p, o, m) BOOST_PP_FOR_163_I(s, p, o, m) +# define BOOST_PP_FOR_164(s, p, o, m) BOOST_PP_FOR_164_I(s, p, o, m) +# define BOOST_PP_FOR_165(s, p, o, m) BOOST_PP_FOR_165_I(s, p, o, m) +# define BOOST_PP_FOR_166(s, p, o, m) BOOST_PP_FOR_166_I(s, p, o, m) +# define BOOST_PP_FOR_167(s, p, o, m) BOOST_PP_FOR_167_I(s, p, o, m) +# define BOOST_PP_FOR_168(s, p, o, m) BOOST_PP_FOR_168_I(s, p, o, m) +# define BOOST_PP_FOR_169(s, p, o, m) BOOST_PP_FOR_169_I(s, p, o, m) +# define BOOST_PP_FOR_170(s, p, o, m) BOOST_PP_FOR_170_I(s, p, o, m) +# define BOOST_PP_FOR_171(s, p, o, m) BOOST_PP_FOR_171_I(s, p, o, m) +# define BOOST_PP_FOR_172(s, p, o, m) BOOST_PP_FOR_172_I(s, p, o, m) +# define BOOST_PP_FOR_173(s, p, o, m) BOOST_PP_FOR_173_I(s, p, o, m) +# define BOOST_PP_FOR_174(s, p, o, m) BOOST_PP_FOR_174_I(s, p, o, m) +# define BOOST_PP_FOR_175(s, p, o, m) BOOST_PP_FOR_175_I(s, p, o, m) +# define BOOST_PP_FOR_176(s, p, o, m) BOOST_PP_FOR_176_I(s, p, o, m) +# define BOOST_PP_FOR_177(s, p, o, m) BOOST_PP_FOR_177_I(s, p, o, m) +# define BOOST_PP_FOR_178(s, p, o, m) BOOST_PP_FOR_178_I(s, p, o, m) +# define BOOST_PP_FOR_179(s, p, o, m) BOOST_PP_FOR_179_I(s, p, o, m) +# define BOOST_PP_FOR_180(s, p, o, m) BOOST_PP_FOR_180_I(s, p, o, m) +# define BOOST_PP_FOR_181(s, p, o, m) BOOST_PP_FOR_181_I(s, p, o, m) +# define BOOST_PP_FOR_182(s, p, o, m) BOOST_PP_FOR_182_I(s, p, o, m) +# define BOOST_PP_FOR_183(s, p, o, m) BOOST_PP_FOR_183_I(s, p, o, m) +# define BOOST_PP_FOR_184(s, p, o, m) BOOST_PP_FOR_184_I(s, p, o, m) +# define BOOST_PP_FOR_185(s, p, o, m) BOOST_PP_FOR_185_I(s, p, o, m) +# define BOOST_PP_FOR_186(s, p, o, m) BOOST_PP_FOR_186_I(s, p, o, m) +# define BOOST_PP_FOR_187(s, p, o, m) BOOST_PP_FOR_187_I(s, p, o, m) +# define BOOST_PP_FOR_188(s, p, o, m) BOOST_PP_FOR_188_I(s, p, o, m) +# define BOOST_PP_FOR_189(s, p, o, m) BOOST_PP_FOR_189_I(s, p, o, m) +# define BOOST_PP_FOR_190(s, p, o, m) BOOST_PP_FOR_190_I(s, p, o, m) +# define BOOST_PP_FOR_191(s, p, o, m) BOOST_PP_FOR_191_I(s, p, o, m) +# define BOOST_PP_FOR_192(s, p, o, m) BOOST_PP_FOR_192_I(s, p, o, m) +# define BOOST_PP_FOR_193(s, p, o, m) BOOST_PP_FOR_193_I(s, p, o, m) +# define BOOST_PP_FOR_194(s, p, o, m) BOOST_PP_FOR_194_I(s, p, o, m) +# define BOOST_PP_FOR_195(s, p, o, m) BOOST_PP_FOR_195_I(s, p, o, m) +# define BOOST_PP_FOR_196(s, p, o, m) BOOST_PP_FOR_196_I(s, p, o, m) +# define BOOST_PP_FOR_197(s, p, o, m) BOOST_PP_FOR_197_I(s, p, o, m) +# define BOOST_PP_FOR_198(s, p, o, m) BOOST_PP_FOR_198_I(s, p, o, m) +# define BOOST_PP_FOR_199(s, p, o, m) BOOST_PP_FOR_199_I(s, p, o, m) +# define BOOST_PP_FOR_200(s, p, o, m) BOOST_PP_FOR_200_I(s, p, o, m) +# define BOOST_PP_FOR_201(s, p, o, m) BOOST_PP_FOR_201_I(s, p, o, m) +# define BOOST_PP_FOR_202(s, p, o, m) BOOST_PP_FOR_202_I(s, p, o, m) +# define BOOST_PP_FOR_203(s, p, o, m) BOOST_PP_FOR_203_I(s, p, o, m) +# define BOOST_PP_FOR_204(s, p, o, m) BOOST_PP_FOR_204_I(s, p, o, m) +# define BOOST_PP_FOR_205(s, p, o, m) BOOST_PP_FOR_205_I(s, p, o, m) +# define BOOST_PP_FOR_206(s, p, o, m) BOOST_PP_FOR_206_I(s, p, o, m) +# define BOOST_PP_FOR_207(s, p, o, m) BOOST_PP_FOR_207_I(s, p, o, m) +# define BOOST_PP_FOR_208(s, p, o, m) BOOST_PP_FOR_208_I(s, p, o, m) +# define BOOST_PP_FOR_209(s, p, o, m) BOOST_PP_FOR_209_I(s, p, o, m) +# define BOOST_PP_FOR_210(s, p, o, m) BOOST_PP_FOR_210_I(s, p, o, m) +# define BOOST_PP_FOR_211(s, p, o, m) BOOST_PP_FOR_211_I(s, p, o, m) +# define BOOST_PP_FOR_212(s, p, o, m) BOOST_PP_FOR_212_I(s, p, o, m) +# define BOOST_PP_FOR_213(s, p, o, m) BOOST_PP_FOR_213_I(s, p, o, m) +# define BOOST_PP_FOR_214(s, p, o, m) BOOST_PP_FOR_214_I(s, p, o, m) +# define BOOST_PP_FOR_215(s, p, o, m) BOOST_PP_FOR_215_I(s, p, o, m) +# define BOOST_PP_FOR_216(s, p, o, m) BOOST_PP_FOR_216_I(s, p, o, m) +# define BOOST_PP_FOR_217(s, p, o, m) BOOST_PP_FOR_217_I(s, p, o, m) +# define BOOST_PP_FOR_218(s, p, o, m) BOOST_PP_FOR_218_I(s, p, o, m) +# define BOOST_PP_FOR_219(s, p, o, m) BOOST_PP_FOR_219_I(s, p, o, m) +# define BOOST_PP_FOR_220(s, p, o, m) BOOST_PP_FOR_220_I(s, p, o, m) +# define BOOST_PP_FOR_221(s, p, o, m) BOOST_PP_FOR_221_I(s, p, o, m) +# define BOOST_PP_FOR_222(s, p, o, m) BOOST_PP_FOR_222_I(s, p, o, m) +# define BOOST_PP_FOR_223(s, p, o, m) BOOST_PP_FOR_223_I(s, p, o, m) +# define BOOST_PP_FOR_224(s, p, o, m) BOOST_PP_FOR_224_I(s, p, o, m) +# define BOOST_PP_FOR_225(s, p, o, m) BOOST_PP_FOR_225_I(s, p, o, m) +# define BOOST_PP_FOR_226(s, p, o, m) BOOST_PP_FOR_226_I(s, p, o, m) +# define BOOST_PP_FOR_227(s, p, o, m) BOOST_PP_FOR_227_I(s, p, o, m) +# define BOOST_PP_FOR_228(s, p, o, m) BOOST_PP_FOR_228_I(s, p, o, m) +# define BOOST_PP_FOR_229(s, p, o, m) BOOST_PP_FOR_229_I(s, p, o, m) +# define BOOST_PP_FOR_230(s, p, o, m) BOOST_PP_FOR_230_I(s, p, o, m) +# define BOOST_PP_FOR_231(s, p, o, m) BOOST_PP_FOR_231_I(s, p, o, m) +# define BOOST_PP_FOR_232(s, p, o, m) BOOST_PP_FOR_232_I(s, p, o, m) +# define BOOST_PP_FOR_233(s, p, o, m) BOOST_PP_FOR_233_I(s, p, o, m) +# define BOOST_PP_FOR_234(s, p, o, m) BOOST_PP_FOR_234_I(s, p, o, m) +# define BOOST_PP_FOR_235(s, p, o, m) BOOST_PP_FOR_235_I(s, p, o, m) +# define BOOST_PP_FOR_236(s, p, o, m) BOOST_PP_FOR_236_I(s, p, o, m) +# define BOOST_PP_FOR_237(s, p, o, m) BOOST_PP_FOR_237_I(s, p, o, m) +# define BOOST_PP_FOR_238(s, p, o, m) BOOST_PP_FOR_238_I(s, p, o, m) +# define BOOST_PP_FOR_239(s, p, o, m) BOOST_PP_FOR_239_I(s, p, o, m) +# define BOOST_PP_FOR_240(s, p, o, m) BOOST_PP_FOR_240_I(s, p, o, m) +# define BOOST_PP_FOR_241(s, p, o, m) BOOST_PP_FOR_241_I(s, p, o, m) +# define BOOST_PP_FOR_242(s, p, o, m) BOOST_PP_FOR_242_I(s, p, o, m) +# define BOOST_PP_FOR_243(s, p, o, m) BOOST_PP_FOR_243_I(s, p, o, m) +# define BOOST_PP_FOR_244(s, p, o, m) BOOST_PP_FOR_244_I(s, p, o, m) +# define BOOST_PP_FOR_245(s, p, o, m) BOOST_PP_FOR_245_I(s, p, o, m) +# define BOOST_PP_FOR_246(s, p, o, m) BOOST_PP_FOR_246_I(s, p, o, m) +# define BOOST_PP_FOR_247(s, p, o, m) BOOST_PP_FOR_247_I(s, p, o, m) +# define BOOST_PP_FOR_248(s, p, o, m) BOOST_PP_FOR_248_I(s, p, o, m) +# define BOOST_PP_FOR_249(s, p, o, m) BOOST_PP_FOR_249_I(s, p, o, m) +# define BOOST_PP_FOR_250(s, p, o, m) BOOST_PP_FOR_250_I(s, p, o, m) +# define BOOST_PP_FOR_251(s, p, o, m) BOOST_PP_FOR_251_I(s, p, o, m) +# define BOOST_PP_FOR_252(s, p, o, m) BOOST_PP_FOR_252_I(s, p, o, m) +# define BOOST_PP_FOR_253(s, p, o, m) BOOST_PP_FOR_253_I(s, p, o, m) +# define BOOST_PP_FOR_254(s, p, o, m) BOOST_PP_FOR_254_I(s, p, o, m) +# define BOOST_PP_FOR_255(s, p, o, m) BOOST_PP_FOR_255_I(s, p, o, m) +# define BOOST_PP_FOR_256(s, p, o, m) BOOST_PP_FOR_256_I(s, p, o, m) +# +# define BOOST_PP_FOR_1_I(s, p, o, m) BOOST_PP_IF(p(2, s), m, BOOST_PP_TUPLE_EAT_2)(2, s) BOOST_PP_IF(p(2, s), BOOST_PP_FOR_2, BOOST_PP_TUPLE_EAT_4)(o(2, s), p, o, m) +# define BOOST_PP_FOR_2_I(s, p, o, m) BOOST_PP_IF(p(3, s), m, BOOST_PP_TUPLE_EAT_2)(3, s) BOOST_PP_IF(p(3, s), BOOST_PP_FOR_3, BOOST_PP_TUPLE_EAT_4)(o(3, s), p, o, m) +# define BOOST_PP_FOR_3_I(s, p, o, m) BOOST_PP_IF(p(4, s), m, BOOST_PP_TUPLE_EAT_2)(4, s) BOOST_PP_IF(p(4, s), BOOST_PP_FOR_4, BOOST_PP_TUPLE_EAT_4)(o(4, s), p, o, m) +# define BOOST_PP_FOR_4_I(s, p, o, m) BOOST_PP_IF(p(5, s), m, BOOST_PP_TUPLE_EAT_2)(5, s) BOOST_PP_IF(p(5, s), BOOST_PP_FOR_5, BOOST_PP_TUPLE_EAT_4)(o(5, s), p, o, m) +# define BOOST_PP_FOR_5_I(s, p, o, m) BOOST_PP_IF(p(6, s), m, BOOST_PP_TUPLE_EAT_2)(6, s) BOOST_PP_IF(p(6, s), BOOST_PP_FOR_6, BOOST_PP_TUPLE_EAT_4)(o(6, s), p, o, m) +# define BOOST_PP_FOR_6_I(s, p, o, m) BOOST_PP_IF(p(7, s), m, BOOST_PP_TUPLE_EAT_2)(7, s) BOOST_PP_IF(p(7, s), BOOST_PP_FOR_7, BOOST_PP_TUPLE_EAT_4)(o(7, s), p, o, m) +# define BOOST_PP_FOR_7_I(s, p, o, m) BOOST_PP_IF(p(8, s), m, BOOST_PP_TUPLE_EAT_2)(8, s) BOOST_PP_IF(p(8, s), BOOST_PP_FOR_8, BOOST_PP_TUPLE_EAT_4)(o(8, s), p, o, m) +# define BOOST_PP_FOR_8_I(s, p, o, m) BOOST_PP_IF(p(9, s), m, BOOST_PP_TUPLE_EAT_2)(9, s) BOOST_PP_IF(p(9, s), BOOST_PP_FOR_9, BOOST_PP_TUPLE_EAT_4)(o(9, s), p, o, m) +# define BOOST_PP_FOR_9_I(s, p, o, m) BOOST_PP_IF(p(10, s), m, BOOST_PP_TUPLE_EAT_2)(10, s) BOOST_PP_IF(p(10, s), BOOST_PP_FOR_10, BOOST_PP_TUPLE_EAT_4)(o(10, s), p, o, m) +# define BOOST_PP_FOR_10_I(s, p, o, m) BOOST_PP_IF(p(11, s), m, BOOST_PP_TUPLE_EAT_2)(11, s) BOOST_PP_IF(p(11, s), BOOST_PP_FOR_11, BOOST_PP_TUPLE_EAT_4)(o(11, s), p, o, m) +# define BOOST_PP_FOR_11_I(s, p, o, m) BOOST_PP_IF(p(12, s), m, BOOST_PP_TUPLE_EAT_2)(12, s) BOOST_PP_IF(p(12, s), BOOST_PP_FOR_12, BOOST_PP_TUPLE_EAT_4)(o(12, s), p, o, m) +# define BOOST_PP_FOR_12_I(s, p, o, m) BOOST_PP_IF(p(13, s), m, BOOST_PP_TUPLE_EAT_2)(13, s) BOOST_PP_IF(p(13, s), BOOST_PP_FOR_13, BOOST_PP_TUPLE_EAT_4)(o(13, s), p, o, m) +# define BOOST_PP_FOR_13_I(s, p, o, m) BOOST_PP_IF(p(14, s), m, BOOST_PP_TUPLE_EAT_2)(14, s) BOOST_PP_IF(p(14, s), BOOST_PP_FOR_14, BOOST_PP_TUPLE_EAT_4)(o(14, s), p, o, m) +# define BOOST_PP_FOR_14_I(s, p, o, m) BOOST_PP_IF(p(15, s), m, BOOST_PP_TUPLE_EAT_2)(15, s) BOOST_PP_IF(p(15, s), BOOST_PP_FOR_15, BOOST_PP_TUPLE_EAT_4)(o(15, s), p, o, m) +# define BOOST_PP_FOR_15_I(s, p, o, m) BOOST_PP_IF(p(16, s), m, BOOST_PP_TUPLE_EAT_2)(16, s) BOOST_PP_IF(p(16, s), BOOST_PP_FOR_16, BOOST_PP_TUPLE_EAT_4)(o(16, s), p, o, m) +# define BOOST_PP_FOR_16_I(s, p, o, m) BOOST_PP_IF(p(17, s), m, BOOST_PP_TUPLE_EAT_2)(17, s) BOOST_PP_IF(p(17, s), BOOST_PP_FOR_17, BOOST_PP_TUPLE_EAT_4)(o(17, s), p, o, m) +# define BOOST_PP_FOR_17_I(s, p, o, m) BOOST_PP_IF(p(18, s), m, BOOST_PP_TUPLE_EAT_2)(18, s) BOOST_PP_IF(p(18, s), BOOST_PP_FOR_18, BOOST_PP_TUPLE_EAT_4)(o(18, s), p, o, m) +# define BOOST_PP_FOR_18_I(s, p, o, m) BOOST_PP_IF(p(19, s), m, BOOST_PP_TUPLE_EAT_2)(19, s) BOOST_PP_IF(p(19, s), BOOST_PP_FOR_19, BOOST_PP_TUPLE_EAT_4)(o(19, s), p, o, m) +# define BOOST_PP_FOR_19_I(s, p, o, m) BOOST_PP_IF(p(20, s), m, BOOST_PP_TUPLE_EAT_2)(20, s) BOOST_PP_IF(p(20, s), BOOST_PP_FOR_20, BOOST_PP_TUPLE_EAT_4)(o(20, s), p, o, m) +# define BOOST_PP_FOR_20_I(s, p, o, m) BOOST_PP_IF(p(21, s), m, BOOST_PP_TUPLE_EAT_2)(21, s) BOOST_PP_IF(p(21, s), BOOST_PP_FOR_21, BOOST_PP_TUPLE_EAT_4)(o(21, s), p, o, m) +# define BOOST_PP_FOR_21_I(s, p, o, m) BOOST_PP_IF(p(22, s), m, BOOST_PP_TUPLE_EAT_2)(22, s) BOOST_PP_IF(p(22, s), BOOST_PP_FOR_22, BOOST_PP_TUPLE_EAT_4)(o(22, s), p, o, m) +# define BOOST_PP_FOR_22_I(s, p, o, m) BOOST_PP_IF(p(23, s), m, BOOST_PP_TUPLE_EAT_2)(23, s) BOOST_PP_IF(p(23, s), BOOST_PP_FOR_23, BOOST_PP_TUPLE_EAT_4)(o(23, s), p, o, m) +# define BOOST_PP_FOR_23_I(s, p, o, m) BOOST_PP_IF(p(24, s), m, BOOST_PP_TUPLE_EAT_2)(24, s) BOOST_PP_IF(p(24, s), BOOST_PP_FOR_24, BOOST_PP_TUPLE_EAT_4)(o(24, s), p, o, m) +# define BOOST_PP_FOR_24_I(s, p, o, m) BOOST_PP_IF(p(25, s), m, BOOST_PP_TUPLE_EAT_2)(25, s) BOOST_PP_IF(p(25, s), BOOST_PP_FOR_25, BOOST_PP_TUPLE_EAT_4)(o(25, s), p, o, m) +# define BOOST_PP_FOR_25_I(s, p, o, m) BOOST_PP_IF(p(26, s), m, BOOST_PP_TUPLE_EAT_2)(26, s) BOOST_PP_IF(p(26, s), BOOST_PP_FOR_26, BOOST_PP_TUPLE_EAT_4)(o(26, s), p, o, m) +# define BOOST_PP_FOR_26_I(s, p, o, m) BOOST_PP_IF(p(27, s), m, BOOST_PP_TUPLE_EAT_2)(27, s) BOOST_PP_IF(p(27, s), BOOST_PP_FOR_27, BOOST_PP_TUPLE_EAT_4)(o(27, s), p, o, m) +# define BOOST_PP_FOR_27_I(s, p, o, m) BOOST_PP_IF(p(28, s), m, BOOST_PP_TUPLE_EAT_2)(28, s) BOOST_PP_IF(p(28, s), BOOST_PP_FOR_28, BOOST_PP_TUPLE_EAT_4)(o(28, s), p, o, m) +# define BOOST_PP_FOR_28_I(s, p, o, m) BOOST_PP_IF(p(29, s), m, BOOST_PP_TUPLE_EAT_2)(29, s) BOOST_PP_IF(p(29, s), BOOST_PP_FOR_29, BOOST_PP_TUPLE_EAT_4)(o(29, s), p, o, m) +# define BOOST_PP_FOR_29_I(s, p, o, m) BOOST_PP_IF(p(30, s), m, BOOST_PP_TUPLE_EAT_2)(30, s) BOOST_PP_IF(p(30, s), BOOST_PP_FOR_30, BOOST_PP_TUPLE_EAT_4)(o(30, s), p, o, m) +# define BOOST_PP_FOR_30_I(s, p, o, m) BOOST_PP_IF(p(31, s), m, BOOST_PP_TUPLE_EAT_2)(31, s) BOOST_PP_IF(p(31, s), BOOST_PP_FOR_31, BOOST_PP_TUPLE_EAT_4)(o(31, s), p, o, m) +# define BOOST_PP_FOR_31_I(s, p, o, m) BOOST_PP_IF(p(32, s), m, BOOST_PP_TUPLE_EAT_2)(32, s) BOOST_PP_IF(p(32, s), BOOST_PP_FOR_32, BOOST_PP_TUPLE_EAT_4)(o(32, s), p, o, m) +# define BOOST_PP_FOR_32_I(s, p, o, m) BOOST_PP_IF(p(33, s), m, BOOST_PP_TUPLE_EAT_2)(33, s) BOOST_PP_IF(p(33, s), BOOST_PP_FOR_33, BOOST_PP_TUPLE_EAT_4)(o(33, s), p, o, m) +# define BOOST_PP_FOR_33_I(s, p, o, m) BOOST_PP_IF(p(34, s), m, BOOST_PP_TUPLE_EAT_2)(34, s) BOOST_PP_IF(p(34, s), BOOST_PP_FOR_34, BOOST_PP_TUPLE_EAT_4)(o(34, s), p, o, m) +# define BOOST_PP_FOR_34_I(s, p, o, m) BOOST_PP_IF(p(35, s), m, BOOST_PP_TUPLE_EAT_2)(35, s) BOOST_PP_IF(p(35, s), BOOST_PP_FOR_35, BOOST_PP_TUPLE_EAT_4)(o(35, s), p, o, m) +# define BOOST_PP_FOR_35_I(s, p, o, m) BOOST_PP_IF(p(36, s), m, BOOST_PP_TUPLE_EAT_2)(36, s) BOOST_PP_IF(p(36, s), BOOST_PP_FOR_36, BOOST_PP_TUPLE_EAT_4)(o(36, s), p, o, m) +# define BOOST_PP_FOR_36_I(s, p, o, m) BOOST_PP_IF(p(37, s), m, BOOST_PP_TUPLE_EAT_2)(37, s) BOOST_PP_IF(p(37, s), BOOST_PP_FOR_37, BOOST_PP_TUPLE_EAT_4)(o(37, s), p, o, m) +# define BOOST_PP_FOR_37_I(s, p, o, m) BOOST_PP_IF(p(38, s), m, BOOST_PP_TUPLE_EAT_2)(38, s) BOOST_PP_IF(p(38, s), BOOST_PP_FOR_38, BOOST_PP_TUPLE_EAT_4)(o(38, s), p, o, m) +# define BOOST_PP_FOR_38_I(s, p, o, m) BOOST_PP_IF(p(39, s), m, BOOST_PP_TUPLE_EAT_2)(39, s) BOOST_PP_IF(p(39, s), BOOST_PP_FOR_39, BOOST_PP_TUPLE_EAT_4)(o(39, s), p, o, m) +# define BOOST_PP_FOR_39_I(s, p, o, m) BOOST_PP_IF(p(40, s), m, BOOST_PP_TUPLE_EAT_2)(40, s) BOOST_PP_IF(p(40, s), BOOST_PP_FOR_40, BOOST_PP_TUPLE_EAT_4)(o(40, s), p, o, m) +# define BOOST_PP_FOR_40_I(s, p, o, m) BOOST_PP_IF(p(41, s), m, BOOST_PP_TUPLE_EAT_2)(41, s) BOOST_PP_IF(p(41, s), BOOST_PP_FOR_41, BOOST_PP_TUPLE_EAT_4)(o(41, s), p, o, m) +# define BOOST_PP_FOR_41_I(s, p, o, m) BOOST_PP_IF(p(42, s), m, BOOST_PP_TUPLE_EAT_2)(42, s) BOOST_PP_IF(p(42, s), BOOST_PP_FOR_42, BOOST_PP_TUPLE_EAT_4)(o(42, s), p, o, m) +# define BOOST_PP_FOR_42_I(s, p, o, m) BOOST_PP_IF(p(43, s), m, BOOST_PP_TUPLE_EAT_2)(43, s) BOOST_PP_IF(p(43, s), BOOST_PP_FOR_43, BOOST_PP_TUPLE_EAT_4)(o(43, s), p, o, m) +# define BOOST_PP_FOR_43_I(s, p, o, m) BOOST_PP_IF(p(44, s), m, BOOST_PP_TUPLE_EAT_2)(44, s) BOOST_PP_IF(p(44, s), BOOST_PP_FOR_44, BOOST_PP_TUPLE_EAT_4)(o(44, s), p, o, m) +# define BOOST_PP_FOR_44_I(s, p, o, m) BOOST_PP_IF(p(45, s), m, BOOST_PP_TUPLE_EAT_2)(45, s) BOOST_PP_IF(p(45, s), BOOST_PP_FOR_45, BOOST_PP_TUPLE_EAT_4)(o(45, s), p, o, m) +# define BOOST_PP_FOR_45_I(s, p, o, m) BOOST_PP_IF(p(46, s), m, BOOST_PP_TUPLE_EAT_2)(46, s) BOOST_PP_IF(p(46, s), BOOST_PP_FOR_46, BOOST_PP_TUPLE_EAT_4)(o(46, s), p, o, m) +# define BOOST_PP_FOR_46_I(s, p, o, m) BOOST_PP_IF(p(47, s), m, BOOST_PP_TUPLE_EAT_2)(47, s) BOOST_PP_IF(p(47, s), BOOST_PP_FOR_47, BOOST_PP_TUPLE_EAT_4)(o(47, s), p, o, m) +# define BOOST_PP_FOR_47_I(s, p, o, m) BOOST_PP_IF(p(48, s), m, BOOST_PP_TUPLE_EAT_2)(48, s) BOOST_PP_IF(p(48, s), BOOST_PP_FOR_48, BOOST_PP_TUPLE_EAT_4)(o(48, s), p, o, m) +# define BOOST_PP_FOR_48_I(s, p, o, m) BOOST_PP_IF(p(49, s), m, BOOST_PP_TUPLE_EAT_2)(49, s) BOOST_PP_IF(p(49, s), BOOST_PP_FOR_49, BOOST_PP_TUPLE_EAT_4)(o(49, s), p, o, m) +# define BOOST_PP_FOR_49_I(s, p, o, m) BOOST_PP_IF(p(50, s), m, BOOST_PP_TUPLE_EAT_2)(50, s) BOOST_PP_IF(p(50, s), BOOST_PP_FOR_50, BOOST_PP_TUPLE_EAT_4)(o(50, s), p, o, m) +# define BOOST_PP_FOR_50_I(s, p, o, m) BOOST_PP_IF(p(51, s), m, BOOST_PP_TUPLE_EAT_2)(51, s) BOOST_PP_IF(p(51, s), BOOST_PP_FOR_51, BOOST_PP_TUPLE_EAT_4)(o(51, s), p, o, m) +# define BOOST_PP_FOR_51_I(s, p, o, m) BOOST_PP_IF(p(52, s), m, BOOST_PP_TUPLE_EAT_2)(52, s) BOOST_PP_IF(p(52, s), BOOST_PP_FOR_52, BOOST_PP_TUPLE_EAT_4)(o(52, s), p, o, m) +# define BOOST_PP_FOR_52_I(s, p, o, m) BOOST_PP_IF(p(53, s), m, BOOST_PP_TUPLE_EAT_2)(53, s) BOOST_PP_IF(p(53, s), BOOST_PP_FOR_53, BOOST_PP_TUPLE_EAT_4)(o(53, s), p, o, m) +# define BOOST_PP_FOR_53_I(s, p, o, m) BOOST_PP_IF(p(54, s), m, BOOST_PP_TUPLE_EAT_2)(54, s) BOOST_PP_IF(p(54, s), BOOST_PP_FOR_54, BOOST_PP_TUPLE_EAT_4)(o(54, s), p, o, m) +# define BOOST_PP_FOR_54_I(s, p, o, m) BOOST_PP_IF(p(55, s), m, BOOST_PP_TUPLE_EAT_2)(55, s) BOOST_PP_IF(p(55, s), BOOST_PP_FOR_55, BOOST_PP_TUPLE_EAT_4)(o(55, s), p, o, m) +# define BOOST_PP_FOR_55_I(s, p, o, m) BOOST_PP_IF(p(56, s), m, BOOST_PP_TUPLE_EAT_2)(56, s) BOOST_PP_IF(p(56, s), BOOST_PP_FOR_56, BOOST_PP_TUPLE_EAT_4)(o(56, s), p, o, m) +# define BOOST_PP_FOR_56_I(s, p, o, m) BOOST_PP_IF(p(57, s), m, BOOST_PP_TUPLE_EAT_2)(57, s) BOOST_PP_IF(p(57, s), BOOST_PP_FOR_57, BOOST_PP_TUPLE_EAT_4)(o(57, s), p, o, m) +# define BOOST_PP_FOR_57_I(s, p, o, m) BOOST_PP_IF(p(58, s), m, BOOST_PP_TUPLE_EAT_2)(58, s) BOOST_PP_IF(p(58, s), BOOST_PP_FOR_58, BOOST_PP_TUPLE_EAT_4)(o(58, s), p, o, m) +# define BOOST_PP_FOR_58_I(s, p, o, m) BOOST_PP_IF(p(59, s), m, BOOST_PP_TUPLE_EAT_2)(59, s) BOOST_PP_IF(p(59, s), BOOST_PP_FOR_59, BOOST_PP_TUPLE_EAT_4)(o(59, s), p, o, m) +# define BOOST_PP_FOR_59_I(s, p, o, m) BOOST_PP_IF(p(60, s), m, BOOST_PP_TUPLE_EAT_2)(60, s) BOOST_PP_IF(p(60, s), BOOST_PP_FOR_60, BOOST_PP_TUPLE_EAT_4)(o(60, s), p, o, m) +# define BOOST_PP_FOR_60_I(s, p, o, m) BOOST_PP_IF(p(61, s), m, BOOST_PP_TUPLE_EAT_2)(61, s) BOOST_PP_IF(p(61, s), BOOST_PP_FOR_61, BOOST_PP_TUPLE_EAT_4)(o(61, s), p, o, m) +# define BOOST_PP_FOR_61_I(s, p, o, m) BOOST_PP_IF(p(62, s), m, BOOST_PP_TUPLE_EAT_2)(62, s) BOOST_PP_IF(p(62, s), BOOST_PP_FOR_62, BOOST_PP_TUPLE_EAT_4)(o(62, s), p, o, m) +# define BOOST_PP_FOR_62_I(s, p, o, m) BOOST_PP_IF(p(63, s), m, BOOST_PP_TUPLE_EAT_2)(63, s) BOOST_PP_IF(p(63, s), BOOST_PP_FOR_63, BOOST_PP_TUPLE_EAT_4)(o(63, s), p, o, m) +# define BOOST_PP_FOR_63_I(s, p, o, m) BOOST_PP_IF(p(64, s), m, BOOST_PP_TUPLE_EAT_2)(64, s) BOOST_PP_IF(p(64, s), BOOST_PP_FOR_64, BOOST_PP_TUPLE_EAT_4)(o(64, s), p, o, m) +# define BOOST_PP_FOR_64_I(s, p, o, m) BOOST_PP_IF(p(65, s), m, BOOST_PP_TUPLE_EAT_2)(65, s) BOOST_PP_IF(p(65, s), BOOST_PP_FOR_65, BOOST_PP_TUPLE_EAT_4)(o(65, s), p, o, m) +# define BOOST_PP_FOR_65_I(s, p, o, m) BOOST_PP_IF(p(66, s), m, BOOST_PP_TUPLE_EAT_2)(66, s) BOOST_PP_IF(p(66, s), BOOST_PP_FOR_66, BOOST_PP_TUPLE_EAT_4)(o(66, s), p, o, m) +# define BOOST_PP_FOR_66_I(s, p, o, m) BOOST_PP_IF(p(67, s), m, BOOST_PP_TUPLE_EAT_2)(67, s) BOOST_PP_IF(p(67, s), BOOST_PP_FOR_67, BOOST_PP_TUPLE_EAT_4)(o(67, s), p, o, m) +# define BOOST_PP_FOR_67_I(s, p, o, m) BOOST_PP_IF(p(68, s), m, BOOST_PP_TUPLE_EAT_2)(68, s) BOOST_PP_IF(p(68, s), BOOST_PP_FOR_68, BOOST_PP_TUPLE_EAT_4)(o(68, s), p, o, m) +# define BOOST_PP_FOR_68_I(s, p, o, m) BOOST_PP_IF(p(69, s), m, BOOST_PP_TUPLE_EAT_2)(69, s) BOOST_PP_IF(p(69, s), BOOST_PP_FOR_69, BOOST_PP_TUPLE_EAT_4)(o(69, s), p, o, m) +# define BOOST_PP_FOR_69_I(s, p, o, m) BOOST_PP_IF(p(70, s), m, BOOST_PP_TUPLE_EAT_2)(70, s) BOOST_PP_IF(p(70, s), BOOST_PP_FOR_70, BOOST_PP_TUPLE_EAT_4)(o(70, s), p, o, m) +# define BOOST_PP_FOR_70_I(s, p, o, m) BOOST_PP_IF(p(71, s), m, BOOST_PP_TUPLE_EAT_2)(71, s) BOOST_PP_IF(p(71, s), BOOST_PP_FOR_71, BOOST_PP_TUPLE_EAT_4)(o(71, s), p, o, m) +# define BOOST_PP_FOR_71_I(s, p, o, m) BOOST_PP_IF(p(72, s), m, BOOST_PP_TUPLE_EAT_2)(72, s) BOOST_PP_IF(p(72, s), BOOST_PP_FOR_72, BOOST_PP_TUPLE_EAT_4)(o(72, s), p, o, m) +# define BOOST_PP_FOR_72_I(s, p, o, m) BOOST_PP_IF(p(73, s), m, BOOST_PP_TUPLE_EAT_2)(73, s) BOOST_PP_IF(p(73, s), BOOST_PP_FOR_73, BOOST_PP_TUPLE_EAT_4)(o(73, s), p, o, m) +# define BOOST_PP_FOR_73_I(s, p, o, m) BOOST_PP_IF(p(74, s), m, BOOST_PP_TUPLE_EAT_2)(74, s) BOOST_PP_IF(p(74, s), BOOST_PP_FOR_74, BOOST_PP_TUPLE_EAT_4)(o(74, s), p, o, m) +# define BOOST_PP_FOR_74_I(s, p, o, m) BOOST_PP_IF(p(75, s), m, BOOST_PP_TUPLE_EAT_2)(75, s) BOOST_PP_IF(p(75, s), BOOST_PP_FOR_75, BOOST_PP_TUPLE_EAT_4)(o(75, s), p, o, m) +# define BOOST_PP_FOR_75_I(s, p, o, m) BOOST_PP_IF(p(76, s), m, BOOST_PP_TUPLE_EAT_2)(76, s) BOOST_PP_IF(p(76, s), BOOST_PP_FOR_76, BOOST_PP_TUPLE_EAT_4)(o(76, s), p, o, m) +# define BOOST_PP_FOR_76_I(s, p, o, m) BOOST_PP_IF(p(77, s), m, BOOST_PP_TUPLE_EAT_2)(77, s) BOOST_PP_IF(p(77, s), BOOST_PP_FOR_77, BOOST_PP_TUPLE_EAT_4)(o(77, s), p, o, m) +# define BOOST_PP_FOR_77_I(s, p, o, m) BOOST_PP_IF(p(78, s), m, BOOST_PP_TUPLE_EAT_2)(78, s) BOOST_PP_IF(p(78, s), BOOST_PP_FOR_78, BOOST_PP_TUPLE_EAT_4)(o(78, s), p, o, m) +# define BOOST_PP_FOR_78_I(s, p, o, m) BOOST_PP_IF(p(79, s), m, BOOST_PP_TUPLE_EAT_2)(79, s) BOOST_PP_IF(p(79, s), BOOST_PP_FOR_79, BOOST_PP_TUPLE_EAT_4)(o(79, s), p, o, m) +# define BOOST_PP_FOR_79_I(s, p, o, m) BOOST_PP_IF(p(80, s), m, BOOST_PP_TUPLE_EAT_2)(80, s) BOOST_PP_IF(p(80, s), BOOST_PP_FOR_80, BOOST_PP_TUPLE_EAT_4)(o(80, s), p, o, m) +# define BOOST_PP_FOR_80_I(s, p, o, m) BOOST_PP_IF(p(81, s), m, BOOST_PP_TUPLE_EAT_2)(81, s) BOOST_PP_IF(p(81, s), BOOST_PP_FOR_81, BOOST_PP_TUPLE_EAT_4)(o(81, s), p, o, m) +# define BOOST_PP_FOR_81_I(s, p, o, m) BOOST_PP_IF(p(82, s), m, BOOST_PP_TUPLE_EAT_2)(82, s) BOOST_PP_IF(p(82, s), BOOST_PP_FOR_82, BOOST_PP_TUPLE_EAT_4)(o(82, s), p, o, m) +# define BOOST_PP_FOR_82_I(s, p, o, m) BOOST_PP_IF(p(83, s), m, BOOST_PP_TUPLE_EAT_2)(83, s) BOOST_PP_IF(p(83, s), BOOST_PP_FOR_83, BOOST_PP_TUPLE_EAT_4)(o(83, s), p, o, m) +# define BOOST_PP_FOR_83_I(s, p, o, m) BOOST_PP_IF(p(84, s), m, BOOST_PP_TUPLE_EAT_2)(84, s) BOOST_PP_IF(p(84, s), BOOST_PP_FOR_84, BOOST_PP_TUPLE_EAT_4)(o(84, s), p, o, m) +# define BOOST_PP_FOR_84_I(s, p, o, m) BOOST_PP_IF(p(85, s), m, BOOST_PP_TUPLE_EAT_2)(85, s) BOOST_PP_IF(p(85, s), BOOST_PP_FOR_85, BOOST_PP_TUPLE_EAT_4)(o(85, s), p, o, m) +# define BOOST_PP_FOR_85_I(s, p, o, m) BOOST_PP_IF(p(86, s), m, BOOST_PP_TUPLE_EAT_2)(86, s) BOOST_PP_IF(p(86, s), BOOST_PP_FOR_86, BOOST_PP_TUPLE_EAT_4)(o(86, s), p, o, m) +# define BOOST_PP_FOR_86_I(s, p, o, m) BOOST_PP_IF(p(87, s), m, BOOST_PP_TUPLE_EAT_2)(87, s) BOOST_PP_IF(p(87, s), BOOST_PP_FOR_87, BOOST_PP_TUPLE_EAT_4)(o(87, s), p, o, m) +# define BOOST_PP_FOR_87_I(s, p, o, m) BOOST_PP_IF(p(88, s), m, BOOST_PP_TUPLE_EAT_2)(88, s) BOOST_PP_IF(p(88, s), BOOST_PP_FOR_88, BOOST_PP_TUPLE_EAT_4)(o(88, s), p, o, m) +# define BOOST_PP_FOR_88_I(s, p, o, m) BOOST_PP_IF(p(89, s), m, BOOST_PP_TUPLE_EAT_2)(89, s) BOOST_PP_IF(p(89, s), BOOST_PP_FOR_89, BOOST_PP_TUPLE_EAT_4)(o(89, s), p, o, m) +# define BOOST_PP_FOR_89_I(s, p, o, m) BOOST_PP_IF(p(90, s), m, BOOST_PP_TUPLE_EAT_2)(90, s) BOOST_PP_IF(p(90, s), BOOST_PP_FOR_90, BOOST_PP_TUPLE_EAT_4)(o(90, s), p, o, m) +# define BOOST_PP_FOR_90_I(s, p, o, m) BOOST_PP_IF(p(91, s), m, BOOST_PP_TUPLE_EAT_2)(91, s) BOOST_PP_IF(p(91, s), BOOST_PP_FOR_91, BOOST_PP_TUPLE_EAT_4)(o(91, s), p, o, m) +# define BOOST_PP_FOR_91_I(s, p, o, m) BOOST_PP_IF(p(92, s), m, BOOST_PP_TUPLE_EAT_2)(92, s) BOOST_PP_IF(p(92, s), BOOST_PP_FOR_92, BOOST_PP_TUPLE_EAT_4)(o(92, s), p, o, m) +# define BOOST_PP_FOR_92_I(s, p, o, m) BOOST_PP_IF(p(93, s), m, BOOST_PP_TUPLE_EAT_2)(93, s) BOOST_PP_IF(p(93, s), BOOST_PP_FOR_93, BOOST_PP_TUPLE_EAT_4)(o(93, s), p, o, m) +# define BOOST_PP_FOR_93_I(s, p, o, m) BOOST_PP_IF(p(94, s), m, BOOST_PP_TUPLE_EAT_2)(94, s) BOOST_PP_IF(p(94, s), BOOST_PP_FOR_94, BOOST_PP_TUPLE_EAT_4)(o(94, s), p, o, m) +# define BOOST_PP_FOR_94_I(s, p, o, m) BOOST_PP_IF(p(95, s), m, BOOST_PP_TUPLE_EAT_2)(95, s) BOOST_PP_IF(p(95, s), BOOST_PP_FOR_95, BOOST_PP_TUPLE_EAT_4)(o(95, s), p, o, m) +# define BOOST_PP_FOR_95_I(s, p, o, m) BOOST_PP_IF(p(96, s), m, BOOST_PP_TUPLE_EAT_2)(96, s) BOOST_PP_IF(p(96, s), BOOST_PP_FOR_96, BOOST_PP_TUPLE_EAT_4)(o(96, s), p, o, m) +# define BOOST_PP_FOR_96_I(s, p, o, m) BOOST_PP_IF(p(97, s), m, BOOST_PP_TUPLE_EAT_2)(97, s) BOOST_PP_IF(p(97, s), BOOST_PP_FOR_97, BOOST_PP_TUPLE_EAT_4)(o(97, s), p, o, m) +# define BOOST_PP_FOR_97_I(s, p, o, m) BOOST_PP_IF(p(98, s), m, BOOST_PP_TUPLE_EAT_2)(98, s) BOOST_PP_IF(p(98, s), BOOST_PP_FOR_98, BOOST_PP_TUPLE_EAT_4)(o(98, s), p, o, m) +# define BOOST_PP_FOR_98_I(s, p, o, m) BOOST_PP_IF(p(99, s), m, BOOST_PP_TUPLE_EAT_2)(99, s) BOOST_PP_IF(p(99, s), BOOST_PP_FOR_99, BOOST_PP_TUPLE_EAT_4)(o(99, s), p, o, m) +# define BOOST_PP_FOR_99_I(s, p, o, m) BOOST_PP_IF(p(100, s), m, BOOST_PP_TUPLE_EAT_2)(100, s) BOOST_PP_IF(p(100, s), BOOST_PP_FOR_100, BOOST_PP_TUPLE_EAT_4)(o(100, s), p, o, m) +# define BOOST_PP_FOR_100_I(s, p, o, m) BOOST_PP_IF(p(101, s), m, BOOST_PP_TUPLE_EAT_2)(101, s) BOOST_PP_IF(p(101, s), BOOST_PP_FOR_101, BOOST_PP_TUPLE_EAT_4)(o(101, s), p, o, m) +# define BOOST_PP_FOR_101_I(s, p, o, m) BOOST_PP_IF(p(102, s), m, BOOST_PP_TUPLE_EAT_2)(102, s) BOOST_PP_IF(p(102, s), BOOST_PP_FOR_102, BOOST_PP_TUPLE_EAT_4)(o(102, s), p, o, m) +# define BOOST_PP_FOR_102_I(s, p, o, m) BOOST_PP_IF(p(103, s), m, BOOST_PP_TUPLE_EAT_2)(103, s) BOOST_PP_IF(p(103, s), BOOST_PP_FOR_103, BOOST_PP_TUPLE_EAT_4)(o(103, s), p, o, m) +# define BOOST_PP_FOR_103_I(s, p, o, m) BOOST_PP_IF(p(104, s), m, BOOST_PP_TUPLE_EAT_2)(104, s) BOOST_PP_IF(p(104, s), BOOST_PP_FOR_104, BOOST_PP_TUPLE_EAT_4)(o(104, s), p, o, m) +# define BOOST_PP_FOR_104_I(s, p, o, m) BOOST_PP_IF(p(105, s), m, BOOST_PP_TUPLE_EAT_2)(105, s) BOOST_PP_IF(p(105, s), BOOST_PP_FOR_105, BOOST_PP_TUPLE_EAT_4)(o(105, s), p, o, m) +# define BOOST_PP_FOR_105_I(s, p, o, m) BOOST_PP_IF(p(106, s), m, BOOST_PP_TUPLE_EAT_2)(106, s) BOOST_PP_IF(p(106, s), BOOST_PP_FOR_106, BOOST_PP_TUPLE_EAT_4)(o(106, s), p, o, m) +# define BOOST_PP_FOR_106_I(s, p, o, m) BOOST_PP_IF(p(107, s), m, BOOST_PP_TUPLE_EAT_2)(107, s) BOOST_PP_IF(p(107, s), BOOST_PP_FOR_107, BOOST_PP_TUPLE_EAT_4)(o(107, s), p, o, m) +# define BOOST_PP_FOR_107_I(s, p, o, m) BOOST_PP_IF(p(108, s), m, BOOST_PP_TUPLE_EAT_2)(108, s) BOOST_PP_IF(p(108, s), BOOST_PP_FOR_108, BOOST_PP_TUPLE_EAT_4)(o(108, s), p, o, m) +# define BOOST_PP_FOR_108_I(s, p, o, m) BOOST_PP_IF(p(109, s), m, BOOST_PP_TUPLE_EAT_2)(109, s) BOOST_PP_IF(p(109, s), BOOST_PP_FOR_109, BOOST_PP_TUPLE_EAT_4)(o(109, s), p, o, m) +# define BOOST_PP_FOR_109_I(s, p, o, m) BOOST_PP_IF(p(110, s), m, BOOST_PP_TUPLE_EAT_2)(110, s) BOOST_PP_IF(p(110, s), BOOST_PP_FOR_110, BOOST_PP_TUPLE_EAT_4)(o(110, s), p, o, m) +# define BOOST_PP_FOR_110_I(s, p, o, m) BOOST_PP_IF(p(111, s), m, BOOST_PP_TUPLE_EAT_2)(111, s) BOOST_PP_IF(p(111, s), BOOST_PP_FOR_111, BOOST_PP_TUPLE_EAT_4)(o(111, s), p, o, m) +# define BOOST_PP_FOR_111_I(s, p, o, m) BOOST_PP_IF(p(112, s), m, BOOST_PP_TUPLE_EAT_2)(112, s) BOOST_PP_IF(p(112, s), BOOST_PP_FOR_112, BOOST_PP_TUPLE_EAT_4)(o(112, s), p, o, m) +# define BOOST_PP_FOR_112_I(s, p, o, m) BOOST_PP_IF(p(113, s), m, BOOST_PP_TUPLE_EAT_2)(113, s) BOOST_PP_IF(p(113, s), BOOST_PP_FOR_113, BOOST_PP_TUPLE_EAT_4)(o(113, s), p, o, m) +# define BOOST_PP_FOR_113_I(s, p, o, m) BOOST_PP_IF(p(114, s), m, BOOST_PP_TUPLE_EAT_2)(114, s) BOOST_PP_IF(p(114, s), BOOST_PP_FOR_114, BOOST_PP_TUPLE_EAT_4)(o(114, s), p, o, m) +# define BOOST_PP_FOR_114_I(s, p, o, m) BOOST_PP_IF(p(115, s), m, BOOST_PP_TUPLE_EAT_2)(115, s) BOOST_PP_IF(p(115, s), BOOST_PP_FOR_115, BOOST_PP_TUPLE_EAT_4)(o(115, s), p, o, m) +# define BOOST_PP_FOR_115_I(s, p, o, m) BOOST_PP_IF(p(116, s), m, BOOST_PP_TUPLE_EAT_2)(116, s) BOOST_PP_IF(p(116, s), BOOST_PP_FOR_116, BOOST_PP_TUPLE_EAT_4)(o(116, s), p, o, m) +# define BOOST_PP_FOR_116_I(s, p, o, m) BOOST_PP_IF(p(117, s), m, BOOST_PP_TUPLE_EAT_2)(117, s) BOOST_PP_IF(p(117, s), BOOST_PP_FOR_117, BOOST_PP_TUPLE_EAT_4)(o(117, s), p, o, m) +# define BOOST_PP_FOR_117_I(s, p, o, m) BOOST_PP_IF(p(118, s), m, BOOST_PP_TUPLE_EAT_2)(118, s) BOOST_PP_IF(p(118, s), BOOST_PP_FOR_118, BOOST_PP_TUPLE_EAT_4)(o(118, s), p, o, m) +# define BOOST_PP_FOR_118_I(s, p, o, m) BOOST_PP_IF(p(119, s), m, BOOST_PP_TUPLE_EAT_2)(119, s) BOOST_PP_IF(p(119, s), BOOST_PP_FOR_119, BOOST_PP_TUPLE_EAT_4)(o(119, s), p, o, m) +# define BOOST_PP_FOR_119_I(s, p, o, m) BOOST_PP_IF(p(120, s), m, BOOST_PP_TUPLE_EAT_2)(120, s) BOOST_PP_IF(p(120, s), BOOST_PP_FOR_120, BOOST_PP_TUPLE_EAT_4)(o(120, s), p, o, m) +# define BOOST_PP_FOR_120_I(s, p, o, m) BOOST_PP_IF(p(121, s), m, BOOST_PP_TUPLE_EAT_2)(121, s) BOOST_PP_IF(p(121, s), BOOST_PP_FOR_121, BOOST_PP_TUPLE_EAT_4)(o(121, s), p, o, m) +# define BOOST_PP_FOR_121_I(s, p, o, m) BOOST_PP_IF(p(122, s), m, BOOST_PP_TUPLE_EAT_2)(122, s) BOOST_PP_IF(p(122, s), BOOST_PP_FOR_122, BOOST_PP_TUPLE_EAT_4)(o(122, s), p, o, m) +# define BOOST_PP_FOR_122_I(s, p, o, m) BOOST_PP_IF(p(123, s), m, BOOST_PP_TUPLE_EAT_2)(123, s) BOOST_PP_IF(p(123, s), BOOST_PP_FOR_123, BOOST_PP_TUPLE_EAT_4)(o(123, s), p, o, m) +# define BOOST_PP_FOR_123_I(s, p, o, m) BOOST_PP_IF(p(124, s), m, BOOST_PP_TUPLE_EAT_2)(124, s) BOOST_PP_IF(p(124, s), BOOST_PP_FOR_124, BOOST_PP_TUPLE_EAT_4)(o(124, s), p, o, m) +# define BOOST_PP_FOR_124_I(s, p, o, m) BOOST_PP_IF(p(125, s), m, BOOST_PP_TUPLE_EAT_2)(125, s) BOOST_PP_IF(p(125, s), BOOST_PP_FOR_125, BOOST_PP_TUPLE_EAT_4)(o(125, s), p, o, m) +# define BOOST_PP_FOR_125_I(s, p, o, m) BOOST_PP_IF(p(126, s), m, BOOST_PP_TUPLE_EAT_2)(126, s) BOOST_PP_IF(p(126, s), BOOST_PP_FOR_126, BOOST_PP_TUPLE_EAT_4)(o(126, s), p, o, m) +# define BOOST_PP_FOR_126_I(s, p, o, m) BOOST_PP_IF(p(127, s), m, BOOST_PP_TUPLE_EAT_2)(127, s) BOOST_PP_IF(p(127, s), BOOST_PP_FOR_127, BOOST_PP_TUPLE_EAT_4)(o(127, s), p, o, m) +# define BOOST_PP_FOR_127_I(s, p, o, m) BOOST_PP_IF(p(128, s), m, BOOST_PP_TUPLE_EAT_2)(128, s) BOOST_PP_IF(p(128, s), BOOST_PP_FOR_128, BOOST_PP_TUPLE_EAT_4)(o(128, s), p, o, m) +# define BOOST_PP_FOR_128_I(s, p, o, m) BOOST_PP_IF(p(129, s), m, BOOST_PP_TUPLE_EAT_2)(129, s) BOOST_PP_IF(p(129, s), BOOST_PP_FOR_129, BOOST_PP_TUPLE_EAT_4)(o(129, s), p, o, m) +# define BOOST_PP_FOR_129_I(s, p, o, m) BOOST_PP_IF(p(130, s), m, BOOST_PP_TUPLE_EAT_2)(130, s) BOOST_PP_IF(p(130, s), BOOST_PP_FOR_130, BOOST_PP_TUPLE_EAT_4)(o(130, s), p, o, m) +# define BOOST_PP_FOR_130_I(s, p, o, m) BOOST_PP_IF(p(131, s), m, BOOST_PP_TUPLE_EAT_2)(131, s) BOOST_PP_IF(p(131, s), BOOST_PP_FOR_131, BOOST_PP_TUPLE_EAT_4)(o(131, s), p, o, m) +# define BOOST_PP_FOR_131_I(s, p, o, m) BOOST_PP_IF(p(132, s), m, BOOST_PP_TUPLE_EAT_2)(132, s) BOOST_PP_IF(p(132, s), BOOST_PP_FOR_132, BOOST_PP_TUPLE_EAT_4)(o(132, s), p, o, m) +# define BOOST_PP_FOR_132_I(s, p, o, m) BOOST_PP_IF(p(133, s), m, BOOST_PP_TUPLE_EAT_2)(133, s) BOOST_PP_IF(p(133, s), BOOST_PP_FOR_133, BOOST_PP_TUPLE_EAT_4)(o(133, s), p, o, m) +# define BOOST_PP_FOR_133_I(s, p, o, m) BOOST_PP_IF(p(134, s), m, BOOST_PP_TUPLE_EAT_2)(134, s) BOOST_PP_IF(p(134, s), BOOST_PP_FOR_134, BOOST_PP_TUPLE_EAT_4)(o(134, s), p, o, m) +# define BOOST_PP_FOR_134_I(s, p, o, m) BOOST_PP_IF(p(135, s), m, BOOST_PP_TUPLE_EAT_2)(135, s) BOOST_PP_IF(p(135, s), BOOST_PP_FOR_135, BOOST_PP_TUPLE_EAT_4)(o(135, s), p, o, m) +# define BOOST_PP_FOR_135_I(s, p, o, m) BOOST_PP_IF(p(136, s), m, BOOST_PP_TUPLE_EAT_2)(136, s) BOOST_PP_IF(p(136, s), BOOST_PP_FOR_136, BOOST_PP_TUPLE_EAT_4)(o(136, s), p, o, m) +# define BOOST_PP_FOR_136_I(s, p, o, m) BOOST_PP_IF(p(137, s), m, BOOST_PP_TUPLE_EAT_2)(137, s) BOOST_PP_IF(p(137, s), BOOST_PP_FOR_137, BOOST_PP_TUPLE_EAT_4)(o(137, s), p, o, m) +# define BOOST_PP_FOR_137_I(s, p, o, m) BOOST_PP_IF(p(138, s), m, BOOST_PP_TUPLE_EAT_2)(138, s) BOOST_PP_IF(p(138, s), BOOST_PP_FOR_138, BOOST_PP_TUPLE_EAT_4)(o(138, s), p, o, m) +# define BOOST_PP_FOR_138_I(s, p, o, m) BOOST_PP_IF(p(139, s), m, BOOST_PP_TUPLE_EAT_2)(139, s) BOOST_PP_IF(p(139, s), BOOST_PP_FOR_139, BOOST_PP_TUPLE_EAT_4)(o(139, s), p, o, m) +# define BOOST_PP_FOR_139_I(s, p, o, m) BOOST_PP_IF(p(140, s), m, BOOST_PP_TUPLE_EAT_2)(140, s) BOOST_PP_IF(p(140, s), BOOST_PP_FOR_140, BOOST_PP_TUPLE_EAT_4)(o(140, s), p, o, m) +# define BOOST_PP_FOR_140_I(s, p, o, m) BOOST_PP_IF(p(141, s), m, BOOST_PP_TUPLE_EAT_2)(141, s) BOOST_PP_IF(p(141, s), BOOST_PP_FOR_141, BOOST_PP_TUPLE_EAT_4)(o(141, s), p, o, m) +# define BOOST_PP_FOR_141_I(s, p, o, m) BOOST_PP_IF(p(142, s), m, BOOST_PP_TUPLE_EAT_2)(142, s) BOOST_PP_IF(p(142, s), BOOST_PP_FOR_142, BOOST_PP_TUPLE_EAT_4)(o(142, s), p, o, m) +# define BOOST_PP_FOR_142_I(s, p, o, m) BOOST_PP_IF(p(143, s), m, BOOST_PP_TUPLE_EAT_2)(143, s) BOOST_PP_IF(p(143, s), BOOST_PP_FOR_143, BOOST_PP_TUPLE_EAT_4)(o(143, s), p, o, m) +# define BOOST_PP_FOR_143_I(s, p, o, m) BOOST_PP_IF(p(144, s), m, BOOST_PP_TUPLE_EAT_2)(144, s) BOOST_PP_IF(p(144, s), BOOST_PP_FOR_144, BOOST_PP_TUPLE_EAT_4)(o(144, s), p, o, m) +# define BOOST_PP_FOR_144_I(s, p, o, m) BOOST_PP_IF(p(145, s), m, BOOST_PP_TUPLE_EAT_2)(145, s) BOOST_PP_IF(p(145, s), BOOST_PP_FOR_145, BOOST_PP_TUPLE_EAT_4)(o(145, s), p, o, m) +# define BOOST_PP_FOR_145_I(s, p, o, m) BOOST_PP_IF(p(146, s), m, BOOST_PP_TUPLE_EAT_2)(146, s) BOOST_PP_IF(p(146, s), BOOST_PP_FOR_146, BOOST_PP_TUPLE_EAT_4)(o(146, s), p, o, m) +# define BOOST_PP_FOR_146_I(s, p, o, m) BOOST_PP_IF(p(147, s), m, BOOST_PP_TUPLE_EAT_2)(147, s) BOOST_PP_IF(p(147, s), BOOST_PP_FOR_147, BOOST_PP_TUPLE_EAT_4)(o(147, s), p, o, m) +# define BOOST_PP_FOR_147_I(s, p, o, m) BOOST_PP_IF(p(148, s), m, BOOST_PP_TUPLE_EAT_2)(148, s) BOOST_PP_IF(p(148, s), BOOST_PP_FOR_148, BOOST_PP_TUPLE_EAT_4)(o(148, s), p, o, m) +# define BOOST_PP_FOR_148_I(s, p, o, m) BOOST_PP_IF(p(149, s), m, BOOST_PP_TUPLE_EAT_2)(149, s) BOOST_PP_IF(p(149, s), BOOST_PP_FOR_149, BOOST_PP_TUPLE_EAT_4)(o(149, s), p, o, m) +# define BOOST_PP_FOR_149_I(s, p, o, m) BOOST_PP_IF(p(150, s), m, BOOST_PP_TUPLE_EAT_2)(150, s) BOOST_PP_IF(p(150, s), BOOST_PP_FOR_150, BOOST_PP_TUPLE_EAT_4)(o(150, s), p, o, m) +# define BOOST_PP_FOR_150_I(s, p, o, m) BOOST_PP_IF(p(151, s), m, BOOST_PP_TUPLE_EAT_2)(151, s) BOOST_PP_IF(p(151, s), BOOST_PP_FOR_151, BOOST_PP_TUPLE_EAT_4)(o(151, s), p, o, m) +# define BOOST_PP_FOR_151_I(s, p, o, m) BOOST_PP_IF(p(152, s), m, BOOST_PP_TUPLE_EAT_2)(152, s) BOOST_PP_IF(p(152, s), BOOST_PP_FOR_152, BOOST_PP_TUPLE_EAT_4)(o(152, s), p, o, m) +# define BOOST_PP_FOR_152_I(s, p, o, m) BOOST_PP_IF(p(153, s), m, BOOST_PP_TUPLE_EAT_2)(153, s) BOOST_PP_IF(p(153, s), BOOST_PP_FOR_153, BOOST_PP_TUPLE_EAT_4)(o(153, s), p, o, m) +# define BOOST_PP_FOR_153_I(s, p, o, m) BOOST_PP_IF(p(154, s), m, BOOST_PP_TUPLE_EAT_2)(154, s) BOOST_PP_IF(p(154, s), BOOST_PP_FOR_154, BOOST_PP_TUPLE_EAT_4)(o(154, s), p, o, m) +# define BOOST_PP_FOR_154_I(s, p, o, m) BOOST_PP_IF(p(155, s), m, BOOST_PP_TUPLE_EAT_2)(155, s) BOOST_PP_IF(p(155, s), BOOST_PP_FOR_155, BOOST_PP_TUPLE_EAT_4)(o(155, s), p, o, m) +# define BOOST_PP_FOR_155_I(s, p, o, m) BOOST_PP_IF(p(156, s), m, BOOST_PP_TUPLE_EAT_2)(156, s) BOOST_PP_IF(p(156, s), BOOST_PP_FOR_156, BOOST_PP_TUPLE_EAT_4)(o(156, s), p, o, m) +# define BOOST_PP_FOR_156_I(s, p, o, m) BOOST_PP_IF(p(157, s), m, BOOST_PP_TUPLE_EAT_2)(157, s) BOOST_PP_IF(p(157, s), BOOST_PP_FOR_157, BOOST_PP_TUPLE_EAT_4)(o(157, s), p, o, m) +# define BOOST_PP_FOR_157_I(s, p, o, m) BOOST_PP_IF(p(158, s), m, BOOST_PP_TUPLE_EAT_2)(158, s) BOOST_PP_IF(p(158, s), BOOST_PP_FOR_158, BOOST_PP_TUPLE_EAT_4)(o(158, s), p, o, m) +# define BOOST_PP_FOR_158_I(s, p, o, m) BOOST_PP_IF(p(159, s), m, BOOST_PP_TUPLE_EAT_2)(159, s) BOOST_PP_IF(p(159, s), BOOST_PP_FOR_159, BOOST_PP_TUPLE_EAT_4)(o(159, s), p, o, m) +# define BOOST_PP_FOR_159_I(s, p, o, m) BOOST_PP_IF(p(160, s), m, BOOST_PP_TUPLE_EAT_2)(160, s) BOOST_PP_IF(p(160, s), BOOST_PP_FOR_160, BOOST_PP_TUPLE_EAT_4)(o(160, s), p, o, m) +# define BOOST_PP_FOR_160_I(s, p, o, m) BOOST_PP_IF(p(161, s), m, BOOST_PP_TUPLE_EAT_2)(161, s) BOOST_PP_IF(p(161, s), BOOST_PP_FOR_161, BOOST_PP_TUPLE_EAT_4)(o(161, s), p, o, m) +# define BOOST_PP_FOR_161_I(s, p, o, m) BOOST_PP_IF(p(162, s), m, BOOST_PP_TUPLE_EAT_2)(162, s) BOOST_PP_IF(p(162, s), BOOST_PP_FOR_162, BOOST_PP_TUPLE_EAT_4)(o(162, s), p, o, m) +# define BOOST_PP_FOR_162_I(s, p, o, m) BOOST_PP_IF(p(163, s), m, BOOST_PP_TUPLE_EAT_2)(163, s) BOOST_PP_IF(p(163, s), BOOST_PP_FOR_163, BOOST_PP_TUPLE_EAT_4)(o(163, s), p, o, m) +# define BOOST_PP_FOR_163_I(s, p, o, m) BOOST_PP_IF(p(164, s), m, BOOST_PP_TUPLE_EAT_2)(164, s) BOOST_PP_IF(p(164, s), BOOST_PP_FOR_164, BOOST_PP_TUPLE_EAT_4)(o(164, s), p, o, m) +# define BOOST_PP_FOR_164_I(s, p, o, m) BOOST_PP_IF(p(165, s), m, BOOST_PP_TUPLE_EAT_2)(165, s) BOOST_PP_IF(p(165, s), BOOST_PP_FOR_165, BOOST_PP_TUPLE_EAT_4)(o(165, s), p, o, m) +# define BOOST_PP_FOR_165_I(s, p, o, m) BOOST_PP_IF(p(166, s), m, BOOST_PP_TUPLE_EAT_2)(166, s) BOOST_PP_IF(p(166, s), BOOST_PP_FOR_166, BOOST_PP_TUPLE_EAT_4)(o(166, s), p, o, m) +# define BOOST_PP_FOR_166_I(s, p, o, m) BOOST_PP_IF(p(167, s), m, BOOST_PP_TUPLE_EAT_2)(167, s) BOOST_PP_IF(p(167, s), BOOST_PP_FOR_167, BOOST_PP_TUPLE_EAT_4)(o(167, s), p, o, m) +# define BOOST_PP_FOR_167_I(s, p, o, m) BOOST_PP_IF(p(168, s), m, BOOST_PP_TUPLE_EAT_2)(168, s) BOOST_PP_IF(p(168, s), BOOST_PP_FOR_168, BOOST_PP_TUPLE_EAT_4)(o(168, s), p, o, m) +# define BOOST_PP_FOR_168_I(s, p, o, m) BOOST_PP_IF(p(169, s), m, BOOST_PP_TUPLE_EAT_2)(169, s) BOOST_PP_IF(p(169, s), BOOST_PP_FOR_169, BOOST_PP_TUPLE_EAT_4)(o(169, s), p, o, m) +# define BOOST_PP_FOR_169_I(s, p, o, m) BOOST_PP_IF(p(170, s), m, BOOST_PP_TUPLE_EAT_2)(170, s) BOOST_PP_IF(p(170, s), BOOST_PP_FOR_170, BOOST_PP_TUPLE_EAT_4)(o(170, s), p, o, m) +# define BOOST_PP_FOR_170_I(s, p, o, m) BOOST_PP_IF(p(171, s), m, BOOST_PP_TUPLE_EAT_2)(171, s) BOOST_PP_IF(p(171, s), BOOST_PP_FOR_171, BOOST_PP_TUPLE_EAT_4)(o(171, s), p, o, m) +# define BOOST_PP_FOR_171_I(s, p, o, m) BOOST_PP_IF(p(172, s), m, BOOST_PP_TUPLE_EAT_2)(172, s) BOOST_PP_IF(p(172, s), BOOST_PP_FOR_172, BOOST_PP_TUPLE_EAT_4)(o(172, s), p, o, m) +# define BOOST_PP_FOR_172_I(s, p, o, m) BOOST_PP_IF(p(173, s), m, BOOST_PP_TUPLE_EAT_2)(173, s) BOOST_PP_IF(p(173, s), BOOST_PP_FOR_173, BOOST_PP_TUPLE_EAT_4)(o(173, s), p, o, m) +# define BOOST_PP_FOR_173_I(s, p, o, m) BOOST_PP_IF(p(174, s), m, BOOST_PP_TUPLE_EAT_2)(174, s) BOOST_PP_IF(p(174, s), BOOST_PP_FOR_174, BOOST_PP_TUPLE_EAT_4)(o(174, s), p, o, m) +# define BOOST_PP_FOR_174_I(s, p, o, m) BOOST_PP_IF(p(175, s), m, BOOST_PP_TUPLE_EAT_2)(175, s) BOOST_PP_IF(p(175, s), BOOST_PP_FOR_175, BOOST_PP_TUPLE_EAT_4)(o(175, s), p, o, m) +# define BOOST_PP_FOR_175_I(s, p, o, m) BOOST_PP_IF(p(176, s), m, BOOST_PP_TUPLE_EAT_2)(176, s) BOOST_PP_IF(p(176, s), BOOST_PP_FOR_176, BOOST_PP_TUPLE_EAT_4)(o(176, s), p, o, m) +# define BOOST_PP_FOR_176_I(s, p, o, m) BOOST_PP_IF(p(177, s), m, BOOST_PP_TUPLE_EAT_2)(177, s) BOOST_PP_IF(p(177, s), BOOST_PP_FOR_177, BOOST_PP_TUPLE_EAT_4)(o(177, s), p, o, m) +# define BOOST_PP_FOR_177_I(s, p, o, m) BOOST_PP_IF(p(178, s), m, BOOST_PP_TUPLE_EAT_2)(178, s) BOOST_PP_IF(p(178, s), BOOST_PP_FOR_178, BOOST_PP_TUPLE_EAT_4)(o(178, s), p, o, m) +# define BOOST_PP_FOR_178_I(s, p, o, m) BOOST_PP_IF(p(179, s), m, BOOST_PP_TUPLE_EAT_2)(179, s) BOOST_PP_IF(p(179, s), BOOST_PP_FOR_179, BOOST_PP_TUPLE_EAT_4)(o(179, s), p, o, m) +# define BOOST_PP_FOR_179_I(s, p, o, m) BOOST_PP_IF(p(180, s), m, BOOST_PP_TUPLE_EAT_2)(180, s) BOOST_PP_IF(p(180, s), BOOST_PP_FOR_180, BOOST_PP_TUPLE_EAT_4)(o(180, s), p, o, m) +# define BOOST_PP_FOR_180_I(s, p, o, m) BOOST_PP_IF(p(181, s), m, BOOST_PP_TUPLE_EAT_2)(181, s) BOOST_PP_IF(p(181, s), BOOST_PP_FOR_181, BOOST_PP_TUPLE_EAT_4)(o(181, s), p, o, m) +# define BOOST_PP_FOR_181_I(s, p, o, m) BOOST_PP_IF(p(182, s), m, BOOST_PP_TUPLE_EAT_2)(182, s) BOOST_PP_IF(p(182, s), BOOST_PP_FOR_182, BOOST_PP_TUPLE_EAT_4)(o(182, s), p, o, m) +# define BOOST_PP_FOR_182_I(s, p, o, m) BOOST_PP_IF(p(183, s), m, BOOST_PP_TUPLE_EAT_2)(183, s) BOOST_PP_IF(p(183, s), BOOST_PP_FOR_183, BOOST_PP_TUPLE_EAT_4)(o(183, s), p, o, m) +# define BOOST_PP_FOR_183_I(s, p, o, m) BOOST_PP_IF(p(184, s), m, BOOST_PP_TUPLE_EAT_2)(184, s) BOOST_PP_IF(p(184, s), BOOST_PP_FOR_184, BOOST_PP_TUPLE_EAT_4)(o(184, s), p, o, m) +# define BOOST_PP_FOR_184_I(s, p, o, m) BOOST_PP_IF(p(185, s), m, BOOST_PP_TUPLE_EAT_2)(185, s) BOOST_PP_IF(p(185, s), BOOST_PP_FOR_185, BOOST_PP_TUPLE_EAT_4)(o(185, s), p, o, m) +# define BOOST_PP_FOR_185_I(s, p, o, m) BOOST_PP_IF(p(186, s), m, BOOST_PP_TUPLE_EAT_2)(186, s) BOOST_PP_IF(p(186, s), BOOST_PP_FOR_186, BOOST_PP_TUPLE_EAT_4)(o(186, s), p, o, m) +# define BOOST_PP_FOR_186_I(s, p, o, m) BOOST_PP_IF(p(187, s), m, BOOST_PP_TUPLE_EAT_2)(187, s) BOOST_PP_IF(p(187, s), BOOST_PP_FOR_187, BOOST_PP_TUPLE_EAT_4)(o(187, s), p, o, m) +# define BOOST_PP_FOR_187_I(s, p, o, m) BOOST_PP_IF(p(188, s), m, BOOST_PP_TUPLE_EAT_2)(188, s) BOOST_PP_IF(p(188, s), BOOST_PP_FOR_188, BOOST_PP_TUPLE_EAT_4)(o(188, s), p, o, m) +# define BOOST_PP_FOR_188_I(s, p, o, m) BOOST_PP_IF(p(189, s), m, BOOST_PP_TUPLE_EAT_2)(189, s) BOOST_PP_IF(p(189, s), BOOST_PP_FOR_189, BOOST_PP_TUPLE_EAT_4)(o(189, s), p, o, m) +# define BOOST_PP_FOR_189_I(s, p, o, m) BOOST_PP_IF(p(190, s), m, BOOST_PP_TUPLE_EAT_2)(190, s) BOOST_PP_IF(p(190, s), BOOST_PP_FOR_190, BOOST_PP_TUPLE_EAT_4)(o(190, s), p, o, m) +# define BOOST_PP_FOR_190_I(s, p, o, m) BOOST_PP_IF(p(191, s), m, BOOST_PP_TUPLE_EAT_2)(191, s) BOOST_PP_IF(p(191, s), BOOST_PP_FOR_191, BOOST_PP_TUPLE_EAT_4)(o(191, s), p, o, m) +# define BOOST_PP_FOR_191_I(s, p, o, m) BOOST_PP_IF(p(192, s), m, BOOST_PP_TUPLE_EAT_2)(192, s) BOOST_PP_IF(p(192, s), BOOST_PP_FOR_192, BOOST_PP_TUPLE_EAT_4)(o(192, s), p, o, m) +# define BOOST_PP_FOR_192_I(s, p, o, m) BOOST_PP_IF(p(193, s), m, BOOST_PP_TUPLE_EAT_2)(193, s) BOOST_PP_IF(p(193, s), BOOST_PP_FOR_193, BOOST_PP_TUPLE_EAT_4)(o(193, s), p, o, m) +# define BOOST_PP_FOR_193_I(s, p, o, m) BOOST_PP_IF(p(194, s), m, BOOST_PP_TUPLE_EAT_2)(194, s) BOOST_PP_IF(p(194, s), BOOST_PP_FOR_194, BOOST_PP_TUPLE_EAT_4)(o(194, s), p, o, m) +# define BOOST_PP_FOR_194_I(s, p, o, m) BOOST_PP_IF(p(195, s), m, BOOST_PP_TUPLE_EAT_2)(195, s) BOOST_PP_IF(p(195, s), BOOST_PP_FOR_195, BOOST_PP_TUPLE_EAT_4)(o(195, s), p, o, m) +# define BOOST_PP_FOR_195_I(s, p, o, m) BOOST_PP_IF(p(196, s), m, BOOST_PP_TUPLE_EAT_2)(196, s) BOOST_PP_IF(p(196, s), BOOST_PP_FOR_196, BOOST_PP_TUPLE_EAT_4)(o(196, s), p, o, m) +# define BOOST_PP_FOR_196_I(s, p, o, m) BOOST_PP_IF(p(197, s), m, BOOST_PP_TUPLE_EAT_2)(197, s) BOOST_PP_IF(p(197, s), BOOST_PP_FOR_197, BOOST_PP_TUPLE_EAT_4)(o(197, s), p, o, m) +# define BOOST_PP_FOR_197_I(s, p, o, m) BOOST_PP_IF(p(198, s), m, BOOST_PP_TUPLE_EAT_2)(198, s) BOOST_PP_IF(p(198, s), BOOST_PP_FOR_198, BOOST_PP_TUPLE_EAT_4)(o(198, s), p, o, m) +# define BOOST_PP_FOR_198_I(s, p, o, m) BOOST_PP_IF(p(199, s), m, BOOST_PP_TUPLE_EAT_2)(199, s) BOOST_PP_IF(p(199, s), BOOST_PP_FOR_199, BOOST_PP_TUPLE_EAT_4)(o(199, s), p, o, m) +# define BOOST_PP_FOR_199_I(s, p, o, m) BOOST_PP_IF(p(200, s), m, BOOST_PP_TUPLE_EAT_2)(200, s) BOOST_PP_IF(p(200, s), BOOST_PP_FOR_200, BOOST_PP_TUPLE_EAT_4)(o(200, s), p, o, m) +# define BOOST_PP_FOR_200_I(s, p, o, m) BOOST_PP_IF(p(201, s), m, BOOST_PP_TUPLE_EAT_2)(201, s) BOOST_PP_IF(p(201, s), BOOST_PP_FOR_201, BOOST_PP_TUPLE_EAT_4)(o(201, s), p, o, m) +# define BOOST_PP_FOR_201_I(s, p, o, m) BOOST_PP_IF(p(202, s), m, BOOST_PP_TUPLE_EAT_2)(202, s) BOOST_PP_IF(p(202, s), BOOST_PP_FOR_202, BOOST_PP_TUPLE_EAT_4)(o(202, s), p, o, m) +# define BOOST_PP_FOR_202_I(s, p, o, m) BOOST_PP_IF(p(203, s), m, BOOST_PP_TUPLE_EAT_2)(203, s) BOOST_PP_IF(p(203, s), BOOST_PP_FOR_203, BOOST_PP_TUPLE_EAT_4)(o(203, s), p, o, m) +# define BOOST_PP_FOR_203_I(s, p, o, m) BOOST_PP_IF(p(204, s), m, BOOST_PP_TUPLE_EAT_2)(204, s) BOOST_PP_IF(p(204, s), BOOST_PP_FOR_204, BOOST_PP_TUPLE_EAT_4)(o(204, s), p, o, m) +# define BOOST_PP_FOR_204_I(s, p, o, m) BOOST_PP_IF(p(205, s), m, BOOST_PP_TUPLE_EAT_2)(205, s) BOOST_PP_IF(p(205, s), BOOST_PP_FOR_205, BOOST_PP_TUPLE_EAT_4)(o(205, s), p, o, m) +# define BOOST_PP_FOR_205_I(s, p, o, m) BOOST_PP_IF(p(206, s), m, BOOST_PP_TUPLE_EAT_2)(206, s) BOOST_PP_IF(p(206, s), BOOST_PP_FOR_206, BOOST_PP_TUPLE_EAT_4)(o(206, s), p, o, m) +# define BOOST_PP_FOR_206_I(s, p, o, m) BOOST_PP_IF(p(207, s), m, BOOST_PP_TUPLE_EAT_2)(207, s) BOOST_PP_IF(p(207, s), BOOST_PP_FOR_207, BOOST_PP_TUPLE_EAT_4)(o(207, s), p, o, m) +# define BOOST_PP_FOR_207_I(s, p, o, m) BOOST_PP_IF(p(208, s), m, BOOST_PP_TUPLE_EAT_2)(208, s) BOOST_PP_IF(p(208, s), BOOST_PP_FOR_208, BOOST_PP_TUPLE_EAT_4)(o(208, s), p, o, m) +# define BOOST_PP_FOR_208_I(s, p, o, m) BOOST_PP_IF(p(209, s), m, BOOST_PP_TUPLE_EAT_2)(209, s) BOOST_PP_IF(p(209, s), BOOST_PP_FOR_209, BOOST_PP_TUPLE_EAT_4)(o(209, s), p, o, m) +# define BOOST_PP_FOR_209_I(s, p, o, m) BOOST_PP_IF(p(210, s), m, BOOST_PP_TUPLE_EAT_2)(210, s) BOOST_PP_IF(p(210, s), BOOST_PP_FOR_210, BOOST_PP_TUPLE_EAT_4)(o(210, s), p, o, m) +# define BOOST_PP_FOR_210_I(s, p, o, m) BOOST_PP_IF(p(211, s), m, BOOST_PP_TUPLE_EAT_2)(211, s) BOOST_PP_IF(p(211, s), BOOST_PP_FOR_211, BOOST_PP_TUPLE_EAT_4)(o(211, s), p, o, m) +# define BOOST_PP_FOR_211_I(s, p, o, m) BOOST_PP_IF(p(212, s), m, BOOST_PP_TUPLE_EAT_2)(212, s) BOOST_PP_IF(p(212, s), BOOST_PP_FOR_212, BOOST_PP_TUPLE_EAT_4)(o(212, s), p, o, m) +# define BOOST_PP_FOR_212_I(s, p, o, m) BOOST_PP_IF(p(213, s), m, BOOST_PP_TUPLE_EAT_2)(213, s) BOOST_PP_IF(p(213, s), BOOST_PP_FOR_213, BOOST_PP_TUPLE_EAT_4)(o(213, s), p, o, m) +# define BOOST_PP_FOR_213_I(s, p, o, m) BOOST_PP_IF(p(214, s), m, BOOST_PP_TUPLE_EAT_2)(214, s) BOOST_PP_IF(p(214, s), BOOST_PP_FOR_214, BOOST_PP_TUPLE_EAT_4)(o(214, s), p, o, m) +# define BOOST_PP_FOR_214_I(s, p, o, m) BOOST_PP_IF(p(215, s), m, BOOST_PP_TUPLE_EAT_2)(215, s) BOOST_PP_IF(p(215, s), BOOST_PP_FOR_215, BOOST_PP_TUPLE_EAT_4)(o(215, s), p, o, m) +# define BOOST_PP_FOR_215_I(s, p, o, m) BOOST_PP_IF(p(216, s), m, BOOST_PP_TUPLE_EAT_2)(216, s) BOOST_PP_IF(p(216, s), BOOST_PP_FOR_216, BOOST_PP_TUPLE_EAT_4)(o(216, s), p, o, m) +# define BOOST_PP_FOR_216_I(s, p, o, m) BOOST_PP_IF(p(217, s), m, BOOST_PP_TUPLE_EAT_2)(217, s) BOOST_PP_IF(p(217, s), BOOST_PP_FOR_217, BOOST_PP_TUPLE_EAT_4)(o(217, s), p, o, m) +# define BOOST_PP_FOR_217_I(s, p, o, m) BOOST_PP_IF(p(218, s), m, BOOST_PP_TUPLE_EAT_2)(218, s) BOOST_PP_IF(p(218, s), BOOST_PP_FOR_218, BOOST_PP_TUPLE_EAT_4)(o(218, s), p, o, m) +# define BOOST_PP_FOR_218_I(s, p, o, m) BOOST_PP_IF(p(219, s), m, BOOST_PP_TUPLE_EAT_2)(219, s) BOOST_PP_IF(p(219, s), BOOST_PP_FOR_219, BOOST_PP_TUPLE_EAT_4)(o(219, s), p, o, m) +# define BOOST_PP_FOR_219_I(s, p, o, m) BOOST_PP_IF(p(220, s), m, BOOST_PP_TUPLE_EAT_2)(220, s) BOOST_PP_IF(p(220, s), BOOST_PP_FOR_220, BOOST_PP_TUPLE_EAT_4)(o(220, s), p, o, m) +# define BOOST_PP_FOR_220_I(s, p, o, m) BOOST_PP_IF(p(221, s), m, BOOST_PP_TUPLE_EAT_2)(221, s) BOOST_PP_IF(p(221, s), BOOST_PP_FOR_221, BOOST_PP_TUPLE_EAT_4)(o(221, s), p, o, m) +# define BOOST_PP_FOR_221_I(s, p, o, m) BOOST_PP_IF(p(222, s), m, BOOST_PP_TUPLE_EAT_2)(222, s) BOOST_PP_IF(p(222, s), BOOST_PP_FOR_222, BOOST_PP_TUPLE_EAT_4)(o(222, s), p, o, m) +# define BOOST_PP_FOR_222_I(s, p, o, m) BOOST_PP_IF(p(223, s), m, BOOST_PP_TUPLE_EAT_2)(223, s) BOOST_PP_IF(p(223, s), BOOST_PP_FOR_223, BOOST_PP_TUPLE_EAT_4)(o(223, s), p, o, m) +# define BOOST_PP_FOR_223_I(s, p, o, m) BOOST_PP_IF(p(224, s), m, BOOST_PP_TUPLE_EAT_2)(224, s) BOOST_PP_IF(p(224, s), BOOST_PP_FOR_224, BOOST_PP_TUPLE_EAT_4)(o(224, s), p, o, m) +# define BOOST_PP_FOR_224_I(s, p, o, m) BOOST_PP_IF(p(225, s), m, BOOST_PP_TUPLE_EAT_2)(225, s) BOOST_PP_IF(p(225, s), BOOST_PP_FOR_225, BOOST_PP_TUPLE_EAT_4)(o(225, s), p, o, m) +# define BOOST_PP_FOR_225_I(s, p, o, m) BOOST_PP_IF(p(226, s), m, BOOST_PP_TUPLE_EAT_2)(226, s) BOOST_PP_IF(p(226, s), BOOST_PP_FOR_226, BOOST_PP_TUPLE_EAT_4)(o(226, s), p, o, m) +# define BOOST_PP_FOR_226_I(s, p, o, m) BOOST_PP_IF(p(227, s), m, BOOST_PP_TUPLE_EAT_2)(227, s) BOOST_PP_IF(p(227, s), BOOST_PP_FOR_227, BOOST_PP_TUPLE_EAT_4)(o(227, s), p, o, m) +# define BOOST_PP_FOR_227_I(s, p, o, m) BOOST_PP_IF(p(228, s), m, BOOST_PP_TUPLE_EAT_2)(228, s) BOOST_PP_IF(p(228, s), BOOST_PP_FOR_228, BOOST_PP_TUPLE_EAT_4)(o(228, s), p, o, m) +# define BOOST_PP_FOR_228_I(s, p, o, m) BOOST_PP_IF(p(229, s), m, BOOST_PP_TUPLE_EAT_2)(229, s) BOOST_PP_IF(p(229, s), BOOST_PP_FOR_229, BOOST_PP_TUPLE_EAT_4)(o(229, s), p, o, m) +# define BOOST_PP_FOR_229_I(s, p, o, m) BOOST_PP_IF(p(230, s), m, BOOST_PP_TUPLE_EAT_2)(230, s) BOOST_PP_IF(p(230, s), BOOST_PP_FOR_230, BOOST_PP_TUPLE_EAT_4)(o(230, s), p, o, m) +# define BOOST_PP_FOR_230_I(s, p, o, m) BOOST_PP_IF(p(231, s), m, BOOST_PP_TUPLE_EAT_2)(231, s) BOOST_PP_IF(p(231, s), BOOST_PP_FOR_231, BOOST_PP_TUPLE_EAT_4)(o(231, s), p, o, m) +# define BOOST_PP_FOR_231_I(s, p, o, m) BOOST_PP_IF(p(232, s), m, BOOST_PP_TUPLE_EAT_2)(232, s) BOOST_PP_IF(p(232, s), BOOST_PP_FOR_232, BOOST_PP_TUPLE_EAT_4)(o(232, s), p, o, m) +# define BOOST_PP_FOR_232_I(s, p, o, m) BOOST_PP_IF(p(233, s), m, BOOST_PP_TUPLE_EAT_2)(233, s) BOOST_PP_IF(p(233, s), BOOST_PP_FOR_233, BOOST_PP_TUPLE_EAT_4)(o(233, s), p, o, m) +# define BOOST_PP_FOR_233_I(s, p, o, m) BOOST_PP_IF(p(234, s), m, BOOST_PP_TUPLE_EAT_2)(234, s) BOOST_PP_IF(p(234, s), BOOST_PP_FOR_234, BOOST_PP_TUPLE_EAT_4)(o(234, s), p, o, m) +# define BOOST_PP_FOR_234_I(s, p, o, m) BOOST_PP_IF(p(235, s), m, BOOST_PP_TUPLE_EAT_2)(235, s) BOOST_PP_IF(p(235, s), BOOST_PP_FOR_235, BOOST_PP_TUPLE_EAT_4)(o(235, s), p, o, m) +# define BOOST_PP_FOR_235_I(s, p, o, m) BOOST_PP_IF(p(236, s), m, BOOST_PP_TUPLE_EAT_2)(236, s) BOOST_PP_IF(p(236, s), BOOST_PP_FOR_236, BOOST_PP_TUPLE_EAT_4)(o(236, s), p, o, m) +# define BOOST_PP_FOR_236_I(s, p, o, m) BOOST_PP_IF(p(237, s), m, BOOST_PP_TUPLE_EAT_2)(237, s) BOOST_PP_IF(p(237, s), BOOST_PP_FOR_237, BOOST_PP_TUPLE_EAT_4)(o(237, s), p, o, m) +# define BOOST_PP_FOR_237_I(s, p, o, m) BOOST_PP_IF(p(238, s), m, BOOST_PP_TUPLE_EAT_2)(238, s) BOOST_PP_IF(p(238, s), BOOST_PP_FOR_238, BOOST_PP_TUPLE_EAT_4)(o(238, s), p, o, m) +# define BOOST_PP_FOR_238_I(s, p, o, m) BOOST_PP_IF(p(239, s), m, BOOST_PP_TUPLE_EAT_2)(239, s) BOOST_PP_IF(p(239, s), BOOST_PP_FOR_239, BOOST_PP_TUPLE_EAT_4)(o(239, s), p, o, m) +# define BOOST_PP_FOR_239_I(s, p, o, m) BOOST_PP_IF(p(240, s), m, BOOST_PP_TUPLE_EAT_2)(240, s) BOOST_PP_IF(p(240, s), BOOST_PP_FOR_240, BOOST_PP_TUPLE_EAT_4)(o(240, s), p, o, m) +# define BOOST_PP_FOR_240_I(s, p, o, m) BOOST_PP_IF(p(241, s), m, BOOST_PP_TUPLE_EAT_2)(241, s) BOOST_PP_IF(p(241, s), BOOST_PP_FOR_241, BOOST_PP_TUPLE_EAT_4)(o(241, s), p, o, m) +# define BOOST_PP_FOR_241_I(s, p, o, m) BOOST_PP_IF(p(242, s), m, BOOST_PP_TUPLE_EAT_2)(242, s) BOOST_PP_IF(p(242, s), BOOST_PP_FOR_242, BOOST_PP_TUPLE_EAT_4)(o(242, s), p, o, m) +# define BOOST_PP_FOR_242_I(s, p, o, m) BOOST_PP_IF(p(243, s), m, BOOST_PP_TUPLE_EAT_2)(243, s) BOOST_PP_IF(p(243, s), BOOST_PP_FOR_243, BOOST_PP_TUPLE_EAT_4)(o(243, s), p, o, m) +# define BOOST_PP_FOR_243_I(s, p, o, m) BOOST_PP_IF(p(244, s), m, BOOST_PP_TUPLE_EAT_2)(244, s) BOOST_PP_IF(p(244, s), BOOST_PP_FOR_244, BOOST_PP_TUPLE_EAT_4)(o(244, s), p, o, m) +# define BOOST_PP_FOR_244_I(s, p, o, m) BOOST_PP_IF(p(245, s), m, BOOST_PP_TUPLE_EAT_2)(245, s) BOOST_PP_IF(p(245, s), BOOST_PP_FOR_245, BOOST_PP_TUPLE_EAT_4)(o(245, s), p, o, m) +# define BOOST_PP_FOR_245_I(s, p, o, m) BOOST_PP_IF(p(246, s), m, BOOST_PP_TUPLE_EAT_2)(246, s) BOOST_PP_IF(p(246, s), BOOST_PP_FOR_246, BOOST_PP_TUPLE_EAT_4)(o(246, s), p, o, m) +# define BOOST_PP_FOR_246_I(s, p, o, m) BOOST_PP_IF(p(247, s), m, BOOST_PP_TUPLE_EAT_2)(247, s) BOOST_PP_IF(p(247, s), BOOST_PP_FOR_247, BOOST_PP_TUPLE_EAT_4)(o(247, s), p, o, m) +# define BOOST_PP_FOR_247_I(s, p, o, m) BOOST_PP_IF(p(248, s), m, BOOST_PP_TUPLE_EAT_2)(248, s) BOOST_PP_IF(p(248, s), BOOST_PP_FOR_248, BOOST_PP_TUPLE_EAT_4)(o(248, s), p, o, m) +# define BOOST_PP_FOR_248_I(s, p, o, m) BOOST_PP_IF(p(249, s), m, BOOST_PP_TUPLE_EAT_2)(249, s) BOOST_PP_IF(p(249, s), BOOST_PP_FOR_249, BOOST_PP_TUPLE_EAT_4)(o(249, s), p, o, m) +# define BOOST_PP_FOR_249_I(s, p, o, m) BOOST_PP_IF(p(250, s), m, BOOST_PP_TUPLE_EAT_2)(250, s) BOOST_PP_IF(p(250, s), BOOST_PP_FOR_250, BOOST_PP_TUPLE_EAT_4)(o(250, s), p, o, m) +# define BOOST_PP_FOR_250_I(s, p, o, m) BOOST_PP_IF(p(251, s), m, BOOST_PP_TUPLE_EAT_2)(251, s) BOOST_PP_IF(p(251, s), BOOST_PP_FOR_251, BOOST_PP_TUPLE_EAT_4)(o(251, s), p, o, m) +# define BOOST_PP_FOR_251_I(s, p, o, m) BOOST_PP_IF(p(252, s), m, BOOST_PP_TUPLE_EAT_2)(252, s) BOOST_PP_IF(p(252, s), BOOST_PP_FOR_252, BOOST_PP_TUPLE_EAT_4)(o(252, s), p, o, m) +# define BOOST_PP_FOR_252_I(s, p, o, m) BOOST_PP_IF(p(253, s), m, BOOST_PP_TUPLE_EAT_2)(253, s) BOOST_PP_IF(p(253, s), BOOST_PP_FOR_253, BOOST_PP_TUPLE_EAT_4)(o(253, s), p, o, m) +# define BOOST_PP_FOR_253_I(s, p, o, m) BOOST_PP_IF(p(254, s), m, BOOST_PP_TUPLE_EAT_2)(254, s) BOOST_PP_IF(p(254, s), BOOST_PP_FOR_254, BOOST_PP_TUPLE_EAT_4)(o(254, s), p, o, m) +# define BOOST_PP_FOR_254_I(s, p, o, m) BOOST_PP_IF(p(255, s), m, BOOST_PP_TUPLE_EAT_2)(255, s) BOOST_PP_IF(p(255, s), BOOST_PP_FOR_255, BOOST_PP_TUPLE_EAT_4)(o(255, s), p, o, m) +# define BOOST_PP_FOR_255_I(s, p, o, m) BOOST_PP_IF(p(256, s), m, BOOST_PP_TUPLE_EAT_2)(256, s) BOOST_PP_IF(p(256, s), BOOST_PP_FOR_256, BOOST_PP_TUPLE_EAT_4)(o(256, s), p, o, m) +# define BOOST_PP_FOR_256_I(s, p, o, m) BOOST_PP_IF(p(257, s), m, BOOST_PP_TUPLE_EAT_2)(257, s) BOOST_PP_IF(p(257, s), BOOST_PP_FOR_257, BOOST_PP_TUPLE_EAT_4)(o(257, s), p, o, m) +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/repetition/detail/for.hpp b/ThirdParty/boost-Subset/boost/preprocessor/repetition/detail/for.hpp new file mode 100644 index 0000000000..2770f2c1ea --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/repetition/detail/for.hpp @@ -0,0 +1,536 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_DETAIL_FOR_HPP +# define BOOST_PREPROCESSOR_REPETITION_DETAIL_FOR_HPP +# +# include +# include +# include +# include +# +# define BOOST_PP_FOR_1(s, p, o, m) BOOST_PP_FOR_1_C(BOOST_PP_BOOL(p(2, s)), s, p, o, m) +# define BOOST_PP_FOR_2(s, p, o, m) BOOST_PP_FOR_2_C(BOOST_PP_BOOL(p(3, s)), s, p, o, m) +# define BOOST_PP_FOR_3(s, p, o, m) BOOST_PP_FOR_3_C(BOOST_PP_BOOL(p(4, s)), s, p, o, m) +# define BOOST_PP_FOR_4(s, p, o, m) BOOST_PP_FOR_4_C(BOOST_PP_BOOL(p(5, s)), s, p, o, m) +# define BOOST_PP_FOR_5(s, p, o, m) BOOST_PP_FOR_5_C(BOOST_PP_BOOL(p(6, s)), s, p, o, m) +# define BOOST_PP_FOR_6(s, p, o, m) BOOST_PP_FOR_6_C(BOOST_PP_BOOL(p(7, s)), s, p, o, m) +# define BOOST_PP_FOR_7(s, p, o, m) BOOST_PP_FOR_7_C(BOOST_PP_BOOL(p(8, s)), s, p, o, m) +# define BOOST_PP_FOR_8(s, p, o, m) BOOST_PP_FOR_8_C(BOOST_PP_BOOL(p(9, s)), s, p, o, m) +# define BOOST_PP_FOR_9(s, p, o, m) BOOST_PP_FOR_9_C(BOOST_PP_BOOL(p(10, s)), s, p, o, m) +# define BOOST_PP_FOR_10(s, p, o, m) BOOST_PP_FOR_10_C(BOOST_PP_BOOL(p(11, s)), s, p, o, m) +# define BOOST_PP_FOR_11(s, p, o, m) BOOST_PP_FOR_11_C(BOOST_PP_BOOL(p(12, s)), s, p, o, m) +# define BOOST_PP_FOR_12(s, p, o, m) BOOST_PP_FOR_12_C(BOOST_PP_BOOL(p(13, s)), s, p, o, m) +# define BOOST_PP_FOR_13(s, p, o, m) BOOST_PP_FOR_13_C(BOOST_PP_BOOL(p(14, s)), s, p, o, m) +# define BOOST_PP_FOR_14(s, p, o, m) BOOST_PP_FOR_14_C(BOOST_PP_BOOL(p(15, s)), s, p, o, m) +# define BOOST_PP_FOR_15(s, p, o, m) BOOST_PP_FOR_15_C(BOOST_PP_BOOL(p(16, s)), s, p, o, m) +# define BOOST_PP_FOR_16(s, p, o, m) BOOST_PP_FOR_16_C(BOOST_PP_BOOL(p(17, s)), s, p, o, m) +# define BOOST_PP_FOR_17(s, p, o, m) BOOST_PP_FOR_17_C(BOOST_PP_BOOL(p(18, s)), s, p, o, m) +# define BOOST_PP_FOR_18(s, p, o, m) BOOST_PP_FOR_18_C(BOOST_PP_BOOL(p(19, s)), s, p, o, m) +# define BOOST_PP_FOR_19(s, p, o, m) BOOST_PP_FOR_19_C(BOOST_PP_BOOL(p(20, s)), s, p, o, m) +# define BOOST_PP_FOR_20(s, p, o, m) BOOST_PP_FOR_20_C(BOOST_PP_BOOL(p(21, s)), s, p, o, m) +# define BOOST_PP_FOR_21(s, p, o, m) BOOST_PP_FOR_21_C(BOOST_PP_BOOL(p(22, s)), s, p, o, m) +# define BOOST_PP_FOR_22(s, p, o, m) BOOST_PP_FOR_22_C(BOOST_PP_BOOL(p(23, s)), s, p, o, m) +# define BOOST_PP_FOR_23(s, p, o, m) BOOST_PP_FOR_23_C(BOOST_PP_BOOL(p(24, s)), s, p, o, m) +# define BOOST_PP_FOR_24(s, p, o, m) BOOST_PP_FOR_24_C(BOOST_PP_BOOL(p(25, s)), s, p, o, m) +# define BOOST_PP_FOR_25(s, p, o, m) BOOST_PP_FOR_25_C(BOOST_PP_BOOL(p(26, s)), s, p, o, m) +# define BOOST_PP_FOR_26(s, p, o, m) BOOST_PP_FOR_26_C(BOOST_PP_BOOL(p(27, s)), s, p, o, m) +# define BOOST_PP_FOR_27(s, p, o, m) BOOST_PP_FOR_27_C(BOOST_PP_BOOL(p(28, s)), s, p, o, m) +# define BOOST_PP_FOR_28(s, p, o, m) BOOST_PP_FOR_28_C(BOOST_PP_BOOL(p(29, s)), s, p, o, m) +# define BOOST_PP_FOR_29(s, p, o, m) BOOST_PP_FOR_29_C(BOOST_PP_BOOL(p(30, s)), s, p, o, m) +# define BOOST_PP_FOR_30(s, p, o, m) BOOST_PP_FOR_30_C(BOOST_PP_BOOL(p(31, s)), s, p, o, m) +# define BOOST_PP_FOR_31(s, p, o, m) BOOST_PP_FOR_31_C(BOOST_PP_BOOL(p(32, s)), s, p, o, m) +# define BOOST_PP_FOR_32(s, p, o, m) BOOST_PP_FOR_32_C(BOOST_PP_BOOL(p(33, s)), s, p, o, m) +# define BOOST_PP_FOR_33(s, p, o, m) BOOST_PP_FOR_33_C(BOOST_PP_BOOL(p(34, s)), s, p, o, m) +# define BOOST_PP_FOR_34(s, p, o, m) BOOST_PP_FOR_34_C(BOOST_PP_BOOL(p(35, s)), s, p, o, m) +# define BOOST_PP_FOR_35(s, p, o, m) BOOST_PP_FOR_35_C(BOOST_PP_BOOL(p(36, s)), s, p, o, m) +# define BOOST_PP_FOR_36(s, p, o, m) BOOST_PP_FOR_36_C(BOOST_PP_BOOL(p(37, s)), s, p, o, m) +# define BOOST_PP_FOR_37(s, p, o, m) BOOST_PP_FOR_37_C(BOOST_PP_BOOL(p(38, s)), s, p, o, m) +# define BOOST_PP_FOR_38(s, p, o, m) BOOST_PP_FOR_38_C(BOOST_PP_BOOL(p(39, s)), s, p, o, m) +# define BOOST_PP_FOR_39(s, p, o, m) BOOST_PP_FOR_39_C(BOOST_PP_BOOL(p(40, s)), s, p, o, m) +# define BOOST_PP_FOR_40(s, p, o, m) BOOST_PP_FOR_40_C(BOOST_PP_BOOL(p(41, s)), s, p, o, m) +# define BOOST_PP_FOR_41(s, p, o, m) BOOST_PP_FOR_41_C(BOOST_PP_BOOL(p(42, s)), s, p, o, m) +# define BOOST_PP_FOR_42(s, p, o, m) BOOST_PP_FOR_42_C(BOOST_PP_BOOL(p(43, s)), s, p, o, m) +# define BOOST_PP_FOR_43(s, p, o, m) BOOST_PP_FOR_43_C(BOOST_PP_BOOL(p(44, s)), s, p, o, m) +# define BOOST_PP_FOR_44(s, p, o, m) BOOST_PP_FOR_44_C(BOOST_PP_BOOL(p(45, s)), s, p, o, m) +# define BOOST_PP_FOR_45(s, p, o, m) BOOST_PP_FOR_45_C(BOOST_PP_BOOL(p(46, s)), s, p, o, m) +# define BOOST_PP_FOR_46(s, p, o, m) BOOST_PP_FOR_46_C(BOOST_PP_BOOL(p(47, s)), s, p, o, m) +# define BOOST_PP_FOR_47(s, p, o, m) BOOST_PP_FOR_47_C(BOOST_PP_BOOL(p(48, s)), s, p, o, m) +# define BOOST_PP_FOR_48(s, p, o, m) BOOST_PP_FOR_48_C(BOOST_PP_BOOL(p(49, s)), s, p, o, m) +# define BOOST_PP_FOR_49(s, p, o, m) BOOST_PP_FOR_49_C(BOOST_PP_BOOL(p(50, s)), s, p, o, m) +# define BOOST_PP_FOR_50(s, p, o, m) BOOST_PP_FOR_50_C(BOOST_PP_BOOL(p(51, s)), s, p, o, m) +# define BOOST_PP_FOR_51(s, p, o, m) BOOST_PP_FOR_51_C(BOOST_PP_BOOL(p(52, s)), s, p, o, m) +# define BOOST_PP_FOR_52(s, p, o, m) BOOST_PP_FOR_52_C(BOOST_PP_BOOL(p(53, s)), s, p, o, m) +# define BOOST_PP_FOR_53(s, p, o, m) BOOST_PP_FOR_53_C(BOOST_PP_BOOL(p(54, s)), s, p, o, m) +# define BOOST_PP_FOR_54(s, p, o, m) BOOST_PP_FOR_54_C(BOOST_PP_BOOL(p(55, s)), s, p, o, m) +# define BOOST_PP_FOR_55(s, p, o, m) BOOST_PP_FOR_55_C(BOOST_PP_BOOL(p(56, s)), s, p, o, m) +# define BOOST_PP_FOR_56(s, p, o, m) BOOST_PP_FOR_56_C(BOOST_PP_BOOL(p(57, s)), s, p, o, m) +# define BOOST_PP_FOR_57(s, p, o, m) BOOST_PP_FOR_57_C(BOOST_PP_BOOL(p(58, s)), s, p, o, m) +# define BOOST_PP_FOR_58(s, p, o, m) BOOST_PP_FOR_58_C(BOOST_PP_BOOL(p(59, s)), s, p, o, m) +# define BOOST_PP_FOR_59(s, p, o, m) BOOST_PP_FOR_59_C(BOOST_PP_BOOL(p(60, s)), s, p, o, m) +# define BOOST_PP_FOR_60(s, p, o, m) BOOST_PP_FOR_60_C(BOOST_PP_BOOL(p(61, s)), s, p, o, m) +# define BOOST_PP_FOR_61(s, p, o, m) BOOST_PP_FOR_61_C(BOOST_PP_BOOL(p(62, s)), s, p, o, m) +# define BOOST_PP_FOR_62(s, p, o, m) BOOST_PP_FOR_62_C(BOOST_PP_BOOL(p(63, s)), s, p, o, m) +# define BOOST_PP_FOR_63(s, p, o, m) BOOST_PP_FOR_63_C(BOOST_PP_BOOL(p(64, s)), s, p, o, m) +# define BOOST_PP_FOR_64(s, p, o, m) BOOST_PP_FOR_64_C(BOOST_PP_BOOL(p(65, s)), s, p, o, m) +# define BOOST_PP_FOR_65(s, p, o, m) BOOST_PP_FOR_65_C(BOOST_PP_BOOL(p(66, s)), s, p, o, m) +# define BOOST_PP_FOR_66(s, p, o, m) BOOST_PP_FOR_66_C(BOOST_PP_BOOL(p(67, s)), s, p, o, m) +# define BOOST_PP_FOR_67(s, p, o, m) BOOST_PP_FOR_67_C(BOOST_PP_BOOL(p(68, s)), s, p, o, m) +# define BOOST_PP_FOR_68(s, p, o, m) BOOST_PP_FOR_68_C(BOOST_PP_BOOL(p(69, s)), s, p, o, m) +# define BOOST_PP_FOR_69(s, p, o, m) BOOST_PP_FOR_69_C(BOOST_PP_BOOL(p(70, s)), s, p, o, m) +# define BOOST_PP_FOR_70(s, p, o, m) BOOST_PP_FOR_70_C(BOOST_PP_BOOL(p(71, s)), s, p, o, m) +# define BOOST_PP_FOR_71(s, p, o, m) BOOST_PP_FOR_71_C(BOOST_PP_BOOL(p(72, s)), s, p, o, m) +# define BOOST_PP_FOR_72(s, p, o, m) BOOST_PP_FOR_72_C(BOOST_PP_BOOL(p(73, s)), s, p, o, m) +# define BOOST_PP_FOR_73(s, p, o, m) BOOST_PP_FOR_73_C(BOOST_PP_BOOL(p(74, s)), s, p, o, m) +# define BOOST_PP_FOR_74(s, p, o, m) BOOST_PP_FOR_74_C(BOOST_PP_BOOL(p(75, s)), s, p, o, m) +# define BOOST_PP_FOR_75(s, p, o, m) BOOST_PP_FOR_75_C(BOOST_PP_BOOL(p(76, s)), s, p, o, m) +# define BOOST_PP_FOR_76(s, p, o, m) BOOST_PP_FOR_76_C(BOOST_PP_BOOL(p(77, s)), s, p, o, m) +# define BOOST_PP_FOR_77(s, p, o, m) BOOST_PP_FOR_77_C(BOOST_PP_BOOL(p(78, s)), s, p, o, m) +# define BOOST_PP_FOR_78(s, p, o, m) BOOST_PP_FOR_78_C(BOOST_PP_BOOL(p(79, s)), s, p, o, m) +# define BOOST_PP_FOR_79(s, p, o, m) BOOST_PP_FOR_79_C(BOOST_PP_BOOL(p(80, s)), s, p, o, m) +# define BOOST_PP_FOR_80(s, p, o, m) BOOST_PP_FOR_80_C(BOOST_PP_BOOL(p(81, s)), s, p, o, m) +# define BOOST_PP_FOR_81(s, p, o, m) BOOST_PP_FOR_81_C(BOOST_PP_BOOL(p(82, s)), s, p, o, m) +# define BOOST_PP_FOR_82(s, p, o, m) BOOST_PP_FOR_82_C(BOOST_PP_BOOL(p(83, s)), s, p, o, m) +# define BOOST_PP_FOR_83(s, p, o, m) BOOST_PP_FOR_83_C(BOOST_PP_BOOL(p(84, s)), s, p, o, m) +# define BOOST_PP_FOR_84(s, p, o, m) BOOST_PP_FOR_84_C(BOOST_PP_BOOL(p(85, s)), s, p, o, m) +# define BOOST_PP_FOR_85(s, p, o, m) BOOST_PP_FOR_85_C(BOOST_PP_BOOL(p(86, s)), s, p, o, m) +# define BOOST_PP_FOR_86(s, p, o, m) BOOST_PP_FOR_86_C(BOOST_PP_BOOL(p(87, s)), s, p, o, m) +# define BOOST_PP_FOR_87(s, p, o, m) BOOST_PP_FOR_87_C(BOOST_PP_BOOL(p(88, s)), s, p, o, m) +# define BOOST_PP_FOR_88(s, p, o, m) BOOST_PP_FOR_88_C(BOOST_PP_BOOL(p(89, s)), s, p, o, m) +# define BOOST_PP_FOR_89(s, p, o, m) BOOST_PP_FOR_89_C(BOOST_PP_BOOL(p(90, s)), s, p, o, m) +# define BOOST_PP_FOR_90(s, p, o, m) BOOST_PP_FOR_90_C(BOOST_PP_BOOL(p(91, s)), s, p, o, m) +# define BOOST_PP_FOR_91(s, p, o, m) BOOST_PP_FOR_91_C(BOOST_PP_BOOL(p(92, s)), s, p, o, m) +# define BOOST_PP_FOR_92(s, p, o, m) BOOST_PP_FOR_92_C(BOOST_PP_BOOL(p(93, s)), s, p, o, m) +# define BOOST_PP_FOR_93(s, p, o, m) BOOST_PP_FOR_93_C(BOOST_PP_BOOL(p(94, s)), s, p, o, m) +# define BOOST_PP_FOR_94(s, p, o, m) BOOST_PP_FOR_94_C(BOOST_PP_BOOL(p(95, s)), s, p, o, m) +# define BOOST_PP_FOR_95(s, p, o, m) BOOST_PP_FOR_95_C(BOOST_PP_BOOL(p(96, s)), s, p, o, m) +# define BOOST_PP_FOR_96(s, p, o, m) BOOST_PP_FOR_96_C(BOOST_PP_BOOL(p(97, s)), s, p, o, m) +# define BOOST_PP_FOR_97(s, p, o, m) BOOST_PP_FOR_97_C(BOOST_PP_BOOL(p(98, s)), s, p, o, m) +# define BOOST_PP_FOR_98(s, p, o, m) BOOST_PP_FOR_98_C(BOOST_PP_BOOL(p(99, s)), s, p, o, m) +# define BOOST_PP_FOR_99(s, p, o, m) BOOST_PP_FOR_99_C(BOOST_PP_BOOL(p(100, s)), s, p, o, m) +# define BOOST_PP_FOR_100(s, p, o, m) BOOST_PP_FOR_100_C(BOOST_PP_BOOL(p(101, s)), s, p, o, m) +# define BOOST_PP_FOR_101(s, p, o, m) BOOST_PP_FOR_101_C(BOOST_PP_BOOL(p(102, s)), s, p, o, m) +# define BOOST_PP_FOR_102(s, p, o, m) BOOST_PP_FOR_102_C(BOOST_PP_BOOL(p(103, s)), s, p, o, m) +# define BOOST_PP_FOR_103(s, p, o, m) BOOST_PP_FOR_103_C(BOOST_PP_BOOL(p(104, s)), s, p, o, m) +# define BOOST_PP_FOR_104(s, p, o, m) BOOST_PP_FOR_104_C(BOOST_PP_BOOL(p(105, s)), s, p, o, m) +# define BOOST_PP_FOR_105(s, p, o, m) BOOST_PP_FOR_105_C(BOOST_PP_BOOL(p(106, s)), s, p, o, m) +# define BOOST_PP_FOR_106(s, p, o, m) BOOST_PP_FOR_106_C(BOOST_PP_BOOL(p(107, s)), s, p, o, m) +# define BOOST_PP_FOR_107(s, p, o, m) BOOST_PP_FOR_107_C(BOOST_PP_BOOL(p(108, s)), s, p, o, m) +# define BOOST_PP_FOR_108(s, p, o, m) BOOST_PP_FOR_108_C(BOOST_PP_BOOL(p(109, s)), s, p, o, m) +# define BOOST_PP_FOR_109(s, p, o, m) BOOST_PP_FOR_109_C(BOOST_PP_BOOL(p(110, s)), s, p, o, m) +# define BOOST_PP_FOR_110(s, p, o, m) BOOST_PP_FOR_110_C(BOOST_PP_BOOL(p(111, s)), s, p, o, m) +# define BOOST_PP_FOR_111(s, p, o, m) BOOST_PP_FOR_111_C(BOOST_PP_BOOL(p(112, s)), s, p, o, m) +# define BOOST_PP_FOR_112(s, p, o, m) BOOST_PP_FOR_112_C(BOOST_PP_BOOL(p(113, s)), s, p, o, m) +# define BOOST_PP_FOR_113(s, p, o, m) BOOST_PP_FOR_113_C(BOOST_PP_BOOL(p(114, s)), s, p, o, m) +# define BOOST_PP_FOR_114(s, p, o, m) BOOST_PP_FOR_114_C(BOOST_PP_BOOL(p(115, s)), s, p, o, m) +# define BOOST_PP_FOR_115(s, p, o, m) BOOST_PP_FOR_115_C(BOOST_PP_BOOL(p(116, s)), s, p, o, m) +# define BOOST_PP_FOR_116(s, p, o, m) BOOST_PP_FOR_116_C(BOOST_PP_BOOL(p(117, s)), s, p, o, m) +# define BOOST_PP_FOR_117(s, p, o, m) BOOST_PP_FOR_117_C(BOOST_PP_BOOL(p(118, s)), s, p, o, m) +# define BOOST_PP_FOR_118(s, p, o, m) BOOST_PP_FOR_118_C(BOOST_PP_BOOL(p(119, s)), s, p, o, m) +# define BOOST_PP_FOR_119(s, p, o, m) BOOST_PP_FOR_119_C(BOOST_PP_BOOL(p(120, s)), s, p, o, m) +# define BOOST_PP_FOR_120(s, p, o, m) BOOST_PP_FOR_120_C(BOOST_PP_BOOL(p(121, s)), s, p, o, m) +# define BOOST_PP_FOR_121(s, p, o, m) BOOST_PP_FOR_121_C(BOOST_PP_BOOL(p(122, s)), s, p, o, m) +# define BOOST_PP_FOR_122(s, p, o, m) BOOST_PP_FOR_122_C(BOOST_PP_BOOL(p(123, s)), s, p, o, m) +# define BOOST_PP_FOR_123(s, p, o, m) BOOST_PP_FOR_123_C(BOOST_PP_BOOL(p(124, s)), s, p, o, m) +# define BOOST_PP_FOR_124(s, p, o, m) BOOST_PP_FOR_124_C(BOOST_PP_BOOL(p(125, s)), s, p, o, m) +# define BOOST_PP_FOR_125(s, p, o, m) BOOST_PP_FOR_125_C(BOOST_PP_BOOL(p(126, s)), s, p, o, m) +# define BOOST_PP_FOR_126(s, p, o, m) BOOST_PP_FOR_126_C(BOOST_PP_BOOL(p(127, s)), s, p, o, m) +# define BOOST_PP_FOR_127(s, p, o, m) BOOST_PP_FOR_127_C(BOOST_PP_BOOL(p(128, s)), s, p, o, m) +# define BOOST_PP_FOR_128(s, p, o, m) BOOST_PP_FOR_128_C(BOOST_PP_BOOL(p(129, s)), s, p, o, m) +# define BOOST_PP_FOR_129(s, p, o, m) BOOST_PP_FOR_129_C(BOOST_PP_BOOL(p(130, s)), s, p, o, m) +# define BOOST_PP_FOR_130(s, p, o, m) BOOST_PP_FOR_130_C(BOOST_PP_BOOL(p(131, s)), s, p, o, m) +# define BOOST_PP_FOR_131(s, p, o, m) BOOST_PP_FOR_131_C(BOOST_PP_BOOL(p(132, s)), s, p, o, m) +# define BOOST_PP_FOR_132(s, p, o, m) BOOST_PP_FOR_132_C(BOOST_PP_BOOL(p(133, s)), s, p, o, m) +# define BOOST_PP_FOR_133(s, p, o, m) BOOST_PP_FOR_133_C(BOOST_PP_BOOL(p(134, s)), s, p, o, m) +# define BOOST_PP_FOR_134(s, p, o, m) BOOST_PP_FOR_134_C(BOOST_PP_BOOL(p(135, s)), s, p, o, m) +# define BOOST_PP_FOR_135(s, p, o, m) BOOST_PP_FOR_135_C(BOOST_PP_BOOL(p(136, s)), s, p, o, m) +# define BOOST_PP_FOR_136(s, p, o, m) BOOST_PP_FOR_136_C(BOOST_PP_BOOL(p(137, s)), s, p, o, m) +# define BOOST_PP_FOR_137(s, p, o, m) BOOST_PP_FOR_137_C(BOOST_PP_BOOL(p(138, s)), s, p, o, m) +# define BOOST_PP_FOR_138(s, p, o, m) BOOST_PP_FOR_138_C(BOOST_PP_BOOL(p(139, s)), s, p, o, m) +# define BOOST_PP_FOR_139(s, p, o, m) BOOST_PP_FOR_139_C(BOOST_PP_BOOL(p(140, s)), s, p, o, m) +# define BOOST_PP_FOR_140(s, p, o, m) BOOST_PP_FOR_140_C(BOOST_PP_BOOL(p(141, s)), s, p, o, m) +# define BOOST_PP_FOR_141(s, p, o, m) BOOST_PP_FOR_141_C(BOOST_PP_BOOL(p(142, s)), s, p, o, m) +# define BOOST_PP_FOR_142(s, p, o, m) BOOST_PP_FOR_142_C(BOOST_PP_BOOL(p(143, s)), s, p, o, m) +# define BOOST_PP_FOR_143(s, p, o, m) BOOST_PP_FOR_143_C(BOOST_PP_BOOL(p(144, s)), s, p, o, m) +# define BOOST_PP_FOR_144(s, p, o, m) BOOST_PP_FOR_144_C(BOOST_PP_BOOL(p(145, s)), s, p, o, m) +# define BOOST_PP_FOR_145(s, p, o, m) BOOST_PP_FOR_145_C(BOOST_PP_BOOL(p(146, s)), s, p, o, m) +# define BOOST_PP_FOR_146(s, p, o, m) BOOST_PP_FOR_146_C(BOOST_PP_BOOL(p(147, s)), s, p, o, m) +# define BOOST_PP_FOR_147(s, p, o, m) BOOST_PP_FOR_147_C(BOOST_PP_BOOL(p(148, s)), s, p, o, m) +# define BOOST_PP_FOR_148(s, p, o, m) BOOST_PP_FOR_148_C(BOOST_PP_BOOL(p(149, s)), s, p, o, m) +# define BOOST_PP_FOR_149(s, p, o, m) BOOST_PP_FOR_149_C(BOOST_PP_BOOL(p(150, s)), s, p, o, m) +# define BOOST_PP_FOR_150(s, p, o, m) BOOST_PP_FOR_150_C(BOOST_PP_BOOL(p(151, s)), s, p, o, m) +# define BOOST_PP_FOR_151(s, p, o, m) BOOST_PP_FOR_151_C(BOOST_PP_BOOL(p(152, s)), s, p, o, m) +# define BOOST_PP_FOR_152(s, p, o, m) BOOST_PP_FOR_152_C(BOOST_PP_BOOL(p(153, s)), s, p, o, m) +# define BOOST_PP_FOR_153(s, p, o, m) BOOST_PP_FOR_153_C(BOOST_PP_BOOL(p(154, s)), s, p, o, m) +# define BOOST_PP_FOR_154(s, p, o, m) BOOST_PP_FOR_154_C(BOOST_PP_BOOL(p(155, s)), s, p, o, m) +# define BOOST_PP_FOR_155(s, p, o, m) BOOST_PP_FOR_155_C(BOOST_PP_BOOL(p(156, s)), s, p, o, m) +# define BOOST_PP_FOR_156(s, p, o, m) BOOST_PP_FOR_156_C(BOOST_PP_BOOL(p(157, s)), s, p, o, m) +# define BOOST_PP_FOR_157(s, p, o, m) BOOST_PP_FOR_157_C(BOOST_PP_BOOL(p(158, s)), s, p, o, m) +# define BOOST_PP_FOR_158(s, p, o, m) BOOST_PP_FOR_158_C(BOOST_PP_BOOL(p(159, s)), s, p, o, m) +# define BOOST_PP_FOR_159(s, p, o, m) BOOST_PP_FOR_159_C(BOOST_PP_BOOL(p(160, s)), s, p, o, m) +# define BOOST_PP_FOR_160(s, p, o, m) BOOST_PP_FOR_160_C(BOOST_PP_BOOL(p(161, s)), s, p, o, m) +# define BOOST_PP_FOR_161(s, p, o, m) BOOST_PP_FOR_161_C(BOOST_PP_BOOL(p(162, s)), s, p, o, m) +# define BOOST_PP_FOR_162(s, p, o, m) BOOST_PP_FOR_162_C(BOOST_PP_BOOL(p(163, s)), s, p, o, m) +# define BOOST_PP_FOR_163(s, p, o, m) BOOST_PP_FOR_163_C(BOOST_PP_BOOL(p(164, s)), s, p, o, m) +# define BOOST_PP_FOR_164(s, p, o, m) BOOST_PP_FOR_164_C(BOOST_PP_BOOL(p(165, s)), s, p, o, m) +# define BOOST_PP_FOR_165(s, p, o, m) BOOST_PP_FOR_165_C(BOOST_PP_BOOL(p(166, s)), s, p, o, m) +# define BOOST_PP_FOR_166(s, p, o, m) BOOST_PP_FOR_166_C(BOOST_PP_BOOL(p(167, s)), s, p, o, m) +# define BOOST_PP_FOR_167(s, p, o, m) BOOST_PP_FOR_167_C(BOOST_PP_BOOL(p(168, s)), s, p, o, m) +# define BOOST_PP_FOR_168(s, p, o, m) BOOST_PP_FOR_168_C(BOOST_PP_BOOL(p(169, s)), s, p, o, m) +# define BOOST_PP_FOR_169(s, p, o, m) BOOST_PP_FOR_169_C(BOOST_PP_BOOL(p(170, s)), s, p, o, m) +# define BOOST_PP_FOR_170(s, p, o, m) BOOST_PP_FOR_170_C(BOOST_PP_BOOL(p(171, s)), s, p, o, m) +# define BOOST_PP_FOR_171(s, p, o, m) BOOST_PP_FOR_171_C(BOOST_PP_BOOL(p(172, s)), s, p, o, m) +# define BOOST_PP_FOR_172(s, p, o, m) BOOST_PP_FOR_172_C(BOOST_PP_BOOL(p(173, s)), s, p, o, m) +# define BOOST_PP_FOR_173(s, p, o, m) BOOST_PP_FOR_173_C(BOOST_PP_BOOL(p(174, s)), s, p, o, m) +# define BOOST_PP_FOR_174(s, p, o, m) BOOST_PP_FOR_174_C(BOOST_PP_BOOL(p(175, s)), s, p, o, m) +# define BOOST_PP_FOR_175(s, p, o, m) BOOST_PP_FOR_175_C(BOOST_PP_BOOL(p(176, s)), s, p, o, m) +# define BOOST_PP_FOR_176(s, p, o, m) BOOST_PP_FOR_176_C(BOOST_PP_BOOL(p(177, s)), s, p, o, m) +# define BOOST_PP_FOR_177(s, p, o, m) BOOST_PP_FOR_177_C(BOOST_PP_BOOL(p(178, s)), s, p, o, m) +# define BOOST_PP_FOR_178(s, p, o, m) BOOST_PP_FOR_178_C(BOOST_PP_BOOL(p(179, s)), s, p, o, m) +# define BOOST_PP_FOR_179(s, p, o, m) BOOST_PP_FOR_179_C(BOOST_PP_BOOL(p(180, s)), s, p, o, m) +# define BOOST_PP_FOR_180(s, p, o, m) BOOST_PP_FOR_180_C(BOOST_PP_BOOL(p(181, s)), s, p, o, m) +# define BOOST_PP_FOR_181(s, p, o, m) BOOST_PP_FOR_181_C(BOOST_PP_BOOL(p(182, s)), s, p, o, m) +# define BOOST_PP_FOR_182(s, p, o, m) BOOST_PP_FOR_182_C(BOOST_PP_BOOL(p(183, s)), s, p, o, m) +# define BOOST_PP_FOR_183(s, p, o, m) BOOST_PP_FOR_183_C(BOOST_PP_BOOL(p(184, s)), s, p, o, m) +# define BOOST_PP_FOR_184(s, p, o, m) BOOST_PP_FOR_184_C(BOOST_PP_BOOL(p(185, s)), s, p, o, m) +# define BOOST_PP_FOR_185(s, p, o, m) BOOST_PP_FOR_185_C(BOOST_PP_BOOL(p(186, s)), s, p, o, m) +# define BOOST_PP_FOR_186(s, p, o, m) BOOST_PP_FOR_186_C(BOOST_PP_BOOL(p(187, s)), s, p, o, m) +# define BOOST_PP_FOR_187(s, p, o, m) BOOST_PP_FOR_187_C(BOOST_PP_BOOL(p(188, s)), s, p, o, m) +# define BOOST_PP_FOR_188(s, p, o, m) BOOST_PP_FOR_188_C(BOOST_PP_BOOL(p(189, s)), s, p, o, m) +# define BOOST_PP_FOR_189(s, p, o, m) BOOST_PP_FOR_189_C(BOOST_PP_BOOL(p(190, s)), s, p, o, m) +# define BOOST_PP_FOR_190(s, p, o, m) BOOST_PP_FOR_190_C(BOOST_PP_BOOL(p(191, s)), s, p, o, m) +# define BOOST_PP_FOR_191(s, p, o, m) BOOST_PP_FOR_191_C(BOOST_PP_BOOL(p(192, s)), s, p, o, m) +# define BOOST_PP_FOR_192(s, p, o, m) BOOST_PP_FOR_192_C(BOOST_PP_BOOL(p(193, s)), s, p, o, m) +# define BOOST_PP_FOR_193(s, p, o, m) BOOST_PP_FOR_193_C(BOOST_PP_BOOL(p(194, s)), s, p, o, m) +# define BOOST_PP_FOR_194(s, p, o, m) BOOST_PP_FOR_194_C(BOOST_PP_BOOL(p(195, s)), s, p, o, m) +# define BOOST_PP_FOR_195(s, p, o, m) BOOST_PP_FOR_195_C(BOOST_PP_BOOL(p(196, s)), s, p, o, m) +# define BOOST_PP_FOR_196(s, p, o, m) BOOST_PP_FOR_196_C(BOOST_PP_BOOL(p(197, s)), s, p, o, m) +# define BOOST_PP_FOR_197(s, p, o, m) BOOST_PP_FOR_197_C(BOOST_PP_BOOL(p(198, s)), s, p, o, m) +# define BOOST_PP_FOR_198(s, p, o, m) BOOST_PP_FOR_198_C(BOOST_PP_BOOL(p(199, s)), s, p, o, m) +# define BOOST_PP_FOR_199(s, p, o, m) BOOST_PP_FOR_199_C(BOOST_PP_BOOL(p(200, s)), s, p, o, m) +# define BOOST_PP_FOR_200(s, p, o, m) BOOST_PP_FOR_200_C(BOOST_PP_BOOL(p(201, s)), s, p, o, m) +# define BOOST_PP_FOR_201(s, p, o, m) BOOST_PP_FOR_201_C(BOOST_PP_BOOL(p(202, s)), s, p, o, m) +# define BOOST_PP_FOR_202(s, p, o, m) BOOST_PP_FOR_202_C(BOOST_PP_BOOL(p(203, s)), s, p, o, m) +# define BOOST_PP_FOR_203(s, p, o, m) BOOST_PP_FOR_203_C(BOOST_PP_BOOL(p(204, s)), s, p, o, m) +# define BOOST_PP_FOR_204(s, p, o, m) BOOST_PP_FOR_204_C(BOOST_PP_BOOL(p(205, s)), s, p, o, m) +# define BOOST_PP_FOR_205(s, p, o, m) BOOST_PP_FOR_205_C(BOOST_PP_BOOL(p(206, s)), s, p, o, m) +# define BOOST_PP_FOR_206(s, p, o, m) BOOST_PP_FOR_206_C(BOOST_PP_BOOL(p(207, s)), s, p, o, m) +# define BOOST_PP_FOR_207(s, p, o, m) BOOST_PP_FOR_207_C(BOOST_PP_BOOL(p(208, s)), s, p, o, m) +# define BOOST_PP_FOR_208(s, p, o, m) BOOST_PP_FOR_208_C(BOOST_PP_BOOL(p(209, s)), s, p, o, m) +# define BOOST_PP_FOR_209(s, p, o, m) BOOST_PP_FOR_209_C(BOOST_PP_BOOL(p(210, s)), s, p, o, m) +# define BOOST_PP_FOR_210(s, p, o, m) BOOST_PP_FOR_210_C(BOOST_PP_BOOL(p(211, s)), s, p, o, m) +# define BOOST_PP_FOR_211(s, p, o, m) BOOST_PP_FOR_211_C(BOOST_PP_BOOL(p(212, s)), s, p, o, m) +# define BOOST_PP_FOR_212(s, p, o, m) BOOST_PP_FOR_212_C(BOOST_PP_BOOL(p(213, s)), s, p, o, m) +# define BOOST_PP_FOR_213(s, p, o, m) BOOST_PP_FOR_213_C(BOOST_PP_BOOL(p(214, s)), s, p, o, m) +# define BOOST_PP_FOR_214(s, p, o, m) BOOST_PP_FOR_214_C(BOOST_PP_BOOL(p(215, s)), s, p, o, m) +# define BOOST_PP_FOR_215(s, p, o, m) BOOST_PP_FOR_215_C(BOOST_PP_BOOL(p(216, s)), s, p, o, m) +# define BOOST_PP_FOR_216(s, p, o, m) BOOST_PP_FOR_216_C(BOOST_PP_BOOL(p(217, s)), s, p, o, m) +# define BOOST_PP_FOR_217(s, p, o, m) BOOST_PP_FOR_217_C(BOOST_PP_BOOL(p(218, s)), s, p, o, m) +# define BOOST_PP_FOR_218(s, p, o, m) BOOST_PP_FOR_218_C(BOOST_PP_BOOL(p(219, s)), s, p, o, m) +# define BOOST_PP_FOR_219(s, p, o, m) BOOST_PP_FOR_219_C(BOOST_PP_BOOL(p(220, s)), s, p, o, m) +# define BOOST_PP_FOR_220(s, p, o, m) BOOST_PP_FOR_220_C(BOOST_PP_BOOL(p(221, s)), s, p, o, m) +# define BOOST_PP_FOR_221(s, p, o, m) BOOST_PP_FOR_221_C(BOOST_PP_BOOL(p(222, s)), s, p, o, m) +# define BOOST_PP_FOR_222(s, p, o, m) BOOST_PP_FOR_222_C(BOOST_PP_BOOL(p(223, s)), s, p, o, m) +# define BOOST_PP_FOR_223(s, p, o, m) BOOST_PP_FOR_223_C(BOOST_PP_BOOL(p(224, s)), s, p, o, m) +# define BOOST_PP_FOR_224(s, p, o, m) BOOST_PP_FOR_224_C(BOOST_PP_BOOL(p(225, s)), s, p, o, m) +# define BOOST_PP_FOR_225(s, p, o, m) BOOST_PP_FOR_225_C(BOOST_PP_BOOL(p(226, s)), s, p, o, m) +# define BOOST_PP_FOR_226(s, p, o, m) BOOST_PP_FOR_226_C(BOOST_PP_BOOL(p(227, s)), s, p, o, m) +# define BOOST_PP_FOR_227(s, p, o, m) BOOST_PP_FOR_227_C(BOOST_PP_BOOL(p(228, s)), s, p, o, m) +# define BOOST_PP_FOR_228(s, p, o, m) BOOST_PP_FOR_228_C(BOOST_PP_BOOL(p(229, s)), s, p, o, m) +# define BOOST_PP_FOR_229(s, p, o, m) BOOST_PP_FOR_229_C(BOOST_PP_BOOL(p(230, s)), s, p, o, m) +# define BOOST_PP_FOR_230(s, p, o, m) BOOST_PP_FOR_230_C(BOOST_PP_BOOL(p(231, s)), s, p, o, m) +# define BOOST_PP_FOR_231(s, p, o, m) BOOST_PP_FOR_231_C(BOOST_PP_BOOL(p(232, s)), s, p, o, m) +# define BOOST_PP_FOR_232(s, p, o, m) BOOST_PP_FOR_232_C(BOOST_PP_BOOL(p(233, s)), s, p, o, m) +# define BOOST_PP_FOR_233(s, p, o, m) BOOST_PP_FOR_233_C(BOOST_PP_BOOL(p(234, s)), s, p, o, m) +# define BOOST_PP_FOR_234(s, p, o, m) BOOST_PP_FOR_234_C(BOOST_PP_BOOL(p(235, s)), s, p, o, m) +# define BOOST_PP_FOR_235(s, p, o, m) BOOST_PP_FOR_235_C(BOOST_PP_BOOL(p(236, s)), s, p, o, m) +# define BOOST_PP_FOR_236(s, p, o, m) BOOST_PP_FOR_236_C(BOOST_PP_BOOL(p(237, s)), s, p, o, m) +# define BOOST_PP_FOR_237(s, p, o, m) BOOST_PP_FOR_237_C(BOOST_PP_BOOL(p(238, s)), s, p, o, m) +# define BOOST_PP_FOR_238(s, p, o, m) BOOST_PP_FOR_238_C(BOOST_PP_BOOL(p(239, s)), s, p, o, m) +# define BOOST_PP_FOR_239(s, p, o, m) BOOST_PP_FOR_239_C(BOOST_PP_BOOL(p(240, s)), s, p, o, m) +# define BOOST_PP_FOR_240(s, p, o, m) BOOST_PP_FOR_240_C(BOOST_PP_BOOL(p(241, s)), s, p, o, m) +# define BOOST_PP_FOR_241(s, p, o, m) BOOST_PP_FOR_241_C(BOOST_PP_BOOL(p(242, s)), s, p, o, m) +# define BOOST_PP_FOR_242(s, p, o, m) BOOST_PP_FOR_242_C(BOOST_PP_BOOL(p(243, s)), s, p, o, m) +# define BOOST_PP_FOR_243(s, p, o, m) BOOST_PP_FOR_243_C(BOOST_PP_BOOL(p(244, s)), s, p, o, m) +# define BOOST_PP_FOR_244(s, p, o, m) BOOST_PP_FOR_244_C(BOOST_PP_BOOL(p(245, s)), s, p, o, m) +# define BOOST_PP_FOR_245(s, p, o, m) BOOST_PP_FOR_245_C(BOOST_PP_BOOL(p(246, s)), s, p, o, m) +# define BOOST_PP_FOR_246(s, p, o, m) BOOST_PP_FOR_246_C(BOOST_PP_BOOL(p(247, s)), s, p, o, m) +# define BOOST_PP_FOR_247(s, p, o, m) BOOST_PP_FOR_247_C(BOOST_PP_BOOL(p(248, s)), s, p, o, m) +# define BOOST_PP_FOR_248(s, p, o, m) BOOST_PP_FOR_248_C(BOOST_PP_BOOL(p(249, s)), s, p, o, m) +# define BOOST_PP_FOR_249(s, p, o, m) BOOST_PP_FOR_249_C(BOOST_PP_BOOL(p(250, s)), s, p, o, m) +# define BOOST_PP_FOR_250(s, p, o, m) BOOST_PP_FOR_250_C(BOOST_PP_BOOL(p(251, s)), s, p, o, m) +# define BOOST_PP_FOR_251(s, p, o, m) BOOST_PP_FOR_251_C(BOOST_PP_BOOL(p(252, s)), s, p, o, m) +# define BOOST_PP_FOR_252(s, p, o, m) BOOST_PP_FOR_252_C(BOOST_PP_BOOL(p(253, s)), s, p, o, m) +# define BOOST_PP_FOR_253(s, p, o, m) BOOST_PP_FOR_253_C(BOOST_PP_BOOL(p(254, s)), s, p, o, m) +# define BOOST_PP_FOR_254(s, p, o, m) BOOST_PP_FOR_254_C(BOOST_PP_BOOL(p(255, s)), s, p, o, m) +# define BOOST_PP_FOR_255(s, p, o, m) BOOST_PP_FOR_255_C(BOOST_PP_BOOL(p(256, s)), s, p, o, m) +# define BOOST_PP_FOR_256(s, p, o, m) BOOST_PP_FOR_256_C(BOOST_PP_BOOL(p(257, s)), s, p, o, m) +# +# define BOOST_PP_FOR_1_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(2, s) BOOST_PP_IIF(c, BOOST_PP_FOR_2, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(2, s), p, o, m) +# define BOOST_PP_FOR_2_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(3, s) BOOST_PP_IIF(c, BOOST_PP_FOR_3, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(3, s), p, o, m) +# define BOOST_PP_FOR_3_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(4, s) BOOST_PP_IIF(c, BOOST_PP_FOR_4, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(4, s), p, o, m) +# define BOOST_PP_FOR_4_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(5, s) BOOST_PP_IIF(c, BOOST_PP_FOR_5, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(5, s), p, o, m) +# define BOOST_PP_FOR_5_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(6, s) BOOST_PP_IIF(c, BOOST_PP_FOR_6, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(6, s), p, o, m) +# define BOOST_PP_FOR_6_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(7, s) BOOST_PP_IIF(c, BOOST_PP_FOR_7, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(7, s), p, o, m) +# define BOOST_PP_FOR_7_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(8, s) BOOST_PP_IIF(c, BOOST_PP_FOR_8, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(8, s), p, o, m) +# define BOOST_PP_FOR_8_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(9, s) BOOST_PP_IIF(c, BOOST_PP_FOR_9, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(9, s), p, o, m) +# define BOOST_PP_FOR_9_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(10, s) BOOST_PP_IIF(c, BOOST_PP_FOR_10, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(10, s), p, o, m) +# define BOOST_PP_FOR_10_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(11, s) BOOST_PP_IIF(c, BOOST_PP_FOR_11, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(11, s), p, o, m) +# define BOOST_PP_FOR_11_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(12, s) BOOST_PP_IIF(c, BOOST_PP_FOR_12, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(12, s), p, o, m) +# define BOOST_PP_FOR_12_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(13, s) BOOST_PP_IIF(c, BOOST_PP_FOR_13, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(13, s), p, o, m) +# define BOOST_PP_FOR_13_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(14, s) BOOST_PP_IIF(c, BOOST_PP_FOR_14, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(14, s), p, o, m) +# define BOOST_PP_FOR_14_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(15, s) BOOST_PP_IIF(c, BOOST_PP_FOR_15, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(15, s), p, o, m) +# define BOOST_PP_FOR_15_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(16, s) BOOST_PP_IIF(c, BOOST_PP_FOR_16, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(16, s), p, o, m) +# define BOOST_PP_FOR_16_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(17, s) BOOST_PP_IIF(c, BOOST_PP_FOR_17, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(17, s), p, o, m) +# define BOOST_PP_FOR_17_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(18, s) BOOST_PP_IIF(c, BOOST_PP_FOR_18, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(18, s), p, o, m) +# define BOOST_PP_FOR_18_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(19, s) BOOST_PP_IIF(c, BOOST_PP_FOR_19, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(19, s), p, o, m) +# define BOOST_PP_FOR_19_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(20, s) BOOST_PP_IIF(c, BOOST_PP_FOR_20, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(20, s), p, o, m) +# define BOOST_PP_FOR_20_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(21, s) BOOST_PP_IIF(c, BOOST_PP_FOR_21, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(21, s), p, o, m) +# define BOOST_PP_FOR_21_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(22, s) BOOST_PP_IIF(c, BOOST_PP_FOR_22, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(22, s), p, o, m) +# define BOOST_PP_FOR_22_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(23, s) BOOST_PP_IIF(c, BOOST_PP_FOR_23, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(23, s), p, o, m) +# define BOOST_PP_FOR_23_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(24, s) BOOST_PP_IIF(c, BOOST_PP_FOR_24, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(24, s), p, o, m) +# define BOOST_PP_FOR_24_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(25, s) BOOST_PP_IIF(c, BOOST_PP_FOR_25, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(25, s), p, o, m) +# define BOOST_PP_FOR_25_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(26, s) BOOST_PP_IIF(c, BOOST_PP_FOR_26, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(26, s), p, o, m) +# define BOOST_PP_FOR_26_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(27, s) BOOST_PP_IIF(c, BOOST_PP_FOR_27, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(27, s), p, o, m) +# define BOOST_PP_FOR_27_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(28, s) BOOST_PP_IIF(c, BOOST_PP_FOR_28, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(28, s), p, o, m) +# define BOOST_PP_FOR_28_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(29, s) BOOST_PP_IIF(c, BOOST_PP_FOR_29, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(29, s), p, o, m) +# define BOOST_PP_FOR_29_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(30, s) BOOST_PP_IIF(c, BOOST_PP_FOR_30, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(30, s), p, o, m) +# define BOOST_PP_FOR_30_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(31, s) BOOST_PP_IIF(c, BOOST_PP_FOR_31, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(31, s), p, o, m) +# define BOOST_PP_FOR_31_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(32, s) BOOST_PP_IIF(c, BOOST_PP_FOR_32, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(32, s), p, o, m) +# define BOOST_PP_FOR_32_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(33, s) BOOST_PP_IIF(c, BOOST_PP_FOR_33, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(33, s), p, o, m) +# define BOOST_PP_FOR_33_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(34, s) BOOST_PP_IIF(c, BOOST_PP_FOR_34, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(34, s), p, o, m) +# define BOOST_PP_FOR_34_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(35, s) BOOST_PP_IIF(c, BOOST_PP_FOR_35, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(35, s), p, o, m) +# define BOOST_PP_FOR_35_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(36, s) BOOST_PP_IIF(c, BOOST_PP_FOR_36, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(36, s), p, o, m) +# define BOOST_PP_FOR_36_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(37, s) BOOST_PP_IIF(c, BOOST_PP_FOR_37, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(37, s), p, o, m) +# define BOOST_PP_FOR_37_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(38, s) BOOST_PP_IIF(c, BOOST_PP_FOR_38, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(38, s), p, o, m) +# define BOOST_PP_FOR_38_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(39, s) BOOST_PP_IIF(c, BOOST_PP_FOR_39, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(39, s), p, o, m) +# define BOOST_PP_FOR_39_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(40, s) BOOST_PP_IIF(c, BOOST_PP_FOR_40, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(40, s), p, o, m) +# define BOOST_PP_FOR_40_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(41, s) BOOST_PP_IIF(c, BOOST_PP_FOR_41, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(41, s), p, o, m) +# define BOOST_PP_FOR_41_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(42, s) BOOST_PP_IIF(c, BOOST_PP_FOR_42, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(42, s), p, o, m) +# define BOOST_PP_FOR_42_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(43, s) BOOST_PP_IIF(c, BOOST_PP_FOR_43, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(43, s), p, o, m) +# define BOOST_PP_FOR_43_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(44, s) BOOST_PP_IIF(c, BOOST_PP_FOR_44, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(44, s), p, o, m) +# define BOOST_PP_FOR_44_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(45, s) BOOST_PP_IIF(c, BOOST_PP_FOR_45, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(45, s), p, o, m) +# define BOOST_PP_FOR_45_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(46, s) BOOST_PP_IIF(c, BOOST_PP_FOR_46, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(46, s), p, o, m) +# define BOOST_PP_FOR_46_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(47, s) BOOST_PP_IIF(c, BOOST_PP_FOR_47, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(47, s), p, o, m) +# define BOOST_PP_FOR_47_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(48, s) BOOST_PP_IIF(c, BOOST_PP_FOR_48, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(48, s), p, o, m) +# define BOOST_PP_FOR_48_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(49, s) BOOST_PP_IIF(c, BOOST_PP_FOR_49, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(49, s), p, o, m) +# define BOOST_PP_FOR_49_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(50, s) BOOST_PP_IIF(c, BOOST_PP_FOR_50, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(50, s), p, o, m) +# define BOOST_PP_FOR_50_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(51, s) BOOST_PP_IIF(c, BOOST_PP_FOR_51, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(51, s), p, o, m) +# define BOOST_PP_FOR_51_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(52, s) BOOST_PP_IIF(c, BOOST_PP_FOR_52, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(52, s), p, o, m) +# define BOOST_PP_FOR_52_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(53, s) BOOST_PP_IIF(c, BOOST_PP_FOR_53, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(53, s), p, o, m) +# define BOOST_PP_FOR_53_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(54, s) BOOST_PP_IIF(c, BOOST_PP_FOR_54, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(54, s), p, o, m) +# define BOOST_PP_FOR_54_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(55, s) BOOST_PP_IIF(c, BOOST_PP_FOR_55, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(55, s), p, o, m) +# define BOOST_PP_FOR_55_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(56, s) BOOST_PP_IIF(c, BOOST_PP_FOR_56, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(56, s), p, o, m) +# define BOOST_PP_FOR_56_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(57, s) BOOST_PP_IIF(c, BOOST_PP_FOR_57, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(57, s), p, o, m) +# define BOOST_PP_FOR_57_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(58, s) BOOST_PP_IIF(c, BOOST_PP_FOR_58, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(58, s), p, o, m) +# define BOOST_PP_FOR_58_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(59, s) BOOST_PP_IIF(c, BOOST_PP_FOR_59, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(59, s), p, o, m) +# define BOOST_PP_FOR_59_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(60, s) BOOST_PP_IIF(c, BOOST_PP_FOR_60, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(60, s), p, o, m) +# define BOOST_PP_FOR_60_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(61, s) BOOST_PP_IIF(c, BOOST_PP_FOR_61, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(61, s), p, o, m) +# define BOOST_PP_FOR_61_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(62, s) BOOST_PP_IIF(c, BOOST_PP_FOR_62, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(62, s), p, o, m) +# define BOOST_PP_FOR_62_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(63, s) BOOST_PP_IIF(c, BOOST_PP_FOR_63, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(63, s), p, o, m) +# define BOOST_PP_FOR_63_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(64, s) BOOST_PP_IIF(c, BOOST_PP_FOR_64, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(64, s), p, o, m) +# define BOOST_PP_FOR_64_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(65, s) BOOST_PP_IIF(c, BOOST_PP_FOR_65, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(65, s), p, o, m) +# define BOOST_PP_FOR_65_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(66, s) BOOST_PP_IIF(c, BOOST_PP_FOR_66, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(66, s), p, o, m) +# define BOOST_PP_FOR_66_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(67, s) BOOST_PP_IIF(c, BOOST_PP_FOR_67, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(67, s), p, o, m) +# define BOOST_PP_FOR_67_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(68, s) BOOST_PP_IIF(c, BOOST_PP_FOR_68, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(68, s), p, o, m) +# define BOOST_PP_FOR_68_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(69, s) BOOST_PP_IIF(c, BOOST_PP_FOR_69, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(69, s), p, o, m) +# define BOOST_PP_FOR_69_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(70, s) BOOST_PP_IIF(c, BOOST_PP_FOR_70, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(70, s), p, o, m) +# define BOOST_PP_FOR_70_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(71, s) BOOST_PP_IIF(c, BOOST_PP_FOR_71, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(71, s), p, o, m) +# define BOOST_PP_FOR_71_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(72, s) BOOST_PP_IIF(c, BOOST_PP_FOR_72, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(72, s), p, o, m) +# define BOOST_PP_FOR_72_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(73, s) BOOST_PP_IIF(c, BOOST_PP_FOR_73, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(73, s), p, o, m) +# define BOOST_PP_FOR_73_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(74, s) BOOST_PP_IIF(c, BOOST_PP_FOR_74, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(74, s), p, o, m) +# define BOOST_PP_FOR_74_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(75, s) BOOST_PP_IIF(c, BOOST_PP_FOR_75, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(75, s), p, o, m) +# define BOOST_PP_FOR_75_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(76, s) BOOST_PP_IIF(c, BOOST_PP_FOR_76, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(76, s), p, o, m) +# define BOOST_PP_FOR_76_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(77, s) BOOST_PP_IIF(c, BOOST_PP_FOR_77, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(77, s), p, o, m) +# define BOOST_PP_FOR_77_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(78, s) BOOST_PP_IIF(c, BOOST_PP_FOR_78, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(78, s), p, o, m) +# define BOOST_PP_FOR_78_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(79, s) BOOST_PP_IIF(c, BOOST_PP_FOR_79, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(79, s), p, o, m) +# define BOOST_PP_FOR_79_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(80, s) BOOST_PP_IIF(c, BOOST_PP_FOR_80, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(80, s), p, o, m) +# define BOOST_PP_FOR_80_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(81, s) BOOST_PP_IIF(c, BOOST_PP_FOR_81, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(81, s), p, o, m) +# define BOOST_PP_FOR_81_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(82, s) BOOST_PP_IIF(c, BOOST_PP_FOR_82, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(82, s), p, o, m) +# define BOOST_PP_FOR_82_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(83, s) BOOST_PP_IIF(c, BOOST_PP_FOR_83, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(83, s), p, o, m) +# define BOOST_PP_FOR_83_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(84, s) BOOST_PP_IIF(c, BOOST_PP_FOR_84, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(84, s), p, o, m) +# define BOOST_PP_FOR_84_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(85, s) BOOST_PP_IIF(c, BOOST_PP_FOR_85, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(85, s), p, o, m) +# define BOOST_PP_FOR_85_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(86, s) BOOST_PP_IIF(c, BOOST_PP_FOR_86, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(86, s), p, o, m) +# define BOOST_PP_FOR_86_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(87, s) BOOST_PP_IIF(c, BOOST_PP_FOR_87, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(87, s), p, o, m) +# define BOOST_PP_FOR_87_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(88, s) BOOST_PP_IIF(c, BOOST_PP_FOR_88, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(88, s), p, o, m) +# define BOOST_PP_FOR_88_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(89, s) BOOST_PP_IIF(c, BOOST_PP_FOR_89, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(89, s), p, o, m) +# define BOOST_PP_FOR_89_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(90, s) BOOST_PP_IIF(c, BOOST_PP_FOR_90, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(90, s), p, o, m) +# define BOOST_PP_FOR_90_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(91, s) BOOST_PP_IIF(c, BOOST_PP_FOR_91, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(91, s), p, o, m) +# define BOOST_PP_FOR_91_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(92, s) BOOST_PP_IIF(c, BOOST_PP_FOR_92, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(92, s), p, o, m) +# define BOOST_PP_FOR_92_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(93, s) BOOST_PP_IIF(c, BOOST_PP_FOR_93, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(93, s), p, o, m) +# define BOOST_PP_FOR_93_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(94, s) BOOST_PP_IIF(c, BOOST_PP_FOR_94, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(94, s), p, o, m) +# define BOOST_PP_FOR_94_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(95, s) BOOST_PP_IIF(c, BOOST_PP_FOR_95, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(95, s), p, o, m) +# define BOOST_PP_FOR_95_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(96, s) BOOST_PP_IIF(c, BOOST_PP_FOR_96, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(96, s), p, o, m) +# define BOOST_PP_FOR_96_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(97, s) BOOST_PP_IIF(c, BOOST_PP_FOR_97, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(97, s), p, o, m) +# define BOOST_PP_FOR_97_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(98, s) BOOST_PP_IIF(c, BOOST_PP_FOR_98, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(98, s), p, o, m) +# define BOOST_PP_FOR_98_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(99, s) BOOST_PP_IIF(c, BOOST_PP_FOR_99, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(99, s), p, o, m) +# define BOOST_PP_FOR_99_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(100, s) BOOST_PP_IIF(c, BOOST_PP_FOR_100, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(100, s), p, o, m) +# define BOOST_PP_FOR_100_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(101, s) BOOST_PP_IIF(c, BOOST_PP_FOR_101, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(101, s), p, o, m) +# define BOOST_PP_FOR_101_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(102, s) BOOST_PP_IIF(c, BOOST_PP_FOR_102, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(102, s), p, o, m) +# define BOOST_PP_FOR_102_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(103, s) BOOST_PP_IIF(c, BOOST_PP_FOR_103, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(103, s), p, o, m) +# define BOOST_PP_FOR_103_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(104, s) BOOST_PP_IIF(c, BOOST_PP_FOR_104, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(104, s), p, o, m) +# define BOOST_PP_FOR_104_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(105, s) BOOST_PP_IIF(c, BOOST_PP_FOR_105, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(105, s), p, o, m) +# define BOOST_PP_FOR_105_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(106, s) BOOST_PP_IIF(c, BOOST_PP_FOR_106, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(106, s), p, o, m) +# define BOOST_PP_FOR_106_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(107, s) BOOST_PP_IIF(c, BOOST_PP_FOR_107, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(107, s), p, o, m) +# define BOOST_PP_FOR_107_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(108, s) BOOST_PP_IIF(c, BOOST_PP_FOR_108, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(108, s), p, o, m) +# define BOOST_PP_FOR_108_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(109, s) BOOST_PP_IIF(c, BOOST_PP_FOR_109, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(109, s), p, o, m) +# define BOOST_PP_FOR_109_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(110, s) BOOST_PP_IIF(c, BOOST_PP_FOR_110, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(110, s), p, o, m) +# define BOOST_PP_FOR_110_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(111, s) BOOST_PP_IIF(c, BOOST_PP_FOR_111, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(111, s), p, o, m) +# define BOOST_PP_FOR_111_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(112, s) BOOST_PP_IIF(c, BOOST_PP_FOR_112, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(112, s), p, o, m) +# define BOOST_PP_FOR_112_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(113, s) BOOST_PP_IIF(c, BOOST_PP_FOR_113, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(113, s), p, o, m) +# define BOOST_PP_FOR_113_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(114, s) BOOST_PP_IIF(c, BOOST_PP_FOR_114, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(114, s), p, o, m) +# define BOOST_PP_FOR_114_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(115, s) BOOST_PP_IIF(c, BOOST_PP_FOR_115, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(115, s), p, o, m) +# define BOOST_PP_FOR_115_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(116, s) BOOST_PP_IIF(c, BOOST_PP_FOR_116, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(116, s), p, o, m) +# define BOOST_PP_FOR_116_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(117, s) BOOST_PP_IIF(c, BOOST_PP_FOR_117, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(117, s), p, o, m) +# define BOOST_PP_FOR_117_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(118, s) BOOST_PP_IIF(c, BOOST_PP_FOR_118, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(118, s), p, o, m) +# define BOOST_PP_FOR_118_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(119, s) BOOST_PP_IIF(c, BOOST_PP_FOR_119, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(119, s), p, o, m) +# define BOOST_PP_FOR_119_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(120, s) BOOST_PP_IIF(c, BOOST_PP_FOR_120, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(120, s), p, o, m) +# define BOOST_PP_FOR_120_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(121, s) BOOST_PP_IIF(c, BOOST_PP_FOR_121, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(121, s), p, o, m) +# define BOOST_PP_FOR_121_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(122, s) BOOST_PP_IIF(c, BOOST_PP_FOR_122, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(122, s), p, o, m) +# define BOOST_PP_FOR_122_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(123, s) BOOST_PP_IIF(c, BOOST_PP_FOR_123, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(123, s), p, o, m) +# define BOOST_PP_FOR_123_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(124, s) BOOST_PP_IIF(c, BOOST_PP_FOR_124, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(124, s), p, o, m) +# define BOOST_PP_FOR_124_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(125, s) BOOST_PP_IIF(c, BOOST_PP_FOR_125, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(125, s), p, o, m) +# define BOOST_PP_FOR_125_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(126, s) BOOST_PP_IIF(c, BOOST_PP_FOR_126, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(126, s), p, o, m) +# define BOOST_PP_FOR_126_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(127, s) BOOST_PP_IIF(c, BOOST_PP_FOR_127, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(127, s), p, o, m) +# define BOOST_PP_FOR_127_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(128, s) BOOST_PP_IIF(c, BOOST_PP_FOR_128, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(128, s), p, o, m) +# define BOOST_PP_FOR_128_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(129, s) BOOST_PP_IIF(c, BOOST_PP_FOR_129, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(129, s), p, o, m) +# define BOOST_PP_FOR_129_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(130, s) BOOST_PP_IIF(c, BOOST_PP_FOR_130, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(130, s), p, o, m) +# define BOOST_PP_FOR_130_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(131, s) BOOST_PP_IIF(c, BOOST_PP_FOR_131, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(131, s), p, o, m) +# define BOOST_PP_FOR_131_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(132, s) BOOST_PP_IIF(c, BOOST_PP_FOR_132, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(132, s), p, o, m) +# define BOOST_PP_FOR_132_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(133, s) BOOST_PP_IIF(c, BOOST_PP_FOR_133, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(133, s), p, o, m) +# define BOOST_PP_FOR_133_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(134, s) BOOST_PP_IIF(c, BOOST_PP_FOR_134, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(134, s), p, o, m) +# define BOOST_PP_FOR_134_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(135, s) BOOST_PP_IIF(c, BOOST_PP_FOR_135, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(135, s), p, o, m) +# define BOOST_PP_FOR_135_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(136, s) BOOST_PP_IIF(c, BOOST_PP_FOR_136, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(136, s), p, o, m) +# define BOOST_PP_FOR_136_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(137, s) BOOST_PP_IIF(c, BOOST_PP_FOR_137, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(137, s), p, o, m) +# define BOOST_PP_FOR_137_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(138, s) BOOST_PP_IIF(c, BOOST_PP_FOR_138, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(138, s), p, o, m) +# define BOOST_PP_FOR_138_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(139, s) BOOST_PP_IIF(c, BOOST_PP_FOR_139, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(139, s), p, o, m) +# define BOOST_PP_FOR_139_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(140, s) BOOST_PP_IIF(c, BOOST_PP_FOR_140, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(140, s), p, o, m) +# define BOOST_PP_FOR_140_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(141, s) BOOST_PP_IIF(c, BOOST_PP_FOR_141, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(141, s), p, o, m) +# define BOOST_PP_FOR_141_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(142, s) BOOST_PP_IIF(c, BOOST_PP_FOR_142, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(142, s), p, o, m) +# define BOOST_PP_FOR_142_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(143, s) BOOST_PP_IIF(c, BOOST_PP_FOR_143, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(143, s), p, o, m) +# define BOOST_PP_FOR_143_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(144, s) BOOST_PP_IIF(c, BOOST_PP_FOR_144, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(144, s), p, o, m) +# define BOOST_PP_FOR_144_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(145, s) BOOST_PP_IIF(c, BOOST_PP_FOR_145, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(145, s), p, o, m) +# define BOOST_PP_FOR_145_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(146, s) BOOST_PP_IIF(c, BOOST_PP_FOR_146, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(146, s), p, o, m) +# define BOOST_PP_FOR_146_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(147, s) BOOST_PP_IIF(c, BOOST_PP_FOR_147, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(147, s), p, o, m) +# define BOOST_PP_FOR_147_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(148, s) BOOST_PP_IIF(c, BOOST_PP_FOR_148, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(148, s), p, o, m) +# define BOOST_PP_FOR_148_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(149, s) BOOST_PP_IIF(c, BOOST_PP_FOR_149, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(149, s), p, o, m) +# define BOOST_PP_FOR_149_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(150, s) BOOST_PP_IIF(c, BOOST_PP_FOR_150, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(150, s), p, o, m) +# define BOOST_PP_FOR_150_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(151, s) BOOST_PP_IIF(c, BOOST_PP_FOR_151, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(151, s), p, o, m) +# define BOOST_PP_FOR_151_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(152, s) BOOST_PP_IIF(c, BOOST_PP_FOR_152, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(152, s), p, o, m) +# define BOOST_PP_FOR_152_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(153, s) BOOST_PP_IIF(c, BOOST_PP_FOR_153, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(153, s), p, o, m) +# define BOOST_PP_FOR_153_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(154, s) BOOST_PP_IIF(c, BOOST_PP_FOR_154, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(154, s), p, o, m) +# define BOOST_PP_FOR_154_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(155, s) BOOST_PP_IIF(c, BOOST_PP_FOR_155, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(155, s), p, o, m) +# define BOOST_PP_FOR_155_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(156, s) BOOST_PP_IIF(c, BOOST_PP_FOR_156, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(156, s), p, o, m) +# define BOOST_PP_FOR_156_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(157, s) BOOST_PP_IIF(c, BOOST_PP_FOR_157, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(157, s), p, o, m) +# define BOOST_PP_FOR_157_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(158, s) BOOST_PP_IIF(c, BOOST_PP_FOR_158, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(158, s), p, o, m) +# define BOOST_PP_FOR_158_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(159, s) BOOST_PP_IIF(c, BOOST_PP_FOR_159, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(159, s), p, o, m) +# define BOOST_PP_FOR_159_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(160, s) BOOST_PP_IIF(c, BOOST_PP_FOR_160, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(160, s), p, o, m) +# define BOOST_PP_FOR_160_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(161, s) BOOST_PP_IIF(c, BOOST_PP_FOR_161, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(161, s), p, o, m) +# define BOOST_PP_FOR_161_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(162, s) BOOST_PP_IIF(c, BOOST_PP_FOR_162, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(162, s), p, o, m) +# define BOOST_PP_FOR_162_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(163, s) BOOST_PP_IIF(c, BOOST_PP_FOR_163, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(163, s), p, o, m) +# define BOOST_PP_FOR_163_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(164, s) BOOST_PP_IIF(c, BOOST_PP_FOR_164, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(164, s), p, o, m) +# define BOOST_PP_FOR_164_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(165, s) BOOST_PP_IIF(c, BOOST_PP_FOR_165, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(165, s), p, o, m) +# define BOOST_PP_FOR_165_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(166, s) BOOST_PP_IIF(c, BOOST_PP_FOR_166, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(166, s), p, o, m) +# define BOOST_PP_FOR_166_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(167, s) BOOST_PP_IIF(c, BOOST_PP_FOR_167, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(167, s), p, o, m) +# define BOOST_PP_FOR_167_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(168, s) BOOST_PP_IIF(c, BOOST_PP_FOR_168, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(168, s), p, o, m) +# define BOOST_PP_FOR_168_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(169, s) BOOST_PP_IIF(c, BOOST_PP_FOR_169, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(169, s), p, o, m) +# define BOOST_PP_FOR_169_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(170, s) BOOST_PP_IIF(c, BOOST_PP_FOR_170, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(170, s), p, o, m) +# define BOOST_PP_FOR_170_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(171, s) BOOST_PP_IIF(c, BOOST_PP_FOR_171, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(171, s), p, o, m) +# define BOOST_PP_FOR_171_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(172, s) BOOST_PP_IIF(c, BOOST_PP_FOR_172, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(172, s), p, o, m) +# define BOOST_PP_FOR_172_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(173, s) BOOST_PP_IIF(c, BOOST_PP_FOR_173, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(173, s), p, o, m) +# define BOOST_PP_FOR_173_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(174, s) BOOST_PP_IIF(c, BOOST_PP_FOR_174, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(174, s), p, o, m) +# define BOOST_PP_FOR_174_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(175, s) BOOST_PP_IIF(c, BOOST_PP_FOR_175, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(175, s), p, o, m) +# define BOOST_PP_FOR_175_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(176, s) BOOST_PP_IIF(c, BOOST_PP_FOR_176, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(176, s), p, o, m) +# define BOOST_PP_FOR_176_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(177, s) BOOST_PP_IIF(c, BOOST_PP_FOR_177, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(177, s), p, o, m) +# define BOOST_PP_FOR_177_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(178, s) BOOST_PP_IIF(c, BOOST_PP_FOR_178, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(178, s), p, o, m) +# define BOOST_PP_FOR_178_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(179, s) BOOST_PP_IIF(c, BOOST_PP_FOR_179, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(179, s), p, o, m) +# define BOOST_PP_FOR_179_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(180, s) BOOST_PP_IIF(c, BOOST_PP_FOR_180, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(180, s), p, o, m) +# define BOOST_PP_FOR_180_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(181, s) BOOST_PP_IIF(c, BOOST_PP_FOR_181, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(181, s), p, o, m) +# define BOOST_PP_FOR_181_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(182, s) BOOST_PP_IIF(c, BOOST_PP_FOR_182, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(182, s), p, o, m) +# define BOOST_PP_FOR_182_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(183, s) BOOST_PP_IIF(c, BOOST_PP_FOR_183, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(183, s), p, o, m) +# define BOOST_PP_FOR_183_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(184, s) BOOST_PP_IIF(c, BOOST_PP_FOR_184, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(184, s), p, o, m) +# define BOOST_PP_FOR_184_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(185, s) BOOST_PP_IIF(c, BOOST_PP_FOR_185, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(185, s), p, o, m) +# define BOOST_PP_FOR_185_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(186, s) BOOST_PP_IIF(c, BOOST_PP_FOR_186, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(186, s), p, o, m) +# define BOOST_PP_FOR_186_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(187, s) BOOST_PP_IIF(c, BOOST_PP_FOR_187, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(187, s), p, o, m) +# define BOOST_PP_FOR_187_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(188, s) BOOST_PP_IIF(c, BOOST_PP_FOR_188, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(188, s), p, o, m) +# define BOOST_PP_FOR_188_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(189, s) BOOST_PP_IIF(c, BOOST_PP_FOR_189, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(189, s), p, o, m) +# define BOOST_PP_FOR_189_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(190, s) BOOST_PP_IIF(c, BOOST_PP_FOR_190, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(190, s), p, o, m) +# define BOOST_PP_FOR_190_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(191, s) BOOST_PP_IIF(c, BOOST_PP_FOR_191, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(191, s), p, o, m) +# define BOOST_PP_FOR_191_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(192, s) BOOST_PP_IIF(c, BOOST_PP_FOR_192, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(192, s), p, o, m) +# define BOOST_PP_FOR_192_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(193, s) BOOST_PP_IIF(c, BOOST_PP_FOR_193, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(193, s), p, o, m) +# define BOOST_PP_FOR_193_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(194, s) BOOST_PP_IIF(c, BOOST_PP_FOR_194, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(194, s), p, o, m) +# define BOOST_PP_FOR_194_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(195, s) BOOST_PP_IIF(c, BOOST_PP_FOR_195, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(195, s), p, o, m) +# define BOOST_PP_FOR_195_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(196, s) BOOST_PP_IIF(c, BOOST_PP_FOR_196, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(196, s), p, o, m) +# define BOOST_PP_FOR_196_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(197, s) BOOST_PP_IIF(c, BOOST_PP_FOR_197, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(197, s), p, o, m) +# define BOOST_PP_FOR_197_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(198, s) BOOST_PP_IIF(c, BOOST_PP_FOR_198, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(198, s), p, o, m) +# define BOOST_PP_FOR_198_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(199, s) BOOST_PP_IIF(c, BOOST_PP_FOR_199, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(199, s), p, o, m) +# define BOOST_PP_FOR_199_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(200, s) BOOST_PP_IIF(c, BOOST_PP_FOR_200, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(200, s), p, o, m) +# define BOOST_PP_FOR_200_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(201, s) BOOST_PP_IIF(c, BOOST_PP_FOR_201, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(201, s), p, o, m) +# define BOOST_PP_FOR_201_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(202, s) BOOST_PP_IIF(c, BOOST_PP_FOR_202, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(202, s), p, o, m) +# define BOOST_PP_FOR_202_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(203, s) BOOST_PP_IIF(c, BOOST_PP_FOR_203, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(203, s), p, o, m) +# define BOOST_PP_FOR_203_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(204, s) BOOST_PP_IIF(c, BOOST_PP_FOR_204, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(204, s), p, o, m) +# define BOOST_PP_FOR_204_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(205, s) BOOST_PP_IIF(c, BOOST_PP_FOR_205, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(205, s), p, o, m) +# define BOOST_PP_FOR_205_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(206, s) BOOST_PP_IIF(c, BOOST_PP_FOR_206, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(206, s), p, o, m) +# define BOOST_PP_FOR_206_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(207, s) BOOST_PP_IIF(c, BOOST_PP_FOR_207, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(207, s), p, o, m) +# define BOOST_PP_FOR_207_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(208, s) BOOST_PP_IIF(c, BOOST_PP_FOR_208, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(208, s), p, o, m) +# define BOOST_PP_FOR_208_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(209, s) BOOST_PP_IIF(c, BOOST_PP_FOR_209, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(209, s), p, o, m) +# define BOOST_PP_FOR_209_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(210, s) BOOST_PP_IIF(c, BOOST_PP_FOR_210, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(210, s), p, o, m) +# define BOOST_PP_FOR_210_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(211, s) BOOST_PP_IIF(c, BOOST_PP_FOR_211, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(211, s), p, o, m) +# define BOOST_PP_FOR_211_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(212, s) BOOST_PP_IIF(c, BOOST_PP_FOR_212, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(212, s), p, o, m) +# define BOOST_PP_FOR_212_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(213, s) BOOST_PP_IIF(c, BOOST_PP_FOR_213, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(213, s), p, o, m) +# define BOOST_PP_FOR_213_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(214, s) BOOST_PP_IIF(c, BOOST_PP_FOR_214, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(214, s), p, o, m) +# define BOOST_PP_FOR_214_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(215, s) BOOST_PP_IIF(c, BOOST_PP_FOR_215, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(215, s), p, o, m) +# define BOOST_PP_FOR_215_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(216, s) BOOST_PP_IIF(c, BOOST_PP_FOR_216, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(216, s), p, o, m) +# define BOOST_PP_FOR_216_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(217, s) BOOST_PP_IIF(c, BOOST_PP_FOR_217, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(217, s), p, o, m) +# define BOOST_PP_FOR_217_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(218, s) BOOST_PP_IIF(c, BOOST_PP_FOR_218, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(218, s), p, o, m) +# define BOOST_PP_FOR_218_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(219, s) BOOST_PP_IIF(c, BOOST_PP_FOR_219, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(219, s), p, o, m) +# define BOOST_PP_FOR_219_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(220, s) BOOST_PP_IIF(c, BOOST_PP_FOR_220, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(220, s), p, o, m) +# define BOOST_PP_FOR_220_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(221, s) BOOST_PP_IIF(c, BOOST_PP_FOR_221, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(221, s), p, o, m) +# define BOOST_PP_FOR_221_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(222, s) BOOST_PP_IIF(c, BOOST_PP_FOR_222, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(222, s), p, o, m) +# define BOOST_PP_FOR_222_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(223, s) BOOST_PP_IIF(c, BOOST_PP_FOR_223, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(223, s), p, o, m) +# define BOOST_PP_FOR_223_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(224, s) BOOST_PP_IIF(c, BOOST_PP_FOR_224, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(224, s), p, o, m) +# define BOOST_PP_FOR_224_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(225, s) BOOST_PP_IIF(c, BOOST_PP_FOR_225, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(225, s), p, o, m) +# define BOOST_PP_FOR_225_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(226, s) BOOST_PP_IIF(c, BOOST_PP_FOR_226, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(226, s), p, o, m) +# define BOOST_PP_FOR_226_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(227, s) BOOST_PP_IIF(c, BOOST_PP_FOR_227, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(227, s), p, o, m) +# define BOOST_PP_FOR_227_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(228, s) BOOST_PP_IIF(c, BOOST_PP_FOR_228, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(228, s), p, o, m) +# define BOOST_PP_FOR_228_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(229, s) BOOST_PP_IIF(c, BOOST_PP_FOR_229, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(229, s), p, o, m) +# define BOOST_PP_FOR_229_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(230, s) BOOST_PP_IIF(c, BOOST_PP_FOR_230, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(230, s), p, o, m) +# define BOOST_PP_FOR_230_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(231, s) BOOST_PP_IIF(c, BOOST_PP_FOR_231, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(231, s), p, o, m) +# define BOOST_PP_FOR_231_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(232, s) BOOST_PP_IIF(c, BOOST_PP_FOR_232, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(232, s), p, o, m) +# define BOOST_PP_FOR_232_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(233, s) BOOST_PP_IIF(c, BOOST_PP_FOR_233, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(233, s), p, o, m) +# define BOOST_PP_FOR_233_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(234, s) BOOST_PP_IIF(c, BOOST_PP_FOR_234, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(234, s), p, o, m) +# define BOOST_PP_FOR_234_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(235, s) BOOST_PP_IIF(c, BOOST_PP_FOR_235, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(235, s), p, o, m) +# define BOOST_PP_FOR_235_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(236, s) BOOST_PP_IIF(c, BOOST_PP_FOR_236, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(236, s), p, o, m) +# define BOOST_PP_FOR_236_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(237, s) BOOST_PP_IIF(c, BOOST_PP_FOR_237, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(237, s), p, o, m) +# define BOOST_PP_FOR_237_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(238, s) BOOST_PP_IIF(c, BOOST_PP_FOR_238, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(238, s), p, o, m) +# define BOOST_PP_FOR_238_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(239, s) BOOST_PP_IIF(c, BOOST_PP_FOR_239, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(239, s), p, o, m) +# define BOOST_PP_FOR_239_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(240, s) BOOST_PP_IIF(c, BOOST_PP_FOR_240, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(240, s), p, o, m) +# define BOOST_PP_FOR_240_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(241, s) BOOST_PP_IIF(c, BOOST_PP_FOR_241, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(241, s), p, o, m) +# define BOOST_PP_FOR_241_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(242, s) BOOST_PP_IIF(c, BOOST_PP_FOR_242, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(242, s), p, o, m) +# define BOOST_PP_FOR_242_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(243, s) BOOST_PP_IIF(c, BOOST_PP_FOR_243, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(243, s), p, o, m) +# define BOOST_PP_FOR_243_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(244, s) BOOST_PP_IIF(c, BOOST_PP_FOR_244, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(244, s), p, o, m) +# define BOOST_PP_FOR_244_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(245, s) BOOST_PP_IIF(c, BOOST_PP_FOR_245, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(245, s), p, o, m) +# define BOOST_PP_FOR_245_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(246, s) BOOST_PP_IIF(c, BOOST_PP_FOR_246, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(246, s), p, o, m) +# define BOOST_PP_FOR_246_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(247, s) BOOST_PP_IIF(c, BOOST_PP_FOR_247, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(247, s), p, o, m) +# define BOOST_PP_FOR_247_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(248, s) BOOST_PP_IIF(c, BOOST_PP_FOR_248, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(248, s), p, o, m) +# define BOOST_PP_FOR_248_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(249, s) BOOST_PP_IIF(c, BOOST_PP_FOR_249, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(249, s), p, o, m) +# define BOOST_PP_FOR_249_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(250, s) BOOST_PP_IIF(c, BOOST_PP_FOR_250, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(250, s), p, o, m) +# define BOOST_PP_FOR_250_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(251, s) BOOST_PP_IIF(c, BOOST_PP_FOR_251, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(251, s), p, o, m) +# define BOOST_PP_FOR_251_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(252, s) BOOST_PP_IIF(c, BOOST_PP_FOR_252, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(252, s), p, o, m) +# define BOOST_PP_FOR_252_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(253, s) BOOST_PP_IIF(c, BOOST_PP_FOR_253, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(253, s), p, o, m) +# define BOOST_PP_FOR_253_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(254, s) BOOST_PP_IIF(c, BOOST_PP_FOR_254, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(254, s), p, o, m) +# define BOOST_PP_FOR_254_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(255, s) BOOST_PP_IIF(c, BOOST_PP_FOR_255, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(255, s), p, o, m) +# define BOOST_PP_FOR_255_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(256, s) BOOST_PP_IIF(c, BOOST_PP_FOR_256, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(256, s), p, o, m) +# define BOOST_PP_FOR_256_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(257, s) BOOST_PP_IIF(c, BOOST_PP_FOR_257, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(257, s), p, o, m) +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/repetition/detail/msvc/for.hpp b/ThirdParty/boost-Subset/boost/preprocessor/repetition/detail/msvc/for.hpp new file mode 100644 index 0000000000..35c1996c78 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/repetition/detail/msvc/for.hpp @@ -0,0 +1,277 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_DETAIL_MSVC_FOR_HPP +# define BOOST_PREPROCESSOR_REPETITION_DETAIL_MSVC_FOR_HPP +# +# include +# include +# +# define BOOST_PP_FOR_1(s, p, o, m) BOOST_PP_IF(p(2, s), m, BOOST_PP_TUPLE_EAT_2)(2, s) BOOST_PP_IF(p(2, s), BOOST_PP_FOR_2, BOOST_PP_TUPLE_EAT_4)(o(2, s), p, o, m) +# define BOOST_PP_FOR_2(s, p, o, m) BOOST_PP_IF(p(3, s), m, BOOST_PP_TUPLE_EAT_2)(3, s) BOOST_PP_IF(p(3, s), BOOST_PP_FOR_3, BOOST_PP_TUPLE_EAT_4)(o(3, s), p, o, m) +# define BOOST_PP_FOR_3(s, p, o, m) BOOST_PP_IF(p(4, s), m, BOOST_PP_TUPLE_EAT_2)(4, s) BOOST_PP_IF(p(4, s), BOOST_PP_FOR_4, BOOST_PP_TUPLE_EAT_4)(o(4, s), p, o, m) +# define BOOST_PP_FOR_4(s, p, o, m) BOOST_PP_IF(p(5, s), m, BOOST_PP_TUPLE_EAT_2)(5, s) BOOST_PP_IF(p(5, s), BOOST_PP_FOR_5, BOOST_PP_TUPLE_EAT_4)(o(5, s), p, o, m) +# define BOOST_PP_FOR_5(s, p, o, m) BOOST_PP_IF(p(6, s), m, BOOST_PP_TUPLE_EAT_2)(6, s) BOOST_PP_IF(p(6, s), BOOST_PP_FOR_6, BOOST_PP_TUPLE_EAT_4)(o(6, s), p, o, m) +# define BOOST_PP_FOR_6(s, p, o, m) BOOST_PP_IF(p(7, s), m, BOOST_PP_TUPLE_EAT_2)(7, s) BOOST_PP_IF(p(7, s), BOOST_PP_FOR_7, BOOST_PP_TUPLE_EAT_4)(o(7, s), p, o, m) +# define BOOST_PP_FOR_7(s, p, o, m) BOOST_PP_IF(p(8, s), m, BOOST_PP_TUPLE_EAT_2)(8, s) BOOST_PP_IF(p(8, s), BOOST_PP_FOR_8, BOOST_PP_TUPLE_EAT_4)(o(8, s), p, o, m) +# define BOOST_PP_FOR_8(s, p, o, m) BOOST_PP_IF(p(9, s), m, BOOST_PP_TUPLE_EAT_2)(9, s) BOOST_PP_IF(p(9, s), BOOST_PP_FOR_9, BOOST_PP_TUPLE_EAT_4)(o(9, s), p, o, m) +# define BOOST_PP_FOR_9(s, p, o, m) BOOST_PP_IF(p(10, s), m, BOOST_PP_TUPLE_EAT_2)(10, s) BOOST_PP_IF(p(10, s), BOOST_PP_FOR_10, BOOST_PP_TUPLE_EAT_4)(o(10, s), p, o, m) +# define BOOST_PP_FOR_10(s, p, o, m) BOOST_PP_IF(p(11, s), m, BOOST_PP_TUPLE_EAT_2)(11, s) BOOST_PP_IF(p(11, s), BOOST_PP_FOR_11, BOOST_PP_TUPLE_EAT_4)(o(11, s), p, o, m) +# define BOOST_PP_FOR_11(s, p, o, m) BOOST_PP_IF(p(12, s), m, BOOST_PP_TUPLE_EAT_2)(12, s) BOOST_PP_IF(p(12, s), BOOST_PP_FOR_12, BOOST_PP_TUPLE_EAT_4)(o(12, s), p, o, m) +# define BOOST_PP_FOR_12(s, p, o, m) BOOST_PP_IF(p(13, s), m, BOOST_PP_TUPLE_EAT_2)(13, s) BOOST_PP_IF(p(13, s), BOOST_PP_FOR_13, BOOST_PP_TUPLE_EAT_4)(o(13, s), p, o, m) +# define BOOST_PP_FOR_13(s, p, o, m) BOOST_PP_IF(p(14, s), m, BOOST_PP_TUPLE_EAT_2)(14, s) BOOST_PP_IF(p(14, s), BOOST_PP_FOR_14, BOOST_PP_TUPLE_EAT_4)(o(14, s), p, o, m) +# define BOOST_PP_FOR_14(s, p, o, m) BOOST_PP_IF(p(15, s), m, BOOST_PP_TUPLE_EAT_2)(15, s) BOOST_PP_IF(p(15, s), BOOST_PP_FOR_15, BOOST_PP_TUPLE_EAT_4)(o(15, s), p, o, m) +# define BOOST_PP_FOR_15(s, p, o, m) BOOST_PP_IF(p(16, s), m, BOOST_PP_TUPLE_EAT_2)(16, s) BOOST_PP_IF(p(16, s), BOOST_PP_FOR_16, BOOST_PP_TUPLE_EAT_4)(o(16, s), p, o, m) +# define BOOST_PP_FOR_16(s, p, o, m) BOOST_PP_IF(p(17, s), m, BOOST_PP_TUPLE_EAT_2)(17, s) BOOST_PP_IF(p(17, s), BOOST_PP_FOR_17, BOOST_PP_TUPLE_EAT_4)(o(17, s), p, o, m) +# define BOOST_PP_FOR_17(s, p, o, m) BOOST_PP_IF(p(18, s), m, BOOST_PP_TUPLE_EAT_2)(18, s) BOOST_PP_IF(p(18, s), BOOST_PP_FOR_18, BOOST_PP_TUPLE_EAT_4)(o(18, s), p, o, m) +# define BOOST_PP_FOR_18(s, p, o, m) BOOST_PP_IF(p(19, s), m, BOOST_PP_TUPLE_EAT_2)(19, s) BOOST_PP_IF(p(19, s), BOOST_PP_FOR_19, BOOST_PP_TUPLE_EAT_4)(o(19, s), p, o, m) +# define BOOST_PP_FOR_19(s, p, o, m) BOOST_PP_IF(p(20, s), m, BOOST_PP_TUPLE_EAT_2)(20, s) BOOST_PP_IF(p(20, s), BOOST_PP_FOR_20, BOOST_PP_TUPLE_EAT_4)(o(20, s), p, o, m) +# define BOOST_PP_FOR_20(s, p, o, m) BOOST_PP_IF(p(21, s), m, BOOST_PP_TUPLE_EAT_2)(21, s) BOOST_PP_IF(p(21, s), BOOST_PP_FOR_21, BOOST_PP_TUPLE_EAT_4)(o(21, s), p, o, m) +# define BOOST_PP_FOR_21(s, p, o, m) BOOST_PP_IF(p(22, s), m, BOOST_PP_TUPLE_EAT_2)(22, s) BOOST_PP_IF(p(22, s), BOOST_PP_FOR_22, BOOST_PP_TUPLE_EAT_4)(o(22, s), p, o, m) +# define BOOST_PP_FOR_22(s, p, o, m) BOOST_PP_IF(p(23, s), m, BOOST_PP_TUPLE_EAT_2)(23, s) BOOST_PP_IF(p(23, s), BOOST_PP_FOR_23, BOOST_PP_TUPLE_EAT_4)(o(23, s), p, o, m) +# define BOOST_PP_FOR_23(s, p, o, m) BOOST_PP_IF(p(24, s), m, BOOST_PP_TUPLE_EAT_2)(24, s) BOOST_PP_IF(p(24, s), BOOST_PP_FOR_24, BOOST_PP_TUPLE_EAT_4)(o(24, s), p, o, m) +# define BOOST_PP_FOR_24(s, p, o, m) BOOST_PP_IF(p(25, s), m, BOOST_PP_TUPLE_EAT_2)(25, s) BOOST_PP_IF(p(25, s), BOOST_PP_FOR_25, BOOST_PP_TUPLE_EAT_4)(o(25, s), p, o, m) +# define BOOST_PP_FOR_25(s, p, o, m) BOOST_PP_IF(p(26, s), m, BOOST_PP_TUPLE_EAT_2)(26, s) BOOST_PP_IF(p(26, s), BOOST_PP_FOR_26, BOOST_PP_TUPLE_EAT_4)(o(26, s), p, o, m) +# define BOOST_PP_FOR_26(s, p, o, m) BOOST_PP_IF(p(27, s), m, BOOST_PP_TUPLE_EAT_2)(27, s) BOOST_PP_IF(p(27, s), BOOST_PP_FOR_27, BOOST_PP_TUPLE_EAT_4)(o(27, s), p, o, m) +# define BOOST_PP_FOR_27(s, p, o, m) BOOST_PP_IF(p(28, s), m, BOOST_PP_TUPLE_EAT_2)(28, s) BOOST_PP_IF(p(28, s), BOOST_PP_FOR_28, BOOST_PP_TUPLE_EAT_4)(o(28, s), p, o, m) +# define BOOST_PP_FOR_28(s, p, o, m) BOOST_PP_IF(p(29, s), m, BOOST_PP_TUPLE_EAT_2)(29, s) BOOST_PP_IF(p(29, s), BOOST_PP_FOR_29, BOOST_PP_TUPLE_EAT_4)(o(29, s), p, o, m) +# define BOOST_PP_FOR_29(s, p, o, m) BOOST_PP_IF(p(30, s), m, BOOST_PP_TUPLE_EAT_2)(30, s) BOOST_PP_IF(p(30, s), BOOST_PP_FOR_30, BOOST_PP_TUPLE_EAT_4)(o(30, s), p, o, m) +# define BOOST_PP_FOR_30(s, p, o, m) BOOST_PP_IF(p(31, s), m, BOOST_PP_TUPLE_EAT_2)(31, s) BOOST_PP_IF(p(31, s), BOOST_PP_FOR_31, BOOST_PP_TUPLE_EAT_4)(o(31, s), p, o, m) +# define BOOST_PP_FOR_31(s, p, o, m) BOOST_PP_IF(p(32, s), m, BOOST_PP_TUPLE_EAT_2)(32, s) BOOST_PP_IF(p(32, s), BOOST_PP_FOR_32, BOOST_PP_TUPLE_EAT_4)(o(32, s), p, o, m) +# define BOOST_PP_FOR_32(s, p, o, m) BOOST_PP_IF(p(33, s), m, BOOST_PP_TUPLE_EAT_2)(33, s) BOOST_PP_IF(p(33, s), BOOST_PP_FOR_33, BOOST_PP_TUPLE_EAT_4)(o(33, s), p, o, m) +# define BOOST_PP_FOR_33(s, p, o, m) BOOST_PP_IF(p(34, s), m, BOOST_PP_TUPLE_EAT_2)(34, s) BOOST_PP_IF(p(34, s), BOOST_PP_FOR_34, BOOST_PP_TUPLE_EAT_4)(o(34, s), p, o, m) +# define BOOST_PP_FOR_34(s, p, o, m) BOOST_PP_IF(p(35, s), m, BOOST_PP_TUPLE_EAT_2)(35, s) BOOST_PP_IF(p(35, s), BOOST_PP_FOR_35, BOOST_PP_TUPLE_EAT_4)(o(35, s), p, o, m) +# define BOOST_PP_FOR_35(s, p, o, m) BOOST_PP_IF(p(36, s), m, BOOST_PP_TUPLE_EAT_2)(36, s) BOOST_PP_IF(p(36, s), BOOST_PP_FOR_36, BOOST_PP_TUPLE_EAT_4)(o(36, s), p, o, m) +# define BOOST_PP_FOR_36(s, p, o, m) BOOST_PP_IF(p(37, s), m, BOOST_PP_TUPLE_EAT_2)(37, s) BOOST_PP_IF(p(37, s), BOOST_PP_FOR_37, BOOST_PP_TUPLE_EAT_4)(o(37, s), p, o, m) +# define BOOST_PP_FOR_37(s, p, o, m) BOOST_PP_IF(p(38, s), m, BOOST_PP_TUPLE_EAT_2)(38, s) BOOST_PP_IF(p(38, s), BOOST_PP_FOR_38, BOOST_PP_TUPLE_EAT_4)(o(38, s), p, o, m) +# define BOOST_PP_FOR_38(s, p, o, m) BOOST_PP_IF(p(39, s), m, BOOST_PP_TUPLE_EAT_2)(39, s) BOOST_PP_IF(p(39, s), BOOST_PP_FOR_39, BOOST_PP_TUPLE_EAT_4)(o(39, s), p, o, m) +# define BOOST_PP_FOR_39(s, p, o, m) BOOST_PP_IF(p(40, s), m, BOOST_PP_TUPLE_EAT_2)(40, s) BOOST_PP_IF(p(40, s), BOOST_PP_FOR_40, BOOST_PP_TUPLE_EAT_4)(o(40, s), p, o, m) +# define BOOST_PP_FOR_40(s, p, o, m) BOOST_PP_IF(p(41, s), m, BOOST_PP_TUPLE_EAT_2)(41, s) BOOST_PP_IF(p(41, s), BOOST_PP_FOR_41, BOOST_PP_TUPLE_EAT_4)(o(41, s), p, o, m) +# define BOOST_PP_FOR_41(s, p, o, m) BOOST_PP_IF(p(42, s), m, BOOST_PP_TUPLE_EAT_2)(42, s) BOOST_PP_IF(p(42, s), BOOST_PP_FOR_42, BOOST_PP_TUPLE_EAT_4)(o(42, s), p, o, m) +# define BOOST_PP_FOR_42(s, p, o, m) BOOST_PP_IF(p(43, s), m, BOOST_PP_TUPLE_EAT_2)(43, s) BOOST_PP_IF(p(43, s), BOOST_PP_FOR_43, BOOST_PP_TUPLE_EAT_4)(o(43, s), p, o, m) +# define BOOST_PP_FOR_43(s, p, o, m) BOOST_PP_IF(p(44, s), m, BOOST_PP_TUPLE_EAT_2)(44, s) BOOST_PP_IF(p(44, s), BOOST_PP_FOR_44, BOOST_PP_TUPLE_EAT_4)(o(44, s), p, o, m) +# define BOOST_PP_FOR_44(s, p, o, m) BOOST_PP_IF(p(45, s), m, BOOST_PP_TUPLE_EAT_2)(45, s) BOOST_PP_IF(p(45, s), BOOST_PP_FOR_45, BOOST_PP_TUPLE_EAT_4)(o(45, s), p, o, m) +# define BOOST_PP_FOR_45(s, p, o, m) BOOST_PP_IF(p(46, s), m, BOOST_PP_TUPLE_EAT_2)(46, s) BOOST_PP_IF(p(46, s), BOOST_PP_FOR_46, BOOST_PP_TUPLE_EAT_4)(o(46, s), p, o, m) +# define BOOST_PP_FOR_46(s, p, o, m) BOOST_PP_IF(p(47, s), m, BOOST_PP_TUPLE_EAT_2)(47, s) BOOST_PP_IF(p(47, s), BOOST_PP_FOR_47, BOOST_PP_TUPLE_EAT_4)(o(47, s), p, o, m) +# define BOOST_PP_FOR_47(s, p, o, m) BOOST_PP_IF(p(48, s), m, BOOST_PP_TUPLE_EAT_2)(48, s) BOOST_PP_IF(p(48, s), BOOST_PP_FOR_48, BOOST_PP_TUPLE_EAT_4)(o(48, s), p, o, m) +# define BOOST_PP_FOR_48(s, p, o, m) BOOST_PP_IF(p(49, s), m, BOOST_PP_TUPLE_EAT_2)(49, s) BOOST_PP_IF(p(49, s), BOOST_PP_FOR_49, BOOST_PP_TUPLE_EAT_4)(o(49, s), p, o, m) +# define BOOST_PP_FOR_49(s, p, o, m) BOOST_PP_IF(p(50, s), m, BOOST_PP_TUPLE_EAT_2)(50, s) BOOST_PP_IF(p(50, s), BOOST_PP_FOR_50, BOOST_PP_TUPLE_EAT_4)(o(50, s), p, o, m) +# define BOOST_PP_FOR_50(s, p, o, m) BOOST_PP_IF(p(51, s), m, BOOST_PP_TUPLE_EAT_2)(51, s) BOOST_PP_IF(p(51, s), BOOST_PP_FOR_51, BOOST_PP_TUPLE_EAT_4)(o(51, s), p, o, m) +# define BOOST_PP_FOR_51(s, p, o, m) BOOST_PP_IF(p(52, s), m, BOOST_PP_TUPLE_EAT_2)(52, s) BOOST_PP_IF(p(52, s), BOOST_PP_FOR_52, BOOST_PP_TUPLE_EAT_4)(o(52, s), p, o, m) +# define BOOST_PP_FOR_52(s, p, o, m) BOOST_PP_IF(p(53, s), m, BOOST_PP_TUPLE_EAT_2)(53, s) BOOST_PP_IF(p(53, s), BOOST_PP_FOR_53, BOOST_PP_TUPLE_EAT_4)(o(53, s), p, o, m) +# define BOOST_PP_FOR_53(s, p, o, m) BOOST_PP_IF(p(54, s), m, BOOST_PP_TUPLE_EAT_2)(54, s) BOOST_PP_IF(p(54, s), BOOST_PP_FOR_54, BOOST_PP_TUPLE_EAT_4)(o(54, s), p, o, m) +# define BOOST_PP_FOR_54(s, p, o, m) BOOST_PP_IF(p(55, s), m, BOOST_PP_TUPLE_EAT_2)(55, s) BOOST_PP_IF(p(55, s), BOOST_PP_FOR_55, BOOST_PP_TUPLE_EAT_4)(o(55, s), p, o, m) +# define BOOST_PP_FOR_55(s, p, o, m) BOOST_PP_IF(p(56, s), m, BOOST_PP_TUPLE_EAT_2)(56, s) BOOST_PP_IF(p(56, s), BOOST_PP_FOR_56, BOOST_PP_TUPLE_EAT_4)(o(56, s), p, o, m) +# define BOOST_PP_FOR_56(s, p, o, m) BOOST_PP_IF(p(57, s), m, BOOST_PP_TUPLE_EAT_2)(57, s) BOOST_PP_IF(p(57, s), BOOST_PP_FOR_57, BOOST_PP_TUPLE_EAT_4)(o(57, s), p, o, m) +# define BOOST_PP_FOR_57(s, p, o, m) BOOST_PP_IF(p(58, s), m, BOOST_PP_TUPLE_EAT_2)(58, s) BOOST_PP_IF(p(58, s), BOOST_PP_FOR_58, BOOST_PP_TUPLE_EAT_4)(o(58, s), p, o, m) +# define BOOST_PP_FOR_58(s, p, o, m) BOOST_PP_IF(p(59, s), m, BOOST_PP_TUPLE_EAT_2)(59, s) BOOST_PP_IF(p(59, s), BOOST_PP_FOR_59, BOOST_PP_TUPLE_EAT_4)(o(59, s), p, o, m) +# define BOOST_PP_FOR_59(s, p, o, m) BOOST_PP_IF(p(60, s), m, BOOST_PP_TUPLE_EAT_2)(60, s) BOOST_PP_IF(p(60, s), BOOST_PP_FOR_60, BOOST_PP_TUPLE_EAT_4)(o(60, s), p, o, m) +# define BOOST_PP_FOR_60(s, p, o, m) BOOST_PP_IF(p(61, s), m, BOOST_PP_TUPLE_EAT_2)(61, s) BOOST_PP_IF(p(61, s), BOOST_PP_FOR_61, BOOST_PP_TUPLE_EAT_4)(o(61, s), p, o, m) +# define BOOST_PP_FOR_61(s, p, o, m) BOOST_PP_IF(p(62, s), m, BOOST_PP_TUPLE_EAT_2)(62, s) BOOST_PP_IF(p(62, s), BOOST_PP_FOR_62, BOOST_PP_TUPLE_EAT_4)(o(62, s), p, o, m) +# define BOOST_PP_FOR_62(s, p, o, m) BOOST_PP_IF(p(63, s), m, BOOST_PP_TUPLE_EAT_2)(63, s) BOOST_PP_IF(p(63, s), BOOST_PP_FOR_63, BOOST_PP_TUPLE_EAT_4)(o(63, s), p, o, m) +# define BOOST_PP_FOR_63(s, p, o, m) BOOST_PP_IF(p(64, s), m, BOOST_PP_TUPLE_EAT_2)(64, s) BOOST_PP_IF(p(64, s), BOOST_PP_FOR_64, BOOST_PP_TUPLE_EAT_4)(o(64, s), p, o, m) +# define BOOST_PP_FOR_64(s, p, o, m) BOOST_PP_IF(p(65, s), m, BOOST_PP_TUPLE_EAT_2)(65, s) BOOST_PP_IF(p(65, s), BOOST_PP_FOR_65, BOOST_PP_TUPLE_EAT_4)(o(65, s), p, o, m) +# define BOOST_PP_FOR_65(s, p, o, m) BOOST_PP_IF(p(66, s), m, BOOST_PP_TUPLE_EAT_2)(66, s) BOOST_PP_IF(p(66, s), BOOST_PP_FOR_66, BOOST_PP_TUPLE_EAT_4)(o(66, s), p, o, m) +# define BOOST_PP_FOR_66(s, p, o, m) BOOST_PP_IF(p(67, s), m, BOOST_PP_TUPLE_EAT_2)(67, s) BOOST_PP_IF(p(67, s), BOOST_PP_FOR_67, BOOST_PP_TUPLE_EAT_4)(o(67, s), p, o, m) +# define BOOST_PP_FOR_67(s, p, o, m) BOOST_PP_IF(p(68, s), m, BOOST_PP_TUPLE_EAT_2)(68, s) BOOST_PP_IF(p(68, s), BOOST_PP_FOR_68, BOOST_PP_TUPLE_EAT_4)(o(68, s), p, o, m) +# define BOOST_PP_FOR_68(s, p, o, m) BOOST_PP_IF(p(69, s), m, BOOST_PP_TUPLE_EAT_2)(69, s) BOOST_PP_IF(p(69, s), BOOST_PP_FOR_69, BOOST_PP_TUPLE_EAT_4)(o(69, s), p, o, m) +# define BOOST_PP_FOR_69(s, p, o, m) BOOST_PP_IF(p(70, s), m, BOOST_PP_TUPLE_EAT_2)(70, s) BOOST_PP_IF(p(70, s), BOOST_PP_FOR_70, BOOST_PP_TUPLE_EAT_4)(o(70, s), p, o, m) +# define BOOST_PP_FOR_70(s, p, o, m) BOOST_PP_IF(p(71, s), m, BOOST_PP_TUPLE_EAT_2)(71, s) BOOST_PP_IF(p(71, s), BOOST_PP_FOR_71, BOOST_PP_TUPLE_EAT_4)(o(71, s), p, o, m) +# define BOOST_PP_FOR_71(s, p, o, m) BOOST_PP_IF(p(72, s), m, BOOST_PP_TUPLE_EAT_2)(72, s) BOOST_PP_IF(p(72, s), BOOST_PP_FOR_72, BOOST_PP_TUPLE_EAT_4)(o(72, s), p, o, m) +# define BOOST_PP_FOR_72(s, p, o, m) BOOST_PP_IF(p(73, s), m, BOOST_PP_TUPLE_EAT_2)(73, s) BOOST_PP_IF(p(73, s), BOOST_PP_FOR_73, BOOST_PP_TUPLE_EAT_4)(o(73, s), p, o, m) +# define BOOST_PP_FOR_73(s, p, o, m) BOOST_PP_IF(p(74, s), m, BOOST_PP_TUPLE_EAT_2)(74, s) BOOST_PP_IF(p(74, s), BOOST_PP_FOR_74, BOOST_PP_TUPLE_EAT_4)(o(74, s), p, o, m) +# define BOOST_PP_FOR_74(s, p, o, m) BOOST_PP_IF(p(75, s), m, BOOST_PP_TUPLE_EAT_2)(75, s) BOOST_PP_IF(p(75, s), BOOST_PP_FOR_75, BOOST_PP_TUPLE_EAT_4)(o(75, s), p, o, m) +# define BOOST_PP_FOR_75(s, p, o, m) BOOST_PP_IF(p(76, s), m, BOOST_PP_TUPLE_EAT_2)(76, s) BOOST_PP_IF(p(76, s), BOOST_PP_FOR_76, BOOST_PP_TUPLE_EAT_4)(o(76, s), p, o, m) +# define BOOST_PP_FOR_76(s, p, o, m) BOOST_PP_IF(p(77, s), m, BOOST_PP_TUPLE_EAT_2)(77, s) BOOST_PP_IF(p(77, s), BOOST_PP_FOR_77, BOOST_PP_TUPLE_EAT_4)(o(77, s), p, o, m) +# define BOOST_PP_FOR_77(s, p, o, m) BOOST_PP_IF(p(78, s), m, BOOST_PP_TUPLE_EAT_2)(78, s) BOOST_PP_IF(p(78, s), BOOST_PP_FOR_78, BOOST_PP_TUPLE_EAT_4)(o(78, s), p, o, m) +# define BOOST_PP_FOR_78(s, p, o, m) BOOST_PP_IF(p(79, s), m, BOOST_PP_TUPLE_EAT_2)(79, s) BOOST_PP_IF(p(79, s), BOOST_PP_FOR_79, BOOST_PP_TUPLE_EAT_4)(o(79, s), p, o, m) +# define BOOST_PP_FOR_79(s, p, o, m) BOOST_PP_IF(p(80, s), m, BOOST_PP_TUPLE_EAT_2)(80, s) BOOST_PP_IF(p(80, s), BOOST_PP_FOR_80, BOOST_PP_TUPLE_EAT_4)(o(80, s), p, o, m) +# define BOOST_PP_FOR_80(s, p, o, m) BOOST_PP_IF(p(81, s), m, BOOST_PP_TUPLE_EAT_2)(81, s) BOOST_PP_IF(p(81, s), BOOST_PP_FOR_81, BOOST_PP_TUPLE_EAT_4)(o(81, s), p, o, m) +# define BOOST_PP_FOR_81(s, p, o, m) BOOST_PP_IF(p(82, s), m, BOOST_PP_TUPLE_EAT_2)(82, s) BOOST_PP_IF(p(82, s), BOOST_PP_FOR_82, BOOST_PP_TUPLE_EAT_4)(o(82, s), p, o, m) +# define BOOST_PP_FOR_82(s, p, o, m) BOOST_PP_IF(p(83, s), m, BOOST_PP_TUPLE_EAT_2)(83, s) BOOST_PP_IF(p(83, s), BOOST_PP_FOR_83, BOOST_PP_TUPLE_EAT_4)(o(83, s), p, o, m) +# define BOOST_PP_FOR_83(s, p, o, m) BOOST_PP_IF(p(84, s), m, BOOST_PP_TUPLE_EAT_2)(84, s) BOOST_PP_IF(p(84, s), BOOST_PP_FOR_84, BOOST_PP_TUPLE_EAT_4)(o(84, s), p, o, m) +# define BOOST_PP_FOR_84(s, p, o, m) BOOST_PP_IF(p(85, s), m, BOOST_PP_TUPLE_EAT_2)(85, s) BOOST_PP_IF(p(85, s), BOOST_PP_FOR_85, BOOST_PP_TUPLE_EAT_4)(o(85, s), p, o, m) +# define BOOST_PP_FOR_85(s, p, o, m) BOOST_PP_IF(p(86, s), m, BOOST_PP_TUPLE_EAT_2)(86, s) BOOST_PP_IF(p(86, s), BOOST_PP_FOR_86, BOOST_PP_TUPLE_EAT_4)(o(86, s), p, o, m) +# define BOOST_PP_FOR_86(s, p, o, m) BOOST_PP_IF(p(87, s), m, BOOST_PP_TUPLE_EAT_2)(87, s) BOOST_PP_IF(p(87, s), BOOST_PP_FOR_87, BOOST_PP_TUPLE_EAT_4)(o(87, s), p, o, m) +# define BOOST_PP_FOR_87(s, p, o, m) BOOST_PP_IF(p(88, s), m, BOOST_PP_TUPLE_EAT_2)(88, s) BOOST_PP_IF(p(88, s), BOOST_PP_FOR_88, BOOST_PP_TUPLE_EAT_4)(o(88, s), p, o, m) +# define BOOST_PP_FOR_88(s, p, o, m) BOOST_PP_IF(p(89, s), m, BOOST_PP_TUPLE_EAT_2)(89, s) BOOST_PP_IF(p(89, s), BOOST_PP_FOR_89, BOOST_PP_TUPLE_EAT_4)(o(89, s), p, o, m) +# define BOOST_PP_FOR_89(s, p, o, m) BOOST_PP_IF(p(90, s), m, BOOST_PP_TUPLE_EAT_2)(90, s) BOOST_PP_IF(p(90, s), BOOST_PP_FOR_90, BOOST_PP_TUPLE_EAT_4)(o(90, s), p, o, m) +# define BOOST_PP_FOR_90(s, p, o, m) BOOST_PP_IF(p(91, s), m, BOOST_PP_TUPLE_EAT_2)(91, s) BOOST_PP_IF(p(91, s), BOOST_PP_FOR_91, BOOST_PP_TUPLE_EAT_4)(o(91, s), p, o, m) +# define BOOST_PP_FOR_91(s, p, o, m) BOOST_PP_IF(p(92, s), m, BOOST_PP_TUPLE_EAT_2)(92, s) BOOST_PP_IF(p(92, s), BOOST_PP_FOR_92, BOOST_PP_TUPLE_EAT_4)(o(92, s), p, o, m) +# define BOOST_PP_FOR_92(s, p, o, m) BOOST_PP_IF(p(93, s), m, BOOST_PP_TUPLE_EAT_2)(93, s) BOOST_PP_IF(p(93, s), BOOST_PP_FOR_93, BOOST_PP_TUPLE_EAT_4)(o(93, s), p, o, m) +# define BOOST_PP_FOR_93(s, p, o, m) BOOST_PP_IF(p(94, s), m, BOOST_PP_TUPLE_EAT_2)(94, s) BOOST_PP_IF(p(94, s), BOOST_PP_FOR_94, BOOST_PP_TUPLE_EAT_4)(o(94, s), p, o, m) +# define BOOST_PP_FOR_94(s, p, o, m) BOOST_PP_IF(p(95, s), m, BOOST_PP_TUPLE_EAT_2)(95, s) BOOST_PP_IF(p(95, s), BOOST_PP_FOR_95, BOOST_PP_TUPLE_EAT_4)(o(95, s), p, o, m) +# define BOOST_PP_FOR_95(s, p, o, m) BOOST_PP_IF(p(96, s), m, BOOST_PP_TUPLE_EAT_2)(96, s) BOOST_PP_IF(p(96, s), BOOST_PP_FOR_96, BOOST_PP_TUPLE_EAT_4)(o(96, s), p, o, m) +# define BOOST_PP_FOR_96(s, p, o, m) BOOST_PP_IF(p(97, s), m, BOOST_PP_TUPLE_EAT_2)(97, s) BOOST_PP_IF(p(97, s), BOOST_PP_FOR_97, BOOST_PP_TUPLE_EAT_4)(o(97, s), p, o, m) +# define BOOST_PP_FOR_97(s, p, o, m) BOOST_PP_IF(p(98, s), m, BOOST_PP_TUPLE_EAT_2)(98, s) BOOST_PP_IF(p(98, s), BOOST_PP_FOR_98, BOOST_PP_TUPLE_EAT_4)(o(98, s), p, o, m) +# define BOOST_PP_FOR_98(s, p, o, m) BOOST_PP_IF(p(99, s), m, BOOST_PP_TUPLE_EAT_2)(99, s) BOOST_PP_IF(p(99, s), BOOST_PP_FOR_99, BOOST_PP_TUPLE_EAT_4)(o(99, s), p, o, m) +# define BOOST_PP_FOR_99(s, p, o, m) BOOST_PP_IF(p(100, s), m, BOOST_PP_TUPLE_EAT_2)(100, s) BOOST_PP_IF(p(100, s), BOOST_PP_FOR_100, BOOST_PP_TUPLE_EAT_4)(o(100, s), p, o, m) +# define BOOST_PP_FOR_100(s, p, o, m) BOOST_PP_IF(p(101, s), m, BOOST_PP_TUPLE_EAT_2)(101, s) BOOST_PP_IF(p(101, s), BOOST_PP_FOR_101, BOOST_PP_TUPLE_EAT_4)(o(101, s), p, o, m) +# define BOOST_PP_FOR_101(s, p, o, m) BOOST_PP_IF(p(102, s), m, BOOST_PP_TUPLE_EAT_2)(102, s) BOOST_PP_IF(p(102, s), BOOST_PP_FOR_102, BOOST_PP_TUPLE_EAT_4)(o(102, s), p, o, m) +# define BOOST_PP_FOR_102(s, p, o, m) BOOST_PP_IF(p(103, s), m, BOOST_PP_TUPLE_EAT_2)(103, s) BOOST_PP_IF(p(103, s), BOOST_PP_FOR_103, BOOST_PP_TUPLE_EAT_4)(o(103, s), p, o, m) +# define BOOST_PP_FOR_103(s, p, o, m) BOOST_PP_IF(p(104, s), m, BOOST_PP_TUPLE_EAT_2)(104, s) BOOST_PP_IF(p(104, s), BOOST_PP_FOR_104, BOOST_PP_TUPLE_EAT_4)(o(104, s), p, o, m) +# define BOOST_PP_FOR_104(s, p, o, m) BOOST_PP_IF(p(105, s), m, BOOST_PP_TUPLE_EAT_2)(105, s) BOOST_PP_IF(p(105, s), BOOST_PP_FOR_105, BOOST_PP_TUPLE_EAT_4)(o(105, s), p, o, m) +# define BOOST_PP_FOR_105(s, p, o, m) BOOST_PP_IF(p(106, s), m, BOOST_PP_TUPLE_EAT_2)(106, s) BOOST_PP_IF(p(106, s), BOOST_PP_FOR_106, BOOST_PP_TUPLE_EAT_4)(o(106, s), p, o, m) +# define BOOST_PP_FOR_106(s, p, o, m) BOOST_PP_IF(p(107, s), m, BOOST_PP_TUPLE_EAT_2)(107, s) BOOST_PP_IF(p(107, s), BOOST_PP_FOR_107, BOOST_PP_TUPLE_EAT_4)(o(107, s), p, o, m) +# define BOOST_PP_FOR_107(s, p, o, m) BOOST_PP_IF(p(108, s), m, BOOST_PP_TUPLE_EAT_2)(108, s) BOOST_PP_IF(p(108, s), BOOST_PP_FOR_108, BOOST_PP_TUPLE_EAT_4)(o(108, s), p, o, m) +# define BOOST_PP_FOR_108(s, p, o, m) BOOST_PP_IF(p(109, s), m, BOOST_PP_TUPLE_EAT_2)(109, s) BOOST_PP_IF(p(109, s), BOOST_PP_FOR_109, BOOST_PP_TUPLE_EAT_4)(o(109, s), p, o, m) +# define BOOST_PP_FOR_109(s, p, o, m) BOOST_PP_IF(p(110, s), m, BOOST_PP_TUPLE_EAT_2)(110, s) BOOST_PP_IF(p(110, s), BOOST_PP_FOR_110, BOOST_PP_TUPLE_EAT_4)(o(110, s), p, o, m) +# define BOOST_PP_FOR_110(s, p, o, m) BOOST_PP_IF(p(111, s), m, BOOST_PP_TUPLE_EAT_2)(111, s) BOOST_PP_IF(p(111, s), BOOST_PP_FOR_111, BOOST_PP_TUPLE_EAT_4)(o(111, s), p, o, m) +# define BOOST_PP_FOR_111(s, p, o, m) BOOST_PP_IF(p(112, s), m, BOOST_PP_TUPLE_EAT_2)(112, s) BOOST_PP_IF(p(112, s), BOOST_PP_FOR_112, BOOST_PP_TUPLE_EAT_4)(o(112, s), p, o, m) +# define BOOST_PP_FOR_112(s, p, o, m) BOOST_PP_IF(p(113, s), m, BOOST_PP_TUPLE_EAT_2)(113, s) BOOST_PP_IF(p(113, s), BOOST_PP_FOR_113, BOOST_PP_TUPLE_EAT_4)(o(113, s), p, o, m) +# define BOOST_PP_FOR_113(s, p, o, m) BOOST_PP_IF(p(114, s), m, BOOST_PP_TUPLE_EAT_2)(114, s) BOOST_PP_IF(p(114, s), BOOST_PP_FOR_114, BOOST_PP_TUPLE_EAT_4)(o(114, s), p, o, m) +# define BOOST_PP_FOR_114(s, p, o, m) BOOST_PP_IF(p(115, s), m, BOOST_PP_TUPLE_EAT_2)(115, s) BOOST_PP_IF(p(115, s), BOOST_PP_FOR_115, BOOST_PP_TUPLE_EAT_4)(o(115, s), p, o, m) +# define BOOST_PP_FOR_115(s, p, o, m) BOOST_PP_IF(p(116, s), m, BOOST_PP_TUPLE_EAT_2)(116, s) BOOST_PP_IF(p(116, s), BOOST_PP_FOR_116, BOOST_PP_TUPLE_EAT_4)(o(116, s), p, o, m) +# define BOOST_PP_FOR_116(s, p, o, m) BOOST_PP_IF(p(117, s), m, BOOST_PP_TUPLE_EAT_2)(117, s) BOOST_PP_IF(p(117, s), BOOST_PP_FOR_117, BOOST_PP_TUPLE_EAT_4)(o(117, s), p, o, m) +# define BOOST_PP_FOR_117(s, p, o, m) BOOST_PP_IF(p(118, s), m, BOOST_PP_TUPLE_EAT_2)(118, s) BOOST_PP_IF(p(118, s), BOOST_PP_FOR_118, BOOST_PP_TUPLE_EAT_4)(o(118, s), p, o, m) +# define BOOST_PP_FOR_118(s, p, o, m) BOOST_PP_IF(p(119, s), m, BOOST_PP_TUPLE_EAT_2)(119, s) BOOST_PP_IF(p(119, s), BOOST_PP_FOR_119, BOOST_PP_TUPLE_EAT_4)(o(119, s), p, o, m) +# define BOOST_PP_FOR_119(s, p, o, m) BOOST_PP_IF(p(120, s), m, BOOST_PP_TUPLE_EAT_2)(120, s) BOOST_PP_IF(p(120, s), BOOST_PP_FOR_120, BOOST_PP_TUPLE_EAT_4)(o(120, s), p, o, m) +# define BOOST_PP_FOR_120(s, p, o, m) BOOST_PP_IF(p(121, s), m, BOOST_PP_TUPLE_EAT_2)(121, s) BOOST_PP_IF(p(121, s), BOOST_PP_FOR_121, BOOST_PP_TUPLE_EAT_4)(o(121, s), p, o, m) +# define BOOST_PP_FOR_121(s, p, o, m) BOOST_PP_IF(p(122, s), m, BOOST_PP_TUPLE_EAT_2)(122, s) BOOST_PP_IF(p(122, s), BOOST_PP_FOR_122, BOOST_PP_TUPLE_EAT_4)(o(122, s), p, o, m) +# define BOOST_PP_FOR_122(s, p, o, m) BOOST_PP_IF(p(123, s), m, BOOST_PP_TUPLE_EAT_2)(123, s) BOOST_PP_IF(p(123, s), BOOST_PP_FOR_123, BOOST_PP_TUPLE_EAT_4)(o(123, s), p, o, m) +# define BOOST_PP_FOR_123(s, p, o, m) BOOST_PP_IF(p(124, s), m, BOOST_PP_TUPLE_EAT_2)(124, s) BOOST_PP_IF(p(124, s), BOOST_PP_FOR_124, BOOST_PP_TUPLE_EAT_4)(o(124, s), p, o, m) +# define BOOST_PP_FOR_124(s, p, o, m) BOOST_PP_IF(p(125, s), m, BOOST_PP_TUPLE_EAT_2)(125, s) BOOST_PP_IF(p(125, s), BOOST_PP_FOR_125, BOOST_PP_TUPLE_EAT_4)(o(125, s), p, o, m) +# define BOOST_PP_FOR_125(s, p, o, m) BOOST_PP_IF(p(126, s), m, BOOST_PP_TUPLE_EAT_2)(126, s) BOOST_PP_IF(p(126, s), BOOST_PP_FOR_126, BOOST_PP_TUPLE_EAT_4)(o(126, s), p, o, m) +# define BOOST_PP_FOR_126(s, p, o, m) BOOST_PP_IF(p(127, s), m, BOOST_PP_TUPLE_EAT_2)(127, s) BOOST_PP_IF(p(127, s), BOOST_PP_FOR_127, BOOST_PP_TUPLE_EAT_4)(o(127, s), p, o, m) +# define BOOST_PP_FOR_127(s, p, o, m) BOOST_PP_IF(p(128, s), m, BOOST_PP_TUPLE_EAT_2)(128, s) BOOST_PP_IF(p(128, s), BOOST_PP_FOR_128, BOOST_PP_TUPLE_EAT_4)(o(128, s), p, o, m) +# define BOOST_PP_FOR_128(s, p, o, m) BOOST_PP_IF(p(129, s), m, BOOST_PP_TUPLE_EAT_2)(129, s) BOOST_PP_IF(p(129, s), BOOST_PP_FOR_129, BOOST_PP_TUPLE_EAT_4)(o(129, s), p, o, m) +# define BOOST_PP_FOR_129(s, p, o, m) BOOST_PP_IF(p(130, s), m, BOOST_PP_TUPLE_EAT_2)(130, s) BOOST_PP_IF(p(130, s), BOOST_PP_FOR_130, BOOST_PP_TUPLE_EAT_4)(o(130, s), p, o, m) +# define BOOST_PP_FOR_130(s, p, o, m) BOOST_PP_IF(p(131, s), m, BOOST_PP_TUPLE_EAT_2)(131, s) BOOST_PP_IF(p(131, s), BOOST_PP_FOR_131, BOOST_PP_TUPLE_EAT_4)(o(131, s), p, o, m) +# define BOOST_PP_FOR_131(s, p, o, m) BOOST_PP_IF(p(132, s), m, BOOST_PP_TUPLE_EAT_2)(132, s) BOOST_PP_IF(p(132, s), BOOST_PP_FOR_132, BOOST_PP_TUPLE_EAT_4)(o(132, s), p, o, m) +# define BOOST_PP_FOR_132(s, p, o, m) BOOST_PP_IF(p(133, s), m, BOOST_PP_TUPLE_EAT_2)(133, s) BOOST_PP_IF(p(133, s), BOOST_PP_FOR_133, BOOST_PP_TUPLE_EAT_4)(o(133, s), p, o, m) +# define BOOST_PP_FOR_133(s, p, o, m) BOOST_PP_IF(p(134, s), m, BOOST_PP_TUPLE_EAT_2)(134, s) BOOST_PP_IF(p(134, s), BOOST_PP_FOR_134, BOOST_PP_TUPLE_EAT_4)(o(134, s), p, o, m) +# define BOOST_PP_FOR_134(s, p, o, m) BOOST_PP_IF(p(135, s), m, BOOST_PP_TUPLE_EAT_2)(135, s) BOOST_PP_IF(p(135, s), BOOST_PP_FOR_135, BOOST_PP_TUPLE_EAT_4)(o(135, s), p, o, m) +# define BOOST_PP_FOR_135(s, p, o, m) BOOST_PP_IF(p(136, s), m, BOOST_PP_TUPLE_EAT_2)(136, s) BOOST_PP_IF(p(136, s), BOOST_PP_FOR_136, BOOST_PP_TUPLE_EAT_4)(o(136, s), p, o, m) +# define BOOST_PP_FOR_136(s, p, o, m) BOOST_PP_IF(p(137, s), m, BOOST_PP_TUPLE_EAT_2)(137, s) BOOST_PP_IF(p(137, s), BOOST_PP_FOR_137, BOOST_PP_TUPLE_EAT_4)(o(137, s), p, o, m) +# define BOOST_PP_FOR_137(s, p, o, m) BOOST_PP_IF(p(138, s), m, BOOST_PP_TUPLE_EAT_2)(138, s) BOOST_PP_IF(p(138, s), BOOST_PP_FOR_138, BOOST_PP_TUPLE_EAT_4)(o(138, s), p, o, m) +# define BOOST_PP_FOR_138(s, p, o, m) BOOST_PP_IF(p(139, s), m, BOOST_PP_TUPLE_EAT_2)(139, s) BOOST_PP_IF(p(139, s), BOOST_PP_FOR_139, BOOST_PP_TUPLE_EAT_4)(o(139, s), p, o, m) +# define BOOST_PP_FOR_139(s, p, o, m) BOOST_PP_IF(p(140, s), m, BOOST_PP_TUPLE_EAT_2)(140, s) BOOST_PP_IF(p(140, s), BOOST_PP_FOR_140, BOOST_PP_TUPLE_EAT_4)(o(140, s), p, o, m) +# define BOOST_PP_FOR_140(s, p, o, m) BOOST_PP_IF(p(141, s), m, BOOST_PP_TUPLE_EAT_2)(141, s) BOOST_PP_IF(p(141, s), BOOST_PP_FOR_141, BOOST_PP_TUPLE_EAT_4)(o(141, s), p, o, m) +# define BOOST_PP_FOR_141(s, p, o, m) BOOST_PP_IF(p(142, s), m, BOOST_PP_TUPLE_EAT_2)(142, s) BOOST_PP_IF(p(142, s), BOOST_PP_FOR_142, BOOST_PP_TUPLE_EAT_4)(o(142, s), p, o, m) +# define BOOST_PP_FOR_142(s, p, o, m) BOOST_PP_IF(p(143, s), m, BOOST_PP_TUPLE_EAT_2)(143, s) BOOST_PP_IF(p(143, s), BOOST_PP_FOR_143, BOOST_PP_TUPLE_EAT_4)(o(143, s), p, o, m) +# define BOOST_PP_FOR_143(s, p, o, m) BOOST_PP_IF(p(144, s), m, BOOST_PP_TUPLE_EAT_2)(144, s) BOOST_PP_IF(p(144, s), BOOST_PP_FOR_144, BOOST_PP_TUPLE_EAT_4)(o(144, s), p, o, m) +# define BOOST_PP_FOR_144(s, p, o, m) BOOST_PP_IF(p(145, s), m, BOOST_PP_TUPLE_EAT_2)(145, s) BOOST_PP_IF(p(145, s), BOOST_PP_FOR_145, BOOST_PP_TUPLE_EAT_4)(o(145, s), p, o, m) +# define BOOST_PP_FOR_145(s, p, o, m) BOOST_PP_IF(p(146, s), m, BOOST_PP_TUPLE_EAT_2)(146, s) BOOST_PP_IF(p(146, s), BOOST_PP_FOR_146, BOOST_PP_TUPLE_EAT_4)(o(146, s), p, o, m) +# define BOOST_PP_FOR_146(s, p, o, m) BOOST_PP_IF(p(147, s), m, BOOST_PP_TUPLE_EAT_2)(147, s) BOOST_PP_IF(p(147, s), BOOST_PP_FOR_147, BOOST_PP_TUPLE_EAT_4)(o(147, s), p, o, m) +# define BOOST_PP_FOR_147(s, p, o, m) BOOST_PP_IF(p(148, s), m, BOOST_PP_TUPLE_EAT_2)(148, s) BOOST_PP_IF(p(148, s), BOOST_PP_FOR_148, BOOST_PP_TUPLE_EAT_4)(o(148, s), p, o, m) +# define BOOST_PP_FOR_148(s, p, o, m) BOOST_PP_IF(p(149, s), m, BOOST_PP_TUPLE_EAT_2)(149, s) BOOST_PP_IF(p(149, s), BOOST_PP_FOR_149, BOOST_PP_TUPLE_EAT_4)(o(149, s), p, o, m) +# define BOOST_PP_FOR_149(s, p, o, m) BOOST_PP_IF(p(150, s), m, BOOST_PP_TUPLE_EAT_2)(150, s) BOOST_PP_IF(p(150, s), BOOST_PP_FOR_150, BOOST_PP_TUPLE_EAT_4)(o(150, s), p, o, m) +# define BOOST_PP_FOR_150(s, p, o, m) BOOST_PP_IF(p(151, s), m, BOOST_PP_TUPLE_EAT_2)(151, s) BOOST_PP_IF(p(151, s), BOOST_PP_FOR_151, BOOST_PP_TUPLE_EAT_4)(o(151, s), p, o, m) +# define BOOST_PP_FOR_151(s, p, o, m) BOOST_PP_IF(p(152, s), m, BOOST_PP_TUPLE_EAT_2)(152, s) BOOST_PP_IF(p(152, s), BOOST_PP_FOR_152, BOOST_PP_TUPLE_EAT_4)(o(152, s), p, o, m) +# define BOOST_PP_FOR_152(s, p, o, m) BOOST_PP_IF(p(153, s), m, BOOST_PP_TUPLE_EAT_2)(153, s) BOOST_PP_IF(p(153, s), BOOST_PP_FOR_153, BOOST_PP_TUPLE_EAT_4)(o(153, s), p, o, m) +# define BOOST_PP_FOR_153(s, p, o, m) BOOST_PP_IF(p(154, s), m, BOOST_PP_TUPLE_EAT_2)(154, s) BOOST_PP_IF(p(154, s), BOOST_PP_FOR_154, BOOST_PP_TUPLE_EAT_4)(o(154, s), p, o, m) +# define BOOST_PP_FOR_154(s, p, o, m) BOOST_PP_IF(p(155, s), m, BOOST_PP_TUPLE_EAT_2)(155, s) BOOST_PP_IF(p(155, s), BOOST_PP_FOR_155, BOOST_PP_TUPLE_EAT_4)(o(155, s), p, o, m) +# define BOOST_PP_FOR_155(s, p, o, m) BOOST_PP_IF(p(156, s), m, BOOST_PP_TUPLE_EAT_2)(156, s) BOOST_PP_IF(p(156, s), BOOST_PP_FOR_156, BOOST_PP_TUPLE_EAT_4)(o(156, s), p, o, m) +# define BOOST_PP_FOR_156(s, p, o, m) BOOST_PP_IF(p(157, s), m, BOOST_PP_TUPLE_EAT_2)(157, s) BOOST_PP_IF(p(157, s), BOOST_PP_FOR_157, BOOST_PP_TUPLE_EAT_4)(o(157, s), p, o, m) +# define BOOST_PP_FOR_157(s, p, o, m) BOOST_PP_IF(p(158, s), m, BOOST_PP_TUPLE_EAT_2)(158, s) BOOST_PP_IF(p(158, s), BOOST_PP_FOR_158, BOOST_PP_TUPLE_EAT_4)(o(158, s), p, o, m) +# define BOOST_PP_FOR_158(s, p, o, m) BOOST_PP_IF(p(159, s), m, BOOST_PP_TUPLE_EAT_2)(159, s) BOOST_PP_IF(p(159, s), BOOST_PP_FOR_159, BOOST_PP_TUPLE_EAT_4)(o(159, s), p, o, m) +# define BOOST_PP_FOR_159(s, p, o, m) BOOST_PP_IF(p(160, s), m, BOOST_PP_TUPLE_EAT_2)(160, s) BOOST_PP_IF(p(160, s), BOOST_PP_FOR_160, BOOST_PP_TUPLE_EAT_4)(o(160, s), p, o, m) +# define BOOST_PP_FOR_160(s, p, o, m) BOOST_PP_IF(p(161, s), m, BOOST_PP_TUPLE_EAT_2)(161, s) BOOST_PP_IF(p(161, s), BOOST_PP_FOR_161, BOOST_PP_TUPLE_EAT_4)(o(161, s), p, o, m) +# define BOOST_PP_FOR_161(s, p, o, m) BOOST_PP_IF(p(162, s), m, BOOST_PP_TUPLE_EAT_2)(162, s) BOOST_PP_IF(p(162, s), BOOST_PP_FOR_162, BOOST_PP_TUPLE_EAT_4)(o(162, s), p, o, m) +# define BOOST_PP_FOR_162(s, p, o, m) BOOST_PP_IF(p(163, s), m, BOOST_PP_TUPLE_EAT_2)(163, s) BOOST_PP_IF(p(163, s), BOOST_PP_FOR_163, BOOST_PP_TUPLE_EAT_4)(o(163, s), p, o, m) +# define BOOST_PP_FOR_163(s, p, o, m) BOOST_PP_IF(p(164, s), m, BOOST_PP_TUPLE_EAT_2)(164, s) BOOST_PP_IF(p(164, s), BOOST_PP_FOR_164, BOOST_PP_TUPLE_EAT_4)(o(164, s), p, o, m) +# define BOOST_PP_FOR_164(s, p, o, m) BOOST_PP_IF(p(165, s), m, BOOST_PP_TUPLE_EAT_2)(165, s) BOOST_PP_IF(p(165, s), BOOST_PP_FOR_165, BOOST_PP_TUPLE_EAT_4)(o(165, s), p, o, m) +# define BOOST_PP_FOR_165(s, p, o, m) BOOST_PP_IF(p(166, s), m, BOOST_PP_TUPLE_EAT_2)(166, s) BOOST_PP_IF(p(166, s), BOOST_PP_FOR_166, BOOST_PP_TUPLE_EAT_4)(o(166, s), p, o, m) +# define BOOST_PP_FOR_166(s, p, o, m) BOOST_PP_IF(p(167, s), m, BOOST_PP_TUPLE_EAT_2)(167, s) BOOST_PP_IF(p(167, s), BOOST_PP_FOR_167, BOOST_PP_TUPLE_EAT_4)(o(167, s), p, o, m) +# define BOOST_PP_FOR_167(s, p, o, m) BOOST_PP_IF(p(168, s), m, BOOST_PP_TUPLE_EAT_2)(168, s) BOOST_PP_IF(p(168, s), BOOST_PP_FOR_168, BOOST_PP_TUPLE_EAT_4)(o(168, s), p, o, m) +# define BOOST_PP_FOR_168(s, p, o, m) BOOST_PP_IF(p(169, s), m, BOOST_PP_TUPLE_EAT_2)(169, s) BOOST_PP_IF(p(169, s), BOOST_PP_FOR_169, BOOST_PP_TUPLE_EAT_4)(o(169, s), p, o, m) +# define BOOST_PP_FOR_169(s, p, o, m) BOOST_PP_IF(p(170, s), m, BOOST_PP_TUPLE_EAT_2)(170, s) BOOST_PP_IF(p(170, s), BOOST_PP_FOR_170, BOOST_PP_TUPLE_EAT_4)(o(170, s), p, o, m) +# define BOOST_PP_FOR_170(s, p, o, m) BOOST_PP_IF(p(171, s), m, BOOST_PP_TUPLE_EAT_2)(171, s) BOOST_PP_IF(p(171, s), BOOST_PP_FOR_171, BOOST_PP_TUPLE_EAT_4)(o(171, s), p, o, m) +# define BOOST_PP_FOR_171(s, p, o, m) BOOST_PP_IF(p(172, s), m, BOOST_PP_TUPLE_EAT_2)(172, s) BOOST_PP_IF(p(172, s), BOOST_PP_FOR_172, BOOST_PP_TUPLE_EAT_4)(o(172, s), p, o, m) +# define BOOST_PP_FOR_172(s, p, o, m) BOOST_PP_IF(p(173, s), m, BOOST_PP_TUPLE_EAT_2)(173, s) BOOST_PP_IF(p(173, s), BOOST_PP_FOR_173, BOOST_PP_TUPLE_EAT_4)(o(173, s), p, o, m) +# define BOOST_PP_FOR_173(s, p, o, m) BOOST_PP_IF(p(174, s), m, BOOST_PP_TUPLE_EAT_2)(174, s) BOOST_PP_IF(p(174, s), BOOST_PP_FOR_174, BOOST_PP_TUPLE_EAT_4)(o(174, s), p, o, m) +# define BOOST_PP_FOR_174(s, p, o, m) BOOST_PP_IF(p(175, s), m, BOOST_PP_TUPLE_EAT_2)(175, s) BOOST_PP_IF(p(175, s), BOOST_PP_FOR_175, BOOST_PP_TUPLE_EAT_4)(o(175, s), p, o, m) +# define BOOST_PP_FOR_175(s, p, o, m) BOOST_PP_IF(p(176, s), m, BOOST_PP_TUPLE_EAT_2)(176, s) BOOST_PP_IF(p(176, s), BOOST_PP_FOR_176, BOOST_PP_TUPLE_EAT_4)(o(176, s), p, o, m) +# define BOOST_PP_FOR_176(s, p, o, m) BOOST_PP_IF(p(177, s), m, BOOST_PP_TUPLE_EAT_2)(177, s) BOOST_PP_IF(p(177, s), BOOST_PP_FOR_177, BOOST_PP_TUPLE_EAT_4)(o(177, s), p, o, m) +# define BOOST_PP_FOR_177(s, p, o, m) BOOST_PP_IF(p(178, s), m, BOOST_PP_TUPLE_EAT_2)(178, s) BOOST_PP_IF(p(178, s), BOOST_PP_FOR_178, BOOST_PP_TUPLE_EAT_4)(o(178, s), p, o, m) +# define BOOST_PP_FOR_178(s, p, o, m) BOOST_PP_IF(p(179, s), m, BOOST_PP_TUPLE_EAT_2)(179, s) BOOST_PP_IF(p(179, s), BOOST_PP_FOR_179, BOOST_PP_TUPLE_EAT_4)(o(179, s), p, o, m) +# define BOOST_PP_FOR_179(s, p, o, m) BOOST_PP_IF(p(180, s), m, BOOST_PP_TUPLE_EAT_2)(180, s) BOOST_PP_IF(p(180, s), BOOST_PP_FOR_180, BOOST_PP_TUPLE_EAT_4)(o(180, s), p, o, m) +# define BOOST_PP_FOR_180(s, p, o, m) BOOST_PP_IF(p(181, s), m, BOOST_PP_TUPLE_EAT_2)(181, s) BOOST_PP_IF(p(181, s), BOOST_PP_FOR_181, BOOST_PP_TUPLE_EAT_4)(o(181, s), p, o, m) +# define BOOST_PP_FOR_181(s, p, o, m) BOOST_PP_IF(p(182, s), m, BOOST_PP_TUPLE_EAT_2)(182, s) BOOST_PP_IF(p(182, s), BOOST_PP_FOR_182, BOOST_PP_TUPLE_EAT_4)(o(182, s), p, o, m) +# define BOOST_PP_FOR_182(s, p, o, m) BOOST_PP_IF(p(183, s), m, BOOST_PP_TUPLE_EAT_2)(183, s) BOOST_PP_IF(p(183, s), BOOST_PP_FOR_183, BOOST_PP_TUPLE_EAT_4)(o(183, s), p, o, m) +# define BOOST_PP_FOR_183(s, p, o, m) BOOST_PP_IF(p(184, s), m, BOOST_PP_TUPLE_EAT_2)(184, s) BOOST_PP_IF(p(184, s), BOOST_PP_FOR_184, BOOST_PP_TUPLE_EAT_4)(o(184, s), p, o, m) +# define BOOST_PP_FOR_184(s, p, o, m) BOOST_PP_IF(p(185, s), m, BOOST_PP_TUPLE_EAT_2)(185, s) BOOST_PP_IF(p(185, s), BOOST_PP_FOR_185, BOOST_PP_TUPLE_EAT_4)(o(185, s), p, o, m) +# define BOOST_PP_FOR_185(s, p, o, m) BOOST_PP_IF(p(186, s), m, BOOST_PP_TUPLE_EAT_2)(186, s) BOOST_PP_IF(p(186, s), BOOST_PP_FOR_186, BOOST_PP_TUPLE_EAT_4)(o(186, s), p, o, m) +# define BOOST_PP_FOR_186(s, p, o, m) BOOST_PP_IF(p(187, s), m, BOOST_PP_TUPLE_EAT_2)(187, s) BOOST_PP_IF(p(187, s), BOOST_PP_FOR_187, BOOST_PP_TUPLE_EAT_4)(o(187, s), p, o, m) +# define BOOST_PP_FOR_187(s, p, o, m) BOOST_PP_IF(p(188, s), m, BOOST_PP_TUPLE_EAT_2)(188, s) BOOST_PP_IF(p(188, s), BOOST_PP_FOR_188, BOOST_PP_TUPLE_EAT_4)(o(188, s), p, o, m) +# define BOOST_PP_FOR_188(s, p, o, m) BOOST_PP_IF(p(189, s), m, BOOST_PP_TUPLE_EAT_2)(189, s) BOOST_PP_IF(p(189, s), BOOST_PP_FOR_189, BOOST_PP_TUPLE_EAT_4)(o(189, s), p, o, m) +# define BOOST_PP_FOR_189(s, p, o, m) BOOST_PP_IF(p(190, s), m, BOOST_PP_TUPLE_EAT_2)(190, s) BOOST_PP_IF(p(190, s), BOOST_PP_FOR_190, BOOST_PP_TUPLE_EAT_4)(o(190, s), p, o, m) +# define BOOST_PP_FOR_190(s, p, o, m) BOOST_PP_IF(p(191, s), m, BOOST_PP_TUPLE_EAT_2)(191, s) BOOST_PP_IF(p(191, s), BOOST_PP_FOR_191, BOOST_PP_TUPLE_EAT_4)(o(191, s), p, o, m) +# define BOOST_PP_FOR_191(s, p, o, m) BOOST_PP_IF(p(192, s), m, BOOST_PP_TUPLE_EAT_2)(192, s) BOOST_PP_IF(p(192, s), BOOST_PP_FOR_192, BOOST_PP_TUPLE_EAT_4)(o(192, s), p, o, m) +# define BOOST_PP_FOR_192(s, p, o, m) BOOST_PP_IF(p(193, s), m, BOOST_PP_TUPLE_EAT_2)(193, s) BOOST_PP_IF(p(193, s), BOOST_PP_FOR_193, BOOST_PP_TUPLE_EAT_4)(o(193, s), p, o, m) +# define BOOST_PP_FOR_193(s, p, o, m) BOOST_PP_IF(p(194, s), m, BOOST_PP_TUPLE_EAT_2)(194, s) BOOST_PP_IF(p(194, s), BOOST_PP_FOR_194, BOOST_PP_TUPLE_EAT_4)(o(194, s), p, o, m) +# define BOOST_PP_FOR_194(s, p, o, m) BOOST_PP_IF(p(195, s), m, BOOST_PP_TUPLE_EAT_2)(195, s) BOOST_PP_IF(p(195, s), BOOST_PP_FOR_195, BOOST_PP_TUPLE_EAT_4)(o(195, s), p, o, m) +# define BOOST_PP_FOR_195(s, p, o, m) BOOST_PP_IF(p(196, s), m, BOOST_PP_TUPLE_EAT_2)(196, s) BOOST_PP_IF(p(196, s), BOOST_PP_FOR_196, BOOST_PP_TUPLE_EAT_4)(o(196, s), p, o, m) +# define BOOST_PP_FOR_196(s, p, o, m) BOOST_PP_IF(p(197, s), m, BOOST_PP_TUPLE_EAT_2)(197, s) BOOST_PP_IF(p(197, s), BOOST_PP_FOR_197, BOOST_PP_TUPLE_EAT_4)(o(197, s), p, o, m) +# define BOOST_PP_FOR_197(s, p, o, m) BOOST_PP_IF(p(198, s), m, BOOST_PP_TUPLE_EAT_2)(198, s) BOOST_PP_IF(p(198, s), BOOST_PP_FOR_198, BOOST_PP_TUPLE_EAT_4)(o(198, s), p, o, m) +# define BOOST_PP_FOR_198(s, p, o, m) BOOST_PP_IF(p(199, s), m, BOOST_PP_TUPLE_EAT_2)(199, s) BOOST_PP_IF(p(199, s), BOOST_PP_FOR_199, BOOST_PP_TUPLE_EAT_4)(o(199, s), p, o, m) +# define BOOST_PP_FOR_199(s, p, o, m) BOOST_PP_IF(p(200, s), m, BOOST_PP_TUPLE_EAT_2)(200, s) BOOST_PP_IF(p(200, s), BOOST_PP_FOR_200, BOOST_PP_TUPLE_EAT_4)(o(200, s), p, o, m) +# define BOOST_PP_FOR_200(s, p, o, m) BOOST_PP_IF(p(201, s), m, BOOST_PP_TUPLE_EAT_2)(201, s) BOOST_PP_IF(p(201, s), BOOST_PP_FOR_201, BOOST_PP_TUPLE_EAT_4)(o(201, s), p, o, m) +# define BOOST_PP_FOR_201(s, p, o, m) BOOST_PP_IF(p(202, s), m, BOOST_PP_TUPLE_EAT_2)(202, s) BOOST_PP_IF(p(202, s), BOOST_PP_FOR_202, BOOST_PP_TUPLE_EAT_4)(o(202, s), p, o, m) +# define BOOST_PP_FOR_202(s, p, o, m) BOOST_PP_IF(p(203, s), m, BOOST_PP_TUPLE_EAT_2)(203, s) BOOST_PP_IF(p(203, s), BOOST_PP_FOR_203, BOOST_PP_TUPLE_EAT_4)(o(203, s), p, o, m) +# define BOOST_PP_FOR_203(s, p, o, m) BOOST_PP_IF(p(204, s), m, BOOST_PP_TUPLE_EAT_2)(204, s) BOOST_PP_IF(p(204, s), BOOST_PP_FOR_204, BOOST_PP_TUPLE_EAT_4)(o(204, s), p, o, m) +# define BOOST_PP_FOR_204(s, p, o, m) BOOST_PP_IF(p(205, s), m, BOOST_PP_TUPLE_EAT_2)(205, s) BOOST_PP_IF(p(205, s), BOOST_PP_FOR_205, BOOST_PP_TUPLE_EAT_4)(o(205, s), p, o, m) +# define BOOST_PP_FOR_205(s, p, o, m) BOOST_PP_IF(p(206, s), m, BOOST_PP_TUPLE_EAT_2)(206, s) BOOST_PP_IF(p(206, s), BOOST_PP_FOR_206, BOOST_PP_TUPLE_EAT_4)(o(206, s), p, o, m) +# define BOOST_PP_FOR_206(s, p, o, m) BOOST_PP_IF(p(207, s), m, BOOST_PP_TUPLE_EAT_2)(207, s) BOOST_PP_IF(p(207, s), BOOST_PP_FOR_207, BOOST_PP_TUPLE_EAT_4)(o(207, s), p, o, m) +# define BOOST_PP_FOR_207(s, p, o, m) BOOST_PP_IF(p(208, s), m, BOOST_PP_TUPLE_EAT_2)(208, s) BOOST_PP_IF(p(208, s), BOOST_PP_FOR_208, BOOST_PP_TUPLE_EAT_4)(o(208, s), p, o, m) +# define BOOST_PP_FOR_208(s, p, o, m) BOOST_PP_IF(p(209, s), m, BOOST_PP_TUPLE_EAT_2)(209, s) BOOST_PP_IF(p(209, s), BOOST_PP_FOR_209, BOOST_PP_TUPLE_EAT_4)(o(209, s), p, o, m) +# define BOOST_PP_FOR_209(s, p, o, m) BOOST_PP_IF(p(210, s), m, BOOST_PP_TUPLE_EAT_2)(210, s) BOOST_PP_IF(p(210, s), BOOST_PP_FOR_210, BOOST_PP_TUPLE_EAT_4)(o(210, s), p, o, m) +# define BOOST_PP_FOR_210(s, p, o, m) BOOST_PP_IF(p(211, s), m, BOOST_PP_TUPLE_EAT_2)(211, s) BOOST_PP_IF(p(211, s), BOOST_PP_FOR_211, BOOST_PP_TUPLE_EAT_4)(o(211, s), p, o, m) +# define BOOST_PP_FOR_211(s, p, o, m) BOOST_PP_IF(p(212, s), m, BOOST_PP_TUPLE_EAT_2)(212, s) BOOST_PP_IF(p(212, s), BOOST_PP_FOR_212, BOOST_PP_TUPLE_EAT_4)(o(212, s), p, o, m) +# define BOOST_PP_FOR_212(s, p, o, m) BOOST_PP_IF(p(213, s), m, BOOST_PP_TUPLE_EAT_2)(213, s) BOOST_PP_IF(p(213, s), BOOST_PP_FOR_213, BOOST_PP_TUPLE_EAT_4)(o(213, s), p, o, m) +# define BOOST_PP_FOR_213(s, p, o, m) BOOST_PP_IF(p(214, s), m, BOOST_PP_TUPLE_EAT_2)(214, s) BOOST_PP_IF(p(214, s), BOOST_PP_FOR_214, BOOST_PP_TUPLE_EAT_4)(o(214, s), p, o, m) +# define BOOST_PP_FOR_214(s, p, o, m) BOOST_PP_IF(p(215, s), m, BOOST_PP_TUPLE_EAT_2)(215, s) BOOST_PP_IF(p(215, s), BOOST_PP_FOR_215, BOOST_PP_TUPLE_EAT_4)(o(215, s), p, o, m) +# define BOOST_PP_FOR_215(s, p, o, m) BOOST_PP_IF(p(216, s), m, BOOST_PP_TUPLE_EAT_2)(216, s) BOOST_PP_IF(p(216, s), BOOST_PP_FOR_216, BOOST_PP_TUPLE_EAT_4)(o(216, s), p, o, m) +# define BOOST_PP_FOR_216(s, p, o, m) BOOST_PP_IF(p(217, s), m, BOOST_PP_TUPLE_EAT_2)(217, s) BOOST_PP_IF(p(217, s), BOOST_PP_FOR_217, BOOST_PP_TUPLE_EAT_4)(o(217, s), p, o, m) +# define BOOST_PP_FOR_217(s, p, o, m) BOOST_PP_IF(p(218, s), m, BOOST_PP_TUPLE_EAT_2)(218, s) BOOST_PP_IF(p(218, s), BOOST_PP_FOR_218, BOOST_PP_TUPLE_EAT_4)(o(218, s), p, o, m) +# define BOOST_PP_FOR_218(s, p, o, m) BOOST_PP_IF(p(219, s), m, BOOST_PP_TUPLE_EAT_2)(219, s) BOOST_PP_IF(p(219, s), BOOST_PP_FOR_219, BOOST_PP_TUPLE_EAT_4)(o(219, s), p, o, m) +# define BOOST_PP_FOR_219(s, p, o, m) BOOST_PP_IF(p(220, s), m, BOOST_PP_TUPLE_EAT_2)(220, s) BOOST_PP_IF(p(220, s), BOOST_PP_FOR_220, BOOST_PP_TUPLE_EAT_4)(o(220, s), p, o, m) +# define BOOST_PP_FOR_220(s, p, o, m) BOOST_PP_IF(p(221, s), m, BOOST_PP_TUPLE_EAT_2)(221, s) BOOST_PP_IF(p(221, s), BOOST_PP_FOR_221, BOOST_PP_TUPLE_EAT_4)(o(221, s), p, o, m) +# define BOOST_PP_FOR_221(s, p, o, m) BOOST_PP_IF(p(222, s), m, BOOST_PP_TUPLE_EAT_2)(222, s) BOOST_PP_IF(p(222, s), BOOST_PP_FOR_222, BOOST_PP_TUPLE_EAT_4)(o(222, s), p, o, m) +# define BOOST_PP_FOR_222(s, p, o, m) BOOST_PP_IF(p(223, s), m, BOOST_PP_TUPLE_EAT_2)(223, s) BOOST_PP_IF(p(223, s), BOOST_PP_FOR_223, BOOST_PP_TUPLE_EAT_4)(o(223, s), p, o, m) +# define BOOST_PP_FOR_223(s, p, o, m) BOOST_PP_IF(p(224, s), m, BOOST_PP_TUPLE_EAT_2)(224, s) BOOST_PP_IF(p(224, s), BOOST_PP_FOR_224, BOOST_PP_TUPLE_EAT_4)(o(224, s), p, o, m) +# define BOOST_PP_FOR_224(s, p, o, m) BOOST_PP_IF(p(225, s), m, BOOST_PP_TUPLE_EAT_2)(225, s) BOOST_PP_IF(p(225, s), BOOST_PP_FOR_225, BOOST_PP_TUPLE_EAT_4)(o(225, s), p, o, m) +# define BOOST_PP_FOR_225(s, p, o, m) BOOST_PP_IF(p(226, s), m, BOOST_PP_TUPLE_EAT_2)(226, s) BOOST_PP_IF(p(226, s), BOOST_PP_FOR_226, BOOST_PP_TUPLE_EAT_4)(o(226, s), p, o, m) +# define BOOST_PP_FOR_226(s, p, o, m) BOOST_PP_IF(p(227, s), m, BOOST_PP_TUPLE_EAT_2)(227, s) BOOST_PP_IF(p(227, s), BOOST_PP_FOR_227, BOOST_PP_TUPLE_EAT_4)(o(227, s), p, o, m) +# define BOOST_PP_FOR_227(s, p, o, m) BOOST_PP_IF(p(228, s), m, BOOST_PP_TUPLE_EAT_2)(228, s) BOOST_PP_IF(p(228, s), BOOST_PP_FOR_228, BOOST_PP_TUPLE_EAT_4)(o(228, s), p, o, m) +# define BOOST_PP_FOR_228(s, p, o, m) BOOST_PP_IF(p(229, s), m, BOOST_PP_TUPLE_EAT_2)(229, s) BOOST_PP_IF(p(229, s), BOOST_PP_FOR_229, BOOST_PP_TUPLE_EAT_4)(o(229, s), p, o, m) +# define BOOST_PP_FOR_229(s, p, o, m) BOOST_PP_IF(p(230, s), m, BOOST_PP_TUPLE_EAT_2)(230, s) BOOST_PP_IF(p(230, s), BOOST_PP_FOR_230, BOOST_PP_TUPLE_EAT_4)(o(230, s), p, o, m) +# define BOOST_PP_FOR_230(s, p, o, m) BOOST_PP_IF(p(231, s), m, BOOST_PP_TUPLE_EAT_2)(231, s) BOOST_PP_IF(p(231, s), BOOST_PP_FOR_231, BOOST_PP_TUPLE_EAT_4)(o(231, s), p, o, m) +# define BOOST_PP_FOR_231(s, p, o, m) BOOST_PP_IF(p(232, s), m, BOOST_PP_TUPLE_EAT_2)(232, s) BOOST_PP_IF(p(232, s), BOOST_PP_FOR_232, BOOST_PP_TUPLE_EAT_4)(o(232, s), p, o, m) +# define BOOST_PP_FOR_232(s, p, o, m) BOOST_PP_IF(p(233, s), m, BOOST_PP_TUPLE_EAT_2)(233, s) BOOST_PP_IF(p(233, s), BOOST_PP_FOR_233, BOOST_PP_TUPLE_EAT_4)(o(233, s), p, o, m) +# define BOOST_PP_FOR_233(s, p, o, m) BOOST_PP_IF(p(234, s), m, BOOST_PP_TUPLE_EAT_2)(234, s) BOOST_PP_IF(p(234, s), BOOST_PP_FOR_234, BOOST_PP_TUPLE_EAT_4)(o(234, s), p, o, m) +# define BOOST_PP_FOR_234(s, p, o, m) BOOST_PP_IF(p(235, s), m, BOOST_PP_TUPLE_EAT_2)(235, s) BOOST_PP_IF(p(235, s), BOOST_PP_FOR_235, BOOST_PP_TUPLE_EAT_4)(o(235, s), p, o, m) +# define BOOST_PP_FOR_235(s, p, o, m) BOOST_PP_IF(p(236, s), m, BOOST_PP_TUPLE_EAT_2)(236, s) BOOST_PP_IF(p(236, s), BOOST_PP_FOR_236, BOOST_PP_TUPLE_EAT_4)(o(236, s), p, o, m) +# define BOOST_PP_FOR_236(s, p, o, m) BOOST_PP_IF(p(237, s), m, BOOST_PP_TUPLE_EAT_2)(237, s) BOOST_PP_IF(p(237, s), BOOST_PP_FOR_237, BOOST_PP_TUPLE_EAT_4)(o(237, s), p, o, m) +# define BOOST_PP_FOR_237(s, p, o, m) BOOST_PP_IF(p(238, s), m, BOOST_PP_TUPLE_EAT_2)(238, s) BOOST_PP_IF(p(238, s), BOOST_PP_FOR_238, BOOST_PP_TUPLE_EAT_4)(o(238, s), p, o, m) +# define BOOST_PP_FOR_238(s, p, o, m) BOOST_PP_IF(p(239, s), m, BOOST_PP_TUPLE_EAT_2)(239, s) BOOST_PP_IF(p(239, s), BOOST_PP_FOR_239, BOOST_PP_TUPLE_EAT_4)(o(239, s), p, o, m) +# define BOOST_PP_FOR_239(s, p, o, m) BOOST_PP_IF(p(240, s), m, BOOST_PP_TUPLE_EAT_2)(240, s) BOOST_PP_IF(p(240, s), BOOST_PP_FOR_240, BOOST_PP_TUPLE_EAT_4)(o(240, s), p, o, m) +# define BOOST_PP_FOR_240(s, p, o, m) BOOST_PP_IF(p(241, s), m, BOOST_PP_TUPLE_EAT_2)(241, s) BOOST_PP_IF(p(241, s), BOOST_PP_FOR_241, BOOST_PP_TUPLE_EAT_4)(o(241, s), p, o, m) +# define BOOST_PP_FOR_241(s, p, o, m) BOOST_PP_IF(p(242, s), m, BOOST_PP_TUPLE_EAT_2)(242, s) BOOST_PP_IF(p(242, s), BOOST_PP_FOR_242, BOOST_PP_TUPLE_EAT_4)(o(242, s), p, o, m) +# define BOOST_PP_FOR_242(s, p, o, m) BOOST_PP_IF(p(243, s), m, BOOST_PP_TUPLE_EAT_2)(243, s) BOOST_PP_IF(p(243, s), BOOST_PP_FOR_243, BOOST_PP_TUPLE_EAT_4)(o(243, s), p, o, m) +# define BOOST_PP_FOR_243(s, p, o, m) BOOST_PP_IF(p(244, s), m, BOOST_PP_TUPLE_EAT_2)(244, s) BOOST_PP_IF(p(244, s), BOOST_PP_FOR_244, BOOST_PP_TUPLE_EAT_4)(o(244, s), p, o, m) +# define BOOST_PP_FOR_244(s, p, o, m) BOOST_PP_IF(p(245, s), m, BOOST_PP_TUPLE_EAT_2)(245, s) BOOST_PP_IF(p(245, s), BOOST_PP_FOR_245, BOOST_PP_TUPLE_EAT_4)(o(245, s), p, o, m) +# define BOOST_PP_FOR_245(s, p, o, m) BOOST_PP_IF(p(246, s), m, BOOST_PP_TUPLE_EAT_2)(246, s) BOOST_PP_IF(p(246, s), BOOST_PP_FOR_246, BOOST_PP_TUPLE_EAT_4)(o(246, s), p, o, m) +# define BOOST_PP_FOR_246(s, p, o, m) BOOST_PP_IF(p(247, s), m, BOOST_PP_TUPLE_EAT_2)(247, s) BOOST_PP_IF(p(247, s), BOOST_PP_FOR_247, BOOST_PP_TUPLE_EAT_4)(o(247, s), p, o, m) +# define BOOST_PP_FOR_247(s, p, o, m) BOOST_PP_IF(p(248, s), m, BOOST_PP_TUPLE_EAT_2)(248, s) BOOST_PP_IF(p(248, s), BOOST_PP_FOR_248, BOOST_PP_TUPLE_EAT_4)(o(248, s), p, o, m) +# define BOOST_PP_FOR_248(s, p, o, m) BOOST_PP_IF(p(249, s), m, BOOST_PP_TUPLE_EAT_2)(249, s) BOOST_PP_IF(p(249, s), BOOST_PP_FOR_249, BOOST_PP_TUPLE_EAT_4)(o(249, s), p, o, m) +# define BOOST_PP_FOR_249(s, p, o, m) BOOST_PP_IF(p(250, s), m, BOOST_PP_TUPLE_EAT_2)(250, s) BOOST_PP_IF(p(250, s), BOOST_PP_FOR_250, BOOST_PP_TUPLE_EAT_4)(o(250, s), p, o, m) +# define BOOST_PP_FOR_250(s, p, o, m) BOOST_PP_IF(p(251, s), m, BOOST_PP_TUPLE_EAT_2)(251, s) BOOST_PP_IF(p(251, s), BOOST_PP_FOR_251, BOOST_PP_TUPLE_EAT_4)(o(251, s), p, o, m) +# define BOOST_PP_FOR_251(s, p, o, m) BOOST_PP_IF(p(252, s), m, BOOST_PP_TUPLE_EAT_2)(252, s) BOOST_PP_IF(p(252, s), BOOST_PP_FOR_252, BOOST_PP_TUPLE_EAT_4)(o(252, s), p, o, m) +# define BOOST_PP_FOR_252(s, p, o, m) BOOST_PP_IF(p(253, s), m, BOOST_PP_TUPLE_EAT_2)(253, s) BOOST_PP_IF(p(253, s), BOOST_PP_FOR_253, BOOST_PP_TUPLE_EAT_4)(o(253, s), p, o, m) +# define BOOST_PP_FOR_253(s, p, o, m) BOOST_PP_IF(p(254, s), m, BOOST_PP_TUPLE_EAT_2)(254, s) BOOST_PP_IF(p(254, s), BOOST_PP_FOR_254, BOOST_PP_TUPLE_EAT_4)(o(254, s), p, o, m) +# define BOOST_PP_FOR_254(s, p, o, m) BOOST_PP_IF(p(255, s), m, BOOST_PP_TUPLE_EAT_2)(255, s) BOOST_PP_IF(p(255, s), BOOST_PP_FOR_255, BOOST_PP_TUPLE_EAT_4)(o(255, s), p, o, m) +# define BOOST_PP_FOR_255(s, p, o, m) BOOST_PP_IF(p(256, s), m, BOOST_PP_TUPLE_EAT_2)(256, s) BOOST_PP_IF(p(256, s), BOOST_PP_FOR_256, BOOST_PP_TUPLE_EAT_4)(o(256, s), p, o, m) +# define BOOST_PP_FOR_256(s, p, o, m) BOOST_PP_IF(p(257, s), m, BOOST_PP_TUPLE_EAT_2)(257, s) BOOST_PP_IF(p(257, s), BOOST_PP_FOR_257, BOOST_PP_TUPLE_EAT_4)(o(257, s), p, o, m) +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/repetition/enum.hpp b/ThirdParty/boost-Subset/boost/preprocessor/repetition/enum.hpp new file mode 100644 index 0000000000..0198cd9b39 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/repetition/enum.hpp @@ -0,0 +1,66 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_HPP +# define BOOST_PREPROCESSOR_REPETITION_ENUM_HPP +# +# include +# include +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_ENUM */ +# +# if 0 +# define BOOST_PP_ENUM(count, macro, data) +# endif +# +# define BOOST_PP_ENUM BOOST_PP_CAT(BOOST_PP_ENUM_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4)) +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ENUM_1(c, m, d) BOOST_PP_REPEAT_1(c, BOOST_PP_ENUM_M_1, (m, d)) +# define BOOST_PP_ENUM_2(c, m, d) BOOST_PP_REPEAT_2(c, BOOST_PP_ENUM_M_2, (m, d)) +# define BOOST_PP_ENUM_3(c, m, d) BOOST_PP_REPEAT_3(c, BOOST_PP_ENUM_M_3, (m, d)) +# else +# define BOOST_PP_ENUM_1(c, m, d) BOOST_PP_ENUM_1_I(c, m, d) +# define BOOST_PP_ENUM_2(c, m, d) BOOST_PP_ENUM_2_I(c, m, d) +# define BOOST_PP_ENUM_3(c, m, d) BOOST_PP_ENUM_3_I(c, m, d) +# define BOOST_PP_ENUM_1_I(c, m, d) BOOST_PP_REPEAT_1(c, BOOST_PP_ENUM_M_1, (m, d)) +# define BOOST_PP_ENUM_2_I(c, m, d) BOOST_PP_REPEAT_2(c, BOOST_PP_ENUM_M_2, (m, d)) +# define BOOST_PP_ENUM_3_I(c, m, d) BOOST_PP_REPEAT_3(c, BOOST_PP_ENUM_M_3, (m, d)) +# endif +# +# define BOOST_PP_ENUM_4(c, m, d) BOOST_PP_ERROR(0x0003) +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() +# define BOOST_PP_ENUM_M_1(z, n, md) BOOST_PP_ENUM_M_1_IM(z, n, BOOST_PP_TUPLE_REM_2 md) +# define BOOST_PP_ENUM_M_2(z, n, md) BOOST_PP_ENUM_M_2_IM(z, n, BOOST_PP_TUPLE_REM_2 md) +# define BOOST_PP_ENUM_M_3(z, n, md) BOOST_PP_ENUM_M_3_IM(z, n, BOOST_PP_TUPLE_REM_2 md) +# define BOOST_PP_ENUM_M_1_IM(z, n, im) BOOST_PP_ENUM_M_1_I(z, n, im) +# define BOOST_PP_ENUM_M_2_IM(z, n, im) BOOST_PP_ENUM_M_2_I(z, n, im) +# define BOOST_PP_ENUM_M_3_IM(z, n, im) BOOST_PP_ENUM_M_3_I(z, n, im) +# else +# define BOOST_PP_ENUM_M_1(z, n, md) BOOST_PP_ENUM_M_1_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md)) +# define BOOST_PP_ENUM_M_2(z, n, md) BOOST_PP_ENUM_M_2_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md)) +# define BOOST_PP_ENUM_M_3(z, n, md) BOOST_PP_ENUM_M_3_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md)) +# endif +# +# define BOOST_PP_ENUM_M_1_I(z, n, m, d) BOOST_PP_COMMA_IF(n) m(z, n, d) +# define BOOST_PP_ENUM_M_2_I(z, n, m, d) BOOST_PP_COMMA_IF(n) m(z, n, d) +# define BOOST_PP_ENUM_M_3_I(z, n, m, d) BOOST_PP_COMMA_IF(n) m(z, n, d) +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/repetition/enum_binary_params.hpp b/ThirdParty/boost-Subset/boost/preprocessor/repetition/enum_binary_params.hpp new file mode 100644 index 0000000000..a2c1048e18 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/repetition/enum_binary_params.hpp @@ -0,0 +1,54 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_BINARY_PARAMS_HPP +# define BOOST_PREPROCESSOR_REPETITION_ENUM_BINARY_PARAMS_HPP +# +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_ENUM_BINARY_PARAMS */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ENUM_BINARY_PARAMS(count, p1, p2) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_BINARY_PARAMS_M, (p1, p2)) +# else +# define BOOST_PP_ENUM_BINARY_PARAMS(count, p1, p2) BOOST_PP_ENUM_BINARY_PARAMS_I(count, p1, p2) +# define BOOST_PP_ENUM_BINARY_PARAMS_I(count, p1, p2) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_BINARY_PARAMS_M, (p1, p2)) +# endif +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() +# define BOOST_PP_ENUM_BINARY_PARAMS_M(z, n, pp) BOOST_PP_ENUM_BINARY_PARAMS_M_IM(z, n, BOOST_PP_TUPLE_REM_2 pp) +# define BOOST_PP_ENUM_BINARY_PARAMS_M_IM(z, n, im) BOOST_PP_ENUM_BINARY_PARAMS_M_I(z, n, im) +# else +# define BOOST_PP_ENUM_BINARY_PARAMS_M(z, n, pp) BOOST_PP_ENUM_BINARY_PARAMS_M_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, pp), BOOST_PP_TUPLE_ELEM(2, 1, pp)) +# endif +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_ENUM_BINARY_PARAMS_M_I(z, n, p1, p2) BOOST_PP_ENUM_BINARY_PARAMS_M_II(z, n, p1, p2) +# define BOOST_PP_ENUM_BINARY_PARAMS_M_II(z, n, p1, p2) BOOST_PP_COMMA_IF(n) p1 ## n p2 ## n +# else +# define BOOST_PP_ENUM_BINARY_PARAMS_M_I(z, n, p1, p2) BOOST_PP_COMMA_IF(n) BOOST_PP_CAT(p1, n) BOOST_PP_CAT(p2, n) +# endif +# +# /* BOOST_PP_ENUM_BINARY_PARAMS_Z */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ENUM_BINARY_PARAMS_Z(z, count, p1, p2) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_BINARY_PARAMS_M, (p1, p2)) +# else +# define BOOST_PP_ENUM_BINARY_PARAMS_Z(z, count, p1, p2) BOOST_PP_ENUM_BINARY_PARAMS_Z_I(z, count, p1, p2) +# define BOOST_PP_ENUM_BINARY_PARAMS_Z_I(z, count, p1, p2) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_BINARY_PARAMS_M, (p1, p2)) +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/repetition/enum_params.hpp b/ThirdParty/boost-Subset/boost/preprocessor/repetition/enum_params.hpp new file mode 100644 index 0000000000..65a2369d4a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/repetition/enum_params.hpp @@ -0,0 +1,41 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_HPP +# define BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_HPP +# +# include +# include +# include +# +# /* BOOST_PP_ENUM_PARAMS */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ENUM_PARAMS(count, param) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_PARAMS_M, param) +# else +# define BOOST_PP_ENUM_PARAMS(count, param) BOOST_PP_ENUM_PARAMS_I(count, param) +# define BOOST_PP_ENUM_PARAMS_I(count, param) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_PARAMS_M, param) +# endif +# +# define BOOST_PP_ENUM_PARAMS_M(z, n, param) BOOST_PP_COMMA_IF(n) param ## n +# +# /* BOOST_PP_ENUM_PARAMS_Z */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ENUM_PARAMS_Z(z, count, param) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_PARAMS_M, param) +# else +# define BOOST_PP_ENUM_PARAMS_Z(z, count, param) BOOST_PP_ENUM_PARAMS_Z_I(z, count, param) +# define BOOST_PP_ENUM_PARAMS_Z_I(z, count, param) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_PARAMS_M, param) +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/repetition/enum_params_with_a_default.hpp b/ThirdParty/boost-Subset/boost/preprocessor/repetition/enum_params_with_a_default.hpp new file mode 100644 index 0000000000..7496df62f2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/repetition/enum_params_with_a_default.hpp @@ -0,0 +1,25 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_WITH_A_DEFAULT_HPP +# define BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_WITH_A_DEFAULT_HPP +# +# include +# include +# include +# +# /* BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT */ +# +# define BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(count, param, def) BOOST_PP_ENUM_BINARY_PARAMS(count, param, = def BOOST_PP_INTERCEPT) +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/repetition/enum_shifted_params.hpp b/ThirdParty/boost-Subset/boost/preprocessor/repetition/enum_shifted_params.hpp new file mode 100644 index 0000000000..88b2bf4c32 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/repetition/enum_shifted_params.hpp @@ -0,0 +1,44 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_SHIFTED_PARAMS_HPP +# define BOOST_PREPROCESSOR_REPETITION_ENUM_SHIFTED_PARAMS_HPP +# +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_ENUM_SHIFTED_PARAMS */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ENUM_SHIFTED_PARAMS(count, param) BOOST_PP_REPEAT(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) +# else +# define BOOST_PP_ENUM_SHIFTED_PARAMS(count, param) BOOST_PP_ENUM_SHIFTED_PARAMS_I(count, param) +# define BOOST_PP_ENUM_SHIFTED_PARAMS_I(count, param) BOOST_PP_REPEAT(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) +# endif +# +# define BOOST_PP_ENUM_SHIFTED_PARAMS_M(z, n, param) BOOST_PP_COMMA_IF(n) BOOST_PP_CAT(param, BOOST_PP_INC(n)) +# +# /* BOOST_PP_ENUM_SHIFTED_PARAMS_Z */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ENUM_SHIFTED_PARAMS_Z(z, count, param) BOOST_PP_REPEAT_ ## z(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) +# else +# define BOOST_PP_ENUM_SHIFTED_PARAMS_Z(z, count, param) BOOST_PP_ENUM_SHIFTED_PARAMS_Z_I(z, count, param) +# define BOOST_PP_ENUM_SHIFTED_PARAMS_Z_I(z, count, param) BOOST_PP_REPEAT_ ## z(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/repetition/enum_trailing.hpp b/ThirdParty/boost-Subset/boost/preprocessor/repetition/enum_trailing.hpp new file mode 100644 index 0000000000..20af2d54b0 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/repetition/enum_trailing.hpp @@ -0,0 +1,63 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_TRAILING_HPP +# define BOOST_PREPROCESSOR_REPETITION_ENUM_TRAILING_HPP +# +# include +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_ENUM_TRAILING */ +# +# if 0 +# define BOOST_PP_ENUM_TRAILING(count, macro, data) +# endif +# +# define BOOST_PP_ENUM_TRAILING BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4)) +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ENUM_TRAILING_1(c, m, d) BOOST_PP_REPEAT_1(c, BOOST_PP_ENUM_TRAILING_M_1, (m, d)) +# define BOOST_PP_ENUM_TRAILING_2(c, m, d) BOOST_PP_REPEAT_2(c, BOOST_PP_ENUM_TRAILING_M_2, (m, d)) +# define BOOST_PP_ENUM_TRAILING_3(c, m, d) BOOST_PP_REPEAT_3(c, BOOST_PP_ENUM_TRAILING_M_3, (m, d)) +# else +# define BOOST_PP_ENUM_TRAILING_1(c, m, d) BOOST_PP_ENUM_TRAILING_1_I(c, m, d) +# define BOOST_PP_ENUM_TRAILING_2(c, m, d) BOOST_PP_ENUM_TRAILING_2_I(c, m, d) +# define BOOST_PP_ENUM_TRAILING_3(c, m, d) BOOST_PP_ENUM_TRAILING_3_I(c, m, d) +# define BOOST_PP_ENUM_TRAILING_1_I(c, m, d) BOOST_PP_REPEAT_1(c, BOOST_PP_ENUM_TRAILING_M_1, (m, d)) +# define BOOST_PP_ENUM_TRAILING_2_I(c, m, d) BOOST_PP_REPEAT_2(c, BOOST_PP_ENUM_TRAILING_M_2, (m, d)) +# define BOOST_PP_ENUM_TRAILING_3_I(c, m, d) BOOST_PP_REPEAT_3(c, BOOST_PP_ENUM_TRAILING_M_3, (m, d)) +# endif +# +# define BOOST_PP_ENUM_TRAILING_4(c, m, d) BOOST_PP_ERROR(0x0003) +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() +# define BOOST_PP_ENUM_TRAILING_M_1(z, n, md) BOOST_PP_ENUM_TRAILING_M_1_IM(z, n, BOOST_PP_TUPLE_REM_2 md) +# define BOOST_PP_ENUM_TRAILING_M_2(z, n, md) BOOST_PP_ENUM_TRAILING_M_2_IM(z, n, BOOST_PP_TUPLE_REM_2 md) +# define BOOST_PP_ENUM_TRAILING_M_3(z, n, md) BOOST_PP_ENUM_TRAILING_M_3_IM(z, n, BOOST_PP_TUPLE_REM_2 md) +# define BOOST_PP_ENUM_TRAILING_M_1_IM(z, n, im) BOOST_PP_ENUM_TRAILING_M_1_I(z, n, im) +# define BOOST_PP_ENUM_TRAILING_M_2_IM(z, n, im) BOOST_PP_ENUM_TRAILING_M_2_I(z, n, im) +# define BOOST_PP_ENUM_TRAILING_M_3_IM(z, n, im) BOOST_PP_ENUM_TRAILING_M_3_I(z, n, im) +# else +# define BOOST_PP_ENUM_TRAILING_M_1(z, n, md) BOOST_PP_ENUM_TRAILING_M_1_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md)) +# define BOOST_PP_ENUM_TRAILING_M_2(z, n, md) BOOST_PP_ENUM_TRAILING_M_2_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md)) +# define BOOST_PP_ENUM_TRAILING_M_3(z, n, md) BOOST_PP_ENUM_TRAILING_M_3_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md)) +# endif +# +# define BOOST_PP_ENUM_TRAILING_M_1_I(z, n, m, d) , m(z, n, d) +# define BOOST_PP_ENUM_TRAILING_M_2_I(z, n, m, d) , m(z, n, d) +# define BOOST_PP_ENUM_TRAILING_M_3_I(z, n, m, d) , m(z, n, d) +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/repetition/enum_trailing_params.hpp b/ThirdParty/boost-Subset/boost/preprocessor/repetition/enum_trailing_params.hpp new file mode 100644 index 0000000000..f7520dbdef --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/repetition/enum_trailing_params.hpp @@ -0,0 +1,38 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_TRAILING_PARAMS_HPP +# define BOOST_PREPROCESSOR_REPETITION_ENUM_TRAILING_PARAMS_HPP +# +# include +# include +# +# /* BOOST_PP_ENUM_TRAILING_PARAMS */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ENUM_TRAILING_PARAMS(count, param) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_TRAILING_PARAMS_M, param) +# else +# define BOOST_PP_ENUM_TRAILING_PARAMS(count, param) BOOST_PP_ENUM_TRAILING_PARAMS_I(count, param) +# define BOOST_PP_ENUM_TRAILING_PARAMS_I(count, param) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_TRAILING_PARAMS_M, param) +# endif +# +# define BOOST_PP_ENUM_TRAILING_PARAMS_M(z, n, param) , param ## n +# +# /* BOOST_PP_ENUM_TRAILING_PARAMS_Z */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ENUM_TRAILING_PARAMS_Z(z, count, param) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_TRAILING_PARAMS_M, param) +# else +# define BOOST_PP_ENUM_TRAILING_PARAMS_Z(z, count, param) BOOST_PP_ENUM_TRAILING_PARAMS_Z_I(z, count, param) +# define BOOST_PP_ENUM_TRAILING_PARAMS_Z_I(z, count, param) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_TRAILING_PARAMS_M, param) +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/repetition/for.hpp b/ThirdParty/boost-Subset/boost/preprocessor/repetition/for.hpp new file mode 100644 index 0000000000..c38946bb55 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/repetition/for.hpp @@ -0,0 +1,324 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_FOR_HPP +# define BOOST_PREPROCESSOR_REPETITION_FOR_HPP +# +# include +# include +# include +# include +# include +# +# /* BOOST_PP_FOR */ +# +# if 0 +# define BOOST_PP_FOR(state, pred, op, macro) +# endif +# +# define BOOST_PP_FOR BOOST_PP_CAT(BOOST_PP_FOR_, BOOST_PP_AUTO_REC(BOOST_PP_FOR_P, 256)) +# +# define BOOST_PP_FOR_P(n) BOOST_PP_CAT(BOOST_PP_FOR_CHECK_, BOOST_PP_FOR_ ## n(1, BOOST_PP_FOR_SR_P, BOOST_PP_FOR_SR_O, BOOST_PP_FOR_SR_M)) +# +# define BOOST_PP_FOR_SR_P(r, s) s +# define BOOST_PP_FOR_SR_O(r, s) 0 +# define BOOST_PP_FOR_SR_M(r, s) BOOST_PP_NIL +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# include +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# include +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() +# include +# else +# include +# endif +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() +# define BOOST_PP_FOR_257_PR(s, p) BOOST_PP_BOOL(p##(257, s)) +# else +# define BOOST_PP_FOR_257_PR(s, p) BOOST_PP_BOOL(p(257, s)) +# endif + +# define BOOST_PP_FOR_257_ERROR() BOOST_PP_ERROR(0x0002) +# define BOOST_PP_FOR_257(s, p, o, m) \ + BOOST_PP_IIF \ + ( \ + BOOST_PP_FOR_257_PR(s,p), \ + BOOST_PP_FOR_257_ERROR, \ + BOOST_PP_EMPTY \ + ) \ + () \ +/**/ +// # define BOOST_PP_FOR_257(s, p, o, m) BOOST_PP_ERROR(0x0002) +# +# define BOOST_PP_FOR_CHECK_BOOST_PP_NIL 1 +# +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_1(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_2(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_3(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_4(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_5(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_6(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_7(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_8(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_9(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_10(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_11(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_12(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_13(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_14(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_15(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_16(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_17(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_18(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_19(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_20(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_21(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_22(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_23(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_24(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_25(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_26(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_27(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_28(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_29(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_30(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_31(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_32(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_33(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_34(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_35(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_36(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_37(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_38(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_39(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_40(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_41(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_42(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_43(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_44(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_45(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_46(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_47(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_48(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_49(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_50(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_51(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_52(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_53(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_54(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_55(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_56(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_57(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_58(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_59(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_60(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_61(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_62(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_63(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_64(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_65(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_66(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_67(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_68(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_69(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_70(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_71(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_72(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_73(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_74(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_75(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_76(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_77(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_78(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_79(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_80(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_81(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_82(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_83(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_84(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_85(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_86(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_87(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_88(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_89(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_90(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_91(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_92(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_93(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_94(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_95(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_96(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_97(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_98(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_99(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_100(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_101(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_102(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_103(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_104(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_105(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_106(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_107(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_108(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_109(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_110(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_111(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_112(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_113(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_114(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_115(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_116(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_117(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_118(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_119(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_120(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_121(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_122(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_123(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_124(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_125(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_126(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_127(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_128(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_129(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_130(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_131(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_132(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_133(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_134(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_135(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_136(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_137(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_138(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_139(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_140(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_141(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_142(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_143(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_144(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_145(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_146(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_147(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_148(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_149(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_150(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_151(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_152(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_153(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_154(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_155(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_156(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_157(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_158(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_159(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_160(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_161(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_162(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_163(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_164(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_165(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_166(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_167(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_168(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_169(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_170(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_171(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_172(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_173(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_174(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_175(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_176(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_177(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_178(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_179(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_180(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_181(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_182(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_183(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_184(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_185(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_186(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_187(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_188(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_189(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_190(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_191(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_192(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_193(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_194(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_195(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_196(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_197(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_198(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_199(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_200(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_201(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_202(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_203(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_204(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_205(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_206(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_207(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_208(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_209(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_210(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_211(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_212(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_213(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_214(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_215(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_216(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_217(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_218(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_219(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_220(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_221(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_222(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_223(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_224(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_225(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_226(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_227(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_228(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_229(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_230(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_231(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_232(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_233(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_234(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_235(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_236(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_237(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_238(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_239(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_240(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_241(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_242(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_243(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_244(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_245(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_246(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_247(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_248(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_249(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_250(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_251(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_252(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_253(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_254(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_255(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_256(s, p, o, m) 0 +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/repetition/repeat.hpp b/ThirdParty/boost-Subset/boost/preprocessor/repetition/repeat.hpp new file mode 100644 index 0000000000..0172738e0c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/repetition/repeat.hpp @@ -0,0 +1,825 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_REPEAT_HPP +# define BOOST_PREPROCESSOR_REPETITION_REPEAT_HPP +# +# include +# include +# include +# include +# include +# +# /* BOOST_PP_REPEAT */ +# +# if 0 +# define BOOST_PP_REPEAT(count, macro, data) +# endif +# +# define BOOST_PP_REPEAT BOOST_PP_CAT(BOOST_PP_REPEAT_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4)) +# +# define BOOST_PP_REPEAT_P(n) BOOST_PP_CAT(BOOST_PP_REPEAT_CHECK_, BOOST_PP_REPEAT_ ## n(1, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3, BOOST_PP_NIL)) +# +# define BOOST_PP_REPEAT_CHECK_BOOST_PP_NIL 1 +# define BOOST_PP_REPEAT_CHECK_BOOST_PP_REPEAT_1(c, m, d) 0 +# define BOOST_PP_REPEAT_CHECK_BOOST_PP_REPEAT_2(c, m, d) 0 +# define BOOST_PP_REPEAT_CHECK_BOOST_PP_REPEAT_3(c, m, d) 0 +# +# define BOOST_PP_REPEAT_1(c, m, d) BOOST_PP_REPEAT_1_I(c, m, d) +# define BOOST_PP_REPEAT_2(c, m, d) BOOST_PP_REPEAT_2_I(c, m, d) +# define BOOST_PP_REPEAT_3(c, m, d) BOOST_PP_REPEAT_3_I(c, m, d) +# define BOOST_PP_REPEAT_4(c, m, d) BOOST_PP_ERROR(0x0003) +# +# define BOOST_PP_REPEAT_1_I(c, m, d) BOOST_PP_REPEAT_1_ ## c(m, d) +# define BOOST_PP_REPEAT_2_I(c, m, d) BOOST_PP_REPEAT_2_ ## c(m, d) +# define BOOST_PP_REPEAT_3_I(c, m, d) BOOST_PP_REPEAT_3_ ## c(m, d) +# +# define BOOST_PP_REPEAT_1ST BOOST_PP_REPEAT_1 +# define BOOST_PP_REPEAT_2ND BOOST_PP_REPEAT_2 +# define BOOST_PP_REPEAT_3RD BOOST_PP_REPEAT_3 +# +# define BOOST_PP_REPEAT_1_0(m, d) +# define BOOST_PP_REPEAT_1_1(m, d) m(2, 0, d) +# define BOOST_PP_REPEAT_1_2(m, d) BOOST_PP_REPEAT_1_1(m, d) m(2, 1, d) +# define BOOST_PP_REPEAT_1_3(m, d) BOOST_PP_REPEAT_1_2(m, d) m(2, 2, d) +# define BOOST_PP_REPEAT_1_4(m, d) BOOST_PP_REPEAT_1_3(m, d) m(2, 3, d) +# define BOOST_PP_REPEAT_1_5(m, d) BOOST_PP_REPEAT_1_4(m, d) m(2, 4, d) +# define BOOST_PP_REPEAT_1_6(m, d) BOOST_PP_REPEAT_1_5(m, d) m(2, 5, d) +# define BOOST_PP_REPEAT_1_7(m, d) BOOST_PP_REPEAT_1_6(m, d) m(2, 6, d) +# define BOOST_PP_REPEAT_1_8(m, d) BOOST_PP_REPEAT_1_7(m, d) m(2, 7, d) +# define BOOST_PP_REPEAT_1_9(m, d) BOOST_PP_REPEAT_1_8(m, d) m(2, 8, d) +# define BOOST_PP_REPEAT_1_10(m, d) BOOST_PP_REPEAT_1_9(m, d) m(2, 9, d) +# define BOOST_PP_REPEAT_1_11(m, d) BOOST_PP_REPEAT_1_10(m, d) m(2, 10, d) +# define BOOST_PP_REPEAT_1_12(m, d) BOOST_PP_REPEAT_1_11(m, d) m(2, 11, d) +# define BOOST_PP_REPEAT_1_13(m, d) BOOST_PP_REPEAT_1_12(m, d) m(2, 12, d) +# define BOOST_PP_REPEAT_1_14(m, d) BOOST_PP_REPEAT_1_13(m, d) m(2, 13, d) +# define BOOST_PP_REPEAT_1_15(m, d) BOOST_PP_REPEAT_1_14(m, d) m(2, 14, d) +# define BOOST_PP_REPEAT_1_16(m, d) BOOST_PP_REPEAT_1_15(m, d) m(2, 15, d) +# define BOOST_PP_REPEAT_1_17(m, d) BOOST_PP_REPEAT_1_16(m, d) m(2, 16, d) +# define BOOST_PP_REPEAT_1_18(m, d) BOOST_PP_REPEAT_1_17(m, d) m(2, 17, d) +# define BOOST_PP_REPEAT_1_19(m, d) BOOST_PP_REPEAT_1_18(m, d) m(2, 18, d) +# define BOOST_PP_REPEAT_1_20(m, d) BOOST_PP_REPEAT_1_19(m, d) m(2, 19, d) +# define BOOST_PP_REPEAT_1_21(m, d) BOOST_PP_REPEAT_1_20(m, d) m(2, 20, d) +# define BOOST_PP_REPEAT_1_22(m, d) BOOST_PP_REPEAT_1_21(m, d) m(2, 21, d) +# define BOOST_PP_REPEAT_1_23(m, d) BOOST_PP_REPEAT_1_22(m, d) m(2, 22, d) +# define BOOST_PP_REPEAT_1_24(m, d) BOOST_PP_REPEAT_1_23(m, d) m(2, 23, d) +# define BOOST_PP_REPEAT_1_25(m, d) BOOST_PP_REPEAT_1_24(m, d) m(2, 24, d) +# define BOOST_PP_REPEAT_1_26(m, d) BOOST_PP_REPEAT_1_25(m, d) m(2, 25, d) +# define BOOST_PP_REPEAT_1_27(m, d) BOOST_PP_REPEAT_1_26(m, d) m(2, 26, d) +# define BOOST_PP_REPEAT_1_28(m, d) BOOST_PP_REPEAT_1_27(m, d) m(2, 27, d) +# define BOOST_PP_REPEAT_1_29(m, d) BOOST_PP_REPEAT_1_28(m, d) m(2, 28, d) +# define BOOST_PP_REPEAT_1_30(m, d) BOOST_PP_REPEAT_1_29(m, d) m(2, 29, d) +# define BOOST_PP_REPEAT_1_31(m, d) BOOST_PP_REPEAT_1_30(m, d) m(2, 30, d) +# define BOOST_PP_REPEAT_1_32(m, d) BOOST_PP_REPEAT_1_31(m, d) m(2, 31, d) +# define BOOST_PP_REPEAT_1_33(m, d) BOOST_PP_REPEAT_1_32(m, d) m(2, 32, d) +# define BOOST_PP_REPEAT_1_34(m, d) BOOST_PP_REPEAT_1_33(m, d) m(2, 33, d) +# define BOOST_PP_REPEAT_1_35(m, d) BOOST_PP_REPEAT_1_34(m, d) m(2, 34, d) +# define BOOST_PP_REPEAT_1_36(m, d) BOOST_PP_REPEAT_1_35(m, d) m(2, 35, d) +# define BOOST_PP_REPEAT_1_37(m, d) BOOST_PP_REPEAT_1_36(m, d) m(2, 36, d) +# define BOOST_PP_REPEAT_1_38(m, d) BOOST_PP_REPEAT_1_37(m, d) m(2, 37, d) +# define BOOST_PP_REPEAT_1_39(m, d) BOOST_PP_REPEAT_1_38(m, d) m(2, 38, d) +# define BOOST_PP_REPEAT_1_40(m, d) BOOST_PP_REPEAT_1_39(m, d) m(2, 39, d) +# define BOOST_PP_REPEAT_1_41(m, d) BOOST_PP_REPEAT_1_40(m, d) m(2, 40, d) +# define BOOST_PP_REPEAT_1_42(m, d) BOOST_PP_REPEAT_1_41(m, d) m(2, 41, d) +# define BOOST_PP_REPEAT_1_43(m, d) BOOST_PP_REPEAT_1_42(m, d) m(2, 42, d) +# define BOOST_PP_REPEAT_1_44(m, d) BOOST_PP_REPEAT_1_43(m, d) m(2, 43, d) +# define BOOST_PP_REPEAT_1_45(m, d) BOOST_PP_REPEAT_1_44(m, d) m(2, 44, d) +# define BOOST_PP_REPEAT_1_46(m, d) BOOST_PP_REPEAT_1_45(m, d) m(2, 45, d) +# define BOOST_PP_REPEAT_1_47(m, d) BOOST_PP_REPEAT_1_46(m, d) m(2, 46, d) +# define BOOST_PP_REPEAT_1_48(m, d) BOOST_PP_REPEAT_1_47(m, d) m(2, 47, d) +# define BOOST_PP_REPEAT_1_49(m, d) BOOST_PP_REPEAT_1_48(m, d) m(2, 48, d) +# define BOOST_PP_REPEAT_1_50(m, d) BOOST_PP_REPEAT_1_49(m, d) m(2, 49, d) +# define BOOST_PP_REPEAT_1_51(m, d) BOOST_PP_REPEAT_1_50(m, d) m(2, 50, d) +# define BOOST_PP_REPEAT_1_52(m, d) BOOST_PP_REPEAT_1_51(m, d) m(2, 51, d) +# define BOOST_PP_REPEAT_1_53(m, d) BOOST_PP_REPEAT_1_52(m, d) m(2, 52, d) +# define BOOST_PP_REPEAT_1_54(m, d) BOOST_PP_REPEAT_1_53(m, d) m(2, 53, d) +# define BOOST_PP_REPEAT_1_55(m, d) BOOST_PP_REPEAT_1_54(m, d) m(2, 54, d) +# define BOOST_PP_REPEAT_1_56(m, d) BOOST_PP_REPEAT_1_55(m, d) m(2, 55, d) +# define BOOST_PP_REPEAT_1_57(m, d) BOOST_PP_REPEAT_1_56(m, d) m(2, 56, d) +# define BOOST_PP_REPEAT_1_58(m, d) BOOST_PP_REPEAT_1_57(m, d) m(2, 57, d) +# define BOOST_PP_REPEAT_1_59(m, d) BOOST_PP_REPEAT_1_58(m, d) m(2, 58, d) +# define BOOST_PP_REPEAT_1_60(m, d) BOOST_PP_REPEAT_1_59(m, d) m(2, 59, d) +# define BOOST_PP_REPEAT_1_61(m, d) BOOST_PP_REPEAT_1_60(m, d) m(2, 60, d) +# define BOOST_PP_REPEAT_1_62(m, d) BOOST_PP_REPEAT_1_61(m, d) m(2, 61, d) +# define BOOST_PP_REPEAT_1_63(m, d) BOOST_PP_REPEAT_1_62(m, d) m(2, 62, d) +# define BOOST_PP_REPEAT_1_64(m, d) BOOST_PP_REPEAT_1_63(m, d) m(2, 63, d) +# define BOOST_PP_REPEAT_1_65(m, d) BOOST_PP_REPEAT_1_64(m, d) m(2, 64, d) +# define BOOST_PP_REPEAT_1_66(m, d) BOOST_PP_REPEAT_1_65(m, d) m(2, 65, d) +# define BOOST_PP_REPEAT_1_67(m, d) BOOST_PP_REPEAT_1_66(m, d) m(2, 66, d) +# define BOOST_PP_REPEAT_1_68(m, d) BOOST_PP_REPEAT_1_67(m, d) m(2, 67, d) +# define BOOST_PP_REPEAT_1_69(m, d) BOOST_PP_REPEAT_1_68(m, d) m(2, 68, d) +# define BOOST_PP_REPEAT_1_70(m, d) BOOST_PP_REPEAT_1_69(m, d) m(2, 69, d) +# define BOOST_PP_REPEAT_1_71(m, d) BOOST_PP_REPEAT_1_70(m, d) m(2, 70, d) +# define BOOST_PP_REPEAT_1_72(m, d) BOOST_PP_REPEAT_1_71(m, d) m(2, 71, d) +# define BOOST_PP_REPEAT_1_73(m, d) BOOST_PP_REPEAT_1_72(m, d) m(2, 72, d) +# define BOOST_PP_REPEAT_1_74(m, d) BOOST_PP_REPEAT_1_73(m, d) m(2, 73, d) +# define BOOST_PP_REPEAT_1_75(m, d) BOOST_PP_REPEAT_1_74(m, d) m(2, 74, d) +# define BOOST_PP_REPEAT_1_76(m, d) BOOST_PP_REPEAT_1_75(m, d) m(2, 75, d) +# define BOOST_PP_REPEAT_1_77(m, d) BOOST_PP_REPEAT_1_76(m, d) m(2, 76, d) +# define BOOST_PP_REPEAT_1_78(m, d) BOOST_PP_REPEAT_1_77(m, d) m(2, 77, d) +# define BOOST_PP_REPEAT_1_79(m, d) BOOST_PP_REPEAT_1_78(m, d) m(2, 78, d) +# define BOOST_PP_REPEAT_1_80(m, d) BOOST_PP_REPEAT_1_79(m, d) m(2, 79, d) +# define BOOST_PP_REPEAT_1_81(m, d) BOOST_PP_REPEAT_1_80(m, d) m(2, 80, d) +# define BOOST_PP_REPEAT_1_82(m, d) BOOST_PP_REPEAT_1_81(m, d) m(2, 81, d) +# define BOOST_PP_REPEAT_1_83(m, d) BOOST_PP_REPEAT_1_82(m, d) m(2, 82, d) +# define BOOST_PP_REPEAT_1_84(m, d) BOOST_PP_REPEAT_1_83(m, d) m(2, 83, d) +# define BOOST_PP_REPEAT_1_85(m, d) BOOST_PP_REPEAT_1_84(m, d) m(2, 84, d) +# define BOOST_PP_REPEAT_1_86(m, d) BOOST_PP_REPEAT_1_85(m, d) m(2, 85, d) +# define BOOST_PP_REPEAT_1_87(m, d) BOOST_PP_REPEAT_1_86(m, d) m(2, 86, d) +# define BOOST_PP_REPEAT_1_88(m, d) BOOST_PP_REPEAT_1_87(m, d) m(2, 87, d) +# define BOOST_PP_REPEAT_1_89(m, d) BOOST_PP_REPEAT_1_88(m, d) m(2, 88, d) +# define BOOST_PP_REPEAT_1_90(m, d) BOOST_PP_REPEAT_1_89(m, d) m(2, 89, d) +# define BOOST_PP_REPEAT_1_91(m, d) BOOST_PP_REPEAT_1_90(m, d) m(2, 90, d) +# define BOOST_PP_REPEAT_1_92(m, d) BOOST_PP_REPEAT_1_91(m, d) m(2, 91, d) +# define BOOST_PP_REPEAT_1_93(m, d) BOOST_PP_REPEAT_1_92(m, d) m(2, 92, d) +# define BOOST_PP_REPEAT_1_94(m, d) BOOST_PP_REPEAT_1_93(m, d) m(2, 93, d) +# define BOOST_PP_REPEAT_1_95(m, d) BOOST_PP_REPEAT_1_94(m, d) m(2, 94, d) +# define BOOST_PP_REPEAT_1_96(m, d) BOOST_PP_REPEAT_1_95(m, d) m(2, 95, d) +# define BOOST_PP_REPEAT_1_97(m, d) BOOST_PP_REPEAT_1_96(m, d) m(2, 96, d) +# define BOOST_PP_REPEAT_1_98(m, d) BOOST_PP_REPEAT_1_97(m, d) m(2, 97, d) +# define BOOST_PP_REPEAT_1_99(m, d) BOOST_PP_REPEAT_1_98(m, d) m(2, 98, d) +# define BOOST_PP_REPEAT_1_100(m, d) BOOST_PP_REPEAT_1_99(m, d) m(2, 99, d) +# define BOOST_PP_REPEAT_1_101(m, d) BOOST_PP_REPEAT_1_100(m, d) m(2, 100, d) +# define BOOST_PP_REPEAT_1_102(m, d) BOOST_PP_REPEAT_1_101(m, d) m(2, 101, d) +# define BOOST_PP_REPEAT_1_103(m, d) BOOST_PP_REPEAT_1_102(m, d) m(2, 102, d) +# define BOOST_PP_REPEAT_1_104(m, d) BOOST_PP_REPEAT_1_103(m, d) m(2, 103, d) +# define BOOST_PP_REPEAT_1_105(m, d) BOOST_PP_REPEAT_1_104(m, d) m(2, 104, d) +# define BOOST_PP_REPEAT_1_106(m, d) BOOST_PP_REPEAT_1_105(m, d) m(2, 105, d) +# define BOOST_PP_REPEAT_1_107(m, d) BOOST_PP_REPEAT_1_106(m, d) m(2, 106, d) +# define BOOST_PP_REPEAT_1_108(m, d) BOOST_PP_REPEAT_1_107(m, d) m(2, 107, d) +# define BOOST_PP_REPEAT_1_109(m, d) BOOST_PP_REPEAT_1_108(m, d) m(2, 108, d) +# define BOOST_PP_REPEAT_1_110(m, d) BOOST_PP_REPEAT_1_109(m, d) m(2, 109, d) +# define BOOST_PP_REPEAT_1_111(m, d) BOOST_PP_REPEAT_1_110(m, d) m(2, 110, d) +# define BOOST_PP_REPEAT_1_112(m, d) BOOST_PP_REPEAT_1_111(m, d) m(2, 111, d) +# define BOOST_PP_REPEAT_1_113(m, d) BOOST_PP_REPEAT_1_112(m, d) m(2, 112, d) +# define BOOST_PP_REPEAT_1_114(m, d) BOOST_PP_REPEAT_1_113(m, d) m(2, 113, d) +# define BOOST_PP_REPEAT_1_115(m, d) BOOST_PP_REPEAT_1_114(m, d) m(2, 114, d) +# define BOOST_PP_REPEAT_1_116(m, d) BOOST_PP_REPEAT_1_115(m, d) m(2, 115, d) +# define BOOST_PP_REPEAT_1_117(m, d) BOOST_PP_REPEAT_1_116(m, d) m(2, 116, d) +# define BOOST_PP_REPEAT_1_118(m, d) BOOST_PP_REPEAT_1_117(m, d) m(2, 117, d) +# define BOOST_PP_REPEAT_1_119(m, d) BOOST_PP_REPEAT_1_118(m, d) m(2, 118, d) +# define BOOST_PP_REPEAT_1_120(m, d) BOOST_PP_REPEAT_1_119(m, d) m(2, 119, d) +# define BOOST_PP_REPEAT_1_121(m, d) BOOST_PP_REPEAT_1_120(m, d) m(2, 120, d) +# define BOOST_PP_REPEAT_1_122(m, d) BOOST_PP_REPEAT_1_121(m, d) m(2, 121, d) +# define BOOST_PP_REPEAT_1_123(m, d) BOOST_PP_REPEAT_1_122(m, d) m(2, 122, d) +# define BOOST_PP_REPEAT_1_124(m, d) BOOST_PP_REPEAT_1_123(m, d) m(2, 123, d) +# define BOOST_PP_REPEAT_1_125(m, d) BOOST_PP_REPEAT_1_124(m, d) m(2, 124, d) +# define BOOST_PP_REPEAT_1_126(m, d) BOOST_PP_REPEAT_1_125(m, d) m(2, 125, d) +# define BOOST_PP_REPEAT_1_127(m, d) BOOST_PP_REPEAT_1_126(m, d) m(2, 126, d) +# define BOOST_PP_REPEAT_1_128(m, d) BOOST_PP_REPEAT_1_127(m, d) m(2, 127, d) +# define BOOST_PP_REPEAT_1_129(m, d) BOOST_PP_REPEAT_1_128(m, d) m(2, 128, d) +# define BOOST_PP_REPEAT_1_130(m, d) BOOST_PP_REPEAT_1_129(m, d) m(2, 129, d) +# define BOOST_PP_REPEAT_1_131(m, d) BOOST_PP_REPEAT_1_130(m, d) m(2, 130, d) +# define BOOST_PP_REPEAT_1_132(m, d) BOOST_PP_REPEAT_1_131(m, d) m(2, 131, d) +# define BOOST_PP_REPEAT_1_133(m, d) BOOST_PP_REPEAT_1_132(m, d) m(2, 132, d) +# define BOOST_PP_REPEAT_1_134(m, d) BOOST_PP_REPEAT_1_133(m, d) m(2, 133, d) +# define BOOST_PP_REPEAT_1_135(m, d) BOOST_PP_REPEAT_1_134(m, d) m(2, 134, d) +# define BOOST_PP_REPEAT_1_136(m, d) BOOST_PP_REPEAT_1_135(m, d) m(2, 135, d) +# define BOOST_PP_REPEAT_1_137(m, d) BOOST_PP_REPEAT_1_136(m, d) m(2, 136, d) +# define BOOST_PP_REPEAT_1_138(m, d) BOOST_PP_REPEAT_1_137(m, d) m(2, 137, d) +# define BOOST_PP_REPEAT_1_139(m, d) BOOST_PP_REPEAT_1_138(m, d) m(2, 138, d) +# define BOOST_PP_REPEAT_1_140(m, d) BOOST_PP_REPEAT_1_139(m, d) m(2, 139, d) +# define BOOST_PP_REPEAT_1_141(m, d) BOOST_PP_REPEAT_1_140(m, d) m(2, 140, d) +# define BOOST_PP_REPEAT_1_142(m, d) BOOST_PP_REPEAT_1_141(m, d) m(2, 141, d) +# define BOOST_PP_REPEAT_1_143(m, d) BOOST_PP_REPEAT_1_142(m, d) m(2, 142, d) +# define BOOST_PP_REPEAT_1_144(m, d) BOOST_PP_REPEAT_1_143(m, d) m(2, 143, d) +# define BOOST_PP_REPEAT_1_145(m, d) BOOST_PP_REPEAT_1_144(m, d) m(2, 144, d) +# define BOOST_PP_REPEAT_1_146(m, d) BOOST_PP_REPEAT_1_145(m, d) m(2, 145, d) +# define BOOST_PP_REPEAT_1_147(m, d) BOOST_PP_REPEAT_1_146(m, d) m(2, 146, d) +# define BOOST_PP_REPEAT_1_148(m, d) BOOST_PP_REPEAT_1_147(m, d) m(2, 147, d) +# define BOOST_PP_REPEAT_1_149(m, d) BOOST_PP_REPEAT_1_148(m, d) m(2, 148, d) +# define BOOST_PP_REPEAT_1_150(m, d) BOOST_PP_REPEAT_1_149(m, d) m(2, 149, d) +# define BOOST_PP_REPEAT_1_151(m, d) BOOST_PP_REPEAT_1_150(m, d) m(2, 150, d) +# define BOOST_PP_REPEAT_1_152(m, d) BOOST_PP_REPEAT_1_151(m, d) m(2, 151, d) +# define BOOST_PP_REPEAT_1_153(m, d) BOOST_PP_REPEAT_1_152(m, d) m(2, 152, d) +# define BOOST_PP_REPEAT_1_154(m, d) BOOST_PP_REPEAT_1_153(m, d) m(2, 153, d) +# define BOOST_PP_REPEAT_1_155(m, d) BOOST_PP_REPEAT_1_154(m, d) m(2, 154, d) +# define BOOST_PP_REPEAT_1_156(m, d) BOOST_PP_REPEAT_1_155(m, d) m(2, 155, d) +# define BOOST_PP_REPEAT_1_157(m, d) BOOST_PP_REPEAT_1_156(m, d) m(2, 156, d) +# define BOOST_PP_REPEAT_1_158(m, d) BOOST_PP_REPEAT_1_157(m, d) m(2, 157, d) +# define BOOST_PP_REPEAT_1_159(m, d) BOOST_PP_REPEAT_1_158(m, d) m(2, 158, d) +# define BOOST_PP_REPEAT_1_160(m, d) BOOST_PP_REPEAT_1_159(m, d) m(2, 159, d) +# define BOOST_PP_REPEAT_1_161(m, d) BOOST_PP_REPEAT_1_160(m, d) m(2, 160, d) +# define BOOST_PP_REPEAT_1_162(m, d) BOOST_PP_REPEAT_1_161(m, d) m(2, 161, d) +# define BOOST_PP_REPEAT_1_163(m, d) BOOST_PP_REPEAT_1_162(m, d) m(2, 162, d) +# define BOOST_PP_REPEAT_1_164(m, d) BOOST_PP_REPEAT_1_163(m, d) m(2, 163, d) +# define BOOST_PP_REPEAT_1_165(m, d) BOOST_PP_REPEAT_1_164(m, d) m(2, 164, d) +# define BOOST_PP_REPEAT_1_166(m, d) BOOST_PP_REPEAT_1_165(m, d) m(2, 165, d) +# define BOOST_PP_REPEAT_1_167(m, d) BOOST_PP_REPEAT_1_166(m, d) m(2, 166, d) +# define BOOST_PP_REPEAT_1_168(m, d) BOOST_PP_REPEAT_1_167(m, d) m(2, 167, d) +# define BOOST_PP_REPEAT_1_169(m, d) BOOST_PP_REPEAT_1_168(m, d) m(2, 168, d) +# define BOOST_PP_REPEAT_1_170(m, d) BOOST_PP_REPEAT_1_169(m, d) m(2, 169, d) +# define BOOST_PP_REPEAT_1_171(m, d) BOOST_PP_REPEAT_1_170(m, d) m(2, 170, d) +# define BOOST_PP_REPEAT_1_172(m, d) BOOST_PP_REPEAT_1_171(m, d) m(2, 171, d) +# define BOOST_PP_REPEAT_1_173(m, d) BOOST_PP_REPEAT_1_172(m, d) m(2, 172, d) +# define BOOST_PP_REPEAT_1_174(m, d) BOOST_PP_REPEAT_1_173(m, d) m(2, 173, d) +# define BOOST_PP_REPEAT_1_175(m, d) BOOST_PP_REPEAT_1_174(m, d) m(2, 174, d) +# define BOOST_PP_REPEAT_1_176(m, d) BOOST_PP_REPEAT_1_175(m, d) m(2, 175, d) +# define BOOST_PP_REPEAT_1_177(m, d) BOOST_PP_REPEAT_1_176(m, d) m(2, 176, d) +# define BOOST_PP_REPEAT_1_178(m, d) BOOST_PP_REPEAT_1_177(m, d) m(2, 177, d) +# define BOOST_PP_REPEAT_1_179(m, d) BOOST_PP_REPEAT_1_178(m, d) m(2, 178, d) +# define BOOST_PP_REPEAT_1_180(m, d) BOOST_PP_REPEAT_1_179(m, d) m(2, 179, d) +# define BOOST_PP_REPEAT_1_181(m, d) BOOST_PP_REPEAT_1_180(m, d) m(2, 180, d) +# define BOOST_PP_REPEAT_1_182(m, d) BOOST_PP_REPEAT_1_181(m, d) m(2, 181, d) +# define BOOST_PP_REPEAT_1_183(m, d) BOOST_PP_REPEAT_1_182(m, d) m(2, 182, d) +# define BOOST_PP_REPEAT_1_184(m, d) BOOST_PP_REPEAT_1_183(m, d) m(2, 183, d) +# define BOOST_PP_REPEAT_1_185(m, d) BOOST_PP_REPEAT_1_184(m, d) m(2, 184, d) +# define BOOST_PP_REPEAT_1_186(m, d) BOOST_PP_REPEAT_1_185(m, d) m(2, 185, d) +# define BOOST_PP_REPEAT_1_187(m, d) BOOST_PP_REPEAT_1_186(m, d) m(2, 186, d) +# define BOOST_PP_REPEAT_1_188(m, d) BOOST_PP_REPEAT_1_187(m, d) m(2, 187, d) +# define BOOST_PP_REPEAT_1_189(m, d) BOOST_PP_REPEAT_1_188(m, d) m(2, 188, d) +# define BOOST_PP_REPEAT_1_190(m, d) BOOST_PP_REPEAT_1_189(m, d) m(2, 189, d) +# define BOOST_PP_REPEAT_1_191(m, d) BOOST_PP_REPEAT_1_190(m, d) m(2, 190, d) +# define BOOST_PP_REPEAT_1_192(m, d) BOOST_PP_REPEAT_1_191(m, d) m(2, 191, d) +# define BOOST_PP_REPEAT_1_193(m, d) BOOST_PP_REPEAT_1_192(m, d) m(2, 192, d) +# define BOOST_PP_REPEAT_1_194(m, d) BOOST_PP_REPEAT_1_193(m, d) m(2, 193, d) +# define BOOST_PP_REPEAT_1_195(m, d) BOOST_PP_REPEAT_1_194(m, d) m(2, 194, d) +# define BOOST_PP_REPEAT_1_196(m, d) BOOST_PP_REPEAT_1_195(m, d) m(2, 195, d) +# define BOOST_PP_REPEAT_1_197(m, d) BOOST_PP_REPEAT_1_196(m, d) m(2, 196, d) +# define BOOST_PP_REPEAT_1_198(m, d) BOOST_PP_REPEAT_1_197(m, d) m(2, 197, d) +# define BOOST_PP_REPEAT_1_199(m, d) BOOST_PP_REPEAT_1_198(m, d) m(2, 198, d) +# define BOOST_PP_REPEAT_1_200(m, d) BOOST_PP_REPEAT_1_199(m, d) m(2, 199, d) +# define BOOST_PP_REPEAT_1_201(m, d) BOOST_PP_REPEAT_1_200(m, d) m(2, 200, d) +# define BOOST_PP_REPEAT_1_202(m, d) BOOST_PP_REPEAT_1_201(m, d) m(2, 201, d) +# define BOOST_PP_REPEAT_1_203(m, d) BOOST_PP_REPEAT_1_202(m, d) m(2, 202, d) +# define BOOST_PP_REPEAT_1_204(m, d) BOOST_PP_REPEAT_1_203(m, d) m(2, 203, d) +# define BOOST_PP_REPEAT_1_205(m, d) BOOST_PP_REPEAT_1_204(m, d) m(2, 204, d) +# define BOOST_PP_REPEAT_1_206(m, d) BOOST_PP_REPEAT_1_205(m, d) m(2, 205, d) +# define BOOST_PP_REPEAT_1_207(m, d) BOOST_PP_REPEAT_1_206(m, d) m(2, 206, d) +# define BOOST_PP_REPEAT_1_208(m, d) BOOST_PP_REPEAT_1_207(m, d) m(2, 207, d) +# define BOOST_PP_REPEAT_1_209(m, d) BOOST_PP_REPEAT_1_208(m, d) m(2, 208, d) +# define BOOST_PP_REPEAT_1_210(m, d) BOOST_PP_REPEAT_1_209(m, d) m(2, 209, d) +# define BOOST_PP_REPEAT_1_211(m, d) BOOST_PP_REPEAT_1_210(m, d) m(2, 210, d) +# define BOOST_PP_REPEAT_1_212(m, d) BOOST_PP_REPEAT_1_211(m, d) m(2, 211, d) +# define BOOST_PP_REPEAT_1_213(m, d) BOOST_PP_REPEAT_1_212(m, d) m(2, 212, d) +# define BOOST_PP_REPEAT_1_214(m, d) BOOST_PP_REPEAT_1_213(m, d) m(2, 213, d) +# define BOOST_PP_REPEAT_1_215(m, d) BOOST_PP_REPEAT_1_214(m, d) m(2, 214, d) +# define BOOST_PP_REPEAT_1_216(m, d) BOOST_PP_REPEAT_1_215(m, d) m(2, 215, d) +# define BOOST_PP_REPEAT_1_217(m, d) BOOST_PP_REPEAT_1_216(m, d) m(2, 216, d) +# define BOOST_PP_REPEAT_1_218(m, d) BOOST_PP_REPEAT_1_217(m, d) m(2, 217, d) +# define BOOST_PP_REPEAT_1_219(m, d) BOOST_PP_REPEAT_1_218(m, d) m(2, 218, d) +# define BOOST_PP_REPEAT_1_220(m, d) BOOST_PP_REPEAT_1_219(m, d) m(2, 219, d) +# define BOOST_PP_REPEAT_1_221(m, d) BOOST_PP_REPEAT_1_220(m, d) m(2, 220, d) +# define BOOST_PP_REPEAT_1_222(m, d) BOOST_PP_REPEAT_1_221(m, d) m(2, 221, d) +# define BOOST_PP_REPEAT_1_223(m, d) BOOST_PP_REPEAT_1_222(m, d) m(2, 222, d) +# define BOOST_PP_REPEAT_1_224(m, d) BOOST_PP_REPEAT_1_223(m, d) m(2, 223, d) +# define BOOST_PP_REPEAT_1_225(m, d) BOOST_PP_REPEAT_1_224(m, d) m(2, 224, d) +# define BOOST_PP_REPEAT_1_226(m, d) BOOST_PP_REPEAT_1_225(m, d) m(2, 225, d) +# define BOOST_PP_REPEAT_1_227(m, d) BOOST_PP_REPEAT_1_226(m, d) m(2, 226, d) +# define BOOST_PP_REPEAT_1_228(m, d) BOOST_PP_REPEAT_1_227(m, d) m(2, 227, d) +# define BOOST_PP_REPEAT_1_229(m, d) BOOST_PP_REPEAT_1_228(m, d) m(2, 228, d) +# define BOOST_PP_REPEAT_1_230(m, d) BOOST_PP_REPEAT_1_229(m, d) m(2, 229, d) +# define BOOST_PP_REPEAT_1_231(m, d) BOOST_PP_REPEAT_1_230(m, d) m(2, 230, d) +# define BOOST_PP_REPEAT_1_232(m, d) BOOST_PP_REPEAT_1_231(m, d) m(2, 231, d) +# define BOOST_PP_REPEAT_1_233(m, d) BOOST_PP_REPEAT_1_232(m, d) m(2, 232, d) +# define BOOST_PP_REPEAT_1_234(m, d) BOOST_PP_REPEAT_1_233(m, d) m(2, 233, d) +# define BOOST_PP_REPEAT_1_235(m, d) BOOST_PP_REPEAT_1_234(m, d) m(2, 234, d) +# define BOOST_PP_REPEAT_1_236(m, d) BOOST_PP_REPEAT_1_235(m, d) m(2, 235, d) +# define BOOST_PP_REPEAT_1_237(m, d) BOOST_PP_REPEAT_1_236(m, d) m(2, 236, d) +# define BOOST_PP_REPEAT_1_238(m, d) BOOST_PP_REPEAT_1_237(m, d) m(2, 237, d) +# define BOOST_PP_REPEAT_1_239(m, d) BOOST_PP_REPEAT_1_238(m, d) m(2, 238, d) +# define BOOST_PP_REPEAT_1_240(m, d) BOOST_PP_REPEAT_1_239(m, d) m(2, 239, d) +# define BOOST_PP_REPEAT_1_241(m, d) BOOST_PP_REPEAT_1_240(m, d) m(2, 240, d) +# define BOOST_PP_REPEAT_1_242(m, d) BOOST_PP_REPEAT_1_241(m, d) m(2, 241, d) +# define BOOST_PP_REPEAT_1_243(m, d) BOOST_PP_REPEAT_1_242(m, d) m(2, 242, d) +# define BOOST_PP_REPEAT_1_244(m, d) BOOST_PP_REPEAT_1_243(m, d) m(2, 243, d) +# define BOOST_PP_REPEAT_1_245(m, d) BOOST_PP_REPEAT_1_244(m, d) m(2, 244, d) +# define BOOST_PP_REPEAT_1_246(m, d) BOOST_PP_REPEAT_1_245(m, d) m(2, 245, d) +# define BOOST_PP_REPEAT_1_247(m, d) BOOST_PP_REPEAT_1_246(m, d) m(2, 246, d) +# define BOOST_PP_REPEAT_1_248(m, d) BOOST_PP_REPEAT_1_247(m, d) m(2, 247, d) +# define BOOST_PP_REPEAT_1_249(m, d) BOOST_PP_REPEAT_1_248(m, d) m(2, 248, d) +# define BOOST_PP_REPEAT_1_250(m, d) BOOST_PP_REPEAT_1_249(m, d) m(2, 249, d) +# define BOOST_PP_REPEAT_1_251(m, d) BOOST_PP_REPEAT_1_250(m, d) m(2, 250, d) +# define BOOST_PP_REPEAT_1_252(m, d) BOOST_PP_REPEAT_1_251(m, d) m(2, 251, d) +# define BOOST_PP_REPEAT_1_253(m, d) BOOST_PP_REPEAT_1_252(m, d) m(2, 252, d) +# define BOOST_PP_REPEAT_1_254(m, d) BOOST_PP_REPEAT_1_253(m, d) m(2, 253, d) +# define BOOST_PP_REPEAT_1_255(m, d) BOOST_PP_REPEAT_1_254(m, d) m(2, 254, d) +# define BOOST_PP_REPEAT_1_256(m, d) BOOST_PP_REPEAT_1_255(m, d) m(2, 255, d) +# +# define BOOST_PP_REPEAT_2_0(m, d) +# define BOOST_PP_REPEAT_2_1(m, d) m(3, 0, d) +# define BOOST_PP_REPEAT_2_2(m, d) BOOST_PP_REPEAT_2_1(m, d) m(3, 1, d) +# define BOOST_PP_REPEAT_2_3(m, d) BOOST_PP_REPEAT_2_2(m, d) m(3, 2, d) +# define BOOST_PP_REPEAT_2_4(m, d) BOOST_PP_REPEAT_2_3(m, d) m(3, 3, d) +# define BOOST_PP_REPEAT_2_5(m, d) BOOST_PP_REPEAT_2_4(m, d) m(3, 4, d) +# define BOOST_PP_REPEAT_2_6(m, d) BOOST_PP_REPEAT_2_5(m, d) m(3, 5, d) +# define BOOST_PP_REPEAT_2_7(m, d) BOOST_PP_REPEAT_2_6(m, d) m(3, 6, d) +# define BOOST_PP_REPEAT_2_8(m, d) BOOST_PP_REPEAT_2_7(m, d) m(3, 7, d) +# define BOOST_PP_REPEAT_2_9(m, d) BOOST_PP_REPEAT_2_8(m, d) m(3, 8, d) +# define BOOST_PP_REPEAT_2_10(m, d) BOOST_PP_REPEAT_2_9(m, d) m(3, 9, d) +# define BOOST_PP_REPEAT_2_11(m, d) BOOST_PP_REPEAT_2_10(m, d) m(3, 10, d) +# define BOOST_PP_REPEAT_2_12(m, d) BOOST_PP_REPEAT_2_11(m, d) m(3, 11, d) +# define BOOST_PP_REPEAT_2_13(m, d) BOOST_PP_REPEAT_2_12(m, d) m(3, 12, d) +# define BOOST_PP_REPEAT_2_14(m, d) BOOST_PP_REPEAT_2_13(m, d) m(3, 13, d) +# define BOOST_PP_REPEAT_2_15(m, d) BOOST_PP_REPEAT_2_14(m, d) m(3, 14, d) +# define BOOST_PP_REPEAT_2_16(m, d) BOOST_PP_REPEAT_2_15(m, d) m(3, 15, d) +# define BOOST_PP_REPEAT_2_17(m, d) BOOST_PP_REPEAT_2_16(m, d) m(3, 16, d) +# define BOOST_PP_REPEAT_2_18(m, d) BOOST_PP_REPEAT_2_17(m, d) m(3, 17, d) +# define BOOST_PP_REPEAT_2_19(m, d) BOOST_PP_REPEAT_2_18(m, d) m(3, 18, d) +# define BOOST_PP_REPEAT_2_20(m, d) BOOST_PP_REPEAT_2_19(m, d) m(3, 19, d) +# define BOOST_PP_REPEAT_2_21(m, d) BOOST_PP_REPEAT_2_20(m, d) m(3, 20, d) +# define BOOST_PP_REPEAT_2_22(m, d) BOOST_PP_REPEAT_2_21(m, d) m(3, 21, d) +# define BOOST_PP_REPEAT_2_23(m, d) BOOST_PP_REPEAT_2_22(m, d) m(3, 22, d) +# define BOOST_PP_REPEAT_2_24(m, d) BOOST_PP_REPEAT_2_23(m, d) m(3, 23, d) +# define BOOST_PP_REPEAT_2_25(m, d) BOOST_PP_REPEAT_2_24(m, d) m(3, 24, d) +# define BOOST_PP_REPEAT_2_26(m, d) BOOST_PP_REPEAT_2_25(m, d) m(3, 25, d) +# define BOOST_PP_REPEAT_2_27(m, d) BOOST_PP_REPEAT_2_26(m, d) m(3, 26, d) +# define BOOST_PP_REPEAT_2_28(m, d) BOOST_PP_REPEAT_2_27(m, d) m(3, 27, d) +# define BOOST_PP_REPEAT_2_29(m, d) BOOST_PP_REPEAT_2_28(m, d) m(3, 28, d) +# define BOOST_PP_REPEAT_2_30(m, d) BOOST_PP_REPEAT_2_29(m, d) m(3, 29, d) +# define BOOST_PP_REPEAT_2_31(m, d) BOOST_PP_REPEAT_2_30(m, d) m(3, 30, d) +# define BOOST_PP_REPEAT_2_32(m, d) BOOST_PP_REPEAT_2_31(m, d) m(3, 31, d) +# define BOOST_PP_REPEAT_2_33(m, d) BOOST_PP_REPEAT_2_32(m, d) m(3, 32, d) +# define BOOST_PP_REPEAT_2_34(m, d) BOOST_PP_REPEAT_2_33(m, d) m(3, 33, d) +# define BOOST_PP_REPEAT_2_35(m, d) BOOST_PP_REPEAT_2_34(m, d) m(3, 34, d) +# define BOOST_PP_REPEAT_2_36(m, d) BOOST_PP_REPEAT_2_35(m, d) m(3, 35, d) +# define BOOST_PP_REPEAT_2_37(m, d) BOOST_PP_REPEAT_2_36(m, d) m(3, 36, d) +# define BOOST_PP_REPEAT_2_38(m, d) BOOST_PP_REPEAT_2_37(m, d) m(3, 37, d) +# define BOOST_PP_REPEAT_2_39(m, d) BOOST_PP_REPEAT_2_38(m, d) m(3, 38, d) +# define BOOST_PP_REPEAT_2_40(m, d) BOOST_PP_REPEAT_2_39(m, d) m(3, 39, d) +# define BOOST_PP_REPEAT_2_41(m, d) BOOST_PP_REPEAT_2_40(m, d) m(3, 40, d) +# define BOOST_PP_REPEAT_2_42(m, d) BOOST_PP_REPEAT_2_41(m, d) m(3, 41, d) +# define BOOST_PP_REPEAT_2_43(m, d) BOOST_PP_REPEAT_2_42(m, d) m(3, 42, d) +# define BOOST_PP_REPEAT_2_44(m, d) BOOST_PP_REPEAT_2_43(m, d) m(3, 43, d) +# define BOOST_PP_REPEAT_2_45(m, d) BOOST_PP_REPEAT_2_44(m, d) m(3, 44, d) +# define BOOST_PP_REPEAT_2_46(m, d) BOOST_PP_REPEAT_2_45(m, d) m(3, 45, d) +# define BOOST_PP_REPEAT_2_47(m, d) BOOST_PP_REPEAT_2_46(m, d) m(3, 46, d) +# define BOOST_PP_REPEAT_2_48(m, d) BOOST_PP_REPEAT_2_47(m, d) m(3, 47, d) +# define BOOST_PP_REPEAT_2_49(m, d) BOOST_PP_REPEAT_2_48(m, d) m(3, 48, d) +# define BOOST_PP_REPEAT_2_50(m, d) BOOST_PP_REPEAT_2_49(m, d) m(3, 49, d) +# define BOOST_PP_REPEAT_2_51(m, d) BOOST_PP_REPEAT_2_50(m, d) m(3, 50, d) +# define BOOST_PP_REPEAT_2_52(m, d) BOOST_PP_REPEAT_2_51(m, d) m(3, 51, d) +# define BOOST_PP_REPEAT_2_53(m, d) BOOST_PP_REPEAT_2_52(m, d) m(3, 52, d) +# define BOOST_PP_REPEAT_2_54(m, d) BOOST_PP_REPEAT_2_53(m, d) m(3, 53, d) +# define BOOST_PP_REPEAT_2_55(m, d) BOOST_PP_REPEAT_2_54(m, d) m(3, 54, d) +# define BOOST_PP_REPEAT_2_56(m, d) BOOST_PP_REPEAT_2_55(m, d) m(3, 55, d) +# define BOOST_PP_REPEAT_2_57(m, d) BOOST_PP_REPEAT_2_56(m, d) m(3, 56, d) +# define BOOST_PP_REPEAT_2_58(m, d) BOOST_PP_REPEAT_2_57(m, d) m(3, 57, d) +# define BOOST_PP_REPEAT_2_59(m, d) BOOST_PP_REPEAT_2_58(m, d) m(3, 58, d) +# define BOOST_PP_REPEAT_2_60(m, d) BOOST_PP_REPEAT_2_59(m, d) m(3, 59, d) +# define BOOST_PP_REPEAT_2_61(m, d) BOOST_PP_REPEAT_2_60(m, d) m(3, 60, d) +# define BOOST_PP_REPEAT_2_62(m, d) BOOST_PP_REPEAT_2_61(m, d) m(3, 61, d) +# define BOOST_PP_REPEAT_2_63(m, d) BOOST_PP_REPEAT_2_62(m, d) m(3, 62, d) +# define BOOST_PP_REPEAT_2_64(m, d) BOOST_PP_REPEAT_2_63(m, d) m(3, 63, d) +# define BOOST_PP_REPEAT_2_65(m, d) BOOST_PP_REPEAT_2_64(m, d) m(3, 64, d) +# define BOOST_PP_REPEAT_2_66(m, d) BOOST_PP_REPEAT_2_65(m, d) m(3, 65, d) +# define BOOST_PP_REPEAT_2_67(m, d) BOOST_PP_REPEAT_2_66(m, d) m(3, 66, d) +# define BOOST_PP_REPEAT_2_68(m, d) BOOST_PP_REPEAT_2_67(m, d) m(3, 67, d) +# define BOOST_PP_REPEAT_2_69(m, d) BOOST_PP_REPEAT_2_68(m, d) m(3, 68, d) +# define BOOST_PP_REPEAT_2_70(m, d) BOOST_PP_REPEAT_2_69(m, d) m(3, 69, d) +# define BOOST_PP_REPEAT_2_71(m, d) BOOST_PP_REPEAT_2_70(m, d) m(3, 70, d) +# define BOOST_PP_REPEAT_2_72(m, d) BOOST_PP_REPEAT_2_71(m, d) m(3, 71, d) +# define BOOST_PP_REPEAT_2_73(m, d) BOOST_PP_REPEAT_2_72(m, d) m(3, 72, d) +# define BOOST_PP_REPEAT_2_74(m, d) BOOST_PP_REPEAT_2_73(m, d) m(3, 73, d) +# define BOOST_PP_REPEAT_2_75(m, d) BOOST_PP_REPEAT_2_74(m, d) m(3, 74, d) +# define BOOST_PP_REPEAT_2_76(m, d) BOOST_PP_REPEAT_2_75(m, d) m(3, 75, d) +# define BOOST_PP_REPEAT_2_77(m, d) BOOST_PP_REPEAT_2_76(m, d) m(3, 76, d) +# define BOOST_PP_REPEAT_2_78(m, d) BOOST_PP_REPEAT_2_77(m, d) m(3, 77, d) +# define BOOST_PP_REPEAT_2_79(m, d) BOOST_PP_REPEAT_2_78(m, d) m(3, 78, d) +# define BOOST_PP_REPEAT_2_80(m, d) BOOST_PP_REPEAT_2_79(m, d) m(3, 79, d) +# define BOOST_PP_REPEAT_2_81(m, d) BOOST_PP_REPEAT_2_80(m, d) m(3, 80, d) +# define BOOST_PP_REPEAT_2_82(m, d) BOOST_PP_REPEAT_2_81(m, d) m(3, 81, d) +# define BOOST_PP_REPEAT_2_83(m, d) BOOST_PP_REPEAT_2_82(m, d) m(3, 82, d) +# define BOOST_PP_REPEAT_2_84(m, d) BOOST_PP_REPEAT_2_83(m, d) m(3, 83, d) +# define BOOST_PP_REPEAT_2_85(m, d) BOOST_PP_REPEAT_2_84(m, d) m(3, 84, d) +# define BOOST_PP_REPEAT_2_86(m, d) BOOST_PP_REPEAT_2_85(m, d) m(3, 85, d) +# define BOOST_PP_REPEAT_2_87(m, d) BOOST_PP_REPEAT_2_86(m, d) m(3, 86, d) +# define BOOST_PP_REPEAT_2_88(m, d) BOOST_PP_REPEAT_2_87(m, d) m(3, 87, d) +# define BOOST_PP_REPEAT_2_89(m, d) BOOST_PP_REPEAT_2_88(m, d) m(3, 88, d) +# define BOOST_PP_REPEAT_2_90(m, d) BOOST_PP_REPEAT_2_89(m, d) m(3, 89, d) +# define BOOST_PP_REPEAT_2_91(m, d) BOOST_PP_REPEAT_2_90(m, d) m(3, 90, d) +# define BOOST_PP_REPEAT_2_92(m, d) BOOST_PP_REPEAT_2_91(m, d) m(3, 91, d) +# define BOOST_PP_REPEAT_2_93(m, d) BOOST_PP_REPEAT_2_92(m, d) m(3, 92, d) +# define BOOST_PP_REPEAT_2_94(m, d) BOOST_PP_REPEAT_2_93(m, d) m(3, 93, d) +# define BOOST_PP_REPEAT_2_95(m, d) BOOST_PP_REPEAT_2_94(m, d) m(3, 94, d) +# define BOOST_PP_REPEAT_2_96(m, d) BOOST_PP_REPEAT_2_95(m, d) m(3, 95, d) +# define BOOST_PP_REPEAT_2_97(m, d) BOOST_PP_REPEAT_2_96(m, d) m(3, 96, d) +# define BOOST_PP_REPEAT_2_98(m, d) BOOST_PP_REPEAT_2_97(m, d) m(3, 97, d) +# define BOOST_PP_REPEAT_2_99(m, d) BOOST_PP_REPEAT_2_98(m, d) m(3, 98, d) +# define BOOST_PP_REPEAT_2_100(m, d) BOOST_PP_REPEAT_2_99(m, d) m(3, 99, d) +# define BOOST_PP_REPEAT_2_101(m, d) BOOST_PP_REPEAT_2_100(m, d) m(3, 100, d) +# define BOOST_PP_REPEAT_2_102(m, d) BOOST_PP_REPEAT_2_101(m, d) m(3, 101, d) +# define BOOST_PP_REPEAT_2_103(m, d) BOOST_PP_REPEAT_2_102(m, d) m(3, 102, d) +# define BOOST_PP_REPEAT_2_104(m, d) BOOST_PP_REPEAT_2_103(m, d) m(3, 103, d) +# define BOOST_PP_REPEAT_2_105(m, d) BOOST_PP_REPEAT_2_104(m, d) m(3, 104, d) +# define BOOST_PP_REPEAT_2_106(m, d) BOOST_PP_REPEAT_2_105(m, d) m(3, 105, d) +# define BOOST_PP_REPEAT_2_107(m, d) BOOST_PP_REPEAT_2_106(m, d) m(3, 106, d) +# define BOOST_PP_REPEAT_2_108(m, d) BOOST_PP_REPEAT_2_107(m, d) m(3, 107, d) +# define BOOST_PP_REPEAT_2_109(m, d) BOOST_PP_REPEAT_2_108(m, d) m(3, 108, d) +# define BOOST_PP_REPEAT_2_110(m, d) BOOST_PP_REPEAT_2_109(m, d) m(3, 109, d) +# define BOOST_PP_REPEAT_2_111(m, d) BOOST_PP_REPEAT_2_110(m, d) m(3, 110, d) +# define BOOST_PP_REPEAT_2_112(m, d) BOOST_PP_REPEAT_2_111(m, d) m(3, 111, d) +# define BOOST_PP_REPEAT_2_113(m, d) BOOST_PP_REPEAT_2_112(m, d) m(3, 112, d) +# define BOOST_PP_REPEAT_2_114(m, d) BOOST_PP_REPEAT_2_113(m, d) m(3, 113, d) +# define BOOST_PP_REPEAT_2_115(m, d) BOOST_PP_REPEAT_2_114(m, d) m(3, 114, d) +# define BOOST_PP_REPEAT_2_116(m, d) BOOST_PP_REPEAT_2_115(m, d) m(3, 115, d) +# define BOOST_PP_REPEAT_2_117(m, d) BOOST_PP_REPEAT_2_116(m, d) m(3, 116, d) +# define BOOST_PP_REPEAT_2_118(m, d) BOOST_PP_REPEAT_2_117(m, d) m(3, 117, d) +# define BOOST_PP_REPEAT_2_119(m, d) BOOST_PP_REPEAT_2_118(m, d) m(3, 118, d) +# define BOOST_PP_REPEAT_2_120(m, d) BOOST_PP_REPEAT_2_119(m, d) m(3, 119, d) +# define BOOST_PP_REPEAT_2_121(m, d) BOOST_PP_REPEAT_2_120(m, d) m(3, 120, d) +# define BOOST_PP_REPEAT_2_122(m, d) BOOST_PP_REPEAT_2_121(m, d) m(3, 121, d) +# define BOOST_PP_REPEAT_2_123(m, d) BOOST_PP_REPEAT_2_122(m, d) m(3, 122, d) +# define BOOST_PP_REPEAT_2_124(m, d) BOOST_PP_REPEAT_2_123(m, d) m(3, 123, d) +# define BOOST_PP_REPEAT_2_125(m, d) BOOST_PP_REPEAT_2_124(m, d) m(3, 124, d) +# define BOOST_PP_REPEAT_2_126(m, d) BOOST_PP_REPEAT_2_125(m, d) m(3, 125, d) +# define BOOST_PP_REPEAT_2_127(m, d) BOOST_PP_REPEAT_2_126(m, d) m(3, 126, d) +# define BOOST_PP_REPEAT_2_128(m, d) BOOST_PP_REPEAT_2_127(m, d) m(3, 127, d) +# define BOOST_PP_REPEAT_2_129(m, d) BOOST_PP_REPEAT_2_128(m, d) m(3, 128, d) +# define BOOST_PP_REPEAT_2_130(m, d) BOOST_PP_REPEAT_2_129(m, d) m(3, 129, d) +# define BOOST_PP_REPEAT_2_131(m, d) BOOST_PP_REPEAT_2_130(m, d) m(3, 130, d) +# define BOOST_PP_REPEAT_2_132(m, d) BOOST_PP_REPEAT_2_131(m, d) m(3, 131, d) +# define BOOST_PP_REPEAT_2_133(m, d) BOOST_PP_REPEAT_2_132(m, d) m(3, 132, d) +# define BOOST_PP_REPEAT_2_134(m, d) BOOST_PP_REPEAT_2_133(m, d) m(3, 133, d) +# define BOOST_PP_REPEAT_2_135(m, d) BOOST_PP_REPEAT_2_134(m, d) m(3, 134, d) +# define BOOST_PP_REPEAT_2_136(m, d) BOOST_PP_REPEAT_2_135(m, d) m(3, 135, d) +# define BOOST_PP_REPEAT_2_137(m, d) BOOST_PP_REPEAT_2_136(m, d) m(3, 136, d) +# define BOOST_PP_REPEAT_2_138(m, d) BOOST_PP_REPEAT_2_137(m, d) m(3, 137, d) +# define BOOST_PP_REPEAT_2_139(m, d) BOOST_PP_REPEAT_2_138(m, d) m(3, 138, d) +# define BOOST_PP_REPEAT_2_140(m, d) BOOST_PP_REPEAT_2_139(m, d) m(3, 139, d) +# define BOOST_PP_REPEAT_2_141(m, d) BOOST_PP_REPEAT_2_140(m, d) m(3, 140, d) +# define BOOST_PP_REPEAT_2_142(m, d) BOOST_PP_REPEAT_2_141(m, d) m(3, 141, d) +# define BOOST_PP_REPEAT_2_143(m, d) BOOST_PP_REPEAT_2_142(m, d) m(3, 142, d) +# define BOOST_PP_REPEAT_2_144(m, d) BOOST_PP_REPEAT_2_143(m, d) m(3, 143, d) +# define BOOST_PP_REPEAT_2_145(m, d) BOOST_PP_REPEAT_2_144(m, d) m(3, 144, d) +# define BOOST_PP_REPEAT_2_146(m, d) BOOST_PP_REPEAT_2_145(m, d) m(3, 145, d) +# define BOOST_PP_REPEAT_2_147(m, d) BOOST_PP_REPEAT_2_146(m, d) m(3, 146, d) +# define BOOST_PP_REPEAT_2_148(m, d) BOOST_PP_REPEAT_2_147(m, d) m(3, 147, d) +# define BOOST_PP_REPEAT_2_149(m, d) BOOST_PP_REPEAT_2_148(m, d) m(3, 148, d) +# define BOOST_PP_REPEAT_2_150(m, d) BOOST_PP_REPEAT_2_149(m, d) m(3, 149, d) +# define BOOST_PP_REPEAT_2_151(m, d) BOOST_PP_REPEAT_2_150(m, d) m(3, 150, d) +# define BOOST_PP_REPEAT_2_152(m, d) BOOST_PP_REPEAT_2_151(m, d) m(3, 151, d) +# define BOOST_PP_REPEAT_2_153(m, d) BOOST_PP_REPEAT_2_152(m, d) m(3, 152, d) +# define BOOST_PP_REPEAT_2_154(m, d) BOOST_PP_REPEAT_2_153(m, d) m(3, 153, d) +# define BOOST_PP_REPEAT_2_155(m, d) BOOST_PP_REPEAT_2_154(m, d) m(3, 154, d) +# define BOOST_PP_REPEAT_2_156(m, d) BOOST_PP_REPEAT_2_155(m, d) m(3, 155, d) +# define BOOST_PP_REPEAT_2_157(m, d) BOOST_PP_REPEAT_2_156(m, d) m(3, 156, d) +# define BOOST_PP_REPEAT_2_158(m, d) BOOST_PP_REPEAT_2_157(m, d) m(3, 157, d) +# define BOOST_PP_REPEAT_2_159(m, d) BOOST_PP_REPEAT_2_158(m, d) m(3, 158, d) +# define BOOST_PP_REPEAT_2_160(m, d) BOOST_PP_REPEAT_2_159(m, d) m(3, 159, d) +# define BOOST_PP_REPEAT_2_161(m, d) BOOST_PP_REPEAT_2_160(m, d) m(3, 160, d) +# define BOOST_PP_REPEAT_2_162(m, d) BOOST_PP_REPEAT_2_161(m, d) m(3, 161, d) +# define BOOST_PP_REPEAT_2_163(m, d) BOOST_PP_REPEAT_2_162(m, d) m(3, 162, d) +# define BOOST_PP_REPEAT_2_164(m, d) BOOST_PP_REPEAT_2_163(m, d) m(3, 163, d) +# define BOOST_PP_REPEAT_2_165(m, d) BOOST_PP_REPEAT_2_164(m, d) m(3, 164, d) +# define BOOST_PP_REPEAT_2_166(m, d) BOOST_PP_REPEAT_2_165(m, d) m(3, 165, d) +# define BOOST_PP_REPEAT_2_167(m, d) BOOST_PP_REPEAT_2_166(m, d) m(3, 166, d) +# define BOOST_PP_REPEAT_2_168(m, d) BOOST_PP_REPEAT_2_167(m, d) m(3, 167, d) +# define BOOST_PP_REPEAT_2_169(m, d) BOOST_PP_REPEAT_2_168(m, d) m(3, 168, d) +# define BOOST_PP_REPEAT_2_170(m, d) BOOST_PP_REPEAT_2_169(m, d) m(3, 169, d) +# define BOOST_PP_REPEAT_2_171(m, d) BOOST_PP_REPEAT_2_170(m, d) m(3, 170, d) +# define BOOST_PP_REPEAT_2_172(m, d) BOOST_PP_REPEAT_2_171(m, d) m(3, 171, d) +# define BOOST_PP_REPEAT_2_173(m, d) BOOST_PP_REPEAT_2_172(m, d) m(3, 172, d) +# define BOOST_PP_REPEAT_2_174(m, d) BOOST_PP_REPEAT_2_173(m, d) m(3, 173, d) +# define BOOST_PP_REPEAT_2_175(m, d) BOOST_PP_REPEAT_2_174(m, d) m(3, 174, d) +# define BOOST_PP_REPEAT_2_176(m, d) BOOST_PP_REPEAT_2_175(m, d) m(3, 175, d) +# define BOOST_PP_REPEAT_2_177(m, d) BOOST_PP_REPEAT_2_176(m, d) m(3, 176, d) +# define BOOST_PP_REPEAT_2_178(m, d) BOOST_PP_REPEAT_2_177(m, d) m(3, 177, d) +# define BOOST_PP_REPEAT_2_179(m, d) BOOST_PP_REPEAT_2_178(m, d) m(3, 178, d) +# define BOOST_PP_REPEAT_2_180(m, d) BOOST_PP_REPEAT_2_179(m, d) m(3, 179, d) +# define BOOST_PP_REPEAT_2_181(m, d) BOOST_PP_REPEAT_2_180(m, d) m(3, 180, d) +# define BOOST_PP_REPEAT_2_182(m, d) BOOST_PP_REPEAT_2_181(m, d) m(3, 181, d) +# define BOOST_PP_REPEAT_2_183(m, d) BOOST_PP_REPEAT_2_182(m, d) m(3, 182, d) +# define BOOST_PP_REPEAT_2_184(m, d) BOOST_PP_REPEAT_2_183(m, d) m(3, 183, d) +# define BOOST_PP_REPEAT_2_185(m, d) BOOST_PP_REPEAT_2_184(m, d) m(3, 184, d) +# define BOOST_PP_REPEAT_2_186(m, d) BOOST_PP_REPEAT_2_185(m, d) m(3, 185, d) +# define BOOST_PP_REPEAT_2_187(m, d) BOOST_PP_REPEAT_2_186(m, d) m(3, 186, d) +# define BOOST_PP_REPEAT_2_188(m, d) BOOST_PP_REPEAT_2_187(m, d) m(3, 187, d) +# define BOOST_PP_REPEAT_2_189(m, d) BOOST_PP_REPEAT_2_188(m, d) m(3, 188, d) +# define BOOST_PP_REPEAT_2_190(m, d) BOOST_PP_REPEAT_2_189(m, d) m(3, 189, d) +# define BOOST_PP_REPEAT_2_191(m, d) BOOST_PP_REPEAT_2_190(m, d) m(3, 190, d) +# define BOOST_PP_REPEAT_2_192(m, d) BOOST_PP_REPEAT_2_191(m, d) m(3, 191, d) +# define BOOST_PP_REPEAT_2_193(m, d) BOOST_PP_REPEAT_2_192(m, d) m(3, 192, d) +# define BOOST_PP_REPEAT_2_194(m, d) BOOST_PP_REPEAT_2_193(m, d) m(3, 193, d) +# define BOOST_PP_REPEAT_2_195(m, d) BOOST_PP_REPEAT_2_194(m, d) m(3, 194, d) +# define BOOST_PP_REPEAT_2_196(m, d) BOOST_PP_REPEAT_2_195(m, d) m(3, 195, d) +# define BOOST_PP_REPEAT_2_197(m, d) BOOST_PP_REPEAT_2_196(m, d) m(3, 196, d) +# define BOOST_PP_REPEAT_2_198(m, d) BOOST_PP_REPEAT_2_197(m, d) m(3, 197, d) +# define BOOST_PP_REPEAT_2_199(m, d) BOOST_PP_REPEAT_2_198(m, d) m(3, 198, d) +# define BOOST_PP_REPEAT_2_200(m, d) BOOST_PP_REPEAT_2_199(m, d) m(3, 199, d) +# define BOOST_PP_REPEAT_2_201(m, d) BOOST_PP_REPEAT_2_200(m, d) m(3, 200, d) +# define BOOST_PP_REPEAT_2_202(m, d) BOOST_PP_REPEAT_2_201(m, d) m(3, 201, d) +# define BOOST_PP_REPEAT_2_203(m, d) BOOST_PP_REPEAT_2_202(m, d) m(3, 202, d) +# define BOOST_PP_REPEAT_2_204(m, d) BOOST_PP_REPEAT_2_203(m, d) m(3, 203, d) +# define BOOST_PP_REPEAT_2_205(m, d) BOOST_PP_REPEAT_2_204(m, d) m(3, 204, d) +# define BOOST_PP_REPEAT_2_206(m, d) BOOST_PP_REPEAT_2_205(m, d) m(3, 205, d) +# define BOOST_PP_REPEAT_2_207(m, d) BOOST_PP_REPEAT_2_206(m, d) m(3, 206, d) +# define BOOST_PP_REPEAT_2_208(m, d) BOOST_PP_REPEAT_2_207(m, d) m(3, 207, d) +# define BOOST_PP_REPEAT_2_209(m, d) BOOST_PP_REPEAT_2_208(m, d) m(3, 208, d) +# define BOOST_PP_REPEAT_2_210(m, d) BOOST_PP_REPEAT_2_209(m, d) m(3, 209, d) +# define BOOST_PP_REPEAT_2_211(m, d) BOOST_PP_REPEAT_2_210(m, d) m(3, 210, d) +# define BOOST_PP_REPEAT_2_212(m, d) BOOST_PP_REPEAT_2_211(m, d) m(3, 211, d) +# define BOOST_PP_REPEAT_2_213(m, d) BOOST_PP_REPEAT_2_212(m, d) m(3, 212, d) +# define BOOST_PP_REPEAT_2_214(m, d) BOOST_PP_REPEAT_2_213(m, d) m(3, 213, d) +# define BOOST_PP_REPEAT_2_215(m, d) BOOST_PP_REPEAT_2_214(m, d) m(3, 214, d) +# define BOOST_PP_REPEAT_2_216(m, d) BOOST_PP_REPEAT_2_215(m, d) m(3, 215, d) +# define BOOST_PP_REPEAT_2_217(m, d) BOOST_PP_REPEAT_2_216(m, d) m(3, 216, d) +# define BOOST_PP_REPEAT_2_218(m, d) BOOST_PP_REPEAT_2_217(m, d) m(3, 217, d) +# define BOOST_PP_REPEAT_2_219(m, d) BOOST_PP_REPEAT_2_218(m, d) m(3, 218, d) +# define BOOST_PP_REPEAT_2_220(m, d) BOOST_PP_REPEAT_2_219(m, d) m(3, 219, d) +# define BOOST_PP_REPEAT_2_221(m, d) BOOST_PP_REPEAT_2_220(m, d) m(3, 220, d) +# define BOOST_PP_REPEAT_2_222(m, d) BOOST_PP_REPEAT_2_221(m, d) m(3, 221, d) +# define BOOST_PP_REPEAT_2_223(m, d) BOOST_PP_REPEAT_2_222(m, d) m(3, 222, d) +# define BOOST_PP_REPEAT_2_224(m, d) BOOST_PP_REPEAT_2_223(m, d) m(3, 223, d) +# define BOOST_PP_REPEAT_2_225(m, d) BOOST_PP_REPEAT_2_224(m, d) m(3, 224, d) +# define BOOST_PP_REPEAT_2_226(m, d) BOOST_PP_REPEAT_2_225(m, d) m(3, 225, d) +# define BOOST_PP_REPEAT_2_227(m, d) BOOST_PP_REPEAT_2_226(m, d) m(3, 226, d) +# define BOOST_PP_REPEAT_2_228(m, d) BOOST_PP_REPEAT_2_227(m, d) m(3, 227, d) +# define BOOST_PP_REPEAT_2_229(m, d) BOOST_PP_REPEAT_2_228(m, d) m(3, 228, d) +# define BOOST_PP_REPEAT_2_230(m, d) BOOST_PP_REPEAT_2_229(m, d) m(3, 229, d) +# define BOOST_PP_REPEAT_2_231(m, d) BOOST_PP_REPEAT_2_230(m, d) m(3, 230, d) +# define BOOST_PP_REPEAT_2_232(m, d) BOOST_PP_REPEAT_2_231(m, d) m(3, 231, d) +# define BOOST_PP_REPEAT_2_233(m, d) BOOST_PP_REPEAT_2_232(m, d) m(3, 232, d) +# define BOOST_PP_REPEAT_2_234(m, d) BOOST_PP_REPEAT_2_233(m, d) m(3, 233, d) +# define BOOST_PP_REPEAT_2_235(m, d) BOOST_PP_REPEAT_2_234(m, d) m(3, 234, d) +# define BOOST_PP_REPEAT_2_236(m, d) BOOST_PP_REPEAT_2_235(m, d) m(3, 235, d) +# define BOOST_PP_REPEAT_2_237(m, d) BOOST_PP_REPEAT_2_236(m, d) m(3, 236, d) +# define BOOST_PP_REPEAT_2_238(m, d) BOOST_PP_REPEAT_2_237(m, d) m(3, 237, d) +# define BOOST_PP_REPEAT_2_239(m, d) BOOST_PP_REPEAT_2_238(m, d) m(3, 238, d) +# define BOOST_PP_REPEAT_2_240(m, d) BOOST_PP_REPEAT_2_239(m, d) m(3, 239, d) +# define BOOST_PP_REPEAT_2_241(m, d) BOOST_PP_REPEAT_2_240(m, d) m(3, 240, d) +# define BOOST_PP_REPEAT_2_242(m, d) BOOST_PP_REPEAT_2_241(m, d) m(3, 241, d) +# define BOOST_PP_REPEAT_2_243(m, d) BOOST_PP_REPEAT_2_242(m, d) m(3, 242, d) +# define BOOST_PP_REPEAT_2_244(m, d) BOOST_PP_REPEAT_2_243(m, d) m(3, 243, d) +# define BOOST_PP_REPEAT_2_245(m, d) BOOST_PP_REPEAT_2_244(m, d) m(3, 244, d) +# define BOOST_PP_REPEAT_2_246(m, d) BOOST_PP_REPEAT_2_245(m, d) m(3, 245, d) +# define BOOST_PP_REPEAT_2_247(m, d) BOOST_PP_REPEAT_2_246(m, d) m(3, 246, d) +# define BOOST_PP_REPEAT_2_248(m, d) BOOST_PP_REPEAT_2_247(m, d) m(3, 247, d) +# define BOOST_PP_REPEAT_2_249(m, d) BOOST_PP_REPEAT_2_248(m, d) m(3, 248, d) +# define BOOST_PP_REPEAT_2_250(m, d) BOOST_PP_REPEAT_2_249(m, d) m(3, 249, d) +# define BOOST_PP_REPEAT_2_251(m, d) BOOST_PP_REPEAT_2_250(m, d) m(3, 250, d) +# define BOOST_PP_REPEAT_2_252(m, d) BOOST_PP_REPEAT_2_251(m, d) m(3, 251, d) +# define BOOST_PP_REPEAT_2_253(m, d) BOOST_PP_REPEAT_2_252(m, d) m(3, 252, d) +# define BOOST_PP_REPEAT_2_254(m, d) BOOST_PP_REPEAT_2_253(m, d) m(3, 253, d) +# define BOOST_PP_REPEAT_2_255(m, d) BOOST_PP_REPEAT_2_254(m, d) m(3, 254, d) +# define BOOST_PP_REPEAT_2_256(m, d) BOOST_PP_REPEAT_2_255(m, d) m(3, 255, d) +# +# define BOOST_PP_REPEAT_3_0(m, d) +# define BOOST_PP_REPEAT_3_1(m, d) m(4, 0, d) +# define BOOST_PP_REPEAT_3_2(m, d) BOOST_PP_REPEAT_3_1(m, d) m(4, 1, d) +# define BOOST_PP_REPEAT_3_3(m, d) BOOST_PP_REPEAT_3_2(m, d) m(4, 2, d) +# define BOOST_PP_REPEAT_3_4(m, d) BOOST_PP_REPEAT_3_3(m, d) m(4, 3, d) +# define BOOST_PP_REPEAT_3_5(m, d) BOOST_PP_REPEAT_3_4(m, d) m(4, 4, d) +# define BOOST_PP_REPEAT_3_6(m, d) BOOST_PP_REPEAT_3_5(m, d) m(4, 5, d) +# define BOOST_PP_REPEAT_3_7(m, d) BOOST_PP_REPEAT_3_6(m, d) m(4, 6, d) +# define BOOST_PP_REPEAT_3_8(m, d) BOOST_PP_REPEAT_3_7(m, d) m(4, 7, d) +# define BOOST_PP_REPEAT_3_9(m, d) BOOST_PP_REPEAT_3_8(m, d) m(4, 8, d) +# define BOOST_PP_REPEAT_3_10(m, d) BOOST_PP_REPEAT_3_9(m, d) m(4, 9, d) +# define BOOST_PP_REPEAT_3_11(m, d) BOOST_PP_REPEAT_3_10(m, d) m(4, 10, d) +# define BOOST_PP_REPEAT_3_12(m, d) BOOST_PP_REPEAT_3_11(m, d) m(4, 11, d) +# define BOOST_PP_REPEAT_3_13(m, d) BOOST_PP_REPEAT_3_12(m, d) m(4, 12, d) +# define BOOST_PP_REPEAT_3_14(m, d) BOOST_PP_REPEAT_3_13(m, d) m(4, 13, d) +# define BOOST_PP_REPEAT_3_15(m, d) BOOST_PP_REPEAT_3_14(m, d) m(4, 14, d) +# define BOOST_PP_REPEAT_3_16(m, d) BOOST_PP_REPEAT_3_15(m, d) m(4, 15, d) +# define BOOST_PP_REPEAT_3_17(m, d) BOOST_PP_REPEAT_3_16(m, d) m(4, 16, d) +# define BOOST_PP_REPEAT_3_18(m, d) BOOST_PP_REPEAT_3_17(m, d) m(4, 17, d) +# define BOOST_PP_REPEAT_3_19(m, d) BOOST_PP_REPEAT_3_18(m, d) m(4, 18, d) +# define BOOST_PP_REPEAT_3_20(m, d) BOOST_PP_REPEAT_3_19(m, d) m(4, 19, d) +# define BOOST_PP_REPEAT_3_21(m, d) BOOST_PP_REPEAT_3_20(m, d) m(4, 20, d) +# define BOOST_PP_REPEAT_3_22(m, d) BOOST_PP_REPEAT_3_21(m, d) m(4, 21, d) +# define BOOST_PP_REPEAT_3_23(m, d) BOOST_PP_REPEAT_3_22(m, d) m(4, 22, d) +# define BOOST_PP_REPEAT_3_24(m, d) BOOST_PP_REPEAT_3_23(m, d) m(4, 23, d) +# define BOOST_PP_REPEAT_3_25(m, d) BOOST_PP_REPEAT_3_24(m, d) m(4, 24, d) +# define BOOST_PP_REPEAT_3_26(m, d) BOOST_PP_REPEAT_3_25(m, d) m(4, 25, d) +# define BOOST_PP_REPEAT_3_27(m, d) BOOST_PP_REPEAT_3_26(m, d) m(4, 26, d) +# define BOOST_PP_REPEAT_3_28(m, d) BOOST_PP_REPEAT_3_27(m, d) m(4, 27, d) +# define BOOST_PP_REPEAT_3_29(m, d) BOOST_PP_REPEAT_3_28(m, d) m(4, 28, d) +# define BOOST_PP_REPEAT_3_30(m, d) BOOST_PP_REPEAT_3_29(m, d) m(4, 29, d) +# define BOOST_PP_REPEAT_3_31(m, d) BOOST_PP_REPEAT_3_30(m, d) m(4, 30, d) +# define BOOST_PP_REPEAT_3_32(m, d) BOOST_PP_REPEAT_3_31(m, d) m(4, 31, d) +# define BOOST_PP_REPEAT_3_33(m, d) BOOST_PP_REPEAT_3_32(m, d) m(4, 32, d) +# define BOOST_PP_REPEAT_3_34(m, d) BOOST_PP_REPEAT_3_33(m, d) m(4, 33, d) +# define BOOST_PP_REPEAT_3_35(m, d) BOOST_PP_REPEAT_3_34(m, d) m(4, 34, d) +# define BOOST_PP_REPEAT_3_36(m, d) BOOST_PP_REPEAT_3_35(m, d) m(4, 35, d) +# define BOOST_PP_REPEAT_3_37(m, d) BOOST_PP_REPEAT_3_36(m, d) m(4, 36, d) +# define BOOST_PP_REPEAT_3_38(m, d) BOOST_PP_REPEAT_3_37(m, d) m(4, 37, d) +# define BOOST_PP_REPEAT_3_39(m, d) BOOST_PP_REPEAT_3_38(m, d) m(4, 38, d) +# define BOOST_PP_REPEAT_3_40(m, d) BOOST_PP_REPEAT_3_39(m, d) m(4, 39, d) +# define BOOST_PP_REPEAT_3_41(m, d) BOOST_PP_REPEAT_3_40(m, d) m(4, 40, d) +# define BOOST_PP_REPEAT_3_42(m, d) BOOST_PP_REPEAT_3_41(m, d) m(4, 41, d) +# define BOOST_PP_REPEAT_3_43(m, d) BOOST_PP_REPEAT_3_42(m, d) m(4, 42, d) +# define BOOST_PP_REPEAT_3_44(m, d) BOOST_PP_REPEAT_3_43(m, d) m(4, 43, d) +# define BOOST_PP_REPEAT_3_45(m, d) BOOST_PP_REPEAT_3_44(m, d) m(4, 44, d) +# define BOOST_PP_REPEAT_3_46(m, d) BOOST_PP_REPEAT_3_45(m, d) m(4, 45, d) +# define BOOST_PP_REPEAT_3_47(m, d) BOOST_PP_REPEAT_3_46(m, d) m(4, 46, d) +# define BOOST_PP_REPEAT_3_48(m, d) BOOST_PP_REPEAT_3_47(m, d) m(4, 47, d) +# define BOOST_PP_REPEAT_3_49(m, d) BOOST_PP_REPEAT_3_48(m, d) m(4, 48, d) +# define BOOST_PP_REPEAT_3_50(m, d) BOOST_PP_REPEAT_3_49(m, d) m(4, 49, d) +# define BOOST_PP_REPEAT_3_51(m, d) BOOST_PP_REPEAT_3_50(m, d) m(4, 50, d) +# define BOOST_PP_REPEAT_3_52(m, d) BOOST_PP_REPEAT_3_51(m, d) m(4, 51, d) +# define BOOST_PP_REPEAT_3_53(m, d) BOOST_PP_REPEAT_3_52(m, d) m(4, 52, d) +# define BOOST_PP_REPEAT_3_54(m, d) BOOST_PP_REPEAT_3_53(m, d) m(4, 53, d) +# define BOOST_PP_REPEAT_3_55(m, d) BOOST_PP_REPEAT_3_54(m, d) m(4, 54, d) +# define BOOST_PP_REPEAT_3_56(m, d) BOOST_PP_REPEAT_3_55(m, d) m(4, 55, d) +# define BOOST_PP_REPEAT_3_57(m, d) BOOST_PP_REPEAT_3_56(m, d) m(4, 56, d) +# define BOOST_PP_REPEAT_3_58(m, d) BOOST_PP_REPEAT_3_57(m, d) m(4, 57, d) +# define BOOST_PP_REPEAT_3_59(m, d) BOOST_PP_REPEAT_3_58(m, d) m(4, 58, d) +# define BOOST_PP_REPEAT_3_60(m, d) BOOST_PP_REPEAT_3_59(m, d) m(4, 59, d) +# define BOOST_PP_REPEAT_3_61(m, d) BOOST_PP_REPEAT_3_60(m, d) m(4, 60, d) +# define BOOST_PP_REPEAT_3_62(m, d) BOOST_PP_REPEAT_3_61(m, d) m(4, 61, d) +# define BOOST_PP_REPEAT_3_63(m, d) BOOST_PP_REPEAT_3_62(m, d) m(4, 62, d) +# define BOOST_PP_REPEAT_3_64(m, d) BOOST_PP_REPEAT_3_63(m, d) m(4, 63, d) +# define BOOST_PP_REPEAT_3_65(m, d) BOOST_PP_REPEAT_3_64(m, d) m(4, 64, d) +# define BOOST_PP_REPEAT_3_66(m, d) BOOST_PP_REPEAT_3_65(m, d) m(4, 65, d) +# define BOOST_PP_REPEAT_3_67(m, d) BOOST_PP_REPEAT_3_66(m, d) m(4, 66, d) +# define BOOST_PP_REPEAT_3_68(m, d) BOOST_PP_REPEAT_3_67(m, d) m(4, 67, d) +# define BOOST_PP_REPEAT_3_69(m, d) BOOST_PP_REPEAT_3_68(m, d) m(4, 68, d) +# define BOOST_PP_REPEAT_3_70(m, d) BOOST_PP_REPEAT_3_69(m, d) m(4, 69, d) +# define BOOST_PP_REPEAT_3_71(m, d) BOOST_PP_REPEAT_3_70(m, d) m(4, 70, d) +# define BOOST_PP_REPEAT_3_72(m, d) BOOST_PP_REPEAT_3_71(m, d) m(4, 71, d) +# define BOOST_PP_REPEAT_3_73(m, d) BOOST_PP_REPEAT_3_72(m, d) m(4, 72, d) +# define BOOST_PP_REPEAT_3_74(m, d) BOOST_PP_REPEAT_3_73(m, d) m(4, 73, d) +# define BOOST_PP_REPEAT_3_75(m, d) BOOST_PP_REPEAT_3_74(m, d) m(4, 74, d) +# define BOOST_PP_REPEAT_3_76(m, d) BOOST_PP_REPEAT_3_75(m, d) m(4, 75, d) +# define BOOST_PP_REPEAT_3_77(m, d) BOOST_PP_REPEAT_3_76(m, d) m(4, 76, d) +# define BOOST_PP_REPEAT_3_78(m, d) BOOST_PP_REPEAT_3_77(m, d) m(4, 77, d) +# define BOOST_PP_REPEAT_3_79(m, d) BOOST_PP_REPEAT_3_78(m, d) m(4, 78, d) +# define BOOST_PP_REPEAT_3_80(m, d) BOOST_PP_REPEAT_3_79(m, d) m(4, 79, d) +# define BOOST_PP_REPEAT_3_81(m, d) BOOST_PP_REPEAT_3_80(m, d) m(4, 80, d) +# define BOOST_PP_REPEAT_3_82(m, d) BOOST_PP_REPEAT_3_81(m, d) m(4, 81, d) +# define BOOST_PP_REPEAT_3_83(m, d) BOOST_PP_REPEAT_3_82(m, d) m(4, 82, d) +# define BOOST_PP_REPEAT_3_84(m, d) BOOST_PP_REPEAT_3_83(m, d) m(4, 83, d) +# define BOOST_PP_REPEAT_3_85(m, d) BOOST_PP_REPEAT_3_84(m, d) m(4, 84, d) +# define BOOST_PP_REPEAT_3_86(m, d) BOOST_PP_REPEAT_3_85(m, d) m(4, 85, d) +# define BOOST_PP_REPEAT_3_87(m, d) BOOST_PP_REPEAT_3_86(m, d) m(4, 86, d) +# define BOOST_PP_REPEAT_3_88(m, d) BOOST_PP_REPEAT_3_87(m, d) m(4, 87, d) +# define BOOST_PP_REPEAT_3_89(m, d) BOOST_PP_REPEAT_3_88(m, d) m(4, 88, d) +# define BOOST_PP_REPEAT_3_90(m, d) BOOST_PP_REPEAT_3_89(m, d) m(4, 89, d) +# define BOOST_PP_REPEAT_3_91(m, d) BOOST_PP_REPEAT_3_90(m, d) m(4, 90, d) +# define BOOST_PP_REPEAT_3_92(m, d) BOOST_PP_REPEAT_3_91(m, d) m(4, 91, d) +# define BOOST_PP_REPEAT_3_93(m, d) BOOST_PP_REPEAT_3_92(m, d) m(4, 92, d) +# define BOOST_PP_REPEAT_3_94(m, d) BOOST_PP_REPEAT_3_93(m, d) m(4, 93, d) +# define BOOST_PP_REPEAT_3_95(m, d) BOOST_PP_REPEAT_3_94(m, d) m(4, 94, d) +# define BOOST_PP_REPEAT_3_96(m, d) BOOST_PP_REPEAT_3_95(m, d) m(4, 95, d) +# define BOOST_PP_REPEAT_3_97(m, d) BOOST_PP_REPEAT_3_96(m, d) m(4, 96, d) +# define BOOST_PP_REPEAT_3_98(m, d) BOOST_PP_REPEAT_3_97(m, d) m(4, 97, d) +# define BOOST_PP_REPEAT_3_99(m, d) BOOST_PP_REPEAT_3_98(m, d) m(4, 98, d) +# define BOOST_PP_REPEAT_3_100(m, d) BOOST_PP_REPEAT_3_99(m, d) m(4, 99, d) +# define BOOST_PP_REPEAT_3_101(m, d) BOOST_PP_REPEAT_3_100(m, d) m(4, 100, d) +# define BOOST_PP_REPEAT_3_102(m, d) BOOST_PP_REPEAT_3_101(m, d) m(4, 101, d) +# define BOOST_PP_REPEAT_3_103(m, d) BOOST_PP_REPEAT_3_102(m, d) m(4, 102, d) +# define BOOST_PP_REPEAT_3_104(m, d) BOOST_PP_REPEAT_3_103(m, d) m(4, 103, d) +# define BOOST_PP_REPEAT_3_105(m, d) BOOST_PP_REPEAT_3_104(m, d) m(4, 104, d) +# define BOOST_PP_REPEAT_3_106(m, d) BOOST_PP_REPEAT_3_105(m, d) m(4, 105, d) +# define BOOST_PP_REPEAT_3_107(m, d) BOOST_PP_REPEAT_3_106(m, d) m(4, 106, d) +# define BOOST_PP_REPEAT_3_108(m, d) BOOST_PP_REPEAT_3_107(m, d) m(4, 107, d) +# define BOOST_PP_REPEAT_3_109(m, d) BOOST_PP_REPEAT_3_108(m, d) m(4, 108, d) +# define BOOST_PP_REPEAT_3_110(m, d) BOOST_PP_REPEAT_3_109(m, d) m(4, 109, d) +# define BOOST_PP_REPEAT_3_111(m, d) BOOST_PP_REPEAT_3_110(m, d) m(4, 110, d) +# define BOOST_PP_REPEAT_3_112(m, d) BOOST_PP_REPEAT_3_111(m, d) m(4, 111, d) +# define BOOST_PP_REPEAT_3_113(m, d) BOOST_PP_REPEAT_3_112(m, d) m(4, 112, d) +# define BOOST_PP_REPEAT_3_114(m, d) BOOST_PP_REPEAT_3_113(m, d) m(4, 113, d) +# define BOOST_PP_REPEAT_3_115(m, d) BOOST_PP_REPEAT_3_114(m, d) m(4, 114, d) +# define BOOST_PP_REPEAT_3_116(m, d) BOOST_PP_REPEAT_3_115(m, d) m(4, 115, d) +# define BOOST_PP_REPEAT_3_117(m, d) BOOST_PP_REPEAT_3_116(m, d) m(4, 116, d) +# define BOOST_PP_REPEAT_3_118(m, d) BOOST_PP_REPEAT_3_117(m, d) m(4, 117, d) +# define BOOST_PP_REPEAT_3_119(m, d) BOOST_PP_REPEAT_3_118(m, d) m(4, 118, d) +# define BOOST_PP_REPEAT_3_120(m, d) BOOST_PP_REPEAT_3_119(m, d) m(4, 119, d) +# define BOOST_PP_REPEAT_3_121(m, d) BOOST_PP_REPEAT_3_120(m, d) m(4, 120, d) +# define BOOST_PP_REPEAT_3_122(m, d) BOOST_PP_REPEAT_3_121(m, d) m(4, 121, d) +# define BOOST_PP_REPEAT_3_123(m, d) BOOST_PP_REPEAT_3_122(m, d) m(4, 122, d) +# define BOOST_PP_REPEAT_3_124(m, d) BOOST_PP_REPEAT_3_123(m, d) m(4, 123, d) +# define BOOST_PP_REPEAT_3_125(m, d) BOOST_PP_REPEAT_3_124(m, d) m(4, 124, d) +# define BOOST_PP_REPEAT_3_126(m, d) BOOST_PP_REPEAT_3_125(m, d) m(4, 125, d) +# define BOOST_PP_REPEAT_3_127(m, d) BOOST_PP_REPEAT_3_126(m, d) m(4, 126, d) +# define BOOST_PP_REPEAT_3_128(m, d) BOOST_PP_REPEAT_3_127(m, d) m(4, 127, d) +# define BOOST_PP_REPEAT_3_129(m, d) BOOST_PP_REPEAT_3_128(m, d) m(4, 128, d) +# define BOOST_PP_REPEAT_3_130(m, d) BOOST_PP_REPEAT_3_129(m, d) m(4, 129, d) +# define BOOST_PP_REPEAT_3_131(m, d) BOOST_PP_REPEAT_3_130(m, d) m(4, 130, d) +# define BOOST_PP_REPEAT_3_132(m, d) BOOST_PP_REPEAT_3_131(m, d) m(4, 131, d) +# define BOOST_PP_REPEAT_3_133(m, d) BOOST_PP_REPEAT_3_132(m, d) m(4, 132, d) +# define BOOST_PP_REPEAT_3_134(m, d) BOOST_PP_REPEAT_3_133(m, d) m(4, 133, d) +# define BOOST_PP_REPEAT_3_135(m, d) BOOST_PP_REPEAT_3_134(m, d) m(4, 134, d) +# define BOOST_PP_REPEAT_3_136(m, d) BOOST_PP_REPEAT_3_135(m, d) m(4, 135, d) +# define BOOST_PP_REPEAT_3_137(m, d) BOOST_PP_REPEAT_3_136(m, d) m(4, 136, d) +# define BOOST_PP_REPEAT_3_138(m, d) BOOST_PP_REPEAT_3_137(m, d) m(4, 137, d) +# define BOOST_PP_REPEAT_3_139(m, d) BOOST_PP_REPEAT_3_138(m, d) m(4, 138, d) +# define BOOST_PP_REPEAT_3_140(m, d) BOOST_PP_REPEAT_3_139(m, d) m(4, 139, d) +# define BOOST_PP_REPEAT_3_141(m, d) BOOST_PP_REPEAT_3_140(m, d) m(4, 140, d) +# define BOOST_PP_REPEAT_3_142(m, d) BOOST_PP_REPEAT_3_141(m, d) m(4, 141, d) +# define BOOST_PP_REPEAT_3_143(m, d) BOOST_PP_REPEAT_3_142(m, d) m(4, 142, d) +# define BOOST_PP_REPEAT_3_144(m, d) BOOST_PP_REPEAT_3_143(m, d) m(4, 143, d) +# define BOOST_PP_REPEAT_3_145(m, d) BOOST_PP_REPEAT_3_144(m, d) m(4, 144, d) +# define BOOST_PP_REPEAT_3_146(m, d) BOOST_PP_REPEAT_3_145(m, d) m(4, 145, d) +# define BOOST_PP_REPEAT_3_147(m, d) BOOST_PP_REPEAT_3_146(m, d) m(4, 146, d) +# define BOOST_PP_REPEAT_3_148(m, d) BOOST_PP_REPEAT_3_147(m, d) m(4, 147, d) +# define BOOST_PP_REPEAT_3_149(m, d) BOOST_PP_REPEAT_3_148(m, d) m(4, 148, d) +# define BOOST_PP_REPEAT_3_150(m, d) BOOST_PP_REPEAT_3_149(m, d) m(4, 149, d) +# define BOOST_PP_REPEAT_3_151(m, d) BOOST_PP_REPEAT_3_150(m, d) m(4, 150, d) +# define BOOST_PP_REPEAT_3_152(m, d) BOOST_PP_REPEAT_3_151(m, d) m(4, 151, d) +# define BOOST_PP_REPEAT_3_153(m, d) BOOST_PP_REPEAT_3_152(m, d) m(4, 152, d) +# define BOOST_PP_REPEAT_3_154(m, d) BOOST_PP_REPEAT_3_153(m, d) m(4, 153, d) +# define BOOST_PP_REPEAT_3_155(m, d) BOOST_PP_REPEAT_3_154(m, d) m(4, 154, d) +# define BOOST_PP_REPEAT_3_156(m, d) BOOST_PP_REPEAT_3_155(m, d) m(4, 155, d) +# define BOOST_PP_REPEAT_3_157(m, d) BOOST_PP_REPEAT_3_156(m, d) m(4, 156, d) +# define BOOST_PP_REPEAT_3_158(m, d) BOOST_PP_REPEAT_3_157(m, d) m(4, 157, d) +# define BOOST_PP_REPEAT_3_159(m, d) BOOST_PP_REPEAT_3_158(m, d) m(4, 158, d) +# define BOOST_PP_REPEAT_3_160(m, d) BOOST_PP_REPEAT_3_159(m, d) m(4, 159, d) +# define BOOST_PP_REPEAT_3_161(m, d) BOOST_PP_REPEAT_3_160(m, d) m(4, 160, d) +# define BOOST_PP_REPEAT_3_162(m, d) BOOST_PP_REPEAT_3_161(m, d) m(4, 161, d) +# define BOOST_PP_REPEAT_3_163(m, d) BOOST_PP_REPEAT_3_162(m, d) m(4, 162, d) +# define BOOST_PP_REPEAT_3_164(m, d) BOOST_PP_REPEAT_3_163(m, d) m(4, 163, d) +# define BOOST_PP_REPEAT_3_165(m, d) BOOST_PP_REPEAT_3_164(m, d) m(4, 164, d) +# define BOOST_PP_REPEAT_3_166(m, d) BOOST_PP_REPEAT_3_165(m, d) m(4, 165, d) +# define BOOST_PP_REPEAT_3_167(m, d) BOOST_PP_REPEAT_3_166(m, d) m(4, 166, d) +# define BOOST_PP_REPEAT_3_168(m, d) BOOST_PP_REPEAT_3_167(m, d) m(4, 167, d) +# define BOOST_PP_REPEAT_3_169(m, d) BOOST_PP_REPEAT_3_168(m, d) m(4, 168, d) +# define BOOST_PP_REPEAT_3_170(m, d) BOOST_PP_REPEAT_3_169(m, d) m(4, 169, d) +# define BOOST_PP_REPEAT_3_171(m, d) BOOST_PP_REPEAT_3_170(m, d) m(4, 170, d) +# define BOOST_PP_REPEAT_3_172(m, d) BOOST_PP_REPEAT_3_171(m, d) m(4, 171, d) +# define BOOST_PP_REPEAT_3_173(m, d) BOOST_PP_REPEAT_3_172(m, d) m(4, 172, d) +# define BOOST_PP_REPEAT_3_174(m, d) BOOST_PP_REPEAT_3_173(m, d) m(4, 173, d) +# define BOOST_PP_REPEAT_3_175(m, d) BOOST_PP_REPEAT_3_174(m, d) m(4, 174, d) +# define BOOST_PP_REPEAT_3_176(m, d) BOOST_PP_REPEAT_3_175(m, d) m(4, 175, d) +# define BOOST_PP_REPEAT_3_177(m, d) BOOST_PP_REPEAT_3_176(m, d) m(4, 176, d) +# define BOOST_PP_REPEAT_3_178(m, d) BOOST_PP_REPEAT_3_177(m, d) m(4, 177, d) +# define BOOST_PP_REPEAT_3_179(m, d) BOOST_PP_REPEAT_3_178(m, d) m(4, 178, d) +# define BOOST_PP_REPEAT_3_180(m, d) BOOST_PP_REPEAT_3_179(m, d) m(4, 179, d) +# define BOOST_PP_REPEAT_3_181(m, d) BOOST_PP_REPEAT_3_180(m, d) m(4, 180, d) +# define BOOST_PP_REPEAT_3_182(m, d) BOOST_PP_REPEAT_3_181(m, d) m(4, 181, d) +# define BOOST_PP_REPEAT_3_183(m, d) BOOST_PP_REPEAT_3_182(m, d) m(4, 182, d) +# define BOOST_PP_REPEAT_3_184(m, d) BOOST_PP_REPEAT_3_183(m, d) m(4, 183, d) +# define BOOST_PP_REPEAT_3_185(m, d) BOOST_PP_REPEAT_3_184(m, d) m(4, 184, d) +# define BOOST_PP_REPEAT_3_186(m, d) BOOST_PP_REPEAT_3_185(m, d) m(4, 185, d) +# define BOOST_PP_REPEAT_3_187(m, d) BOOST_PP_REPEAT_3_186(m, d) m(4, 186, d) +# define BOOST_PP_REPEAT_3_188(m, d) BOOST_PP_REPEAT_3_187(m, d) m(4, 187, d) +# define BOOST_PP_REPEAT_3_189(m, d) BOOST_PP_REPEAT_3_188(m, d) m(4, 188, d) +# define BOOST_PP_REPEAT_3_190(m, d) BOOST_PP_REPEAT_3_189(m, d) m(4, 189, d) +# define BOOST_PP_REPEAT_3_191(m, d) BOOST_PP_REPEAT_3_190(m, d) m(4, 190, d) +# define BOOST_PP_REPEAT_3_192(m, d) BOOST_PP_REPEAT_3_191(m, d) m(4, 191, d) +# define BOOST_PP_REPEAT_3_193(m, d) BOOST_PP_REPEAT_3_192(m, d) m(4, 192, d) +# define BOOST_PP_REPEAT_3_194(m, d) BOOST_PP_REPEAT_3_193(m, d) m(4, 193, d) +# define BOOST_PP_REPEAT_3_195(m, d) BOOST_PP_REPEAT_3_194(m, d) m(4, 194, d) +# define BOOST_PP_REPEAT_3_196(m, d) BOOST_PP_REPEAT_3_195(m, d) m(4, 195, d) +# define BOOST_PP_REPEAT_3_197(m, d) BOOST_PP_REPEAT_3_196(m, d) m(4, 196, d) +# define BOOST_PP_REPEAT_3_198(m, d) BOOST_PP_REPEAT_3_197(m, d) m(4, 197, d) +# define BOOST_PP_REPEAT_3_199(m, d) BOOST_PP_REPEAT_3_198(m, d) m(4, 198, d) +# define BOOST_PP_REPEAT_3_200(m, d) BOOST_PP_REPEAT_3_199(m, d) m(4, 199, d) +# define BOOST_PP_REPEAT_3_201(m, d) BOOST_PP_REPEAT_3_200(m, d) m(4, 200, d) +# define BOOST_PP_REPEAT_3_202(m, d) BOOST_PP_REPEAT_3_201(m, d) m(4, 201, d) +# define BOOST_PP_REPEAT_3_203(m, d) BOOST_PP_REPEAT_3_202(m, d) m(4, 202, d) +# define BOOST_PP_REPEAT_3_204(m, d) BOOST_PP_REPEAT_3_203(m, d) m(4, 203, d) +# define BOOST_PP_REPEAT_3_205(m, d) BOOST_PP_REPEAT_3_204(m, d) m(4, 204, d) +# define BOOST_PP_REPEAT_3_206(m, d) BOOST_PP_REPEAT_3_205(m, d) m(4, 205, d) +# define BOOST_PP_REPEAT_3_207(m, d) BOOST_PP_REPEAT_3_206(m, d) m(4, 206, d) +# define BOOST_PP_REPEAT_3_208(m, d) BOOST_PP_REPEAT_3_207(m, d) m(4, 207, d) +# define BOOST_PP_REPEAT_3_209(m, d) BOOST_PP_REPEAT_3_208(m, d) m(4, 208, d) +# define BOOST_PP_REPEAT_3_210(m, d) BOOST_PP_REPEAT_3_209(m, d) m(4, 209, d) +# define BOOST_PP_REPEAT_3_211(m, d) BOOST_PP_REPEAT_3_210(m, d) m(4, 210, d) +# define BOOST_PP_REPEAT_3_212(m, d) BOOST_PP_REPEAT_3_211(m, d) m(4, 211, d) +# define BOOST_PP_REPEAT_3_213(m, d) BOOST_PP_REPEAT_3_212(m, d) m(4, 212, d) +# define BOOST_PP_REPEAT_3_214(m, d) BOOST_PP_REPEAT_3_213(m, d) m(4, 213, d) +# define BOOST_PP_REPEAT_3_215(m, d) BOOST_PP_REPEAT_3_214(m, d) m(4, 214, d) +# define BOOST_PP_REPEAT_3_216(m, d) BOOST_PP_REPEAT_3_215(m, d) m(4, 215, d) +# define BOOST_PP_REPEAT_3_217(m, d) BOOST_PP_REPEAT_3_216(m, d) m(4, 216, d) +# define BOOST_PP_REPEAT_3_218(m, d) BOOST_PP_REPEAT_3_217(m, d) m(4, 217, d) +# define BOOST_PP_REPEAT_3_219(m, d) BOOST_PP_REPEAT_3_218(m, d) m(4, 218, d) +# define BOOST_PP_REPEAT_3_220(m, d) BOOST_PP_REPEAT_3_219(m, d) m(4, 219, d) +# define BOOST_PP_REPEAT_3_221(m, d) BOOST_PP_REPEAT_3_220(m, d) m(4, 220, d) +# define BOOST_PP_REPEAT_3_222(m, d) BOOST_PP_REPEAT_3_221(m, d) m(4, 221, d) +# define BOOST_PP_REPEAT_3_223(m, d) BOOST_PP_REPEAT_3_222(m, d) m(4, 222, d) +# define BOOST_PP_REPEAT_3_224(m, d) BOOST_PP_REPEAT_3_223(m, d) m(4, 223, d) +# define BOOST_PP_REPEAT_3_225(m, d) BOOST_PP_REPEAT_3_224(m, d) m(4, 224, d) +# define BOOST_PP_REPEAT_3_226(m, d) BOOST_PP_REPEAT_3_225(m, d) m(4, 225, d) +# define BOOST_PP_REPEAT_3_227(m, d) BOOST_PP_REPEAT_3_226(m, d) m(4, 226, d) +# define BOOST_PP_REPEAT_3_228(m, d) BOOST_PP_REPEAT_3_227(m, d) m(4, 227, d) +# define BOOST_PP_REPEAT_3_229(m, d) BOOST_PP_REPEAT_3_228(m, d) m(4, 228, d) +# define BOOST_PP_REPEAT_3_230(m, d) BOOST_PP_REPEAT_3_229(m, d) m(4, 229, d) +# define BOOST_PP_REPEAT_3_231(m, d) BOOST_PP_REPEAT_3_230(m, d) m(4, 230, d) +# define BOOST_PP_REPEAT_3_232(m, d) BOOST_PP_REPEAT_3_231(m, d) m(4, 231, d) +# define BOOST_PP_REPEAT_3_233(m, d) BOOST_PP_REPEAT_3_232(m, d) m(4, 232, d) +# define BOOST_PP_REPEAT_3_234(m, d) BOOST_PP_REPEAT_3_233(m, d) m(4, 233, d) +# define BOOST_PP_REPEAT_3_235(m, d) BOOST_PP_REPEAT_3_234(m, d) m(4, 234, d) +# define BOOST_PP_REPEAT_3_236(m, d) BOOST_PP_REPEAT_3_235(m, d) m(4, 235, d) +# define BOOST_PP_REPEAT_3_237(m, d) BOOST_PP_REPEAT_3_236(m, d) m(4, 236, d) +# define BOOST_PP_REPEAT_3_238(m, d) BOOST_PP_REPEAT_3_237(m, d) m(4, 237, d) +# define BOOST_PP_REPEAT_3_239(m, d) BOOST_PP_REPEAT_3_238(m, d) m(4, 238, d) +# define BOOST_PP_REPEAT_3_240(m, d) BOOST_PP_REPEAT_3_239(m, d) m(4, 239, d) +# define BOOST_PP_REPEAT_3_241(m, d) BOOST_PP_REPEAT_3_240(m, d) m(4, 240, d) +# define BOOST_PP_REPEAT_3_242(m, d) BOOST_PP_REPEAT_3_241(m, d) m(4, 241, d) +# define BOOST_PP_REPEAT_3_243(m, d) BOOST_PP_REPEAT_3_242(m, d) m(4, 242, d) +# define BOOST_PP_REPEAT_3_244(m, d) BOOST_PP_REPEAT_3_243(m, d) m(4, 243, d) +# define BOOST_PP_REPEAT_3_245(m, d) BOOST_PP_REPEAT_3_244(m, d) m(4, 244, d) +# define BOOST_PP_REPEAT_3_246(m, d) BOOST_PP_REPEAT_3_245(m, d) m(4, 245, d) +# define BOOST_PP_REPEAT_3_247(m, d) BOOST_PP_REPEAT_3_246(m, d) m(4, 246, d) +# define BOOST_PP_REPEAT_3_248(m, d) BOOST_PP_REPEAT_3_247(m, d) m(4, 247, d) +# define BOOST_PP_REPEAT_3_249(m, d) BOOST_PP_REPEAT_3_248(m, d) m(4, 248, d) +# define BOOST_PP_REPEAT_3_250(m, d) BOOST_PP_REPEAT_3_249(m, d) m(4, 249, d) +# define BOOST_PP_REPEAT_3_251(m, d) BOOST_PP_REPEAT_3_250(m, d) m(4, 250, d) +# define BOOST_PP_REPEAT_3_252(m, d) BOOST_PP_REPEAT_3_251(m, d) m(4, 251, d) +# define BOOST_PP_REPEAT_3_253(m, d) BOOST_PP_REPEAT_3_252(m, d) m(4, 252, d) +# define BOOST_PP_REPEAT_3_254(m, d) BOOST_PP_REPEAT_3_253(m, d) m(4, 253, d) +# define BOOST_PP_REPEAT_3_255(m, d) BOOST_PP_REPEAT_3_254(m, d) m(4, 254, d) +# define BOOST_PP_REPEAT_3_256(m, d) BOOST_PP_REPEAT_3_255(m, d) m(4, 255, d) +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/repetition/repeat_from_to.hpp b/ThirdParty/boost-Subset/boost/preprocessor/repetition/repeat_from_to.hpp new file mode 100644 index 0000000000..efe539e1de --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/repetition/repeat_from_to.hpp @@ -0,0 +1,87 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_REPEAT_FROM_TO_HPP +# define BOOST_PREPROCESSOR_REPETITION_REPEAT_FROM_TO_HPP +# +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_REPEAT_FROM_TO */ +# +# if 0 +# define BOOST_PP_REPEAT_FROM_TO(first, last, macro, data) +# endif +# +# define BOOST_PP_REPEAT_FROM_TO BOOST_PP_CAT(BOOST_PP_REPEAT_FROM_TO_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4)) +# +# define BOOST_PP_REPEAT_FROM_TO_1(f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_1(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256), f, l, m, dt) +# define BOOST_PP_REPEAT_FROM_TO_2(f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_2(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256), f, l, m, dt) +# define BOOST_PP_REPEAT_FROM_TO_3(f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_3(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256), f, l, m, dt) +# define BOOST_PP_REPEAT_FROM_TO_4(f, l, m, dt) BOOST_PP_ERROR(0x0003) +# +# define BOOST_PP_REPEAT_FROM_TO_1ST BOOST_PP_REPEAT_FROM_TO_1 +# define BOOST_PP_REPEAT_FROM_TO_2ND BOOST_PP_REPEAT_FROM_TO_2 +# define BOOST_PP_REPEAT_FROM_TO_3RD BOOST_PP_REPEAT_FROM_TO_3 +# +# /* BOOST_PP_REPEAT_FROM_TO_D */ +# +# if 0 +# define BOOST_PP_REPEAT_FROM_TO_D(d, first, last, macro, data) +# endif +# +# define BOOST_PP_REPEAT_FROM_TO_D BOOST_PP_CAT(BOOST_PP_REPEAT_FROM_TO_D_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4)) +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_REPEAT_FROM_TO_D_1(d, f, l, m, dt) BOOST_PP_REPEAT_1(BOOST_PP_SUB_D(d, l, f), BOOST_PP_REPEAT_FROM_TO_M_1, (d, f, m, dt)) +# define BOOST_PP_REPEAT_FROM_TO_D_2(d, f, l, m, dt) BOOST_PP_REPEAT_2(BOOST_PP_SUB_D(d, l, f), BOOST_PP_REPEAT_FROM_TO_M_2, (d, f, m, dt)) +# define BOOST_PP_REPEAT_FROM_TO_D_3(d, f, l, m, dt) BOOST_PP_REPEAT_3(BOOST_PP_SUB_D(d, l, f), BOOST_PP_REPEAT_FROM_TO_M_3, (d, f, m, dt)) +# else +# define BOOST_PP_REPEAT_FROM_TO_D_1(d, f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_1_I(d, f, l, m, dt) +# define BOOST_PP_REPEAT_FROM_TO_D_2(d, f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_2_I(d, f, l, m, dt) +# define BOOST_PP_REPEAT_FROM_TO_D_3(d, f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_3_I(d, f, l, m, dt) +# define BOOST_PP_REPEAT_FROM_TO_D_1_I(d, f, l, m, dt) BOOST_PP_REPEAT_1(BOOST_PP_SUB_D(d, l, f), BOOST_PP_REPEAT_FROM_TO_M_1, (d, f, m, dt)) +# define BOOST_PP_REPEAT_FROM_TO_D_2_I(d, f, l, m, dt) BOOST_PP_REPEAT_2(BOOST_PP_SUB_D(d, l, f), BOOST_PP_REPEAT_FROM_TO_M_2, (d, f, m, dt)) +# define BOOST_PP_REPEAT_FROM_TO_D_3_I(d, f, l, m, dt) BOOST_PP_REPEAT_3(BOOST_PP_SUB_D(d, l, f), BOOST_PP_REPEAT_FROM_TO_M_3, (d, f, m, dt)) +# endif +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() +# define BOOST_PP_REPEAT_FROM_TO_M_1(z, n, dfmd) BOOST_PP_REPEAT_FROM_TO_M_1_IM(z, n, BOOST_PP_TUPLE_REM_4 dfmd) +# define BOOST_PP_REPEAT_FROM_TO_M_2(z, n, dfmd) BOOST_PP_REPEAT_FROM_TO_M_2_IM(z, n, BOOST_PP_TUPLE_REM_4 dfmd) +# define BOOST_PP_REPEAT_FROM_TO_M_3(z, n, dfmd) BOOST_PP_REPEAT_FROM_TO_M_3_IM(z, n, BOOST_PP_TUPLE_REM_4 dfmd) +# define BOOST_PP_REPEAT_FROM_TO_M_1_IM(z, n, im) BOOST_PP_REPEAT_FROM_TO_M_1_I(z, n, im) +# define BOOST_PP_REPEAT_FROM_TO_M_2_IM(z, n, im) BOOST_PP_REPEAT_FROM_TO_M_2_I(z, n, im) +# define BOOST_PP_REPEAT_FROM_TO_M_3_IM(z, n, im) BOOST_PP_REPEAT_FROM_TO_M_3_I(z, n, im) +# else +# define BOOST_PP_REPEAT_FROM_TO_M_1(z, n, dfmd) BOOST_PP_REPEAT_FROM_TO_M_1_I(z, n, BOOST_PP_TUPLE_ELEM(4, 0, dfmd), BOOST_PP_TUPLE_ELEM(4, 1, dfmd), BOOST_PP_TUPLE_ELEM(4, 2, dfmd), BOOST_PP_TUPLE_ELEM(4, 3, dfmd)) +# define BOOST_PP_REPEAT_FROM_TO_M_2(z, n, dfmd) BOOST_PP_REPEAT_FROM_TO_M_2_I(z, n, BOOST_PP_TUPLE_ELEM(4, 0, dfmd), BOOST_PP_TUPLE_ELEM(4, 1, dfmd), BOOST_PP_TUPLE_ELEM(4, 2, dfmd), BOOST_PP_TUPLE_ELEM(4, 3, dfmd)) +# define BOOST_PP_REPEAT_FROM_TO_M_3(z, n, dfmd) BOOST_PP_REPEAT_FROM_TO_M_3_I(z, n, BOOST_PP_TUPLE_ELEM(4, 0, dfmd), BOOST_PP_TUPLE_ELEM(4, 1, dfmd), BOOST_PP_TUPLE_ELEM(4, 2, dfmd), BOOST_PP_TUPLE_ELEM(4, 3, dfmd)) +# endif +# +# define BOOST_PP_REPEAT_FROM_TO_M_1_I(z, n, d, f, m, dt) BOOST_PP_REPEAT_FROM_TO_M_1_II(z, BOOST_PP_ADD_D(d, n, f), m, dt) +# define BOOST_PP_REPEAT_FROM_TO_M_2_I(z, n, d, f, m, dt) BOOST_PP_REPEAT_FROM_TO_M_2_II(z, BOOST_PP_ADD_D(d, n, f), m, dt) +# define BOOST_PP_REPEAT_FROM_TO_M_3_I(z, n, d, f, m, dt) BOOST_PP_REPEAT_FROM_TO_M_3_II(z, BOOST_PP_ADD_D(d, n, f), m, dt) +# +# define BOOST_PP_REPEAT_FROM_TO_M_1_II(z, n, m, dt) m(z, n, dt) +# define BOOST_PP_REPEAT_FROM_TO_M_2_II(z, n, m, dt) m(z, n, dt) +# define BOOST_PP_REPEAT_FROM_TO_M_3_II(z, n, m, dt) m(z, n, dt) +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/seq/cat.hpp b/ThirdParty/boost-Subset/boost/preprocessor/seq/cat.hpp new file mode 100644 index 0000000000..b6b09ff32a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/seq/cat.hpp @@ -0,0 +1,49 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_CAT_HPP +# define BOOST_PREPROCESSOR_SEQ_CAT_HPP +# +# include +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_SEQ_CAT */ +# +# define BOOST_PP_SEQ_CAT(seq) \ + BOOST_PP_IF( \ + BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq)), \ + BOOST_PP_SEQ_CAT_I, \ + BOOST_PP_SEQ_HEAD \ + )(seq) \ + /**/ +# define BOOST_PP_SEQ_CAT_I(seq) BOOST_PP_SEQ_FOLD_LEFT(BOOST_PP_SEQ_CAT_O, BOOST_PP_SEQ_HEAD(seq), BOOST_PP_SEQ_TAIL(seq)) +# +# define BOOST_PP_SEQ_CAT_O(s, st, elem) BOOST_PP_SEQ_CAT_O_I(st, elem) +# define BOOST_PP_SEQ_CAT_O_I(a, b) a ## b +# +# /* BOOST_PP_SEQ_CAT_S */ +# +# define BOOST_PP_SEQ_CAT_S(s, seq) \ + BOOST_PP_IF( \ + BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq)), \ + BOOST_PP_SEQ_CAT_S_I_A, \ + BOOST_PP_SEQ_CAT_S_I_B \ + )(s, seq) \ + /**/ +# define BOOST_PP_SEQ_CAT_S_I_A(s, seq) BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_CAT_O, BOOST_PP_SEQ_HEAD(seq), BOOST_PP_SEQ_TAIL(seq)) +# define BOOST_PP_SEQ_CAT_S_I_B(s, seq) BOOST_PP_SEQ_HEAD(seq) +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/seq/detail/is_empty.hpp b/ThirdParty/boost-Subset/boost/preprocessor/seq/detail/is_empty.hpp new file mode 100644 index 0000000000..1a80a2f611 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/seq/detail/is_empty.hpp @@ -0,0 +1,49 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Edward Diener 2015. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_DETAIL_IS_EMPTY_HPP +# define BOOST_PREPROCESSOR_SEQ_DETAIL_IS_EMPTY_HPP +# +# include +# include +# include +# include +# include +# +/* An empty seq is one that is just BOOST_PP_SEQ_NIL */ +# +# define BOOST_PP_SEQ_DETAIL_IS_EMPTY(seq) \ + BOOST_PP_COMPL \ + ( \ + BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq) \ + ) \ +/**/ +# +# define BOOST_PP_SEQ_DETAIL_IS_EMPTY_SIZE(size) \ + BOOST_PP_COMPL \ + ( \ + BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY_SIZE(size) \ + ) \ +/**/ +# +# define BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq) \ + BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY_SIZE(BOOST_PP_SEQ_DETAIL_EMPTY_SIZE(seq)) \ +/**/ +# +# define BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY_SIZE(size) \ + BOOST_PP_BOOL(size) \ +/**/ +# +# define BOOST_PP_SEQ_DETAIL_EMPTY_SIZE(seq) \ + BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq (nil))) \ +/**/ +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/seq/detail/split.hpp b/ThirdParty/boost-Subset/boost/preprocessor/seq/detail/split.hpp new file mode 100644 index 0000000000..7c33931918 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/seq/detail/split.hpp @@ -0,0 +1,284 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_DETAIL_SPLIT_HPP +# define BOOST_PREPROCESSOR_SEQ_DETAIL_SPLIT_HPP +# +# include +# +# /* BOOST_PP_SEQ_SPLIT */ +# +# define BOOST_PP_SEQ_SPLIT(n, seq) BOOST_PP_SEQ_SPLIT_D(n, seq) +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_SEQ_SPLIT_D(n, seq) (BOOST_PP_SEQ_SPLIT_ ## n seq) +# else +# define BOOST_PP_SEQ_SPLIT_D(n, seq) (BOOST_PP_SEQ_SPLIT_ ## n ## seq) +# endif +# +# define BOOST_PP_SEQ_SPLIT_1(x) (x), +# define BOOST_PP_SEQ_SPLIT_2(x) (x) BOOST_PP_SEQ_SPLIT_1 +# define BOOST_PP_SEQ_SPLIT_3(x) (x) BOOST_PP_SEQ_SPLIT_2 +# define BOOST_PP_SEQ_SPLIT_4(x) (x) BOOST_PP_SEQ_SPLIT_3 +# define BOOST_PP_SEQ_SPLIT_5(x) (x) BOOST_PP_SEQ_SPLIT_4 +# define BOOST_PP_SEQ_SPLIT_6(x) (x) BOOST_PP_SEQ_SPLIT_5 +# define BOOST_PP_SEQ_SPLIT_7(x) (x) BOOST_PP_SEQ_SPLIT_6 +# define BOOST_PP_SEQ_SPLIT_8(x) (x) BOOST_PP_SEQ_SPLIT_7 +# define BOOST_PP_SEQ_SPLIT_9(x) (x) BOOST_PP_SEQ_SPLIT_8 +# define BOOST_PP_SEQ_SPLIT_10(x) (x) BOOST_PP_SEQ_SPLIT_9 +# define BOOST_PP_SEQ_SPLIT_11(x) (x) BOOST_PP_SEQ_SPLIT_10 +# define BOOST_PP_SEQ_SPLIT_12(x) (x) BOOST_PP_SEQ_SPLIT_11 +# define BOOST_PP_SEQ_SPLIT_13(x) (x) BOOST_PP_SEQ_SPLIT_12 +# define BOOST_PP_SEQ_SPLIT_14(x) (x) BOOST_PP_SEQ_SPLIT_13 +# define BOOST_PP_SEQ_SPLIT_15(x) (x) BOOST_PP_SEQ_SPLIT_14 +# define BOOST_PP_SEQ_SPLIT_16(x) (x) BOOST_PP_SEQ_SPLIT_15 +# define BOOST_PP_SEQ_SPLIT_17(x) (x) BOOST_PP_SEQ_SPLIT_16 +# define BOOST_PP_SEQ_SPLIT_18(x) (x) BOOST_PP_SEQ_SPLIT_17 +# define BOOST_PP_SEQ_SPLIT_19(x) (x) BOOST_PP_SEQ_SPLIT_18 +# define BOOST_PP_SEQ_SPLIT_20(x) (x) BOOST_PP_SEQ_SPLIT_19 +# define BOOST_PP_SEQ_SPLIT_21(x) (x) BOOST_PP_SEQ_SPLIT_20 +# define BOOST_PP_SEQ_SPLIT_22(x) (x) BOOST_PP_SEQ_SPLIT_21 +# define BOOST_PP_SEQ_SPLIT_23(x) (x) BOOST_PP_SEQ_SPLIT_22 +# define BOOST_PP_SEQ_SPLIT_24(x) (x) BOOST_PP_SEQ_SPLIT_23 +# define BOOST_PP_SEQ_SPLIT_25(x) (x) BOOST_PP_SEQ_SPLIT_24 +# define BOOST_PP_SEQ_SPLIT_26(x) (x) BOOST_PP_SEQ_SPLIT_25 +# define BOOST_PP_SEQ_SPLIT_27(x) (x) BOOST_PP_SEQ_SPLIT_26 +# define BOOST_PP_SEQ_SPLIT_28(x) (x) BOOST_PP_SEQ_SPLIT_27 +# define BOOST_PP_SEQ_SPLIT_29(x) (x) BOOST_PP_SEQ_SPLIT_28 +# define BOOST_PP_SEQ_SPLIT_30(x) (x) BOOST_PP_SEQ_SPLIT_29 +# define BOOST_PP_SEQ_SPLIT_31(x) (x) BOOST_PP_SEQ_SPLIT_30 +# define BOOST_PP_SEQ_SPLIT_32(x) (x) BOOST_PP_SEQ_SPLIT_31 +# define BOOST_PP_SEQ_SPLIT_33(x) (x) BOOST_PP_SEQ_SPLIT_32 +# define BOOST_PP_SEQ_SPLIT_34(x) (x) BOOST_PP_SEQ_SPLIT_33 +# define BOOST_PP_SEQ_SPLIT_35(x) (x) BOOST_PP_SEQ_SPLIT_34 +# define BOOST_PP_SEQ_SPLIT_36(x) (x) BOOST_PP_SEQ_SPLIT_35 +# define BOOST_PP_SEQ_SPLIT_37(x) (x) BOOST_PP_SEQ_SPLIT_36 +# define BOOST_PP_SEQ_SPLIT_38(x) (x) BOOST_PP_SEQ_SPLIT_37 +# define BOOST_PP_SEQ_SPLIT_39(x) (x) BOOST_PP_SEQ_SPLIT_38 +# define BOOST_PP_SEQ_SPLIT_40(x) (x) BOOST_PP_SEQ_SPLIT_39 +# define BOOST_PP_SEQ_SPLIT_41(x) (x) BOOST_PP_SEQ_SPLIT_40 +# define BOOST_PP_SEQ_SPLIT_42(x) (x) BOOST_PP_SEQ_SPLIT_41 +# define BOOST_PP_SEQ_SPLIT_43(x) (x) BOOST_PP_SEQ_SPLIT_42 +# define BOOST_PP_SEQ_SPLIT_44(x) (x) BOOST_PP_SEQ_SPLIT_43 +# define BOOST_PP_SEQ_SPLIT_45(x) (x) BOOST_PP_SEQ_SPLIT_44 +# define BOOST_PP_SEQ_SPLIT_46(x) (x) BOOST_PP_SEQ_SPLIT_45 +# define BOOST_PP_SEQ_SPLIT_47(x) (x) BOOST_PP_SEQ_SPLIT_46 +# define BOOST_PP_SEQ_SPLIT_48(x) (x) BOOST_PP_SEQ_SPLIT_47 +# define BOOST_PP_SEQ_SPLIT_49(x) (x) BOOST_PP_SEQ_SPLIT_48 +# define BOOST_PP_SEQ_SPLIT_50(x) (x) BOOST_PP_SEQ_SPLIT_49 +# define BOOST_PP_SEQ_SPLIT_51(x) (x) BOOST_PP_SEQ_SPLIT_50 +# define BOOST_PP_SEQ_SPLIT_52(x) (x) BOOST_PP_SEQ_SPLIT_51 +# define BOOST_PP_SEQ_SPLIT_53(x) (x) BOOST_PP_SEQ_SPLIT_52 +# define BOOST_PP_SEQ_SPLIT_54(x) (x) BOOST_PP_SEQ_SPLIT_53 +# define BOOST_PP_SEQ_SPLIT_55(x) (x) BOOST_PP_SEQ_SPLIT_54 +# define BOOST_PP_SEQ_SPLIT_56(x) (x) BOOST_PP_SEQ_SPLIT_55 +# define BOOST_PP_SEQ_SPLIT_57(x) (x) BOOST_PP_SEQ_SPLIT_56 +# define BOOST_PP_SEQ_SPLIT_58(x) (x) BOOST_PP_SEQ_SPLIT_57 +# define BOOST_PP_SEQ_SPLIT_59(x) (x) BOOST_PP_SEQ_SPLIT_58 +# define BOOST_PP_SEQ_SPLIT_60(x) (x) BOOST_PP_SEQ_SPLIT_59 +# define BOOST_PP_SEQ_SPLIT_61(x) (x) BOOST_PP_SEQ_SPLIT_60 +# define BOOST_PP_SEQ_SPLIT_62(x) (x) BOOST_PP_SEQ_SPLIT_61 +# define BOOST_PP_SEQ_SPLIT_63(x) (x) BOOST_PP_SEQ_SPLIT_62 +# define BOOST_PP_SEQ_SPLIT_64(x) (x) BOOST_PP_SEQ_SPLIT_63 +# define BOOST_PP_SEQ_SPLIT_65(x) (x) BOOST_PP_SEQ_SPLIT_64 +# define BOOST_PP_SEQ_SPLIT_66(x) (x) BOOST_PP_SEQ_SPLIT_65 +# define BOOST_PP_SEQ_SPLIT_67(x) (x) BOOST_PP_SEQ_SPLIT_66 +# define BOOST_PP_SEQ_SPLIT_68(x) (x) BOOST_PP_SEQ_SPLIT_67 +# define BOOST_PP_SEQ_SPLIT_69(x) (x) BOOST_PP_SEQ_SPLIT_68 +# define BOOST_PP_SEQ_SPLIT_70(x) (x) BOOST_PP_SEQ_SPLIT_69 +# define BOOST_PP_SEQ_SPLIT_71(x) (x) BOOST_PP_SEQ_SPLIT_70 +# define BOOST_PP_SEQ_SPLIT_72(x) (x) BOOST_PP_SEQ_SPLIT_71 +# define BOOST_PP_SEQ_SPLIT_73(x) (x) BOOST_PP_SEQ_SPLIT_72 +# define BOOST_PP_SEQ_SPLIT_74(x) (x) BOOST_PP_SEQ_SPLIT_73 +# define BOOST_PP_SEQ_SPLIT_75(x) (x) BOOST_PP_SEQ_SPLIT_74 +# define BOOST_PP_SEQ_SPLIT_76(x) (x) BOOST_PP_SEQ_SPLIT_75 +# define BOOST_PP_SEQ_SPLIT_77(x) (x) BOOST_PP_SEQ_SPLIT_76 +# define BOOST_PP_SEQ_SPLIT_78(x) (x) BOOST_PP_SEQ_SPLIT_77 +# define BOOST_PP_SEQ_SPLIT_79(x) (x) BOOST_PP_SEQ_SPLIT_78 +# define BOOST_PP_SEQ_SPLIT_80(x) (x) BOOST_PP_SEQ_SPLIT_79 +# define BOOST_PP_SEQ_SPLIT_81(x) (x) BOOST_PP_SEQ_SPLIT_80 +# define BOOST_PP_SEQ_SPLIT_82(x) (x) BOOST_PP_SEQ_SPLIT_81 +# define BOOST_PP_SEQ_SPLIT_83(x) (x) BOOST_PP_SEQ_SPLIT_82 +# define BOOST_PP_SEQ_SPLIT_84(x) (x) BOOST_PP_SEQ_SPLIT_83 +# define BOOST_PP_SEQ_SPLIT_85(x) (x) BOOST_PP_SEQ_SPLIT_84 +# define BOOST_PP_SEQ_SPLIT_86(x) (x) BOOST_PP_SEQ_SPLIT_85 +# define BOOST_PP_SEQ_SPLIT_87(x) (x) BOOST_PP_SEQ_SPLIT_86 +# define BOOST_PP_SEQ_SPLIT_88(x) (x) BOOST_PP_SEQ_SPLIT_87 +# define BOOST_PP_SEQ_SPLIT_89(x) (x) BOOST_PP_SEQ_SPLIT_88 +# define BOOST_PP_SEQ_SPLIT_90(x) (x) BOOST_PP_SEQ_SPLIT_89 +# define BOOST_PP_SEQ_SPLIT_91(x) (x) BOOST_PP_SEQ_SPLIT_90 +# define BOOST_PP_SEQ_SPLIT_92(x) (x) BOOST_PP_SEQ_SPLIT_91 +# define BOOST_PP_SEQ_SPLIT_93(x) (x) BOOST_PP_SEQ_SPLIT_92 +# define BOOST_PP_SEQ_SPLIT_94(x) (x) BOOST_PP_SEQ_SPLIT_93 +# define BOOST_PP_SEQ_SPLIT_95(x) (x) BOOST_PP_SEQ_SPLIT_94 +# define BOOST_PP_SEQ_SPLIT_96(x) (x) BOOST_PP_SEQ_SPLIT_95 +# define BOOST_PP_SEQ_SPLIT_97(x) (x) BOOST_PP_SEQ_SPLIT_96 +# define BOOST_PP_SEQ_SPLIT_98(x) (x) BOOST_PP_SEQ_SPLIT_97 +# define BOOST_PP_SEQ_SPLIT_99(x) (x) BOOST_PP_SEQ_SPLIT_98 +# define BOOST_PP_SEQ_SPLIT_100(x) (x) BOOST_PP_SEQ_SPLIT_99 +# define BOOST_PP_SEQ_SPLIT_101(x) (x) BOOST_PP_SEQ_SPLIT_100 +# define BOOST_PP_SEQ_SPLIT_102(x) (x) BOOST_PP_SEQ_SPLIT_101 +# define BOOST_PP_SEQ_SPLIT_103(x) (x) BOOST_PP_SEQ_SPLIT_102 +# define BOOST_PP_SEQ_SPLIT_104(x) (x) BOOST_PP_SEQ_SPLIT_103 +# define BOOST_PP_SEQ_SPLIT_105(x) (x) BOOST_PP_SEQ_SPLIT_104 +# define BOOST_PP_SEQ_SPLIT_106(x) (x) BOOST_PP_SEQ_SPLIT_105 +# define BOOST_PP_SEQ_SPLIT_107(x) (x) BOOST_PP_SEQ_SPLIT_106 +# define BOOST_PP_SEQ_SPLIT_108(x) (x) BOOST_PP_SEQ_SPLIT_107 +# define BOOST_PP_SEQ_SPLIT_109(x) (x) BOOST_PP_SEQ_SPLIT_108 +# define BOOST_PP_SEQ_SPLIT_110(x) (x) BOOST_PP_SEQ_SPLIT_109 +# define BOOST_PP_SEQ_SPLIT_111(x) (x) BOOST_PP_SEQ_SPLIT_110 +# define BOOST_PP_SEQ_SPLIT_112(x) (x) BOOST_PP_SEQ_SPLIT_111 +# define BOOST_PP_SEQ_SPLIT_113(x) (x) BOOST_PP_SEQ_SPLIT_112 +# define BOOST_PP_SEQ_SPLIT_114(x) (x) BOOST_PP_SEQ_SPLIT_113 +# define BOOST_PP_SEQ_SPLIT_115(x) (x) BOOST_PP_SEQ_SPLIT_114 +# define BOOST_PP_SEQ_SPLIT_116(x) (x) BOOST_PP_SEQ_SPLIT_115 +# define BOOST_PP_SEQ_SPLIT_117(x) (x) BOOST_PP_SEQ_SPLIT_116 +# define BOOST_PP_SEQ_SPLIT_118(x) (x) BOOST_PP_SEQ_SPLIT_117 +# define BOOST_PP_SEQ_SPLIT_119(x) (x) BOOST_PP_SEQ_SPLIT_118 +# define BOOST_PP_SEQ_SPLIT_120(x) (x) BOOST_PP_SEQ_SPLIT_119 +# define BOOST_PP_SEQ_SPLIT_121(x) (x) BOOST_PP_SEQ_SPLIT_120 +# define BOOST_PP_SEQ_SPLIT_122(x) (x) BOOST_PP_SEQ_SPLIT_121 +# define BOOST_PP_SEQ_SPLIT_123(x) (x) BOOST_PP_SEQ_SPLIT_122 +# define BOOST_PP_SEQ_SPLIT_124(x) (x) BOOST_PP_SEQ_SPLIT_123 +# define BOOST_PP_SEQ_SPLIT_125(x) (x) BOOST_PP_SEQ_SPLIT_124 +# define BOOST_PP_SEQ_SPLIT_126(x) (x) BOOST_PP_SEQ_SPLIT_125 +# define BOOST_PP_SEQ_SPLIT_127(x) (x) BOOST_PP_SEQ_SPLIT_126 +# define BOOST_PP_SEQ_SPLIT_128(x) (x) BOOST_PP_SEQ_SPLIT_127 +# define BOOST_PP_SEQ_SPLIT_129(x) (x) BOOST_PP_SEQ_SPLIT_128 +# define BOOST_PP_SEQ_SPLIT_130(x) (x) BOOST_PP_SEQ_SPLIT_129 +# define BOOST_PP_SEQ_SPLIT_131(x) (x) BOOST_PP_SEQ_SPLIT_130 +# define BOOST_PP_SEQ_SPLIT_132(x) (x) BOOST_PP_SEQ_SPLIT_131 +# define BOOST_PP_SEQ_SPLIT_133(x) (x) BOOST_PP_SEQ_SPLIT_132 +# define BOOST_PP_SEQ_SPLIT_134(x) (x) BOOST_PP_SEQ_SPLIT_133 +# define BOOST_PP_SEQ_SPLIT_135(x) (x) BOOST_PP_SEQ_SPLIT_134 +# define BOOST_PP_SEQ_SPLIT_136(x) (x) BOOST_PP_SEQ_SPLIT_135 +# define BOOST_PP_SEQ_SPLIT_137(x) (x) BOOST_PP_SEQ_SPLIT_136 +# define BOOST_PP_SEQ_SPLIT_138(x) (x) BOOST_PP_SEQ_SPLIT_137 +# define BOOST_PP_SEQ_SPLIT_139(x) (x) BOOST_PP_SEQ_SPLIT_138 +# define BOOST_PP_SEQ_SPLIT_140(x) (x) BOOST_PP_SEQ_SPLIT_139 +# define BOOST_PP_SEQ_SPLIT_141(x) (x) BOOST_PP_SEQ_SPLIT_140 +# define BOOST_PP_SEQ_SPLIT_142(x) (x) BOOST_PP_SEQ_SPLIT_141 +# define BOOST_PP_SEQ_SPLIT_143(x) (x) BOOST_PP_SEQ_SPLIT_142 +# define BOOST_PP_SEQ_SPLIT_144(x) (x) BOOST_PP_SEQ_SPLIT_143 +# define BOOST_PP_SEQ_SPLIT_145(x) (x) BOOST_PP_SEQ_SPLIT_144 +# define BOOST_PP_SEQ_SPLIT_146(x) (x) BOOST_PP_SEQ_SPLIT_145 +# define BOOST_PP_SEQ_SPLIT_147(x) (x) BOOST_PP_SEQ_SPLIT_146 +# define BOOST_PP_SEQ_SPLIT_148(x) (x) BOOST_PP_SEQ_SPLIT_147 +# define BOOST_PP_SEQ_SPLIT_149(x) (x) BOOST_PP_SEQ_SPLIT_148 +# define BOOST_PP_SEQ_SPLIT_150(x) (x) BOOST_PP_SEQ_SPLIT_149 +# define BOOST_PP_SEQ_SPLIT_151(x) (x) BOOST_PP_SEQ_SPLIT_150 +# define BOOST_PP_SEQ_SPLIT_152(x) (x) BOOST_PP_SEQ_SPLIT_151 +# define BOOST_PP_SEQ_SPLIT_153(x) (x) BOOST_PP_SEQ_SPLIT_152 +# define BOOST_PP_SEQ_SPLIT_154(x) (x) BOOST_PP_SEQ_SPLIT_153 +# define BOOST_PP_SEQ_SPLIT_155(x) (x) BOOST_PP_SEQ_SPLIT_154 +# define BOOST_PP_SEQ_SPLIT_156(x) (x) BOOST_PP_SEQ_SPLIT_155 +# define BOOST_PP_SEQ_SPLIT_157(x) (x) BOOST_PP_SEQ_SPLIT_156 +# define BOOST_PP_SEQ_SPLIT_158(x) (x) BOOST_PP_SEQ_SPLIT_157 +# define BOOST_PP_SEQ_SPLIT_159(x) (x) BOOST_PP_SEQ_SPLIT_158 +# define BOOST_PP_SEQ_SPLIT_160(x) (x) BOOST_PP_SEQ_SPLIT_159 +# define BOOST_PP_SEQ_SPLIT_161(x) (x) BOOST_PP_SEQ_SPLIT_160 +# define BOOST_PP_SEQ_SPLIT_162(x) (x) BOOST_PP_SEQ_SPLIT_161 +# define BOOST_PP_SEQ_SPLIT_163(x) (x) BOOST_PP_SEQ_SPLIT_162 +# define BOOST_PP_SEQ_SPLIT_164(x) (x) BOOST_PP_SEQ_SPLIT_163 +# define BOOST_PP_SEQ_SPLIT_165(x) (x) BOOST_PP_SEQ_SPLIT_164 +# define BOOST_PP_SEQ_SPLIT_166(x) (x) BOOST_PP_SEQ_SPLIT_165 +# define BOOST_PP_SEQ_SPLIT_167(x) (x) BOOST_PP_SEQ_SPLIT_166 +# define BOOST_PP_SEQ_SPLIT_168(x) (x) BOOST_PP_SEQ_SPLIT_167 +# define BOOST_PP_SEQ_SPLIT_169(x) (x) BOOST_PP_SEQ_SPLIT_168 +# define BOOST_PP_SEQ_SPLIT_170(x) (x) BOOST_PP_SEQ_SPLIT_169 +# define BOOST_PP_SEQ_SPLIT_171(x) (x) BOOST_PP_SEQ_SPLIT_170 +# define BOOST_PP_SEQ_SPLIT_172(x) (x) BOOST_PP_SEQ_SPLIT_171 +# define BOOST_PP_SEQ_SPLIT_173(x) (x) BOOST_PP_SEQ_SPLIT_172 +# define BOOST_PP_SEQ_SPLIT_174(x) (x) BOOST_PP_SEQ_SPLIT_173 +# define BOOST_PP_SEQ_SPLIT_175(x) (x) BOOST_PP_SEQ_SPLIT_174 +# define BOOST_PP_SEQ_SPLIT_176(x) (x) BOOST_PP_SEQ_SPLIT_175 +# define BOOST_PP_SEQ_SPLIT_177(x) (x) BOOST_PP_SEQ_SPLIT_176 +# define BOOST_PP_SEQ_SPLIT_178(x) (x) BOOST_PP_SEQ_SPLIT_177 +# define BOOST_PP_SEQ_SPLIT_179(x) (x) BOOST_PP_SEQ_SPLIT_178 +# define BOOST_PP_SEQ_SPLIT_180(x) (x) BOOST_PP_SEQ_SPLIT_179 +# define BOOST_PP_SEQ_SPLIT_181(x) (x) BOOST_PP_SEQ_SPLIT_180 +# define BOOST_PP_SEQ_SPLIT_182(x) (x) BOOST_PP_SEQ_SPLIT_181 +# define BOOST_PP_SEQ_SPLIT_183(x) (x) BOOST_PP_SEQ_SPLIT_182 +# define BOOST_PP_SEQ_SPLIT_184(x) (x) BOOST_PP_SEQ_SPLIT_183 +# define BOOST_PP_SEQ_SPLIT_185(x) (x) BOOST_PP_SEQ_SPLIT_184 +# define BOOST_PP_SEQ_SPLIT_186(x) (x) BOOST_PP_SEQ_SPLIT_185 +# define BOOST_PP_SEQ_SPLIT_187(x) (x) BOOST_PP_SEQ_SPLIT_186 +# define BOOST_PP_SEQ_SPLIT_188(x) (x) BOOST_PP_SEQ_SPLIT_187 +# define BOOST_PP_SEQ_SPLIT_189(x) (x) BOOST_PP_SEQ_SPLIT_188 +# define BOOST_PP_SEQ_SPLIT_190(x) (x) BOOST_PP_SEQ_SPLIT_189 +# define BOOST_PP_SEQ_SPLIT_191(x) (x) BOOST_PP_SEQ_SPLIT_190 +# define BOOST_PP_SEQ_SPLIT_192(x) (x) BOOST_PP_SEQ_SPLIT_191 +# define BOOST_PP_SEQ_SPLIT_193(x) (x) BOOST_PP_SEQ_SPLIT_192 +# define BOOST_PP_SEQ_SPLIT_194(x) (x) BOOST_PP_SEQ_SPLIT_193 +# define BOOST_PP_SEQ_SPLIT_195(x) (x) BOOST_PP_SEQ_SPLIT_194 +# define BOOST_PP_SEQ_SPLIT_196(x) (x) BOOST_PP_SEQ_SPLIT_195 +# define BOOST_PP_SEQ_SPLIT_197(x) (x) BOOST_PP_SEQ_SPLIT_196 +# define BOOST_PP_SEQ_SPLIT_198(x) (x) BOOST_PP_SEQ_SPLIT_197 +# define BOOST_PP_SEQ_SPLIT_199(x) (x) BOOST_PP_SEQ_SPLIT_198 +# define BOOST_PP_SEQ_SPLIT_200(x) (x) BOOST_PP_SEQ_SPLIT_199 +# define BOOST_PP_SEQ_SPLIT_201(x) (x) BOOST_PP_SEQ_SPLIT_200 +# define BOOST_PP_SEQ_SPLIT_202(x) (x) BOOST_PP_SEQ_SPLIT_201 +# define BOOST_PP_SEQ_SPLIT_203(x) (x) BOOST_PP_SEQ_SPLIT_202 +# define BOOST_PP_SEQ_SPLIT_204(x) (x) BOOST_PP_SEQ_SPLIT_203 +# define BOOST_PP_SEQ_SPLIT_205(x) (x) BOOST_PP_SEQ_SPLIT_204 +# define BOOST_PP_SEQ_SPLIT_206(x) (x) BOOST_PP_SEQ_SPLIT_205 +# define BOOST_PP_SEQ_SPLIT_207(x) (x) BOOST_PP_SEQ_SPLIT_206 +# define BOOST_PP_SEQ_SPLIT_208(x) (x) BOOST_PP_SEQ_SPLIT_207 +# define BOOST_PP_SEQ_SPLIT_209(x) (x) BOOST_PP_SEQ_SPLIT_208 +# define BOOST_PP_SEQ_SPLIT_210(x) (x) BOOST_PP_SEQ_SPLIT_209 +# define BOOST_PP_SEQ_SPLIT_211(x) (x) BOOST_PP_SEQ_SPLIT_210 +# define BOOST_PP_SEQ_SPLIT_212(x) (x) BOOST_PP_SEQ_SPLIT_211 +# define BOOST_PP_SEQ_SPLIT_213(x) (x) BOOST_PP_SEQ_SPLIT_212 +# define BOOST_PP_SEQ_SPLIT_214(x) (x) BOOST_PP_SEQ_SPLIT_213 +# define BOOST_PP_SEQ_SPLIT_215(x) (x) BOOST_PP_SEQ_SPLIT_214 +# define BOOST_PP_SEQ_SPLIT_216(x) (x) BOOST_PP_SEQ_SPLIT_215 +# define BOOST_PP_SEQ_SPLIT_217(x) (x) BOOST_PP_SEQ_SPLIT_216 +# define BOOST_PP_SEQ_SPLIT_218(x) (x) BOOST_PP_SEQ_SPLIT_217 +# define BOOST_PP_SEQ_SPLIT_219(x) (x) BOOST_PP_SEQ_SPLIT_218 +# define BOOST_PP_SEQ_SPLIT_220(x) (x) BOOST_PP_SEQ_SPLIT_219 +# define BOOST_PP_SEQ_SPLIT_221(x) (x) BOOST_PP_SEQ_SPLIT_220 +# define BOOST_PP_SEQ_SPLIT_222(x) (x) BOOST_PP_SEQ_SPLIT_221 +# define BOOST_PP_SEQ_SPLIT_223(x) (x) BOOST_PP_SEQ_SPLIT_222 +# define BOOST_PP_SEQ_SPLIT_224(x) (x) BOOST_PP_SEQ_SPLIT_223 +# define BOOST_PP_SEQ_SPLIT_225(x) (x) BOOST_PP_SEQ_SPLIT_224 +# define BOOST_PP_SEQ_SPLIT_226(x) (x) BOOST_PP_SEQ_SPLIT_225 +# define BOOST_PP_SEQ_SPLIT_227(x) (x) BOOST_PP_SEQ_SPLIT_226 +# define BOOST_PP_SEQ_SPLIT_228(x) (x) BOOST_PP_SEQ_SPLIT_227 +# define BOOST_PP_SEQ_SPLIT_229(x) (x) BOOST_PP_SEQ_SPLIT_228 +# define BOOST_PP_SEQ_SPLIT_230(x) (x) BOOST_PP_SEQ_SPLIT_229 +# define BOOST_PP_SEQ_SPLIT_231(x) (x) BOOST_PP_SEQ_SPLIT_230 +# define BOOST_PP_SEQ_SPLIT_232(x) (x) BOOST_PP_SEQ_SPLIT_231 +# define BOOST_PP_SEQ_SPLIT_233(x) (x) BOOST_PP_SEQ_SPLIT_232 +# define BOOST_PP_SEQ_SPLIT_234(x) (x) BOOST_PP_SEQ_SPLIT_233 +# define BOOST_PP_SEQ_SPLIT_235(x) (x) BOOST_PP_SEQ_SPLIT_234 +# define BOOST_PP_SEQ_SPLIT_236(x) (x) BOOST_PP_SEQ_SPLIT_235 +# define BOOST_PP_SEQ_SPLIT_237(x) (x) BOOST_PP_SEQ_SPLIT_236 +# define BOOST_PP_SEQ_SPLIT_238(x) (x) BOOST_PP_SEQ_SPLIT_237 +# define BOOST_PP_SEQ_SPLIT_239(x) (x) BOOST_PP_SEQ_SPLIT_238 +# define BOOST_PP_SEQ_SPLIT_240(x) (x) BOOST_PP_SEQ_SPLIT_239 +# define BOOST_PP_SEQ_SPLIT_241(x) (x) BOOST_PP_SEQ_SPLIT_240 +# define BOOST_PP_SEQ_SPLIT_242(x) (x) BOOST_PP_SEQ_SPLIT_241 +# define BOOST_PP_SEQ_SPLIT_243(x) (x) BOOST_PP_SEQ_SPLIT_242 +# define BOOST_PP_SEQ_SPLIT_244(x) (x) BOOST_PP_SEQ_SPLIT_243 +# define BOOST_PP_SEQ_SPLIT_245(x) (x) BOOST_PP_SEQ_SPLIT_244 +# define BOOST_PP_SEQ_SPLIT_246(x) (x) BOOST_PP_SEQ_SPLIT_245 +# define BOOST_PP_SEQ_SPLIT_247(x) (x) BOOST_PP_SEQ_SPLIT_246 +# define BOOST_PP_SEQ_SPLIT_248(x) (x) BOOST_PP_SEQ_SPLIT_247 +# define BOOST_PP_SEQ_SPLIT_249(x) (x) BOOST_PP_SEQ_SPLIT_248 +# define BOOST_PP_SEQ_SPLIT_250(x) (x) BOOST_PP_SEQ_SPLIT_249 +# define BOOST_PP_SEQ_SPLIT_251(x) (x) BOOST_PP_SEQ_SPLIT_250 +# define BOOST_PP_SEQ_SPLIT_252(x) (x) BOOST_PP_SEQ_SPLIT_251 +# define BOOST_PP_SEQ_SPLIT_253(x) (x) BOOST_PP_SEQ_SPLIT_252 +# define BOOST_PP_SEQ_SPLIT_254(x) (x) BOOST_PP_SEQ_SPLIT_253 +# define BOOST_PP_SEQ_SPLIT_255(x) (x) BOOST_PP_SEQ_SPLIT_254 +# define BOOST_PP_SEQ_SPLIT_256(x) (x) BOOST_PP_SEQ_SPLIT_255 +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/seq/elem.hpp b/ThirdParty/boost-Subset/boost/preprocessor/seq/elem.hpp new file mode 100644 index 0000000000..9c7a4b2766 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/seq/elem.hpp @@ -0,0 +1,304 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_ELEM_HPP +# define BOOST_PREPROCESSOR_SEQ_ELEM_HPP +# +# include +# include +# include +# +# /* BOOST_PP_SEQ_ELEM */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_SEQ_ELEM(i, seq) BOOST_PP_SEQ_ELEM_I(i, seq) +# else +# define BOOST_PP_SEQ_ELEM(i, seq) BOOST_PP_SEQ_ELEM_I((i, seq)) +# endif +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_SEQ_ELEM_I(i, seq) BOOST_PP_SEQ_ELEM_II((BOOST_PP_SEQ_ELEM_ ## i seq)) +# define BOOST_PP_SEQ_ELEM_II(res) BOOST_PP_SEQ_ELEM_IV(BOOST_PP_SEQ_ELEM_III res) +# define BOOST_PP_SEQ_ELEM_III(x, _) x BOOST_PP_EMPTY() +# define BOOST_PP_SEQ_ELEM_IV(x) x +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_SEQ_ELEM_I(par) BOOST_PP_SEQ_ELEM_II ## par +# define BOOST_PP_SEQ_ELEM_II(i, seq) BOOST_PP_SEQ_ELEM_III(BOOST_PP_SEQ_ELEM_ ## i ## seq) +# define BOOST_PP_SEQ_ELEM_III(im) BOOST_PP_SEQ_ELEM_IV(im) +# define BOOST_PP_SEQ_ELEM_IV(x, _) x +# else +# if defined(__IBMC__) || defined(__IBMCPP__) +# define BOOST_PP_SEQ_ELEM_I(i, seq) BOOST_PP_SEQ_ELEM_II(BOOST_PP_CAT(BOOST_PP_SEQ_ELEM_ ## i, seq)) +# else +# define BOOST_PP_SEQ_ELEM_I(i, seq) BOOST_PP_SEQ_ELEM_II(BOOST_PP_SEQ_ELEM_ ## i seq) +# endif +# define BOOST_PP_SEQ_ELEM_II(im) BOOST_PP_SEQ_ELEM_III(im) +# define BOOST_PP_SEQ_ELEM_III(x, _) x +# endif +# +# define BOOST_PP_SEQ_ELEM_0(x) x, BOOST_PP_NIL +# define BOOST_PP_SEQ_ELEM_1(_) BOOST_PP_SEQ_ELEM_0 +# define BOOST_PP_SEQ_ELEM_2(_) BOOST_PP_SEQ_ELEM_1 +# define BOOST_PP_SEQ_ELEM_3(_) BOOST_PP_SEQ_ELEM_2 +# define BOOST_PP_SEQ_ELEM_4(_) BOOST_PP_SEQ_ELEM_3 +# define BOOST_PP_SEQ_ELEM_5(_) BOOST_PP_SEQ_ELEM_4 +# define BOOST_PP_SEQ_ELEM_6(_) BOOST_PP_SEQ_ELEM_5 +# define BOOST_PP_SEQ_ELEM_7(_) BOOST_PP_SEQ_ELEM_6 +# define BOOST_PP_SEQ_ELEM_8(_) BOOST_PP_SEQ_ELEM_7 +# define BOOST_PP_SEQ_ELEM_9(_) BOOST_PP_SEQ_ELEM_8 +# define BOOST_PP_SEQ_ELEM_10(_) BOOST_PP_SEQ_ELEM_9 +# define BOOST_PP_SEQ_ELEM_11(_) BOOST_PP_SEQ_ELEM_10 +# define BOOST_PP_SEQ_ELEM_12(_) BOOST_PP_SEQ_ELEM_11 +# define BOOST_PP_SEQ_ELEM_13(_) BOOST_PP_SEQ_ELEM_12 +# define BOOST_PP_SEQ_ELEM_14(_) BOOST_PP_SEQ_ELEM_13 +# define BOOST_PP_SEQ_ELEM_15(_) BOOST_PP_SEQ_ELEM_14 +# define BOOST_PP_SEQ_ELEM_16(_) BOOST_PP_SEQ_ELEM_15 +# define BOOST_PP_SEQ_ELEM_17(_) BOOST_PP_SEQ_ELEM_16 +# define BOOST_PP_SEQ_ELEM_18(_) BOOST_PP_SEQ_ELEM_17 +# define BOOST_PP_SEQ_ELEM_19(_) BOOST_PP_SEQ_ELEM_18 +# define BOOST_PP_SEQ_ELEM_20(_) BOOST_PP_SEQ_ELEM_19 +# define BOOST_PP_SEQ_ELEM_21(_) BOOST_PP_SEQ_ELEM_20 +# define BOOST_PP_SEQ_ELEM_22(_) BOOST_PP_SEQ_ELEM_21 +# define BOOST_PP_SEQ_ELEM_23(_) BOOST_PP_SEQ_ELEM_22 +# define BOOST_PP_SEQ_ELEM_24(_) BOOST_PP_SEQ_ELEM_23 +# define BOOST_PP_SEQ_ELEM_25(_) BOOST_PP_SEQ_ELEM_24 +# define BOOST_PP_SEQ_ELEM_26(_) BOOST_PP_SEQ_ELEM_25 +# define BOOST_PP_SEQ_ELEM_27(_) BOOST_PP_SEQ_ELEM_26 +# define BOOST_PP_SEQ_ELEM_28(_) BOOST_PP_SEQ_ELEM_27 +# define BOOST_PP_SEQ_ELEM_29(_) BOOST_PP_SEQ_ELEM_28 +# define BOOST_PP_SEQ_ELEM_30(_) BOOST_PP_SEQ_ELEM_29 +# define BOOST_PP_SEQ_ELEM_31(_) BOOST_PP_SEQ_ELEM_30 +# define BOOST_PP_SEQ_ELEM_32(_) BOOST_PP_SEQ_ELEM_31 +# define BOOST_PP_SEQ_ELEM_33(_) BOOST_PP_SEQ_ELEM_32 +# define BOOST_PP_SEQ_ELEM_34(_) BOOST_PP_SEQ_ELEM_33 +# define BOOST_PP_SEQ_ELEM_35(_) BOOST_PP_SEQ_ELEM_34 +# define BOOST_PP_SEQ_ELEM_36(_) BOOST_PP_SEQ_ELEM_35 +# define BOOST_PP_SEQ_ELEM_37(_) BOOST_PP_SEQ_ELEM_36 +# define BOOST_PP_SEQ_ELEM_38(_) BOOST_PP_SEQ_ELEM_37 +# define BOOST_PP_SEQ_ELEM_39(_) BOOST_PP_SEQ_ELEM_38 +# define BOOST_PP_SEQ_ELEM_40(_) BOOST_PP_SEQ_ELEM_39 +# define BOOST_PP_SEQ_ELEM_41(_) BOOST_PP_SEQ_ELEM_40 +# define BOOST_PP_SEQ_ELEM_42(_) BOOST_PP_SEQ_ELEM_41 +# define BOOST_PP_SEQ_ELEM_43(_) BOOST_PP_SEQ_ELEM_42 +# define BOOST_PP_SEQ_ELEM_44(_) BOOST_PP_SEQ_ELEM_43 +# define BOOST_PP_SEQ_ELEM_45(_) BOOST_PP_SEQ_ELEM_44 +# define BOOST_PP_SEQ_ELEM_46(_) BOOST_PP_SEQ_ELEM_45 +# define BOOST_PP_SEQ_ELEM_47(_) BOOST_PP_SEQ_ELEM_46 +# define BOOST_PP_SEQ_ELEM_48(_) BOOST_PP_SEQ_ELEM_47 +# define BOOST_PP_SEQ_ELEM_49(_) BOOST_PP_SEQ_ELEM_48 +# define BOOST_PP_SEQ_ELEM_50(_) BOOST_PP_SEQ_ELEM_49 +# define BOOST_PP_SEQ_ELEM_51(_) BOOST_PP_SEQ_ELEM_50 +# define BOOST_PP_SEQ_ELEM_52(_) BOOST_PP_SEQ_ELEM_51 +# define BOOST_PP_SEQ_ELEM_53(_) BOOST_PP_SEQ_ELEM_52 +# define BOOST_PP_SEQ_ELEM_54(_) BOOST_PP_SEQ_ELEM_53 +# define BOOST_PP_SEQ_ELEM_55(_) BOOST_PP_SEQ_ELEM_54 +# define BOOST_PP_SEQ_ELEM_56(_) BOOST_PP_SEQ_ELEM_55 +# define BOOST_PP_SEQ_ELEM_57(_) BOOST_PP_SEQ_ELEM_56 +# define BOOST_PP_SEQ_ELEM_58(_) BOOST_PP_SEQ_ELEM_57 +# define BOOST_PP_SEQ_ELEM_59(_) BOOST_PP_SEQ_ELEM_58 +# define BOOST_PP_SEQ_ELEM_60(_) BOOST_PP_SEQ_ELEM_59 +# define BOOST_PP_SEQ_ELEM_61(_) BOOST_PP_SEQ_ELEM_60 +# define BOOST_PP_SEQ_ELEM_62(_) BOOST_PP_SEQ_ELEM_61 +# define BOOST_PP_SEQ_ELEM_63(_) BOOST_PP_SEQ_ELEM_62 +# define BOOST_PP_SEQ_ELEM_64(_) BOOST_PP_SEQ_ELEM_63 +# define BOOST_PP_SEQ_ELEM_65(_) BOOST_PP_SEQ_ELEM_64 +# define BOOST_PP_SEQ_ELEM_66(_) BOOST_PP_SEQ_ELEM_65 +# define BOOST_PP_SEQ_ELEM_67(_) BOOST_PP_SEQ_ELEM_66 +# define BOOST_PP_SEQ_ELEM_68(_) BOOST_PP_SEQ_ELEM_67 +# define BOOST_PP_SEQ_ELEM_69(_) BOOST_PP_SEQ_ELEM_68 +# define BOOST_PP_SEQ_ELEM_70(_) BOOST_PP_SEQ_ELEM_69 +# define BOOST_PP_SEQ_ELEM_71(_) BOOST_PP_SEQ_ELEM_70 +# define BOOST_PP_SEQ_ELEM_72(_) BOOST_PP_SEQ_ELEM_71 +# define BOOST_PP_SEQ_ELEM_73(_) BOOST_PP_SEQ_ELEM_72 +# define BOOST_PP_SEQ_ELEM_74(_) BOOST_PP_SEQ_ELEM_73 +# define BOOST_PP_SEQ_ELEM_75(_) BOOST_PP_SEQ_ELEM_74 +# define BOOST_PP_SEQ_ELEM_76(_) BOOST_PP_SEQ_ELEM_75 +# define BOOST_PP_SEQ_ELEM_77(_) BOOST_PP_SEQ_ELEM_76 +# define BOOST_PP_SEQ_ELEM_78(_) BOOST_PP_SEQ_ELEM_77 +# define BOOST_PP_SEQ_ELEM_79(_) BOOST_PP_SEQ_ELEM_78 +# define BOOST_PP_SEQ_ELEM_80(_) BOOST_PP_SEQ_ELEM_79 +# define BOOST_PP_SEQ_ELEM_81(_) BOOST_PP_SEQ_ELEM_80 +# define BOOST_PP_SEQ_ELEM_82(_) BOOST_PP_SEQ_ELEM_81 +# define BOOST_PP_SEQ_ELEM_83(_) BOOST_PP_SEQ_ELEM_82 +# define BOOST_PP_SEQ_ELEM_84(_) BOOST_PP_SEQ_ELEM_83 +# define BOOST_PP_SEQ_ELEM_85(_) BOOST_PP_SEQ_ELEM_84 +# define BOOST_PP_SEQ_ELEM_86(_) BOOST_PP_SEQ_ELEM_85 +# define BOOST_PP_SEQ_ELEM_87(_) BOOST_PP_SEQ_ELEM_86 +# define BOOST_PP_SEQ_ELEM_88(_) BOOST_PP_SEQ_ELEM_87 +# define BOOST_PP_SEQ_ELEM_89(_) BOOST_PP_SEQ_ELEM_88 +# define BOOST_PP_SEQ_ELEM_90(_) BOOST_PP_SEQ_ELEM_89 +# define BOOST_PP_SEQ_ELEM_91(_) BOOST_PP_SEQ_ELEM_90 +# define BOOST_PP_SEQ_ELEM_92(_) BOOST_PP_SEQ_ELEM_91 +# define BOOST_PP_SEQ_ELEM_93(_) BOOST_PP_SEQ_ELEM_92 +# define BOOST_PP_SEQ_ELEM_94(_) BOOST_PP_SEQ_ELEM_93 +# define BOOST_PP_SEQ_ELEM_95(_) BOOST_PP_SEQ_ELEM_94 +# define BOOST_PP_SEQ_ELEM_96(_) BOOST_PP_SEQ_ELEM_95 +# define BOOST_PP_SEQ_ELEM_97(_) BOOST_PP_SEQ_ELEM_96 +# define BOOST_PP_SEQ_ELEM_98(_) BOOST_PP_SEQ_ELEM_97 +# define BOOST_PP_SEQ_ELEM_99(_) BOOST_PP_SEQ_ELEM_98 +# define BOOST_PP_SEQ_ELEM_100(_) BOOST_PP_SEQ_ELEM_99 +# define BOOST_PP_SEQ_ELEM_101(_) BOOST_PP_SEQ_ELEM_100 +# define BOOST_PP_SEQ_ELEM_102(_) BOOST_PP_SEQ_ELEM_101 +# define BOOST_PP_SEQ_ELEM_103(_) BOOST_PP_SEQ_ELEM_102 +# define BOOST_PP_SEQ_ELEM_104(_) BOOST_PP_SEQ_ELEM_103 +# define BOOST_PP_SEQ_ELEM_105(_) BOOST_PP_SEQ_ELEM_104 +# define BOOST_PP_SEQ_ELEM_106(_) BOOST_PP_SEQ_ELEM_105 +# define BOOST_PP_SEQ_ELEM_107(_) BOOST_PP_SEQ_ELEM_106 +# define BOOST_PP_SEQ_ELEM_108(_) BOOST_PP_SEQ_ELEM_107 +# define BOOST_PP_SEQ_ELEM_109(_) BOOST_PP_SEQ_ELEM_108 +# define BOOST_PP_SEQ_ELEM_110(_) BOOST_PP_SEQ_ELEM_109 +# define BOOST_PP_SEQ_ELEM_111(_) BOOST_PP_SEQ_ELEM_110 +# define BOOST_PP_SEQ_ELEM_112(_) BOOST_PP_SEQ_ELEM_111 +# define BOOST_PP_SEQ_ELEM_113(_) BOOST_PP_SEQ_ELEM_112 +# define BOOST_PP_SEQ_ELEM_114(_) BOOST_PP_SEQ_ELEM_113 +# define BOOST_PP_SEQ_ELEM_115(_) BOOST_PP_SEQ_ELEM_114 +# define BOOST_PP_SEQ_ELEM_116(_) BOOST_PP_SEQ_ELEM_115 +# define BOOST_PP_SEQ_ELEM_117(_) BOOST_PP_SEQ_ELEM_116 +# define BOOST_PP_SEQ_ELEM_118(_) BOOST_PP_SEQ_ELEM_117 +# define BOOST_PP_SEQ_ELEM_119(_) BOOST_PP_SEQ_ELEM_118 +# define BOOST_PP_SEQ_ELEM_120(_) BOOST_PP_SEQ_ELEM_119 +# define BOOST_PP_SEQ_ELEM_121(_) BOOST_PP_SEQ_ELEM_120 +# define BOOST_PP_SEQ_ELEM_122(_) BOOST_PP_SEQ_ELEM_121 +# define BOOST_PP_SEQ_ELEM_123(_) BOOST_PP_SEQ_ELEM_122 +# define BOOST_PP_SEQ_ELEM_124(_) BOOST_PP_SEQ_ELEM_123 +# define BOOST_PP_SEQ_ELEM_125(_) BOOST_PP_SEQ_ELEM_124 +# define BOOST_PP_SEQ_ELEM_126(_) BOOST_PP_SEQ_ELEM_125 +# define BOOST_PP_SEQ_ELEM_127(_) BOOST_PP_SEQ_ELEM_126 +# define BOOST_PP_SEQ_ELEM_128(_) BOOST_PP_SEQ_ELEM_127 +# define BOOST_PP_SEQ_ELEM_129(_) BOOST_PP_SEQ_ELEM_128 +# define BOOST_PP_SEQ_ELEM_130(_) BOOST_PP_SEQ_ELEM_129 +# define BOOST_PP_SEQ_ELEM_131(_) BOOST_PP_SEQ_ELEM_130 +# define BOOST_PP_SEQ_ELEM_132(_) BOOST_PP_SEQ_ELEM_131 +# define BOOST_PP_SEQ_ELEM_133(_) BOOST_PP_SEQ_ELEM_132 +# define BOOST_PP_SEQ_ELEM_134(_) BOOST_PP_SEQ_ELEM_133 +# define BOOST_PP_SEQ_ELEM_135(_) BOOST_PP_SEQ_ELEM_134 +# define BOOST_PP_SEQ_ELEM_136(_) BOOST_PP_SEQ_ELEM_135 +# define BOOST_PP_SEQ_ELEM_137(_) BOOST_PP_SEQ_ELEM_136 +# define BOOST_PP_SEQ_ELEM_138(_) BOOST_PP_SEQ_ELEM_137 +# define BOOST_PP_SEQ_ELEM_139(_) BOOST_PP_SEQ_ELEM_138 +# define BOOST_PP_SEQ_ELEM_140(_) BOOST_PP_SEQ_ELEM_139 +# define BOOST_PP_SEQ_ELEM_141(_) BOOST_PP_SEQ_ELEM_140 +# define BOOST_PP_SEQ_ELEM_142(_) BOOST_PP_SEQ_ELEM_141 +# define BOOST_PP_SEQ_ELEM_143(_) BOOST_PP_SEQ_ELEM_142 +# define BOOST_PP_SEQ_ELEM_144(_) BOOST_PP_SEQ_ELEM_143 +# define BOOST_PP_SEQ_ELEM_145(_) BOOST_PP_SEQ_ELEM_144 +# define BOOST_PP_SEQ_ELEM_146(_) BOOST_PP_SEQ_ELEM_145 +# define BOOST_PP_SEQ_ELEM_147(_) BOOST_PP_SEQ_ELEM_146 +# define BOOST_PP_SEQ_ELEM_148(_) BOOST_PP_SEQ_ELEM_147 +# define BOOST_PP_SEQ_ELEM_149(_) BOOST_PP_SEQ_ELEM_148 +# define BOOST_PP_SEQ_ELEM_150(_) BOOST_PP_SEQ_ELEM_149 +# define BOOST_PP_SEQ_ELEM_151(_) BOOST_PP_SEQ_ELEM_150 +# define BOOST_PP_SEQ_ELEM_152(_) BOOST_PP_SEQ_ELEM_151 +# define BOOST_PP_SEQ_ELEM_153(_) BOOST_PP_SEQ_ELEM_152 +# define BOOST_PP_SEQ_ELEM_154(_) BOOST_PP_SEQ_ELEM_153 +# define BOOST_PP_SEQ_ELEM_155(_) BOOST_PP_SEQ_ELEM_154 +# define BOOST_PP_SEQ_ELEM_156(_) BOOST_PP_SEQ_ELEM_155 +# define BOOST_PP_SEQ_ELEM_157(_) BOOST_PP_SEQ_ELEM_156 +# define BOOST_PP_SEQ_ELEM_158(_) BOOST_PP_SEQ_ELEM_157 +# define BOOST_PP_SEQ_ELEM_159(_) BOOST_PP_SEQ_ELEM_158 +# define BOOST_PP_SEQ_ELEM_160(_) BOOST_PP_SEQ_ELEM_159 +# define BOOST_PP_SEQ_ELEM_161(_) BOOST_PP_SEQ_ELEM_160 +# define BOOST_PP_SEQ_ELEM_162(_) BOOST_PP_SEQ_ELEM_161 +# define BOOST_PP_SEQ_ELEM_163(_) BOOST_PP_SEQ_ELEM_162 +# define BOOST_PP_SEQ_ELEM_164(_) BOOST_PP_SEQ_ELEM_163 +# define BOOST_PP_SEQ_ELEM_165(_) BOOST_PP_SEQ_ELEM_164 +# define BOOST_PP_SEQ_ELEM_166(_) BOOST_PP_SEQ_ELEM_165 +# define BOOST_PP_SEQ_ELEM_167(_) BOOST_PP_SEQ_ELEM_166 +# define BOOST_PP_SEQ_ELEM_168(_) BOOST_PP_SEQ_ELEM_167 +# define BOOST_PP_SEQ_ELEM_169(_) BOOST_PP_SEQ_ELEM_168 +# define BOOST_PP_SEQ_ELEM_170(_) BOOST_PP_SEQ_ELEM_169 +# define BOOST_PP_SEQ_ELEM_171(_) BOOST_PP_SEQ_ELEM_170 +# define BOOST_PP_SEQ_ELEM_172(_) BOOST_PP_SEQ_ELEM_171 +# define BOOST_PP_SEQ_ELEM_173(_) BOOST_PP_SEQ_ELEM_172 +# define BOOST_PP_SEQ_ELEM_174(_) BOOST_PP_SEQ_ELEM_173 +# define BOOST_PP_SEQ_ELEM_175(_) BOOST_PP_SEQ_ELEM_174 +# define BOOST_PP_SEQ_ELEM_176(_) BOOST_PP_SEQ_ELEM_175 +# define BOOST_PP_SEQ_ELEM_177(_) BOOST_PP_SEQ_ELEM_176 +# define BOOST_PP_SEQ_ELEM_178(_) BOOST_PP_SEQ_ELEM_177 +# define BOOST_PP_SEQ_ELEM_179(_) BOOST_PP_SEQ_ELEM_178 +# define BOOST_PP_SEQ_ELEM_180(_) BOOST_PP_SEQ_ELEM_179 +# define BOOST_PP_SEQ_ELEM_181(_) BOOST_PP_SEQ_ELEM_180 +# define BOOST_PP_SEQ_ELEM_182(_) BOOST_PP_SEQ_ELEM_181 +# define BOOST_PP_SEQ_ELEM_183(_) BOOST_PP_SEQ_ELEM_182 +# define BOOST_PP_SEQ_ELEM_184(_) BOOST_PP_SEQ_ELEM_183 +# define BOOST_PP_SEQ_ELEM_185(_) BOOST_PP_SEQ_ELEM_184 +# define BOOST_PP_SEQ_ELEM_186(_) BOOST_PP_SEQ_ELEM_185 +# define BOOST_PP_SEQ_ELEM_187(_) BOOST_PP_SEQ_ELEM_186 +# define BOOST_PP_SEQ_ELEM_188(_) BOOST_PP_SEQ_ELEM_187 +# define BOOST_PP_SEQ_ELEM_189(_) BOOST_PP_SEQ_ELEM_188 +# define BOOST_PP_SEQ_ELEM_190(_) BOOST_PP_SEQ_ELEM_189 +# define BOOST_PP_SEQ_ELEM_191(_) BOOST_PP_SEQ_ELEM_190 +# define BOOST_PP_SEQ_ELEM_192(_) BOOST_PP_SEQ_ELEM_191 +# define BOOST_PP_SEQ_ELEM_193(_) BOOST_PP_SEQ_ELEM_192 +# define BOOST_PP_SEQ_ELEM_194(_) BOOST_PP_SEQ_ELEM_193 +# define BOOST_PP_SEQ_ELEM_195(_) BOOST_PP_SEQ_ELEM_194 +# define BOOST_PP_SEQ_ELEM_196(_) BOOST_PP_SEQ_ELEM_195 +# define BOOST_PP_SEQ_ELEM_197(_) BOOST_PP_SEQ_ELEM_196 +# define BOOST_PP_SEQ_ELEM_198(_) BOOST_PP_SEQ_ELEM_197 +# define BOOST_PP_SEQ_ELEM_199(_) BOOST_PP_SEQ_ELEM_198 +# define BOOST_PP_SEQ_ELEM_200(_) BOOST_PP_SEQ_ELEM_199 +# define BOOST_PP_SEQ_ELEM_201(_) BOOST_PP_SEQ_ELEM_200 +# define BOOST_PP_SEQ_ELEM_202(_) BOOST_PP_SEQ_ELEM_201 +# define BOOST_PP_SEQ_ELEM_203(_) BOOST_PP_SEQ_ELEM_202 +# define BOOST_PP_SEQ_ELEM_204(_) BOOST_PP_SEQ_ELEM_203 +# define BOOST_PP_SEQ_ELEM_205(_) BOOST_PP_SEQ_ELEM_204 +# define BOOST_PP_SEQ_ELEM_206(_) BOOST_PP_SEQ_ELEM_205 +# define BOOST_PP_SEQ_ELEM_207(_) BOOST_PP_SEQ_ELEM_206 +# define BOOST_PP_SEQ_ELEM_208(_) BOOST_PP_SEQ_ELEM_207 +# define BOOST_PP_SEQ_ELEM_209(_) BOOST_PP_SEQ_ELEM_208 +# define BOOST_PP_SEQ_ELEM_210(_) BOOST_PP_SEQ_ELEM_209 +# define BOOST_PP_SEQ_ELEM_211(_) BOOST_PP_SEQ_ELEM_210 +# define BOOST_PP_SEQ_ELEM_212(_) BOOST_PP_SEQ_ELEM_211 +# define BOOST_PP_SEQ_ELEM_213(_) BOOST_PP_SEQ_ELEM_212 +# define BOOST_PP_SEQ_ELEM_214(_) BOOST_PP_SEQ_ELEM_213 +# define BOOST_PP_SEQ_ELEM_215(_) BOOST_PP_SEQ_ELEM_214 +# define BOOST_PP_SEQ_ELEM_216(_) BOOST_PP_SEQ_ELEM_215 +# define BOOST_PP_SEQ_ELEM_217(_) BOOST_PP_SEQ_ELEM_216 +# define BOOST_PP_SEQ_ELEM_218(_) BOOST_PP_SEQ_ELEM_217 +# define BOOST_PP_SEQ_ELEM_219(_) BOOST_PP_SEQ_ELEM_218 +# define BOOST_PP_SEQ_ELEM_220(_) BOOST_PP_SEQ_ELEM_219 +# define BOOST_PP_SEQ_ELEM_221(_) BOOST_PP_SEQ_ELEM_220 +# define BOOST_PP_SEQ_ELEM_222(_) BOOST_PP_SEQ_ELEM_221 +# define BOOST_PP_SEQ_ELEM_223(_) BOOST_PP_SEQ_ELEM_222 +# define BOOST_PP_SEQ_ELEM_224(_) BOOST_PP_SEQ_ELEM_223 +# define BOOST_PP_SEQ_ELEM_225(_) BOOST_PP_SEQ_ELEM_224 +# define BOOST_PP_SEQ_ELEM_226(_) BOOST_PP_SEQ_ELEM_225 +# define BOOST_PP_SEQ_ELEM_227(_) BOOST_PP_SEQ_ELEM_226 +# define BOOST_PP_SEQ_ELEM_228(_) BOOST_PP_SEQ_ELEM_227 +# define BOOST_PP_SEQ_ELEM_229(_) BOOST_PP_SEQ_ELEM_228 +# define BOOST_PP_SEQ_ELEM_230(_) BOOST_PP_SEQ_ELEM_229 +# define BOOST_PP_SEQ_ELEM_231(_) BOOST_PP_SEQ_ELEM_230 +# define BOOST_PP_SEQ_ELEM_232(_) BOOST_PP_SEQ_ELEM_231 +# define BOOST_PP_SEQ_ELEM_233(_) BOOST_PP_SEQ_ELEM_232 +# define BOOST_PP_SEQ_ELEM_234(_) BOOST_PP_SEQ_ELEM_233 +# define BOOST_PP_SEQ_ELEM_235(_) BOOST_PP_SEQ_ELEM_234 +# define BOOST_PP_SEQ_ELEM_236(_) BOOST_PP_SEQ_ELEM_235 +# define BOOST_PP_SEQ_ELEM_237(_) BOOST_PP_SEQ_ELEM_236 +# define BOOST_PP_SEQ_ELEM_238(_) BOOST_PP_SEQ_ELEM_237 +# define BOOST_PP_SEQ_ELEM_239(_) BOOST_PP_SEQ_ELEM_238 +# define BOOST_PP_SEQ_ELEM_240(_) BOOST_PP_SEQ_ELEM_239 +# define BOOST_PP_SEQ_ELEM_241(_) BOOST_PP_SEQ_ELEM_240 +# define BOOST_PP_SEQ_ELEM_242(_) BOOST_PP_SEQ_ELEM_241 +# define BOOST_PP_SEQ_ELEM_243(_) BOOST_PP_SEQ_ELEM_242 +# define BOOST_PP_SEQ_ELEM_244(_) BOOST_PP_SEQ_ELEM_243 +# define BOOST_PP_SEQ_ELEM_245(_) BOOST_PP_SEQ_ELEM_244 +# define BOOST_PP_SEQ_ELEM_246(_) BOOST_PP_SEQ_ELEM_245 +# define BOOST_PP_SEQ_ELEM_247(_) BOOST_PP_SEQ_ELEM_246 +# define BOOST_PP_SEQ_ELEM_248(_) BOOST_PP_SEQ_ELEM_247 +# define BOOST_PP_SEQ_ELEM_249(_) BOOST_PP_SEQ_ELEM_248 +# define BOOST_PP_SEQ_ELEM_250(_) BOOST_PP_SEQ_ELEM_249 +# define BOOST_PP_SEQ_ELEM_251(_) BOOST_PP_SEQ_ELEM_250 +# define BOOST_PP_SEQ_ELEM_252(_) BOOST_PP_SEQ_ELEM_251 +# define BOOST_PP_SEQ_ELEM_253(_) BOOST_PP_SEQ_ELEM_252 +# define BOOST_PP_SEQ_ELEM_254(_) BOOST_PP_SEQ_ELEM_253 +# define BOOST_PP_SEQ_ELEM_255(_) BOOST_PP_SEQ_ELEM_254 +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/seq/enum.hpp b/ThirdParty/boost-Subset/boost/preprocessor/seq/enum.hpp new file mode 100644 index 0000000000..b63b2425bd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/seq/enum.hpp @@ -0,0 +1,288 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_ENUM_HPP +# define BOOST_PREPROCESSOR_SEQ_ENUM_HPP +# +# include +# include +# include +# +# /* BOOST_PP_SEQ_ENUM */ +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_ENUM(seq) BOOST_PP_SEQ_ENUM_I(seq) +# define BOOST_PP_SEQ_ENUM_I(seq) BOOST_PP_CAT(BOOST_PP_SEQ_ENUM_, BOOST_PP_SEQ_SIZE(seq)) seq +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_SEQ_ENUM(seq) BOOST_PP_SEQ_ENUM_I(BOOST_PP_SEQ_SIZE(seq), seq) +# define BOOST_PP_SEQ_ENUM_I(size, seq) BOOST_PP_CAT(BOOST_PP_SEQ_ENUM_, size) seq +# else +# define BOOST_PP_SEQ_ENUM(seq) BOOST_PP_CAT(BOOST_PP_SEQ_ENUM_, BOOST_PP_SEQ_SIZE(seq)) seq +# endif +# +# define BOOST_PP_SEQ_ENUM_1(x) x +# define BOOST_PP_SEQ_ENUM_2(x) x, BOOST_PP_SEQ_ENUM_1 +# define BOOST_PP_SEQ_ENUM_3(x) x, BOOST_PP_SEQ_ENUM_2 +# define BOOST_PP_SEQ_ENUM_4(x) x, BOOST_PP_SEQ_ENUM_3 +# define BOOST_PP_SEQ_ENUM_5(x) x, BOOST_PP_SEQ_ENUM_4 +# define BOOST_PP_SEQ_ENUM_6(x) x, BOOST_PP_SEQ_ENUM_5 +# define BOOST_PP_SEQ_ENUM_7(x) x, BOOST_PP_SEQ_ENUM_6 +# define BOOST_PP_SEQ_ENUM_8(x) x, BOOST_PP_SEQ_ENUM_7 +# define BOOST_PP_SEQ_ENUM_9(x) x, BOOST_PP_SEQ_ENUM_8 +# define BOOST_PP_SEQ_ENUM_10(x) x, BOOST_PP_SEQ_ENUM_9 +# define BOOST_PP_SEQ_ENUM_11(x) x, BOOST_PP_SEQ_ENUM_10 +# define BOOST_PP_SEQ_ENUM_12(x) x, BOOST_PP_SEQ_ENUM_11 +# define BOOST_PP_SEQ_ENUM_13(x) x, BOOST_PP_SEQ_ENUM_12 +# define BOOST_PP_SEQ_ENUM_14(x) x, BOOST_PP_SEQ_ENUM_13 +# define BOOST_PP_SEQ_ENUM_15(x) x, BOOST_PP_SEQ_ENUM_14 +# define BOOST_PP_SEQ_ENUM_16(x) x, BOOST_PP_SEQ_ENUM_15 +# define BOOST_PP_SEQ_ENUM_17(x) x, BOOST_PP_SEQ_ENUM_16 +# define BOOST_PP_SEQ_ENUM_18(x) x, BOOST_PP_SEQ_ENUM_17 +# define BOOST_PP_SEQ_ENUM_19(x) x, BOOST_PP_SEQ_ENUM_18 +# define BOOST_PP_SEQ_ENUM_20(x) x, BOOST_PP_SEQ_ENUM_19 +# define BOOST_PP_SEQ_ENUM_21(x) x, BOOST_PP_SEQ_ENUM_20 +# define BOOST_PP_SEQ_ENUM_22(x) x, BOOST_PP_SEQ_ENUM_21 +# define BOOST_PP_SEQ_ENUM_23(x) x, BOOST_PP_SEQ_ENUM_22 +# define BOOST_PP_SEQ_ENUM_24(x) x, BOOST_PP_SEQ_ENUM_23 +# define BOOST_PP_SEQ_ENUM_25(x) x, BOOST_PP_SEQ_ENUM_24 +# define BOOST_PP_SEQ_ENUM_26(x) x, BOOST_PP_SEQ_ENUM_25 +# define BOOST_PP_SEQ_ENUM_27(x) x, BOOST_PP_SEQ_ENUM_26 +# define BOOST_PP_SEQ_ENUM_28(x) x, BOOST_PP_SEQ_ENUM_27 +# define BOOST_PP_SEQ_ENUM_29(x) x, BOOST_PP_SEQ_ENUM_28 +# define BOOST_PP_SEQ_ENUM_30(x) x, BOOST_PP_SEQ_ENUM_29 +# define BOOST_PP_SEQ_ENUM_31(x) x, BOOST_PP_SEQ_ENUM_30 +# define BOOST_PP_SEQ_ENUM_32(x) x, BOOST_PP_SEQ_ENUM_31 +# define BOOST_PP_SEQ_ENUM_33(x) x, BOOST_PP_SEQ_ENUM_32 +# define BOOST_PP_SEQ_ENUM_34(x) x, BOOST_PP_SEQ_ENUM_33 +# define BOOST_PP_SEQ_ENUM_35(x) x, BOOST_PP_SEQ_ENUM_34 +# define BOOST_PP_SEQ_ENUM_36(x) x, BOOST_PP_SEQ_ENUM_35 +# define BOOST_PP_SEQ_ENUM_37(x) x, BOOST_PP_SEQ_ENUM_36 +# define BOOST_PP_SEQ_ENUM_38(x) x, BOOST_PP_SEQ_ENUM_37 +# define BOOST_PP_SEQ_ENUM_39(x) x, BOOST_PP_SEQ_ENUM_38 +# define BOOST_PP_SEQ_ENUM_40(x) x, BOOST_PP_SEQ_ENUM_39 +# define BOOST_PP_SEQ_ENUM_41(x) x, BOOST_PP_SEQ_ENUM_40 +# define BOOST_PP_SEQ_ENUM_42(x) x, BOOST_PP_SEQ_ENUM_41 +# define BOOST_PP_SEQ_ENUM_43(x) x, BOOST_PP_SEQ_ENUM_42 +# define BOOST_PP_SEQ_ENUM_44(x) x, BOOST_PP_SEQ_ENUM_43 +# define BOOST_PP_SEQ_ENUM_45(x) x, BOOST_PP_SEQ_ENUM_44 +# define BOOST_PP_SEQ_ENUM_46(x) x, BOOST_PP_SEQ_ENUM_45 +# define BOOST_PP_SEQ_ENUM_47(x) x, BOOST_PP_SEQ_ENUM_46 +# define BOOST_PP_SEQ_ENUM_48(x) x, BOOST_PP_SEQ_ENUM_47 +# define BOOST_PP_SEQ_ENUM_49(x) x, BOOST_PP_SEQ_ENUM_48 +# define BOOST_PP_SEQ_ENUM_50(x) x, BOOST_PP_SEQ_ENUM_49 +# define BOOST_PP_SEQ_ENUM_51(x) x, BOOST_PP_SEQ_ENUM_50 +# define BOOST_PP_SEQ_ENUM_52(x) x, BOOST_PP_SEQ_ENUM_51 +# define BOOST_PP_SEQ_ENUM_53(x) x, BOOST_PP_SEQ_ENUM_52 +# define BOOST_PP_SEQ_ENUM_54(x) x, BOOST_PP_SEQ_ENUM_53 +# define BOOST_PP_SEQ_ENUM_55(x) x, BOOST_PP_SEQ_ENUM_54 +# define BOOST_PP_SEQ_ENUM_56(x) x, BOOST_PP_SEQ_ENUM_55 +# define BOOST_PP_SEQ_ENUM_57(x) x, BOOST_PP_SEQ_ENUM_56 +# define BOOST_PP_SEQ_ENUM_58(x) x, BOOST_PP_SEQ_ENUM_57 +# define BOOST_PP_SEQ_ENUM_59(x) x, BOOST_PP_SEQ_ENUM_58 +# define BOOST_PP_SEQ_ENUM_60(x) x, BOOST_PP_SEQ_ENUM_59 +# define BOOST_PP_SEQ_ENUM_61(x) x, BOOST_PP_SEQ_ENUM_60 +# define BOOST_PP_SEQ_ENUM_62(x) x, BOOST_PP_SEQ_ENUM_61 +# define BOOST_PP_SEQ_ENUM_63(x) x, BOOST_PP_SEQ_ENUM_62 +# define BOOST_PP_SEQ_ENUM_64(x) x, BOOST_PP_SEQ_ENUM_63 +# define BOOST_PP_SEQ_ENUM_65(x) x, BOOST_PP_SEQ_ENUM_64 +# define BOOST_PP_SEQ_ENUM_66(x) x, BOOST_PP_SEQ_ENUM_65 +# define BOOST_PP_SEQ_ENUM_67(x) x, BOOST_PP_SEQ_ENUM_66 +# define BOOST_PP_SEQ_ENUM_68(x) x, BOOST_PP_SEQ_ENUM_67 +# define BOOST_PP_SEQ_ENUM_69(x) x, BOOST_PP_SEQ_ENUM_68 +# define BOOST_PP_SEQ_ENUM_70(x) x, BOOST_PP_SEQ_ENUM_69 +# define BOOST_PP_SEQ_ENUM_71(x) x, BOOST_PP_SEQ_ENUM_70 +# define BOOST_PP_SEQ_ENUM_72(x) x, BOOST_PP_SEQ_ENUM_71 +# define BOOST_PP_SEQ_ENUM_73(x) x, BOOST_PP_SEQ_ENUM_72 +# define BOOST_PP_SEQ_ENUM_74(x) x, BOOST_PP_SEQ_ENUM_73 +# define BOOST_PP_SEQ_ENUM_75(x) x, BOOST_PP_SEQ_ENUM_74 +# define BOOST_PP_SEQ_ENUM_76(x) x, BOOST_PP_SEQ_ENUM_75 +# define BOOST_PP_SEQ_ENUM_77(x) x, BOOST_PP_SEQ_ENUM_76 +# define BOOST_PP_SEQ_ENUM_78(x) x, BOOST_PP_SEQ_ENUM_77 +# define BOOST_PP_SEQ_ENUM_79(x) x, BOOST_PP_SEQ_ENUM_78 +# define BOOST_PP_SEQ_ENUM_80(x) x, BOOST_PP_SEQ_ENUM_79 +# define BOOST_PP_SEQ_ENUM_81(x) x, BOOST_PP_SEQ_ENUM_80 +# define BOOST_PP_SEQ_ENUM_82(x) x, BOOST_PP_SEQ_ENUM_81 +# define BOOST_PP_SEQ_ENUM_83(x) x, BOOST_PP_SEQ_ENUM_82 +# define BOOST_PP_SEQ_ENUM_84(x) x, BOOST_PP_SEQ_ENUM_83 +# define BOOST_PP_SEQ_ENUM_85(x) x, BOOST_PP_SEQ_ENUM_84 +# define BOOST_PP_SEQ_ENUM_86(x) x, BOOST_PP_SEQ_ENUM_85 +# define BOOST_PP_SEQ_ENUM_87(x) x, BOOST_PP_SEQ_ENUM_86 +# define BOOST_PP_SEQ_ENUM_88(x) x, BOOST_PP_SEQ_ENUM_87 +# define BOOST_PP_SEQ_ENUM_89(x) x, BOOST_PP_SEQ_ENUM_88 +# define BOOST_PP_SEQ_ENUM_90(x) x, BOOST_PP_SEQ_ENUM_89 +# define BOOST_PP_SEQ_ENUM_91(x) x, BOOST_PP_SEQ_ENUM_90 +# define BOOST_PP_SEQ_ENUM_92(x) x, BOOST_PP_SEQ_ENUM_91 +# define BOOST_PP_SEQ_ENUM_93(x) x, BOOST_PP_SEQ_ENUM_92 +# define BOOST_PP_SEQ_ENUM_94(x) x, BOOST_PP_SEQ_ENUM_93 +# define BOOST_PP_SEQ_ENUM_95(x) x, BOOST_PP_SEQ_ENUM_94 +# define BOOST_PP_SEQ_ENUM_96(x) x, BOOST_PP_SEQ_ENUM_95 +# define BOOST_PP_SEQ_ENUM_97(x) x, BOOST_PP_SEQ_ENUM_96 +# define BOOST_PP_SEQ_ENUM_98(x) x, BOOST_PP_SEQ_ENUM_97 +# define BOOST_PP_SEQ_ENUM_99(x) x, BOOST_PP_SEQ_ENUM_98 +# define BOOST_PP_SEQ_ENUM_100(x) x, BOOST_PP_SEQ_ENUM_99 +# define BOOST_PP_SEQ_ENUM_101(x) x, BOOST_PP_SEQ_ENUM_100 +# define BOOST_PP_SEQ_ENUM_102(x) x, BOOST_PP_SEQ_ENUM_101 +# define BOOST_PP_SEQ_ENUM_103(x) x, BOOST_PP_SEQ_ENUM_102 +# define BOOST_PP_SEQ_ENUM_104(x) x, BOOST_PP_SEQ_ENUM_103 +# define BOOST_PP_SEQ_ENUM_105(x) x, BOOST_PP_SEQ_ENUM_104 +# define BOOST_PP_SEQ_ENUM_106(x) x, BOOST_PP_SEQ_ENUM_105 +# define BOOST_PP_SEQ_ENUM_107(x) x, BOOST_PP_SEQ_ENUM_106 +# define BOOST_PP_SEQ_ENUM_108(x) x, BOOST_PP_SEQ_ENUM_107 +# define BOOST_PP_SEQ_ENUM_109(x) x, BOOST_PP_SEQ_ENUM_108 +# define BOOST_PP_SEQ_ENUM_110(x) x, BOOST_PP_SEQ_ENUM_109 +# define BOOST_PP_SEQ_ENUM_111(x) x, BOOST_PP_SEQ_ENUM_110 +# define BOOST_PP_SEQ_ENUM_112(x) x, BOOST_PP_SEQ_ENUM_111 +# define BOOST_PP_SEQ_ENUM_113(x) x, BOOST_PP_SEQ_ENUM_112 +# define BOOST_PP_SEQ_ENUM_114(x) x, BOOST_PP_SEQ_ENUM_113 +# define BOOST_PP_SEQ_ENUM_115(x) x, BOOST_PP_SEQ_ENUM_114 +# define BOOST_PP_SEQ_ENUM_116(x) x, BOOST_PP_SEQ_ENUM_115 +# define BOOST_PP_SEQ_ENUM_117(x) x, BOOST_PP_SEQ_ENUM_116 +# define BOOST_PP_SEQ_ENUM_118(x) x, BOOST_PP_SEQ_ENUM_117 +# define BOOST_PP_SEQ_ENUM_119(x) x, BOOST_PP_SEQ_ENUM_118 +# define BOOST_PP_SEQ_ENUM_120(x) x, BOOST_PP_SEQ_ENUM_119 +# define BOOST_PP_SEQ_ENUM_121(x) x, BOOST_PP_SEQ_ENUM_120 +# define BOOST_PP_SEQ_ENUM_122(x) x, BOOST_PP_SEQ_ENUM_121 +# define BOOST_PP_SEQ_ENUM_123(x) x, BOOST_PP_SEQ_ENUM_122 +# define BOOST_PP_SEQ_ENUM_124(x) x, BOOST_PP_SEQ_ENUM_123 +# define BOOST_PP_SEQ_ENUM_125(x) x, BOOST_PP_SEQ_ENUM_124 +# define BOOST_PP_SEQ_ENUM_126(x) x, BOOST_PP_SEQ_ENUM_125 +# define BOOST_PP_SEQ_ENUM_127(x) x, BOOST_PP_SEQ_ENUM_126 +# define BOOST_PP_SEQ_ENUM_128(x) x, BOOST_PP_SEQ_ENUM_127 +# define BOOST_PP_SEQ_ENUM_129(x) x, BOOST_PP_SEQ_ENUM_128 +# define BOOST_PP_SEQ_ENUM_130(x) x, BOOST_PP_SEQ_ENUM_129 +# define BOOST_PP_SEQ_ENUM_131(x) x, BOOST_PP_SEQ_ENUM_130 +# define BOOST_PP_SEQ_ENUM_132(x) x, BOOST_PP_SEQ_ENUM_131 +# define BOOST_PP_SEQ_ENUM_133(x) x, BOOST_PP_SEQ_ENUM_132 +# define BOOST_PP_SEQ_ENUM_134(x) x, BOOST_PP_SEQ_ENUM_133 +# define BOOST_PP_SEQ_ENUM_135(x) x, BOOST_PP_SEQ_ENUM_134 +# define BOOST_PP_SEQ_ENUM_136(x) x, BOOST_PP_SEQ_ENUM_135 +# define BOOST_PP_SEQ_ENUM_137(x) x, BOOST_PP_SEQ_ENUM_136 +# define BOOST_PP_SEQ_ENUM_138(x) x, BOOST_PP_SEQ_ENUM_137 +# define BOOST_PP_SEQ_ENUM_139(x) x, BOOST_PP_SEQ_ENUM_138 +# define BOOST_PP_SEQ_ENUM_140(x) x, BOOST_PP_SEQ_ENUM_139 +# define BOOST_PP_SEQ_ENUM_141(x) x, BOOST_PP_SEQ_ENUM_140 +# define BOOST_PP_SEQ_ENUM_142(x) x, BOOST_PP_SEQ_ENUM_141 +# define BOOST_PP_SEQ_ENUM_143(x) x, BOOST_PP_SEQ_ENUM_142 +# define BOOST_PP_SEQ_ENUM_144(x) x, BOOST_PP_SEQ_ENUM_143 +# define BOOST_PP_SEQ_ENUM_145(x) x, BOOST_PP_SEQ_ENUM_144 +# define BOOST_PP_SEQ_ENUM_146(x) x, BOOST_PP_SEQ_ENUM_145 +# define BOOST_PP_SEQ_ENUM_147(x) x, BOOST_PP_SEQ_ENUM_146 +# define BOOST_PP_SEQ_ENUM_148(x) x, BOOST_PP_SEQ_ENUM_147 +# define BOOST_PP_SEQ_ENUM_149(x) x, BOOST_PP_SEQ_ENUM_148 +# define BOOST_PP_SEQ_ENUM_150(x) x, BOOST_PP_SEQ_ENUM_149 +# define BOOST_PP_SEQ_ENUM_151(x) x, BOOST_PP_SEQ_ENUM_150 +# define BOOST_PP_SEQ_ENUM_152(x) x, BOOST_PP_SEQ_ENUM_151 +# define BOOST_PP_SEQ_ENUM_153(x) x, BOOST_PP_SEQ_ENUM_152 +# define BOOST_PP_SEQ_ENUM_154(x) x, BOOST_PP_SEQ_ENUM_153 +# define BOOST_PP_SEQ_ENUM_155(x) x, BOOST_PP_SEQ_ENUM_154 +# define BOOST_PP_SEQ_ENUM_156(x) x, BOOST_PP_SEQ_ENUM_155 +# define BOOST_PP_SEQ_ENUM_157(x) x, BOOST_PP_SEQ_ENUM_156 +# define BOOST_PP_SEQ_ENUM_158(x) x, BOOST_PP_SEQ_ENUM_157 +# define BOOST_PP_SEQ_ENUM_159(x) x, BOOST_PP_SEQ_ENUM_158 +# define BOOST_PP_SEQ_ENUM_160(x) x, BOOST_PP_SEQ_ENUM_159 +# define BOOST_PP_SEQ_ENUM_161(x) x, BOOST_PP_SEQ_ENUM_160 +# define BOOST_PP_SEQ_ENUM_162(x) x, BOOST_PP_SEQ_ENUM_161 +# define BOOST_PP_SEQ_ENUM_163(x) x, BOOST_PP_SEQ_ENUM_162 +# define BOOST_PP_SEQ_ENUM_164(x) x, BOOST_PP_SEQ_ENUM_163 +# define BOOST_PP_SEQ_ENUM_165(x) x, BOOST_PP_SEQ_ENUM_164 +# define BOOST_PP_SEQ_ENUM_166(x) x, BOOST_PP_SEQ_ENUM_165 +# define BOOST_PP_SEQ_ENUM_167(x) x, BOOST_PP_SEQ_ENUM_166 +# define BOOST_PP_SEQ_ENUM_168(x) x, BOOST_PP_SEQ_ENUM_167 +# define BOOST_PP_SEQ_ENUM_169(x) x, BOOST_PP_SEQ_ENUM_168 +# define BOOST_PP_SEQ_ENUM_170(x) x, BOOST_PP_SEQ_ENUM_169 +# define BOOST_PP_SEQ_ENUM_171(x) x, BOOST_PP_SEQ_ENUM_170 +# define BOOST_PP_SEQ_ENUM_172(x) x, BOOST_PP_SEQ_ENUM_171 +# define BOOST_PP_SEQ_ENUM_173(x) x, BOOST_PP_SEQ_ENUM_172 +# define BOOST_PP_SEQ_ENUM_174(x) x, BOOST_PP_SEQ_ENUM_173 +# define BOOST_PP_SEQ_ENUM_175(x) x, BOOST_PP_SEQ_ENUM_174 +# define BOOST_PP_SEQ_ENUM_176(x) x, BOOST_PP_SEQ_ENUM_175 +# define BOOST_PP_SEQ_ENUM_177(x) x, BOOST_PP_SEQ_ENUM_176 +# define BOOST_PP_SEQ_ENUM_178(x) x, BOOST_PP_SEQ_ENUM_177 +# define BOOST_PP_SEQ_ENUM_179(x) x, BOOST_PP_SEQ_ENUM_178 +# define BOOST_PP_SEQ_ENUM_180(x) x, BOOST_PP_SEQ_ENUM_179 +# define BOOST_PP_SEQ_ENUM_181(x) x, BOOST_PP_SEQ_ENUM_180 +# define BOOST_PP_SEQ_ENUM_182(x) x, BOOST_PP_SEQ_ENUM_181 +# define BOOST_PP_SEQ_ENUM_183(x) x, BOOST_PP_SEQ_ENUM_182 +# define BOOST_PP_SEQ_ENUM_184(x) x, BOOST_PP_SEQ_ENUM_183 +# define BOOST_PP_SEQ_ENUM_185(x) x, BOOST_PP_SEQ_ENUM_184 +# define BOOST_PP_SEQ_ENUM_186(x) x, BOOST_PP_SEQ_ENUM_185 +# define BOOST_PP_SEQ_ENUM_187(x) x, BOOST_PP_SEQ_ENUM_186 +# define BOOST_PP_SEQ_ENUM_188(x) x, BOOST_PP_SEQ_ENUM_187 +# define BOOST_PP_SEQ_ENUM_189(x) x, BOOST_PP_SEQ_ENUM_188 +# define BOOST_PP_SEQ_ENUM_190(x) x, BOOST_PP_SEQ_ENUM_189 +# define BOOST_PP_SEQ_ENUM_191(x) x, BOOST_PP_SEQ_ENUM_190 +# define BOOST_PP_SEQ_ENUM_192(x) x, BOOST_PP_SEQ_ENUM_191 +# define BOOST_PP_SEQ_ENUM_193(x) x, BOOST_PP_SEQ_ENUM_192 +# define BOOST_PP_SEQ_ENUM_194(x) x, BOOST_PP_SEQ_ENUM_193 +# define BOOST_PP_SEQ_ENUM_195(x) x, BOOST_PP_SEQ_ENUM_194 +# define BOOST_PP_SEQ_ENUM_196(x) x, BOOST_PP_SEQ_ENUM_195 +# define BOOST_PP_SEQ_ENUM_197(x) x, BOOST_PP_SEQ_ENUM_196 +# define BOOST_PP_SEQ_ENUM_198(x) x, BOOST_PP_SEQ_ENUM_197 +# define BOOST_PP_SEQ_ENUM_199(x) x, BOOST_PP_SEQ_ENUM_198 +# define BOOST_PP_SEQ_ENUM_200(x) x, BOOST_PP_SEQ_ENUM_199 +# define BOOST_PP_SEQ_ENUM_201(x) x, BOOST_PP_SEQ_ENUM_200 +# define BOOST_PP_SEQ_ENUM_202(x) x, BOOST_PP_SEQ_ENUM_201 +# define BOOST_PP_SEQ_ENUM_203(x) x, BOOST_PP_SEQ_ENUM_202 +# define BOOST_PP_SEQ_ENUM_204(x) x, BOOST_PP_SEQ_ENUM_203 +# define BOOST_PP_SEQ_ENUM_205(x) x, BOOST_PP_SEQ_ENUM_204 +# define BOOST_PP_SEQ_ENUM_206(x) x, BOOST_PP_SEQ_ENUM_205 +# define BOOST_PP_SEQ_ENUM_207(x) x, BOOST_PP_SEQ_ENUM_206 +# define BOOST_PP_SEQ_ENUM_208(x) x, BOOST_PP_SEQ_ENUM_207 +# define BOOST_PP_SEQ_ENUM_209(x) x, BOOST_PP_SEQ_ENUM_208 +# define BOOST_PP_SEQ_ENUM_210(x) x, BOOST_PP_SEQ_ENUM_209 +# define BOOST_PP_SEQ_ENUM_211(x) x, BOOST_PP_SEQ_ENUM_210 +# define BOOST_PP_SEQ_ENUM_212(x) x, BOOST_PP_SEQ_ENUM_211 +# define BOOST_PP_SEQ_ENUM_213(x) x, BOOST_PP_SEQ_ENUM_212 +# define BOOST_PP_SEQ_ENUM_214(x) x, BOOST_PP_SEQ_ENUM_213 +# define BOOST_PP_SEQ_ENUM_215(x) x, BOOST_PP_SEQ_ENUM_214 +# define BOOST_PP_SEQ_ENUM_216(x) x, BOOST_PP_SEQ_ENUM_215 +# define BOOST_PP_SEQ_ENUM_217(x) x, BOOST_PP_SEQ_ENUM_216 +# define BOOST_PP_SEQ_ENUM_218(x) x, BOOST_PP_SEQ_ENUM_217 +# define BOOST_PP_SEQ_ENUM_219(x) x, BOOST_PP_SEQ_ENUM_218 +# define BOOST_PP_SEQ_ENUM_220(x) x, BOOST_PP_SEQ_ENUM_219 +# define BOOST_PP_SEQ_ENUM_221(x) x, BOOST_PP_SEQ_ENUM_220 +# define BOOST_PP_SEQ_ENUM_222(x) x, BOOST_PP_SEQ_ENUM_221 +# define BOOST_PP_SEQ_ENUM_223(x) x, BOOST_PP_SEQ_ENUM_222 +# define BOOST_PP_SEQ_ENUM_224(x) x, BOOST_PP_SEQ_ENUM_223 +# define BOOST_PP_SEQ_ENUM_225(x) x, BOOST_PP_SEQ_ENUM_224 +# define BOOST_PP_SEQ_ENUM_226(x) x, BOOST_PP_SEQ_ENUM_225 +# define BOOST_PP_SEQ_ENUM_227(x) x, BOOST_PP_SEQ_ENUM_226 +# define BOOST_PP_SEQ_ENUM_228(x) x, BOOST_PP_SEQ_ENUM_227 +# define BOOST_PP_SEQ_ENUM_229(x) x, BOOST_PP_SEQ_ENUM_228 +# define BOOST_PP_SEQ_ENUM_230(x) x, BOOST_PP_SEQ_ENUM_229 +# define BOOST_PP_SEQ_ENUM_231(x) x, BOOST_PP_SEQ_ENUM_230 +# define BOOST_PP_SEQ_ENUM_232(x) x, BOOST_PP_SEQ_ENUM_231 +# define BOOST_PP_SEQ_ENUM_233(x) x, BOOST_PP_SEQ_ENUM_232 +# define BOOST_PP_SEQ_ENUM_234(x) x, BOOST_PP_SEQ_ENUM_233 +# define BOOST_PP_SEQ_ENUM_235(x) x, BOOST_PP_SEQ_ENUM_234 +# define BOOST_PP_SEQ_ENUM_236(x) x, BOOST_PP_SEQ_ENUM_235 +# define BOOST_PP_SEQ_ENUM_237(x) x, BOOST_PP_SEQ_ENUM_236 +# define BOOST_PP_SEQ_ENUM_238(x) x, BOOST_PP_SEQ_ENUM_237 +# define BOOST_PP_SEQ_ENUM_239(x) x, BOOST_PP_SEQ_ENUM_238 +# define BOOST_PP_SEQ_ENUM_240(x) x, BOOST_PP_SEQ_ENUM_239 +# define BOOST_PP_SEQ_ENUM_241(x) x, BOOST_PP_SEQ_ENUM_240 +# define BOOST_PP_SEQ_ENUM_242(x) x, BOOST_PP_SEQ_ENUM_241 +# define BOOST_PP_SEQ_ENUM_243(x) x, BOOST_PP_SEQ_ENUM_242 +# define BOOST_PP_SEQ_ENUM_244(x) x, BOOST_PP_SEQ_ENUM_243 +# define BOOST_PP_SEQ_ENUM_245(x) x, BOOST_PP_SEQ_ENUM_244 +# define BOOST_PP_SEQ_ENUM_246(x) x, BOOST_PP_SEQ_ENUM_245 +# define BOOST_PP_SEQ_ENUM_247(x) x, BOOST_PP_SEQ_ENUM_246 +# define BOOST_PP_SEQ_ENUM_248(x) x, BOOST_PP_SEQ_ENUM_247 +# define BOOST_PP_SEQ_ENUM_249(x) x, BOOST_PP_SEQ_ENUM_248 +# define BOOST_PP_SEQ_ENUM_250(x) x, BOOST_PP_SEQ_ENUM_249 +# define BOOST_PP_SEQ_ENUM_251(x) x, BOOST_PP_SEQ_ENUM_250 +# define BOOST_PP_SEQ_ENUM_252(x) x, BOOST_PP_SEQ_ENUM_251 +# define BOOST_PP_SEQ_ENUM_253(x) x, BOOST_PP_SEQ_ENUM_252 +# define BOOST_PP_SEQ_ENUM_254(x) x, BOOST_PP_SEQ_ENUM_253 +# define BOOST_PP_SEQ_ENUM_255(x) x, BOOST_PP_SEQ_ENUM_254 +# define BOOST_PP_SEQ_ENUM_256(x) x, BOOST_PP_SEQ_ENUM_255 +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/seq/first_n.hpp b/ThirdParty/boost-Subset/boost/preprocessor/seq/first_n.hpp new file mode 100644 index 0000000000..c3c0716ee7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/seq/first_n.hpp @@ -0,0 +1,30 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_FIRST_N_HPP +# define BOOST_PREPROCESSOR_SEQ_FIRST_N_HPP +# +# include +# include +# include +# include +# include +# +# /* BOOST_PP_SEQ_FIRST_N */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_FIRST_N(n, seq) BOOST_PP_IF(n, BOOST_PP_TUPLE_ELEM, BOOST_PP_TUPLE_EAT_3)(2, 0, BOOST_PP_SEQ_SPLIT(n, seq (nil))) +# else +# define BOOST_PP_SEQ_FIRST_N(n, seq) BOOST_PP_SEQ_FIRST_N_I(n, seq) +# define BOOST_PP_SEQ_FIRST_N_I(n, seq) BOOST_PP_IF(n, BOOST_PP_TUPLE_ELEM, BOOST_PP_TUPLE_EAT_3)(2, 0, BOOST_PP_SEQ_SPLIT(n, seq (nil))) +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/seq/fold_left.hpp b/ThirdParty/boost-Subset/boost/preprocessor/seq/fold_left.hpp new file mode 100644 index 0000000000..ab051b69d9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/seq/fold_left.hpp @@ -0,0 +1,1070 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_FOLD_LEFT_HPP +# define BOOST_PREPROCESSOR_SEQ_FOLD_LEFT_HPP +# +# include +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_SEQ_FOLD_LEFT */ +# +# if 0 +# define BOOST_PP_SEQ_FOLD_LEFT(op, state, seq) ... +# endif +# +# define BOOST_PP_SEQ_FOLD_LEFT BOOST_PP_CAT(BOOST_PP_SEQ_FOLD_LEFT_, BOOST_PP_AUTO_REC(BOOST_PP_SEQ_FOLD_LEFT_P, 256)) +# define BOOST_PP_SEQ_FOLD_LEFT_P(n) BOOST_PP_CAT(BOOST_PP_SEQ_FOLD_LEFT_CHECK_, BOOST_PP_SEQ_FOLD_LEFT_I_ ## n(BOOST_PP_SEQ_FOLD_LEFT_O, BOOST_PP_NIL, (nil), 1)) +# define BOOST_PP_SEQ_FOLD_LEFT_O(s, st, _) st +# +# define BOOST_PP_SEQ_FOLD_LEFT_257(op, st, ss) BOOST_PP_ERROR(0x0005) +# define BOOST_PP_SEQ_FOLD_LEFT_I_257(op, st, ss, sz) BOOST_PP_ERROR(0x0005) +# +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_NIL 1 +# +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_1(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_2(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_3(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_4(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_5(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_6(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_7(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_8(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_9(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_10(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_11(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_12(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_13(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_14(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_15(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_16(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_17(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_18(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_19(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_20(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_21(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_22(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_23(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_24(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_25(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_26(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_27(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_28(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_29(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_30(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_31(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_32(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_33(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_34(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_35(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_36(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_37(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_38(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_39(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_40(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_41(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_42(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_43(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_44(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_45(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_46(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_47(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_48(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_49(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_50(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_51(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_52(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_53(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_54(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_55(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_56(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_57(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_58(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_59(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_60(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_61(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_62(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_63(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_64(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_65(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_66(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_67(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_68(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_69(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_70(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_71(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_72(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_73(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_74(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_75(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_76(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_77(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_78(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_79(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_80(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_81(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_82(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_83(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_84(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_85(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_86(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_87(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_88(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_89(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_90(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_91(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_92(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_93(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_94(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_95(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_96(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_97(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_98(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_99(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_100(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_101(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_102(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_103(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_104(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_105(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_106(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_107(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_108(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_109(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_110(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_111(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_112(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_113(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_114(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_115(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_116(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_117(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_118(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_119(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_120(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_121(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_122(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_123(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_124(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_125(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_126(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_127(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_128(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_129(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_130(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_131(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_132(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_133(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_134(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_135(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_136(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_137(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_138(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_139(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_140(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_141(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_142(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_143(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_144(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_145(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_146(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_147(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_148(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_149(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_150(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_151(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_152(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_153(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_154(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_155(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_156(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_157(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_158(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_159(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_160(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_161(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_162(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_163(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_164(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_165(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_166(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_167(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_168(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_169(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_170(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_171(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_172(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_173(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_174(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_175(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_176(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_177(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_178(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_179(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_180(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_181(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_182(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_183(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_184(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_185(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_186(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_187(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_188(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_189(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_190(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_191(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_192(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_193(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_194(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_195(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_196(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_197(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_198(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_199(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_200(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_201(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_202(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_203(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_204(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_205(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_206(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_207(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_208(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_209(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_210(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_211(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_212(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_213(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_214(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_215(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_216(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_217(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_218(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_219(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_220(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_221(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_222(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_223(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_224(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_225(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_226(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_227(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_228(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_229(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_230(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_231(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_232(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_233(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_234(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_235(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_236(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_237(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_238(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_239(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_240(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_241(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_242(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_243(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_244(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_245(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_246(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_247(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_248(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_249(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_250(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_251(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_252(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_253(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_254(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_255(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_256(op, st, ss, sz) 0 +# +# define BOOST_PP_SEQ_FOLD_LEFT_F(op, st, ss, sz) st +# +# define BOOST_PP_SEQ_FOLD_LEFT_1(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_1(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_2(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_2(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_3(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_3(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_4(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_4(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_5(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_5(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_6(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_6(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_7(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_7(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_8(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_8(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_9(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_9(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_10(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_10(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_11(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_11(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_12(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_12(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_13(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_13(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_14(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_14(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_15(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_15(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_16(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_16(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_17(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_17(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_18(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_18(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_19(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_19(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_20(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_20(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_21(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_21(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_22(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_22(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_23(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_23(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_24(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_24(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_25(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_25(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_26(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_26(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_27(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_27(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_28(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_28(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_29(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_29(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_30(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_30(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_31(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_31(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_32(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_32(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_33(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_33(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_34(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_34(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_35(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_35(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_36(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_36(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_37(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_37(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_38(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_38(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_39(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_39(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_40(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_40(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_41(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_41(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_42(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_42(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_43(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_43(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_44(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_44(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_45(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_45(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_46(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_46(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_47(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_47(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_48(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_48(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_49(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_49(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_50(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_50(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_51(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_51(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_52(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_52(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_53(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_53(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_54(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_54(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_55(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_55(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_56(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_56(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_57(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_57(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_58(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_58(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_59(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_59(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_60(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_60(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_61(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_61(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_62(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_62(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_63(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_63(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_64(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_64(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_65(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_65(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_66(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_66(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_67(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_67(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_68(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_68(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_69(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_69(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_70(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_70(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_71(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_71(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_72(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_72(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_73(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_73(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_74(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_74(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_75(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_75(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_76(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_76(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_77(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_77(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_78(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_78(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_79(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_79(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_80(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_80(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_81(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_81(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_82(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_82(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_83(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_83(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_84(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_84(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_85(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_85(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_86(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_86(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_87(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_87(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_88(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_88(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_89(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_89(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_90(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_90(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_91(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_91(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_92(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_92(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_93(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_93(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_94(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_94(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_95(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_95(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_96(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_96(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_97(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_97(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_98(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_98(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_99(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_99(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_100(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_100(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_101(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_101(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_102(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_102(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_103(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_103(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_104(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_104(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_105(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_105(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_106(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_106(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_107(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_107(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_108(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_108(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_109(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_109(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_110(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_110(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_111(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_111(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_112(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_112(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_113(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_113(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_114(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_114(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_115(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_115(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_116(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_116(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_117(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_117(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_118(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_118(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_119(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_119(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_120(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_120(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_121(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_121(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_122(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_122(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_123(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_123(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_124(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_124(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_125(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_125(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_126(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_126(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_127(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_127(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_128(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_128(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_129(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_129(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_130(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_130(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_131(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_131(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_132(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_132(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_133(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_133(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_134(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_134(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_135(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_135(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_136(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_136(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_137(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_137(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_138(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_138(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_139(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_139(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_140(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_140(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_141(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_141(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_142(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_142(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_143(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_143(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_144(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_144(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_145(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_145(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_146(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_146(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_147(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_147(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_148(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_148(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_149(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_149(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_150(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_150(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_151(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_151(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_152(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_152(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_153(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_153(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_154(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_154(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_155(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_155(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_156(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_156(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_157(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_157(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_158(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_158(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_159(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_159(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_160(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_160(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_161(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_161(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_162(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_162(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_163(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_163(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_164(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_164(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_165(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_165(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_166(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_166(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_167(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_167(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_168(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_168(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_169(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_169(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_170(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_170(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_171(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_171(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_172(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_172(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_173(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_173(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_174(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_174(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_175(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_175(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_176(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_176(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_177(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_177(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_178(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_178(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_179(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_179(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_180(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_180(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_181(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_181(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_182(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_182(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_183(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_183(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_184(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_184(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_185(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_185(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_186(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_186(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_187(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_187(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_188(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_188(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_189(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_189(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_190(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_190(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_191(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_191(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_192(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_192(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_193(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_193(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_194(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_194(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_195(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_195(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_196(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_196(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_197(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_197(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_198(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_198(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_199(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_199(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_200(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_200(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_201(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_201(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_202(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_202(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_203(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_203(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_204(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_204(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_205(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_205(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_206(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_206(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_207(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_207(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_208(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_208(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_209(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_209(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_210(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_210(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_211(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_211(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_212(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_212(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_213(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_213(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_214(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_214(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_215(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_215(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_216(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_216(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_217(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_217(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_218(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_218(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_219(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_219(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_220(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_220(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_221(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_221(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_222(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_222(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_223(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_223(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_224(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_224(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_225(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_225(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_226(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_226(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_227(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_227(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_228(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_228(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_229(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_229(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_230(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_230(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_231(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_231(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_232(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_232(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_233(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_233(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_234(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_234(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_235(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_235(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_236(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_236(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_237(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_237(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_238(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_238(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_239(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_239(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_240(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_240(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_241(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_241(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_242(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_242(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_243(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_243(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_244(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_244(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_245(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_245(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_246(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_246(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_247(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_247(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_248(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_248(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_249(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_249(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_250(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_250(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_251(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_251(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_252(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_252(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_253(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_253(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_254(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_254(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_255(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_255(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_256(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_256(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() +# define BOOST_PP_SEQ_FOLD_LEFT_I_1(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_2, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(2, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_2(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_3, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(3, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_3(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_4, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(4, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_4(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_5, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(5, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_5(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_6, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(6, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_6(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_7, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(7, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_7(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_8, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(8, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_8(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_9, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(9, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_9(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_10, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(10, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_10(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_11, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(11, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_11(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_12, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(12, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_12(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_13, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(13, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_13(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_14, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(14, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_14(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_15, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(15, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_15(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_16, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(16, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_16(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_17, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(17, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_17(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_18, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(18, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_18(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_19, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(19, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_19(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_20, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(20, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_20(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_21, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(21, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_21(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_22, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(22, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_22(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_23, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(23, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_23(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_24, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(24, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_24(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_25, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(25, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_25(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_26, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(26, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_26(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_27, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(27, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_27(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_28, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(28, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_28(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_29, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(29, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_29(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_30, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(30, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_30(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_31, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(31, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_31(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_32, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(32, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_32(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_33, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(33, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_33(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_34, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(34, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_34(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_35, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(35, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_35(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_36, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(36, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_36(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_37, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(37, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_37(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_38, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(38, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_38(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_39, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(39, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_39(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_40, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(40, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_40(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_41, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(41, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_41(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_42, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(42, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_42(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_43, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(43, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_43(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_44, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(44, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_44(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_45, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(45, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_45(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_46, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(46, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_46(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_47, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(47, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_47(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_48, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(48, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_48(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_49, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(49, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_49(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_50, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(50, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_50(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_51, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(51, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_51(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_52, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(52, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_52(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_53, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(53, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_53(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_54, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(54, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_54(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_55, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(55, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_55(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_56, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(56, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_56(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_57, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(57, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_57(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_58, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(58, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_58(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_59, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(59, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_59(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_60, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(60, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_60(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_61, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(61, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_61(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_62, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(62, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_62(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_63, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(63, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_63(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_64, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(64, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_64(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_65, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(65, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_65(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_66, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(66, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_66(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_67, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(67, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_67(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_68, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(68, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_68(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_69, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(69, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_69(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_70, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(70, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_70(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_71, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(71, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_71(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_72, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(72, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_72(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_73, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(73, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_73(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_74, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(74, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_74(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_75, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(75, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_75(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_76, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(76, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_76(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_77, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(77, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_77(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_78, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(78, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_78(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_79, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(79, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_79(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_80, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(80, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_80(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_81, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(81, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_81(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_82, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(82, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_82(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_83, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(83, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_83(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_84, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(84, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_84(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_85, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(85, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_85(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_86, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(86, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_86(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_87, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(87, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_87(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_88, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(88, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_88(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_89, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(89, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_89(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_90, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(90, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_90(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_91, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(91, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_91(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_92, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(92, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_92(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_93, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(93, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_93(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_94, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(94, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_94(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_95, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(95, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_95(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_96, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(96, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_96(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_97, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(97, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_97(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_98, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(98, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_98(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_99, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(99, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_99(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_100, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(100, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_100(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_101, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(101, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_101(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_102, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(102, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_102(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_103, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(103, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_103(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_104, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(104, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_104(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_105, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(105, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_105(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_106, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(106, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_106(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_107, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(107, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_107(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_108, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(108, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_108(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_109, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(109, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_109(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_110, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(110, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_110(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_111, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(111, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_111(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_112, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(112, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_112(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_113, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(113, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_113(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_114, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(114, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_114(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_115, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(115, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_115(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_116, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(116, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_116(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_117, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(117, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_117(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_118, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(118, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_118(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_119, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(119, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_119(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_120, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(120, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_120(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_121, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(121, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_121(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_122, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(122, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_122(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_123, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(123, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_123(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_124, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(124, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_124(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_125, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(125, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_125(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_126, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(126, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_126(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_127, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(127, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_127(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_128, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(128, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_128(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_129, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(129, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_129(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_130, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(130, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_130(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_131, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(131, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_131(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_132, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(132, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_132(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_133, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(133, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_133(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_134, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(134, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_134(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_135, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(135, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_135(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_136, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(136, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_136(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_137, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(137, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_137(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_138, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(138, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_138(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_139, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(139, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_139(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_140, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(140, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_140(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_141, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(141, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_141(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_142, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(142, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_142(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_143, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(143, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_143(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_144, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(144, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_144(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_145, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(145, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_145(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_146, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(146, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_146(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_147, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(147, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_147(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_148, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(148, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_148(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_149, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(149, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_149(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_150, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(150, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_150(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_151, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(151, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_151(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_152, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(152, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_152(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_153, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(153, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_153(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_154, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(154, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_154(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_155, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(155, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_155(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_156, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(156, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_156(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_157, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(157, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_157(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_158, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(158, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_158(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_159, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(159, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_159(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_160, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(160, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_160(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_161, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(161, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_161(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_162, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(162, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_162(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_163, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(163, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_163(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_164, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(164, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_164(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_165, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(165, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_165(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_166, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(166, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_166(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_167, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(167, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_167(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_168, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(168, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_168(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_169, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(169, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_169(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_170, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(170, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_170(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_171, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(171, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_171(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_172, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(172, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_172(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_173, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(173, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_173(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_174, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(174, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_174(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_175, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(175, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_175(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_176, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(176, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_176(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_177, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(177, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_177(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_178, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(178, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_178(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_179, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(179, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_179(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_180, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(180, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_180(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_181, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(181, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_181(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_182, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(182, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_182(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_183, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(183, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_183(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_184, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(184, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_184(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_185, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(185, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_185(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_186, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(186, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_186(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_187, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(187, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_187(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_188, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(188, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_188(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_189, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(189, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_189(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_190, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(190, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_190(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_191, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(191, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_191(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_192, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(192, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_192(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_193, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(193, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_193(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_194, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(194, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_194(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_195, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(195, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_195(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_196, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(196, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_196(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_197, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(197, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_197(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_198, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(198, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_198(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_199, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(199, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_199(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_200, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(200, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_200(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_201, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(201, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_201(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_202, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(202, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_202(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_203, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(203, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_203(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_204, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(204, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_204(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_205, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(205, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_205(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_206, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(206, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_206(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_207, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(207, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_207(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_208, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(208, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_208(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_209, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(209, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_209(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_210, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(210, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_210(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_211, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(211, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_211(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_212, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(212, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_212(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_213, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(213, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_213(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_214, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(214, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_214(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_215, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(215, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_215(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_216, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(216, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_216(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_217, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(217, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_217(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_218, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(218, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_218(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_219, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(219, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_219(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_220, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(220, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_220(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_221, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(221, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_221(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_222, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(222, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_222(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_223, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(223, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_223(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_224, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(224, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_224(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_225, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(225, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_225(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_226, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(226, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_226(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_227, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(227, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_227(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_228, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(228, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_228(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_229, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(229, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_229(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_230, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(230, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_230(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_231, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(231, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_231(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_232, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(232, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_232(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_233, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(233, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_233(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_234, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(234, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_234(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_235, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(235, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_235(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_236, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(236, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_236(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_237, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(237, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_237(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_238, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(238, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_238(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_239, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(239, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_239(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_240, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(240, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_240(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_241, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(241, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_241(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_242, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(242, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_242(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_243, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(243, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_243(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_244, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(244, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_244(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_245, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(245, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_245(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_246, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(246, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_246(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_247, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(247, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_247(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_248, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(248, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_248(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_249, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(249, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_249(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_250, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(250, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_250(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_251, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(251, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_251(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_252, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(252, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_252(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_253, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(253, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_253(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_254, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(254, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_254(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_255, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(255, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_255(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_256, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(256, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_256(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_257, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(257, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# else +# define BOOST_PP_SEQ_FOLD_LEFT_I_1(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_2, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(2, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_2(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_3, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(3, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_3(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_4, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(4, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_4(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_5, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(5, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_5(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_6, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(6, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_6(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_7, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(7, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_7(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_8, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(8, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_8(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_9, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(9, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_9(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_10, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(10, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_10(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_11, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(11, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_11(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_12, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(12, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_12(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_13, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(13, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_13(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_14, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(14, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_14(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_15, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(15, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_15(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_16, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(16, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_16(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_17, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(17, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_17(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_18, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(18, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_18(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_19, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(19, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_19(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_20, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(20, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_20(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_21, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(21, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_21(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_22, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(22, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_22(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_23, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(23, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_23(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_24, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(24, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_24(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_25, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(25, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_25(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_26, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(26, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_26(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_27, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(27, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_27(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_28, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(28, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_28(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_29, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(29, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_29(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_30, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(30, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_30(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_31, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(31, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_31(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_32, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(32, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_32(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_33, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(33, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_33(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_34, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(34, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_34(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_35, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(35, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_35(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_36, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(36, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_36(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_37, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(37, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_37(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_38, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(38, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_38(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_39, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(39, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_39(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_40, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(40, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_40(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_41, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(41, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_41(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_42, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(42, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_42(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_43, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(43, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_43(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_44, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(44, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_44(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_45, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(45, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_45(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_46, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(46, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_46(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_47, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(47, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_47(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_48, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(48, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_48(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_49, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(49, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_49(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_50, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(50, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_50(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_51, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(51, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_51(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_52, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(52, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_52(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_53, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(53, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_53(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_54, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(54, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_54(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_55, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(55, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_55(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_56, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(56, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_56(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_57, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(57, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_57(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_58, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(58, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_58(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_59, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(59, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_59(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_60, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(60, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_60(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_61, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(61, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_61(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_62, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(62, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_62(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_63, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(63, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_63(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_64, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(64, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_64(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_65, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(65, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_65(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_66, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(66, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_66(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_67, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(67, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_67(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_68, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(68, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_68(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_69, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(69, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_69(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_70, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(70, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_70(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_71, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(71, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_71(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_72, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(72, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_72(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_73, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(73, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_73(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_74, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(74, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_74(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_75, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(75, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_75(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_76, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(76, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_76(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_77, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(77, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_77(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_78, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(78, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_78(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_79, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(79, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_79(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_80, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(80, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_80(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_81, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(81, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_81(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_82, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(82, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_82(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_83, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(83, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_83(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_84, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(84, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_84(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_85, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(85, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_85(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_86, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(86, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_86(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_87, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(87, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_87(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_88, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(88, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_88(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_89, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(89, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_89(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_90, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(90, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_90(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_91, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(91, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_91(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_92, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(92, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_92(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_93, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(93, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_93(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_94, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(94, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_94(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_95, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(95, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_95(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_96, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(96, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_96(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_97, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(97, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_97(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_98, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(98, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_98(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_99, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(99, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_99(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_100, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(100, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_100(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_101, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(101, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_101(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_102, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(102, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_102(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_103, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(103, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_103(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_104, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(104, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_104(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_105, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(105, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_105(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_106, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(106, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_106(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_107, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(107, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_107(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_108, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(108, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_108(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_109, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(109, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_109(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_110, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(110, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_110(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_111, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(111, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_111(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_112, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(112, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_112(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_113, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(113, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_113(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_114, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(114, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_114(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_115, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(115, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_115(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_116, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(116, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_116(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_117, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(117, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_117(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_118, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(118, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_118(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_119, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(119, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_119(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_120, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(120, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_120(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_121, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(121, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_121(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_122, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(122, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_122(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_123, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(123, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_123(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_124, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(124, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_124(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_125, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(125, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_125(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_126, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(126, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_126(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_127, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(127, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_127(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_128, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(128, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_128(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_129, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(129, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_129(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_130, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(130, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_130(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_131, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(131, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_131(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_132, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(132, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_132(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_133, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(133, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_133(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_134, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(134, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_134(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_135, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(135, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_135(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_136, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(136, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_136(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_137, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(137, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_137(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_138, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(138, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_138(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_139, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(139, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_139(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_140, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(140, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_140(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_141, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(141, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_141(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_142, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(142, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_142(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_143, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(143, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_143(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_144, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(144, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_144(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_145, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(145, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_145(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_146, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(146, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_146(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_147, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(147, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_147(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_148, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(148, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_148(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_149, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(149, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_149(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_150, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(150, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_150(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_151, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(151, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_151(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_152, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(152, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_152(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_153, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(153, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_153(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_154, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(154, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_154(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_155, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(155, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_155(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_156, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(156, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_156(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_157, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(157, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_157(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_158, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(158, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_158(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_159, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(159, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_159(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_160, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(160, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_160(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_161, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(161, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_161(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_162, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(162, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_162(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_163, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(163, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_163(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_164, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(164, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_164(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_165, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(165, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_165(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_166, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(166, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_166(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_167, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(167, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_167(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_168, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(168, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_168(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_169, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(169, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_169(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_170, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(170, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_170(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_171, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(171, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_171(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_172, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(172, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_172(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_173, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(173, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_173(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_174, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(174, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_174(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_175, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(175, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_175(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_176, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(176, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_176(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_177, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(177, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_177(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_178, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(178, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_178(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_179, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(179, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_179(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_180, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(180, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_180(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_181, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(181, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_181(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_182, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(182, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_182(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_183, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(183, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_183(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_184, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(184, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_184(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_185, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(185, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_185(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_186, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(186, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_186(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_187, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(187, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_187(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_188, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(188, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_188(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_189, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(189, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_189(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_190, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(190, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_190(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_191, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(191, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_191(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_192, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(192, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_192(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_193, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(193, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_193(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_194, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(194, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_194(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_195, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(195, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_195(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_196, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(196, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_196(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_197, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(197, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_197(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_198, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(198, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_198(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_199, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(199, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_199(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_200, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(200, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_200(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_201, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(201, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_201(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_202, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(202, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_202(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_203, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(203, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_203(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_204, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(204, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_204(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_205, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(205, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_205(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_206, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(206, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_206(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_207, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(207, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_207(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_208, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(208, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_208(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_209, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(209, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_209(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_210, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(210, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_210(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_211, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(211, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_211(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_212, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(212, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_212(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_213, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(213, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_213(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_214, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(214, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_214(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_215, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(215, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_215(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_216, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(216, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_216(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_217, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(217, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_217(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_218, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(218, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_218(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_219, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(219, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_219(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_220, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(220, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_220(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_221, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(221, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_221(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_222, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(222, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_222(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_223, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(223, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_223(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_224, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(224, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_224(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_225, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(225, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_225(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_226, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(226, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_226(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_227, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(227, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_227(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_228, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(228, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_228(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_229, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(229, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_229(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_230, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(230, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_230(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_231, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(231, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_231(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_232, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(232, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_232(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_233, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(233, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_233(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_234, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(234, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_234(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_235, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(235, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_235(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_236, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(236, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_236(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_237, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(237, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_237(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_238, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(238, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_238(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_239, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(239, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_239(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_240, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(240, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_240(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_241, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(241, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_241(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_242, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(242, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_242(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_243, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(243, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_243(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_244, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(244, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_244(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_245, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(245, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_245(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_246, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(246, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_246(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_247, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(247, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_247(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_248, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(248, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_248(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_249, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(249, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_249(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_250, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(250, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_250(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_251, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(251, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_251(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_252, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(252, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_252(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_253, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(253, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_253(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_254, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(254, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_254(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_255, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(255, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_255(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_256, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(256, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_256(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_257, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(257, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/seq/for_each.hpp b/ThirdParty/boost-Subset/boost/preprocessor/seq/for_each.hpp new file mode 100644 index 0000000000..3f9c0d781b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/seq/for_each.hpp @@ -0,0 +1,107 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_FOR_EACH_HPP +# define BOOST_PREPROCESSOR_SEQ_FOR_EACH_HPP +# +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_SEQ_FOR_EACH */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_FOR_EACH(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK(macro, data, seq) +# else +# define BOOST_PP_SEQ_FOR_EACH(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_D(macro, data, seq) +# define BOOST_PP_SEQ_FOR_EACH_D(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK(macro, data, seq) +# endif +# +# define BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EXEC(macro, data, seq) BOOST_PP_FOR((macro, data, seq, BOOST_PP_SEQ_SIZE(seq)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M) +# define BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EMPTY(macro, data, seq) +# +# define BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK(macro, data, seq) \ + BOOST_PP_IIF \ + ( \ + BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq), \ + BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EXEC, \ + BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EMPTY \ + ) \ + (macro, data, seq) \ +/**/ +# +# define BOOST_PP_SEQ_FOR_EACH_P(r, x) BOOST_PP_TUPLE_ELEM(4, 3, x) +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() +# define BOOST_PP_SEQ_FOR_EACH_O(r, x) BOOST_PP_SEQ_FOR_EACH_O_I x +# else +# define BOOST_PP_SEQ_FOR_EACH_O(r, x) BOOST_PP_SEQ_FOR_EACH_O_I(BOOST_PP_TUPLE_ELEM(4, 0, x), BOOST_PP_TUPLE_ELEM(4, 1, x), BOOST_PP_TUPLE_ELEM(4, 2, x), BOOST_PP_TUPLE_ELEM(4, 3, x)) +# endif +# +# define BOOST_PP_SEQ_FOR_EACH_O_I(macro, data, seq, sz) \ + BOOST_PP_SEQ_FOR_EACH_O_I_DEC(macro, data, seq, BOOST_PP_DEC(sz)) \ +/**/ +# define BOOST_PP_SEQ_FOR_EACH_O_I_DEC(macro, data, seq, sz) \ + ( \ + macro, \ + data, \ + BOOST_PP_IF \ + ( \ + sz, \ + BOOST_PP_SEQ_FOR_EACH_O_I_TAIL, \ + BOOST_PP_SEQ_FOR_EACH_O_I_NIL \ + ) \ + (seq), \ + sz \ + ) \ +/**/ +# define BOOST_PP_SEQ_FOR_EACH_O_I_TAIL(seq) BOOST_PP_SEQ_TAIL(seq) +# define BOOST_PP_SEQ_FOR_EACH_O_I_NIL(seq) BOOST_PP_NIL +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() +# define BOOST_PP_SEQ_FOR_EACH_M(r, x) BOOST_PP_SEQ_FOR_EACH_M_IM(r, BOOST_PP_TUPLE_REM_4 x) +# define BOOST_PP_SEQ_FOR_EACH_M_IM(r, im) BOOST_PP_SEQ_FOR_EACH_M_I(r, im) +# else +# define BOOST_PP_SEQ_FOR_EACH_M(r, x) BOOST_PP_SEQ_FOR_EACH_M_I(r, BOOST_PP_TUPLE_ELEM(4, 0, x), BOOST_PP_TUPLE_ELEM(4, 1, x), BOOST_PP_TUPLE_ELEM(4, 2, x), BOOST_PP_TUPLE_ELEM(4, 3, x)) +# endif +# +# define BOOST_PP_SEQ_FOR_EACH_M_I(r, macro, data, seq, sz) macro(r, data, BOOST_PP_SEQ_HEAD(seq)) +# +# /* BOOST_PP_SEQ_FOR_EACH_R */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_FOR_EACH_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_R(r, macro, data, seq) +# else +# define BOOST_PP_SEQ_FOR_EACH_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_R_I(r, macro, data, seq) +# define BOOST_PP_SEQ_FOR_EACH_R_I(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_R(r, macro, data, seq) +# endif +# +# define BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EXEC_R(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq, BOOST_PP_SEQ_SIZE(seq)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M) +# define BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EMPTY_R(r, macro, data, seq) +# +# define BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_R(r, macro, data, seq) \ + BOOST_PP_IIF \ + ( \ + BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq), \ + BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EXEC_R, \ + BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EMPTY_R \ + ) \ + (r, macro, data, seq) \ +/**/ +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/seq/for_each_i.hpp b/ThirdParty/boost-Subset/boost/preprocessor/seq/for_each_i.hpp new file mode 100644 index 0000000000..81028d77de --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/seq/for_each_i.hpp @@ -0,0 +1,109 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_FOR_EACH_I_HPP +# define BOOST_PREPROCESSOR_SEQ_FOR_EACH_I_HPP +# +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_SEQ_FOR_EACH_I */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_FOR_EACH_I(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK(macro, data, seq) +# else +# define BOOST_PP_SEQ_FOR_EACH_I(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_I(macro, data, seq) +# define BOOST_PP_SEQ_FOR_EACH_I_I(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK(macro, data, seq) +# endif +# +# define BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK_EXEC(macro, data, seq) BOOST_PP_FOR((macro, data, seq, 0, BOOST_PP_SEQ_SIZE(seq)), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M) +# define BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK_EMPTY(macro, data, seq) +# +# define BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK(macro, data, seq) \ + BOOST_PP_IIF \ + ( \ + BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq), \ + BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK_EXEC, \ + BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK_EMPTY \ + ) \ + (macro, data, seq) \ +/**/ +# +# define BOOST_PP_SEQ_FOR_EACH_I_P(r, x) BOOST_PP_TUPLE_ELEM(5, 4, x) +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() +# define BOOST_PP_SEQ_FOR_EACH_I_O(r, x) BOOST_PP_SEQ_FOR_EACH_I_O_I x +# else +# define BOOST_PP_SEQ_FOR_EACH_I_O(r, x) BOOST_PP_SEQ_FOR_EACH_I_O_I(BOOST_PP_TUPLE_ELEM(5, 0, x), BOOST_PP_TUPLE_ELEM(5, 1, x), BOOST_PP_TUPLE_ELEM(5, 2, x), BOOST_PP_TUPLE_ELEM(5, 3, x), BOOST_PP_TUPLE_ELEM(5, 4, x)) +# endif +# +# define BOOST_PP_SEQ_FOR_EACH_I_O_I(macro, data, seq, i, sz) \ + BOOST_PP_SEQ_FOR_EACH_I_O_I_DEC(macro, data, seq, i, BOOST_PP_DEC(sz)) \ +/**/ +# define BOOST_PP_SEQ_FOR_EACH_I_O_I_DEC(macro, data, seq, i, sz) \ + ( \ + macro, \ + data, \ + BOOST_PP_IF \ + ( \ + sz, \ + BOOST_PP_SEQ_FOR_EACH_I_O_I_TAIL, \ + BOOST_PP_SEQ_FOR_EACH_I_O_I_NIL \ + ) \ + (seq), \ + BOOST_PP_INC(i), \ + sz \ + ) \ +/**/ +# define BOOST_PP_SEQ_FOR_EACH_I_O_I_TAIL(seq) BOOST_PP_SEQ_TAIL(seq) +# define BOOST_PP_SEQ_FOR_EACH_I_O_I_NIL(seq) BOOST_PP_NIL +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() +# define BOOST_PP_SEQ_FOR_EACH_I_M(r, x) BOOST_PP_SEQ_FOR_EACH_I_M_IM(r, BOOST_PP_TUPLE_REM_5 x) +# define BOOST_PP_SEQ_FOR_EACH_I_M_IM(r, im) BOOST_PP_SEQ_FOR_EACH_I_M_I(r, im) +# else +# define BOOST_PP_SEQ_FOR_EACH_I_M(r, x) BOOST_PP_SEQ_FOR_EACH_I_M_I(r, BOOST_PP_TUPLE_ELEM(5, 0, x), BOOST_PP_TUPLE_ELEM(5, 1, x), BOOST_PP_TUPLE_ELEM(5, 2, x), BOOST_PP_TUPLE_ELEM(5, 3, x), BOOST_PP_TUPLE_ELEM(5, 4, x)) +# endif +# +# define BOOST_PP_SEQ_FOR_EACH_I_M_I(r, macro, data, seq, i, sz) macro(r, data, i, BOOST_PP_SEQ_HEAD(seq)) +# +# /* BOOST_PP_SEQ_FOR_EACH_I_R */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_FOR_EACH_I_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK(r, macro, data, seq) +# else +# define BOOST_PP_SEQ_FOR_EACH_I_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_R_I(r, macro, data, seq) +# define BOOST_PP_SEQ_FOR_EACH_I_R_I(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK(r, macro, data, seq) +# endif +# +# define BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK_EXEC(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq, 0, BOOST_PP_SEQ_SIZE(seq)), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M) +# define BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK_EMPTY(r, macro, data, seq) +# +# define BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK(r, macro, data, seq) \ + BOOST_PP_IIF \ + ( \ + BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq), \ + BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK_EXEC, \ + BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK_EMPTY \ + ) \ + (r, macro, data, seq) \ +/**/ +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/seq/rest_n.hpp b/ThirdParty/boost-Subset/boost/preprocessor/seq/rest_n.hpp new file mode 100644 index 0000000000..4aefba4fa1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/seq/rest_n.hpp @@ -0,0 +1,46 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_REST_N_HPP +# define BOOST_PREPROCESSOR_SEQ_REST_N_HPP +# +# include +# include +# include +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_SEQ_REST_N */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_SEQ_REST_N_DETAIL_EXEC(n, seq, BOOST_PP_SEQ_DETAIL_EMPTY_SIZE(seq)) +# else +# define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_SEQ_REST_N_I(n, seq) +# define BOOST_PP_SEQ_REST_N_I(n, seq) BOOST_PP_SEQ_REST_N_DETAIL_EXEC(n, seq, BOOST_PP_SEQ_DETAIL_EMPTY_SIZE(seq)) +# endif +# +# define BOOST_PP_SEQ_REST_N_DETAIL_EXEC(n, seq, size) \ + BOOST_PP_EXPR_IIF \ + ( \ + BOOST_PP_BITAND \ + ( \ + BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY_SIZE(size), \ + BOOST_PP_NOT_EQUAL(n,size) \ + ), \ + BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), BOOST_PP_IDENTITY( (nil) seq )))() \ + ) \ +/**/ +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/seq/seq.hpp b/ThirdParty/boost-Subset/boost/preprocessor/seq/seq.hpp new file mode 100644 index 0000000000..f5ca84c6f3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/seq/seq.hpp @@ -0,0 +1,44 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_SEQ_HPP +# define BOOST_PREPROCESSOR_SEQ_SEQ_HPP +# +# include +# include +# +# /* BOOST_PP_SEQ_HEAD */ +# +# define BOOST_PP_SEQ_HEAD(seq) BOOST_PP_SEQ_ELEM(0, seq) +# +# /* BOOST_PP_SEQ_TAIL */ +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_SEQ_TAIL(seq) BOOST_PP_SEQ_TAIL_1((seq)) +# define BOOST_PP_SEQ_TAIL_1(par) BOOST_PP_SEQ_TAIL_2 ## par +# define BOOST_PP_SEQ_TAIL_2(seq) BOOST_PP_SEQ_TAIL_I ## seq +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_SEQ_TAIL(seq) BOOST_PP_SEQ_TAIL_ID(BOOST_PP_SEQ_TAIL_I seq) +# define BOOST_PP_SEQ_TAIL_ID(id) id +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_TAIL(seq) BOOST_PP_SEQ_TAIL_D(seq) +# define BOOST_PP_SEQ_TAIL_D(seq) BOOST_PP_SEQ_TAIL_I seq +# else +# define BOOST_PP_SEQ_TAIL(seq) BOOST_PP_SEQ_TAIL_I seq +# endif +# +# define BOOST_PP_SEQ_TAIL_I(x) +# +# /* BOOST_PP_SEQ_NIL */ +# +# define BOOST_PP_SEQ_NIL(x) (x) +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/seq/size.hpp b/ThirdParty/boost-Subset/boost/preprocessor/seq/size.hpp new file mode 100644 index 0000000000..b5c8d9d051 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/seq/size.hpp @@ -0,0 +1,548 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_SIZE_HPP +# define BOOST_PREPROCESSOR_SEQ_SIZE_HPP +# +# include +# include +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_SEQ_SIZE(seq) BOOST_PP_SEQ_SIZE_I((seq)) +# define BOOST_PP_SEQ_SIZE_I(par) BOOST_PP_SEQ_SIZE_II ## par +# define BOOST_PP_SEQ_SIZE_II(seq) BOOST_PP_CAT(BOOST_PP_SEQ_SIZE_, BOOST_PP_SEQ_SIZE_0 ## seq) +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() || BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_SEQ_SIZE(seq) BOOST_PP_SEQ_SIZE_I(seq) +# define BOOST_PP_SEQ_SIZE_I(seq) BOOST_PP_CAT(BOOST_PP_SEQ_SIZE_, BOOST_PP_SEQ_SIZE_0 seq) +# elif defined(__IBMC__) || defined(__IBMCPP__) +# define BOOST_PP_SEQ_SIZE(seq) BOOST_PP_CAT(BOOST_PP_SEQ_SIZE_, BOOST_PP_CAT(BOOST_PP_SEQ_SIZE_0, seq)) +# else +# define BOOST_PP_SEQ_SIZE(seq) BOOST_PP_CAT(BOOST_PP_SEQ_SIZE_, BOOST_PP_SEQ_SIZE_0 seq) +# endif +# +# define BOOST_PP_SEQ_SIZE_0(_) BOOST_PP_SEQ_SIZE_1 +# define BOOST_PP_SEQ_SIZE_1(_) BOOST_PP_SEQ_SIZE_2 +# define BOOST_PP_SEQ_SIZE_2(_) BOOST_PP_SEQ_SIZE_3 +# define BOOST_PP_SEQ_SIZE_3(_) BOOST_PP_SEQ_SIZE_4 +# define BOOST_PP_SEQ_SIZE_4(_) BOOST_PP_SEQ_SIZE_5 +# define BOOST_PP_SEQ_SIZE_5(_) BOOST_PP_SEQ_SIZE_6 +# define BOOST_PP_SEQ_SIZE_6(_) BOOST_PP_SEQ_SIZE_7 +# define BOOST_PP_SEQ_SIZE_7(_) BOOST_PP_SEQ_SIZE_8 +# define BOOST_PP_SEQ_SIZE_8(_) BOOST_PP_SEQ_SIZE_9 +# define BOOST_PP_SEQ_SIZE_9(_) BOOST_PP_SEQ_SIZE_10 +# define BOOST_PP_SEQ_SIZE_10(_) BOOST_PP_SEQ_SIZE_11 +# define BOOST_PP_SEQ_SIZE_11(_) BOOST_PP_SEQ_SIZE_12 +# define BOOST_PP_SEQ_SIZE_12(_) BOOST_PP_SEQ_SIZE_13 +# define BOOST_PP_SEQ_SIZE_13(_) BOOST_PP_SEQ_SIZE_14 +# define BOOST_PP_SEQ_SIZE_14(_) BOOST_PP_SEQ_SIZE_15 +# define BOOST_PP_SEQ_SIZE_15(_) BOOST_PP_SEQ_SIZE_16 +# define BOOST_PP_SEQ_SIZE_16(_) BOOST_PP_SEQ_SIZE_17 +# define BOOST_PP_SEQ_SIZE_17(_) BOOST_PP_SEQ_SIZE_18 +# define BOOST_PP_SEQ_SIZE_18(_) BOOST_PP_SEQ_SIZE_19 +# define BOOST_PP_SEQ_SIZE_19(_) BOOST_PP_SEQ_SIZE_20 +# define BOOST_PP_SEQ_SIZE_20(_) BOOST_PP_SEQ_SIZE_21 +# define BOOST_PP_SEQ_SIZE_21(_) BOOST_PP_SEQ_SIZE_22 +# define BOOST_PP_SEQ_SIZE_22(_) BOOST_PP_SEQ_SIZE_23 +# define BOOST_PP_SEQ_SIZE_23(_) BOOST_PP_SEQ_SIZE_24 +# define BOOST_PP_SEQ_SIZE_24(_) BOOST_PP_SEQ_SIZE_25 +# define BOOST_PP_SEQ_SIZE_25(_) BOOST_PP_SEQ_SIZE_26 +# define BOOST_PP_SEQ_SIZE_26(_) BOOST_PP_SEQ_SIZE_27 +# define BOOST_PP_SEQ_SIZE_27(_) BOOST_PP_SEQ_SIZE_28 +# define BOOST_PP_SEQ_SIZE_28(_) BOOST_PP_SEQ_SIZE_29 +# define BOOST_PP_SEQ_SIZE_29(_) BOOST_PP_SEQ_SIZE_30 +# define BOOST_PP_SEQ_SIZE_30(_) BOOST_PP_SEQ_SIZE_31 +# define BOOST_PP_SEQ_SIZE_31(_) BOOST_PP_SEQ_SIZE_32 +# define BOOST_PP_SEQ_SIZE_32(_) BOOST_PP_SEQ_SIZE_33 +# define BOOST_PP_SEQ_SIZE_33(_) BOOST_PP_SEQ_SIZE_34 +# define BOOST_PP_SEQ_SIZE_34(_) BOOST_PP_SEQ_SIZE_35 +# define BOOST_PP_SEQ_SIZE_35(_) BOOST_PP_SEQ_SIZE_36 +# define BOOST_PP_SEQ_SIZE_36(_) BOOST_PP_SEQ_SIZE_37 +# define BOOST_PP_SEQ_SIZE_37(_) BOOST_PP_SEQ_SIZE_38 +# define BOOST_PP_SEQ_SIZE_38(_) BOOST_PP_SEQ_SIZE_39 +# define BOOST_PP_SEQ_SIZE_39(_) BOOST_PP_SEQ_SIZE_40 +# define BOOST_PP_SEQ_SIZE_40(_) BOOST_PP_SEQ_SIZE_41 +# define BOOST_PP_SEQ_SIZE_41(_) BOOST_PP_SEQ_SIZE_42 +# define BOOST_PP_SEQ_SIZE_42(_) BOOST_PP_SEQ_SIZE_43 +# define BOOST_PP_SEQ_SIZE_43(_) BOOST_PP_SEQ_SIZE_44 +# define BOOST_PP_SEQ_SIZE_44(_) BOOST_PP_SEQ_SIZE_45 +# define BOOST_PP_SEQ_SIZE_45(_) BOOST_PP_SEQ_SIZE_46 +# define BOOST_PP_SEQ_SIZE_46(_) BOOST_PP_SEQ_SIZE_47 +# define BOOST_PP_SEQ_SIZE_47(_) BOOST_PP_SEQ_SIZE_48 +# define BOOST_PP_SEQ_SIZE_48(_) BOOST_PP_SEQ_SIZE_49 +# define BOOST_PP_SEQ_SIZE_49(_) BOOST_PP_SEQ_SIZE_50 +# define BOOST_PP_SEQ_SIZE_50(_) BOOST_PP_SEQ_SIZE_51 +# define BOOST_PP_SEQ_SIZE_51(_) BOOST_PP_SEQ_SIZE_52 +# define BOOST_PP_SEQ_SIZE_52(_) BOOST_PP_SEQ_SIZE_53 +# define BOOST_PP_SEQ_SIZE_53(_) BOOST_PP_SEQ_SIZE_54 +# define BOOST_PP_SEQ_SIZE_54(_) BOOST_PP_SEQ_SIZE_55 +# define BOOST_PP_SEQ_SIZE_55(_) BOOST_PP_SEQ_SIZE_56 +# define BOOST_PP_SEQ_SIZE_56(_) BOOST_PP_SEQ_SIZE_57 +# define BOOST_PP_SEQ_SIZE_57(_) BOOST_PP_SEQ_SIZE_58 +# define BOOST_PP_SEQ_SIZE_58(_) BOOST_PP_SEQ_SIZE_59 +# define BOOST_PP_SEQ_SIZE_59(_) BOOST_PP_SEQ_SIZE_60 +# define BOOST_PP_SEQ_SIZE_60(_) BOOST_PP_SEQ_SIZE_61 +# define BOOST_PP_SEQ_SIZE_61(_) BOOST_PP_SEQ_SIZE_62 +# define BOOST_PP_SEQ_SIZE_62(_) BOOST_PP_SEQ_SIZE_63 +# define BOOST_PP_SEQ_SIZE_63(_) BOOST_PP_SEQ_SIZE_64 +# define BOOST_PP_SEQ_SIZE_64(_) BOOST_PP_SEQ_SIZE_65 +# define BOOST_PP_SEQ_SIZE_65(_) BOOST_PP_SEQ_SIZE_66 +# define BOOST_PP_SEQ_SIZE_66(_) BOOST_PP_SEQ_SIZE_67 +# define BOOST_PP_SEQ_SIZE_67(_) BOOST_PP_SEQ_SIZE_68 +# define BOOST_PP_SEQ_SIZE_68(_) BOOST_PP_SEQ_SIZE_69 +# define BOOST_PP_SEQ_SIZE_69(_) BOOST_PP_SEQ_SIZE_70 +# define BOOST_PP_SEQ_SIZE_70(_) BOOST_PP_SEQ_SIZE_71 +# define BOOST_PP_SEQ_SIZE_71(_) BOOST_PP_SEQ_SIZE_72 +# define BOOST_PP_SEQ_SIZE_72(_) BOOST_PP_SEQ_SIZE_73 +# define BOOST_PP_SEQ_SIZE_73(_) BOOST_PP_SEQ_SIZE_74 +# define BOOST_PP_SEQ_SIZE_74(_) BOOST_PP_SEQ_SIZE_75 +# define BOOST_PP_SEQ_SIZE_75(_) BOOST_PP_SEQ_SIZE_76 +# define BOOST_PP_SEQ_SIZE_76(_) BOOST_PP_SEQ_SIZE_77 +# define BOOST_PP_SEQ_SIZE_77(_) BOOST_PP_SEQ_SIZE_78 +# define BOOST_PP_SEQ_SIZE_78(_) BOOST_PP_SEQ_SIZE_79 +# define BOOST_PP_SEQ_SIZE_79(_) BOOST_PP_SEQ_SIZE_80 +# define BOOST_PP_SEQ_SIZE_80(_) BOOST_PP_SEQ_SIZE_81 +# define BOOST_PP_SEQ_SIZE_81(_) BOOST_PP_SEQ_SIZE_82 +# define BOOST_PP_SEQ_SIZE_82(_) BOOST_PP_SEQ_SIZE_83 +# define BOOST_PP_SEQ_SIZE_83(_) BOOST_PP_SEQ_SIZE_84 +# define BOOST_PP_SEQ_SIZE_84(_) BOOST_PP_SEQ_SIZE_85 +# define BOOST_PP_SEQ_SIZE_85(_) BOOST_PP_SEQ_SIZE_86 +# define BOOST_PP_SEQ_SIZE_86(_) BOOST_PP_SEQ_SIZE_87 +# define BOOST_PP_SEQ_SIZE_87(_) BOOST_PP_SEQ_SIZE_88 +# define BOOST_PP_SEQ_SIZE_88(_) BOOST_PP_SEQ_SIZE_89 +# define BOOST_PP_SEQ_SIZE_89(_) BOOST_PP_SEQ_SIZE_90 +# define BOOST_PP_SEQ_SIZE_90(_) BOOST_PP_SEQ_SIZE_91 +# define BOOST_PP_SEQ_SIZE_91(_) BOOST_PP_SEQ_SIZE_92 +# define BOOST_PP_SEQ_SIZE_92(_) BOOST_PP_SEQ_SIZE_93 +# define BOOST_PP_SEQ_SIZE_93(_) BOOST_PP_SEQ_SIZE_94 +# define BOOST_PP_SEQ_SIZE_94(_) BOOST_PP_SEQ_SIZE_95 +# define BOOST_PP_SEQ_SIZE_95(_) BOOST_PP_SEQ_SIZE_96 +# define BOOST_PP_SEQ_SIZE_96(_) BOOST_PP_SEQ_SIZE_97 +# define BOOST_PP_SEQ_SIZE_97(_) BOOST_PP_SEQ_SIZE_98 +# define BOOST_PP_SEQ_SIZE_98(_) BOOST_PP_SEQ_SIZE_99 +# define BOOST_PP_SEQ_SIZE_99(_) BOOST_PP_SEQ_SIZE_100 +# define BOOST_PP_SEQ_SIZE_100(_) BOOST_PP_SEQ_SIZE_101 +# define BOOST_PP_SEQ_SIZE_101(_) BOOST_PP_SEQ_SIZE_102 +# define BOOST_PP_SEQ_SIZE_102(_) BOOST_PP_SEQ_SIZE_103 +# define BOOST_PP_SEQ_SIZE_103(_) BOOST_PP_SEQ_SIZE_104 +# define BOOST_PP_SEQ_SIZE_104(_) BOOST_PP_SEQ_SIZE_105 +# define BOOST_PP_SEQ_SIZE_105(_) BOOST_PP_SEQ_SIZE_106 +# define BOOST_PP_SEQ_SIZE_106(_) BOOST_PP_SEQ_SIZE_107 +# define BOOST_PP_SEQ_SIZE_107(_) BOOST_PP_SEQ_SIZE_108 +# define BOOST_PP_SEQ_SIZE_108(_) BOOST_PP_SEQ_SIZE_109 +# define BOOST_PP_SEQ_SIZE_109(_) BOOST_PP_SEQ_SIZE_110 +# define BOOST_PP_SEQ_SIZE_110(_) BOOST_PP_SEQ_SIZE_111 +# define BOOST_PP_SEQ_SIZE_111(_) BOOST_PP_SEQ_SIZE_112 +# define BOOST_PP_SEQ_SIZE_112(_) BOOST_PP_SEQ_SIZE_113 +# define BOOST_PP_SEQ_SIZE_113(_) BOOST_PP_SEQ_SIZE_114 +# define BOOST_PP_SEQ_SIZE_114(_) BOOST_PP_SEQ_SIZE_115 +# define BOOST_PP_SEQ_SIZE_115(_) BOOST_PP_SEQ_SIZE_116 +# define BOOST_PP_SEQ_SIZE_116(_) BOOST_PP_SEQ_SIZE_117 +# define BOOST_PP_SEQ_SIZE_117(_) BOOST_PP_SEQ_SIZE_118 +# define BOOST_PP_SEQ_SIZE_118(_) BOOST_PP_SEQ_SIZE_119 +# define BOOST_PP_SEQ_SIZE_119(_) BOOST_PP_SEQ_SIZE_120 +# define BOOST_PP_SEQ_SIZE_120(_) BOOST_PP_SEQ_SIZE_121 +# define BOOST_PP_SEQ_SIZE_121(_) BOOST_PP_SEQ_SIZE_122 +# define BOOST_PP_SEQ_SIZE_122(_) BOOST_PP_SEQ_SIZE_123 +# define BOOST_PP_SEQ_SIZE_123(_) BOOST_PP_SEQ_SIZE_124 +# define BOOST_PP_SEQ_SIZE_124(_) BOOST_PP_SEQ_SIZE_125 +# define BOOST_PP_SEQ_SIZE_125(_) BOOST_PP_SEQ_SIZE_126 +# define BOOST_PP_SEQ_SIZE_126(_) BOOST_PP_SEQ_SIZE_127 +# define BOOST_PP_SEQ_SIZE_127(_) BOOST_PP_SEQ_SIZE_128 +# define BOOST_PP_SEQ_SIZE_128(_) BOOST_PP_SEQ_SIZE_129 +# define BOOST_PP_SEQ_SIZE_129(_) BOOST_PP_SEQ_SIZE_130 +# define BOOST_PP_SEQ_SIZE_130(_) BOOST_PP_SEQ_SIZE_131 +# define BOOST_PP_SEQ_SIZE_131(_) BOOST_PP_SEQ_SIZE_132 +# define BOOST_PP_SEQ_SIZE_132(_) BOOST_PP_SEQ_SIZE_133 +# define BOOST_PP_SEQ_SIZE_133(_) BOOST_PP_SEQ_SIZE_134 +# define BOOST_PP_SEQ_SIZE_134(_) BOOST_PP_SEQ_SIZE_135 +# define BOOST_PP_SEQ_SIZE_135(_) BOOST_PP_SEQ_SIZE_136 +# define BOOST_PP_SEQ_SIZE_136(_) BOOST_PP_SEQ_SIZE_137 +# define BOOST_PP_SEQ_SIZE_137(_) BOOST_PP_SEQ_SIZE_138 +# define BOOST_PP_SEQ_SIZE_138(_) BOOST_PP_SEQ_SIZE_139 +# define BOOST_PP_SEQ_SIZE_139(_) BOOST_PP_SEQ_SIZE_140 +# define BOOST_PP_SEQ_SIZE_140(_) BOOST_PP_SEQ_SIZE_141 +# define BOOST_PP_SEQ_SIZE_141(_) BOOST_PP_SEQ_SIZE_142 +# define BOOST_PP_SEQ_SIZE_142(_) BOOST_PP_SEQ_SIZE_143 +# define BOOST_PP_SEQ_SIZE_143(_) BOOST_PP_SEQ_SIZE_144 +# define BOOST_PP_SEQ_SIZE_144(_) BOOST_PP_SEQ_SIZE_145 +# define BOOST_PP_SEQ_SIZE_145(_) BOOST_PP_SEQ_SIZE_146 +# define BOOST_PP_SEQ_SIZE_146(_) BOOST_PP_SEQ_SIZE_147 +# define BOOST_PP_SEQ_SIZE_147(_) BOOST_PP_SEQ_SIZE_148 +# define BOOST_PP_SEQ_SIZE_148(_) BOOST_PP_SEQ_SIZE_149 +# define BOOST_PP_SEQ_SIZE_149(_) BOOST_PP_SEQ_SIZE_150 +# define BOOST_PP_SEQ_SIZE_150(_) BOOST_PP_SEQ_SIZE_151 +# define BOOST_PP_SEQ_SIZE_151(_) BOOST_PP_SEQ_SIZE_152 +# define BOOST_PP_SEQ_SIZE_152(_) BOOST_PP_SEQ_SIZE_153 +# define BOOST_PP_SEQ_SIZE_153(_) BOOST_PP_SEQ_SIZE_154 +# define BOOST_PP_SEQ_SIZE_154(_) BOOST_PP_SEQ_SIZE_155 +# define BOOST_PP_SEQ_SIZE_155(_) BOOST_PP_SEQ_SIZE_156 +# define BOOST_PP_SEQ_SIZE_156(_) BOOST_PP_SEQ_SIZE_157 +# define BOOST_PP_SEQ_SIZE_157(_) BOOST_PP_SEQ_SIZE_158 +# define BOOST_PP_SEQ_SIZE_158(_) BOOST_PP_SEQ_SIZE_159 +# define BOOST_PP_SEQ_SIZE_159(_) BOOST_PP_SEQ_SIZE_160 +# define BOOST_PP_SEQ_SIZE_160(_) BOOST_PP_SEQ_SIZE_161 +# define BOOST_PP_SEQ_SIZE_161(_) BOOST_PP_SEQ_SIZE_162 +# define BOOST_PP_SEQ_SIZE_162(_) BOOST_PP_SEQ_SIZE_163 +# define BOOST_PP_SEQ_SIZE_163(_) BOOST_PP_SEQ_SIZE_164 +# define BOOST_PP_SEQ_SIZE_164(_) BOOST_PP_SEQ_SIZE_165 +# define BOOST_PP_SEQ_SIZE_165(_) BOOST_PP_SEQ_SIZE_166 +# define BOOST_PP_SEQ_SIZE_166(_) BOOST_PP_SEQ_SIZE_167 +# define BOOST_PP_SEQ_SIZE_167(_) BOOST_PP_SEQ_SIZE_168 +# define BOOST_PP_SEQ_SIZE_168(_) BOOST_PP_SEQ_SIZE_169 +# define BOOST_PP_SEQ_SIZE_169(_) BOOST_PP_SEQ_SIZE_170 +# define BOOST_PP_SEQ_SIZE_170(_) BOOST_PP_SEQ_SIZE_171 +# define BOOST_PP_SEQ_SIZE_171(_) BOOST_PP_SEQ_SIZE_172 +# define BOOST_PP_SEQ_SIZE_172(_) BOOST_PP_SEQ_SIZE_173 +# define BOOST_PP_SEQ_SIZE_173(_) BOOST_PP_SEQ_SIZE_174 +# define BOOST_PP_SEQ_SIZE_174(_) BOOST_PP_SEQ_SIZE_175 +# define BOOST_PP_SEQ_SIZE_175(_) BOOST_PP_SEQ_SIZE_176 +# define BOOST_PP_SEQ_SIZE_176(_) BOOST_PP_SEQ_SIZE_177 +# define BOOST_PP_SEQ_SIZE_177(_) BOOST_PP_SEQ_SIZE_178 +# define BOOST_PP_SEQ_SIZE_178(_) BOOST_PP_SEQ_SIZE_179 +# define BOOST_PP_SEQ_SIZE_179(_) BOOST_PP_SEQ_SIZE_180 +# define BOOST_PP_SEQ_SIZE_180(_) BOOST_PP_SEQ_SIZE_181 +# define BOOST_PP_SEQ_SIZE_181(_) BOOST_PP_SEQ_SIZE_182 +# define BOOST_PP_SEQ_SIZE_182(_) BOOST_PP_SEQ_SIZE_183 +# define BOOST_PP_SEQ_SIZE_183(_) BOOST_PP_SEQ_SIZE_184 +# define BOOST_PP_SEQ_SIZE_184(_) BOOST_PP_SEQ_SIZE_185 +# define BOOST_PP_SEQ_SIZE_185(_) BOOST_PP_SEQ_SIZE_186 +# define BOOST_PP_SEQ_SIZE_186(_) BOOST_PP_SEQ_SIZE_187 +# define BOOST_PP_SEQ_SIZE_187(_) BOOST_PP_SEQ_SIZE_188 +# define BOOST_PP_SEQ_SIZE_188(_) BOOST_PP_SEQ_SIZE_189 +# define BOOST_PP_SEQ_SIZE_189(_) BOOST_PP_SEQ_SIZE_190 +# define BOOST_PP_SEQ_SIZE_190(_) BOOST_PP_SEQ_SIZE_191 +# define BOOST_PP_SEQ_SIZE_191(_) BOOST_PP_SEQ_SIZE_192 +# define BOOST_PP_SEQ_SIZE_192(_) BOOST_PP_SEQ_SIZE_193 +# define BOOST_PP_SEQ_SIZE_193(_) BOOST_PP_SEQ_SIZE_194 +# define BOOST_PP_SEQ_SIZE_194(_) BOOST_PP_SEQ_SIZE_195 +# define BOOST_PP_SEQ_SIZE_195(_) BOOST_PP_SEQ_SIZE_196 +# define BOOST_PP_SEQ_SIZE_196(_) BOOST_PP_SEQ_SIZE_197 +# define BOOST_PP_SEQ_SIZE_197(_) BOOST_PP_SEQ_SIZE_198 +# define BOOST_PP_SEQ_SIZE_198(_) BOOST_PP_SEQ_SIZE_199 +# define BOOST_PP_SEQ_SIZE_199(_) BOOST_PP_SEQ_SIZE_200 +# define BOOST_PP_SEQ_SIZE_200(_) BOOST_PP_SEQ_SIZE_201 +# define BOOST_PP_SEQ_SIZE_201(_) BOOST_PP_SEQ_SIZE_202 +# define BOOST_PP_SEQ_SIZE_202(_) BOOST_PP_SEQ_SIZE_203 +# define BOOST_PP_SEQ_SIZE_203(_) BOOST_PP_SEQ_SIZE_204 +# define BOOST_PP_SEQ_SIZE_204(_) BOOST_PP_SEQ_SIZE_205 +# define BOOST_PP_SEQ_SIZE_205(_) BOOST_PP_SEQ_SIZE_206 +# define BOOST_PP_SEQ_SIZE_206(_) BOOST_PP_SEQ_SIZE_207 +# define BOOST_PP_SEQ_SIZE_207(_) BOOST_PP_SEQ_SIZE_208 +# define BOOST_PP_SEQ_SIZE_208(_) BOOST_PP_SEQ_SIZE_209 +# define BOOST_PP_SEQ_SIZE_209(_) BOOST_PP_SEQ_SIZE_210 +# define BOOST_PP_SEQ_SIZE_210(_) BOOST_PP_SEQ_SIZE_211 +# define BOOST_PP_SEQ_SIZE_211(_) BOOST_PP_SEQ_SIZE_212 +# define BOOST_PP_SEQ_SIZE_212(_) BOOST_PP_SEQ_SIZE_213 +# define BOOST_PP_SEQ_SIZE_213(_) BOOST_PP_SEQ_SIZE_214 +# define BOOST_PP_SEQ_SIZE_214(_) BOOST_PP_SEQ_SIZE_215 +# define BOOST_PP_SEQ_SIZE_215(_) BOOST_PP_SEQ_SIZE_216 +# define BOOST_PP_SEQ_SIZE_216(_) BOOST_PP_SEQ_SIZE_217 +# define BOOST_PP_SEQ_SIZE_217(_) BOOST_PP_SEQ_SIZE_218 +# define BOOST_PP_SEQ_SIZE_218(_) BOOST_PP_SEQ_SIZE_219 +# define BOOST_PP_SEQ_SIZE_219(_) BOOST_PP_SEQ_SIZE_220 +# define BOOST_PP_SEQ_SIZE_220(_) BOOST_PP_SEQ_SIZE_221 +# define BOOST_PP_SEQ_SIZE_221(_) BOOST_PP_SEQ_SIZE_222 +# define BOOST_PP_SEQ_SIZE_222(_) BOOST_PP_SEQ_SIZE_223 +# define BOOST_PP_SEQ_SIZE_223(_) BOOST_PP_SEQ_SIZE_224 +# define BOOST_PP_SEQ_SIZE_224(_) BOOST_PP_SEQ_SIZE_225 +# define BOOST_PP_SEQ_SIZE_225(_) BOOST_PP_SEQ_SIZE_226 +# define BOOST_PP_SEQ_SIZE_226(_) BOOST_PP_SEQ_SIZE_227 +# define BOOST_PP_SEQ_SIZE_227(_) BOOST_PP_SEQ_SIZE_228 +# define BOOST_PP_SEQ_SIZE_228(_) BOOST_PP_SEQ_SIZE_229 +# define BOOST_PP_SEQ_SIZE_229(_) BOOST_PP_SEQ_SIZE_230 +# define BOOST_PP_SEQ_SIZE_230(_) BOOST_PP_SEQ_SIZE_231 +# define BOOST_PP_SEQ_SIZE_231(_) BOOST_PP_SEQ_SIZE_232 +# define BOOST_PP_SEQ_SIZE_232(_) BOOST_PP_SEQ_SIZE_233 +# define BOOST_PP_SEQ_SIZE_233(_) BOOST_PP_SEQ_SIZE_234 +# define BOOST_PP_SEQ_SIZE_234(_) BOOST_PP_SEQ_SIZE_235 +# define BOOST_PP_SEQ_SIZE_235(_) BOOST_PP_SEQ_SIZE_236 +# define BOOST_PP_SEQ_SIZE_236(_) BOOST_PP_SEQ_SIZE_237 +# define BOOST_PP_SEQ_SIZE_237(_) BOOST_PP_SEQ_SIZE_238 +# define BOOST_PP_SEQ_SIZE_238(_) BOOST_PP_SEQ_SIZE_239 +# define BOOST_PP_SEQ_SIZE_239(_) BOOST_PP_SEQ_SIZE_240 +# define BOOST_PP_SEQ_SIZE_240(_) BOOST_PP_SEQ_SIZE_241 +# define BOOST_PP_SEQ_SIZE_241(_) BOOST_PP_SEQ_SIZE_242 +# define BOOST_PP_SEQ_SIZE_242(_) BOOST_PP_SEQ_SIZE_243 +# define BOOST_PP_SEQ_SIZE_243(_) BOOST_PP_SEQ_SIZE_244 +# define BOOST_PP_SEQ_SIZE_244(_) BOOST_PP_SEQ_SIZE_245 +# define BOOST_PP_SEQ_SIZE_245(_) BOOST_PP_SEQ_SIZE_246 +# define BOOST_PP_SEQ_SIZE_246(_) BOOST_PP_SEQ_SIZE_247 +# define BOOST_PP_SEQ_SIZE_247(_) BOOST_PP_SEQ_SIZE_248 +# define BOOST_PP_SEQ_SIZE_248(_) BOOST_PP_SEQ_SIZE_249 +# define BOOST_PP_SEQ_SIZE_249(_) BOOST_PP_SEQ_SIZE_250 +# define BOOST_PP_SEQ_SIZE_250(_) BOOST_PP_SEQ_SIZE_251 +# define BOOST_PP_SEQ_SIZE_251(_) BOOST_PP_SEQ_SIZE_252 +# define BOOST_PP_SEQ_SIZE_252(_) BOOST_PP_SEQ_SIZE_253 +# define BOOST_PP_SEQ_SIZE_253(_) BOOST_PP_SEQ_SIZE_254 +# define BOOST_PP_SEQ_SIZE_254(_) BOOST_PP_SEQ_SIZE_255 +# define BOOST_PP_SEQ_SIZE_255(_) BOOST_PP_SEQ_SIZE_256 +# define BOOST_PP_SEQ_SIZE_256(_) BOOST_PP_SEQ_SIZE_257 +# +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_0 0 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_1 1 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_2 2 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_3 3 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_4 4 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_5 5 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_6 6 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_7 7 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_8 8 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_9 9 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_10 10 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_11 11 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_12 12 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_13 13 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_14 14 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_15 15 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_16 16 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_17 17 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_18 18 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_19 19 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_20 20 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_21 21 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_22 22 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_23 23 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_24 24 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_25 25 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_26 26 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_27 27 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_28 28 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_29 29 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_30 30 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_31 31 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_32 32 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_33 33 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_34 34 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_35 35 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_36 36 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_37 37 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_38 38 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_39 39 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_40 40 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_41 41 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_42 42 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_43 43 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_44 44 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_45 45 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_46 46 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_47 47 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_48 48 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_49 49 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_50 50 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_51 51 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_52 52 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_53 53 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_54 54 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_55 55 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_56 56 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_57 57 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_58 58 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_59 59 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_60 60 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_61 61 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_62 62 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_63 63 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_64 64 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_65 65 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_66 66 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_67 67 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_68 68 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_69 69 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_70 70 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_71 71 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_72 72 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_73 73 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_74 74 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_75 75 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_76 76 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_77 77 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_78 78 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_79 79 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_80 80 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_81 81 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_82 82 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_83 83 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_84 84 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_85 85 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_86 86 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_87 87 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_88 88 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_89 89 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_90 90 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_91 91 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_92 92 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_93 93 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_94 94 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_95 95 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_96 96 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_97 97 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_98 98 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_99 99 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_100 100 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_101 101 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_102 102 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_103 103 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_104 104 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_105 105 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_106 106 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_107 107 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_108 108 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_109 109 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_110 110 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_111 111 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_112 112 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_113 113 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_114 114 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_115 115 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_116 116 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_117 117 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_118 118 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_119 119 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_120 120 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_121 121 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_122 122 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_123 123 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_124 124 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_125 125 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_126 126 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_127 127 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_128 128 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_129 129 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_130 130 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_131 131 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_132 132 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_133 133 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_134 134 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_135 135 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_136 136 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_137 137 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_138 138 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_139 139 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_140 140 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_141 141 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_142 142 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_143 143 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_144 144 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_145 145 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_146 146 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_147 147 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_148 148 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_149 149 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_150 150 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_151 151 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_152 152 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_153 153 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_154 154 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_155 155 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_156 156 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_157 157 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_158 158 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_159 159 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_160 160 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_161 161 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_162 162 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_163 163 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_164 164 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_165 165 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_166 166 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_167 167 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_168 168 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_169 169 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_170 170 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_171 171 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_172 172 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_173 173 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_174 174 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_175 175 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_176 176 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_177 177 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_178 178 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_179 179 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_180 180 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_181 181 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_182 182 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_183 183 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_184 184 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_185 185 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_186 186 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_187 187 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_188 188 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_189 189 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_190 190 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_191 191 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_192 192 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_193 193 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_194 194 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_195 195 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_196 196 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_197 197 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_198 198 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_199 199 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_200 200 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_201 201 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_202 202 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_203 203 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_204 204 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_205 205 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_206 206 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_207 207 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_208 208 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_209 209 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_210 210 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_211 211 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_212 212 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_213 213 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_214 214 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_215 215 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_216 216 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_217 217 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_218 218 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_219 219 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_220 220 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_221 221 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_222 222 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_223 223 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_224 224 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_225 225 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_226 226 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_227 227 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_228 228 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_229 229 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_230 230 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_231 231 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_232 232 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_233 233 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_234 234 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_235 235 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_236 236 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_237 237 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_238 238 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_239 239 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_240 240 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_241 241 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_242 242 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_243 243 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_244 244 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_245 245 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_246 246 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_247 247 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_248 248 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_249 249 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_250 250 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_251 251 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_252 252 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_253 253 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_254 254 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_255 255 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_256 256 +# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_257 257 +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/seq/subseq.hpp b/ThirdParty/boost-Subset/boost/preprocessor/seq/subseq.hpp new file mode 100644 index 0000000000..fb242f1e69 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/seq/subseq.hpp @@ -0,0 +1,28 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_SUBSEQ_HPP +# define BOOST_PREPROCESSOR_SEQ_SUBSEQ_HPP +# +# include +# include +# include +# +# /* BOOST_PP_SEQ_SUBSEQ */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_SUBSEQ(seq, i, len) BOOST_PP_SEQ_FIRST_N(len, BOOST_PP_SEQ_REST_N(i, seq)) +# else +# define BOOST_PP_SEQ_SUBSEQ(seq, i, len) BOOST_PP_SEQ_SUBSEQ_I(seq, i, len) +# define BOOST_PP_SEQ_SUBSEQ_I(seq, i, len) BOOST_PP_SEQ_FIRST_N(len, BOOST_PP_SEQ_REST_N(i, seq)) +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/seq/to_tuple.hpp b/ThirdParty/boost-Subset/boost/preprocessor/seq/to_tuple.hpp new file mode 100644 index 0000000000..ab38eb97fa --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/seq/to_tuple.hpp @@ -0,0 +1,27 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_TO_TUPLE_HPP +# define BOOST_PREPROCESSOR_SEQ_TO_TUPLE_HPP +# +# include +# include +# +# /* BOOST_PP_SEQ_TO_TUPLE */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_TO_TUPLE(seq) (BOOST_PP_SEQ_ENUM(seq)) +# else +# define BOOST_PP_SEQ_TO_TUPLE(seq) BOOST_PP_SEQ_TO_TUPLE_I(seq) +# define BOOST_PP_SEQ_TO_TUPLE_I(seq) (BOOST_PP_SEQ_ENUM(seq)) +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/seq/transform.hpp b/ThirdParty/boost-Subset/boost/preprocessor/seq/transform.hpp new file mode 100644 index 0000000000..79d8108d36 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/seq/transform.hpp @@ -0,0 +1,48 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_TRANSFORM_HPP +# define BOOST_PREPROCESSOR_SEQ_TRANSFORM_HPP +# +# include +# include +# include +# include +# include +# +# /* BOOST_PP_SEQ_TRANSFORM */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_TRANSFORM(op, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT(BOOST_PP_SEQ_TRANSFORM_O, (op, data, (nil)), seq))) +# else +# define BOOST_PP_SEQ_TRANSFORM(op, data, seq) BOOST_PP_SEQ_TRANSFORM_I(op, data, seq) +# define BOOST_PP_SEQ_TRANSFORM_I(op, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT(BOOST_PP_SEQ_TRANSFORM_O, (op, data, (nil)), seq))) +# endif +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() +# define BOOST_PP_SEQ_TRANSFORM_O(s, state, elem) BOOST_PP_SEQ_TRANSFORM_O_IM(s, BOOST_PP_TUPLE_REM_3 state, elem) +# define BOOST_PP_SEQ_TRANSFORM_O_IM(s, im, elem) BOOST_PP_SEQ_TRANSFORM_O_I(s, im, elem) +# else +# define BOOST_PP_SEQ_TRANSFORM_O(s, state, elem) BOOST_PP_SEQ_TRANSFORM_O_I(s, BOOST_PP_TUPLE_ELEM(3, 0, state), BOOST_PP_TUPLE_ELEM(3, 1, state), BOOST_PP_TUPLE_ELEM(3, 2, state), elem) +# endif +# +# define BOOST_PP_SEQ_TRANSFORM_O_I(s, op, data, res, elem) (op, data, res (op(s, data, elem))) +# +# /* BOOST_PP_SEQ_TRANSFORM_S */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_TRANSFORM_S(s, op, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_TRANSFORM_O, (op, data, (nil)), seq))) +# else +# define BOOST_PP_SEQ_TRANSFORM_S(s, op, data, seq) BOOST_PP_SEQ_TRANSFORM_S_I(s, op, data, seq) +# define BOOST_PP_SEQ_TRANSFORM_S_I(s, op, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_TRANSFORM_O, (op, data, (nil)), seq))) +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/slot/detail/counter.hpp b/ThirdParty/boost-Subset/boost/preprocessor/slot/detail/counter.hpp new file mode 100644 index 0000000000..a1c0df1759 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/slot/detail/counter.hpp @@ -0,0 +1,269 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2005. * +# * Distributed under the Boost Software License, Version 1.0. (See * +# * accompanying file LICENSE_1_0.txt or copy at * +# * http://www.boost.org/LICENSE_1_0.txt) * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# define BOOST_PP_VALUE BOOST_PP_COUNTER + 1 +# +# include +# +# undef BOOST_PP_COUNTER +# +# undef BOOST_PP_COUNTER_DIGIT_1 +# undef BOOST_PP_COUNTER_DIGIT_2 +# undef BOOST_PP_COUNTER_DIGIT_3 +# undef BOOST_PP_COUNTER_DIGIT_4 +# undef BOOST_PP_COUNTER_DIGIT_5 +# undef BOOST_PP_COUNTER_DIGIT_6 +# undef BOOST_PP_COUNTER_DIGIT_7 +# undef BOOST_PP_COUNTER_DIGIT_8 +# undef BOOST_PP_COUNTER_DIGIT_9 +# undef BOOST_PP_COUNTER_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_10 == 0 +# define BOOST_PP_COUNTER_DIGIT_10 0 +# elif BOOST_PP_SLOT_TEMP_10 == 1 +# define BOOST_PP_COUNTER_DIGIT_10 1 +# elif BOOST_PP_SLOT_TEMP_10 == 2 +# define BOOST_PP_COUNTER_DIGIT_10 2 +# elif BOOST_PP_SLOT_TEMP_10 == 3 +# define BOOST_PP_COUNTER_DIGIT_10 3 +# elif BOOST_PP_SLOT_TEMP_10 == 4 +# define BOOST_PP_COUNTER_DIGIT_10 4 +# elif BOOST_PP_SLOT_TEMP_10 == 5 +# define BOOST_PP_COUNTER_DIGIT_10 5 +# elif BOOST_PP_SLOT_TEMP_10 == 6 +# define BOOST_PP_COUNTER_DIGIT_10 6 +# elif BOOST_PP_SLOT_TEMP_10 == 7 +# define BOOST_PP_COUNTER_DIGIT_10 7 +# elif BOOST_PP_SLOT_TEMP_10 == 8 +# define BOOST_PP_COUNTER_DIGIT_10 8 +# elif BOOST_PP_SLOT_TEMP_10 == 9 +# define BOOST_PP_COUNTER_DIGIT_10 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_9 == 0 +# define BOOST_PP_COUNTER_DIGIT_9 0 +# elif BOOST_PP_SLOT_TEMP_9 == 1 +# define BOOST_PP_COUNTER_DIGIT_9 1 +# elif BOOST_PP_SLOT_TEMP_9 == 2 +# define BOOST_PP_COUNTER_DIGIT_9 2 +# elif BOOST_PP_SLOT_TEMP_9 == 3 +# define BOOST_PP_COUNTER_DIGIT_9 3 +# elif BOOST_PP_SLOT_TEMP_9 == 4 +# define BOOST_PP_COUNTER_DIGIT_9 4 +# elif BOOST_PP_SLOT_TEMP_9 == 5 +# define BOOST_PP_COUNTER_DIGIT_9 5 +# elif BOOST_PP_SLOT_TEMP_9 == 6 +# define BOOST_PP_COUNTER_DIGIT_9 6 +# elif BOOST_PP_SLOT_TEMP_9 == 7 +# define BOOST_PP_COUNTER_DIGIT_9 7 +# elif BOOST_PP_SLOT_TEMP_9 == 8 +# define BOOST_PP_COUNTER_DIGIT_9 8 +# elif BOOST_PP_SLOT_TEMP_9 == 9 +# define BOOST_PP_COUNTER_DIGIT_9 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_8 == 0 +# define BOOST_PP_COUNTER_DIGIT_8 0 +# elif BOOST_PP_SLOT_TEMP_8 == 1 +# define BOOST_PP_COUNTER_DIGIT_8 1 +# elif BOOST_PP_SLOT_TEMP_8 == 2 +# define BOOST_PP_COUNTER_DIGIT_8 2 +# elif BOOST_PP_SLOT_TEMP_8 == 3 +# define BOOST_PP_COUNTER_DIGIT_8 3 +# elif BOOST_PP_SLOT_TEMP_8 == 4 +# define BOOST_PP_COUNTER_DIGIT_8 4 +# elif BOOST_PP_SLOT_TEMP_8 == 5 +# define BOOST_PP_COUNTER_DIGIT_8 5 +# elif BOOST_PP_SLOT_TEMP_8 == 6 +# define BOOST_PP_COUNTER_DIGIT_8 6 +# elif BOOST_PP_SLOT_TEMP_8 == 7 +# define BOOST_PP_COUNTER_DIGIT_8 7 +# elif BOOST_PP_SLOT_TEMP_8 == 8 +# define BOOST_PP_COUNTER_DIGIT_8 8 +# elif BOOST_PP_SLOT_TEMP_8 == 9 +# define BOOST_PP_COUNTER_DIGIT_8 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_7 == 0 +# define BOOST_PP_COUNTER_DIGIT_7 0 +# elif BOOST_PP_SLOT_TEMP_7 == 1 +# define BOOST_PP_COUNTER_DIGIT_7 1 +# elif BOOST_PP_SLOT_TEMP_7 == 2 +# define BOOST_PP_COUNTER_DIGIT_7 2 +# elif BOOST_PP_SLOT_TEMP_7 == 3 +# define BOOST_PP_COUNTER_DIGIT_7 3 +# elif BOOST_PP_SLOT_TEMP_7 == 4 +# define BOOST_PP_COUNTER_DIGIT_7 4 +# elif BOOST_PP_SLOT_TEMP_7 == 5 +# define BOOST_PP_COUNTER_DIGIT_7 5 +# elif BOOST_PP_SLOT_TEMP_7 == 6 +# define BOOST_PP_COUNTER_DIGIT_7 6 +# elif BOOST_PP_SLOT_TEMP_7 == 7 +# define BOOST_PP_COUNTER_DIGIT_7 7 +# elif BOOST_PP_SLOT_TEMP_7 == 8 +# define BOOST_PP_COUNTER_DIGIT_7 8 +# elif BOOST_PP_SLOT_TEMP_7 == 9 +# define BOOST_PP_COUNTER_DIGIT_7 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_6 == 0 +# define BOOST_PP_COUNTER_DIGIT_6 0 +# elif BOOST_PP_SLOT_TEMP_6 == 1 +# define BOOST_PP_COUNTER_DIGIT_6 1 +# elif BOOST_PP_SLOT_TEMP_6 == 2 +# define BOOST_PP_COUNTER_DIGIT_6 2 +# elif BOOST_PP_SLOT_TEMP_6 == 3 +# define BOOST_PP_COUNTER_DIGIT_6 3 +# elif BOOST_PP_SLOT_TEMP_6 == 4 +# define BOOST_PP_COUNTER_DIGIT_6 4 +# elif BOOST_PP_SLOT_TEMP_6 == 5 +# define BOOST_PP_COUNTER_DIGIT_6 5 +# elif BOOST_PP_SLOT_TEMP_6 == 6 +# define BOOST_PP_COUNTER_DIGIT_6 6 +# elif BOOST_PP_SLOT_TEMP_6 == 7 +# define BOOST_PP_COUNTER_DIGIT_6 7 +# elif BOOST_PP_SLOT_TEMP_6 == 8 +# define BOOST_PP_COUNTER_DIGIT_6 8 +# elif BOOST_PP_SLOT_TEMP_6 == 9 +# define BOOST_PP_COUNTER_DIGIT_6 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_5 == 0 +# define BOOST_PP_COUNTER_DIGIT_5 0 +# elif BOOST_PP_SLOT_TEMP_5 == 1 +# define BOOST_PP_COUNTER_DIGIT_5 1 +# elif BOOST_PP_SLOT_TEMP_5 == 2 +# define BOOST_PP_COUNTER_DIGIT_5 2 +# elif BOOST_PP_SLOT_TEMP_5 == 3 +# define BOOST_PP_COUNTER_DIGIT_5 3 +# elif BOOST_PP_SLOT_TEMP_5 == 4 +# define BOOST_PP_COUNTER_DIGIT_5 4 +# elif BOOST_PP_SLOT_TEMP_5 == 5 +# define BOOST_PP_COUNTER_DIGIT_5 5 +# elif BOOST_PP_SLOT_TEMP_5 == 6 +# define BOOST_PP_COUNTER_DIGIT_5 6 +# elif BOOST_PP_SLOT_TEMP_5 == 7 +# define BOOST_PP_COUNTER_DIGIT_5 7 +# elif BOOST_PP_SLOT_TEMP_5 == 8 +# define BOOST_PP_COUNTER_DIGIT_5 8 +# elif BOOST_PP_SLOT_TEMP_5 == 9 +# define BOOST_PP_COUNTER_DIGIT_5 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_4 == 0 +# define BOOST_PP_COUNTER_DIGIT_4 0 +# elif BOOST_PP_SLOT_TEMP_4 == 1 +# define BOOST_PP_COUNTER_DIGIT_4 1 +# elif BOOST_PP_SLOT_TEMP_4 == 2 +# define BOOST_PP_COUNTER_DIGIT_4 2 +# elif BOOST_PP_SLOT_TEMP_4 == 3 +# define BOOST_PP_COUNTER_DIGIT_4 3 +# elif BOOST_PP_SLOT_TEMP_4 == 4 +# define BOOST_PP_COUNTER_DIGIT_4 4 +# elif BOOST_PP_SLOT_TEMP_4 == 5 +# define BOOST_PP_COUNTER_DIGIT_4 5 +# elif BOOST_PP_SLOT_TEMP_4 == 6 +# define BOOST_PP_COUNTER_DIGIT_4 6 +# elif BOOST_PP_SLOT_TEMP_4 == 7 +# define BOOST_PP_COUNTER_DIGIT_4 7 +# elif BOOST_PP_SLOT_TEMP_4 == 8 +# define BOOST_PP_COUNTER_DIGIT_4 8 +# elif BOOST_PP_SLOT_TEMP_4 == 9 +# define BOOST_PP_COUNTER_DIGIT_4 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_COUNTER_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_COUNTER_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_COUNTER_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_COUNTER_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_COUNTER_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_COUNTER_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_COUNTER_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_COUNTER_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_COUNTER_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_COUNTER_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_COUNTER_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_COUNTER_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_COUNTER_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_COUNTER_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_COUNTER_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_COUNTER_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_COUNTER_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_COUNTER_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_COUNTER_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_COUNTER_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_COUNTER_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_COUNTER_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_COUNTER_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_COUNTER_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_COUNTER_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_COUNTER_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_COUNTER_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_COUNTER_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_COUNTER_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_COUNTER_DIGIT_1 9 +# endif +# +# if BOOST_PP_COUNTER_DIGIT_10 +# define BOOST_PP_COUNTER BOOST_PP_SLOT_CC_10(BOOST_PP_COUNTER_DIGIT_10, BOOST_PP_COUNTER_DIGIT_9, BOOST_PP_COUNTER_DIGIT_8, BOOST_PP_COUNTER_DIGIT_7, BOOST_PP_COUNTER_DIGIT_6, BOOST_PP_COUNTER_DIGIT_5, BOOST_PP_COUNTER_DIGIT_4, BOOST_PP_COUNTER_DIGIT_3, BOOST_PP_COUNTER_DIGIT_2, BOOST_PP_COUNTER_DIGIT_1) +# elif BOOST_PP_COUNTER_DIGIT_9 +# define BOOST_PP_COUNTER BOOST_PP_SLOT_CC_9(BOOST_PP_COUNTER_DIGIT_9, BOOST_PP_COUNTER_DIGIT_8, BOOST_PP_COUNTER_DIGIT_7, BOOST_PP_COUNTER_DIGIT_6, BOOST_PP_COUNTER_DIGIT_5, BOOST_PP_COUNTER_DIGIT_4, BOOST_PP_COUNTER_DIGIT_3, BOOST_PP_COUNTER_DIGIT_2, BOOST_PP_COUNTER_DIGIT_1) +# elif BOOST_PP_COUNTER_DIGIT_8 +# define BOOST_PP_COUNTER BOOST_PP_SLOT_CC_8(BOOST_PP_COUNTER_DIGIT_8, BOOST_PP_COUNTER_DIGIT_7, BOOST_PP_COUNTER_DIGIT_6, BOOST_PP_COUNTER_DIGIT_5, BOOST_PP_COUNTER_DIGIT_4, BOOST_PP_COUNTER_DIGIT_3, BOOST_PP_COUNTER_DIGIT_2, BOOST_PP_COUNTER_DIGIT_1) +# elif BOOST_PP_COUNTER_DIGIT_7 +# define BOOST_PP_COUNTER BOOST_PP_SLOT_CC_7(BOOST_PP_COUNTER_DIGIT_7, BOOST_PP_COUNTER_DIGIT_6, BOOST_PP_COUNTER_DIGIT_5, BOOST_PP_COUNTER_DIGIT_4, BOOST_PP_COUNTER_DIGIT_3, BOOST_PP_COUNTER_DIGIT_2, BOOST_PP_COUNTER_DIGIT_1) +# elif BOOST_PP_COUNTER_DIGIT_6 +# define BOOST_PP_COUNTER BOOST_PP_SLOT_CC_6(BOOST_PP_COUNTER_DIGIT_6, BOOST_PP_COUNTER_DIGIT_5, BOOST_PP_COUNTER_DIGIT_4, BOOST_PP_COUNTER_DIGIT_3, BOOST_PP_COUNTER_DIGIT_2, BOOST_PP_COUNTER_DIGIT_1) +# elif BOOST_PP_COUNTER_DIGIT_5 +# define BOOST_PP_COUNTER BOOST_PP_SLOT_CC_5(BOOST_PP_COUNTER_DIGIT_5, BOOST_PP_COUNTER_DIGIT_4, BOOST_PP_COUNTER_DIGIT_3, BOOST_PP_COUNTER_DIGIT_2, BOOST_PP_COUNTER_DIGIT_1) +# elif BOOST_PP_COUNTER_DIGIT_4 +# define BOOST_PP_COUNTER BOOST_PP_SLOT_CC_4(BOOST_PP_COUNTER_DIGIT_4, BOOST_PP_COUNTER_DIGIT_3, BOOST_PP_COUNTER_DIGIT_2, BOOST_PP_COUNTER_DIGIT_1) +# elif BOOST_PP_COUNTER_DIGIT_3 +# define BOOST_PP_COUNTER BOOST_PP_SLOT_CC_3(BOOST_PP_COUNTER_DIGIT_3, BOOST_PP_COUNTER_DIGIT_2, BOOST_PP_COUNTER_DIGIT_1) +# elif BOOST_PP_COUNTER_DIGIT_2 +# define BOOST_PP_COUNTER BOOST_PP_SLOT_CC_2(BOOST_PP_COUNTER_DIGIT_2, BOOST_PP_COUNTER_DIGIT_1) +# else +# define BOOST_PP_COUNTER BOOST_PP_COUNTER_DIGIT_1 +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/slot/detail/def.hpp b/ThirdParty/boost-Subset/boost/preprocessor/slot/detail/def.hpp new file mode 100644 index 0000000000..885099e551 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/slot/detail/def.hpp @@ -0,0 +1,49 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SLOT_DETAIL_DEF_HPP +# define BOOST_PREPROCESSOR_SLOT_DETAIL_DEF_HPP +# +# /* BOOST_PP_SLOT_OFFSET_x */ +# +# define BOOST_PP_SLOT_OFFSET_10(x) (x) % 1000000000UL +# define BOOST_PP_SLOT_OFFSET_9(x) BOOST_PP_SLOT_OFFSET_10(x) % 100000000UL +# define BOOST_PP_SLOT_OFFSET_8(x) BOOST_PP_SLOT_OFFSET_9(x) % 10000000UL +# define BOOST_PP_SLOT_OFFSET_7(x) BOOST_PP_SLOT_OFFSET_8(x) % 1000000UL +# define BOOST_PP_SLOT_OFFSET_6(x) BOOST_PP_SLOT_OFFSET_7(x) % 100000UL +# define BOOST_PP_SLOT_OFFSET_5(x) BOOST_PP_SLOT_OFFSET_6(x) % 10000UL +# define BOOST_PP_SLOT_OFFSET_4(x) BOOST_PP_SLOT_OFFSET_5(x) % 1000UL +# define BOOST_PP_SLOT_OFFSET_3(x) BOOST_PP_SLOT_OFFSET_4(x) % 100UL +# define BOOST_PP_SLOT_OFFSET_2(x) BOOST_PP_SLOT_OFFSET_3(x) % 10UL +# +# /* BOOST_PP_SLOT_CC_x */ +# +# define BOOST_PP_SLOT_CC_2(a, b) BOOST_PP_SLOT_CC_2_D(a, b) +# define BOOST_PP_SLOT_CC_3(a, b, c) BOOST_PP_SLOT_CC_3_D(a, b, c) +# define BOOST_PP_SLOT_CC_4(a, b, c, d) BOOST_PP_SLOT_CC_4_D(a, b, c, d) +# define BOOST_PP_SLOT_CC_5(a, b, c, d, e) BOOST_PP_SLOT_CC_5_D(a, b, c, d, e) +# define BOOST_PP_SLOT_CC_6(a, b, c, d, e, f) BOOST_PP_SLOT_CC_6_D(a, b, c, d, e, f) +# define BOOST_PP_SLOT_CC_7(a, b, c, d, e, f, g) BOOST_PP_SLOT_CC_7_D(a, b, c, d, e, f, g) +# define BOOST_PP_SLOT_CC_8(a, b, c, d, e, f, g, h) BOOST_PP_SLOT_CC_8_D(a, b, c, d, e, f, g, h) +# define BOOST_PP_SLOT_CC_9(a, b, c, d, e, f, g, h, i) BOOST_PP_SLOT_CC_9_D(a, b, c, d, e, f, g, h, i) +# define BOOST_PP_SLOT_CC_10(a, b, c, d, e, f, g, h, i, j) BOOST_PP_SLOT_CC_10_D(a, b, c, d, e, f, g, h, i, j) +# +# define BOOST_PP_SLOT_CC_2_D(a, b) a ## b +# define BOOST_PP_SLOT_CC_3_D(a, b, c) a ## b ## c +# define BOOST_PP_SLOT_CC_4_D(a, b, c, d) a ## b ## c ## d +# define BOOST_PP_SLOT_CC_5_D(a, b, c, d, e) a ## b ## c ## d ## e +# define BOOST_PP_SLOT_CC_6_D(a, b, c, d, e, f) a ## b ## c ## d ## e ## f +# define BOOST_PP_SLOT_CC_7_D(a, b, c, d, e, f, g) a ## b ## c ## d ## e ## f ## g +# define BOOST_PP_SLOT_CC_8_D(a, b, c, d, e, f, g, h) a ## b ## c ## d ## e ## f ## g ## h +# define BOOST_PP_SLOT_CC_9_D(a, b, c, d, e, f, g, h, i) a ## b ## c ## d ## e ## f ## g ## h ## i +# define BOOST_PP_SLOT_CC_10_D(a, b, c, d, e, f, g, h, i, j) a ## b ## c ## d ## e ## f ## g ## h ## i ## j +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/slot/detail/shared.hpp b/ThirdParty/boost-Subset/boost/preprocessor/slot/detail/shared.hpp new file mode 100644 index 0000000000..c97ac54cf9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/slot/detail/shared.hpp @@ -0,0 +1,247 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PP_VALUE +# error BOOST_PP_ERROR: BOOST_PP_VALUE is not defined +# endif +# +# undef BOOST_PP_SLOT_TEMP_1 +# undef BOOST_PP_SLOT_TEMP_2 +# undef BOOST_PP_SLOT_TEMP_3 +# undef BOOST_PP_SLOT_TEMP_4 +# undef BOOST_PP_SLOT_TEMP_5 +# undef BOOST_PP_SLOT_TEMP_6 +# undef BOOST_PP_SLOT_TEMP_7 +# undef BOOST_PP_SLOT_TEMP_8 +# undef BOOST_PP_SLOT_TEMP_9 +# undef BOOST_PP_SLOT_TEMP_10 +# +# if (BOOST_PP_VALUE) / 1000000000UL == 0 +# define BOOST_PP_SLOT_TEMP_10 0 +# elif (BOOST_PP_VALUE) / 1000000000UL == 1 +# define BOOST_PP_SLOT_TEMP_10 1 +# elif (BOOST_PP_VALUE) / 1000000000UL == 2 +# define BOOST_PP_SLOT_TEMP_10 2 +# elif (BOOST_PP_VALUE) / 1000000000UL == 3 +# define BOOST_PP_SLOT_TEMP_10 3 +# elif (BOOST_PP_VALUE) / 1000000000UL == 4 +# define BOOST_PP_SLOT_TEMP_10 4 +# elif (BOOST_PP_VALUE) / 1000000000UL == 5 +# define BOOST_PP_SLOT_TEMP_10 5 +# elif (BOOST_PP_VALUE) / 1000000000UL == 6 +# define BOOST_PP_SLOT_TEMP_10 6 +# elif (BOOST_PP_VALUE) / 1000000000UL == 7 +# define BOOST_PP_SLOT_TEMP_10 7 +# elif (BOOST_PP_VALUE) / 1000000000UL == 8 +# define BOOST_PP_SLOT_TEMP_10 8 +# elif (BOOST_PP_VALUE) / 1000000000UL == 9 +# define BOOST_PP_SLOT_TEMP_10 9 +# endif +# +# if BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 0 +# define BOOST_PP_SLOT_TEMP_9 0 +# elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 1 +# define BOOST_PP_SLOT_TEMP_9 1 +# elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 2 +# define BOOST_PP_SLOT_TEMP_9 2 +# elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 3 +# define BOOST_PP_SLOT_TEMP_9 3 +# elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 4 +# define BOOST_PP_SLOT_TEMP_9 4 +# elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 5 +# define BOOST_PP_SLOT_TEMP_9 5 +# elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 6 +# define BOOST_PP_SLOT_TEMP_9 6 +# elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 7 +# define BOOST_PP_SLOT_TEMP_9 7 +# elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 8 +# define BOOST_PP_SLOT_TEMP_9 8 +# elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 9 +# define BOOST_PP_SLOT_TEMP_9 9 +# endif +# +# if BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 0 +# define BOOST_PP_SLOT_TEMP_8 0 +# elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 1 +# define BOOST_PP_SLOT_TEMP_8 1 +# elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 2 +# define BOOST_PP_SLOT_TEMP_8 2 +# elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 3 +# define BOOST_PP_SLOT_TEMP_8 3 +# elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 4 +# define BOOST_PP_SLOT_TEMP_8 4 +# elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 5 +# define BOOST_PP_SLOT_TEMP_8 5 +# elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 6 +# define BOOST_PP_SLOT_TEMP_8 6 +# elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 7 +# define BOOST_PP_SLOT_TEMP_8 7 +# elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 8 +# define BOOST_PP_SLOT_TEMP_8 8 +# elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 9 +# define BOOST_PP_SLOT_TEMP_8 9 +# endif +# +# if BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 0 +# define BOOST_PP_SLOT_TEMP_7 0 +# elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 1 +# define BOOST_PP_SLOT_TEMP_7 1 +# elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 2 +# define BOOST_PP_SLOT_TEMP_7 2 +# elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 3 +# define BOOST_PP_SLOT_TEMP_7 3 +# elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 4 +# define BOOST_PP_SLOT_TEMP_7 4 +# elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 5 +# define BOOST_PP_SLOT_TEMP_7 5 +# elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 6 +# define BOOST_PP_SLOT_TEMP_7 6 +# elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 7 +# define BOOST_PP_SLOT_TEMP_7 7 +# elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 8 +# define BOOST_PP_SLOT_TEMP_7 8 +# elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 9 +# define BOOST_PP_SLOT_TEMP_7 9 +# endif +# +# if BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 0 +# define BOOST_PP_SLOT_TEMP_6 0 +# elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 1 +# define BOOST_PP_SLOT_TEMP_6 1 +# elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 2 +# define BOOST_PP_SLOT_TEMP_6 2 +# elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 3 +# define BOOST_PP_SLOT_TEMP_6 3 +# elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 4 +# define BOOST_PP_SLOT_TEMP_6 4 +# elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 5 +# define BOOST_PP_SLOT_TEMP_6 5 +# elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 6 +# define BOOST_PP_SLOT_TEMP_6 6 +# elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 7 +# define BOOST_PP_SLOT_TEMP_6 7 +# elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 8 +# define BOOST_PP_SLOT_TEMP_6 8 +# elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 9 +# define BOOST_PP_SLOT_TEMP_6 9 +# endif +# +# if BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 0 +# define BOOST_PP_SLOT_TEMP_5 0 +# elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 1 +# define BOOST_PP_SLOT_TEMP_5 1 +# elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 2 +# define BOOST_PP_SLOT_TEMP_5 2 +# elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 3 +# define BOOST_PP_SLOT_TEMP_5 3 +# elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 4 +# define BOOST_PP_SLOT_TEMP_5 4 +# elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 5 +# define BOOST_PP_SLOT_TEMP_5 5 +# elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 6 +# define BOOST_PP_SLOT_TEMP_5 6 +# elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 7 +# define BOOST_PP_SLOT_TEMP_5 7 +# elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 8 +# define BOOST_PP_SLOT_TEMP_5 8 +# elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 9 +# define BOOST_PP_SLOT_TEMP_5 9 +# endif +# +# if BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 0 +# define BOOST_PP_SLOT_TEMP_4 0 +# elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 1 +# define BOOST_PP_SLOT_TEMP_4 1 +# elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 2 +# define BOOST_PP_SLOT_TEMP_4 2 +# elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 3 +# define BOOST_PP_SLOT_TEMP_4 3 +# elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 4 +# define BOOST_PP_SLOT_TEMP_4 4 +# elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 5 +# define BOOST_PP_SLOT_TEMP_4 5 +# elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 6 +# define BOOST_PP_SLOT_TEMP_4 6 +# elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 7 +# define BOOST_PP_SLOT_TEMP_4 7 +# elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 8 +# define BOOST_PP_SLOT_TEMP_4 8 +# elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 9 +# define BOOST_PP_SLOT_TEMP_4 9 +# endif +# +# if BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 0 +# define BOOST_PP_SLOT_TEMP_3 0 +# elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 1 +# define BOOST_PP_SLOT_TEMP_3 1 +# elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 2 +# define BOOST_PP_SLOT_TEMP_3 2 +# elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 3 +# define BOOST_PP_SLOT_TEMP_3 3 +# elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 4 +# define BOOST_PP_SLOT_TEMP_3 4 +# elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 5 +# define BOOST_PP_SLOT_TEMP_3 5 +# elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 6 +# define BOOST_PP_SLOT_TEMP_3 6 +# elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 7 +# define BOOST_PP_SLOT_TEMP_3 7 +# elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 8 +# define BOOST_PP_SLOT_TEMP_3 8 +# elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 9 +# define BOOST_PP_SLOT_TEMP_3 9 +# endif +# +# if BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 0 +# define BOOST_PP_SLOT_TEMP_2 0 +# elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 1 +# define BOOST_PP_SLOT_TEMP_2 1 +# elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 2 +# define BOOST_PP_SLOT_TEMP_2 2 +# elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 3 +# define BOOST_PP_SLOT_TEMP_2 3 +# elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 4 +# define BOOST_PP_SLOT_TEMP_2 4 +# elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 5 +# define BOOST_PP_SLOT_TEMP_2 5 +# elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 6 +# define BOOST_PP_SLOT_TEMP_2 6 +# elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 7 +# define BOOST_PP_SLOT_TEMP_2 7 +# elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 8 +# define BOOST_PP_SLOT_TEMP_2 8 +# elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 9 +# define BOOST_PP_SLOT_TEMP_2 9 +# endif +# +# if BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 0 +# define BOOST_PP_SLOT_TEMP_1 0 +# elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 1 +# define BOOST_PP_SLOT_TEMP_1 1 +# elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 2 +# define BOOST_PP_SLOT_TEMP_1 2 +# elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 3 +# define BOOST_PP_SLOT_TEMP_1 3 +# elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 4 +# define BOOST_PP_SLOT_TEMP_1 4 +# elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 5 +# define BOOST_PP_SLOT_TEMP_1 5 +# elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 6 +# define BOOST_PP_SLOT_TEMP_1 6 +# elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 7 +# define BOOST_PP_SLOT_TEMP_1 7 +# elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 8 +# define BOOST_PP_SLOT_TEMP_1 8 +# elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 9 +# define BOOST_PP_SLOT_TEMP_1 9 +# endif +# +# undef BOOST_PP_VALUE diff --git a/ThirdParty/boost-Subset/boost/preprocessor/slot/detail/slot1.hpp b/ThirdParty/boost-Subset/boost/preprocessor/slot/detail/slot1.hpp new file mode 100644 index 0000000000..b22748e6ac --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/slot/detail/slot1.hpp @@ -0,0 +1,267 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_SLOT_1 +# +# undef BOOST_PP_SLOT_1_DIGIT_1 +# undef BOOST_PP_SLOT_1_DIGIT_2 +# undef BOOST_PP_SLOT_1_DIGIT_3 +# undef BOOST_PP_SLOT_1_DIGIT_4 +# undef BOOST_PP_SLOT_1_DIGIT_5 +# undef BOOST_PP_SLOT_1_DIGIT_6 +# undef BOOST_PP_SLOT_1_DIGIT_7 +# undef BOOST_PP_SLOT_1_DIGIT_8 +# undef BOOST_PP_SLOT_1_DIGIT_9 +# undef BOOST_PP_SLOT_1_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_10 == 0 +# define BOOST_PP_SLOT_1_DIGIT_10 0 +# elif BOOST_PP_SLOT_TEMP_10 == 1 +# define BOOST_PP_SLOT_1_DIGIT_10 1 +# elif BOOST_PP_SLOT_TEMP_10 == 2 +# define BOOST_PP_SLOT_1_DIGIT_10 2 +# elif BOOST_PP_SLOT_TEMP_10 == 3 +# define BOOST_PP_SLOT_1_DIGIT_10 3 +# elif BOOST_PP_SLOT_TEMP_10 == 4 +# define BOOST_PP_SLOT_1_DIGIT_10 4 +# elif BOOST_PP_SLOT_TEMP_10 == 5 +# define BOOST_PP_SLOT_1_DIGIT_10 5 +# elif BOOST_PP_SLOT_TEMP_10 == 6 +# define BOOST_PP_SLOT_1_DIGIT_10 6 +# elif BOOST_PP_SLOT_TEMP_10 == 7 +# define BOOST_PP_SLOT_1_DIGIT_10 7 +# elif BOOST_PP_SLOT_TEMP_10 == 8 +# define BOOST_PP_SLOT_1_DIGIT_10 8 +# elif BOOST_PP_SLOT_TEMP_10 == 9 +# define BOOST_PP_SLOT_1_DIGIT_10 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_9 == 0 +# define BOOST_PP_SLOT_1_DIGIT_9 0 +# elif BOOST_PP_SLOT_TEMP_9 == 1 +# define BOOST_PP_SLOT_1_DIGIT_9 1 +# elif BOOST_PP_SLOT_TEMP_9 == 2 +# define BOOST_PP_SLOT_1_DIGIT_9 2 +# elif BOOST_PP_SLOT_TEMP_9 == 3 +# define BOOST_PP_SLOT_1_DIGIT_9 3 +# elif BOOST_PP_SLOT_TEMP_9 == 4 +# define BOOST_PP_SLOT_1_DIGIT_9 4 +# elif BOOST_PP_SLOT_TEMP_9 == 5 +# define BOOST_PP_SLOT_1_DIGIT_9 5 +# elif BOOST_PP_SLOT_TEMP_9 == 6 +# define BOOST_PP_SLOT_1_DIGIT_9 6 +# elif BOOST_PP_SLOT_TEMP_9 == 7 +# define BOOST_PP_SLOT_1_DIGIT_9 7 +# elif BOOST_PP_SLOT_TEMP_9 == 8 +# define BOOST_PP_SLOT_1_DIGIT_9 8 +# elif BOOST_PP_SLOT_TEMP_9 == 9 +# define BOOST_PP_SLOT_1_DIGIT_9 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_8 == 0 +# define BOOST_PP_SLOT_1_DIGIT_8 0 +# elif BOOST_PP_SLOT_TEMP_8 == 1 +# define BOOST_PP_SLOT_1_DIGIT_8 1 +# elif BOOST_PP_SLOT_TEMP_8 == 2 +# define BOOST_PP_SLOT_1_DIGIT_8 2 +# elif BOOST_PP_SLOT_TEMP_8 == 3 +# define BOOST_PP_SLOT_1_DIGIT_8 3 +# elif BOOST_PP_SLOT_TEMP_8 == 4 +# define BOOST_PP_SLOT_1_DIGIT_8 4 +# elif BOOST_PP_SLOT_TEMP_8 == 5 +# define BOOST_PP_SLOT_1_DIGIT_8 5 +# elif BOOST_PP_SLOT_TEMP_8 == 6 +# define BOOST_PP_SLOT_1_DIGIT_8 6 +# elif BOOST_PP_SLOT_TEMP_8 == 7 +# define BOOST_PP_SLOT_1_DIGIT_8 7 +# elif BOOST_PP_SLOT_TEMP_8 == 8 +# define BOOST_PP_SLOT_1_DIGIT_8 8 +# elif BOOST_PP_SLOT_TEMP_8 == 9 +# define BOOST_PP_SLOT_1_DIGIT_8 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_7 == 0 +# define BOOST_PP_SLOT_1_DIGIT_7 0 +# elif BOOST_PP_SLOT_TEMP_7 == 1 +# define BOOST_PP_SLOT_1_DIGIT_7 1 +# elif BOOST_PP_SLOT_TEMP_7 == 2 +# define BOOST_PP_SLOT_1_DIGIT_7 2 +# elif BOOST_PP_SLOT_TEMP_7 == 3 +# define BOOST_PP_SLOT_1_DIGIT_7 3 +# elif BOOST_PP_SLOT_TEMP_7 == 4 +# define BOOST_PP_SLOT_1_DIGIT_7 4 +# elif BOOST_PP_SLOT_TEMP_7 == 5 +# define BOOST_PP_SLOT_1_DIGIT_7 5 +# elif BOOST_PP_SLOT_TEMP_7 == 6 +# define BOOST_PP_SLOT_1_DIGIT_7 6 +# elif BOOST_PP_SLOT_TEMP_7 == 7 +# define BOOST_PP_SLOT_1_DIGIT_7 7 +# elif BOOST_PP_SLOT_TEMP_7 == 8 +# define BOOST_PP_SLOT_1_DIGIT_7 8 +# elif BOOST_PP_SLOT_TEMP_7 == 9 +# define BOOST_PP_SLOT_1_DIGIT_7 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_6 == 0 +# define BOOST_PP_SLOT_1_DIGIT_6 0 +# elif BOOST_PP_SLOT_TEMP_6 == 1 +# define BOOST_PP_SLOT_1_DIGIT_6 1 +# elif BOOST_PP_SLOT_TEMP_6 == 2 +# define BOOST_PP_SLOT_1_DIGIT_6 2 +# elif BOOST_PP_SLOT_TEMP_6 == 3 +# define BOOST_PP_SLOT_1_DIGIT_6 3 +# elif BOOST_PP_SLOT_TEMP_6 == 4 +# define BOOST_PP_SLOT_1_DIGIT_6 4 +# elif BOOST_PP_SLOT_TEMP_6 == 5 +# define BOOST_PP_SLOT_1_DIGIT_6 5 +# elif BOOST_PP_SLOT_TEMP_6 == 6 +# define BOOST_PP_SLOT_1_DIGIT_6 6 +# elif BOOST_PP_SLOT_TEMP_6 == 7 +# define BOOST_PP_SLOT_1_DIGIT_6 7 +# elif BOOST_PP_SLOT_TEMP_6 == 8 +# define BOOST_PP_SLOT_1_DIGIT_6 8 +# elif BOOST_PP_SLOT_TEMP_6 == 9 +# define BOOST_PP_SLOT_1_DIGIT_6 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_5 == 0 +# define BOOST_PP_SLOT_1_DIGIT_5 0 +# elif BOOST_PP_SLOT_TEMP_5 == 1 +# define BOOST_PP_SLOT_1_DIGIT_5 1 +# elif BOOST_PP_SLOT_TEMP_5 == 2 +# define BOOST_PP_SLOT_1_DIGIT_5 2 +# elif BOOST_PP_SLOT_TEMP_5 == 3 +# define BOOST_PP_SLOT_1_DIGIT_5 3 +# elif BOOST_PP_SLOT_TEMP_5 == 4 +# define BOOST_PP_SLOT_1_DIGIT_5 4 +# elif BOOST_PP_SLOT_TEMP_5 == 5 +# define BOOST_PP_SLOT_1_DIGIT_5 5 +# elif BOOST_PP_SLOT_TEMP_5 == 6 +# define BOOST_PP_SLOT_1_DIGIT_5 6 +# elif BOOST_PP_SLOT_TEMP_5 == 7 +# define BOOST_PP_SLOT_1_DIGIT_5 7 +# elif BOOST_PP_SLOT_TEMP_5 == 8 +# define BOOST_PP_SLOT_1_DIGIT_5 8 +# elif BOOST_PP_SLOT_TEMP_5 == 9 +# define BOOST_PP_SLOT_1_DIGIT_5 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_4 == 0 +# define BOOST_PP_SLOT_1_DIGIT_4 0 +# elif BOOST_PP_SLOT_TEMP_4 == 1 +# define BOOST_PP_SLOT_1_DIGIT_4 1 +# elif BOOST_PP_SLOT_TEMP_4 == 2 +# define BOOST_PP_SLOT_1_DIGIT_4 2 +# elif BOOST_PP_SLOT_TEMP_4 == 3 +# define BOOST_PP_SLOT_1_DIGIT_4 3 +# elif BOOST_PP_SLOT_TEMP_4 == 4 +# define BOOST_PP_SLOT_1_DIGIT_4 4 +# elif BOOST_PP_SLOT_TEMP_4 == 5 +# define BOOST_PP_SLOT_1_DIGIT_4 5 +# elif BOOST_PP_SLOT_TEMP_4 == 6 +# define BOOST_PP_SLOT_1_DIGIT_4 6 +# elif BOOST_PP_SLOT_TEMP_4 == 7 +# define BOOST_PP_SLOT_1_DIGIT_4 7 +# elif BOOST_PP_SLOT_TEMP_4 == 8 +# define BOOST_PP_SLOT_1_DIGIT_4 8 +# elif BOOST_PP_SLOT_TEMP_4 == 9 +# define BOOST_PP_SLOT_1_DIGIT_4 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_SLOT_1_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_SLOT_1_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_SLOT_1_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_SLOT_1_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_SLOT_1_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_SLOT_1_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_SLOT_1_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_SLOT_1_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_SLOT_1_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_SLOT_1_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_SLOT_1_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_SLOT_1_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_SLOT_1_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_SLOT_1_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_SLOT_1_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_SLOT_1_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_SLOT_1_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_SLOT_1_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_SLOT_1_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_SLOT_1_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_SLOT_1_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_SLOT_1_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_SLOT_1_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_SLOT_1_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_SLOT_1_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_SLOT_1_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_SLOT_1_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_SLOT_1_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_SLOT_1_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_SLOT_1_DIGIT_1 9 +# endif +# +# if BOOST_PP_SLOT_1_DIGIT_10 +# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_10(BOOST_PP_SLOT_1_DIGIT_10, BOOST_PP_SLOT_1_DIGIT_9, BOOST_PP_SLOT_1_DIGIT_8, BOOST_PP_SLOT_1_DIGIT_7, BOOST_PP_SLOT_1_DIGIT_6, BOOST_PP_SLOT_1_DIGIT_5, BOOST_PP_SLOT_1_DIGIT_4, BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1) +# elif BOOST_PP_SLOT_1_DIGIT_9 +# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_9(BOOST_PP_SLOT_1_DIGIT_9, BOOST_PP_SLOT_1_DIGIT_8, BOOST_PP_SLOT_1_DIGIT_7, BOOST_PP_SLOT_1_DIGIT_6, BOOST_PP_SLOT_1_DIGIT_5, BOOST_PP_SLOT_1_DIGIT_4, BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1) +# elif BOOST_PP_SLOT_1_DIGIT_8 +# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_8(BOOST_PP_SLOT_1_DIGIT_8, BOOST_PP_SLOT_1_DIGIT_7, BOOST_PP_SLOT_1_DIGIT_6, BOOST_PP_SLOT_1_DIGIT_5, BOOST_PP_SLOT_1_DIGIT_4, BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1) +# elif BOOST_PP_SLOT_1_DIGIT_7 +# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_7(BOOST_PP_SLOT_1_DIGIT_7, BOOST_PP_SLOT_1_DIGIT_6, BOOST_PP_SLOT_1_DIGIT_5, BOOST_PP_SLOT_1_DIGIT_4, BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1) +# elif BOOST_PP_SLOT_1_DIGIT_6 +# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_6(BOOST_PP_SLOT_1_DIGIT_6, BOOST_PP_SLOT_1_DIGIT_5, BOOST_PP_SLOT_1_DIGIT_4, BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1) +# elif BOOST_PP_SLOT_1_DIGIT_5 +# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_5(BOOST_PP_SLOT_1_DIGIT_5, BOOST_PP_SLOT_1_DIGIT_4, BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1) +# elif BOOST_PP_SLOT_1_DIGIT_4 +# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_4(BOOST_PP_SLOT_1_DIGIT_4, BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1) +# elif BOOST_PP_SLOT_1_DIGIT_3 +# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_3(BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1) +# elif BOOST_PP_SLOT_1_DIGIT_2 +# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_2(BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1) +# else +# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_1_DIGIT_1 +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/slot/detail/slot2.hpp b/ThirdParty/boost-Subset/boost/preprocessor/slot/detail/slot2.hpp new file mode 100644 index 0000000000..5d5258c225 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/slot/detail/slot2.hpp @@ -0,0 +1,267 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_SLOT_2 +# +# undef BOOST_PP_SLOT_2_DIGIT_1 +# undef BOOST_PP_SLOT_2_DIGIT_2 +# undef BOOST_PP_SLOT_2_DIGIT_3 +# undef BOOST_PP_SLOT_2_DIGIT_4 +# undef BOOST_PP_SLOT_2_DIGIT_5 +# undef BOOST_PP_SLOT_2_DIGIT_6 +# undef BOOST_PP_SLOT_2_DIGIT_7 +# undef BOOST_PP_SLOT_2_DIGIT_8 +# undef BOOST_PP_SLOT_2_DIGIT_9 +# undef BOOST_PP_SLOT_2_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_10 == 0 +# define BOOST_PP_SLOT_2_DIGIT_10 0 +# elif BOOST_PP_SLOT_TEMP_10 == 1 +# define BOOST_PP_SLOT_2_DIGIT_10 1 +# elif BOOST_PP_SLOT_TEMP_10 == 2 +# define BOOST_PP_SLOT_2_DIGIT_10 2 +# elif BOOST_PP_SLOT_TEMP_10 == 3 +# define BOOST_PP_SLOT_2_DIGIT_10 3 +# elif BOOST_PP_SLOT_TEMP_10 == 4 +# define BOOST_PP_SLOT_2_DIGIT_10 4 +# elif BOOST_PP_SLOT_TEMP_10 == 5 +# define BOOST_PP_SLOT_2_DIGIT_10 5 +# elif BOOST_PP_SLOT_TEMP_10 == 6 +# define BOOST_PP_SLOT_2_DIGIT_10 6 +# elif BOOST_PP_SLOT_TEMP_10 == 7 +# define BOOST_PP_SLOT_2_DIGIT_10 7 +# elif BOOST_PP_SLOT_TEMP_10 == 8 +# define BOOST_PP_SLOT_2_DIGIT_10 8 +# elif BOOST_PP_SLOT_TEMP_10 == 9 +# define BOOST_PP_SLOT_2_DIGIT_10 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_9 == 0 +# define BOOST_PP_SLOT_2_DIGIT_9 0 +# elif BOOST_PP_SLOT_TEMP_9 == 1 +# define BOOST_PP_SLOT_2_DIGIT_9 1 +# elif BOOST_PP_SLOT_TEMP_9 == 2 +# define BOOST_PP_SLOT_2_DIGIT_9 2 +# elif BOOST_PP_SLOT_TEMP_9 == 3 +# define BOOST_PP_SLOT_2_DIGIT_9 3 +# elif BOOST_PP_SLOT_TEMP_9 == 4 +# define BOOST_PP_SLOT_2_DIGIT_9 4 +# elif BOOST_PP_SLOT_TEMP_9 == 5 +# define BOOST_PP_SLOT_2_DIGIT_9 5 +# elif BOOST_PP_SLOT_TEMP_9 == 6 +# define BOOST_PP_SLOT_2_DIGIT_9 6 +# elif BOOST_PP_SLOT_TEMP_9 == 7 +# define BOOST_PP_SLOT_2_DIGIT_9 7 +# elif BOOST_PP_SLOT_TEMP_9 == 8 +# define BOOST_PP_SLOT_2_DIGIT_9 8 +# elif BOOST_PP_SLOT_TEMP_9 == 9 +# define BOOST_PP_SLOT_2_DIGIT_9 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_8 == 0 +# define BOOST_PP_SLOT_2_DIGIT_8 0 +# elif BOOST_PP_SLOT_TEMP_8 == 1 +# define BOOST_PP_SLOT_2_DIGIT_8 1 +# elif BOOST_PP_SLOT_TEMP_8 == 2 +# define BOOST_PP_SLOT_2_DIGIT_8 2 +# elif BOOST_PP_SLOT_TEMP_8 == 3 +# define BOOST_PP_SLOT_2_DIGIT_8 3 +# elif BOOST_PP_SLOT_TEMP_8 == 4 +# define BOOST_PP_SLOT_2_DIGIT_8 4 +# elif BOOST_PP_SLOT_TEMP_8 == 5 +# define BOOST_PP_SLOT_2_DIGIT_8 5 +# elif BOOST_PP_SLOT_TEMP_8 == 6 +# define BOOST_PP_SLOT_2_DIGIT_8 6 +# elif BOOST_PP_SLOT_TEMP_8 == 7 +# define BOOST_PP_SLOT_2_DIGIT_8 7 +# elif BOOST_PP_SLOT_TEMP_8 == 8 +# define BOOST_PP_SLOT_2_DIGIT_8 8 +# elif BOOST_PP_SLOT_TEMP_8 == 9 +# define BOOST_PP_SLOT_2_DIGIT_8 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_7 == 0 +# define BOOST_PP_SLOT_2_DIGIT_7 0 +# elif BOOST_PP_SLOT_TEMP_7 == 1 +# define BOOST_PP_SLOT_2_DIGIT_7 1 +# elif BOOST_PP_SLOT_TEMP_7 == 2 +# define BOOST_PP_SLOT_2_DIGIT_7 2 +# elif BOOST_PP_SLOT_TEMP_7 == 3 +# define BOOST_PP_SLOT_2_DIGIT_7 3 +# elif BOOST_PP_SLOT_TEMP_7 == 4 +# define BOOST_PP_SLOT_2_DIGIT_7 4 +# elif BOOST_PP_SLOT_TEMP_7 == 5 +# define BOOST_PP_SLOT_2_DIGIT_7 5 +# elif BOOST_PP_SLOT_TEMP_7 == 6 +# define BOOST_PP_SLOT_2_DIGIT_7 6 +# elif BOOST_PP_SLOT_TEMP_7 == 7 +# define BOOST_PP_SLOT_2_DIGIT_7 7 +# elif BOOST_PP_SLOT_TEMP_7 == 8 +# define BOOST_PP_SLOT_2_DIGIT_7 8 +# elif BOOST_PP_SLOT_TEMP_7 == 9 +# define BOOST_PP_SLOT_2_DIGIT_7 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_6 == 0 +# define BOOST_PP_SLOT_2_DIGIT_6 0 +# elif BOOST_PP_SLOT_TEMP_6 == 1 +# define BOOST_PP_SLOT_2_DIGIT_6 1 +# elif BOOST_PP_SLOT_TEMP_6 == 2 +# define BOOST_PP_SLOT_2_DIGIT_6 2 +# elif BOOST_PP_SLOT_TEMP_6 == 3 +# define BOOST_PP_SLOT_2_DIGIT_6 3 +# elif BOOST_PP_SLOT_TEMP_6 == 4 +# define BOOST_PP_SLOT_2_DIGIT_6 4 +# elif BOOST_PP_SLOT_TEMP_6 == 5 +# define BOOST_PP_SLOT_2_DIGIT_6 5 +# elif BOOST_PP_SLOT_TEMP_6 == 6 +# define BOOST_PP_SLOT_2_DIGIT_6 6 +# elif BOOST_PP_SLOT_TEMP_6 == 7 +# define BOOST_PP_SLOT_2_DIGIT_6 7 +# elif BOOST_PP_SLOT_TEMP_6 == 8 +# define BOOST_PP_SLOT_2_DIGIT_6 8 +# elif BOOST_PP_SLOT_TEMP_6 == 9 +# define BOOST_PP_SLOT_2_DIGIT_6 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_5 == 0 +# define BOOST_PP_SLOT_2_DIGIT_5 0 +# elif BOOST_PP_SLOT_TEMP_5 == 1 +# define BOOST_PP_SLOT_2_DIGIT_5 1 +# elif BOOST_PP_SLOT_TEMP_5 == 2 +# define BOOST_PP_SLOT_2_DIGIT_5 2 +# elif BOOST_PP_SLOT_TEMP_5 == 3 +# define BOOST_PP_SLOT_2_DIGIT_5 3 +# elif BOOST_PP_SLOT_TEMP_5 == 4 +# define BOOST_PP_SLOT_2_DIGIT_5 4 +# elif BOOST_PP_SLOT_TEMP_5 == 5 +# define BOOST_PP_SLOT_2_DIGIT_5 5 +# elif BOOST_PP_SLOT_TEMP_5 == 6 +# define BOOST_PP_SLOT_2_DIGIT_5 6 +# elif BOOST_PP_SLOT_TEMP_5 == 7 +# define BOOST_PP_SLOT_2_DIGIT_5 7 +# elif BOOST_PP_SLOT_TEMP_5 == 8 +# define BOOST_PP_SLOT_2_DIGIT_5 8 +# elif BOOST_PP_SLOT_TEMP_5 == 9 +# define BOOST_PP_SLOT_2_DIGIT_5 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_4 == 0 +# define BOOST_PP_SLOT_2_DIGIT_4 0 +# elif BOOST_PP_SLOT_TEMP_4 == 1 +# define BOOST_PP_SLOT_2_DIGIT_4 1 +# elif BOOST_PP_SLOT_TEMP_4 == 2 +# define BOOST_PP_SLOT_2_DIGIT_4 2 +# elif BOOST_PP_SLOT_TEMP_4 == 3 +# define BOOST_PP_SLOT_2_DIGIT_4 3 +# elif BOOST_PP_SLOT_TEMP_4 == 4 +# define BOOST_PP_SLOT_2_DIGIT_4 4 +# elif BOOST_PP_SLOT_TEMP_4 == 5 +# define BOOST_PP_SLOT_2_DIGIT_4 5 +# elif BOOST_PP_SLOT_TEMP_4 == 6 +# define BOOST_PP_SLOT_2_DIGIT_4 6 +# elif BOOST_PP_SLOT_TEMP_4 == 7 +# define BOOST_PP_SLOT_2_DIGIT_4 7 +# elif BOOST_PP_SLOT_TEMP_4 == 8 +# define BOOST_PP_SLOT_2_DIGIT_4 8 +# elif BOOST_PP_SLOT_TEMP_4 == 9 +# define BOOST_PP_SLOT_2_DIGIT_4 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_SLOT_2_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_SLOT_2_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_SLOT_2_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_SLOT_2_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_SLOT_2_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_SLOT_2_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_SLOT_2_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_SLOT_2_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_SLOT_2_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_SLOT_2_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_SLOT_2_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_SLOT_2_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_SLOT_2_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_SLOT_2_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_SLOT_2_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_SLOT_2_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_SLOT_2_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_SLOT_2_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_SLOT_2_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_SLOT_2_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_SLOT_2_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_SLOT_2_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_SLOT_2_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_SLOT_2_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_SLOT_2_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_SLOT_2_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_SLOT_2_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_SLOT_2_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_SLOT_2_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_SLOT_2_DIGIT_1 9 +# endif +# +# if BOOST_PP_SLOT_2_DIGIT_10 +# define BOOST_PP_SLOT_2() BOOST_PP_SLOT_CC_10(BOOST_PP_SLOT_2_DIGIT_10, BOOST_PP_SLOT_2_DIGIT_9, BOOST_PP_SLOT_2_DIGIT_8, BOOST_PP_SLOT_2_DIGIT_7, BOOST_PP_SLOT_2_DIGIT_6, BOOST_PP_SLOT_2_DIGIT_5, BOOST_PP_SLOT_2_DIGIT_4, BOOST_PP_SLOT_2_DIGIT_3, BOOST_PP_SLOT_2_DIGIT_2, BOOST_PP_SLOT_2_DIGIT_1) +# elif BOOST_PP_SLOT_2_DIGIT_9 +# define BOOST_PP_SLOT_2() BOOST_PP_SLOT_CC_9(BOOST_PP_SLOT_2_DIGIT_9, BOOST_PP_SLOT_2_DIGIT_8, BOOST_PP_SLOT_2_DIGIT_7, BOOST_PP_SLOT_2_DIGIT_6, BOOST_PP_SLOT_2_DIGIT_5, BOOST_PP_SLOT_2_DIGIT_4, BOOST_PP_SLOT_2_DIGIT_3, BOOST_PP_SLOT_2_DIGIT_2, BOOST_PP_SLOT_2_DIGIT_1) +# elif BOOST_PP_SLOT_2_DIGIT_8 +# define BOOST_PP_SLOT_2() BOOST_PP_SLOT_CC_8(BOOST_PP_SLOT_2_DIGIT_8, BOOST_PP_SLOT_2_DIGIT_7, BOOST_PP_SLOT_2_DIGIT_6, BOOST_PP_SLOT_2_DIGIT_5, BOOST_PP_SLOT_2_DIGIT_4, BOOST_PP_SLOT_2_DIGIT_3, BOOST_PP_SLOT_2_DIGIT_2, BOOST_PP_SLOT_2_DIGIT_1) +# elif BOOST_PP_SLOT_2_DIGIT_7 +# define BOOST_PP_SLOT_2() BOOST_PP_SLOT_CC_7(BOOST_PP_SLOT_2_DIGIT_7, BOOST_PP_SLOT_2_DIGIT_6, BOOST_PP_SLOT_2_DIGIT_5, BOOST_PP_SLOT_2_DIGIT_4, BOOST_PP_SLOT_2_DIGIT_3, BOOST_PP_SLOT_2_DIGIT_2, BOOST_PP_SLOT_2_DIGIT_1) +# elif BOOST_PP_SLOT_2_DIGIT_6 +# define BOOST_PP_SLOT_2() BOOST_PP_SLOT_CC_6(BOOST_PP_SLOT_2_DIGIT_6, BOOST_PP_SLOT_2_DIGIT_5, BOOST_PP_SLOT_2_DIGIT_4, BOOST_PP_SLOT_2_DIGIT_3, BOOST_PP_SLOT_2_DIGIT_2, BOOST_PP_SLOT_2_DIGIT_1) +# elif BOOST_PP_SLOT_2_DIGIT_5 +# define BOOST_PP_SLOT_2() BOOST_PP_SLOT_CC_5(BOOST_PP_SLOT_2_DIGIT_5, BOOST_PP_SLOT_2_DIGIT_4, BOOST_PP_SLOT_2_DIGIT_3, BOOST_PP_SLOT_2_DIGIT_2, BOOST_PP_SLOT_2_DIGIT_1) +# elif BOOST_PP_SLOT_2_DIGIT_4 +# define BOOST_PP_SLOT_2() BOOST_PP_SLOT_CC_4(BOOST_PP_SLOT_2_DIGIT_4, BOOST_PP_SLOT_2_DIGIT_3, BOOST_PP_SLOT_2_DIGIT_2, BOOST_PP_SLOT_2_DIGIT_1) +# elif BOOST_PP_SLOT_2_DIGIT_3 +# define BOOST_PP_SLOT_2() BOOST_PP_SLOT_CC_3(BOOST_PP_SLOT_2_DIGIT_3, BOOST_PP_SLOT_2_DIGIT_2, BOOST_PP_SLOT_2_DIGIT_1) +# elif BOOST_PP_SLOT_2_DIGIT_2 +# define BOOST_PP_SLOT_2() BOOST_PP_SLOT_CC_2(BOOST_PP_SLOT_2_DIGIT_2, BOOST_PP_SLOT_2_DIGIT_1) +# else +# define BOOST_PP_SLOT_2() BOOST_PP_SLOT_2_DIGIT_1 +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/slot/detail/slot3.hpp b/ThirdParty/boost-Subset/boost/preprocessor/slot/detail/slot3.hpp new file mode 100644 index 0000000000..005cf21900 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/slot/detail/slot3.hpp @@ -0,0 +1,267 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_SLOT_3 +# +# undef BOOST_PP_SLOT_3_DIGIT_1 +# undef BOOST_PP_SLOT_3_DIGIT_2 +# undef BOOST_PP_SLOT_3_DIGIT_3 +# undef BOOST_PP_SLOT_3_DIGIT_4 +# undef BOOST_PP_SLOT_3_DIGIT_5 +# undef BOOST_PP_SLOT_3_DIGIT_6 +# undef BOOST_PP_SLOT_3_DIGIT_7 +# undef BOOST_PP_SLOT_3_DIGIT_8 +# undef BOOST_PP_SLOT_3_DIGIT_9 +# undef BOOST_PP_SLOT_3_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_10 == 0 +# define BOOST_PP_SLOT_3_DIGIT_10 0 +# elif BOOST_PP_SLOT_TEMP_10 == 1 +# define BOOST_PP_SLOT_3_DIGIT_10 1 +# elif BOOST_PP_SLOT_TEMP_10 == 2 +# define BOOST_PP_SLOT_3_DIGIT_10 2 +# elif BOOST_PP_SLOT_TEMP_10 == 3 +# define BOOST_PP_SLOT_3_DIGIT_10 3 +# elif BOOST_PP_SLOT_TEMP_10 == 4 +# define BOOST_PP_SLOT_3_DIGIT_10 4 +# elif BOOST_PP_SLOT_TEMP_10 == 5 +# define BOOST_PP_SLOT_3_DIGIT_10 5 +# elif BOOST_PP_SLOT_TEMP_10 == 6 +# define BOOST_PP_SLOT_3_DIGIT_10 6 +# elif BOOST_PP_SLOT_TEMP_10 == 7 +# define BOOST_PP_SLOT_3_DIGIT_10 7 +# elif BOOST_PP_SLOT_TEMP_10 == 8 +# define BOOST_PP_SLOT_3_DIGIT_10 8 +# elif BOOST_PP_SLOT_TEMP_10 == 9 +# define BOOST_PP_SLOT_3_DIGIT_10 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_9 == 0 +# define BOOST_PP_SLOT_3_DIGIT_9 0 +# elif BOOST_PP_SLOT_TEMP_9 == 1 +# define BOOST_PP_SLOT_3_DIGIT_9 1 +# elif BOOST_PP_SLOT_TEMP_9 == 2 +# define BOOST_PP_SLOT_3_DIGIT_9 2 +# elif BOOST_PP_SLOT_TEMP_9 == 3 +# define BOOST_PP_SLOT_3_DIGIT_9 3 +# elif BOOST_PP_SLOT_TEMP_9 == 4 +# define BOOST_PP_SLOT_3_DIGIT_9 4 +# elif BOOST_PP_SLOT_TEMP_9 == 5 +# define BOOST_PP_SLOT_3_DIGIT_9 5 +# elif BOOST_PP_SLOT_TEMP_9 == 6 +# define BOOST_PP_SLOT_3_DIGIT_9 6 +# elif BOOST_PP_SLOT_TEMP_9 == 7 +# define BOOST_PP_SLOT_3_DIGIT_9 7 +# elif BOOST_PP_SLOT_TEMP_9 == 8 +# define BOOST_PP_SLOT_3_DIGIT_9 8 +# elif BOOST_PP_SLOT_TEMP_9 == 9 +# define BOOST_PP_SLOT_3_DIGIT_9 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_8 == 0 +# define BOOST_PP_SLOT_3_DIGIT_8 0 +# elif BOOST_PP_SLOT_TEMP_8 == 1 +# define BOOST_PP_SLOT_3_DIGIT_8 1 +# elif BOOST_PP_SLOT_TEMP_8 == 2 +# define BOOST_PP_SLOT_3_DIGIT_8 2 +# elif BOOST_PP_SLOT_TEMP_8 == 3 +# define BOOST_PP_SLOT_3_DIGIT_8 3 +# elif BOOST_PP_SLOT_TEMP_8 == 4 +# define BOOST_PP_SLOT_3_DIGIT_8 4 +# elif BOOST_PP_SLOT_TEMP_8 == 5 +# define BOOST_PP_SLOT_3_DIGIT_8 5 +# elif BOOST_PP_SLOT_TEMP_8 == 6 +# define BOOST_PP_SLOT_3_DIGIT_8 6 +# elif BOOST_PP_SLOT_TEMP_8 == 7 +# define BOOST_PP_SLOT_3_DIGIT_8 7 +# elif BOOST_PP_SLOT_TEMP_8 == 8 +# define BOOST_PP_SLOT_3_DIGIT_8 8 +# elif BOOST_PP_SLOT_TEMP_8 == 9 +# define BOOST_PP_SLOT_3_DIGIT_8 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_7 == 0 +# define BOOST_PP_SLOT_3_DIGIT_7 0 +# elif BOOST_PP_SLOT_TEMP_7 == 1 +# define BOOST_PP_SLOT_3_DIGIT_7 1 +# elif BOOST_PP_SLOT_TEMP_7 == 2 +# define BOOST_PP_SLOT_3_DIGIT_7 2 +# elif BOOST_PP_SLOT_TEMP_7 == 3 +# define BOOST_PP_SLOT_3_DIGIT_7 3 +# elif BOOST_PP_SLOT_TEMP_7 == 4 +# define BOOST_PP_SLOT_3_DIGIT_7 4 +# elif BOOST_PP_SLOT_TEMP_7 == 5 +# define BOOST_PP_SLOT_3_DIGIT_7 5 +# elif BOOST_PP_SLOT_TEMP_7 == 6 +# define BOOST_PP_SLOT_3_DIGIT_7 6 +# elif BOOST_PP_SLOT_TEMP_7 == 7 +# define BOOST_PP_SLOT_3_DIGIT_7 7 +# elif BOOST_PP_SLOT_TEMP_7 == 8 +# define BOOST_PP_SLOT_3_DIGIT_7 8 +# elif BOOST_PP_SLOT_TEMP_7 == 9 +# define BOOST_PP_SLOT_3_DIGIT_7 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_6 == 0 +# define BOOST_PP_SLOT_3_DIGIT_6 0 +# elif BOOST_PP_SLOT_TEMP_6 == 1 +# define BOOST_PP_SLOT_3_DIGIT_6 1 +# elif BOOST_PP_SLOT_TEMP_6 == 2 +# define BOOST_PP_SLOT_3_DIGIT_6 2 +# elif BOOST_PP_SLOT_TEMP_6 == 3 +# define BOOST_PP_SLOT_3_DIGIT_6 3 +# elif BOOST_PP_SLOT_TEMP_6 == 4 +# define BOOST_PP_SLOT_3_DIGIT_6 4 +# elif BOOST_PP_SLOT_TEMP_6 == 5 +# define BOOST_PP_SLOT_3_DIGIT_6 5 +# elif BOOST_PP_SLOT_TEMP_6 == 6 +# define BOOST_PP_SLOT_3_DIGIT_6 6 +# elif BOOST_PP_SLOT_TEMP_6 == 7 +# define BOOST_PP_SLOT_3_DIGIT_6 7 +# elif BOOST_PP_SLOT_TEMP_6 == 8 +# define BOOST_PP_SLOT_3_DIGIT_6 8 +# elif BOOST_PP_SLOT_TEMP_6 == 9 +# define BOOST_PP_SLOT_3_DIGIT_6 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_5 == 0 +# define BOOST_PP_SLOT_3_DIGIT_5 0 +# elif BOOST_PP_SLOT_TEMP_5 == 1 +# define BOOST_PP_SLOT_3_DIGIT_5 1 +# elif BOOST_PP_SLOT_TEMP_5 == 2 +# define BOOST_PP_SLOT_3_DIGIT_5 2 +# elif BOOST_PP_SLOT_TEMP_5 == 3 +# define BOOST_PP_SLOT_3_DIGIT_5 3 +# elif BOOST_PP_SLOT_TEMP_5 == 4 +# define BOOST_PP_SLOT_3_DIGIT_5 4 +# elif BOOST_PP_SLOT_TEMP_5 == 5 +# define BOOST_PP_SLOT_3_DIGIT_5 5 +# elif BOOST_PP_SLOT_TEMP_5 == 6 +# define BOOST_PP_SLOT_3_DIGIT_5 6 +# elif BOOST_PP_SLOT_TEMP_5 == 7 +# define BOOST_PP_SLOT_3_DIGIT_5 7 +# elif BOOST_PP_SLOT_TEMP_5 == 8 +# define BOOST_PP_SLOT_3_DIGIT_5 8 +# elif BOOST_PP_SLOT_TEMP_5 == 9 +# define BOOST_PP_SLOT_3_DIGIT_5 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_4 == 0 +# define BOOST_PP_SLOT_3_DIGIT_4 0 +# elif BOOST_PP_SLOT_TEMP_4 == 1 +# define BOOST_PP_SLOT_3_DIGIT_4 1 +# elif BOOST_PP_SLOT_TEMP_4 == 2 +# define BOOST_PP_SLOT_3_DIGIT_4 2 +# elif BOOST_PP_SLOT_TEMP_4 == 3 +# define BOOST_PP_SLOT_3_DIGIT_4 3 +# elif BOOST_PP_SLOT_TEMP_4 == 4 +# define BOOST_PP_SLOT_3_DIGIT_4 4 +# elif BOOST_PP_SLOT_TEMP_4 == 5 +# define BOOST_PP_SLOT_3_DIGIT_4 5 +# elif BOOST_PP_SLOT_TEMP_4 == 6 +# define BOOST_PP_SLOT_3_DIGIT_4 6 +# elif BOOST_PP_SLOT_TEMP_4 == 7 +# define BOOST_PP_SLOT_3_DIGIT_4 7 +# elif BOOST_PP_SLOT_TEMP_4 == 8 +# define BOOST_PP_SLOT_3_DIGIT_4 8 +# elif BOOST_PP_SLOT_TEMP_4 == 9 +# define BOOST_PP_SLOT_3_DIGIT_4 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_SLOT_3_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_SLOT_3_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_SLOT_3_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_SLOT_3_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_SLOT_3_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_SLOT_3_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_SLOT_3_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_SLOT_3_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_SLOT_3_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_SLOT_3_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_SLOT_3_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_SLOT_3_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_SLOT_3_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_SLOT_3_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_SLOT_3_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_SLOT_3_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_SLOT_3_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_SLOT_3_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_SLOT_3_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_SLOT_3_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_SLOT_3_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_SLOT_3_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_SLOT_3_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_SLOT_3_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_SLOT_3_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_SLOT_3_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_SLOT_3_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_SLOT_3_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_SLOT_3_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_SLOT_3_DIGIT_1 9 +# endif +# +# if BOOST_PP_SLOT_3_DIGIT_10 +# define BOOST_PP_SLOT_3() BOOST_PP_SLOT_CC_10(BOOST_PP_SLOT_3_DIGIT_10, BOOST_PP_SLOT_3_DIGIT_9, BOOST_PP_SLOT_3_DIGIT_8, BOOST_PP_SLOT_3_DIGIT_7, BOOST_PP_SLOT_3_DIGIT_6, BOOST_PP_SLOT_3_DIGIT_5, BOOST_PP_SLOT_3_DIGIT_4, BOOST_PP_SLOT_3_DIGIT_3, BOOST_PP_SLOT_3_DIGIT_2, BOOST_PP_SLOT_3_DIGIT_1) +# elif BOOST_PP_SLOT_3_DIGIT_9 +# define BOOST_PP_SLOT_3() BOOST_PP_SLOT_CC_9(BOOST_PP_SLOT_3_DIGIT_9, BOOST_PP_SLOT_3_DIGIT_8, BOOST_PP_SLOT_3_DIGIT_7, BOOST_PP_SLOT_3_DIGIT_6, BOOST_PP_SLOT_3_DIGIT_5, BOOST_PP_SLOT_3_DIGIT_4, BOOST_PP_SLOT_3_DIGIT_3, BOOST_PP_SLOT_3_DIGIT_2, BOOST_PP_SLOT_3_DIGIT_1) +# elif BOOST_PP_SLOT_3_DIGIT_8 +# define BOOST_PP_SLOT_3() BOOST_PP_SLOT_CC_8(BOOST_PP_SLOT_3_DIGIT_8, BOOST_PP_SLOT_3_DIGIT_7, BOOST_PP_SLOT_3_DIGIT_6, BOOST_PP_SLOT_3_DIGIT_5, BOOST_PP_SLOT_3_DIGIT_4, BOOST_PP_SLOT_3_DIGIT_3, BOOST_PP_SLOT_3_DIGIT_2, BOOST_PP_SLOT_3_DIGIT_1) +# elif BOOST_PP_SLOT_3_DIGIT_7 +# define BOOST_PP_SLOT_3() BOOST_PP_SLOT_CC_7(BOOST_PP_SLOT_3_DIGIT_7, BOOST_PP_SLOT_3_DIGIT_6, BOOST_PP_SLOT_3_DIGIT_5, BOOST_PP_SLOT_3_DIGIT_4, BOOST_PP_SLOT_3_DIGIT_3, BOOST_PP_SLOT_3_DIGIT_2, BOOST_PP_SLOT_3_DIGIT_1) +# elif BOOST_PP_SLOT_3_DIGIT_6 +# define BOOST_PP_SLOT_3() BOOST_PP_SLOT_CC_6(BOOST_PP_SLOT_3_DIGIT_6, BOOST_PP_SLOT_3_DIGIT_5, BOOST_PP_SLOT_3_DIGIT_4, BOOST_PP_SLOT_3_DIGIT_3, BOOST_PP_SLOT_3_DIGIT_2, BOOST_PP_SLOT_3_DIGIT_1) +# elif BOOST_PP_SLOT_3_DIGIT_5 +# define BOOST_PP_SLOT_3() BOOST_PP_SLOT_CC_5(BOOST_PP_SLOT_3_DIGIT_5, BOOST_PP_SLOT_3_DIGIT_4, BOOST_PP_SLOT_3_DIGIT_3, BOOST_PP_SLOT_3_DIGIT_2, BOOST_PP_SLOT_3_DIGIT_1) +# elif BOOST_PP_SLOT_3_DIGIT_4 +# define BOOST_PP_SLOT_3() BOOST_PP_SLOT_CC_4(BOOST_PP_SLOT_3_DIGIT_4, BOOST_PP_SLOT_3_DIGIT_3, BOOST_PP_SLOT_3_DIGIT_2, BOOST_PP_SLOT_3_DIGIT_1) +# elif BOOST_PP_SLOT_3_DIGIT_3 +# define BOOST_PP_SLOT_3() BOOST_PP_SLOT_CC_3(BOOST_PP_SLOT_3_DIGIT_3, BOOST_PP_SLOT_3_DIGIT_2, BOOST_PP_SLOT_3_DIGIT_1) +# elif BOOST_PP_SLOT_3_DIGIT_2 +# define BOOST_PP_SLOT_3() BOOST_PP_SLOT_CC_2(BOOST_PP_SLOT_3_DIGIT_2, BOOST_PP_SLOT_3_DIGIT_1) +# else +# define BOOST_PP_SLOT_3() BOOST_PP_SLOT_3_DIGIT_1 +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/slot/detail/slot4.hpp b/ThirdParty/boost-Subset/boost/preprocessor/slot/detail/slot4.hpp new file mode 100644 index 0000000000..9aa4d8ab8d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/slot/detail/slot4.hpp @@ -0,0 +1,267 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_SLOT_4 +# +# undef BOOST_PP_SLOT_4_DIGIT_1 +# undef BOOST_PP_SLOT_4_DIGIT_2 +# undef BOOST_PP_SLOT_4_DIGIT_3 +# undef BOOST_PP_SLOT_4_DIGIT_4 +# undef BOOST_PP_SLOT_4_DIGIT_5 +# undef BOOST_PP_SLOT_4_DIGIT_6 +# undef BOOST_PP_SLOT_4_DIGIT_7 +# undef BOOST_PP_SLOT_4_DIGIT_8 +# undef BOOST_PP_SLOT_4_DIGIT_9 +# undef BOOST_PP_SLOT_4_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_10 == 0 +# define BOOST_PP_SLOT_4_DIGIT_10 0 +# elif BOOST_PP_SLOT_TEMP_10 == 1 +# define BOOST_PP_SLOT_4_DIGIT_10 1 +# elif BOOST_PP_SLOT_TEMP_10 == 2 +# define BOOST_PP_SLOT_4_DIGIT_10 2 +# elif BOOST_PP_SLOT_TEMP_10 == 3 +# define BOOST_PP_SLOT_4_DIGIT_10 3 +# elif BOOST_PP_SLOT_TEMP_10 == 4 +# define BOOST_PP_SLOT_4_DIGIT_10 4 +# elif BOOST_PP_SLOT_TEMP_10 == 5 +# define BOOST_PP_SLOT_4_DIGIT_10 5 +# elif BOOST_PP_SLOT_TEMP_10 == 6 +# define BOOST_PP_SLOT_4_DIGIT_10 6 +# elif BOOST_PP_SLOT_TEMP_10 == 7 +# define BOOST_PP_SLOT_4_DIGIT_10 7 +# elif BOOST_PP_SLOT_TEMP_10 == 8 +# define BOOST_PP_SLOT_4_DIGIT_10 8 +# elif BOOST_PP_SLOT_TEMP_10 == 9 +# define BOOST_PP_SLOT_4_DIGIT_10 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_9 == 0 +# define BOOST_PP_SLOT_4_DIGIT_9 0 +# elif BOOST_PP_SLOT_TEMP_9 == 1 +# define BOOST_PP_SLOT_4_DIGIT_9 1 +# elif BOOST_PP_SLOT_TEMP_9 == 2 +# define BOOST_PP_SLOT_4_DIGIT_9 2 +# elif BOOST_PP_SLOT_TEMP_9 == 3 +# define BOOST_PP_SLOT_4_DIGIT_9 3 +# elif BOOST_PP_SLOT_TEMP_9 == 4 +# define BOOST_PP_SLOT_4_DIGIT_9 4 +# elif BOOST_PP_SLOT_TEMP_9 == 5 +# define BOOST_PP_SLOT_4_DIGIT_9 5 +# elif BOOST_PP_SLOT_TEMP_9 == 6 +# define BOOST_PP_SLOT_4_DIGIT_9 6 +# elif BOOST_PP_SLOT_TEMP_9 == 7 +# define BOOST_PP_SLOT_4_DIGIT_9 7 +# elif BOOST_PP_SLOT_TEMP_9 == 8 +# define BOOST_PP_SLOT_4_DIGIT_9 8 +# elif BOOST_PP_SLOT_TEMP_9 == 9 +# define BOOST_PP_SLOT_4_DIGIT_9 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_8 == 0 +# define BOOST_PP_SLOT_4_DIGIT_8 0 +# elif BOOST_PP_SLOT_TEMP_8 == 1 +# define BOOST_PP_SLOT_4_DIGIT_8 1 +# elif BOOST_PP_SLOT_TEMP_8 == 2 +# define BOOST_PP_SLOT_4_DIGIT_8 2 +# elif BOOST_PP_SLOT_TEMP_8 == 3 +# define BOOST_PP_SLOT_4_DIGIT_8 3 +# elif BOOST_PP_SLOT_TEMP_8 == 4 +# define BOOST_PP_SLOT_4_DIGIT_8 4 +# elif BOOST_PP_SLOT_TEMP_8 == 5 +# define BOOST_PP_SLOT_4_DIGIT_8 5 +# elif BOOST_PP_SLOT_TEMP_8 == 6 +# define BOOST_PP_SLOT_4_DIGIT_8 6 +# elif BOOST_PP_SLOT_TEMP_8 == 7 +# define BOOST_PP_SLOT_4_DIGIT_8 7 +# elif BOOST_PP_SLOT_TEMP_8 == 8 +# define BOOST_PP_SLOT_4_DIGIT_8 8 +# elif BOOST_PP_SLOT_TEMP_8 == 9 +# define BOOST_PP_SLOT_4_DIGIT_8 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_7 == 0 +# define BOOST_PP_SLOT_4_DIGIT_7 0 +# elif BOOST_PP_SLOT_TEMP_7 == 1 +# define BOOST_PP_SLOT_4_DIGIT_7 1 +# elif BOOST_PP_SLOT_TEMP_7 == 2 +# define BOOST_PP_SLOT_4_DIGIT_7 2 +# elif BOOST_PP_SLOT_TEMP_7 == 3 +# define BOOST_PP_SLOT_4_DIGIT_7 3 +# elif BOOST_PP_SLOT_TEMP_7 == 4 +# define BOOST_PP_SLOT_4_DIGIT_7 4 +# elif BOOST_PP_SLOT_TEMP_7 == 5 +# define BOOST_PP_SLOT_4_DIGIT_7 5 +# elif BOOST_PP_SLOT_TEMP_7 == 6 +# define BOOST_PP_SLOT_4_DIGIT_7 6 +# elif BOOST_PP_SLOT_TEMP_7 == 7 +# define BOOST_PP_SLOT_4_DIGIT_7 7 +# elif BOOST_PP_SLOT_TEMP_7 == 8 +# define BOOST_PP_SLOT_4_DIGIT_7 8 +# elif BOOST_PP_SLOT_TEMP_7 == 9 +# define BOOST_PP_SLOT_4_DIGIT_7 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_6 == 0 +# define BOOST_PP_SLOT_4_DIGIT_6 0 +# elif BOOST_PP_SLOT_TEMP_6 == 1 +# define BOOST_PP_SLOT_4_DIGIT_6 1 +# elif BOOST_PP_SLOT_TEMP_6 == 2 +# define BOOST_PP_SLOT_4_DIGIT_6 2 +# elif BOOST_PP_SLOT_TEMP_6 == 3 +# define BOOST_PP_SLOT_4_DIGIT_6 3 +# elif BOOST_PP_SLOT_TEMP_6 == 4 +# define BOOST_PP_SLOT_4_DIGIT_6 4 +# elif BOOST_PP_SLOT_TEMP_6 == 5 +# define BOOST_PP_SLOT_4_DIGIT_6 5 +# elif BOOST_PP_SLOT_TEMP_6 == 6 +# define BOOST_PP_SLOT_4_DIGIT_6 6 +# elif BOOST_PP_SLOT_TEMP_6 == 7 +# define BOOST_PP_SLOT_4_DIGIT_6 7 +# elif BOOST_PP_SLOT_TEMP_6 == 8 +# define BOOST_PP_SLOT_4_DIGIT_6 8 +# elif BOOST_PP_SLOT_TEMP_6 == 9 +# define BOOST_PP_SLOT_4_DIGIT_6 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_5 == 0 +# define BOOST_PP_SLOT_4_DIGIT_5 0 +# elif BOOST_PP_SLOT_TEMP_5 == 1 +# define BOOST_PP_SLOT_4_DIGIT_5 1 +# elif BOOST_PP_SLOT_TEMP_5 == 2 +# define BOOST_PP_SLOT_4_DIGIT_5 2 +# elif BOOST_PP_SLOT_TEMP_5 == 3 +# define BOOST_PP_SLOT_4_DIGIT_5 3 +# elif BOOST_PP_SLOT_TEMP_5 == 4 +# define BOOST_PP_SLOT_4_DIGIT_5 4 +# elif BOOST_PP_SLOT_TEMP_5 == 5 +# define BOOST_PP_SLOT_4_DIGIT_5 5 +# elif BOOST_PP_SLOT_TEMP_5 == 6 +# define BOOST_PP_SLOT_4_DIGIT_5 6 +# elif BOOST_PP_SLOT_TEMP_5 == 7 +# define BOOST_PP_SLOT_4_DIGIT_5 7 +# elif BOOST_PP_SLOT_TEMP_5 == 8 +# define BOOST_PP_SLOT_4_DIGIT_5 8 +# elif BOOST_PP_SLOT_TEMP_5 == 9 +# define BOOST_PP_SLOT_4_DIGIT_5 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_4 == 0 +# define BOOST_PP_SLOT_4_DIGIT_4 0 +# elif BOOST_PP_SLOT_TEMP_4 == 1 +# define BOOST_PP_SLOT_4_DIGIT_4 1 +# elif BOOST_PP_SLOT_TEMP_4 == 2 +# define BOOST_PP_SLOT_4_DIGIT_4 2 +# elif BOOST_PP_SLOT_TEMP_4 == 3 +# define BOOST_PP_SLOT_4_DIGIT_4 3 +# elif BOOST_PP_SLOT_TEMP_4 == 4 +# define BOOST_PP_SLOT_4_DIGIT_4 4 +# elif BOOST_PP_SLOT_TEMP_4 == 5 +# define BOOST_PP_SLOT_4_DIGIT_4 5 +# elif BOOST_PP_SLOT_TEMP_4 == 6 +# define BOOST_PP_SLOT_4_DIGIT_4 6 +# elif BOOST_PP_SLOT_TEMP_4 == 7 +# define BOOST_PP_SLOT_4_DIGIT_4 7 +# elif BOOST_PP_SLOT_TEMP_4 == 8 +# define BOOST_PP_SLOT_4_DIGIT_4 8 +# elif BOOST_PP_SLOT_TEMP_4 == 9 +# define BOOST_PP_SLOT_4_DIGIT_4 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_SLOT_4_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_SLOT_4_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_SLOT_4_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_SLOT_4_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_SLOT_4_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_SLOT_4_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_SLOT_4_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_SLOT_4_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_SLOT_4_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_SLOT_4_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_SLOT_4_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_SLOT_4_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_SLOT_4_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_SLOT_4_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_SLOT_4_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_SLOT_4_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_SLOT_4_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_SLOT_4_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_SLOT_4_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_SLOT_4_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_SLOT_4_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_SLOT_4_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_SLOT_4_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_SLOT_4_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_SLOT_4_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_SLOT_4_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_SLOT_4_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_SLOT_4_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_SLOT_4_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_SLOT_4_DIGIT_1 9 +# endif +# +# if BOOST_PP_SLOT_4_DIGIT_10 +# define BOOST_PP_SLOT_4() BOOST_PP_SLOT_CC_10(BOOST_PP_SLOT_4_DIGIT_10, BOOST_PP_SLOT_4_DIGIT_9, BOOST_PP_SLOT_4_DIGIT_8, BOOST_PP_SLOT_4_DIGIT_7, BOOST_PP_SLOT_4_DIGIT_6, BOOST_PP_SLOT_4_DIGIT_5, BOOST_PP_SLOT_4_DIGIT_4, BOOST_PP_SLOT_4_DIGIT_3, BOOST_PP_SLOT_4_DIGIT_2, BOOST_PP_SLOT_4_DIGIT_1) +# elif BOOST_PP_SLOT_4_DIGIT_9 +# define BOOST_PP_SLOT_4() BOOST_PP_SLOT_CC_9(BOOST_PP_SLOT_4_DIGIT_9, BOOST_PP_SLOT_4_DIGIT_8, BOOST_PP_SLOT_4_DIGIT_7, BOOST_PP_SLOT_4_DIGIT_6, BOOST_PP_SLOT_4_DIGIT_5, BOOST_PP_SLOT_4_DIGIT_4, BOOST_PP_SLOT_4_DIGIT_3, BOOST_PP_SLOT_4_DIGIT_2, BOOST_PP_SLOT_4_DIGIT_1) +# elif BOOST_PP_SLOT_4_DIGIT_8 +# define BOOST_PP_SLOT_4() BOOST_PP_SLOT_CC_8(BOOST_PP_SLOT_4_DIGIT_8, BOOST_PP_SLOT_4_DIGIT_7, BOOST_PP_SLOT_4_DIGIT_6, BOOST_PP_SLOT_4_DIGIT_5, BOOST_PP_SLOT_4_DIGIT_4, BOOST_PP_SLOT_4_DIGIT_3, BOOST_PP_SLOT_4_DIGIT_2, BOOST_PP_SLOT_4_DIGIT_1) +# elif BOOST_PP_SLOT_4_DIGIT_7 +# define BOOST_PP_SLOT_4() BOOST_PP_SLOT_CC_7(BOOST_PP_SLOT_4_DIGIT_7, BOOST_PP_SLOT_4_DIGIT_6, BOOST_PP_SLOT_4_DIGIT_5, BOOST_PP_SLOT_4_DIGIT_4, BOOST_PP_SLOT_4_DIGIT_3, BOOST_PP_SLOT_4_DIGIT_2, BOOST_PP_SLOT_4_DIGIT_1) +# elif BOOST_PP_SLOT_4_DIGIT_6 +# define BOOST_PP_SLOT_4() BOOST_PP_SLOT_CC_6(BOOST_PP_SLOT_4_DIGIT_6, BOOST_PP_SLOT_4_DIGIT_5, BOOST_PP_SLOT_4_DIGIT_4, BOOST_PP_SLOT_4_DIGIT_3, BOOST_PP_SLOT_4_DIGIT_2, BOOST_PP_SLOT_4_DIGIT_1) +# elif BOOST_PP_SLOT_4_DIGIT_5 +# define BOOST_PP_SLOT_4() BOOST_PP_SLOT_CC_5(BOOST_PP_SLOT_4_DIGIT_5, BOOST_PP_SLOT_4_DIGIT_4, BOOST_PP_SLOT_4_DIGIT_3, BOOST_PP_SLOT_4_DIGIT_2, BOOST_PP_SLOT_4_DIGIT_1) +# elif BOOST_PP_SLOT_4_DIGIT_4 +# define BOOST_PP_SLOT_4() BOOST_PP_SLOT_CC_4(BOOST_PP_SLOT_4_DIGIT_4, BOOST_PP_SLOT_4_DIGIT_3, BOOST_PP_SLOT_4_DIGIT_2, BOOST_PP_SLOT_4_DIGIT_1) +# elif BOOST_PP_SLOT_4_DIGIT_3 +# define BOOST_PP_SLOT_4() BOOST_PP_SLOT_CC_3(BOOST_PP_SLOT_4_DIGIT_3, BOOST_PP_SLOT_4_DIGIT_2, BOOST_PP_SLOT_4_DIGIT_1) +# elif BOOST_PP_SLOT_4_DIGIT_2 +# define BOOST_PP_SLOT_4() BOOST_PP_SLOT_CC_2(BOOST_PP_SLOT_4_DIGIT_2, BOOST_PP_SLOT_4_DIGIT_1) +# else +# define BOOST_PP_SLOT_4() BOOST_PP_SLOT_4_DIGIT_1 +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/slot/detail/slot5.hpp b/ThirdParty/boost-Subset/boost/preprocessor/slot/detail/slot5.hpp new file mode 100644 index 0000000000..d17535daf4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/slot/detail/slot5.hpp @@ -0,0 +1,267 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# include +# +# undef BOOST_PP_SLOT_5 +# +# undef BOOST_PP_SLOT_5_DIGIT_1 +# undef BOOST_PP_SLOT_5_DIGIT_2 +# undef BOOST_PP_SLOT_5_DIGIT_3 +# undef BOOST_PP_SLOT_5_DIGIT_4 +# undef BOOST_PP_SLOT_5_DIGIT_5 +# undef BOOST_PP_SLOT_5_DIGIT_6 +# undef BOOST_PP_SLOT_5_DIGIT_7 +# undef BOOST_PP_SLOT_5_DIGIT_8 +# undef BOOST_PP_SLOT_5_DIGIT_9 +# undef BOOST_PP_SLOT_5_DIGIT_10 +# +# if BOOST_PP_SLOT_TEMP_10 == 0 +# define BOOST_PP_SLOT_5_DIGIT_10 0 +# elif BOOST_PP_SLOT_TEMP_10 == 1 +# define BOOST_PP_SLOT_5_DIGIT_10 1 +# elif BOOST_PP_SLOT_TEMP_10 == 2 +# define BOOST_PP_SLOT_5_DIGIT_10 2 +# elif BOOST_PP_SLOT_TEMP_10 == 3 +# define BOOST_PP_SLOT_5_DIGIT_10 3 +# elif BOOST_PP_SLOT_TEMP_10 == 4 +# define BOOST_PP_SLOT_5_DIGIT_10 4 +# elif BOOST_PP_SLOT_TEMP_10 == 5 +# define BOOST_PP_SLOT_5_DIGIT_10 5 +# elif BOOST_PP_SLOT_TEMP_10 == 6 +# define BOOST_PP_SLOT_5_DIGIT_10 6 +# elif BOOST_PP_SLOT_TEMP_10 == 7 +# define BOOST_PP_SLOT_5_DIGIT_10 7 +# elif BOOST_PP_SLOT_TEMP_10 == 8 +# define BOOST_PP_SLOT_5_DIGIT_10 8 +# elif BOOST_PP_SLOT_TEMP_10 == 9 +# define BOOST_PP_SLOT_5_DIGIT_10 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_9 == 0 +# define BOOST_PP_SLOT_5_DIGIT_9 0 +# elif BOOST_PP_SLOT_TEMP_9 == 1 +# define BOOST_PP_SLOT_5_DIGIT_9 1 +# elif BOOST_PP_SLOT_TEMP_9 == 2 +# define BOOST_PP_SLOT_5_DIGIT_9 2 +# elif BOOST_PP_SLOT_TEMP_9 == 3 +# define BOOST_PP_SLOT_5_DIGIT_9 3 +# elif BOOST_PP_SLOT_TEMP_9 == 4 +# define BOOST_PP_SLOT_5_DIGIT_9 4 +# elif BOOST_PP_SLOT_TEMP_9 == 5 +# define BOOST_PP_SLOT_5_DIGIT_9 5 +# elif BOOST_PP_SLOT_TEMP_9 == 6 +# define BOOST_PP_SLOT_5_DIGIT_9 6 +# elif BOOST_PP_SLOT_TEMP_9 == 7 +# define BOOST_PP_SLOT_5_DIGIT_9 7 +# elif BOOST_PP_SLOT_TEMP_9 == 8 +# define BOOST_PP_SLOT_5_DIGIT_9 8 +# elif BOOST_PP_SLOT_TEMP_9 == 9 +# define BOOST_PP_SLOT_5_DIGIT_9 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_8 == 0 +# define BOOST_PP_SLOT_5_DIGIT_8 0 +# elif BOOST_PP_SLOT_TEMP_8 == 1 +# define BOOST_PP_SLOT_5_DIGIT_8 1 +# elif BOOST_PP_SLOT_TEMP_8 == 2 +# define BOOST_PP_SLOT_5_DIGIT_8 2 +# elif BOOST_PP_SLOT_TEMP_8 == 3 +# define BOOST_PP_SLOT_5_DIGIT_8 3 +# elif BOOST_PP_SLOT_TEMP_8 == 4 +# define BOOST_PP_SLOT_5_DIGIT_8 4 +# elif BOOST_PP_SLOT_TEMP_8 == 5 +# define BOOST_PP_SLOT_5_DIGIT_8 5 +# elif BOOST_PP_SLOT_TEMP_8 == 6 +# define BOOST_PP_SLOT_5_DIGIT_8 6 +# elif BOOST_PP_SLOT_TEMP_8 == 7 +# define BOOST_PP_SLOT_5_DIGIT_8 7 +# elif BOOST_PP_SLOT_TEMP_8 == 8 +# define BOOST_PP_SLOT_5_DIGIT_8 8 +# elif BOOST_PP_SLOT_TEMP_8 == 9 +# define BOOST_PP_SLOT_5_DIGIT_8 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_7 == 0 +# define BOOST_PP_SLOT_5_DIGIT_7 0 +# elif BOOST_PP_SLOT_TEMP_7 == 1 +# define BOOST_PP_SLOT_5_DIGIT_7 1 +# elif BOOST_PP_SLOT_TEMP_7 == 2 +# define BOOST_PP_SLOT_5_DIGIT_7 2 +# elif BOOST_PP_SLOT_TEMP_7 == 3 +# define BOOST_PP_SLOT_5_DIGIT_7 3 +# elif BOOST_PP_SLOT_TEMP_7 == 4 +# define BOOST_PP_SLOT_5_DIGIT_7 4 +# elif BOOST_PP_SLOT_TEMP_7 == 5 +# define BOOST_PP_SLOT_5_DIGIT_7 5 +# elif BOOST_PP_SLOT_TEMP_7 == 6 +# define BOOST_PP_SLOT_5_DIGIT_7 6 +# elif BOOST_PP_SLOT_TEMP_7 == 7 +# define BOOST_PP_SLOT_5_DIGIT_7 7 +# elif BOOST_PP_SLOT_TEMP_7 == 8 +# define BOOST_PP_SLOT_5_DIGIT_7 8 +# elif BOOST_PP_SLOT_TEMP_7 == 9 +# define BOOST_PP_SLOT_5_DIGIT_7 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_6 == 0 +# define BOOST_PP_SLOT_5_DIGIT_6 0 +# elif BOOST_PP_SLOT_TEMP_6 == 1 +# define BOOST_PP_SLOT_5_DIGIT_6 1 +# elif BOOST_PP_SLOT_TEMP_6 == 2 +# define BOOST_PP_SLOT_5_DIGIT_6 2 +# elif BOOST_PP_SLOT_TEMP_6 == 3 +# define BOOST_PP_SLOT_5_DIGIT_6 3 +# elif BOOST_PP_SLOT_TEMP_6 == 4 +# define BOOST_PP_SLOT_5_DIGIT_6 4 +# elif BOOST_PP_SLOT_TEMP_6 == 5 +# define BOOST_PP_SLOT_5_DIGIT_6 5 +# elif BOOST_PP_SLOT_TEMP_6 == 6 +# define BOOST_PP_SLOT_5_DIGIT_6 6 +# elif BOOST_PP_SLOT_TEMP_6 == 7 +# define BOOST_PP_SLOT_5_DIGIT_6 7 +# elif BOOST_PP_SLOT_TEMP_6 == 8 +# define BOOST_PP_SLOT_5_DIGIT_6 8 +# elif BOOST_PP_SLOT_TEMP_6 == 9 +# define BOOST_PP_SLOT_5_DIGIT_6 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_5 == 0 +# define BOOST_PP_SLOT_5_DIGIT_5 0 +# elif BOOST_PP_SLOT_TEMP_5 == 1 +# define BOOST_PP_SLOT_5_DIGIT_5 1 +# elif BOOST_PP_SLOT_TEMP_5 == 2 +# define BOOST_PP_SLOT_5_DIGIT_5 2 +# elif BOOST_PP_SLOT_TEMP_5 == 3 +# define BOOST_PP_SLOT_5_DIGIT_5 3 +# elif BOOST_PP_SLOT_TEMP_5 == 4 +# define BOOST_PP_SLOT_5_DIGIT_5 4 +# elif BOOST_PP_SLOT_TEMP_5 == 5 +# define BOOST_PP_SLOT_5_DIGIT_5 5 +# elif BOOST_PP_SLOT_TEMP_5 == 6 +# define BOOST_PP_SLOT_5_DIGIT_5 6 +# elif BOOST_PP_SLOT_TEMP_5 == 7 +# define BOOST_PP_SLOT_5_DIGIT_5 7 +# elif BOOST_PP_SLOT_TEMP_5 == 8 +# define BOOST_PP_SLOT_5_DIGIT_5 8 +# elif BOOST_PP_SLOT_TEMP_5 == 9 +# define BOOST_PP_SLOT_5_DIGIT_5 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_4 == 0 +# define BOOST_PP_SLOT_5_DIGIT_4 0 +# elif BOOST_PP_SLOT_TEMP_4 == 1 +# define BOOST_PP_SLOT_5_DIGIT_4 1 +# elif BOOST_PP_SLOT_TEMP_4 == 2 +# define BOOST_PP_SLOT_5_DIGIT_4 2 +# elif BOOST_PP_SLOT_TEMP_4 == 3 +# define BOOST_PP_SLOT_5_DIGIT_4 3 +# elif BOOST_PP_SLOT_TEMP_4 == 4 +# define BOOST_PP_SLOT_5_DIGIT_4 4 +# elif BOOST_PP_SLOT_TEMP_4 == 5 +# define BOOST_PP_SLOT_5_DIGIT_4 5 +# elif BOOST_PP_SLOT_TEMP_4 == 6 +# define BOOST_PP_SLOT_5_DIGIT_4 6 +# elif BOOST_PP_SLOT_TEMP_4 == 7 +# define BOOST_PP_SLOT_5_DIGIT_4 7 +# elif BOOST_PP_SLOT_TEMP_4 == 8 +# define BOOST_PP_SLOT_5_DIGIT_4 8 +# elif BOOST_PP_SLOT_TEMP_4 == 9 +# define BOOST_PP_SLOT_5_DIGIT_4 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_3 == 0 +# define BOOST_PP_SLOT_5_DIGIT_3 0 +# elif BOOST_PP_SLOT_TEMP_3 == 1 +# define BOOST_PP_SLOT_5_DIGIT_3 1 +# elif BOOST_PP_SLOT_TEMP_3 == 2 +# define BOOST_PP_SLOT_5_DIGIT_3 2 +# elif BOOST_PP_SLOT_TEMP_3 == 3 +# define BOOST_PP_SLOT_5_DIGIT_3 3 +# elif BOOST_PP_SLOT_TEMP_3 == 4 +# define BOOST_PP_SLOT_5_DIGIT_3 4 +# elif BOOST_PP_SLOT_TEMP_3 == 5 +# define BOOST_PP_SLOT_5_DIGIT_3 5 +# elif BOOST_PP_SLOT_TEMP_3 == 6 +# define BOOST_PP_SLOT_5_DIGIT_3 6 +# elif BOOST_PP_SLOT_TEMP_3 == 7 +# define BOOST_PP_SLOT_5_DIGIT_3 7 +# elif BOOST_PP_SLOT_TEMP_3 == 8 +# define BOOST_PP_SLOT_5_DIGIT_3 8 +# elif BOOST_PP_SLOT_TEMP_3 == 9 +# define BOOST_PP_SLOT_5_DIGIT_3 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_2 == 0 +# define BOOST_PP_SLOT_5_DIGIT_2 0 +# elif BOOST_PP_SLOT_TEMP_2 == 1 +# define BOOST_PP_SLOT_5_DIGIT_2 1 +# elif BOOST_PP_SLOT_TEMP_2 == 2 +# define BOOST_PP_SLOT_5_DIGIT_2 2 +# elif BOOST_PP_SLOT_TEMP_2 == 3 +# define BOOST_PP_SLOT_5_DIGIT_2 3 +# elif BOOST_PP_SLOT_TEMP_2 == 4 +# define BOOST_PP_SLOT_5_DIGIT_2 4 +# elif BOOST_PP_SLOT_TEMP_2 == 5 +# define BOOST_PP_SLOT_5_DIGIT_2 5 +# elif BOOST_PP_SLOT_TEMP_2 == 6 +# define BOOST_PP_SLOT_5_DIGIT_2 6 +# elif BOOST_PP_SLOT_TEMP_2 == 7 +# define BOOST_PP_SLOT_5_DIGIT_2 7 +# elif BOOST_PP_SLOT_TEMP_2 == 8 +# define BOOST_PP_SLOT_5_DIGIT_2 8 +# elif BOOST_PP_SLOT_TEMP_2 == 9 +# define BOOST_PP_SLOT_5_DIGIT_2 9 +# endif +# +# if BOOST_PP_SLOT_TEMP_1 == 0 +# define BOOST_PP_SLOT_5_DIGIT_1 0 +# elif BOOST_PP_SLOT_TEMP_1 == 1 +# define BOOST_PP_SLOT_5_DIGIT_1 1 +# elif BOOST_PP_SLOT_TEMP_1 == 2 +# define BOOST_PP_SLOT_5_DIGIT_1 2 +# elif BOOST_PP_SLOT_TEMP_1 == 3 +# define BOOST_PP_SLOT_5_DIGIT_1 3 +# elif BOOST_PP_SLOT_TEMP_1 == 4 +# define BOOST_PP_SLOT_5_DIGIT_1 4 +# elif BOOST_PP_SLOT_TEMP_1 == 5 +# define BOOST_PP_SLOT_5_DIGIT_1 5 +# elif BOOST_PP_SLOT_TEMP_1 == 6 +# define BOOST_PP_SLOT_5_DIGIT_1 6 +# elif BOOST_PP_SLOT_TEMP_1 == 7 +# define BOOST_PP_SLOT_5_DIGIT_1 7 +# elif BOOST_PP_SLOT_TEMP_1 == 8 +# define BOOST_PP_SLOT_5_DIGIT_1 8 +# elif BOOST_PP_SLOT_TEMP_1 == 9 +# define BOOST_PP_SLOT_5_DIGIT_1 9 +# endif +# +# if BOOST_PP_SLOT_5_DIGIT_10 +# define BOOST_PP_SLOT_5() BOOST_PP_SLOT_CC_10(BOOST_PP_SLOT_5_DIGIT_10, BOOST_PP_SLOT_5_DIGIT_9, BOOST_PP_SLOT_5_DIGIT_8, BOOST_PP_SLOT_5_DIGIT_7, BOOST_PP_SLOT_5_DIGIT_6, BOOST_PP_SLOT_5_DIGIT_5, BOOST_PP_SLOT_5_DIGIT_4, BOOST_PP_SLOT_5_DIGIT_3, BOOST_PP_SLOT_5_DIGIT_2, BOOST_PP_SLOT_5_DIGIT_1) +# elif BOOST_PP_SLOT_5_DIGIT_9 +# define BOOST_PP_SLOT_5() BOOST_PP_SLOT_CC_9(BOOST_PP_SLOT_5_DIGIT_9, BOOST_PP_SLOT_5_DIGIT_8, BOOST_PP_SLOT_5_DIGIT_7, BOOST_PP_SLOT_5_DIGIT_6, BOOST_PP_SLOT_5_DIGIT_5, BOOST_PP_SLOT_5_DIGIT_4, BOOST_PP_SLOT_5_DIGIT_3, BOOST_PP_SLOT_5_DIGIT_2, BOOST_PP_SLOT_5_DIGIT_1) +# elif BOOST_PP_SLOT_5_DIGIT_8 +# define BOOST_PP_SLOT_5() BOOST_PP_SLOT_CC_8(BOOST_PP_SLOT_5_DIGIT_8, BOOST_PP_SLOT_5_DIGIT_7, BOOST_PP_SLOT_5_DIGIT_6, BOOST_PP_SLOT_5_DIGIT_5, BOOST_PP_SLOT_5_DIGIT_4, BOOST_PP_SLOT_5_DIGIT_3, BOOST_PP_SLOT_5_DIGIT_2, BOOST_PP_SLOT_5_DIGIT_1) +# elif BOOST_PP_SLOT_5_DIGIT_7 +# define BOOST_PP_SLOT_5() BOOST_PP_SLOT_CC_7(BOOST_PP_SLOT_5_DIGIT_7, BOOST_PP_SLOT_5_DIGIT_6, BOOST_PP_SLOT_5_DIGIT_5, BOOST_PP_SLOT_5_DIGIT_4, BOOST_PP_SLOT_5_DIGIT_3, BOOST_PP_SLOT_5_DIGIT_2, BOOST_PP_SLOT_5_DIGIT_1) +# elif BOOST_PP_SLOT_5_DIGIT_6 +# define BOOST_PP_SLOT_5() BOOST_PP_SLOT_CC_6(BOOST_PP_SLOT_5_DIGIT_6, BOOST_PP_SLOT_5_DIGIT_5, BOOST_PP_SLOT_5_DIGIT_4, BOOST_PP_SLOT_5_DIGIT_3, BOOST_PP_SLOT_5_DIGIT_2, BOOST_PP_SLOT_5_DIGIT_1) +# elif BOOST_PP_SLOT_5_DIGIT_5 +# define BOOST_PP_SLOT_5() BOOST_PP_SLOT_CC_5(BOOST_PP_SLOT_5_DIGIT_5, BOOST_PP_SLOT_5_DIGIT_4, BOOST_PP_SLOT_5_DIGIT_3, BOOST_PP_SLOT_5_DIGIT_2, BOOST_PP_SLOT_5_DIGIT_1) +# elif BOOST_PP_SLOT_5_DIGIT_4 +# define BOOST_PP_SLOT_5() BOOST_PP_SLOT_CC_4(BOOST_PP_SLOT_5_DIGIT_4, BOOST_PP_SLOT_5_DIGIT_3, BOOST_PP_SLOT_5_DIGIT_2, BOOST_PP_SLOT_5_DIGIT_1) +# elif BOOST_PP_SLOT_5_DIGIT_3 +# define BOOST_PP_SLOT_5() BOOST_PP_SLOT_CC_3(BOOST_PP_SLOT_5_DIGIT_3, BOOST_PP_SLOT_5_DIGIT_2, BOOST_PP_SLOT_5_DIGIT_1) +# elif BOOST_PP_SLOT_5_DIGIT_2 +# define BOOST_PP_SLOT_5() BOOST_PP_SLOT_CC_2(BOOST_PP_SLOT_5_DIGIT_2, BOOST_PP_SLOT_5_DIGIT_1) +# else +# define BOOST_PP_SLOT_5() BOOST_PP_SLOT_5_DIGIT_1 +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/slot/slot.hpp b/ThirdParty/boost-Subset/boost/preprocessor/slot/slot.hpp new file mode 100644 index 0000000000..147b097ca9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/slot/slot.hpp @@ -0,0 +1,32 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SLOT_SLOT_HPP +# define BOOST_PREPROCESSOR_SLOT_SLOT_HPP +# +# include +# include +# +# /* BOOST_PP_ASSIGN_SLOT */ +# +# define BOOST_PP_ASSIGN_SLOT(i) BOOST_PP_CAT(BOOST_PP_ASSIGN_SLOT_, i) +# +# define BOOST_PP_ASSIGN_SLOT_1 +# define BOOST_PP_ASSIGN_SLOT_2 +# define BOOST_PP_ASSIGN_SLOT_3 +# define BOOST_PP_ASSIGN_SLOT_4 +# define BOOST_PP_ASSIGN_SLOT_5 +# +# /* BOOST_PP_SLOT */ +# +# define BOOST_PP_SLOT(i) BOOST_PP_CAT(BOOST_PP_SLOT_, i)() +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/stringize.hpp b/ThirdParty/boost-Subset/boost/preprocessor/stringize.hpp new file mode 100644 index 0000000000..64dd5fde3e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/stringize.hpp @@ -0,0 +1,33 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_STRINGIZE_HPP +# define BOOST_PREPROCESSOR_STRINGIZE_HPP +# +# include +# +# /* BOOST_PP_STRINGIZE */ +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_A((text)) +# define BOOST_PP_STRINGIZE_A(arg) BOOST_PP_STRINGIZE_I arg +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_OO((text)) +# define BOOST_PP_STRINGIZE_OO(par) BOOST_PP_STRINGIZE_I ## par +# else +# define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_I(text) +# endif +# +# define BOOST_PP_STRINGIZE_I(text) #text +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/tuple/detail/is_single_return.hpp b/ThirdParty/boost-Subset/boost/preprocessor/tuple/detail/is_single_return.hpp new file mode 100644 index 0000000000..02a4fb207c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/tuple/detail/is_single_return.hpp @@ -0,0 +1,28 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Edward Diener 2014. * +# * Distributed under the Boost Software License, Version 1.0. (See * +# * accompanying file LICENSE_1_0.txt or copy at * +# * http://www.boost.org/LICENSE_1_0.txt) * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_TUPLE_DETAIL_IS_SINGLE_RETURN_HPP +# define BOOST_PREPROCESSOR_TUPLE_DETAIL_IS_SINGLE_RETURN_HPP +# +# include +# +# /* BOOST_PP_TUPLE_IS_SINGLE_RETURN */ +# +# if BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC +# include +# include +# include +# define BOOST_PP_TUPLE_IS_SINGLE_RETURN(sr,nsr,tuple) \ + BOOST_PP_IIF(BOOST_PP_IS_1(BOOST_PP_TUPLE_SIZE(tuple)),sr,nsr) \ + /**/ +# endif /* BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC */ +# +# endif /* BOOST_PREPROCESSOR_TUPLE_DETAIL_IS_SINGLE_RETURN_HPP */ diff --git a/ThirdParty/boost-Subset/boost/preprocessor/tuple/eat.hpp b/ThirdParty/boost-Subset/boost/preprocessor/tuple/eat.hpp new file mode 100644 index 0000000000..708015e140 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/tuple/eat.hpp @@ -0,0 +1,106 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002-2011) */ +# /* Revised by Edward Diener (2011) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_TUPLE_EAT_HPP +# define BOOST_PREPROCESSOR_TUPLE_EAT_HPP +# +# include +# +# /* BOOST_PP_EAT */ +# +# if BOOST_PP_VARIADICS +# define BOOST_PP_EAT(...) +# else +# define BOOST_PP_EAT(x) +# endif +# +# /* BOOST_PP_TUPLE_EAT */ +# +# if BOOST_PP_VARIADICS +# define BOOST_PP_TUPLE_EAT(size) BOOST_PP_EAT +# else +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_TUPLE_EAT(size) BOOST_PP_TUPLE_EAT_I(size) +# else +# define BOOST_PP_TUPLE_EAT(size) BOOST_PP_TUPLE_EAT_OO((size)) +# define BOOST_PP_TUPLE_EAT_OO(par) BOOST_PP_TUPLE_EAT_I ## par +# endif +# define BOOST_PP_TUPLE_EAT_I(size) BOOST_PP_TUPLE_EAT_ ## size +# endif +# define BOOST_PP_TUPLE_EAT_1(e0) +# define BOOST_PP_TUPLE_EAT_2(e0, e1) +# define BOOST_PP_TUPLE_EAT_3(e0, e1, e2) +# define BOOST_PP_TUPLE_EAT_4(e0, e1, e2, e3) +# define BOOST_PP_TUPLE_EAT_5(e0, e1, e2, e3, e4) +# define BOOST_PP_TUPLE_EAT_6(e0, e1, e2, e3, e4, e5) +# define BOOST_PP_TUPLE_EAT_7(e0, e1, e2, e3, e4, e5, e6) +# define BOOST_PP_TUPLE_EAT_8(e0, e1, e2, e3, e4, e5, e6, e7) +# define BOOST_PP_TUPLE_EAT_9(e0, e1, e2, e3, e4, e5, e6, e7, e8) +# define BOOST_PP_TUPLE_EAT_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9) +# define BOOST_PP_TUPLE_EAT_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10) +# define BOOST_PP_TUPLE_EAT_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11) +# define BOOST_PP_TUPLE_EAT_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12) +# define BOOST_PP_TUPLE_EAT_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13) +# define BOOST_PP_TUPLE_EAT_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14) +# define BOOST_PP_TUPLE_EAT_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15) +# define BOOST_PP_TUPLE_EAT_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16) +# define BOOST_PP_TUPLE_EAT_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17) +# define BOOST_PP_TUPLE_EAT_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18) +# define BOOST_PP_TUPLE_EAT_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19) +# define BOOST_PP_TUPLE_EAT_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20) +# define BOOST_PP_TUPLE_EAT_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21) +# define BOOST_PP_TUPLE_EAT_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22) +# define BOOST_PP_TUPLE_EAT_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23) +# define BOOST_PP_TUPLE_EAT_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24) +# define BOOST_PP_TUPLE_EAT_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25) +# define BOOST_PP_TUPLE_EAT_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26) +# define BOOST_PP_TUPLE_EAT_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27) +# define BOOST_PP_TUPLE_EAT_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28) +# define BOOST_PP_TUPLE_EAT_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29) +# define BOOST_PP_TUPLE_EAT_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30) +# define BOOST_PP_TUPLE_EAT_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) +# define BOOST_PP_TUPLE_EAT_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32) +# define BOOST_PP_TUPLE_EAT_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33) +# define BOOST_PP_TUPLE_EAT_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34) +# define BOOST_PP_TUPLE_EAT_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35) +# define BOOST_PP_TUPLE_EAT_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36) +# define BOOST_PP_TUPLE_EAT_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37) +# define BOOST_PP_TUPLE_EAT_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38) +# define BOOST_PP_TUPLE_EAT_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39) +# define BOOST_PP_TUPLE_EAT_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40) +# define BOOST_PP_TUPLE_EAT_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41) +# define BOOST_PP_TUPLE_EAT_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42) +# define BOOST_PP_TUPLE_EAT_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43) +# define BOOST_PP_TUPLE_EAT_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44) +# define BOOST_PP_TUPLE_EAT_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45) +# define BOOST_PP_TUPLE_EAT_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46) +# define BOOST_PP_TUPLE_EAT_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47) +# define BOOST_PP_TUPLE_EAT_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48) +# define BOOST_PP_TUPLE_EAT_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49) +# define BOOST_PP_TUPLE_EAT_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50) +# define BOOST_PP_TUPLE_EAT_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51) +# define BOOST_PP_TUPLE_EAT_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52) +# define BOOST_PP_TUPLE_EAT_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53) +# define BOOST_PP_TUPLE_EAT_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54) +# define BOOST_PP_TUPLE_EAT_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55) +# define BOOST_PP_TUPLE_EAT_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56) +# define BOOST_PP_TUPLE_EAT_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57) +# define BOOST_PP_TUPLE_EAT_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58) +# define BOOST_PP_TUPLE_EAT_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59) +# define BOOST_PP_TUPLE_EAT_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60) +# define BOOST_PP_TUPLE_EAT_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61) +# define BOOST_PP_TUPLE_EAT_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62) +# define BOOST_PP_TUPLE_EAT_64(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/tuple/elem.hpp b/ThirdParty/boost-Subset/boost/preprocessor/tuple/elem.hpp new file mode 100644 index 0000000000..88044d3c7e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/tuple/elem.hpp @@ -0,0 +1,201 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002-2011) */ +# /* Revised by Edward Diener (2011,2014) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_TUPLE_ELEM_HPP +# define BOOST_PREPROCESSOR_TUPLE_ELEM_HPP +# +# include +# include +# include +# include +# include +# include +# include +# +# if BOOST_PP_VARIADICS +# if BOOST_PP_VARIADICS_MSVC +# define BOOST_PP_TUPLE_ELEM(...) BOOST_PP_TUPLE_ELEM_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ELEM_O_, __VA_ARGS__), (__VA_ARGS__)) +# define BOOST_PP_TUPLE_ELEM_I(m, args) BOOST_PP_TUPLE_ELEM_II(m, args) +# define BOOST_PP_TUPLE_ELEM_II(m, args) BOOST_PP_CAT(m ## args,) +/* + Use BOOST_PP_REM_CAT if it is a single element tuple ( which might be empty ) + else use BOOST_PP_REM. This fixes a VC++ problem with an empty tuple and BOOST_PP_TUPLE_ELEM + functionality. See tuple_elem_bug_test.cxx. +*/ +# define BOOST_PP_TUPLE_ELEM_O_2(n, tuple) \ + BOOST_PP_VARIADIC_ELEM(n, BOOST_PP_EXPAND(BOOST_PP_TUPLE_IS_SINGLE_RETURN(BOOST_PP_REM_CAT,BOOST_PP_REM,tuple) tuple)) \ + /**/ +# else +# define BOOST_PP_TUPLE_ELEM(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ELEM_O_, __VA_ARGS__)(__VA_ARGS__) +# define BOOST_PP_TUPLE_ELEM_O_2(n, tuple) BOOST_PP_VARIADIC_ELEM(n, BOOST_PP_REM tuple) +# endif +# define BOOST_PP_TUPLE_ELEM_O_3(size, n, tuple) BOOST_PP_TUPLE_ELEM_O_2(n, tuple) +# else +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_TUPLE_ELEM(size, n, tuple) BOOST_PP_TUPLE_ELEM_I(BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM_, n), BOOST_PP_CAT(BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM_E_, size), tuple)) +# define BOOST_PP_TUPLE_ELEM_I(m, args) BOOST_PP_TUPLE_ELEM_II(m, args) +# define BOOST_PP_TUPLE_ELEM_II(m, args) BOOST_PP_CAT(m ## args,) +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_TUPLE_ELEM(size, n, tuple) BOOST_PP_TUPLE_ELEM_I_OO((size, n, tuple)) +# define BOOST_PP_TUPLE_ELEM_I_OO(par) BOOST_PP_TUPLE_ELEM_I ## par +# define BOOST_PP_TUPLE_ELEM_I(size, n, tuple) BOOST_PP_TUPLE_ELEM_II((n, BOOST_PP_TUPLE_ELEM_E_ ## size ## tuple)) +# define BOOST_PP_TUPLE_ELEM_II(par) BOOST_PP_TUPLE_ELEM_III_OO(par) +# define BOOST_PP_TUPLE_ELEM_III_OO(par) BOOST_PP_TUPLE_ELEM_III ## par +# define BOOST_PP_TUPLE_ELEM_III(n, etuple) BOOST_PP_TUPLE_ELEM_ ## n ## etuple +# else +# define BOOST_PP_TUPLE_ELEM(size, n, tuple) BOOST_PP_TUPLE_ELEM_I(BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM_, n) BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM_E_, size) tuple) +# define BOOST_PP_TUPLE_ELEM_I(x) x +# endif +# define BOOST_PP_TUPLE_ELEM_E_1(e0) (e0, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_2(e0, e1) (e0, e1, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_3(e0, e1, e2) (e0, e1, e2, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_4(e0, e1, e2, e3) (e0, e1, e2, e3, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_5(e0, e1, e2, e3, e4) (e0, e1, e2, e3, e4, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_6(e0, e1, e2, e3, e4, e5) (e0, e1, e2, e3, e4, e5, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_7(e0, e1, e2, e3, e4, e5, e6) (e0, e1, e2, e3, e4, e5, e6, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_8(e0, e1, e2, e3, e4, e5, e6, e7) (e0, e1, e2, e3, e4, e5, e6, e7, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_9(e0, e1, e2, e3, e4, e5, e6, e7, e8) (e0, e1, e2, e3, e4, e5, e6, e7, e8, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, ?, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, ?, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, ?, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, ?, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, ?, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, ?, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, ?, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, ?, ?) +# define BOOST_PP_TUPLE_ELEM_E_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, ?) +# define BOOST_PP_TUPLE_ELEM_E_64 +# define BOOST_PP_TUPLE_ELEM_0(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e0 +# define BOOST_PP_TUPLE_ELEM_1(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e1 +# define BOOST_PP_TUPLE_ELEM_2(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e2 +# define BOOST_PP_TUPLE_ELEM_3(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e3 +# define BOOST_PP_TUPLE_ELEM_4(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e4 +# define BOOST_PP_TUPLE_ELEM_5(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e5 +# define BOOST_PP_TUPLE_ELEM_6(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e6 +# define BOOST_PP_TUPLE_ELEM_7(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e7 +# define BOOST_PP_TUPLE_ELEM_8(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e8 +# define BOOST_PP_TUPLE_ELEM_9(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e9 +# define BOOST_PP_TUPLE_ELEM_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e10 +# define BOOST_PP_TUPLE_ELEM_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e11 +# define BOOST_PP_TUPLE_ELEM_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e12 +# define BOOST_PP_TUPLE_ELEM_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e13 +# define BOOST_PP_TUPLE_ELEM_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e14 +# define BOOST_PP_TUPLE_ELEM_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e15 +# define BOOST_PP_TUPLE_ELEM_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e16 +# define BOOST_PP_TUPLE_ELEM_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e17 +# define BOOST_PP_TUPLE_ELEM_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e18 +# define BOOST_PP_TUPLE_ELEM_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e19 +# define BOOST_PP_TUPLE_ELEM_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e20 +# define BOOST_PP_TUPLE_ELEM_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e21 +# define BOOST_PP_TUPLE_ELEM_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e22 +# define BOOST_PP_TUPLE_ELEM_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e23 +# define BOOST_PP_TUPLE_ELEM_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e24 +# define BOOST_PP_TUPLE_ELEM_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e25 +# define BOOST_PP_TUPLE_ELEM_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e26 +# define BOOST_PP_TUPLE_ELEM_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e27 +# define BOOST_PP_TUPLE_ELEM_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e28 +# define BOOST_PP_TUPLE_ELEM_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e29 +# define BOOST_PP_TUPLE_ELEM_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e30 +# define BOOST_PP_TUPLE_ELEM_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e31 +# define BOOST_PP_TUPLE_ELEM_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e32 +# define BOOST_PP_TUPLE_ELEM_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e33 +# define BOOST_PP_TUPLE_ELEM_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e34 +# define BOOST_PP_TUPLE_ELEM_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e35 +# define BOOST_PP_TUPLE_ELEM_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e36 +# define BOOST_PP_TUPLE_ELEM_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e37 +# define BOOST_PP_TUPLE_ELEM_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e38 +# define BOOST_PP_TUPLE_ELEM_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e39 +# define BOOST_PP_TUPLE_ELEM_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e40 +# define BOOST_PP_TUPLE_ELEM_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e41 +# define BOOST_PP_TUPLE_ELEM_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e42 +# define BOOST_PP_TUPLE_ELEM_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e43 +# define BOOST_PP_TUPLE_ELEM_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e44 +# define BOOST_PP_TUPLE_ELEM_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e45 +# define BOOST_PP_TUPLE_ELEM_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e46 +# define BOOST_PP_TUPLE_ELEM_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e47 +# define BOOST_PP_TUPLE_ELEM_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e48 +# define BOOST_PP_TUPLE_ELEM_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e49 +# define BOOST_PP_TUPLE_ELEM_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e50 +# define BOOST_PP_TUPLE_ELEM_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e51 +# define BOOST_PP_TUPLE_ELEM_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e52 +# define BOOST_PP_TUPLE_ELEM_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e53 +# define BOOST_PP_TUPLE_ELEM_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e54 +# define BOOST_PP_TUPLE_ELEM_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e55 +# define BOOST_PP_TUPLE_ELEM_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e56 +# define BOOST_PP_TUPLE_ELEM_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e57 +# define BOOST_PP_TUPLE_ELEM_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e58 +# define BOOST_PP_TUPLE_ELEM_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e59 +# define BOOST_PP_TUPLE_ELEM_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e60 +# define BOOST_PP_TUPLE_ELEM_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e61 +# define BOOST_PP_TUPLE_ELEM_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e62 +# define BOOST_PP_TUPLE_ELEM_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e63 +# endif +# +# /* directly used elsewhere in Boost... */ +# +# define BOOST_PP_TUPLE_ELEM_1_0(a) a +# +# define BOOST_PP_TUPLE_ELEM_2_0(a, b) a +# define BOOST_PP_TUPLE_ELEM_2_1(a, b) b +# +# define BOOST_PP_TUPLE_ELEM_3_0(a, b, c) a +# define BOOST_PP_TUPLE_ELEM_3_1(a, b, c) b +# define BOOST_PP_TUPLE_ELEM_3_2(a, b, c) c +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/tuple/rem.hpp b/ThirdParty/boost-Subset/boost/preprocessor/tuple/rem.hpp new file mode 100644 index 0000000000..c934447d5a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/tuple/rem.hpp @@ -0,0 +1,149 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002-2011. * +# * (C) Copyright Edward Diener 2011,2013. * +# * Distributed under the Boost Software License, Version 1.0. (See * +# * accompanying file LICENSE_1_0.txt or copy at * +# * http://www.boost.org/LICENSE_1_0.txt) * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_TUPLE_REM_HPP +# define BOOST_PREPROCESSOR_TUPLE_REM_HPP +# +# include +# include +# include +# include +# include +# +# /* BOOST_PP_REM */ +# +# if BOOST_PP_VARIADICS +# if BOOST_PP_VARIADICS_MSVC + /* To be used internally when __VA_ARGS__ could be empty ( or is a single element ) */ +# define BOOST_PP_REM_CAT(...) BOOST_PP_CAT(__VA_ARGS__,) +# endif +# define BOOST_PP_REM(...) __VA_ARGS__ +# else +# define BOOST_PP_REM(x) x +# endif +# +# /* BOOST_PP_TUPLE_REM */ +# +/* + VC++8.0 cannot handle the variadic version of BOOST_PP_TUPLE_REM(size) +*/ +# if BOOST_PP_VARIADICS && !(BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400) +# if BOOST_PP_VARIADICS_MSVC + /* To be used internally when the size could be 0 ( or 1 ) */ +# define BOOST_PP_TUPLE_REM_CAT(size) BOOST_PP_REM_CAT +# endif +# define BOOST_PP_TUPLE_REM(size) BOOST_PP_REM +# else +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_TUPLE_REM(size) BOOST_PP_TUPLE_REM_I(size) +# else +# define BOOST_PP_TUPLE_REM(size) BOOST_PP_TUPLE_REM_OO((size)) +# define BOOST_PP_TUPLE_REM_OO(par) BOOST_PP_TUPLE_REM_I ## par +# endif +# define BOOST_PP_TUPLE_REM_I(size) BOOST_PP_TUPLE_REM_ ## size +# endif +# define BOOST_PP_TUPLE_REM_0() +# define BOOST_PP_TUPLE_REM_1(e0) e0 +# define BOOST_PP_TUPLE_REM_2(e0, e1) e0, e1 +# define BOOST_PP_TUPLE_REM_3(e0, e1, e2) e0, e1, e2 +# define BOOST_PP_TUPLE_REM_4(e0, e1, e2, e3) e0, e1, e2, e3 +# define BOOST_PP_TUPLE_REM_5(e0, e1, e2, e3, e4) e0, e1, e2, e3, e4 +# define BOOST_PP_TUPLE_REM_6(e0, e1, e2, e3, e4, e5) e0, e1, e2, e3, e4, e5 +# define BOOST_PP_TUPLE_REM_7(e0, e1, e2, e3, e4, e5, e6) e0, e1, e2, e3, e4, e5, e6 +# define BOOST_PP_TUPLE_REM_8(e0, e1, e2, e3, e4, e5, e6, e7) e0, e1, e2, e3, e4, e5, e6, e7 +# define BOOST_PP_TUPLE_REM_9(e0, e1, e2, e3, e4, e5, e6, e7, e8) e0, e1, e2, e3, e4, e5, e6, e7, e8 +# define BOOST_PP_TUPLE_REM_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9 +# define BOOST_PP_TUPLE_REM_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10 +# define BOOST_PP_TUPLE_REM_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11 +# define BOOST_PP_TUPLE_REM_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12 +# define BOOST_PP_TUPLE_REM_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13 +# define BOOST_PP_TUPLE_REM_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14 +# define BOOST_PP_TUPLE_REM_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15 +# define BOOST_PP_TUPLE_REM_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16 +# define BOOST_PP_TUPLE_REM_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17 +# define BOOST_PP_TUPLE_REM_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18 +# define BOOST_PP_TUPLE_REM_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19 +# define BOOST_PP_TUPLE_REM_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20 +# define BOOST_PP_TUPLE_REM_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21 +# define BOOST_PP_TUPLE_REM_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22 +# define BOOST_PP_TUPLE_REM_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23 +# define BOOST_PP_TUPLE_REM_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24 +# define BOOST_PP_TUPLE_REM_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25 +# define BOOST_PP_TUPLE_REM_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26 +# define BOOST_PP_TUPLE_REM_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27 +# define BOOST_PP_TUPLE_REM_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28 +# define BOOST_PP_TUPLE_REM_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29 +# define BOOST_PP_TUPLE_REM_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30 +# define BOOST_PP_TUPLE_REM_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31 +# define BOOST_PP_TUPLE_REM_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32 +# define BOOST_PP_TUPLE_REM_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33 +# define BOOST_PP_TUPLE_REM_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34 +# define BOOST_PP_TUPLE_REM_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35 +# define BOOST_PP_TUPLE_REM_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36 +# define BOOST_PP_TUPLE_REM_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37 +# define BOOST_PP_TUPLE_REM_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38 +# define BOOST_PP_TUPLE_REM_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39 +# define BOOST_PP_TUPLE_REM_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40 +# define BOOST_PP_TUPLE_REM_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41 +# define BOOST_PP_TUPLE_REM_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42 +# define BOOST_PP_TUPLE_REM_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43 +# define BOOST_PP_TUPLE_REM_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44 +# define BOOST_PP_TUPLE_REM_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45 +# define BOOST_PP_TUPLE_REM_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46 +# define BOOST_PP_TUPLE_REM_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47 +# define BOOST_PP_TUPLE_REM_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48 +# define BOOST_PP_TUPLE_REM_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49 +# define BOOST_PP_TUPLE_REM_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50 +# define BOOST_PP_TUPLE_REM_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51 +# define BOOST_PP_TUPLE_REM_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52 +# define BOOST_PP_TUPLE_REM_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53 +# define BOOST_PP_TUPLE_REM_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54 +# define BOOST_PP_TUPLE_REM_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55 +# define BOOST_PP_TUPLE_REM_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56 +# define BOOST_PP_TUPLE_REM_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57 +# define BOOST_PP_TUPLE_REM_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58 +# define BOOST_PP_TUPLE_REM_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59 +# define BOOST_PP_TUPLE_REM_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60 +# define BOOST_PP_TUPLE_REM_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61 +# define BOOST_PP_TUPLE_REM_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62 +# define BOOST_PP_TUPLE_REM_64(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63 +# +# /* BOOST_PP_TUPLE_REM_CTOR */ +# +# if BOOST_PP_VARIADICS +# if BOOST_PP_VARIADICS_MSVC +# define BOOST_PP_TUPLE_REM_CTOR(...) BOOST_PP_TUPLE_REM_CTOR_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REM_CTOR_O_, __VA_ARGS__), (__VA_ARGS__)) +# define BOOST_PP_TUPLE_REM_CTOR_I(m, args) BOOST_PP_TUPLE_REM_CTOR_II(m, args) +# define BOOST_PP_TUPLE_REM_CTOR_II(m, args) BOOST_PP_CAT(m ## args,) +# define BOOST_PP_TUPLE_REM_CTOR_O_1(tuple) BOOST_PP_EXPAND(BOOST_PP_TUPLE_IS_SINGLE_RETURN(BOOST_PP_REM_CAT,BOOST_PP_REM,tuple) tuple) +# else +# define BOOST_PP_TUPLE_REM_CTOR(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REM_CTOR_O_, __VA_ARGS__)(__VA_ARGS__) +# define BOOST_PP_TUPLE_REM_CTOR_O_1(tuple) BOOST_PP_REM tuple +# endif +# define BOOST_PP_TUPLE_REM_CTOR_O_2(size, tuple) BOOST_PP_TUPLE_REM_CTOR_O_1(tuple) +# else +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_TUPLE_REM_CTOR(size, tuple) BOOST_PP_TUPLE_REM_CTOR_I(BOOST_PP_TUPLE_REM(size), tuple) +# else +# define BOOST_PP_TUPLE_REM_CTOR(size, tuple) BOOST_PP_TUPLE_REM_CTOR_D(size, tuple) +# define BOOST_PP_TUPLE_REM_CTOR_D(size, tuple) BOOST_PP_TUPLE_REM_CTOR_I(BOOST_PP_TUPLE_REM(size), tuple) +# endif +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_TUPLE_REM_CTOR_I(ext, tuple) ext tuple +# else +# define BOOST_PP_TUPLE_REM_CTOR_I(ext, tuple) BOOST_PP_TUPLE_REM_CTOR_OO((ext, tuple)) +# define BOOST_PP_TUPLE_REM_CTOR_OO(par) BOOST_PP_TUPLE_REM_CTOR_II ## par +# define BOOST_PP_TUPLE_REM_CTOR_II(ext, tuple) ext ## tuple +# endif +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/tuple/size.hpp b/ThirdParty/boost-Subset/boost/preprocessor/tuple/size.hpp new file mode 100644 index 0000000000..675c065166 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/tuple/size.hpp @@ -0,0 +1,28 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Edward Diener 2011. * +# * (C) Copyright Paul Mensonides 2011. * +# * Distributed under the Boost Software License, Version 1.0. (See * +# * accompanying file LICENSE_1_0.txt or copy at * +# * http://www.boost.org/LICENSE_1_0.txt) * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_TUPLE_SIZE_HPP +# define BOOST_PREPROCESSOR_TUPLE_SIZE_HPP +# +# include +# include +# include +# +# if BOOST_PP_VARIADICS +# if BOOST_PP_VARIADICS_MSVC +# define BOOST_PP_TUPLE_SIZE(tuple) BOOST_PP_CAT(BOOST_PP_VARIADIC_SIZE tuple,) +# else +# define BOOST_PP_TUPLE_SIZE(tuple) BOOST_PP_VARIADIC_SIZE tuple +# endif +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/tuple/to_list.hpp b/ThirdParty/boost-Subset/boost/preprocessor/tuple/to_list.hpp new file mode 100644 index 0000000000..da7828f7d0 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/tuple/to_list.hpp @@ -0,0 +1,118 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002-2011) */ +# /* Revised by Edward Diener (2011) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_TUPLE_TO_LIST_HPP +# define BOOST_PREPROCESSOR_TUPLE_TO_LIST_HPP +# +# include +# include +# include +# include +# include +# +# /* BOOST_PP_TUPLE_TO_LIST */ +# +# if BOOST_PP_VARIADICS +# if BOOST_PP_VARIADICS_MSVC +# define BOOST_PP_TUPLE_TO_LIST(...) BOOST_PP_TUPLE_TO_LIST_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_LIST_O_, __VA_ARGS__), (__VA_ARGS__)) +# define BOOST_PP_TUPLE_TO_LIST_I(m, args) BOOST_PP_TUPLE_TO_LIST_II(m, args) +# define BOOST_PP_TUPLE_TO_LIST_II(m, args) BOOST_PP_CAT(m ## args,) +# define BOOST_PP_TUPLE_TO_LIST_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_LIST_, BOOST_PP_TUPLE_SIZE(tuple)) tuple +# else +# define BOOST_PP_TUPLE_TO_LIST(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_LIST_O_, __VA_ARGS__)(__VA_ARGS__) +# define BOOST_PP_TUPLE_TO_LIST_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_LIST_, BOOST_PP_VARIADIC_SIZE tuple) tuple +# endif +# define BOOST_PP_TUPLE_TO_LIST_O_2(size, tuple) BOOST_PP_TUPLE_TO_LIST_O_1(tuple) +# else +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_TUPLE_TO_LIST(size, tuple) BOOST_PP_TUPLE_TO_LIST_I(size, tuple) +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_TUPLE_TO_LIST_I(s, t) BOOST_PP_TUPLE_TO_LIST_ ## s t +# else +# define BOOST_PP_TUPLE_TO_LIST_I(s, t) BOOST_PP_TUPLE_TO_LIST_II(BOOST_PP_TUPLE_TO_LIST_ ## s t) +# define BOOST_PP_TUPLE_TO_LIST_II(res) res +# endif +# else +# define BOOST_PP_TUPLE_TO_LIST(size, tuple) BOOST_PP_TUPLE_TO_LIST_OO((size, tuple)) +# define BOOST_PP_TUPLE_TO_LIST_OO(par) BOOST_PP_TUPLE_TO_LIST_I ## par +# define BOOST_PP_TUPLE_TO_LIST_I(s, t) BOOST_PP_TUPLE_TO_LIST_ ## s ## t +# endif +# endif +# +# define BOOST_PP_TUPLE_TO_LIST_1(e0) (e0, BOOST_PP_NIL) +# define BOOST_PP_TUPLE_TO_LIST_2(e0, e1) (e0, (e1, BOOST_PP_NIL)) +# define BOOST_PP_TUPLE_TO_LIST_3(e0, e1, e2) (e0, (e1, (e2, BOOST_PP_NIL))) +# define BOOST_PP_TUPLE_TO_LIST_4(e0, e1, e2, e3) (e0, (e1, (e2, (e3, BOOST_PP_NIL)))) +# define BOOST_PP_TUPLE_TO_LIST_5(e0, e1, e2, e3, e4) (e0, (e1, (e2, (e3, (e4, BOOST_PP_NIL))))) +# define BOOST_PP_TUPLE_TO_LIST_6(e0, e1, e2, e3, e4, e5) (e0, (e1, (e2, (e3, (e4, (e5, BOOST_PP_NIL)))))) +# define BOOST_PP_TUPLE_TO_LIST_7(e0, e1, e2, e3, e4, e5, e6) (e0, (e1, (e2, (e3, (e4, (e5, (e6, BOOST_PP_NIL))))))) +# define BOOST_PP_TUPLE_TO_LIST_8(e0, e1, e2, e3, e4, e5, e6, e7) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, BOOST_PP_NIL)))))))) +# define BOOST_PP_TUPLE_TO_LIST_9(e0, e1, e2, e3, e4, e5, e6, e7, e8) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, BOOST_PP_NIL))))))))) +# define BOOST_PP_TUPLE_TO_LIST_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, BOOST_PP_NIL)))))))))) +# define BOOST_PP_TUPLE_TO_LIST_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, BOOST_PP_NIL))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, BOOST_PP_NIL)))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, BOOST_PP_NIL))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, BOOST_PP_NIL)))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, BOOST_PP_NIL))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, BOOST_PP_NIL)))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, BOOST_PP_NIL))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, BOOST_PP_NIL)))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, BOOST_PP_NIL))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, BOOST_PP_NIL)))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, BOOST_PP_NIL))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, BOOST_PP_NIL)))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, BOOST_PP_NIL))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, BOOST_PP_NIL)))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, BOOST_PP_NIL))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, BOOST_PP_NIL)))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, BOOST_PP_NIL))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, BOOST_PP_NIL)))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, BOOST_PP_NIL))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, BOOST_PP_NIL)))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, BOOST_PP_NIL))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, BOOST_PP_NIL)))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, BOOST_PP_NIL))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, BOOST_PP_NIL)))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, BOOST_PP_NIL))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, (e57, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, (e57, (e58, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, (e57, (e58, (e59, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, (e57, (e58, (e59, (e60, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, (e57, (e58, (e59, (e60, (e61, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, (e57, (e58, (e59, (e60, (e61, (e62, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +# define BOOST_PP_TUPLE_TO_LIST_64(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, (e57, (e58, (e59, (e60, (e61, (e62, (e63, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/variadic/elem.hpp b/ThirdParty/boost-Subset/boost/preprocessor/variadic/elem.hpp new file mode 100644 index 0000000000..be38a9429b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/variadic/elem.hpp @@ -0,0 +1,94 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Edward Diener 2011. * +# * (C) Copyright Paul Mensonides 2011. * +# * Distributed under the Boost Software License, Version 1.0. (See * +# * accompanying file LICENSE_1_0.txt or copy at * +# * http://www.boost.org/LICENSE_1_0.txt) * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_VARIADIC_ELEM_HPP +# define BOOST_PREPROCESSOR_VARIADIC_ELEM_HPP +# +# include +# include +# +# /* BOOST_PP_VARIADIC_ELEM */ +# +# if BOOST_PP_VARIADICS +# if BOOST_PP_VARIADICS_MSVC +# define BOOST_PP_VARIADIC_ELEM(n, ...) BOOST_PP_VARIADIC_ELEM_I(n,__VA_ARGS__) +# define BOOST_PP_VARIADIC_ELEM_I(n, ...) BOOST_PP_CAT(BOOST_PP_CAT(BOOST_PP_VARIADIC_ELEM_, n)(__VA_ARGS__,),) +# else +# define BOOST_PP_VARIADIC_ELEM(n, ...) BOOST_PP_CAT(BOOST_PP_VARIADIC_ELEM_, n)(__VA_ARGS__,) +# endif +# define BOOST_PP_VARIADIC_ELEM_0(e0, ...) e0 +# define BOOST_PP_VARIADIC_ELEM_1(e0, e1, ...) e1 +# define BOOST_PP_VARIADIC_ELEM_2(e0, e1, e2, ...) e2 +# define BOOST_PP_VARIADIC_ELEM_3(e0, e1, e2, e3, ...) e3 +# define BOOST_PP_VARIADIC_ELEM_4(e0, e1, e2, e3, e4, ...) e4 +# define BOOST_PP_VARIADIC_ELEM_5(e0, e1, e2, e3, e4, e5, ...) e5 +# define BOOST_PP_VARIADIC_ELEM_6(e0, e1, e2, e3, e4, e5, e6, ...) e6 +# define BOOST_PP_VARIADIC_ELEM_7(e0, e1, e2, e3, e4, e5, e6, e7, ...) e7 +# define BOOST_PP_VARIADIC_ELEM_8(e0, e1, e2, e3, e4, e5, e6, e7, e8, ...) e8 +# define BOOST_PP_VARIADIC_ELEM_9(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, ...) e9 +# define BOOST_PP_VARIADIC_ELEM_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, ...) e10 +# define BOOST_PP_VARIADIC_ELEM_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, ...) e11 +# define BOOST_PP_VARIADIC_ELEM_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, ...) e12 +# define BOOST_PP_VARIADIC_ELEM_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, ...) e13 +# define BOOST_PP_VARIADIC_ELEM_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, ...) e14 +# define BOOST_PP_VARIADIC_ELEM_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, ...) e15 +# define BOOST_PP_VARIADIC_ELEM_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, ...) e16 +# define BOOST_PP_VARIADIC_ELEM_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, ...) e17 +# define BOOST_PP_VARIADIC_ELEM_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, ...) e18 +# define BOOST_PP_VARIADIC_ELEM_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, ...) e19 +# define BOOST_PP_VARIADIC_ELEM_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, ...) e20 +# define BOOST_PP_VARIADIC_ELEM_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, ...) e21 +# define BOOST_PP_VARIADIC_ELEM_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, ...) e22 +# define BOOST_PP_VARIADIC_ELEM_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, ...) e23 +# define BOOST_PP_VARIADIC_ELEM_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, ...) e24 +# define BOOST_PP_VARIADIC_ELEM_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, ...) e25 +# define BOOST_PP_VARIADIC_ELEM_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, ...) e26 +# define BOOST_PP_VARIADIC_ELEM_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, ...) e27 +# define BOOST_PP_VARIADIC_ELEM_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, ...) e28 +# define BOOST_PP_VARIADIC_ELEM_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, ...) e29 +# define BOOST_PP_VARIADIC_ELEM_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, ...) e30 +# define BOOST_PP_VARIADIC_ELEM_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, ...) e31 +# define BOOST_PP_VARIADIC_ELEM_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, ...) e32 +# define BOOST_PP_VARIADIC_ELEM_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, ...) e33 +# define BOOST_PP_VARIADIC_ELEM_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, ...) e34 +# define BOOST_PP_VARIADIC_ELEM_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, ...) e35 +# define BOOST_PP_VARIADIC_ELEM_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, ...) e36 +# define BOOST_PP_VARIADIC_ELEM_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, ...) e37 +# define BOOST_PP_VARIADIC_ELEM_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, ...) e38 +# define BOOST_PP_VARIADIC_ELEM_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, ...) e39 +# define BOOST_PP_VARIADIC_ELEM_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, ...) e40 +# define BOOST_PP_VARIADIC_ELEM_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, ...) e41 +# define BOOST_PP_VARIADIC_ELEM_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, ...) e42 +# define BOOST_PP_VARIADIC_ELEM_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, ...) e43 +# define BOOST_PP_VARIADIC_ELEM_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, ...) e44 +# define BOOST_PP_VARIADIC_ELEM_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, ...) e45 +# define BOOST_PP_VARIADIC_ELEM_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, ...) e46 +# define BOOST_PP_VARIADIC_ELEM_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, ...) e47 +# define BOOST_PP_VARIADIC_ELEM_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, ...) e48 +# define BOOST_PP_VARIADIC_ELEM_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, ...) e49 +# define BOOST_PP_VARIADIC_ELEM_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, ...) e50 +# define BOOST_PP_VARIADIC_ELEM_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, ...) e51 +# define BOOST_PP_VARIADIC_ELEM_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, ...) e52 +# define BOOST_PP_VARIADIC_ELEM_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, ...) e53 +# define BOOST_PP_VARIADIC_ELEM_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, ...) e54 +# define BOOST_PP_VARIADIC_ELEM_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, ...) e55 +# define BOOST_PP_VARIADIC_ELEM_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, ...) e56 +# define BOOST_PP_VARIADIC_ELEM_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, ...) e57 +# define BOOST_PP_VARIADIC_ELEM_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, ...) e58 +# define BOOST_PP_VARIADIC_ELEM_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, ...) e59 +# define BOOST_PP_VARIADIC_ELEM_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, ...) e60 +# define BOOST_PP_VARIADIC_ELEM_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, ...) e61 +# define BOOST_PP_VARIADIC_ELEM_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, ...) e62 +# define BOOST_PP_VARIADIC_ELEM_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63, ...) e63 +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/preprocessor/variadic/size.hpp b/ThirdParty/boost-Subset/boost/preprocessor/variadic/size.hpp new file mode 100644 index 0000000000..b92a5ffe06 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/preprocessor/variadic/size.hpp @@ -0,0 +1,30 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Edward Diener 2011. * +# * (C) Copyright Paul Mensonides 2011. * +# * Distributed under the Boost Software License, Version 1.0. (See * +# * accompanying file LICENSE_1_0.txt or copy at * +# * http://www.boost.org/LICENSE_1_0.txt) * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_VARIADIC_SIZE_HPP +# define BOOST_PREPROCESSOR_VARIADIC_SIZE_HPP +# +# include +# include +# +# /* BOOST_PP_VARIADIC_SIZE */ +# +# if BOOST_PP_VARIADICS +# if BOOST_PP_VARIADICS_MSVC +# define BOOST_PP_VARIADIC_SIZE(...) BOOST_PP_CAT(BOOST_PP_VARIADIC_SIZE_I(__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,),) +# else +# define BOOST_PP_VARIADIC_SIZE(...) BOOST_PP_VARIADIC_SIZE_I(__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,) +# endif +# define BOOST_PP_VARIADIC_SIZE_I(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63, size, ...) size +# endif +# +# endif diff --git a/ThirdParty/boost-Subset/boost/progress.hpp b/ThirdParty/boost-Subset/boost/progress.hpp new file mode 100644 index 0000000000..62bece0839 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/progress.hpp @@ -0,0 +1,143 @@ +// boost progress.hpp header file ------------------------------------------// + +// Copyright Beman Dawes 1994-99. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/timer for documentation. + +// Revision History +// 1 Dec 01 Add leading progress display strings (suggested by Toon Knapen) +// 20 May 01 Introduce several static_casts<> to eliminate warning messages +// (Fixed by Beman, reported by Herve Bronnimann) +// 12 Jan 01 Change to inline implementation to allow use without library +// builds. See docs for more rationale. (Beman Dawes) +// 22 Jul 99 Name changed to .hpp +// 16 Jul 99 Second beta +// 6 Jul 99 Initial boost version + +#ifndef BOOST_PROGRESS_HPP +#define BOOST_PROGRESS_HPP + +#include +#include +#include // for uintmax_t +#include // for ostream, cout, etc +#include // for string + +namespace boost { + +// progress_timer ----------------------------------------------------------// + +// A progress_timer behaves like a timer except that the destructor displays +// an elapsed time message at an appropriate place in an appropriate form. + +class progress_timer : public timer, private noncopyable +{ + + public: + explicit progress_timer( std::ostream & os = std::cout ) + // os is hint; implementation may ignore, particularly in embedded systems + : timer(), noncopyable(), m_os(os) {} + ~progress_timer() + { + // A) Throwing an exception from a destructor is a Bad Thing. + // B) The progress_timer destructor does output which may throw. + // C) A progress_timer is usually not critical to the application. + // Therefore, wrap the I/O in a try block, catch and ignore all exceptions. + try + { + // use istream instead of ios_base to workaround GNU problem (Greg Chicares) + std::istream::fmtflags old_flags = m_os.setf( std::istream::fixed, + std::istream::floatfield ); + std::streamsize old_prec = m_os.precision( 2 ); + m_os << elapsed() << " s\n" // "s" is System International d'Unites std + << std::endl; + m_os.flags( old_flags ); + m_os.precision( old_prec ); + } + + catch (...) {} // eat any exceptions + } // ~progress_timer + + private: + std::ostream & m_os; +}; + + +// progress_display --------------------------------------------------------// + +// progress_display displays an appropriate indication of +// progress at an appropriate place in an appropriate form. + +// NOTE: (Jan 12, 2001) Tried to change unsigned long to boost::uintmax_t, but +// found some compilers couldn't handle the required conversion to double. +// Reverted to unsigned long until the compilers catch up. + +class progress_display : private noncopyable +{ + public: + explicit progress_display( unsigned long expected_count_, + std::ostream & os = std::cout, + const std::string & s1 = "\n", //leading strings + const std::string & s2 = "", + const std::string & s3 = "" ) + // os is hint; implementation may ignore, particularly in embedded systems + : noncopyable(), m_os(os), m_s1(s1), m_s2(s2), m_s3(s3) { restart(expected_count_); } + + void restart( unsigned long expected_count_ ) + // Effects: display appropriate scale + // Postconditions: count()==0, expected_count()==expected_count_ + { + _count = _next_tic_count = _tic = 0; + _expected_count = expected_count_; + + m_os << m_s1 << "0% 10 20 30 40 50 60 70 80 90 100%\n" + << m_s2 << "|----|----|----|----|----|----|----|----|----|----|" + << std::endl // endl implies flush, which ensures display + << m_s3; + if ( !_expected_count ) _expected_count = 1; // prevent divide by zero + } // restart + + unsigned long operator+=( unsigned long increment ) + // Effects: Display appropriate progress tic if needed. + // Postconditions: count()== original count() + increment + // Returns: count(). + { + if ( (_count += increment) >= _next_tic_count ) { display_tic(); } + return _count; + } + + unsigned long operator++() { return operator+=( 1 ); } + unsigned long count() const { return _count; } + unsigned long expected_count() const { return _expected_count; } + + private: + std::ostream & m_os; // may not be present in all imps + const std::string m_s1; // string is more general, safer than + const std::string m_s2; // const char *, and efficiency or size are + const std::string m_s3; // not issues + + unsigned long _count, _expected_count, _next_tic_count; + unsigned int _tic; + void display_tic() + { + // use of floating point ensures that both large and small counts + // work correctly. static_cast<>() is also used several places + // to suppress spurious compiler warnings. + unsigned int tics_needed = + static_cast( + (static_cast(_count)/_expected_count)*50.0 ); + do { m_os << '*' << std::flush; } while ( ++_tic < tics_needed ); + _next_tic_count = + static_cast((_tic/50.0)*_expected_count); + if ( _count == _expected_count ) { + if ( _tic < 51 ) m_os << '*'; + m_os << std::endl; + } + } // display_tic +}; + +} // namespace boost + +#endif // BOOST_PROGRESS_HPP diff --git a/ThirdParty/boost-Subset/boost/range/algorithm/equal.hpp b/ThirdParty/boost-Subset/boost/range/algorithm/equal.hpp new file mode 100644 index 0000000000..2b44f3bca3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/algorithm/equal.hpp @@ -0,0 +1,200 @@ +// Boost.Range library +// +// Copyright Neil Groves 2009. +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// +#ifndef BOOST_RANGE_ALGORITHM_EQUAL_HPP_INCLUDED +#define BOOST_RANGE_ALGORITHM_EQUAL_HPP_INCLUDED + +#include +#include +#include + +namespace boost +{ + namespace range_detail + { + // An implementation of equality comparison that is optimized for iterator + // traversal categories less than RandomAccessTraversal. + template< class SinglePassTraversalReadableIterator1, + class SinglePassTraversalReadableIterator2, + class IteratorCategoryTag1, + class IteratorCategoryTag2 > + inline bool equal_impl( SinglePassTraversalReadableIterator1 first1, + SinglePassTraversalReadableIterator1 last1, + SinglePassTraversalReadableIterator2 first2, + SinglePassTraversalReadableIterator2 last2, + IteratorCategoryTag1, + IteratorCategoryTag2 ) + { + for (;;) + { + // If we have reached the end of the left range then this is + // the end of the loop. They are equal if and only if we have + // simultaneously reached the end of the right range. + if (first1 == last1) + return first2 == last2; + + // If we have reached the end of the right range at this line + // it indicates that the right range is shorter than the left + // and hence the result is false. + if (first2 == last2) + return false; + + // continue looping if and only if the values are equal + if (*first1 != *first2) + break; + + ++first1; + ++first2; + } + + // Reaching this line in the algorithm indicates that a value + // inequality has been detected. + return false; + } + + template< class SinglePassTraversalReadableIterator1, + class SinglePassTraversalReadableIterator2, + class IteratorCategoryTag1, + class IteratorCategoryTag2, + class BinaryPredicate > + inline bool equal_impl( SinglePassTraversalReadableIterator1 first1, + SinglePassTraversalReadableIterator1 last1, + SinglePassTraversalReadableIterator2 first2, + SinglePassTraversalReadableIterator2 last2, + BinaryPredicate pred, + IteratorCategoryTag1, + IteratorCategoryTag2 ) + { + for (;;) + { + // If we have reached the end of the left range then this is + // the end of the loop. They are equal if and only if we have + // simultaneously reached the end of the right range. + if (first1 == last1) + return first2 == last2; + + // If we have reached the end of the right range at this line + // it indicates that the right range is shorter than the left + // and hence the result is false. + if (first2 == last2) + return false; + + // continue looping if and only if the values are equal + if (!pred(*first1, *first2)) + break; + + ++first1; + ++first2; + } + + // Reaching this line in the algorithm indicates that a value + // inequality has been detected. + return false; + } + + // An implementation of equality comparison that is optimized for + // random access iterators. + template< class RandomAccessTraversalReadableIterator1, + class RandomAccessTraversalReadableIterator2 > + inline bool equal_impl( RandomAccessTraversalReadableIterator1 first1, + RandomAccessTraversalReadableIterator1 last1, + RandomAccessTraversalReadableIterator2 first2, + RandomAccessTraversalReadableIterator2 last2, + std::random_access_iterator_tag, + std::random_access_iterator_tag ) + { + return ((last1 - first1) == (last2 - first2)) + && std::equal(first1, last1, first2); + } + + template< class RandomAccessTraversalReadableIterator1, + class RandomAccessTraversalReadableIterator2, + class BinaryPredicate > + inline bool equal_impl( RandomAccessTraversalReadableIterator1 first1, + RandomAccessTraversalReadableIterator1 last1, + RandomAccessTraversalReadableIterator2 first2, + RandomAccessTraversalReadableIterator2 last2, + BinaryPredicate pred, + std::random_access_iterator_tag, + std::random_access_iterator_tag ) + { + return ((last1 - first1) == (last2 - first2)) + && std::equal(first1, last1, first2, pred); + } + + template< class SinglePassTraversalReadableIterator1, + class SinglePassTraversalReadableIterator2 > + inline bool equal( SinglePassTraversalReadableIterator1 first1, + SinglePassTraversalReadableIterator1 last1, + SinglePassTraversalReadableIterator2 first2, + SinglePassTraversalReadableIterator2 last2 ) + { + BOOST_DEDUCED_TYPENAME std::iterator_traits< SinglePassTraversalReadableIterator1 >::iterator_category tag1; + BOOST_DEDUCED_TYPENAME std::iterator_traits< SinglePassTraversalReadableIterator2 >::iterator_category tag2; + + return equal_impl(first1, last1, first2, last2, tag1, tag2); + } + + template< class SinglePassTraversalReadableIterator1, + class SinglePassTraversalReadableIterator2, + class BinaryPredicate > + inline bool equal( SinglePassTraversalReadableIterator1 first1, + SinglePassTraversalReadableIterator1 last1, + SinglePassTraversalReadableIterator2 first2, + SinglePassTraversalReadableIterator2 last2, + BinaryPredicate pred ) + { + BOOST_DEDUCED_TYPENAME std::iterator_traits< SinglePassTraversalReadableIterator1 >::iterator_category tag1; + BOOST_DEDUCED_TYPENAME std::iterator_traits< SinglePassTraversalReadableIterator2 >::iterator_category tag2; + + return equal_impl(first1, last1, first2, last2, pred, tag1, tag2); + } + + } // namespace range_detail + + namespace range + { + + /// \brief template function equal + /// + /// range-based version of the equal std algorithm + /// + /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept + /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept + /// \pre BinaryPredicate is a model of the BinaryPredicateConcept + template< class SinglePassRange1, class SinglePassRange2 > + inline bool equal( const SinglePassRange1& rng1, const SinglePassRange2& rng2 ) + { + BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept )); + BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept )); + + return ::boost::range_detail::equal( + ::boost::begin(rng1), ::boost::end(rng1), + ::boost::begin(rng2), ::boost::end(rng2) ); + } + + /// \overload + template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate > + inline bool equal( const SinglePassRange1& rng1, const SinglePassRange2& rng2, + BinaryPredicate pred ) + { + BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept )); + BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept )); + + return ::boost::range_detail::equal( + ::boost::begin(rng1), ::boost::end(rng1), + ::boost::begin(rng2), ::boost::end(rng2), + pred); + } + + } // namespace range + using ::boost::range::equal; +} // namespace boost + +#endif // include guard diff --git a/ThirdParty/boost-Subset/boost/range/begin.hpp b/ThirdParty/boost-Subset/boost/range/begin.hpp new file mode 100644 index 0000000000..ba5a73b92d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/begin.hpp @@ -0,0 +1,135 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_BEGIN_HPP +#define BOOST_RANGE_BEGIN_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include + +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING +#include +#else + +#include + +namespace boost +{ + +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +namespace range_detail +{ +#endif + + ////////////////////////////////////////////////////////////////////// + // primary template + ////////////////////////////////////////////////////////////////////// + + template< typename C > + inline BOOST_DEDUCED_TYPENAME range_iterator::type + range_begin( C& c ) + { + // + // If you get a compile-error here, it is most likely because + // you have not implemented range_begin() properly in + // the namespace of C + // + return c.begin(); + } + + ////////////////////////////////////////////////////////////////////// + // pair + ////////////////////////////////////////////////////////////////////// + + template< typename Iterator > + inline Iterator range_begin( const std::pair& p ) + { + return p.first; + } + + template< typename Iterator > + inline Iterator range_begin( std::pair& p ) + { + return p.first; + } + + ////////////////////////////////////////////////////////////////////// + // array + ////////////////////////////////////////////////////////////////////// + + // + // May this be discarded? Or is it needed for bad compilers? + // + template< typename T, std::size_t sz > + inline const T* range_begin( const T (&a)[sz] ) + { + return a; + } + + template< typename T, std::size_t sz > + inline T* range_begin( T (&a)[sz] ) + { + return a; + } + + +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +} // namespace 'range_detail' +#endif + +// Use a ADL namespace barrier to avoid ambiguity with other unqualified +// calls. This is particularly important with C++0x encouraging +// unqualified calls to begin/end. +namespace range_adl_barrier +{ + +template< class T > +inline BOOST_DEDUCED_TYPENAME range_iterator::type begin( T& r ) +{ +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) + using namespace range_detail; +#endif + return range_begin( r ); +} + +template< class T > +inline BOOST_DEDUCED_TYPENAME range_iterator::type begin( const T& r ) +{ +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) + using namespace range_detail; +#endif + return range_begin( r ); +} + + } // namespace range_adl_barrier +} // namespace boost + +#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING + +namespace boost +{ + namespace range_adl_barrier + { + template< class T > + inline BOOST_DEDUCED_TYPENAME range_iterator::type + const_begin( const T& r ) + { + return boost::range_adl_barrier::begin( r ); + } + } // namespace range_adl_barrier + + using namespace range_adl_barrier; +} // namespace boost + +#endif + diff --git a/ThirdParty/boost-Subset/boost/range/concepts.hpp b/ThirdParty/boost-Subset/boost/range/concepts.hpp new file mode 100644 index 0000000000..3e612a35f9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/concepts.hpp @@ -0,0 +1,386 @@ +// Boost.Range library concept checks +// +// Copyright Neil Groves 2009. Use, modification and distribution +// are subject to the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// Copyright Daniel Walker 2006. Use, modification and distribution +// are subject to the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_CONCEPTS_HPP +#define BOOST_RANGE_CONCEPTS_HPP + +#include +#include +#include +#include +#include +#include +#include +#include + +/*! + * \file + * \brief Concept checks for the Boost Range library. + * + * The structures in this file may be used in conjunction with the + * Boost Concept Check library to insure that the type of a function + * parameter is compatible with a range concept. If not, a meaningful + * compile time error is generated. Checks are provided for the range + * concepts related to iterator traversal categories. For example, the + * following line checks that the type T models the ForwardRange + * concept. + * + * \code + * BOOST_CONCEPT_ASSERT((ForwardRangeConcept)); + * \endcode + * + * A different concept check is required to ensure writeable value + * access. For example to check for a ForwardRange that can be written + * to, the following code is required. + * + * \code + * BOOST_CONCEPT_ASSERT((WriteableForwardRangeConcept)); + * \endcode + * + * \see http://www.boost.org/libs/range/doc/range.html for details + * about range concepts. + * \see http://www.boost.org/libs/iterator/doc/iterator_concepts.html + * for details about iterator concepts. + * \see http://www.boost.org/libs/concept_check/concept_check.htm for + * details about concept checks. + */ + +namespace boost { + + namespace range_detail { + +#ifndef BOOST_RANGE_ENABLE_CONCEPT_ASSERT + +// List broken compiler versions here: +#ifndef __clang__ + #ifdef __GNUC__ + // GNUC 4.2 has strange issues correctly detecting compliance with the Concepts + // hence the least disruptive approach is to turn-off the concept checking for + // this version of the compiler. + #if __GNUC__ == 4 && __GNUC_MINOR__ == 2 + #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 0 + #endif + #endif + + #ifdef __GCCXML__ + // GCC XML, unsurprisingly, has the same issues + #if __GCCXML_GNUC__ == 4 && __GCCXML_GNUC_MINOR__ == 2 + #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 0 + #endif + #endif +#endif + + #ifdef __BORLANDC__ + #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 0 + #endif + + #ifdef __PATHCC__ + #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 0 + #endif + +// Default to using the concept asserts unless we have defined it off +// during the search for black listed compilers. + #ifndef BOOST_RANGE_ENABLE_CONCEPT_ASSERT + #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 1 + #endif + +#endif + +#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT + #define BOOST_RANGE_CONCEPT_ASSERT( x ) BOOST_CONCEPT_ASSERT( x ) +#else + #define BOOST_RANGE_CONCEPT_ASSERT( x ) +#endif + + // Rationale for the inclusion of redefined iterator concept + // classes: + // + // The Range algorithms often do not require that the iterators are + // Assignable or default constructable, but the correct standard + // conformant iterators do require the iterators to be a model of the + // Assignable concept. + // Iterators that contains a functor that is not assignable therefore + // are not correct models of the standard iterator concepts, + // despite being adequate for most algorithms. An example of this + // use case is the combination of the boost::adaptors::filtered + // class with a boost::lambda::bind generated functor. + // Ultimately modeling the range concepts using composition + // with the Boost.Iterator concepts would render the library + // incompatible with many common Boost.Lambda expressions. + template + struct IncrementableIteratorConcept : CopyConstructible + { +#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT + typedef BOOST_DEDUCED_TYPENAME iterator_traversal::type traversal_category; + + BOOST_RANGE_CONCEPT_ASSERT(( + Convertible< + traversal_category, + incrementable_traversal_tag + >)); + + BOOST_CONCEPT_USAGE(IncrementableIteratorConcept) + { + ++i; + (void)i++; + } + private: + Iterator i; +#endif + }; + + template + struct SinglePassIteratorConcept + : IncrementableIteratorConcept + , EqualityComparable + { +#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT + BOOST_RANGE_CONCEPT_ASSERT(( + Convertible< + BOOST_DEDUCED_TYPENAME SinglePassIteratorConcept::traversal_category, + single_pass_traversal_tag + >)); + + BOOST_CONCEPT_USAGE(SinglePassIteratorConcept) + { + Iterator i2(++i); + boost::ignore_unused_variable_warning(i2); + + // deliberately we are loose with the postfix version for the single pass + // iterator due to the commonly poor adherence to the specification means that + // many algorithms would be unusable, whereas actually without the check they + // work + (void)(i++); + + BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::reference r1(*i); + boost::ignore_unused_variable_warning(r1); + + BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::reference r2(*(++i)); + boost::ignore_unused_variable_warning(r2); + } + private: + Iterator i; +#endif + }; + + template + struct ForwardIteratorConcept + : SinglePassIteratorConcept + , DefaultConstructible + { +#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT + typedef BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::difference_type difference_type; + + BOOST_MPL_ASSERT((is_integral)); + BOOST_MPL_ASSERT_RELATION(std::numeric_limits::is_signed, ==, true); + + BOOST_RANGE_CONCEPT_ASSERT(( + Convertible< + BOOST_DEDUCED_TYPENAME ForwardIteratorConcept::traversal_category, + forward_traversal_tag + >)); + + BOOST_CONCEPT_USAGE(ForwardIteratorConcept) + { + // See the above note in the SinglePassIteratorConcept about the handling of the + // postfix increment. Since with forward and better iterators there is no need + // for a proxy, we can sensibly require that the dereference result + // is convertible to reference. + Iterator i2(i++); + boost::ignore_unused_variable_warning(i2); + BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::reference r(*(i++)); + boost::ignore_unused_variable_warning(r); + } + private: + Iterator i; +#endif + }; + + template + struct BidirectionalIteratorConcept + : ForwardIteratorConcept + { + #if BOOST_RANGE_ENABLE_CONCEPT_ASSERT + BOOST_RANGE_CONCEPT_ASSERT(( + Convertible< + BOOST_DEDUCED_TYPENAME BidirectionalIteratorConcept::traversal_category, + bidirectional_traversal_tag + >)); + + BOOST_CONCEPT_USAGE(BidirectionalIteratorConcept) + { + --i; + (void)i--; + } + private: + Iterator i; + #endif + }; + + template + struct RandomAccessIteratorConcept + : BidirectionalIteratorConcept + { + #if BOOST_RANGE_ENABLE_CONCEPT_ASSERT + BOOST_RANGE_CONCEPT_ASSERT(( + Convertible< + BOOST_DEDUCED_TYPENAME RandomAccessIteratorConcept::traversal_category, + random_access_traversal_tag + >)); + + BOOST_CONCEPT_USAGE(RandomAccessIteratorConcept) + { + i += n; + i = i + n; + i = n + i; + i -= n; + i = i - n; + n = i - j; + } + private: + BOOST_DEDUCED_TYPENAME RandomAccessIteratorConcept::difference_type n; + Iterator i; + Iterator j; + #endif + }; + + } // namespace range_detail + + //! Check if a type T models the SinglePassRange range concept. + template + struct SinglePassRangeConcept + { +#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT + // A few compilers don't like the rvalue reference T types so just + // remove it. + typedef BOOST_DEDUCED_TYPENAME remove_reference::type Rng; + + typedef BOOST_DEDUCED_TYPENAME range_iterator< + Rng const + >::type const_iterator; + + typedef BOOST_DEDUCED_TYPENAME range_iterator::type iterator; + + BOOST_RANGE_CONCEPT_ASSERT(( + range_detail::SinglePassIteratorConcept)); + + BOOST_RANGE_CONCEPT_ASSERT(( + range_detail::SinglePassIteratorConcept)); + + BOOST_CONCEPT_USAGE(SinglePassRangeConcept) + { + // This has been modified from assigning to this->i + // (where i was a member variable) to improve + // compatibility with Boost.Lambda + iterator i1 = boost::begin(*m_range); + iterator i2 = boost::end(*m_range); + + boost::ignore_unused_variable_warning(i1); + boost::ignore_unused_variable_warning(i2); + + const_constraints(*m_range); + } + + private: + void const_constraints(const Rng& const_range) + { + const_iterator ci1 = boost::begin(const_range); + const_iterator ci2 = boost::end(const_range); + + boost::ignore_unused_variable_warning(ci1); + boost::ignore_unused_variable_warning(ci2); + } + + // Rationale: + // The type of m_range is T* rather than T because it allows + // T to be an abstract class. The other obvious alternative of + // T& produces a warning on some compilers. + Rng* m_range; +#endif + }; + + //! Check if a type T models the ForwardRange range concept. + template + struct ForwardRangeConcept : SinglePassRangeConcept + { +#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT + BOOST_RANGE_CONCEPT_ASSERT((range_detail::ForwardIteratorConcept)); + BOOST_RANGE_CONCEPT_ASSERT((range_detail::ForwardIteratorConcept)); +#endif + }; + + template + struct WriteableRangeConcept + { +#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT + typedef BOOST_DEDUCED_TYPENAME range_iterator::type iterator; + + BOOST_CONCEPT_USAGE(WriteableRangeConcept) + { + *i = v; + } + private: + iterator i; + BOOST_DEDUCED_TYPENAME range_value::type v; +#endif + }; + + //! Check if a type T models the WriteableForwardRange range concept. + template + struct WriteableForwardRangeConcept + : ForwardRangeConcept + , WriteableRangeConcept + { + }; + + //! Check if a type T models the BidirectionalRange range concept. + template + struct BidirectionalRangeConcept : ForwardRangeConcept + { +#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT + BOOST_RANGE_CONCEPT_ASSERT((range_detail::BidirectionalIteratorConcept)); + BOOST_RANGE_CONCEPT_ASSERT((range_detail::BidirectionalIteratorConcept)); +#endif + }; + + //! Check if a type T models the WriteableBidirectionalRange range concept. + template + struct WriteableBidirectionalRangeConcept + : BidirectionalRangeConcept + , WriteableRangeConcept + { + }; + + //! Check if a type T models the RandomAccessRange range concept. + template + struct RandomAccessRangeConcept : BidirectionalRangeConcept + { +#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT + BOOST_RANGE_CONCEPT_ASSERT((range_detail::RandomAccessIteratorConcept)); + BOOST_RANGE_CONCEPT_ASSERT((range_detail::RandomAccessIteratorConcept)); +#endif + }; + + //! Check if a type T models the WriteableRandomAccessRange range concept. + template + struct WriteableRandomAccessRangeConcept + : RandomAccessRangeConcept + , WriteableRangeConcept + { + }; + +} // namespace boost + +#endif // BOOST_RANGE_CONCEPTS_HPP diff --git a/ThirdParty/boost-Subset/boost/range/config.hpp b/ThirdParty/boost-Subset/boost/range/config.hpp new file mode 100644 index 0000000000..7600a5ff82 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/config.hpp @@ -0,0 +1,56 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_CONFIG_HPP +#define BOOST_RANGE_CONFIG_HPP + +#include + +#if defined(_MSC_VER) +# pragma once +#endif + +#include + +#ifdef BOOST_RANGE_DEDUCED_TYPENAME +#error "macro already defined!" +#endif + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +# define BOOST_RANGE_DEDUCED_TYPENAME typename +#else +#define BOOST_RANGE_DEDUCED_TYPENAME BOOST_DEDUCED_TYPENAME +#endif + +#ifdef BOOST_RANGE_NO_ARRAY_SUPPORT +#error "macro already defined!" +#endif + +#if BOOST_WORKAROUND( __MWERKS__, <= 0x3003 ) +#define BOOST_RANGE_NO_ARRAY_SUPPORT 1 +#endif + +#ifdef BOOST_RANGE_NO_ARRAY_SUPPORT +#define BOOST_RANGE_ARRAY_REF() (boost_range_array) +#define BOOST_RANGE_NO_STATIC_ASSERT +#else +#define BOOST_RANGE_ARRAY_REF() (&boost_range_array) +#endif + +#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7))) +# define BOOST_RANGE_UNUSED __attribute__((unused)) +#else +# define BOOST_RANGE_UNUSED +#endif + + + +#endif + diff --git a/ThirdParty/boost-Subset/boost/range/const_iterator.hpp b/ThirdParty/boost-Subset/boost/range/const_iterator.hpp new file mode 100644 index 0000000000..3413e59195 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/const_iterator.hpp @@ -0,0 +1,76 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_CONST_ITERATOR_HPP +#define BOOST_RANGE_CONST_ITERATOR_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include + +#include +#include +#include +#include +#include +#include + +namespace boost +{ + ////////////////////////////////////////////////////////////////////////// + // default + ////////////////////////////////////////////////////////////////////////// + + namespace range_detail + { + +BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( const_iterator ) + +template< typename C > +struct range_const_iterator + : extract_const_iterator +{}; + +////////////////////////////////////////////////////////////////////////// +// pair +////////////////////////////////////////////////////////////////////////// + +template< typename Iterator > +struct range_const_iterator > +{ + typedef Iterator type; +}; + +////////////////////////////////////////////////////////////////////////// +// array +////////////////////////////////////////////////////////////////////////// + +template< typename T, std::size_t sz > +struct range_const_iterator< T[sz] > +{ + typedef const T* type; +}; + + } // namespace range_detail + +template +struct range_const_iterator + : range_detail::range_const_iterator< + BOOST_DEDUCED_TYPENAME remove_reference::type + > +{ +}; + +} // namespace boost + + +#endif diff --git a/ThirdParty/boost-Subset/boost/range/detail/begin.hpp b/ThirdParty/boost-Subset/boost/range/detail/begin.hpp new file mode 100644 index 0000000000..1d9390ff85 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/detail/begin.hpp @@ -0,0 +1,83 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_DETAIL_BEGIN_HPP +#define BOOST_RANGE_DETAIL_BEGIN_HPP + +#include // BOOST_MSVC +#include +#include +#include + +namespace boost +{ + + namespace range_detail + { + template< typename T > + struct range_begin; + + ////////////////////////////////////////////////////////////////////// + // default + ////////////////////////////////////////////////////////////////////// + + template<> + struct range_begin + { + template< typename C > + static BOOST_RANGE_DEDUCED_TYPENAME range_iterator::type fun( C& c ) + { + return c.begin(); + }; + }; + + ////////////////////////////////////////////////////////////////////// + // pair + ////////////////////////////////////////////////////////////////////// + + template<> + struct range_begin + { + template< typename P > + static BOOST_RANGE_DEDUCED_TYPENAME range_iterator

::type fun( const P& p ) + { + return p.first; + } + }; + + ////////////////////////////////////////////////////////////////////// + // array + ////////////////////////////////////////////////////////////////////// + + template<> + struct range_begin + { + template + static BOOST_RANGE_DEDUCED_TYPENAME range_value::type* fun(T& t) + { + return t; + } + }; + + } // namespace 'range_detail' + + namespace range_adl_barrier + { + template< typename C > + inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator::type + begin( C& c ) + { + return range_detail::range_begin< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range::type >::fun( c ); + } + } +} // namespace 'boost' + + +#endif diff --git a/ThirdParty/boost-Subset/boost/range/detail/common.hpp b/ThirdParty/boost-Subset/boost/range/detail/common.hpp new file mode 100644 index 0000000000..00b665bef8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/detail/common.hpp @@ -0,0 +1,118 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_DETAIL_COMMON_HPP +#define BOOST_RANGE_DETAIL_COMMON_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +////////////////////////////////////////////////////////////////////////////// +// missing partial specialization workaround. +////////////////////////////////////////////////////////////////////////////// + +namespace boost +{ + namespace range_detail + { + // 1 = std containers + // 2 = std::pair + // 3 = const std::pair + // 4 = array + // 5 = const array + // 6 = char array + // 7 = wchar_t array + // 8 = char* + // 9 = const char* + // 10 = whar_t* + // 11 = const wchar_t* + // 12 = string + + typedef mpl::int_<1>::type std_container_; + typedef mpl::int_<2>::type std_pair_; + typedef mpl::int_<3>::type const_std_pair_; + typedef mpl::int_<4>::type array_; + typedef mpl::int_<5>::type const_array_; + typedef mpl::int_<6>::type char_array_; + typedef mpl::int_<7>::type wchar_t_array_; + typedef mpl::int_<8>::type char_ptr_; + typedef mpl::int_<9>::type const_char_ptr_; + typedef mpl::int_<10>::type wchar_t_ptr_; + typedef mpl::int_<11>::type const_wchar_t_ptr_; + typedef mpl::int_<12>::type string_; + + template< typename C > + struct range_helper + { + static C* c; + static C ptr; + + BOOST_STATIC_CONSTANT( bool, is_pair_ = sizeof( boost::range_detail::is_pair_impl( c ) ) == sizeof( yes_type ) ); + BOOST_STATIC_CONSTANT( bool, is_char_ptr_ = sizeof( boost::range_detail::is_char_ptr_impl( ptr ) ) == sizeof( yes_type ) ); + BOOST_STATIC_CONSTANT( bool, is_const_char_ptr_ = sizeof( boost::range_detail::is_const_char_ptr_impl( ptr ) ) == sizeof( yes_type ) ); + BOOST_STATIC_CONSTANT( bool, is_wchar_t_ptr_ = sizeof( boost::range_detail::is_wchar_t_ptr_impl( ptr ) ) == sizeof( yes_type ) ); + BOOST_STATIC_CONSTANT( bool, is_const_wchar_t_ptr_ = sizeof( boost::range_detail::is_const_wchar_t_ptr_impl( ptr ) ) == sizeof( yes_type ) ); + BOOST_STATIC_CONSTANT( bool, is_char_array_ = sizeof( boost::range_detail::is_char_array_impl( ptr ) ) == sizeof( yes_type ) ); + BOOST_STATIC_CONSTANT( bool, is_wchar_t_array_ = sizeof( boost::range_detail::is_wchar_t_array_impl( ptr ) ) == sizeof( yes_type ) ); + BOOST_STATIC_CONSTANT( bool, is_string_ = (boost::mpl::or_, boost::mpl::bool_ >::value )); + BOOST_STATIC_CONSTANT( bool, is_array_ = boost::is_array::value ); + + }; + + template< typename C > + class range + { + typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper::is_pair_, + boost::range_detail::std_pair_, + void >::type pair_t; + typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper::is_array_, + boost::range_detail::array_, + pair_t >::type array_t; + typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper::is_string_, + boost::range_detail::string_, + array_t >::type string_t; + typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper::is_const_char_ptr_, + boost::range_detail::const_char_ptr_, + string_t >::type const_char_ptr_t; + typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper::is_char_ptr_, + boost::range_detail::char_ptr_, + const_char_ptr_t >::type char_ptr_t; + typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper::is_const_wchar_t_ptr_, + boost::range_detail::const_wchar_t_ptr_, + char_ptr_t >::type const_wchar_ptr_t; + typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper::is_wchar_t_ptr_, + boost::range_detail::wchar_t_ptr_, + const_wchar_ptr_t >::type wchar_ptr_t; + typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper::is_wchar_t_array_, + boost::range_detail::wchar_t_array_, + wchar_ptr_t >::type wchar_array_t; + typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper::is_char_array_, + boost::range_detail::char_array_, + wchar_array_t >::type char_array_t; + public: + typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::is_void::value, + boost::range_detail::std_container_, + char_array_t >::type type; + }; // class 'range' + } +} + +#endif + diff --git a/ThirdParty/boost-Subset/boost/range/detail/end.hpp b/ThirdParty/boost-Subset/boost/range/detail/end.hpp new file mode 100644 index 0000000000..f2f71780a7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/detail/end.hpp @@ -0,0 +1,86 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_DETAIL_END_HPP +#define BOOST_RANGE_DETAIL_END_HPP + +#include // BOOST_MSVC +#include + +#include +#include +#include + +namespace boost +{ + namespace range_detail + { + template< typename T > + struct range_end; + + ////////////////////////////////////////////////////////////////////// + // default + ////////////////////////////////////////////////////////////////////// + + template<> + struct range_end + { + template< typename C > + static BOOST_RANGE_DEDUCED_TYPENAME range_iterator::type + fun( C& c ) + { + return c.end(); + }; + }; + + ////////////////////////////////////////////////////////////////////// + // pair + ////////////////////////////////////////////////////////////////////// + + template<> + struct range_end + { + template< typename P > + static BOOST_RANGE_DEDUCED_TYPENAME range_iterator

::type + fun( const P& p ) + { + return p.second; + } + }; + + ////////////////////////////////////////////////////////////////////// + // array + ////////////////////////////////////////////////////////////////////// + + template<> + struct range_end + { + template + static BOOST_RANGE_DEDUCED_TYPENAME remove_extent::type* fun(T& t) + { + return t + remove_extent::size; + } + }; + + } // namespace 'range_detail' + + namespace range_adl_barrier + { + template< typename C > + inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator::type + end( C& c ) + { + return range_detail::range_end< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range::type >::fun( c ); + } + } // namespace range_adl_barrier + +} // namespace 'boost' + +#endif diff --git a/ThirdParty/boost-Subset/boost/range/detail/extract_optional_type.hpp b/ThirdParty/boost-Subset/boost/range/detail/extract_optional_type.hpp new file mode 100644 index 0000000000..0381434a85 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/detail/extract_optional_type.hpp @@ -0,0 +1,48 @@ +// Boost.Range library +// +// Copyright Arno Schoedl & Neil Groves 2009. +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// +#ifndef BOOST_RANGE_DETAIL_EXTRACT_OPTIONAL_TYPE_HPP_INCLUDED +#define BOOST_RANGE_DETAIL_EXTRACT_OPTIONAL_TYPE_HPP_INCLUDED + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_HAS_XXX) + +// Defines extract_some_typedef which exposes T::some_typedef as +// extract_some_typedef::type if T::some_typedef exists. Otherwise +// extract_some_typedef is empty. +#define BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( a_typedef ) \ + BOOST_MPL_HAS_XXX_TRAIT_DEF(a_typedef) \ + template< typename C, bool B = BOOST_PP_CAT(has_, a_typedef)::value > \ + struct BOOST_PP_CAT(extract_, a_typedef) \ + {}; \ + template< typename C > \ + struct BOOST_PP_CAT(extract_, a_typedef)< C, true > \ + { \ + typedef BOOST_DEDUCED_TYPENAME C::a_typedef type; \ + }; + +#else + +#define BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( a_typedef ) \ + template< typename C > \ + struct BOOST_PP_CAT(extract_, a_typedef) \ + { \ + typedef BOOST_DEDUCED_TYPENAME C::a_typedef type; \ + }; + +#endif + +#endif // include guard diff --git a/ThirdParty/boost-Subset/boost/range/detail/has_member_size.hpp b/ThirdParty/boost-Subset/boost/range/detail/has_member_size.hpp new file mode 100644 index 0000000000..0c639aa891 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/detail/has_member_size.hpp @@ -0,0 +1,66 @@ +// Boost.Range library +// +// Copyright Neil Groves 2014. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// For more information, see http://www.boost.org/libs/range/ +// +#ifndef BOOST_RANGE_DETAIL_HAS_MEMBER_SIZE_HPP +#define BOOST_RANGE_DETAIL_HAS_MEMBER_SIZE_HPP + +#include +#include +#include +#include +#include + +namespace boost +{ + namespace range_detail + { + +template +class has_member_size_impl +{ +private: + template + class check + { + }; + + template + static boost::uint8_t f(check*); + + template + static boost::uint16_t f(...); + +public: + static const bool value = + (sizeof(f(0)) == sizeof(boost::uint8_t)); + + typedef typename mpl::if_c< + (sizeof(f(0)) == sizeof(boost::uint8_t)), + mpl::true_, + mpl::false_ + >::type type; +}; + +template +struct has_member_size +{ + typedef typename mpl::and_< + typename is_class::type, + typename has_member_size_impl::type + >::type type; + + static const bool value = + is_class::value && has_member_size_impl::value; +}; + + } // namespace range_detail +}// namespace boost + +#endif // include guard diff --git a/ThirdParty/boost-Subset/boost/range/detail/implementation_help.hpp b/ThirdParty/boost-Subset/boost/range/detail/implementation_help.hpp new file mode 100644 index 0000000000..f35953f349 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/detail/implementation_help.hpp @@ -0,0 +1,114 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_DETAIL_IMPLEMENTATION_HELP_HPP +#define BOOST_RANGE_DETAIL_IMPLEMENTATION_HELP_HPP + +#include +#include +#include +#include +#include + +#ifndef BOOST_NO_CWCHAR +#include +#endif + +namespace boost +{ + namespace range_detail + { + template + inline void boost_range_silence_warning( const T& ) { } + + ///////////////////////////////////////////////////////////////////// + // end() help + ///////////////////////////////////////////////////////////////////// + + inline const char* str_end( const char* s, const char* ) + { + return s + strlen( s ); + } + +#ifndef BOOST_NO_CWCHAR + inline const wchar_t* str_end( const wchar_t* s, const wchar_t* ) + { + return s + wcslen( s ); + } +#else + inline const wchar_t* str_end( const wchar_t* s, const wchar_t* ) + { + if( s == 0 || s[0] == 0 ) + return s; + while( *++s != 0 ) + ; + return s; + } +#endif + + template< class Char > + inline Char* str_end( Char* s ) + { + return const_cast( str_end( s, s ) ); + } + + template< class T, std::size_t sz > + inline T* array_end( T BOOST_RANGE_ARRAY_REF()[sz] ) + { + return boost_range_array + sz; + } + + template< class T, std::size_t sz > + inline const T* array_end( const T BOOST_RANGE_ARRAY_REF()[sz] ) + { + return boost_range_array + sz; + } + + ///////////////////////////////////////////////////////////////////// + // size() help + ///////////////////////////////////////////////////////////////////// + + template< class Char > + inline std::size_t str_size( const Char* const& s ) + { + return str_end( s ) - s; + } + + template< class T, std::size_t sz > + inline std::size_t array_size( T BOOST_RANGE_ARRAY_REF()[sz] ) + { + boost_range_silence_warning( boost_range_array ); + return sz; + } + + template< class T, std::size_t sz > + inline std::size_t array_size( const T BOOST_RANGE_ARRAY_REF()[sz] ) + { + boost_range_silence_warning( boost_range_array ); + return sz; + } + + inline bool is_same_address(const void* l, const void* r) + { + return l == r; + } + + template + inline bool is_same_object(const T1& l, const T2& r) + { + return range_detail::is_same_address(&l, &r); + } + + } // namespace 'range_detail' + +} // namespace 'boost' + + +#endif diff --git a/ThirdParty/boost-Subset/boost/range/detail/misc_concept.hpp b/ThirdParty/boost-Subset/boost/range/detail/misc_concept.hpp new file mode 100644 index 0000000000..74cb919f27 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/detail/misc_concept.hpp @@ -0,0 +1,33 @@ +// Boost.Range library concept checks +// +// Copyright Neil Groves 2009. Use, modification and distribution +// are subject to the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef BOOST_RANGE_DETAIL_MISC_CONCEPT_HPP_INCLUDED +#define BOOST_RANGE_DETAIL_MISC_CONCEPT_HPP_INCLUDED + +#include + +namespace boost +{ + namespace range_detail + { + template + class SameTypeConcept + { + public: + BOOST_CONCEPT_USAGE(SameTypeConcept) + { + same_type(a,b); + } + private: + template void same_type(T,T) {} + T1 a; + T2 b; + }; + } +} + +#endif // include guard diff --git a/ThirdParty/boost-Subset/boost/range/detail/msvc_has_iterator_workaround.hpp b/ThirdParty/boost-Subset/boost/range/detail/msvc_has_iterator_workaround.hpp new file mode 100644 index 0000000000..62b67fd529 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/detail/msvc_has_iterator_workaround.hpp @@ -0,0 +1,132 @@ +// Boost.Range library +// +// Copyright Eric Niebler 2014. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_DETAIL_MSVC_HAS_ITERATOR_WORKAROUND_HPP +#define BOOST_RANGE_DETAIL_MSVC_HAS_ITERATOR_WORKAROUND_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#ifndef BOOST_RANGE_MUTABLE_ITERATOR_HPP +# error This file should only be included from +#endif + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600) +namespace boost +{ +namespace cb_details +{ + template + struct iterator; +} + +namespace python +{ + template + struct iterator; +} + +namespace type_erasure +{ + template< + class Traversal, + class T /*= _self*/, + class Reference /*= ::boost::use_default*/, + class DifferenceType /*= ::std::ptrdiff_t*/, + class ValueType /*= typename deduced >::type*/ + > + struct iterator; +} + +namespace unordered { namespace iterator_detail +{ + template + struct iterator; +}} + +namespace container { namespace container_detail +{ + template + class iterator; +}} + +namespace spirit { namespace lex { namespace lexertl +{ + template + class iterator; +}}} + +namespace range_detail +{ + template + struct has_iterator< ::boost::cb_details::iterator > + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::cb_details::iterator const> + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::python::iterator > + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::python::iterator const> + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::type_erasure::iterator > + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::type_erasure::iterator const> + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::unordered::iterator_detail::iterator > + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::unordered::iterator_detail::iterator const> + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::container::container_detail::iterator > + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::container::container_detail::iterator const> + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::spirit::lex::lexertl::iterator > + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::spirit::lex::lexertl::iterator const> + : mpl::false_ + {}; +} +} +#endif +#endif diff --git a/ThirdParty/boost-Subset/boost/range/detail/safe_bool.hpp b/ThirdParty/boost-Subset/boost/range/detail/safe_bool.hpp new file mode 100644 index 0000000000..182e510484 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/detail/safe_bool.hpp @@ -0,0 +1,72 @@ +// This header intentionally has no include guards. +// +// Copyright (c) 2010 Neil Groves +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// This code utilises the experience gained during the evolution of +// +#ifndef BOOST_RANGE_SAFE_BOOL_INCLUDED_HPP +#define BOOST_RANGE_SAFE_BOOL_INCLUDED_HPP + +#include +#include + +namespace boost +{ + namespace range_detail + { + +template +class safe_bool +{ +public: + typedef safe_bool this_type; + +#if (defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570)) || defined(__CINT_) + typedef bool unspecified_bool_type; + static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr) + { + return x; + } +#elif defined(_MANAGED) + static void unspecified_bool(this_type***) + { + } + typedef void(*unspecified_bool_type)(this_type***); + static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr) + { + return x ? unspecified_bool : 0; + } +#elif \ + ( defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, < 0x3200) ) || \ + ( defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 304) ) || \ + ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) ) + + typedef bool (this_type::*unspecified_bool_type)() const; + + static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr) + { + return x ? &this_type::detail_safe_bool_member_fn : 0; + } +private: + bool detail_safe_bool_member_fn() const { return false; } +#else + typedef DataMemberPtr unspecified_bool_type; + static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr p) + { + return x ? p : 0; + } +#endif +private: + safe_bool(); + safe_bool(const safe_bool&); + void operator=(const safe_bool&); + ~safe_bool(); +}; + + } // namespace range_detail +} // namespace boost + +#endif // include guard diff --git a/ThirdParty/boost-Subset/boost/range/detail/sfinae.hpp b/ThirdParty/boost-Subset/boost/range/detail/sfinae.hpp new file mode 100644 index 0000000000..5b2c61e71e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/detail/sfinae.hpp @@ -0,0 +1,77 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_DETAIL_SFINAE_HPP +#define BOOST_RANGE_DETAIL_SFINAE_HPP + +#include +#include +#include +#include + + +namespace boost +{ + namespace range_detail + { + using type_traits::yes_type; + using type_traits::no_type; + + ////////////////////////////////////////////////////////////////////// + // string + ////////////////////////////////////////////////////////////////////// + + yes_type is_string_impl( const char* const ); + yes_type is_string_impl( const wchar_t* const ); + no_type is_string_impl( ... ); + + template< std::size_t sz > + yes_type is_char_array_impl( char BOOST_RANGE_ARRAY_REF()[sz] ); + template< std::size_t sz > + yes_type is_char_array_impl( const char BOOST_RANGE_ARRAY_REF()[sz] ); + no_type is_char_array_impl( ... ); + + template< std::size_t sz > + yes_type is_wchar_t_array_impl( wchar_t BOOST_RANGE_ARRAY_REF()[sz] ); + template< std::size_t sz > + yes_type is_wchar_t_array_impl( const wchar_t BOOST_RANGE_ARRAY_REF()[sz] ); + no_type is_wchar_t_array_impl( ... ); + + yes_type is_char_ptr_impl( char* const ); + no_type is_char_ptr_impl( ... ); + + yes_type is_const_char_ptr_impl( const char* const ); + no_type is_const_char_ptr_impl( ... ); + + yes_type is_wchar_t_ptr_impl( wchar_t* const ); + no_type is_wchar_t_ptr_impl( ... ); + + yes_type is_const_wchar_t_ptr_impl( const wchar_t* const ); + no_type is_const_wchar_t_ptr_impl( ... ); + + ////////////////////////////////////////////////////////////////////// + // pair + ////////////////////////////////////////////////////////////////////// + + template< typename Iterator > + yes_type is_pair_impl( const std::pair* ); + no_type is_pair_impl( ... ); + + ////////////////////////////////////////////////////////////////////// + // tags + ////////////////////////////////////////////////////////////////////// + + struct char_or_wchar_t_array_tag {}; + + } // namespace 'range_detail' + +} // namespace 'boost' + +#endif diff --git a/ThirdParty/boost-Subset/boost/range/difference_type.hpp b/ThirdParty/boost-Subset/boost/range/difference_type.hpp new file mode 100644 index 0000000000..6bb3c5f552 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/difference_type.hpp @@ -0,0 +1,47 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_DIFFERENCE_TYPE_HPP +#define BOOST_RANGE_DIFFERENCE_TYPE_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include +#include +#include +#include +#include + +namespace boost +{ + namespace range_detail + { + template< class T, bool B = has_type >::value > + struct range_difference + { }; + + template< class T > + struct range_difference + : iterator_difference< + BOOST_DEDUCED_TYPENAME range_iterator::type + > + { }; + } + + template< class T > + struct range_difference + : range_detail::range_difference::type> + { }; +} + +#endif diff --git a/ThirdParty/boost-Subset/boost/range/distance.hpp b/ThirdParty/boost-Subset/boost/range/distance.hpp new file mode 100644 index 0000000000..075f2d1fb9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/distance.hpp @@ -0,0 +1,34 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2006. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_DISTANCE_HPP +#define BOOST_RANGE_DISTANCE_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include +#include + +namespace boost +{ + + template< class T > + inline BOOST_DEDUCED_TYPENAME range_difference::type + distance( const T& r ) + { + return std::distance( boost::begin( r ), boost::end( r ) ); + } + +} // namespace 'boost' + +#endif diff --git a/ThirdParty/boost-Subset/boost/range/empty.hpp b/ThirdParty/boost-Subset/boost/range/empty.hpp new file mode 100644 index 0000000000..d57a30ed01 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/empty.hpp @@ -0,0 +1,34 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_EMPTY_HPP +#define BOOST_RANGE_EMPTY_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include +#include + +namespace boost +{ + + template< class T > + inline bool empty( const T& r ) + { + return boost::begin( r ) == boost::end( r ); + } + +} // namespace 'boost' + + +#endif diff --git a/ThirdParty/boost-Subset/boost/range/end.hpp b/ThirdParty/boost-Subset/boost/range/end.hpp new file mode 100644 index 0000000000..f2a3337e34 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/end.hpp @@ -0,0 +1,128 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_END_HPP +#define BOOST_RANGE_END_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include + +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING +#include +#else + +#include +#include +#include + +namespace boost +{ + +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +namespace range_detail +{ +#endif + + ////////////////////////////////////////////////////////////////////// + // primary template + ////////////////////////////////////////////////////////////////////// + template< typename C > + inline BOOST_DEDUCED_TYPENAME range_iterator::type + range_end( C& c ) + { + // + // If you get a compile-error here, it is most likely because + // you have not implemented range_begin() properly in + // the namespace of C + // + return c.end(); + } + + ////////////////////////////////////////////////////////////////////// + // pair + ////////////////////////////////////////////////////////////////////// + + template< typename Iterator > + inline Iterator range_end( const std::pair& p ) + { + return p.second; + } + + template< typename Iterator > + inline Iterator range_end( std::pair& p ) + { + return p.second; + } + + ////////////////////////////////////////////////////////////////////// + // array + ////////////////////////////////////////////////////////////////////// + + template< typename T, std::size_t sz > + inline const T* range_end( const T (&a)[sz] ) + { + return range_detail::array_end( a ); + } + + template< typename T, std::size_t sz > + inline T* range_end( T (&a)[sz] ) + { + return range_detail::array_end( a ); + } + +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +} // namespace 'range_detail' +#endif + +namespace range_adl_barrier +{ + +template< class T > +inline BOOST_DEDUCED_TYPENAME range_iterator::type end( T& r ) +{ +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) + using namespace range_detail; +#endif + return range_end( r ); +} + +template< class T > +inline BOOST_DEDUCED_TYPENAME range_iterator::type end( const T& r ) +{ +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) + using namespace range_detail; +#endif + return range_end( r ); +} + + } // namespace range_adl_barrier +} // namespace 'boost' + +#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING + +namespace boost +{ + namespace range_adl_barrier + { + template< class T > + inline BOOST_DEDUCED_TYPENAME range_iterator::type + const_end( const T& r ) + { + return boost::range_adl_barrier::end( r ); + } + } // namespace range_adl_barrier + using namespace range_adl_barrier; +} // namespace boost + +#endif + diff --git a/ThirdParty/boost-Subset/boost/range/functions.hpp b/ThirdParty/boost-Subset/boost/range/functions.hpp new file mode 100644 index 0000000000..43c54b15b8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/functions.hpp @@ -0,0 +1,27 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2006. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_FUNCTIONS_HPP +#define BOOST_RANGE_FUNCTIONS_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include +#include +#include +#include +#include +#include + +#endif + diff --git a/ThirdParty/boost-Subset/boost/range/has_range_iterator.hpp b/ThirdParty/boost-Subset/boost/range/has_range_iterator.hpp new file mode 100644 index 0000000000..9eb58b35d2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/has_range_iterator.hpp @@ -0,0 +1,83 @@ +// Boost.Range library +// +// Copyright Neil Groves 2010. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// +// Acknowledgments: +// Ticket #8341: Arno Schoedl - improved handling of has_range_iterator upon +// use-cases where T was const. +#ifndef BOOST_RANGE_HAS_ITERATOR_HPP_INCLUDED +#define BOOST_RANGE_HAS_ITERATOR_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include + +namespace boost +{ + namespace range_detail + { + BOOST_MPL_HAS_XXX_TRAIT_DEF(type) + + template + struct has_range_iterator_impl + : boost::mpl::false_ + { + }; + + template + struct has_range_iterator_impl< + T, + BOOST_DEDUCED_TYPENAME ::boost::enable_if< + BOOST_DEDUCED_TYPENAME mpl::eval_if, + has_type::type> >, + has_type > + >::type + >::type + > + : boost::mpl::true_ + { + }; + + template + struct has_range_const_iterator_impl + : boost::mpl::false_ + { + }; + + template + struct has_range_const_iterator_impl< + T, + BOOST_DEDUCED_TYPENAME ::boost::enable_if< + has_type > + >::type + > + : boost::mpl::true_ + { + }; + + } // namespace range_detail + + template + struct has_range_iterator + : range_detail::has_range_iterator_impl< + BOOST_DEDUCED_TYPENAME remove_reference::type> + {}; + + template + struct has_range_const_iterator + : range_detail::has_range_const_iterator_impl< + BOOST_DEDUCED_TYPENAME remove_reference::type> + {}; +} // namespace boost + +#endif // include guard + diff --git a/ThirdParty/boost-Subset/boost/range/iterator.hpp b/ThirdParty/boost-Subset/boost/range/iterator.hpp new file mode 100644 index 0000000000..2956353ab5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/iterator.hpp @@ -0,0 +1,74 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_ITERATOR_HPP +#define BOOST_RANGE_ITERATOR_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include +#include +#include +#include +#include +#include + +namespace boost +{ + +#if BOOST_WORKAROUND(BOOST_MSVC, == 1310) + + namespace range_detail_vc7_1 + { + template< typename C, typename Sig = void(C) > + struct range_iterator + { + typedef BOOST_RANGE_DEDUCED_TYPENAME + mpl::eval_if_c< is_const::value, + range_const_iterator< typename remove_const::type >, + range_mutable_iterator >::type type; + }; + + template< typename C, typename T > + struct range_iterator< C, void(T[]) > + { + typedef T* type; + }; + } + + template< typename C, typename Enabler=void > + struct range_iterator + { + + typedef BOOST_RANGE_DEDUCED_TYPENAME + range_detail_vc7_1::range_iterator::type type; + + }; + +#else + + template< typename C, typename Enabler=void > + struct range_iterator + : mpl::if_c< + is_const::type>::value, + range_const_iterator::type>::type>, + range_mutable_iterator::type> + >::type + { + }; + +#endif + +} // namespace boost + +#endif diff --git a/ThirdParty/boost-Subset/boost/range/iterator_range_core.hpp b/ThirdParty/boost-Subset/boost/range/iterator_range_core.hpp new file mode 100644 index 0000000000..a9e9fc0f13 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/iterator_range_core.hpp @@ -0,0 +1,883 @@ +// Boost.Range library +// +// Copyright Neil Groves & Thorsten Ottosen & Pavol Droba 2003-2004. +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// +// Credits: +// 'michel' reported Trac 9072 which included a patch for allowing references +// to function types. +// +#ifndef BOOST_RANGE_ITERATOR_RANGE_CORE_HPP_INCLUDED +#define BOOST_RANGE_ITERATOR_RANGE_CORE_HPP_INCLUDED + +#include // Define __STL_CONFIG_H, if appropriate. +#include + +#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)) + #pragma warning( push ) + #pragma warning( disable : 4996 ) +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/*! \file + Defines the \c iterator_class and related functions. + \c iterator_range is a simple wrapper of iterator pair idiom. It provides + a rich subset of Container interface. +*/ + + +namespace boost +{ + namespace iterator_range_detail + { + // + // The functions adl_begin and adl_end are implemented in a separate + // class for gcc-2.9x + // + template + struct iterator_range_impl { + template< class ForwardRange > + static IteratorT adl_begin( ForwardRange& r ) + { + return IteratorT( boost::begin( r ) ); + } + + template< class ForwardRange > + static IteratorT adl_end( ForwardRange& r ) + { + return IteratorT( boost::end( r ) ); + } + }; + + template< class Left, class Right > + inline bool less_than( const Left& l, const Right& r ) + { + return std::lexicographical_compare( boost::begin(l), + boost::end(l), + boost::begin(r), + boost::end(r) ); + } + + template< class Left, class Right > + inline bool greater_than( const Left& l, const Right& r ) + { + return iterator_range_detail::less_than(r,l); + } + + template< class Left, class Right > + inline bool less_or_equal_than( const Left& l, const Right& r ) + { + return !iterator_range_detail::less_than(r,l); + } + + template< class Left, class Right > + inline bool greater_or_equal_than( const Left& l, const Right& r ) + { + return !iterator_range_detail::less_than(l,r); + } + + // This version is maintained since it is used in other boost libraries + // such as Boost.Assign + template< class Left, class Right > + inline bool equal(const Left& l, const Right& r) + { + return boost::equal(l, r); + } + +struct range_tag +{ +}; + +struct const_range_tag +{ +}; + +struct iterator_range_tag +{ +}; + +typedef char (&incrementable_t)[1]; +typedef char (&bidirectional_t)[2]; +typedef char (&random_access_t)[3]; + +incrementable_t test_traversal_tag(boost::incrementable_traversal_tag); +bidirectional_t test_traversal_tag(boost::bidirectional_traversal_tag); +random_access_t test_traversal_tag(boost::random_access_traversal_tag); + +template +struct pure_iterator_traversal_impl +{ + typedef boost::incrementable_traversal_tag type; +}; + +template<> +struct pure_iterator_traversal_impl +{ + typedef boost::bidirectional_traversal_tag type; +}; + +template<> +struct pure_iterator_traversal_impl +{ + typedef boost::random_access_traversal_tag type; +}; + +template +struct pure_iterator_traversal +{ + typedef + BOOST_DEDUCED_TYPENAME iterator_traversal::type + traversal_t; + BOOST_STATIC_CONSTANT( + std::size_t, + traversal_i = sizeof(iterator_range_detail::test_traversal_tag((traversal_t()))) + ); + typedef + BOOST_DEDUCED_TYPENAME pure_iterator_traversal_impl::type + type; +}; + +template +class iterator_range_base + : public iterator_range_tag +{ + typedef range_detail::safe_bool< + IteratorT iterator_range_base::* + > safe_bool_t; + + typedef iterator_range_base type; + +protected: + typedef iterator_range_impl impl; + +public: + typedef BOOST_DEDUCED_TYPENAME + safe_bool_t::unspecified_bool_type unspecified_bool_type; + + typedef BOOST_DEDUCED_TYPENAME + iterator_value::type value_type; + + typedef BOOST_DEDUCED_TYPENAME + iterator_difference::type difference_type; + + typedef std::size_t size_type; // note: must be unsigned + + // Needed because value-type is the same for + // const and non-const iterators + typedef BOOST_DEDUCED_TYPENAME + iterator_reference::type reference; + + //! const_iterator type + /*! + There is no distinction between const_iterator and iterator. + These typedefs are provides to fulfill container interface + */ + typedef IteratorT const_iterator; + //! iterator type + typedef IteratorT iterator; + +protected: + iterator_range_base() + : m_Begin() + , m_End() + { + } + + template + iterator_range_base(Iterator Begin, Iterator End) + : m_Begin(Begin) + , m_End(End) + { + } + +public: + IteratorT begin() const + { + return m_Begin; + } + + IteratorT end() const + { + return m_End; + } + + bool empty() const + { + return m_Begin == m_End; + } + + operator unspecified_bool_type() const + { + return safe_bool_t::to_unspecified_bool( + m_Begin != m_End, &iterator_range_base::m_Begin); + } + + bool operator!() const + { + return empty(); + } + + bool equal(const iterator_range_base& r) const + { + return m_Begin == r.m_Begin && m_End == r.m_End; + } + + reference front() const + { + BOOST_ASSERT(!empty()); + return *m_Begin; + } + + void drop_front() + { + BOOST_ASSERT(!empty()); + ++m_Begin; + } + + void drop_front(difference_type n) + { + BOOST_ASSERT(n >= difference_type()); + std::advance(this->m_Begin, n); + } + + // Deprecated + void pop_front() { drop_front(); } + +protected: + template + void assign(Iterator first, Iterator last) + { + m_Begin = first; + m_End = last; + } + + template + void assign(const SinglePassRange& r) + { + m_Begin = impl::adl_begin(r); + m_End = impl::adl_end(r); + } + + template + void assign(SinglePassRange& r) + { + m_Begin = impl::adl_begin(r); + m_End = impl::adl_end(r); + } + + IteratorT m_Begin; + IteratorT m_End; +}; + +template +class iterator_range_base + : public iterator_range_base +{ + typedef iterator_range_base base_type; + +protected: + iterator_range_base() + { + } + + template + iterator_range_base(Iterator first, Iterator last) + : base_type(first, last) + { + } + +public: + typedef BOOST_DEDUCED_TYPENAME base_type::difference_type difference_type; + typedef BOOST_DEDUCED_TYPENAME base_type::reference reference; + + reference back() const + { + BOOST_ASSERT(!this->empty()); + return *boost::prior(this->m_End); + } + + void drop_back() + { + BOOST_ASSERT(!this->empty()); + --this->m_End; + } + + void drop_back(difference_type n) + { + BOOST_ASSERT(n >= difference_type()); + std::advance(this->m_End, -n); + } + + // Deprecated + void pop_back() { drop_back(); } +}; + +template +class iterator_range_base + : public iterator_range_base +{ + typedef iterator_range_base< + IteratorT, bidirectional_traversal_tag> base_type; + +public: + typedef BOOST_DEDUCED_TYPENAME + boost::mpl::if_< + boost::mpl::or_< + boost::is_abstract< + BOOST_DEDUCED_TYPENAME base_type::value_type + >, + boost::is_array< + BOOST_DEDUCED_TYPENAME base_type::value_type + >, + boost::is_function< + BOOST_DEDUCED_TYPENAME base_type::value_type + > + >, + BOOST_DEDUCED_TYPENAME base_type::reference, + BOOST_DEDUCED_TYPENAME base_type::value_type + >::type abstract_value_type; + + // Rationale: + // typedef these here to reduce verbiage in the implementation of this + // type. + typedef BOOST_DEDUCED_TYPENAME base_type::difference_type difference_type; + typedef BOOST_DEDUCED_TYPENAME base_type::size_type size_type; + typedef BOOST_DEDUCED_TYPENAME base_type::reference reference; + +protected: + iterator_range_base() + { + } + + template + iterator_range_base(Iterator first, Iterator last) + : base_type(first, last) + { + } + +public: + reference operator[](difference_type at) const + { + BOOST_ASSERT(at >= 0); + BOOST_ASSERT(static_cast(at) < size()); + return this->m_Begin[at]; + } + + // + // When storing transform iterators, operator[]() + // fails because it returns by reference. Therefore + // operator()() is provided for these cases. + // + abstract_value_type operator()(difference_type at) const + { + BOOST_ASSERT(at >= 0); + BOOST_ASSERT(static_cast(at) < size()); + return this->m_Begin[at]; + } + + BOOST_DEDUCED_TYPENAME base_type::size_type size() const + { + return this->m_End - this->m_Begin; + } +}; + + } + +// iterator range template class -----------------------------------------// + + //! iterator_range class + /*! + An \c iterator_range delimits a range in a sequence by beginning and ending iterators. + An iterator_range can be passed to an algorithm which requires a sequence as an input. + For example, the \c toupper() function may be used most frequently on strings, + but can also be used on iterator_ranges: + + \code + boost::tolower( find( s, "UPPERCASE STRING" ) ); + \endcode + + Many algorithms working with sequences take a pair of iterators, + delimiting a working range, as an arguments. The \c iterator_range class is an + encapsulation of a range identified by a pair of iterators. + It provides a collection interface, + so it is possible to pass an instance to an algorithm requiring a collection as an input. + */ + template + class iterator_range + : public iterator_range_detail::iterator_range_base< + IteratorT, + BOOST_DEDUCED_TYPENAME iterator_range_detail::pure_iterator_traversal::type + > + { + typedef iterator_range_detail::iterator_range_base< + IteratorT, + BOOST_DEDUCED_TYPENAME iterator_range_detail::pure_iterator_traversal::type + > base_type; + + template + struct is_compatible_range_ + : is_convertible< + BOOST_DEDUCED_TYPENAME mpl::eval_if< + has_range_iterator, + range_iterator, + mpl::identity + >::type, + BOOST_DEDUCED_TYPENAME base_type::iterator + > + { + }; + + template + struct is_compatible_range + : mpl::and_< + mpl::not_< + is_convertible< + Source, + BOOST_DEDUCED_TYPENAME base_type::iterator + > + >, + is_compatible_range_ + > + { + }; + + protected: + typedef iterator_range_detail::iterator_range_impl impl; + + public: + typedef iterator_range type; + + iterator_range() + { + } + + template + iterator_range(Iterator first, Iterator last) + : base_type(first, last) + { + } + + template + iterator_range( + const SinglePassRange& r, + BOOST_DEDUCED_TYPENAME ::boost::enable_if< + is_compatible_range + >::type* = 0 + ) + : base_type(impl::adl_begin(r), impl::adl_end(r)) + { + } + + template + iterator_range( + SinglePassRange& r, + BOOST_DEDUCED_TYPENAME ::boost::enable_if< + is_compatible_range + >::type* = 0 + ) + : base_type(impl::adl_begin(r), impl::adl_end(r)) + { + } + + template + iterator_range(const SinglePassRange& r, + iterator_range_detail::const_range_tag) + : base_type(impl::adl_begin(r), impl::adl_end(r)) + { + } + + template + iterator_range(SinglePassRange& r, + iterator_range_detail::range_tag) + : base_type(impl::adl_begin(r), impl::adl_end(r)) + { + } + + template + iterator_range& operator=(const iterator_range& other) + { + this->assign(other.begin(), other.end()); + return *this; + } + + template + iterator_range& operator=(iterator_range& other) + { + this->assign(other.begin(), other.end()); + return *this; + } + + template + iterator_range& operator=(SinglePassRange& r) + { + this->assign(r); + return *this; + } + + template + iterator_range& operator=(const SinglePassRange& r) + { + this->assign(r); + return *this; + } + + iterator_range& advance_begin( + BOOST_DEDUCED_TYPENAME base_type::difference_type n) + { + std::advance(this->m_Begin, n); + return *this; + } + + iterator_range& advance_end( + BOOST_DEDUCED_TYPENAME base_type::difference_type n) + { + std::advance(this->m_End, n); + return *this; + } + + protected: + // + // Allow subclasses an easy way to access the + // base type + // + typedef iterator_range iterator_range_; + }; + +// iterator range free-standing operators ---------------------------// + + ///////////////////////////////////////////////////////////////////// + // comparison operators + ///////////////////////////////////////////////////////////////////// + + template< class IteratorT, class ForwardRange > + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator==( const ForwardRange& l, const iterator_range& r ) + { + return boost::equal( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator!=( const ForwardRange& l, const iterator_range& r ) + { + return !boost::equal( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator<( const ForwardRange& l, const iterator_range& r ) + { + return iterator_range_detail::less_than( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator<=( const ForwardRange& l, const iterator_range& r ) + { + return iterator_range_detail::less_or_equal_than( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator>( const ForwardRange& l, const iterator_range& r ) + { + return iterator_range_detail::greater_than( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator>=( const ForwardRange& l, const iterator_range& r ) + { + return iterator_range_detail::greater_or_equal_than( l, r ); + } + +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING +#else + template< class Iterator1T, class Iterator2T > + inline bool + operator==( const iterator_range& l, const iterator_range& r ) + { + return boost::equal( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator==( const iterator_range& l, const ForwardRange& r ) + { + return boost::equal( l, r ); + } + + + template< class Iterator1T, class Iterator2T > + inline bool + operator!=( const iterator_range& l, const iterator_range& r ) + { + return !boost::equal( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator!=( const iterator_range& l, const ForwardRange& r ) + { + return !boost::equal( l, r ); + } + + + template< class Iterator1T, class Iterator2T > + inline bool + operator<( const iterator_range& l, const iterator_range& r ) + { + return iterator_range_detail::less_than( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator<( const iterator_range& l, const ForwardRange& r ) + { + return iterator_range_detail::less_than( l, r ); + } + + template< class Iterator1T, class Iterator2T > + inline bool + operator<=( const iterator_range& l, const iterator_range& r ) + { + return iterator_range_detail::less_or_equal_than( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator<=( const iterator_range& l, const ForwardRange& r ) + { + return iterator_range_detail::less_or_equal_than( l, r ); + } + + template< class Iterator1T, class Iterator2T > + inline bool + operator>( const iterator_range& l, const iterator_range& r ) + { + return iterator_range_detail::greater_than( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator>( const iterator_range& l, const ForwardRange& r ) + { + return iterator_range_detail::greater_than( l, r ); + } + + template< class Iterator1T, class Iterator2T > + inline bool + operator>=( const iterator_range& l, const iterator_range& r ) + { + return iterator_range_detail::greater_or_equal_than( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator>=( const iterator_range& l, const ForwardRange& r ) + { + return iterator_range_detail::greater_or_equal_than( l, r ); + } + +#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING + +// iterator range utilities -----------------------------------------// + + //! iterator_range construct helper + /*! + Construct an \c iterator_range from a pair of iterators + + \param Begin A begin iterator + \param End An end iterator + \return iterator_range object + */ + template< typename IteratorT > + inline iterator_range< IteratorT > + make_iterator_range( IteratorT Begin, IteratorT End ) + { + return iterator_range( Begin, End ); + } + + template + inline iterator_range + make_iterator_range_n(IteratorT first, IntegerT n) + { + return iterator_range(first, boost::next(first, n)); + } + +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + + template< typename Range > + inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > + make_iterator_range( Range& r ) + { + return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > + ( boost::begin( r ), boost::end( r ) ); + } + +#else + //! iterator_range construct helper + /*! + Construct an \c iterator_range from a \c Range containing the begin + and end iterators. + */ + template< class ForwardRange > + inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > + make_iterator_range( ForwardRange& r ) + { + return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > + ( r, iterator_range_detail::range_tag() ); + } + + template< class ForwardRange > + inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > + make_iterator_range( const ForwardRange& r ) + { + return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > + ( r, iterator_range_detail::const_range_tag() ); + } + +#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING + + namespace iterator_range_detail + { + template< class Range > + inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > + make_range_impl( Range& r, + BOOST_DEDUCED_TYPENAME range_difference::type advance_begin, + BOOST_DEDUCED_TYPENAME range_difference::type advance_end ) + { + // + // Not worth the effort + // + //if( advance_begin == 0 && advance_end == 0 ) + // return make_iterator_range( r ); + // + + BOOST_DEDUCED_TYPENAME range_iterator::type + new_begin = boost::begin( r ), + new_end = boost::end( r ); + std::advance( new_begin, advance_begin ); + std::advance( new_end, advance_end ); + return make_iterator_range( new_begin, new_end ); + } + } + +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + + template< class Range > + inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > + make_iterator_range( Range& r, + BOOST_DEDUCED_TYPENAME range_difference::type advance_begin, + BOOST_DEDUCED_TYPENAME range_difference::type advance_end ) + { + return iterator_range_detail::make_range_impl( r, advance_begin, advance_end ); + } + +#else + + template< class Range > + inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > + make_iterator_range( Range& r, + BOOST_DEDUCED_TYPENAME range_difference::type advance_begin, + BOOST_DEDUCED_TYPENAME range_difference::type advance_end ) + { + return iterator_range_detail::make_range_impl( r, advance_begin, advance_end ); + } + + template< class Range > + inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > + make_iterator_range( const Range& r, + BOOST_DEDUCED_TYPENAME range_difference::type advance_begin, + BOOST_DEDUCED_TYPENAME range_difference::type advance_end ) + { + return iterator_range_detail::make_range_impl( r, advance_begin, advance_end ); + } + +#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING + + //! copy a range into a sequence + /*! + Construct a new sequence of the specified type from the elements + in the given range + + \param Range An input range + \return New sequence + */ + template< typename SeqT, typename Range > + inline SeqT copy_range( const Range& r ) + { + return SeqT( boost::begin( r ), boost::end( r ) ); + } + +} // namespace 'boost' + +#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)) + #pragma warning( pop ) +#endif + +#endif + diff --git a/ThirdParty/boost-Subset/boost/range/mutable_iterator.hpp b/ThirdParty/boost-Subset/boost/range/mutable_iterator.hpp new file mode 100644 index 0000000000..b924666679 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/mutable_iterator.hpp @@ -0,0 +1,79 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_MUTABLE_ITERATOR_HPP +#define BOOST_RANGE_MUTABLE_ITERATOR_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include + +#include +#include +#include +#include +#include +#include + +namespace boost +{ + + ////////////////////////////////////////////////////////////////////////// + // default + ////////////////////////////////////////////////////////////////////////// + + namespace range_detail + { + +BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( iterator ) + +template< typename C > +struct range_mutable_iterator + : range_detail::extract_iterator< + BOOST_DEDUCED_TYPENAME remove_reference::type> +{}; + +////////////////////////////////////////////////////////////////////////// +// pair +////////////////////////////////////////////////////////////////////////// + +template< typename Iterator > +struct range_mutable_iterator< std::pair > +{ + typedef Iterator type; +}; + +////////////////////////////////////////////////////////////////////////// +// array +////////////////////////////////////////////////////////////////////////// + +template< typename T, std::size_t sz > +struct range_mutable_iterator< T[sz] > +{ + typedef T* type; +}; + + } // namespace range_detail + +template +struct range_mutable_iterator + : range_detail::range_mutable_iterator< + BOOST_DEDUCED_TYPENAME remove_reference::type + > +{ +}; + +} // namespace boost + +#include + +#endif diff --git a/ThirdParty/boost-Subset/boost/range/range_fwd.hpp b/ThirdParty/boost-Subset/boost/range/range_fwd.hpp new file mode 100644 index 0000000000..0e6e00f553 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/range_fwd.hpp @@ -0,0 +1,63 @@ +// Boost.Range library +// +// Copyright Neil Groves 2003-2004. +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// +#ifndef BOOST_RANGE_RANGE_FWD_HPP_INCLUDED +#define BOOST_RANGE_RANGE_FWD_HPP_INCLUDED + +namespace boost +{ + +// Extension points + template + struct range_iterator; + + template + struct range_mutable_iterator; + + template + struct range_const_iterator; + +// Core classes + template + class iterator_range; + + template + class sub_range; + +// Meta-functions + template + struct range_category; + + template + struct range_difference; + + template + struct range_pointer; + + template + struct range_reference; + + template + struct range_reverse_iterator; + + template + struct range_size; + + template + struct range_value; + + template + struct has_range_iterator; + + template + struct has_range_const_iterator; + +} // namespace boost + +#endif // include guard diff --git a/ThirdParty/boost-Subset/boost/range/rbegin.hpp b/ThirdParty/boost-Subset/boost/range/rbegin.hpp new file mode 100644 index 0000000000..6d66de94b9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/rbegin.hpp @@ -0,0 +1,65 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_RBEGIN_HPP +#define BOOST_RANGE_RBEGIN_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include + +namespace boost +{ + +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + +template< class C > +inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type +rbegin( C& c ) +{ + return BOOST_DEDUCED_TYPENAME range_reverse_iterator::type( boost::end( c ) ); +} + +#else + +template< class C > +inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type +rbegin( C& c ) +{ + typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator::type + iter_type; + return iter_type( boost::end( c ) ); +} + +template< class C > +inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type +rbegin( const C& c ) +{ + typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator::type + iter_type; + return iter_type( boost::end( c ) ); +} + +#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING + +template< class T > +inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type +const_rbegin( const T& r ) +{ + return boost::rbegin( r ); +} + +} // namespace 'boost' + +#endif + diff --git a/ThirdParty/boost-Subset/boost/range/rend.hpp b/ThirdParty/boost-Subset/boost/range/rend.hpp new file mode 100644 index 0000000000..ef7040780c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/rend.hpp @@ -0,0 +1,65 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_REND_HPP +#define BOOST_RANGE_REND_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include + +namespace boost +{ + +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + +template< class C > +inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type +rend( C& c ) +{ + return BOOST_DEDUCED_TYPENAME range_reverse_iterator::type( boost::begin( c ) ); +} + +#else + +template< class C > +inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type +rend( C& c ) +{ + typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator::type + iter_type; + return iter_type( boost::begin( c ) ); +} + +template< class C > +inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type +rend( const C& c ) +{ + typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator::type + iter_type; + return iter_type( boost::begin( c ) ); +} + +#endif + +template< class T > +inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type +const_rend( const T& r ) +{ + return boost::rend( r ); +} + +} // namespace 'boost' + +#endif + diff --git a/ThirdParty/boost-Subset/boost/range/reverse_iterator.hpp b/ThirdParty/boost-Subset/boost/range/reverse_iterator.hpp new file mode 100644 index 0000000000..0aa0130af6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/reverse_iterator.hpp @@ -0,0 +1,42 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_REVERSE_ITERATOR_HPP +#define BOOST_RANGE_REVERSE_ITERATOR_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include +#include +#include + + +namespace boost +{ + ////////////////////////////////////////////////////////////////////////// + // default + ////////////////////////////////////////////////////////////////////////// + + template< typename T > + struct range_reverse_iterator + { + typedef reverse_iterator< + BOOST_DEDUCED_TYPENAME range_iterator< + BOOST_DEDUCED_TYPENAME remove_reference::type>::type > type; + }; + + +} // namespace boost + + +#endif diff --git a/ThirdParty/boost-Subset/boost/range/size.hpp b/ThirdParty/boost-Subset/boost/range/size.hpp new file mode 100644 index 0000000000..7f38db8c1e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/size.hpp @@ -0,0 +1,76 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_SIZE_HPP +#define BOOST_RANGE_SIZE_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost +{ + namespace range_detail + { + + template + inline typename ::boost::enable_if< + has_member_size, + typename range_size::type + >::type + range_calculate_size(const SinglePassRange& rng) + { + return rng.size(); + } + + template + inline typename disable_if< + has_member_size, + typename range_size::type + >::type + range_calculate_size(const SinglePassRange& rng) + { + return std::distance(boost::begin(rng), boost::end(rng)); + } + } + + template + inline typename range_size::type + size(const SinglePassRange& rng) + { +// Very strange things happen on some compilers that have the range concept +// asserts disabled. This preprocessor condition is clearly redundant on a +// working compiler but is vital for at least some compilers such as clang 4.2 +// but only on the Mac! +#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT == 1 + BOOST_RANGE_CONCEPT_ASSERT((boost::SinglePassRangeConcept)); +#endif + +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \ + !BOOST_WORKAROUND(__GNUC__, < 3) \ + /**/ + using namespace range_detail; +#endif + + return range_calculate_size(rng); + } + +} // namespace 'boost' + +#endif diff --git a/ThirdParty/boost-Subset/boost/range/size_type.hpp b/ThirdParty/boost-Subset/boost/range/size_type.hpp new file mode 100644 index 0000000000..f41c32128d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/size_type.hpp @@ -0,0 +1,95 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_SIZE_TYPE_HPP +#define BOOST_RANGE_SIZE_TYPE_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +namespace boost +{ + namespace detail + { + + ////////////////////////////////////////////////////////////////////////// + // default + ////////////////////////////////////////////////////////////////////////// + + template + class has_size_type + { + typedef char no_type; + struct yes_type { char dummy[2]; }; + + template + static yes_type test(BOOST_DEDUCED_TYPENAME C::size_type x); + + template + static no_type test(...); + + public: + static const bool value = sizeof(test(0)) == sizeof(yes_type); + }; + + template + struct range_size_ + { + typedef BOOST_DEDUCED_TYPENAME make_unsigned< + BOOST_DEDUCED_TYPENAME range_difference::type + >::type type; + }; + + template + struct range_size_< + C, + BOOST_DEDUCED_TYPENAME ::boost::enable_if, void>::type + > + { + typedef BOOST_DEDUCED_TYPENAME C::size_type type; + }; + + template >::value> + struct range_size + { }; + + template + struct range_size + : range_size_ + { }; + } + + template< class T > + struct range_size : + detail::range_size + { }; + + template< class T > + struct range_size : + detail::range_size + { }; + +} // namespace boost + + + +#endif diff --git a/ThirdParty/boost-Subset/boost/range/value_type.hpp b/ThirdParty/boost-Subset/boost/range/value_type.hpp new file mode 100644 index 0000000000..5a3187ec0e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/range/value_type.hpp @@ -0,0 +1,30 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_VALUE_TYPE_HPP +#define BOOST_RANGE_VALUE_TYPE_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include + +#include + +namespace boost +{ + template< class T > + struct range_value : iterator_value< typename range_iterator::type > + { }; +} + +#endif diff --git a/ThirdParty/boost-Subset/boost/ratio/config.hpp b/ThirdParty/boost-Subset/boost/ratio/config.hpp new file mode 100644 index 0000000000..992a256d81 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/ratio/config.hpp @@ -0,0 +1,92 @@ +// config.hpp ---------------------------------------------------------------// + +// Copyright 2012 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_RATIO_CONFIG_HPP +#define BOOST_RATIO_CONFIG_HPP + +#include +#include + + +#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__) +# if ! defined BOOST_NO_CXX11_U16STRING +# define BOOST_NO_CXX11_U16STRING +# endif +# if ! defined BOOST_NO_CXX11_U32STRING +# define BOOST_NO_CXX11_U32STRING +# endif +#endif + + +#if !defined BOOST_RATIO_VERSION +#define BOOST_RATIO_VERSION 1 +#else +#if BOOST_RATIO_VERSION!=1 && BOOST_RATIO_VERSION!=2 +#error "BOOST_RATIO_VERSION must be 1 or 2" +#endif +#endif + +#if BOOST_RATIO_VERSION==1 +#if ! defined BOOST_RATIO_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V2_0_0 +#define BOOST_RATIO_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0 +#endif +#endif + +#if BOOST_RATIO_VERSION==2 +#if ! defined BOOST_RATIO_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0 +#define BOOST_RATIO_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V2_0_0 +#endif +#endif + +#ifdef INTMAX_C +#define BOOST_RATIO_INTMAX_C(a) INTMAX_C(a) +#else +#define BOOST_RATIO_INTMAX_C(a) a##LL +#endif + +#ifdef UINTMAX_C +#define BOOST_RATIO_UINTMAX_C(a) UINTMAX_C(a) +#else +#define BOOST_RATIO_UINTMAX_C(a) a##ULL +#endif + +#define BOOST_RATIO_INTMAX_T_MAX (0x7FFFFFFFFFFFFFFELL) + + +#ifndef BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) static_assert(CND,MSG) +#elif defined(BOOST_RATIO_USES_STATIC_ASSERT) +#include +#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) BOOST_STATIC_ASSERT(CND) +#elif defined(BOOST_RATIO_USES_MPL_ASSERT) +#include +#include +#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) \ + BOOST_MPL_ASSERT_MSG(boost::mpl::bool_< (CND) >::type::value, MSG, TYPES) +#else +//~ #elif defined(BOOST_RATIO_USES_ARRAY_ASSERT) +#define BOOST_RATIO_CONCAT(A,B) A##B +#define BOOST_RATIO_NAME(A,B) BOOST_RATIO_CONCAT(A,B) +#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) static char BOOST_RATIO_NAME(__boost_ratio_test_,__LINE__)[(CND)?1:-1] +//~ #define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) +#endif + +#if !defined(BOOST_NO_CXX11_STATIC_ASSERT) || !defined(BOOST_RATIO_USES_MPL_ASSERT) +#define BOOST_RATIO_OVERFLOW_IN_ADD "overflow in ratio add" +#define BOOST_RATIO_OVERFLOW_IN_SUB "overflow in ratio sub" +#define BOOST_RATIO_OVERFLOW_IN_MUL "overflow in ratio mul" +#define BOOST_RATIO_OVERFLOW_IN_DIV "overflow in ratio div" +#define BOOST_RATIO_NUMERATOR_IS_OUT_OF_RANGE "ratio numerator is out of range" +#define BOOST_RATIO_DIVIDE_BY_0 "ratio divide by 0" +#define BOOST_RATIO_DENOMINATOR_IS_OUT_OF_RANGE "ratio denominator is out of range" +#endif + + +//#define BOOST_RATIO_EXTENSIONS + +#endif // header diff --git a/ThirdParty/boost-Subset/boost/ratio/detail/mpl/abs.hpp b/ThirdParty/boost-Subset/boost/ratio/detail/mpl/abs.hpp new file mode 100644 index 0000000000..91545888a9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/ratio/detail/mpl/abs.hpp @@ -0,0 +1,89 @@ +//////////////////////////////////////////////////////////////////// +// +// Copyright Vicente J. Botet Escriba 2010 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. +// +//////////////////////////////////////////////////////////////////// +#ifndef BOOST_MPL_ABS_HPP_INCLUDED +#define BOOST_MPL_ABS_HPP_INCLUDED + +#include +#include +#include +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && !defined(__CUDACC__) \ + && ( defined(BOOST_MSVC) \ + || BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \ + ) + +# define BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2 + +#endif + +namespace boost { namespace mpl { + +template< typename Tag > struct abs_impl; + +template< typename T > struct abs_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N) + > +struct abs + : abs_impl< + typename abs_tag::type + >::template apply::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1, abs, (N)) +}; + +BOOST_MPL_AUX_NA_SPEC(1, abs) + +template< + typename T + , T n1 + > +struct abs_c + : abs > +{ +}; + +#if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2) +namespace aux { +template< typename T, T n > struct abs_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n < 0 ? -n : n)); + typedef integral_c type; +}; +} +#endif + +template<> +struct abs_impl +{ +#if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2) + template< typename N > struct apply + : aux::abs_wknd< typename N::value_type, N::value > +#else + template< typename N > struct apply + : integral_c< typename N::value_type, ((N::value < 0) ? (-N::value) : N::value ) > +#endif + { + }; +}; + +}} + +#endif // BOOST_MPL_ABS_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/ratio/detail/mpl/gcd.hpp b/ThirdParty/boost-Subset/boost/ratio/detail/mpl/gcd.hpp new file mode 100644 index 0000000000..30ba1db91c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/ratio/detail/mpl/gcd.hpp @@ -0,0 +1,124 @@ +//////////////////////////////////////////////////////////////////// +// +// Copyright Vicente J. Botet Escriba 2010 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. +// +//////////////////////////////////////////////////////////////////// +#ifndef BOOST_MPL_GCD_HPP_INCLUDED +#define BOOST_MPL_GCD_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && !defined(__CUDACC__) \ + && ( defined(BOOST_MSVC) \ + || BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \ + ) + +# define BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2 + +#endif + +namespace boost { namespace mpl { + +template< typename Tag1, typename Tag2 > struct gcd_impl; + +template< typename T > struct gcd_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct gcd + : gcd_impl< + typename gcd_tag::type + , typename gcd_tag::type + >::template apply::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, gcd, (N1, N2)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, gcd) + +template< + typename T + , T n1 + , T n2 + > +struct gcd_c + : gcd,integral_c > +{ +}; + +namespace aux { + + // Workaround for error: the type of partial specialization template parameter constant "n2" + // depends on another template parameter + // Note: this solution could be wrong for n1 or n2 = [2**63 .. 2**64-1] +#if defined(BOOST_MPL_CFG_NO_DEPENDENT_NONTYPE_PARAMETER_IN_PARTIAL_SPEC) + + template< typename T1, boost::intmax_t n1, bool n1_is_0 + , typename T2, boost::intmax_t n2, bool n2_is_0 > + struct gcd_aux + : gcd_aux + {}; + + template + struct gcd_aux : integral_c + {}; + + template + struct gcd_aux : integral_c + {}; + +#else // defined(BOOST_MPL_CFG_NO_DEPENDENT_NONTYPE_PARAMETER_IN_PARTIAL_SPEC) + + template< typename T1, T1 n1, bool n1_is_0, typename T2, T2 n2, bool n2_is_0 > + struct gcd_aux + + : gcd_aux::type, + //~ T1, + (n1 % n2), (n1 % n2)==0> + {}; + + template + struct gcd_aux : integral_c + {}; + + template + struct gcd_aux : integral_c + {}; +#endif // defined(BOOST_MPL_CFG_NO_DEPENDENT_NONTYPE_PARAMETER_IN_PARTIAL_SPEC) +} + +template<> +struct gcd_impl +{ + template< typename N1, typename N2 > struct apply + : abs > + { + }; +}; + +}} + +#endif // BOOST_MPL_GCD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/ratio/detail/mpl/lcm.hpp b/ThirdParty/boost-Subset/boost/ratio/detail/mpl/lcm.hpp new file mode 100644 index 0000000000..1792660f06 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/ratio/detail/mpl/lcm.hpp @@ -0,0 +1,126 @@ +//////////////////////////////////////////////////////////////////// +// +// Copyright Vicente J. Botet Escriba 2010 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. +// +//////////////////////////////////////////////////////////////////// +#ifndef BOOST_MPL_LCM_HPP_INCLUDED +#define BOOST_MPL_LCM_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && !defined(__CUDACC__) \ + && ( defined(BOOST_MSVC) \ + || BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \ + ) + +# define BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2 + +#endif + +namespace boost { namespace mpl { + +template< typename Tag1, typename Tag2 > struct lcm_impl; + +template< typename T > struct lcm_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct lcm + : lcm_impl< + typename lcm_tag::type + , typename lcm_tag::type + >::template apply::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, lcm, (N1, N2)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, lcm) + +template< + typename T + , T n1 + , T n2 + > +struct lcm_c + : lcm,integral_c > +{ +}; + + +namespace aux { + // Workaround for error: the type of partial specialization template parameter constant "n2" + // depends on another template parameter + // Note: this solution could be wrong for n1 or n2 = [2**63 .. 2**64-1] + #if defined(BOOST_MPL_CFG_NO_DEPENDENT_NONTYPE_PARAMETER_IN_PARTIAL_SPEC) + template< typename T1, boost::intmax_t n1, bool n1_is_0 + , typename T2, boost::intmax_t n2, bool n2_is_0 > + struct lcm_aux + : abs::type, + ( n1 / gcd, integral_c >::value * n2 ) + > > + {}; + + template + struct lcm_aux : integral_c + {}; + + template + struct lcm_aux : integral_c + {}; + + +#else // defined(BOOST_MPL_CFG_NO_DEPENDENT_NONTYPE_PARAMETER_IN_PARTIAL_SPEC) + + + template< typename T1, T1 n1, bool n1_is_0, typename T2, T2 n2, bool n2_is_0 > + struct lcm_aux + + : abs::type, + ( n1 / gcd, integral_c >::value * n2 ) + > > + {}; + + template + struct lcm_aux : integral_c + {}; + + template + struct lcm_aux : integral_c + {}; +#endif // defined(BOOST_MPL_CFG_NO_DEPENDENT_NONTYPE_PARAMETER_IN_PARTIAL_SPEC) +} + +template<> +struct lcm_impl +{ + template< typename N1, typename N2 > struct apply + : abs > + { + }; +}; + +}} + +#endif // BOOST_MPL_LCM_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/ratio/detail/mpl/sign.hpp b/ThirdParty/boost-Subset/boost/ratio/detail/mpl/sign.hpp new file mode 100644 index 0000000000..fa1c555348 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/ratio/detail/mpl/sign.hpp @@ -0,0 +1,89 @@ +//////////////////////////////////////////////////////////////////// +// +// Copyright Vicente J. Botet Escriba 2010 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. +// +//////////////////////////////////////////////////////////////////// +#ifndef BOOST_MPL_SIGN_HPP_INCLUDED +#define BOOST_MPL_SIGN_HPP_INCLUDED + +#include +#include +#include +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && !defined(__CUDACC__) \ + && ( defined(BOOST_MSVC) \ + || BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \ + ) + +# define BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2 + +#endif + +namespace boost { namespace mpl { + +template< typename Tag > struct sign_impl; + +template< typename T > struct sign_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N) + > +struct sign + : sign_impl< + typename sign_tag::type + >::template apply::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1, sign, (N)) +}; + +BOOST_MPL_AUX_NA_SPEC(1, sign) + +template< + typename T + , T n1 + > +struct sign_c + : sign > +{ +}; + +#if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2) +namespace aux { +template< typename T, T n > struct sign_wknd +{ + BOOST_STATIC_CONSTANT(T, value = (n == 0 ? 0 : (n < 0 ? -1 : 1))); + typedef integral_c type; +}; +} +#endif + +template<> +struct sign_impl +{ +#if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2) + template< typename N > struct apply + : aux::sign_wknd< typename N::value_type, N::value > +#else + template< typename N > struct apply + : integral_c< typename N::value_type, (N::value == 0 ? 0 : (N::value < 0 ? -1 : 1)) > +#endif + { + }; +}; + +}} + +#endif // BOOST_MPL_SIGN_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/ratio/detail/overflow_helpers.hpp b/ThirdParty/boost-Subset/boost/ratio/detail/overflow_helpers.hpp new file mode 100644 index 0000000000..ffaa603a65 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/ratio/detail/overflow_helpers.hpp @@ -0,0 +1,367 @@ +// ratio.hpp ---------------------------------------------------------------// + +// Copyright 2008 Howard Hinnant +// Copyright 2008 Beman Dawes +// Copyright 2009 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +/* + +This code was derived by Beman Dawes from Howard Hinnant's time2_demo prototype. +Many thanks to Howard for making his code available under the Boost license. +The original code was modified to conform to Boost conventions and to section +20.4 Compile-time rational arithmetic [ratio], of the C++ committee working +paper N2798. +See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf. + +time2_demo contained this comment: + + Much thanks to Andrei Alexandrescu, + Walter Brown, + Peter Dimov, + Jeff Garland, + Terry Golubiewski, + Daniel Krugler, + Anthony Williams. +*/ + +// The way overflow is managed for ratio_less is taken from llvm/libcxx/include/ratio + +#ifndef BOOST_RATIO_DETAIL_RATIO_OPERATIONS_HPP +#define BOOST_RATIO_DETAIL_RATIO_OPERATIONS_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// +// We simply cannot include this header on gcc without getting copious warnings of the kind: +// +// boost/integer.hpp:77:30: warning: use of C99 long long integer constant +// +// And yet there is no other reasonable implementation, so we declare this a system header +// to suppress these warnings. +// +#if defined(__GNUC__) && (__GNUC__ >= 4) +#pragma GCC system_header +#endif + +namespace boost +{ + +//----------------------------------------------------------------------------// +// helpers // +//----------------------------------------------------------------------------// + +namespace ratio_detail +{ + + template ::value> + class br_add; + + template + class br_add + { + static const boost::intmax_t min = boost::integer_traits::const_min; + static const boost::intmax_t max = boost::integer_traits::const_max; + + BOOST_RATIO_STATIC_ASSERT(X <= max - Y , BOOST_RATIO_OVERFLOW_IN_ADD, ()); + public: + static const boost::intmax_t value = X + Y; + }; + + template + class br_add + { + public: + static const boost::intmax_t value = X; + }; + + template + class br_add + { + static const boost::intmax_t min = boost::integer_traits::const_min; + static const boost::intmax_t max = boost::integer_traits::const_max; + + BOOST_RATIO_STATIC_ASSERT(min - Y <= X, BOOST_RATIO_OVERFLOW_IN_ADD, ()); + public: + static const boost::intmax_t value = X + Y; + }; + + template ::value> + class br_sub; + + template + class br_sub + { + static const boost::intmax_t min = boost::integer_traits::const_min; + static const boost::intmax_t max = boost::integer_traits::const_max; + + BOOST_RATIO_STATIC_ASSERT(min + Y <= X, BOOST_RATIO_OVERFLOW_IN_SUB, ()); + public: + static const boost::intmax_t value = X - Y; + }; + + template + class br_sub + { + public: + static const boost::intmax_t value = X; + }; + + template + class br_sub + { + static const boost::intmax_t min = boost::integer_traits::const_min; + static const boost::intmax_t max = boost::integer_traits::const_max; + + BOOST_RATIO_STATIC_ASSERT(X <= max + Y, BOOST_RATIO_OVERFLOW_IN_SUB, ()); + public: + static const boost::intmax_t value = X - Y; + }; + + template + class br_mul + { + static const boost::intmax_t nan = + boost::intmax_t(BOOST_RATIO_UINTMAX_C(1) << (sizeof(boost::intmax_t) * CHAR_BIT - 1)); + static const boost::intmax_t min = boost::integer_traits::const_min; + static const boost::intmax_t max = boost::integer_traits::const_max; + + static const boost::intmax_t a_x = mpl::abs_c::value; + static const boost::intmax_t a_y = mpl::abs_c::value; + + BOOST_RATIO_STATIC_ASSERT(X != nan, BOOST_RATIO_OVERFLOW_IN_MUL, ()); + BOOST_RATIO_STATIC_ASSERT(Y != nan, BOOST_RATIO_OVERFLOW_IN_MUL, ()); + BOOST_RATIO_STATIC_ASSERT(a_x <= max / a_y, BOOST_RATIO_OVERFLOW_IN_MUL, ()); + public: + static const boost::intmax_t value = X * Y; + }; + + template + class br_mul<0, Y> + { + public: + static const boost::intmax_t value = 0; + }; + + template + class br_mul + { + public: + static const boost::intmax_t value = 0; + }; + + template <> + class br_mul<0, 0> + { + public: + static const boost::intmax_t value = 0; + }; + + // Not actually used but left here in case needed in future maintenance + template + class br_div + { + static const boost::intmax_t nan = boost::intmax_t(BOOST_RATIO_UINTMAX_C(1) << (sizeof(boost::intmax_t) * CHAR_BIT - 1)); + static const boost::intmax_t min = boost::integer_traits::const_min; + static const boost::intmax_t max = boost::integer_traits::const_max; + + BOOST_RATIO_STATIC_ASSERT(X != nan, BOOST_RATIO_OVERFLOW_IN_DIV, ()); + BOOST_RATIO_STATIC_ASSERT(Y != nan, BOOST_RATIO_OVERFLOW_IN_DIV, ()); + BOOST_RATIO_STATIC_ASSERT(Y != 0, BOOST_RATIO_DIVIDE_BY_0, ()); + public: + static const boost::intmax_t value = X / Y; + }; + + // ratio arithmetic + template struct ratio_add; + template struct ratio_subtract; + template struct ratio_multiply; + template struct ratio_divide; + + template + struct ratio_add + { + //The nested typedef type shall be a synonym for ratio::type where T1 has the value R1::num * + //R2::den + R2::num * R1::den and T2 has the value R1::den * R2::den. + // As the preceding doesn't works because of overflow on boost::intmax_t we need something more elaborated. + private: + static const boost::intmax_t gcd_n1_n2 = mpl::gcd_c::value; + static const boost::intmax_t gcd_d1_d2 = mpl::gcd_c::value; + public: + // No need to normalize as ratio_multiply is already normalized + typedef typename ratio_multiply + < + ratio, + ratio + < + boost::ratio_detail::br_add + < + boost::ratio_detail::br_mul::value, + boost::ratio_detail::br_mul::value + >::value, + R2::den + > + >::type type; + }; + template + struct ratio_add > + { + typedef R type; + }; + + template + struct ratio_subtract + { + //The nested typedef type shall be a synonym for ratio::type where T1 has the value + // R1::num *R2::den - R2::num * R1::den and T2 has the value R1::den * R2::den. + // As the preceding doesn't works because of overflow on boost::intmax_t we need something more elaborated. + private: + static const boost::intmax_t gcd_n1_n2 = mpl::gcd_c::value; + static const boost::intmax_t gcd_d1_d2 = mpl::gcd_c::value; + public: + // No need to normalize as ratio_multiply is already normalized + typedef typename ratio_multiply + < + ratio, + ratio + < + boost::ratio_detail::br_sub + < + boost::ratio_detail::br_mul::value, + boost::ratio_detail::br_mul::value + >::value, + R2::den + > + >::type type; + }; + + template + struct ratio_subtract > + { + typedef R type; + }; + + template + struct ratio_multiply + { + // The nested typedef type shall be a synonym for ratio::type. + // As the preceding doesn't works because of overflow on boost::intmax_t we need something more elaborated. + private: + static const boost::intmax_t gcd_n1_d2 = mpl::gcd_c::value; + static const boost::intmax_t gcd_d1_n2 = mpl::gcd_c::value; + public: + typedef typename ratio + < + boost::ratio_detail::br_mul::value, + boost::ratio_detail::br_mul::value + >::type type; + }; + + template + struct ratio_divide + { + // The nested typedef type shall be a synonym for ratio::type. + // As the preceding doesn't works because of overflow on boost::intmax_t we need something more elaborated. + private: + static const boost::intmax_t gcd_n1_n2 = mpl::gcd_c::value; + static const boost::intmax_t gcd_d1_d2 = mpl::gcd_c::value; + public: + typedef typename ratio + < + boost::ratio_detail::br_mul::value, + boost::ratio_detail::br_mul::value + >::type type; + }; + template + struct is_evenly_divisible_by + { + private: + static const boost::intmax_t gcd_n1_n2 = mpl::gcd_c::value; + static const boost::intmax_t gcd_d1_d2 = mpl::gcd_c::value; + public: + typedef integral_constant type; + }; + + template + struct is_ratio : public boost::false_type + {}; + template + struct is_ratio > : public boost::true_type + {}; + + template + struct ratio_less1 + { + static const bool value = Q1 < Q2; + }; + + template + struct ratio_less1 + { + static const bool value = false; + }; + + template + struct ratio_less1 + { + static const bool value = true; + }; + + template + struct ratio_less1 + { + static const bool value = false; + }; + + template + struct ratio_less1 + { + static const bool value = ratio_less1, ratio + >::value; + }; + + template < + class R1, + class R2, + boost::intmax_t S1 = mpl::sign_c::value, + boost::intmax_t S2 = mpl::sign_c::value +> + struct ratio_less + { + static const bool value = S1 < S2; + }; + + template + struct ratio_less + { + static const bool value = ratio_less1::value; + }; + + template + struct ratio_less + { + static const bool value = ratio_less1, + ratio<-R1::num, R1::den> >::value; + }; + + +} // namespace ratio_detail + +} // namespace boost + +#endif // BOOST_RATIO_HPP diff --git a/ThirdParty/boost-Subset/boost/ratio/mpl/rational_c_tag.hpp b/ThirdParty/boost-Subset/boost/ratio/mpl/rational_c_tag.hpp new file mode 100644 index 0000000000..743766ffa0 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/ratio/mpl/rational_c_tag.hpp @@ -0,0 +1,25 @@ +// abs.hpp +// +// (C) Copyright 2011 Vicente J. Botet Escriba +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// + +#ifndef BOOST_RATIO_MPL_RATIONAL_C_TAG_HPP +#define BOOST_RATIO_MPL_RATIONAL_C_TAG_HPP + +#ifdef BOOST_RATIO_EXTENSIONS + +#include + +namespace boost { +namespace mpl { + +struct rational_c_tag : int_<10> {}; + +} +} + +#endif // BOOST_RATIO_EXTENSIONS +#endif // BOOST_RATIO_MPL_RATIONAL_C_TAG_HPP diff --git a/ThirdParty/boost-Subset/boost/ratio/ratio.hpp b/ThirdParty/boost-Subset/boost/ratio/ratio.hpp new file mode 100644 index 0000000000..824cbf0173 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/ratio/ratio.hpp @@ -0,0 +1,293 @@ +// ratio.hpp ---------------------------------------------------------------// + +// Copyright 2008 Howard Hinnant +// Copyright 2008 Beman Dawes +// Copyright 2009 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +/* + +This code was derived by Beman Dawes from Howard Hinnant's time2_demo prototype. +Many thanks to Howard for making his code available under the Boost license. +The original code was modified to conform to Boost conventions and to section +20.4 Compile-time rational arithmetic [ratio], of the C++ committee working +paper N2798. +See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf. + +time2_demo contained this comment: + + Much thanks to Andrei Alexandrescu, + Walter Brown, + Peter Dimov, + Jeff Garland, + Terry Golubiewski, + Daniel Krugler, + Anthony Williams. +*/ + +// The way overflow is managed for ratio_less is taken from llvm/libcxx/include/ratio + +#ifndef BOOST_RATIO_RATIO_HPP +#define BOOST_RATIO_RATIO_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef BOOST_RATIO_EXTENSIONS +#include +#include +#endif + +// +// We simply cannot include this header on gcc without getting copious warnings of the kind: +// +// boost/integer.hpp:77:30: warning: use of C99 long long integer constant +// +// And yet there is no other reasonable implementation, so we declare this a system header +// to suppress these warnings. +// +#if defined(__GNUC__) && (__GNUC__ >= 4) +#pragma GCC system_header +#endif + +namespace boost +{ + + +//----------------------------------------------------------------------------// +// // +// 20.6.1 Class template ratio [ratio.ratio] // +// // +//----------------------------------------------------------------------------// + +template +class ratio +{ + static const boost::intmax_t ABS_N = mpl::abs_c::value; + static const boost::intmax_t ABS_D = mpl::abs_c::value; + BOOST_RATIO_STATIC_ASSERT(ABS_N >= 0, BOOST_RATIO_NUMERATOR_IS_OUT_OF_RANGE, ()); + BOOST_RATIO_STATIC_ASSERT(ABS_D > 0, BOOST_RATIO_DENOMINATOR_IS_OUT_OF_RANGE, ()); + BOOST_RATIO_STATIC_ASSERT(D != 0, BOOST_RATIO_DIVIDE_BY_0 , ()); + static const boost::intmax_t SIGN_N = mpl::sign_c::value + * mpl::sign_c::value; + static const boost::intmax_t GCD = mpl::gcd_c::value; +public: + BOOST_STATIC_CONSTEXPR boost::intmax_t num = SIGN_N * ABS_N / GCD; + BOOST_STATIC_CONSTEXPR boost::intmax_t den = ABS_D / GCD; + +#ifdef BOOST_RATIO_EXTENSIONS + typedef mpl::rational_c_tag tag; + typedef boost::rational value_type; + typedef boost::intmax_t num_type; + typedef boost::intmax_t den_type; + ratio() + {} + template + ratio(const ratio<_N2, _D2>&, + typename enable_if_c + < + (ratio<_N2, _D2>::num == num && + ratio<_N2, _D2>::den == den) + >::type* = 0) + {} + + template + typename enable_if_c + < + (ratio<_N2, _D2>::num == num && + ratio<_N2, _D2>::den == den), + ratio& + >::type + operator=(const ratio<_N2, _D2>&) {return *this;} + + static value_type value() {return value_type(num,den);} + value_type operator()() const {return value();} +#endif + typedef ratio type; +}; + +#if defined(BOOST_NO_CXX11_CONSTEXPR) +template +const boost::intmax_t ratio::num; +template +const boost::intmax_t ratio::den; +#endif + +//----------------------------------------------------------------------------// +// // +// 20.6.2 Arithmetic on ratio types [ratio.arithmetic] // +// // +//----------------------------------------------------------------------------// + +template +struct ratio_add +: boost::ratio_detail::ratio_add::type +{ +}; + +template +struct ratio_subtract +: boost::ratio_detail::ratio_subtract::type +{ +}; + +template +struct ratio_multiply +: boost::ratio_detail::ratio_multiply::type +{ +}; + +template +struct ratio_divide +: boost::ratio_detail::ratio_divide::type +{ +}; + +//----------------------------------------------------------------------------// +// // +// 20.6.3 Comparision of ratio types [ratio.comparison] // +// // +//----------------------------------------------------------------------------// + +// ratio_equal + +template +struct ratio_equal + : public boost::integral_constant +{}; + +template +struct ratio_not_equal + : public boost::integral_constant::value> +{}; + +// ratio_less + +template +struct ratio_less + : boost::integral_constant::value> +{}; + +template +struct ratio_less_equal + : boost::integral_constant::value> +{}; + +template +struct ratio_greater + : boost::integral_constant::value> +{}; + +template +struct ratio_greater_equal + : boost::integral_constant::value> +{}; + +template +struct ratio_gcd : + ratio::value, + mpl::lcm_c::value>::type +{ +}; + + //----------------------------------------------------------------------------// + // // + // More arithmetic on ratio types [ratio.arithmetic] // + // // + //----------------------------------------------------------------------------// + +#ifdef BOOST_RATIO_EXTENSIONS +template +struct ratio_negate + : ratio<-R::num, R::den>::type +{ +}; +template +struct ratio_abs + : ratio::value, R::den>::type +{ +}; +template +struct ratio_sign + : mpl::sign_c +{ +}; + +template +struct ratio_inverse + : ratio::type +{ +}; + + +template +struct ratio_lcm : + ratio::value, + mpl::gcd_c::value>::type +{ +}; + +template +struct ratio_modulo : + ratio<(R1::num * R2::den) % (R2::num * R1::den), R1::den * R2::den>::type +{ +}; + +namespace detail { + template + struct ratio_min : R1 {}; + template + struct ratio_min : R2 {}; + + template + struct ratio_max : R2 {}; + template + struct ratio_max : R1 {}; +} + +template +struct ratio_min : detail::ratio_min::value>::type +{ +}; + +template +struct ratio_max : detail::ratio_max::value>::type +{ +}; + +template +struct ratio_power : + ratio_multiply< + typename ratio_power::type, + typename ratio_power::type, p/2>::type + >::type +{}; + +template +struct ratio_power : ratio<1>::type {}; + +template +struct ratio_power : R {}; + +template +struct ratio_power : ratio_divide, R>::type {}; + +#endif +} // namespace boost + + +#endif // BOOST_RATIO_RATIO_HPP diff --git a/ThirdParty/boost-Subset/boost/ratio/ratio_fwd.hpp b/ThirdParty/boost-Subset/boost/ratio/ratio_fwd.hpp new file mode 100644 index 0000000000..cd9199f393 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/ratio/ratio_fwd.hpp @@ -0,0 +1,109 @@ +// ratio_fwd.hpp ---------------------------------------------------------------// + +// Copyright 2008 Howard Hinnant +// Copyright 2008 Beman Dawes +// Copyright 2009 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +/* + +This code was derived by Beman Dawes from Howard Hinnant's time2_demo prototype. +Many thanks to Howard for making his code available under the Boost license. +The original code was modified to conform to Boost conventions and to section +20.4 Compile-time rational arithmetic [ratio], of the C++ committee working +paper N2798. +See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf. + +time2_demo contained this comment: + + Much thanks to Andrei Alexandrescu, + Walter Brown, + Peter Dimov, + Jeff Garland, + Terry Golubiewski, + Daniel Krugler, + Anthony Williams. +*/ + +// The way overflow is managed for ratio_less is taken from llvm/libcxx/include/ratio + +#ifndef BOOST_RATIO_RATIO_FWD_HPP +#define BOOST_RATIO_RATIO_FWD_HPP + +#include + +#if defined(__GNUC__) && (__GNUC__ >= 4) +#pragma GCC system_header +#endif + +namespace boost +{ + +//----------------------------------------------------------------------------// +// // +// 20.6 Compile-time rational arithmetic [ratio] // +// // +//----------------------------------------------------------------------------// + +// ratio +template class ratio; + +// ratio arithmetic +template struct ratio_add; +template struct ratio_subtract; +template struct ratio_multiply; +template struct ratio_divide; +#ifdef BOOST_RATIO_EXTENSIONS +template struct ratio_gcd; +template struct ratio_lcm; +template struct ratio_negate; +template struct ratio_abs; +template struct ratio_sign; +template struct ratio_power; +#endif + +// ratio comparison +template struct ratio_equal; +template struct ratio_not_equal; +template struct ratio_less; +template struct ratio_less_equal; +template struct ratio_greater; +template struct ratio_greater_equal; + +// convenience SI typedefs +typedef ratio atto; +typedef ratio femto; +typedef ratio pico; +typedef ratio nano; +typedef ratio micro; +typedef ratio milli; +typedef ratio centi; +typedef ratio deci; +typedef ratio< BOOST_RATIO_INTMAX_C(10), BOOST_RATIO_INTMAX_C(1)> deca; +typedef ratio< BOOST_RATIO_INTMAX_C(100), BOOST_RATIO_INTMAX_C(1)> hecto; +typedef ratio< BOOST_RATIO_INTMAX_C(1000), BOOST_RATIO_INTMAX_C(1)> kilo; +typedef ratio< BOOST_RATIO_INTMAX_C(1000000), BOOST_RATIO_INTMAX_C(1)> mega; +typedef ratio< BOOST_RATIO_INTMAX_C(1000000000), BOOST_RATIO_INTMAX_C(1)> giga; +typedef ratio< BOOST_RATIO_INTMAX_C(1000000000000), BOOST_RATIO_INTMAX_C(1)> tera; +typedef ratio< BOOST_RATIO_INTMAX_C(1000000000000000), BOOST_RATIO_INTMAX_C(1)> peta; +typedef ratio exa; + +#ifdef BOOST_RATIO_EXTENSIONS + +#define BOOST_RATIO_1024 BOOST_RATIO_INTMAX_C(1024) + +// convenience IEC typedefs +typedef ratio< BOOST_RATIO_1024> kibi; +typedef ratio< BOOST_RATIO_1024*BOOST_RATIO_1024> mebi; +typedef ratio< BOOST_RATIO_1024*BOOST_RATIO_1024*BOOST_RATIO_1024> gibi; +typedef ratio< BOOST_RATIO_1024*BOOST_RATIO_1024*BOOST_RATIO_1024*BOOST_RATIO_1024> tebi; +typedef ratio< BOOST_RATIO_1024*BOOST_RATIO_1024*BOOST_RATIO_1024*BOOST_RATIO_1024*BOOST_RATIO_1024> pebi; +typedef ratio exbi; + +#endif +} // namespace boost + + +#endif // BOOST_RATIO_HPP diff --git a/ThirdParty/boost-Subset/boost/rational.hpp b/ThirdParty/boost-Subset/boost/rational.hpp new file mode 100644 index 0000000000..5977822b6d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/rational.hpp @@ -0,0 +1,677 @@ +// Boost rational.hpp header file ------------------------------------------// + +// (C) Copyright Paul Moore 1999. Permission to copy, use, modify, sell and +// distribute this software is granted provided this copyright notice appears +// in all copies. This software is provided "as is" without express or +// implied warranty, and with no claim as to its suitability for any purpose. + +// boostinspect:nolicense (don't complain about the lack of a Boost license) +// (Paul Moore hasn't been in contact for years, so there's no way to change the +// license.) + +// See http://www.boost.org/libs/rational for documentation. + +// Credits: +// Thanks to the boost mailing list in general for useful comments. +// Particular contributions included: +// Andrew D Jewell, for reminding me to take care to avoid overflow +// Ed Brey, for many comments, including picking up on some dreadful typos +// Stephen Silver contributed the test suite and comments on user-defined +// IntType +// Nickolay Mladenov, for the implementation of operator+= + +// Revision History +// 02 Sep 13 Remove unneeded forward declarations; tweak private helper +// function (Daryle Walker) +// 30 Aug 13 Improve exception safety of "assign"; start modernizing I/O code +// (Daryle Walker) +// 27 Aug 13 Add cross-version constructor template, plus some private helper +// functions; add constructor to exception class to take custom +// messages (Daryle Walker) +// 25 Aug 13 Add constexpr qualification wherever possible (Daryle Walker) +// 05 May 12 Reduced use of implicit gcd (Mario Lang) +// 05 Nov 06 Change rational_cast to not depend on division between different +// types (Daryle Walker) +// 04 Nov 06 Off-load GCD and LCM to Boost.Math; add some invariant checks; +// add std::numeric_limits<> requirement to help GCD (Daryle Walker) +// 31 Oct 06 Recoded both operator< to use round-to-negative-infinity +// divisions; the rational-value version now uses continued fraction +// expansion to avoid overflows, for bug #798357 (Daryle Walker) +// 20 Oct 06 Fix operator bool_type for CW 8.3 (Joaquín M López Muñoz) +// 18 Oct 06 Use EXPLICIT_TEMPLATE_TYPE helper macros from Boost.Config +// (Joaquín M López Muñoz) +// 27 Dec 05 Add Boolean conversion operator (Daryle Walker) +// 28 Sep 02 Use _left versions of operators from operators.hpp +// 05 Jul 01 Recode gcd(), avoiding std::swap (Helmut Zeisel) +// 03 Mar 01 Workarounds for Intel C++ 5.0 (David Abrahams) +// 05 Feb 01 Update operator>> to tighten up input syntax +// 05 Feb 01 Final tidy up of gcd code prior to the new release +// 27 Jan 01 Recode abs() without relying on abs(IntType) +// 21 Jan 01 Include Nickolay Mladenov's operator+= algorithm, +// tidy up a number of areas, use newer features of operators.hpp +// (reduces space overhead to zero), add operator!, +// introduce explicit mixed-mode arithmetic operations +// 12 Jan 01 Include fixes to handle a user-defined IntType better +// 19 Nov 00 Throw on divide by zero in operator /= (John (EBo) David) +// 23 Jun 00 Incorporate changes from Mark Rodgers for Borland C++ +// 22 Jun 00 Change _MSC_VER to BOOST_MSVC so other compilers are not +// affected (Beman Dawes) +// 6 Mar 00 Fix operator-= normalization, #include (Jens Maurer) +// 14 Dec 99 Modifications based on comments from the boost list +// 09 Dec 99 Initial Version (Paul Moore) + +#ifndef BOOST_RATIONAL_HPP +#define BOOST_RATIONAL_HPP + +#include // for BOOST_NO_STDC_NAMESPACE, BOOST_MSVC, etc +#ifndef BOOST_NO_IOSTREAM +#include // for std::setw +#include // for std::noskipws, streamsize +#include // for std::istream +#include // for std::ostream +#include // for std::ostringstream +#endif +#include // for NULL +#include // for std::domain_error +#include // for std::string implicit constructor +#include // for boost::addable etc +#include // for std::abs +#include // for boost::call_traits +#include // for BOOST_WORKAROUND +#include // for BOOST_ASSERT +#include // for boost::integer::gcd, lcm +#include // for std::numeric_limits +#include // for BOOST_STATIC_ASSERT + +// Control whether depreciated GCD and LCM functions are included (default: yes) +#ifndef BOOST_CONTROL_RATIONAL_HAS_GCD +#define BOOST_CONTROL_RATIONAL_HAS_GCD 1 +#endif + +namespace boost { + +#if BOOST_CONTROL_RATIONAL_HAS_GCD +template +IntType gcd(IntType n, IntType m) +{ + // Defer to the version in Boost.Math + return integer::gcd( n, m ); +} + +template +IntType lcm(IntType n, IntType m) +{ + // Defer to the version in Boost.Math + return integer::lcm( n, m ); +} +#endif // BOOST_CONTROL_RATIONAL_HAS_GCD + +class bad_rational : public std::domain_error +{ +public: + explicit bad_rational() : std::domain_error("bad rational: zero denominator") {} + explicit bad_rational( char const *what ) : std::domain_error( what ) {} +}; + +template +class rational : + less_than_comparable < rational, + equality_comparable < rational, + less_than_comparable2 < rational, IntType, + equality_comparable2 < rational, IntType, + addable < rational, + subtractable < rational, + multipliable < rational, + dividable < rational, + addable2 < rational, IntType, + subtractable2 < rational, IntType, + subtractable2_left < rational, IntType, + multipliable2 < rational, IntType, + dividable2 < rational, IntType, + dividable2_left < rational, IntType, + incrementable < rational, + decrementable < rational + > > > > > > > > > > > > > > > > +{ + // Class-wide pre-conditions + BOOST_STATIC_ASSERT( ::std::numeric_limits::is_specialized ); + + // Helper types + typedef typename boost::call_traits::param_type param_type; + + struct helper { IntType parts[2]; }; + typedef IntType (helper::* bool_type)[2]; + +public: + // Component type + typedef IntType int_type; + + BOOST_CONSTEXPR + rational() : num(0), den(1) {} + BOOST_CONSTEXPR + rational(param_type n) : num(n), den(1) {} + rational(param_type n, param_type d) : num(n), den(d) { normalize(); } + +#ifndef BOOST_NO_MEMBER_TEMPLATES + template < typename NewType > + BOOST_CONSTEXPR explicit + rational( rational const &r ) + : num( r.numerator() ), den( is_normalized(int_type( r.numerator() ), + int_type( r.denominator() )) ? r.denominator() : + throw bad_rational("bad rational: denormalized conversion") ) + {} +#endif + + // Default copy constructor and assignment are fine + + // Add assignment from IntType + rational& operator=(param_type i) { num = i; den = 1; return *this; } + + // Assign in place + rational& assign(param_type n, param_type d); + + // Access to representation + BOOST_CONSTEXPR + IntType numerator() const { return num; } + BOOST_CONSTEXPR + IntType denominator() const { return den; } + + // Arithmetic assignment operators + rational& operator+= (const rational& r); + rational& operator-= (const rational& r); + rational& operator*= (const rational& r); + rational& operator/= (const rational& r); + + rational& operator+= (param_type i) { num += i * den; return *this; } + rational& operator-= (param_type i) { num -= i * den; return *this; } + rational& operator*= (param_type i); + rational& operator/= (param_type i); + + // Increment and decrement + const rational& operator++() { num += den; return *this; } + const rational& operator--() { num -= den; return *this; } + + // Operator not + BOOST_CONSTEXPR + bool operator!() const { return !num; } + + // Boolean conversion + +#if BOOST_WORKAROUND(__MWERKS__,<=0x3003) + // The "ISO C++ Template Parser" option in CW 8.3 chokes on the + // following, hence we selectively disable that option for the + // offending memfun. +#pragma parse_mfunc_templ off +#endif + + BOOST_CONSTEXPR + operator bool_type() const { return operator !() ? 0 : &helper::parts; } + +#if BOOST_WORKAROUND(__MWERKS__,<=0x3003) +#pragma parse_mfunc_templ reset +#endif + + // Comparison operators + bool operator< (const rational& r) const; + BOOST_CONSTEXPR + bool operator== (const rational& r) const; + + bool operator< (param_type i) const; + bool operator> (param_type i) const; + BOOST_CONSTEXPR + bool operator== (param_type i) const; + +private: + // Implementation - numerator and denominator (normalized). + // Other possibilities - separate whole-part, or sign, fields? + IntType num; + IntType den; + + // Helper functions + static BOOST_CONSTEXPR + int_type inner_gcd( param_type a, param_type b, int_type const &zero = + int_type(0) ) + { return b == zero ? a : inner_gcd(b, a % b, zero); } + + static BOOST_CONSTEXPR + int_type inner_abs( param_type x, int_type const &zero = int_type(0) ) + { return x < zero ? -x : +x; } + + // Representation note: Fractions are kept in normalized form at all + // times. normalized form is defined as gcd(num,den) == 1 and den > 0. + // In particular, note that the implementation of abs() below relies + // on den always being positive. + bool test_invariant() const; + void normalize(); + + static BOOST_CONSTEXPR + bool is_normalized( param_type n, param_type d, int_type const &zero = + int_type(0), int_type const &one = int_type(1) ) + { + return d > zero && ( n != zero || d == one ) && inner_abs( inner_gcd(n, + d, zero), zero ) == one; + } +}; + +// Assign in place +template +inline rational& rational::assign(param_type n, param_type d) +{ + return *this = rational( n, d ); +} + +// Unary plus and minus +template +BOOST_CONSTEXPR +inline rational operator+ (const rational& r) +{ + return r; +} + +template +inline rational operator- (const rational& r) +{ + return rational(-r.numerator(), r.denominator()); +} + +// Arithmetic assignment operators +template +rational& rational::operator+= (const rational& r) +{ + // This calculation avoids overflow, and minimises the number of expensive + // calculations. Thanks to Nickolay Mladenov for this algorithm. + // + // Proof: + // We have to compute a/b + c/d, where gcd(a,b)=1 and gcd(b,c)=1. + // Let g = gcd(b,d), and b = b1*g, d=d1*g. Then gcd(b1,d1)=1 + // + // The result is (a*d1 + c*b1) / (b1*d1*g). + // Now we have to normalize this ratio. + // Let's assume h | gcd((a*d1 + c*b1), (b1*d1*g)), and h > 1 + // If h | b1 then gcd(h,d1)=1 and hence h|(a*d1+c*b1) => h|a. + // But since gcd(a,b1)=1 we have h=1. + // Similarly h|d1 leads to h=1. + // So we have that h | gcd((a*d1 + c*b1) , (b1*d1*g)) => h|g + // Finally we have gcd((a*d1 + c*b1), (b1*d1*g)) = gcd((a*d1 + c*b1), g) + // Which proves that instead of normalizing the result, it is better to + // divide num and den by gcd((a*d1 + c*b1), g) + + // Protect against self-modification + IntType r_num = r.num; + IntType r_den = r.den; + + IntType g = integer::gcd(den, r_den); + den /= g; // = b1 from the calculations above + num = num * (r_den / g) + r_num * den; + g = integer::gcd(num, g); + num /= g; + den *= r_den/g; + + return *this; +} + +template +rational& rational::operator-= (const rational& r) +{ + // Protect against self-modification + IntType r_num = r.num; + IntType r_den = r.den; + + // This calculation avoids overflow, and minimises the number of expensive + // calculations. It corresponds exactly to the += case above + IntType g = integer::gcd(den, r_den); + den /= g; + num = num * (r_den / g) - r_num * den; + g = integer::gcd(num, g); + num /= g; + den *= r_den/g; + + return *this; +} + +template +rational& rational::operator*= (const rational& r) +{ + // Protect against self-modification + IntType r_num = r.num; + IntType r_den = r.den; + + // Avoid overflow and preserve normalization + IntType gcd1 = integer::gcd(num, r_den); + IntType gcd2 = integer::gcd(r_num, den); + num = (num/gcd1) * (r_num/gcd2); + den = (den/gcd2) * (r_den/gcd1); + return *this; +} + +template +rational& rational::operator/= (const rational& r) +{ + // Protect against self-modification + IntType r_num = r.num; + IntType r_den = r.den; + + // Avoid repeated construction + IntType zero(0); + + // Trap division by zero + if (r_num == zero) + throw bad_rational(); + if (num == zero) + return *this; + + // Avoid overflow and preserve normalization + IntType gcd1 = integer::gcd(num, r_num); + IntType gcd2 = integer::gcd(r_den, den); + num = (num/gcd1) * (r_den/gcd2); + den = (den/gcd2) * (r_num/gcd1); + + if (den < zero) { + num = -num; + den = -den; + } + return *this; +} + +// Mixed-mode operators +template +inline rational& +rational::operator*= (param_type i) +{ + // Avoid overflow and preserve normalization + IntType gcd = integer::gcd(i, den); + num *= i / gcd; + den /= gcd; + + return *this; +} + +template +rational& +rational::operator/= (param_type i) +{ + // Avoid repeated construction + IntType const zero(0); + + if (i == zero) throw bad_rational(); + if (num == zero) return *this; + + // Avoid overflow and preserve normalization + IntType const gcd = integer::gcd(num, i); + num /= gcd; + den *= i / gcd; + + if (den < zero) { + num = -num; + den = -den; + } + + return *this; +} + +// Comparison operators +template +bool rational::operator< (const rational& r) const +{ + // Avoid repeated construction + int_type const zero( 0 ); + + // This should really be a class-wide invariant. The reason for these + // checks is that for 2's complement systems, INT_MIN has no corresponding + // positive, so negating it during normalization keeps it INT_MIN, which + // is bad for later calculations that assume a positive denominator. + BOOST_ASSERT( this->den > zero ); + BOOST_ASSERT( r.den > zero ); + + // Determine relative order by expanding each value to its simple continued + // fraction representation using the Euclidian GCD algorithm. + struct { int_type n, d, q, r; } + ts = { this->num, this->den, static_cast(this->num / this->den), + static_cast(this->num % this->den) }, + rs = { r.num, r.den, static_cast(r.num / r.den), + static_cast(r.num % r.den) }; + unsigned reverse = 0u; + + // Normalize negative moduli by repeatedly adding the (positive) denominator + // and decrementing the quotient. Later cycles should have all positive + // values, so this only has to be done for the first cycle. (The rules of + // C++ require a nonnegative quotient & remainder for a nonnegative dividend + // & positive divisor.) + while ( ts.r < zero ) { ts.r += ts.d; --ts.q; } + while ( rs.r < zero ) { rs.r += rs.d; --rs.q; } + + // Loop through and compare each variable's continued-fraction components + for ( ;; ) + { + // The quotients of the current cycle are the continued-fraction + // components. Comparing two c.f. is comparing their sequences, + // stopping at the first difference. + if ( ts.q != rs.q ) + { + // Since reciprocation changes the relative order of two variables, + // and c.f. use reciprocals, the less/greater-than test reverses + // after each index. (Start w/ non-reversed @ whole-number place.) + return reverse ? ts.q > rs.q : ts.q < rs.q; + } + + // Prepare the next cycle + reverse ^= 1u; + + if ( (ts.r == zero) || (rs.r == zero) ) + { + // At least one variable's c.f. expansion has ended + break; + } + + ts.n = ts.d; ts.d = ts.r; + ts.q = ts.n / ts.d; ts.r = ts.n % ts.d; + rs.n = rs.d; rs.d = rs.r; + rs.q = rs.n / rs.d; rs.r = rs.n % rs.d; + } + + // Compare infinity-valued components for otherwise equal sequences + if ( ts.r == rs.r ) + { + // Both remainders are zero, so the next (and subsequent) c.f. + // components for both sequences are infinity. Therefore, the sequences + // and their corresponding values are equal. + return false; + } + else + { +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4800) +#endif + // Exactly one of the remainders is zero, so all following c.f. + // components of that variable are infinity, while the other variable + // has a finite next c.f. component. So that other variable has the + // lesser value (modulo the reversal flag!). + return ( ts.r != zero ) != static_cast( reverse ); +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + } +} + +template +bool rational::operator< (param_type i) const +{ + // Avoid repeated construction + int_type const zero( 0 ); + + // Break value into mixed-fraction form, w/ always-nonnegative remainder + BOOST_ASSERT( this->den > zero ); + int_type q = this->num / this->den, r = this->num % this->den; + while ( r < zero ) { r += this->den; --q; } + + // Compare with just the quotient, since the remainder always bumps the + // value up. [Since q = floor(n/d), and if n/d < i then q < i, if n/d == i + // then q == i, if n/d == i + r/d then q == i, and if n/d >= i + 1 then + // q >= i + 1 > i; therefore n/d < i iff q < i.] + return q < i; +} + +template +bool rational::operator> (param_type i) const +{ + return operator==(i)? false: !operator<(i); +} + +template +BOOST_CONSTEXPR +inline bool rational::operator== (const rational& r) const +{ + return ((num == r.num) && (den == r.den)); +} + +template +BOOST_CONSTEXPR +inline bool rational::operator== (param_type i) const +{ + return ((den == IntType(1)) && (num == i)); +} + +// Invariant check +template +inline bool rational::test_invariant() const +{ + return ( this->den > int_type(0) ) && ( integer::gcd(this->num, this->den) == + int_type(1) ); +} + +// Normalisation +template +void rational::normalize() +{ + // Avoid repeated construction + IntType zero(0); + + if (den == zero) + throw bad_rational(); + + // Handle the case of zero separately, to avoid division by zero + if (num == zero) { + den = IntType(1); + return; + } + + IntType g = integer::gcd(num, den); + + num /= g; + den /= g; + + // Ensure that the denominator is positive + if (den < zero) { + num = -num; + den = -den; + } + + // ...But acknowledge that the previous step doesn't always work. + // (Nominally, this should be done before the mutating steps, but this + // member function is only called during the constructor, so we never have + // to worry about zombie objects.) + if (den < zero) + throw bad_rational( "bad rational: non-zero singular denominator" ); + + BOOST_ASSERT( this->test_invariant() ); +} + +#ifndef BOOST_NO_IOSTREAM +namespace detail { + + // A utility class to reset the format flags for an istream at end + // of scope, even in case of exceptions + struct resetter { + resetter(std::istream& is) : is_(is), f_(is.flags()) {} + ~resetter() { is_.flags(f_); } + std::istream& is_; + std::istream::fmtflags f_; // old GNU c++ lib has no ios_base + }; + +} + +// Input and output +template +std::istream& operator>> (std::istream& is, rational& r) +{ + using std::ios; + + IntType n = IntType(0), d = IntType(1); + char c = 0; + detail::resetter sentry(is); + + if ( is >> n ) + { + if ( is.get(c) ) + { + if ( c == '/' ) + { + if ( is >> std::noskipws >> d ) + try { + r.assign( n, d ); + } catch ( bad_rational & ) { // normalization fail + try { is.setstate(ios::failbit); } + catch ( ... ) {} // don't throw ios_base::failure... + if ( is.exceptions() & ios::failbit ) + throw; // ...but the original exception instead + // ELSE: suppress the exception, use just error flags + } + } + else + is.setstate( ios::failbit ); + } + } + + return is; +} + +// Add manipulators for output format? +template +std::ostream& operator<< (std::ostream& os, const rational& r) +{ + using namespace std; + + // The slash directly precedes the denominator, which has no prefixes. + ostringstream ss; + + ss.copyfmt( os ); + ss.tie( NULL ); + ss.exceptions( ios::goodbit ); + ss.width( 0 ); + ss << noshowpos << noshowbase << '/' << r.denominator(); + + // The numerator holds the showpos, internal, and showbase flags. + string const tail = ss.str(); + streamsize const w = os.width() - static_cast( tail.size() ); + + ss.clear(); + ss.str( "" ); + ss.flags( os.flags() ); + ss << setw( w < 0 || (os.flags() & ios::adjustfield) != ios::internal ? 0 : + w ) << r.numerator(); + return os << ss.str() + tail; +} +#endif // BOOST_NO_IOSTREAM + +// Type conversion +template +BOOST_CONSTEXPR +inline T rational_cast(const rational& src) +{ + return static_cast(src.numerator())/static_cast(src.denominator()); +} + +// Do not use any abs() defined on IntType - it isn't worth it, given the +// difficulties involved (Koenig lookup required, there may not *be* an abs() +// defined, etc etc). +template +inline rational abs(const rational& r) +{ + return r.numerator() >= IntType(0)? r: -r; +} + +} // namespace boost + +#endif // BOOST_RATIONAL_HPP + diff --git a/ThirdParty/boost-Subset/boost/ref.hpp b/ThirdParty/boost-Subset/boost/ref.hpp new file mode 100644 index 0000000000..17b56ec007 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/ref.hpp @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2014 Glen Fernandes + * + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_REF_HPP +#define BOOST_REF_HPP + +// The header file at this path is deprecated; +// use boost/core/ref.hpp instead. + +#include + +#endif diff --git a/ThirdParty/boost-Subset/boost/scoped_array.hpp b/ThirdParty/boost-Subset/boost/scoped_array.hpp new file mode 100644 index 0000000000..c02fa316bc --- /dev/null +++ b/ThirdParty/boost-Subset/boost/scoped_array.hpp @@ -0,0 +1,16 @@ +#ifndef BOOST_SCOPED_ARRAY_HPP_INCLUDED +#define BOOST_SCOPED_ARRAY_HPP_INCLUDED + +// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. +// Copyright (c) 2001, 2002 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// http://www.boost.org/libs/smart_ptr/scoped_array.htm +// + +#include + +#endif // #ifndef BOOST_SCOPED_ARRAY_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/scoped_ptr.hpp b/ThirdParty/boost-Subset/boost/scoped_ptr.hpp new file mode 100644 index 0000000000..cb916dac1d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/scoped_ptr.hpp @@ -0,0 +1,16 @@ +#ifndef BOOST_SCOPED_PTR_HPP_INCLUDED +#define BOOST_SCOPED_PTR_HPP_INCLUDED + +// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. +// Copyright (c) 2001, 2002 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// http://www.boost.org/libs/smart_ptr/scoped_ptr.htm +// + +#include + +#endif // #ifndef BOOST_SCOPED_PTR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/shared_array.hpp b/ThirdParty/boost-Subset/boost/shared_array.hpp new file mode 100644 index 0000000000..0700ce4f5b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/shared_array.hpp @@ -0,0 +1,19 @@ +#ifndef BOOST_SHARED_ARRAY_HPP_INCLUDED +#define BOOST_SHARED_ARRAY_HPP_INCLUDED + +// +// shared_array.hpp +// +// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. +// Copyright (c) 2001, 2002 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/smart_ptr/shared_array.htm for documentation. +// + +#include + +#endif // #ifndef BOOST_SHARED_ARRAY_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/shared_ptr.hpp b/ThirdParty/boost-Subset/boost/shared_ptr.hpp new file mode 100644 index 0000000000..d31978c925 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/shared_ptr.hpp @@ -0,0 +1,19 @@ +#ifndef BOOST_SHARED_PTR_HPP_INCLUDED +#define BOOST_SHARED_PTR_HPP_INCLUDED + +// +// shared_ptr.hpp +// +// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. +// Copyright (c) 2001-2008 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/smart_ptr/shared_ptr.htm for documentation. +// + +#include + +#endif // #ifndef BOOST_SHARED_PTR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr.hpp b/ThirdParty/boost-Subset/boost/smart_ptr.hpp new file mode 100644 index 0000000000..b5e569d8d3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr.hpp @@ -0,0 +1,31 @@ +#ifndef BOOST_SMART_PTR_HPP_INCLUDED +#define BOOST_SMART_PTR_HPP_INCLUDED + +// +// smart_ptr.hpp +// +// For convenience, this header includes the rest of the smart +// pointer library headers. +// +// Copyright (c) 2003 Peter Dimov Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// http://www.boost.org/libs/smart_ptr/smart_ptr.htm +// + +#include + +#include +#include +#include +#include + +#if !defined(BOOST_NO_MEMBER_TEMPLATES) || defined(BOOST_MSVC6_MEMBER_TEMPLATES) +# include +# include +# include +# include +#endif + +#endif // #ifndef BOOST_SMART_PTR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/allocate_shared_array.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/allocate_shared_array.hpp new file mode 100644 index 0000000000..1ae5cc7832 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/allocate_shared_array.hpp @@ -0,0 +1,181 @@ +/* + * Copyright (c) 2012-2014 Glen Joseph Fernandes + * glenfe at live dot com + * + * Distributed under the Boost Software License, + * Version 1.0. (See accompanying file LICENSE_1_0.txt + * or copy at http://boost.org/LICENSE_1_0.txt) + */ +#ifndef BOOST_SMART_PTR_ALLOCATE_SHARED_ARRAY_HPP +#define BOOST_SMART_PTR_ALLOCATE_SHARED_ARRAY_HPP + +#include +#include + +namespace boost { + template + inline typename boost::detail::sp_if_array::type + allocate_shared(const A& allocator, std::size_t size) { + typedef typename boost::detail::array_inner::type T1; + typedef typename boost::detail::array_base::type T2; + typedef boost::detail::ms_init_tag R1; + typedef boost::detail::as_allocator A1; + typedef boost::detail::ms_in_allocator_tag D1; + std::size_t n1 = size * boost::detail::array_total::size; + T1* p1 = 0; + T2* p2 = 0; + D1 d1; + A1 a1(allocator, size, &p2); + shared_ptr s1(p1, d1, a1); + A1* a2 = static_cast(s1._internal_get_untyped_deleter()); + a2->set(0); +#if !defined(BOOST_NO_CXX11_ALLOCATOR) + boost::detail::as_init(allocator, p2, n1); +#else + boost::detail::ms_init(p2, n1); +#endif + a2->set(p2); + p1 = reinterpret_cast(p2); + return shared_ptr(s1, p1); + } + + template + inline typename boost::detail::sp_if_size_array::type + allocate_shared(const A& allocator) { + typedef typename boost::detail::array_inner::type T1; + typedef typename boost::detail::array_base::type T2; + typedef boost::detail::ms_init_tag R1; + typedef boost::detail::as_allocator A1; + typedef boost::detail::ms_in_allocator_tag D1; + enum { + N = boost::detail::array_total::size + }; + T1* p1 = 0; + T2* p2 = 0; + D1 d1; + A1 a1(allocator, &p2); + shared_ptr s1(p1, d1, a1); + A1* a2 = static_cast(s1._internal_get_untyped_deleter()); + a2->set(0); +#if !defined(BOOST_NO_CXX11_ALLOCATOR) + boost::detail::as_init(allocator, p2, N); +#else + boost::detail::ms_init(p2, N); +#endif + a2->set(p2); + p1 = reinterpret_cast(p2); + return shared_ptr(s1, p1); + } + + template + inline typename boost::detail::sp_if_array::type + allocate_shared(const A& allocator, std::size_t size, + const typename boost::detail::array_inner::type& value) { + typedef typename boost::detail::array_inner::type T1; + typedef typename boost::detail::array_base::type T2; + typedef const T2 T3; + typedef boost::detail::ms_init_tag R1; + typedef boost::detail::as_allocator A1; + typedef boost::detail::ms_in_allocator_tag D1; + enum { + M = boost::detail::array_total::size + }; + std::size_t n1 = M * size; + T1* p1 = 0; + T2* p2 = 0; + T3* p3 = reinterpret_cast(&value); + D1 d1; + A1 a1(allocator, size, &p2); + shared_ptr s1(p1, d1, a1); + A1* a2 = static_cast(s1._internal_get_untyped_deleter()); + a2->set(0); +#if !defined(BOOST_NO_CXX11_ALLOCATOR) + boost::detail::as_init(allocator, p2, n1, p3); +#else + boost::detail::ms_init(p2, n1, p3); +#endif + a2->set(p2); + p1 = reinterpret_cast(p2); + return shared_ptr(s1, p1); + } + + template + inline typename boost::detail::sp_if_size_array::type + allocate_shared(const A& allocator, + const typename boost::detail::array_inner::type& value) { + typedef typename boost::detail::array_inner::type T1; + typedef typename boost::detail::array_base::type T2; + typedef const T2 T3; + typedef boost::detail::ms_init_tag R1; + typedef boost::detail::as_allocator A1; + typedef boost::detail::ms_in_allocator_tag D1; + enum { + N = boost::detail::array_total::size, + M = boost::detail::array_total::size + }; + T1* p1 = 0; + T2* p2 = 0; + T3* p3 = reinterpret_cast(&value); + D1 d1; + A1 a1(allocator, &p2); + shared_ptr s1(p1, d1, a1); + A1* a2 = static_cast(s1._internal_get_untyped_deleter()); + a2->set(0); +#if !defined(BOOST_NO_CXX11_ALLOCATOR) + boost::detail::as_init(allocator, p2, N, p3); +#else + boost::detail::ms_init(p2, N, p3); +#endif + a2->set(p2); + p1 = reinterpret_cast(p2); + return shared_ptr(s1, p1); + } + + template + inline typename boost::detail::sp_if_array::type + allocate_shared_noinit(const A& allocator, std::size_t size) { + typedef typename boost::detail::array_inner::type T1; + typedef typename boost::detail::array_base::type T2; + typedef boost::detail::ms_noinit_tag R1; + typedef boost::detail::as_allocator A1; + typedef boost::detail::ms_in_allocator_tag D1; + std::size_t n1 = size * boost::detail::array_total::size; + T1* p1 = 0; + T2* p2 = 0; + D1 d1; + A1 a1(allocator, size, &p2); + shared_ptr s1(p1, d1, a1); + A1* a2 = static_cast(s1._internal_get_untyped_deleter()); + a2->set(0); + boost::detail::ms_noinit(p2, n1); + a2->set(p2); + p1 = reinterpret_cast(p2); + return shared_ptr(s1, p1); + } + + template + inline typename boost::detail::sp_if_size_array::type + allocate_shared_noinit(const A& allocator) { + typedef typename boost::detail::array_inner::type T1; + typedef typename boost::detail::array_base::type T2; + typedef boost::detail::ms_noinit_tag R1; + typedef boost::detail::as_allocator A1; + typedef boost::detail::ms_in_allocator_tag D1; + enum { + N = boost::detail::array_total::size + }; + T1* p1 = 0; + T2* p2 = 0; + D1 d1; + A1 a1(allocator, &p2); + shared_ptr s1(p1, d1, a1); + A1* a2 = static_cast(s1._internal_get_untyped_deleter()); + a2->set(0); + boost::detail::ms_noinit(p2, N); + a2->set(p2); + p1 = reinterpret_cast(p2); + return shared_ptr(s1, p1); + } +} + +#endif diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/bad_weak_ptr.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/bad_weak_ptr.hpp new file mode 100644 index 0000000000..3e0a1b7286 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/bad_weak_ptr.hpp @@ -0,0 +1,59 @@ +#ifndef BOOST_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED +#define BOOST_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/smart_ptr/bad_weak_ptr.hpp +// +// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include + +#ifdef __BORLANDC__ +# pragma warn -8026 // Functions with excep. spec. are not expanded inline +#endif + +namespace boost +{ + +// The standard library that comes with Borland C++ 5.5.1, 5.6.4 +// defines std::exception and its members as having C calling +// convention (-pc). When the definition of bad_weak_ptr +// is compiled with -ps, the compiler issues an error. +// Hence, the temporary #pragma option -pc below. + +#if defined(__BORLANDC__) && __BORLANDC__ <= 0x564 +# pragma option push -pc +#endif + +class bad_weak_ptr: public std::exception +{ +public: + + virtual char const * what() const throw() + { + return "tr1::bad_weak_ptr"; + } +}; + +#if defined(__BORLANDC__) && __BORLANDC__ <= 0x564 +# pragma option pop +#endif + +} // namespace boost + +#ifdef __BORLANDC__ +# pragma warn .8026 // Functions with excep. spec. are not expanded inline +#endif + +#endif // #ifndef BOOST_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/array_allocator.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/array_allocator.hpp new file mode 100644 index 0000000000..71479967bc --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/array_allocator.hpp @@ -0,0 +1,318 @@ +/* + * Copyright (c) 2012-2014 Glen Joseph Fernandes + * glenfe at live dot com + * + * Distributed under the Boost Software License, + * Version 1.0. (See accompanying file LICENSE_1_0.txt + * or copy at http://boost.org/LICENSE_1_0.txt) + */ +#ifndef BOOST_SMART_PTR_DETAIL_ARRAY_ALLOCATOR_HPP +#define BOOST_SMART_PTR_DETAIL_ARRAY_ALLOCATOR_HPP + +#include +#include +#include +#include + +namespace boost { + namespace detail { + struct ms_init_tag { }; + struct ms_noinit_tag { }; + + template + struct ms_allocator_state; + + template + struct ms_allocator_state { + typedef typename array_base::type type; + + ms_allocator_state(std::size_t size_, + type** result_) + : size(size_ * array_total::size), + result(result_) { + } + + std::size_t size; + + union { + type** result; + type* object; + }; + }; + + template + struct ms_allocator_state { + typedef typename array_base::type type; + + ms_allocator_state(type** result_) + : result(result_) { + } + + enum { + size = array_total::size + }; + + union { + type** result; + type* object; + }; + }; + + template + class as_allocator + : public A { + template + friend class as_allocator; + +#if !defined(BOOST_NO_CXX11_ALLOCATOR) + typedef std::allocator_traits AT; + typedef typename AT::template rebind_alloc CA; + typedef typename AT::template rebind_traits CT; +#else + typedef typename A::template rebind::other CA; +#endif + + public: + typedef A allocator_type; + +#if !defined(BOOST_NO_CXX11_ALLOCATOR) + typedef typename AT::value_type value_type; + typedef typename AT::pointer pointer; + typedef typename AT::const_pointer const_pointer; + typedef typename AT::void_pointer void_pointer; + typedef typename AT::const_void_pointer const_void_pointer; + typedef typename AT::size_type size_type; + typedef typename AT::difference_type difference_type; +#else + typedef typename A::value_type value_type; + typedef typename A::pointer pointer; + typedef typename A::const_pointer const_pointer; + typedef typename A::size_type size_type; + typedef typename A::difference_type difference_type; + typedef typename A::reference reference; + typedef typename A::const_reference const_reference; + typedef void* void_pointer; + typedef const void* const_void_pointer; +#endif + + template + struct rebind { +#if !defined(BOOST_NO_CXX11_ALLOCATOR) + typedef as_allocator, T, R> other; +#else + typedef as_allocator::other, T, R> other; +#endif + }; + + typedef typename array_base::type type; + + as_allocator(const A& allocator_, type** result) + : A(allocator_), + data(result) { + } + + as_allocator(const A& allocator_, std::size_t size, + type** result) + : A(allocator_), + data(size, result) { + } + + template + as_allocator(const as_allocator& other) + : A(other.allocator()), + data(other.data) { + } + + pointer allocate(size_type count, const_void_pointer = 0) { + enum { + M = boost::alignment_of::value + }; + std::size_t n1 = count * sizeof(value_type); + std::size_t n2 = data.size * sizeof(type); + std::size_t n3 = n2 + M; + CA ca(allocator()); + void* p1 = ca.allocate(n1 + n3); + void* p2 = static_cast(p1) + n1; + (void)boost::alignment::align(M, n2, p2, n3); + *data.result = static_cast(p2); + return static_cast(p1); + } + + void deallocate(pointer memory, size_type count) { + enum { + M = boost::alignment_of::value + }; + std::size_t n1 = count * sizeof(value_type); + std::size_t n2 = data.size * sizeof(type) + M; + char* p1 = reinterpret_cast(memory); + CA ca(allocator()); + ca.deallocate(p1, n1 + n2); + } + + const A& allocator() const { + return static_cast(*this); + } + + A& allocator() { + return static_cast(*this); + } + + void set(type* memory) { + data.object = memory; + } + + void operator()() { + if (data.object) { + R tag; + release(tag); + } + } + + private: + void release(ms_init_tag) { +#if !defined(BOOST_NO_CXX11_ALLOCATOR) + as_destroy(allocator(), data.object, data.size); +#else + ms_destroy(data.object, data.size); +#endif + } + + void release(ms_noinit_tag) { + ms_destroy(data.object, data.size); + } + + ms_allocator_state data; + }; + + template + bool operator==(const as_allocator& a1, + const as_allocator& a2) { + return a1.allocator() == a2.allocator(); + } + + template + bool operator!=(const as_allocator& a1, + const as_allocator& a2) { + return a1.allocator() != a2.allocator(); + } + + template + class ms_allocator; + + template + class ms_allocator { + template + friend class ms_allocator; + + public: + typedef typename array_base::type type; + + typedef Y value_type; + typedef Y* pointer; + typedef const Y* const_pointer; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + typedef Y& reference; + typedef const Y& const_reference; + + template + struct rebind { + typedef ms_allocator other; + }; + + ms_allocator(type** result) + : data(result) { + } + + ms_allocator(std::size_t size, type** result) + : data(size, result) { + } + + template + ms_allocator(const ms_allocator& other) + : data(other.data) { + } + + pointer allocate(size_type count, const void* = 0) { + enum { + M = boost::alignment_of::value + }; + std::size_t n1 = count * sizeof(Y); + std::size_t n2 = data.size * sizeof(type); + std::size_t n3 = n2 + M; + void* p1 = ::operator new(n1 + n3); + void* p2 = static_cast(p1) + n1; + (void)boost::alignment::align(M, n2, p2, n3); + *data.result = static_cast(p2); + return static_cast(p1); + } + + void deallocate(pointer memory, size_type) { + void* p1 = memory; + ::operator delete(p1); + } + +#if defined(BOOST_NO_CXX11_ALLOCATOR) + pointer address(reference value) const { + return &value; + } + + const_pointer address(const_reference value) const { + return &value; + } + + size_type max_size() const { + enum { + N = static_cast(-1) / sizeof(Y) + }; + return N; + } + + void construct(pointer memory, const_reference value) { + void* p1 = memory; + ::new(p1) Y(value); + } + + void destroy(pointer memory) { + (void)memory; + memory->~Y(); + } +#endif + + void set(type* memory) { + data.object = memory; + } + + void operator()() { + if (data.object) { + ms_destroy(data.object, data.size); + } + } + + private: + ms_allocator_state data; + }; + + template + bool operator==(const ms_allocator&, + const ms_allocator&) { + return true; + } + + template + bool operator!=(const ms_allocator&, + const ms_allocator&) { + return false; + } + + class ms_in_allocator_tag { + public: + void operator()(const void*) { + } + }; + } +} + +#endif diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/array_count_impl.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/array_count_impl.hpp new file mode 100644 index 0000000000..b7c9617f0b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/array_count_impl.hpp @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2014 Glen Joseph Fernandes + * glenfe at live dot com + * + * Distributed under the Boost Software License, + * Version 1.0. (See accompanying file LICENSE_1_0.txt + * or copy at http://boost.org/LICENSE_1_0.txt) + */ +#ifndef BOOST_SMART_PTR_DETAIL_ARRAY_COUNT_IMPL_HPP +#define BOOST_SMART_PTR_DETAIL_ARRAY_COUNT_IMPL_HPP + +#include +#include + +namespace boost { + namespace detail { + template + class sp_counted_impl_pda + : public sp_counted_base { + typedef ms_in_allocator_tag D; + typedef sp_counted_impl_pda Y; + public: + sp_counted_impl_pda(P, D, const A& allocator_) + : allocator(allocator_) { + } + + virtual void dispose() { + allocator(); + } + + virtual void destroy() { +#if !defined(BOOST_NO_CXX11_ALLOCATOR) + typedef typename std::allocator_traits:: + template rebind_alloc YA; + typedef typename std::allocator_traits:: + template rebind_traits YT; +#else + typedef typename A::template rebind::other YA; +#endif + YA a1(allocator); +#if !defined(BOOST_NO_CXX11_ALLOCATOR) + YT::destroy(a1, this); + YT::deallocate(a1, this, 1); +#else + this->~Y(); + a1.deallocate(this, 1); +#endif + } + + virtual void* get_deleter(const sp_typeinfo&) { + return &reinterpret_cast(allocator); + } + + virtual void* get_untyped_deleter() { + return &reinterpret_cast(allocator); + } + + private: + sp_counted_impl_pda(const sp_counted_impl_pda&); + sp_counted_impl_pda& operator=(const sp_counted_impl_pda&); + + A allocator; + }; + } +} + +#endif diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/array_traits.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/array_traits.hpp new file mode 100644 index 0000000000..819c5ba619 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/array_traits.hpp @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2012-2014 Glen Joseph Fernandes + * glenfe at live dot com + * + * Distributed under the Boost Software License, + * Version 1.0. (See accompanying file LICENSE_1_0.txt + * or copy at http://boost.org/LICENSE_1_0.txt) + */ +#ifndef BOOST_SMART_PTR_DETAIL_ARRAY_TRAITS_HPP +#define BOOST_SMART_PTR_DETAIL_ARRAY_TRAITS_HPP + +#include + +namespace boost { + namespace detail { + template + struct array_base { + typedef typename boost::remove_cv::type type; + }; + + template + struct array_base { + typedef typename array_base::type type; + }; + + template + struct array_base { + typedef typename array_base::type type; + }; + + template + struct array_total { + enum { + size = 1 + }; + }; + + template + struct array_total { + enum { + size = N * array_total::size + }; + }; + + template + struct array_inner; + + template + struct array_inner { + typedef T type; + }; + + template + struct array_inner { + typedef T type; + }; + } +} + +#endif diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/array_utility.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/array_utility.hpp new file mode 100644 index 0000000000..84029a1d77 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/array_utility.hpp @@ -0,0 +1,214 @@ +/* + * Copyright (c) 2012-2014 Glen Joseph Fernandes + * glenfe at live dot com + * + * Distributed under the Boost Software License, + * Version 1.0. (See accompanying file LICENSE_1_0.txt + * or copy at http://boost.org/LICENSE_1_0.txt) + */ +#ifndef BOOST_SMART_PTR_DETAIL_ARRAY_UTILITY_HPP +#define BOOST_SMART_PTR_DETAIL_ARRAY_UTILITY_HPP + +#include +#include +#include +#if !defined(BOOST_NO_CXX11_ALLOCATOR) +#include +#endif + +namespace boost { + namespace detail { + typedef boost::true_type ms_is_trivial; + typedef boost::false_type ms_no_trivial; + + template + inline void ms_destroy(T*, std::size_t, ms_is_trivial) { + } + + template + inline void ms_destroy(T* memory, std::size_t size, ms_no_trivial) { + for (std::size_t i = size; i > 0;) { + memory[--i].~T(); + } + } + + template + inline void ms_destroy(T* memory, std::size_t size) { + boost::has_trivial_destructor trivial; + ms_destroy(memory, size, trivial); + } + + template + inline void ms_init(T* memory, std::size_t size, ms_is_trivial) { + for (std::size_t i = 0; i < size; i++) { + void* p1 = memory + i; + ::new(p1) T(); + } + } + + template + inline void ms_init(T* memory, std::size_t size, ms_no_trivial) { +#if !defined(BOOST_NO_EXCEPTIONS) + std::size_t i = 0; + try { + for (; i < size; i++) { + void* p1 = memory + i; + ::new(p1) T(); + } + } catch (...) { + ms_destroy(memory, i); + throw; + } +#else + for (std::size_t i = 0; i < size; i++) { + void* p1 = memory + i; + ::new(p1) T(); + } +#endif + } + + template + inline void ms_init(T* memory, std::size_t size) { + boost::has_trivial_default_constructor trivial; + ms_init(memory, size, trivial); + } + + template + inline void ms_init(T* memory, std::size_t size, const T* list) { +#if !defined(BOOST_NO_EXCEPTIONS) + std::size_t i = 0; + try { + for (; i < size; i++) { + void* p1 = memory + i; + ::new(p1) T(list[i % N]); + } + } catch (...) { + ms_destroy(memory, i); + throw; + } +#else + for (std::size_t i = 0; i < size; i++) { + void* p1 = memory + i; + ::new(p1) T(list[i % N]); + } +#endif + } + +#if !defined(BOOST_NO_CXX11_ALLOCATOR) + template + inline void as_destroy(const A& allocator, T* memory, + std::size_t size) { + typedef typename std::allocator_traits:: + template rebind_alloc TA; + typedef typename std::allocator_traits:: + template rebind_traits TT; + TA a2(allocator); + for (std::size_t i = size; i > 0;) { + TT::destroy(a2, &memory[--i]); + } + } + + template + inline void as_init(const A& allocator, T* memory, std::size_t size, + ms_is_trivial) { + typedef typename std::allocator_traits:: + template rebind_alloc TA; + typedef typename std::allocator_traits:: + template rebind_traits TT; + TA a2(allocator); + for (std::size_t i = 0; i < size; i++) { + TT::construct(a2, memory + i); + } + } + + template + inline void as_init(const A& allocator, T* memory, std::size_t size, + ms_no_trivial) { + typedef typename std::allocator_traits:: + template rebind_alloc TA; + typedef typename std::allocator_traits:: + template rebind_traits TT; + TA a2(allocator); +#if !defined(BOOST_NO_EXCEPTIONS) + std::size_t i = 0; + try { + for (; i < size; i++) { + TT::construct(a2, memory + i); + } + } catch (...) { + as_destroy(a2, memory, i); + throw; + } +#else + for (std::size_t i = 0; i < size; i++) { + TT::construct(a2, memory + i); + } +#endif + } + + template + inline void as_init(const A& allocator, T* memory, std::size_t size) { + boost::has_trivial_default_constructor trivial; + as_init(allocator, memory, size, trivial); + } + + template + inline void as_init(const A& allocator, T* memory, std::size_t size, + const T* list) { + typedef typename std::allocator_traits:: + template rebind_alloc TA; + typedef typename std::allocator_traits:: + template rebind_traits TT; + TA a2(allocator); +#if !defined(BOOST_NO_EXCEPTIONS) + std::size_t i = 0; + try { + for (; i < size; i++) { + TT::construct(a2, memory + i, list[i % N]); + } + } catch (...) { + as_destroy(a2, memory, i); + throw; + } +#else + for (std::size_t i = 0; i < size; i++) { + TT::construct(a2, memory + i, list[i % N]); + } +#endif + } +#endif + + template + inline void ms_noinit(T*, std::size_t, ms_is_trivial) { + } + + template + inline void ms_noinit(T* memory, std::size_t size, ms_no_trivial) { +#if !defined(BOOST_NO_EXCEPTIONS) + std::size_t i = 0; + try { + for (; i < size; i++) { + void* p1 = memory + i; + ::new(p1) T; + } + } catch (...) { + ms_destroy(memory, i); + throw; + } +#else + for (std::size_t i = 0; i < size; i++) { + void* p1 = memory + i; + ::new(p1) T; + } +#endif + } + + template + inline void ms_noinit(T* memory, std::size_t size) { + boost::has_trivial_default_constructor trivial; + ms_noinit(memory, size, trivial); + } + } +} + +#endif diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/lightweight_mutex.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/lightweight_mutex.hpp new file mode 100644 index 0000000000..d46b1932c2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/lightweight_mutex.hpp @@ -0,0 +1,42 @@ +#ifndef BOOST_SMART_PTR_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/detail/lightweight_mutex.hpp - lightweight mutex +// +// Copyright (c) 2002, 2003 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// typedef boost::detail::lightweight_mutex; +// +// boost::detail::lightweight_mutex is a header-only implementation of +// a subset of the Mutex concept requirements: +// +// http://www.boost.org/doc/html/threads/concepts.html#threads.concepts.Mutex +// +// It maps to a CRITICAL_SECTION on Windows or a pthread_mutex on POSIX. +// + +#include + +#if !defined(BOOST_HAS_THREADS) +# include +#elif defined(BOOST_HAS_PTHREADS) +# include +#elif defined(BOOST_HAS_WINTHREADS) || defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# include +#else +// Use #define BOOST_DISABLE_THREADS to avoid the error +# error Unrecognized threading platform +#endif + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/lwm_nop.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/lwm_nop.hpp new file mode 100644 index 0000000000..521a88ec1c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/lwm_nop.hpp @@ -0,0 +1,37 @@ +#ifndef BOOST_SMART_PTR_DETAIL_LWM_NOP_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_LWM_NOP_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/detail/lwm_nop.hpp +// +// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +namespace boost +{ + +namespace detail +{ + +class lightweight_mutex +{ +public: + + typedef lightweight_mutex scoped_lock; +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_LWM_NOP_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/lwm_pthreads.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/lwm_pthreads.hpp new file mode 100644 index 0000000000..8eda518233 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/lwm_pthreads.hpp @@ -0,0 +1,87 @@ +#ifndef BOOST_SMART_PTR_DETAIL_LWM_PTHREADS_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_LWM_PTHREADS_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/detail/lwm_pthreads.hpp +// +// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include +#include + +namespace boost +{ + +namespace detail +{ + +class lightweight_mutex +{ +private: + + pthread_mutex_t m_; + + lightweight_mutex(lightweight_mutex const &); + lightweight_mutex & operator=(lightweight_mutex const &); + +public: + + lightweight_mutex() + { + +// HPUX 10.20 / DCE has a nonstandard pthread_mutex_init + +#if defined(__hpux) && defined(_DECTHREADS_) + BOOST_VERIFY( pthread_mutex_init( &m_, pthread_mutexattr_default ) == 0 ); +#else + BOOST_VERIFY( pthread_mutex_init( &m_, 0 ) == 0 ); +#endif + } + + ~lightweight_mutex() + { + BOOST_VERIFY( pthread_mutex_destroy( &m_ ) == 0 ); + } + + class scoped_lock; + friend class scoped_lock; + + class scoped_lock + { + private: + + pthread_mutex_t & m_; + + scoped_lock(scoped_lock const &); + scoped_lock & operator=(scoped_lock const &); + + public: + + scoped_lock(lightweight_mutex & m): m_(m.m_) + { + BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 ); + } + + ~scoped_lock() + { + BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 ); + } + }; +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_LWM_PTHREADS_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/lwm_win32_cs.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/lwm_win32_cs.hpp new file mode 100644 index 0000000000..a93cf09208 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/lwm_win32_cs.hpp @@ -0,0 +1,119 @@ +#ifndef BOOST_SMART_PTR_DETAIL_LWM_WIN32_CS_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_LWM_WIN32_CS_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/detail/lwm_win32_cs.hpp +// +// Copyright (c) 2002, 2003 Peter Dimov +// Copyright (c) Microsoft Corporation 2014 +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include + +#ifdef BOOST_USE_WINDOWS_H +# include +#endif + +namespace boost +{ + +namespace detail +{ + +#ifndef BOOST_USE_WINDOWS_H + +struct critical_section +{ + struct critical_section_debug * DebugInfo; + long LockCount; + long RecursionCount; + void * OwningThread; + void * LockSemaphore; +#if defined(_WIN64) + unsigned __int64 SpinCount; +#else + unsigned long SpinCount; +#endif +}; + +#if BOOST_PLAT_WINDOWS_RUNTIME +extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSectionEx(critical_section *, unsigned long, unsigned long); +#else +extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSection(critical_section *); +#endif +extern "C" __declspec(dllimport) void __stdcall EnterCriticalSection(critical_section *); +extern "C" __declspec(dllimport) void __stdcall LeaveCriticalSection(critical_section *); +extern "C" __declspec(dllimport) void __stdcall DeleteCriticalSection(critical_section *); + +#else + +typedef ::CRITICAL_SECTION critical_section; + +#endif // #ifndef BOOST_USE_WINDOWS_H + +class lightweight_mutex +{ +private: + + critical_section cs_; + + lightweight_mutex(lightweight_mutex const &); + lightweight_mutex & operator=(lightweight_mutex const &); + +public: + + lightweight_mutex() + { +#if BOOST_PLAT_WINDOWS_RUNTIME + InitializeCriticalSectionEx(&cs_, 4000, 0); +#else + InitializeCriticalSection(&cs_); +#endif + } + + ~lightweight_mutex() + { + DeleteCriticalSection(&cs_); + } + + class scoped_lock; + friend class scoped_lock; + + class scoped_lock + { + private: + + lightweight_mutex & m_; + + scoped_lock(scoped_lock const &); + scoped_lock & operator=(scoped_lock const &); + + public: + + explicit scoped_lock(lightweight_mutex & m): m_(m) + { + EnterCriticalSection(&m_.cs_); + } + + ~scoped_lock() + { + LeaveCriticalSection(&m_.cs_); + } + }; +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_LWM_WIN32_CS_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/operator_bool.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/operator_bool.hpp new file mode 100644 index 0000000000..8ae1527e7c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/operator_bool.hpp @@ -0,0 +1,63 @@ +// This header intentionally has no include guards. +// +// Copyright (c) 2001-2009, 2012 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#if !defined( BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS ) && !defined( BOOST_NO_CXX11_NULLPTR ) + + explicit operator bool () const BOOST_NOEXCEPT + { + return px != 0; + } + +#elif ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570) ) || defined(__CINT__) + + operator bool () const BOOST_NOEXCEPT + { + return px != 0; + } + +#elif defined( _MANAGED ) + + static void unspecified_bool( this_type*** ) + { + } + + typedef void (*unspecified_bool_type)( this_type*** ); + + operator unspecified_bool_type() const BOOST_NOEXCEPT + { + return px == 0? 0: unspecified_bool; + } + +#elif \ + ( defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, < 0x3200) ) || \ + ( defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 304) ) || \ + ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) ) + + typedef element_type * (this_type::*unspecified_bool_type)() const; + + operator unspecified_bool_type() const BOOST_NOEXCEPT + { + return px == 0? 0: &this_type::get; + } + +#else + + typedef element_type * this_type::*unspecified_bool_type; + + operator unspecified_bool_type() const BOOST_NOEXCEPT + { + return px == 0? 0: &this_type::px; + } + +#endif + + // operator! is redundant, but some compilers need it + bool operator! () const BOOST_NOEXCEPT + { + return px == 0; + } diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/quick_allocator.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/quick_allocator.hpp new file mode 100644 index 0000000000..159bd5e7aa --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/quick_allocator.hpp @@ -0,0 +1,199 @@ +#ifndef BOOST_SMART_PTR_DETAIL_QUICK_ALLOCATOR_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_QUICK_ALLOCATOR_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// detail/quick_allocator.hpp +// +// Copyright (c) 2003 David Abrahams +// Copyright (c) 2003 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include + +#include +#include +#include + +#include // ::operator new, ::operator delete +#include // std::size_t + +namespace boost +{ + +namespace detail +{ + +template union freeblock +{ + typedef typename boost::type_with_alignment::type aligner_type; + aligner_type aligner; + char bytes[size]; + freeblock * next; +}; + +template struct allocator_impl +{ + typedef freeblock block; + + // It may seem odd to use such small pages. + // + // However, on a typical Windows implementation that uses + // the OS allocator, "normal size" pages interact with the + // "ordinary" operator new, slowing it down dramatically. + // + // 512 byte pages are handled by the small object allocator, + // and don't interfere with ::new. + // + // The other alternative is to use much bigger pages (1M.) + // + // It is surprisingly easy to hit pathological behavior by + // varying the page size. g++ 2.96 on Red Hat Linux 7.2, + // for example, passionately dislikes 496. 512 seems OK. + +#if defined(BOOST_QA_PAGE_SIZE) + + enum { items_per_page = BOOST_QA_PAGE_SIZE / size }; + +#else + + enum { items_per_page = 512 / size }; // 1048560 / size + +#endif + +#ifdef BOOST_HAS_THREADS + + static lightweight_mutex & mutex() + { + static freeblock< sizeof( lightweight_mutex ), boost::alignment_of< lightweight_mutex >::value > fbm; + static lightweight_mutex * pm = new( &fbm ) lightweight_mutex; + return *pm; + } + + static lightweight_mutex * mutex_init; + +#endif + + static block * free; + static block * page; + static unsigned last; + + static inline void * alloc() + { +#ifdef BOOST_HAS_THREADS + lightweight_mutex::scoped_lock lock( mutex() ); +#endif + if(block * x = free) + { + free = x->next; + return x; + } + else + { + if(last == items_per_page) + { + // "Listen to me carefully: there is no memory leak" + // -- Scott Meyers, Eff C++ 2nd Ed Item 10 + page = ::new block[items_per_page]; + last = 0; + } + + return &page[last++]; + } + } + + static inline void * alloc(std::size_t n) + { + if(n != size) // class-specific new called for a derived object + { + return ::operator new(n); + } + else + { +#ifdef BOOST_HAS_THREADS + lightweight_mutex::scoped_lock lock( mutex() ); +#endif + if(block * x = free) + { + free = x->next; + return x; + } + else + { + if(last == items_per_page) + { + page = ::new block[items_per_page]; + last = 0; + } + + return &page[last++]; + } + } + } + + static inline void dealloc(void * pv) + { + if(pv != 0) // 18.4.1.1/13 + { +#ifdef BOOST_HAS_THREADS + lightweight_mutex::scoped_lock lock( mutex() ); +#endif + block * pb = static_cast(pv); + pb->next = free; + free = pb; + } + } + + static inline void dealloc(void * pv, std::size_t n) + { + if(n != size) // class-specific delete called for a derived object + { + ::operator delete(pv); + } + else if(pv != 0) // 18.4.1.1/13 + { +#ifdef BOOST_HAS_THREADS + lightweight_mutex::scoped_lock lock( mutex() ); +#endif + block * pb = static_cast(pv); + pb->next = free; + free = pb; + } + } +}; + +#ifdef BOOST_HAS_THREADS + +template + lightweight_mutex * allocator_impl::mutex_init = &allocator_impl::mutex(); + +#endif + +template + freeblock * allocator_impl::free = 0; + +template + freeblock * allocator_impl::page = 0; + +template + unsigned allocator_impl::last = allocator_impl::items_per_page; + +template +struct quick_allocator: public allocator_impl< sizeof(T), boost::alignment_of::value > +{ +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_QUICK_ALLOCATOR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/shared_count.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/shared_count.hpp new file mode 100644 index 0000000000..cd07ed65fc --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/shared_count.hpp @@ -0,0 +1,699 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SHARED_COUNT_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SHARED_COUNT_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// detail/shared_count.hpp +// +// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. +// Copyright 2004-2005 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#ifdef __BORLANDC__ +# pragma warn -8027 // Functions containing try are not expanded inline +#endif + +#include +#include +#include +#include +#include +#include +#include +// In order to avoid circular dependencies with Boost.TR1 +// we make sure that our include of doesn't try to +// pull in the TR1 headers: that's why we use this header +// rather than including directly: +#include // std::auto_ptr +#include // std::less + +#ifdef BOOST_NO_EXCEPTIONS +# include // std::bad_alloc +#endif + +#include + +namespace boost +{ + +namespace movelib +{ + + template< class T, class D > class unique_ptr; + +} // namespace movelib + +namespace detail +{ + +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + +int const shared_count_id = 0x2C35F101; +int const weak_count_id = 0x298C38A4; + +#endif + +struct sp_nothrow_tag {}; + +template< class D > struct sp_inplace_tag +{ +}; + +template< class T > class sp_reference_wrapper +{ +public: + + explicit sp_reference_wrapper( T & t): t_( boost::addressof( t ) ) + { + } + + template< class Y > void operator()( Y * p ) const + { + (*t_)( p ); + } + +private: + + T * t_; +}; + +template< class D > struct sp_convert_reference +{ + typedef D type; +}; + +template< class D > struct sp_convert_reference< D& > +{ + typedef sp_reference_wrapper< D > type; +}; + +class weak_count; + +class shared_count +{ +private: + + sp_counted_base * pi_; + +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + int id_; +#endif + + friend class weak_count; + +public: + + shared_count(): pi_(0) // nothrow +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(shared_count_id) +#endif + { + } + + template explicit shared_count( Y * p ): pi_( 0 ) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(shared_count_id) +#endif + { +#ifndef BOOST_NO_EXCEPTIONS + + try + { + pi_ = new sp_counted_impl_p( p ); + } + catch(...) + { + boost::checked_delete( p ); + throw; + } + +#else + + pi_ = new sp_counted_impl_p( p ); + + if( pi_ == 0 ) + { + boost::checked_delete( p ); + boost::throw_exception( std::bad_alloc() ); + } + +#endif + } + +#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1200 ) + template shared_count( Y * p, D d ): pi_(0) +#else + template shared_count( P p, D d ): pi_(0) +#endif +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(shared_count_id) +#endif + { +#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1200 ) + typedef Y* P; +#endif +#ifndef BOOST_NO_EXCEPTIONS + + try + { + pi_ = new sp_counted_impl_pd(p, d); + } + catch(...) + { + d(p); // delete p + throw; + } + +#else + + pi_ = new sp_counted_impl_pd(p, d); + + if(pi_ == 0) + { + d(p); // delete p + boost::throw_exception(std::bad_alloc()); + } + +#endif + } + +#if !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING ) + + template< class P, class D > shared_count( P p, sp_inplace_tag ): pi_( 0 ) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(shared_count_id) +#endif + { +#ifndef BOOST_NO_EXCEPTIONS + + try + { + pi_ = new sp_counted_impl_pd< P, D >( p ); + } + catch( ... ) + { + D::operator_fn( p ); // delete p + throw; + } + +#else + + pi_ = new sp_counted_impl_pd< P, D >( p ); + + if( pi_ == 0 ) + { + D::operator_fn( p ); // delete p + boost::throw_exception( std::bad_alloc() ); + } + +#endif // #ifndef BOOST_NO_EXCEPTIONS + } + +#endif // !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING ) + + template shared_count( P p, D d, A a ): pi_( 0 ) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(shared_count_id) +#endif + { + typedef sp_counted_impl_pda impl_type; + +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + typedef typename std::allocator_traits::template rebind_alloc< impl_type > A2; + +#else + + typedef typename A::template rebind< impl_type >::other A2; + +#endif + + A2 a2( a ); + +#ifndef BOOST_NO_EXCEPTIONS + + try + { +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + impl_type * pi = std::allocator_traits::allocate( a2, 1 ); + pi_ = pi; + std::allocator_traits::construct( a2, pi, p, d, a ); + +#else + + pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) ); + ::new( static_cast< void* >( pi_ ) ) impl_type( p, d, a ); + +#endif + } + catch(...) + { + d( p ); + + if( pi_ != 0 ) + { + a2.deallocate( static_cast< impl_type* >( pi_ ), 1 ); + } + + throw; + } + +#else + +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + impl_type * pi = std::allocator_traits::allocate( a2, 1 ); + pi_ = pi; + +#else + + pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) ); + +#endif + + if( pi_ != 0 ) + { +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + std::allocator_traits::construct( a2, pi, p, d, a ); + +#else + + ::new( static_cast< void* >( pi_ ) ) impl_type( p, d, a ); + +#endif + } + else + { + d( p ); + boost::throw_exception( std::bad_alloc() ); + } + +#endif + } + +#if !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING ) + + template< class P, class D, class A > shared_count( P p, sp_inplace_tag< D >, A a ): pi_( 0 ) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(shared_count_id) +#endif + { + typedef sp_counted_impl_pda< P, D, A > impl_type; + +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + typedef typename std::allocator_traits::template rebind_alloc< impl_type > A2; + +#else + + typedef typename A::template rebind< impl_type >::other A2; + +#endif + + A2 a2( a ); + +#ifndef BOOST_NO_EXCEPTIONS + + try + { +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + impl_type * pi = std::allocator_traits::allocate( a2, 1 ); + pi_ = pi; + std::allocator_traits::construct( a2, pi, p, a ); + +#else + + pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) ); + ::new( static_cast< void* >( pi_ ) ) impl_type( p, a ); + +#endif + } + catch(...) + { + D::operator_fn( p ); + + if( pi_ != 0 ) + { + a2.deallocate( static_cast< impl_type* >( pi_ ), 1 ); + } + + throw; + } + +#else + +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + impl_type * pi = std::allocator_traits::allocate( a2, 1 ); + pi_ = pi; + +#else + + pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) ); + +#endif + + if( pi_ != 0 ) + { +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + std::allocator_traits::construct( a2, pi, p, a ); + +#else + + ::new( static_cast< void* >( pi_ ) ) impl_type( p, a ); + +#endif + } + else + { + D::operator_fn( p ); + boost::throw_exception( std::bad_alloc() ); + } + +#endif // #ifndef BOOST_NO_EXCEPTIONS + } + +#endif // !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING ) + +#ifndef BOOST_NO_AUTO_PTR + + // auto_ptr is special cased to provide the strong guarantee + + template + explicit shared_count( std::auto_ptr & r ): pi_( new sp_counted_impl_p( r.get() ) ) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(shared_count_id) +#endif + { +#ifdef BOOST_NO_EXCEPTIONS + + if( pi_ == 0 ) + { + boost::throw_exception(std::bad_alloc()); + } + +#endif + + r.release(); + } + +#endif + +#if !defined( BOOST_NO_CXX11_SMART_PTR ) + + template + explicit shared_count( std::unique_ptr & r ): pi_( 0 ) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(shared_count_id) +#endif + { + typedef typename sp_convert_reference::type D2; + + D2 d2( r.get_deleter() ); + pi_ = new sp_counted_impl_pd< typename std::unique_ptr::pointer, D2 >( r.get(), d2 ); + +#ifdef BOOST_NO_EXCEPTIONS + + if( pi_ == 0 ) + { + boost::throw_exception( std::bad_alloc() ); + } + +#endif + + r.release(); + } + +#endif + + template + explicit shared_count( boost::movelib::unique_ptr & r ): pi_( 0 ) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(shared_count_id) +#endif + { + typedef typename sp_convert_reference::type D2; + + D2 d2( r.get_deleter() ); + pi_ = new sp_counted_impl_pd< typename boost::movelib::unique_ptr::pointer, D2 >( r.get(), d2 ); + +#ifdef BOOST_NO_EXCEPTIONS + + if( pi_ == 0 ) + { + boost::throw_exception( std::bad_alloc() ); + } + +#endif + + r.release(); + } + + ~shared_count() // nothrow + { + if( pi_ != 0 ) pi_->release(); +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + id_ = 0; +#endif + } + + shared_count(shared_count const & r): pi_(r.pi_) // nothrow +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(shared_count_id) +#endif + { + if( pi_ != 0 ) pi_->add_ref_copy(); + } + +#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + + shared_count(shared_count && r): pi_(r.pi_) // nothrow +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(shared_count_id) +#endif + { + r.pi_ = 0; + } + +#endif + + explicit shared_count(weak_count const & r); // throws bad_weak_ptr when r.use_count() == 0 + shared_count( weak_count const & r, sp_nothrow_tag ); // constructs an empty *this when r.use_count() == 0 + + shared_count & operator= (shared_count const & r) // nothrow + { + sp_counted_base * tmp = r.pi_; + + if( tmp != pi_ ) + { + if( tmp != 0 ) tmp->add_ref_copy(); + if( pi_ != 0 ) pi_->release(); + pi_ = tmp; + } + + return *this; + } + + void swap(shared_count & r) // nothrow + { + sp_counted_base * tmp = r.pi_; + r.pi_ = pi_; + pi_ = tmp; + } + + long use_count() const // nothrow + { + return pi_ != 0? pi_->use_count(): 0; + } + + bool unique() const // nothrow + { + return use_count() == 1; + } + + bool empty() const // nothrow + { + return pi_ == 0; + } + + friend inline bool operator==(shared_count const & a, shared_count const & b) + { + return a.pi_ == b.pi_; + } + + friend inline bool operator<(shared_count const & a, shared_count const & b) + { + return std::less()( a.pi_, b.pi_ ); + } + + void * get_deleter( sp_typeinfo const & ti ) const + { + return pi_? pi_->get_deleter( ti ): 0; + } + + void * get_untyped_deleter() const + { + return pi_? pi_->get_untyped_deleter(): 0; + } +}; + + +class weak_count +{ +private: + + sp_counted_base * pi_; + +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + int id_; +#endif + + friend class shared_count; + +public: + + weak_count(): pi_(0) // nothrow +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(weak_count_id) +#endif + { + } + + weak_count(shared_count const & r): pi_(r.pi_) // nothrow +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(weak_count_id) +#endif + { + if(pi_ != 0) pi_->weak_add_ref(); + } + + weak_count(weak_count const & r): pi_(r.pi_) // nothrow +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(weak_count_id) +#endif + { + if(pi_ != 0) pi_->weak_add_ref(); + } + +// Move support + +#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + + weak_count(weak_count && r): pi_(r.pi_) // nothrow +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(weak_count_id) +#endif + { + r.pi_ = 0; + } + +#endif + + ~weak_count() // nothrow + { + if(pi_ != 0) pi_->weak_release(); +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + id_ = 0; +#endif + } + + weak_count & operator= (shared_count const & r) // nothrow + { + sp_counted_base * tmp = r.pi_; + + if( tmp != pi_ ) + { + if(tmp != 0) tmp->weak_add_ref(); + if(pi_ != 0) pi_->weak_release(); + pi_ = tmp; + } + + return *this; + } + + weak_count & operator= (weak_count const & r) // nothrow + { + sp_counted_base * tmp = r.pi_; + + if( tmp != pi_ ) + { + if(tmp != 0) tmp->weak_add_ref(); + if(pi_ != 0) pi_->weak_release(); + pi_ = tmp; + } + + return *this; + } + + void swap(weak_count & r) // nothrow + { + sp_counted_base * tmp = r.pi_; + r.pi_ = pi_; + pi_ = tmp; + } + + long use_count() const // nothrow + { + return pi_ != 0? pi_->use_count(): 0; + } + + bool empty() const // nothrow + { + return pi_ == 0; + } + + friend inline bool operator==(weak_count const & a, weak_count const & b) + { + return a.pi_ == b.pi_; + } + + friend inline bool operator<(weak_count const & a, weak_count const & b) + { + return std::less()(a.pi_, b.pi_); + } +}; + +inline shared_count::shared_count( weak_count const & r ): pi_( r.pi_ ) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(shared_count_id) +#endif +{ + if( pi_ == 0 || !pi_->add_ref_lock() ) + { + boost::throw_exception( boost::bad_weak_ptr() ); + } +} + +inline shared_count::shared_count( weak_count const & r, sp_nothrow_tag ): pi_( r.pi_ ) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + , id_(shared_count_id) +#endif +{ + if( pi_ != 0 && !pi_->add_ref_lock() ) + { + pi_ = 0; + } +} + +} // namespace detail + +} // namespace boost + +#ifdef __BORLANDC__ +# pragma warn .8027 // Functions containing try are not expanded inline +#endif + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SHARED_COUNT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_convertible.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_convertible.hpp new file mode 100644 index 0000000000..4bba9ed444 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_convertible.hpp @@ -0,0 +1,92 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_CONVERTIBLE_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_CONVERTIBLE_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// detail/sp_convertible.hpp +// +// Copyright 2008 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include +#include + +#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( BOOST_NO_SFINAE ) +# define BOOST_SP_NO_SP_CONVERTIBLE +#endif + +#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ < 303 ) +# define BOOST_SP_NO_SP_CONVERTIBLE +#endif + +#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x630 ) +# define BOOST_SP_NO_SP_CONVERTIBLE +#endif + +#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) + +namespace boost +{ + +namespace detail +{ + +template< class Y, class T > struct sp_convertible +{ + typedef char (&yes) [1]; + typedef char (&no) [2]; + + static yes f( T* ); + static no f( ... ); + + enum _vt { value = sizeof( (f)( static_cast(0) ) ) == sizeof(yes) }; +}; + +template< class Y, class T > struct sp_convertible< Y, T[] > +{ + enum _vt { value = false }; +}; + +template< class Y, class T > struct sp_convertible< Y[], T[] > +{ + enum _vt { value = sp_convertible< Y[1], T[1] >::value }; +}; + +template< class Y, std::size_t N, class T > struct sp_convertible< Y[N], T[] > +{ + enum _vt { value = sp_convertible< Y[1], T[1] >::value }; +}; + +struct sp_empty +{ +}; + +template< bool > struct sp_enable_if_convertible_impl; + +template<> struct sp_enable_if_convertible_impl +{ + typedef sp_empty type; +}; + +template<> struct sp_enable_if_convertible_impl +{ +}; + +template< class Y, class T > struct sp_enable_if_convertible: public sp_enable_if_convertible_impl< sp_convertible< Y, T >::value > +{ +}; + +} // namespace detail + +} // namespace boost + +#endif // !defined( BOOST_SP_NO_SP_CONVERTIBLE ) + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_CONVERTIBLE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base.hpp new file mode 100644 index 0000000000..0addf077d1 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base.hpp @@ -0,0 +1,93 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// detail/sp_counted_base.hpp +// +// Copyright 2005-2013 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include +#include + +#if defined( __clang__ ) && defined( __has_extension ) +# if __has_extension( __c_atomic__ ) +# define BOOST_SP_HAS_CLANG_C11_ATOMICS +# endif +#endif + +#if defined( BOOST_SP_DISABLE_THREADS ) +# include + +#elif defined( BOOST_SP_USE_STD_ATOMIC ) +# include + +#elif defined( BOOST_SP_USE_SPINLOCK ) +# include + +#elif defined( BOOST_SP_USE_PTHREADS ) +# include + +#elif defined( BOOST_DISABLE_THREADS ) && !defined( BOOST_SP_ENABLE_THREADS ) && !defined( BOOST_DISABLE_WIN32 ) +# include + +#elif defined( BOOST_SP_HAS_CLANG_C11_ATOMICS ) +# include + +#elif defined( __SNC__ ) +# include + +#elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) ) && !defined(__PATHSCALE__) +# include + +#elif defined(__HP_aCC) && defined(__ia64) +# include + +#elif defined( __GNUC__ ) && defined( __ia64__ ) && !defined( __INTEL_COMPILER ) && !defined(__PATHSCALE__) +# include + +#elif defined( __IBMCPP__ ) && defined( __powerpc ) +# include + +#elif defined( __MWERKS__ ) && defined( __POWERPC__ ) +# include + +#elif defined( __GNUC__ ) && ( defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc ) ) && !defined(__PATHSCALE__) && !defined( _AIX ) +# include + +#elif defined( __GNUC__ ) && ( defined( __mips__ ) || defined( _mips ) ) && !defined(__PATHSCALE__) +# include + +#elif defined( BOOST_SP_HAS_SYNC ) +# include + +#elif defined(__GNUC__) && ( defined( __sparcv9 ) || ( defined( __sparcv8 ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 402 ) ) ) +# include + +#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined(__CYGWIN__) +# include + +#elif defined( _AIX ) +# include + +#elif !defined( BOOST_HAS_THREADS ) +# include + +#else +# include + +#endif + +#undef BOOST_SP_HAS_CLANG_C11_ATOMICS + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp new file mode 100644 index 0000000000..cebc243d2e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp @@ -0,0 +1,151 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_ACC_IA64_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_ACC_IA64_HPP_INCLUDED + +// +// detail/sp_counted_base_acc_ia64.hpp - aC++ on HP-UX IA64 +// +// Copyright 2007 Baruch Zilber +// Copyright 2007 Boris Gubenko +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// +// Lock-free algorithm by Alexander Terekhov +// + +#include +#include + +namespace boost +{ + +namespace detail +{ + +inline void atomic_increment( int * pw ) +{ + // ++*pw; + + _Asm_fetchadd(_FASZ_W, _SEM_REL, pw, +1, _LDHINT_NONE); +} + +inline int atomic_decrement( int * pw ) +{ + // return --*pw; + + int r = static_cast(_Asm_fetchadd(_FASZ_W, _SEM_REL, pw, -1, _LDHINT_NONE)); + if (1 == r) + { + _Asm_mf(); + } + + return r - 1; +} + +inline int atomic_conditional_increment( int * pw ) +{ + // if( *pw != 0 ) ++*pw; + // return *pw; + + int v = *pw; + + for (;;) + { + if (0 == v) + { + return 0; + } + + _Asm_mov_to_ar(_AREG_CCV, + v, + (_UP_CALL_FENCE | _UP_SYS_FENCE | _DOWN_CALL_FENCE | _DOWN_SYS_FENCE)); + int r = static_cast(_Asm_cmpxchg(_SZ_W, _SEM_ACQ, pw, v + 1, _LDHINT_NONE)); + if (r == v) + { + return r + 1; + } + + v = r; + } +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + int use_count_; // #shared + int weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_decrement( &use_count_ ) == 0 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_decrement( &weak_count_ ) == 0 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return static_cast( use_count_ ); // TODO use ld.acq here + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_ACC_IA64_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_aix.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_aix.hpp new file mode 100644 index 0000000000..fe6c727e38 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_aix.hpp @@ -0,0 +1,143 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_AIX_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_AIX_HPP_INCLUDED + +// +// detail/sp_counted_base_aix.hpp +// based on: detail/sp_counted_base_w32.hpp +// +// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. +// Copyright 2004-2005 Peter Dimov +// Copyright 2006 Michael van der Westhuizen +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// +// Lock-free algorithm by Alexander Terekhov +// +// Thanks to Ben Hitchings for the #weak + (#shared != 0) +// formulation +// + +#include +#include +#include + +namespace boost +{ + +namespace detail +{ + +inline void atomic_increment( int32_t* pw ) +{ + // ++*pw; + + fetch_and_add( pw, 1 ); +} + +inline int32_t atomic_decrement( int32_t * pw ) +{ + // return --*pw; + + int32_t originalValue; + + __lwsync(); + originalValue = fetch_and_add( pw, -1 ); + __isync(); + + return (originalValue - 1); +} + +inline int32_t atomic_conditional_increment( int32_t * pw ) +{ + // if( *pw != 0 ) ++*pw; + // return *pw; + + int32_t tmp = fetch_and_add( pw, 0 ); + for( ;; ) + { + if( tmp == 0 ) return 0; + if( compare_and_swap( pw, &tmp, tmp + 1 ) ) return (tmp + 1); + } +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + int32_t use_count_; // #shared + int32_t weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_decrement( &use_count_ ) == 0 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_decrement( &weak_count_ ) == 0 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return fetch_and_add( const_cast(&use_count_), 0 ); + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_AIX_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_clang.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_clang.hpp new file mode 100644 index 0000000000..c66b985465 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_clang.hpp @@ -0,0 +1,140 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CLANG_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CLANG_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// detail/sp_counted_base_clang.hpp - __c11 clang intrinsics +// +// Copyright (c) 2007, 2013, 2015 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include +#include + +namespace boost +{ + +namespace detail +{ + +typedef _Atomic( boost::int_least32_t ) atomic_int_least32_t; + +inline void atomic_increment( atomic_int_least32_t * pw ) +{ + __c11_atomic_fetch_add( pw, 1, __ATOMIC_RELAXED ); +} + +inline boost::int_least32_t atomic_decrement( atomic_int_least32_t * pw ) +{ + return __c11_atomic_fetch_sub( pw, 1, __ATOMIC_ACQ_REL ); +} + +inline boost::int_least32_t atomic_conditional_increment( atomic_int_least32_t * pw ) +{ + // long r = *pw; + // if( r != 0 ) ++*pw; + // return r; + + boost::int_least32_t r = __c11_atomic_load( pw, __ATOMIC_RELAXED ); + + for( ;; ) + { + if( r == 0 ) + { + return r; + } + + if( __c11_atomic_compare_exchange_weak( pw, &r, r + 1, __ATOMIC_RELAXED, __ATOMIC_RELAXED ) ) + { + return r; + } + } +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + atomic_int_least32_t use_count_; // #shared + atomic_int_least32_t weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base() + { + __c11_atomic_init( &use_count_, 1 ); + __c11_atomic_init( &weak_count_, 1 ); + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_decrement( &use_count_ ) == 1 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_decrement( &weak_count_ ) == 1 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return __c11_atomic_load( const_cast< atomic_int_least32_t* >( &use_count_ ), __ATOMIC_ACQUIRE ); + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CLANG_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp new file mode 100644 index 0000000000..6c268e8921 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp @@ -0,0 +1,171 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_PPC_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_PPC_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// detail/sp_counted_base_cw_ppc.hpp - CodeWarrior on PowerPC +// +// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. +// Copyright 2004-2005 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// +// Lock-free algorithm by Alexander Terekhov +// +// Thanks to Ben Hitchings for the #weak + (#shared != 0) +// formulation +// + +#include + +namespace boost +{ + +namespace detail +{ + +inline void atomic_increment( register long * pw ) +{ + register int a; + + asm + { +loop: + + lwarx a, 0, pw + addi a, a, 1 + stwcx. a, 0, pw + bne- loop + } +} + +inline long atomic_decrement( register long * pw ) +{ + register int a; + + asm + { + sync + +loop: + + lwarx a, 0, pw + addi a, a, -1 + stwcx. a, 0, pw + bne- loop + + isync + } + + return a; +} + +inline long atomic_conditional_increment( register long * pw ) +{ + register int a; + + asm + { +loop: + + lwarx a, 0, pw + cmpwi a, 0 + beq store + + addi a, a, 1 + +store: + + stwcx. a, 0, pw + bne- loop + } + + return a; +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + long use_count_; // #shared + long weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_decrement( &use_count_ ) == 0 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_decrement( &weak_count_ ) == 0 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return static_cast( use_count_ ); + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_PPC_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp new file mode 100644 index 0000000000..f6e3904157 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp @@ -0,0 +1,158 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_IA64_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_IA64_HPP_INCLUDED + +// +// detail/sp_counted_base_gcc_ia64.hpp - g++ on IA64 +// +// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. +// Copyright 2004-2006 Peter Dimov +// Copyright 2005 Ben Hutchings +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// +// Lock-free algorithm by Alexander Terekhov +// + +#include + +namespace boost +{ + +namespace detail +{ + +inline void atomic_increment( int * pw ) +{ + // ++*pw; + + int tmp; + + // No barrier is required here but fetchadd always has an acquire or + // release barrier associated with it. We choose release as it should be + // cheaper. + __asm__ ("fetchadd4.rel %0=%1,1" : + "=r"(tmp), "=m"(*pw) : + "m"( *pw )); +} + +inline int atomic_decrement( int * pw ) +{ + // return --*pw; + + int rv; + + __asm__ (" fetchadd4.rel %0=%1,-1 ;; \n" + " cmp.eq p7,p0=1,%0 ;; \n" + "(p7) ld4.acq %0=%1 " : + "=&r"(rv), "=m"(*pw) : + "m"( *pw ) : + "p7"); + + return rv; +} + +inline int atomic_conditional_increment( int * pw ) +{ + // if( *pw != 0 ) ++*pw; + // return *pw; + + int rv, tmp, tmp2; + + __asm__ ("0: ld4 %0=%3 ;; \n" + " cmp.eq p7,p0=0,%0 ;; \n" + "(p7) br.cond.spnt 1f \n" + " mov ar.ccv=%0 \n" + " add %1=1,%0 ;; \n" + " cmpxchg4.acq %2=%3,%1,ar.ccv ;; \n" + " cmp.ne p7,p0=%0,%2 ;; \n" + "(p7) br.cond.spnt 0b \n" + " mov %0=%1 ;; \n" + "1:" : + "=&r"(rv), "=&r"(tmp), "=&r"(tmp2), "=m"(*pw) : + "m"( *pw ) : + "ar.ccv", "p7"); + + return rv; +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + int use_count_; // #shared + int weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_decrement( &use_count_ ) == 0 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_decrement( &weak_count_ ) == 0 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return static_cast( use_count_ ); // TODO use ld.acq here + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_IA64_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp new file mode 100644 index 0000000000..545c8ae4fc --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp @@ -0,0 +1,182 @@ +#ifndef BOOST_DETAIL_SP_COUNTED_BASE_GCC_MIPS_HPP_INCLUDED +#define BOOST_DETAIL_SP_COUNTED_BASE_GCC_MIPS_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// detail/sp_counted_base_gcc_mips.hpp - g++ on MIPS +// +// Copyright (c) 2009, Spirent Communications, Inc. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// +// Lock-free algorithm by Alexander Terekhov +// + +#include + +namespace boost +{ + +namespace detail +{ + +inline void atomic_increment( int * pw ) +{ + // ++*pw; + + int tmp; + + __asm__ __volatile__ + ( + "0:\n\t" + ".set push\n\t" + ".set mips2\n\t" + "ll %0, %1\n\t" + "addiu %0, 1\n\t" + "sc %0, %1\n\t" + ".set pop\n\t" + "beqz %0, 0b": + "=&r"( tmp ), "=m"( *pw ): + "m"( *pw ) + ); +} + +inline int atomic_decrement( int * pw ) +{ + // return --*pw; + + int rv, tmp; + + __asm__ __volatile__ + ( + "0:\n\t" + ".set push\n\t" + ".set mips2\n\t" + "ll %1, %2\n\t" + "addiu %0, %1, -1\n\t" + "sc %0, %2\n\t" + ".set pop\n\t" + "beqz %0, 0b\n\t" + "addiu %0, %1, -1": + "=&r"( rv ), "=&r"( tmp ), "=m"( *pw ): + "m"( *pw ): + "memory" + ); + + return rv; +} + +inline int atomic_conditional_increment( int * pw ) +{ + // if( *pw != 0 ) ++*pw; + // return *pw; + + int rv, tmp; + + __asm__ __volatile__ + ( + "0:\n\t" + ".set push\n\t" + ".set mips2\n\t" + "ll %0, %2\n\t" + "beqz %0, 1f\n\t" + "addiu %1, %0, 1\n\t" + "sc %1, %2\n\t" + ".set pop\n\t" + "beqz %1, 0b\n\t" + "addiu %0, %0, 1\n\t" + "1:": + "=&r"( rv ), "=&r"( tmp ), "=m"( *pw ): + "m"( *pw ): + "memory" + ); + + return rv; +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + int use_count_; // #shared + int weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_decrement( &use_count_ ) == 0 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_decrement( &weak_count_ ) == 0 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return static_cast( use_count_ ); + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_DETAIL_SP_COUNTED_BASE_GCC_MIPS_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp new file mode 100644 index 0000000000..2e5bc0e853 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp @@ -0,0 +1,182 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_PPC_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_PPC_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// detail/sp_counted_base_gcc_ppc.hpp - g++ on PowerPC +// +// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. +// Copyright 2004-2005 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// +// Lock-free algorithm by Alexander Terekhov +// +// Thanks to Ben Hitchings for the #weak + (#shared != 0) +// formulation +// + +#include + +namespace boost +{ + +namespace detail +{ + +inline void atomic_increment( int * pw ) +{ + // ++*pw; + + int tmp; + + __asm__ + ( + "0:\n\t" + "lwarx %1, 0, %2\n\t" + "addi %1, %1, 1\n\t" + "stwcx. %1, 0, %2\n\t" + "bne- 0b": + + "=m"( *pw ), "=&b"( tmp ): + "r"( pw ), "m"( *pw ): + "cc" + ); +} + +inline int atomic_decrement( int * pw ) +{ + // return --*pw; + + int rv; + + __asm__ __volatile__ + ( + "sync\n\t" + "0:\n\t" + "lwarx %1, 0, %2\n\t" + "addi %1, %1, -1\n\t" + "stwcx. %1, 0, %2\n\t" + "bne- 0b\n\t" + "isync": + + "=m"( *pw ), "=&b"( rv ): + "r"( pw ), "m"( *pw ): + "memory", "cc" + ); + + return rv; +} + +inline int atomic_conditional_increment( int * pw ) +{ + // if( *pw != 0 ) ++*pw; + // return *pw; + + int rv; + + __asm__ + ( + "0:\n\t" + "lwarx %1, 0, %2\n\t" + "cmpwi %1, 0\n\t" + "beq 1f\n\t" + "addi %1, %1, 1\n\t" + "1:\n\t" + "stwcx. %1, 0, %2\n\t" + "bne- 0b": + + "=m"( *pw ), "=&b"( rv ): + "r"( pw ), "m"( *pw ): + "cc" + ); + + return rv; +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + int use_count_; // #shared + int weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_decrement( &use_count_ ) == 0 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_decrement( &weak_count_ ) == 0 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return static_cast( use_count_ ); + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_PPC_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp new file mode 100644 index 0000000000..c6d20ce7ea --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp @@ -0,0 +1,167 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_SPARC_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_SPARC_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// detail/sp_counted_base_gcc_sparc.hpp - g++ on Sparc V8+ +// +// Copyright (c) 2006 Piotr Wyderski +// Copyright (c) 2006 Tomas Puverle +// Copyright (c) 2006 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// Thanks to Michael van der Westhuizen + +#include +#include // int32_t + +namespace boost +{ + +namespace detail +{ + +inline int32_t compare_and_swap( int32_t * dest_, int32_t compare_, int32_t swap_ ) +{ + __asm__ __volatile__( "cas [%1], %2, %0" + : "+r" (swap_) + : "r" (dest_), "r" (compare_) + : "memory" ); + + return swap_; +} + +inline int32_t atomic_fetch_and_add( int32_t * pw, int32_t dv ) +{ + // long r = *pw; + // *pw += dv; + // return r; + + for( ;; ) + { + int32_t r = *pw; + + if( __builtin_expect((compare_and_swap(pw, r, r + dv) == r), 1) ) + { + return r; + } + } +} + +inline void atomic_increment( int32_t * pw ) +{ + atomic_fetch_and_add( pw, 1 ); +} + +inline int32_t atomic_decrement( int32_t * pw ) +{ + return atomic_fetch_and_add( pw, -1 ); +} + +inline int32_t atomic_conditional_increment( int32_t * pw ) +{ + // long r = *pw; + // if( r != 0 ) ++*pw; + // return r; + + for( ;; ) + { + int32_t r = *pw; + + if( r == 0 ) + { + return r; + } + + if( __builtin_expect( ( compare_and_swap( pw, r, r + 1 ) == r ), 1 ) ) + { + return r; + } + } +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + int32_t use_count_; // #shared + int32_t weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_decrement( &use_count_ ) == 1 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_decrement( &weak_count_ ) == 1 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return const_cast< int32_t const volatile & >( use_count_ ); + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_SPARC_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp new file mode 100644 index 0000000000..173dce5c81 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp @@ -0,0 +1,174 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_X86_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_X86_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// detail/sp_counted_base_gcc_x86.hpp - g++ on 486+ or AMD64 +// +// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. +// Copyright 2004-2005 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// +// Lock-free algorithm by Alexander Terekhov +// +// Thanks to Ben Hitchings for the #weak + (#shared != 0) +// formulation +// + +#include + +namespace boost +{ + +namespace detail +{ + +inline int atomic_exchange_and_add( int * pw, int dv ) +{ + // int r = *pw; + // *pw += dv; + // return r; + + int r; + + __asm__ __volatile__ + ( + "lock\n\t" + "xadd %1, %0": + "=m"( *pw ), "=r"( r ): // outputs (%0, %1) + "m"( *pw ), "1"( dv ): // inputs (%2, %3 == %1) + "memory", "cc" // clobbers + ); + + return r; +} + +inline void atomic_increment( int * pw ) +{ + //atomic_exchange_and_add( pw, 1 ); + + __asm__ + ( + "lock\n\t" + "incl %0": + "=m"( *pw ): // output (%0) + "m"( *pw ): // input (%1) + "cc" // clobbers + ); +} + +inline int atomic_conditional_increment( int * pw ) +{ + // int rv = *pw; + // if( rv != 0 ) ++*pw; + // return rv; + + int rv, tmp; + + __asm__ + ( + "movl %0, %%eax\n\t" + "0:\n\t" + "test %%eax, %%eax\n\t" + "je 1f\n\t" + "movl %%eax, %2\n\t" + "incl %2\n\t" + "lock\n\t" + "cmpxchgl %2, %0\n\t" + "jne 0b\n\t" + "1:": + "=m"( *pw ), "=&a"( rv ), "=&r"( tmp ): // outputs (%0, %1, %2) + "m"( *pw ): // input (%3) + "cc" // clobbers + ); + + return rv; +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + int use_count_; // #shared + int weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_exchange_and_add( &use_count_, -1 ) == 1 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_exchange_and_add( &weak_count_, -1 ) == 1 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return static_cast( use_count_ ); + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_X86_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_nt.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_nt.hpp new file mode 100644 index 0000000000..5c901f9d16 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_nt.hpp @@ -0,0 +1,108 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_NT_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_NT_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// detail/sp_counted_base_nt.hpp +// +// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. +// Copyright 2004-2005 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include + +namespace boost +{ + +namespace detail +{ + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + long use_count_; // #shared + long weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + ++use_count_; + } + + bool add_ref_lock() // true on success + { + if( use_count_ == 0 ) return false; + ++use_count_; + return true; + } + + void release() // nothrow + { + if( --use_count_ == 0 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + ++weak_count_; + } + + void weak_release() // nothrow + { + if( --weak_count_ == 0 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return use_count_; + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_NT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_pt.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_pt.hpp new file mode 100644 index 0000000000..a16d2d8652 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_pt.hpp @@ -0,0 +1,137 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_PT_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_PT_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// detail/sp_counted_base_pt.hpp +// +// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. +// Copyright 2004-2005 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include +#include +#include + +namespace boost +{ + +namespace detail +{ + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + long use_count_; // #shared + long weak_count_; // #weak + (#shared != 0) + + mutable pthread_mutex_t m_; + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { +// HPUX 10.20 / DCE has a nonstandard pthread_mutex_init + +#if defined(__hpux) && defined(_DECTHREADS_) + BOOST_VERIFY( pthread_mutex_init( &m_, pthread_mutexattr_default ) == 0 ); +#else + BOOST_VERIFY( pthread_mutex_init( &m_, 0 ) == 0 ); +#endif + } + + virtual ~sp_counted_base() // nothrow + { + BOOST_VERIFY( pthread_mutex_destroy( &m_ ) == 0 ); + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 ); + ++use_count_; + BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 ); + } + + bool add_ref_lock() // true on success + { + BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 ); + bool r = use_count_ == 0? false: ( ++use_count_, true ); + BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 ); + return r; + } + + void release() // nothrow + { + BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 ); + long new_use_count = --use_count_; + BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 ); + + if( new_use_count == 0 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 ); + ++weak_count_; + BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 ); + } + + void weak_release() // nothrow + { + BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 ); + long new_weak_count = --weak_count_; + BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 ); + + if( new_weak_count == 0 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 ); + long r = use_count_; + BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 ); + + return r; + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_PT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp new file mode 100644 index 0000000000..56ed79fa97 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp @@ -0,0 +1,162 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SNC_PS3_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SNC_PS3_HPP_INCLUDED + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// detail/sp_counted_base_gcc_sparc.hpp - g++ on Sparc V8+ +// +// Copyright (c) 2006 Piotr Wyderski +// Copyright (c) 2006 Tomas Puverle +// Copyright (c) 2006 Peter Dimov +// Copyright (c) 2011 Emil Dotchevski +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// Thanks to Michael van der Westhuizen + +#include +#include // uint32_t + +namespace boost +{ + +namespace detail +{ + +inline uint32_t compare_and_swap( uint32_t * dest_, uint32_t compare_, uint32_t swap_ ) +{ + return __builtin_cellAtomicCompareAndSwap32(dest_,compare_,swap_); +} + +inline uint32_t atomic_fetch_and_add( uint32_t * pw, uint32_t dv ) +{ + // long r = *pw; + // *pw += dv; + // return r; + + for( ;; ) + { + uint32_t r = *pw; + + if( __builtin_expect((compare_and_swap(pw, r, r + dv) == r), 1) ) + { + return r; + } + } +} + +inline void atomic_increment( uint32_t * pw ) +{ + (void) __builtin_cellAtomicIncr32( pw ); +} + +inline uint32_t atomic_decrement( uint32_t * pw ) +{ + return __builtin_cellAtomicDecr32( pw ); +} + +inline uint32_t atomic_conditional_increment( uint32_t * pw ) +{ + // long r = *pw; + // if( r != 0 ) ++*pw; + // return r; + + for( ;; ) + { + uint32_t r = *pw; + + if( r == 0 ) + { + return r; + } + + if( __builtin_expect( ( compare_and_swap( pw, r, r + 1 ) == r ), 1 ) ) + { + return r; + } + } +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + uint32_t use_count_; // #shared + uint32_t weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_decrement( &use_count_ ) == 1 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_decrement( &weak_count_ ) == 1 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return const_cast< uint32_t const volatile & >( use_count_ ); + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SNC_PS3_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_spin.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_spin.hpp new file mode 100644 index 0000000000..77734e727d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_spin.hpp @@ -0,0 +1,132 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SPIN_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SPIN_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// detail/sp_counted_base_spin.hpp - spinlock pool atomic emulation +// +// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. +// Copyright 2004-2008 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include +#include + +namespace boost +{ + +namespace detail +{ + +inline int atomic_exchange_and_add( int * pw, int dv ) +{ + spinlock_pool<1>::scoped_lock lock( pw ); + + int r = *pw; + *pw += dv; + return r; +} + +inline void atomic_increment( int * pw ) +{ + spinlock_pool<1>::scoped_lock lock( pw ); + ++*pw; +} + +inline int atomic_conditional_increment( int * pw ) +{ + spinlock_pool<1>::scoped_lock lock( pw ); + + int rv = *pw; + if( rv != 0 ) ++*pw; + return rv; +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + int use_count_; // #shared + int weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_exchange_and_add( &use_count_, -1 ) == 1 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_exchange_and_add( &weak_count_, -1 ) == 1 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + spinlock_pool<1>::scoped_lock lock( &use_count_ ); + return use_count_; + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SPIN_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp new file mode 100644 index 0000000000..cab8453591 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp @@ -0,0 +1,137 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_STD_ATOMIC_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_STD_ATOMIC_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// detail/sp_counted_base_std_atomic.hpp - C++11 std::atomic +// +// Copyright (c) 2007, 2013 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include +#include +#include + +namespace boost +{ + +namespace detail +{ + +inline void atomic_increment( std::atomic_int_least32_t * pw ) +{ + pw->fetch_add( 1, std::memory_order_relaxed ); +} + +inline std::int_least32_t atomic_decrement( std::atomic_int_least32_t * pw ) +{ + return pw->fetch_sub( 1, std::memory_order_acq_rel ); +} + +inline std::int_least32_t atomic_conditional_increment( std::atomic_int_least32_t * pw ) +{ + // long r = *pw; + // if( r != 0 ) ++*pw; + // return r; + + std::int_least32_t r = pw->load( std::memory_order_relaxed ); + + for( ;; ) + { + if( r == 0 ) + { + return r; + } + + if( pw->compare_exchange_weak( r, r + 1, std::memory_order_relaxed, std::memory_order_relaxed ) ) + { + return r; + } + } +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + std::atomic_int_least32_t use_count_; // #shared + std::atomic_int_least32_t weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_decrement( &use_count_ ) == 1 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_decrement( &weak_count_ ) == 1 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return use_count_.load( std::memory_order_acquire ); + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_STD_ATOMIC_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_sync.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_sync.hpp new file mode 100644 index 0000000000..fafed0e72e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_sync.hpp @@ -0,0 +1,156 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SYNC_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SYNC_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// detail/sp_counted_base_sync.hpp - g++ 4.1+ __sync intrinsics +// +// Copyright (c) 2007 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include +#include + +#if defined( __ia64__ ) && defined( __INTEL_COMPILER ) +# include +#endif + +namespace boost +{ + +namespace detail +{ + +#if INT_MAX >= 2147483647 + +typedef int sp_int32_t; + +#else + +typedef long sp_int32_t; + +#endif + +inline void atomic_increment( sp_int32_t * pw ) +{ + __sync_fetch_and_add( pw, 1 ); +} + +inline sp_int32_t atomic_decrement( sp_int32_t * pw ) +{ + return __sync_fetch_and_add( pw, -1 ); +} + +inline sp_int32_t atomic_conditional_increment( sp_int32_t * pw ) +{ + // long r = *pw; + // if( r != 0 ) ++*pw; + // return r; + + sp_int32_t r = *pw; + + for( ;; ) + { + if( r == 0 ) + { + return r; + } + + sp_int32_t r2 = __sync_val_compare_and_swap( pw, r, r + 1 ); + + if( r2 == r ) + { + return r; + } + else + { + r = r2; + } + } +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + sp_int32_t use_count_; // #shared + sp_int32_t weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_decrement( &use_count_ ) == 1 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_decrement( &weak_count_ ) == 1 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return const_cast< sp_int32_t const volatile & >( use_count_ ); + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SYNC_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp new file mode 100644 index 0000000000..162f309b56 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp @@ -0,0 +1,151 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_VACPP_PPC_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_VACPP_PPC_HPP_INCLUDED + +// +// detail/sp_counted_base_vacpp_ppc.hpp - xlC(vacpp) on POWER +// based on: detail/sp_counted_base_w32.hpp +// +// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. +// Copyright 2004-2005 Peter Dimov +// Copyright 2006 Michael van der Westhuizen +// Copyright 2012 IBM Corp. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// +// Lock-free algorithm by Alexander Terekhov +// +// Thanks to Ben Hitchings for the #weak + (#shared != 0) +// formulation +// + +#include + +extern "builtin" void __lwsync(void); +extern "builtin" void __isync(void); +extern "builtin" int __fetch_and_add(volatile int* addr, int val); +extern "builtin" int __compare_and_swap(volatile int*, int*, int); + +namespace boost +{ + +namespace detail +{ + +inline void atomic_increment( int *pw ) +{ + // ++*pw; + __lwsync(); + __fetch_and_add(pw, 1); + __isync(); +} + +inline int atomic_decrement( int *pw ) +{ + // return --*pw; + __lwsync(); + int originalValue = __fetch_and_add(pw, -1); + __isync(); + + return (originalValue - 1); +} + +inline int atomic_conditional_increment( int *pw ) +{ + // if( *pw != 0 ) ++*pw; + // return *pw; + + __lwsync(); + int v = *const_cast(pw); + for (;;) + // loop until state is known + { + if (v == 0) return 0; + if (__compare_and_swap(pw, &v, v + 1)) + { + __isync(); return (v + 1); + } + } +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + int use_count_; // #shared + int weak_count_; // #weak + (#shared != 0) + char pad[64] __attribute__((__aligned__(64))); + // pad to prevent false sharing +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_decrement( &use_count_ ) == 0 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_decrement( &weak_count_ ) == 0 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return *const_cast(&use_count_); + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_VACPP_PPC_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_w32.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_w32.hpp new file mode 100644 index 0000000000..4ba509c6cd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_base_w32.hpp @@ -0,0 +1,131 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_W32_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_W32_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// detail/sp_counted_base_w32.hpp +// +// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. +// Copyright 2004-2005 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// +// Lock-free algorithm by Alexander Terekhov +// +// Thanks to Ben Hitchings for the #weak + (#shared != 0) +// formulation +// + +#include +#include +#include + +namespace boost +{ + +namespace detail +{ + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + long use_count_; // #shared + long weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + BOOST_SP_INTERLOCKED_INCREMENT( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + for( ;; ) + { + long tmp = static_cast< long const volatile& >( use_count_ ); + if( tmp == 0 ) return false; + +#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1200 ) + + // work around a code generation bug + + long tmp2 = tmp + 1; + if( BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE( &use_count_, tmp2, tmp ) == tmp2 - 1 ) return true; + +#else + + if( BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE( &use_count_, tmp + 1, tmp ) == tmp ) return true; + +#endif + } + } + + void release() // nothrow + { + if( BOOST_SP_INTERLOCKED_DECREMENT( &use_count_ ) == 0 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + BOOST_SP_INTERLOCKED_INCREMENT( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( BOOST_SP_INTERLOCKED_DECREMENT( &weak_count_ ) == 0 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return static_cast( use_count_ ); + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_W32_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_impl.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_impl.hpp new file mode 100644 index 0000000000..1222f3c9f4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_counted_impl.hpp @@ -0,0 +1,271 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_IMPL_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_IMPL_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// detail/sp_counted_impl.hpp +// +// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. +// Copyright 2004-2005 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include + +#if defined(BOOST_SP_USE_STD_ALLOCATOR) && defined(BOOST_SP_USE_QUICK_ALLOCATOR) +# error BOOST_SP_USE_STD_ALLOCATOR and BOOST_SP_USE_QUICK_ALLOCATOR are incompatible. +#endif + +#include +#include + +#if defined(BOOST_SP_USE_QUICK_ALLOCATOR) +#include +#endif + +#if defined(BOOST_SP_USE_STD_ALLOCATOR) +#include // std::allocator +#endif + +#include // std::size_t + +namespace boost +{ + +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + +void sp_scalar_constructor_hook( void * px, std::size_t size, void * pn ); +void sp_scalar_destructor_hook( void * px, std::size_t size, void * pn ); + +#endif + +namespace detail +{ + +template class sp_counted_impl_p: public sp_counted_base +{ +private: + + X * px_; + + sp_counted_impl_p( sp_counted_impl_p const & ); + sp_counted_impl_p & operator= ( sp_counted_impl_p const & ); + + typedef sp_counted_impl_p this_type; + +public: + + explicit sp_counted_impl_p( X * px ): px_( px ) + { +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + boost::sp_scalar_constructor_hook( px, sizeof(X), this ); +#endif + } + + virtual void dispose() // nothrow + { +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + boost::sp_scalar_destructor_hook( px_, sizeof(X), this ); +#endif + boost::checked_delete( px_ ); + } + + virtual void * get_deleter( sp_typeinfo const & ) + { + return 0; + } + + virtual void * get_untyped_deleter() + { + return 0; + } + +#if defined(BOOST_SP_USE_STD_ALLOCATOR) + + void * operator new( std::size_t ) + { + return std::allocator().allocate( 1, static_cast(0) ); + } + + void operator delete( void * p ) + { + std::allocator().deallocate( static_cast(p), 1 ); + } + +#endif + +#if defined(BOOST_SP_USE_QUICK_ALLOCATOR) + + void * operator new( std::size_t ) + { + return quick_allocator::alloc(); + } + + void operator delete( void * p ) + { + quick_allocator::dealloc( p ); + } + +#endif +}; + +// +// Borland's Codeguard trips up over the -Vx- option here: +// +#ifdef __CODEGUARD__ +# pragma option push -Vx- +#endif + +template class sp_counted_impl_pd: public sp_counted_base +{ +private: + + P ptr; // copy constructor must not throw + D del; // copy constructor must not throw + + sp_counted_impl_pd( sp_counted_impl_pd const & ); + sp_counted_impl_pd & operator= ( sp_counted_impl_pd const & ); + + typedef sp_counted_impl_pd this_type; + +public: + + // pre: d(p) must not throw + + sp_counted_impl_pd( P p, D & d ): ptr( p ), del( d ) + { + } + + sp_counted_impl_pd( P p ): ptr( p ), del() + { + } + + virtual void dispose() // nothrow + { + del( ptr ); + } + + virtual void * get_deleter( sp_typeinfo const & ti ) + { + return ti == BOOST_SP_TYPEID(D)? &reinterpret_cast( del ): 0; + } + + virtual void * get_untyped_deleter() + { + return &reinterpret_cast( del ); + } + +#if defined(BOOST_SP_USE_STD_ALLOCATOR) + + void * operator new( std::size_t ) + { + return std::allocator().allocate( 1, static_cast(0) ); + } + + void operator delete( void * p ) + { + std::allocator().deallocate( static_cast(p), 1 ); + } + +#endif + +#if defined(BOOST_SP_USE_QUICK_ALLOCATOR) + + void * operator new( std::size_t ) + { + return quick_allocator::alloc(); + } + + void operator delete( void * p ) + { + quick_allocator::dealloc( p ); + } + +#endif +}; + +template class sp_counted_impl_pda: public sp_counted_base +{ +private: + + P p_; // copy constructor must not throw + D d_; // copy constructor must not throw + A a_; // copy constructor must not throw + + sp_counted_impl_pda( sp_counted_impl_pda const & ); + sp_counted_impl_pda & operator= ( sp_counted_impl_pda const & ); + + typedef sp_counted_impl_pda this_type; + +public: + + // pre: d( p ) must not throw + + sp_counted_impl_pda( P p, D & d, A a ): p_( p ), d_( d ), a_( a ) + { + } + + sp_counted_impl_pda( P p, A a ): p_( p ), d_( a ), a_( a ) + { + } + + virtual void dispose() // nothrow + { + d_( p_ ); + } + + virtual void destroy() // nothrow + { +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + typedef typename std::allocator_traits::template rebind_alloc< this_type > A2; + +#else + + typedef typename A::template rebind< this_type >::other A2; + +#endif + + A2 a2( a_ ); + +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + std::allocator_traits::destroy( a2, this ); + +#else + + this->~this_type(); + +#endif + + a2.deallocate( this, 1 ); + } + + virtual void * get_deleter( sp_typeinfo const & ti ) + { + return ti == BOOST_SP_TYPEID( D )? &reinterpret_cast( d_ ): 0; + } + + virtual void * get_untyped_deleter() + { + return &reinterpret_cast( d_ ); + } +}; + +#ifdef __CODEGUARD__ +# pragma option pop +#endif + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_IMPL_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_forward.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_forward.hpp new file mode 100644 index 0000000000..8fdec65b7f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_forward.hpp @@ -0,0 +1,52 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_FORWARD_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_FORWARD_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// detail/sp_forward.hpp +// +// Copyright 2008,2012 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include + +namespace boost +{ + +namespace detail +{ + +#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + +#if defined( BOOST_GCC ) && __GNUC__ * 100 + __GNUC_MINOR__ <= 404 + +// GCC 4.4 supports an outdated version of rvalue references and creates a copy of the forwarded object. +// This results in warnings 'returning reference to temporary'. Therefore we use a special version similar to std::forward. +template< class T > T&& sp_forward( T && t ) BOOST_NOEXCEPT +{ + return t; +} + +#else + +template< class T > T&& sp_forward( T & t ) BOOST_NOEXCEPT +{ + return static_cast< T&& >( t ); +} + +#endif + +#endif + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_FORWARD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_has_sync.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_has_sync.hpp new file mode 100644 index 0000000000..16de21d379 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_has_sync.hpp @@ -0,0 +1,69 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_HAS_SYNC_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_HAS_SYNC_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/smart_ptr/detail/sp_has_sync.hpp +// +// Copyright (c) 2008, 2009 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// Defines the BOOST_SP_HAS_SYNC macro if the __sync_* intrinsics +// are available. +// + +#ifndef BOOST_SP_NO_SYNC + +#if defined( __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 ) + +# define BOOST_SP_HAS_SYNC + +#elif defined( __IBMCPP__ ) && ( __IBMCPP__ >= 1210 ) + +# define BOOST_SP_HAS_SYNC + +#elif defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 ) + +#define BOOST_SP_HAS_SYNC + +#if defined( __arm__ ) || defined( __armel__ ) +#undef BOOST_SP_HAS_SYNC +#endif + +#if defined( __hppa ) || defined( __hppa__ ) +#undef BOOST_SP_HAS_SYNC +#endif + +#if defined( __m68k__ ) +#undef BOOST_SP_HAS_SYNC +#endif + +#if defined( __sh__ ) +#undef BOOST_SP_HAS_SYNC +#endif + +#if defined( __sparc__ ) +#undef BOOST_SP_HAS_SYNC +#endif + +#if defined( __INTEL_COMPILER ) && !defined( __ia64__ ) && ( __INTEL_COMPILER < 1110 ) +#undef BOOST_SP_HAS_SYNC +#endif + +#if defined(__PATHSCALE__) && ((__PATHCC__ == 4) && (__PATHCC_MINOR__ < 9)) +#undef BOOST_SP_HAS_SYNC +#endif + +#endif + +#endif // #ifndef BOOST_SP_NO_SYNC + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_HAS_SYNC_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_if_array.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_if_array.hpp new file mode 100644 index 0000000000..9a2c1e0baa --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_if_array.hpp @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2012-2014 Glen Joseph Fernandes + * glenfe at live dot com + * + * Distributed under the Boost Software License, + * Version 1.0. (See accompanying file LICENSE_1_0.txt + * or copy at http://boost.org/LICENSE_1_0.txt) + */ +#ifndef BOOST_SMART_PTR_DETAIL_SP_IF_ARRAY_HPP +#define BOOST_SMART_PTR_DETAIL_SP_IF_ARRAY_HPP + +#include + +namespace boost { + namespace detail { + template + struct sp_if_array; + + template + struct sp_if_array { + typedef boost::shared_ptr type; + }; + + template + struct sp_if_size_array; + + template + struct sp_if_size_array { + typedef boost::shared_ptr type; + }; + } +} + +#endif diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_interlocked.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_interlocked.hpp new file mode 100644 index 0000000000..814b0c2e93 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_interlocked.hpp @@ -0,0 +1,152 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_INTERLOCKED_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_INTERLOCKED_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/detail/sp_interlocked.hpp +// +// Copyright 2005, 2014 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// + +#include + +// BOOST_SP_HAS_INTRIN_H + +// VC9 has intrin.h, but it collides with +#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1600 + +# define BOOST_SP_HAS_INTRIN_H + +// Unlike __MINGW64__, __MINGW64_VERSION_MAJOR is defined by MinGW-w64 for both 32 and 64-bit targets. +#elif defined( __MINGW64_VERSION_MAJOR ) + +// MinGW-w64 provides intrin.h for both 32 and 64-bit targets. +# define BOOST_SP_HAS_INTRIN_H + +// Intel C++ on Windows on VC10+ stdlib +#elif defined( BOOST_INTEL_WIN ) && defined( _CPPLIB_VER ) && _CPPLIB_VER >= 520 + +# define BOOST_SP_HAS_INTRIN_H + +#endif + +#if defined( BOOST_USE_WINDOWS_H ) + +# include + +# define BOOST_SP_INTERLOCKED_INCREMENT InterlockedIncrement +# define BOOST_SP_INTERLOCKED_DECREMENT InterlockedDecrement +# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE InterlockedExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd + +#elif defined( BOOST_USE_INTRIN_H ) || defined( BOOST_SP_HAS_INTRIN_H ) + +#include + +# define BOOST_SP_INTERLOCKED_INCREMENT _InterlockedIncrement +# define BOOST_SP_INTERLOCKED_DECREMENT _InterlockedDecrement +# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE _InterlockedExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd + +#elif defined( _WIN32_WCE ) + +#if _WIN32_WCE >= 0x600 + +extern "C" long __cdecl _InterlockedIncrement( long volatile * ); +extern "C" long __cdecl _InterlockedDecrement( long volatile * ); +extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long ); +extern "C" long __cdecl _InterlockedExchange( long volatile *, long ); +extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long ); + +# define BOOST_SP_INTERLOCKED_INCREMENT _InterlockedIncrement +# define BOOST_SP_INTERLOCKED_DECREMENT _InterlockedDecrement +# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE _InterlockedExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd + +#else + +// under Windows CE we still have old-style Interlocked* functions + +extern "C" long __cdecl InterlockedIncrement( long* ); +extern "C" long __cdecl InterlockedDecrement( long* ); +extern "C" long __cdecl InterlockedCompareExchange( long*, long, long ); +extern "C" long __cdecl InterlockedExchange( long*, long ); +extern "C" long __cdecl InterlockedExchangeAdd( long*, long ); + +# define BOOST_SP_INTERLOCKED_INCREMENT InterlockedIncrement +# define BOOST_SP_INTERLOCKED_DECREMENT InterlockedDecrement +# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE InterlockedExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd + +#endif + +#elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN ) + +#if defined( __CLRCALL_PURE_OR_CDECL ) + +extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedIncrement( long volatile * ); +extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedDecrement( long volatile * ); +extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedCompareExchange( long volatile *, long, long ); +extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedExchange( long volatile *, long ); +extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedExchangeAdd( long volatile *, long ); + +#else + +extern "C" long __cdecl _InterlockedIncrement( long volatile * ); +extern "C" long __cdecl _InterlockedDecrement( long volatile * ); +extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long ); +extern "C" long __cdecl _InterlockedExchange( long volatile *, long ); +extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long ); + +#endif + +# define BOOST_SP_INTERLOCKED_INCREMENT _InterlockedIncrement +# define BOOST_SP_INTERLOCKED_DECREMENT _InterlockedDecrement +# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE _InterlockedExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd + +#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ ) + +namespace boost +{ + +namespace detail +{ + +extern "C" __declspec(dllimport) long __stdcall InterlockedIncrement( long volatile * ); +extern "C" __declspec(dllimport) long __stdcall InterlockedDecrement( long volatile * ); +extern "C" __declspec(dllimport) long __stdcall InterlockedCompareExchange( long volatile *, long, long ); +extern "C" __declspec(dllimport) long __stdcall InterlockedExchange( long volatile *, long ); +extern "C" __declspec(dllimport) long __stdcall InterlockedExchangeAdd( long volatile *, long ); + +} // namespace detail + +} // namespace boost + +# define BOOST_SP_INTERLOCKED_INCREMENT ::boost::detail::InterlockedIncrement +# define BOOST_SP_INTERLOCKED_DECREMENT ::boost::detail::InterlockedDecrement +# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE ::boost::detail::InterlockedCompareExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE ::boost::detail::InterlockedExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD ::boost::detail::InterlockedExchangeAdd + +#else + +# error "Interlocked intrinsics not available" + +#endif + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_INTERLOCKED_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_nullptr_t.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_nullptr_t.hpp new file mode 100644 index 0000000000..219ae8070a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/sp_nullptr_t.hpp @@ -0,0 +1,45 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_NULLPTR_T_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_NULLPTR_T_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// detail/sp_nullptr_t.hpp +// +// Copyright 2013 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include +#include + +#if !defined( BOOST_NO_CXX11_NULLPTR ) + +namespace boost +{ + +namespace detail +{ + +#if !defined( BOOST_NO_CXX11_DECLTYPE ) && ( ( defined( __clang__ ) && !defined( _LIBCPP_VERSION ) ) || defined( __INTEL_COMPILER ) ) + + typedef decltype(nullptr) sp_nullptr_t; + +#else + + typedef std::nullptr_t sp_nullptr_t; + +#endif + +} // namespace detail + +} // namespace boost + +#endif // !defined( BOOST_NO_CXX11_NULLPTR ) + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_NULLPTR_T_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/spinlock.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/spinlock.hpp new file mode 100644 index 0000000000..19f93d7c6b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/spinlock.hpp @@ -0,0 +1,65 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SPINLOCK_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/detail/spinlock.hpp +// +// Copyright (c) 2008 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// struct spinlock +// { +// void lock(); +// bool try_lock(); +// void unlock(); +// +// class scoped_lock; +// }; +// +// #define BOOST_DETAIL_SPINLOCK_INIT +// + +#include +#include + +#if defined( BOOST_SP_USE_STD_ATOMIC ) +# if !defined( __clang__ ) +# include +# else +// Clang (at least up to 3.4) can't compile spinlock_pool when +// using std::atomic, so substitute the __sync implementation instead. +# include +# endif + +#elif defined( BOOST_SP_USE_PTHREADS ) +# include + +#elif defined(__GNUC__) && defined( __arm__ ) && !defined( __thumb__ ) +# include + +#elif defined( BOOST_SP_HAS_SYNC ) +# include + +#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# include + +#elif defined(BOOST_HAS_PTHREADS) +# include + +#elif !defined(BOOST_HAS_THREADS) +# include + +#else +# error Unrecognized threading platform +#endif + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/spinlock_gcc_arm.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/spinlock_gcc_arm.hpp new file mode 100644 index 0000000000..24d08a8815 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/spinlock_gcc_arm.hpp @@ -0,0 +1,121 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_GCC_ARM_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SPINLOCK_GCC_ARM_HPP_INCLUDED + +// +// Copyright (c) 2008, 2011 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include + +#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7S__) + +# define BOOST_SP_ARM_BARRIER "dmb" +# define BOOST_SP_ARM_HAS_LDREX + +#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) + +# define BOOST_SP_ARM_BARRIER "mcr p15, 0, r0, c7, c10, 5" +# define BOOST_SP_ARM_HAS_LDREX + +#else + +# define BOOST_SP_ARM_BARRIER "" + +#endif + +namespace boost +{ + +namespace detail +{ + +class spinlock +{ +public: + + int v_; + +public: + + bool try_lock() + { + int r; + +#ifdef BOOST_SP_ARM_HAS_LDREX + + __asm__ __volatile__( + "ldrex %0, [%2]; \n" + "cmp %0, %1; \n" + "strexne %0, %1, [%2]; \n" + BOOST_SP_ARM_BARRIER : + "=&r"( r ): // outputs + "r"( 1 ), "r"( &v_ ): // inputs + "memory", "cc" ); + +#else + + __asm__ __volatile__( + "swp %0, %1, [%2];\n" + BOOST_SP_ARM_BARRIER : + "=&r"( r ): // outputs + "r"( 1 ), "r"( &v_ ): // inputs + "memory", "cc" ); + +#endif + + return r == 0; + } + + void lock() + { + for( unsigned k = 0; !try_lock(); ++k ) + { + boost::detail::yield( k ); + } + } + + void unlock() + { + __asm__ __volatile__( BOOST_SP_ARM_BARRIER ::: "memory" ); + *const_cast< int volatile* >( &v_ ) = 0; + __asm__ __volatile__( BOOST_SP_ARM_BARRIER ::: "memory" ); + } + +public: + + class scoped_lock + { + private: + + spinlock & sp_; + + scoped_lock( scoped_lock const & ); + scoped_lock & operator=( scoped_lock const & ); + + public: + + explicit scoped_lock( spinlock & sp ): sp_( sp ) + { + sp.lock(); + } + + ~scoped_lock() + { + sp_.unlock(); + } + }; +}; + +} // namespace detail +} // namespace boost + +#define BOOST_DETAIL_SPINLOCK_INIT {0} + +#undef BOOST_SP_ARM_BARRIER +#undef BOOST_SP_ARM_HAS_LDREX + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_GCC_ARM_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/spinlock_nt.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/spinlock_nt.hpp new file mode 100644 index 0000000000..1f399d0dd4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/spinlock_nt.hpp @@ -0,0 +1,89 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_NT_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SPINLOCK_NT_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// Copyright (c) 2008 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include + +namespace boost +{ + +namespace detail +{ + +class spinlock +{ +public: + + bool locked_; + +public: + + inline bool try_lock() + { + if( locked_ ) + { + return false; + } + else + { + locked_ = true; + return true; + } + } + + inline void lock() + { + BOOST_ASSERT( !locked_ ); + locked_ = true; + } + + inline void unlock() + { + BOOST_ASSERT( locked_ ); + locked_ = false; + } + +public: + + class scoped_lock + { + private: + + spinlock & sp_; + + scoped_lock( scoped_lock const & ); + scoped_lock & operator=( scoped_lock const & ); + + public: + + explicit scoped_lock( spinlock & sp ): sp_( sp ) + { + sp.lock(); + } + + ~scoped_lock() + { + sp_.unlock(); + } + }; +}; + +} // namespace detail +} // namespace boost + +#define BOOST_DETAIL_SPINLOCK_INIT { false } + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_NT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/spinlock_pool.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/spinlock_pool.hpp new file mode 100644 index 0000000000..39cf180b24 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/spinlock_pool.hpp @@ -0,0 +1,91 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_POOL_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SPINLOCK_POOL_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/detail/spinlock_pool.hpp +// +// Copyright (c) 2008 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// spinlock_pool<0> is reserved for atomic<>, when/if it arrives +// spinlock_pool<1> is reserved for shared_ptr reference counts +// spinlock_pool<2> is reserved for shared_ptr atomic access +// + +#include +#include +#include + +namespace boost +{ + +namespace detail +{ + +template< int M > class spinlock_pool +{ +private: + + static spinlock pool_[ 41 ]; + +public: + + static spinlock & spinlock_for( void const * pv ) + { +#if defined(__VMS) && __INITIAL_POINTER_SIZE == 64 + std::size_t i = reinterpret_cast< unsigned long long >( pv ) % 41; +#else + std::size_t i = reinterpret_cast< std::size_t >( pv ) % 41; +#endif + return pool_[ i ]; + } + + class scoped_lock + { + private: + + spinlock & sp_; + + scoped_lock( scoped_lock const & ); + scoped_lock & operator=( scoped_lock const & ); + + public: + + explicit scoped_lock( void const * pv ): sp_( spinlock_for( pv ) ) + { + sp_.lock(); + } + + ~scoped_lock() + { + sp_.unlock(); + } + }; +}; + +template< int M > spinlock spinlock_pool< M >::pool_[ 41 ] = +{ + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT +}; + +} // namespace detail +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_POOL_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/spinlock_pt.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/spinlock_pt.hpp new file mode 100644 index 0000000000..f9cabfc3a7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/spinlock_pt.hpp @@ -0,0 +1,79 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_PT_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SPINLOCK_PT_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// Copyright (c) 2008 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include + +namespace boost +{ + +namespace detail +{ + +class spinlock +{ +public: + + pthread_mutex_t v_; + +public: + + bool try_lock() + { + return pthread_mutex_trylock( &v_ ) == 0; + } + + void lock() + { + pthread_mutex_lock( &v_ ); + } + + void unlock() + { + pthread_mutex_unlock( &v_ ); + } + +public: + + class scoped_lock + { + private: + + spinlock & sp_; + + scoped_lock( scoped_lock const & ); + scoped_lock & operator=( scoped_lock const & ); + + public: + + explicit scoped_lock( spinlock & sp ): sp_( sp ) + { + sp.lock(); + } + + ~scoped_lock() + { + sp_.unlock(); + } + }; +}; + +} // namespace detail +} // namespace boost + +#define BOOST_DETAIL_SPINLOCK_INIT { PTHREAD_MUTEX_INITIALIZER } + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_PT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/spinlock_std_atomic.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/spinlock_std_atomic.hpp new file mode 100644 index 0000000000..a61c1cd96d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/spinlock_std_atomic.hpp @@ -0,0 +1,83 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_STD_ATOMIC_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SPINLOCK_STD_ATOMIC_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// Copyright (c) 2014 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include +#include + +namespace boost +{ + +namespace detail +{ + +class spinlock +{ +public: + + std::atomic_flag v_; + +public: + + bool try_lock() + { + return !v_.test_and_set( std::memory_order_acquire ); + } + + void lock() + { + for( unsigned k = 0; !try_lock(); ++k ) + { + boost::detail::yield( k ); + } + } + + void unlock() + { + v_ .clear( std::memory_order_release ); + } + +public: + + class scoped_lock + { + private: + + spinlock & sp_; + + scoped_lock( scoped_lock const & ); + scoped_lock & operator=( scoped_lock const & ); + + public: + + explicit scoped_lock( spinlock & sp ): sp_( sp ) + { + sp.lock(); + } + + ~scoped_lock() + { + sp_.unlock(); + } + }; +}; + +} // namespace detail +} // namespace boost + +#define BOOST_DETAIL_SPINLOCK_INIT { ATOMIC_FLAG_INIT } + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_STD_ATOMIC_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/spinlock_sync.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/spinlock_sync.hpp new file mode 100644 index 0000000000..a7145c5ac2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/spinlock_sync.hpp @@ -0,0 +1,87 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_SYNC_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SPINLOCK_SYNC_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// Copyright (c) 2008 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include + +#if defined( __ia64__ ) && defined( __INTEL_COMPILER ) +# include +#endif + +namespace boost +{ + +namespace detail +{ + +class spinlock +{ +public: + + int v_; + +public: + + bool try_lock() + { + int r = __sync_lock_test_and_set( &v_, 1 ); + return r == 0; + } + + void lock() + { + for( unsigned k = 0; !try_lock(); ++k ) + { + boost::detail::yield( k ); + } + } + + void unlock() + { + __sync_lock_release( &v_ ); + } + +public: + + class scoped_lock + { + private: + + spinlock & sp_; + + scoped_lock( scoped_lock const & ); + scoped_lock & operator=( scoped_lock const & ); + + public: + + explicit scoped_lock( spinlock & sp ): sp_( sp ) + { + sp.lock(); + } + + ~scoped_lock() + { + sp_.unlock(); + } + }; +}; + +} // namespace detail +} // namespace boost + +#define BOOST_DETAIL_SPINLOCK_INIT {0} + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_SYNC_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/spinlock_w32.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/spinlock_w32.hpp new file mode 100644 index 0000000000..d34e4fc2b5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/spinlock_w32.hpp @@ -0,0 +1,113 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_W32_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SPINLOCK_W32_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// Copyright (c) 2008 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include +#include + +// BOOST_COMPILER_FENCE + +#if defined(__INTEL_COMPILER) + +#define BOOST_COMPILER_FENCE __memory_barrier(); + +#elif defined( _MSC_VER ) && _MSC_VER >= 1310 + +extern "C" void _ReadWriteBarrier(); +#pragma intrinsic( _ReadWriteBarrier ) + +#define BOOST_COMPILER_FENCE _ReadWriteBarrier(); + +#elif defined(__GNUC__) + +#define BOOST_COMPILER_FENCE __asm__ __volatile__( "" : : : "memory" ); + +#else + +#define BOOST_COMPILER_FENCE + +#endif + +// + +namespace boost +{ + +namespace detail +{ + +class spinlock +{ +public: + + long v_; + +public: + + bool try_lock() + { + long r = BOOST_SP_INTERLOCKED_EXCHANGE( &v_, 1 ); + + BOOST_COMPILER_FENCE + + return r == 0; + } + + void lock() + { + for( unsigned k = 0; !try_lock(); ++k ) + { + boost::detail::yield( k ); + } + } + + void unlock() + { + BOOST_COMPILER_FENCE + *const_cast< long volatile* >( &v_ ) = 0; + } + +public: + + class scoped_lock + { + private: + + spinlock & sp_; + + scoped_lock( scoped_lock const & ); + scoped_lock & operator=( scoped_lock const & ); + + public: + + explicit scoped_lock( spinlock & sp ): sp_( sp ) + { + sp.lock(); + } + + ~scoped_lock() + { + sp_.unlock(); + } + }; +}; + +} // namespace detail +} // namespace boost + +#define BOOST_DETAIL_SPINLOCK_INIT {0} + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_W32_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/detail/yield_k.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/detail/yield_k.hpp new file mode 100644 index 0000000000..2dabc9f443 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/detail/yield_k.hpp @@ -0,0 +1,168 @@ +#ifndef BOOST_SMART_PTR_DETAIL_YIELD_K_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_YIELD_K_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// yield_k.hpp +// +// Copyright (c) 2008 Peter Dimov +// Copyright (c) Microsoft Corporation 2014 +// +// void yield( unsigned k ); +// +// Typical use: +// +// for( unsigned k = 0; !try_lock(); ++k ) yield( k ); +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// + +#include +#include + +#if BOOST_PLAT_WINDOWS_RUNTIME +#include +#endif + +// BOOST_SMT_PAUSE + +#if defined(_MSC_VER) && _MSC_VER >= 1310 && ( defined(_M_IX86) || defined(_M_X64) ) + +extern "C" void _mm_pause(); + +#define BOOST_SMT_PAUSE _mm_pause(); + +#elif defined(__GNUC__) && ( defined(__i386__) || defined(__x86_64__) ) + +#define BOOST_SMT_PAUSE __asm__ __volatile__( "rep; nop" : : : "memory" ); + +#endif + +// + +#if defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ ) + +#if defined( BOOST_USE_WINDOWS_H ) +# include +#endif + +namespace boost +{ + +namespace detail +{ + +#if !defined( BOOST_USE_WINDOWS_H ) && !BOOST_PLAT_WINDOWS_RUNTIME + extern "C" void __stdcall Sleep( unsigned long ms ); +#endif + +inline void yield( unsigned k ) +{ + if( k < 4 ) + { + } +#if defined( BOOST_SMT_PAUSE ) + else if( k < 16 ) + { + BOOST_SMT_PAUSE + } +#endif +#if !BOOST_PLAT_WINDOWS_RUNTIME + else if( k < 32 ) + { + Sleep( 0 ); + } + else + { + Sleep( 1 ); + } +#else + else + { + // Sleep isn't supported on the Windows Runtime. + std::this_thread::yield(); + } +#endif +} + +} // namespace detail + +} // namespace boost + +#elif defined( BOOST_HAS_PTHREADS ) + +#ifndef _AIX +#include +#else + // AIX's sched.h defines ::var which sometimes conflicts with Lambda's var + extern "C" int sched_yield(void); +#endif + +#include + +namespace boost +{ + +namespace detail +{ + +inline void yield( unsigned k ) +{ + if( k < 4 ) + { + } +#if defined( BOOST_SMT_PAUSE ) + else if( k < 16 ) + { + BOOST_SMT_PAUSE + } +#endif + else if( k < 32 || k & 1 ) + { + sched_yield(); + } + else + { + // g++ -Wextra warns on {} or {0} + struct timespec rqtp = { 0, 0 }; + + // POSIX says that timespec has tv_sec and tv_nsec + // But it doesn't guarantee order or placement + + rqtp.tv_sec = 0; + rqtp.tv_nsec = 1000; + + nanosleep( &rqtp, 0 ); + } +} + +} // namespace detail + +} // namespace boost + +#else + +namespace boost +{ + +namespace detail +{ + +inline void yield( unsigned ) +{ +} + +} // namespace detail + +} // namespace boost + +#endif + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_YIELD_K_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/enable_shared_from_this.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/enable_shared_from_this.hpp new file mode 100644 index 0000000000..4e3f243d28 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/enable_shared_from_this.hpp @@ -0,0 +1,89 @@ +#ifndef BOOST_SMART_PTR_ENABLE_SHARED_FROM_THIS_HPP_INCLUDED +#define BOOST_SMART_PTR_ENABLE_SHARED_FROM_THIS_HPP_INCLUDED + +// +// enable_shared_from_this.hpp +// +// Copyright 2002, 2009 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// http://www.boost.org/libs/smart_ptr/enable_shared_from_this.html +// + +#include +#include +#include +#include + +namespace boost +{ + +template class enable_shared_from_this +{ +protected: + + enable_shared_from_this() BOOST_NOEXCEPT + { + } + + enable_shared_from_this(enable_shared_from_this const &) BOOST_NOEXCEPT + { + } + + enable_shared_from_this & operator=(enable_shared_from_this const &) BOOST_NOEXCEPT + { + return *this; + } + + ~enable_shared_from_this() BOOST_NOEXCEPT // ~weak_ptr newer throws, so this call also must not throw + { + } + +public: + + shared_ptr shared_from_this() + { + shared_ptr p( weak_this_ ); + BOOST_ASSERT( p.get() == this ); + return p; + } + + shared_ptr shared_from_this() const + { + shared_ptr p( weak_this_ ); + BOOST_ASSERT( p.get() == this ); + return p; + } + + weak_ptr weak_from_this() BOOST_NOEXCEPT + { + return weak_this_; + } + + weak_ptr weak_from_this() const BOOST_NOEXCEPT + { + return weak_this_; + } + +public: // actually private, but avoids compiler template friendship issues + + // Note: invoked automatically by shared_ptr; do not call + template void _internal_accept_owner( shared_ptr const * ppx, Y * py ) const + { + if( weak_this_.expired() ) + { + weak_this_ = shared_ptr( *ppx, py ); + } + } + +private: + + mutable weak_ptr weak_this_; +}; + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_ENABLE_SHARED_FROM_THIS_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/intrusive_ptr.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/intrusive_ptr.hpp new file mode 100644 index 0000000000..e5db609976 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/intrusive_ptr.hpp @@ -0,0 +1,336 @@ +#ifndef BOOST_SMART_PTR_INTRUSIVE_PTR_HPP_INCLUDED +#define BOOST_SMART_PTR_INTRUSIVE_PTR_HPP_INCLUDED + +// +// intrusive_ptr.hpp +// +// Copyright (c) 2001, 2002 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/smart_ptr/intrusive_ptr.html for documentation. +// + +#include + +#include +#include +#include +#include + +#include // for std::less + +#if !defined(BOOST_NO_IOSTREAM) +#if !defined(BOOST_NO_IOSFWD) +#include // for std::basic_ostream +#else +#include +#endif +#endif + + +namespace boost +{ + +// +// intrusive_ptr +// +// A smart pointer that uses intrusive reference counting. +// +// Relies on unqualified calls to +// +// void intrusive_ptr_add_ref(T * p); +// void intrusive_ptr_release(T * p); +// +// (p != 0) +// +// The object is responsible for destroying itself. +// + +template class intrusive_ptr +{ +private: + + typedef intrusive_ptr this_type; + +public: + + typedef T element_type; + + intrusive_ptr() BOOST_NOEXCEPT : px( 0 ) + { + } + + intrusive_ptr( T * p, bool add_ref = true ): px( p ) + { + if( px != 0 && add_ref ) intrusive_ptr_add_ref( px ); + } + +#if !defined(BOOST_NO_MEMBER_TEMPLATES) || defined(BOOST_MSVC6_MEMBER_TEMPLATES) + + template +#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) + + intrusive_ptr( intrusive_ptr const & rhs, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) + +#else + + intrusive_ptr( intrusive_ptr const & rhs ) + +#endif + : px( rhs.get() ) + { + if( px != 0 ) intrusive_ptr_add_ref( px ); + } + +#endif + + intrusive_ptr(intrusive_ptr const & rhs): px( rhs.px ) + { + if( px != 0 ) intrusive_ptr_add_ref( px ); + } + + ~intrusive_ptr() + { + if( px != 0 ) intrusive_ptr_release( px ); + } + +#if !defined(BOOST_NO_MEMBER_TEMPLATES) || defined(BOOST_MSVC6_MEMBER_TEMPLATES) + + template intrusive_ptr & operator=(intrusive_ptr const & rhs) + { + this_type(rhs).swap(*this); + return *this; + } + +#endif + +// Move support + +#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + + intrusive_ptr(intrusive_ptr && rhs) BOOST_NOEXCEPT : px( rhs.px ) + { + rhs.px = 0; + } + + intrusive_ptr & operator=(intrusive_ptr && rhs) BOOST_NOEXCEPT + { + this_type( static_cast< intrusive_ptr && >( rhs ) ).swap(*this); + return *this; + } + +#endif + + intrusive_ptr & operator=(intrusive_ptr const & rhs) + { + this_type(rhs).swap(*this); + return *this; + } + + intrusive_ptr & operator=(T * rhs) + { + this_type(rhs).swap(*this); + return *this; + } + + void reset() BOOST_NOEXCEPT + { + this_type().swap( *this ); + } + + void reset( T * rhs ) + { + this_type( rhs ).swap( *this ); + } + + void reset( T * rhs, bool add_ref ) + { + this_type( rhs, add_ref ).swap( *this ); + } + + T * get() const BOOST_NOEXCEPT + { + return px; + } + + T * detach() BOOST_NOEXCEPT + { + T * ret = px; + px = 0; + return ret; + } + + T & operator*() const + { + BOOST_ASSERT( px != 0 ); + return *px; + } + + T * operator->() const + { + BOOST_ASSERT( px != 0 ); + return px; + } + +// implicit conversion to "bool" +#include + + void swap(intrusive_ptr & rhs) BOOST_NOEXCEPT + { + T * tmp = px; + px = rhs.px; + rhs.px = tmp; + } + +private: + + T * px; +}; + +template inline bool operator==(intrusive_ptr const & a, intrusive_ptr const & b) +{ + return a.get() == b.get(); +} + +template inline bool operator!=(intrusive_ptr const & a, intrusive_ptr const & b) +{ + return a.get() != b.get(); +} + +template inline bool operator==(intrusive_ptr const & a, U * b) +{ + return a.get() == b; +} + +template inline bool operator!=(intrusive_ptr const & a, U * b) +{ + return a.get() != b; +} + +template inline bool operator==(T * a, intrusive_ptr const & b) +{ + return a == b.get(); +} + +template inline bool operator!=(T * a, intrusive_ptr const & b) +{ + return a != b.get(); +} + +#if __GNUC__ == 2 && __GNUC_MINOR__ <= 96 + +// Resolve the ambiguity between our op!= and the one in rel_ops + +template inline bool operator!=(intrusive_ptr const & a, intrusive_ptr const & b) +{ + return a.get() != b.get(); +} + +#endif + +#if !defined( BOOST_NO_CXX11_NULLPTR ) + +template inline bool operator==( intrusive_ptr const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT +{ + return p.get() == 0; +} + +template inline bool operator==( boost::detail::sp_nullptr_t, intrusive_ptr const & p ) BOOST_NOEXCEPT +{ + return p.get() == 0; +} + +template inline bool operator!=( intrusive_ptr const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT +{ + return p.get() != 0; +} + +template inline bool operator!=( boost::detail::sp_nullptr_t, intrusive_ptr const & p ) BOOST_NOEXCEPT +{ + return p.get() != 0; +} + +#endif + +template inline bool operator<(intrusive_ptr const & a, intrusive_ptr const & b) +{ + return std::less()(a.get(), b.get()); +} + +template void swap(intrusive_ptr & lhs, intrusive_ptr & rhs) +{ + lhs.swap(rhs); +} + +// mem_fn support + +template T * get_pointer(intrusive_ptr const & p) +{ + return p.get(); +} + +template intrusive_ptr static_pointer_cast(intrusive_ptr const & p) +{ + return static_cast(p.get()); +} + +template intrusive_ptr const_pointer_cast(intrusive_ptr const & p) +{ + return const_cast(p.get()); +} + +template intrusive_ptr dynamic_pointer_cast(intrusive_ptr const & p) +{ + return dynamic_cast(p.get()); +} + +// operator<< + +#if !defined(BOOST_NO_IOSTREAM) + +#if defined(BOOST_NO_TEMPLATED_IOSTREAMS) || ( defined(__GNUC__) && (__GNUC__ < 3) ) + +template std::ostream & operator<< (std::ostream & os, intrusive_ptr const & p) +{ + os << p.get(); + return os; +} + +#else + +// in STLport's no-iostreams mode no iostream symbols can be used +#ifndef _STLP_NO_IOSTREAMS + +# if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, < 1300 && __SGI_STL_PORT) +// MSVC6 has problems finding std::basic_ostream through the using declaration in namespace _STL +using std::basic_ostream; +template basic_ostream & operator<< (basic_ostream & os, intrusive_ptr const & p) +# else +template std::basic_ostream & operator<< (std::basic_ostream & os, intrusive_ptr const & p) +# endif +{ + os << p.get(); + return os; +} + +#endif // _STLP_NO_IOSTREAMS + +#endif // __GNUC__ < 3 + +#endif // !defined(BOOST_NO_IOSTREAM) + +// hash_value + +template< class T > struct hash; + +template< class T > std::size_t hash_value( boost::intrusive_ptr const & p ) +{ + return boost::hash< T* >()( p.get() ); +} + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_INTRUSIVE_PTR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/make_shared.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/make_shared.hpp new file mode 100644 index 0000000000..8d0e3ea400 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/make_shared.hpp @@ -0,0 +1,22 @@ +#ifndef BOOST_SMART_PTR_MAKE_SHARED_HPP_INCLUDED +#define BOOST_SMART_PTR_MAKE_SHARED_HPP_INCLUDED + +// make_shared.hpp +// +// Copyright (c) 2007, 2008, 2012 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// See http://www.boost.org/libs/smart_ptr/make_shared.html +// for documentation. + +#include + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined( BOOST_NO_SFINAE ) +# include +# include +#endif + +#endif // #ifndef BOOST_SMART_PTR_MAKE_SHARED_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/make_shared_array.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/make_shared_array.hpp new file mode 100644 index 0000000000..c48f5070b6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/make_shared_array.hpp @@ -0,0 +1,158 @@ +/* + * Copyright (c) 2012-2014 Glen Joseph Fernandes + * glenfe at live dot com + * + * Distributed under the Boost Software License, + * Version 1.0. (See accompanying file LICENSE_1_0.txt + * or copy at http://boost.org/LICENSE_1_0.txt) + */ +#ifndef BOOST_SMART_PTR_MAKE_SHARED_ARRAY_HPP +#define BOOST_SMART_PTR_MAKE_SHARED_ARRAY_HPP + +#include +#include + +namespace boost { + template + inline typename boost::detail::sp_if_array::type + make_shared(std::size_t size) { + typedef typename boost::detail::array_inner::type T1; + typedef typename boost::detail::array_base::type T2; + typedef boost::detail::ms_allocator A1; + typedef boost::detail::ms_in_allocator_tag D1; + std::size_t n1 = size * boost::detail::array_total::size; + T1* p1 = 0; + T2* p2 = 0; + D1 d1; + A1 a1(size, &p2); + shared_ptr s1(p1, d1, a1); + A1* a2 = static_cast(s1._internal_get_untyped_deleter()); + a2->set(0); + boost::detail::ms_init(p2, n1); + a2->set(p2); + p1 = reinterpret_cast(p2); + return shared_ptr(s1, p1); + } + + template + inline typename boost::detail::sp_if_size_array::type + make_shared() { + typedef typename boost::detail::array_inner::type T1; + typedef typename boost::detail::array_base::type T2; + typedef boost::detail::ms_allocator A1; + typedef boost::detail::ms_in_allocator_tag D1; + enum { + N = boost::detail::array_total::size + }; + T1* p1 = 0; + T2* p2 = 0; + D1 d1; + A1 a1(&p2); + shared_ptr s1(p1, d1, a1); + A1* a2 = static_cast(s1._internal_get_untyped_deleter()); + a2->set(0); + boost::detail::ms_init(p2, N); + a2->set(p2); + p1 = reinterpret_cast(p2); + return shared_ptr(s1, p1); + } + + template + inline typename boost::detail::sp_if_array::type + make_shared(std::size_t size, + const typename boost::detail::array_inner::type& value) { + typedef typename boost::detail::array_inner::type T1; + typedef typename boost::detail::array_base::type T2; + typedef const T2 T3; + typedef boost::detail::ms_allocator A1; + typedef boost::detail::ms_in_allocator_tag D1; + enum { + M = boost::detail::array_total::size + }; + std::size_t n1 = M * size; + T1* p1 = 0; + T2* p2 = 0; + T3* p3 = reinterpret_cast(&value); + D1 d1; + A1 a1(size, &p2); + shared_ptr s1(p1, d1, a1); + A1* a2 = static_cast(s1._internal_get_untyped_deleter()); + a2->set(0); + boost::detail::ms_init(p2, n1, p3); + a2->set(p2); + p1 = reinterpret_cast(p2); + return shared_ptr(s1, p1); + } + + template + inline typename boost::detail::sp_if_size_array::type + make_shared(const typename boost::detail::array_inner::type& value) { + typedef typename boost::detail::array_inner::type T1; + typedef typename boost::detail::array_base::type T2; + typedef const T2 T3; + typedef boost::detail::ms_allocator A1; + typedef boost::detail::ms_in_allocator_tag D1; + enum { + M = boost::detail::array_total::size, + N = boost::detail::array_total::size + }; + T1* p1 = 0; + T2* p2 = 0; + T3* p3 = reinterpret_cast(&value); + D1 d1; + A1 a1(&p2); + shared_ptr s1(p1, d1, a1); + A1* a2 = static_cast(s1._internal_get_untyped_deleter()); + a2->set(0); + boost::detail::ms_init(p2, N, p3); + a2->set(p2); + p1 = reinterpret_cast(p2); + return shared_ptr(s1, p1); + } + + template + inline typename boost::detail::sp_if_array::type + make_shared_noinit(std::size_t size) { + typedef typename boost::detail::array_inner::type T1; + typedef typename boost::detail::array_base::type T2; + typedef boost::detail::ms_allocator A1; + typedef boost::detail::ms_in_allocator_tag D1; + std::size_t n1 = size * boost::detail::array_total::size; + T1* p1 = 0; + T2* p2 = 0; + D1 d1; + A1 a1(size, &p2); + shared_ptr s1(p1, d1, a1); + A1* a2 = static_cast(s1._internal_get_untyped_deleter()); + a2->set(0); + boost::detail::ms_noinit(p2, n1); + a2->set(p2); + p1 = reinterpret_cast(p2); + return shared_ptr(s1, p1); + } + + template + inline typename boost::detail::sp_if_size_array::type + make_shared_noinit() { + typedef typename boost::detail::array_inner::type T1; + typedef typename boost::detail::array_base::type T2; + typedef boost::detail::ms_allocator A1; + typedef boost::detail::ms_in_allocator_tag D1; + enum { + N = boost::detail::array_total::size + }; + T1* p1 = 0; + T2* p2 = 0; + D1 d1; + A1 a1(&p2); + shared_ptr s1(p1, d1, a1); + A1* a2 = static_cast(s1._internal_get_untyped_deleter()); + a2->set(0); + boost::detail::ms_noinit(p2, N); + a2->set(p2); + p1 = reinterpret_cast(p2); + return shared_ptr(s1, p1); + } +} + +#endif diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/make_shared_object.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/make_shared_object.hpp new file mode 100644 index 0000000000..62372fa7ef --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/make_shared_object.hpp @@ -0,0 +1,1131 @@ +#ifndef BOOST_SMART_PTR_MAKE_SHARED_OBJECT_HPP_INCLUDED +#define BOOST_SMART_PTR_MAKE_SHARED_OBJECT_HPP_INCLUDED + +// make_shared_object.hpp +// +// Copyright (c) 2007, 2008, 2012 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// See http://www.boost.org/libs/smart_ptr/make_shared.html +// for documentation. + +#include +#include +#include +#include +#include +#include +#include + +namespace boost +{ + +namespace detail +{ + +template< std::size_t N, std::size_t A > struct sp_aligned_storage +{ + union type + { + char data_[ N ]; + typename boost::type_with_alignment< A >::type align_; + }; +}; + +template< class T > class sp_ms_deleter +{ +private: + + typedef typename sp_aligned_storage< sizeof( T ), ::boost::alignment_of< T >::value >::type storage_type; + + bool initialized_; + storage_type storage_; + +private: + + void destroy() + { + if( initialized_ ) + { +#if defined( __GNUC__ ) + + // fixes incorrect aliasing warning + T * p = reinterpret_cast< T* >( storage_.data_ ); + p->~T(); + +#else + + reinterpret_cast< T* >( storage_.data_ )->~T(); + +#endif + + initialized_ = false; + } + } + +public: + + sp_ms_deleter() BOOST_NOEXCEPT : initialized_( false ) + { + } + + template explicit sp_ms_deleter( A const & ) BOOST_NOEXCEPT : initialized_( false ) + { + } + + // optimization: do not copy storage_ + sp_ms_deleter( sp_ms_deleter const & ) BOOST_NOEXCEPT : initialized_( false ) + { + } + + ~sp_ms_deleter() + { + destroy(); + } + + void operator()( T * ) + { + destroy(); + } + + static void operator_fn( T* ) // operator() can't be static + { + } + + void * address() BOOST_NOEXCEPT + { + return storage_.data_; + } + + void set_initialized() BOOST_NOEXCEPT + { + initialized_ = true; + } +}; + +template< class T, class A > class sp_as_deleter +{ +private: + + typedef typename sp_aligned_storage< sizeof( T ), ::boost::alignment_of< T >::value >::type storage_type; + + storage_type storage_; + A a_; + bool initialized_; + +private: + + void destroy() + { + if( initialized_ ) + { + T * p = reinterpret_cast< T* >( storage_.data_ ); + +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + std::allocator_traits::destroy( a_, p ); + +#else + + p->~T(); + +#endif + + initialized_ = false; + } + } + +public: + + sp_as_deleter( A const & a ) BOOST_NOEXCEPT : a_( a ), initialized_( false ) + { + } + + // optimization: do not copy storage_ + sp_as_deleter( sp_as_deleter const & r ) BOOST_NOEXCEPT : a_( r.a_), initialized_( false ) + { + } + + ~sp_as_deleter() + { + destroy(); + } + + void operator()( T * ) + { + destroy(); + } + + static void operator_fn( T* ) // operator() can't be static + { + } + + void * address() BOOST_NOEXCEPT + { + return storage_.data_; + } + + void set_initialized() BOOST_NOEXCEPT + { + initialized_ = true; + } +}; + +template< class T > struct sp_if_not_array +{ + typedef boost::shared_ptr< T > type; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template< class T > struct sp_if_not_array< T[] > +{ +}; + +#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 ) + +template< class T, std::size_t N > struct sp_if_not_array< T[N] > +{ +}; + +#endif + +#endif + +} // namespace detail + +#if !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING ) +# define BOOST_SP_MSD( T ) boost::detail::sp_inplace_tag< boost::detail::sp_ms_deleter< T > >() +#else +# define BOOST_SP_MSD( T ) boost::detail::sp_ms_deleter< T >() +#endif + +// _noinit versions + +template< class T > typename boost::detail::sp_if_not_array< T >::type make_shared_noinit() +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T; + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A > typename boost::detail::sp_if_not_array< T >::type allocate_shared_noinit( A const & a ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T; + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +#if !defined( BOOST_NO_CXX11_VARIADIC_TEMPLATES ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + +// Variadic templates, rvalue reference + +template< class T, class... Args > typename boost::detail::sp_if_not_array< T >::type make_shared( Args && ... args ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( boost::detail::sp_forward( args )... ); + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A, class... Args > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, Args && ... args ) +{ +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + typedef typename std::allocator_traits::template rebind_alloc A2; + A2 a2( a ); + + typedef boost::detail::sp_as_deleter< T, A2 > D; + + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_inplace_tag(), a2 ); + +#else + + typedef boost::detail::sp_ms_deleter< T > D; + + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_inplace_tag(), a ); + +#endif + + D * pd = static_cast< D* >( pt._internal_get_untyped_deleter() ); + void * pv = pd->address(); + +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + std::allocator_traits::construct( a2, static_cast< T* >( pv ), boost::detail::sp_forward( args )... ); + +#else + + ::new( pv ) T( boost::detail::sp_forward( args )... ); + +#endif + + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +#else // !defined( BOOST_NO_CXX11_VARIADIC_TEMPLATES ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + +// Common zero-argument versions + +template< class T > typename boost::detail::sp_if_not_array< T >::type make_shared() +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T(); + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T(); + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + +// For example MSVC 10.0 + +template< class T, class A1 > +typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( + boost::detail::sp_forward( a1 ) + ); + + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A, class A1 > +typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( + boost::detail::sp_forward( a1 ) + ); + + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A1, class A2 > +typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ) + ); + + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A, class A1, class A2 > +typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ) + ); + + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A1, class A2, class A3 > +typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ), + boost::detail::sp_forward( a3 ) + ); + + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A, class A1, class A2, class A3 > +typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ), + boost::detail::sp_forward( a3 ) + ); + + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A1, class A2, class A3, class A4 > +typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ), + boost::detail::sp_forward( a3 ), + boost::detail::sp_forward( a4 ) + ); + + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A, class A1, class A2, class A3, class A4 > +typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ), + boost::detail::sp_forward( a3 ), + boost::detail::sp_forward( a4 ) + ); + + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A1, class A2, class A3, class A4, class A5 > +typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ), + boost::detail::sp_forward( a3 ), + boost::detail::sp_forward( a4 ), + boost::detail::sp_forward( a5 ) + ); + + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A, class A1, class A2, class A3, class A4, class A5 > +typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ), + boost::detail::sp_forward( a3 ), + boost::detail::sp_forward( a4 ), + boost::detail::sp_forward( a5 ) + ); + + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A1, class A2, class A3, class A4, class A5, class A6 > +typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ), + boost::detail::sp_forward( a3 ), + boost::detail::sp_forward( a4 ), + boost::detail::sp_forward( a5 ), + boost::detail::sp_forward( a6 ) + ); + + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6 > +typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ), + boost::detail::sp_forward( a3 ), + boost::detail::sp_forward( a4 ), + boost::detail::sp_forward( a5 ), + boost::detail::sp_forward( a6 ) + ); + + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7 > +typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ), + boost::detail::sp_forward( a3 ), + boost::detail::sp_forward( a4 ), + boost::detail::sp_forward( a5 ), + boost::detail::sp_forward( a6 ), + boost::detail::sp_forward( a7 ) + ); + + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7 > +typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ), + boost::detail::sp_forward( a3 ), + boost::detail::sp_forward( a4 ), + boost::detail::sp_forward( a5 ), + boost::detail::sp_forward( a6 ), + boost::detail::sp_forward( a7 ) + ); + + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > +typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ), + boost::detail::sp_forward( a3 ), + boost::detail::sp_forward( a4 ), + boost::detail::sp_forward( a5 ), + boost::detail::sp_forward( a6 ), + boost::detail::sp_forward( a7 ), + boost::detail::sp_forward( a8 ) + ); + + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > +typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ), + boost::detail::sp_forward( a3 ), + boost::detail::sp_forward( a4 ), + boost::detail::sp_forward( a5 ), + boost::detail::sp_forward( a6 ), + boost::detail::sp_forward( a7 ), + boost::detail::sp_forward( a8 ) + ); + + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 > +typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ), + boost::detail::sp_forward( a3 ), + boost::detail::sp_forward( a4 ), + boost::detail::sp_forward( a5 ), + boost::detail::sp_forward( a6 ), + boost::detail::sp_forward( a7 ), + boost::detail::sp_forward( a8 ), + boost::detail::sp_forward( a9 ) + ); + + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 > +typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ), + boost::detail::sp_forward( a3 ), + boost::detail::sp_forward( a4 ), + boost::detail::sp_forward( a5 ), + boost::detail::sp_forward( a6 ), + boost::detail::sp_forward( a7 ), + boost::detail::sp_forward( a8 ), + boost::detail::sp_forward( a9 ) + ); + + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +#else // !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + +// C++03 version + +template< class T, class A1 > +typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( a1 ); + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A, class A1 > +typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( a1 ); + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A1, class A2 > +typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( a1, a2 ); + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A, class A1, class A2 > +typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( a1, a2 ); + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A1, class A2, class A3 > +typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( a1, a2, a3 ); + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A, class A1, class A2, class A3 > +typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( a1, a2, a3 ); + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A1, class A2, class A3, class A4 > +typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( a1, a2, a3, a4 ); + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A, class A1, class A2, class A3, class A4 > +typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( a1, a2, a3, a4 ); + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A1, class A2, class A3, class A4, class A5 > +typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( a1, a2, a3, a4, a5 ); + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A, class A1, class A2, class A3, class A4, class A5 > +typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( a1, a2, a3, a4, a5 ); + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A1, class A2, class A3, class A4, class A5, class A6 > +typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( a1, a2, a3, a4, a5, a6 ); + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6 > +typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( a1, a2, a3, a4, a5, a6 ); + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7 > +typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( a1, a2, a3, a4, a5, a6, a7 ); + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7 > +typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( a1, a2, a3, a4, a5, a6, a7 ); + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > +typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( a1, a2, a3, a4, a5, a6, a7, a8 ); + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > +typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( a1, a2, a3, a4, a5, a6, a7, a8 ); + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 > +typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( a1, a2, a3, a4, a5, a6, a7, a8, a9 ); + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 > +typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9 ) +{ + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + + boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + + void * pv = pd->address(); + + ::new( pv ) T( a1, a2, a3, a4, a5, a6, a7, a8, a9 ); + pd->set_initialized(); + + T * pt2 = static_cast< T* >( pv ); + + boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); +} + +#endif // !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + +#endif // !defined( BOOST_NO_CXX11_VARIADIC_TEMPLATES ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + +#undef BOOST_SP_MSD + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_MAKE_SHARED_OBJECT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/scoped_array.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/scoped_array.hpp new file mode 100644 index 0000000000..e395e28f85 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/scoped_array.hpp @@ -0,0 +1,132 @@ +#ifndef BOOST_SMART_PTR_SCOPED_ARRAY_HPP_INCLUDED +#define BOOST_SMART_PTR_SCOPED_ARRAY_HPP_INCLUDED + +// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. +// Copyright (c) 2001, 2002 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// http://www.boost.org/libs/smart_ptr/scoped_array.htm +// + +#include +#include +#include +#include + +#include + +#include // for std::ptrdiff_t + +namespace boost +{ + +// Debug hooks + +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + +void sp_array_constructor_hook(void * p); +void sp_array_destructor_hook(void * p); + +#endif + +// scoped_array extends scoped_ptr to arrays. Deletion of the array pointed to +// is guaranteed, either on destruction of the scoped_array or via an explicit +// reset(). Use shared_array or std::vector if your needs are more complex. + +template class scoped_array // noncopyable +{ +private: + + T * px; + + scoped_array(scoped_array const &); + scoped_array & operator=(scoped_array const &); + + typedef scoped_array this_type; + + void operator==( scoped_array const& ) const; + void operator!=( scoped_array const& ) const; + +public: + + typedef T element_type; + + explicit scoped_array( T * p = 0 ) BOOST_NOEXCEPT : px( p ) + { +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + boost::sp_array_constructor_hook( px ); +#endif + } + + ~scoped_array() // never throws + { +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + boost::sp_array_destructor_hook( px ); +#endif + boost::checked_array_delete( px ); + } + + void reset(T * p = 0) // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) + { + BOOST_ASSERT( p == 0 || p != px ); // catch self-reset errors + this_type(p).swap(*this); + } + + T & operator[](std::ptrdiff_t i) const // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) + { + BOOST_ASSERT( px != 0 ); + BOOST_ASSERT( i >= 0 ); + return px[i]; + } + + T * get() const BOOST_NOEXCEPT + { + return px; + } + +// implicit conversion to "bool" +#include + + void swap(scoped_array & b) BOOST_NOEXCEPT + { + T * tmp = b.px; + b.px = px; + px = tmp; + } +}; + +#if !defined( BOOST_NO_CXX11_NULLPTR ) + +template inline bool operator==( scoped_array const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT +{ + return p.get() == 0; +} + +template inline bool operator==( boost::detail::sp_nullptr_t, scoped_array const & p ) BOOST_NOEXCEPT +{ + return p.get() == 0; +} + +template inline bool operator!=( scoped_array const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT +{ + return p.get() != 0; +} + +template inline bool operator!=( boost::detail::sp_nullptr_t, scoped_array const & p ) BOOST_NOEXCEPT +{ + return p.get() != 0; +} + +#endif + +template inline void swap(scoped_array & a, scoped_array & b) BOOST_NOEXCEPT +{ + a.swap(b); +} + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_SCOPED_ARRAY_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/scoped_ptr.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/scoped_ptr.hpp new file mode 100644 index 0000000000..be6722d5f5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/scoped_ptr.hpp @@ -0,0 +1,157 @@ +#ifndef BOOST_SMART_PTR_SCOPED_PTR_HPP_INCLUDED +#define BOOST_SMART_PTR_SCOPED_PTR_HPP_INCLUDED + +// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. +// Copyright (c) 2001, 2002 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// http://www.boost.org/libs/smart_ptr/scoped_ptr.htm +// + +#include +#include +#include +#include +#include + +#ifndef BOOST_NO_AUTO_PTR +# include // for std::auto_ptr +#endif + +namespace boost +{ + +// Debug hooks + +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + +void sp_scalar_constructor_hook(void * p); +void sp_scalar_destructor_hook(void * p); + +#endif + +// scoped_ptr mimics a built-in pointer except that it guarantees deletion +// of the object pointed to, either on destruction of the scoped_ptr or via +// an explicit reset(). scoped_ptr is a simple solution for simple needs; +// use shared_ptr or std::auto_ptr if your needs are more complex. + +template class scoped_ptr // noncopyable +{ +private: + + T * px; + + scoped_ptr(scoped_ptr const &); + scoped_ptr & operator=(scoped_ptr const &); + + typedef scoped_ptr this_type; + + void operator==( scoped_ptr const& ) const; + void operator!=( scoped_ptr const& ) const; + +public: + + typedef T element_type; + + explicit scoped_ptr( T * p = 0 ): px( p ) // never throws + { +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + boost::sp_scalar_constructor_hook( px ); +#endif + } + +#ifndef BOOST_NO_AUTO_PTR + + explicit scoped_ptr( std::auto_ptr p ) BOOST_NOEXCEPT : px( p.release() ) + { +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + boost::sp_scalar_constructor_hook( px ); +#endif + } + +#endif + + ~scoped_ptr() // never throws + { +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) + boost::sp_scalar_destructor_hook( px ); +#endif + boost::checked_delete( px ); + } + + void reset(T * p = 0) // never throws + { + BOOST_ASSERT( p == 0 || p != px ); // catch self-reset errors + this_type(p).swap(*this); + } + + T & operator*() const // never throws + { + BOOST_ASSERT( px != 0 ); + return *px; + } + + T * operator->() const // never throws + { + BOOST_ASSERT( px != 0 ); + return px; + } + + T * get() const BOOST_NOEXCEPT + { + return px; + } + +// implicit conversion to "bool" +#include + + void swap(scoped_ptr & b) BOOST_NOEXCEPT + { + T * tmp = b.px; + b.px = px; + px = tmp; + } +}; + +#if !defined( BOOST_NO_CXX11_NULLPTR ) + +template inline bool operator==( scoped_ptr const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT +{ + return p.get() == 0; +} + +template inline bool operator==( boost::detail::sp_nullptr_t, scoped_ptr const & p ) BOOST_NOEXCEPT +{ + return p.get() == 0; +} + +template inline bool operator!=( scoped_ptr const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT +{ + return p.get() != 0; +} + +template inline bool operator!=( boost::detail::sp_nullptr_t, scoped_ptr const & p ) BOOST_NOEXCEPT +{ + return p.get() != 0; +} + +#endif + +template inline void swap(scoped_ptr & a, scoped_ptr & b) BOOST_NOEXCEPT +{ + a.swap(b); +} + +// get_pointer(p) is a generic way to say p.get() + +template inline T * get_pointer(scoped_ptr const & p) BOOST_NOEXCEPT +{ + return p.get(); +} + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_SCOPED_PTR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/shared_array.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/shared_array.hpp new file mode 100644 index 0000000000..fd58071be0 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/shared_array.hpp @@ -0,0 +1,292 @@ +#ifndef BOOST_SMART_PTR_SHARED_ARRAY_HPP_INCLUDED +#define BOOST_SMART_PTR_SHARED_ARRAY_HPP_INCLUDED + +// +// shared_array.hpp +// +// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. +// Copyright (c) 2001, 2002, 2012 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/smart_ptr/shared_array.htm for documentation. +// + +#include // for broken compiler workarounds + +#include // TR1 cyclic inclusion fix + +#include +#include + +#include +#include +#include +#include + +#include // for std::ptrdiff_t +#include // for std::swap +#include // for std::less + +namespace boost +{ + +// +// shared_array +// +// shared_array extends shared_ptr to arrays. +// The array pointed to is deleted when the last shared_array pointing to it +// is destroyed or reset. +// + +template class shared_array +{ +private: + + // Borland 5.5.1 specific workarounds + typedef checked_array_deleter deleter; + typedef shared_array this_type; + +public: + + typedef T element_type; + + shared_array() BOOST_NOEXCEPT : px( 0 ), pn() + { + } + +#if !defined( BOOST_NO_CXX11_NULLPTR ) + + shared_array( boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT : px( 0 ), pn() + { + } + +#endif + + template + explicit shared_array( Y * p ): px( p ), pn( p, checked_array_deleter() ) + { + boost::detail::sp_assert_convertible< Y[], T[] >(); + } + + // + // Requirements: D's copy constructor must not throw + // + // shared_array will release p by calling d(p) + // + + template shared_array( Y * p, D d ): px( p ), pn( p, d ) + { + boost::detail::sp_assert_convertible< Y[], T[] >(); + } + + // As above, but with allocator. A's copy constructor shall not throw. + + template shared_array( Y * p, D d, A a ): px( p ), pn( p, d, a ) + { + boost::detail::sp_assert_convertible< Y[], T[] >(); + } + +// generated copy constructor, destructor are fine... + +#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + +// ... except in C++0x, move disables the implicit copy + + shared_array( shared_array const & r ) BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) + { + } + + shared_array( shared_array && r ) BOOST_NOEXCEPT : px( r.px ), pn() + { + pn.swap( r.pn ); + r.px = 0; + } + +#endif + + // conversion + + template +#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) + + shared_array( shared_array const & r, typename boost::detail::sp_enable_if_convertible< Y[], T[] >::type = boost::detail::sp_empty() ) + +#else + + shared_array( shared_array const & r ) + +#endif + BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) // never throws + { + boost::detail::sp_assert_convertible< Y[], T[] >(); + } + + // aliasing + + template< class Y > + shared_array( shared_array const & r, element_type * p ) BOOST_NOEXCEPT : px( p ), pn( r.pn ) + { + } + + // assignment + + shared_array & operator=( shared_array const & r ) BOOST_NOEXCEPT + { + this_type( r ).swap( *this ); + return *this; + } + +#if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1400) + + template + shared_array & operator=( shared_array const & r ) BOOST_NOEXCEPT + { + this_type( r ).swap( *this ); + return *this; + } + +#endif + +#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + + shared_array & operator=( shared_array && r ) BOOST_NOEXCEPT + { + this_type( static_cast< shared_array && >( r ) ).swap( *this ); + return *this; + } + + template + shared_array & operator=( shared_array && r ) BOOST_NOEXCEPT + { + this_type( static_cast< shared_array && >( r ) ).swap( *this ); + return *this; + } + +#endif + + void reset() BOOST_NOEXCEPT + { + this_type().swap( *this ); + } + + template void reset( Y * p ) // Y must be complete + { + BOOST_ASSERT( p == 0 || p != px ); // catch self-reset errors + this_type( p ).swap( *this ); + } + + template void reset( Y * p, D d ) + { + this_type( p, d ).swap( *this ); + } + + template void reset( Y * p, D d, A a ) + { + this_type( p, d, a ).swap( *this ); + } + + template void reset( shared_array const & r, element_type * p ) + { + this_type( r, p ).swap( *this ); + } + + T & operator[] (std::ptrdiff_t i) const // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) + { + BOOST_ASSERT(px != 0); + BOOST_ASSERT(i >= 0); + return px[i]; + } + + T * get() const BOOST_NOEXCEPT + { + return px; + } + +// implicit conversion to "bool" +#include + + bool unique() const BOOST_NOEXCEPT + { + return pn.unique(); + } + + long use_count() const BOOST_NOEXCEPT + { + return pn.use_count(); + } + + void swap(shared_array & other) BOOST_NOEXCEPT + { + std::swap(px, other.px); + pn.swap(other.pn); + } + + void * _internal_get_deleter( boost::detail::sp_typeinfo const & ti ) const + { + return pn.get_deleter( ti ); + } + +private: + + template friend class shared_array; + + T * px; // contained pointer + detail::shared_count pn; // reference counter + +}; // shared_array + +template inline bool operator==(shared_array const & a, shared_array const & b) BOOST_NOEXCEPT +{ + return a.get() == b.get(); +} + +template inline bool operator!=(shared_array const & a, shared_array const & b) BOOST_NOEXCEPT +{ + return a.get() != b.get(); +} + +#if !defined( BOOST_NO_CXX11_NULLPTR ) + +template inline bool operator==( shared_array const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT +{ + return p.get() == 0; +} + +template inline bool operator==( boost::detail::sp_nullptr_t, shared_array const & p ) BOOST_NOEXCEPT +{ + return p.get() == 0; +} + +template inline bool operator!=( shared_array const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT +{ + return p.get() != 0; +} + +template inline bool operator!=( boost::detail::sp_nullptr_t, shared_array const & p ) BOOST_NOEXCEPT +{ + return p.get() != 0; +} + +#endif + +template inline bool operator<(shared_array const & a, shared_array const & b) BOOST_NOEXCEPT +{ + return std::less()(a.get(), b.get()); +} + +template void swap(shared_array & a, shared_array & b) BOOST_NOEXCEPT +{ + a.swap(b); +} + +template< class D, class T > D * get_deleter( shared_array const & p ) +{ + return static_cast< D * >( p._internal_get_deleter( BOOST_SP_TYPEID(D) ) ); +} + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_SHARED_ARRAY_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/shared_ptr.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/shared_ptr.hpp new file mode 100644 index 0000000000..991ca3dad3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/shared_ptr.hpp @@ -0,0 +1,1067 @@ +#ifndef BOOST_SMART_PTR_SHARED_PTR_HPP_INCLUDED +#define BOOST_SMART_PTR_SHARED_PTR_HPP_INCLUDED + +// +// shared_ptr.hpp +// +// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. +// Copyright (c) 2001-2008 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/smart_ptr/shared_ptr.htm for documentation. +// + +#include // for broken compiler workarounds + +// In order to avoid circular dependencies with Boost.TR1 +// we make sure that our include of doesn't try to +// pull in the TR1 headers: that's why we use this header +// rather than including directly: +#include // std::auto_ptr + +#include +#include +#include +#include +#include +#include +#include + +#if !defined(BOOST_SP_NO_ATOMIC_ACCESS) +#include +#endif + +#include // for std::swap +#include // for std::less +#include // for std::bad_cast +#include // for std::size_t + +#if !defined(BOOST_NO_IOSTREAM) +#if !defined(BOOST_NO_IOSFWD) +#include // for std::basic_ostream +#else +#include +#endif +#endif + +namespace boost +{ + +template class shared_ptr; +template class weak_ptr; +template class enable_shared_from_this; +class enable_shared_from_raw; + +namespace movelib +{ + + template< class T, class D > class unique_ptr; + +} // namespace movelib + +namespace detail +{ + +// sp_element, element_type + +template< class T > struct sp_element +{ + typedef T type; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template< class T > struct sp_element< T[] > +{ + typedef T type; +}; + +#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 ) + +template< class T, std::size_t N > struct sp_element< T[N] > +{ + typedef T type; +}; + +#endif + +#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +// sp_dereference, return type of operator* + +template< class T > struct sp_dereference +{ + typedef T & type; +}; + +template<> struct sp_dereference< void > +{ + typedef void type; +}; + +#if !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS) + +template<> struct sp_dereference< void const > +{ + typedef void type; +}; + +template<> struct sp_dereference< void volatile > +{ + typedef void type; +}; + +template<> struct sp_dereference< void const volatile > +{ + typedef void type; +}; + +#endif // !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS) + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template< class T > struct sp_dereference< T[] > +{ + typedef void type; +}; + +#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 ) + +template< class T, std::size_t N > struct sp_dereference< T[N] > +{ + typedef void type; +}; + +#endif + +#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +// sp_member_access, return type of operator-> + +template< class T > struct sp_member_access +{ + typedef T * type; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template< class T > struct sp_member_access< T[] > +{ + typedef void type; +}; + +#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 ) + +template< class T, std::size_t N > struct sp_member_access< T[N] > +{ + typedef void type; +}; + +#endif + +#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +// sp_array_access, return type of operator[] + +template< class T > struct sp_array_access +{ + typedef void type; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template< class T > struct sp_array_access< T[] > +{ + typedef T & type; +}; + +#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 ) + +template< class T, std::size_t N > struct sp_array_access< T[N] > +{ + typedef T & type; +}; + +#endif + +#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +// sp_extent, for operator[] index check + +template< class T > struct sp_extent +{ + enum _vt { value = 0 }; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template< class T, std::size_t N > struct sp_extent< T[N] > +{ + enum _vt { value = N }; +}; + +#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +// enable_shared_from_this support + +template< class X, class Y, class T > inline void sp_enable_shared_from_this( boost::shared_ptr const * ppx, Y const * py, boost::enable_shared_from_this< T > const * pe ) +{ + if( pe != 0 ) + { + pe->_internal_accept_owner( ppx, const_cast< Y* >( py ) ); + } +} + +template< class X, class Y > inline void sp_enable_shared_from_this( boost::shared_ptr * ppx, Y const * py, boost::enable_shared_from_raw const * pe ); + +#ifdef _MANAGED + +// Avoid C4793, ... causes native code generation + +struct sp_any_pointer +{ + template sp_any_pointer( T* ) {} +}; + +inline void sp_enable_shared_from_this( sp_any_pointer, sp_any_pointer, sp_any_pointer ) +{ +} + +#else // _MANAGED + +inline void sp_enable_shared_from_this( ... ) +{ +} + +#endif // _MANAGED + +#if !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined( BOOST_NO_AUTO_PTR ) + +// rvalue auto_ptr support based on a technique by Dave Abrahams + +template< class T, class R > struct sp_enable_if_auto_ptr +{ +}; + +template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R > +{ + typedef R type; +}; + +#endif + +// sp_assert_convertible + +template< class Y, class T > inline void sp_assert_convertible() +{ +#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) + + // static_assert( sp_convertible< Y, T >::value ); + typedef char tmp[ sp_convertible< Y, T >::value? 1: -1 ]; + (void)sizeof( tmp ); + +#else + + T* p = static_cast< Y* >( 0 ); + (void)p; + +#endif +} + +// pointer constructor helper + +template< class T, class Y > inline void sp_pointer_construct( boost::shared_ptr< T > * ppx, Y * p, boost::detail::shared_count & pn ) +{ + boost::detail::shared_count( p ).swap( pn ); + boost::detail::sp_enable_shared_from_this( ppx, p, p ); +} + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template< class T, class Y > inline void sp_pointer_construct( boost::shared_ptr< T[] > * /*ppx*/, Y * p, boost::detail::shared_count & pn ) +{ + sp_assert_convertible< Y[], T[] >(); + boost::detail::shared_count( p, boost::checked_array_deleter< T >() ).swap( pn ); +} + +template< class T, std::size_t N, class Y > inline void sp_pointer_construct( boost::shared_ptr< T[N] > * /*ppx*/, Y * p, boost::detail::shared_count & pn ) +{ + sp_assert_convertible< Y[N], T[N] >(); + boost::detail::shared_count( p, boost::checked_array_deleter< T >() ).swap( pn ); +} + +#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +// deleter constructor helper + +template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr< T > * ppx, Y * p ) +{ + boost::detail::sp_enable_shared_from_this( ppx, p, p ); +} + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr< T[] > * /*ppx*/, Y * /*p*/ ) +{ + sp_assert_convertible< Y[], T[] >(); +} + +template< class T, std::size_t N, class Y > inline void sp_deleter_construct( boost::shared_ptr< T[N] > * /*ppx*/, Y * /*p*/ ) +{ + sp_assert_convertible< Y[N], T[N] >(); +} + +#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +} // namespace detail + + +// +// shared_ptr +// +// An enhanced relative of scoped_ptr with reference counted copy semantics. +// The object pointed to is deleted when the last shared_ptr pointing to it +// is destroyed or reset. +// + +template class shared_ptr +{ +private: + + // Borland 5.5.1 specific workaround + typedef shared_ptr this_type; + +public: + + typedef typename boost::detail::sp_element< T >::type element_type; + + shared_ptr() BOOST_NOEXCEPT : px( 0 ), pn() // never throws in 1.30+ + { + } + +#if !defined( BOOST_NO_CXX11_NULLPTR ) + + shared_ptr( boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT : px( 0 ), pn() // never throws + { + } + +#endif + + template + explicit shared_ptr( Y * p ): px( p ), pn() // Y must be complete + { + boost::detail::sp_pointer_construct( this, p, pn ); + } + + // + // Requirements: D's copy constructor must not throw + // + // shared_ptr will release p by calling d(p) + // + + template shared_ptr( Y * p, D d ): px( p ), pn( p, d ) + { + boost::detail::sp_deleter_construct( this, p ); + } + +#if !defined( BOOST_NO_CXX11_NULLPTR ) + + template shared_ptr( boost::detail::sp_nullptr_t p, D d ): px( p ), pn( p, d ) + { + } + +#endif + + // As above, but with allocator. A's copy constructor shall not throw. + + template shared_ptr( Y * p, D d, A a ): px( p ), pn( p, d, a ) + { + boost::detail::sp_deleter_construct( this, p ); + } + +#if !defined( BOOST_NO_CXX11_NULLPTR ) + + template shared_ptr( boost::detail::sp_nullptr_t p, D d, A a ): px( p ), pn( p, d, a ) + { + } + +#endif + +// generated copy constructor, destructor are fine... + +#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + +// ... except in C++0x, move disables the implicit copy + + shared_ptr( shared_ptr const & r ) BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) + { + } + +#endif + + template + explicit shared_ptr( weak_ptr const & r ): pn( r.pn ) // may throw + { + boost::detail::sp_assert_convertible< Y, T >(); + + // it is now safe to copy r.px, as pn(r.pn) did not throw + px = r.px; + } + + template + shared_ptr( weak_ptr const & r, boost::detail::sp_nothrow_tag ) + BOOST_NOEXCEPT : px( 0 ), pn( r.pn, boost::detail::sp_nothrow_tag() ) + { + if( !pn.empty() ) + { + px = r.px; + } + } + + template +#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) + + shared_ptr( shared_ptr const & r, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) + +#else + + shared_ptr( shared_ptr const & r ) + +#endif + BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) + { + boost::detail::sp_assert_convertible< Y, T >(); + } + + // aliasing + template< class Y > + shared_ptr( shared_ptr const & r, element_type * p ) BOOST_NOEXCEPT : px( p ), pn( r.pn ) + { + } + +#ifndef BOOST_NO_AUTO_PTR + + template + explicit shared_ptr( std::auto_ptr & r ): px(r.get()), pn() + { + boost::detail::sp_assert_convertible< Y, T >(); + + Y * tmp = r.get(); + pn = boost::detail::shared_count( r ); + + boost::detail::sp_deleter_construct( this, tmp ); + } + +#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + + template + shared_ptr( std::auto_ptr && r ): px(r.get()), pn() + { + boost::detail::sp_assert_convertible< Y, T >(); + + Y * tmp = r.get(); + pn = boost::detail::shared_count( r ); + + boost::detail::sp_deleter_construct( this, tmp ); + } + +#elif !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + + template + explicit shared_ptr( Ap r, typename boost::detail::sp_enable_if_auto_ptr::type = 0 ): px( r.get() ), pn() + { + typedef typename Ap::element_type Y; + + boost::detail::sp_assert_convertible< Y, T >(); + + Y * tmp = r.get(); + pn = boost::detail::shared_count( r ); + + boost::detail::sp_deleter_construct( this, tmp ); + } + +#endif // BOOST_NO_SFINAE, BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#endif // BOOST_NO_AUTO_PTR + +#if !defined( BOOST_NO_CXX11_SMART_PTR ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + + template< class Y, class D > + shared_ptr( std::unique_ptr< Y, D > && r ): px( r.get() ), pn() + { + boost::detail::sp_assert_convertible< Y, T >(); + + typename std::unique_ptr< Y, D >::pointer tmp = r.get(); + pn = boost::detail::shared_count( r ); + + boost::detail::sp_deleter_construct( this, tmp ); + } + +#endif + + template< class Y, class D > + shared_ptr( boost::movelib::unique_ptr< Y, D > r ): px( r.get() ), pn() + { + boost::detail::sp_assert_convertible< Y, T >(); + + typename boost::movelib::unique_ptr< Y, D >::pointer tmp = r.get(); + pn = boost::detail::shared_count( r ); + + boost::detail::sp_deleter_construct( this, tmp ); + } + + // assignment + + shared_ptr & operator=( shared_ptr const & r ) BOOST_NOEXCEPT + { + this_type(r).swap(*this); + return *this; + } + +#if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1400) + + template + shared_ptr & operator=(shared_ptr const & r) BOOST_NOEXCEPT + { + this_type(r).swap(*this); + return *this; + } + +#endif + +#ifndef BOOST_NO_AUTO_PTR + + template + shared_ptr & operator=( std::auto_ptr & r ) + { + this_type( r ).swap( *this ); + return *this; + } + +#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + + template + shared_ptr & operator=( std::auto_ptr && r ) + { + this_type( static_cast< std::auto_ptr && >( r ) ).swap( *this ); + return *this; + } + +#elif !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + + template + typename boost::detail::sp_enable_if_auto_ptr< Ap, shared_ptr & >::type operator=( Ap r ) + { + this_type( r ).swap( *this ); + return *this; + } + +#endif // BOOST_NO_SFINAE, BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#endif // BOOST_NO_AUTO_PTR + +#if !defined( BOOST_NO_CXX11_SMART_PTR ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + + template + shared_ptr & operator=( std::unique_ptr && r ) + { + this_type( static_cast< std::unique_ptr && >( r ) ).swap(*this); + return *this; + } + +#endif + + template + shared_ptr & operator=( boost::movelib::unique_ptr r ) + { + // this_type( static_cast< unique_ptr && >( r ) ).swap( *this ); + + boost::detail::sp_assert_convertible< Y, T >(); + + typename boost::movelib::unique_ptr< Y, D >::pointer p = r.get(); + + shared_ptr tmp; + + tmp.px = p; + tmp.pn = boost::detail::shared_count( r ); + + boost::detail::sp_deleter_construct( &tmp, p ); + + tmp.swap( *this ); + + return *this; + } + +// Move support + +#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + + shared_ptr( shared_ptr && r ) BOOST_NOEXCEPT : px( r.px ), pn() + { + pn.swap( r.pn ); + r.px = 0; + } + + template +#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) + + shared_ptr( shared_ptr && r, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) + +#else + + shared_ptr( shared_ptr && r ) + +#endif + BOOST_NOEXCEPT : px( r.px ), pn() + { + boost::detail::sp_assert_convertible< Y, T >(); + + pn.swap( r.pn ); + r.px = 0; + } + + shared_ptr & operator=( shared_ptr && r ) BOOST_NOEXCEPT + { + this_type( static_cast< shared_ptr && >( r ) ).swap( *this ); + return *this; + } + + template + shared_ptr & operator=( shared_ptr && r ) BOOST_NOEXCEPT + { + this_type( static_cast< shared_ptr && >( r ) ).swap( *this ); + return *this; + } + +#endif + +#if !defined( BOOST_NO_CXX11_NULLPTR ) + + shared_ptr & operator=( boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT // never throws + { + this_type().swap(*this); + return *this; + } + +#endif + + void reset() BOOST_NOEXCEPT // never throws in 1.30+ + { + this_type().swap(*this); + } + + template void reset( Y * p ) // Y must be complete + { + BOOST_ASSERT( p == 0 || p != px ); // catch self-reset errors + this_type( p ).swap( *this ); + } + + template void reset( Y * p, D d ) + { + this_type( p, d ).swap( *this ); + } + + template void reset( Y * p, D d, A a ) + { + this_type( p, d, a ).swap( *this ); + } + + template void reset( shared_ptr const & r, element_type * p ) + { + this_type( r, p ).swap( *this ); + } + + // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) + typename boost::detail::sp_dereference< T >::type operator* () const + { + BOOST_ASSERT( px != 0 ); + return *px; + } + + // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) + typename boost::detail::sp_member_access< T >::type operator-> () const + { + BOOST_ASSERT( px != 0 ); + return px; + } + + // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) + typename boost::detail::sp_array_access< T >::type operator[] ( std::ptrdiff_t i ) const + { + BOOST_ASSERT( px != 0 ); + BOOST_ASSERT( i >= 0 && ( i < boost::detail::sp_extent< T >::value || boost::detail::sp_extent< T >::value == 0 ) ); + + return static_cast< typename boost::detail::sp_array_access< T >::type >( px[ i ] ); + } + + element_type * get() const BOOST_NOEXCEPT + { + return px; + } + +// implicit conversion to "bool" +#include + + bool unique() const BOOST_NOEXCEPT + { + return pn.unique(); + } + + long use_count() const BOOST_NOEXCEPT + { + return pn.use_count(); + } + + void swap( shared_ptr & other ) BOOST_NOEXCEPT + { + std::swap(px, other.px); + pn.swap(other.pn); + } + + template bool owner_before( shared_ptr const & rhs ) const BOOST_NOEXCEPT + { + return pn < rhs.pn; + } + + template bool owner_before( weak_ptr const & rhs ) const BOOST_NOEXCEPT + { + return pn < rhs.pn; + } + + void * _internal_get_deleter( boost::detail::sp_typeinfo const & ti ) const BOOST_NOEXCEPT + { + return pn.get_deleter( ti ); + } + + void * _internal_get_untyped_deleter() const BOOST_NOEXCEPT + { + return pn.get_untyped_deleter(); + } + + bool _internal_equiv( shared_ptr const & r ) const BOOST_NOEXCEPT + { + return px == r.px && pn == r.pn; + } + +// Tasteless as this may seem, making all members public allows member templates +// to work in the absence of member template friends. (Matthew Langston) + +#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS + +private: + + template friend class shared_ptr; + template friend class weak_ptr; + + +#endif + + element_type * px; // contained pointer + boost::detail::shared_count pn; // reference counter + +}; // shared_ptr + +template inline bool operator==(shared_ptr const & a, shared_ptr const & b) BOOST_NOEXCEPT +{ + return a.get() == b.get(); +} + +template inline bool operator!=(shared_ptr const & a, shared_ptr const & b) BOOST_NOEXCEPT +{ + return a.get() != b.get(); +} + +#if __GNUC__ == 2 && __GNUC_MINOR__ <= 96 + +// Resolve the ambiguity between our op!= and the one in rel_ops + +template inline bool operator!=(shared_ptr const & a, shared_ptr const & b) BOOST_NOEXCEPT +{ + return a.get() != b.get(); +} + +#endif + +#if !defined( BOOST_NO_CXX11_NULLPTR ) + +template inline bool operator==( shared_ptr const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT +{ + return p.get() == 0; +} + +template inline bool operator==( boost::detail::sp_nullptr_t, shared_ptr const & p ) BOOST_NOEXCEPT +{ + return p.get() == 0; +} + +template inline bool operator!=( shared_ptr const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT +{ + return p.get() != 0; +} + +template inline bool operator!=( boost::detail::sp_nullptr_t, shared_ptr const & p ) BOOST_NOEXCEPT +{ + return p.get() != 0; +} + +#endif + +template inline bool operator<(shared_ptr const & a, shared_ptr const & b) BOOST_NOEXCEPT +{ + return a.owner_before( b ); +} + +template inline void swap(shared_ptr & a, shared_ptr & b) BOOST_NOEXCEPT +{ + a.swap(b); +} + +template shared_ptr static_pointer_cast( shared_ptr const & r ) BOOST_NOEXCEPT +{ + (void) static_cast< T* >( static_cast< U* >( 0 ) ); + + typedef typename shared_ptr::element_type E; + + E * p = static_cast< E* >( r.get() ); + return shared_ptr( r, p ); +} + +template shared_ptr const_pointer_cast( shared_ptr const & r ) BOOST_NOEXCEPT +{ + (void) const_cast< T* >( static_cast< U* >( 0 ) ); + + typedef typename shared_ptr::element_type E; + + E * p = const_cast< E* >( r.get() ); + return shared_ptr( r, p ); +} + +template shared_ptr dynamic_pointer_cast( shared_ptr const & r ) BOOST_NOEXCEPT +{ + (void) dynamic_cast< T* >( static_cast< U* >( 0 ) ); + + typedef typename shared_ptr::element_type E; + + E * p = dynamic_cast< E* >( r.get() ); + return p? shared_ptr( r, p ): shared_ptr(); +} + +template shared_ptr reinterpret_pointer_cast( shared_ptr const & r ) BOOST_NOEXCEPT +{ + (void) reinterpret_cast< T* >( static_cast< U* >( 0 ) ); + + typedef typename shared_ptr::element_type E; + + E * p = reinterpret_cast< E* >( r.get() ); + return shared_ptr( r, p ); +} + +// get_pointer() enables boost::mem_fn to recognize shared_ptr + +template inline typename shared_ptr::element_type * get_pointer(shared_ptr const & p) BOOST_NOEXCEPT +{ + return p.get(); +} + +// operator<< + +#if !defined(BOOST_NO_IOSTREAM) + +#if defined(BOOST_NO_TEMPLATED_IOSTREAMS) || ( defined(__GNUC__) && (__GNUC__ < 3) ) + +template std::ostream & operator<< (std::ostream & os, shared_ptr const & p) +{ + os << p.get(); + return os; +} + +#else + +// in STLport's no-iostreams mode no iostream symbols can be used +#ifndef _STLP_NO_IOSTREAMS + +# if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, < 1300 && __SGI_STL_PORT) +// MSVC6 has problems finding std::basic_ostream through the using declaration in namespace _STL +using std::basic_ostream; +template basic_ostream & operator<< (basic_ostream & os, shared_ptr const & p) +# else +template std::basic_ostream & operator<< (std::basic_ostream & os, shared_ptr const & p) +# endif +{ + os << p.get(); + return os; +} + +#endif // _STLP_NO_IOSTREAMS + +#endif // __GNUC__ < 3 + +#endif // !defined(BOOST_NO_IOSTREAM) + +// get_deleter + +namespace detail +{ + +#if ( defined(__GNUC__) && BOOST_WORKAROUND(__GNUC__, < 3) ) || \ + ( defined(__EDG_VERSION__) && BOOST_WORKAROUND(__EDG_VERSION__, <= 238) ) || \ + ( defined(__HP_aCC) && BOOST_WORKAROUND(__HP_aCC, <= 33500) ) + +// g++ 2.9x doesn't allow static_cast(void *) +// apparently EDG 2.38 and HP aCC A.03.35 also don't accept it + +template D * basic_get_deleter(shared_ptr const & p) +{ + void const * q = p._internal_get_deleter(BOOST_SP_TYPEID(D)); + return const_cast(static_cast(q)); +} + +#else + +template D * basic_get_deleter( shared_ptr const & p ) BOOST_NOEXCEPT +{ + return static_cast( p._internal_get_deleter(BOOST_SP_TYPEID(D)) ); +} + +#endif + +class esft2_deleter_wrapper +{ +private: + + shared_ptr deleter_; + +public: + + esft2_deleter_wrapper() + { + } + + template< class T > void set_deleter( shared_ptr const & deleter ) + { + deleter_ = deleter; + } + + template D* get_deleter() const BOOST_NOEXCEPT + { + return boost::detail::basic_get_deleter( deleter_ ); + } + + template< class T> void operator()( T* ) + { + BOOST_ASSERT( deleter_.use_count() <= 1 ); + deleter_.reset(); + } +}; + +} // namespace detail + +template D * get_deleter( shared_ptr const & p ) BOOST_NOEXCEPT +{ + D *del = boost::detail::basic_get_deleter(p); + + if(del == 0) + { + boost::detail::esft2_deleter_wrapper *del_wrapper = boost::detail::basic_get_deleter(p); +// The following get_deleter method call is fully qualified because +// older versions of gcc (2.95, 3.2.3) fail to compile it when written del_wrapper->get_deleter() + if(del_wrapper) del = del_wrapper->::boost::detail::esft2_deleter_wrapper::get_deleter(); + } + + return del; +} + +// atomic access + +#if !defined(BOOST_SP_NO_ATOMIC_ACCESS) + +template inline bool atomic_is_lock_free( shared_ptr const * /*p*/ ) BOOST_NOEXCEPT +{ + return false; +} + +template shared_ptr atomic_load( shared_ptr const * p ) +{ + boost::detail::spinlock_pool<2>::scoped_lock lock( p ); + return *p; +} + +template inline shared_ptr atomic_load_explicit( shared_ptr const * p, /*memory_order mo*/ int ) +{ + return atomic_load( p ); +} + +template void atomic_store( shared_ptr * p, shared_ptr r ) +{ + boost::detail::spinlock_pool<2>::scoped_lock lock( p ); + p->swap( r ); +} + +template inline void atomic_store_explicit( shared_ptr * p, shared_ptr r, /*memory_order mo*/ int ) +{ + atomic_store( p, r ); // std::move( r ) +} + +template shared_ptr atomic_exchange( shared_ptr * p, shared_ptr r ) +{ + boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p ); + + sp.lock(); + p->swap( r ); + sp.unlock(); + + return r; // return std::move( r ) +} + +template shared_ptr atomic_exchange_explicit( shared_ptr * p, shared_ptr r, /*memory_order mo*/ int ) +{ + return atomic_exchange( p, r ); // std::move( r ) +} + +template bool atomic_compare_exchange( shared_ptr * p, shared_ptr * v, shared_ptr w ) +{ + boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p ); + + sp.lock(); + + if( p->_internal_equiv( *v ) ) + { + p->swap( w ); + + sp.unlock(); + + return true; + } + else + { + shared_ptr tmp( *p ); + + sp.unlock(); + + tmp.swap( *v ); + return false; + } +} + +template inline bool atomic_compare_exchange_explicit( shared_ptr * p, shared_ptr * v, shared_ptr w, /*memory_order success*/ int, /*memory_order failure*/ int ) +{ + return atomic_compare_exchange( p, v, w ); // std::move( w ) +} + +#endif // !defined(BOOST_SP_NO_ATOMIC_ACCESS) + +// hash_value + +template< class T > struct hash; + +template< class T > std::size_t hash_value( boost::shared_ptr const & p ) BOOST_NOEXCEPT +{ + return boost::hash< T* >()( p.get() ); +} + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_SHARED_PTR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/smart_ptr/weak_ptr.hpp b/ThirdParty/boost-Subset/boost/smart_ptr/weak_ptr.hpp new file mode 100644 index 0000000000..e3e9ad9bde --- /dev/null +++ b/ThirdParty/boost-Subset/boost/smart_ptr/weak_ptr.hpp @@ -0,0 +1,253 @@ +#ifndef BOOST_SMART_PTR_WEAK_PTR_HPP_INCLUDED +#define BOOST_SMART_PTR_WEAK_PTR_HPP_INCLUDED + +// +// weak_ptr.hpp +// +// Copyright (c) 2001, 2002, 2003 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/smart_ptr/weak_ptr.htm for documentation. +// + +#include // boost.TR1 include order fix +#include +#include + +namespace boost +{ + +template class weak_ptr +{ +private: + + // Borland 5.5.1 specific workarounds + typedef weak_ptr this_type; + +public: + + typedef typename boost::detail::sp_element< T >::type element_type; + + weak_ptr() BOOST_NOEXCEPT : px(0), pn() // never throws in 1.30+ + { + } + +// generated copy constructor, assignment, destructor are fine... + +#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + +// ... except in C++0x, move disables the implicit copy + + weak_ptr( weak_ptr const & r ) BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) + { + } + + weak_ptr & operator=( weak_ptr const & r ) BOOST_NOEXCEPT + { + px = r.px; + pn = r.pn; + return *this; + } + +#endif + +// +// The "obvious" converting constructor implementation: +// +// template +// weak_ptr(weak_ptr const & r): px(r.px), pn(r.pn) // never throws +// { +// } +// +// has a serious problem. +// +// r.px may already have been invalidated. The px(r.px) +// conversion may require access to *r.px (virtual inheritance). +// +// It is not possible to avoid spurious access violations since +// in multithreaded programs r.px may be invalidated at any point. +// + + template +#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) + + weak_ptr( weak_ptr const & r, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) + +#else + + weak_ptr( weak_ptr const & r ) + +#endif + BOOST_NOEXCEPT : px(r.lock().get()), pn(r.pn) + { + boost::detail::sp_assert_convertible< Y, T >(); + } + +#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + + template +#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) + + weak_ptr( weak_ptr && r, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) + +#else + + weak_ptr( weak_ptr && r ) + +#endif + BOOST_NOEXCEPT : px( r.lock().get() ), pn( static_cast< boost::detail::weak_count && >( r.pn ) ) + { + boost::detail::sp_assert_convertible< Y, T >(); + r.px = 0; + } + + // for better efficiency in the T == Y case + weak_ptr( weak_ptr && r ) + BOOST_NOEXCEPT : px( r.px ), pn( static_cast< boost::detail::weak_count && >( r.pn ) ) + { + r.px = 0; + } + + // for better efficiency in the T == Y case + weak_ptr & operator=( weak_ptr && r ) BOOST_NOEXCEPT + { + this_type( static_cast< weak_ptr && >( r ) ).swap( *this ); + return *this; + } + + +#endif + + template +#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) + + weak_ptr( shared_ptr const & r, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) + +#else + + weak_ptr( shared_ptr const & r ) + +#endif + BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) + { + boost::detail::sp_assert_convertible< Y, T >(); + } + +#if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1300) + + template + weak_ptr & operator=( weak_ptr const & r ) BOOST_NOEXCEPT + { + boost::detail::sp_assert_convertible< Y, T >(); + + px = r.lock().get(); + pn = r.pn; + + return *this; + } + +#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + + template + weak_ptr & operator=( weak_ptr && r ) BOOST_NOEXCEPT + { + this_type( static_cast< weak_ptr && >( r ) ).swap( *this ); + return *this; + } + +#endif + + template + weak_ptr & operator=( shared_ptr const & r ) BOOST_NOEXCEPT + { + boost::detail::sp_assert_convertible< Y, T >(); + + px = r.px; + pn = r.pn; + + return *this; + } + +#endif + + shared_ptr lock() const BOOST_NOEXCEPT + { + return shared_ptr( *this, boost::detail::sp_nothrow_tag() ); + } + + long use_count() const BOOST_NOEXCEPT + { + return pn.use_count(); + } + + bool expired() const BOOST_NOEXCEPT + { + return pn.use_count() == 0; + } + + bool _empty() const // extension, not in std::weak_ptr + { + return pn.empty(); + } + + void reset() BOOST_NOEXCEPT // never throws in 1.30+ + { + this_type().swap(*this); + } + + void swap(this_type & other) BOOST_NOEXCEPT + { + std::swap(px, other.px); + pn.swap(other.pn); + } + + template + void _internal_aliasing_assign(weak_ptr const & r, element_type * px2) + { + px = px2; + pn = r.pn; + } + + template bool owner_before( weak_ptr const & rhs ) const BOOST_NOEXCEPT + { + return pn < rhs.pn; + } + + template bool owner_before( shared_ptr const & rhs ) const BOOST_NOEXCEPT + { + return pn < rhs.pn; + } + +// Tasteless as this may seem, making all members public allows member templates +// to work in the absence of member template friends. (Matthew Langston) + +#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS + +private: + + template friend class weak_ptr; + template friend class shared_ptr; + +#endif + + element_type * px; // contained pointer + boost::detail::weak_count pn; // reference counter + +}; // weak_ptr + +template inline bool operator<(weak_ptr const & a, weak_ptr const & b) BOOST_NOEXCEPT +{ + return a.owner_before( b ); +} + +template void swap(weak_ptr & a, weak_ptr & b) BOOST_NOEXCEPT +{ + a.swap(b); +} + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_WEAK_PTR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/static_assert.hpp b/ThirdParty/boost-Subset/boost/static_assert.hpp new file mode 100644 index 0000000000..d083a9c37d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/static_assert.hpp @@ -0,0 +1,195 @@ +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/static_assert for documentation. + +/* + Revision history: + 02 August 2000 + Initial version. +*/ + +#ifndef BOOST_STATIC_ASSERT_HPP +#define BOOST_STATIC_ASSERT_HPP + +#include +#include + +#if defined(__GNUC__) && !defined(__GXX_EXPERIMENTAL_CXX0X__) +// +// This is horrible, but it seems to be the only we can shut up the +// "anonymous variadic macros were introduced in C99 [-Wvariadic-macros]" +// warning that get spewed out otherwise in non-C++11 mode. +// +#pragma GCC system_header +#endif + +#ifndef BOOST_NO_CXX11_STATIC_ASSERT +# ifndef BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__) +# else +# define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B ) +# endif +#else +# define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B ) +#endif + +#ifdef __BORLANDC__ +// +// workaround for buggy integral-constant expression support: +#define BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS +#endif + +#if defined(__GNUC__) && (__GNUC__ == 3) && ((__GNUC_MINOR__ == 3) || (__GNUC_MINOR__ == 4)) +// gcc 3.3 and 3.4 don't produce good error messages with the default version: +# define BOOST_SA_GCC_WORKAROUND +#endif + +// +// If the compiler issues warnings about old C style casts, +// then enable this: +// +#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))) +# ifndef BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_STATIC_ASSERT_BOOL_CAST( ... ) ((__VA_ARGS__) == 0 ? false : true) +# else +# define BOOST_STATIC_ASSERT_BOOL_CAST( x ) ((x) == 0 ? false : true) +# endif +#else +# ifndef BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_STATIC_ASSERT_BOOL_CAST( ... ) (bool)(__VA_ARGS__) +# else +# define BOOST_STATIC_ASSERT_BOOL_CAST(x) (bool)(x) +# endif +#endif +// +// If the compiler warns about unused typedefs then enable this: +// +#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7))) +# define BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE __attribute__((unused)) +#else +# define BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE +#endif + +#ifndef BOOST_NO_CXX11_STATIC_ASSERT +# ifndef BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_STATIC_ASSERT( ... ) static_assert(__VA_ARGS__, #__VA_ARGS__) +# else +# define BOOST_STATIC_ASSERT( B ) static_assert(B, #B) +# endif +#else + +namespace boost{ + +// HP aCC cannot deal with missing names for template value parameters +template struct STATIC_ASSERTION_FAILURE; + +template <> struct STATIC_ASSERTION_FAILURE { enum { value = 1 }; }; + +// HP aCC cannot deal with missing names for template value parameters +template struct static_assert_test{}; + +} + +// +// Implicit instantiation requires that all member declarations be +// instantiated, but that the definitions are *not* instantiated. +// +// It's not particularly clear how this applies to enum's or typedefs; +// both are described as declarations [7.1.3] and [7.2] in the standard, +// however some compilers use "delayed evaluation" of one or more of +// these when implicitly instantiating templates. We use typedef declarations +// by default, but try defining BOOST_USE_ENUM_STATIC_ASSERT if the enum +// version gets better results from your compiler... +// +// Implementation: +// Both of these versions rely on sizeof(incomplete_type) generating an error +// message containing the name of the incomplete type. We use +// "STATIC_ASSERTION_FAILURE" as the type name here to generate +// an eye catching error message. The result of the sizeof expression is either +// used as an enum initialiser, or as a template argument depending which version +// is in use... +// Note that the argument to the assert is explicitly cast to bool using old- +// style casts: too many compilers currently have problems with static_cast +// when used inside integral constant expressions. +// +#if !defined(BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS) + +#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300) +// __LINE__ macro broken when -ZI is used see Q199057 +// fortunately MSVC ignores duplicate typedef's. +#define BOOST_STATIC_ASSERT( B ) \ + typedef ::boost::static_assert_test<\ + sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >)\ + > boost_static_assert_typedef_ +#elif defined(BOOST_MSVC) && defined(BOOST_NO_CXX11_VARIADIC_MACROS) +#define BOOST_STATIC_ASSERT( B ) \ + typedef ::boost::static_assert_test<\ + sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST ( B ) >)>\ + BOOST_JOIN(boost_static_assert_typedef_, __COUNTER__) +#elif defined(BOOST_MSVC) +#define BOOST_STATIC_ASSERT(...) \ + typedef ::boost::static_assert_test<\ + sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST (__VA_ARGS__) >)>\ + BOOST_JOIN(boost_static_assert_typedef_, __COUNTER__) +#elif (defined(BOOST_INTEL_CXX_VERSION) || defined(BOOST_SA_GCC_WORKAROUND)) && defined(BOOST_NO_CXX11_VARIADIC_MACROS) +// agurt 15/sep/02: a special care is needed to force Intel C++ issue an error +// instead of warning in case of failure +# define BOOST_STATIC_ASSERT( B ) \ + typedef char BOOST_JOIN(boost_static_assert_typedef_, __LINE__) \ + [ ::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >::value ] +#elif (defined(BOOST_INTEL_CXX_VERSION) || defined(BOOST_SA_GCC_WORKAROUND)) && !defined(BOOST_NO_CXX11_VARIADIC_MACROS) +// agurt 15/sep/02: a special care is needed to force Intel C++ issue an error +// instead of warning in case of failure +# define BOOST_STATIC_ASSERT(...) \ + typedef char BOOST_JOIN(boost_static_assert_typedef_, __LINE__) \ + [ ::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >::value ] +#elif defined(__sgi) +// special version for SGI MIPSpro compiler +#define BOOST_STATIC_ASSERT( B ) \ + BOOST_STATIC_CONSTANT(bool, \ + BOOST_JOIN(boost_static_assert_test_, __LINE__) = ( B )); \ + typedef ::boost::static_assert_test<\ + sizeof(::boost::STATIC_ASSERTION_FAILURE< \ + BOOST_JOIN(boost_static_assert_test_, __LINE__) >)>\ + BOOST_JOIN(boost_static_assert_typedef_, __LINE__) +#elif BOOST_WORKAROUND(__MWERKS__, <= 0x3003) +// special version for CodeWarrior <= 8.x +#define BOOST_STATIC_ASSERT( B ) \ + BOOST_STATIC_CONSTANT(int, \ + BOOST_JOIN(boost_static_assert_test_, __LINE__) = \ + sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >) ) +#else +// generic version +# ifndef BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_STATIC_ASSERT( ... ) \ + typedef ::boost::static_assert_test<\ + sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >)>\ + BOOST_JOIN(boost_static_assert_typedef_, __LINE__) BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE +# else +# define BOOST_STATIC_ASSERT( B ) \ + typedef ::boost::static_assert_test<\ + sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >)>\ + BOOST_JOIN(boost_static_assert_typedef_, __LINE__) BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE +# endif +#endif + +#else +// alternative enum based implementation: +# ifndef BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_STATIC_ASSERT( ... ) \ + enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \ + = sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( __VA_ARGS__ ) >) } +# else +# define BOOST_STATIC_ASSERT(B) \ + enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \ + = sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >) } +# endif +#endif +#endif // defined(BOOST_NO_CXX11_STATIC_ASSERT) + +#endif // BOOST_STATIC_ASSERT_HPP + + diff --git a/ThirdParty/boost-Subset/boost/swap.hpp b/ThirdParty/boost-Subset/boost/swap.hpp new file mode 100644 index 0000000000..55cafa4fdd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/swap.hpp @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2014 Glen Fernandes + * + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_SWAP_HPP +#define BOOST_SWAP_HPP + +// The header file at this path is deprecated; +// use boost/core/swap.hpp instead. + +#include + +#endif diff --git a/ThirdParty/boost-Subset/boost/system/api_config.hpp b/ThirdParty/boost-Subset/boost/system/api_config.hpp new file mode 100644 index 0000000000..28b8bece4c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/system/api_config.hpp @@ -0,0 +1,42 @@ +// boost/system/api_config.hpp -------------------------------------------------------// + +// Copyright Beman Dawes 2003, 2006, 2010 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// See http://www.boost.org/libs/system for documentation. + +//--------------------------------------------------------------------------------------// + +// Boost.System calls operating system API functions to implement system error category +// functions. Usually there is no question as to which API is to be used. +// +// In the case of MinGW or Cygwin/MinGW, however, both POSIX and Windows API's are +// available. Chaos ensues if other code thinks one is in use when Boost.System was +// actually built with the other. This header centralizes the API choice and prevents +// user definition of API macros, thus elminating the possibility of mismatches and the +// need to test configurations with little or no practical value. +// + +//--------------------------------------------------------------------------------------// + +#ifndef BOOST_SYSTEM_API_CONFIG_HPP +#define BOOST_SYSTEM_API_CONFIG_HPP + +# if defined(BOOST_POSIX_API) || defined(BOOST_WINDOWS_API) +# error user defined BOOST_POSIX_API or BOOST_WINDOWS_API not supported +# endif + +// BOOST_POSIX_API or BOOST_WINDOWS_API specify which API to use +// Cygwin/MinGW does not predefine _WIN32. +// Standalone MinGW and all other known Windows compilers do predefine _WIN32 +// Compilers that predefine _WIN32 or __MINGW32__ do so for Windows 64-bit builds too. + +# if defined(_WIN32) || defined(__CYGWIN__) // Windows default, including MinGW and Cygwin +# define BOOST_WINDOWS_API +# else +# define BOOST_POSIX_API +# endif + +#endif // BOOST_SYSTEM_API_CONFIG_HPP diff --git a/ThirdParty/boost-Subset/boost/system/config.hpp b/ThirdParty/boost-Subset/boost/system/config.hpp new file mode 100644 index 0000000000..14faa63420 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/system/config.hpp @@ -0,0 +1,70 @@ +// boost/system/config.hpp -----------------------------------------------------------// + +// Copyright Beman Dawes 2003, 2006 + +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/system for documentation. + +#ifndef BOOST_SYSTEM_CONFIG_HPP +#define BOOST_SYSTEM_CONFIG_HPP + +#include +#include +#include // for BOOST_POSIX_API or BOOST_WINDOWS_API + +// This header implements separate compilation features as described in +// http://www.boost.org/more/separate_compilation.html + +// normalize macros ------------------------------------------------------------------// + +#if !defined(BOOST_SYSTEM_DYN_LINK) && !defined(BOOST_SYSTEM_STATIC_LINK) \ + && !defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_ALL_STATIC_LINK) +# define BOOST_SYSTEM_STATIC_LINK +#endif + +#if defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_SYSTEM_DYN_LINK) +# define BOOST_SYSTEM_DYN_LINK +#elif defined(BOOST_ALL_STATIC_LINK) && !defined(BOOST_SYSTEM_STATIC_LINK) +# define BOOST_SYSTEM_STATIC_LINK +#endif + +#if defined(BOOST_SYSTEM_DYN_LINK) && defined(BOOST_SYSTEM_STATIC_LINK) +# error Must not define both BOOST_SYSTEM_DYN_LINK and BOOST_SYSTEM_STATIC_LINK +#endif + +// enable dynamic or static linking as requested --------------------------------------// + +#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK) +# if defined(BOOST_SYSTEM_SOURCE) +# define BOOST_SYSTEM_DECL BOOST_SYMBOL_EXPORT +# else +# define BOOST_SYSTEM_DECL BOOST_SYMBOL_IMPORT +# endif +#else +# define BOOST_SYSTEM_DECL +#endif + +// enable automatic library variant selection ----------------------------------------// + +#if !defined(BOOST_SYSTEM_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_SYSTEM_NO_LIB) +// +// Set the name of our library, this will get undef'ed by auto_link.hpp +// once it's done with it: +// +#define BOOST_LIB_NAME boost_system +// +// If we're importing code from a dll, then tell auto_link.hpp about it: +// +#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK) +# define BOOST_DYN_LINK +#endif +// +// And include the header that does the work: +// +#include +#endif // auto-linking disabled + +#endif // BOOST_SYSTEM_CONFIG_HPP + diff --git a/ThirdParty/boost-Subset/boost/system/detail/error_code.ipp b/ThirdParty/boost-Subset/boost/system/detail/error_code.ipp new file mode 100644 index 0000000000..71c60f61da --- /dev/null +++ b/ThirdParty/boost-Subset/boost/system/detail/error_code.ipp @@ -0,0 +1,467 @@ +// error_code support implementation file ----------------------------------// + +// Copyright Beman Dawes 2002, 2006 +// Copyright (c) Microsoft Corporation 2014 +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/system + +//----------------------------------------------------------------------------// + +#include + +#include +#include +#include +#include +#include +#include + +#include // for strerror/strerror_r + +# if defined( BOOST_WINDOWS_API ) +# include +# if !BOOST_PLAT_WINDOWS_RUNTIME +# include +# endif +# ifndef ERROR_INCORRECT_SIZE +# define ERROR_INCORRECT_SIZE ERROR_BAD_ARGUMENTS +# endif +# endif + +//----------------------------------------------------------------------------// +namespace boost +{ + namespace system + { + +namespace +{ + + // standard error categories ---------------------------------------------// + + class generic_error_category : public error_category + { + public: + generic_error_category(){} + const char * name() const BOOST_SYSTEM_NOEXCEPT; + std::string message( int ev ) const; + }; + + class system_error_category : public error_category + { + public: + system_error_category(){} + const char * name() const BOOST_SYSTEM_NOEXCEPT; + std::string message( int ev ) const; + error_condition default_error_condition( int ev ) const BOOST_SYSTEM_NOEXCEPT; + }; + + // generic_error_category implementation ---------------------------------// + + const char * generic_error_category::name() const BOOST_SYSTEM_NOEXCEPT + { + return "generic"; + } + + std::string generic_error_category::message( int ev ) const + { + using namespace boost::system::errc; +#if defined(__PGI) + using boost::system::errc::invalid_argument; +#endif + + static std::string unknown_err( "Unknown error" ); + // strerror_r is preferred because it is always thread safe, + // however, we fallback to strerror in certain cases because: + // -- Windows doesn't provide strerror_r. + // -- HP and Sun do provide strerror_r on newer systems, but there is + // no way to tell if is available at runtime and in any case their + // versions of strerror are thread safe anyhow. + // -- Linux only sometimes provides strerror_r. + // -- Tru64 provides strerror_r only when compiled -pthread. + // -- VMS doesn't provide strerror_r, but on this platform, strerror is + // thread safe. + # if defined(BOOST_WINDOWS_API) || defined(__hpux) || defined(__sun)\ + || (defined(__linux) && (!defined(__USE_XOPEN2K) || defined(BOOST_SYSTEM_USE_STRERROR)))\ + || (defined(__osf__) && !defined(_REENTRANT))\ + || (defined(__INTEGRITY))\ + || (defined(__vms))\ + || (defined(__QNXNTO__)) + const char * c_str = std::strerror( ev ); + return c_str + ? std::string( c_str ) + : unknown_err; + # else // use strerror_r + char buf[64]; + char * bp = buf; + std::size_t sz = sizeof(buf); + # if defined(__CYGWIN__) || defined(__USE_GNU) + // Oddball version of strerror_r + const char * c_str = strerror_r( ev, bp, sz ); + return c_str + ? std::string( c_str ) + : unknown_err; + # else + // POSIX version of strerror_r + int result; + for (;;) + { + // strerror_r returns 0 on success, otherwise ERANGE if buffer too small, + // invalid_argument if ev not a valid error number + # if defined (__sgi) + const char * c_str = strerror( ev ); + result = 0; + return c_str + ? std::string( c_str ) + : unknown_err; + # else + result = strerror_r( ev, bp, sz ); + # endif + if (result == 0 ) + break; + else + { + # if defined(__linux) + // Linux strerror_r returns -1 on error, with error number in errno + result = errno; + # endif + if ( result != ERANGE ) break; + if ( sz > sizeof(buf) ) std::free( bp ); + sz *= 2; + if ( (bp = static_cast(std::malloc( sz ))) == 0 ) + return std::string( "ENOMEM" ); + } + } + std::string msg; +# ifndef BOOST_NO_EXCEPTIONS + try +# endif + { + msg = ( ( result == invalid_argument ) ? "Unknown error" : bp ); + } + +# ifndef BOOST_NO_EXCEPTIONS + // See ticket #2098 + catch(...) + { + // just eat the exception + } +# endif + + if ( sz > sizeof(buf) ) std::free( bp ); + sz = 0; + return msg; + # endif // else POSIX version of strerror_r + # endif // else use strerror_r + } + // system_error_category implementation --------------------------------// + + const char * system_error_category::name() const BOOST_SYSTEM_NOEXCEPT + { + return "system"; + } + + error_condition system_error_category::default_error_condition( int ev ) const BOOST_SYSTEM_NOEXCEPT + { + using namespace boost::system::errc; +#if defined(__PGI) + using boost::system::errc::invalid_argument; +#endif + +# if defined(BOOST_WINDOWS_API) +# if defined(WINAPI_FAMILY) && ((WINAPI_FAMILY & WINAPI_PARTITION_APP) != 0) + // When using the Windows Runtime, most system errors are reported as HRESULTs. + // We want to map the common Win32 errors to their equivalent error condition, + // whether or not they are reported via an HRESULT. + if ( ev < 0 ) // Check for failed HRESULTs only. + if ( HRESULT_FACILITY( ev ) == FACILITY_WIN32 ) + ev = HRESULT_CODE( ev ); +# endif +# endif + + switch ( ev ) + { + case 0: return make_error_condition( success ); +# if defined(BOOST_POSIX_API) + // POSIX-like O/S -> posix_errno decode table ---------------------------// + case E2BIG: return make_error_condition( argument_list_too_long ); + case EACCES: return make_error_condition( permission_denied ); + case EADDRINUSE: return make_error_condition( address_in_use ); + case EADDRNOTAVAIL: return make_error_condition( address_not_available ); + case EAFNOSUPPORT: return make_error_condition( address_family_not_supported ); + case EAGAIN: return make_error_condition( resource_unavailable_try_again ); +# if EALREADY != EBUSY // EALREADY and EBUSY are the same on QNX Neutrino + case EALREADY: return make_error_condition( connection_already_in_progress ); +# endif + case EBADF: return make_error_condition( bad_file_descriptor ); + case EBADMSG: return make_error_condition( bad_message ); + case EBUSY: return make_error_condition( device_or_resource_busy ); + case ECANCELED: return make_error_condition( operation_canceled ); + case ECHILD: return make_error_condition( no_child_process ); + case ECONNABORTED: return make_error_condition( connection_aborted ); + case ECONNREFUSED: return make_error_condition( connection_refused ); + case ECONNRESET: return make_error_condition( connection_reset ); + case EDEADLK: return make_error_condition( resource_deadlock_would_occur ); + case EDESTADDRREQ: return make_error_condition( destination_address_required ); + case EDOM: return make_error_condition( argument_out_of_domain ); + case EEXIST: return make_error_condition( file_exists ); + case EFAULT: return make_error_condition( bad_address ); + case EFBIG: return make_error_condition( file_too_large ); + case EHOSTUNREACH: return make_error_condition( host_unreachable ); + case EIDRM: return make_error_condition( identifier_removed ); + case EILSEQ: return make_error_condition( illegal_byte_sequence ); + case EINPROGRESS: return make_error_condition( operation_in_progress ); + case EINTR: return make_error_condition( interrupted ); + case EINVAL: return make_error_condition( invalid_argument ); + case EIO: return make_error_condition( io_error ); + case EISCONN: return make_error_condition( already_connected ); + case EISDIR: return make_error_condition( is_a_directory ); + case ELOOP: return make_error_condition( too_many_symbolic_link_levels ); + case EMFILE: return make_error_condition( too_many_files_open ); + case EMLINK: return make_error_condition( too_many_links ); + case EMSGSIZE: return make_error_condition( message_size ); + case ENAMETOOLONG: return make_error_condition( filename_too_long ); + case ENETDOWN: return make_error_condition( network_down ); + case ENETRESET: return make_error_condition( network_reset ); + case ENETUNREACH: return make_error_condition( network_unreachable ); + case ENFILE: return make_error_condition( too_many_files_open_in_system ); + case ENOBUFS: return make_error_condition( no_buffer_space ); + case ENODATA: return make_error_condition( no_message_available ); + case ENODEV: return make_error_condition( no_such_device ); + case ENOENT: return make_error_condition( no_such_file_or_directory ); + case ENOEXEC: return make_error_condition( executable_format_error ); + case ENOLCK: return make_error_condition( no_lock_available ); + case ENOLINK: return make_error_condition( no_link ); + case ENOMEM: return make_error_condition( not_enough_memory ); + case ENOMSG: return make_error_condition( no_message ); + case ENOPROTOOPT: return make_error_condition( no_protocol_option ); + case ENOSPC: return make_error_condition( no_space_on_device ); + case ENOSR: return make_error_condition( no_stream_resources ); + case ENOSTR: return make_error_condition( not_a_stream ); + case ENOSYS: return make_error_condition( function_not_supported ); + case ENOTCONN: return make_error_condition( not_connected ); + case ENOTDIR: return make_error_condition( not_a_directory ); + # if ENOTEMPTY != EEXIST // AIX treats ENOTEMPTY and EEXIST as the same value + case ENOTEMPTY: return make_error_condition( directory_not_empty ); + # endif // ENOTEMPTY != EEXIST + # if ENOTRECOVERABLE != ECONNRESET // the same on some Broadcom chips + case ENOTRECOVERABLE: return make_error_condition( state_not_recoverable ); + # endif // ENOTRECOVERABLE != ECONNRESET + case ENOTSOCK: return make_error_condition( not_a_socket ); + case ENOTSUP: return make_error_condition( not_supported ); + case ENOTTY: return make_error_condition( inappropriate_io_control_operation ); + case ENXIO: return make_error_condition( no_such_device_or_address ); + # if EOPNOTSUPP != ENOTSUP + case EOPNOTSUPP: return make_error_condition( operation_not_supported ); + # endif // EOPNOTSUPP != ENOTSUP + case EOVERFLOW: return make_error_condition( value_too_large ); + # if EOWNERDEAD != ECONNABORTED // the same on some Broadcom chips + case EOWNERDEAD: return make_error_condition( owner_dead ); + # endif // EOWNERDEAD != ECONNABORTED + case EPERM: return make_error_condition( operation_not_permitted ); + case EPIPE: return make_error_condition( broken_pipe ); + case EPROTO: return make_error_condition( protocol_error ); + case EPROTONOSUPPORT: return make_error_condition( protocol_not_supported ); + case EPROTOTYPE: return make_error_condition( wrong_protocol_type ); + case ERANGE: return make_error_condition( result_out_of_range ); + case EROFS: return make_error_condition( read_only_file_system ); + case ESPIPE: return make_error_condition( invalid_seek ); + case ESRCH: return make_error_condition( no_such_process ); + case ETIME: return make_error_condition( stream_timeout ); + case ETIMEDOUT: return make_error_condition( timed_out ); + case ETXTBSY: return make_error_condition( text_file_busy ); + # if EAGAIN != EWOULDBLOCK + case EWOULDBLOCK: return make_error_condition( operation_would_block ); + # endif // EAGAIN != EWOULDBLOCK + case EXDEV: return make_error_condition( cross_device_link ); + #else + // Windows system -> posix_errno decode table ---------------------------// + // see WinError.h comments for descriptions of errors + case ERROR_ACCESS_DENIED: return make_error_condition( permission_denied ); + case ERROR_ALREADY_EXISTS: return make_error_condition( file_exists ); + case ERROR_BAD_UNIT: return make_error_condition( no_such_device ); + case ERROR_BUFFER_OVERFLOW: return make_error_condition( filename_too_long ); + case ERROR_BUSY: return make_error_condition( device_or_resource_busy ); + case ERROR_BUSY_DRIVE: return make_error_condition( device_or_resource_busy ); + case ERROR_CANNOT_MAKE: return make_error_condition( permission_denied ); + case ERROR_CANTOPEN: return make_error_condition( io_error ); + case ERROR_CANTREAD: return make_error_condition( io_error ); + case ERROR_CANTWRITE: return make_error_condition( io_error ); + case ERROR_CURRENT_DIRECTORY: return make_error_condition( permission_denied ); + case ERROR_DEV_NOT_EXIST: return make_error_condition( no_such_device ); + case ERROR_DEVICE_IN_USE: return make_error_condition( device_or_resource_busy ); + case ERROR_DIR_NOT_EMPTY: return make_error_condition( directory_not_empty ); + case ERROR_DIRECTORY: return make_error_condition( invalid_argument ); // WinError.h: "The directory name is invalid" + case ERROR_DISK_FULL: return make_error_condition( no_space_on_device ); + case ERROR_FILE_EXISTS: return make_error_condition( file_exists ); + case ERROR_FILE_NOT_FOUND: return make_error_condition( no_such_file_or_directory ); + case ERROR_HANDLE_DISK_FULL: return make_error_condition( no_space_on_device ); + case ERROR_INVALID_ACCESS: return make_error_condition( permission_denied ); + case ERROR_INVALID_DRIVE: return make_error_condition( no_such_device ); + case ERROR_INVALID_FUNCTION: return make_error_condition( function_not_supported ); + case ERROR_INVALID_HANDLE: return make_error_condition( invalid_argument ); + case ERROR_INVALID_NAME: return make_error_condition( invalid_argument ); + case ERROR_LOCK_VIOLATION: return make_error_condition( no_lock_available ); + case ERROR_LOCKED: return make_error_condition( no_lock_available ); + case ERROR_NEGATIVE_SEEK: return make_error_condition( invalid_argument ); + case ERROR_NOACCESS: return make_error_condition( permission_denied ); + case ERROR_NOT_ENOUGH_MEMORY: return make_error_condition( not_enough_memory ); + case ERROR_NOT_READY: return make_error_condition( resource_unavailable_try_again ); + case ERROR_NOT_SAME_DEVICE: return make_error_condition( cross_device_link ); + case ERROR_OPEN_FAILED: return make_error_condition( io_error ); + case ERROR_OPEN_FILES: return make_error_condition( device_or_resource_busy ); + case ERROR_OPERATION_ABORTED: return make_error_condition( operation_canceled ); + case ERROR_OUTOFMEMORY: return make_error_condition( not_enough_memory ); + case ERROR_PATH_NOT_FOUND: return make_error_condition( no_such_file_or_directory ); + case ERROR_READ_FAULT: return make_error_condition( io_error ); + case ERROR_RETRY: return make_error_condition( resource_unavailable_try_again ); + case ERROR_SEEK: return make_error_condition( io_error ); + case ERROR_SHARING_VIOLATION: return make_error_condition( permission_denied ); + case ERROR_TOO_MANY_OPEN_FILES: return make_error_condition( too_many_files_open ); + case ERROR_WRITE_FAULT: return make_error_condition( io_error ); + case ERROR_WRITE_PROTECT: return make_error_condition( permission_denied ); + case WSAEACCES: return make_error_condition( permission_denied ); + case WSAEADDRINUSE: return make_error_condition( address_in_use ); + case WSAEADDRNOTAVAIL: return make_error_condition( address_not_available ); + case WSAEAFNOSUPPORT: return make_error_condition( address_family_not_supported ); + case WSAEALREADY: return make_error_condition( connection_already_in_progress ); + case WSAEBADF: return make_error_condition( bad_file_descriptor ); + case WSAECONNABORTED: return make_error_condition( connection_aborted ); + case WSAECONNREFUSED: return make_error_condition( connection_refused ); + case WSAECONNRESET: return make_error_condition( connection_reset ); + case WSAEDESTADDRREQ: return make_error_condition( destination_address_required ); + case WSAEFAULT: return make_error_condition( bad_address ); + case WSAEHOSTUNREACH: return make_error_condition( host_unreachable ); + case WSAEINPROGRESS: return make_error_condition( operation_in_progress ); + case WSAEINTR: return make_error_condition( interrupted ); + case WSAEINVAL: return make_error_condition( invalid_argument ); + case WSAEISCONN: return make_error_condition( already_connected ); + case WSAEMFILE: return make_error_condition( too_many_files_open ); + case WSAEMSGSIZE: return make_error_condition( message_size ); + case WSAENAMETOOLONG: return make_error_condition( filename_too_long ); + case WSAENETDOWN: return make_error_condition( network_down ); + case WSAENETRESET: return make_error_condition( network_reset ); + case WSAENETUNREACH: return make_error_condition( network_unreachable ); + case WSAENOBUFS: return make_error_condition( no_buffer_space ); + case WSAENOPROTOOPT: return make_error_condition( no_protocol_option ); + case WSAENOTCONN: return make_error_condition( not_connected ); + case WSAENOTSOCK: return make_error_condition( not_a_socket ); + case WSAEOPNOTSUPP: return make_error_condition( operation_not_supported ); + case WSAEPROTONOSUPPORT: return make_error_condition( protocol_not_supported ); + case WSAEPROTOTYPE: return make_error_condition( wrong_protocol_type ); + case WSAETIMEDOUT: return make_error_condition( timed_out ); + case WSAEWOULDBLOCK: return make_error_condition( operation_would_block ); + #endif + default: return error_condition( ev, system_category() ); + } + } + +# if !defined( BOOST_WINDOWS_API ) + + std::string system_error_category::message( int ev ) const + { + return generic_category().message( ev ); + } +# else + + std::string system_error_category::message( int ev ) const + { +#if defined(UNDER_CE) || BOOST_PLAT_WINDOWS_RUNTIME || defined(BOOST_NO_ANSI_APIS) + std::wstring buf(128, wchar_t()); + for (;;) + { + DWORD retval = ::FormatMessageW( + FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + ev, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language + &buf[0], + buf.size(), + NULL + ); + + if (retval > 0) + { + buf.resize(retval); + break; + } + else if ( ::GetLastError() != ERROR_INSUFFICIENT_BUFFER ) + { + return std::string("Unknown error"); + } + else + { + buf.resize(buf.size() + buf.size() / 2); + } + } + + int num_chars = (buf.size() + 1) * 2; + LPSTR narrow_buffer = (LPSTR)_alloca( num_chars ); + if (::WideCharToMultiByte(CP_ACP, 0, buf.c_str(), -1, narrow_buffer, num_chars, NULL, NULL) == 0) + { + return std::string("Unknown error"); + } + + std::string str( narrow_buffer ); +#else + LPVOID lpMsgBuf = 0; + DWORD retval = ::FormatMessageA( + FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + ev, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language + (LPSTR) &lpMsgBuf, + 0, + NULL + ); + detail::local_free_on_destruction lfod(lpMsgBuf); + if (retval == 0) + return std::string("Unknown error"); + + std::string str( static_cast(lpMsgBuf) ); +# endif + while ( str.size() + && (str[str.size()-1] == '\n' || str[str.size()-1] == '\r') ) + str.erase( str.size()-1 ); + if ( str.size() && str[str.size()-1] == '.' ) + { str.erase( str.size()-1 ); } + return str; + } +# endif + +} // unnamed namespace + + +# ifndef BOOST_SYSTEM_NO_DEPRECATED + BOOST_SYSTEM_DECL error_code throws; // "throw on error" special error_code; + // note that it doesn't matter if this + // isn't initialized before use since + // the only use is to take its + // address for comparison purposes +# endif + +# ifdef BOOST_ERROR_CODE_HEADER_ONLY +# define BOOST_SYSTEM_LINKAGE inline +# else +# define BOOST_SYSTEM_LINKAGE BOOST_SYSTEM_DECL +# endif + + BOOST_SYSTEM_LINKAGE const error_category & system_category() BOOST_SYSTEM_NOEXCEPT + { + static const system_error_category system_category_const; + return system_category_const; + } + + BOOST_SYSTEM_LINKAGE const error_category & generic_category() BOOST_SYSTEM_NOEXCEPT + { + static const generic_error_category generic_category_const; + return generic_category_const; + } + + } // namespace system +} // namespace boost diff --git a/ThirdParty/boost-Subset/boost/system/detail/local_free_on_destruction.hpp b/ThirdParty/boost-Subset/boost/system/detail/local_free_on_destruction.hpp new file mode 100644 index 0000000000..110024f3d5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/system/detail/local_free_on_destruction.hpp @@ -0,0 +1,40 @@ +// local_free_on_exit.hpp ------------------------------------------------------------// + +// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2010 Beman Dawes + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// This is derived from boost/asio/detail/local_free_on_block_exit.hpp to avoid +// a dependency on asio. Thanks to Chris Kohlhoff for pointing it out. + +#ifndef BOOST_SYSTEM_LOCAL_FREE_ON_EXIT_HPP +#define BOOST_SYSTEM_LOCAL_FREE_ON_EXIT_HPP + +namespace boost { +namespace system { +namespace detail { + +class local_free_on_destruction +{ +public: + explicit local_free_on_destruction(void* p) + : p_(p) {} + + ~local_free_on_destruction() + { + ::LocalFree(p_); + } + +private: + void* p_; + local_free_on_destruction(const local_free_on_destruction&); // = deleted + local_free_on_destruction& operator=(const local_free_on_destruction&); // = deleted +}; + +} // namespace detail +} // namespace system +} // namespace boost + +#endif // BOOST_SYSTEM_LOCAL_FREE_ON_EXIT_HPP diff --git a/ThirdParty/boost-Subset/boost/system/error_code.hpp b/ThirdParty/boost-Subset/boost/system/error_code.hpp new file mode 100644 index 0000000000..d419f3701b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/system/error_code.hpp @@ -0,0 +1,520 @@ +// boost/system/error_code.hpp ---------------------------------------------// + +// Copyright Beman Dawes 2006, 2007 +// Copyright Christoper Kohlhoff 2007 + +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/system + +#ifndef BOOST_ERROR_CODE_HPP +#define BOOST_ERROR_CODE_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// TODO: undef these macros if not already defined +#include + +#if !defined(BOOST_POSIX_API) && !defined(BOOST_WINDOWS_API) +# error BOOST_POSIX_API or BOOST_WINDOWS_API must be defined +#endif + +#include // must be the last #include + +#ifndef BOOST_SYSTEM_NOEXCEPT +#define BOOST_SYSTEM_NOEXCEPT BOOST_NOEXCEPT +#endif + +namespace boost +{ + namespace system + { + + class error_code; + class error_condition; + + // "Concept" helpers ---------------------------------------------------// + + template< class T > + struct is_error_code_enum { static const bool value = false; }; + + template< class T > + struct is_error_condition_enum { static const bool value = false; }; + + // generic error_conditions --------------------------------------------// + + namespace errc + { + enum errc_t + { + success = 0, + address_family_not_supported = EAFNOSUPPORT, + address_in_use = EADDRINUSE, + address_not_available = EADDRNOTAVAIL, + already_connected = EISCONN, + argument_list_too_long = E2BIG, + argument_out_of_domain = EDOM, + bad_address = EFAULT, + bad_file_descriptor = EBADF, + bad_message = EBADMSG, + broken_pipe = EPIPE, + connection_aborted = ECONNABORTED, + connection_already_in_progress = EALREADY, + connection_refused = ECONNREFUSED, + connection_reset = ECONNRESET, + cross_device_link = EXDEV, + destination_address_required = EDESTADDRREQ, + device_or_resource_busy = EBUSY, + directory_not_empty = ENOTEMPTY, + executable_format_error = ENOEXEC, + file_exists = EEXIST, + file_too_large = EFBIG, + filename_too_long = ENAMETOOLONG, + function_not_supported = ENOSYS, + host_unreachable = EHOSTUNREACH, + identifier_removed = EIDRM, + illegal_byte_sequence = EILSEQ, + inappropriate_io_control_operation = ENOTTY, + interrupted = EINTR, + invalid_argument = EINVAL, + invalid_seek = ESPIPE, + io_error = EIO, + is_a_directory = EISDIR, + message_size = EMSGSIZE, + network_down = ENETDOWN, + network_reset = ENETRESET, + network_unreachable = ENETUNREACH, + no_buffer_space = ENOBUFS, + no_child_process = ECHILD, + no_link = ENOLINK, + no_lock_available = ENOLCK, + no_message_available = ENODATA, + no_message = ENOMSG, + no_protocol_option = ENOPROTOOPT, + no_space_on_device = ENOSPC, + no_stream_resources = ENOSR, + no_such_device_or_address = ENXIO, + no_such_device = ENODEV, + no_such_file_or_directory = ENOENT, + no_such_process = ESRCH, + not_a_directory = ENOTDIR, + not_a_socket = ENOTSOCK, + not_a_stream = ENOSTR, + not_connected = ENOTCONN, + not_enough_memory = ENOMEM, + not_supported = ENOTSUP, + operation_canceled = ECANCELED, + operation_in_progress = EINPROGRESS, + operation_not_permitted = EPERM, + operation_not_supported = EOPNOTSUPP, + operation_would_block = EWOULDBLOCK, + owner_dead = EOWNERDEAD, + permission_denied = EACCES, + protocol_error = EPROTO, + protocol_not_supported = EPROTONOSUPPORT, + read_only_file_system = EROFS, + resource_deadlock_would_occur = EDEADLK, + resource_unavailable_try_again = EAGAIN, + result_out_of_range = ERANGE, + state_not_recoverable = ENOTRECOVERABLE, + stream_timeout = ETIME, + text_file_busy = ETXTBSY, + timed_out = ETIMEDOUT, + too_many_files_open_in_system = ENFILE, + too_many_files_open = EMFILE, + too_many_links = EMLINK, + too_many_symbolic_link_levels = ELOOP, + value_too_large = EOVERFLOW, + wrong_protocol_type = EPROTOTYPE + }; + + } // namespace errc + +# ifndef BOOST_SYSTEM_NO_DEPRECATED + namespace posix = errc; + namespace posix_error = errc; +# endif + + template<> struct is_error_condition_enum + { static const bool value = true; }; + + + // ----------------------------------------------------------------------// + + // Operating system specific interfaces --------------------------------// + + + // The interface is divided into general and system-specific portions to + // meet these requirements: + // + // * Code calling an operating system API can create an error_code with + // a single category (system_category), even for POSIX-like operating + // systems that return some POSIX errno values and some native errno + // values. This code should not have to pay the cost of distinguishing + // between categories, since it is not yet known if that is needed. + // + // * Users wishing to write system-specific code should be given enums for + // at least the common error cases. + // + // * System specific code should fail at compile time if moved to another + // operating system. + + // The system specific portions of the interface are located in headers + // with names reflecting the operating system. For example, + // + // + // + // + // + // These headers are effectively empty for compiles on operating systems + // where they are not applicable. + + // ----------------------------------------------------------------------// + + // class error_category ------------------------------------------------// + + class error_category : public noncopyable + { + public: + virtual ~error_category(){} + + virtual const char * name() const BOOST_SYSTEM_NOEXCEPT = 0; + virtual std::string message( int ev ) const = 0; + inline virtual error_condition default_error_condition( int ev ) const BOOST_SYSTEM_NOEXCEPT; + inline virtual bool equivalent( int code, + const error_condition & condition ) const BOOST_SYSTEM_NOEXCEPT; + inline virtual bool equivalent( const error_code & code, + int condition ) const BOOST_SYSTEM_NOEXCEPT; + + bool operator==(const error_category & rhs) const BOOST_SYSTEM_NOEXCEPT { return this == &rhs; } + bool operator!=(const error_category & rhs) const BOOST_SYSTEM_NOEXCEPT { return this != &rhs; } + bool operator<( const error_category & rhs ) const BOOST_SYSTEM_NOEXCEPT + { + return std::less()( this, &rhs ); + } + }; + + // predefined error categories -----------------------------------------// + +# ifdef BOOST_ERROR_CODE_HEADER_ONLY + inline const error_category & system_category() BOOST_SYSTEM_NOEXCEPT; + inline const error_category & generic_category() BOOST_SYSTEM_NOEXCEPT; +#else + BOOST_SYSTEM_DECL const error_category & system_category() BOOST_SYSTEM_NOEXCEPT; + BOOST_SYSTEM_DECL const error_category & generic_category() BOOST_SYSTEM_NOEXCEPT; +#endif + // deprecated synonyms --------------------------------------------------// + +# ifndef BOOST_SYSTEM_NO_DEPRECATED + inline const error_category & get_system_category() { return system_category(); } + inline const error_category & get_generic_category() { return generic_category(); } + inline const error_category & get_posix_category() { return generic_category(); } + static const error_category & posix_category = generic_category(); + static const error_category & errno_ecat = generic_category(); + static const error_category & native_ecat = system_category(); +# endif + + // class error_condition -----------------------------------------------// + + // error_conditions are portable, error_codes are system or library specific + + class error_condition + { + public: + + // constructors: + error_condition() BOOST_SYSTEM_NOEXCEPT : m_val(0), m_cat(&generic_category()) {} + error_condition( int val, const error_category & cat ) BOOST_SYSTEM_NOEXCEPT : m_val(val), m_cat(&cat) {} + + template + error_condition(ErrorConditionEnum e, + typename boost::enable_if >::type* = 0) BOOST_SYSTEM_NOEXCEPT + { + *this = make_error_condition(e); + } + + // modifiers: + + void assign( int val, const error_category & cat ) BOOST_SYSTEM_NOEXCEPT + { + m_val = val; + m_cat = &cat; + } + + template + typename boost::enable_if, error_condition>::type & + operator=( ErrorConditionEnum val ) BOOST_SYSTEM_NOEXCEPT + { + *this = make_error_condition(val); + return *this; + } + + void clear() BOOST_SYSTEM_NOEXCEPT + { + m_val = 0; + m_cat = &generic_category(); + } + + // observers: + int value() const BOOST_SYSTEM_NOEXCEPT { return m_val; } + const error_category & category() const BOOST_SYSTEM_NOEXCEPT { return *m_cat; } + std::string message() const { return m_cat->message(value()); } + + typedef void (*unspecified_bool_type)(); + static void unspecified_bool_true() {} + + operator unspecified_bool_type() const BOOST_SYSTEM_NOEXCEPT // true if error + { + return m_val == 0 ? 0 : unspecified_bool_true; + } + + bool operator!() const BOOST_SYSTEM_NOEXCEPT // true if no error + { + return m_val == 0; + } + + // relationals: + // the more symmetrical non-member syntax allows enum + // conversions work for both rhs and lhs. + inline friend bool operator==( const error_condition & lhs, + const error_condition & rhs ) BOOST_SYSTEM_NOEXCEPT + { + return lhs.m_cat == rhs.m_cat && lhs.m_val == rhs.m_val; + } + + inline friend bool operator<( const error_condition & lhs, + const error_condition & rhs ) BOOST_SYSTEM_NOEXCEPT + // the more symmetrical non-member syntax allows enum + // conversions work for both rhs and lhs. + { + return lhs.m_cat < rhs.m_cat + || (lhs.m_cat == rhs.m_cat && lhs.m_val < rhs.m_val); + } + + private: + int m_val; + const error_category * m_cat; + + }; + + // class error_code ----------------------------------------------------// + + // We want error_code to be a value type that can be copied without slicing + // and without requiring heap allocation, but we also want it to have + // polymorphic behavior based on the error category. This is achieved by + // abstract base class error_category supplying the polymorphic behavior, + // and error_code containing a pointer to an object of a type derived + // from error_category. + class error_code + { + public: + + // constructors: + error_code() BOOST_SYSTEM_NOEXCEPT : m_val(0), m_cat(&system_category()) {} + error_code( int val, const error_category & cat ) BOOST_SYSTEM_NOEXCEPT : m_val(val), m_cat(&cat) {} + + template + error_code(ErrorCodeEnum e, + typename boost::enable_if >::type* = 0) BOOST_SYSTEM_NOEXCEPT + { + *this = make_error_code(e); + } + + // modifiers: + void assign( int val, const error_category & cat ) BOOST_SYSTEM_NOEXCEPT + { + m_val = val; + m_cat = &cat; + } + + template + typename boost::enable_if, error_code>::type & + operator=( ErrorCodeEnum val ) BOOST_SYSTEM_NOEXCEPT + { + *this = make_error_code(val); + return *this; + } + + void clear() BOOST_SYSTEM_NOEXCEPT + { + m_val = 0; + m_cat = &system_category(); + } + + // observers: + int value() const BOOST_SYSTEM_NOEXCEPT { return m_val; } + const error_category & category() const BOOST_SYSTEM_NOEXCEPT { return *m_cat; } + error_condition default_error_condition() const BOOST_SYSTEM_NOEXCEPT { return m_cat->default_error_condition(value()); } + std::string message() const { return m_cat->message(value()); } + + typedef void (*unspecified_bool_type)(); + static void unspecified_bool_true() {} + + operator unspecified_bool_type() const BOOST_SYSTEM_NOEXCEPT // true if error + { + return m_val == 0 ? 0 : unspecified_bool_true; + } + + bool operator!() const BOOST_SYSTEM_NOEXCEPT // true if no error + { + return m_val == 0; + } + + // relationals: + inline friend bool operator==( const error_code & lhs, + const error_code & rhs ) BOOST_SYSTEM_NOEXCEPT + // the more symmetrical non-member syntax allows enum + // conversions work for both rhs and lhs. + { + return lhs.m_cat == rhs.m_cat && lhs.m_val == rhs.m_val; + } + + inline friend bool operator<( const error_code & lhs, + const error_code & rhs ) BOOST_SYSTEM_NOEXCEPT + // the more symmetrical non-member syntax allows enum + // conversions work for both rhs and lhs. + { + return lhs.m_cat < rhs.m_cat + || (lhs.m_cat == rhs.m_cat && lhs.m_val < rhs.m_val); + } + + private: + int m_val; + const error_category * m_cat; + + }; + + // predefined error_code object used as "throw on error" tag +# ifndef BOOST_SYSTEM_NO_DEPRECATED + BOOST_SYSTEM_DECL extern error_code throws; +# endif + + // Moving from a "throws" object to a "throws" function without breaking + // existing code is a bit of a problem. The workaround is to place the + // "throws" function in namespace boost rather than namespace boost::system. + + } // namespace system + + namespace detail { inline system::error_code * throws() { return 0; } } + // Misuse of the error_code object is turned into a noisy failure by + // poisoning the reference. This particular implementation doesn't + // produce warnings or errors from popular compilers, is very efficient + // (as determined by inspecting generated code), and does not suffer + // from order of initialization problems. In practice, it also seems + // cause user function error handling implementation errors to be detected + // very early in the development cycle. + + inline system::error_code & throws() + { return *detail::throws(); } + + namespace system + { + // non-member functions ------------------------------------------------// + + inline bool operator!=( const error_code & lhs, + const error_code & rhs ) BOOST_SYSTEM_NOEXCEPT + { + return !(lhs == rhs); + } + + inline bool operator!=( const error_condition & lhs, + const error_condition & rhs ) BOOST_SYSTEM_NOEXCEPT + { + return !(lhs == rhs); + } + + inline bool operator==( const error_code & code, + const error_condition & condition ) BOOST_SYSTEM_NOEXCEPT + { + return code.category().equivalent( code.value(), condition ) + || condition.category().equivalent( code, condition.value() ); + } + + inline bool operator!=( const error_code & lhs, + const error_condition & rhs ) BOOST_SYSTEM_NOEXCEPT + { + return !(lhs == rhs); + } + + inline bool operator==( const error_condition & condition, + const error_code & code ) BOOST_SYSTEM_NOEXCEPT + { + return condition.category().equivalent( code, condition.value() ) + || code.category().equivalent( code.value(), condition ); + } + + inline bool operator!=( const error_condition & lhs, + const error_code & rhs ) BOOST_SYSTEM_NOEXCEPT + { + return !(lhs == rhs); + } + + // TODO: both of these may move elsewhere, but the LWG hasn't spoken yet. + + template + inline std::basic_ostream& + operator<< (std::basic_ostream& os, error_code ec) + { + os << ec.category().name() << ':' << ec.value(); + return os; + } + + inline std::size_t hash_value( const error_code & ec ) + { + return static_cast(ec.value()) + + reinterpret_cast(&ec.category()); + } + + // make_* functions for errc::errc_t -----------------------------// + + namespace errc + { + // explicit conversion: + inline error_code make_error_code( errc_t e ) BOOST_SYSTEM_NOEXCEPT + { return error_code( e, generic_category() ); } + + // implicit conversion: + inline error_condition make_error_condition( errc_t e ) BOOST_SYSTEM_NOEXCEPT + { return error_condition( e, generic_category() ); } + } + + // error_category default implementation -------------------------------// + + error_condition error_category::default_error_condition( int ev ) const BOOST_SYSTEM_NOEXCEPT + { + return error_condition( ev, *this ); + } + + bool error_category::equivalent( int code, + const error_condition & condition ) const BOOST_SYSTEM_NOEXCEPT + { + return default_error_condition( code ) == condition; + } + + bool error_category::equivalent( const error_code & code, + int condition ) const BOOST_SYSTEM_NOEXCEPT + { + return *this == code.category() && code.value() == condition; + } + + } // namespace system +} // namespace boost + +#include // pops abi_prefix.hpp pragmas + +# ifdef BOOST_ERROR_CODE_HEADER_ONLY +# include +# endif + +#endif // BOOST_ERROR_CODE_HPP + + diff --git a/ThirdParty/boost-Subset/boost/system/system_error.hpp b/ThirdParty/boost-Subset/boost/system/system_error.hpp new file mode 100644 index 0000000000..b306aae4b9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/system/system_error.hpp @@ -0,0 +1,84 @@ +// Boost system_error.hpp --------------------------------------------------// + +// Copyright Beman Dawes 2006 + +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_SYSTEM_ERROR_HPP +#define BOOST_SYSTEM_ERROR_HPP + +#include +#include +#include +#include + +namespace boost +{ + namespace system + { + // class system_error ------------------------------------------------------------// + + class BOOST_SYMBOL_VISIBLE system_error : public std::runtime_error + // BOOST_SYMBOL_VISIBLE is needed by GCC to ensure system_error thrown from a shared + // library can be caught. See svn.boost.org/trac/boost/ticket/3697 + { + public: + system_error( error_code ec ) + : std::runtime_error(""), m_error_code(ec) {} + + system_error( error_code ec, const std::string & what_arg ) + : std::runtime_error(what_arg), m_error_code(ec) {} + + system_error( error_code ec, const char* what_arg ) + : std::runtime_error(what_arg), m_error_code(ec) {} + + system_error( int ev, const error_category & ecat ) + : std::runtime_error(""), m_error_code(ev,ecat) {} + + system_error( int ev, const error_category & ecat, + const std::string & what_arg ) + : std::runtime_error(what_arg), m_error_code(ev,ecat) {} + + system_error( int ev, const error_category & ecat, + const char * what_arg ) + : std::runtime_error(what_arg), m_error_code(ev,ecat) {} + + virtual ~system_error() throw() {} + + const error_code & code() const throw() { return m_error_code; } + const char * what() const throw(); + + private: + error_code m_error_code; + mutable std::string m_what; + }; + + // implementation ------------------------------------------------------// + + inline const char * system_error::what() const throw() + // see http://www.boost.org/more/error_handling.html for lazy build rationale + { + if ( m_what.empty() ) + { +#ifndef BOOST_NO_EXCEPTIONS + try +#endif + { + m_what = this->std::runtime_error::what(); + if ( !m_what.empty() ) m_what += ": "; + m_what += m_error_code.message(); + } +#ifndef BOOST_NO_EXCEPTIONS + catch (...) { return std::runtime_error::what(); } +#endif + } + return m_what.c_str(); + } + + } // namespace system +} // namespace boost + +#endif // BOOST_SYSTEM_ERROR_HPP + + diff --git a/ThirdParty/boost-Subset/boost/throw_exception.hpp b/ThirdParty/boost-Subset/boost/throw_exception.hpp new file mode 100644 index 0000000000..aa977dfc79 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/throw_exception.hpp @@ -0,0 +1,102 @@ +#ifndef UUID_AA15E74A856F11E08B8D93F24824019B +#define UUID_AA15E74A856F11E08B8D93F24824019B +#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma GCC system_header +#endif +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(push,1) +#endif + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/throw_exception.hpp +// +// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. +// Copyright (c) 2008-2009 Emil Dotchevski and Reverge Studios, Inc. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// http://www.boost.org/libs/utility/throw_exception.html +// + +#include +#include +#include + +#if !defined( BOOST_EXCEPTION_DISABLE ) && defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x593) ) +# define BOOST_EXCEPTION_DISABLE +#endif + +#if !defined( BOOST_EXCEPTION_DISABLE ) && defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, < 1310 ) +# define BOOST_EXCEPTION_DISABLE +#endif + +#if !defined( BOOST_EXCEPTION_DISABLE ) +# include +#if !defined(BOOST_THROW_EXCEPTION_CURRENT_FUNCTION) +# include +# define BOOST_THROW_EXCEPTION_CURRENT_FUNCTION BOOST_CURRENT_FUNCTION +#endif +# define BOOST_THROW_EXCEPTION(x) ::boost::exception_detail::throw_exception_(x,BOOST_THROW_EXCEPTION_CURRENT_FUNCTION,__FILE__,__LINE__) +#else +# define BOOST_THROW_EXCEPTION(x) ::boost::throw_exception(x) +#endif + +namespace boost +{ +#ifdef BOOST_NO_EXCEPTIONS + +void throw_exception( std::exception const & e ); // user defined + +#else + +inline void throw_exception_assert_compatibility( std::exception const & ) { } + +template BOOST_NORETURN inline void throw_exception( E const & e ) +{ + //All boost exceptions are required to derive from std::exception, + //to ensure compatibility with BOOST_NO_EXCEPTIONS. + throw_exception_assert_compatibility(e); + +#ifndef BOOST_EXCEPTION_DISABLE + throw enable_current_exception(enable_error_info(e)); +#else + throw e; +#endif +} + +#endif + +#if !defined( BOOST_EXCEPTION_DISABLE ) + namespace + exception_detail + { + template + BOOST_NORETURN + void + throw_exception_( E const & x, char const * current_function, char const * file, int line ) + { + boost::throw_exception( + set_info( + set_info( + set_info( + enable_error_info(x), + throw_function(current_function)), + throw_file(file)), + throw_line(line))); + } + } +#endif +} // namespace boost + +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(pop) +#endif +#endif diff --git a/ThirdParty/boost-Subset/boost/timer.hpp b/ThirdParty/boost-Subset/boost/timer.hpp new file mode 100644 index 0000000000..1e3571e417 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/timer.hpp @@ -0,0 +1,72 @@ +// boost timer.hpp header file ---------------------------------------------// + +// Copyright Beman Dawes 1994-99. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/timer for documentation. + +// Revision History +// 01 Apr 01 Modified to use new header. (JMaddock) +// 12 Jan 01 Change to inline implementation to allow use without library +// builds. See docs for more rationale. (Beman Dawes) +// 25 Sep 99 elapsed_max() and elapsed_min() added (John Maddock) +// 16 Jul 99 Second beta +// 6 Jul 99 Initial boost version + +#ifndef BOOST_TIMER_HPP +#define BOOST_TIMER_HPP + +#include +#include +#include + +# ifdef BOOST_NO_STDC_NAMESPACE + namespace std { using ::clock_t; using ::clock; } +# endif + + +namespace boost { + +// timer -------------------------------------------------------------------// + +// A timer object measures elapsed time. + +// It is recommended that implementations measure wall clock rather than CPU +// time since the intended use is performance measurement on systems where +// total elapsed time is more important than just process or CPU time. + +// Warnings: The maximum measurable elapsed time may well be only 596.5+ hours +// due to implementation limitations. The accuracy of timings depends on the +// accuracy of timing information provided by the underlying platform, and +// this varies a great deal from platform to platform. + +class timer +{ + public: + timer() { _start_time = std::clock(); } // postcondition: elapsed()==0 +// timer( const timer& src ); // post: elapsed()==src.elapsed() +// ~timer(){} +// timer& operator=( const timer& src ); // post: elapsed()==src.elapsed() + void restart() { _start_time = std::clock(); } // post: elapsed()==0 + double elapsed() const // return elapsed time in seconds + { return double(std::clock() - _start_time) / CLOCKS_PER_SEC; } + + double elapsed_max() const // return estimated maximum value for elapsed() + // Portability warning: elapsed_max() may return too high a value on systems + // where std::clock_t overflows or resets at surprising values. + { + return (double((std::numeric_limits::max)()) + - double(_start_time)) / double(CLOCKS_PER_SEC); + } + + double elapsed_min() const // return minimum value for elapsed() + { return double(1)/double(CLOCKS_PER_SEC); } + + private: + std::clock_t _start_time; +}; // timer + +} // namespace boost + +#endif // BOOST_TIMER_HPP diff --git a/ThirdParty/boost-Subset/boost/timer/config.hpp b/ThirdParty/boost-Subset/boost/timer/config.hpp new file mode 100644 index 0000000000..adf223d3e4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/timer/config.hpp @@ -0,0 +1,53 @@ +// boost/timer/config.hpp -----------------------------------------------------------// + +// Copyright Beman Dawes 2003, 2006, 2011 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// See http://www.boost.org/libs/timer for documentation. + +#ifndef BOOST_TIMER_CONFIG_HPP +#define BOOST_TIMER_CONFIG_HPP + +#include + +#include + +// This header implements separate compilation features as described in +// http://www.boost.org/more/separate_compilation.html + +// enable dynamic or static linking as requested --------------------------------------// + +#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_TIMER_DYN_LINK) +# if defined(BOOST_TIMER_SOURCE) +# define BOOST_TIMER_DECL BOOST_SYMBOL_EXPORT +# else +# define BOOST_TIMER_DECL BOOST_SYMBOL_IMPORT +# endif +#else +# define BOOST_TIMER_DECL +#endif + +// enable automatic library variant selection ----------------------------------------// + +#if !defined(BOOST_TIMER_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_TIMER_NO_LIB) +// +// Set the name of our library, this will get undef'ed by auto_link.hpp +// once it's done with it: +// +#define BOOST_LIB_NAME boost_timer +// +// If we're importing code from a dll, then tell auto_link.hpp about it: +// +#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_TIMER_DYN_LINK) +# define BOOST_DYN_LINK +#endif +// +// And include the header that does the work: +// +#include +#endif // auto-linking disabled + +#endif // BOOST_TIMER_CONFIG_HPP + diff --git a/ThirdParty/boost-Subset/boost/timer/timer.hpp b/ThirdParty/boost-Subset/boost/timer/timer.hpp new file mode 100644 index 0000000000..792a8abd32 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/timer/timer.hpp @@ -0,0 +1,132 @@ +// boost/timer/timer.hpp -------------------------------------------------------------// + +// Copyright Beman Dawes 1994-2007, 2011 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#ifndef BOOST_TIMER_TIMER_HPP +#define BOOST_TIMER_TIMER_HPP + +#include + +#include +#include +#include +#include +#include +#include + +#include // must be the last #include + +# if defined(_MSC_VER) +# pragma warning(push) // Save warning settings +# pragma warning(disable : 4251) // disable warning: class 'std::basic_string<_Elem,_Traits,_Ax>' +# endif // needs to have dll-interface... + +//--------------------------------------------------------------------------------------// + +namespace boost +{ +namespace timer +{ + class cpu_timer; + class auto_cpu_timer; + + typedef boost::int_least64_t nanosecond_type; + + struct cpu_times + { + nanosecond_type wall; + nanosecond_type user; + nanosecond_type system; + + void clear() { wall = user = system = 0LL; } + }; + + const short default_places = 6; + + BOOST_TIMER_DECL + std::string format(const cpu_times& times, short places, const std::string& format); + + BOOST_TIMER_DECL + std::string format(const cpu_times& times, short places = default_places); + +// cpu_timer -------------------------------------------------------------------------// + + class BOOST_TIMER_DECL cpu_timer + { + public: + + // constructor + cpu_timer() BOOST_NOEXCEPT { start(); } + + // observers + bool is_stopped() const BOOST_NOEXCEPT { return m_is_stopped; } + cpu_times elapsed() const BOOST_NOEXCEPT; // does not stop() + std::string format(short places, const std::string& format) const + { return ::boost::timer::format(elapsed(), places, format); } + std::string format(short places = default_places) const + { return ::boost::timer::format(elapsed(), places); } + // actions + void start() BOOST_NOEXCEPT; + void stop() BOOST_NOEXCEPT; + void resume() BOOST_NOEXCEPT; + + private: + cpu_times m_times; + bool m_is_stopped; + }; + +// auto_cpu_timer --------------------------------------------------------------------// + + class BOOST_TIMER_DECL auto_cpu_timer : public cpu_timer + { + public: + + // Explicit defaults for os are not provided to avoid including , which has + // high costs even when the standard streams are not actually used. Explicit defaults + // for format are not provided to avoid order-of-dynamic-initialization issues with a + // std::string. + + explicit auto_cpu_timer(short places = default_places); // #1 + auto_cpu_timer(short places, const std::string& format); // #2 + explicit auto_cpu_timer(const std::string& format); // #3 + auto_cpu_timer(std::ostream& os, short places, + const std::string& format) // #4 + : m_places(places), m_os(&os), m_format(format) + { start(); } + explicit auto_cpu_timer(std::ostream& os, short places = default_places); // #5 + auto_cpu_timer(std::ostream& os, const std::string& format) // #6 + : m_places(default_places), m_os(&os), m_format(format) + { start(); } + + ~auto_cpu_timer(); + + // observers + // not particularly useful to users, but allow testing of constructor + // postconditions and ease specification of other functionality without resorting + // to "for exposition only" private members. + std::ostream& ostream() const { return *m_os; } + short places() const { return m_places; } + const std::string& format_string() const { return m_format; } + + // actions + void report(); + + private: + short m_places; + std::ostream* m_os; // stored as ptr so compiler can generate operator= + std::string m_format; + }; + +} // namespace timer +} // namespace boost + +# if defined(_MSC_VER) +# pragma warning(pop) // restore warning settings. +# endif + +#include // pops abi_prefix.hpp pragmas + +#endif // BOOST_TIMER_TIMER_HPP diff --git a/ThirdParty/boost-Subset/boost/type.hpp b/ThirdParty/boost-Subset/boost/type.hpp new file mode 100644 index 0000000000..ab81c916d7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type.hpp @@ -0,0 +1,18 @@ +// (C) Copyright David Abrahams 2001. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_TYPE_DWA20010120_HPP +# define BOOST_TYPE_DWA20010120_HPP + +namespace boost { + + // Just a simple "type envelope". Useful in various contexts, mostly to work + // around some MSVC deficiencies. + template + struct type {}; + +} + +#endif // BOOST_TYPE_DWA20010120_HPP diff --git a/ThirdParty/boost-Subset/boost/type_traits/add_const.hpp b/ThirdParty/boost-Subset/boost/type_traits/add_const.hpp new file mode 100644 index 0000000000..0a27f8a971 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/add_const.hpp @@ -0,0 +1,45 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_ADD_CONST_HPP_INCLUDED +#define BOOST_TT_ADD_CONST_HPP_INCLUDED + +#include + +// should be the last #include +#include + +namespace boost { + +// * convert a type T to const type - add_const +// this is not required since the result is always +// the same as "T const", but it does suppress warnings +// from some compilers: + +#if defined(BOOST_MSVC) +// This bogus warning will appear when add_const is applied to a +// const volatile reference because we can't detect const volatile +// references with MSVC6. +# pragma warning(push) +# pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored +#endif + +BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_const,T,T const) + +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_const,T&,T&) + +} // namespace boost + +#include + +#endif // BOOST_TT_ADD_CONST_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/add_cv.hpp b/ThirdParty/boost-Subset/boost/type_traits/add_cv.hpp new file mode 100644 index 0000000000..66625c66c2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/add_cv.hpp @@ -0,0 +1,46 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_ADD_CV_HPP_INCLUDED +#define BOOST_TT_ADD_CV_HPP_INCLUDED + +#include + +// should be the last #include +#include + +namespace boost { + +// * convert a type T to a const volatile type - add_cv +// this is not required since the result is always +// the same as "T const volatile", but it does suppress warnings +// from some compilers: + +#if defined(BOOST_MSVC) +// This bogus warning will appear when add_volatile is applied to a +// const volatile reference because we can't detect const volatile +// references with MSVC6. +# pragma warning(push) +# pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored +#endif + +BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_cv,T,T const volatile) + +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_cv,T&,T&) + +} // namespace boost + +#include + +#endif // BOOST_TT_ADD_CV_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/add_lvalue_reference.hpp b/ThirdParty/boost-Subset/boost/type_traits/add_lvalue_reference.hpp new file mode 100644 index 0000000000..1d7579476a --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/add_lvalue_reference.hpp @@ -0,0 +1,26 @@ +// Copyright 2010 John Maddock + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#ifndef BOOST_TYPE_TRAITS_EXT_ADD_LVALUE_REFERENCE__HPP +#define BOOST_TYPE_TRAITS_EXT_ADD_LVALUE_REFERENCE__HPP + +#include + +// should be the last #include +#include + +namespace boost{ + +BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_lvalue_reference,T,typename boost::add_reference::type) + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_lvalue_reference,T&&,T&) +#endif + +} + +#include + +#endif // BOOST_TYPE_TRAITS_EXT_ADD_LVALUE_REFERENCE__HPP diff --git a/ThirdParty/boost-Subset/boost/type_traits/add_pointer.hpp b/ThirdParty/boost-Subset/boost/type_traits/add_pointer.hpp new file mode 100644 index 0000000000..3e0e481894 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/add_pointer.hpp @@ -0,0 +1,72 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_ADD_POINTER_HPP_INCLUDED +#define BOOST_TT_ADD_POINTER_HPP_INCLUDED + +#include + +// should be the last #include +#include + +namespace boost { + +namespace detail { + +#if defined(__BORLANDC__) && (__BORLANDC__ < 0x5A0) +// +// For some reason this implementation stops Borlands compiler +// from dropping cv-qualifiers, it still fails with references +// to arrays for some reason though (shrug...) (JM 20021104) +// +template +struct add_pointer_impl +{ + typedef T* type; +}; +template +struct add_pointer_impl +{ + typedef T* type; +}; +template +struct add_pointer_impl +{ + typedef T* type; +}; +template +struct add_pointer_impl +{ + typedef T* type; +}; +template +struct add_pointer_impl +{ + typedef T* type; +}; + +#else + +template +struct add_pointer_impl +{ + typedef typename remove_reference::type no_ref_type; + typedef no_ref_type* type; +}; + +#endif + +} // namespace detail + +BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_pointer,T,typename boost::detail::add_pointer_impl::type) + +} // namespace boost + +#include + +#endif // BOOST_TT_ADD_POINTER_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/add_reference.hpp b/ThirdParty/boost-Subset/boost/type_traits/add_reference.hpp new file mode 100644 index 0000000000..5e3efca692 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/add_reference.hpp @@ -0,0 +1,72 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_ADD_REFERENCE_HPP_INCLUDED +#define BOOST_TT_ADD_REFERENCE_HPP_INCLUDED + +#include +#include +#include + +// should be the last #include +#include + +namespace boost { + +namespace detail { + +// +// We can't filter out rvalue_references at the same level as +// references or we get ambiguities from msvc: +// + +template +struct add_reference_rvalue_layer +{ + typedef T& type; +}; + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +template +struct add_reference_rvalue_layer +{ + typedef T&& type; +}; +#endif + +template +struct add_reference_impl +{ + typedef typename add_reference_rvalue_layer::type type; +}; + +BOOST_TT_AUX_TYPE_TRAIT_IMPL_PARTIAL_SPEC1_1(typename T,add_reference,T&,T&) + +// these full specialisations are always required: +BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(add_reference,void,void) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(add_reference,void const,void const) +BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(add_reference,void volatile,void volatile) +BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(add_reference,void const volatile,void const volatile) +#endif + +} // namespace detail + +BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_reference,T,typename boost::detail::add_reference_impl::type) + +// agurt, 07/mar/03: workaround Borland's ill-formed sensitivity to an additional +// level of indirection, here +#if BOOST_WORKAROUND(__BORLANDC__, < 0x600) +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_reference,T&,T&) +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_ADD_REFERENCE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/add_rvalue_reference.hpp b/ThirdParty/boost-Subset/boost/type_traits/add_rvalue_reference.hpp new file mode 100644 index 0000000000..242716f09c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/add_rvalue_reference.hpp @@ -0,0 +1,66 @@ +// add_rvalue_reference.hpp ---------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#ifndef BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP +#define BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP + +#include + +//----------------------------------------------------------------------------// + +#include +#include + +// should be the last #include +#include + +//----------------------------------------------------------------------------// +// // +// C++03 implementation of // +// 20.9.7.2 Reference modifications [meta.trans.ref] // +// Written by Vicente J. Botet Escriba // +// // +// If T names an object or function type then the member typedef type +// shall name T&&; otherwise, type shall name T. [ Note: This rule reflects +// the semantics of reference collapsing. For example, when a type T names +// a type T1&, the type add_rvalue_reference::type is not an rvalue +// reference. -end note ] +//----------------------------------------------------------------------------// + +namespace boost { + +namespace type_traits_detail { + + template + struct add_rvalue_reference_helper + { typedef T type; }; + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + template + struct add_rvalue_reference_helper + { + typedef T&& type; + }; +#endif + + template + struct add_rvalue_reference_imp + { + typedef typename boost::type_traits_detail::add_rvalue_reference_helper + ::value == false && is_reference::value == false) >::type type; + }; + +} + +BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_rvalue_reference,T,typename boost::type_traits_detail::add_rvalue_reference_imp::type) + +} // namespace boost + +#include + +#endif // BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP + diff --git a/ThirdParty/boost-Subset/boost/type_traits/add_volatile.hpp b/ThirdParty/boost-Subset/boost/type_traits/add_volatile.hpp new file mode 100644 index 0000000000..86b529798e --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/add_volatile.hpp @@ -0,0 +1,45 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_ADD_VOLATILE_HPP_INCLUDED +#define BOOST_TT_ADD_VOLATILE_HPP_INCLUDED + +#include + +// should be the last #include +#include + +namespace boost { + +// * convert a type T to volatile type - add_volatile +// this is not required since the result is always +// the same as "T volatile", but it does suppress warnings +// from some compilers: + +#if defined(BOOST_MSVC) +// This bogus warning will appear when add_volatile is applied to a +// const volatile reference because we can't detect const volatile +// references with MSVC6. +# pragma warning(push) +# pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored +#endif + +BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_volatile,T,T volatile) + +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_volatile,T&,T&) + +} // namespace boost + +#include + +#endif // BOOST_TT_ADD_VOLATILE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/alignment_of.hpp b/ThirdParty/boost-Subset/boost/type_traits/alignment_of.hpp new file mode 100644 index 0000000000..31a5f3839f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/alignment_of.hpp @@ -0,0 +1,126 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_ALIGNMENT_OF_HPP_INCLUDED +#define BOOST_TT_ALIGNMENT_OF_HPP_INCLUDED + +#include +#include + +#include +// should be the last #include +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable: 4121 4512) // alignment is sensitive to packing +#endif +#if defined(__BORLANDC__) && (__BORLANDC__ < 0x600) +#pragma option push -Vx- -Ve- +#endif + +namespace boost { + +template struct alignment_of; + +// get the alignment of some arbitrary type: +namespace detail { + +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4324) // structure was padded due to __declspec(align()) +#endif +template +struct alignment_of_hack +{ + char c; + T t; + alignment_of_hack(); +}; +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +template +struct alignment_logic +{ + BOOST_STATIC_CONSTANT(std::size_t, value = A < S ? A : S); +}; + + +template< typename T > +struct alignment_of_impl +{ +#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1400) + // + // With MSVC both the native __alignof operator + // and our own logic gets things wrong from time to time :-( + // Using a combination of the two seems to make the most of a bad job: + // + BOOST_STATIC_CONSTANT(std::size_t, value = + (::boost::detail::alignment_logic< + sizeof(::boost::detail::alignment_of_hack) - sizeof(T), + __alignof(T) + >::value)); +#elif !defined(BOOST_ALIGNMENT_OF) + BOOST_STATIC_CONSTANT(std::size_t, value = + (::boost::detail::alignment_logic< + sizeof(::boost::detail::alignment_of_hack) - sizeof(T), + sizeof(T) + >::value)); +#else + // + // We put this here, rather than in the definition of + // alignment_of below, because MSVC's __alignof doesn't + // always work in that context for some unexplained reason. + // (See type_with_alignment tests for test cases). + // + BOOST_STATIC_CONSTANT(std::size_t, value = BOOST_ALIGNMENT_OF(T)); +#endif +}; + +} // namespace detail + +BOOST_TT_AUX_SIZE_T_TRAIT_DEF1(alignment_of,T,::boost::detail::alignment_of_impl::value) + +// references have to be treated specially, assume +// that a reference is just a special pointer: +template +struct alignment_of + : public alignment_of +{ +}; +#ifdef __BORLANDC__ +// long double gives an incorrect value of 10 (!) +// unless we do this... +struct long_double_wrapper{ long double ld; }; +template<> struct alignment_of + : public alignment_of{}; +#endif + +// void has to be treated specially: +BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1(alignment_of,void,0) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1(alignment_of,void const,0) +BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1(alignment_of,void volatile,0) +BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1(alignment_of,void const volatile,0) +#endif + +} // namespace boost + +#if defined(__BORLANDC__) && (__BORLANDC__ < 0x600) +#pragma option pop +#endif +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif + +#include + +#endif // BOOST_TT_ALIGNMENT_OF_HPP_INCLUDED + diff --git a/ThirdParty/boost-Subset/boost/type_traits/common_type.hpp b/ThirdParty/boost-Subset/boost/type_traits/common_type.hpp new file mode 100644 index 0000000000..b52ff167eb --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/common_type.hpp @@ -0,0 +1,157 @@ +// common_type.hpp ---------------------------------------------------------// + +// Copyright 2008 Howard Hinnant +// Copyright 2008 Beman Dawes + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#ifndef BOOST_TYPE_TRAITS_COMMON_TYPE_HPP +#define BOOST_TYPE_TRAITS_COMMON_TYPE_HPP + +#include + +#if defined(__SUNPRO_CC) && !defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF) +# define BOOST_COMMON_TYPE_DONT_USE_TYPEOF +#endif +#if defined(__IBMCPP__) && !defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF) +# define BOOST_COMMON_TYPE_DONT_USE_TYPEOF +#endif + +//----------------------------------------------------------------------------// +#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_COMMON_TYPE_ARITY) +#define BOOST_COMMON_TYPE_ARITY 3 +#endif + +//----------------------------------------------------------------------------// +#if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF) +#include // boost wonders never cease! +#endif + +//----------------------------------------------------------------------------// +#ifndef BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_COMMON_TYPE_STATIC_ASSERT(CND, MSG, TYPES) static_assert(CND,MSG) +#elif defined(BOOST_COMMON_TYPE_USES_MPL_ASSERT) +#include +#include +#define BOOST_COMMON_TYPE_STATIC_ASSERT(CND, MSG, TYPES) \ + BOOST_MPL_ASSERT_MSG(boost::mpl::bool_< (CND) >::type::value, MSG, TYPES) +#else +#include +#define BOOST_COMMON_TYPE_STATIC_ASSERT(CND, MSG, TYPES) BOOST_STATIC_ASSERT(CND) +#endif + +#if !defined(BOOST_NO_CXX11_STATIC_ASSERT) || !defined(BOOST_COMMON_TYPE_USES_MPL_ASSERT) +#define BOOST_COMMON_TYPE_MUST_BE_A_COMPLE_TYPE "must be complete type" +#endif + +#if defined(BOOST_NO_CXX11_DECLTYPE) && defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF) +#include +#include +#endif +#include +#include +#include + +//----------------------------------------------------------------------------// +// // +// C++03 implementation of // +// 20.9.7.6 Other transformations [meta.trans.other] // +// Written by Howard Hinnant // +// Adapted for Boost by Beman Dawes, Vicente Botet and Jeffrey Hellrung // +// // +//----------------------------------------------------------------------------// + +namespace boost { + +// prototype +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + template + struct common_type; +#else // or no specialization + template + struct common_type + { + public: + typedef typename common_type::type, V>::type type; + }; +#endif + + +// 1 arg + template +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + struct common_type +#else + struct common_type + +#endif + { + BOOST_COMMON_TYPE_STATIC_ASSERT(sizeof(T) > 0, BOOST_COMMON_TYPE_MUST_BE_A_COMPLE_TYPE, (T)); + public: + typedef T type; + }; + +// 2 args +namespace type_traits_detail { + + template + struct common_type_2 + { + private: + BOOST_COMMON_TYPE_STATIC_ASSERT(sizeof(T) > 0, BOOST_COMMON_TYPE_MUST_BE_A_COMPLE_TYPE, (T)); + BOOST_COMMON_TYPE_STATIC_ASSERT(sizeof(U) > 0, BOOST_COMMON_TYPE_MUST_BE_A_COMPLE_TYPE, (U)); + static bool declval_bool(); // workaround gcc bug; not required by std + static typename add_rvalue_reference::type declval_T(); // workaround gcc bug; not required by std + static typename add_rvalue_reference::type declval_U(); // workaround gcc bug; not required by std + static typename add_rvalue_reference::type declval_b(); + +#if !defined(BOOST_NO_CXX11_DECLTYPE) + public: + typedef decltype(declval() ? declval() : declval()) type; +#elif defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF) + public: + typedef typename detail_type_traits_common_type::common_type_impl< + typename remove_cv::type, + typename remove_cv::type + >::type type; +#else + public: + typedef BOOST_TYPEOF_TPL(declval_b() ? declval_T() : declval_U()) type; +#endif + +#if defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ == 3 + public: + void public_dummy_function_just_to_silence_warning(); +#endif + }; + + template + struct common_type_2 + { + typedef T type; + }; + } + +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + template + struct common_type +#else + template + struct common_type +#endif + : public type_traits_detail::common_type_2 + { }; + + +// 3 or more args +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + template + struct common_type { + public: + typedef typename common_type::type, V...>::type type; + }; +#endif +} // namespace boost + +#endif // BOOST_TYPE_TRAITS_COMMON_TYPE_HPP diff --git a/ThirdParty/boost-Subset/boost/type_traits/composite_traits.hpp b/ThirdParty/boost-Subset/boost/type_traits/composite_traits.hpp new file mode 100644 index 0000000000..985a4c51d3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/composite_traits.hpp @@ -0,0 +1,29 @@ +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. +// +// defines traits classes for composite types: +// is_array, is_pointer, is_reference, is_member_pointer, is_enum, is_union. +// + +#ifndef BOOST_TT_COMPOSITE_TRAITS_HPP_INCLUDED +#define BOOST_TT_COMPOSITE_TRAITS_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include + +#endif // BOOST_TT_COMPOSITE_TRAITS_HPP_INCLUDED + + + + + diff --git a/ThirdParty/boost-Subset/boost/type_traits/conditional.hpp b/ThirdParty/boost-Subset/boost/type_traits/conditional.hpp new file mode 100644 index 0000000000..8bbda85fc6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/conditional.hpp @@ -0,0 +1,25 @@ + +// (C) Copyright John Maddock 2010. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_CONDITIONAL_HPP_INCLUDED +#define BOOST_TT_CONDITIONAL_HPP_INCLUDED + +#include + +namespace boost { + +template +struct conditional : public mpl::if_c +{ +}; + +} // namespace boost + + +#endif // BOOST_TT_CONDITIONAL_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/config.hpp b/ThirdParty/boost-Subset/boost/type_traits/config.hpp new file mode 100644 index 0000000000..2e25ad01ff --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/config.hpp @@ -0,0 +1,72 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_CONFIG_HPP_INCLUDED +#define BOOST_TT_CONFIG_HPP_INCLUDED + +#ifndef BOOST_CONFIG_HPP +#include +#endif + +#include + +// +// whenever we have a conversion function with ellipses +// it needs to be declared __cdecl to suppress compiler +// warnings from MS and Borland compilers (this *must* +// appear before we include is_same.hpp below): +#if defined(BOOST_MSVC) || (defined(__BORLANDC__) && !defined(BOOST_DISABLE_WIN32)) +# define BOOST_TT_DECL __cdecl +#else +# define BOOST_TT_DECL /**/ +#endif + +# if (BOOST_WORKAROUND(__MWERKS__, < 0x3000) \ + || BOOST_WORKAROUND(__IBMCPP__, < 600 ) \ + || BOOST_WORKAROUND(__BORLANDC__, < 0x5A0) \ + || defined(__ghs) \ + || BOOST_WORKAROUND(__HP_aCC, < 60700) \ + || BOOST_WORKAROUND(MPW_CPLUS, BOOST_TESTED_AT(0x890)) \ + || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x580))) \ + && defined(BOOST_NO_IS_ABSTRACT) + +# define BOOST_TT_NO_CONFORMING_IS_CLASS_IMPLEMENTATION 1 + +#endif + +#ifndef BOOST_TT_NO_CONFORMING_IS_CLASS_IMPLEMENTATION +# define BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION 1 +#endif + +// +// define BOOST_TT_TEST_MS_FUNC_SIGS +// when we want to test __stdcall etc function types with is_function etc +// (Note, does not work with Borland, even though it does support __stdcall etc): +// +#if defined(_MSC_EXTENSIONS) && !defined(__BORLANDC__) +# define BOOST_TT_TEST_MS_FUNC_SIGS +#endif + +// +// define BOOST_TT_NO_CV_FUNC_TEST +// if tests for cv-qualified member functions don't +// work in is_member_function_pointer +// +#if BOOST_WORKAROUND(__MWERKS__, < 0x3000) || BOOST_WORKAROUND(__IBMCPP__, <= 600) +# define BOOST_TT_NO_CV_FUNC_TEST +#endif + +// +// Macros that have been deprecated, defined here for backwards compatibility: +// +#define BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(x) +#define BOOST_TT_BROKEN_COMPILER_SPEC(x) + +#endif // BOOST_TT_CONFIG_HPP_INCLUDED + + diff --git a/ThirdParty/boost-Subset/boost/type_traits/conversion_traits.hpp b/ThirdParty/boost-Subset/boost/type_traits/conversion_traits.hpp new file mode 100644 index 0000000000..c8e5139b30 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/conversion_traits.hpp @@ -0,0 +1,17 @@ + +// Copyright 2000 John Maddock (john@johnmaddock.co.uk) +// Copyright 2000 Jeremy Siek (jsiek@lsc.nd.edu) +// Copyright 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi) +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_CONVERSION_TRAITS_HPP_INCLUDED +#define BOOST_TT_CONVERSION_TRAITS_HPP_INCLUDED + +#include + +#endif // BOOST_TT_CONVERSION_TRAITS_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/cv_traits.hpp b/ThirdParty/boost-Subset/boost/type_traits/cv_traits.hpp new file mode 100644 index 0000000000..5bd6c4f066 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/cv_traits.hpp @@ -0,0 +1,24 @@ +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. +// +// defines traits classes for cv-qualified types: +// is_const, is_volatile, remove_const, remove_volatile, remove_cv. + +#ifndef BOOST_TT_CV_TRAITS_HPP_INCLUDED +#define BOOST_TT_CV_TRAITS_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // BOOST_TT_CV_TRAITS_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/decay.hpp b/ThirdParty/boost-Subset/boost/type_traits/decay.hpp new file mode 100644 index 0000000000..c23a9b0f15 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/decay.hpp @@ -0,0 +1,44 @@ +// (C) Copyright John Maddock & Thorsten Ottosen 2005. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_DECAY_HPP_INCLUDED +#define BOOST_TT_DECAY_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost +{ + + template< class T > + struct decay + { + private: + typedef BOOST_DEDUCED_TYPENAME remove_reference::type Ty; + public: + typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< + is_array, + mpl::identity::type*>, + BOOST_DEDUCED_TYPENAME mpl::eval_if< + is_function, + add_pointer, + mpl::identity + > + >::type type; + }; + +} // namespace boost + + +#endif // BOOST_TT_DECAY_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/detail/bool_trait_def.hpp b/ThirdParty/boost-Subset/boost/type_traits/detail/bool_trait_def.hpp new file mode 100644 index 0000000000..69e4f1ca62 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/detail/bool_trait_def.hpp @@ -0,0 +1,188 @@ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// $Source$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include +#include + +// +// Unfortunately some libraries have started using this header without +// cleaning up afterwards: so we'd better undef the macros just in case +// they've been defined already.... +// +#ifdef BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL +#undef BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL +#undef BOOST_TT_AUX_BOOL_C_BASE +#undef BOOST_TT_AUX_BOOL_TRAIT_DEF1 +#undef BOOST_TT_AUX_BOOL_TRAIT_DEF2 +#undef BOOST_TT_AUX_BOOL_TRAIT_SPEC1 +#undef BOOST_TT_AUX_BOOL_TRAIT_SPEC2 +#undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1 +#undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2 +#undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1 +#undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2 +#undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1 +#undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2 +#undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1 +#undef BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1 +#endif + +#if defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x570) +# define BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ + typedef ::boost::integral_constant type; \ + enum { value = type::value }; \ + /**/ +# define BOOST_TT_AUX_BOOL_C_BASE(C) +#endif + +#ifndef BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL +# define BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) /**/ +#endif + +#ifndef BOOST_TT_AUX_BOOL_C_BASE +# define BOOST_TT_AUX_BOOL_C_BASE(C) : public ::boost::integral_constant +#endif + + +#define BOOST_TT_AUX_BOOL_TRAIT_DEF1(trait,T,C) \ +template< typename T > struct trait \ + BOOST_TT_AUX_BOOL_C_BASE(C) \ +{ \ +public:\ + BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \ +}; \ +\ +BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \ +/**/ + + +#define BOOST_TT_AUX_BOOL_TRAIT_DEF2(trait,T1,T2,C) \ +template< typename T1, typename T2 > struct trait \ + BOOST_TT_AUX_BOOL_C_BASE(C) \ +{ \ +public:\ + BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,trait,(T1,T2)) \ +}; \ +\ +BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,trait) \ +/**/ + +#define BOOST_TT_AUX_BOOL_TRAIT_DEF3(trait,T1,T2,T3,C) \ +template< typename T1, typename T2, typename T3 > struct trait \ + BOOST_TT_AUX_BOOL_C_BASE(C) \ +{ \ +public:\ + BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ + BOOST_MPL_AUX_LAMBDA_SUPPORT(3,trait,(T1,T2,T3)) \ +}; \ +\ +BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(3,trait) \ +/**/ + +#define BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp,C) \ +template<> struct trait< sp > \ + BOOST_TT_AUX_BOOL_C_BASE(C) \ +{ \ +public:\ + BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(sp)) \ +}; \ +/**/ + +#define BOOST_TT_AUX_BOOL_TRAIT_SPEC2(trait,sp1,sp2,C) \ +template<> struct trait< sp1,sp2 > \ + BOOST_TT_AUX_BOOL_C_BASE(C) \ +{ \ +public:\ + BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2,trait,(sp1,sp2)) \ +}; \ +/**/ + +#define BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(trait,sp,C) \ +template<> struct trait##_impl< sp > \ +{ \ +public:\ + BOOST_STATIC_CONSTANT(bool, value = (C)); \ +}; \ +/**/ + +#define BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,sp1,sp2,C) \ +template<> struct trait##_impl< sp1,sp2 > \ +{ \ +public:\ + BOOST_STATIC_CONSTANT(bool, value = (C)); \ +}; \ +/**/ + +#define BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(param,trait,sp,C) \ +template< param > struct trait< sp > \ + BOOST_TT_AUX_BOOL_C_BASE(C) \ +{ \ +public:\ + BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ +}; \ +/**/ + +#define BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(param1,param2,trait,sp,C) \ +template< param1, param2 > struct trait< sp > \ + BOOST_TT_AUX_BOOL_C_BASE(C) \ +{ \ +public:\ + BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ +}; \ +/**/ + +#define BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(param,trait,sp1,sp2,C) \ +template< param > struct trait< sp1,sp2 > \ + BOOST_TT_AUX_BOOL_C_BASE(C) \ +{ \ +public:\ + BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2,trait,(sp1,sp2)) \ +}; \ +/**/ + +#define BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(param1,param2,trait,sp1,sp2,C) \ +template< param1, param2 > struct trait< sp1,sp2 > \ + BOOST_TT_AUX_BOOL_C_BASE(C) \ +{ \ +public:\ + BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ +}; \ +/**/ + +#define BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(param,trait,sp1,sp2,C) \ +template< param > struct trait##_impl< sp1,sp2 > \ +{ \ +public:\ + BOOST_STATIC_CONSTANT(bool, value = (C)); \ +}; \ +/**/ + +#ifndef BOOST_NO_CV_SPECIALIZATIONS +# define BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(trait,sp,value) \ + BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp,value) \ + BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp const,value) \ + BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp volatile,value) \ + BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp const volatile,value) \ + /**/ +#else +# define BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(trait,sp,value) \ + BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp,value) \ + /**/ +#endif diff --git a/ThirdParty/boost-Subset/boost/type_traits/detail/bool_trait_undef.hpp b/ThirdParty/boost-Subset/boost/type_traits/detail/bool_trait_undef.hpp new file mode 100644 index 0000000000..4ac61ef2e7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/detail/bool_trait_undef.hpp @@ -0,0 +1,28 @@ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// $Source$ +// $Date$ +// $Revision$ + +#undef BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL +#undef BOOST_TT_AUX_BOOL_C_BASE +#undef BOOST_TT_AUX_BOOL_TRAIT_DEF1 +#undef BOOST_TT_AUX_BOOL_TRAIT_DEF2 +#undef BOOST_TT_AUX_BOOL_TRAIT_DEF3 +#undef BOOST_TT_AUX_BOOL_TRAIT_SPEC1 +#undef BOOST_TT_AUX_BOOL_TRAIT_SPEC2 +#undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1 +#undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2 +#undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1 +#undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2 +#undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1 +#undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2 +#undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1 +#undef BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1 diff --git a/ThirdParty/boost-Subset/boost/type_traits/detail/common_type_imp.hpp b/ThirdParty/boost-Subset/boost/type_traits/detail/common_type_imp.hpp new file mode 100644 index 0000000000..84de8b4125 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/detail/common_type_imp.hpp @@ -0,0 +1,333 @@ +/******************************************************************************* + * boost/type_traits/detail/common_type_imp.hpp + * + * Copyright 2010, Jeffrey Hellrung. + * Distributed under the Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + * + * struct boost::common_type + * + * common_type::type is the type of the expression + * b() ? x() : y() + * where b() returns a bool, x() has return type T, and y() has return type U. + * See + * http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2661.htm#common_type + * + * Note that this evaluates to void if one or both of T and U is void. + ******************************************************************************/ + +#ifndef BOOST_TYPE_TRAITS_DETAIL_COMMON_TYPE_IMP_HPP +#define BOOST_TYPE_TRAITS_DETAIL_COMMON_TYPE_IMP_HPP + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost +{ + +namespace detail_type_traits_common_type +{ + +/******************************************************************************* + * struct propagate_cv< From, To > + * + * This metafunction propagates cv-qualifiers on type From to type To. + ******************************************************************************/ + +template< class From, class To > +struct propagate_cv +{ typedef To type; }; +template< class From, class To > +struct propagate_cv< const From, To > +{ typedef To const type; }; +template< class From, class To > +struct propagate_cv< volatile From, To > +{ typedef To volatile type; }; +template< class From, class To > +struct propagate_cv< const volatile From, To > +{ typedef To const volatile type; }; + +/******************************************************************************* + * struct is_integral_or_enum + * + * This metafunction determines if T is an integral type which can be made + * signed or unsigned. + ******************************************************************************/ + +template< class T > +struct is_integral_or_enum + : public mpl::or_< is_integral, is_enum > +{ }; +template<> +struct is_integral_or_enum< bool > + : public false_type +{ }; + +/******************************************************************************* + * struct make_unsigned_soft + * struct make_signed_soft + * + * These metafunction are identical to make_unsigned and make_signed, + * respectively, except for special-casing bool. + ******************************************************************************/ + +template< class T > +struct make_unsigned_soft + : public make_unsigned +{ }; +template<> +struct make_unsigned_soft< bool > +{ typedef bool type; }; + +template< class T > +struct make_signed_soft + : public make_signed +{ }; +template<> +struct make_signed_soft< bool > +{ typedef bool type; }; + +/******************************************************************************* + * struct sizeof_t + * typedef ... yes_type + * typedef ... no_type + * + * These types are integral players in the use of the "sizeof trick", i.e., we + * can distinguish overload selection by inspecting the size of the return type + * of the overload. + ******************************************************************************/ + +template< std::size_t N > struct sizeof_t { char _dummy[N]; }; +typedef sizeof_t<1> yes_type; +typedef sizeof_t<2> no_type; +BOOST_MPL_ASSERT_RELATION( sizeof( yes_type ), ==, 1 ); +BOOST_MPL_ASSERT_RELATION( sizeof( no_type ), ==, 2 ); + +/******************************************************************************* + * rvalue_test(T&) -> no_type + * rvalue_test(...) -> yes_type + * + * These overloads are used to determine the rvalue-ness of an expression. + ******************************************************************************/ + +template< class T > no_type rvalue_test(T&); +yes_type rvalue_test(...); + +/******************************************************************************* + * struct conversion_test_overloads< Sequence > + * + * This struct has multiple overloads of the static member function apply, each + * one taking a single parameter of a type within the Boost.MPL sequence + * Sequence. Each such apply overload has a return type with sizeof equal to + * one plus the index of the parameter type within Sequence. Thus, we can + * deduce the type T of an expression as long as we can generate a finite set of + * candidate types containing T via these apply overloads and the "sizeof + * trick". + ******************************************************************************/ + +template< class First, class Last, std::size_t Index > +struct conversion_test_overloads_iterate + : public conversion_test_overloads_iterate< + typename mpl::next< First >::type, Last, Index + 1 + > +{ + using conversion_test_overloads_iterate< + typename mpl::next< First >::type, Last, Index + 1 + >::apply; + static sizeof_t< Index + 1 > + apply(typename mpl::deref< First >::type); +}; + +template< class Last, std::size_t Index > +struct conversion_test_overloads_iterate< Last, Last, Index > +{ static sizeof_t< Index + 1 > apply(...); }; + +template< class Sequence > +struct conversion_test_overloads + : public conversion_test_overloads_iterate< + typename mpl::begin< Sequence >::type, + typename mpl::end< Sequence >::type, + 0 + > +{ }; + +/******************************************************************************* + * struct select< Sequence, Index > + * + * select is synonymous with mpl::at_c unless Index equals the size of the + * Boost.MPL Sequence, in which case this evaluates to void. + ******************************************************************************/ + +template< + class Sequence, int Index, + int N = mpl::size< Sequence >::value +> +struct select + : public mpl::at_c< Sequence, Index > +{ }; +template< class Sequence, int N > +struct select< Sequence, N, N > +{ typedef void type; }; + +/******************************************************************************* + * class deduce_common_type< T, U, NominalCandidates > + * struct nominal_candidates + * struct common_type_dispatch_on_rvalueness + * struct common_type_impl + * + * These classes and structs implement the logic behind common_type, which goes + * roughly as follows. Let C be the type of the conditional expression + * declval< bool >() ? declval() : declval() + * if C is an rvalue, then: + * let T' and U' be T and U stripped of reference- and cv-qualifiers + * if T' and U' are pointer types, say, T' = V* and U' = W*, then: + * define the set of NominalCandidates to be + * { V*, W*, V'*, W'* } + * where V' is V with whatever cv-qualifiers are on W, and W' is W + * with whatever cv-qualifiers are on V + * else if T' and U' are both integral or enum types, then: + * define the set of NominalCandidates to be + * { + * unsigned_soft(T'), + * unsigned_soft(U'), + * signed_soft(T'), + * signed_soft(U'), + * T', + * U', + * unsigned int, + * int + * } + * where unsigned_soft(X) is make_unsigned_soft::type and + * signed_soft(X) is make_signed_soft::type (these are all + * generally necessary to cover the various integral promotion cases) + * else + * define the set of NominalCandidates to be + * { T', U' } + * else + * let V and W be T and U stripped of reference-qualifiers + * define the set of NominalCandidates to be + * { V&, W&, V'&, W'& } + * where V' is V with whatever cv-qualifiers are on W, and W' is W with + * whatever cv-qualifiers are on V + * define the set of Candidates to be equal to the set of NominalCandidates with + * duplicates removed, and use this set of Candidates to determine C using the + * conversion_test_overloads struct + ******************************************************************************/ + +template< class T, class U, class NominalCandidates > +class deduce_common_type +{ + typedef typename mpl::copy< + NominalCandidates, + mpl::inserter< + mpl::vector0<>, + mpl::if_< + mpl::contains< mpl::_1, mpl::_2 >, + mpl::_1, + mpl::push_back< mpl::_1, mpl::_2 > + > + > + >::type candidate_types; + static const int best_candidate_index = + sizeof( conversion_test_overloads< candidate_types >::apply( + declval< bool >() ? declval() : declval() + ) ) - 1; +public: + typedef typename select< candidate_types, best_candidate_index >::type type; +}; + +template< + class T, class U, + class V = typename remove_cv< typename remove_reference::type >::type, + class W = typename remove_cv< typename remove_reference::type >::type, + bool = is_integral_or_enum::value && is_integral_or_enum::value +> +struct nominal_candidates +{ typedef mpl::vector2 type; }; + +template< class T, class U, class V, class W > +struct nominal_candidates< T, U, V, W, true > +{ + typedef boost::mpl::vector8< + typename make_unsigned_soft::type, + typename make_unsigned_soft::type, + typename make_signed_soft::type, + typename make_signed_soft::type, + V, W, unsigned int, int + > type; +}; + +template< class T, class U, class V, class W > +struct nominal_candidates< T, U, V*, W*, false > +{ + typedef mpl::vector4< + V*, W*, + typename propagate_cv::type *, + typename propagate_cv::type * + > type; +}; + +template +struct common_type_dispatch_on_rvalueness + : public deduce_common_type< T, U, typename nominal_candidates::type > +{ }; + +template< class T, class U > +struct common_type_dispatch_on_rvalueness< T, U, false > +{ +private: + typedef typename remove_reference::type unrefed_T_type; + typedef typename remove_reference::type unrefed_U_type; +public: + typedef typename deduce_common_type< + T, U, + mpl::vector4< + unrefed_T_type &, + unrefed_U_type &, + typename propagate_cv< unrefed_U_type, unrefed_T_type >::type &, + typename propagate_cv< unrefed_T_type, unrefed_U_type >::type & + > + >::type type; +}; + +template< class T, class U > +struct common_type_impl + : public common_type_dispatch_on_rvalueness() ? declval() : declval() ) ) == sizeof( yes_type ) > +{ }; + +template< class T > struct common_type_impl< T, void > { typedef void type; }; +template< class T > struct common_type_impl< void, T > { typedef void type; }; +template<> struct common_type_impl< void, void > { typedef void type; }; + +} // namespace detail_type_traits_common_type + + +} // namespace boost + +#endif // BOOST_TYPE_TRAITS_DETAIL_COMMON_TYPE_HPP + diff --git a/ThirdParty/boost-Subset/boost/type_traits/detail/cv_traits_impl.hpp b/ThirdParty/boost-Subset/boost/type_traits/detail/cv_traits_impl.hpp new file mode 100644 index 0000000000..8e995bb064 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/detail/cv_traits_impl.hpp @@ -0,0 +1,140 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_DETAIL_CV_TRAITS_IMPL_HPP_INCLUDED +#define BOOST_TT_DETAIL_CV_TRAITS_IMPL_HPP_INCLUDED + +#include +#include +#include + + +// implementation helper: + + +namespace boost { +namespace detail { + +#if BOOST_WORKAROUND(BOOST_MSVC, == 1700) +#define BOOST_TT_AUX_CV_TRAITS_IMPL_PARAM(X) X + template + struct cv_traits_imp + { + BOOST_STATIC_CONSTANT(bool, is_const = false); + BOOST_STATIC_CONSTANT(bool, is_volatile = false); + typedef T unqualified_type; + }; + + template + struct cv_traits_imp + { + BOOST_STATIC_CONSTANT(bool, is_const = false); + BOOST_STATIC_CONSTANT(bool, is_volatile = false); + typedef T unqualified_type[]; + }; + + template + struct cv_traits_imp + { + BOOST_STATIC_CONSTANT(bool, is_const = true); + BOOST_STATIC_CONSTANT(bool, is_volatile = false); + typedef T unqualified_type[]; + }; + + template + struct cv_traits_imp + { + BOOST_STATIC_CONSTANT(bool, is_const = false); + BOOST_STATIC_CONSTANT(bool, is_volatile = true); + typedef T unqualified_type[]; + }; + + template + struct cv_traits_imp + { + BOOST_STATIC_CONSTANT(bool, is_const = true); + BOOST_STATIC_CONSTANT(bool, is_volatile = true); + typedef T unqualified_type[]; + }; + + template + struct cv_traits_imp + { + BOOST_STATIC_CONSTANT(bool, is_const = false); + BOOST_STATIC_CONSTANT(bool, is_volatile = false); + typedef T unqualified_type[N]; + }; + + template + struct cv_traits_imp + { + BOOST_STATIC_CONSTANT(bool, is_const = true); + BOOST_STATIC_CONSTANT(bool, is_volatile = false); + typedef T unqualified_type[N]; + }; + + template + struct cv_traits_imp + { + BOOST_STATIC_CONSTANT(bool, is_const = false); + BOOST_STATIC_CONSTANT(bool, is_volatile = true); + typedef T unqualified_type[N]; + }; + + template + struct cv_traits_imp + { + BOOST_STATIC_CONSTANT(bool, is_const = true); + BOOST_STATIC_CONSTANT(bool, is_volatile = true); + typedef T unqualified_type[N]; + }; + +#else +#define BOOST_TT_AUX_CV_TRAITS_IMPL_PARAM(X) X * +template struct cv_traits_imp {}; + +template +struct cv_traits_imp +{ + BOOST_STATIC_CONSTANT(bool, is_const = false); + BOOST_STATIC_CONSTANT(bool, is_volatile = false); + typedef T unqualified_type; +}; +#endif + +template +struct cv_traits_imp +{ + BOOST_STATIC_CONSTANT(bool, is_const = true); + BOOST_STATIC_CONSTANT(bool, is_volatile = false); + typedef T unqualified_type; +}; + +template +struct cv_traits_imp +{ + BOOST_STATIC_CONSTANT(bool, is_const = false); + BOOST_STATIC_CONSTANT(bool, is_volatile = true); + typedef T unqualified_type; +}; + +template +struct cv_traits_imp +{ + BOOST_STATIC_CONSTANT(bool, is_const = true); + BOOST_STATIC_CONSTANT(bool, is_volatile = true); + typedef T unqualified_type; +}; + +} // namespace detail +} // namespace boost + + +#endif // BOOST_TT_DETAIL_CV_TRAITS_IMPL_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/detail/false_result.hpp b/ThirdParty/boost-Subset/boost/type_traits/detail/false_result.hpp new file mode 100644 index 0000000000..e65e8bc257 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/detail/false_result.hpp @@ -0,0 +1,28 @@ +// Copyright David Abrahams 2002. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_DETAIL_FALSE_RESULT_HPP_INCLUDED +#define BOOST_TT_DETAIL_FALSE_RESULT_HPP_INCLUDED + +#include + +namespace boost { +namespace type_traits { + +// Utility class which always "returns" false +struct false_result +{ + template struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = false); + }; +}; + +}} // namespace boost::type_traits + +#endif // BOOST_TT_DETAIL_FALSE_RESULT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/detail/has_binary_operator.hpp b/ThirdParty/boost-Subset/boost/type_traits/detail/has_binary_operator.hpp new file mode 100644 index 0000000000..d82a5cefdb --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/detail/has_binary_operator.hpp @@ -0,0 +1,229 @@ +// (C) Copyright 2009-2011 Frederic Bron, Robert Stewart, Steven Watanabe & Roman Perepelitsa. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// should be the last #include +#include + +// cannot include this header without getting warnings of the kind: +// gcc: +// warning: value computed is not used +// warning: comparison between signed and unsigned integer expressions +// msvc: +// warning C4018: '<' : signed/unsigned mismatch +// warning C4244: '+=' : conversion from 'double' to 'char', possible loss of data +// warning C4547: '*' : operator before comma has no effect; expected operator with side-effect +// warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning) +// warning C4804: '<' : unsafe use of type 'bool' in operation +// warning C4805: '==' : unsafe mix of type 'bool' and type 'char' in operation +// cannot find another implementation -> declared as system header to suppress these warnings. +#if defined(__GNUC__) +# pragma GCC system_header +#elif defined(BOOST_MSVC) +# pragma warning ( push ) +# pragma warning ( disable : 4018 4244 4547 4800 4804 4805 4913 ) +#endif + +namespace boost { +namespace detail { + +// This namespace ensures that argument-dependent name lookup does not mess things up. +namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) { + +// 1. a function to have an instance of type T without requiring T to be default +// constructible +template T &make(); + + +// 2. we provide our operator definition for types that do not have one already + +// a type returned from operator BOOST_TT_TRAIT_OP when no such operator is +// found in the type's own namespace (our own operator is used) so that we have +// a means to know that our operator was used +struct no_operator { }; + +// this class allows implicit conversions and makes the following operator +// definition less-preferred than any other such operators that might be found +// via argument-dependent name lookup +struct any { template any(T const&); }; + +// when operator BOOST_TT_TRAIT_OP is not available, this one is used +no_operator operator BOOST_TT_TRAIT_OP (const any&, const any&); + + +// 3. checks if the operator returns void or not +// conditions: Lhs!=void and Rhs!=void + +// we first redefine "operator," so that we have no compilation error if +// operator BOOST_TT_TRAIT_OP returns void and we can use the return type of +// (lhs BOOST_TT_TRAIT_OP rhs, returns_void_t()) to deduce if +// operator BOOST_TT_TRAIT_OP returns void or not: +// - operator BOOST_TT_TRAIT_OP returns void -> (lhs BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns returns_void_t +// - operator BOOST_TT_TRAIT_OP returns !=void -> (lhs BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns int +struct returns_void_t { }; +template int operator,(const T&, returns_void_t); +template int operator,(const volatile T&, returns_void_t); + +// this intermediate trait has member value of type bool: +// - value==true -> operator BOOST_TT_TRAIT_OP returns void +// - value==false -> operator BOOST_TT_TRAIT_OP does not return void +template < typename Lhs, typename Rhs > +struct operator_returns_void { + // overloads of function returns_void make the difference + // yes_type and no_type have different size by construction + static ::boost::type_traits::yes_type returns_void(returns_void_t); + static ::boost::type_traits::no_type returns_void(int); + BOOST_STATIC_CONSTANT(bool, value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() BOOST_TT_TRAIT_OP make(),returns_void_t()))))); +}; + + +// 4. checks if the return type is Ret or Ret==dont_care +// conditions: Lhs!=void and Rhs!=void + +struct dont_care { }; + +template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > +struct operator_returns_Ret; + +template < typename Lhs, typename Rhs > +struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template < typename Lhs, typename Rhs > +struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template < typename Lhs, typename Rhs > +struct operator_returns_Ret < Lhs, Rhs, void, true > { + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template < typename Lhs, typename Rhs > +struct operator_returns_Ret < Lhs, Rhs, void, false > { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template < typename Lhs, typename Rhs, typename Ret > +struct operator_returns_Ret < Lhs, Rhs, Ret, true > { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +// otherwise checks if it is convertible to Ret using the sizeof trick +// based on overload resolution +// condition: Ret!=void and Ret!=dont_care and the operator does not return void +template < typename Lhs, typename Rhs, typename Ret > +struct operator_returns_Ret < Lhs, Rhs, Ret, false > { + static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); // this version is preferred for types convertible to Ret + static ::boost::type_traits::no_type is_convertible_to_Ret(...); // this version is used otherwise + + BOOST_STATIC_CONSTANT(bool, value = (sizeof(is_convertible_to_Ret(make() BOOST_TT_TRAIT_OP make()))==sizeof(::boost::type_traits::yes_type))); +}; + + +// 5. checks for operator existence +// condition: Lhs!=void and Rhs!=void + +// checks if our definition of operator BOOST_TT_TRAIT_OP is used or an other +// existing one; +// this is done with redefinition of "operator," that returns no_operator or has_operator +struct has_operator { }; +no_operator operator,(no_operator, has_operator); + +template < typename Lhs, typename Rhs > +struct operator_exists { + static ::boost::type_traits::yes_type s_check(has_operator); // this version is preferred when operator exists + static ::boost::type_traits::no_type s_check(no_operator); // this version is used otherwise + + BOOST_STATIC_CONSTANT(bool, value = (sizeof(s_check(((make() BOOST_TT_TRAIT_OP make()),make())))==sizeof(::boost::type_traits::yes_type))); +}; + + +// 6. main trait: to avoid any compilation error, this class behaves +// differently when operator BOOST_TT_TRAIT_OP(Lhs, Rhs) is forbidden by the +// standard. +// Forbidden_if is a bool that is: +// - true when the operator BOOST_TT_TRAIT_OP(Lhs, Rhs) is forbidden by the standard +// (would yield compilation error if used) +// - false otherwise +template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > +struct trait_impl1; + +template < typename Lhs, typename Rhs, typename Ret > +struct trait_impl1 < Lhs, Rhs, Ret, true > { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template < typename Lhs, typename Rhs, typename Ret > +struct trait_impl1 < Lhs, Rhs, Ret, false > { + BOOST_STATIC_CONSTANT(bool, + value = ( + ::boost::type_traits::ice_and< + operator_exists < Lhs, Rhs >::value, + operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value + >::value + ) + ); +}; + +// some specializations needs to be declared for the special void case +template < typename Rhs, typename Ret > +struct trait_impl1 < void, Rhs, Ret, false > { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template < typename Lhs, typename Ret > +struct trait_impl1 < Lhs, void, Ret, false > { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template < typename Ret > +struct trait_impl1 < void, void, Ret, false > { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +// defines some typedef for convenience +template < typename Lhs, typename Rhs, typename Ret > +struct trait_impl { + typedef typename ::boost::remove_reference::type Lhs_noref; + typedef typename ::boost::remove_reference::type Rhs_noref; + typedef typename ::boost::remove_cv::type Lhs_nocv; + typedef typename ::boost::remove_cv::type Rhs_nocv; + typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; + typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; + BOOST_STATIC_CONSTANT(bool, value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, BOOST_TT_FORBIDDEN_IF >::value)); +}; + +} // namespace impl +} // namespace detail + +// this is the accessible definition of the trait to end user +BOOST_TT_AUX_BOOL_TRAIT_DEF3(BOOST_TT_TRAIT_NAME, Lhs, Rhs=Lhs, Ret=::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::dont_care, (::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::trait_impl < Lhs, Rhs, Ret >::value)) + +} // namespace boost + +#if defined(BOOST_MSVC) +# pragma warning ( pop ) +#endif + +#include diff --git a/ThirdParty/boost-Subset/boost/type_traits/detail/ice_and.hpp b/ThirdParty/boost-Subset/boost/type_traits/detail/ice_and.hpp new file mode 100644 index 0000000000..8b461b9fff --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/detail/ice_and.hpp @@ -0,0 +1,35 @@ +// (C) Copyright John Maddock and Steve Cleary 2000. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_DETAIL_ICE_AND_HPP_INCLUDED +#define BOOST_TT_DETAIL_ICE_AND_HPP_INCLUDED + +#include + +namespace boost { +namespace type_traits { + +template +struct ice_and; + +template +struct ice_and +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template <> +struct ice_and +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +} // namespace type_traits +} // namespace boost + +#endif // BOOST_TT_DETAIL_ICE_AND_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/detail/ice_eq.hpp b/ThirdParty/boost-Subset/boost/type_traits/detail/ice_eq.hpp new file mode 100644 index 0000000000..ea42a60b66 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/detail/ice_eq.hpp @@ -0,0 +1,36 @@ +// (C) Copyright John Maddock and Steve Cleary 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_DETAIL_ICE_EQ_HPP_INCLUDED +#define BOOST_TT_DETAIL_ICE_EQ_HPP_INCLUDED + +#include + +namespace boost { +namespace type_traits { + +template +struct ice_eq +{ + BOOST_STATIC_CONSTANT(bool, value = (b1 == b2)); +}; + +template +struct ice_ne +{ + BOOST_STATIC_CONSTANT(bool, value = (b1 != b2)); +}; + +#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION +template bool const ice_eq::value; +template bool const ice_ne::value; +#endif + +} // namespace type_traits +} // namespace boost + +#endif // BOOST_TT_DETAIL_ICE_EQ_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/detail/ice_not.hpp b/ThirdParty/boost-Subset/boost/type_traits/detail/ice_not.hpp new file mode 100644 index 0000000000..ee1dca0ecd --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/detail/ice_not.hpp @@ -0,0 +1,31 @@ +// (C) Copyright John Maddock and Steve Cleary 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_DETAIL_ICE_NOT_HPP_INCLUDED +#define BOOST_TT_DETAIL_ICE_NOT_HPP_INCLUDED + +#include + +namespace boost { +namespace type_traits { + +template +struct ice_not +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template <> +struct ice_not +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +} // namespace type_traits +} // namespace boost + +#endif // BOOST_TT_DETAIL_ICE_NOT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/detail/ice_or.hpp b/ThirdParty/boost-Subset/boost/type_traits/detail/ice_or.hpp new file mode 100644 index 0000000000..f88d9f6aec --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/detail/ice_or.hpp @@ -0,0 +1,34 @@ +// (C) Copyright John Maddock and Steve Cleary 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_DETAIL_ICE_OR_HPP_INCLUDED +#define BOOST_TT_DETAIL_ICE_OR_HPP_INCLUDED + +#include + +namespace boost { +namespace type_traits { + +template +struct ice_or; + +template +struct ice_or +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template <> +struct ice_or +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +} // namespace type_traits +} // namespace boost + +#endif // BOOST_TT_DETAIL_ICE_OR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/detail/is_function_ptr_helper.hpp b/ThirdParty/boost-Subset/boost/type_traits/detail/is_function_ptr_helper.hpp new file mode 100644 index 0000000000..1c3b17f6d2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/detail/is_function_ptr_helper.hpp @@ -0,0 +1,168 @@ + +// Copyright 2000 John Maddock (john@johnmaddock.co.uk) +// Copyright 2002 Aleksey Gurtovoy (agurtovoy@meta-comm.com) +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_TT_DETAIL_IS_FUNCTION_PTR_HELPER_HPP_INCLUDED +#define BOOST_TT_DETAIL_IS_FUNCTION_PTR_HELPER_HPP_INCLUDED + +#include + +#if defined(BOOST_TT_PREPROCESSING_MODE) +# include +# include +# include +#endif + +namespace boost { +namespace type_traits { + +template +struct is_function_ptr_helper +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +#if !defined(BOOST_TT_PREPROCESSING_MODE) +// preprocessor-generated part, don't edit by hand! + +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#else + +#undef BOOST_STATIC_CONSTANT +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (0, 25, "boost/type_traits/detail/is_function_ptr_helper.hpp")) +#include BOOST_PP_ITERATE() + +#endif // BOOST_TT_PREPROCESSING_MODE + +} // namespace type_traits +} // namespace boost + +#endif // BOOST_TT_DETAIL_IS_FUNCTION_PTR_HELPER_HPP_INCLUDED + +///// iteration + +#else +#define BOOST_PP_COUNTER BOOST_PP_FRAME_ITERATION(1) + +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +@#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +@#endif +#undef BOOST_PP_COUNTER +#endif // BOOST_PP_IS_ITERATING diff --git a/ThirdParty/boost-Subset/boost/type_traits/detail/is_function_ptr_tester.hpp b/ThirdParty/boost-Subset/boost/type_traits/detail/is_function_ptr_tester.hpp new file mode 100644 index 0000000000..2eb8a6f47f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/detail/is_function_ptr_tester.hpp @@ -0,0 +1,440 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_TT_DETAIL_IS_FUNCTION_PTR_TESTER_HPP_INCLUDED +#define BOOST_TT_DETAIL_IS_FUNCTION_PTR_TESTER_HPP_INCLUDED + +#include +#include + +#if defined(BOOST_TT_PREPROCESSING_MODE) +# include +# include +# include +#endif + +namespace boost { +namespace type_traits { + +// Note it is acceptable to use ellipsis here, since the argument will +// always be a pointer type of some sort (JM 2005/06/04): +no_type BOOST_TT_DECL is_function_ptr_tester(...); + +#if !defined(BOOST_TT_PREPROCESSING_MODE) +// pre-processed code, don't edit, try GNU cpp with +// cpp -I../../../ -DBOOST_TT_PREPROCESSING_MODE -x c++ -P filename + +template +yes_type is_function_ptr_tester(R (*)()); +template +yes_type is_function_ptr_tester(R (*)( ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)()); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)()); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)()); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0)); +template +yes_type is_function_ptr_tester(R (*)( T0 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); +#endif +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); +template +yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...)); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); +#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); +#endif +#else + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (0, 25, "boost/type_traits/detail/is_function_ptr_tester.hpp")) +#include BOOST_PP_ITERATE() + +#endif // BOOST_TT_PREPROCESSING_MODE + +} // namespace type_traits +} // namespace boost + +#endif // BOOST_TT_DETAIL_IS_FUNCTION_PTR_TESTER_HPP_INCLUDED + +///// iteration + +#else +#define BOOST_PP_COUNTER BOOST_PP_FRAME_ITERATION(1) +#undef __stdcall +#undef __fastcall +#undef __cdecl + +template +yes_type is_function_ptr_tester(R (*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); +@#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R (*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...)); +@#endif +@#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); +@#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); +@#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); +@#endif + +#undef BOOST_PP_COUNTER +#endif // BOOST_PP_IS_ITERATING diff --git a/ThirdParty/boost-Subset/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp b/ThirdParty/boost-Subset/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp new file mode 100644 index 0000000000..bd5c591b20 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp @@ -0,0 +1,713 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_IMPL_HPP_INCLUDED +#define BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_IMPL_HPP_INCLUDED + +#include + +#if defined(BOOST_TT_PREPROCESSING_MODE) +# include +# include +# include +#endif + +namespace boost { +namespace type_traits { + +template +struct is_mem_fun_pointer_impl +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +#if !defined(BOOST_TT_PREPROCESSING_MODE) +// pre-processed code, don't edit, try GNU cpp with +// cpp -I../../../ -DBOOST_TT_PREPROCESSING_MODE -x c++ -P filename + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif + +#else + +#undef BOOST_STATIC_CONSTANT +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (0, 25, "boost/type_traits/detail/is_mem_fun_pointer_impl.hpp")) +#include BOOST_PP_ITERATE() + +#endif // BOOST_TT_PREPROCESSING_MODE + +} // namespace type_traits +} // namespace boost + +#endif // BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_IMPL_HPP_INCLUDED + +///// iteration + +#else +#define BOOST_PP_COUNTER BOOST_PP_FRAME_ITERATION(1) + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +@#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +@#endif + +@#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +@#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +@#endif +@#endif + +#undef BOOST_PP_COUNTER +#endif // BOOST_PP_IS_ITERATING + diff --git a/ThirdParty/boost-Subset/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp b/ThirdParty/boost-Subset/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp new file mode 100644 index 0000000000..334a843450 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp @@ -0,0 +1,1790 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_TESTER_HPP_INCLUDED +#define BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_TESTER_HPP_INCLUDED + +#include +#include + +#if defined(BOOST_TT_PREPROCESSING_MODE) +# include +# include +# include +#endif + +namespace boost { +namespace type_traits { + +no_type BOOST_TT_DECL is_mem_fun_pointer_tester(...); + +#if !defined(BOOST_TT_PREPROCESSING_MODE) +// pre-processed code, don't edit, try GNU cpp with +// cpp -I../../../ -DBOOST_TT_PREPROCESSING_MODE -x c++ -P filename + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)()); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)() const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)() volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)() const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)()); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)() const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)() volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)() const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)()); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)() const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)() volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)() const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)()); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)() const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)() volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)() const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const volatile); + +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const volatile); + +#endif +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const volatile); +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const volatile); + +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const volatile); + +#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const volatile); + +#endif + +#else + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (0, 25, "boost/type_traits/detail/is_mem_fun_pointer_tester.hpp")) +#include BOOST_PP_ITERATE() + +#endif // BOOST_TT_PREPROCESSING_MODE + +} // namespace type_traits +} // namespace boost + +#endif // BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_TESTER_HPP_INCLUDED + +///// iteration + +#else +#define BOOST_PP_COUNTER BOOST_PP_FRAME_ITERATION(1) +#undef __stdcall +#undef __fastcall +#undef __cdecl + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile); + +@#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) const volatile); +@#endif +@#ifdef BOOST_TT_TEST_MS_FUNC_SIGS // Other calling conventions used by MS compatible compilers: +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile); + +@#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile); + +@#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile); + +@#endif + +#undef BOOST_PP_COUNTER +#endif // BOOST_PP_IS_ITERATING diff --git a/ThirdParty/boost-Subset/boost/type_traits/detail/size_t_trait_def.hpp b/ThirdParty/boost-Subset/boost/type_traits/detail/size_t_trait_def.hpp new file mode 100644 index 0000000000..8cea9b4522 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/detail/size_t_trait_def.hpp @@ -0,0 +1,51 @@ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// $Source$ +// $Date$ +// $Revision$ + +#include +#include +#include +#include + +#include + +// Obsolete. Remove. +#define BOOST_TT_AUX_SIZE_T_BASE(C) public ::boost::integral_constant +#define BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) /**/ + + +#define BOOST_TT_AUX_SIZE_T_TRAIT_DEF1(trait,T,C) \ +template< typename T > struct trait \ + : public ::boost::integral_constant \ +{ \ +public:\ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \ +}; \ +\ +BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \ +/**/ + +#define BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1(trait,spec,C) \ +template<> struct trait \ + : public ::boost::integral_constant \ +{ \ +public:\ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(spec)) \ +}; \ +/**/ + +#define BOOST_TT_AUX_SIZE_T_TRAIT_PARTIAL_SPEC1_1(param,trait,spec,C) \ +template< param > struct trait \ + : public ::boost::integral_constant \ +{ \ +}; \ +/**/ diff --git a/ThirdParty/boost-Subset/boost/type_traits/detail/size_t_trait_undef.hpp b/ThirdParty/boost-Subset/boost/type_traits/detail/size_t_trait_undef.hpp new file mode 100644 index 0000000000..1694fac772 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/detail/size_t_trait_undef.hpp @@ -0,0 +1,16 @@ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// $Source$ +// $Date$ +// $Revision$ + +#undef BOOST_TT_AUX_SIZE_T_TRAIT_DEF1 +#undef BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1 +#undef BOOST_TT_AUX_SIZE_T_TRAIT_PARTIAL_SPEC1_1 diff --git a/ThirdParty/boost-Subset/boost/type_traits/detail/template_arity_spec.hpp b/ThirdParty/boost-Subset/boost/type_traits/detail/template_arity_spec.hpp new file mode 100644 index 0000000000..fe9b422e83 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/detail/template_arity_spec.hpp @@ -0,0 +1,31 @@ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include +#include +#include + +#if defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) \ + && defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION) +# define BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(i, name) \ +namespace mpl { namespace aux { \ +template< BOOST_MPL_PP_PARAMS(i, typename T) > \ +struct template_arity< \ + name< BOOST_MPL_PP_PARAMS(i, T) > \ + > \ + : int_ \ +{ \ +}; \ +}} \ +/**/ +#else +# define BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(i, name) /**/ +#endif diff --git a/ThirdParty/boost-Subset/boost/type_traits/detail/type_trait_def.hpp b/ThirdParty/boost-Subset/boost/type_traits/detail/type_trait_def.hpp new file mode 100644 index 0000000000..bc54696b55 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/detail/type_trait_def.hpp @@ -0,0 +1,67 @@ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// $Source$ +// $Date$ +// $Revision$ + +#include +#include + +#define BOOST_TT_AUX_TYPE_TRAIT_DEF1(trait,T,result) \ +template< typename T > struct trait \ +{ \ +public:\ + typedef result type; \ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \ +}; \ +\ +BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \ +/**/ + +#define BOOST_TT_AUX_TYPE_TRAIT_SPEC1(trait,spec,result) \ +template<> struct trait \ +{ \ +public:\ + typedef result type; \ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(spec)) \ +}; \ +/**/ + +#define BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(trait,spec,result) \ +template<> struct trait##_impl \ +{ \ +public:\ + typedef result type; \ +}; \ +/**/ + +#define BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(param,trait,spec,result) \ +template< param > struct trait \ +{ \ +public:\ + typedef result type; \ +}; \ +/**/ + +#define BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(param1,param2,trait,spec,result) \ +template< param1, param2 > struct trait \ +{ \ +public:\ + typedef result; \ +}; \ +/**/ + +#define BOOST_TT_AUX_TYPE_TRAIT_IMPL_PARTIAL_SPEC1_1(param,trait,spec,result) \ +template< param > struct trait##_impl \ +{ \ +public:\ + typedef result type; \ +}; \ +/**/ diff --git a/ThirdParty/boost-Subset/boost/type_traits/detail/type_trait_undef.hpp b/ThirdParty/boost-Subset/boost/type_traits/detail/type_trait_undef.hpp new file mode 100644 index 0000000000..d8edf66275 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/detail/type_trait_undef.hpp @@ -0,0 +1,19 @@ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// $Source$ +// $Date$ +// $Revision$ + +#undef BOOST_TT_AUX_TYPE_TRAIT_DEF1 +#undef BOOST_TT_AUX_TYPE_TRAIT_SPEC1 +#undef BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1 +#undef BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1 +#undef BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2 +#undef BOOST_TT_AUX_TYPE_TRAIT_IMPL_PARTIAL_SPEC1_1 diff --git a/ThirdParty/boost-Subset/boost/type_traits/detail/yes_no_type.hpp b/ThirdParty/boost-Subset/boost/type_traits/detail/yes_no_type.hpp new file mode 100644 index 0000000000..f583730220 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/detail/yes_no_type.hpp @@ -0,0 +1,26 @@ + +// (C) Copyright John Maddock and Steve Cleary 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. +// +// macros and helpers for working with integral-constant-expressions. + +#ifndef BOOST_TT_DETAIL_YES_NO_TYPE_HPP_INCLUDED +#define BOOST_TT_DETAIL_YES_NO_TYPE_HPP_INCLUDED + +namespace boost { +namespace type_traits { + +typedef char yes_type; +struct no_type +{ + char padding[8]; +}; + +} // namespace type_traits +} // namespace boost + +#endif // BOOST_TT_DETAIL_YES_NO_TYPE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/function_traits.hpp b/ThirdParty/boost-Subset/boost/type_traits/function_traits.hpp new file mode 100644 index 0000000000..26d7e05c5f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/function_traits.hpp @@ -0,0 +1,174 @@ + +// Copyright 2000 John Maddock (john@johnmaddock.co.uk) +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_FUNCTION_TRAITS_HPP_INCLUDED +#define BOOST_TT_FUNCTION_TRAITS_HPP_INCLUDED + +#include +#include +#include + +namespace boost { + +namespace detail { + +template struct function_traits_helper; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 0); + typedef R result_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 1); + typedef R result_type; + typedef T1 arg1_type; + typedef T1 argument_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 2); + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T1 first_argument_type; + typedef T2 second_argument_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 3); + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 4); + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 5); + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 6); + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 7); + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; + typedef T7 arg7_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 8); + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; + typedef T7 arg7_type; + typedef T8 arg8_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 9); + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; + typedef T7 arg7_type; + typedef T8 arg8_type; + typedef T9 arg9_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 10); + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; + typedef T7 arg7_type; + typedef T8 arg8_type; + typedef T9 arg9_type; + typedef T10 arg10_type; +}; + +} // end namespace detail + +template +struct function_traits : + public boost::detail::function_traits_helper::type> +{ +}; + +} + +#endif // BOOST_TT_FUNCTION_TRAITS_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/has_left_shift.hpp b/ThirdParty/boost-Subset/boost/type_traits/has_left_shift.hpp new file mode 100644 index 0000000000..88205d9939 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/has_left_shift.hpp @@ -0,0 +1,49 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_LEFT_SHIFT_HPP_INCLUDED +#define BOOST_TT_HAS_LEFT_SHIFT_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_left_shift +#define BOOST_TT_TRAIT_OP << +#define BOOST_TT_FORBIDDEN_IF\ + ::boost::type_traits::ice_or<\ + /* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\ + ::boost::type_traits::ice_and<\ + ::boost::is_fundamental< Lhs_nocv >::value,\ + ::boost::is_fundamental< Rhs_nocv >::value,\ + ::boost::type_traits::ice_or<\ + ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value,\ + ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\ + >::value\ + >::value,\ + /* Lhs==fundamental and Rhs==pointer */\ + ::boost::type_traits::ice_and<\ + ::boost::is_fundamental< Lhs_nocv >::value,\ + ::boost::is_pointer< Rhs_noref >::value\ + >::value,\ + /* Rhs==fundamental and Lhs==pointer */\ + ::boost::type_traits::ice_and<\ + ::boost::is_fundamental< Rhs_nocv >::value,\ + ::boost::is_pointer< Lhs_noref >::value\ + >::value,\ + /* Lhs==pointer and Rhs==pointer */\ + ::boost::type_traits::ice_and<\ + ::boost::is_pointer< Lhs_noref >::value,\ + ::boost::is_pointer< Rhs_noref >::value\ + >::value\ + >::value + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/ThirdParty/boost-Subset/boost/type_traits/has_minus.hpp b/ThirdParty/boost-Subset/boost/type_traits/has_minus.hpp new file mode 100644 index 0000000000..cc1d06b5c3 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/has_minus.hpp @@ -0,0 +1,60 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_MINUS_HPP_INCLUDED +#define BOOST_TT_HAS_MINUS_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_minus +#define BOOST_TT_TRAIT_OP - +#define BOOST_TT_FORBIDDEN_IF\ + ::boost::type_traits::ice_or<\ + /* Lhs==pointer and Rhs==fundamental and Rhs!=integral */\ + ::boost::type_traits::ice_and<\ + ::boost::is_pointer< Lhs_noref >::value,\ + ::boost::is_fundamental< Rhs_nocv >::value,\ + ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\ + >::value,\ + /* Lhs==void* and (Rhs==fundamental or Rhs==pointer) */\ + ::boost::type_traits::ice_and<\ + ::boost::is_pointer< Lhs_noref >::value,\ + ::boost::is_void< Lhs_noptr >::value,\ + ::boost::type_traits::ice_or<\ + ::boost::is_fundamental< Rhs_nocv >::value,\ + ::boost::is_pointer< Rhs_noref >::value\ + >::value\ + >::value,\ + /* Rhs==void* and (Lhs==fundamental or Lhs==pointer) */\ + ::boost::type_traits::ice_and<\ + ::boost::is_pointer< Rhs_noref >::value,\ + ::boost::is_void< Rhs_noptr >::value,\ + ::boost::type_traits::ice_or<\ + ::boost::is_fundamental< Lhs_nocv >::value,\ + ::boost::is_pointer< Lhs_noref >::value\ + >::value\ + >::value,\ + /* Lhs=fundamental and Rhs=pointer */\ + ::boost::type_traits::ice_and<\ + ::boost::is_fundamental< Lhs_nocv >::value,\ + ::boost::is_pointer< Rhs_noref >::value\ + >::value,\ + /* two different pointers */\ + ::boost::type_traits::ice_and<\ + ::boost::is_pointer< Lhs_noref >::value,\ + ::boost::is_pointer< Rhs_noref >::value,\ + ::boost::type_traits::ice_not< ::boost::is_same< Lhs_nocv, Rhs_nocv >::value >::value\ + >::value\ + >::value + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/ThirdParty/boost-Subset/boost/type_traits/has_minus_assign.hpp b/ThirdParty/boost-Subset/boost/type_traits/has_minus_assign.hpp new file mode 100644 index 0000000000..84ba3594d6 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/has_minus_assign.hpp @@ -0,0 +1,65 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_MINUS_ASSIGN_HPP_INCLUDED +#define BOOST_TT_HAS_MINUS_ASSIGN_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_minus_assign +#define BOOST_TT_TRAIT_OP -= +#define BOOST_TT_FORBIDDEN_IF\ + ::boost::type_traits::ice_or<\ + /* Lhs==pointer and Rhs==fundamental and Rhs!=integral */\ + ::boost::type_traits::ice_and<\ + ::boost::is_pointer< Lhs_noref >::value,\ + ::boost::is_fundamental< Rhs_nocv >::value,\ + ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\ + >::value,\ + /* Lhs==void* and Rhs==fundamental */\ + ::boost::type_traits::ice_and<\ + ::boost::is_pointer< Lhs_noref >::value,\ + ::boost::is_void< Lhs_noptr >::value,\ + ::boost::is_fundamental< Rhs_nocv >::value\ + >::value,\ + /* Rhs==void* and Lhs==fundamental */\ + ::boost::type_traits::ice_and<\ + ::boost::is_pointer< Rhs_noref >::value,\ + ::boost::is_void< Rhs_noptr >::value,\ + ::boost::is_fundamental< Lhs_nocv >::value\ + >::value,\ + /* Lhs=fundamental and Rhs=pointer */\ + ::boost::type_traits::ice_and<\ + ::boost::is_fundamental< Lhs_nocv >::value,\ + ::boost::is_pointer< Rhs_noref >::value\ + >::value,\ + /* Lhs==pointer and Rhs==pointer */\ + ::boost::type_traits::ice_and<\ + ::boost::is_pointer< Lhs_noref >::value,\ + ::boost::is_pointer< Rhs_noref >::value\ + >::value,\ + /* (Lhs==fundamental or Lhs==pointer) and (Rhs==fundamental or Rhs==pointer) and (Lhs==const) */\ + ::boost::type_traits::ice_and<\ + ::boost::type_traits::ice_or<\ + ::boost::is_fundamental< Lhs_nocv >::value,\ + ::boost::is_pointer< Lhs_noref >::value\ + >::value,\ + ::boost::type_traits::ice_or<\ + ::boost::is_fundamental< Rhs_nocv >::value,\ + ::boost::is_pointer< Rhs_noref >::value\ + >::value,\ + ::boost::is_const< Lhs_noref >::value\ + >::value\ + >::value + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/ThirdParty/boost-Subset/boost/type_traits/has_nothrow_assign.hpp b/ThirdParty/boost-Subset/boost/type_traits/has_nothrow_assign.hpp new file mode 100644 index 0000000000..83e59687a0 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/has_nothrow_assign.hpp @@ -0,0 +1,44 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED +#define BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED + +#include + +// should be the last #include +#include + +namespace boost { + +namespace detail{ + +template +struct has_nothrow_assign_imp{ +#ifndef BOOST_HAS_NOTHROW_ASSIGN + BOOST_STATIC_CONSTANT(bool, value = ::boost::has_trivial_assign::value); +#else + BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_NOTHROW_ASSIGN(T)); +#endif +}; + +} + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_assign,T,::boost::detail::has_nothrow_assign_imp::value) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_assign,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_assign,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_assign,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_assign,void volatile,false) +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/has_nothrow_constructor.hpp b/ThirdParty/boost-Subset/boost/type_traits/has_nothrow_constructor.hpp new file mode 100644 index 0000000000..3bc4f802c2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/has_nothrow_constructor.hpp @@ -0,0 +1,53 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_NOTHROW_CONSTRUCTOR_HPP_INCLUDED +#define BOOST_TT_HAS_NOTHROW_CONSTRUCTOR_HPP_INCLUDED + +#include + +// should be the last #include +#include + +namespace boost { + +namespace detail{ + +template +struct has_nothrow_constructor_imp{ +#ifdef BOOST_HAS_NOTHROW_CONSTRUCTOR + BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_NOTHROW_CONSTRUCTOR(T)); +#else + BOOST_STATIC_CONSTANT(bool, value = ::boost::has_trivial_constructor::value); +#endif +}; + +} + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_constructor,T,::boost::detail::has_nothrow_constructor_imp::value) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_default_constructor,T,::boost::detail::has_nothrow_constructor_imp::value) + +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_constructor,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_constructor,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_constructor,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_constructor,void volatile,false) +#endif + +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_default_constructor,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_default_constructor,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_default_constructor,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_default_constructor,void volatile,false) +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_HAS_NOTHROW_CONSTRUCTOR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/has_nothrow_copy.hpp b/ThirdParty/boost-Subset/boost/type_traits/has_nothrow_copy.hpp new file mode 100644 index 0000000000..9c3c9030a4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/has_nothrow_copy.hpp @@ -0,0 +1,53 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_NOTHROW_COPY_HPP_INCLUDED +#define BOOST_TT_HAS_NOTHROW_COPY_HPP_INCLUDED + +#include + +// should be the last #include +#include + +namespace boost { + +namespace detail{ + +template +struct has_nothrow_copy_imp{ +#ifdef BOOST_HAS_NOTHROW_COPY + BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_NOTHROW_COPY(T)); +#else + BOOST_STATIC_CONSTANT(bool, value = ::boost::has_trivial_copy::value); +#endif +}; + +} + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_copy,T,::boost::detail::has_nothrow_copy_imp::value) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_copy_constructor,T,::boost::detail::has_nothrow_copy_imp::value) + +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy,void volatile,false) +#endif + +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy_constructor,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy_constructor,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy_constructor,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy_constructor,void volatile,false) +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_HAS_NOTHROW_COPY_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/has_plus.hpp b/ThirdParty/boost-Subset/boost/type_traits/has_plus.hpp new file mode 100644 index 0000000000..70c12008f4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/has_plus.hpp @@ -0,0 +1,54 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_PLUS_HPP_INCLUDED +#define BOOST_TT_HAS_PLUS_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_plus +#define BOOST_TT_TRAIT_OP + +#define BOOST_TT_FORBIDDEN_IF\ + ::boost::type_traits::ice_or<\ + /* Lhs==pointer and Rhs==pointer */\ + ::boost::type_traits::ice_and<\ + ::boost::is_pointer< Lhs_noref >::value,\ + ::boost::is_pointer< Rhs_noref >::value\ + >::value,\ + /* Lhs==void* and Rhs==fundamental */\ + ::boost::type_traits::ice_and<\ + ::boost::is_pointer< Lhs_noref >::value,\ + ::boost::is_void< Lhs_noptr >::value,\ + ::boost::is_fundamental< Rhs_nocv >::value\ + >::value,\ + /* Rhs==void* and Lhs==fundamental */\ + ::boost::type_traits::ice_and<\ + ::boost::is_pointer< Rhs_noref >::value,\ + ::boost::is_void< Rhs_noptr >::value,\ + ::boost::is_fundamental< Lhs_nocv >::value\ + >::value,\ + /* Lhs==pointer and Rhs==fundamental and Rhs!=integral */\ + ::boost::type_traits::ice_and<\ + ::boost::is_pointer< Lhs_noref >::value,\ + ::boost::is_fundamental< Rhs_nocv >::value,\ + ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\ + >::value,\ + /* Rhs==pointer and Lhs==fundamental and Lhs!=integral */\ + ::boost::type_traits::ice_and<\ + ::boost::is_pointer< Rhs_noref >::value,\ + ::boost::is_fundamental< Lhs_nocv >::value,\ + ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value\ + >::value\ + >::value + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/ThirdParty/boost-Subset/boost/type_traits/has_plus_assign.hpp b/ThirdParty/boost-Subset/boost/type_traits/has_plus_assign.hpp new file mode 100644 index 0000000000..6d65204dcf --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/has_plus_assign.hpp @@ -0,0 +1,66 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_PLUS_ASSIGN_HPP_INCLUDED +#define BOOST_TT_HAS_PLUS_ASSIGN_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_plus_assign +#define BOOST_TT_TRAIT_OP += +#define BOOST_TT_FORBIDDEN_IF\ + ::boost::type_traits::ice_or<\ + /* Lhs==pointer and Rhs==pointer */\ + ::boost::type_traits::ice_and<\ + ::boost::is_pointer< Lhs_noref >::value,\ + ::boost::is_pointer< Rhs_noref >::value\ + >::value,\ + /* Lhs==void* and Rhs==fundamental */\ + ::boost::type_traits::ice_and<\ + ::boost::is_pointer< Lhs_noref >::value,\ + ::boost::is_void< Lhs_noptr >::value,\ + ::boost::is_fundamental< Rhs_nocv >::value\ + >::value,\ + /* Rhs==void* and Lhs==fundamental */\ + ::boost::type_traits::ice_and<\ + ::boost::is_pointer< Rhs_noref >::value,\ + ::boost::is_void< Rhs_noptr >::value,\ + ::boost::is_fundamental< Lhs_nocv >::value\ + >::value,\ + /* Lhs==pointer and Rhs==fundamental and Rhs!=integral */\ + ::boost::type_traits::ice_and<\ + ::boost::is_pointer< Lhs_noref >::value,\ + ::boost::is_fundamental< Rhs_nocv >::value,\ + ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\ + >::value,\ + /* Rhs==pointer and Lhs==fundamental and Lhs!=bool */\ + ::boost::type_traits::ice_and<\ + ::boost::is_pointer< Rhs_noref >::value,\ + ::boost::is_fundamental< Lhs_nocv >::value,\ + ::boost::type_traits::ice_not< ::boost::is_same< Lhs_nocv, bool >::value >::value\ + >::value,\ + /* (Lhs==fundamental or Lhs==pointer) and (Rhs==fundamental or Rhs==pointer) and (Lhs==const) */\ + ::boost::type_traits::ice_and<\ + ::boost::type_traits::ice_or<\ + ::boost::is_fundamental< Lhs_nocv >::value,\ + ::boost::is_pointer< Lhs_noref >::value\ + >::value,\ + ::boost::type_traits::ice_or<\ + ::boost::is_fundamental< Rhs_nocv >::value,\ + ::boost::is_pointer< Rhs_noref >::value\ + >::value,\ + ::boost::is_const< Lhs_noref >::value\ + >::value\ + >::value + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/ThirdParty/boost-Subset/boost/type_traits/has_right_shift.hpp b/ThirdParty/boost-Subset/boost/type_traits/has_right_shift.hpp new file mode 100644 index 0000000000..5735870159 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/has_right_shift.hpp @@ -0,0 +1,49 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_RIGHT_SHIFT_HPP_INCLUDED +#define BOOST_TT_HAS_RIGHT_SHIFT_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_right_shift +#define BOOST_TT_TRAIT_OP >> +#define BOOST_TT_FORBIDDEN_IF\ + ::boost::type_traits::ice_or<\ + /* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\ + ::boost::type_traits::ice_and<\ + ::boost::is_fundamental< Lhs_nocv >::value,\ + ::boost::is_fundamental< Rhs_nocv >::value,\ + ::boost::type_traits::ice_or<\ + ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value,\ + ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\ + >::value\ + >::value,\ + /* Lhs==fundamental and Rhs==pointer */\ + ::boost::type_traits::ice_and<\ + ::boost::is_fundamental< Lhs_nocv >::value,\ + ::boost::is_pointer< Rhs_noref >::value\ + >::value,\ + /* Rhs==fundamental and Lhs==pointer */\ + ::boost::type_traits::ice_and<\ + ::boost::is_fundamental< Rhs_nocv >::value,\ + ::boost::is_pointer< Lhs_noref >::value\ + >::value,\ + /* Lhs==pointer and Rhs==pointer */\ + ::boost::type_traits::ice_and<\ + ::boost::is_pointer< Lhs_noref >::value,\ + ::boost::is_pointer< Rhs_noref >::value\ + >::value\ + >::value + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/ThirdParty/boost-Subset/boost/type_traits/has_trivial_assign.hpp b/ThirdParty/boost-Subset/boost/type_traits/has_trivial_assign.hpp new file mode 100644 index 0000000000..404b62c70d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/has_trivial_assign.hpp @@ -0,0 +1,57 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED +#define BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include + +// should be the last #include +#include + +namespace boost { + +namespace detail { + +template +struct has_trivial_assign_impl +{ +#ifdef BOOST_HAS_TRIVIAL_ASSIGN + BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_TRIVIAL_ASSIGN(T)); +#else + BOOST_STATIC_CONSTANT(bool, value = + (::boost::type_traits::ice_and< + ::boost::is_pod::value, + ::boost::type_traits::ice_not< ::boost::is_const::value >::value, + ::boost::type_traits::ice_not< ::boost::is_volatile::value >::value + >::value)); +#endif +}; + +} // namespace detail + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_assign,T,::boost::detail::has_trivial_assign_impl::value) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_assign,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_assign,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_assign,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_assign,void volatile,false) +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/has_trivial_constructor.hpp b/ThirdParty/boost-Subset/boost/type_traits/has_trivial_constructor.hpp new file mode 100644 index 0000000000..30dbdd8f93 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/has_trivial_constructor.hpp @@ -0,0 +1,51 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_TRIVIAL_CONSTRUCTOR_HPP_INCLUDED +#define BOOST_TT_HAS_TRIVIAL_CONSTRUCTOR_HPP_INCLUDED + +#include +#include +#include +#include + +// should be the last #include +#include + +namespace boost { + +namespace detail { + +template +struct has_trivial_ctor_impl +{ +#ifdef BOOST_HAS_TRIVIAL_CONSTRUCTOR + BOOST_STATIC_CONSTANT(bool, value = + (::boost::type_traits::ice_or< + ::boost::is_pod::value, + BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) + >::value)); +#else + BOOST_STATIC_CONSTANT(bool, value = + (::boost::type_traits::ice_or< + ::boost::is_pod::value, + false + >::value)); +#endif +}; + +} // namespace detail + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_constructor,T,::boost::detail::has_trivial_ctor_impl::value) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_default_constructor,T,::boost::detail::has_trivial_ctor_impl::value) + +} // namespace boost + +#include + +#endif // BOOST_TT_HAS_TRIVIAL_CONSTRUCTOR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/has_trivial_copy.hpp b/ThirdParty/boost-Subset/boost/type_traits/has_trivial_copy.hpp new file mode 100644 index 0000000000..1c567cf042 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/has_trivial_copy.hpp @@ -0,0 +1,82 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED +#define BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include + +#ifdef __clang__ +#include +#endif + +// should be the last #include +#include + +namespace boost { + +namespace detail { + +template +struct has_trivial_copy_impl +{ +#ifdef BOOST_HAS_TRIVIAL_COPY +# ifdef __clang__ + BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_TRIVIAL_COPY(T) && boost::is_copy_constructible::value); +# else + BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_TRIVIAL_COPY(T)); +# endif +#else + BOOST_STATIC_CONSTANT(bool, value = + (::boost::type_traits::ice_and< + ::boost::is_pod::value, + ::boost::type_traits::ice_not< ::boost::is_volatile::value >::value + >::value)); +#endif +}; + +#ifdef __clang__ + +template +struct has_trivial_copy_impl +{ + static const bool value = has_trivial_copy_impl::value; +}; + +#endif + +} // namespace detail + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_copy,T,::boost::detail::has_trivial_copy_impl::value) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_copy_constructor,T,::boost::detail::has_trivial_copy_impl::value) + +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy,void volatile,false) +#endif + +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy_constructor,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy_constructor,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy_constructor,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy_constructor,void volatile,false) +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/has_trivial_destructor.hpp b/ThirdParty/boost-Subset/boost/type_traits/has_trivial_destructor.hpp new file mode 100644 index 0000000000..79d7522fdc --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/has_trivial_destructor.hpp @@ -0,0 +1,49 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED +#define BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED + +#include +#include +#include +#include + +// should be the last #include +#include + +namespace boost { + +namespace detail { + +template +struct has_trivial_dtor_impl +{ +#ifdef BOOST_HAS_TRIVIAL_DESTRUCTOR + BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_TRIVIAL_DESTRUCTOR(T)); +#else + BOOST_STATIC_CONSTANT(bool, value = ::boost::is_pod::value); +#endif +}; + +} // namespace detail + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_destructor,T,::boost::detail::has_trivial_dtor_impl::value) + +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_destructor,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_destructor,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_destructor,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_destructor,void volatile,false) +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/has_trivial_move_assign.hpp b/ThirdParty/boost-Subset/boost/type_traits/has_trivial_move_assign.hpp new file mode 100644 index 0000000000..db337f77e8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/has_trivial_move_assign.hpp @@ -0,0 +1,57 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// (C) Copyright Eric Friedman 2002-2003. +// (C) Copyright Antony Polukhin 2013. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_TRIVIAL_MOVE_ASSIGN_HPP_INCLUDED +#define BOOST_TT_HAS_TRIVIAL_MOVE_ASSIGN_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include + +// should be the last #include +#include + +namespace boost { + +namespace detail { + +template +struct has_trivial_move_assign_impl +{ +#ifdef BOOST_HAS_TRIVIAL_MOVE_ASSIGN + BOOST_STATIC_CONSTANT(bool, value = (BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T))); +#else + BOOST_STATIC_CONSTANT(bool, value = + (::boost::type_traits::ice_and< + ::boost::is_pod::value, + ::boost::type_traits::ice_not< ::boost::is_const::value >::value, + ::boost::type_traits::ice_not< ::boost::is_volatile::value >::value + >::value)); +#endif +}; + +} // namespace detail + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_move_assign,T,::boost::detail::has_trivial_move_assign_impl::value) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_assign,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_assign,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_assign,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_assign,void volatile,false) +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_HAS_TRIVIAL_MOVE_ASSIGN_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/has_trivial_move_constructor.hpp b/ThirdParty/boost-Subset/boost/type_traits/has_trivial_move_constructor.hpp new file mode 100644 index 0000000000..a3418340b4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/has_trivial_move_constructor.hpp @@ -0,0 +1,57 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// (C) Copyright Eric Friedman 2002-2003. +// (C) Copyright Antony Polukhin 2013. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED +#define BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include + +// should be the last #include +#include + +namespace boost { + +namespace detail { + +template +struct has_trivial_move_ctor_impl +{ +#ifdef BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR + BOOST_STATIC_CONSTANT(bool, value = (BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T))); +#else + BOOST_STATIC_CONSTANT(bool, value = + (::boost::type_traits::ice_and< + ::boost::is_pod::value, + ::boost::type_traits::ice_not< ::boost::is_volatile::value >::value + >::value)); +#endif +}; + +} // namespace detail + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_move_constructor,T,::boost::detail::has_trivial_move_ctor_impl::value) + +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_constructor,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_constructor,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_constructor,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_constructor,void volatile,false) +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/ice.hpp b/ThirdParty/boost-Subset/boost/type_traits/ice.hpp new file mode 100644 index 0000000000..134bc4bb76 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/ice.hpp @@ -0,0 +1,20 @@ + +// (C) Copyright John Maddock and Steve Cleary 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. +// +// macros and helpers for working with integral-constant-expressions. + +#ifndef BOOST_TT_ICE_HPP_INCLUDED +#define BOOST_TT_ICE_HPP_INCLUDED + +#include +#include +#include +#include +#include + +#endif // BOOST_TT_ICE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/integral_constant.hpp b/ThirdParty/boost-Subset/boost/type_traits/integral_constant.hpp new file mode 100644 index 0000000000..c6847715e0 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/integral_constant.hpp @@ -0,0 +1,39 @@ +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_TYPE_TRAITS_INTEGRAL_CONSTANT_HPP +#define BOOST_TYPE_TRAITS_INTEGRAL_CONSTANT_HPP + +#include +#include +#include + +namespace boost{ + +#if defined(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS) || defined(__BORLANDC__) +template +#else +template +#endif +struct integral_constant : public mpl::integral_c +{ + typedef integral_constant type; +}; + +template<> struct integral_constant : public mpl::true_ +{ + typedef integral_constant type; +}; +template<> struct integral_constant : public mpl::false_ +{ + typedef integral_constant type; +}; + +typedef integral_constant true_type; +typedef integral_constant false_type; + +} + +#endif diff --git a/ThirdParty/boost-Subset/boost/type_traits/integral_promotion.hpp b/ThirdParty/boost-Subset/boost/type_traits/integral_promotion.hpp new file mode 100644 index 0000000000..9c5514b115 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/integral_promotion.hpp @@ -0,0 +1,194 @@ +// Copyright 2005 Alexander Nasonov. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef FILE_boost_type_traits_integral_promotion_hpp_INCLUDED +#define FILE_boost_type_traits_integral_promotion_hpp_INCLUDED + +#include + +#include +#include +#include +#include +#include +#include +#include + +// Should be the last #include +#include + +namespace boost { + +namespace type_traits { namespace detail { + +// 4.5/2 +template struct need_promotion : public boost::is_enum {}; + +// 4.5/1 +template<> struct need_promotion : public true_type {}; +template<> struct need_promotion : public true_type {}; +template<> struct need_promotion : public true_type {}; +template<> struct need_promotion : public true_type {}; +template<> struct need_promotion : public true_type {}; + + +// Specializations for non-standard types. +// Type is promoted if it's smaller then int. + +#define BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(T) \ + template<> struct need_promotion \ + : public integral_constant {}; + +// Same set of integral types as in boost/type_traits/is_integral.hpp. +// Please, keep in sync. +#if (defined(BOOST_INTEL_CXX_VERSION) && defined(_MSC_VER) && (BOOST_INTEL_CXX_VERSION <= 600)) \ + || (defined(__BORLANDC__) && (__BORLANDC__ == 0x600) && (_MSC_VER < 1300)) +// TODO: common macro for this #if. Or better yet, PP SEQ of non-standard types. +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(__int8 ) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(unsigned __int8 ) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(__int16 ) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(unsigned __int16) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(__int32 ) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(unsigned __int32) +#ifdef __BORLANDC__ +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(unsigned __int64) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE( __int64) +#endif +#endif + +#if defined(BOOST_HAS_LONG_LONG) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(boost::ulong_long_type) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(boost::long_long_type ) +#elif defined(BOOST_HAS_MS_INT64) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(unsigned __int64) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE( __int64) +#endif + +#undef BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE + + +#ifndef BOOST_NO_INTRINSIC_WCHAR_T +// 4.5/2 +template<> struct need_promotion : public true_type {}; +#endif + +// 4.5/3 (integral bit-field) is not supported. + +// 4.5/4 +template<> struct need_promotion : public true_type {}; + + +// Get promoted type by index and cv qualifiers. + +template struct promote_from_index; + +#define BOOST_TT_AUX_PROMOTE_FROM_INDEX(N,T) \ + template<> struct promote_from_index { typedef T type; }; \ + template<> struct promote_from_index { typedef T volatile type; }; \ + template<> struct promote_from_index { typedef T const type; }; \ + template<> struct promote_from_index { typedef T const volatile type; }; + + +BOOST_TT_AUX_PROMOTE_FROM_INDEX(1, int ) +BOOST_TT_AUX_PROMOTE_FROM_INDEX(2, unsigned int ) +BOOST_TT_AUX_PROMOTE_FROM_INDEX(3, long ) +BOOST_TT_AUX_PROMOTE_FROM_INDEX(4, unsigned long) + + +// WARNING: integral promotions to non-standard types +// long long and __int64 are not defined by the standard. +// Additional specialisations and overloads shouldn't +// introduce ambiguity, though. + +#if defined(BOOST_HAS_LONG_LONG) +BOOST_TT_AUX_PROMOTE_FROM_INDEX(5, boost::long_long_type ) +BOOST_TT_AUX_PROMOTE_FROM_INDEX(6, boost::ulong_long_type) +#elif defined(BOOST_HAS_MS_INT64) +BOOST_TT_AUX_PROMOTE_FROM_INDEX(7, __int64 ) +BOOST_TT_AUX_PROMOTE_FROM_INDEX(8, unsigned __int64) +#endif + +#undef BOOST_TT_AUX_PROMOTE_FROM_INDEX + + +// Define BOOST_TT_AUX_PROMOTED_INDEX_TESTER: +#if !defined(BOOST_MSVC) + +template +struct sized_type_for_promotion +{ + typedef char (&type)[N]; +}; + +#define BOOST_TT_AUX_PROMOTED_INDEX_TESTER(I,T) \ + sized_type_for_promotion::type promoted_index_tester(T); + +#else + +#define BOOST_TT_AUX_PROMOTED_INDEX_TESTER(I,T) \ + char (&promoted_index_tester(T))[I]; + +#endif + +BOOST_TT_AUX_PROMOTED_INDEX_TESTER(1, int ) +BOOST_TT_AUX_PROMOTED_INDEX_TESTER(2, unsigned int ) +BOOST_TT_AUX_PROMOTED_INDEX_TESTER(3, long ) +BOOST_TT_AUX_PROMOTED_INDEX_TESTER(4, unsigned long) + +#if defined(BOOST_HAS_LONG_LONG) +BOOST_TT_AUX_PROMOTED_INDEX_TESTER(5, boost::long_long_type ) +BOOST_TT_AUX_PROMOTED_INDEX_TESTER(6, boost::ulong_long_type) +#elif defined(BOOST_HAS_MS_INT64) +BOOST_TT_AUX_PROMOTED_INDEX_TESTER(7, __int64 ) +BOOST_TT_AUX_PROMOTED_INDEX_TESTER(8, unsigned __int64) +#endif + +#undef BOOST_TT_AUX_PROMOTED_INDEX_TESTER + + +// Get an index of promoted type for type T. +// Precondition: need_promotion +template +struct promoted_index +{ + static T testee; // undefined + BOOST_STATIC_CONSTANT(int, value = sizeof(promoted_index_tester(+testee)) ); + // Unary plus promotes testee LOOK HERE ---> ^ +}; + +template +struct integral_promotion_impl +{ + typedef BOOST_DEDUCED_TYPENAME promote_from_index< + (boost::type_traits::detail::promoted_index::value) + , (boost::is_const::value) + , (boost::is_volatile::value) + >::type type; +}; + +template +struct integral_promotion + : public boost::mpl::eval_if< + need_promotion::type> + , integral_promotion_impl + , boost::mpl::identity + > +{ +}; + +} } + +BOOST_TT_AUX_TYPE_TRAIT_DEF1( + integral_promotion + , T + , BOOST_DEDUCED_TYPENAME + boost::type_traits::detail::integral_promotion::type + ) +} + +#include + +#endif // #ifndef FILE_boost_type_traits_integral_promotion_hpp_INCLUDED + diff --git a/ThirdParty/boost-Subset/boost/type_traits/intrinsics.hpp b/ThirdParty/boost-Subset/boost/type_traits/intrinsics.hpp new file mode 100644 index 0000000000..e8a87b04e4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/intrinsics.hpp @@ -0,0 +1,348 @@ +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_INTRINSICS_HPP_INCLUDED +#define BOOST_TT_INTRINSICS_HPP_INCLUDED + +#ifndef BOOST_TT_CONFIG_HPP_INCLUDED +#include +#endif + +// +// Helper macros for builtin compiler support. +// If your compiler has builtin support for any of the following +// traits concepts, then redefine the appropriate macros to pick +// up on the compiler support: +// +// (these should largely ignore cv-qualifiers) +// BOOST_IS_UNION(T) should evaluate to true if T is a union type +// BOOST_IS_POD(T) should evaluate to true if T is a POD type +// BOOST_IS_EMPTY(T) should evaluate to true if T is an empty class type (and not a union) +// BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) should evaluate to true if "T x;" has no effect +// BOOST_HAS_TRIVIAL_COPY(T) should evaluate to true if T(t) <==> memcpy +// BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) should evaluate to true if T(boost::move(t)) <==> memcpy +// BOOST_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy +// BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) should evaluate to true if t = boost::move(u) <==> memcpy +// BOOST_HAS_TRIVIAL_DESTRUCTOR(T) should evaluate to true if ~T() has no effect +// BOOST_HAS_NOTHROW_CONSTRUCTOR(T) should evaluate to true if "T x;" can not throw +// BOOST_HAS_NOTHROW_COPY(T) should evaluate to true if T(t) can not throw +// BOOST_HAS_NOTHROW_ASSIGN(T) should evaluate to true if t = u can not throw +// BOOST_HAS_VIRTUAL_DESTRUCTOR(T) should evaluate to true T has a virtual destructor +// BOOST_IS_NOTHROW_MOVE_CONSTRUCT(T) should evaluate to true if T has a non-throwing move constructor. +// BOOST_IS_NOTHROW_MOVE_ASSIGN(T) should evaluate to true if T has a non-throwing move assignment operator. +// +// The following can also be defined: when detected our implementation is greatly simplified. +// +// BOOST_IS_ABSTRACT(T) true if T is an abstract type +// BOOST_IS_BASE_OF(T,U) true if T is a base class of U +// BOOST_IS_CLASS(T) true if T is a class type (and not a union) +// BOOST_IS_CONVERTIBLE(T,U) true if T is convertible to U +// BOOST_IS_ENUM(T) true is T is an enum +// BOOST_IS_POLYMORPHIC(T) true if T is a polymorphic type +// BOOST_ALIGNMENT_OF(T) should evaluate to the alignment requirements of type T. + +#ifdef BOOST_HAS_SGI_TYPE_TRAITS + // Hook into SGI's __type_traits class, this will pick up user supplied + // specializations as well as SGI - compiler supplied specializations. +# include +# ifdef __NetBSD__ + // There are two different versions of type_traits.h on NetBSD on Spark + // use an implicit include via algorithm instead, to make sure we get + // the same version as the std lib: +# include +# else +# include +# endif +# define BOOST_IS_POD(T) ::boost::is_same< typename ::__type_traits::is_POD_type, ::__true_type>::value +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) ::boost::is_same< typename ::__type_traits::has_trivial_default_constructor, ::__true_type>::value +# define BOOST_HAS_TRIVIAL_COPY(T) ::boost::is_same< typename ::__type_traits::has_trivial_copy_constructor, ::__true_type>::value +# define BOOST_HAS_TRIVIAL_ASSIGN(T) ::boost::is_same< typename ::__type_traits::has_trivial_assignment_operator, ::__true_type>::value +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) ::boost::is_same< typename ::__type_traits::has_trivial_destructor, ::__true_type>::value + +# ifdef __sgi +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +# endif +#endif + +#if defined(__MSL_CPP__) && (__MSL_CPP__ >= 0x8000) + // Metrowerks compiler is acquiring intrinsic type traits support + // post version 8. We hook into the published interface to pick up + // user defined specializations as well as compiler intrinsics as + // and when they become available: +# include +# define BOOST_IS_UNION(T) BOOST_STD_EXTENSION_NAMESPACE::is_union::value +# define BOOST_IS_POD(T) BOOST_STD_EXTENSION_NAMESPACE::is_POD::value +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_default_ctor::value +# define BOOST_HAS_TRIVIAL_COPY(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_copy_ctor::value +# define BOOST_HAS_TRIVIAL_ASSIGN(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_assignment::value +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_dtor::value +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + +#if (defined(BOOST_MSVC) && defined(BOOST_MSVC_FULL_VER) && (BOOST_MSVC_FULL_VER >=140050215))\ + || (defined(BOOST_INTEL) && defined(_MSC_VER) && (_MSC_VER >= 1500)) +# include +# include + +# define BOOST_IS_UNION(T) __is_union(T) +# define BOOST_IS_POD(T) (__is_pod(T) && __has_trivial_constructor(T)) +# define BOOST_IS_EMPTY(T) __is_empty(T) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) +# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T)|| ( ::boost::is_pod::value && !::boost::is_volatile::value)) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) || ( ::boost::is_pod::value && ! ::boost::is_const::value && !::boost::is_volatile::value)) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) || ::boost::is_pod::value) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) || ::boost::has_trivial_constructor::value) +# define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) || ::boost::has_trivial_copy::value) +# define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) || ::boost::has_trivial_assign::value) +# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) + +# define BOOST_IS_ABSTRACT(T) __is_abstract(T) +# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) +# define BOOST_IS_CLASS(T) __is_class(T) +# define BOOST_IS_CONVERTIBLE(T,U) ((__is_convertible_to(T,U) || (is_same::value && !is_function::value)) && !__is_abstract(U)) +# define BOOST_IS_ENUM(T) __is_enum(T) +// This one doesn't quite always do the right thing: +// # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) +// This one fails if the default alignment has been changed with /Zp: +// # define BOOST_ALIGNMENT_OF(T) __alignof(T) + +# if defined(_MSC_VER) && (_MSC_VER >= 1700) +# define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) ((__has_trivial_move_constructor(T) || __is_pod(T)) && !::boost::is_volatile::value && !::boost::is_reference::value) +# define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) ((__has_trivial_move_assign(T) || __is_pod(T)) && ! ::boost::is_const::value && !::boost::is_volatile::value && !::boost::is_reference::value) +# endif +#if _MSC_FULL_VER >= 180020827 +# define BOOST_IS_NOTHROW_MOVE_ASSIGN(T) (__is_nothrow_assignable(T&, T&&)) +# define BOOST_IS_NOTHROW_MOVE_CONSTRUCT(T) (__is_nothrow_constructible(T, T&&)) +#endif +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + +#if defined(__DMC__) && (__DMC__ >= 0x848) +// For Digital Mars C++, www.digitalmars.com +# define BOOST_IS_UNION(T) (__typeinfo(T) & 0x400) +# define BOOST_IS_POD(T) (__typeinfo(T) & 0x800) +# define BOOST_IS_EMPTY(T) (__typeinfo(T) & 0x1000) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__typeinfo(T) & 0x10) +# define BOOST_HAS_TRIVIAL_COPY(T) (__typeinfo(T) & 0x20) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__typeinfo(T) & 0x40) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__typeinfo(T) & 0x8) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__typeinfo(T) & 0x80) +# define BOOST_HAS_NOTHROW_COPY(T) (__typeinfo(T) & 0x100) +# define BOOST_HAS_NOTHROW_ASSIGN(T) (__typeinfo(T) & 0x200) +# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) (__typeinfo(T) & 0x4) +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + +#if defined(BOOST_CLANG) && defined(__has_feature) && !defined(__CUDACC__) +// +// Note that these intrinsics are disabled for the CUDA meta-compiler as it appears +// to not support them, even though the underlying clang compiler does so. +// This is a rubbish fix as it basically stops type traits from working correctly, +// but maybe the best we can do for now. See https://svn.boost.org/trac/boost/ticket/10694 +// +# include +# include +# include +# include + +# if __has_feature(is_union) +# define BOOST_IS_UNION(T) __is_union(T) +# endif +# if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_pod) +# define BOOST_IS_POD(T) __is_pod(T) +# endif +# if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_empty) +# define BOOST_IS_EMPTY(T) __is_empty(T) +# endif +# if __has_feature(has_trivial_constructor) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) +# endif +# if __has_feature(has_trivial_copy) +# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference::value && !is_volatile::value) +# endif +# if __has_feature(has_trivial_assign) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile::value) +# endif +# if __has_feature(has_trivial_destructor) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T) +# endif +# if __has_feature(has_nothrow_constructor) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T) +# endif +# if __has_feature(has_nothrow_copy) +# define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) && !is_volatile::value && !is_reference::value) +# endif +# if __has_feature(has_nothrow_assign) +# define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile::value) +# endif +# if __has_feature(has_virtual_destructor) +# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) +# endif +# if __has_feature(is_abstract) +# define BOOST_IS_ABSTRACT(T) __is_abstract(T) +# endif +# if __has_feature(is_base_of) +# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) +# endif +# if __has_feature(is_class) +# define BOOST_IS_CLASS(T) __is_class(T) +# endif +# if __has_feature(is_convertible_to) +# define BOOST_IS_CONVERTIBLE(T,U) __is_convertible_to(T,U) +# endif +# if __has_feature(is_enum) +# define BOOST_IS_ENUM(T) __is_enum(T) +# endif +# if __has_feature(is_polymorphic) +# define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) +# endif +# if __has_feature(has_trivial_move_constructor) +# define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) __has_trivial_move_constructor(T) +# endif +# if __has_feature(has_trivial_move_assign) +# define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) __has_trivial_move_assign(T) +# endif +# define BOOST_ALIGNMENT_OF(T) __alignof(T) +# if __has_feature(is_final) +# define BOOST_IS_FINAL(T) __is_final(T) +# endif + +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + +#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) && !defined(__GCCXML__))) && !defined(BOOST_CLANG) +# include +# include +# include + +#ifdef BOOST_INTEL +# define BOOST_INTEL_TT_OPTS || is_pod::value +#else +# define BOOST_INTEL_TT_OPTS +#endif + +# define BOOST_IS_UNION(T) __is_union(T) +# define BOOST_IS_POD(T) __is_pod(T) +# define BOOST_IS_EMPTY(T) __is_empty(T) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) ((__has_trivial_constructor(T) BOOST_INTEL_TT_OPTS) && ! ::boost::is_volatile::value) +# define BOOST_HAS_TRIVIAL_COPY(T) ((__has_trivial_copy(T) BOOST_INTEL_TT_OPTS) && !is_reference::value && ! ::boost::is_volatile::value) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) ((__has_trivial_assign(T) BOOST_INTEL_TT_OPTS) && ! ::boost::is_volatile::value && ! ::boost::is_const::value) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) BOOST_INTEL_TT_OPTS) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) BOOST_INTEL_TT_OPTS) +# define BOOST_HAS_NOTHROW_COPY(T) ((__has_nothrow_copy(T) BOOST_INTEL_TT_OPTS) && !is_volatile::value && !is_reference::value) +# define BOOST_HAS_NOTHROW_ASSIGN(T) ((__has_nothrow_assign(T) BOOST_INTEL_TT_OPTS) && !is_volatile::value && !is_const::value) +# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) + +# define BOOST_IS_ABSTRACT(T) __is_abstract(T) +# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) +# define BOOST_IS_CLASS(T) __is_class(T) +# define BOOST_IS_ENUM(T) __is_enum(T) +# define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) +# if (!defined(unix) && !defined(__unix__)) || defined(__LP64__) + // GCC sometimes lies about alignment requirements + // of type double on 32-bit unix platforms, use the + // old implementation instead in that case: +# define BOOST_ALIGNMENT_OF(T) __alignof__(T) +# endif +# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) +# define BOOST_IS_FINAL(T) __is_final(T) +# endif + +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + +#if defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130) +# include +# include +# include + +# define BOOST_IS_UNION(T) __oracle_is_union(T) +# define BOOST_IS_POD(T) __oracle_is_pod(T) +# define BOOST_IS_EMPTY(T) __oracle_is_empty(T) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__oracle_has_trivial_constructor(T) && ! ::boost::is_volatile::value) +# define BOOST_HAS_TRIVIAL_COPY(T) (__oracle_has_trivial_copy(T) && !is_reference::value && ! ::boost::is_volatile::value) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) ((__oracle_has_trivial_assign(T) || __oracle_is_trivial(T)) && ! ::boost::is_volatile::value && ! ::boost::is_const::value) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) __oracle_has_trivial_destructor(T) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__oracle_has_nothrow_constructor(T) || __oracle_has_trivial_constructor(T) || __oracle_is_trivial(T)) +# define BOOST_HAS_NOTHROW_COPY(T) ((__oracle_has_nothrow_copy(T) || __oracle_has_trivial_copy(T) || __oracle_is_trivial(T)) && !is_volatile::value && !is_reference::value) +# define BOOST_HAS_NOTHROW_ASSIGN(T) ((__oracle_has_nothrow_assign(T) || __oracle_has_trivial_assign(T) || __oracle_is_trivial(T)) && !is_volatile::value && !is_const::value) +# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __oracle_has_virtual_destructor(T) + +# define BOOST_IS_ABSTRACT(T) __oracle_is_abstract(T) +//# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) +# define BOOST_IS_CLASS(T) __oracle_is_class(T) +# define BOOST_IS_ENUM(T) __oracle_is_enum(T) +# define BOOST_IS_POLYMORPHIC(T) __oracle_is_polymorphic(T) +# define BOOST_ALIGNMENT_OF(T) __alignof__(T) +# define BOOST_IS_FINAL(T) __oracle_is_final(T) + +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + +#if defined(__ghs__) && (__GHS_VERSION_NUMBER >= 600) +# include +# include +# include + +# define BOOST_IS_UNION(T) __is_union(T) +# define BOOST_IS_POD(T) __is_pod(T) +# define BOOST_IS_EMPTY(T) __is_empty(T) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) +# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference::value && !is_volatile::value) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile::value) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T) +# define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) && !is_volatile::value && !is_reference::value) +# define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile::value) +# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) + +# define BOOST_IS_ABSTRACT(T) __is_abstract(T) +# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) +# define BOOST_IS_CLASS(T) __is_class(T) +# define BOOST_IS_ENUM(T) __is_enum(T) +# define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) +# define BOOST_ALIGNMENT_OF(T) __alignof__(T) +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + +# if defined(__CODEGEARC__) +# include +# include +# include +# include + +# define BOOST_IS_UNION(T) __is_union(T) +# define BOOST_IS_POD(T) __is_pod(T) +# define BOOST_IS_EMPTY(T) __is_empty(T) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__has_trivial_default_constructor(T)) +# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy_constructor(T) && !is_volatile::value && !is_reference::value) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile::value) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T)) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_default_constructor(T)) +# define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy_constructor(T) && !is_volatile::value && !is_reference::value) +# define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile::value) +# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) + +# define BOOST_IS_ABSTRACT(T) __is_abstract(T) +# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_void::value && !is_void::value) +# define BOOST_IS_CLASS(T) __is_class(T) +# define BOOST_IS_CONVERTIBLE(T,U) (__is_convertible(T,U) || is_void::value) +# define BOOST_IS_ENUM(T) __is_enum(T) +# define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) +# define BOOST_ALIGNMENT_OF(T) alignof(T) + +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + +#endif // BOOST_TT_INTRINSICS_HPP_INCLUDED + + + + + + + diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_abstract.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_abstract.hpp new file mode 100644 index 0000000000..f1cd92c67c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_abstract.hpp @@ -0,0 +1,153 @@ +#ifndef BOOST_TT_IS_ABSTRACT_CLASS_HPP +#define BOOST_TT_IS_ABSTRACT_CLASS_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// is_abstract_class.hpp: +// +// (C) Copyright 2002 Rani Sharoni (rani_sharoni@hotmail.com) and Robert Ramey +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org for updates, documentation, and revision history. +// + +// Compile type discovery whether given type is abstract class or not. +// +// Requires DR 337 to be supported by compiler +// (http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#337). +// +// +// Believed (Jan 2004) to work on: +// - GCC 3.4 +// - VC++ 7.1 +// - compilers with new EDG frontend (Intel C++ 7, Comeau 4.3.2) +// +// Doesn't work on: +// - VC++6, VC++7.0 and less +// - GCC 3.3.X and less +// - Borland C++ 6 and less +// +// +// History: +// - Originally written by Rani Sharoni, see +// http://groups.google.com/groups?selm=df893da6.0207110613.75b2fe90%40posting.google.com +// At this time supported by EDG (Intel C++ 7, Comeau 4.3.2) and VC7.1. +// - Adapted and added into Boost.Serialization library by Robert Ramey +// (starting with submission #10). +// - Jan 2004: GCC 3.4 fixed to support DR337 (Giovanni Bajo). +// - Jan 2004: modified to be part of Boost.TypeTraits (Pavel Vozenilek). +// - Nov 2004: Christoph Ludwig found that the implementation did not work with +// template types and gcc-3.4 or VC7.1, fix due to Christoph Ludwig +// and John Maddock. +// - Dec 2004: Added new config macro BOOST_NO_IS_ABSTRACT which causes the template +// to degrade gracefully, rather than trash the compiler (John Maddock). +// + +#include +#ifndef BOOST_IS_ABSTRACT +#include +#include +#include +#include +#ifdef BOOST_NO_IS_ABSTRACT +#include +#endif +#endif +// should be the last #include +#include + + +namespace boost { +namespace detail{ + +#ifdef BOOST_IS_ABSTRACT +template +struct is_abstract_imp +{ + BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_ABSTRACT(T)); +}; +#elif !defined(BOOST_NO_IS_ABSTRACT) +template +struct is_abstract_imp2 +{ + // Deduction fails if T is void, function type, + // reference type (14.8.2/2)or an abstract class type + // according to review status issue #337 + // + template + static type_traits::no_type check_sig(U (*)[1]); + template + static type_traits::yes_type check_sig(...); + // + // T must be a complete type, further if T is a template then + // it must be instantiated in order for us to get the right answer: + // + BOOST_STATIC_ASSERT(sizeof(T) != 0); + + // GCC2 won't even parse this template if we embed the computation + // of s1 in the computation of value. +#ifdef __GNUC__ + BOOST_STATIC_CONSTANT(std::size_t, s1 = sizeof(is_abstract_imp2::template check_sig(0))); +#else +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +#pragma warning(push) +#pragma warning(disable:6334) +#endif + BOOST_STATIC_CONSTANT(std::size_t, s1 = sizeof(check_sig(0))); +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +#pragma warning(pop) +#endif +#endif + + BOOST_STATIC_CONSTANT(bool, value = + (s1 == sizeof(type_traits::yes_type))); +}; + +template +struct is_abstract_select +{ + template + struct rebind + { + typedef is_abstract_imp2 type; + }; +}; +template <> +struct is_abstract_select +{ + template + struct rebind + { + typedef false_type type; + }; +}; + +template +struct is_abstract_imp +{ + typedef is_abstract_select< ::boost::is_class::value> selector; + typedef typename selector::template rebind binder; + typedef typename binder::type type; + + BOOST_STATIC_CONSTANT(bool, value = type::value); +}; + +#endif +} + +#ifndef BOOST_NO_IS_ABSTRACT +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_abstract,T,::boost::detail::is_abstract_imp::value) +#else +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_abstract,T,::boost::detail::is_polymorphic_imp::value) +#endif + +} // namespace boost + +#include + +#endif //BOOST_TT_IS_ABSTRACT_CLASS_HPP diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_arithmetic.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_arithmetic.hpp new file mode 100644 index 0000000000..a1d8c46d5f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_arithmetic.hpp @@ -0,0 +1,51 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED +#define BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED + +#if !defined( __CODEGEARC__ ) +#include +#include +#include +#include +#endif + +// should be the last #include +#include + +namespace boost { + +#if !defined(__CODEGEARC__) +namespace detail { + +template< typename T > +struct is_arithmetic_impl +{ + BOOST_STATIC_CONSTANT(bool, value = + (::boost::type_traits::ice_or< + ::boost::is_integral::value, + ::boost::is_float::value + >::value)); +}; + +} // namespace detail +#endif + +//* is a type T an arithmetic type described in the standard (3.9.1p8) +#if defined(__CODEGEARC__) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_arithmetic,T,__is_arithmetic(T)) +#else +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_arithmetic,T,::boost::detail::is_arithmetic_impl::value) +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_array.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_array.hpp new file mode 100644 index 0000000000..c381ca4e70 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_array.hpp @@ -0,0 +1,50 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +// Some fixes for is_array are based on a newsgroup posting by Jonathan Lundquist. + + +#ifndef BOOST_TT_IS_ARRAY_HPP_INCLUDED +#define BOOST_TT_IS_ARRAY_HPP_INCLUDED + +#include + + +#include + +// should be the last #include +#include + +namespace boost { + +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_array,T,__is_array(T)) +#else +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_array,T,false) +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,is_array,T[N],true) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,is_array,T const[N],true) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,is_array,T volatile[N],true) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,is_array,T const volatile[N],true) +#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_array,T[],true) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_array,T const[],true) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_array,T volatile[],true) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_array,T const volatile[],true) +#endif +#endif + +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_ARRAY_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_base_and_derived.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_base_and_derived.hpp new file mode 100644 index 0000000000..632b699445 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_base_and_derived.hpp @@ -0,0 +1,252 @@ + +// (C) Copyright Rani Sharoni 2003. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED +#define BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED + +#include +#ifndef BOOST_IS_BASE_OF +#include +#include +#include +#include +#include +#include +#endif +#include + +// should be the last #include +#include + +namespace boost { + +namespace detail { + +#ifndef BOOST_IS_BASE_OF +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581)) \ + && !BOOST_WORKAROUND(__SUNPRO_CC , <= 0x540) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 243) \ + && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) + + // The EDG version number is a lower estimate. + // It is not currently known which EDG version + // exactly fixes the problem. + +/************************************************************************* + +This version detects ambiguous base classes and private base classes +correctly, and was devised by Rani Sharoni. + +Explanation by Terje Slettebo and Rani Sharoni. + +Let's take the multiple base class below as an example, and the following +will also show why there's not a problem with private or ambiguous base +class: + +struct B {}; +struct B1 : B {}; +struct B2 : B {}; +struct D : private B1, private B2 {}; + +is_base_and_derived::value; + +First, some terminology: + +SC - Standard conversion +UDC - User-defined conversion + +A user-defined conversion sequence consists of an SC, followed by an UDC, +followed by another SC. Either SC may be the identity conversion. + +When passing the default-constructed Host object to the overloaded check_sig() +functions (initialization 8.5/14/4/3), we have several viable implicit +conversion sequences: + +For "static no_type check_sig(B const volatile *, int)" we have the conversion +sequences: + +C -> C const (SC - Qualification Adjustment) -> B const volatile* (UDC) +C -> D const volatile* (UDC) -> B1 const volatile* / B2 const volatile* -> + B const volatile* (SC - Conversion) + +For "static yes_type check_sig(D const volatile *, T)" we have the conversion +sequence: + +C -> D const volatile* (UDC) + +According to 13.3.3.1/4, in context of user-defined conversion only the +standard conversion sequence is considered when selecting the best viable +function, so it only considers up to the user-defined conversion. For the +first function this means choosing between C -> C const and C -> C, and it +chooses the latter, because it's a proper subset (13.3.3.2/3/2) of the +former. Therefore, we have: + +C -> D const volatile* (UDC) -> B1 const volatile* / B2 const volatile* -> + B const volatile* (SC - Conversion) +C -> D const volatile* (UDC) + +Here, the principle of the "shortest subsequence" applies again, and it +chooses C -> D const volatile*. This shows that it doesn't even need to +consider the multiple paths to B, or accessibility, as that possibility is +eliminated before it could possibly cause ambiguity or access violation. + +If D is not derived from B, it has to choose between C -> C const -> B const +volatile* for the first function, and C -> D const volatile* for the second +function, which are just as good (both requires a UDC, 13.3.3.2), had it not +been for the fact that "static no_type check_sig(B const volatile *, int)" is +not templated, which makes C -> C const -> B const volatile* the best choice +(13.3.3/1/4), resulting in "no". + +Also, if Host::operator B const volatile* hadn't been const, the two +conversion sequences for "static no_type check_sig(B const volatile *, int)", in +the case where D is derived from B, would have been ambiguous. + +See also +http://groups.google.com/groups?selm=df893da6.0301280859.522081f7%40posting. +google.com and links therein. + +*************************************************************************/ + +template +struct bd_helper +{ + // + // This VC7.1 specific workaround stops the compiler from generating + // an internal compiler error when compiling with /vmg (thanks to + // Aleksey Gurtovoy for figuring out the workaround). + // +#if !BOOST_WORKAROUND(BOOST_MSVC, == 1310) + template + static type_traits::yes_type check_sig(D const volatile *, T); + static type_traits::no_type check_sig(B const volatile *, int); +#else + static type_traits::yes_type check_sig(D const volatile *, long); + static type_traits::no_type check_sig(B const volatile * const&, int); +#endif +}; + +template +struct is_base_and_derived_impl2 +{ +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +#pragma warning(push) +#pragma warning(disable:6334) +#endif + // + // May silently do the wrong thing with incomplete types + // unless we trap them here: + // + BOOST_STATIC_ASSERT(sizeof(B) != 0); + BOOST_STATIC_ASSERT(sizeof(D) != 0); + + struct Host + { +#if !BOOST_WORKAROUND(BOOST_MSVC, == 1310) + operator B const volatile *() const; +#else + operator B const volatile * const&() const; +#endif + operator D const volatile *(); + }; + + BOOST_STATIC_CONSTANT(bool, value = + sizeof(bd_helper::check_sig(Host(), 0)) == sizeof(type_traits::yes_type)); +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +#pragma warning(pop) +#endif +}; + +#else + +// +// broken version: +// +template +struct is_base_and_derived_impl2 +{ + BOOST_STATIC_CONSTANT(bool, value = + (::boost::is_convertible::value)); +}; + +#define BOOST_BROKEN_IS_BASE_AND_DERIVED + +#endif + +template +struct is_base_and_derived_impl3 +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template +struct is_base_and_derived_select +{ + template + struct rebind + { + typedef is_base_and_derived_impl3 type; + }; +}; + +template <> +struct is_base_and_derived_select +{ + template + struct rebind + { + typedef is_base_and_derived_impl2 type; + }; +}; + +template +struct is_base_and_derived_impl +{ + typedef typename remove_cv::type ncvB; + typedef typename remove_cv::type ncvD; + + typedef is_base_and_derived_select< + ::boost::is_class::value, + ::boost::is_class::value, + ::boost::is_same::value> selector; + typedef typename selector::template rebind binder; + typedef typename binder::type bound_type; + + BOOST_STATIC_CONSTANT(bool, value = bound_type::value); +}; +#else +template +struct is_base_and_derived_impl +{ + typedef typename remove_cv::type ncvB; + typedef typename remove_cv::type ncvD; + + BOOST_STATIC_CONSTANT(bool, value = (BOOST_IS_BASE_OF(B,D) && ! ::boost::is_same::value)); +}; +#endif +} // namespace detail + +BOOST_TT_AUX_BOOL_TRAIT_DEF2( + is_base_and_derived + , Base + , Derived + , (::boost::detail::is_base_and_derived_impl::value) + ) + +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_and_derived,Base&,Derived,false) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_and_derived,Base,Derived&,false) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_and_derived,Base&,Derived&,false) + +#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x610)) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename Base,is_base_and_derived,Base,Base,false) +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_base_of.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_base_of.hpp new file mode 100644 index 0000000000..3655b0bd23 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_base_of.hpp @@ -0,0 +1,49 @@ + +// (C) Copyright Rani Sharoni 2003-2005. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_BASE_OF_HPP_INCLUDED +#define BOOST_TT_IS_BASE_OF_HPP_INCLUDED + +#include +#include +#include +#include +#include + +// should be the last #include +#include + +namespace boost { + + namespace detail{ + template + struct is_base_of_imp + { + typedef typename remove_cv::type ncvB; + typedef typename remove_cv::type ncvD; + BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_or< + (::boost::detail::is_base_and_derived_impl::value), + (::boost::type_traits::ice_and< ::boost::is_same::value, ::boost::is_class::value>::value)>::value)); + }; + } + +BOOST_TT_AUX_BOOL_TRAIT_DEF2( + is_base_of + , Base + , Derived + , (::boost::detail::is_base_of_imp::value)) + +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_of,Base&,Derived,false) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_of,Base,Derived&,false) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_of,Base&,Derived&,false) + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_class.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_class.hpp new file mode 100644 index 0000000000..0675b57822 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_class.hpp @@ -0,0 +1,129 @@ +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000-2003. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_IS_CLASS_HPP_INCLUDED +#define BOOST_TT_IS_CLASS_HPP_INCLUDED + +#include +#include +#ifndef BOOST_IS_CLASS +# include +# include +# include + +#ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION +# include +#else +# include +# include +# include +# include +# include +#endif + +#endif // BOOST_IS_CLASS + +#ifdef __EDG_VERSION__ +# include +#endif + +// should be the last #include +#include + +namespace boost { + +namespace detail { + +#ifndef BOOST_IS_CLASS +#ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION + +// This is actually the conforming implementation which works with +// abstract classes. However, enough compilers have trouble with +// it that most will use the one in +// boost/type_traits/object_traits.hpp. This implementation +// actually works with VC7.0, but other interactions seem to fail +// when we use it. + +// is_class<> metafunction due to Paul Mensonides +// (leavings@attbi.com). For more details: +// http://groups.google.com/groups?hl=en&selm=000001c1cc83%24e154d5e0%247772e50c%40c161550a&rnum=1 +#if defined(__GNUC__) && !defined(__EDG_VERSION__) + +template ::boost::type_traits::yes_type is_class_tester(void(U::*)(void)); +template ::boost::type_traits::no_type is_class_tester(...); + +template +struct is_class_impl +{ + + BOOST_STATIC_CONSTANT(bool, value = + (::boost::type_traits::ice_and< + sizeof(is_class_tester(0)) == sizeof(::boost::type_traits::yes_type), + ::boost::type_traits::ice_not< ::boost::is_union::value >::value + >::value) + ); +}; + +#else + +template +struct is_class_impl +{ + template static ::boost::type_traits::yes_type is_class_tester(void(U::*)(void)); + template static ::boost::type_traits::no_type is_class_tester(...); + + BOOST_STATIC_CONSTANT(bool, value = + (::boost::type_traits::ice_and< + sizeof(is_class_tester(0)) == sizeof(::boost::type_traits::yes_type), + ::boost::type_traits::ice_not< ::boost::is_union::value >::value + >::value) + ); +}; + +#endif + +#else + +template +struct is_class_impl +{ + BOOST_STATIC_CONSTANT(bool, value = + (::boost::type_traits::ice_and< + ::boost::type_traits::ice_not< ::boost::is_union::value >::value, + ::boost::type_traits::ice_not< ::boost::is_scalar::value >::value, + ::boost::type_traits::ice_not< ::boost::is_array::value >::value, + ::boost::type_traits::ice_not< ::boost::is_reference::value>::value, + ::boost::type_traits::ice_not< ::boost::is_void::value >::value, + ::boost::type_traits::ice_not< ::boost::is_function::value >::value + >::value)); +}; + +# endif // BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION +# else // BOOST_IS_CLASS +template +struct is_class_impl +{ + BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_CLASS(T)); +}; +# endif // BOOST_IS_CLASS + +} // namespace detail + +# ifdef __EDG_VERSION__ +BOOST_TT_AUX_BOOL_TRAIT_DEF1( + is_class,T, boost::detail::is_class_impl::type>::value) +# else +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_class,T,::boost::detail::is_class_impl::value) +# endif + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_CLASS_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_const.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_const.hpp new file mode 100644 index 0000000000..e3e62b697c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_const.hpp @@ -0,0 +1,90 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Howard Hinnant and John Maddock 2000. +// (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +// Fixed is_pointer, is_reference, is_const, is_volatile, is_same, +// is_member_pointer based on the Simulated Partial Specialization work +// of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or +// http://groups.yahoo.com/group/boost/message/5441 +// Some workarounds in here use ideas suggested from "Generic: +// Mappings between Types and Values" +// by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). + + +#ifndef BOOST_TT_IS_CONST_HPP_INCLUDED +#define BOOST_TT_IS_CONST_HPP_INCLUDED + +#include +#include + +# include +# ifdef __GNUC__ +# include +# endif +# if BOOST_WORKAROUND(BOOST_MSVC, < 1400) +# include +# endif + +// should be the last #include +#include + +namespace boost { + +#if defined( __CODEGEARC__ ) + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,__is_const(T)) + +#else + +namespace detail{ +// +// We can't filter out rvalue_references at the same level as +// references or we get ambiguities from msvc: +// +template +struct is_const_rvalue_filter +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1400) + BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::type*>::is_const); +#else + BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::is_const); +#endif +}; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +template +struct is_const_rvalue_filter +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; +#endif +} + +//* is a type T declared const - is_const +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,::boost::detail::is_const_rvalue_filter::value) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T&,false) + +#if defined(BOOST_ILLEGAL_CV_REFERENCES) +// these are illegal specialisations; cv-qualifies applied to +// references have no effect according to [8.3.2p1], +// C++ Builder requires them though as it treats cv-qualified +// references as distinct types... +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T& const,false) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T& volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T& const volatile,false) +#endif + +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_CONST_HPP_INCLUDED + diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_convertible.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_convertible.hpp new file mode 100644 index 0000000000..a844cecb36 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_convertible.hpp @@ -0,0 +1,494 @@ + +// Copyright 2000 John Maddock (john@johnmaddock.co.uk) +// Copyright 2000 Jeremy Siek (jsiek@lsc.nd.edu) +// Copyright 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi) +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED +#define BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED + +#include +#ifndef BOOST_IS_CONVERTIBLE +#include +#include +#include +#include +#include +#include +#ifndef BOOST_NO_IS_ABSTRACT +#include +#endif +#include +#include +#include + +#if defined(__MWERKS__) +#include +#endif +#if !defined(BOOST_NO_SFINAE_EXPR) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +# include +#endif +#endif // BOOST_IS_CONVERTIBLE + +// should be always the last #include directive +#include + +namespace boost { + +#ifndef BOOST_IS_CONVERTIBLE + +// is one type convertible to another? +// +// there are multiple versions of the is_convertible +// template, almost every compiler seems to require its +// own version. +// +// Thanks to Andrei Alexandrescu for the original version of the +// conversion detection technique! +// + +namespace detail { + +#if !defined(BOOST_NO_SFINAE_EXPR) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + + // This is a C++11 conforming version, place this first and use it wherever possible: + +# define BOOST_TT_CXX11_IS_CONVERTIBLE + + template + struct or_helper + { + static const bool value = (A::value || B::value || C::value); + }; + + template, boost::is_function, boost::is_array >::value> + struct is_convertible_basic_impl + { + // Nothing converts to function or array, but void converts to void: + static const bool value = is_void::value; + }; + + template + class is_convertible_basic_impl + { + typedef char one; + typedef int two; + + template + static void test_aux(To1); + + template + static decltype(test_aux(boost::declval()), one()) test(int); + + template + static two test(...); + + public: + static const bool value = sizeof(test(0)) == 1; + }; + +#elif defined(__BORLANDC__) && (__BORLANDC__ < 0x560) +// +// special version for Borland compilers +// this version breaks when used for some +// UDT conversions: +// +template +struct is_convertible_impl +{ +#pragma option push -w-8074 + // This workaround for Borland breaks the EDG C++ frontend, + // so we only use it for Borland. + template struct checker + { + static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...); + static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(T); + }; + + static typename add_lvalue_reference::type _m_from; + static bool const value = sizeof( checker::_m_check(_m_from) ) + == sizeof(::boost::type_traits::yes_type); +#pragma option pop +}; + +#elif defined(__GNUC__) || defined(__BORLANDC__) && (__BORLANDC__ < 0x600) +// special version for gcc compiler + recent Borland versions +// note that this does not pass UDT's through (...) + +struct any_conversion +{ + template any_conversion(const volatile T&); + template any_conversion(const T&); + template any_conversion(volatile T&); + template any_conversion(T&); +}; + +template struct checker +{ + static boost::type_traits::no_type _m_check(any_conversion ...); + static boost::type_traits::yes_type _m_check(T, int); +}; + +template +struct is_convertible_basic_impl +{ + typedef typename add_lvalue_reference::type lvalue_type; + typedef typename add_rvalue_reference::type rvalue_type; + static lvalue_type _m_from; +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 6))) + static bool const value = + sizeof( boost::detail::checker::_m_check(static_cast(_m_from), 0) ) + == sizeof(::boost::type_traits::yes_type); +#else + static bool const value = + sizeof( boost::detail::checker::_m_check(_m_from, 0) ) + == sizeof(::boost::type_traits::yes_type); +#endif +}; + +#elif (defined(__EDG_VERSION__) && (__EDG_VERSION__ >= 245) && !defined(__ICL)) \ + || defined(__IBMCPP__) || defined(__HP_aCC) +// +// This is *almost* an ideal world implementation as it doesn't rely +// on undefined behaviour by passing UDT's through (...). +// Unfortunately it doesn't quite pass all the tests for most compilers (sigh...) +// Enable this for your compiler if is_convertible_test.cpp will compile it... +// +// Note we do not enable this for VC7.1, because even though it passes all the +// type_traits tests it is known to cause problems when instantiation occurs +// deep within the instantiation tree :-( +// +struct any_conversion +{ + template any_conversion(const volatile T&); + template any_conversion(const T&); + template any_conversion(volatile T&); + // we need this constructor to catch references to functions + // (which can not be cv-qualified): + template any_conversion(T&); +}; + +template +struct is_convertible_basic_impl +{ + static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion ...); + static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int); + typedef typename add_lvalue_reference::type lvalue_type; + typedef typename add_rvalue_reference::type rvalue_type; + static lvalue_type _m_from; + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(static_cast(_m_from), 0) ) == sizeof(::boost::type_traits::yes_type) + ); +#else + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type) + ); +#endif +}; + +#elif defined(__DMC__) + +struct any_conversion +{ + template any_conversion(const volatile T&); + template any_conversion(const T&); + template any_conversion(volatile T&); + // we need this constructor to catch references to functions + // (which can not be cv-qualified): + template any_conversion(T&); +}; + +template +struct is_convertible_basic_impl +{ + // Using '...' doesn't always work on Digital Mars. This version seems to. + template + static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion, float, T); + static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int, int); + typedef typename add_lvalue_reference::type lvalue_type; + typedef typename add_rvalue_reference::type rvalue_type; + static lvalue_type _m_from; + + // Static constants sometime cause the conversion of _m_from to To to be + // called. This doesn't happen with an enum. +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + enum { value = + sizeof( _m_check(static_cast(_m_from), 0, 0) ) == sizeof(::boost::type_traits::yes_type) + }; +#else + enum { value = + sizeof( _m_check(_m_from, 0, 0) ) == sizeof(::boost::type_traits::yes_type) + }; +#endif +}; + +#elif defined(__MWERKS__) +// +// CW works with the technique implemented above for EDG, except when From +// is a function type (or a reference to such a type), in which case +// any_conversion won't be accepted as a valid conversion. We detect this +// exceptional situation and channel it through an alternative algorithm. +// + +template +struct is_convertible_basic_impl_aux; + +struct any_conversion +{ + template any_conversion(const volatile T&); + template any_conversion(const T&); + template any_conversion(volatile T&); + template any_conversion(T&); +}; + +template +struct is_convertible_basic_impl_aux +{ + static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion ...); + static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int); + typedef typename add_lvalue_reference::type lvalue_type; + typedef typename add_rvalue_reference::type rvalue_type; + static lvalue_type _m_from; + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(static_cast(_m_from), 0) ) == sizeof(::boost::type_traits::yes_type) + ); +#else + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type) + ); +#endif +}; + +template +struct is_convertible_basic_impl_aux +{ + static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...); + static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To); + typedef typename add_lvalue_reference::type lvalue_type; + typedef typename add_rvalue_reference::type rvalue_type; + static lvalue_type _m_from; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(static_cast(_m_from)) ) == sizeof(::boost::type_traits::yes_type) + ); +#else + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type) + ); +#endif +}; + +template +struct is_convertible_basic_impl: + is_convertible_basic_impl_aux< + From,To, + ::boost::is_function::type>::value + > +{}; + +#else +// +// This version seems to work pretty well for a wide spectrum of compilers, +// however it does rely on undefined behaviour by passing UDT's through (...). +// +template +struct is_convertible_basic_impl +{ + static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...); + static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To); + typedef typename add_lvalue_reference::type lvalue_type; + typedef typename add_rvalue_reference::type rvalue_type; + static lvalue_type _m_from; +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4244) +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +#pragma warning(disable:6334) +#endif +#endif +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(static_cast(_m_from)) ) == sizeof(::boost::type_traits::yes_type) + ); +#else + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type) + ); +#endif +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif +}; + +#endif // is_convertible_impl + +#if defined(__DMC__) +// As before, a static constant sometimes causes errors on Digital Mars. +template +struct is_convertible_impl +{ + enum { value = + (::boost::type_traits::ice_and< + ::boost::type_traits::ice_or< + ::boost::detail::is_convertible_basic_impl::value, + ::boost::is_void::value + >::value, + ::boost::type_traits::ice_not< + ::boost::is_array::value + >::value, + ::boost::type_traits::ice_not< + ::boost::is_function::value + >::value + >::value) }; +}; +#elif !defined(__BORLANDC__) || __BORLANDC__ > 0x551 +template +struct is_convertible_impl +{ + BOOST_STATIC_CONSTANT(bool, value = + (::boost::type_traits::ice_and< + ::boost::type_traits::ice_or< + ::boost::detail::is_convertible_basic_impl::value, + ::boost::is_void::value + >::value, + ::boost::type_traits::ice_not< + ::boost::is_array::value + >::value, + ::boost::type_traits::ice_not< + ::boost::is_function::value + >::value + >::value) + ); +}; +#endif + +template +struct is_convertible_impl_select +{ + template + struct rebind + { + typedef is_convertible_impl type; + }; +}; + +template <> +struct is_convertible_impl_select +{ + template + struct rebind + { + typedef true_type type; + }; +}; + +template <> +struct is_convertible_impl_select +{ + template + struct rebind + { + typedef false_type type; + }; +}; + +template <> +struct is_convertible_impl_select +{ + template + struct rebind + { + typedef false_type type; + }; +}; + +template +struct is_convertible_impl_dispatch_base +{ +#if !BOOST_WORKAROUND(__HP_aCC, < 60700) + typedef is_convertible_impl_select< + ::boost::is_arithmetic::value, + ::boost::is_arithmetic::value, +#if !defined(BOOST_NO_IS_ABSTRACT) && !defined(BOOST_TT_CXX11_IS_CONVERTIBLE) + // We need to filter out abstract types, only if we don't have a strictly conforming C++11 version: + ::boost::is_abstract::value +#else + false +#endif + > selector; +#else + typedef is_convertible_impl_select selector; +#endif + typedef typename selector::template rebind isc_binder; + typedef typename isc_binder::type type; +}; + +template +struct is_convertible_impl_dispatch + : public is_convertible_impl_dispatch_base::type +{}; + +// +// Now add the full and partial specialisations +// for void types, these are common to all the +// implementation above: +// +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +# define TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1,spec2,value) \ + BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,spec1,spec2,value) \ + BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,spec1,spec2 const,value) \ + BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,spec1,spec2 volatile,value) \ + BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,spec1,spec2 const volatile,value) \ + /**/ + +# define TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2(trait,spec1,spec2,value) \ + TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1,spec2,value) \ + TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1 const,spec2,value) \ + TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1 volatile,spec2,value) \ + TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1 const volatile,spec2,value) \ + /**/ + + TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2(is_convertible,void,void,true) + +# undef TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2 +# undef TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1 + +#else + BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(is_convertible,void,void,true) +#endif // BOOST_NO_CV_VOID_SPECIALIZATIONS + +BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void,To,false) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void const,To,false) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void volatile,To,false) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void const volatile,To,false) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const volatile,false) +#endif + +} // namespace detail + +BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_convertible,From,To,(::boost::detail::is_convertible_impl_dispatch::value)) + +#else + +BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_convertible,From,To,BOOST_IS_CONVERTIBLE(From,To)) + +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_copy_constructible.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_copy_constructible.hpp new file mode 100644 index 0000000000..24f5eebc27 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_copy_constructible.hpp @@ -0,0 +1,125 @@ +// (C) Copyright Antony Polukhin 2013. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_COPY_CONSTRUCTIBLE_HPP_INCLUDED +#define BOOST_TT_IS_COPY_CONSTRUCTIBLE_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include + +// should be the last #include +#include + +namespace boost { + +namespace detail{ + +template +struct is_copy_constructible_impl2 { + +// Intel compiler has problems with SFINAE for copy constructors and deleted functions: +// +// error: function *function_name* cannot be referenced -- it is a deleted function +// static boost::type_traits::yes_type test(T1&, decltype(T1(boost::declval()))* = 0); +// ^ +// +// MSVC 12.0 (Visual 2013) has problems when the copy constructor has been deleted. See: +// https://connect.microsoft.com/VisualStudio/feedback/details/800328/std-is-copy-constructible-is-broken +#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_INTEL_CXX_VERSION) && !(defined(BOOST_MSVC) && _MSC_VER == 1800) + +#ifdef BOOST_NO_CXX11_DECLTYPE + template + static boost::type_traits::yes_type test(T1&, boost::mpl::int_()))>* = 0); +#else + template + static boost::type_traits::yes_type test(T1&, decltype(T1(boost::declval()))* = 0); +#endif + + static boost::type_traits::no_type test(...); +#else + template + static boost::type_traits::no_type test(T1&, typename T1::boost_move_no_copy_constructor_or_assign* = 0); + static boost::type_traits::yes_type test(...); +#endif + + // If you see errors like this: + // + // `'T::T(const T&)' is private` + // `boost/type_traits/is_copy_constructible.hpp:68:5: error: within this context` + // + // then you are trying to call that macro for a structure defined like that: + // + // struct T { + // ... + // private: + // T(const T &); + // ... + // }; + // + // To fix that you must modify your structure: + // + // // C++03 and C++11 version + // struct T: private boost::noncopyable { + // ... + // private: + // T(const T &); + // ... + // }; + // + // // C++11 version + // struct T { + // ... + // private: + // T(const T &) = delete; + // ... + // }; + BOOST_STATIC_CONSTANT(bool, value = ( + sizeof(test( + boost::declval::type>() + )) == sizeof(boost::type_traits::yes_type) + || + boost::is_rvalue_reference::value + )); +}; + +template +struct is_copy_constructible_impl2 { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template +struct is_copy_constructible_impl { + + BOOST_STATIC_CONSTANT(bool, value = ( + boost::detail::is_copy_constructible_impl2< + boost::is_base_and_derived::value, + T + >::value + )); +}; + +} // namespace detail + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_copy_constructible,T,::boost::detail::is_copy_constructible_impl::value) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_copy_constructible,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_copy_constructible,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_copy_constructible,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_copy_constructible,void volatile,false) +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_COPY_CONSTRUCTIBLE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_enum.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_enum.hpp new file mode 100644 index 0000000000..7929c962a5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_enum.hpp @@ -0,0 +1,188 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_IS_ENUM_HPP_INCLUDED +#define BOOST_TT_IS_ENUM_HPP_INCLUDED + +#include +#ifndef BOOST_IS_ENUM +#include +#include +#include +#include +#include +#ifdef __GNUC__ +#include +#endif +#include +#if defined(BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION) +# include +# include +#endif +#endif + +// should be the last #include +#include + +namespace boost { + +#ifndef BOOST_IS_ENUM +#if !(defined(__BORLANDC__) && (__BORLANDC__ <= 0x551)) + +namespace detail { + +#if defined(BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION) + +template +struct is_class_or_union +{ + BOOST_STATIC_CONSTANT(bool, value = + (::boost::type_traits::ice_or< + ::boost::is_class::value + , ::boost::is_union::value + >::value)); +}; + +#else + +template +struct is_class_or_union +{ +# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))// we simply can't detect it this way. + BOOST_STATIC_CONSTANT(bool, value = false); +# else + template static ::boost::type_traits::yes_type is_class_or_union_tester(void(U::*)(void)); + +# if BOOST_WORKAROUND(__MWERKS__, <= 0x3000) // no SFINAE + static ::boost::type_traits::no_type is_class_or_union_tester(...); + BOOST_STATIC_CONSTANT( + bool, value = sizeof(is_class_or_union_tester(0)) == sizeof(::boost::type_traits::yes_type)); +# else + template + static ::boost::type_traits::no_type is_class_or_union_tester(...); + BOOST_STATIC_CONSTANT( + bool, value = sizeof(is_class_or_union_tester(0)) == sizeof(::boost::type_traits::yes_type)); +# endif +# endif +}; +#endif + +struct int_convertible +{ + int_convertible(int); +}; + +// Don't evaluate convertibility to int_convertible unless the type +// is non-arithmetic. This suppresses warnings with GCC. +template +struct is_enum_helper +{ + template struct type + { + BOOST_STATIC_CONSTANT(bool, value = false); + }; +}; + +template <> +struct is_enum_helper +{ + template struct type + : public ::boost::is_convertible::type,::boost::detail::int_convertible> + { + }; +}; + +template struct is_enum_impl +{ + //typedef ::boost::add_reference ar_t; + //typedef typename ar_t::type r_type; + +#if defined(__GNUC__) + +#ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION + + // We MUST check for is_class_or_union on conforming compilers in + // order to correctly deduce that noncopyable types are not enums + // (dwa 2002/04/15)... + BOOST_STATIC_CONSTANT(bool, selector = + (::boost::type_traits::ice_or< + ::boost::is_arithmetic::value + , ::boost::is_reference::value + , ::boost::is_function::value + , is_class_or_union::value + , is_array::value + >::value)); +#else + // ...however, not checking is_class_or_union on non-conforming + // compilers prevents a dependency recursion. + BOOST_STATIC_CONSTANT(bool, selector = + (::boost::type_traits::ice_or< + ::boost::is_arithmetic::value + , ::boost::is_reference::value + , ::boost::is_function::value + , is_array::value + >::value)); +#endif // BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION + +#else // !defined(__GNUC__): + + BOOST_STATIC_CONSTANT(bool, selector = + (::boost::type_traits::ice_or< + ::boost::is_arithmetic::value + , ::boost::is_reference::value + , is_class_or_union::value + , is_array::value + >::value)); + +#endif + +#if BOOST_WORKAROUND(__BORLANDC__, < 0x600) + typedef ::boost::detail::is_enum_helper< + ::boost::detail::is_enum_impl::selector + > se_t; +#else + typedef ::boost::detail::is_enum_helper se_t; +#endif + + typedef typename se_t::template type helper; + BOOST_STATIC_CONSTANT(bool, value = helper::value); +}; + +// these help on compilers with no partial specialization support: +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_enum,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_enum,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_enum,void volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_enum,void const volatile,false) +#endif + +} // namespace detail + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_enum,T,::boost::detail::is_enum_impl::value) + +#else // __BORLANDC__ +// +// buggy is_convertible prevents working +// implementation of is_enum: +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_enum,T,false) + +#endif + +#else // BOOST_IS_ENUM + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_enum,T,BOOST_IS_ENUM(T)) + +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_ENUM_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_float.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_float.hpp new file mode 100644 index 0000000000..25d16f1800 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_float.hpp @@ -0,0 +1,27 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TYPE_TRAITS_IS_FLOAT_HPP_INCLUDED +#define BOOST_TYPE_TRAITS_IS_FLOAT_HPP_INCLUDED + +// should be the last #include +#include + +namespace boost { + +//* is a type T a floating-point type described in the standard (3.9.1p8) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_float,T,false) +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_float,float,true) +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_float,double,true) +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_float,long double,true) + +} // namespace boost + +#include + +#endif // BOOST_TYPE_TRAITS_IS_FLOAT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_floating_point.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_floating_point.hpp new file mode 100644 index 0000000000..2224453054 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_floating_point.hpp @@ -0,0 +1,27 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000-2005. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TYPE_TRAITS_IS_FLOATING_HPP_INCLUDED +#define BOOST_TYPE_TRAITS_IS_FLOATING_HPP_INCLUDED + +// should be the last #include +#include + +namespace boost { + +//* is a type T a floating-point type described in the standard (3.9.1p8) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_floating_point,T,false) +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_floating_point,float,true) +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_floating_point,double,true) +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_floating_point,long double,true) + +} // namespace boost + +#include + +#endif // BOOST_TYPE_TRAITS_IS_FLOAT_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_function.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_function.hpp new file mode 100644 index 0000000000..eeb4382010 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_function.hpp @@ -0,0 +1,109 @@ + +// Copyright 2000 John Maddock (john@johnmaddock.co.uk) +// Copyright 2002 Aleksey Gurtovoy (agurtovoy@meta-comm.com) +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_FUNCTION_HPP_INCLUDED +#define BOOST_TT_IS_FUNCTION_HPP_INCLUDED + +#include +#include +#include + +#if !defined(BOOST_TT_TEST_MS_FUNC_SIGS) +# include +#else +# include +# include +#endif + +// should be the last #include +#include + +// is a type a function? +// Please note that this implementation is unnecessarily complex: +// we could just use !is_convertible::value, +// except that some compilers erroneously allow conversions from +// function pointers to void*. + +namespace boost { + +#if !defined( __CODEGEARC__ ) + +namespace detail { + +#if !defined(BOOST_TT_TEST_MS_FUNC_SIGS) +template +struct is_function_chooser + : public ::boost::type_traits::false_result +{ +}; + +template <> +struct is_function_chooser +{ + template< typename T > struct result_ + : public ::boost::type_traits::is_function_ptr_helper + { + }; +}; + +template +struct is_function_impl + : public is_function_chooser< ::boost::is_reference::value > + ::BOOST_NESTED_TEMPLATE result_ +{ +}; + +#else + +template +struct is_function_impl +{ +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +#pragma warning(push) +#pragma warning(disable:6334) +#endif + static T* t; + BOOST_STATIC_CONSTANT( + bool, value = sizeof(::boost::type_traits::is_function_ptr_tester(t)) + == sizeof(::boost::type_traits::yes_type) + ); +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +#pragma warning(pop) +#endif +}; + +template +struct is_function_impl : public false_type +{}; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +template +struct is_function_impl : public false_type +{}; +#endif + +#endif + +} // namespace detail + +#endif // !defined( __CODEGEARC__ ) + +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_function,T,__is_function(T)) +#else +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_function,T,::boost::detail::is_function_impl::value) +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_function,T&&,false) +#endif +#endif +} // namespace boost + +#include + +#endif // BOOST_TT_IS_FUNCTION_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_fundamental.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_fundamental.hpp new file mode 100644 index 0000000000..138e296887 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_fundamental.hpp @@ -0,0 +1,45 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_FUNDAMENTAL_HPP_INCLUDED +#define BOOST_TT_IS_FUNDAMENTAL_HPP_INCLUDED + +#include +#include +#include + +// should be the last #include +#include + +namespace boost { + +namespace detail { + +template +struct is_fundamental_impl + : public ::boost::type_traits::ice_or< + ::boost::is_arithmetic::value + , ::boost::is_void::value + > +{ +}; + +} // namespace detail + +//* is a type T a fundamental type described in the standard (3.9.1) +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_fundamental,T,__is_fundamental(T)) +#else +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_fundamental,T,::boost::detail::is_fundamental_impl::value) +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_FUNDAMENTAL_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_integral.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_integral.hpp new file mode 100644 index 0000000000..6bfad49d39 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_integral.hpp @@ -0,0 +1,88 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_INTEGRAL_HPP_INCLUDED +#define BOOST_TT_IS_INTEGRAL_HPP_INCLUDED + +#include + +// should be the last #include +#include + +namespace boost { + +//* is a type T an [cv-qualified-] integral type described in the standard (3.9.1p3) +// as an extension we include long long, as this is likely to be added to the +// standard at a later date +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_integral,T,__is_integral(T)) +#else +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_integral,T,false) + +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned char,true) +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned short,true) +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned int,true) +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned long,true) + +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,signed char,true) +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,signed short,true) +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,signed int,true) +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,signed long,true) + +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,bool,true) +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,char,true) + +#ifndef BOOST_NO_INTRINSIC_WCHAR_T +// If the following line fails to compile and you're using the Intel +// compiler, see http://lists.boost.org/MailArchives/boost-users/msg06567.php, +// and define BOOST_NO_INTRINSIC_WCHAR_T on the command line. +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,wchar_t,true) +#endif + +// Same set of integral types as in boost/type_traits/integral_promotion.hpp. +// Please, keep in sync. -- Alexander Nasonov +#if (defined(BOOST_INTEL_CXX_VERSION) && defined(_MSC_VER) && (BOOST_INTEL_CXX_VERSION <= 600)) \ + || (defined(__BORLANDC__) && (__BORLANDC__ == 0x600) && (_MSC_VER < 1300)) +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int8,true) +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int8,true) +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int16,true) +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int16,true) +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int32,true) +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int32,true) +#ifdef __BORLANDC__ +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int64,true) +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int64,true) +#endif +#endif + +# if defined(BOOST_HAS_LONG_LONG) +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral, ::boost::ulong_long_type,true) +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral, ::boost::long_long_type,true) +#elif defined(BOOST_HAS_MS_INT64) +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int64,true) +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int64,true) +#endif + +#ifdef BOOST_HAS_INT128 +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,boost::int128_type,true) +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,boost::uint128_type,true) +#endif +#ifndef BOOST_NO_CXX11_CHAR16_T +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,char16_t,true) +#endif +#ifndef BOOST_NO_CXX11_CHAR32_T +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,char32_t,true) +#endif + +#endif // non-CodeGear implementation + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_INTEGRAL_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_lvalue_reference.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_lvalue_reference.hpp new file mode 100644 index 0000000000..0b0130ab2d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_lvalue_reference.hpp @@ -0,0 +1,56 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Howard Hinnant and John Maddock 2000. +// (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +// Fixed is_pointer, is_lvalue_reference, is_const, is_volatile, is_same, +// is_member_pointer based on the Simulated Partial Specialization work +// of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or +// http://groups.yahoo.com/group/boost/message/5441 +// Some workarounds in here use ideas suggested from "Generic: +// Mappings between Types and Values" +// by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). + + +#ifndef BOOST_TT_IS_LVALUE_REFERENCE_HPP_INCLUDED +#define BOOST_TT_IS_LVALUE_REFERENCE_HPP_INCLUDED + +#include + + +// should be the last #include +#include + +namespace boost { + +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_lvalue_reference,T,__is_reference(T)) +#else + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_lvalue_reference,T,false) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T&,true) + +#if defined(BOOST_ILLEGAL_CV_REFERENCES) +// these are illegal specialisations; cv-qualifies applied to +// references have no effect according to [8.3.2p1], +// C++ Builder requires them though as it treats cv-qualified +// references as distinct types... +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T& const,true) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T& volatile,true) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T& const volatile,true) +#endif + +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED + diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_member_function_pointer.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_member_function_pointer.hpp new file mode 100644 index 0000000000..d1c3690ba7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_member_function_pointer.hpp @@ -0,0 +1,133 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED +#define BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED + +#include +#include + +#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) + // + // Note: we use the "workaround" version for MSVC because it works for + // __stdcall etc function types, where as the partial specialisation + // version does not do so. + // +# include +# include +#else +# include +# include +# include +# include +# include +# include +#endif + +// should be the last #include +#include + +namespace boost { + +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_function_pointer,T,__is_member_function_pointer( T )) +#elif !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) + +BOOST_TT_AUX_BOOL_TRAIT_DEF1( + is_member_function_pointer + , T + , ::boost::type_traits::is_mem_fun_pointer_impl::type>::value + ) + +#else + +namespace detail { + +#ifndef __BORLANDC__ + +template +struct is_mem_fun_pointer_select + : public ::boost::type_traits::false_result +{ +}; + +template <> +struct is_mem_fun_pointer_select +{ + template struct result_ + { +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +#pragma warning(push) +#pragma warning(disable:6334) +#endif + static T* make_t; + typedef result_ self_type; + + BOOST_STATIC_CONSTANT( + bool, value = ( + 1 == sizeof(::boost::type_traits::is_mem_fun_pointer_tester(self_type::make_t)) + )); +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +#pragma warning(pop) +#endif + }; +}; + +template +struct is_member_function_pointer_impl + : public is_mem_fun_pointer_select< + ::boost::type_traits::ice_or< + ::boost::is_reference::value + , ::boost::is_array::value + >::value + >::template result_ +{ +}; + +template +struct is_member_function_pointer_impl : public false_type{}; + +#else // Borland C++ + +template +struct is_member_function_pointer_impl +{ + static T* m_t; + BOOST_STATIC_CONSTANT( + bool, value = + (1 == sizeof(type_traits::is_mem_fun_pointer_tester(m_t))) ); +}; + +template +struct is_member_function_pointer_impl +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +#endif + +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_function_pointer,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_function_pointer,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_function_pointer,void volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_function_pointer,void const volatile,false) +#endif + +} // namespace detail + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_function_pointer,T,::boost::detail::is_member_function_pointer_impl::value) + +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_member_pointer.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_member_pointer.hpp new file mode 100644 index 0000000000..cba31af0c2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_member_pointer.hpp @@ -0,0 +1,65 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Howard Hinnant and John Maddock 2000. +// (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +// Fixed is_pointer, is_reference, is_const, is_volatile, is_same, +// is_member_pointer based on the Simulated Partial Specialization work +// of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or +// http://groups.yahoo.com/group/boost/message/5441 +// Some workarounds in here use ideas suggested from "Generic: +// Mappings between Types and Values" +// by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). + + +#ifndef BOOST_TT_IS_MEMBER_POINTER_HPP_INCLUDED +#define BOOST_TT_IS_MEMBER_POINTER_HPP_INCLUDED + +#include +#include + +#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) +# include +#else +# include +# include +# include +# include +# include +# include +#endif + +// should be the last #include +#include + +namespace boost { + +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,__is_member_pointer(T)) +#elif BOOST_WORKAROUND(__BORLANDC__, < 0x600) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,false) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*,true) + +#else +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,::boost::is_member_function_pointer::value) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*,true) + +#if !BOOST_WORKAROUND(__MWERKS__,<=0x3003) && !BOOST_WORKAROUND(__IBMCPP__, <=600) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*const,true) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*volatile,true) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*const volatile,true) +#endif + +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_MEMBER_POINTER_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_nothrow_move_assignable.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_nothrow_move_assignable.hpp new file mode 100644 index 0000000000..3268307cdf --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_nothrow_move_assignable.hpp @@ -0,0 +1,108 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// (C) Copyright Eric Friedman 2002-2003. +// (C) Copyright Antony Polukhin 2013. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_NOTHROW_MOVE_ASSIGNABLE_HPP_INCLUDED +#define BOOST_TT_IS_NOTHROW_MOVE_ASSIGNABLE_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// should be the last #include +#include + +namespace boost { + +namespace detail{ + +#ifdef BOOST_IS_NOTHROW_MOVE_ASSIGN + +template +struct is_nothrow_move_assignable_imp{ BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_NOTHROW_MOVE_ASSIGN(T)); }; +template +struct is_nothrow_move_assignable_imp{ BOOST_STATIC_CONSTANT(bool, value = false); }; +template +struct is_nothrow_move_assignable_imp{ BOOST_STATIC_CONSTANT(bool, value = false); }; +template +struct is_nothrow_move_assignable_imp{ BOOST_STATIC_CONSTANT(bool, value = false); }; +template +struct is_nothrow_move_assignable_imp{ BOOST_STATIC_CONSTANT(bool, value = false); }; +template +struct is_nothrow_move_assignable_imp{ BOOST_STATIC_CONSTANT(bool, value = false); }; + + +#elif !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) + +template +struct false_or_cpp11_noexcept_move_assignable: public ::boost::false_type {}; + +template +struct false_or_cpp11_noexcept_move_assignable < + T, + typename ::boost::enable_if_c() = ::boost::declval())>::type + > : public ::boost::integral_constant() = ::boost::declval())> +{}; + +template +struct is_nothrow_move_assignable_imp{ + BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::false_or_cpp11_noexcept_move_assignable::value); +}; + +template +struct is_nothrow_move_assignable_imp : public ::boost::false_type {}; +template +struct is_nothrow_move_assignable_imp : public ::boost::false_type{}; +template +struct is_nothrow_move_assignable_imp : public ::boost::false_type{}; +template +struct is_nothrow_move_assignable_imp : public ::boost::false_type{}; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +template +struct is_nothrow_move_assignable_imp : public ::boost::false_type{}; +#endif + +#else + +template +struct is_nothrow_move_assignable_imp{ + BOOST_STATIC_CONSTANT(bool, value = ( + ::boost::type_traits::ice_and< + ::boost::type_traits::ice_or< + ::boost::has_trivial_move_assign::value, + ::boost::has_nothrow_assign::value + >::value, + ::boost::type_traits::ice_not< ::boost::is_array::value >::value + >::value)); +}; + +#endif + +} + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_nothrow_move_assignable,T,::boost::detail::is_nothrow_move_assignable_imp::value) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_assignable,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_assignable,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_assignable,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_assignable,void volatile,false) +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_NOTHROW_MOVE_ASSIGNABLE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_nothrow_move_constructible.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_nothrow_move_constructible.hpp new file mode 100644 index 0000000000..c09d5d1f94 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_nothrow_move_constructible.hpp @@ -0,0 +1,109 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// (C) Copyright Eric Friedman 2002-2003. +// (C) Copyright Antony Polukhin 2013. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP_INCLUDED +#define BOOST_TT_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// should be the last #include +#include + +namespace boost { + +namespace detail{ + +#ifdef BOOST_IS_NOTHROW_MOVE_CONSTRUCT + +template +struct is_nothrow_move_constructible_imp{ + BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_NOTHROW_MOVE_CONSTRUCT(T)); +}; + +template +struct is_nothrow_move_constructible_imp : public ::boost::false_type {}; +template +struct is_nothrow_move_constructible_imp : public ::boost::false_type{}; +template +struct is_nothrow_move_constructible_imp : public ::boost::false_type{}; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +template +struct is_nothrow_move_constructible_imp : public ::boost::false_type{}; +#endif + +#elif !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) + +template +struct false_or_cpp11_noexcept_move_constructible: public ::boost::false_type {}; + +template +struct false_or_cpp11_noexcept_move_constructible < + T, + typename ::boost::enable_if_c()))>::type + > : public ::boost::integral_constant()))> +{}; + +template +struct is_nothrow_move_constructible_imp{ + BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::false_or_cpp11_noexcept_move_constructible::value); +}; + +template +struct is_nothrow_move_constructible_imp : public ::boost::false_type {}; +template +struct is_nothrow_move_constructible_imp : public ::boost::false_type{}; +template +struct is_nothrow_move_constructible_imp : public ::boost::false_type{}; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +template +struct is_nothrow_move_constructible_imp : public ::boost::false_type{}; +#endif + +#else + +template +struct is_nothrow_move_constructible_imp{ + BOOST_STATIC_CONSTANT(bool, value =( + ::boost::type_traits::ice_and< + ::boost::type_traits::ice_or< + ::boost::has_trivial_move_constructor::value, + ::boost::has_nothrow_copy::value + >::value, + ::boost::type_traits::ice_not< ::boost::is_array::value >::value + >::value)); +}; + +#endif + +} + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_nothrow_move_constructible,T,::boost::detail::is_nothrow_move_constructible_imp::value) + +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_constructible,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_constructible,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_constructible,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_constructible,void volatile,false) +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_pod.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_pod.hpp new file mode 100644 index 0000000000..820a3ceeb9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_pod.hpp @@ -0,0 +1,79 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_POD_HPP_INCLUDED +#define BOOST_TT_IS_POD_HPP_INCLUDED + +#include +#include +#include +#include +#include + +#include + +// should be the last #include +#include + +#ifndef BOOST_IS_POD +#define BOOST_INTERNAL_IS_POD(T) false +#else +#define BOOST_INTERNAL_IS_POD(T) BOOST_IS_POD(T) +#endif + +namespace boost { + +// forward declaration, needed by 'is_pod_array_helper' template below +template< typename T > struct is_POD; + +namespace detail { + + +template struct is_pod_impl +{ + BOOST_STATIC_CONSTANT( + bool, value = + (::boost::type_traits::ice_or< + ::boost::is_scalar::value, + ::boost::is_void::value, + BOOST_INTERNAL_IS_POD(T) + >::value)); +}; + +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) +template +struct is_pod_impl + : public is_pod_impl +{ +}; +#endif + + +// the following help compilers without partial specialization support: +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,void,true) + +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,void const,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,void volatile,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,void const volatile,true) +#endif + +} // namespace detail + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pod,T,::boost::detail::is_pod_impl::value) +// is_POD is the old depricated name for this trait, do not use this as it may +// be removed in future without warning!! +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_POD,T,::boost::is_pod::value) + +} // namespace boost + +#include + +#undef BOOST_INTERNAL_IS_POD + +#endif // BOOST_TT_IS_POD_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_pointer.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_pointer.hpp new file mode 100644 index 0000000000..aad30f2541 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_pointer.hpp @@ -0,0 +1,88 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Howard Hinnant and John Maddock 2000. +// (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +// Fixed is_pointer, is_reference, is_const, is_volatile, is_same, +// is_member_pointer based on the Simulated Partial Specialization work +// of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or +// http://groups.yahoo.com/group/boost/message/5441 +// Some workarounds in here use ideas suggested from "Generic: +// Mappings between Types and Values" +// by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). + + +#ifndef BOOST_TT_IS_POINTER_HPP_INCLUDED +#define BOOST_TT_IS_POINTER_HPP_INCLUDED + +#include +#include +#include +#include +#include + + +// should be the last #include +#include + +namespace boost { + +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pointer,T,__is_pointer(T)) +#else + +namespace detail { + +template< typename T > struct is_pointer_helper +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +# define TT_AUX_BOOL_TRAIT_HELPER_PARTIAL_SPEC(helper,sp,result) \ +template< typename T > struct helper \ +{ \ + BOOST_STATIC_CONSTANT(bool, value = result); \ +}; \ +/**/ + +TT_AUX_BOOL_TRAIT_HELPER_PARTIAL_SPEC(is_pointer_helper,T*,true) + +# undef TT_AUX_BOOL_TRAIT_HELPER_PARTIAL_SPEC + +template< typename T > +struct is_pointer_impl +{ + BOOST_STATIC_CONSTANT(bool, value = + (::boost::type_traits::ice_and< + ::boost::detail::is_pointer_helper::type>::value + , ::boost::type_traits::ice_not< + ::boost::is_member_pointer::value + >::value + >::value) + ); +}; + +} // namespace detail + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pointer,T,::boost::detail::is_pointer_impl::value) + +#if defined(__BORLANDC__) && !defined(__COMO__) && (__BORLANDC__ < 0x600) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_pointer,T&,false) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_pointer,T& const,false) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_pointer,T& volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_pointer,T& const volatile,false) +#endif + +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_POINTER_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_polymorphic.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_polymorphic.hpp new file mode 100644 index 0000000000..aac985105d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_polymorphic.hpp @@ -0,0 +1,123 @@ +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_POLYMORPHIC_HPP +#define BOOST_TT_IS_POLYMORPHIC_HPP + +#include +#ifndef BOOST_IS_POLYMORPHIC +#include +#include +#endif +// should be the last #include +#include +#include + +#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1700) +#pragma warning(push) +#pragma warning(disable:4250) +#endif + +namespace boost{ + +#ifndef BOOST_IS_POLYMORPHIC + +namespace detail{ + +template +struct is_polymorphic_imp1 +{ +# if BOOST_WORKAROUND(__MWERKS__, <= 0x2407) // CWPro7 should return false always. + typedef char d1, (&d2)[2]; +# else + typedef typename remove_cv::type ncvT; + struct d1 : public ncvT + { + d1(); +# if !defined(__GNUC__) // this raises warnings with some classes, and buys nothing with GCC + ~d1()throw(); +# endif + char padding[256]; + private: + // keep some picky compilers happy: + d1(const d1&); + d1& operator=(const d1&); + }; + struct d2 : public ncvT + { + d2(); + virtual ~d2()throw(); +# if !defined(BOOST_MSVC) && !defined(__ICL) + // for some reason this messes up VC++ when T has virtual bases, + // probably likewise for compilers that use the same ABI: + struct unique{}; + virtual void unique_name_to_boost5487629(unique*); +# endif + char padding[256]; + private: + // keep some picky compilers happy: + d2(const d2&); + d2& operator=(const d2&); + }; +# endif + BOOST_STATIC_CONSTANT(bool, value = (sizeof(d2) == sizeof(d1))); +}; + +template +struct is_polymorphic_imp2 +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template +struct is_polymorphic_selector +{ + template + struct rebind + { + typedef is_polymorphic_imp2 type; + }; +}; + +template <> +struct is_polymorphic_selector +{ + template + struct rebind + { + typedef is_polymorphic_imp1 type; + }; +}; + +template +struct is_polymorphic_imp +{ + typedef is_polymorphic_selector< ::boost::is_class::value> selector; + typedef typename selector::template rebind binder; + typedef typename binder::type imp_type; + BOOST_STATIC_CONSTANT(bool, value = imp_type::value); +}; + +} // namespace detail + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_polymorphic,T,::boost::detail::is_polymorphic_imp::value) + +#else // BOOST_IS_POLYMORPHIC + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_polymorphic,T,BOOST_IS_POLYMORPHIC(T)) + +#endif + +} // namespace boost + +#include + +#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1700) +#pragma warning(pop) +#endif + +#endif diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_reference.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_reference.hpp new file mode 100644 index 0000000000..49b5f9ff0f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_reference.hpp @@ -0,0 +1,45 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Howard Hinnant and John Maddock 2000, 2010. +// (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_REFERENCE_HPP_INCLUDED +#define BOOST_TT_IS_REFERENCE_HPP_INCLUDED + +#include +#include +#include +#include + +// should be the last #include +#include + +namespace boost { + +namespace detail { + +template +struct is_reference_impl +{ + BOOST_STATIC_CONSTANT(bool, value = + (::boost::type_traits::ice_or< + ::boost::is_lvalue_reference::value, ::boost::is_rvalue_reference::value + >::value)); +}; + +} // namespace detail + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_reference,T,::boost::detail::is_reference_impl::value) + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED + diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_rvalue_reference.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_rvalue_reference.hpp new file mode 100644 index 0000000000..93cd0bf187 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_rvalue_reference.hpp @@ -0,0 +1,29 @@ + +// (C) John Maddock 2010. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_RVALUE_REFERENCE_HPP_INCLUDED +#define BOOST_TT_IS_RVALUE_REFERENCE_HPP_INCLUDED + +#include + +// should be the last #include +#include + +namespace boost { + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_rvalue_reference,T,false) +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_rvalue_reference,T&&,true) +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED + diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_same.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_same.hpp new file mode 100644 index 0000000000..c8987b07a8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_same.hpp @@ -0,0 +1,45 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Howard Hinnant and John Maddock 2000. +// (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +// Fixed is_pointer, is_reference, is_const, is_volatile, is_same, +// is_member_pointer based on the Simulated Partial Specialization work +// of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or +// http://groups.yahoo.com/group/boost/message/5441 +// Some workarounds in here use ideas suggested from "Generic: +// Mappings between Types and Values" +// by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). + + +#ifndef BOOST_TT_IS_SAME_HPP_INCLUDED +#define BOOST_TT_IS_SAME_HPP_INCLUDED + +#include +// should be the last #include +#include + +namespace boost { + + +BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_same,T,U,false) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename T,is_same,T,T,true) +#if BOOST_WORKAROUND(__BORLANDC__, < 0x600) +// without this, Borland's compiler gives the wrong answer for +// references to arrays: +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename T,is_same,T&,T&,true) +#endif + + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_SAME_HPP_INCLUDED + diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_scalar.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_scalar.hpp new file mode 100644 index 0000000000..4af3def14c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_scalar.hpp @@ -0,0 +1,55 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_SCALAR_HPP_INCLUDED +#define BOOST_TT_IS_SCALAR_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include + +// should be the last #include +#include + +namespace boost { + +namespace detail { + +template +struct is_scalar_impl +{ + BOOST_STATIC_CONSTANT(bool, value = + (::boost::type_traits::ice_or< + ::boost::is_arithmetic::value, + ::boost::is_enum::value, + ::boost::is_pointer::value, + ::boost::is_member_pointer::value + >::value)); +}; + +// these specializations are only really needed for compilers +// without partial specialization support: +template <> struct is_scalar_impl{ BOOST_STATIC_CONSTANT(bool, value = false ); }; +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +template <> struct is_scalar_impl{ BOOST_STATIC_CONSTANT(bool, value = false ); }; +template <> struct is_scalar_impl{ BOOST_STATIC_CONSTANT(bool, value = false ); }; +template <> struct is_scalar_impl{ BOOST_STATIC_CONSTANT(bool, value = false ); }; +#endif + +} // namespace detail + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_scalar,T,::boost::detail::is_scalar_impl::value) + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_SCALAR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_signed.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_signed.hpp new file mode 100644 index 0000000000..5673284944 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_signed.hpp @@ -0,0 +1,136 @@ + +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_IS_SIGNED_HPP_INCLUDED +#define BOOST_TT_IS_SIGNED_HPP_INCLUDED + +#include +#include +#include +#include + +// should be the last #include +#include + +namespace boost { + +#if !defined( __CODEGEARC__ ) + +namespace detail{ + +#if !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238) && !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) + +template +struct is_signed_values +{ + // + // Note that we cannot use BOOST_STATIC_CONSTANT here, using enum's + // rather than "real" static constants simply doesn't work or give + // the correct answer. + // + typedef typename remove_cv::type no_cv_t; + static const no_cv_t minus_one = (static_cast(-1)); + static const no_cv_t zero = (static_cast(0)); +}; + +template +struct is_signed_helper +{ + typedef typename remove_cv::type no_cv_t; + BOOST_STATIC_CONSTANT(bool, value = (!(::boost::detail::is_signed_values::minus_one > boost::detail::is_signed_values::zero))); +}; + +template +struct is_signed_select_helper +{ + template + struct rebind + { + typedef is_signed_helper type; + }; +}; + +template <> +struct is_signed_select_helper +{ + template + struct rebind + { + typedef false_type type; + }; +}; + +template +struct is_signed_imp +{ + typedef is_signed_select_helper< + ::boost::type_traits::ice_or< + ::boost::is_integral::value, + ::boost::is_enum::value>::value + > selector; + typedef typename selector::template rebind binder; + typedef typename binder::type type; + BOOST_STATIC_CONSTANT(bool, value = type::value); +}; + +#else + +template struct is_signed_imp : public false_type{}; +template <> struct is_signed_imp : public true_type{}; +template <> struct is_signed_imp : public true_type{}; +template <> struct is_signed_imp : public true_type{}; +template <> struct is_signed_imp : public true_type{}; +template <> struct is_signed_imp : public true_type{}; +template <> struct is_signed_imp : public true_type{}; +template <> struct is_signed_imp : public true_type{}; +template <> struct is_signed_imp : public true_type{}; +template <> struct is_signed_imp : public true_type{}; +template <> struct is_signed_imp : public true_type{}; +template <> struct is_signed_imp : public true_type{}; +template <> struct is_signed_imp : public true_type{}; +template <> struct is_signed_imp : public true_type{}; +template <> struct is_signed_imp : public true_type{}; +template <> struct is_signed_imp : public true_type{}; +template <> struct is_signed_imp : public true_type{}; +#ifdef BOOST_HAS_LONG_LONG +template <> struct is_signed_imp : public true_type{}; +template <> struct is_signed_imp : public true_type{}; +template <> struct is_signed_imp : public true_type{}; +template <> struct is_signed_imp : public true_type{}; +#endif +#if defined(CHAR_MIN) && (CHAR_MIN != 0) +template <> struct is_signed_imp : public true_type{}; +template <> struct is_signed_imp : public true_type{}; +template <> struct is_signed_imp : public true_type{}; +template <> struct is_signed_imp : public true_type{}; +#endif +#if defined(WCHAR_MIN) && (WCHAR_MIN != 0) +template <> struct is_signed_imp : public true_type{}; +template <> struct is_signed_imp : public true_type{}; +template <> struct is_signed_imp : public true_type{}; +template <> struct is_signed_imp : public true_type{}; +#endif + +#endif + +} + +#endif // !defined( __CODEGEARC__ ) + +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_signed,T,__is_signed(T)) +#else +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_signed,T,::boost::detail::is_signed_imp::value) +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_union.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_union.hpp new file mode 100644 index 0000000000..610f162ba4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_union.hpp @@ -0,0 +1,57 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_IS_UNION_HPP_INCLUDED +#define BOOST_TT_IS_UNION_HPP_INCLUDED + +#include +#include +#include + +// should be the last #include +#include + +namespace boost { + +namespace detail { +#ifndef __GNUC__ +template struct is_union_impl +{ + typedef typename remove_cv::type cvt; +#ifdef BOOST_IS_UNION + BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_UNION(cvt)); +#else + BOOST_STATIC_CONSTANT(bool, value = false); +#endif +}; +#else +// +// using remove_cv here generates a whole load of needless +// warnings with gcc, since it doesn't do any good with gcc +// in any case (at least at present), just remove it: +// +template struct is_union_impl +{ +#ifdef BOOST_IS_UNION + BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_UNION(T)); +#else + BOOST_STATIC_CONSTANT(bool, value = false); +#endif +}; +#endif +} // namespace detail + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_union,T,::boost::detail::is_union_impl::value) + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_UNION_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_unsigned.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_unsigned.hpp new file mode 100644 index 0000000000..0602838a33 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_unsigned.hpp @@ -0,0 +1,135 @@ + +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_IS_UNSIGNED_HPP_INCLUDED +#define BOOST_TT_IS_UNSIGNED_HPP_INCLUDED + +#include +#include +#include +#include + +// should be the last #include +#include + +namespace boost { + +#if !defined( __CODEGEARC__ ) + +namespace detail{ + +#if !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238) && !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) + +template +struct is_unsigned_values +{ + // + // Note that we cannot use BOOST_STATIC_CONSTANT here, using enum's + // rather than "real" static constants simply doesn't work or give + // the correct answer. + // + typedef typename remove_cv::type no_cv_t; + static const no_cv_t minus_one = (static_cast(-1)); + static const no_cv_t zero = (static_cast(0)); +}; + +template +struct is_ununsigned_helper +{ + BOOST_STATIC_CONSTANT(bool, value = (::boost::detail::is_unsigned_values::minus_one > ::boost::detail::is_unsigned_values::zero)); +}; + +template +struct is_ununsigned_select_helper +{ + template + struct rebind + { + typedef is_ununsigned_helper type; + }; +}; + +template <> +struct is_ununsigned_select_helper +{ + template + struct rebind + { + typedef false_type type; + }; +}; + +template +struct is_unsigned_imp +{ + typedef is_ununsigned_select_helper< + ::boost::type_traits::ice_or< + ::boost::is_integral::value, + ::boost::is_enum::value>::value + > selector; + typedef typename selector::template rebind binder; + typedef typename binder::type type; + BOOST_STATIC_CONSTANT(bool, value = type::value); +}; + +#else + +template struct is_unsigned_imp : public false_type{}; +template <> struct is_unsigned_imp : public true_type{}; +template <> struct is_unsigned_imp : public true_type{}; +template <> struct is_unsigned_imp : public true_type{}; +template <> struct is_unsigned_imp : public true_type{}; +template <> struct is_unsigned_imp : public true_type{}; +template <> struct is_unsigned_imp : public true_type{}; +template <> struct is_unsigned_imp : public true_type{}; +template <> struct is_unsigned_imp : public true_type{}; +template <> struct is_unsigned_imp : public true_type{}; +template <> struct is_unsigned_imp : public true_type{}; +template <> struct is_unsigned_imp : public true_type{}; +template <> struct is_unsigned_imp : public true_type{}; +template <> struct is_unsigned_imp : public true_type{}; +template <> struct is_unsigned_imp : public true_type{}; +template <> struct is_unsigned_imp : public true_type{}; +template <> struct is_unsigned_imp : public true_type{}; +#ifdef BOOST_HAS_LONG_LONG +template <> struct is_unsigned_imp : public true_type{}; +template <> struct is_unsigned_imp : public true_type{}; +template <> struct is_unsigned_imp : public true_type{}; +template <> struct is_unsigned_imp : public true_type{}; +#endif +#if defined(CHAR_MIN) && (CHAR_MIN == 0) +template <> struct is_unsigned_imp : public true_type{}; +template <> struct is_unsigned_imp : public true_type{}; +template <> struct is_unsigned_imp : public true_type{}; +template <> struct is_unsigned_imp : public true_type{}; +#endif +#if defined(WCHAR_MIN) && (WCHAR_MIN == 0) && !defined(BOOST_NO_INTRINSIC_WCHAR_T) +template <> struct is_unsigned_imp : public true_type{}; +template <> struct is_unsigned_imp : public true_type{}; +template <> struct is_unsigned_imp : public true_type{}; +template <> struct is_unsigned_imp : public true_type{}; +#endif + +#endif + +} + +#endif // !defined( __CODEGEARC__ ) + +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_unsigned,T,__is_unsigned(T)) +#else +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_unsigned,T,::boost::detail::is_unsigned_imp::value) +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_void.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_void.hpp new file mode 100644 index 0000000000..6f6fbff6d9 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_void.hpp @@ -0,0 +1,38 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_VOID_HPP_INCLUDED +#define BOOST_TT_IS_VOID_HPP_INCLUDED + +#include + +// should be the last #include +#include + +namespace boost { + +//* is a type T void - is_void +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_void,T,__is_void(T)) +#else +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_void,T,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_void,void,true) + +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_void,void const,true) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_void,void volatile,true) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_void,void const volatile,true) +#endif + +#endif // non-CodeGear implementation + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_VOID_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/is_volatile.hpp b/ThirdParty/boost-Subset/boost/type_traits/is_volatile.hpp new file mode 100644 index 0000000000..d9839dad3b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/is_volatile.hpp @@ -0,0 +1,84 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Howard Hinnant and John Maddock 2000. +// (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +// Fixed is_pointer, is_reference, is_const, is_volatile, is_same, +// is_member_pointer based on the Simulated Partial Specialization work +// of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or +// http://groups.yahoo.com/group/boost/message/5441 +// Some workarounds in here use ideas suggested from "Generic: +// Mappings between Types and Values" +// by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). + + +#ifndef BOOST_TT_IS_VOLATILE_HPP_INCLUDED +#define BOOST_TT_IS_VOLATILE_HPP_INCLUDED + +#include +#include + +# include +# if BOOST_WORKAROUND(BOOST_MSVC, < 1400) +# include +# endif + +// should be the last #include +#include + +namespace boost { + +namespace detail{ +template +struct is_volatile_rval_filter +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1400) + BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::type*>::is_volatile); +#else + BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::is_volatile); +#endif +}; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +// +// We can't filter out rvalue_references at the same level as +// references or we get ambiguities from msvc: +// +template +struct is_volatile_rval_filter +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; +#endif +} + +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,__is_volatile(T)) +#else + +//* is a type T declared volatile - is_volatile +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,::boost::detail::is_volatile_rval_filter::value) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_volatile,T&,false) + +#if defined(BOOST_ILLEGAL_CV_REFERENCES) +// these are illegal specialisations; cv-qualifies applied to +// references have no effect according to [8.3.2p1], +// C++ Builder requires them though as it treats cv-qualified +// references as distinct types... +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_volatile,T& const,false) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_volatile,T& volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_volatile,T& const volatile,false) +#endif + +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_VOLATILE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/make_signed.hpp b/ThirdParty/boost-Subset/boost/type_traits/make_signed.hpp new file mode 100644 index 0000000000..51cdbb0dc8 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/make_signed.hpp @@ -0,0 +1,151 @@ + +// (C) Copyright John Maddock 2007. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_MAKE_SIGNED_HPP_INCLUDED +#define BOOST_TT_MAKE_SIGNED_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// should be the last #include +#include + +namespace boost { + +namespace detail { + +template +struct make_signed_imp +{ + BOOST_STATIC_ASSERT( + (::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_enum::value>::value)); + BOOST_STATIC_ASSERT( + (::boost::type_traits::ice_not< ::boost::is_same< + typename remove_cv::type, bool>::value>::value)); + + typedef typename remove_cv::type t_no_cv; + typedef typename mpl::if_c< + (::boost::type_traits::ice_and< + ::boost::is_signed::value, + ::boost::is_integral::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value >::value), + T, + typename mpl::if_c< + (::boost::type_traits::ice_and< + ::boost::is_integral::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value> + ::value), + typename mpl::if_< + is_same, + signed char, + typename mpl::if_< + is_same, + signed short, + typename mpl::if_< + is_same, + int, + typename mpl::if_< + is_same, + long, +#if defined(BOOST_HAS_LONG_LONG) +#ifdef BOOST_HAS_INT128 + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(boost::long_long_type), + boost::long_long_type, + boost::int128_type + >::type +#else + boost::long_long_type +#endif +#elif defined(BOOST_HAS_MS_INT64) + __int64 +#else + long +#endif + >::type + >::type + >::type + >::type, + // Not a regular integer type: + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(unsigned char), + signed char, + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(unsigned short), + signed short, + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(unsigned int), + int, + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(unsigned long), + long, +#if defined(BOOST_HAS_LONG_LONG) +#ifdef BOOST_HAS_INT128 + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(boost::long_long_type), + boost::long_long_type, + boost::int128_type + >::type +#else + boost::long_long_type +#endif +#elif defined(BOOST_HAS_MS_INT64) + __int64 +#else + long +#endif + >::type + >::type + >::type + >::type + >::type + >::type base_integer_type; + + // Add back any const qualifier: + typedef typename mpl::if_< + is_const, + typename add_const::type, + base_integer_type + >::type const_base_integer_type; + + // Add back any volatile qualifier: + typedef typename mpl::if_< + is_volatile, + typename add_volatile::type, + const_base_integer_type + >::type type; +}; + + +} // namespace detail + +BOOST_TT_AUX_TYPE_TRAIT_DEF1(make_signed,T,typename boost::detail::make_signed_imp::type) + +} // namespace boost + +#include + +#endif // BOOST_TT_ADD_REFERENCE_HPP_INCLUDED + diff --git a/ThirdParty/boost-Subset/boost/type_traits/make_unsigned.hpp b/ThirdParty/boost-Subset/boost/type_traits/make_unsigned.hpp new file mode 100644 index 0000000000..239153a863 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/make_unsigned.hpp @@ -0,0 +1,151 @@ + +// (C) Copyright John Maddock 2007. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_MAKE_UNSIGNED_HPP_INCLUDED +#define BOOST_TT_MAKE_UNSIGNED_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// should be the last #include +#include + +namespace boost { + +namespace detail { + +template +struct make_unsigned_imp +{ + BOOST_STATIC_ASSERT( + (::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_enum::value>::value)); + BOOST_STATIC_ASSERT( + (::boost::type_traits::ice_not< ::boost::is_same< + typename remove_cv::type, bool>::value>::value)); + + typedef typename remove_cv::type t_no_cv; + typedef typename mpl::if_c< + (::boost::type_traits::ice_and< + ::boost::is_unsigned::value, + ::boost::is_integral::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value >::value), + T, + typename mpl::if_c< + (::boost::type_traits::ice_and< + ::boost::is_integral::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value> + ::value), + typename mpl::if_< + is_same, + unsigned char, + typename mpl::if_< + is_same, + unsigned short, + typename mpl::if_< + is_same, + unsigned int, + typename mpl::if_< + is_same, + unsigned long, +#if defined(BOOST_HAS_LONG_LONG) +#ifdef BOOST_HAS_INT128 + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(boost::ulong_long_type), + boost::ulong_long_type, + boost::uint128_type + >::type +#else + boost::ulong_long_type +#endif +#elif defined(BOOST_HAS_MS_INT64) + unsigned __int64 +#else + unsigned long +#endif + >::type + >::type + >::type + >::type, + // Not a regular integer type: + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(unsigned char), + unsigned char, + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(unsigned short), + unsigned short, + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(unsigned int), + unsigned int, + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(unsigned long), + unsigned long, +#if defined(BOOST_HAS_LONG_LONG) +#ifdef BOOST_HAS_INT128 + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(boost::ulong_long_type), + boost::ulong_long_type, + boost::uint128_type + >::type +#else + boost::ulong_long_type +#endif +#elif defined(BOOST_HAS_MS_INT64) + unsigned __int64 +#else + unsigned long +#endif + >::type + >::type + >::type + >::type + >::type + >::type base_integer_type; + + // Add back any const qualifier: + typedef typename mpl::if_< + is_const, + typename add_const::type, + base_integer_type + >::type const_base_integer_type; + + // Add back any volatile qualifier: + typedef typename mpl::if_< + is_volatile, + typename add_volatile::type, + const_base_integer_type + >::type type; +}; + + +} // namespace detail + +BOOST_TT_AUX_TYPE_TRAIT_DEF1(make_unsigned,T,typename boost::detail::make_unsigned_imp::type) + +} // namespace boost + +#include + +#endif // BOOST_TT_ADD_REFERENCE_HPP_INCLUDED + diff --git a/ThirdParty/boost-Subset/boost/type_traits/remove_bounds.hpp b/ThirdParty/boost-Subset/boost/type_traits/remove_bounds.hpp new file mode 100644 index 0000000000..2d26348c69 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/remove_bounds.hpp @@ -0,0 +1,40 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED +#define BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED + +#include +#include +#include + +// should be the last #include +#include + +namespace boost { + +BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_bounds,T,T) + +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T[N],T type) +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T const[N],T const type) +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T volatile[N],T volatile type) +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T const volatile[N],T const volatile type) +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_bounds,T[],T) +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_bounds,T const[],T const) +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_bounds,T volatile[],T volatile) +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_bounds,T const volatile[],T const volatile) +#endif +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/remove_const.hpp b/ThirdParty/boost-Subset/boost/type_traits/remove_const.hpp new file mode 100644 index 0000000000..1020781383 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/remove_const.hpp @@ -0,0 +1,79 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_REMOVE_CONST_HPP_INCLUDED +#define BOOST_TT_REMOVE_CONST_HPP_INCLUDED + +#include +#include +#include +#include + +#include + +// should be the last #include +#include + +namespace boost { + + +namespace detail { + +template +struct remove_const_helper +{ + typedef T type; +}; + +template +struct remove_const_helper +{ + typedef T volatile type; +}; + + +template +struct remove_const_impl +{ + typedef typename remove_const_helper< + typename cv_traits_imp::unqualified_type + , ::boost::is_volatile::value + >::type type; +}; + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +// +// We can't filter out rvalue_references at the same level as +// references or we get ambiguities from msvc: +// +template +struct remove_const_impl +{ + typedef T&& type; +}; +#endif + +} // namespace detail + +// * convert a type T to non-const type - remove_const + +BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_const,T,typename boost::detail::remove_const_impl::type) +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_const,T&,T&) +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_const,T const[N],T type[N]) +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_const,T const volatile[N],T volatile type[N]) +#endif + + +} // namespace boost + +#include + +#endif // BOOST_TT_REMOVE_CONST_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/remove_cv.hpp b/ThirdParty/boost-Subset/boost/type_traits/remove_cv.hpp new file mode 100644 index 0000000000..9ba34a1eff --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/remove_cv.hpp @@ -0,0 +1,63 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_REMOVE_CV_HPP_INCLUDED +#define BOOST_TT_REMOVE_CV_HPP_INCLUDED + +#include +#include +#include + +#include + +// should be the last #include +#include + +namespace boost { + + +namespace detail{ + +template +struct rvalue_ref_filter_rem_cv +{ + typedef typename boost::detail::cv_traits_imp::unqualified_type type; +}; + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +// +// We can't filter out rvalue_references at the same level as +// references or we get ambiguities from msvc: +// +template +struct rvalue_ref_filter_rem_cv +{ + typedef T&& type; +}; +#endif + +} + + +// convert a type T to a non-cv-qualified type - remove_cv +BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_cv,T,typename boost::detail::rvalue_ref_filter_rem_cv::type) +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_cv,T&,T&) +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_cv,T const[N],T type[N]) +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_cv,T volatile[N],T type[N]) +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_cv,T const volatile[N],T type[N]) +#endif + + +} // namespace boost + +#include + +#endif // BOOST_TT_REMOVE_CV_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/remove_pointer.hpp b/ThirdParty/boost-Subset/boost/type_traits/remove_pointer.hpp new file mode 100644 index 0000000000..fef706860c --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/remove_pointer.hpp @@ -0,0 +1,83 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_REMOVE_POINTER_HPP_INCLUDED +#define BOOST_TT_REMOVE_POINTER_HPP_INCLUDED + +#include +#include + +#if defined(BOOST_MSVC) +#include +#include +#endif + +// should be the last #include +#include + +namespace boost { + +#ifdef BOOST_MSVC + +namespace detail{ + + // + // We need all this crazy indirection because a type such as: + // + // T (*const)(U) + // + // Does not bind to a or partial specialization with VC10 and earlier + // + template + struct remove_pointer_imp + { + typedef T type; + }; + + template + struct remove_pointer_imp + { + typedef T type; + }; + + template + struct remove_pointer_imp3 + { + typedef typename remove_pointer_imp::type>::type type; + }; + + template + struct remove_pointer_imp3 + { + typedef T type; + }; + + template + struct remove_pointer_imp2 + { + typedef typename remove_pointer_imp3::value>::type type; + }; +} + +BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,typename boost::detail::remove_pointer_imp2::type) + +#else + +BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,T) +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T*,T) +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T* const,T) +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T* volatile,T) +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T* const volatile,T) + +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_REMOVE_POINTER_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/remove_reference.hpp b/ThirdParty/boost-Subset/boost/type_traits/remove_reference.hpp new file mode 100644 index 0000000000..c59e7e35f4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/remove_reference.hpp @@ -0,0 +1,59 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_REMOVE_REFERENCE_HPP_INCLUDED +#define BOOST_TT_REMOVE_REFERENCE_HPP_INCLUDED + +#include +#include + +// should be the last #include +#include + +namespace boost { + + +namespace detail{ +// +// We can't filter out rvalue_references at the same level as +// references or we get ambiguities from msvc: +// +template +struct remove_rvalue_ref +{ + typedef T type; +}; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +template +struct remove_rvalue_ref +{ + typedef T type; +}; +#endif + +} // namespace detail + +BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_reference,T,typename boost::detail::remove_rvalue_ref::type) +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T&,T) + +#if defined(BOOST_ILLEGAL_CV_REFERENCES) +// these are illegal specialisations; cv-qualifies applied to +// references have no effect according to [8.3.2p1], +// C++ Builder requires them though as it treats cv-qualified +// references as distinct types... +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T& const,T) +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T& volatile,T) +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T& const volatile,T) +#endif + + +} // namespace boost + +#include + +#endif // BOOST_TT_REMOVE_REFERENCE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/remove_volatile.hpp b/ThirdParty/boost-Subset/boost/type_traits/remove_volatile.hpp new file mode 100644 index 0000000000..c20277696d --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/remove_volatile.hpp @@ -0,0 +1,77 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_REMOVE_VOLATILE_HPP_INCLUDED +#define BOOST_TT_REMOVE_VOLATILE_HPP_INCLUDED + +#include +#include +#include +#include + +#include + +// should be the last #include +#include + +namespace boost { + + +namespace detail { + +template +struct remove_volatile_helper +{ + typedef T type; +}; + +template +struct remove_volatile_helper +{ + typedef T const type; +}; + +template +struct remove_volatile_impl +{ + typedef typename remove_volatile_helper< + typename cv_traits_imp::unqualified_type + , ::boost::is_const::value + >::type type; +}; + +// +// We can't filter out rvalue_references at the same level as +// references or we get ambiguities from msvc: +// +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +template +struct remove_volatile_impl +{ + typedef T&& type; +}; +#endif +} // namespace detail + +// * convert a type T to a non-volatile type - remove_volatile + +BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_volatile,T,typename boost::detail::remove_volatile_impl::type) +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_volatile,T&,T&) +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_volatile,T volatile[N],T type[N]) +BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_volatile,T const volatile[N],T const type[N]) +#endif + + +} // namespace boost + +#include + +#endif // BOOST_TT_REMOVE_VOLATILE_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/boost/type_traits/type_with_alignment.hpp b/ThirdParty/boost-Subset/boost/type_traits/type_with_alignment.hpp new file mode 100644 index 0000000000..7eb66a702f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/type_traits/type_with_alignment.hpp @@ -0,0 +1,357 @@ +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_TYPE_WITH_ALIGNMENT_INCLUDED +#define BOOST_TT_TYPE_WITH_ALIGNMENT_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// should be the last #include +#include + +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable: 4121) // alignment is sensitive to packing +#endif + +namespace boost { + +#ifndef __BORLANDC__ + +namespace detail { + +class alignment_dummy; +typedef void (*function_ptr)(); +typedef int (alignment_dummy::*member_ptr); +typedef int (alignment_dummy::*member_function_ptr)(); + +#ifdef BOOST_HAS_LONG_LONG +#define BOOST_TT_ALIGNMENT_BASE_TYPES BOOST_PP_TUPLE_TO_LIST( \ + 12, ( \ + char, short, int, long, ::boost::long_long_type, float, double, long double \ + , void*, function_ptr, member_ptr, member_function_ptr)) +#else +#define BOOST_TT_ALIGNMENT_BASE_TYPES BOOST_PP_TUPLE_TO_LIST( \ + 11, ( \ + char, short, int, long, float, double, long double \ + , void*, function_ptr, member_ptr, member_function_ptr)) +#endif + +#define BOOST_TT_HAS_ONE_T(D,Data,T) boost::detail::has_one_T< T > + +#define BOOST_TT_ALIGNMENT_STRUCT_TYPES \ + BOOST_PP_LIST_TRANSFORM(BOOST_TT_HAS_ONE_T, \ + X, \ + BOOST_TT_ALIGNMENT_BASE_TYPES) + +#define BOOST_TT_ALIGNMENT_TYPES \ + BOOST_PP_LIST_APPEND(BOOST_TT_ALIGNMENT_BASE_TYPES, \ + BOOST_TT_ALIGNMENT_STRUCT_TYPES) + +// +// lower_alignment_helper -- +// +// This template gets instantiated a lot, so use partial +// specialization when available to reduce the compiler burden. +// +template +struct lower_alignment_helper +{ + typedef char type; + enum { value = true }; +}; + +template +struct lower_alignment_helper +{ + enum { value = (alignment_of::value == target) }; + typedef typename mpl::if_c::type type; +}; + +#define BOOST_TT_CHOOSE_MIN_ALIGNMENT(R,P,I,T) \ + typename lower_alignment_helper< \ + BOOST_PP_CAT(found,I),target,T \ + >::type BOOST_PP_CAT(t,I); \ + enum { \ + BOOST_PP_CAT(found,BOOST_PP_INC(I)) \ + = lower_alignment_helper::value \ + }; + +#define BOOST_TT_CHOOSE_T(R,P,I,T) T BOOST_PP_CAT(t,I); + +template +struct has_one_T +{ + T data; +}; + +template +union lower_alignment +{ + enum { found0 = false }; + + BOOST_PP_LIST_FOR_EACH_I( + BOOST_TT_CHOOSE_MIN_ALIGNMENT + , ignored + , BOOST_TT_ALIGNMENT_TYPES + ) +}; + +union max_align +{ + BOOST_PP_LIST_FOR_EACH_I( + BOOST_TT_CHOOSE_T + , ignored + , BOOST_TT_ALIGNMENT_TYPES + ) +}; + +#undef BOOST_TT_ALIGNMENT_BASE_TYPES +#undef BOOST_TT_HAS_ONE_T +#undef BOOST_TT_ALIGNMENT_STRUCT_TYPES +#undef BOOST_TT_ALIGNMENT_TYPES +#undef BOOST_TT_CHOOSE_MIN_ALIGNMENT +#undef BOOST_TT_CHOOSE_T + +template +struct is_aligned +{ + BOOST_STATIC_CONSTANT(bool, + value = (TAlign >= Align) & (TAlign % Align == 0) + ); +}; + + +} // namespace detail + +template +struct is_pod< ::boost::detail::lower_alignment > +{ + BOOST_STATIC_CONSTANT(std::size_t, value = true); +}; + +// This alignment method originally due to Brian Parker, implemented by David +// Abrahams, and then ported here by Doug Gregor. +namespace detail{ + +template +class type_with_alignment_imp +{ + typedef ::boost::detail::lower_alignment t1; + typedef typename mpl::if_c< + ::boost::detail::is_aligned< ::boost::alignment_of::value,Align >::value + , t1 + , ::boost::detail::max_align + >::type align_t; + + BOOST_STATIC_CONSTANT(std::size_t, found = alignment_of::value); + + BOOST_STATIC_ASSERT(found >= Align); + BOOST_STATIC_ASSERT(found % Align == 0); + + public: + typedef align_t type; +}; + +} + +template +class type_with_alignment + : public ::boost::detail::type_with_alignment_imp +{ +}; + +#if defined(__GNUC__) || (defined (__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130)) +namespace tt_align_ns { +struct __attribute__((__aligned__(2))) a2 {}; +struct __attribute__((__aligned__(4))) a4 {}; +struct __attribute__((__aligned__(8))) a8 {}; +struct __attribute__((__aligned__(16))) a16 {}; +struct __attribute__((__aligned__(32))) a32 {}; +struct __attribute__((__aligned__(64))) a64 {}; +struct __attribute__((__aligned__(128))) a128 {}; +} + +template<> class type_with_alignment<1> { public: typedef char type; }; +template<> class type_with_alignment<2> { public: typedef tt_align_ns::a2 type; }; +template<> class type_with_alignment<4> { public: typedef tt_align_ns::a4 type; }; +template<> class type_with_alignment<8> { public: typedef tt_align_ns::a8 type; }; +template<> class type_with_alignment<16> { public: typedef tt_align_ns::a16 type; }; +template<> class type_with_alignment<32> { public: typedef tt_align_ns::a32 type; }; +template<> class type_with_alignment<64> { public: typedef tt_align_ns::a64 type; }; +template<> class type_with_alignment<128> { public: typedef tt_align_ns::a128 type; }; + +namespace detail { +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a2,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a4,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a8,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a16,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a32,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a64,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a128,true) +} +#endif +#if defined(BOOST_MSVC) || (defined(BOOST_INTEL) && defined(_MSC_VER)) +// +// MSVC supports types which have alignments greater than the normal +// maximum: these are used for example in the types __m64 and __m128 +// to provide types with alignment requirements which match the SSE +// registers. Therefore we extend type_with_alignment<> to support +// such types, however, we have to be careful to use a builtin type +// whenever possible otherwise we break previously working code: +// see http://article.gmane.org/gmane.comp.lib.boost.devel/173011 +// for an example and test case. Thus types like a8 below will +// be used *only* if the existing implementation can't provide a type +// with suitable alignment. This does mean however, that type_with_alignment<> +// may return a type which cannot be passed through a function call +// by value (and neither can any type containing such a type like +// Boost.Optional). However, this only happens when we have no choice +// in the matter because no other "ordinary" type is available. +// +namespace tt_align_ns { +struct __declspec(align(8)) a8 { + char m[8]; + typedef a8 type; +}; +struct __declspec(align(16)) a16 { + char m[16]; + typedef a16 type; +}; +struct __declspec(align(32)) a32 { + char m[32]; + typedef a32 type; +}; +struct __declspec(align(64)) a64 +{ + char m[64]; + typedef a64 type; +}; +struct __declspec(align(128)) a128 { + char m[128]; + typedef a128 type; +}; +} + +template<> class type_with_alignment<8> +{ + typedef mpl::if_c< + ::boost::alignment_of::value < 8, + tt_align_ns::a8, + boost::detail::type_with_alignment_imp<8> >::type t1; +public: + typedef t1::type type; +}; +template<> class type_with_alignment<16> +{ + typedef mpl::if_c< + ::boost::alignment_of::value < 16, + tt_align_ns::a16, + boost::detail::type_with_alignment_imp<16> >::type t1; +public: + typedef t1::type type; +}; +template<> class type_with_alignment<32> +{ + typedef mpl::if_c< + ::boost::alignment_of::value < 32, + tt_align_ns::a32, + boost::detail::type_with_alignment_imp<32> >::type t1; +public: + typedef t1::type type; +}; +template<> class type_with_alignment<64> { + typedef mpl::if_c< + ::boost::alignment_of::value < 64, + tt_align_ns::a64, + boost::detail::type_with_alignment_imp<64> >::type t1; +public: + typedef t1::type type; +}; +template<> class type_with_alignment<128> { + typedef mpl::if_c< + ::boost::alignment_of::value < 128, + tt_align_ns::a128, + boost::detail::type_with_alignment_imp<128> >::type t1; +public: + typedef t1::type type; +}; + +namespace detail { +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a8,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a16,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a32,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a64,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a128,true) +} +#endif + +#else + +// +// Borland specific version, we have this for two reasons: +// 1) The version above doesn't always compile (with the new test cases for example) +// 2) Because of Borlands #pragma option we can create types with alignments that are +// greater that the largest aligned builtin type. + +namespace tt_align_ns{ +#pragma option push -a16 +struct a2{ short s; }; +struct a4{ int s; }; +struct a8{ double s; }; +struct a16{ long double s; }; +#pragma option pop +} + +namespace detail { + +typedef ::boost::tt_align_ns::a16 max_align; + +//#if ! BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x610)) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a2,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a4,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a8,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a16,true) +//#endif +} + +template struct type_with_alignment +{ + // We should never get to here, but if we do use the maximally + // aligned type: + // BOOST_STATIC_ASSERT(0); + typedef tt_align_ns::a16 type; +}; +template <> struct type_with_alignment<1>{ typedef char type; }; +template <> struct type_with_alignment<2>{ typedef tt_align_ns::a2 type; }; +template <> struct type_with_alignment<4>{ typedef tt_align_ns::a4 type; }; +template <> struct type_with_alignment<8>{ typedef tt_align_ns::a8 type; }; +template <> struct type_with_alignment<16>{ typedef tt_align_ns::a16 type; }; + +#endif + +} // namespace boost + +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif + +#include + +#endif // BOOST_TT_TYPE_WITH_ALIGNMENT_INCLUDED + + diff --git a/ThirdParty/boost-Subset/boost/utility.hpp b/ThirdParty/boost-Subset/boost/utility.hpp new file mode 100644 index 0000000000..82177c8b47 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/utility.hpp @@ -0,0 +1,21 @@ +// Boost utility.hpp header file -------------------------------------------// + +// Copyright 1999-2003 Aleksey Gurtovoy. Use, modification, and distribution are +// subject to the Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or a copy at .) + +// See for the library's home page. + +#ifndef BOOST_UTILITY_HPP +#define BOOST_UTILITY_HPP + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // BOOST_UTILITY_HPP diff --git a/ThirdParty/boost-Subset/boost/utility/addressof.hpp b/ThirdParty/boost-Subset/boost/utility/addressof.hpp new file mode 100644 index 0000000000..db4da80421 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/utility/addressof.hpp @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2014 Glen Fernandes + * + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_UTILITY_ADDRESSOF_HPP +#define BOOST_UTILITY_ADDRESSOF_HPP + +// The header file at this path is deprecated; +// use boost/core/addressof.hpp instead. + +#include + +#endif diff --git a/ThirdParty/boost-Subset/boost/utility/base_from_member.hpp b/ThirdParty/boost-Subset/boost/utility/base_from_member.hpp new file mode 100644 index 0000000000..fc0e13c0d7 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/utility/base_from_member.hpp @@ -0,0 +1,171 @@ +// boost utility/base_from_member.hpp header file --------------------------// + +// Copyright 2001, 2003, 2004, 2012 Daryle Walker. Use, modification, and +// distribution are subject to the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or a copy at +// .) + +// See for the library's home page. + +#ifndef BOOST_UTILITY_BASE_FROM_MEMBER_HPP +#define BOOST_UTILITY_BASE_FROM_MEMBER_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +// Base-from-member arity configuration macro ------------------------------// + +// The following macro determines how many arguments will be in the largest +// constructor template of base_from_member. Constructor templates will be +// generated from one argument to this maximum. Code from other files can read +// this number if they need to always match the exact maximum base_from_member +// uses. The maximum constructor length can be changed by overriding the +// #defined constant. Make sure to apply the override, if any, for all source +// files during project compiling for consistency. + +// Contributed by Jonathan Turkanis + +#ifndef BOOST_BASE_FROM_MEMBER_MAX_ARITY +#define BOOST_BASE_FROM_MEMBER_MAX_ARITY 10 +#endif + + +// An iteration of a constructor template for base_from_member -------------// + +// A macro that should expand to: +// template < typename T1, ..., typename Tn > +// base_from_member( T1 x1, ..., Tn xn ) +// : member( x1, ..., xn ) +// {} +// This macro should only persist within this file. + +#define BOOST_PRIVATE_CTR_DEF( z, n, data ) \ + template < BOOST_PP_ENUM_PARAMS(n, typename T) > \ + explicit base_from_member( BOOST_PP_ENUM_BINARY_PARAMS(n, T, x) ) \ + : member( BOOST_PP_ENUM_PARAMS(n, x) ) \ + {} \ + /**/ + + +namespace boost +{ + +namespace detail +{ + +// Type-unmarking class template -------------------------------------------// + +// Type-trait to get the raw type, i.e. the type without top-level reference nor +// cv-qualification, from a type expression. Mainly for function arguments, any +// reference part is stripped first. + +// Contributed by Daryle Walker + +template < typename T > +struct remove_cv_ref +{ + typedef typename ::boost::remove_cv::type>::type type; + +}; // boost::detail::remove_cv_ref + +// Unmarked-type comparison class template ---------------------------------// + +// Type-trait to check if two type expressions have the same raw type. + +// Contributed by Daryle Walker, based on a work-around by Luc Danton + +template < typename T, typename U > +struct is_related + : public ::boost::is_same< + typename ::boost::detail::remove_cv_ref::type, + typename ::boost::detail::remove_cv_ref::type > +{}; + +// Enable-if-on-unidentical-unmarked-type class template -------------------// + +// Enable-if on the first two type expressions NOT having the same raw type. + +// Contributed by Daryle Walker, based on a work-around by Luc Danton + +#ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES +template +struct enable_if_unrelated + : public ::boost::enable_if_c +{}; + +template +struct enable_if_unrelated + : public ::boost::disable_if< ::boost::detail::is_related > +{}; +#endif + +} // namespace boost::detail + + +// Base-from-member class template -----------------------------------------// + +// Helper to initialize a base object so a derived class can use this +// object in the initialization of another base class. Used by +// Dietmar Kuehl from ideas by Ron Klatcho to solve the problem of a +// base class needing to be initialized by a member. + +// Contributed by Daryle Walker + +template < typename MemberType, int UniqueID = 0 > +class base_from_member +{ +protected: + MemberType member; + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && \ + !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && \ + !defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && \ + !(defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 4)) + template ::type> + explicit BOOST_CONSTEXPR base_from_member( T&& ...x ) + BOOST_NOEXCEPT_IF( BOOST_NOEXCEPT_EXPR(::new ((void*) 0) MemberType( + static_cast(x)... )) ) // no std::is_nothrow_constructible... + : member( static_cast(x)... ) // ...nor std::forward needed + {} +#else + base_from_member() + : member() + {} + + BOOST_PP_REPEAT_FROM_TO( 1, BOOST_PP_INC(BOOST_BASE_FROM_MEMBER_MAX_ARITY), + BOOST_PRIVATE_CTR_DEF, _ ) +#endif + +}; // boost::base_from_member + +template < typename MemberType, int UniqueID > +class base_from_member +{ +protected: + MemberType& member; + + explicit BOOST_CONSTEXPR base_from_member( MemberType& x ) + BOOST_NOEXCEPT + : member( x ) + {} + +}; // boost::base_from_member + +} // namespace boost + + +// Undo any private macros +#undef BOOST_PRIVATE_CTR_DEF + + +#endif // BOOST_UTILITY_BASE_FROM_MEMBER_HPP diff --git a/ThirdParty/boost-Subset/boost/utility/binary.hpp b/ThirdParty/boost-Subset/boost/utility/binary.hpp new file mode 100644 index 0000000000..8cef1468e5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/utility/binary.hpp @@ -0,0 +1,708 @@ +/*============================================================================= + Copyright (c) 2005 Matthew Calabrese + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_UTILITY_BINARY_HPP +#define BOOST_UTILITY_BINARY_HPP + +/*============================================================================= + + Binary Literal Utility + ______________________ + + + The following code works by converting the input bit pattern into a + Boost.Preprocessor sequence, then converting groupings of 3 bits each into + the corresponding octal digit, and finally concatenating all of the digits + together along with a leading zero. This yields a standard octal literal + with the desired value as specified in bits. + +==============================================================================*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define BOOST_BINARY( bit_groupings ) \ + BOOST_BINARY_LITERAL_D( BOOST_PP_DEDUCE_D(), bit_groupings ) + +#define BOOST_BINARY_U( bit_groupings ) \ + BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, U ) + +#define BOOST_BINARY_L( bit_groupings ) \ + BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, L ) + +#define BOOST_BINARY_UL( bit_groupings ) \ + BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, UL ) + +#define BOOST_BINARY_LU( bit_groupings ) \ + BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, LU ) + +#define BOOST_BINARY_LL( bit_groupings ) \ + BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, LL ) + +#define BOOST_BINARY_ULL( bit_groupings ) \ + BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, ULL ) + +#define BOOST_BINARY_LLU( bit_groupings ) \ + BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, LLU ) + +#define BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, suffix ) \ + BOOST_SUFFIXED_BINARY_LITERAL_D( BOOST_PP_DEDUCE_D(), bit_groupings, suffix ) + +#define BOOST_SUFFIXED_BINARY_LITERAL_D( d, bit_groupings, suffix ) \ + BOOST_PP_CAT( BOOST_BINARY_LITERAL_D( d, bit_groupings ), suffix ) + +#define BOOST_BINARY_LITERAL_D( d, bit_groupings ) \ + BOOST_PP_SEQ_CAT \ + ( (0) BOOST_DETAIL_CREATE_BINARY_LITERAL_OCTAL_SEQUENCE( d, bit_groupings ) \ + ) + +#define BOOST_DETAIL_CREATE_BINARY_LITERAL_OCTAL_SEQUENCE( d, bit_groupings ) \ + BOOST_PP_SEQ_TRANSFORM \ + ( BOOST_DETAIL_TRIPLE_TO_OCTAL_OPERATION \ + , BOOST_PP_NIL \ + , BOOST_PP_IDENTITY( BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_TRIPLE_SEQUENCE )()\ + ( BOOST_DETAIL_COMPLETE_TRIPLE_SEQUENCE \ + ( \ + d \ + , BOOST_DETAIL_CREATE_BINARY_LITERAL_BIT_SEQUENCE( d, bit_groupings ) \ + ) \ + ) \ + ) + +#define BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_TRIPLE_SEQUENCE( bit_sequence ) \ + BOOST_PP_CAT \ + ( BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_1 bit_sequence \ + , END_BIT \ + ) + +#define BOOST_DETAIL_BITS_PER_OCTIT 3 + +#define BOOST_DETAIL_COMPLETE_TRIPLE_SEQUENCE( d, incomplete_nibble_sequence ) \ + BOOST_PP_CAT \ + ( BOOST_DETAIL_CREATE_TRIPLE_COMPLETION_SEQUENCE_ \ + , BOOST_PP_MOD_D( d \ + , BOOST_PP_SEQ_SIZE( incomplete_nibble_sequence ) \ + , BOOST_DETAIL_BITS_PER_OCTIT \ + ) \ + ) \ + incomplete_nibble_sequence + +#define BOOST_DETAIL_FIXED_COMPL( bit ) \ + BOOST_PP_CAT( BOOST_DETAIL_FIXED_COMPL_, bit ) + +#define BOOST_DETAIL_FIXED_COMPL_0 1 + +#define BOOST_DETAIL_FIXED_COMPL_1 0 + +#define BOOST_DETAIL_CREATE_BINARY_LITERAL_BIT_SEQUENCE( d, bit_groupings ) \ + BOOST_PP_EMPTY \ + BOOST_PP_CAT( BOOST_PP_WHILE_, d ) \ + ( BOOST_DETAIL_BINARY_LITERAL_PREDICATE \ + , BOOST_DETAIL_BINARY_LITERAL_OPERATION \ + , bit_groupings () \ + ) + +#define BOOST_DETAIL_BINARY_LITERAL_PREDICATE( d, state ) \ + BOOST_DETAIL_FIXED_COMPL( BOOST_DETAIL_IS_NULLARY_ARGS( state ) ) + +#define BOOST_DETAIL_BINARY_LITERAL_OPERATION( d, state ) \ + BOOST_DETAIL_SPLIT_AND_SWAP \ + ( BOOST_PP_CAT( BOOST_DETAIL_BINARY_LITERAL_ELEMENT_, state ) ) + +#define BOOST_DETAIL_TRIPLE_TO_OCTAL_OPERATION( s, dummy_param, tuple ) \ + BOOST_DETAIL_TERNARY_TRIPLE_TO_OCTAL tuple + +#define BOOST_DETAIL_TERNARY_TRIPLE_TO_OCTAL( bit2, bit1, bit0 ) \ + BOOST_DETAIL_TRIPLE_TO_OCTAL_ ## bit2 ## bit1 ## bit0 + +#define BOOST_DETAIL_CREATE_TRIPLE_COMPLETION_SEQUENCE_1 (0)(0) +#define BOOST_DETAIL_CREATE_TRIPLE_COMPLETION_SEQUENCE_2 (0) +#define BOOST_DETAIL_CREATE_TRIPLE_COMPLETION_SEQUENCE_0 + +#define BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_1END_BIT + +#define BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_1( bit ) \ + ( ( bit, BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_2 + +#define BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_2( bit ) \ + bit, BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_3 + +#define BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_3( bit ) \ + bit ) ) BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_1 + +#define BOOST_DETAIL_SPLIT_AND_SWAP( params ) \ + BOOST_PP_IDENTITY( BOOST_DETAIL_SPLIT_AND_SWAP_PARAMS )()( params ) + +#define BOOST_DETAIL_SPLIT_AND_SWAP_PARAMS( first_param, second_param ) \ + second_param first_param + +#define BOOST_DETAIL_LEFT_OF_COMMA( params ) \ + BOOST_PP_IDENTITY( BOOST_DETAIL_FIRST_MACRO_PARAM )()( params ) + +#define BOOST_DETAIL_FIRST_MACRO_PARAM( first_param, second_param ) \ + first_param + +/* Begin derived concepts from Chaos by Paul Mensonides */ + +#define BOOST_DETAIL_IS_NULLARY_ARGS( param ) \ + BOOST_DETAIL_LEFT_OF_COMMA \ + ( BOOST_PP_CAT( BOOST_DETAIL_IS_NULLARY_ARGS_R_ \ + , BOOST_DETAIL_IS_NULLARY_ARGS_C param \ + ) \ + ) + +#define BOOST_DETAIL_IS_NULLARY_ARGS_C() \ + 1 + +#define BOOST_DETAIL_IS_NULLARY_ARGS_R_1 \ + 1, BOOST_PP_NIL + +#define BOOST_DETAIL_IS_NULLARY_ARGS_R_BOOST_DETAIL_IS_NULLARY_ARGS_C \ + 0, BOOST_PP_NIL + +/* End derived concepts from Chaos by Paul Mensonides */ + +#define BOOST_DETAIL_TRIPLE_TO_OCTAL_000 0 +#define BOOST_DETAIL_TRIPLE_TO_OCTAL_001 1 +#define BOOST_DETAIL_TRIPLE_TO_OCTAL_010 2 +#define BOOST_DETAIL_TRIPLE_TO_OCTAL_011 3 +#define BOOST_DETAIL_TRIPLE_TO_OCTAL_100 4 +#define BOOST_DETAIL_TRIPLE_TO_OCTAL_101 5 +#define BOOST_DETAIL_TRIPLE_TO_OCTAL_110 6 +#define BOOST_DETAIL_TRIPLE_TO_OCTAL_111 7 + +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0 (0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1 (1), + +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00 (0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01 (0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10 (1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11 (1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00 (0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01 (0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10 (1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11 (1)(1), + +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000 (0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001 (0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010 (0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011 (0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100 (1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101 (1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110 (1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111 (1)(1)(1), + +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000 (0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001 (0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010 (0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011 (0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100 (0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101 (0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110 (0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111 (0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000 (1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001 (1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010 (1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011 (1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100 (1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101 (1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110 (1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111 (1)(1)(1)(1), + +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000 (0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001 (0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010 (0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011 (0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100 (0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101 (0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110 (0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111 (0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000 (0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001 (0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010 (0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011 (0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100 (0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101 (0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110 (0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111 (0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000 (1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001 (1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010 (1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011 (1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100 (1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101 (1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110 (1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111 (1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000 (1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001 (1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010 (1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011 (1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100 (1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101 (1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110 (1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111 (1)(1)(1)(1)(1), + +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000000 (0)(0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000001 (0)(0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000010 (0)(0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000011 (0)(0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000100 (0)(0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000101 (0)(0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000110 (0)(0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000111 (0)(0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001000 (0)(0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001001 (0)(0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001010 (0)(0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001011 (0)(0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001100 (0)(0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001101 (0)(0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001110 (0)(0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001111 (0)(0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010000 (0)(1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010001 (0)(1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010010 (0)(1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010011 (0)(1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010100 (0)(1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010101 (0)(1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010110 (0)(1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010111 (0)(1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011000 (0)(1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011001 (0)(1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011010 (0)(1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011011 (0)(1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011100 (0)(1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011101 (0)(1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011110 (0)(1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011111 (0)(1)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100000 (1)(0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100001 (1)(0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100010 (1)(0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100011 (1)(0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100100 (1)(0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100101 (1)(0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100110 (1)(0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100111 (1)(0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101000 (1)(0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101001 (1)(0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101010 (1)(0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101011 (1)(0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101100 (1)(0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101101 (1)(0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101110 (1)(0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101111 (1)(0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110000 (1)(1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110001 (1)(1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110010 (1)(1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110011 (1)(1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110100 (1)(1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110101 (1)(1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110110 (1)(1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110111 (1)(1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111000 (1)(1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111001 (1)(1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111010 (1)(1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111011 (1)(1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111100 (1)(1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111101 (1)(1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111110 (1)(1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111111 (1)(1)(1)(1)(1)(1), + +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000000 (0)(0)(0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000001 (0)(0)(0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000010 (0)(0)(0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000011 (0)(0)(0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000100 (0)(0)(0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000101 (0)(0)(0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000110 (0)(0)(0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000111 (0)(0)(0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001000 (0)(0)(0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001001 (0)(0)(0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001010 (0)(0)(0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001011 (0)(0)(0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001100 (0)(0)(0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001101 (0)(0)(0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001110 (0)(0)(0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001111 (0)(0)(0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010000 (0)(0)(1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010001 (0)(0)(1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010010 (0)(0)(1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010011 (0)(0)(1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010100 (0)(0)(1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010101 (0)(0)(1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010110 (0)(0)(1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010111 (0)(0)(1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011000 (0)(0)(1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011001 (0)(0)(1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011010 (0)(0)(1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011011 (0)(0)(1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011100 (0)(0)(1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011101 (0)(0)(1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011110 (0)(0)(1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011111 (0)(0)(1)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100000 (0)(1)(0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100001 (0)(1)(0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100010 (0)(1)(0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100011 (0)(1)(0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100100 (0)(1)(0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100101 (0)(1)(0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100110 (0)(1)(0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100111 (0)(1)(0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101000 (0)(1)(0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101001 (0)(1)(0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101010 (0)(1)(0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101011 (0)(1)(0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101100 (0)(1)(0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101101 (0)(1)(0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101110 (0)(1)(0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101111 (0)(1)(0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110000 (0)(1)(1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110001 (0)(1)(1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110010 (0)(1)(1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110011 (0)(1)(1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110100 (0)(1)(1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110101 (0)(1)(1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110110 (0)(1)(1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110111 (0)(1)(1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111000 (0)(1)(1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111001 (0)(1)(1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111010 (0)(1)(1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111011 (0)(1)(1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111100 (0)(1)(1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111101 (0)(1)(1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111110 (0)(1)(1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111111 (0)(1)(1)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000000 (1)(0)(0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000001 (1)(0)(0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000010 (1)(0)(0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000011 (1)(0)(0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000100 (1)(0)(0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000101 (1)(0)(0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000110 (1)(0)(0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000111 (1)(0)(0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001000 (1)(0)(0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001001 (1)(0)(0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001010 (1)(0)(0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001011 (1)(0)(0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001100 (1)(0)(0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001101 (1)(0)(0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001110 (1)(0)(0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001111 (1)(0)(0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010000 (1)(0)(1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010001 (1)(0)(1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010010 (1)(0)(1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010011 (1)(0)(1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010100 (1)(0)(1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010101 (1)(0)(1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010110 (1)(0)(1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010111 (1)(0)(1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011000 (1)(0)(1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011001 (1)(0)(1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011010 (1)(0)(1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011011 (1)(0)(1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011100 (1)(0)(1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011101 (1)(0)(1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011110 (1)(0)(1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011111 (1)(0)(1)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100000 (1)(1)(0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100001 (1)(1)(0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100010 (1)(1)(0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100011 (1)(1)(0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100100 (1)(1)(0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100101 (1)(1)(0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100110 (1)(1)(0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100111 (1)(1)(0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101000 (1)(1)(0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101001 (1)(1)(0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101010 (1)(1)(0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101011 (1)(1)(0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101100 (1)(1)(0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101101 (1)(1)(0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101110 (1)(1)(0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101111 (1)(1)(0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110000 (1)(1)(1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110001 (1)(1)(1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110010 (1)(1)(1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110011 (1)(1)(1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110100 (1)(1)(1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110101 (1)(1)(1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110110 (1)(1)(1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110111 (1)(1)(1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111000 (1)(1)(1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111001 (1)(1)(1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111010 (1)(1)(1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111011 (1)(1)(1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111100 (1)(1)(1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111101 (1)(1)(1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111110 (1)(1)(1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111111 (1)(1)(1)(1)(1)(1)(1), + +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000000 (0)(0)(0)(0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000001 (0)(0)(0)(0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000010 (0)(0)(0)(0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000011 (0)(0)(0)(0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000100 (0)(0)(0)(0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000101 (0)(0)(0)(0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000110 (0)(0)(0)(0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000111 (0)(0)(0)(0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001000 (0)(0)(0)(0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001001 (0)(0)(0)(0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001010 (0)(0)(0)(0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001011 (0)(0)(0)(0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001100 (0)(0)(0)(0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001101 (0)(0)(0)(0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001110 (0)(0)(0)(0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001111 (0)(0)(0)(0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010000 (0)(0)(0)(1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010001 (0)(0)(0)(1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010010 (0)(0)(0)(1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010011 (0)(0)(0)(1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010100 (0)(0)(0)(1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010101 (0)(0)(0)(1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010110 (0)(0)(0)(1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010111 (0)(0)(0)(1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011000 (0)(0)(0)(1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011001 (0)(0)(0)(1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011010 (0)(0)(0)(1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011011 (0)(0)(0)(1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011100 (0)(0)(0)(1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011101 (0)(0)(0)(1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011110 (0)(0)(0)(1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011111 (0)(0)(0)(1)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100000 (0)(0)(1)(0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100001 (0)(0)(1)(0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100010 (0)(0)(1)(0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100011 (0)(0)(1)(0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100100 (0)(0)(1)(0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100101 (0)(0)(1)(0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100110 (0)(0)(1)(0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100111 (0)(0)(1)(0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101000 (0)(0)(1)(0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101001 (0)(0)(1)(0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101010 (0)(0)(1)(0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101011 (0)(0)(1)(0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101100 (0)(0)(1)(0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101101 (0)(0)(1)(0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101110 (0)(0)(1)(0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101111 (0)(0)(1)(0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110000 (0)(0)(1)(1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110001 (0)(0)(1)(1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110010 (0)(0)(1)(1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110011 (0)(0)(1)(1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110100 (0)(0)(1)(1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110101 (0)(0)(1)(1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110110 (0)(0)(1)(1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110111 (0)(0)(1)(1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111000 (0)(0)(1)(1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111001 (0)(0)(1)(1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111010 (0)(0)(1)(1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111011 (0)(0)(1)(1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111100 (0)(0)(1)(1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111101 (0)(0)(1)(1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111110 (0)(0)(1)(1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111111 (0)(0)(1)(1)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000000 (0)(1)(0)(0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000001 (0)(1)(0)(0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000010 (0)(1)(0)(0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000011 (0)(1)(0)(0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000100 (0)(1)(0)(0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000101 (0)(1)(0)(0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000110 (0)(1)(0)(0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000111 (0)(1)(0)(0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001000 (0)(1)(0)(0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001001 (0)(1)(0)(0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001010 (0)(1)(0)(0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001011 (0)(1)(0)(0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001100 (0)(1)(0)(0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001101 (0)(1)(0)(0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001110 (0)(1)(0)(0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001111 (0)(1)(0)(0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010000 (0)(1)(0)(1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010001 (0)(1)(0)(1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010010 (0)(1)(0)(1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010011 (0)(1)(0)(1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010100 (0)(1)(0)(1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010101 (0)(1)(0)(1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010110 (0)(1)(0)(1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010111 (0)(1)(0)(1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011000 (0)(1)(0)(1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011001 (0)(1)(0)(1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011010 (0)(1)(0)(1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011011 (0)(1)(0)(1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011100 (0)(1)(0)(1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011101 (0)(1)(0)(1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011110 (0)(1)(0)(1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011111 (0)(1)(0)(1)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100000 (0)(1)(1)(0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100001 (0)(1)(1)(0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100010 (0)(1)(1)(0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100011 (0)(1)(1)(0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100100 (0)(1)(1)(0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100101 (0)(1)(1)(0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100110 (0)(1)(1)(0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100111 (0)(1)(1)(0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101000 (0)(1)(1)(0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101001 (0)(1)(1)(0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101010 (0)(1)(1)(0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101011 (0)(1)(1)(0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101100 (0)(1)(1)(0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101101 (0)(1)(1)(0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101110 (0)(1)(1)(0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101111 (0)(1)(1)(0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110000 (0)(1)(1)(1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110001 (0)(1)(1)(1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110010 (0)(1)(1)(1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110011 (0)(1)(1)(1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110100 (0)(1)(1)(1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110101 (0)(1)(1)(1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110110 (0)(1)(1)(1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110111 (0)(1)(1)(1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111000 (0)(1)(1)(1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111001 (0)(1)(1)(1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111010 (0)(1)(1)(1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111011 (0)(1)(1)(1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111100 (0)(1)(1)(1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111101 (0)(1)(1)(1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111110 (0)(1)(1)(1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111111 (0)(1)(1)(1)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000000 (1)(0)(0)(0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000001 (1)(0)(0)(0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000010 (1)(0)(0)(0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000011 (1)(0)(0)(0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000100 (1)(0)(0)(0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000101 (1)(0)(0)(0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000110 (1)(0)(0)(0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000111 (1)(0)(0)(0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001000 (1)(0)(0)(0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001001 (1)(0)(0)(0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001010 (1)(0)(0)(0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001011 (1)(0)(0)(0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001100 (1)(0)(0)(0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001101 (1)(0)(0)(0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001110 (1)(0)(0)(0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001111 (1)(0)(0)(0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010000 (1)(0)(0)(1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010001 (1)(0)(0)(1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010010 (1)(0)(0)(1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010011 (1)(0)(0)(1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010100 (1)(0)(0)(1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010101 (1)(0)(0)(1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010110 (1)(0)(0)(1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010111 (1)(0)(0)(1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011000 (1)(0)(0)(1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011001 (1)(0)(0)(1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011010 (1)(0)(0)(1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011011 (1)(0)(0)(1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011100 (1)(0)(0)(1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011101 (1)(0)(0)(1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011110 (1)(0)(0)(1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011111 (1)(0)(0)(1)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100000 (1)(0)(1)(0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100001 (1)(0)(1)(0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100010 (1)(0)(1)(0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100011 (1)(0)(1)(0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100100 (1)(0)(1)(0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100101 (1)(0)(1)(0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100110 (1)(0)(1)(0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100111 (1)(0)(1)(0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101000 (1)(0)(1)(0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101001 (1)(0)(1)(0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101010 (1)(0)(1)(0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101011 (1)(0)(1)(0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101100 (1)(0)(1)(0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101101 (1)(0)(1)(0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101110 (1)(0)(1)(0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101111 (1)(0)(1)(0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110000 (1)(0)(1)(1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110001 (1)(0)(1)(1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110010 (1)(0)(1)(1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110011 (1)(0)(1)(1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110100 (1)(0)(1)(1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110101 (1)(0)(1)(1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110110 (1)(0)(1)(1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110111 (1)(0)(1)(1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111000 (1)(0)(1)(1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111001 (1)(0)(1)(1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111010 (1)(0)(1)(1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111011 (1)(0)(1)(1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111100 (1)(0)(1)(1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111101 (1)(0)(1)(1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111110 (1)(0)(1)(1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111111 (1)(0)(1)(1)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000000 (1)(1)(0)(0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000001 (1)(1)(0)(0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000010 (1)(1)(0)(0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000011 (1)(1)(0)(0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000100 (1)(1)(0)(0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000101 (1)(1)(0)(0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000110 (1)(1)(0)(0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000111 (1)(1)(0)(0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001000 (1)(1)(0)(0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001001 (1)(1)(0)(0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001010 (1)(1)(0)(0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001011 (1)(1)(0)(0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001100 (1)(1)(0)(0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001101 (1)(1)(0)(0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001110 (1)(1)(0)(0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001111 (1)(1)(0)(0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010000 (1)(1)(0)(1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010001 (1)(1)(0)(1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010010 (1)(1)(0)(1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010011 (1)(1)(0)(1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010100 (1)(1)(0)(1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010101 (1)(1)(0)(1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010110 (1)(1)(0)(1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010111 (1)(1)(0)(1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011000 (1)(1)(0)(1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011001 (1)(1)(0)(1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011010 (1)(1)(0)(1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011011 (1)(1)(0)(1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011100 (1)(1)(0)(1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011101 (1)(1)(0)(1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011110 (1)(1)(0)(1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011111 (1)(1)(0)(1)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100000 (1)(1)(1)(0)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100001 (1)(1)(1)(0)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100010 (1)(1)(1)(0)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100011 (1)(1)(1)(0)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100100 (1)(1)(1)(0)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100101 (1)(1)(1)(0)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100110 (1)(1)(1)(0)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100111 (1)(1)(1)(0)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101000 (1)(1)(1)(0)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101001 (1)(1)(1)(0)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101010 (1)(1)(1)(0)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101011 (1)(1)(1)(0)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101100 (1)(1)(1)(0)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101101 (1)(1)(1)(0)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101110 (1)(1)(1)(0)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101111 (1)(1)(1)(0)(1)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110000 (1)(1)(1)(1)(0)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110001 (1)(1)(1)(1)(0)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110010 (1)(1)(1)(1)(0)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110011 (1)(1)(1)(1)(0)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110100 (1)(1)(1)(1)(0)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110101 (1)(1)(1)(1)(0)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110110 (1)(1)(1)(1)(0)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110111 (1)(1)(1)(1)(0)(1)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111000 (1)(1)(1)(1)(1)(0)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111001 (1)(1)(1)(1)(1)(0)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111010 (1)(1)(1)(1)(1)(0)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111011 (1)(1)(1)(1)(1)(0)(1)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111100 (1)(1)(1)(1)(1)(1)(0)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111101 (1)(1)(1)(1)(1)(1)(0)(1), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111110 (1)(1)(1)(1)(1)(1)(1)(0), +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111111 (1)(1)(1)(1)(1)(1)(1)(1), + +#endif diff --git a/ThirdParty/boost-Subset/boost/utility/compare_pointees.hpp b/ThirdParty/boost-Subset/boost/utility/compare_pointees.hpp new file mode 100644 index 0000000000..7e2515c6ee --- /dev/null +++ b/ThirdParty/boost-Subset/boost/utility/compare_pointees.hpp @@ -0,0 +1,68 @@ +// Copyright (C) 2003, Fernando Luis Cacciola Carballal. +// +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/optional for documentation. +// +// You are welcome to contact the author at: +// fernando_cacciola@hotmail.com +// +#ifndef BOOST_UTILITY_COMPARE_POINTEES_25AGO2003_HPP +#define BOOST_UTILITY_COMPARE_POINTEES_25AGO2003_HPP + +#include + +namespace boost { + +// template bool equal_pointees(OP const& x, OP const& y); +// template struct equal_pointees_t; +// +// Being OP a model of OptionalPointee (either a pointer or an optional): +// +// If both x and y have valid pointees, returns the result of (*x == *y) +// If only one has a valid pointee, returns false. +// If none have valid pointees, returns true. +// No-throw +template +inline +bool equal_pointees ( OptionalPointee const& x, OptionalPointee const& y ) +{ + return (!x) != (!y) ? false : ( !x ? true : (*x) == (*y) ) ; +} + +template +struct equal_pointees_t : std::binary_function +{ + bool operator() ( OptionalPointee const& x, OptionalPointee const& y ) const + { return equal_pointees(x,y) ; } +} ; + +// template bool less_pointees(OP const& x, OP const& y); +// template struct less_pointees_t; +// +// Being OP a model of OptionalPointee (either a pointer or an optional): +// +// If y has not a valid pointee, returns false. +// ElseIf x has not a valid pointee, returns true. +// ElseIf both x and y have valid pointees, returns the result of (*x < *y) +// No-throw +template +inline +bool less_pointees ( OptionalPointee const& x, OptionalPointee const& y ) +{ + return !y ? false : ( !x ? true : (*x) < (*y) ) ; +} + +template +struct less_pointees_t : std::binary_function +{ + bool operator() ( OptionalPointee const& x, OptionalPointee const& y ) const + { return less_pointees(x,y) ; } +} ; + +} // namespace boost + +#endif + diff --git a/ThirdParty/boost-Subset/boost/utility/declval.hpp b/ThirdParty/boost-Subset/boost/utility/declval.hpp new file mode 100644 index 0000000000..a4ab2c8cb4 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/utility/declval.hpp @@ -0,0 +1,44 @@ +// declval.hpp -------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#ifndef BOOST_UTILITY_DECLVAL_HPP +#define BOOST_UTILITY_DECLVAL_HPP + +#include + +//----------------------------------------------------------------------------// + +#include + +//----------------------------------------------------------------------------// +// // +// C++03 implementation of // +// 20.2.4 Function template declval [declval] // +// Written by Vicente J. Botet Escriba // +// // +// 1 The library provides the function template declval to simplify the +// definition of expressions which occur as unevaluated operands. +// 2 Remarks: If this function is used, the program is ill-formed. +// 3 Remarks: The template parameter T of declval may be an incomplete type. +// [ Example: +// +// template +// decltype(static_cast(declval())) convert(From&&); +// +// declares a function template convert which only participates in overloading +// if the type From can be explicitly converted to type To. For another example +// see class template common_type (20.9.7.6). -end example ] +//----------------------------------------------------------------------------// + +namespace boost { + + template + typename add_rvalue_reference::type declval() BOOST_NOEXCEPT; // as unevaluated operand + +} // namespace boost + +#endif // BOOST_UTILITY_DECLVAL_HPP diff --git a/ThirdParty/boost-Subset/boost/utility/enable_if.hpp b/ThirdParty/boost-Subset/boost/utility/enable_if.hpp new file mode 100644 index 0000000000..803bfca5e2 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/utility/enable_if.hpp @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2014 Glen Fernandes + * + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_UTILITY_ENABLE_IF_HPP +#define BOOST_UTILITY_ENABLE_IF_HPP + +// The header file at this path is deprecated; +// use boost/core/enable_if.hpp instead. + +#include + +#endif diff --git a/ThirdParty/boost-Subset/boost/utility/identity_type.hpp b/ThirdParty/boost-Subset/boost/utility/identity_type.hpp new file mode 100644 index 0000000000..4a1f6c4de5 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/utility/identity_type.hpp @@ -0,0 +1,46 @@ + +// Copyright (C) 2009-2012 Lorenzo Caminiti +// Distributed under the Boost Software License, Version 1.0 +// (see accompanying file LICENSE_1_0.txt or a copy at +// http://www.boost.org/LICENSE_1_0.txt) +// Home at http://www.boost.org/libs/utility/identity_type + +/** @file +Wrap type expressions with round parenthesis so they can be passed to macros +even if they contain commas. +*/ + +#ifndef BOOST_IDENTITY_TYPE_HPP_ +#define BOOST_IDENTITY_TYPE_HPP_ + +#include + +/** +@brief This macro allows to wrap the specified type expression within extra +round parenthesis so the type can be passed as a single macro parameter even if +it contains commas (not already wrapped within round parenthesis). + +@Params +@Param{parenthesized_type, +The type expression to be passed as macro parameter wrapped by a single set +of round parenthesis (...). +This type expression can contain an arbitrary number of commas. +} +@EndParams + +This macro works on any C++03 compiler (it does not use variadic macros). + +This macro must be prefixed by typename when used within templates. +Note that the compiler will not be able to automatically determine function +template parameters when they are wrapped with this macro (these parameters +need to be explicitly specified when calling the function template). + +On some compilers (like GCC), using this macro on abstract types requires to +add and remove a reference to the specified type. +*/ +#define BOOST_IDENTITY_TYPE(parenthesized_type) \ + /* must NOT prefix this with `::` to work with parenthesized syntax */ \ + boost::function_traits< void parenthesized_type >::arg1_type + +#endif // #include guard + diff --git a/ThirdParty/boost-Subset/boost/utility/value_init.hpp b/ThirdParty/boost-Subset/boost/utility/value_init.hpp new file mode 100644 index 0000000000..9d8de70733 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/utility/value_init.hpp @@ -0,0 +1,281 @@ +// (C) Copyright 2002-2008, Fernando Luis Cacciola Carballal. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// 21 Ago 2002 (Created) Fernando Cacciola +// 24 Dec 2007 (Refactored and worked around various compiler bugs) Fernando Cacciola, Niels Dekker +// 23 May 2008 (Fixed operator= const issue, added initialized_value) Niels Dekker, Fernando Cacciola +// 21 Ago 2008 (Added swap) Niels Dekker, Fernando Cacciola +// 20 Feb 2009 (Fixed logical const-ness issues) Niels Dekker, Fernando Cacciola +// 03 Apr 2010 (Added initialized, suggested by Jeffrey Hellrung, fixing #3472) Niels Dekker +// 30 May 2010 (Made memset call conditional, fixing #3869) Niels Dekker +// +#ifndef BOOST_UTILITY_VALUE_INIT_21AGO2002_HPP +#define BOOST_UTILITY_VALUE_INIT_21AGO2002_HPP + +// Note: The implementation of boost::value_initialized had to deal with the +// fact that various compilers haven't fully implemented value-initialization. +// The constructor of boost::value_initialized works around these compiler +// issues, by clearing the bytes of T, before constructing the T object it +// contains. More details on these issues are at libs/utility/value_init.htm + +#include +#include // For BOOST_NO_COMPLETE_VALUE_INITIALIZATION. +#include +#include +#include +#include +#include +#include +#include + +#ifdef BOOST_MSVC +#pragma warning(push) +// It is safe to ignore the following warning from MSVC 7.1 or higher: +// "warning C4351: new behavior: elements of array will be default initialized" +#pragma warning(disable: 4351) +// It is safe to ignore the following MSVC warning, which may pop up when T is +// a const type: "warning C4512: assignment operator could not be generated". +#pragma warning(disable: 4512) +#endif + +#ifdef BOOST_NO_COMPLETE_VALUE_INITIALIZATION + // Implementation detail: The macro BOOST_DETAIL_VALUE_INIT_WORKAROUND_SUGGESTED + // suggests that a workaround should be applied, because of compiler issues + // regarding value-initialization. + #define BOOST_DETAIL_VALUE_INIT_WORKAROUND_SUGGESTED +#endif + +// Implementation detail: The macro BOOST_DETAIL_VALUE_INIT_WORKAROUND +// switches the value-initialization workaround either on or off. +#ifndef BOOST_DETAIL_VALUE_INIT_WORKAROUND + #ifdef BOOST_DETAIL_VALUE_INIT_WORKAROUND_SUGGESTED + #define BOOST_DETAIL_VALUE_INIT_WORKAROUND 1 + #else + #define BOOST_DETAIL_VALUE_INIT_WORKAROUND 0 + #endif +#endif + +namespace boost { + +template +class initialized +{ + private : + struct wrapper + { +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592)) + typename +#endif + remove_const::type data; + + BOOST_GPU_ENABLED + wrapper() + : + data() + { + } + + BOOST_GPU_ENABLED + wrapper(T const & arg) + : + data(arg) + { + } + }; + + mutable +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592)) + typename +#endif + aligned_storage::value>::type x; + + BOOST_GPU_ENABLED + wrapper * wrapper_address() const + { + return static_cast( static_cast(&x)); + } + + public : + + BOOST_GPU_ENABLED + initialized() + { +#if BOOST_DETAIL_VALUE_INIT_WORKAROUND + std::memset(&x, 0, sizeof(x)); +#endif + new (wrapper_address()) wrapper(); + } + + BOOST_GPU_ENABLED + initialized(initialized const & arg) + { + new (wrapper_address()) wrapper( static_cast(*(arg.wrapper_address()))); + } + + BOOST_GPU_ENABLED + explicit initialized(T const & arg) + { + new (wrapper_address()) wrapper(arg); + } + + BOOST_GPU_ENABLED + initialized & operator=(initialized const & arg) + { + // Assignment is only allowed when T is non-const. + BOOST_STATIC_ASSERT( ! is_const::value ); + *wrapper_address() = static_cast(*(arg.wrapper_address())); + return *this; + } + + BOOST_GPU_ENABLED + ~initialized() + { + wrapper_address()->wrapper::~wrapper(); + } + + BOOST_GPU_ENABLED + T const & data() const + { + return wrapper_address()->data; + } + + BOOST_GPU_ENABLED + T& data() + { + return wrapper_address()->data; + } + + BOOST_GPU_ENABLED + void swap(initialized & arg) + { + ::boost::swap( this->data(), arg.data() ); + } + + BOOST_GPU_ENABLED + operator T const &() const + { + return wrapper_address()->data; + } + + BOOST_GPU_ENABLED + operator T&() + { + return wrapper_address()->data; + } + +} ; + +template +BOOST_GPU_ENABLED +T const& get ( initialized const& x ) +{ + return x.data() ; +} + +template +BOOST_GPU_ENABLED +T& get ( initialized& x ) +{ + return x.data() ; +} + +template +BOOST_GPU_ENABLED +void swap ( initialized & lhs, initialized & rhs ) +{ + lhs.swap(rhs) ; +} + +template +class value_initialized +{ + private : + + // initialized does value-initialization by default. + initialized m_data; + + public : + + BOOST_GPU_ENABLED + value_initialized() + : + m_data() + { } + + BOOST_GPU_ENABLED + T const & data() const + { + return m_data.data(); + } + + BOOST_GPU_ENABLED + T& data() + { + return m_data.data(); + } + + BOOST_GPU_ENABLED + void swap(value_initialized & arg) + { + m_data.swap(arg.m_data); + } + + BOOST_GPU_ENABLED + operator T const &() const + { + return m_data; + } + + BOOST_GPU_ENABLED + operator T&() + { + return m_data; + } +} ; + + +template +BOOST_GPU_ENABLED +T const& get ( value_initialized const& x ) +{ + return x.data() ; +} + +template +BOOST_GPU_ENABLED +T& get ( value_initialized& x ) +{ + return x.data() ; +} + +template +BOOST_GPU_ENABLED +void swap ( value_initialized & lhs, value_initialized & rhs ) +{ + lhs.swap(rhs) ; +} + + +class initialized_value_t +{ + public : + + template BOOST_GPU_ENABLED operator T() const + { + return initialized().data(); + } +}; + +initialized_value_t const initialized_value = {} ; + + +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#endif diff --git a/ThirdParty/boost-Subset/boost/version.hpp b/ThirdParty/boost-Subset/boost/version.hpp new file mode 100644 index 0000000000..7b64aedb1b --- /dev/null +++ b/ThirdParty/boost-Subset/boost/version.hpp @@ -0,0 +1,32 @@ +// Boost version.hpp configuration header file ------------------------------// + +// (C) Copyright John maddock 1999. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/config for documentation + +#ifndef BOOST_VERSION_HPP +#define BOOST_VERSION_HPP + +// +// Caution: this is the only Boost header that is guaranteed +// to change with every Boost release. Including this header +// will cause a recompile every time a new Boost version is +// used. +// +// BOOST_VERSION % 100 is the patch level +// BOOST_VERSION / 100 % 1000 is the minor version +// BOOST_VERSION / 100000 is the major version + +#define BOOST_VERSION 105900 + +// +// BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION +// but as a *string* in the form "x_y[_z]" where x is the major version +// number, y is the minor version number, and z is the patch level if not 0. +// This is used by to select which library version to link to. + +#define BOOST_LIB_VERSION "1_59" + +#endif diff --git a/ThirdParty/boost-Subset/boost/visit_each.hpp b/ThirdParty/boost-Subset/boost/visit_each.hpp new file mode 100644 index 0000000000..6463ca9c2f --- /dev/null +++ b/ThirdParty/boost-Subset/boost/visit_each.hpp @@ -0,0 +1,27 @@ +// Boost.Signals library + +// Copyright Douglas Gregor 2001-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org/libs/signals + +#ifndef BOOST_VISIT_EACH_HPP +#define BOOST_VISIT_EACH_HPP + +namespace boost { + template + inline void visit_each(Visitor& visitor, const T& t, long) + { + visitor(t); + } + + template + inline void visit_each(Visitor& visitor, const T& t) + { + visit_each(visitor, t, 0); + } +} + +#endif // BOOST_VISIT_EACH_HPP diff --git a/ThirdParty/boost-Subset/boost/weak_ptr.hpp b/ThirdParty/boost-Subset/boost/weak_ptr.hpp new file mode 100644 index 0000000000..dd26869055 --- /dev/null +++ b/ThirdParty/boost-Subset/boost/weak_ptr.hpp @@ -0,0 +1,18 @@ +#ifndef BOOST_WEAK_PTR_HPP_INCLUDED +#define BOOST_WEAK_PTR_HPP_INCLUDED + +// +// weak_ptr.hpp +// +// Copyright (c) 2001, 2002, 2003 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// See http://www.boost.org/libs/smart_ptr/weak_ptr.htm for documentation. +// + +#include + +#endif // #ifndef BOOST_WEAK_PTR_HPP_INCLUDED diff --git a/ThirdParty/boost-Subset/libs/filesystem/bug/Jamfile.v2 b/ThirdParty/boost-Subset/libs/filesystem/bug/Jamfile.v2 new file mode 100644 index 0000000000..d8d6c0db93 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/bug/Jamfile.v2 @@ -0,0 +1,19 @@ +# Boost Filesystem Library Bug report Jamfile + +# Copyright Beman Dawes 2014 +# Distributed under the Boost Software License, Version 1.0. +# See www.boost.org/LICENSE_1_0.txt + +# Library home page: http://www.boost.org/libs/filesystem + +project + : requirements + /boost/filesystem//boost_filesystem + /boost/system//boost_system + msvc:on + ; + +exe bug : bug.cpp : static ; + +# install in ./bin; invoke via "b2", not "b2 install" +install bin : bug ; diff --git a/ThirdParty/boost-Subset/libs/filesystem/bug/bug.cpp b/ThirdParty/boost-Subset/libs/filesystem/bug/bug.cpp new file mode 100644 index 0000000000..6a1aea91e1 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/bug/bug.cpp @@ -0,0 +1,19 @@ +// filesystem/bug/bug.cpp + +#include +#include + +namespace fs = boost::filesystem; + +int test_main(int, char*[]) // note name +{ + BOOST_TEST(2 + 2 == 5); // one convertible-to-bool argument + BOOST_TEST_EQ(4 + 4, 9); // two EqualityComparible arguments + BOOST_TEST(fs::exists(".")); // should pass, so nothing reported + + return ::boost::report_errors(); // required +} + +// Copyright Beman Dawes 2014 +// Distributed under the Boost Software License, Version 1.0. +// www.boost.org/LICENSE_1_0.txt diff --git a/ThirdParty/boost-Subset/libs/filesystem/bug/index.html b/ThirdParty/boost-Subset/libs/filesystem/bug/index.html new file mode 100644 index 0000000000..985b9c0ccb --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/bug/index.html @@ -0,0 +1,13 @@ + + + + + +Automatic redirection failed, please go to +../doc/issue_reporting.html. +


+

© Copyright Beman Dawes, 2014

+

Distributed under the Boost Software License, Version 1.0. +See http://www.boost.org/LICENSE_1_0.txt

+ + diff --git a/ThirdParty/boost-Subset/libs/filesystem/build/Jamfile.v2 b/ThirdParty/boost-Subset/libs/filesystem/build/Jamfile.v2 new file mode 100644 index 0000000000..bda798733c --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/build/Jamfile.v2 @@ -0,0 +1,42 @@ +# Boost Filesystem Library Build Jamfile + +# (C) Copyright Beman Dawes 2002-2006 +# Distributed under the Boost Software License, Version 1.0. +# See www.boost.org/LICENSE_1_0.txt + +# See library home page at http://www.boost.org/libs/filesystem + +project boost/filesystem + : requirements hpux,gcc:_INCLUDE_STDC__SOURCE_199901 + : source-location ../src + : usage-requirements # pass these requirement to dependents (i.e. users) + shared:BOOST_FILESYSTEM_DYN_LINK=1 + static:BOOST_FILESYSTEM_STATIC_LINK=1 + ; + +SOURCES = + codecvt_error_category + operations + path + path_traits + portability + unique_path + utf8_codecvt_facet + windows_file_codecvt + ; + +lib boost_filesystem + : $(SOURCES).cpp ../../system/build//boost_system + : shared:BOOST_FILESYSTEM_DYN_LINK=1 + static:BOOST_FILESYSTEM_STATIC_LINK=1 + : + : # Boost.Filesystem uses some of Boost.System functions in inlined/templated + # functions, so clients that use Boost.Filesystem will have direct references + # to Boost.System symbols. On Windows, Darwin, and some other platforms, this + # means those clients have to be directly linked to Boost.System. For static + # linking this happens anyway, but for shared we need to make it happen. Since + # doing so is harmless even when not needed, we do it for all platforms. + shared:../../system/build//boost_system + ; + +boost-install boost_filesystem ; diff --git a/ThirdParty/boost-Subset/libs/filesystem/doc/Jamfile.v2 b/ThirdParty/boost-Subset/libs/filesystem/doc/Jamfile.v2 new file mode 100644 index 0000000000..4de58f538c --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/doc/Jamfile.v2 @@ -0,0 +1,19 @@ +# Boost Filesystem Library Example Jamfile + +# Copyright Beman Dawes 2010 + +# Distributed under the Boost Software License, Version 1.0. +# See www.boost.org/LICENSE_1_0.txt + +# Library home page: http://www.boost.org/libs/filesystem + +project + : requirements + /boost/filesystem//boost_filesystem + /boost/system//boost_system + msvc:on + static + ; + +exe path_table : path_table.cpp ; +install path_table-copy : path_table : . ; \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/doc/POSIX_filename_encoding.txt b/ThirdParty/boost-Subset/libs/filesystem/doc/POSIX_filename_encoding.txt new file mode 100644 index 0000000000..14c45c07f2 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/doc/POSIX_filename_encoding.txt @@ -0,0 +1,55 @@ +http://www.linuxfromscratch.org/blfs/view/svn/introduction/locale-issues.html + +"The POSIX standard mandates that the filename encoding is the encoding implied by the current LC_CTYPE locale category." + +------- + +http://mail.nl.linux.org/linux-utf8/2001-02/msg00103.html + +From: Markus Kuhn + +Tom Tromey wrote on 2001-02-05 00:36 UTC: +> Kai> IMAO, a *real* filesystem should use some encoding of ISO 10646 - +> Kai> UTF-8, UTF-16, or UTF-32 are all viable options. The same should +> Kai> be true for the kernel filename interfaces. +> +> I like this, but what should I do right now? + +The POSIX kernel file system interface is engraved into stone and +extremely unlikely to change. File names are arbitrary binary strings, +with only the '/' and '\0' bytes having any special semantics. You can +use arbitrary coded character sets on it as long as they do not +introduce '/' and '\0' bytes spuriously. Writers and readers have to +somehow agree on what encoding to use and the only really practical way +is to use the same encoding on all systems that share files. Eventually, +everyone will be using UTF-8 for file names on POSIX systems. Right now, +I would recommend users to use only ASCII for filenames, as this is +already UTF-8 and therefore simplifies migration. Using the ISO 8859, +JIS, etc. filenames should soon be considered deprecated practice. + +> I work on libgcj, the runtime component of gcj, the Java front end to +> GCC. In libgcj of course we use UCS-2 everywhere, since that is what +> Java does. Currently, for Unixy systems, we assume that all file +> names are UTF-8. + +The best solution is to assume that the file names are in the +locale-specific multi-byte encoding. Simply use mbrtowc and wcrtomb to +convert between Unicode and the locale-dependent multi-byte encoding +used in file names and text files if the ISO C 99 symbol +__STDC_ISO_10646__ is defined (which guarantees that wchar_t = UCS). On +Linux, this has been the case since glibc 2.2. + +> (Actually, we do something notably worse, which is +> assume that file names are Java-style UTF-8, with the weird encoding +> for \u0000.) + +\u0000 = NUL was never a character allowed in filenames under POSIX. +Raise an exception if someone tries to use it in a filename. Problem +solved. + +I never understood, why Java found it necessary to introduce two +distinct ASCII NUL characters. + +------ + +Interesting idea. Use iconv to create shift-jis or other mbcs test cases. diff --git a/ThirdParty/boost-Subset/libs/filesystem/doc/build_tutorial.bat b/ThirdParty/boost-Subset/libs/filesystem/doc/build_tutorial.bat new file mode 100644 index 0000000000..5c5cd355b4 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/doc/build_tutorial.bat @@ -0,0 +1,7 @@ +@echo off +copy /y tutorial.html tutorial.bak +html_include_files +# tutorial.bak tutorial.html +tutorial.html +rem Copyright Beman Dawes 2015 +rem Distributed under the Boost Software License, Version 1.0. +rem See http://www.boost.org/LICENSE_1_0.txt diff --git a/ThirdParty/boost-Subset/libs/filesystem/doc/deprecated.html b/ThirdParty/boost-Subset/libs/filesystem/doc/deprecated.html new file mode 100644 index 0000000000..9ba05e2a7a --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/doc/deprecated.html @@ -0,0 +1,387 @@ + + + + + + + +Filesystem Deprecated Features + + + + + + + + + + +
+ +boost.png (6897 bytes) + Filesystem Deprecated Features +
+ + + + +
Home    + Tutorial    + Reference    + FAQ    + Releases    + Portability    + V3 Intro    + V3 Design    + Deprecated    + Bug Reports    +
+ +

Deprecated names and features

+

As the library evolves over time, names sometimes +change or old features are removed to make way for new features. To ease transition, Boost.Filesystem deprecates +the old names and features, but by default continues to provide many of them. +The deprecated names and other workarounds can be suppressed by defining macro +BOOST_FILESYSTEM_NO_DEPRECATED, and this is recommended for all new code.

+

In the table, ✔ indicates a synonym or other +workaround is provided unless +BOOST_FILESYSTEM_NO_DEPRECATED is defined.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Component or location +

Old name, now deprecated

+ ✔ +

New name

class pathbranch_path()parent_path()
+ class path + canonize() +   + Function removed
+ class path + default_name_check() + ✔ + Function removed
+ class path + default_name_check(name_check) + ✔ + Function removed
+ class path + default_name_check_writable() + ✔ + Function removed
class pathdirectory_string()string
class pathexternal_directory_string()native()
class pathexternal_file_string()native()
class pathfile_string()string()
class pathhas_branch_path()has_parent_path()
class pathhas_leaf()has_filename()
class pathis_complere()is_absolute()
class pathleaf()filename()
+ class path + native_directory_string() + ✔ + string()
+ class path + native_file_string() + ✔ + string()
+ class path + normalize() + ✔ + Function removed
+ class path + path(const string_type& str, name_check) + ✔ + Function removed. Workaround ignores name_check + argument.
+ class path + path(const string_type::value_type* s,  name_check) + ✔ + Function removed. Workaround ignores name_check + argument.
+ class path +

remove_leaf()

+ ✔ +

remove_filename()

+ path.hpp + template<class String, class Traits>
+  class basic_path;
+   + Class template basic_path is replaced by class path. + No workaround for an explicitly coded basic_path is provided, + but see the next row - path.
+ path.hpp + typedef basic_path<std::string, path_traits> path + ✔ + class path
+ path.hpp + typedef basic_path<std::wstring, wpath_traits> wpath + ✔ + Removed; use class path instead. Workaround provides + typedef path wpath
+ operations.hpp + initial_path() + ✔ + Function removed
+ operations.hpp +

template <class Path>
+ Path complete(const Path& p,
+ const Path& base=
+   initial_path<Path>())

+ ✔ +

path absolute(const path& p, const path& base=
+  current_path())

+ operations.hpp + is_regular(file_status f) + ✔ +

+ is_regular_file(file_status f)

+ operations.hpp + symbolic_link_exists(const path& ph) +   + Function removed
+ class directory_entry + filename() + ✔ + Function removed, use path().filename() instead.
+ class directory_entry + leaf() + ✔ + Function removed, use path().filename() instead.
+ class directory_entry + string() + ✔ + Function removed, use path().string() instead.
+ Macro definitions + BOOST_WINDOW_API +   + No longer supported; API selection is always automatic.
+ Macro definitions + BOOST_POSIX_API +   + No longer supported; API selection is always automatic.
+ Macro definitions + BOOST_WINDOW_PATH +   + No longer supported; native path format selection is always automatic.
+ Macro definitions + BOOST_POSIX_PATH +   + No longer supported; native path format selection is always automatic.
+ +

Deprecation rationale

+

initial_path function

+

Full implementation of initial_path() would require +support from the C++ runtime startup code, and that doesn't seem likely to +happen. Depending on the user to call initial_path() at the +beginning of main() is too error prone.  An equivalent +function can trivially be provided by a user.

+ +
+

Revised +29 December, 2014

+ +

© Copyright Beman Dawes, 2002-2005, 2010

+

Use, modification, and distribution are subject to the Boost Software +License, Version 1.0. See +www.boost.org/LICENSE_1_0.txt

+ + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/doc/design.htm b/ThirdParty/boost-Subset/libs/filesystem/doc/design.htm new file mode 100644 index 0000000000..07977cac8c --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/doc/design.htm @@ -0,0 +1,353 @@ + + + + + + + +Boost Filesystem Library Design + + + + + +

+Filesystem +Library Design

+ +

Introduction
+Requirements
+Realities
+Rationale
+Abandoned_Designs
+References

+ +

Introduction

+ +

The primary motivation for beginning work on the Filesystem Library was +frustration with Boost administrative tools.  Scripts were written in +Python, Perl, Bash, and Windows command languages.  There was no single +scripting language familiar and acceptable to all Boost administrators. Yet they +were all skilled C++ programmers - why couldn't C++ be used as the scripting +language?

+ +

The key feature C++ lacked for script-like applications was the ability to +perform portable filesystem operations on directories and their contents. The +Filesystem Library was developed to fill that void.

+ +

The intent is not to compete with traditional scripting languages, but to +provide a solution for situations where C++ is already the language +of choice..

+ +

Requirements

+
    +
  • Be able to write portable script-style filesystem operations in modern + C++.
    +
    + Rationale: This is a common programming need. It is both an + embarrassment and a hardship that this is not possible with either the current + C++ or Boost libraries.  The need is particularly acute + when C++ is the only toolset allowed in the tool chain.  File system + operations are provided by many languages used on multiple platforms, + such as Perl and Python, as well as by many platform specific scripting + languages. All operating systems provide some form of API for filesystem + operations, and the POSIX bindings are increasingly available even on + operating systems not normally associated with POSIX, such as the Mac, z/OS, + or OS/390.
  • +
  • Work within the realities described below.
    +
    + Rationale: This isn't a research project. The need is for something that works on + today's platforms, including some of the embedded operating systems + with limited file systems. Because of the emphasis on portability, such a + library would be much more useful if standardized. That means being able to + work with a much wider range of platforms that just Unix or Windows and their + clones.
  • +
  • Avoid dangerous programming practices. Particularly, all-too-easy-to-ignore error notifications + and use of global variables. If a dangerous feature is provided, identify it as such.
    +
    + Rationale: Normally this would be covered by "the usual Boost requirements...", + but it is mentioned explicitly because the equivalent native platform and + scripting language interfaces often depend on all-too-easy-to-ignore error + notifications and global variables like "current + working directory".
  • +
  • Structure the library so that it is still useful even if some functionality + does not map well onto a given platform or directory tree. Particularly, much + useful functionality should be portable even to flat +(non-hierarchical) filesystems.
    +
    + Rationale: Much functionality which does not + require a hierarchical directory structure is still useful on flat-structure + filesystems.  There are many systems, particularly embedded systems, + where even very limited functionality is still useful.
  • +
+
    +
  • Interface smoothly with current C++ Standard Library input/output + facilities.  For example, paths should be + easy to use in std::basic_fstream constructors.
    +
    + Rationale: One of the most common uses of file system functionality is to + manipulate paths for eventual use in input/output operations.  + Thus the need to interface smoothly with standard library I/O.
  • +
  • Suitable for eventual standardization. The implication of this requirement + is that the interface be close to minimal, and that great care be take + regarding portability.
    +
    + Rationale: The lack of file system operations is a serious hole + in the current standard, with no other known candidates to fill that hole. + Libraries with elaborate interfaces and difficult to port specifications are much less likely to be accepted for + standardization.
  • +
  • The usual Boost requirements and + guidelines apply.
  • +
  • Encourage, but do not require, portability in path names.
    +
    + Rationale: For paths which originate from user input it is unreasonable to + require portable path syntax.
  • +
  • Avoid giving the illusion of portability where portability in fact does not + exist.
    +
    + Rationale: Leaving important behavior unspecified or "implementation defined" does a + great disservice to programmers using a library because it makes it appear + that code relying on the behavior is portable, when in fact there is nothing + portable about it. The only case where such under-specification is acceptable is when both users and implementors know from + other sources exactly what behavior is required, yet for some reason it isn't + possible to specify it exactly.
  • +
+

Realities

+
    +
  • Some operating systems have a single directory tree root, others have + multiple roots.
  • +
  • Some file systems provide both a long and short form of filenames.
  • +
  • Some file systems have different syntax for file paths and directory + paths.
  • +
  • Some file systems have different rules for valid file names and valid + directory names.
  • +
  • Some file systems (ISO-9660, level 1, for example) use very restricted + (so-called 8.3) file names.
  • +
  • Some operating systems allow file systems with different + characteristics to be "mounted" within a directory tree.  Thus a + ISO-9660 or Windows + file system may end up as a sub-tree of a POSIX directory tree.
  • +
  • Wide-character versions of directory and file operations are available on some operating + systems, and not available on others.
  • +
  • There is no law that says directory hierarchies have to be specified in + terms of left-to-right decent from the root.
  • +
  • Some file systems have a concept of file "version number" or "generation + number".  Some don't.
  • +
  • Not all operating systems use single character separators in path names.  Some use + paired notations. A typical fully-specified OpenVMS filename + might look something like this:
    +
    +    DISK$SCRATCH:[GEORGE.PROJECT1.DAT]BIG_DATA_FILE.NTP;5
    +

    + The general OpenVMS format is:
    +
    +     + Device:[directories.dot.separated]filename.extension;version_number
  • +
  • For common file systems, determining if two descriptors are for same + entity is extremely difficult or impossible.  For example, the concept of + equality can be different for each portion of a path - some portions may be + case or locale sensitive, others not. Case sensitivity is a property of the + pathname itself, and not the platform. Determining collating sequence is even + worse.
  • +
  • Race-conditions may occur. Directory trees, directories, files, and file attributes are in effect shared between all threads, processes, and computers which have access to the + filesystem.  That may well include computers on the other side of the + world or in orbit around the world. This implies that file system operations + may fail in unexpected ways. For example:
    +
    +      assert( exists("foo") == exists("foo") ); + // may fail!
    +     assert( is_directory("foo") == is_directory("foo"); + // may fail!
    +

    + In the first example, the file may have been deleted between calls to + exists().  In the second example, the file may have been deleted and then + replaced by a directory of the same name between the calls to is_directory().
  • +
  • Even though an application may be portable, it still will have to traffic + in system specific paths occasionally; user provided input is a common + example.
  • +
  • Symbolic links cause canonical and + normal form of some paths to represent different files or directories. For + example, given the directory hierarchy /a/b/c, with a symbolic + link in /a named x  pointing to b/c, + then under POSIX Pathname Resolution rules a path of "/a/x/.." + should resolve to "/a/b". If "/a/x/.." were first + normalized to "/a", it would resolve incorrectly. (Case supplied + by Walter Landry.)
  • +
+ +

Rationale

+ +

The Requirements and +Realities above drove much of the C++ interface design.  In particular, +the desire to make script-like code straightforward caused a great deal of +effort to go into ensuring that apparently simple expressions like exists( "foo" +) work as expected.

+ +

See the FAQ for the rationale behind many detailed +design decisions.

+ +

Several key insights went into the path class design:

+
    +
  • Decoupling of the input formats, internal conceptual (vector<string> + or other sequence) + model, and output formats.
  • +
  • Providing two input formats (generic and O/S specific) broke a major + design deadlock.
  • +
  • Providing several output formats solved another set of previously + intractable problems.
  • +
  • Several non-obvious functions (particularly decomposition and composition) + are required to support portable code. (Peter Dimov, Thomas Witt, Glen + Knowles, others.)
  • +
+ +

Error checking was a particularly difficult area. One key insight was that +with file and directory names, portability isn't a universal truth.  +Rather, the programmer must think out the question "What operating systems do I +want this path to be portable to?"  By providing support for several +answers to that question, the Filesystem Library alerts programmers of the need +to ask it in the first place.

+

Abandoned Designs

+

operations.hpp

+

Dietmar Khl's original dir_it design and implementation supported +wide-character file and directory names. It was abandoned after extensive +discussions among Library Working Group members failed to identify portable +semantics for wide-character names on systems not providing native support. See +FAQ.

+

Previous iterations of the interface design used explicitly named functions providing a +large number of convenience operations, with no compile-time or run-time +options. There were so many function names that they were very confusing to use, +and the interface was much larger. Any benefits seemed theoretical rather than +real.

+

Designs based on compile time (rather than runtime) flag and option selection +(via policy, enum, or int template parameters) became so complicated that they +were abandoned, often after investing quite a bit of time and effort. The need +to qualify attribute or option names with namespaces, even aliases, made use in +template parameters ugly; that wasn't fully appreciated until actually writing +real code.

+

Yet another set of convenience functions ( for example, remove with +permissive, prune, recurse, and other options, plus predicate, and possibly +other, filtering features) were abandoned because the details became both +complex and contentious.

+ +

What is left is a toolkit of low-level operations from which the user can +create more complex convenience operations, plus a very small number of +convenience functions which were found to be useful enough to justify inclusion.

+ +

path.hpp

+ +

There were so many abandoned path designs, I've lost track. Policy-based +class templates in several flavors, constructor supplied runtime policies, +operation specific runtime policies, they were all considered, often +implemented, and ultimately abandoned as far too complicated for any small +benefits observed.

+ +

Additional design considerations apply to Internationalization.

+ +

error checking

+ +

A number of designs for the error checking machinery were abandoned, some +after experiments with implementations. Totally automatic error checking was +attempted in particular. But automatic error checking tended to make the overall +library design much more complicated.

+ +

Some designs associated error checking mechanisms with paths.  Some with +operations functions.  A policy-based error checking template design was +partially implemented, then abandoned as too complicated for everyday +script-like programs.

+ +

The final design, which depends partially on explicit error checking function +calls,  is much simpler and straightforward, although it does depend to +some extent on programmer discipline.  But it should allow programmers who +are concerned about portability to be reasonably sure that their programs will +work correctly on their choice of target systems.

+ +

References

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[IBM-01]IBM Corporation, z/OS V1R3.0 C/C++ Run-Time +Library Reference, SA22-7821-02, 2001, + + www-1.ibm.com/servers/eserver/zseries/zos/bkserv/
[ISO-9660]International Standards Organization, 1988
[Kuhn]UTF-8 and Unicode FAQ for Unix/Linux, + + www.cl.cam.ac.uk/~mgk25/unicode.html
[MSDN] Microsoft Platform SDK for Windows, Storage Start +Page, + + msdn.microsoft.com/library/en-us/fileio/base/storage_start_page.asp
[POSIX-01]IEEE Std 1003.1-2001, ISO/IEC 9945:2002, and The Open Group Base Specifications, Issue 6. Also known as The + Single Unix Specification, Version 3. + Available from each of the organizations involved in its creation. For + example, read online or download from + + www.unix.org/single_unix_specification/. The ISO JTC1/SC22/WG15 - POSIX +homepage is + www.open-std.org/jtc1/sc22/WG15/
[URI]RFC-2396, Uniform Resource Identifiers (URI): Generic +Syntax, + www.ietf.org/rfc/rfc2396.txt
[UTF-16]Wikipedia, UTF-16, + + en.wikipedia.org/wiki/UTF-16
[Wulf-Shaw-73]William Wulf, Mary Shaw, Global +Variable Considered Harmful, ACM SIGPLAN Notices, 8, 2, 1973, pp. 23-34
+ +
+

Revised +26 December, 2014

+ +

© Copyright Beman Dawes, 2002

+

Use, modification, and distribution are subject to the Boost Software +License, Version 1.0. (See accompanying file +LICENSE_1_0.txt or copy at +www.boost.org/LICENSE_1_0.txt)

+ + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/doc/do_list.html b/ThirdParty/boost-Subset/libs/filesystem/doc/do_list.html new file mode 100644 index 0000000000..b6fc3eb8f0 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/doc/do_list.html @@ -0,0 +1,146 @@ + + + + + + + +Do List + + + + + +

Boost Filesystem Do List
+24 June 2010

+ +

Beta 1 comments

+
    +
  • + +

    Zach Laine:

  • +
+
+
The descriptions for portable_name() and portable_directory_name()
+appear to be at odds.
+
+portable_name() : ... && (name is "." or "..", and the first character
+not a period or hyphen)
+
+portable_directory_name(): ... && (name is "." or ".."  or contains no periods)
+
+Should portable_name() be "... && (name is "." or "..", or contains no
+periods) && (first character not a hyphen)"?  Maybe I'm missing
+something?
+
+
    +
  • +

    Scott McMurray - treat as Wish List:

  • +
+
+
- uncomplete(p, base)
+
+My pet request.  It may be useful to simplify other functions as well,
+since there's no current way to go from an absolute path to a relative
+one, meaning that most functions need to handle relative ones even
+when that might not be natural.  With this functionality,
+preconditions requiring absolute paths would be less onerous.
+
+   Precondition: p.is_absolute() && base.is_absolute()
+
+   Effects: Extracts a path, rp, from p relative to base such that
+canonical(p) == complete(rp, base).  Any ".." path elements in rp form
+a prefix.
+
+   Returns: The extracted path.
+
+   Postconditions: For the returned path, rp, rp.is_relative() ==
+(p.root_name() == b.root_name()).
+
+[Notes: This function simplifies paths by omitting context.  It is
+particularly useful for serializing paths such that it can be usefully
+moved between hosts where the context may be different, such as inside
+source control trees.  It can also be helpful for display to users,
+such as in shells where paths are often shown relative to $HOME.
+
+In the presence of symlinks, the result of this function may differ
+between implementations, as some may expand symlinks that others may
+not.  The simplest implementation uses canonical to expand both p and
+base, then removes the common prefix and prepends the requisite ".."
+elements.  Smarter implementations will avoid expanding symlinks
+unnecessarily.  No implementation is expected to discover new symlinks
+to return paths with fewer elements.]
+
+

Docs

+
    +
  • Reorganize files - delete examples that no longer apply.
  • +
  • Should minimal.css be changed to used relative font sizes? See + http://www.w3schools.com/CSS/pr_font_font-size.asp\
  • +
  • Document behavior of path::replace_extension has change WRT argument w/o a + dot.
  • +
  • Document leading //: no longer treated specially. + But is that really correct?
  • +
  • Behavior of root_path() has been changed. Change + needs to be propagated to trunk?
  • +
  • Regenerate path decomposition table.
  • +
+ +

Code

+

All

+
    +
  • Move semantics.
  • +
  • Use BOOST_DELETED, BOOST_DEFAULTED, where + appropriate.
  • +
  • Other C++0x features.
  • +
+

Class path

+
    +
  • Windows, POSIX, conversions for char16_t, char32_t for C++0x compilers.
  • +
  • Add Windows Alternate Data Stream test cases. See http://en.wikipedia.org/wiki/NTFS + Features.
  • +
  • Add test case: relational operators on paths differing only in trailing + separator. Rationale?
  • +
  • Provide the name check functions for more character types? Templatize? + take a path argument?
  • +
  • Add codepage 936/950/etc test cases.
  • +
  • Should UDT's be supported?
  • +
  • Should path iteration to a separator result in:
    + -- the actual separator used
    + -- the preferred separator
    + -- the generic separator <-- makes it easier to write portable code
    + -- a dot
  • +
+

Operations

+
    +
  • Would complete(), system_complete() be clearer if renamed absolute(), + absolute_system() (or absolute_native())?
  • +
  • Review all operations.cpp code for race conditions similar to #2925. Fix + or document.
  • +
  • Enable all BOOST_FILESYSTEM_NO_DEPRECATED code.
  • +
  • rename and remove names are problems. If users says "using + namespace boost::filesystem"
    + and some header included stdio, there is just too much chance of silent error.
  • +
  • create_directories error handling needs work.
  • +
  • Fold convenience.hpp into operations.hpp
  • +
  • Two argument recursive_directory_iterator ctor isn't recognizing throws(). + Would it be better to fold into a single two argument ctor with default?
  • +
  • Add the push_directory class from tools/release/required_files.cpp
  • +
+ +

Miscellaneous

+
    +
  • Regular classes need hash functions.
  • +
+ +
+

© Copyright Beman Dawes, 2010

+

Distributed under the Boost Software License, Version 1.0. See +www.boost.org/LICENSE_1_0.txt

+ + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/doc/faq.htm b/ThirdParty/boost-Subset/libs/filesystem/doc/faq.htm new file mode 100644 index 0000000000..ec177c23c6 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/doc/faq.htm @@ -0,0 +1,148 @@ + + + + + + + +Filesystem FAQ + + + + + + + + + + +
+ +boost.png (6897 bytes) + Filesystem FAQ +
+ + + + +
Home    + Tutorial    + Reference    + FAQ    + Releases    + Portability    + V3 Intro    + V3 Design    + Deprecated    + Bug Reports    +
+ +

+Frequently Asked Questions

+

General questions

+

Why not support a concept of specific kinds of file systems, such as posix_file_system or windows_file_system.

+

Portability is one of the most important requirements for the +library. Features specific to a particular operating system or file system +can always be accessed by using the operating system's API.

+ +

+Class path questions

+

Why base the generic pathname format on POSIX?

+

POSIX is an ISO Standard. It is the basis for the most familiar +pathname formats, +not just for POSIX-based operating systems but also for Windows and the +URL portion of URI's. It is ubiquitous and +familiar.  On many systems, it is very easy to implement because it is +either the native operating system format (Unix and Windows) or via a +operating system supplied +POSIX library (z/OS, OS/390, and many more.)

+

Why not use a full URI (Universal Resource Identifier) based path?

+

URI's would promise more than the Filesystem Library can actually deliver, +since URI's extend far beyond what most operating systems consider a file or a +directory.  Thus for the primary "portable script-style file system +operations" requirement of the Filesystem Library, full URI's appear to be over-specification.

+

Why isn't path a base class with derived directory_path and +file_path classes?

+

Why bother?  The behavior of all three classes is essentially identical. +Several early versions did require users to identify each path as a file or +directory path, and this seemed to increase coding errors and decrease code +readability. There was no apparent upside benefit.

+

Why do path decomposition functions yielding a single element return a +path rather than a string?

+

Interface simplicity. If they returned strings, flavors would be needed for +string, wstring, u16string, +u32string, and generic strings.

+

Why don't path member functions have overloads with error_code& arguments?

+

They have not been requested by users; the need for error reporting via +error_code seems limited to operations failures rather than path failures.

+

Operations function questions

+

Why not supply a 'handle' type, and let the file and directory operations +traffic in it?

+

It isn't clear there is any feasible way to meet the "portable script-style +file system operations" requirement with such a system. File systems exist where operations are usually performed on + some non-string handle type. The classic Mac OS has been mentioned explicitly as a case where +trafficking in paths isn't always natural.   

+

The case for the "handle" (opaque data type to identify a file) +style may be strongest for directory iterator value type.  (See Jesse Jones' Jan 28, +2002, Boost postings). However, as class path has evolved, it seems sufficient +even as the directory iterator value type.

+

Why are the operations functions so low-level?

+

To provide a toolkit from which higher-level functionality can be created.

+

An +extended attempt to add convenience functions on top of, or as a replacement +for, the low-level functionality failed because there is no widely acceptable +set of simple semantics for most convenience functions considered.  +Attempts to provide alternate semantics via either run-time options or +compile-time polices became overly complicated in relation to the value +delivered, or became contentious.  OTOH, the specific functionality needed for several trial +applications was very easy for the user to construct from the lower-level +toolkit functions.  See Failed +Attempts.

+

Isn't it inconsistent then to provide a few convenience functions?

+

Yes, but experience with both this library, POSIX, and Windows, indicates +the utility of certain convenience functions, and that it is possible to provide +simple, yet widely acceptable, semantics for them. For example, remove_all().

+

Why are there directory_iterator overloads for operations.hpp +predicate functions? Isn't two ways to do the same thing poor design?

+

Yes, two ways to do the same thing is often a poor design practice. But the +iterator versions are often much more efficient. Calling status() during +iteration over a directory containing 15,000 files took 6 seconds for the path +overload, and 1 second for the iterator overload, for tests on a freshly booted +machine. Times were .90 seconds and .30 seconds, for tests after prior use of +the directory. This performance gain is large enough to justify deviating from +preferred design practices. Neither overload alone meets all needs.

+

Why are the operations functions so picky about errors?

+

Safety. The default is to be safe rather than sorry. This is particularly +important given the reality that on many computer systems files and directories +are globally shared resources, and thus subject to +race conditions.

+

Why are attributes accessed via named functions rather than property maps?

+

For commonly used attributes (existence, directory or file, emptiness), +simple syntax and guaranteed presence outweigh other considerations. Because +access to many other attributes is inherently system dependent, +property maps are viewed as the best hope for access and modification, but it is +better design to provide such functionality in a separate library. (Historical +note: even the apparently simple attribute "read-only" turned out to be so +system depend as to be disqualified as a "guaranteed presence" operation.)

+

Why isn't automatic name portability error detection provided?

+

A number (at least six) of designs for name validity error +detection were evaluated, including at least four complete implementations.  +While the details for rejection differed, all of the more powerful name validity checking +designs distorted other +otherwise simple aspects of the library. Even the simple name checking provided +in prior library versions was a constant source of user complaints. While name checking can be helpful, it +isn't important enough to justify added a lot of additional complexity.

+

Why are paths sometimes manipulated by member functions and sometimes by +non-member functions?

+

The design rule is that purely lexical operations are supplied as class +path member +functions, while operations performed by the operating system are provided as +free functions.

+
+

Revised +29 December, 2014

+

© Copyright Beman Dawes, 2002

+

Use, modification, and distribution are subject to the Boost Software +License, Version 1.0. See +www.boost.org/LICENSE_1_0.txt

\ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/doc/index.htm b/ThirdParty/boost-Subset/libs/filesystem/doc/index.htm new file mode 100644 index 0000000000..526f26543b --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/doc/index.htm @@ -0,0 +1,475 @@ + + + + + + + +Filesystem Home + + + + + + + + + + +
+ +boost.png (6897 bytes) + Filesystem Library
+ Version 3
+
+ + + + +
Home    + Tutorial    + Reference    + FAQ    + Releases    + Portability    + V3 Intro    + V3 Design    + Deprecated    + Bug Reports   +
+ + + + + + + + +
+ Contents
+ Introduction
+ Documentation
+ Using the library
+ Coding guidelines
+ Cautions
+ Headers
+ Example programs
+ Implementation
+ Macros
+ Building the object-library
+ Notes for Cygwin users
+ Version history
+  with acknowledgements
+

+
+
+ + + + +
+

This is Version 3 of the Filesystem library. Version 2 is + not longer supported. 1.49.0 was the last release of Boost to supply + Version 2

+
+
+
+ +

Introduction

+

The Boost.Filesystem library provides facilities to manipulate files and directories, +and the paths that identify them.

+ +

The features of the library include:

+ +
    +
  • A modern C++ interface, highly compatible with the C++ standard + library.
  • +
+
+
+ +

Many users say the interface is their primary motivation for using +Boost.Filesystem. They like its use of familiar idioms based on standard library +containers, iterators, and algorithms. They like having errors reported by +throwing exceptions.

+ +
+
+
    +
  • Portability between operating systems.
      +
    • At the C++ syntax level, it is convenient to learn and use one interface + regardless of the operating system.
    • +
    • At the semantic level, behavior of code is reasonably portable across + operating systems.
    • +
    • Dual generic or native path format support encourages program + portability, yet still allows communication with users in system specific + formats.
    • +
    +
  • +
  • Error handling and reporting via C++ exceptions (the default) or error + codes.
      +
    • C++ exceptions are the preferred error reporting mechanism for most + applications. The exception thrown includes the detailed error code + information important for diagnosing the exact cause of file system errors.
    • +
    • Error reporting via error code allows user code that provides detailed + error recovery to avoid becoming so littered with try-catch blocks as to be + unmaintainable.
    • +
    +
  • +
  • Suitable for a broad spectrum of applications, ranging from simple + script-like operations to extremely complex production code.
      +
    • At the simple script-like end of the spectrum, the intent is not to + compete with Python, Perl, or shell languages, but rather to provide + filesystem operations when C++ is already the language of choice.
    • +
    • Finer grained control over operations and error handling is available to + support more complex applications or other cases where throwing exceptions + isn't desired.
    • +
    +
  • +
+ +

A proposal, + +N1975, to include Boost.Filesystem in Technical Report 2 has been accepted +by the C++ Standards Committee. That proposal was based on version 2 of +Boost.Filesystem; presumably the final TR2 form will be based on version 3.

+ +

Documentation

+ +

Tutorial - A gentle introduction to +the library, with example programs provided for you to experiment with.

+ +

Reference - Formal documentation in the +style of the C++ standard for +every component of the library.

+ +

FAQ - Frequently asked questions.

+ +

Portability Guide - Help for those +concerned with writing code to run on multiple operating systems.

+ +

Deprecated Features - Identifies +deprecated features and their replacements.

+ +

Version 3 Introduction - Aimed at users of prior +Boost.Filesystem versions.

+ +

Version 3 Design - Historical document +from the start of the Version 3 design process.

+ +

Original Design - Historical document from +the start of the Version 1 design process.

+ +

Do List - Boost.Filesystem development work +in the pipeline.

+ +

Using the library

+

Boost.Filesystem is implemented as a separately compiled library, so you must install +binaries in a location that can be found by your linker. If you followed the +Boost Getting Started instructions, that's already been done for you.

+

Coding guidelines

+

For new code, defining BOOST_FILESYSTEM_NO_DEPRECATED before +including filesystem headers is strongly recommended. This prevents inadvertent +use of old features, particularly legacy function names, that have been replaced +and are going to go away in the future.

+

Cautions

+

After reading the tutorial you can dive right into simple, +script-like programs using the Filesystem Library! Before doing any serious +work, however, there a few cautions to be aware of:

+

Effects and Postconditions not guaranteed in the presence of race-conditions

+

Filesystem function specifications follow the C++ Standard Library form, specifying behavior in terms of +effects and postconditions. If +a race-condition exists, a function's +postconditions may no longer be true by the time the function returns to the +caller.

+
+

Explanation: The state of files and directories is often +globally shared, and thus may be changed unexpectedly by other threads, +processes, or even other computers having network access to the filesystem. As an +example of the difficulties this can cause, note that the following asserts +may fail:

+
+

assert( exists( "foo" ) == exists( "foo" ) );  // +(1)
+
+remove_all( "foo" );
+assert( !exists( "foo" ) );  // (2)
+
+assert( is_directory( "foo" ) == is_directory( "foo" ) ); // +(3)

+
+

(1) will fail if a non-existent "foo" comes into existence, or an +existent "foo" is removed, between the first and second call to exists(). +This could happen if, during the execution of the example code, another thread, +process, or computer is also performing operations in the same directory.

+

(2) will fail if between the call to remove_all() and the call to +exists() a new file or directory named "foo" is created by another +thread, process, or computer.

+

(3) will fail if another thread, process, or computer removes an +existing file "foo" and then creates a directory named "foo", between the +example code's two calls to is_directory().

+
+

May throw exceptions

+

Unless otherwise specified, Boost.Filesystem functions throw +basic_filesystem_error +exceptions if they cannot successfully complete their operational +specifications. Also, implementations may use C++ Standard Library functions, +which may throw std::bad_alloc. These exceptions may be thrown even +though the error condition leading to the exception is not explicitly specified +in the function's "Throws" paragraph.

+

All exceptions thrown by the Filesystem +Library are implemented by calling +boost::throw_exception(). Thus exact behavior may differ depending on +BOOST_NO_EXCEPTIONS at the time the filesystem source files are compiled.

+

Non-throwing versions are provided of several functions that are often used +in contexts where error codes may be the preferred way to report an error.

+ +

Headers

+ +

The Boost.Filesystem library provides several headers:

+ +
    +
  • Header <boost/filesystem.hpp> + provides access to all features of the library, except file streams.
  • +
  • Header <boost/filesystem/fstream.hpp> + inherits the same components as the C++ Standard + Library's fstream header, but files are identified by const path& + arguments rather that const char* arguments.
  • +
+

Example programs

+

See the tutorial for example programs.

+

Other examples

+

The programs used to generate the Boost regression test status tables use the +Filesystem Library extensively.  See:

+ +

Implementation

+

The current implementation supports operating systems which provide +the POSIX or Windows API's.

+

The library is in regular use on Apple OS X, HP-UX, IBM AIX, Linux, +Microsoft Windows, SGI IRIX, and Sun Solaris operating systems using a variety +of compilers.

+

Macros

+

Users may defined the following macros if desired. Sensible defaults are +provided, so users can ignore these macros unless they have special needs.

+ + + + + + + + + + + + + + + + + + + + + +
Macro NameDefaultEffect if defined
BOOST_FILESYSTEM_NO_DEPRECATEDNot defined.Deprecated features are excluded from headers.
BOOST_FILESYSTEM_DYN_LINKDefined if BOOST_ALL_DYN_LINK is defined, + otherwise not defined.The Boost.Filesystem library is dynamically linked. If not defined, + static linking is assumed.
BOOST_FILESYSTEM_NO_LIBDefined if BOOST_ALL_NO_LIB is defined, + otherwise not defined.Boost.Filesystem library does not use the Boost auto-link + facility.
+

User-defined BOOST_POSIX_API and BOOST_WINDOWS_API macros are no longer +supported.

+

Building the object-library

+

The object-library will be built automatically if you are using the Boost +build system. See +Getting Started. It can also be +built manually using a Jamfile +supplied in directory libs/filesystem/build, or the user can construct an IDE +project or make file which includes the object-library source files.

+

The object-library source files are +supplied in directory libs/filesystem/src. These source files implement the +library for POSIX or Windows compatible operating systems; no implementation is +supplied for other operating systems. Note that many operating systems not +normally thought of as POSIX systems, such as mainframe legacy +operating systems or embedded operating systems, support POSIX compatible file +systems and so will work with the Filesystem Library.

+

The object-library can be built for static or dynamic (shared/dll) linking. +This is controlled by the BOOST_ALL_DYN_LINK or BOOST_FILESYSTEM_DYN_LINK +macros. See the Separate +Compilation page for a description of the techniques used.

+

Note for Cygwin users

+

Cygwin version 1.7 or later is +required because only versions of GCC with wide character strings are supported.

+ +

The library's implementation code treats Cygwin as a Windows platform, and +thus uses the Windows API and uses Windows path syntax as the native path +syntax.

+ +

Version history

+ +

Version 4

+ +

Under development - Add support for the +ISO +C++ File System Technical Specification. The Filesystem TS is based on +Boost.Filesystem Version 3, with only a small number of changes. Most user code +written for Version 3 should work unchanged with Version 4.

+ +

Version 3

+ +

Boost 1.44.0 - June, 2010 - Internationalization via single class path. +More uniform error handling.

+ +

Peter Dimov suggested use of a single path class rather than a basic_path +class template. That idea was the basis for the Version 3 redesign.

+ +

Thanks for comments from Robert Stewart, Zach Laine, Peter Dimov, Gregory +Peele, Scott McMurray, John Bytheway, Jeff Flinn, Jeffery Bosboom.

+ +

Version 2

+ +

Boost 1.34.0 - May, 2007 - Internationalization via basic_path +template.

+ +

So many people have contributed comments and bug reports that it isn't any +longer possible to acknowledge them individually. That said, Peter Dimov and Rob +Stewart need to be specially thanked for their many constructive criticisms and +suggestions. Terence +Wilson and Chris Frey contributed timing programs which helped illuminate +performance issues.

+ +

Version 1

+ +

Boost 1.30.0 - March, 2003 - Initial official Boost release.

+ +

The Filesystem Library was designed and implemented by Beman Dawes. The +original directory_iterator and filesystem_error classes were +based on prior work from Dietmar Kuehl, as modified by Jan Langer. Thomas Witt +was a particular help in later stages of initial development. Peter Dimov and +Rob Stewart made many useful suggestions and comments over a long period of +time. Howard Hinnant helped with internationalization issues.

+ +

Key design requirements and +design realities were developed during +extensive discussions on the Boost mailing list, followed by comments on the +initial implementation. Numerous helpful comments were then received during the +Formal Review.

Participants included +Aaron Brashears, +Alan Bellingham, +Aleksey Gurtovoy, +Alex Rosenberg, +Alisdair Meredith, +Andy Glew, +Anthony Williams, +Baptiste Lepilleur, +Beman Dawes, +Bill Kempf, +Bill Seymour, +Carl Daniel, +Chris Little, +Chuck Allison, +Craig Henderson, +Dan Nuffer, +Dan'l Miller, +Daniel Frey, +Darin Adler, +David Abrahams, +David Held, +Davlet Panech, +Dietmar Kuehl, +Douglas Gregor, +Dylan Nicholson, +Ed Brey, +Eric Jensen, +Eric Woodruff, +Fedder Skovgaard, +Gary Powell, +Gennaro Prota, +Geoff Leyland, +George Heintzelman, +Giovanni Bajo, +Glen Knowles, +Hillel Sims, +Howard Hinnant, +Jaap Suter, +James Dennett, +Jan Langer, +Jani Kajala, +Jason Stewart, +Jeff Garland, +Jens Maurer, +Jesse Jones, +Jim Hyslop, +Joel de Guzman, +Joel Young, +John Levon, +John Maddock, +John Williston, +Jonathan Caves, +Jonathan Biggar, +Jurko, +Justus Schwartz, +Keith Burton, +Ken Hagen, +Kostya Altukhov, +Mark Rodgers, +Martin Schuerch, +Matt Austern, +Matthias Troyer, +Mattias Flodin, +Michiel Salters, +Mickael Pointier, +Misha Bergal, +Neal Becker, +Noel Yap, +Parksie, +Patrick Hartling, Pavel Vozenilek, +Pete Becker, +Peter Dimov, +Rainer Deyke, +Rene Rivera, +Rob Lievaart, +Rob Stewart, +Ron Garcia, +Ross Smith, +Sashan, +Steve Robbins, +Thomas Witt, +Tom Harris, +Toon Knapen, +Victor Wagner, +Vincent Finn, +Vladimir Prus, and +Yitzhak Sapir + +

A lengthy discussion on the C++ committee's library reflector illuminated the "illusion +of portability" problem, particularly in postings by PJ Plauger and Pete Becker.

+ +

Walter Landry provided much help illuminating symbolic link use cases for +version 1.31.0. 

+ +
+

Revised +10 January, 2015

+ +

© Copyright Beman Dawes, 2002-2005

+

Use, modification, and distribution are subject to the Boost Software +License, Version 1.0. See +www.boost.org/LICENSE_1_0.txt

+ + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/doc/issue_reporting.html b/ThirdParty/boost-Subset/libs/filesystem/doc/issue_reporting.html new file mode 100644 index 0000000000..44b80b2b67 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/doc/issue_reporting.html @@ -0,0 +1,224 @@ + + + + + + +Filesystem issue reporting + + + + + + + + + + +
+ +boost.png (6897 bytes) + Filesystem Bug Reporting +
+ + + + +
Home    + Tutorial    + Reference    + FAQ    + Releases    + Portability    + V3 Intro    + V3 Design    + Deprecated    + Bug Reports    +
+ +

Boost.Filesystem issues such as bug reports or feature requests should be +reported via a Boost Trac ticket.

+

GitHub pull requests +are encouraged, too, although anything beyond really trivial fixes needs a trac +ticket.

+

Bug reports

+

A timely response to your bug report is much more likely if the problem can +be immediately reproduced without guesswork and regression tests can be easily +created.

+

You need to provide the following:

+
    +
  1. A simple test program +that:
      +
    • Illustrates the problem, and
    • +
    • Automatically yields an unambiguous pass or fail result - returning zero + for pass and non-zero for fail is preferred, and
    • +
    • Can be used as the basis for adding tests to Boost.Filesystem's + regression test suite.
    • +
    +
  2. +
  3. The compiler, standard library, platform, and Boost version you + used to build and run your test program.
  4. +
  5. A description of how to build and run the test program. +
  6. +
  7. A copy of the output from the test + program, if any.
  8. +
  9. An email address for follow-up questions.
  10. +
+

See Rationale to find out why the above is needed.

+

For a mostly automatic framework to provide the above, read on!

+

Bug reporting framework

+

The directory <boost-root>/libs/filesystem/bug> provides a bug test program (bug.cpp) +and a build file (Jamfile.v2). Here is what you need to do:

+
    +
  1. Add one or more test cases to bug.cpp + using any text or program editor.
  2. +
  3. Build and test.
  4. +
  5. Attach copies of the Test output and test + program to the Trac + ticket.
  6. +
+

That's it! When you complete those steps, you will be done!

+

The test output supplies all of the basic information about the compiler, std +library, platform, Boost version, and command line, and the test cases you have +added should make it easy for the library maintainer to reproduce the problem.

+

Using the framework

+

bug.cpp

+

Here is bug.cpp as supplied. To report a real bug, use +BOOST_TEST and BOOST_TEST_EQ macros to build your own +test cases. You can delete the three tests already in bug.cpp:

+
+
#include <boost/detail/lightweight_test_report.hpp>
+#include <boost/filesystem.hpp>
+
+namespace fs = boost::filesystem;
+
+int test_main(int, char*[])     // note name
+{
+  BOOST_TEST(2 + 2 == 5);       // one convertible-to-bool argument; this one fails!
+  BOOST_TEST_EQ(4 + 4, 9);      // two EqualityComparible arguments; this one fails!
+  BOOST_TEST(fs::exists("."));  // should pass, so nothing should be reported
+
+  return ::boost::report_errors();   // required
+}
+
+
+

Build and test

+ + +

POSIX-like systems:

+ + +
+
cd <boost-root>/libs/filesystem/bug
+../../../b2 -a
+bin/bug
+
+

Windows:

+
+
cd <boost-root>\libs\filesystem\bug
+..\..\..\b2 -a
+bin\bug
+
+

Test output

+ + +

Running the test on Windows produced this test output:

+ + +
+ + +
Microsoft Visual C++ version 14.0
+Dinkumware standard library version 610
+Win32
+Boost version 1.58.0
+Command line: bin\bug
+bug.cpp(10): test '2 + 2 == 5' failed in function
+  'int __cdecl test_main(int,char *[])'
+bug.cpp(11): test '4 + 4 == 9' failed in function
+  'int __cdecl test_main(int,char *[])': '8' != '9'
+2 errors detected.
+
+

The test framework runs test_main() from a try +block with a catch block that reports exceptions via +std::exception what(). So the output will differ if an exception is +thrown.

+

Background information

+

You should now have enough information to file an easy-to-reproduce bug +report. So you can skip reading the rest of this page unless you need to do +something a bit out of the ordinary.

+

b2 command line

+

b2 (formerly bjam) usage:  b2 +[options] [properties] [target]

+

Boost.Build b2 has many options, properties, and targets, but you will not +need most of them for bug reporting. Here are a few you might find helpful:

+

Options

+
+

-a    Rebuild everything rather than + just out-of-date targets. Used in the example build above to ensure libraries + are built with the same setup as the test program.

+
+

Properties

+
+

address-model=n  n is 32 or 64. + Explicitly request either 32-bit or 64-bit code generation. This typically + requires that your compiler is appropriately configured.

+

variant=string      string is + debug or release.

+

toolset=string      The C++ + compiler to use. For example, gcc-4.9, clang-3.3, + or msvc-14.0.

+

include=string      + Additional include paths for C and C++ compilers.

+

cxxflags=string      + Custom options to pass to the C++ compiler.

+

define=string      + Additional macro definitions for C and C++ compilers. string should be + either SYMBOL or + SYMBOL=VALUE

+
+

Rationale

+

Here is the request list again, with rationale added:

+
    +
  1. A simple test program +that:
      +
    • +

      Illustrates the problem [Code communicates more clearly than + prose. If it looks like it will it will take some time to figure out exactly what the + problem is, or worse yet, might result in a wild-goose chase, the bug report + gets set aside to be worked on later and then is often forgotten.] and

    • +
    • Automatically yields an unambiguous pass or fail result - returning zero + for pass and non-zero for fail is preferred [Prevents + miscommunications and allows use in automatic regression tests.], and
    • +
    • Can be used as the basis for adding tests to Boost.Filesystem's + regression test suite [With good test cases fixes come easier and + regressions become less likely].
    • +
    +
  2. +
  3. The compiler, standard library, platform, and Boost version you + used to build and run your test program. [The implementation includes much + platform dependent code, and also depends on the other factors mentioned. Know + these things upfront brings the bug report into focus without having to ask + for more information. ]
  4. +
  5. A description of how to build and run the test program. [If b2 + (formerly known as bjam) is used as the build engine, this is not a concern, + but otherwise much more information is needed.]
  6. +
  7. A copy of the output from the test + program, if any. [Avoids misinterpreting results.]
  8. +
  9. An email address for follow-up questions. [Trac comments are the + primary means of response, but it is disheartening when a trac question is not + answered and there is no email address attached for followup.]
  10. +
+
+

Revised +28 January, 2015

+

© Copyright Beman Dawes, 2014

+

Distributed under the Boost Software +License, Version 1.0. See +www.boost.org/LICENSE_1_0.txt

+ + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/doc/path_table.cpp b/ThirdParty/boost-Subset/libs/filesystem/doc/path_table.cpp new file mode 100644 index 0000000000..cb811cacfe --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/doc/path_table.cpp @@ -0,0 +1,260 @@ +// Generate an HTML table showing path decomposition ---------------------------------// + +// Copyright Beman Dawes 2005. + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// See http://www.boost.org/libs/filesystem for documentation. + +// For purposes of generating the table, support both POSIX and Windows paths + +#include "boost/filesystem.hpp" +#include +#include + +using boost::filesystem::path; +using std::string; +using std::cout; + +namespace +{ + std::ifstream infile; + std::ofstream posix_outfile; + std::ifstream posix_infile; + std::ofstream outfile; + + bool posix; + + const string empty_string; + + struct column_base + { + virtual string heading() const = 0; + virtual string cell_value( const path & p ) const = 0; + }; + + struct c0 : public column_base + { + string heading() const { return string("string()"); } + string cell_value( const path & p ) const { return p.string(); } + } o0; + + struct c1 : public column_base + { + string heading() const { return string("generic_
string()
"); } + string cell_value( const path & p ) const { return p.generic_string(); } + } o1; + + struct c2 : public column_base + { + string heading() const { return string("Iteration
over
Elements"); } + string cell_value( const path & p ) const + { + string s; + for( path::iterator i(p.begin()); i != p.end(); ++i ) + { + if ( i != p.begin() ) s += ','; + s += (*i).string(); + } + return s; + } + } o2; + + struct c3 : public column_base + { + string heading() const { return string("root_
path()
"); } + string cell_value( const path & p ) const { return p.root_path().string(); } + } o3; + + struct c4 : public column_base + { + string heading() const { return string("root_
name()
"); } + string cell_value( const path & p ) const { return p.root_name().string(); } + } o4; + + struct c5 : public column_base + { + string heading() const { return string("root_
directory()
"); } + string cell_value( const path & p ) const { return p.root_directory().string(); } + } o5; + + struct c6 : public column_base + { + string heading() const { return string("relative_
path()
"); } + string cell_value( const path & p ) const { return p.relative_path().string(); } + } o6; + + struct c7 : public column_base + { + string heading() const { return string("parent_
path()
"); } + string cell_value( const path & p ) const { return p.parent_path().string(); } + } o7; + + struct c8 : public column_base + { + string heading() const { return string("filename()"); } + string cell_value( const path & p ) const { return p.filename().string(); } + } o8; + + const column_base * column[] = { &o2, &o0, &o1, &o3, &o4, &o5, &o6, &o7, &o8 }; + + // do_cell ---------------------------------------------------------------// + + void do_cell( const string & test_case, int i ) + { + string temp = column[i]->cell_value(path(test_case)); + string value; + outfile << ""; + if (temp.empty()) + value = "empty"; + else + value = string("") + temp + ""; + + if (posix) + posix_outfile << value << '\n'; + else + { + std::getline(posix_infile, temp); + if (value != temp) // POSIX and Windows differ + { + value.insert(0, "
"); + value.insert(0, temp); + value.insert(0, ""); + value += ""; + } + outfile << value; + } + outfile << "\n"; + } + +// do_row ------------------------------------------------------------------// + + void do_row( const string & test_case ) + { + outfile << "\n"; + + if (test_case.empty()) + outfile << "empty\n"; + else + outfile << "" << test_case << "\n"; + + for ( int i = 0; i < sizeof(column)/sizeof(column_base&); ++i ) + { + do_cell( test_case, i ); + } + + outfile << "\n"; + } + +// do_table ----------------------------------------------------------------// + + void do_table() + { + outfile << + "

Path Decomposition Table

\n" + "

Shaded entries indicate cases where POSIX and Windows\n" + "implementations yield different results. The top value is the\n" + "POSIX result and the bottom value is the Windows result.\n" + "\n" + "

\n" + ; + + // generate the column headings + + outfile << "

\n"; + + for ( int i = 0; i < sizeof(column)/sizeof(column_base&); ++i ) + { + outfile << "\n"; + } + + outfile << "\n"; + + // generate a row for each input line + + string test_case; + while ( std::getline( infile, test_case ) ) + { + if (!test_case.empty() && *--test_case.end() == '\r') + test_case.erase(test_case.size()-1); + if (test_case.empty() || test_case[0] != '#') + do_row( test_case ); + } + + outfile << "
Constructor
argument
" << column[i]->heading() << "
\n"; + } + +} // unnamed namespace + +// main ------------------------------------------------------------------------------// + +#define BOOST_NO_CPP_MAIN_SUCCESS_MESSAGE +#include + +int cpp_main( int argc, char * argv[] ) // note name! +{ + if ( argc != 5 ) + { + std::cerr << + "Usage: path_table \"POSIX\"|\"Windows\" input-file posix-file output-file\n" + "Run on POSIX first, then on Windows\n" + " \"POSIX\" causes POSIX results to be saved in posix-file;\n" + " \"Windows\" causes POSIX results read from posix-file\n" + " input-file contains the paths to appear in the table.\n" + " posix-file will be used for POSIX results\n" + " output-file will contain the generated HTML.\n" + ; + return 1; + } + + infile.open( argv[2] ); + if ( !infile ) + { + std::cerr << "Could not open input file: " << argv[2] << std::endl; + return 1; + } + + if (string(argv[1]) == "POSIX") + { + posix = true; + posix_outfile.open( argv[3] ); + if ( !posix_outfile ) + { + std::cerr << "Could not open POSIX output file: " << argv[3] << std::endl; + return 1; + } + } + else + { + posix = false; + posix_infile.open( argv[3] ); + if ( !posix_infile ) + { + std::cerr << "Could not open POSIX input file: " << argv[3] << std::endl; + return 1; + } + } + + outfile.open( argv[4] ); + if ( !outfile ) + { + std::cerr << "Could not open output file: " << argv[2] << std::endl; + return 1; + } + + outfile << "\n" + "\n" + "Path Decomposition Table\n" + "\n" + "\n" + ; + + do_table(); + + outfile << "\n" + "\n" + ; + + return 0; +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/doc/path_table.txt b/ThirdParty/boost-Subset/libs/filesystem/doc/path_table.txt new file mode 100644 index 0000000000..40809c6774 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/doc/path_table.txt @@ -0,0 +1,50 @@ +# Paths for the reference.html Path Decomposition Table +# +# This is the input file for path_table, which generates the actual html +# +# Copyright Beman Dawes 2010 +# +# Distributed under the Boost Software License, Version 1.0. +# See www.boost.org/LICENSE_1_0.txt +# +# Note that an empty line is treated as input rather than as a comment + +. +.. +foo +/ +/foo +foo/ +/foo/ +foo/bar +/foo/bar +//net +//net/foo +///foo/// +///foo///bar +/. +./ +/.. +../ +foo/. +foo/.. +foo/./ +foo/./bar +foo/.. +foo/../ +foo/../bar +c: +c:/ +c:foo +c:/foo +c:foo/ +c:/foo/ +c:/foo/bar +prn: +c:\ +c:foo +c:\foo +c:foo\ +c:\foo\ +c:\foo/ +c:/foo\bar diff --git a/ThirdParty/boost-Subset/libs/filesystem/doc/portability_guide.htm b/ThirdParty/boost-Subset/libs/filesystem/doc/portability_guide.htm new file mode 100644 index 0000000000..676c25cb30 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/doc/portability_guide.htm @@ -0,0 +1,242 @@ + + + + + + + +Portability Guide + + + + + +

+Path +Name Portability +Guide

+ + + + +
Home    + Tutorial    + Reference    + FAQ    + Releases    + Portability    + V3 Intro    + V3 Design    + Deprecated    + Bug Reports    +
+ +

+Introduction
+name_check functions
+File and directory name recommendations

+

Introduction

+

Like any other C++ program which performs I/O operations, there is no +guarantee that a program using Boost.Filesystem will be portable between +operating systems. Critical aspects of I/O such as how the operating system +interprets paths are unspecified by the C and C++ Standards.

+

It is not possible to know if a file or directory name will be +valid (and thus portable) for an unknown operating system. There is always the possibility that an operating system could use +names which are unusual (numbers less than 4096, for example) or very +limited in size (maximum of six character names, for example). In other words, +portability is never absolute; it is always relative to specific operating +systems or +file systems.

+

It is possible, however, to know in advance if a directory or file name is likely to be valid for a particular +operating system. It is also possible to construct names which are +likely to be portable to a large number of modern and legacy operating systems.

+ +

Almost all modern operating systems support multiple file systems. At the +minimum, they support a native file system plus a CD-ROM file system (Generally +ISO-9669, often with Juliet extensions).

+ +

Each file system +may have its own naming rules. For example, modern versions of Windows support NTFS, FAT, FAT32, and ISO-9660 file systems, among others, and the naming rules +for those file systems differ. Each file system may also have +differing rules for overall path validity, such as a maximum length or number of +sub-directories. Some legacy systems have different rules for directory names +versus regular file names.

+ +

As a result, Boost.Filesystem's name_check functions +cannot guarantee directory and file name portability. Rather, they are intended to +give the programmer a "fighting chance" to achieve portability by early +detection of common naming problems.

+ +

name_check functions

+ +

A name_check function +returns true if its argument is valid as a directory and regular file name for a +particular operating or file system. A number of these functions are provided.

+ +

The portable_name function is of particular +interest because it has been carefully designed to provide wide +portability yet not overly restrict expressiveness.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Library Supplied name_check Functions
FunctionDescription
portable_posix_name(const + std::string& name)Returns: true if !name.empty() && name contains only the characters + specified in Portable Filename Character Set rules as defined in by + POSIX (www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap03.html).
+ The allowed characters are 0-9, a-z, A-Z, + '.', '_', and '-'.

Use: + applications which must be portable to any POSIX system.

windows_name(const + std::string& name)Returns:  true if !name.empty() && name contains + only the characters specified by the Windows platform SDK as valid + regardless of the file system && (name is "." or + ".."  or does not end with a trailing space or period).  + The allowed characters are anything except 0x0-0x1F, '<', + '>', ':', '"', '/', + '\', and '|'.

+ Use: applications which must be portable to Windows.

+

Note: Reserved device names are not valid as file names, but are + not being detected because they are still valid as a path. Specifically, + CON, PRN, AUX, CLOCK$, NUL, COM[1-9], LPT[1-9], and these names followed by + an extension (for example, NUL.tx7).

portable_name(const + std::string& name)Returns:  windows_name(name) && portable_posix_name(name) + && (name is "." or "..", and the first character not a period or hyphen).

Use: applications which must be portable to a wide variety of + modern operating systems, large and small, and to some legacy O/S's. The + first character not a period or hyphen restriction is a requirement of + several older operating systems.

+ portable_directory_name(const std::string& name)Returns: portable_name(name) && (name is "." + or ".."  or contains no periods).

Use: applications + which must be portable to a wide variety of platforms, including OpenVMS.

+ portable_file_name(const std::string& name)Returns: portable_name(name) && any period is followed by one to three additional + non-period characters.

Use: + applications which must be portable to a wide variety of platforms, + including OpenVMS and other systems which have a concept of "file extension" + but limit its length.

native(const + std::string& name)Returns: Implementation defined. Returns + true for names considered valid by the operating system's native file + systems.

Note: May return true for some names not considered valid + by the operating system under all conditions (particularly on operating systems which support + multiple file systems.)

+ +

File and directory name recommendations

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
RecommendationRationale
Limit file and directory names to the characters A-Z, a-z, 0-9, period, hyphen, and + underscore.

Use any of the "portable_" + name check functions to enforce this recommendation.

These are the characters specified by the POSIX standard for portable directory and + file names, and are also valid for Windows, Mac, and many other modern file systems.
Do not use a period or hyphen as the first + character of a name. Do not use period as the last character of a name.

+ Use portable_name, + portable_directory_name, or + portable_file_name to enforce this + recommendation.

Some operating systems treat have special rules for the + first character of names. POSIX, for example. Windows does not permit period + as the last character.
Do not use periods in directory names.

Use + portable_directory_name to enforce + this recommendation.

Requirement for ISO-9660 without Juliet extensions, OpenVMS filesystem, and other legacy systems.
Do not use more that one period in a file name, and limit + the portion after the period to three characters.

Use + portable_file_name to enforce this + recommendation.

Requirement for ISO-9660 level 1, OpenVMS filesystem, and + other legacy systems.
Do not assume names are case sensitive. For example, do not expected a directory to be + able to hold separate elements named "Foo" and "foo". Some file systems are case insensitive.  For example, Windows + NTFS is case preserving in the way it stores names, but case insensitive in + searching for names (unless running under the POSIX sub-system, it which + case it does case sensitive searches).
Do not assume names are case insensitive.  For example, do not expect a file + created with the name of "Foo" to be opened successfully with the name of "foo".Some file systems are case sensitive.  For example, POSIX.
Don't use hyphens in names.ISO-9660 level 1, and possibly some legacy systems, do not permit + hyphens.
Limit the length of the string returned by path::string() to + 255 characters.  + Note that ISO 9660 has an explicit directory tree depth limit of 8, although + this depth limit is removed by the Juliet extensions.Some operating systems place limits on the total path length.  For example, + Windows 2000 limits paths to 260 characters total length.
Limit the length of any one name in a path.  Pick the specific limit according to + the operating systems and or file systems you wish portability to:
+    Not a concern::  POSIX, Windows, MAC OS X.
+    31 characters: Classic Mac OS
+   8 characters + period + 3 characters: ISO 9660 level 1
+   32 characters: ISO 9660 level 2 and 3
+   128 characters (64 if Unicode): ISO 9660 with Juliet extensions
Limiting name length can markedly reduce the expressiveness of file names, yet placing + only very high limits on lengths inhibits widest portability.
+ +
+

Revised +29 December, 2014

+ +

© Copyright Beman Dawes, 2002, 2003

+

Use, modification, and distribution are subject to the Boost Software +License, Version 1.0. (See accompanying file +LICENSE_1_0.txt or copy at +www.boost.org/LICENSE_1_0.txt)

+ + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/doc/reference.html b/ThirdParty/boost-Subset/libs/filesystem/doc/reference.html new file mode 100644 index 0000000000..793740b005 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/doc/reference.html @@ -0,0 +1,3745 @@ + + + + + + + + + + + + + + + Filesystem Reference + + + + + + + + + + + + + +
+ +boost.png (6897 bytes) + Filesystem Library
+
+ Version 3
+ + + + +
Home    + Tutorial    + Reference    + FAQ    + Releases    + Portability    + V3 Intro    + V3 Design    + Deprecated    + Bug Reports    +
+ +

Reference Documentation

+ + + +

Table of Contents

+ + + + + + + +
Introduction
+ Definitions
+ Conformance
+ + Header <boost/filesystem.hpp> synopsis
+ Error reporting
+ Class path
+    path conversions
+    path + conversions to native format
+    path + conversions to generic format
+    path + encoding conversions
+    path requirements
+     path constructors
+    path assignments
+     path appends
+     path concatenation
+    path modifiers
+    path native + format observers
+    path generic + format observers
+    path compare
+    path decomposition
+    path query
+    path iterators
+ +    path deprecated functions
+    path non-member functions
+    path inserters and extractors
+  Class filesystem_error
+    filesystem_error + constructors
+    filesystem_error path1
+    filesystem_error path2
+    filesystem_error + what
+ Enum file_type
+ Enum perms
+ Class + file_status
+    + + file_status constructors
+    file_status-modifiers observers
+    file_status-observers modifiers
+Class directory_entry
+    +directory_entry constructors
+    directory_entry observers
+    directory_entry modifiers
+Class directory_iterator
+    directory_iterator + members
+Class recursive_directory_iterator
+ + Operational functions
+      absolute
+     canonical
+     copy
+     copy_directory
+     copy_file
+     copy_symlink
+     create_directories
+     create_directory
+     create_hard_link
+     create_symlink
+     current_path
+     exists
+     equivalent
+     file_size
+     hard_link_count
+      initial_path
+     is_directory
+     is_empty
+      is_other
+     is_regular_file
+     is_symlink
+     last_write_time
+     permissions
+     read_symlink
+     remove
+     remove_all
+     rename
+     resize_file
+     space
+     status
+     status_known
+     symlink_status
+     system_complete
+     temp_directory_path
+    
unique_path
+ File streams
+Path decomposition table
+ Warning: Long paths on Windows and the + extended-length \\?\ prefix
+Acknowledgements
+References
+ + +

Introduction

+ +

This reference documentation describes components that C++ programs may use +to perform operations involving file systems, including paths, regular files, +and directories.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

C++11 Support

This reference + documentation is written as if all compilers supported C++11. Where + possible, the implementation falls back to C++03 if a C++11 feature is not + available.

+ C++11 Feature + Action if not supported by compiler
+ noexcept + Keyword omitted.
+ constexpr + Keyword omitted.
+

R-value references

+ Function signature omitted.
+ New character types +

The boost::filesystem interface doesn't use the + new types directly. It does use u16string and u32string + in namespace boost. These are typedefs to std::u16string + and std::u32string for C++11, or to + std::basic_string<boost::u16_t> and + std::basic_string<boost::u32_t> for C++03.

+ Defaulted and deleted functions + Workaround replacement functions provided.
+ Initializer lists + Not currently used.
+ Variadic templates + Not currently used.
+ Range-based for statements + Supporting functions always provided; they do no harm even for C++03 + compilers.
+
+ + + +

Conformance [fs.conformance]

+ +

ISO/IEC 9945 conformance [fs.conform.9945]

+

Some behavior in this reference documentation is specified by reference to ISO/IEC 9945. How such behavior is actually implemented is unspecified.

+
+

[Note: This constitutes an "as if" rule for implementation of +operating system dependent behavior. In practice implementations will usually call native +operating system API's. —end note]

+
+

Implementations are encouraged to provide such behavior + +as it is defined by ISO/IEC 9945. Implementations shall document any +behavior that differs from the behavior defined by ISO/IEC 9945. Implementations that do not support exact +ISO/IEC 9945 behavior are +encouraged to provide behavior as close to ISO/IEC 9945 behavior as is reasonable given the +limitations of actual operating systems and file systems. If an implementation cannot provide any +reasonable behavior, the implementation shall report an error in an +implementation-defined manner.

+
+

[Note: Such errors might be reported by an #error directive, a +static_assert, a filesystem_error exception, a special +return value, or some other manner. —end note]

+
+

Implementations are not required to provide behavior that is not supported by +a particular file system.

+
+

[Example: The +FAT file system used by some memory cards, camera memory, and floppy discs +does not support hard links, symlinks, and many other features of more capable +file systems. Implementations are only required to support the FAT features +supported by the host operating system. —end example]

+
+

The behavior of functions described in this +reference +may differ from their specification in +the presence of file system races. No diagnostic is required.

+

If the possibility of a file system race would make it unreliable for a program to +test for a precondition before calling a function described in this reference documentation, +Requires is not specified for the condition. Instead, the condition is +specified as a Throws condition.

+
+

[Note: As a design practice, preconditions are not specified when it +is unreasonable for a program to detect them prior to calling the function. +—end note]

+
+

Operating system dependent conformance [fs.conform.os]

+

Some behavior is specified in this reference documentation as being +operating system dependent ([fs.def.osdep]). The operation system an +implementation is dependent upon is implementation defined.

+

It is permissible for an implementation to be dependent upon an operating +system emulator rather than the actual operating system.

+
+

[Example: An implementation uses Cygwin, a Linux® API emulator for +some Windows® operating system versions. The implementation would define Cygwin +as its operating system. Users could refer to the Cygwin documentation to find +details of the operating system dependent behavior.  —end example]

+

It is user and conformance test +detectable that such an implementation is running on Cygwin. Users would be +misled and conformance tests would fail if the implementation defined Linux or +Windows rather than Cygwin as the operating system, since real behavior is a +blend of the two.

+
+

Definitions [fs.definitions]

+

The following definitions shall apply throughout this reference documentation:

+

operating system dependent behavior +[fs.def.osdep]

+

Behavior that is dependent upon the behavior +and characteristics of an operating system. See [fs.conform.os].

+

file [fs.def.file]

+

An object that can be written to, or read from, or both. A file +has certain attributes, including type. File types include regular files +and directories. Other types of files, such as symbolic links, may be supported by the +implementation.

+

file system [fs.def.filesystem]

+

A collection of files and certain of their attributes.

+

filename [fs.def.filename]

+

The name of a file. Filenames + "."  +and ".."  have special meaning. The follow characteristics of + filenames are operating system dependent:

+
    +
  • +

    The permitted characters. See [fs.os.examples].

    +
  • +
  • +

    Specific filenames that are not permitted.

    +
  • +
  • +

    Additional filenames that have special meaning.

    +
  • +
  • +

    Case awareness and sensitivity during path resolution.

    +
  • +
  • +

    Special rules that may apply to file types other than regular + files, such as directories.

    +
  • +
+

path [fs.def.path]

+

A sequence of elements that identify +the location of a file within a filesystem. The elements are the root-nameopt, +root-directoryopt, and an optional sequence of filenames. [Note: +A pathname is the concrete representation of a path. —end note]

+ +

absolute path [fs.def.absolute-path]

+

A path that +unambiguously +identifies the location of a file without reference to an additional starting +location. The elements of a path that determine if it is absolute are +operating system dependent.

+ +

relative path [fs.def.relative-path]

+

A path that +is not absolute, and so only +unambiguously +identifies the location of a file when resolved relative to +an implied starting location. The elements of a path that determine if it is +relative are operating system dependent.  [Note: +Paths "." and ".." are relative paths. —end note]

+

canonical path [fs.def.cannonical-path]

+

An absolute path that has +no elements that are symbolic links, and no "." or ".." elements.

+

pathname [fs.def.pathname]

+

A character string that represents +the name of a +path. Pathnames are formatted according to the generic pathname grammar or an +operating system dependent +native pathname format.

+ +

native pathname format [fs.def.native]

+

The operating system dependent pathname format accepted by the host operating system.

+

link [fs.def.link]

+

A directory entry object that associates a +filename with a file. On some file systems, several directory entries can +associate names with the same file.

+

hard link [fs.def.hardlink]

+

A link to an existing file. Some +file systems support multiple hard links to a file. If the last hard link to a +file is removed, the file itself is removed.

+
+

[Note: A hard link can be thought of as a shared-ownership smart +pointer to a file. —end note]

+
+

symbolic link [fs.def.symlink]

+

A type of file with the +property that when the file is encountered during pathname resolution, a string +stored by the file is used to modify the pathname resolution.

+
+

[Note: A symbolic link can be thought of as a raw pointer to a file. +If the file pointed to does not exist, the symbolic link is said to be a +"dangling" symbolic link. —end note]

+
+

file system race [fs.def.race]

+

The condition that occurs +when multiple threads, processes, or computers interleave access and +modification of +the same object within a file system.

+

Generic pathname format [path.generic]

+

pathname:
+            root-nameopt +root-directoryopt relative-pathopt

+

root-name:
+           
An +operating system dependent name that identifies the starting location for +absolute paths.

+
+
+

[Note: Many operating systems define a name +beginning with two directory-separator characters as a root-name +that identifies network or other resource locations. Some operating systems define a single letter followed by a colon as a drive +specifier - a root-name identifying a specific device such as a disc drive. —end note]

+
+
+

root-directory:
+            +directory-separator

+

relative-path:
+            +filename
+            relative-path +directory-separator
+            relative-path +directory-separator filename

+

filename:
+            name
+           
"."
+           
+".."

+

preferred-separator:
+           
An +operating system dependent directory separator character. May be a synonym for "/".

+

directory-separator:
+            "/"
+      "/"
directory-separator
+            +preferred-separator
+            +preferred-separator directory-separator

+

Multiple successive directory-separator characters are considered to +be the same as one directory-separator character.

+

The filename +"." is considered to be a reference to the current directory. The +filename ".." is considered to be a reference to the +parent +directory. Specific filenames may have special meanings for a particular +operating system.

+

Operating system dependent examples (Informative) [fs.os.examples]

+

Certain features are specified in this reference documentation as being operating system dependent. The following table shows the application of those +specifications for operating systems that use the ISO/IEC 9945 or Windows® application program interfaces +(APIs).[footnote1]

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureSectionISO/IEC 9945 APIWindows® APINotes
path::value_type[class.path]charwchar_t 
path::preferred_separator[class.path]'/'L'\\' (single backslash) 
path("/").is_absolute()
+ path("c:/").is_absolute()
[path.query]true
+ false
false
+ true
 
path argument disambiguation between generic format and + native format[path.arg.fmt.cvt]Not requiredNot requiredThere is no need to distinguish between the generic format and native + format for these operating systems.
path argument format conversion[path.arg.fmt.cvt]No conversion performedNo conversion performedThe generic format is already acceptable to the native API of these operating systems.
+

path("/cats/jane").c_str()
+ path("/cats/jane/").c_str()

[path.arg.fmt.cvt] "/cats/jane"
+ "/cats/jane/"
+

L"/cats/jane"
+ L"/cats/jane/"

These operating systems accept the same native separator between + directory names and a final file name, so no format conversion is performed. + Other operating systems might require conversion.
Format conversion by path native format observers[path.native.obs]No conversion performedNo conversion performedFor efficiency, path objects are required to store pathnames in the native + format regardless of operating system.
+

Format conversion by path generic format observers

[path.generic.obs]No conversion performedBackslashes converted to slashes 
p.make_preferred()[fs.path.modifiers]No changeSlashes converted to backslashes 
Characters prohibited in filenames[fs.def.filename]0x00, '/'0x00-0x1F, '"', '*', '*', + '<', + '>', '?', '\\' (single backslash), + '/', '|'Many operating systems prohibit the ASCII control characters (0x00-0x1F) + in filenames.
Initial imbued path locale[path.imbued.locale] std::locale("")
+
[footnote 2]
Implementation supplied locale using MultiByteToWideChar + and WideCharToMultiByte with a codepage of CP_ACP + if AreFileApisANSI()is true, otherwise codepage CP_OEMCP.[footnote + 3]Apple OS X®:  Implementation supplied locale providing UTF-8 codecvt + facet.[footnote 4]
+

[footnote1] OS X® and Windows® are examples of commercially +available operating systems. This information is given for the convenience of +users of this document and does not constitute an endorsement by ISO or IEC of +these products.

+

[footnote 2] Rationale: ISO C specifies std::locale("") as "the locale-specific native +environment", while ISO/IEC 9945 says it "Specifies an implementation-defined native +environment."

+

[footnote 3] Rationale: This is the current behavior of C and C++ +standard library functions that perform file operations using narrow character +strings to identify paths. Changing this behavior would be surprising and at +variance with existing code, particularly where user input is involved.

+

[footnote 4] Rationale: Vendor's documentation states "All BSD +system functions expect their string parameters to be in UTF-8 encoding and +nothing else."

+

Header <boost/filesystem.hpp> synopsis +[filesystem.synopsis]

+
namespace boost
+{
+  namespace filesystem
+  {
+    class path;
+    
+    bool lexicographical_compare(path::iterator first1, path::iterator last1,
+      path::iterator first2, path::iterator last2);
+    void swap(path& lhs, path& rhs);
+    std::size_t hash_value(const path& p);
+
+    bool operator==(const path& lhs, const path& rhs);
+    bool operator!=(const path& lhs, const path& rhs);
+    bool operator< (const path& lhs, const path& rhs);
+    bool operator<=(const path& lhs, const path& rhs);
+    bool operator> (const path& lhs, const path& rhs);
+    bool operator>=(const path& lhs, const path& rhs);
+
+    path operator/ (const path& lhs, const path& rhs);
+
+    std::ostream&  operator<<( std::ostream& os, const path& p );
+    std::wostream& operator<<( std::wostream& os, const path& p );
+    std::istream&  operator>>( std::istream& is, path& p );
+    std::wistream& operator>>( std::wistream& is, path& p )
+
+    class filesystem_error;      
+    class directory_entry;
+
+    class directory_iterator;
+
+    // enable c++11 range-based for statements
+    const directory_iterator& begin(const directory_iterator& iter);
+    directory_iterator end(const directory_iterator&);
+
+
+    // enable BOOST_FOREACH
+    directory_iterator& range_begin(directory_iterator& iter);
+    directory_iterator range_begin(const directory_iterator& iter);
+    directory_iterator range_end(const directory_iterator&);
+
+class recursive_directory_iterator;
+
+    // enable c++11 range-based for statements
+    const recursive_directory_iterator& begin(const recursive_directory_iterator& iter);
+    recursive_directory_iterator end(const recursive_directory_iterator&);
+
+
+    // enable BOOST_FOREACH
+    recursive_directory_iterator& range_begin(recursive_directory_iterator& iter);
+    recursive_directory_iterator range_begin(const recursive_directory_iterator& iter);
+    recursive_directory_iterator range_end(const recursive_directory_iterator&);
+
+enum file_type
+    {
+      status_error, file_not_found, regular_file, directory_file,
+      symlink_file, block_file, character_file, fifo_file, socket_file,
+      type_unknown
+    };
+
+    enum perms
+    {
+      no_perms,
+      owner_read, owner_write, owner_exe, owner_all,
+      group_read, group_write, group_exe, group_all,
+      others_read, others_write, others_exe, others_all, all_all,
+      set_uid_on_exe, set_gid_on_exe, sticky_bit,
+      perms_mask, perms_not_known,
+      add_perms, remove_perms, symlink_perms
+    };
+
+    class file_status;
+
+    struct space_info  // returned by space function
+    {
+      uintmax_t capacity;
+      uintmax_t free; 
+      uintmax_t available; // free space available to a non-privileged process
+    };
+
+    enum class copy_option
+    {
+      none
+      fail_if_exists = none,
+      overwrite_if_exists
+    };
+
+    enum class symlink_option
+    {
+      none
+      no_recurse = none,
+      recurse
+    };
+
+    // operational functions
+
+    path         absolute(const path& p, const path& base=current_path());
+
+    path         canonical(const path& p, const path& base = current_path());
+    path         canonical(const path& p, system::error_code& ec);
+    path         canonical(const path& p, const path& base, system::error_code& ec);
+
+    void         copy(const path& from, const path& to);
+    void         copy(const path& from, const path& to, system::error_code& ec);
+
+    void         copy_directory(const path& from, const path& to);
+    void         copy_directory(const path& from, const path& to, system::error_code& ec);
+
+    void         copy_file(const path& from, const path& to);
+    void         copy_file(const path& from, const path& to, system::error_code& ec);
+    void         copy_file(const path& from, const path& to, copy_option option);
+    void         copy_file(const path& from, const path& to, copy_option option,
+                           system::error_code& ec);
+
+    void         copy_symlink(const path& existing_symlink, const path& new_symlink);
+    void         copy_symlink(const path& existing_symlink, const path& new_symlink,
+                              system::error_code& ec);
+
+    bool         create_directories(const path& p);
+    bool         create_directories(const path& p, system::error_code& ec);
+
+    bool         create_directory(const path& p);
+    bool         create_directory(const path& p, system::error_code& ec);
+
+    void         create_directory_symlink(const path& to, const path& new_symlink);
+    void         create_directory_symlink(const path& to, const path& new_symlink,
+                                          system::error_code& ec);
+
+    void         create_hard_link(const path& to, const path& new_hard_link);
+    void         create_hard_link(const path& to, const path& new_hard_link,
+                                  system::error_code& ec);
+
+    void         create_symlink(const path& to, const path& new_symlink);
+    void         create_symlink(const path& to, const path& new_symlink,
+                                system::error_code& ec);
+
+    path         current_path();
+    path         current_path(system::error_code& ec);
+    void         current_path(const path& p);
+    void         current_path(const path& p, system::error_code& ec);
+
+    bool         exists(file_status s) noexcept;
+    bool         exists(const path& p);
+    bool         exists(const path& p, system::error_code& ec) noexcept;
+
+    bool         equivalent(const path& p1, const path& p2);
+    bool         equivalent(const path& p1, const path& p2, system::error_code& ec);
+
+    uintmax_t    file_size(const path& p);
+    uintmax_t    file_size(const path& p, system::error_code& ec);
+
+    uintmax_t    hard_link_count(const path& p);
+    uintmax_t    hard_link_count(const path& p, system::error_code& ec);
+
+    const path&  initial_path();
+    const path&  initial_path(system::error_code& ec);
+
+    bool         is_directory(file_status s) noexcept;
+    bool         is_directory(const path& p);
+    bool         is_directory(const path& p, system::error_code& ec) noexcept;
+
+    bool         is_empty(const path& p);
+    bool         is_empty(const path& p, system::error_code& ec);
+
+    bool         is_other(file_status s) noexcept;
+    bool         is_other(const path& p,);
+    bool         is_other(const path& p, system::error_code& ec) noexcept;
+
+    bool         is_regular_file(file_status s) noexcept; 
+    bool         is_regular_file(const path& p);
+    bool         is_regular_file(const path& p, system::error_code& ec) noexcept;
+
+    bool         is_symlink(file_status s noexcept);
+    bool         is_symlink(const path& p);
+    bool         is_symlink(const path& p, system::error_code& ec) noexcept;
+
+    std::time_t  last_write_time(const path& p);
+    std::time_t  last_write_time(const path& p, system::error_code& ec);
+    void         last_write_time(const path& p, const std::time_t new_time);
+    void         last_write_time(const path& p, const std::time_t new_time,
+                                 system::error_code& ec);
+
+    path         read_symlink(const path& p);
+    path         read_symlink(const path& p, system::error_code& ec);
+
+    bool         remove(const path& p);
+    bool         remove(const path& p, system::error_code& ec);
+
+    uintmax_t    remove_all(const path& p);
+    uintmax_t    remove_all(const path& p, system::error_code& ec);
+
+    void         rename(const path& from, const path& to);
+    void         rename(const path& from, const path& to, system::error_code& ec);
+
+    void         resize_file(const path& p, uintmax_t size);
+    void         resize_file(const path& p, uintmax_t size, system::error_code& ec);
+
+    space_info   space(const path& p);
+    space_info   space(const path& p, system::error_code& ec);
+
+    file_status  status(const path& p);
+    file_status  status(const path& p, system::error_code& ec) noexcept;
+
+    bool         status_known(file_status s) noexcept;
+
+    file_status  symlink_status(const path& p);
+    file_status  symlink_status(const path& p, system::error_code& ec) noexcept;
+
+    path         system_complete(const path& p);
+    path         system_complete(const path& p, system::error_code& ec);
+
+    path         temp_directory_path();
+    path         temp_directory_path(system::error_code& ec);
+
+    path         unique_path(const path& model="%%%%-%%%%-%%%%-%%%%");
+    path         unique_path(const path& model, system::error_code& ec);
+
+  }  // namespace filesystem
+}  // namespace boost
+

Error reporting [fs.err.report]

+

Filesystem library functions often provide two overloads, one that +throws an exception to report file system errors, and another that sets an error_code.

+
+

[Note: This supports two common use cases:

+
    +
  • Uses where file system +errors are truly exceptional and indicate a serious failure. Throwing an + exception is the most appropriate response. This is the preferred default for + most everyday programming.
  • +
  • Uses where file system system errors are routine and do not necessarily represent + failure. Returning an error code is the most appropriate response. This allows + application specific error handling, including simply ignoring the error.
  • +
+

—end note]

+
+

Functions not having an argument of type system::error_code& report errors as follows, unless otherwise specified:

+
    +
  • When a call by the + implementation to an operating system or other underlying API results in an + error that prevents the function from meeting its specifications, an exception + of type +filesystem_error is thrown.
  • +
  • Failure to allocate storage is reported by throwing an exception as described in the C++ standard, + 17.6.4.10 [res.on.exception.handling].
  • +
  • Destructors throw nothing.
  • +
+

Functions having an argument of type system::error_code& report errors as follows, unless otherwise + specified:

+
    +
  • If a call by the + implementation to an operating system or other underlying API results in an + error that prevents the function from meeting its specifications, the +system::error_code& argument is set as + appropriate appropriate for the specific error. Otherwise, clear() + is called on the +system::error_code& argument.
  • +
  • Failure to allocate storage is reported by + throwing an exception as described in the C++ standard, + 17.6.4.10 [res.on.exception.handling].
  • +
+

Class path [class.path]

+

An object of class path represents a path, +and contains a pathname Such an object is concerned only with the lexical and syntactic aspects +of a path. The path does not necessarily exist in external storage, and the +pathname is not necessarily valid for the current operating +system or for a particular file system.

+
namespace boost
+{
+  namespace filesystem
+  {
+      class path
+      {
+      public:
+        typedef see below                                    value_type;
+        typedef std::basic_string<value_type>                string_type;
+        typedef std::codecvt<wchar_t, char, std::mbstate_t>  codecvt_type;
+        constexpr value_type                                 preferred_separator;
+
+        // constructors and destructor
+        path();
+        path(const path& p);
+        path(path&& p) noexcept;
+
+        template <class Source>
+          path(Source const& source, const codecvt_type& cvt=codecvt());
+
+        template <class InputIterator>
+          path(InputIterator begin, InputIterator end, const codecvt_type& cvt=codecvt());
+
+       ~path();
+
+        // assignments
+        path& operator=(const path& p);
+        path& operator=(path&& p) noexcept;
+
+        template <class Source>
+          path& operator=(Source const& source);
+
+        template <class Source>
+          path& assign(Source const& source, const codecvt_type& cvt)
+
+        template <class InputIterator>
+          path& assign(InputIterator begin, InputIterator end, const codecvt_type& cvt=codecvt());
+
+        // appends
+        path& operator/=(const path& p);
+
+        template <class Source>
+          path& operator/=(Source const& source);
+
+        template <class Source>
+          path& append(Source const& source, const codecvt_type& cvt);
+
+        template <class InputIterator>
+          path& append(InputIterator begin, InputIterator end, const codecvt_type& cvt=codecvt());
+
+        // concatenation
+        path& operator+=(const path& x);
+        path& operator+=(const string_type& x);
+        path& operator+=(const value_type* x);
+        path& operator+=(value_type x);
+        template <class Source>
+          path& operator+=(Source const& x);
+        template <class CharT>
+          path& operator+=(CharT x);
+        template <class Source>
+          path& concat(Source const& x, const codecvt_type& cvt);
+        template <class InputIterator>
+          path& concat(InputIterator begin, InputIterator end);
+        template <class InputIterator>
+          path& concat(InputIterator begin, InputIterator end, const codecvt_type& cvt);
+        
+        // modifiers
+        void  clear();
+        path& make_preferred();
+        path& remove_filename();
+        path& replace_extension(const path& new_extension = path());
+        void  swap(path& rhs);
+
+        // native format observers
+        const string_type&  native() const noexcept;  // native format, encoding
+        const value_type*   c_str() const noexcept;   // native().c_str()
+
+        template <class String>
+          String  string(const codecvt_type& cvt=codecvt()) const;   // native format
+
+        string    string(const codecvt_type& cvt=codecvt()) const;   // native format
+        wstring   wstring(const codecvt_type& cvt=codecvt()) const;  // native format
+        u16string u16string() const;                                 // native format
+        u32string u32string() const;                                 // native format
+
+        // generic format observers
+        template <class String>
+          String  generic_string() const;
+
+        string    generic_string(const codecvt_type& cvt=codecvt()) const;   // generic format
+        wstring   generic_wstring(const codecvt_type& cvt=codecvt()) const;  // generic format
+        u16string generic_u16string() const;                                 // generic format
+        u32string generic_u32string() const;                                 // generic format
+
+        // compare
+        int                 compare(const path& p) const noexcept;
+        int                 compare(const std::string& s) const;
+        int                 compare(const value_type* s) const;
+
+        // decomposition
+        path  root_name() const;
+        path  root_directory() const;
+        path  root_path() const;
+        path  relative_path() const;
+        path  parent_path() const;
+        path  filename() const;
+        path  stem() const;
+        path  extension() const;
+
+        // query
+        bool empty() const;
+        bool has_root_name() const;
+        bool has_root_directory() const;
+        bool has_root_path() const;
+        bool has_relative_path() const;
+        bool has_parent_path() const;
+        bool has_filename() const;
+        bool has_stem() const;
+        bool has_extension() const;
+        bool is_absolute() const;
+        bool is_relative() const;
+
+        // iterators
+        class iterator;
+        typedef iterator const_iterator;
+
+        iterator begin() const;
+        iterator end() const;
+        
+        // imbued locale
+        static std::locale imbue(const std::locale& loc);
+        static const codecvt_type & codecvt();
+
+      private:
+        string_type pathname;  // exposition only
+      };
+
+  }  // namespace filesystem
+}  // namespace boost
+

value_type is a typedef for the +character type used by the operating system to represent pathnames.

+ + +

path Usage concerns [path.usage]

+ +

Multithreading concerns

+ +

Filesystem library functions are not protected against data races. [Modifying +an object of a Filesystem library type that is shared between threads risks +undefined behavior unless objects of that type are explicitly specified as being +sharable without data races or the user supplies a locking mechanism. —end +note] [Note: Thus the Filesystem library behaves as if it were part +of the standard library, and C++ standard 17.6.4.10 Shared objects and the +library [res.on.objects] would thus apply.  —end note]

+ +

Windows concerns

+ +

Visual C++ at least through version 2012 does not employ C++11-style static +initialization locks, so the initialization of path::codecvt() can +race, either with itself or path::imbue::() if they are called from +a different thread. A workaround is to call:

+ +
+

path::codecvt();  // ensure VC++ does not race during +initialization.

+ +
+

in the main thread before launching any additional threads. [Note: The +obvious fix of the Filesystem implementation doing the locking doesn't work +because of unrelated problems with the Microsoft compiler; for static linking +the runtime tries to do the initialization before main() starts, but doesn't +permit operating system lock calls at that time.  —end note]

+ +

POSIX concerns

+ +

Filesystem library initialization may throw an exception on POSIX +systems (e.g. Linux, but not Mac OS X) that use environmental variables to +determine the encoding of paths. This happens when std::locale("") +throws because an environmental variable such as LANG is set to an invalid +value, so it can affect any use of  std::locale(""), not just +the Filesystem library. Filesystem uses lazy initialization so the exception is +only thrown if a valid std::locale("") is actually needed, and also +so that the exception is thrown after main() starts.

+ +

Rather than waiting until a call to some Filesystem library function +unexpectedly triggers the exception when it calls path::codecvt(), +a program that needs be highly robust against environmental variable problems +may want to preemptively call std::locale("") within a try block, +catch the exception, and diagnose or repair the invalid environmental variable.

+ +

path Conversions [path.cvt]

+

path argument conversions [path.arg.cvt]

+
path argument +format conversions [path.arg.fmt.cvt]
+

Member function arguments that take character sequences representing paths +may use the generic pathname format or +the native pathname format. Iff such arguments +are in the generic format and the generic format is not acceptable to the +operating system as a native path, conversion to native format shall be performed +during the processing of the argument. See [fs.os.examples].

+
+

[Note: Depending on the operating system, there may be no unambiguous way for an implementation to +always be able to distinguish between native format and generic format arguments. +This is by design as it simplifies use for operating systems that do not require +disambiguation. Should an implementation encounter an +operating system where disambiguation is required, an implementation can defined +an extension to distinguish between the formats. +—end note]

+
+ +

If the native format requires +paths for regular files to be formatted differently from paths for directories, the +path shall be treated as a directory path if last element is a separator, +otherwise it shall be treated as a regular file path.

+ +
+path argument encoding conversions +[path.arg.encoding.cvt]
+

For member function arguments that take character sequences representing +paths, if the value type of the argument is not value_type and one +of the value types is char and the other is wchar_t, conversion to value_type +shall be performed by the path::codecvt() facet. ([path.imbued.locale]).

+

path Conversions +to generic format [fs.cvt.to.generic]

+

Generic format observer functions +shall return strings formatted according to the generic pathname format +using preferred-separator. See [fs.os.examples].

+

path Requirements [path.req]

+

Template parameters named InputIterator are required meet the +requirements for a C++ standard library RandomIterator compliant iterator. The iterator's value type is required to be char, wchar_t, char16_t, or char32_t.

+

Template parameters named Source are required to be one of:

+
    +
  • A container with a value type of char, + wchar_t, char16_t, or char32_t.
  • +
  • An iterator for a null terminated byte-string. The value type is required + to be char, wchar_t, char16_t, or + char32_t.
  • +
  • A C-array. The value type is required to be char, + wchar_t, char16_t, or char32_t.
  • +
  • A boost::filesystem::directory_entry.
  • +
+ +

+path constructors [path.construct]

+
template <class Source>
+  path(Source const& source, const codecvt_type& cvt=codecvt());
+
template <class InputIterator>
+  path(InputIterator begin, InputIterator end, const codecvt_type& cvt=codecvt());
+
+

Effects: Stores the contents [begin,end) + or source in pathname, converting format and + encoding if required ([path.arg.convert]).

+
+

+path assignments [path.assign]

+
template <class Source>
+  path& operator=(Source const& source);
+  template <class Source>
+  path& assign(Source const& source, const codecvt_type& cvt);
+  template <class InputIterator>
+  path& assign(InputIterator begin, InputIterator end, const codecvt_type& cvt=codecvt());
+
+

Effects: Stores the contents [begin,end) + or source in pathname, converting format and + encoding if required ([path.arg.convert]).

+

+ Returns: *this

+
+

path appends +[path.append]

+

The append operations use + operator/= to denote their semantic effect of appending + preferred-separator when needed.

+
path& operator/=(const path& p);
+
+

Effects:

+
+ Appends path::preferred_separator to pathname, + converting format and encoding if required ([path.arg.convert]), unless:
    +
  • an added separator + would be redundant, or
  • +
  • would change an relative path to an absolute path, or
  • +
  • p.empty(), or
  • +
  • *p.native().cbegin() is a directory separator.
  • +
+

Then appends p.native() to pathname.

+
+

Returns: *this

+
+
template <class Source>
+  path& operator/=(Source const & source);
+  template <class Source>
+  path& append(Source const & source, const codecvt_type& cvt);
+  template <class InputIterator>
+  path& append(InputIterator begin, InputIterator end, const codecvt_type& cvt=codecvt());
+
+

Effects:

+
+

Appends path::preferred_separator to pathname, converting + format and encoding if required ([path.arg.convert]), unless:

+
    +
  • an added separator + would be redundant, or
  • +
  • would change an relative path to an absolute path, or
  • +
  • p.empty(), or
  • +
  • *p.native().cbegin() is a separator.
  • +
+

Appends the contents [begin,end) + or source to pathname, converting format and + encoding if required ([path.arg.convert]).

+
+

Returns: *this

+
+ +

path concatenation [path.concat]

+
path& operator+=(const path& x);
+path& operator+=(const string_type& x);
+path& operator+=(const value_type* x);
+path& operator+=(value_type x);
+template <class Source>
+  path& operator+=(Source const& x);
+template <class CharT>
+  path& operator+=(CharT x);
+template <class InputIterator>
+  path& concat(InputIterator begin, InputIterator end);
+template <class InputIterator>
+  path& concat(InputIterator begin, InputIterator end, const codecvt_type& cvt);
+

Postcondition: native() == prior_native + effective-argument, + where prior_native is native() prior to the call to operator+=, + and effective-argument is:

+
  • x.native() if x is present and is const path&, otherwise
  • +
  • s, where s is + std::basic_string<typename std::iterator_traits<InputIterator>::value_type>
    s(begin, end)
    , + if begin and end arguments are present, otherwise
  • +
  • x.

If the value type of effective-argument would not be path::value_type, the actual argument or argument range is first + converted so that effective-argument has value type path::value_type.

+

Returns: *this

+
+

+path modifiers [path.modifiers]

void clear();
+
+

Postcondition: this->empty() is true.

+
+
path& make_preferred();
+
+

Effects: directory-separators are converted to prefered-separators. + See [fs.os.examples].

+

Returns: *this

+
+ +
path& remove_filename();
+
+

Returns: As if, *this = parent_path();

+

[Note: This function is needed to efficiently implement directory_iterator. It is exposed to allow additional uses. The actual + implementation may be much more efficient than *this = parent_path()  —end + note]

+
+
path& replace_extension(const path& new_extension = path());
+
+

Effects:

+
    +
  • Any existing extension() is removed from the stored path, + then
  • +
  • iff + new_extension is not empty and does not begin with a dot + character, a dot character is appended to the stored path, then
  • +
  • + new_extension is appended to the stored path.
  • +
+

Returns: *this

+
+
void swap(path& rhs) noexcept;
+
+

Effects: Swaps the contents of the two paths.

+

Complexity: constant time.

+
+ +

path native format observers +[path.native.obs]

+

The string returned by all native format observers is in the native pathname format.

+
const string_type&  native() const noexcept;
+
+

Returns: pathname.

+
+
const value_type* c_str() const noexcept;
+
+

Returns: pathname.c_str().

+
+
template <class String>
+String string(const codecvt_type& cvt=codecvt()) const;
+
+

Returns: pathname.

+

Remarks: If string_type is a different type than String, conversion is performed by cvt.

+
+
string string(const codecvt_type& cvt=codecvt()) const;
+wstring wstring(const codecvt_type& cvt=codecvt()) const;
+u16string u16string() const;
+u32wstring u32wstring() const; 
+
+

Returns: pathname.

+

Remarks: If string_type is a different type than +function's return type, conversion is performed by cvt.

+
+ +

path generic format observers +[path.generic.obs]

+

The string returned by all generic format observers is in the generic pathname format.

+
template <class String>
+String generic_string(const codecvt_type& cvt=codecvt()) const;
+
+

Returns: pathname.

+

Remarks: If string_type is a different type than String, conversion is performed by cvt.

+
+
string generic_string(const codecvt_type& cvt=codecvt()) const;
+wstring generic_wstring(const codecvt_type& cvt=codecvt()) const;
+u16string generic_u16string() const;
+u32wstring generic_u32wstring() const; 
+
+

Returns: pathname.

+

Remarks:  If string_type is a different type than +function's return type, conversion is performed by cvt.

+
+ +

path compare [path.compare]

+
int compare(const path& p) const noexcept;
+
+

Returns: A value less than 0 if the elements of *this are lexicographically less than the elements of p, otherwise a + value greater than 0 if the elements of *this are + lexicographically greater than the elements of p, otherwise 0.

+

Remark: The elements are determined as if by iteration over the half-open + range [begin(), end()) for *this and  p.

+
+
int compare(const std::string& s) const
+
+

Returns: compare(path(s)).

+
+
int compare(const value_type* s) const
+
+

Returns: compare(path(s)).

+
+

path decomposition +[path.decompose]

+

See the Path decomposition table for examples +for values returned by decomposition functions. The Tutorial may also be +helpful.

+
path root_name() const;
+
+

Returns: root-name, if pathname includes root-name, otherwise path().

+
+
path root_directory() const;
+
+

Returns: root-directory, if pathname includes root-directory, otherwise path().

+

If root-directory is composed of slash name, slash is +excluded from the returned string.

+
+
path root_path() const;
+
+

Returns: root_name() / root_directory()

+
+
path relative_path() const;
+
+

Returns: A path composed from pathname, if !empty(), beginning +with the first filename after root-path. Otherwise, path().

+
+
path parent_path() const;
+
+

Returns: (empty() || begin() == —end()) ? path() : pp, where pp is constructed as if by + starting with an empty path and successively applying operator/= for each element in the range begin(), —end().

+
+
path filename() const;
+
+

Returns: empty() ? path() : *—end()

+

[Example:

+
+
std::cout << path("/foo/bar.txt").filename(); // outputs "bar.txt"
+
+

—end example]

+
+
path stem(const path& p) const;
+
+

Returns: if p.filename() contains a dot but does not + consist solely of one or to two dots, returns + the substring of p.filename() starting at its beginning and + ending at the last dot (the dot is not included). Otherwise, + returns p.filename().

+

[Example:

+
+
std::cout << path("/foo/bar.txt").stem(); // outputs "bar"
+path p = "foo.bar.baz.tar";
+for (; !p.extension().empty(); p = p.stem())
+  std::cout << p.extension() << '\n';
+  // outputs: .tar
+  //          .baz
+  //          .bar
+
+

—end example]

+
+
path extension(const path& p) const;
+
+

Returns: if p.filename() contains a dot but does not + consist solely of one or to two dots, returns + the substring of p.filename() starting at the rightmost dot + and ending at the path's end. Otherwise, returns an empty path object.

+

Remarks: Implementations are permitted but not required to define additional + behavior for file systems which append additional elements to extensions, such + as alternate data streams or partitioned dataset names.

+

[Example:

+
+
std::cout << path("/foo/bar.txt").extension(); // outputs ".txt"
+
+

—end example]

+

[Note: The dot is included in the return value so that it is + possible to distinguish between no extension and an empty extension. + See + + http://permalink.gmane.org/gmane.comp.lib.boost.devel/199744 for more + extensive rationale.  —end note]

+
+

path query [path.query]

+
bool empty() const;
+
+

Returns: m_pathname.empty().

+
+
bool has_root_path() const;
+
+

Returns: !root_path().empty()

+
+
bool has_root_name() const;
+
+

Returns: !root_name().empty()

+
+
bool has_root_directory() const;
+
+

Returns: !root_directory().empty()

+
+
bool has_relative_path() const;
+
+

Returns: !relative_path().empty()

+
+
bool has_parent_path() const;
+
+

Returns: !parent_path().empty()

+
+
bool has_filename() const;
+
+

Returns: !filename().empty()

+
+
bool has_stem() const;
+
+

Returns: !stem().empty()

+
+
bool has_extension() const;
+
+

Returns: !extension().empty()

+
+
bool is_absolute() const;
+
+

Returns: true if the elements of root_path() uniquely identify a directory, else false.

+
+
bool is_relative() const;
+
+

Returns: !is_absolute().

+
+

+path iterators [path.itr]

+

Path iterators iterate over the elements of the stored pathname.

+

A path::iterator is a constant iterator satisfying all +the requirements of a bidirectional iterator (C++ Std, 24.1.4 Bidirectional +iterators [lib.bidirectional.iterators]). Its value_type is path.

+

Calling any non-const member function of a path object + invalidates all iterators referring to elements of that object.

+

The forward traversal order is as follows:

+
    +
  • The root-name element, if present.
  • +
  • The root-directory element, if present, in the generic format. + [note: the generic format is required to ensure lexicographical + comparison works correctly. —end note]
  • +
  • Each successive filename element, if present.
  • +
  • Dot, if one or more trailing non-root slash + characters are present.
  • +
+

The backward traversal order is the reverse of forward traversal.

+
iterator begin() const;
+
+

Returns: An iterator for the first present element in the traversal + list above. If no elements are present, the end iterator.

+
+
iterator end() const;
+
+

Returns: The end iterator.

+
+

path + imbued locale [path.imbued.locale]

+

path operations sometimes require encoding conversions between + pathname and some other string object where one of the value types + is char and the other is wchar_t. Such conversions + shall be performed by the path::codecvt() facet.

+
+

[Example: + ... —end example]

+
+
static std::locale imbue(const std::locale& loc);
+
+

Effects: Stores a copy of loc as the imbued path + locale.

+

Returns: The previous imbued path locale.

+

Remarks: The initial value of the imbued path locale is + operating system dependent. It shall be a locale with a codecvt + facet for a char string encoding appropriate for the operating + system. See ([fs.os.examples]). 

+
+
static const codecvt_type& codecvt();
+
+

Returns: The codecvt facet for the imbued path + locale .

+
+ + +

path deprecated functions

+

Several member functions from previous versions of class path have been deprecated, either because they have been renamed or because the +functionality is no longer desirable or has become obsolete.

+

Deprecated functions available by default; will be suppressed if BOOST_FILESYSTEM_NO_DEPRECATED is defined:

+
+
path&  remove_leaf()           { return remove_filename(); }
+path   leaf() const            { return filename(); }
+path   branch_path() const     { return parent_path(); }
+bool   has_leaf() const        { return !m_path.empty(); }
+bool   has_branch_path() const { return !parent_path().empty(); }
+
+

Deprecated functions not available by default; will be supplied if BOOST_FILESYSTEM_DEPRECATED is defined:

+
+
const std::string  file_string() const               { return native_string(); }
+const std::string  directory_string() const          { return native_string(); }
+const std::string  native_file_string() const        { return native_string(); }
+const std::string  native_directory_string() const   { return native_string(); }
+const string_type  external_file_string() const      { return native(); }
+const string_type  external_directory_string() const { return native(); }
+
+ +

path non-member functions +[path.non-member]

+ +
bool lexicographical_compare(path::iterator first1, path::iterator last1,
+                             path::iterator first2, path::iterator last2);
+
+

Returns: true if the sequence of native() strings for the elements defined by the half-open range [first1,last1) is + lexicographically less than the sequence of native() strings for + the elements defined by the half-open range [first2,last2). Returns false otherwise.

+

Remarks: If two sequences have the same number of elements and their + corresponding elements are equivalent, then neither sequence is + lexicographically less than the other. If one sequence is a prefix of the + other, then the shorter sequence is lexicographically less than the longer + sequence. Otherwise, the lexicographical comparison of the sequences yields + the same result as the comparison of the first corresponding pair of elements + that are not equivalent.

+

[Note: A path aware lexicographical_compare algorithm is provided for historical reasons. —end note]

+
+
void swap( path& lhs, path& rhs )
+
+

Effects: lhs.swap(rhs).

+
+
std::size_t hash_value (const path& p);
+
+

Returns: A hash value for the path p. If + for two paths, p1 == p2 then hash_value(p1) == hash_value(p2).

+

This allows paths to be used with Boost.Hash.

+
+
bool operator< (const path& lhs, const path& rhs);
+
+

Returns: return lhs.compare(rhs.begin) < 0.

+
+
bool operator<=(const path& lhs, const path& rhs);
+
+

Returns: !(rhs < lhs).

+
+
bool operator> (const path& lhs, const path& rhs);
+
+

Returns: rhs < lhs.

+
+
bool operator>=(const path& lhs, const path& rhs);
+
+

Returns: !(lhs < rhs).

+
+
bool operator==(const path& lhs, const path& rhs);
+
+

Returns: !(lhs < rhs) && !(rhs < lhs).

+

[Note: Path equality and path + equivalence have different semantics.

+

Equality is determined by the path non-member operator==, which considers the two path's lexical + representations only. Thus path("foo") == "bar" is never true.

+

Equivalence is determined by the equivalent() non-member function, which determines if two paths resolve to the same file system entity. + Thus equivalent("foo", "bar") will be true when both paths resolve to the same file.

+

Programmers wishing to determine if two paths are "the same" must decide if + "the same" means "the same representation" or "resolve to the same actual + file", and choose the appropriate function accordingly. —end note]

+
+
bool operator!=(const path& lhs, const path& rhs);
+
+

Returns: !(lhs == rhs).

+
+
path operator/ (const path& lhs, const path& rhs);
+
+

Returns: path(lhs) /= rhs.

+
+

path inserter + and extractor [path.io]

+

The inserter and extractor delimit the string with double-quotes (") +so that paths with embedded spaces will round trip correctly. Ampersand (&) +is as an escape character, so the path can itself contain double quotes.

+
template <class Char, class Traits>
+std::basic_ostream<Char, Traits>& operator<<(std::basic_ostream<Char, Traits>& os,
+                                             const path& p)
+
+
+

Effects: Insert characters into os:

+
    +
  • +

    A double-quote.

    +
  • +
  • +

    Each character in p.string<std::basic_string<Char>>(). + If the character to be inserted is equal to the escape character or a + double-quote, as determined by operator==, first insert the + escape character.

    +
  • +
  • +

    A double-quote.

    +
  • +
+

Returns: os

+
+
template <class Char, class Traits>
+inline std::basic_istream<Char, Traits>& operator>>(std::basic_istream<Char, Traits>& is,
+                                                    path& p)
+
+
+

Effects:   std::basic_string<Char> str;
+        is >> boost::io::quoted(str, static_cast<Char>('&'));
+        p = str;

+

Effects:  Extract characters from os:

+
    +
  • If the first character that would be extracted is equal to double-quote, + as determined by operator==, then:
      +
    • Discard the initial double-quote.
    • +
    • Save the value and then turn off the skipws flag.
    • +
    • p.clear()
    • +
    • Until an unescaped double-quote character is reached or + is.not_good(), extract characters from os and append + them to p, except that if an escape character is reached, + ignore it and append the next character to p.
    • +
    • Discard the final double-quote character.
    • +
    • Restore the skipws flag to its original value.
    • +
    +
  • +
  • Otherwise, os >> p.
  • +
+

Returns: is

+
+

Class filesystem_error +[class.filesystem_error]

+
namespace boost
+{
+  namespace filesystem
+  {
+      class filesystem_error : public system_error
+      {
+      public:
+        filesystem_error();
+        filesystem_error(const filesystem_error&);
+        filesystem_error(const std::string& what_arg,
+          system::error_code ec);
+        filesystem_error(const std::string& what_arg,
+          const path& p1, system::error_code ec);
+        filesystem_error(const std::string& what_arg,
+          const path& p1, const path& p2, system::error_code ec);
+
+        filesystem_error& filesystem_error(const filesystem_error&);
+       ~filesystem_error();
+
+        filesystem_error& operator=(const filesystem_error&);
+
+        const path& path1() const;
+        const path& path2() const;
+
+        const char * what() const;
+      };
+  }  // namespace filesystem
+}  // namespace boost
+

The class template filesystem_error defines the type of +objects thrown as exceptions to report file system errors from functions described in this +reference documentation.

+

filesystem_error members +[filesystem_error.members]

+
filesystem_error(const std::string& what_arg, error_code ec);
+
+

Postcondition:

+ + + + + + + + + + + + + + + + + + + + + +
ExpressionValue
+ runtime_error::what() + what_arg.c_str()
code()ec
path1().empty()true
path2().empty()true
+
+
filesystem_error(const std::string& what_arg, const path& p1, error_code ec);
+
+

Postcondition:

+ + + + + + + + + + + + + + + + + + + + + +
ExpressionValue
+ runtime_error::what() + what_arg.c_str()
code()ec
path1()Reference to stored copy of p1
path2().empty()true
+
+
filesystem_error(const std::string& what_arg, const path& p1, const path& p2, error_code ec);
+
+

Postcondition:

+ + + + + + + + + + + + + + + + + + + + + +
ExpressionValue
+ runtime_error::what() + + what_arg.c_str()
code()ec
path1()Reference to stored copy of p1
path2()Reference to stored copy of p2
+
+
const path& path1() const;
+
+

Returns: Reference to copy of p1 stored by the + constructor, or, if none, an empty path.

+
+
const path& path2() const;
+
+

Returns: Reference to copy of p2 stored by the + constructor, or, if none, an empty path.

+
+
const char* what() const;
+
+

Returns: A string containing runtime_error::what(). The exact format is unspecified. + Implementations are encouraged but not required to include path1.native_string()if not empty, path2.native_string()if + not empty, and system_error::what() strings in the returned + string.

+
+

Enum file_type [enum.file_type]

+

This enum specifies constants uses to identify file types.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Constant NameMeaning
status_errorAn error occurred while trying to obtain the status of the file. The + file simply not being found is not considered a status error.
file_not_foundThe file could not be found
regular_fileRegular file
directory_fileDirectory file
symlink_fileSymbolic link file
block_fileBlock special file
character_fileCharacter special file
fifo_fileFIFO or pipe file
socket_fileSocket file
type_unknownThe file exists, but it is of a system specific type not covered by any + of the above cases.
+

Enum perms [enum.perms]

+

This enum specifies bitmask constants uses to identify file +permissions. ISO/IEC 9945 +(POSIX) specifies actual values, and those values have been adopted here because +they are very familiar and ingrained for many POSIX +users.

+
+

Windows: All permissions except write are currently ignored. There is only a +single write permission; setting write permission for owner, group, or others +sets write permission for all, and removing write permission for owner, group, +or others removes write permission for all.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameValue
+ (octal)
ISO/IEC 9945
+ macro
Definition or notes
+

no_perms

0There are no permissions set for the file. Note: file_not_found is no_perms rather than perms_not_known
owner_read0400 S_IRUSR Read permission, owner
owner_write0200 S_IWUSR Write permission, owner
owner_exe0100 S_IXUSR Execute/search permission, owner
owner_all0700 S_IRWXU Read, write, execute/search by owner; owner_read | owner_write | owner_exe
group_read040 S_IRGRP Read permission, group
group_write020 S_IWGRP Write permission, group
group_exe010 S_IXGRP Execute/search permission, group
group_all070 S_IRWXG Read, write, execute/search by group; group_read | group_write | group_exe
others_read04 S_IROTH Read permission, others
others_write02 S_IWOTH Write permission, others
others_exe01 S_IXOTH Execute/search permission, others
others_all07 S_IRWXORead, write, execute/search by others; others_read | others_write | others_exe
all_all0777 owner_all | group_all | others_all
set_uid_on_exe04000 S_ISUID Set-user-ID on execution
set_gid_on_exe02000 S_ISGID Set-group-ID on execution
sticky_bit 01000 S_ISVTX Operating system dependent. Inherently non-portable, even between ISO/IEC 9945 + operating systems.
perms_mask07777  all_all | set_uid_on_exe | set_gid_on_exe | sticky_bit
perms_not_known0xFFFF + The permissions are not known, such as when a file_status object + is created without specifying the permissions
+

add_perms

0x1000 +

permissions() adds the argument permission bits to the + file's current bits

remove_perms0x2000 + permissions() removes the argument permission bits from the + file's current bits
symlink_perms0x4000 + On ISO/IEC 9945 + permissions() resolves symlinks unless + symlink_perms is specified. + Meaningless on Windows as + permissions() never resolves symlinks. + Meaningless on Mac OS X and some other BSD systems as + permissions() always resolves symlinks. Get over it.
+

Class file_status [class.file_status]

+
namespace boost
+{
+  namespace filesystem
+  {
+      class file_status
+      {
+      public:
+
+        // constructors
+        file_status() noexcept;
+        explicit file_status(file_type ft, perms prms = perms_not_known) noexcept;
+
+        // compiler generated
+        file_status(const file_status&) noexcept;
+        file_status& operator=(const file_status&) noexcept;
+       ~file_status() noexcept;
+
+        // observers
+        file_type  type() const noexcept;
+        perms      permissions() const noexcept;
+
+        // modifiers
+        void       type(file_type ft) noexcept;
+        void       permissions(perms prms) noexcept;
+      };
+  }  // namespace filesystem
+}  // namespace boost
+

An object of type file_status stores information about the type +and permissions of a file.

+

file_status constructors +[file_status.cons]

+
explicit file_status() noexcept;
+
+

Postconditions: type() == status_error, permissions() == perms_not_known.

+
+
explicit file_status(file_type ft, perms prms = perms_not_known) noexcept;
+
+

Postconditions: type() == ft, permissions() == prms.

+
+

file_status observers [file_status.obs]

+
file_type type() const noexcept;
+
+

Returns: The value of type() specified by the postconditions of the most recent call to a constructor, operator=, or type(file_type) function.

+
+
perms permissions() const noexcept;
+
+

Returns: The value of permissions() specified by the postconditions of the most recent call to a constructor, operator=, or permissions(perms) function.

+
+

file_status modifiers [file_status.mods]

+
void type(file_type ft) noexcept;
+
+

Postconditions: type() == ft.

+
+
void permissions(perms prms) noexcept;
+
+

Postconditions: permissions() == prms.

+
+

Class directory_entry [class.directory_entry]

+
+
namespace boost
+{
+  namespace filesystem
+  {
+      class directory_entry
+      {
+      public:
+
+        // constructors and destructor
+        directory_entry();
+        directory_entry(const directory_entry&);
+        explicit directory_entry(const path& p, file_status st=file_status(),
+          file_status symlink_st=file_status());
+       ~directory_entry(); 
+
+        // modifiers
+        directory_entry& operator=(const directory_entry&);
+        void assign(const path& p, file_status st=file_status(),
+          file_status symlink_st=file_status());
+        void replace_filename(const path& p, file_status st=file_status(),
+          file_status symlink_st=file_status());
+
+        // observers
+        const path&  path() const;
+        file_status  status() const;
+        file_status  status(system::error_code& ec) const;
+        file_status  symlink_status() const;
+        file_status  symlink_status(system::error_code& ec) const;
+
+        bool operator< (const directory_entry& rhs);
+        bool operator==(const directory_entry& rhs); 
+        bool operator!=(const directory_entry& rhs); 
+        bool operator< (const directory_entry& rhs);
+        bool operator<=(const directory_entry& rhs);
+        bool operator> (const directory_entry& rhs);
+        bool operator>=(const directory_entry& rhs);
+      private:
+        path            m_path;           // for exposition only
+        mutable file_status  m_status;         // for exposition only; stat()-like
+        mutable file_status  m_symlink_status; // for exposition only; lstat()-like
+      };
+
+  }  // namespace filesystem
+}  // namespace boost
+
+

A directory_entry object stores a path object, +a file_status object for non-symbolic link status, and a file_status object for symbolic link status. The file_status objects act as value caches.

+
+

[Note: Because status()on a pathname may be a relatively expensive operation, +some operating systems provide status information as a byproduct of directory +iteration. Caching such status information can result is significant time savings. Cached and +non-cached results may differ in the presence of file system races. —end note]

+

Actual cold-boot timing of iteration over +a directory with 15,047 entries was six seconds for non-cached status queries +versus one second for cached status queries. Windows XP, 3.0 GHz processor, with +a moderately fast hard-drive. Similar speedups are expected on Linux and BSD-derived +systems that provide status as a by-product of directory iteration.

+
+

directory_entry constructors +[directory_entry.cons]

+
directory_entry();
+
+

Postcondition:

+ + + + + + + + + + + + + + + + + +
ExpressionValue
path().empty()true
status()file_status()
symlink_status()file_status()
+
+
explicit directory_entry(const path& p, file_status st=file_status(), file_status symlink_st=file_status());
+
+

Postcondition:

+ + + + + + + + + + + + + + + + + +
ExpressionValue
path()p
status()st
symlink_status()symlink_st
+
+

directory_entry modifiers +[directory_entry.mods]

+
void assign(const path& p, file_status st=file_status(), file_status symlink_st=file_status());
+
+

Postcondition:

+ + + + + + + + + + + + + + + + + +
ExpressionValue
path()p
status()st
symlink_status()symlink_st
+
+
void replace_filename(const path& p, file_status st=file_status(), file_status symlink_st=file_status());
+
+

Postcondition:

+ + + + + + + + + + + + + + + + + +
ExpressionValue
path()path().branch() / s
status()st
symlink_status()symlink_st
+
+

directory_entry observers +[directory_entry.obs]

+
const path& path() const;
+
+

Returns: m_path

+
+
file_status status() const;
+file_status status(system::error_code& ec) const;
+
+

Effects: As if,

+
+
if ( !status_known( m_status ) )
+{
+  if ( status_known(m_symlink_status) && !is_symlink(m_symlink_status) )
+    { m_status = m_symlink_status; }
+  else { m_status = status(m_path[, ec]); }
+}
+
+

Returns: m_status

+ +

Throws: As specified in Error reporting.

+ +
+
file_status  symlink_status() const;
+file_status  symlink_status(system::error_code& ec) const;
+
+

+ Effects: As if,

+
+
if ( !status_known( m_symlink_status ) )
+{
+  m_symlink_status = symlink_status(m_path[, ec]);
+}
+
+

Returns: m_symlink_status

+ +

Throws: As specified in Error reporting.

+ +
+
bool operator==(const directory_entry& rhs);
+
+

Returns: m_path == rhs.m_path.

+
+
bool operator!=(const directory_entry& rhs);
+
+

Returns: m_path != rhs.m_path.

+
+
bool operator< (const directory_entry& rhs);
+
+

Returns: m_path < rhs.m_path.

+
+
bool operator<=(const directory_entry& rhs);
+
+

Returns: m_path <= rhs.m_path.

+
+
bool operator> (const directory_entry& rhs);
+
+

Returns: m_path > rhs.m_path.

+
+
bool operator>=(const directory_entry& rhs);
+
+

Returns: m_path >= rhs.m_path.

+
+

Class directory_iterator +[class.directory_iterator]

+

Objects of type directory_iterator provide standard library +compliant iteration over the contents of a directory. Also see class recursive_directory_iterator.

+
namespace boost
+{
+  namespace filesystem
+  {
+      class directory_iterator
+      {
+      public:
+        // member functions
+
+        directory_iterator() noexcept;  // creates the "end" iterator
+        directory_iterator(const directory_iterator&);
+        explicit directory_iterator(const path& p);
+        directory_iterator(const path& p, system::error_code& ec);
+       ~directory_iterator();
+
+        directory_iterator& operator=(const directory_iterator&);
+
+        directory_iterator& operator++();
+        directory_iterator& increment(system::error_code& ec);
+
+        // other members as required by
+        //  C++ Std, 24.1.1 Input iterators [input.iterators]
+      };
+
+  }  // namespace filesystem
+}  // namespace boost
+

directory_iterator satisfies the requirements of an +input iterator (C++ Std, 24.2.1, Input iterators [input.iterators]).

+

A directory_iterator reads successive elements from the directory for +which it was constructed, as if by calling ISO/IEC 9945 readdir_r(). After a directory_iterator is constructed, and every time operator++ is called, +it reads a directory element and stores information about it in a object of type directory_entry. operator++ is not equality preserving; that is, i == j does not imply that ++i == ++j.

+
+

[Note: The practical consequence of not preserving equality is that directory iterators +can only be used for single-pass algorithms. —end note]

+
+

If the end of the directory elements is reached, the iterator shall become equal to +the end iterator value. The constructor directory_iterator() with no arguments always constructs an end iterator object, which +shall be the only valid iterator for the end condition. The result of operator* on an end iterator is not defined. For any other iterator value +a const directory_entry& is returned. The result of operator-> on an end iterator is +undefined behavior. For any other iterator value a const directory_entry* is +returned.

+

Two end iterators are always equal. An end iterator shall not be equal to a non-end +iterator.

+
+

The above wording is based on the +Standard Library's istream_iterator wording.

+
+

The result of calling the path() member of the directory_entry object obtained by dereferencing a directory_iterator is a reference to a path object composed of the directory argument from which the iterator was +constructed with filename of the directory entry appended as if by operator/=.

+

Directory iteration shall not yield directory entries for the current (dot) +and parent (dot dot) directories.

+

The order of directory entries obtained by dereferencing successive +increments of a directory_iterator is unspecified.

+
+

[Note: Programs performing directory iteration may wish to test if the +path obtained by dereferencing a directory iterator actually exists. It could be +a +symbolic link to a non-existent file. Programs recursively +walking directory trees for purposes of removing and renaming entries may wish +to avoid following symbolic links.

+

If a file is removed from or added to a directory after the +construction of a directory_iterator for the directory, it is +unspecified whether or not subsequent incrementing of the iterator will ever +result in an iterator whose value is the removed or added directory entry. See +ISO/IEC 9945 readdir_r(). —end note]

+
+

directory_iterator members +[directory_iterator.members]

+ +

directory_iterator() +noexcept;

+ +
+ +

Effects: Constructs the end iterator.

+ +
+ +
explicit directory_iterator(const path& p);
+directory_iterator(const path& p, system::error_code& ec);
+
+ +

Effects: Constructs a iterator representing the first +entry in the directory p resolves to, if any; otherwise, the end iterator.

+ +

Throws: As specified in Error reporting.

+ +

[Note: To iterate over the current directory, use directory_iterator(".") rather than directory_iterator(""). —end note]

+
+
directory_iterator& operator++();
+directory_iterator& increment(system::error_code& ec);
+
+ +

Effects: As specified by the C++ Standard, 24.1.1 Input iterators [input.iterators]

+ +

Returns: *this.

+ +

Throws: As specified in Error reporting.

+ +
+

directory_iterator non-member functions

+
const directory_iterator& begin(const directory_iterator& iter);
+
+

Returns: iter.

+
+
directory_iterator end(const directory_iterator&);
+
+

Returns: directory_iterator().

+
+

Class recursive_directory_iterator +[class.rec.dir.itr]

+

Objects of type recursive_directory_iterator provide standard library +compliant iteration over the contents of a directory, including recursion into +its sub-directories.

+
namespace boost
+{
+  namespace filesystem
+  {
+      class recursive_directory_iterator :
+        public iterator<input_iterator_tag, directory_entry>
+      {
+      public:
+
+        // constructors and destructor
+        recursive_directory_iterator() noexcept;
+        recursive_directory_iterator(const recursive_directory_iterator&);
+        explicit recursive_directory_iterator(const path& p,
+          symlink_option opt = symlink_option::none);
+        recursive_directory_iterator(const path& p,
+          symlink_option opt, system::error_code& ec);
+        recursive_directory_iterator(const path& p, system::error_code& ec);
+       ~recursive_directory_iterator();
+
+        // observers
+        int level() const noexcept;
+        bool no_push_pending() const noexcept;
+
+        // modifiers
+        recursive_directory_iterator& operator=(const recursive_directory_iterator&);
+
+        recursive_directory_iterator& operator++();
+        recursive_directory_iterator& increment(system::error_code& ec);
+
+        void pop();
+        void no_push(bool value=true);
+
+        // other members as required by
+        //  C++ Std, Input iterators [input.iterators]
+
+      private:
+        // actual data members will probably be stored in a shared object,
+        // or some similar mechanism, to achieve the required input iterator
+        // copy semantics
+        int            m_level;    // for exposition only
+        bool           m_no_push;  // for exposition only
+        symlink_option m_options;  // for exposition only
+      };
+
+  }  // namespace filesystem
+}  // namespace boost
+ +

The behavior of a recursive_directory_iterator is the same +as a directory_iterator unless otherwise specified.

+
    +
  • Incrementing a recursive_directory_iterator pointing to a + directory causes that directory itself to be iterated ovee, as specified by + the operator++ and increment functions.
  • +
  • When a recursive_directory_iterator reaches the end of the directory currently being iterated + over, or when pop() is called, m_level is + decremented, and iteration of the parent directory continues.
  • +
+
recursive_directory_iterator() noexcept;
+
+ +

Effects: Constructs the end iterator.

+ +
+ +
explicit recursive_directory_iterator(const path& p, symlink_option opt = symlink_option::none);
+recursive_directory_iterator(const path& p, symlink_option opt, system::error_code& ec);
+recursive_directory_iterator(const path& p, system::error_code& ec);
+
+ +

Effects:  Constructs a iterator representing the first +entry in the directory p resolves to, if any; otherwise, the end iterator.

+ +

Postcondition: Unless the end iterator was constructed, level() == 0 && no_push_pending() == false && m_options == opt. +For the signature without a symlink_option argument, opt is assumed to be symlink_option::none.

+ +

Throws: As specified in Error reporting.

+ +

[Note: To iterate over the current directory, use recursive_directory_iterator(".") rather than recursive_directory_iterator(""). —end note]

+ +

[Note: By default, recursive_directory_iterator does not +follow directory symlinks. To follow directory symlinks, specify opt as symlink_option::recurse —end note]

+
+
int level() const noexcept;
+
+

Requires: *this != recursive_directory_iterator().

+

Returns: m_level.

+
+
bool no_push_pending() const noexcept;
+
+

Requires: *this != recursive_directory_iterator().

+

Returns: m_no_push.

+
+
recursive_directory_iterator& operator++();
+recursive_directory_iterator& increment(system::error_code& ec);
+
+ +

Effects: As specified by the C++ Standard, 24.1.1 Input iterators [input.iterators], +except:

+ +
    +
  • + +

    if !no_push_pending() && is_directory(this->status()) +&& (!is_symlink(this->symlink_status()) || (m_options & symlink_option::recurse) != 0) then  m_level is incremented and directory (*this)->path() is recursively iterated into.

    + +
  • +
  • if there are no more directory entries at this level then m_level +is decremented and iteration of the parent directory resumes.
  • +
+ +

Postcondition: no_push_pending() == false.

+ +

Returns: *this.

+ +

Throws: As specified in Error reporting.

+ +
+
void pop();
+
+

Requires: *this != recursive_directory_iterator().

+

Effects: If level() == 0, set *this to recursive_directory_iterator(). + Otherwise, --m_level, cease iteration of the directory currently being + iterated over, and continue iteration over the parent directory.

+
+
void no_push(bool value=true);
+
+

Requires: *this != recursive_directory_iterator().

+

Postcondition: no_push_pending() == value.

+

[Note: no_push() is used to prevent + unwanted recursion into a directory. —end note]

+
+

recursive_directory_iterator non-member functions

+
const recursive_directory_iterator& begin(const recursive_directory_iterator& iter);
+
+

Returns: iter.

+
+
recursive_directory_iterator end(const recursive_directory_iterator&);
+
+

Returns: recursive_directory_iterator().

+
+

Operational functions [fs.op.funcs]

+

Operational functions query or modify files, including directories, in external +storage.

+

Operational functions access a file by resolving an +object of class path to a particular file in a file hierarchy. The +path is resolved as if by the ISO/IEC 9945 Pathname Resolution mechanism.

+

[Note: Because hardware failures, network failures, file system races, and many +other kinds of errors occur frequently in file system operations, users should be aware +that any filesystem operational function, no matter how apparently innocuous, may encounter +an error. See Error reporting. —end note]

+
path absolute(const path& p, const path& base=current_path());
+
+

Returns: A absolute path composed according to the + following table

+ + + + + + + + + + + + + + + + +
 p.has_root_directory()!p.has_root_directory()
p.has_root_name()return preturn p.root_name() / absolute(base).root_directory()
+ / absolute(base).relative_path() / p.relative_path()
!p.has_root_name()return absolute(base).root_name()
+ / p
return absolute(base) / p
+

[Note: For the returned path, rp, rp.is_absolute() is true. —end note]

+

Throws: If base.is_absolute() is true, throws only if + memory allocation fails.

+
+
path canonical(const path& p, const path& base = current_path());
+path canonical(const path& p, system::error_code& ec);
+path canonical(const path& p, const path& base, system::error_code& ec);
+
+

Overview: Converts p, which must exist, to an absolute +path that has no symbolic link, dot, +or dot-dot elements.

+

Returns: A canonical path that refers to +the same file system object as absolute(p,base). For the overload +without a base argument, base is current_path().

+

Throws:  As specified in Error reporting.

+ +

Remarks: !exists(p) is an error.

+ +

[Note: Canonical pathnames allow security checking of a path (eg. + does this path live in /home/goodguy or /home/badguy?)  —end note]

+ +
+
void copy(const path& from, const path& to);
+void copy(const path& from, const path& to, system::error_code& ec);
+
+

Effects: As if

+ +
+
file_status s(symlink_status(from[, ec]));
+if(is_symlink(s))
+  copy_symlink(from, to[, ec]);
+else if(is_directory(s))
+  copy_directory(from, to[, ec]);
+else if(is_regular_file(s))
+  copy_file(from, to, copy_option::fail_if_exists[, ec]);
+else
+ Report error as specified in Error reporting.
+
+

Throws: As specified in Error reporting.

+ +
+
void copy_directory(const path& from, const path& to);
+void copy_directory(const path& from, const path& to, system::error_code& ec);
+
+ + + + +
+

This function is poorly named; it should probably be an overload of + create_directory with an additional argument.

+ +

Effects: Creates directory to, with + attributes copied from directory from. The set of attributes + copied is operating system dependent.

+ +
+ + + + +
+

[Note: For ISO 9945/POSIX based operating systems the + attributes are those copied by native API stat(from.c_str(), &from_stat) + followed by mkdir(to.c_str(),from_stat.st_mode).  For + Windows based operating systems the attributes are those copied by native + API CreateDirectoryExW(from.c_str(), to.c_str(), 0) + —end note]

+
+ +

Throws: As specified in Error reporting.

+ +
+ +
void copy_file(const path& from, const path& to);
+void copy_file(const path& from, const path& to, system::error_code& ec);
+
+

Effects: copy_file(from, to, copy_option::fail_if_exists[, ec]).

+ +

Throws: As specified in Error reporting.

+ +
+
void copy_file(const path& from, const path& to, copy_option option);
+void copy_file(const path& from, const path& to, copy_option option, system::error_code& ec);
+
+

Effects: If option == copy_option::fail_if_exists && exists(to), an error is reported. Otherwise, the contents and attributes of the file from resolves to are copied to the file to resolves to.

+

Throws: As specified in Error reporting.

+
+
void copy_symlink(const path& existing_symlink, const path& new_symlink);
+void copy_symlink(const path& existing_symlink, const path& new_symlink, system::error_code& ec);
+
+

Effects: create_symlink(read_symlink(existing_symlink[, ec]), new_symlink[, ec]).

+ +

Throws: As specified in Error reporting.

+ +
+
bool create_directories(const path& p);
+bool create_directories(const path& p, system::error_code& ec);
+
+

Effects: Establishes the postcondition by calling + create_directory() for any element of p that does not + exist.

+

Postcondition: is_directory(p)

+

Returns: true if a new directory was created, otherwise + false.

+

Throws: As specified in Error reporting.

+

Complexity: O(n+1) where n is the number of elements + of p that do not exist.

+
+
bool create_directory(const path& p);
+bool create_directory(const path& p, system::error_code& ec);
+
+

Effects: Establishes the postcondition by attempting to create the + directory p resolves to, as if by ISO/IEC 9945 + mkdir() with a second argument of S_IRWXU|S_IRWXG|S_IRWXO. Creation + failure because p resolves to an existing directory shall not be + treated as an error.

+

Postcondition: is_directory(p)

+

Returns: true if a new directory was created, otherwise false.

+

Throws: As specified in Error reporting.

+
+
void create_directory_symlink(const path& to, const path& new_symlink);
+void create_directory_symlink(const path& to, const path& new_symlink, system::error_code& ec);
+
+

Effects: Establishes the postcondition, as if by ISO/IEC 9945 symlink().

+

+ Postcondition: new_symlink resolves to a symbolic link file that + contains an unspecified representation of to.

+

Throws: As specified in Error reporting.

+

[Note: Some operating systems, such as Windows, require symlink creation to + identify that the link is to a directory. Portable code should use create_directory_symlink() to create directory symlinks rather than create_symlink() —end note]

+

[Note: Some operating systems do not support symbolic links at all or support + them only for regular files. + Some file systems do not + support + symbolic links regardless of the operating system - the FAT file system used on + memory cards and flash drives, for example. —end note]

+
+
void create_hard_link(const path& to, const path& new_hard_link);
+void create_hard_link(const path& to, const path& new_hard_link, system::error_code& ec);
+
+

Effects: Establishes the postcondition, as if by ISO/IEC 9945 link().

+

Postcondition:

+
    +
  •  exists(to) && + exists(new_hard_link) && equivalent(to, + + new_hard_link)
  • +
  • The contents of the file or directory + to resolves to are unchanged.
  • +
+

Throws: As specified in Error reporting.

+

[Note: Some operating systems do not support hard links at all or support + them only for regular files. Some file systems do not support hard + links regardless of the operating system - the FAT file system used on memory + cards and flash drives, for example. Some file systems limit the number of + links per file. —end note]

+
+
void create_symlink(const path& to, const path& new_symlink);
+void create_symlink(const path& to, const path& new_symlink, system::error_code& ec);
+
+

Effects: Establishes the postcondition, as if by ISO/IEC 9945 symlink().

+

+ Postcondition: new_symlink resolves to a symbolic link file that + contains an unspecified representation of to.

+

Throws: As specified in Error reporting.

+

[Note: Some operating systems do not support symbolic links at all or support + them only for regular files. + Some file systems do not + support + symbolic links regardless of the operating system - the FAT system used on + memory cards and flash drives, for example. —end note]

+
+
path current_path();
+path current_path(system::error_code& ec);
+
+

Returns: The current working directory path, as if by ISO/IEC + 9945 getcwd(). is_absolute() is true for the returned path.

+

Throws: As specified in Error reporting.

+

[Note: The current_path() name was chosen to emphasize that the return is a + path, not just a single directory name.

+

The current path as returned by many operating systems is a dangerous + global variable. It may be changed unexpectedly by a third-party or system + library functions, or by another thread.  —end note]

+
+
void current_path(const path& p);
+void current_path(const path& p, system::error_code& ec);
+
+

Effects: Establishes the postcondition, as if by ISO/IEC 9945 chdir().

+

Postcondition: equivalent(p, current_path()).

+

Throws: As specified in Error reporting.

+

[Note: The current path for many operating systems is a dangerous + global state. It may be changed unexpectedly by a third-party or system + library functions, or by another thread.  —end note]

+
+
bool exists(file_status s) noexcept;
+
+

Returns: status_known(s) && s.type() != file_not_found

+
+
bool exists(const path& p);
+bool exists(const path& p, system::error_code& ec) noexcept;
+
+

Returns: exists(status(p)) or exists(status(p, ec)), + respectively. If ec != 0 and an error

+

Throws: As specified in Error reporting.

+
+
bool equivalent(const path& p1, const path& p2);
+bool equivalent(const path& p1, const path& p2, system::error_code& ec);
+
+

Effects: Determines file_status s1 and s2, as if by status(p1) and  status(p2), + respectively.

+

Returns: true, if sf1 == + sf2 and p1 and p2 resolve to the same file + system entity, else false.

+
+

Two paths are considered to resolve to the same + file system entity if two candidate entities reside on the same device at the + same location. This is determined as if by the values of the ISO/IEC 9945 stat structure, obtained as if by stat() for the two paths, having equal st_dev values + and equal st_ino values.

+

[Note: ISO/IEC 9945 requires that "st_dev must be unique within a Local Area Network". Conservative + ISO/IEC 9945 implementations may also wish to check for equal st_size and st_mtime values. Windows implementations may use GetFileInformationByHandle() as a surrogate for stat(), + and consider "same" to be equal values for dwVolumeSerialNumber, nFileIndexHigh, nFileIndexLow, nFileSizeHigh, nFileSizeLow, ftLastWriteTime.dwLowDateTime, and ftLastWriteTime.dwHighDateTime. —end note]

+
+

Throws: filesystem_error if (!exists(s1) && !exists(s2)) || (is_other(s1) && is_other(s2)), + otherwise as specified in Error reporting.

+
+
+
uintmax_t file_size(const path& p);
+uintmax_t file_size(const path& p, system::error_code& ec);
+
+
+

Returns: If exists(p) && is_regular_file(p), the size + in bytes + of the file p resolves to, determined as if by the value of + the ISO/IEC 9945 stat structure member st_size obtained as if by + ISO/IEC 9945 stat(). + Otherwise, static_cast<uintmax_t>(-1).

+

Throws: As specified in Error reporting.

+
+
uintmax_t hard_link_count(const path& p);
+uintmax_t hard_link_count(const path& p, system::error_code& ec);
+
+ +

Returns: The number of hard links for p.

+

Throws: As specified in Error reporting.

+ +
+ +
const path& initial_path();
+const path& initial_path(system::error_code& ec);
+
+

Returns: current_path() as of the first call to initial_path().

+

[Note: initial_path() is not thread safe, and may return an undesirable result + if called subsequent to a change to the current directory. These problems can + be avoided by calling initial_path() immediately on entry to + main().  —end note]

+

Throws: For the first call, as specified in Error reporting. Subsequent calls throw nothing.

+
+
bool is_directory(file_status s) noexcept;
+
+

Returns: s.type() == directory_file

+
+
bool is_directory(const path& p);
+bool is_directory(const path& p, system::error_code& ec) noexcept;
+
+

Returns: is_directory(status(p)) or is_directory(status(p, ec)), + respectively.

+

Throws: filesystem_error; overload with error_code& throws +nothing.

+
+
bool is_empty(const path& p);
+bool is_empty(const path& p, system::error_code& ec);
+
+

Effects: Determines file_status s, as if by status(p, ec).

+

Returns: is_directory(s)
+         ? directory_iterator(p) == directory_iterator()
+         : file_size(p) == 0;

+
+
bool is_regular_file(file_status s) noexcept;
+
+

Returns: s.type() == regular_file

+
+
bool is_regular_file(const path& p);
+
+

Returns: is_regular_file(status(p)).

+

Throws: filesystem_error if status(p) would throw filesystem_error.

+
+
bool is_regular_file(const path& p, system::error_code& ec) noexcept;
+
+

Effects: Sets ec as if by status(p, ec). [Note: status_error, file_not_found and type_unknown cases set ec to error values. To distinguish between cases, call the status function directly. —end + note]

+

Returns: is_regular_file(status(p, ec)).

+
+
bool is_other(file_status s) noexcept;
+
+

Returns: return exists(s) && !is_regular_file(s) && !is_directory(s) && !is_symlink(s)

+
+
bool is_other(const path& p);
+bool is_other(const path& p, system::error_code& ec) noexcept;
+
+

Returns: is_other(status(p)) or is_other(status(p, ec)), + respectively.

+

Throws: filesystem_error; overload with error_code& throws + nothing.

+
+
bool is_symlink(file_status s) noexcept;
+
+

Returns: s.type() == symlink_file

+
+
bool is_symlink(const path& p);
+bool is_symlink(const path& p, system::error_code& ec) noexcept;
+
+

Returns: is_symlink(symlink_status(p)) or is_symlink(symlink_status(p, ec)), + respectively.

+

Throws: filesystem_error; overload with error_code& throws + nothing.

+
+
std::time_t last_write_time(const path& p);
+std::time_t last_write_time(const path& p, system::error_code& ec);
+
+

Returns: The time of last data modification of p, determined as if by the + value of the ISO/IEC 9945 stat structure member st_mtime  obtained + as if by ISO/IEC 9945 stat().

+

Throws: As specified in Error reporting.

+
+
void last_write_time(const path& p, const std::time_t new_time);
+void last_write_time(const path& p, const std::time_t new_time, system::error_code& ec);
+
+

Effects: Sets the time of last data modification of the file + resolved to by p to new_time, as if by ISO/IEC + 9945 stat() followed by + ISO/IEC 9945 utime().

+

Throws: As specified in Error reporting.

+

[Note: A postcondition of last_write_time(p) == new_time is not specified since it might not hold for file systems + with coarse time granularity. —end note]

+
+
void permissions(const path& p, perms prms);
+void permissions(const path& p, perms prms, system::error_code& ec);
+
+

+ Requires: !((prms & add_perms) && (prms & remove_perms)).

+

Effects: Applies the effective permissions bits from prms to the file p resolves to, as if by + ISO/IEC 9945 fchmodat(). The effective permission bits are determined as + specified by the following table.

+ + + + + + + + + + + + + + + + + +
bits present in prmsEffective bits applied
Neither add_perms nor remove_permsprms & perms_mask
add_perms +

status(p).permissions() | (prms & perms_mask)

remove_permsstatus(p).permissions() & ~(prms & perms_mask)
+

[Note: Conceptually permissions are viewed as bits, but the actual + implementation may use some other mechanism. -- end note]

+

Throws: As specified in Error reporting.

+
+
path read_symlink(const path& p);
+path read_symlink(const path& p, system::error_code& ec);
+
+

Returns:  If p resolves to a symbolic + link, a path object containing the contents of that symbolic + link. Otherwise an empty path object.

+

Throws: As specified in Error reporting. [Note: It is an error if p does not + resolve to a symbolic link. —end note]

+
+
bool remove(const path& p);
+bool remove(const path& p, system::error_code& ec);
+
+

Effects:  If exists(symlink_status(p,ec)), it is + removed + as if by ISO/IEC 9945 remove().

+
+

[Note: A symbolic link is itself removed, rather than the file it + resolves to being removed. —end note]

+
+

Postcondition: !exists(symlink_status(p)).

+

Returns:  false if p did not exist in the first + place, otherwise true.

+

Throws: As specified in Error reporting.

+
+
uintmax_t remove_all(const path& p);
+uintmax_t remove_all(const path& p, system::error_code& ec);
+
+

Effects:  Recursively deletes the contents of p if it exists, + then deletes file p itself, + as if by ISO/IEC 9945 remove().

+
+

[Note: A symbolic link is itself removed, rather than the file it + resolves to being removed. —end note]

+
+

Postcondition: !exists(p)

+

Returns: The number of files removed.

+

Throws: As specified in Error reporting.

+
+
void rename(const path& old_p, const path& new_p);
+void rename(const path& old_p, const path& new_p, system::error_code& ec);
+
+

Effects: Renames old_p to new_p, as if by + ISO/IEC 9945 rename().

+
+

[Note: If old_p and new_p resolve to the + same existing file, no action is taken. Otherwise, if new_p resolves to an + existing non-directory file, it is removed, while if new_p resolves to an + existing directory, it is removed if empty on ISO/IEC 9945 but is an error on Windows. A symbolic link is itself renamed, rather than + the file it resolves to being renamed. —end note]

+
+

Throws: As specified in Error reporting.

+
+
void resize_file(const path& p, uintmax_t new_size);
+void resize_file(const path& p, uintmax_t new_size, system::error_code& ec);
+
+

Postcondition: file_size() == new_size.

+

Throws: As specified in Error reporting.

+

Remarks: Achieves its postconditions as if by ISO/IEC 9945 truncate().

+
+
space_info space(const path& p);
+space_info space(const path& p, system::error_code& ec);
+
+

Returns: An object of type space_info. The value of the space_info object is determined as if by + using ISO/IEC 9945 statvfs() to obtain a ISO/IEC 9945 struct + statvfs, + and then multiplying its f_blocks, f_bfree, + and f_bavail members by its f_frsize member, + and assigning the results to the capacity, free, + and available members respectively. Any members for which the + value cannot be determined shall be set to -1.

+

Throws: As specified in Error reporting.

+
+
file_status status(const path& p);
+
+

Effects: As if:

+
+
system::error_code ec;
+file_status result = status(p, ec);
+if (result == status_error)
+  throw filesystem_error(implementation-supplied-message, p, ec);
+return result;
+
+

Returns: See above.

+

Throws: filesystem_error. +[Note: result values of file_status(file_not_found)and file_status(type_unknown) are not considered failures and do not + cause an exception to be +thrown. —end note]

+
+
file_status status(const path& p, system::error_code& ec) noexcept;
+
+

Effects:

+
+

If possible, determines the attributes + of the file p resolves to, as if by ISO/IEC 9945 stat().

+ If, during attribute determination, the underlying file system API reports + an error, sets ec to indicate the specific error reported. + Otherwise, ec.clear().
+

[Note: This allows users to inspect the specifics of underlying + API errors even when the value returned by status() is not file_status(status_error)—end note]

+
+
+

Returns:

+
+

If ec != error_code():

+
    +
  • If the specific error indicates that p cannot be resolved + because some element of the path does not exist, return + file_status(file_not_found). [Note: ISO/IEC 9945 errors that + indicate this are ENOENT or ENOTDIR. Windows equivalents + include ERROR_FILE_NOT_FOUND, ERROR_PATH_NOT_FOUND, ERROR_INVALID_NAME, + ERROR_INVALID_PARAMETER, ERROR_BAD_PATHNAME, and ERROR_BAD_NETPATH. -- + end note]
  • +
  • Otherwise, if the specific error indicates that p can be resolved + but the attributes cannot be determined, return + file_status(type_unknown). [Note: For example, Windows + ERROR_SHARING_VIOLATION errors. For ISO/IEC 9945, the case never arises. —end + note]
  • +
  • Otherwise, return + file_status(status_error).
  • +
+
+

[Note: These semantics distinguish between p being known not to exist, p existing but not being able to determine its attributes, + and there being an error that prevents even knowing if p exists. These + distinctions are important to some use cases. —end note]

+
+

Otherwise,

+
    +
  • If the attributes indicate a regular file, as if by ISO/IEC 9945 S_ISREG(), + return + file_status(regular_file). [Note: +regular_file implies appropriate <fstream> operations + would succeed, assuming no hardware, permission, access, or file system + race + errors. Lack of +regular_file does not necessarily imply <fstream> operations would +fail on a directory. +—end note]
  • +
  • Otherwise, if the attributes indicate a directory, as if by ISO/IEC 9945 + S_ISDIR(), + return + file_status(directory_file). [Note: directory_file implies +directory_iterator(p)would succeed. +—end note]
  • +
  • Otherwise, if the attributes indicate a block special file, as if by ISO/IEC 9945 + S_ISBLK(), + return + file_status(block_file).
  • +
  • Otherwise, if the attributes indicate a character special file, as if by ISO/IEC 9945 + S_ISCHR(), + return + file_status(character_file).
  • +
  • Otherwise, if the attributes indicate a fifo or pipe file, as if by + ISO/IEC 9945 + S_ISFIFO(), + return + file_status(fifo_file).
  • +
  • Otherwise, if the attributes indicate a socket, as if by ISO/IEC + 9945 + S_ISSOCK(), + return + file_status(socket_file).
  • +
  • Otherwise, return + file_status(type_unknown).
  • +
+
+

Remarks: If a symbolic link is encountered during pathname + resolution, + pathname resolution continues using the contents of the symbolic link.

+
+
bool status_known(file_status s) noexcept;
+
+

Returns: s.type() != status_error

+
+
file_status symlink_status(const path& p);
+file_status symlink_status(const path& p, system::error_code& ec) noexcept;
+
+

Effects:  Same as status(), above, + except that the attributes + of p are determined as if by ISO/IEC 9945 lstat().

+
+
+

Returns: Same as status(), above, except + that if the attributes indicate a symbolic link, as if by ISO/IEC 9945 S_ISLNK(), return file_status(symlink_file).

+

Remarks: Pathname resolution terminates if p names a symbolic link.

+

Throws: filesystem_error; overload with error_code& throws + nothing.

+
+
path system_complete(const path& p);
+path system_complete(const path& p, system::error_code& ec);
+
+

Effects: Composes an absolute path from p, using the + same rules used by the operating system to resolve a path passed as the + filename argument to standard library open functions.

+

Returns: The composed path.

+

Postcondition: For the returned path, rp, rp.is_absolute() is true.

+

Throws: As specified in Error reporting.

+

[Note: For ISO/IEC 9945, system_complete(p) has the same semantics as complete(p, current_path()).

+

For Windows, system_complete(p) has the + same semantics as complete(ph, current_path()) if p.is_absolute() || !p.has_root_name() or p and base have the same root_name(). + Otherwise it acts like complete(p, kinky), where kinky is the current directory for the p.root_name() drive. This will + be the current directory of that drive the last time it was set, and thus may + be residue left over from a prior program run by the command + processor! Although these semantics are often useful, they are also very + error-prone.

+

See complete() note for usage suggestions. —end note]

+
+
path temp_directory_path();
+path temp_directory_path(system::error_code& ec);
+
+

Returns: A directory path suitable for temporary files under the + conventions of the operating system. The specifics of how this path is + determined are implementation defined. An error shall be reported if !exists(p) + || !is_directory(p), where p is the path to be returned.

+

ISO/IEC 9945: The path supplied by the first environment variable found in the + list TMPDIR, TMP, TEMP, TEMPDIR. If none of these are found, "/tmp", + or, if macro __ANDROID__ is defined, "/data/local/tmp".

+

Windows: The path reported by the Windows GetTempPath API function.

+

Throws: As specified in Error reporting.

+

[Note: The temp_directory_path() name was chosen to emphasize that the return is a + path, not just a single directory name.  —end note]

+
+
path unique_path(const path& model="%%%%-%%%%-%%%%-%%%%");
+path unique_path(const path& model, system::error_code& ec);
+
+

The unique_path function generates a path name suitable for + creating temporary files, including directories. The name is based + on a model that uses the percent sign character to specify replacement by a + random hexadecimal digit. [Note: The more bits of randomness in the + generated path name, the less likelihood of prior existence or being guessed. + Each replacement hexadecimal digit in the model adds four bits of randomness. + The default model thus provides 64 bits of randomness. This is sufficient for + most applications. —end note]

+

Returns: A path identical to model, except that each + occurrence of a percent sign character is replaced by a random hexadecimal + digit character in the range 0-9, a-f.

+

Throws: As specified in Error reporting.

+

Remarks: Implementations are encouraged to obtain the required + randomness via a cryptographically secure pseudo-random number generator, such as one + provided by the operating system. [Note: Such generators may block + until sufficient entropy develops. —end note]

+
+
+ + + + +

File streams - +<boost/filesystem/fstream.hpp>

+

Replacements are provided for the file stream classes from the C++ standard +library's <fstream> header. These replacement classes +publicly inherit from the standard library classes. In the Boost.Filesystem +version, constructors and open functions take const path& arguments +instead of +const char* arguments. There are no other differences in syntax or +semantics.

+
namespace boost
+{
+  namespace filesystem
+  {
+    template < class charT, class traits = std::char_traits<charT> >
+    class basic_filebuf : public std::basic_filebuf<charT,traits>
+    {
+    public:
+      basic_filebuf<charT,traits>*
+        open(const path& p, std::ios_base::openmode mode);
+    };
+
+    template < class charT, class traits = std::char_traits<charT> >
+    class basic_ifstream : public std::basic_ifstream<charT,traits>
+    {
+    public:
+      explicit basic_ifstream(const path& p, std::ios_base::openmode mode=std::ios_base::in)
+      void open(const path& p, std::ios_base::openmode mode=std::ios_base::in);
+    };
+
+    template < class charT, class traits = std::char_traits<charT> >
+    class basic_ofstream : public std::basic_ofstream<charT,traits>
+    {
+    public:
+      explicit basic_ofstream(const path& p, std::ios_base::openmode mode=std::ios_base::out);
+      void open(const path& p, std::ios_base::openmode mode=std::ios_base::out);
+    };
+
+    template < class charT, class traits = std::char_traits<charT> >
+    class basic_fstream : public std::basic_fstream<charT,traits>
+    {
+    public:
+      explicit basic_fstream(const path& p,
+        std::ios_base::openmode mode=std::ios_base::in | std::ios_base::out);
+      void open(const path& p,
+        std::ios_base::openmode mode=std::ios_base::in | std::ios_base::out);
+    };
+
+    typedef basic_filebuf<char> filebuf;
+    typedef basic_ifstream<char> ifstream;
+    typedef basic_ofstream<char> ofstream;
+    typedef basic_fstream<char> fstream;
+
+    typedef basic_filebuf<wchar_t> wfilebuf;
+    typedef basic_ifstream<wchar_t> wifstream;
+    typedef basic_fstream<wchar_t> wfstream;
+    typedef basic_ofstream<wchar_t> wofstream;
+    
+  }  // namespace filesystem
+}  // namespace boost
+ + + +

Path decomposition table

+

The table is generated by a program compiled with the Boost implementation.

+

Shaded entries indicate cases where ISO/IEC 9945 (POSIX) and Windows implementations yield different results. The top value is the +ISO/IEC 9945 result and the bottom value is the Windows result.
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Constructor
argument
Iteration
over
Elements
string()generic_
string()
root_
path()
root_
name()
root_
directory()
relative_
path()
parent_
path()
filename()
emptyemptyemptyemptyemptyemptyemptyemptyemptyempty
....emptyemptyempty.empty.
........emptyemptyempty..empty..
foofoofoofooemptyemptyemptyfooemptyfoo
/////empty/emptyempty/
/foo/,foo/foo/foo/empty/foo/foo
foo/foo,.foo/foo/emptyemptyemptyfoo/foo.
/foo//,foo,./foo//foo//empty/foo//foo.
foo/barfoo,barfoo/barfoo/baremptyemptyemptyfoo/barfoobar
/foo/bar/,foo,bar/foo/bar/foo/bar/empty/foo/bar/foobar
//net//net//net//net//net//netemptyemptyempty//net
//net/foo//net,/,foo//net/foo//net/foo//net///net/foo//net/foo
///foo////,foo,.///foo//////foo////empty/foo//////foo.
///foo///bar/,foo,bar///foo///bar///foo///bar/empty/foo///bar///foobar
/./,./././empty/./.
./.,.././emptyemptyempty./..
/../,../../../empty/../..
../..,.../../emptyemptyempty../...
foo/.foo,.foo/.foo/.emptyemptyemptyfoo/.foo.
foo/..foo,..foo/..foo/..emptyemptyemptyfoo/..foo..
foo/./foo,.,.foo/./foo/./emptyemptyemptyfoo/./foo/..
foo/./barfoo,.,barfoo/./barfoo/./baremptyemptyemptyfoo/./barfoo/.bar
foo/..foo,..foo/..foo/..emptyemptyemptyfoo/..foo..
foo/../foo,..,.foo/../foo/../emptyemptyemptyfoo/../foo/...
foo/../barfoo,..,barfoo/../barfoo/../baremptyemptyemptyfoo/../barfoo/..bar
c:c:c:c:empty
c:
empty
c:
emptyc:
empty
emptyc:
c:/c:,.
c:,/
c:/c:/empty
c:/
empty
c:
empty
/
c:/
empty
c:.
/
c:fooc:foo
c:,foo
c:fooc:fooempty
c:
empty
c:
emptyc:foo
foo
empty
c:
c:foo
foo
c:/fooc:,foo
c:,/,foo
c:/fooc:/fooempty
c:/
empty
c:
empty
/
c:/foo
foo
c:
c:/
foo
c:foo/c:foo,.
c:,foo,.
c:foo/c:foo/empty
c:
empty
c:
emptyc:foo/
foo/
c:foo.
c:/foo/c:,foo,.
c:,/,foo,.
c:/foo/c:/foo/empty
c:/
empty
c:
empty
/
c:/foo/
foo/
c:/foo.
c:/foo/barc:,foo,bar
c:,/,foo,bar
c:/foo/barc:/foo/barempty
c:/
empty
c:
empty
/
c:/foo/bar
foo/bar
c:/foobar
prn:prn:prn:prn:empty
prn:
empty
prn:
emptyprn:
empty
emptyprn:
c:\c:\
c:,/
c:\c:\
c:/
empty
c:\
empty
c:
empty
\
c:\
empty
empty
c:
c:\
\
c:fooc:foo
c:,foo
c:fooc:fooempty
c:
empty
c:
emptyc:foo
foo
empty
c:
c:foo
foo
c:\fooc:\foo
c:,/,foo
c:\fooc:\foo
c:/foo
empty
c:\
empty
c:
empty
\
c:\foo
foo
empty
c:\
c:\foo
foo
c:foo\c:foo\
c:,foo,.
c:foo\c:foo\
c:foo/
empty
c:
empty
c:
emptyc:foo\
foo\
empty
c:foo
c:foo\
.
c:\foo\c:\foo\
c:,/,foo,.
c:\foo\c:\foo\
c:/foo/
empty
c:\
empty
c:
empty
\
c:\foo\
foo\
empty
c:\foo
c:\foo\
.
c:\foo/c:\foo,.
c:,/,foo,.
c:\foo/c:\foo/
c:/foo/
empty
c:\
empty
c:
empty
\
c:\foo/
foo/
c:\foo.
c:/foo\barc:,foo\bar
c:,/,foo,bar
c:/foo\barc:/foo\bar
c:/foo/bar
empty
c:/
empty
c:
empty
/
c:/foo\bar
foo\bar
c:
c:/foo
foo\bar
bar
+

Warning: Long paths on Windows and the +extended-length \\?\ prefix

+

The Microsoft Windows "Maximum Path Length Limitation" specifies:

+
+

In the Windows API (with some exceptions ...), the maximum length for a path +is MAX_PATH, which is defined as 260 characters.

+

The Windows API has many functions that also have Unicode versions to permit +an extended-length path for a maximum total path length of 32,767 characters. +... To specify an extended-length path, use the "\\?\" prefix. For +example, "\\?\D:\very long path".  [C++ string literals require backslashes be doubled, of course.]

+
+

Because most Boost.Filesystem operational functions just pass the contents of +a class path object to the Windows API, they do work with the extended-length +prefixes. But some won't work, because to the limitations imposed by Windows. +Read the following cautions carefully!

+

Cautions for paths with extended-length prefixes

+
    +
  • Individual components of a path are still are limited to whatever is + supported for the particular filesystem, commonly 255 characters.
  • +
  • Only backslashes only are acceptable as directory separators. Slashes are + not treated as separators.
  • +
  • All paths must be absolute - relative paths are not allowed.
  • +
  • Once an absolute path grows beyond 260 characters, it is essentially + poisoned and all operations must use extended-length prefixes. So even a + simple operation like create_directory("a") will fail if the + absolute path of the resulting directory would exceed 260 characters.
  • +
  • Certain Boost.Filesystem functions that decompose their argument path and + then work on individual relative directories or files will not work properly + with extended-length prefix paths.
  • +
+

Acknowledgements

+

This Filesystem Library is dedicated to my wife, Sonda, who provided the +support necessary to see both a trial implementation and the proposal itself +through to completion. She gave me the strength to continue after a difficult +year of cancer treatment in the middle of it all.

+

Many people contributed technical comments, ideas, and suggestions to the +Boost Filesystem Library. See http://www.boost.org/libs/filesystem/doc/index.htm#Acknowledgements.

+

Dietmar Kuehl contributed the original Boost Filesystem Library directory_iterator design. Peter Dimov, Walter Landry, Rob Stewart, and Thomas +Witt were particularly helpful in refining the library.

+

The create_directories, extension, basename, and replace_extension functions +were developed by Vladimir Prus. The temp_directory_path function was +contributed by Jeff Flinn. David Svoboda suggested the canonical function and +provided psuedo-code.

+

Howard Hinnant and John Maddock reviewed a draft of the version 2 proposal, and +identified a number of mistakes or weaknesses, resulting in a more polished +final document.

+

Peter Dimov suggested a single class path, with member templates to adapt to +multiple string types. His idea became the basis for the version 3 path design.

+

References

+ + + + + + + + + +
[ISO/IEC 9945]ISO/IEC 9945:2003, IEEE Std 1003.1-2001, and The Open Group + Base Specifications, Issue 6. Also known as The Single Unix® + Specification, Version 3. Available from each of the organizations involved + in its creation. For example, read online or download from www.unix.org/single_unix_specification/. The ISO JTC1/SC22/WG15 - + POSIX homepage is www.open-std.org/jtc1/sc22/WG15/
[Abrahams]Dave Abrahams, Error and Exception Handling, www.boost.org/more/error_handling.html
+
+> +

© Copyright Beman Dawes, 2002, 2006, 2007, 2009, 2010, 2011

+

Distributed under the Boost Software License, Version 1.0. See + +www.boost.org/LICENSE_1_0.txt

+

Revised +22 July 2015

+ + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/doc/release_history.html b/ThirdParty/boost-Subset/libs/filesystem/doc/release_history.html new file mode 100644 index 0000000000..89aebd71d3 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/doc/release_history.html @@ -0,0 +1,284 @@ + + + + + + + +Filesystem Release History + + + + + + + + + + +
+ +boost.png (6897 bytes) + Filesystem Release History +
+ + + + +
Home    + Tutorial    + Reference    + FAQ    + Releases    + Portability    + V3 Intro    + V3 Design    + Deprecated    + Bug Reports    +
+ +

1.58.0

+
    +
  • Rewrite Windows implementation of temp_directory_path() to (1) avoid + GetTempPath() failure if path length > 130 (ticket #5300) and (2) provide a + more sensible sequence of directories than provided by GetTempPath(), per + boost list discussion "[filesystem] temp_directory_path() behavior on + Windows". The new sequence is:
      +
    1. %TMP%
    2. +
    3. %TEMP%
    4. +
    5. %LOCALAPPDATA%/Temp
    6. +
    7. %USERPROFILE%/Temp
    8. +
    9. GetWindowsDirectoryW()/Temp
    10. +
    +
  • +
+ +

1.57.0

+
    +
  • Rework class path locale and codecvt implementation for increased reliability. + This change was SVN revision 83021, which should have gone into 1.56.0 but + unfortunately the merge didn't happen until too late.
  • +
  • Fix tickets #8930, #9054, + #9219, + #10228, and + #10641, all + related to locales and codecvt facets.
  • +
  • The net effect of the above changes and fixes should be to eliminate + spurious "locale::facet::_S_create_c_locale name not valid" errors on Linux + and other non-BSD POSIX-like systems. The error will continue to occur, as it + should, when a path encoding conversion char-to-wchar_t or wchar_t-to-char is + attempted in an environment without a valid C locale (for example, if the LANG + environment variable is invalid or not defined).
  • +
  • Fix #6124, + #6779, and + #10038 - an + undefined reference that occurred when the library was compiled for C++03 but + the using program was compiled for C++11, or vice versa. The private library + interface has been changed to use a plain-old C++03 enum. This is the fix + suggested by Andy in 6779.
  • +
  • The Windows implementation now treats NTFS directory junctions (also known + as junctions, also known as mount points) as symlinks. This has the effect of + treating directory junctions as directories, and thus supporting all + operations suitable for directories. This resolves + #9016. Directory + junctions are very similar to symlinks, but may have performance or other + advantages in some situations. They can be created from the command line with + "mklink /j link target". There is no plan for Boost.Filesystem to + be able to create them directly other than by calling std::system().
  • +
+ +

1.56.0

+
    +
  • Reorganize recursive_directory_iterator::increment, adding an + invariant that progress is always made, even if an error is reported by + exception or error_code. Add a manually executed test, + test/issues/recurse_dir_iter_5403.cpp. Adjust regular regression tests + as needed. Thanks to Claudio Bley for the + pull request - the + change was incorporated into the reorganized code. Fixes + #5403 and + #6821.
  • +
  • Fix canonical() to treat parent of root as root. (Christian + Hammerl) Fixes #9683 + and #10187.
  • +
  • Added missing test for __sun macro which is defined on + Solaris 10. (Chris Stylianou)
  • +
  • Minor fixes and code cleanup.
  • +
  • Update IDE projects to Visual Studio 2013.
  • +
  • Remove unused const char colon to clear clang warning. (J?gen + Hunold)
  • +
  • Add BOOST_NOEXCEPT to class filesystem_error.
  • +
  • Change perms::all_all and perms::perms_mask to + absolute values to quiet intellisense warnings, and conform to C++11.
  • +
+ +

1.54.0

+
    +
  • Reimplement path::codecvt() and path::imbue() + with portable code that is intended to be much more robust and maintainable. A + section on path usage concerns has + been added to the reference documentation describing several concerns that + arise in the context of multithreading and path::codecvt().
  • +
+ +

1.52.0

+
    +
  • Fix #7239, Stack + overflow when calling create_directories(":D"). The reported + problem was a symptom of an internal bug that caused path::filename() + and path::parent_path() to fail on Windows for path(":"), + and that in turn caused other functions that depend on filename() + or parent_path() to fail, such as create_directories().
  • +
+ +

1.51.0

+
    +
  • Add begin() and end() non-member functions for directory_iterator and + recursive_directory_iterator so that C++11 range-based for statements work. + Suggested by feature requests + #5896 and + #6521, using the + #5896 approach.
  • +
  • Add range_begin() and range_end() non-member functions for directory_iterator and + recursive_directory_iterator so that + BOOST_FOREACH works.
  • +
  • Fix a Linux fchmodat problem affecting symlink permissions reported during + discussion of #6659.
  • +
  • Fix #6659 and + #7051, fchmodat + supported only on Solaris 11. Fix for both Sun and GCC compilers.
  • +
+ +

1.50.0

+
    +
  • Remove Filesystem Version 2 from the distribution. Version 3 is now the + only distributed version. Those still using V2 are urged to migrate to V3 as + soon as possible.
  • +
  • Add constexpr value_type preferred_separator to class path.
  • +
  • Fix #5118, + replace_extension doesn't work as specified in documentation. The + documentation, implementation, and test cases have all had fixes applied. The + documentation had failed to mention that any existing extension is removed. + The behavior for simple cases has been reverted to the Version 2 behavior, but + with corrections so that complex replacements now work. Two test cases from + #5118 have been added.
  • +
  • Fix #3737, + Boost.Filesystem does not compile on Windows Mobile. On Windows, <sys/stat.h> + is no longer included.
  • +
  • Fix #4065, + Boost Filesystem lexicographic path comparison inconsistent. This required + multiple source code bug fixes and code cleanup, correcting problems not + related to lexicographical issues.
  • +
  • Add class path member function compare for consistency with + std::string.
  • +
  • Tighten BOOST_FILESYSTEM_DYN_LINK and BOOST_FILESYSTEM_STATIC_LINK logic + in filesystem/config.hpp so that one or the other is always defined, and both + being defined is a #error.
  • +
  • Fix #6690 and + #6737, resolving + static linking related problems with VC++ 8 through 11. Note that this fix may + reintroduce codecvt thread safety problems + #4889, + #6320, for these + compilers if static linking is used.
  • +
  • Add path::operator+= and concat functions to tack on things like suffixes + or numbers. Suggested by Ed Smith-Rowland and others.
  • +
  • Fix #6809, + Implementation of filesystem::rename() method for MS Windows is wrong, by + adding MOVEFILE_COPY_ALLOWED to deal with renames across drives, volumes, file + systems. Fix has no effect on non-Windows systems.
  • +
  • Fix #6819, A path operand with a source that was a one character array was + treated as empty, even if it wasn't empty. Such arrays can occur in unions or + in code using C variable length array idioms.
  • +
  • Fix #6932, + create_directories throws exception even if error_code is specified.
  • +
+ +

1.49.0

+
    +
  • Fix #3714, + Added test cases and fixes for class path errors when assignment or append + used self or portion of self as source.
  • +
  • Fix #4889, + #6320, Locale codecvt_facet not thread safe on Windows. Move + Windows, Mac OS X, locale and codecvt facet back to namespace scope. POSIX + except OS X uses local static initialization (IE lazy) to ensure exceptions + are catchable if environmental variables are misconfigured and to avoid use of + locale("") if not actually used.
  • +
  • Fix #5652, + recursive_directory_iterator fails on cyclic symbolic links. Thanks to Daniel + Aarno for the patch.
  • +
  • Fix #5653, + recursive_directory_iterator(error_code) can still throw filesystem_error.
  • +
  • Fix #5900, directory_iterator + access violation on Windows if error is thrown. Thanks to Andreas Eckleder for the patch.
  • +
  • Fix #5900 + comment 2, a bug in director_iterator construction with error_code argument that + caused increment to be called without the ec argument being passed.
  • +
  • Fix #5989 by cleaning up test suite path_test.cpp code even + though the ticket itself was not a defect, and clarifying docs; iteration over a path yields + generic format.
  • +
  • Fix #5592, Change Windows codecvt processing from CP_THREAD_ACP to CP_ACP.
  • +
  • Operations function fixes for PGI compiler, thanks to Noel Belcourt.
  • +
  • Relax permissions test to reflect reality, particularly on the Sandia test + platforms.
  • +
+ +

1.48.0

+
    +
  • Added operational function canonical(), + suggested by David Svoboda, who also provided pseudo-code.
  • +
  • Added hash_value() function for + paths. (Daniel James)
  • +
  • Fix path inserter problem (#5764) + reported for QNX6.3.2 host (gcc-3.3.5)
  • +
  • Fix problem of locale("") exception being thrown before main() starts on + poorly configured (e.g. LANG="bad name") POSIX systems. Resolves the most + serious aspect of tickets + #4688, + #5100, + #5289.
  • +
+ +

1.47.0

+
    +
  • Program file_status.cpp added (V3). See boost-root/libs/filesystem/v3/example. + Useful both as an example and to explore how Boost.Filesystem treats various + status errors.  Run "bjam" (NOT "bjam install") in the example directory + to install in example/bin.
  • +
+ +

1.46.1

+ +
    +
  • Fix fstream problem for STLPort masquerading as Dinkumware (#5217).
  • +
+ +

1.46.0

+
    +
  • Version 3 of the library is now the default.
  • +
  • IBM vacpp: Workaround for compiler bug affecting iterator_facade. (#4912)
  • +
  • Verify, clarify, document that <boost/config/user.hpp> can be used to + specify BOOST_FILESYSTEM_VERSION. (#4891)
  • +
  • Replaced C-style assert with BOOST_ASSERT.
  • +
  • Undeprecated unique_path(). Instead, add a note mentioning the workaround + for lack of thread safety and possible change to cwd. unique_path() is just + too convenient to deprecate!
  • +
  • Cleared several GCC warnings.
  • +
  • Changed V2 code to use BOOST_THROW_EXCEPTION.
  • +
  • Windows: Fix status() to report non-symlink reparse point correctly.
  • +
  • Add symlink_option to recursive_directory_iterator, + allowing control over recursion into directory symlinks. Note that the default + is changed to not recurse into directory symlinks.
  • +
  • Reference documentation cleanup, including + fixing missing and broken links, and adding missing functions.
  • +
  • Miscellaneous implementation code cleanup.
  • +
+
+

Revised +03 February, 2015

+

© Copyright Beman Dawes, 2011

+

Use, modification, and distribution are subject to the Boost Software +License, Version 1.0. See +www.boost.org/LICENSE_1_0.txt

\ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/doc/styles.css b/ThirdParty/boost-Subset/libs/filesystem/doc/styles.css new file mode 100644 index 0000000000..30ea5b98d0 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/doc/styles.css @@ -0,0 +1,19 @@ +body +{ + font-family: arial, sans-serif; + max-width: 6.5in; + margin: 0px auto; + font-size: 85%; +} + ins {background-color: #CCFFCC;} + del {background-color: #FFCACA;} + pre {background-color: #D7EEFF; font-size: 95%; font-family: "courier new", courier, serif;} + code {font-size: 110%; font-family: "courier new", courier, serif;} + table {font-size: 100%;} + + /* + Copyright Beman Dawes, 2014 + Distributed under the Boost Software License, Version 1.0. + See www.boost.org/LICENSE_1_0.txt + */ + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/doc/tickets.html b/ThirdParty/boost-Subset/libs/filesystem/doc/tickets.html new file mode 100644 index 0000000000..054acb403c --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/doc/tickets.html @@ -0,0 +1,52 @@ + + + + + + + +Filesystem Tickets + + + + +

 

+

Locale related

+

#3332 +boost::filesystem::path will get trobule in locale Chinese_Taiwan.950 (windows)
+#7211 path_locale +destructor crashes when overloaded operator new and delete are present
+#8388 +windows_file_codecvt should be allocated with _NEW_CRT
+#8642 Global locale +prevents from using Boost.Filesystem in global constructors and destructors
+#8930 +boost::path::root_directory() throws locale::facet::_S_create_c_locale name not +valid
+#9182 +Boost-filesystem std::runtime_error: locale::facet::_S_create_c_locale name not +valid failure on Xamarin.Android
+#9219 path::codecvt() +is called when not required
+#9560 +operations_test_static unit test crashes during static initialization phase on +Mac/10.7/32-bit/darwin-4.2.1
+#10205 FileSystem +runtime error: locale::facet::_S_create_c_locale name not valid
+

+

TR alignment

+

Work has started to bring the library into alignment with the C++ File System +Technical Specification (HTML) +(PDF). +This work is occurring on the +git +ts-develop branch, and is currently very unstable.

+
    +
  • #10291 path + doesn't have move constructor/assignment operator.
  • +
+ + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/doc/tutorial.html b/ThirdParty/boost-Subset/libs/filesystem/doc/tutorial.html new file mode 100644 index 0000000000..e53bc2ed5e --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/doc/tutorial.html @@ -0,0 +1,1330 @@ + + + + + + + +Filesystem Tutorial + + + + + + + + + + +
+ +boost.png (6897 bytes) + Filesystem Tutorial +
+ + + + +
Home    + Tutorial    + Reference    + FAQ    + Releases    + Portability    + V3 Intro    + V3 Design    + Deprecated    + Bug Reports    +
+ +

+ Introduction
+ Preliminaries
+ Reporting the size of a file - (tut1.cpp)
+ Using status queries to determine file existence and type - (tut2.cpp)
+ Directory iteration plus catching + exceptions - (tut3.cpp)
+ Using path decomposition, plus sorting results - (tut4.cpp)
+ Class path: Constructors, including + Unicode - (tut5.cpp)
+ Class path: Generic format vs. Native format
+ Class path: Iterators, observers, composition, decomposition, and query - (path_info.cpp)
+ Error reporting
+

+

Introduction

+ +

This tutorial develops a little command line program to list information +about files and directories - essentially a much simplified version of the POSIX ls or Windows dir +commands. We'll start with the simplest possible version and progress to more +complex functionality. Along the way we'll digress to cover topics you'll need +to know about to understand Boost.Filesystem.

+ +

Source code for each of the tutorial programs is available, and you +are encouraged to compile, test, and experiment with it. To conserve space, we won't +always show boilerplate code here, but the provided source is complete and +ready to build.

+ +

Preliminaries

+ +

Install the Boost distribution if you haven't already done so. See the +Boost Getting +Started docs.

+ +

This tutorial assumes you are going to compile and test the examples using +the provided scripts. That's highly recommended.

+ +
+ +

If you are planning to compile and test the examples but not use the +scripts, make sure your build setup knows where to +locate or build the Boost library binaries.

+ +
+

Fire up your command line interpreter, and type the following commands:

+ + + + + + + + +
Ubuntu Linux
+
$ cd boost-root/libs/filesystem/example/test
+
+$ ./setup.sh
+Copying example programs...
+
+$ ./build.sh
+Compiling example programs...
+
+$ ./tut1
+Usage: tut1 path
+
+ +   + + + + + + + + +
Microsoft Windows
+
>cd boost-root\libs\filesystem\example\test
+
+>setup
+Copying example programs...
+
+>build
+Compiling example programs...
+
+>tut1
+Usage: tut1 path
+
+ +

If the tut1 command outputs "Usage: tut1 path", all +is well. A set of tutorial example programs has been copied (by setup) to +boost-root/libs/filesystem/example/test +and then built. You are encouraged to modify and experiment with them as the +tutorial progresses. Just invoke the build script again to rebuild, +or invoke b2 directly.

+ +

If something didn't work right, here are some troubleshooting suggestions:

+ +
    +
  • If the b2 program executable isn't being found, check your path environmental variable + or see + Boost + Getting Started.
  • +
  • Look at b2.log to try to spot an indication of the + problem.
  • +
+ +

Reporting the size of a file - (tut1.cpp)

+ +

Let's get started. Our first example program, tut1.cpp, +reports the size of a file:

+ + + + + +
+
#include <iostream>
+#include <boost/filesystem.hpp>
+using namespace boost::filesystem;
+
+int main(int argc, char* argv[])
+{
+  if (argc < 2)
+  {
+    std::cout << "Usage: tut1 path\n";
+    return 1;
+  }
+  std::cout << argv[1] << " " << file_size(argv[1]) << '\n';
+  return 0;
+}
+
+ +

The Boost.Filesystem file_size +function returns a uintmax_t +containing the size of the file named by the argument. The declaration looks +like this:

+ +
+
uintmax_t file_size(const path& p); 
+
+

For now, all you need to know is that class path has constructors that take +const char * and other string types. (If you can't wait to +find out more, skip ahead to the class path section of +the tutorial.)

+

Please take a minute to try out tut1 on your system, using a +file that is known to exist, such as tut1.cpp. Here is what the +results look like on two different operating systems:

+ + + + + + + + +
Ubuntu Linux
+
$ ./tut1 tut1.cpp
+tut1.cpp 569
+
$ ls -l tut1.cpp
+-rw-rw-r-- 1 beman beman 569 Jul 26 12:04 tut1.cpp
+
+ +   + + + + + + + + + +
Microsoft Windows
+
>tut1 tut1.cpp
+tut1.cpp 592
+
+>dir tut1.cpp
+...
+07/26/2015 07:20 AM 592 tut1.cpp
+...
+
+ +

So far, so good. The reported Linux and Windows sizes are different because +the Linux tests used "\n" line endings, while the Windows tests +used "\r\n" line endings. The sizes reported may differ +from the above if changes have been made to tut1.cpp.

+

Now try again, but give a path that doesn't exist:

+ + + + + + + + +
Ubuntu Linux
+
$ ./tut1 foo
+terminate called after throwing an instance of 'boost::filesystem::filesystem_error'
+what(): boost::filesystem::file_size: No such file or directory: "foo"
+Aborted (core dumped)
+
+ +  + + + + + + + + +
Microsoft Windows
+
>tut1 foo
+

An exception is thrown;
+ the exact form of the response depends on + Windows system options.

+ +

What happens? + There's no file named foo in the current directory, so by default an +exception is thrown. See Error reporting to learn + about error reporting via error codes rather than exceptions.

+

Try this:

+ + + + + + + + +
Ubuntu Linux
+
$ ./tut1 .
+terminate called after throwing an instance of 'boost::filesystem::filesystem_error'
+what(): boost::filesystem::file_size: Operation not permitted: "."
+Aborted (core dumped)
+
+ +   + + + + + + + + +
Microsoft Windows
+
>tut1 .
+

An exception is thrown;
+ the exact form of the response depends on Windows system options.

+ +

The current directory exists, but file_size() works on regular + files, not directories, so again an exception is thrown.

+ +

We'll deal with those situations in tut2.cpp.

+ +

Using status queries to determine file existence and type - (tut2.cpp)

+ +

Boost.Filesystem includes status query functions such as +exists, +is_directory, and +is_regular_file. These return +bool's, and will return true if the condition +described by their name is met. Otherwise they return false, +including when any element +of the path argument can't be found.

+ +

tut2.cpp uses several of the status query functions to cope with non-existent +files and with different kinds of files:

+ + + + + +
+
#include <iostream>
+#include <boost/filesystem.hpp>
+using namespace std;
+using namespace boost::filesystem;
+
+int main(int argc, char* argv[])
+{
+  if (argc < 2)
+  {
+    cout << "Usage: tut2 path\n";
+    return 1;
+  }
+
+  path p(argv[1]);  // avoid repeated path construction below
+
+  if (exists(p))    // does path p actually exist?
+  {
+    if (is_regular_file(p))        // is path p a regular file?
+      cout << p << " size is " << file_size(p) << '\n';
+
+    else if (is_directory(p))      // is path p a directory?
+      cout << p << " is a directory\n";
+
+    else
+      cout << p << " exists, but is not a regular file or directory\n";
+  }
+  else
+    cout << p << " does not exist\n";
+
+  return 0;
+}
+
+ +

Give it a try:

+ + + + + + + + +
Ubuntu Linux
+
$ ./tut2 tut2.cpp
+"tut2.cpp" size is 997
+
+$ ./tut2 foo
+"foo" does not exist
+
+$ ./tut2 .
+"." is a directory
+
+ +  + + + + + + + + +
Microsoft Windows
+
>tut2 tut2.cpp
+tut2.cpp size is 1039
+
+>tut2 foo
+"foo" does not exist
+
+>tut2 .
+"." is a directory
+
+ +

Although tut2 works OK in these tests, the output is less than satisfactory +for a directory. We'd typically like to see a list of the directory's contents. In tut3.cpp +we will see how to iterate over directories.

+ +

But first, let's try one more test:

+ + + + + + + + +
Ubuntu Linux
+
$ ls /home/jane/foo
+ls: cannot access /home/jane/foo: No such file or directory
+
+$ ./tut2 /home/jane/foo
+terminate called after throwing an instance of 'boost::
+filesystem::filesystem_error>'
+   what(): boost::filesystem::status: Permission denied:
+     "/home/jane/foo"
+Aborted
+
+ +   + + + + + + + + +
Microsoft Windows
+
>dir e:\
+The device is not ready.
+
+>tut2 e:\
+

An exception is thrown;
+ the exact form of the response depends on + Windows system options.

+ +

On the Linux system, the test was being run from an account that did not have +permission to access /home/jane/foo. On the Windows system, +e: was a Compact Disc reader/writer that was not ready. End users +shouldn't have to interpret cryptic exceptions reports, so as we move on to tut3.cpp +we will increase the robustness of the code, too.

+ +

Directory iteration plus catching +exceptions - (tut3.cpp)

+ +

Boost.Filesystem's +directory_iterator class is just what we need here. It follows the +general pattern of the standard library's istream_iterator. Constructed from +a path, it iterates over the contents of the directory. A default constructed directory_iterator +acts as the end iterator.

+ +

The value type of directory_iterator is +directory_entry. A +directory_entry object contains path and file_status +information.  A +directory_entry object +can be used directly, but can also be passed to path arguments in function calls.

+ +

The other need is increased robustness in the face of the many kinds of +errors that can affect file system operations. We could do that at the level of +each call to a Boost.Filesystem function (see Error +reporting), but for simplicity tut3.cpp +uses an overall try/catch block.

+ + + + + +
+
#include <iostream>
+#include <boost/filesystem.hpp>
+using std::cout;
+using namespace boost::filesystem;
+
+int main(int argc, char* argv[])
+{
+  if (argc < 2)
+  {
+    cout << "Usage: tut3 path\n";
+    return 1;
+  }
+
+  path p (argv[1]);
+
+  try
+  {
+    if (exists(p))
+    {
+      if (is_regular_file(p))
+        cout << p << " size is " << file_size(p) << '\n';
+
+      else if (is_directory(p))
+      {
+        cout << p << " is a directory containing:\n";
+
+        for (directory_entry& x : directory_iterator(p))
+          cout << "    " << x.path() << '\n'; 
+      }
+      else
+        cout << p << " exists, but is not a regular file or directory\n";
+    }
+    else
+      cout << p << " does not exist\n";
+  }
+
+  catch (const filesystem_error& ex)
+  {
+    cout << ex.what() << '\n';
+  }
+
+  return 0;
+}
+
+ +

Give tut3 a try, passing it a path to a directory as a command line argument. +Here is a run on a checkout of the Boost Git develop branch, followed by a repeat +of the test cases that caused exceptions on Linux and Windows:

+ + + + + + + + +
Ubuntu Linux
+
$ ./tut3 ~/boost/develop
+    "/home/beman/boost/develop" is a directory containing:
+    "/home/beman/boost/develop/rst.css"
+    "/home/beman/boost/develop/boost"
+    "/home/beman/boost/develop/boost.png"
+    "/home/beman/boost/develop/libs"
+    "/home/beman/boost/develop/doc"
+    "/home/beman/boost/develop/project-config.jam.2"
+    "/home/beman/boost/develop/.gitmodules"
+    "/home/beman/boost/develop/boostcpp.py"
+    "/home/beman/boost/develop/.travis.yml"
+    "/home/beman/boost/develop/.gitattributes"
+    "/home/beman/boost/develop/index.htm"
+    "/home/beman/boost/develop/index.html"
+    "/home/beman/boost/develop/bjam"
+    "/home/beman/boost/develop/project-config.jam.1"
+    "/home/beman/boost/develop/LICENSE_1_0.txt"
+    "/home/beman/boost/develop/.git"
+    "/home/beman/boost/develop/tools"
+    "/home/beman/boost/develop/stage"
+    "/home/beman/boost/develop/boostcpp.jam"
+    "/home/beman/boost/develop/Jamroot"
+    "/home/beman/boost/develop/.gitignore"
+    "/home/beman/boost/develop/INSTALL"
+    "/home/beman/boost/develop/more"
+    "/home/beman/boost/develop/bin.v2"
+    "/home/beman/boost/develop/project-config.jam"
+    "/home/beman/boost/develop/boost-build.jam"
+    "/home/beman/boost/develop/bootstrap.bat"
+    "/home/beman/boost/develop/bootstrap.sh"
+    "/home/beman/boost/develop/status"
+    "/home/beman/boost/develop/boost.css"
+
+ +   + + + + + + + + + +
Microsoft Windows
+
>tut3 \boost\develop
+"\boost\develop" is a directory containing:
+    "\boost\develop\.git"
+    "\boost\develop\.gitattributes"
+    "\boost\develop\.gitignore"
+    "\boost\develop\.gitmodules"
+    "\boost\develop\.travis.yml"
+    "\boost\develop\bin.v2"
+    "\boost\develop\boost"
+    "\boost\develop\boost-build.jam"
+    "\boost\develop\boost.css"
+    "\boost\develop\boost.png"
+    "\boost\develop\boostcpp.jam"
+    "\boost\develop\boostcpp.py"
+    "\boost\develop\bootstrap.bat"
+    "\boost\develop\bootstrap.sh"
+    "\boost\develop\doc"
+    "\boost\develop\index.htm"
+    "\boost\develop\index.html"
+    "\boost\develop\INSTALL"
+    "\boost\develop\Jamroot"
+    "\boost\develop\libs"
+    "\boost\develop\LICENSE_1_0.txt"
+    "\boost\develop\more"
+    "\boost\develop\project-config.jam"
+    "\boost\develop\rst.css"
+    "\boost\develop\stage"
+    "\boost\develop\status"
+    "\boost\develop\tools"
+
>tut3 e:\
+boost::filesystem::status: The device is not ready: "e:\"
+
+ +

Not bad, but we can make further improvements:

+ +
    +
  • The listing would be much easier to read if only the filename was + displayed, rather than the full path.
  • +
  • The Linux listing isn't sorted. That's because the ordering of + directory iteration is unspecified. Ordering depends on the underlying + operating system API and file system specifics. So we need to sort the + results ourselves.
  • +
+ +

The next sections show how how those changes play out, so read on!

+ +

Using path decomposition, plus sorting results - (tut4.cpp)

+ +

For directories, tut4.cpp builds a +std::vector of all the entries and then sorts it before writing to +cout.

+ + + + + +
+
#include <iostream>
+#include <vector>
+#include <algorithm>
+#include <boost/filesystem.hpp>
+using std::cout;
+using namespace boost::filesystem;
+
+int main(int argc, char* argv[])
+{
+  if (argc < 2)
+  {
+    cout << "Usage: tut4 path\n";
+    return 1;
+  }
+
+  path p (argv[1]);
+
+  try
+  {
+    if (exists(p))
+    {
+      if (is_regular_file(p))
+        cout << p << " size is " << file_size(p) << '\n';
+
+      else if (is_directory(p))
+      {
+        cout << p << " is a directory containing:\n";
+
+        std::vector<std::string> v;
+
+        for (auto&& x : directory_iterator(p))
+          v.push_back(x.path().filename().string()); 
+
+        std::sort(v.begin(), v.end());  
+
+        for (auto&& x : v)
+          cout << "    " << x << '\n';
+      }
+      else
+        cout << p << " exists, but is not a regular file or directory\n";
+    }
+    else
+      cout << p << " does not exist\n";
+  }
+
+  catch (const filesystem_error& ex)
+  {
+    cout << ex.what() << '\n';
+  }
+
+  return 0;
+}
+ +
+ +

The key difference between tut3.cpp and tut4.cpp is + what happens in the directory iteration loop. We changed:

+
+
cout << " " << *it << '\n';   // *it returns a directory_entry,
+
+

to:

+
+
path fn = it->path().filename();   // extract the filename from the path
+v.push_back(fn);                   // push into vector for later sorting
+
+

path() + is a directory_entry observer function. + filename() is one of + several path decomposition functions. It extracts the filename portion ("index.html") + from a path ("/home/beman/boost/trunk/index.html"). These decomposition functions are + more fully explored in the Path iterators, observers, + composition, decomposition and query portion of this tutorial.

+

The above was written as two lines of code for clarity. It could have + been written more concisely as:

+
+
v.push_back(it->path().filename()); // we only care about the filename
+
+

Here is the output from a test of tut4.cpp:

+ + + + + + + + +
Ubuntu Linux
+
$ ./tut4  v
+
+ +  + + + + + + + + +
Microsoft Windows
+
$ ./tut4 ~/boost/develop
+"/home/beman/boost/develop" is a directory containing:
+    .git
+    .gitattributes
+    .gitignore
+    .gitmodules
+    .travis.yml
+    INSTALL
+    Jamroot
+    LICENSE_1_0.txt
+    bin.v2
+    boost
+    boost-build.jam
+    boost.css
+    boost.png
+    boostcpp.jam
+    boostcpp.py
+    bootstrap.bat
+    bootstrap.sh
+    doc
+    index.htm
+    index.html
+    libs
+    more
+    project-config.jam
+    project-config.jam.1
+    project-config.jam.2
+    rst.css
+    stage
+    status
+    tools
+
+ +

That completes the main portion of this tutorial. If you haven't already + worked through the Class path sections of this tutorial, dig into them now. + The Error reporting section may also be of + interest, although it can be skipped unless you are deeply concerned about + error handling issues.

+ +

Class path: Constructors, +including Unicode - (tut5.cpp)

+ +

Traditional C interfaces pass paths as const char* arguments. +C++ interfaces may add const std::string& overloads, but adding +overloads becomes untenable if wide characters, containers, and iterator ranges +need to be supported.

+

Passing paths as const path& arguments is far simpler, yet far +more flexible because class path itself is far more flexible:

+
    +
  1. Class path supports multiple character types and encodings, including Unicode, to + ease internationalization.
  2. +
  3. Class path supports multiple source types, such as iterators for null terminated + sequences, iterator ranges, containers (including std::basic_string), + and directory_entry's, + so functions taking paths don't need to provide several overloads.
  4. +
  5. Class path supports both native and generic pathname formats, so programs can be + portable between operating systems yet use native formats where desirable.
  6. +
  7. Class path supplies a full set of iterators, observers, composition, + decomposition, and query functions, making pathname manipulations easy, + convenient, reliable, and portable.
  8. +
+

Here is how (1) and (2) work. Class path constructors, +assignments, and appends have member templates for sources. For example, here +are the constructors that take sources:

+ +
+
template <class Source>
+  path(Source const& source);
+
template <class InputIterator>
+  path(InputIterator begin, InputIterator end);
+
+

Let's look at a little program that shows how comfortable class path is with +both narrow and wide characters in C-style strings, C++ strings, and via C++ +iterators:

+ + + + + +
+
#include <boost/filesystem/fstream.hpp>
+#include <string>
+#include <list>
+namespace fs = boost::filesystem;
+
+int main()
+{
+  // \u263A is "Unicode WHITE SMILING FACE = have a nice day!"
+  std::string narrow_string ("smile2");
+  std::wstring wide_string (L"smile2\u263A");
+  std::list<char> narrow_list;
+  narrow_list.push_back('s');
+  narrow_list.push_back('m');
+  narrow_list.push_back('i');
+  narrow_list.push_back('l');
+  narrow_list.push_back('e');
+  narrow_list.push_back('3');
+  std::list<wchar_t> wide_list;
+  wide_list.push_back(L's');
+  wide_list.push_back(L'm');
+  wide_list.push_back(L'i');
+  wide_list.push_back(L'l');
+  wide_list.push_back(L'e');
+  wide_list.push_back(L'3');
+  wide_list.push_back(L'\u263A');
+
+  { fs::ofstream f("smile"); }
+  { fs::ofstream f(L"smile\u263A"); }
+  { fs::ofstream f(narrow_string); }
+  { fs::ofstream f(wide_string); }
+  { fs::ofstream f(narrow_list); }
+  { fs::ofstream f(wide_list); }
+  narrow_list.pop_back();
+  narrow_list.push_back('4');
+  wide_list.pop_back();
+  wide_list.pop_back();
+  wide_list.push_back(L'4');
+  wide_list.push_back(L'\u263A');
+  { fs::ofstream f(fs::path(narrow_list.begin(), narrow_list.end())); }
+  { fs::ofstream f(fs::path(wide_list.begin(), wide_list.end())); }
+
+  return 0;
+}
+
+ +

Testing tut5:

+ + + + + + + + +
Ubuntu Linux
+
$ ./tut5
+
+$ ls smile*
+smile smile☺ smile2 smile2☺ smile3 smile3☺ smile4 smile4☺
+
+ +  + + + + + + + + +
Microsoft Windows
+
>tut5
+
+>dir /b smile*
+smile
+smile2
+smile2☺
+smile3
+smile3☺
+smile4
+smile4☺
+smile☺
+
+ +

The exact appearance of the smiling face will depend on the font, +font size, and other settings for your command line window. The above tests were +run with out-of-the-box Ubuntu 14.04 and Windows 7, US Edition. If you don't get +the above results, take a look at the boost-root/libs/filesystem/example/test +directory with your system's GUI file browser, such as Linux Nautilus, Mac OS X +Finder, or Windows Explorer. These tend to be more comfortable with +international character sets than command line interpreters.

+ +

Class path takes care of whatever character type or encoding + conversions are required by the particular operating system. Thus as + tut5 demonstrates, it's no problem to pass a wide character string to a + Boost.Filesystem operational function even if the underlying operating system + uses narrow characters, and visa versa. And the same applies to user supplied + functions that take const path& arguments.

+ +

Class path also provides path syntax that is portable across operating systems, + element iterators, and observer, composition, decomposition, and query + functions to manipulate the elements of a path. The next section of this + tutorial deals with path syntax.

+ +

Class path: Generic format vs. Native format

+ +

Class path deals with two different pathname +formats - generic format and native format. For POSIX-like +file systems, these formats are the same. But for users of Windows and +other non-POSIX file systems, the distinction is important. Even +programmers writing for POSIX-like systems need to understand the distinction if +they want their code to be portable to non-POSIX systems.

+ +

The generic format is the familiar /my_directory/my_file.txt format used by POSIX-like +operating systems such as the Unix variants, Linux, and Mac OS X. Windows also +recognizes the generic format, and it is the basis for the familiar Internet URL +format. The directory +separator character is always one or more slash characters.

+ +

The native format is the format as defined by the particular +operating system. For Windows, either the slash or the backslash can be used as +the directory separator character, so /my_directory\my_file.txt +would work fine. Of course, if you write that in a C++ string literal, it +becomes "/my_directory\\my_file.txt".

+ +

If a drive specifier or a backslash appears +in a pathname on a Windows system, it is always treated as the native format.

+ +

Class path has observer functions that allow you to +obtain the string representation of a path object in either the native format +or the generic format. See the next section +for how that plays out.

+ +

The distinction between generic format and native format is important when + communicating with native C-style API's and with users. Both tend to expect + paths in the native format and may be confused by the generic format. The generic + format is great, however, for writing portable programs that work regardless + of operating system.

+ +

The next section covers class path observers, composition, + decomposition, query, and iteration over the elements of a path.

+ +

Class path: Iterators, observers, composition, decomposition, and query +- (path_info.cpp)

+ +

The path_info.cpp program is handy for learning how class path +iterators, +observers, composition, decomposition, and query functions work on your system. +It is one of the programs built by the build.sh and build.bat +scripts:

+ + + + + + +
+
#include <iostream>
+#include <boost/filesystem.hpp>
+using namespace std;
+using namespace boost::filesystem;
+
+const char * say_what(bool b) { return b ? "true" : "false"; }
+
+int main(int argc, char* argv[])
+{
+  if (argc < 2)
+  {
+    cout << "Usage: path_info path-element [path-element...]\n"
+            "Composes a path via operator/= from one or more path-element arguments\n"
+            "Example: path_info foo/bar baz\n"
+#            ifdef BOOST_POSIX_API
+            "         would report info about the composed path foo/bar/baz\n";
+#            else  // BOOST_WINDOWS_API
+            "         would report info about the composed path foo/bar\\baz\n";
+#            endif
+    return 1;
+  }
+
+  path p;
+  for (; argc > 1; --argc, ++argv)
+    p /= argv[1];  // compose path p from the command line arguments
+
+  cout  <<  "\ncomposed path:\n";
+  cout  <<  "  operator<<()---------: " << p << "\n";
+  cout  <<  "  make_preferred()-----: " << p.make_preferred() << "\n";
+
+  cout << "\nelements:\n";
+  for (auto element : p)
+    cout << "  " << element << '\n';
+
+  cout  <<  "\nobservers, native format:" << endl;
+# ifdef BOOST_POSIX_API
+  cout  <<  "  native()-------------: " << p.native() << endl;
+  cout  <<  "  c_str()--------------: " << p.c_str() << endl;
+# else  // BOOST_WINDOWS_API
+  wcout << L"  native()-------------: " << p.native() << endl;
+  wcout << L"  c_str()--------------: " << p.c_str() << endl;
+# endif
+  cout  <<  "  string()-------------: " << p.string() << endl;
+  wcout << L"  wstring()------------: " << p.wstring() << endl;
+
+  cout  <<  "\nobservers, generic format:\n";
+  cout  <<  "  generic_string()-----: " << p.generic_string() << endl;
+  wcout << L"  generic_wstring()----: " << p.generic_wstring() << endl;
+
+  cout  <<  "\ndecomposition:\n";
+  cout  <<  "  root_name()----------: " << p.root_name() << '\n';
+  cout  <<  "  root_directory()-----: " << p.root_directory() << '\n';
+  cout  <<  "  root_path()----------: " << p.root_path() << '\n';
+  cout  <<  "  relative_path()------: " << p.relative_path() << '\n';
+  cout  <<  "  parent_path()--------: " << p.parent_path() << '\n';
+  cout  <<  "  filename()-----------: " << p.filename() << '\n';
+  cout  <<  "  stem()---------------: " << p.stem() << '\n';
+  cout  <<  "  extension()----------: " << p.extension() << '\n';
+
+  cout  <<  "\nquery:\n";
+  cout  <<  "  empty()--------------: " << say_what(p.empty()) << '\n';
+  cout  <<  "  is_absolute()--------: " << say_what(p.is_absolute()) << '\n';
+  cout  <<  "  has_root_name()------: " << say_what(p.has_root_name()) << '\n';
+  cout  <<  "  has_root_directory()-: " << say_what(p.has_root_directory()) << '\n';
+  cout  <<  "  has_root_path()------: " << say_what(p.has_root_path()) << '\n';
+  cout  <<  "  has_relative_path()--: " << say_what(p.has_relative_path()) << '\n';
+  cout  <<  "  has_parent_path()----: " << say_what(p.has_parent_path()) << '\n';
+  cout  <<  "  has_filename()-------: " << say_what(p.has_filename()) << '\n';
+  cout  <<  "  has_stem()-----------: " << say_what(p.has_stem()) << '\n';
+  cout  <<  "  has_extension()------: " << say_what(p.has_extension()) << '\n';
+
+  return 0;
+}
+
+ + +

Run the examples below on your system, and try some different path arguments +as we go along. Here is the invocation we will talk about in detail:

+ + + + + + + + +
Ubuntu Linux
+
$ ./path_info /foo bar baa.txt
+
+composed path:
+  operator<<()---------: "/foo/bar/baa.txt"
+  make_preferred()-----: "/foo/bar/baa.txt"
+
+elements:
+  "/"
+  "foo"
+  "bar"
+  "baa.txt"
+
+observers, native format:
+  native()-------------: /foo/bar/baa.txt
+  c_str()--------------: /foo/bar/baa.txt
+  string()-------------: /foo/bar/baa.txt
+  wstring()------------: /foo/bar/baa.txt
+
+observers, generic format:
+  generic_string()-----: /foo/bar/baa.txt
+  generic_wstring()----: /foo/bar/baa.txt
+
+decomposition:
+  root_name()----------: ""
+  root_directory()-----: "/"
+  root_path()----------: "/"
+  relative_path()------: "foo/bar/baa.txt"
+  parent_path()--------: "/foo/bar"
+  filename()-----------: "baa.txt"
+  stem()---------------: "baa"
+  extension()----------: ".txt"
+
+query:
+  empty()--------------: false
+  is_absolute()--------: true
+  has_root_name()------: false
+  has_root_directory()-: true
+  has_root_path()------: true
+  has_relative_path()--: true
+  has_parent_path()----: true
+  has_filename()-------: true
+  has_stem()-----------: true
+  has_extension()------: true
+
+ +   + + + + + + + + +
Microsoft Windows
+
>path_info \foo bar baa.txt
+
+composed path:
+operator<<()---------: "\foo\bar\baa.txt"
+make_preferred()-----: "\foo\bar\baa.txt"
+
+elements:
+  "/"
+  "foo"
+  "bar"
+  "baa.txt"
+
+observers, native format:
+native()-------------: \foo\bar\baa.txt
+c_str()--------------: \foo\bar\baa.txt
+string()-------------: \foo\bar\baa.txt
+wstring()------------: \foo\bar\baa.txt
+
+observers, generic format:
+generic_string()-----: /foo/bar/baa.txt
+generic_wstring()----: /foo/bar/baa.txt
+
+decomposition:
+root_name()----------: ""
+root_directory()-----: "\"
+root_path()----------: "\"
+relative_path()------: "foo\bar\baa.txt"
+parent_path()--------: "\foo\bar"
+filename()-----------: "baa.txt"
+stem()---------------: "baa"
+extension()----------: ".txt"
+
+query:
+empty()--------------: false
+is_absolute()--------: false
+has_root_name()------: false
+has_root_directory()-: true
+has_root_path()------: true
+has_relative_path()--: true
+has_parent_path()----: true
+has_filename()-------: true
+has_stem()-----------: true
+has_extension()------: true
+
+ +

We will go through the above code in detail to gain a better +understanding of what is going on.

+ +

A common need is to compose a path from its constituent +directories. Class path uses / and /= operators to +append elements. That's a reminder +that these operations append the operating system's preferred directory +separator if needed. The preferred +directory separator is a slash on POSIX-like systems, and a backslash on +Windows-like systems.

+ +

That's what this code does before displaying the resulting +path p using the class path stream inserter:

+ + + + + + +
+
  path p;
+  for (; argc > 1; --argc, ++argv)
+    p /= argv[1];  // compose path p from the command line arguments
+
+  cout  <<  "\ncomposed path:\n";
+  cout  <<  "  operator<<()---------: " << p << "\n";
+  cout  <<  "  make_preferred()-----: " << p.make_preferred() << "\n";
+
+ + +

One abstraction for thinking about a path is as a sequence of elements, where +the elements are directory and file names. To support this abstraction, class +path provides STL-like  iterators and also begin() +and end() functions.

+ +

Here is the code that produced the list of elements in the above output listing:

+ + + + + +
+
cout << "\nelements:\n";
+for (auto element : p)
+  cout << " " << element << '\n';
+
+ +

Let's look at class path observer functions:

+ + + + + + +
+
  cout  <<  "\nobservers, native format:" << endl;
+# ifdef BOOST_POSIX_API
+  cout  <<  "  native()-------------: " << p.native() << endl;
+  cout  <<  "  c_str()--------------: " << p.c_str() << endl;
+# else  // BOOST_WINDOWS_API
+  wcout << L"  native()-------------: " << p.native() << endl;
+  wcout << L"  c_str()--------------: " << p.c_str() << endl;
+# endif
+  cout  <<  "  string()-------------: " << p.string() << endl;
+  wcout << L"  wstring()------------: " << p.wstring() << endl;
+
+  cout  <<  "\nobservers, generic format:\n";
+  cout  <<  "  generic_string()-----: " << p.generic_string() << endl;
+  wcout << L"  generic_wstring()----: " << p.generic_wstring() << endl;
+
+ + +

Native format observers should be used when interacting with the +operating system or with users; that's what they expect.

+ +

Generic format observers should be used when the results need to be +portable and uniform regardless of the operating system.

+ +

path objects always hold pathnames in the native +format, but otherwise leave them unchanged from their source. The +preferred() function will convert to the +preferred form, if the native format has several forms. Thus on Windows, it will +convert slashes to backslashes.

+ +

Moving on to decomposition:

+ + + + + + +
+
  cout  <<  "\ndecomposition:\n";
+  cout  <<  "  root_name()----------: " << p.root_name() << '\n';
+  cout  <<  "  root_directory()-----: " << p.root_directory() << '\n';
+  cout  <<  "  root_path()----------: " << p.root_path() << '\n';
+  cout  <<  "  relative_path()------: " << p.relative_path() << '\n';
+  cout  <<  "  parent_path()--------: " << p.parent_path() << '\n';
+  cout  <<  "  filename()-----------: " << p.filename() << '\n';
+  cout  <<  "  stem()---------------: " << p.stem() << '\n';
+  cout  <<  "  extension()----------: " << p.extension() << '\n';
+
+ + +

 And, finally, query functions:

+ + + + + + +
+
  cout  <<  "\nquery:\n";
+  cout  <<  "  empty()--------------: " << say_what(p.empty()) << '\n';
+  cout  <<  "  is_absolute()--------: " << say_what(p.is_absolute()) << '\n';
+  cout  <<  "  has_root_name()------: " << say_what(p.has_root_name()) << '\n';
+  cout  <<  "  has_root_directory()-: " << say_what(p.has_root_directory()) << '\n';
+  cout  <<  "  has_root_path()------: " << say_what(p.has_root_path()) << '\n';
+  cout  <<  "  has_relative_path()--: " << say_what(p.has_relative_path()) << '\n';
+  cout  <<  "  has_parent_path()----: " << say_what(p.has_parent_path()) << '\n';
+  cout  <<  "  has_filename()-------: " << say_what(p.has_filename()) << '\n';
+  cout  <<  "  has_stem()-----------: " << say_what(p.has_stem()) << '\n';
+  cout  <<  "  has_extension()------: " << say_what(p.has_extension()) << '\n';
+
+ + +

These are pretty self-evident, but do note the difference in the +result of is_absolute() between Linux and Windows. Because there is +no root name (i.e. drive specifier or network name), a lone slash (or backslash) +is a relative path on Windows but an absolute path on POSIX-like operating +systems.

+ +

Error reporting

+ +

The Boost.Filesystem file_size function, like many of the + operational functions, has two overloads:

+ +
+
uintmax_t file_size(const path& p);
+uintmax_t file_size(const path& p, system::error_code& ec);
+
+

The only significant difference between the two is how they report errors.

+

The + first signature will throw exceptions to report errors. A +filesystem_error exception will be thrown +on an + operational error. filesystem_error is derived from std::runtime_error. +It has a + member function to obtain the +error_code reported by the source + of the error. It also has member functions to obtain the path or paths that caused + the error.

+ +
+ +

Motivation for the second signature: Throwing exceptions on errors was the entire error reporting story for the earliest versions of + Boost.Filesystem, and indeed throwing exceptions on errors works very well for + many applications. But user reports trickled in that some code became so + littered with try and catch blocks as to be unreadable and unmaintainable. In + some applications I/O errors aren't exceptional, and that's the use case for + the second signature.

+ +
+ +

Functions with a system::error_code& argument set that + argument to report operational error status, and so do not throw exceptions when I/O + related errors occur. For a full explanation, see + Error reporting in the reference + documentation.

+ +
+

© Copyright Beman Dawes 2010, 2015

+

Distributed under the Boost Software License, Version 1.0. See +www.boost.org/LICENSE_1_0.txt

+

Revised +26 July 2015

+ + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/doc/v3.html b/ThirdParty/boost-Subset/libs/filesystem/doc/v3.html new file mode 100644 index 0000000000..062c56c2e8 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/doc/v3.html @@ -0,0 +1,152 @@ + + + + + + +Filesystem V3 Intro + + + + + + + + + +
+ +boost.png (6897 bytes) + Filesystem + Version 3
+ Introduction
+ + + + +
Home    + Tutorial    + Reference    + FAQ    + Releases    + Portability    + V3 Intro    + V3 Design    + Deprecated    + Bug Reports    +
+ +

Boost Filesystem Version 3

+ +

Version 3 is a major revision of the Boost Filesystem library. Important +changes include:

+ +
    +
  • A single class path handles all aspects of + internationalization, replacing the previous template and its path + and wpath instantiations. Character types char, + wchar_t, char16_t, and char32_t are + supported. This is a major simplification of the path abstraction, + particularly for functions that take path arguments.
  • +
  • New class path members include:
    + +
  • +
  • New or improved operations functions include:
      +
    • absolute(). This replaces the operations function + complete(), which is now deprecated. Semantics are now provided for a + Windows corner case where the base argument was not an absolute + path. Previously this resulted in an exception being thrown.
    • +
    • create_symlink() now supported on both POSIX and Windows.
    • +
    • read_symlink() function added. Supported on both POSIX and + Windows. Used to read the contents of a symlink itself.
    • +
    • resize_file() function added. Supported on both POSIX and + Windows. Used to shrink or grow a regular file.
    • +
    • unique_path() function added. Supported on both POSIX and + Windows. Used to generate a secure temporary pathname.
    • +
    +
  • +
  • Support for error reporting via error_code is now uniform + throughout the operations functions.
  • +
  • Documentation has been reworked, including re-writes of major portions.
  • +
  • A new Tutorial provides a hopefully much + gentler and more complete introduction for new users. Current users might want + to review the three sections related to class path.
  • +
+ +

Deprecated names and other features

+ +

See the Deprecated Features page for transition +aids that allow much existing code to compile without change using Version 3.

+ +

Breaking changes

+ +

To ease the transition, Versions 2 and 3 will both be included in the next +several Boost releases. Version 2 will be the default version for one release +cycle, and then Version 3 will become the default version.

+

Class path

+
    +
  • Class template basic_path and its specializations are + replaced by a single class path. Thus any code, such as + overloaded functions, that depends on path and wpath + being two distinct types will fail to compile and must be restructured. + Restructuring may be as simple as removing one of the overloads, but also + might require more complex redesign.
  • +
  • Certain functions now return path objects rather than + string or wstring objects:
      +
    • root_name()
    • +
    • root_directory()
    • +
    • filename()
    • +
    • stem()
    • +
    • extension()
    • +
    +

    Not all uses will fail; if the function is being called in a context that + accepts a path, all is well. If the result is being used in a + context requiring a std::string or std::wstring, + then .string() or .wstring() respectively must be + appended to the function call.

  • +
  •  path::iterator::value_type and  + path::const_iterator::value_type is path rather than + basic_string.
  • +
+

Compiler support

+
    +
  • Compilers and standard libraries that do not fully support wide characters + and wide character strings (std::wstring) are no longer + supported.
  • +
  • Cygwin versions prior to 1.7 are no longer supported because they lack + wide string support. Cygwin now compiles only for the Windows API and path + syntax.
  • +
  • MinGW versions not supporting wide strings are no longer supported.
  • +
  • Microsoft VC++ 7.1 and earlier are no longer supported.
  • +
+ +
+

© Copyright Beman Dawes, 2009

+

Distributed under the Boost Software License, Version 1.0. See +www.boost.org/LICENSE_1_0.txt

+

Revised +29 December 2014

+ + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/doc/v3_design.html b/ThirdParty/boost-Subset/libs/filesystem/doc/v3_design.html new file mode 100644 index 0000000000..5f1326daa4 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/doc/v3_design.html @@ -0,0 +1,199 @@ + + + + + + + +Filesystem V3 Design + + + + + + + + + + +
+ +boost.png (6897 bytes) + Filesystem Version 3
+ Design
+ + + + +
Home    + Tutorial    + Reference    + FAQ    + Releases    + Portability    + V3 Intro    + V3 Design    + Deprecated    + Bug Reports    +
+ + + + + + + + +
+ Contents
+ Introduction
+ Problem
+ Solution
+ Details
+ Other changes
+ Acknowledgements
+ +

Caution: This page documents thinking early in the V3 development +process, and is intended to serve historical purposes. It is not updated to +reflect the current state of the library.

+ +

Introduction

+ +

During the review of Boost.Filesystem.V2 (Internationalization), Peter Dimov +suggested that the basic_path class template was unwieldy, and that a single +path type that accommodated multiple character types and encodings would be more +flexible. Although I wasn't willing to stop development at that time to +explore how this idea might be implemented, or to break from the pattern for +Internationalization used the C++ standard library, I've often thought about +Peter's suggestion. With the advent of C++0x char16_t and char32_t +character +types, the basic_path class template approach becomes even more unwieldy, so it +is time to revisit the problem in light of Peter's suggestion.

+ +

Problem

+ +

With Filesystem.V2, a path argument to a user defined function that is to +accommodate multiple character types and encodings must be written as a +template. Do-the-right-thing overloads or template metaprogramming must be +employed to allow arguments to be written as string literals. Here's what it +looks like:

+ +
+
template<class Path>
+void foo( const Path & p );
+
inline void foo( const path & p )
+{
+  return foo<path>( p );
+}
+inline void foo( const wpath & p )
+{
+  return foo<wpath>( p );
+}
+
+

That's really ugly for such a simple need, and there would be a combinatorial +explosion if the function took multiple Path arguments and each could be either +narrow or wide. It gets even worse if the C++0x char16_t and +char32_t types are to be supported.

+ +

Solution

+ +

Overview:

+ +
    +
  • A single, non-template, class path.
  • +
  • Each member function is a template accommodating the various + applicable character types, including user-defined character types.
  • +
  • Hold the path internally in a string of the type used by the operating + system API; std::string for POSIX, std::wstring for Windows.
  • +
+ +

The signatures presented in Problem collapse to +simply:

+
+
void foo( const path & p );
+
+ +

That's a signification reduction in code complexity. Specification becomes +simpler, too. I believe it will be far easier to teach, and result in much more +flexible user code.

+ +

Other benefits:

+
    +
  • All the polymorphism still occurs at compile time.
  • +
  • Efficiency is increased, in that conversions of the encoding, if required, + only occur once at the time of creation, not each time the path is used.
  • +
  • The size of the implementation code drops approximately in half and + becomes much more readable.
  • +
+

Possible problems:

+
    +
  • The combination of member function templates and implicit constructors can + result in unclear error messages when the user makes simple commonplace coding + errors. This should be much less of a problem with C++ concepts, but in the + meantime work continues to restrict over aggressive templates via enable_if/disable_if.
  • +
+

Details

+ + + + + + + + + + + + + + + + + + + + +
+

Encoding Conversions

+

Host system

+

char string path arguments

+

wide string path arguments

Systems with char as the native API path character type (i.e. + POSIX-like systems)No conversion.Conversion occurs, performed by the current path locale's + codecvt facet.
Systems with wchar_t as the native API path character type + (i.e. Windows-like systems).Conversion occurs, performed by the current path locale's + codecvt facet.No conversion.
+ +

When a class path function argument type matches the the operating system's +API argument type for paths, no conversion is performed rather than conversion +to a specified encoding such as one of the Unicode encodings. This avoids +unintended consequences, etc.

+ +

Other changes

+ +

Uniform hybrid error handling: The hybrid error handling idiom has +been consistently applied to all applicable functions.

+ +

Acknowledgements

+ +

Peter Dimov suggested the idea of a single path class that could cope with +multiple character types and encodings. Walter Landry contributed both the design +and implementation of the copy_any, +copy_directory, copy_symlink, and read_symlink functions.

+ +
+

Revised +29 December, 2014

+ +

© Copyright Beman Dawes, 2008

+

Use, modification, and distribution are subject to the Boost Software +License, Version 1.0. See +www.boost.org/LICENSE_1_0.txt

+ + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/Jamfile.v2 b/ThirdParty/boost-Subset/libs/filesystem/example/Jamfile.v2 new file mode 100644 index 0000000000..8a49747f41 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/Jamfile.v2 @@ -0,0 +1,26 @@ +# Boost Filesystem Library Example Jamfile + +# (C) Copyright Vladimir Prus 2003 + +# Distributed under the Boost Software License, Version 1.0. +# See www.boost.org/LICENSE_1_0.txt + +# Library home page: http://www.boost.org/libs/filesystem + +project + : requirements + /boost/filesystem//boost_filesystem + /boost/system//boost_system + msvc:on + static + ; + +exe tut0 : tut0.cpp ; +exe tut1 : tut1.cpp ; +exe tut2 : tut2.cpp ; +exe tut3 : tut3.cpp ; +exe tut4 : tut4.cpp ; +exe tut5 : tut5.cpp ; +exe path_info : path_info.cpp ; +exe file_status : file_status.cpp ; +exe file_size : file_size.cpp ; diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/error_demo.cpp b/ThirdParty/boost-Subset/libs/filesystem/example/error_demo.cpp new file mode 100644 index 0000000000..ce16b3bc47 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/error_demo.cpp @@ -0,0 +1,185 @@ +// error_demo.cpp --------------------------------------------------------------------// + +// Copyright Beman Dawes 2009 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +//--------------------------------------------------------------------------------------// +// // +// The purpose of this program is to demonstrate how error reporting works. // +// // +//--------------------------------------------------------------------------------------// + +#include +#include +#include + +using std::cout; +using boost::filesystem::path; +using boost::filesystem::filesystem_error; +using boost::system::error_code; +using boost::system::system_error; +namespace fs = boost::filesystem; + +namespace +{ + void report_system_error(const system_error& ex) + { + cout << " threw system_error:\n" + << " ex.code().value() is " << ex.code().value() << '\n' + << " ex.code().category().name() is " << ex.code().category().name() << '\n' + << " ex.what() is " << ex.what() << '\n' + ; + } + + void report_filesystem_error(const system_error& ex) + { + cout << " threw filesystem_error exception:\n" + << " ex.code().value() is " << ex.code().value() << '\n' + << " ex.code().category().name() is " << ex.code().category().name() << '\n' + << " ex.what() is " << ex.what() << '\n' + ; + } + + void report_status(fs::file_status s) + { + cout << " file_status::type() is "; + switch (s.type()) + { + case fs::status_error: + cout << "status_error\n"; break; + case fs::file_not_found: + cout << "file_not_found\n"; break; + case fs::regular_file: + cout << "regular_file\n"; break; + case fs::directory_file: + cout << "directory_file\n"; break; + case fs::symlink_file: + cout << "symlink_file\n"; break; + case fs::block_file: + cout << "block_file\n"; break; + case fs::character_file: + cout << "character_file\n"; break; + case fs::fifo_file: + cout << "fifo_file\n"; break; + case fs::socket_file: + cout << "socket_file\n"; break; + case fs::type_unknown: + cout << "type_unknown\n"; break; + default: + cout << "not a valid enumeration constant\n"; + } + } + + void report_error_code(const error_code& ec) + { + cout << " ec:\n" + << " value() is " << ec.value() << '\n' + << " category().name() is " << ec.category().name() << '\n' + << " message() is " << ec.message() << '\n' + ; + } + + bool threw_exception; + +} + +int main(int argc, char* argv[]) +{ + if (argc < 2) + { + cout << "Usage: error_demo path\n"; + return 1; + } + + error_code ec; + + //// construct path - no error_code + + //try { path p1(argv[1]); } + //catch (const system_error& ex) + //{ + // cout << "construct path without error_code"; + // report_system_error(ex); + //} + + //// construct path - with error_code + + path p (argv[1]); + + fs::file_status s; + bool b (false); + fs::directory_iterator di; + + // get status - no error_code + + cout << "\nstatus(\"" << p.string() << "\");\n"; + threw_exception = false; + + try { s = fs::status(p); } + catch (const system_error& ex) + { + report_filesystem_error(ex); + threw_exception = true; + } + if (!threw_exception) + cout << " Did not throw exception\n"; + report_status(s); + + // get status - with error_code + + cout << "\nstatus(\"" << p.string() << "\", ec);\n"; + s = fs::status(p, ec); + report_status(s); + report_error_code(ec); + + // query existence - no error_code + + cout << "\nexists(\"" << p.string() << "\");\n"; + threw_exception = false; + + try { b = fs::exists(p); } + catch (const system_error& ex) + { + report_filesystem_error(ex); + threw_exception = true; + } + if (!threw_exception) + { + cout << " Did not throw exception\n" + << " Returns: " << (b ? "true" : "false") << '\n'; + } + + // query existence - with error_code + + // directory_iterator - no error_code + + cout << "\ndirectory_iterator(\"" << p.string() << "\");\n"; + threw_exception = false; + + try { di = fs::directory_iterator(p); } + catch (const system_error& ex) + { + report_filesystem_error(ex); + threw_exception = true; + } + if (!threw_exception) + { + cout << " Did not throw exception\n" + << (di == fs::directory_iterator() ? " Equal" : " Not equal") + << " to the end iterator\n"; + } + + // directory_iterator - with error_code + + cout << "\ndirectory_iterator(\"" << p.string() << "\", ec);\n"; + di = fs::directory_iterator(p, ec); + cout << (di == fs::directory_iterator() ? " Equal" : " Not equal") + << " to the end iterator\n"; + report_error_code(ec); + + return 0; +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/file_size.cpp b/ThirdParty/boost-Subset/libs/filesystem/example/file_size.cpp new file mode 100644 index 0000000000..3fbfa4ea53 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/file_size.cpp @@ -0,0 +1,44 @@ +// file_size program -------------------------------------------------------// + +// Copyright Beman Dawes, 2004 + +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/filesystem for documentation. + +#include +#include + +namespace fs = boost::filesystem; + +int main( int argc, char* argv[] ) +{ + + if ( argc != 2 ) + { + std::cout << "Usage: file_size path\n"; + return 1; + } + + std::cout << "sizeof(intmax_t) is " << sizeof(boost::intmax_t) << '\n'; + + fs::path p( argv[1] ); + + if ( !fs::exists( p ) ) + { + std::cout << "not found: " << argv[1] << std::endl; + return 1; + } + + if ( !fs::is_regular( p ) ) + { + std::cout << "not a regular file: " << argv[1] << std::endl; + return 1; + } + + std::cout << "size of " << argv[1] << " is " << fs::file_size( p ) + << std::endl; + return 0; +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/file_status.cpp b/ThirdParty/boost-Subset/libs/filesystem/example/file_status.cpp new file mode 100644 index 0000000000..5d3774fdde --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/file_status.cpp @@ -0,0 +1,117 @@ +// status.cpp ------------------------------------------------------------------------// + +// Copyright Beman Dawes 2011 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include +#include +#include +#include +#include + +using std::cout; using std::endl; +using namespace boost::filesystem; + +namespace +{ + path p; + + void print_boost_macros() + { + std::cout << "Boost " + << BOOST_VERSION / 100000 << '.' + << BOOST_VERSION / 100 % 1000 << '.' + << BOOST_VERSION % 100 << ", " +# ifndef _WIN64 + << BOOST_COMPILER << ", " +# else + << BOOST_COMPILER << " with _WIN64 defined, " +# endif + << BOOST_STDLIB << ", " + << BOOST_PLATFORM + << std::endl; + } + + const char* file_type_tab[] = + { "status_error", "file_not_found", "regular_file", "directory_file", + "symlink_file", "block_file", "character_file", "fifo_file", "socket_file", + "type_unknown" + }; + + const char* file_type_c_str(enum file_type t) + { + return file_type_tab[t]; + } + + void show_status(file_status s, boost::system::error_code ec) + { + boost::system::error_condition econd; + + if (ec) + { + econd = ec.default_error_condition(); + cout << "sets ec to indicate an error:\n" + << " ec.value() is " << ec.value() << '\n' + << " ec.message() is \"" << ec.message() << "\"\n" + << " ec.default_error_condition().value() is " << econd.value() << '\n' + << " ec.default_error_condition().message() is \"" << econd.message() << "\"\n"; + } + else + cout << "clears ec.\n"; + + cout << "s.type() is " << s.type() + << ", which is defined as \"" << file_type_c_str(s.type()) << "\"\n"; + + cout << "exists(s) is " << (exists(s) ? "true" : "false") << "\n"; + cout << "status_known(s) is " << (status_known(s) ? "true" : "false") << "\n"; + cout << "is_regular_file(s) is " << (is_regular_file(s) ? "true" : "false") << "\n"; + cout << "is_directory(s) is " << (is_directory(s) ? "true" : "false") << "\n"; + cout << "is_other(s) is " << (is_other(s) ? "true" : "false") << "\n"; + cout << "is_symlink(s) is " << (is_symlink(s) ? "true" : "false") << "\n"; + } + + void try_exists() + { + cout << "\nexists(" << p << ") "; + try + { + bool result = exists(p); + cout << "is " << (result ? "true" : "false") << "\n"; + } + catch (const filesystem_error& ex) + { + cout << "throws a filesystem_error exception: " << ex.what() << "\n"; + } + } + +} + +int cpp_main(int argc, char* argv[]) +{ + print_boost_macros(); + + if (argc < 2) + { + std::cout << "Usage: file_status \n"; + p = argv[0]; + } + else + p = argv[1]; + + boost::system::error_code ec; + file_status s = status(p, ec); + cout << "\nfile_status s = status(" << p << ", ec) "; + show_status(s, ec); + + s = symlink_status(p, ec); + cout << "\nfile_status s = symlink_status(" << p << ", ec) "; + show_status(s, ec); + + try_exists(); + + return 0; +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/mbcopy.cpp b/ThirdParty/boost-Subset/libs/filesystem/example/mbcopy.cpp new file mode 100644 index 0000000000..2b1f603823 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/mbcopy.cpp @@ -0,0 +1,90 @@ +// Boost.Filesystem mbcopy.cpp ---------------------------------------------// + +// Copyright Beman Dawes 2005 + +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Copy the files in a directory, using mbpath to represent the new file names +// See http://../doc/path.htm#mbpath for more information + +// See deprecated_test for tests of deprecated features +#define BOOST_FILESYSTEM_NO_DEPRECATED + +#include +# ifdef BOOST_FILESYSTEM_NARROW_ONLY +# error This compiler or standard library does not support wide-character strings or paths +# endif + +#include "mbpath.hpp" +#include +#include +#include +#include "../src/utf8_codecvt_facet.hpp" + +namespace fs = boost::filesystem; + +namespace +{ + // we can't use boost::filesystem::copy_file() because the argument types + // differ, so provide a not-very-smart replacement. + + void copy_file( const fs::wpath & from, const user::mbpath & to ) + { + fs::ifstream from_file( from, std::ios_base::in | std::ios_base::binary ); + if ( !from_file ) { std::cout << "input open failed\n"; return; } + + fs::ofstream to_file( to, std::ios_base::out | std::ios_base::binary ); + if ( !to_file ) { std::cout << "output open failed\n"; return; } + + char c; + while ( from_file.get(c) ) + { + to_file.put(c); + if ( to_file.fail() ) { std::cout << "write error\n"; return; } + } + + if ( !from_file.eof() ) { std::cout << "read error\n"; } + } +} + +int main( int argc, char * argv[] ) +{ + if ( argc != 2 ) + { + std::cout << "Copy files in the current directory to a target directory\n" + << "Usage: mbcopy \n"; + return 1; + } + + // For encoding, use Boost UTF-8 codecvt + std::locale global_loc = std::locale(); + std::locale loc( global_loc, new fs::detail::utf8_codecvt_facet ); + user::mbpath_traits::imbue( loc ); + + std::string target_string( argv[1] ); + user::mbpath target_dir( user::mbpath_traits::to_internal( target_string ) ); + + if ( !fs::is_directory( target_dir ) ) + { + std::cout << "Error: " << argv[1] << " is not a directory\n"; + return 1; + } + + for ( fs::wdirectory_iterator it( L"." ); + it != fs::wdirectory_iterator(); ++it ) + { + if ( fs::is_regular_file(it->status()) ) + { + copy_file( *it, target_dir / it->path().filename() ); + } + } + + return 0; +} + + + + + diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/mbpath.cpp b/ThirdParty/boost-Subset/libs/filesystem/example/mbpath.cpp new file mode 100644 index 0000000000..43590010f3 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/mbpath.cpp @@ -0,0 +1,80 @@ +// Boost.Filesystem mbpath.cpp ---------------------------------------------// + +// (c) Copyright Beman Dawes 2005 + +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See Boost.Filesystem home page at http://www.boost.org/libs/filesystem + +#include +# ifdef BOOST_FILESYSTEM_NARROW_ONLY +# error This compiler or standard library does not support wide-character strings or paths +# endif + +#include "mbpath.hpp" +#include +#include + +namespace fs = boost::filesystem; + +namespace +{ + // ISO C calls this "the locale-specific native environment": + std::locale loc(""); + + const std::codecvt * + cvt( &std::use_facet > + ( loc ) ); +} + +namespace user +{ + mbpath_traits::external_string_type + mbpath_traits::to_external( const mbpath & ph, + const internal_string_type & src ) + { + std::size_t work_size( cvt->max_length() * (src.size()+1) ); + boost::scoped_array work( new char[ work_size ] ); + std::mbstate_t state; + const internal_string_type::value_type * from_next; + external_string_type::value_type * to_next; + if ( cvt->out( + state, src.c_str(), src.c_str()+src.size(), from_next, work.get(), + work.get()+work_size, to_next ) != std::codecvt_base::ok ) + boost::throw_exception >( + fs::basic_filesystem_error( + "user::mbpath::to_external conversion error", + ph, boost::system::error_code( EINVAL, boost::system::errno_ecat ) ) ); + *to_next = '\0'; + return external_string_type( work.get() ); + } + + mbpath_traits::internal_string_type + mbpath_traits::to_internal( const external_string_type & src ) + { + std::size_t work_size( src.size()+1 ); + boost::scoped_array work( new wchar_t[ work_size ] ); + std::mbstate_t state; + const external_string_type::value_type * from_next; + internal_string_type::value_type * to_next; + if ( cvt->in( + state, src.c_str(), src.c_str()+src.size(), from_next, work.get(), + work.get()+work_size, to_next ) != std::codecvt_base::ok ) + boost::throw_exception >( + fs::basic_filesystem_error( + "user::mbpath::to_internal conversion error", + boost::system::error_code( EINVAL, boost::system::errno_ecat ) ) ); + *to_next = L'\0'; + return internal_string_type( work.get() ); + } + + void mbpath_traits::imbue( const std::locale & new_loc ) + { + loc = new_loc; + cvt = &std::use_facet + >( loc ); + } + +} // namespace user diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/mbpath.hpp b/ThirdParty/boost-Subset/libs/filesystem/example/mbpath.hpp new file mode 100644 index 0000000000..f752b3fd0d --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/mbpath.hpp @@ -0,0 +1,44 @@ +// Boost.Filesystem mbpath.hpp ---------------------------------------------// + +// Copyright Beman Dawes 2005 + +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Encodes wide character paths as MBCS +// See http://../doc/path.htm#mbpath for more information + +#include +#include // for std::mbstate_t +#include +#include + +namespace user +{ + struct mbpath_traits; + + typedef boost::filesystem::basic_path mbpath; + + struct mbpath_traits + { + typedef std::wstring internal_string_type; + typedef std::string external_string_type; + + static external_string_type to_external( const mbpath & ph, + const internal_string_type & src ); + + static internal_string_type to_internal( const external_string_type & src ); + + static void imbue( const std::locale & loc ); + }; +} // namespace user + +namespace boost +{ + namespace filesystem + { + template<> struct is_basic_path + { static const bool value = true; }; + } +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/msvc/common.props b/ThirdParty/boost-Subset/libs/filesystem/example/msvc/common.props new file mode 100644 index 0000000000..527c3c8a06 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/msvc/common.props @@ -0,0 +1,15 @@ + + + + + + + + ..\..\..\..\.. + + + ..\..\..\..\..\stage\lib;%(AdditionalLibraryDirectories) + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/msvc/filesystem-tutorials.sln b/ThirdParty/boost-Subset/libs/filesystem/example/msvc/filesystem-tutorials.sln new file mode 100644 index 0000000000..91b984424a --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/msvc/filesystem-tutorials.sln @@ -0,0 +1,78 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tut1", "tut1\tut1.vcxproj", "{04A56B6F-9901-4F6D-8936-9554A44E0DD6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tut2", "tut2\tut2.vcxproj", "{BA9220FA-FECF-4B28-80A0-7F5017524EB5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tut3", "tut3\tut3.vcxproj", "{747CF49E-27D8-4C5E-BB46-25779FD8DDEB}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tut4", "tut4\tut4.vcxproj", "{50FB30B4-F088-44E3-81BB-0C9CA65693CB}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tut5", "tut5\tut5.vcxproj", "{F17107D6-32E8-40EA-89A2-83BA9BA44A56}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "path_info", "path_info\path_info.vcxproj", "{A37B7F28-3261-41BF-8BC1-8384BD4C8E47}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {04A56B6F-9901-4F6D-8936-9554A44E0DD6}.Debug|x64.ActiveCfg = Debug|x64 + {04A56B6F-9901-4F6D-8936-9554A44E0DD6}.Debug|x64.Build.0 = Debug|x64 + {04A56B6F-9901-4F6D-8936-9554A44E0DD6}.Debug|x86.ActiveCfg = Debug|Win32 + {04A56B6F-9901-4F6D-8936-9554A44E0DD6}.Debug|x86.Build.0 = Debug|Win32 + {04A56B6F-9901-4F6D-8936-9554A44E0DD6}.Release|x64.ActiveCfg = Release|x64 + {04A56B6F-9901-4F6D-8936-9554A44E0DD6}.Release|x64.Build.0 = Release|x64 + {04A56B6F-9901-4F6D-8936-9554A44E0DD6}.Release|x86.ActiveCfg = Release|Win32 + {04A56B6F-9901-4F6D-8936-9554A44E0DD6}.Release|x86.Build.0 = Release|Win32 + {BA9220FA-FECF-4B28-80A0-7F5017524EB5}.Debug|x64.ActiveCfg = Debug|x64 + {BA9220FA-FECF-4B28-80A0-7F5017524EB5}.Debug|x64.Build.0 = Debug|x64 + {BA9220FA-FECF-4B28-80A0-7F5017524EB5}.Debug|x86.ActiveCfg = Debug|Win32 + {BA9220FA-FECF-4B28-80A0-7F5017524EB5}.Debug|x86.Build.0 = Debug|Win32 + {BA9220FA-FECF-4B28-80A0-7F5017524EB5}.Release|x64.ActiveCfg = Release|x64 + {BA9220FA-FECF-4B28-80A0-7F5017524EB5}.Release|x64.Build.0 = Release|x64 + {BA9220FA-FECF-4B28-80A0-7F5017524EB5}.Release|x86.ActiveCfg = Release|Win32 + {BA9220FA-FECF-4B28-80A0-7F5017524EB5}.Release|x86.Build.0 = Release|Win32 + {747CF49E-27D8-4C5E-BB46-25779FD8DDEB}.Debug|x64.ActiveCfg = Debug|x64 + {747CF49E-27D8-4C5E-BB46-25779FD8DDEB}.Debug|x64.Build.0 = Debug|x64 + {747CF49E-27D8-4C5E-BB46-25779FD8DDEB}.Debug|x86.ActiveCfg = Debug|Win32 + {747CF49E-27D8-4C5E-BB46-25779FD8DDEB}.Debug|x86.Build.0 = Debug|Win32 + {747CF49E-27D8-4C5E-BB46-25779FD8DDEB}.Release|x64.ActiveCfg = Release|x64 + {747CF49E-27D8-4C5E-BB46-25779FD8DDEB}.Release|x64.Build.0 = Release|x64 + {747CF49E-27D8-4C5E-BB46-25779FD8DDEB}.Release|x86.ActiveCfg = Release|Win32 + {747CF49E-27D8-4C5E-BB46-25779FD8DDEB}.Release|x86.Build.0 = Release|Win32 + {50FB30B4-F088-44E3-81BB-0C9CA65693CB}.Debug|x64.ActiveCfg = Debug|x64 + {50FB30B4-F088-44E3-81BB-0C9CA65693CB}.Debug|x64.Build.0 = Debug|x64 + {50FB30B4-F088-44E3-81BB-0C9CA65693CB}.Debug|x86.ActiveCfg = Debug|Win32 + {50FB30B4-F088-44E3-81BB-0C9CA65693CB}.Debug|x86.Build.0 = Debug|Win32 + {50FB30B4-F088-44E3-81BB-0C9CA65693CB}.Release|x64.ActiveCfg = Release|x64 + {50FB30B4-F088-44E3-81BB-0C9CA65693CB}.Release|x64.Build.0 = Release|x64 + {50FB30B4-F088-44E3-81BB-0C9CA65693CB}.Release|x86.ActiveCfg = Release|Win32 + {50FB30B4-F088-44E3-81BB-0C9CA65693CB}.Release|x86.Build.0 = Release|Win32 + {F17107D6-32E8-40EA-89A2-83BA9BA44A56}.Debug|x64.ActiveCfg = Debug|x64 + {F17107D6-32E8-40EA-89A2-83BA9BA44A56}.Debug|x64.Build.0 = Debug|x64 + {F17107D6-32E8-40EA-89A2-83BA9BA44A56}.Debug|x86.ActiveCfg = Debug|Win32 + {F17107D6-32E8-40EA-89A2-83BA9BA44A56}.Debug|x86.Build.0 = Debug|Win32 + {F17107D6-32E8-40EA-89A2-83BA9BA44A56}.Release|x64.ActiveCfg = Release|x64 + {F17107D6-32E8-40EA-89A2-83BA9BA44A56}.Release|x64.Build.0 = Release|x64 + {F17107D6-32E8-40EA-89A2-83BA9BA44A56}.Release|x86.ActiveCfg = Release|Win32 + {F17107D6-32E8-40EA-89A2-83BA9BA44A56}.Release|x86.Build.0 = Release|Win32 + {A37B7F28-3261-41BF-8BC1-8384BD4C8E47}.Debug|x64.ActiveCfg = Debug|x64 + {A37B7F28-3261-41BF-8BC1-8384BD4C8E47}.Debug|x64.Build.0 = Debug|x64 + {A37B7F28-3261-41BF-8BC1-8384BD4C8E47}.Debug|x86.ActiveCfg = Debug|Win32 + {A37B7F28-3261-41BF-8BC1-8384BD4C8E47}.Debug|x86.Build.0 = Debug|Win32 + {A37B7F28-3261-41BF-8BC1-8384BD4C8E47}.Release|x64.ActiveCfg = Release|x64 + {A37B7F28-3261-41BF-8BC1-8384BD4C8E47}.Release|x64.Build.0 = Release|x64 + {A37B7F28-3261-41BF-8BC1-8384BD4C8E47}.Release|x86.ActiveCfg = Release|Win32 + {A37B7F28-3261-41BF-8BC1-8384BD4C8E47}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/msvc/path_info/path_info.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/example/msvc/path_info/path_info.vcxproj new file mode 100644 index 0000000000..64fe4ea9be --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/msvc/path_info/path_info.vcxproj @@ -0,0 +1,158 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {A37B7F28-3261-41BF-8BC1-8384BD4C8E47} + Win32Proj + path_info + 8.1 + + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + + + Level3 + Disabled + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + + + MaxSpeed + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/msvc/tut1/tut1.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/example/msvc/tut1/tut1.vcxproj new file mode 100644 index 0000000000..7178454c82 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/msvc/tut1/tut1.vcxproj @@ -0,0 +1,158 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {04A56B6F-9901-4F6D-8936-9554A44E0DD6} + Win32Proj + tut1 + 8.1 + + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + + + Level3 + Disabled + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + + + MaxSpeed + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/msvc/tut2/tut2.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/example/msvc/tut2/tut2.vcxproj new file mode 100644 index 0000000000..b7ec3fd3c3 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/msvc/tut2/tut2.vcxproj @@ -0,0 +1,158 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {BA9220FA-FECF-4B28-80A0-7F5017524EB5} + Win32Proj + tut2 + 8.1 + + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + + + Level3 + Disabled + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + + + MaxSpeed + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/msvc/tut3/tut3.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/example/msvc/tut3/tut3.vcxproj new file mode 100644 index 0000000000..f452e0d1a7 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/msvc/tut3/tut3.vcxproj @@ -0,0 +1,170 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {747CF49E-27D8-4C5E-BB46-25779FD8DDEB} + Win32Proj + tut3 + 8.1 + + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + "$(TargetDir)\$(TargetName).exe" . + + + + + + + Level3 + Disabled + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + "$(TargetDir)\$(TargetName).exe" . + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + "$(TargetDir)\$(TargetName).exe" . + + + + + Level3 + + + MaxSpeed + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + "$(TargetDir)\$(TargetName).exe" . + + + + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/msvc/tut4/tut4.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/example/msvc/tut4/tut4.vcxproj new file mode 100644 index 0000000000..f080b019ff --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/msvc/tut4/tut4.vcxproj @@ -0,0 +1,170 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {50FB30B4-F088-44E3-81BB-0C9CA65693CB} + Win32Proj + tut4 + 8.1 + + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + "$(TargetDir)\$(TargetName).exe" . + + + + + + + Level3 + Disabled + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + "$(TargetDir)\$(TargetName).exe" . + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + "$(TargetDir)\$(TargetName).exe" . + + + + + Level3 + + + MaxSpeed + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + "$(TargetDir)\$(TargetName).exe" . + + + + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/msvc/tut5/tut5.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/example/msvc/tut5/tut5.vcxproj new file mode 100644 index 0000000000..ca6fe0863b --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/msvc/tut5/tut5.vcxproj @@ -0,0 +1,158 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {F17107D6-32E8-40EA-89A2-83BA9BA44A56} + Win32Proj + tut5 + 8.1 + + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + + + Level3 + Disabled + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + + + MaxSpeed + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/path_info.cpp b/ThirdParty/boost-Subset/libs/filesystem/example/path_info.cpp new file mode 100644 index 0000000000..42e4bdfb83 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/path_info.cpp @@ -0,0 +1,82 @@ +// path_info.cpp ---------------------------------------------------------------------// + +// Copyright Beman Dawes 2009 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include +#include +using namespace std; +using namespace boost::filesystem; + +const char * say_what(bool b) { return b ? "true" : "false"; } + +int main(int argc, char* argv[]) +{ + if (argc < 2) + { + cout << "Usage: path_info path-element [path-element...]\n" + "Composes a path via operator/= from one or more path-element arguments\n" + "Example: path_info foo/bar baz\n" +# ifdef BOOST_POSIX_API + " would report info about the composed path foo/bar/baz\n"; +# else // BOOST_WINDOWS_API + " would report info about the composed path foo/bar\\baz\n"; +# endif + return 1; + } + + path p; + for (; argc > 1; --argc, ++argv) + p /= argv[1]; // compose path p from the command line arguments + + cout << "\ncomposed path:\n"; + cout << " operator<<()---------: " << p << "\n"; + cout << " make_preferred()-----: " << p.make_preferred() << "\n"; + + cout << "\nelements:\n"; + for (auto element : p) + cout << " " << element << '\n'; + + cout << "\nobservers, native format:" << endl; +# ifdef BOOST_POSIX_API + cout << " native()-------------: " << p.native() << endl; + cout << " c_str()--------------: " << p.c_str() << endl; +# else // BOOST_WINDOWS_API + wcout << L" native()-------------: " << p.native() << endl; + wcout << L" c_str()--------------: " << p.c_str() << endl; +# endif + cout << " string()-------------: " << p.string() << endl; + wcout << L" wstring()------------: " << p.wstring() << endl; + + cout << "\nobservers, generic format:\n"; + cout << " generic_string()-----: " << p.generic_string() << endl; + wcout << L" generic_wstring()----: " << p.generic_wstring() << endl; + + cout << "\ndecomposition:\n"; + cout << " root_name()----------: " << p.root_name() << '\n'; + cout << " root_directory()-----: " << p.root_directory() << '\n'; + cout << " root_path()----------: " << p.root_path() << '\n'; + cout << " relative_path()------: " << p.relative_path() << '\n'; + cout << " parent_path()--------: " << p.parent_path() << '\n'; + cout << " filename()-----------: " << p.filename() << '\n'; + cout << " stem()---------------: " << p.stem() << '\n'; + cout << " extension()----------: " << p.extension() << '\n'; + + cout << "\nquery:\n"; + cout << " empty()--------------: " << say_what(p.empty()) << '\n'; + cout << " is_absolute()--------: " << say_what(p.is_absolute()) << '\n'; + cout << " has_root_name()------: " << say_what(p.has_root_name()) << '\n'; + cout << " has_root_directory()-: " << say_what(p.has_root_directory()) << '\n'; + cout << " has_root_path()------: " << say_what(p.has_root_path()) << '\n'; + cout << " has_relative_path()--: " << say_what(p.has_relative_path()) << '\n'; + cout << " has_parent_path()----: " << say_what(p.has_parent_path()) << '\n'; + cout << " has_filename()-------: " << say_what(p.has_filename()) << '\n'; + cout << " has_stem()-----------: " << say_what(p.has_stem()) << '\n'; + cout << " has_extension()------: " << say_what(p.has_extension()) << '\n'; + + return 0; +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/simple_ls.cpp b/ThirdParty/boost-Subset/libs/filesystem/example/simple_ls.cpp new file mode 100644 index 0000000000..9c4b638052 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/simple_ls.cpp @@ -0,0 +1,91 @@ +// simple_ls program -------------------------------------------------------// + +// Copyright Jeff Garland and Beman Dawes, 2002 + +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/filesystem for documentation. + +#define BOOST_FILESYSTEM_VERSION 3 + +// As an example program, we don't want to use any deprecated features +#ifndef BOOST_FILESYSTEM_NO_DEPRECATED +# define BOOST_FILESYSTEM_NO_DEPRECATED +#endif +#ifndef BOOST_SYSTEM_NO_DEPRECATED +# define BOOST_SYSTEM_NO_DEPRECATED +#endif + +#include "boost/filesystem/operations.hpp" +#include "boost/filesystem/path.hpp" +#include "boost/progress.hpp" +#include + +namespace fs = boost::filesystem; + +int main(int argc, char* argv[]) +{ + fs::path p(fs::current_path()); + + if (argc > 1) + p = fs::system_complete(argv[1]); + else + std::cout << "\nusage: simple_ls [path]" << std::endl; + + unsigned long file_count = 0; + unsigned long dir_count = 0; + unsigned long other_count = 0; + unsigned long err_count = 0; + + if (!fs::exists(p)) + { + std::cout << "\nNot found: " << p << std::endl; + return 1; + } + + if (fs::is_directory(p)) + { + std::cout << "\nIn directory: " << p << "\n\n"; + fs::directory_iterator end_iter; + for (fs::directory_iterator dir_itr(p); + dir_itr != end_iter; + ++dir_itr) + { + try + { + if (fs::is_directory(dir_itr->status())) + { + ++dir_count; + std::cout << dir_itr->path().filename() << " [directory]\n"; + } + else if (fs::is_regular_file(dir_itr->status())) + { + ++file_count; + std::cout << dir_itr->path().filename() << "\n"; + } + else + { + ++other_count; + std::cout << dir_itr->path().filename() << " [other]\n"; + } + + } + catch (const std::exception & ex) + { + ++err_count; + std::cout << dir_itr->path().filename() << " " << ex.what() << std::endl; + } + } + std::cout << "\n" << file_count << " files\n" + << dir_count << " directories\n" + << other_count << " others\n" + << err_count << " errors\n"; + } + else // must be a file + { + std::cout << "\nFound: " << p << "\n"; + } + return 0; +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/stems.cpp b/ThirdParty/boost-Subset/libs/filesystem/example/stems.cpp new file mode 100644 index 0000000000..3699fa81f3 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/stems.cpp @@ -0,0 +1,31 @@ +// filesystem example stems.cpp ------------------------------------------------------// + +// Copyright Beman Dawes 2011 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include +#include + +int main(int argc, char* argv[]) +{ + if (argc < 2) + { + std::cout << "Usage: stems \n"; + return 1; + } + + boost::filesystem::path p(argv[1]), name(p.filename()); + + for(;;) + { + std::cout << "filename " << name << " has stem " << name.stem() + << " and extension " << name.extension() << "\n"; + if (name.stem().empty() || name.extension().empty()) + return 0; + name = name.stem(); + } +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/tchar.cpp b/ThirdParty/boost-Subset/libs/filesystem/example/tchar.cpp new file mode 100644 index 0000000000..5f33d69e06 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/tchar.cpp @@ -0,0 +1,39 @@ +// Example use of Microsoft TCHAR ----------------------------------------------------// + +// Copyright Beman Dawes 2008 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#include +#include +#include +#include +#include +#include + +namespace fs = boost::filesystem; + +typedef std::basic_string tstring; + +void func( const fs::path & p ) +{ + assert( fs::exists( p ) ); +} + +int main() +{ + // get a path that is known to exist + fs::path cp = fs::current_path(); + + // demo: get tstring from the path + tstring cp_as_tstring = cp.string(); + + // demo: pass tstring to filesystem function taking path + assert( fs::exists( cp_as_tstring ) ); + + // demo: pass tstring to user function taking path + func( cp_as_tstring ); + + return 0; +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/test/Jamfile.v2 b/ThirdParty/boost-Subset/libs/filesystem/example/test/Jamfile.v2 new file mode 100644 index 0000000000..3b3dde5f45 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/test/Jamfile.v2 @@ -0,0 +1,31 @@ +# Boost Filesystem Library Tutorial Jamfile + +# (C) Copyright Beman Dawes 2010 +# (C) Copyright Vladimir Prus 2003 + +# Distributed under the Boost Software License, Version 1.0. +# See www.boost.org/LICENSE_1_0.txt + +# Library home page: http://www.boost.org/libs/filesystem + +project + : requirements + /boost/filesystem//boost_filesystem + /boost/system//boost_system + msvc:on + ; + +exe tut1 : tut1.cpp ; +exe tut2 : tut2.cpp ; +exe tut3 : tut3.cpp ; +exe tut4 : tut4.cpp ; +exe tut5 : tut5.cpp ; +exe path_info : path_info.cpp ; + +install tut1-copy : tut1 : . ; +install tut2-copy : tut2 : . ; +install tut3-copy : tut3 : . ; +install tut4-copy : tut4 : . ; +install tut5-copy : tut5 : . ; +install path_info-copy : path_info : . ; + diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/test/build.bat b/ThirdParty/boost-Subset/libs/filesystem/example/test/build.bat new file mode 100644 index 0000000000..1921ca1cdc --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/test/build.bat @@ -0,0 +1,7 @@ +@echo off +rem Copyright Beman Dawes, 2010 +rem Distributed under the Boost Software License, Version 1.0. +rem See www.boost.org/LICENSE_1_0.txt +echo Compiling example programs... +b2 %* >b2.log +find "error" b2.log +grep "error" nul +copy /y ..\tut2.cpp >nul +copy /y ..\tut3.cpp >nul +copy /y ..\tut4.cpp >nul +copy /y ..\tut5.cpp >nul +copy /y ..\path_info.cpp >nul +del *.exe 2>nul +del *.pdb 2>nul diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/test/setup.sh b/ThirdParty/boost-Subset/libs/filesystem/example/test/setup.sh new file mode 100644 index 0000000000..cb1ba684c2 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/test/setup.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +# Copyright Beman Dawes, 2010 +# Distributed under the Boost Software License, Version 1.0. +# See www.boost.org/LICENSE_1_0.txt +echo Copying example programs... +cp ../tut1.cpp . +cp ../tut2.cpp . +cp ../tut3.cpp . +cp ../tut4.cpp . +cp ../tut5.cpp . +cp ../path_info.cpp . +rm tut1 2>~/junk +rm tut2 2>~/junk +rm tut3 2>~/junk +rm tut4 2>~/junk +rm tut5 2>~/junk +rm path_info 2>~/junk + diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/tut0.cpp b/ThirdParty/boost-Subset/libs/filesystem/example/tut0.cpp new file mode 100644 index 0000000000..3e294c02fb --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/tut0.cpp @@ -0,0 +1,23 @@ +// filesystem tut0.cpp ---------------------------------------------------------------// + +// Copyright Beman Dawes 2009 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include +#include +namespace fs = boost::filesystem; + +int main(int argc, char* argv[]) +{ + if (argc < 2) + { + std::cout << "Usage: tut0 path\n"; + return 1; + } + std::cout << argv[1] << '\n'; + return 0; +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/tut1.cpp b/ThirdParty/boost-Subset/libs/filesystem/example/tut1.cpp new file mode 100644 index 0000000000..3ac85b9035 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/tut1.cpp @@ -0,0 +1,23 @@ +// filesystem tut1.cpp ---------------------------------------------------------------// + +// Copyright Beman Dawes 2009 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include +#include +using namespace boost::filesystem; + +int main(int argc, char* argv[]) +{ + if (argc < 2) + { + std::cout << "Usage: tut1 path\n"; + return 1; + } + std::cout << argv[1] << " " << file_size(argv[1]) << '\n'; + return 0; +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/tut2.cpp b/ThirdParty/boost-Subset/libs/filesystem/example/tut2.cpp new file mode 100644 index 0000000000..147dc3d8df --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/tut2.cpp @@ -0,0 +1,40 @@ +// filesystem tut2.cpp ---------------------------------------------------------------// + +// Copyright Beman Dawes 2009 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include +#include +using namespace std; +using namespace boost::filesystem; + +int main(int argc, char* argv[]) +{ + if (argc < 2) + { + cout << "Usage: tut2 path\n"; + return 1; + } + + path p(argv[1]); // avoid repeated path construction below + + if (exists(p)) // does path p actually exist? + { + if (is_regular_file(p)) // is path p a regular file? + cout << p << " size is " << file_size(p) << '\n'; + + else if (is_directory(p)) // is path p a directory? + cout << p << " is a directory\n"; + + else + cout << p << " exists, but is not a regular file or directory\n"; + } + else + cout << p << " does not exist\n"; + + return 0; +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/tut3.cpp b/ThirdParty/boost-Subset/libs/filesystem/example/tut3.cpp new file mode 100644 index 0000000000..b090fc2066 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/tut3.cpp @@ -0,0 +1,52 @@ +// filesystem tut3.cpp ---------------------------------------------------------------// + +// Copyright Beman Dawes 2009 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include +#include +using std::cout; +using namespace boost::filesystem; + +int main(int argc, char* argv[]) +{ + if (argc < 2) + { + cout << "Usage: tut3 path\n"; + return 1; + } + + path p (argv[1]); + + try + { + if (exists(p)) + { + if (is_regular_file(p)) + cout << p << " size is " << file_size(p) << '\n'; + + else if (is_directory(p)) + { + cout << p << " is a directory containing:\n"; + + for (directory_entry& x : directory_iterator(p)) + cout << " " << x.path() << '\n'; + } + else + cout << p << " exists, but is not a regular file or directory\n"; + } + else + cout << p << " does not exist\n"; + } + + catch (const filesystem_error& ex) + { + cout << ex.what() << '\n'; + } + + return 0; +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/tut4.cpp b/ThirdParty/boost-Subset/libs/filesystem/example/tut4.cpp new file mode 100644 index 0000000000..55fc9181ce --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/tut4.cpp @@ -0,0 +1,61 @@ +// filesystem tut4.cpp ---------------------------------------------------------------// + +// Copyright Beman Dawes 2009 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include +#include +#include +#include +using std::cout; +using namespace boost::filesystem; + +int main(int argc, char* argv[]) +{ + if (argc < 2) + { + cout << "Usage: tut4 path\n"; + return 1; + } + + path p (argv[1]); + + try + { + if (exists(p)) + { + if (is_regular_file(p)) + cout << p << " size is " << file_size(p) << '\n'; + + else if (is_directory(p)) + { + cout << p << " is a directory containing:\n"; + + std::vector v; + + for (auto&& x : directory_iterator(p)) + v.push_back(x.path().filename().string()); + + std::sort(v.begin(), v.end()); + + for (auto&& x : v) + cout << " " << x << '\n'; + } + else + cout << p << " exists, but is not a regular file or directory\n"; + } + else + cout << p << " does not exist\n"; + } + + catch (const filesystem_error& ex) + { + cout << ex.what() << '\n'; + } + + return 0; +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/tut5.cpp b/ThirdParty/boost-Subset/libs/filesystem/example/tut5.cpp new file mode 100644 index 0000000000..d665b0db05 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/tut5.cpp @@ -0,0 +1,52 @@ +// filesystem tut5.cpp ---------------------------------------------------------------// + +// Copyright Beman Dawes 2010 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include +#include +#include +namespace fs = boost::filesystem; + +int main() +{ + // \u263A is "Unicode WHITE SMILING FACE = have a nice day!" + std::string narrow_string ("smile2"); + std::wstring wide_string (L"smile2\u263A"); + std::list narrow_list; + narrow_list.push_back('s'); + narrow_list.push_back('m'); + narrow_list.push_back('i'); + narrow_list.push_back('l'); + narrow_list.push_back('e'); + narrow_list.push_back('3'); + std::list wide_list; + wide_list.push_back(L's'); + wide_list.push_back(L'm'); + wide_list.push_back(L'i'); + wide_list.push_back(L'l'); + wide_list.push_back(L'e'); + wide_list.push_back(L'3'); + wide_list.push_back(L'\u263A'); + + { fs::ofstream f("smile"); } + { fs::ofstream f(L"smile\u263A"); } + { fs::ofstream f(narrow_string); } + { fs::ofstream f(wide_string); } + { fs::ofstream f(narrow_list); } + { fs::ofstream f(wide_list); } + narrow_list.pop_back(); + narrow_list.push_back('4'); + wide_list.pop_back(); + wide_list.pop_back(); + wide_list.push_back(L'4'); + wide_list.push_back(L'\u263A'); + { fs::ofstream f(fs::path(narrow_list.begin(), narrow_list.end())); } + { fs::ofstream f(fs::path(wide_list.begin(), wide_list.end())); } + + return 0; +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/tut6a.cpp b/ThirdParty/boost-Subset/libs/filesystem/example/tut6a.cpp new file mode 100644 index 0000000000..f579a42752 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/tut6a.cpp @@ -0,0 +1,48 @@ +// filesystem tut6a.cpp --------------------------------------------------------------// + +// Copyright Beman Dawes 2010 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include +#include +#include +using namespace boost::filesystem; + +int main(int argc, char* argv[]) +{ + if (argc < 2) + { + std::cout << "Usage: tut6a path\n"; + return 1; + } + + try + { + for (recursive_directory_iterator it (argv[1]); + it != recursive_directory_iterator(); + ++it) + { + if (it.level() > 1) + it.pop(); + else + { + for (int i = 0; i <= it.level(); ++i) + std::cout << " "; + + std::cout << it->path() << '\n'; + } + } + } + + catch (const std::exception& ex) + { + std::cout << "************* exception *****************\n"; + std::cout << ex.what() << '\n'; + } + + return 0; +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/tut6b.cpp b/ThirdParty/boost-Subset/libs/filesystem/example/tut6b.cpp new file mode 100644 index 0000000000..90f54efc0f --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/tut6b.cpp @@ -0,0 +1,50 @@ +// filesystem tut6b.cpp --------------------------------------------------------------// + +// Copyright Beman Dawes 2010 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include +#include +#include +using namespace boost::filesystem; + +int main(int argc, char* argv[]) +{ + if (argc < 2) + { + std::cout << "Usage: tut6b path\n"; + return 1; + } + + try + { + for (recursive_directory_iterator it (argv[1]); + it != recursive_directory_iterator(); + ) + { + for (int i = 0; i <= it.level(); ++i) + std::cout << " "; + + std::cout << it->path() << '\n'; + + try { ++it; } + catch (const filesystem_error& ex) + { + std::cout << "************* filesystem_error *****************\n"; + std::cout << ex.what() << '\n'; + } + } + } + + catch (const std::exception& ex) + { + std::cout << "************* exception *****************\n"; + std::cout << ex.what() << '\n'; + } + + return 0; +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/example/tut6c.cpp b/ThirdParty/boost-Subset/libs/filesystem/example/tut6c.cpp new file mode 100644 index 0000000000..2b73f774ad --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/example/tut6c.cpp @@ -0,0 +1,40 @@ +// filesystem tut6c.cpp --------------------------------------------------------------// + +// Copyright Beman Dawes 2010 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include +#include +#include +#include + +using namespace boost::filesystem; +using namespace boost::system; + +int main(int argc, char* argv[]) +{ + if (argc < 2) + { + std::cout << "Usage: tut6c path\n"; + return 1; + } + + error_code ec; + for (recursive_directory_iterator it (argv[1], ec); + it != recursive_directory_iterator(); + ) + { + for (int i = 0; i <= it.level(); ++i) + std::cout << " "; + + std::cout << it->path() << '\n'; + + it.increment(ec); + } + + return 0; +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/index.html b/ThirdParty/boost-Subset/libs/filesystem/index.html new file mode 100644 index 0000000000..1803c23ca2 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/index.html @@ -0,0 +1,13 @@ + + + + + +Automatic redirection failed, please go to +doc/index.htm. +
+

© Copyright Beman Dawes, 2003

+

Distributed under the Boost Software License, Version 1.0. +See http://www.boost.org/LICENSE_1_0.txt

+ + diff --git a/ThirdParty/boost-Subset/libs/filesystem/meta/libraries.json b/ThirdParty/boost-Subset/libs/filesystem/meta/libraries.json new file mode 100644 index 0000000000..d7f7b39c08 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/meta/libraries.json @@ -0,0 +1,14 @@ +{ + "key": "filesystem", + "name": "Filesystem", + "authors": [ + "Beman Dawes" + ], + "description": "The Boost Filesystem Library provides portable facilities to query and manipulate paths, files, and directories.", + "category": [ + "System" + ], + "maintainers": [ + "Beman Dawes " + ] +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/src/codecvt_error_category.cpp b/ThirdParty/boost-Subset/libs/filesystem/src/codecvt_error_category.cpp new file mode 100644 index 0000000000..165c6ea7b8 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/src/codecvt_error_category.cpp @@ -0,0 +1,84 @@ +// codecvt_error_category implementation file ----------------------------------------// + +// Copyright Beman Dawes 2009 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt) + +// Library home page at http://www.boost.org/libs/filesystem + +//--------------------------------------------------------------------------------------// + +#include + +// define BOOST_FILESYSTEM_SOURCE so that knows +// the library is being built (possibly exporting rather than importing code) +#define BOOST_FILESYSTEM_SOURCE + +#ifndef BOOST_SYSTEM_NO_DEPRECATED +# define BOOST_SYSTEM_NO_DEPRECATED +#endif + +#include +#include +#include +#include +#include +#include +#include + +//--------------------------------------------------------------------------------------// + +namespace +{ + class codecvt_error_cat : public boost::system::error_category + { + public: + codecvt_error_cat(){} + const char* name() const BOOST_SYSTEM_NOEXCEPT; + std::string message(int ev) const; + }; + + const char* codecvt_error_cat::name() const BOOST_SYSTEM_NOEXCEPT + { + return "codecvt"; + } + + std::string codecvt_error_cat::message(int ev) const + { + std::string str; + switch (ev) + { + case std::codecvt_base::ok: + str = "ok"; + break; + case std::codecvt_base::partial: + str = "partial"; + break; + case std::codecvt_base::error: + str = "error"; + break; + case std::codecvt_base::noconv: + str = "noconv"; + break; + default: + str = "unknown error"; + } + return str; + } + +} // unnamed namespace + +namespace boost +{ + namespace filesystem + { + + BOOST_FILESYSTEM_DECL const boost::system::error_category& codecvt_error_category() + { + static const codecvt_error_cat codecvt_error_cat_const; + return codecvt_error_cat_const; + } + + } // namespace filesystem +} // namespace boost diff --git a/ThirdParty/boost-Subset/libs/filesystem/src/operations.cpp b/ThirdParty/boost-Subset/libs/filesystem/src/operations.cpp new file mode 100644 index 0000000000..c749a93dcd --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/src/operations.cpp @@ -0,0 +1,2267 @@ +// operations.cpp --------------------------------------------------------------------// + +// Copyright 2002-2009, 2014 Beman Dawes +// Copyright 2001 Dietmar Kuehl + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// See library home page at http://www.boost.org/libs/filesystem + +//--------------------------------------------------------------------------------------// + +// define 64-bit offset macros BEFORE including boost/config.hpp (see ticket #5355) +#if !(defined(__HP_aCC) && defined(_ILP32) && !defined(_STATVFS_ACPP_PROBLEMS_FIXED)) +#define _FILE_OFFSET_BITS 64 // at worst, these defines may have no effect, +#endif +#if !defined(__PGI) +#define __USE_FILE_OFFSET64 // but that is harmless on Windows and on POSIX + // 64-bit systems or on 32-bit systems which don't have files larger + // than can be represented by a traditional POSIX/UNIX off_t type. + // OTOH, defining them should kick in 64-bit off_t's (and thus + // st_size)on 32-bit systems that provide the Large File + // Support (LFS)interface, such as Linux, Solaris, and IRIX. + // The defines are given before any headers are included to + // ensure that they are available to all included headers. + // That is required at least on Solaris, and possibly on other + // systems as well. +#else +#define _FILE_OFFSET_BITS 64 +#endif + +// define BOOST_FILESYSTEM_SOURCE so that knows +// the library is being built (possibly exporting rather than importing code) +#define BOOST_FILESYSTEM_SOURCE + +#ifndef BOOST_SYSTEM_NO_DEPRECATED +# define BOOST_SYSTEM_NO_DEPRECATED +#endif + +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS // Sun readdir_r()needs this +#endif + +#include +#include +#include +#include +#include // for malloc, free +#include +#include // for remove, rename +#if defined(__QNXNTO__) // see ticket #5355 +# include +#endif +#include + +#ifdef BOOST_FILEYSTEM_INCLUDE_IOSTREAM +# include +#endif + +namespace fs = boost::filesystem; +using boost::filesystem::path; +using boost::filesystem::filesystem_error; +using boost::filesystem::perms; +using boost::system::error_code; +using boost::system::error_category; +using boost::system::system_category; +using std::string; +using std::wstring; + +# ifdef BOOST_POSIX_API + +# include +# include +# if !defined(__APPLE__) && !defined(__OpenBSD__) && !defined(__ANDROID__) \ + && !defined(__VXWORKS__) +# include +# define BOOST_STATVFS statvfs +# define BOOST_STATVFS_F_FRSIZE vfs.f_frsize +# else +# ifdef __OpenBSD__ +# include +# elif defined(__ANDROID__) +# include +# endif +# if !defined(__VXWORKS__) +# include +# endif +# define BOOST_STATVFS statfs +# define BOOST_STATVFS_F_FRSIZE static_cast(vfs.f_bsize) +# endif +# include +# include +# include +# include +# include "limits.h" + +# else // BOOST_WINDOW_API + +# if (defined(__MINGW32__) || defined(__CYGWIN__)) && !defined(WINVER) + // Versions of MinGW or Cygwin that support Filesystem V3 support at least WINVER 0x501. + // See MinGW's windef.h +# define WINVER 0x501 +# endif +# include +# include +# include +# if !defined(_WIN32_WINNT) +# define _WIN32_WINNT 0x0500 +# endif +# if defined(__BORLANDC__) || defined(__MWERKS__) +# if defined(__BORLANDC__) + using std::time_t; +# endif +# include +# else +# include +# endif + +// REPARSE_DATA_BUFFER related definitions are found in ntifs.h, which is part of the +// Windows Device Driver Kit. Since that's inconvenient, the definitions are provided +// here. See http://msdn.microsoft.com/en-us/library/ms791514.aspx + +#if !defined(REPARSE_DATA_BUFFER_HEADER_SIZE) // mingw winnt.h does provide the defs + +#define SYMLINK_FLAG_RELATIVE 1 + +typedef struct _REPARSE_DATA_BUFFER { + ULONG ReparseTag; + USHORT ReparseDataLength; + USHORT Reserved; + union { + struct { + USHORT SubstituteNameOffset; + USHORT SubstituteNameLength; + USHORT PrintNameOffset; + USHORT PrintNameLength; + ULONG Flags; + WCHAR PathBuffer[1]; + /* Example of distinction between substitute and print names: + mklink /d ldrive c:\ + SubstituteName: c:\\??\ + PrintName: c:\ + */ + } SymbolicLinkReparseBuffer; + struct { + USHORT SubstituteNameOffset; + USHORT SubstituteNameLength; + USHORT PrintNameOffset; + USHORT PrintNameLength; + WCHAR PathBuffer[1]; + } MountPointReparseBuffer; + struct { + UCHAR DataBuffer[1]; + } GenericReparseBuffer; + }; +} REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER; + +#define REPARSE_DATA_BUFFER_HEADER_SIZE \ + FIELD_OFFSET(REPARSE_DATA_BUFFER, GenericReparseBuffer) + +#endif + +#ifndef MAXIMUM_REPARSE_DATA_BUFFER_SIZE +#define MAXIMUM_REPARSE_DATA_BUFFER_SIZE ( 16 * 1024 ) +#endif + +# ifndef FSCTL_GET_REPARSE_POINT +# define FSCTL_GET_REPARSE_POINT 0x900a8 +# endif + +# ifndef IO_REPARSE_TAG_SYMLINK +# define IO_REPARSE_TAG_SYMLINK (0xA000000CL) +# endif + +inline std::wstring wgetenv(const wchar_t* name) +{ + // use vector since for C++03 basic_string is not required to be contiguous + std::vector buf(::GetEnvironmentVariableW(name, NULL, 0)); + + // C++03 vector does not have data() so use &buf[0] + return (buf.empty() + || ::GetEnvironmentVariableW(name, &buf[0], static_cast(buf.size())) == 0) + ? std::wstring() : std::wstring(&buf[0]); +} + +# endif // BOOST_WINDOWS_API + +// BOOST_FILESYSTEM_STATUS_CACHE enables file_status cache in +// dir_itr_increment. The config tests are placed here because some of the +// macros being tested come from dirent.h. +// +// TODO: find out what macros indicate dirent::d_type present in more libraries +# if defined(BOOST_WINDOWS_API)\ + || defined(_DIRENT_HAVE_D_TYPE)// defined by GNU C library if d_type present +# define BOOST_FILESYSTEM_STATUS_CACHE +# endif + +// POSIX/Windows macros ----------------------------------------------------// + +// Portions of the POSIX and Windows API's are very similar, except for name, +// order of arguments, and meaning of zero/non-zero returns. The macros below +// abstract away those differences. They follow Windows naming and order of +// arguments, and return true to indicate no error occurred. [POSIX naming, +// order of arguments, and meaning of return were followed initially, but +// found to be less clear and cause more coding errors.] + +# if defined(BOOST_POSIX_API) + +typedef int err_t; + +// POSIX uses a 0 return to indicate success +# define BOOST_ERRNO errno +# define BOOST_SET_CURRENT_DIRECTORY(P)(::chdir(P)== 0) +# define BOOST_CREATE_DIRECTORY(P)(::mkdir(P, S_IRWXU|S_IRWXG|S_IRWXO)== 0) +# define BOOST_CREATE_HARD_LINK(F,T)(::link(T, F)== 0) +# define BOOST_CREATE_SYMBOLIC_LINK(F,T,Flag)(::symlink(T, F)== 0) +# define BOOST_REMOVE_DIRECTORY(P)(::rmdir(P)== 0) +# define BOOST_DELETE_FILE(P)(::unlink(P)== 0) +# define BOOST_COPY_DIRECTORY(F,T)(!(::stat(from.c_str(), &from_stat)!= 0\ + || ::mkdir(to.c_str(),from_stat.st_mode)!= 0)) +# define BOOST_COPY_FILE(F,T,FailIfExistsBool)copy_file_api(F, T, FailIfExistsBool) +# define BOOST_MOVE_FILE(OLD,NEW)(::rename(OLD, NEW)== 0) +# define BOOST_RESIZE_FILE(P,SZ)(::truncate(P, SZ)== 0) + +# define BOOST_ERROR_NOT_SUPPORTED ENOSYS +# define BOOST_ERROR_ALREADY_EXISTS EEXIST + +# else // BOOST_WINDOWS_API + +typedef DWORD err_t; + +// Windows uses a non-0 return to indicate success +# define BOOST_ERRNO ::GetLastError() +# define BOOST_SET_CURRENT_DIRECTORY(P)(::SetCurrentDirectoryW(P)!= 0) +# define BOOST_CREATE_DIRECTORY(P)(::CreateDirectoryW(P, 0)!= 0) +# define BOOST_CREATE_HARD_LINK(F,T)(create_hard_link_api(F, T, 0)!= 0) +# define BOOST_CREATE_SYMBOLIC_LINK(F,T,Flag)(create_symbolic_link_api(F, T, Flag)!= 0) +# define BOOST_REMOVE_DIRECTORY(P)(::RemoveDirectoryW(P)!= 0) +# define BOOST_DELETE_FILE(P)(::DeleteFileW(P)!= 0) +# define BOOST_COPY_DIRECTORY(F,T)(::CreateDirectoryExW(F, T, 0)!= 0) +# define BOOST_COPY_FILE(F,T,FailIfExistsBool)(::CopyFileW(F, T, FailIfExistsBool)!= 0) +# define BOOST_MOVE_FILE(OLD,NEW)(::MoveFileExW(OLD, NEW, MOVEFILE_REPLACE_EXISTING|MOVEFILE_COPY_ALLOWED)!= 0) +# define BOOST_RESIZE_FILE(P,SZ)(resize_file_api(P, SZ)!= 0) +# define BOOST_READ_SYMLINK(P,T) + +# define BOOST_ERROR_ALREADY_EXISTS ERROR_ALREADY_EXISTS +# define BOOST_ERROR_NOT_SUPPORTED ERROR_NOT_SUPPORTED + +# endif + +//--------------------------------------------------------------------------------------// +// // +// helpers (all operating systems) // +// // +//--------------------------------------------------------------------------------------// + +namespace +{ + + fs::file_type query_file_type(const path& p, error_code* ec); + + boost::filesystem::directory_iterator end_dir_itr; + + // error handling helpers ----------------------------------------------------------// + + bool error(err_t error_num, error_code* ec, const string& message); + bool error(err_t error_num, const path& p, error_code* ec, const string& message); + bool error(err_t error_num, const path& p1, const path& p2, error_code* ec, + const string& message); + + const error_code ok; + + // error_num is value of errno on POSIX, error code (from ::GetLastError()) on Windows. + // Interface changed 30 Jan 15 to have caller supply error_num as ::SetLastError() + // values were apparently getting cleared before they could be retrieved by error(). + + bool error(err_t error_num, error_code* ec, const string& message) + { + if (!error_num) + { + if (ec != 0) ec->clear(); + } + else + { // error + if (ec == 0) + BOOST_FILESYSTEM_THROW(filesystem_error(message, + error_code(error_num, system_category()))); + else + ec->assign(error_num, system_category()); + } + return error_num != 0; + } + + bool error(err_t error_num, const path& p, error_code* ec, const string& message) + { + if (!error_num) + { + if (ec != 0) ec->clear(); + } + else + { // error + if (ec == 0) + BOOST_FILESYSTEM_THROW(filesystem_error(message, + p, error_code(error_num, system_category()))); + else + ec->assign(error_num, system_category()); + } + return error_num != 0; + } + + bool error(err_t error_num, const path& p1, const path& p2, error_code* ec, + const string& message) + { + if (!error_num) + { + if (ec != 0) ec->clear(); + } + else + { // error + if (ec == 0) + BOOST_FILESYSTEM_THROW(filesystem_error(message, + p1, p2, error_code(error_num, system_category()))); + else + ec->assign(error_num, system_category()); + } + return error_num != 0; + } + + // general helpers -----------------------------------------------------------------// + + bool is_empty_directory(const path& p) + { + return fs::directory_iterator(p)== end_dir_itr; + } + + bool remove_directory(const path& p) // true if succeeds + { return BOOST_REMOVE_DIRECTORY(p.c_str()); } + + bool remove_file(const path& p) // true if succeeds + { return BOOST_DELETE_FILE(p.c_str()); } + + // called by remove and remove_all_aux + bool remove_file_or_directory(const path& p, fs::file_type type, error_code* ec) + // return true if file removed, false if not removed + { + if (type == fs::file_not_found) + { + if (ec != 0) ec->clear(); + return false; + } + + if (type == fs::directory_file +# ifdef BOOST_WINDOWS_API + || type == fs::_detail_directory_symlink +# endif + ) + { + if (error(!remove_directory(p) ? BOOST_ERRNO : 0, p, ec, + "boost::filesystem::remove")) + return false; + } + else + { + if (error(!remove_file(p) ? BOOST_ERRNO : 0, p, ec, + "boost::filesystem::remove")) + return false; + } + return true; + } + + boost::uintmax_t remove_all_aux(const path& p, fs::file_type type, + error_code* ec) + { + boost::uintmax_t count = 1; + + if (type == fs::directory_file) // but not a directory symlink + { + for (fs::directory_iterator itr(p); + itr != end_dir_itr; ++itr) + { + fs::file_type tmp_type = query_file_type(itr->path(), ec); + if (ec != 0 && *ec) + return count; + count += remove_all_aux(itr->path(), tmp_type, ec); + } + } + remove_file_or_directory(p, type, ec); + return count; + } + +#ifdef BOOST_POSIX_API + +//--------------------------------------------------------------------------------------// +// // +// POSIX-specific helpers // +// // +//--------------------------------------------------------------------------------------// + + const char dot = '.'; + + bool not_found_error(int errval) + { + return errno == ENOENT || errno == ENOTDIR; + } + + bool // true if ok + copy_file_api(const std::string& from_p, + const std::string& to_p, bool fail_if_exists) + { + const std::size_t buf_sz = 32768; + boost::scoped_array buf(new char [buf_sz]); + int infile=-1, outfile=-1; // -1 means not open + + // bug fixed: code previously did a stat()on the from_file first, but that + // introduced a gratuitous race condition; the stat()is now done after the open() + + if ((infile = ::open(from_p.c_str(), O_RDONLY))< 0) + { return false; } + + struct stat from_stat; + if (::stat(from_p.c_str(), &from_stat)!= 0) + { + ::close(infile); + return false; + } + + int oflag = O_CREAT | O_WRONLY | O_TRUNC; + if (fail_if_exists) + oflag |= O_EXCL; + if ((outfile = ::open(to_p.c_str(), oflag, from_stat.st_mode))< 0) + { + int open_errno = errno; + BOOST_ASSERT(infile >= 0); + ::close(infile); + errno = open_errno; + return false; + } + + ssize_t sz, sz_read=1, sz_write; + while (sz_read > 0 + && (sz_read = ::read(infile, buf.get(), buf_sz)) > 0) + { + // Allow for partial writes - see Advanced Unix Programming (2nd Ed.), + // Marc Rochkind, Addison-Wesley, 2004, page 94 + sz_write = 0; + do + { + BOOST_ASSERT(sz_read - sz_write > 0); // #1 + // ticket 4438 claimed possible infinite loop if write returns 0. My analysis + // is that POSIX specifies 0 return only if 3rd arg is 0, and that will never + // happen due to loop entry and coninuation conditions. BOOST_ASSERT #1 above + // and #2 below added to verify that analysis. + if ((sz = ::write(outfile, buf.get() + sz_write, + sz_read - sz_write)) < 0) + { + sz_read = sz; // cause read loop termination + break; // and error reported after closes + } + BOOST_ASSERT(sz > 0); // #2 + sz_write += sz; + } while (sz_write < sz_read); + } + + if (::close(infile)< 0) + sz_read = -1; + if (::close(outfile)< 0) + sz_read = -1; + + return sz_read >= 0; + } + + inline fs::file_type query_file_type(const path& p, error_code* ec) + { + return fs::detail::symlink_status(p, ec).type(); + } + +# else + +//--------------------------------------------------------------------------------------// +// // +// Windows-specific helpers // +// // +//--------------------------------------------------------------------------------------// + + const std::size_t buf_size=128; + + const wchar_t dot = L'.'; + + bool not_found_error(int errval) + { + return errval == ERROR_FILE_NOT_FOUND + || errval == ERROR_PATH_NOT_FOUND + || errval == ERROR_INVALID_NAME // "tools/jam/src/:sys:stat.h", "//foo" + || errval == ERROR_INVALID_DRIVE // USB card reader with no card inserted + || errval == ERROR_NOT_READY // CD/DVD drive with no disc inserted + || errval == ERROR_INVALID_PARAMETER // ":sys:stat.h" + || errval == ERROR_BAD_PATHNAME // "//nosuch" on Win64 + || errval == ERROR_BAD_NETPATH; // "//nosuch" on Win32 + } + +// some distributions of mingw as early as GLIBCXX__ 20110325 have _stricmp, but the +// offical 4.6.2 release with __GLIBCXX__ 20111026 doesn't. Play it safe for now, and +// only use _stricmp if _MSC_VER is defined +#if defined(_MSC_VER) // || (defined(__GLIBCXX__) && __GLIBCXX__ >= 20110325) +# define BOOST_FILESYSTEM_STRICMP _stricmp +#else +# define BOOST_FILESYSTEM_STRICMP strcmp +#endif + + perms make_permissions(const path& p, DWORD attr) + { + perms prms = fs::owner_read | fs::group_read | fs::others_read; + if ((attr & FILE_ATTRIBUTE_READONLY) == 0) + prms |= fs::owner_write | fs::group_write | fs::others_write; + if (BOOST_FILESYSTEM_STRICMP(p.extension().string().c_str(), ".exe") == 0 + || BOOST_FILESYSTEM_STRICMP(p.extension().string().c_str(), ".com") == 0 + || BOOST_FILESYSTEM_STRICMP(p.extension().string().c_str(), ".bat") == 0 + || BOOST_FILESYSTEM_STRICMP(p.extension().string().c_str(), ".cmd") == 0) + prms |= fs::owner_exe | fs::group_exe | fs::others_exe; + return prms; + } + + // these constants come from inspecting some Microsoft sample code + std::time_t to_time_t(const FILETIME & ft) + { + __int64 t = (static_cast<__int64>(ft.dwHighDateTime)<< 32) + + ft.dwLowDateTime; +# if !defined(BOOST_MSVC) || BOOST_MSVC > 1300 // > VC++ 7.0 + t -= 116444736000000000LL; +# else + t -= 116444736000000000; +# endif + t /= 10000000; + return static_cast(t); + } + + void to_FILETIME(std::time_t t, FILETIME & ft) + { + __int64 temp = t; + temp *= 10000000; +# if !defined(BOOST_MSVC) || BOOST_MSVC > 1300 // > VC++ 7.0 + temp += 116444736000000000LL; +# else + temp += 116444736000000000; +# endif + ft.dwLowDateTime = static_cast(temp); + ft.dwHighDateTime = static_cast(temp >> 32); + } + + // Thanks to Jeremy Maitin-Shepard for much help and for permission to + // base the equivalent()implementation on portions of his + // file-equivalence-win32.cpp experimental code. + + struct handle_wrapper + { + HANDLE handle; + handle_wrapper(HANDLE h) + : handle(h){} + ~handle_wrapper() + { + if (handle != INVALID_HANDLE_VALUE) + ::CloseHandle(handle); + } + }; + + HANDLE create_file_handle(const path& p, DWORD dwDesiredAccess, + DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, + DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, + HANDLE hTemplateFile) + { + return ::CreateFileW(p.c_str(), dwDesiredAccess, dwShareMode, + lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, + hTemplateFile); + } + + bool is_reparse_point_a_symlink(const path& p) + { + handle_wrapper h(create_file_handle(p, FILE_READ_EA, + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, NULL)); + if (h.handle == INVALID_HANDLE_VALUE) + return false; + + boost::scoped_array buf(new char [MAXIMUM_REPARSE_DATA_BUFFER_SIZE]); + + // Query the reparse data + DWORD dwRetLen; + BOOL result = ::DeviceIoControl(h.handle, FSCTL_GET_REPARSE_POINT, NULL, 0, buf.get(), + MAXIMUM_REPARSE_DATA_BUFFER_SIZE, &dwRetLen, NULL); + if (!result) return false; + + return reinterpret_cast(buf.get())->ReparseTag + == IO_REPARSE_TAG_SYMLINK + // Issue 9016 asked that NTFS directory junctions be recognized as directories. + // That is equivalent to recognizing them as symlinks, and then the normal symlink + // mechanism will take care of recognizing them as directories. + // + // Directory junctions are very similar to symlinks, but have some performance + // and other advantages over symlinks. They can be created from the command line + // with "mklink /j junction-name target-path". + || reinterpret_cast(buf.get())->ReparseTag + == IO_REPARSE_TAG_MOUNT_POINT; // aka "directory junction" or "junction" + } + + inline std::size_t get_full_path_name( + const path& src, std::size_t len, wchar_t* buf, wchar_t** p) + { + return static_cast( + ::GetFullPathNameW(src.c_str(), static_cast(len), buf, p)); + } + + fs::file_status process_status_failure(const path& p, error_code* ec) + { + int errval(::GetLastError()); + if (ec != 0) // always report errval, even though some + ec->assign(errval, system_category()); // errval values are not status_errors + + if (not_found_error(errval)) + { + return fs::file_status(fs::file_not_found, fs::no_perms); + } + else if ((errval == ERROR_SHARING_VIOLATION)) + { + return fs::file_status(fs::type_unknown); + } + if (ec == 0) + BOOST_FILESYSTEM_THROW(filesystem_error("boost::filesystem::status", + p, error_code(errval, system_category()))); + return fs::file_status(fs::status_error); + } + + // differs from symlink_status() in that directory symlinks are reported as + // _detail_directory_symlink, as required on Windows by remove() and its helpers. + fs::file_type query_file_type(const path& p, error_code* ec) + { + DWORD attr(::GetFileAttributesW(p.c_str())); + if (attr == 0xFFFFFFFF) + { + return process_status_failure(p, ec).type(); + } + + if (ec != 0) ec->clear(); + + if (attr & FILE_ATTRIBUTE_REPARSE_POINT) + { + if (is_reparse_point_a_symlink(p)) + return (attr & FILE_ATTRIBUTE_DIRECTORY) + ? fs::_detail_directory_symlink + : fs::symlink_file; + return fs::reparse_file; + } + + return (attr & FILE_ATTRIBUTE_DIRECTORY) + ? fs::directory_file + : fs::regular_file; + } + + BOOL resize_file_api(const wchar_t* p, boost::uintmax_t size) + { + handle_wrapper h(CreateFileW(p, GENERIC_WRITE, 0, 0, OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, 0)); + LARGE_INTEGER sz; + sz.QuadPart = size; + return h.handle != INVALID_HANDLE_VALUE + && ::SetFilePointerEx(h.handle, sz, 0, FILE_BEGIN) + && ::SetEndOfFile(h.handle); + } + + // Windows kernel32.dll functions that may or may not be present + // must be accessed through pointers + + typedef BOOL (WINAPI *PtrCreateHardLinkW)( + /*__in*/ LPCWSTR lpFileName, + /*__in*/ LPCWSTR lpExistingFileName, + /*__reserved*/ LPSECURITY_ATTRIBUTES lpSecurityAttributes + ); + + PtrCreateHardLinkW create_hard_link_api = PtrCreateHardLinkW( + ::GetProcAddress( + ::GetModuleHandle(TEXT("kernel32.dll")), "CreateHardLinkW")); + + typedef BOOLEAN (WINAPI *PtrCreateSymbolicLinkW)( + /*__in*/ LPCWSTR lpSymlinkFileName, + /*__in*/ LPCWSTR lpTargetFileName, + /*__in*/ DWORD dwFlags + ); + + PtrCreateSymbolicLinkW create_symbolic_link_api = PtrCreateSymbolicLinkW( + ::GetProcAddress( + ::GetModuleHandle(TEXT("kernel32.dll")), "CreateSymbolicLinkW")); + +#endif + +//#ifdef BOOST_WINDOWS_API +// +// +// inline bool get_free_disk_space(const std::wstring& ph, +// PULARGE_INTEGER avail, PULARGE_INTEGER total, PULARGE_INTEGER free) +// { return ::GetDiskFreeSpaceExW(ph.c_str(), avail, total, free)!= 0; } +// +//#endif + +} // unnamed namespace + +//--------------------------------------------------------------------------------------// +// // +// operations functions declared in operations.hpp // +// in alphabetic order // +// // +//--------------------------------------------------------------------------------------// + +namespace boost +{ +namespace filesystem +{ + + BOOST_FILESYSTEM_DECL + path absolute(const path& p, const path& base) + { +// if ( p.empty() || p.is_absolute() ) +// return p; +// // recursively calling absolute is sub-optimal, but is simple +// path abs_base(base.is_absolute() ? base : absolute(base)); +//# ifdef BOOST_WINDOWS_API +// if (p.has_root_directory()) +// return abs_base.root_name() / p; +// // !p.has_root_directory +// if (p.has_root_name()) +// return p.root_name() +// / abs_base.root_directory() / abs_base.relative_path() / p.relative_path(); +// // !p.has_root_name() +//# endif +// return abs_base / p; + + // recursively calling absolute is sub-optimal, but is sure and simple + path abs_base(base.is_absolute() ? base : absolute(base)); + + // store expensive to compute values that are needed multiple times + path p_root_name (p.root_name()); + path base_root_name (abs_base.root_name()); + path p_root_directory (p.root_directory()); + + if (p.empty()) + return abs_base; + + if (!p_root_name.empty()) // p.has_root_name() + { + if (p_root_directory.empty()) // !p.has_root_directory() + return p_root_name / abs_base.root_directory() + / abs_base.relative_path() / p.relative_path(); + // p is absolute, so fall through to return p at end of block + } + + else if (!p_root_directory.empty()) // p.has_root_directory() + { +# ifdef BOOST_POSIX_API + // POSIX can have root name it it is a network path + if (base_root_name.empty()) // !abs_base.has_root_name() + return p; +# endif + return base_root_name / p; + } + + else + { + return abs_base / p; + } + + return p; // p.is_absolute() is true + } + +namespace detail +{ + BOOST_FILESYSTEM_DECL bool possible_large_file_size_support() + { +# ifdef BOOST_POSIX_API + struct stat lcl_stat; + return sizeof(lcl_stat.st_size)> 4; +# else + return true; +# endif + } + + BOOST_FILESYSTEM_DECL + path canonical(const path& p, const path& base, system::error_code* ec) + { + path source (p.is_absolute() ? p : absolute(p, base)); + path root(source.root_path()); + path result; + + system::error_code local_ec; + file_status stat (status(source, local_ec)); + + if (stat.type() == fs::file_not_found) + { + if (ec == 0) + BOOST_FILESYSTEM_THROW(filesystem_error( + "boost::filesystem::canonical", source, + error_code(system::errc::no_such_file_or_directory, system::generic_category()))); + ec->assign(system::errc::no_such_file_or_directory, system::generic_category()); + return result; + } + else if (local_ec) + { + if (ec == 0) + BOOST_FILESYSTEM_THROW(filesystem_error( + "boost::filesystem::canonical", source, local_ec)); + *ec = local_ec; + return result; + } + + bool scan (true); + while (scan) + { + scan = false; + result.clear(); + for (path::iterator itr = source.begin(); itr != source.end(); ++itr) + { + if (*itr == dot_path()) + continue; + if (*itr == dot_dot_path()) + { + if (result != root) + result.remove_filename(); + continue; + } + + result /= *itr; + + bool is_sym (is_symlink(detail::symlink_status(result, ec))); + if (ec && *ec) + return path(); + + if (is_sym) + { + path link(detail::read_symlink(result, ec)); + if (ec && *ec) + return path(); + result.remove_filename(); + + if (link.is_absolute()) + { + for (++itr; itr != source.end(); ++itr) + link /= *itr; + source = link; + } + else // link is relative + { + path new_source(result); + new_source /= link; + for (++itr; itr != source.end(); ++itr) + new_source /= *itr; + source = new_source; + } + scan = true; // symlink causes scan to be restarted + break; + } + } + } + if (ec != 0) + ec->clear(); + BOOST_ASSERT_MSG(result.is_absolute(), "canonical() implementation error; please report"); + return result; + } + + BOOST_FILESYSTEM_DECL + void copy(const path& from, const path& to, system::error_code* ec) + { + file_status s(symlink_status(from, *ec)); + if (ec != 0 && *ec) return; + + if(is_symlink(s)) + { + copy_symlink(from, to, *ec); + } + else if(is_directory(s)) + { + copy_directory(from, to, *ec); + } + else if(is_regular_file(s)) + { + copy_file(from, to, fs::copy_option::fail_if_exists, *ec); + } + else + { + if (ec == 0) + BOOST_FILESYSTEM_THROW(filesystem_error("boost::filesystem::copy", + from, to, error_code(BOOST_ERROR_NOT_SUPPORTED, system_category()))); + ec->assign(BOOST_ERROR_NOT_SUPPORTED, system_category()); + } + } + + BOOST_FILESYSTEM_DECL + void copy_directory(const path& from, const path& to, system::error_code* ec) + { +# ifdef BOOST_POSIX_API + struct stat from_stat; +# endif + error(!BOOST_COPY_DIRECTORY(from.c_str(), to.c_str()) ? BOOST_ERRNO : 0, + from, to, ec, "boost::filesystem::copy_directory"); + } + + BOOST_FILESYSTEM_DECL + void copy_file(const path& from, const path& to, copy_option option, error_code* ec) + { + error(!BOOST_COPY_FILE(from.c_str(), to.c_str(), + option == fail_if_exists) ? BOOST_ERRNO : 0, + from, to, ec, "boost::filesystem::copy_file"); + } + + BOOST_FILESYSTEM_DECL + void copy_symlink(const path& existing_symlink, const path& new_symlink, + system::error_code* ec) + { +# if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0600 + error(BOOST_ERROR_NOT_SUPPORTED, new_symlink, existing_symlink, ec, + "boost::filesystem::copy_symlink"); + +# else // modern Windows or BOOST_POSIX_API + path p(read_symlink(existing_symlink, ec)); + if (ec != 0 && *ec) return; + create_symlink(p, new_symlink, ec); + +# endif + } + + BOOST_FILESYSTEM_DECL + bool create_directories(const path& p, system::error_code* ec) + { + error_code local_ec; + file_status p_status = status(p, local_ec); + + if (p_status.type() == directory_file) + { + if (ec != 0) + ec->clear(); + return false; + } + + path parent = p.parent_path(); + BOOST_ASSERT_MSG(parent != p, "internal error: p == p.parent_path()"); + if (!parent.empty()) + { + // determine if the parent exists + file_status parent_status = status(parent, local_ec); + + // if the parent does not exist, create the parent + if (parent_status.type() == file_not_found) + { + create_directories(parent, local_ec); + if (local_ec) + { + if (ec == 0) + BOOST_FILESYSTEM_THROW(filesystem_error( + "boost::filesystem::create_directories", parent, local_ec)); + else + *ec = local_ec; + return false; + } + } + } + + // create the directory + return create_directory(p, ec); + } + + BOOST_FILESYSTEM_DECL + bool create_directory(const path& p, error_code* ec) + { + if (BOOST_CREATE_DIRECTORY(p.c_str())) + { + if (ec != 0) + ec->clear(); + return true; + } + + // attempt to create directory failed + int errval(BOOST_ERRNO); // save reason for failure + error_code dummy; + if (errval == BOOST_ERROR_ALREADY_EXISTS && is_directory(p, dummy)) + { + if (ec != 0) + ec->clear(); + return false; + } + + // attempt to create directory failed && it doesn't already exist + if (ec == 0) + BOOST_FILESYSTEM_THROW(filesystem_error("boost::filesystem::create_directory", + p, error_code(errval, system_category()))); + else + ec->assign(errval, system_category()); + return false; + } + + BOOST_FILESYSTEM_DECL + void create_directory_symlink(const path& to, const path& from, + system::error_code* ec) + { +# if defined(BOOST_WINDOWS_API) && _WIN32_WINNT < 0x0600 // SDK earlier than Vista and Server 2008 + + error(BOOST_ERROR_NOT_SUPPORTED, to, from, ec, + "boost::filesystem::create_directory_symlink"); +# else + +# if defined(BOOST_WINDOWS_API) && _WIN32_WINNT >= 0x0600 + // see if actually supported by Windows runtime dll + if (error(!create_symbolic_link_api ? BOOST_ERROR_NOT_SUPPORTED : 0, to, from, ec, + "boost::filesystem::create_directory_symlink")) + return; +# endif + + error(!BOOST_CREATE_SYMBOLIC_LINK(from.c_str(), to.c_str(), + SYMBOLIC_LINK_FLAG_DIRECTORY) ? BOOST_ERRNO : 0, + to, from, ec, "boost::filesystem::create_directory_symlink"); +# endif + } + + BOOST_FILESYSTEM_DECL + void create_hard_link(const path& to, const path& from, error_code* ec) + { + +# if defined(BOOST_WINDOWS_API) && _WIN32_WINNT < 0x0500 // SDK earlier than Win 2K + + error(BOOST_ERROR_NOT_SUPPORTED, to, from, ec, + "boost::filesystem::create_hard_link"); +# else + +# if defined(BOOST_WINDOWS_API) && _WIN32_WINNT >= 0x0500 + // see if actually supported by Windows runtime dll + if (error(!create_hard_link_api ? BOOST_ERROR_NOT_SUPPORTED : 0, to, from, ec, + "boost::filesystem::create_hard_link")) + return; +# endif + + error(!BOOST_CREATE_HARD_LINK(from.c_str(), to.c_str()) ? BOOST_ERRNO : 0, to, from, ec, + "boost::filesystem::create_hard_link"); +# endif + } + + BOOST_FILESYSTEM_DECL + void create_symlink(const path& to, const path& from, error_code* ec) + { +# if defined(BOOST_WINDOWS_API) && _WIN32_WINNT < 0x0600 // SDK earlier than Vista and Server 2008 + error(BOOST_ERROR_NOT_SUPPORTED, to, from, ec, + "boost::filesystem::create_directory_symlink"); +# else + +# if defined(BOOST_WINDOWS_API) && _WIN32_WINNT >= 0x0600 + // see if actually supported by Windows runtime dll + if (error(!create_symbolic_link_api ? BOOST_ERROR_NOT_SUPPORTED : 0, to, from, ec, + "boost::filesystem::create_symlink")) + return; +# endif + + error(!BOOST_CREATE_SYMBOLIC_LINK(from.c_str(), to.c_str(), 0) ? BOOST_ERRNO : 0, + to, from, ec, "boost::filesystem::create_symlink"); +# endif + } + + BOOST_FILESYSTEM_DECL + path current_path(error_code* ec) + { +# ifdef BOOST_POSIX_API + path cur; + for (long path_max = 128;; path_max *=2)// loop 'til buffer large enough + { + boost::scoped_array + buf(new char[static_cast(path_max)]); + if (::getcwd(buf.get(), static_cast(path_max))== 0) + { + if (error(errno != ERANGE ? errno : 0 + // bug in some versions of the Metrowerks C lib on the Mac: wrong errno set +# if defined(__MSL__) && (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) + && errno != 0 +# endif + , ec, "boost::filesystem::current_path")) + { + break; + } + } + else + { + cur = buf.get(); + if (ec != 0) ec->clear(); + break; + } + } + return cur; + +# else + DWORD sz; + if ((sz = ::GetCurrentDirectoryW(0, NULL)) == 0)sz = 1; + boost::scoped_array buf(new path::value_type[sz]); + error(::GetCurrentDirectoryW(sz, buf.get()) == 0 ? BOOST_ERRNO : 0, ec, + "boost::filesystem::current_path"); + return path(buf.get()); +# endif + } + + + BOOST_FILESYSTEM_DECL + void current_path(const path& p, system::error_code* ec) + { + error(!BOOST_SET_CURRENT_DIRECTORY(p.c_str()) ? BOOST_ERRNO : 0, + p, ec, "boost::filesystem::current_path"); + } + + BOOST_FILESYSTEM_DECL + bool equivalent(const path& p1, const path& p2, system::error_code* ec) + { +# ifdef BOOST_POSIX_API + struct stat s2; + int e2(::stat(p2.c_str(), &s2)); + struct stat s1; + int e1(::stat(p1.c_str(), &s1)); + + if (e1 != 0 || e2 != 0) + { + // if one is invalid and the other isn't then they aren't equivalent, + // but if both are invalid then it is an error + error (e1 != 0 && e2 != 0, p1, p2, ec, "boost::filesystem::equivalent"); + return false; + } + + // both stats now known to be valid + return s1.st_dev == s2.st_dev && s1.st_ino == s2.st_ino + // According to the POSIX stat specs, "The st_ino and st_dev fields + // taken together uniquely identify the file within the system." + // Just to be sure, size and mod time are also checked. + && s1.st_size == s2.st_size && s1.st_mtime == s2.st_mtime; + +# else // Windows + + // Note well: Physical location on external media is part of the + // equivalence criteria. If there are no open handles, physical location + // can change due to defragmentation or other relocations. Thus handles + // must be held open until location information for both paths has + // been retrieved. + + // p2 is done first, so any error reported is for p1 + handle_wrapper h2( + create_file_handle( + p2.c_str(), + 0, + FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, + 0, + OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS, + 0)); + + handle_wrapper h1( + create_file_handle( + p1.c_str(), + 0, + FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, + 0, + OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS, + 0)); + + if (h1.handle == INVALID_HANDLE_VALUE + || h2.handle == INVALID_HANDLE_VALUE) + { + // if one is invalid and the other isn't, then they aren't equivalent, + // but if both are invalid then it is an error + error((h1.handle == INVALID_HANDLE_VALUE + && h2.handle == INVALID_HANDLE_VALUE) ? BOOST_ERROR_NOT_SUPPORTED : 0, p1, p2, ec, + "boost::filesystem::equivalent"); + return false; + } + + // at this point, both handles are known to be valid + + BY_HANDLE_FILE_INFORMATION info1, info2; + + if (error(!::GetFileInformationByHandle(h1.handle, &info1) ? BOOST_ERRNO : 0, + p1, p2, ec, "boost::filesystem::equivalent")) + return false; + + if (error(!::GetFileInformationByHandle(h2.handle, &info2) ? BOOST_ERRNO : 0, + p1, p2, ec, "boost::filesystem::equivalent")) + return false; + + // In theory, volume serial numbers are sufficient to distinguish between + // devices, but in practice VSN's are sometimes duplicated, so last write + // time and file size are also checked. + return + info1.dwVolumeSerialNumber == info2.dwVolumeSerialNumber + && info1.nFileIndexHigh == info2.nFileIndexHigh + && info1.nFileIndexLow == info2.nFileIndexLow + && info1.nFileSizeHigh == info2.nFileSizeHigh + && info1.nFileSizeLow == info2.nFileSizeLow + && info1.ftLastWriteTime.dwLowDateTime + == info2.ftLastWriteTime.dwLowDateTime + && info1.ftLastWriteTime.dwHighDateTime + == info2.ftLastWriteTime.dwHighDateTime; + +# endif + } + + BOOST_FILESYSTEM_DECL + boost::uintmax_t file_size(const path& p, error_code* ec) + { +# ifdef BOOST_POSIX_API + + struct stat path_stat; + if (error(::stat(p.c_str(), &path_stat)!= 0 ? BOOST_ERRNO : 0, + p, ec, "boost::filesystem::file_size")) + return static_cast(-1); + if (error(!S_ISREG(path_stat.st_mode) ? EPERM : 0, + p, ec, "boost::filesystem::file_size")) + return static_cast(-1); + + return static_cast(path_stat.st_size); + +# else // Windows + + // assume uintmax_t is 64-bits on all Windows compilers + + WIN32_FILE_ATTRIBUTE_DATA fad; + + if (error(::GetFileAttributesExW(p.c_str(), ::GetFileExInfoStandard, &fad)== 0 + ? BOOST_ERRNO : 0, p, ec, "boost::filesystem::file_size")) + return static_cast(-1); + + if (error((fad.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)!= 0 + ? ERROR_NOT_SUPPORTED : 0, p, ec, "boost::filesystem::file_size")) + return static_cast(-1); + + return (static_cast(fad.nFileSizeHigh) + << (sizeof(fad.nFileSizeLow)*8)) + fad.nFileSizeLow; +# endif + } + + BOOST_FILESYSTEM_DECL + boost::uintmax_t hard_link_count(const path& p, system::error_code* ec) + { +# ifdef BOOST_POSIX_API + + struct stat path_stat; + return error(::stat(p.c_str(), &path_stat)!= 0 ? BOOST_ERRNO : 0, + p, ec, "boost::filesystem::hard_link_count") + ? 0 + : static_cast(path_stat.st_nlink); + +# else // Windows + + // Link count info is only available through GetFileInformationByHandle + BY_HANDLE_FILE_INFORMATION info; + handle_wrapper h( + create_file_handle(p.c_str(), 0, + FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, 0, + OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0)); + return + !error(h.handle == INVALID_HANDLE_VALUE ? BOOST_ERRNO : 0, + p, ec, "boost::filesystem::hard_link_count") + && !error(::GetFileInformationByHandle(h.handle, &info)== 0 ? BOOST_ERRNO : 0, + p, ec, "boost::filesystem::hard_link_count") + ? info.nNumberOfLinks + : 0; +# endif + } + + BOOST_FILESYSTEM_DECL + path initial_path(error_code* ec) + { + static path init_path; + if (init_path.empty()) + init_path = current_path(ec); + else if (ec != 0) ec->clear(); + return init_path; + } + + BOOST_FILESYSTEM_DECL + bool is_empty(const path& p, system::error_code* ec) + { +# ifdef BOOST_POSIX_API + + struct stat path_stat; + if (error(::stat(p.c_str(), &path_stat)!= 0, + p, ec, "boost::filesystem::is_empty")) + return false; + return S_ISDIR(path_stat.st_mode) + ? is_empty_directory(p) + : path_stat.st_size == 0; +# else + + WIN32_FILE_ATTRIBUTE_DATA fad; + if (error(::GetFileAttributesExW(p.c_str(), ::GetFileExInfoStandard, &fad)== 0 + ? BOOST_ERRNO : 0, p, ec, "boost::filesystem::is_empty")) + return false; + + if (ec != 0) ec->clear(); + return + (fad.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + ? is_empty_directory(p) + : (!fad.nFileSizeHigh && !fad.nFileSizeLow); +# endif + } + + BOOST_FILESYSTEM_DECL + std::time_t last_write_time(const path& p, system::error_code* ec) + { +# ifdef BOOST_POSIX_API + + struct stat path_stat; + if (error(::stat(p.c_str(), &path_stat)!= 0 ? BOOST_ERRNO : 0, + p, ec, "boost::filesystem::last_write_time")) + return std::time_t(-1); + return path_stat.st_mtime; + +# else + + handle_wrapper hw( + create_file_handle(p.c_str(), 0, + FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, 0, + OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0)); + + if (error(hw.handle == INVALID_HANDLE_VALUE ? BOOST_ERRNO : 0, + p, ec, "boost::filesystem::last_write_time")) + return std::time_t(-1); + + FILETIME lwt; + + if (error(::GetFileTime(hw.handle, 0, 0, &lwt)== 0 ? BOOST_ERRNO : 0, + p, ec, "boost::filesystem::last_write_time")) + return std::time_t(-1); + + return to_time_t(lwt); +# endif + } + + BOOST_FILESYSTEM_DECL + void last_write_time(const path& p, const std::time_t new_time, + system::error_code* ec) + { +# ifdef BOOST_POSIX_API + + struct stat path_stat; + if (error(::stat(p.c_str(), &path_stat)!= 0, + p, ec, "boost::filesystem::last_write_time")) + return; + ::utimbuf buf; + buf.actime = path_stat.st_atime; // utime()updates access time too:-( + buf.modtime = new_time; + error(::utime(p.c_str(), &buf)!= 0 ? BOOST_ERRNO : 0, + p, ec, "boost::filesystem::last_write_time"); + +# else + + handle_wrapper hw( + create_file_handle(p.c_str(), FILE_WRITE_ATTRIBUTES, + FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, 0, + OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0)); + + if (error(hw.handle == INVALID_HANDLE_VALUE ? BOOST_ERRNO : 0, + p, ec, "boost::filesystem::last_write_time")) + return; + + FILETIME lwt; + to_FILETIME(new_time, lwt); + + error(::SetFileTime(hw.handle, 0, 0, &lwt)== 0 ? BOOST_ERRNO : 0, + p, ec, "boost::filesystem::last_write_time"); +# endif + } + +# ifdef BOOST_POSIX_API + const perms active_bits(all_all | set_uid_on_exe | set_gid_on_exe | sticky_bit); + inline mode_t mode_cast(perms prms) { return prms & active_bits; } +# endif + + BOOST_FILESYSTEM_DECL + void permissions(const path& p, perms prms, system::error_code* ec) + { + BOOST_ASSERT_MSG(!((prms & add_perms) && (prms & remove_perms)), + "add_perms and remove_perms are mutually exclusive"); + + if ((prms & add_perms) && (prms & remove_perms)) // precondition failed + return; + +# ifdef BOOST_POSIX_API + error_code local_ec; + file_status current_status((prms & symlink_perms) + ? fs::symlink_status(p, local_ec) + : fs::status(p, local_ec)); + if (local_ec) + { + if (ec == 0) + BOOST_FILESYSTEM_THROW(filesystem_error( + "boost::filesystem::permissions", p, local_ec)); + else + *ec = local_ec; + return; + } + + if (prms & add_perms) + prms |= current_status.permissions(); + else if (prms & remove_perms) + prms = current_status.permissions() & ~prms; + + // Mac OS X Lion and some other platforms don't support fchmodat(). + // Solaris (SunPro and gcc) only support fchmodat() on Solaris 11 and higher, + // and a runtime check is too much trouble. + // Linux does not support permissions on symbolic links and has no plans to + // support them in the future. The chmod() code is thus more practical, + // rather than always hitting ENOTSUP when sending in AT_SYMLINK_NO_FOLLOW. + // - See the 3rd paragraph of + // "Symbolic link ownership, permissions, and timestamps" at: + // "http://man7.org/linux/man-pages/man7/symlink.7.html" + // - See the fchmodat() Linux man page: + // "http://man7.org/linux/man-pages/man2/fchmodat.2.html" +# if defined(AT_FDCWD) && defined(AT_SYMLINK_NOFOLLOW) \ + && !(defined(__SUNPRO_CC) || defined(__sun) || defined(sun)) \ + && !(defined(linux) || defined(__linux) || defined(__linux__)) + if (::fchmodat(AT_FDCWD, p.c_str(), mode_cast(prms), + !(prms & symlink_perms) ? 0 : AT_SYMLINK_NOFOLLOW)) +# else // fallback if fchmodat() not supported + if (::chmod(p.c_str(), mode_cast(prms))) +# endif + { + if (ec == 0) + BOOST_FILESYSTEM_THROW(filesystem_error( + "boost::filesystem::permissions", p, + error_code(errno, system::generic_category()))); + else + ec->assign(errno, system::generic_category()); + } + +# else // Windows + + // if not going to alter FILE_ATTRIBUTE_READONLY, just return + if (!(!((prms & (add_perms | remove_perms))) + || (prms & (owner_write|group_write|others_write)))) + return; + + DWORD attr = ::GetFileAttributesW(p.c_str()); + + if (error(attr == 0 ? BOOST_ERRNO : 0, p, ec, "boost::filesystem::permissions")) + return; + + if (prms & add_perms) + attr &= ~FILE_ATTRIBUTE_READONLY; + else if (prms & remove_perms) + attr |= FILE_ATTRIBUTE_READONLY; + else if (prms & (owner_write|group_write|others_write)) + attr &= ~FILE_ATTRIBUTE_READONLY; + else + attr |= FILE_ATTRIBUTE_READONLY; + + error(::SetFileAttributesW(p.c_str(), attr) == 0 ? BOOST_ERRNO : 0, + p, ec, "boost::filesystem::permissions"); +# endif + } + + BOOST_FILESYSTEM_DECL + path read_symlink(const path& p, system::error_code* ec) + { + path symlink_path; + +# ifdef BOOST_POSIX_API + + for (std::size_t path_max = 64;; path_max *= 2)// loop 'til buffer large enough + { + boost::scoped_array buf(new char[path_max]); + ssize_t result; + if ((result=::readlink(p.c_str(), buf.get(), path_max))== -1) + { + if (ec == 0) + BOOST_FILESYSTEM_THROW(filesystem_error("boost::filesystem::read_symlink", + p, error_code(errno, system_category()))); + else ec->assign(errno, system_category()); + break; + } + else + { + if(result != static_cast(path_max)) + { + symlink_path.assign(buf.get(), buf.get() + result); + if (ec != 0) ec->clear(); + break; + } + } + } + +# elif _WIN32_WINNT < 0x0600 // SDK earlier than Vista and Server 2008 + error(BOOST_ERROR_NOT_SUPPORTED, p, ec, + "boost::filesystem::read_symlink"); +# else // Vista and Server 2008 SDK, or later + + union info_t + { + char buf[REPARSE_DATA_BUFFER_HEADER_SIZE+MAXIMUM_REPARSE_DATA_BUFFER_SIZE]; + REPARSE_DATA_BUFFER rdb; + } info; + + handle_wrapper h( + create_file_handle(p.c_str(), GENERIC_READ, 0, 0, OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, 0)); + + if (error(h.handle == INVALID_HANDLE_VALUE ? BOOST_ERRNO : 0, + p, ec, "boost::filesystem::read_symlink")) + return symlink_path; + + DWORD sz; + + if (!error(::DeviceIoControl(h.handle, FSCTL_GET_REPARSE_POINT, + 0, 0, info.buf, sizeof(info), &sz, 0) == 0 ? BOOST_ERRNO : 0, p, ec, + "boost::filesystem::read_symlink" )) + symlink_path.assign( + static_cast(info.rdb.SymbolicLinkReparseBuffer.PathBuffer) + + info.rdb.SymbolicLinkReparseBuffer.PrintNameOffset/sizeof(wchar_t), + static_cast(info.rdb.SymbolicLinkReparseBuffer.PathBuffer) + + info.rdb.SymbolicLinkReparseBuffer.PrintNameOffset/sizeof(wchar_t) + + info.rdb.SymbolicLinkReparseBuffer.PrintNameLength/sizeof(wchar_t)); +# endif + return symlink_path; + } + + BOOST_FILESYSTEM_DECL + bool remove(const path& p, error_code* ec) + { + error_code tmp_ec; + file_type type = query_file_type(p, &tmp_ec); + if (error(type == status_error ? tmp_ec.value() : 0, p, ec, + "boost::filesystem::remove")) + return false; + + // Since POSIX remove() is specified to work with either files or directories, in a + // perfect world it could just be called. But some important real-world operating + // systems (Windows, Mac OS X, for example) don't implement the POSIX spec. So + // remove_file_or_directory() is always called to kep it simple. + return remove_file_or_directory(p, type, ec); + } + + BOOST_FILESYSTEM_DECL + boost::uintmax_t remove_all(const path& p, error_code* ec) + { + error_code tmp_ec; + file_type type = query_file_type(p, &tmp_ec); + if (error(type == status_error ? tmp_ec.value() : 0, p, ec, + "boost::filesystem::remove_all")) + return 0; + + return (type != status_error && type != file_not_found) // exists + ? remove_all_aux(p, type, ec) + : 0; + } + + BOOST_FILESYSTEM_DECL + void rename(const path& old_p, const path& new_p, error_code* ec) + { + error(!BOOST_MOVE_FILE(old_p.c_str(), new_p.c_str()) ? BOOST_ERRNO : 0, old_p, new_p, + ec, "boost::filesystem::rename"); + } + + BOOST_FILESYSTEM_DECL + void resize_file(const path& p, uintmax_t size, system::error_code* ec) + { + error(!BOOST_RESIZE_FILE(p.c_str(), size) ? BOOST_ERRNO : 0, p, ec, + "boost::filesystem::resize_file"); + } + + BOOST_FILESYSTEM_DECL + space_info space(const path& p, error_code* ec) + { +# ifdef BOOST_POSIX_API + struct BOOST_STATVFS vfs; + space_info info; + if (!error(::BOOST_STATVFS(p.c_str(), &vfs)!= 0, + p, ec, "boost::filesystem::space")) + { + info.capacity + = static_cast(vfs.f_blocks)* BOOST_STATVFS_F_FRSIZE; + info.free + = static_cast(vfs.f_bfree)* BOOST_STATVFS_F_FRSIZE; + info.available + = static_cast(vfs.f_bavail)* BOOST_STATVFS_F_FRSIZE; + } + +# else + ULARGE_INTEGER avail, total, free; + space_info info; + + if (!error(::GetDiskFreeSpaceExW(p.c_str(), &avail, &total, &free)== 0, + p, ec, "boost::filesystem::space")) + { + info.capacity + = (static_cast(total.HighPart)<< 32) + + total.LowPart; + info.free + = (static_cast(free.HighPart)<< 32) + + free.LowPart; + info.available + = (static_cast(avail.HighPart)<< 32) + + avail.LowPart; + } + +# endif + + else + { + info.capacity = info.free = info.available = 0; + } + return info; + } + + BOOST_FILESYSTEM_DECL + file_status status(const path& p, error_code* ec) + { +# ifdef BOOST_POSIX_API + + struct stat path_stat; + if (::stat(p.c_str(), &path_stat)!= 0) + { + if (ec != 0) // always report errno, even though some + ec->assign(errno, system_category()); // errno values are not status_errors + + if (not_found_error(errno)) + { + return fs::file_status(fs::file_not_found, fs::no_perms); + } + if (ec == 0) + BOOST_FILESYSTEM_THROW(filesystem_error("boost::filesystem::status", + p, error_code(errno, system_category()))); + return fs::file_status(fs::status_error); + } + if (ec != 0) ec->clear();; + if (S_ISDIR(path_stat.st_mode)) + return fs::file_status(fs::directory_file, + static_cast(path_stat.st_mode) & fs::perms_mask); + if (S_ISREG(path_stat.st_mode)) + return fs::file_status(fs::regular_file, + static_cast(path_stat.st_mode) & fs::perms_mask); + if (S_ISBLK(path_stat.st_mode)) + return fs::file_status(fs::block_file, + static_cast(path_stat.st_mode) & fs::perms_mask); + if (S_ISCHR(path_stat.st_mode)) + return fs::file_status(fs::character_file, + static_cast(path_stat.st_mode) & fs::perms_mask); + if (S_ISFIFO(path_stat.st_mode)) + return fs::file_status(fs::fifo_file, + static_cast(path_stat.st_mode) & fs::perms_mask); + if (S_ISSOCK(path_stat.st_mode)) + return fs::file_status(fs::socket_file, + static_cast(path_stat.st_mode) & fs::perms_mask); + return fs::file_status(fs::type_unknown); + +# else // Windows + + DWORD attr(::GetFileAttributesW(p.c_str())); + if (attr == 0xFFFFFFFF) + { + return process_status_failure(p, ec); + } + + // reparse point handling; + // since GetFileAttributesW does not resolve symlinks, try to open a file + // handle to discover if the file exists + if (attr & FILE_ATTRIBUTE_REPARSE_POINT) + { + handle_wrapper h( + create_file_handle( + p.c_str(), + 0, // dwDesiredAccess; attributes only + FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, + 0, // lpSecurityAttributes + OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS, + 0)); // hTemplateFile + if (h.handle == INVALID_HANDLE_VALUE) + { + return process_status_failure(p, ec); + } + + if (!is_reparse_point_a_symlink(p)) + return file_status(reparse_file, make_permissions(p, attr)); + } + + if (ec != 0) ec->clear(); + return (attr & FILE_ATTRIBUTE_DIRECTORY) + ? file_status(directory_file, make_permissions(p, attr)) + : file_status(regular_file, make_permissions(p, attr)); + +# endif + } + + BOOST_FILESYSTEM_DECL + file_status symlink_status(const path& p, error_code* ec) + { +# ifdef BOOST_POSIX_API + + struct stat path_stat; + if (::lstat(p.c_str(), &path_stat)!= 0) + { + if (ec != 0) // always report errno, even though some + ec->assign(errno, system_category()); // errno values are not status_errors + + if (errno == ENOENT || errno == ENOTDIR) // these are not errors + { + return fs::file_status(fs::file_not_found, fs::no_perms); + } + if (ec == 0) + BOOST_FILESYSTEM_THROW(filesystem_error("boost::filesystem::status", + p, error_code(errno, system_category()))); + return fs::file_status(fs::status_error); + } + if (ec != 0) ec->clear(); + if (S_ISREG(path_stat.st_mode)) + return fs::file_status(fs::regular_file, + static_cast(path_stat.st_mode) & fs::perms_mask); + if (S_ISDIR(path_stat.st_mode)) + return fs::file_status(fs::directory_file, + static_cast(path_stat.st_mode) & fs::perms_mask); + if (S_ISLNK(path_stat.st_mode)) + return fs::file_status(fs::symlink_file, + static_cast(path_stat.st_mode) & fs::perms_mask); + if (S_ISBLK(path_stat.st_mode)) + return fs::file_status(fs::block_file, + static_cast(path_stat.st_mode) & fs::perms_mask); + if (S_ISCHR(path_stat.st_mode)) + return fs::file_status(fs::character_file, + static_cast(path_stat.st_mode) & fs::perms_mask); + if (S_ISFIFO(path_stat.st_mode)) + return fs::file_status(fs::fifo_file, + static_cast(path_stat.st_mode) & fs::perms_mask); + if (S_ISSOCK(path_stat.st_mode)) + return fs::file_status(fs::socket_file, + static_cast(path_stat.st_mode) & fs::perms_mask); + return fs::file_status(fs::type_unknown); + +# else // Windows + + DWORD attr(::GetFileAttributesW(p.c_str())); + if (attr == 0xFFFFFFFF) + { + return process_status_failure(p, ec); + } + + if (ec != 0) ec->clear(); + + if (attr & FILE_ATTRIBUTE_REPARSE_POINT) + return is_reparse_point_a_symlink(p) + ? file_status(symlink_file, make_permissions(p, attr)) + : file_status(reparse_file, make_permissions(p, attr)); + + return (attr & FILE_ATTRIBUTE_DIRECTORY) + ? file_status(directory_file, make_permissions(p, attr)) + : file_status(regular_file, make_permissions(p, attr)); + +# endif + } + + // contributed by Jeff Flinn + BOOST_FILESYSTEM_DECL + path temp_directory_path(system::error_code* ec) + { +# ifdef BOOST_POSIX_API + const char* val = 0; + + (val = std::getenv("TMPDIR" )) || + (val = std::getenv("TMP" )) || + (val = std::getenv("TEMP" )) || + (val = std::getenv("TEMPDIR")); + +# ifdef __ANDROID__ + const char* default_tmp = "/data/local/tmp"; +# else + const char* default_tmp = "/tmp"; +# endif + path p((val!=0) ? val : default_tmp); + + if (p.empty() || (ec&&!is_directory(p, *ec))||(!ec&&!is_directory(p))) + { + error(ENOTDIR, p, ec, "boost::filesystem::temp_directory_path"); + return p; + } + + return p; + +# else // Windows + + const wchar_t* tmp_env = L"TMP"; + const wchar_t* temp_env = L"TEMP"; + const wchar_t* localappdata_env = L"LOCALAPPDATA"; + const wchar_t* userprofile_env = L"USERPROFILE"; + const wchar_t* env_list[] + = {tmp_env, temp_env, localappdata_env, userprofile_env, 0}; + + path p; + for (int i = 0; env_list[i]; ++i) + { + std::wstring env = wgetenv(env_list[i]); + if (!env.empty()) + { + p = env; + if (i >= 2) + p /= L"Temp"; + error_code lcl_ec; + if (exists(p, lcl_ec) && !lcl_ec && is_directory(p, lcl_ec) && !lcl_ec) + break; + p.clear(); + } + } + + if (p.empty()) + { + // use vector since in C++03 a string is not required to be contiguous + std::vector buf(::GetWindowsDirectoryW(NULL, 0)); + + if (buf.empty() + || ::GetWindowsDirectoryW(&buf[0], static_cast(buf.size())) == 0) + { + error(::GetLastError(), ec, "boost::filesystem::temp_directory_path"); + return path(); + } + p = &*buf.begin(); // do not depend on buf.size(); see ticket #10388 + p /= L"Temp"; + } + return p; + +# endif + } + + BOOST_FILESYSTEM_DECL + path system_complete(const path& p, system::error_code* ec) + { +# ifdef BOOST_POSIX_API + return (p.empty() || p.is_absolute()) + ? p : current_path()/ p; + +# else + if (p.empty()) + { + if (ec != 0) ec->clear(); + return p; + } + wchar_t buf[buf_size]; + wchar_t* pfn; + std::size_t len = get_full_path_name(p, buf_size, buf, &pfn); + + if (error(len == 0 ? BOOST_ERRNO : 0, p, ec, "boost::filesystem::system_complete")) + return path(); + + if (len < buf_size)// len does not include null termination character + return path(&buf[0]); + + boost::scoped_array big_buf(new wchar_t[len]); + + return error(get_full_path_name(p, len , big_buf.get(), &pfn)== 0 ? BOOST_ERRNO : 0, + p, ec, "boost::filesystem::system_complete") + ? path() + : path(big_buf.get()); +# endif + } + +} // namespace detail + +//--------------------------------------------------------------------------------------// +// // +// directory_entry // +// // +//--------------------------------------------------------------------------------------// + + file_status + directory_entry::m_get_status(system::error_code* ec) const + { + if (!status_known(m_status)) + { + // optimization: if the symlink status is known, and it isn't a symlink, + // then status and symlink_status are identical so just copy the + // symlink status to the regular status. + if (status_known(m_symlink_status) + && !is_symlink(m_symlink_status)) + { + m_status = m_symlink_status; + if (ec != 0) ec->clear(); + } + else m_status = detail::status(m_path, ec); + } + else if (ec != 0) ec->clear(); + return m_status; + } + + file_status + directory_entry::m_get_symlink_status(system::error_code* ec) const + { + if (!status_known(m_symlink_status)) + m_symlink_status = detail::symlink_status(m_path, ec); + else if (ec != 0) ec->clear(); + return m_symlink_status; + } + +// dispatch directory_entry supplied here rather than in +// , thus avoiding header circularity. +// test cases are in operations_unit_test.cpp + +namespace path_traits +{ + void dispatch(const directory_entry & de, +# ifdef BOOST_WINDOWS_API + std::wstring& to, +# else + std::string& to, +# endif + const codecvt_type &) + { + to = de.path().native(); + } + + void dispatch(const directory_entry & de, +# ifdef BOOST_WINDOWS_API + std::wstring& to +# else + std::string& to +# endif + ) + { + to = de.path().native(); + } +} // namespace path_traits +} // namespace filesystem +} // namespace boost + +//--------------------------------------------------------------------------------------// +// // +// directory_iterator // +// // +//--------------------------------------------------------------------------------------// + +namespace +{ +# ifdef BOOST_POSIX_API + + error_code path_max(std::size_t & result) + // this code is based on Stevens and Rago, Advanced Programming in the + // UNIX envirnment, 2nd Ed., ISBN 0-201-43307-9, page 49 + { +# ifdef PATH_MAX + static std::size_t max = PATH_MAX; +# else + static std::size_t max = 0; +# endif + if (max == 0) + { + errno = 0; + long tmp = ::pathconf("/", _PC_NAME_MAX); + if (tmp < 0) + { + if (errno == 0)// indeterminate + max = 4096; // guess + else return error_code(errno, system_category()); + } + else max = static_cast(tmp + 1); // relative root + } + result = max; + return ok; + } + +#if defined(__PGI) && defined(__USE_FILE_OFFSET64) +#define dirent dirent64 +#endif + + error_code dir_itr_first(void *& handle, void *& buffer, + const char* dir, string& target, + fs::file_status &, fs::file_status &) + { + if ((handle = ::opendir(dir))== 0) + return error_code(errno, system_category()); + target = string("."); // string was static but caused trouble + // when iteration called from dtor, after + // static had already been destroyed + std::size_t path_size (0); // initialization quiets gcc warning (ticket #3509) + error_code ec = path_max(path_size); + if (ec)return ec; + dirent de; + buffer = std::malloc((sizeof(dirent) - sizeof(de.d_name)) + + path_size + 1); // + 1 for "/0" + return ok; + } + + // warning: the only dirent member updated is d_name + inline int readdir_r_simulator(DIR * dirp, struct dirent * entry, + struct dirent ** result)// *result set to 0 on end of directory + { + errno = 0; + +# if !defined(__CYGWIN__)\ + && defined(_POSIX_THREAD_SAFE_FUNCTIONS)\ + && defined(_SC_THREAD_SAFE_FUNCTIONS)\ + && (_POSIX_THREAD_SAFE_FUNCTIONS+0 >= 0)\ + && (!defined(__hpux) || defined(_REENTRANT)) \ + && (!defined(_AIX) || defined(__THREAD_SAFE)) + if (::sysconf(_SC_THREAD_SAFE_FUNCTIONS)>= 0) + { return ::readdir_r(dirp, entry, result); } +# endif + + struct dirent * p; + *result = 0; + if ((p = ::readdir(dirp))== 0) + return errno; + std::strcpy(entry->d_name, p->d_name); + *result = entry; + return 0; + } + + error_code dir_itr_increment(void *& handle, void *& buffer, + string& target, fs::file_status & sf, fs::file_status & symlink_sf) + { + BOOST_ASSERT(buffer != 0); + dirent * entry(static_cast(buffer)); + dirent * result; + int return_code; + if ((return_code = readdir_r_simulator(static_cast(handle), entry, &result))!= 0) + return error_code(errno, system_category()); + if (result == 0) + return fs::detail::dir_itr_close(handle, buffer); + target = entry->d_name; +# ifdef BOOST_FILESYSTEM_STATUS_CACHE + if (entry->d_type == DT_UNKNOWN) // filesystem does not supply d_type value + { + sf = symlink_sf = fs::file_status(fs::status_error); + } + else // filesystem supplies d_type value + { + if (entry->d_type == DT_DIR) + sf = symlink_sf = fs::file_status(fs::directory_file); + else if (entry->d_type == DT_REG) + sf = symlink_sf = fs::file_status(fs::regular_file); + else if (entry->d_type == DT_LNK) + { + sf = fs::file_status(fs::status_error); + symlink_sf = fs::file_status(fs::symlink_file); + } + else sf = symlink_sf = fs::file_status(fs::status_error); + } +# else + sf = symlink_sf = fs::file_status(fs::status_error); +# endif + return ok; + } + +# else // BOOST_WINDOWS_API + + error_code dir_itr_first(void *& handle, const fs::path& dir, + wstring& target, fs::file_status & sf, fs::file_status & symlink_sf) + // Note: an empty root directory has no "." or ".." entries, so this + // causes a ERROR_FILE_NOT_FOUND error which we do not considered an + // error. It is treated as eof instead. + { + // use a form of search Sebastian Martel reports will work with Win98 + wstring dirpath(dir.wstring()); + dirpath += (dirpath.empty() + || (dirpath[dirpath.size()-1] != L'\\' + && dirpath[dirpath.size()-1] != L'/' + && dirpath[dirpath.size()-1] != L':'))? L"\\*" : L"*"; + + WIN32_FIND_DATAW data; + if ((handle = ::FindFirstFileW(dirpath.c_str(), &data)) + == INVALID_HANDLE_VALUE) + { + handle = 0; // signal eof + return error_code( (::GetLastError() == ERROR_FILE_NOT_FOUND + // Windows Mobile returns ERROR_NO_MORE_FILES; see ticket #3551 + || ::GetLastError() == ERROR_NO_MORE_FILES) + ? 0 : ::GetLastError(), system_category() ); + } + target = data.cFileName; + if (data.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) + // reparse points are complex, so don't try to handle them here; instead just mark + // them as status_error which causes directory_entry caching to call status() + // and symlink_status() which do handle reparse points fully + { + sf.type(fs::status_error); + symlink_sf.type(fs::status_error); + } + else + { + if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + { + sf.type(fs::directory_file); + symlink_sf.type(fs::directory_file); + } + else + { + sf.type(fs::regular_file); + symlink_sf.type(fs::regular_file); + } + sf.permissions(make_permissions(data.cFileName, data.dwFileAttributes)); + symlink_sf.permissions(sf.permissions()); + } + return error_code(); + } + + error_code dir_itr_increment(void *& handle, wstring& target, + fs::file_status & sf, fs::file_status & symlink_sf) + { + WIN32_FIND_DATAW data; + if (::FindNextFileW(handle, &data)== 0)// fails + { + int error = ::GetLastError(); + fs::detail::dir_itr_close(handle); + return error_code(error == ERROR_NO_MORE_FILES ? 0 : error, system_category()); + } + target = data.cFileName; + if (data.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) + // reparse points are complex, so don't try to handle them here; instead just mark + // them as status_error which causes directory_entry caching to call status() + // and symlink_status() which do handle reparse points fully + { + sf.type(fs::status_error); + symlink_sf.type(fs::status_error); + } + else + { + if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + { + sf.type(fs::directory_file); + symlink_sf.type(fs::directory_file); + } + else + { + sf.type(fs::regular_file); + symlink_sf.type(fs::regular_file); + } + sf.permissions(make_permissions(data.cFileName, data.dwFileAttributes)); + symlink_sf.permissions(sf.permissions()); + } + return error_code(); + } +#endif + + const error_code not_found_error_code ( +# ifdef BOOST_WINDOWS_API + ERROR_PATH_NOT_FOUND +# else + ENOENT +# endif + , system_category()); + +} // unnamed namespace + +namespace boost +{ +namespace filesystem +{ + +namespace detail +{ + // dir_itr_close is called both from the ~dir_itr_imp()destructor + // and dir_itr_increment() + BOOST_FILESYSTEM_DECL + system::error_code dir_itr_close( // never throws + void *& handle +# if defined(BOOST_POSIX_API) + , void *& buffer +# endif + ) + { +# ifdef BOOST_POSIX_API + std::free(buffer); + buffer = 0; + if (handle == 0)return ok; + DIR * h(static_cast(handle)); + handle = 0; + return error_code(::closedir(h)== 0 ? 0 : errno, system_category()); + +# else + if (handle != 0) + { + ::FindClose(handle); + handle = 0; + } + return ok; + +# endif + } + + void directory_iterator_construct(directory_iterator& it, + const path& p, system::error_code* ec) + { + if (error(p.empty() ? not_found_error_code.value() : 0, p, ec, + "boost::filesystem::directory_iterator::construct")) + return; + + path::string_type filename; + file_status file_stat, symlink_file_stat; + error_code result = dir_itr_first(it.m_imp->handle, +# if defined(BOOST_POSIX_API) + it.m_imp->buffer, +# endif + p.c_str(), filename, file_stat, symlink_file_stat); + + if (result) + { + it.m_imp.reset(); + error(result.value(), p, + ec, "boost::filesystem::directory_iterator::construct"); + return; + } + + if (it.m_imp->handle == 0) + it.m_imp.reset(); // eof, so make end iterator + else // not eof + { + it.m_imp->dir_entry.assign(p / filename, file_stat, symlink_file_stat); + if (filename[0] == dot // dot or dot-dot + && (filename.size()== 1 + || (filename[1] == dot + && filename.size()== 2))) + { it.increment(*ec); } + } + } + + void directory_iterator_increment(directory_iterator& it, + system::error_code* ec) + { + BOOST_ASSERT_MSG(it.m_imp.get(), "attempt to increment end iterator"); + BOOST_ASSERT_MSG(it.m_imp->handle != 0, "internal program error"); + + path::string_type filename; + file_status file_stat, symlink_file_stat; + system::error_code temp_ec; + + for (;;) + { + temp_ec = dir_itr_increment(it.m_imp->handle, +# if defined(BOOST_POSIX_API) + it.m_imp->buffer, +# endif + filename, file_stat, symlink_file_stat); + + if (temp_ec) // happens if filesystem is corrupt, such as on a damaged optical disc + { + path error_path(it.m_imp->dir_entry.path().parent_path()); // fix ticket #5900 + it.m_imp.reset(); + if (ec == 0) + BOOST_FILESYSTEM_THROW( + filesystem_error("boost::filesystem::directory_iterator::operator++", + error_path, + error_code(BOOST_ERRNO, system_category()))); + ec->assign(BOOST_ERRNO, system_category()); + return; + } + else if (ec != 0) ec->clear(); + + if (it.m_imp->handle == 0) // eof, make end + { + it.m_imp.reset(); + return; + } + + if (!(filename[0] == dot // !(dot or dot-dot) + && (filename.size()== 1 + || (filename[1] == dot + && filename.size()== 2)))) + { + it.m_imp->dir_entry.replace_filename( + filename, file_stat, symlink_file_stat); + return; + } + } + } +} // namespace detail +} // namespace filesystem +} // namespace boost diff --git a/ThirdParty/boost-Subset/libs/filesystem/src/path.cpp b/ThirdParty/boost-Subset/libs/filesystem/src/path.cpp new file mode 100644 index 0000000000..22a128545d --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/src/path.cpp @@ -0,0 +1,917 @@ +// filesystem path.cpp ------------------------------------------------------------- // + +// Copyright Beman Dawes 2008 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +// Old standard library configurations, particularly MingGW, don't support wide strings. +// Report this with an explicit error message. +#include +# if defined( BOOST_NO_STD_WSTRING ) +# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support +# endif + +// define BOOST_FILESYSTEM_SOURCE so that knows +// the library is being built (possibly exporting rather than importing code) +#define BOOST_FILESYSTEM_SOURCE + +#ifndef BOOST_SYSTEM_NO_DEPRECATED +# define BOOST_SYSTEM_NO_DEPRECATED +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef BOOST_WINDOWS_API +# include "windows_file_codecvt.hpp" +# include +#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) \ + || defined(__FreeBSD__) || defined(__OPEN_BSD__) || defined(__HAIKU__) +# include +#endif + +#ifdef BOOST_FILESYSTEM_DEBUG +# include +# include +#endif + +namespace fs = boost::filesystem; + +using boost::filesystem::path; + +using std::string; +using std::wstring; + +using boost::system::error_code; + +//--------------------------------------------------------------------------------------// +// // +// class path helpers // +// // +//--------------------------------------------------------------------------------------// + +namespace +{ + //------------------------------------------------------------------------------------// + // miscellaneous class path helpers // + //------------------------------------------------------------------------------------// + + typedef path::value_type value_type; + typedef path::string_type string_type; + typedef string_type::size_type size_type; + +# ifdef BOOST_WINDOWS_API + + const wchar_t separator = L'/'; + const wchar_t* const separators = L"/\\"; + const wchar_t* separator_string = L"/"; + const wchar_t* preferred_separator_string = L"\\"; + const wchar_t colon = L':'; + const wchar_t dot = L'.'; + const wchar_t questionmark = L'?'; + + inline bool is_letter(wchar_t c) + { + return (c >= L'a' && c <=L'z') || (c >= L'A' && c <=L'Z'); + } + +# else + + const char separator = '/'; + const char* const separators = "/"; + const char* separator_string = "/"; + const char* preferred_separator_string = "/"; + const char dot = '.'; + +# endif + + inline bool is_separator(fs::path::value_type c) + { + return c == separator +# ifdef BOOST_WINDOWS_API + || c == path::preferred_separator +# endif + ; + } + + bool is_root_separator(const string_type& str, size_type pos); + // pos is position of the separator + + size_type filename_pos(const string_type& str, + size_type end_pos); // end_pos is past-the-end position + // Returns: 0 if str itself is filename (or empty) + + size_type root_directory_start(const string_type& path, size_type size); + // Returns: npos if no root_directory found + + void first_element( + const string_type& src, + size_type& element_pos, + size_type& element_size, +# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1310) // VC++ 7.1 + size_type size = string_type::npos +# else + size_type size = -1 +# endif + ); + +} // unnamed namespace + +//--------------------------------------------------------------------------------------// +// // +// class path implementation // +// // +//--------------------------------------------------------------------------------------// + +namespace boost +{ +namespace filesystem +{ + path& path::operator/=(const path& p) + { + if (p.empty()) + return *this; + if (this == &p) // self-append + { + path rhs(p); + if (!is_separator(rhs.m_pathname[0])) + m_append_separator_if_needed(); + m_pathname += rhs.m_pathname; + } + else + { + if (!is_separator(*p.m_pathname.begin())) + m_append_separator_if_needed(); + m_pathname += p.m_pathname; + } + return *this; + } + + path& path::operator/=(const value_type* ptr) + { + if (!*ptr) + return *this; + if (ptr >= m_pathname.data() + && ptr < m_pathname.data() + m_pathname.size()) // overlapping source + { + path rhs(ptr); + if (!is_separator(rhs.m_pathname[0])) + m_append_separator_if_needed(); + m_pathname += rhs.m_pathname; + } + else + { + if (!is_separator(*ptr)) + m_append_separator_if_needed(); + m_pathname += ptr; + } + return *this; + } + + int path::compare(const path& p) const BOOST_NOEXCEPT + { + return detail::lex_compare(begin(), end(), p.begin(), p.end()); + } + +# ifdef BOOST_WINDOWS_API + + const std::string path::generic_string() const + { + path tmp(*this); + std::replace(tmp.m_pathname.begin(), tmp.m_pathname.end(), L'\\', L'/'); + return tmp.string(); + } + + const std::string path::generic_string(const codecvt_type& cvt) const + { + path tmp(*this); + std::replace(tmp.m_pathname.begin(), tmp.m_pathname.end(), L'\\', L'/'); + return tmp.string(cvt); + } + + const std::wstring path::generic_wstring() const + { + path tmp(*this); + std::replace(tmp.m_pathname.begin(), tmp.m_pathname.end(), L'\\', L'/'); + return tmp.wstring(); + } + +# endif // BOOST_WINDOWS_API + + // m_append_separator_if_needed ----------------------------------------------------// + + path::string_type::size_type path::m_append_separator_if_needed() + { + if (!m_pathname.empty() && +# ifdef BOOST_WINDOWS_API + *(m_pathname.end()-1) != colon && +# endif + !is_separator(*(m_pathname.end()-1))) + { + string_type::size_type tmp(m_pathname.size()); + m_pathname += preferred_separator; + return tmp; + } + return 0; + } + + // m_erase_redundant_separator -----------------------------------------------------// + + void path::m_erase_redundant_separator(string_type::size_type sep_pos) + { + if (sep_pos // a separator was added + && sep_pos < m_pathname.size() // and something was appended + && (m_pathname[sep_pos+1] == separator // and it was also separator +# ifdef BOOST_WINDOWS_API + || m_pathname[sep_pos+1] == preferred_separator // or preferred_separator +# endif +)) { m_pathname.erase(sep_pos, 1); } // erase the added separator + } + + // modifiers -----------------------------------------------------------------------// + +# ifdef BOOST_WINDOWS_API + path & path::make_preferred() + { + std::replace(m_pathname.begin(), m_pathname.end(), L'/', L'\\'); + return *this; + } +# endif + + path& path::remove_filename() + { + m_pathname.erase(m_parent_path_end()); + return *this; + } + + path& path::remove_trailing_separator() + { + if (!m_pathname.empty() && is_separator(m_pathname[m_pathname.size() - 1])) + m_pathname.erase(m_pathname.size() - 1); + return *this; + } + + path& path::replace_extension(const path& new_extension) + { + // erase existing extension, including the dot, if any + m_pathname.erase(m_pathname.size()-extension().m_pathname.size()); + + if (!new_extension.empty()) + { + // append new_extension, adding the dot if necessary + if (new_extension.m_pathname[0] != dot) + m_pathname.push_back(dot); + m_pathname.append(new_extension.m_pathname); + } + + return *this; + } + + // decomposition -------------------------------------------------------------------// + + path path::root_path() const + { + path temp(root_name()); + if (!root_directory().empty()) temp.m_pathname += root_directory().c_str(); + return temp; + } + + path path::root_name() const + { + iterator itr(begin()); + + return (itr.m_pos != m_pathname.size() + && ( + (itr.m_element.m_pathname.size() > 1 + && is_separator(itr.m_element.m_pathname[0]) + && is_separator(itr.m_element.m_pathname[1]) + ) +# ifdef BOOST_WINDOWS_API + || itr.m_element.m_pathname[itr.m_element.m_pathname.size()-1] == colon +# endif + )) + ? itr.m_element + : path(); + } + + path path::root_directory() const + { + size_type pos(root_directory_start(m_pathname, m_pathname.size())); + + return pos == string_type::npos + ? path() + : path(m_pathname.c_str() + pos, m_pathname.c_str() + pos + 1); + } + + path path::relative_path() const + { + iterator itr(begin()); + + for (; itr.m_pos != m_pathname.size() + && (is_separator(itr.m_element.m_pathname[0]) +# ifdef BOOST_WINDOWS_API + || itr.m_element.m_pathname[itr.m_element.m_pathname.size()-1] == colon +# endif + ); ++itr) {} + + return path(m_pathname.c_str() + itr.m_pos); + } + + string_type::size_type path::m_parent_path_end() const + { + size_type end_pos(filename_pos(m_pathname, m_pathname.size())); + + bool filename_was_separator(m_pathname.size() + && is_separator(m_pathname[end_pos])); + + // skip separators unless root directory + size_type root_dir_pos(root_directory_start(m_pathname, end_pos)); + for (; + end_pos > 0 + && (end_pos-1) != root_dir_pos + && is_separator(m_pathname[end_pos-1]) + ; + --end_pos) {} + + return (end_pos == 1 && root_dir_pos == 0 && filename_was_separator) + ? string_type::npos + : end_pos; + } + + path path::parent_path() const + { + size_type end_pos(m_parent_path_end()); + return end_pos == string_type::npos + ? path() + : path(m_pathname.c_str(), m_pathname.c_str() + end_pos); + } + + path path::filename() const + { + size_type pos(filename_pos(m_pathname, m_pathname.size())); + return (m_pathname.size() + && pos + && is_separator(m_pathname[pos]) + && !is_root_separator(m_pathname, pos)) + ? detail::dot_path() + : path(m_pathname.c_str() + pos); + } + + path path::stem() const + { + path name(filename()); + if (name == detail::dot_path() || name == detail::dot_dot_path()) return name; + size_type pos(name.m_pathname.rfind(dot)); + return pos == string_type::npos + ? name + : path(name.m_pathname.c_str(), name.m_pathname.c_str() + pos); + } + + path path::extension() const + { + path name(filename()); + if (name == detail::dot_path() || name == detail::dot_dot_path()) return path(); + size_type pos(name.m_pathname.rfind(dot)); + return pos == string_type::npos + ? path() + : path(name.m_pathname.c_str() + pos); + } + + // m_normalize ----------------------------------------------------------------------// + + path& path::m_normalize() + { + if (m_pathname.empty()) return *this; + + path temp; + iterator start(begin()); + iterator last(end()); + iterator stop(last--); + for (iterator itr(start); itr != stop; ++itr) + { + // ignore "." except at start and last + if (itr->native().size() == 1 + && (itr->native())[0] == dot + && itr != start + && itr != last) continue; + + // ignore a name and following ".." + if (!temp.empty() + && itr->native().size() == 2 + && (itr->native())[0] == dot + && (itr->native())[1] == dot) // dot dot + { + string_type lf(temp.filename().native()); + if (lf.size() > 0 + && (lf.size() != 1 + || (lf[0] != dot + && lf[0] != separator)) + && (lf.size() != 2 + || (lf[0] != dot + && lf[1] != dot +# ifdef BOOST_WINDOWS_API + && lf[1] != colon +# endif + ) + ) + ) + { + temp.remove_filename(); + // if not root directory, must also remove "/" if any + if (temp.m_pathname.size() > 0 + && temp.m_pathname[temp.m_pathname.size()-1] + == separator) + { + string_type::size_type rds( + root_directory_start(temp.m_pathname, temp.m_pathname.size())); + if (rds == string_type::npos + || rds != temp.m_pathname.size()-1) + { temp.m_pathname.erase(temp.m_pathname.size()-1); } + } + + iterator next(itr); + if (temp.empty() && ++next != stop + && next == last && *last == detail::dot_path()) temp /= detail::dot_path(); + continue; + } + } + + temp /= *itr; + }; + + if (temp.empty()) temp /= detail::dot_path(); + m_pathname = temp.m_pathname; + return *this; + } + +} // namespace filesystem +} // namespace boost + +//--------------------------------------------------------------------------------------// +// // +// class path helpers implementation // +// // +//--------------------------------------------------------------------------------------// + +namespace +{ + + // is_root_separator ---------------------------------------------------------------// + + bool is_root_separator(const string_type & str, size_type pos) + // pos is position of the separator + { + BOOST_ASSERT_MSG(!str.empty() && is_separator(str[pos]), + "precondition violation"); + + // subsequent logic expects pos to be for leftmost slash of a set + while (pos > 0 && is_separator(str[pos-1])) + --pos; + + // "/" [...] + if (pos == 0) + return true; + +# ifdef BOOST_WINDOWS_API + // "c:/" [...] + if (pos == 2 && is_letter(str[0]) && str[1] == colon) + return true; +# endif + + // "//" name "/" + if (pos < 3 || !is_separator(str[0]) || !is_separator(str[1])) + return false; + + return str.find_first_of(separators, 2) == pos; + } + + // filename_pos --------------------------------------------------------------------// + + size_type filename_pos(const string_type & str, + size_type end_pos) // end_pos is past-the-end position + // return 0 if str itself is filename (or empty) + { + // case: "//" + if (end_pos == 2 + && is_separator(str[0]) + && is_separator(str[1])) return 0; + + // case: ends in "/" + if (end_pos && is_separator(str[end_pos-1])) + return end_pos-1; + + // set pos to start of last element + size_type pos(str.find_last_of(separators, end_pos-1)); + +# ifdef BOOST_WINDOWS_API + if (pos == string_type::npos && end_pos > 1) + pos = str.find_last_of(colon, end_pos-2); +# endif + + return (pos == string_type::npos // path itself must be a filename (or empty) + || (pos == 1 && is_separator(str[0]))) // or net + ? 0 // so filename is entire string + : pos + 1; // or starts after delimiter + } + + // root_directory_start ------------------------------------------------------------// + + size_type root_directory_start(const string_type & path, size_type size) + // return npos if no root_directory found + { + +# ifdef BOOST_WINDOWS_API + // case "c:/" + if (size > 2 + && path[1] == colon + && is_separator(path[2])) return 2; +# endif + + // case "//" + if (size == 2 + && is_separator(path[0]) + && is_separator(path[1])) return string_type::npos; + +# ifdef BOOST_WINDOWS_API + // case "\\?\" + if (size > 4 + && is_separator(path[0]) + && is_separator(path[1]) + && path[2] == questionmark + && is_separator(path[3])) + { + string_type::size_type pos(path.find_first_of(separators, 4)); + return pos < size ? pos : string_type::npos; + } +# endif + + // case "//net {/}" + if (size > 3 + && is_separator(path[0]) + && is_separator(path[1]) + && !is_separator(path[2])) + { + string_type::size_type pos(path.find_first_of(separators, 2)); + return pos < size ? pos : string_type::npos; + } + + // case "/" + if (size > 0 && is_separator(path[0])) return 0; + + return string_type::npos; + } + + // first_element --------------------------------------------------------------------// + // sets pos and len of first element, excluding extra separators + // if src.empty(), sets pos,len, to 0,0. + + void first_element( + const string_type & src, + size_type & element_pos, + size_type & element_size, + size_type size +) + { + if (size == string_type::npos) size = src.size(); + element_pos = 0; + element_size = 0; + if (src.empty()) return; + + string_type::size_type cur(0); + + // deal with // [network] + if (size >= 2 && is_separator(src[0]) + && is_separator(src[1]) + && (size == 2 + || !is_separator(src[2]))) + { + cur += 2; + element_size += 2; + } + + // leading (not non-network) separator + else if (is_separator(src[0])) + { + ++element_size; + // bypass extra leading separators + while (cur+1 < size + && is_separator(src[cur+1])) + { + ++cur; + ++element_pos; + } + return; + } + + // at this point, we have either a plain name, a network name, + // or (on Windows only) a device name + + // find the end + while (cur < size +# ifdef BOOST_WINDOWS_API + && src[cur] != colon +# endif + && !is_separator(src[cur])) + { + ++cur; + ++element_size; + } + +# ifdef BOOST_WINDOWS_API + if (cur == size) return; + // include device delimiter + if (src[cur] == colon) + { ++element_size; } +# endif + + return; + } + +} // unnamed namespace + + +namespace boost +{ +namespace filesystem +{ + namespace detail + { + BOOST_FILESYSTEM_DECL + int lex_compare(path::iterator first1, path::iterator last1, + path::iterator first2, path::iterator last2) + { + for (; first1 != last1 && first2 != last2;) + { + if (first1->native() < first2->native()) return -1; + if (first2->native() < first1->native()) return 1; + BOOST_ASSERT(first2->native() == first1->native()); + ++first1; + ++first2; + } + if (first1 == last1 && first2 == last2) + return 0; + return first1 == last1 ? -1 : 1; + } + + BOOST_FILESYSTEM_DECL + const path& dot_path() + { +# ifdef BOOST_WINDOWS_API + static const fs::path dot_pth(L"."); +# else + static const fs::path dot_pth("."); +# endif + return dot_pth; + } + + BOOST_FILESYSTEM_DECL + const path& dot_dot_path() + { +# ifdef BOOST_WINDOWS_API + static const fs::path dot_dot(L".."); +# else + static const fs::path dot_dot(".."); +# endif + return dot_dot; + } + } + +//--------------------------------------------------------------------------------------// +// // +// class path::iterator implementation // +// // +//--------------------------------------------------------------------------------------// + + path::iterator path::begin() const + { + iterator itr; + itr.m_path_ptr = this; + size_type element_size; + first_element(m_pathname, itr.m_pos, element_size); + itr.m_element = m_pathname.substr(itr.m_pos, element_size); + if (itr.m_element.m_pathname == preferred_separator_string) + itr.m_element.m_pathname = separator_string; // needed for Windows, harmless on POSIX + return itr; + } + + path::iterator path::end() const + { + iterator itr; + itr.m_path_ptr = this; + itr.m_pos = m_pathname.size(); + return itr; + } + + void path::m_path_iterator_increment(path::iterator & it) + { + BOOST_ASSERT_MSG(it.m_pos < it.m_path_ptr->m_pathname.size(), + "path::basic_iterator increment past end()"); + + // increment to position past current element; if current element is implicit dot, + // this will cause it.m_pos to represent the end iterator + it.m_pos += it.m_element.m_pathname.size(); + + // if the end is reached, we are done + if (it.m_pos == it.m_path_ptr->m_pathname.size()) + { + it.m_element.clear(); // aids debugging, may release unneeded memory + return; + } + + // both POSIX and Windows treat paths that begin with exactly two separators specially + bool was_net(it.m_element.m_pathname.size() > 2 + && is_separator(it.m_element.m_pathname[0]) + && is_separator(it.m_element.m_pathname[1]) + && !is_separator(it.m_element.m_pathname[2])); + + // process separator (Windows drive spec is only case not a separator) + if (is_separator(it.m_path_ptr->m_pathname[it.m_pos])) + { + // detect root directory + if (was_net +# ifdef BOOST_WINDOWS_API + // case "c:/" + || it.m_element.m_pathname[it.m_element.m_pathname.size()-1] == colon +# endif + ) + { + it.m_element.m_pathname = separator; // generic format; see docs + return; + } + + // skip separators until it.m_pos points to the start of the next element + while (it.m_pos != it.m_path_ptr->m_pathname.size() + && is_separator(it.m_path_ptr->m_pathname[it.m_pos])) + { ++it.m_pos; } + + // detect trailing separator, and treat it as ".", per POSIX spec + if (it.m_pos == it.m_path_ptr->m_pathname.size() + && !is_root_separator(it.m_path_ptr->m_pathname, it.m_pos-1)) + { + --it.m_pos; + it.m_element = detail::dot_path(); + return; + } + } + + // get m_element + size_type end_pos(it.m_path_ptr->m_pathname.find_first_of(separators, it.m_pos)); + if (end_pos == string_type::npos) + end_pos = it.m_path_ptr->m_pathname.size(); + it.m_element = it.m_path_ptr->m_pathname.substr(it.m_pos, end_pos - it.m_pos); + } + + void path::m_path_iterator_decrement(path::iterator & it) + { + BOOST_ASSERT_MSG(it.m_pos, "path::iterator decrement past begin()"); + + size_type end_pos(it.m_pos); + + // if at end and there was a trailing non-root '/', return "." + if (it.m_pos == it.m_path_ptr->m_pathname.size() + && it.m_path_ptr->m_pathname.size() > 1 + && is_separator(it.m_path_ptr->m_pathname[it.m_pos-1]) + && !is_root_separator(it.m_path_ptr->m_pathname, it.m_pos-1) + ) + { + --it.m_pos; + it.m_element = detail::dot_path(); + return; + } + + size_type root_dir_pos(root_directory_start(it.m_path_ptr->m_pathname, end_pos)); + + // skip separators unless root directory + for ( + ; + end_pos > 0 + && (end_pos-1) != root_dir_pos + && is_separator(it.m_path_ptr->m_pathname[end_pos-1]) + ; + --end_pos) {} + + it.m_pos = filename_pos(it.m_path_ptr->m_pathname, end_pos); + it.m_element = it.m_path_ptr->m_pathname.substr(it.m_pos, end_pos - it.m_pos); + if (it.m_element.m_pathname == preferred_separator_string) // needed for Windows, harmless on POSIX + it.m_element.m_pathname = separator_string; // generic format; see docs + } + +} // namespace filesystem +} // namespace boost + +namespace +{ + + //------------------------------------------------------------------------------------// + // locale helpers // + //------------------------------------------------------------------------------------// + + // Prior versions of these locale and codecvt implementations tried to take advantage + // of static initialization where possible, kept a local copy of the current codecvt + // facet (to avoid codecvt() having to call use_facet()), and was not multi-threading + // safe (again for efficiency). + // + // This was error prone, and required different implementation techniques depending + // on the compiler and also whether static or dynamic linking was used. Furthermore, + // users could not easily provide their multi-threading safe wrappers because the + // path interface requires the implementation itself to call codecvt() to obtain the + // default facet, and the initialization of the static within path_locale() could race. + // + // The code below is portable to all platforms, is much simpler, and hopefully will be + // much more robust. Timing tests (on Windows, using a Visual C++ release build) + // indicated the current code is roughly 9% slower than the previous code, and that + // seems a small price to pay for better code that is easier to use. + + inline std::locale default_locale() + { +# if defined(BOOST_WINDOWS_API) + std::locale global_loc = std::locale(); + return std::locale(global_loc, new windows_file_codecvt); +# elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) \ + || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__) + // "All BSD system functions expect their string parameters to be in UTF-8 encoding + // and nothing else." See + // http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPInternational/Articles/FileEncodings.html + // + // "The kernel will reject any filename that is not a valid UTF-8 string, and it will + // even be normalized (to Unicode NFD) before stored on disk, at least when using HFS. + // The right way to deal with it would be to always convert the filename to UTF-8 + // before trying to open/create a file." See + // http://lists.apple.com/archives/unix-porting/2007/Sep/msg00023.html + // + // "How a file name looks at the API level depends on the API. Current Carbon APIs + // handle file names as an array of UTF-16 characters; POSIX ones handle them as an + // array of UTF-8, which is why UTF-8 works well in Terminal. How it's stored on disk + // depends on the disk format; HFS+ uses UTF-16, but that's not important in most + // cases." See + // http://lists.apple.com/archives/applescript-users/2002/Sep/msg00319.html + // + // Many thanks to Peter Dimov for digging out the above references! + + std::locale global_loc = std::locale(); + return std::locale(global_loc, new boost::filesystem::detail::utf8_codecvt_facet); +# else // Other POSIX + // ISO C calls std::locale("") "the locale-specific native environment", and this + // locale is the default for many POSIX-based operating systems such as Linux. + return std::locale(""); +# endif + } + + inline std::locale& path_locale() + // std::locale("") construction, needed on non-Apple POSIX systems, can throw + // (if environmental variables LC_MESSAGES or LANG are wrong, for example), so + // path_locale() provides lazy initialization via a local static to ensure that any + // exceptions occur after main() starts and so can be caught. Furthermore, + // path_locale() is only called if path::codecvt() or path::imbue() are themselves + // actually called, ensuring that an exception will only be thrown if std::locale("") + // is really needed. + { + static std::locale loc(default_locale()); +#ifdef BOOST_FILESYSTEM_DEBUG + std::cout << "***** path_locale() called" << std::endl; +#endif + return loc; + } +} // unnamed namespace + +//--------------------------------------------------------------------------------------// +// path::codecvt() and path::imbue() implementation // +//--------------------------------------------------------------------------------------// + +namespace boost +{ +namespace filesystem +{ + // See comments above + + const path::codecvt_type& path::codecvt() + { +#ifdef BOOST_FILESYSTEM_DEBUG + std::cout << "***** path::codecvt() called" << std::endl; +#endif + BOOST_ASSERT_MSG(&path_locale(), "boost::filesystem::path locale initialization error"); + return std::use_facet >(path_locale()); + } + + std::locale path::imbue(const std::locale& loc) + { +#ifdef BOOST_FILESYSTEM_DEBUG + std::cout << "***** path::imbue() called" << std::endl; +#endif + std::locale temp(path_locale()); + path_locale() = loc; + return temp; + } + +} // namespace filesystem +} // namespace boost diff --git a/ThirdParty/boost-Subset/libs/filesystem/src/path_traits.cpp b/ThirdParty/boost-Subset/libs/filesystem/src/path_traits.cpp new file mode 100644 index 0000000000..07b92c0f12 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/src/path_traits.cpp @@ -0,0 +1,200 @@ +// filesystem path_traits.cpp --------------------------------------------------------// + +// Copyright Beman Dawes 2008, 2009 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +//--------------------------------------------------------------------------------------// + +// define BOOST_FILESYSTEM_SOURCE so that knows +// the library is being built (possibly exporting rather than importing code) +#define BOOST_FILESYSTEM_SOURCE + +#ifndef BOOST_SYSTEM_NO_DEPRECATED +# define BOOST_SYSTEM_NO_DEPRECATED +#endif + +#include +#include +#include +#include +#include // for codecvt_base::result +#include // for strlen +#include // for wcslen + +namespace pt = boost::filesystem::path_traits; +namespace fs = boost::filesystem; +namespace bs = boost::system; + +//--------------------------------------------------------------------------------------// +// configuration // +//--------------------------------------------------------------------------------------// + +#ifndef BOOST_FILESYSTEM_CODECVT_BUF_SIZE +# define BOOST_FILESYSTEM_CODECVT_BUF_SIZE 256 +#endif + +namespace { + + const std::size_t default_codecvt_buf_size = BOOST_FILESYSTEM_CODECVT_BUF_SIZE; + + +//--------------------------------------------------------------------------------------// +// // +// The public convert() functions do buffer management, and then forward to the // +// convert_aux() functions for the actual call to the codecvt facet. // +// // +//--------------------------------------------------------------------------------------// + +//--------------------------------------------------------------------------------------// +// convert_aux const char* to wstring // +//--------------------------------------------------------------------------------------// + + void convert_aux( + const char* from, + const char* from_end, + wchar_t* to, wchar_t* to_end, + std::wstring & target, + const pt::codecvt_type & cvt) + { + //std::cout << std::hex + // << " from=" << std::size_t(from) + // << " from_end=" << std::size_t(from_end) + // << " to=" << std::size_t(to) + // << " to_end=" << std::size_t(to_end) + // << std::endl; + + std::mbstate_t state = std::mbstate_t(); // perhaps unneeded, but cuts bug reports + const char* from_next; + wchar_t* to_next; + + std::codecvt_base::result res; + + if ((res=cvt.in(state, from, from_end, from_next, + to, to_end, to_next)) != std::codecvt_base::ok) + { + //std::cout << " result is " << static_cast(res) << std::endl; + BOOST_FILESYSTEM_THROW(bs::system_error(res, fs::codecvt_error_category(), + "boost::filesystem::path codecvt to wstring")); + } + target.append(to, to_next); + } + +//--------------------------------------------------------------------------------------// +// convert_aux const wchar_t* to string // +//--------------------------------------------------------------------------------------// + + void convert_aux( + const wchar_t* from, + const wchar_t* from_end, + char* to, char* to_end, + std::string & target, + const pt::codecvt_type & cvt) + { + //std::cout << std::hex + // << " from=" << std::size_t(from) + // << " from_end=" << std::size_t(from_end) + // << " to=" << std::size_t(to) + // << " to_end=" << std::size_t(to_end) + // << std::endl; + + std::mbstate_t state = std::mbstate_t(); // perhaps unneeded, but cuts bug reports + const wchar_t* from_next; + char* to_next; + + std::codecvt_base::result res; + + if ((res=cvt.out(state, from, from_end, from_next, + to, to_end, to_next)) != std::codecvt_base::ok) + { + //std::cout << " result is " << static_cast(res) << std::endl; + BOOST_FILESYSTEM_THROW(bs::system_error(res, fs::codecvt_error_category(), + "boost::filesystem::path codecvt to string")); + } + target.append(to, to_next); + } + +} // unnamed namespace + +//--------------------------------------------------------------------------------------// +// path_traits // +//--------------------------------------------------------------------------------------// + +namespace boost { namespace filesystem { namespace path_traits { + +//--------------------------------------------------------------------------------------// +// convert const char* to wstring // +//--------------------------------------------------------------------------------------// + + BOOST_FILESYSTEM_DECL + void convert(const char* from, + const char* from_end, // 0 for null terminated MBCS + std::wstring & to, + const codecvt_type & cvt) + { + BOOST_ASSERT(from); + + if (!from_end) // null terminated + { + from_end = from + std::strlen(from); + } + + if (from == from_end) return; + + std::size_t buf_size = (from_end - from) * 3; // perhaps too large, but that's OK + + // dynamically allocate a buffer only if source is unusually large + if (buf_size > default_codecvt_buf_size) + { + boost::scoped_array< wchar_t > buf(new wchar_t [buf_size]); + convert_aux(from, from_end, buf.get(), buf.get()+buf_size, to, cvt); + } + else + { + wchar_t buf[default_codecvt_buf_size]; + convert_aux(from, from_end, buf, buf+default_codecvt_buf_size, to, cvt); + } + } + +//--------------------------------------------------------------------------------------// +// convert const wchar_t* to string // +//--------------------------------------------------------------------------------------// + + BOOST_FILESYSTEM_DECL + void convert(const wchar_t* from, + const wchar_t* from_end, // 0 for null terminated MBCS + std::string & to, + const codecvt_type & cvt) + { + BOOST_ASSERT(from); + + if (!from_end) // null terminated + { + from_end = from + std::wcslen(from); + } + + if (from == from_end) return; + + // The codecvt length functions may not be implemented, and I don't really + // understand them either. Thus this code is just a guess; if it turns + // out the buffer is too small then an error will be reported and the code + // will have to be fixed. + std::size_t buf_size = (from_end - from) * 4; // perhaps too large, but that's OK + buf_size += 4; // encodings like shift-JIS need some prefix space + + // dynamically allocate a buffer only if source is unusually large + if (buf_size > default_codecvt_buf_size) + { + boost::scoped_array< char > buf(new char [buf_size]); + convert_aux(from, from_end, buf.get(), buf.get()+buf_size, to, cvt); + } + else + { + char buf[default_codecvt_buf_size]; + convert_aux(from, from_end, buf, buf+default_codecvt_buf_size, to, cvt); + } + } +}}} // namespace boost::filesystem::path_traits diff --git a/ThirdParty/boost-Subset/libs/filesystem/src/portability.cpp b/ThirdParty/boost-Subset/libs/filesystem/src/portability.cpp new file mode 100644 index 0000000000..b1a1352d9a --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/src/portability.cpp @@ -0,0 +1,119 @@ +// portability.cpp -------------------------------------------------------------------// + +// Copyright 2002-2005 Beman Dawes +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy +// at http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/filesystem + +//--------------------------------------------------------------------------------------// + +// define BOOST_FILESYSTEM_SOURCE so that knows +// the library is being built (possibly exporting rather than importing code) +#define BOOST_FILESYSTEM_SOURCE + +#ifndef BOOST_SYSTEM_NO_DEPRECATED +# define BOOST_SYSTEM_NO_DEPRECATED +#endif + +#include +#include + +namespace fs = boost::filesystem; + +#include // SGI MIPSpro compilers need this + +# ifdef BOOST_NO_STDC_NAMESPACE + namespace std { using ::strerror; } +# endif + +//--------------------------------------------------------------------------------------// + +namespace +{ + const char invalid_chars[] = + "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F" + "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F" + "<>:\"/\\|"; + // note that the terminating '\0' is part of the string - thus the size below + // is sizeof(invalid_chars) rather than sizeof(invalid_chars)-1. I + const std::string windows_invalid_chars(invalid_chars, sizeof(invalid_chars)); + + const std::string valid_posix( + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._-"); + +} // unnamed namespace + +namespace boost +{ + namespace filesystem + { + + // name_check functions ----------------------------------------------// + +# ifdef BOOST_WINDOWS + BOOST_FILESYSTEM_DECL bool native(const std::string & name) + { + return windows_name(name); + } +# else + BOOST_FILESYSTEM_DECL bool native(const std::string & name) + { + return name.size() != 0 + && name[0] != ' ' + && name.find('/') == std::string::npos; + } +# endif + + BOOST_FILESYSTEM_DECL bool portable_posix_name(const std::string & name) + { + return name.size() != 0 + && name.find_first_not_of(valid_posix) == std::string::npos; + } + + BOOST_FILESYSTEM_DECL bool windows_name(const std::string & name) + { + return name.size() != 0 + && name[0] != ' ' + && name.find_first_of(windows_invalid_chars) == std::string::npos + && *(name.end()-1) != ' ' + && (*(name.end()-1) != '.' + || name.length() == 1 || name == ".."); + } + + BOOST_FILESYSTEM_DECL bool portable_name(const std::string & name) + { + return + name.size() != 0 + && (name == "." + || name == ".." + || (windows_name(name) + && portable_posix_name(name) + && name[0] != '.' && name[0] != '-')); + } + + BOOST_FILESYSTEM_DECL bool portable_directory_name(const std::string & name) + { + return + name == "." + || name == ".." + || (portable_name(name) + && name.find('.') == std::string::npos); + } + + BOOST_FILESYSTEM_DECL bool portable_file_name(const std::string & name) + { + std::string::size_type pos; + return + portable_name(name) + && name != "." + && name != ".." + && ((pos = name.find('.')) == std::string::npos + || (name.find('.', pos+1) == std::string::npos + && (pos + 5) > name.length())) + ; + } + + } // namespace filesystem +} // namespace boost diff --git a/ThirdParty/boost-Subset/libs/filesystem/src/unique_path.cpp b/ThirdParty/boost-Subset/libs/filesystem/src/unique_path.cpp new file mode 100644 index 0000000000..629f860693 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/src/unique_path.cpp @@ -0,0 +1,144 @@ +// filesystem unique_path.cpp --------------------------------------------------------// + +// Copyright Beman Dawes 2010 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +//--------------------------------------------------------------------------------------// + +// define BOOST_FILESYSTEM_SOURCE so that knows +// the library is being built (possibly exporting rather than importing code) +#define BOOST_FILESYSTEM_SOURCE + +#ifndef BOOST_SYSTEM_NO_DEPRECATED +# define BOOST_SYSTEM_NO_DEPRECATED +#endif + +#include +#include + +# ifdef BOOST_POSIX_API +# include +# else // BOOST_WINDOWS_API +# include +# include +# pragma comment(lib, "Advapi32.lib") +# endif + +namespace { + +void fail(int err, boost::system::error_code* ec) +{ + if (ec == 0) + BOOST_FILESYSTEM_THROW( boost::system::system_error(err, + boost::system::system_category(), + "boost::filesystem::unique_path")); + + ec->assign(err, boost::system::system_category()); + return; +} + +void system_crypt_random(void* buf, std::size_t len, boost::system::error_code* ec) +{ +# ifdef BOOST_POSIX_API + + int file = open("/dev/urandom", O_RDONLY); + if (file == -1) + { + file = open("/dev/random", O_RDONLY); + if (file == -1) + { + fail(errno, ec); + return; + } + } + + size_t bytes_read = 0; + while (bytes_read < len) + { + ssize_t n = read(file, buf, len - bytes_read); + if (n == -1) + { + close(file); + fail(errno, ec); + return; + } + bytes_read += n; + buf = static_cast(buf) + n; + } + + close(file); + +# else // BOOST_WINDOWS_API + + HCRYPTPROV handle; + int errval = 0; + + if (!::CryptAcquireContextW(&handle, 0, 0, PROV_RSA_FULL, 0)) + { + errval = ::GetLastError(); + if (errval == NTE_BAD_KEYSET) + { + if (!::CryptAcquireContextW(&handle, 0, 0, PROV_RSA_FULL, CRYPT_NEWKEYSET)) + { + errval = ::GetLastError(); + } + else errval = 0; + } + } + + if (!errval) + { + BOOL gen_ok = ::CryptGenRandom(handle, len, static_cast(buf)); + if (!gen_ok) + errval = ::GetLastError(); + ::CryptReleaseContext(handle, 0); + } + + if (!errval) return; + + fail(errval, ec); +# endif +} + +} // unnamed namespace + +namespace boost { namespace filesystem { namespace detail { + +BOOST_FILESYSTEM_DECL +path unique_path(const path& model, system::error_code* ec) +{ + std::wstring s (model.wstring()); // std::string ng for MBCS encoded POSIX + const wchar_t hex[] = L"0123456789abcdef"; + char ran[] = "123456789abcdef"; // init to avoid clang static analyzer message + // see ticket #8954 + assert(sizeof(ran) == 16); + const int max_nibbles = 2 * sizeof(ran); // 4-bits per nibble + + int nibbles_used = max_nibbles; + for(std::wstring::size_type i=0; i < s.size(); ++i) + { + if (s[i] == L'%') // digit request + { + if (nibbles_used == max_nibbles) + { + system_crypt_random(ran, sizeof(ran), ec); + if (ec != 0 && *ec) + return ""; + nibbles_used = 0; + } + int c = ran[nibbles_used/2]; + c >>= 4 * (nibbles_used++ & 1); // if odd, shift right 1 nibble + s[i] = hex[c & 0xf]; // convert to hex digit and replace + } + } + + if (ec != 0) ec->clear(); + + return s; +} + +}}} diff --git a/ThirdParty/boost-Subset/libs/filesystem/src/utf8_codecvt_facet.cpp b/ThirdParty/boost-Subset/libs/filesystem/src/utf8_codecvt_facet.cpp new file mode 100644 index 0000000000..8a5af1e07c --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/src/utf8_codecvt_facet.cpp @@ -0,0 +1,27 @@ +// Copyright Vladimir Prus 2004. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) + +// For HP-UX, request that WCHAR_MAX and WCHAR_MIN be defined as macros, +// not casts. See ticket 5048 +#define _INCLUDE_STDCSOURCE_199901 + +#ifndef BOOST_SYSTEM_NO_DEPRECATED +# define BOOST_SYSTEM_NO_DEPRECATED +#endif + +#define BOOST_FILESYSTEM_SOURCE +#include + +#define BOOST_UTF8_BEGIN_NAMESPACE \ + namespace boost { namespace filesystem { namespace detail { + +#define BOOST_UTF8_END_NAMESPACE }}} +#define BOOST_UTF8_DECL BOOST_FILESYSTEM_DECL + +#include + +#undef BOOST_UTF8_BEGIN_NAMESPACE +#undef BOOST_UTF8_END_NAMESPACE +#undef BOOST_UTF8_DECL diff --git a/ThirdParty/boost-Subset/libs/filesystem/src/windows_file_codecvt.cpp b/ThirdParty/boost-Subset/libs/filesystem/src/windows_file_codecvt.cpp new file mode 100644 index 0000000000..998db60221 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/src/windows_file_codecvt.cpp @@ -0,0 +1,75 @@ +// filesystem windows_file_codecvt.cpp -----------------------------------------// + +// Copyright Beman Dawes 2009 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +//--------------------------------------------------------------------------------------// + +// define BOOST_FILESYSTEM_SOURCE so that knows +// the library is being built (possibly exporting rather than importing code) +#define BOOST_FILESYSTEM_SOURCE + +#ifndef BOOST_SYSTEM_NO_DEPRECATED +# define BOOST_SYSTEM_NO_DEPRECATED +#endif + +#include +#include // for mbstate_t + +#ifdef BOOST_WINDOWS_API + +#include "windows_file_codecvt.hpp" + +// Versions of MinGW prior to GCC 4.6 requires this +#ifndef WINVER +# define WINVER 0x0500 +#endif + +#include + + std::codecvt_base::result windows_file_codecvt::do_in( + std::mbstate_t &, + const char* from, const char* from_end, const char*& from_next, + wchar_t* to, wchar_t* to_end, wchar_t*& to_next) const + { + UINT codepage = AreFileApisANSI() ? CP_ACP : CP_OEMCP; + + int count; + if ((count = ::MultiByteToWideChar(codepage, MB_PRECOMPOSED, from, + from_end - from, to, to_end - to)) == 0) + { + return error; // conversion failed + } + + from_next = from_end; + to_next = to + count; + *to_next = L'\0'; + return ok; + } + + std::codecvt_base::result windows_file_codecvt::do_out( + std::mbstate_t &, + const wchar_t* from, const wchar_t* from_end, const wchar_t* & from_next, + char* to, char* to_end, char* & to_next) const + { + UINT codepage = AreFileApisANSI() ? CP_ACP : CP_OEMCP; + + int count; + if ((count = ::WideCharToMultiByte(codepage, WC_NO_BEST_FIT_CHARS, from, + from_end - from, to, to_end - to, 0, 0)) == 0) + { + return error; // conversion failed + } + + from_next = from_end; + to_next = to + count; + *to_next = '\0'; + return ok; + } + + # endif // BOOST_WINDOWS_API + diff --git a/ThirdParty/boost-Subset/libs/filesystem/src/windows_file_codecvt.hpp b/ThirdParty/boost-Subset/libs/filesystem/src/windows_file_codecvt.hpp new file mode 100644 index 0000000000..52deab1b8f --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/src/windows_file_codecvt.hpp @@ -0,0 +1,56 @@ +// filesystem windows_file_codecvt.hpp -----------------------------------------------// + +// Copyright Beman Dawes 2009 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#ifndef BOOST_FILESYSTEM3_WIN_FILE_CODECVT_HPP +#define BOOST_FILESYSTEM3_WIN_FILE_CODECVT_HPP + +#include +#include + + //------------------------------------------------------------------------------------// + // // + // class windows_file_codecvt // + // // + // Warning: partial implementation; even do_in and do_out only partially meet the // + // standard library specifications as the "to" buffer must hold the entire result. // + // // + //------------------------------------------------------------------------------------// + + class BOOST_FILESYSTEM_DECL windows_file_codecvt + : public std::codecvt< wchar_t, char, std::mbstate_t > + { + public: + explicit windows_file_codecvt() + : std::codecvt() {} + protected: + + virtual bool do_always_noconv() const throw() { return false; } + + // seems safest to assume variable number of characters since we don't + // actually know what codepage is active + virtual int do_encoding() const throw() { return 0; } + + virtual std::codecvt_base::result do_in(std::mbstate_t& state, + const char* from, const char* from_end, const char*& from_next, + wchar_t* to, wchar_t* to_end, wchar_t*& to_next) const; + + virtual std::codecvt_base::result do_out(std::mbstate_t & state, + const wchar_t* from, const wchar_t* from_end, const wchar_t*& from_next, + char* to, char* to_end, char*& to_next) const; + + virtual std::codecvt_base::result do_unshift(std::mbstate_t&, + char* /*from*/, char* /*to*/, char* & /*next*/) const { return ok; } + + virtual int do_length(std::mbstate_t&, + const char* /*from*/, const char* /*from_end*/, std::size_t /*max*/) const { return 0; } + + virtual int do_max_length() const throw () { return 0; } + }; + +#endif // BOOST_FILESYSTEM3_WIN_FILE_CODECVT_HPP diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/Jamfile.v2 b/ThirdParty/boost-Subset/libs/filesystem/test/Jamfile.v2 new file mode 100644 index 0000000000..c7a09c3794 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/Jamfile.v2 @@ -0,0 +1,35 @@ +# Boost Filesystem Library test Jamfile + +# (C) Copyright Beman Dawes 2002-2006 +# Distributed under the Boost Software License, Version 1.0. +# See www.boost.org/LICENSE_1_0.txt + +project + : requirements + /boost/filesystem//boost_filesystem + /boost/system//boost_system + msvc:on + ; + +# Some tests are run both statically and as shared libraries since Filesystem +# has a history of bugs that appear only in one type of build or the other. + + test-suite "filesystem" : + [ run convenience_test.cpp ] + [ compile macro_default_test.cpp ] + [ run odr1_test.cpp odr2_test.cpp ] + [ run deprecated_test.cpp ] + [ run fstream_test.cpp ] + [ run large_file_support_test.cpp ] + [ run locale_info.cpp : : : always_show_run_output ] + [ run operations_test.cpp : : : shared always_show_run_output ] + [ run operations_test.cpp : : : static : operations_test_static ] + [ run operations_unit_test.cpp : : : shared always_show_run_output ] + [ run path_test.cpp : : : shared ] + [ run path_test.cpp : : : static : path_test_static ] + [ run path_unit_test.cpp : : : shared ] + [ run path_unit_test.cpp : : : static : path_unit_test_static ] + [ run ../example/simple_ls.cpp ] + [ run ../example/file_status.cpp ] + + ; diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/convenience_test.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/convenience_test.cpp new file mode 100644 index 0000000000..159f0d271f --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/convenience_test.cpp @@ -0,0 +1,177 @@ +// libs/filesystem/test/convenience_test.cpp -----------------------------------------// + +// Copyright Beman Dawes, 2002 +// Copyright Vladimir Prus, 2002 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/filesystem + +#include + +// See deprecated_test for tests of deprecated features +#ifndef BOOST_FILESYSTEM_NO_DEPRECATED +# define BOOST_FILESYSTEM_NO_DEPRECATED +#endif +#ifndef BOOST_SYSTEM_NO_DEPRECATED +# define BOOST_SYSTEM_NO_DEPRECATED +#endif + +#include + +#include +# if defined( BOOST_NO_STD_WSTRING ) +# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support +# endif + +#include +#include +#include +#include +#include + +namespace fs = boost::filesystem; +using fs::path; +namespace sys = boost::system; + +namespace +{ + template< typename F > + bool throws_fs_error(F func) + { + try { func(); } + + catch (const fs::filesystem_error &) + { + return true; + } + return false; + } + + void create_recursive_iterator(const fs::path & ph) + { + fs::recursive_directory_iterator it(ph); + } +} + +// ------------------------------------------------------------------------------------// + +int cpp_main(int, char*[]) +{ + +// create_directories() tests --------------------------------------------------------// + + BOOST_TEST(!fs::create_directories("/")); // should be harmless + + path unique_dir = fs::unique_path(); // unique name in case tests running in parallel + path unique_yy = unique_dir / "yy"; + path unique_yya = unique_dir / "yya"; + path unique_yy_zz = unique_dir / "yy" / "zz"; + + fs::remove_all(unique_dir); // make sure slate is blank + BOOST_TEST(!fs::exists(unique_dir)); // reality check + + BOOST_TEST(fs::create_directories(unique_dir)); + BOOST_TEST(fs::exists(unique_dir)); + BOOST_TEST(fs::is_directory(unique_dir)); + + BOOST_TEST(fs::create_directories(unique_yy_zz)); + BOOST_TEST(fs::exists(unique_dir)); + BOOST_TEST(fs::exists(unique_yy)); + BOOST_TEST(fs::exists(unique_yy_zz)); + BOOST_TEST(fs::is_directory(unique_dir)); + BOOST_TEST(fs::is_directory(unique_yy)); + BOOST_TEST(fs::is_directory(unique_yy_zz)); + + path is_a_file(unique_dir / "uu"); + { + std::ofstream f(is_a_file.string().c_str()); + BOOST_TEST(!!f); + } + BOOST_TEST(throws_fs_error( + boost::bind(fs::create_directories, is_a_file))); + BOOST_TEST(throws_fs_error( + boost::bind(fs::create_directories, is_a_file / "aa"))); + +// recursive_directory_iterator tests ----------------------------------------// + + sys::error_code ec; + fs::recursive_directory_iterator it("/no-such-path", ec); + BOOST_TEST(ec); + + BOOST_TEST(throws_fs_error( + boost::bind(create_recursive_iterator, "/no-such-path"))); + + fs::remove(unique_dir / "uu"); + +#ifdef BOOST_WINDOWS_API + // These tests depends on ordering of directory entries, and that's guaranteed + // on Windows but not necessarily on other operating systems + { + std::ofstream f(unique_yya.string().c_str()); + BOOST_TEST(!!f); + } + + for (it = fs::recursive_directory_iterator(unique_dir); + it != fs::recursive_directory_iterator(); ++it) + { std::cout << it->path() << '\n'; } + + it = fs::recursive_directory_iterator(unique_dir); + BOOST_TEST(it->path() == unique_yy); + BOOST_TEST(it.level() == 0); + ++it; + BOOST_TEST(it->path() == unique_yy_zz); + BOOST_TEST(it.level() == 1); + it.pop(); + BOOST_TEST(it->path() == unique_yya); + BOOST_TEST(it.level() == 0); + it++; + BOOST_TEST(it == fs::recursive_directory_iterator()); + + it = fs::recursive_directory_iterator(unique_dir); + BOOST_TEST(it->path() == unique_yy); + it.no_push(); + ++it; + BOOST_TEST(it->path() == unique_yya); + ++it; + BOOST_TEST(it == fs::recursive_directory_iterator()); + + fs::remove(unique_yya); +#endif + + it = fs::recursive_directory_iterator(unique_yy_zz); + BOOST_TEST(it == fs::recursive_directory_iterator()); + + it = fs::recursive_directory_iterator(unique_dir); + BOOST_TEST(it->path() == unique_yy); + BOOST_TEST(it.level() == 0); + ++it; + BOOST_TEST(it->path() == unique_yy_zz); + BOOST_TEST(it.level() == 1); + it++; + BOOST_TEST(it == fs::recursive_directory_iterator()); + + it = fs::recursive_directory_iterator(unique_dir); + BOOST_TEST(it->path() == unique_yy); + it.no_push(); + ++it; + BOOST_TEST(it == fs::recursive_directory_iterator()); + + it = fs::recursive_directory_iterator(unique_dir); + BOOST_TEST(it->path() == unique_yy); + ++it; + it.pop(); + BOOST_TEST(it == fs::recursive_directory_iterator()); + + ec.clear(); + BOOST_TEST(!ec); + // check that two argument failed constructor creates the end iterator + BOOST_TEST(fs::recursive_directory_iterator("nosuchdir", ec) + == fs::recursive_directory_iterator()); + BOOST_TEST(ec); + + fs::remove_all(unique_dir); // clean up behind ourselves + + return ::boost::report_errors(); +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/deprecated_test.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/deprecated_test.cpp new file mode 100644 index 0000000000..c3cacfcf52 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/deprecated_test.cpp @@ -0,0 +1,249 @@ +// deprecated_test program --------------------------------------------------// + +// Copyright Beman Dawes 2002 +// Copyright Vladimir Prus 2002 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +// This test verifies that various deprecated names still work. This is +// important to preserve existing code that uses the old names. + +#define BOOST_FILESYSTEM_DEPRECATED + +#include + +#include +# if defined( BOOST_NO_STD_WSTRING ) +# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support +# endif + +#include +#include + +namespace fs = boost::filesystem; +using boost::filesystem::path; + +#define PATH_CHECK(a, b) check(a, b, __LINE__) + +namespace +{ + std::string platform(BOOST_PLATFORM); + + void check(const fs::path & source, + const std::string & expected, int line) + { + if (source.generic_string()== expected) return; + + ++::boost::detail::test_errors(); + + std::cout << '(' << line << ") source.string(): \"" << source.string() + << "\" != expected: \"" << expected + << "\"" << std::endl; + } + + void normalize_test() + { + PATH_CHECK(path("").normalize(), ""); + PATH_CHECK(path("/").normalize(), "/"); + PATH_CHECK(path("//").normalize(), "//"); + PATH_CHECK(path("///").normalize(), "/"); + PATH_CHECK(path("f").normalize(), "f"); + PATH_CHECK(path("foo").normalize(), "foo"); + PATH_CHECK(path("foo/").normalize(), "foo/."); + PATH_CHECK(path("f/").normalize(), "f/."); + PATH_CHECK(path("/foo").normalize(), "/foo"); + PATH_CHECK(path("foo/bar").normalize(), "foo/bar"); + PATH_CHECK(path("..").normalize(), ".."); + PATH_CHECK(path("../..").normalize(), "../.."); + PATH_CHECK(path("/..").normalize(), "/.."); + PATH_CHECK(path("/../..").normalize(), "/../.."); + PATH_CHECK(path("../foo").normalize(), "../foo"); + PATH_CHECK(path("foo/..").normalize(), "."); + PATH_CHECK(path("foo/../").normalize(), "./."); + PATH_CHECK((path("foo") / "..").normalize() , "."); + PATH_CHECK(path("foo/...").normalize(), "foo/..."); + PATH_CHECK(path("foo/.../").normalize(), "foo/.../."); + PATH_CHECK(path("foo/..bar").normalize(), "foo/..bar"); + PATH_CHECK(path("../f").normalize(), "../f"); + PATH_CHECK(path("/../f").normalize(), "/../f"); + PATH_CHECK(path("f/..").normalize(), "."); + PATH_CHECK((path("f") / "..").normalize() , "."); + PATH_CHECK(path("foo/../..").normalize(), ".."); + PATH_CHECK(path("foo/../../").normalize(), "../."); + PATH_CHECK(path("foo/../../..").normalize(), "../.."); + PATH_CHECK(path("foo/../../../").normalize(), "../../."); + PATH_CHECK(path("foo/../bar").normalize(), "bar"); + PATH_CHECK(path("foo/../bar/").normalize(), "bar/."); + PATH_CHECK(path("foo/bar/..").normalize(), "foo"); + PATH_CHECK(path("foo/bar/../").normalize(), "foo/."); + PATH_CHECK(path("foo/bar/../..").normalize(), "."); + PATH_CHECK(path("foo/bar/../../").normalize(), "./."); + PATH_CHECK(path("foo/bar/../blah").normalize(), "foo/blah"); + PATH_CHECK(path("f/../b").normalize(), "b"); + PATH_CHECK(path("f/b/..").normalize(), "f"); + PATH_CHECK(path("f/b/../").normalize(), "f/."); + PATH_CHECK(path("f/b/../a").normalize(), "f/a"); + PATH_CHECK(path("foo/bar/blah/../..").normalize(), "foo"); + PATH_CHECK(path("foo/bar/blah/../../bletch").normalize(), "foo/bletch"); + PATH_CHECK(path("//net").normalize(), "//net"); + PATH_CHECK(path("//net/").normalize(), "//net/"); + PATH_CHECK(path("//..net").normalize(), "//..net"); + PATH_CHECK(path("//net/..").normalize(), "//net/.."); + PATH_CHECK(path("//net/foo").normalize(), "//net/foo"); + PATH_CHECK(path("//net/foo/").normalize(), "//net/foo/."); + PATH_CHECK(path("//net/foo/..").normalize(), "//net/"); + PATH_CHECK(path("//net/foo/../").normalize(), "//net/."); + + PATH_CHECK(path("/net/foo/bar").normalize(), "/net/foo/bar"); + PATH_CHECK(path("/net/foo/bar/").normalize(), "/net/foo/bar/."); + PATH_CHECK(path("/net/foo/..").normalize(), "/net"); + PATH_CHECK(path("/net/foo/../").normalize(), "/net/."); + + PATH_CHECK(path("//net//foo//bar").normalize(), "//net/foo/bar"); + PATH_CHECK(path("//net//foo//bar//").normalize(), "//net/foo/bar/."); + PATH_CHECK(path("//net//foo//..").normalize(), "//net/"); + PATH_CHECK(path("//net//foo//..//").normalize(), "//net/."); + + PATH_CHECK(path("///net///foo///bar").normalize(), "/net/foo/bar"); + PATH_CHECK(path("///net///foo///bar///").normalize(), "/net/foo/bar/."); + PATH_CHECK(path("///net///foo///..").normalize(), "/net"); + PATH_CHECK(path("///net///foo///..///").normalize(), "/net/."); + + if (platform == "Windows") + { + PATH_CHECK(path("c:..").normalize(), "c:.."); + PATH_CHECK(path("c:foo/..").normalize(), "c:"); + + PATH_CHECK(path("c:foo/../").normalize(), "c:."); + + PATH_CHECK(path("c:/foo/..").normalize(), "c:/"); + PATH_CHECK(path("c:/foo/../").normalize(), "c:/."); + PATH_CHECK(path("c:/..").normalize(), "c:/.."); + PATH_CHECK(path("c:/../").normalize(), "c:/../."); + PATH_CHECK(path("c:/../..").normalize(), "c:/../.."); + PATH_CHECK(path("c:/../../").normalize(), "c:/../../."); + PATH_CHECK(path("c:/../foo").normalize(), "c:/../foo"); + PATH_CHECK(path("c:/../foo/").normalize(), "c:/../foo/."); + PATH_CHECK(path("c:/../../foo").normalize(), "c:/../../foo"); + PATH_CHECK(path("c:/../../foo/").normalize(), "c:/../../foo/."); + PATH_CHECK(path("c:/..foo").normalize(), "c:/..foo"); + } + else // POSIX + { + PATH_CHECK(path("c:..").normalize(), "c:.."); + PATH_CHECK(path("c:foo/..").normalize(), "."); + PATH_CHECK(path("c:foo/../").normalize(), "./."); + PATH_CHECK(path("c:/foo/..").normalize(), "c:"); + PATH_CHECK(path("c:/foo/../").normalize(), "c:/."); + PATH_CHECK(path("c:/..").normalize(), "."); + PATH_CHECK(path("c:/../").normalize(), "./."); + PATH_CHECK(path("c:/../..").normalize(), ".."); + PATH_CHECK(path("c:/../../").normalize(), "../."); + PATH_CHECK(path("c:/../foo").normalize(), "foo"); + PATH_CHECK(path("c:/../foo/").normalize(), "foo/."); + PATH_CHECK(path("c:/../../foo").normalize(), "../foo"); + PATH_CHECK(path("c:/../../foo/").normalize(), "../foo/."); + PATH_CHECK(path("c:/..foo").normalize(), "c:/..foo"); + } + } + + // Compile-only tests not intended to be executed -----------------------------------// + + void compile_only() + { + fs::path p; + + fs::initial_path(); + fs::initial_path(); + + p.file_string(); + p.directory_string(); + } + + // path_rename_test -----------------------------------------------------------------// + + void path_rename_test() + { + fs::path p("foo/bar/blah"); + + BOOST_TEST_EQ(path("foo/bar/blah").remove_leaf(), "foo/bar"); + BOOST_TEST_EQ(p.leaf(), "blah"); + BOOST_TEST_EQ(p.branch_path(), "foo/bar"); + BOOST_TEST(p.has_leaf()); + BOOST_TEST(p.has_branch_path()); + BOOST_TEST(!p.is_complete()); + + if (platform == "Windows") + { + BOOST_TEST_EQ(path("foo\\bar\\blah").remove_leaf(), "foo\\bar"); + p = "foo\\bar\\blah"; + BOOST_TEST_EQ(p.branch_path(), "foo\\bar"); + } + } + +} // unnamed namespace + + +//--------------------------------------------------------------------------------------// + +int cpp_main(int /*argc*/, char* /*argv*/[]) +{ + // The choice of platform is make at runtime rather than compile-time + // so that compile errors for all platforms will be detected even though + // only the current platform is runtime tested. + platform = (platform == "Win32" || platform == "Win64" || platform == "Cygwin") + ? "Windows" + : "POSIX"; + std::cout << "Platform is " << platform << '\n'; + + BOOST_TEST(fs::initial_path() == fs::current_path()); + + //path::default_name_check(fs::no_check); + + fs::directory_entry de("foo/bar"); + + de.replace_leaf("", fs::file_status(), fs::file_status()); + + //de.leaf(); + //de.string(); + + fs::path ng(" no-way, Jose"); + BOOST_TEST(!fs::is_regular(ng)); // verify deprecated name still works + BOOST_TEST(!fs::symbolic_link_exists("nosuchfileordirectory")); + + path_rename_test(); + normalize_test(); + +// extension() tests ---------------------------------------------------------// + + BOOST_TEST(fs::extension("a/b") == ""); + BOOST_TEST(fs::extension("a/b.txt") == ".txt"); + BOOST_TEST(fs::extension("a/b.") == "."); + BOOST_TEST(fs::extension("a.b.c") == ".c"); + BOOST_TEST(fs::extension("a.b.c.") == "."); + BOOST_TEST(fs::extension("") == ""); + BOOST_TEST(fs::extension("a/") == ""); + +// basename() tests ----------------------------------------------------------// + + BOOST_TEST(fs::basename("b") == "b"); + BOOST_TEST(fs::basename("a/b.txt") == "b"); + BOOST_TEST(fs::basename("a/b.") == "b"); + BOOST_TEST(fs::basename("a.b.c") == "a.b"); + BOOST_TEST(fs::basename("a.b.c.") == "a.b.c"); + BOOST_TEST(fs::basename("") == ""); + +// change_extension tests ---------------------------------------------------// + + BOOST_TEST(fs::change_extension("a.txt", ".tex").string() == "a.tex"); + BOOST_TEST(fs::change_extension("a.", ".tex").string() == "a.tex"); + BOOST_TEST(fs::change_extension("a", ".txt").string() == "a.txt"); + BOOST_TEST(fs::change_extension("a.b.txt", ".tex").string() == "a.b.tex"); + // see the rationale in html docs for explanation why this works + BOOST_TEST(fs::change_extension("", ".png").string() == ".png"); + + return ::boost::report_errors(); +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/design_use_cases.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/design_use_cases.cpp new file mode 100644 index 0000000000..49b0c28c08 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/design_use_cases.cpp @@ -0,0 +1,81 @@ +#include +#include + +// Minimal class path + +class path +{ +public: + path( const char * ) + { + std::cout << "path( const char * )\n"; + } + path( const std::string & ) + { + std::cout << "path( std::string & )\n"; + } + +// for maximum efficiency, either signature must work +# ifdef BY_VALUE + operator const std::string() const +# else + operator const std::string&() const +# endif + { + std::cout << "operator string\n"; + return m_path; + } + +#ifdef NAMED_CONVERSION + std::string string() const + { + std::cout << "std::string string() const\n"; + return m_path; + } +#endif + +private: + std::string m_path; +}; + +bool operator==( const path &, const path & ) +{ + std::cout << "operator==( const path &, const path & )\n"; + return true; +} + +// These are the critical use cases. If any of these don't compile, usability +// is unacceptably degraded. + +void f( const path & ) +{ + std::cout << "f( const path & )\n"; +} + +int main() +{ + f( "foo" ); + f( std::string( "foo" ) ); + f( path( "foo" ) ); + + std::cout << '\n'; + + std::string s1( path( "foo" ) ); + std::string s2 = path( "foo" ); + s2 = path( "foo" ); + +#ifdef NAMED_CONVERSION + s2 = path( "foo" ).string(); +#endif + + std::cout << '\n'; + + // these must call bool path( const path &, const path & ); + path( "foo" ) == path( "foo" ); + path( "foo" ) == "foo"; + path( "foo" ) == std::string( "foo" ); + "foo" == path( "foo" ); + std::string( "foo" ) == path( "foo" ); + + return 0; +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/equivalent.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/equivalent.cpp new file mode 100644 index 0000000000..be3089afd6 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/equivalent.cpp @@ -0,0 +1,39 @@ +// equivalent program -------------------------------------------------------// + +// Copyright (c) 2004 Beman Dawes + +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy +// at http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/filesystem + +//----------------------------------------------------------------------------// + +#include +#include +#include + +int main( int argc, char * argv[] ) +{ + boost::filesystem::path::default_name_check( boost::filesystem::native ); + if ( argc != 3 ) + { + std::cout << "Usage: equivalent path1 path2\n"; + return 2; + } + + bool eq; + try + { + eq = boost::filesystem::equivalent( argv[1], argv[2] ); + } + catch ( const std::exception & ex ) + { + std::cout << ex.what() << "\n"; + return 3; + } + + std::cout << (eq ? "Paths are equivalent\n" : "Paths are not equivalent\n"); + return !eq; +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/fstream_test.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/fstream_test.cpp new file mode 100644 index 0000000000..09c3721d7e --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/fstream_test.cpp @@ -0,0 +1,169 @@ +// fstream_test.cpp ------------------------------------------------------------------// + +// Copyright Beman Dawes 2002 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include + +// See deprecated_test for tests of deprecated features +#ifndef BOOST_FILESYSTEM_NO_DEPRECATED +# define BOOST_FILESYSTEM_NO_DEPRECATED +#endif +#ifndef BOOST_SYSTEM_NO_DEPRECATED +# define BOOST_SYSTEM_NO_DEPRECATED +#endif + +#include + +#include +# if defined( BOOST_NO_STD_WSTRING ) +# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support +# endif + +#include +#include +#include +#include // for std::remove + +#include + +namespace fs = boost::filesystem; + +#include +#ifdef BOOST_NO_STDC_NAMESPACE + namespace std { using ::remove; } +#endif + +#include +#include + +namespace +{ + bool cleanup = true; + + void test(const fs::path & p) + { + fs::remove(p); + { + std::cout << " in test 1\n"; + fs::filebuf fb1; + fb1.open(p, std::ios_base::out); + BOOST_TEST(fb1.is_open()); + } + { + std::cout << " in test 2\n"; + fs::filebuf fb2; + fb2.open(p, std::ios_base::in); + BOOST_TEST(fb2.is_open()); + } + { + std::cout << " in test 3\n"; + fs::ifstream tfs(p); + BOOST_TEST(tfs.is_open()); + } + { + std::cout << " in test 4\n"; + fs::ifstream tfs(p / p.filename()); // should fail + BOOST_TEST(!tfs.is_open()); + } + { + std::cout << " in test 5\n"; + fs::ifstream tfs(p, std::ios_base::in); + BOOST_TEST(tfs.is_open()); + } + { + std::cout << " in test 6\n"; + fs::ifstream tfs; + tfs.open(p); + BOOST_TEST(tfs.is_open()); + } + { + std::cout << " in test 7\n"; + fs::ifstream tfs; + tfs.open(p, std::ios_base::in); + BOOST_TEST(tfs.is_open()); + } + { + std::cout << " in test 8\n"; + fs::ofstream tfs(p); + BOOST_TEST(tfs.is_open()); + } + { + std::cout << " in test 9\n"; + fs::ofstream tfs(p, std::ios_base::out); + BOOST_TEST(tfs.is_open()); + } + { + std::cout << " in test 10\n"; + fs::ofstream tfs; + tfs.open(p); + BOOST_TEST(tfs.is_open()); + } + { + std::cout << " in test 11\n"; + fs::ofstream tfs; + tfs.open(p, std::ios_base::out); + BOOST_TEST(tfs.is_open()); + } + { + std::cout << " in test 12\n"; + fs::fstream tfs(p); + BOOST_TEST(tfs.is_open()); + } + { + std::cout << " in test 13\n"; + fs::fstream tfs(p, std::ios_base::in|std::ios_base::out); + BOOST_TEST(tfs.is_open()); + } + { + std::cout << " in test 14\n"; + fs::fstream tfs; + tfs.open(p); + BOOST_TEST(tfs.is_open()); + } + { + std::cout << " in test 15\n"; + fs::fstream tfs; + tfs.open(p, std::ios_base::in|std::ios_base::out); + BOOST_TEST(tfs.is_open()); + } + + if (cleanup) + fs::remove(p); + + } // test +} // unnamed namespace + +int cpp_main(int argc, char*[]) +{ + if (argc > 1) cleanup = false; + + std::cout << "BOOST_FILESYSTEM_C_STR defined as \"" + << BOOST_STRINGIZE(BOOST_FILESYSTEM_C_STR) << "\"\n"; + + // test narrow characters + std::cout << "narrow character tests:\n"; + test("narrow_fstream_test"); + + + // So that tests are run with known encoding, use Boost UTF-8 codecvt + std::locale global_loc = std::locale(); + std::locale loc(global_loc, new fs::detail::utf8_codecvt_facet); + fs::path::imbue(loc); + + // test with some wide characters + // \u2780 is circled 1 against white background == e2 9e 80 in UTF-8 + // \u2781 is circled 2 against white background == e2 9e 81 in UTF-8 + // \u263A is a white smiling face + std::cout << "\nwide character tests:\n"; + std::wstring ws(L"wide_fstream_test_"); + ws += 0x2780; + ws += 0x263A; + test(ws); + + return ::boost::report_errors(); +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/issues/10038.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/issues/10038.cpp new file mode 100644 index 0000000000..341e7a9401 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/issues/10038.cpp @@ -0,0 +1,8 @@ +#include + +int main(void) +{ + boost::filesystem::copy_file("a", "b"); + return 0; +} + diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/issues/10205.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/issues/10205.cpp new file mode 100644 index 0000000000..4cf5e728d3 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/issues/10205.cpp @@ -0,0 +1,17 @@ +// Linux test; before running: export LANG=foo + +#include +#include +#include +#include + +int main() +{ + std::string pathname = "/some/filesystem/path/%%%%"; + + boost::filesystem::path path(pathname); + + std::wcout << path.wstring() << std::endl; + + return 0; +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/issues/10485.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/issues/10485.cpp new file mode 100644 index 0000000000..81ba2136d3 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/issues/10485.cpp @@ -0,0 +1,14 @@ +// Copyright iamvfx@gmail.com 2014 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#include +#include + +int main() +{ + boost::filesystem::path dir("/"); + for (char c : dir.filename().string()) + printf("%c\n", c); +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/issues/10641.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/issues/10641.cpp new file mode 100644 index 0000000000..ff90784ed6 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/issues/10641.cpp @@ -0,0 +1,20 @@ +#include +#include +using namespace std; +namespace fs = boost::filesystem; +int main(int argc, char** argv) +{ + + try + { + fs::path my_path("test/test.txt"); + cout << "current path is " << my_path << endl; + cout << "parent path is " << my_path.parent_path() << endl; + } + catch(std::exception& e) { + cerr << endl << "Error during execution: " << e.what() << endl << endl; + return EXIT_FAILURE; + } + return EXIT_SUCCESS; +} + diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/issues/3332/test.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/issues/3332/test.cpp new file mode 100644 index 0000000000..9456a7a835 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/issues/3332/test.cpp @@ -0,0 +1,37 @@ +#include +#include +#include +#include +#include + +namespace fs = boost::filesystem; + +int main(void) { + + std::locale global_loc = std::locale(); + std::locale loc(global_loc, new stdext::cvt::codecvt_cp950); + fs::path::imbue(loc); + + std::cout << + "HEADS UP! PIPE OUTPUT TO FILE AND INSPECT WITH HEX OR CP950 EDITOR.\n" + "WINDOWS COMMAND PROMPT FONTS DON'T SUPPORT CHINESE,\n" + "EVEN WITH CODEPAGE SET AND EVEN AS OF WIN 10 TECH PREVIEW." << std::endl; + + fs::recursive_directory_iterator end; + fs::recursive_directory_iterator iter + ("C:/boost/test-files/utf-8"); + + while (iter != end) + { + if (fs::is_directory(*iter)) + { + std::cout << "[directory] " << iter->path().generic_string() << std::endl; + } + else if (fs::is_regular(*iter)) + { + std::cout << " [file] " << iter->path().generic_string() << std::endl; + } + ++iter; + } + return 0; +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/issues/4329.-basename.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/issues/4329.-basename.cpp new file mode 100644 index 0000000000..a07648b32b --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/issues/4329.-basename.cpp @@ -0,0 +1,20 @@ +#include +#include +using boost::filesystem::path; + +int main() +{ + std::cout << path("a").stem() << std::endl; + std::cout << path("a/").stem() << std::endl; + std::cout << path("a/b").stem() << std::endl; + std::cout << path("a/b/").stem() << std::endl; + std::cout << path("a/b/c").stem() << std::endl; + std::cout << path("a/b/c/").stem() << std::endl; + std::cout << path("a/b/c/d").stem() << std::endl; + std::cout << path("a/b/c/d/").stem() << std::endl; + std::cout << path("a/b/c/d/e").stem() << std::endl; + std::cout << path("a/b/c/d/e/").stem() << std::endl; + return 0; +} + + diff --git a/ThirdParty/Ert/python/python/ert/ecl/ecl_queue.py b/ThirdParty/boost-Subset/libs/filesystem/test/issues/5300-temp-dir-path-130.cpp similarity index 100% rename from ThirdParty/Ert/python/python/ert/ecl/ecl_queue.py rename to ThirdParty/boost-Subset/libs/filesystem/test/issues/5300-temp-dir-path-130.cpp diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/issues/8930.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/issues/8930.cpp new file mode 100644 index 0000000000..280e5ed63d --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/issues/8930.cpp @@ -0,0 +1,7 @@ +// Before running this test: export LANG=foo + +#include +int main() { + boost::filesystem::path("/abc").root_directory(); +} + diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/issues/9054_static_const_codecvt_segfault_pre_main.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/issues/9054_static_const_codecvt_segfault_pre_main.cpp new file mode 100644 index 0000000000..e30617e0b0 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/issues/9054_static_const_codecvt_segfault_pre_main.cpp @@ -0,0 +1,10 @@ +#include "boost/filesystem.hpp" + +static const boost::filesystem::path::codecvt_type &dummy = + boost::filesystem::path::codecvt(); + +int main() +{ + return 0; +} + diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/issues/9219.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/issues/9219.cpp new file mode 100644 index 0000000000..85d4b5c7f9 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/issues/9219.cpp @@ -0,0 +1,40 @@ +// Boost 9219.cpp --------------------------------------------------------------------// + +// Copyright Beman Dawes 2014 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +//--------------------------------------------------------------------------------------// +// // +// In researching filesystem issues it is convenient to have a program that can be // +// quickly modified to test reported problems. That's the purpose of this file and // +// its associated Visual Studio and Boost.Build infrastructure. // +// // +//--------------------------------------------------------------------------------------// + +#include + +#include + +#include +#include +#include + +using std::cout; +using std::endl; +namespace fs = boost::filesystem; + +//------------------------------------ cpp_main --------------------------------------// + +int cpp_main(int argc, char* argv[]) +{ + cout << "Hello, 9219" << endl; + cout << "This is a test for non-Windows systems" << endl; + + BOOST_TEST(fs::exists(const_cast("."))); + + return ::boost::report_errors(); +} // cpp_main diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/issues/Jamfile.v2 b/ThirdParty/boost-Subset/libs/filesystem/test/issues/Jamfile.v2 new file mode 100644 index 0000000000..7f986ad8cf --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/issues/Jamfile.v2 @@ -0,0 +1,35 @@ +# Boost Filesystem test/issues Jamfile + +# Copyright Beman Dawes 2014 + +# Distributed under the Boost Software License, Version 1.0. +# See www.boost.org/LICENSE_1_0.txt + +# Library home page: http://www.boost.org/libs/filesystem + +project + : requirements + /boost/filesystem//boost_filesystem + /boost/system//boost_system + msvc:on + static + ; + + test-suite "filesystem-issues" : +# [ run 9054_static_const_codecvt_segfault_pre_main.cpp +# : : : shared : 9054_shared ] +# [ run 9054_static_const_codecvt_segfault_pre_main.cpp +# : : : static : 9054_static ] +# [ run hello_filesystem.cpp +# : : : shared : hello_shared ] +# [ run hello_filesystem.cpp +# : : : static : hello_static ] +# [ run 9219.cpp +# : : : shared : 9219_shared ] +# [ run 9219.cpp +# : : : static : 9219_static ] +# [ run 10485.cpp +# : : : shared always_show_run_output ] + [ run copy_file-compilation-error-2015-05-04.cpp ] + ; + diff --git a/ThirdParty/Ert/python/python/ert/rms/librms.py b/ThirdParty/boost-Subset/libs/filesystem/test/issues/boost-no-inspect similarity index 100% rename from ThirdParty/Ert/python/python/ert/rms/librms.py rename to ThirdParty/boost-Subset/libs/filesystem/test/issues/boost-no-inspect diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/issues/copy_file-compilation-error-2015-05-04.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/issues/copy_file-compilation-error-2015-05-04.cpp new file mode 100644 index 0000000000..c9034d6f96 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/issues/copy_file-compilation-error-2015-05-04.cpp @@ -0,0 +1,14 @@ +// Rob Conde reports this fails +// to compile for Boost 1.58 with g++ 4.4.7 but is OK with FC++ 2013 + +#include "boost/filesystem/operations.hpp" + +void myFunc() +{ + using namespace boost::filesystem; + + copy_option opt(copy_option::overwrite_if_exists); + + copy_file(path("p1"),path("p2"),copy_option::overwrite_if_exists); +// copy_file(path("p1"),path("p2"),opt); +} \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/issues/fchmodat_AT_SYMLINK_NOFOLLOW_6659.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/issues/fchmodat_AT_SYMLINK_NOFOLLOW_6659.cpp new file mode 100644 index 0000000000..e69f9ba21b --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/issues/fchmodat_AT_SYMLINK_NOFOLLOW_6659.cpp @@ -0,0 +1,38 @@ +// Test program to demonstrate that Linux does not support AT_SYMLINK_NOFOLLOW + +// Copyright Duncan Exon Smith 2012 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Test this by running: +// +// rm -rf data && mkdir data && g++ -otest-fchmodat fchmodat_AT_SYMLINK_NOFOLLOW_6659.cpp && (cd data && ../test-fchmodat) +// +// If no assertions go off, then it looks like fchmodat is supported, +// but AT_SYMLINK_NOFOLLOW is not supported. + +#include +#include +#include +#include +#include + +#ifdef NDEBUG +# error This program depends on assert() so makes no sense if NDEBUG is defined +#endif + +int main(int argc, char *argv[]) +{ + { std::ofstream file("out"); file << "contents"; } + + assert(!::symlink("out", "sym")); + + assert(!::fchmodat(AT_FDCWD, "out", S_IRUSR | S_IWUSR | S_IXUSR, 0)); + assert(!::fchmodat(AT_FDCWD, "sym", S_IRUSR | S_IWUSR | S_IXUSR, 0)); + + assert(::fchmodat(AT_FDCWD, "sym", S_IRUSR | S_IWUSR | S_IXUSR, AT_SYMLINK_NOFOLLOW) == -1); + assert(errno == ENOTSUP); + + return 0; +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/issues/hello_filesystem.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/issues/hello_filesystem.cpp new file mode 100644 index 0000000000..f98b2f717f --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/issues/hello_filesystem.cpp @@ -0,0 +1,39 @@ +// Boost hello_filesystem.cpp --------------------------------------------------------// + +// Copyright Beman Dawes 2014 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +//--------------------------------------------------------------------------------------// +// // +// In researching filesystem issues it is convenient to have a program that can be // +// quickly modified to test reported problems. That's the purpose of this file and // +// its associated Visual Studio and Boost.Build infrastructure. // +// // +//--------------------------------------------------------------------------------------// + +#include + +#include + +#include +#include +#include + +using std::cout; +using std::endl; +namespace fs = boost::filesystem; + +//------------------------------------ cpp_main --------------------------------------// + +int cpp_main(int argc, char* argv[]) +{ + cout << "Hello, filesystem world" << endl; + + BOOST_TEST(fs::exists(".")); + + return ::boost::report_errors(); +} // cpp_main diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/issues/readme.txt b/ThirdParty/boost-Subset/libs/filesystem/test/issues/readme.txt new file mode 100644 index 0000000000..cf8198e5c0 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/issues/readme.txt @@ -0,0 +1,9 @@ +This directory contains tests related to specific issues. + +The names are intended to indicate both the function or condition being tested +and the issue number. + +----- +Copyright Beman Dawes 2012 +Distributed under the Boost Software License, Version 1.0. +See http://www.boost.org/LICENSE_1_0.txt diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/issues/recurse_dir_iter_5403.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/issues/recurse_dir_iter_5403.cpp new file mode 100644 index 0000000000..a9c92c9fd4 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/issues/recurse_dir_iter_5403.cpp @@ -0,0 +1,132 @@ +// Boost Filesystem recurse_dir_iter_test.cpp ----------------------------------------// + +// Copyright Beman Dawes 2014. + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include + +// See deprecated_test for tests of deprecated features +#ifndef BOOST_FILESYSTEM_NO_DEPRECATED +# define BOOST_FILESYSTEM_NO_DEPRECATED +#endif +#ifndef BOOST_SYSTEM_NO_DEPRECATED +# define BOOST_SYSTEM_NO_DEPRECATED +#endif + +#include + +#include +# if defined( BOOST_NO_STD_WSTRING ) +# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support +# endif + +#include +#include +#include + +namespace fs = boost::filesystem; +using boost::system::error_code; +using boost::system::system_category; +using boost::system::system_error; + +#include + +using std::cout; +using std::endl; + +#ifdef BOOST_WINDOWS_API +# include +#endif +namespace +{ + typedef int errno_t; + std::string platform(BOOST_PLATFORM); + bool report_throws = false; + bool cleanup = true; + bool skip_long_windows_tests = false; + unsigned short language_id; // 0 except for Windows + +} // unnamed namespace + +//------------------------------------------------------------------------------------// +// // +// main // +// // +//------------------------------------------------------------------------------------// + +int cpp_main(int argc, char* argv[]) +{ + // document state of critical macros +#ifdef BOOST_POSIX_API + cout << "BOOST_POSIX_API is defined\n"; +#endif +#ifdef BOOST_WINDOWS_API + cout << "BOOST_WINDOWS_API is defined\n"; +#endif + + for (; argc > 1; --argc, ++argv) + { + //if (*argv[1]=='-' && *(argv[1]+1)=='t') + // report_throws = true; + //else if (*argv[1]=='-' && *(argv[1]+1)=='x') + // cleanup = false; + //else if (*argv[1]=='-' && *(argv[1]+1)=='w') + // skip_long_windows_tests = true; + } + + // The choice of platform to test is made at runtime rather than compile-time + // so that compile errors for all platforms will be detected even though + // only the current platform is runtime tested. +# if defined(BOOST_POSIX_API) + platform = "POSIX"; +# elif defined(BOOST_WINDOWS_API) + platform = "Windows"; +# if !defined(__MINGW32__) && !defined(__CYGWIN__) + language_id = ::GetUserDefaultUILanguage(); +# else + language_id = 0x0409; // Assume US English +# endif +# else +# error neither BOOST_POSIX_API nor BOOST_WINDOWS_API is defined. See boost/system/api_config.hpp +# endif + cout << "API is " << platform << endl; + cout << "initial_path() is " << fs::initial_path() << endl; + fs::path ip = fs::initial_path(); + + for (fs::path::const_iterator it = ip.begin(); it != ip.end(); ++it) + { + if (it != ip.begin()) + cout << ", "; + cout << *it; + } + cout << endl; + + // From the root, walk the directory tree looking for a permissions error + + fs::recursive_directory_iterator it("/"); + fs::recursive_directory_iterator end_it; + + // The increment function has an invarient that it always makes progress, + // so even if an error occurs this loop will eventually terminate. + + while (it != end_it) + { + error_code ec; + fs::path init_path = it->path(); + it.increment(ec); + if (ec) + { + cout << "initial path: " << init_path << endl; + cout << "error_code: " << ec.value() << " with msg: " << ec.message() << endl; + if (it != end_it) + cout << "post-increment path: " << it->path() << endl; + } + } + + cout << "returning from main()" << endl; + return ::boost::report_errors(); +} // main diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/large_file_support_test.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/large_file_support_test.cpp new file mode 100644 index 0000000000..553e09d8ca --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/large_file_support_test.cpp @@ -0,0 +1,42 @@ +// Boost large_file_support_test.cpp ---------------------------------------// + +// Copyright Beman Dawes 2004. +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/filesystem + +// See deprecated_test for tests of deprecated features +#define BOOST_FILESYSTEM_NO_DEPRECATED +#define BOOST_SYSTEM_NO_DEPRECATED + +#include + +#include +# if defined( BOOST_NO_STD_WSTRING ) +# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support +# endif + +namespace fs = boost::filesystem; + +#include + +int main() +{ + if ( fs::detail::possible_large_file_size_support() ) + { + std::cout << "It appears that file sizes greater that 2 gigabytes are possible\n" + "for this configuration on this platform since the operating system\n" + "does use a large enough integer type to report large file sizes.\n\n" + "Whether or not such support is actually present depends on the OS\n"; + return 0; + } + std::cout << "The operating system is using an integer type to report file sizes\n" + "that can not represent file sizes greater that 2 gigabytes (31-bits).\n" + "Thus the Filesystem Library will not correctly deal with such large\n" + "files. If you think that this operatiing system should be able to\n" + "support large files, please report the problem to the Boost developers\n" + "mailing list.\n"; + return 1; +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/locale_info.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/locale_info.cpp new file mode 100644 index 0000000000..db57bb1588 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/locale_info.cpp @@ -0,0 +1,88 @@ +// locale_info.cpp ---------------------------------------------------------// + +// Copyright Beman Dawes 2011 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#include +#include +#include +#include +using namespace std; + +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4996) // ... Function call with parameters that may be unsafe +#endif + +namespace +{ + void facet_info(const locale& loc, const char* msg) + { + cout << "has_facet >(" + << msg << ") is " + << (has_facet >(loc) + ? "true\n" + : "false\n"); + } + + void default_info() + { + try + { + locale loc; + cout << "\nlocale default construction OK" << endl; + facet_info(loc, "locale()"); + } + catch (const exception& ex) + { + cout << "\nlocale default construction threw: " << ex.what() << endl; + } + } + + void null_string_info() + { + try + { + locale loc(""); + cout << "\nlocale(\"\") construction OK" << endl; + facet_info(loc, "locale(\"\")"); + } + catch (const exception& ex) + { + cout << "\nlocale(\"\") construction threw: " << ex.what() << endl; + } + } + + void classic_info() + { + try + { + locale loc(locale::classic()); + cout << "\nlocale(locale::classic()) copy construction OK" << endl; + facet_info(loc, "locale::classic()"); + } + catch (const exception& ex) + { + cout << "\nlocale(locale::clasic()) copy construction threw: " << ex.what() << endl; + } + } +} + +int main() +{ + const char* lang = getenv("LANG"); + cout << "\nLANG environmental variable is " + << (lang ? lang : "not present") << endl; + + default_info(); + null_string_info(); + classic_info(); + + return 0; +} + +#ifdef _MSC_VER +# pragma warning(pop) +#endif diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/long_path_test.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/long_path_test.cpp new file mode 100644 index 0000000000..fd4a7fcb57 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/long_path_test.cpp @@ -0,0 +1,59 @@ +// long_path_test.cpp ----------------------------------------------------------------// + +// Copyright Beman Dawes 2011 + +// Distributed under the Boost Software License, Version 1.0. +// http://www.boost.org/LICENSE_1_0.txt + +// See http://www.boost.org/libs/btree for documentation. + +// See http://msdn.microsoft.com/en-us/library/aa365247%28v=vs.85%29.aspx + +#include + +#include +#include +#include + +using namespace boost::filesystem; + +#include +#include + +namespace +{ +} // unnamed namespace + +int cpp_main(int, char*[]) +{ + + std::string prefix("d:\\temp\\"); + std::cout << "prefix is " << prefix << '\n'; + + const std::size_t safe_size + = 260 - prefix.size() - 100; // Windows MAX_PATH is 260 + + std::string safe_x_string(safe_size, 'x'); + std::string safe_y_string(safe_size, 'y'); + std::string path_escape("\\\\?\\"); + + path x_p(prefix + safe_x_string); + path y_p(path_escape + prefix + safe_x_string + "\\" + safe_y_string); + + std::cout << "x_p.native().size() is " << x_p.native().size() << '\n'; + std::cout << "y_p.native().size() is " << y_p.native().size() << '\n'; + + create_directory(x_p); + BOOST_TEST(exists(x_p)); + create_directory(y_p); + BOOST_TEST(exists(y_p)); + + //std::cout << "directory x.../y... ready for testing, where ... is " << safe_size + // << " repeats of x and y, respectively\n"; + + BOOST_TEST(exists(x_p)); + + //remove_all(x_p); + + return ::boost::report_errors(); +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/macro_default_test.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/macro_default_test.cpp new file mode 100644 index 0000000000..4f8de1960e --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/macro_default_test.cpp @@ -0,0 +1,36 @@ +// macro_default_test program --------------------------------------------------------// + +// Copyright Beman Dawes 2012 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#undef BOOST_ALL_DYN_LINK +#undef BOOST_ALL_STATIC_LINK +#undef BOOST_FILESYSTEM_DYN_LINK +#undef BOOST_FILESYSTEM_STATIC_LINK +#undef BOOST_SYSTEM_DYN_LINK +#undef BOOST_SYSTEM_STATIC_LINK + +#ifndef BOOST_ALL_NO_LIB +# define BOOST_ALL_NO_LIB +#endif + +#include +#include + +#ifndef BOOST_FILESYSTEM_STATIC_LINK +# error BOOST_FILESYSTEM_STATIC_LINK not set by default +#endif + + +#ifndef BOOST_SYSTEM_STATIC_LINK +# error BOOST_SYSTEM_STATIC_LINK not set by default +#endif + +int main() +{ + return 0; +} diff --git a/ThirdParty/Ert/python/tests/core/ecl/__init__.py b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/boost-no-inspect similarity index 100% rename from ThirdParty/Ert/python/tests/core/ecl/__init__.py rename to ThirdParty/boost-Subset/libs/filesystem/test/msvc/boost-no-inspect diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/common.props b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/common.props new file mode 100644 index 0000000000..6ac5ad6bcc --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/common.props @@ -0,0 +1,18 @@ + + + + <_ProjectFileVersion>10.0.30319.1 + + + + ../../../../..;%(AdditionalIncludeDirectories) + BOOST_SYSTEM_NO_DEPRECATED;BOOST_ALL_NO_LIB;BOOST_ALL_DYN_LINK;%(PreprocessorDefinitions) + Async + false + Level4 + + + %(AdditionalLibraryDirectories) + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/convenience_test/convenience_test.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/convenience_test/convenience_test.vcxproj new file mode 100644 index 0000000000..14dfa17575 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/convenience_test/convenience_test.vcxproj @@ -0,0 +1,108 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {08986FB5-0C83-4BC4-92DF-05E12E1C03C1} + convenience_test + Win32Proj + + + + Application + Unicode + true + v140 + + + Application + Unicode + v140 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + true + false + + + + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level4 + + + true + Console + MachineX86 + + + Executing test $(TargetName).exe... + "$(TargetDir)\$(TargetName).exe" + + + + + MaxSpeed + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level4 + ProgramDatabase + + + true + Console + true + true + MachineX86 + + + Executing test $(TargetName).exe... + "$(TargetDir)\$(TargetName).exe" + + + + + + + + {ffd738f7-96f0-445c-81ea-551665ef53d1} + false + + + {f94ccadd-a90b-480c-a304-c19d015d36b1} + false + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/deprecated_test/deprecated_test.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/deprecated_test/deprecated_test.vcxproj new file mode 100644 index 0000000000..1c5f1b3f66 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/deprecated_test/deprecated_test.vcxproj @@ -0,0 +1,108 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {D73BC50F-956E-4A44-BF9F-A8BB80DF0000} + deprecated_test + Win32Proj + + + + Application + Unicode + true + v140 + + + Application + Unicode + v140 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + true + false + + + + Disabled + BOOST_ALL_NO_LIB;BOOST_SYSTEM_DYN_LINK;BOOST_FILESYSTEM_DYN_LINK;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level4 + + + true + Console + MachineX86 + + + Executing test $(TargetName).exe... + "$(TargetDir)\$(TargetName).exe" + + + + + MaxSpeed + true + BOOST_ALL_NO_LIB;BOOST_SYSTEM_DYN_LINK;BOOST_FILESYSTEM_DYN_LINK;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level4 + ProgramDatabase + + + true + Console + true + true + MachineX86 + + + Executing test $(TargetName).exe... + "$(TargetDir)\$(TargetName).exe" + + + + + + + + {ffd738f7-96f0-445c-81ea-551665ef53d1} + false + + + {f94ccadd-a90b-480c-a304-c19d015d36b1} + false + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/exec_monitor_dll/exec_monitor_dll.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/exec_monitor_dll/exec_monitor_dll.vcxproj new file mode 100644 index 0000000000..2b73824eae --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/exec_monitor_dll/exec_monitor_dll.vcxproj @@ -0,0 +1,88 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {0EA788CA-FA52-4290-A4D0-F616390B203B} + Win32Proj + exec_monitor_dll + + + + DynamicLibrary + true + Unicode + v120 + + + DynamicLibrary + false + true + Unicode + v120 + + + + + + + + + + + + + + + true + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;EXEC_MONITOR_DLL_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;EXEC_MONITOR_DLL_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + true + true + + + + + + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/exec_monitor_lib/exec_monitor_lib.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/exec_monitor_lib/exec_monitor_lib.vcxproj new file mode 100644 index 0000000000..782094bc22 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/exec_monitor_lib/exec_monitor_lib.vcxproj @@ -0,0 +1,81 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + + + + + + {272DFC15-6292-49DF-B457-6784A183EAC3} + Win32Proj + exec_monitor_lib + + + + StaticLibrary + true + Unicode + v120 + + + StaticLibrary + false + true + Unicode + v120 + + + + + + + + + + + + + + + NotUsing + Level3 + Disabled + BOOST_ALL_NO_LIB;BOOST_ALL_STATIC_LINK;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + ../../../../..;%(AdditionalIncludeDirectories) + + + Windows + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + BOOST_ALL_NO_LIB;BOOST_ALL_STATIC_LINK;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + ../../../../..;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/file_status/file_status.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/file_status/file_status.vcxproj new file mode 100644 index 0000000000..1a746ce8d8 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/file_status/file_status.vcxproj @@ -0,0 +1,102 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {43C4B4D8-0893-4C86-B9FD-6A7DEB1A4426} + Win32Proj + file_status + + + + Application + true + Unicode + v140 + + + Application + false + true + Unicode + v140 + + + + + + + + + + + + + + + true + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + + + "$(TargetDir)\$(TargetName).exe" + Executing test $(TargetName).exe... + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + "$(TargetDir)\$(TargetName).exe" + Executing test $(TargetName).exe... + + + + + + + + {ffd738f7-96f0-445c-81ea-551665ef53d1} + + + {f94ccadd-a90b-480c-a304-c19d015d36b1} + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/filesystem.sln b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/filesystem.sln new file mode 100644 index 0000000000..f72b6225ef --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/filesystem.sln @@ -0,0 +1,255 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.22310.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "path_unit_test", "path_unit_test\path_unit_test.vcxproj", "{3C77F610-2E31-4087-9DF2-7CD45198A02D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "operations_unit_test", "operations_unit_test\operations_unit_test.vcxproj", "{5DAF595A-4640-4F86-8A5F-E54E3E4CE7D0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "operations_test", "operations_test\operations_test.vcxproj", "{8BB7E604-46EF-42BE-ABB5-D7044B3E8A40}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "path_test", "path_test\path_test.vcxproj", "{F3D230C4-9185-4C2B-AB0E-0F0D28D8268C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "system_dll", "system_dll\system_dll.vcxproj", "{F94CCADD-A90B-480C-A304-C19D015D36B1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "filesystem_dll", "filesystem_dll\filesystem_dll.vcxproj", "{FFD738F7-96F0-445C-81EA-551665EF53D1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "convenience_test", "convenience_test\convenience_test.vcxproj", "{08986FB5-0C83-4BC4-92DF-05E12E1C03C1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fstream_test", "fstream_test\fstream_test.vcxproj", "{A9939CD7-BE1C-4334-947C-4C320D49B3CA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "deprecated_test", "deprecated_test\deprecated_test.vcxproj", "{D73BC50F-956E-4A44-BF9F-A8BB80DF0000}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tut1", "tut1\tut1.vcxproj", "{6376B8E4-7FD4-466B-978E-E8DA6E938689}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tut3", "tut3\tut3.vcxproj", "{4FF64FA7-6806-401D-865C-79DD064D4A9E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tut2", "tut2\tut2.vcxproj", "{CD69B175-389E-4F8F-85DC-03C56A47CD1D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tut4", "tut4\tut4.vcxproj", "{256EA89A-E073-4CE8-B675-BE2FBC6B2691}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "windows_attributes", "windows_attributes\windows_attributes.vcxproj", "{FC5C770F-3017-4021-8DAF-C5DCA3FDF005}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tut5", "tut5\tut5.vcxproj", "{5C9B3380-3C6E-45CC-986A-16D245E27E58}" + ProjectSection(ProjectDependencies) = postProject + {F94CCADD-A90B-480C-A304-C19D015D36B1} = {F94CCADD-A90B-480C-A304-C19D015D36B1} + {FFD738F7-96F0-445C-81EA-551665EF53D1} = {FFD738F7-96F0-445C-81EA-551665EF53D1} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tut6a", "tut6a\tut6a.vcxproj", "{C781F9C4-31D4-4509-B031-84DB598B207D}" + ProjectSection(ProjectDependencies) = postProject + {F94CCADD-A90B-480C-A304-C19D015D36B1} = {F94CCADD-A90B-480C-A304-C19D015D36B1} + {FFD738F7-96F0-445C-81EA-551665EF53D1} = {FFD738F7-96F0-445C-81EA-551665EF53D1} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tut6b", "tut6b\tut6b.vcxproj", "{4A77CA6A-8E72-4CC6-9FE7-2C555C51815C}" + ProjectSection(ProjectDependencies) = postProject + {F94CCADD-A90B-480C-A304-C19D015D36B1} = {F94CCADD-A90B-480C-A304-C19D015D36B1} + {FFD738F7-96F0-445C-81EA-551665EF53D1} = {FFD738F7-96F0-445C-81EA-551665EF53D1} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tut6c", "tut6c\tut6c.vcxproj", "{17C6DD1B-EF6F-4561-B4FF-CF39F975ED29}" + ProjectSection(ProjectDependencies) = postProject + {F94CCADD-A90B-480C-A304-C19D015D36B1} = {F94CCADD-A90B-480C-A304-C19D015D36B1} + {FFD738F7-96F0-445C-81EA-551665EF53D1} = {FFD738F7-96F0-445C-81EA-551665EF53D1} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stems", "stems\stems.vcxproj", "{23C735E1-0195-467F-BE9F-314829402FCF}" + ProjectSection(ProjectDependencies) = postProject + {F94CCADD-A90B-480C-A304-C19D015D36B1} = {F94CCADD-A90B-480C-A304-C19D015D36B1} + {FFD738F7-96F0-445C-81EA-551665EF53D1} = {FFD738F7-96F0-445C-81EA-551665EF53D1} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "long_path_test", "long_path_test\long_path_test.vcxproj", "{1A6A7DAF-8705-4B2B-83B5-93F84A63496C}" + ProjectSection(ProjectDependencies) = postProject + {F94CCADD-A90B-480C-A304-C19D015D36B1} = {F94CCADD-A90B-480C-A304-C19D015D36B1} + {FFD738F7-96F0-445C-81EA-551665EF53D1} = {FFD738F7-96F0-445C-81EA-551665EF53D1} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "file_status", "file_status\file_status.vcxproj", "{43C4B4D8-0893-4C86-B9FD-6A7DEB1A4426}" + ProjectSection(ProjectDependencies) = postProject + {F94CCADD-A90B-480C-A304-C19D015D36B1} = {F94CCADD-A90B-480C-A304-C19D015D36B1} + {FFD738F7-96F0-445C-81EA-551665EF53D1} = {FFD738F7-96F0-445C-81EA-551665EF53D1} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "locale_info", "locale_info\locale_info.vcxproj", "{3667C35E-78D5-43D4-AAC2-349145E4341D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "system_lib", "system_lib\system_lib.vcxproj", "{3640605D-6F82-493D-879F-8F30762DA554}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "filesystem_lib", "filesystem_lib\filesystem_lib.vcxproj", "{2C1770A4-4AC3-4102-9D36-E652DBB686D8}" + ProjectSection(ProjectDependencies) = postProject + {3640605D-6F82-493D-879F-8F30762DA554} = {3640605D-6F82-493D-879F-8F30762DA554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "path_test_static", "path_test_static\path_test_static.vcxproj", "{3B3010C5-D6D7-4320-A992-4EA61F256279}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "macro_default_test", "macro_default_test\macro_default_test.vcxproj", "{36E2032D-F9E6-4FBA-9630-3D4AC518DC6C}" + ProjectSection(ProjectDependencies) = postProject + {3640605D-6F82-493D-879F-8F30762DA554} = {3640605D-6F82-493D-879F-8F30762DA554} + {2C1770A4-4AC3-4102-9D36-E652DBB686D8} = {2C1770A4-4AC3-4102-9D36-E652DBB686D8} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "path_timings", "path_timings\path_timings.vcxproj", "{3AB1E2A1-9616-4E91-83F4-1D7A33A586DE}" + ProjectSection(ProjectDependencies) = postProject + {F94CCADD-A90B-480C-A304-C19D015D36B1} = {F94CCADD-A90B-480C-A304-C19D015D36B1} + {FFD738F7-96F0-445C-81EA-551665EF53D1} = {FFD738F7-96F0-445C-81EA-551665EF53D1} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "recurse_dir_iter_test", "recurse_dir_iter_test\recurse_dir_iter_test.vcxproj", "{C6594EC2-1BDA-41A1-B2C0-7FB8AE713CF8}" + ProjectSection(ProjectDependencies) = postProject + {F94CCADD-A90B-480C-A304-C19D015D36B1} = {F94CCADD-A90B-480C-A304-C19D015D36B1} + {FFD738F7-96F0-445C-81EA-551665EF53D1} = {FFD738F7-96F0-445C-81EA-551665EF53D1} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "odr_test", "odr_test\odr_test.vcxproj", "{1F1C209D-105B-4C8A-8DFC-ABCC4D9A0014}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hello_filesystem", "hello_filesystem\hello_filesystem.vcxproj", "{3D74D9C5-31B1-4D5B-B49C-8725E26CF768}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "issue_test", "issue_test\issue_test.vcxproj", "{3B1AF12C-25AB-44F7-A80B-8BBA0D3D08CE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "headers", "headers\headers.vcxproj", "{5FFA4555-E967-4632-A3E6-ED8826E9FDED}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bug-reporting", "bug-reporting\bug-reporting.vcxproj", "{534B6F8A-B899-4C68-A10C-BB98FFCB35D6}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3C77F610-2E31-4087-9DF2-7CD45198A02D}.Debug|Win32.ActiveCfg = Debug|Win32 + {3C77F610-2E31-4087-9DF2-7CD45198A02D}.Debug|Win32.Build.0 = Debug|Win32 + {3C77F610-2E31-4087-9DF2-7CD45198A02D}.Release|Win32.ActiveCfg = Release|Win32 + {3C77F610-2E31-4087-9DF2-7CD45198A02D}.Release|Win32.Build.0 = Release|Win32 + {5DAF595A-4640-4F86-8A5F-E54E3E4CE7D0}.Debug|Win32.ActiveCfg = Debug|Win32 + {5DAF595A-4640-4F86-8A5F-E54E3E4CE7D0}.Debug|Win32.Build.0 = Debug|Win32 + {5DAF595A-4640-4F86-8A5F-E54E3E4CE7D0}.Release|Win32.ActiveCfg = Release|Win32 + {5DAF595A-4640-4F86-8A5F-E54E3E4CE7D0}.Release|Win32.Build.0 = Release|Win32 + {8BB7E604-46EF-42BE-ABB5-D7044B3E8A40}.Debug|Win32.ActiveCfg = Debug|Win32 + {8BB7E604-46EF-42BE-ABB5-D7044B3E8A40}.Debug|Win32.Build.0 = Debug|Win32 + {8BB7E604-46EF-42BE-ABB5-D7044B3E8A40}.Release|Win32.ActiveCfg = Release|Win32 + {8BB7E604-46EF-42BE-ABB5-D7044B3E8A40}.Release|Win32.Build.0 = Release|Win32 + {F3D230C4-9185-4C2B-AB0E-0F0D28D8268C}.Debug|Win32.ActiveCfg = Debug|Win32 + {F3D230C4-9185-4C2B-AB0E-0F0D28D8268C}.Debug|Win32.Build.0 = Debug|Win32 + {F3D230C4-9185-4C2B-AB0E-0F0D28D8268C}.Release|Win32.ActiveCfg = Release|Win32 + {F3D230C4-9185-4C2B-AB0E-0F0D28D8268C}.Release|Win32.Build.0 = Release|Win32 + {F94CCADD-A90B-480C-A304-C19D015D36B1}.Debug|Win32.ActiveCfg = Debug|Win32 + {F94CCADD-A90B-480C-A304-C19D015D36B1}.Debug|Win32.Build.0 = Debug|Win32 + {F94CCADD-A90B-480C-A304-C19D015D36B1}.Release|Win32.ActiveCfg = Release|Win32 + {F94CCADD-A90B-480C-A304-C19D015D36B1}.Release|Win32.Build.0 = Release|Win32 + {FFD738F7-96F0-445C-81EA-551665EF53D1}.Debug|Win32.ActiveCfg = Debug|Win32 + {FFD738F7-96F0-445C-81EA-551665EF53D1}.Debug|Win32.Build.0 = Debug|Win32 + {FFD738F7-96F0-445C-81EA-551665EF53D1}.Release|Win32.ActiveCfg = Release|Win32 + {FFD738F7-96F0-445C-81EA-551665EF53D1}.Release|Win32.Build.0 = Release|Win32 + {08986FB5-0C83-4BC4-92DF-05E12E1C03C1}.Debug|Win32.ActiveCfg = Debug|Win32 + {08986FB5-0C83-4BC4-92DF-05E12E1C03C1}.Debug|Win32.Build.0 = Debug|Win32 + {08986FB5-0C83-4BC4-92DF-05E12E1C03C1}.Release|Win32.ActiveCfg = Release|Win32 + {08986FB5-0C83-4BC4-92DF-05E12E1C03C1}.Release|Win32.Build.0 = Release|Win32 + {A9939CD7-BE1C-4334-947C-4C320D49B3CA}.Debug|Win32.ActiveCfg = Debug|Win32 + {A9939CD7-BE1C-4334-947C-4C320D49B3CA}.Debug|Win32.Build.0 = Debug|Win32 + {A9939CD7-BE1C-4334-947C-4C320D49B3CA}.Release|Win32.ActiveCfg = Release|Win32 + {A9939CD7-BE1C-4334-947C-4C320D49B3CA}.Release|Win32.Build.0 = Release|Win32 + {D73BC50F-956E-4A44-BF9F-A8BB80DF0000}.Debug|Win32.ActiveCfg = Debug|Win32 + {D73BC50F-956E-4A44-BF9F-A8BB80DF0000}.Debug|Win32.Build.0 = Debug|Win32 + {D73BC50F-956E-4A44-BF9F-A8BB80DF0000}.Release|Win32.ActiveCfg = Release|Win32 + {D73BC50F-956E-4A44-BF9F-A8BB80DF0000}.Release|Win32.Build.0 = Release|Win32 + {6376B8E4-7FD4-466B-978E-E8DA6E938689}.Debug|Win32.ActiveCfg = Debug|Win32 + {6376B8E4-7FD4-466B-978E-E8DA6E938689}.Debug|Win32.Build.0 = Debug|Win32 + {6376B8E4-7FD4-466B-978E-E8DA6E938689}.Release|Win32.ActiveCfg = Release|Win32 + {6376B8E4-7FD4-466B-978E-E8DA6E938689}.Release|Win32.Build.0 = Release|Win32 + {4FF64FA7-6806-401D-865C-79DD064D4A9E}.Debug|Win32.ActiveCfg = Debug|Win32 + {4FF64FA7-6806-401D-865C-79DD064D4A9E}.Debug|Win32.Build.0 = Debug|Win32 + {4FF64FA7-6806-401D-865C-79DD064D4A9E}.Release|Win32.ActiveCfg = Release|Win32 + {4FF64FA7-6806-401D-865C-79DD064D4A9E}.Release|Win32.Build.0 = Release|Win32 + {CD69B175-389E-4F8F-85DC-03C56A47CD1D}.Debug|Win32.ActiveCfg = Debug|Win32 + {CD69B175-389E-4F8F-85DC-03C56A47CD1D}.Debug|Win32.Build.0 = Debug|Win32 + {CD69B175-389E-4F8F-85DC-03C56A47CD1D}.Release|Win32.ActiveCfg = Release|Win32 + {CD69B175-389E-4F8F-85DC-03C56A47CD1D}.Release|Win32.Build.0 = Release|Win32 + {256EA89A-E073-4CE8-B675-BE2FBC6B2691}.Debug|Win32.ActiveCfg = Debug|Win32 + {256EA89A-E073-4CE8-B675-BE2FBC6B2691}.Debug|Win32.Build.0 = Debug|Win32 + {256EA89A-E073-4CE8-B675-BE2FBC6B2691}.Release|Win32.ActiveCfg = Release|Win32 + {256EA89A-E073-4CE8-B675-BE2FBC6B2691}.Release|Win32.Build.0 = Release|Win32 + {FC5C770F-3017-4021-8DAF-C5DCA3FDF005}.Debug|Win32.ActiveCfg = Debug|Win32 + {FC5C770F-3017-4021-8DAF-C5DCA3FDF005}.Debug|Win32.Build.0 = Debug|Win32 + {FC5C770F-3017-4021-8DAF-C5DCA3FDF005}.Release|Win32.ActiveCfg = Release|Win32 + {FC5C770F-3017-4021-8DAF-C5DCA3FDF005}.Release|Win32.Build.0 = Release|Win32 + {5C9B3380-3C6E-45CC-986A-16D245E27E58}.Debug|Win32.ActiveCfg = Debug|Win32 + {5C9B3380-3C6E-45CC-986A-16D245E27E58}.Debug|Win32.Build.0 = Debug|Win32 + {5C9B3380-3C6E-45CC-986A-16D245E27E58}.Release|Win32.ActiveCfg = Release|Win32 + {5C9B3380-3C6E-45CC-986A-16D245E27E58}.Release|Win32.Build.0 = Release|Win32 + {C781F9C4-31D4-4509-B031-84DB598B207D}.Debug|Win32.ActiveCfg = Debug|Win32 + {C781F9C4-31D4-4509-B031-84DB598B207D}.Debug|Win32.Build.0 = Debug|Win32 + {C781F9C4-31D4-4509-B031-84DB598B207D}.Release|Win32.ActiveCfg = Release|Win32 + {C781F9C4-31D4-4509-B031-84DB598B207D}.Release|Win32.Build.0 = Release|Win32 + {4A77CA6A-8E72-4CC6-9FE7-2C555C51815C}.Debug|Win32.ActiveCfg = Debug|Win32 + {4A77CA6A-8E72-4CC6-9FE7-2C555C51815C}.Debug|Win32.Build.0 = Debug|Win32 + {4A77CA6A-8E72-4CC6-9FE7-2C555C51815C}.Release|Win32.ActiveCfg = Release|Win32 + {4A77CA6A-8E72-4CC6-9FE7-2C555C51815C}.Release|Win32.Build.0 = Release|Win32 + {17C6DD1B-EF6F-4561-B4FF-CF39F975ED29}.Debug|Win32.ActiveCfg = Debug|Win32 + {17C6DD1B-EF6F-4561-B4FF-CF39F975ED29}.Debug|Win32.Build.0 = Debug|Win32 + {17C6DD1B-EF6F-4561-B4FF-CF39F975ED29}.Release|Win32.ActiveCfg = Release|Win32 + {17C6DD1B-EF6F-4561-B4FF-CF39F975ED29}.Release|Win32.Build.0 = Release|Win32 + {23C735E1-0195-467F-BE9F-314829402FCF}.Debug|Win32.ActiveCfg = Debug|Win32 + {23C735E1-0195-467F-BE9F-314829402FCF}.Debug|Win32.Build.0 = Debug|Win32 + {23C735E1-0195-467F-BE9F-314829402FCF}.Release|Win32.ActiveCfg = Release|Win32 + {23C735E1-0195-467F-BE9F-314829402FCF}.Release|Win32.Build.0 = Release|Win32 + {1A6A7DAF-8705-4B2B-83B5-93F84A63496C}.Debug|Win32.ActiveCfg = Debug|Win32 + {1A6A7DAF-8705-4B2B-83B5-93F84A63496C}.Debug|Win32.Build.0 = Debug|Win32 + {1A6A7DAF-8705-4B2B-83B5-93F84A63496C}.Release|Win32.ActiveCfg = Release|Win32 + {1A6A7DAF-8705-4B2B-83B5-93F84A63496C}.Release|Win32.Build.0 = Release|Win32 + {43C4B4D8-0893-4C86-B9FD-6A7DEB1A4426}.Debug|Win32.ActiveCfg = Debug|Win32 + {43C4B4D8-0893-4C86-B9FD-6A7DEB1A4426}.Debug|Win32.Build.0 = Debug|Win32 + {43C4B4D8-0893-4C86-B9FD-6A7DEB1A4426}.Release|Win32.ActiveCfg = Release|Win32 + {43C4B4D8-0893-4C86-B9FD-6A7DEB1A4426}.Release|Win32.Build.0 = Release|Win32 + {3667C35E-78D5-43D4-AAC2-349145E4341D}.Debug|Win32.ActiveCfg = Debug|Win32 + {3667C35E-78D5-43D4-AAC2-349145E4341D}.Debug|Win32.Build.0 = Debug|Win32 + {3667C35E-78D5-43D4-AAC2-349145E4341D}.Release|Win32.ActiveCfg = Release|Win32 + {3667C35E-78D5-43D4-AAC2-349145E4341D}.Release|Win32.Build.0 = Release|Win32 + {3640605D-6F82-493D-879F-8F30762DA554}.Debug|Win32.ActiveCfg = Debug|Win32 + {3640605D-6F82-493D-879F-8F30762DA554}.Debug|Win32.Build.0 = Debug|Win32 + {3640605D-6F82-493D-879F-8F30762DA554}.Release|Win32.ActiveCfg = Release|Win32 + {3640605D-6F82-493D-879F-8F30762DA554}.Release|Win32.Build.0 = Release|Win32 + {2C1770A4-4AC3-4102-9D36-E652DBB686D8}.Debug|Win32.ActiveCfg = Debug|Win32 + {2C1770A4-4AC3-4102-9D36-E652DBB686D8}.Debug|Win32.Build.0 = Debug|Win32 + {2C1770A4-4AC3-4102-9D36-E652DBB686D8}.Release|Win32.ActiveCfg = Release|Win32 + {2C1770A4-4AC3-4102-9D36-E652DBB686D8}.Release|Win32.Build.0 = Release|Win32 + {3B3010C5-D6D7-4320-A992-4EA61F256279}.Debug|Win32.ActiveCfg = Debug|Win32 + {3B3010C5-D6D7-4320-A992-4EA61F256279}.Debug|Win32.Build.0 = Debug|Win32 + {3B3010C5-D6D7-4320-A992-4EA61F256279}.Release|Win32.ActiveCfg = Release|Win32 + {3B3010C5-D6D7-4320-A992-4EA61F256279}.Release|Win32.Build.0 = Release|Win32 + {36E2032D-F9E6-4FBA-9630-3D4AC518DC6C}.Debug|Win32.ActiveCfg = Debug|Win32 + {36E2032D-F9E6-4FBA-9630-3D4AC518DC6C}.Debug|Win32.Build.0 = Debug|Win32 + {36E2032D-F9E6-4FBA-9630-3D4AC518DC6C}.Release|Win32.ActiveCfg = Release|Win32 + {36E2032D-F9E6-4FBA-9630-3D4AC518DC6C}.Release|Win32.Build.0 = Release|Win32 + {3AB1E2A1-9616-4E91-83F4-1D7A33A586DE}.Debug|Win32.ActiveCfg = Debug|Win32 + {3AB1E2A1-9616-4E91-83F4-1D7A33A586DE}.Debug|Win32.Build.0 = Debug|Win32 + {3AB1E2A1-9616-4E91-83F4-1D7A33A586DE}.Release|Win32.ActiveCfg = Release|Win32 + {3AB1E2A1-9616-4E91-83F4-1D7A33A586DE}.Release|Win32.Build.0 = Release|Win32 + {C6594EC2-1BDA-41A1-B2C0-7FB8AE713CF8}.Debug|Win32.ActiveCfg = Debug|Win32 + {C6594EC2-1BDA-41A1-B2C0-7FB8AE713CF8}.Debug|Win32.Build.0 = Debug|Win32 + {C6594EC2-1BDA-41A1-B2C0-7FB8AE713CF8}.Release|Win32.ActiveCfg = Release|Win32 + {C6594EC2-1BDA-41A1-B2C0-7FB8AE713CF8}.Release|Win32.Build.0 = Release|Win32 + {1F1C209D-105B-4C8A-8DFC-ABCC4D9A0014}.Debug|Win32.ActiveCfg = Debug|Win32 + {1F1C209D-105B-4C8A-8DFC-ABCC4D9A0014}.Debug|Win32.Build.0 = Debug|Win32 + {1F1C209D-105B-4C8A-8DFC-ABCC4D9A0014}.Release|Win32.ActiveCfg = Release|Win32 + {1F1C209D-105B-4C8A-8DFC-ABCC4D9A0014}.Release|Win32.Build.0 = Release|Win32 + {3D74D9C5-31B1-4D5B-B49C-8725E26CF768}.Debug|Win32.ActiveCfg = Debug|Win32 + {3D74D9C5-31B1-4D5B-B49C-8725E26CF768}.Debug|Win32.Build.0 = Debug|Win32 + {3D74D9C5-31B1-4D5B-B49C-8725E26CF768}.Release|Win32.ActiveCfg = Release|Win32 + {3D74D9C5-31B1-4D5B-B49C-8725E26CF768}.Release|Win32.Build.0 = Release|Win32 + {3B1AF12C-25AB-44F7-A80B-8BBA0D3D08CE}.Debug|Win32.ActiveCfg = Debug|Win32 + {3B1AF12C-25AB-44F7-A80B-8BBA0D3D08CE}.Debug|Win32.Build.0 = Debug|Win32 + {3B1AF12C-25AB-44F7-A80B-8BBA0D3D08CE}.Release|Win32.ActiveCfg = Release|Win32 + {3B1AF12C-25AB-44F7-A80B-8BBA0D3D08CE}.Release|Win32.Build.0 = Release|Win32 + {5FFA4555-E967-4632-A3E6-ED8826E9FDED}.Debug|Win32.ActiveCfg = Debug|Win32 + {5FFA4555-E967-4632-A3E6-ED8826E9FDED}.Release|Win32.ActiveCfg = Release|Win32 + {534B6F8A-B899-4C68-A10C-BB98FFCB35D6}.Debug|Win32.ActiveCfg = Debug|Win32 + {534B6F8A-B899-4C68-A10C-BB98FFCB35D6}.Debug|Win32.Build.0 = Debug|Win32 + {534B6F8A-B899-4C68-A10C-BB98FFCB35D6}.Release|Win32.ActiveCfg = Release|Win32 + {534B6F8A-B899-4C68-A10C-BB98FFCB35D6}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/filesystem_dll/filesystem_dll.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/filesystem_dll/filesystem_dll.vcxproj new file mode 100644 index 0000000000..aa19a6e8c2 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/filesystem_dll/filesystem_dll.vcxproj @@ -0,0 +1,109 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {FFD738F7-96F0-445C-81EA-551665EF53D1} + filesystem_dll + Win32Proj + + + + DynamicLibrary + Unicode + true + v140 + + + DynamicLibrary + Unicode + v140 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + true + $(TEMP)\$(SolutionName)\$(Configuration)\ + $(Configuration)\ + false + + + + Disabled + %(AdditionalIncludeDirectories) + BOOST_FILEYSTEM_INCLUDE_IOSTREAM;WIN32;_DEBUG;_WINDOWS;_USRDLL;FILESYSTEM_DLL_EXPORTS;%(PreprocessorDefinitions) + true + Async + EnableFastChecks + MultiThreadedDebugDLL + + + Level4 + + + true + Windows + MachineX86 + + + + + MaxSpeed + true + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;FILESYSTEM_DLL_EXPORTS;%(PreprocessorDefinitions) + Async + MultiThreadedDLL + true + + + Level4 + ProgramDatabase + + + true + Windows + true + true + MachineX86 + + + + + + + + + + + + + + + {f94ccadd-a90b-480c-a304-c19d015d36b1} + false + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/filesystem_lib/filesystem_lib.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/filesystem_lib/filesystem_lib.vcxproj new file mode 100644 index 0000000000..3aecd33dab --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/filesystem_lib/filesystem_lib.vcxproj @@ -0,0 +1,93 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + + + + + + + + + + + + {3640605d-6f82-493d-879f-8f30762da554} + + + + {2C1770A4-4AC3-4102-9D36-E652DBB686D8} + Win32Proj + filesystem_lib + + + + StaticLibrary + true + Unicode + v140 + + + StaticLibrary + false + true + Unicode + v140 + + + + + + + + + + + + + + + + + Level3 + Disabled + BOOST_ALL_NO_LIB;BOOST_ALL_STATIC_LINK;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + ../../../../.. + + + Windows + true + + + + + Level3 + + + MaxSpeed + true + true + BOOST_ALL_NO_LIB;BOOST_ALL_STATIC_LINK;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + ../../../../.. + + + Windows + true + true + true + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/fstream_test/fstream_test.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/fstream_test/fstream_test.vcxproj new file mode 100644 index 0000000000..dba20e5fda --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/fstream_test/fstream_test.vcxproj @@ -0,0 +1,108 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {A9939CD7-BE1C-4334-947C-4C320D49B3CA} + fstream_test + Win32Proj + + + + Application + Unicode + true + v140 + + + Application + Unicode + v140 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + true + false + + + + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level4 + + + true + Console + MachineX86 + + + Executing test $(TargetName).exe... + "$(TargetDir)\$(TargetName).exe" -no-cleanup + + + + + MaxSpeed + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level4 + ProgramDatabase + + + true + Console + true + true + MachineX86 + + + Executing test $(TargetName).exe... + "$(TargetDir)\$(TargetName).exe" -no-cleanup + + + + + + + + {ffd738f7-96f0-445c-81ea-551665ef53d1} + false + + + {f94ccadd-a90b-480c-a304-c19d015d36b1} + false + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/headers/headers.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/headers/headers.vcxproj new file mode 100644 index 0000000000..952e0c4fab --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/headers/headers.vcxproj @@ -0,0 +1,94 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {5FFA4555-E967-4632-A3E6-ED8826E9FDED} + Win32Proj + headers + + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + + + + + + + + + + + true + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/hello_filesystem/hello_filesystem.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/hello_filesystem/hello_filesystem.vcxproj new file mode 100644 index 0000000000..7c42df8472 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/hello_filesystem/hello_filesystem.vcxproj @@ -0,0 +1,110 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {3D74D9C5-31B1-4D5B-B49C-8725E26CF768} + Win32Proj + hello_filesystem + + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + + + + + + + + + + + + + true + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + true + + + Console + true + + + + + + + "$(TargetDir)\$(TargetName).exe" + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + "$(TargetDir)\$(TargetName).exe" + + + + + + + + {ffd738f7-96f0-445c-81ea-551665ef53d1} + + + {f94ccadd-a90b-480c-a304-c19d015d36b1} + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/issue_test/issue_test.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/issue_test/issue_test.vcxproj new file mode 100644 index 0000000000..8cb90de868 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/issue_test/issue_test.vcxproj @@ -0,0 +1,102 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {3B1AF12C-25AB-44F7-A80B-8BBA0D3D08CE} + Win32Proj + issue_test + + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + + + + + + + + + + + + + true + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + "$(TargetDir)\$(TargetName).exe" + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + "$(TargetDir)\$(TargetName).exe" + + + + + {ffd738f7-96f0-445c-81ea-551665ef53d1} + + + {f94ccadd-a90b-480c-a304-c19d015d36b1} + + + + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/locale_info/locale_info.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/locale_info/locale_info.vcxproj new file mode 100644 index 0000000000..66629ab44c --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/locale_info/locale_info.vcxproj @@ -0,0 +1,98 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {3667C35E-78D5-43D4-AAC2-349145E4341D} + Win32Proj + locale_info + + + + Application + true + Unicode + v140 + + + Application + false + true + Unicode + v140 + + + + + + + + + + + + + + + true + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + + + "$(TargetDir)\$(TargetName).exe" + + + Executing test $(TargetName).exe... + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + "$(TargetDir)\$(TargetName).exe" + + + Executing test $(TargetName).exe... + + + + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/long_path_test/long_path_test.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/long_path_test/long_path_test.vcxproj new file mode 100644 index 0000000000..c8e86dd35f --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/long_path_test/long_path_test.vcxproj @@ -0,0 +1,102 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {1A6A7DAF-8705-4B2B-83B5-93F84A63496C} + Win32Proj + long_path_test + + + + Application + true + Unicode + v140 + + + Application + false + true + Unicode + v140 + + + + + + + + + + + + + + + true + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + + + "$(TargetDir)\$(TargetName).exe" + Executing test $(TargetName).exe... + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + "$(TargetDir)\$(TargetName).exe" + Executing test $(TargetName).exe... + + + + + + + + {ffd738f7-96f0-445c-81ea-551665ef53d1} + + + {f94ccadd-a90b-480c-a304-c19d015d36b1} + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/macro_default_test/macro_default_test.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/macro_default_test/macro_default_test.vcxproj new file mode 100644 index 0000000000..4a24893c0f --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/macro_default_test/macro_default_test.vcxproj @@ -0,0 +1,94 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {36E2032D-F9E6-4FBA-9630-3D4AC518DC6C} + Win32Proj + macro_default_test + + + + Application + true + Unicode + v140 + + + Application + false + true + Unicode + v140 + + + + + + + + + + + + + true + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + ../../../../.. + + + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + ../../../../.. + + + Console + true + true + true + + + + + + + + {2c1770a4-4ac3-4102-9d36-e652dbb686d8} + + + {3640605d-6f82-493d-879f-8f30762da554} + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/odr_test/odr_test.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/odr_test/odr_test.vcxproj new file mode 100644 index 0000000000..a6ea2534d1 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/odr_test/odr_test.vcxproj @@ -0,0 +1,97 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {1F1C209D-105B-4C8A-8DFC-ABCC4D9A0014} + Win32Proj + odr_test + + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + + + + + + + + + + + + + true + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + {ffd738f7-96f0-445c-81ea-551665ef53d1} + + + {f94ccadd-a90b-480c-a304-c19d015d36b1} + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/operations_test/operations_test.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/operations_test/operations_test.vcxproj new file mode 100644 index 0000000000..b7be12ae3d --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/operations_test/operations_test.vcxproj @@ -0,0 +1,107 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {8BB7E604-46EF-42BE-ABB5-D7044B3E8A40} + operations_test + Win32Proj + + + + Application + Unicode + true + v140 + + + Application + Unicode + v140 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + true + false + + + + Disabled + BOOST_FILEYSTEM_INCLUDE_IOSTREAM;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level4 + + + true + Console + MachineX86 + + + Executing test $(TargetName).exe... + "$(TargetDir)\$(TargetName).exe" + + + + + MaxSpeed + true + MultiThreadedDLL + true + + + Level4 + ProgramDatabase + + + true + Console + true + true + MachineX86 + + + Executing test $(TargetName).exe... + "$(TargetDir)\$(TargetName).exe" + + + + + + + + {ffd738f7-96f0-445c-81ea-551665ef53d1} + false + + + {f94ccadd-a90b-480c-a304-c19d015d36b1} + false + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/operations_unit_test/operations_unit_test.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/operations_unit_test/operations_unit_test.vcxproj new file mode 100644 index 0000000000..67fd0aba44 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/operations_unit_test/operations_unit_test.vcxproj @@ -0,0 +1,110 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {5DAF595A-4640-4F86-8A5F-E54E3E4CE7D0} + operations_unit_test + Win32Proj + + + + Application + Unicode + true + v140 + + + Application + Unicode + v140 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + true + false + + + + Disabled + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level4 + + + true + Console + MachineX86 + + + Executing test $(TargetName).exe... + "$(TargetDir)\$(TargetName).exe" + + + + + MaxSpeed + true + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level4 + ProgramDatabase + + + true + Console + true + true + MachineX86 + + + Executing test $(TargetName).exe... + "$(TargetDir)\$(TargetName).exe" + + + + + + + + {ffd738f7-96f0-445c-81ea-551665ef53d1} + false + + + {f94ccadd-a90b-480c-a304-c19d015d36b1} + false + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/path_test/path_test.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/path_test/path_test.vcxproj new file mode 100644 index 0000000000..354d35c5f4 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/path_test/path_test.vcxproj @@ -0,0 +1,108 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {F3D230C4-9185-4C2B-AB0E-0F0D28D8268C} + path_test + Win32Proj + + + + Application + Unicode + true + v140 + + + Application + Unicode + v140 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + true + false + + + + Disabled + BOOST_FILESYSTEM_PATH_CTOR_COUNT;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level4 + + + true + Console + MachineX86 + + + Executing test $(TargetName).exe... + "$(TargetDir)\$(TargetName).exe" + + + + + MaxSpeed + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level4 + ProgramDatabase + + + true + Console + true + true + MachineX86 + + + Executing test $(TargetName).exe... + "$(TargetDir)\$(TargetName).exe" + + + + + + + + {ffd738f7-96f0-445c-81ea-551665ef53d1} + false + + + {f94ccadd-a90b-480c-a304-c19d015d36b1} + false + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/path_test_static/path_test_static.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/path_test_static/path_test_static.vcxproj new file mode 100644 index 0000000000..133661babc --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/path_test_static/path_test_static.vcxproj @@ -0,0 +1,106 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {3B3010C5-D6D7-4320-A992-4EA61F256279} + Win32Proj + path_test_static + + + + Application + true + Unicode + v140 + + + Application + false + true + Unicode + v140 + + + + + + + + + + + + + true + + + false + + + + + + Level3 + Disabled + BOOST_ALL_NO_LIB;BOOST_ALL_STATIC_LINK;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + ../../../../.. + + + Console + true + + + "$(TargetDir)\$(TargetName).exe" + + + Executing test $(TargetName).exe... + + + + + Level3 + + + MaxSpeed + true + true + BOOST_ALL_NO_LIB;BOOST_ALL_STATIC_LINK;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + ../../../../.. + + + Console + true + true + true + + + "$(TargetDir)\$(TargetName).exe" + + + Executing test $(TargetName).exe... + + + + + + + + {2c1770a4-4ac3-4102-9d36-e652dbb686d8} + + + {3640605d-6f82-493d-879f-8f30762da554} + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/path_timings/path_timings.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/path_timings/path_timings.vcxproj new file mode 100644 index 0000000000..8721fb4be1 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/path_timings/path_timings.vcxproj @@ -0,0 +1,98 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {3AB1E2A1-9616-4E91-83F4-1D7A33A586DE} + Win32Proj + path_timings + + + + Application + true + Unicode + v140 + + + Application + false + true + Unicode + v140 + + + + + + + + + + + + + + + true + C:\boost\trunk-git-svn\lib;$(ExecutablePath) + + + false + C:\boost\trunk-git-svn\lib;$(ExecutablePath) + + + + + + Level3 + Disabled + BOOST_SYSTEM_NO_DEPRECATED;BOOST_SYSTEM_NO_LIB;BOOST_FILESYSTEM_NO_LIB;BOOST_ALL_DYN_LINK;_UNICODE;UNICODE + + + Console + true + C:\boost\modular\develop\stage\lib;%(AdditionalLibraryDirectories) + + + + + Level3 + + + MaxSpeed + true + true + BOOST_SYSTEM_NO_DEPRECATED;BOOST_SYSTEM_NO_LIB;BOOST_FILESYSTEM_NO_LIB;BOOST_ALL_DYN_LINK;_UNICODE;UNICODE;WIN32;NDEBUG;_CONSOLE + + + Console + true + true + true + C:\boost\modular\develop\stage\lib;%(AdditionalLibraryDirectories) + + + + + + + + {ffd738f7-96f0-445c-81ea-551665ef53d1} + + + {f94ccadd-a90b-480c-a304-c19d015d36b1} + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/path_unit_test/path_unit_test.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/path_unit_test/path_unit_test.vcxproj new file mode 100644 index 0000000000..ba86e47d6f --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/path_unit_test/path_unit_test.vcxproj @@ -0,0 +1,108 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {3C77F610-2E31-4087-9DF2-7CD45198A02D} + path_unit_test + Win32Proj + + + + Application + Unicode + true + v140 + + + Application + Unicode + v140 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + true + false + + + + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level4 + + + true + Console + MachineX86 + + + Executing test $(TargetName).exe... + "$(TargetDir)\$(TargetName).exe" + + + + + MaxSpeed + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level4 + ProgramDatabase + + + true + Console + true + true + MachineX86 + + + Executing test $(TargetName).exe... + "$(TargetDir)\$(TargetName).exe" + + + + + + + + {ffd738f7-96f0-445c-81ea-551665ef53d1} + false + + + {f94ccadd-a90b-480c-a304-c19d015d36b1} + false + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/recurse_dir_iter_test/recurse_dir_iter_test.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/recurse_dir_iter_test/recurse_dir_iter_test.vcxproj new file mode 100644 index 0000000000..f1e7ca9788 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/recurse_dir_iter_test/recurse_dir_iter_test.vcxproj @@ -0,0 +1,96 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {C6594EC2-1BDA-41A1-B2C0-7FB8AE713CF8} + Win32Proj + recurse_dir_iter_test + + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + + + + + + + + + + + + + true + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + {ffd738f7-96f0-445c-81ea-551665ef53d1} + + + {f94ccadd-a90b-480c-a304-c19d015d36b1} + + + + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/stems/stems.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/stems/stems.vcxproj new file mode 100644 index 0000000000..4687d3b56c --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/stems/stems.vcxproj @@ -0,0 +1,94 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {23C735E1-0195-467F-BE9F-314829402FCF} + Win32Proj + stems + + + + Application + true + Unicode + v140 + + + Application + false + true + Unicode + v140 + + + + + + + + + + + + + + + true + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + + + + + + {ffd738f7-96f0-445c-81ea-551665ef53d1} + + + {f94ccadd-a90b-480c-a304-c19d015d36b1} + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/system_dll/system_dll.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/system_dll/system_dll.vcxproj new file mode 100644 index 0000000000..2a5d8555b7 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/system_dll/system_dll.vcxproj @@ -0,0 +1,95 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + + + + {F94CCADD-A90B-480C-A304-C19D015D36B1} + system_dll + Win32Proj + + + + DynamicLibrary + Unicode + true + v140 + + + DynamicLibrary + Unicode + v140 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + true + $(TEMP)\$(SolutionName)\$(Configuration)\ + $(TEMP)\$(SolutionName)\$(ProjectName)\$(Configuration)\ + false + + + + Disabled + BOOST_ALL_NO_LIB;BOOST_ALL_DYN_LINK;WIN32;_DEBUG;_WINDOWS;_USRDLL;SYSTEM_DLL_EXPORTS;%(PreprocessorDefinitions) + true + Async + EnableFastChecks + MultiThreadedDebugDLL + + + Level4 + ProgramDatabase + + + true + Windows + MachineX86 + + + + + MaxSpeed + true + BOOST_ALL_NO_LIB;BOOST_ALL_DYN_LINK;WIN32;NDEBUG;_WINDOWS;_USRDLL;SYSTEM_DLL_EXPORTS;%(PreprocessorDefinitions) + Async + MultiThreadedDLL + true + + + Level4 + ProgramDatabase + + + true + Windows + true + true + MachineX86 + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/system_lib/system_lib.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/system_lib/system_lib.vcxproj new file mode 100644 index 0000000000..0603340c63 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/system_lib/system_lib.vcxproj @@ -0,0 +1,81 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {3640605D-6F82-493D-879F-8F30762DA554} + Win32Proj + system_lib + + + + StaticLibrary + true + Unicode + v140 + + + StaticLibrary + false + true + Unicode + v140 + + + + + + + + + + + + + + + + + Level3 + Disabled + BOOST_ALL_NO_LIB;BOOST_ALL_STATIC_LINK;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + ../../../../.. + + + Windows + true + + + + + Level3 + + + MaxSpeed + true + true + BOOST_ALL_NO_LIB;BOOST_ALL_STATIC_LINK;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + ../../../../.. + + + Windows + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/tut1/tut1.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/tut1/tut1.vcxproj new file mode 100644 index 0000000000..95403ce72c --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/tut1/tut1.vcxproj @@ -0,0 +1,102 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {6376B8E4-7FD4-466B-978E-E8DA6E938689} + tut1 + Win32Proj + + + + Application + Unicode + true + v140 + + + Application + Unicode + v140 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + true + false + + + + Disabled + %(AdditionalIncludeDirectories) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level4 + ProgramDatabase + + + true + Console + MachineX86 + + + + + MaxSpeed + true + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level4 + ProgramDatabase + + + true + Console + true + true + MachineX86 + + + + + + + + {ffd738f7-96f0-445c-81ea-551665ef53d1} + false + + + {f94ccadd-a90b-480c-a304-c19d015d36b1} + false + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/tut2/tut2.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/tut2/tut2.vcxproj new file mode 100644 index 0000000000..590dc78fda --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/tut2/tut2.vcxproj @@ -0,0 +1,97 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {CD69B175-389E-4F8F-85DC-03C56A47CD1D} + tut2 + Win32Proj + + + + Application + Unicode + true + v140 + + + Application + Unicode + v140 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + true + false + + + + Disabled + true + EnableFastChecks + MultiThreadedDebugDLL + + + + + true + Console + MachineX86 + + + + + MaxSpeed + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + ProgramDatabase + + + true + Console + true + true + MachineX86 + + + + + + + + {ffd738f7-96f0-445c-81ea-551665ef53d1} + false + + + {f94ccadd-a90b-480c-a304-c19d015d36b1} + false + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/tut3/tut3.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/tut3/tut3.vcxproj new file mode 100644 index 0000000000..c53d0ea064 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/tut3/tut3.vcxproj @@ -0,0 +1,96 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {4FF64FA7-6806-401D-865C-79DD064D4A9E} + tut3 + Win32Proj + + + + Application + Unicode + true + v140 + + + Application + Unicode + v140 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + true + false + + + + Disabled + true + EnableFastChecks + MultiThreadedDebugDLL + + + + + true + Console + MachineX86 + + + + + MaxSpeed + true + MultiThreadedDLL + true + + + ProgramDatabase + + + true + Console + true + true + MachineX86 + + + + + + + + {ffd738f7-96f0-445c-81ea-551665ef53d1} + false + + + {f94ccadd-a90b-480c-a304-c19d015d36b1} + false + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/tut4/tut4.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/tut4/tut4.vcxproj new file mode 100644 index 0000000000..ea22114a64 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/tut4/tut4.vcxproj @@ -0,0 +1,100 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {256EA89A-E073-4CE8-B675-BE2FBC6B2691} + tut4 + Win32Proj + + + + Application + Unicode + true + v140 + + + Application + Unicode + v140 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + true + false + + + + Disabled + %(AdditionalIncludeDirectories) + true + EnableFastChecks + MultiThreadedDebugDLL + + + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + true + Console + MachineX86 + + + + + MaxSpeed + true + %(AdditionalIncludeDirectories) + MultiThreadedDLL + true + + + ProgramDatabase + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + true + Console + true + true + MachineX86 + + + + + + + + {ffd738f7-96f0-445c-81ea-551665ef53d1} + false + + + {f94ccadd-a90b-480c-a304-c19d015d36b1} + false + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/tut5/tut5.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/tut5/tut5.vcxproj new file mode 100644 index 0000000000..4348f29d9b --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/tut5/tut5.vcxproj @@ -0,0 +1,94 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {5C9B3380-3C6E-45CC-986A-16D245E27E58} + Win32Proj + tut5 + + + + Application + true + Unicode + v140 + + + Application + false + true + Unicode + v140 + + + + + + + + + + + + + + + true + + + false + + + + + + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + ProgramDatabase + + + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + + + + + + {ffd738f7-96f0-445c-81ea-551665ef53d1} + + + {f94ccadd-a90b-480c-a304-c19d015d36b1} + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/tut6a/tut6a.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/tut6a/tut6a.vcxproj new file mode 100644 index 0000000000..17e1498aa2 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/tut6a/tut6a.vcxproj @@ -0,0 +1,94 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {C781F9C4-31D4-4509-B031-84DB598B207D} + Win32Proj + tut6a + + + + Application + true + Unicode + v140 + + + Application + false + true + Unicode + v140 + + + + + + + + + + + + + + + true + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + + + + + + {ffd738f7-96f0-445c-81ea-551665ef53d1} + + + {f94ccadd-a90b-480c-a304-c19d015d36b1} + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/tut6b/tut6b.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/tut6b/tut6b.vcxproj new file mode 100644 index 0000000000..34efae5bfc --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/tut6b/tut6b.vcxproj @@ -0,0 +1,94 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {4A77CA6A-8E72-4CC6-9FE7-2C555C51815C} + Win32Proj + tut6b + + + + Application + true + Unicode + v140 + + + Application + false + true + Unicode + v140 + + + + + + + + + + + + + + + true + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + + + + + + {ffd738f7-96f0-445c-81ea-551665ef53d1} + + + {f94ccadd-a90b-480c-a304-c19d015d36b1} + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/tut6c/tut6c.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/tut6c/tut6c.vcxproj new file mode 100644 index 0000000000..84a1290627 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/tut6c/tut6c.vcxproj @@ -0,0 +1,94 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {17C6DD1B-EF6F-4561-B4FF-CF39F975ED29} + Win32Proj + tut6c + + + + Application + true + Unicode + v140 + + + Application + false + true + Unicode + v140 + + + + + + + + + + + + + + + true + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + + + + + + {ffd738f7-96f0-445c-81ea-551665ef53d1} + + + {f94ccadd-a90b-480c-a304-c19d015d36b1} + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/msvc/windows_attributes/windows_attributes.vcxproj b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/windows_attributes/windows_attributes.vcxproj new file mode 100644 index 0000000000..a2a682991e --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/msvc/windows_attributes/windows_attributes.vcxproj @@ -0,0 +1,94 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {FC5C770F-3017-4021-8DAF-C5DCA3FDF005} + Win32Proj + windows_attributes + + + + Application + true + Unicode + v140 + + + Application + false + true + Unicode + v140 + + + + + + + + + + + + + + + true + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + + + + + + {ffd738f7-96f0-445c-81ea-551665ef53d1} + + + {f94ccadd-a90b-480c-a304-c19d015d36b1} + + + + + + \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/odr1_test.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/odr1_test.cpp new file mode 100644 index 0000000000..4d73e18139 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/odr1_test.cpp @@ -0,0 +1,24 @@ +// Boost Filesystem odr1_test.cpp ----------------------------------------------------// + +// Copyright Beman Dawes 2014. + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include + +namespace boost +{ + namespace filesystem + { + void tu2(); + } +} + +int main() +{ + boost::filesystem::tu2(); + return 0; +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/odr2_test.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/odr2_test.cpp new file mode 100644 index 0000000000..948666b209 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/odr2_test.cpp @@ -0,0 +1,18 @@ +// Boost Filesystem odr2_test.cpp ----------------------------------------------------// + +// Copyright Beman Dawes 2014. + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include + +namespace boost +{ + namespace filesystem + { + void tu2() {} + } +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/operations_test.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/operations_test.cpp new file mode 100644 index 0000000000..444c2810de --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/operations_test.cpp @@ -0,0 +1,2183 @@ +// Boost operations_test.cpp ---------------------------------------------------------// + +// Copyright Beman Dawes 2002, 2009. + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include + +// See deprecated_test for tests of deprecated features +#ifndef BOOST_FILESYSTEM_NO_DEPRECATED +# define BOOST_FILESYSTEM_NO_DEPRECATED +#endif +#ifndef BOOST_SYSTEM_NO_DEPRECATED +# define BOOST_SYSTEM_NO_DEPRECATED +#endif + +#include + +#include +# if defined( BOOST_NO_STD_WSTRING ) +# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support +# endif + +#include +#include +#include + +namespace fs = boost::filesystem; +using boost::system::error_code; +using boost::system::system_category; +using boost::system::system_error; + +#include +#include + +using std::cout; +using std::endl; + +#include +#include +#include +#include // for strncmp, etc. +#include +#include // for system(), getenv(), etc. + +#ifdef BOOST_WINDOWS_API +# include + +inline std::wstring convert(const char* c) +{ + std::string s(c); + + return std::wstring(s.begin(), s.end()); +} + +// Note: these three setenv* functions are not general solutions for the missing +// setenv* problem on Windows. See Microsoft's _putenv for that need, and ticker #7018 +// for discussion and rationale for returning void for this test program, which needs +// to work for both the MSVC Runtime and the Windows Runtime (which does not support +// _putenv). + +inline void setenv(const char* name, const fs::path::value_type* val, int) +{ + SetEnvironmentVariableW(convert(name).c_str(), val); +} + +inline void setenv(const char* name, const char* val, int) +{ + SetEnvironmentVariableW(convert(name).c_str(), convert(val).c_str()); +} + +inline void unsetenv(const char* name) +{ + SetEnvironmentVariableW(convert(name).c_str(), 0); +} + +#else + +#include // allow unqualifed calls to env funcs on SunOS + +#endif + +// on Windows, except for standard libaries known to have wchar_t overloads for +// file stream I/O, use path::string() to get a narrow character c_str() +#if defined(BOOST_WINDOWS_API) \ + && (!defined(_CPPLIB_VER) || _CPPLIB_VER < 405) // not Dinkumware || no wide overloads +# define BOOST_FILESYSTEM_C_STR string().c_str() // use narrow, since wide not available +#else // use the native c_str, which will be narrow on POSIX, wide on Windows +# define BOOST_FILESYSTEM_C_STR c_str() +#endif + +#define CHECK_EXCEPTION(Functor,Expect) throws_fs_error(Functor,Expect,__LINE__) + +namespace +{ + typedef int errno_t; + std::string platform(BOOST_PLATFORM); + bool report_throws = false; + bool cleanup = true; + bool skip_long_windows_tests = false; + + fs::directory_iterator end_itr; + fs::path dir; + fs::path d1; + fs::path d2; + fs::path f0; + fs::path f1; + fs::path d1f1; + + bool create_symlink_ok(true); + + fs::path ng(" no-way, Jose"); + + unsigned short language_id; // 0 except for Windows + + const fs::path temp_dir(fs::unique_path("op-test-%%%%-%%%%")); + + void create_file(const fs::path & ph, const std::string & contents = std::string()) + { + std::ofstream f(ph.BOOST_FILESYSTEM_C_STR); + if (!f) + throw fs::filesystem_error("operations_test create_file", + ph, error_code(errno, system_category())); + if (!contents.empty()) f << contents; + } + + void verify_file(const fs::path & ph, const std::string & expected) + { + std::ifstream f(ph.BOOST_FILESYSTEM_C_STR); + if (!f) + throw fs::filesystem_error("operations_test verify_file", + ph, error_code(errno, system_category())); + std::string contents; + f >> contents; + if (contents != expected) + throw fs::filesystem_error("operations_test verify_file contents \"" + + contents + "\" != \"" + expected + "\"", ph, error_code()); + } + + template< typename F > + bool throws_fs_error(F func, errno_t en, int line) + { + try { func(); } + + catch (const fs::filesystem_error & ex) + { + if (report_throws) + { + // use the what() convenience function to display exceptions + cout << "\n" << ex.what() << "\n"; + } + if (en == 0 + || en == ex.code().default_error_condition().value()) return true; + cout + << "\nWarning: line " << line + << " exception reports default_error_condition().value() " + << ex.code().default_error_condition().value() + << ", should be " << en + << "\n value() is " << ex.code().value() + << endl; + return true; + } + return false; + } + + boost::system::error_category* poison_category_aux() { return 0; } + boost::system::error_category& poison_category() { return *poison_category_aux(); } + + // compile-only two argument "do-the-right-thing" tests + // verifies that all overload combinations compile without error + void do_the_right_thing_tests(bool call_ = false) + { + if (call_) + { + fs::path p; + std::string s; + const char* a = 0; + fs::copy_file(p, p); + fs::copy_file(s, p); + fs::copy_file(a, p); + fs::copy_file(p, s); + fs::copy_file(p, a); + fs::copy_file(s, s); + fs::copy_file(a, s); + fs::copy_file(s, a); + fs::copy_file(a, a); + } + } + + void bad_file_size() + { + fs::file_size(" No way, Jose"); + } + + void bad_directory_size() + { + fs::file_size(fs::current_path()); + } + + fs::path bad_create_directory_path; + void bad_create_directory() + { + fs::create_directory(bad_create_directory_path); + } + + void bad_equivalent() + { + fs::equivalent("no-such-path", "another-not-present-path"); + } + + fs::path bad_remove_dir; + void bad_remove() + { + fs::remove(bad_remove_dir); + } + + class renamer + { + public: + renamer(const fs::path & p1, const fs::path & p2) + : from(p1), to(p2) {} + void operator()() + { + fs::rename(from, to); + } + private: + fs::path from; + fs::path to; + }; + + //------------------------------ debugging aids --------------------------------------// + + //std::ostream& operator<<(std::ostream& os, const fs::file_status& s) + //{ + // if (s.type() == fs::status_error) { os << "status_error"; } + // else if (s.type() == fs::file_not_found) { os << "file_not_found"; } + // else if (s.type() == fs::regular_file) { os << "regular_file"; } + // else if (s.type() == fs::directory_file) { os << "directory_file"; } + // else if (s.type() == fs::symlink_file) { os << "symlink_file"; } + // else if (s.type() == fs::block_file) { os << "block_file"; } + // else if (s.type() == fs::character_file) { os << "character_file"; } + // else if (s.type() == fs::fifo_file) { os << "fifo_file"; } + // else if (s.type() == fs::socket_file) { os << "socket_file"; } + // else if (s.type() == fs::reparse_file) { os << "reparse_file"; } + // else if (s.type() == fs::type_unknown) { os << "type_unknown"; } + // else { os << "_detail_directory_symlink"; } + // return os; + //} + + //void dump_tree(const fs::path & root) + //{ + // cout << "dumping tree rooted at " << root << endl; + // for (fs::recursive_directory_iterator it (root, fs::symlink_option::recurse); + // it != fs::recursive_directory_iterator(); + // ++it) + // { + // for (int i = 0; i <= it.level(); ++i) + // cout << " "; + + // cout << it->path(); + // if (fs::is_symlink(it->path())) + // { + // cout << " [symlink]" << endl; + // } + // else + // cout << endl; + // } + //} + + // exception_tests() ---------------------------------------------------------------// + + void exception_tests() + { + cout << "exception_tests..." << endl; + bool exception_thrown; + + // catch runtime_error by value + + cout << " catch runtime_error by value" << endl; + exception_thrown = false; + try + { + fs::create_directory("no-such-dir/foo/bar"); + } + catch (std::runtime_error x) + { + exception_thrown = true; + if (report_throws) cout << x.what() << endl; + if (platform == "Windows" && language_id == 0x0409) // English (United States) + // the stdcxx standard library apparently appends additional info + // to what(), so check only the initial portion: + BOOST_TEST(std::strncmp(x.what(), + "boost::filesystem::create_directory", + sizeof("boost::filesystem::create_directory")-1) == 0); + } + BOOST_TEST(exception_thrown); + + // catch system_error by value + + cout << " catch system_error by value" << endl; + exception_thrown = false; + try + { + fs::create_directory("no-such-dir/foo/bar"); + } + catch (system_error x) + { + exception_thrown = true; + if (report_throws) cout << x.what() << endl; + if (platform == "Windows" && language_id == 0x0409) // English (United States) + BOOST_TEST(std::strcmp(x.what(), + "boost::filesystem::create_directory: The system cannot find the path specified") == 0); + } + BOOST_TEST(exception_thrown); + + // catch filesystem_error by value + + cout << " catch filesystem_error by value" << endl; + exception_thrown = false; + try + { + fs::create_directory("no-such-dir/foo/bar"); + } + catch (fs::filesystem_error x) + { + exception_thrown = true; + if (report_throws) cout << x.what() << endl; + if (platform == "Windows" && language_id == 0x0409) // English (United States) + { + bool ok (std::strcmp(x.what(), + "boost::filesystem::create_directory: The system cannot find the path specified: \"no-such-dir/foo/bar\"") == 0); + BOOST_TEST(ok); + if (!ok) + { + cout << "what returns \"" << x.what() << "\"" << endl; + } + } + } + BOOST_TEST(exception_thrown); + + // catch filesystem_error by const reference + + cout << " catch filesystem_error by const reference" << endl; + exception_thrown = false; + try + { + fs::create_directory("no-such-dir/foo/bar"); + } + catch (const fs::filesystem_error & x) + { + exception_thrown = true; + if (report_throws) cout << x.what() << endl; + if (platform == "Windows" && language_id == 0x0409) // English (United States) + { + bool ok (std::strcmp(x.what(), + "boost::filesystem::create_directory: The system cannot find the path specified: \"no-such-dir/foo/bar\"") == 0); + BOOST_TEST(ok); + if (!ok) + { + cout << "what returns \"" << x.what() << "\"" << endl; + } + } + } + BOOST_TEST(exception_thrown); + + // the bound functions should throw, so CHECK_EXCEPTION() should return true + + BOOST_TEST(CHECK_EXCEPTION(bad_file_size, ENOENT)); + + if (platform == "Windows") + BOOST_TEST(CHECK_EXCEPTION(bad_directory_size, ENOENT)); + else + BOOST_TEST(CHECK_EXCEPTION(bad_directory_size, 0)); + + // test path::exception members + try { fs::file_size(ng); } // will throw + + catch (const fs::filesystem_error & ex) + { + BOOST_TEST(ex.path1().string() == " no-way, Jose"); + } + + cout << " exception_tests complete" << endl; + } + + // create a directory tree that can be used by subsequent tests ---------------------// + // + // dir + // d1 + // d1f1 // an empty file + // f0 // an empty file + // f1 // a file containing "file-f1" + + void create_tree() + { + cout << "creating test directories and files in " << dir << endl; + + // create directory d1 + BOOST_TEST(!fs::create_directory(dir)); + BOOST_TEST(!fs::is_symlink(dir)); + BOOST_TEST(!fs::is_symlink("nosuchfileordirectory")); + d1 = dir / "d1"; + BOOST_TEST(fs::create_directory(d1)); + BOOST_TEST(fs::exists(d1)); + BOOST_TEST(fs::is_directory(d1)); + BOOST_TEST(fs::is_empty(d1)); + + // create an empty file named "d1f1" + d1f1 = d1 / "d1f1"; + create_file(d1f1, ""); + BOOST_TEST(fs::exists(d1f1)); + BOOST_TEST(!fs::is_directory(d1f1)); + BOOST_TEST(fs::is_regular_file(d1f1)); + BOOST_TEST(fs::is_empty(d1f1)); + BOOST_TEST(fs::file_size(d1f1) == 0); + BOOST_TEST(fs::hard_link_count(d1f1) == 1); + + // create an empty file named "f0" + f0 = dir / "f0"; + create_file(f0, ""); + BOOST_TEST(fs::exists(f0)); + BOOST_TEST(!fs::is_directory(f0)); + BOOST_TEST(fs::is_regular_file(f0)); + BOOST_TEST(fs::is_empty(f0)); + BOOST_TEST(fs::file_size(f0) == 0); + BOOST_TEST(fs::hard_link_count(f0) == 1); + + // create a file named "f1" + f1 = dir / "f1"; + create_file(f1, "file-f1"); + BOOST_TEST(fs::exists(f1)); + BOOST_TEST(!fs::is_directory(f1)); + BOOST_TEST(fs::is_regular_file(f1)); + BOOST_TEST(fs::file_size(f1) == 7); + verify_file(f1, "file-f1"); + } + + // directory_iterator_tests --------------------------------------------------------// + + void directory_iterator_tests() + { + cout << "directory_iterator_tests..." << endl; + + bool dir_itr_exception(false); + try { fs::directory_iterator it(""); } + catch (const fs::filesystem_error &) { dir_itr_exception = true; } + BOOST_TEST(dir_itr_exception); + + error_code ec; + + BOOST_TEST(!ec); + fs::directory_iterator it("", ec); + BOOST_TEST(ec); + + dir_itr_exception = false; + try { fs::directory_iterator itx("nosuchdirectory"); } + catch (const fs::filesystem_error &) { dir_itr_exception = true; } + BOOST_TEST(dir_itr_exception); + + ec.clear(); + fs::directory_iterator it2x("nosuchdirectory", ec); + BOOST_TEST(ec); + + dir_itr_exception = false; + try + { + error_code ecx; + fs::directory_iterator itx("nosuchdirectory", ecx); + BOOST_TEST(ecx); + BOOST_TEST(ecx == boost::system::errc::no_such_file_or_directory); + } + catch (const fs::filesystem_error &) { dir_itr_exception = true; } + BOOST_TEST(!dir_itr_exception); + + // create a second directory named d2 + d2 = dir / "d2"; + fs::create_directory(d2); + BOOST_TEST(fs::exists(d2)); + BOOST_TEST(fs::is_directory(d2)); + + // test the basic operation of directory_iterators, and test that + // stepping one iterator doesn't affect a different iterator. + { + typedef std::vector vec_type; + vec_type vec; + + fs::directory_iterator it1(dir); + BOOST_TEST(it1 != fs::directory_iterator()); + BOOST_TEST(fs::exists(it1->status())); + vec.push_back(*it1); + BOOST_TEST(*it1 == vec[0]); + + fs::directory_iterator it2(dir); + BOOST_TEST(it2 != fs::directory_iterator()); + BOOST_TEST(*it1 == *it2); + + ++it1; + BOOST_TEST(it1 != fs::directory_iterator()); + BOOST_TEST(fs::exists(it1->status())); + BOOST_TEST(it1 != it2); + BOOST_TEST(*it1 != vec[0]); + BOOST_TEST(*it2 == vec[0]); + vec.push_back(*it1); + + ++it1; + BOOST_TEST(it1 != fs::directory_iterator()); + BOOST_TEST(fs::exists(it1->status())); + BOOST_TEST(it1 != it2); + BOOST_TEST(*it2 == vec[0]); + vec.push_back(*it1); + + ++it1; + BOOST_TEST(it1 != fs::directory_iterator()); + BOOST_TEST(fs::exists(it1->status())); + BOOST_TEST(it1 != it2); + BOOST_TEST(*it2 == vec[0]); + vec.push_back(*it1); + + ++it1; + BOOST_TEST(it1 == fs::directory_iterator()); + + BOOST_TEST(*it2 == vec[0]); + ec.clear(); + it2.increment(ec); + BOOST_TEST(!ec); + BOOST_TEST(it2 != fs::directory_iterator()); + BOOST_TEST(it1 == fs::directory_iterator()); + BOOST_TEST(*it2 == vec[1]); + ++it2; + BOOST_TEST(*it2 == vec[2]); + BOOST_TEST(it1 == fs::directory_iterator()); + ++it2; + BOOST_TEST(*it2 == vec[3]); + ++it2; + BOOST_TEST(it1 == fs::directory_iterator()); + BOOST_TEST(it2 == fs::directory_iterator()); + + // sort vec and check that the right directory entries were found + std::sort(vec.begin(), vec.end()); + + BOOST_TEST_EQ(vec[0].path().filename().string(), std::string("d1")); + BOOST_TEST_EQ(vec[1].path().filename().string(), std::string("d2")); + BOOST_TEST_EQ(vec[2].path().filename().string(), std::string("f0")); + BOOST_TEST_EQ(vec[3].path().filename().string(), std::string("f1")); + } + + { // *i++ must meet the standard's InputIterator requirements + fs::directory_iterator dir_itr(dir); + BOOST_TEST(dir_itr != fs::directory_iterator()); + fs::path p = dir_itr->path(); + BOOST_TEST((*dir_itr++).path() == p); + BOOST_TEST(dir_itr != fs::directory_iterator()); + BOOST_TEST(dir_itr->path() != p); + + // test case reported in comment to SourceForge bug tracker [937606] + fs::directory_iterator itx(dir); + const fs::path p1 = (*itx++).path(); + BOOST_TEST(itx != fs::directory_iterator()); + const fs::path p2 = (*itx++).path(); + BOOST_TEST(p1 != p2); + ++itx; + ++itx; + BOOST_TEST(itx == fs::directory_iterator()); + } + + // Windows has a tricky special case when just the root-name is given, + // causing the rest of the path to default to the current directory. + // Reported as S/F bug [ 1259176 ] + if (platform == "Windows") + { + fs::path root_name_path(fs::current_path().root_name()); + fs::directory_iterator itx(root_name_path); + BOOST_TEST(itx != fs::directory_iterator()); +// BOOST_TEST(fs::exists((*itx).path())); + BOOST_TEST(fs::exists(itx->path())); + BOOST_TEST(itx->path().parent_path() == root_name_path); + bool found(false); + do + { + if (itx->path().filename() == temp_dir.filename()) + found = true; + } while (++itx != fs::directory_iterator()); + BOOST_TEST(found); + } + + // there was an inital bug in directory_iterator that caused premature + // close of an OS handle. This block will detect regression. + { + fs::directory_iterator di; + { + di = fs::directory_iterator(dir); + } + BOOST_TEST(++di != fs::directory_iterator()); + } + + cout << " directory_iterator_tests complete" << endl; + } + + // recursive_directory_iterator_tests ----------------------------------------------// + + int walk_tree(bool recursive) + { +// cout << " walk_tree" << endl; + error_code ec; + int d1f1_count = 0; + for (fs::recursive_directory_iterator it (dir, + recursive ? fs::symlink_option::recurse : fs::symlink_option::no_recurse); + it != fs::recursive_directory_iterator(); + it.increment(ec)) + { +// cout << " " << it->path() << endl; + if (it->path().filename() == "d1f1") + ++d1f1_count; + } + return d1f1_count; + } + + void recursive_directory_iterator_tests() + { + cout << "recursive_directory_iterator_tests..." << endl; + BOOST_TEST_EQ(walk_tree(false), 1); + if (create_symlink_ok) + BOOST_TEST(walk_tree(true) > 1); + + // test iterator increment with error_code argument + cout << " with error_code argument" << endl; + boost::system::error_code ec; + int d1f1_count = 0; + for (fs::recursive_directory_iterator it (dir, fs::symlink_option::no_recurse); + it != fs::recursive_directory_iterator(); + it.increment(ec)) + { + if (it->path().filename() == "d1f1") + ++d1f1_count; + } + BOOST_TEST(!ec); + BOOST_TEST_EQ(d1f1_count, 1); + + cout << " recursive_directory_iterator_tests complete" << endl; + } + + // iterator_status_tests -----------------------------------------------------------// + + void iterator_status_tests() + { + cout << "iterator_status_tests..." << endl; + + error_code ec; + // harmless if these fail: + fs::create_symlink(dir/"f0", dir/"f0_symlink", ec); + fs::create_symlink(dir/"no such file", dir/"dangling_symlink", ec); + fs::create_directory_symlink(dir/"d1", dir/"d1_symlink", ec); + fs::create_directory_symlink(dir/"no such directory", + dir/"dangling_directory_symlink", ec); + + for (fs::directory_iterator it(dir); + it != fs::directory_iterator(); ++it) + { + BOOST_TEST(fs::status(it->path()).type() == it->status().type()); + BOOST_TEST(fs::symlink_status(it->path()).type() == it->symlink_status().type()); + if (it->path().filename() == "d1") + { + BOOST_TEST(fs::is_directory(it->status())); + BOOST_TEST(fs::is_directory(it->symlink_status())); + } + else if (it->path().filename() == "d2") + { + BOOST_TEST(fs::is_directory(it->status())); + BOOST_TEST(fs::is_directory(it->symlink_status())); + } + else if (it->path().filename() == "f0") + { + BOOST_TEST(fs::is_regular_file(it->status())); + BOOST_TEST(fs::is_regular_file(it->symlink_status())); + } + else if (it->path().filename() == "f1") + { + BOOST_TEST(fs::is_regular_file(it->status())); + BOOST_TEST(fs::is_regular_file(it->symlink_status())); + } + else if (it->path().filename() == "f0_symlink") + { + BOOST_TEST(fs::is_regular_file(it->status())); + BOOST_TEST(fs::is_symlink(it->symlink_status())); + } + else if (it->path().filename() == "dangling_symlink") + { + BOOST_TEST(it->status().type() == fs::file_not_found); + BOOST_TEST(fs::is_symlink(it->symlink_status())); + } + else if (it->path().filename() == "d1_symlink") + { + BOOST_TEST(fs::is_directory(it->status())); + BOOST_TEST(fs::is_symlink(it->symlink_status())); + } + else if (it->path().filename() == "dangling_directory_symlink") + { + BOOST_TEST(it->status().type() == fs::file_not_found); + BOOST_TEST(fs::is_symlink(it->symlink_status())); + } + //else + // cout << " Note: unexpected directory entry " << it->path().filename() << endl; + } + } + + // recursive_iterator_status_tests -------------------------------------------------// + + void recursive_iterator_status_tests() + { + cout << "recursive_iterator_status_tests..." << endl; + for (fs::recursive_directory_iterator it (dir); + it != fs::recursive_directory_iterator(); + ++it) + { + BOOST_TEST(fs::status(it->path()).type() == it->status().type()); + BOOST_TEST(fs::symlink_status(it->path()).type() == it->symlink_status().type()); + } + } + + // create_hard_link_tests ----------------------------------------------------------// + + void create_hard_link_tests() + { + cout << "create_hard_link_tests..." << endl; + + fs::path from_ph(dir / "f3"); + fs::path f1x(dir / "f1"); + + BOOST_TEST(!fs::exists(from_ph)); + BOOST_TEST(fs::exists(f1x)); + bool create_hard_link_ok(true); + try { fs::create_hard_link(f1x, from_ph); } + catch (const fs::filesystem_error & ex) + { + create_hard_link_ok = false; + cout + << " *** For information only ***\n" + " create_hard_link() attempt failed\n" + " filesystem_error.what() reports: " << ex.what() << "\n" + " create_hard_link() may not be supported on this file system\n"; + } + + if (create_hard_link_ok) + { + cout + << " *** For information only ***\n" + " create_hard_link() succeeded\n"; + BOOST_TEST(fs::exists(from_ph)); + BOOST_TEST(fs::exists(f1x)); + BOOST_TEST(fs::equivalent(from_ph, f1x)); + BOOST_TEST(fs::hard_link_count(from_ph) == 2); + BOOST_TEST(fs::hard_link_count(f1x) == 2); + } + + // Although tests may be running on a FAT or other file system that does + // not support hard links, that is unusual enough that it is considered + // a test failure. + BOOST_TEST(create_hard_link_ok); + + error_code ec; + fs::create_hard_link(fs::path("doesnotexist"), + fs::path("shouldnotwork"), ec); + BOOST_TEST(ec); + } + + // create_symlink_tests ------------------------------------------------------------// + + void create_symlink_tests() + { + cout << "create_symlink_tests..." << endl; + + fs::path from_ph(dir / "f4"); + fs::path f1x(dir / "f1"); + BOOST_TEST(!fs::exists(from_ph)); + BOOST_TEST(fs::exists(f1x)); + try { fs::create_symlink(f1x, from_ph); } + catch (const fs::filesystem_error & ex) + { + create_symlink_ok = false; + cout + << " *** For information only ***\n" + " create_symlink() attempt failed\n" + " filesystem_error.what() reports: " << ex.what() << "\n" + " create_symlink() may not be supported on this operating system or file system\n"; + } + + if (create_symlink_ok) + { + cout + << " *** For information only ***\n" + " create_symlink() succeeded\n"; + BOOST_TEST(fs::exists(from_ph)); + BOOST_TEST(fs::is_symlink(from_ph)); + BOOST_TEST(fs::exists(f1x)); + BOOST_TEST(fs::equivalent(from_ph, f1x)); + BOOST_TEST(fs::read_symlink(from_ph) == f1x); + + fs::file_status stat = fs::symlink_status(from_ph); + BOOST_TEST(fs::exists(stat)); + BOOST_TEST(!fs::is_directory(stat)); + BOOST_TEST(!fs::is_regular_file(stat)); + BOOST_TEST(!fs::is_other(stat)); + BOOST_TEST(fs::is_symlink(stat)); + + stat = fs::status(from_ph); + BOOST_TEST(fs::exists(stat)); + BOOST_TEST(!fs::is_directory(stat)); + BOOST_TEST(fs::is_regular_file(stat)); + BOOST_TEST(!fs::is_other(stat)); + BOOST_TEST(!fs::is_symlink(stat)); + + // since create_symlink worked, copy_symlink should also work + fs::path symlink2_ph(dir / "symlink2"); + fs::copy_symlink(from_ph, symlink2_ph); + stat = fs::symlink_status(symlink2_ph); + BOOST_TEST(fs::is_symlink(stat)); + BOOST_TEST(fs::exists(stat)); + BOOST_TEST(!fs::is_directory(stat)); + BOOST_TEST(!fs::is_regular_file(stat)); + BOOST_TEST(!fs::is_other(stat)); + } + + error_code ec = error_code(); + fs::create_symlink("doesnotexist", "", ec); + BOOST_TEST(ec); + } + + // permissions_tests ---------------------------------------------------------------// + + void permissions_tests() + { + cout << "permissions_tests..." << endl; + + fs::path p(dir / "permissions.txt"); + create_file(p); + + if (platform == "POSIX") + { + cout << " fs::status(p).permissions() " << std::oct << fs::status(p).permissions() + << std::dec << endl; + BOOST_TEST((fs::status(p).permissions() & 0600) == 0600); // 0644, 0664 sometimes returned + + fs::permissions(p, fs::owner_all); + BOOST_TEST(fs::status(p).permissions() == fs::owner_all); + + fs::permissions(p, fs::add_perms | fs::group_all); + BOOST_TEST(fs::status(p).permissions() == (fs::owner_all | fs::group_all)); + + fs::permissions(p, fs::remove_perms | fs::group_all); + BOOST_TEST(fs::status(p).permissions() == fs::owner_all); + + // some POSIX platforms cache permissions during directory iteration, some don't + // so test that iteration finds the correct permissions + for (fs::directory_iterator itr(dir); itr != fs::directory_iterator(); ++itr) + if (itr->path().filename() == fs::path("permissions.txt")) + BOOST_TEST(itr->status().permissions() == fs::owner_all); + + if (create_symlink_ok) // only if symlinks supported + { + BOOST_TEST(fs::status(p).permissions() == fs::owner_all); + fs::path p2(dir / "permissions-symlink.txt"); + fs::create_symlink(p, p2); + cout << std::oct; + cout << " status(p).permissions() " << fs::status(p).permissions() << endl; + cout << " status(p2).permissions() " << fs::status(p).permissions() << endl; + fs::permissions(p2, fs::add_perms | fs::others_read); + cout << " status(p).permissions(): " << fs::status(p).permissions() << endl; + cout << " status(p2).permissions(): " << fs::status(p2).permissions() << endl; + cout << std::dec; + } + + } + else // Windows + { + BOOST_TEST(fs::status(p).permissions() == 0666); + fs::permissions(p, fs::remove_perms | fs::group_write); + BOOST_TEST(fs::status(p).permissions() == 0444); + fs::permissions(p, fs::add_perms | fs::group_write); + BOOST_TEST(fs::status(p).permissions() == 0666); + } + } + + // rename_tests --------------------------------------------------------------------// + + void rename_tests() + { + cout << "rename_tests..." << endl; + + fs::path f1x(dir / "f1"); + BOOST_TEST(fs::exists(f1x)); + + // error: rename a non-existent old file + BOOST_TEST(!fs::exists(d1 / "f99")); + BOOST_TEST(!fs::exists(d1 / "f98")); + renamer n1a(d1 / "f99", d1 / "f98"); + BOOST_TEST(CHECK_EXCEPTION(n1a, ENOENT)); + renamer n1b(fs::path(""), d1 / "f98"); + BOOST_TEST(CHECK_EXCEPTION(n1b, ENOENT)); + + // error: rename an existing file to "" + renamer n2(f1x, ""); + BOOST_TEST(CHECK_EXCEPTION(n2, ENOENT)); + + // rename an existing file to an existent file + create_file(dir / "ff1", "ff1"); + create_file(dir / "ff2", "ff2"); + fs::rename(dir / "ff2", dir / "ff1"); + BOOST_TEST(fs::exists(dir / "ff1")); + verify_file(dir / "ff1", "ff2"); + BOOST_TEST(!fs::exists(dir / "ff2")); + + // rename an existing file to itself + BOOST_TEST(fs::exists(dir / "f1")); + fs::rename(dir / "f1", dir / "f1"); + BOOST_TEST(fs::exists(dir / "f1")); + + // error: rename an existing directory to an existing non-empty directory + BOOST_TEST(fs::exists(dir / "f1")); + BOOST_TEST(fs::exists(d1 / "f2")); + // several POSIX implementations (cygwin, openBSD) report ENOENT instead of EEXIST, + // so we don't verify error type on the following test. + renamer n3b(dir, d1); + BOOST_TEST(CHECK_EXCEPTION(n3b, 0)); + + // error: move existing file to a nonexistent parent directory + BOOST_TEST(!fs::is_directory(dir / "f1")); + BOOST_TEST(!fs::exists(dir / "d3/f3")); + renamer n4a(dir / "f1", dir / "d3/f3"); + BOOST_TEST(CHECK_EXCEPTION(n4a, ENOENT)); + + // rename existing file in same directory + BOOST_TEST(fs::exists(d1 / "f2")); + BOOST_TEST(!fs::exists(d1 / "f50")); + fs::rename(d1 / "f2", d1 / "f50"); + BOOST_TEST(!fs::exists(d1 / "f2")); + BOOST_TEST(fs::exists(d1 / "f50")); + fs::rename(d1 / "f50", d1 / "f2"); + BOOST_TEST(fs::exists(d1 / "f2")); + BOOST_TEST(!fs::exists(d1 / "f50")); + + // move and rename an existing file to a different directory + fs::rename(d1 / "f2", d2 / "f3"); + BOOST_TEST(!fs::exists(d1 / "f2")); + BOOST_TEST(!fs::exists(d2 / "f2")); + BOOST_TEST(fs::exists(d2 / "f3")); + BOOST_TEST(!fs::is_directory(d2 / "f3")); + verify_file(d2 / "f3", "file-f1"); + fs::rename(d2 / "f3", d1 / "f2"); + BOOST_TEST(fs::exists(d1 / "f2")); + + // error: move existing directory to nonexistent parent directory + BOOST_TEST(fs::exists(d1)); + BOOST_TEST(!fs::exists(dir / "d3/d5")); + BOOST_TEST(!fs::exists(dir / "d3")); + renamer n5a(d1, dir / "d3/d5"); + BOOST_TEST(CHECK_EXCEPTION(n5a, ENOENT)); + + // rename existing directory + fs::path d3(dir / "d3"); + BOOST_TEST(fs::exists(d1)); + BOOST_TEST(fs::exists(d1 / "f2")); + BOOST_TEST(!fs::exists(d3)); + fs::rename(d1, d3); + BOOST_TEST(!fs::exists(d1)); + BOOST_TEST(fs::exists(d3)); + BOOST_TEST(fs::is_directory(d3)); + BOOST_TEST(!fs::exists(d1 / "f2")); + BOOST_TEST(fs::exists(d3 / "f2")); + fs::rename(d3, d1); + BOOST_TEST(fs::exists(d1)); + BOOST_TEST(fs::exists(d1 / "f2")); + BOOST_TEST(!fs::exists(d3)); + + // rename and move d1 to d2 / "d20" + BOOST_TEST(fs::exists(d1)); + BOOST_TEST(!fs::exists(d2 / "d20")); + BOOST_TEST(fs::exists(d1 / "f2")); + fs::rename(d1, d2 / "d20"); + BOOST_TEST(!fs::exists(d1)); + BOOST_TEST(fs::exists(d2 / "d20")); + BOOST_TEST(fs::exists(d2 / "d20" / "f2")); + fs::rename(d2 / "d20", d1); + BOOST_TEST(fs::exists(d1)); + BOOST_TEST(!fs::exists(d2 / "d20")); + BOOST_TEST(fs::exists(d1 / "f2")); + } + + // predicate_and_status_tests ------------------------------------------------------// + + void predicate_and_status_tests() + { + cout << "predicate_and_status_tests..." << endl; + + BOOST_TEST(!fs::exists(ng)); + BOOST_TEST(!fs::is_directory(ng)); + BOOST_TEST(!fs::is_regular_file(ng)); + BOOST_TEST(!fs::is_symlink(ng)); + fs::file_status stat(fs::status(ng)); + BOOST_TEST(fs::type_present(stat)); + BOOST_TEST(fs::permissions_present(stat)); + BOOST_TEST(fs::status_known(stat)); + BOOST_TEST(!fs::exists(stat)); + BOOST_TEST(!fs::is_directory(stat)); + BOOST_TEST(!fs::is_regular_file(stat)); + BOOST_TEST(!fs::is_other(stat)); + BOOST_TEST(!fs::is_symlink(stat)); + stat = fs::status(""); + BOOST_TEST(fs::type_present(stat)); + BOOST_TEST(fs::permissions_present(stat)); + BOOST_TEST(fs::status_known(stat)); + BOOST_TEST(!fs::exists(stat)); + BOOST_TEST(!fs::is_directory(stat)); + BOOST_TEST(!fs::is_regular_file(stat)); + BOOST_TEST(!fs::is_other(stat)); + BOOST_TEST(!fs::is_symlink(stat)); + } + + // create_directory_tests ----------------------------------------------------------// + + void create_directory_tests() + { + cout << "create_directory_tests..." << endl; + + // create a directory, then check it for consistency + // take extra care to report problems, since if this fails + // many subsequent tests will fail + try + { + fs::create_directory(dir); + } + + catch (const fs::filesystem_error & x) + { + cout << x.what() << "\n\n" + "***** Creating directory " << dir << " failed. *****\n" + "***** This is a serious error that will prevent further tests *****\n" + "***** from returning useful results. Further testing is aborted. *****\n\n"; + std::exit(1); + } + + catch (...) + { + cout << "\n\n" + "***** Creating directory " << dir << " failed. *****\n" + "***** This is a serious error that will prevent further tests *****\n" + "***** from returning useful results. Further testing is aborted. *****\n\n"; + std::exit(1); + } + + BOOST_TEST(fs::exists(dir)); + BOOST_TEST(fs::is_empty(dir)); + BOOST_TEST(fs::is_directory(dir)); + BOOST_TEST(!fs::is_regular_file(dir)); + BOOST_TEST(!fs::is_other(dir)); + BOOST_TEST(!fs::is_symlink(dir)); + fs::file_status stat = fs::status(dir); + BOOST_TEST(fs::exists(stat)); + BOOST_TEST(fs::is_directory(stat)); + BOOST_TEST(!fs::is_regular_file(stat)); + BOOST_TEST(!fs::is_other(stat)); + BOOST_TEST(!fs::is_symlink(stat)); + + cout << " create_directory_tests complete" << endl; + } + + // current_directory_tests ---------------------------------------------------------// + + void current_directory_tests() + { + cout << "current_directory_tests..." << endl; + + // set the current directory, then check it for consistency + fs::path original_dir = fs::current_path(); + BOOST_TEST(dir != original_dir); + fs::current_path(dir); + BOOST_TEST(fs::current_path() == dir); + BOOST_TEST(fs::current_path() != original_dir); + fs::current_path(original_dir); + BOOST_TEST(fs::current_path() == original_dir); + BOOST_TEST(fs::current_path() != dir); + + // make sure the overloads work + fs::current_path(dir.c_str()); + BOOST_TEST(fs::current_path() == dir); + BOOST_TEST(fs::current_path() != original_dir); + fs::current_path(original_dir.string()); + BOOST_TEST(fs::current_path() == original_dir); + BOOST_TEST(fs::current_path() != dir); + } + + // create_directories_tests --------------------------------------------------------// + + void create_directories_tests() + { + cout << "create_directories_tests..." << endl; + + BOOST_TEST(!fs::create_directories("/")); + + fs::path p = dir / "level1" / "level2" / "level3"; + + BOOST_TEST(!fs::exists(p)); + BOOST_TEST(fs::create_directories(p)); + BOOST_TEST(fs::exists(p)); + BOOST_TEST(fs::is_directory(p)); + + if (fs::exists("/permissions_test")) + { + error_code ec; + BOOST_TEST(!fs::create_directories("/permissions_test", ec)); + BOOST_TEST(!fs::create_directories("/permissions_test/another_directory", ec)); + BOOST_TEST(ec); + } + } + + // resize_file_tests ---------------------------------------------------------------// + + void resize_file_tests() + { + cout << "resize_file_tests..." << endl; + + fs::path p(dir / "resize_file_test.txt"); + + fs::remove(p); + create_file(p, "1234567890"); + + BOOST_TEST(fs::exists(p)); + BOOST_TEST_EQ(fs::file_size(p), 10U); + fs::resize_file(p, 5); + BOOST_TEST(fs::exists(p)); + BOOST_TEST_EQ(fs::file_size(p), 5U); + fs::resize_file(p, 15); + BOOST_TEST(fs::exists(p)); + BOOST_TEST_EQ(fs::file_size(p), 15U); + + error_code ec; + fs::resize_file("no such file", 15, ec); + BOOST_TEST(ec); + } + + // status_of_nonexistent_tests -----------------------------------------------------// + + void status_of_nonexistent_tests() + { + cout << "status_of_nonexistent_tests..." << endl; + fs::path p ("nosuch"); + BOOST_TEST(!fs::exists(p)); + BOOST_TEST(!fs::is_regular_file(p)); + BOOST_TEST(!fs::is_directory(p)); + BOOST_TEST(!fs::is_symlink(p)); + BOOST_TEST(!fs::is_other(p)); + + fs::file_status s = fs::status(p); + BOOST_TEST(!fs::exists(s)); + BOOST_TEST_EQ(s.type(), fs::file_not_found); + BOOST_TEST(fs::type_present(s)); + BOOST_TEST(!fs::is_regular_file(s)); + BOOST_TEST(!fs::is_directory(s)); + BOOST_TEST(!fs::is_symlink(s)); + BOOST_TEST(!fs::is_other(s)); + } + + // status_error_reporting_tests ----------------------------------------------------// + + void status_error_reporting_tests() + { + cout << "status_error_reporting_tests..." << endl; + + error_code ec; + + // test status, ec, for existing file + ec.assign(-1,poison_category()); + BOOST_TEST(ec.value() == -1); + BOOST_TEST(&ec.category() == &poison_category()); + fs::file_status s = fs::status(".",ec); + BOOST_TEST(ec.value() == 0); + BOOST_TEST(ec.category() == system_category()); + BOOST_TEST(fs::exists(s)); + BOOST_TEST(fs::is_directory(s)); + + // test status, ec, for non-existing file + fs::path p ("nosuch"); + ec.assign(-1,poison_category()); + s = fs::status(p,ec); + BOOST_TEST(ec.value() != 0); + BOOST_TEST(ec.category() == system_category()); + + BOOST_TEST(!fs::exists(s)); + BOOST_TEST_EQ(s.type(), fs::file_not_found); + BOOST_TEST(fs::type_present(s)); + BOOST_TEST(!fs::is_regular_file(s)); + BOOST_TEST(!fs::is_directory(s)); + BOOST_TEST(!fs::is_symlink(s)); + BOOST_TEST(!fs::is_other(s)); + + // test queries, ec, for existing file + ec.assign(-1,poison_category()); + BOOST_TEST(fs::exists(".", ec)); + BOOST_TEST(ec.value() == 0); + BOOST_TEST(ec.category() == system_category()); + ec.assign(-1,poison_category()); + BOOST_TEST(!fs::is_regular_file(".", ec)); + BOOST_TEST(ec.value() == 0); + BOOST_TEST(ec.category() == system_category()); + ec.assign(-1,poison_category()); + BOOST_TEST(fs::is_directory(".", ec)); + BOOST_TEST(ec.value() == 0); + BOOST_TEST(ec.category() == system_category()); + + // test queries, ec, for non-existing file + ec.assign(-1,poison_category()); + BOOST_TEST(!fs::exists(p, ec)); + BOOST_TEST(ec.value() != 0); + BOOST_TEST(ec.category() == system_category()); + ec.assign(-1,poison_category()); + BOOST_TEST(!fs::is_regular_file(p, ec)); + BOOST_TEST(ec.value() != 0); + BOOST_TEST(ec.category() == system_category()); + ec.assign(-1,poison_category()); + BOOST_TEST(!fs::is_directory(p, ec)); + BOOST_TEST(ec.value() != 0); + BOOST_TEST(ec.category() == system_category()); + } + + // remove_tests --------------------------------------------------------------------// + + void remove_tests(const fs::path& dirx) + { + cout << "remove_tests..." << endl; + + // remove() file + fs::path f1x = dirx / "shortlife"; + BOOST_TEST(!fs::exists(f1x)); + create_file(f1x, ""); + BOOST_TEST(fs::exists(f1x)); + BOOST_TEST(!fs::is_directory(f1x)); + BOOST_TEST(fs::remove(f1x)); + BOOST_TEST(!fs::exists(f1x)); + BOOST_TEST(!fs::remove("no-such-file")); + BOOST_TEST(!fs::remove("no-such-directory/no-such-file")); + + // remove() directory + fs::path d1x = dirx / "shortlife_dir"; + BOOST_TEST(!fs::exists(d1x)); + fs::create_directory(d1x); + BOOST_TEST(fs::exists(d1x)); + BOOST_TEST(fs::is_directory(d1x)); + BOOST_TEST(fs::is_empty(d1x)); + bad_remove_dir = dirx; + BOOST_TEST(CHECK_EXCEPTION(bad_remove, ENOTEMPTY)); + BOOST_TEST(fs::remove(d1x)); + BOOST_TEST(!fs::exists(d1x)); + } + + // remove_symlink_tests ------------------------------------------------------------// + + void remove_symlink_tests() + { + cout << "remove_symlink_tests..." << endl; + + // remove() dangling symbolic link + fs::path link("dangling_link"); + fs::remove(link); // remove any residue from past tests + BOOST_TEST(!fs::is_symlink(link)); + BOOST_TEST(!fs::exists(link)); + fs::create_symlink("nowhere", link); + BOOST_TEST(!fs::exists(link)); + BOOST_TEST(fs::is_symlink(link)); + BOOST_TEST(fs::remove(link)); + BOOST_TEST(!fs::is_symlink(link)); + + // remove() self-refering symbolic link + link = "link_to_self"; + fs::remove(link); // remove any residue from past tests + BOOST_TEST(!fs::is_symlink(link)); + BOOST_TEST(!fs::exists(link)); + fs::create_symlink(link, link); + BOOST_TEST(fs::remove(link)); + BOOST_TEST(!fs::exists(link)); + BOOST_TEST(!fs::is_symlink(link)); + + // remove() cyclic symbolic link + link = "link_to_a"; + fs::path link2("link_to_b"); + fs::remove(link); // remove any residue from past tests + fs::remove(link2); // remove any residue from past tests + BOOST_TEST(!fs::is_symlink(link)); + BOOST_TEST(!fs::exists(link)); + fs::create_symlink(link, link2); + fs::create_symlink(link2, link); + BOOST_TEST(fs::remove(link)); + BOOST_TEST(fs::remove(link2)); + BOOST_TEST(!fs::exists(link)); + BOOST_TEST(!fs::exists(link2)); + BOOST_TEST(!fs::is_symlink(link)); + + // remove() symbolic link to file + fs::path f1x = "link_target"; + fs::remove(f1x); // remove any residue from past tests + BOOST_TEST(!fs::exists(f1x)); + create_file(f1x, ""); + BOOST_TEST(fs::exists(f1x)); + BOOST_TEST(!fs::is_directory(f1x)); + BOOST_TEST(fs::is_regular_file(f1x)); + link = "non_dangling_link"; + fs::create_symlink(f1x, link); + BOOST_TEST(fs::exists(link)); + BOOST_TEST(!fs::is_directory(link)); + BOOST_TEST(fs::is_regular_file(link)); + BOOST_TEST(fs::is_symlink(link)); + BOOST_TEST(fs::remove(link)); + BOOST_TEST(fs::exists(f1x)); + BOOST_TEST(!fs::exists(link)); + BOOST_TEST(!fs::is_symlink(link)); + BOOST_TEST(fs::remove(f1x)); + BOOST_TEST(!fs::exists(f1x)); + } + + // absolute_tests -----------------------------------------------------------------// + + void absolute_tests() + { + cout << "absolute_tests..." << endl; + + BOOST_TEST_EQ(fs::absolute(""), fs::current_path() ); + BOOST_TEST_EQ(fs::absolute("", ""), fs::current_path() ); + BOOST_TEST_EQ(fs::absolute(fs::current_path() / "foo/bar"), fs::current_path() / "foo/bar"); + BOOST_TEST_EQ(fs::absolute("foo"), fs::current_path() / "foo"); + BOOST_TEST_EQ(fs::absolute("foo", fs::current_path()), fs::current_path() / "foo"); + BOOST_TEST_EQ(fs::absolute("bar", "foo"), fs::current_path() / "foo" / "bar"); + BOOST_TEST_EQ(fs::absolute("/foo"), fs::current_path().root_path().string() + "foo"); + +# ifdef BOOST_WINDOWS_API + BOOST_TEST_EQ(fs::absolute("a:foo", "b:/bar"), "a:/bar/foo"); +# endif + + // these tests were moved from elsewhere, so may duplicate some of the above tests + + // p.empty() + BOOST_TEST_EQ(fs::absolute(fs::path(), "//foo/bar"), "//foo/bar"); + if (platform == "Windows") + { + BOOST_TEST_EQ(fs::absolute(fs::path(), "a:/bar"), "a:/bar"); + } + + // p.has_root_name() + // p.has_root_directory() + BOOST_TEST_EQ(fs::absolute(fs::path("//foo/bar"), "//uvw/xyz"), "//foo/bar"); + if (platform == "Windows") + { + BOOST_TEST_EQ(fs::absolute(fs::path("a:/bar"), "b:/xyz"), "a:/bar"); + } + // !p.has_root_directory() + BOOST_TEST_EQ(fs::absolute(fs::path("//net"), "//xyz/"), "//net/"); + BOOST_TEST_EQ(fs::absolute(fs::path("//net"), "//xyz/abc"), "//net/abc"); + BOOST_TEST_EQ(fs::absolute(fs::path("//net"), "//xyz/abc/def"), "//net/abc/def"); + if (platform == "Windows") + { + BOOST_TEST_EQ(fs::absolute(fs::path("a:"), "b:/"), "a:/"); + BOOST_TEST_EQ(fs::absolute(fs::path("a:"),"b:/abc"), "a:/abc"); + BOOST_TEST_EQ(fs::absolute(fs::path("a:"),"b:/abc/def"), "a:/abc/def"); + BOOST_TEST_EQ(fs::absolute(fs::path("a:foo"), "b:/"), "a:/foo"); + BOOST_TEST_EQ(fs::absolute(fs::path("a:foo"), "b:/abc"), "a:/abc/foo"); + BOOST_TEST_EQ(fs::absolute(fs::path("a:foo"), "b:/abc/def"), "a:/abc/def/foo"); + BOOST_TEST_EQ(fs::absolute(fs::path("a:foo/bar"), "b:/"), "a:/foo/bar"); + BOOST_TEST_EQ(fs::absolute(fs::path("a:foo/bar"), "b:/abc"), "a:/abc/foo/bar"); + BOOST_TEST_EQ(fs::absolute(fs::path("a:foo/bar"), "b:/abc/def"), "a:/abc/def/foo/bar"); + } + // !p.has_root_name() + // p.has_root_directory() + BOOST_TEST_EQ(fs::absolute(fs::path("/"), "//xyz/"), "//xyz/"); + BOOST_TEST_EQ(fs::absolute(fs::path("/"), "//xyz/abc"), "//xyz/"); + BOOST_TEST_EQ(fs::absolute(fs::path("/foo"), "//xyz/"), "//xyz/foo"); + BOOST_TEST_EQ(fs::absolute(fs::path("/foo"), "//xyz/abc"), "//xyz/foo"); + // !p.has_root_directory() + BOOST_TEST_EQ(fs::absolute(fs::path("foo"), "//xyz/abc"), "//xyz/abc/foo"); + BOOST_TEST_EQ(fs::absolute(fs::path("foo/bar"), "//xyz/abc"), "//xyz/abc/foo/bar"); + BOOST_TEST_EQ(fs::absolute(fs::path("."), "//xyz/abc"), "//xyz/abc/."); + BOOST_TEST_EQ(fs::absolute(fs::path(".."), "//xyz/abc"), "//xyz/abc/.."); + BOOST_TEST_EQ(fs::absolute(fs::path("./foo"), "//xyz/abc"), "//xyz/abc/./foo"); + BOOST_TEST_EQ(fs::absolute(fs::path("../foo"), "//xyz/abc"), "//xyz/abc/../foo"); + if (platform == "POSIX") + { + BOOST_TEST_EQ(fs::absolute(fs::path("foo"), "/abc"), "/abc/foo"); + BOOST_TEST_EQ(fs::absolute(fs::path("foo/bar"), "/abc"), "/abc/foo/bar"); + BOOST_TEST_EQ(fs::absolute(fs::path("."), "/abc"), "/abc/."); + BOOST_TEST_EQ(fs::absolute(fs::path(".."), "/abc"), "/abc/.."); + BOOST_TEST_EQ(fs::absolute(fs::path("./foo"), "/abc"), "/abc/./foo"); + BOOST_TEST_EQ(fs::absolute(fs::path("../foo"), "/abc"), "/abc/../foo"); + } + + } + + // canonical_basic_tests -----------------------------------------------------------// + + void canonical_basic_tests() + { + cout << "canonical_basic_tests..." << endl; + + // error handling + error_code ec; + ec.clear(); + fs::canonical("no-such-file", ec); + BOOST_TEST(ec); + ec.clear(); + fs::canonical("no-such-file", "x", ec); + BOOST_TEST(ec); + bool ok(false); + try { fs::canonical("no-such-file"); } + catch (const fs::filesystem_error&) { ok = true; } + BOOST_TEST(ok); + + // non-symlink tests; also see canonical_symlink_tests() + BOOST_TEST_EQ(fs::canonical(""), fs::current_path()); + BOOST_TEST_EQ(fs::canonical("", fs::current_path()), fs::current_path()); + BOOST_TEST_EQ(fs::canonical("", ""), fs::current_path()); + BOOST_TEST_EQ(fs::canonical(fs::current_path()), fs::current_path()); + BOOST_TEST_EQ(fs::canonical(fs::current_path(), ""), fs::current_path()); + BOOST_TEST_EQ(fs::canonical(fs::current_path(), "no-such-file"), fs::current_path()); + + BOOST_TEST_EQ(fs::canonical("."), fs::current_path()); + BOOST_TEST_EQ(fs::canonical(".."), fs::current_path().parent_path()); + BOOST_TEST_EQ(fs::canonical("/"), fs::current_path().root_path()); + + fs::path relative_dir(dir.filename()); + BOOST_TEST_EQ(fs::canonical(dir), dir); + BOOST_TEST_EQ(fs::canonical(relative_dir), dir); + BOOST_TEST_EQ(fs::canonical(dir / "f0"), dir / "f0"); + BOOST_TEST_EQ(fs::canonical(relative_dir / "f0"), dir / "f0"); + BOOST_TEST_EQ(fs::canonical(relative_dir / "./f0"), dir / "f0"); + BOOST_TEST_EQ(fs::canonical(relative_dir / "d1/../f0"), dir / "f0"); + + // treat parent of root as itself on both POSIX and Windows + fs::path init(fs::initial_path()); + fs::path root(init.root_path()); + fs::path::const_iterator it(init.begin()); + fs::path first; // relative first non-root directory +# ifdef BOOST_WINDOWS_API + if (!init.empty()) + ++it; +# endif + if (++it != init.end()) + first = *it; + fs::path expected(root/first); + + cout << " init: " << init << endl; + cout << " root: " << root << endl; + cout << " first: " << first << endl; + cout << " expected: " << expected << endl; + + // ticket 10187 tests + BOOST_TEST_EQ(fs::canonical(root / "../.." / first), expected); + BOOST_TEST_EQ(fs::canonical(fs::path("../..") / first, root), expected); + BOOST_TEST_EQ(fs::canonical(fs::path("/../..") / first, fs::current_path().root_name()), expected); + + // ticket 9683 test + BOOST_TEST_EQ(fs::canonical(root / first / "../../../../.."), root); + } + + // canonical_symlink_tests -----------------------------------------------------------// + + void canonical_symlink_tests() + { + cout << "canonical_symlink_tests..." << endl; + + fs::path relative_dir(dir.filename()); + BOOST_TEST_EQ(fs::canonical(dir / "sym-d1/f2"), d1 / "f2"); + BOOST_TEST_EQ(fs::canonical(relative_dir / "sym-d1/f2"), d1 / "f2"); + } + + // copy_file_tests ------------------------------------------------------------------// + + void copy_file_tests(const fs::path& f1x, const fs::path& d1x) + { + cout << "copy_file_tests..." << endl; + + BOOST_TEST(fs::exists(f1x)); + fs::remove(d1x / "f2"); // remove possible residue from prior testing + BOOST_TEST(fs::exists(d1x)); + BOOST_TEST(!fs::exists(d1x / "f2")); + cout << " copy " << f1x << " to " << d1x / "f2" << endl; + fs::copy_file(f1x, d1x / "f2"); + cout << " copy complete" << endl; + BOOST_TEST(fs::exists(f1x)); + BOOST_TEST(fs::exists(d1x / "f2")); + BOOST_TEST(!fs::is_directory(d1x / "f2")); + verify_file(d1x / "f2", "file-f1"); + + bool copy_ex_ok = false; + try { fs::copy_file(f1x, d1x / "f2"); } + catch (const fs::filesystem_error &) { copy_ex_ok = true; } + BOOST_TEST(copy_ex_ok); + + copy_ex_ok = false; + try { fs::copy_file(f1x, d1x / "f2", fs::copy_option::fail_if_exists); } + catch (const fs::filesystem_error &) { copy_ex_ok = true; } + BOOST_TEST(copy_ex_ok); + + create_file(d1x / "f2", "1234567890"); + BOOST_TEST_EQ(fs::file_size(d1x / "f2"), 10U); + copy_ex_ok = true; + try { fs::copy_file(f1x, d1x / "f2", fs::copy_option::overwrite_if_exists); } + catch (const fs::filesystem_error &) { copy_ex_ok = false; } + BOOST_TEST(copy_ex_ok); + BOOST_TEST_EQ(fs::file_size(d1x / "f2"), 7U); + verify_file(d1x / "f2", "file-f1"); + } + + // symlink_status_tests -------------------------------------------------------------// + + void symlink_status_tests() + { + cout << "symlink_status_tests..." << endl; + + boost::system::error_code ec; + + fs::path dangling_sym(dir / "dangling-sym"); + fs::path dangling_directory_sym(dir / "dangling-directory-sym"); + fs::path sym_d1(dir / "sym-d1"); + fs::path symsym_d1(dir / "symsym-d1"); + fs::path sym_f1(dir / "sym-f1"); + fs::path symsym_f1(dir / "symsym-f1"); + fs::create_symlink("does not exist", dangling_sym); + fs::create_directory_symlink("does not exist", dangling_directory_sym); + fs::create_directory_symlink(d1, sym_d1); + fs::create_directory_symlink(sym_d1, symsym_d1); + fs::create_symlink(f1, sym_f1); + fs::create_symlink(sym_f1, symsym_f1); + + // verify all cases detected as symlinks + BOOST_TEST_EQ(fs::symlink_status(dangling_sym, ec).type(), fs::symlink_file); + BOOST_TEST_EQ(fs::symlink_status(dangling_directory_sym, ec).type(), fs::symlink_file); + BOOST_TEST_EQ(fs::symlink_status(sym_d1, ec).type(), fs::symlink_file); + BOOST_TEST_EQ(fs::symlink_status(symsym_d1, ec).type(), fs::symlink_file); + BOOST_TEST_EQ(fs::symlink_status(sym_f1, ec).type(), fs::symlink_file); + BOOST_TEST_EQ(fs::symlink_status(symsym_f1, ec).type(), fs::symlink_file); + + // verify all cases resolve to the (possibly recursive) symlink target + BOOST_TEST_EQ(fs::status(dangling_sym, ec).type(), fs::file_not_found); + BOOST_TEST_EQ(fs::status(dangling_directory_sym, ec).type(), fs::file_not_found); + + BOOST_TEST_EQ(fs::status(sym_d1, ec).type(), fs::directory_file); + BOOST_TEST_EQ(fs::status(sym_d1 / "d1f1", ec).type(), fs::regular_file); + BOOST_TEST_EQ(fs::status(symsym_d1, ec).type(), fs::directory_file); + BOOST_TEST_EQ(fs::status(symsym_d1 / "d1f1", ec).type(), fs::regular_file); + BOOST_TEST_EQ(fs::status(sym_f1, ec).type(), fs::regular_file); + BOOST_TEST_EQ(fs::status(symsym_f1, ec).type(), fs::regular_file); + +#ifdef BOOST_WINDOWS_API + + // On Windows, telling if a filesystem entry is a symlink (or junction which is + // treated as a symlink), rather than some other kind of reparse point, requires some + // baroque code. See ticket #4663, filesystem objects falsely identified as symlinks. + // This test checks two directory entries created by Windows itself to verify + // is_symlink() works correctly. Try "dir /A %HOMEPATH%\.." from the command line to + // verify this test is valid on your version of Windows. It only works on Vista and + // later. + + fs::path users(getenv("HOMEDRIVE")); + BOOST_TEST(!users.empty()); + users /= "\\Users"; + BOOST_TEST(fs::exists(users)); + BOOST_TEST(fs::exists(users/"All Users")); + BOOST_TEST(fs::exists(users/"Default User")); + BOOST_TEST(fs::is_symlink(users/"All Users")); // dir /A reports + BOOST_TEST(fs::is_symlink(users/"Default User")); // dir /A reports + +#endif + } + + // copy_symlink_tests ---------------------------------------------------------------// + + void copy_symlink_tests(const fs::path& f1x, const fs::path& d1x) + { + cout << "copy_symlink_tests..." << endl; + + BOOST_TEST(fs::exists(f1x)); + BOOST_TEST(fs::exists(d1x)); + fs::path sym1(d1x / "symlink1"); + fs::remove(sym1); // remove possible residue from prior testing + fs::create_symlink(f1x, sym1); + BOOST_TEST(fs::exists(sym1)); + BOOST_TEST(fs::is_symlink(sym1)); + fs::path sym2(d1x / "symlink2"); + fs::copy_symlink(sym1, sym2); + BOOST_TEST(fs::exists(sym2)); + BOOST_TEST(fs::is_symlink(sym2)); + //fs::path sym3(d1x / "symlink3"); + //fs::copy(sym1, sym3); + //BOOST_TEST(fs::exists(sym3)); + //BOOST_TEST(fs::is_symlink(sym3)); + + bool copy_ex_ok = false; + try { fs::copy_symlink("no-such-file", "new-symlink1"); } + catch (const fs::filesystem_error &) { copy_ex_ok = true; } + BOOST_TEST(copy_ex_ok); + + copy_ex_ok = false; + try { fs::copy_symlink(f1x, "new-symlink2"); } // should fail; f1x not symlink + catch (const fs::filesystem_error &) { copy_ex_ok = true; } + BOOST_TEST(copy_ex_ok); + } + + // write_time_tests ----------------------------------------------------------------// + + void write_time_tests(const fs::path& dirx) + { + cout << "write_time_tests..." << endl; + + fs::path f1x = dirx / "foobar2"; + create_file(f1x, "foobar2"); + BOOST_TEST(fs::exists(f1x)); + BOOST_TEST(!fs::is_directory(f1x)); + BOOST_TEST(fs::is_regular_file(f1x)); + BOOST_TEST(fs::file_size(f1x) == 7); + verify_file(f1x, "foobar2"); + + // Some file system report last write time as local (FAT), while + // others (NTFS) report it as UTC. The C standard does not specify + // if time_t is local or UTC. + + std::time_t ft = fs::last_write_time(f1x); + cout << "\n UTC last_write_time() for a file just created is " + << std::asctime(std::gmtime(&ft)) << endl; + + std::tm * tmp = std::localtime(&ft); + cout << "\n Year is " << tmp->tm_year << endl; + --tmp->tm_year; + cout << " Change year to " << tmp->tm_year << endl; + fs::last_write_time(f1x, std::mktime(tmp)); + std::time_t ft2 = fs::last_write_time(f1x); + cout << " last_write_time() for the file is now " + << std::asctime(std::gmtime(&ft2)) << endl; + BOOST_TEST(ft != fs::last_write_time(f1x)); + + cout << "\n Reset to current time" << endl; + fs::last_write_time(f1x, ft); + double time_diff = std::difftime(ft, fs::last_write_time(f1x)); + cout + << " original last_write_time() - current last_write_time() is " + << time_diff << " seconds" << endl; + BOOST_TEST(time_diff >= -60.0 && time_diff <= 60.0); + } + + // platform_specific_tests ---------------------------------------------------------// + + void platform_specific_tests() + { + // Windows only tests + if (platform == "Windows") + { + cout << "Windows specific tests..." << endl; + if (!skip_long_windows_tests) + { + cout << " (may take several seconds)"<< endl; + + BOOST_TEST(!fs::exists(fs::path("//share-not"))); + BOOST_TEST(!fs::exists(fs::path("//share-not/"))); + BOOST_TEST(!fs::exists(fs::path("//share-not/foo"))); + } + cout << endl; + + BOOST_TEST(!fs::exists("tools/jam/src/:sys:stat.h")); // !exists() if ERROR_INVALID_NAME + BOOST_TEST(!fs::exists(":sys:stat.h")); // !exists() if ERROR_INVALID_PARAMETER + BOOST_TEST(dir.string().size() > 1 + && dir.string()[1] == ':'); // verify path includes drive + + BOOST_TEST(fs::system_complete("").empty()); + BOOST_TEST(fs::system_complete("/") == fs::initial_path().root_path()); + BOOST_TEST(fs::system_complete("foo") + == fs::initial_path() / "foo"); + + fs::path p1(fs::system_complete("/foo")); + BOOST_TEST_EQ(p1.string().size(), 6U); // this failed during v3 development due to bug + std::string s1(p1.string() ); + std::string s2(fs::initial_path().root_path().string()+"foo"); + BOOST_TEST_EQ(s1, s2); + + BOOST_TEST(fs::system_complete(fs::path(fs::initial_path().root_name())) + == fs::initial_path()); + BOOST_TEST(fs::system_complete(fs::path(fs::initial_path().root_name().string() + + "foo")).string() == fs::initial_path() / "foo"); + BOOST_TEST(fs::system_complete(fs::path("c:/")).generic_string() + == "c:/"); + BOOST_TEST(fs::system_complete(fs::path("c:/foo")).generic_string() + == "c:/foo"); + BOOST_TEST(fs::system_complete(fs::path("//share")).generic_string() + == "//share"); + + // Issue 9016 asked that NTFS directory junctions be recognized as directories. + // That is equivalent to recognizing them as symlinks, and then the normal symlink + // mechanism takes care of recognizing them as directories. + // + // Directory junctions are very similar to symlinks, but have some performance + // and other advantages over symlinks. They can be created from the command line + // with "mklink /j junction-name target-path". + + if (create_symlink_ok) // only if symlinks supported + { + cout << " directory junction tests..." << endl; + BOOST_TEST(fs::exists(dir)); + BOOST_TEST(fs::exists(dir / "d1/d1f1")); + fs::path junc(dir / "junc"); + if (fs::exists(junc)) + fs::remove(junc); + fs::path new_junc(dir / "new-junc"); + if (fs::exists(new_junc)) + fs::remove(new_junc); + + //cout << " dir is " << dir << endl; + //cout << " junc is " << junc << endl; + //cout << " new_junc is " << new_junc << endl; + //cout << " current_path() is " << fs::current_path() << endl; + + fs::path cur_path(fs::current_path()); + fs::current_path(dir); + //cout << " current_path() is " << fs::current_path() << endl; + std::system("mklink /j junc d1"); + //std::system("dir"); + fs::current_path(cur_path); + //cout << " current_path() is " << fs::current_path() << endl; + + BOOST_TEST(fs::exists(junc)); + BOOST_TEST(fs::is_symlink(junc)); + BOOST_TEST(fs::is_directory(junc)); + BOOST_TEST(!fs::is_regular_file(junc)); + BOOST_TEST(fs::exists(junc / "d1f1")); + BOOST_TEST(fs::is_regular_file(junc / "d1f1")); + + int count = 0; + for (fs::directory_iterator itr(junc); + itr != fs::directory_iterator(); ++itr) + { + //cout << itr->path() << endl; + ++count; + } + cout << " iteration count is " << count << endl; + BOOST_TEST(count > 0); + + fs::rename(junc, new_junc); + BOOST_TEST(!fs::exists(junc)); + BOOST_TEST(fs::exists(new_junc)); + BOOST_TEST(fs::is_symlink(new_junc)); + BOOST_TEST(fs::is_directory(new_junc)); + BOOST_TEST(!fs::is_regular_file(new_junc)); + BOOST_TEST(fs::exists(new_junc / "d1f1")); + BOOST_TEST(fs::is_regular_file(new_junc / "d1f1")); + + fs::remove(new_junc); + BOOST_TEST(!fs::exists(new_junc / "d1f1")); + BOOST_TEST(!fs::exists(new_junc)); + BOOST_TEST(fs::exists(dir)); + BOOST_TEST(fs::exists(dir / "d1/d1f1")); + } + + } // Windows + + else if (platform == "POSIX") + { + cout << "POSIX specific tests..." << endl; + BOOST_TEST(fs::system_complete("").empty()); + BOOST_TEST(fs::initial_path().root_path().string() == "/"); + BOOST_TEST(fs::system_complete("/").string() == "/"); + BOOST_TEST(fs::system_complete("foo").string() + == fs::initial_path().string()+"/foo"); + BOOST_TEST(fs::system_complete("/foo").string() + == fs::initial_path().root_path().string()+"foo"); + } // POSIX + } + + // initial_tests -------------------------------------------------------------------// + + void initial_tests() + { + cout << "initial_tests..." << endl; + + cout << " current_path().string() is\n \"" + << fs::initial_path().string() + << "\"\n\n"; + BOOST_TEST(fs::initial_path() == fs::current_path()); + BOOST_TEST(fs::initial_path().is_absolute()); + BOOST_TEST(fs::current_path().is_absolute()); + BOOST_TEST(fs::initial_path().string() + == fs::current_path().string()); + } + + // space_tests ---------------------------------------------------------------------// + + void space_tests() + { + cout << "space_tests..." << endl; + + // make some reasonable assuptions for testing purposes + fs::space_info spi(fs::space(dir)); + BOOST_TEST(spi.capacity > 1000000); + BOOST_TEST(spi.free > 1000); + BOOST_TEST(spi.capacity > spi.free); + BOOST_TEST(spi.free >= spi.available); + + // it is convenient to display space, but older VC++ versions choke +# if !defined(BOOST_MSVC) || _MSC_VER >= 1300 // 1300 == VC++ 7.0 + cout << " capacity = " << spi.capacity << '\n'; + cout << " free = " << spi.free << '\n'; + cout << " available = " << spi.available << '\n'; +# endif + } + + // equivalent_tests ----------------------------------------------------------------// + + void equivalent_tests(const fs::path& f1x) + { + cout << "equivalent_tests..." << endl; + + BOOST_TEST(CHECK_EXCEPTION(bad_equivalent, ENOENT)); + BOOST_TEST(fs::equivalent(f1x, dir / "f1")); + BOOST_TEST(fs::equivalent(dir, d1 / "..")); + BOOST_TEST(!fs::equivalent(f1x, dir)); + BOOST_TEST(!fs::equivalent(dir, f1x)); + BOOST_TEST(!fs::equivalent(d1, d2)); + BOOST_TEST(!fs::equivalent(dir, ng)); + BOOST_TEST(!fs::equivalent(ng, dir)); + BOOST_TEST(!fs::equivalent(f1x, ng)); + BOOST_TEST(!fs::equivalent(ng, f1x)); + } + + // temp_directory_path_tests -------------------------------------------------------// + // contributed by Jeff Flinn + + struct guarded_env_var + { + struct previous_value + { + std::string m_name; + std::string m_string; + bool m_empty; + + previous_value(const char* name) + : m_name(name) + , m_empty (true) + { + if(const char* value = getenv(name)) + { + m_string.assign(value); + m_empty = false; + } + else + { + m_empty = true; + } + } + ~previous_value() + { + m_empty? unsetenv(m_name.c_str()) + : setenv(m_name.c_str(), m_string.c_str(), 1); + } + }; + + previous_value m_previous_value; + + guarded_env_var(const char* name, const fs::path::value_type* value) + : m_previous_value(name) + { + value? setenv(name, value, 1) : unsetenv(name); + } + }; + + void temp_directory_path_tests() + { + { + cout << "temp_directory_path_tests..." << endl; + +#if defined BOOST_WINDOWS_API + + // Test ticket #5300, temp_directory_path failure on Windows with path length > 130. + // (This test failed prior to the fix being applied.) + { + const wchar_t long_name[] = + L"12345678901234567890123456789012345678901234567890" + L"12345678901234567890123456789012345678901234567890" + L"12345678901234567890123456789012345678901234567890#" // total 151 chars + ; + fs::path p (temp_dir); + p /= long_name; + fs::create_directory(p); + + guarded_env_var tmp_guard("TMP", p.wstring().c_str()); + error_code ec; + fs::path tmp_path = fs::temp_directory_path(ec); + cout << "#5300, temp_directory_path() returned " << tmp_path << endl; + BOOST_TEST(!ec); + BOOST_TEST(p == tmp_path); + fs::remove(p); + } + + // Test ticket #10388, null character at end of filesystem::temp_directory_path path + { + guarded_env_var tmp_guard("TMP", fs::initial_path().wstring().c_str()); + + error_code ec; + fs::path tmp_path = fs::temp_directory_path(ec); + cout << "#10388, temp_directory_path() returned " << tmp_path << endl; + BOOST_TEST(tmp_path == fs::initial_path()); + } + +#endif + BOOST_TEST(!fs::temp_directory_path().empty()); + BOOST_TEST(exists(fs::temp_directory_path())); + fs::path ph = fs::temp_directory_path()/"temp_directory_path_test.txt"; + { + if(exists(ph)) remove(ph); + std::ofstream f(ph.BOOST_FILESYSTEM_C_STR); + f << "passed"; + } + BOOST_TEST(exists(ph)); + { + std::ifstream f(ph.BOOST_FILESYSTEM_C_STR); + std::string s; + f >> s; + BOOST_TEST(s == "passed"); + } + remove(ph); + BOOST_TEST(!exists(ph)); + } + + fs::path test_temp_dir = temp_dir; + +#if defined BOOST_POSIX_API + { + struct guarded_tmp_vars + { + guarded_env_var m_tmpdir ; + guarded_env_var m_tmp ; + guarded_env_var m_temp ; + guarded_env_var m_tempdir; + + guarded_tmp_vars + ( const fs::path::value_type* tmpdir + , const fs::path::value_type* tmp + , const fs::path::value_type* temp + , const fs::path::value_type* tempdir + ) + : m_tmpdir ("TMPDIR" , tmpdir ) + , m_tmp ("TMP" , tmp ) + , m_temp ("TEMP" , temp ) + , m_tempdir("TEMPDIR", tempdir) + {} + }; + + { + guarded_tmp_vars vars(test_temp_dir.c_str(), 0, 0, 0); + fs::path ph = fs::temp_directory_path(); + BOOST_TEST(equivalent(test_temp_dir, ph)); + } + { + guarded_tmp_vars vars(0, test_temp_dir.c_str(), 0, 0); + fs::path ph = fs::temp_directory_path(); + BOOST_TEST(equivalent(test_temp_dir, ph)); + } + { + guarded_tmp_vars vars(0, 0, test_temp_dir.c_str(), 0); + fs::path ph = fs::temp_directory_path(); + BOOST_TEST(equivalent(test_temp_dir, ph)); + } + { + guarded_tmp_vars vars(0, 0, 0, test_temp_dir.c_str()); + fs::path ph = fs::temp_directory_path(); + BOOST_TEST(equivalent(test_temp_dir, ph)); + } + } +#endif + +#if defined BOOST_WINDOWS_API + + struct guarded_tmp_vars + { + guarded_env_var m_tmp ; + guarded_env_var m_temp ; + guarded_env_var m_localappdata; + guarded_env_var m_userprofile; + + guarded_tmp_vars + ( const fs::path::value_type* tmp + , const fs::path::value_type* temp + , const fs::path::value_type* localappdata + , const fs::path::value_type* userprofile + ) + : m_tmp ("TMP" , tmp ) + , m_temp ("TEMP" , temp ) + , m_localappdata ("LOCALAPPDATA" , localappdata) + , m_userprofile ("USERPROFILE" , userprofile ) + {} + }; + + // test the GetWindowsDirectoryW()/Temp fallback + { + guarded_tmp_vars vars(0, 0, 0, 0); + error_code ec; + fs::path ph = fs::temp_directory_path(ec); + BOOST_TEST(!ec); + cout << "Fallback test, temp_directory_path() returned " << ph << endl; + } + + { + guarded_tmp_vars vars(test_temp_dir.c_str(), 0, 0, 0); + fs::path ph = fs::temp_directory_path(); + BOOST_TEST(equivalent(test_temp_dir, ph)); + } + { + guarded_tmp_vars vars(0, test_temp_dir.c_str(), 0, 0); + fs::path ph = fs::temp_directory_path(); + BOOST_TEST(equivalent(test_temp_dir, ph)); + } + + fs::create_directory(test_temp_dir / L"Temp"); + { + guarded_tmp_vars vars(0, 0, test_temp_dir.c_str(), 0); + fs::path ph = fs::temp_directory_path(); + BOOST_TEST(equivalent(test_temp_dir/L"Temp", ph)); + cout << "temp_directory_path() returned " << ph << endl; + } + { + guarded_tmp_vars vars(0, 0, 0, test_temp_dir.c_str()); + fs::path ph = fs::temp_directory_path(); + BOOST_TEST(equivalent(test_temp_dir/L"Temp", ph)); + cout << "temp_directory_path() returned " << ph << endl; + } +#endif + } + + // _tests --------------------------------------------------------------------------// + + //void _tests() + //{ + // cout << "_tests..." << endl; + //} + +} // unnamed namespace + + //------------------------------------------------------------------------------------// + // // + // main // + // // + //------------------------------------------------------------------------------------// + +int cpp_main(int argc, char* argv[]) +{ +// document state of critical macros +#ifdef BOOST_POSIX_API + cout << "BOOST_POSIX_API is defined\n"; +#endif +#ifdef BOOST_WINDOWS_API + cout << "BOOST_WINDOWS_API is defined\n"; +#endif + + for (; argc > 1; --argc, ++argv) + { + if (*argv[1]=='-' && *(argv[1]+1)=='t') + report_throws = true; + else if (*argv[1]=='-' && *(argv[1]+1)=='x') + cleanup = false; + else if (*argv[1]=='-' && *(argv[1]+1)=='w') + skip_long_windows_tests = true; + } + + // The choice of platform to test is made at runtime rather than compile-time + // so that compile errors for all platforms will be detected even though + // only the current platform is runtime tested. +# if defined(BOOST_POSIX_API) + platform = "POSIX"; +# elif defined(BOOST_WINDOWS_API) + platform = "Windows"; +# if !defined(__MINGW32__) && !defined(__CYGWIN__) + language_id = ::GetUserDefaultUILanguage(); +# else + language_id = 0x0409; // Assume US English +# endif +# else +# error neither BOOST_POSIX_API nor BOOST_WINDOWS_API is defined. See boost/system/api_config.hpp +# endif + cout << "API is " << platform << endl; + cout << "initial_path() is " << fs::initial_path() << endl; + fs::path ip = fs::initial_path(); + do_the_right_thing_tests(); // compile-only tests, but call anyhow to suppress warnings + + for (fs::path::const_iterator it = ip.begin(); it != ip.end(); ++it) + { + if (it != ip.begin()) + cout << ", "; + cout << *it; + } + cout << endl; + + dir = fs::initial_path() / temp_dir; + + if (fs::exists(dir)) + { + cout << "remove residue from prior failed tests..." << endl; + fs::remove_all(dir); + } + BOOST_TEST(!fs::exists(dir)); + + // several functions give unreasonable results if uintmax_t isn't 64-bits + cout << "sizeof(boost::uintmax_t) = " << sizeof(boost::uintmax_t) << '\n'; + BOOST_TEST(sizeof(boost::uintmax_t) >= 8); + + initial_tests(); + predicate_and_status_tests(); + exception_tests(); + create_directory_tests(); + current_directory_tests(); + space_tests(); + + // create a directory tree that can be used by subsequent tests + // + // dir + // d1 + // d1f1 // an empty file + // f0 // an empty file + // f1 // a file containing "file f1" + // + create_tree(); + + status_of_nonexistent_tests(); + status_error_reporting_tests(); + directory_iterator_tests(); + create_directories_tests(); // must run AFTER directory_iterator_tests + + bad_create_directory_path = f1; + BOOST_TEST(CHECK_EXCEPTION(bad_create_directory, EEXIST)); + fs::file_status stat = fs::status(f1); + BOOST_TEST(fs::status_known(stat)); + BOOST_TEST(fs::exists(stat)); + BOOST_TEST(!fs::is_directory(stat)); + BOOST_TEST(fs::is_regular_file(stat)); + BOOST_TEST(!fs::is_other(stat)); + BOOST_TEST(!fs::is_symlink(stat)); + + equivalent_tests(f1); + create_hard_link_tests(); + create_symlink_tests(); + resize_file_tests(); + absolute_tests(); + canonical_basic_tests(); + permissions_tests(); + copy_file_tests(f1, d1); + if (create_symlink_ok) // only if symlinks supported + { + symlink_status_tests(); + copy_symlink_tests(f1, d1); + canonical_symlink_tests(); + } + iterator_status_tests(); // lots of cases by now, so a good time to test +// dump_tree(dir); + recursive_directory_iterator_tests(); + recursive_iterator_status_tests(); // lots of cases by now, so a good time to test + rename_tests(); + remove_tests(dir); + if (create_symlink_ok) // only if symlinks supported + remove_symlink_tests(); + write_time_tests(dir); + temp_directory_path_tests(); + + platform_specific_tests(); // do these last since they take a lot of time on Windows, + // and that's a pain during manual testing + + cout << "testing complete" << endl; + + // post-test cleanup + if (cleanup) + { + cout << "post-test removal of " << dir << endl; + BOOST_TEST(fs::remove_all(dir) != 0); + // above was added just to simplify testing, but it ended up detecting + // a bug (failure to close an internal search handle). + cout << "post-test removal complete" << endl; +// BOOST_TEST(!fs::exists(dir)); // nice test, but doesn't play well with TortoiseGit cache + } + + cout << "returning from main()" << endl; + return ::boost::report_errors(); +} // main diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/operations_unit_test.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/operations_unit_test.cpp new file mode 100644 index 0000000000..ce4e7f6086 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/operations_unit_test.cpp @@ -0,0 +1,352 @@ +// operations_unit_test.cpp ----------------------------------------------------------// + +// Copyright Beman Dawes 2008, 2009 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +// ------------------------------------------------------------------------------------// + +// This program is misnamed - it is really a smoke test rather than a unit_test + +// ------------------------------------------------------------------------------------// + + +#include + +// See deprecated_test for tests of deprecated features +#ifndef BOOST_FILESYSTEM_NO_DEPRECATED +# define BOOST_FILESYSTEM_NO_DEPRECATED +#endif +#ifndef BOOST_SYSTEM_NO_DEPRECATED +# define BOOST_SYSTEM_NO_DEPRECATED +#endif + +#include // make sure filesystem.hpp works + +#include +# if defined( BOOST_NO_STD_WSTRING ) +# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support +# endif + +#include +#include +#include +#include + +using namespace boost::filesystem; +using namespace boost::system; +using std::cout; +using std::endl; +using std::string; + +#define CHECK(x) check(x, __FILE__, __LINE__) + +namespace +{ + + void check(bool ok, const char* file, int line) + { + if (ok) return; + + ++::boost::detail::test_errors(); + + cout << file << '(' << line << "): test failed\n"; + } + + // file_status_test ----------------------------------------------------------------// + + void file_status_test() + { + cout << "file_status test..." << endl; + + file_status s = status("."); + int v = s.permissions(); + cout << " status(\".\") permissions are " + << std::oct << (v & 0777) << std::dec << endl; + CHECK((v & 0400) == 0400); + + s = symlink_status("."); + v = s.permissions(); + cout << " symlink_status(\".\") permissions are " + << std::oct << (v & 0777) << std::dec << endl; + CHECK((v & 0400) == 0400); + } + + // query_test ----------------------------------------------------------------------// + + void query_test() + { + cout << "query test..." << endl; + + error_code ec; + + CHECK(file_size("no-such-file", ec) == static_cast(-1)); + CHECK(ec == errc::no_such_file_or_directory); + + CHECK(status("no-such-file") == file_status(file_not_found, no_perms)); + + CHECK(exists("/")); + CHECK(is_directory("/")); + CHECK(!exists("no-such-file")); + + exists("/", ec); + if (ec) + { + cout << "exists(\"/\", ec) resulted in non-zero ec.value()" << endl; + cout << "ec value: " << ec.value() << ", message: "<< ec.message() << endl; + } + CHECK(!ec); + + CHECK(exists("/")); + CHECK(is_directory("/")); + CHECK(!is_regular_file("/")); + CHECK(!boost::filesystem::is_empty("/")); + CHECK(!is_other("/")); + } + + // directory_iterator_test -----------------------------------------------// + + void directory_iterator_test() + { + cout << "directory_iterator_test..." << endl; + + directory_iterator end; + + directory_iterator it("."); + + CHECK(!it->path().empty()); + + if (is_regular_file(it->status())) + { + CHECK(is_regular_file(it->symlink_status())); + CHECK(!is_directory(it->status())); + CHECK(!is_symlink(it->status())); + CHECK(!is_directory(it->symlink_status())); + CHECK(!is_symlink(it->symlink_status())); + } + else + { + CHECK(is_directory(it->status())); + CHECK(is_directory(it->symlink_status())); + CHECK(!is_regular_file(it->status())); + CHECK(!is_regular_file(it->symlink_status())); + CHECK(!is_symlink(it->status())); + CHECK(!is_symlink(it->symlink_status())); + } + + for (; it != end; ++it) + { + //cout << " " << it->path() << "\n"; + } + + CHECK(directory_iterator(".") != directory_iterator()); + CHECK(directory_iterator() == end); + +#ifndef BOOST_NO_CXX11_RANGE_BASED_FOR + for (directory_entry& x : directory_iterator(".")) + { + CHECK(!x.path().empty()); + //cout << " " << x.path() << "\n"; + } + const directory_iterator dir_itr("."); + for (directory_entry& x : dir_itr) + { + CHECK(!x.path().empty()); + //cout << " " << x.path() << "\n"; + } +#endif + + for (directory_iterator itr("."); itr != directory_iterator(); ++itr) + { + CHECK(!itr->path().empty()); + //cout << " " << itr->path() << "\n"; + } + + cout << "directory_iterator_test complete" << endl; + } + + // recursive_directory_iterator_test -----------------------------------------------// + + void recursive_directory_iterator_test() + { + cout << "recursive_directory_iterator_test..." << endl; + + recursive_directory_iterator end; + + recursive_directory_iterator it(".."); + + CHECK(!it->path().empty()); + + if (is_regular_file(it->status())) + { + CHECK(is_regular_file(it->symlink_status())); + CHECK(!is_directory(it->status())); + CHECK(!is_symlink(it->status())); + CHECK(!is_directory(it->symlink_status())); + CHECK(!is_symlink(it->symlink_status())); + } + else + { + CHECK(is_directory(it->status())); + CHECK(is_directory(it->symlink_status())); + CHECK(!is_regular_file(it->status())); + CHECK(!is_regular_file(it->symlink_status())); + CHECK(!is_symlink(it->status())); + CHECK(!is_symlink(it->symlink_status())); + } + + for (; it != end; ++it) + { + //cout << " " << it->path() << "\n"; + } + + CHECK(recursive_directory_iterator("..") != recursive_directory_iterator()); + CHECK(recursive_directory_iterator() == end); + +#ifndef BOOST_NO_CXX11_RANGE_BASED_FOR + for (directory_entry& x : recursive_directory_iterator("..")) + { + CHECK(!x.path().empty()); + //cout << " " << x.path() << "\n"; + } + const recursive_directory_iterator dir_itr(".."); + for (directory_entry& x : dir_itr) + { + CHECK(!x.path().empty()); + //cout << " " << x.path() << "\n"; + } +#endif + + for (recursive_directory_iterator itr(".."); + itr != recursive_directory_iterator(); ++itr) + { + CHECK(!itr->path().empty()); + //cout << " " << itr->path() << "\n"; + } + + cout << "recursive_directory_iterator_test complete" << endl; + } + + // operations_test -------------------------------------------------------// + + void operations_test() + { + cout << "operations test..." << endl; + + error_code ec; + + CHECK(!create_directory("/", ec)); + + CHECK(!boost::filesystem::remove("no-such-file-or-directory")); + CHECK(!remove_all("no-such-file-or-directory")); + + space_info info = space("/"); + + CHECK(info.available <= info.capacity); + + CHECK(equivalent("/", "/")); + CHECK(!equivalent("/", ".")); + + std::time_t ft = last_write_time("."); + ft = -1; + last_write_time(".", ft, ec); + } + + // directory_entry_test ------------------------------------------------------------// + + void directory_entry_test() + { + cout << "directory_entry test..." << endl; + + directory_entry de("foo.bar", + file_status(regular_file, owner_all), file_status(directory_file, group_all)); + + CHECK(de.path() == "foo.bar"); + CHECK(de.status() == file_status(regular_file, owner_all)); + CHECK(de.symlink_status() == file_status(directory_file, group_all)); + CHECK(de < directory_entry("goo.bar")); + CHECK(de == directory_entry("foo.bar")); + CHECK(de != directory_entry("goo.bar")); + de.replace_filename("bar.foo"); + CHECK(de.path() == "bar.foo"); + } + + // directory_entry_overload_test ---------------------------------------------------// + + void directory_entry_overload_test() + { + cout << "directory_entry overload test..." << endl; + + directory_iterator it("."); + path p(*it); + } + + // error_handling_test -------------------------------------------------------------// + + void error_handling_test() + { + cout << "error handling test..." << endl; + + bool threw(false); + try + { + file_size("no-such-file"); + } + catch (const boost::filesystem::filesystem_error & ex) + { + threw = true; + cout << "\nas expected, attempt to get size of non-existent file threw a filesystem_error\n" + "what() returns " << ex.what() << "\n"; + } + catch (...) + { + cout << "\nunexpected exception type caught" << endl; + } + + CHECK(threw); + + error_code ec; + CHECK(!create_directory("/", ec)); + } + +} // unnamed namespace + +//--------------------------------------------------------------------------------------// +// // +// main // +// // +//--------------------------------------------------------------------------------------// + +int cpp_main(int, char*[]) +{ +// document state of critical macros +#ifdef BOOST_POSIX_API + cout << "BOOST_POSIX_API is defined\n"; +#endif +#ifdef BOOST_WINDOWS_API + cout << "BOOST_WINDOWS_API is defined\n"; +#endif + cout << "BOOST_FILESYSTEM_DECL" << BOOST_STRINGIZE(=BOOST_FILESYSTEM_DECL) << "\n"; + cout << "BOOST_SYMBOL_VISIBLE" << BOOST_STRINGIZE(=BOOST_SYMBOL_VISIBLE) << "\n"; + + cout << "current_path() is " << current_path().string() << endl; + + file_status_test(); + query_test(); + directory_iterator_test(); + recursive_directory_iterator_test(); + operations_test(); + directory_entry_test(); + directory_entry_overload_test(); + error_handling_test(); + + cout << unique_path() << endl; + cout << unique_path("foo-%%%%%-%%%%%-bar") << endl; + cout << unique_path("foo-%%%%%-%%%%%-%%%%%-%%%%%-%%%%%-%%%%%-%%%%%-%%%%-bar") << endl; + cout << unique_path("foo-%%%%%-%%%%%-%%%%%-%%%%%-%%%%%-%%%%%-%%%%%-%%%%%-bar") << endl; + + return ::boost::report_errors(); +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/path_test.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/path_test.cpp new file mode 100644 index 0000000000..071423048a --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/path_test.cpp @@ -0,0 +1,1875 @@ +// path_test program -----------------------------------------------------------------// + +// Copyright Beman Dawes 2002, 2008 +// Copyright Vladimir Prus 2002 + +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/filesystem + +// basic_path's stem(), extension(), and replace_extension() tests are based +// on basename(), extension(), and change_extension() tests from the original +// convenience_test.cpp by Vladimir Prus. + +//--------------------------------------------------------------------------------------// +// // +// Caution // +// // +// The class path relational operators (==, !=, <, etc.) on Windows treat slash and // +// backslash as equal. Thus any tests on Windows where the difference between slash // +// and backslash is significant should compare strings rather than paths. // +// // +// BOOST_TEST(path == path) // '\\' and '/' are equal // +// BOOST_TEST(path == convertable to string) // '\\' and '/' are equal // +// PATH_TEST_EQ(path, path) // '\\' and '/' are equal // +// // +// BOOST_TEST(path.string() == path.string()) // '\\' and '/' are not equal // +// BOOST_TEST(path.string() == // +// convertable to string) // '\\' and '/' are not equal // +// PATH_TEST_EQ(path.string(), // +// convertable to string) // '\\' and '/' are not equal // +// // +// The last of these is often what is needed, so the PATH_TEST_EQ macro is provided. // +// It converts its first argument to a path, and then performs a .string() on it, // +// eliminating much boilerplate .string() or even path(...).string() code. // +// // +// PATH_TEST_EQ(path, convertable to string) // '\\' and '/' are not equal // +// // +//--------------------------------------------------------------------------------------// + +#include + +// See deprecated_test for tests of deprecated features +#ifndef BOOST_FILESYSTEM_NO_DEPRECATED +# define BOOST_FILESYSTEM_NO_DEPRECATED +#endif +#ifndef BOOST_SYSTEM_NO_DEPRECATED +# define BOOST_SYSTEM_NO_DEPRECATED +#endif + +#include + +#include +# if defined( BOOST_NO_STD_WSTRING ) +# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support +# endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace fs = boost::filesystem; +using boost::filesystem::path; +using boost::next; +using boost::prior; + +#ifdef BOOST_WINDOWS_API +# define BOOST_DIR_SEP "\\" +#else +# define BOOST_DIR_SEP "/" +#endif + +#define PATH_TEST_EQ(a, b) check(a, b, __FILE__, __LINE__) + +namespace +{ + std::string platform(BOOST_PLATFORM); + + void check(const fs::path & source, + const std::string & expected, const char* file, int line) + { + if (source.string() == expected) + return; + + std::cout << file + << '(' << line << "): source: \"" << source.string() + << "\" != expected: \"" << expected + << "\"" << std::endl; + + ++::boost::detail::test_errors(); + } + + path p1("fe/fi/fo/fum"); + path p2(p1); + path p3; + path p4("foobar"); + path p5; + + // exception_tests -----------------------------------------------------------------// + + void exception_tests() + { + std::cout << "exception_tests..." << std::endl; + const std::string str_1("string-1"); + boost::system::error_code ec(12345, boost::system::system_category()); + try { throw fs::filesystem_error(str_1, ec); } + catch (const fs::filesystem_error & ex) + { + //std::cout << ex.what() << "*" << std::endl; + //BOOST_TEST(std::strcmp(ex.what(), + // "string-1: Unknown error") == 0); + BOOST_TEST(ex.code() == ec); + } + + try { throw fs::filesystem_error(str_1, "p1", "p2", ec); } + catch (const fs::filesystem_error & ex) + { + //std::cout << ex.what() << "*" << std::endl; + //BOOST_TEST(std::strcmp(ex.what(), + // "string-1: Unknown error: \"p1\", \"p2\"") == 0); + BOOST_TEST(ex.code() == ec); + BOOST_TEST(ex.path1() == "p1"); + BOOST_TEST(ex.path2() == "p2"); + } + } + + // overload_tests ------------------------------------------------------------------// + + // These verify various overloads don't cause compiler errors + // They pre-date operations_unit_test.cpp + + void overload_tests() + { + std::cout << "overload_tests..." << std::endl; + + fs::exists(p1); + fs::exists("foo"); + fs::exists(std::string("foo")); + + fs::exists(p1 / path("foo")); + fs::exists(p1 / "foo"); + fs::exists(p1 / std::string("foo")); + + fs::exists("foo" / p1); + fs::exists(std::string("foo") / p1); + + p4 /= path("foo"); + p4 /= "foo"; + p4 /= std::string("foo"); + } + + // iterator_tests ------------------------------------------------------------------// + + void iterator_tests() + { + std::cout << "iterator_tests..." << std::endl; + + path itr_ck = ""; + path::const_iterator itr = itr_ck.begin(); + BOOST_TEST(itr == itr_ck.end()); + + itr_ck = "/"; + itr = itr_ck.begin(); + BOOST_TEST(itr->string() == "/"); + BOOST_TEST(++itr == itr_ck.end()); + BOOST_TEST((--itr)->string() == "/"); + + itr_ck = "foo"; + BOOST_TEST(*itr_ck.begin() == std::string("foo")); + BOOST_TEST(boost::next(itr_ck.begin()) == itr_ck.end()); + BOOST_TEST(*boost::prior(itr_ck.end()) == std::string("foo")); + BOOST_TEST(boost::prior(itr_ck.end()) == itr_ck.begin()); + + itr_ck = path("/foo"); + BOOST_TEST((itr_ck.begin())->string() == "/"); + BOOST_TEST(*boost::next(itr_ck.begin()) == std::string("foo")); + BOOST_TEST(boost::next(boost::next(itr_ck.begin())) == itr_ck.end()); + BOOST_TEST(boost::next(itr_ck.begin()) == boost::prior(itr_ck.end())); + BOOST_TEST(*boost::prior(itr_ck.end()) == std::string("foo")); + BOOST_TEST(*boost::prior(boost::prior(itr_ck.end())) == std::string("/")); + BOOST_TEST(boost::prior(boost::prior(itr_ck.end())) == itr_ck.begin()); + + itr_ck = "/foo/bar"; + itr = itr_ck.begin(); + BOOST_TEST(itr->string() == "/"); + BOOST_TEST(*++itr == std::string("foo")); + BOOST_TEST(*++itr == std::string("bar")); + BOOST_TEST(++itr == itr_ck.end()); + PATH_TEST_EQ(*--itr, "bar"); + PATH_TEST_EQ(*--itr, "foo"); + PATH_TEST_EQ(*--itr, "/"); + + itr_ck = "../f"; // previously failed due to short name bug + itr = itr_ck.begin(); + PATH_TEST_EQ(itr->string(), ".."); + PATH_TEST_EQ(*++itr, "f"); + BOOST_TEST(++itr == itr_ck.end()); + PATH_TEST_EQ(*--itr, "f"); + PATH_TEST_EQ(*--itr, ".."); + + // POSIX says treat "/foo/bar/" as "/foo/bar/." + itr_ck = "/foo/bar/"; + itr = itr_ck.begin(); + PATH_TEST_EQ(itr->string(), "/"); + PATH_TEST_EQ(*++itr, "foo"); + BOOST_TEST(itr != itr_ck.end()); + PATH_TEST_EQ(*++itr, "bar"); + BOOST_TEST(itr != itr_ck.end()); + PATH_TEST_EQ(*++itr, "."); + BOOST_TEST(itr != itr_ck.end()); // verify the . isn't also seen as end() + BOOST_TEST(++itr == itr_ck.end()); + PATH_TEST_EQ(*--itr, "."); + PATH_TEST_EQ(*--itr, "bar"); + PATH_TEST_EQ(*--itr, "foo"); + PATH_TEST_EQ(*--itr, "/"); + + // POSIX says treat "/f/b/" as "/f/b/." + itr_ck = "/f/b/"; + itr = itr_ck.begin(); + PATH_TEST_EQ(itr->string(), "/"); + PATH_TEST_EQ(*++itr, "f"); + PATH_TEST_EQ(*++itr, "b"); + PATH_TEST_EQ(*++itr, "."); + BOOST_TEST(itr != itr_ck.end()); // verify the . isn't also seen as end() + BOOST_TEST(++itr == itr_ck.end()); + PATH_TEST_EQ(*--itr, "."); + PATH_TEST_EQ(*--itr, "b"); + PATH_TEST_EQ(*--itr, "f"); + PATH_TEST_EQ(*--itr, "/"); + + // POSIX says treat "a/b/" as "a/b/." + // Although similar to the prior test case, this failed the ". isn't end" test due to + // a bug while the prior case did not fail. + itr_ck = "a/b/"; + itr = itr_ck.begin(); + PATH_TEST_EQ(*itr, "a"); + PATH_TEST_EQ(*++itr, "b"); + PATH_TEST_EQ(*++itr, "."); + BOOST_TEST(itr != itr_ck.end()); // verify the . isn't also seen as end() + BOOST_TEST(++itr == itr_ck.end()); + PATH_TEST_EQ(*--itr, "."); + PATH_TEST_EQ(*--itr, "b"); + PATH_TEST_EQ(*--itr, "a"); + + itr_ck = "//net"; + itr = itr_ck.begin(); + // two leading slashes are permitted by POSIX (as implementation defined), + // while for Windows it is always well defined (as a network name) + PATH_TEST_EQ(itr->string(), "//net"); + BOOST_TEST(++itr == itr_ck.end()); + PATH_TEST_EQ(*--itr, "//net"); + + itr_ck = "//net/"; + itr = itr_ck.begin(); + PATH_TEST_EQ(itr->string(), "//net"); + PATH_TEST_EQ(*++itr, "/"); + BOOST_TEST(++itr == itr_ck.end()); + PATH_TEST_EQ(*--itr, "/"); + PATH_TEST_EQ(*--itr, "//net"); + + itr_ck = "//foo///bar///"; + itr = itr_ck.begin(); + PATH_TEST_EQ(itr->string(), "//foo"); + PATH_TEST_EQ(*++itr, "/"); + PATH_TEST_EQ(*++itr, "bar"); + PATH_TEST_EQ(*++itr, "."); + BOOST_TEST(++itr == itr_ck.end()); + PATH_TEST_EQ(*--itr, "."); + PATH_TEST_EQ(*--itr, "bar"); + PATH_TEST_EQ(*--itr, "/"); + PATH_TEST_EQ(*--itr, "//foo"); + + itr_ck = "///foo///bar///"; + itr = itr_ck.begin(); + // three or more leading slashes are to be treated as a single slash + PATH_TEST_EQ(itr->string(), "/"); + PATH_TEST_EQ(*++itr, "foo"); + PATH_TEST_EQ(*++itr, "bar"); + PATH_TEST_EQ(*++itr, "."); + BOOST_TEST(++itr == itr_ck.end()); + PATH_TEST_EQ(*--itr, "."); + PATH_TEST_EQ(*--itr, "bar"); + PATH_TEST_EQ(*--itr, "foo"); + PATH_TEST_EQ(*--itr, "/"); + + if (platform == "Windows") + { + itr_ck = "c:/"; + itr = itr_ck.begin(); + PATH_TEST_EQ(itr->string(), "c:"); + PATH_TEST_EQ(*++itr, std::string("/")); + BOOST_TEST(++itr == itr_ck.end()); + PATH_TEST_EQ(*--itr, "/"); + PATH_TEST_EQ(*--itr, "c:"); + + itr_ck = "c:\\"; + itr = itr_ck.begin(); + PATH_TEST_EQ(itr->string(), "c:"); + PATH_TEST_EQ(*++itr, "/"); // test that iteration returns generic format + BOOST_TEST(++itr == itr_ck.end()); + PATH_TEST_EQ(*--itr, "/"); // test that iteration returns generic format + PATH_TEST_EQ(*--itr, "c:"); + + itr_ck = "c:/foo"; + itr = itr_ck.begin(); + BOOST_TEST(*itr == std::string("c:")); + BOOST_TEST(*++itr == std::string("/")); + BOOST_TEST(*++itr == std::string("foo")); + BOOST_TEST(++itr == itr_ck.end()); + BOOST_TEST(*--itr == std::string("foo")); + BOOST_TEST((--itr)->string() == "/"); + BOOST_TEST(*--itr == std::string("c:")); + + itr_ck = "c:\\foo"; + itr = itr_ck.begin(); + BOOST_TEST(*itr == std::string("c:")); + BOOST_TEST(*++itr == std::string("\\")); + BOOST_TEST(*++itr == std::string("foo")); + BOOST_TEST(++itr == itr_ck.end()); + BOOST_TEST(*--itr == std::string("foo")); + BOOST_TEST(*--itr == std::string("\\")); + BOOST_TEST(*--itr == std::string("c:")); + + itr_ck = "\\\\\\foo\\\\\\bar\\\\\\"; + itr = itr_ck.begin(); + // three or more leading slashes are to be treated as a single slash + PATH_TEST_EQ(itr->string(), "/"); + PATH_TEST_EQ(*++itr, "foo"); + PATH_TEST_EQ(*++itr, "bar"); + PATH_TEST_EQ(*++itr, "."); + BOOST_TEST(++itr == itr_ck.end()); + PATH_TEST_EQ(*--itr, "."); + PATH_TEST_EQ(*--itr, "bar"); + PATH_TEST_EQ(*--itr, "foo"); + PATH_TEST_EQ(*--itr, "/"); + + itr_ck = "c:foo"; + itr = itr_ck.begin(); + BOOST_TEST(*itr == std::string("c:")); + BOOST_TEST(*++itr == std::string("foo")); + BOOST_TEST(++itr == itr_ck.end()); + BOOST_TEST(*--itr == std::string("foo")); + BOOST_TEST(*--itr == std::string("c:")); + + itr_ck = "c:foo/"; + itr = itr_ck.begin(); + BOOST_TEST(*itr == std::string("c:")); + BOOST_TEST(*++itr == std::string("foo")); + BOOST_TEST(*++itr == std::string(".")); + BOOST_TEST(++itr == itr_ck.end()); + BOOST_TEST(*--itr == std::string(".")); + BOOST_TEST(*--itr == std::string("foo")); + BOOST_TEST(*--itr == std::string("c:")); + + itr_ck = path("c:"); + BOOST_TEST(*itr_ck.begin() == std::string("c:")); + BOOST_TEST(next(itr_ck.begin()) == itr_ck.end()); + BOOST_TEST(prior(itr_ck.end()) == itr_ck.begin()); + BOOST_TEST(*prior(itr_ck.end()) == std::string("c:")); + + itr_ck = path("c:/"); + BOOST_TEST(*itr_ck.begin() == std::string("c:")); + BOOST_TEST(*next(itr_ck.begin()) == std::string("/")); + BOOST_TEST(next(next(itr_ck.begin())) == itr_ck.end()); + BOOST_TEST(prior(prior(itr_ck.end())) == itr_ck.begin()); + BOOST_TEST(*prior(itr_ck.end()) == std::string("/")); + BOOST_TEST(*prior(prior(itr_ck.end())) == std::string("c:")); + + itr_ck = path("c:foo"); + BOOST_TEST(*itr_ck.begin() == std::string("c:")); + BOOST_TEST(*next(itr_ck.begin()) == std::string("foo")); + BOOST_TEST(next(next(itr_ck.begin())) == itr_ck.end()); + BOOST_TEST(prior(prior(itr_ck.end())) == itr_ck.begin()); + BOOST_TEST(*prior(itr_ck.end()) == std::string("foo")); + BOOST_TEST(*prior(prior(itr_ck.end())) == std::string("c:")); + + itr_ck = path("c:/foo"); + BOOST_TEST(*itr_ck.begin() == std::string("c:")); + BOOST_TEST(*next(itr_ck.begin()) == std::string("/")); + BOOST_TEST(*next(next(itr_ck.begin())) == std::string("foo")); + BOOST_TEST(next(next(next(itr_ck.begin()))) == itr_ck.end()); + BOOST_TEST(prior(prior(prior(itr_ck.end()))) == itr_ck.begin()); + BOOST_TEST(*prior(itr_ck.end()) == std::string("foo")); + BOOST_TEST(*prior(prior(itr_ck.end())) == std::string("/")); + BOOST_TEST(*prior(prior(prior(itr_ck.end()))) == std::string("c:")); + + itr_ck = path("//net"); + BOOST_TEST(*itr_ck.begin() == std::string("//net")); + BOOST_TEST(next(itr_ck.begin()) == itr_ck.end()); + BOOST_TEST(prior(itr_ck.end()) == itr_ck.begin()); + BOOST_TEST(*prior(itr_ck.end()) == std::string("//net")); + + itr_ck = path("//net/"); + PATH_TEST_EQ(itr_ck.begin()->string(), "//net"); + PATH_TEST_EQ(next(itr_ck.begin())->string(), "/"); + BOOST_TEST(next(next(itr_ck.begin())) == itr_ck.end()); + BOOST_TEST(prior(prior(itr_ck.end())) == itr_ck.begin()); + PATH_TEST_EQ(prior(itr_ck.end())->string(), "/"); + PATH_TEST_EQ(prior(prior(itr_ck.end()))->string(), "//net"); + + itr_ck = path("//net/foo"); + BOOST_TEST(*itr_ck.begin() == std::string("//net")); + BOOST_TEST(*next(itr_ck.begin()) == std::string("/")); + BOOST_TEST(*next(next(itr_ck.begin())) == std::string("foo")); + BOOST_TEST(next(next(next(itr_ck.begin()))) == itr_ck.end()); + BOOST_TEST(prior(prior(prior(itr_ck.end()))) == itr_ck.begin()); + BOOST_TEST(*prior(itr_ck.end()) == std::string("foo")); + BOOST_TEST(*prior(prior(itr_ck.end())) == std::string("/")); + BOOST_TEST(*prior(prior(prior(itr_ck.end()))) == std::string("//net")); + + itr_ck = path("prn:"); + BOOST_TEST(*itr_ck.begin() == std::string("prn:")); + BOOST_TEST(next(itr_ck.begin()) == itr_ck.end()); + BOOST_TEST(prior(itr_ck.end()) == itr_ck.begin()); + BOOST_TEST(*prior(itr_ck.end()) == std::string("prn:")); + } + else + { + itr_ck = "///"; + itr = itr_ck.begin(); + PATH_TEST_EQ(itr->string(), "/"); + BOOST_TEST(++itr == itr_ck.end()); + } + } + + // non_member_tests ----------------------------------------------------------------// + + void non_member_tests() + { + std::cout << "non_member_tests..." << std::endl; + + // test non-member functions, particularly operator overloads + + path e, e2; + std::string es, es2; + char ecs[] = ""; + char ecs2[] = ""; + + char acs[] = "a"; + std::string as(acs); + path a(as); + + char acs2[] = "a"; + std::string as2(acs2); + path a2(as2); + + char bcs[] = "b"; + std::string bs(bcs); + path b(bs); + + // swap + a.swap(b); + BOOST_TEST(a.string() == "b"); + BOOST_TEST(b.string() == "a"); + fs::swap(a, b); + BOOST_TEST(a.string() == "a"); + BOOST_TEST(b.string() == "b"); + + // probe operator / + PATH_TEST_EQ(path("") / ".", "."); + PATH_TEST_EQ(path("") / "..", ".."); + if (platform == "Windows") + { + BOOST_TEST(path("foo\\bar") == "foo/bar"); + BOOST_TEST((b / a).native() == path("b\\a").native()); + BOOST_TEST((bs / a).native() == path("b\\a").native()); + BOOST_TEST((bcs / a).native() == path("b\\a").native()); + BOOST_TEST((b / as).native() == path("b\\a").native()); + BOOST_TEST((b / acs).native() == path("b\\a").native()); + PATH_TEST_EQ(path("a") / "b", "a\\b"); + PATH_TEST_EQ(path("..") / "", ".."); + PATH_TEST_EQ(path("foo") / path("bar"), "foo\\bar"); // path arg + PATH_TEST_EQ(path("foo") / "bar", "foo\\bar"); // const char* arg + PATH_TEST_EQ(path("foo") / path("woo/bar").filename(), "foo\\bar"); // const std::string & arg + PATH_TEST_EQ("foo" / path("bar"), "foo\\bar"); + PATH_TEST_EQ(path("..") / ".." , "..\\.."); + PATH_TEST_EQ(path("/") / ".." , "/.."); + PATH_TEST_EQ(path("/..") / ".." , "/..\\.."); + PATH_TEST_EQ(path("..") / "foo" , "..\\foo"); + PATH_TEST_EQ(path("foo") / ".." , "foo\\.."); + PATH_TEST_EQ(path("..") / "f" , "..\\f"); + PATH_TEST_EQ(path("/..") / "f" , "/..\\f"); + PATH_TEST_EQ(path("f") / ".." , "f\\.."); + PATH_TEST_EQ(path("foo") / ".." / ".." , "foo\\..\\.."); + PATH_TEST_EQ(path("foo") / ".." / ".." / ".." , "foo\\..\\..\\.."); + PATH_TEST_EQ(path("f") / ".." / "b" , "f\\..\\b"); + PATH_TEST_EQ(path("foo") / ".." / "bar" , "foo\\..\\bar"); + PATH_TEST_EQ(path("foo") / "bar" / ".." , "foo\\bar\\.."); + PATH_TEST_EQ(path("foo") / "bar" / ".." / "..", "foo\\bar\\..\\.."); + PATH_TEST_EQ(path("foo") / "bar" / ".." / "blah", "foo\\bar\\..\\blah"); + PATH_TEST_EQ(path("f") / "b" / ".." , "f\\b\\.."); + PATH_TEST_EQ(path("f") / "b" / ".." / "a", "f\\b\\..\\a"); + PATH_TEST_EQ(path("foo") / "bar" / "blah" / ".." / "..", "foo\\bar\\blah\\..\\.."); + PATH_TEST_EQ(path("foo") / "bar" / "blah" / ".." / ".." / "bletch", "foo\\bar\\blah\\..\\..\\bletch"); + + PATH_TEST_EQ(path(".") / "foo", ".\\foo"); + PATH_TEST_EQ(path(".") / "..", ".\\.."); + PATH_TEST_EQ(path("foo") / ".", "foo\\."); + PATH_TEST_EQ(path("..") / ".", "..\\."); + PATH_TEST_EQ(path(".") / ".", ".\\."); + PATH_TEST_EQ(path(".") / "." / ".", ".\\.\\."); + PATH_TEST_EQ(path(".") / "foo" / ".", ".\\foo\\."); + PATH_TEST_EQ(path("foo") / "." / "bar", "foo\\.\\bar"); + PATH_TEST_EQ(path("foo") / "." / ".", "foo\\.\\."); + PATH_TEST_EQ(path("foo") / "." / "..", "foo\\.\\.."); + PATH_TEST_EQ(path(".") / "." / "..", ".\\.\\.."); + PATH_TEST_EQ(path(".") / ".." / ".", ".\\..\\."); + PATH_TEST_EQ(path("..") / "." / ".", "..\\.\\."); + } + else // POSIX + { + PATH_TEST_EQ(b / a, "b/a"); + PATH_TEST_EQ(bs / a, "b/a"); + PATH_TEST_EQ(bcs / a, "b/a"); + PATH_TEST_EQ(b / as, "b/a"); + PATH_TEST_EQ(b / acs, "b/a"); + PATH_TEST_EQ(path("a") / "b", "a/b"); + PATH_TEST_EQ(path("..") / "", ".."); + PATH_TEST_EQ(path("") / "..", ".."); + PATH_TEST_EQ(path("foo") / path("bar"), "foo/bar"); // path arg + PATH_TEST_EQ(path("foo") / "bar", "foo/bar"); // const char* arg + PATH_TEST_EQ(path("foo") / path("woo/bar").filename(), "foo/bar"); // const std::string & arg + PATH_TEST_EQ("foo" / path("bar"), "foo/bar"); + PATH_TEST_EQ(path("..") / ".." , "../.."); + PATH_TEST_EQ(path("/") / ".." , "/.."); + PATH_TEST_EQ(path("/..") / ".." , "/../.."); + PATH_TEST_EQ(path("..") / "foo" , "../foo"); + PATH_TEST_EQ(path("foo") / ".." , "foo/.."); + PATH_TEST_EQ(path("..") / "f" , "../f"); + PATH_TEST_EQ(path("/..") / "f" , "/../f"); + PATH_TEST_EQ(path("f") / ".." , "f/.."); + PATH_TEST_EQ(path("foo") / ".." / ".." , "foo/../.."); + PATH_TEST_EQ(path("foo") / ".." / ".." / ".." , "foo/../../.."); + PATH_TEST_EQ(path("f") / ".." / "b" , "f/../b"); + PATH_TEST_EQ(path("foo") / ".." / "bar" , "foo/../bar"); + PATH_TEST_EQ(path("foo") / "bar" / ".." , "foo/bar/.."); + PATH_TEST_EQ(path("foo") / "bar" / ".." / "..", "foo/bar/../.."); + PATH_TEST_EQ(path("foo") / "bar" / ".." / "blah", "foo/bar/../blah"); + PATH_TEST_EQ(path("f") / "b" / ".." , "f/b/.."); + PATH_TEST_EQ(path("f") / "b" / ".." / "a", "f/b/../a"); + PATH_TEST_EQ(path("foo") / "bar" / "blah" / ".." / "..", "foo/bar/blah/../.."); + PATH_TEST_EQ(path("foo") / "bar" / "blah" / ".." / ".." / "bletch", "foo/bar/blah/../../bletch"); + + PATH_TEST_EQ(path(".") / "foo", "./foo"); + PATH_TEST_EQ(path(".") / "..", "./.."); + PATH_TEST_EQ(path("foo") / ".", "foo/."); + PATH_TEST_EQ(path("..") / ".", "../."); + PATH_TEST_EQ(path(".") / ".", "./."); + PATH_TEST_EQ(path(".") / "." / ".", "././."); + PATH_TEST_EQ(path(".") / "foo" / ".", "./foo/."); + PATH_TEST_EQ(path("foo") / "." / "bar", "foo/./bar"); + PATH_TEST_EQ(path("foo") / "." / ".", "foo/./."); + PATH_TEST_EQ(path("foo") / "." / "..", "foo/./.."); + PATH_TEST_EQ(path(".") / "." / "..", "././.."); + PATH_TEST_EQ(path(".") / ".." / ".", "./../."); + PATH_TEST_EQ(path("..") / "." / ".", ".././."); + } + + // probe operator < + BOOST_TEST(!(e < e2)); + BOOST_TEST(!(es < e2)); + BOOST_TEST(!(ecs < e2)); + BOOST_TEST(!(e < es2)); + BOOST_TEST(!(e < ecs2)); + + BOOST_TEST(e < a); + BOOST_TEST(es < a); + BOOST_TEST(ecs < a); + BOOST_TEST(e < as); + BOOST_TEST(e < acs); + + BOOST_TEST(a < b); + BOOST_TEST(as < b); + BOOST_TEST(acs < b); + BOOST_TEST(a < bs); + BOOST_TEST(a < bcs); + + BOOST_TEST(!(a < a2)); + BOOST_TEST(!(as < a2)); + BOOST_TEST(!(acs < a2)); + BOOST_TEST(!(a < as2)); + BOOST_TEST(!(a < acs2)); + + // make sure basic_path overloads don't conflict with std::string overloads + + BOOST_TEST(!(as < as)); + BOOST_TEST(!(as < acs)); + BOOST_TEST(!(acs < as)); + + // character set reality check before lexicographical tests + BOOST_TEST(std::string("a.b") < std::string("a/b")); + // verify compare is actually lexicographical + BOOST_TEST(path("a/b") < path("a.b")); + BOOST_TEST(path("a/b") == path("a///b")); + BOOST_TEST(path("a/b/") == path("a/b/.")); + BOOST_TEST(path("a/b") != path("a/b/")); + + // make sure the derivative operators also work + + BOOST_TEST(b > a); + BOOST_TEST(b > as); + BOOST_TEST(b > acs); + BOOST_TEST(bs > a); + BOOST_TEST(bcs > a); + + BOOST_TEST(!(a2 > a)); + BOOST_TEST(!(a2 > as)); + BOOST_TEST(!(a2 > acs)); + BOOST_TEST(!(as2 > a)); + BOOST_TEST(!(acs2 > a)); + + BOOST_TEST(a <= b); + BOOST_TEST(as <= b); + BOOST_TEST(acs <= b); + BOOST_TEST(a <= bs); + BOOST_TEST(a <= bcs); + + BOOST_TEST(a <= a2); + BOOST_TEST(as <= a2); + BOOST_TEST(acs <= a2); + BOOST_TEST(a <= as2); + BOOST_TEST(a <= acs2); + + BOOST_TEST(b >= a); + BOOST_TEST(bs >= a); + BOOST_TEST(bcs >= a); + BOOST_TEST(b >= as); + BOOST_TEST(b >= acs); + + BOOST_TEST(a2 >= a); + BOOST_TEST(as2 >= a); + BOOST_TEST(acs2 >= a); + BOOST_TEST(a2 >= as); + BOOST_TEST(a2 >= acs); + + // operator == and != are implemented separately, so test separately + + path p101("fe/fi/fo/fum"); + path p102(p101); + path p103("fe/fi/fo/fumm"); + BOOST_TEST(p101.string() != p103.string()); + + // check each overload + BOOST_TEST(p101 != p103); + BOOST_TEST(p101 != p103.string()); + BOOST_TEST(p101 != p103.string().c_str()); + BOOST_TEST(p101.string() != p103); + BOOST_TEST(p101.string().c_str() != p103); + + p103 = p102; + BOOST_TEST(p101.string() == p103.string()); + + // check each overload + BOOST_TEST(p101 == p103); + BOOST_TEST(p101 == p103.string()); + BOOST_TEST(p101 == p103.string().c_str()); + BOOST_TEST(p101.string() == p103); + BOOST_TEST(p101.string().c_str() == p103); + + if (platform == "Windows") + { + std::cout << "Windows relational tests..." << std::endl; + path p10 ("c:\\file"); + path p11 ("c:/file"); + // check each overload + BOOST_TEST(p10.generic_string() == p11.generic_string()); + BOOST_TEST(p10 == p11); + BOOST_TEST(p10 == p11.string()); + BOOST_TEST(p10 == p11.string().c_str()); + BOOST_TEST(p10.string() == p11); + BOOST_TEST(p10.string().c_str() == p11); + BOOST_TEST(p10 == L"c:\\file"); + BOOST_TEST(p10 == L"c:/file"); + BOOST_TEST(p11 == L"c:\\file"); + BOOST_TEST(p11 == L"c:/file"); + BOOST_TEST(L"c:\\file" == p10); + BOOST_TEST(L"c:/file" == p10); + BOOST_TEST(L"c:\\file" == p11); + BOOST_TEST(L"c:/file" == p11); + + BOOST_TEST(!(p10.generic_string() != p11.generic_string())); + BOOST_TEST(!(p10 != p11)); + BOOST_TEST(!(p10 != p11.string())); + BOOST_TEST(!(p10 != p11.string().c_str())); + BOOST_TEST(!(p10.string() != p11)); + BOOST_TEST(!(p10.string().c_str() != p11)); + BOOST_TEST(!(p10 != L"c:\\file")); + BOOST_TEST(!(p10 != L"c:/file")); + BOOST_TEST(!(p11 != L"c:\\file")); + BOOST_TEST(!(p11 != L"c:/file")); + BOOST_TEST(!(L"c:\\file" != p10)); + BOOST_TEST(!(L"c:/file" != p10)); + BOOST_TEST(!(L"c:\\file" != p11)); + BOOST_TEST(!(L"c:/file" != p11)); + + BOOST_TEST(!(p10.string() < p11.string())); + BOOST_TEST(!(p10 < p11)); + BOOST_TEST(!(p10 < p11.string())); + BOOST_TEST(!(p10 < p11.string().c_str())); + BOOST_TEST(!(p10.string() < p11)); + BOOST_TEST(!(p10.string().c_str() < p11)); + BOOST_TEST(!(p10 < L"c:\\file")); + BOOST_TEST(!(p10 < L"c:/file")); + BOOST_TEST(!(p11 < L"c:\\file")); + BOOST_TEST(!(p11 < L"c:/file")); + BOOST_TEST(!(L"c:\\file" < p10)); + BOOST_TEST(!(L"c:/file" < p10)); + BOOST_TEST(!(L"c:\\file" < p11)); + BOOST_TEST(!(L"c:/file" < p11)); + + BOOST_TEST(!(p10.generic_string() > p11.generic_string())); + BOOST_TEST(!(p10 > p11)); + BOOST_TEST(!(p10 > p11.string())); + BOOST_TEST(!(p10 > p11.string().c_str())); + BOOST_TEST(!(p10.string() > p11)); + BOOST_TEST(!(p10.string().c_str() > p11)); + BOOST_TEST(!(p10 > L"c:\\file")); + BOOST_TEST(!(p10 > L"c:/file")); + BOOST_TEST(!(p11 > L"c:\\file")); + BOOST_TEST(!(p11 > L"c:/file")); + BOOST_TEST(!(L"c:\\file" > p10)); + BOOST_TEST(!(L"c:/file" > p10)); + BOOST_TEST(!(L"c:\\file" > p11)); + BOOST_TEST(!(L"c:/file" > p11)); + } + } + + // query_and_decomposition_tests ---------------------------------------------------// + // + // remove_filename() is also tested here, because its specification depends on + // a decomposition function. + + void query_and_decomposition_tests() + { + std::cout << "query_and_decomposition_tests..." << std::endl; + + // stem() tests not otherwise covered + BOOST_TEST(path("b").stem() == "b"); + BOOST_TEST(path("a/b.txt").stem() == "b"); + BOOST_TEST(path("a/b.").stem() == "b"); + BOOST_TEST(path("a.b.c").stem() == "a.b"); + BOOST_TEST(path("a.b.c.").stem() == "a.b.c"); + + // extension() tests not otherwise covered + BOOST_TEST(path("a/b").extension() == ""); + BOOST_TEST(path("a.b/c").extension() == ""); + BOOST_TEST(path("a/b.txt").extension() == ".txt"); + BOOST_TEST(path("a/b.").extension() == "."); + BOOST_TEST(path("a.b.c").extension() == ".c"); + BOOST_TEST(path("a.b.c.").extension() == "."); + BOOST_TEST(path("a/").extension() == ""); + + // main q & d test sequence + path p; + path q; + + p = q = ""; + BOOST_TEST(p.relative_path().string() == ""); + BOOST_TEST(p.parent_path().string() == ""); + PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + BOOST_TEST(p.filename() == ""); + BOOST_TEST(p.stem() == ""); + BOOST_TEST(p.extension() == ""); + BOOST_TEST(p.root_name() == ""); + BOOST_TEST(p.root_directory() == ""); + BOOST_TEST(p.root_path().string() == ""); + BOOST_TEST(!p.has_root_path()); + BOOST_TEST(!p.has_root_name()); + BOOST_TEST(!p.has_root_directory()); + BOOST_TEST(!p.has_relative_path()); + BOOST_TEST(!p.has_filename()); + BOOST_TEST(!p.has_stem()); + BOOST_TEST(!p.has_extension()); + BOOST_TEST(!p.has_parent_path()); + BOOST_TEST(!p.is_absolute()); + + p = q = "/"; + BOOST_TEST(p.relative_path().string() == ""); + BOOST_TEST(p.parent_path().string() == ""); + PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + BOOST_TEST(p.filename() == "/"); + BOOST_TEST(p.stem() == "/"); + BOOST_TEST(p.extension() == ""); + BOOST_TEST(p.root_name() == ""); + BOOST_TEST(p.root_directory() == "/"); + BOOST_TEST(p.root_path().string() == "/"); + BOOST_TEST(p.has_root_path()); + BOOST_TEST(!p.has_root_name()); + BOOST_TEST(p.has_root_directory()); + BOOST_TEST(!p.has_relative_path()); + BOOST_TEST(p.has_filename()); + BOOST_TEST(p.has_stem()); + BOOST_TEST(!p.has_extension()); + BOOST_TEST(!p.has_parent_path()); + if (platform == "POSIX") + BOOST_TEST(p.is_absolute()); + else + BOOST_TEST(!p.is_absolute()); + + p = q = "//"; + PATH_TEST_EQ(p.relative_path().string(), ""); + PATH_TEST_EQ(p.parent_path().string(), ""); + PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + PATH_TEST_EQ(p.filename(), "//"); + PATH_TEST_EQ(p.stem(), "//"); + PATH_TEST_EQ(p.extension(), ""); + PATH_TEST_EQ(p.root_name(), "//"); + PATH_TEST_EQ(p.root_directory(), ""); + PATH_TEST_EQ(p.root_path().string(), "//"); + BOOST_TEST(p.has_root_path()); + BOOST_TEST(p.has_root_name()); + BOOST_TEST(!p.has_root_directory()); + BOOST_TEST(!p.has_relative_path()); + BOOST_TEST(p.has_filename()); + BOOST_TEST(p.has_stem()); + BOOST_TEST(!p.has_extension()); + BOOST_TEST(!p.has_parent_path()); + BOOST_TEST(!p.is_absolute()); + + p = q = "///"; + PATH_TEST_EQ(p.relative_path().string(), ""); + PATH_TEST_EQ(p.parent_path().string(), ""); + PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + PATH_TEST_EQ(p.filename(), "/"); + PATH_TEST_EQ(p.stem(), "/"); + PATH_TEST_EQ(p.extension(), ""); + PATH_TEST_EQ(p.root_name(), ""); + PATH_TEST_EQ(p.root_directory(), "/"); + PATH_TEST_EQ(p.root_path().string(), "/"); + BOOST_TEST(p.has_root_path()); + BOOST_TEST(!p.has_root_name()); + BOOST_TEST(p.has_root_directory()); + BOOST_TEST(!p.has_relative_path()); + BOOST_TEST(p.has_filename()); + BOOST_TEST(p.has_stem()); + BOOST_TEST(!p.has_extension()); + BOOST_TEST(!p.has_parent_path()); + if (platform == "POSIX") + BOOST_TEST(p.is_absolute()); + else + BOOST_TEST(!p.is_absolute()); + + p = q = "."; + BOOST_TEST(p.relative_path().string() == "."); + BOOST_TEST(p.parent_path().string() == ""); + PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + BOOST_TEST(p.filename() == "."); + BOOST_TEST(p.stem() == "."); + BOOST_TEST(p.extension() == ""); + BOOST_TEST(p.root_name() == ""); + BOOST_TEST(p.root_directory() == ""); + BOOST_TEST(p.root_path().string() == ""); + BOOST_TEST(!p.has_root_path()); + BOOST_TEST(!p.has_root_name()); + BOOST_TEST(!p.has_root_directory()); + BOOST_TEST(p.has_relative_path()); + BOOST_TEST(p.has_filename()); + BOOST_TEST(p.has_stem()); + BOOST_TEST(!p.has_extension()); + BOOST_TEST(!p.has_parent_path()); + BOOST_TEST(!p.is_absolute()); + + p = q = ".."; + BOOST_TEST(p.relative_path().string() == ".."); + BOOST_TEST(p.parent_path().string() == ""); + PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + BOOST_TEST(p.filename() == ".."); + BOOST_TEST(p.stem() == ".."); + BOOST_TEST(p.extension() == ""); + BOOST_TEST(p.root_name() == ""); + BOOST_TEST(p.root_directory() == ""); + BOOST_TEST(p.root_path().string() == ""); + BOOST_TEST(!p.has_root_path()); + BOOST_TEST(!p.has_root_name()); + BOOST_TEST(!p.has_root_directory()); + BOOST_TEST(p.has_relative_path()); + BOOST_TEST(p.has_filename()); + BOOST_TEST(p.has_stem()); + BOOST_TEST(!p.has_extension()); + BOOST_TEST(!p.has_parent_path()); + BOOST_TEST(!p.is_absolute()); + + p = q = "foo"; + BOOST_TEST(p.relative_path().string() == "foo"); + BOOST_TEST(p.parent_path().string() == ""); + PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + BOOST_TEST(p.filename() == "foo"); + BOOST_TEST(p.stem() == "foo"); + BOOST_TEST(p.extension() == ""); + BOOST_TEST(p.root_name() == ""); + BOOST_TEST(p.root_directory() == ""); + BOOST_TEST(p.root_path().string() == ""); + BOOST_TEST(!p.has_root_path()); + BOOST_TEST(!p.has_root_name()); + BOOST_TEST(!p.has_root_directory()); + BOOST_TEST(p.has_relative_path()); + BOOST_TEST(p.has_filename()); + BOOST_TEST(p.has_stem()); + BOOST_TEST(!p.has_extension()); + BOOST_TEST(!p.has_parent_path()); + BOOST_TEST(!p.is_absolute()); + + p = q = "/foo"; + PATH_TEST_EQ(p.relative_path().string(), "foo"); + PATH_TEST_EQ(p.parent_path().string(), "/"); + PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + PATH_TEST_EQ(p.filename(), "foo"); + PATH_TEST_EQ(p.stem(), "foo"); + PATH_TEST_EQ(p.extension(), ""); + PATH_TEST_EQ(p.root_name(), ""); + PATH_TEST_EQ(p.root_directory(), "/"); + PATH_TEST_EQ(p.root_path().string(), "/"); + BOOST_TEST(p.has_root_path()); + BOOST_TEST(!p.has_root_name()); + BOOST_TEST(p.has_root_directory()); + BOOST_TEST(p.has_relative_path()); + BOOST_TEST(p.has_filename()); + BOOST_TEST(p.has_stem()); + BOOST_TEST(!p.has_extension()); + BOOST_TEST(p.has_parent_path()); + if (platform == "POSIX") + BOOST_TEST(p.is_absolute()); + else + BOOST_TEST(!p.is_absolute()); + + p = q = "/foo/"; + PATH_TEST_EQ(p.relative_path().string(), "foo/"); + PATH_TEST_EQ(p.parent_path().string(), "/foo"); + PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + PATH_TEST_EQ(p.filename(), "."); + PATH_TEST_EQ(p.stem(), "."); + PATH_TEST_EQ(p.extension(), ""); + PATH_TEST_EQ(p.root_name(), ""); + PATH_TEST_EQ(p.root_directory(), "/"); + PATH_TEST_EQ(p.root_path().string(), "/"); + BOOST_TEST(p.has_root_path()); + BOOST_TEST(!p.has_root_name()); + BOOST_TEST(p.has_root_directory()); + BOOST_TEST(p.has_relative_path()); + BOOST_TEST(p.has_filename()); + BOOST_TEST(p.has_stem()); + BOOST_TEST(!p.has_extension()); + BOOST_TEST(p.has_parent_path()); + if (platform == "POSIX") + BOOST_TEST(p.is_absolute()); + else + BOOST_TEST(!p.is_absolute()); + + p = q = "///foo"; + PATH_TEST_EQ(p.relative_path().string(), "foo"); + PATH_TEST_EQ(p.parent_path().string(), "/"); + PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + PATH_TEST_EQ(p.filename(), "foo"); + PATH_TEST_EQ(p.root_name(), ""); + PATH_TEST_EQ(p.root_directory(), "/"); + PATH_TEST_EQ(p.root_path().string(), "/"); + BOOST_TEST(p.has_root_path()); + BOOST_TEST(!p.has_root_name()); + BOOST_TEST(p.has_root_directory()); + BOOST_TEST(p.has_relative_path()); + BOOST_TEST(p.has_filename()); + BOOST_TEST(p.has_parent_path()); + if (platform == "POSIX") + BOOST_TEST(p.is_absolute()); + else + BOOST_TEST(!p.is_absolute()); + + p = q = "foo/bar"; + BOOST_TEST(p.relative_path().string() == "foo/bar"); + BOOST_TEST(p.parent_path().string() == "foo"); + PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + BOOST_TEST(p.filename() == "bar"); + BOOST_TEST(p.stem() == "bar"); + BOOST_TEST(p.extension() == ""); + BOOST_TEST(p.root_name() == ""); + BOOST_TEST(p.root_directory() == ""); + BOOST_TEST(p.root_path().string() == ""); + BOOST_TEST(!p.has_root_path()); + BOOST_TEST(!p.has_root_name()); + BOOST_TEST(!p.has_root_directory()); + BOOST_TEST(p.has_relative_path()); + BOOST_TEST(p.has_filename()); + BOOST_TEST(p.has_stem()); + BOOST_TEST(!p.has_extension()); + BOOST_TEST(p.has_parent_path()); + BOOST_TEST(!p.is_absolute()); + + p = q = "../foo"; + BOOST_TEST(p.relative_path().string() == "../foo"); + BOOST_TEST(p.parent_path().string() == ".."); + PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + BOOST_TEST(p.filename() == "foo"); + BOOST_TEST(p.root_name() == ""); + BOOST_TEST(p.root_directory() == ""); + BOOST_TEST(p.root_path().string() == ""); + BOOST_TEST(!p.has_root_path()); + BOOST_TEST(!p.has_root_name()); + BOOST_TEST(!p.has_root_directory()); + BOOST_TEST(p.has_relative_path()); + BOOST_TEST(p.has_filename()); + BOOST_TEST(p.has_parent_path()); + BOOST_TEST(!p.is_absolute()); + + p = q = "..///foo"; + PATH_TEST_EQ(p.relative_path().string(), "..///foo"); + PATH_TEST_EQ(p.parent_path().string(), ".."); + PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + PATH_TEST_EQ(p.filename(), "foo"); + PATH_TEST_EQ(p.root_name(), ""); + PATH_TEST_EQ(p.root_directory(), ""); + PATH_TEST_EQ(p.root_path().string(), ""); + BOOST_TEST(!p.has_root_path()); + BOOST_TEST(!p.has_root_name()); + BOOST_TEST(!p.has_root_directory()); + BOOST_TEST(p.has_relative_path()); + BOOST_TEST(p.has_filename()); + BOOST_TEST(p.has_parent_path()); + BOOST_TEST(!p.is_absolute()); + + p = q = "/foo/bar"; + BOOST_TEST(p.relative_path().string() == "foo/bar"); + BOOST_TEST(p.parent_path().string() == "/foo"); + PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + BOOST_TEST(p.filename() == "bar"); + BOOST_TEST(p.root_name() == ""); + BOOST_TEST(p.root_directory() == "/"); + BOOST_TEST(p.root_path().string() == "/"); + BOOST_TEST(p.has_root_path()); + BOOST_TEST(!p.has_root_name()); + BOOST_TEST(p.has_root_directory()); + BOOST_TEST(p.has_relative_path()); + BOOST_TEST(p.has_filename()); + BOOST_TEST(p.has_parent_path()); + if (platform == "POSIX") + BOOST_TEST(p.is_absolute()); + else + BOOST_TEST(!p.is_absolute()); + + // Both POSIX and Windows allow two leading slashs + // (POSIX meaning is implementation defined) + PATH_TEST_EQ(path("//resource"), "//resource"); + PATH_TEST_EQ(path("//resource/"), "//resource/"); + PATH_TEST_EQ(path("//resource/foo"), "//resource/foo"); + + p = q = path("//net"); + PATH_TEST_EQ(p.string(), "//net"); + PATH_TEST_EQ(p.relative_path().string(), ""); + PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + PATH_TEST_EQ(p.parent_path().string(), ""); + PATH_TEST_EQ(p.filename(), "//net"); + PATH_TEST_EQ(p.root_name(), "//net"); + PATH_TEST_EQ(p.root_directory(), ""); + PATH_TEST_EQ(p.root_path().string(), "//net"); + BOOST_TEST(p.has_root_path()); + BOOST_TEST(p.has_root_name()); + BOOST_TEST(!p.has_root_directory()); + BOOST_TEST(!p.has_relative_path()); + BOOST_TEST(p.has_filename()); + BOOST_TEST(!p.has_parent_path()); + BOOST_TEST(!p.is_absolute()); + + p = q = path("//net/"); + BOOST_TEST(p.relative_path().string() == ""); + BOOST_TEST(p.parent_path().string() == "//net"); + PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + BOOST_TEST(p.filename() == "/"); + BOOST_TEST(p.root_name() == "//net"); + BOOST_TEST(p.root_directory() == "/"); + BOOST_TEST(p.root_path().string() == "//net/"); + BOOST_TEST(p.has_root_path()); + BOOST_TEST(p.has_root_name()); + BOOST_TEST(p.has_root_directory()); + BOOST_TEST(!p.has_relative_path()); + BOOST_TEST(p.has_filename()); + BOOST_TEST(p.has_parent_path()); + BOOST_TEST(p.is_absolute()); + + p = q = path("//net/foo"); + BOOST_TEST(p.relative_path().string() == "foo"); + BOOST_TEST(p.parent_path().string() == "//net/"); + PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + BOOST_TEST(p.filename() == "foo"); + BOOST_TEST(p.root_name() == "//net"); + BOOST_TEST(p.root_directory() == "/"); + BOOST_TEST(p.root_path().string() == "//net/"); + BOOST_TEST(p.has_root_path()); + BOOST_TEST(p.has_root_name()); + BOOST_TEST(p.has_root_directory()); + BOOST_TEST(p.has_relative_path()); + BOOST_TEST(p.has_filename()); + BOOST_TEST(p.has_parent_path()); + BOOST_TEST(p.is_absolute()); + + p = q = path("//net///foo"); + PATH_TEST_EQ(p.relative_path().string(), "foo"); + PATH_TEST_EQ(p.parent_path().string(), "//net/"); + PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + PATH_TEST_EQ(p.filename(), "foo"); + PATH_TEST_EQ(p.root_name(), "//net"); + PATH_TEST_EQ(p.root_directory(), "/"); + PATH_TEST_EQ(p.root_path().string(), "//net/"); + BOOST_TEST(p.has_root_path()); + BOOST_TEST(p.has_root_name()); + BOOST_TEST(p.has_root_directory()); + BOOST_TEST(p.has_relative_path()); + BOOST_TEST(p.has_filename()); + BOOST_TEST(p.has_parent_path()); + BOOST_TEST(p.is_absolute()); + + // ticket 2739, infinite recursion leading to stack overflow, was caused + // by failure to handle this case correctly on Windows. + p = path(":"); + PATH_TEST_EQ(p.parent_path().string(), ""); + PATH_TEST_EQ(p.filename(), ":"); + BOOST_TEST(!p.has_parent_path()); + BOOST_TEST(p.has_filename()); + + // test some similar cases that both POSIX and Windows should handle identically + p = path("c:"); + PATH_TEST_EQ(p.parent_path().string(), ""); + PATH_TEST_EQ(p.filename(), "c:"); + BOOST_TEST(!p.has_parent_path()); + BOOST_TEST(p.has_filename()); + p = path("cc:"); + PATH_TEST_EQ(p.parent_path().string(), ""); + PATH_TEST_EQ(p.filename(), "cc:"); + BOOST_TEST(!p.has_parent_path()); + BOOST_TEST(p.has_filename()); + + // Windows specific tests + if (platform == "Windows") + { + + //p = q = L"\\\\?\\"; + //BOOST_TEST(p.relative_path().string() == ""); + //BOOST_TEST(p.parent_path().string() == ""); + //PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + //BOOST_TEST(p.filename() == ""); + //BOOST_TEST(p.stem() == ""); + //BOOST_TEST(p.extension() == ""); + //BOOST_TEST(p.root_name() == ""); + //BOOST_TEST(p.root_directory() == ""); + //BOOST_TEST(p.root_path().string() == ""); + //BOOST_TEST(!p.has_root_path()); + //BOOST_TEST(!p.has_root_name()); + //BOOST_TEST(!p.has_root_directory()); + //BOOST_TEST(!p.has_relative_path()); + //BOOST_TEST(!p.has_filename()); + //BOOST_TEST(!p.has_stem()); + //BOOST_TEST(!p.has_extension()); + //BOOST_TEST(!p.has_parent_path()); + //BOOST_TEST(!p.is_absolute()); + + p = q = path("c:"); + BOOST_TEST(p.relative_path().string() == ""); + BOOST_TEST(p.parent_path().string() == ""); + PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + BOOST_TEST(p.filename() == "c:"); + BOOST_TEST(p.root_name() == "c:"); + BOOST_TEST(p.root_directory() == ""); + BOOST_TEST(p.root_path().string() == "c:"); + BOOST_TEST(p.has_root_path()); + BOOST_TEST(p.has_root_name()); + BOOST_TEST(!p.has_root_directory()); + BOOST_TEST(!p.has_relative_path()); + BOOST_TEST(p.has_filename()); + BOOST_TEST(!p.has_parent_path()); + BOOST_TEST(!p.is_absolute()); + + //p = q = path(L"\\\\?\\c:"); + //BOOST_TEST(p.relative_path().string() == ""); + //BOOST_TEST(p.parent_path().string() == ""); + //PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + //BOOST_TEST(p.filename() == "c:"); + //BOOST_TEST(p.root_name() == "c:"); + //BOOST_TEST(p.root_directory() == ""); + //BOOST_TEST(p.root_path().string() == "c:"); + //BOOST_TEST(p.has_root_path()); + //BOOST_TEST(p.has_root_name()); + //BOOST_TEST(!p.has_root_directory()); + //BOOST_TEST(!p.has_relative_path()); + //BOOST_TEST(p.has_filename()); + //BOOST_TEST(!p.has_parent_path()); + //BOOST_TEST(!p.is_absolute()); + + p = q = path("c:foo"); + BOOST_TEST(p.relative_path().string() == "foo"); + BOOST_TEST(p.parent_path().string() == "c:"); + PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + BOOST_TEST(p.filename() == "foo"); + BOOST_TEST(p.root_name() == "c:"); + BOOST_TEST(p.root_directory() == ""); + BOOST_TEST(p.root_path().string() == "c:"); + BOOST_TEST(p.has_root_path()); + BOOST_TEST(p.has_root_name()); + BOOST_TEST(!p.has_root_directory()); + BOOST_TEST(p.has_relative_path()); + BOOST_TEST(p.has_filename()); + BOOST_TEST(p.has_parent_path()); + BOOST_TEST(!p.is_absolute()); + + //p = q = path(L"\\\\?\\c:foo"); + //BOOST_TEST(p.relative_path().string() == "foo"); + //BOOST_TEST(p.parent_path().string() == "c:"); + //PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + //BOOST_TEST(p.filename() == "foo"); + //BOOST_TEST(p.root_name() == "c:"); + //BOOST_TEST(p.root_directory() == ""); + //BOOST_TEST(p.root_path().string() == "c:"); + //BOOST_TEST(p.has_root_path()); + //BOOST_TEST(p.has_root_name()); + //BOOST_TEST(!p.has_root_directory()); + //BOOST_TEST(p.has_relative_path()); + //BOOST_TEST(p.has_filename()); + //BOOST_TEST(p.has_parent_path()); + //BOOST_TEST(!p.is_absolute()); + + p = q = path("c:/"); + BOOST_TEST(p.relative_path().string() == ""); + BOOST_TEST(p.parent_path().string() == "c:"); + PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + BOOST_TEST(p.filename() == "/"); + BOOST_TEST(p.root_name() == "c:"); + BOOST_TEST(p.root_directory() == "/"); + BOOST_TEST(p.root_path().string() == "c:/"); + BOOST_TEST(p.has_root_path()); + BOOST_TEST(p.has_root_name()); + BOOST_TEST(p.has_root_directory()); + BOOST_TEST(!p.has_relative_path()); + BOOST_TEST(p.has_filename()); + BOOST_TEST(p.has_parent_path()); + BOOST_TEST(p.is_absolute()); + + p = q = path("c:.."); + BOOST_TEST(p.relative_path().string() == ".."); + BOOST_TEST(p.parent_path().string() == "c:"); + PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + BOOST_TEST(p.filename() == ".."); + BOOST_TEST(p.root_name() == "c:"); + BOOST_TEST(p.root_directory() == ""); + BOOST_TEST(p.root_path().string() == "c:"); + BOOST_TEST(p.has_root_path()); + BOOST_TEST(p.has_root_name()); + BOOST_TEST(!p.has_root_directory()); + BOOST_TEST(p.has_relative_path()); + BOOST_TEST(p.has_filename()); + BOOST_TEST(p.has_parent_path()); + BOOST_TEST(!p.is_absolute()); + + p = q = path("c:/foo"); + PATH_TEST_EQ(p.relative_path().string(), "foo"); + PATH_TEST_EQ(p.parent_path().string(), "c:/"); + PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + PATH_TEST_EQ(p.filename(), "foo"); + PATH_TEST_EQ(p.root_name(), "c:"); + PATH_TEST_EQ(p.root_directory(), "/"); + PATH_TEST_EQ(p.root_path().string(), "c:/"); + BOOST_TEST(p.has_root_path()); + BOOST_TEST(p.has_root_name()); + BOOST_TEST(p.has_root_directory()); + BOOST_TEST(p.has_relative_path()); + BOOST_TEST(p.has_filename()); + BOOST_TEST(p.has_parent_path()); + BOOST_TEST(p.is_absolute()); + + p = q = path("c://foo"); + PATH_TEST_EQ(p.relative_path().string(), "foo"); + PATH_TEST_EQ(p.parent_path().string(), "c:/"); + PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + PATH_TEST_EQ(p.filename(), "foo"); + PATH_TEST_EQ(p.root_name(), "c:"); + PATH_TEST_EQ(p.root_directory(), "/"); + PATH_TEST_EQ(p.root_path().string(), "c:/"); + BOOST_TEST(p.has_root_path()); + BOOST_TEST(p.has_root_name()); + BOOST_TEST(p.has_root_directory()); + BOOST_TEST(p.has_relative_path()); + BOOST_TEST(p.has_filename()); + BOOST_TEST(p.has_parent_path()); + BOOST_TEST(p.is_absolute()); + + p = q = path("c:\\foo\\bar"); + PATH_TEST_EQ(p.relative_path().string(), "foo\\bar"); + PATH_TEST_EQ(p.parent_path().string(), "c:\\foo"); + PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + PATH_TEST_EQ(p.filename(), "bar"); + PATH_TEST_EQ(p.root_name(), "c:"); + PATH_TEST_EQ(p.root_directory(), "\\"); + PATH_TEST_EQ(p.root_path().string(), "c:\\"); + BOOST_TEST(p.has_root_path()); + BOOST_TEST(p.has_root_name()); + BOOST_TEST(p.has_root_directory()); + BOOST_TEST(p.has_relative_path()); + BOOST_TEST(p.has_filename()); + BOOST_TEST(p.has_parent_path()); + BOOST_TEST(p.is_absolute()); + + p = q = path("prn:"); + BOOST_TEST(p.relative_path().string() == ""); + BOOST_TEST(p.parent_path().string() == ""); + PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + BOOST_TEST(p.filename() == "prn:"); + BOOST_TEST(p.root_name() == "prn:"); + BOOST_TEST(p.root_directory() == ""); + BOOST_TEST(p.root_path().string() == "prn:"); + BOOST_TEST(p.has_root_path()); + BOOST_TEST(p.has_root_name()); + BOOST_TEST(!p.has_root_directory()); + BOOST_TEST(!p.has_relative_path()); + BOOST_TEST(p.has_filename()); + BOOST_TEST(!p.has_parent_path()); + BOOST_TEST(!p.is_absolute()); + + p = q = path("\\\\net\\\\\\foo"); + PATH_TEST_EQ(p.relative_path().string(), "foo"); + PATH_TEST_EQ(p.parent_path().string(), "\\\\net\\"); + PATH_TEST_EQ(q.remove_filename().string(), p.parent_path().string()); + PATH_TEST_EQ(p.filename(), "foo"); + PATH_TEST_EQ(p.root_name(), "\\\\net"); + PATH_TEST_EQ(p.root_directory(), "\\"); + PATH_TEST_EQ(p.root_path().string(), "\\\\net\\"); + BOOST_TEST(p.has_root_path()); + BOOST_TEST(p.has_root_name()); + BOOST_TEST(p.has_root_directory()); + BOOST_TEST(p.has_relative_path()); + BOOST_TEST(p.has_filename()); + BOOST_TEST(p.has_parent_path()); + BOOST_TEST(p.is_absolute()); + } // Windows + + else + { // POSIX + PATH_TEST_EQ(path("/foo/bar/"), "/foo/bar/"); + PATH_TEST_EQ(path("//foo//bar//"), "//foo//bar//"); + PATH_TEST_EQ(path("///foo///bar///"), "///foo///bar///"); + + p = path("/usr/local/bin:/usr/bin:/bin"); + BOOST_TEST(p.string() == "/usr/local/bin:/usr/bin:/bin"); + } // POSIX + } + + // composition_tests ----------------------------------------------------------------// + + void composition_tests() + { + std::cout << "composition_tests..." << std::endl; + + } + + // construction_tests ---------------------------------------------------------------// + + void construction_tests() + { + std::cout << "construction_tests..." << std::endl; + + PATH_TEST_EQ("", ""); + + PATH_TEST_EQ("foo", "foo"); + PATH_TEST_EQ("f", "f"); + + PATH_TEST_EQ("foo/", "foo/"); + PATH_TEST_EQ("f/", "f/"); + PATH_TEST_EQ("foo/..", "foo/.."); + PATH_TEST_EQ("foo/../", "foo/../"); + PATH_TEST_EQ("foo/bar/../..", "foo/bar/../.."); + PATH_TEST_EQ("foo/bar/../../", "foo/bar/../../"); + PATH_TEST_EQ("/", "/"); + PATH_TEST_EQ("/f", "/f"); + + PATH_TEST_EQ("/foo", "/foo"); + PATH_TEST_EQ("/foo/bar/", "/foo/bar/"); + PATH_TEST_EQ("//foo//bar//", "//foo//bar//"); + PATH_TEST_EQ("///foo///bar///", "///foo///bar///"); + PATH_TEST_EQ("\\/foo\\/bar\\/", "\\/foo\\/bar\\/"); + PATH_TEST_EQ("\\//foo\\//bar\\//", "\\//foo\\//bar\\//"); + + if (platform == "Windows") + { + PATH_TEST_EQ(path("c:") / "foo", "c:foo"); + PATH_TEST_EQ(path("c:") / "/foo", "c:/foo"); + + PATH_TEST_EQ("\\foo\\bar\\", "\\foo\\bar\\"); + PATH_TEST_EQ("\\\\foo\\\\bar\\\\", "\\\\foo\\\\bar\\\\"); + PATH_TEST_EQ("\\\\\\foo\\\\\\bar\\\\\\", "\\\\\\foo\\\\\\bar\\\\\\"); + + PATH_TEST_EQ("\\", "\\"); + PATH_TEST_EQ("\\f", "\\f"); + PATH_TEST_EQ("\\foo", "\\foo"); + PATH_TEST_EQ("foo\\bar", "foo\\bar"); + PATH_TEST_EQ("foo bar", "foo bar"); + PATH_TEST_EQ("c:", "c:"); + PATH_TEST_EQ("c:/", "c:/"); + PATH_TEST_EQ("c:.", "c:."); + PATH_TEST_EQ("c:./foo", "c:./foo"); + PATH_TEST_EQ("c:.\\foo", "c:.\\foo"); + PATH_TEST_EQ("c:..", "c:.."); + PATH_TEST_EQ("c:/.", "c:/."); + PATH_TEST_EQ("c:/..", "c:/.."); + PATH_TEST_EQ("c:/../", "c:/../"); + PATH_TEST_EQ("c:\\..\\", "c:\\..\\"); + PATH_TEST_EQ("c:/../..", "c:/../.."); + PATH_TEST_EQ("c:/../foo", "c:/../foo"); + PATH_TEST_EQ("c:\\..\\foo", "c:\\..\\foo"); + PATH_TEST_EQ("c:../foo", "c:../foo"); + PATH_TEST_EQ("c:..\\foo", "c:..\\foo"); + PATH_TEST_EQ("c:/../../foo", "c:/../../foo"); + PATH_TEST_EQ("c:\\..\\..\\foo", "c:\\..\\..\\foo"); + PATH_TEST_EQ("c:foo/..", "c:foo/.."); + PATH_TEST_EQ("c:/foo/..", "c:/foo/.."); + PATH_TEST_EQ("c:/..foo", "c:/..foo"); + PATH_TEST_EQ("c:foo", "c:foo"); + PATH_TEST_EQ("c:/foo", "c:/foo"); + PATH_TEST_EQ("\\\\netname", "\\\\netname"); + PATH_TEST_EQ("\\\\netname\\", "\\\\netname\\"); + PATH_TEST_EQ("\\\\netname\\foo", "\\\\netname\\foo"); + PATH_TEST_EQ("c:/foo", "c:/foo"); + PATH_TEST_EQ("prn:", "prn:"); + } + else + { + } + + PATH_TEST_EQ("foo/bar", "foo/bar"); + PATH_TEST_EQ("a/b", "a/b"); // probe for length effects + PATH_TEST_EQ("..", ".."); + PATH_TEST_EQ("../..", "../.."); + PATH_TEST_EQ("/..", "/.."); + PATH_TEST_EQ("/../..", "/../.."); + PATH_TEST_EQ("../foo", "../foo"); + PATH_TEST_EQ("foo/..", "foo/.."); + PATH_TEST_EQ("foo/..bar", "foo/..bar"); + PATH_TEST_EQ("../f", "../f"); + PATH_TEST_EQ("/../f", "/../f"); + PATH_TEST_EQ("f/..", "f/.."); + PATH_TEST_EQ("foo/../..", "foo/../.."); + PATH_TEST_EQ("foo/../../..", "foo/../../.."); + PATH_TEST_EQ("foo/../bar", "foo/../bar"); + PATH_TEST_EQ("foo/bar/..", "foo/bar/.."); + PATH_TEST_EQ("foo/bar/../..", "foo/bar/../.."); + PATH_TEST_EQ("foo/bar/../blah", "foo/bar/../blah"); + PATH_TEST_EQ("f/../b", "f/../b"); + PATH_TEST_EQ("f/b/..", "f/b/.."); + PATH_TEST_EQ("f/b/../a", "f/b/../a"); + PATH_TEST_EQ("foo/bar/blah/../..", "foo/bar/blah/../.."); + PATH_TEST_EQ("foo/bar/blah/../../bletch", "foo/bar/blah/../../bletch"); + PATH_TEST_EQ("...", "..."); + PATH_TEST_EQ("....", "...."); + PATH_TEST_EQ("foo/...", "foo/..."); + PATH_TEST_EQ("abc.", "abc."); + PATH_TEST_EQ("abc..", "abc.."); + PATH_TEST_EQ("foo/abc.", "foo/abc."); + PATH_TEST_EQ("foo/abc..", "foo/abc.."); + + PATH_TEST_EQ(".abc", ".abc"); + PATH_TEST_EQ("a.c", "a.c"); + PATH_TEST_EQ("..abc", "..abc"); + PATH_TEST_EQ("a..c", "a..c"); + PATH_TEST_EQ("foo/.abc", "foo/.abc"); + PATH_TEST_EQ("foo/a.c", "foo/a.c"); + PATH_TEST_EQ("foo/..abc", "foo/..abc"); + PATH_TEST_EQ("foo/a..c", "foo/a..c"); + + PATH_TEST_EQ(".", "."); + PATH_TEST_EQ("./foo", "./foo"); + PATH_TEST_EQ("./..", "./.."); + PATH_TEST_EQ("./../foo", "./../foo"); + PATH_TEST_EQ("foo/.", "foo/."); + PATH_TEST_EQ("../.", "../."); + PATH_TEST_EQ("./.", "./."); + PATH_TEST_EQ("././.", "././."); + PATH_TEST_EQ("./foo/.", "./foo/."); + PATH_TEST_EQ("foo/./bar", "foo/./bar"); + PATH_TEST_EQ("foo/./.", "foo/./."); + PATH_TEST_EQ("foo/./..", "foo/./.."); + PATH_TEST_EQ("foo/./../bar", "foo/./../bar"); + PATH_TEST_EQ("foo/../.", "foo/../."); + PATH_TEST_EQ("././..", "././.."); + PATH_TEST_EQ("./../.", "./../."); + PATH_TEST_EQ(".././.", ".././."); + } + + // append_tests --------------------------------------------------------------------// + + void append_test_aux(const path & p, const std::string & s, const std::string & expect) + { + PATH_TEST_EQ((p / path(s)).string(), expect); + PATH_TEST_EQ((p / s.c_str()).string(), expect); + PATH_TEST_EQ((p / s).string(), expect); + path x(p); + x.append(s.begin(), s.end()); + PATH_TEST_EQ(x.string(), expect); + } + + void append_tests() + { + std::cout << "append_tests..." << std::endl; + + // There are many control paths to be exercised, since empty paths and arguments, + // paths with trailing separators, arguments with leading separators, with or without + // other characters being present, are all separate cases that need to be tested. + // Furthermore, some of the code to be tested is specific to argument categories, + // so that results in further permutations to be tested. + + //// code to generate test cases + //// + //// expected results must be checked by hand + //// "foo\bar" expected result must be edited by hand and moved for Windows/POSIX + //// + //const char* x[] = { "", "/", "foo", "foo/" }; + //const char* y[] = { "", "/", "bar", "/bar" }; + + //for (int i = 0; i < sizeof(x)/sizeof(char*); ++i) + // for (int j = 0; j < sizeof(y)/sizeof(char*); ++j) + // { + // std::cout << "\n PATH_TEST_EQ(path(\"" << x[i] << "\") / \"" << y[j] << "\", \"" + // << path(x[i]) / y[j] << "\");\n"; + // std::cout << " append_test_aux(\"" << x[i] << "\", \"" << y[j] << "\", \"" + // << path(x[i]) / y[j] << "\");\n"; + // } + + PATH_TEST_EQ(path("") / "", ""); + append_test_aux("", "", ""); + + PATH_TEST_EQ(path("") / "/", "/"); + append_test_aux("", "/", "/"); + + PATH_TEST_EQ(path("") / "bar", "bar"); + append_test_aux("", "bar", "bar"); + + PATH_TEST_EQ(path("") / "/bar", "/bar"); + append_test_aux("", "/bar", "/bar"); + + PATH_TEST_EQ(path("/") / "", "/"); + append_test_aux("/", "", "/"); + + PATH_TEST_EQ(path("/") / "/", "//"); + append_test_aux("/", "/", "//"); + + PATH_TEST_EQ(path("/") / "bar", "/bar"); + append_test_aux("/", "bar", "/bar"); + + PATH_TEST_EQ(path("/") / "/bar", "//bar"); + append_test_aux("/", "/bar", "//bar"); + + PATH_TEST_EQ(path("foo") / "", "foo"); + append_test_aux("foo", "", "foo"); + + PATH_TEST_EQ(path("foo") / "/", "foo/"); + append_test_aux("foo", "/", "foo/"); + + PATH_TEST_EQ(path("foo") / "/bar", "foo/bar"); + append_test_aux("foo", "/bar", "foo/bar"); + + PATH_TEST_EQ(path("foo/") / "", "foo/"); + append_test_aux("foo/", "", "foo/"); + + PATH_TEST_EQ(path("foo/") / "/", "foo//"); + append_test_aux("foo/", "/", "foo//"); + + PATH_TEST_EQ(path("foo/") / "bar", "foo/bar"); + append_test_aux("foo/", "bar", "foo/bar"); + + + if (platform == "Windows") + { + PATH_TEST_EQ(path("foo") / "bar", "foo\\bar"); + append_test_aux("foo", "bar", "foo\\bar"); + + PATH_TEST_EQ(path("foo\\") / "\\bar", "foo\\\\bar"); + append_test_aux("foo\\", "\\bar", "foo\\\\bar"); + + // hand created test case specific to Windows + PATH_TEST_EQ(path("c:") / "bar", "c:bar"); + append_test_aux("c:", "bar", "c:bar"); + } + else + { + PATH_TEST_EQ(path("foo") / "bar", "foo/bar"); + append_test_aux("foo", "bar", "foo/bar"); + } + + // ticket #6819 + union + { + char a[1]; + char b[3]; + } u; + + u.b[0] = 'a'; + u.b[1] = 'b'; + u.b[2] = '\0'; + + path p6819; + p6819 /= u.a; + BOOST_TEST_EQ(p6819, path("ab")); + } + +// self_assign_and_append_tests ------------------------------------------------------// + + void self_assign_and_append_tests() + { + std::cout << "self_assign_and_append_tests..." << std::endl; + + path p; + + p = "snafubar"; + PATH_TEST_EQ(p = p, "snafubar"); + + p = "snafubar"; + p = p.c_str(); + PATH_TEST_EQ(p, "snafubar"); + + p = "snafubar"; + p.assign(p.c_str(), path::codecvt()); + PATH_TEST_EQ(p, "snafubar"); + + p = "snafubar"; + PATH_TEST_EQ(p = p.c_str()+5, "bar"); + + p = "snafubar"; + PATH_TEST_EQ(p.assign(p.c_str() + 5, p.c_str() + 7), "ba"); + + p = "snafubar"; + p /= p; + PATH_TEST_EQ(p, "snafubar" BOOST_DIR_SEP "snafubar"); + + p = "snafubar"; + p /= p.c_str(); + PATH_TEST_EQ(p, "snafubar" BOOST_DIR_SEP "snafubar"); + + p = "snafubar"; + p.append(p.c_str(), path::codecvt()); + PATH_TEST_EQ(p, "snafubar" BOOST_DIR_SEP "snafubar"); + + p = "snafubar"; + PATH_TEST_EQ(p.append(p.c_str() + 5, p.c_str() + 7), "snafubar" BOOST_DIR_SEP "ba"); + } + + + // name_function_tests -------------------------------------------------------------// + + void name_function_tests() + { + std::cout << "name_function_tests..." << std::endl; + + BOOST_TEST(fs::portable_posix_name(std::string("x"))); + BOOST_TEST(fs::windows_name(std::string("x"))); + BOOST_TEST(fs::portable_name(std::string("x"))); + BOOST_TEST(fs::portable_directory_name(std::string("x"))); + BOOST_TEST(fs::portable_file_name(std::string("x"))); + + BOOST_TEST(fs::portable_posix_name(std::string("."))); + BOOST_TEST(fs::windows_name(std::string("."))); + BOOST_TEST(fs::portable_name(std::string("."))); + BOOST_TEST(fs::portable_directory_name(std::string("."))); + BOOST_TEST(!fs::portable_file_name(std::string("."))); + + BOOST_TEST(fs::portable_posix_name(std::string(".."))); + BOOST_TEST(fs::windows_name(std::string(".."))); + BOOST_TEST(fs::portable_name(std::string(".."))); + BOOST_TEST(fs::portable_directory_name(std::string(".."))); + BOOST_TEST(!fs::portable_file_name(std::string(".."))); + + BOOST_TEST(!fs::native(std::string(""))); + BOOST_TEST(!fs::portable_posix_name(std::string(""))); + BOOST_TEST(!fs::windows_name(std::string(""))); + BOOST_TEST(!fs::portable_name(std::string(""))); + BOOST_TEST(!fs::portable_directory_name(std::string(""))); + BOOST_TEST(!fs::portable_file_name(std::string(""))); + + BOOST_TEST(!fs::native(std::string(" "))); + BOOST_TEST(!fs::portable_posix_name(std::string(" "))); + BOOST_TEST(!fs::windows_name(std::string(" "))); + BOOST_TEST(!fs::portable_name(std::string(" "))); + BOOST_TEST(!fs::portable_directory_name(std::string(" "))); + BOOST_TEST(!fs::portable_file_name(std::string(" "))); + + BOOST_TEST(!fs::portable_posix_name(std::string(":"))); + BOOST_TEST(!fs::windows_name(std::string(":"))); + BOOST_TEST(!fs::portable_name(std::string(":"))); + BOOST_TEST(!fs::portable_directory_name(std::string(":"))); + BOOST_TEST(!fs::portable_file_name(std::string(":"))); + + BOOST_TEST(fs::portable_posix_name(std::string("-"))); + BOOST_TEST(fs::windows_name(std::string("-"))); + BOOST_TEST(!fs::portable_name(std::string("-"))); + BOOST_TEST(!fs::portable_directory_name(std::string("-"))); + BOOST_TEST(!fs::portable_file_name(std::string("-"))); + + BOOST_TEST(!fs::portable_posix_name(std::string("foo bar"))); + BOOST_TEST(fs::windows_name(std::string("foo bar"))); + BOOST_TEST(!fs::windows_name(std::string(" bar"))); + BOOST_TEST(!fs::windows_name(std::string("foo "))); + BOOST_TEST(!fs::portable_name(std::string("foo bar"))); + BOOST_TEST(!fs::portable_directory_name(std::string("foo bar"))); + BOOST_TEST(!fs::portable_file_name(std::string("foo bar"))); + + BOOST_TEST(fs::portable_posix_name(std::string("foo.bar"))); + BOOST_TEST(fs::windows_name(std::string("foo.bar"))); + BOOST_TEST(fs::portable_name(std::string("foo.bar"))); + BOOST_TEST(!fs::portable_directory_name(std::string("foo.bar"))); + BOOST_TEST(fs::portable_file_name(std::string("foo.bar"))); + + BOOST_TEST(fs::portable_posix_name(std::string("foo.barf"))); + BOOST_TEST(fs::windows_name(std::string("foo.barf"))); + BOOST_TEST(fs::portable_name(std::string("foo.barf"))); + BOOST_TEST(!fs::portable_directory_name(std::string("foo.barf"))); + BOOST_TEST(!fs::portable_file_name(std::string("foo.barf"))); + + BOOST_TEST(fs::portable_posix_name(std::string(".foo"))); + BOOST_TEST(fs::windows_name(std::string(".foo"))); + BOOST_TEST(!fs::portable_name(std::string(".foo"))); + BOOST_TEST(!fs::portable_directory_name(std::string(".foo"))); + BOOST_TEST(!fs::portable_file_name(std::string(".foo"))); + + BOOST_TEST(fs::portable_posix_name(std::string("foo."))); + BOOST_TEST(!fs::windows_name(std::string("foo."))); + BOOST_TEST(!fs::portable_name(std::string("foo."))); + BOOST_TEST(!fs::portable_directory_name(std::string("foo."))); + BOOST_TEST(!fs::portable_file_name(std::string("foo."))); + } + + // replace_extension_tests ---------------------------------------------------------// + + void replace_extension_tests() + { + std::cout << "replace_extension_tests..." << std::endl; + + BOOST_TEST(path().replace_extension().empty()); + BOOST_TEST(path().replace_extension("a") == ".a"); + BOOST_TEST(path().replace_extension("a.") == ".a."); + BOOST_TEST(path().replace_extension(".a") == ".a"); + BOOST_TEST(path().replace_extension("a.txt") == ".a.txt"); + // see the rationale in html docs for explanation why this works: + BOOST_TEST(path().replace_extension(".txt") == ".txt"); + + BOOST_TEST(path("a.txt").replace_extension() == "a"); + BOOST_TEST(path("a.txt").replace_extension("") == "a"); + BOOST_TEST(path("a.txt").replace_extension(".") == "a."); + BOOST_TEST(path("a.txt").replace_extension(".tex") == "a.tex"); + BOOST_TEST(path("a.txt").replace_extension("tex") == "a.tex"); + BOOST_TEST(path("a.").replace_extension(".tex") == "a.tex"); + BOOST_TEST(path("a.").replace_extension("tex") == "a.tex"); + BOOST_TEST(path("a").replace_extension(".txt") == "a.txt"); + BOOST_TEST(path("a").replace_extension("txt") == "a.txt"); + BOOST_TEST(path("a.b.txt").replace_extension(".tex") == "a.b.tex"); + BOOST_TEST(path("a.b.txt").replace_extension("tex") == "a.b.tex"); + BOOST_TEST(path("a/b").replace_extension(".c") == "a/b.c"); + PATH_TEST_EQ(path("a.txt/b").replace_extension(".c"), "a.txt/b.c"); // ticket 4702 + BOOST_TEST(path("foo.txt").replace_extension("exe") == "foo.exe"); // ticket 5118 + BOOST_TEST(path("foo.txt").replace_extension(".tar.bz2") + == "foo.tar.bz2"); // ticket 5118 + } + + // make_preferred_tests ------------------------------------------------------------// + + void make_preferred_tests() + { + std::cout << "make_preferred_tests..." << std::endl; + + if (platform == "Windows") + { + BOOST_TEST(path("//abc\\def/ghi").make_preferred().native() + == path("\\\\abc\\def\\ghi").native()); + } + else + { + BOOST_TEST(path("//abc\\def/ghi").make_preferred().native() + == path("//abc\\def/ghi").native()); + } + } + +} // unnamed namespace + +static boost::filesystem::path ticket_6737 = "FilePath"; // #6737 reported this crashed + // on VC++ debug mode build +const boost::filesystem::path ticket_6690("test"); // #6690 another V++ static init crash + +//--------------------------------------------------------------------------------------// +// // +// main // +// // +//--------------------------------------------------------------------------------------// + +int cpp_main(int, char*[]) +{ + // The choice of platform is make at runtime rather than compile-time + // so that compile errors for all platforms will be detected even though + // only the current platform is runtime tested. + platform = (platform == "Win32" || platform == "Win64" || platform == "Cygwin") + ? "Windows" + : "POSIX"; + std::cout << "Platform is " << platform << '\n'; + + BOOST_TEST(p1.string() != p3.string()); + p3 = p2; + BOOST_TEST(p1.string() == p3.string()); + + path p04("foobar"); + BOOST_TEST(p04.string() == "foobar"); + p04 = p04; // self-assignment + BOOST_TEST(p04.string() == "foobar"); + + construction_tests(); + append_tests(); + self_assign_and_append_tests(); + overload_tests(); + query_and_decomposition_tests(); + composition_tests(); + iterator_tests(); + non_member_tests(); + exception_tests(); + name_function_tests(); + replace_extension_tests(); + make_preferred_tests(); + + // verify deprecated names still available + +# ifndef BOOST_FILESYSTEM_NO_DEPRECATED + + p1.branch_path(); + p1.leaf(); + path p_remove_leaf; + p_remove_leaf.remove_leaf(); + +# endif + + std::string s1("//:somestring"); // this used to be treated specially + + // check the path member templates + p5.assign(s1.begin(), s1.end()); + + PATH_TEST_EQ(p5.string(), "//:somestring"); + p5 = s1; + PATH_TEST_EQ(p5.string(), "//:somestring"); + + // this code, courtesy of David Whetstone, detects a now fixed bug that + // derefereced the end iterator (assuming debug build with checked itors) + std::vector v1; + p5.assign(v1.begin(), v1.end()); + std::string s2(v1.begin(), v1.end()); + PATH_TEST_EQ(p5.string(), s2); + p5.assign(s1.begin(), s1.begin() + 1); + PATH_TEST_EQ(p5.string(), "/"); + + BOOST_TEST(p1 != p4); + BOOST_TEST(p1.string() == p2.string()); + BOOST_TEST(p1.string() == p3.string()); + BOOST_TEST(path("foo").filename() == "foo"); + BOOST_TEST(path("foo").parent_path().string() == ""); + BOOST_TEST(p1.filename() == "fum"); + BOOST_TEST(p1.parent_path().string() == "fe/fi/fo"); + BOOST_TEST(path("").empty() == true); + BOOST_TEST(path("foo").empty() == false); + + // inserter and extractor tests +# if !defined(BOOST_MSVC) || BOOST_MSVC > 1300 // bypass VC++ 7.0 and earlier + std::cout << "\nInserter and extractor test..."; + std::stringstream ss; + ss << fs::path("foo/bar") << std::endl; + fs::path round_trip; + ss >> round_trip; + BOOST_TEST(round_trip.string() == "foo/bar"); + std::cout << round_trip.string() << "..." << round_trip << " complete\n"; +# endif + + return ::boost::report_errors(); +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/path_times.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/path_times.cpp new file mode 100644 index 0000000000..3ebdbc8abd --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/path_times.cpp @@ -0,0 +1,103 @@ +// Boost Filesystem path_times.cpp ---------------------------------------------------// + +// Copyright Beman Dawes 2013 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include + +#ifndef BOOST_FILESYSTEM_NO_DEPRECATED +# define BOOST_FILESYSTEM_NO_DEPRECATED +#endif +#ifndef BOOST_SYSTEM_NO_DEPRECATED +# define BOOST_SYSTEM_NO_DEPRECATED +#endif + +#include +#include +#include + +#include +# if defined( BOOST_NO_STD_WSTRING ) +# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support +# endif + +#include + +namespace fs = boost::filesystem; +using namespace boost::timer; + +#include +#include + +using std::cout; +using std::endl; + +namespace +{ + boost::int64_t max_cycles; + + template + nanosecond_type time_ctor(const STD_STRING& s) + { + boost::timer::auto_cpu_timer tmr; + boost::int64_t count = 0; + do + { + fs::path p(s); + ++count; + } while (count < max_cycles); + + boost::timer::cpu_times elapsed = tmr.elapsed(); + return elapsed.user + elapsed.system; + } + + nanosecond_type time_loop() + { + boost::timer::auto_cpu_timer tmr; + boost::int64_t count = 0; + do + { + ++count; + } while (count < max_cycles); + + boost::timer::cpu_times elapsed = tmr.elapsed(); + return elapsed.user + elapsed.system; + } +} // unnamed namespace + +//--------------------------------------------------------------------------------------// +// main // +//--------------------------------------------------------------------------------------// + +int cpp_main(int argc, char* argv[]) +{ + if (argc != 2) + { + cout << "Usage: path_times \n"; + return 1; + } + + max_cycles = std::atoi(argv[1]) * 1000000LL; + cout << "testing " << std::atoi(argv[1]) << " million cycles" << endl; + + cout << "time_loop" << endl; + nanosecond_type x = time_loop(); + + cout << "time_ctor with string" << endl; + nanosecond_type s = time_ctor(std::string("/foo/bar/baz")); + + cout << "time_ctor with wstring" << endl; + nanosecond_type w = time_ctor(std::wstring(L"/foo/bar/baz")); + + if (s > w) + cout << "narrow/wide CPU-time ratio = " << long double(s)/w << endl; + else + cout << "wide/narrow CPU-time ratio = " << long double(w)/s << endl; + + cout << "returning from main()" << endl; + return 0; +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/path_unit_test.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/path_unit_test.cpp new file mode 100644 index 0000000000..fe3a42794b --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/path_unit_test.cpp @@ -0,0 +1,1106 @@ +// filesystem path_unit_test.cpp --------------------------------------------------- // + +// Copyright Beman Dawes 2008, 2009 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +// ---------------------------------------------------------------------------------- // +// +// The purpose of this test is to ensure that each function in the public +// interface can be called with arguments of the appropriate types. It does +// not attempt to verify that the full range of values for each argument +// are processed correctly. +// +// For full functionality tests, including probes with many different argument +// values, see path_test.cpp and other test programs. +// +// ---------------------------------------------------------------------------------- // + +#include + +// See deprecated_test for tests of deprecated features +#ifndef BOOST_FILESYSTEM_NO_DEPRECATED +# define BOOST_FILESYSTEM_NO_DEPRECATED +#endif +#ifndef BOOST_SYSTEM_NO_DEPRECATED +# define BOOST_SYSTEM_NO_DEPRECATED +#endif + +#include + +#include // for imbue tests +#include "test_codecvt.hpp" // for codecvt arg tests +#include +#include // used constructor tests +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace fs = boost::filesystem; +namespace bs = boost::system; +using boost::filesystem::path; +using std::cout; +using std::endl; +using std::string; +using std::wstring; + +#define CHECK(x) check(x, __FILE__, __LINE__) +#define PATH_IS(a, b) check_path(a, b, __FILE__, __LINE__) +#define NATIVE_IS(p, s, ws) check_native(p, s, ws, __FILE__, __LINE__) +#define IS(a,b) check_equal(a, b, __FILE__, __LINE__) + +#if defined(_MSC_VER) +# pragma warning(push) // Save warning settings. +# pragma warning(disable : 4428) // Disable universal-character-name encountered in source warning. +#endif + +namespace +{ + + boost::system::error_code ec; + const boost::system::error_code ok; + const boost::system::error_code ng(-1, boost::system::system_category()); + + std::string platform(BOOST_PLATFORM); + + void check_path(const path& source, + const wstring& expected, const char* file, int line) + { + if (source == expected) return; + + ++::boost::detail::test_errors(); + + std::cout << file; + std::wcout << L'(' << line << L"): source.wstring(): \"" + << source.wstring() + << L"\" != expected: \"" << expected + << L"\"\n" ; + } + +# ifdef BOOST_WINDOWS_API + void check_native(const path& p, + const string&, const wstring& expected, const char* file, int line) +# else + void check_native(const path& p, + const string& expected, const wstring&, const char* file, int line) +# endif + { + if (p.native() == expected) return; + + ++::boost::detail::test_errors(); + + std::cout << file << '(' << line << "): native() is not equal expected\n" + " native---: " << std::hex; + path::string_type nat(p.native()); + for (path::string_type::const_iterator it = nat.begin(); it != nat.end(); ++it) + std::cout << long(*it) << ' '; + std::cout << "\n expected-: "; + for (path::string_type::const_iterator it = expected.begin(); it != expected.end(); ++it) + std::cout << long(*it) << ' '; + std::cout << std::dec << std::endl; + } + + template< class T1, class T2 > + void check_equal(const T1& value, + const T2& expected, const char* file, int line) + { + if (value == expected) return; + + ++::boost::detail::test_errors(); + + std::cout << file; + + std::wcout << L'(' << line << L"): value: \"" << value + << L"\" != expected: \"" << expected + << L"\"\n" ; + } + + void check(bool ok_, const char* file, int line) + { + if (ok_) return; + + ++::boost::detail::test_errors(); + + std::cout << file << '(' << line << "): test failed\n"; + } + + string s("string"); + wstring ws(L"wstring"); + std::list l; // see main() for initialization to s, t, r, i, n, g + std::list wl; // see main() for initialization to w, s, t, r, i, n, g + std::vector v; // see main() for initialization to f, u, z + std::vector wv; // see main() for initialization to w, f, u, z + + class Base {}; + class Derived : public Base {}; + void fun(const boost::shared_ptr< Base >&) {} + + // test_constructors ---------------------------------------------------------------// + + void test_constructors() + { + std::cout << "testing constructors..." << std::endl; + + path x0; // default constructor + PATH_IS(x0, L""); + BOOST_TEST_EQ(x0.native().size(), 0U); + + path x1(l.begin(), l.end()); // iterator range char + PATH_IS(x1, L"string"); + BOOST_TEST_EQ(x1.native().size(), 6U); + + path x2(x1); // copy constructor + PATH_IS(x2, L"string"); + BOOST_TEST_EQ(x2.native().size(), 6U); + + path x3(wl.begin(), wl.end()); // iterator range wchar_t + PATH_IS(x3, L"wstring"); + BOOST_TEST_EQ(x3.native().size(), 7U); + + // contiguous containers + path x4(string("std::string")); // std::string + PATH_IS(x4, L"std::string"); + BOOST_TEST_EQ(x4.native().size(), 11U); + + path x5(wstring(L"std::wstring")); // std::wstring + PATH_IS(x5, L"std::wstring"); + BOOST_TEST_EQ(x5.native().size(), 12U); + + path x4v(v); // std::vector + PATH_IS(x4v, L"fuz"); + BOOST_TEST_EQ(x4v.native().size(), 3U); + + path x5v(wv); // std::vector + PATH_IS(x5v, L"wfuz"); + BOOST_TEST_EQ(x5v.native().size(), 4U); + + path x6("array char"); // array char + PATH_IS(x6, L"array char"); + BOOST_TEST_EQ(x6.native().size(), 10U); + + path x7(L"array wchar_t"); // array wchar_t + PATH_IS(x7, L"array wchar_t"); + BOOST_TEST_EQ(x7.native().size(), 13U); + + char char_array[100]; + std::strcpy(char_array, "big array char"); + path x6o(char_array); // array char, only partially full + PATH_IS(x6o, L"big array char"); + BOOST_TEST_EQ(x6o.native().size(), 14U); + + wchar_t wchar_array[100]; + std::wcscpy(wchar_array, L"big array wchar_t"); + path x7o(wchar_array); // array char, only partially full + PATH_IS(x7o, L"big array wchar_t"); + BOOST_TEST_EQ(x7o.native().size(), 17U); + + path x8(s.c_str()); // const char* null terminated + PATH_IS(x8, L"string"); + BOOST_TEST_EQ(x8.native().size(), 6U); + + path x9(ws.c_str()); // const wchar_t* null terminated + PATH_IS(x9, L"wstring"); + BOOST_TEST_EQ(x9.native().size(), 7U); + + path x8nc(const_cast(s.c_str())); // char* null terminated + PATH_IS(x8nc, L"string"); + BOOST_TEST_EQ(x8nc.native().size(), 6U); + + path x9nc(const_cast(ws.c_str())); // wchar_t* null terminated + PATH_IS(x9nc, L"wstring"); + BOOST_TEST_EQ(x9nc.native().size(), 7U); + + // non-contiguous containers + path x10(l); // std::list + PATH_IS(x10, L"string"); + BOOST_TEST_EQ(x10.native().size(), 6U); + + path xll(wl); // std::list + PATH_IS(xll, L"wstring"); + BOOST_TEST_EQ(xll.native().size(), 7U); + + // easy-to-make coding errors + // path e1(x0, path::codecvt()); // fails to compile, and that is OK + + boost::shared_ptr< Derived > pDerived( new Derived() ); + fun( pDerived ); // tests constructor member template enable_if working correctly; + // will fail to compile if enable_if not taking path off the table + } + + path x; + path y; + + // test_assignments ----------------------------------------------------------------// + + void test_assignments() + { + std::cout << "testing assignments..." << std::endl; + + x = path("yet another path"); // another path + PATH_IS(x, L"yet another path"); + BOOST_TEST_EQ(x.native().size(), 16U); + + x = x; // self-assignment + PATH_IS(x, L"yet another path"); + BOOST_TEST_EQ(x.native().size(), 16U); + + x.assign(l.begin(), l.end()); // iterator range char + PATH_IS(x, L"string"); + + x.assign(wl.begin(), wl.end()); // iterator range wchar_t + PATH_IS(x, L"wstring"); + + x = string("std::string"); // container char + PATH_IS(x, L"std::string"); + + x = wstring(L"std::wstring"); // container wchar_t + PATH_IS(x, L"std::wstring"); + + x = "array char"; // array char + PATH_IS(x, L"array char"); + + x = L"array wchar"; // array wchar_t + PATH_IS(x, L"array wchar"); + + x = s.c_str(); // const char* null terminated + PATH_IS(x, L"string"); + + x = ws.c_str(); // const wchar_t* null terminated + PATH_IS(x, L"wstring"); + } + + // test_appends --------------------------------------------------------------------// + + void test_appends() + { + std::cout << "testing appends..." << std::endl; + +# ifdef BOOST_WINDOWS_API +# define BOOST_FS_FOO L"/foo\\" +# else // POSIX paths +# define BOOST_FS_FOO L"/foo/" +# endif + + x = "/foo"; + x /= path(""); // empty path + PATH_IS(x, L"/foo"); + + x = "/foo"; + x /= path("/"); // slash path + PATH_IS(x, L"/foo/"); + + x = "/foo"; + x /= path("/boo"); // slash path + PATH_IS(x, L"/foo/boo"); + + x = "/foo"; + x /= x; // self-append + PATH_IS(x, L"/foo/foo"); + + x = "/foo"; + x /= path("yet another path"); // another path + PATH_IS(x, BOOST_FS_FOO L"yet another path"); + + x = "/foo"; + x.append(l.begin(), l.end()); // iterator range char + PATH_IS(x, BOOST_FS_FOO L"string"); + + x = "/foo"; + x.append(wl.begin(), wl.end()); // iterator range wchar_t + PATH_IS(x, BOOST_FS_FOO L"wstring"); + + x = "/foo"; + x /= string("std::string"); // container char + PATH_IS(x, BOOST_FS_FOO L"std::string"); + + x = "/foo"; + x /= wstring(L"std::wstring"); // container wchar_t + PATH_IS(x, BOOST_FS_FOO L"std::wstring"); + + x = "/foo"; + x /= "array char"; // array char + PATH_IS(x, BOOST_FS_FOO L"array char"); + + x = "/foo"; + x /= L"array wchar"; // array wchar_t + PATH_IS(x, BOOST_FS_FOO L"array wchar"); + + x = "/foo"; + x /= s.c_str(); // const char* null terminated + PATH_IS(x, BOOST_FS_FOO L"string"); + + x = "/foo"; + x /= ws.c_str(); // const wchar_t* null terminated + PATH_IS(x, BOOST_FS_FOO L"wstring"); + } + + // test_concats --------------------------------------------------------------------// + + void test_concats() + { + std::cout << "testing concats..." << std::endl; + + x = "/foo"; + x += path(""); // empty path + PATH_IS(x, L"/foo"); + + x = "/foo"; + x += path("/"); // slash path + PATH_IS(x, L"/foo/"); + + x = "/foo"; + x += path("boo"); // slash path + PATH_IS(x, L"/fooboo"); + + x = "foo"; + x += x; // self-append + PATH_IS(x, L"foofoo"); + + x = "foo-"; + x += path("yet another path"); // another path + PATH_IS(x, L"foo-yet another path"); + + x = "foo-"; + x.concat(l.begin(), l.end()); // iterator range char + PATH_IS(x, L"foo-string"); + + x = "foo-"; + x.concat(wl.begin(), wl.end()); // iterator range wchar_t + PATH_IS(x, L"foo-wstring"); + + x = "foo-"; + x += string("std::string"); // container char + PATH_IS(x, L"foo-std::string"); + + x = "foo-"; + x += wstring(L"std::wstring"); // container wchar_t + PATH_IS(x, L"foo-std::wstring"); + + x = "foo-"; + x += "array char"; // array char + PATH_IS(x, L"foo-array char"); + + x = "foo-"; + x += L"array wchar"; // array wchar_t + PATH_IS(x, L"foo-array wchar"); + + x = "foo-"; + x += s.c_str(); // const char* null terminated + PATH_IS(x, L"foo-string"); + + x = "foo-"; + x += ws.c_str(); // const wchar_t* null terminated + PATH_IS(x, L"foo-wstring"); + + x = "foo-"; + x += 'x'; // char + PATH_IS(x, L"foo-x"); + + x = "foo-"; + x += L'x'; // wchar + PATH_IS(x, L"foo-x"); + } + + // test_observers ------------------------------------------------------------------// + + void test_observers() + { + std::cout << "testing observers..." << std::endl; + + path p0("abc"); + + CHECK(p0.native().size() == 3); + CHECK(p0.string() == "abc"); + CHECK(p0.string().size() == 3); + CHECK(p0.wstring() == L"abc"); + CHECK(p0.wstring().size() == 3); + +# ifdef BOOST_WINDOWS_API + + path p("abc\\def/ghi"); + + CHECK(std::wstring(p.c_str()) == L"abc\\def/ghi"); + + CHECK(p.string() == "abc\\def/ghi"); + CHECK(p.wstring() == L"abc\\def/ghi"); + + CHECK(p.generic_string() == "abc/def/ghi"); + CHECK(p.generic_wstring() == L"abc/def/ghi"); + + CHECK(p.generic_string() == "abc/def/ghi"); + CHECK(p.generic_string() == L"abc/def/ghi"); + CHECK(p.generic_string() == L"abc/def/ghi"); + +# else // BOOST_POSIX_API + + path p("abc\\def/ghi"); + + CHECK(string(p.c_str()) == "abc\\def/ghi"); + + CHECK(p.string() == "abc\\def/ghi"); + CHECK(p.wstring() == L"abc\\def/ghi"); + + CHECK(p.generic_string() == "abc\\def/ghi"); + CHECK(p.generic_wstring() == L"abc\\def/ghi"); + + CHECK(p.generic_string() == "abc\\def/ghi"); + CHECK(p.generic_string() == L"abc\\def/ghi"); + CHECK(p.generic_string() == "abc\\def/ghi"); + +# endif + } + + // test_relationals ----------------------------------------------------------------// + + void test_relationals() + { + std::cout << "testing relationals..." << std::endl; + + boost::hash hash; + +# ifdef BOOST_WINDOWS_API + // this is a critical use case to meet user expectations + CHECK(path("c:\\abc") == path("c:/abc")); + CHECK(hash(path("c:\\abc")) == hash(path("c:/abc"))); +# endif + + const path p("bar"); + const path p2("baz"); + + CHECK(!(p < p)); + CHECK(p < p2); + CHECK(!(p2 < p)); + CHECK(p < "baz"); + CHECK(p < string("baz")); + CHECK(p < L"baz"); + CHECK(p < wstring(L"baz")); + CHECK(!("baz" < p)); + CHECK(!(string("baz") < p)); + CHECK(!(L"baz" < p)); + CHECK(!(wstring(L"baz") < p)); + + CHECK(p == p); + CHECK(!(p == p2)); + CHECK(!(p2 == p)); + CHECK(p2 == "baz"); + CHECK(p2 == string("baz")); + CHECK(p2 == L"baz"); + CHECK(p2 == wstring(L"baz")); + CHECK("baz" == p2); + CHECK(string("baz") == p2); + CHECK(L"baz" == p2); + CHECK(wstring(L"baz") == p2); + + CHECK(hash(p) == hash(p)); + CHECK(hash(p) != hash(p2)); // Not strictly required, but desirable + + CHECK(!(p != p)); + CHECK(p != p2); + CHECK(p2 != p); + + CHECK(p <= p); + CHECK(p <= p2); + CHECK(!(p2 <= p)); + + CHECK(!(p > p)); + CHECK(!(p > p2)); + CHECK(p2 > p); + + CHECK(p >= p); + CHECK(!(p >= p2)); + CHECK(p2 >= p); +} + + // test_inserter_and_extractor -----------------------------------------------------// + + void test_inserter_and_extractor() + { + std::cout << "testing inserter and extractor..." << std::endl; + + path p1("foo bar"); // verify space in path roundtrips per ticket #3863 + path p2; + + std::stringstream ss; + + CHECK(p1 != p2); + ss << p1; + ss >> p2; + CHECK(p1 == p2); + + path wp1(L"foo bar"); + path wp2; + + std::wstringstream wss; + + CHECK(wp1 != wp2); + wss << wp1; + wss >> wp2; + CHECK(wp1 == wp2); + } + + // test_other_non_members ----------------------------------------------------------// + + void test_other_non_members() + { + std::cout << "testing other_non_members..." << std::endl; + + path p1("foo"); + path p2("bar"); + + // operator / + + CHECK(p1 / p2 == path("foo/bar").make_preferred()); + CHECK("foo" / p2 == path("foo/bar").make_preferred()); + CHECK(L"foo" / p2 == path("foo/bar").make_preferred()); + CHECK(string("foo") / p2 == path("foo/bar").make_preferred()); + CHECK(wstring(L"foo") / p2 == path("foo/bar").make_preferred()); + CHECK(p1 / "bar" == path("foo/bar").make_preferred()); + CHECK(p1 / L"bar" == path("foo/bar").make_preferred()); + CHECK(p1 / string("bar") == path("foo/bar").make_preferred()); + CHECK(p1 / wstring(L"bar") == path("foo/bar").make_preferred()); + + swap(p1, p2); + + CHECK(p1 == "bar"); + CHECK(p2 == "foo"); + + CHECK(path("").remove_filename() == ""); + CHECK(path("foo").remove_filename() == ""); + CHECK(path("foo/bar").remove_filename() == "foo"); + } + +// // test_modifiers ------------------------------------------------------------------// +// +// void test_modifiers() +// { +// std::cout << "testing modifiers..." << std::endl; +// +// } + + // test_iterators ------------------------------------------------------------------// + + void test_iterators() + { + std::cout << "testing iterators..." << std::endl; + + path p1; + CHECK(p1.begin() == p1.end()); + + path p2("/"); + CHECK(p2.begin() != p2.end()); + CHECK(*p2.begin() == "/"); + CHECK(++p2.begin() == p2.end()); + + path p3("foo/bar/baz"); + + path::iterator it(p3.begin()); + CHECK(p3.begin() != p3.end()); + CHECK(*it == "foo"); + CHECK(*++it == "bar"); + CHECK(*++it == "baz"); + CHECK(*--it == "bar"); + CHECK(*--it == "foo"); + CHECK(*++it == "bar"); + CHECK(*++it == "baz"); + CHECK(++it == p3.end()); + } + + // test_modifiers ------------------------------------------------------------------// + + void test_modifiers() + { + std::cout << "testing modifiers..." << std::endl; + + } + + // test_decompositions -------------------------------------------------------------// + + void test_decompositions() + { + std::cout << "testing decompositions..." << std::endl; + + CHECK(path("").root_name().string() == ""); + CHECK(path("foo").root_name().string() == ""); + CHECK(path("/").root_name().string() == ""); + CHECK(path("/foo").root_name().string() == ""); + CHECK(path("//netname").root_name().string() == "//netname"); + CHECK(path("//netname/foo").root_name().string() == "//netname"); + + CHECK(path("").root_directory().string() == ""); + CHECK(path("foo").root_directory().string() == ""); + CHECK(path("/").root_directory().string() == "/"); + CHECK(path("/foo").root_directory().string() == "/"); + CHECK(path("//netname").root_directory().string() == ""); + CHECK(path("//netname/foo").root_directory().string() == "/"); + + CHECK(path("").root_path().string() == ""); + CHECK(path("/").root_path().string() == "/"); + CHECK(path("/foo").root_path().string() == "/"); + CHECK(path("//netname").root_path().string() == "//netname"); + CHECK(path("//netname/foo").root_path().string() == "//netname/"); + +# ifdef BOOST_WINDOWS_API + CHECK(path("c:/foo").root_path().string() == "c:/"); +# endif + + CHECK(path("").relative_path().string() == ""); + CHECK(path("/").relative_path().string() == ""); + CHECK(path("/foo").relative_path().string() == "foo"); + + CHECK(path("").parent_path().string() == ""); + CHECK(path("/").parent_path().string() == ""); + CHECK(path("/foo").parent_path().string() == "/"); + CHECK(path("/foo/bar").parent_path().string() == "/foo"); + + CHECK(path("/foo/bar/baz.zoo").filename().string() == "baz.zoo"); + + CHECK(path("/foo/bar/baz.zoo").stem().string() == "baz"); + CHECK(path("/foo/bar.woo/baz").stem().string() == "baz"); + + CHECK(path("foo.bar.baz.tar.bz2").extension().string() == ".bz2"); + CHECK(path("/foo/bar/baz.zoo").extension().string() == ".zoo"); + CHECK(path("/foo/bar.woo/baz").extension().string() == ""); + } + + // test_queries --------------------------------------------------------------------// + + void test_queries() + { + std::cout << "testing queries..." << std::endl; + + path p1(""); + path p2("//netname/foo.doo"); + + CHECK(p1.empty()); + CHECK(!p1.has_root_path()); + CHECK(!p1.has_root_name()); + CHECK(!p1.has_root_directory()); + CHECK(!p1.has_relative_path()); + CHECK(!p1.has_parent_path()); + CHECK(!p1.has_filename()); + CHECK(!p1.has_stem()); + CHECK(!p1.has_extension()); + CHECK(!p1.is_absolute()); + CHECK(p1.is_relative()); + + CHECK(!p2.empty()); + CHECK(p2.has_root_path()); + CHECK(p2.has_root_name()); + CHECK(p2.has_root_directory()); + CHECK(p2.has_relative_path()); + CHECK(p2.has_parent_path()); + CHECK(p2.has_filename()); + CHECK(p2.has_stem()); + CHECK(p2.has_extension()); + CHECK(p2.is_absolute()); + CHECK(!p2.is_relative()); + + } + + // test_imbue_locale ---------------------------------------------------------------// + + void test_imbue_locale() + { + std::cout << "testing imbue locale..." << std::endl; + + // weak test case for before/after states since we don't know what characters the + // default locale accepts. + path before("abc"); + + // So that tests are run with known encoding, use Boost UTF-8 codecvt + // \u2722 and \xE2\x9C\xA2 are UTF-16 and UTF-8 FOUR TEARDROP-SPOKED ASTERISK + + std::locale global_loc = std::locale(); + std::locale loc(global_loc, new fs::detail::utf8_codecvt_facet); + std::cout << " imbuing locale ..." << std::endl; + std::locale old_loc = path::imbue(loc); + + std::cout << " testing with the imbued locale ..." << std::endl; + path p2("\xE2\x9C\xA2"); + CHECK(p2.wstring().size() == 1); + CHECK(p2.wstring()[0] == 0x2722); + + std::cout << " imbuing the original locale ..." << std::endl; + path::imbue(old_loc); + + std::cout << " testing with the original locale ..." << std::endl; + path after("abc"); + CHECK(before == after); + + std::cout << " locale testing complete" << std::endl; + } + + // test_codecvt_argument -----------------------------------------------------------// + + void test_codecvt_argument() + { + std::cout << "testing codecvt arguments..." << std::endl; + + const char * c1 = "a1"; + const std::string s1(c1); + const std::wstring ws1(L"b2"); // off-by-one mimics test_codecvt + const std::string s2("y8"); + const std::wstring ws2(L"z9"); + + test_codecvt cvt; // produces off-by-one values that will always differ from + // the system's default locale codecvt facet + + int t = 0; + + // constructors + std::cout << " constructors test " << ++t << std::endl; + path p(c1, cvt); + NATIVE_IS(p, s1, ws1); + + std::cout << " test " << ++t << std::endl; + path p1(s1.begin(), s1.end(), cvt); + NATIVE_IS(p1, s1, ws1); + + std::cout << " test " << ++t << std::endl; + path p2(ws2, cvt); + NATIVE_IS(p2, s2, ws2); + + std::cout << " test " << ++t << std::endl; + path p3(ws2.begin(), ws2.end(), cvt); + NATIVE_IS(p3, s2, ws2); + + // path p2(p1, cvt); // fails to compile, and that is OK + + // assigns + p1.clear(); + std::cout << " assigns test " << ++t << std::endl; + p1.assign(s1,cvt); + NATIVE_IS(p1, s1, ws1); + p1.clear(); + std::cout << " test " << ++t << std::endl; + p1.assign(s1.begin(), s1.end(), cvt); + NATIVE_IS(p1, s1, ws1); + // p1.assign(p, cvt); // fails to compile, and that is OK + + // appends + p1.clear(); + std::cout << " appends test " << ++t << std::endl; + p1.append(s1,cvt); + NATIVE_IS(p1, s1, ws1); + p1.clear(); + std::cout << " test " << ++t << std::endl; + p1.append(s1.begin(), s1.end(), cvt); + NATIVE_IS(p1, s1, ws1); + // p1.append(p, cvt); // fails to compile, and that is OK + + // native observers + std::cout << " native observers test " << ++t << std::endl; + CHECK(p.string(cvt) == s1); + std::cout << " test " << ++t << std::endl; + CHECK(p.string(cvt) == s1); + std::cout << " test " << ++t << std::endl; + CHECK(p.string(cvt) == ws1); + std::cout << " test " << ++t << std::endl; + CHECK(p.wstring(cvt) == ws1); + + // generic observers + std::cout << " generic observers test " << ++t << std::endl; + CHECK(p.generic_string(cvt) == s1); + std::cout << " test " << ++t << std::endl; + CHECK(p.generic_string(cvt) == s1); + std::cout << " test " << ++t << std::endl; + CHECK(p.generic_string(cvt) == ws1); + std::cout << " test " << ++t << std::endl; + CHECK(p.generic_wstring(cvt) == ws1); + + std::cout << " codecvt arguments testing complete" << std::endl; + } + + // test_overloads ------------------------------------------------------------------// + + void test_overloads() + { + std::cout << "testing overloads..." << std::endl; + std::string sto("hello"); + const char a[] = "goodbye"; + path p1(sto); + path p2(sto.c_str()); + path p3(a); + path p4("foo"); + + std::wstring wsto(L"hello"); + const wchar_t wa[] = L"goodbye"; + path wp1(wsto); + path wp2(wsto.c_str()); + path wp3(wa); + path wp4(L"foo"); + } + + // test_error_handling -------------------------------------------------------------// + + class error_codecvt + : public std::codecvt< wchar_t, char, std::mbstate_t > + { + public: + explicit error_codecvt() + : std::codecvt() {} + protected: + + virtual bool do_always_noconv() const throw() { return false; } + virtual int do_encoding() const throw() { return 0; } + + virtual std::codecvt_base::result do_in(std::mbstate_t&, + const char*, const char*, const char*&, + wchar_t*, wchar_t*, wchar_t*&) const + { + static std::codecvt_base::result r = std::codecvt_base::noconv; + if (r == std::codecvt_base::partial) r = std::codecvt_base::error; + else if (r == std::codecvt_base::error) r = std::codecvt_base::noconv; + else r = std::codecvt_base::partial; + return r; + } + + virtual std::codecvt_base::result do_out(std::mbstate_t &, + const wchar_t*, const wchar_t*, const wchar_t*&, + char*, char*, char*&) const + { + static std::codecvt_base::result r = std::codecvt_base::noconv; + if (r == std::codecvt_base::partial) r = std::codecvt_base::error; + else if (r == std::codecvt_base::error) r = std::codecvt_base::noconv; + else r = std::codecvt_base::partial; + return r; + } + + virtual std::codecvt_base::result do_unshift(std::mbstate_t&, + char*, char*, char* &) const { return ok; } + virtual int do_length(std::mbstate_t &, + const char*, const char*, std::size_t) const { return 0; } + virtual int do_max_length() const throw () { return 0; } + }; + + void test_error_handling() + { + std::cout << "testing error handling..." << std::endl; + + std::locale global_loc = std::locale(); + std::locale loc(global_loc, new error_codecvt); + std::cout << " imbuing error locale ..." << std::endl; + std::locale old_loc = path::imbue(loc); + + // These tests rely on a path constructor that fails in the locale conversion. + // Thus construction has to call codecvt. Force that by using a narrow string + // for Windows, and a wide string for POSIX. +# ifdef BOOST_WINDOWS_API +# define STRING_FOO_ "foo" +# else +# define STRING_FOO_ L"foo" +# endif + + { + std::cout << " testing std::codecvt_base::partial error..." << std::endl; + bool exception_thrown (false); + try { path(STRING_FOO_); } + catch (const bs::system_error & ex) + { + exception_thrown = true; + BOOST_TEST_EQ(ex.code(), bs::error_code(std::codecvt_base::partial, + fs::codecvt_error_category())); + } + catch (...) { std::cout << "***** unexpected exception type *****" << std::endl; } + BOOST_TEST(exception_thrown); + } + + { + std::cout << " testing std::codecvt_base::error error..." << std::endl; + bool exception_thrown (false); + try { path(STRING_FOO_); } + catch (const bs::system_error & ex) + { + exception_thrown = true; + BOOST_TEST_EQ(ex.code(), bs::error_code(std::codecvt_base::error, + fs::codecvt_error_category())); + } + catch (...) { std::cout << "***** unexpected exception type *****" << std::endl; } + BOOST_TEST(exception_thrown); + } + + { + std::cout << " testing std::codecvt_base::noconv error..." << std::endl; + bool exception_thrown (false); + try { path(STRING_FOO_); } + catch (const bs::system_error & ex) + { + exception_thrown = true; + BOOST_TEST_EQ(ex.code(), bs::error_code(std::codecvt_base::noconv, + fs::codecvt_error_category())); + } + catch (...) { std::cout << "***** unexpected exception type *****" << std::endl; } + BOOST_TEST(exception_thrown); + } + + std::cout << " restoring original locale ..." << std::endl; + path::imbue(old_loc); + std::cout << " testing error handling complete" << std::endl; + } + +# if 0 + +// // test_locales --------------------------------------------------------------------// +// +// void test_locales() +// { +// std::cout << "testing locales..." << std::endl; +// +// } + + // test_user_supplied_type ---------------------------------------------------------// + + typedef std::basic_string user_string; + +} // unnamed namespace + +namespace boost +{ +namespace filesystem +{ + namespace path_traits + { + template<> struct is_iterator { static const bool value = true; }; + template<> struct is_iterator { static const bool value = true; }; + template<> struct is_iterator { static const bool value = true; }; + template<> struct is_iterator { static const bool value = true; }; + template<> struct is_container { static const bool value = true; }; + + template<> + void append(const user_string::value_type * begin, + const user_string::value_type * end, string_type & target, system::error_code & ec) + { + for (; begin != end && *begin; ++begin) + target += *begin + 1; // change so that results distinguishable from char cvts + } + +# ifdef __GNUC__ + // This specialization shouldn't be needed, and VC++, Intel, and others work + // fine without it. But gcc 4.3.2, and presumably other versions, need it. + template<> + void append(const user_string::value_type * begin, + string_type & target, system::error_code & ec) + { + path_traits::append(begin, + static_cast(0), target, ec); + } +# endif + + template<> + user_string convert(const string_type & source, + system::error_code & ec) + { + user_string temp; + for (string_type::const_iterator it = source.begin(); + it != source.end(); ++it) + temp += *it - 1; + return temp; + } + } // namespace path_traits +} // namespace filesystem +} // namespace boost + +namespace +{ + + void test_user_supplied_type() + { + std::cout << "testing user supplied type..." << std::endl; + + user_string::value_type usr_c_str[] = { 'a', 'b', 'c', 0 }; + user_string usr(usr_c_str); + + path p1(usr.c_str()); + CHECK(p1 == path("bcd")); + CHECK(p1 == "bcd"); + user_string s1(p1.string()); + CHECK(s1 == usr); + } + +# endif + +} // unnamed namespace + +//--------------------------------------------------------------------------------------// +// // +// main // +// // +//--------------------------------------------------------------------------------------// + +int test_main(int, char*[]) +{ +// document state of critical macros +#ifdef BOOST_POSIX_API + cout << "BOOST_POSIX_API" << endl; + BOOST_TEST(path::preferred_separator == '/'); +#endif +#ifdef BOOST_WINDOWS_API + cout << "BOOST_WINDOWS_API" << endl; + BOOST_TEST(path::preferred_separator == '\\'); +#endif + + l.push_back('s'); + l.push_back('t'); + l.push_back('r'); + l.push_back('i'); + l.push_back('n'); + l.push_back('g'); + + wl.push_back(L'w'); + wl.push_back(L's'); + wl.push_back(L't'); + wl.push_back(L'r'); + wl.push_back(L'i'); + wl.push_back(L'n'); + wl.push_back(L'g'); + + v.push_back('f'); + v.push_back('u'); + v.push_back('z'); + + wv.push_back(L'w'); + wv.push_back(L'f'); + wv.push_back(L'u'); + wv.push_back(L'z'); + + test_overloads(); + test_constructors(); + test_assignments(); + test_appends(); + test_concats(); + test_modifiers(); + test_observers(); + test_relationals(); + test_inserter_and_extractor(); + test_other_non_members(); + test_iterators(); + test_decompositions(); + test_queries(); + test_imbue_locale(); + test_codecvt_argument(); + test_error_handling(); + +#if 0 + + test_user_supplied_type(); + +#endif + + std::string foo("\\abc"); + const char* bar = "/abc"; + + if (foo == bar) + cout << "unintended consequence\n"; + + return ::boost::report_errors(); +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/sample_test.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/sample_test.cpp new file mode 100644 index 0000000000..260a5c9568 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/sample_test.cpp @@ -0,0 +1,63 @@ +// filesystem sample_test.cpp ----------------------------------------------// + +// Copyright Beman Dawes 2012 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// --------------------------------------------------------------------------// +// +// This program provides a template for bug reporting test cases. +// +// --------------------------------------------------------------------------// + +#include +#include +#include +#include +#include +#include +#ifndef BOOST_LIGHTWEIGHT_MAIN +# include +#else +# include +#endif + +namespace fs = boost::filesystem; +using fs::path; +using std::cout; +using std::endl; +using std::string; +using std::wstring; + +namespace +{ + bool cleanup = true; +} + +// cpp_main ----------------------------------------------------------------// + +int cpp_main(int argc, char* argv[]) +{ + if (argc > 1 && std::strcmp(argv[1], "--no-cleanup") == 0) + cleanup = false; + + // Test cases go after this block of comments + // Use test case macros from boost/detail/lightweight_test.hpp: + // + // BOOST_TEST(predicate); // test passes if predicate evaluates to true + // BOOST_TEST_EQ(x, y); // test passes if x == y + // BOOST_TEST_NE(x, y); // test passes if x != y + // BOOST_ERROR(msg); // test fails, outputs msg + // Examples: + // BOOST_TEST(path("f00").size() == 3); // test passes + // BOOST_TEST_EQ(path("f00").size(), 3); // test passes + // BOOST_MSG("Oops!"); // test fails, outputs "Oops!" + + if (cleanup) + { + // Remove any test files or directories here + } + + return ::boost::report_errors(); +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/test_codecvt.hpp b/ThirdParty/boost-Subset/libs/filesystem/test/test_codecvt.hpp new file mode 100644 index 0000000000..666805ec18 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/test_codecvt.hpp @@ -0,0 +1,79 @@ +// test_codecvt.hpp ------------------------------------------------------------------// + +// Copyright Beman Dawes 2009, 2010 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#ifndef BOOST_FILESYSTEM3_TEST_CODECVT_HPP +#define BOOST_FILESYSTEM3_TEST_CODECVT_HPP + +#include +#include +#include // for mbstate_t + + //------------------------------------------------------------------------------------// + // // + // class test_codecvt // + // // + // Warning: partial implementation; even do_in and do_out only partially meet the // + // standard library specifications as the "to" buffer must hold the entire result. // + // // + // The value of a wide character is the value of the corresponding narrow character // + // plus 1. This ensures that compares against expected values will fail if the // + // code conversion did not occur as expected. // + // // + //------------------------------------------------------------------------------------// + + class test_codecvt + : public std::codecvt< wchar_t, char, std::mbstate_t > + { + public: + explicit test_codecvt() + : std::codecvt() {} + protected: + + virtual bool do_always_noconv() const throw() { return false; } + + virtual int do_encoding() const throw() { return 0; } + + virtual std::codecvt_base::result do_in(std::mbstate_t&, + const char* from, const char* from_end, const char*& from_next, + wchar_t* to, wchar_t* to_end, wchar_t*& to_next) const + { + for (; from != from_end && to != to_end; ++from, ++to) + *to = wchar_t(*from + 1); + if (to == to_end) + return error; + *to = L'\0'; + from_next = from; + to_next = to; + return ok; + } + + virtual std::codecvt_base::result do_out(std::mbstate_t&, + const wchar_t* from, const wchar_t* from_end, const wchar_t*& from_next, + char* to, char* to_end, char*& to_next) const + { + for (; from != from_end && to != to_end; ++from, ++to) + *to = static_cast(*from - 1); + if (to == to_end) + return error; + *to = '\0'; + from_next = from; + to_next = to; + return ok; + } + + virtual std::codecvt_base::result do_unshift(std::mbstate_t&, + char* /*from*/, char* /*to*/, char* & /*next*/) const { return ok; } + + virtual int do_length(std::mbstate_t&, + const char* /*from*/, const char* /*from_end*/, std::size_t /*max*/) const { return 0; } + + virtual int do_max_length() const throw () { return 0; } + }; + +#endif // BOOST_FILESYSTEM3_TEST_CODECVT_HPP diff --git a/ThirdParty/boost-Subset/libs/filesystem/test/windows_attributes.cpp b/ThirdParty/boost-Subset/libs/filesystem/test/windows_attributes.cpp new file mode 100644 index 0000000000..e1a686ce83 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/test/windows_attributes.cpp @@ -0,0 +1,108 @@ +// windows_attributes ----------------------------------------------------------------// + +// Copyright Beman Dawes 2010 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +//--------------------------------------------------------------------------------------// + +// Useful for debugging status related issues // + +//--------------------------------------------------------------------------------------// + +#include +#include +#include +#include +#include +#include +#include + +using std::make_pair; +namespace fs = boost::filesystem; + +int cpp_main( int argc, char* argv[]) +{ + typedef std::map decode_type; + decode_type table; + + table.insert(make_pair(FILE_ATTRIBUTE_ARCHIVE, "FILE_ATTRIBUTE_ARCHIVE")); + table.insert(make_pair(FILE_ATTRIBUTE_COMPRESSED, "FILE_ATTRIBUTE_COMPRESSED")); + table.insert(make_pair(FILE_ATTRIBUTE_DEVICE, "FILE_ATTRIBUTE_DEVICE")); + table.insert(make_pair(FILE_ATTRIBUTE_DIRECTORY, "FILE_ATTRIBUTE_DIRECTORY")); + table.insert(make_pair(FILE_ATTRIBUTE_ENCRYPTED, "FILE_ATTRIBUTE_ENCRYPTED")); + table.insert(make_pair(FILE_ATTRIBUTE_HIDDEN, "FILE_ATTRIBUTE_HIDDEN")); + table.insert(make_pair(FILE_ATTRIBUTE_NOT_CONTENT_INDEXED, "FILE_ATTRIBUTE_NOT_CONTENT_INDEXED")); + table.insert(make_pair(FILE_ATTRIBUTE_OFFLINE, "FILE_ATTRIBUTE_OFFLINE")); + table.insert(make_pair(FILE_ATTRIBUTE_READONLY, "FILE_ATTRIBUTE_READONLY")); + table.insert(make_pair(FILE_ATTRIBUTE_REPARSE_POINT, "FILE_ATTRIBUTE_REPARSE_POINT")); + table.insert(make_pair(FILE_ATTRIBUTE_SPARSE_FILE, "FILE_ATTRIBUTE_SPARSE_FILE")); + table.insert(make_pair(FILE_ATTRIBUTE_SYSTEM, "FILE_ATTRIBUTE_SYSTEM")); + table.insert(make_pair(FILE_ATTRIBUTE_TEMPORARY, "FILE_ATTRIBUTE_TEMPORARY")); + table.insert(make_pair(FILE_ATTRIBUTE_VIRTUAL, "FILE_ATTRIBUTE_VIRTUAL")); + + if (argc < 2) + { + std::cout << "Usage: windows_attributes path\n"; + return 1; + } + + // report Win32 ::GetFileAttributesA() + + DWORD at(::GetFileAttributesA(argv[1])); + if (at == INVALID_FILE_ATTRIBUTES) + { + std::cout << "GetFileAttributes(\"" << argv[1] + << "\") returned INVALID_FILE_ATTRIBUTES\n"; + return 0; + } + + std::cout << "GetFileAttributes(\"" << argv[1] + << "\") returned "; + + bool bar = false; + for (decode_type::iterator it = table.begin(); it != table.end(); ++it) + { + if (!(it->first & at)) + continue; + if (bar) + std::cout << " | "; + bar = true; + std::cout << it->second; + at &= ~it->first; + } + std::cout << std::endl; + + if (at) + std::cout << "plus unknown attributes " << at << std::endl; + + // report Boost Filesystem file_type + + fs::file_status stat = fs::status(argv[1]); + + const char* types[] = + { + "status_error", + "file_not_found", + "regular_file", + "directory_file", + // the following may not apply to some operating systems or file systems + "symlink_file", + "block_file", + "character_file", + "fifo_file", + "socket_file", + "reparse_file", // Windows: FILE_ATTRIBUTE_REPARSE_POINT that is not a symlink + "type_unknown", // file does exist", but isn't one of the above types or + // we don't have strong enough permission to find its type + + "_detail_directory_symlink" // internal use only; never exposed to users + }; + + std::cout << "boost::filesystem::status().type() is " << types[stat.type()] << std::endl; + + return 0; +} diff --git a/ThirdParty/boost-Subset/libs/filesystem/tools/backup.bat b/ThirdParty/boost-Subset/libs/filesystem/tools/backup.bat new file mode 100644 index 0000000000..d5157baac4 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/tools/backup.bat @@ -0,0 +1,27 @@ +@echo off + +rem Copyright Beman Dawes 2011 +rem Distributed under to the Boost Software License, Version 1.0 +rem See http://www.boost.org/LICENSE_1_0.txt + +if not $%1==$ goto ok +:error +echo Usage: backup target-directory-path +goto done + +:ok +mkdir %1\boost\filesystem 2>nul +mkdir %1\libs\filesystem 2>nul + +set BOOST_CURRENT_ROOT=. +:loop +if exist %BOOST_CURRENT_ROOT%\boost-build.jam goto loopend +set BOOST_CURRENT_ROOT=..\%BOOST_CURRENT_ROOT% +goto loop +:loopend + +xcopy /exclude:exclude.txt /y /d /k /r %BOOST_CURRENT_ROOT%\boost\filesystem.hpp %1\boost +xcopy /exclude:exclude.txt /y /d /k /s /r %BOOST_CURRENT_ROOT%\boost\filesystem %1\boost\filesystem +xcopy /exclude:exclude.txt /y /d /k /s /r %BOOST_CURRENT_ROOT%\libs\filesystem %1\libs\filesystem + +:done diff --git a/ThirdParty/boost-Subset/libs/filesystem/tools/exclude.txt b/ThirdParty/boost-Subset/libs/filesystem/tools/exclude.txt new file mode 100644 index 0000000000..037de66e91 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/tools/exclude.txt @@ -0,0 +1,14 @@ +.svn +.obj +.exe +.log +.user +.filters +.sdf +.ncb +.ipch +ipch +Debug +Release +v3_operations_test +temp_fs_test_dir diff --git a/ThirdParty/boost-Subset/libs/filesystem/tools/publish.bat b/ThirdParty/boost-Subset/libs/filesystem/tools/publish.bat new file mode 100644 index 0000000000..e1ca8a970d --- /dev/null +++ b/ThirdParty/boost-Subset/libs/filesystem/tools/publish.bat @@ -0,0 +1,8 @@ +copy /y c:\boost\modular\develop\libs\filesystem\doc\*.htm? C:\boost\filesystem-gh-pages +pushd C:\boost\filesystem-gh-pages +git commit -a -m "merge from develop" +git push +popd +rem Copyright Beman Dawes, 2015 +rem Distributed under the Boost Software License, Version 1.0. +rem See www.boost.org/LICENSE_1_0.txt \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/system/build/Jamfile.v2 b/ThirdParty/boost-Subset/libs/system/build/Jamfile.v2 new file mode 100644 index 0000000000..f0c6f16b2c --- /dev/null +++ b/ThirdParty/boost-Subset/libs/system/build/Jamfile.v2 @@ -0,0 +1,25 @@ +# Boost System Library Build Jamfile + +# (C) Copyright Beman Dawes 2002, 2006 + +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or www.boost.org/LICENSE_1_0.txt) + +# See library home page at http://www.boost.org/libs/system + +project boost/system + : source-location ../src + : usage-requirements # pass these requirement to dependents (i.e. users) + shared:BOOST_SYSTEM_DYN_LINK=1 + static:BOOST_SYSTEM_STATIC_LINK=1 + ; + +SOURCES = error_code ; + +lib boost_system + : $(SOURCES).cpp + : shared:BOOST_SYSTEM_DYN_LINK=1 + static:BOOST_SYSTEM_STATIC_LINK=1 + ; + +boost-install boost_system ; \ No newline at end of file diff --git a/ThirdParty/boost-Subset/libs/system/src/error_code.cpp b/ThirdParty/boost-Subset/libs/system/src/error_code.cpp new file mode 100644 index 0000000000..aa628ab304 --- /dev/null +++ b/ThirdParty/boost-Subset/libs/system/src/error_code.cpp @@ -0,0 +1,20 @@ +// error_code support implementation file ----------------------------------// + +// Copyright Beman Dawes 2002, 2006 + +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/system + +//----------------------------------------------------------------------------// + +// define BOOST_SYSTEM_SOURCE so that knows +// the library is being built (possibly exporting rather than importing code) +#define BOOST_SYSTEM_SOURCE + +#include + +#ifndef BOOST_ERROR_CODE_HEADER_ONLY +#include +#endif diff --git a/ThirdParty/custom-opm-common/CMakeLists.txt b/ThirdParty/custom-opm-common/CMakeLists.txt deleted file mode 100644 index 07b38d7889..0000000000 --- a/ThirdParty/custom-opm-common/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -cmake_minimum_required (VERSION 2.8) - -project (custom-opm-common) - -include_directories( - ${CMAKE_CURRENT_SOURCE_DIR}/opm-common -) - -#include(opm-common/CMakeLists_files.cmake) - -list (APPEND MAIN_SOURCE_FILES - opm-common/opm/common/data/SimulationDataContainer.cpp - opm-common/opm/common/OpmLog/CounterLog.cpp - opm-common/opm/common/OpmLog/EclipsePRTLog.cpp - opm-common/opm/common/OpmLog/LogBackend.cpp - opm-common/opm/common/OpmLog/Logger.cpp - opm-common/opm/common/OpmLog/LogUtil.cpp - opm-common/opm/common/OpmLog/OpmLog.cpp - opm-common/opm/common/OpmLog/StreamLog.cpp - opm-common/opm/common/OpmLog/TimerLog.cpp -) - -add_library( ${PROJECT_NAME} - STATIC - ${MAIN_SOURCE_FILES} -) - diff --git a/ThirdParty/custom-opm-common/opm-common/.gitignore b/ThirdParty/custom-opm-common/opm-common/.gitignore deleted file mode 100644 index 1e83dcfc71..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/.gitignore +++ /dev/null @@ -1,46 +0,0 @@ -# editor backup files -*~ -.\#* -\#*\# -.\#*\# - -# compiler output -*.o -*.mod - -# libtool compatible files -*.lo -*.la - -# Eclipse project settings -.cproject -.project -.settings/* - -# QtCreator project settings -CMakeLists.txt.user* - -# in-tree build with CMake -CMakeCache.txt -CMakeFiles/ -cmake_install.cmake -config.h -opm-core-config.cmake -opm-core-config-version.cmake -opm-core-install.cmake -Makefile -bin/ -lib/ -Doxyfile -Documentation/html -dune.module -*.pc -install_manifest.txt - -# testing framework -CTestTestfile.cmake -DartConfiguration.tcl -Testing/ - -# Build directory in source. -build/ diff --git a/ThirdParty/custom-opm-common/opm-common/.travis.yml b/ThirdParty/custom-opm-common/opm-common/.travis.yml deleted file mode 100644 index 00e117bf20..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -language: cpp - -compiler: - - gcc - -addons: - apt: - sources: - - boost-latest - - ubuntu-toolchain-r-test - packages: - - libboost1.55-all-dev - - gcc-4.8 - - g++-4.8 - - gfortran-4.8 - - liblapack-dev - - libgmp3-dev - - libsuitesparse-dev - - libeigen3-dev - -before_script: - - export CXX="g++-4.8" CC="gcc-4.8" FC="gfortran-4.8" - - cd .. - - opm-common/travis/build-prereqs.sh - - opm-common/travis/clone-opm.sh opm-common - - -script: opm-common/travis/build-and-test.sh opm-common - - diff --git a/ThirdParty/custom-opm-common/opm-common/CMakeLists.txt b/ThirdParty/custom-opm-common/opm-common/CMakeLists.txt deleted file mode 100644 index 96bb99f51d..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/CMakeLists.txt +++ /dev/null @@ -1,54 +0,0 @@ -cmake_minimum_required (VERSION 2.8) - -option(SIBLING_SEARCH "Search for other modules in sibling directories?" ON) -list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules) -set(OPM_MACROS_ROOT ${PROJECT_SOURCE_DIR}) - -# not the same location as most of the other projects; this hook overrides -macro (dir_hook) -endmacro (dir_hook) - -# We need to define this variable in the installed cmake config file. -set(OPM_PROJECT_EXTRA_CODE_INSTALLED "set(OPM_MACROS_ROOT ${CMAKE_INSTALL_PREFIX}/share/opm) - list(APPEND CMAKE_MODULE_PATH \${OPM_MACROS_ROOT}/cmake/Modules)") - -set(OPM_PROJECT_EXTRA_CODE_INTREE "set(OPM_MACROS_ROOT ${OPM_COMMON_ROOT}) - list(APPEND CMAKE_MODULE_PATH \${OPM_MACROS_ROOT}/cmake/Modules)") - -# project information is in dune.module. Read this file and set variables. -# we cannot generate dune.module since it is read by dunecontrol before -# the build starts, so it makes sense to keep the data there then. -include (OpmInit) - -# list of prerequisites for this particular project; this is in a -# separate file (in cmake/Modules sub-directory) because it is shared -# with the find module -include (${project}-prereqs) - -# read the list of components from this file (in the project directory); -# it should set various lists with the names of the files to include -include (CMakeLists_files.cmake) - -macro (config_hook) -endmacro (config_hook) - -macro (prereqs_hook) -endmacro (prereqs_hook) - -macro (sources_hook) -endmacro (sources_hook) - -macro (fortran_hook) -endmacro (fortran_hook) - -macro (files_hook) -endmacro (files_hook) - -macro (tests_hook) -endmacro (tests_hook) - -# all setup common to the OPM library modules is done here -include (OpmLibMain) - -# Install build system files -install(DIRECTORY cmake DESTINATION share/opm) diff --git a/ThirdParty/custom-opm-common/opm-common/CMakeLists_files.cmake b/ThirdParty/custom-opm-common/opm-common/CMakeLists_files.cmake deleted file mode 100644 index 9448cd5432..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/CMakeLists_files.cmake +++ /dev/null @@ -1,70 +0,0 @@ -# This file sets up five lists: -# MAIN_SOURCE_FILES List of compilation units which will be included in -# the library. If it isn't on this list, it won't be -# part of the library. Please try to keep it sorted to -# maintain sanity. -# -# TEST_SOURCE_FILES List of programs that will be run as unit tests. -# -# TEST_DATA_FILES Files from the source three that should be made -# available in the corresponding location in the build -# tree in order to run tests there. -# -# EXAMPLE_SOURCE_FILES Other programs that will be compiled as part of the -# build, but which is not part of the library nor is -# run as tests. -# -# PUBLIC_HEADER_FILES List of public header files that should be -# distributed together with the library. The source -# files can of course include other files than these; -# you should only add to this list if the *user* of -# the library needs it. - -list (APPEND MAIN_SOURCE_FILES - opm/common/data/SimulationDataContainer.cpp - opm/common/OpmLog/CounterLog.cpp - opm/common/OpmLog/EclipsePRTLog.cpp - opm/common/OpmLog/LogBackend.cpp - opm/common/OpmLog/Logger.cpp - opm/common/OpmLog/LogUtil.cpp - opm/common/OpmLog/OpmLog.cpp - opm/common/OpmLog/StreamLog.cpp - opm/common/OpmLog/TimerLog.cpp -) - -list (APPEND TEST_SOURCE_FILES - tests/test_SimulationDataContainer.cpp - tests/test_cmp.cpp - tests/test_OpmLog.cpp - tests/test_messagelimiter.cpp - ) - -list (APPEND TEST_DATA_FILES - ) - -list (APPEND EXAMPLE_SOURCE_FILES - ) - -# programs listed here will not only be compiled, but also marked for -# installation -list (APPEND PROGRAM_SOURCE_FILES - ) - - -list( APPEND PUBLIC_HEADER_FILES - opm/common/ErrorMacros.hpp - opm/common/Exceptions.hpp - opm/common/data/SimulationDataContainer.hpp - opm/common/OpmLog/CounterLog.hpp - opm/common/OpmLog/EclipsePRTLog.hpp - opm/common/OpmLog/LogBackend.hpp - opm/common/OpmLog/Logger.hpp - opm/common/OpmLog/LogUtil.hpp - opm/common/OpmLog/MessageFormatter.hpp - opm/common/OpmLog/MessageLimiter.hpp - opm/common/OpmLog/OpmLog.hpp - opm/common/OpmLog/StreamLog.hpp - opm/common/OpmLog/TimerLog.hpp - opm/common/util/numeric/cmp.hpp - opm/common/utility/platform_dependent/disable_warnings.h - opm/common/utility/platform_dependent/reenable_warnings.h) diff --git a/ThirdParty/custom-opm-common/opm-common/README.md b/ThirdParty/custom-opm-common/opm-common/README.md deleted file mode 100644 index 275ec393ea..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# opm-common ![alt text](https://travis-ci.org/OPM/opm-common.svg?branch=master "TravisCI Build Status") -Contains common components used throughout all of OPM, -in particular CMake modules for the build system. diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/AddOptions.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/AddOptions.cmake deleted file mode 100644 index 3255d90c49..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/AddOptions.cmake +++ /dev/null @@ -1,102 +0,0 @@ -# - Add options without repeating them on the command line -# -# Synopsis: -# -# add_options (lang build opts) -# -# where: -# -# lang Name of the language whose compiler should receive the -# options, e.g. CXX. If a comma-separated list is received -# then the option is added for all those languages. Use the -# special value ALL_LANGUAGES for these languages: CXX, C -# and Fortran -# -# build Kind of build to which this options should apply, -# such as DEBUG and RELEASE. This can also be a comma- -# separated list. Use the special value ALL_BUILDS to apply -# to all builds. -# -# opts List of options to add. Each should be quoted. -# -# Example: -# -# add_options (CXX RELEASE "-O3" "-DNDEBUG" "-Wall") - -function (add_options langs builds) - # special handling of empty language specification - if ("${langs}" STREQUAL "ALL_LANGUAGES") - set (langs CXX C Fortran) - endif ("${langs}" STREQUAL "ALL_LANGUAGES") - foreach (lang IN LISTS langs) - # prepend underscore if necessary - foreach (build IN LISTS builds) - if (NOT ("${build}" STREQUAL "ALL_BUILDS")) - set (_bld "_${build}") - string (TOUPPER "${_bld}" _bld) - else (NOT ("${build}" STREQUAL "ALL_BUILDS")) - set (_bld "") - endif (NOT ("${build}" STREQUAL "ALL_BUILDS")) - # if we want everything in the "global" flag, then simply - # ignore the build type here and go add everything to that one - if (CMAKE_NOT_USING_CONFIG_FLAGS) - set (_bld "") - endif () - foreach (_opt IN LISTS ARGN) - set (_var "CMAKE_${lang}_FLAGS${_bld}") - #message (STATUS "Adding \"${_opt}\" to \${${_var}}") - # remove it first - string (REPLACE "${_opt}" "" _without "${${_var}}") - string (STRIP "${_without}" _without) - # we need to strip this one as well, so they are comparable - string (STRIP "${${_var}}" _stripped) - # if it wasn't there, then add it at the end - if ("${_without}" STREQUAL "${_stripped}") - # don't add any extra spaces if no options yet are set - if (NOT ${_stripped} STREQUAL "") - set (${_var} "${_stripped} ${_opt}") - else (NOT ${_stripped} STREQUAL "") - set (${_var} "${_opt}") - endif (NOT ${_stripped} STREQUAL "") - set (${_var} "${${_var}}" PARENT_SCOPE) - endif ("${_without}" STREQUAL "${_stripped}") - endforeach (_opt) - endforeach (build) - endforeach (lang) -endfunction (add_options lang build) - -# set varname to flag unless user has specified something that matches regex -function (set_default_option lang varname flag regex) - # lang is either C, CXX or Fortran - if ("${lang}" STREQUAL "Fortran") - set (letter "F") - else () - set (letter "${lang}") - endif () - string (TOUPPER "${CMAKE_BUILD_TYPE}" _build) - if ((NOT ("$ENV{${letter}FLAGS}" MATCHES "${regex}")) - AND (NOT ("${CMAKE_${lang}_FLAGS}" MATCHES "${regex}")) - AND (NOT ("${CMAKE_${lang}_FLAGS_${_build}}" MATCHES "${regex}"))) - set (${varname} ${flag} PARENT_SCOPE) - else () - set (${varname} PARENT_SCOPE) - endif () -endfunction (set_default_option) - -# clear default options as a proxy for not using any default options -# at all. there is one *huge* problem with this: CMake runs the platform -# initialization before executing any line at all in the project and -# there seems to be no way to disable that behaviour, so we cannot really -# distinguish between a platform default and something that the user has -# passed on the command line. the best thing we can do is to all user- -# defined setting if they are something other than the platform default. -macro (no_default_options) - foreach (lang IN ITEMS C CXX Fortran) - foreach (build IN ITEMS DEBUG RELEASE MINSIZEREL RELWITHDEBINFO) - if ("${CMAKE_${lang}_FLAGS_${build}}" STREQUAL "${CMAKE_${lang}_FLAGS_${build}_INIT}") - # for some strange reason we cannot clear this flag, only set it to empty - set (CMAKE_${lang}_FLAGS_${build} "") - endif () - endforeach (build) - endforeach (lang) -endmacro (no_default_options) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/ConfigVars.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/ConfigVars.cmake deleted file mode 100644 index c753169b76..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/ConfigVars.cmake +++ /dev/null @@ -1,110 +0,0 @@ -# - Create config.h based on a list of variables -# -# Synopsis: -# configure_vars (FILE syntax filename verb varlist) -# where -# syntax CXX or CMAKE, depending on target -# filename Full path (including name) of config.h -# verb WRITE or APPEND if truncating or not -# varlist List of variable names that has been defined -# -# In addition, this function will define HAVE_CONFIG_H for the -# following compilations, (only) if the filename is "config.h". -# -# Example: -# list (APPEND FOO_CONFIG_VARS -# "/* bar library */" -# "HAVE_BAR" -# "HAVE_BAR_VERSION_2" -# ) -# configure_vars ( -# FILE CXX ${PROJECT_BINARY_DIR}/config.h -# WRITE ${FOO_CONFIG_VARS} -# ) - -# Copyright (C) 2012 Uni Research AS -# This file is licensed under the GNU General Public License v3.0 - -function (configure_vars obj syntax filename verb) - # this is just to make the syntax look like the build-in commands - if (NOT ("X Y Z ${obj}" STREQUAL "X Y Z FILE" AND - (("${verb}" STREQUAL "WRITE") OR ("${verb}" STREQUAL "APPEND")))) - message (FATAL_ERROR "Syntax error in argument list") - endif () - if (NOT (("${syntax}" STREQUAL "CXX") OR ("${syntax}" STREQUAL "CMAKE"))) - message (FATAL_ERROR "Invalid target syntax \"${syntax}\"") - endif (NOT (("${syntax}" STREQUAL "CXX") OR ("${syntax}" STREQUAL "CMAKE"))) - - # truncate the file if the verb was "WRITE" - if (verb STREQUAL "WRITE") - file (WRITE "${filename}" "") - endif (verb STREQUAL "WRITE") - - # whenever we use this, we also signal to the header files that we - # have "config.h". add this before any other files (known till now) - # to avoid confusion from other configuration files. - get_filename_component (_config_path "${filename}" PATH) - get_filename_component (_config_file "${filename}" NAME) - if ("${_config_file}" MATCHES "config\\.h(\\..+)?") - add_definitions (-DHAVE_CONFIG_H=1) - include_directories (BEFORE "${_config_path}") - endif ("${_config_file}" MATCHES "config\\.h(\\..+)?") - - # only write the current value of each variable once - set (_args ${ARGN}) - if (_args) - list (REMOVE_DUPLICATES _args) - endif (_args) - - # process each variable - set (_prev_verbatim TRUE) - foreach (_var IN LISTS _args) - - # massage the name to remove source code formatting - string (REGEX REPLACE "^[\\n\\t\\ ]+" "" _var "${_var}") - string (REGEX REPLACE "[\\n\\t\\ ]+$" "" _var "${_var}") - - # if the name of a variable has the syntax of a comments, write it - # verbatim to the file; this can be used to create headings - if ("X Y Z ${_var}" MATCHES "^X Y Z /[/*]") - if (NOT _prev_verbatim) - file (APPEND "${filename}" "\n") - endif (NOT _prev_verbatim) - file (APPEND "${filename}" "${_var}\n") - set (_prev_verbatim TRUE) - - else () - - # write a CMake statements that warns if the value has changed - if ("${syntax}" STREQUAL "CMAKE") - set (_db "\${") # to avoid parsing problems - file (APPEND "${filename}" "if (DEFINED ${_var} AND NOT \"${_db}${_var}}\" STREQUAL \"${${_var}}\")\n") - file (APPEND "${filename}" "\tmessage (WARNING \"Incompatible value \\\"${_db}${_var}}\\\" of variable \\\"${_var}\\\"\")\n") - file (APPEND "${filename}" "endif ()\n") - endif () - - # check for empty variable; variables that are explicitly set to false - # is not included in this clause - if ((NOT DEFINED ${_var}) OR ("${${_var}}" STREQUAL "")) - if ("${syntax}" STREQUAL "CMAKE") - file (APPEND "${filename}" "set (${_var})\n") - else ("${syntax}" STREQUAL "CMAKE") - file (APPEND "${filename}" "/* #undef ${_var} */\n") - endif ("${syntax}" STREQUAL "CMAKE") - else ((NOT DEFINED ${_var}) OR ("${${_var}}" STREQUAL "")) - # write to file using the correct syntax - if ("${syntax}" STREQUAL "CMAKE") - # escape backslash and double quote characters - string (REPLACE "\\" "\\\\" _quoted "${${_var}}") - string (REPLACE "\"" "\\\"" _quoted "${_quoted}") - - file (APPEND "${filename}" "set (${_var} \"${_quoted}\")\n") - else ("${syntax}" STREQUAL "CMAKE") - file (APPEND "${filename}" "#define ${_var} ${${_var}}\n") - endif ("${syntax}" STREQUAL "CMAKE") - - endif ((NOT DEFINED ${_var}) OR ("${${_var}}" STREQUAL "")) - set (_prev_verbatim FALSE) - endif () - endforeach(_var) -endfunction (configure_vars obj syntax filename verb) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/DuneCompat.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/DuneCompat.cmake deleted file mode 100644 index fb868177c6..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/DuneCompat.cmake +++ /dev/null @@ -1,47 +0,0 @@ -# - Dunecontrol compatibility -# -# Enables this build to be a part of a dunecontrol chain. The -# DUNE_CHECK_MODULES macro greps the top-level Makefile for the -# presence of the abs_top_srcdir variable (!) and uses that as -# the include directory of a module. Also, the contents are not -# checked so if the variable is not present, it generates an -# invalid command line (-I without argument) which causes the -# autoconf probe to fail. This module patches our Makefile (!!) -# so the necessary string will be there; in itself this string -# has no use for us, it is solemnly to satisfy the M4 scripts. - -if (CMAKE_GENERATOR MATCHES "Unix Makefiles") - # we need an up-to-date, patched Makefile. this is always checked when - # the makefile is run, thus the need for a marker file to keep a - # timestamp to see when it was last patched (by us) - # amazingly, nothing depends on the generated Makefile, so this can be - # run whenever in the build without trigging a compile of e.g. config.h - add_custom_target (dune-compat ALL - COMMAND ${CMAKE_COMMAND} -DCMAKE_HOME_DIRECTORY=${CMAKE_HOME_DIRECTORY} -P ${OPM_MACROS_ROOT}/cmake/Scripts/DuneCompat2.cmake - COMMENT "Patching Makefile to be DUNE compatible" - ) -endif (CMAKE_GENERATOR MATCHES "Unix Makefiles") - -# dunecontrol refuses to use a build tree as module directory unless -# there is a dune.module in it. however, if we are in a sub-dir. of -# the source, we are probably using dunecontrol with a --build-dir -# argument, and won't call dunecontrol from the parent (which is the -# source dir and most likely doesn't contain other projects) anyway, -# i.e. we only copy if we are truly out-of-source -string (LENGTH "${PROJECT_SOURCE_DIR}/" _src_dir_len) -string (LENGTH "${PROJECT_BINARY_DIR}/" _bin_dir_len) -if (_src_dir_len GREATER _bin_dir_len) - set (_not_substring TRUE) -else (_src_dir_len GREATER _bin_dir_len) - string (SUBSTRING "${PROJECT_BINARY_DIR}/" 0 ${_src_dir_len} _proj_prefix) - if ("${PROJECT_SOURCE_DIR}/" STREQUAL "${_proj_prefix}") - set (_not_substring FALSE) - else ("${PROJECT_SOURCE_DIR}/" STREQUAL "${_proj_prefix}") - set (_not_substring TRUE) - endif ("${PROJECT_SOURCE_DIR}/" STREQUAL "${_proj_prefix}") -endif (_src_dir_len GREATER _bin_dir_len) -if (_not_substring) - execute_process (COMMAND - ${CMAKE_COMMAND} -E copy_if_different ${PROJECT_SOURCE_DIR}/dune.module ${PROJECT_BINARY_DIR}/dune.module - ) -endif (_not_substring) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Duplicates.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Duplicates.cmake deleted file mode 100644 index 6b48f35746..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Duplicates.cmake +++ /dev/null @@ -1,38 +0,0 @@ -# - Remove duplicate library declarations -# -# Synopsis: -# -# remove_duplicate_libraries (module) -# -# where -# module Name of the module whose libraries should be pruned - -# Copyright (C) 2013 Uni Research AS -# This file is licensed under the GNU General Public License v3.0 - -# libraries should always be trimmed from the beginning, so that also -# missing functions in those later in the list will be resolved -macro (remove_duplicate_libraries module) - if (DEFINED ${module}_LIBRARIES) - list (REVERSE ${module}_LIBRARIES) - list (REMOVE_DUPLICATES ${module}_LIBRARIES) - list (REVERSE ${module}_LIBRARIES) - endif (DEFINED ${module}_LIBRARIES) -endmacro (remove_duplicate_libraries module) - -# headers can be trimmed from the end, since adding a directory to -# the list is an idempotent action -macro (remove_duplicate_var module suffix) - if (DEFINED ${module}_${suffix}) - list (REMOVE_DUPLICATES ${module}_${suffix}) - endif (DEFINED ${module}_${suffix}) -endmacro (remove_duplicate_var module suffix) - -# fix up both headers and libraries, in case two dependencies have -# included the same second-level library independently -macro (remove_dup_deps module) - remove_duplicate_var (${module} INCLUDE_DIRS) - remove_duplicate_var (${module} LINKER_FLAGS) - remove_duplicate_var (${module} CONFIG_VARS) - remove_duplicate_libraries (${module}) -endmacro (remove_dup_deps module) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindC99.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindC99.cmake deleted file mode 100644 index 1dcbe1e4d1..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindC99.cmake +++ /dev/null @@ -1,25 +0,0 @@ -# - Module that checks for supported C99 features. - -# macro to only add option once -include (AddOptions) - -# try to use compiler flag -std=c99 -set (C_STD99_FLAGS "-std=c99") - -# incidently, the C++ test is so simple that it can be used to compile C as well -include (CheckCCompilerFlag) -check_c_compiler_flag (${C_STD99_FLAGS} HAVE_C99) - -# add option if we are capable -if (HAVE_C99) - add_options (C ALL_BUILDS "${C_STD99_FLAGS}") -else (HAVE_C99) - set (C_STD99_FLAGS) -endif (HAVE_C99) - -# handle quiet and required -include (FindPackageHandleStandardArgs) -find_package_handle_standard_args (C99 - DEFAULT_MSG - C_STD99_FLAGS - ) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindCXX11Features.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindCXX11Features.cmake deleted file mode 100644 index d6b9743392..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindCXX11Features.cmake +++ /dev/null @@ -1,444 +0,0 @@ -# -# Module that checks for supported C++11 (former C++0x) features. -# -# Sets the follwing variable: -# -# HAVE_FINAL True if the compiler supports the "final" quantifier -# HAVE_TYPE_TRAITS True if the header is available and implements sufficient functionality -# HAVE_SHARED_PTR True if std::shared_ptr is available -# HAVE_UNIQUE_PTR True if std::unique_ptr is available -# HAVE_NULLPTR True if nullptr is available -# HAVE_ARRAY True if header and fill() are available -# HAVE_ATTRIBUTE_ALWAYS_INLINE True if attribute always inline is supported -# HAS_ATTRIBUTE_UNUSED True if attribute unused is supported -# HAS_ATTRIBUTE_DEPRECATED True if attribute deprecated is supported -# HAS_ATTRIBUTE_DEPRECATED_MSG True if attribute deprecated("msg") is supported -# HAVE_CONSTEXPR True if constexpr attribute is available -# HAVE_INTEGRAL_CONSTANT True if compiler supports integral_constant -# HAVE_STATIC_ASSERT True if static_assert is available -# HAVE_AUTO True if the compiler supports the auto keyword -# HAVE_VARIADIC_TEMPLATES True if variadic templates are supported -# HAVE_VARIADIC_CONSTRUCTOR_SFINAE True if variadic constructor sfinae is supported -# HAVE_RVALUE_REFERENCES True if rvalue references are supported -# HAVE_TUPLE True if std::tuple is available -# HAVE_TR1_TUPLE True if std::tr1::tuple is available - -include(CheckCXXSourceCompiles) -include(CheckCXXSourceRuns) - -# test for C++11 flags -include(TestCXXAcceptsFlag) -include(CheckIncludeFileCXX) - -# macro to only add option once -include(AddOptions) - -if(NOT MSVC) - # try to use compiler flag -std=c++11 - CHECK_CXX_ACCEPTS_FLAG("-std=c++11" CXX_FLAG_CXX11) - if(CXX_FLAG_CXX11) - add_options (CXX ALL_BUILDS "-std=c++11") - set(CXX_STD0X_FLAGS "-std=c++11") - else() - # try to use compiler flag -std=c++0x for older compilers - CHECK_CXX_ACCEPTS_FLAG("-std=c++0x" CXX_FLAG_CXX0X) - if(CXX_FLAG_CXX0X) - add_options (CXX ALL_BUILDS "-std=c++0x") - set(CXX_STD0X_FLAGS "-std=c++0x") - endif(CXX_FLAG_CXX0X) - endif(CXX_FLAG_CXX11) -endif(NOT MSVC) - -# if we are building with an Apple toolchain in MacOS X, -# we cannot use the old GCC 4.2 fork, but must use the -# new runtime library -set (CXX_STDLIB_FLAGS) -string (TOUPPER "${CMAKE_CXX_COMPILER_ID}" _comp_id) -if (APPLE AND (_comp_id MATCHES "CLANG")) - CHECK_CXX_ACCEPTS_FLAG ("-stdlib=libc++" CXX_FLAG_STDLIB_LIBCXX) - if (CXX_FLAG_STDLIB_LIBCXX) - add_options (CXX ALL_BUILDS "-stdlib=libc++") - set (CXX_STDLIB_FLAGS "-stdlib=libc++") - endif (CXX_FLAG_STDLIB_LIBCXX) -endif (APPLE AND (_comp_id MATCHES "CLANG")) - -# to format the command-line options pretty, we have an optional space -if (CXX_STD0X_FLAGS AND CXX_STDLIB_FLAGS) - set (CXX_SPACE " ") -else (CXX_STD0X_FLAGS AND CXX_STDLIB_FLAGS) - set (CXX_SPACE) -endif (CXX_STD0X_FLAGS AND CXX_STDLIB_FLAGS) - -# perform tests -include(CheckCXXSourceCompiles) - -# the "final" method specifier -CHECK_CXX_SOURCE_COMPILES(" -struct Base { - virtual void foo() = 0; -}; -struct Derived : public Base { - virtual void foo() final {}; -}; - -int main() -{ - return 0; -} -" HAVE_FINAL -) - -# std::is_convertible, std::is_base_of -CHECK_CXX_SOURCE_COMPILES(" -#include - -class Base {}; -class Derived : public Base {}; - -int main() -{ - bool foo = std::is_convertible::value; - bool bar = std::is_base_of::value; - bool foobar = std::is_integral::value; - return 0; -} -" HAVE_TYPE_TRAITS -) - -# nullptr -CHECK_CXX_SOURCE_COMPILES(" - #include - - int main(void) - { - std::shared_ptr foo(new int(123)); - return 0; - } -" HAVE_SHARED_PTR -) - -# this is required by dune-common to avoid linker errors. "fun"! -if (HAVE_SHARED_PTR) - set(HAVE_MAKE_SHARED 1) - set(SHARED_PTR_HEADER "") - set(SHARED_PTR_NAMESPACE "std") -endif() - -# nullptr -CHECK_CXX_SOURCE_COMPILES(" - #include - - int main(void) - { - std::unique_ptr foo(new int(123)); - return 0; - } -" HAVE_UNIQUE_PTR -) - -# nullptr -CHECK_CXX_SOURCE_COMPILES(" - int main(void) - { - char* ch = nullptr; - return 0; - } -" HAVE_NULLPTR -) - -# constexpr -CHECK_CXX_SOURCE_COMPILES(" - template - inline constexpr int foo(T bar) { return bar*2; } - int main(void) - { - constexpr int foobar = foo(100); - return 0; - } -" HAVE_CONSTEXPR -) - -# array and fill -CHECK_CXX_SOURCE_COMPILES(" - #include - - int main(void) - { - std::array a; - a.fill(9); - return 0; - } -" HAVE_ARRAY -) - -# Check whether if std::integral_constant< T, v > is supported and casts into T -CHECK_CXX_SOURCE_COMPILES(" - #include - void f( int ){} - - int main(void){ - f( std::integral_constant< int, 42 >() ); - } -" HAVE_INTEGRAL_CONSTANT -) - -# Check whether if is available -check_include_file_cxx("tuple" HAVE_TUPLE) - -# Check whether if is available -check_include_file_cxx("tr1/tuple" HAVE_TR1_TUPLE) - -# __attribute__((always_inline)) -CHECK_CXX_SOURCE_COMPILES(" - void __attribute__((always_inline)) foo(void) {} - int main(void) - { - foo(); - return 0; - }; -" HAVE_ATTRIBUTE_ALWAYS_INLINE -) - -# __attribute__((unused)) -CHECK_CXX_SOURCE_COMPILES(" - int main(void) - { - int __attribute__((unused)) foo; - return 0; - }; -" HAS_ATTRIBUTE_UNUSED -) - -# __attribute__((deprecated)) -CHECK_CXX_SOURCE_COMPILES(" -#define DEP __attribute__((deprecated)) - class bar - { - bar() DEP; - }; - - class peng { } DEP; - - template - class t_bar - { - t_bar() DEP; - }; - - template - class t_peng { - t_peng() {}; - } DEP; - - void foo() DEP; - - void foo() {}; - - int main(void) - { - return 0; - }; -" HAS_ATTRIBUTE_DEPRECATED -) - -# __attribute__((deprecated("msg"))) -CHECK_CXX_SOURCE_COMPILES(" -#define DEP __attribute__((deprecated(\"message\"))) - class bar { - bar() DEP; - }; - - class peng { } DEP; - - template - class t_bar - { - t_bar() DEP; - }; - - template - class t_peng - { - t_peng() {}; - } DEP; - - void foo() DEP; - - void foo() {}; - - int main(void) - { - return 0; - }; -" HAS_ATTRIBUTE_DEPRECATED_MSG -) - -# static assert -CHECK_CXX_SOURCE_COMPILES(" - int main(void) - { - static_assert(true,\"MSG\"); - return 0; - } -" HAVE_STATIC_ASSERT -) - -# auto keyword -CHECK_CXX_SOURCE_COMPILES(" - int main(void) - { - auto foo = 1.23; - return 0; - } -" HAVE_AUTO -) - -# variadic template support -CHECK_CXX_SOURCE_COMPILES(" - #include - - template - int addints(T... x); - - int add_ints() - { - return 0; - } - - template - int add_ints(T1 t1, T... t) - { - return t1 + add_ints(t...); - } - - int main(void) - { - assert( 5 == add_ints(9,3,-5,-2) ); - return 0; - } -" HAVE_VARIADIC_TEMPLATES -) - -# SFINAE on variadic template constructors within template classes -CHECK_CXX_SOURCE_COMPILES(" - #include - - template - struct A - { - template::type - > - A(T... t) - : i(1) - {} - - template= 2)>::type, - typename = void - > - A(T... t) - : i(-1) - {} - - A() - : i(1) - {} - - int i; - }; - - int main(void) - { - return (A().i + A(2).i + A(\"foo\",3.4).i + A(8,'a',A()).i == 0 ? 0 : 1); - } -" HAVE_VARIADIC_CONSTRUCTOR_SFINAE -) - -# rvalue references -CHECK_CXX_SOURCE_COMPILES(" - #include - #include - int foo(int&& x) { return 1; } - int foo(const int& x) { return -1; } - - template - int forward(T&& x) - { - return foo(std::forward(x)); - } - - int main(void) - { - int i = 0; - assert( forward(i) + forward(int(2)) == 0); - return 0; - } -" HAVE_RVALUE_REFERENCES -) -include(CheckIncludeFile) -include(CheckIncludeFileCXX) -# Search for some tr1 headers -foreach(_HEADER tuple tr1/tuple type_traits tr1/type_traits) - string(REPLACE "/" "_" _HEADER_VAR ${_HEADER}) - string(TOUPPER ${_HEADER_VAR} _HEADER_VAR ) - check_include_file_cxx(${_HEADER} "HAVE_${_HEADER_VAR}") -endforeach(_HEADER tuple tr1/tuple tr1/type_traits) - -# make sure that the C++-11 features implemented by the compiler are a -# superset of those provided by GCC 4.4. This makes the test fail on -# all GCC compilers before 4.4. -set(CXX_FEATURES_MISSING "") -if (NOT HAVE_TYPE_TRAITS) - set(CXX_FEATURES_MISSING - "${CXX_FEATURES_MISSING} - Sufficiently conformant type traits (defined by the 'type_traits' header file)\n") -endif() -if (NOT HAVE_SHARED_PTR) - set(CXX_FEATURES_MISSING - "${CXX_FEATURES_MISSING} - Shared pointers (the std::shared_ptr class)\n") -endif() -if (NOT HAVE_UNIQUE_PTR) - set(CXX_FEATURES_MISSING - "${CXX_FEATURES_MISSING} - Unique pointers (the std::unique_ptr class)\n") -endif() -if (NOT HAVE_ARRAY) - set(CXX_FEATURES_MISSING - "${CXX_FEATURES_MISSING} - Statically sized arrays (the std::array class)\n") -endif() -if (NOT HAVE_STATIC_ASSERT) - set(CXX_FEATURES_MISSING - "${CXX_FEATURES_MISSING} - Static assertations (the static_assert() mechanism)\n") -endif() -if (NOT HAVE_AUTO) - set(CXX_FEATURES_MISSING - "${CXX_FEATURES_MISSING} - Automatically typed variables (the 'auto' keyword)\n") -endif() -if (NOT HAVE_VARIADIC_TEMPLATES) - set(CXX_FEATURES_MISSING - "${CXX_FEATURES_MISSING} - Variable number of template arguments\n") -endif() -if (NOT HAVE_VARIADIC_CONSTRUCTOR_SFINAE) - set(CXX_FEATURES_MISSING - "${CXX_FEATURES_MISSING} - Constructors with variable number of template arguments obeying the SFINAE (specialization failure is not an error) rule\n") -endif() -if (NOT HAVE_RVALUE_REFERENCES) - set(CXX_FEATURES_MISSING - "${CXX_FEATURES_MISSING} - References to rvalue objects\n") -endif() -if (NOT HAVE_TUPLE) - set(CXX_FEATURES_MISSING - "${CXX_FEATURES_MISSING} - Tuples (the std::tuple class)\n") -endif() - -if(CXX_FEATURES_MISSING) - set (CXX11FEATURES_FOUND FALSE) - if (CXX11Features_FIND_REQUIRED) - message(FATAL_ERROR - "Your C++ compiler does not support the minimum set of C++-2011 features required. " - "Make sure to use a compiler which implements all C++-2011 features provided by GCC 4.4. " - "Your compiler does not seem to implement the following features:\n" - "${CXX_FEATURES_MISSING}") - endif() -else () - set (CXX11FEATURES_FOUND TRUE) -endif() diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindCwrap.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindCwrap.cmake deleted file mode 100644 index 7d9adbea03..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindCwrap.cmake +++ /dev/null @@ -1,49 +0,0 @@ -# Find the Python wrappers for module cwrap from ert -# -# Set the cache variable CWRAP_PYTHON_PATH to the install location of the root -# ert package. - -find_package(PythonInterp) -if(PYTHONINTERP_FOUND) - - # We try to find the cwrap Python distribution. This is done by running Python - # code which tries to 'import cwrap' and prints out the path to the module if - # the import succeeds. - # - # The normal Python import machinery is employed, so if you have installed cwrap - # python in a default location, or alternatively set the PYTHONPATH variable the - # cwrap Python distribution will eventually be found there, independently of the - # alternatives which are tested with the ${PATH_LIST} variable. - - if (EXISTS "/etc/debian_version") - set( PYTHON_PACKAGE_PATH "dist-packages") - else() - set( PYTHON_PACKAGE_PATH "site-packages") - endif() - set(PYTHON_INSTALL_PREFIX "lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/${PYTHON_PACKAGE_PATH}" CACHE STRING "Subdirectory to install Python modules in") - - set(PATH_LIST) - if (ERT_ROOT) - list(APPEND PATH_LIST ${ERT_ROOT}) - endif() - list(APPEND PATH_LIST ${CMAKE_PREFIX_PATH}) - - # Add various popular sibling alternatives. - list(APPEND PATH_LIST "${PROJECT_SOURCE_DIR}/../ert/build" - "${PROJECT_BINARY_DIR}/../ert-build") - - foreach( PATH ${PATH_LIST}) - set( python_code "import sys; sys.path.insert(0 , '${PATH}/${PYTHON_INSTALL_PREFIX}'); import os.path; import inspect; import cwrap; print os.path.dirname(os.path.dirname(inspect.getfile(cwrap)))") - execute_process( COMMAND ${PYTHON_EXECUTABLE} -c "${python_code}" - RESULT_VARIABLE import_result - OUTPUT_VARIABLE stdout_output - ERROR_VARIABLE stderr_output - OUTPUT_STRIP_TRAILING_WHITESPACE ) - - if (${import_result} EQUAL 0) - set( CWRAP_PYTHON_PATH ${stdout_output} CACHE PATH "Python path for cwrap" ) - break() - endif() - endforeach() -endif() -find_package_handle_standard_args("Cwrap" DEFAULT_MSG CWRAP_PYTHON_PATH) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindCxaDemangle.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindCxaDemangle.cmake deleted file mode 100644 index cf2d4828ce..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindCxaDemangle.cmake +++ /dev/null @@ -1,23 +0,0 @@ -# Module that checks whether the compiler supports the -# abi::__cxa_demangle function required to -# make the type names returned by typeid() human-readable -# -# Sets the following variable: -# HAVE_CXA_DEMANGLE -# -# perform tests -include(CheckCXXSourceCompiles) - -CHECK_CXX_SOURCE_COMPILES("#include -int main(void){ - int foobar = 0; - const char *foo = typeid(foobar).name(); - int status; - char *demangled = abi::__cxa_demangle( foo, 0, 0, &status ); -}" HAVE_CXA_DEMANGLE) - -include (FindPackageHandleStandardArgs) -# prevent useless message from being displayed -set (FIND_PACKAGE_MESSAGE_DETAILS_CxaDemangle "[1][v()]" - CACHE INTERNAL "Details about finding CxaDemangle") -find_package_handle_standard_args (CxaDemangle DEFAULT_MSG HAVE_CXA_DEMANGLE) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindERT.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindERT.cmake deleted file mode 100644 index 0cca5ef7a8..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindERT.cmake +++ /dev/null @@ -1,268 +0,0 @@ -# - Find the Ensemble-based Reservoir Tool (ERT) -# -# Set the cache variable ERT_ROOT to the install location of the ERT -# libraries and header files. -# -# If found, it sets these variables: -# -# ERT_INCLUDE_DIRS Header file directories -# ERT_LIBRARIES Archives and shared objects -# ERT_CONFIG_VARS Definitions that goes in config.h -# ERT_LINKER_FLAGS Options that must be passed to linker -# -# It will also add to CMAKE_C_FLAGS and CMAKE_CXX_FLAGS if necessary to -# link with the ERT libraries. - -# variables to pass on to other packages -if (FIND_QUIETLY) - set (ERT_QUIET "QUIET") -else (FIND_QUIETLY) - set (ERT_QUIET "") -endif (FIND_QUIETLY) - -# if a directory has been specified by the user, then don't go look -# in the system directories as well -if (ERT_ROOT) - set (_no_default_path "NO_DEFAULT_PATH") -else (ERT_ROOT) - set (_no_default_path "") -endif (ERT_ROOT) - -# ERT doesn't have any config-mode file, so we need to specify the root -# directory in its own variable -find_path (ERT_ECL_INCLUDE_DIR - NAMES "ert/ecl/ecl_util.h" - HINTS "${ERT_ROOT}" - PATHS "${PROJECT_SOURCE_DIR}/../ert" - PATH_SUFFIXES "libecl/include/" "include" - DOC "Path to ERT Eclipse library header files" - ${_no_default_path} - ) -find_path (ERT_ECL_WELL_INCLUDE_DIR - NAMES "ert/ecl_well/well_const.h" - HINTS "${ERT_ROOT}" - PATHS "${PROJECT_SOURCE_DIR}/../ert" - PATH_SUFFIXES "libecl_well/include/" "include" - DOC "Path to ERT Eclipse library header files" - ${_no_default_path} - ) -find_path (ERT_ECLXX_INCLUDE_DIR - NAMES "ert/ecl/EclKW.hpp" - HINTS "${ERT_ROOT}" - PATHS "${PROJECT_SOURCE_DIR}/../ert" - PATH_SUFFIXES "libeclxx/include/" "include" - DOC "Path to ERT Eclipse C++ library header files" - ${_no_default_path} - ) -find_path (ERT_UTIL_INCLUDE_DIR - NAMES "ert/util/stringlist.h" - HINTS "${ERT_ROOT}" - PATHS "${PROJECT_SOURCE_DIR}/../ert" - PATH_SUFFIXES "libert_util/include/" "include" - DOC "Path to ERT Eclipse library header files" - ${_no_default_path} - ) -find_path (ERT_UTILXX_INCLUDE_DIR - NAMES "ert/util/ert_unique_ptr.hpp" - HINTS "${ERT_ROOT}" - PATHS "${PROJECT_SOURCE_DIR}/../ert" - PATH_SUFFIXES "libert_utilxx/include/" "include" - DOC "Path to ERT Eclipse C++ library header files" - ${_no_default_path} - ) -find_path (ERT_GEN_INCLUDE_DIR - NAMES "ert/util/int_vector.h" - HINTS "${ERT_ROOT}" - PATHS "${PROJECT_SOURCE_DIR}/../ert" - PATH_SUFFIXES "libert_util/include" - "include" "build/libert_util/include" "build/libert_util/include" - DOC "Path to ERT generated library header files" - ${_no_default_path} - ) - - -# need all of these libraries -if (CMAKE_SIZEOF_VOID_P) - math (EXPR _BITS "8 * ${CMAKE_SIZEOF_VOID_P}") -endif (CMAKE_SIZEOF_VOID_P) -find_library (ERT_LIBRARY_ECL - NAMES "ecl" - HINTS "${ERT_ROOT}" - PATHS "${PROJECT_BINARY_DIR}/../ert" - "${PROJECT_SOURCE_DIR}/../ert/build" - "${PROJECT_BINARY_DIR}/../ert-build" - PATH_SUFFIXES "lib" "lib/Release" "lib/Debug" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}" - DOC "Path to ERT Eclipse library archive/shared object files" - ${_no_default_path} - ) -find_library (ERT_LIBRARY_ECLXX - NAMES "eclxx" - HINTS "${ERT_ROOT}" - PATHS "${PROJECT_BINARY_DIR}/../ert" - "${PROJECT_SOURCE_DIR}/../ert/build" - "${PROJECT_BINARY_DIR}/../ert-build" - PATH_SUFFIXES "lib" "lib/Release" "lib/Debug" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}" - DOC "Path to ERT Eclipse C++ library archive/shared object files" - ${_no_default_path} - ) -find_library (ERT_LIBRARY_ECL_WELL - NAMES "ecl_well" - HINTS "${ERT_ROOT}" - PATHS "${PROJECT_BINARY_DIR}/../ert" - "${PROJECT_SOURCE_DIR}/../ert/build" - "${PROJECT_BINARY_DIR}/../ert-build" - PATH_SUFFIXES "lib" "lib/Release" "lib/Debug" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}" - DOC "Path to ERT Eclipse library archive/shared object files" - ${_no_default_path} - ) -find_library (ERT_LIBRARY_GEOMETRY - NAMES "ert_geometry" - HINTS "${ERT_ROOT}" - PATHS "${PROJECT_BINARY_DIR}/../ert" - "${PROJECT_SOURCE_DIR}/../ert/build" - "${PROJECT_BINARY_DIR}/../ert-build" - PATH_SUFFIXES "lib" "lib/Release" "lib/Debug" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}" - DOC "Path to ERT Geometry library archive/shared object files" - ${_no_default_path} - ) -find_library (ERT_LIBRARY_UTIL - NAMES "ert_util" - HINTS "${ERT_ROOT}" - PATHS "${PROJECT_BINARY_DIR}/../ert" - "${PROJECT_SOURCE_DIR}/../ert/build" - "${PROJECT_BINARY_DIR}/../ert-build" - PATH_SUFFIXES "lib" "lib/Release" "lib/Debug" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}" - DOC "Path to ERT Utilities library archive/shared object files" - ${_no_default_path} - ) -find_library (ERT_LIBRARY_UTILXX - NAMES "ert_utilxx" - HINTS "${ERT_ROOT}" - PATHS "${PROJECT_BINARY_DIR}/../ert" - "${PROJECT_SOURCE_DIR}/../ert/build" - "${PROJECT_BINARY_DIR}/../ert-build" - PATH_SUFFIXES "lib" "lib/Release" "lib/Debug" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}" - DOC "Path to ERT Utilities library archive/shared object files" - ${_no_default_path} - ) -# the "library" found here is actually a list of several files -list (APPEND ERT_INCLUDE_DIR - ${ERT_ECL_INCLUDE_DIR} - ${ERT_ECL_WELL_INCLUDE_DIR} - ${ERT_ECLXX_INCLUDE_DIR} - ${ERT_UTIL_INCLUDE_DIR} - ${ERT_UTILXX_INCLUDE_DIR} - ${ERT_GEN_INCLUDE_DIR} - ) -list (APPEND ERT_LIBRARY - ${ERT_LIBRARY_ECL} - ${ERT_LIBRARY_ECLXX} - ${ERT_LIBRARY_ECL_WELL} - ${ERT_LIBRARY_GEOMETRY} - ${ERT_LIBRARY_UTIL} - ${ERT_LIBRARY_UTILXX} - ) -list (APPEND ERT_LIBRARIES ${ERT_LIBRARY}) -list (APPEND ERT_INCLUDE_DIRS ${ERT_INCLUDE_DIR}) - -# if we didn't find any files, then don't proceed through the entire dependency list -include (FindPackageHandleStandardArgs) -if (ERT_INCLUDE_DIR MATCHES "-NOTFOUND" OR ERT_LIBRARIES MATCHES "-NOTFOUND") - find_package_handle_standard_args (ERT - DEFAULT_MSG - ERT_INCLUDE_DIR ERT_LIBRARY - ) - # clear the cache so the find probe is attempted again if files becomes - # available (only upon a unsuccessful *compile* should we disable further - # probing) - set (HAVE_ERT) - unset (HAVE_ERT CACHE) - return () -endif (ERT_INCLUDE_DIR MATCHES "-NOTFOUND" OR ERT_LIBRARIES MATCHES "-NOTFOUND") - - -# dependencies - -# parallel programming -include (UseOpenMP) -find_openmp (ERT) - -# compression library -find_package (ZLIB ${ERT_QUIET}) -if (ZLIB_FOUND) - list (APPEND ERT_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS}) - list (APPEND ERT_LIBRARIES ${ZLIB_LIBRARIES}) -endif (ZLIB_FOUND) - -# numerics -find_package (BLAS ${ERT_QUIET}) -if (BLAS_FOUND) - list (APPEND ERT_INCLUDE_DIRS ${BLAS_INCLUDE_DIRS}) - list (APPEND ERT_LIBRARIES ${BLAS_LIBRARIES}) - list (APPEND ERT_LINKER_FLAGS ${BLAS_LINKER_FLAGS}) -endif (BLAS_FOUND) - -find_package (LAPACK ${ERT_QUIET}) -if (LAPACK_FOUND) - list (APPEND ERT_INCLUDE_DIRS ${LAPACK_INCLUDE_DIRS}) - list (APPEND ERT_LIBRARIES ${LAPACK_LIBRARIES}) - list (APPEND ERT_LINKER_FLAGS ${LAPACK_LINKER_FLAGS}) -endif (LAPACK_FOUND) - -# math library (should exist on all unices; automatically linked on Windows) -if (UNIX) - find_library (MATH_LIBRARY - NAMES "m" - ) - list (APPEND ERT_LIBRARIES ${MATH_LIBRARY}) -endif (UNIX) - -# if shared libraries are disabled on linux, explcitly linking to the -# pthreads library is required by ERT -find_package(Threads ${ERT_QUIET}) -if (CMAKE_THREAD_LIBS_INIT) - list (APPEND ERT_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) -endif() - -# Platform specific library where dlopen with friends lives -list (APPEND ERT_LIBRARIES ${CMAKE_DL_LIBS}) - -# since OpenMP often implies pthreads, we need to tidy up -# (last instance of library must be left standing, thus reversing that -# list before removing duplicates) -include (Duplicates) -remove_dup_deps (ERT) - -# see if we can compile a minimum example -# CMake logical test doesn't handle lists (sic) -if (NOT (ERT_INCLUDE_DIR MATCHES "-NOTFOUND" OR ERT_LIBRARIES MATCHES "-NOTFOUND")) - include (CMakePushCheckState) - include (CheckCSourceCompiles) - cmake_push_check_state () - set (CMAKE_REQUIRED_INCLUDES ${ERT_INCLUDE_DIR}) - set (CMAKE_REQUIRED_LIBRARIES ${ERT_LIBRARIES}) - check_cxx_source_compiles ( -"#include -int main ( ) { - ERT::EclKW< int > kw( ecl_kw_alloc( \"SATNUM\", 0, ECL_INT_TYPE ) ); - return 0; -}" HAVE_ERT) - cmake_pop_check_state () -else (NOT (ERT_INCLUDE_DIR MATCHES "-NOTFOUND" OR ERT_LIBRARIES MATCHES "-NOTFOUND")) - # clear the cache so the find probe is attempted again if files becomes - # available (only upon a unsuccessful *compile* should we disable further - # probing) - set (HAVE_ERT) - unset (HAVE_ERT CACHE) -endif (NOT (ERT_INCLUDE_DIR MATCHES "-NOTFOUND" OR ERT_LIBRARIES MATCHES "-NOTFOUND")) - -# if the test program didn't compile, but was required to do so, bail -# out now and display an error; otherwise limp on -find_package_handle_standard_args (ERT - DEFAULT_MSG - ERT_INCLUDE_DIR ERT_LIBRARY HAVE_ERT - ) - - - - diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindERTPython.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindERTPython.cmake deleted file mode 100644 index 7858cb9877..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindERTPython.cmake +++ /dev/null @@ -1,53 +0,0 @@ -# - Find the Python wrappers for Ensemble-based Reservoir Tool (ERT) -# -# Set the cache variable ERT_PYTHON_PATH to the install location of -# the root ert package. - -find_package(PythonInterp) -if(PYTHONINTERP_FOUND) - -# We try to find the ert Python distribution. This is done by running -# Python code which tries to 'import ert' and prints out the path to -# the module if the import succeeds. -# -# The normal Python import machinery is employed, so if you have -# installed ert python in a default location, or alternatively set the -# PYTHONPATH variable the ert Python distribution will eventually be -# found there, independently of the alternatives which are tested with -# the ${PATH_LIST} variable. - - if (EXISTS "/etc/debian_version") - set( PYTHON_PACKAGE_PATH "dist-packages") - else() - set( PYTHON_PACKAGE_PATH "site-packages") - endif() - set(PYTHON_INSTALL_PREFIX "lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/${PYTHON_PACKAGE_PATH}" CACHE STRING "Subdirectory to install Python modules in") - - set(PATH_LIST) - if (ERT_ROOT) - list(APPEND PATH_LIST ${ERT_ROOT}) - endif() - list(APPEND PATH_LIST ${CMAKE_PREFIX_PATH}) - - # Add various popular sibling alternatives. - list(APPEND PATH_LIST "${PROJECT_SOURCE_DIR}/../ert/build" - "${PROJECT_BINARY_DIR}/../ert-build") - - foreach( PATH ${PATH_LIST}) - set( python_code "import sys; sys.path.insert(0 , '${PATH}/${PYTHON_INSTALL_PREFIX}'); import os.path; import inspect; import ert; print os.path.dirname(os.path.dirname(inspect.getfile(ert))); from ert.ecl import EclSum") - execute_process( COMMAND ${PYTHON_EXECUTABLE} -c "${python_code}" - RESULT_VARIABLE import_result - OUTPUT_VARIABLE stdout_output - ERROR_VARIABLE stderr_output - OUTPUT_STRIP_TRAILING_WHITESPACE ) - - if (${import_result} EQUAL 0) - set( ERT_PYTHON_PATH ${stdout_output} CACHE PATH "Python path for ERT Python" ) - break() - endif() - endforeach() -endif() -find_package_handle_standard_args("ERTPython" DEFAULT_MSG ERT_PYTHON_PATH) - - - diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindEigen3.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindEigen3.cmake deleted file mode 100644 index 470bb7a49f..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindEigen3.cmake +++ /dev/null @@ -1,125 +0,0 @@ -# - Try to find Eigen3 lib -# -# This module supports requiring a minimum version, e.g. you can do -# find_package(Eigen3 3.1.2) -# to require version 3.1.2 or newer of Eigen3. -# -# Once done this will define -# -# EIGEN3_FOUND - system has eigen lib with correct version -# EIGEN3_INCLUDE_DIR - the eigen include directory -# EIGEN3_VERSION - eigen version - -# Copyright (c) 2006, 2007 Montel Laurent, -# Copyright (c) 2008, 2009 Gael Guennebaud, -# Copyright (c) 2009 Benoit Jacob -# Redistribution and use is allowed according to the terms of the 2-clause BSD license. - -if(NOT Eigen3_FIND_VERSION) - if(NOT Eigen3_FIND_VERSION_MAJOR) - set(Eigen3_FIND_VERSION_MAJOR 2) - endif(NOT Eigen3_FIND_VERSION_MAJOR) - if(NOT Eigen3_FIND_VERSION_MINOR) - set(Eigen3_FIND_VERSION_MINOR 91) - endif(NOT Eigen3_FIND_VERSION_MINOR) - if(NOT Eigen3_FIND_VERSION_PATCH) - set(Eigen3_FIND_VERSION_PATCH 0) - endif(NOT Eigen3_FIND_VERSION_PATCH) - - set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}") -endif(NOT Eigen3_FIND_VERSION) - -macro(_eigen3_check_version) - file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header) - - string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}") - set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}") - string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}") - set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}") - string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}") - set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}") - - set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION}) - if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION}) - set(EIGEN3_VERSION_OK FALSE) - else(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION}) - set(EIGEN3_VERSION_OK TRUE) - endif(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION}) - - if(NOT EIGEN3_VERSION_OK) - - message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, " - "but at least version ${Eigen3_FIND_VERSION} is required") - endif(NOT EIGEN3_VERSION_OK) -endmacro(_eigen3_check_version) - -# only probe if we haven't a path in our cache -if (NOT EIGEN3_INCLUDE_DIR) - - # allow Eigen3_ROOT to be used in addition to EIGEN3_ROOT - if (Eigen3_ROOT) - set (EIGEN3_ROOT "${Eigen3_ROOT}") - endif (Eigen3_ROOT) - - # if the _ROOT is specified, then look *only* there; don't allow any - # other version to be swapped in to substitute; if not specified, then - # go search usual locations - if (EIGEN3_ROOT) - # if we are given the path to a "build" tree (meaning somewhere Eigen3 - # has been configured), then use the eigen3.pc file to figure out the - # name of the *real* root directory - if (EXISTS "${EIGEN3_ROOT}/CMakeCache.txt") - # get the cache entry that tells use the source tree location - set (_regex "Eigen_SOURCE_DIR:STATIC=\(.*\)") - file (STRINGS - "${EIGEN3_ROOT}/CMakeCache.txt" - EIGEN3_SOURCE_TREE - REGEX "${_regex}" - ) - # trim away the key definition, be left with the value - if (EIGEN3_SOURCE_TREE) - string (REGEX REPLACE - "${_regex}" - "\\1" - EIGEN3_SOURCE_TREE - "${EIGEN3_SOURCE_TREE}" - ) - # if something doesn't look as expected, abort and search in _ROOT - else () - set (EIGEN3_SOURCE_TREE "${EIGEN3_ROOT}") - endif () - else () - set (EIGEN3_SOURCE_TREE "${EIGEN3_ROOT}") - endif () - - find_path (EIGEN3_INCLUDE_DIR - NAMES signature_of_eigen3_matrix_library - PATHS ${EIGEN3_SOURCE_TREE} - PATH_SUFFIXES eigen3 include/eigen3 eigen include/eigen - NO_DEFAULT_PATH - ) - else (EIGEN3_ROOT) - # assume that if there is a sibling directory to our project which - # is called eigen3, there is a newer version located there, or that - # it may have been checked out next to the build directory - find_path(EIGEN3_INCLUDE_DIR - NAMES signature_of_eigen3_matrix_library - HINTS ${CMAKE_SOURCE_DIR}/../ - ${PROJECT_SOURCE_DIR}/../ - ${CMAKE_INSTALL_PREFIX}/include - ${KDE4_INCLUDE_DIR} - PATH_SUFFIXES eigen3 eigen - ) - endif (EIGEN3_ROOT) -endif (NOT EIGEN3_INCLUDE_DIR) - - if(EIGEN3_INCLUDE_DIR) - _eigen3_check_version() - endif(EIGEN3_INCLUDE_DIR) - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(Eigen3 DEFAULT_MSG EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK) - - mark_as_advanced(EIGEN3_INCLUDE_DIR) - - diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindMETIS.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindMETIS.cmake deleted file mode 100644 index b645e3c6e1..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindMETIS.cmake +++ /dev/null @@ -1,49 +0,0 @@ -# -*-cmake-*- -# -# Try to find the libMETIS graph partioning library -# -# Once done, this will define: -# -# METIS_FOUND - system has the libMETIS graph partioning library -# HAVE_METIS - like METIS_FOUND, but for the inclusion in config.h -# METIS_INCLUDE_DIRS - incude paths to use libMETIS -# METIS_LIBRARIES - Link these to use libMETIS - -set(METIS_SEARCH_PATH "/usr" "/usr/local" "/opt" "/opt/local") -set(METIS_NO_DEFAULT_PATH "") -if(METIS_ROOT) - set(METIS_SEARCH_PATH "${METIS_ROOT}") - set(METIS_NO_DEFAULT_PATH "NO_DEFAULT_PATH") -endif() - -# search for files which implements this module -find_path (METIS_INCLUDE_DIRS - NAMES "metis.h" - PATHS ${METIS_SEARCH_PATH} - PATH_SUFFIXES "include" "METISLib" "include/metis" - ${METIS_NO_DEFAULT_PATH}) - -# only search in architecture-relevant directory -if (CMAKE_SIZEOF_VOID_P) - math (EXPR _BITS "8 * ${CMAKE_SIZEOF_VOID_P}") -endif (CMAKE_SIZEOF_VOID_P) - -find_library(METIS_LIBRARIES - NAMES "metis" - PATHS ${METIS_SEARCH_PATH} - PATH_SUFFIXES "lib/.libs" "lib" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}" - ${METIS_NO_DEFAULT_PATH}) - -set (METIS_FOUND FALSE) -if (METIS_INCLUDE_DIRS OR METIS_LIBRARIES) - set(METIS_FOUND TRUE) - set(HAVE_METIS TRUE) -endif() - -# print a message to indicate status of this package -include (FindPackageHandleStandardArgs) -find_package_handle_standard_args(METIS - DEFAULT_MSG - METIS_LIBRARIES - METIS_INCLUDE_DIRS - ) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindPETSc.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindPETSc.cmake deleted file mode 100644 index 6d8a4a3d3f..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindPETSc.cmake +++ /dev/null @@ -1,161 +0,0 @@ -# - Try to find Petsc lib -# -# This module supports requiring a minimum version, e.g. you can do -# find_package(Petsc) -# -# Once done this will define -# -# PETSC_FOUND - system has Petsc lib with correct version -# PETSC_INCLUDE_DIRS - the Petsc include directory -# PETSC_LIBRARIES - the Petsc library. - -# Copyright (c) 2006, 2007 Montel Laurent, -# Copyright (c) 2008, 2009 Gael Guennebaud, -# Copyright (c) 2009 Benoit Jacob -# Redistribution and use is allowed according to the terms of the 2-clause BSD license. - -# find out the size of a pointer. this is required to only search for -# libraries in the directories relevant for the architecture -if (CMAKE_SIZEOF_VOID_P) - math (EXPR _BITS "8 * ${CMAKE_SIZEOF_VOID_P}") -endif (CMAKE_SIZEOF_VOID_P) - -# if PETSC_ROOT is set, then this is the only place searched for petsc headers -# and includes -set(_no_default_path "") -if(PETSC_ROOT) - set (_no_default_path "NO_DEFAULT_PATH") -endif() - -# look for a system-wide BLAS library -set(PETSC_BLAS_LIBRARY "") -find_package(BLAS QUIET) -list(APPEND PETSC_BLAS_LIBRARY "${BLAS_LIBRARIES}") - -# if BLAS wasn't found, look for it in PETSC_ROOT. Won't search if -# PETSC_BLAS_LIBRARY is set. -find_library(PETSC_BLAS_LIBRARY - NAME "blas" - PATH ${PETSC_ROOT} - PATH_SUFFIXES "lib" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}" - ${_no_default_path} - ) - -# print message if there was still no blas found! -if(NOT BLAS_FOUND AND NOT PETSC_BLAS_LIBRARY) - message(STATUS "BLAS not found but required for PETSc") - return() -endif() - -set(PETSC_LAPACK_LIBRARY "") -find_package(LAPACK QUIET) -list(APPEND PETSC_LAPACK_LIBRARY "${LAPACK_LIBRARIES}") - -# if LAPACK wasn't found, look for it in PETSC_ROOT -find_library(PETSC_LAPACK_LIBRARY - NAME "lapack" - PATH ${PETSC_ROOT} - PATH_SUFFIXES "lib" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}" - ${_no_default_path} - ) - -# print message if there was still no blas found! -if(NOT LAPACK_FOUND AND NOT PETSC_LAPACK_LIBRARY) - message(STATUS "LAPACK not found but required for PETSc") - return() -endif() - -find_package(X11 QUIET) -if (X11_FOUND) - list(APPEND PETSC_X11_LIBRARY "${X11_LIBRARIES}") -endif() - -# these variables must exist. Since not finding MPI, both the header and the -# object file , may not be an error, we want the option of concatenating the -# empty variable onto the PETSC_LIBRARIES/INCLUDE_DIRS lists -set(PETSC_MPI_LIBRARY "") -set(PETSC_MPI_INCLUDE_DIRS "") - -find_package(MPI) -if(MPI_FOUND) - list(APPEND PETSC_MPI_LIBRARY "${MPI_LIBRARIES}") - set(PETSC_MPI_INCLUDE_DIRS ${MPI_INCLUDE_PATH}) - -else(MPI_FOUND) -# if a system MPI wasn't found, look for PETSc's serial implementation. This -# won't be available if PETSc was compiled with --with-mpi=0, so not finding -# this won't be an error. This only needs to find the header, as the MPI -# implementation should be already be compiled into PETSc. - message(STATUS "Could not find a system provided MPI. Searching for PETSc provided mpiuni fallback implementation.") - find_path(PETSC_MPI_INCLUDE_DIRS - NAMES "mpi.h" - PATHS ${PETSC_ROOT}/include - PATH_SUFFIXES "mpiuni" - ${_no_default_path} - ) -endif(MPI_FOUND) - -if(NOT PETSC_MPI_INCLUDE_DIRS) - message(WARNING "Could not find any MPI implementation. If PETSc is compiled with --with-mpi=0 this is ok. Otherwise you will get linker errors or (possibly subtle) runtime errors. Continuing.") - if(NOT USE_MPI) - message("To build with MPI support, pass -DUSE_MPI=ON to CMake.") - endif(NOT USE_MPI) -endif(NOT PETSC_MPI_INCLUDE_DIRS) - -# only probe if we haven't a path in our cache -if (Petsc_ROOT) - set (PETSC_ROOT "${Petsc_ROOT}") -endif (Petsc_ROOT) - -find_package(PkgConfig) -if(PKG_CONFIG_FOUND) - set(OLD_PKG $ENV{PKG_CONFIG_PATH}) - set(ENV{PKG_CONFIG_PATH} $ENV{PETSC_DIR}/$ENV{PETSC_ARCH}/lib/pkgconfig) - pkg_check_modules(PETSC PETSc>=3.4.0) - set(ENV{PKG_CONFIG_PATH} ${OLD_PKG}) - set(PETSC_LIBRARIES ${PETSC_STATIC_LDFLAGS}) - set(PETSC_LIBRARY ${PETSC_LIBRARIES}) - set(PETSC_INCLUDE_DIR ${PETSC_INCLUDE_DIRS}) -endif() - -if(NOT PETSC_FOUND) - find_path (PETSC_NORMAL_INCLUDE_DIR - NAMES "petsc.h" - PATHS ${PETSC_ROOT} - PATH_SUFFIXES "include" "petsc" - ${_no_default_path} - ) - - list(APPEND PETSC_INCLUDE_DIR ${PETSC_NORMAL_INCLUDE_DIR}) - - # look for actual Petsc library - find_library(PETSC_LIBRARY - NAMES "petsc-3.4.3" "petsc-3.4.4" "petsc" - PATHS ${PETSC_ROOT} - PATH_SUFFIXES "lib" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}" - ${_no_default_path} - ) -endif() - -if(NOT PETSC_LIBRARY) - message(STATUS "Could not find the PETSc library") - return() -endif() - - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Petsc DEFAULT_MSG PETSC_INCLUDE_DIR PETSC_LIBRARY) -mark_as_advanced(PETSC_INCLUDE_DIR PETSC_LIBRARY) - -# if both headers and library are found, store results -if(PETSC_FOUND) - set(PETSC_INCLUDE_DIRS ${PETSC_INCLUDE_DIR}) - list(APPEND PETSC_INCLUDE_DIRS ${PETSC_MPI_INCLUDE_DIRS}) - - set(PETSC_LIBRARIES ${PETSC_LIBRARY}) - - list(APPEND PETSC_LIBRARIES ${PETSC_BLAS_LIBRARY}) - list(APPEND PETSC_LIBRARIES ${PETSC_LAPACK_LIBRARY}) - list(APPEND PETSC_LIBRARIES ${PETSC_X11_LIBRARY}) - list(APPEND PETSC_LIBRARIES ${PETSC_MPI_LIBRARY}) -endif() diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindPTScotch.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindPTScotch.cmake deleted file mode 100644 index e2f9d03c4a..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindPTScotch.cmake +++ /dev/null @@ -1,80 +0,0 @@ -# Module that checks whether PT-Scotch is available. -# -# Accepts the following variables: -# -# PTSCOTCH_ROOT: Prefix where PT-Scotch is installed. -# PTSCOTCH_SUFFIX: Scotch might be compiled using different -# integer sizes (int32, int32, long). When -# this is is set the headers and libaries -# are search under the suffix -# include/scotch-${PTSCOTCH_SUFFIX, and -# lib/scotch-${PTSCOTCH_SUFFIX}, respectively. -# Sets the following variables: -# PTSCOTCH_INCLUDE_DIRS: All include directories needed to compile PT-Scotch programs. -# PTSCOTCH_LIBRARIES: Alle libraries needed to link PT-Scotch programs. -# PTSCOTCH_FOUND: True if PT-Scotch was found. -# -# Provides the following macros: -# -# find_package(PTScotch) - -find_package(MPI) -macro(_search_pt_lib libvar libname doc) - find_library(${libvar} ${libname} - PATHS ${PTSCOTCH_ROOT} ${PTSCOTCH_ROOT}/lib PATH_SUFFIXES ${PATH_SUFFIXES} - NO_DEFAULT_PATH - DOC "${doc}") - find_library(${libvar} ${libname}) -endmacro(_search_pt_lib) - -if(PTSCOTCH_SUFFIX) - set(PATH_SUFFIXES "scotch-${PTSCOTCH_SUFFIX}") -else(PTSCOTCH_SUFFIX) - set(PATH_SUFFIXES "scotch") -endif(PTSCOTCH_SUFFIX) - -include(CMakePushCheckState) -cmake_push_check_state() # Save variables -set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${MPI_DUNE_INCLUDE_PATH}) -set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${MPI_DUNE_COMPILE_FLAGS}") - -find_path(PTSCOTCH_INCLUDE_DIR ptscotch.h - PATHS ${PTSCOTCH_ROOT} ${PTSCOTCH_ROOT}/include - PATH_SUFFIXES ${PATH_SUFFIXES} - NO_DEFAULT_PATH - DOC "Include directory of PT-Scotch") -find_path(PTSCOTCH_INCLUDE_DIR ptscotch.h - PATH_SUFFIXES ${PATH_SUFFIXES}) - -_search_pt_lib(SCOTCH_LIBRARY scotch "The main Scotch library.") -_search_pt_lib(PTSCOTCH_LIBRARY ptscotch "The main PT-Scotch library.") -_search_pt_lib(PTSCOTCHERR_LIBRARY ptscotcherr "The PT-Scotch error library.") - -# behave like a CMake module is supposed to behave -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args( - "PTScotch" - DEFAULT_MSG - PTSCOTCH_INCLUDE_DIR - SCOTCH_LIBRARY - PTSCOTCH_LIBRARY - PTSCOTCHERR_LIBRARY -) -#restore old values -cmake_pop_check_state() - -if(PTSCOTCH_FOUND) - set(PTSCOTCH_INCLUDE_DIRS ${PTSCOTCH_INCLUDE_DIR}) - set(PTSCOTCH_LIBRARIES ${SCOTCH_LIBRARY} ${PTSCOTCH_LIBRARY} ${PTSCOTCHERR_LIBRARY} ${MPI_DUNE_LIBRARIES} - CACHE FILEPATH "All libraries needed to link programs using PT-Scotch") - set(PTSCOCH_LINK_FLAGS "${DUNE_MPI_LINK_FLAGS}" - CACHE STRING "PT-Scotch link flags") - set(HAVE_PTSCOTCH 1) - # log result - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determing location of PT-Scotch succeded:\n" - "Include directory: ${PTSCOTCH_INCLUDE_DIRS}\n" - "Library directory: ${PTSCOTCH_LIBRARIES}\n\n") -endif(PTSCOTCH_FOUND) - -mark_as_advanced(PTSCOTCH_INCLUDE_DIRS PTSCOTCH_LIBRARIES HAVE_PTSCOTCH) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindParMETIS.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindParMETIS.cmake deleted file mode 100644 index 30afeb6b25..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindParMETIS.cmake +++ /dev/null @@ -1,96 +0,0 @@ -# Module that checks whether ParMETIS or the ParMETIS interface of PT-Scotch -# is available. -# -# Accepts the following variables: -# -# PARMETIS_ROOT: Prefix where ParMETIS is installed. -# PARMETIS_SUFFIX: Scotch might be compiled using different -# integer sizes (int32, int32, long). When -# this is is set the headers and libaries -# are search under the suffix -# include/parmetis-${PARMETIS_SUFFIX}, and -# lib/parmetis-${PARMETIS_SUFFIX}, respectively. -# Sets the following variables: -# PARMETIS_INCLUDE_DIRS: All include directories needed to compile ParMETIS programs. -# PARMETIS_LIBRARIES: Alle libraries needed to link ParMETIS programs. -# PARMETIS_FOUND: True if ParMETIS was found. -# -# Provides the following macros: -# -# find_package(ParMETIS) - -find_package(MPI) - -if(MPI_C_FOUND) -macro(_search_parmetis_lib libvar libname doc) - find_library(${libvar} ${libname} - PATHS ${PARMETIS_ROOT} ${PARMETIS_ROOT}/lib PATH_SUFFIXES ${PATH_SUFFIXES} - NO_DEFAULT_PATH - DOC "${doc}") - find_library(${libvar} ${libname}) -endmacro(_search_parmetis_lib) - -if(PARMETIS_SUFFIX) - set(PATH_SUFFIXES "-${PARMETIS_SUFFIX}") -else(PARMETIS_SUFFIX) - set(PATH_SUFFIXES "") -endif(PARMETIS_SUFFIX) - -include(CMakePushCheckState) -cmake_push_check_state() # Save variables - -find_path(PARMETIS_INCLUDE_DIR parmetis.h - PATHS ${PARMETIS_ROOT} ${PARMETIS_ROOT}/include - PATH_SUFFIXES parmetis${PATH_SUFFIXES} - NO_DEFAULT_PATH - DOC "Include directory of ParMETIS") -find_path(PARMETIS_INCLUDE_DIR parmetis.h - PATH_SUFFIXES parmetis${PATH_SUFFIXES}) - -# find the serial version of METIS -find_package(METIS) -set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${MPI_C_INCLUDE_PATH} ) -if(PARMETIS_INCLUDE_DIR) - set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${PARMETIS_INCLUDE_DIR}) - if(METIS_INCLUDE_DIRS) - set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${METIS_INCLUDE_DIRS}) - endif() -endif() -set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${MPI_C_COMPILE_FLAGS}") - -check_include_file(parmetis.h PARMETIS_FOUND) -_search_parmetis_lib(PARMETIS_LIBRARY parmetis "The main ParMETIS library.") - -# behave like a CMake module is supposed to behave -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args( - "ParMETIS" - DEFAULT_MSG - PARMETIS_INCLUDE_DIR - PARMETIS_LIBRARY - METIS_LIBRARIES - PARMETIS_FOUND - METIS_FOUND -) -#restore old values -cmake_pop_check_state() - -if(PARMETIS_FOUND) - set(PARMETIS_INCLUDE_DIRS ${PARMETIS_INCLUDE_DIR}) - set(PARMETIS_LIBRARIES ${PARMETIS_LIBRARY} ${METIS_LIBRARIES} ${MPI_C_LIBRARIES} - CACHE FILEPATH "All libraries needed to link programs using ParMETIS") - set(PARMETIS_LINK_FLAGS "${DUNE_C_LINK_FLAGS}" - CACHE STRING "ParMETIS link flags") - set(HAVE_PARMETIS 1) - # log result - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining location of ParMETIS succeded:\n" - "Include directory: ${PARMETIS_INCLUDE_DIRS}\n" - "Library directory: ${PARMETIS_LIBRARIES}\n\n") - -endif(PARMETIS_FOUND) - -mark_as_advanced(PARMETIS_INCLUDE_DIRS PARMETIS_LIBRARIES HAVE_PARMETIS) -else(MPI_C_FOUND) - message(WARNING "MPI not found ==> ParMETIS disabled! Plase make sure -DUSE_MPI=ON was set if you need ParMETIS.") -endif(MPI_C_FOUND) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindQuadmath.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindQuadmath.cmake deleted file mode 100644 index 47ba2b5898..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindQuadmath.cmake +++ /dev/null @@ -1,49 +0,0 @@ -# Module that checks whether the compiler supports the -# quadruple precision floating point math -# -# Sets the following variables: -# HAVE_QUAD -# QUADMATH_LIBRARIES -# -# perform tests -include(CheckCSourceCompiles) -include(CheckCXXSourceCompiles) -include(CMakePushCheckState) -include(CheckCXXCompilerFlag) - -if(NOT DEFINED USE_QUADMATH OR USE_QUADMATH) - if(NOT DEFINED HAVE_EXTENDED_NUMERIC_LITERALS) - check_cxx_compiler_flag("-Werror -fext-numeric-literals" HAVE_EXTENDED_NUMERIC_LITERALS) - endif() - - if (HAVE_EXTENDED_NUMERIC_LITERALS) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fext-numeric-literals") - endif() - - cmake_push_check_state(RESET) - list(APPEND CMAKE_REQUIRED_LIBRARIES "quadmath") - CHECK_CXX_SOURCE_COMPILES(" -#include - -int main(void){ - __float128 foo = sqrtq(123.456); - foo = FLT128_MIN; -}" QUADMATH_FOUND) - cmake_pop_check_state() - - if (QUADMATH_FOUND) - set(QUADMATH_LIBRARIES "quadmath") - set(HAVE_QUAD "${QUADMATH_FOUND}") - endif() -endif() - -if (USE_QUADMATH AND NOT QUADMATH_FOUND) - message(FATAL_ERROR "Quadruple precision math support was explicitly requested but is unavailable!") -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Quadmath - DEFAULT_MSG - QUADMATH_LIBRARIES - HAVE_QUAD - ) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindSuiteSparse.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindSuiteSparse.cmake deleted file mode 100644 index 0b77b836cf..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindSuiteSparse.cmake +++ /dev/null @@ -1,294 +0,0 @@ -# - Find Tim Davis' SuiteSparse collection of sparse matrix libraries -# -# Synopsis: -# find_package (SuiteSparse COMPONENTS ) -# -# Components are: -# amd Approximate Minimum Degree ordering -# camd Constrained Approximate Minimum Degree ordering -# colamd COLumn Approximate Minimum Degree ordering -# ccolamd Constrained COLumn Approximate Minimum Degree ordering -# cholmod Supernodal sparse Cholesky factorization and update -# umfpack Unsymmetric MultiFrontal sparse LU factorization -# -# The following variables will be set: -# -# SuiteSparse_FOUND True if all dependencies are satisfied -# SuiteSparse_Xxx_FOUND True if module Xxx is found -# HAVE_SUITESPARSE_Xxx_H Binary value indicating presence of header -# SuiteSparse_INCLUDE_DIRS Paths containing the SuiteSparse header files -# SuiteSparse_LIBRARIES Name of the libraries which must be linked -# SuiteSparse_DEFINITIONS Defines that must be passed to the compiler -# SuiteSparse_LINKER_FLAGS Options that must be passed when linking -# -# The following options can be set to configure the module: -# -# SUITESPARSE_USE_STATIC Link with a static library, even if a -# dynamic library is also present. Note that -# setting this to OFF does not ensure that a -# shared library will be used. -# -# See . - -# Copyright (C) 2012 Uni Research AS -# This file is licensed under the GNU General Public License v3.0 - -function (try_compile_umfpack varname) - include (CMakePushCheckState) - include (CheckCSourceCompiles) - cmake_push_check_state () - set (CMAKE_REQUIRED_INCLUDES ${UMFPACK_INCLUDE_DIRS}) - set (CMAKE_REQUIRED_LIBRARIES ${UMFPACK_LIBRARY} ${ARGN} ${SuiteSparse_EXTRA_LIBS}) - check_c_source_compiles ( - "#include -int main (void) { - void *Symbolic, *Numeric; - double Info[UMFPACK_INFO], Control[UMFPACK_CONTROL]; - umfpack_dl_defaults(Control); - umfpack_dl_symbolic(0, 0, 0, 0, 0, - &Symbolic, Control, Info); - umfpack_dl_numeric (0, 0, 0, - Symbolic, &Numeric, Control, Info); - umfpack_dl_free_symbolic(&Symbolic); - umfpack_dl_solve(UMFPACK_A, 0, 0, 0, 0, 0, - Numeric, Control, Info); - umfpack_dl_free_numeric(&Numeric); - umfpack_timer (); - return 0; -}" ${varname}) - cmake_pop_check_state () - set (${varname} "${${varname}}" PARENT_SCOPE) -endfunction (try_compile_umfpack varname) - -# variables to pass on to other packages -if (FIND_QUIETLY) - set (SuiteSparse_QUIET "QUIET") -else (FIND_QUIETLY) - set (SuiteSparse_QUIET "") -endif (FIND_QUIETLY) - -# we need to link to BLAS and LAPACK -if (NOT BLAS_FOUND) - find_package (BLAS ${SuiteSparse_QUIET} REQUIRED) -endif (NOT BLAS_FOUND) -if (NOT LAPACK_FOUND) - find_package (LAPACK ${SuiteSparse_QUIET} REQUIRED) -endif (NOT LAPACK_FOUND) - -# we also need the math part of the runtime library -find_library (MATH_LIBRARY NAMES "m") -set (SuiteSparse_EXTRA_LIBS ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} ${MATH_LIBRARY}) - -# if we don't get any further clues about where to look, then start -# roaming around the system -set (_no_default_path "") - -# search system directories by default -set (SuiteSparse_SEARCH_PATH) - -# pick up paths from the environment if specified there; these replace the -# pre-defined paths so that we don't accidentially pick up old stuff -if (NOT $ENV{SuiteSparse_DIR} STREQUAL "") - set (SuiteSparse_SEARCH_PATH "$ENV{SuiteSparse_DIR}") -endif (NOT $ENV{SuiteSparse_DIR} STREQUAL "") -if (SuiteSparse_DIR) - set (SuiteSparse_SEARCH_PATH "${SuiteSparse_DIR}") -endif (SuiteSparse_DIR) -# CMake uses _DIR suffix as default for config-mode files; it is unlikely -# that we are building SuiteSparse ourselves; use _ROOT suffix to specify -# location to pre-canned binaries -if (NOT $ENV{SuiteSparse_ROOT} STREQUAL "") - set (SuiteSparse_SEARCH_PATH "$ENV{SuiteSparse_ROOT}") -endif (NOT $ENV{SuiteSparse_ROOT} STREQUAL "") -if (SuiteSparse_ROOT) - set (SuiteSparse_SEARCH_PATH "${SuiteSparse_ROOT}") -endif (SuiteSparse_ROOT) -# most commonly, we use the uppercase version of this variable -if (SUITESPARSE_ROOT) - set (SuiteSparse_SEARCH_PATH "${SUITESPARSE_ROOT}") -endif (SUITESPARSE_ROOT) - -# if we have specified a search path, then confine ourselves to that -if (SuiteSparse_SEARCH_PATH) - set (_no_default_path "NO_DEFAULT_PATH") -endif (SuiteSparse_SEARCH_PATH) - -# transitive closure of dependencies; after this SuiteSparse_MODULES is the -# full list of modules that must be found to satisfy the user's link demands -set (SuiteSparse_MODULES ${SuiteSparse_FIND_COMPONENTS}) -list (FIND SuiteSparse_MODULES "umfpack" UMFPACK_DESIRED) -if (NOT UMFPACK_DESIRED EQUAL -1) - list (APPEND SuiteSparse_MODULES amd cholmod) -endif (NOT UMFPACK_DESIRED EQUAL -1) -list (FIND SuiteSparse_MODULES "cholmod" CHOLMOD_DESIRED) -if (NOT CHOLMOD_DESIRED EQUAL -1) - list (APPEND SuiteSparse_MODULES amd camd colamd) -endif (NOT CHOLMOD_DESIRED EQUAL -1) -if (SuiteSparse_MODULES) - list (REMOVE_DUPLICATES SuiteSparse_MODULES) -endif (SuiteSparse_MODULES) - -# if someone else already have found all the packages for us, then don't do anything -set (SuiteSparse_EVERYTHING_FOUND TRUE) -foreach (module IN LISTS SuiteSparse_MODULES) - string (TOUPPER ${module} MODULE) - if (NOT SuiteSparse_${MODULE}_FOUND) - set (SuiteSparse_EVERYTHING_FOUND FALSE) - break () - endif (NOT SuiteSparse_${MODULE}_FOUND) -endforeach (module) -if (SuiteSparse_EVERYTHING_FOUND) - return () -endif (SuiteSparse_EVERYTHING_FOUND) - -# only search in architecture-relevant directory -if (CMAKE_SIZEOF_VOID_P) - math (EXPR _BITS "8 * ${CMAKE_SIZEOF_VOID_P}") -endif (CMAKE_SIZEOF_VOID_P) - -# if we are told to link SuiteSparse statically, add these parts -# to the name so we always match only that particular type of lib -option (SUITESPARSE_USE_STATIC "Link SuiteSparse statically" OFF) -mark_as_advanced (SUITESPARSE_USE_STATIC) -if (SUITESPARSE_USE_STATIC) - set (_pref_ "${CMAKE_STATIC_LIBRARY_PREFIX}") - set (_suff_ "${CMAKE_STATIC_LIBRARY_SUFFIX}") -else (SUITESPARSE_USE_STATIC) - set (_pref_ "") - set (_suff_ "") -endif (SUITESPARSE_USE_STATIC) - -# if SuiteSparse >= 4.0 we must also link with libsuitesparseconfig -# assume that this is the case if we find the library; otherwise just -# ignore it (older versions don't have a file named like this) -find_library (config_LIBRARY - NAMES "${_pref_}suitesparseconfig${_suff_}" - PATHS ${SuiteSparse_SEARCH_PATH} - PATH_SUFFIXES ".libs" "lib" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "lib/ufsparse" - ${_no_default_path} - ) -if (config_LIBRARY) - list (APPEND SuiteSparse_EXTRA_LIBS ${config_LIBRARY}) - # POSIX.1-2001 REALTIME portion require us to link this library too for - # clock_gettime() which is used by suitesparseconfig - if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") - list (APPEND SuiteSparse_EXTRA_LIBS "-lrt") - endif ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") -endif (config_LIBRARY) - -# search filesystem for each of the module individually -foreach (module IN LISTS SuiteSparse_MODULES) - string (TOUPPER ${module} MODULE) - # search for files which implements this module - find_path (${MODULE}_INCLUDE_DIR - NAMES ${module}.h - PATHS ${SuiteSparse_SEARCH_PATH} - PATH_SUFFIXES "include" "include/suitesparse" "include/ufsparse" "${MODULE}/Include" - ${_no_default_path} - ) - - find_library (${MODULE}_LIBRARY - NAMES "${_pref_}${module}${_suff_}" - PATHS ${SuiteSparse_SEARCH_PATH} - PATH_SUFFIXES "lib/.libs" "lib" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "lib/ufsparse" "${MODULE}/Lib" - ${_no_default_path} - ) - # start out by including the module itself; other dependencies will be added later - set (${MODULE}_INCLUDE_DIRS ${${MODULE}_INCLUDE_DIR}) - set (${MODULE}_LIBRARIES ${${MODULE}_LIBRARY}) -endforeach (module) - -# insert any inter-modular dependencies here -if (CHOLMOD_LIBRARY) - list (APPEND CHOLMOD_LIBRARIES ${AMD_LIBRARIES} ${COLAMD_LIBRARIES}) - # optional libraries; don't insert any -NOT_FOUND paths - if (CAMD_LIBRARY) - list (APPEND CHOLMOD_LIBRARIES ${CAMD_LIBRARIES}) - endif (CAMD_LIBRARY) - if (CCOLAMD_LIBRARY) - list (APPEND CHOLMOD_LIBRARIES ${CCOLAMD_LIBRARIES}) - endif (CCOLAMD_LIBRARY) - list (REVERSE CHOLMOD_LIBRARIES) - # always remove the *first* library from the list - list (REMOVE_DUPLICATES CHOLMOD_LIBRARIES) - list (REVERSE CHOLMOD_LIBRARIES) -endif (CHOLMOD_LIBRARY) -if (UMFPACK_LIBRARY) - set (UMFPACK_EXTRA_LIBS) - # test if umfpack is usable with only amd and not cholmod - try_compile_umfpack (HAVE_UMFPACK_WITHOUT_CHOLMOD ${AMD_LIBRARIES}) - if (HAVE_UMFPACK_WITHOUT_CHOLMOD) - list (APPEND UMFPACK_EXTRA_LIBS ${AMD_LIBRARIES}) - else (HAVE_UMFPACK_WITHOUT_CHOLMOD) - if (CHOLMOD_LIBRARIES) - try_compile_umfpack (HAVE_UMFPACK_WITH_CHOLMOD ${CHOLMOD_LIBRARIES}) - if (HAVE_UMFPACK_WITH_CHOLMOD) - list (APPEND UMFPACK_EXTRA_LIBS ${CHOLMOD_LIBRARIES}) - else (HAVE_UMFPACK_WITH_CHOLMOD) - set (UMFPACK_EXTRA_LIBS "-NOTFOUND") - endif (HAVE_UMFPACK_WITH_CHOLMOD) - else (CHOLMOD_LIBRARIES) - # if we don't have cholmod, then we certainly cannot have umfpack with cholmod - set (UMFPACK_EXTRA_LIBS "-NOTFOUND") - endif (CHOLMOD_LIBRARIES) - endif (HAVE_UMFPACK_WITHOUT_CHOLMOD) - list (APPEND UMFPACK_LIBRARIES ${UMFPACK_EXTRA_LIBS}) - list (REVERSE UMFPACK_LIBRARIES) - list (REMOVE_DUPLICATES UMFPACK_LIBRARIES) - list (REVERSE UMFPACK_LIBRARIES) -endif (UMFPACK_LIBRARY) - -# don't reset these sets; if two packages request SuiteSparse with -# different modules, we want the sets to be merged -#set (SuiteSparse_LIBRARIES "") -#set (SuiteSparse_INCLUDE_DIRS "") - -# determine which modules were found based on whether all dependencies -# were satisfied; create a list of ALL modules (specified) that was found -# (to be included in one swoop in CMakeLists.txt) -set (SuiteSparse_FOUND TRUE) -foreach (module IN LISTS SuiteSparse_FIND_COMPONENTS) - string (TOUPPER ${module} MODULE) - set (SuiteSparse_${MODULE}_FOUND TRUE) - foreach (file IN LISTS ${MODULE}_INCLUDE_DIRS ${MODULE}_LIBRARIES) - if (NOT EXISTS ${file}) - set (SuiteSparse_${MODULE}_FOUND FALSE) - endif (NOT EXISTS ${file}) - endforeach (file) - if (NOT SuiteSparse_${MODULE}_FOUND) - set (SuiteSparse_FOUND FALSE) - # use empty string instead of zero, so it can be tested with #ifdef - # as well as #if in the source code - set (HAVE_SUITESPARSE_${MODULE}_H "" CACHE INT "Is ${module} header present?") - else (NOT SuiteSparse_${MODULE}_FOUND) - set (HAVE_SUITESPARSE_${MODULE}_H 1 CACHE INT "Is ${module} header present?") - list (APPEND SuiteSparse_LIBRARIES "${${MODULE}_LIBRARIES}") - list (APPEND SuiteSparse_LINKER_FLAGS "${${MODULE}_LINKER_FLAGS}") - list (APPEND SuiteSparse_INCLUDE_DIRS "${${MODULE}_INCLUDE_DIRS}") - endif (NOT SuiteSparse_${MODULE}_FOUND) - mark_as_advanced (HAVE_SUITESPARSE_${MODULE}_H) - mark_as_advanced (${MODULE}_INCLUDE_DIR) - mark_as_advanced (${MODULE}_LIBRARY) -endforeach (module) - -if (SuiteSparse_INCLUDE_DIRS) - list (REMOVE_DUPLICATES SuiteSparse_INCLUDE_DIRS) -endif (SuiteSparse_INCLUDE_DIRS) -if (SuiteSparse_LIBRARIES) - list (REVERSE SuiteSparse_LIBRARIES) - list (REMOVE_DUPLICATES SuiteSparse_LIBRARIES) - list (REVERSE SuiteSparse_LIBRARIES) -endif (SuiteSparse_LIBRARIES) - -# print a message to indicate status of this package -include (FindPackageHandleStandardArgs) -find_package_handle_standard_args (SuiteSparse - DEFAULT_MSG - SuiteSparse_LIBRARIES - SuiteSparse_INCLUDE_DIRS - ) - -# add these after checking to not pollute the message output (checking for -# BLAS and LAPACK is REQUIRED so if they are not found, we'll have failed -# already; suitesparseconfig is "optional" anyway) -list (APPEND SuiteSparse_LIBRARIES ${SuiteSparse_EXTRA_LIBS}) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindSuperLU.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindSuperLU.cmake deleted file mode 100644 index 94072ea9bf..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindSuperLU.cmake +++ /dev/null @@ -1,151 +0,0 @@ -# -# Module that checks whether SuperLU is available and usable. -# SuperLU must be a version released after the year 2005. -# -# Variables used by this module which you may want to set: -# SUPERLU_ROOT Path list to search for SuperLU -# -# Sets the follwing variable: -# -# SUPERLU_FOUND True if SuperLU available and usable. -# SUPERLU_MIN_VERSION_4_3 True if SuperLU version >= 4.3. -# SUPERLU_POST_2005_VERSION True if SuperLU is from post-2005 -# SUPERLU_WITH_VERSION Human readable string containing version information. -# SUPERLU_INCLUDE_DIRS Path to the SuperLU include dirs. -# SUPERLU_LIBRARIES Name to the SuperLU library. -# - -include(CheckIncludeFiles) -include(CMakePushCheckState) -include(CheckCSourceCompiles) - -cmake_push_check_state() - -set(SUPERLU_FOUND "FALSE") - -# find out the size of a pointer. this is required to only search for -# libraries in the directories relevant for the architecture -if (CMAKE_SIZEOF_VOID_P) - math (EXPR _BITS "8 * ${CMAKE_SIZEOF_VOID_P}") -endif (CMAKE_SIZEOF_VOID_P) - -# look for files only at the positions given by the user if -# an explicit path is specified -if(SUPERLU_ROOT) - set (_no_default_path "NO_DEFAULT_PATH") -else() - set (_no_default_path "") -endif() - -# look for a system-wide BLAS library -find_package(BLAS QUIET) - -# look for the internal SuperLU blas library (but only if no -# system-wide library was found and a path to the superLU library was -# specified) -set(SUPERLU_BLAS_LIBRARY "") -if (BLAS_FOUND) - list(APPEND SUPERLU_BLAS_LIBRARY "${BLAS_LIBRARIES}") -elseif(SUPERLU_ROOT) - find_library(SUPERLU_BLAS_LIBRARY - NAMES "blas" - PATHS ${SUPERLU_ROOT} - PATH_SUFFIXES "lib" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}" - NO_DEFAULT_PATH) -endif() - -# print message if there was still no blas found! -if(NOT BLAS_FOUND AND NOT SUPERLU_BLAS_LIBRARY) - message(STATUS "BLAS not found but required for SuperLU") - return() -endif() -list(APPEND CMAKE_REQUIRED_LIBRARIES "${SUPERLU_BLAS_LIBRARY}") - -# find the directory containing the SuperLU include files -if (NOT SUPERLU_INCLUDE_DIR) - find_path(SUPERLU_INCLUDE_DIR - NAMES "supermatrix.h" - PATHS ${SUPERLU_ROOT} - PATH_SUFFIXES "superlu" "include/superlu" "include" "SRC" - ${_no_default_path} - ) -endif() -if(NOT SUPERLU_INCLUDE_DIR) - message(STATUS "Directory with the SuperLU include files not found") - return() -endif() -list(APPEND CMAKE_REQUIRED_INCLUDES "${SUPERLU_INCLUDE_DIR}") - -# look for actual SuperLU library -if (NOT SUPERLU_LIBRARY) - find_library(SUPERLU_LIBRARY - NAMES "superlu_4.3" "superlu_4.2" "superlu_4.1" "superlu_4.0" "superlu_3.1" "superlu_3.0" "superlu" - PATHS ${SUPERLU_ROOT} - PATH_SUFFIXES "lib" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}" - ${_no_default_path} - ) -endif() -if(NOT SUPERLU_LIBRARY) - message(STATUS "Directory with the SuperLU library not found") - return() -endif() -list(APPEND CMAKE_REQUIRED_LIBRARIES "${SUPERLU_LIBRARY}") - -# check whether "mem_usage_t.expansions" was found in "slu_ddefs.h" -CHECK_C_SOURCE_COMPILES(" -#include -int main(void) -{ - mem_usage_t mem; - return mem.expansions; -}" -HAVE_MEM_USAGE_T_EXPANSIONS) - -CHECK_C_SOURCE_COMPILES(" -#include -int main(void) -{ - return SLU_DOUBLE; -}" -SUPERLU_MIN_VERSION_4_3) - -# check whether version is at least post-2005 -CHECK_C_SOURCE_COMPILES(" -#include -int main(void) -{ - GlobalLU_t g; - return 0; -}" -SUPERLU_POST_2005_VERSION) -cmake_pop_check_state() - -if(SUPERLU_MIN_VERSION_4_3) - set(SUPERLU_WITH_VERSION "SuperLU >= 4.3" CACHE STRING - "Human readable string containing SuperLU version information.") -else() - set(SUPERLU_WITH_VERSION "SuperLU <= 4.2, post 2005" CACHE STRING - "Human readable string containing SuperLU version information.") -endif() - -# behave like a CMake module is supposed to behave -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args( - "SuperLU" - DEFAULT_MSG - SUPERLU_INCLUDE_DIR - SUPERLU_LIBRARY) - -mark_as_advanced(SUPERLU_INCLUDE_DIR SUPERLU_LIBRARY) - -# if both headers and library are found, store results -if(SUPERLU_FOUND) - set(SUPERLU_INCLUDE_DIRS ${SUPERLU_INCLUDE_DIR}) - set(SUPERLU_LIBRARIES ${SUPERLU_LIBRARY}) - - if (SUPERLU_BLAS_LIBRARY) - list(APPEND SUPERLU_LIBRARIES ${SUPERLU_BLAS_LIBRARY}) - endif() -endif() - -cmake_pop_check_state() diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindTinyXML.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindTinyXML.cmake deleted file mode 100644 index 78bcf37170..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindTinyXML.cmake +++ /dev/null @@ -1,37 +0,0 @@ -# - Find TinyXML library -# -# Defines the following variables: -# TinyXML_INCLUDE_DIRS Directory of header files -# TinyXML_LIBRARIES Directory of shared object files -# TinyXML_DEFINITIONS Defines that must be set to compile - -# Copyright (C) 2012 Uni Research AS -# This code is licensed under The GNU General Public License v3.0 - -# use the generic find routine -include (OpmPackage) -find_opm_package ( - # module name - "TinyXML" - - # dependencies - "" - - # header to search for - "tinyxml.h" - - # library to search for - "tinyxml" - - # defines to be added to compilations - "" - - # test program -"#include -int main (void) { - TiXmlDocument doc; - return 0; -} -" - # config variables - "") diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindUG.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindUG.cmake deleted file mode 100644 index b1f8ea6ae8..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindUG.cmake +++ /dev/null @@ -1,112 +0,0 @@ -# -# This module first tests for UG and then sets the necessary flags -# and config.h defines. If UG is found UG_FOUND will be true. -# - -# this function is required in order not to pollute the global -# namespace with the macros defined in ug-config*.cmake -function(opmFindUg) - if(NOT UG_ROOT) - # check whether UG is in /usr/local - if(EXISTS "/usr/local/include/ug") - set(UG_ROOT "/usr/local") - - # check whether UG is in /usr - elseif(EXISTS "/usr/include/ug") - set(UG_ROOT "/usr") - - # oops - else() - message(STATUS "Could not find UG. It seems to be not installed.") - return() - endif() - endif() - - if(UG_ROOT AND NOT UG_DIR) - # define the directory where the config file resides - if(EXISTS "${UG_ROOT}/lib/cmake/ug/ug-config.cmake") - set(UG_DIR ${UG_ROOT}/lib/cmake/ug) - elseif(EXISTS "${UG_ROOT}/lib64/cmake/ug/ug-config.cmake") - set(UG_DIR ${UG_ROOT}/lib64/cmake/ug) - else() - message(WARNING "Could not find file ug-config.cmake relative to given UG_ROOT") - return() - endif() - endif() - - # include the config mode files kindly provided by UG... - include(${UG_DIR}/ug-config-version.cmake) - include(${UG_DIR}/ug-config.cmake) - - set(UG_FOUND "1") - if(NOT UG_FOR_DUNE STREQUAL "yes") - set(UG_FOUND "0") - message(WARNING "UG was not configured for DUNE. Did pass --enable-dune to its configure?") - return() - endif() - - set(HAVE_UG ${UG_FOUND}) - - # parse version - string(REGEX REPLACE "([0-9]*)\\.[0-9]*\\..*" "\\1" UG_VERSION_MAJOR "${PACKAGE_VERSION}") - string(REGEX REPLACE "[0-9]*\\.([0-9]*)\\..*" "\\1" UG_VERSION_MINOR "${PACKAGE_VERSION}") - string(REGEX REPLACE "[0-9]*\\.[0-9]*\\.([0-9]*).*" "\\1" UG_VERSION_REVISION "${PACKAGE_VERSION}") - - string(REGEX REPLACE ".*-patch([0-9]*)" "\\1" TMP "${PACKAGE_VERSION}") - if(TMP STREQUAL "${PACKAGE_VERSION}") - set(UG_VERSION_PATCHLEVEL "") - else() - set(UG_VERSION_PATCHLEVEL "${TMP}") - endif() - - # Adjust compiler/linker arguments - set(UG_LIBRARY_DIR "${libdir}") - - foreach (UG_RAW_LIB "-lugS2" "-lugS3" "-ldevS") - string(REGEX REPLACE "-l(.*)" "\\1" UG_LIB "${UG_RAW_LIB}") - set(UG_LIB_FILE "${UG_LIBRARY_DIR}/lib${UG_LIB}.a") - if (EXISTS "${UG_LIB_FILE}") - set(UG_LIBS "${UG_LIBS}" ${UG_LIB_FILE}) - else() - set(UG_LIBS "${UG_LIBS}" ${UG_LIB}) - endif() - endforeach() - - set(UG_LIBRARIES "${UG_LIBS}") - - # export all variables which need to be seen globally - set(UG_FOUND "${UG_FOUND}" PARENT_SCOPE) - set(HAVE_UG "${HAVE_UG}" PARENT_SCOPE) - set(UG_INCLUDE_DIRS "${UG_INCLUDES}" PARENT_SCOPE) - set(UG_LIBRARIES "${UG_LIBRARIES}" PARENT_SCOPE) - set(UG_VERSION_MAJOR "${UG_VERSION_MAJOR}" PARENT_SCOPE) - set(UG_VERSION_MINOR "${UG_VERSION_MINOR}" PARENT_SCOPE) - set(UG_VERSION_REVISION "${UG_VERSION_REVISION}" PARENT_SCOPE) - set(UG_VERSION_PATCHLEVEL "${UG_VERSION_PATCHLEVEL}" PARENT_SCOPE) - - set(UG_DEFINITIONS "${UG_COMPILE_FLAGS}" PARENT_SCOPE) -endfunction() - -if (NOT HAVE_UG) - opmFindUg() - - set(HAVE_UG "${HAVE_UG}" CACHE BOOL "UG library is available") - set(UG_INCLUDE_DIRS "${UG_INCLUDE_DIRS}" CACHE STRING "Directory containing the headers of the UG library") - set(UG_LIBRARIES "${UG_LIBRARIES}" CACHE STRING "The libraries which need to be linked to be able to use the UG library") - set(UG_DEFINITIONS "${UG_DEFINITIONS}" CACHE STRING "The compiler flags for the UG library") - set(UG_VERSION_MAJOR "${UG_VERSION_MAJOR}" CACHE INT "Major version of the UG release") - set(UG_VERSION_MINOR "${UG_VERSION_MINOR}" CACHE INT "Minor version of the UG release") - set(UG_VERSION_REVISION "${UG_VERSION_REVISION}" CACHE INT "Revision of the UG release") - set(UG_VERSION_PATCHLEVEL "${UG_VERSION_PATCHLEVEL}" CACHE INT "Patchlevel of the UG release") - - mark_as_advanced(HAVE_UG) - mark_as_advanced(UG_INCLUDE_DIRS) - mark_as_advanced(UG_LIBRARIES) - mark_as_advanced(UG_DEFINITIONS) - mark_as_advanced(UG_VERSION_MAJOR) - mark_as_advanced(UG_VERSION_MINOR) - mark_as_advanced(UG_VERSION_REVISION) - mark_as_advanced(UG_VERSION_PATCHLEVEL) -else() - set(UG_FOUND "0") -endif() diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindValgrind.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindValgrind.cmake deleted file mode 100644 index ae261507a9..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindValgrind.cmake +++ /dev/null @@ -1,25 +0,0 @@ -# Find Valgrind. -# -# This module defines: -# VALGRIND_INCLUDE_DIR, where to find valgrind/memcheck.h, etc. -# VALGRIND_PROGRAM, the valgrind executable. -# VALGRIND_FOUND, If false, do not try to use valgrind. -# -# If you have valgrind installed in a non-standard place, you can define -# VALGRIND_ROOT to tell cmake where it is. -if (VALGRIND_FOUND) - return() -endif() - -find_path(VALGRIND_INCLUDE_DIR valgrind/memcheck.h - /usr/include /usr/local/include ${VALGRIND_ROOT}/include) - -# if VALGRIND_ROOT is empty, we explicitly add /bin to the search -# path, but this does not hurt... -find_program(VALGRIND_PROGRAM NAMES valgrind PATH ${VALGRIND_ROOT}/bin) - -find_package_handle_standard_args(VALGRIND DEFAULT_MSG - VALGRIND_INCLUDE_DIR - VALGRIND_PROGRAM) - -mark_as_advanced(VALGRIND_ROOT VALGRIND_INCLUDE_DIR VALGRIND_PROGRAM) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindZOLTAN.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindZOLTAN.cmake deleted file mode 100644 index 4cf4017b41..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/FindZOLTAN.cmake +++ /dev/null @@ -1,58 +0,0 @@ -# -*-cmake-*- -# -# Try to find the libzoltan graph partioning library -# -# Once done, this will define: -# -# ZOLTAN_FOUND - system has the libzoltan graph partioning library -# HAVE_ZOLTAN - like ZOLTAN_FOUND, but for the inclusion in config.h -# ZOLTAN_INCLUDE_DIR - incude paths to use libzoltan -# ZOLTAN_LIBRARIES - Link these to use libzoltan - -set(ZOLTAN_SEARCH_PATH "/usr" "/usr/local" "/opt" "/opt/local") -set(ZOLTAN_NO_DEFAULT_PATH "") -if(ZOLTAN_ROOT) - set(ZOLTAN_SEARCH_PATH "${ZOLTAN_ROOT}") - set(ZOLTAN_NO_DEFAULT_PATH "NO_DEFAULT_PATH") -endif() - -# Make sure we have checked for the underlying partitioners. -find_package(PTScotch) -#find_package(ParMETIS) - -# search for files which implements this module -find_path (ZOLTAN_INCLUDE_DIRS - NAMES "zoltan.h" - PATHS ${ZOLTAN_SEARCH_PATH} - PATH_SUFFIXES include trilinos - ${ZOLTAN_NO_DEFAULT_PATH}) - -# only search in architecture-relevant directory -if (CMAKE_SIZEOF_VOID_P) - math (EXPR _BITS "8 * ${CMAKE_SIZEOF_VOID_P}") -endif (CMAKE_SIZEOF_VOID_P) - -find_library(ZOLTAN_LIBRARIES - NAMES zoltan trilinos_zoltan - PATHS ${ZOLTAN_SEARCH_PATH} - PATH_SUFFIXES "lib/.libs" "lib" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}" - ${ZOLTAN_NO_DEFAULT_PATH}) - -set (ZOLTAN_FOUND FALSE) -if (ZOLTAN_INCLUDE_DIRS OR ZOLTAN_LIBRARIES) - set(ZOLTAN_FOUND TRUE) - set(HAVE_ZOLTAN 1) - set(ZOLTAN_LIBRARIES ${ZOLTAN_LIBRARIES} ${PARMETIS_LIBRARIES} ${PTSCOTCH_LIBRARIES}) - set(ZOLTAN_INCLUDE_DIRS ${ZOLTAN_INCLUDE_DIRS} ${PARMETIS_INCLUDE_DIRS} - ${PTSCOTCH_INCLUDE_DIRS}) -endif() - -set (ZOLTAN_CONFIG_VAR HAVE_ZOLTAN) - -# print a message to indicate status of this package -include (FindPackageHandleStandardArgs) -find_package_handle_standard_args(ZOLTAN - DEFAULT_MSG - ZOLTAN_LIBRARIES - ZOLTAN_INCLUDE_DIRS - ) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findcjson.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findcjson.cmake deleted file mode 100644 index 5705573916..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findcjson.cmake +++ /dev/null @@ -1,90 +0,0 @@ -# Look for the cjson library; will probably newer be found. -# If found, it sets these variables: -# -# CJSON_INCLUDE_DIRS Header file directories -# CJSON_LIBRARIES Archive/shared objects - -include (FindPackageHandleStandardArgs) - -if ((NOT CJSON_ROOT) AND OPM_PARSER_ROOT) - set( CJSON_ROOT ${OPM_PARSER_ROOT}) -endif() - -if (CJSON_ROOT) - set (_no_default_path "NO_DEFAULT_PATH") -else (CJSON_ROOT) - set (_no_default_path "") -endif (CJSON_ROOT) - - -find_path (CJSON_INCLUDE_DIR - NAMES "cjson/cJSON.h" - HINTS "${CJSON_ROOT}" - PATHS "${PROJECT_SOURCE_DIR}" "${PROJECT_SOURCE_DIR}/../opm-parser" - PATH_SUFFIXES "include" "opm/json" - DOC "Path to cjson library header files" - ${_no_default_path} ) - -# find out the size of a pointer. this is required to only search for -# libraries in the directories relevant for the architecture -if (CMAKE_SIZEOF_VOID_P) - math (EXPR _BITS "8 * ${CMAKE_SIZEOF_VOID_P}") -endif (CMAKE_SIZEOF_VOID_P) - -string(REGEX REPLACE "${PROJECT_SOURCE_DIR}/?(.*)" "\\1" BUILD_DIR_SUFFIX "${PROJECT_BINARY_DIR}") - -find_library (CJSON_LIBRARY - NAMES "cjson" - HINTS "${CJSON_ROOT}" - PATHS "${PROJECT_BINARY_DIR}/../opm-parser" - "${PROJECT_BINARY_DIR}/../opm-parser${BUILD_DIR_SUFFIX}" - "${PROJECT_BINARY_DIR}/../../opm-parser/${BUILD_DIR_SUFFIX}" - PATH_SUFFIXES "lib" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}" - "opm/json" - DOC "Path to cjson library archive/shared object files" - ${_no_default_path} ) - -# setup list of all required libraries to link with cjson -set (CJSON_INCLUDE_DIRS ${CJSON_INCLUDE_DIR}) -set (CJSON_LIBRARIES ${CJSON_LIBRARY}) - -# math library (should exist on all unices; automatically linked on Windows) -if (UNIX) - find_library (MATH_LIBRARY NAMES "m") - list (APPEND CJSON_LIBRARIES ${MATH_LIBRARY}) -endif (UNIX) - -# see if we can compile a minimum example -# CMake logical test doesn't handle lists (sic) -if (NOT (CJSON_INCLUDE_DIRS MATCHES "-NOTFOUND" OR CJSON_LIBRARIES MATCHES "-NOTFOUND")) - include (CMakePushCheckState) - include (CheckCSourceCompiles) - cmake_push_check_state () - set (CMAKE_REQUIRED_INCLUDES ${CJSON_INCLUDE_DIRS}) - set (CMAKE_REQUIRED_LIBRARIES ${CJSON_LIBRARIES}) - - check_c_source_compiles ( -"#include -#include -int main (void) { - cJSON root; - return 0; -}" HAVE_CJSON) - cmake_pop_check_state () -else () - # clear the cache so the find probe is attempted again if files becomes - # available (only upon a unsuccessful *compile* should we disable further - # probing) - set (HAVE_CJSON) - unset (HAVE_CJSON CACHE) -endif () - -# if the test program didn't compile, but was required to do so, bail -# out now and display an error; otherwise limp on -set (CJSON_FIND_REQUIRED ${cjson_FIND_REQUIRED}) -set (CJSON_FIND_QUIETLY ${cjson_FIND_QUIETLY}) -find_package_handle_standard_args (CJSON - DEFAULT_MSG - CJSON_INCLUDE_DIRS CJSON_LIBRARIES HAVE_CJSON - ) -set (cjson_FOUND ${CJSON_FOUND}) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Finddune-alugrid.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Finddune-alugrid.cmake deleted file mode 100644 index bf12247944..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Finddune-alugrid.cmake +++ /dev/null @@ -1,86 +0,0 @@ -# - Find DUNE ALUgrid library -# -# Defines the following variables: -# dune-alugrid_INCLUDE_DIRS Directory of header files -# dune-alugrid_LIBRARIES Directory of shared object files -# dune-alugrid_DEFINITIONS Defines that must be set to compile -# dune-alugrid_CONFIG_VARS List of defines that should be in config.h -# HAVE_DUNE_ALUGRID Binary value to use in config.h - -# Copyright (C) 2013 Uni Research AS -# This code is licensed under The GNU General Public License v3.0 - -include (OpmPackage) -# find dune-alugrid when build with autotools (deprecated in dune 2.4 and removed after dune 3.0 -find_opm_package ( - # module name - "dune-alugrid" - - # dependencies - # TODO: we should probe for all the HAVE_* values listed below; - # however, we don't actually use them in our implementation, so - # we just include them to forward here in case anyone else does - "CXX11Features REQUIRED; - dune-grid REQUIRED; - ZLIB; - ZOLTAN; - METIS - " - # header to search for - "dune/alugrid/grid.hh" - - # library to search for - "dunealugrid;alugrid_parallel;alugrid_serial" - - # defines to be added to compilations - "" - - # test program -"#include -int main (void) { - return 0; -} -" - # config variables - "HAVE_DUNE_ALUGRID - ") - -# find dune-alugrid when build with cmake -find_opm_package ( - # module name - "dune-alugrid" - - # dependencies - # TODO: we should probe for all the HAVE_* values listed below; - # however, we don't actually use them in our implementation, so - # we just include them to forward here in case anyone else does - "CXX11Features REQUIRED; - dune-grid REQUIRED; - ZLIB; - ZOLTAN; - METIS - " - # header to search for - "dune/alugrid/grid.hh" - - # library to search for - "dunealugrid" - - # defines to be added to compilations - "" - - # test program -"#include -int main (void) { - return 0; -} -" - # config variables - "HAVE_DUNE_ALUGRID - ") - -#debug_find_vars ("dune-grid") - -# make version number available in config.h -include (UseDuneVer) -find_dune_version ("dune" "alugrid") diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Finddune-common.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Finddune-common.cmake deleted file mode 100644 index 2b3d147fc2..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Finddune-common.cmake +++ /dev/null @@ -1,83 +0,0 @@ -# - Find DUNE common library -# -# Defines the following variables: -# dune-common_INCLUDE_DIRS Directory of header files -# dune-common_LIBRARIES Directory of shared object files -# dune-common_DEFINITIONS Defines that must be set to compile -# dune-common_CONFIG_VARS List of defines that should be in config.h -# HAVE_DUNE_COMMON Binary value to use in config.h - -# Copyright (C) 2012 Uni Research AS -# This code is licensed under The GNU General Public License v3.0 - -include (OpmPackage) -find_opm_package ( - # module name - "dune-common" - - # dependencies - "CXX11Features REQUIRED; - BLAS REQUIRED; - LAPACK REQUIRED; - CxaDemangle; - MPI - " - # header to search for - "dune/common/fvector.hh" - - # library to search for - "dunecommon" - - # defines to be added to compilations - "DUNE_COMMON_FIELDVECTOR_SIZE_IS_METHOD=1" - - # test program -"#include -#include -int main (void) { - Dune::FieldVector v; - Dune::FieldMatrix m; - m[0][0] = 1.0; - v[0] = 1.0; - Dune::FieldVector w = m*v; - return 0; -} -" - # config variables - "HAS_ATTRIBUTE_UNUSED; - HAS_ATTRIBUTE_DEPRECATED; - HAS_ATTRIBUTE_DEPRECATED_MSG; - HAVE_ARRAY; - HAVE_BOOST_MAKE_SHARED_HPP; - HAVE_BOOST_SHARED_PTR_HPP; - HAVE_DUNE_BOOST; - HAVE_GMP; - HAVE_MAKE_SHARED; - HAVE_MPI; - HAVE_NULLPTR; - HAVE_STATIC_ASSERT; - HAVE_SHARED_PTR; - MPI_2; - SHARED_PTR_HEADER; - SHARED_PTR_NAMESPACE; - HAVE_TYPE_TRAITS; - HAVE_TR1_TUPLE; - HAVE_TUPLE; - HAVE_CXA_DEMANGLE - ") -#debug_find_vars ("dune-common") - -if(MPI_C_FOUND) - # check for MPI version 2 - include(CMakePushCheckState) - include(CheckFunctionExists) - cmake_push_check_state() - set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES};${MPI_C_LIBRARIES}) - set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES};${MPI_C_INCLUDES}) - check_function_exists(MPI_Finalized MPI_2) - cmake_pop_check_state() -endif(MPI_C_FOUND) - -# make version number available in config.h -include (UseDuneVer) -find_dune_version ("dune" "common") diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Finddune-fem.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Finddune-fem.cmake deleted file mode 100644 index 42eda51eac..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Finddune-fem.cmake +++ /dev/null @@ -1,57 +0,0 @@ -# - Find DUNE Fem library -# -# Defines the following variables: -# dune-alugrid_INCLUDE_DIRS Directory of header files -# dune-alugrid_LIBRARIES Directory of shared object files -# dune-alugrid_DEFINITIONS Defines that must be set to compile -# dune-alugrid_CONFIG_VARS List of defines that should be in config.h -# HAVE_DUNE_FEM Binary value to use in config.h - -# Copyright (C) 2015 IRIS AS -# This code is licensed under The GNU General Public License v3.0 - -include (OpmPackage) -find_opm_package ( - # module name - "dune-fem" - - # dependencies - # TODO: we should probe for all the HAVE_* values listed below; - # however, we don't actually use them in our implementation, so - # we just include them to forward here in case anyone else does - "CXX11Features REQUIRED; - dune-common REQUIRED; - dune-grid REQUIRED; - dune-alugrid; - ZLIB; - ZOLTAN; - METIS - " - # header to search for - "dune/fem/space/shapefunctionset/legendre.hh" - - # library to search for - "dunefem" - - # defines to be added to compilations - "" - - # test program -"#include -int main (void) { - //Dune::Fem::LegendrePolynomials::weight(); - return 0; -} -" - # config variables - "HAVE_DUNE_FEM; - HAVE_METIS; - HAVE_ZLIB; - HAVE_ZOLTAN - ") - -#debug_find_vars ("dune-grid") - -# make version number available in config.h -include (UseDuneVer) -find_dune_version ("dune" "fem") diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Finddune-geometry.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Finddune-geometry.cmake deleted file mode 100644 index 9ef1f98099..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Finddune-geometry.cmake +++ /dev/null @@ -1,51 +0,0 @@ -# - Find DUNE geometry library -# -# Defines the following variables: -# dune-geometry_INCLUDE_DIRS Directory of header files -# dune-geometry_LIBRARIES Directory of shared object files -# dune-geometry_DEFINITIONS Defines that must be set to compile -# dune-geometry_CONFIG_VARS List of defines that should be in config.h -# HAVE_DUNE_GEOMETRY Binary value to use in config.h - -# Copyright (C) 2013 Uni Research AS -# This code is licensed under The GNU General Public License v3.0 - -include (OpmPackage) -find_opm_package ( - # module name - "dune-geometry" - - # dependencies - # TODO: we should probe for all the HAVE_* values listed below; - # however, we don't actually use them in our implementation, so - # we just include them to forward here in case anyone else does - "CXX11Features REQUIRED; - dune-common REQUIRED - " - # header to search for - "dune/geometry/quadraturerules.hh" - - # library to search for - "dunegeometry" - - # defines to be added to compilations - "" - - # test program -"#include -int main (void) { - Dune::GeometryType gt; - gt.makeQuadrilateral(); - Dune::QuadratureRules::rule(gt, 2).size(); - return 0; -} -" - # config variables - "HAVE_ALGLIB - ") - -#debug_find_vars ("dune-geometry") - -# make version number available in config.h -include (UseDuneVer) -find_dune_version ("dune" "geometry") diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Finddune-grid.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Finddune-grid.cmake deleted file mode 100644 index d79feb9b29..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Finddune-grid.cmake +++ /dev/null @@ -1,64 +0,0 @@ -# - Find DUNE grid library -# -# Defines the following variables: -# dune-grid_INCLUDE_DIRS Directory of header files -# dune-grid_LIBRARIES Directory of shared object files -# dune-grid_DEFINITIONS Defines that must be set to compile -# dune-grid_CONFIG_VARS List of defines that should be in config.h -# HAVE_DUNE_GRID Binary value to use in config.h - -# Copyright (C) 2013 Uni Research AS -# This code is licensed under The GNU General Public License v3.0 - -include (OpmPackage) - -set(DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS 1) - -find_opm_package ( - # module name - "dune-grid" - - # dependencies - # TODO: we should probe for all the HAVE_* values listed below; - # however, we don't actually use them in our implementation, so - # we just include them to forward here in case anyone else does - "CXX11Features REQUIRED; - dune-common REQUIRED; - dune-geometry REQUIRED; - MPI; - UG - " - # header to search for - "dune/grid/onedgrid.hh" - - # library to search for - "dunegrid" - - # defines to be added to compilations - "" - - # test program -"#include -int main (void) { - Dune::OneDGrid grid(1, 0., 1.); - return grid.lbegin<0>(0) == grid.lend<0>(0); -} -" - # config variables - "HAVE_MPI; - HAVE_UG; - HAVE_DUNE_FEM; - HAVE_GRIDTYPE; - HAVE_GRAPE; - HAVE_PSURFACE; - HAVE_AMIRAMESH; - HAVE_ALBERTA; - HAVE_STDINT_H; - DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS - ") - -#debug_find_vars ("dune-grid") - -# make version number available in config.h -include (UseDuneVer) -find_dune_version ("dune" "grid") diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Finddune-istl.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Finddune-istl.cmake deleted file mode 100644 index 9927e6fb16..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Finddune-istl.cmake +++ /dev/null @@ -1,62 +0,0 @@ -# - Find DUNE ISTL library -# -# Defines the following variables: -# dune-istl_INCLUDE_DIRS Directory of header files -# dune-istl_LIBRARIES Directory of shared object files -# dune-istl_DEFINITIONS Defines that must be set to compile -# dune-istl_CONFIG_VARS List of defines that should be in config.h -# HAVE_DUNE_ISTL Binary value to use in config.h - -# Copyright (C) 2012 Uni Research AS -# This code is licensed under The GNU General Public License v3.0 - -include (OpmPackage) -find_opm_package ( - # module name - "dune-istl" - - # required dependencies - "dune-common REQUIRED; - ParMETIS; - SuperLU; - SuiteSparse COMPONENTS umfpack - " - # header to search for - "dune/istl/bcrsmatrix.hh" - - # library to search for - "" - - # defines to be added to compilations - "" - - # test program -"#include -#include -#include - -int main (void) { - typedef Dune::BCRSMatrix > Matrix; - Matrix matrix( 3, 3, Matrix::random ); - for (int i = 0; i < 3; ++i) matrix.setrowsize(i, 2); - matrix.endrowsizes(); - return 0; -} -" - # config variables - "HAVE_BOOST_FUSION; - HAVE_MEM_USAGE_T_EXPANSIONS; - HAVE_PARDISO; - HAVE_BOOST; - HAVE_MPI; - HAVE_PARMETIS; - HAVE_SUPERLU; - HAVE_UMFPACK; - SUPERLU_MIN_VERSION_4_3; - SUPERLU_POST_2005_VERSION - ") -#debug_find_vars ("dune-istl") - -# make version number available in config.h -include (UseDuneVer) -find_dune_version ("dune" "istl") diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Finddune-localfunctions.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Finddune-localfunctions.cmake deleted file mode 100644 index 38bcf805e7..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Finddune-localfunctions.cmake +++ /dev/null @@ -1,42 +0,0 @@ -# - Find DUNE localfunctions library -# -# Defines the following variables: -# dune-localfunctions_INCLUDE_DIRS Directory of header files -# dune-localfunctions_LIBRARIES Directory of shared object files -# dune-localfunctions_DEFINITIONS Defines that must be set to compile -# dune-localfunctions_CONFIG_VARS List of defines that should be in config.h -# HAVE_DUNE_LOCALFUNCTIONS Binary value to use in config.h - -# Copyright (C) 2012 Uni Research AS -# This code is licensed under The GNU General Public License v3.0 - -include (OpmPackage) -find_opm_package ( - # module name - "dune-localfunctions" - - # required dependencies - "dune-common REQUIRED" - # header to search for - "dune/localfunctions/common/localbasis.hh" - - # library to search for - "" - - # defines to be added to compilations - "" - - # test program -"#include - -int main (void) { - return 0; -} -" - # config variables - "") -#debug_find_vars ("dune-localfunctions") - -# make version number available in config.h -include (UseDuneVer) -find_dune_version ("dune" "localfunctions") diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findewoms.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findewoms.cmake deleted file mode 100644 index 3f90da0c78..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findewoms.cmake +++ /dev/null @@ -1,42 +0,0 @@ -# - Find OPM eWoms module -# -# Defines the following variables: -# ewoms_INCLUDE_DIRS Directory of header files -# ewoms_LIBRARIES Directory of shared object files -# ewoms_DEFINITIONS Defines that must be set to compile -# ewoms_CONFIG_VARS List of defines that should be in config.h -# HAVE_EWOMS Binary value to use in config.h - -# Copyright (C) 2012 Uni Research AS -# This code is licensed under The GNU General Public License v3.0 - -# use the generic find routine -include (ewoms-prereqs) -include (OpmPackage) -find_opm_package ( - # module name - "ewoms" - - # dependencies - "${ewoms_DEPS}" - - # header to search for - "ewoms/common/start.hh" - - # library to search for - "" - - # defines to be added to compilations - "" - - # test program -"#include -int main (void) { -return 0; -} -" - # config variables - "${ewoms_CONFIG_VAR}" - ) -#include (UseDynamicBoost) -#debug_find_vars ("ewoms") diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findlibrt.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findlibrt.cmake deleted file mode 100644 index 6d608788c5..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findlibrt.cmake +++ /dev/null @@ -1,51 +0,0 @@ -# Module that makes the clock_gettime() function available -# -# Sets the following variables: -# HAVE_LIBRT -# LIBRT_LIBRARIES -# -# perform tests -include(CheckCSourceCompiles) - -# first check if we need to add anything at all to be able to use -# clock_gettime() -CHECK_CXX_SOURCE_COMPILES(" -#include - -int main() -{ - timespec time1; - clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &time1); -}; -" HAVE_LIBRT) -cmake_pop_check_state() - -if (HAVE_LIBRT) - # if this worked, we're already happy - set(LIBRT_LIBRARIES "") -else() - # if not, let's try the same program with linking to librt (required - # on some systems) - cmake_push_check_state() - list(APPEND CMAKE_REQUIRED_LIBRARIES "rt") - CHECK_CXX_SOURCE_COMPILES(" -#include - -int main() -{ - timespec time1; - clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &time1); -}; -" HAVE_LIBRT2) - cmake_pop_check_state() - set(HAVE_LIBRT "${HAVE_LIBRT2}") - if (HAVE_LIBRT) - set(LIBRT_LIBRARIES "rt") - endif() -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(LibRT - DEFAULT_MSG - HAVE_LIBRT - ) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-common.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-common.cmake deleted file mode 100644 index b3ea618aca..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-common.cmake +++ /dev/null @@ -1,43 +0,0 @@ -# - Find the opm-common module -# -# Defines the following variables: -# opm-common_INCLUDE_DIRS Directory of header files -# opm-common_LIBRARIES Directory of shared object files -# opm-common_DEFINITIONS Defines that must be set to compile -# opm-common_CONFIG_VARS List of defines that should be in config.h -# HAVE_OPM_COMMON Binary value to use in config.h - -# Copyright (C) 2013 Uni Research AS -# This code is licensed under The GNU General Public License v3.0 - -# use the generic find routine -include (opm-common-prereqs) -include (OpmPackage) -find_opm_package ( - # module name - "opm-common" - - # dependencies - "${opm-common_DEPS}" - - # header to search for - "opm/common/utility/platform_dependent/disable_warnings.h" - - # library to search for - "opmcommon" - - # defines to be added to compilations - "" - - # test program - "#include -int main (void) { - return 0; -} -" - - # config variables - "${opm-common_CONFIG_VAR}" - ) -include (UseDynamicBoost) -#debug_find_vars ("opm-common") diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-core.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-core.cmake deleted file mode 100644 index dd96f682c0..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-core.cmake +++ /dev/null @@ -1,45 +0,0 @@ -# - Find OPM core library -# -# Defines the following variables: -# opm-core_INCLUDE_DIRS Directory of header files -# opm-core_LIBRARIES Directory of shared object files -# opm-core_DEFINITIONS Defines that must be set to compile -# opm-core_CONFIG_VARS List of defines that should be in config.h -# HAVE_OPM_CORE Binary value to use in config.h - -# Copyright (C) 2012 Uni Research AS -# This code is licensed under The GNU General Public License v3.0 - -# use the generic find routine -include (opm-core-prereqs) -include (OpmPackage) -find_opm_package ( - # module name - "opm-core" - - # dependencies - "${opm-core_DEPS}" - - # header to search for - "opm/core/grid.h" - - # library to search for - "opmcore" - - # defines to be added to compilations - "" - - # test program -"#include -int main (void) { - struct UnstructuredGrid *g; - g = create_grid_empty (); - destroy_grid (g); - return 0; -} -" - # config variables - "${opm-core_CONFIG_VAR}" - ) -include (UseDynamicBoost) -#debug_find_vars ("opm-core") diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-data.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-data.cmake deleted file mode 100644 index 11eb8f52d3..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-data.cmake +++ /dev/null @@ -1,24 +0,0 @@ -# This module searches for the opm-data repository. Since the opm-data -# has no libraries or header files the find implementation is quite -# naive. -# -# If the opm-data repository is found, the following variables are set: -# -# HAVE_OPM_DATA -# OPM_DATA_ROOT - -if (OPM_DATA_ROOT) - set( _opm_data_root ${OPM_DATA_ROOT}) -else() - set( _opm_data_root "${PROJECT_SOURCE_DIR}/../opm-data") -endif() - - -if (EXISTS "${_opm_data_root}/norne/NORNE_ATW2013.DATA") - set( HAVE_OPM_DATA True ) - set( OPM_DATA_ROOT ${_opm_data_root} ) - message( "-- Setting OPM_DATA_ROOT: ${OPM_DATA_ROOT}") -else() - set( HAVE_OPM_DATA False ) - message( "opm-data not found - integration tests using opm-data will be skipped.") -endif() \ No newline at end of file diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-flowdiagnostics.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-flowdiagnostics.cmake deleted file mode 100644 index 76716ff90b..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-flowdiagnostics.cmake +++ /dev/null @@ -1,48 +0,0 @@ -# - Find OPM Flow Diagnostics Library -# -# Defines the following variables: -# opm-flowdiagnostics_INCLUDE_DIRS Directory of header files -# opm-flowdiagnostics_LIBRARIES Directory of shared object files -# opm-flowdiagnostics_DEFINITIONS Defines that must be set to compile -# opm-flowdiagnostics_CONFIG_VARS List of defines that should be in config.h -# HAVE_OPM_FLOWDIAGNOSTICS Binary value to use in config.h - -# Copyright (C) 2012 Uni Research AS -# This code is licensed under The GNU General Public License v3.0 - -# use the generic find routine -include (opm-flowdiagnostics-prereqs) - -include (OpmPackage) - -find_opm_package ( - # module name - "opm-flowdiagnostics" - - # dependencies - "${opm-flowdiagnostics_DEPS}" - - # header to search for - "opm/flowdiagnostics/Toolbox.hpp" - - # library to search for - "opmflowdiagnostics" - - # defines to be added to compilations - "" - - # test program -"#include - -#include - -int main() -{ - using FDT = Opm::FlowDiagnostics::Toolbox; - - const auto pv = std::vector(10, 0.3); -} -" - # config variables - "${opm-flowdiagnostics_CONFIG_VAR}" - ) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-grid.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-grid.cmake deleted file mode 100644 index fc4e22e6ab..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-grid.cmake +++ /dev/null @@ -1,42 +0,0 @@ -# - Find OPM corner-point grid library -# -# Defines the following variables: -# opm-grid_INCLUDE_DIRS Directory of header files -# opm-grid_LIBRARIES Directory of shared object files -# opm-grid_DEFINITIONS Defines that must be set to compile -# opm-grid_CONFIG_VARS List of defines that should be in config.h -# HAVE_OPM_GRID Binary value to use in config.h - -# Copyright (C) 2013 Uni Research AS -# This code is licensed under The GNU General Public License v3.0 - -include (opm-grid-prereqs) -include (OpmPackage) -find_opm_package ( - # module name - "opm-grid" - - # dependencies - "${opm-grid_DEPS}" - - # header to search for - "dune/grid/CpGrid.hpp" - - # library to search for - "opmgrid" - - # defines to be added to compilations - "HAVE_OPM_GRID" - - # test program -"#include -int main (void) { - Dune::CpGrid g; - return 0; -} -" - # config variables - "${opm-grid_CONFIG_VAR}" - ) - -#debug_find_vars ("opm-grid") diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-material.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-material.cmake deleted file mode 100644 index 00b8b1d2ea..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-material.cmake +++ /dev/null @@ -1,43 +0,0 @@ -# - Find OPM materials library -# -# Defines the following variables: -# opm-material_INCLUDE_DIRS Directory of header files -# opm-material_LIBRARIES Directory of shared object files -# opm-material_DEFINITIONS Defines that must be set to compile -# opm-material_CONFIG_VARS List of defines that should be in config.h -# HAVE_OPM_MATERIAL Binary value to use in config.h - -# Copyright (C) 2013 Uni Research AS -# This code is licensed under The GNU General Public License v3.0 - -# use the generic find routine -include (opm-material-prereqs) -include (OpmPackage) -find_opm_package ( - # module name - "opm-material" - - # dependencies - "${opm-material_DEPS}" - - # header to search for - "opm/material/Constants.hpp" - - # library to search for - "" - - # defines to be added to compilations - "" - - # test program -"#include -int main (void) { - double c = Opm::Constants::c; - return 0; -} -" - # config variables - "${opm-material_CONFIG_VAR}" - ) -include (UseDynamicBoost) -#debug_find_vars ("opm-material") diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-output.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-output.cmake deleted file mode 100644 index 1fa40f820a..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-output.cmake +++ /dev/null @@ -1,55 +0,0 @@ -# - Find OPM output library -# -# Defines the following variables: -# opm-output_INCLUDE_DIRS Directory of header files -# opm-output_LIBRARIES Directory of shared object files -# opm-output_DEFINITIONS Defines that must be set to compile -# opm-output_CONFIG_VARS List of defines that should be in config.h -# HAVE_OPM_OUTPUT Binary value to use in config.h - -# Copyright (C) 2012 Uni Research AS -# This code is licensed under The GNU General Public License v3.0 - -# use the generic find routine -include (opm-output-prereqs) -include (OpmPackage) -find_opm_package ( - # module name - "opm-output" - - # dependencies - "${opm-output_DEPS}" - - # header to search for - "opm/output/OutputWriter.hpp" - - # library to search for - "opmoutput" - - # defines to be added to compilations - "" - - # test program -"#include -int main (void) { - return 0; -} -" - # config variables - "${opm-output_CONFIG_VAR}" - ) -include (UseDynamicBoost) -#debug_find_vars ("opm-output") - - -if(OPM_OUTPUT_FOUND) - get_filename_component(opm-output_PREFIX_DIR ${opm-output_LIBRARY} PATH) - find_program(COMPARE_SUMMARY_COMMAND compareSummary - PATHS ${opm-output_PREFIX_DIR}/../bin - ${opm-output_PREFIX_DIR}/../../bin) - find_program(COMPARE_ECL_COMMAND compareECL - PATHS ${opm-output_PREFIX_DIR}/../bin - ${opm-output_PREFIX_DIR}/../../bin) - -endif() - diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-parser.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-parser.cmake deleted file mode 100644 index cb08ade762..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-parser.cmake +++ /dev/null @@ -1,169 +0,0 @@ -# Find the OPM Eclipse input parser. -# -# Set the cache variable OPM_PARSER_ROOT to the install location of the -# library, or OPM_ROOT to the parent directory of the build tree. -# -# If found, it sets these variables: -# -# HAVE_OPM_PARSER Defined if a test program compiled -# OPM_PARSER_INCLUDE_DIRS Header file directories -# OPM_PARSER_LIBRARIES Archives and shared objects - -include (FindPackageHandleStandardArgs) - -# variables to pass on to other packages -if (FIND_QUIETLY) - set (OPM_PARSER_QUIET "QUIET") -else () - set (OPM_PARSER_QUIET "") -endif () - -# use lowercase versions of the variables if those are set -if (opm-parser_ROOT) - set (OPM_PARSER_ROOT ${opm-parser_ROOT}) -endif () -if (opm_ROOT) - set (OPM_ROOT ${opm_ROOT}) -endif () - -# inherit "suite" root if not specifically set for this library -if ((NOT OPM_PARSER_ROOT) AND OPM_ROOT) - set (OPM_PARSER_ROOT "${OPM_ROOT}/opm-parser") -endif () - -# Detect the build dir suffix or subdirectory -string(REGEX REPLACE "${PROJECT_SOURCE_DIR}/?(.*)" "\\1" BUILD_DIR_SUFFIX "${PROJECT_BINARY_DIR}") - -# if a root is specified, then don't search in system directories -# or in relative directories to this one -if (OPM_PARSER_ROOT) - set (_no_default_path "NO_DEFAULT_PATH") - set (_opm_parser_source "") - set (_opm_parser_build "") -else () - set (_no_default_path "") - set (_opm_parser_source - "${PROJECT_SOURCE_DIR}/../opm-parser") - set (_opm_parser_build - "${PROJECT_BINARY_DIR}/../opm-parser" - "${PROJECT_BINARY_DIR}/../opm-parser${BUILD_DIR_SUFFIX}" - "${PROJECT_BINARY_DIR}/../../opm-parser/${BUILD_DIR_SUFFIX}") -endif () - -# use this header as signature -find_path (OPM_PARSER_INCLUDE_DIR - NAMES "opm/parser/eclipse/Parser/Parser.hpp" - HINTS "${OPM_PARSER_ROOT}" - PATHS ${_opm_parser_source} - PATH_SUFFIXES "include" - DOC "Path to OPM parser header files" - ${_no_default_path} ) - -find_path (OPM_PARSER_GEN_INCLUDE_DIR - NAMES "opm/parser/eclipse/Parser/ParserKeywords.hpp" - HINTS "${OPM_PARSER_ROOT}" - PATHS ${_opm_parser_build} - PATH_SUFFIXES "generated-source/include" "include" - DOC "Path to OPM parser generated header files" - ${_no_default_path} ) - - -# backup: if we didn't find any headers there, but a CMakeCache.txt, -# then it is probably a build directory; read the CMake cache of -# opm-parser to figure out where the source directory is -if ((NOT OPM_PARSER_INCLUDE_DIR) AND - (OPM_PARSER_ROOT AND (EXISTS "${OPM_PARSER_ROOT}/CMakeCache.txt"))) - set (_regex "^OPMParser_SOURCE_DIR:STATIC=\(.*\)$") - file (STRINGS - "${OPM_PARSER_ROOT}/CMakeCache.txt" - _cache_entry - REGEX "${_regex}") - string(REGEX REPLACE "${_regex}" "\\1" - OPM_PARSER_INCLUDE_DIR - "${_cache_entry}") - if (OPM_PARSER_INCLUDE_DIR) - set (OPM_PARSER_INCLUDE_DIR "${OPM_PARSER_INCLUDE_DIR}" - CACHE PATH "Path to OPM parser header files" FORCE) - endif () -endif () - -# find out the size of a pointer. this is required to only search for -# libraries in the directories relevant for the architecture -if (CMAKE_SIZEOF_VOID_P) - math (EXPR _BITS "8 * ${CMAKE_SIZEOF_VOID_P}") -endif () - -# these libraries constitute the parser core -find_library (OPM_PARSER_LIBRARY - NAMES "opmparser" - HINTS "${OPM_PARSER_ROOT}" - PATHS ${_opm_parser_build} - PATH_SUFFIXES "lib" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}" - "opm/parser/eclipse" - DOC "Path to OPM parser library archive/shared object files" - ${_no_default_path} ) - -# find the OPM-parser wrapper library around cJSON -find_library (OPM_JSON_LIBRARY - NAMES "opmjson" - HINTS "${OPM_PARSER_ROOT}" - PATHS ${_opm_parser_build} - PATH_SUFFIXES "lib" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}" - "opm/json" - DOC "Path to OPM JSON library archive/shared object files" - ${_no_default_path} ) - -# get the prerequisite ERT libraries -if (NOT ERT_FOUND) - find_package(ERT ${OPM_PARSER_QUIET}) -endif () - -# get the prerequisite Boost libraries -find_package(Boost 1.44.0 COMPONENTS filesystem date_time system unit_test_framework regex ${OPM_PARSER_QUIET}) - -if (ERT_FOUND AND Boost_FOUND AND - OPM_PARSER_LIBRARY AND OPM_JSON_LIBRARY AND OPM_PARSER_INCLUDE_DIR) - # setup list of all required libraries to link with opm-parser. notice that - # we use the plural form to get *all* the libraries needed by cjson - set (opm-parser_INCLUDE_DIRS - ${OPM_PARSER_INCLUDE_DIR} - ${OPM_PARSER_GEN_INCLUDE_DIR} - ${Boost_INCLUDE_DIRS} - ${ERT_INCLUDE_DIRS}) - - set (opm-parser_LIBRARIES - ${OPM_PARSER_LIBRARY} - ${OPM_JSON_LIBRARY} - ${Boost_LIBRARIES} - ${ERT_LIBRARIES}) - - # see if we can compile a minimum example - # CMake logical test doesn't handle lists (sic) - include (CMakePushCheckState) - include (CheckCSourceCompiles) - cmake_push_check_state () - set (CMAKE_REQUIRED_INCLUDES ${opm-parser_INCLUDE_DIRS}) - set (CMAKE_REQUIRED_LIBRARIES ${opm-parser_LIBRARIES}) - - check_cxx_source_compiles ( - "#include -#include - -int main (void) { - return EXIT_SUCCESS; -}" HAVE_OPM_PARSER) - cmake_pop_check_state () -endif() - -# if the test program didn't compile, but was required to do so, bail -# out now and display an error; otherwise limp on -set (OPM_PARSER_FIND_REQUIRED ${opm-parser_FIND_REQUIRED}) -find_package_handle_standard_args (opm-parser - DEFAULT_MSG - opm-parser_INCLUDE_DIRS opm-parser_LIBRARIES HAVE_OPM_PARSER - ) - -set (opm-parser_CONFIG_VARS "HAVE_OPM_PARSER;HAVE_REGEX") -set (opm-parser_FOUND ${OPM-PARSER_FOUND}) - -mark_as_advanced(opm-parser_LIBRARIES opm-parser_INCLUDE_DIRS OPM-PARSER_FOUND) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-simulators.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-simulators.cmake deleted file mode 100644 index 1ee43483c0..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-simulators.cmake +++ /dev/null @@ -1,44 +0,0 @@ -# - Find OPM automatic differentiation library -# -# Defines the following variables: -# opm-simulators_INCLUDE_DIRS Directory of header files -# opm-simulators_LIBRARIES Directory of shared object files -# opm-simulators_DEFINITIONS Defines that must be set to compile -# opm-simulators_CONFIG_VARS List of defines that should be in config.h -# HAVE_OPM_SIMULATORS Binary value to use in config.h - -# Copyright (C) 2012 Uni Research AS -# This code is licensed under The GNU General Public License v3.0 - -# use the generic find routine -include (opm-simulators-prereqs) -include (OpmPackage) -find_opm_package ( - # module name - "opm-simulators" - - # dependencies - "${opm-simulators_DEPS}" - - # header to search for - "opm/autodiff/AutoDiff.hpp" - - # library to search for - "opmsimulators" - - # defines to be added to compilations - "" - - # test program -"#include -int main (void) { - Opm::AutoDiff x = Opm::AutoDiff::constant(42.); - (void) x; - return 0; -} -" - # config variables - "${opm-simulators_CONFIG_VAR}" - ) -include (UseDynamicBoost) -#debug_find_vars ("opm-simulators") diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-upscaling.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-upscaling.cmake deleted file mode 100644 index c802d8fc68..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-upscaling.cmake +++ /dev/null @@ -1,41 +0,0 @@ -# - Find OPM upscaling grid library -# -# Defines the following variables: -# opm-upscaling_INCLUDE_DIRS Directory of header files -# opm-upscaling_LIBRARIES Directory of shared object files -# opm-upscaling_DEFINITIONS Defines that must be set to compile -# opm-upscaling_CONFIG_VARS List of defines that should be in config.h -# HAVE_OPM_UPSCALING Binary value to use in config.h - -# Copyright (C) 2013 Uni Research AS -# This code is licensed under The GNU General Public License v3.0 - -include (opm-upscaling-prereqs) -include (OpmPackage) -find_opm_package ( - # module name - "opm-upscaling" - - # dependencies - "${opm-upscaling_DEPS}" - - # header to search for - "opm/upscaling/SinglePhaseUpscaler.hpp" - - # library to search for - "opmupscaling" - - # defines to be added to compilations - "" - - # test program -"#include -int main (void) { - return 0; -} -" - # config variables - "${opm-upscaling_CONFIG_VAR}" - ) - -#debug_find_vars ("opm-upscaling") diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-verteq.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-verteq.cmake deleted file mode 100644 index 5e11fcc3cd..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/Findopm-verteq.cmake +++ /dev/null @@ -1,41 +0,0 @@ -# - Find OPM vertical equilibrium library -# -# Defines the following variables: -# opm-verteq_INCLUDE_DIRS Directory of header files -# opm-verteq_LIBRARIES Directory of shared object files -# opm-verteq_DEFINITIONS Defines that must be set to compile -# opm-verteq_CONFIG_VARS List of defines that should be in config.h -# HAVE_OPM_VERTEQ Binary value to use in config.h - -# Copyright (C) 2013 Uni Research AS -# This code is licensed under The GNU General Public License v3.0 - -# use the generic find routine -include (opm-verteq-prereqs) -include (OpmPackage) -find_opm_package ( - # module name - "opm-verteq" - - # dependencies - "${opm-verteq_DEPS}" - - # header to search for - "opm/verteq/verteq.hpp" - - # library to search for - "opmverteq" - - # defines to be added to compilations - "" - - # test program -"#include -int main (void) { - return 0; -} -" - # config variables - "") -include (UseDynamicBoost) -#debug_find_vars ("opm-verteq") diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/LibtoolArchives.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/LibtoolArchives.cmake deleted file mode 100644 index 454922150c..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/LibtoolArchives.cmake +++ /dev/null @@ -1,169 +0,0 @@ -# translate a list of libraries into a command-line that can be passed to the -# compiler/linker. first parameter is the name of the variable that will -# receive this list, the rest is considered the list of libraries -function (linker_cmdline what INTO outvar FROM) - if (NOT (UNIX OR MSYS OR MINGW)) - return () - endif (NOT (UNIX OR MSYS OR MINGW)) - - # if we are going to put these in regexps, we must escape period - string (REPLACE "." "\\." esc_dl_pref "${CMAKE_SHARED_LIBRARY_PREFIX}") - string (REPLACE "." "\\." esc_dl_suff "${CMAKE_SHARED_LIBRARY_SUFFIX}") - string (REPLACE "." "\\." esc_ar_pref "${CMAKE_STATIC_LIBRARY_PREFIX}") - string (REPLACE "." "\\." esc_ar_suff "${CMAKE_STATIC_LIBRARY_PREFIX}") - - # CMake loves absolute paths, whereas libtool won't have any of it! - # (you get an error message about argument not parsed). translate each - # of the libraries into a linker option - set (deplib_list "") - foreach (deplib IN LISTS ARGN) - # starts with a hyphen already? then just add it - string (SUBSTRING ${deplib} 0 1 dash) - if (${dash} STREQUAL "-") - list (APPEND deplib_list ${deplib}) - else (${dash} STREQUAL "-") - # otherwise, parse the name into a directory and a name - get_filename_component (deplib_dir ${deplib} PATH) - get_filename_component (deplib_orig ${deplib} NAME) - string (REGEX REPLACE - "^${esc_dl_pref}(.*)${esc_dl_suff}$" - "\\1" - deplib_name - ${deplib_orig} - ) - string (REGEX REPLACE - "^${esc_ar_pref}(.*)${esc_ar_suff}$" - "\\1" - deplib_name - ${deplib_name} - ) - # directory and name each on their own; this is somewhat - # unsatisfactory because it may be that a system dir is specified - # by an earlier directory and you start picking up libraries from - # there instead of the "closest" path here. also, the soversion - # is more or less lost. remove system default path, to lessen the - # chance that we pick the wrong library - if (NOT ((deplib_dir STREQUAL "/usr/lib") OR - (deplib_dir STREQUAL "/usr/${CMAKE_INSTALL_LIBDIR}"))) - list (APPEND deplib_list "-L${deplib_dir}") - endif (NOT ((deplib_dir STREQUAL "/usr/lib") OR - (deplib_dir STREQUAL "/usr/${CMAKE_INSTALL_LIBDIR}"))) - # if there was no translation of the name, the library is named - # unconventionally (.so.3gf, I'm looking at you), so pass this - # name unmodified to the linker switch - if (deplib_orig STREQUAL deplib_name) - list (APPEND deplib_list "-l:${deplib_orig}") - else (deplib_orig STREQUAL deplib_name) - list (APPEND deplib_list "-l${deplib_name}") - endif (deplib_orig STREQUAL deplib_name) - endif (${dash} STREQUAL "-") - endforeach (deplib) - # caller determines whether we want it returned as a list or a string - if ("${what}" STREQUAL "LIST") - set (${outvar} ${deplib_list}) - else ("${what}" STREQUAL "LIST") - set (${outvar} "${deplib_list}") - string (REPLACE ";" " " ${outvar} "${${outvar}}") - endif ("${what}" STREQUAL "LIST") - set (${outvar} "${${outvar}}" PARENT_SCOPE) -endfunction (linker_cmdline what INTO outvar FROM) - -function (configure_la name target) - if (NOT (UNIX OR MSYS OR MINGW)) - return () - endif (NOT (UNIX OR MSYS OR MINGW)) - - # these generic variables are initialized from the project info - set (current "${${name}_VERSION_MAJOR}") - set (age "${${name}_VERSION_MINOR}") - set (inherited_linker_flags "${${name}_LINKER_FLAGS}") - set (dependency_libs "${${name}_LIBRARIES}") - - # translate list of libraries to command line - linker_cmdline (LIST INTO dependency_libs FROM ${dependency_libs}) - - # convert from CMake list (i.e. semi-colon separated) - string (REPLACE ";" " " inherited_linker_flags "${inherited_linker_flags}") - string (REPLACE ";" " " dependency_libs "${dependency_libs}") - - # this is the preferred installation path - set (libdir "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") - - # ${name}_LIBRARY_TYPE is either SHARED or STATIC - if (${name}_LIBRARY_TYPE STREQUAL "SHARED") - set (libprefix "${CMAKE_SHARED_LIBRARY_PREFIX}") - set (libsuffix "${CMAKE_SHARED_LIBRARY_SUFFIX}") - set (libname "${CMAKE_SHARED_LIBRARY_PREFIX}${target}${CMAKE_SHARED_LIBRARY_SUFFIX}") - # only Unix has soversion in library names - if (UNIX) - set (dlname "${libname}.${current}") - set (library_names "${libname}.${current}.${age} ${libname}.${current} ${libname}") - else (UNIX) - set (dlname "${libname}") - set (library_names "${libname}") - endif (UNIX) - set (old_library "") - else (${name}_LIBRARY_TYPE STREQUAL "SHARED") - set (dlname "") - set (library_names "") - set (old_library "${CMAKE_STATIC_LIBRARY_PREFIX}${target}${CMAKE_STATIC_LIBRARY_SUFFIX}") - endif (${name}_LIBRARY_TYPE STREQUAL "SHARED") - - # get the version of libtool installed on the system; this is - # necessary because libtool checks that the file contains its own - # signature(!) - if (NOT libtool_MAIN) - find_file ( - libtool_MAIN - ltmain.sh - PATHS /usr - PATH_SUFFIXES share/libtool/config/ - DOC "Location of libtool" - ) - mark_as_advanced (libtool_MAIN) - # notify the user if it not found after we explicitly searched - if (NOT libtool_MAIN) - message (STATUS "Libtool not found!") - endif (NOT libtool_MAIN) - endif (NOT libtool_MAIN) - if (libtool_MAIN) - file (STRINGS - ${libtool_MAIN} - ltversion_STRING - REGEX "^VERSION=\".*\"" - ) - endif (libtool_MAIN) - if (ltversion_STRING) - string (REGEX REPLACE - "^VERSION=\"?(.*)\"?" - "\\1" - ltversion - ${ltversion_STRING} - ) - endif (ltversion_STRING) - - # assume that we are in cmake/Modules, and that the template have been - # put in cmake/Templates. we cannot use CMAKE_CURRENT_LIST_DIR because - # this is in a function, and we cannot know who's calling us - set (templ_dir "${OPM_MACROS_ROOT}/cmake/Templates") - - - # only write an .la if libtool is found; otherwise we have no use - # for it. - if (ltversion) - set (la_file "lib${target}.la") - message (STATUS "Writing libtool archive for ${target}") - configure_file ( - ${templ_dir}/la.in - ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/${la_file} - @ONLY@ - ) - else (ltversion) - set (la_file "") - endif (ltversion) - - # return this variable to the caller - if (ARGV2) - set (${ARGV2} "${la_file}" PARENT_SCOPE) - endif (ARGV2) -endfunction (configure_la target) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmAliases.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmAliases.cmake deleted file mode 100644 index 392749b9ba..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmAliases.cmake +++ /dev/null @@ -1,26 +0,0 @@ -# - Alias probed variables for compatibility with DUNE buildsystem -# -# DUNE build system sets some variables which have different names -# in the CMake modules we are using; this module set those variable -# so they can be exported to config.h visible to DUNE headers - -function (set_aliases) - # hardcoded list of "dune-var opm-var" pairs, where the components - # are separated by space - set (aliases - "HAVE_UMFPACK HAVE_SUITESPARSE_UMFPACK_H" - "HAVE_DUNE_BOOST HAVE_BOOST" - ) - foreach (alias IN LISTS aliases) - # convert entry "X Y" into a list "X;Y", then pick apart - string (REGEX REPLACE "\ +" ";" tuple "${alias}") - list (GET tuple 0 var) - list (GET tuple 1 name) - - # write this alias to cache - set (${var} ${${name}} PARENT_SCOPE) - endforeach (alias) -endfunction (set_aliases) - -# always call this when the module is imported -set_aliases () diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmCompile.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmCompile.cmake deleted file mode 100644 index 45bd9d3f26..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmCompile.cmake +++ /dev/null @@ -1,72 +0,0 @@ -# - Compile main library target - -option (STRIP_DEBUGGING_SYMBOLS "use separate files for the executable code and the debugging symbols" OFF) - -macro (opm_compile opm) - # some CMake properties do not do list expansion - string (REPLACE ";" " " ${opm}_LINKER_FLAGS_STR "${${opm}_LINKER_FLAGS}") - - # name of the library should not contain dashes, as CMake will - # define a symbol with that name, and those cannot contain dashes - string (REPLACE "-" "" ${opm}_TARGET "${${opm}_NAME}") - - # all public header files are together with the source. prepend our own - # source path to the one of the dependencies so that our version of any - # ambigious paths are used. - set (${opm}_INCLUDE_DIR "${PROJECT_SOURCE_DIR}") - set (${opm}_INCLUDE_DIRS ${${opm}_INCLUDE_DIR} ${${opm}_INCLUDE_DIRS}) - - # create this library, if there are any compilation units - include_directories (${${opm}_INCLUDE_DIRS}) - link_directories (${${opm}_LIBRARY_DIRS}) - add_definitions (${${opm}_DEFINITIONS}) - set (${opm}_VERSION "${${opm}_VERSION_MAJOR}.${${opm}_VERSION_MINOR}") - if (${opm}_SOURCES) - add_library (${${opm}_TARGET} ${${opm}_LIBRARY_TYPE} ${${opm}_SOURCES}) - set_target_properties (${${opm}_TARGET} PROPERTIES - SOVERSION ${${opm}_VERSION_MAJOR} - VERSION ${${opm}_VERSION} - LINK_FLAGS "${${opm}_LINKER_FLAGS_STR}" - POSITION_INDEPENDENT_CODE TRUE - ) - target_link_libraries (${${opm}_TARGET} ${${opm}_LIBRARIES}) - - if (STRIP_DEBUGGING_SYMBOLS) - # queue this executable to be stripped - strip_debug_symbols (${${opm}_TARGET} ${opm}_DEBUG) - endif() - else (${opm}_SOURCES) - # unset this variable to signal that no library is generated - set (${opm}_TARGET) - endif (${opm}_SOURCES) - - # pre-compile common headers; this is setup *after* the library to pick - # up extra options set there - if (PRECOMPILE_HEADERS) - # if we have no library, then use the static setting as this will - # build the same way as any test programs (no -fPIC option) - if (${opm}_TARGET) - get_target_property (_type ${${opm}_TARGET} TYPE) - else () - set (_type "STATIC") - endif () - precompile_header (CXX ${_type} - HEADER "${${opm}_PRECOMP_CXX_HEADER}" - TARGET ${opm}_CXX_pch - FLAGS ${opm}_PRECOMP_CXX_FLAGS - ) - # must set property on source files instead of entire target, because - # it only applies to C++ modules (and cannot be used for C) - set_source_files_properties (${${opm}_CXX_SOURCES} PROPERTIES - OBJECT_DEPENDS "${${opm}_CXX_pch}" - COMPILE_FLAGS "${${opm}_PRECOMP_CXX_FLAGS}" - ) - message (STATUS "Precompiled headers: ${${opm}_CXX_pch}") - endif (PRECOMPILE_HEADERS) - - # we need to know the name of the library which is generated - if (${opm}_TARGET) - get_target_property (${opm}_LIBRARY ${${opm}_TARGET} LOCATION) - endif (${opm}_TARGET) - -endmacro (opm_compile opm) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmDefaults.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmDefaults.cmake deleted file mode 100644 index b3158d6cc4..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmDefaults.cmake +++ /dev/null @@ -1,99 +0,0 @@ -# - Default settings for the build - -include (UseCompVer) -is_compiler_gcc_compatible () -include(TestCXXAcceptsFlag) - -macro (opm_defaults opm) - # if we are installing a development version (default when checking out of - # VCS), then remember which directories were used when configuring. package - # distribution should disable this option. - option (USE_RUNPATH "Embed original dependency paths in installed library" ON) - if (USE_RUNPATH) - if (CXX_COMPAT_GCC) - check_cxx_accepts_flag ("-Wl,--enable-new-dtags" HAVE_RUNPATH) - if (HAVE_RUNPATH) - list (APPEND ${opm}_LINKER_FLAGS "-Wl,--enable-new-dtags") - endif (HAVE_RUNPATH) - endif () - # set this to avoid CMake stripping it off again - set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) - endif (USE_RUNPATH) - - # build release by default - if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) - set (CMAKE_BUILD_TYPE "Release") - endif (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) - - # default to building a static library, but let user override - if (DEFINED BUILD_SHARED_LIBS) - if (BUILD_SHARED_LIBS) - set (${opm}_LIBRARY_TYPE SHARED) - else (BUILD_SHARED_LIBS) - set (${opm}_LIBRARY_TYPE STATIC) - endif (BUILD_SHARED_LIBS) - else (DEFINED BUILD_SHARED_LIBS) - set (${opm}_LIBRARY_TYPE STATIC) - endif (DEFINED BUILD_SHARED_LIBS) - - # precompile standard headers to speed up compilation - # unfortunately, this functionality is buggy and tends to segfault at - # least up to version 4.7.2, so it should be disabled by default there - set (_precomp_def OFF) - option (PRECOMPILE_HEADERS "Precompile common headers for speed." ${_precomp_def}) - mark_as_advanced (PRECOMPILE_HEADERS) - if (NOT PRECOMPILE_HEADERS) - message (STATUS "Precompiled headers: disabled") - endif(NOT PRECOMPILE_HEADERS) - - # Use of OpenMP is considered experimental - set (USE_OPENMP_DEFAULT OFF) - - # if we are on a system where CMake 2.6 is the default (Hi RHEL 6!), - # the configuration files for Boost will trip up the library paths - # (look for /usr/lib64/lib64/ in the log) when used with FindBoost - # module bundled with CMake 2.8. this can be circumvented by turning - # off config mode probing if we have not explicitly specified a - # directory to look for it. for more details, see - # - if (NOT BOOST_ROOT) - set (Boost_NO_BOOST_CMAKE ON) - endif (NOT BOOST_ROOT) -endmacro (opm_defaults opm) - -# overwrite a cache entry's value, but keep docstring and type -# if not already in cache, then does nothing -function (update_cache name) - get_property (_help CACHE "${name}" PROPERTY HELPSTRING) - get_property (_type CACHE "${name}" PROPERTY TYPE) - if (NOT "${_type}" STREQUAL "") - #message ("Setting ${name} to \"${${name}}\" in cache.") - set ("${name}" "${${name}}" CACHE ${_type} "${_help}" FORCE) - endif () -endfunction (update_cache name) - -# put all compiler options currently set back into the cache, so that -# they can be queried from there (using ccmake for instance) -function (write_back_options) - # build type - update_cache (CMAKE_BUILD_TYPE) - - # compilers - set (languages C CXX Fortran) - foreach (language IN LISTS _languages) - if (CMAKE_${language}_COMPILER) - update_cache (CMAKE_${language}_COMPILER) - endif () - endforeach (language) - - # flags (notice use of IN LISTS to get the empty variant) - set (buildtypes "" "_DEBUG" "_RELEASE" "_MINSIZEREL" "_RELWITHDEBINFO") - set (processors "C" "CXX" "Fortran" "EXE_LINKER" "MODULE_LINKER" "SHARED_LINKER") - foreach (processor IN LISTS processors) - foreach (buildtype IN LISTS buildtypes) - if (CMAKE_${processor}_FLAGS${buildtype}) - update_cache (CMAKE_${processor}_FLAGS${buildtype}) - endif () - endforeach (buildtype) - endforeach (processor) -endfunction (write_back_options) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmDistClean.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmDistClean.cmake deleted file mode 100644 index 78908370c6..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmDistClean.cmake +++ /dev/null @@ -1,89 +0,0 @@ -# - Cleanup configuration files -# -# Remove files generated by the configuration (not by the build); the -# purpose is to get back a clean directory with no build artifacts -# (some empty directories may be left behind, though) -# -# The following suffices are supported: -# _NAME Name of the project -# _STYLESHEET_COPIED Stylesheet that was copied for the documentation -# _LIBTOOL_ARCHIVE Libtool archive file generated for library -# _DEBUG Debug information extracted from library - -macro (opm_dist_clean opm) - # which generator have we been using - string (TOUPPER "${CMAKE_GENERATOR}" _gen) - if (_gen MATCHES "UNIX MAKEFILES") - set (_gen_is_makefiles TRUE) - set (_gen_is_ninja FALSE) - elseif (_gen MATCHES "NINJA") - set (_gen_is_makefiles FALSE) - set (_gen_is_ninja TRUE) - else () - set (_gen_is_makefiles FALSE) - set (_gen_is_ninja FALSE) - endif () - - set (DISTCLEAN_FILES - CMakeCache.txt - cmake_install.cmake - config.h - config.h.tmp - ${${opm}_NAME}-config.cmake - ${${opm}_NAME}-config-version.cmake - ${${opm}_NAME}-install.cmake - ${${opm}_NAME}.pc - ${${opm}_NAME}-install.pc - ${doxy_dir}/Doxyfile - ${doxy_dir}/Doxyfile.in - CTestTestfile.cmake - DartConfiguration.tcl - lib/${${opm}_LIBTOOL_ARCHIVE} - ${${opm}_DEBUG} - ${tests_DEBUG} - ${examples_DEBUG} - ${tutorial_DEBUG} - install_manifest.txt - ${${opm}_STYLESHEET_COPIED} - ${tests_INPUT_FILES} - project-version.h - project-version.tmp - ) - if (_gen_is_makefiles) - list (APPEND DISTCLEAN_FILES - Makefile) - endif () - if (_gen_is_ninja) - list (APPEND DISTCLEAN_FILES - build.ninja - rules.ninja - ) - endif () - - # only remove these files if they were actually copied - if (NOT PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR) - list (APPEND DISTCLEAN_FILES - dune.module - dunemod.tmp - ) - endif (NOT PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR) - # script to remove empty directories (can't believe this isn't included!) - set (rmdir "${OPM_MACROS_ROOT}/cmake/Scripts/RemoveEmptyDir.cmake") - add_custom_target (distclean - COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR} -- clean - COMMAND ${CMAKE_COMMAND} -E remove -f ${DISTCLEAN_FILES} - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles/ - COMMAND ${CMAKE_COMMAND} -E remove_directory Testing/ - COMMAND ${CMAKE_COMMAND} -DDIR=${CMAKE_LIBRARY_OUTPUT_DIRECTORY} -P ${rmdir} - COMMAND ${CMAKE_COMMAND} -DDIR=${CMAKE_RUNTIME_OUTPUT_DIRECTORY} -P ${rmdir} - COMMAND ${CMAKE_COMMAND} -DDIR:LOCATION=${doxy_dir} -P ${rmdir} - COMMAND ${CMAKE_COMMAND} -DDIR:LOCATION=${tests_DIR} -P ${rmdir} -# cannot depend on clean because it is only defined in the master Makefile -# not in CMakeFiles/Makefile where this target will end up -# DEPENDS clean - WORKING_DIRECTORY ${PROJECT_BINARY_DIR} - COMMENT Removing CMake-generated files - VERBATIM - ) - -endmacro (opm_dist_clean opm) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmDoc.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmDoc.cmake deleted file mode 100644 index 6739046043..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmDoc.cmake +++ /dev/null @@ -1,91 +0,0 @@ -# - Setup documentation -# -# Assumes that a Doxyfile template is located in the project root -# directory, and that all documentation is going to be generated -# into its own Documentation/ directory. It will also generate an -# installation target for the documentation (not built by default) -# -# Requires the following variables to be set: -# ${opm}_NAME Name of the project -# -# Output the following variables: -# ${opm}_STYLESHEET_COPIED Location of stylesheet to be removed in distclean - -macro (opm_doc opm doxy_dir) - # combine the template with local customization - file (READ ${OPM_MACROS_ROOT}/cmake/Templates/Doxyfile _doxy_templ) - string (REPLACE ";" "\\;" _doxy_templ "${_doxy_templ}") - if (EXISTS ${PROJECT_SOURCE_DIR}/${doxy_dir}/Doxylocal) - file (READ ${PROJECT_SOURCE_DIR}/${doxy_dir}/Doxylocal _doxy_local) - string (REPLACE ";" "\\;" _doxy_local "${_doxy_local}") - else (EXISTS ${PROJECT_SOURCE_DIR}/${doxy_dir}/Doxylocal) - set (_doxy_local) - endif (EXISTS ${PROJECT_SOURCE_DIR}/${doxy_dir}/Doxylocal) - file (MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/${doxy_dir}) - file (WRITE ${PROJECT_BINARY_DIR}/${doxy_dir}/Doxyfile.in ${_doxy_templ} ${_doxy_local}) - # set this generically named variable so even the custom file can be shared - set (src_DIR "${${opm}_DIR}") - - # copy the doxygen layout XML file to the build directorie's doxygen - # directory. if the source module ships with such a file it takes - # precedence over the one shipped with the build system. - if (EXISTS ${PROJECT_SOURCE_DIR}/${doxy_dir}/DoxygenLayout.xml) - file(COPY ${PROJECT_SOURCE_DIR}/${doxy_dir}/DoxygenLayout.xml DESTINATION ${PROJECT_BINARY_DIR}/${doxy_dir}) - else() - file(COPY ${OPM_MACROS_ROOT}/cmake/Templates/DoxygenLayout.xml DESTINATION ${PROJECT_BINARY_DIR}/${doxy_dir}) - endif() - - # replace variables in this combined file - configure_file ( - ${PROJECT_BINARY_DIR}/${doxy_dir}/Doxyfile.in - ${PROJECT_BINARY_DIR}/${doxy_dir}/Doxyfile - @ONLY - ) - find_package (Doxygen) - if (DOXYGEN_FOUND) - add_custom_target (doc - COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/${doxy_dir}/Doxyfile - SOURCES ${PROJECT_BINARY_DIR}/${doxy_dir}/Doxyfile - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/${doxy_dir} - COMMENT "Generating API documentation with Doxygen" - VERBATIM - ) - # distributions have various naming conventions; this enables the packager - # to direct where the install target should put the documentation. the names - # here are taken from GNUInstallDirs.cmake - set (CMAKE_INSTALL_DATAROOTDIR "share" CACHE STRING "Read-only arch.-indep. data root") - set (CMAKE_INSTALL_DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc${${opm}_VER_DIR}/${${opm}_NAME}" CACHE STRING "Documentation root") - set (_formats html) - foreach (format IN LISTS _formats) - string (TOUPPER ${format} FORMAT) - install ( - DIRECTORY ${PROJECT_BINARY_DIR}/${doxy_dir}/${format} - DESTINATION ${CMAKE_INSTALL_DOCDIR} - COMPONENT ${format} - OPTIONAL - ) - # target to install just HTML documentation - add_custom_target (install-${format} - COMMAND ${CMAKE_COMMAND} -DCOMPONENT=${format} -P cmake_install.cmake - COMMENT Installing ${FORMAT} documentation - VERBATIM - ) - # since the documentation is optional, it is not automatically built - add_dependencies (install-${format} doc) - endforeach (format) - endif (DOXYGEN_FOUND) - - # stylesheets must be specified with relative path in Doxyfile, or the - # full path (to the source directory!) will be put in the output HTML. - # thus, we'll need to copy the stylesheet to this path relative to where - # Doxygen will be run (in the output tree) - if ((NOT PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR) AND (EXISTS ${PROJECT_SOURCE_DIR}/${doxy_dir}/style.css)) - file (COPY ${PROJECT_SOURCE_DIR}/${doxy_dir}/style.css - DESTINATION ${PROJECT_BINARY_DIR}/${doxy_dir} - ) - set (${opm}_STYLESHEET_COPIED "${doxy_dir}/style.css") - else ((NOT PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR) AND (EXISTS ${PROJECT_SOURCE_DIR}/${doxy_dir}/style.css)) - set (${opm}_STYLESHEET_COPIED "") - endif ((NOT PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR) AND (EXISTS ${PROJECT_SOURCE_DIR}/${doxy_dir}/style.css)) - -endmacro (opm_doc opm) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmFiles.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmFiles.cmake deleted file mode 100644 index 1f91b4bd08..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmFiles.cmake +++ /dev/null @@ -1,104 +0,0 @@ -# - Identify source code - -macro (opm_out_dirs) - # put libraries in lib/ (no multi-arch support in build tree) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib") - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib") - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin") - set (CMAKE_Fortran_MODULE_DIRECTORY "${PROJECT_BINARY_DIR}/CMakeFiles") -endmacro (opm_out_dirs) - -# support for some of the variables that are used in Autotools -# template files -macro (opm_auto_dirs) - set (abs_top_builddir "${PROJECT_BINARY_DIR}") - set (abs_top_srcdir "${PROJECT_SOURCE_DIR}") -endmacro (opm_auto_dirs) - -macro (opm_sources opm) - # this is necessary to set so that we know where we are going to - # execute the test programs (and make datafiles available) - set (tests_DIR "tests") - - # how to retrieve the "fancy" name from the filename - set (tests_REGEXP - "^test_([^/]*)$" - "^([^/]*)_test$" - ) - - # these are the lists that must be defined in CMakeLists_files - # - MAIN_SOURCE_FILES - # - EXAMPLE_SOURCE_FILES - # - TEST_SOURCE_FILES - # - TEST_DATA_FILES - # - PUBLIC_HEADER_FILES - # - PROGRAM_SOURCE_FILES - # - ADDITIONAL_SOURCE_FILES - - # rename from "friendly" names to ones that fit the "almost-structural" - # scheme used in the .cmake modules, converting them to absolute file - # names in the process - foreach (_file IN LISTS MAIN_SOURCE_FILES) - list (APPEND ${opm}_SOURCES ${PROJECT_SOURCE_DIR}/${_file}) - # further classify into language if some other modules need to add props - if (_file MATCHES ".*\\.[cC][a-zA-Z]*$") - if (_file MATCHES ".*\\.c$") - list (APPEND ${opm}_C_SOURCES ${PROJECT_SOURCE_DIR}/${_file}) - else (_file MATCHES ".*\\.c$") - list (APPEND ${opm}_CXX_SOURCES ${PROJECT_SOURCE_DIR}/${_file}) - endif (_file MATCHES ".*\\.c$") - elseif (_file MATCHES ".*\\.[fF][a-zA-Z]*$") - list (APPEND ${opm}_Fortran_SOURCES ${PROJECT_SOURCE_DIR}/${_file}) - endif (_file MATCHES ".*\\.[cC][a-zA-Z]*$") - endforeach (_file) - foreach (_file IN LISTS PUBLIC_HEADER_FILES) - list (APPEND ${opm}_HEADERS ${PROJECT_SOURCE_DIR}/${_file}) - endforeach (_file) - foreach (_file IN LISTS TEST_SOURCE_FILES) - list (APPEND tests_SOURCES ${PROJECT_SOURCE_DIR}/${_file}) - endforeach (_file) - foreach (_file IN LISTS TEST_DATA_FILES) - list (APPEND tests_DATA ${PROJECT_SOURCE_DIR}/${_file}) - endforeach (_file) - foreach (_file IN LISTS EXAMPLE_SOURCE_FILES) - list (APPEND examples_SOURCES ${PROJECT_SOURCE_DIR}/${_file}) - endforeach (_file) - foreach (_file IN LISTS ADDITIONAL_SOURCE_FILES) - list (APPEND additionals_SOURCES ${PROJECT_SOURCE_DIR}/${_file}) - endforeach (_file) - foreach (_file IN LISTS PROGRAM_SOURCE_FILES) - list (APPEND examples_SOURCES_DIST ${PROJECT_SOURCE_DIR}/${_file}) - endforeach (_file) - foreach (_file IN LISTS ATTIC_FILES) - list (APPEND attic_SOURCES ${PROJECT_SOURCE_DIR}/${_file}) - endforeach (_file) - - # identify pre-compile header; if the project is called opm-foobar, - # then it should be in opm/foobar/opm-foobar-pch.hpp - string (REPLACE "-" "/" opm_NAME_AS_DIR ${${opm}_NAME}) - set (${opm}_PRECOMP_CXX_HEADER "${opm_NAME_AS_DIR}/${${opm}_NAME}-pch.hpp") - if (NOT EXISTS ${PROJECT_SOURCE_DIR}/${${opm}_PRECOMP_CXX_HEADER}) - set (${opm}_PRECOMP_CXX_HEADER "") - endif (NOT EXISTS ${PROJECT_SOURCE_DIR}/${${opm}_PRECOMP_CXX_HEADER}) -endmacro (opm_sources opm) - -# disable an entire directory from sources -macro (opm_disable_source opm) - foreach (_exp IN ITEMS ${ARGN}) - # regexp or directory? - if (IS_ABSOLUTE "${_exp}") - set (_prefix "") - else (IS_ABSOLUTE "${_exp}") - set (_prefix "${PROJECT_SOURCE_DIR}/") - endif (IS_ABSOLUTE "${_exp}") - if (IS_DIRECTORY "${_prefix}${_exp}") - set (_glob "/*") - else (IS_DIRECTORY "${_prefix}${_exp}") - set (_glob "") - endif (IS_DIRECTORY "${_prefix}${_exp}") - file (GLOB_RECURSE _disabled RELATIVE ${PROJECT_SOURCE_DIR} "${_prefix}${_exp}${_glob}") - foreach (_file IN ITEMS ${_disabled}) - list (REMOVE_ITEM ${opm}_SOURCES "${PROJECT_SOURCE_DIR}/${_file}") - endforeach (_file) - endforeach (_exp) -endmacro (opm_disable_source opm reldir) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmFind.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmFind.cmake deleted file mode 100644 index cacfdee246..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmFind.cmake +++ /dev/null @@ -1,218 +0,0 @@ -# - Generic inclusion of packages -# -# Synopsis: -# -# find_and_append_package (name args) -# -# where -# -# name Name of the package, e.g. Boost -# args Other arguments, e.g. COMPONENTS, REQUIRED, QUIET etc. -# -# This macro will append the list of standard variables found by the -# package to this project's standard variables -# -######################################################################## -# -# - Generic inclusion of a list of packages -# -# Synopsis: -# -# find_and_append_package_list (args) -# -# where -# -# args List of package strings. Each string must be quoted if -# it contains more than one word. -# -# Example: -# -# find_and_append_package_list ( -# "Boost COMPONENTS filesystem REQUIRED" -# SUPERLU -# ) - -include (Duplicates) - -# list of suffixes for all the project variables -set (_opm_proj_vars - SOURCES - LINKER_FLAGS - LIBRARIES - DEFINITIONS - INCLUDE_DIRS - LIBRARY_DIRS - CONFIG_VARS - CONFIG_IMPL_VARS - ) - -# ensure that they are at least the empty list after we're done -foreach (name IN LISTS _opm_proj_vars) - if (NOT DEFINED ${CMAKE_PROJECT_NAME}_${name}) - set (${CMAKE_PROJECT_NAME}_${name} "") - endif (NOT DEFINED ${CMAKE_PROJECT_NAME}_${name}) -endforeach (name) - -# these dependencies must always be handled by the find module -set (_opm_proj_exemptions - dune-common - dune-istl - dune-grid - dune-geometry - opm-parser - ) - -# although a DUNE module, it is delivered in the OPM suite -set (opm-core_SUITE "opm") -set (ewoms_SUITE "opm") - -# insert this boilerplate whenever we are going to find a new package -macro (find_and_append_package_to prefix name) - # special handling for Boost to avoid inadvertedly picking up system - # libraries when we want our own version. this is done here because - # having a custom Boost is common, but the logic to search only there - # does not follow any particular convention. - if (BOOST_ROOT AND NOT DEFINED Boost_NO_SYSTEM_PATHS) - set (Boost_NO_SYSTEM_PATHS TRUE) - endif (BOOST_ROOT AND NOT DEFINED Boost_NO_SYSTEM_PATHS) - - # if we have specified a directory, don't revert to searching the - # system default paths afterwards - string (TOUPPER "${name}" NAME) - string (REPLACE "-" "_" NAME "${NAME}") - - # only use suite if module-specific variable is not set. this allows - # us to override one dir in a suite - if (NOT (${name}_DIR OR ${name}_ROOT OR ${NAME}_ROOT)) - # module is part of a suite if it has name with the pattern xxx-yyy - if (("${name}" MATCHES "[^-]+-.+") OR ${name}_SUITE) - # allow to override if the module doesn't quite fit the convention - # e.g. dune-cornerpoint (since renamed to opm-grid) - if (NOT DEFINED ${name}_SUITE) - # extract suite name from module - string (REGEX REPLACE "([^-]+)-.+" "\\1" ${name}_SUITE "${name}") - endif (NOT DEFINED ${name}_SUITE) - # assume that each module has its own subdir directly under suite dir - string (TOUPPER "${${name}_SUITE}" ${name}_SUITE_UPPER) - if (DEFINED ${${name}_SUITE_UPPER}_ROOT) - set (${NAME}_ROOT ${${${name}_SUITE_UPPER}_ROOT}/${name}) - endif (DEFINED ${${name}_SUITE_UPPER}_ROOT) - endif (("${name}" MATCHES "[^-]+-.+") OR ${name}_SUITE) - endif (NOT (${name}_DIR OR ${name}_ROOT OR ${NAME}_ROOT)) - - # the documentation says that if *-config.cmake files are not found, - # find_package will revert to doing a full search, but that is not - # true, so unconditionally setting ${name}_DIR is not safe. however, - # if the directory given to us contains a config file, then copy the - # value over to this variable to switch to config mode (CMake will - # always use config mode if *_DIR is defined) - if (NOT DEFINED ${name}_DIR AND (DEFINED ${name}_ROOT OR DEFINED ${NAME}_ROOT)) - if (EXISTS ${${name}_ROOT}/${name}-config.cmake OR EXISTS ${${name}_ROOT}/${name}Config.cmake) - set (${name}_DIR "${${name}_ROOT}") - endif (EXISTS ${${name}_ROOT}/${name}-config.cmake OR EXISTS ${${name}_ROOT}/${name}Config.cmake) - if (EXISTS ${${NAME}_ROOT}/${name}-config.cmake OR EXISTS ${${NAME}_ROOT}/${name}Config.cmake) - set (${name}_DIR "${${NAME}_ROOT}") - endif (EXISTS ${${NAME}_ROOT}/${name}-config.cmake OR EXISTS ${${NAME}_ROOT}/${name}Config.cmake) - endif (NOT DEFINED ${name}_DIR AND (DEFINED ${name}_ROOT OR DEFINED ${NAME}_ROOT)) - - # these libraries need special handling which is not provided in - # the -config.cmake file, but which must be provided by this project, - # something which is done in our find module - list (FIND _opm_proj_exemptions "${name}" _${name}_exempted) - if ((NOT (_${name}_exempted EQUAL -1)) AND (DEFINED ${name}_DIR)) - set (${name}_ROOT "${${name}_DIR}") - # store this for later, in case we reconfigure - set (${name}_ROOT "${${name}_ROOT}" CACHE LOCATION "Path to ${name}") - # clear this to not use config mode - unset (${name}_DIR) - # variables that are given on the command-line is also put in the cache - # removing the local copy only "unshadows" this one - unset (${name}_DIR CACHE) - endif ((NOT (_${name}_exempted EQUAL -1)) AND (DEFINED ${name}_DIR)) - - # if we're told not to look for the package, pretend it was never found - if (CMAKE_DISABLE_FIND_PACKAGE_${name}) - set (${name}_FOUND FALSE) - set (${NAME}_FOUND FALSE) - else () - # using config mode is better than using module (aka. find) mode - # because then the package has already done all its probes and - # stored them in the config file for us - if (NOT DEFINED ${name}_FOUND AND NOT DEFINED ${NAME}_FOUND) - if (${name}_DIR) - message (STATUS "Finding package ${name} using config mode") - find_package (${name} ${ARGN} NO_MODULE PATHS ${${name}_DIR} NO_DEFAULT_PATH) - else () - message (STATUS "Finding package ${name} using module mode") - find_package (${name} ${ARGN}) - endif () - endif () - if (NOT DEFINED ${name}_FOUND) - set (${name}_FOUND "${${NAME}_FOUND}") - endif () - if (NOT DEFINED ${NAME}_FOUND) - set (${NAME}_FOUND "${${name}_FOUND}") - endif () - endif () - - # the variable "NAME" may be replaced during find_package (as this is - # now a macro, and not a function anymore), so we must reinitialize - string (TOUPPER "${name}" NAME) - string (REPLACE "-" "_" NAME "${NAME}") - - if (${name}_FOUND OR ${NAME}_FOUND) - foreach (var IN LISTS _opm_proj_vars) - if (DEFINED ${name}_${var}) - list (APPEND ${prefix}_${var} ${${name}_${var}}) - # some packages define an uppercase version of their own name - elseif (DEFINED ${NAME}_${var}) - list (APPEND ${prefix}_${var} ${${NAME}_${var}}) - endif (DEFINED ${name}_${var}) - # some packages define _PATH instead of _DIRS (Hi, MPI!) - if ("${var}" STREQUAL "INCLUDE_DIRS") - if (DEFINED ${name}_INCLUDE_PATH) - list (APPEND ${prefix}_INCLUDE_DIRS ${${name}_INCLUDE_PATH}) - elseif (DEFINED ${NAME}_INCLUDE_PATH) - list (APPEND ${prefix}_INCLUDE_DIRS ${${NAME}_INCLUDE_PATH}) - endif (DEFINED ${name}_INCLUDE_PATH) - # some packages define only _DIR and not _DIRS (Hi, Eigen3!) - if (DEFINED ${name}_INCLUDE_DIR) - list (APPEND ${prefix}_INCLUDE_DIRS ${${name}_INCLUDE_DIR}) - elseif (DEFINED ${NAME}_INCLUDE_DIR) - list (APPEND ${prefix}_INCLUDE_DIRS ${${NAME}_INCLUDE_DIR}) - endif (DEFINED ${name}_INCLUDE_DIR) - endif ("${var}" STREQUAL "INCLUDE_DIRS") - # cleanup lists - if ("${var}" STREQUAL "LIBRARIES") - remove_duplicate_libraries (${prefix}) - else ("${var}" STREQUAL "LIBRARIES") - remove_duplicate_var (${prefix} ${var}) - endif ("${var}" STREQUAL "LIBRARIES") - endforeach (var) - # some libraries only define xxx_FOUND and not a corresponding HAVE_xxx - if (NOT DEFINED HAVE_${NAME}) - set (HAVE_${NAME} 1) - endif (NOT DEFINED HAVE_${NAME}) - endif (${name}_FOUND OR ${NAME}_FOUND) -endmacro (find_and_append_package_to prefix name) - -# append to the list of variables associated with the project -macro (find_and_append_package name) - find_and_append_package_to (${CMAKE_PROJECT_NAME} ${name} ${ARGN}) -endmacro (find_and_append_package name) - -# find a list of dependencies, adding each one of them -macro (find_and_append_package_list_to prefix) - # setting and separating is necessary to work around apparent bugs - # in CMake's parser (sic) - set (_deps ${ARGN}) - foreach (_dep IN LISTS _deps) - separate_arguments (_args UNIX_COMMAND ${_dep}) - find_and_append_package_to (${prefix} ${_args}) - endforeach (_dep) -endmacro (find_and_append_package_list_to prefix) - -# convenience method to supply the project name as prefix -macro (find_and_append_package_list) - find_and_append_package_list_to (${CMAKE_PROJECT_NAME} ${ARGN}) -endmacro (find_and_append_package_list) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmGrid.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmGrid.cmake deleted file mode 100644 index 5f5350fd22..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmGrid.cmake +++ /dev/null @@ -1,81 +0,0 @@ -# - Recreate grid selection macros from DUNE -# -# If anyone requires Dune::GridSelector::GridType, they must call this -# macro in *their* project, to add this information to config.h. (In -# the autotools version, dunecontrol will automatically include m4 -# scripts that does this). -# -# Example: -# opm_cornerpoint_grid (${CONFIG_H}) - -include (CMakeParseArguments) -function (opm_grid_type) - cmake_parse_arguments (a "" "FILENAME;SYMBOL;TYPE;CONDITION" "HEADERS" ${ARGN}) - - # write prelude of a condition to use this particular grid, an inclusion guard, - # and checks to see if the number of dimensions fits for this type of grid - file (APPEND ${a_FILENAME} -"/* add GRIDTYPE typedef for grid implementation ${a_TYPE}: - defining ${a_SYMBOL} during compilation typedefs this grid implementation as GridType - in namespace Dune::GridSelector; - also integer constants dimgrid and dimworld are set in this namespace. - The required headers for this grid implementation are also included. - */ -#if defined ${a_SYMBOL} && ! defined USED_${a_SYMBOL}_GRIDTYPE - /* someone else has already defined a gridtype */ - #if HAVE_GRIDTYPE - #error \"Ambigious definition of GRIDTYPE\" - #endif - - #ifndef WORLDDIM - #define WORLDDIM GRIDDIM - #endif - #if not (WORLDDIM >= GRIDDIM) - #error \"WORLDDIM < GRIDDIM does not make sense.\" - #endif - - #if ! (${a_CONDITION}) - #error \"Preprocessor assertion ${a_CONDITION} failed.\" - #endif - -") - - # write headers which are capable of defining the type. this should - # really just have consisted of a forward declaration, but the damage - # is done: clients expect to just pull in config.h and have the - # proper type available. - foreach (header IN LISTS a_HEADERS) - file (APPEND ${a_FILENAME} - "#include <${header}>\n" - ) - endforeach (header) - - # main part which does the typedef and then a postlude which marks - # the grid as "taken" and make sure that no one else does the same - file (APPEND ${a_FILENAME} -" - namespace Dune { - namespace GridSelector { - const int dimgrid = GRIDDIM; - const int worldgrid = WORLDDIM; - typedef ${a_TYPE} GridType; - } - } - - #define HAVE_GRIDTYPE 1 - #define USED_${a_SYMBOL}_GRIDTYPE 1 -#endif -") - -endfunction (opm_grid_type) - -# write the grid type for opm-grid -function (opm_cornerpoint_grid config_h) - opm_grid_type ( - FILENAME ${CONFIG_H} - SYMBOL CPGRID - HEADERS "dune/grid/CpGrid.hpp" "dune/grid/cpgrid/dgfparser.hh" - TYPE Dune::CpGrid - CONDITION "(GRIDDIM == 3) && (WORLDDIM == 3)" - ) -endfunction (opm_cornerpoint_grid config_h) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmInit.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmInit.cmake deleted file mode 100644 index 29e4fc0b3f..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmInit.cmake +++ /dev/null @@ -1,73 +0,0 @@ -# - Initialize project-specific variables -# -# This will read the dune.module file for project information and -# set the following variables: -# -# project From the Module: field -# ${project}_NAME Same as above -# ${project}_DESCRIPTION From the Description: field -# ${project}_VERSION_MAJOR From the Version: field -# ${project}_VERSION_MINOR From the Version: field also -# -# This module should be the first to be included in the project, -# because most of the others (OpmXxx.cmake) use these variables. - -# helper macro to retrieve a single field of a dune.module file -macro(OpmGetDuneModuleDirective field variable contents) - string (REGEX MATCH ".*${field}:[ ]*([^\n]+).*" ${variable} "${contents}") - string (REGEX REPLACE ".*${field}:[ ]*([^\n]+).*" "\\1" "${variable}" "${${variable}}") - string (STRIP "${${variable}}" ${variable}) -endmacro() - -function (OpmInitProjVars) - # locate the "dune.module" file - set (DUNE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/dune.module") - - # read this file into a variable - file (READ "${DUNE_MODULE_PATH}" DUNE_MODULE) - - # read fields from the file - OpmGetDuneModuleDirective ("Module" project "${DUNE_MODULE}") - OpmGetDuneModuleDirective ("Description" description "${DUNE_MODULE}") - OpmGetDuneModuleDirective ("Version" version "${DUNE_MODULE}") - OpmGetDuneModuleDirective ("Label" label "${DUNE_MODULE}") - - # parse the version number - set (verno_regex "^([0-9]*)\\.([0-9]*).*\$") - string (REGEX REPLACE "${verno_regex}" "\\1" major "${version}") - string (REGEX REPLACE "${verno_regex}" "\\2" minor "${version}") - - # return these variables - set (project "${project}" PARENT_SCOPE) - set (${project}_NAME "${project}" PARENT_SCOPE) - set (${project}_DESCRIPTION "${description}" PARENT_SCOPE) - set (${project}_VERSION_MAJOR "${major}" PARENT_SCOPE) - set (${project}_VERSION_MINOR "${minor}" PARENT_SCOPE) - set (${project}_LABEL "${label}" PARENT_SCOPE) -endfunction () - -macro (OpmInitDirVars) - # these are the most common (and desired locations) - set (${project}_DIR "opm") - set (doxy_dir "doc/doxygen") - - # but for backward compatibility we can override it - if (COMMAND dir_hook) - dir_hook () - endif (COMMAND dir_hook) -endmacro () - -OpmInitProjVars () -OpmInitDirVars () - -# if we are backporting this release to a system which already have an -# earlier version, set this flag to have everything scoped into a directory -# which incorporates the label of the release. this is done by interjecting -# the ${project}_VER_DIR into the installation path. -option (USE_VERSIONED_DIR "Put files in release-specific directories" OFF) -set (${project}_SUITE "opm") -if (USE_VERSIONED_DIR) - set (${project}_VER_DIR "/${${project}_SUITE}-${${project}_LABEL}") -else () - set (${project}_VER_DIR "") -endif () diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmInstall.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmInstall.cmake deleted file mode 100644 index 714818624c..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmInstall.cmake +++ /dev/null @@ -1,64 +0,0 @@ -# - Installation macro -# -# Set up installation targets for the binary library. The following -# suffices must be defined for the prefix passed as parameter: -# -# _NAME Name of the library -# _HEADERS List of header files to install -# _TARGET CMake target which builds the library -# _LIBRARY_TYPE Static or shared library -# _DEBUG File containing debug symbols -include (UseMultiArch) - -macro (opm_install opm) - foreach (_hdr IN LISTS ${opm}_HEADERS) - get_filename_component (_dir ${_hdr} PATH) - file (RELATIVE_PATH _rel_dir "${PROJECT_SOURCE_DIR}" "${_dir}") - install ( - FILES ${_hdr} - DESTINATION include${${opm}_VER_DIR}/${_rel_dir} - ) - endforeach (_hdr) - install ( - TARGETS ${${opm}_TARGET} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${${opm}_VER_DIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${${opm}_VER_DIR} - ) - # only /usr/lib/debug seems to be searched for debug info; if we have - # write access to that directory (package installation), then default - # to use it; otherwise put the debug files together with the library - # (local installation). everything can be overridden by the option. - if (CMAKE_INSTALL_PREFIX STREQUAL "/usr") - set (_sys_dbg_def ON) - else (CMAKE_INSTALL_PREFIX STREQUAL "/usr") - set (_sys_dbg_def OFF) - endif (CMAKE_INSTALL_PREFIX STREQUAL "/usr") - option (SYSTEM_DEBUG "Put .debug files in GDB debug file directory" ${_sys_dbg_def}) - set (DEBUG_FILE_DIRECTORY /usr/lib/debug CACHE LOCATION "GDB debug file directory") - mark_as_advanced (DEBUG_FILE_DIRECTORY) - if (SYSTEM_DEBUG AND NOT APPLE) - set (_dbg_prefix "${DEBUG_FILE_DIRECTORY}/") - else (SYSTEM_DEBUG AND NOT APPLE) - set (_dbg_prefix "") - endif (SYSTEM_DEBUG AND NOT APPLE) - # static libraries don't have their debug info stripped, so there is - # only a separate file when we are building shared objects - if (${opm}_LIBRARY_TYPE STREQUAL "SHARED" AND ${opm}_TARGET AND ${opm}_DEBUG) - # on MacOS X, debug files are actually bundles (directories) - if (APPLE) - set (_dbg_type DIRECTORY) - else () - set (_dbg_type FILES) - endif () - install ( - ${_dbg_type} ${PROJECT_BINARY_DIR}/${${opm}_DEBUG} - DESTINATION ${_dbg_prefix}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}${${opm}_VER_DIR} - ) - endif (${opm}_LIBRARY_TYPE STREQUAL "SHARED" AND ${opm}_TARGET AND ${opm}_DEBUG) - # note that the DUNE parts that looks for dune.module is currently (2013-09) not - # multiarch-aware and will thus put in lib64/ on RHEL and lib/ on Debian - install ( - FILES ${PROJECT_SOURCE_DIR}/dune.module - DESTINATION ${LIBDIR_MULTIARCH_UNAWARE}${${opm}_VER_DIR}/dunecontrol/${${opm}_NAME} - ) -endmacro (opm_install opm) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmKnown.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmKnown.cmake deleted file mode 100644 index e61414faf2..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmKnown.cmake +++ /dev/null @@ -1,58 +0,0 @@ -# -*- mode: cmake; tab-width: 2; indent-tabs-mode: t; truncate-lines: t; compile-command: "cmake -Wdev" -*- -# vim: set filetype=cmake autoindent tabstop=2 shiftwidth=2 noexpandtab softtabstop=2 nowrap: - -# features that may be used by some packages (Fortran wrappers -# for instance), and this set options for, but which is included -# conditionally and thus does not exist in other packages -set (FEATURE_VARS - USE_UNDERSCORING - ) - -# emulate the with-xxx feature of autotools to not give warnings -# if we specify the directories of packages that are known to the -# family but not necessarily used - -# pick package names from these; opm-xxx, dune-xxx -set (KNOWN_FAMILIES - opm - dune - ) - -# variables to test; xxx_DIR, xxx_ROOT -set (KNOWN_VARS - DIR - ROOT - ) - -set (KNOWN_opm_PKGS - common - parser - material - core - grid - output - simulators - upscaling - verteq - ) - -set (KNOWN_dune_PKGS - common - geometry - grid - istl - localfunctions - ) - -foreach (family IN ITEMS ${KNOWN_FAMILIES}) - foreach (package IN ITEMS ${KNOWN_${family}_PKGS}) - foreach (var IN ITEMS ${KNOWN_VARS}) - # just "use" the variable, so we don't get warnings - set (_dummy ${${family}-${package}_${var}}) - endforeach (var) - endforeach (package) -endforeach (family) - -foreach (feature IN ITEMS ${FEATURE_VARS}) - set (_dummy ${${feature}}) -endforeach (feature) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmLibMain.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmLibMain.cmake deleted file mode 100644 index b28ab65539..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmLibMain.cmake +++ /dev/null @@ -1,311 +0,0 @@ -# -*- mode: cmake; tab-width: 2; indent-tabs-mode: t; truncate-lines: t; compile-command: "cmake -Wdev" -*- -# vim: set filetype=cmake autoindent tabstop=2 shiftwidth=2 noexpandtab softtabstop=2 nowrap: - -# - Build an OPM library module -# -# This macro assumes that ${project} contains the name of the project, -# e.g. "opm-core", and that various variables that configures the module -# has been setup in advance. -# -# Customize the module configuration by defining these "callback" macros: -# -# prereqs_hook Do special processing before prerequisites are found -# fortran_hook Determine whether Fortran support is necessary or not -# sources_hook Do special processing before sources are compiled -# tests_hook Do special processing before tests are compiled -# files_hook Do special processing before final targets are added - -# for CMake >= 3.0, we need to change a few policies: -# -# - CMP0026 to allow access to the LOCATION target property -# - CMP0048 to indicate that we want to deal with the *VERSION* -# variables ourselves -if (POLICY CMP0026) - cmake_policy(SET CMP0026 OLD) -endif() - -if (POLICY CMP0048) - cmake_policy(SET CMP0048 OLD) -endif() - -# set the behavior of the policy 0054 to NEW. (i.e. do not implicitly -# expand variables in if statements) -if (POLICY CMP0054) - cmake_policy(SET CMP0054 NEW) -endif() - -# include special -if (CMAKE_VERSION VERSION_LESS "2.8.3") - message (STATUS "Enabling compatibility modules for CMake 2.8.3") - list (APPEND CMAKE_MODULE_PATH "${OPM_MACROS_ROOT}/cmake/Modules/compat-2.8.3") -endif (CMAKE_VERSION VERSION_LESS "2.8.3") - -if (CMAKE_VERSION VERSION_LESS "2.8.5") - message (STATUS "Enabling compatibility modules for CMake 2.8.5") - list (APPEND CMAKE_MODULE_PATH "${OPM_MACROS_ROOT}/cmake/Modules/compat-2.8.5") -endif (CMAKE_VERSION VERSION_LESS "2.8.5") - -if (CMAKE_VERSION VERSION_LESS "2.8.7") - message (STATUS "Enabling compatibility modules for CMake 2.8.7") - list (APPEND CMAKE_MODULE_PATH "${OPM_MACROS_ROOT}/cmake/Modules/compat-2.8.7") -endif (CMAKE_VERSION VERSION_LESS "2.8.7") - -# don't write default flags into the cache, preserve that for user set values -include (AddOptions) -no_default_options () - -# C++ project -project (${${project}_NAME}) -enable_language (C) -enable_language (CXX) - -# print system information to better pinpoint issues from log alone -include (UseSystemInfo) -system_info () - -# very early try to print repo id (to pinpoint version if something goes wrong) -include (UseVCSInfo) -vcs_info () - -# print toolchain information to identify compilers with potential bugs -include (UseCompVer) -compiler_info () -linker_info () - -# default settings: build static debug library -include (OpmDefaults) -opm_defaults (${project}) -message (STATUS "Build type: ${CMAKE_BUILD_TYPE}") - -# use tricks to do faster builds -include (UseFastBuilds) - -# precompiled headers -include (UsePrecompHeaders) - -# optimize full if we're not doing a debug build -include (UseOptimization) - -# turn on all warnings; this must be done before adding any -# dependencies, in case they alter the list of warnings -include (UseWarnings) - -# parallel computing must be explicitly enabled -option (USE_MPI "Use Message Passing Interface for parallel computing" OFF) -if (NOT USE_MPI) - set (CMAKE_DISABLE_FIND_PACKAGE_MPI TRUE) -endif (NOT USE_MPI) - -# parallel programming -include (UseOpenMP) -find_openmp (${project}) -include (UseThreads) -find_threads (${project}) - -# callback hook to setup additional dependencies -if (COMMAND prereqs_hook) - prereqs_hook () -endif (COMMAND prereqs_hook) - -# macro to set standard variables (INCLUDE_DIRS, LIBRARIES etc.) -include (OpmFind) -find_and_append_package_list_to (${project} ${${project}_DEPS}) - -# set aliases to probed variables -include (OpmAliases) - -# remove the dependency on the testing framework from the main library; -# it is not possible to query for Boost twice with different components. -list (REMOVE_ITEM "${project}_LIBRARIES" "${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}") - -# don't import more libraries than we need to -include (UseOnlyNeeded) - -# put debug information into every executable -include (UseDebugSymbols) - -# detect if Boost is in a shared library -include (UseDynamicBoost) - -# needed for Debian installation scheme -include (UseMultiArch) - -# Run conditional file hook -files_hook() - -# this module contains code to figure out which files is where -include (OpmFiles) -opm_auto_dirs () - -# put libraries in lib/ -opm_out_dirs () - -# identify the compilation units in the library; sources in opm/, -# tests files in tests/, examples in tutorials/ and examples/ -opm_sources (${project}) - -# processing after base sources have been identified -if (COMMAND sources_hook) - sources_hook () -endif (COMMAND sources_hook) - -# convenience macro to add version of another suite, e.g. dune-common -macro (opm_need_version_of what) - string (TOUPPER "${what}" _WHAT) - string (REPLACE "-" "_" _WHAT "${_WHAT}") - list (APPEND ${project}_CONFIG_IMPL_VARS - ${_WHAT}_VERSION_MAJOR ${_WHAT}_VERSION_MINOR ${_WHAT}_VERSION_REVISION - ) -endmacro (opm_need_version_of suite module) - -# use this hook to add version macros before we write to config.h -if (COMMAND config_hook) - config_hook () -endif (COMMAND config_hook) - -# create configuration header which describes available features -# necessary to compile this library. singular version is the names that -# is required by this project alone, plural version transitively -# includes the necessary defines by the dependencies -include (ConfigVars) -list (APPEND ${project}_CONFIG_VARS ${${project}_CONFIG_VAR}) - -# write configuration variables to this file. note that it is a temporary. -# _CONFIG_IMPL_VARS are defines that are only written to config.h internal -# to this project; they are not exported to any installed files. -# TESTING_CONFIG_VARS is what's required by the unit tests, and is therefore -# added in an ad-hoc manner to avoid putting dependencies to it in the module -# requirement file. (it should be added if there is .h code that needs it) -message (STATUS "Writing config file \"${PROJECT_BINARY_DIR}/config.h\"...") -set (CONFIG_H "${PROJECT_BINARY_DIR}/config.h.tmp") -configure_vars ( - FILE CXX ${CONFIG_H} - WRITE ${${project}_CONFIG_VARS} - ${${project}_CONFIG_IMPL_VARS} - ${TESTING_CONFIG_VARS} - ) - -# call this hook to let it setup necessary conditions for Fortran support -if (COMMAND fortran_hook) - fortran_hook () -endif (COMMAND fortran_hook) - -if (${project}_FORTRAN_IF) - include (UseFortranWrappers) - define_fc_func ( - APPEND ${CONFIG_H} - IF ${${project}_FORTRAN_IF} - ) -endif (${project}_FORTRAN_IF) - -# overwrite the config.h that is used by the code only if we have some -# real changes. thus, we don't have to recompile if a reconfigure is run -# due to some files being added, for instance -execute_process (COMMAND - ${CMAKE_COMMAND} -E copy_if_different ${CONFIG_H} ${PROJECT_BINARY_DIR}/config.h - ) - -# compile main library; pull in all required includes and libraries -include (OpmCompile) -opm_compile (${project}) - -# installation target: copy the library together with debug and -# configuration files to system directories -include (OpmInstall) -if (COMMAND install_hook) - install_hook () -endif (COMMAND install_hook) -opm_install (${project}) -message (STATUS "This build defaults to installing in ${CMAKE_INSTALL_PREFIX}") - -# installation of CMake modules to help user programs locate the library -include (OpmProject) -opm_cmake_config (${project}) - -# routines to build satellites such as tests, tutorials and samples -include (OpmSatellites) - -# example programs are found in the tutorials/ and examples/ directory -option (BUILD_EXAMPLES "Build the examples/ tree" ON) -if (BUILD_EXAMPLES) - opm_compile_satellites (${project} examples "" "") -endif (BUILD_EXAMPLES) - -opm_compile_satellites (${project} additionals EXCLUDE_FROM_ALL "") - -# attic are programs which are not quite abandoned yet; however, they -# are not actively maintained, so they should not be a part of the -# default compile -opm_compile_satellites (${project} attic EXCLUDE_FROM_ALL "") - -# infrastructure for testing -enable_testing () -include (CTest) - -# conditionally disable tests when features aren't available -macro (cond_disable_test name) - if ((NOT DEFINED HAVE_${name}) OR (NOT HAVE_${name})) - message (STATUS "${name} test disabled, since ${name} is not found.") - string (TOLOWER "${name}" name_lower) - get_filename_component (test_${name}_FILE "tests/test_${name_lower}.cpp" ABSOLUTE) - list (REMOVE_ITEM tests_SOURCES "${test_${name}_FILE}") - endif ((NOT DEFINED HAVE_${name}) OR (NOT HAVE_${name})) -endmacro (cond_disable_test name) - -# use this target to run all tests -add_custom_target (check - COMMAND ${CMAKE_CTEST_COMMAND} - DEPENDS test-suite - COMMENT "Checking if library is functional" - VERBATIM - ) - -# special processing for tests -if (COMMAND tests_hook) - tests_hook () -endif (COMMAND tests_hook) - -# make datafiles necessary for tests available in output directory -if (BUILD_TESTING) - opm_data (tests datafiles "${tests_DIR}") - opm_compile_satellites (${project} tests "" "${tests_REGEXP}") -endif (BUILD_TESTING) - -# use this target to check local git commits -add_custom_target(check-commits - COMMAND ${CMAKE_COMMAND} - -DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR} - -DCMAKE_BINARY_DIR=${CMAKE_BINARY_DIR} - -P ${OPM_MACROS_ROOT}/cmake/Scripts/CheckCommits.cmake) - -# generate documentation from source code with Doxygen; -# setup install target for this documentation -include (OpmDoc) -opm_doc (${project} ${doxy_dir}) - -# provide compatibility with using this build in dunecontrol -include (DuneCompat) -include (LibtoolArchives) -if (${project}_TARGET) - configure_la (${project} ${${project}_TARGET} ${project}_LIBTOOL_ARCHIVE) -endif () - -### clean in-source builds ### -include (OpmDistClean) -opm_dist_clean (${project}) - -### emulate the with-xxx feature of autotools; -include (OpmKnown) - -# make sure we rebuild if dune.module changes -configure_file ( - "${CMAKE_CURRENT_SOURCE_DIR}/dune.module" - "${CMAKE_CURRENT_BINARY_DIR}/dunemod.tmp" - COPYONLY - ) - -# make sure updated version information is available in the source code -include (UseVersion) - -# update the cache for next run -write_back_options () diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmPackage.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmPackage.cmake deleted file mode 100644 index 0ac21e23c8..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmPackage.cmake +++ /dev/null @@ -1,417 +0,0 @@ -# - Find routine for OPM-like modules -# -# Synopsis: -# -# find_opm_package (module deps header lib defs prog conf) -# -# where -# -# module Name of the module, e.g. "dune-common"; this will be the -# stem of all variables defined (see below). -# deps Semi-colon-separated list of dependent modules which must -# be present; those that are required must be marked as such -# explicitly. Quote if more than one word is necessary to -# describe the dependency. -# header Name of the header file to probe for, e.g. -# "dune/common/fvector.hh". Note that you should have to same -# relative path here as is used in the header files. -# lib Name of the library to probe for, e.g. "dunecommon" -# defs Symbols that should be passed to compilations -# prog Program that should compile if library is present -# conf Symbols that should be present in config.h -# -# It will provide these standard Find-module variables: -# -# ${module}_INCLUDE_DIRS Directory of header files -# ${module}_LIBRARIES Directory of shared object files -# ${module}_DEFINITIONS Defines that must be set to compile -# ${module}_CONFIG_VARS List of defines that should be in config.h -# HAVE_${MODULE} Binary value to use in config.h -# -# Note: Arguments should be quoted, otherwise a list will spill into the -# next argument! - -# Copyright (C) 2012 Uni Research AS -# This file is licensed under the GNU General Public License v3.0 - -# - -include (OpmFind) - -option (SIBLING_SEARCH "Search sibling directories before system paths" ON) -mark_as_advanced (SIBLING_SEARCH) - -# append all items from src into dst; both must be *names* of lists -macro (append_found src dst) - foreach (_item IN LISTS ${src}) - if (NOT "${_item}" MATCHES "-NOTFOUND$") - list (APPEND ${dst} ${_item}) - endif (NOT "${_item}" MATCHES "-NOTFOUND$") - endforeach (_item) -endmacro (append_found src dst) - -macro (find_opm_package module deps header lib defs prog conf) - # in addition to accepting mod-ule_ROOT, we also accept the somewhat - # more idiomatic MOD_ULE_ROOT variant - string (TOUPPER "${module}" MODULE_UPPER) - string (REPLACE "-" "_" MODULE "${MODULE_UPPER}") - - # if someone else has included this test, don't do it again - if (${MODULE}_FOUND OR ${module}_FOUND) - return () - endif () - - # variables to pass on to other packages - if (${module}_FIND_QUIETLY) - set (_${module}_quiet "QUIET") - else (${module}_FIND_QUIETLY) - set (_${module}_quiet "") - endif (${module}_FIND_QUIETLY) - if (${module}_FIND_REQUIRED) - set (_${module}_required "REQUIRED") - else (${module}_FIND_REQUIRED) - set (_${module}_required "") - endif (${module}_FIND_REQUIRED) - - # see if there is a pkg-config entry for this package, and use those - # settings as a starting point - find_package (PkgConfig) - pkg_check_modules (PkgConf_${module} QUIET ${module}) - - # these variables have non-standard names in FindPkgConfig (sic) - set (${module}_DEFINITIONS ${PkgConf_${module}_CFLAGS_OTHER}) - set (${module}_LINKER_FLAG ${PkgConf_${module}_LDFLAGS_OTHER}) - - # try to figure out whether we are in a subdir build tree, and attempt - # to put the same name as the appropriate build tree for the module - get_filename_component (_build_dir "${CMAKE_CURRENT_BINARY_DIR}" NAME) - - # don't bother if we are in a project specific directory already - # (assuming no-one wants to name the build dir after another module!) - if ("${_build_dir}" STREQUAL "${PROJECT_NAME}") - set (_build_dir "") - endif ("${_build_dir}" STREQUAL "${PROJECT_NAME}") - - # if the user hasn't specified any location, and it isn't found - # in standard system locations either, then start to wander - # about and look for it in proximity to ourself. Qt Creator likes - # to put the build-directories as siblings to the source trees, - # but with a -build suffix, DUNE likes to have the the build tree - # in a "build-cmake" sub-directory of each module - set(workaround_cmake_bug 0) - if(${module}_DIR}) - set(workaround_cmake_bug 1) - endif() - if(${module}_ROOT}) - set(workaround_cmake_bug 1) - endif() - if(${MODULE}_ROOT}) - set(workaround_cmake_bug 1) - endif() - if (NOT workaround_cmake_bug) - string (TOLOWER "${module}" _module_lower) - set (_guess - "../${module}" - "../${_module_lower}" - ) - set (_guess_bin_only - "../${module}-build" - "../${_module_lower}-build" - ) - - # look in similar dirs for the other module - if (_build_dir) - list (APPEND _guess_bin_only - "../../${module}/${_build_dir}" - "../../${_module_lower}/${_build_dir}" - ) - endif (_build_dir) - - # generate items that are in the build, not source dir - set (_guess_bin) - foreach (_item IN ITEMS ${_guess} ${_guess_bin_only}) - list (APPEND _guess_bin "${PROJECT_BINARY_DIR}/${_item}") - endforeach (_item) - set (_no_system "") - else () - # start looking at the paths in this order - set (_guess_bin - ${${module}_DIR} - ${${module}_ROOT} - ${${MODULE}_ROOT} - ) - # if every package is installed directly in the "suite" directory - # (e.g. /usr) then allow us to back-track one directory from the - # module sub-dir that was added by OpmFind (this happens incidently - # already for the source do to the out-of-source support) - if ("${${MODULE}_ROOT}" MATCHES "/${module}$") - get_filename_component (_suite_parent ${${MODULE}_ROOT} PATH) - list (APPEND _guess_bin - ${_suite_parent} - ${_suite_parent}/${module} - ${_suite_parent}/${module}/${_build_dir} - ) - endif ("${${MODULE}_ROOT}" MATCHES "/${module}$") - # when we look for the source, it may be that we have been specified - # a build directory which is a sub-dir of the source, so we look in - # the parent also - set (_guess - ${${module}_DIR} - ${${module}_ROOT} - ${${MODULE}_ROOT} - ) - # only add parent directories for those variants that are actually set - # (otherwise, we'll inadvertedly add the root directory (=all)) - if (${module}_DIR) - list (APPEND _guess ${${module}_DIR}/..) - endif (${module}_DIR) - if (${module}_ROOT) - list (APPEND _guess ${${module}_ROOT}/..) - endif (${module}_ROOT) - if (${MODULE}_ROOT) - list (APPEND _guess ${${MODULE}_ROOT}/..) - endif (${MODULE}_ROOT) - # don't search the system paths! that would be dangerous; if there - # is a problem in our own specified directory, we don't necessarily - # want an old version that is left in one of the system paths! - set (_no_system "NO_DEFAULT_PATH") - endif () - - # by specifying _guess in the HINTS section, it gets searched before - # the system locations as well. the CMake documentation has a cloudy - # recommendation, but it ends up like this: if NO_DEFAULT_PATH is - # specified, then PATHS is used. Otherwise, it looks in HINTS, then in - # system paths, and the finally in PATHS (!) - if (SIBLING_SEARCH) - set (_guess_hints ${_guess}) - set (_guess_hints_bin ${_guess_bin}) - else (SIBLING_SEARCH) - set (_guess_hints) - set (_guess_hints_bin) - endif (SIBLING_SEARCH) - - # if an include directory is specified directly (e.g. OPM_CORE_INCLUDE_DIR= - # /usr/include/opm-2013.03) then this overrides everything else. Notice that - # this variable uses the fully capitalized version of the name. - if (${MODULE}_INCLUDE_DIR) - set (_guess "${${MODULE}_INCLUDE_DIR}") - set (_no_system_incl "NO_DEFAULT_PATH") - else () - set (_no_system_incl "${_no_system}") - endif () - - # search for this include and library file to get the installation - # directory of the package; hints are searched before the system locations, - # paths are searched afterwards - find_path (${module}_INCLUDE_DIR - NAMES "${header}" - PATHS ${_guess} - HINTS ${PkgConf_${module}_INCLUDE_DIRS} ${_guess_hints} - PATH_SUFFIXES "include" - ${_no_system_incl} - ) - - # some modules are all in headers - if (NOT "${lib}" STREQUAL "") - if (CMAKE_SIZEOF_VOID_P) - math (EXPR _BITS "8 * ${CMAKE_SIZEOF_VOID_P}") - endif (CMAKE_SIZEOF_VOID_P) - - # again, we may directly override the location of the library alone by - # specifying e.g. OPM_CORE_LIB_DIR. notice that this is a *directory* - # and not the name of the library - if (${MODULE}_LIB_DIR) - set (_guess_bin "${${MODULE}_LIB_DIR}") - set (_no_system_lib "NO_DEFAULT_PATH") - else () - set (_no_system_lib "${_no_system}") - endif () - - # if there is more than one library, then look for all of them, putting - # them in variables with the name of the library appended. however, the - # first entry is assumed to be the "primary" library and will be named - # like the module. thus, with a lib entry of "foo;bar", the first library - # is called ${module}_LIBRARY and the second ${module}_LIBRARY_bar - foreach (_lib IN ITEMS ${lib}) - # don't include any suffix if it is the first one - if ("${lib}" MATCHES "^${_lib}") - set (_which) - else () - set (_which "_${_lib}") - endif () - find_library (${module}_LIBRARY${_which} - NAMES "${_lib}" - PATHS ${_guess_bin} - HINTS ${PkgConf_${module}_LIBRARY_DIRS} ${_guess_hints_bin} - PATH_SUFFIXES "lib" "lib/Debug" "lib/Release" "lib/.libs" ".libs" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "build-cmake/lib" - ${_no_system_lib} - ) - # debug info if we didn't find the desired library - if (NOT ${module}_LIBRARY${_which}) - message (STATUS "Failed to find library \"${_lib}\" for module ${module}") - endif () - endforeach (_lib) - else (NOT "${lib}" STREQUAL "") - set (${module}_LIBRARY "") - endif (NOT "${lib}" STREQUAL "") - - # add dependencies so that our result variables are complete - # list of necessities to build with the software - set (${module}_INCLUDE_DIRS "${${module}_INCLUDE_DIR}") - foreach (_lib IN ITEMS ${lib}) - if ("${lib}" MATCHES "^${_lib}") - set (${module}_LIBRARIES "${${module}_LIBRARY}") - else () - list (APPEND ${module}_LIBRARIES "${${module}_LIBRARY_${_lib}}") - endif () - endforeach (_lib) - # period because it should be something that evaluates to true - # in find_package_handle_standard_args - set (${module}_ALL_PREREQS ".") - foreach (_dep IN ITEMS ${deps}) - separate_arguments (_${module}_args UNIX_COMMAND ${_dep}) - if (_${module}_args) - # keep REQUIRED in the arguments only if we were required ourself - # "required-ness" is not transitive as far as CMake is concerned - # (i.e. if an optional package requests a package to be required, - # the build will fail if it's not found) - string (REPLACE "REQUIRED" "${_${module}_required}" _args_req "${_${module}_args}") - find_and_append_package_to (${module} ${_args_req} ${_${module}_quiet}) - list (GET _${module}_args 0 _name_only) - string (TOUPPER "${_name_only}" _NAME_ONLY) - string (REPLACE "-" "_" _NAME_ONLY "${_NAME_ONLY}") - # check manually if it was found if REQUIRED; otherwise poison the - # dependency list which is checked later (so that it will fail) - if (("${_${module}_args}" MATCHES "REQUIRED") AND NOT (${_name_only}_FOUND OR ${_NAME_ONLY}_FOUND)) - list (APPEND ${module}_ALL_PREREQS "${_name_only}-NOTFOUND") - endif () - else () - message (WARNING "Empty dependency in find module for ${module} (check for trailing semi-colon)") - endif () - endforeach (_dep) - - # since find_and_append_package_to is a macro, this variable have - # probably been overwritten (due to its common name); it is now - # this module's last dependency instead of the name of the module - # itself, so it must be restored - string (TOUPPER "${module}" MODULE_UPPER) - string (REPLACE "-" "_" MODULE "${MODULE_UPPER}") - - # compile with this option to avoid avalanche of warnings - set (${module}_DEFINITIONS "${${module}_DEFINITIONS}") - foreach (_def IN ITEMS ${defs}) - list (APPEND ${module}_DEFINITIONS "-D${_def}") - endforeach (_def) - - # tidy the lists before returning them - remove_dup_deps (${module}) - - # these defines are used in dune/${module} headers, and should be put - # in config.h when we include those - foreach (_var IN ITEMS ${conf}) - # massage the name to remove source code formatting - string (REGEX REPLACE "^[\n\t\ ]+" "" _var "${_var}") - string (REGEX REPLACE "[\n\t\ ]+$" "" _var "${_var}") - list (APPEND ${module}_CONFIG_VARS ${_var}) - endforeach (_var) - - # these are the defines that should be set when compiling - # without config.h - config_cmd_line (${module}_CMD_CONFIG ${module}_CONFIG_VARS) - - # check that we can compile a small test-program - include (CMakePushCheckState) - cmake_push_check_state () - include (CheckCXXSourceCompiles) - # only add these if they are actually found; otherwise it won't - # compile and the variable won't be set - append_found (${module}_INCLUDE_DIRS CMAKE_REQUIRED_INCLUDES) - append_found (${module}_LIBRARIES CMAKE_REQUIRED_LIBRARIES) - # since we don't have any config.h yet - list (APPEND CMAKE_REQUIRED_DEFINITIONS ${${module}_DEFINITIONS}) - list (APPEND CMAKE_REQUIRED_DEFINITIONS ${${module}_CMD_CONFIG}) - check_cxx_source_compiles ("${prog}" HAVE_${MODULE}) - cmake_pop_check_state () - - # write status message in the same manner as everyone else - include (FindPackageHandleStandardArgs) - if ("${lib}" STREQUAL "") - set (_lib_var "") - set (_and_lib_var) - else ("${lib}" STREQUAL "") - foreach (_lib IN ITEMS ${lib}) - if ("${lib}" MATCHES "^${_lib}") - set (_lib_var "${module}_LIBRARY") - set (_and_lib_var AND ${_lib_var}) - else () - list (APPEND _lib_var "${module}_LIBRARY_${_lib}") - set (_and_lib_var ${_and_lib_var} AND "${module}_LIBRARY_${_lib}") - endif () - endforeach (_lib) - endif ("${lib}" STREQUAL "") - # if the search is going to fail, then write these variables to - # the console as well as a diagnostics - if ((NOT (${module}_INCLUDE_DIR ${_and_lib_var} AND HAVE_${MODULE})) - AND (_${module}_required OR NOT _${module}_quiet)) - if (DEFINED ${module}_DIR) - message (STATUS "${module}_DIR = ${${module}_DIR}") - elseif (DEFINED ${module}_ROOT) - message (STATUS "${module}_ROOT = ${${module}_ROOT}") - elseif (DEFINED ${MODULE}_ROOT) - message (STATUS "${MODULE}_ROOT = ${${MODULE}_ROOT}") - endif (DEFINED ${module}_DIR) - endif ((NOT (${module}_INCLUDE_DIR ${_and_lib_var} AND HAVE_${MODULE})) - AND (_${module}_required OR NOT _${module}_quiet)) - if ("${${module}_ALL_PREREQS}" MATCHES "-NOTFOUND") - message (STATUS "${module} prereqs: ${${module}_ALL_PREREQS}") - endif () - find_package_handle_standard_args ( - ${module} - DEFAULT_MSG - ${module}_INCLUDE_DIR ${_lib_var} HAVE_${MODULE} ${module}_ALL_PREREQS - ) - - # allow the user to override these from user interface - mark_as_advanced (${module}_INCLUDE_DIR) - mark_as_advanced (${module}_LIBRARY) - - # some genius that coded the FindPackageHandleStandardArgs figured out - # that the module name should be in uppercase (?!) - set (${module}_FOUND "${${MODULE_UPPER}_FOUND}") - set (${MODULE}_FOUND "${${MODULE_UPPER}_FOUND}") - - # print everything out if we're asked to - if (${module}_DEBUG) - debug_find_vars (${module}) - endif (${module}_DEBUG) -endmacro (find_opm_package module deps header lib defs prog conf) - -# print all variables defined by the above macro -function (debug_find_vars module) - message (STATUS "${module}_FOUND = ${${module}_FOUND}") - message (STATUS "${module}_INCLUDE_DIRS = ${${module}_INCLUDE_DIRS}") - message (STATUS "${module}_LIBRARIES = ${${module}_LIBRARIES}") - message (STATUS "${module}_DEFINITIONS = ${${module}_DEFINITIONS}") - message (STATUS "${module}_CONFIG_VARS = ${${module}_CONFIG_VARS}") - message (STATUS "${module}_LINKER_FLAGS = ${${module}_LINKER_FLAGS}") - string (TOUPPER ${module} MODULE) - string (REPLACE "-" "_" MODULE ${MODULE}) - message (STATUS "HAVE_${MODULE} = ${HAVE_${MODULE}}") -endfunction (debug_find_vars module) - -# generate a command-line that can be used to pass variables before -# config.h is available (such as probe tests). varname is the *name* -# of the variable to receive the result, defs is a list of the *names* -# which should be passed -function (config_cmd_line varname defs) - # process each variable - foreach (_var IN LISTS ${defs}) - # only generate an entry if the define was actually set - if ((DEFINED ${_var}) AND (NOT "${${_var}}" STREQUAL "")) - # add command-line option to define this variable - list (APPEND _cmdline "-D${_var}=${${_var}}") - endif ((DEFINED ${_var}) AND (NOT "${${_var}}" STREQUAL "")) - endforeach (_var) - # return the resulting command-line options for defining vars - set (${varname} "${_cmdline}" PARENT_SCOPE) -endfunction (config_cmd_line) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmProject.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmProject.cmake deleted file mode 100644 index 3371a9b030..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmProject.cmake +++ /dev/null @@ -1,154 +0,0 @@ -# - Helper routines for opm-core like projects - -include (LibtoolArchives) # linker_cmdline - -# convert a list back to a command-line string -function (unseparate_args var_name prefix value) - separate_arguments (value) - foreach (item IN LISTS value) - set (prefixed_item "${prefix}${item}") - if (${var_name}) - set (${var_name} "${${var_name}} ${prefixed_item}") - else (${var_name}) - set (${var_name} "${prefixed_item}") - endif (${var_name}) - endforeach (item) - set (${var_name} "${${var_name}}" PARENT_SCOPE) -endfunction (unseparate_args var_name prefix value) - -# wrapper to set variables in pkg-config file -function (configure_pc_file name source dest prefix libdir includedir) - # escape set of standard strings - unseparate_args (includes "-I" "${${name}_INCLUDE_DIRS}") - unseparate_args (defs "" "${${name}_DEFINITIONS}") - linker_cmdline (STRING INTO libs FROM ${${name}_LIBRARIES}) - - # necessary to make these variables visible to configure_file - set (name "${${name}_NAME}") - set (description "${${name}_DESCRIPTION}") - set (major "${${name}_VERSION_MAJOR}") - set (minor "${${name}_VERSION_MINOR}") - set (target "${${name}_LIBRARY}") - linker_cmdline (STRING INTO target from ${target}) - - configure_file (${source} ${dest} @ONLY) -endfunction (configure_pc_file name source dist prefix libdir includedir) - -function (configure_cmake_file name variant version) - # declarative list of the variable names that are used in the template - # and that must be defined in the project to be exported - set (variable_suffices - DESCRIPTION - VERSION - DEFINITIONS - INCLUDE_DIRS - LIBRARY_DIRS - LINKER_FLAGS - CONFIG_VARS - LIBRARY - LIBRARIES - TARGET - ) - - # set these variables temporarily (this is in a function scope) so - # they are available to the template (only) - foreach (suffix IN LISTS variable_suffices) - set (opm-project_${suffix} "${${name}_${suffix}}") - endforeach (suffix) - set (opm-project_NAME "${${name}_NAME}") - - # make the file substitutions - configure_file ( - ${template_dir}/opm-project-config${version}.cmake.in - ${PROJECT_BINARY_DIR}/${${name}_NAME}-${variant}${version}.cmake - @ONLY - ) -endfunction (configure_cmake_file name) - -# installation of CMake modules to help user programs locate the library -function (opm_cmake_config name) - # assume that the template is located in cmake/Templates (cannot use - # the current directory since this is in a function and the directory - # at runtime not at definition will be used - set (template_dir "${OPM_MACROS_ROOT}/cmake/Templates") - - # write configuration file to locate library - set(OPM_PROJECT_EXTRA_CODE ${OPM_PROJECT_EXTRA_CODE_INTREE}) - configure_cmake_file (${name} "config" "") - configure_cmake_file (${name} "config" "-version") - configure_vars ( - FILE CMAKE "${PROJECT_BINARY_DIR}/${${name}_NAME}-config.cmake" - APPEND "${${name}_CONFIG_VARS}" - ) - - # config-mode .pc file; use this to find the build tree - configure_pc_file ( - ${name} - ${template_dir}/opm-project.pc.in - ${PROJECT_BINARY_DIR}/${${name}_NAME}.pc - ${PROJECT_BINARY_DIR} - ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} - ${PROJECT_SOURCE_DIR} - ) - - # replace the build directory with the target directory in the - # variables that contains build paths - string (REPLACE - "${PROJECT_SOURCE_DIR}" - "${CMAKE_INSTALL_PREFIX}/include${${name}_VER_DIR}" - ${name}_INCLUDE_DIRS - "${${name}_INCLUDE_DIRS}" - ) - string (REPLACE - "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}" - "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}${${name}_VER_DIR}" - ${name}_LIBRARY - "${${name}_LIBRARY}" - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}${${name}_VER_DIR}" - ) - # create a config mode file which targets the install directory instead - # of the build directory (using the same input template) - set(OPM_PROJECT_EXTRA_CODE ${OPM_PROJECT_EXTRA_CODE_INSTALLED}) - configure_cmake_file (${name} "install" "") - configure_vars ( - FILE CMAKE "${PROJECT_BINARY_DIR}/${${name}_NAME}-install.cmake" - APPEND "${${name}_CONFIG_VARS}" - ) - # this file gets copied to the final installation directory - install ( - FILES ${PROJECT_BINARY_DIR}/${${name}_NAME}-install.cmake - DESTINATION share/cmake${${name}_VER_DIR}/${${name}_NAME} - RENAME ${${name}_NAME}-config.cmake - ) - # assume that there exists a version file already - install ( - FILES ${PROJECT_BINARY_DIR}/${${name}_NAME}-config-version.cmake - DESTINATION share/cmake${${name}_VER_DIR}/${${name}_NAME} - ) - - # find-mode .pc file; use this to locate system installation - configure_pc_file ( - ${name} - ${template_dir}/opm-project.pc.in - ${PROJECT_BINARY_DIR}/${${name}_NAME}-install.pc - ${CMAKE_INSTALL_PREFIX} - ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}${${name}_VER_DIR} - ${CMAKE_INSTALL_PREFIX}/include${${name}_VER_DIR} - ) - - # put this in the right system location; if we have binaries then it - # should go in the arch-specific lib/ directory, otherwise use the - # common/noarch lib/ directory (these targets come from UseMultiArch) - if (${name}_TARGET) - set (_pkg_dir ${CMAKE_INSTALL_LIBDIR}) - else () - set (_pkg_dir ${LIBDIR_MULTIARCH_UNAWARE}) - endif () - install ( - FILES ${PROJECT_BINARY_DIR}/${${name}_NAME}-install.pc - DESTINATION ${CMAKE_INSTALL_PREFIX}/${_pkg_dir}/pkgconfig${${name}_VER_DIR}/ - RENAME ${${name}_NAME}.pc - ) -endfunction (opm_cmake_config name) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmPythonTest.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmPythonTest.cmake deleted file mode 100644 index df6579cdf2..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmPythonTest.cmake +++ /dev/null @@ -1,7 +0,0 @@ -function (opm_add_python_test TEST_NAME TEST_SCRIPT) - add_test(NAME ${TEST_NAME} - WORKING_DIRECTORY ${PROJECT_BINARY_DIR} - COMMAND ${TEST_SCRIPT} ${ARGN}) - - set_property(TEST ${TEST_NAME} PROPERTY ENVIRONMENT "PYTHONPATH=${ERT_PYTHON_PATH}:${CWRAP_PYTHON_PATH}:${PYTHONPATH}") -endfunction(opm_add_python_test) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmSatellites.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmSatellites.cmake deleted file mode 100644 index cb54d52ad6..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmSatellites.cmake +++ /dev/null @@ -1,361 +0,0 @@ -# - Build satellites that are dependent of main library - -option(ADD_DISABLED_CTESTS "Add the tests which are disabled due to failed preconditions to the ctest output (this makes ctest return an error if such a test is present)" ON) -mark_as_advanced(ADD_DISABLED_CTESTS) - -# -# Enumerate all source code in a "satellite" directory such as tests/, -# compile each of them and optionally set them as a test for CTest to -# run. They will be linked to the main library created by the project. -# -# The following suffices must be defined for the opm prefix passed as -# parameter: -# -# _LINKER_FLAGS Necessary flags to link with this library -# _TARGET CMake target which creates the library -# _LIBRARIES Other dependencies that must also be linked - -# Synopsis: -# opm_compile_satellites (opm satellite excl_all test_regexp) -# -# Parameters: -# opm Prefix of the variable which contain information -# about the library these satellites depends on, e.g. -# pass "opm-core" if opm-core_TARGET is the name of -# the target the builds this library. Variables with -# suffixes _TARGET and _LIBRARIES must exist. -# -# satellite Prefix of variable which contain the names of the -# files, e.g. pass "tests" if the files are in the -# variable tests_SOURCES. Variables with suffixes -# _DATAFILES, _SOURCES and _DIR should exist. This -# name is also used as name of the target that builds -# all these files. -# -# excl_all EXCLUDE_FROM_ALL if these targets should not be built by -# default, otherwise empty string. -# -# test_regexp Regular expression which picks the name of a test -# out of the filename, or blank if no test should be -# setup. -# -# Example: -# opm_compile_satellites (opm-core test "" "^test_([^/]*)$") -# -macro (opm_compile_satellites opm satellite excl_all test_regexp) - # if we are going to build the tests always, then make sure that - # the datafiles are present too - if (NOT (${excl_all} MATCHES "EXCLUDE_FROM_ALL")) - set (_incl_all "ALL") - else (NOT (${excl_all} MATCHES "EXCLUDE_FROM_ALL")) - set (_incl_all "") - endif (NOT (${excl_all} MATCHES "EXCLUDE_FROM_ALL")) - - # if a set of datafiles has been setup, pull those in - add_custom_target (${satellite} ${_incl_all}) - if (${satellite}_DATAFILES) - add_dependencies (${satellite} ${${satellite}_DATAFILES}) - endif (${satellite}_DATAFILES) - - # compile each of these separately - foreach (_sat_FILE IN LISTS ${satellite}_SOURCES) - get_filename_component (_sat_NAME "${_sat_FILE}" NAME_WE) - add_executable (${_sat_NAME} ${excl_all} ${_sat_FILE}) - add_dependencies (${satellite} ${_sat_NAME}) - set_target_properties (${_sat_NAME} PROPERTIES - LINK_FLAGS "${${opm}_LINKER_FLAGS_STR}" - ) - # are we building a test? luckily, the testing framework doesn't - # require anything else, so we don't have to figure out where it - # should go in the library list - if (NOT "${test_regexp}" STREQUAL "") - set (_test_lib "${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}") - else (NOT "${test_regexp}" STREQUAL "") - set (_test_lib "") - endif (NOT "${test_regexp}" STREQUAL "") - target_link_libraries (${_sat_NAME} ${${opm}_TARGET} ${${opm}_LIBRARIES} ${_test_lib}) - if (STRIP_DEBUGGING_SYMBOLS) - strip_debug_symbols (${_sat_NAME} _sat_DEBUG) - list (APPEND ${satellite}_DEBUG ${_sat_DEBUG}) - endif() - - # variable with regular expression doubles as a flag for - # whether tests should be setup or not - if (NOT "${test_regexp}" STREQUAL "") - foreach (_regexp IN ITEMS ${test_regexp}) - if ("${_sat_NAME}" MATCHES "${_regexp}") - string (REGEX REPLACE "${_regexp}" "\\1" _sat_FANCY "${_sat_NAME}") - endif ("${_sat_NAME}" MATCHES "${_regexp}") - endforeach (_regexp) - get_target_property (_sat_LOC ${_sat_NAME} LOCATION) - # Run tests through mpi-run. Ubuntu 14.04 provided mpi libs will crash - # in the MPI_Finalize() call otherwise. - if(MPI_FOUND) - set(_sat_LOC ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 1 ${_sat_LOC}) - endif() - if (CMAKE_VERSION VERSION_LESS "2.8.4") - add_test ( - NAME ${_sat_FANCY} - COMMAND ${CMAKE_COMMAND} -E chdir "${PROJECT_BINARY_DIR}/${${satellite}_DIR}" ${_sat_LOC} - ) - else (CMAKE_VERSION VERSION_LESS "2.8.4") - add_test (${_sat_FANCY} ${_sat_LOC}) - # run the test in the directory where the data files are - set_tests_properties (${_sat_FANCY} PROPERTIES - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/${${satellite}_DIR} - ) - endif (CMAKE_VERSION VERSION_LESS "2.8.4") - if(NOT TARGET test-suite) - add_custom_target(test-suite) - endif() - add_dependencies(test-suite "${_sat_NAME}") - endif(NOT "${test_regexp}" STREQUAL "") - - # if this program on the list of files that should be distributed? - # we check by the name of the source file - list (FIND ${satellite}_SOURCES_DIST "${_sat_FILE}" _is_util) - if (NOT (_is_util EQUAL -1)) - install (TARGETS ${_sat_NAME} RUNTIME - DESTINATION bin${${opm}_VER_DIR}/ - ) - endif (NOT (_is_util EQUAL -1)) - endforeach (_sat_FILE) -endmacro (opm_compile_satellites opm prefix) - -# Synopsis: -# opm_data (satellite target dirname files) -# -# provides these output variables: -# -# ${satellite}_INPUT_FILES List of all files that are copied -# ${satellite}_DATAFILES Name of target which copies these files -# -# Example: -# -# opm_data (tests datafiles "tests/") -# -macro (opm_data satellite target dirname) - # even if there are no datafiles, create the directory so the - # satellite programs have a homedir to run in - execute_process ( - COMMAND ${CMAKE_COMMAND} -E make_directory ${dirname} - ) - - # if ever huge test datafiles are necessary, then change this - # into "create_symlink" (on UNIX only, apparently) - set (make_avail "copy") - - # provide datafiles as inputs for the tests, by copying them - # to a tests/ directory in the output tree (if different) - set (${satellite}_INPUT_FILES) - if (NOT PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR) - foreach (input_datafile IN LISTS ${satellite}_DATA) - file (RELATIVE_PATH rel_datafile "${PROJECT_SOURCE_DIR}" ${input_datafile}) - set (output_datafile "${PROJECT_BINARY_DIR}/${rel_datafile}") - add_custom_command ( - OUTPUT ${output_datafile} - COMMAND ${CMAKE_COMMAND} - ARGS -E ${make_avail} ${input_datafile} ${output_datafile} - DEPENDS ${input_datafile} - VERBATIM - ) - list (APPEND ${satellite}_INPUT_FILES "${output_datafile}") - endforeach (input_datafile) - endif(NOT PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR) - - # setup a target which does all the copying - set (${satellite}_DATAFILES "${target}") - add_custom_target (${${satellite}_DATAFILES} - DEPENDS ${${satellite}_INPUT_FILES} - COMMENT "Making \"${satellite}\" data available in output tree" - ) - if(NOT TARGET test-suite) - add_custom_target(test-suite) - endif() - add_dependencies(test-suite ${${satellite}_DATAFILES}) -endmacro (opm_data satellite target dirname files) - -# Add a single unit test (can be orchestrated by the 'ctest' command) -# -# Synopsis: -# opm_add_test(TestName) -# -# Parameters: -# TestName Name of test -# ONLY_COMPILE Only build test but do not run it (optional) -# ALWAYS_ENABLE Force enabling test even if -DBUILD_TESTING=OFF was set (optional) -# EXE_NAME Name of test executable (optional, default: ./bin/${TestName}) -# CONDITION Condition to enable test (optional, cmake code) -# DEPENDS Targets which the test depends on (optional) -# DRIVER The script which supervises the test (optional, default: ${OPM_TEST_DRIVER}) -# DRIVER_ARGS The script which supervises the test (optional, default: ${OPM_TEST_DRIVER_ARGS}) -# TEST_ARGS Arguments to pass to test's binary (optional, default: empty) -# SOURCES Source files for the test (optional, default: ${EXE_NAME}.cpp) -# PROCESSORS Number of processors to run test on (optional, default: 1) -# TEST_DEPENDS Other tests which must be run before running this test (optional, default: None) -# LIBRARIES Libraries to link test against (optional) -# WORKING_DIRECTORY Working directory for test (optional, default: ${PROJECT_BINARY_DIR}) -# -# Example: -# -# opm_add_test(funky_test -# ALWAYS_ENABLE -# CONDITION FUNKY_GRID_FOUND -# SOURCES tests/MyFunkyTest.cpp -# LIBRARIES -lgmp -lm) -include(CMakeParseArguments) - -macro(opm_add_test TestName) - cmake_parse_arguments(CURTEST - "NO_COMPILE;ONLY_COMPILE;ALWAYS_ENABLE" # flags - "EXE_NAME;PROCESSORS;WORKING_DIRECTORY" # one value args - "CONDITION;TEST_DEPENDS;DRIVER;DRIVER_ARGS;DEPENDS;TEST_ARGS;SOURCES;LIBRARIES" # multi-value args - ${ARGN}) - - set(BUILD_TESTING "${BUILD_TESTING}") - - # set the default values for optional parameters - if (NOT CURTEST_EXE_NAME) - set(CURTEST_EXE_NAME ${TestName}) - endif() - - # try to auto-detect the name of the source file if SOURCES are not - # explicitly specified. - if (NOT CURTEST_SOURCES) - set(CURTEST_SOURCES "") - set(_SDir "${PROJECT_SOURCE_DIR}") - foreach(CURTEST_CANDIDATE "${CURTEST_EXE_NAME}.cpp" - "${CURTEST_EXE_NAME}.cc" - "tests/${CURTEST_EXE_NAME}.cpp" - "tests/${CURTEST_EXE_NAME}.cc") - if (EXISTS "${_SDir}/${CURTEST_CANDIDATE}") - set(CURTEST_SOURCES "${_SDir}/${CURTEST_CANDIDATE}") - endif() - endforeach() - endif() - - # the default working directory is the content of - # OPM_TEST_DEFAULT_WORKING_DIRECTORY or the source directory if this - # is unspecified - if (NOT CURTEST_WORKING_DIRECTORY) - if (OPM_TEST_DEFAULT_WORKING_DIRECTORY) - set(CURTEST_WORKING_DIRECTORY ${OPM_TEST_DEFAULT_WORKING_DIRECTORY}) - else() - set(CURTEST_WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) - endif() - endif() - - # don't build the tests by _default_ if BUILD_TESTING is false, - # i.e., when typing 'make' the tests are not build in that - # case. They can still be build using 'make test-suite' and they can - # be build and run using 'make check' - set(CURTEST_EXCLUDE_FROM_ALL "") - if (NOT BUILD_TESTING AND NOT CURTEST_ALWAYS_ENABLE) - set(CURTEST_EXCLUDE_FROM_ALL "EXCLUDE_FROM_ALL") - endif() - - # figure out the test driver script and its arguments. (the variable - # for the driver script may be empty. In this case the binary is run - # "bare metal".) - if (NOT CURTEST_DRIVER) - set(CURTEST_DRIVER "${OPM_TEST_DRIVER}") - endif() - if (NOT CURTEST_DRIVER_ARGS) - set(CURTEST_DRIVER_ARGS "${OPM_TEST_DRIVER_ARGS}") - endif() - - # the libraries to link against - if (NOT CURTEST_LIBRARIES) - SET(CURTEST_LIBRARIES "${${CMAKE_PROJECT_NAME}_LIBRARIES}") - endif() - - # determine if the test should be completely ignored, i.e., the - # CONDITION argument evaluates to false. the "AND OR " is a hack - # which is required to prevent CMake from evaluating the condition - # in the string. (which might evaluate to an empty string even - # though "${CURTEST_CONDITION}" is not empty.) - if ("AND OR ${CURTEST_CONDITION}" STREQUAL "AND OR ") - set(SKIP_CUR_TEST "0") - elseif(${CURTEST_CONDITION}) - set(SKIP_CUR_TEST "0") - else() - set(SKIP_CUR_TEST "1") - endif() - - if (NOT SKIP_CUR_TEST) - if (CURTEST_ONLY_COMPILE) - # only compile the binary but do not run it as a test - add_executable("${CURTEST_EXE_NAME}" ${CURTEST_EXCLUDE_FROM_ALL} ${CURTEST_SOURCES}) - target_link_libraries (${CURTEST_EXE_NAME} ${CURTEST_LIBRARIES}) - - if(CURTEST_DEPENDS) - add_dependencies("${CURTEST_EXE_NAME}" ${CURTEST_DEPENDS}) - endif() - else() - if (NOT CURTEST_NO_COMPILE) - # in addition to being run, the test must be compiled. (the - # run-only case occurs if the binary is already compiled by an - # earlier test.) - add_executable("${CURTEST_EXE_NAME}" ${CURTEST_EXCLUDE_FROM_ALL} ${CURTEST_SOURCES}) - target_link_libraries (${CURTEST_EXE_NAME} ${CURTEST_LIBRARIES}) - - if(CURTEST_DEPENDS) - add_dependencies("${CURTEST_EXE_NAME}" ${CURTEST_DEPENDS}) - endif() - - if(NOT TARGET test-suite) - add_custom_target(test-suite) - endif() - add_dependencies(test-suite "${CURTEST_EXE_NAME}") - endif() - - # figure out how the test should be run. if a test driver script - # has been specified to supervise the test binary, use it else - # run the test binary "naked". - if (CURTEST_DRIVER) - set(CURTEST_COMMAND ${CURTEST_DRIVER} ${CURTEST_DRIVER_ARGS} ${CURTEST_EXE_NAME} ${CURTEST_TEST_ARGS}) - else() - set(CURTEST_COMMAND ${PROJECT_BINARY_DIR}/bin/${CURTEST_EXE_NAME}) - if (CURTEST_TEST_ARGS) - list(APPEND CURTEST_COMMAND ${CURTEST_TEST_ARGS}) - endif() - endif() - - add_test(NAME ${TestName} - WORKING_DIRECTORY "${CURTEST_WORKING_DIRECTORY}" - COMMAND ${CURTEST_COMMAND}) - - # specify the dependencies between the tests - if (CURTEST_TEST_DEPENDS) - set_tests_properties(${TestName} PROPERTIES DEPENDS "${CURTEST_TEST_DEPENDS}") - endif() - - # tell ctest how many cores it should reserve to run the test - if (CURTEST_PROCESSORS) - set_tests_properties(${TestName} PROPERTIES PROCESSORS "${CURTEST_PROCESSORS}") - endif() - endif() - - else() # test is skipped - - # the following causes the test to appear as 'skipped' in the - # CDash dashboard. it this is removed, the test is just silently - # ignored. - if (NOT CURTEST_ONLY_COMPILE AND ADD_DISABLED_CTESTS) - add_test(${TestName} skip_test_dummy) - endif() - endif() -endmacro() - -# macro to set the default test driver script and the its default -# arguments -macro(opm_set_test_driver DriverBinary DriverDefaultArgs) - set(OPM_TEST_DRIVER "${DriverBinary}") - set(OPM_TEST_DRIVER_ARGS "${DriverDefaultArgs}") -endmacro() - -# macro to set the default test driver script and the its default -# arguments -macro(opm_set_test_default_working_directory Dir) - set(OPM_TEST_DEFAULT_WORKING_DIRECTORY "${Dir}") -endmacro() diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmStaticTargets.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmStaticTargets.cmake deleted file mode 100644 index 97a4732344..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/OpmStaticTargets.cmake +++ /dev/null @@ -1,103 +0,0 @@ -#################################################################### -# # -# Setup static targets for all submodules. # -# Useful when building a static benchmark executable # -# # -#################################################################### - -# Macros - -# Clone a git and build it statically -# If ARGN is specified installation is skipped, ARGN0 is -# a build-system target name and the rest of ARGN are build tool parameters -function(opm_from_git repo name revision) - if(ARGN) - list(GET ARGN 0 target) - list(REMOVE_AT ARGN 0) - # This is used for top build of benchmarks. - # Clones the local source tree and builds it against the static libraries, - # skipping the install step. Note that in pricinple URL instead of GIT_REPOSITORY - # could have been used, but externalproject cannot handle build directories - # which are a subdirectory of the source tree, and since that is typically the case - # we work-around by re-cloning the local git. - # The ommision of GIT_TAG ensures that we build the tip of the local git. - set(COMMANDS BUILD_COMMAND ${CMAKE_COMMAND} --build --target ${target} -- ${ARGN} - GIT_TAG ${revision} - INSTALL_COMMAND) - else() - # This is used with "normal" static builds. - set(COMMANDS GIT_TAG ${revision}) - endif() - externalproject_add(${name}-static - GIT_REPOSITORY ${repo} - PREFIX static/${name} - CONFIGURE_COMMAND PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/static/installed/lib/pkgconfig:${CMAKE_BINARY_DIR}/static/installed/${CMAKE_INSTALL_LIBDIR}/pkgconfig:$ENV{PKG_CONFIG_PATH} - ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/static/installed - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS=0 - -DBUILD_TESTING=0 -DBUILD_EXAMPLES=0 - -G ${CMAKE_GENERATOR} - ${COMMANDS} "") - set_target_properties(${name}-static PROPERTIES EXCLUDE_FROM_ALL 1) -endfunction() - -# Convenience macro for adding dependencies without having to include the -static all over -macro(opm_static_add_dependencies target) - foreach(arg ${ARGN}) - add_dependencies(${target}-static ${arg}-static) - endforeach() -endmacro() - -include(ExternalProject) -include(UseMultiArch) - -# Defaults to building master -if(NOT OPM_BENCHMARK_VERSION) - set(OPM_BENCHMARK_VERSION "origin/master") -endif() - -# ERT -externalproject_add(ert-static - GIT_REPOSITORY https://github.com/Ensembles/ert - PREFIX static/ert - GIT_TAG ${revision} - CONFIGURE_COMMAND ${CMAKE_COMMAND} - -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/static/installed - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS=0 /devel) -set_target_properties(ert-static PROPERTIES EXCLUDE_FROM_ALL 1) - -# 2015.04 release used dune v2.3.1 -if(OPM_BENCHMARK_VERSION STREQUAL "release/2015.04/final") - set(DUNE_VERSION v2.3.1) -endif() - -# Master currently uses dune v2.3.1 -if(OPM_BENCHMARK_VERSION STREQUAL "origin/master") - set(DUNE_VERSION v2.3.1) -endif() - -# Fallback -if(NOT DUNE_VERSION) - set(DUNE_VERSION v2.3.1) -endif() - -# Dune -foreach(dune_repo dune-common dune-geometry dune-grid dune-istl) - opm_from_git(http://git.dune-project.org/repositories/${dune_repo} ${dune_repo} ${DUNE_VERSION}) -endforeach() -opm_static_add_dependencies(dune-istl dune-common) -opm_static_add_dependencies(dune-geometry dune-common) -opm_static_add_dependencies(dune-grid dune-geometry) - -# OPM -foreach(opm_repo opm-common opm-parser opm-core opm-output opm-grid opm-material - opm-upscaling) - opm_from_git(https://github.com/OPM/${opm_repo} ${opm_repo} ${OPM_BENCHMARK_VERSION}) -endforeach() -opm_static_add_dependencies(opm-parser opm-common ert) -opm_static_add_dependencies(opm-core opm-parser dune-istl) -opm_static_add_dependencies(opm-grid opm-core dune-grid) -opm_static_add_dependencies(opm-material opm-core) -opm_static_add_dependencies(opm-upscaling opm-grid opm-material) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseCompVer.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseCompVer.cmake deleted file mode 100644 index e8ac09932b..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseCompVer.cmake +++ /dev/null @@ -1,108 +0,0 @@ -# - Get compiler version - -# probe the GCC version, returns empty string if GCC is not compiler -function (get_gcc_version language ver_name) - if(CMAKE_${language}_COMPILER_ID STREQUAL GNU) - # exec_program is deprecated, but execute_process does't work :-( - exec_program (${CMAKE_${language}_COMPILER} - ARGS ${CMAKE_${language}_COMPILER_ARG1} -dumpversion - OUTPUT_VARIABLE _version - ) - set (${ver_name} ${_version} PARENT_SCOPE) - else (CMAKE_${language}_COMPILER_ID STREQUAL GNU) - set (${ver_name} "" PARENT_SCOPE) - endif (CMAKE_${language}_COMPILER_ID STREQUAL GNU) -endfunction (get_gcc_version ver_name) - -# less reliable, but includes the patch number -function (get_gcc_patch language ver_name) - if(CMAKE_${language}_COMPILER_ID STREQUAL GNU) - # exec_program is deprecated, but execute_process does't work :-( - exec_program (${CMAKE_${language}_COMPILER} - ARGS ${CMAKE_${language}_COMPILER_ARG1} --version - OUTPUT_VARIABLE _version - ) - # split multi-line string into list - if (WIN32) - string (REPLACE "\r\n" ";" _version "${_version}") - else (WIN32) - string (REPLACE "\n" ";" _version "${_version}") - endif (WIN32) - # only keep first line - list (GET _version 0 _version) - # extract version number from it (this is the fragile part) - string (REGEX REPLACE "^[^\\(]+(\\([^\\)]*\\))?[\ \t]*([0-9]+\\.[0-9]+\\.[0-9]+)(.*\\(.*\\))?" "\\2" _version "${_version}") - # return this to the caller - set (${ver_name} ${_version} PARENT_SCOPE) - else (CMAKE_${language}_COMPILER_ID STREQUAL GNU) - set (${ver_name} "" PARENT_SCOPE) - endif (CMAKE_${language}_COMPILER_ID STREQUAL GNU) -endfunction (get_gcc_patch language ver_name) - -function (compiler_info) - if (CMAKE_COMPILER_IS_GNUCXX) - get_gcc_patch (CXX version) - message (STATUS "GNU C++ compiler version: ${version}") - endif (CMAKE_COMPILER_IS_GNUCXX) -endfunction (compiler_info) - -function (get_ld_version ver_name) - # run linker to get the version number. interestingly, this option works - # (for our purposes) on all major platforms (Linux, Mac OS X and Windows); - # it returns the program version although it may have ended in error - exec_program (${CMAKE_LINKER} - ARGS "-v" - OUTPUT_VARIABLE _version - ) - - # keep only first line, even on Mac OS X there is no line end - list (GET _version 0 _version) - - # format of the version string is platform-specific - if (NOT WIN32) - if (APPLE) - string (REGEX REPLACE ".*, from Apple (.*\)" "\\1" _version "${_version}") - else (APPLE) - # assuming some GNU toolchain now - string (REGEX REPLACE "GNU ([a-zA-Z0-9_]*) (version|\\(.*\\)) ([^\\ ]*).*" "\\1 \\3" _version "${_version}") - endif (APPLE) - endif (NOT WIN32) - - # return the string to the caller - set (${ver_name} "${_version}" PARENT_SCOPE) -endfunction (get_ld_version ver_name) - -function (linker_info) - get_ld_version (version) - message (STATUS "Linker: ${version}") -endfunction (linker_info) - -# sets CXX_COMPAT_GCC if we have either GCC or Clang -macro (is_compiler_gcc_compatible) - # is the C++ compiler clang++? - string (TOUPPER "${CMAKE_CXX_COMPILER_ID}" _comp_id) - if (_comp_id MATCHES "CLANG") - set (CMAKE_COMPILER_IS_CLANGXX TRUE) - else () - set (CMAKE_COMPILER_IS_CLANGXX FALSE) - endif () - # is the C++ compiler g++ or clang++? - if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX) - set (CXX_COMPAT_GCC TRUE) - else () - set (CXX_COMPAT_GCC FALSE) - endif () - # is the C compiler clang? - string (TOUPPER "${CMAKE_C_COMPILER_ID}" _comp_id) - if (_comp_id MATCHES "CLANG") - set (CMAKE_COMPILER_IS_CLANG TRUE) - else () - set (CMAKE_COMPILER_IS_CLANG FALSE) - endif () - # is the C compiler gcc or clang? - if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) - set (C_COMPAT_GCC TRUE) - else () - set (C_COMPAT_GCC FALSE) - endif () -endmacro (is_compiler_gcc_compatible) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseDebugSymbols.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseDebugSymbols.cmake deleted file mode 100644 index bbe38530a7..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseDebugSymbols.cmake +++ /dev/null @@ -1,132 +0,0 @@ -# - Generate debug symbols in a separate file -# -# (1) Include this file in your CMakeLists.txt; it will setup everything -# to compile WITH debug symbols in any case. -# -# (2) Run the strip_debug_symbols function on every target that you want -# to strip. - -# Copyright (C) 2012 Uni Research AS -# This code is licensed under The GNU General Public License v3.0 - -include (AddOptions) -include (UseCompVer) -is_compiler_gcc_compatible () - -# only debugging using the GNU toolchain is supported for now -if (CXX_COMPAT_GCC) - # default debug level, if not specified by the user - set_default_option (CXX _dbg_flag "-ggdb3" "(^|\ )-g") - - # add debug symbols to *all* targets if the build mode is either "Debug" or "RelWithDebInfo" - if (_dbg_flag) - message (STATUS "Generating debug symbols: ${_dbg_flag}") - add_options (ALL_LANGUAGES "Debug;RelWithDebInfo" "${_dbg_flag}") - endif (_dbg_flag) - - # extracting the debug info is done by a separate utility in the GNU - # toolchain. check that this is actually installed. - message (STATUS "Looking for strip utility") - if (APPLE) - # MacOS X has a duo of utilities; we need both - find_program (OBJCOPY strip) - find_program (DSYMUTIL dsymutil) - mark_as_advanced (DSYMUTIL) - if (NOT DSYMUTIL) - set (OBJCOPY dsymutil-NOTFOUND) - endif (NOT DSYMUTIL) - else (APPLE) - find_program (OBJCOPY - objcopy - ${CYGWIN_INSTALL_PATH}/bin /usr/bin /usr/local/bin - ) - endif (APPLE) - mark_as_advanced (OBJCOPY) - if (OBJCOPY) - message (STATUS "Looking for strip utility - found") - else (OBJCOPY) - message (WARNING "Looking for strip utility - not found") - endif (OBJCOPY) -endif () - -# command to separate the debug information from the executable into -# its own file; this must be called for each target; optionally takes -# the name of a variable to receive the list of .debug files -function (strip_debug_symbols targets) - if (CXX_COMPAT_GCC AND OBJCOPY) - foreach (target IN LISTS targets) - # libraries must retain the symbols in order to link to them, but - # everything can be stripped in an executable - get_target_property (_kind ${target} TYPE) - - # don't strip static libraries - if ("${_kind}" STREQUAL "STATIC_LIBRARY") - return () - endif ("${_kind}" STREQUAL "STATIC_LIBRARY") - - # don't strip public symbols in shared objects - if ("${_kind}" STREQUAL "EXECUTABLE") - set (_strip_args "--strip-all") - else ("${_kind}" STREQUAL "EXECUTABLE") - set (_strip_args "--strip-debug") - endif ("${_kind}" STREQUAL "EXECUTABLE") - - # add_custom_command doesn't support generator expressions in the - # working_directory argument (sic; that's what you get when you do - # ad hoc programming all the time), so we need to extract the - # location up front (the location on the other hand should not be - # used for libraries as it does not include the soversion -- sic - # again) - get_target_property (_full ${target} LOCATION) - get_filename_component (_dir ${_full} PATH) - if (NOT (("${_dir}" STREQUAL "") OR ("${_dir}" MATCHES ".*/$"))) - set (_dir "${_dir}/") - endif (NOT (("${_dir}" STREQUAL "") OR ("${_dir}" MATCHES ".*/$"))) - get_filename_component (_name ${_full} NAME_WE) - get_filename_component (_ext ${_full} EXT) - # only libraries have soversion property attached - get_target_property (_target_soversion ${target} SOVERSION) - get_target_property (_target_version ${target} VERSION) - if (_target_soversion) - # MacOS X puts the version number before the extension - if (APPLE) - set (_target_file_name "${_name}.${_target_version}${_ext}") - else (APPLE) - set (_target_file_name "${_name}${_ext}.${_target_version}") - endif (APPLE) - else (_target_soversion) - set (_target_file_name "${_name}${_ext}") - endif (_target_soversion) - set (_target_file "${_dir}${_target_file_name}") - # do without generator expressions (which doesn't work everywhere) - if (APPLE) - set (_debug_ext ".dSYM") - add_custom_command (TARGET ${target} - POST_BUILD - WORKING_DIRECTORY ${_dir} - COMMAND ${DSYMUTIL} ARGS --out=${_target_file}${_debug_ext} ${_target_file} - COMMAND ${OBJCOPY} ARGS -S ${_target_file} - VERBATIM - ) - else (APPLE) - set (_debug_ext ".debug") - add_custom_command (TARGET ${target} - POST_BUILD - WORKING_DIRECTORY ${_dir} - COMMAND ${OBJCOPY} ARGS --only-keep-debug ${_target_file} ${_target_file}${_debug_ext} - COMMAND ${OBJCOPY} ARGS ${_strip_args} ${_target_file} - COMMAND ${OBJCOPY} ARGS --add-gnu-debuglink=${_target_file_name}${_debug_ext} ${_target_file} - VERBATIM - ) - endif (APPLE) - # add this .debug file to the list - file (RELATIVE_PATH _this_debug_file "${PROJECT_BINARY_DIR}" "${_target_file}${_debug_ext}") - set (_debug_files ${_debug_files} ${_this_debug_file}) - endforeach (target) - # if optional debug list was requested, then copy to output parameter - if (ARGV1) - set (${ARGV1} ${_debug_files} PARENT_SCOPE) - endif (ARGV1) - endif () -endfunction (strip_debug_symbols targets) - diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseDuneVer.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseDuneVer.cmake deleted file mode 100644 index 98e53994dc..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseDuneVer.cmake +++ /dev/null @@ -1,152 +0,0 @@ -# - Find version of a DUNE package -# -# Synopsis: -# -# find_dune_version (suite module) -# -# where: -# suite Name of the suite; this should always be "dune" -# module Name of the module, e.g. "common" -# -# Finds the content of DUNE_${MODULE}_VERSION_{MAJOR,MINOR,REVISION} -# from the installation. -# -# Add these variables to ${project}_CONFIG_IMPL_VARS in CMakeLists.txt -# if you need these in the code. - -include (UseMultiArch) - -function (find_dune_version suite module) - # the _ROOT variable may or may not be set, but the include - # variable should always be; get the prefix from the header path - # if we have a multilib installation where the package maintainer - # have installed it in e.g. /usr/include/dune-2.2/dune/istl, then - # stash this extra indirection and add it back later in lib/ - set (_inc_path "${${suite}-${module}_INCLUDE_DIR}") - file (TO_CMAKE_PATH _inc_path "${_inc_path}") - set (_multilib_regexp "(.*)/include(/${suite}[^/]+)?") - if (_inc_path MATCHES "${_multilib_regexp}") - set (_orig_inc "${_inc_path}") - string (REGEX REPLACE "${_multilib_regexp}" "\\1" _inc_path "${_orig_inc}") - # only get the second group if it is really there (there is - # probably a better way to do this in CMake) - if ("${_inc_path}/include" STREQUAL "${_orig_inc}") - set (_multilib "") - else () - string (REGEX REPLACE "${_multilib_regexp}" "\\2" _multilib "${_orig_inc}") - endif () - else () - set (_multilib "") - endif () - - # some modules does not have a library, use the directory of the - # header files to find what would be the library dir. - # note that when we refer to a build tree, then the libraries always - # go into lib/, but we don't care about that because in that case, - # dune.module isn't in the lib/ directory anyway but must be retrieved - # from the source. hence, we only have to worry about the library - # directory of a system installation here. - if (NOT ${suite}-${module}_LIBRARY) - # this suffix is gotten from UseMultiArch.cmake - set (_lib_path "${_inc_path}/${CMAKE_INSTALL_LIBDIR}") - else () - get_filename_component (_lib_path "${${suite}-${module}_LIBRARY}" PATH) - endif () - - # if we have a source tree, dune.module is available there - set (_dune_mod "${_inc_path}/dune.module") - if (NOT EXISTS "${_dune_mod}") - set (_last_dune_mod_src "${_dune_mod}") - set (_dune_mod "") - endif () - - if (NOT _dune_mod) - # look for the build tree; if we found the library, then the - # dune.module file should be in a sub-directory - get_filename_component (_immediate "${_lib_path}" NAME) - if ("${_immediate}" STREQUAL ".libs") - # remove autotools internal path - get_filename_component (_lib_path "${_lib_path}" PATH) - endif () - get_filename_component (_immediate "${_lib_path}" NAME) - if ("${_immediate}" STREQUAL "${CMAKE_LIBRARY_ARCHITECTURE}") - # remove multi-arch part of the library path to get parent - get_filename_component (_lib_path "${_lib_path}" PATH) - endif () - get_filename_component (_immediate "${_lib_path}" NAME) - if (("${_immediate}" STREQUAL "${CMAKE_INSTALL_LIBDIR}") - OR ("${_immediate}" STREQUAL "lib") - OR ("${_immediate}" STREQUAL "${LIBDIR_MULTIARCH_UNAWARE}")) - # remove library part of the path; this also undo the suffix - # we added if we used the library as a standin - get_filename_component (_lib_path "${_lib_path}" PATH) - endif () - # from this point on, _lib_path does not contain an architecture- - # specific component anymore; dune.module is always put in straight - # noarch lib/ since it does not contain any paths to binaries - set (_suffix "${_multilib}/dunecontrol/${suite}-${module}/dune.module") - set (_dune_mod "${_lib_path}/${LIBDIR_MULTIARCH_UNAWARE}${_suffix}") - if (NOT EXISTS "${_dune_mod}") - set (_last_dune_mod_bld "${_dune_mod}") - # one more try, if we have a private install, then it doesn't use - # e.g. lib64 but always lib (!) - if ("${LIBDIR_MULTIARCH_UNAWARE}" STREQUAL "lib") - set (_dune_mod "") - else () - set (_dune_mod "${_lib_path}/lib${_suffix}") - if (NOT EXISTS "${_dune_mod}") - set (_last_dune_mod_pri "${_dune_mod}") - # use the name itself as a flag for whether it was found or not - set (_dune_mod "") - endif () - endif () - endif () - endif () - - # if it is not available, it may make havoc having empty defines in the source - # code later, so we bail out early - if (NOT _dune_mod) - if (${suite}-${module}_FOUND) - set (_searched_paths "\"${_last_dune_mod_src}\"") - if (NOT ("${_last_dune_mod_bld}" STREQUAL "")) - set (_searched_paths "either ${_searched_paths} or \"${_last_dune_mod_bld}\"") - endif () - if (NOT ("${_last_dune_mod_pri}" STREQUAL "")) - set (_searched_paths "${_searched_paths} or \"${_last_dune_mod_pri}\"") - endif () - message (FATAL_ERROR "Failed to locate dune.module for ${suite}-${module} (looking for ${_searched_paths})") - else () - return () - endif () - endif () - - # parse the file for the Version: field - set (_ver_regexp "[ ]*Version:[ ]*([0-9]+)\\.([0-9]+)(.*)") - file (STRINGS "${_dune_mod}" _ver_field REGEX "${_ver_regexp}") - string (REGEX REPLACE "${_ver_regexp}" "\\1" _major "${_ver_field}") - string (REGEX REPLACE "${_ver_regexp}" "\\2" _minor "${_ver_field}") - string (REGEX REPLACE "${_ver_regexp}" "\\3" _revision "${_ver_field}") - - # revision may or may not be there - set (_rev_regexp "\\.([0-9]+).*") - if (_revision MATCHES "${_rev_regexp}") - string (REGEX REPLACE "${_rev_regexp}" "\\1" _revision "${_revision}") - else () - set (_revision "0") - endif () - - # generate variable for what we have found - string (TOUPPER "${suite}" _SUITE) - string (TOUPPER "${module}" _MODULE) - string (REPLACE "-" "_" _MODULE "${_MODULE}") - if ((NOT DEFINED ${_SUITE}_${_MODULE}_VERSION_MAJOR) AND - (NOT DEFINED ${_SUITE}_${_MODULE}_VERSION_MINOR) AND - (NOT DEFINED ${_SUITE}_${_MODULE}_VERSION_REVISION)) - set (${_SUITE}_${_MODULE}_VERSION_MAJOR "${_major}" PARENT_SCOPE) - set (${_SUITE}_${_MODULE}_VERSION_MINOR "${_minor}" PARENT_SCOPE) - set (${_SUITE}_${_MODULE}_VERSION_REVISION "${_revision}" PARENT_SCOPE) - endif () - - # print the version number we detected in the configuration log - message (STATUS "Version ${_major}.${_minor}.${_revision} of ${suite}-${module} from ${_dune_mod}") -endfunction (find_dune_version suite module) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseDynamicBoost.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseDynamicBoost.cmake deleted file mode 100644 index 77a7059cb2..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseDynamicBoost.cmake +++ /dev/null @@ -1,38 +0,0 @@ -if (NOT Boost_UNIT_TEST_FRAMEWORK_FOUND) - find_package (Boost 1.44.0 COMPONENTS unit_test_framework QUIET) -endif () - -if (Boost_UNIT_TEST_FRAMEWORK_FOUND) - # setup to do a test compile - include (CMakePushCheckState) - cmake_push_check_state () - include (CheckCXXSourceCompiles) - list (APPEND CMAKE_REQUIRED_INCLUDES ${Boost_INCLUDE_DIRS}) - list (APPEND CMAKE_REQUIRED_LIBRARIES ${Boost_LIBRARIES}) - - unset(HAVE_DYNAMIC_BOOST_TEST CACHE) - check_cxx_source_compiles(" -#define BOOST_TEST_DYN_LINK -#define BOOST_TEST_MODULE DYNLINK_TEST -#include - -int f(int x) { return 2 * x; } - -BOOST_AUTO_TEST_CASE(DynlinkConfigureTest) { - BOOST_CHECK_MESSAGE(f(2) == 4, - \"Apparently, multiplication doesn't \" - \"work: f(2) = \" << f(2)); -}" HAVE_DYNAMIC_BOOST_TEST) - cmake_pop_check_state () -else (Boost_UNIT_TEST_FRAMEWORK_FOUND) - # no Boost, no compile - set (HAVE_DYNAMIC_BOOST_TEST 0) -endif (Boost_UNIT_TEST_FRAMEWORK_FOUND) - -# save this for later -set (HAVE_DYNAMIC_BOOST_TEST "${HAVE_DYNAMIC_BOOST_TEST}" - CACHE BOOL "Whether Boost::Test is dynamically linked or not" - ) - -# include in config.h -list (APPEND TESTING_CONFIG_VARS "HAVE_DYNAMIC_BOOST_TEST") diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseFastBuilds.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseFastBuilds.cmake deleted file mode 100644 index c2817e6c9c..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseFastBuilds.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# - Try to build faster depending on the compiler - -# faster builds by using a pipe instead of temp files -include (AddOptions) -include (UseCompVer) -is_compiler_gcc_compatible () - -if (CXX_COMPAT_GCC) - add_options (ALL_LANGUAGES ALL_BUILDS "-pipe") -endif () - diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseFortranWrappers.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseFortranWrappers.cmake deleted file mode 100644 index 81359a02c5..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseFortranWrappers.cmake +++ /dev/null @@ -1,90 +0,0 @@ -# - Provide C wrappers for Fortran code -# -# Synopsis: -# define_fc_func (APPEND config.h IF HAVE_BLAS) - -function (define_fc_func verb file) - # check that we are being called correctly - if (NOT (("${verb}" STREQUAL "APPEND") OR - ("${verb}" STREQUAL "WRITE"))) - message (FATAL_ERROR - "Unknown verb \"${verb}\" passed as first argument." - ) - endif (NOT (("${verb}" STREQUAL "APPEND") OR - ("${verb}" STREQUAL "WRITE"))) - - # check under which conditions we should do our work - if (NOT "${ARGN}" STREQUAL "") - set (args ${ARGN}) - list (GET args 0 keyword) - if (NOT "${keyword}" STREQUAL "IF") - message (FATAL_ERROR - "Unknown conditional \"${keyword}\" passed as third argument." - ) - endif (NOT "${keyword}" STREQUAL "IF") - list (REMOVE_AT args 0) - set (needed FALSE) - foreach (condition IN LISTS args) - if (${${condition}}) - set (needed TRUE) - break () - endif (${${condition}}) - endforeach (condition) - else (NOT "${ARGN}" STREQUAL "") - # if called unconditionally, then always include the wrapper - set (needed TRUE) - endif (NOT "${ARGN}" STREQUAL "") - - # only do something if we actually have some components which requires - # the interaction -- don't load the Fortran compiler just to write - # this macro (which apparently nobody uses then) - if (needed) - # if this option is enabled, we skip detecting the Fortran externals - # using a real compiler (which may not be the same that compiled the - # library) and just write a macro that uses a single underscore (which - # is the assumption that FindLAPACK operates on anyway) - option (USE_UNDERSCORING "Assume that Fortran routines have underscore suffix" OFF) - if (USE_UNDERSCORING) - message (STATUS "Assuming Fortran externals have underscore suffix") - set (_str "#define FC_FUNC(name,NAME) name##_\n") - else (USE_UNDERSCORING) - - # enable languages needed - if (NOT CMAKE_C_COMPILER_LOADED) - enable_language (C) - endif (NOT CMAKE_C_COMPILER_LOADED) - if (NOT CMAKE_Fortran_COMPILER_LOADED) - enable_language (Fortran) - endif (NOT CMAKE_Fortran_COMPILER_LOADED) - - # get a temporary file - set (_tmp_hdr ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/config_f.h) - - # write a small config file that contains the proper convention for - # calling Fortran from C - include (FortranCInterface) - fortrancinterface_header (${_tmp_hdr}) - - # read the definition back in from the file - file (STRINGS - ${_tmp_hdr} - _str - REGEX "^#define FortranCInterface_GLOBAL\\(name,NAME\\) .*$" - ) - - # massage it to look like the one AC_FC_WRAPPERS provide - string (REPLACE "FortranCInterface_GLOBAL" "FC_FUNC" _str ${_str}) - - endif (USE_UNDERSCORING) - - # write this definition to the end of our own configuration file - file (${verb} ${file} - "\n/* Define to a macro mangling the given C identifier (in lower and upper - case), which must not contain underscores, for linking with Fortran. */\n" - ${_str} - "\n" - ) - else (needed) - message (STATUS "Fortran/C interface not activated") - endif (needed) -endfunction (define_fc_func) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseMultiArch.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseMultiArch.cmake deleted file mode 100644 index 87f0a76e93..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseMultiArch.cmake +++ /dev/null @@ -1,35 +0,0 @@ -# - Multiarch support in object code library directories -# -# This module sets the following variable -# CMAKE_INSTALL_LIBDIR to lib, lib64 or lib/x86_64-linux-gnu -# depending on the platform; use this path -# for platform-specific binaries. -# -# Note that it will override the results of GNUInstallDirs if included after -# that module. - -# default if we need to put something in the library directory for a -# component that is *not* multiarch-aware -set (LIBDIR_MULTIARCH_UNAWARE "lib") - -# Fedora uses lib64/ for 64-bit systems, Debian uses lib/x86_64-linux-gnu -if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") - # Debian or Ubuntu? - if (EXISTS "/etc/debian_version") - set (_libdir_def "lib/${CMAKE_LIBRARY_ARCHITECTURE}") - else (EXISTS "/etc/debian_version") - # 64-bit system? - if (CMAKE_SIZEOF_VOID_P EQUAL 8) - set (_libdir_def "lib64") - set (LIBDIR_MULTIARCH_UNAWARE "${_libdir_def}") - else (CMAKE_SIZEOF_VOID_P EQUAL 8) - set (_libdir_def "lib") - endif (CMAKE_SIZEOF_VOID_P EQUAL 8) - endif (EXISTS "/etc/debian_version") -else ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") - set (_libdir_def "lib") -endif ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") - -# let the user override if somewhere else is desirable -set (CMAKE_INSTALL_LIBDIR "${_libdir_def}" CACHE PATH "Object code libraries") -mark_as_advanced (CMAKE_INSTALL_LIBDIR) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseOnlyNeeded.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseOnlyNeeded.cmake deleted file mode 100644 index 8a195bf483..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseOnlyNeeded.cmake +++ /dev/null @@ -1,50 +0,0 @@ -# - Use only needed imports from libraries -# -# Add the -Wl,--as-needed flag to the default linker flags on Linux -# in order to get only the minimal set of dependencies. - -function (prepend var_name value) - # only add the prefix if it is not already at the beginning. this - # prevents the same string to be added at the same place every time - # we check for reconfiguration (e.g. "--as-needed" below) - string (LENGTH "${value}" _val_len) - string (LENGTH "${${var_name}}" _var_len) - if (NOT (${_var_len} LESS ${_val_len})) - string (SUBSTRING "${${var_name}}" 0 ${_val_len} _var_pre) - else (NOT (${_var_len} LESS ${_val_len})) - set (_var_pre) - endif (NOT (${_var_len} LESS ${_val_len})) - if (NOT ("${_var_pre}" STREQUAL "${value}")) - if (${var_name}) - set (${var_name} "${value} ${${var_name}}" PARENT_SCOPE) - else (${var_name}) - set (${var_name} "${value}") - endif (${var_name}) - endif (NOT ("${_var_pre}" STREQUAL "${value}")) -endfunction (prepend var_name value) - -option (ONLY_NEEDED_LIBRARIES "Instruct the linker to not use libraries which are unused" OFF) - -# only ELF shared objects can be underlinked, and only GNU will accept -# these parameters; otherwise just leave it to the defaults -if ((CMAKE_CXX_PLATFORM_ID STREQUAL "Linux") AND CMAKE_COMPILER_IS_GNUCC AND ONLY_NEEDED_LIBRARIES) - # these are the modules whose probes will turn up incompatible - # flags on some systems - set (_maybe_underlinked - SuiteSparse - ) - # check if any modules actually reported problems (by setting an - # appropriate linker flag) - set (_underlinked FALSE) - foreach (_module IN LISTS _maybe_underlinked) - if ("${${_module}_LINKER_FLAGS}" MATCHES "-Wl,--no-as-needed") - set (_underlinked TRUE) - endif ("${${_module}_LINKER_FLAGS}" MATCHES "-Wl,--no-as-needed") - endforeach (_module) - # if we didn't have any problems, then go ahead and add - if (NOT _underlinked) - prepend (CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed") - prepend (CMAKE_MODULE_LINKER_FLAGS "-Wl,--as-needed") - prepend (CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed") - endif (NOT _underlinked) -endif ((CMAKE_CXX_PLATFORM_ID STREQUAL "Linux") AND CMAKE_COMPILER_IS_GNUCC AND ONLY_NEEDED_LIBRARIES) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseOpenMP.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseOpenMP.cmake deleted file mode 100644 index 5bdcbeb005..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseOpenMP.cmake +++ /dev/null @@ -1,70 +0,0 @@ -# - Use OpenMP features -# -# Synopsis: -# -# find_openmp (module) -# -# where: -# -# module Name of the module to which OpenMP libraries -# etc. should be added, e.g. "opm-core". -# -# Note: Compiler flags are always added globally, to avoid ABI -# incompatibility problems. -# -# It is assumed that the following variables are available -# -# ${module}_QUIET Verbosity level of the parent's find module -# ${module}_LIBRARIES List of libraries to which OpenMP will be added -# -# Example: -# find_openmp (opm-core) -# remove_dup_deps (opm-core) - -include (AddOptions) -include (UseCompVer) -is_compiler_gcc_compatible () - -macro (find_openmp opm) - # default is that OpenMP is not considered to be there; if we set this - # to a blank definition, it may be added but it cannot be removed if - # it propagates to other projects (someone declares it to be part of - # _CONFIG_VARS) - set (HAVE_OPENMP) - - # user code can be conservative by setting USE_OPENMP_DEFAULT - if (NOT DEFINED USE_OPENMP_DEFAULT) - set (USE_OPENMP_DEFAULT ON) - endif (NOT DEFINED USE_OPENMP_DEFAULT) - option (USE_OPENMP "Enable OpenMP for parallelization" ${USE_OPENMP_DEFAULT}) - if (USE_OPENMP) - - # enabling OpenMP is supposedly enough to make the compiler link with - # the appropriate libraries - find_package (OpenMP ${${opm}_QUIET}) - list (APPEND ${opm}_LIBRARIES ${OpenMP_LIBRARIES}) - if (OPENMP_FOUND) - add_options (C ALL_BUILDS "${OpenMP_C_FLAGS}") - add_options (CXX ALL_BUILDS "${OpenMP_CXX_FLAGS}") - set (HAVE_OPENMP 1) - endif (OPENMP_FOUND) - - # threading library (search for this *after* OpenMP - set (CMAKE_THREAD_PREFER_PTHREAD TRUE) - find_package (Threads ${${opm}_QUIET}) - if (CMAKE_USE_PTHREADS_INIT) - list (APPEND ${opm}_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) - endif (CMAKE_USE_PTHREADS_INIT) - - else (USE_OPENMP) - message (STATUS "OpenMP: disabled") - - # if we don't have OpenMP support, then don't show warnings that these - # pragmas are unknown - if (CXX_COMPAT_GCC) - add_options (ALL_LANGUAGES ALL_BUILDS "-Wno-unknown-pragmas") - elseif (MSVC) - add_options (ALL_LANGUAGES ALL_BUILDS "-wd4068") - endif() - endif (USE_OPENMP) -endmacro (find_openmp opm) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseOptimization.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseOptimization.cmake deleted file mode 100644 index 8b1d561b0f..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseOptimization.cmake +++ /dev/null @@ -1,64 +0,0 @@ -# - Turn on optimizations based on build type - -include(TestCXXAcceptsFlag) -include (AddOptions) -include (UseCompVer) -is_compiler_gcc_compatible () - -# mapping from profile name (in CMAKE_BUILD_TYPE) to variable part -set (_prof_DEBUG "Debug") -set (_prof_RELEASE "Release;RelWithDebInfo;MinSizeRel") - -# if we are building a debug target, then disable all optimizations -# otherwise, turn them on. indicate to the code what we have done -# so it can turn on assertions etc. - -if (CXX_COMPAT_GCC) - # extra flags passed for optimization - set (_opt_flags "") - - # link-time (a.k.a. global) optimizations - # disabled due to widespread bugs in the linker plugin - option (WHOLE_PROG_OPTIM "Whole program optimization (lto)" OFF) - if (WHOLE_PROG_OPTIM) - check_cxx_accepts_flag ("-flto" HAVE_LINK_OPTS) - if (HAVE_LINK_OPTS) - list (APPEND _opt_flags "-flto") - endif (HAVE_LINK_OPTS) - endif (WHOLE_PROG_OPTIM) - - # native instruction set tuning - option (WITH_NATIVE "Use native instruction set" ON) - if (WITH_NATIVE) - check_cxx_accepts_flag ("-mtune=native" HAVE_MTUNE) - if (HAVE_MTUNE) - list (APPEND _opt_flags "-mtune=native") - endif (HAVE_MTUNE) - endif (WITH_NATIVE) - - # default optimization flags, if not set by user - set_default_option (CXX _opt_dbg "-O0" "(^|\ )-O") - set_default_option (CXX _opt_rel "-O2" "(^|\ )-O") - - # use these options for debug builds - no optimizations - add_options (ALL_LANGUAGES "${_prof_DEBUG}" ${_opt_dbg} "-DDEBUG") - - # use these options for release builds - full optimization - add_options (ALL_LANGUAGES "${_prof_RELEASE}" ${_opt_rel} "-DNDEBUG" ${_opt_flags}) - -else () - # default information from system - foreach (lang IN ITEMS C CXX Fortran) - if (lang STREQUAL "Fortran") - set (_lang F) - else (lang STREQUAL "Fortran") - set (_lang ${lang}) - endif (lang STREQUAL "Fortran") - foreach (profile IN ITEMS DEBUG RELEASE) - if (NOT CMAKE_${lang}_FLAGS_${profile}) - add_options (${lang} "${_prof_${profile}}" - "$ENV{${_lang}FLAGS} ${CMAKE_${lang}_FLAGS_${profile}_INIT}") - endif (NOT CMAKE_${lang}_FLAGS_${profile}) - endforeach (profile) - endforeach (lang) -endif () diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UsePrecompHeaders.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UsePrecompHeaders.cmake deleted file mode 100644 index 94141ff3fe..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UsePrecompHeaders.cmake +++ /dev/null @@ -1,171 +0,0 @@ -# - Use precompiled headers -# -# precompile_header takes these parameters -# -# language Language in which the header is written; C or CXX. -# -# type Type of target being build, SHARED_LIBRARY, STATIC_LIBRARY -# or EXECUTABLE. -# -# header Relative path within the source tree to the header -# that contains the list of includes to be precompiled. -# This header should not be added to the installation, -# as it will be specific for this project. -# -# target Name of target to be created. All targets that -# use the precompiled header should depend on this target -# so that it is built before them. A variable with this -# name will also be created which contains the file name. -# -# flags_name Name of variable to receive the flags that should be -# added to the command-line. -# -# Example: -# get_target_property (type opmcore TYPE) -# precompile_header (CXX ${type} -# HEADER "opm/core/opm-core-pch.hpp" -# TARGET opmcore_CXX_pch -# FLAGS opmcore_PRECOMP_CXX_FLAGS -# ) -# set_source_files_properties (${opmcore_CXX_SOURCES} PROPERTIES -# OBJECT_DEPENDS "${opmcore_CXX_pch}" -# COMPILE_FLAGS "${opmcore_PRECOMP_CXX_FLAGS}" -# ) - -# get compiler version -include (UseCompVer) -is_compiler_gcc_compatible () - -# reconstruct the compiler command line; this does NOT include the -# DEFINE_SYMBOL that is added for shared libraries. type is the TYPE -# target property. -# see larsch's PrecompiledHeader.cmake: -# and -function (compiler_cmdline language type cmd_name args_name) - # get the compiler for this particular language - set (${cmd_name} "${CMAKE_${language}_COMPILER}" PARENT_SCOPE) - - # in case someone has overridden the compiler (e.g. ccache) - set (_args "${CMAKE_${language}_COMPILER_ARG1}") - - # macro definitions - get_directory_property (_defs DEFINITIONS) - list (APPEND _args "${_defs}") - - # global flags (such as -std=c++11); notice that there are both - # release-dependent and non-release-dependent ones - string (TOUPPER "CMAKE_${language}_FLAGS" _flags) - list (APPEND _args "${${_flags}}") - string (TOUPPER "CMAKE_${language}_FLAGS_${CMAKE_BUILD_TYPE}" _flags) - list (APPEND _args "${${_flags}}") - - # assume that we are always generating position-independent code - # when compiling for a shared library - if (type STREQUAL "SHARED_LIBRARY") - list (APPEND _args "${CMAKE_SHARED_LIBRARY_${language}_FLAGS}") - endif (type STREQUAL "SHARED_LIBRARY") - - # directories included - get_directory_property (_dirs INCLUDE_DIRECTORIES) - foreach (_dir ${_dirs}) - list (APPEND _args "-I${_dir}") - endforeach (_dir) - - # make arguments a real list, and write to output variable - separate_arguments (_args) - set (${args_name} "${_args}" PARENT_SCOPE) -endfunction (compiler_cmdline language type cmd_name args_name) - -function (precompile_header - language type hdr_kw header tgt_kw target flgs_kw flags_name) - - # check "syntax" - if (NOT hdr_kw STREQUAL "HEADER") - message (FATAL "Third token to precompile_header shoulde be \"HEADER\"") - endif (NOT hdr_kw STREQUAL "HEADER") - if (NOT tgt_kw STREQUAL "TARGET") - message (FATAL "Fifth token to precompile_header should be \"TARGET\"") - endif (NOT tgt_kw STREQUAL "TARGET") - if (NOT flgs_kw STREQUAL "FLAGS") - message (FATAL "Seventh token to precompile_header should be \"FLAGS\"") - endif (NOT flgs_kw STREQUAL "FLAGS") - - # check language - if (language STREQUAL "CXX") - set (gcc_lang "c++-header") - elseif (language STREQUAL "C") - set (gcc_lang "c-header") - else (language STREQUAL "CXX") - message (FATAL "Only C or C++ can have precompiled headers") - endif (language STREQUAL "CXX") - - # if no precompiled header was found, then we shouldn't do anything here - if (NOT header) - return () - endif (NOT header) - - # only support precompiled headers if the compiler is gcc >= 3.4 or clang - if (CXX_COMPAT_GCC) - if (CMAKE_COMPILER_IS_GNUCXX) - # genuine GCC; must test version - get_gcc_version (${language} GCC_VERSION) - if (GCC_VERSION VERSION_EQUAL 3.4 OR GCC_VERSION VERSION_GREATER 3.4) - set (_do_pch TRUE) - else () - set (_do_pch FALSE) - endif () - elseif (CMAKE_COMPILER_IS_CLANGXX) - # any Clang version that is new enough to compile us can do this - set (_do_pch TRUE) - else () - set (_do_pch FALSE) - endif () - if (_do_pch) - # command-line used to compile modules in this kind of target - compiler_cmdline (${language} ${type} _cmd _args) - - # gcc will include any configurations which are in a directory - # with the same name as the header included - set (_pch_dir "CMakeFiles/pch") - set (_pch_file "${_pch_dir}/${header}.gch/${target}") - - # make sure that output directory exists - get_filename_component (_outdir "${PROJECT_BINARY_DIR}/${_pch_file}" PATH) - file (MAKE_DIRECTORY ${_outdir}) - - # we need to generate the precompiled header in the output tree, but - # at the same time prevent the compiler to pick up the header from the - # source tree. getting the order of the include paths right is fragile - # in CMake. by copying the header, we can put the precompile dump - # right next to it and have the compiler pick it up there - add_custom_command ( - OUTPUT "${_pch_dir}/${header}" - COMMAND ${CMAKE_COMMAND} - ARGS -E copy "${PROJECT_SOURCE_DIR}/${header}" "${_pch_dir}/${header}" - DEPENDS "${PROJECT_SOURCE_DIR}/${header}" - ) - - # add a makefile rule to create the precompiled header - add_custom_command ( - OUTPUT ${PROJECT_BINARY_DIR}/${_pch_file} - COMMAND ${_cmd} - ARGS ${_args} "-o" "${_pch_file}" "-x" "${gcc_lang}" "-c" "${_pch_dir}/${header}" - DEPENDS "${_pch_dir}/${header}" - COMMENT "Precompiling headers ${_pch_file}" - ) - - # create a phony target that is always built, but which only checks - # if the header file is OK (i.e. the header only gets rebuilt if - # necessary) - add_custom_target (${target} ALL - DEPENDS ${PROJECT_BINARY_DIR}/${_pch_file} - ) - - # these flags need to be added to the target - set (${target} "${_pch_file}" PARENT_SCOPE) - set (${flags_name} "-Winvalid-pch -include ${_pch_dir}/${header}" PARENT_SCOPE) - endif () - endif () - -endfunction (precompile_header - language type header tgt_kw target flgs_kw flags_name) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseSystemInfo.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseSystemInfo.cmake deleted file mode 100644 index b4b3f8af84..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseSystemInfo.cmake +++ /dev/null @@ -1,198 +0,0 @@ -# - Print CMake and OS distribution version -# -function (system_info) - message (STATUS "CMake version: ${CMAKE_VERSION}") - if (CMAKE_SYSTEM MATCHES "Linux") - distro_name (DISTRO_NAME) - message (STATUS "Linux distribution: ${DISTRO_NAME}") - elseif (CMAKE_SYSTEM MATCHES "Darwin") - sw_vers (OS_VERSION) - message (STATUS "${OS_VERSION}") - else (CMAKE_SYSTEM MATCHES "Linux") - message (STATUS "Operating system: ${CMAKE_SYSTEM}") - endif (CMAKE_SYSTEM MATCHES "Linux") - - target_architecture (TARGET_CPU) - message (STATUS "Target architecture: ${TARGET_CPU}") -endfunction (system_info) - -function (sw_vers varname) - # query operating system for information - exec_program (sw_vers OUTPUT_VARIABLE _vers) - # split multi-line into various fields - string (REPLACE "\n" ";" _vers "${_vers}") - string (REPLACE ":" ";" _vers "${_vers}") - # get the various fields - list (GET _vers 1 _prod_name) - list (GET _vers 3 _prod_vers) - list (GET _vers 5 _prod_build) - # remove extraneous whitespace - string (STRIP "${_prod_name}" _prod_name) - string (STRIP "${_prod_vers}" _prod_vers) - string (STRIP "${_prod_build}" _prod_build) - # assemble result variable - set (${varname} "${_prod_name} version: ${_prod_vers} (${_prod_build})" PARENT_SCOPE) -endfunction (sw_vers varname) - -# probe various system files that may be found -function (distro_name varname) - file (GLOB has_os_release /etc/os-release) - file (GLOB has_lsb_release /etc/lsb-release) - file (GLOB has_sys_release /etc/system-release) - file (GLOB has_redhat_release /etc/redhat-release) - set (_descr) - # start with /etc/os-release, - # see - if (NOT has_os_release STREQUAL "") - read_release (PRETTY_NAME FROM /etc/os-release INTO _descr) - # previous "standard", used on older Ubuntu and Debian - elseif (NOT has_lsb_release STREQUAL "") - read_release (DISTRIB_DESCRIPTION FROM /etc/lsb-release INTO _descr) - endif (NOT has_os_release STREQUAL "") - # RHEL/CentOS etc. has just a text-file - if (NOT _descr) - if (NOT has_sys_release STREQUAL "") - file (READ /etc/system-release _descr) - elseif (NOT has_redhat_release STREQUAL "") - file (READ /etc/redhat-release _descr) - else (NOT has_sys_release STREQUAL "") - # no yet known release file found - set (_descr "unknown") - endif (NOT has_sys_release STREQUAL "") - endif (NOT _descr) - # return from function (into appropriate variable) - string (STRIP "${_descr}" _descr) - set (${varname} "${_descr}" PARENT_SCOPE) -endfunction (distro_name varname) - -# read property from the newer /etc/os-release -function (read_release valuename FROM filename INTO varname) - file (STRINGS ${filename} _distrib - REGEX "^${valuename}=" - ) - string (REGEX REPLACE - "^${valuename}=\"?\(.*\)" "\\1" ${varname} "${_distrib}" - ) - # remove trailing quote that got globbed by the wildcard (greedy match) - string (REGEX REPLACE - "\"$" "" ${varname} "${${varname}}" - ) - set (${varname} "${${varname}}" PARENT_SCOPE) -endfunction (read_release valuename FROM filename INTO varname) - -# the following code is adapted from commit f7467762 of the code at -# -# which is Copyright (c) 2012 Petroules Corporation, and which at the -# time of download (2013-04-07 12:30 CET) is made available with a BSD license. -# -# it attempts to compile a program which detects the architecture from the -# preprocessor symbols and communicate this back to us through an error message(!) -function (target_architecture output_var) - # OS X is capable of building for *several* architectures at once in - # the Mach-O binary, and there is a variable that tells us which those - # are, but they may be in any order, so they must be normalized - if (APPLE AND CMAKE_OSX_ARCHITECTURES) - # detect each of the possible candidates as a separate flag - set (osx_arch_list i386 x86_64) - foreach (osx_arch IN ITEMS ${CMAKE_OSX_ARCHITECTURES}) - foreach (candidate IN LISTS osx_arch_list) - if ("${osx_arch}" STREQUAL "${candidate}") - set (osx_arch_${candidate} TRUE) - endif ("${osx_arch}" STREQUAL "${candidate}") - endforeach (candidate) - endforeach (osx_arch) - - # add all architectures back in normalized order - foreach (candidate IN LISTS osx_arch_list) - if (osx_arch_${candidate}) - list (APPEND ARCH ${candidate}) - endif (osx_arch_${candidate}) - endforeach (candidate) - - else (APPLE AND CMAKE_OSX_ARCHITECTURES) - # use the preprocessor defines to determine which target architectures - # that are available - set (arch_c_src " - #if defined(__arm__) || defined(__TARGET_ARCH_ARM) - # if defined(__ARM_ARCH_7__) \\ - || defined(__ARM_ARCH_7A__) \\ - || defined(__ARM_ARCH_7R__) \\ - || defined(__ARM_ARCH_7M__) \\ - || (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 7) - # error cmake_ARCH armv7 - # elif defined(__ARM_ARCH_6__) \\ - || defined(__ARM_ARCH_6J__) \\ - || defined(__ARM_ARCH_6T2__) \\ - || defined(__ARM_ARCH_6Z__) \\ - || defined(__ARM_ARCH_6K__) \\ - || defined(__ARM_ARCH_6ZK__) \\ - || defined(__ARM_ARCH_6M__) \\ - || (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 6) - # error cmake_ARCH armv6 - # elif defined(__ARM_ARCH_5TEJ__) \\ - || (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 5) - # error cmake_ARCH armv5 - # else - # error cmake_ARCH arm - # endif - #elif defined(__i386) \\ - || defined(__i386__) \\ - || defined(_M_IX86) - # error cmake_ARCH i386 - #elif defined(__x86_64) \\ - || defined(__x86_64__) \\ - || defined(__amd64) \\ - || defined(_M_X64) - # error cmake_ARCH x86_64 - #elif defined(__ia64) \\ - || defined(__ia64__) \\ - || defined(_M_IA64) - # error cmake_ARCH ia64 - #elif defined(__ppc__) \\ - || defined(__ppc) \\ - || defined(__powerpc__) \\ - || defined(_ARCH_COM) \\ - || defined(_ARCH_PWR) \\ - || defined(_ARCH_PPC) \\ - || defined(_M_MPPC) \\ - || defined(_M_PPC) - # if defined(__ppc64__) \\ - || defined(__powerpc64__) \\ - || defined(__64BIT__) - # error cmake_ARCH ppc64 - # else - # error cmake_ARCH ppc - # endif - #else - # error cmake_ARCH unknown - #endif - ") - - # write a temporary program that can be compiled to get the result - set (tmp_dir "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp") - set (arch_c "${tmp_dir}/arch.c") - file (WRITE "${arch_c}" "${arch_c_src}") - try_compile ( - compile_result_unused - "${tmp_dir}" - "${arch_c}" - CMAKE_FLAGS CMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} - OUTPUT_VARIABLE ARCH - ) - - # parse the architecture name from the compiler output - string (REGEX MATCH "cmake_ARCH ([a-zA-Z0-9_]+)" ARCH "${ARCH}") - - # get rid of the value marker leaving just the architecture name - string (REPLACE "cmake_ARCH " "" ARCH "${ARCH}") - - # if we are compiling with an unknown architecture this variable should - # already be set to "unknown" but in the case that it's empty (i.e. due - # to a typo in the code), then set it to unknown - if (NOT ARCH) - set (ARCH "unknown") - endif() - endif() - - set (${output_var} "${ARCH}" PARENT_SCOPE) -endfunction() diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseThreads.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseThreads.cmake deleted file mode 100644 index cf1e97b22b..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseThreads.cmake +++ /dev/null @@ -1,53 +0,0 @@ -# - Use PThread features -# -# Synopsis: -# -# find_threads (module) -# -# where: -# -# module Name of the module to which Threads support -# etc. should be added, e.g. "opm-core". -# -# Note: Compiler flags are always added globally, to avoid ABI -# incompatibility problems. -# -# It is assumed that the following variables are available -# -# ${module}_QUIET Verbosity level of the parent's find module -# ${module}_LIBRARIES List of libraries to which Thread support will be added -# -# Example: -# find_threads (opm-core) - -include (AddOptions) -include (UseCompVer) -is_compiler_gcc_compatible () - -macro(find_threads opm) -# default is that Threads are added -option(USE_PTHREAD "Use pthreads" ON) - -# if USE_PTHREAD is enabled then check and set HAVE_PTHREAD -if( USE_PTHREAD ) - # threading library - set (CMAKE_THREAD_PREFER_PTHREAD TRUE) - find_package (Threads ${${opm}_QUIET}) - if (CMAKE_USE_PTHREADS_INIT) - list (APPEND ${opm}_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) - if (CXX_COMPAT_GCC) - check_cxx_accepts_flag ("-pthread" HAVE_PTHREAD) - if(HAVE_PTHREAD) - add_options (ALL_LANGUAGES ALL_BUILDS "-pthread") - set(HAVE_PTHREAD "1") - endif(HAVE_PTHREAD) - endif (CXX_COMPAT_GCC) - else(CMAKE_USE_PTHREADS_INIT) - set(USE_PTHREAD OFF) - endif (CMAKE_USE_PTHREADS_INIT) -else( USE_PTHREAD ) - # reset HAVE_PTHREAD - set(HAVE_PTHREAD "") -endif( USE_PTHREAD ) - -endmacro(find_threads opm) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseVCSInfo.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseVCSInfo.cmake deleted file mode 100644 index 642102e94a..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseVCSInfo.cmake +++ /dev/null @@ -1,102 +0,0 @@ -# - Get version control information from source tree -# -# Sets the following variables -# -# VCS_SYSTEM Currently, this will only be "git", or empty if -# no source code control system is found. -# -# VCS_SHA1 Hash code of the last commit. If this is empty, -# then no source code repository was found. -# -# VCS_DECOR Characters that denotes any local modifications: -# "*" - Unstaged local changes -# "+" - Staged, but not committed, local changes -# "%" - Untracked local files -function (vcs_info) - # if we haven't located git yet, then do it now - if (NOT GIT_FOUND) - find_package (Git) - endif (NOT GIT_FOUND) - - # if git is not installed (unpacked tarball), then just state that - # the version practically is unknown - set (VCS_DECOR "") - if (GIT_FOUND) - set (VCS_SYSTEM "git") - - # assume that we have a .git subdirectory under the source directory; - # if we have a bare repository, then we won't be able to build in there - # and we won't be able to identify the git dir to use from only a work - # tree, so we handle that like a regular unpacked tarball - - # exec_program is used because execute_process is buggy on common - # platforms (notable CMake 2.8.7 in Ubuntu Precise 12.04) - - # get hash code - exec_program ( - ${GIT_EXECUTABLE} ${PROJECT_SOURCE_DIR} - ARGS rev-parse --short --verify HEAD - OUTPUT_VARIABLE VCS_SHA1 - RETURN_VALUE has_sha - ) - - # exec_program mashes together output and error - if (NOT ${has_sha} EQUAL 0) - set (VCS_SHA1 "") - endif (NOT ${has_sha} EQUAL 0) - - # only proceed if we actually found a source tree in there - if (VCS_SHA1) - # check for unstaged local changes - exec_program ( - ${GIT_EXECUTABLE} ${PROJECT_SOURCE_DIR} - ARGS diff --no-ext-diff --quiet --exit-code - RETURN_VALUE dirty - OUTPUT_VARIABLE _dummy - ) - if (NOT ${dirty} EQUAL 0) - list (APPEND VCS_DECOR "*") - endif (NOT ${dirty} EQUAL 0) - - # check for staged local changes - exec_program ( - ${GIT_EXECUTABLE} ${PROJECT_SOURCE_DIR} - ARGS diff-index --no-ext-diff --cached --quiet --exit-code HEAD -- - RETURN_VALUE staged - OUTPUT_VARIABLE _dummy - ) - if (NOT ${staged} EQUAL 0) - list (APPEND VCS_DECOR "+") - endif (NOT ${staged} EQUAL 0) - - # check for untracked files - exec_program ( - ${GIT_EXECUTABLE} ${PROJECT_SOURCE_DIR} - ARGS ls-files --others --exclude-standard - OUTPUT_VARIABLE untracked - ) - if (untracked) - list (APPEND VCS_DECOR "%") - endif (untracked) - - # convert list to regular string - string (REPLACE ";" "" VCS_DECOR "${VCS_DECOR}") - endif (VCS_SHA1) - else (GIT_FOUND) - set (VCS_SYSTEM "") - set (VCS_SHA1 "") - set (VCS_DECOR "") - endif (GIT_FOUND) - - # diagnostic output - if (VCS_SYSTEM AND VCS_SHA1) - message (STATUS "Source code repository: ${VCS_SYSTEM} ${VCS_SHA1}${VCS_DECOR}") - else (VCS_SYSTEM AND VCS_SHA1) - message (STATUS "Source code repository: not found!") - endif (VCS_SYSTEM AND VCS_SHA1) - - # export to parent context - set (VCS_SYSTEM "${VCS_SYSTEM}" PARENT_SCOPE) - set (VCS_SHA1 "${VCS_SHA1}" PARENT_SCOPE) - set (VCS_DECOR "${VCS_DECOR}" PARENT_SCOPE) -endfunction (vcs_info) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseVersion.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseVersion.cmake deleted file mode 100644 index 284518bc95..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseVersion.cmake +++ /dev/null @@ -1,104 +0,0 @@ -# - Write version information into the source code -# -# Add an unconditional target to the Makefile which checks the current -# SHA of the source directory and write to a header file if and *only* -# if this has changed (thus we avoid unnecessary rebuilds). By having -# this in the Makefile, we get updated version information even though -# we haven't done any reconfiguring. -# -# The time it takes to probe the VCS for this information and write it -# to the miniature file in negligable. -# -# If the build type is Debug, then we only write a static version -# information as it gets tiresome to rebuild the project everytime one -# makes changes to any of the unit tests. - -message("-- Writing version information to local header project-version.h") - -string (TOUPPER "${CMAKE_BUILD_TYPE}" cmake_build_type_upper_) -if (cmake_build_type_upper_ MATCHES DEBUG) - file (WRITE "${PROJECT_BINARY_DIR}/project-version.h" - "#ifndef OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n" - "#define OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n" - "#define PROJECT_VERSION_NAME \"${${project}_LABEL}\"\n" - "#define PROJECT_VERSION_HASH \"debug\"\n" - "#define PROJECT_VERSION \"${${project}_LABEL} (debug)\"\n" - "#endif // OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n" - ) -else () - if (NOT GIT_FOUND) - find_package (Git) - endif () - - # if git is *still* not found means it is not present on the - # system, so there is "no" way we can update the SHA. notice - # that this is a slightly different version of the label than - # above. - if (NOT GIT_FOUND) - file (WRITE "${PROJECT_BINARY_DIR}/project-version.h" - "#ifndef OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n" - "#define OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n" - "#define PROJECT_VERSION_NAME \"${${project}_LABEL}\"\n" - "#define PROJECT_VERSION_HASH \"unknown git version\"\n" - "#define PROJECT_VERSION \"${${project}_LABEL} (unknown git version)\"\n" - "#endif // OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n" - ) - else () - add_custom_target (update-version ALL - COMMAND ${CMAKE_COMMAND} - -DCMAKE_HOME_DIRECTORY=${CMAKE_HOME_DIRECTORY} - -DGIT_EXECUTABLE=${GIT_EXECUTABLE} - -DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR} - -DPROJECT_BINARY_DIR=${PROJECT_BINARY_DIR} - -DPROJECT_LABEL=${${project}_LABEL} - -P ${OPM_MACROS_ROOT}/cmake/Scripts/WriteVerSHA.cmake - COMMENT "Updating version information" - ) - - # the target above gets built every time thanks to the "ALL" modifier, - # but it must also be done before the main library so it can pick up - # any changes it does. - if (${project}_TARGET) - add_dependencies (${${project}_TARGET} update-version) - endif () - endif () -endif () - -# safety precaution: check that we don't have version number mismatch. - -# first get the name of the module (e.g. "core") -set (_module_regexp "([^-]+)-(.*)") -string (REGEX REPLACE "${_module_regexp}" "\\1" _suite_name "${project}") -string (REGEX REPLACE "${_module_regexp}" "\\2" _module_name "${project}") - -# if we have a version number it must be in this file, e.g. opm/core/version.h -set (_rel_ver_h "${${project}_DIR}/${_module_name}/version.h") -set (_version_h "${PROJECT_SOURCE_DIR}/${_rel_ver_h}") - -# not all modules have version files, so only check if they do -if (EXISTS "${_version_h}") - # uppercase versions which is used in the file - string (TOUPPER "${_suite_name}" _suite_upper) - string (TOUPPER "${_module_name}" _module_upper) - - # scan the files for version define for major version - set (_major_regexp "#define[ ]+${_suite_upper}_${_module_upper}_VERSION_MAJOR[ ]+([0-9]*)") - file (STRINGS "${_version_h}" _version_h_major REGEX "${_major_regexp}") - string (REGEX REPLACE "${_major_regexp}" "\\1" _version_h_major "${_version_h_major}") - - # exactly the same, but minor version (making a macro is more lines...) - set (_minor_regexp "#define[ ]+${_suite_upper}_${_module_upper}_VERSION_MINOR[ ]+([0-9]*)") - file (STRINGS "${_version_h}" _version_h_minor REGEX "${_minor_regexp}") - string (REGEX REPLACE "${_minor_regexp}" "\\1" _version_h_minor "${_version_h_minor}") - - # compare what we got from the file with what we have defined here - if (NOT (("${_version_h_major}" EQUAL "${${project}_VERSION_MAJOR}") - AND ("${_version_h_minor}" EQUAL "${${project}_VERSION_MINOR}"))) - set (_proj_ver "${${project}_VERSION_MAJOR}.${${project}_VERSION_MINOR}") - set (_file_ver "${_version_h_major}.${_version_h_minor}") - message (AUTHOR_WARNING - "Version in build system (dune.module) is \"${_proj_ver}\", " - "but version in source (${_rel_ver_h}) is \"${_file_ver}\"" - ) - endif () -endif () diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseWarnings.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseWarnings.cmake deleted file mode 100644 index a2157df18d..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/UseWarnings.cmake +++ /dev/null @@ -1,19 +0,0 @@ -# - Turn on warnings when compiling - -include (AddOptions) -include (UseCompVer) -is_compiler_gcc_compatible () - -if (CXX_COMPAT_GCC) - # default warnings flags, if not set by user - set_default_option (CXX _warn_flag "-Wall" "(^|\ )-W") - if (_warn_flag) - message (STATUS "All warnings enabled: ${_warn_flag}") - add_options (ALL_LANGUAGES ALL_BUILDS "${_warn_flag}") - endif (_warn_flag) -endif () - -option(SILENCE_EXTERNAL_WARNINGS "Disable some warnings from external packages (requires GCC 4.6 or newer)" OFF) -if(SILENCE_EXTERNAL_WARNINGS AND CXX_COMPAT_GCC) - add_definitions(-DSILENCE_EXTERNAL_WARNINGS) -endif() diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/compat-2.8.3/CMakeParseArguments.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/compat-2.8.3/CMakeParseArguments.cmake deleted file mode 100644 index 7ce4c49ae5..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/compat-2.8.3/CMakeParseArguments.cmake +++ /dev/null @@ -1,138 +0,0 @@ -# CMAKE_PARSE_ARGUMENTS( args...) -# -# CMAKE_PARSE_ARGUMENTS() is intended to be used in macros or functions for -# parsing the arguments given to that macro or function. -# It processes the arguments and defines a set of variables which hold the -# values of the respective options. -# -# The argument contains all options for the respective macro, -# i.e. keywords which can be used when calling the macro without any value -# following, like e.g. the OPTIONAL keyword of the install() command. -# -# The argument contains all keywords for this macro -# which are followed by one value, like e.g. DESTINATION keyword of the -# install() command. -# -# The argument contains all keywords for this macro -# which can be followed by more than one value, like e.g. the TARGETS or -# FILES keywords of the install() command. -# -# When done, CMAKE_PARSE_ARGUMENTS() will have defined for each of the -# keywords listed in , and -# a variable composed of the given -# followed by "_" and the name of the respective keyword. -# These variables will then hold the respective value from the argument list. -# For the keywords this will be TRUE or FALSE. -# -# All remaining arguments are collected in a variable -# _UNPARSED_ARGUMENTS, this can be checked afterwards to see whether -# your macro was called with unrecognized parameters. -# -# As an example here a my_install() macro, which takes similar arguments as the -# real install() command: -# -# function(MY_INSTALL) -# set(options OPTIONAL FAST) -# set(oneValueArgs DESTINATION RENAME) -# set(multiValueArgs TARGETS CONFIGURATIONS) -# cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) -# ... -# -# Assume my_install() has been called like this: -# my_install(TARGETS foo bar DESTINATION bin OPTIONAL blub) -# -# After the cmake_parse_arguments() call the macro will have set the following -# variables: -# MY_INSTALL_OPTIONAL = TRUE -# MY_INSTALL_FAST = FALSE (this option was not used when calling my_install() -# MY_INSTALL_DESTINATION = "bin" -# MY_INSTALL_RENAME = "" (was not used) -# MY_INSTALL_TARGETS = "foo;bar" -# MY_INSTALL_CONFIGURATIONS = "" (was not used) -# MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (no value expected after "OPTIONAL" -# -# You can the continue and process these variables. -# -# Keywords terminate lists of values, e.g. if directly after a one_value_keyword -# another recognized keyword follows, this is interpreted as the beginning of -# the new option. -# E.g. my_install(TARGETS foo DESTINATION OPTIONAL) would result in -# MY_INSTALL_DESTINATION set to "OPTIONAL", but MY_INSTALL_DESTINATION would -# be empty and MY_INSTALL_OPTIONAL would be set to TRUE therefor. - -#============================================================================= -# Copyright 2010 Alexander Neundorf -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - - -if(__CMAKE_PARSE_ARGUMENTS_INCLUDED) - return() -endif() -set(__CMAKE_PARSE_ARGUMENTS_INCLUDED TRUE) - - -function(CMAKE_PARSE_ARGUMENTS prefix _optionNames _singleArgNames _multiArgNames) - # first set all result variables to empty/FALSE - foreach(arg_name ${_singleArgNames} ${_multiArgNames}) - set(${prefix}_${arg_name}) - endforeach(arg_name) - - foreach(option ${_optionNames}) - set(${prefix}_${option} FALSE) - endforeach(option) - - set(${prefix}_UNPARSED_ARGUMENTS) - - set(insideValues FALSE) - set(currentArgName) - - # now iterate over all arguments and fill the result variables - foreach(currentArg ${ARGN}) - list(FIND _optionNames "${currentArg}" optionIndex) # ... then this marks the end of the arguments belonging to this keyword - list(FIND _singleArgNames "${currentArg}" singleArgIndex) # ... then this marks the end of the arguments belonging to this keyword - list(FIND _multiArgNames "${currentArg}" multiArgIndex) # ... then this marks the end of the arguments belonging to this keyword - - if(${optionIndex} EQUAL -1 AND ${singleArgIndex} EQUAL -1 AND ${multiArgIndex} EQUAL -1) - if(insideValues) - if("${insideValues}" STREQUAL "SINGLE") - set(${prefix}_${currentArgName} ${currentArg}) - set(insideValues FALSE) - elseif("${insideValues}" STREQUAL "MULTI") - list(APPEND ${prefix}_${currentArgName} ${currentArg}) - endif() - else(insideValues) - list(APPEND ${prefix}_UNPARSED_ARGUMENTS ${currentArg}) - endif(insideValues) - else() - if(NOT ${optionIndex} EQUAL -1) - set(${prefix}_${currentArg} TRUE) - set(insideValues FALSE) - elseif(NOT ${singleArgIndex} EQUAL -1) - set(currentArgName ${currentArg}) - set(${prefix}_${currentArgName}) - set(insideValues "SINGLE") - elseif(NOT ${multiArgIndex} EQUAL -1) - set(currentArgName ${currentArg}) - set(${prefix}_${currentArgName}) - set(insideValues "MULTI") - endif() - endif() - - endforeach(currentArg) - - # propagate the result variables to the caller: - foreach(arg_name ${_singleArgNames} ${_multiArgNames} ${_optionNames}) - set(${prefix}_${arg_name} ${${prefix}_${arg_name}} PARENT_SCOPE) - endforeach(arg_name) - set(${prefix}_UNPARSED_ARGUMENTS ${${prefix}_UNPARSED_ARGUMENTS} PARENT_SCOPE) - -endfunction(CMAKE_PARSE_ARGUMENTS _options _singleArgs _multiArgs) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/compat-2.8.5/FindGit.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/compat-2.8.5/FindGit.cmake deleted file mode 100644 index af316d81c5..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/compat-2.8.5/FindGit.cmake +++ /dev/null @@ -1,47 +0,0 @@ -# The module defines the following variables: -# GIT_EXECUTABLE - path to git command line client -# GIT_FOUND - true if the command line client was found -# Example usage: -# find_package(Git) -# if(GIT_FOUND) -# message("git found: ${GIT_EXECUTABLE}") -# endif() - -#============================================================================= -# Copyright 2010 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -# Look for 'git' or 'eg' (easy git) -# -set(git_names git eg) - -# Prefer .cmd variants on Windows unless running in a Makefile -# in the MSYS shell. -# -if(WIN32) - if(NOT CMAKE_GENERATOR MATCHES "MSYS") - set(git_names git.cmd git eg.cmd eg) - endif() -endif() - -find_program(GIT_EXECUTABLE - NAMES ${git_names} - PATH_SUFFIXES Git/cmd Git/bin - DOC "git command line client" - ) -mark_as_advanced(GIT_EXECUTABLE) - -# Handle the QUIETLY and REQUIRED arguments and set GIT_FOUND to TRUE if -# all listed variables are TRUE - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Git DEFAULT_MSG GIT_EXECUTABLE) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/compat-2.8.7/CMakePushCheckState.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/compat-2.8.7/CMakePushCheckState.cmake deleted file mode 100644 index 0a42128183..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/compat-2.8.7/CMakePushCheckState.cmake +++ /dev/null @@ -1,61 +0,0 @@ -# This module defines two macros: -# CMAKE_PUSH_CHECK_STATE() -# and -# CMAKE_POP_CHECK_STATE() -# These two macros can be used to save and restore the state of the variables -# CMAKE_REQUIRED_FLAGS, CMAKE_REQUIRED_DEFINITIONS, CMAKE_REQUIRED_LIBRARIES -# and CMAKE_REQUIRED_INCLUDES used by the various Check-files coming with CMake, -# like e.g. check_function_exists() etc. -# The variable contents are pushed on a stack, pushing multiple times is supported. -# This is useful e.g. when executing such tests in a Find-module, where they have to be set, -# but after the Find-module has been executed they should have the same value -# as they had before. -# -# Usage: -# cmake_push_check_state() -# set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -DSOME_MORE_DEF) -# check_function_exists(...) -# cmake_pop_check_state() - -#============================================================================= -# Copyright 2006-2011 Alexander Neundorf, -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - - -MACRO(CMAKE_PUSH_CHECK_STATE) - - IF(NOT DEFINED _CMAKE_PUSH_CHECK_STATE_COUNTER) - SET(_CMAKE_PUSH_CHECK_STATE_COUNTER 0) - ENDIF() - - MATH(EXPR _CMAKE_PUSH_CHECK_STATE_COUNTER "${_CMAKE_PUSH_CHECK_STATE_COUNTER}+1") - - SET(_CMAKE_REQUIRED_INCLUDES_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_INCLUDES}) - SET(_CMAKE_REQUIRED_DEFINITIONS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_DEFINITIONS}) - SET(_CMAKE_REQUIRED_LIBRARIES_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_LIBRARIES}) - SET(_CMAKE_REQUIRED_FLAGS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_FLAGS}) -ENDMACRO(CMAKE_PUSH_CHECK_STATE) - -MACRO(CMAKE_POP_CHECK_STATE) - -# don't pop more than we pushed - IF("${_CMAKE_PUSH_CHECK_STATE_COUNTER}" GREATER "0") - - SET(CMAKE_REQUIRED_INCLUDES ${_CMAKE_REQUIRED_INCLUDES_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER}}) - SET(CMAKE_REQUIRED_DEFINITIONS ${_CMAKE_REQUIRED_DEFINITIONS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER}}) - SET(CMAKE_REQUIRED_LIBRARIES ${_CMAKE_REQUIRED_LIBRARIES_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER}}) - SET(CMAKE_REQUIRED_FLAGS ${_CMAKE_REQUIRED_FLAGS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER}}) - - MATH(EXPR _CMAKE_PUSH_CHECK_STATE_COUNTER "${_CMAKE_PUSH_CHECK_STATE_COUNTER}-1") - ENDIF() - -ENDMACRO(CMAKE_POP_CHECK_STATE) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/compat-2.8.7/FindBLAS.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/compat-2.8.7/FindBLAS.cmake deleted file mode 100644 index 9b76d909c1..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/compat-2.8.7/FindBLAS.cmake +++ /dev/null @@ -1,624 +0,0 @@ -# - Find BLAS library -# This module finds an installed fortran library that implements the BLAS -# linear-algebra interface (see http://www.netlib.org/blas/). -# The list of libraries searched for is taken -# from the autoconf macro file, acx_blas.m4 (distributed at -# http://ac-archive.sourceforge.net/ac-archive/acx_blas.html). -# -# This module sets the following variables: -# BLAS_FOUND - set to true if a library implementing the BLAS interface -# is found -# BLAS_LINKER_FLAGS - uncached list of required linker flags (excluding -l -# and -L). -# BLAS_LIBRARIES - uncached list of libraries (using full path name) to -# link against to use BLAS -# BLAS95_LIBRARIES - uncached list of libraries (using full path name) -# to link against to use BLAS95 interface -# BLAS95_FOUND - set to true if a library implementing the BLAS f95 interface -# is found -# BLA_STATIC if set on this determines what kind of linkage we do (static) -# BLA_VENDOR if set checks only the specified vendor, if not set checks -# all the possibilities -# BLA_F95 if set on tries to find the f95 interfaces for BLAS/LAPACK -########## -### List of vendors (BLA_VENDOR) valid in this module -## Goto,ATLAS PhiPACK,CXML,DXML,SunPerf,SCSL,SGIMATH,IBMESSL,Intel10_32 (intel mkl v10 32 bit),Intel10_64lp (intel mkl v10 64 bit,lp thread model, lp64 model), -## Intel( older versions of mkl 32 and 64 bit), ACML,ACML_MP,ACML_GPU,Apple, NAS, Generic -# C/CXX should be enabled to use Intel mkl - -#============================================================================= -# Copyright 2007-2009 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -include(CheckFunctionExists) -include(CheckFortranFunctionExists) - -set(_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) - -# Check the language being used -get_property( _LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES ) -if( _LANGUAGES_ MATCHES Fortran ) - set( _CHECK_FORTRAN TRUE ) -elseif( (_LANGUAGES_ MATCHES C) OR (_LANGUAGES_ MATCHES CXX) ) - set( _CHECK_FORTRAN FALSE ) -else() - if(BLAS_FIND_REQUIRED) - message(FATAL_ERROR "FindBLAS requires Fortran, C, or C++ to be enabled.") - else(BLAS_FIND_REQUIRED) - message(STATUS "Looking for BLAS... - NOT found (Unsupported languages)") - return() - endif(BLAS_FIND_REQUIRED) -endif( ) - -macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread) -# This macro checks for the existence of the combination of fortran libraries -# given by _list. If the combination is found, this macro checks (using the -# Check_Fortran_Function_Exists macro) whether can link against that library -# combination using the name of a routine given by _name using the linker -# flags given by _flags. If the combination of libraries is found and passes -# the link test, LIBRARIES is set to the list of complete library paths that -# have been found. Otherwise, LIBRARIES is set to FALSE. - -# N.B. _prefix is the prefix applied to the names of all cached variables that -# are generated internally and marked advanced by this macro. - -set(_libdir ${ARGN}) - -set(_libraries_work TRUE) -set(${LIBRARIES}) -set(_combined_name) -if (NOT _libdir) - if (WIN32) - set(_libdir ENV LIB) - elseif (APPLE) - set(_libdir /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH) - else () - set(_libdir /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH) - endif () -endif () -foreach(_library ${_list}) - set(_combined_name ${_combined_name}_${_library}) - - if(_libraries_work) - if (BLA_STATIC) - if (WIN32) - set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES}) - endif ( WIN32 ) - if (APPLE) - set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES}) - else (APPLE) - set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) - endif (APPLE) - else (BLA_STATIC) - if (CMAKE_SYSTEM_NAME STREQUAL "Linux") - # for ubuntu's libblas3gf and liblapack3gf packages - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} .so.3gf) - endif () - endif (BLA_STATIC) - find_library(${_prefix}_${_library}_LIBRARY - NAMES ${_library} - PATHS ${_libdir} - ) - mark_as_advanced(${_prefix}_${_library}_LIBRARY) - set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY}) - set(_libraries_work ${${_prefix}_${_library}_LIBRARY}) - endif(_libraries_work) -endforeach(_library ${_list}) -if(_libraries_work) - # Test this combination of libraries. - set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_threads}) -# message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}") - if (_CHECK_FORTRAN) - check_fortran_function_exists("${_name}" ${_prefix}${_combined_name}_WORKS) - else() - check_function_exists("${_name}_" ${_prefix}${_combined_name}_WORKS) - endif() - set(CMAKE_REQUIRED_LIBRARIES) - mark_as_advanced(${_prefix}${_combined_name}_WORKS) - set(_libraries_work ${${_prefix}${_combined_name}_WORKS}) -endif(_libraries_work) -if(NOT _libraries_work) - set(${LIBRARIES} FALSE) -endif(NOT _libraries_work) -#message("DEBUG: ${LIBRARIES} = ${${LIBRARIES}}") -endmacro(Check_Fortran_Libraries) - -set(BLAS_LINKER_FLAGS) -set(BLAS_LIBRARIES) -set(BLAS95_LIBRARIES) -if ($ENV{BLA_VENDOR} MATCHES ".+") - set(BLA_VENDOR $ENV{BLA_VENDOR}) -else ($ENV{BLA_VENDOR} MATCHES ".+") - if(NOT BLA_VENDOR) - set(BLA_VENDOR "All") - endif(NOT BLA_VENDOR) -endif ($ENV{BLA_VENDOR} MATCHES ".+") - -if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - # gotoblas (http://www.tacc.utexas.edu/tacc-projects/gotoblas2) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "goto2" - "" - ) - endif(NOT BLAS_LIBRARIES) -endif (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All") - -if (BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - dgemm - "" - "f77blas;atlas" - "" - ) - endif(NOT BLAS_LIBRARIES) -endif (BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All") - -# BLAS in PhiPACK libraries? (requires generic BLAS lib, too) -if (BLA_VENDOR STREQUAL "PhiPACK" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "sgemm;dgemm;blas" - "" - ) - endif(NOT BLAS_LIBRARIES) -endif (BLA_VENDOR STREQUAL "PhiPACK" OR BLA_VENDOR STREQUAL "All") - -# BLAS in Alpha CXML library? -if (BLA_VENDOR STREQUAL "CXML" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "cxml" - "" - ) - endif(NOT BLAS_LIBRARIES) -endif (BLA_VENDOR STREQUAL "CXML" OR BLA_VENDOR STREQUAL "All") - -# BLAS in Alpha DXML library? (now called CXML, see above) -if (BLA_VENDOR STREQUAL "DXML" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "dxml" - "" - ) - endif(NOT BLAS_LIBRARIES) -endif (BLA_VENDOR STREQUAL "DXML" OR BLA_VENDOR STREQUAL "All") - -# BLAS in Sun Performance library? -if (BLA_VENDOR STREQUAL "SunPerf" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "-xlic_lib=sunperf" - "sunperf;sunmath" - "" - ) - if(BLAS_LIBRARIES) - set(BLAS_LINKER_FLAGS "-xlic_lib=sunperf") - endif(BLAS_LIBRARIES) - endif(NOT BLAS_LIBRARIES) -endif (BLA_VENDOR STREQUAL "SunPerf" OR BLA_VENDOR STREQUAL "All") - -# BLAS in SCSL library? (SGI/Cray Scientific Library) -if (BLA_VENDOR STREQUAL "SCSL" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "scsl" - "" - ) - endif(NOT BLAS_LIBRARIES) -endif (BLA_VENDOR STREQUAL "SCSL" OR BLA_VENDOR STREQUAL "All") - -# BLAS in SGIMATH library? -if (BLA_VENDOR STREQUAL "SGIMATH" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "complib.sgimath" - "" - ) - endif(NOT BLAS_LIBRARIES) -endif (BLA_VENDOR STREQUAL "SGIMATH" OR BLA_VENDOR STREQUAL "All") - -# BLAS in IBM ESSL library? (requires generic BLAS lib, too) -if (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "essl;blas" - "" - ) - endif(NOT BLAS_LIBRARIES) -endif (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All") - -#BLAS in acml library? -if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All") - if( ((BLA_VENDOR STREQUAL "ACML") AND (NOT BLAS_ACML_LIB_DIRS)) OR - ((BLA_VENDOR STREQUAL "ACML_MP") AND (NOT BLAS_ACML_MP_LIB_DIRS)) OR - ((BLA_VENDOR STREQUAL "ACML_GPU") AND (NOT BLAS_ACML_GPU_LIB_DIRS)) - ) - # try to find acml in "standard" paths - if( WIN32 ) - file( GLOB _ACML_ROOT "C:/AMD/acml*/ACML-EULA.txt" ) - else() - file( GLOB _ACML_ROOT "/opt/acml*/ACML-EULA.txt" ) - endif() - if( WIN32 ) - file( GLOB _ACML_GPU_ROOT "C:/AMD/acml*/GPGPUexamples" ) - else() - file( GLOB _ACML_GPU_ROOT "/opt/acml*/GPGPUexamples" ) - endif() - list(GET _ACML_ROOT 0 _ACML_ROOT) - list(GET _ACML_GPU_ROOT 0 _ACML_GPU_ROOT) - if( _ACML_ROOT ) - get_filename_component( _ACML_ROOT ${_ACML_ROOT} PATH ) - if( SIZEOF_INTEGER EQUAL 8 ) - set( _ACML_PATH_SUFFIX "_int64" ) - else() - set( _ACML_PATH_SUFFIX "" ) - endif() - if( CMAKE_Fortran_COMPILER_ID STREQUAL "Intel" ) - set( _ACML_COMPILER32 "ifort32" ) - set( _ACML_COMPILER64 "ifort64" ) - elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "SunPro" ) - set( _ACML_COMPILER32 "sun32" ) - set( _ACML_COMPILER64 "sun64" ) - elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "PGI" ) - set( _ACML_COMPILER32 "pgi32" ) - if( WIN32 ) - set( _ACML_COMPILER64 "win64" ) - else() - set( _ACML_COMPILER64 "pgi64" ) - endif() - elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "Open64" ) - # 32 bit builds not supported on Open64 but for code simplicity - # We'll just use the same directory twice - set( _ACML_COMPILER32 "open64_64" ) - set( _ACML_COMPILER64 "open64_64" ) - elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "NAG" ) - set( _ACML_COMPILER32 "nag32" ) - set( _ACML_COMPILER64 "nag64" ) - else() #if( CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" ) - set( _ACML_COMPILER32 "gfortran32" ) - set( _ACML_COMPILER64 "gfortran64" ) - endif() - - if( BLA_VENDOR STREQUAL "ACML_MP" ) - set(_ACML_MP_LIB_DIRS - "${_ACML_ROOT}/${_ACML_COMPILER32}_mp${_ACML_PATH_SUFFIX}/lib" - "${_ACML_ROOT}/${_ACML_COMPILER64}_mp${_ACML_PATH_SUFFIX}/lib" ) - else() #if( _BLAS_VENDOR STREQUAL "ACML" ) - set(_ACML_LIB_DIRS - "${_ACML_ROOT}/${_ACML_COMPILER32}${_ACML_PATH_SUFFIX}/lib" - "${_ACML_ROOT}/${_ACML_COMPILER64}${_ACML_PATH_SUFFIX}/lib" ) - endif() - endif() - elseif(BLAS_${BLA_VENDOR}_LIB_DIRS) - set(_${BLA_VENDOR}_LIB_DIRS ${BLAS_${BLA_VENDOR}_LIB_DIRS}) - endif() - - if( BLA_VENDOR STREQUAL "ACML_MP" ) - foreach( BLAS_ACML_MP_LIB_DIRS ${_ACML_MP_LIB_DIRS}) - check_fortran_libraries ( - BLAS_LIBRARIES - BLAS - sgemm - "" "acml_mp;acml_mv" "" ${BLAS_ACML_MP_LIB_DIRS} - ) - if( BLAS_LIBRARIES ) - break() - endif() - endforeach() - elseif( BLA_VENDOR STREQUAL "ACML_GPU" ) - foreach( BLAS_ACML_GPU_LIB_DIRS ${_ACML_GPU_LIB_DIRS}) - check_fortran_libraries ( - BLAS_LIBRARIES - BLAS - sgemm - "" "acml;acml_mv;CALBLAS" "" ${BLAS_ACML_GPU_LIB_DIRS} - ) - if( BLAS_LIBRARIES ) - break() - endif() - endforeach() - else() #if( _BLAS_VENDOR STREQUAL "ACML" ) - foreach( BLAS_ACML_LIB_DIRS ${_ACML_LIB_DIRS} ) - check_fortran_libraries ( - BLAS_LIBRARIES - BLAS - sgemm - "" "acml;acml_mv" "" ${BLAS_ACML_LIB_DIRS} - ) - if( BLAS_LIBRARIES ) - break() - endif() - endforeach() - endif() - - # Either acml or acml_mp should be in LD_LIBRARY_PATH but not both - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "acml;acml_mv" - "" - ) - endif(NOT BLAS_LIBRARIES) - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "acml_mp;acml_mv" - "" - ) - endif(NOT BLAS_LIBRARIES) - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "acml;acml_mv;CALBLAS" - "" - ) - endif(NOT BLAS_LIBRARIES) -endif () # ACML - -# Apple BLAS library? -if (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All") -if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - dgemm - "" - "Accelerate" - "" - ) - endif(NOT BLAS_LIBRARIES) -endif (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All") - -if (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All") - if ( NOT BLAS_LIBRARIES ) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - dgemm - "" - "vecLib" - "" - ) - endif ( NOT BLAS_LIBRARIES ) -endif (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All") -# Generic BLAS library? -if (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All") - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "blas" - "" - ) - endif(NOT BLAS_LIBRARIES) -endif (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All") - -#BLAS in intel mkl 10 library? (em64t 64bit) -if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All") - if (NOT WIN32) - set(LM "-lm") - endif () - if (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX) - if(BLAS_FIND_QUIETLY OR NOT BLAS_FIND_REQUIRED) - find_package(Threads) - else(BLAS_FIND_QUIETLY OR NOT BLAS_FIND_REQUIRED) - find_package(Threads REQUIRED) - endif(BLAS_FIND_QUIETLY OR NOT BLAS_FIND_REQUIRED) - if (WIN32) - if(BLA_F95) - if(NOT BLAS95_LIBRARIES) - check_fortran_libraries( - BLAS95_LIBRARIES - BLAS - sgemm - "" - "mkl_blas95;mkl_intel_c;mkl_intel_thread;mkl_core;libguide40" - "" - ) - endif(NOT BLAS95_LIBRARIES) - else(BLA_F95) - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - SGEMM - "" - "mkl_c_dll;mkl_intel_thread_dll;mkl_core_dll;libguide40" - "" - ) - endif(NOT BLAS_LIBRARIES) - endif(BLA_F95) - else(WIN32) - if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All") - if(BLA_F95) - if(NOT BLAS95_LIBRARIES) - check_fortran_libraries( - BLAS95_LIBRARIES - BLAS - sgemm - "" - "mkl_blas95;mkl_intel;mkl_intel_thread;mkl_core;guide" - "${CMAKE_THREAD_LIBS_INIT};${LM}" - ) - endif(NOT BLAS95_LIBRARIES) - else(BLA_F95) - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "mkl_intel;mkl_intel_thread;mkl_core;guide" - "${CMAKE_THREAD_LIBS_INIT}" - "${LM}" - ) - endif(NOT BLAS_LIBRARIES) - endif(BLA_F95) - endif (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All") - if (BLA_VENDOR STREQUAL "Intel10_64lp" OR BLA_VENDOR STREQUAL "All") - if(BLA_F95) - if(NOT BLAS95_LIBRARIES) - check_fortran_libraries( - BLAS95_LIBRARIES - BLAS - sgemm - "" - "mkl_blas95;mkl_intel_lp64;mkl_intel_thread;mkl_core;guide" - "${CMAKE_THREAD_LIBS_INIT};${LM}" - ) - endif(NOT BLAS95_LIBRARIES) - else(BLA_F95) - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "mkl_intel_lp64;mkl_intel_thread;mkl_core;guide" - "${CMAKE_THREAD_LIBS_INIT};${LM}" - ) - endif(NOT BLAS_LIBRARIES) - endif(BLA_F95) - endif (BLA_VENDOR STREQUAL "Intel10_64lp" OR BLA_VENDOR STREQUAL "All") - endif (WIN32) - #older vesions of intel mkl libs - # BLAS in intel mkl library? (shared) - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "mkl;guide" - "${CMAKE_THREAD_LIBS_INIT};${LM}" - ) - endif(NOT BLAS_LIBRARIES) - #BLAS in intel mkl library? (static, 32bit) - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "mkl_ia32;guide" - "${CMAKE_THREAD_LIBS_INIT};${LM}" - ) - endif(NOT BLAS_LIBRARIES) - #BLAS in intel mkl library? (static, em64t 64bit) - if(NOT BLAS_LIBRARIES) - check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "mkl_em64t;guide" - "${CMAKE_THREAD_LIBS_INIT};${LM}" - ) - endif(NOT BLAS_LIBRARIES) - endif (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX) -endif (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All") - - -if(BLA_F95) - if(BLAS95_LIBRARIES) - set(BLAS95_FOUND TRUE) - else(BLAS95_LIBRARIES) - set(BLAS95_FOUND FALSE) - endif(BLAS95_LIBRARIES) - - if(NOT BLAS_FIND_QUIETLY) - if(BLAS95_FOUND) - message(STATUS "A library with BLAS95 API found.") - else(BLAS95_FOUND) - if(BLAS_FIND_REQUIRED) - message(FATAL_ERROR - "A required library with BLAS95 API not found. Please specify library location.") - else(BLAS_FIND_REQUIRED) - message(STATUS - "A library with BLAS95 API not found. Please specify library location.") - endif(BLAS_FIND_REQUIRED) - endif(BLAS95_FOUND) - endif(NOT BLAS_FIND_QUIETLY) - set(BLAS_FOUND TRUE) - set(BLAS_LIBRARIES "${BLAS95_LIBRARIES}") -else(BLA_F95) - if(BLAS_LIBRARIES) - set(BLAS_FOUND TRUE) - else(BLAS_LIBRARIES) - set(BLAS_FOUND FALSE) - endif(BLAS_LIBRARIES) - - if(NOT BLAS_FIND_QUIETLY) - if(BLAS_FOUND) - message(STATUS "A library with BLAS API found.") - else(BLAS_FOUND) - if(BLAS_FIND_REQUIRED) - message(FATAL_ERROR - "A required library with BLAS API not found. Please specify library location." - ) - else(BLAS_FIND_REQUIRED) - message(STATUS - "A library with BLAS API not found. Please specify library location." - ) - endif(BLAS_FIND_REQUIRED) - endif(BLAS_FOUND) - endif(NOT BLAS_FIND_QUIETLY) -endif(BLA_F95) - -set(CMAKE_FIND_LIBRARY_SUFFIXES ${_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/compat-2.8.7/FindLAPACK.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/compat-2.8.7/FindLAPACK.cmake deleted file mode 100644 index 884266fc95..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/compat-2.8.7/FindLAPACK.cmake +++ /dev/null @@ -1,307 +0,0 @@ -# - Find LAPACK library -# This module finds an installed fortran library that implements the LAPACK -# linear-algebra interface (see http://www.netlib.org/lapack/). -# -# The approach follows that taken for the autoconf macro file, acx_lapack.m4 -# (distributed at http://ac-archive.sourceforge.net/ac-archive/acx_lapack.html). -# -# This module sets the following variables: -# LAPACK_FOUND - set to true if a library implementing the LAPACK interface -# is found -# LAPACK_LINKER_FLAGS - uncached list of required linker flags (excluding -l -# and -L). -# LAPACK_LIBRARIES - uncached list of libraries (using full path name) to -# link against to use LAPACK -# LAPACK95_LIBRARIES - uncached list of libraries (using full path name) to -# link against to use LAPACK95 -# LAPACK95_FOUND - set to true if a library implementing the LAPACK f95 -# interface is found -# BLA_STATIC if set on this determines what kind of linkage we do (static) -# BLA_VENDOR if set checks only the specified vendor, if not set checks -# all the possibilities -# BLA_F95 if set on tries to find the f95 interfaces for BLAS/LAPACK -### List of vendors (BLA_VENDOR) valid in this module -## Intel(mkl), ACML,Apple, NAS, Generic - -#============================================================================= -# Copyright 2007-2009 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -set(_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) - -get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES) -if (NOT _LANGUAGES_ MATCHES Fortran) -include(CheckFunctionExists) -else (NOT _LANGUAGES_ MATCHES Fortran) -include(CheckFortranFunctionExists) -endif (NOT _LANGUAGES_ MATCHES Fortran) - -set(LAPACK_FOUND FALSE) -set(LAPACK95_FOUND FALSE) - -# TODO: move this stuff to separate module - -macro(Check_Lapack_Libraries LIBRARIES _prefix _name _flags _list _blas _threads) -# This macro checks for the existence of the combination of fortran libraries -# given by _list. If the combination is found, this macro checks (using the -# Check_Fortran_Function_Exists macro) whether can link against that library -# combination using the name of a routine given by _name using the linker -# flags given by _flags. If the combination of libraries is found and passes -# the link test, LIBRARIES is set to the list of complete library paths that -# have been found. Otherwise, LIBRARIES is set to FALSE. - -# N.B. _prefix is the prefix applied to the names of all cached variables that -# are generated internally and marked advanced by this macro. - -set(_libraries_work TRUE) -set(${LIBRARIES}) -set(_combined_name) -if (NOT _libdir) - if (WIN32) - set(_libdir ENV LIB) - elseif (APPLE) - set(_libdir /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH) - else () - set(_libdir /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH) - endif () -endif () -foreach(_library ${_list}) - set(_combined_name ${_combined_name}_${_library}) - - if(_libraries_work) - if (BLA_STATIC) - if (WIN32) - set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES}) - endif ( WIN32 ) - if (APPLE) - set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES}) - else (APPLE) - set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) - endif (APPLE) - else (BLA_STATIC) - if (CMAKE_SYSTEM_NAME STREQUAL "Linux") - # for ubuntu's libblas3gf and liblapack3gf packages - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} .so.3gf) - endif () - endif (BLA_STATIC) - find_library(${_prefix}_${_library}_LIBRARY - NAMES ${_library} - PATHS ${_libdir} - ) - mark_as_advanced(${_prefix}_${_library}_LIBRARY) - set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY}) - set(_libraries_work ${${_prefix}_${_library}_LIBRARY}) - endif(_libraries_work) -endforeach(_library ${_list}) - -if(_libraries_work) - # Test this combination of libraries. - if(UNIX AND BLA_STATIC) - set(CMAKE_REQUIRED_LIBRARIES ${_flags} "-Wl,--start-group" ${${LIBRARIES}} ${_blas} "-Wl,--end-group" ${_threads}) - else(UNIX AND BLA_STATIC) - set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_blas} ${_threads}) - endif(UNIX AND BLA_STATIC) -# message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}") - if (NOT _LANGUAGES_ MATCHES Fortran) - check_function_exists("${_name}_" ${_prefix}${_combined_name}_WORKS) - else (NOT _LANGUAGES_ MATCHES Fortran) - check_fortran_function_exists(${_name} ${_prefix}${_combined_name}_WORKS) - endif (NOT _LANGUAGES_ MATCHES Fortran) - set(CMAKE_REQUIRED_LIBRARIES) - mark_as_advanced(${_prefix}${_combined_name}_WORKS) - set(_libraries_work ${${_prefix}${_combined_name}_WORKS}) - #message("DEBUG: ${LIBRARIES} = ${${LIBRARIES}}") -endif(_libraries_work) - - if(_libraries_work) - set(${LIBRARIES} ${${LIBRARIES}} ${_blas} ${_threads}) - else(_libraries_work) - set(${LIBRARIES} FALSE) - endif(_libraries_work) - -endmacro(Check_Lapack_Libraries) - - -set(LAPACK_LINKER_FLAGS) -set(LAPACK_LIBRARIES) -set(LAPACK95_LIBRARIES) - - -if(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED) - find_package(BLAS) -else(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED) - find_package(BLAS REQUIRED) -endif(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED) - - -if(BLAS_FOUND) - set(LAPACK_LINKER_FLAGS ${BLAS_LINKER_FLAGS}) - if ($ENV{BLA_VENDOR} MATCHES ".+") - set(BLA_VENDOR $ENV{BLA_VENDOR}) - else ($ENV{BLA_VENDOR} MATCHES ".+") - if(NOT BLA_VENDOR) - set(BLA_VENDOR "All") - endif(NOT BLA_VENDOR) - endif ($ENV{BLA_VENDOR} MATCHES ".+") - -if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All") - if(NOT LAPACK_LIBRARIES) - check_lapack_libraries( - LAPACK_LIBRARIES - LAPACK - cheev - "" - "goto2" - "${BLAS_LIBRARIES}" - "" - ) - endif(NOT LAPACK_LIBRARIES) -endif (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All") - - -#acml lapack - if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All") - if (BLAS_LIBRARIES MATCHES ".+acml.+") - set (LAPACK_LIBRARIES ${BLAS_LIBRARIES}) - endif () - endif () - -# Apple LAPACK library? -if (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All") - if(NOT LAPACK_LIBRARIES) - check_lapack_libraries( - LAPACK_LIBRARIES - LAPACK - cheev - "" - "Accelerate" - "${BLAS_LIBRARIES}" - "" - ) - endif(NOT LAPACK_LIBRARIES) -endif (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All") -if (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All") - if ( NOT LAPACK_LIBRARIES ) - check_lapack_libraries( - LAPACK_LIBRARIES - LAPACK - cheev - "" - "vecLib" - "${BLAS_LIBRARIES}" - "" - ) - endif ( NOT LAPACK_LIBRARIES ) -endif (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All") -# Generic LAPACK library? -if (BLA_VENDOR STREQUAL "Generic" OR - BLA_VENDOR STREQUAL "ATLAS" OR - BLA_VENDOR STREQUAL "All") - if ( NOT LAPACK_LIBRARIES ) - check_lapack_libraries( - LAPACK_LIBRARIES - LAPACK - cheev - "" - "lapack" - "${BLAS_LIBRARIES}" - "" - ) - endif ( NOT LAPACK_LIBRARIES ) -endif () -#intel lapack - if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All") - if (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX) - if(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED) - find_PACKAGE(Threads) - else(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED) - find_package(Threads REQUIRED) - endif(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED) - if (BLA_F95) - if(NOT LAPACK95_LIBRARIES) - check_lapack_libraries( - LAPACK95_LIBRARIES - LAPACK - cheev - "" - "mkl_lapack95" - "${BLAS95_LIBRARIES}" - "${CMAKE_THREAD_LIBS_INIT}" - ) - endif(NOT LAPACK95_LIBRARIES) - else(BLA_F95) - if(NOT LAPACK_LIBRARIES) - check_lapack_libraries( - LAPACK_LIBRARIES - LAPACK - cheev - "" - "mkl_lapack" - "${BLAS_LIBRARIES}" - "${CMAKE_THREAD_LIBS_INIT}" - ) - endif(NOT LAPACK_LIBRARIES) - endif(BLA_F95) - endif (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX) - endif(BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All") -else(BLAS_FOUND) - message(STATUS "LAPACK requires BLAS") -endif(BLAS_FOUND) - -if(BLA_F95) - if(LAPACK95_LIBRARIES) - set(LAPACK95_FOUND TRUE) - else(LAPACK95_LIBRARIES) - set(LAPACK95_FOUND FALSE) - endif(LAPACK95_LIBRARIES) - if(NOT LAPACK_FIND_QUIETLY) - if(LAPACK95_FOUND) - message(STATUS "A library with LAPACK95 API found.") - else(LAPACK95_FOUND) - if(LAPACK_FIND_REQUIRED) - message(FATAL_ERROR - "A required library with LAPACK95 API not found. Please specify library location." - ) - else(LAPACK_FIND_REQUIRED) - message(STATUS - "A library with LAPACK95 API not found. Please specify library location." - ) - endif(LAPACK_FIND_REQUIRED) - endif(LAPACK95_FOUND) - endif(NOT LAPACK_FIND_QUIETLY) - set(LAPACK_FOUND "${LAPACK95_FOUND}") - set(LAPACK_LIBRARIES "${LAPACK95_LIBRARIES}") -else(BLA_F95) - if(LAPACK_LIBRARIES) - set(LAPACK_FOUND TRUE) - else(LAPACK_LIBRARIES) - set(LAPACK_FOUND FALSE) - endif(LAPACK_LIBRARIES) - - if(NOT LAPACK_FIND_QUIETLY) - if(LAPACK_FOUND) - message(STATUS "A library with LAPACK API found.") - else(LAPACK_FOUND) - if(LAPACK_FIND_REQUIRED) - message(FATAL_ERROR - "A required library with LAPACK API not found. Please specify library location." - ) - else(LAPACK_FIND_REQUIRED) - message(STATUS - "A library with LAPACK API not found. Please specify library location." - ) - endif(LAPACK_FIND_REQUIRED) - endif(LAPACK_FOUND) - endif(NOT LAPACK_FIND_QUIETLY) -endif(BLA_F95) - -set(CMAKE_FIND_LIBRARY_SUFFIXES ${_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/ewoms-prereqs.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/ewoms-prereqs.cmake deleted file mode 100644 index 565d57ed63..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/ewoms-prereqs.cmake +++ /dev/null @@ -1,44 +0,0 @@ -# -*- mode: cmake; tab-width: 2; indent-tabs-mode: t; truncate-lines: t; compile-command: "cmake -Wdev" -*- -# vim: set filetype=cmake autoindent tabstop=2 shiftwidth=2 noexpandtab softtabstop=2 nowrap: - -# this avoids an annoying deprecation warning on DUNE 2.4 (which we -# are not interested in anyway) -set(DUNE_AVOID_CAPABILITIES_IS_PARALLEL_DEPRECATION_WARNING 1) - -# defines that must be present in config.h for our headers -set (ewoms_CONFIG_VAR - HAVE_QUAD - HAVE_VALGRIND - HAVE_DUNE_COMMON - HAVE_DUNE_GEOMETRY - HAVE_DUNE_GRID - HAVE_DUNE_LOCALFUNCTIONS - HAVE_DUNE_ISTL - HAVE_DUNE_ALUGRID - HAVE_DUNE_FEM - DUNE_AVOID_CAPABILITIES_IS_PARALLEL_DEPRECATION_WARNING - ) - -# dependencies -set (ewoms_DEPS - # compile with C++0x/11 support if available - "CXX11Features REQUIRED" - # DUNE prerequisites - "dune-common REQUIRED" - "dune-geometry REQUIRED" - "dune-grid REQUIRED" - "dune-istl REQUIRED" - "opm-common REQUIRED" - "opm-material REQUIRED" - "dune-localfunctions" - "dune-alugrid" - "dune-fem" - "opm-parser" - "opm-grid" - # librt (on some systems necessary for clock_gettime()) - "librt REQUIRED" - # valgrind client requests - "Valgrind" - # quadruple precision floating point calculations - "Quadmath" - ) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-benchmarks-prereqs.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-benchmarks-prereqs.cmake deleted file mode 100644 index d3eeda0ea6..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-benchmarks-prereqs.cmake +++ /dev/null @@ -1,19 +0,0 @@ -# -*- mode: cmake; tab-width: 2; indent-tabs-mode: t; truncate-lines: t; compile-command: "cmake -Wdev" -*- -# vim: set filetype=cmake autoindent tabstop=2 shiftwidth=2 noexpandtab softtabstop=2 nowrap: - -# defines that must be present in config.h for our headers -set (opm-benchmarks_CONFIG_VAR - ) - -# dependencies -set (opm-benchmarks_DEPS - # compile with C++0x/11 support if available - "CXX11Features REQUIRED" - # various runtime library enhancements - "Boost 1.44.0 - COMPONENTS date_time filesystem system unit_test_framework REQUIRED" - # OPM dependency - "opm-common" - "opm-core REQUIRED" - "opm-upscaling REQUIRED" - ) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-common-prereqs.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-common-prereqs.cmake deleted file mode 100644 index 4504280c65..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-common-prereqs.cmake +++ /dev/null @@ -1,17 +0,0 @@ -# -*- mode: cmake; tab-width: 2; indent-tabs-mode: t; truncate-lines: t; compile-command: "cmake -Wdev" -*- -# vim: set filetype=cmake autoindent tabstop=2 shiftwidth=2 noexpandtab softtabstop=2 nowrap: - -# defines that must be present in config.h for our headers -set (opm-common_CONFIG_VAR - ) - -# dependencies -set (opm-common_DEPS - # compile with C99 support if available - "C99" - # compile with C++0x/11 support if available - "CXX11Features REQUIRED" - # various runtime library enhancements - "Boost 1.44.0 - COMPONENTS system unit_test_framework REQUIRED" - ) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-core-prereqs.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-core-prereqs.cmake deleted file mode 100644 index fa4d9efa5a..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-core-prereqs.cmake +++ /dev/null @@ -1,46 +0,0 @@ -# -*- mode: cmake; tab-width: 2; indent-tabs-mode: t; truncate-lines: t; compile-command: "cmake -Wdev" -*- -# vim: set filetype=cmake autoindent tabstop=2 shiftwidth=2 noexpandtab softtabstop=2 nowrap: - -# defines that must be present in config.h for our headers -set (opm-core_CONFIG_VAR - HAVE_ERT - HAVE_SUITESPARSE_UMFPACK_H - HAVE_DUNE_ISTL - HAVE_MPI - HAVE_PETSC - ) - -# dependencies -set (opm-core_DEPS - # compile with C99 support if available - "C99" - # compile with C++0x/11 support if available - "CXX11Features REQUIRED" - # various runtime library enhancements - "Boost 1.44.0 - COMPONENTS date_time filesystem system unit_test_framework REQUIRED" - # matrix library - "BLAS REQUIRED" - "LAPACK REQUIRED" - # Tim Davis' SuiteSparse archive - "SuiteSparse COMPONENTS umfpack" - # solver - "SuperLU" - # xml processing (for config parsing) - "TinyXML" - # Ensembles-based Reservoir Tools (ERT) - "ERT REQUIRED" - # Look for MPI support - "MPI" - # PETSc numerical backend - "PETSc" - # DUNE dependency - "dune-common" - "dune-istl" - "opm-common REQUIRED" - # Parser library for ECL-type simulation models - "opm-parser REQUIRED" - # the code which implements the material laws - "opm-material REQUIRED" - "opm-output REQUIRED" - ) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-flowdiagnostics-applications-prereqs.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-flowdiagnostics-applications-prereqs.cmake deleted file mode 100644 index 4810dd3f8e..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-flowdiagnostics-applications-prereqs.cmake +++ /dev/null @@ -1,21 +0,0 @@ -# -*- mode: cmake; tab-width: 2; indent-tabs-mode: t; truncate-lines: t; compile-command: "cmake -Wdev" -*- -# vim: set filetype=cmake autoindent tabstop=2 shiftwidth=2 noexpandtab softtabstop=2 nowrap: - -# defines that must be present in config.h for our headers -set (opm-flowdiagnostics-applications_CONFIG_VAR - ) - -# dependencies -set (opm-flowdiagnostics-applications_DEPS - # compile with C99 support if available - "C99" - # compile with C++0x/11 support if available - "CXX11Features REQUIRED" - "Boost 1.44.0 - COMPONENTS filesystem system unit_test_framework REQUIRED" - "ERT REQUIRED" - # prerequisite OPM modules - "opm-common REQUIRED; - opm-flowdiagnostics REQUIRED; - opm-core REQUIRED" - ) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-flowdiagnostics-prereqs.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-flowdiagnostics-prereqs.cmake deleted file mode 100644 index dc2f64a63c..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-flowdiagnostics-prereqs.cmake +++ /dev/null @@ -1,18 +0,0 @@ -# -*- mode: cmake; tab-width: 2; indent-tabs-mode: t; truncate-lines: t; compile-command: "cmake -Wdev" -*- -# vim: set filetype=cmake autoindent tabstop=2 shiftwidth=2 noexpandtab softtabstop=2 nowrap: - -# defines that must be present in config.h for our headers -set (opm-flowdiagnostics_CONFIG_VAR - ) - -# dependencies -set (opm-flowdiagnostics_DEPS - # compile with C99 support if available - "C99" - # compile with C++0x/11 support if available - "CXX11Features REQUIRED" - "Boost 1.44.0 - COMPONENTS unit_test_framework REQUIRED" - # prerequisite OPM modules - "opm-common REQUIRED" - ) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-grid-prereqs.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-grid-prereqs.cmake deleted file mode 100644 index 76aa0c14ec..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-grid-prereqs.cmake +++ /dev/null @@ -1,32 +0,0 @@ -# -*- mode: cmake; tab-width: 2; indent-tabs-mode: t; truncate-lines: t; compile-command: "cmake -Wdev" -*- -# vim: set filetype=cmake autoindent tabstop=2 shiftwidth=2 noexpandtab softtabstop=2 nowrap: - -# defines that must be present in config.h for our headers -set (opm-grid_CONFIG_VAR - DUNE_GRID_VERSION_MAJOR - DUNE_GRID_VERSION_MINOR - DUNE_GRID_VERSION_REVISION - DUNE_COMMON_VERSION_MAJOR - DUNE_COMMON_VERSION_MINOR - DUNE_COMMON_VERSION_REVISION - HAVE_ZOLTAN - ) - -# dependencies -set (opm-grid_DEPS - # compile with C99 support if available - "C99" - # compile with C++0x/11 support if available - "CXX11Features" - # various runtime library enhancements - "Boost 1.44.0 - COMPONENTS date_time filesystem system unit_test_framework REQUIRED" - # DUNE dependency - "dune-common REQUIRED; - dune-grid REQUIRED; - dune-geometry REQUIRED" - # OPM dependency - "opm-common REQUIRED; - opm-core REQUIRED" - "ZOLTAN" - ) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-material-prereqs.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-material-prereqs.cmake deleted file mode 100644 index 207e350279..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-material-prereqs.cmake +++ /dev/null @@ -1,23 +0,0 @@ -# -*- mode: cmake; tab-width: 2; indent-tabs-mode: t; truncate-lines: t; compile-command: "cmake -Wdev" -*- -# vim: set filetype=cmake autoindent tabstop=2 shiftwidth=2 noexpandtab softtabstop=2 nowrap: - -# defines that must be present in config.h for our headers -set (opm-material_CONFIG_VAR - HAVE_MPI - HAVE_TYPE_TRAITS - HAVE_VALGRIND - HAVE_FINAL - ) - -# dependencies -set (opm-material_DEPS - # compile with C99 support if available - "C99" - # compile with C++0x/11 support if available - "CXX11Features REQUIRED" - # prerequisite OPM modules - "opm-parser" - "opm-common REQUIRED" - # DUNE dependency - "dune-common REQUIRED" - ) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-output-prereqs.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-output-prereqs.cmake deleted file mode 100644 index 1ae01ec090..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-output-prereqs.cmake +++ /dev/null @@ -1,24 +0,0 @@ -# -*- mode: cmake; tab-width: 2; indent-tabs-mode: t; truncate-lines: t; compile-command: "cmake -Wdev" -*- -# vim: set filetype=cmake autoindent tabstop=2 shiftwidth=2 noexpandtab softtabstop=2 nowrap: - -# defines that must be present in config.h for our headers -set (opm-output_CONFIG_VAR - HAVE_ERT - ) - -# dependencies -set (opm-output_DEPS - # compile with C99 support if available - "C99" - # compile with C++0x/11 support if available - "CXX11Features REQUIRED" - # various runtime library enhancements - "Boost 1.44.0 - COMPONENTS unit_test_framework REQUIRED" - # Ensembles-based Reservoir Tools (ERT) - "ERT REQUIRED" - # Look for MPI support - "opm-common REQUIRED" - # Parser library for ECL-type simulation models - "opm-parser REQUIRED" - ) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-simulators-prereqs.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-simulators-prereqs.cmake deleted file mode 100644 index b873f490df..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-simulators-prereqs.cmake +++ /dev/null @@ -1,31 +0,0 @@ -# -*- mode: cmake; tab-width: 2; indent-tabs-mode: t; truncate-lines: t; compile-command: "cmake -Wdev" -*- -# vim: set filetype=cmake autoindent tabstop=2 shiftwidth=2 noexpandtab softtabstop=2 nowrap: - -# defines that must be present in config.h for our headers -set (opm-simulators_CONFIG_VAR - HAVE_OPM_GRID - HAVE_PTHREAD - ) - -# dependencies -set (opm-simulators_DEPS - # Compile with C99 support if available - "C99" - # Compile with C++0x/11 support if available - "CXX11Features" - # Various runtime library enhancements - "Boost 1.44.0 - COMPONENTS date_time filesystem system unit_test_framework REQUIRED" - # DUNE prerequisites - "dune-common REQUIRED; - dune-istl REQUIRED" - "ERTPython" - # OPM dependency - "opm-common REQUIRED; - opm-parser REQUIRED; - opm-core REQUIRED; - opm-output REQUIRED; - opm-grid" - # Eigen - "Eigen3 3.2.0" - ) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-upscaling-prereqs.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-upscaling-prereqs.cmake deleted file mode 100644 index e5f07caf4b..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-upscaling-prereqs.cmake +++ /dev/null @@ -1,32 +0,0 @@ -# -*- mode: cmake; tab-width: 2; indent-tabs-mode: t; truncate-lines: t; compile-command: "cmake -Wdev" -*- -# vim: set filetype=cmake autoindent tabstop=2 shiftwidth=2 noexpandtab softtabstop=2 nowrap: - -# defines that must be present in config.h for our headers -set (opm-upscaling_CONFIG_VAR - HAVE_SUPERLU - ) - -# dependencies -set (opm-upscaling_DEPS - # compile with C99 support if available - "C99" - # compile with C++0x/11 support if available - "CXX11Features" - # various runtime library enhancements - "Boost 1.44.0 - COMPONENTS date_time filesystem system iostreams unit_test_framework REQUIRED" - # matrix library - "BLAS REQUIRED" - "LAPACK REQUIRED" - # solver - "SuperLU" - # DUNE dependency - "dune-common REQUIRED; - dune-istl REQUIRED; - dune-geometry REQUIRED; - dune-grid REQUIRED; - opm-common REQUIRED; - opm-core REQUIRED; - opm-grid REQUIRED; - opm-output REQUIRED" - ) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-verteq-prereqs.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-verteq-prereqs.cmake deleted file mode 100644 index 19d687bb93..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Modules/opm-verteq-prereqs.cmake +++ /dev/null @@ -1,20 +0,0 @@ -# -*- mode: cmake; tab-width: 2; indent-tabs-mode: t; truncate-lines: t; compile-command: "cmake -Wdev" -*- -# vim: set filetype=cmake autoindent tabstop=2 shiftwidth=2 noexpandtab softtabstop=2 nowrap: - -# defines that must be present in config.h for our headers -set (opm-verteq_CONFIG_VAR - ) - -# dependencies -set (opm-verteq_DEPS - # compile with C99 support if available - "C99" - # compile with C++0x/11 support if available - "CXX11Features" - # various runtime library enhancements - "Boost 1.44.0 - COMPONENTS date_time filesystem system unit_test_framework REQUIRED" - # OPM dependency - "opm-common; - opm-core REQUIRED" - ) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/OPM-CMake.md b/ThirdParty/custom-opm-common/opm-common/cmake/OPM-CMake.md deleted file mode 100644 index 76473b7f67..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/OPM-CMake.md +++ /dev/null @@ -1,739 +0,0 @@ -OPM Build System -================ - -This is the documentation for the build system used in various OPM modules. -In the following, `xxx` is used as a placeholder for the project name (e.g. -"core"). - -Unlike traditional CMake files which is highly imperative, OPM projects -sets up declarative lists of prerequisites and content and rely on convention -and pre-made modules to do the build. Its goal is to replace but be -compatible with the old autotools-based system. - -## Terminology - -In the build system to following abstract locations are referred to: - - - - - -
LocationDescription
Source tree - -This is where the source files are located. Usually this directory is created -by a `git clone`. You edit files in this directory. The build system on the -other hand will never touch these files; they could be read-only for that -matter. It should be located on a disk that is backed up. The source trees -for various OPM modules should be siblings to eachother. - -
Build tree - -This is where you do `make` (or `ninja`), and the compiler/linker will put -its output here. It may be the same directory as the source tree (which is -then called an "in-tree build"). However, it is recommended that you keep -it separate. Do `make clean && make distclean` to remove all files that -are created by the build (if you put it in the source directory). -You don't need to backup these files (since they can be generated from the -source); instead this directory should be located somewhere with fast -write access. The build trees for various OPM modules should be siblings -(unless they are subdirectories in their source trees). - -
Installation tree - -This is where the build system will put all the final libraries and headers -when running `make install`. -You can specify another location for the installation tree by setting the -CMake variable `CMAKE_INSTALL_PREFIX` on the command line (or use `--prefix=` -with the configure script). Notice that the portion of this path which -will become the new filesystem root should be specified with the environment -variable `DESTDIR`. - -
- -## Use Cases - -This section lists some common use cases for adding new code to a project -with respect to the build system, and lists the steps that must be undertaken -to do the necessary modifications. - -### Adding a Translation Unit - -1. Put the file in a sub-directory of `opm/xxx`. - -2. Add the file name to the `MAIN_SOURCE_FILES` list in `CMakeLists_files.txt`. - Please keep this list sorted. - -3. If you are adding new interfaces that will be used by client code, add the - header to the `PUBLIC_HEADER_FILES`. Note that any `_impl` headers containing - template implementations must also be included. - -### Adding a Prerequisite - -1. Add the name of the prerequisite module to the `opm-xxx_DEPS` list in the file - `cmake/Modules/opm-xxx-prereqs.cmake`, where xxx is a placeholder for the module - name of your CMake project. - -2. If you need any CMake configuration defines available in your public _headers_, - add these to the `opm-xxx_CONFIG_VAR` list in the same file. Please refrain - from this practice as it imposes a requirement on the clients of your code to - gather the same configuration information and make it available in the units - which uses your headers. - -### Adding a Unit Test - -1. Put the source code in a single translation unit in directory `tests`. The - name of this unit should start with `test_`. - -2. Put any datafiles this code rely on in the same directory. The code should - assume that such datafiles are available in the current directory the program - is running from. The code should not write to these files, but rather make - a copy if it needs to modify them. - -3. Add the file name to the `TEST_SOURCE_FILES` list in `CMakeLists_files.txt`. - -4. Add the datafiles to the `TEST_DATA_FILES` list in the same files. The - files will be copied from the source tree into the target tree. - -### Adding a New Utility Program - -1. Put the source code of the utility in the `examples` directory. - -2. Add the name of the translation unit to the `PROGRAM_SOURCE_FILES` list - in `CMakeLists_files.txt`. - -### Creating a New Module - -1. Copy the directory `cmake/` and all sub-directories from opm-core. This - directory contains the common build system, and should ideally be identical - across OPM projects. Also copy the file `configure` in the project root. - -2. Create project-specific files using those from another project as a template. - The list of project specific files is in the section - [Modules Reference](#project-specific-files) below. - -3. Create a new file `cmake/Modules/opm-xxx-prereqs.cmake`, using one of the - existing ones as a template. - -4. Optionally, create a new file `cmake/Modules/Findopm-xxx.cmake`, using one - of the existing ones as a template. - -## Options - -These options regulate the behaviour of the build system. In addition to these -options, you can also set standard CMake options, or options for the -prerequisites, which is not documented here. If you run the configure script -with the `--help` option, it will print a text of what the options are called -when using the autotools-compatible wrapper. - - - - - - - - - - - - - - - -
OptionDescription
BUILD_EXAMPLES - -Include the examples when doing a build. Whenever you change something -in the library, however small, all the examples will also be rebuilt. -Default is ON. - -
BUILD_TESTING - -Include the unit tests when doing a build. Whenever you change something -in the library, however small, all the unit tests will also be rebuilt. -Default is ON. - -
PRECOMPILE_HEADERS - -Precompile common headers into a binary blob which is loaded on further -compilations. If your compiler supports this, it usually reduces build -time. It does not affect the running time of the code. Default is OFF. - -
SIBLING_SEARCH - -Search for OPM/DUNE prerequisites in sibling directories of the build -tree. Default is ON. - -
SUITESPARSE_USE_STATIC - -Link SuiteSparse/UMFPack statically. Using this option will enable you -to build an executable which has no external dependencies. The default -is to use shared libraries if those are available. - -
SYSTEM_DEBUG - -Put debug symbols in the system debug directory (`/usr/lib/debug`) as -this seems to be the only place which is searched by default by GDB. -Default is OFF, as it requires that you have write access to that -directory. Note that if you are doing a system installation (set -CMAKE_INSTALL_PREFIX=/usr), then the libraries will be put in this -location irregardless of this option. - -
USE_MPI - -Enable the code to use MPI for parallelization. Default is OFF. -Note: It is important that OPM and DUNE modules is either all -compiled with MPI support or that none is. The build system will -attempt to recognize inconsistencies. - -
USE_OPENMP - -Enable the code to use OpenMP for parallelization. Default is ON. - -
USE_RUNPATH - -Remember the directories from where the prerequisites were found -when building. Default is ON, which enables you to run without -setting PATH all over the place in your build directories. When -creating an installation package, this should be set off. - -
USE_UNDERSCORING - -Assume that Fortran externals have an underscore suffix instead -of checking this with an actual compiler. If you set this option, -you can use Fortran libraries (notably BLAS and LAPACK) without -having a Fortran compiler installed. The default is OFF. - -
USE_VERSIONED_DIR - -Put libraries in a directory which includes the label of the project, -e.g. `/usr/lib/opm-core/2013.10`. Default is OFF. - -
WITH_NATIVE - -Optimize for the instruction set of the build machine. This is -a good idea if you are building the library on the same machine -as you will be using the library. Default is ON. - -
WHOLE_PROG_OPTIM - -Perform an extra round of optimization when linking the program. -(Usually the compiler only optimizes within the translation unit). -If your compiler supports this, it usually leads to a faster runtime. -Default is OFF. - -
- -## Modules Reference - -### Project-specific Files - -All of these files are in the project root. - - - - - - -
FileDescription
CMakeLists.txt - -Project-specific customizations to the build, such as filtering out source -files based on the availability of prerequisites, or adding configuration -variables only the implementation depends on. -Prefer to do customizations in the hooks available to this file rather than -adding ad-hoc code to the build system itself, to keep the `cmake/` directory -unified across projects. - -
CMakeLists_files.txt - -List of all compilation modules in the project, test cases and public -headers that should be installed in the distribution package. The contents -of these lists are distributed to project-specific variables by the build -system. - -
CTestConfig.cmake - -Settings for submitting result of tests to CDash. The default is setup -to submit to [the official CDash panel](http://www.opm-project.org/CDash/) -and does not need to be changed if your module has a panel there. - -
dune.module - -Information about the project such as name, release label, link version -and maintainer. Also specify dependencies to other OPM/DUNE-projects so -that dunecontrol can build in correct order. (Note that the full list of -dependencies is taken from opm-xxx-prereqs.cmake and not from here). -Since this file must be present before the build starts (for dunecontrol), -the version information is kept here. - -
- -### Project Modules - -These modules contains the dependency information for this project, so -the build system can set up the prerequisite list correctly and probe -for other modules automatically. (This replaces hard-coded calls to -find_library in the CMakeLists.txt file). - - - - -
File (.cmake)Description
xxx-prereqs - -List prerequisite modules and defines used in public headers. Each module -must have such a "declaration", and this must be made available to every -other projects as well (which is why this is located in `cmake/Modules`). - -
Findxxx - -CMake modules which locates module `xxx` in the system directories. As -the `opm-xxx-config.cmake` is made available together with the libraries -and headers, these modules are not really needed (for OPM modules). - -
- -### Generated Files - -These files are generated by the build system and exists in the _build_ tree, -not in the source tree. They are documented here to make developers aware of -their role in the build system. - - - - - - - - -
FileDescription
config.h - -Settings variables which the build system has configured and make available -to the source code. This file is **not** installed amongst the headers, so -you should never include this in a public header, even if you need the value -in one of these variables. Instead, you must rely on the client code to -configure this variable for you. - -
opm-xxx.pc - -pkg-config information file to locate the **build** tree. This is used by -the autotools build files, but can also be handy when manually building -small test programs for which you don't generate an own build system. - -
opm-xxx-config.cmake - -CMake information file to locate the **build** tree. This file is imported -when this project is set up as a prerequisite. - -
opm-xxx-install.pc - -pkg-config information file to locate the **installation** tree. It is -the same as `opm-xxx.pc` except that the paths are switched. When the -project is installed, this file is installed instead (under `lib/pkgconfig` -relative to the installation root). This directory should hence be put -in the search path to pkg-config to use the installed package. Before -installation, this file is worthless and should not be included, because -it does not refer to the build tree at all. (Be careful not to mix -the build and the installation tree). -Notice that the build system will forward a bunch of public definitions -which should be available to compile code referring to this library. - -
opm-xxx-install.cmake - -CMake information file to locate the **installation** tree. It is the -same as `opm-xxx-config.cmake` except that the paths are switched. When -the project is installed, this file is installed instead (under `share/cmake` -relative to the installation root). - -
opm-xxx-config-version.cmake - -CMake wants to include this into the build _before_ it is determined whether -the library was found successfully (depending on the version number perhaps), -so this information is put in its own file. Since it is the same for the -build tree and the installation tree, it is shared in both those locations. - -
- -### Utility Modules - -These modules consists of useful routines which is not OPM-specific and -that could be used in any projects. They don't depend on any other parts -of the build system. - - - - - - -
File (.cmake)Description
AddOptions - -Functions to add options to compiler command line (e.g. 'CXXFLAGS'). -This macro can add options to more than one language and/or configuration -at a time, and also automatically removes duplicates. - -
ConfigVars - -Functions to write values of selected variables to `config.h`. The -advantage of using this compared to a template file, is that other -modules can add their own variables to be written (a project doesn't -need to know which variables a prerequisite wants to have in config.h). - -
DuneCompat - -Modify `Makefile` so dunecontrol can infer source directory from it. -dunecontrol infers the source location of prerequisites from textual -analysis of the Makefile in their build tree. (dunecontrol cannot build -with Ninja anyway, so that is not a problem). - -
Duplicates - -Functions to remove duplicate values from a list of libraries, which -must always be done from the beginning in order to link correctly. - -
LibtoolArchives - -Write .la file which will make libtool find our library. This enables -users of our library to use libtool even if we did not do so ourselves. - -
- -### Build System Modules - -These are the modules which comprises the OPM-specific parts of the -build system. The overall flow through the stages of the build is best -captured by reading through the `OpmLibMain.cmake` module. - - - - - - - - - - - - - - - - -
File (.cmake)Description
configure - -Wrapper script which emulates an autotools front-end, making the build -system usable with dunecontrol. There is one in the project root directory -which just forwards everything to the main script in `cmake/Scripts`. - -
OpmAliases - -Copy variables which are probed by our find modules to the names which -are expected by DUNE. - -
OpmCompile - -Set up a compilation target for the library itself. It is assumed that -each OPM project build exactly one library file containing all its code. -The files and compiler options are passed through the project variables -(see the section [Variables Reference](#variables-reference) below). - -
OpmDefaults - -If optimization and debugging settings are not given on the command line, -supply a set of reasonable defaults for the detected platform and -compiler. - -
OpmDistClean - -Add a target (`make distclean`) to the build system which can remove the -build files themselves from the build directory tree. - -
OpmDoc - -Add target for building documentation, primarily Doxygen class reference -from the code. - -
OpmFiles - -Load list of files from `CMakeLists_files.txt` and put into the applicable -variables. - -
OpmGrid - -Adds the grid type selection code to config.h which is needed by dune-grid -if you want to set up a default grid. This is currently not needed by any -OPM project, and is provided only for porting client projects which previously -used this functionality from the autotools version. - -
OpmInit - -Read the version information and project name from `dune.module`. - -
OpmInstall - -Setup installation of the main library, public headers and debug symbols. - -
OpmKnown - -Marks as "used" all configuration variables which is used only by some of -the OPM projects, so they don't generate warnings in the rest of them. - -
OpmLibMain - -Driver module for the build process. First reads the list of prerequisites -and options, then set up the compiles and installations. - -
OpmProject - -Set up pkg-config and CMake information files (see [Generated Files] -(#generated-files)) for this project, based on configuration. - -
OpmSatellites - -Build test programs and examples for a library that is bundled in the project. -
- -### Wrapper Modules - -These modules wrap the CMake `find_library` function and adds the information -retrieved from the imported prerequisite to module-specific variables, so that -these can be added to the build in batch afterwards. - - - - -
File (.cmake)Description
OpmFind - -Wrapper around `find_package`. Searches in various locations relative to this -project as well as in the system directories for a CMake module which can -locate the package. If it is found, adds the project variables (see -[Variables Reference](#variables-reference)) for this project into this one, -for instance include and library directories are added to the compile and link -command-line for this project. - -
OpmPackage - -Typical way of finding an OPM package; searches for the header and library, -and tries to compile a test program. This is the general implementation of -a CMake find module, and is used to locate those of the prerequisites that -fits the pattern. - -
- -### Configuration Modules - -These are modules for altering the compiler and/or linker option in some way, -or get information from the system. They are not tied to the OPM projects. - - - - - - - - - - - - - - - - - -
File (.cmake)Description
UseCompVer - -Get the version of GCC that is used to compile the project. This is used in -other modules to enable features that are known to exist/work only in certain -versions of GCC. - -
UseDebugSymbols - -Set up the compile to generate debug symbols for the code. This is done also -if a release build was requested, to be able to do post-mortem debugging of -production code. (The debug symbols does not inhibit optimization). - -
UseDuneVer - -Retrieve the version of DUNE which is available. - -
UseDynamicBoost - -Determine if Boost is linked statically or dynamically (shared). This is -necessary to know for the unit tests. - -
UseFastBuilds - -Enable certain techniques which is known to speed up the build itself. - -
UseFortranWrappers - -Provide a macro for declaration of external symbols which is located in -Fortran libraries. It is not necessary to have a Fortran compiler present -to use this macro. - -
UseMultiArch - -Check if the system uses the multi-arch scheme for organizing libraries -(currently derivatives of Debian do this). - -
UseOnlyNeeded - -Only link to libraries which is actually used by the project. Some -platforms provide "under-linked" libraries (they need other libraries -but doesn't state so explicitly, but rather imply that the executable -must link to these itself), and this is also handled. - -
UseOpenMP - -Add OpenMP features to the build. Since OpenMP is activated by pragmas -in the code, compiler options instead of libraries are needed. - -
UseOptimization - -Compile with more extensive optimization that what is the default in -CMake. - -
UsePrecompHeaders - -Set up precompiled headers if the project has a `opm/xxx/opm-xxx-pch.hpp` -header. Due to problems across various compilers, this is currently an -opt-in feature. - -
UseSystemInfo - -Retrieve information about the system the build is performed on. This is -printed in the configuration log and can be helpful to troubleshoot -problems from error reports. - -
UseVCSInfo - -Retrieve information about which Git revision is compiled. This is useful -to figure out which version an error report refers to. - -
UseVersion - -Add version information for this project into the library binary, making -it available for query at runtime. - -
UseWarnings - -Enable a more extensive set of warnings to be reported by the compiler -than what is the default in CMake. - -
- -## Variables Reference - -The build system will setup variables with names of the pattern `xxx_YYY` -where xxx is the project name (here including the suite; e.g. "opm-core") -and yyy is the suffix in the list below. The project name is used verbatim, -i.e. there is no translation of dashes and case ("opm-core" and not "OPM_CORE"). - - - - - - - - - - - - - - - - - - -
SuffixDescription
_DEFINITIONS - -Macro defines (of the type `-DFOO`) that needs to be added to the compile -of translation units contained in this library. This also includes defines -that must be present to headers which is included by this library. - -
_CONFIG_VARS - -Defines which should be present in `config.h` of the project which -includes this library (client code). Only the names of the variables -are listed here; the actual values must be found by the configuration -script of the client. - -
_CONFIG_IMPL_VARS - -Defines which should be present in `config.h` but is only used by -the internal code of the project itself. Use this list to get -defines without imposing a requirement on client code to also probe -for values. - -
_INCLUDE_DIR - -Directory where the public headers of this project are stored. - -
_INCLUDE_DIRS - -List of include directories that must be on the compiler search -path to compile code which uses this project. In addition to the -headers of this project itself, it also includes the transitive -closure of paths for all prerequisites as well. - -
_LABEL - -Currently for OPM projects, this follows a pattern of `YYYY.MM` -where YYYY is the year of the release and MM is the month. This -gives information to humans about how up to date this instance -of the library is (but doesn't provide a way to check for -compatibility, which is why the VERSION alternatives exist). - -
_LIBRARY - -Name and path of the binary to link with. - -
_LIBRARIES - -Full list of the library of both this project, and all its -prerequisites, that need to be included in the link. I.e. the -client code should only include the transitive list from its -immediate prerequisites and not know about the full dependency -graph. - -
_LIBRARY_DIRS - -Directories that should be added to the linker search path when -including this library. - -
_LINKER_FLAGS - -Flags that must be added to the link when including this library. - -
_SOURCES - -List of source files contained in this project. This enables libraries -to be distributed in source form (e.g. CJSON and TinyXML) and linked -directly into the project. - -
_TARGET - -Name of the library which is generated by this project. CMake and -autotools do not like library names which contains dashes, so they -are stripped out. By using a macro for this we are guaranteed uniform -translation. - -
_VERSION - -Textual concatenation of all components of the version number (see below) -with a dot inbetween. This form of version number can be compared using -CMake VERSION_{LESS|EQUAL|GREATER} operators. - -
_VERSION_MAJOR - -Major version of the library. If the major versions doesn't match, then -compatibility with existing code cannot be reckoned. - -
_VERSION_MINOR - -Minor version of the library. Libraries with newer minor version can -have more features, but should be able to run old code. - -
_VERSION_REVISION - -Micro version of the library. This number is generally incremented -whenever bugfixes or performance improvements are made. -
diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Scripts/CheckCommits.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Scripts/CheckCommits.cmake deleted file mode 100644 index 3aa9807a21..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Scripts/CheckCommits.cmake +++ /dev/null @@ -1,99 +0,0 @@ -find_package(Git REQUIRED) - -macro(sanity_check message) - if(status_code) - message(FATAL_ERROR "${message}") - endif() -endmacro() - -# Check that there are no changes in working-tree -execute_process(COMMAND ${GIT_EXECUTABLE} diff --quiet - RESULT_VARIABLE status_code - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) -sanity_check("Cannot run with working tree changes. Commit, stash or drop them.") - -# Setup base of tests -set(check_base $ENV{CHECK_BASE}) -if(NOT check_base) - set(check_base origin/master) -endif() - -# Setup end of tests -set(check_head $ENV{CHECK_HEAD}) -if(NOT check_head) - set(check_head HEAD) -endif() - -# Setup target to build -set(check_target $ENV{CHECK_TARGET}) -if(NOT check_target) - set(check_target all;test) -endif() - -# Build threads -set(build_threads $ENV{CHECK_THREADS}) -if(NOT build_threads) - if(UNIX) - if(APPLE) - execute_process(COMMAND sysctl hw.ncpu - OUTPUT_VARIABLE build_threads) - string(REPLACE " " ";" build_threads_list ${build_threads) - list(GET build_threads_list 1 build_threads) - else() - find_program(NPROC_COMMAND nproc) - if(NPROC_COMMAND) - execute_process(COMMAND ${NPROC_COMMAND} - OUTPUT_VARIABLE build_threads) - string(REGEX REPLACE "(\r?\n)+$" "" build_threads "${build_threads}") - endif() - endif() - endif() -endif() - -# If for some reason we could not find the info - e.g. centos5 where nproc is missing -if(NOT build_threads) - set(build_threads 1) -endif() - -# Record current HEAD -execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD - OUTPUT_VARIABLE current_branch - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) - -string(REGEX REPLACE "(\r?\n)+$" "" current_branch "${current_branch}") - -# Grab revision list -execute_process(COMMAND ${GIT_EXECUTABLE} rev-list ${check_base}..${check_head} --reverse - OUTPUT_VARIABLE rev_list - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) - -string(REPLACE "\n" ";" rev_list ${rev_list}) -foreach(rev ${rev_list}) - # Checkout - message("Testing revision ${rev}") - execute_process(COMMAND ${GIT_EXECUTABLE} checkout ${rev} - RESULT_VARIABLE status_code - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) - sanity_check("Failed to checkout ${rev}") - - # Build - foreach(tgt ${check_target}) - if(build_threads GREATER 2) - execute_process(COMMAND ${CMAKE_COMMAND} "--build" "${CMAKE_BINARY_DIR}" "--target" "${tgt}" "--use-stderr" "--" "-j${build_threads}" - RESULT_VARIABLE status_code) - else() - execute_process(COMMAND ${CMAKE_COMMAND} "--build" "${CMAKE_BINARY_DIR}" "--target" "${tgt}" "--use-stderr" - RESULT_VARIABLE status_code) - endif() - sanity_check("Failed to build target '${tgt}'") - endforeach() - if(status_code) - execute_process(COMMAND ${GIT_EXECUTABLE} checkout ${current_branch} - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) - endif() - sanity_check("Failed to build target for revision ${rev}") -endforeach() - -message("Everything checks out fine") -execute_process(COMMAND ${GIT_EXECUTABLE} checkout ${current_branch} - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Scripts/DuneCompat2.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Scripts/DuneCompat2.cmake deleted file mode 100644 index 8678077628..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Scripts/DuneCompat2.cmake +++ /dev/null @@ -1,25 +0,0 @@ -# - Emulate a rule to patch the Makefile, adding a line to the source -# tree and write a marker file indicating it is done. - -set (base_dir ".") -set (marker_file "${base_dir}/CMakeFiles/marker") -set (makefile "${base_dir}/Makefile") - -# if the Makefile has changed, then update it -if ("${makefile}" IS_NEWER_THAN "${marker_file}") - # only add the string once, so it does not return multiple - # results for the command line (will lead to syntax error) - file (STRINGS "${makefile}" abs_top_srcdir_FOUND - REGEX "^abs_top_srcdir = " - ) - if (NOT abs_top_srcdir_FOUND) - file (APPEND "${makefile}" - "abs_top_srcdir = ${CMAKE_HOME_DIRECTORY}\n" - ) - endif (NOT abs_top_srcdir_FOUND) - # touch the marker so that we won't update the Makefile again - execute_process (COMMAND - ${CMAKE_COMMAND} -E touch "${marker_file}" - ) -endif ("${makefile}" IS_NEWER_THAN "${marker_file}") - diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Scripts/RemoveEmptyDir.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Scripts/RemoveEmptyDir.cmake deleted file mode 100644 index 919146c3f8..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Scripts/RemoveEmptyDir.cmake +++ /dev/null @@ -1,15 +0,0 @@ -# - Remove a directory if and only if it contains no files -# -# Pass the name of the directory as the DIR variable - -if (DIR) - # check if empty - file (GLOB_RECURSE files "${DIR}/*") - - # remove only if - if (NOT files) - execute_process (COMMAND - ${CMAKE_COMMAND} -E remove_directory "${DIR}" - ) - endif (NOT files) -endif (DIR) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Scripts/WriteVerSHA.cmake b/ThirdParty/custom-opm-common/opm-common/cmake/Scripts/WriteVerSHA.cmake deleted file mode 100644 index f87bd01b71..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Scripts/WriteVerSHA.cmake +++ /dev/null @@ -1,65 +0,0 @@ -# - This script must be passed the following information -# -# GIT_EXECUTABLE Path to the Git executable -# PROJECT_SOURCE_DIR Path to the source directory -# PROJECT_BINARY_DIR Path to the build directory -# PROJECT_LABEL String that identifies the minor -# version of the project, e.g. "2013.03" -# - -# get hash code -exec_program ( - ${GIT_EXECUTABLE} ${PROJECT_SOURCE_DIR} - ARGS rev-parse --short --verify HEAD - OUTPUT_VARIABLE sha1 - RETURN_VALUE has_sha - ) - -# exec_program unfortunately mashes together both output -# and error streams, so we must use the return code to make -# sure that we only get the output -if (NOT ${has_sha} EQUAL 0) - set (sha1 "") -endif () - -# check for local changes -if (sha1) - # unstaged - exec_program ( - ${GIT_EXECUTABLE} ${PROJECT_SOURCE_DIR} - ARGS diff --no-ext-diff --quiet --exit-code - RETURN_VALUE dirty - OUTPUT_VARIABLE _dummy - ) - - # staged - exec_program ( - ${GIT_EXECUTABLE} ${PROJECT_SOURCE_DIR} - ARGS diff-index --no-ext-diff --cached --quiet --exit-code HEAD -- - RETURN_VALUE staged - OUTPUT_VARIABLE _dummy - ) - - # if we found any changes, then append an asterisk to - # the SHA1 so we know that it cannot be trusted - if (dirty OR staged) - set (sha1 "${sha1}*") - endif () -endif () - -# write the content to a temporary file in a C compatible format -file (WRITE "${PROJECT_BINARY_DIR}/project-version.tmp" - "#ifndef OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n" - "#define OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n" - "#define PROJECT_VERSION_NAME \"${PROJECT_LABEL}\"\n" - "#define PROJECT_VERSION_HASH \"${sha1}\"\n" - "#define PROJECT_VERSION \"${PROJECT_LABEL} (${sha1})\"\n" - "#endif // OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n" - ) - -# only commit this to source code if it actually changed. here -# we use execute_process instead of exec_program to avoid having -# it printed on the console every time -execute_process (COMMAND - ${CMAKE_COMMAND} -E copy_if_different "${PROJECT_BINARY_DIR}/project-version.tmp" "${PROJECT_BINARY_DIR}/project-version.h" - ) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Scripts/configure b/ThirdParty/custom-opm-common/opm-common/cmake/Scripts/configure deleted file mode 100644 index 15e1055a0f..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Scripts/configure +++ /dev/null @@ -1,553 +0,0 @@ -#!/bin/bash - -# where is the source tree located by default relative to here -srcdir=$(dirname "$(dirname "$(dirname "$0")")") - -# display help text -usage () { - cat < if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - CXX C++ compiler command - CXXFLAGS C++ compiler flags - CXXCPP C++ preprocessor - F77 Fortran 77 compiler command - FFLAGS Fortran 77 compiler flags - FC Fortran compiler command - FCFLAGS Fortran compiler flags - CMAKE_COMMAND Executable used to run cmake scripts - -Use these variables to override the choices made by \`configure' or to help -it to find libraries and programs with nonstandard names/locations. -EOF -} - -# report an error regarding the arguments -invalid_arg () { - cat < - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Templates/la.in b/ThirdParty/custom-opm-common/opm-common/cmake/Templates/la.in deleted file mode 100644 index 59bb09de09..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Templates/la.in +++ /dev/null @@ -1,41 +0,0 @@ -# lib@target@.la - a libtool library file -# Generated by libtool (GNU libtool) @ltversion@ -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='@dlname@' - -# Names of this library. -library_names='@library_names@' - -# The name of the static archive. -old_library='@old_library@' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags='@inherited_linker_flags@' - -# Libraries that this one depends upon. -dependency_libs='@dependency_libs@' - -# Names of additional weak libraries provided by this library -weak_library_names='' - -# Version information for lib@target@. -current=@current@ -age=@age@ -revision=0 - -# Is this an already installed library? -installed=no - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='@libdir@' diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Templates/opm-project-config-version.cmake.in b/ThirdParty/custom-opm-common/opm-common/cmake/Templates/opm-project-config-version.cmake.in deleted file mode 100644 index ba1e1e874b..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Templates/opm-project-config-version.cmake.in +++ /dev/null @@ -1,28 +0,0 @@ -# - CMake version file for @opm-project_NAME@ -# -# Determine if requested version matches exactly or is compatible with -# the installed package. It sets the following variables: -# -# PACKAGE_VERSION Full provided version string -# PACKAGE_VERSION_COMPATIBLE True if version is compatible -# PACKAGE_VERSION_EXACT True if version is exact match - -# This file is used by find_package to see if the installed version of a -# package can be used by the client, before the main -config.cmake file -# is loaded. -# see - -# this is the version that is installed -set (PACKAGE_VERSION @opm-project_VERSION@) - -# if we wanted this exact version, then everything's fine -if (PACKAGE_VERSION VERSION_EQUAL PACKAGE_FIND_VERSION) - set (PACKAGE_VERSION_EXACT TRUE) -endif (PACKAGE_VERSION VERSION_EQUAL PACKAGE_FIND_VERSION) - -# in general, we assume that there is going to be API breakage between -# released versions; this will hopefully change in the future -## compatible versions -#if (NOT PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) -# set (PACKAGE_VERSION_COMPATIBLE TRUE) -#endif (NOT PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Templates/opm-project-config.cmake.in b/ThirdParty/custom-opm-common/opm-common/cmake/Templates/opm-project-config.cmake.in deleted file mode 100644 index 3ef2c2bf36..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Templates/opm-project-config.cmake.in +++ /dev/null @@ -1,69 +0,0 @@ -# - @opm-project_DESCRIPTION@ config mode -# -# Defines the following variables: -# @opm-project_NAME@_FOUND - true -# @opm-project_NAME@_VERSION - version of the @opm-project_NAME@ library found, e.g. 0.2 -# @opm-project_NAME@_DEFINITIONS - defines to be made on the command line -# @opm-project_NAME@_INCLUDE_DIRS - header directories with which to compile -# @opm-project_NAME@_LINKER_FLAGS - flags that must be passed to the linker -# @opm-project_NAME@_LIBRARIES - names of the libraries with which to link -# @opm-project_NAME@_LIBRARY_DIRS - directories in which the libraries are situated -# -# You should put lines like this in your CMakeLists.txt -# set (@opm-project_NAME@_DIR "${PROJECT_BINARY_DIR}/../@opm-project_NAME@" CACHE LOCATION "Build tree of @opm-project_NAME@") -# find_package (@opm-project_NAME@) -# configure_vars ( -# FILE CXX "${PROJECT_BINARY_DIR}/config.h" -# WRITE ${@opm-project_NAME@_CONFIG_VARS} -# ) - -# - -# propagate these properties from one build system to the other -set (@opm-project_NAME@_VERSION "@opm-project_VERSION@") -set (@opm-project_NAME@_DEFINITIONS "@opm-project_DEFINITIONS@") -set (@opm-project_NAME@_INCLUDE_DIRS "@opm-project_INCLUDE_DIRS@") -set (@opm-project_NAME@_LIBRARY_DIRS "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@") -set (@opm-project_NAME@_LINKER_FLAGS "@opm-project_LINKER_FLAGS@") -set (@opm-project_NAME@_CONFIG_VARS "@opm-project_CONFIG_VARS@") - -# libraries come from the build tree where this file was generated -set (@opm-project_NAME@_LIBRARY "@opm-project_LIBRARY@") -set (@opm-project_NAME@_LIBRARIES ${@opm-project_NAME@_LIBRARY} "@opm-project_LIBRARIES@") -mark_as_advanced (@opm-project_NAME@_LIBRARY) - -# not all projects have targets; conditionally add this part -if (NOT "@opm-project_TARGET@" STREQUAL "") - # add the library as a target, so that other things in the project including - # this file may depend on it and get rebuild if this library changes. - add_library (@opm-project_TARGET@ UNKNOWN IMPORTED) - set_property (TARGET @opm-project_TARGET@ PROPERTY IMPORTED_LOCATION "${@opm-project_NAME@_LIBRARY}") -endif (NOT "@opm-project_TARGET@" STREQUAL "") - -# ensure that we build with support for C++11 to preserve ABI -string (REPLACE "@CXX_STD0X_FLAGS@" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") -string (REPLACE "@CXX_STDLIB_FLAGS@" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") -string (STRIP "${CMAKE_CXX_FLAGS}" CMAKE_CXX_FLAGS) -set (CMAKE_CXX_FLAGS "@CXX_STD0X_FLAGS@@CXX_SPACE@@CXX_STDLIB_FLAGS@ ${CMAKE_CXX_FLAGS}") - -# same as above, but for C99 -string (REPLACE "@C_STD99_FLAGS@" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") -string (STRIP "${CMAKE_C_FLAGS}" CMAKE_C_FLAGS) -set (CMAKE_C_FLAG "@C_STD99_FLAGS@ ${CMAKE_C_FLAGS}") - -# build with OpenMP if that was found -if (NOT "@OpenMP_C_FLAGS@" STREQUAL "") - string (REPLACE "@OpenMP_C_FLAGS@" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") - string (STRIP "${CMAKE_C_FLAGS}" CMAKE_C_FLAGS) - set (CMAKE_C_FLAG "@OpenMP_C_FLAGS@ ${CMAKE_C_FLAGS}") -endif (NOT "@OpenMP_C_FLAGS@" STREQUAL "") -if (NOT "@OpenMP_CXX_FLAGS@" STREQUAL "") - string (REPLACE "@OpenMP_CXX_FLAGS@" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - string (STRIP "${CMAKE_CXX_FLAGS}" CMAKE_CXX_FLAGS) - set (CMAKE_C_FLAG "@OpenMP_CXX_FLAGS@ ${CMAKE_CXX_FLAGS}") -endif (NOT "@OpenMP_CXX_FLAGS@" STREQUAL "") - -# this is the contents of config.h as far as our probes can tell: - -# extra code -@OPM_PROJECT_EXTRA_CODE@ diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Templates/opm-project.pc.in b/ThirdParty/custom-opm-common/opm-common/cmake/Templates/opm-project.pc.in deleted file mode 100644 index 6581685589..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Templates/opm-project.pc.in +++ /dev/null @@ -1,13 +0,0 @@ -prefix=@prefix@ -libdir=@libdir@ -includedir=@includedir@ -CXX=@CMAKE_CXX_COMPILER@ @CXX_STD0X_FLAGS@@CXX_SPACE@@CXX_STDLIB_FLAGS@ @OpenMP_CXX_FLAGS@ -CC=@CMAKE_C_COMPILER@ @C_STD99_FLAGS@ @OpenMP_C_FLAGS@ -DEPENDENCIES= - -Name: @name@ -Description: @description@ @major@.@minor@ -Version: @major@.@minor@ -URL: http://opm-project.org -Libs: @target@ @libs@ -Cflags: @includes@ @defs@ diff --git a/ThirdParty/custom-opm-common/opm-common/cmake/Templates/style.css b/ThirdParty/custom-opm-common/opm-common/cmake/Templates/style.css deleted file mode 100644 index 0877f33144..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/cmake/Templates/style.css +++ /dev/null @@ -1,11 +0,0 @@ -/* Userspesific CSS for doxygen */ -body, table, div, p, dl { - font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; - font-size: 16px; -} -h1 { - font-size: 120%; -} - - - diff --git a/ThirdParty/custom-opm-common/opm-common/configure b/ThirdParty/custom-opm-common/opm-common/configure deleted file mode 100644 index 0254f076c4..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/configure +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh -# this file is supposed to be located in the source directory -src_dir=$(dirname $0) - -# scan the arguments and set this if build macros could be specified -mod_dir= -for OPT in "$@"; do - case "$OPT" in - --with-opm-common=*) - # remove everything before equal sign and assign the rest - mod_dir=${OPT#*=} - # tilde expansion; note that doing eval may have side effects - mod_dir=$(eval echo $mod_dir) - # absolute path - [ -d "$mod_dir" ] && mod_dir=$(cd $mod_dir ; pwd) - ;; - esac -done - -# special work around the fact that dunecontrol does not specify -# --with-$MODULE for the module it attempts to build -ADDITIONAL_PARAMS="" -if test -z "$mod_dir"; then - ADDITIONAL_PARAMS="--with-opm-common=\"$(pwd)\"" -fi - -# if it isn't specified, the look around in other known places -conf_file=cmake/Scripts/configure -if [ -z "$mod_dir" ]; then - if [ -r "$src_dir/$conf_file" ]; then - mod_dir="$src_dir" - fi -fi - -# terminate with error message here if the module directory is not found -if [ ! -r "$mod_dir/$conf_file" ]; then - echo Build macros not located in \"$mod_dir\", use --with-opm-common= to specify! 1>&2 - exit 1 -fi - -# forward to the corresponding script in the cmake/Scripts/ directory -exec "$mod_dir/$conf_file" --src-dir="$src_dir" "$@" $ADDITIONAL_PARAMS diff --git a/ThirdParty/custom-opm-common/opm-common/debian/changelog b/ThirdParty/custom-opm-common/opm-common/debian/changelog deleted file mode 100644 index d115668673..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/debian/changelog +++ /dev/null @@ -1,5 +0,0 @@ -opm-common (2015.10-1~trusty) trusty; urgency=medium - - * New release - - -- Arne Morten Kvarving Mon, 19 Oct 2015 10:49:00 +0200 diff --git a/ThirdParty/custom-opm-common/opm-common/debian/compat b/ThirdParty/custom-opm-common/opm-common/debian/compat deleted file mode 100644 index ec635144f6..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/ThirdParty/custom-opm-common/opm-common/debian/control b/ThirdParty/custom-opm-common/opm-common/debian/control deleted file mode 100644 index 0c307dedb9..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/debian/control +++ /dev/null @@ -1,42 +0,0 @@ -Source: opm-common -Priority: extra -Maintainer: Arne Morten Kvarving -Build-Depends: build-essential, debhelper (>= 9), - pkg-config, cmake, git, libtool, doxygen, - texlive-latex-extra, texlive-latex-recommended, - ghostscript, libboost-system-dev, libboost-test-dev -Standards-Version: 3.9.2 -Section: libs -Homepage: http://opm-project.org -Vcs-Git: git://github.com/OPM/opm-common.git -Vcs-Browser: https://github.com/OPM/opm-common - -Package: libopm-common1 -Section: libs -Pre-Depends: ${misc:Pre-Depends}, multiarch-support -Architecture: any -Multi-Arch: same -Depends: ${shlibs:Depends}, ${misc:Depends} -Provides: libopm-common -Description: OPM common library - The OPM common library contains generic code shared across all OPM modules. - -Package: libopm-common1-dev -Section: libdevel -Architecture: any -Multi-Arch: foreign -Provides: libopm-common-dev -Suggests: libopm-common1-doc -Depends: libopm-common1 (= ${binary:Version}) -Description: OPM common library -- development files - The OPM common library contains the shared buildsystem - and helpers shared across all OPM modules. - -Package: libopm-common1-doc -Section: doc -Architecture: all -Multi-Arch: foreign -Provides: libopm-common-doc -Description: OPM common library -- documentation - The OPM common library contains the shared buildsystem - and helpers shared across all OPM modules. diff --git a/ThirdParty/custom-opm-common/opm-common/debian/copyright b/ThirdParty/custom-opm-common/opm-common/debian/copyright deleted file mode 100644 index 00e820065d..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/debian/copyright +++ /dev/null @@ -1,13 +0,0 @@ -License: GPL-3+ - This package 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. - - This package 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 for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see diff --git a/ThirdParty/custom-opm-common/opm-common/debian/docs b/ThirdParty/custom-opm-common/opm-common/debian/docs deleted file mode 100644 index f0f644ee08..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/debian/docs +++ /dev/null @@ -1,2 +0,0 @@ -LICENSE -README.md diff --git a/ThirdParty/custom-opm-common/opm-common/debian/libopm-common1-dev.install b/ThirdParty/custom-opm-common/opm-common/debian/libopm-common1-dev.install deleted file mode 100644 index a863e41c2c..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/debian/libopm-common1-dev.install +++ /dev/null @@ -1,6 +0,0 @@ -usr/include/* -usr/lib/dunecontrol/* -usr/lib/*/pkgconfig/* -usr/share/cmake/* -usr/share/opm/* -usr/lib/*/lib*.so diff --git a/ThirdParty/custom-opm-common/opm-common/debian/libopm-common1-doc.install b/ThirdParty/custom-opm-common/opm-common/debian/libopm-common1-doc.install deleted file mode 100644 index d9d4f6f8aa..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/debian/libopm-common1-doc.install +++ /dev/null @@ -1 +0,0 @@ -usr/share/doc/* diff --git a/ThirdParty/custom-opm-common/opm-common/debian/libopm-common1.install b/ThirdParty/custom-opm-common/opm-common/debian/libopm-common1.install deleted file mode 100644 index 3ddde58419..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/debian/libopm-common1.install +++ /dev/null @@ -1 +0,0 @@ -usr/lib/*/lib*.so.* diff --git a/ThirdParty/custom-opm-common/opm-common/debian/rules b/ThirdParty/custom-opm-common/opm-common/debian/rules deleted file mode 100644 index 7166ecb95b..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/debian/rules +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -%: - dh $@ - -override_dh_auto_clean: - dh_auto_clean --buildsystem=cmake - -override_dh_auto_build: - dh_auto_build --buildsystem=cmake - -# consider using -DUSE_VERSIONED_DIR=ON if backporting -override_dh_auto_configure: - dh_auto_configure --buildsystem=cmake -- -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSTRIP_DEBUGGING_SYMBOLS=ON -DBUILD_SHARED_LIBS=1 -DCMAKE_INSTALL_DOCDIR=share/doc/libopm-common1 -DWHOLE_PROG_OPTIM=ON -DUSE_RUNPATH=OFF - -override_dh_auto_install: - dh_auto_install -- install-html - -override_dh_installdocs: - dh_installdocs --link-doc=libopm-common1 diff --git a/ThirdParty/custom-opm-common/opm-common/debian/source/format b/ThirdParty/custom-opm-common/opm-common/debian/source/format deleted file mode 100644 index d3827e75a5..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -1.0 diff --git a/ThirdParty/custom-opm-common/opm-common/jenkins/README.md b/ThirdParty/custom-opm-common/opm-common/jenkins/README.md deleted file mode 100644 index 5bfc46c3be..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/jenkins/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# opm-common jenkins build scripts: - -**build-opm-module.sh**: -This is a helper script which contains functions for building, -testing and cloning modules. - -**build.sh**: -This expects to run on a jenkins instance with opm-common as the 'origin' remote. - -It will build and test opm-common. It can be used both for post-merge builds -of the master branch and for a github pull request builder job. diff --git a/ThirdParty/custom-opm-common/opm-common/jenkins/build-opm-module.sh b/ThirdParty/custom-opm-common/opm-common/jenkins/build-opm-module.sh deleted file mode 100644 index a626baa872..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/jenkins/build-opm-module.sh +++ /dev/null @@ -1,212 +0,0 @@ -#!/bin/bash - -declare -A configurations - -# Parse revisions from trigger comment and setup arrays -# Depends on: 'upstreams', upstreamRev', -# 'downstreams', 'downstreamRev', -# 'ghprbCommentBody', -# 'CONFIGURATIONS', 'TOOLCHAINS' -function parseRevisions { - for upstream in ${upstreams[*]} - do - if grep -qi "$upstream=" <<< $ghprbCommentBody - then - upstreamRev[$upstream]=pull/`echo $ghprbCommentBody | sed -r "s/.*${upstream,,}=([0-9]+).*/\1/g"`/merge - fi - done - if grep -q "with downstreams" <<< $ghprbCommentBody - then - for downstream in ${downstreams[*]} - do - if grep -qi "$downstream=" <<< $ghprbCommentBody - then - downstreamRev[$downstream]=pull/`echo $ghprbCommentBody | sed -r "s/.*${downstream,,}=([0-9]+).*/\1/g"`/merge - fi - done - fi - - # Default to a serial build if no types are given - if test -z "$BTYPES" - then - BTYPES="serial" - fi - - # Convert to arrays for easy looping - declare -a BTYPES_ARRAY - for btype in $BTYPES - do - BTYPES_ARRAY=($BTYPES_ARRAY $btype) - done - TOOLCHAIN_ARRAY=($CMAKE_TOOLCHAIN_FILES) - for index in ${!BTYPES_ARRAY[*]} - do - key=${BTYPES_ARRAY[$index]} - data=${TOOLCHAIN_ARRAY[$index]} - configurations[$key]=$data - done -} - -# Print revisions and configurations -# $1 = Name of main module -# Depends on: 'upstreams', upstreamRev', -# 'downstreams', 'downstreamRev', -# 'ghprbCommentBody', -# 'configurations', 'sha1' -function printHeader { - echo -e "Repository revisions:" - for upstream in ${upstreams[*]} - do - echo -e "\t [upstream] $upstream=${upstreamRev[$upstream]}" - done - echo -e "\t[main module] $1=$sha1" - if grep -q "with downstreams" <<< $ghprbCommentBody - then - for downstream in ${downstreams[*]} - do - echo -e "\t [downstream] $downstream=${downstreamRev[$downstream]}" - done - fi - - echo "Configurations to process:" - for conf in ${!configurations[@]} - do - echo -e "\t$conf=${configurations[$conf]}" - done -} - -# $1 = Additional cmake parameters -# $2 = 0 to build and install module, 1 to build and test module -# $3 = Source root of module to build -function build_module { - cmake $3 -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=$2 -DCMAKE_TOOLCHAIN_FILE=${configurations[$configuration]} $1 - test $? -eq 0 || exit 1 - if test $2 -eq 1 - then - cmake --build . - test $? -eq 0 || exit 2 - ctest -T Test --no-compress-output - - # Convert to junit format - $WORKSPACE/deps/opm-common/jenkins/convert.py -x $WORKSPACE/deps/opm-common/jenkins/conv.xsl -t . > testoutput.xml - - if ! grep -q "with downstreams" <<< $ghprbCommentBody - then - # Add configuration name - sed -e "s/classname=\"TestSuite\"/classname=\"${configuration}\"/g" testoutput.xml > $WORKSPACE/$configuration/testoutput.xml - fi - else - cmake --build . --target install - fi -} - -# $1 = Name of module -# $2 = git-rev to use for module -function clone_module { - # Already cloned by an earlier configuration - test -d $WORKSPACE/deps/$1 && return 0 - pushd . - mkdir -p $WORKSPACE/deps/$1 - cd $WORKSPACE/deps/$1 - git init . - if [ "$1" == "ert" ] - then - git remote add origin https://github.com/Ensembles/$1 - else - git remote add origin https://github.com/OPM/$1 - fi - git fetch --depth 1 origin $2:branch_to_build - git checkout branch_to_build - test $? -eq 0 || exit 1 - popd -} - -# $1 = Module to clone -# $2 = Additional cmake parameters -# $3 = git-rev to use for module -# $4 = Build root -function clone_and_build_module { - clone_module $1 $3 - pushd . - mkdir -p $4/build-$1 - cd $4/build-$1 - test_build=0 - if test -n "$5" - then - test_build=$5 - fi - build_module "$2" $test_build $WORKSPACE/deps/$1 - test $? -eq 0 || exit 1 - popd -} - -# Uses pre-filled arrays upstreams, and associativ array upstreamRev -# which holds the revisions to use for upstreams. -function build_upstreams { - for upstream in ${upstreams[*]} - do - echo "Building upstream $upstream=${upstreamRev[$upstream]} configuration=$configuration" - # Build upstream and execute installation - clone_and_build_module $upstream "-DCMAKE_PREFIX_PATH=$WORKSPACE/$configuration/install -DCMAKE_INSTALL_PREFIX=$WORKSPACE/$configuration/install" ${upstreamRev[$upstream]} $WORKSPACE/$configuration - test $? -eq 0 || exit 1 - done - test $? -eq 0 || exit 1 -} - -# $1 - name of the module we are called from -# Uses pre-filled arrays downstreams, and associativ array downstreamRev -# which holds the default revisions to use for downstreams -function build_downstreams { - pushd . - cd $WORKSPACE/$configuration/build-$1 - cmake --build . --target install - popd - - egrep_cmd="xml_grep --wrap testsuites --cond testsuite $WORKSPACE/$configuration/build-$1/testoutput.xml" - for downstream in ${downstreams[*]} - do - echo "Building downstream $downstream=${downstreamRev[$downstream]} configuration=$configuration" - # Build downstream and execute installation - clone_and_build_module $downstream "-DCMAKE_PREFIX_PATH=$WORKSPACE/$configuration/install -DCMAKE_INSTALL_PREFIX=$WORKSPACE/$configuration/install -DOPM_DATA_ROOT=$OPM_DATA_ROOT" ${downstreamRev[$downstream]} $WORKSPACE/$configuration 1 - test $? -eq 0 || exit 1 - - # Installation for downstream - pushd . - cd $WORKSPACE/$configuration/build-$downstream - cmake --build . --target install - popd - egrep_cmd="$egrep_cmd $WORKSPACE/$configuration/build-$downstream/testoutput.xml" - done - - $egrep_cmd > $WORKSPACE/$configuration/testoutput.xml - - # Add testsuite name - sed -e "s/classname=\"TestSuite\"/classname=\"${configuration}\"/g" -i $WORKSPACE/$configuration/testoutput.xml - - test $? -eq 0 || exit 1 -} - -# $1 = Name of main module -function build_module_full { - for configuration in ${!configurations[@]} - do - # Build upstream modules - build_upstreams - - # Build main module - pushd . - mkdir -p $configuration/build-$1 - cd $configuration/build-$1 - echo "Building main module $1=$sha1 configuration=$configuration" - build_module "-DCMAKE_INSTALL_PREFIX=$WORKSPACE/$configuration/install -DOPM_DATA_ROOT=$OPM_DATA_ROOT" 1 $WORKSPACE - test $? -eq 0 || exit 1 - popd - - # If no downstream builds we are done - if grep -q "with downstreams" <<< $ghprbCommentBody - then - build_downstreams $1 - test $? -eq 0 || exit 1 - fi - done -} diff --git a/ThirdParty/custom-opm-common/opm-common/jenkins/build.sh b/ThirdParty/custom-opm-common/opm-common/jenkins/build.sh deleted file mode 100644 index 050a67bf80..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/jenkins/build.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -source `dirname $0`/build-opm-module.sh - -# Create symlink so build_module can find the test result converter -mkdir deps -ln -sf $WORKSPACE deps/opm-common - -# Downstreams and revisions -declare -a downstreams -downstreams=(ert - opm-parser - opm-output - opm-material - opm-core - opm-grid - opm-simulators - opm-upscaling - ewoms) - -declare -A downstreamRev -downstreamRev[ert]=master -downstreamRev[opm-parser]=master -downstreamRev[opm-material]=master -downstreamRev[opm-core]=master -downstreamRev[opm-grid]=master -downstreamRev[opm-output]=master -downstreamRev[opm-simulators]=master -downstreamRev[opm-upscaling]=master -downstreamRev[ewoms]=master - -parseRevisions -printHeader opm-common - -# Setup opm-data if necessary -if grep -q "with downstreams" <<< $ghprbCommentBody -then - source $WORKSPACE/deps/opm-common/jenkins/setup-opm-data.sh -fi - -build_module_full opm-common diff --git a/ThirdParty/custom-opm-common/opm-common/jenkins/conv.xsl b/ThirdParty/custom-opm-common/opm-common/jenkins/conv.xsl deleted file mode 100644 index 2691e08ce5..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/jenkins/conv.xsl +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BuildName: - BuildStamp: - Name: - Generator: - CompilerName: - OSName: - Hostname: - OSRelease: - OSVersion: - OSPlatform: - Is64Bits: - VendorString: - VendorID: - FamilyID: - ModelID: - ProcessorCacheSize: - NumberOfLogicalCPU: - NumberOfPhysicalCPU: - TotalVirtualMemory: - TotalPhysicalMemory: - LogicalProcessorsPerPhysical: - ProcessorClockFrequency: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ThirdParty/custom-opm-common/opm-common/jenkins/convert.py b/ThirdParty/custom-opm-common/opm-common/jenkins/convert.py deleted file mode 100644 index c390c33eec..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/jenkins/convert.py +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env python -# coding: utf-8 -# originally from: -# http://www.warp1337.com/content/how-use-ctest-jenkins-xunit-or-junit-plugin -# improved by: -# Jorge Araya Navarro - -# Veni, Sancte Spiritus. - -from lxml import etree -import argparse -from os.path import expanduser -from os.path import join -import logging - -# configure logging -logging.basicConfig(format="%(levelname)s: %(message)s", - level=logging.ERROR) - -desc = ("Converts ctest XML file to xUnit/JUnit XML " - "compatible file to use with Jenkins-CI. " - "Did you found any bug? please report it on: " - "https://bitbucket.org/shackra/ctest-jenkins/issues") - -# configure argument parser. -parser = argparse.ArgumentParser(description=desc) -parser.add_argument("-x", "--xslt", help="the XSLT file to use", required=True) -parser.add_argument("-t", "--tag", help=("the directory where 'Testing/TAG'" - "file is. Remember to call ctest with" - " '-T test' option to generate it"), - required=True) - -parsed = parser.parse_args() -# expanding user symbol "~" -parsed.xsl = expanduser(parsed.xslt) -parsed.tag = expanduser(parsed.tag) - -# opening the TAG file -directory = None -try: - with open(join(parsed.tag, "Testing", "TAG")) as tagfile: - directory = tagfile.readline().strip() - -except NotADirectoryError: - logging.error( - "'Testing/TAG' wasn't found on directory '{}'.".format(parsed.tag)) - exit(1) -except FileNotFoundError: - logging.error( - "File '{}' not found.".format(join(parsed.tag, "Testing", "TAG"))) - exit(1) - -xmldoc = None -transform = None -try: - with open(join(parsed.tag, "Testing", directory, "Test.xml"))\ - as testxmlfile: - xmldoc = etree.parse(testxmlfile) - -except FileNotFoundError: - logging.error("File {} not found. Was it deleted or moved?".format( - join(parsed.tag, "Testing", directory, "Test.xml"))) - exit(1) - -try: - with open(parsed.xslt) as xsltfile: - xslt_root = etree.XML(xsltfile.read()) - transform = etree.XSLT(xslt_root) -except FileNotFoundError: - logging.error("File {} not found.".format(parsed.xslt)) - exit(1) - -result_tree = transform(xmldoc) -print(result_tree) diff --git a/ThirdParty/custom-opm-common/opm-common/jenkins/setup-opm-data.sh b/ThirdParty/custom-opm-common/opm-common/jenkins/setup-opm-data.sh deleted file mode 100644 index 5755a24ce1..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/jenkins/setup-opm-data.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# Predefined by environment -if test -z "$OPM_DATA_ROOT" -then - OPM_DATA_REVISION="master" - if grep -q "opm-data=" <<< $ghprbCommentBody - then - OPM_DATA_REVISION=pull/`echo $ghprbCommentBody | sed -r 's/.*opm-data=([0-9]+).*/\1/g'`/merge - fi - # Not specified in trigger, use shared copy - if [[ "$OPM_DATA_REVISION" = "master" ]] && [[ ! "$OPM_DATA_ROOT_PREDEFINED" = "" ]] - then - if ! test -d $WORKSPACE/deps/opm-data - then - cp $OPM_DATA_ROOT_PREDEFINED $WORKSPACE/deps/opm-data -R - fi - else - # Specified in trigger, download it - source $WORKSPACE/deps/opm-common/jenkins/build-opm-module.sh - clone_module opm-data $OPM_DATA_REVISION - fi -else - if ! test -d $WORKSPACE/deps/opm-data - then - cp $OPM_DATA_ROOT $WORKSPACE/deps/opm-data -R - fi -fi -OPM_DATA_ROOT=$WORKSPACE/deps/opm-data diff --git a/ThirdParty/custom-opm-common/opm-common/opm/common/ErrorMacros.hpp b/ThirdParty/custom-opm-common/opm-common/opm/common/ErrorMacros.hpp deleted file mode 100644 index 8b3f89a335..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/opm/common/ErrorMacros.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/* - Copyright 2013 Andreas Lauser - Copyright 2009, 2010 SINTEF ICT, Applied Mathematics. - Copyright 2009, 2010 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ -#ifndef OPM_ERRORMACROS_HPP -#define OPM_ERRORMACROS_HPP - -#include - -#include -#include -#include -#include -#include - -// macros for reporting to stderr -#ifdef OPM_VERBOSE // Verbose mode -# include -# define OPM_REPORT do { std::cerr << "[" << __FILE__ << ":" << __LINE__ << "] " } while (false) -# define OPM_MESSAGE(x) do { OPM_REPORT; std::cerr << x << "\n"; } while (false) -# define OPM_MESSAGE_IF(cond, m) do {if(cond) OPM_MESSAGE(m);} while (false) -#else // non-verbose mode (default) -# define OPM_REPORT do {} while (false) -# define OPM_MESSAGE(x) do {} while (false) -# define OPM_MESSAGE_IF(cond, m) do {} while (false) -#endif - -// Macro to throw an exception. NOTE: For this macro to work, the -// exception class must exhibit a constructor with the signature -// (const std::string &message). Since this condition is not fulfilled -// for the std::exception, you should use this macro with some -// exception class derived from either std::logic_error or -// std::runtime_error. -// -// Usage: OPM_THROW(ExceptionClass, "Error message " << value); -#define OPM_THROW(Exception, message) \ - do { \ - std::ostringstream oss__; \ - oss__ << "[" << __FILE__ << ":" << __LINE__ << "] " << message; \ - Opm::OpmLog::error(oss__.str()); \ - throw Exception(oss__.str()); \ - } while (false) - -// throw an exception if a condition is true -#define OPM_ERROR_IF(condition, message) do {if(condition){ OPM_THROW(std::logic_error, message);}} while(false) - -#endif // OPM_ERRORMACROS_HPP diff --git a/ThirdParty/custom-opm-common/opm-common/opm/common/Exceptions.hpp b/ThirdParty/custom-opm-common/opm-common/opm/common/Exceptions.hpp deleted file mode 100644 index bfe5ebf763..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/opm/common/Exceptions.hpp +++ /dev/null @@ -1,63 +0,0 @@ -// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- -// vi: set et ts=4 sw=4 sts=4: -/***************************************************************************** - * Copyright (C) 2013 by Andreas Lauser * - * * - * This program 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 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program. If not, see . * - *****************************************************************************/ -/*! - * \file - * \brief Provides the OPM specific exception classes. - */ -#ifndef OPM_EXCEPTIONS_HPP -#define OPM_EXCEPTIONS_HPP - -#include - -// the OPM-specific exception classes -namespace Opm { -class NotImplemented : public std::logic_error -{ -public: - explicit NotImplemented(const std::string &message) - : std::logic_error(message) - {} -}; - -class NumericalProblem : public std::runtime_error -{ -public: - explicit NumericalProblem(const std::string &message) - : std::runtime_error(message) - {} -}; - -class MaterialLawProblem : public NumericalProblem -{ -public: - explicit MaterialLawProblem(const std::string &message) - : NumericalProblem(message) - {} -}; - -class LinearSolverProblem : public NumericalProblem -{ -public: - explicit LinearSolverProblem(const std::string &message) - : NumericalProblem(message) - {} -}; -} - -#endif // OPM_EXCEPTIONS_HPP diff --git a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/CounterLog.cpp b/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/CounterLog.cpp deleted file mode 100644 index 8e066486c6..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/CounterLog.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - Copyright 2014 Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#include -#include -#include - -#include -#include -#include - - - -namespace Opm { - -CounterLog::CounterLog(int64_t messageTypes) : LogBackend(messageTypes) -{ } - -CounterLog::CounterLog() : LogBackend(Log::DefaultMessageTypes) -{ } - - -size_t CounterLog::numMessages(int64_t messageType) const { - if (Log::isPower2( messageType )) { - auto iter = m_count.find( messageType ); - if (iter == m_count.end()) - return 0; - else - return (*iter).second; - } else - throw std::invalid_argument("The messageType ID must be 2^n"); -} - - - -void CounterLog::addTaggedMessage(int64_t messageType, const std::string& messageTag, const std::string& ) { - if (includeMessage( messageType, messageTag )) - m_count[messageType]++; -} - - -void CounterLog::clear() -{ - m_count.clear(); -} - - - -} // namespace Opm diff --git a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/CounterLog.hpp b/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/CounterLog.hpp deleted file mode 100644 index f9843558ce..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/CounterLog.hpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright 2014 Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_COUNTERLOG_HPP -#define OPM_COUNTERLOG_HPP - -#include -#include -#include - -#include - -namespace Opm { -/*! - * \brief Provides a simple sytem for log message which are found by the - * Parser/Deck/EclipseState classes during processing the deck. - */ - class CounterLog : public LogBackend { -public: - - CounterLog(int64_t messageMask); - CounterLog(); - - size_t numMessages(int64_t messageType) const; - - - void addTaggedMessage(int64_t messageFlag, - const std::string& messageTag, - const std::string& message); - - - void clear(); - ~CounterLog() {}; -private: - std::map m_count; -}; - -typedef std::shared_ptr CounterLogPtr; -typedef std::shared_ptr CounterLogConstPtr; -} // namespace Opm - -#endif - diff --git a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/EclipsePRTLog.cpp b/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/EclipsePRTLog.cpp deleted file mode 100644 index 29c6efc4f0..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/EclipsePRTLog.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include -#include - -namespace Opm { - - - void EclipsePRTLog::addTaggedMessage(int64_t messageType, const std::string& messageTag, const std::string& message) - { - StreamLog::addTaggedMessage(messageType, messageTag, message); - m_count[messageType]++; - } - - - size_t EclipsePRTLog::numMessages(int64_t messageType) const - { - if (Log::isPower2( messageType )) { - auto iter = m_count.find( messageType ); - if (iter == m_count.end()) - return 0; - else - return (*iter).second; - } else - throw std::invalid_argument("The messageType ID must be 2^n"); - } - - - EclipsePRTLog::~EclipsePRTLog() - { - if( ! print_summary_ ) - { - return; - } - - //output summary. - const std::string summary_msg = "\n\nError summary:" + - std::string("\nWarnings " + std::to_string(numMessages(Log::MessageType::Warning))) + - std::string("\nProblems " + std::to_string(numMessages(Log::MessageType::Problem))) + - std::string("\nErrors " + std::to_string(numMessages(Log::MessageType::Error))) + - std::string("\nBugs " + std::to_string(numMessages(Log::MessageType::Bug))) + - std::string("\nDebug " + std::to_string(numMessages(Log::MessageType::Debug))) + - std::string("\nProblems " + std::to_string(numMessages(Log::MessageType::Problem))) +"\n"; - StreamLog::addTaggedMessage(Log::MessageType::Info, "", summary_msg); - } - - EclipsePRTLog::EclipsePRTLog(const std::string& logFile, - int64_t messageMask, - bool append, - bool print_summary) - : StreamLog(logFile, messageMask, append), - print_summary_(print_summary) - {} - - EclipsePRTLog::EclipsePRTLog(std::ostream& os, - int64_t messageMask, - bool print_summary) - : StreamLog(os, messageMask), print_summary_(print_summary) - {} -} diff --git a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/EclipsePRTLog.hpp b/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/EclipsePRTLog.hpp deleted file mode 100644 index 8f7ca9a617..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/EclipsePRTLog.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef ECLIPSEPRTLOG_H -#define ECLIPSEPRTLOG_H - -#include -#include -#include - -namespace Opm { - -class EclipsePRTLog : public StreamLog { - -public: - using StreamLog::StreamLog; - - void addTaggedMessage(int64_t messageType, const std::string& messageTag, const std::string& message); - - size_t numMessages(int64_t messageType) const; - - ~EclipsePRTLog(); - - /// \brief Construct a logger to the .PRT file - /// \param logFile The name of the logfile to use. - /// \param messageMask ???? - /// \param append If true then we append messages to the file. - /// Otherwise a new file is created. - /// \param print_summary If true print a summary to the PRT file. - EclipsePRTLog(const std::string& logFile , int64_t messageMask, - bool append, bool print_summary); - - /// \brief Construct a logger to the .PRT file - /// \param logFile The name of the logfile to use. - /// \param messageMask ???? - /// \param append If true then we append messages to the file. - /// Otherwise a new file is created. - /// \param print_summary If true print a summary to the PRT file. - EclipsePRTLog(std::ostream& os , int64_t messageMask, - bool print_summary); -private: - std::map m_count; - /// \brief Whether to print a summary to the log file. - bool print_summary_ = true; -}; -} -#endif // ECLIPSEPRTLOG_H diff --git a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/LogBackend.cpp b/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/LogBackend.cpp deleted file mode 100644 index f24f04d5af..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/LogBackend.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include - -namespace Opm { - - LogBackend::LogBackend( int64_t mask ) : - m_mask(mask) - { - } - - LogBackend::~LogBackend() - { - } - - void LogBackend::setMessageFormatter(std::shared_ptr formatter) - { - m_formatter = formatter; - } - - void LogBackend::setMessageLimiter(std::shared_ptr limiter) - { - m_limiter = limiter; - } - - void LogBackend::addMessage(int64_t messageFlag, const std::string& message) - { - // Forward the call to the tagged version. - addTaggedMessage(messageFlag, "", message); - } - - int64_t LogBackend::getMask() const - { - return m_mask; - } - - bool LogBackend::includeMessage(int64_t messageFlag, const std::string& messageTag) - { - // Check mask. - const bool included = ((messageFlag & m_mask) == messageFlag) && (messageFlag > 0); - if (!included) { - return false; - } - - // Use the message limiter (if any). - MessageLimiter::Response res = m_limiter - ? m_limiter->handleMessageTag(messageTag) - : MessageLimiter::Response::PrintMessage; - if (res == MessageLimiter::Response::JustOverLimit) { - // Special case: add a message to this backend about limit being reached. - std::string msg = "Message limit reached for message tag: " + messageTag; - addTaggedMessage(messageFlag, "", msg); - } - return res == MessageLimiter::Response::PrintMessage; - } - - std::string LogBackend::formatMessage(int64_t messageFlag, const std::string& message) - { - if (m_formatter) { - return m_formatter->format(messageFlag, message); - } else { - return message; - } - } - - -} diff --git a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/LogBackend.hpp b/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/LogBackend.hpp deleted file mode 100644 index 6441856889..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/LogBackend.hpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - -#ifndef OPM_LOGBACKEND_HPP -#define OPM_LOGBACKEND_HPP - -#include -#include -#include -#include -#include - -namespace Opm -{ - - /// Abstract interface class for log backends. - class LogBackend - { - public: - /// Construct with given message mask. - explicit LogBackend(int64_t mask); - - /// Virtual destructor to enable inheritance. - virtual ~LogBackend(); - - /// Configure how formatMessage() will modify message strings. - void setMessageFormatter(std::shared_ptr formatter); - - /// Configure how message tags will be used to limit messages. - void setMessageLimiter(std::shared_ptr limiter); - - /// Add a message to the backend. - /// - /// Typically a subclass may filter, change, and output - /// messages based on configuration and the messageFlag. - void addMessage(int64_t messageFlag, const std::string& message); - - /// Add a tagged message to the backend. - /// - /// Typically a subclass may filter, change, and output - /// messages based on configuration and the messageFlag. - virtual void addTaggedMessage(int64_t messageFlag, - const std::string& messageTag, - const std::string& message) = 0; - - /// The message mask types are specified in the - /// Opm::Log::MessageType namespace, in file LogUtils.hpp. - int64_t getMask() const; - - protected: - /// Return true if all bits of messageFlag are also set in our mask. - bool includeMessage(int64_t messageFlag, const std::string& messageTag); - - /// Return decorated version of message depending on configureDecoration() arguments. - std::string formatMessage(int64_t messageFlag, const std::string& message); - - private: - int64_t m_mask; - std::shared_ptr m_formatter; - std::shared_ptr m_limiter; - }; - -} // namespace LogBackend - - -#endif diff --git a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/LogUtil.cpp b/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/LogUtil.cpp deleted file mode 100644 index 4828e1f2e5..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/LogUtil.cpp +++ /dev/null @@ -1,98 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include -#include -#include - - -namespace Opm { - -namespace Log { - - bool isPower2(int64_t x) { - return ((x != 0) && !(x & (x - 1))); - } - - - - std::string fileMessage(const std::string& filename , int line , const std::string& message) { - std::ostringstream oss; - - oss << message << "\n" << "In file " << filename << ", line " << line << "\n"; - - return oss.str(); - } - - std::string fileMessage(int64_t messageType , const std::string& filename , int line , const std::string& message) { - return fileMessage( filename , line , prefixMessage( messageType , message )); - } - - - std::string prefixMessage(int64_t messageType, const std::string& message) { - std::string prefix; - switch (messageType) { - case MessageType::Debug: - prefix = "Debug"; - break; - case MessageType::Note: - prefix = "Note"; - break; - case MessageType::Info: - prefix = "Info"; - break; - case MessageType::Warning: - prefix = "Warning"; - break; - case MessageType::Error: - prefix = "Error"; - break; - case MessageType::Problem: - prefix = "Problem"; - break; - case MessageType::Bug: - prefix = "Bug"; - break; - default: - throw std::invalid_argument("Unhandled messagetype"); - } - - return prefix + ": " + message; - } - - - std::string colorCodeMessage(int64_t messageType, const std::string& message) { - switch (messageType) { - case MessageType::Debug: - case MessageType::Note: - case MessageType::Info: - return message; // No color coding, not even the code for default color. - case MessageType::Warning: - return AnsiTerminalColors::blue_strong + message + AnsiTerminalColors::none; - case MessageType::Error: - case MessageType::Problem: - case MessageType::Bug: - return AnsiTerminalColors::red_strong + message + AnsiTerminalColors::none; - default: - throw std::invalid_argument("Unhandled messagetype"); - } - } - -} -} diff --git a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/LogUtil.hpp b/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/LogUtil.hpp deleted file mode 100644 index 633795a7d0..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/LogUtil.hpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef OPM_LOG_UTIL_HPP -#define OPM_LOG_UTIL_HPP - -#include -#include - -namespace Opm { -namespace Log { - namespace MessageType { - const int64_t Debug = 1; /* Excessive information */ - const int64_t Note = 2; /* Information that should only go into print file.*/ - const int64_t Info = 4; /* Normal status information */ - const int64_t Warning = 8; /* Input anomaly - possible error */ - const int64_t Error = 16; /* Error in the input data - should probably exit. */ - const int64_t Problem = 32; /* Calculation problems - e.g. convergence failure. */ - const int64_t Bug = 64; /* An inconsistent state has been encountered in the simulator - should probably exit. */ - } - - const int64_t DefaultMessageTypes = MessageType::Debug + MessageType::Note + MessageType::Info + MessageType::Warning + MessageType::Error + MessageType::Problem + MessageType::Bug; - const int64_t NoDebugMessageTypes = MessageType::Info + MessageType::Note + MessageType::Warning + MessageType::Error + MessageType::Problem + MessageType::Bug; - const int64_t StdoutMessageTypes = MessageType::Info + MessageType::Warning + MessageType::Error + MessageType::Problem + MessageType::Bug; - - /// Terminal codes for ANSI/vt100 compatible terminals. - /// See for example http://ascii-table.com/ansi-escape-sequences.php - namespace AnsiTerminalColors { - const std::string none = "\033[0m"; - const std::string red = "\033[31m"; - const std::string red_strong = "\033[31;1m"; - const std::string yellow = "\033[33m"; - const std::string yellow_strong = "\033[33;1m"; - const std::string blue = "\033[34m"; - const std::string blue_strong = "\033[34;1m"; - const std::string default_color = "\033[39m"; - } - - - bool isPower2(int64_t x); - std::string fileMessage(const std::string& path, int line , const std::string& msg); - std::string fileMessage(int64_t messageType , const std::string& path, int line , const std::string& msg); - std::string prefixMessage(int64_t messageType , const std::string& msg); - std::string colorCodeMessage(int64_t messageType , const std::string& msg); - -} -} - -#endif diff --git a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/Logger.cpp b/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/Logger.cpp deleted file mode 100644 index 10ec107768..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/Logger.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ -#include -#include -#include - -#include -#include -#include - -namespace Opm { - - Logger::Logger() - : m_globalMask(0), - m_enabledTypes(0) - { - addMessageType( Log::MessageType::Debug , "debug"); - addMessageType( Log::MessageType::Info , "info"); - addMessageType( Log::MessageType::Warning , "warning"); - addMessageType( Log::MessageType::Error , "error"); - addMessageType( Log::MessageType::Problem , "problem"); - addMessageType( Log::MessageType::Bug , "bug"); - addMessageType( Log::MessageType::Note , "note"); - } - - void Logger::addTaggedMessage(int64_t messageType, const std::string& tag, const std::string& message) const { - if ((m_enabledTypes & messageType) == 0) - throw std::invalid_argument("Tried to issue message with unrecognized message ID"); - - if (m_globalMask & messageType) { - for (auto iter : m_backends) { - LogBackend& backend = *(iter.second); - backend.addTaggedMessage( messageType, tag, message ); - } - } - } - - void Logger::addMessage(int64_t messageType , const std::string& message) const { - addTaggedMessage(messageType, "", message); - } - - - void Logger::updateGlobalMask( int64_t mask ) { - m_globalMask |= mask; - } - - - bool Logger::hasBackend(const std::string& name) { - if (m_backends.find( name ) == m_backends.end()) - return false; - else - return true; - } - - void Logger::removeAllBackends() { - m_backends.clear(); - m_globalMask = 0; - } - - bool Logger::removeBackend(const std::string& name) { - size_t eraseCount = m_backends.erase( name ); - if (eraseCount == 1) - return true; - else - return false; - } - - - void Logger::addBackend(const std::string& name , std::shared_ptr backend) { - updateGlobalMask( backend->getMask() ); - m_backends[ name ] = backend; - } - - - int64_t Logger::enabledMessageTypes() const { - return m_enabledTypes; - } - - //static: - bool Logger::enabledMessageType( int64_t enabledTypes , int64_t messageType) { - if (Log::isPower2( messageType)) { - if ((messageType & enabledTypes) == 0) - return false; - else - return true; - } else - throw std::invalid_argument("The message type id must be ~ 2^n"); - } - - - //static: - bool Logger::enabledDefaultMessageType( int64_t messageType) { - return enabledMessageType( Log::DefaultMessageTypes , messageType ); - } - - bool Logger::enabledMessageType( int64_t messageType) const { - return enabledMessageType( m_enabledTypes , messageType ); - } - - - void Logger::addMessageType( int64_t messageType , const std::string& /* prefix */) { - if (Log::isPower2( messageType)) { - m_enabledTypes |= messageType; - } else - throw std::invalid_argument("The message type id must be ~ 2^n"); - } - -} diff --git a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/Logger.hpp b/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/Logger.hpp deleted file mode 100644 index 341a4f4c57..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/Logger.hpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef OPM_LOGGER_HPP -#define OPM_LOGGER_HPP - -#include -#include -#include -#include -#include - -namespace Opm { - - class LogBackend; - -class Logger { - -public: - Logger(); - void addMessage(int64_t messageType , const std::string& message) const; - void addTaggedMessage(int64_t messageType, const std::string& tag, const std::string& message) const; - - static bool enabledDefaultMessageType( int64_t messageType); - bool enabledMessageType( int64_t messageType) const; - void addMessageType( int64_t messageType , const std::string& prefix); - int64_t enabledMessageTypes() const; - - void addBackend(const std::string& name , std::shared_ptr backend); - bool hasBackend(const std::string& name); - bool removeBackend(const std::string& name); - void removeAllBackends(); - - template - std::shared_ptr getBackend(const std::string& name) const { - auto pair = m_backends.find( name ); - if (pair == m_backends.end()) - throw std::invalid_argument("Invalid backend name: " + name); - else - return std::static_pointer_cast(m_backends.find(name)->second); - } - - template - std::shared_ptr popBackend(const std::string& name) { - auto pair = m_backends.find( name ); - if (pair == m_backends.end()) - throw std::invalid_argument("Invalid backend name: " + name); - else { - std::shared_ptr backend = (*pair).second; - removeBackend( name ); - return std::static_pointer_cast(backend); - } - } - - -private: - void updateGlobalMask( int64_t mask ); - static bool enabledMessageType( int64_t enabledTypes , int64_t messageType); - - int64_t m_globalMask; - int64_t m_enabledTypes; - std::map > m_backends; -}; - -} -#endif diff --git a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/MessageFormatter.hpp b/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/MessageFormatter.hpp deleted file mode 100644 index 9d69ec75ae..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/MessageFormatter.hpp +++ /dev/null @@ -1,95 +0,0 @@ -/* - Copyright 2016 SINTEF ICT, Applied Mathematics. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef OPM_MESSAGEFORMATTER_HEADER_INCLUDED -#define OPM_MESSAGEFORMATTER_HEADER_INCLUDED - -#include -#include - -namespace Opm -{ - - - /// Abstract interface for message formatting classes. - class MessageFormatterInterface - { - public: - /// Virtual destructor to enable inheritance. - virtual ~MessageFormatterInterface() = default; - /// Should return a possibly modified/decorated version of the - /// input string, the formatting applied depending on the - /// message_flag. - virtual std::string format(const int64_t message_flag, const std::string& message) = 0; - }; - - - - - - /// A simple formatter capable of adding message prefixes and colors. - class SimpleMessageFormatter : public MessageFormatterInterface - { - public: - /// Constructor controlling formatting to be applied. - SimpleMessageFormatter(const bool use_prefix, const bool use_color_coding) - : use_color_coding_(use_color_coding) - { - if (use_prefix) { - prefix_flag_ = Log::DefaultMessageTypes; - } - } - - - SimpleMessageFormatter(const int64_t prefix_flag, const bool use_color_coding) - : use_color_coding_(use_color_coding), - prefix_flag_(prefix_flag) - { - } - - - SimpleMessageFormatter(const bool use_color_coding) - : use_color_coding_(use_color_coding) - { - prefix_flag_ = Log::MessageType::Warning + Log::MessageType::Error - + Log::MessageType::Problem + Log::MessageType::Bug; - } - /// Returns a copy of the input string with a flag-dependant - /// prefix (if use_prefix) and the entire message in a - /// flag-dependent color (if use_color_coding). - virtual std::string format(const int64_t message_flag, const std::string& message) override - { - std::string msg = message; - if (message_flag & prefix_flag_) { - msg = Log::prefixMessage(message_flag, msg); - } - if (use_color_coding_) { - msg = Log::colorCodeMessage(message_flag, msg); - } - return msg; - } - private: - bool use_color_coding_ = false; - int64_t prefix_flag_ = 0; - }; - - -} // namespace Opm - -#endif // OPM_MESSAGEFORMATTER_HEADER_INCLUDED diff --git a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/MessageLimiter.hpp b/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/MessageLimiter.hpp deleted file mode 100644 index a991efc375..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/MessageLimiter.hpp +++ /dev/null @@ -1,111 +0,0 @@ -/* - Copyright 2016 SINTEF ICT, Applied Mathematics. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef OPM_MESSAGELIMITER_HEADER_INCLUDED -#define OPM_MESSAGELIMITER_HEADER_INCLUDED - -#include -#include - -namespace Opm -{ - - - /// Handles limiting the number of messages with the same tag. - class MessageLimiter - { - public: - /// Used to indicate no message number limit. - enum { NoLimit = -1 }; - - /// Default constructor, no limit to the number of messages. - MessageLimiter() - : message_limit_(NoLimit) - { - } - - /// Construct with given limit to number of messages with the - /// same tag. - /// - /// Negative limits (including NoLimit) are interpreted as - /// NoLimit, but the default constructor is the preferred way - /// to obtain that behaviour. - explicit MessageLimiter(const int message_limit) - : message_limit_(message_limit < 0 ? NoLimit : message_limit) - { - } - - /// The message limit (same for all tags). - int messageLimit() const - { - return message_limit_; - } - - /// Used for handleMessageTag() return type (see that - /// function). - enum class Response - { - PrintMessage, JustOverLimit, OverLimit - }; - - /// If a tag is empty, there is no message limit or for that - /// tag (count <= limit), respond PrintMessage. - /// If (count == limit + 1), respond JustOverLimit. - /// If (count > limit + 1), respond OverLimit. - Response handleMessageTag(const std::string& tag) - { - if (tag.empty() || message_limit_ == NoLimit) { - return Response::PrintMessage; - } else { - // See if tag already encountered. - auto it = tag_counts_.find(tag); - if (it != tag_counts_.end()) { - // Already encountered this tag. Increment its count. - const int count = ++it->second; - return countBasedResponse(count); - } else { - // First encounter of this tag. Insert 1. - tag_counts_.insert({tag, 1}); - return countBasedResponse(1); - } - } - } - - private: - Response countBasedResponse(const int count) - { - if (count <= message_limit_) { - return Response::PrintMessage; - } else if (count == message_limit_ + 1) { - return Response::JustOverLimit; - } else { - return Response::OverLimit; - } - } - - - int message_limit_; - std::unordered_map tag_counts_; - }; - - - -} // namespace Opm - -#endif // OPM_MESSAGELIMITER_HEADER_INCLUDED diff --git a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/OpmLog.cpp b/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/OpmLog.cpp deleted file mode 100644 index 94c1034270..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/OpmLog.cpp +++ /dev/null @@ -1,189 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include -#include -#include -#include - -namespace Opm { - - - std::shared_ptr OpmLog::getLogger() { - if (!m_logger) - m_logger.reset( new Logger() ); - - return m_logger; - } - - - void OpmLog::addMessage(int64_t messageFlag , const std::string& message) { - if (m_logger) - m_logger->addMessage( messageFlag , message ); - } - - - void OpmLog::addTaggedMessage(int64_t messageFlag, const std::string& tag, const std::string& message) { - if (m_logger) - m_logger->addTaggedMessage( messageFlag, tag, message ); - } - - - void OpmLog::info(const std::string& message) - { - addMessage(Log::MessageType::Info, message); - } - - - void OpmLog::warning(const std::string& message) - { - addMessage(Log::MessageType::Warning, message); - } - - - void OpmLog::problem(const std::string& message) - { - addMessage(Log::MessageType::Problem, message); - } - - - void OpmLog::error(const std::string& message) - { - addMessage(Log::MessageType::Error, message); - } - - - void OpmLog::bug(const std::string& message) - { - addMessage(Log::MessageType::Bug, message); - } - - - void OpmLog::debug(const std::string& message) - { - addMessage(Log::MessageType::Debug, message); - } - - - void OpmLog::note(const std::string& message) - { - addMessage(Log::MessageType::Note, message); - } - - - - void OpmLog::info(const std::string& tag, const std::string& message) - { - addTaggedMessage(Log::MessageType::Info, tag, message); - } - - - void OpmLog::warning(const std::string& tag, const std::string& message) - { - addTaggedMessage(Log::MessageType::Warning, tag, message); - } - - - void OpmLog::problem(const std::string& tag, const std::string& message) - { - addTaggedMessage(Log::MessageType::Problem, tag, message); - } - - - void OpmLog::error(const std::string& tag, const std::string& message) - { - addTaggedMessage(Log::MessageType::Error, tag, message); - } - - - void OpmLog::bug(const std::string& tag, const std::string& message) - { - addTaggedMessage(Log::MessageType::Bug, tag, message); - } - - - void OpmLog::debug(const std::string& tag, const std::string& message) - { - addTaggedMessage(Log::MessageType::Debug, tag, message); - } - - - - void OpmLog::note(const std::string& tag, const std::string& message) - { - addTaggedMessage(Log::MessageType::Note, tag, message); - } - - - - - bool OpmLog::enabledMessageType( int64_t messageType ) { - if (m_logger) - return m_logger->enabledMessageType( messageType ); - else - return Logger::enabledDefaultMessageType( messageType ); - } - - bool OpmLog::hasBackend(const std::string& name) { - if (m_logger) - return m_logger->hasBackend( name ); - else - return false; - } - - - bool OpmLog::removeBackend(const std::string& name) { - if (m_logger) - return m_logger->removeBackend( name ); - else - return false; - } - - - void OpmLog::removeAllBackends() { - if (m_logger) { - m_logger->removeAllBackends(); - } - } - - - void OpmLog::addMessageType( int64_t messageType , const std::string& prefix) { - auto logger = OpmLog::getLogger(); - logger->addMessageType( messageType , prefix ); - } - - - void OpmLog::addBackend(const std::string& name , std::shared_ptr backend) { - auto logger = OpmLog::getLogger(); - return logger->addBackend( name , backend ); - } - - - - void OpmLog::setupSimpleDefaultLogging(const bool use_prefix) - { - std::shared_ptr streamLog = std::make_shared(std::cout, Log::DefaultMessageTypes); - OpmLog::addBackend( "SimpleDefaultLog", streamLog); - streamLog->setMessageLimiter(std::make_shared(10)); - streamLog->setMessageFormatter(std::make_shared(use_prefix, true)); - } -/******************************************************************/ - - std::shared_ptr OpmLog::m_logger; -} diff --git a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/OpmLog.hpp b/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/OpmLog.hpp deleted file mode 100644 index 655da9da11..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/OpmLog.hpp +++ /dev/null @@ -1,93 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef OPMLOG_HPP -#define OPMLOG_HPP - -#include -#include - -#include -#include - -namespace Opm { - - class LogBackend; - -/* - The OpmLog class is a fully static class which manages a proper - Logger instance. -*/ - - -class OpmLog { - -public: - static void addMessage(int64_t messageFlag , const std::string& message); - static void addTaggedMessage(int64_t messageFlag, const std::string& tag, const std::string& message); - - static void info(const std::string& message); - static void warning(const std::string& message); - static void error(const std::string& message); - static void problem(const std::string& message); - static void bug(const std::string& message); - static void debug(const std::string& message); - static void note(const std::string& message); - - static void info(const std::string& tag, const std::string& message); - static void warning(const std::string& tag, const std::string& message); - static void error(const std::string& tag, const std::string& message); - static void problem(const std::string& tag, const std::string& message); - static void bug(const std::string& tag, const std::string& message); - static void debug(const std::string& tag, const std::string& message); - static void note(const std::string& tag, const std::string& message); - - static bool hasBackend( const std::string& backendName ); - static void addBackend(const std::string& name , std::shared_ptr backend); - static bool removeBackend(const std::string& name); - static void removeAllBackends(); - static bool enabledMessageType( int64_t messageType ); - static void addMessageType( int64_t messageType , const std::string& prefix); - static void setupSimpleDefaultLogging(const bool use_prefix); - - template - static std::shared_ptr getBackend(const std::string& name) { - auto logger = OpmLog::getLogger(); - return logger->getBackend(name); - } - - template - static std::shared_ptr popBackend(const std::string& name) { - auto logger = OpmLog::getLogger(); - return logger->popBackend(name); - } - - -private: - static std::shared_ptr getLogger(); - static std::shared_ptr m_logger; -}; - - -} - - - - -#endif diff --git a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/StreamLog.cpp b/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/StreamLog.cpp deleted file mode 100644 index 556856ae87..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/StreamLog.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ -#include -#include - -namespace Opm { - - -StreamLog::StreamLog(const std::string& logFile , int64_t messageMask, bool append) : LogBackend(messageMask) -{ - if (append) { - m_ofstream.open( logFile.c_str() , std::ofstream::app ); - } else { - m_ofstream.open( logFile.c_str() , std::ofstream::out ); - } - m_streamOwner = true; - m_ostream = &m_ofstream; -} - - -StreamLog::StreamLog(std::ostream& os , int64_t messageMask) : LogBackend(messageMask) -{ - m_ostream = &os; - m_streamOwner = false; -} - - -void StreamLog::close() { - if (m_streamOwner && m_ofstream.is_open()) { - m_ofstream.close(); - m_ostream = NULL; - } -} - -void StreamLog::addTaggedMessage(int64_t messageType, const std::string& messageTag, const std::string& message) { - if (includeMessage( messageType, messageTag )) { - (*m_ostream) << formatMessage(messageType, message) << std::endl; - if (m_ofstream.is_open()) { - m_ofstream.flush(); - } - } -} - - -StreamLog::~StreamLog() { - close(); -} - -} diff --git a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/StreamLog.hpp b/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/StreamLog.hpp deleted file mode 100644 index 9e4048de44..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/StreamLog.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef STREAMLOG_H -#define STREAMLOG_H - -#include -#include -#include - -#include - -namespace Opm { - -class StreamLog : public LogBackend { - -public: - StreamLog(const std::string& logFile , int64_t messageMask, bool append = false); - StreamLog(std::ostream& os , int64_t messageMask); - virtual void addTaggedMessage(int64_t messageType, const std::string& messageTag, const std::string& message) override; - ~StreamLog(); - -private: - void close(); - - std::ofstream m_ofstream; - std::ostream * m_ostream; - bool m_streamOwner; -}; -} - -#endif diff --git a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/TimerLog.cpp b/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/TimerLog.cpp deleted file mode 100644 index 8faf279b5a..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/TimerLog.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#include -#include -#include - -#include -#include -#include -#include - - - -namespace Opm { - -TimerLog::TimerLog(const std::string& logFile) : StreamLog( logFile , StopTimer | StartTimer ) -{ - m_work.precision(8); -} - -TimerLog::TimerLog(std::ostream& os) : StreamLog( os , StopTimer | StartTimer ) -{ - m_work.precision(8); -} - - - -void TimerLog::addTaggedMessage(int64_t messageType, const std::string& messageTag, const std::string& msg ) { - if (messageType == StopTimer) { - clock_t stop = clock(); - double secondsElapsed = 1.0 * (m_start - stop) / CLOCKS_PER_SEC ; - - m_work.str(""); - m_work << std::fixed << msg << ": " << secondsElapsed << " seconds "; - StreamLog::addTaggedMessage( messageType, messageTag, m_work.str()); - } else { - if (messageType == StartTimer) - m_start = clock(); - } -} - - - -} // namespace Opm diff --git a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/TimerLog.hpp b/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/TimerLog.hpp deleted file mode 100644 index bfbf5fe8e6..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/opm/common/OpmLog/TimerLog.hpp +++ /dev/null @@ -1,61 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_TIMERLOG_HPP -#define OPM_TIMERLOG_HPP - -#include - -#include -#include -#include - -#include - -/* - This class is a simple demonstration of how the logging framework - can be used to create a simple very special case logging facility. -*/ - -namespace Opm { - -class TimerLog : public StreamLog { -public: - static const int64_t StartTimer = 4096; - static const int64_t StopTimer = 8192; - - TimerLog(const std::string& logFile); - TimerLog(std::ostream& os); - - void addTaggedMessage(int64_t messageFlag, - const std::string& messageTag, - const std::string& message) override; - - void clear(); - ~TimerLog() {}; -private: - clock_t m_start; - std::ostringstream m_work; -}; - -typedef std::shared_ptr TimerLogPtr; -typedef std::shared_ptr TimerLogConstPtr; -} // namespace Opm - -#endif - diff --git a/ThirdParty/custom-opm-common/opm-common/opm/common/data/SimulationDataContainer.cpp b/ThirdParty/custom-opm-common/opm-common/opm/common/data/SimulationDataContainer.cpp deleted file mode 100644 index 3aa288baf7..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/opm/common/data/SimulationDataContainer.cpp +++ /dev/null @@ -1,247 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include - -namespace Opm { - - SimulationDataContainer::SimulationDataContainer(size_t num_cells, size_t num_faces , size_t num_phases) : - m_num_cells( num_cells ), - m_num_faces( num_faces ), - m_num_phases( num_phases ) - { - addDefaultFields( ); - } - - SimulationDataContainer::SimulationDataContainer(const SimulationDataContainer& other) - : m_num_cells(other.m_num_cells), - m_num_faces(other.m_num_faces), - m_num_phases(other.m_num_phases), - m_cell_data(other.m_cell_data), - m_face_data(other.m_face_data) - { - setReferencePointers(); - } - - SimulationDataContainer& SimulationDataContainer::operator=(const SimulationDataContainer& other) - { - SimulationDataContainer copy(other); - copy.swap(*this); - return *this; - } - - - void SimulationDataContainer::swap(SimulationDataContainer& other) - { - using std::swap; - swap(m_num_cells, other.m_num_cells); - swap(m_num_faces, other.m_num_faces); - swap(m_num_phases, other.m_num_phases); - swap(m_cell_data, other.m_cell_data); - swap(m_face_data, other.m_face_data); - setReferencePointers(); - other.setReferencePointers(); - } - - - size_t SimulationDataContainer::numPhases() const { - return m_num_phases; - } - - - size_t SimulationDataContainer::numFaces() const { - return m_num_faces; - } - - size_t SimulationDataContainer::numCells() const { - return m_num_cells; - } - - - bool SimulationDataContainer::hasCellData( const std::string& name ) const { - return ( m_cell_data.find( name ) == m_cell_data.end() ? false : true ); - } - - - std::vector& SimulationDataContainer::getCellData( const std::string& name ) { - auto iter = m_cell_data.find( name ); - if (iter == m_cell_data.end()) { - throw std::invalid_argument("The cell data with name: " + name + " does not exist"); - } else - return iter->second; - } - - - const std::vector& SimulationDataContainer::getCellData( const std::string& name ) const { - auto iter = m_cell_data.find( name ); - if (iter == m_cell_data.end()) { - throw std::invalid_argument("The cell data with name: " + name + " does not exist"); - } else - return iter->second; - } - - - void SimulationDataContainer::registerCellData( const std::string& name , size_t components , double initialValue) { - if (!hasCellData( name )) { - m_cell_data.insert( std::pair>( name , std::vector(components * m_num_cells , initialValue ))); - } - } - - - void SimulationDataContainer::setCellDataComponent( const std::string& key , - size_t component , - const std::vector& cells , - const std::vector& values) { - auto& data = getCellData( key ); - if (component >= m_num_phases) - OPM_THROW(std::invalid_argument, "The component number: " << component << " is invalid"); - - - if (cells.size() != values.size()) - OPM_THROW(std::invalid_argument, "size mismatch between cells and values"); - - // This is currently quite broken; the setCellDataComponent - // method assumes that the number of components in the field - // we are currently focusing on has num_phases components in - // total. This restriction should be lifted by allowing a per - // field number of components. - - if (data.size() != m_num_phases * m_num_cells) - OPM_THROW(std::invalid_argument , "Can currently only be used on fields with num_components == num_phases (i.e. saturation...) "); - - - for (size_t i = 0; i < cells.size(); i++) { - if (size_t(cells[i]) < m_num_cells) { - auto field_index = cells[i] * m_num_phases + component; - data[field_index] = values[i]; - } else { - OPM_THROW(std::invalid_argument , "The cell number: " << cells[i] << " is invalid."); - } - } - } - - - bool SimulationDataContainer::hasFaceData( const std::string& name ) const { - return ( m_face_data.find( name ) == m_face_data.end() ? false : true ); - } - - - std::vector& SimulationDataContainer::getFaceData( const std::string& name ) { - auto iter = m_face_data.find( name ); - if (iter == m_face_data.end()) { - throw std::invalid_argument("The face data with name: " + name + " does not exist"); - } else - return iter->second; - } - - const std::vector& SimulationDataContainer::getFaceData( const std::string& name ) const { - auto iter = m_face_data.find( name ); - if (iter == m_face_data.end()) { - throw std::invalid_argument("The Face data with name: " + name + " does not exist"); - } else - return iter->second; - } - - - void SimulationDataContainer::registerFaceData( const std::string& name , size_t components , double initialValue) { - if (!hasFaceData( name )) { - m_face_data.insert( std::pair>( name , std::vector(components * m_num_faces , initialValue ))); - } - } - - bool SimulationDataContainer::equal( const SimulationDataContainer& other ) const { - if ((m_num_cells != other.m_num_cells) || - (m_num_phases != other.m_num_phases) || - (m_num_faces != other.m_num_faces)) - return false; - - if ((m_face_data.size() != other.m_face_data.size()) || - (m_cell_data.size() != other.m_cell_data.size())) - return false; - - for (const auto& cell_data : m_cell_data) { - const auto key = cell_data.first; - const auto data = cell_data.second; - - if (other.hasCellData( key )) { - const auto& other_data = other.getCellData( key ); - if (!cmp::vector_equal( data , other_data )) - return false; - } else - return false; - } - - for (const auto& face_data : m_face_data) { - const auto key = face_data.first; - const auto data = face_data.second; - - if (other.hasFaceData( key )) { - const auto& other_data = other.getFaceData( key ); - if (!cmp::vector_equal( data , other_data )) - return false; - } else - return false; - } - - return true; - } - - size_t SimulationDataContainer::numCellDataComponents( const std::string& name ) const { - const auto& data = getCellData( name ); - return data.size() / m_num_cells; - } - - - const std::map>& SimulationDataContainer::cellData() const { - return m_cell_data; - } - - std::map>& SimulationDataContainer::cellData() { - return m_cell_data; - } - - // This is very deprecated. - void SimulationDataContainer::addDefaultFields() { - registerCellData("PRESSURE" , 1 , 0.0); - registerCellData("SATURATION" , m_num_phases , 0.0); - registerCellData("TEMPERATURE" , 1 , 273.15 + 20); - - registerFaceData("FACEPRESSURE" , 1 , 0.0 ); - registerFaceData("FACEFLUX" , 1 , 0.0 ); - - setReferencePointers(); - } - - - void SimulationDataContainer::setReferencePointers() - { - // This sets the reference pointers for the fast - // accessors, the fields must be created first - // by copying or a call to addDefaultFields(). - pressure_ref_ = &getCellData("PRESSURE"); - temperature_ref_ = &getCellData("TEMPERATURE"); - saturation_ref_ = &getCellData("SATURATION"); - facepressure_ref_ = &getFaceData("FACEPRESSURE"); - faceflux_ref_ = &getFaceData("FACEFLUX"); - } - - -} // namespace Opm diff --git a/ThirdParty/custom-opm-common/opm-common/opm/common/data/SimulationDataContainer.hpp b/ThirdParty/custom-opm-common/opm-common/opm/common/data/SimulationDataContainer.hpp deleted file mode 100644 index 45ddee3b49..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/opm/common/data/SimulationDataContainer.hpp +++ /dev/null @@ -1,191 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef SIMULATION_DATA_CONTAINER_HPP -#define SIMULATION_DATA_CONTAINER_HPP - -#include -#include -#include -#include - -namespace Opm { - - - /// The SimulationDataContainer is a simple container to manage - /// simulation data. The container is instantiated with information - /// of how many cells, faces and phases are present in the - /// reservoirmodel. You can then add data to the container by using the - /// - /// registerCellData() - /// registerFaceData() - /// - /// functions. The container owns and manages the data, but - /// mutable references are returned with the getCellData() and - /// getFaceData() methods, and the content will typically be - /// modified by external scope. - class SimulationDataContainer - { - public: - /// Main constructor setting the sizes for the contained data - /// types. - /// \param num_cells number of elements in cell data vectors - /// \param num_faces number of elements in face data vectors - /// \param num_phases number of phases, the number of components - /// in any data vector must equal 1 or this - /// number (this behaviour and argument is deprecated). - SimulationDataContainer(size_t num_cells, size_t num_faces, size_t num_phases); - - /// Copy constructor. - /// Must be defined explicitly because class contains non-value objects - /// (the reference pointers pressure_ref_ etc.) that should not simply - /// be copied. - SimulationDataContainer(const SimulationDataContainer&); - - /// Copy assignment operator. - /// Must be defined explicitly because class contains non-value objects - /// (the reference pointers pressure_ref_ etc.) that should not simply - /// be copied. - SimulationDataContainer& operator=(const SimulationDataContainer&); - - /// Efficient O(1) swap. - void swap(SimulationDataContainer& other); - - size_t numPhases() const; - size_t numFaces() const; - size_t numCells() const; - - bool hasCellData( const std::string& name ) const; - - /// Will register a data vector of size numCells() * - /// components. - void registerCellData( const std::string& name , size_t components , double initialValue = 0.0 ); - std::vector& getCellData( const std::string& name ); - const std::vector& getCellData( const std::string& name ) const; - - bool hasFaceData( const std::string& name ) const; - void registerFaceData( const std::string& name , size_t components , double initialValue = 0.0 ); - std::vector& getFaceData( const std::string& name ); - const std::vector& getFaceData( const std::string& name ) const; - - /// Will return the number of components of the celldata with - /// name @name: - /// - /// numCellDataComponents( "PRESSURE" ) -> 1 - /// numCellDataComponents( "SATURATION" ) -> 3 - /// - /// for a three phase model. - size_t numCellDataComponents( const std::string& name ) const; - bool equal(const SimulationDataContainer& other) const; - - - /// Will set the values of component nr @component in the - /// field @key. All the cells in @cells will be set to the - /// values in @values. - void setCellDataComponent( const std::string& key , size_t component , const std::vector& cells , const std::vector& values); - - // Direct explicit field access for certain default fields. - // These methods are all deprecated, and will eventually be moved to - // concrete subclasses. - - std::vector& pressure (); - std::vector& temperature (); - std::vector& saturation (); - - std::vector& facepressure(); - std::vector& faceflux (); - - const std::vector& pressure () const; - const std::vector& temperature () const; - const std::vector& saturation () const; - - const std::vector& facepressure() const; - const std::vector& faceflux () const; - - const std::map>& cellData() const; - std::map>& cellData(); - - private: - void addDefaultFields(); - void setReferencePointers(); - - size_t m_num_cells; - size_t m_num_faces; - size_t m_num_phases; - - std::map< std::string , std::vector > m_cell_data; - std::map< std::string , std::vector > m_face_data; - - std::vector* pressure_ref_; - std::vector* temperature_ref_; - std::vector* saturation_ref_; - std::vector* facepressure_ref_; - std::vector* faceflux_ref_; - }; - - - // Inline implementations of the direct accessors required to guarantee - // performance. - - - inline std::vector& SimulationDataContainer::pressure( ) { - return *pressure_ref_; - } - - inline std::vector& SimulationDataContainer::temperature() { - return *temperature_ref_; - } - - inline std::vector& SimulationDataContainer::saturation() { - return *saturation_ref_; - } - - inline std::vector& SimulationDataContainer::facepressure() { - return *facepressure_ref_; - } - - inline std::vector& SimulationDataContainer::faceflux() { - return *faceflux_ref_; - } - - inline const std::vector& SimulationDataContainer::pressure( ) const { - return *pressure_ref_; - } - - inline const std::vector& SimulationDataContainer::temperature() const { - return *temperature_ref_; - } - - inline const std::vector& SimulationDataContainer::saturation() const { - return *saturation_ref_; - } - - inline const std::vector& SimulationDataContainer::facepressure() const { - return *facepressure_ref_; - } - - inline const std::vector& SimulationDataContainer::faceflux() const { - return *faceflux_ref_; - } - - - -} - -#endif diff --git a/ThirdParty/custom-opm-common/opm-common/opm/common/util/numeric/cmp.hpp b/ThirdParty/custom-opm-common/opm-common/opm/common/util/numeric/cmp.hpp deleted file mode 100644 index 7507125320..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/opm/common/util/numeric/cmp.hpp +++ /dev/null @@ -1,133 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef COMMON_UTIL_NUMERIC_CMP -#define COMMON_UTIL_NUMERIC_CMP - -#include -#include -#include -#include -#include - -namespace Opm { - - /// In the namespace cmp are implemented functions for - /// approximate comparison of double values based on absolute - /// and relative difference. There are three functions: - /// - /// scalar_equal() : Compare two values. - /// - /// ptr_equal(): This compares all the element in the - /// two T * pointers. - /// - /// vector_equal(): This compares all the elements in - /// two std::vector instances. - /// - /// For both vector_equal() and ptr_equal() the - /// actual comparison is based on the scalar_equal() - /// function. All functions exist as two overloads, one which - /// takes explicit input values for the absolute and relative - /// epsilon, and one which uses default values. - /// - /// The comparison functions are implemented as templates, with - /// the following caveats: - /// - /// 1. The static_assert() in scalar_equal ensures that only - /// floating point types can be used. - /// - /// 2. The default epsilon values are of type double - - /// irrespective of the type of data being compared. - /// - /// For more details of floating point comparison please consult - /// this reference: - /// - /// https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/ - - namespace cmp { - - const double default_abs_epsilon = 1e-8; - const double default_rel_epsilon = 1e-5; - - template - bool scalar_equal(T value1, T value2, T abs_eps , T rel_eps) { - static_assert(std::is_floating_point::value, "Function scalar_equal() A can only be instantiated with floating point types"); - - bool equal = true; - T diff = std::fabs(value1 - value2); - if (diff > abs_eps) { - T scale = std::max(std::fabs(value1), std::fabs(value2)); - - if (diff > scale * rel_eps) { - equal = false; - } - } - return equal; - } - - - template - bool scalar_equal(T value1, T value2) { - return scalar_equal( value1 , value2 , default_abs_epsilon , default_rel_epsilon ); - } - - template - bool vector_equal(const std::vector& v1, const std::vector& v2, T abs_eps, T rel_eps) { - if (v1.size() != v2.size()) { - return false; - } - - for (size_t i = 0; i < v1.size(); i++) { - if (!scalar_equal( v1[i], v2[i], abs_eps, rel_eps )) - return false; - } - - return true; - } - - template - bool vector_equal(const std::vector& v1, const std::vector& v2) { - return vector_equal(v1, v2, default_abs_epsilon, default_rel_epsilon); - } - - - template - bool array_equal(const T* p1, const T* p2, size_t num_elements, T abs_eps, T rel_eps) { - if (memcmp(p1 , p2 , num_elements * sizeof * p1) == 0) - return true; - else { - size_t index; - for (index = 0; index < num_elements; index++) { - if (!scalar_equal( p1[index] , p2[index] , abs_eps , rel_eps)) { - return false; - } - } - } - return true; - } - - - template - bool array_equal(const T* p1, const T* p2, size_t num_elements) { - return array_equal(p1, p2, num_elements , default_abs_epsilon, default_rel_epsilon); - } - } -} - -#endif diff --git a/ThirdParty/custom-opm-common/opm-common/opm/common/utility/platform_dependent/disable_warnings.h b/ThirdParty/custom-opm-common/opm-common/opm/common/utility/platform_dependent/disable_warnings.h deleted file mode 100644 index 94acb7a85b..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/opm/common/utility/platform_dependent/disable_warnings.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - Copyright 2014 SINTEF ICT, Applied Mathematics. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -// Note: this file shall not have include guards or #pragma once. - -#ifdef SILENCE_EXTERNAL_WARNINGS - -// To use this feature, we must have sufficiently new compiler. - -// Using gcc is ok if version 4.6 or newer. -#if defined(__GNUC__) -# define __GNUC_VERSION__ (__GNUC__ * 100 \ - + __GNUC_MINOR__ * 1) -# if (__GNUC_VERSION__ >= 406) -# define GNU_COMPILER_OK 1 -# else -# define GNU_COMPILER_OK 0 -# endif -#else -# define GNU_COMPILER_OK 0 -#endif - -// Uncertain what version of clang to require, -// assume all versions are fine. -#if defined(__clang__) -# define CLANG_COMPILER_OK 1 -#else -# define CLANG_COMPILER_OK 0 -#endif - -// More compilers can be added here if necessary. -#define COMPATIBLE_COMPILER (GNU_COMPILER_OK || CLANG_COMPILER_OK) - -// If compiler is compatible, push current warning level -// and ignore warnings that are usually generated from -// third-party libraries that are not warning-clean. -// Note that both clang and (newer) gcc accept the -// "#pragma GCC diagnostic" syntax. -#if COMPATIBLE_COMPILER -#pragma GCC diagnostic push -// Suppress warnings: "unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]". -// This is necessary because not all the compilers have the same warning options. -#pragma GCC diagnostic ignored "-Wpragmas" -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#pragma GCC diagnostic ignored "-Wdeprecated-register" -#pragma GCC diagnostic ignored "-Wignored-qualifiers" -#pragma GCC diagnostic ignored "-Wmismatched-tags" -#pragma GCC diagnostic ignored "-Wshadow" -#pragma GCC diagnostic ignored "-Wsign-compare" -#pragma GCC diagnostic ignored "-Wunused-parameter" -#pragma GCC diagnostic ignored "-Wtautological-compare" -#pragma GCC diagnostic ignored "-Wtype-limits" -#pragma GCC diagnostic ignored "-Wunused-function" -#pragma GCC diagnostic ignored "-Wunneeded-internal-declaration" -#pragma GCC diagnostic ignored "-Wunused-private-field" -#pragma GCC diagnostic ignored "-Wunused-but-set-variable" -#pragma GCC diagnostic ignored "-Wunused-variable" -#pragma GCC diagnostic ignored "-Wunused-local-typedefs" -#pragma GCC diagnostic ignored "-Wcast-align" -#endif // COMPATIBLE_COMPILER - -#endif // SILENCE_EXTERNAL_WARNINGS diff --git a/ThirdParty/custom-opm-common/opm-common/opm/common/utility/platform_dependent/reenable_warnings.h b/ThirdParty/custom-opm-common/opm-common/opm/common/utility/platform_dependent/reenable_warnings.h deleted file mode 100644 index 1967530e3a..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/opm/common/utility/platform_dependent/reenable_warnings.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright 2014 SINTEF ICT, Applied Mathematics. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -// Note: this file shall not have include guards or #pragma once. - -#ifdef SILENCE_EXTERNAL_WARNINGS - -// To use this feature, we must have sufficiently new compiler. - -// Using gcc is ok if version 4.6 or newer. -#if defined(__GNUC__) -# define __GNUC_VERSION__ (__GNUC__ * 100 \ - + __GNUC_MINOR__ * 1) -# if (__GNUC_VERSION__ >= 406) -# define GNU_COMPILER_OK 1 -# else -# define GNU_COMPILER_OK 0 -# endif -#else -# define GNU_COMPILER_OK 0 -#endif - -// Uncertain what version of clang to require, -// assume all versions are fine. -#if defined(__clang__) -# define CLANG_COMPILER_OK 1 -#else -# define CLANG_COMPILER_OK 0 -#endif - -// More compilers can be added here if necessary. -#define COMPATIBLE_COMPILER (GNU_COMPILER_OK || CLANG_COMPILER_OK) - -// If compiler is compatible, pop current warning level. -// Note that both clang and (newer) gcc accept the -// "#pragma GCC diagnostic" syntax. -#if COMPATIBLE_COMPILER -#pragma GCC diagnostic pop -#endif // COMPATIBLE_COMPILER - -#endif // SILENCE_EXTERNAL_WARNINGS diff --git a/ThirdParty/custom-opm-common/opm-common/redhat/opm-common.spec b/ThirdParty/custom-opm-common/opm-common/redhat/opm-common.spec deleted file mode 100644 index a64a57f28b..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/redhat/opm-common.spec +++ /dev/null @@ -1,78 +0,0 @@ -# -# spec file for package opm-common -# - -%define tag rc4 - -Name: opm-common -Version: 2015.10 -Release: 0 -Summary: Open Porous Media - common helpers and buildsystem -License: GPL-3.0 -Group: Development/Libraries/C and C++ -Url: http://www.opm-project.org/ -Source0: https://github.com/OPM/%{name}/archive/release/%{version}/%{tag}.tar.gz#/%{name}-%{version}.tar.gz -BuildRequires: git doxygen bc -%{?el6:BuildRequires: devtoolset-3-toolchain cmake28 boost148-devel} -%{!?el6:BuildRequires: gcc gcc-c++ cmake boost-devel} -BuildRoot: %{_tmppath}/%{name}-%{version}-build - -%description -The Open Porous Media (OPM) initiative provides a set of open-source tools centered around the simulation of flow and transport of fluids in porous media. The goal of the initiative is to establish a sustainable environment for the development of an efficient and well-maintained software suite. - -%package -n libopm-common1 -Summary: OPM-common - library -Group: System/Libraries - -%description -n libopm-common1 -This package contains library for opm-common - -%package devel -Summary: Development and header files for opm-common -Group: Development/Libraries/C and C++ -Requires: %{name} = %{version} - -%description devel -This package contains the development and header files for opm-common - -%package doc -Summary: Documentation files for opm-common -Group: Documentation -BuildArch: noarch - -%description doc -This package contains the documentation files for opm-common - -%prep -%setup -q -n %{name}-release-%{version}-%{tag} - -# consider using -DUSE_VERSIONED_DIR=ON if backporting -%build -%{?el6:scl enable devtoolset-3 bash} -%{?el6:cmake28} %{?!el6:cmake} -DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSTRIP_DEBUGGING_SYMBOLS=ON -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_INSTALL_DOCDIR=share/doc/%{name}-%{version} -DUSE_RUNPATH=OFF %{?el6:-DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-3/root/usr/bin/g++ -DCMAKE_C_COMPILER=/opt/rh/devtoolset-3/root/usr/bin/gcc -DCMAKE_Fortran_COMPILER=/opt/rh/devtoolset-3/root/usr/bin/gfortran -DBOOST_LIBRARYDIR=%{_libdir}/boost148 -DBOOST_INCLUDEDIR=%{_includedir}/boost148} -make - -%install -make install DESTDIR=${RPM_BUILD_ROOT} - -%clean -rm -rf %{buildroot} - -%files -%doc README.md - -%files doc -%{_docdir}/* - -%files -n libopm-common1 -%defattr(-,root,root,-) -%{_libdir}/*.so.* - -%files devel -%defattr(-,root,root,-) -%{_libdir}/dunecontrol/* -%{_libdir}/pkgconfig/* -%{_includedir}/* -%{_datadir}/cmake/* -%{_datadir}/opm/* -%{_libdir}/*.so diff --git a/ThirdParty/custom-opm-common/opm-common/tests/test_OpmLog.cpp b/ThirdParty/custom-opm-common/opm-common/tests/test_OpmLog.cpp deleted file mode 100644 index 20fc43a895..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/tests/test_OpmLog.cpp +++ /dev/null @@ -1,422 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_DYN_LINK -#define BOOST_TEST_MODULE LogTests - -#include -#include -#include - -#include -#include -#include - - -#include -#include -#include -#include -#include -#include - -using namespace Opm; - - -BOOST_AUTO_TEST_CASE(DoLogging) { - OpmLog::addMessage(Log::MessageType::Warning , "Warning1"); - OpmLog::addMessage(Log::MessageType::Warning , "Warning2"); -} - - -BOOST_AUTO_TEST_CASE(Test_Format) { - BOOST_CHECK_EQUAL( "There is a mild fuckup here?\nIn file /path/to/file, line 100\n" , Log::fileMessage("/path/to/file" , 100 , "There is a mild fuckup here?")); - - BOOST_CHECK_EQUAL( "Error: This is the error" , Log::prefixMessage(Log::MessageType::Error , "This is the error")); - BOOST_CHECK_EQUAL( "Warning: This is the warning" , Log::prefixMessage(Log::MessageType::Warning , "This is the warning")); - BOOST_CHECK_EQUAL( "Info: This is the info" , Log::prefixMessage(Log::MessageType::Info , "This is the info")); -} - - - -BOOST_AUTO_TEST_CASE(Test_Logger) { - Logger logger; - std::ostringstream log_stream; - std::shared_ptr counter = std::make_shared(); - std::shared_ptr streamLog = std::make_shared( log_stream , Log::MessageType::Warning ); - BOOST_CHECK_EQUAL( false , logger.hasBackend("NO")); - - logger.addBackend("COUNTER" , counter); - logger.addBackend("STREAM" , streamLog); - BOOST_CHECK_EQUAL( true , logger.hasBackend("COUNTER")); - BOOST_CHECK_EQUAL( true , logger.hasBackend("STREAM")); - - logger.addMessage( Log::MessageType::Error , "Error"); - logger.addMessage( Log::MessageType::Warning , "Warning"); - BOOST_CHECK_EQUAL( 1U , counter->numMessages(Log::MessageType::Error) ); - BOOST_CHECK_EQUAL( 1U , counter->numMessages(Log::MessageType::Warning) ); - BOOST_CHECK_EQUAL( 0U , counter->numMessages(Log::MessageType::Info) ); - - BOOST_CHECK_EQUAL( log_stream.str() , "Warning\n"); - - - BOOST_CHECK_THROW( logger.getBackend("No") , std::invalid_argument ); - { - auto counter2 = logger.getBackend("COUNTER"); - BOOST_CHECK_EQUAL( 1U , counter2->numMessages( Log::MessageType::Warning)); - BOOST_CHECK_EQUAL( 1U , counter2->numMessages( Log::MessageType::Error)); - BOOST_CHECK_EQUAL( 0 , counter2->numMessages( Log::MessageType::Info)); - } - - BOOST_CHECK_EQUAL( false , logger.removeBackend("NO-not-found")); - BOOST_CHECK_EQUAL( true , logger.removeBackend("COUNTER")); - BOOST_CHECK_EQUAL( false , logger.hasBackend("COUNTER") ); - - { - auto stream2 = logger.popBackend("STREAM"); - BOOST_CHECK_EQUAL( false , logger.hasBackend("STREAM") ); - BOOST_CHECK_THROW( logger.popBackend("STREAM") , std::invalid_argument ); - } -} - - -BOOST_AUTO_TEST_CASE(LoggerAddTypes_PowerOf2) { - Logger logger; - int64_t not_power_of2 = 13; - int64_t power_of2 = 4096; - - BOOST_CHECK_THROW( logger.addMessageType( not_power_of2 , "Prefix") , std::invalid_argument); - BOOST_CHECK_THROW( logger.enabledMessageType( not_power_of2 ) , std::invalid_argument); - - logger.addMessageType( power_of2 , "Prefix"); - BOOST_CHECK( logger.enabledMessageType( power_of2 )); - BOOST_CHECK_EQUAL( false , logger.enabledMessageType( 2*power_of2 )); -} - - -class TestLog: public LogBackend { -public: - TestLog( int64_t messageMask ) : LogBackend( messageMask ) - { - m_defaultMessages = 0; - m_specialMessages = 0; - } - - void addTaggedMessage(int64_t messageType , const std::string& /* messageTag */, const std::string& /* message */) { - if (messageType & Log::DefaultMessageTypes) - m_defaultMessages +=1; - else - m_specialMessages += 1; - } - - int m_defaultMessages; - int m_specialMessages; -}; -/* - Testing that the logger frontend does not let unknown message types - pass through; even though the backend has shown interest in the - phony 4096 messagetype. -*/ - -BOOST_AUTO_TEST_CASE(LoggerMasksTypes) { - Logger logger; - int64_t power_of2 = 4096; - - std::shared_ptr testLog = std::make_shared(Log::DefaultMessageTypes + power_of2); - logger.addBackend("TEST" , testLog); - BOOST_CHECK_EQUAL( false , logger.enabledMessageType( power_of2 )); - - logger.addMessage( Log::MessageType::Error , "Error"); - logger.addMessage( Log::MessageType::Warning , "Warning"); - logger.addMessage( Log::MessageType::Info , "Info"); - - BOOST_CHECK_THROW( logger.addMessage( power_of2 , "Blocked message") , std::invalid_argument ); - BOOST_CHECK_EQUAL( testLog->m_defaultMessages , 3 ); - BOOST_CHECK_EQUAL( testLog->m_specialMessages , 0 ); - - logger.addMessageType( power_of2 , "Phony"); - logger.addMessage( power_of2 , "Passing through"); - BOOST_CHECK_EQUAL( testLog->m_specialMessages , 1 ); -} - - - - - -BOOST_AUTO_TEST_CASE(LoggerDefaultTypesEnabled) { - Logger logger; - BOOST_CHECK_EQUAL( logger.enabledMessageTypes() , Log::DefaultMessageTypes); -} - -BOOST_AUTO_TEST_CASE( CounterLogTesting) { - CounterLog counter(Log::DefaultMessageTypes); - - counter.addMessage( Log::MessageType::Error , "This is an error ..."); - counter.addMessage( Log::MessageType::Warning , "This is a warning"); - counter.addMessage( Log::MessageType::Note , "This is a note"); - - BOOST_CHECK_EQUAL(1U , counter.numMessages( Log::MessageType::Error )); - BOOST_CHECK_EQUAL(1U , counter.numMessages( Log::MessageType::Warning )); - BOOST_CHECK_EQUAL(0 , counter.numMessages( Log::MessageType::Info )); - BOOST_CHECK_EQUAL(1U , counter.numMessages( Log::MessageType::Note )); - - { - int64_t not_enabled = 4096; - int64_t not_power2 = 4095; - - BOOST_CHECK_EQUAL( 0 , counter.numMessages( not_enabled )); - BOOST_CHECK_THROW( counter.numMessages( not_power2 ) , std::invalid_argument); - } -} - -BOOST_AUTO_TEST_CASE(TestTimerLog) { - Logger logger; - std::ostringstream sstream; - std::shared_ptr timer = std::make_shared(sstream); - logger.addBackend( "TIMER" , timer ); - logger.addMessageType( TimerLog::StartTimer , "Start"); - logger.addMessageType( TimerLog::StopTimer , "Stop"); - - logger.addMessage( TimerLog::StartTimer , ""); - logger.addMessage( TimerLog::StopTimer , "This was fast"); - std::cout << sstream.str() << std::endl; -} - - -/*****************************************************************/ -void initLogger(std::ostringstream& log_stream); - -void initLogger(std::ostringstream& log_stream) { - std::shared_ptr counter = std::make_shared(); - std::shared_ptr streamLog = std::make_shared( log_stream , Log::MessageType::Warning ); - - BOOST_CHECK_EQUAL( false , OpmLog::hasBackend("NO")); - - OpmLog::addBackend("COUNTER" , counter); - OpmLog::addBackend("STREAM" , streamLog); - BOOST_CHECK_EQUAL( true , OpmLog::hasBackend("COUNTER")); - BOOST_CHECK_EQUAL( true , OpmLog::hasBackend("STREAM")); -} - - - -BOOST_AUTO_TEST_CASE(TestOpmLog) { - std::ostringstream log_stream; - - initLogger(log_stream); - - OpmLog::addMessage( Log::MessageType::Warning , "Warning"); - OpmLog::addMessage( Log::MessageType::Error , "Error"); - - { - auto counter = OpmLog::getBackend("COUNTER"); - - BOOST_CHECK_EQUAL( 1 , counter->numMessages(Log::MessageType::Error) ); - BOOST_CHECK_EQUAL( 1 , counter->numMessages(Log::MessageType::Warning) ); - BOOST_CHECK_EQUAL( 0 , counter->numMessages(Log::MessageType::Info) ); - } - - BOOST_CHECK_EQUAL( log_stream.str() , "Warning\n"); -} - - - -BOOST_AUTO_TEST_CASE(TestHelperFunctions) -{ - using namespace Log; - - // isPower2 - BOOST_CHECK(!isPower2(0)); - BOOST_CHECK(isPower2(1)); - BOOST_CHECK(isPower2(1 << 3)); - BOOST_CHECK(isPower2(1ul << 62)); - - // fileMessage - BOOST_CHECK_EQUAL(fileMessage("foo/bar", 1, "message"), "message\nIn file foo/bar, line 1\n"); - BOOST_CHECK_EQUAL(fileMessage(MessageType::Error, "foo/bar", 1, "message"), "Error: message\nIn file foo/bar, line 1\n"); - - // prefixMessage - BOOST_CHECK_EQUAL(prefixMessage(MessageType::Error, "message"), "Error: message"); - BOOST_CHECK_EQUAL(prefixMessage(MessageType::Info, "message"), "Info: message"); - BOOST_CHECK_EQUAL(prefixMessage(MessageType::Note, "message"), "Note: message"); - - // colorCode Message - BOOST_CHECK_EQUAL(colorCodeMessage(MessageType::Info, "message"), "message"); - BOOST_CHECK_EQUAL(colorCodeMessage(MessageType::Warning, "message"), AnsiTerminalColors::blue_strong + "message" + AnsiTerminalColors::none); - BOOST_CHECK_EQUAL(colorCodeMessage(MessageType::Error, "message"), AnsiTerminalColors::red_strong + "message" + AnsiTerminalColors::none); -} - - - -BOOST_AUTO_TEST_CASE(TestOpmLogWithColors) -{ - OpmLog::removeAllBackends(); - - std::ostringstream log_stream; - - { - std::shared_ptr counter = std::make_shared(); - std::shared_ptr streamLog = std::make_shared(log_stream, Log::DefaultMessageTypes); - BOOST_CHECK_EQUAL( false , OpmLog::hasBackend("NO")); - OpmLog::addBackend("COUNTER" , counter); - OpmLog::addBackend("STREAM" , streamLog); - BOOST_CHECK_EQUAL( true , OpmLog::hasBackend("COUNTER")); - BOOST_CHECK_EQUAL( true , OpmLog::hasBackend("STREAM")); - - streamLog->setMessageFormatter(std::make_shared(false, true)); - } - - OpmLog::warning("Warning"); - OpmLog::error("Error"); - OpmLog::info("Info"); - OpmLog::bug("Bug"); - - const std::string expected = Log::colorCodeMessage(Log::MessageType::Warning, "Warning") + "\n" - + Log::colorCodeMessage(Log::MessageType::Error, "Error") + "\n" - + Log::colorCodeMessage(Log::MessageType::Info, "Info") + "\n" - + Log::colorCodeMessage(Log::MessageType::Bug, "Bug") + "\n"; - - BOOST_CHECK_EQUAL(log_stream.str(), expected); - - { - auto counter = OpmLog::getBackend("COUNTER"); - - BOOST_CHECK_EQUAL( 1 , counter->numMessages(Log::MessageType::Error) ); - BOOST_CHECK_EQUAL( 1 , counter->numMessages(Log::MessageType::Warning) ); - BOOST_CHECK_EQUAL( 1 , counter->numMessages(Log::MessageType::Info) ); - BOOST_CHECK_EQUAL( 1 , counter->numMessages(Log::MessageType::Bug) ); - } - - - std::cout << log_stream.str() << std::endl; -} - - - - -BOOST_AUTO_TEST_CASE(TestOpmLogWithLimits) -{ - OpmLog::removeAllBackends(); - - std::ostringstream log_stream1; - std::ostringstream log_stream2; - - { - std::shared_ptr streamLog1 = std::make_shared(log_stream1, Log::DefaultMessageTypes); - std::shared_ptr streamLog2 = std::make_shared(log_stream2, Log::DefaultMessageTypes); - OpmLog::addBackend("STREAM1" , streamLog1); - OpmLog::addBackend("STREAM2" , streamLog2); - BOOST_CHECK_EQUAL( true , OpmLog::hasBackend("STREAM1")); - BOOST_CHECK_EQUAL( true , OpmLog::hasBackend("STREAM2")); - - streamLog1->setMessageFormatter(std::make_shared(false, true)); - streamLog1->setMessageLimiter(std::make_shared(2)); - streamLog2->setMessageFormatter(std::make_shared(false, true)); - streamLog2->setMessageLimiter(std::make_shared()); // no limit - } - - const std::string tag = "ExampleTag"; - OpmLog::warning(tag, "Warning"); - OpmLog::error("Error"); - OpmLog::info("Info"); - OpmLog::bug("Bug"); - OpmLog::warning(tag, "Warning"); - OpmLog::warning(tag, "Warning"); - OpmLog::warning(tag, "Warning"); - - const std::string expected1 = Log::colorCodeMessage(Log::MessageType::Warning, "Warning") + "\n" - + Log::colorCodeMessage(Log::MessageType::Error, "Error") + "\n" - + Log::colorCodeMessage(Log::MessageType::Info, "Info") + "\n" - + Log::colorCodeMessage(Log::MessageType::Bug, "Bug") + "\n" - + Log::colorCodeMessage(Log::MessageType::Warning, "Warning") + "\n" - + Log::colorCodeMessage(Log::MessageType::Warning, "Message limit reached for message tag: " + tag) + "\n"; - - BOOST_CHECK_EQUAL(log_stream1.str(), expected1); - - const std::string expected2 = Log::colorCodeMessage(Log::MessageType::Warning, "Warning") + "\n" - + Log::colorCodeMessage(Log::MessageType::Error, "Error") + "\n" - + Log::colorCodeMessage(Log::MessageType::Info, "Info") + "\n" - + Log::colorCodeMessage(Log::MessageType::Bug, "Bug") + "\n" - + Log::colorCodeMessage(Log::MessageType::Warning, "Warning") + "\n" - + Log::colorCodeMessage(Log::MessageType::Warning, "Warning") + "\n" - + Log::colorCodeMessage(Log::MessageType::Warning, "Warning") + "\n"; - - BOOST_CHECK_EQUAL(log_stream2.str(), expected2); - - std::cout << log_stream1.str() << std::endl; - std::cout << log_stream2.str() << std::endl; -} - - - - -BOOST_AUTO_TEST_CASE(TestsetupSimpleLog) -{ - bool use_prefix = false; - OpmLog::setupSimpleDefaultLogging(use_prefix); - BOOST_CHECK_EQUAL(true, OpmLog::hasBackend("SimpleDefaultLog")); -} - - - -BOOST_AUTO_TEST_CASE(TestFormat) -{ - OpmLog::removeAllBackends(); - std::ostringstream log_stream1; - std::ostringstream log_stream2; - std::ostringstream log_stream3; - { - std::shared_ptr streamLog1 = std::make_shared(log_stream1, Log::DefaultMessageTypes); - std::shared_ptr streamLog2 = std::make_shared(log_stream2, Log::DefaultMessageTypes); - std::shared_ptr streamLog3 = std::make_shared(log_stream3, Log::DefaultMessageTypes); - OpmLog::addBackend("STREAM1" , streamLog1); - OpmLog::addBackend("STREAM2" , streamLog2); - OpmLog::addBackend("STREAM3" , streamLog3); - BOOST_CHECK_EQUAL( true , OpmLog::hasBackend("STREAM1")); - BOOST_CHECK_EQUAL( true , OpmLog::hasBackend("STREAM2")); - BOOST_CHECK_EQUAL( true , OpmLog::hasBackend("STREAM3")); - streamLog1->setMessageFormatter(std::make_shared(false, true)); - streamLog2->setMessageFormatter(std::make_shared(Log::MessageType::Info, true)); - streamLog3->setMessageFormatter(std::make_shared(false)); - } - - OpmLog::warning("Warning"); - OpmLog::error("Error"); - OpmLog::info("Info"); - OpmLog::bug("Bug"); - - const std::string expected1 = Log::colorCodeMessage(Log::MessageType::Warning, "Warning") + "\n" - + Log::colorCodeMessage(Log::MessageType::Error, "Error") + "\n" - + Log::colorCodeMessage(Log::MessageType::Info, "Info") + "\n" - + Log::colorCodeMessage(Log::MessageType::Bug, "Bug") + "\n"; - - const std::string expected2 = Log::colorCodeMessage(Log::MessageType::Warning, "Warning") + "\n" - + Log::colorCodeMessage(Log::MessageType::Error, "Error") + "\n" - + Log::colorCodeMessage(Log::MessageType::Info, "Info: Info") + "\n" - + Log::colorCodeMessage(Log::MessageType::Bug, "Bug") + "\n"; - - const std::string expected3 = Log::prefixMessage(Log::MessageType::Warning, "Warning") + "\n" - + Log::prefixMessage(Log::MessageType::Error, "Error") + "\n" - + "Info" + "\n" - + Log::prefixMessage(Log::MessageType::Bug, "Bug") + "\n"; - - BOOST_CHECK_EQUAL(log_stream1.str(), expected1); - BOOST_CHECK_EQUAL(log_stream2.str(), expected2); - BOOST_CHECK_EQUAL(log_stream3.str(), expected3); -} diff --git a/ThirdParty/custom-opm-common/opm-common/tests/test_SimulationDataContainer.cpp b/ThirdParty/custom-opm-common/opm-common/tests/test_SimulationDataContainer.cpp deleted file mode 100644 index a10265d149..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/tests/test_SimulationDataContainer.cpp +++ /dev/null @@ -1,207 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - -#define BOOST_TEST_DYN_LINK -#define BOOST_TEST_MODULE SIMULATION_DATA_CONTAINER_TESTS -#include - -#include -#include -#include - -using namespace Opm; - - -BOOST_AUTO_TEST_CASE(TestCreate) { - SimulationDataContainer container(1000 , 10 , 2); - - BOOST_CHECK_EQUAL( 2U , container.numPhases() ); - BOOST_CHECK_EQUAL( 1000U , container.numCells() ); - BOOST_CHECK_EQUAL( 10U , container.numFaces() ); -} - - - - -/* - This test verifies that the default fields are correctly registered; - this special behavior is deprecated - and the test should die; along - with the behavior. -*/ - -BOOST_AUTO_TEST_CASE(TestRegisterDefaults) { - SimulationDataContainer container(1000 , 10 , 2); - - BOOST_CHECK( container.hasCellData("PRESSURE") ); - BOOST_CHECK( container.hasCellData("SATURATION") ); - - { - auto pressure = container.getCellData("PRESSURE"); - BOOST_CHECK_EQUAL( pressure.size() , 1000U ); - BOOST_CHECK_EQUAL( container.numCellDataComponents( "PRESSURE") , 1U); - - auto sat = container.getCellData("SATURATION"); - BOOST_CHECK_EQUAL( sat.size() , 1000U*2 ); - BOOST_CHECK_EQUAL( container.numCellDataComponents( "SATURATION") , 2U); - } - - { - auto pressure = container.pressure(); - BOOST_CHECK_EQUAL( pressure.size() , 1000U ); - - auto sat = container.saturation(); - BOOST_CHECK_EQUAL( sat.size() , 1000U*2 ); - } - - BOOST_CHECK( container.hasFaceData("FACEPRESSURE") ); - BOOST_CHECK( container.hasFaceData("FACEFLUX") ); -} - - - - -BOOST_AUTO_TEST_CASE(TestRegisterFaceData) { - SimulationDataContainer container(100 , 10 , 2); - BOOST_CHECK( !container.hasFaceData("FLUX")); - BOOST_CHECK_THROW( container.getFaceData("FLUX") , std::invalid_argument ); - - container.registerFaceData("FLUX" , 1 , 99 ); - auto& flux = container.getFaceData("FLUX"); - BOOST_CHECK_EQUAL( flux.size() , 10U ); - BOOST_CHECK_EQUAL( flux[0] , 99 ); -} - - - -BOOST_AUTO_TEST_CASE(TestRegisterCellData) { - - SimulationDataContainer container(100 , 10 , 2); - BOOST_CHECK( !container.hasCellData("FIELDX")); - BOOST_CHECK_THROW( container.getCellData("FIELDX") , std::invalid_argument ); - - container.registerCellData("FIELDX" , 1 , 123 ); - { - auto& fieldx = container.getCellData("FIELDX"); - BOOST_CHECK_EQUAL( fieldx.size() , 100U ); - for (auto v : fieldx) - BOOST_CHECK_EQUAL( v , 123 ); - - fieldx[0] *= 2; - } - - { - auto fieldx = container.getCellData("FIELDX"); - BOOST_CHECK_EQUAL( fieldx[0] , 246 ); - BOOST_CHECK_EQUAL( fieldx[1] , 123 ); - } - -} - - -BOOST_AUTO_TEST_CASE(Test_Equal) { - { - SimulationDataContainer container1(100 , 10 , 2); - SimulationDataContainer container2(100 , 10 , 2); - BOOST_CHECK( container1.equal( container2 )); - } - - { - SimulationDataContainer container1(100 , 10 , 2); - SimulationDataContainer container2(100 , 10 , 1); - BOOST_CHECK( !container1.equal( container2 )); - } - - { - SimulationDataContainer container1(100 , 10 , 2); - SimulationDataContainer container2(100 , 10 , 2); - - container1.registerCellData( "FIELDX" , 1 , 123 ); - BOOST_CHECK( !container1.equal( container2 )); - container2.registerCellData( "FIELDX" , 1 , 123 ); - BOOST_CHECK( container1.equal( container2 )); - - container1.registerFaceData( "FACEX" , 1 , 123 ); - BOOST_CHECK( !container1.equal( container2 )); - container2.registerFaceData( "FACEX" , 1 , 123 ); - BOOST_CHECK( container1.equal( container2 )); - } - - { - SimulationDataContainer container1(100 , 10 , 2); - SimulationDataContainer container2(100 , 10 , 2); - - container1.registerCellData( "FIELD1" , 1 , 123 ); - container2.registerCellData( "FIELD2" , 1 , 123 ); - BOOST_CHECK( !container1.equal( container2 )); - } - - { - SimulationDataContainer container1(100 , 10 , 2); - SimulationDataContainer container2(100 , 10 , 2); - - container1.registerFaceData( "FIELD1" , 1 , 123 ); - container2.registerFaceData( "FIELD2" , 1 , 123 ); - BOOST_CHECK( !container1.equal( container2 )); - } - - { - SimulationDataContainer container1(100 , 10 , 2); - SimulationDataContainer container2(100 , 10 , 2); - - container1.registerFaceData( "FIELD1" , 1 , 123 ); - container2.registerFaceData( "FIELD1" , 1 , 123 ); - BOOST_CHECK( container1.equal( container2 )); - - std::vector& f = container1.getFaceData( "FIELD1" ); - f[0] *= 1.1; - BOOST_CHECK( !container1.equal( container2 )); - } -} - - - -BOOST_AUTO_TEST_CASE(TestSetComponent) { - - SimulationDataContainer container(100 , 10 , 2); - container.registerCellData("FIELDX" , 2 , 123 ); - std::vector cells = { 1,2,3}; - std::vector cells2 = { 1,2,3,4}; - std::vector cells3 = { 1,2,100}; - std::vector values0 = {20,30,40}; - std::vector values1 = {2,3,4}; - - BOOST_CHECK_THROW( container.setCellDataComponent( "FIELDY" , 0 , cells , values0 ) , std::invalid_argument ); - BOOST_CHECK_THROW( container.setCellDataComponent( "FIELDX" , 2 , cells , values0 ) , std::invalid_argument ); - BOOST_CHECK_THROW( container.setCellDataComponent( "FIELDX" , 0 , cells2 , values0 ) , std::invalid_argument ); - BOOST_CHECK_THROW( container.setCellDataComponent( "FIELDX" , 0 , cells3 , values0 ) , std::invalid_argument ); - - container.setCellDataComponent( "FIELDX" , 0 , cells , values0 ); - container.setCellDataComponent( "FIELDX" , 1 , cells , values1 ); - const auto& data = container.getCellData( "FIELDX" ); - - BOOST_CHECK_EQUAL( data[1*2 + 1] , 2 ); - BOOST_CHECK_EQUAL( data[2*2 + 1] , 3 ); - BOOST_CHECK_EQUAL( data[3*2 + 1] , 4 ); - - BOOST_CHECK_EQUAL( data[1*2] , 20 ); - BOOST_CHECK_EQUAL( data[2*2] , 30 ); - BOOST_CHECK_EQUAL( data[3*2] , 40 ); - -} diff --git a/ThirdParty/custom-opm-common/opm-common/tests/test_cmp.cpp b/ThirdParty/custom-opm-common/opm-common/tests/test_cmp.cpp deleted file mode 100644 index cc9214e6fc..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/tests/test_cmp.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - -#define BOOST_TEST_DYN_LINK -#define BOOST_TEST_MODULE FLOAT_CMP_TESTS -#include - -#include - -#include - -using namespace Opm; - -/** - Ahhh - the joys of comparing floating point numbers .... - - http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm -*/ - -BOOST_AUTO_TEST_CASE(TestSCalarcmp) { - const double abs_epsilon = cmp::default_abs_epsilon; - const double rel_epsilon = cmp::default_rel_epsilon; - - BOOST_CHECK( cmp::scalar_equal(1,1)); - BOOST_CHECK_EQUAL( false , cmp::scalar_equal(1,0)); - BOOST_CHECK_EQUAL( false , cmp::scalar_equal(0,1)); - BOOST_CHECK_EQUAL( false , cmp::scalar_equal(-1,1)); - - - - double v1,v2; - /* Should be equal: */ - { - v1 = 0.0; - v2 = 0.0; - BOOST_CHECK( cmp::scalar_equal( v1 , v2)); - - v1 = 1e-12; - v2 = v1 + 0.5*abs_epsilon; - BOOST_CHECK( cmp::scalar_equal( v1 , v2)); - - v1 = 7.0; - v2 = 7.0; - BOOST_CHECK( cmp::scalar_equal( v1 , v2)); - - v1 = -7.0; - v2 = -7.0; - BOOST_CHECK( cmp::scalar_equal( v1 , v2)); - - v1 = 0; - v2 = 0.5 * abs_epsilon; - BOOST_CHECK( cmp::scalar_equal( v1 , v2)); - - - v1 = 1e7; - v2 = 1e7 + 2*abs_epsilon; - BOOST_CHECK( cmp::scalar_equal( v1 , v2 )); - - v1 = 1e7*(1 - abs_epsilon); - v2 = 1e7*(1 + rel_epsilon); - BOOST_CHECK( !cmp::scalar_equal( v1 , v2 )); - - v1 = 1e7*(1 + abs_epsilon); - v2 = 1e7*(1 + rel_epsilon); - BOOST_CHECK( cmp::scalar_equal( v1 , v2 )); - } - - /* Should be different: */ - { - v1 = 0; - v2 = 1.5 * abs_epsilon; - BOOST_CHECK( !cmp::scalar_equal( v1 , v2 )); - - v1 = 1e-8; - v2 = v1 + 1.5*abs_epsilon; - BOOST_CHECK( !cmp::scalar_equal( v1 , v2 )); - - v1 = 1; - v2 = v1*(1 + 2*rel_epsilon + abs_epsilon); - BOOST_CHECK( !cmp::scalar_equal( v1 , v2 )); - - v1 = 10; - v2 = v1*(1 + 2*rel_epsilon + abs_epsilon); - BOOST_CHECK( !cmp::scalar_equal( v1 , v2 )); - - v1 = 1e7; - v2 = 1e7*(1 + 2*rel_epsilon + abs_epsilon); - BOOST_CHECK( !cmp::scalar_equal( v1 , v2 )); - } -} - -/* Ensure that float instantiation works. */ -BOOST_AUTO_TEST_CASE(TestFloatcmp) { - std::vector v1; - std::vector v2; - for (size_t i =0; i < 10; i++) { - v1.push_back( i * 1.0 ); - v2.push_back( i * 1.0 ); - } - BOOST_CHECK( cmp::vector_equal(v1 , v2 )); - v1.push_back( 27 ); - BOOST_CHECK( !cmp::vector_equal(v1 , v2 )); - v2.push_back( 27 ); - BOOST_CHECK( cmp::vector_equal(v1 , v2 )); -} - diff --git a/ThirdParty/custom-opm-common/opm-common/tests/test_messagelimiter.cpp b/ThirdParty/custom-opm-common/opm-common/tests/test_messagelimiter.cpp deleted file mode 100644 index b076f951f5..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/tests/test_messagelimiter.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - Copyright 2016 SINTEF ICT, Applied Mathematics. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#define BOOST_TEST_DYN_LINK -#define BOOST_TEST_MODULE MESSAGELIMITER_TESTS - -#include -#include -#include - -#include - - -using namespace Opm; - - -BOOST_AUTO_TEST_CASE(ConstructionAndLimits) -{ - MessageLimiter m1; - BOOST_CHECK_EQUAL(m1.messageLimit(), MessageLimiter::NoLimit); - MessageLimiter m2(0); - BOOST_CHECK_EQUAL(m2.messageLimit(), 0); - MessageLimiter m3(1); - BOOST_CHECK_EQUAL(m3.messageLimit(), 1); - MessageLimiter m4(-4); - BOOST_CHECK_EQUAL(m4.messageLimit(), MessageLimiter::NoLimit); -} - -BOOST_AUTO_TEST_CASE(Response) -{ - { - // No limits. - MessageLimiter m; - BOOST_CHECK(m.handleMessageTag("tag1") == MessageLimiter::Response::PrintMessage); - BOOST_CHECK(m.handleMessageTag("tag2") == MessageLimiter::Response::PrintMessage); - BOOST_CHECK(m.handleMessageTag("tag1") == MessageLimiter::Response::PrintMessage); - BOOST_CHECK(m.handleMessageTag("tag2") == MessageLimiter::Response::PrintMessage); - BOOST_CHECK(m.handleMessageTag("tag1") == MessageLimiter::Response::PrintMessage); - BOOST_CHECK(m.handleMessageTag("tag2") == MessageLimiter::Response::PrintMessage); - } - - { - // Limit == 0. - MessageLimiter m(0); - BOOST_CHECK(m.handleMessageTag("tag1") == MessageLimiter::Response::JustOverLimit); - BOOST_CHECK(m.handleMessageTag("tag2") == MessageLimiter::Response::JustOverLimit); - BOOST_CHECK(m.handleMessageTag("tag1") == MessageLimiter::Response::OverLimit); - BOOST_CHECK(m.handleMessageTag("tag2") == MessageLimiter::Response::OverLimit); - BOOST_CHECK(m.handleMessageTag("tag1") == MessageLimiter::Response::OverLimit); - BOOST_CHECK(m.handleMessageTag("tag2") == MessageLimiter::Response::OverLimit); - } - - { - // Limit == 1. - MessageLimiter m(1); - BOOST_CHECK(m.handleMessageTag("tag1") == MessageLimiter::Response::PrintMessage); - BOOST_CHECK(m.handleMessageTag("tag2") == MessageLimiter::Response::PrintMessage); - BOOST_CHECK(m.handleMessageTag("tag1") == MessageLimiter::Response::JustOverLimit); - BOOST_CHECK(m.handleMessageTag("tag2") == MessageLimiter::Response::JustOverLimit); - BOOST_CHECK(m.handleMessageTag("tag1") == MessageLimiter::Response::OverLimit); - BOOST_CHECK(m.handleMessageTag("tag2") == MessageLimiter::Response::OverLimit); - } -} diff --git a/ThirdParty/custom-opm-common/opm-common/travis/build-and-test-opm-common.sh b/ThirdParty/custom-opm-common/opm-common/travis/build-and-test-opm-common.sh deleted file mode 100644 index ce845df982..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/travis/build-and-test-opm-common.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -set -e - -pushd . > /dev/null -opm-common/travis/build-opm-common.sh -cd opm-common/build -ctest --output-on-failure -popd > /dev/null diff --git a/ThirdParty/custom-opm-common/opm-common/travis/build-and-test.sh b/ThirdParty/custom-opm-common/opm-common/travis/build-and-test.sh deleted file mode 100644 index ba9efd6aed..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/travis/build-and-test.sh +++ /dev/null @@ -1,90 +0,0 @@ -#!/bin/bash -set -e - -build_order=(opm-common opm-parser opm-material opm-output opm-core opm-grid ewoms opm-simulators opm-upscaling) - -# This shell script should be started with the name of a module as -# only only command line argument. It will start by building all -# upstream modules, then it will build and test the module of interest -# and all downstream modules. -# -# Before invoking this script all the modules should have been cloned -# in sibling directories, so that this script will see this directory -# structure: -# -# opm-common/ -# opm-parser/ -# opm-material/ -# opm-output/ -# opm-core/ -# opm-grid/ -# opm-simulators/ -# opm-upscaling/ -# -# -# This can typically be achived by using the 'clone-opm.sh' script. - - -function upstream_build { - project=${1} - echo "Building: ${project}" - mkdir -p ${project}/build - pushd ${project}/build > /dev/null - cmake ../ -DENABLE_PYTHON=ON -DBUILD_TESTING=OFF -DSILENCE_EXTERNAL_WARNINGS=True -DUSE_QUADMATH=OFF -DADD_DISABLED_CTESTS=OFF - make - popd > /dev/null -} - - -function downstream_build_and_test { - project=${1} - echo "Building and testing: ${project}" - mkdir -p ${project}/build - pushd ${project}/build > /dev/null - # The build commands cmake, make and ctest must be given as - # separate commands and not chained with &&. If chaining with && - # is used the 'set -e' does not exit on first error. - cmake ../ -DENABLE_PYTHON=ON -DBUILD_TESTING=ON -DSILENCE_EXTERNAL_WARNINGS=True -DUSE_QUADMATH=OFF -DADD_DISABLED_CTESTS=OFF - make - ctest --output-on-failure - popd > /dev/null -} - -#----------------------------------------------------------------- - -export CONDA_HOME="$HOME/miniconda" -export PATH="$CONDA_HOME/bin:$PATH" - - -for i in "${!build_order[@]}"; do - if [[ "${build_order[$i]}" = "$1" ]]; then - project_index=$i - fi -done - -if [[ -z ${project_index} ]]; then - echo "${0}: Project: ${1} not recognized." - exit 1 -fi - - - -build_index=0 - - -while [ $build_index -lt ${project_index} ]; -do - project=${build_order[$build_index]} - upstream_build ${project} - build_index=$((build_index + 1)) -done - - - -while [ $build_index -lt ${#build_order[@]} ] -do - project=${build_order[$build_index]} - downstream_build_and_test ${project} - build_index=$((build_index + 1)) -done - diff --git a/ThirdParty/custom-opm-common/opm-common/travis/build-opm-common-shared.sh b/ThirdParty/custom-opm-common/opm-common/travis/build-opm-common-shared.sh deleted file mode 100644 index b0568fc069..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/travis/build-opm-common-shared.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -set -e - -pushd . > /dev/null -cd opm-common -mkdir build -cd build -cmake ../ -DBUILD_SHARED_LIBS=ON -make -popd > /dev/null diff --git a/ThirdParty/custom-opm-common/opm-common/travis/build-opm-common.sh b/ThirdParty/custom-opm-common/opm-common/travis/build-opm-common.sh deleted file mode 100644 index e8a452b85f..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/travis/build-opm-common.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -set -e - -pushd . > /dev/null -cd opm-common -mkdir build -cd build -cmake ../ -make -popd > /dev/null diff --git a/ThirdParty/custom-opm-common/opm-common/travis/build-prereqs.sh b/ThirdParty/custom-opm-common/opm-common/travis/build-prereqs.sh deleted file mode 100644 index 323975022f..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/travis/build-prereqs.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/bash -set -e - -# This script should build all the OPM dependencies which are installed from source. - - -# The build_dune function should take the module name as the first -# argument. By default the script will clone the source from: -# -# https://github.com/dune-project/${project}.git -# -# But you can optionally supply a git url as second argument, i.e. -# -# build_dune dune-alugrid https://gitlab.dune-project.org/extensions/dune-alugrid.git -# -# to build the dune-alugrid module which is not found at github. - -function build_dune { - project=$1 - if [[ $# -eq 1 ]]; then - url=https://github.com/dune-project/${project}.git - else - url=$2 - fi - pushd . > /dev/null - git clone ${url} - cd ${project} - git checkout tags/v2.3.1 - mkdir build - cd build - cmake ../ - make - popd > /dev/null -} - - - -function build_superlu { - pushd . > /dev/null - git clone https://github.com/starseeker/SuperLU.git - cd SuperLU - mkdir build - cd build - cmake -D CMAKE_INSTALL_PREFIX=.. -D SUPERLU_BUILD_EXAMPLES=OFF -D SUPERLU_ENABLE_TESTING=OFF ../ - make install - popd > /dev/null -} - - -function install_python_deps { - export TRAVIS_PYTHON_VERSION="2.7" - wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh; - - bash miniconda.sh -b -p $HOME/miniconda - export CONDA_HOME="$HOME/miniconda" - export PATH="$CONDA_HOME/bin:$PATH" - hash -r - conda config --set always_yes yes --set changeps1 no - conda update -q conda - - conda install numpy -} - - -function build_ert { - install_python_deps - git clone https://github.com/Ensembles/ert.git - mkdir -p ert/build - pushd ert/build > /dev/null - cmake .. && make - popd > /dev/null -} - - -################################################################# - -build_superlu -build_ert - -build_dune dune-common -build_dune dune-istl -build_dune dune-geometry -build_dune dune-grid -build_dune dune-localfunctions diff --git a/ThirdParty/custom-opm-common/opm-common/travis/clone-opm.sh b/ThirdParty/custom-opm-common/opm-common/travis/clone-opm.sh deleted file mode 100644 index 5223cc4ee8..0000000000 --- a/ThirdParty/custom-opm-common/opm-common/travis/clone-opm.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -set -e - -project_list=(opm-data opm-parser opm-material ewoms opm-core opm-output opm-grid opm-simulators opm-upscaling) - -# Will clone all the projects *except* the one project given as -# commandline argument; that has typically been checked out by travis -# already. Will not clone opm-commone because that should already be -# present, either because it is the current repository - or because -# that must be cloned specifically from the other modules first. - - -function clone_project { - url=https://github.com/OPM/${1}.git - git clone $url -} - - -for project in "${project_list[@]}"; do - if [ "$project" != $1 ]; then - clone_project $project - fi -done - - - diff --git a/ThirdParty/custom-opm-flowdiag-app/CMakeLists.txt b/ThirdParty/custom-opm-flowdiag-app/CMakeLists.txt new file mode 100644 index 0000000000..cd458bfda0 --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/CMakeLists.txt @@ -0,0 +1,29 @@ +cmake_minimum_required (VERSION 2.8) + +project (custom-opm-flowdiag-app) + +include_directories( + ../custom-opm-flowdiagnostics/opm-flowdiagnostics + opm-flowdiagnostics-applications + opmCore + ${ERT_INCLUDE_DIRS} + ${boost-Subset_SOURCE_DIR} +) + +include (opm-flowdiagnostics-applications/CMakeLists_files.cmake) + +set(project_source_files + ${MAIN_SOURCE_FILES} + ${PUBLIC_HEADER_FILES} +) + +foreach (file ${project_source_files} ) + list(APPEND project_source_files_complete_path1 "opm-flowdiagnostics-applications/${file}" ) +endforeach() + +add_definitions(-DHAVE_ERT_ECL_TYPE_H) + +add_library(custom-opm-flowdiag-app + ${project_source_files_complete_path1} +) + diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/.gitignore b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/.gitignore new file mode 100644 index 0000000000..032094fc9f --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/.gitignore @@ -0,0 +1,66 @@ +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app + +# Editor backup files +*~ +.\#* +\#*\# +.\#*\# + +# Eclipse project settings +.cproject +.project +.settings/* + +# QtCreator project settings +CMakeLists.txt.user* + +# In-tree build with CMake +CMakeCache.txt +CMakeFiles/ +cmake_install.cmake +config.h +opm-flowdiagnostics-applications-config.cmake +opm-flowdiagnostics-applications-config-version.cmake +opm-flowdiagnostics-applications-install.cmake +Makefile +bin/ +lib/ +Doxyfile +Documentation/html +*.pc +install_manifest.txt + +# Testing framework +CTestTestfile.cmake +DartConfiguration.tcl +Testing/ +.DS_Store +.idea +build diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/AcceptanceTests.cmake b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/AcceptanceTests.cmake new file mode 100644 index 0000000000..debbfb1856 --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/AcceptanceTests.cmake @@ -0,0 +1,58 @@ +# Set absolute tolerance to be used for testing +Set (abs_tol 5.0e-8) +Set (rel_tol 1.0e-13) + +# Input: +# - casename: with or without extension +# +Macro (add_acceptance_test casename) + + String (REGEX REPLACE "\\.[^.]*$" "" basename "${casename}") + + Add_Test (NAME ToF_accept_${casename}_all_steps + COMMAND runAcceptanceTest + "case=${OPM_DATA_ROOT}/flow_diagnostic_test/eclipse-simulation/${basename}" + "ref-dir=${OPM_DATA_ROOT}/flow_diagnostic_test/fd-ref-data/${basename}" + "atol=${abs_tol}" "rtol=${rel_tol}") + +EndMacro (add_acceptance_test) + +# Input +# - casename: with or without extension +# +Macro (add_trans_acceptance_test casename) + + String (REGEX REPLACE "\\.[^.]*$" "" basename "${casename}") + + Add_Test (NAME Trans_accept_${casename} + COMMAND runTransTest + "case=${OPM_DATA_ROOT}/flow_diagnostic_test/eclipse-simulation/${basename}" + "ref-dir=${OPM_DATA_ROOT}/flow_diagnostic_test/fd-ref-data/${basename}" + "atol=${abs_tol}" "rtol=${rel_tol}") + +EndMacro (add_trans_acceptance_test) + +# Input +# - casename: with or without extension +# - strings identifying which physical quantities to compare +Macro (add_celldata_acceptance_test casename) + + String (REGEX REPLACE "\\.[^.]*$" "" basename "${casename}") + + Add_Test (NAME CellData_accept_${casename} + COMMAND runLinearisedCellDataTest + "case=${OPM_DATA_ROOT}/flow_diagnostic_test/eclipse-simulation/${basename}" + "ref-dir=${OPM_DATA_ROOT}/flow_diagnostic_test/fd-ref-data/${basename}" + "quant=${ARGN}" "atol=${abs_tol}" "rtol=${rel_tol}") + +EndMacro (add_celldata_acceptance_test) + +If (NOT TARGET test-suite) + Add_Custom_Target (test-suite) +EndIf () + +# Acceptance tests + +Add_Acceptance_Test (SIMPLE_2PH_W_FAULT_LGR) +Add_Trans_Acceptance_Test (SIMPLE_2PH_W_FAULT_LGR) +Add_CellData_Acceptance_Test (SIMPLE_2PH_W_FAULT_LGR "pressure") diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/CMakeLists.txt b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/CMakeLists.txt new file mode 100644 index 0000000000..a34a4a9b59 --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/CMakeLists.txt @@ -0,0 +1,130 @@ +# -*- mode: cmake; tab-width: 2; indent-tabs-mode: t; truncate-lines: t; compile-command: "cmake -Wdev" -*- +# vim: set filetype=cmake autoindent tabstop=2 shiftwidth=2 noexpandtab softtabstop=2 nowrap: + +########################################################################### +# # +# Note: The bulk of the build system is located in the cmake/ directory. # +# This file only contains the specializations for this particular # +# project. Most likely you are interested in editing one of these # +# files instead: # +# # +# dune.module Name and version number # +# CMakeLists_files.cmake Path of source files # +# cmake/Modules/${project}-prereqs.cmake Dependencies # +# # +########################################################################### + +cmake_minimum_required (VERSION 2.8) + +# additional search modules +set(OPM_COMMON_ROOT "" CACHE PATH "Root directory containing OPM related cmake modules") +option(SIBLING_SEARCH "Search for other modules in sibling directories?" ON) + +if (NOT OPM_COMMON_ROOT) + find_package(opm-common QUIET) +endif() + +if (opm-common_FOUND) + include(OpmInit) +else() + unset(opm-common_FOUND) + + if (NOT OPM_COMMON_ROOT AND SIBLING_SEARCH) + set(OPM_COMMON_ROOT ${PROJECT_SOURCE_DIR}/../opm-common) + endif() + + if (OPM_COMMON_ROOT) + list(APPEND CMAKE_MODULE_PATH "${OPM_COMMON_ROOT}/cmake/Modules") + include (OpmInit OPTIONAL RESULT_VARIABLE OPM_INIT) + set(OPM_MACROS_ROOT ${OPM_COMMON_ROOT}) + endif() + + if (NOT OPM_INIT) + message("" ) + message(" /---------------------------------------------------------------------------------\\") + message(" | Could not locate the opm build macros. The opm build macros |") + message(" | are in a separate repository - instructions to proceed: |") + message(" | |") + message(" | 1. Clone the repository: git clone git@github.com:OPM/opm-common.git |") + message(" | |") + message(" | 2. Run cmake in the current project with -DOPM_COMMON_ROOT=/opm-common |") + message(" | |") + message(" \\---------------------------------------------------------------------------------/") + message("" ) + message(FATAL_ERROR "Could not find OPM Macros") + endif() +endif() + +# not the same location as most of the other projects; this hook overrides +macro (dir_hook) +endmacro (dir_hook) + +# Look for the opm-data repository; if found the variable +# HAVE_OPM_DATA will be set to true. +include (Findopm-data) + +# list of prerequisites for this particular project; this is in a +# separate file (in cmake/Modules sub-directory) because it is shared +# with the find module +include (${project}-prereqs) + +# read the list of components from this file (in the project directory); +# it should set various lists with the names of the files to include +include (CMakeLists_files.cmake) + +macro (config_hook) + if (NOT ERT_FOUND) + set (HAVE_ERT_ECL_TYPE_H 0) + else () + # ERT_FOUND + cmake_push_check_state () + + set (CMAKE_REQUIRED_INCLUDES ${ERT_INCLUDE_DIR}) + set (CMAKE_REQUIRED_LIBRARIES ${ERT_LIBRARIES}) + + check_cxx_source_compiles ( +" +#include + +#include +#include + +int main () +{ + ecl_kw_type* kw = nullptr; + + std::cout << ecl_type_get_type(ecl_kw_get_data_type(kw)) << std::endl; +} +" + HAVE_ERT_ECL_TYPE_H) + + cmake_pop_check_state () + endif () + + list (APPEND "${project}_CONFIG_VARS" HAVE_ERT_ECL_TYPE_H) +endmacro (config_hook) + +macro (prereqs_hook) +endmacro (prereqs_hook) + +macro (sources_hook) +endmacro (sources_hook) + +macro (fortran_hook) +endmacro (fortran_hook) + +macro (files_hook) +endmacro (files_hook) + +macro (tests_hook) +endmacro (tests_hook) + +macro (install_hook) +endmacro (install_hook) + +# all setup common to the OPM library modules is done here +include (OpmLibMain) + +if (HAVE_OPM_DATA) + include (${CMAKE_CURRENT_SOURCE_DIR}/AcceptanceTests.cmake) +endif() diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/CMakeLists_files.cmake b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/CMakeLists_files.cmake new file mode 100644 index 0000000000..18f440371b --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/CMakeLists_files.cmake @@ -0,0 +1,61 @@ +# This file sets up five lists: +# MAIN_SOURCE_FILES List of compilation units which will be included in +# the library. If it isn't on this list, it won't be +# part of the library. Please try to keep it sorted to +# maintain sanity. +# +# TEST_SOURCE_FILES List of programs that will be run as unit tests. +# +# TEST_DATA_FILES Files from the source three that should be made +# available in the corresponding location in the build +# tree in order to run tests there. +# +# EXAMPLE_SOURCE_FILES Other programs that will be compiled as part of the +# build, but which is not part of the library nor is +# run as tests. +# +# PUBLIC_HEADER_FILES List of public header files that should be +# distributed together with the library. The source +# files can of course include other files than these; +# you should only add to this list if the *user* of +# the library needs it. + +list (APPEND MAIN_SOURCE_FILES + opm/utility/ECLEndPointScaling.cpp + opm/utility/ECLFluxCalc.cpp + opm/utility/ECLGraph.cpp + opm/utility/ECLPropTable.cpp + opm/utility/ECLResultData.cpp + opm/utility/ECLSaturationFunc.cpp + opm/utility/ECLUnitHandling.cpp + opm/utility/ECLWellSolution.cpp + ) + +list (APPEND TEST_SOURCE_FILES + tests/test_eclendpointscaling.cpp + tests/test_eclproptable.cpp + tests/test_eclunithandling.cpp + ) + +list (APPEND EXAMPLE_SOURCE_FILES + examples/computeFlowStorageCurve.cpp + examples/computeLocalSolutions.cpp + examples/computeToFandTracers.cpp + examples/computeTracers.cpp + examples/extractFromRestart.cpp + tests/runAcceptanceTest.cpp + tests/runLinearisedCellDataTest.cpp + tests/runTransTest.cpp + ) + +list (APPEND PUBLIC_HEADER_FILES + opm/utility/ECLEndPointScaling.hpp + opm/utility/ECLFluxCalc.hpp + opm/utility/ECLGraph.hpp + opm/utility/ECLPhaseIndex.hpp + opm/utility/ECLPropTable.hpp + opm/utility/ECLResultData.hpp + opm/utility/ECLSaturationFunc.hpp + opm/utility/ECLUnitHandling.hpp + opm/utility/ECLWellSolution.hpp + ) diff --git a/ThirdParty/custom-opm-common/opm-common/LICENSE b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/LICENSE similarity index 99% rename from ThirdParty/custom-opm-common/opm-common/LICENSE rename to ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/LICENSE index 6b156fe1db..9cecc1d466 100644 --- a/ThirdParty/custom-opm-common/opm-common/LICENSE +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/LICENSE @@ -1,4 +1,4 @@ -GNU GENERAL PUBLIC LICENSE + GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. @@ -672,4 +672,3 @@ may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . - diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/README.md b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/README.md new file mode 100644 index 0000000000..d8782caf03 --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/README.md @@ -0,0 +1,2 @@ +# opm-flowdiagnostics-applications +Stand-Alone Utilities for Developing and Testing Flow Diagnostics Compuational Kernels diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/dune.module b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/dune.module new file mode 100644 index 0000000000..1285983fed --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/dune.module @@ -0,0 +1,13 @@ +#################################################################### +# Dune module information file: This file gets parsed by dunecontrol +# and by the CMake build scripts. +#################################################################### + +Module: opm-flowdiagnostics-applications +Description: flow diagnostics applications and examples +Version: 2016.10-pre +Label: 2016.10-pre +Maintainer: bard.skaflestad@sintef.no +MaintainerName: Bård Skaflestad +Url: http://opm-project.org +Depends: opm-common opm-flowdiagnostics opm-core diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/examples/computeFlowStorageCurve.cpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/examples/computeFlowStorageCurve.cpp new file mode 100644 index 0000000000..58656e8e7e --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/examples/computeFlowStorageCurve.cpp @@ -0,0 +1,72 @@ +/* + Copyright 2016 SINTEF ICT, Applied Mathematics. + Copyright 2016, 2017 Statoil ASA. + + This file is part of the Open Porous Media Project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#if HAVE_CONFIG_H +#include +#endif + +#include "exampleSetup.hpp" + +#include +#include + +// Syntax (typical): +// computeFlowStorageCurve case= step= +int main(int argc, char* argv[]) +try { + example::Setup setup(argc, argv); + auto& fdTool = setup.toolbox; + + // Solve for forward and reverse time of flight. + std::vector start; + auto fwd = fdTool.computeInjectionDiagnostics(start); + auto rev = fdTool.computeProductionDiagnostics(start); + auto pv = setup.graph.poreVolume(); + + const bool ignore_disconnected = setup.param.getDefault("ignore_disconnected", true); + if (ignore_disconnected) { + // Give disconnected cells zero pore volume. + std::vector nbcount(setup.graph.numCells(), 0); + for (int nb : setup.graph.neighbours()) { + if (nb >= 0) { + ++nbcount[nb]; + } + } + for (size_t i = 0; i < pv.size(); ++i) { + if (nbcount[i] == 0) { + pv[i] = 0.0; + } + } + } + + // Compute graph. + const double max_pv_fraction = setup.param.getDefault("max_pv_fraction", 0.1); + auto fphi = Opm::FlowDiagnostics::flowCapacityStorageCapacityCurve(fwd, rev, pv, max_pv_fraction); + + // Write it to standard out. + std::cout.precision(16); + const int sz = fphi.first.size(); + for (int i = 0; i < sz; ++i) { + std::cout << fphi.first[i] << " " << fphi.second[i] << '\n'; + } +} +catch (const std::exception& e) { + std::cerr << "Caught exception: " << e.what() << '\n'; +} diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/examples/computeLocalSolutions.cpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/examples/computeLocalSolutions.cpp new file mode 100644 index 0000000000..50a2a5598d --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/examples/computeLocalSolutions.cpp @@ -0,0 +1,75 @@ +/* + Copyright 2017 SINTEF ICT, Applied Mathematics. + Copyright 2017 Statoil ASA. + + This file is part of the Open Porous Media project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#if HAVE_CONFIG_H +#include +#endif + +#include "exampleSetup.hpp" +#include + +// Syntax (typical): +// computeToFandTracers case= step= +int main(int argc, char* argv[]) +try { + example::Setup setup(argc, argv); + auto& fdTool = setup.toolbox; + + // Create start sets from injector wells. + using ID = Opm::FlowDiagnostics::CellSetID; + std::vector start; + for (const auto& well : setup.well_fluxes) { + if (!well.is_injector_well) { + continue; + } + std::vector completion_cells; + completion_cells.reserve(well.completions.size()); + for (const auto& completion : well.completions) { + const auto& gridName = completion.gridName; + const auto& ijk = completion.ijk; + const int cell_index = setup.graph.activeCell(ijk, gridName); + if (cell_index >= 0) { + completion_cells.push_back(cell_index); + } + } + start.emplace_back(ID(well.name), completion_cells); + } + + + // Solve for injection time of flight and tracers. + auto sol = fdTool.computeInjectionDiagnostics(start); + + // Choose injector id, default to first injector. + const std::string id_string = setup.param.getDefault("id", start.front().id().to_string()); + const ID id(id_string); + + // Get local data for injector. + const bool tracer = setup.param.getDefault("tracer", false); + const auto& data = tracer ? sol.fd.concentration(id) : sol.fd.timeOfFlight(id); + + // Write it to standard out. + std::cout.precision(16); + for (auto item : data) { + std::cout << item.first << " " << item.second << '\n'; + } +} +catch (const std::exception& e) { + std::cerr << "Caught exception: " << e.what() << '\n'; +} diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/examples/computeToFandTracers.cpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/examples/computeToFandTracers.cpp new file mode 100644 index 0000000000..fee7bbce0b --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/examples/computeToFandTracers.cpp @@ -0,0 +1,48 @@ +/* + Copyright 2016 SINTEF ICT, Applied Mathematics. + Copyright 2016 Statoil ASA. + + This file is part of the Open Porous Media Project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#if HAVE_CONFIG_H +#include +#endif + +#include "exampleSetup.hpp" + + +// Syntax (typical): +// computeToFandTracers case= step= +int main(int argc, char* argv[]) +try { + example::Setup setup(argc, argv); + auto& fdTool = setup.toolbox; + + // Solve for time of flight. + std::vector start; + auto sol = fdTool.computeInjectionDiagnostics(start); + const auto& tof = sol.fd.timeOfFlight(); + + // Write it to standard out. + std::cout.precision(16); + for (double t : tof) { + std::cout << t << '\n'; + } +} +catch (const std::exception& e) { + std::cerr << "Caught exception: " << e.what() << '\n'; +} diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/examples/computeTracers.cpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/examples/computeTracers.cpp new file mode 100644 index 0000000000..85d3d48bf3 --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/examples/computeTracers.cpp @@ -0,0 +1,47 @@ +/* + Copyright 2016 SINTEF ICT, Applied Mathematics. + Copyright 2016 Statoil ASA. + + This file is part of the Open Porous Media Project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#if HAVE_CONFIG_H +#include +#endif + +#include "exampleSetup.hpp" + + +int main(int argc, char** argv) +try { + example::Setup setup(argc, argv); + auto& fdTool = setup.toolbox; + + // Solve for tracers. + Opm::FlowDiagnostics::CellSetID id("Example start set ID"); + Opm::FlowDiagnostics::CellSet start(id, {123}); + auto sol = fdTool.computeInjectionDiagnostics({start}); + const auto& conc_sol = sol.fd.concentration(id); + + // Write it to standard out. + std::cout.precision(16); + for (auto item : conc_sol) { + std::cout << item.first << " " << item.second << '\n'; + } +} +catch (const std::exception& e) { + std::cerr << "Caught exception: " << e.what() << '\n'; +} diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/examples/exampleSetup.hpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/examples/exampleSetup.hpp new file mode 100644 index 0000000000..5d79b5f760 --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/examples/exampleSetup.hpp @@ -0,0 +1,291 @@ +/* + Copyright 2016 SINTEF ICT, Applied Mathematics. + Copyright 2016 Statoil ASA. + + This file is part of the Open Porous Media project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#ifndef OPM_EXAMPLESETUP_HEADER_INCLUDED +#define OPM_EXAMPLESETUP_HEADER_INCLUDED + + + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +namespace example { + inline bool isFile(const boost::filesystem::path& p) + { + namespace fs = boost::filesystem; + + auto is_regular_file = [](const fs::path& pth) + { + return fs::exists(pth) && fs::is_regular_file(pth); + }; + + return is_regular_file(p) + || (fs::is_symlink(p) && + is_regular_file(fs::read_symlink(p))); + } + + inline boost::filesystem::path + deriveFileName(boost::filesystem::path file, + const std::vector& extensions) + { + for (const auto& ext : extensions) { + file.replace_extension(ext); + + if (isFile(file)) { + return file; + } + } + + const auto prefix = file.parent_path() / file.stem(); + + std::ostringstream os; + + os << "Unable to derive valid filename from model prefix " + << prefix.generic_string(); + + throw std::invalid_argument(os.str()); + } + + + template + inline Opm::FlowDiagnostics::ConnectionValues + extractFluxField(const Opm::ECLGraph& G, + FluxCalc&& getFlux) + { + using ConnVals = Opm::FlowDiagnostics::ConnectionValues; + + const auto actPh = G.activePhases(); + + auto flux = ConnVals(ConnVals::NumConnections{G.numConnections()}, + ConnVals::NumPhases{actPh.size()}); + + auto phas = ConnVals::PhaseID{0}; + + for (const auto& p : actPh) { + const auto pflux = getFlux(p); + + if (! pflux.empty()) { + assert (pflux.size() == flux.numConnections()); + + auto conn = ConnVals::ConnID{0}; + for (const auto& v : pflux) { + flux(conn, phas) = v; + conn.id += 1; + } + } + + phas.id += 1; + } + + return flux; + } + + inline Opm::FlowDiagnostics::ConnectionValues + extractFluxField(const Opm::ECLGraph& G, + const Opm::ECLInitFileData& init, + const Opm::ECLRestartData& rstrt, + const bool compute_fluxes, + const bool useEPS) + { + if (compute_fluxes) { + auto satfunc = ::Opm::ECLSaturationFunc(G, init, useEPS); + + Opm::ECLFluxCalc calc(G, std::move(satfunc)); + + auto getFlux = [&calc, &rstrt] + (const Opm::ECLPhaseIndex p) + { + return calc.flux(rstrt, p); + }; + + return extractFluxField(G, getFlux); + } + + auto getFlux = [&G, &rstrt] + (const Opm::ECLPhaseIndex p) + { + return G.flux(rstrt, p); + }; + + return extractFluxField(G, getFlux); + } + + template + Opm::FlowDiagnostics::CellSetValues + extractWellFlows(const Opm::ECLGraph& G, + const WellFluxes& well_fluxes) + { + Opm::FlowDiagnostics::CellSetValues inflow; + for (const auto& well : well_fluxes) { + for (const auto& completion : well.completions) { + const auto& gridName = completion.gridName; + const auto& ijk = completion.ijk; + const int cell_index = G.activeCell(ijk, gridName); + if (cell_index >= 0) { + // Since inflow is a std::map, if the key was not + // already present operator[] will insert a + // value-initialized value (as in T() for a type + // T), which is zero for built-in numerical types, + // including double. + inflow[cell_index] += completion.reservoir_inflow_rate; + } + } + } + + return inflow; + } + + + + + struct FilePaths + { + FilePaths(const Opm::ParameterGroup& param) + { + const string casename = param.getDefault("case", "DEFAULT_CASE_NAME"); + grid = param.has("grid") ? param.get("grid") + : deriveFileName(casename, { ".EGRID", ".FEGRID", ".GRID", ".FGRID" }); + init = param.has("init") ? param.get("init") + : deriveFileName(casename, { ".INIT", ".FINIT" }); + restart = param.has("restart") ? param.get("restart") + : deriveFileName(casename, { ".UNRST", ".FUNRST" }); + } + + using path = boost::filesystem::path; + using string = std::string; + + path grid; + path init; + path restart; + }; + + + + + inline Opm::ParameterGroup + initParam(int argc, char** argv) + { + // Obtain parameters from command line (possibly specifying a parameter file). + const bool verify_commandline_syntax = true; + const bool parameter_output = false; + Opm::ParameterGroup param(argc, argv, verify_commandline_syntax, parameter_output); + return param; + } + + + + + inline Opm::FlowDiagnostics::Toolbox + initToolbox(const Opm::ECLGraph& G) + { + const auto connGraph = Opm::FlowDiagnostics:: + ConnectivityGraph{ static_cast(G.numCells()), + G.neighbours() }; + + // Create the Toolbox. + auto tool = Opm::FlowDiagnostics::Toolbox{ connGraph }; + tool.assignPoreVolume(G.poreVolume()); + + return tool; + } + + + + + struct Setup + { + Setup(int argc, char** argv) + : param (initParam(argc, argv)) + , file_paths (param) + , init (file_paths.init) + , rstrt (file_paths.restart) + , graph (::Opm::ECLGraph::load(file_paths.grid, init)) + , well_fluxes () + , toolbox (initToolbox(graph)) + , compute_fluxes_(param.getDefault("compute_fluxes", false)) + , useEPS_ (param.getDefault("use_ep_scaling", false)) + { + const int step = param.getDefault("step", 0); + + if (! this->selectReportStep(step)) { + std::ostringstream os; + + os << "Report Step " << step + << " is Not Available in Result Set " + << file_paths.grid.stem(); + + throw std::domain_error(os.str()); + } + } + + bool selectReportStep(const int step) + { + if (! rstrt.selectReportStep(step)) { + return false; + } + + { + auto wsol = Opm::ECLWellSolution{}; + well_fluxes = wsol.solution(rstrt, graph.activeGrids()); + } + + toolbox.assignConnectionFlux(extractFluxField(graph, init, rstrt, + compute_fluxes_, useEPS_)); + + toolbox.assignInflowFlux(extractWellFlows(graph, well_fluxes)); + + return true; + } + + Opm::ParameterGroup param; + FilePaths file_paths; + Opm::ECLInitFileData init; + Opm::ECLRestartData rstrt; + Opm::ECLGraph graph; + std::vector well_fluxes; + Opm::FlowDiagnostics::Toolbox toolbox; + bool compute_fluxes_ = false; + bool useEPS_ = false; + }; + + +} // namespace example + + + +#endif // OPM_EXAMPLESETUP_HEADER_INCLUDED diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/examples/extractFromRestart.cpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/examples/extractFromRestart.cpp new file mode 100644 index 0000000000..060fba34f7 --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/examples/extractFromRestart.cpp @@ -0,0 +1,75 @@ +/* + Copyright 2017 SINTEF DIGITAL, Mathematics and Cybernetics. + Copyright 2016 Statoil ASA. + + This file is part of the Open Porous Media Project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#if HAVE_CONFIG_H +#include +#endif + +#include +#include + +#include + +// Syntax (typical): +// extractFromRestart unrst= step= keyword= grid_id= +int main(int argc, char* argv[]) { + try { + Opm::ParameterGroup param(argc, argv, + /*verify_commandline_syntax=*/ true, + /*parameter_output=*/ false); + const std::string unrst_file = param.get("unrst"); + const int report_step = param.getDefault("step", int(0)); + const std::string grid_id = param.getDefault("grid_id", std::string("")); + const std::string keyword = param.get("keyword"); + + Opm::ECLRestartData restart_file(unrst_file); + + if (!restart_file.selectReportStep(report_step)) { + std::cerr << "Could not find report step " << report_step << "." << std::endl; + exit(-1); + } + + if (restart_file.haveKeywordData(keyword, grid_id)) { + const std::vector& data = restart_file.keywordData(keyword, grid_id); + + std::cout.precision(20); + + // Write out to cout in a matlab-friendly fashion. + std::cout << "kw_" << keyword << " = {" << std::endl + << "'unrst_file=" << unrst_file << "'," << std::endl + << "'step=" << report_step << "'," << std::endl + << "'grid_id=" << grid_id << "'," << std::endl; + std::cout << "["; + std::ostream_iterator out_it(std::cout, ", "); + std::copy(data.begin(), --data.end(), out_it); + std::cout << data.back(); + std::cout << "]" << std::endl; + std::cout << "};" << std::endl; + } + else { + std::cerr << "Could not find the keyword " << keyword + << " in report step " << report_step << "." << std::endl; + exit(-1); + } + } + catch (const std::exception& e) { + std::cerr << "Caught exception: " << e.what() << '\n'; + } +} diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLEndPointScaling.cpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLEndPointScaling.cpp new file mode 100644 index 0000000000..6795fdeb02 --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLEndPointScaling.cpp @@ -0,0 +1,1163 @@ +/* + Copyright 2017 Statoil ASA. + + This file is part of the Open Porous Media Project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#if HAVE_CONFIG_H +#include +#endif + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +namespace { + std::vector + unscaledTwoPt(const std::vector& min, + const std::vector& max) + { + assert ((min.size() == max.size()) && "Internal Logic Error"); + assert ((! min.empty()) && "Internal Logic Error"); + + using TEP = Opm::SatFunc::EPSEvalInterface::TableEndPoints; + + auto tep = std::vector{}; + tep.reserve(min.size()); + + for (auto n = min.size(), i = 0*n; i < n; ++i) { + const auto smin = min[i]; + + // Ignore 'sdisp' in the two-point scaling. + tep.push_back(TEP{ smin, smin, max[i] }); + } + + return tep; + } + + std::vector + unscaledThreePt(const std::vector& min , + const std::vector& disp, + const std::vector& max ) + { + assert ((min.size() == max .size()) && "Internal Logic Error"); + assert ((min.size() == disp.size()) && "Internal Logic Error"); + assert ((! min.empty()) && "Internal Logic Error"); + + using TEP = Opm::SatFunc::EPSEvalInterface::TableEndPoints; + + auto tep = std::vector{}; + tep.reserve(min.size()); + + for (auto n = min.size(), i = 0*n; i < n; ++i) { + tep.push_back(TEP{ min[i], disp[i], max[i] }); + } + + return tep; + } +} + +// --------------------------------------------------------------------- +// Class Opm::TwoPointScaling::Impl +// --------------------------------------------------------------------- + +class Opm::SatFunc::TwoPointScaling::Impl +{ +public: + Impl(std::vector smin, + std::vector smax) + : smin_(std::move(smin)) + , smax_(std::move(smax)) + { + if (this->smin_.size() != this->smax_.size()) { + throw std::invalid_argument { + "Size Mismatch Between Minimum and " + "Maximum Saturation Arrays" + }; + } + } + + std::vector + eval(const TableEndPoints& tep, + const SaturationPoints& sp) const; + +private: + std::vector smin_; + std::vector smax_; +}; + +std::vector +Opm::SatFunc::TwoPointScaling:: +Impl::eval(const TableEndPoints& tep, + const SaturationPoints& sp) const +{ + const auto srng = tep.high - tep.low; + + auto effsat = std::vector{}; + effsat.reserve(sp.size()); + + for (const auto& eval_pt : sp) { + const auto cell = eval_pt.cell; + + const auto sLO = this->smin_[cell]; + const auto sHI = this->smax_[cell]; + + effsat.push_back(0.0); + auto& s_eff = effsat.back(); + + if (! (eval_pt.sat > sLO)) { + // s <= sLO + s_eff = tep.low; + } + else if (! (eval_pt.sat < sHI)) { + // s >= sHI + s_eff = tep.high; + } + else { + // s \in (sLO, sHI) + const auto scaled_sat = + ((eval_pt.sat - sLO) / (sHI - sLO)) * srng; + + s_eff = tep.low + scaled_sat; + } + } + + return effsat; +} + +// --------------------------------------------------------------------- +// Class Opm::ThreePointScaling::Impl +// --------------------------------------------------------------------- + +class Opm::SatFunc::ThreePointScaling::Impl +{ +public: + Impl(std::vector smin , + std::vector sdisp, + std::vector smax ) + : smin_ (std::move(smin )) + , sdisp_(std::move(sdisp)) + , smax_ (std::move(smax )) + { + if ((this->sdisp_.size() != this->smin_.size()) || + (this->sdisp_.size() != this->smax_.size())) + { + throw std::invalid_argument { + "Size Mismatch Between Minimum, Displacing " + "and Maximum Saturation Arrays" + }; + } + } + + std::vector + eval(const TableEndPoints& tep, + const SaturationPoints& sp) const; + +private: + std::vector smin_; + std::vector sdisp_; + std::vector smax_; +}; + +std::vector +Opm::SatFunc::ThreePointScaling:: +Impl::eval(const TableEndPoints& tep, + const SaturationPoints& sp) const +{ + auto effsat = std::vector{}; + effsat.reserve(sp.size()); + + for (const auto& eval_pt : sp) { + const auto cell = eval_pt.cell; + + effsat.push_back(0.0); + auto& s_eff = effsat.back(); + + const auto sLO = this->smin_ [cell]; + const auto sR = this->sdisp_[cell]; + const auto sHI = this->smax_ [cell]; + + if (! (eval_pt.sat > sLO)) { + // s <= sLO + s_eff = tep.low; + } + else if (! (eval_pt.sat < sHI)) { + // s >= sHI + s_eff = tep.high; + } + else if (eval_pt.sat < sR) { + // s \in (sLO, sR) + const auto t = (eval_pt.sat - sLO) / (sR - sLO); + + s_eff = tep.low + t*(tep.disp - tep.low); + } + else { + // s \in (sR, sHI) + const auto t = (eval_pt.sat - sR) / (sHI - sR); + + s_eff = tep.disp + t*(tep.high - tep.disp); + } + } + + return effsat; +} + +// --------------------------------------------------------------------- +// EPS factory functions for two-point and three-point scaling options +// --------------------------------------------------------------------- + +namespace Create { + using EPSOpt = ::Opm::SatFunc::CreateEPS::EPSOptions; + using RTEP = ::Opm::SatFunc::CreateEPS::RawTableEndPoints; + using TEP = ::Opm::SatFunc::EPSEvalInterface::TableEndPoints; + + namespace TwoPoint { + using EPS = ::Opm::SatFunc::TwoPointScaling; + using EPSPtr = std::unique_ptr; + + struct Kr { + static EPSPtr + G(const ::Opm::ECLGraph& G, + const ::Opm::ECLInitFileData& init); + + static EPSPtr + OG(const ::Opm::ECLGraph& G, + const ::Opm::ECLInitFileData& init); + + static EPSPtr + OW(const ::Opm::ECLGraph& G, + const ::Opm::ECLInitFileData& init); + + static EPSPtr + W(const ::Opm::ECLGraph& G, + const ::Opm::ECLInitFileData& init); + }; + + struct Pc { + static EPSPtr + GO(const ::Opm::ECLGraph& G, + const ::Opm::ECLInitFileData& init); + + static EPSPtr + OW(const ::Opm::ECLGraph& G, + const ::Opm::ECLInitFileData& init); + }; + + static EPSPtr + scalingFunction(const ::Opm::ECLGraph& G, + const ::Opm::ECLInitFileData& init, + const EPSOpt& opt); + + static std::vector + unscaledEndPoints(const RTEP& ep, const EPSOpt& opt); + } // namespace TwoPoint + + namespace ThreePoint { + using EPS = ::Opm::SatFunc::ThreePointScaling; + using EPSPtr = std::unique_ptr; + + struct Kr { + static EPSPtr + G(const ::Opm::ECLGraph& G, + const ::Opm::ECLInitFileData& init); + + static EPSPtr + OG(const ::Opm::ECLGraph& G, + const ::Opm::ECLInitFileData& init); + + static EPSPtr + OW(const ::Opm::ECLGraph& G, + const ::Opm::ECLInitFileData& init); + + static EPSPtr + W(const ::Opm::ECLGraph& G, + const ::Opm::ECLInitFileData& init); + }; + + static EPSPtr + scalingFunction(const ::Opm::ECLGraph& G, + const ::Opm::ECLInitFileData& init, + const ::Opm::SatFunc::CreateEPS::EPSOptions& opt); + + static std::vector + unscaledEndPoints(const RTEP& ep, const EPSOpt& opt); + } // namespace ThreePoint +} // namespace Create + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// Implementation of Create::TwoPoint::scalingFunction() +Create::TwoPoint::EPSPtr +Create::TwoPoint::Kr::G(const ::Opm::ECLGraph& G, + const ::Opm::ECLInitFileData& init) +{ + auto sgcr = G.rawLinearisedCellData(init, "SGCR"); + auto sgu = G.rawLinearisedCellData(init, "SGU"); + + if ((sgcr.size() != sgu.size()) || + (sgcr.size() != G.numCells())) + { + throw std::invalid_argument { + "Missing or Mismatching Gas End-Point " + "Specifications (SGCR and/or SGU)" + }; + } + + return EPSPtr { new EPS { std::move(sgcr), std::move(sgu) } }; +} + +Create::TwoPoint::EPSPtr +Create::TwoPoint::Kr::OG(const ::Opm::ECLGraph& G, + const ::Opm::ECLInitFileData& init) +{ + auto sogcr = G.rawLinearisedCellData(init, "SOGCR"); + + if (sogcr.size() != G.numCells()) { + throw std::invalid_argument { + "Missing or Mismatching Critical Oil " + "Saturation in Oil/Gas System" + }; + } + + auto smax = std::vector(sogcr.size(), 1.0); + + // Adjust maximum S_o for scaled connate gas saturations. + { + const auto sgl = G.rawLinearisedCellData(init, "SGL"); + + if (sgl.size() != sogcr.size()) { + throw std::invalid_argument { + "Missing or Mismatching Connate Gas " + "Saturation in Oil/Gas System" + }; + } + + for (auto n = sgl.size(), i = 0*n; i < n; ++i) { + smax[i] -= sgl[i]; + } + } + + // Adjust maximum S_o for scaled connate water saturations (if relevant). + { + const auto swl = G.rawLinearisedCellData(init, "SWL"); + + if (swl.size() == sogcr.size()) { + for (auto n = swl.size(), i = 0*n; i < n; ++i) { + smax[i] -= swl[i]; + } + } + else if (! swl.empty()) { + throw std::invalid_argument { + "Mismatching Connate Water " + "Saturation in Oil/Gas System" + }; + } + } + + return EPSPtr { new EPS { std::move(sogcr), std::move(smax) } }; +} + +Create::TwoPoint::EPSPtr +Create::TwoPoint::Kr::OW(const ::Opm::ECLGraph& G, + const ::Opm::ECLInitFileData& init) +{ + auto sowcr = G.rawLinearisedCellData(init, "SOWCR"); + + if (sowcr.size() != G.numCells()) { + throw std::invalid_argument { + "Missing or Mismatching Critical Oil " + "Saturation in Oil/Water System" + }; + } + + auto smax = std::vector(sowcr.size(), 1.0); + + // Adjust maximum S_o for scaled connate water saturations. + { + const auto swl = G.rawLinearisedCellData(init, "SWL"); + + if (swl.size() != sowcr.size()) { + throw std::invalid_argument { + "Missing or Mismatching Connate Water " + "Saturation in Oil/Water System" + }; + } + + for (auto n = swl.size(), i = 0*n; i < n; ++i) { + smax[i] -= swl[i]; + } + } + + // Adjust maximum S_o for scaled connate gas saturations (if relevant). + { + const auto sgl = G.rawLinearisedCellData(init, "SGL"); + + if (sgl.size() == sowcr.size()) { + for (auto n = sgl.size(), i = 0*n; i < n; ++i) { + smax[i] -= sgl[i]; + } + } + else if (! sgl.empty()) { + throw std::invalid_argument { + "Mismatching Connate Gas " + "Saturation in Oil/Water System" + }; + } + } + + return EPSPtr { new EPS { std::move(sowcr), std::move(smax) } }; +} + +Create::TwoPoint::EPSPtr +Create::TwoPoint::Kr::W(const ::Opm::ECLGraph& G, + const ::Opm::ECLInitFileData& init) +{ + auto swcr = G.rawLinearisedCellData(init, "SWCR"); + auto swu = G.rawLinearisedCellData(init, "SWU"); + + if (swcr.empty() || swu.empty()) { + throw std::invalid_argument { + "Missing Water End-Point Specifications (SWCR and/or SWU)" + }; + } + + return EPSPtr { new EPS { std::move(swcr), std::move(swu) } }; +} + +Create::TwoPoint::EPSPtr +Create::TwoPoint::Pc::GO(const ::Opm::ECLGraph& G, + const ::Opm::ECLInitFileData& init) +{ + auto sgl = G.rawLinearisedCellData(init, "SGL"); + auto sgu = G.rawLinearisedCellData(init, "SGU"); + + if ((sgl.size() != sgu.size()) || + (sgl.size() != G.numCells())) + { + throw std::invalid_argument { + "Missing or Mismatching Connate or Maximum Gas " + "Saturation in Pcgo EPS" + }; + } + + return EPSPtr { new EPS { std::move(sgl), std::move(sgu) } }; +} + +Create::TwoPoint::EPSPtr +Create::TwoPoint::Pc::OW(const ::Opm::ECLGraph& G, + const ::Opm::ECLInitFileData& init) +{ + auto swl = G.rawLinearisedCellData(init, "SWL"); + auto swu = G.rawLinearisedCellData(init, "SWU"); + + if ((swl.size() != swu.size()) || + (swl.size() != G.numCells())) + { + throw std::invalid_argument { + "Missing or Mismatching Connate or Maximum Water " + "Saturation in Pcow EPS" + }; + } + + return EPSPtr { new EPS { std::move(swl), std::move(swu) } }; +} + +Create::TwoPoint::EPSPtr +Create::TwoPoint:: +scalingFunction(const ::Opm::ECLGraph& G, + const ::Opm::ECLInitFileData& init, + const ::Opm::SatFunc::CreateEPS::EPSOptions& opt) +{ + using FCat = ::Opm::SatFunc::CreateEPS::FunctionCategory; + using SSys = ::Opm::SatFunc::CreateEPS::SubSystem; + using PhIdx = ::Opm::ECLPhaseIndex; + + assert (((! opt.use3PtScaling) || (opt.curve == FCat::CapPress)) + && "Internal Error Selecting EPS Family"); + + if (opt.curve == FCat::Relperm) { + if (opt.subSys == SSys::OilWater) { + if (opt.thisPh == PhIdx::Vapour) { + throw std::invalid_argument { + "Cannot Create an EPS for Gas Relperm " + "in an Oil/Water System" + }; + } + + if (opt.thisPh == PhIdx::Aqua) { + return Create::TwoPoint::Kr::W(G, init); + } + + return Create::TwoPoint::Kr::OW(G, init); + } + + if (opt.subSys == SSys::OilGas) { + if (opt.thisPh == PhIdx::Aqua) { + throw std::invalid_argument { + "Cannot Create an EPS for Water Relperm " + "in an Oil/Gas System" + }; + } + + if (opt.thisPh == PhIdx::Vapour) { + return Create::TwoPoint::Kr::G(G, init); + } + + return Create::TwoPoint::Kr::OG(G, init); + } + } + + if (opt.curve == FCat::CapPress) { + if (opt.thisPh == PhIdx::Liquid) { + throw std::invalid_argument { + "Creating Capillary Pressure EPS as a Function " + "of Oil Saturation is not Supported" + }; + } + + if (opt.thisPh == PhIdx::Vapour) { + return Create::TwoPoint::Pc::GO(G, init); + } + + if (opt.thisPh == PhIdx::Aqua) { + return Create::TwoPoint::Pc::OW(G, init); + } + } + + // Invalid. + return EPSPtr{}; +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// Implementation of Create::TwoPoint::unscaledEndPoints() +std::vector +Create::TwoPoint::unscaledEndPoints(const RTEP& ep, const EPSOpt& opt) +{ + using FCat = ::Opm::SatFunc::CreateEPS::FunctionCategory; + using SSys = ::Opm::SatFunc::CreateEPS::SubSystem; + using PhIdx = ::Opm::ECLPhaseIndex; + + assert (((opt.curve == FCat::CapPress) || + (! opt.use3PtScaling)) && "Internal Logic Error"); + + if (opt.curve == FCat::CapPress) { + // Left node is connate saturation, right node is max saturation. + + if (opt.thisPh == PhIdx::Liquid) { + throw std::invalid_argument { + "No Capillary Pressure Function for Oil" + }; + } + + if (opt.thisPh == PhIdx::Aqua) { + return unscaledTwoPt(ep.conn.water, ep.smax.water); + } + + if (opt.thisPh == PhIdx::Vapour) { + return unscaledTwoPt(ep.conn.gas, ep.smax.gas); + } + } + + if (opt.curve == FCat::Relperm) { + // Left node is critical saturation, right node is max saturation. + + if (opt.subSys == SSys::OilGas) { + if (opt.thisPh == PhIdx::Aqua) { + throw std::invalid_argument { + "Void Request for Unscaled Water Saturation " + "End-Points in Oil-Gas System" + }; + } + + if (opt.thisPh == PhIdx::Liquid) { + return unscaledTwoPt(ep.crit.oil_in_gas, ep.smax.oil); + } + + if (opt.thisPh == PhIdx::Vapour) { + return unscaledTwoPt(ep.crit.gas, ep.smax.gas); + } + } + + if (opt.subSys == SSys::OilWater) { + if (opt.thisPh == PhIdx::Aqua) { + return unscaledTwoPt(ep.crit.water, ep.smax.water); + } + + if (opt.thisPh == PhIdx::Liquid) { + return unscaledTwoPt(ep.crit.oil_in_water, ep.smax.oil); + } + + if (opt.thisPh == PhIdx::Vapour) { + throw std::invalid_argument { + "Void Request for Unscaled Gas Saturation " + "End-Points in Oil-Water System" + }; + } + } + } + + // Invalid. + return {}; +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// Implementation of Create::ThreePoint::scalingFunction() + +Create::ThreePoint::EPSPtr +Create::ThreePoint::Kr::G(const ::Opm::ECLGraph& G, + const ::Opm::ECLInitFileData& init) +{ + auto sgcr = G.rawLinearisedCellData(init, "SGCR"); + auto sgu = G.rawLinearisedCellData(init, "SGU"); + + if ((sgcr.size() != sgu.size()) || + (sgcr.size() != G.numCells())) + { + throw std::invalid_argument { + "Missing or Mismatching Gas End-Point " + "Specifications (SGCR and/or SGU)" + }; + } + + auto sr = std::vector(G.numCells(), 1.0); + + // Adjust displacing saturation for connate water. + { + const auto swl = G.rawLinearisedCellData(init, "SWL"); + + if (swl.size() == sgcr.size()) { + for (auto n = swl.size(), i = 0*n; i < n; ++i) { + sr[i] -= swl[i]; + } + } + else if (! swl.empty()) { + throw std::invalid_argument { + "Connate Water Saturation Array Mismatch " + "in Three-Point Scaling Option" + }; + } + } + + // Adjust displacing saturation for critical S_o in O/G system. + { + const auto sogcr = G.rawLinearisedCellData(init, "SOGCR"); + + if (sogcr.size() == sgcr.size()) { + for (auto n = sogcr.size(), i = 0*n; i < n; ++i) { + sr[i] -= sogcr[i]; + } + } + else if (! sogcr.empty()) { + throw std::invalid_argument { + "Critical Oil Saturation (O/G System) Array " + "Size Mismatch in Three-Point Scaling Option" + }; + } + } + + return EPSPtr { + new EPS { std::move(sgcr), std::move(sr), std::move(sgu) } + }; +} + +Create::ThreePoint::EPSPtr +Create::ThreePoint::Kr::OG(const ::Opm::ECLGraph& G, + const ::Opm::ECLInitFileData& init) +{ + auto sogcr = G.rawLinearisedCellData(init, "SOGCR"); + + if (sogcr.size() != G.numCells()) { + throw std::invalid_argument { + "Missing or Mismatching Critical Oil " + "Saturation in Oil/Gas System" + }; + } + + auto smax = std::vector(sogcr.size(), 1.0); + + // Adjust maximum S_o for scaled connate gas saturations. + { + const auto sgl = G.rawLinearisedCellData(init, "SGL"); + + if (sgl.size() != sogcr.size()) { + throw std::invalid_argument { + "Missing or Mismatching Connate Gas " + "Saturation in Oil/Gas System" + }; + } + + for (auto n = sgl.size(), i = 0*n; i < n; ++i) { + smax[i] -= sgl[i]; + } + } + + auto sdisp = std::vector(sogcr.size(), 1.0); + + // Adjust displacing S_o for scaled critical gas saturation. + { + const auto sgcr = G.rawLinearisedCellData(init, "SGCR"); + + if (sgcr.size() != sogcr.size()) { + throw std::invalid_argument { + "Missing or Mismatching Scaled Critical Gas " + "Saturation in Oil/Gas System" + }; + } + + for (auto n = sgcr.size(), i = 0*n; i < n; ++i) { + sdisp[i] -= sgcr[i]; + } + } + + // Adjust displacing and maximum S_o for scaled connate water + // saturations (if relevant). + { + const auto swl = G.rawLinearisedCellData(init, "SWL"); + + if (swl.size() == sogcr.size()) { + for (auto n = swl.size(), i = 0*n; i < n; ++i) { + sdisp[i] -= swl[i]; + smax [i] -= swl[i]; + } + } + else if (! swl.empty()) { + throw std::invalid_argument { + "Mismatching Scaled Connate Water " + "Saturation in Oil/Gas System" + }; + } + } + + return EPSPtr { + new EPS { std::move(sogcr), std::move(sdisp), std::move(smax) } + }; +} + +Create::ThreePoint::EPSPtr +Create::ThreePoint::Kr::OW(const ::Opm::ECLGraph& G, + const ::Opm::ECLInitFileData& init) +{ + auto sowcr = G.rawLinearisedCellData(init, "SOWCR"); + + if (sowcr.size() != G.numCells()) { + throw std::invalid_argument { + "Missing or Mismatching Critical Oil " + "Saturation in Oil/Water System" + }; + } + + auto smax = std::vector(sowcr.size(), 1.0); + + // Adjust maximum S_o for scaled connate water saturations. + { + const auto swl = G.rawLinearisedCellData(init, "SWL"); + + if (swl.size() != sowcr.size()) { + throw std::invalid_argument { + "Missing or Mismatching Connate Water " + "Saturation in Oil/Water System" + }; + } + + for (auto n = swl.size(), i = 0*n; i < n; ++i) { + smax[i] -= swl[i]; + } + } + + auto sdisp = std::vector(sowcr.size(), 1.0); + + // Adjust displacing S_o for scaled critical water saturations. + { + const auto swcr = G.rawLinearisedCellData(init, "SWCR"); + + if (swcr.size() != sowcr.size()) { + throw std::invalid_argument { + "Missing or Mismatching Scaled Critical Water " + "Saturation in Oil/Water System" + }; + } + + for (auto n = swcr.size(), i = 0*n; i < n; ++i) { + sdisp[i] -= swcr[i]; + } + } + + // Adjust displacing and maximum S_o for scaled connate gas saturations + // (if relevant). + { + const auto sgl = G.rawLinearisedCellData(init, "SGL"); + + if (sgl.size() == sowcr.size()) { + for (auto n = sgl.size(), i = 0*n; i < n; ++i) { + sdisp[i] -= sgl[i]; + smax [i] -= sgl[i]; + } + } + else if (! sgl.empty()) { + throw std::invalid_argument { + "Mismatching Connate Gas " + "Saturation in Oil/Water System" + }; + } + } + + return EPSPtr { + new EPS { std::move(sowcr), std::move(sdisp), std::move(smax) } + }; +} + +Create::ThreePoint::EPSPtr +Create::ThreePoint::Kr::W(const ::Opm::ECLGraph& G, + const ::Opm::ECLInitFileData& init) +{ + auto swcr = G.rawLinearisedCellData(init, "SWCR"); + auto swu = G.rawLinearisedCellData(init, "SWU"); + + if ((swcr.size() != G.numCells()) || + (swcr.size() != swu.size())) + { + throw std::invalid_argument { + "Missing Water End-Point Specifications (SWCR and/or SWU)" + }; + } + + auto sdisp = std::vector(swcr.size(), 1.0); + + // Adjust displacing S_w for scaled critical oil saturation. + { + const auto sowcr = G.rawLinearisedCellData(init, "SOWCR"); + + if (sowcr.size() == swcr.size()) { + for (auto n = sowcr.size(), i = 0*n; i < n; ++i) { + sdisp[i] -= sowcr[i]; + } + } + else if (! sowcr.empty()) { + throw std::invalid_argument { + "Missing or Mismatching Scaled Critical " + "Oil Saturation in Oil/Water System" + }; + } + } + + // Adjust displacing S_w for scaled connate gas saturation. + { + const auto sgl = G.rawLinearisedCellData(init, "SGL"); + + if (sgl.size() == swcr.size()) { + for (auto n = sgl.size(), i = 0*n; i < n; ++i) { + sdisp[i] -= sgl[i]; + } + } + else if (! sgl.empty()) { + throw std::invalid_argument { + "Missing or Mismatching Scaled Connate " + "Gas Saturation in Oil/Water System" + }; + } + } + + return EPSPtr { + new EPS { std::move(swcr), std::move(sdisp), std::move(swu) } + }; +} + +Create::ThreePoint::EPSPtr +Create::ThreePoint:: +scalingFunction(const ::Opm::ECLGraph& G, + const ::Opm::ECLInitFileData& init, + const ::Opm::SatFunc::CreateEPS::EPSOptions& opt) +{ + using FCat = ::Opm::SatFunc::CreateEPS::FunctionCategory; + using SSys = ::Opm::SatFunc::CreateEPS::SubSystem; + using PhIdx = ::Opm::ECLPhaseIndex; + + assert ((opt.use3PtScaling && (opt.curve == FCat::Relperm)) + && "Internal Error Selecting EPS Family"); + + if (opt.subSys == SSys::OilWater) { + if (opt.thisPh == PhIdx::Vapour) { + throw std::invalid_argument { + "Cannot Create a Three-Point EPS for " + "Gas Relperm in an Oil/Water System" + }; + } + + if (opt.thisPh == PhIdx::Aqua) { + return Create::ThreePoint::Kr::W(G, init); + } + + return Create::ThreePoint::Kr::OW(G, init); + } + + if (opt.subSys == SSys::OilGas) { + if (opt.thisPh == PhIdx::Aqua) { + throw std::invalid_argument { + "Cannot Create a Three-Point EPS for " + "Water Relperm in an Oil/Gas System" + }; + } + + if (opt.thisPh == PhIdx::Vapour) { + return Create::ThreePoint::Kr::G(G, init); + } + + return Create::ThreePoint::Kr::OG(G, init); + } + + // Invalid. + return EPSPtr{}; +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// Implementation of Create::ThreePoint::unscaledEndPoints() +std::vector +Create::ThreePoint::unscaledEndPoints(const RTEP& ep, const EPSOpt& opt) +{ + using FCat = ::Opm::SatFunc::CreateEPS::FunctionCategory; + using SSys = ::Opm::SatFunc::CreateEPS::SubSystem; + using PhIdx = ::Opm::ECLPhaseIndex; + + assert ((opt.use3PtScaling && (opt.curve == FCat::Relperm)) + && "Internal Error Selecting EPS Family"); + + auto sdisp = [](const std::vector& s1, + const std::vector& s2) + -> std::vector + { + auto sr = std::vector(s1.size(), 1.0); + + for (auto n = s1.size(), i = 0*n; i < n; ++i) { + sr[i] -= s1[i] + s2[i]; + } + + return sr; + }; + + // Left node is critical saturation, middle node is displacing critical + // saturation, and right node is maximum saturation. + + if (opt.subSys == SSys::OilGas) { + if (opt.thisPh == PhIdx::Aqua) { + throw std::invalid_argument { + "Void Request for Unscaled Water Saturation " + "End-Points in Oil-Gas System" + }; + } + + if (opt.thisPh == PhIdx::Liquid) { + return unscaledThreePt(ep.crit.oil_in_gas, + sdisp(ep.crit.gas, ep.conn.water), + ep.smax.oil); + } + + if (opt.thisPh == PhIdx::Vapour) { + return unscaledThreePt(ep.crit.gas, + sdisp(ep.crit.oil_in_gas, ep.conn.water), + ep.smax.gas); + } + } + + if (opt.subSys == SSys::OilWater) { + if (opt.thisPh == PhIdx::Aqua) { + return unscaledThreePt(ep.crit.water, + sdisp(ep.crit.oil_in_water, ep.conn.gas), + ep.smax.water); + } + + if (opt.thisPh == PhIdx::Liquid) { + return unscaledThreePt(ep.crit.oil_in_water, + sdisp(ep.crit.water, ep.conn.gas), + ep.smax.oil); + } + + if (opt.thisPh == PhIdx::Vapour) { + throw std::invalid_argument { + "Void Request for Unscaled Gas Saturation " + "End-Points in Oil-Water System" + }; + } + } + + // Invalid. + return {}; +} + +// ##################################################################### +// ===================================================================== +// Public Interface Below Separator +// ===================================================================== +// ##################################################################### + +// Class Opm::SatFunc::EPSEvalInterface +Opm::SatFunc::EPSEvalInterface::~EPSEvalInterface() +{} + +// --------------------------------------------------------------------- + +// Class Opm::SatFunc::TwoPointScaling +Opm::SatFunc::TwoPointScaling:: +TwoPointScaling(std::vector smin, + std::vector smax) + : pImpl_(new Impl(std::move(smin), std::move(smax))) +{} + +Opm::SatFunc::TwoPointScaling::~TwoPointScaling() +{} + +Opm::SatFunc::TwoPointScaling:: +TwoPointScaling(const TwoPointScaling& rhs) + : pImpl_(new Impl(*rhs.pImpl_)) +{} + +Opm::SatFunc::TwoPointScaling:: +TwoPointScaling(TwoPointScaling&& rhs) + : pImpl_(std::move(rhs.pImpl_)) +{} + +Opm::SatFunc::TwoPointScaling& +Opm::SatFunc::TwoPointScaling::operator=(const TwoPointScaling& rhs) +{ + this->pImpl_.reset(new Impl(*rhs.pImpl_)); + + return *this; +} + +Opm::SatFunc::TwoPointScaling& +Opm::SatFunc::TwoPointScaling::operator=(TwoPointScaling&& rhs) +{ + this->pImpl_ = std::move(rhs.pImpl_); + + return *this; +} + +std::vector +Opm::SatFunc::TwoPointScaling::eval(const TableEndPoints& tep, + const SaturationPoints& sp) const +{ + return this->pImpl_->eval(tep, sp); +} + +std::unique_ptr +Opm::SatFunc::TwoPointScaling::clone() const +{ + return std::unique_ptr(new TwoPointScaling(*this)); +} + +// --------------------------------------------------------------------- + +// Class Opm::SatFunc::ThreePointScaling +Opm::SatFunc::ThreePointScaling:: +ThreePointScaling(std::vector smin, + std::vector sdisp, + std::vector smax) + : pImpl_(new Impl(std::move(smin), std::move(sdisp), std::move(smax))) +{} + +Opm::SatFunc::ThreePointScaling::~ThreePointScaling() +{} + +Opm::SatFunc::ThreePointScaling:: +ThreePointScaling(const ThreePointScaling& rhs) + : pImpl_(new Impl(*rhs.pImpl_)) +{} + +Opm::SatFunc::ThreePointScaling::ThreePointScaling(ThreePointScaling&& rhs) + : pImpl_(std::move(rhs.pImpl_)) +{} + +Opm::SatFunc::ThreePointScaling& +Opm::SatFunc::ThreePointScaling::operator=(const ThreePointScaling& rhs) +{ + this->pImpl_.reset(new Impl(*rhs.pImpl_)); + + return *this; +} + +Opm::SatFunc::ThreePointScaling& +Opm::SatFunc::ThreePointScaling::operator=(ThreePointScaling&& rhs) +{ + this->pImpl_ = std::move(rhs.pImpl_); + + return *this; +} + +std::vector +Opm::SatFunc::ThreePointScaling::eval(const TableEndPoints& tep, + const SaturationPoints& sp) const +{ + return this->pImpl_->eval(tep, sp); +} + +std::unique_ptr +Opm::SatFunc::ThreePointScaling::clone() const +{ + return std::unique_ptr(new ThreePointScaling(*this)); +} + +// --------------------------------------------------------------------- +// Factory function Opm::SatFunc::CreateEPS::fromECLOutput() + +std::unique_ptr +Opm::SatFunc::CreateEPS:: +fromECLOutput(const ECLGraph& G, + const ECLInitFileData& init, + const EPSOptions& opt) +{ + if ((opt.curve == FunctionCategory::CapPress) || + (! opt.use3PtScaling)) + { + return Create::TwoPoint::scalingFunction(G, init, opt); + } + + if ((opt.curve == FunctionCategory::Relperm) && opt.use3PtScaling) + { + return Create::ThreePoint::scalingFunction(G, init, opt); + } + + // Invalid + return std::unique_ptr{}; +} + +// --------------------------------------------------------------------- +// Factory function Opm::SatFunc::CreateEPS::unscaledEndPoints() + +std::vector +Opm::SatFunc::CreateEPS:: +unscaledEndPoints(const RawTableEndPoints& ep, + const EPSOptions& opt) +{ + if ((opt.curve == FunctionCategory::CapPress) || + (! opt.use3PtScaling)) + { + return Create::TwoPoint::unscaledEndPoints(ep, opt); + } + + if ((opt.curve == FunctionCategory::Relperm) && opt.use3PtScaling) + { + return Create::ThreePoint::unscaledEndPoints(ep, opt); + } + + // Invalid + return {}; +} diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLEndPointScaling.hpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLEndPointScaling.hpp new file mode 100644 index 0000000000..149119b904 --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLEndPointScaling.hpp @@ -0,0 +1,431 @@ +/* + Copyright 2017 Statoil ASA. + + This file is part of the Open Porous Media Project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#ifndef OPM_ECLENDPOINTSCALING_HEADER_INCLUDED +#define OPM_ECLENDPOINTSCALING_HEADER_INCLUDED + +#include + +#include +#include +#include +#include + +namespace Opm { + + class ECLGraph; + class ECLInitFileData; + +} // namespace Opm + +namespace Opm { namespace SatFunc { + + /// Protocol for computing scaled saturation values. + class EPSEvalInterface + { + public: + /// Static (unscaled) end-points of a particular, tabulated + /// saturation function. + struct TableEndPoints { + /// Critical or connate/minimum saturation, depending on + /// subsequent function evaluation context. + /// + /// Use critical saturation when computing look-up values for + /// relative permeability and connate/minimum saturation when + /// computing look-up values for capillary pressure. + double low; + + /// Displacing saturation (3-pt option only). + double disp; + + /// Maximum (high) saturation point. + double high; + }; + + /// Associate a saturation value to a specific cell. + struct SaturationAssoc { + /// Cell to which to connect a saturation value. + std::vector::size_type cell; + + /// Saturation value. + double sat; + }; + + /// Convenience type alias. + using SaturationPoints = std::vector; + + /// Derive scaled saturations--inputs to subsequent evaluation of + /// saturation functions--corresponding to a sequence of unscaled + /// saturation values. + /// + /// \param[in] tep Static end points that identify the saturation + /// scaling intervals of a particular tabulated saturation + /// function. + /// + /// \param[in] sp Sequence of saturation points. + /// + /// \return Sequence of scaled saturation values in order of the + /// input sequence. In particular the \c i-th element of this + /// result is the scaled version of \code sp[i].sat \endcode. + virtual std::vector + eval(const TableEndPoints& tep, + const SaturationPoints& sp) const = 0; + + virtual std::unique_ptr clone() const = 0; + + /// Destructor. Must be virtual. + virtual ~EPSEvalInterface(); + }; + + /// Implementation of ECLIPSE's standard, two-point, saturation scaling + /// option. + class TwoPointScaling : public EPSEvalInterface + { + public: + /// Constructor. + /// + /// Typically set up to define the end-point scaling of all active + /// cells in a model, but could alternatively be used as a means to + /// computing the effective saturation function of a single cell. + /// + /// \param[in] smin Left end points for a set of cells. + /// + /// \param[in] smax Right end points for a set of cells. + TwoPointScaling(std::vector smin, + std::vector smax); + + /// Destructor. + ~TwoPointScaling(); + + /// Copy constructor. + /// + /// \param[in] rhs Existing object. + TwoPointScaling(const TwoPointScaling& rhs); + + /// Move constructor. + /// + /// Subsumes the implementation of an existing object. + /// + /// \param[in] rhs Existing object. + TwoPointScaling(TwoPointScaling&& rhs); + + /// Assignment operator. + /// + /// Replaces current implementation with a copy of existing object's + /// implementation details. + /// + /// \param[in] rhs Existing object. + /// + /// \return \code *this \endcode. + TwoPointScaling& + operator=(const TwoPointScaling& rhs); + + /// Move assingment operator. + /// + /// Subsumes existing object's implementation details and uses those + /// to replace the current implementation. + /// + /// \return \code *this \endcode. + TwoPointScaling& + operator=(TwoPointScaling&& rhs); + + /// Derive scaled saturations using the two-point scaling definition + /// from a sequence of unscaled saturation values. + /// + /// \param[in] tep Static end points that identify the saturation + /// scaling intervals of a particular tabulated saturation + /// function. The evaluation procedure considers only \code + /// tep.low \endcode and \code tep.high \endcode. The value of + /// \code tep.disp \endcode is never read. + /// + /// \param[in] sp Sequence of saturation points. The maximum cell + /// index (\code sp[i].cell \endcode) must be strictly less than + /// the size of the input arrays that define the current + /// saturation regions. + /// + /// \return Sequence of scaled saturation values in order of the + /// input sequence. In particular the \c i-th element of this + /// result is the scaled version of \code sp[i].sat \endcode. + virtual std::vector + eval(const TableEndPoints& tep, + const SaturationPoints& sp) const override; + + virtual std::unique_ptr clone() const override; + + private: + /// Implementation class. + class Impl; + + /// Pimpl idiom. + std::unique_ptr pImpl_; + }; + + /// Implementation of ECLIPSE's alternative, three-point, saturation + /// scaling option. + class ThreePointScaling : public EPSEvalInterface + { + public: + /// Constructor. + /// + /// Typically set up to define the end-point scaling of all active + /// cells in a model, but could alternatively be used as a means to + /// computing the effective saturation function of a single cell. + /// + /// \param[in] smin Left end points for a set of cells. + /// + /// \param[in] sdisp Intermediate--displacing saturation--end points + /// for a set of cells. + /// + /// \param[in] smax Right end points for a set of cells. + ThreePointScaling(std::vector smin, + std::vector sdisp, + std::vector smax); + + /// Destructor. + ~ThreePointScaling(); + + /// Copy constructor. + /// + /// \param[in] rhs Existing object. + ThreePointScaling(const ThreePointScaling& rhs); + + /// Move constructor. + /// + /// Subsumes the implementation of an existing object. + /// + /// \param[in] rhs Existing object. + ThreePointScaling(ThreePointScaling&& rhs); + + /// Assignment operator. + /// + /// Replaces current implementation with a copy of existing object's + /// implementation details. + /// + /// \param[in] rhs Existing object. + /// + /// \return \code *this \endcode. + ThreePointScaling& + operator=(const ThreePointScaling& rhs); + + /// Move assingment operator. + /// + /// Subsumes existing object's implementation details and uses those + /// to replace the current implementation. + /// + /// \return \code *this \endcode. + ThreePointScaling& + operator=(ThreePointScaling&& rhs); + + /// Derive scaled saturations using the three-point scaling + /// definition from a sequence of unscaled saturation values. + /// + /// \param[in] tep Static end points that identify the saturation + /// scaling intervals of a particular tabulated saturation + /// function. The evaluation procedure considers only \code + /// tep.low \endcode and \code tep.high \endcode. The value of + /// \code tep.disp \endcode is never read. + /// + /// \param[in] sp Sequence of saturation points. The maximum cell + /// index (\code sp[i].cell \endcode) must be strictly less than + /// the size of the input arrays that define the current + /// saturation regions. + /// + /// \return Sequence of scaled saturation values in order of the + /// input sequence. In particular the \c i-th element of this + /// result is the scaled version of \code sp[i].sat \endcode. + virtual std::vector + eval(const TableEndPoints& tep, + const SaturationPoints& sp) const override; + + virtual std::unique_ptr clone() const override; + + private: + /// Implementation class. + class Impl; + + /// Pimpl idiom. + std::unique_ptr pImpl_; + }; + + /// Named constructors for enabling saturation end-point scaling from an + /// ECL result set (see class \c ECLInitFileData). + struct CreateEPS + { + /// Category of function for which to create an EPS evaluator. + enum class FunctionCategory { + /// This EPS is for relative permeability. Possibly uses + /// three-point (alternative) formulation. + Relperm, + + /// This EPS is for capillary pressure. Two-point option only. + CapPress, + }; + + /// Categories of saturation function systems for which to create an + /// EPS evaluator. + enum class SubSystem { + /// Create an EPS for a curve in the Oil-Water (sub-) system. + OilWater, + + /// Create an EPS for a curve in the Oil-Gas (sub-) system. + OilGas, + }; + + /// Set of options that uniquely define a single EPS operation. + struct EPSOptions { + /// Whether or not to employ the alternative (i.e., 3-pt) scaling + /// procedure. Only applicable to FunctionCategory::Relperm and + /// ignored in the case of FunctionCategory::CapPress. + bool use3PtScaling; + + /// Curve-type for which to create an EPS. + FunctionCategory curve; + + /// Part of global fluid system for which to create an EPS. + SubSystem subSys; + + /// Phase for whose \c curve in which \c subSys to create an + /// EPS. + /// + /// Example: Create a standard (two-point) EPS for the relative + /// permeability of oil in the oil-gas subsystem of an + /// oil-gas-water active phase system. + /// + /// \code + /// auto opt = EPSOptions{}; + /// + /// opt.use3PtScaling = false; + /// opt.curve = FunctionCategory::Relperm; + /// opt.subSys = SubSystem::OilGas; + /// opt.thisPh = ECLPhaseIndex::Oil; + /// + /// auto eps = CreateEPS::fromECLOutput(G, init, opt); + /// \endcode + ::Opm::ECLPhaseIndex thisPh; + }; + + /// Collection of raw saturation table end points. + struct RawTableEndPoints { + /// Collection of connate (minimum) saturation end points. + struct Connate { + /// Connate oil saturation for each table in total set of + /// tabulated saturation functions. + std::vector oil; + + /// Connate gas saturation for each table in total set of + /// tabulated saturation functions. + std::vector gas; + + /// Connate water saturation for each table in total set of + /// tabulated saturation functions. + std::vector water; + }; + + /// Collection of critical saturations. Used in deriving scaled + /// displacing saturations in the alternative (three-point) + /// scaling procedure. + struct Critical { + /// Critical oil saturation in 2p OG system from total set + /// of tabulated saturation functions. + std::vector oil_in_gas; + + /// Critical oil saturation in 2p OW system from total set + /// of tabulated saturation functions. + std::vector oil_in_water; + + /// Critical gas saturation in 2p OG or 3p OGW system from + /// total set of tabulated saturation functions. + std::vector gas; + + /// Critical water saturation in 2p OW or 3p OGW system from + /// total set of tabulated saturation functions. + std::vector water; + }; + + /// Collection of maximum saturation end points. + struct Maximum { + /// Maximum oil saturation for each table in total set of + /// tabulated saturation functions. + std::vector oil; + + /// Maximum gas saturation for each table in total set of + /// tabulated saturation functions. + std::vector gas; + + /// Maximum water saturation for each table in total set of + /// tabulated saturation functions. + std::vector water; + }; + + /// Minimum saturation end points for all tabulated saturation + /// functions. + Connate conn; + + /// Critical saturations for all tabulated saturation functions. + Critical crit; + + /// Maximum saturation end points for all tabulated saturation + /// functions. + Maximum smax; + }; + + /// Construct an EPS evaluator from a particular ECL result set. + /// + /// \param[in] G Connected topology of current model's active cells. + /// Needed to linearise table end-points that may be distributed + /// on local grids to all of the model's active cells (\code + /// member function G.rawLinearisedCellData() \endcode). + /// + /// \param[in] init Container of tabulated saturation functions and + /// saturation table end points for all active cells. + /// + /// \param[in] opt Options that identify a particular end-point + /// scaling behaviour of a particular saturation function curve. + /// + /// \return EPS evaluator for the particular curve defined by the + /// input options. + static std::unique_ptr + fromECLOutput(const ECLGraph& G, + const ECLInitFileData& init, + const EPSOptions& opt); + + /// Extract table end points relevant to a particular EPS evaluator + /// from raw tabulated saturation functions. + /// + /// \param[in] ep Collection of all raw table saturation end points + /// for all tabulated saturation functions. Typically computed + /// by direct calls to the \code connateSat() \endcode, \code + /// criticalSat() \endcode, and \code maximumSat() \endcode of + /// the currently active \code Opm::SatFuncInterpolant \code + /// objects. + /// + /// \param[in] opt Options that identify a particular end-point + /// scaling behaviour of a particular saturation function curve. + /// + /// \return Subset of the input end points in a format intended for + /// passing as the first argument of member function \code eval() + /// \endcode of the \code EPSEvalInterface \endcode that + /// corresponds to the input options. + static std::vector + unscaledEndPoints(const RawTableEndPoints& ep, + const EPSOptions& opt); + }; +}} // namespace Opm::SatFunc + +#endif // OPM_ECLENDPOINTSCALING_HEADER_INCLUDED diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLFluxCalc.cpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLFluxCalc.cpp new file mode 100644 index 0000000000..712c433e60 --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLFluxCalc.cpp @@ -0,0 +1,86 @@ +/* + Copyright 2017 Statoil ASA. + + This file is part of the Open Porous Media project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#include +#include + +#include + +#include + +namespace Opm +{ + + ECLFluxCalc::ECLFluxCalc(const ECLGraph& graph, + ECLSaturationFunc&& satfunc) + : graph_(graph) + , satfunc_(std::move(satfunc)) + , neighbours_(graph.neighbours()) + , transmissibility_(graph.transmissibility()) + { + } + + + + + + std::vector + ECLFluxCalc::flux(const ECLRestartData& rstrt, + const ECLPhaseIndex phase) const + { + // Obtain dynamic data. + DynamicData dyn_data; + dyn_data.pressure = graph_ + .linearisedCellData(rstrt, "PRESSURE", + &ECLUnits::UnitSystem::pressure); + + dyn_data.relperm = this->satfunc_ + .relperm(this->graph_, rstrt, phase); + + // Compute fluxes per connection. + const int num_conn = transmissibility_.size(); + std::vector fluxvec(num_conn); + for (int conn = 0; conn < num_conn; ++conn) { + fluxvec[conn] = singleFlux(conn, dyn_data); + } + return fluxvec; + } + + + + + + double ECLFluxCalc::singleFlux(const int connection, + const DynamicData& dyn_data) const + { + const int c1 = neighbours_[2*connection]; + const int c2 = neighbours_[2*connection + 1]; + const double transmissibility = transmissibility_[connection]; + const double viscosity = 1.0 * prefix::centi * unit::Poise; + const auto& pressure = dyn_data.pressure; + + const int upwind_cell = (pressure[c2] > pressure[c1]) ? c2 : c1; + const double kr = dyn_data.relperm[upwind_cell]; + + const double mobility = kr / viscosity; + return mobility * transmissibility * (pressure[c1] - pressure[c2]); + } + + +} // namespace Opm diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLFluxCalc.hpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLFluxCalc.hpp new file mode 100644 index 0000000000..9e7b6ac6c7 --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLFluxCalc.hpp @@ -0,0 +1,76 @@ +/* + Copyright 2017 Statoil ASA. + + This file is part of the Open Porous Media project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#ifndef OPM_ECLFLUXCALC_HEADER_INCLUDED +#define OPM_ECLFLUXCALC_HEADER_INCLUDED + +#include +#include +#include + +#include + +namespace Opm +{ + class ECLRestartData; + + /// Class for computing connection fluxes in the absence of flux output. + class ECLFluxCalc + { + public: + /// Construct from ECLGraph. + /// + /// \param[in] graph Connectivity data, as well as providing a means to read data from the restart file. + explicit ECLFluxCalc(const ECLGraph& graph, + ECLSaturationFunc&& satfunc); + + /// Retrive phase flux on all connections defined by \code + /// graph.neighbours() \endcode. + /// + /// \param[in] rstrt ECL Restart data set from which to extract + /// relevant data per cell. + /// + /// \param[in] phase Canonical phase for which to retrive flux. + /// + /// \return Flux values corresponding to selected phase. + /// Empty if required data is missing. + /// Numerical values in SI units (rm^3/s). + std::vector + flux(const ECLRestartData& rstrt, + const ECLPhaseIndex phase) const; + + private: + struct DynamicData + { + std::vector pressure; + std::vector relperm; + }; + + double singleFlux(const int connection, + const DynamicData& dyn_data) const; + + const ECLGraph& graph_; + ECLSaturationFunc satfunc_; + std::vector neighbours_; + std::vector transmissibility_; + }; + +} // namespace Opm + +#endif // OPM_ECLFLUXCALC_HEADER_INCLUDED diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLGraph.cpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLGraph.cpp new file mode 100644 index 0000000000..f56f880c35 --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLGraph.cpp @@ -0,0 +1,2395 @@ +/* + Copyright 2016, 2017 Statoil ASA. + + This file is part of the Open Porous Media Project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#if HAVE_CONFIG_H +#include +#endif + +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +/// \file +/// +/// Implementation of \c ECLGraph interface. + +namespace { + namespace ECL { + using GridPtr = ::ERT::ert_unique_ptr; + + /// Internalise on-disk representation of ECLIPSE grid. + /// + /// \param[in] grid Name or prefix of on-disk representation of + /// ECLIPSE grid. If using a prefix, the loader + /// will consider both .EGRID and .GRID versions of + /// the input. + /// + /// \return Internalised ERT Grid representation. + GridPtr loadCase(const boost::filesystem::path& grid); + + /// Retrieve total number of grids managed by model's main grid. + /// + /// \param[in] G Main grid obtained from loadCase(). + /// + /// \return Total number of grids in \p G. Equal to 1 + total + /// number of LGRs in model. + int numGrids(const ecl_grid_type* G); + + /// Access individual grid by numeric index. + /// + /// \param[in] G Main grid obtained from loadCase(). + /// + /// \param[in] gridID Numeric index of requested grid. Zero for the + /// main grid (i.e., \p G itself) or positive for one of the + /// LGRs. Must be strictly less than \code numGrids(G) \endcode. + /// + /// \return Pointer to ECL grid corresponding to numeric ID. + const ecl_grid_type* + getGrid(const ecl_grid_type* G, const int gridID); + + /// Retrieve grid name. + /// + /// \param[in] ERT Grid representation. + /// + /// \param[in] gridID Numeric index of requested grid. Zero for the + /// main grid or positive for one of the LGRs. + /// + /// \return Name of grid \p G. Empty for the main grid. + std::string + getGridName(const ecl_grid_type* G, const int gridID); + + /// Extract Cartesian dimensions of an ECL grid. + /// + /// \param[in] G ERT grid instance corresponding to the model's main + /// grid or one of its LGRs. Typically obtained from function + /// getGrid(). + /// + /// \return Cartesian dimensions of \p G. Corresponds to number of + /// cells in each cardinal direction in 3D depositional space. + std::array + cartesianDimensions(const ecl_grid_type* G); + + /// Access unit conventions pertaining to single grid in result set. + /// + /// \tparam ResultSet Type representing a result set. Must + /// implement methods \code haveKeywordData() \endcode and \code + /// keywordData<>() \endcode. Typically \code Opm::ECLRestartData + /// \endcode or \code Opm::ECLInitFileData \endcode. + /// + /// \param[in] rset Result set. + /// + /// \param[in] gridID ID (name) of particular grid. Empty for the + /// main grid. + /// + /// \return Unit system convention for \p gridID in result set. + template + auto getUnitSystem(const ResultSet& rset, + const std::string& gridID) + -> decltype(::Opm::ECLUnits::createUnitSystem(0)); + + /// Retrieve global pore-volume vector from INIT source. + /// + /// Specialised tool needed to determine the active cells. + /// + /// \param[in] G ERT Grid representation. + /// + /// \param[in] init ERT representation of INIT source. + /// + /// \param[in] gridID ID (name) of grid. Empty for the main grid + /// and non-empty in the case of an LGR. + /// + /// \return Vector of pore-volumes for all global cells of \p G in + /// SI unit conventions (rm^3). + std::vector + getPVolVector(const ecl_grid_type* G, + const ::Opm::ECLInitFileData& init, + const std::string& gridID = ""); + + /// Extract non-neighbouring connections from ECLIPSE model + /// + /// \param[in] G ERT Grid representation corresponding to model's + /// main grid obtained directly from loadCase(). + /// + /// \param[in] init ERT representation of INIT source. + /// + /// \return Model's non-neighbouring connections, including those + /// between main and local grids. + std::vector + loadNNC(const ecl_grid_type* G, + const ecl_file_type* init); + + /// Cartesian connections in a model grid. + class CartesianGridData + { + public: + /// Constructor. + /// + /// \param[in] G ERT grid structure corresponding either to the + /// model's main grid or, if applicable, one of its LGRs. + /// + /// \param[in] init Internalised ERT representation of result + /// set's INIT file. + /// + /// \param[in] gridID Numeric identifier of this grid. Zero for + /// main grid, positive for LGRs. + CartesianGridData(const ecl_grid_type* G, + const ::Opm::ECLInitFileData& init, + const int gridID); + + /// Retrieve non-negative numeric ID of grid instance. + /// + /// \return Constructor's \c gridID parameter. + int gridID() const; + + const std::string& gridName() const; + + /// Retrieve number of active cells in graph. + std::size_t numCells() const; + + /// Retrive number of connections in graph. + std::size_t numConnections() const; + + /// Retrive neighbourship relations between active cells. + /// + /// The \c i-th connection is between active cells \code + /// neighbours()[2*i + 0] \endcode and \code neighbours()[2*i + 1] + /// \endcode. + const std::vector& neighbours() const; + + /// Retrive static pore-volume values on active cells only. + /// + /// Corresponds to the \c PORV vector in the INIT file, possibly + /// restricted to those active cells for which the pore-volume is + /// strictly positive. SI unit conventions (rm^3). + const std::vector& activePoreVolume() const; + + /// Retrieve static (background) transmissibility values on all + /// connections defined by \code neighbours() \endcode. + /// + /// Specifically, \code transmissibility()[i] \endcode is the + /// transmissibility of the connection between cells \code + /// neighbours()[2*i + 0] \endcode and \code neighbours()[2*i + + /// 1] \endcode. + const std::vector& transmissibility() const; + + /// Retrieve ID of active cell from global ID. + int activeCell(const std::size_t globalCell) const; + + /// Retrieve ID of active cell from (I,J,K) index tuple. + int activeCell(const int i, const int j, const int k) const; + + /// Predicate for whether or not a particular active cell is + /// further subdivided by an LGR. + /// + /// \param[in] cellID Index of particular active cell in this + /// grid. + /// + /// \return Whether or not cell identified by grid-local active + /// index \p cellID is further subdivided by an LGR. + bool isSubdivided(const int cellID) const; + + /// Retrieve values of result set vector for all global cells in + /// grid. + /// + /// Mostly for implementing connectionData(). + /// + /// \param[in] src ECLIPSE result set. + /// + /// \param[in] vector Name of result set vector. + /// + /// \return Numerical values of result set vector, relative to + /// global cell numbering of this grid. + template + std::vector + cellData(const ResultSet& rset, + const std::string& vector) const; + + template + std::vector + activeCellData(const ResultSet& rset, + const std::string& vector) const; + + /// Retrieve values of result set vector for all Cartesian + /// connections in grid. + /// + /// \param[in] src ECLIPSE result set. + /// + /// \param[in] vector Name prefix of result set vector (e.g., + /// "FLROIL" for oil flux (flow-rate of oil)). + /// + /// \return Numerical values of result set vector attributed to + /// all of the grid's Cartesian connections. + std::vector + connectionData(const ::Opm::ECLRestartData& rstrt, + const std::string& vector, + const double unit) const; + + private: + /// Facility for deriving Cartesian neighbourship in a grid + /// (main or LGR) and for mapping result set vectors to grid's + /// canonical (global) cells. + class CartesianCells + { + public: + /// Canonical directions of Cartesian neighbours. + enum class Direction { I, J, K }; + + /// Constructor + /// + /// \param[in] G ERT Grid representation. + /// + /// \param[in] pvol Vector of pore-volumes on all global + /// cells of \p G. Typically obtained through function + /// getPVolVector(). Numerical values assumed to be in + /// SI units (rm^3). + CartesianCells(const ecl_grid_type* G, + const std::vector& pvol); + + /// Retrive global cell indices of all active cells in grid. + std::vector activeGlobal() const; + + /// Retrieve pore-volume values for all active cells in grid. + /// + /// SI unit conventions (rm^3). + const std::vector& activePoreVolume() const; + + /// Map input vector to all global cells. + /// + /// \param[in] x Input vector, defined on the explicitly + /// active cells, all global cells or some + /// other subset (e.g., all non-neighbouring + /// connections). + /// + /// \return Input vector mapped to global cells or unchanged + /// if input is defined on some other subset. + template + std::vector + scatterToGlobal(const std::vector& x) const; + + /// Restrict input vector to active grid cells. + /// + /// Selects subsets corresponding to active cells (i.e., + /// those cells for which \code pore_volume > 0 \endcode) if + /// input size is + /// + /// - All global cells + /// - Explicitly active cells (ACTNUM != 0) + /// + /// All other cases are returned unfiltered--i.e., as direct + /// copies of the input. + /// + /// \param[in] x Input vector, defined on the explicitly + /// active cells, all global cells or some + /// other subset (e.g., all non-neighbouring + /// connections). + /// + /// \return Input vector restricted to active cells if + /// subset known. Direct copy if \p x is defined on set + /// other than explicitly active or all global cells. + template + std::vector + gatherToActive(const std::vector& x) const; + + /// Retrieve total number of cells in grid, including + /// inactive ones. + /// + /// Needed to allocate result vectors on global cells. + std::size_t numGlobalCells() const; + + /// Retrieve active cell ID of particular global cell. + /// + /// \param[in] globalCell Index of particular global cell. + /// + /// \return Active cell ID of \p globalCell. Returns + /// negative one (\code -1 \endcode) if \code globalCell >= + /// numGlobalCells \endcode or if the global cell is + /// inactive. + int getActiveCell(const std::size_t globalCell) const; + + /// Retrieve global cell ID of from (I,J,K) index tuple. + std::size_t + getGlobalCell(const int i, const int j, const int k) const; + + /// Retrieve active cell ID of particular global cell's + /// neighbour in given Cartesian direction. + /// + /// \param[in] globalCell Index of particular global cell. + /// + /// \param[in] d Cartesian direction in which to look for a + /// neighbouring cell. + /// + /// \return Active cell ID of \p globalCell's neighbour in + /// direction \d. Returns negative one (\code -1 \endcode) + /// if \code globalCell >= numGlobalCells \endcode or if the + /// global cell is inactive, or if there is no neighbour in + /// direction \p d (e.g., if purported neighbour would be + /// outside model). + int getNeighbour(const std::size_t globalCell, + const Direction d) const; + + /// Predicate for whether or not a particular active cell is + /// further subdivided by an LGR. + bool isSubdivided(const int cellID) const; + + private: + struct ResultSetMapping { + /// Explicit mapping between ACTNUM!=0 cells and global + /// cells. + struct ID { + std::size_t act; + std::size_t glob; + }; + + /// Number of explicitly active cells (SUM(ACTNUM != 0)). + std::size_t num_active; + + /// Active subset of global cells. + std::vector subset; + }; + + using IndexTuple = std::array; + + /// Size of grid's bounding box (i.e., the number of cells + /// in each cardinal direction in 3D depositional space). + const IndexTuple cartesianSize_; + + /// Map cell-based data vectors to grid's global cells. + ResultSetMapping rsMap_; + + /// Static pore-volumes of all active cells. + std::vector activePVol_; + + /// Active index of model's global cells. + std::vector active_ID_; + + /// Whether or not a particular active cell is subdivided. + std::vector is_divided_; + + /// Retrieve number of active cells in grid. + std::size_t numActiveCells() const; + + /// Compute linear index of global cell from explicit + /// (I,J,K) tuple. + /// + /// \param[in] ijk Explicit (I,J,K) tuple of global cell. + /// + /// \return Linear index (natural ordering) of global cell + /// (I,J,K). + std::size_t globIdx(const IndexTuple& ijk) const; + + /// Decompose global (linear) cell index into its (I,J,K) + /// index tuple. + /// + /// \param[in] globalCell Index of particular global cell. + /// Must be in the range \code [0 .. numGlobalCells()) + /// \endcode. + /// + /// \return Index triplet of \p globalCell's location within + /// model. + IndexTuple ind2sub(const std::size_t globalCell) const; + }; + + /// Collection of global (cell) IDs. + using GlobalIDColl = std::vector; + + /// Collection of (global) cell IDs corresponding to the flow + /// source of each connection. + using OutCell = + std::map; + + /// Collection of direction strings to simplify vector name + /// derivation (replaces chains of if-else) + using DirectionSuffix = + std::map; + + /// Numeric identity of this grid. Zero for main grid, greater + /// than zero for LGRs. + const int gridID_; + + /// Grid name. Mostly for querying properties in local grids. + const std::string gridName_; + + /// Map results from active to global cells. + CartesianCells cells_; + + /// Known directional suffixes. + DirectionSuffix suffix_; + + /// Flattened neighbourship relation (array of size \code + /// 2*numConnections() \endcode). + std::vector neigh_; + + /// Source cells for each Cartesian connection. + OutCell outCell_; + + /// Transmissibility field for purpose of on-demand flux + /// calculation if fluxes are not already available in dynamic + /// result set. + std::vector trans_; + + /// Predicate for whether or not a particular result vector is + /// defined on the grid's cells. + /// + /// \tparam ResultSet Representation of an ECLIPSE result set. + /// Typically \code Opm::ECLInitFileData \endcode or \code + /// Opm::ECLRestartData \endcode. + /// + /// \param[in] rset Result set. + /// + /// \param[in] vector Name of result vector. + /// + /// \return Whether or not \p vector is defined on model's cells + /// and part of the result set \p src. + template + bool haveCellData(const ResultSet& rset, + const std::string& keyword) const; + + /// Predicate for whether or not a particular result vector is + /// defined on the grid's Cartesian connections. + /// + /// \param[in] src Result set. + /// + /// \param[in] vector Prefix of result vector name. + /// + /// \return Whether or not all vectors formed by \p vector plus + /// known directional suffixes are defined on model's cells + /// and part of the result set \p src. + bool haveConnData(const ::Opm::ECLRestartData& rstrt, + const std::string& keyword) const; + + /// Append directional cell data to global collection of + /// connection data identified by vector name prefix. + /// + /// \param[in] src Result set. + /// + /// \param[in] d Cartesian direction. + /// + /// \param[in] vector Prefix of result vector name. + /// + /// \param[in,out] x Global collection of connection data. On + /// input, collection of values corresponding to any previous + /// directions (preserved), and on output additionally contains + /// the data corresponding to the Cartesian direction \p d. + void connectionData(const ::Opm::ECLRestartData& rstrt, + const CartesianCells::Direction d, + const std::string& vector, + const double unit, + std::vector& x) const; + + /// Form complete name of directional result set vector from + /// prefix and identified direction. + /// + /// \param[in] vector Prefix of result vector name. + /// + /// \param[in] d Cartesian direction. + /// + /// \return \code vector + suffix_[d] \endcode. + std::string + vectorName(const std::string& vector, + const CartesianCells::Direction d) const; + + /// Derive neighbourship relations on active cells in particular + /// Cartesian directions and capture transmissibilty field. + /// + /// Writes to \c neigh_ and \c outCell_. + /// + /// \param[in] gcells Collection of global (relative to \c + /// gridID_) cells that should be considered active (strictly + /// positive pore-volume and not deactivated through + /// ACTNUM=0). + /// + /// \param[in] init Internalised + void deriveNeighbours(const std::vector& gcells, + const ::Opm::ECLInitFileData& init, + const CartesianCells::Direction d); + }; + } // namespace ECL +} // Anonymous namespace + +// ====================================================================== + +int ECL::numGrids(const ecl_grid_type* G) +{ + return 1 + ecl_grid_get_num_lgr(G); // Main + #LGRs. +} + +const ecl_grid_type* +ECL::getGrid(const ecl_grid_type* G, const int gridID) +{ + assert ((gridID >= 0) && "Grid ID must be non-negative"); + + if (gridID == ECL_GRID_MAINGRID_LGR_NR) { + return G; + } + + return ecl_grid_iget_lgr(G, gridID - 1); +} + +std::string +ECL::getGridName(const ecl_grid_type* G, const int gridID) +{ + if (gridID == ECL_GRID_MAINGRID_LGR_NR) { + return ""; // Empty for main grid. + } + + return ecl_grid_get_name(G); +} + +std::vector +ECL::getPVolVector(const ecl_grid_type* G, + const ::Opm::ECLInitFileData& init, + const std::string& gridID) +{ + auto make_szt = [](const int i) + { + return static_cast::size_type>(i); + }; + + const auto nglob = make_szt(ecl_grid_get_global_size(G)); + + auto pvol = std::vector(nglob, 1.0); + + auto kw = std::string{"PORV"}; + + if (init.haveKeywordData(kw, gridID)) { + pvol = init.keywordData(kw, gridID); + + assert ((pvol.size() == nglob) && + "Pore-volume must be provided for all global cells"); + + const auto pvol_unit = + getUnitSystem(init, gridID)->reservoirVolume(); + + for (auto& pv : pvol) { + pv = ::Opm::unit::convert::from(pv, pvol_unit); + } + } + + return pvol; +} + +ECL::GridPtr +ECL::loadCase(const boost::filesystem::path& grid) +{ + auto G = GridPtr{ + ecl_grid_load_case(grid.generic_string().c_str()) + }; + + if (! G) { + std::ostringstream os; + + os << "Failed to load ECL Grid from " + << grid.generic_string(); + + throw std::invalid_argument(os.str()); + } + + return G; +} + +std::array +ECL::cartesianDimensions(const ecl_grid_type* G) +{ + auto make_szt = [](const int i) + { + return static_cast(i); + }; + + return { { make_szt(ecl_grid_get_nx(G)) , + make_szt(ecl_grid_get_ny(G)) , + make_szt(ecl_grid_get_nz(G)) } }; +} + +template +auto ECL::getUnitSystem(const ResultSet& rset, + const std::string& grid_ID) + -> decltype(::Opm::ECLUnits::createUnitSystem(0)) +{ + assert (rset.haveKeywordData(INTEHEAD_KW, grid_ID) + && "Result Set Does Not Provide Grid Header"); + + const auto ih = rset.template keywordData(INTEHEAD_KW, grid_ID); + + const auto usys = ih[INTEHEAD_UNIT_INDEX]; + const auto validUsys = (usys >= 1) && (usys <= 4); + + if (! validUsys) { + if (! grid_ID.empty()) { + // Unity system not provided in local grid. Fall back to + // querying the main grid instead. + + const auto mainGrid = std::string{ "" }; + + return getUnitSystem(rset, mainGrid); + } + + throw std::out_of_range { + "No Valid Unit System Key in Result-Set" + }; + } + + return ::Opm::ECLUnits::createUnitSystem(usys); +} + +std::vector +ECL::loadNNC(const ecl_grid_type* G, + const ecl_file_type* init) +{ + auto make_szt = [](const int n) + { + return static_cast::size_type>(n); + }; + + auto nncData = std::vector{}; + + const auto numNNC = make_szt(ecl_nnc_export_get_size(G)); + + if (numNNC > 0) { + nncData.resize(numNNC); + + ecl_nnc_export(G, init, nncData.data()); + } + + return nncData; +} + +// ====================================================================== + +ECL::CartesianGridData:: +CartesianCells::CartesianCells(const ecl_grid_type* G, + const std::vector& pvol) + : cartesianSize_(::ECL::cartesianDimensions(G)) +{ + if (pvol.size() != static_cast + (this->cartesianSize_[0] * + this->cartesianSize_[1] * + this->cartesianSize_[2])) + { + throw std::invalid_argument("Grid must have PORV for all cells"); + } + + auto make_szt = [](const int i) + { + return static_cast(i); + }; + + using ID = ResultSetMapping::ID; + + this->rsMap_.num_active = make_szt(ecl_grid_get_nactive(G)); + + this->rsMap_.subset.clear(); + this->rsMap_.subset.reserve(this->rsMap_.num_active); + + for (decltype(ecl_grid_get_nactive(G)) + act = 0, nact = ecl_grid_get_nactive(G); + act < nact; ++act) + { + const auto glob = + make_szt(ecl_grid_get_global_index1A(G, act)); + + if (pvol[glob] > 0.0) { + this->rsMap_.subset.push_back(ID{ make_szt(act), glob }); + } + } + + { + std::vector(pvol.size(), -1).swap(this->active_ID_); + + this->activePVol_.clear(); + this->activePVol_.reserve(this->rsMap_.subset.size()); + + this->is_divided_.clear(); + this->is_divided_.reserve(this->rsMap_.subset.size()); + + auto active = 0; + + for (const auto& cell : this->rsMap_.subset) { + this->active_ID_[cell.glob] = active++; + this->activePVol_.push_back(pvol[cell.glob]); + + const auto ert_active = static_cast(cell.act); + const auto is_divided = + nullptr != ecl_grid_get_cell_lgr1A(G, ert_active); + + this->is_divided_.push_back(is_divided); + } + } +} + +std::vector +ECL::CartesianGridData::CartesianCells::activeGlobal() const +{ + auto active = std::vector{}; + active.reserve(this->numActiveCells()); + + for (const auto& id : this->rsMap_.subset) { + active.push_back(id.glob); + } + + return active; +} + +const std::vector& +ECL::CartesianGridData::CartesianCells::activePoreVolume() const +{ + return this->activePVol_; +} + +template +std::vector +ECL::CartesianGridData:: +CartesianCells::scatterToGlobal(const std::vector& x) const +{ + // Assume that input vector 'x' is either defined on explicit notion of + // active cells (ACTNUM != 0) or on all global cells or some other + // contiguous index set (e.g., the NNCs). + + const auto num_explicit_active = + static_cast(this->rsMap_.num_active); + + if (x.size() != num_explicit_active) { + // Input not defined on explictly active cells. Let caller deal + // with it. This typically corresponds to the set of global cells + // or the list of NNCs. + return x; + } + + auto y = std::vector(this->numGlobalCells()); + + for (const auto& i : this->rsMap_.subset) { + y[i.glob] = x[i.act]; + } + + return y; +} + +namespace { namespace ECL { + template + std::vector + CartesianGridData::CartesianCells:: + gatherToActive(const std::vector& x) const + { + const auto num_explicit_active = + static_cast(this->rsMap_.num_active); + + if (x.size() == num_explicit_active) { + // Input defined on explictly active cells (ACTNUM != 0). + // Extract subset of these. + + auto ax = std::vector{}; + ax.reserve(this->numActiveCells()); + + for (const auto& i : this->rsMap_.subset) { + ax.push_back(x[i.act]); + } + + return ax; + } + + if (x.size() == this->numGlobalCells()) { + // Input defined on all global cells. Extract active subset. + + auto ax = std::vector{}; + ax.reserve(this->numActiveCells()); + + for (const auto& i : this->rsMap_.subset) { + ax.push_back(x[i.glob]); + } + + return ax; + } + + // Input defined on neither explicitly active nor global cells. + // Possibly on all grid's NNCs. Let caller deal with this. + return x; + } +}} // namespace Anonymous::ECL + +std::size_t +ECL::CartesianGridData::CartesianCells::numGlobalCells() const +{ + return this->active_ID_.size(); +} + +int +ECL::CartesianGridData:: +CartesianCells::getActiveCell(const std::size_t globalCell) const +{ + if (globalCell >= numGlobalCells()) { return -1; } + + return this->active_ID_[globalCell]; +} + +std::size_t +ECL::CartesianGridData:: +CartesianCells::getGlobalCell(const int i, const int j, const int k) const +{ + const auto ijk = IndexTuple { + static_cast(i), + static_cast(j), + static_cast(k), + }; + + return this->globIdx(ijk); +} + +int +ECL::CartesianGridData:: +CartesianCells::getNeighbour(const std::size_t globalCell, + const Direction d) const +{ + if (globalCell >= numGlobalCells()) { return -1; } + + auto ijk = ind2sub(globalCell); + + if (d == Direction::I) { ijk[0] += 1; } + else if (d == Direction::J) { ijk[1] += 1; } + else if (d == Direction::K) { ijk[2] += 1; } + else { + return -1; + } + + const auto globNeigh = globIdx(ijk); + + if (globNeigh >= numGlobalCells()) { return -1; } + + return this->active_ID_[globNeigh]; +} + +bool +ECL::CartesianGridData::CartesianCells::isSubdivided(const int cellID) const +{ + const auto ix = + static_castis_divided_.size())>(cellID); + + assert ((cellID >= 0) && (ix < this->is_divided_.size())); + + return this->is_divided_[ix]; +} + +std::size_t +ECL::CartesianGridData::CartesianCells::numActiveCells() const +{ + return this->rsMap_.subset.size(); +} + +std::size_t +ECL::CartesianGridData:: +CartesianCells::globIdx(const IndexTuple& ijk) const +{ + const auto& dim = this->cartesianSize_; + + for (auto d = 0*dim.size(), nd = dim.size(); d < nd; ++d) { + if (ijk[d] >= dim[d]) { return -1; } + } + + return ijk[0] + dim[0]*(ijk[1] + dim[1]*ijk[2]); +} + +ECL::CartesianGridData::CartesianCells::IndexTuple +ECL::CartesianGridData:: +CartesianCells::ind2sub(const std::size_t globalCell) const +{ + assert (globalCell < numGlobalCells()); + + auto ijk = IndexTuple{}; + auto g = globalCell; + + const auto& dim = this->cartesianSize_; + + ijk[0] = g % dim[0]; g /= dim[0]; + ijk[1] = g % dim[1]; + ijk[2] = g / dim[1]; assert (ijk[2] < dim[2]); + + assert (globIdx(ijk) == globalCell); + + return ijk; +} + +// ====================================================================== + +ECL::CartesianGridData:: +CartesianGridData(const ecl_grid_type* G, + const ::Opm::ECLInitFileData& init, + const int gridID) + : gridID_ (gridID) + , gridName_(::ECL::getGridName(G, gridID)) + , cells_ (G, ::ECL::getPVolVector(G, init, gridName_)) +{ + { + using VT = DirectionSuffix::value_type; + + suffix_.insert(VT(CartesianCells::Direction::I, "I+")); + suffix_.insert(VT(CartesianCells::Direction::J, "J+")); + suffix_.insert(VT(CartesianCells::Direction::K, "K+")); + } + + const auto gcells = this->cells_.activeGlobal(); + + // Too large, but this is a quick estimate. + this->neigh_.reserve(3 * (2 * this->numCells())); + this->trans_.reserve(3 * (1 * this->numCells())); + + for (const auto d : { CartesianCells::Direction::I , + CartesianCells::Direction::J , + CartesianCells::Direction::K }) + { + this->deriveNeighbours(gcells, init, d); + } +} + +int ECL::CartesianGridData::gridID() const +{ + return this->gridID_; +} + +const std::string& +ECL::CartesianGridData::gridName() const +{ + return this->gridName_; +} + +std::size_t +ECL::CartesianGridData::numCells() const +{ + return this->activePoreVolume().size(); +} + +std::size_t +ECL::CartesianGridData::numConnections() const +{ + return this->neigh_.size() / 2; +} + +const std::vector& +ECL::CartesianGridData::neighbours() const +{ + return this->neigh_; +} + +const std::vector& +ECL::CartesianGridData::activePoreVolume() const +{ + return this->cells_.activePoreVolume(); +} + +const std::vector& +ECL::CartesianGridData::transmissibility() const +{ + return this->trans_; +} + +int +ECL::CartesianGridData::activeCell(const std::size_t globalCell) const +{ + return this->cells_.getActiveCell(globalCell); +} + +int +ECL::CartesianGridData::activeCell(const int i, + const int j, + const int k) const +{ + return this->activeCell(this->cells_.getGlobalCell(i, j, k)); +} + +bool +ECL::CartesianGridData::isSubdivided(const int cellID) const +{ + return this->cells_.isSubdivided(cellID); +} + +template +std::vector +ECL::CartesianGridData:: +cellData(const ResultSet& rset, + const std::string& vector) const +{ + if (! this->haveCellData(rset, vector)) { + return {}; + } + + const auto x = + rset.template keywordData(vector, this->gridName()); + + return this->cells_.scatterToGlobal(x); +} + +namespace { namespace ECL { + template + std::vector + CartesianGridData::activeCellData(const ResultSet& rset, + const std::string& vector) const + { + if (! this->haveCellData(rset, vector)) { + return {}; + } + + auto x = rset.template keywordData(vector, this->gridName()); + + return this->cells_.gatherToActive(std::move(x)); + } +}} // namespace Anonymous::ECL + +template +bool +ECL::CartesianGridData:: +haveCellData(const ResultSet& rset, + const std::string& vector) const +{ + return rset.haveKeywordData(vector, this->gridName()); +} + +bool +ECL::CartesianGridData:: +haveConnData(const ::Opm::ECLRestartData& rstrt, + const std::string& vector) const +{ + auto have_data = true; + + for (const auto& d : { CartesianCells::Direction::I , + CartesianCells::Direction::J , + CartesianCells::Direction::K }) + { + const auto vname = this->vectorName(vector, d); + + have_data = this->haveCellData(rstrt, vname); + + if (! have_data) { break; } + } + + return have_data; +} + +std::vector +ECL::CartesianGridData:: +connectionData(const ::Opm::ECLRestartData& rstrt, + const std::string& vector, + const double unit) const +{ + if (! this->haveConnData(rstrt, vector)) { + return {}; + } + + auto x = std::vector{}; x.reserve(this->numConnections()); + + for (const auto& d : { CartesianCells::Direction::I , + CartesianCells::Direction::J , + CartesianCells::Direction::K }) + { + const auto vname = this->vectorName(vector, d); + + this->connectionData(rstrt, d, vname, unit, x); + } + + return x; +} + +void +ECL::CartesianGridData:: +connectionData(const ::Opm::ECLRestartData& rstrt, + const CartesianCells::Direction d, + const std::string& vector, + const double unit, + std::vector& x) const +{ + const auto v = this->cellData(rstrt, vector); + + const auto& cells = this->outCell_.find(d); + + assert ((cells != this->outCell_.end()) && + "Direction must be I, J, or K"); + + for (const auto& cell : cells->second) { + x.push_back(::Opm::unit::convert::from(v[cell], unit)); + } +} + +std::string +ECL::CartesianGridData:: +vectorName(const std::string& vector, + const CartesianCells::Direction d) const +{ + const auto i = this->suffix_.find(d); + + assert ((i != this->suffix_.end()) && + "Direction must be I, J, or K"); + + return vector + i->second; +} + +void +ECL::CartesianGridData:: +deriveNeighbours(const std::vector& gcells, + const ::Opm::ECLInitFileData& init, + const CartesianCells::Direction d) +{ + auto tran = std::string{"TRAN"}; + + switch (d) { + case CartesianCells::Direction::I: + tran += 'X'; + break; + + case CartesianCells::Direction::J: + tran += 'Y'; + break; + + case CartesianCells::Direction::K: + tran += 'Z'; + break; + + default: + throw std::invalid_argument("Input direction must be (I,J,K)"); + } + + const auto& T = init.haveKeywordData(tran, this->gridName()) + ? this->cellData(init, tran) + : std::vector(this->cells_.numGlobalCells(), 1.0); + + const auto trans_unit = + ECL::getUnitSystem(init, this->gridName())->transmissibility(); + + auto SI_trans = [trans_unit](const double trans) + { + return ::Opm::unit::convert::from(trans, trans_unit); + }; + + auto& ocell = this->outCell_[d]; + ocell.reserve(gcells.size()); + + for (const auto& globID : gcells) { + const auto c1 = this->cells_.getActiveCell(globID); + + assert ((c1 >= 0) && "Internal error in active cell derivation"); + + if (this->cells_.isSubdivided(c1)) { + // Don't form connections to subdivided cells. We care only + // about the final refinement level (i.e., the most nested LGR + // object) and the connections are handled by the NNC code. + continue; + } + + if (T[globID] > 0.0) { + const auto other = this->cells_.getNeighbour(globID, d); + + if ((other >= 0) && ! this->cells_.isSubdivided(other)) { + assert (c1 != other); + + this->neigh_.push_back(c1); + this->neigh_.push_back(other); + + ocell.push_back(globID); + this->trans_.push_back(SI_trans(T[globID])); + } + } + } +} + +// ===================================================================== + +/// Implementation of ECLGraph interface. +class Opm::ECLGraph::Impl +{ +public: + /// Constructor + /// + /// \param[in] grid Name or prefix of ECL grid (i.e., .GRID or + /// .EGRID) file. + /// + /// \param[in] init ECL INIT result set corresponding to \p grid + /// input. Assumed to provide at least a complete set + /// of pore-volume values (i.e., for all global cells + /// defined in the \p grid). + /// + /// If available in the INIT file, the constructor will + /// also leverage the transmissibility data when + /// constructing the active cell neighbourship table. + Impl(const boost::filesystem::path& grid, + const ECLInitFileData& init); + + /// Retrieve number of grids. + /// + /// \return The number of LGR grids plus one (the main grid). + int numGrids() const; + + /// Retrieve active cell ID from (I,J,K) tuple in particular grid. + /// + /// \param[in] gridID Identity of specific grid to which to relate the + /// (I,J,K) tuple. Zero for main grid and positive indices for any + /// LGRs. The (I,J,K) indices must be within the ranges implied by + /// the specific grid. + /// + /// \param[in] ijk Cartesian index tuple of particular cell. + /// + /// \return Active ID (relative to linear, global numbering) of cell \p + /// ijk from specified grid. Negative one (-1) if (I,J,K) outside + /// valid range or if the specific cell identified by \p ijk and \p + /// gridID is not actually active. + int activeCell(const std::string& gridID, + const std::array& ijk) const; + + /// Retrieve number of active cells in graph. + std::size_t numCells() const; + + /// Retrieve number of connections in graph. + std::size_t numConnections() const; + + /// Retrieve the simulation scenario's active phases. + /// + /// Mostly useful to determine the set of \c PhaseIndex values for which + /// flux() may return non-zero values. + const std::vector& activePhases() const; + + /// Retrieve the simulation scenario's set of active grids. + /// + /// Mostly for canonical lookup of result data in LGRs. + const std::vector& activeGrids() const; + + /// Retrieve neighbourship relations between active cells. + /// + /// The \c i-th connection is between active cells \code + /// neighbours()[2*i + 0] \endcode and \code neighbours()[2*i + 1] + /// \endcode. + std::vector neighbours() const; + + /// Retrieve static pore-volume values on active cells only. + /// + /// Corresponds to the \c PORV vector in the INIT file, possibly + /// restricted to those active cells for which the pore-volume is + /// strictly positive. + std::vector activePoreVolume() const; + + /// Retrieve static (background) transmissibility values on all + /// connections defined by \code neighbours() \endcode. + /// + /// Specifically, \code transmissibility()[i] \endcode is the + /// transmissibility of the connection between cells \code + /// neighbours()[2*i + 0] \endcode and \code neighbours()[2*i + 1] + /// \endcode. + std::vector transmissibility() const; + + /// Retrieve phase flux on all connections defined by \code neighbours() + /// \endcode. + /// + /// \param[in] phase Canonical phase for which to retrive flux. + /// + /// \param[in] rptstep Selected temporal vector. Report-step ID. + /// + /// \return Flux values corresponding to selected phase and report step. + /// Empty if unavailable in the result set (e.g., by querying the gas + /// flux in an oil/water system or if the specified \p occurrence is not + /// reported due to report frequencies or no flux values are output at + /// all). + std::vector + flux(const ECLRestartData& rstrt, + const ECLPhaseIndex phase) const; + + /// Retrieve result set vector from current view linearised on active + /// cells. + /// + /// \tparam T Element type of result set vector. + /// + /// \tparam ResultSet Implementation of an ECL Result Set. Typically + /// \code Opm::ECLRestartData \endcode or \code Opm::ECLInitFileData + /// \endcode. + /// + /// \param[in] rset ECL Result set. Typically an instance of \code + /// Opm::ECLRestartData \endcode or \code Opm::ECLInitFileData + /// \endcode. + /// + /// \param[in] vector Name of result set vector. + /// + /// \return Result set vector linearised on active cells. + template + std::vector + rawLinearisedCellData(const ResultSet& rset, + const std::string& vector) const; + + /// Retrieve floating-point result set vector from current view + /// (e.g., particular report step) linearised on active cells and + /// converted to strict SI unit conventions. + /// + /// Typical call: + /// \code + /// const auto press = + /// lCD(rstrt, "PRESSURE", &ECLUnits::UnitSystem::pressure); + /// \endcode + /// + /// \param[in] rstrt ECL Restart dataset. It is the responsibility of + /// the caller to ensure that the restart data is correctly + /// positioned on a particular report step. + /// + /// \param[in] vector Name of result set vector. + /// + /// \param[in] unit Call-back hook in \c UnitSystem implementation + /// that enables converting the raw result data to strict SI unit + /// conventions. Hook is called for each grid in the result set. + /// + /// \return Result set vector linearised on active cells, converted + /// to strict SI unit conventions. + std::vector + linearisedCellData(const ECLRestartData& rstrt, + const std::string& vector, + UnitConvention unit) const; + +private: + /// Collection of non-Cartesian neighbourship relations attributed to a + /// particular ECL keyword set (i.e., one of NNC{1,2}, NNC{G,L}, NNCLL). + class NonNeighKeywordIndexSet + { + public: + /// Establish mapping between particular non-Cartesian neighbourship + /// relation and particular entry within a grid's keyword data. + struct Map { + /// Non-Cartesian neighbourship relation. + std::size_t neighIdx; + + /// Index into grid's keyword data. + std::size_t kwIdx; + }; + + using MapCollection = std::vector; + + /// Record a mapping in a particular grid. + /// + /// \param[in] grid Particular model grid for which to record a + /// mapping. + /// + /// \param[in] entry Individual index map. + void add(const int grid, Map&& entry); + + /// Retrieve collection of index maps for particular grid. + /// + /// \param[in] grid Specific model grid ID. Must be non-negative + /// and strictly less than the total number of grids in the + /// model. + /// + /// \return Collection of index maps attributable to \p grid. Empty + /// if no such collection exists. + const MapCollection& getGridCollection(const int grid) const; + + private: + using KWEntries = std::map; + + /// Collection of all index maps attributable to all grids for this + /// set of ECL keywords. + KWEntries subset_; + + /// Return value for the case of no existing collection. + MapCollection empty_; + }; + + /// Collection of all non-Cartesian neighbourship relations classified + /// according to connection type. + class NNC + { + public: + /// Classification of non-Cartesian neighbourship relations. + enum class Category { + /// Traditional non-neighbouring connections entirely internal + /// to a grid. Typically due to faults or fully unstructured + /// grid descriptions. Keywords NNC{1,2}, TRANNNC, and FLR*N+. + /// Positive from NNC1 to NNC2. + Normal, + + /// Connections between main grid and LGRs. Keywords NNCG, + /// NNCL, TRANGL, and FLR*L+. Positive from NNCG to NNCL. + GlobalToLocal, + + /// Connections between LGRs. Either due to two LGRs being + /// neighbouring entities in physical space or one LGR being + /// nested within another. Keywords NNA{1,2}, TRANLL, and + /// FLR*A+. Positive from NNA1 to NNA2. + Amalgamated, + }; + + /// Map a collection of non-Cartesian neighbourship relations to a + /// specific flux vector identifier. + class FluxRelation { + public: + explicit FluxRelation(const std::string& fluxID) + : fluxID_(fluxID) + {} + + NonNeighKeywordIndexSet& indexSet() + { + return this->indexSet_; + } + + const NonNeighKeywordIndexSet& indexSet() const + { + return this->indexSet_; + } + + std::string makeKeyword(const std::string& prefix) const + { + return prefix + this->fluxID_; + } + + private: + /// Flux vector identifier. Should be one of "N+" for Normal + /// connections, "L+" for GlobalToLocal connections, and "A+" + /// for Amalgamated connections. + std::string fluxID_; + + /// Collection of non-Cartesian neighbourship relations. + NonNeighKeywordIndexSet indexSet_; + }; + + /// Constructor. + NNC(); + + /// Potentially record a new non-Cartesian connection. + /// + /// Will classify the connection according to the grids involved and + /// actually record the connection if both cells are active and + /// neither are subdivided. + /// + /// \param[in] grids Collection of all active grids in model. + /// + /// \param[in] offset Start index into global linear number for all + /// active grids. + /// + /// \param[in] trans_unit Unit of measurement of transmissibility + /// field stored in result set. Used to convert values to the + /// strict SI conventions (i.e., rm^3). + /// + /// \param[in] nnc Non-neighbouring connection from result set. + void add(const std::vector& grids, + const std::vector& offset, + const double trans_unit, + const ecl_nnc_type& nnc); + + std::vector allCategories() const; + + /// Retrieve total number of active non-neighbouring connections. + std::size_t numConnections() const; + + /// Access all active non-neighbouring connections. + const std::vector& getNeighbours() const; + + /// Access transmissibility field of all active non-neighbouring + /// connections. Numerical values in strict SI units (rm^3). + const std::vector& transmissibility() const; + + /// Retrieve all non-neighbouring connections of a particular + /// category (i.e., pertaining to a particular set of keywords). + /// + /// \param[in] type Category of non-neighbouring connections. + /// + /// \return All non-neighbouring connections of category \p type. + const FluxRelation& getRelations(const Category& type) const; + + private: + using KeywordIndexMap = std::map; + + /// Active non-Cartesian (non-neighbouring) connections. Cell IDs + /// in linear numbering of all model's active cells. + std::vector neigh_; + + /// Transmissibility of non-Cartesian (non-neighbouring) connections. + /// + /// Note that \code trans_[i] \endcode is the transmissibility of + /// the connection between cells \code neigh_[2*i + 0] \endcode and + /// \code neigh_[2*i + 1] \endcode. + std::vector trans_; + + /// Collection of + KeywordIndexMap keywords_; + + /// Factory for FluxRelations. + /// + /// Simplifies implementation of ctor. + /// + /// \param[in] cat Requested category of flux relation. + /// + /// \return Flux relation of type \p cat. + FluxRelation makeRelation(const Category cat) const; + + /// Identify connection category from connection's grids. + /// + /// - Normal connection if both grid IDs equal + /// - GlobalToLocal if one grid is the main model grid and the + /// other is an LGR. + /// - Amalgamated if both grids are LGRs. + /// + /// \param[in] grid1 Numeric identity of connection's first grid. + /// Zero if main grid, positive if LGR. + /// + /// \param[in] grid2 Numeric identity of connection's second grid. + /// Zero if main grid, positive if LGR. + /// + /// \return Category of connection between \p grid1 and \p grid2. + Category classifyConnection(const int grid1, const int grid2) const; + + /// Check if cell is viable connection endpoint in grid. + /// + /// A cell is a viable connection endpoint if it is active within a + /// particular grid and not further subdivided by an LGR. + /// + /// \param[in] grids Collection of all active grids in model. + /// + /// \param[in] gridID Numeric identity of connection grid. + /// Zero if main grid, positive if LGR. + /// + /// \param[in] cellID Global ID (relative to \p grid) of candidate + /// connection endpoint. + /// + /// \return Whether or not \p cellID is a viable connection endpoint + /// within \p gridID. + bool isViable(const std::vector& grids, + const int gridID, + const std::size_t cellID) const; + + /// Check if connection is viable + /// + /// A candidate non-Cartesian connection is viable if the associate + /// transmissibility is strictly positive and both of its endpoints + /// satisfy the viability criterion. + /// + /// \param[in] nnc Candidate non-Cartesian connection. + /// + /// \return Whether or not the transmissibility is positive and both + /// candidate endpoints satisfy the cell viability criterion. + bool isViable(const std::vector& grids, + const ecl_nnc_type& nnc) const; + }; + + /// Collection of model's non-neighbouring connections--be they within a + /// grid or between grids. + NNC nnc_; + + /// Collection of model's grids (main + LGRs). + std::vector grid_; + + /// Map each grid's active cellIDs to global numbering (in the index + /// range \code [0 .. numCells()) \endcode). + std::vector activeOffset_; + + /// Set of active phases in result set. Derived from .INIT on the + /// assumption that the set of active phases does not change throughout + /// the simulation run. + std::vector activePhases_; + + /// Set of active grids in result set. + std::vector activeGrids_; + + std::unordered_map gridID_; + + /// Extract explicit non-neighbouring connections from ECL output. + /// + /// Writes to \c neigh_ and \c nncID_. + /// + /// \param[in] G ERT Grid representation. + /// + /// \param[in] init ERT representation of INIT source. + void defineNNCs(const ecl_grid_type* G, + const ECLInitFileData& init); + + /// Extract scenario's set of active phases. + /// + /// Writes to activePhases_. + void defineActivePhases(const ::Opm::ECLInitFileData& init); + + /// Compute ECL vector basename for particular phase flux. + /// + /// \param[in] phase Canonical phase for which to derive ECL vector + /// basename. + /// + /// \return Basename for ECl vector corresponding to particular phase + /// flux. + std::string + flowVector(const ECLPhaseIndex phase) const; + + /// Extract flux values corresponding to particular result set vector + /// for all identified non-neighbouring connections. + /// + /// \tparam[in] GetFluxUnit Type of function object for computing the + /// grid-dependent flux unit. + /// + /// \param[in] rstrt ECL Restart data result set. + /// + /// \param[in] vector Result set vector prefix. Typically computed by + /// method flowVector(). + /// + /// \param[in] fluxUnit Function object for computing grid-dependent + /// flux units. Must support the syntax + /// \code + /// unit = fluxUnit(gridID) + /// \endcode + /// with 'gridID' being a non-negative \c int that identifies a + /// particular model grid (zero for the main grid and positive for + /// LGRs) and 'unit' a positive floating-point value. + /// + /// \param[in,out] flux Numerical values of result set vector. On + /// input, contains all values corresponding to all fully Cartesian + /// connections across all active grids. On output additionally + /// contains those values that correspond to the non-neighbouring + /// connections (appended onto \p flux). + template + void fluxNNC(const ECLRestartData& rstrt, + const std::string& vector, + GetFluxUnit&& fluxUnit, + std::vector& flux) const; +}; + +// ====================================================================== + +void +Opm::ECLGraph::Impl::NonNeighKeywordIndexSet:: +add(const int grid, Map&& entry) +{ + this->subset_[grid].push_back(std::move(entry)); +} + +const +Opm::ECLGraph::Impl::NonNeighKeywordIndexSet::MapCollection& +Opm::ECLGraph::Impl::NonNeighKeywordIndexSet:: +getGridCollection(const int grid) const +{ + auto coll = this->subset_.find(grid); + + if (coll == this->subset_.end()) { + // No NNCs of this category for this grid. Return empty. + return this->empty_; + } + + return coll->second; +} + +// ====================================================================== + +Opm::ECLGraph::Impl::NNC::NNC() +{ + using VT = KeywordIndexMap::value_type; + + for (const auto& cat : this->allCategories()) { + this->keywords_.insert(VT(cat, this->makeRelation(cat))); + } +} + +std::vector +Opm::ECLGraph::Impl::NNC::allCategories() const +{ + return { Category::Normal , + Category::GlobalToLocal , + Category::Amalgamated }; +} + +void +Opm::ECLGraph::Impl:: +NNC::add(const std::vector& grid, + const std::vector& offset, + const double trans_unit, + const ecl_nnc_type& nnc) +{ + if (! this->isViable(grid, nnc)) { + // Zero transmissibility or at least one endpoint unviable. Don't + // record connection. + return; + } + + const auto neighIdx = this->numConnections(); + + { + const auto c = grid[nnc.grid_nr1].activeCell(nnc.global_index1); + const auto o = static_cast(offset[nnc.grid_nr1]); + + this->neigh_.push_back(o + c); + } + + { + const auto c = grid[nnc.grid_nr2].activeCell(nnc.global_index2); + const auto o = static_cast(offset[nnc.grid_nr2]); + + this->neigh_.push_back(o + c); + } + + // Capture transmissibility field to support on-demand flux calculations + // if flux fields are not output to the on-disk result set. + this->trans_.push_back(unit::convert::from(nnc.trans, trans_unit)); + + const auto cat = this->classifyConnection(nnc.grid_nr1, nnc.grid_nr2); + + auto entry = NonNeighKeywordIndexSet::Map { + neighIdx, + static_cast(nnc.input_index) + }; + + auto rel = this->keywords_.find(cat); + if (rel != std::end(this->keywords_)) { + rel->second.indexSet().add(nnc.grid_nr2, std::move(entry)); + } +} + +std::size_t +Opm::ECLGraph::Impl::NNC::numConnections() const +{ + assert ((this->neigh_.size() % 2) == 0); + assert ((this->neigh_.size() / 2) == this->trans_.size()); + + return this->trans_.size(); +} + +const std::vector& +Opm::ECLGraph::Impl::NNC::getNeighbours() const +{ + return this->neigh_; +} + +const std::vector& +Opm::ECLGraph::Impl::NNC::transmissibility() const +{ + return this->trans_; +} + +const Opm::ECLGraph::Impl::NNC::FluxRelation& +Opm::ECLGraph::Impl::NNC::getRelations(const Category& cat) const +{ + auto r = this->keywords_.find(cat); + + assert ((r != this->keywords_.end()) && + "Input category must be Normal, " + "GlobalToLocal or Amalgamated"); + + return r->second; +} + +Opm::ECLGraph::Impl::NNC::FluxRelation +Opm::ECLGraph::Impl::NNC::makeRelation(const Category cat) const +{ + switch (cat) { + case Category::Normal: + return FluxRelation{ "N+" }; + + case Category::GlobalToLocal: + return FluxRelation{ "L+" }; + + case Category::Amalgamated: + return FluxRelation{ "A+" }; + } + + throw std::invalid_argument("Category must be Normal, " + "GlobalToLocal, or Amalgamated"); +} + +Opm::ECLGraph::Impl::NNC::Category +Opm::ECLGraph::Impl::NNC:: +classifyConnection(const int grid1, const int grid2) const +{ + if (grid1 == grid2) { + return Category::Normal; + } + + if (grid1 == ECL_GRID_MAINGRID_LGR_NR) { // Main grid + return Category::GlobalToLocal; + } + + return Category::Amalgamated; +} + +bool +Opm::ECLGraph::Impl::NNC:: +isViable(const std::vector& grids, + const int gridID, + const std::size_t cellID) const +{ + using GridIndex = decltype(grids.size()); + const auto gIdx = static_cast(gridID); + + if (gIdx >= grids.size()) { + return false; + } + + const auto& G = grids[gIdx]; + const auto acell = G.activeCell(cellID); + + return (acell >= 0) && (! G.isSubdivided(acell)); +} + +bool +Opm::ECLGraph::Impl::NNC:: +isViable(const std::vector& grids, + const ecl_nnc_type& nnc) const +{ + return (nnc.trans > 0.0) // Omit zero-trans NNCs + && this->isViable(grids, nnc.grid_nr1, nnc.global_index1) + && this->isViable(grids, nnc.grid_nr2, nnc.global_index2); +} + +// ====================================================================== + +Opm::ECLGraph::Impl::Impl(const boost::filesystem::path& grid, + const ECLInitFileData& init) +{ + const auto G = ECL::loadCase(grid); + + const auto numGrids = ECL::numGrids(G.get()); + + this->grid_.reserve(numGrids); + this->activeOffset_.reserve(numGrids + 1); + this->activeOffset_.push_back(0); + + for (auto gridID = 0*numGrids; gridID < numGrids; ++gridID) + { + this->grid_.emplace_back(ECL::getGrid(G.get(), gridID), + init, gridID); + + this->activeOffset_.push_back(this->activeOffset_.back() + + this->grid_.back().numCells()); + + this->activeGrids_.push_back(this->grid_.back().gridName()); + + this->gridID_[this->activeGrids_.back()] = gridID; + } + + this->defineNNCs(G.get(), init); + this->defineActivePhases(init); +} + +int +Opm::ECLGraph::Impl::numGrids() const +{ + return grid_.size(); +} + +int +Opm::ECLGraph::Impl:: +activeCell(const std::string& gridID, + const std::array& ijk) const +{ + const auto gID = this->gridID_.find(gridID); + if (gID == std::end(this->gridID_)) { + return -1; + } + + const auto gIdx = + static_castgrid_.size())>(gID->second); + + assert ((gIdx <= this->grid_.size()) && + "Logic Error in ECLGraph::Impl::Impl()"); + + const auto& grid = this->grid_[gIdx]; + + const auto active = grid.activeCell(ijk[0], ijk[1], ijk[2]); + + if ((active < 0) || grid.isSubdivided(active)) { + return -1; + } + + const auto off = static_cast(this->activeOffset_[gIdx]); + + return off + active; +} + +std::size_t +Opm::ECLGraph::Impl::numCells() const +{ + return this->activeOffset_.back(); +} + +std::size_t +Opm::ECLGraph::Impl::numConnections() const +{ + auto nconn = std::size_t{0}; + + for (const auto& G : this->grid_) { + nconn += G.numConnections(); + } + + return nconn + this->nnc_.numConnections(); +} + +const std::vector& +Opm::ECLGraph::Impl::activePhases() const +{ + return this->activePhases_; +} + +const std::vector& +Opm::ECLGraph::Impl::activeGrids() const +{ + return this->activeGrids_; +} + +std::vector +Opm::ECLGraph::Impl::neighbours() const +{ + auto N = std::vector{}; + + // this->numConnections() includes NNCs. + N.reserve(2 * this->numConnections()); + + { + auto off = this->activeOffset_.begin(); + + for (const auto& G : this->grid_) { + const auto add = static_cast(*off); + + for (const auto& cell : G.neighbours()) { + N.push_back(cell + add); + } + + ++off; + } + } + + { + const auto& nnc = this->nnc_.getNeighbours(); + + N.insert(N.end(), nnc.begin(), nnc.end()); + } + + return N; +} + +std::vector +Opm::ECLGraph::Impl::activePoreVolume() const +{ + auto pvol = std::vector{}; + pvol.reserve(this->numCells()); + + for (const auto& G : this->grid_) { + const auto& pv = G.activePoreVolume(); + + pvol.insert(pvol.end(), pv.begin(), pv.end()); + } + + return pvol; +} + +std::vector +Opm::ECLGraph::Impl::transmissibility() const +{ + auto trans = std::vector{}; + + // Recall: this->numConnections() includes NNCs. + const auto totconn = this->numConnections(); + trans.reserve(totconn); + + for (const auto& G : this->grid_) { + const auto& Ti = G.transmissibility(); + + trans.insert(trans.end(), Ti.begin(), Ti.end()); + } + + if (this->nnc_.numConnections() > 0) { + const auto& tranNNC = this->nnc_.transmissibility(); + + trans.insert(trans.end(), tranNNC.begin(), tranNNC.end()); + } + + if (trans.size() < totconn) { + return {}; + } + + return trans; +} + +std::vector +Opm::ECLGraph::Impl::flux(const ECLRestartData& rstrt, + const ECLPhaseIndex phase) const +{ + auto fluxUnit = [&rstrt](const std::string& gridID) + { + return ::ECL::getUnitSystem(rstrt, gridID)->reservoirRate(); + }; + + const auto vector = this->flowVector(phase); + + auto v = std::vector{}; + + // Recall: this->numConnections() includes NNCs. + const auto totconn = this->numConnections(); + + v.reserve(totconn); + + for (const auto& G : this->grid_) { + const auto& q = + G.connectionData(rstrt, vector, fluxUnit(G.gridName())); + + if (q.empty()) { + // Flux vector invalid unless all grids provide this result + // vector data. + return {}; + } + + v.insert(v.end(), q.begin(), q.end()); + } + + if (this->nnc_.numConnections() > 0) { + // Model includes non-neighbouring connections such as faults and/or + // local grid refinement. Extract pertinent flux values for these + // connections. + this->fluxNNC(rstrt, vector, std::move(fluxUnit), v); + } + + if (v.size() < totconn) { + // Result vector data not available for NNCs. Entire flux vector is + // invalid. + return {}; + } + + return v; +} + +namespace Opm { + + template + std::vector + ECLGraph::Impl::rawLinearisedCellData(const ResultSet& rset, + const std::string& vector) const + { + auto x = std::vector{}; x.reserve(this->numCells()); + + for (const auto& G : this->grid_) { + const auto xi = G.activeCellData(rset, vector); + + x.insert(x.end(), std::begin(xi), std::end(xi)); + } + + if (x.size() != this->numCells()) { + return {}; + } + + return x; + } +} // namespace Opm + +std::vector +Opm::ECLGraph::Impl::linearisedCellData(const ECLRestartData& rstrt, + const std::string& vector, + UnitConvention unit) const +{ + auto x = std::vector{}; x.reserve(this->numCells()); + + for (const auto& G : this->grid_) { + const auto xi = G.activeCellData(rstrt, vector); + + if (xi.empty()) { continue; } + + // Note: Compensate for incrementing Grid ID above. + const auto usys = + ECL::getUnitSystem(rstrt, G.gridName()); + + // Note: 'usys' (generally, std::unique_ptr<>) does not support + // regular PMF syntax (i.e., operator->*()). + const auto vector_unit = ((*usys).*unit)(); + + std::transform(std::begin(xi), std::end(xi), + std::back_inserter(x), + [vector_unit](const double value) + { + return ::Opm::unit::convert::from(value, vector_unit); + }); + } + + if (x.size() != this->numCells()) { + return {}; + } + + return x; +} + +void +Opm::ECLGraph::Impl::defineNNCs(const ecl_grid_type* G, + const ECLInitFileData& init) +{ + // Assume all transmissibilites in the result set follow the same unit + // conventions. + + const auto gridID = std::string{ "" }; // Empty in main grid. + + const auto trans_unit = + ECL::getUnitSystem(init, gridID)->transmissibility(); + + for (const auto& nnc : ECL::loadNNC(G, init.getRawFilePtr())) { + this->nnc_.add(this->grid_, this->activeOffset_, trans_unit, nnc); + } +} + +template +void +Opm::ECLGraph::Impl::fluxNNC(const ECLRestartData& rstrt, + const std::string& vector, + GetFluxUnit&& fluxUnit, + std::vector& flux) const +{ + auto v = std::vector(this->nnc_.numConnections(), 0.0); + auto assigned = std::vector(v.size(), false); + + for (const auto& cat : this->nnc_.allCategories()) { + const auto& rel = this->nnc_.getRelations(cat); + const auto fluxID = rel.makeKeyword(vector); + + for (const auto& G : this->grid_) { + const auto& gridName = G.gridName(); + + const auto& iset = + rel.indexSet().getGridCollection(G.gridID()); + + if (iset.empty() || + ! rstrt.haveKeywordData(fluxID, gridName)) + { + // No NNCs for this category in this grid or corresponding + // flux vector does not exist. Skip. + continue; + } + + const auto q = rstrt.keywordData(fluxID, gridName); + + if (q.empty()) { + // Empty flux data for this category in this grid. Not + // really supposed to happen if the above check fires, but + // skip this (category,gridID) pair nonetheless. + continue; + } + + const auto flux_unit = fluxUnit(gridName); + + // Data fully available for (category,gridName). Assign + // approriate subset of NNC flux vector. + for (const auto& ix : iset) { + assert (ix.neighIdx < v.size()); + assert (ix.kwIdx < q.size()); + + v[ix.neighIdx] = + unit::convert::from(q[ix.kwIdx], flux_unit); + + assigned[ix.neighIdx] = true; + } + } + } + + // NNC flux field is valid if there are no unassigned entries, i.e., if + // there are no 'false' values in the "assigned" record. + const auto valid = assigned.end() == + std::find(assigned.begin(), assigned.end(), false); + + if (valid) { + // This result set (flux) vector is fully supported by at least one + // category of non-Cartesian keywords. Append result to global flux + // vector. + flux.insert(flux.end(), v.begin(), v.end()); + } +} + +void +Opm::ECLGraph::Impl:: +defineActivePhases(const ::Opm::ECLInitFileData& init) +{ + const auto gridID = std::string{ "" }; // Empty in main grid. + + const auto ih = + init.keywordData(INTEHEAD_KW, gridID); + + const auto phaseMask = + static_cast(ih[INTEHEAD_PHASE_INDEX]); + + using Check = std::pair; + + const auto allPhases = std::vector { + { ECLPhaseIndex::Aqua , (1u << 1) }, + { ECLPhaseIndex::Liquid, (1u << 0) }, + { ECLPhaseIndex::Vapour, (1u << 2) }, + }; + + this->activePhases_.clear(); + for (const auto& phase : allPhases) { + if ((phase.second & phaseMask) != 0) { + this->activePhases_.push_back(phase.first); + } + } +} + +std::string +Opm::ECLGraph::Impl::flowVector(const ECLPhaseIndex phase) const +{ + const auto vector = std::string("FLR"); // Flow-rate, reservoir + + if (phase == ECLPhaseIndex::Aqua) { + return vector + "WAT"; + } + + if (phase == ECLPhaseIndex::Liquid) { + return vector + "OIL"; + } + + if (phase == ECLPhaseIndex::Vapour) { + return vector + "GAS"; + } + + { + std::ostringstream os; + + os << "Invalid phase index '" + << static_cast(phase) << '\''; + + throw std::invalid_argument(os.str()); + } +} + +// ====================================================================== + +Opm::ECLGraph::ECLGraph(ImplPtr pImpl) + : pImpl_(std::move(pImpl)) +{ +} + +Opm::ECLGraph::ECLGraph(ECLGraph&& rhs) + : pImpl_(std::move(rhs.pImpl_)) +{} + +Opm::ECLGraph::~ECLGraph() +{} + +Opm::ECLGraph& +Opm::ECLGraph::operator=(ECLGraph&& rhs) +{ + this->pImpl_ = std::move(rhs.pImpl_); + + return *this; +} + +Opm::ECLGraph +Opm::ECLGraph::load(const boost::filesystem::path& grid, + const ECLInitFileData& init) +{ + auto pImpl = ImplPtr{new Impl(grid, init)}; + + return { std::move(pImpl) }; +} + +int Opm::ECLGraph::numGrids() const +{ + return this->pImpl_->numGrids(); +} + +int +Opm::ECLGraph::activeCell(const std::array& ijk, + const std::string& gridID) const +{ + return this->pImpl_->activeCell(gridID, ijk); +} + +std::size_t Opm::ECLGraph::numCells() const +{ + return this->pImpl_->numCells(); +} + +std::size_t Opm::ECLGraph::numConnections() const +{ + return this->pImpl_->numConnections(); +} + +const std::vector& +Opm::ECLGraph::activePhases() const +{ + return this->pImpl_->activePhases(); +} + +const std::vector& +Opm::ECLGraph::activeGrids() const +{ + return this->pImpl_->activeGrids(); +} + +std::vector Opm::ECLGraph::neighbours() const +{ + return this->pImpl_->neighbours(); +} + +std::vector Opm::ECLGraph::poreVolume() const +{ + return this->pImpl_->activePoreVolume(); +} + +std::vector Opm::ECLGraph::transmissibility() const +{ + return this->pImpl_->transmissibility(); +} + +std::vector +Opm::ECLGraph::flux(const ECLRestartData& rstrt, + const ECLPhaseIndex phase) const +{ + return this->pImpl_->flux(rstrt, phase); +} + +namespace Opm { + + template + std::vector + ECLGraph::rawLinearisedCellData(const ResultSet& rset, + const std::string& vector) const + { + return this->pImpl_->rawLinearisedCellData(rset, vector); + } + + // Explicit instantiations of method rawLinearisedCellData() for the + // element and result set types we care about. + template std::vector + ECLGraph::rawLinearisedCellData(const ECLInitFileData& rset, + const std::string& vector) const; + + template std::vector + ECLGraph::rawLinearisedCellData(const ECLRestartData& rset, + const std::string& vector) const; + + template std::vector + ECLGraph::rawLinearisedCellData(const ECLInitFileData& rset, + const std::string& vector) const; + + template std::vector + ECLGraph::rawLinearisedCellData(const ECLRestartData& rset, + const std::string& vector) const; + +} // namespace Opm + +std::vector +Opm::ECLGraph::linearisedCellData(const ECLRestartData& rstrt, + const std::string& vector, + UnitConvention unit) const +{ + return this->pImpl_->linearisedCellData(rstrt, vector, unit); +} diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLGraph.hpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLGraph.hpp new file mode 100644 index 0000000000..4ad8bc7490 --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLGraph.hpp @@ -0,0 +1,229 @@ +/* + Copyright 2016, 2017 Statoil ASA. + + This file is part of the Open Porous Media Project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#ifndef OPM_ECLGRAPH_HEADER_INCLUDED +#define OPM_ECLGRAPH_HEADER_INCLUDED + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +/// \file +/// +/// Facility for extracting active cells and neighbourship relations from +/// on-disk ECLIPSE output, featuring on-demand property loading from +/// backing object (e.g., restart vectors at various time points). + +namespace Opm { + + /// Package an ECLIPSE result set (represented as GRID, INIT, and + /// restart files) in form usable with the computational engine + /// represented by class \code Opm::FlowDiagnostics::ToolBox \endcode. + class ECLGraph + { + public: + /// Disabled default constructor. + ECLGraph() = delete; + + /// Destructor. + ~ECLGraph(); + + /// Move constructor. + /// + /// \param[in] rhs Graph from which to appropriate resources. + /// Invalid upon return. + ECLGraph(ECLGraph&& rhs); + + /// Disabled copy constructor + ECLGraph(const ECLGraph& rhs) = delete; + + /// Move assignment operator. + /// + /// \param[in] rhs Graph from which to appropriate resources. + /// + /// \return Reference to \code *this \endcode. + ECLGraph& operator=(ECLGraph&& rhs); + + /// Disabled assignment operator. + ECLGraph& operator=(const ECLGraph& rhs) = delete; + + /// Named constructor. + /// + /// \param[in] grid Name or prefix of ECL grid (i.e., .GRID or + /// .EGRID) file. + /// + /// \param[in] init Name of ECL INIT file corresponding to \p grid + /// input. Assumed to provide at least a complete + /// set of pore-volume values (i.e., for all global + /// cells defined in the \p grid). + /// + /// If available in the INIT file, the constructor + /// will also leverage the transmissibility data + /// when constructing the active cell neighbourship + /// table. + /// + /// \return Fully formed ECLIPSE connection graph with property + /// associations. + static ECLGraph + load(const boost::filesystem::path& gridFile, + const ECLInitFileData& init); + + /// Retrieve number of grids in model. + /// + /// \return The number of LGR grids plus one (the main grid). + int numGrids() const; + + /// Retrieve active cell ID from (I,J,K) tuple in particular grid. + /// + /// \param[in] ijk Cartesian index tuple of particular cell. + /// + /// \param[in] gridID Identity of specific grid to which to relate + /// the (I,J,K) tuple. Use zero (default) for main grid and + /// positive indices for any LGRs. The (I,J,K) indices must be + /// within the ranges implied by the specific grid. + /// + /// \return Active ID (relative to linear, global numbering) of cell + /// (I,J,K) from specified grid. Negative one (-1) if (I,J,K) + /// outside valid range or if the specific cell identified by \p + /// ijk and \p gridID is not actually active. + int activeCell(const std::array& ijk, + const std::string& gridID = 0) const; + + /// Retrieve number of active cells in graph. + std::size_t numCells() const; + + /// Retrieve number of connections in graph. + std::size_t numConnections() const; + + /// Retrieve the simulation scenario's active phases. + /// + /// Mostly useful to determine the set of \c PhaseIndex values for + /// which flux() will return non-zero values if data available. + const std::vector& activePhases() const; + + /// Retrieve the simulation scenario's set of active grids. + /// + /// Mostly for canonical lookup of result data in LGRs. + const std::vector& activeGrids() const; + + /// Retrieve neighbourship relations between active cells. + /// + /// The \c i-th connection is between active cells \code + /// neighbours()[2*i + 0] \endcode and \code neighbours()[2*i + 1] + /// \endcode. + std::vector neighbours() const; + + /// Retrieve static pore-volume values on active cells only. + /// + /// Corresponds to the \c PORV vector in the INIT file, possibly + /// restricted to those active cells for which the pore-volume is + /// strictly positive. Numerical values in SI units (rm^3). + std::vector poreVolume() const; + + /// Retrieve static (background) transmissibility values on all + /// connections defined by \code neighbours() \endcode. + /// + /// Specifically, \code transmissibility()[i] \endcode is the + /// transmissibility of the connection between cells \code + /// neighbours()[2*i + 0] \endcode and \code neighbours()[2*i + 1] + /// \endcode. + std::vector transmissibility() const; + + /// Retrieve phase flux on all connections defined by \code + /// neighbours() \endcode. + /// + /// \param[in] phase Canonical phase for which to retrieve flux. + /// + /// \return Flux values corresponding to selected phase. Empty if + /// unavailable in the result set (e.g., when querying the gas + /// flux in an oil/water system or if no flux values at all were + /// output to the restart file). Numerical values in SI units + /// (rm^3/s). + std::vector + flux(const ECLRestartData& rstrt, + const ECLPhaseIndex phase) const; + + /// Retrieve result set vector from current view (e.g., particular + /// report step) linearised on active cells. + /// + /// \tparam T Element type of result set vector. + /// + /// \param[in] vector Name of result set vector. + /// + /// \return Result set vector linearised on active cells. + template + std::vector + rawLinearisedCellData(const ResultSet& rset, + const std::string& vector) const; + + /// Convenience type alias for \c UnitSystem PMFs (pointer to member + /// function). + typedef double (ECLUnits::UnitSystem::*UnitConvention)() const; + + /// Retrieve floating-point result set vector from current view + /// (e.g., particular report step) linearised on active cells and + /// converted to strict SI unit conventions. + /// + /// Typical call: + /// \code + /// const auto press = + /// lCD(rstrt, "PRESSURE", &ECLUnits::UnitSystem::pressure); + /// \endcode + /// + /// \param[in] rstrt ECL Restart dataset. It is the responsibility + /// of the caller to ensure that the restart data is correctly + /// positioned on a particular report step. + /// + /// \param[in] vector Name of result set vector. + /// + /// \param[in] unit Call-back hook in \c UnitSystem implementation + /// that enables converting the raw result data to strict SI unit + /// conventions. Hook is called for each grid in the result set. + /// + /// \return Result set vector linearised on active cells, converted + /// to strict SI unit conventions. + std::vector + linearisedCellData(const ECLRestartData& rstrt, + const std::string& vector, + UnitConvention unit) const; + + private: + /// Implementation class. + class Impl; + + using ImplPtr = std::unique_ptr; + + /// Constructor. Intentially not \c explicit. + ECLGraph(ImplPtr pImpl); + + /// Pointer to implementation. + ImplPtr pImpl_; + }; + +} // namespace Opm + +#endif // OPM_ECLGRAPH_HEADER_INCLUDED diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLPhaseIndex.hpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLPhaseIndex.hpp new file mode 100644 index 0000000000..0ffa899a78 --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLPhaseIndex.hpp @@ -0,0 +1,32 @@ +/* + Copyright 2017 Statoil ASA. + + This file is part of the Open Porous Media Project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#ifndef OPM_ECLPHASEINDEX_HEADER_INCLUDED +#define OPM_ECLPHASEINDEX_HEADER_INCLUDED + +namespace Opm { + + /// Enum for indicating the phase--or set of phases--on which to apply a + /// phase-dependent operation (e.g., extracting flux data from a result + /// set or computing relative permeabilities from tabulated functions). + enum class ECLPhaseIndex { Aqua = 0, Liquid = 1, Vapour = 2 }; + +} // namespace Opm + +#endif // OPM_ECLPHASEINDEX_HEADER_INCLUDED diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLPropTable.cpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLPropTable.cpp new file mode 100644 index 0000000000..b49b3b2696 --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLPropTable.cpp @@ -0,0 +1,305 @@ +/* + Copyright 2017 Statoil ASA. + + This file is part of the Open Porous Media Project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include + +Opm::SatFuncInterpolant::SingleTable:: +SingleTable(ElmIt xBegin, + ElmIt xEnd, + std::vector& colIt) +{ + // There must be at least one dependent variable/result variable. + assert (colIt.size() >= 1); + + const auto nRows = std::distance(xBegin, xEnd); + + this->x_.reserve(nRows); + this->y_.reserve(nRows * colIt.size()); + + auto keyValid = [](const double xi) + { + // Indep. variable values <= -1.0e20 or >= 1.0e20 signal "unused" + // table nodes (rows). These nodes are in the table to fill out the + // allocated size if one particular sub-table does not use all + // nodes. The magic value 1.0e20 is documented in the Fileformats + // Reference Manual. + return std::abs(xi) < 1.0e20; + }; + + while (xBegin != xEnd) { + // Extract relevant portion of the table. Preallocated rows that + // are not actually part of the result set (i.e., those that are set + // to a sentinel value) are discarded. + if (keyValid(*xBegin)) { + this->x_.push_back(*xBegin); + + for (auto ci : colIt) { + // Store 'y_' with column index cycling most rapidly. + this->y_.push_back(*ci); + } + } + + // ------------------------------------------------------------- + // Advance iterators. + + // 1) Independent variable. + ++xBegin; + + // 2) Dependent/result/columns. + for (auto& ci : colIt) { + ++ci; + } + } + + // Dispose of any excess capacity. + if (this->x_.size() < static_castx_.size())>(nRows)) { + this->x_.shrink_to_fit(); + this->y_.shrink_to_fit(); + } + + if (this->x_.size() < 2) { + // Table has no interval that supports interpolation. Either just a + // single node or no nodes at all. We can't do anything useful + // here, so don't pretend that this is okay. + + throw std::invalid_argument { + "No Interpolation Intervals of Non-Zero Size" + }; + } +} + +double +Opm::SatFuncInterpolant::SingleTable:: +y(const ECLPropTableRawData::SizeType nCols, + const ECLPropTableRawData::SizeType row, + const ResultColumn& c) const +{ + assert (row * nCols < this->y_.size()); + assert (c.i < nCols); + + // Recall: 'y_' stored with column index cycling the most rapidly (row + // major ordering). + return this->y_[row*nCols + c.i]; +} + +std::vector +Opm::SatFuncInterpolant::SingleTable:: +interpolate(const ECLPropTableRawData::SizeType nCols, + const ResultColumn& c, + const std::vector& x) const +{ + auto y = std::vector{}; y.reserve(x.size()); + + auto yval = [nCols, c, this] + (const ECLPropTableRawData::SizeType i) + { + return this->y(nCols, i, c); + }; + + const auto yfirst = + yval(ECLPropTableRawData::SizeType{ 0 }); + + const auto ylast = + yval(ECLPropTableRawData::SizeType{ this->x_.size() - 1 }); + + for (const auto& xi : x) { + y.push_back(0.0); + auto& yi = y.back(); + + if (! (xi > this->x_.front())) { + // Constant extrapolation to the left of range. + yi = yfirst; + } + else if (! (xi < this->x_.back())) { + // Constant extrapolation to the right of range. + yi = ylast; + } + else { + // Somewhere in [min(x_), max(x_)]. Primary key (indep. var) is + // sorted range. Recall: lower_bound() returns insertion point, + // which translates to the *upper* (right-hand) end-point of the + // interval in this context. + auto b = std::begin(this->x_); + auto p = std::lower_bound(b, std::end(this->x_), xi); + + assert ((p != b) && "Logic Error Left End-Point"); + assert ((p != std::end(this->x_)) && + "Logic Error Right End-Point"); + + // p = lower_bound() => left == i-1, right == i-0. + const auto i = p - b; + const auto left = i - 1; + const auto right = i - 0; + + const auto xl = this->x_[left]; + const auto t = (xi - xl) / (this->x_[right] - xl); + + yi = (1.0 - t)*yval(left) + t*yval(right); + } + } + + return y; +} + +double +Opm::SatFuncInterpolant::SingleTable::connateSat() const +{ + return this->x_.front(); +} + +double +Opm::SatFuncInterpolant::SingleTable:: +criticalSat(const ECLPropTableRawData::SizeType nCols, + const ResultColumn& c) const +{ + // Note: Relative permeability functions are presented as non-decreasing + // functions of the corresponding phase saturation. The internal table + // format essentially mirrors that of input deck keywords SWFN, SGFN, + // and SOF* (i.e., saturation function family II). Extracting the + // critical saturation--even for oil--therefore amounts to a forward, + // linear scan from row=0 to row=n-1 irrespective of the input format of + // the current saturation function. + + const auto nRows = this->x_.size(); + + auto row = 0 * nRows; + for (; row < nRows; ++row) { + if (this->y(nCols, row, c) > 0.0) { break; } + } + + if (row == 0) { + throw std::invalid_argument { + "Table Does Not Define Critical Saturation" + }; + } + + return this->x_[row - 1]; +} + +double +Opm::SatFuncInterpolant::SingleTable::maximumSat() const +{ + return this->x_.back(); +} + +// ===================================================================== + +Opm::SatFuncInterpolant::SatFuncInterpolant(const ECLPropTableRawData& raw) + : nResCols_(raw.numCols - 1) +{ + if (raw.numCols < 2) { + throw std::invalid_argument { + "Malformed Property Table" + }; + } + + this->table_.reserve(raw.numTables); + + // Table format: numRows*numTables values of first column (indep. var) + // followed by numCols-1 dependent variable (function value result) + // columns of numRows*numTables values each, one column at a time. + const auto colStride = raw.numRows * raw.numTables; + + // Position column iterators (independent variable and results + // respectively) at beginning of each pertinent table column. + auto xBegin = std::begin(raw.data); + auto colIt = std::vector{ xBegin + colStride }; + for (auto col = 0*raw.numCols + 1; col < raw.numCols - 1; ++col) { + colIt.push_back(colIt.back() + colStride); + } + + for (auto t = 0*raw.numTables; + t < raw.numTables; + ++t, xBegin += raw.numRows) + { + auto xEnd = xBegin + raw.numRows; + + // Note: The SingleTable ctor advances each 'colIt' across numRows + // entries. That is a bit of a layering violation, but helps in the + // implementation of this loop. + this->table_.push_back(SingleTable(xBegin, xEnd, colIt)); + } +} + +std::vector +Opm::SatFuncInterpolant::interpolate(const InTable& t, + const ResultColumn& c, + const std::vector& x) const +{ + if (t.i >= this->table_.size()) { + throw std::invalid_argument { + "Invalid Table ID" + }; + } + + if (c.i >= this->nResCols_) { + throw std::invalid_argument { + "Invalid Result Column ID" + }; + } + + return this->table_[t.i].interpolate(this->nResCols_, c, x); +} + +std::vector +Opm::SatFuncInterpolant::connateSat() const +{ + auto sconn = std::vector{}; + sconn.reserve(this->table_.size()); + + for (const auto& t : this->table_) { + sconn.push_back(t.connateSat()); + } + + return sconn; +} + +std::vector +Opm::SatFuncInterpolant::criticalSat(const ResultColumn& c) const +{ + auto scrit = std::vector{}; + scrit.reserve(this->table_.size()); + + for (const auto& t : this->table_) { + scrit.push_back(t.criticalSat(this->nResCols_, c)); + } + + return scrit; +} + +std::vector +Opm::SatFuncInterpolant::maximumSat() const +{ + auto smax = std::vector{}; + smax.reserve(this->table_.size()); + + for (const auto& t : this->table_) { + smax.push_back(t.maximumSat()); + } + + return smax; +} diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLPropTable.hpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLPropTable.hpp new file mode 100644 index 0000000000..32a7a81106 --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLPropTable.hpp @@ -0,0 +1,182 @@ +/* + Copyright 2017 Statoil ASA. + + This file is part of the Open Porous Media Project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#ifndef OPM_ECLPROPTABLE_HEADER_INCLUDED +#define OPM_ECLPROPTABLE_HEADER_INCLUDED + +#include + +/// \file +/// +/// ECL Tabulated Functions (e.g., saturation functions). + +namespace Opm { + + /// Raw table data from which to construct collection of interpolants. + struct ECLPropTableRawData + { + /// Representation of the raw table data. 1D array with implicit + /// substructure. + using DataVector = std::vector; + + /// Size type for subsets of table data. + using SizeType = DataVector::size_type; + + /// Iterator to table elements. Must be random access. + using ElementIterator = DataVector::const_iterator; + + /// Raw table data. Column major (Fortran) order. Typically + /// copied/extracted directly from TAB vector of INIT result-set. + DataVector data; + + /// Number of rows allocated in the result set for each individual + /// table. Typically corresponds to setting in one of the *DIMS + /// keywords. Should normally be at least two. + SizeType numRows; + + /// Number of columns in this table. Varies by keyword/table. + SizeType numCols; + + /// Number of tables of this type. Must match the corresponding + /// region keyword. + SizeType numTables; + }; + + /// Collection of 1D interpolants from tabulated functions (e.g., the + /// saturation functions). + class SatFuncInterpolant + { + public: + /// Constructor. + /// + /// \param[in] raw Raw table data for this collection. + explicit SatFuncInterpolant(const ECLPropTableRawData& raw); + + /// Wrapper type to disambiguate API usage. Represents a table ID. + struct InTable { + /// Table ID. + ECLPropTableRawData::SizeType i; + }; + + /// Wrapper type to disambiguate API usage. Represents a column ID. + struct ResultColumn { + /// Column ID. + ECLPropTableRawData::SizeType i; + }; + + /// Evaluate 1D interpolant in sequence of points. + /// + /// \param[in] t ID of sub-table of interpolant. + /// + /// \param[in] c ID of result column/dependent variable. + /// + /// \param[in] x Points at which to evaluate interpolant. + /// + /// \return Function values of dependent variable \p c evaluated at + /// points \p x in table \p t. + std::vector + interpolate(const InTable& t, + const ResultColumn& c, + const std::vector& x) const; + + /// Retrieve connate saturation from all tables. + std::vector connateSat() const; + + /// Retrieve critical saturation for particular result column in all + /// tables. + std::vector criticalSat(const ResultColumn& c) const; + + /// Retrieve maximum saturation in all tables. + std::vector maximumSat() const; + + private: + /// Single tabulated 1D interpolant. + class SingleTable + { + public: + using ElmIt = ECLPropTableRawData::ElementIterator; + + /// Constructor. + /// + /// \param[in] xBegin Beginning (initial element) of linar range + /// of independent variable values. + /// + /// \param[in] xEnd One past the end of linear range of + /// independent variable values. + /// + /// \param[in,out] colIt Dependent/column range iterators. On + /// input, point to the beginnings of ranges of results + /// pertinent to a single table. On output, each iterator is + /// advanced across all rows of the SingleTable (including + /// sentinel/invalid nodes) which makes the pointers valid + /// for the next table if relevant (and called in a loop). + SingleTable(ElmIt xBegin, + ElmIt xEnd, + std::vector& colIt); + + /// Evaluate 1D interpolant in sequence of points. + /// + /// \param[in] nCols Number of table columns. + /// + /// \param[in] c ID of result column/dependent variable. + /// + /// \param[in] x Points at which to evaluate interpolant. + /// + /// \return Function values of dependent variable \p c evaluated + /// at points \p x. + std::vector + interpolate(const ECLPropTableRawData::SizeType nCols, + const ResultColumn& c, + const std::vector& x) const; + + /// Retrieve connate saturation in table. + double connateSat() const; + + /// Retrieve critical saturation for particular result column in + /// table. + double criticalSat(const ECLPropTableRawData::SizeType nCols, + const ResultColumn& c) const; + + /// Retrieve maximum saturation in table. + double maximumSat() const; + + private: + /// Independent variable. + std::vector x_; + + /// Dependent variable (or variables). Row major (i.e., C) + /// ordering. Number of elements: x_.size() * host.nCols_. + std::vector y_; + + /// Value of dependent variable at position (row,c). + double y(const ECLPropTableRawData::SizeType nCols, + const ECLPropTableRawData::SizeType row, + const ResultColumn& c) const; + }; + + /// Number of result/dependent variables (== #table cols - 1). + ECLPropTableRawData::SizeType nResCols_; + + /// Sequence of individual tables, indexed by *NUM-type vectors. + std::vector table_; + }; + +} // namespace Opm + +#endif // OPM_ECLPROPTABLE_HEADER_INCLUDED diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLResultData.cpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLResultData.cpp new file mode 100644 index 0000000000..8d2cff11bb --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLResultData.cpp @@ -0,0 +1,1714 @@ +/* + Copyright 2016, 2017 Statoil ASA. + + This file is part of the Open Porous Media Project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#if HAVE_CONFIG_H +#include +#endif + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(HAVE_ERT_ECL_TYPE_H) && HAVE_ERT_ECL_TYPE_H +#include +#endif // defined(HAVE_ERT_ECL_TYPE_H) && HAVE_ERT_ECL_TYPE_H + +/// \file +/// +/// Implementation of ECL Result-Set Interface. + +namespace { + inline ecl_type_enum + getKeywordElementType(const ecl_kw_type* kw) + { +#if defined(HAVE_ERT_ECL_TYPE_H) && HAVE_ERT_ECL_TYPE_H + return ecl_type_get_type(ecl_kw_get_data_type(kw)); + +#else // ! (defined(HAVE_ERT_ECL_TYPE_H) && HAVE_ERT_ECL_TYPE_H) + + return ecl_kw_get_type(kw); +#endif // defined(HAVE_ERT_ECL_TYPE_H) && HAVE_ERT_ECL_TYPE_H + } + + namespace ECLImpl { + using FilePtr = std::shared_ptr; + + namespace Details { + + inline std::string + firstBlockKeyword(const ecl_file_view_type* block) + { + return ecl_kw_get_header(ecl_file_view_iget_kw(block, 0)); + } + + /// Convert vector of elements from one element type to another. + /// + /// \tparam Input Element type of input collection. + template + struct Convert + { + /// Convert from one element type to another. + /// + /// Implements case of *different* element types. + /// + /// \tparam Output Element type of output collection. Must + /// be different from \c Input. + /// + /// \param[in] x Input vector. + /// + /// \return Result vector (elements of \p x converted to + /// type \p Output). + template + static std::vector + to(const std::vector& x, std::false_type) + { + static_assert(! std::is_same::value, + "Logic Error: Convert::to" + " for Output!=Input"); + + auto result = std::vector{}; + result.reserve(x.size()); + + for (const auto& xi : x) { + // push_back(T(xi)) because vector does not + // support emplace_back until C++14. + result.push_back(Output(xi)); + } + + return result; + } + + /// Convert from one element type to another. + /// + /// Implements special case of same element types. This is + /// the identity operator. + /// + /// \tparam Output Element type of output collection. Must + /// be the same as \c Input. + /// + /// \param[in] x Input vector. + /// + /// \return Result vector (copy of \p x). + /// + template + static std::vector + to(const std::vector& x, std::true_type) + { + static_assert(std::is_same::value, + "Logic Error: Convert::to" + " for Output==Input"); + + return x; + } + }; + + /// Retrieve keyword data elements, possibly converted to + /// different destination data type. + /// + /// \tparam Output Destination data type. Type of result + /// vector. Assumed to be arithmetic. + /// + /// \tparam Input Source data type. Type of keyword data + /// elements. Assumed to be arithmetic. + /// + /// \tparam GetData Data element accessor. Callable. + /// + /// \param[in] kw Particular ECLIPSE result-set data vector. + /// + /// \param[in] extractElements Accessor for keyword data + /// elements. Must support the syntax + /// + /// \code + /// extractElements(const ecl_kw_type* kw, Input* x) + /// \endcode + /// + /// \return Data elements of keyword as a \code + /// std::vector \endcode. + template + std::vector + getData(const ecl_kw_type* kw, GetData&& extractElements) + { + auto x = std::vector(ecl_kw_get_size(kw)); + + extractElements(kw, x.data()); + + return Convert::template to + (x, typename std::is_same::type()); + } + + /// Translate ERT type class to keyword element type. + /// + /// Primary template. + /// + /// \tparam Input Class of ERT keyword data. + template + struct ElementType + { + /// Undefined element type. + using type = void; + }; + + /// Translate ERT type class to keyword element type. + /// + /// Actual element type of \code ECL_INT_TYPE \endcode. + template <> + struct ElementType + { + /// Element type of ERT Boolean (LOGICAL) data. Stored + /// internally as 'int'. + using type = int; + }; + + /// Translate ERT type class to keyword element type. + /// + /// Actual element type of \code ECL_INT_TYPE \endcode. + template <> + struct ElementType + { + /// Element type of ERT integer data. + using type = int; + }; + + /// Translate ERT type class to keyword element type. + /// + /// Actual element type of \code ECL_FLOAT_TYPE \endcode. + template <> + struct ElementType + { + /// Element type of ERT floating-point (float) data. + using type = float; + }; + + /// Translate ERT type class to keyword element type. + /// + /// Actual element type of \code ECL_DOUBLE_TYPE \endcode. + template <> + struct ElementType + { + /// Element type of ERT floating-point (double) data. + using type = double; + }; + + /// Extract ERT keyword data for various element types. + /// + /// Primary template. + /// + /// \tparam Input Class of ERT keyword data. + template + struct ExtractKeywordElements; + + /// Extract ERT keyword Boolean (LOGICAL) data. + template <> + struct ExtractKeywordElements + { + using EType = ElementType::type; + + /// Function call operator. + /// + /// Retrieve actual data elements from ERT keyword of integer + /// (specifically, \c int) type. + /// + /// \param[in] kw ERT keyword instance. + /// + /// \param[in,out] x Linearised keyword data elements. On + /// input points to memory block of size \code + /// ecl_kw_get_size(kw) * sizeof *x \endcode bytes. On + /// output, those bytes are filled with the actual data + /// values of \p kw. + void operator()(const ecl_kw_type* kw, EType* x) const + { + // 1) Extract raw 'int' values. + ecl_kw_get_memcpy_int_data(kw, x); + + // 2) Convert to 'bool'-like values by comparing to + // magic constant ECL_BOOL_TRUE_INT (ecl_util.h). + for (auto n = ecl_kw_get_size(kw), i = 0*n; i < n; ++i) { + x[i] = static_cast(x[i] == ECL_BOOL_TRUE_INT); + } + } + }; + + /// Extract ERT keyword integer data. + template <> + struct ExtractKeywordElements + { + using EType = ElementType::type; + + /// Function call operator. + /// + /// Retrieve actual data elements from ERT keyword of integer + /// (specifically, \c int) type. + /// + /// \param[in] kw ERT keyword instance. + /// + /// \param[in,out] x Linearised keyword data elements. On + /// input points to memory block of size \code + /// ecl_kw_get_size(kw) * sizeof *x \endcode bytes. On + /// output, those bytes are filled with the actual data + /// values of \p kw. + void operator()(const ecl_kw_type* kw, EType* x) const + { + ecl_kw_get_memcpy_int_data(kw, x); + } + }; + + /// Extract ERT keyword \c float data. + template <> + struct ExtractKeywordElements + { + using EType = ElementType::type; + + /// Function call operator. + /// + /// Retrieve actual data elements from ERT keyword of + /// floating-point (specifically, \c float) type. + /// + /// \param[in] kw ERT keyword instance. + /// + /// \param[in,out] x Linearised keyword data elements. On + /// input points to memory block of size \code + /// ecl_kw_get_size(kw) * sizeof *x \endcode bytes. On + /// output, those bytes are filled with the actual data + /// values of \p kw. + void operator()(const ecl_kw_type* kw, EType* x) const + { + ecl_kw_get_memcpy_float_data(kw, x); + } + }; + + /// Extract ERT keyword \c double data. + template <> + struct ExtractKeywordElements + { + using EType = ElementType::type; + + /// Function call operator. + /// + /// Retrieve actual data elements from ERT keyword of + /// floating-point (specifically, \c double) type. + /// + /// \param[in] kw ERT keyword instance. + /// + /// \param[in,out] x Linearised keyword data elements. On + /// input points to memory block of size \code + /// ecl_kw_get_size(kw) * sizeof *x \endcode bytes. On + /// output, those bytes are filled with the actual data + /// values of \p kw. + void operator()(const ecl_kw_type* kw, EType* x) const + { + ecl_kw_get_memcpy_double_data(kw, x); + } + }; + } // namespace Details + + /// Extract data elements from ECL keyword. + /// + /// Primary template--handles non-string (non-char) types. + /// + /// \tparam Input Type of keyword data. + template + struct GetKeywordData + { + /// Retrieve arithmetic (non-string) ECL keyword data as a \code + /// std::vector \endcode for arithmetic types \c T. + /// + /// \tparam T Element type of result vector. Must not be a + /// string type. + /// + /// \param[in] kw ECL keyword instance. Its element type must + /// be commensurate with \p Input. + /// + /// \return Keyword data elements as a \code std::vector + /// \endcode. + template + static std::vector + as(const ecl_kw_type* kw, std::false_type) + { + assert (getKeywordElementType(kw) == Input); + + return Details::getData< + T, typename Details::ElementType::type + >(kw, Details::ExtractKeywordElements{}); + } + + /// Retrieve vector of string data. + /// + /// Not supported for non-char keyword element types. + /// + /// \tparam T Element type of result vector. Assumed to be + /// \code std::string \endcode. + /// + /// \return Empty string vector. String data is unsupported for + /// non-char input types. + template + static std::vector + as(const ecl_kw_type* /* kw */, std::true_type) + { + return {}; + } + }; + + /// Extract data elements from ECL character-type keyword. + /// + /// Only supports accessing elements as a vector of \code + /// std::string \endcode. + template <> + struct GetKeywordData + { + /// Retrieve arithmetic (non-string) ECL keyword data as a \code + /// std::vector \endcode for arithmetic types \c T. + /// + /// Not supported for character input types. + /// + /// \tparam T Element type of result vector. Must not be a + /// string type. + /// + /// \return Empty data vector. + template + static std::vector + as(const ecl_kw_type* /* kw */, std::false_type) + { + return {}; + } + + /// Retrieve vector of string data. + /// + /// \tparam T Element type of result vector. Assumed to be + /// \code std::string \endcode. + /// + /// \return Keyword data elements as a \code + /// std::vector \endcode. + template + static std::vector + as(const ecl_kw_type* kw, std::true_type) + { + assert (getKeywordElementType(kw) == ECL_CHAR_TYPE); + + auto result = std::vector{}; + result.reserve(ecl_kw_get_size(kw)); + + for (decltype(ecl_kw_get_size(kw)) + i = 0, nkw = ecl_kw_get_size(kw); + i < nkw; ++i) + { + result.emplace_back(ecl_kw_iget_char_ptr(kw, i)); + + // Trim trailing white-space. + auto& s = result.back(); + + const auto e = s.find_last_not_of(" \t"); + if (e != std::string::npos) { + s = s.substr(0, e + 1); + } + } + + return result; + } + }; + + /// Translate grid names to (local) numeric IDs within a + /// section/view of an ECL result set. + /// + /// Provides a caching mechanism to accelerate repeated lookup. + class GridIDCache + { + public: + /// Constructor + /// + /// \param[in] block View relative to which to interpret grid + /// names. + explicit GridIDCache(const ecl_file_view_type* block); + + /// Get integral grid ID of particular grid relative to cache's + /// view. + /// + /// \param[in] gridName Name of particular grid. Empty for the + /// main grid (grid ID 0). + /// + /// \return Numeric grid ID of \p gridName. Negative if \p + /// gridName does not correspond to a grdi in the cache's + /// view. + int getGridID(const std::string& gridName) const; + + private: + /// View into ECL result set. + const ecl_file_view_type* block_; + + /// Cache of name->ID map. + mutable std::unordered_map cache_; + }; + + /// Partition INIT file into sections + class InitFileSections + { + public: + explicit InitFileSections(const ecl_file_type* init); + + struct Section { + Section(const ecl_file_view_type* blk) + : block (blk) + , first_kw(Details::firstBlockKeyword(block)) + {} + + const ecl_file_view_type* block; + std::string first_kw; + }; + + const std::vector
& sections() const + { + return this->sect_; + } + + using SectionID = std::vector
::size_type; + + SectionID numSections() const + { + return this->sections().size(); + } + + const Section& operator[](const SectionID i) const + { + assert ((i < this->numSections()) && "Internal Error"); + + return this->sect_[i]; + } + + private: + const ecl_file_view_type* init_; + + std::vector
sect_; + }; + + template + std::vector getKeywordData(const ecl_kw_type* kw) + { + // Whether or not caller requests a vector. + const auto makeStringVector = + typename std::is_same::type{}; + + switch (getKeywordElementType(kw)) { + case ECL_CHAR_TYPE: + return GetKeywordData:: + as(kw, makeStringVector); + + case ECL_BOOL_TYPE: + return GetKeywordData:: + as(kw, makeStringVector); + + case ECL_INT_TYPE: + return GetKeywordData:: + as(kw, makeStringVector); + + case ECL_FLOAT_TYPE: + return GetKeywordData:: + as(kw, makeStringVector); + + case ECL_DOUBLE_TYPE: + return GetKeywordData:: + as(kw, makeStringVector); + + default: + // No operator exists for this type. Return empty. + return {}; + } + } + } // namespace ECLImpl + + /// Predicate for whether or not a particular path represents a regular + /// file. + /// + /// \param[in] p Filesystem element. + /// + /// \return Whether or not the element represented by \p p exists and is + /// (or points to, in the case of a symbolic link) a regular file. + bool isFile(const boost::filesystem::path& p) + { + namespace fs = boost::filesystem; + + auto is_regular_file = [](const fs::path& pth) + { + return fs::exists(pth) && fs::is_regular_file(pth); + }; + + return is_regular_file(p) + || (fs::is_symlink(p) && + is_regular_file(fs::read_symlink(p))); + } + + /// Derive filesystem element from prefix or filename. + /// + /// Pass-through if the input already is a regular file in order to + /// support accessing result-sets other than restart files (e.g., the + /// INIT vectors). + /// + /// Fails (throws an exception of type \code std::invalid_argument + /// \endcode) if no valid filesystem element can be derived from the + /// input argument + /// + /// \param[in] file Filename or casename prefix. + /// + /// \param[in] ext Set of possible filename extensions. + /// + /// \return Filesystem element corresponding to result-set. Either the + /// input \p file itself or, in the case of a filename prefix, the + /// first possible match amongst the set generated by the prefix and + /// the input extensions. + boost::filesystem::path + deriveResultPath(boost::filesystem::path file, + const std::vector& ext) + { + if (isFile(file)) { + return file; + } + + for (const auto& e : ext) { + file.replace_extension(e); + + if (isFile(file)) { + return file; + } + } + + const auto prefix = file.parent_path() / file.stem(); + + std::ostringstream os; + + os << "Unable to derive valid filename from model prefix " + << prefix.generic_string(); + + throw std::invalid_argument(os.str()); + } + + /// Derive filesystem element from prefix or filename. + /// + /// Pass-through if the input already is a regular file in order to + /// support accessing result-sets other than restart files (e.g., the + /// INIT vectors). + /// + /// Fails (throws an exception of type \code std::invalid_argument + /// \endcode) if no valid filesystem element can be derived from the + /// input argument + /// + /// \param[in] file Filename or casename prefix. + /// + /// \return Filesystem element corresponding to result-set. Either the + /// input \p file itself or, in the case of a casename prefix, the + /// path to a restart file (unified format only). + boost::filesystem::path + deriveRestartPath(boost::filesystem::path file) + { + return deriveResultPath(std::move(file), { ".UNRST", ".FUNRST" }); + } + + /// Derive filesystem element from prefix or filename. + /// + /// Pass-through if the input already is a regular file in order to + /// support accessing result-sets other than restart files (e.g., the + /// INIT vectors). + /// + /// Fails (throws an exception of type \code std::invalid_argument + /// \endcode) if no valid filesystem element can be derived from the + /// input argument + /// + /// \param[in] file Filename or casename prefix. + /// + /// \return Filesystem element corresponding to result-set. Either the + /// input \p file itself or, in the case of a casename prefix, the + /// path to an INIT file (unformatted or formatted). + boost::filesystem::path + deriveInitPath(boost::filesystem::path file) + { + return deriveResultPath(std::move(file), { ".INIT", ".FINIT" }); + } + + /// Open ECL result set from pathname. + /// + /// Fails (throws an exception of type \code std::invalid_argument + /// \endcode) if the input argument does not refer to a valid filesystem + /// element. + /// + /// \param[in] file Filename. + /// + /// \return Open stream corresponding to result-set. + ECLImpl::FilePtr openResultSet(const boost::filesystem::path& fname) + { + // Read-only, keep open between requests + const auto open_flags = 0; + + auto F = ECLImpl::FilePtr { + ecl_file_open(fname.generic_string().c_str(), open_flags), + ecl_file_close + }; + + if (! F) { + std::ostringstream os; + + os << "Failed to load ECL Result object from " + << fname.generic_string(); + + throw std::invalid_argument(os.str()); + } + + return F; + } + + /// Retrieve first keyword from file + /// + /// Useful in order to identify a result-set as either a unified restart + /// file or some other result-set type. + /// + /// \param[in] file Raw result-set. + /// + /// \return First keyword in result-set represented by \p file. + std::string firstFileKeyword(const ecl_file_type* file) + { + // Note: ecl_file_get_global_view() does not modify its input. + auto* globView = + ecl_file_get_global_view(const_cast(file)); + + return ECLImpl::Details::firstBlockKeyword(globView); + } + + std::string paddedGridName(const std::string& gridName) + { + if (gridName.empty()) { + return gridName; + } + + std::ostringstream os; + + os << std::setw(8) << std::left << gridName; + + return os.str(); + } +} // namespace Anonymous + +// ====================================================================== +// Class (Anonymous)::ECLImpl::GridIDCache +// ====================================================================== + +ECLImpl::GridIDCache::GridIDCache(const ecl_file_view_type* block) + : block_(block) +{} + +int ECLImpl::GridIDCache::getGridID(const std::string& gridName) const +{ + if (gridName.empty()) { + return ECL_GRID_MAINGRID_LGR_NR; + } + + { + auto i = this->cache_.find(gridName); + if (i != std::end(this->cache_)) { + return i->second; + } + } + + const auto nLGR = ecl_file_view_get_num_named_kw + (this->block_, LGR_KW); + + auto lgrID = 0 * nLGR; + for (; lgrID < nLGR; ++lgrID) + { + const auto* kw = ecl_file_view_iget_named_kw + (this->block_, LGR_KW, lgrID); + + if ((getKeywordElementType(kw) != ECL_CHAR_TYPE) || + (ecl_kw_get_size(kw) != 1)) + { + // Huh !?! + continue; + } + + const auto kwname = GetKeywordData + ::as(kw, std::true_type()); + + if (kwname[0] == gridName) { + break; + } + } + + if (lgrID == nLGR) { + // No such LGR in block. Somewhat surprising. + return -1; + } + + return this->cache_[gridName] = + ECL_GRID_MAINGRID_LGR_NR + 1 + lgrID; +} + +// ====================================================================== +// Class (Anonymous)::ECLImpl::InitFileSections +// ====================================================================== + +ECLImpl::InitFileSections::InitFileSections(const ecl_file_type* init) + // Note: ecl_file_get_global_view() does not modify input arg + : init_(ecl_file_get_global_view(const_cast(init))) +{ + const auto* endLGR_kw = "LGRSGONE"; + const auto nEndLGR = + ecl_file_view_get_num_named_kw(this->init_, endLGR_kw); + + if (nEndLGR == 0) { + // No LGRs in model. INIT file consists of global section only, + // meaning that the only available section is equal to the global + // view (i.e., this->init_). + this->sect_.push_back(Section{ this->init_ }); + } + else { + const auto* start_kw = INTEHEAD_KW; + const auto* end_kw = endLGR_kw; + + this->sect_.reserve(2 * nEndLGR); + + for (auto sectID = 0*nEndLGR; sectID < nEndLGR; ++sectID) { + // Note: Start keyword occurrence lags one behind section ID + // when creating sections *between* LGRSGONE keywords. + const auto start_kw_occurrence = (sectID > 0) + ? sectID - 1 : 0*sectID; + + // Main section 'sectID': [ start_kw, LGRSGONE ] + const auto* sect = + ecl_file_view_add_blockview2(this->init_, start_kw, + end_kw, start_kw_occurrence); + + if (sect == nullptr) { + continue; + } + + const auto firstkw = Details::firstBlockKeyword(sect); + const auto occurrence = 0; + + // Main grid sub-section of 'sectID': [ start_kw, LGR ] + const auto* main_grid_sect = + ecl_file_view_add_blockview2(sect, firstkw.c_str(), + LGR_KW, occurrence); + + // LGR sub-section of 'sectID': [ LGR, LGRSGONE ] + const auto* lgr_sect = + ecl_file_view_add_blockview2(sect, LGR_KW, + end_kw, occurrence); + + // Note: main_grid_sect or lgr_sect *may* (in rare cases) be + // nullptr, but we'll deal with that in the calling context. + this->sect_.push_back(Section { main_grid_sect }); + this->sect_.push_back(Section { lgr_sect }); + + // start_kw == end_kw for all but first section. + start_kw = end_kw; + } + } +} + +// ====================================================================== +// Class Opm::ECLRestartData::Impl +// ====================================================================== + +/// Engine powering implementation of \c ECLRestartData interface +class Opm::ECLRestartData::Impl +{ +public: + using Path = boost::filesystem::path; + + /// Constructor + /// + /// \param[in] rstrt Filesystem element or casename prefix representing + /// an ECL result-set. + Impl(Path rstrt); + + /// Constructor + /// + /// \param[in] rstrt ECL restart result set + Impl(std::shared_ptr rstrt); + + /// Copy constructor. + /// + /// \param[in] rhs Object from which to construct new \c Impl instance. + Impl(const Impl& rhs); + + /// Move constructor. + /// + /// \param[in,out] rhs Object from which to constructo new \c Impl + /// instance. Underlying result-set accessor is null upon return. + Impl(Impl&& rhs); + + /// Select a result-set view that corresponds to a single report step. + /// + /// This is needed when working with dynamic restart data. + /// + /// \param[in] step Report step number. + /// + /// \return Whether or not selecting the report step succeeded. The + /// typical failure case is the report step not being available + /// in the result-set. + bool selectReportStep(const int step); + + /// Query current result-set view for availability of particular named + /// result vector in particular enumerated grid. + /// + /// \param[in] vector Named result vector for which to query data + /// availability. + /// + /// \param[in] gridID Identity of specific grid for which to query data + /// availability. + /// + /// \return Whether or not keyword data for the named result vector is + /// available in the specific grid. + bool haveKeywordData(const std::string& vector, + const std::string& gridName) const; + + /// Retrieve current result-set view's data values for particular named + /// result vector in particular enumerated grid. + /// + /// Will fail (throw an exception of type std::invalid_argument) unless + /// the requested keyword data is available in the specific grid in the + /// current active view. + /// + /// \tparam T Element type of return value. The underlying keyword data + /// will be converted to this type if needed and possible. Note that + /// some type combinations do not make sense. It is, for instance, + /// not possible to retrieve keyword values of an underlying + /// arithmetic type in the form of a \code std::vector + /// \endcode. Similarly, we cannot access underlying character data + /// through elements of an arithmetic type (e.g., \code + /// std::vector \endcode.) + /// + /// \param[in] vector Named result vector for which to retrieve + /// keyword data. + /// + /// \param[in] gridID Identity of specific grid for which to + /// retrieve keyword data. + /// + /// \return Keyword data values. Empty if type conversion fails. + template + std::vector + keywordData(const std::string& vector, + const std::string& gridName) const; + +private: + /// RAII class to select a sub-block pertaining to a particular grid + /// within the current active result-set view. + /// + /// An object of this type restricts the view to a particular grid in + /// the constructor and restores the original active view in the + /// destructor. + class Restrict + { + public: + /// Constructor. + /// + /// Restricts active result-set view to particular grid. + /// + /// \param[in] host Result-set host object that maintains the + /// current active view. + /// + /// \param[in] gridID Identity of specific grid to which to restrict + /// the current active result-set view. + Restrict(const Impl& host, const int gridID) + : host_(host) + , save_(host_.activeBlock_) + { + if (gridID == ECL_GRID_MAINGRID_LGR_NR) { + const auto& start = this->host_.mainGridStart(); + + this->host_.activeBlock_ = + ecl_file_view_add_blockview2(this->host_.activeBlock_, + start.c_str(), LGR_KW, 0); + } + else if (gridID > ECL_GRID_MAINGRID_LGR_NR) { + this->host_.activeBlock_ = + ecl_file_view_add_blockview2(this->host_.activeBlock_, + LGR_KW, LGR_KW, gridID - 1); + } + } + + /// Destructor. + /// + /// Restores original active result-set view (i.e., widens view to + /// encompass all grids). + ~Restrict() + { + this->host_.activeBlock_ = this->save_; + } + + private: + /// Host object that maintains the active result-set view. + const Impl& host_; + + /// Saved original active view from host (prior to restricting view + /// to single grid ID). + const ecl_file_view_type* save_; + }; + + /// Casename prefix. Mostly to implement copy ctor. + const Path prefix_; + + /// Active result-set. + ECLImpl::FilePtr result_; + + /// First keyword in result-set (\c result_). Needed to identify start + /// of main grid's section within a view. + std::string firstKeyword_; + + /// Map LGR names to integral grid IDs. + std::unique_ptr gridIDCache_; + + /// Current active result-set view. + mutable const ecl_file_view_type* activeBlock_{ nullptr }; + + /// Support for passing \code *this \endcode to ERT functions that + /// require an \c ecl_file_type, particularly the function that selects + /// the file's global view--ecl_file_get_global_view(). + /// + /// Note mutable return type. This is okay because the relevant + /// functions don't modify their inputs. + operator ecl_file_type*() const; + + /// Support for passing \code *this \endcode to ERT functions that + /// require an \c ecl_file_view_type. + operator const ecl_file_view_type*() const; + + /// Retrieve result-set keyword that identifies beginning of main grid's + /// result vectors. + const std::string& mainGridStart() const; + + int gridID(const std::string& gridName) const; +}; + +Opm::ECLRestartData::Impl::Impl(Path prefix) + : prefix_ (std::move(prefix)) + , result_ (openResultSet(deriveRestartPath(prefix_))) + , firstKeyword_(firstFileKeyword(result_.get())) +{} + +Opm::ECLRestartData::Impl::Impl(std::shared_ptr rstrt) + : prefix_ (ecl_file_get_src_file(rstrt.get())) + , result_ (std::move(rstrt)) + , firstKeyword_(firstFileKeyword(result_.get())) +{} + +Opm::ECLRestartData::Impl::Impl(const Impl& rhs) + : prefix_ (rhs.prefix_) + , result_ (openResultSet(deriveRestartPath(prefix_))) + , firstKeyword_(firstFileKeyword(result_.get())) +{} + +Opm::ECLRestartData::Impl::Impl(Impl&& rhs) + : prefix_ (std::move(rhs.prefix_)) + , result_ (std::move(rhs.result_)) + , firstKeyword_(std::move(rhs.firstKeyword_)) +{} + +bool Opm::ECLRestartData::Impl::selectReportStep(const int step) +{ + if (! ecl_file_has_report_step(*this, step)) { + return false; + } + + this->gridIDCache_.reset(); + + if (auto* globView = ecl_file_get_global_view(*this)) { + // Ignore sequence numbers, dates, and simulation time. + const auto seqnum = -1; + const auto dates = static_cast(-1); + const auto simdays = -1.0; + + this->activeBlock_ = + ecl_file_view_add_restart_view(globView, seqnum, + step, dates, simdays); + + if (this->activeBlock_ != nullptr) { + this->gridIDCache_ + .reset(new ECLImpl::GridIDCache(this->activeBlock_)); + + return true; + } + } + + return false; +} + +bool Opm::ECLRestartData::Impl:: +haveKeywordData(const std::string& vector, + const std::string& gridName) const +{ + const auto gridID = this->gridIDCache_->getGridID(gridName); + + if (gridID < 0) { + return false; + } + + // Note: Non-trivial dtor. Compiler can't ignore object. + const auto block = Restrict{ *this, gridID }; + + const auto count = + ecl_file_view_get_num_named_kw(*this, vector.c_str()); + + return count > 0; +} + +namespace Opm { + + template + std::vector + ECLRestartData::Impl::keywordData(const std::string& vector, + const std::string& gridName) const + { + if (! this->haveKeywordData(vector, gridName)) { + std::ostringstream os; + + os << "RESTART: Cannot Access Non-Existent Keyword Data Pair (" + << vector << ", " + << (gridName.empty() ? "Main Grid" : gridName) + << ')'; + + throw std::invalid_argument(os.str()); + } + + const auto gridID = this->gridIDCache_->getGridID(gridName); + + // Note: Non-trivial dtor. Compiler can't ignore object. + const auto block = Restrict{ *this, gridID }; + + const auto occurrence = 0; + + const auto* kw = + ecl_file_view_iget_named_kw(*this, vector.c_str(), + occurrence); + + assert ((kw != nullptr) && + "Logic Error In Data Availability Check"); + + return ECLImpl::getKeywordData(kw); + } + +} // namespace Opm + +Opm::ECLRestartData::Impl::operator ecl_file_type*() const +{ + return this->result_.get(); +} + +Opm::ECLRestartData::Impl::operator const ecl_file_view_type*() const +{ + return this->activeBlock_; +} + +const std::string& +Opm::ECLRestartData::Impl::mainGridStart() const +{ + return this->firstKeyword_; +} + +int +Opm::ECLRestartData::Impl::gridID(const std::string& gridName) const +{ + return this->gridIDCache_->getGridID(gridName); +} + +// ====================================================================== +// Class Opm::ECLInitFileData::Impl +// ====================================================================== + +class Opm::ECLInitFileData::Impl +{ +public: + using Path = boost::filesystem::path; + + /// Constructor. + /// + /// Construct from filename. Owning semantics. + /// + /// \param[in] casePrefix Name or prefix of ECL result data. + Impl(Path initFile); + + /// Constructor. + /// + /// Construct from dataset already input through other means. + /// + /// Non-owning semantics. + Impl(std::shared_ptr initFile); + + /// Copy constructor. + /// + /// \param[in] rhs Object from which to construct new \c Impl instance. + Impl(const Impl& rhs); + + /// Move constructor. + /// + /// \param[in,out] rhs Object from which to constructo new \c Impl + /// instance. Underlying result-set accessor is null upon return. + Impl(Impl&& rhs); + + const ecl_file_type* getRawFilePtr() const; + + /// Query current result-set view for availability of particular named + /// result vector in particular enumerated grid. + /// + /// \param[in] vector Named result vector for which to query data + /// availability. + /// + /// \param[in] gridID Identity of specific grid for which to query data + /// availability. + /// + /// \return Whether or not keyword data for the named result vector is + /// available in the specific grid. + bool haveKeywordData(const std::string& vector, + const std::string& gridName) const; + + /// Retrieve current result-set view's data values for particular named + /// result vector in particular enumerated grid. + /// + /// Will fail (throw an exception of type std::invalid_argument) unless + /// the requested keyword data is available in the specific grid in the + /// current active view. + /// + /// \tparam T Element type of return value. The underlying keyword data + /// will be converted to this type if needed and possible. Note that + /// some type combinations do not make sense. It is, for instance, + /// not possible to retrieve keyword values of an underlying + /// arithmetic type in the form of a \code std::vector + /// \endcode. Similarly, we cannot access underlying character data + /// through elements of an arithmetic type (e.g., \code + /// std::vector \endcode.) + /// + /// \param[in] vector Named result vector for which to retrieve + /// keyword data. + /// + /// \param[in] gridID Identity of specific grid for which to + /// retrieve keyword data. + /// + /// \return Keyword data values. Empty if type conversion fails. + template + std::vector + keywordData(const std::string& vector, + const std::string& gridName) const; + +private: + using SectionID = + ECLImpl::InitFileSections::SectionID; + + /// Result of searching for a particular pairing of (vector,gridName) in + /// INIT. + struct LookupResult + { + /// In what INIT file section the KW was located (-1 if not found). + SectionID sectID; + + /// Local ID, within sectID, of grid section data section that hosts + /// the 'vector' (-1 if not found). + int gridSectID; + }; + + /// Pairing of kw vector and grid name. + struct KWKey { + /// Keyword/result set vector + std::string vector; + + /// ID of grid for which to look up 'vector'. + std::string gridName; + }; + + /// Comparator (std::set<> and std::map<>) for KWKeys. + struct CompareKWKey { + bool operator()(const KWKey& k1, const KWKey& k2) const + { + return std::tie(k1.vector, k1.gridName) + < std::tie(k2.vector, k2.gridName); + } + }; + + /// Negative look-up cache. + using MissingKW = std::set; + + /// Keyword-to-section cache to accelerate repeated look-up. + using KWSection = std::map; + + /// Casename prefix. Mostly to implement copy ctor. + const Path prefix_; + + /// Raw result set. + ECLImpl::FilePtr initFile_; + + /// Sections of the INIT result set. + ECLImpl::InitFileSections sections_; + + mutable const ecl_file_view_type* activeBlock_{ nullptr }; + + /// Negative look-up cache for haveKeywordData() queries. + mutable MissingKW missing_kw_; + + /// Keyword-to-section map for successful haveKeywordData() and + /// keywordData() queries. Accelerates repeated look-up queries. + mutable KWSection kw_section_; + + operator const ecl_file_view_type*() const; + + LookupResult + lookup(const std::string& vector, + const std::string& gridName) const; + + LookupResult lookupMainGrid(const KWKey& key) const; + + LookupResult lookupLGR(const KWKey& key) const; + + void setActiveBlock(const SectionID sect) const; + + const ECLImpl::InitFileSections::Section& + getSection(const SectionID sect) const; +}; + +Opm::ECLInitFileData::Impl::Impl(Path initFile) + : prefix_ (initFile.stem()) + , initFile_(openResultSet(deriveInitPath(std::move(initFile)))) + , sections_(initFile_.get()) +{} + +Opm::ECLInitFileData::Impl::Impl(std::shared_ptr initFile) + : prefix_ (Path(ecl_file_get_src_file(initFile.get())).stem()) + , initFile_(std::move(initFile)) + , sections_(initFile_.get()) +{} + +Opm::ECLInitFileData::Impl::Impl(const Impl& rhs) + : prefix_ (rhs.prefix_) + , initFile_(rhs.initFile_) + , sections_(initFile_.get()) +{} + +Opm::ECLInitFileData::Impl::Impl(Impl&& rhs) + : prefix_ (std::move(rhs.prefix_)) + , initFile_(std::move(rhs.initFile_)) + , sections_(std::move(rhs.sections_)) +{} + +const ecl_file_type* +Opm::ECLInitFileData::Impl::getRawFilePtr() const +{ + return this->initFile_.get(); +} + +bool +Opm::ECLInitFileData::Impl:: +haveKeywordData(const std::string& vector, + const std::string& gridName) const +{ + const auto kwloc = this->lookup(vector, gridName); + + return (kwloc.sectID < this->sections_.numSections()) + && (kwloc.gridSectID >= 0); +} + +namespace Opm { + + template + std::vector + ECLInitFileData::Impl:: + keywordData(const std::string& vector, + const std::string& gridName) const + { + if (! this->haveKeywordData(vector, gridName)) { + std::ostringstream os; + + os << "INIT: Cannot Access Non-Existent Keyword Data Pair (" + << vector << ", " + << (gridName.empty() ? "Main Grid" : gridName) + << ')'; + + throw std::invalid_argument(os.str()); + }; + + const auto kwloc = this->lookup(vector, gridName); + + this->setActiveBlock(kwloc.sectID); + + if (! gridName.empty()) { + // We're cons + this->activeBlock_ = + ecl_file_view_add_blockview(this->activeBlock_, LGR_KW, + kwloc.gridSectID); + } + + const auto occurrence = 0; + + const auto* kw = + ecl_file_view_iget_named_kw(*this, vector.c_str(), + occurrence); + + assert ((kw != nullptr) && + "Logic Error In Data Availability Check"); + + return ECLImpl::getKeywordData(kw); + } + +} + +Opm::ECLInitFileData::Impl::operator const ecl_file_view_type*() const +{ + return this->activeBlock_; +} + +Opm::ECLInitFileData::Impl::LookupResult +Opm::ECLInitFileData::Impl:: +lookup(const std::string& vector, const std::string& gridName) const +{ + const auto key = KWKey{ vector, gridName }; + + { + auto m = this->missing_kw_.find(key); + + if (m != std::end(this->missing_kw_)) { + // 'vector' known to be mssing for 'gridName'. Report as such. + return { SectionID(-1), -1 }; + } + } + + { + auto i = this->kw_section_.find(key); + + if (i != std::end(this->kw_section_)) { + // 'vector' previously located for 'gridName'. Return it. + return i->second; + } + } + + if (gridName.empty()) { + return this->lookupMainGrid(key); + } + + return this->lookupLGR(key); +} + +Opm::ECLInitFileData::Impl::LookupResult +Opm::ECLInitFileData::Impl::lookupMainGrid(const KWKey& key) const +{ + assert (key.gridName.empty() && "Logic Error"); + + const auto* kwheader = key.vector.c_str(); + + // Main grid sections are even numbered. + for (auto nSect = this->sections_.numSections(), sectID = 0*nSect; + sectID < nSect; sectID += 2) + { + const auto& s = this->getSection(sectID); + + // Skip empty sections + if (s.block == nullptr) { continue; } + + const auto count = + ecl_file_view_get_num_named_kw(s.block, kwheader); + + if (count > 0) { + // Result-set 'vector' present in main grid. Record and return. + + // Assume that keyword does not occur multiple times in main + // grid section. + const auto gridSectID = 0; + + return this->kw_section_[key] = + LookupResult { sectID, gridSectID }; + } + } + + // No result-set 'vector' in main grid. Record as missing and return + // "not found". + this->missing_kw_.insert(key); + + return { SectionID(-1), -1 }; +} + +Opm::ECLInitFileData::Impl::LookupResult +Opm::ECLInitFileData::Impl::lookupLGR(const KWKey& key) const +{ + assert ((! key.gridName.empty()) && "Logic Error"); + + const auto gridID = paddedGridName(key.gridName); + const auto* kwheader = key.vector.c_str(); + const auto* gridName = gridID.c_str(); + + // LGR sections are odd numbered. + for (auto nSect = this->sections_.numSections(), sectID = 0*nSect + 1; + sectID < nSect; sectID += 2) + { + const auto& s = this->getSection(sectID); + + // Skip empty sections. + if (s.block == nullptr) { continue; } + + const auto nLGR = + ecl_file_view_get_num_named_kw(s.block, LGR_KW); + + assert ((nLGR > 0) && "Logic Error"); + + for (auto lgrID = 0*nLGR; lgrID < nLGR; ++lgrID) { + const auto* kw = + ecl_file_view_iget_named_kw(s.block, LGR_KW, lgrID); + + if (! ecl_kw_data_equal(kw, gridName)) { + // This is not the grid you're looking for. + continue; + } + + // This LGR section pertains to key.gridName. Look for + // key.vector between this occurrence of LGR_KW and the next. + // Continue searching if we don't find that vector however, + // because there may be multiple relevant LGR instances for + // key.gridName. + + const auto* lgrSect = + ecl_file_view_add_blockview(s.block, LGR_KW, lgrID); + + const auto kwCount = + ecl_file_view_get_num_named_kw(lgrSect, kwheader); + + if (kwCount > 0) { + // We found the key.vector in this LGR data section. Record + // position and return it to caller. + + return this->kw_section_[key] = + LookupResult { SectionID(sectID), lgrID }; + } + + // Did not find 'key.vector' in this LGR data section. Continue + // searching nonetheless because there may be more LGR sections + // that pertain to 'key.gridName'. + } + } + + // key.vector not found for key.gridName in any of the LGR sections. + // Record as missing and return "not found". + + this->missing_kw_.insert(key); + + return { SectionID(-1), -1 }; +} + +void +Opm::ECLInitFileData::Impl::setActiveBlock(const SectionID sect) const +{ + this->activeBlock_ = this->getSection(sect).block; +} + +const ECLImpl::InitFileSections::Section& +Opm::ECLInitFileData::Impl::getSection(const SectionID sect) const +{ + assert (sect < this->sections_.numSections()); + + return this->sections_[sect]; +} + +// ###################################################################### +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = +// Public Interfaces Follow +// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// ###################################################################### + +// ====================================================================== +// Implementation of class Opm::ECLRestartData Below Separator +// ====================================================================== + +Opm::ECLRestartData::ECLRestartData(boost::filesystem::path rstrt) + : pImpl_(new Impl(std::move(rstrt))) +{} + +Opm::ECLRestartData::ECLRestartData(std::shared_ptr rstrt) + : pImpl_(new Impl(std::move(rstrt))) +{} + +Opm::ECLRestartData::ECLRestartData(const ECLRestartData& rhs) + : pImpl_(new Impl(*rhs.pImpl_)) +{} + +Opm::ECLRestartData::ECLRestartData(ECLRestartData&& rhs) + : pImpl_(std::move(rhs.pImpl_)) +{} + +Opm::ECLRestartData& +Opm::ECLRestartData::operator=(const ECLRestartData& rhs) +{ + this->pImpl_.reset(new Impl(*rhs.pImpl_)); + + return *this; +} + +Opm::ECLRestartData& +Opm::ECLRestartData::operator=(ECLRestartData&& rhs) +{ + this->pImpl_ = std::move(rhs.pImpl_); + + return *this; +} + +Opm::ECLRestartData::~ECLRestartData() +{} + +bool Opm::ECLRestartData::selectReportStep(const int step) const +{ + // selectReportStep() const is a bit of a lie. pImpl_ is a const + // pointer to modifiable Impl. + + return this->pImpl_->selectReportStep(step); +} + +bool +Opm::ECLRestartData:: +haveKeywordData(const std::string& vector, + const std::string& gridID) const +{ + return this->pImpl_->haveKeywordData(vector, gridID); +} + +namespace Opm { + + template + std::vector + ECLRestartData::keywordData(const std::string& vector, + const std::string& gridID) const + { + return this->pImpl_->template keywordData(vector, gridID); + } + + // Explicit instantiations for those types we care about. + template std::vector + ECLRestartData::keywordData(const std::string& vector, + const std::string& gridID) const; + + template std::vector + ECLRestartData::keywordData(const std::string& vector, + const std::string& gridID) const; + + template std::vector + ECLRestartData::keywordData(const std::string& vector, + const std::string& gridID) const; + + template std::vector + ECLRestartData::keywordData(const std::string& vector, + const std::string& gridID) const; + +} // namespace Opm::ECL + +// ====================================================================== +// Implementation of class Opm::ECLInitFileData Below Separator +// ====================================================================== + +Opm::ECLInitFileData::ECLInitFileData(boost::filesystem::path init) + : pImpl_(new Impl(std::move(init))) +{} + +Opm::ECLInitFileData::ECLInitFileData(std::shared_ptr init) + : pImpl_(new Impl(std::move(init))) +{} + +Opm::ECLInitFileData::ECLInitFileData(const ECLInitFileData& rhs) + : pImpl_(new Impl(*rhs.pImpl_)) +{} + +Opm::ECLInitFileData::ECLInitFileData(ECLInitFileData&& rhs) + : pImpl_(std::move(rhs.pImpl_)) +{} + +Opm::ECLInitFileData& +Opm::ECLInitFileData::operator=(const ECLInitFileData& rhs) +{ + this->pImpl_.reset(new Impl(*rhs.pImpl_)); + + return *this; +} + +Opm::ECLInitFileData& +Opm::ECLInitFileData::operator=(ECLInitFileData&& rhs) +{ + this->pImpl_ = std::move(rhs.pImpl_); + + return *this; +} + +Opm::ECLInitFileData::~ECLInitFileData() +{} + +bool +Opm::ECLInitFileData:: +haveKeywordData(const std::string& vector, + const std::string& gridID) const +{ + return this->pImpl_->haveKeywordData(vector, gridID); +} + +const ecl_file_type* +Opm::ECLInitFileData::getRawFilePtr() const +{ + return this->pImpl_->getRawFilePtr(); +} + +namespace Opm { + + template + std::vector + ECLInitFileData::keywordData(const std::string& vector, + const std::string& gridID) const + { + return this->pImpl_->template keywordData(vector, gridID); + } + + // Explicit instantiations for those types we care about. + template std::vector + ECLInitFileData::keywordData(const std::string& vector, + const std::string& gridID) const; + + template std::vector + ECLInitFileData::keywordData(const std::string& vector, + const std::string& gridID) const; + + template std::vector + ECLInitFileData::keywordData(const std::string& vector, + const std::string& gridID) const; + + template std::vector + ECLInitFileData::keywordData(const std::string& vector, + const std::string& gridID) const; + +} // namespace Opm::ECL diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLResultData.hpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLResultData.hpp new file mode 100644 index 0000000000..c48b6a4645 --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLResultData.hpp @@ -0,0 +1,283 @@ +/* + Copyright 2016, 2017 Statoil ASA. + + This file is part of the Open Porous Media Project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#ifndef OPM_ECLRESULTDATA_HEADER_INCLUDED +#define OPM_ECLRESULTDATA_HEADER_INCLUDED + +#include +#include +#include + +#include + +/// \file +/// +/// Interface to direct result-set data vector operations. + +/// Forward-declaration of ERT's representation of an ECLIPSE result file. +/// +/// This is a hole in the insulation between the interface and the +/// underlying implementation of class ECLInitFileData and furthermore +/// enables constructing wrapper objects from separately parsed result sets. +extern "C" { + typedef struct ecl_file_struct ecl_file_type; +} // extern "C" + +namespace Opm { + + class ECLGraph; + + /// Representation of an ECLIPSE Restart result-set. + /// + /// This class is aware of the internal structure of ECLIPSE restart + /// files and may restrict its operation to a single report step. The + /// class furthermore knows about sub-blocks corresponding to main or + /// local grids within a report step and queries only those objects that + /// pertain to a single grid at a time. + /// + /// Note: The client must select a view of the result-set before + /// accessing any vectors within the set. + class ECLRestartData + { + public: + /// Default constructor disabled. + ECLRestartData() = delete; + + /// Constructor. + /// + /// Owning semantics. + /// + /// \param[in] rstrt Name or prefix of ECL result data. + explicit ECLRestartData(boost::filesystem::path rstrt); + + /// Constructor + /// + /// Shared ownership of result set. + /// + /// \param[in] rstrt ECL restart result set. + explicit ECLRestartData(std::shared_ptr rstrt); + + /// Copy constructor. + /// + /// \param[in] rhs Object from which to construct new instance. + ECLRestartData(const ECLRestartData& rhs); + + /// Move constructor. + /// + /// \param[in,out] rhs Object from which to construct new instance. + /// Its internal implementation will be subsumed into the new + /// object. + ECLRestartData(ECLRestartData&& rhs); + + /// Assignment operator. + /// + /// \param[in] rhs Object from which to assign new values to current + /// instance. + /// + /// \return \code *this \endcode. + ECLRestartData& operator=(const ECLRestartData& rhs); + + /// Move assignment operator. + /// + /// \param[in,out] Object from which to assign new instance values. + /// Its internal implementation will be subsumed into this + /// instance. + /// + /// \return \code *this \endcode. + ECLRestartData& operator=(ECLRestartData&& rhs); + + /// Destructor. + ~ECLRestartData(); + + /// Select a result-set view that corresponds to a single report + /// step. + /// + /// This is needed when working with dynamic restart data. + /// + /// \param[in] step Report step number. + /// + /// \return Whether or not selecting the report step succeeded. The + /// typical failure case is the report step not being available + /// in the result-set. + bool selectReportStep(const int step) const; + + /// Query current result-set view for availability of particular + /// named result vector in particular enumerated grid. + /// + /// \param[in] vector Named result vector for which to query data + /// availability. + /// + /// \param[in] gridID Identity of specific grid for which to query + /// data availability. Empty for the main grid. + /// + /// \return Whether or not keyword data for the named result vector + /// is available in the specific grid. + bool haveKeywordData(const std::string& vector, + const std::string& gridID = "") const; + + /// Retrieve current result-set view's data values for particular + /// named result vector in particular enumerated grid. + /// + /// Will fail (throw an exception of type std::invalid_argument) + /// unless the requested keyword data is available in the specific + /// grid in the current active view. + /// + /// \tparam T Element type of return value. The underlying keyword + /// data will be converted to this type if needed and possible. + /// Note that some type combinations do not make sense. It is, + /// for instance, not possible to retrieve keyword values of an + /// underlying arithmetic type in the form of a \code + /// std::vector \endcode. Similarly, we cannot + /// access underlying character data through elements of an + /// arithmetic type (e.g., \code std::vector \endcode.) + /// + /// \param[in] vector Named result vector for which to retrieve + /// keyword data. + /// + /// \param[in] gridID Identity of specific grid for which to + /// retrieve keyword data. Empty for the main grid. + /// + /// \return Keyword data values. Empty if type conversion fails. + template + std::vector + keywordData(const std::string& vector, + const std::string& gridID = "") const; + + private: + class Impl; + + std::unique_ptr pImpl_; + }; + + /// Representation of an ECLIPSE Initialization result-set. + /// + /// This class is aware of the internal structure of ECLIPSE INIT files + /// and queries only those objects that pertain to a single grid. + class ECLInitFileData + { + public: + ECLInitFileData() = delete; + + /// Constructor. + /// + /// Construct from filename. Owning semantics. + /// + /// \param[in] casePrefix Name or prefix of ECL result data. + explicit ECLInitFileData(boost::filesystem::path initFile); + + /// Constructor. + /// + /// Construct from dataset already input through other means. + /// + /// Non-owning/shared ownership semantics. + explicit ECLInitFileData(std::shared_ptr initFile); + + /// Copy constructor. + /// + /// \param[in] rhs Object from which to construct new instance. + ECLInitFileData(const ECLInitFileData& rhs); + + /// Move constructor. + /// + /// \param[in,out] rhs Object from which to construct new instance. + /// Its internal implementation will be subsumed into the new + /// object. + ECLInitFileData(ECLInitFileData&& rhs); + + /// Assignment operator. + /// + /// \param[in] rhs Object from which to assign new values to current + /// instance. + /// + /// \return \code *this \endcode. + ECLInitFileData& operator=(const ECLInitFileData& rhs); + + /// Move assignment operator. + /// + /// \param[in,out] Object from which to assign new instance values. + /// Its internal implementation will be subsumed into this + /// instance. + /// + /// \return \code *this \endcode. + ECLInitFileData& operator=(ECLInitFileData&& rhs); + + /// Destructor. + ~ECLInitFileData(); + + /// Query current result-set view for availability of particular + /// named result vector in particular enumerated grid. + /// + /// \param[in] vector Named result vector for which to query data + /// availability. + /// + /// \param[in] gridID Identity of specific grid for which to query + /// data availability. Empty for the main grid. + /// + /// \return Whether or not keyword data for the named result vector + /// is available in the specific grid. + bool haveKeywordData(const std::string& vector, + const std::string& gridID = "") const; + + /// Retrieve current result-set view's data values for particular + /// named result vector in particular enumerated grid. + /// + /// Will fail (throw an exception of type std::invalid_argument) + /// unless the requested keyword data is available in the specific + /// grid in the current active view. + /// + /// \tparam T Element type of return value. The underlying keyword + /// data will be converted to this type if needed and possible. + /// Note that some type combinations do not make sense. It is, + /// for instance, not possible to retrieve keyword values of an + /// underlying arithmetic type in the form of a \code + /// std::vector \endcode. Similarly, we cannot + /// access underlying character data through elements of an + /// arithmetic type (e.g., \code std::vector \endcode.) + /// + /// \param[in] vector Named result vector for which to retrieve + /// keyword data. + /// + /// \param[in] gridID Identity of specific grid for which to + /// retrieve keyword data. Empty for the main grid. + /// + /// \return Keyword data values. Empty if type conversion fails. + template + std::vector + keywordData(const std::string& vector, + const std::string& gridID = "") const; + + // Grant class ECLGraph privileged access to getRawFilePtr(). + friend class ECLGraph; + + private: + class Impl; + + std::unique_ptr pImpl_; + + /// Access the underlying ERT representation of the result-set. + /// + /// This is essentially a hole in the interface that is intended to + /// support a few very specialised uses. Handle with care. + /// + /// \return Handle to underlying ERT representation of result-set. + const ecl_file_type* getRawFilePtr() const; + }; +} // namespace Opm + +#endif // OPM_ECLRESULTDATA_HEADER_INCLUDED diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLSaturationFunc.cpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLSaturationFunc.cpp new file mode 100644 index 0000000000..9c01c77cc8 --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLSaturationFunc.cpp @@ -0,0 +1,1272 @@ +/* + Copyright 2017 Statoil ASA. + + This file is part of the Open Porous Media Project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#if HAVE_CONFIG_H +#include +#endif + +#include + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +namespace { + std::vector + oil_saturation(const std::vector& sg, + const std::vector& sw, + const ::Opm::ECLGraph& G, + const ::Opm::ECLRestartData& rstrt) + { + auto so = G.rawLinearisedCellData(rstrt, "SOIL"); + + if (so.size() == G.numCells()) { + // Use "SOIL" directly if available. + return so; + } + + // SOIL vector not provided. Compute from SWAT and/or SGAS. + + so.assign(G.numCells(), 1.0); + + auto adjust_So_for_other_phase = + [&so](const std::vector& s) + { + std::transform(std::begin(so), std::end(so), + std::begin(s) , + std::begin(so), std::minus()); + }; + + if (sg.size() == G.numCells()) { + adjust_So_for_other_phase(sg); + } + + if (sw.size() == G.numCells()) { + adjust_So_for_other_phase(sw); + } + + return so; + } +} // Anonymous + +class RegionMapping +{ +private: + using Map = ::Opm::AssembledConnections; + using NeighIt = Map::Neighbours::const_iterator; + using MapIdx = Map::Offset; + +public: + RegionMapping(const std::size_t numCells, + const std::vector& regIdx); + + using NeighRng = ::Opm::SimpleIteratorRange; + + MapIdx numRegions() const + { + return this->map_.numRows(); + } + + NeighRng cells(const MapIdx regId) const + { + assert (regId < this->numRegions()); + + const auto& start = this->map_.startPointers(); + const auto& neigh = this->map_.neighbourhood(); + + auto b = std::begin(neigh) + start[regId + 0]; + auto e = std::begin(neigh) + start[regId + 1]; + + return { b, e }; + } + +private: + Opm::AssembledConnections map_; +}; + +RegionMapping::RegionMapping(const std::size_t numCells, + const std::vector& regIdx) +{ + if (regIdx.empty()) { + // No explicit region mapping. Put all active cells in single + // region (region ID 0). This is somewhat roundabout since class + // AssembledConnections does not have a direct way of expressing + // this case. + const auto nc = static_cast(numCells); + + for (auto c = 0*nc; c < nc; ++c) { + this->map_.addConnection(0, c); + } + + this->map_.compress(1); + } + else if (regIdx.size() != numCells) { + throw std::invalid_argument { + "Region Array Size Does Not " + "Match Number of Active Cells" + }; + } + else { + // Caller provided explicit region mapping for all active cells. + // Assume that the region IDs themselves are one-based indices + // (e.g., SATNUM) and adjust accordingly. + + auto maxReg = -1; + auto c = 0; + + for (const auto& regId : regIdx) { + const auto regId_0based = regId - 1; + + this->map_.addConnection(regId_0based, c++); + + if (regId_0based > maxReg) { maxReg = regId_0based; } + } + + this->map_.compress(maxReg + 1); + } +} + +// ===================================================================== + +namespace Relperm { + namespace Gas { + namespace Details { + Opm::ECLPropTableRawData + tableData(const std::vector& tabdims, + const std::vector& tab); + } + + class KrFunction + { + public: + KrFunction(const std::vector& tabdims, + const std::vector& tab) + : func_(Details::tableData(tabdims, tab)) + {} + + std::vector sgco() const + { + return this->func_.connateSat(); + } + + std::vector sgcr() const + { + return this->func_.criticalSat(this->krcol()); + } + + std::vector sgmax() const + { + return this->func_.maximumSat(); + } + + std::vector + krg(const std::size_t regID, + const std::vector& sg) const + { + const auto t = this->table(regID); + const auto c = this->krcol(); + + return this->func_.interpolate(t, c, sg); + } + + private: + ::Opm::SatFuncInterpolant func_; + + Opm::SatFuncInterpolant::InTable + table(const Opm::ECLPropTableRawData::SizeType regID) const + { + return ::Opm::SatFuncInterpolant::InTable{regID}; + } + + Opm::SatFuncInterpolant::ResultColumn krcol() const + { + return ::Opm::SatFuncInterpolant::ResultColumn{0}; + } + }; + } // namespace Gas + + namespace Oil { + namespace Details { + Opm::ECLPropTableRawData + tableData(const std::vector& tabdims, + const bool isTwoP, + const std::vector& tab); + } // namespace Details + + class KrFunction + { + public: + KrFunction(const std::vector& tabdims, + const bool isTwoP, + const std::vector& tab) + : func_(Details::tableData(tabdims, isTwoP, tab)) + , twop_(isTwoP) + {} + + virtual ~KrFunction() {} + + std::vector soco() const + { + return this->func_.connateSat(); + } + + std::vector sogcr() const + { + return this->func_.criticalSat(this->gas_column()); + } + + std::vector sowcr() const + { + return this->func_.criticalSat(this->wat_column()); + } + + std::vector somax() const + { + return this->func_.maximumSat(); + } + + struct SGas { + std::vector data; + }; + + struct SWat { + std::vector data; + }; + + struct SOil { + std::vector data; + }; + + std::vector + kro(const std::size_t regID, + const SOil& so_g, + const SGas& sg, + const SOil& so_w, + const SWat& sw) const + { + return this->kroImpl(regID, so_g, sg, so_w, sw); + } + + virtual std::unique_ptr clone() const = 0; + + protected: + std::vector + krog(const std::size_t regID, + const std::vector& so) const + { + return this->eval(regID, this->gas_column(), so); + } + + std::vector + krow(const std::size_t regID, + const std::vector& so) const + { + return this->eval(regID, this->wat_column(), so); + } + + private: + using ResCol = ::Opm::SatFuncInterpolant::ResultColumn; + + Opm::SatFuncInterpolant func_; + bool twop_; + + Opm::SatFuncInterpolant::InTable + table(const Opm::ECLPropTableRawData::SizeType regID) const + { + return ::Opm::SatFuncInterpolant::InTable{regID}; + } + + ResCol gas_column() const + { + // Table format: + // + // So kro in two-phase runs + // So krow krog in three-phase runs + // + // Therefore kro(so) in the O/G subsystem is result column + // (dependent variable) zero in two-phase runs and result + // column 1 in three-phase runs. + const auto colID = + static_cast + (this->twop_ ? 0 : 1); + + return { colID }; + } + + ResCol wat_column() const + { + // Note: kro(so) in the O/W subsystem is dependent variable + // (result column) zero in two-phase runs and three-phase + // runs. + return ResCol{0}; + } + + std::vector + eval(const std::size_t regID, + const ResCol c, + const std::vector& so) const + { + return this->func_.interpolate(this->table(regID), c, so); + } + + virtual std::vector + kroImpl(const std::size_t regID, + const SOil& so_g, + const SGas& sg, + const SOil& so_w, + const SWat& sw) const = 0; + }; + + class TwoPhase : public KrFunction + { + public: + enum class SubSys { OilGas, OilWater }; + + TwoPhase(const SubSys subsys, + const std::vector& tabdims, + const std::vector& tab) + : KrFunction(tabdims, true, tab) + , subsys_ (subsys) + {} + + virtual std::unique_ptr clone() const override + { + return std::unique_ptr(new TwoPhase(*this)); + } + + private: + SubSys subsys_; + + virtual std::vector + kroImpl(const std::size_t regID, + const SOil& so_g, + const SGas& /* sg */, + const SOil& so_w, + const SWat& /* sw */) const override + { + switch (this->subsys_) { + case SubSys::OilGas: + return this->krog(regID, so_g.data); + + case SubSys::OilWater: + return this->krow(regID, so_w.data); + } + + return {}; + } + }; + + class ECLStdThreePhase : public KrFunction + { + public: + ECLStdThreePhase(const std::vector& tabdims, + const std::vector& tab, + std::vector swco) + : KrFunction(tabdims, false, tab) + , swco_ (std::move(swco)) + {} + + virtual std::unique_ptr clone() const override + { + return std::unique_ptr(new ECLStdThreePhase(*this)); + } + + private: + std::vector swco_; + + virtual std::vector + kroImpl(const std::size_t regID, + const SOil& so_g, + const SGas& sg, + const SOil& so_w, + const SWat& sw) const override + { + const auto kr_og = this->krog(regID, so_g.data); + const auto kr_ow = this->krow(regID, so_w.data); + + const auto swco = this->swco_[regID]; + + auto kro = std::vector{}; + kro.reserve(sw.data.size()); + + for (auto n = sw.data.size(), i = 0*n; i < n; ++i) { + const auto den = sg.data[i] + sw.data[i] - swco; + + const auto xg = sg.data[i] / den; + const auto xw = (sw.data[i] + swco) / den; + + kro.push_back(xg*kr_og[i] + xw*kr_ow[i]); + } + + return kro; + } + }; + } // namespace Oil + + namespace Water { + namespace Details { + Opm::ECLPropTableRawData + tableData(const std::vector& tabdims, + const std::vector& tab); + } // namespace Details + + class KrFunction + { + public: + KrFunction(const std::vector& tabdims, + const std::vector& tab) + : func_(Details::tableData(tabdims, tab)) + {} + + std::vector swco() const + { + return this->func_.connateSat(); + } + + std::vector swcr() const + { + return this->func_.criticalSat(this->krcol()); + } + + std::vector swmax() const + { + return this->func_.maximumSat(); + } + + std::vector + krw(const std::size_t regID, + const std::vector& sw) const + { + const auto t = this->table(regID); + const auto c = this->krcol(); + + return this->func_.interpolate(t, c, sw); + } + + private: + ::Opm::SatFuncInterpolant func_; + + Opm::SatFuncInterpolant::InTable + table(const Opm::ECLPropTableRawData::SizeType regID) const + { + return ::Opm::SatFuncInterpolant::InTable{regID}; + } + + Opm::SatFuncInterpolant::ResultColumn krcol() const + { + return ::Opm::SatFuncInterpolant::ResultColumn{0}; + } + }; + } // namespace Water +} // namespace Relperm + +Opm::ECLPropTableRawData +Relperm::Gas::Details::tableData(const std::vector& tabdims, + const std::vector& tab) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.numCols = 3; // Sg, Krg, Pcgo + t.numRows = tabdims[ TABDIMS_NSSGFN_ITEM ]; + t.numTables = tabdims[ TABDIMS_NTSGFN_ITEM ]; + + const auto nTabElems = t.numRows * t.numTables * t.numCols; + + // Subtract one to account for offset being one-based index. + const auto start = tabdims[ TABDIMS_IBSGFN_OFFSET_ITEM ] - 1; + + t.data.assign(&tab[start], &tab[start] + nTabElems); + + return t; +} + +Opm::ECLPropTableRawData +Relperm::Oil::Details::tableData(const std::vector& tabdims, + const bool isTwoP, + const std::vector& tab) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.numCols = isTwoP + ? 2 // So, Kro + : 3; // So, Krow, Krog + + t.numRows = tabdims[ TABDIMS_NSSOFN_ITEM ]; + t.numTables = tabdims[ TABDIMS_NTSOFN_ITEM ]; + + const auto nTabElems = t.numRows * t.numTables * t.numCols; + + // Subtract one to account for offset being one-based index. + const auto start = tabdims[ TABDIMS_IBSOFN_OFFSET_ITEM ] - 1; + + t.data.assign(&tab[start], &tab[start] + nTabElems); + + return t; +} + +Opm::ECLPropTableRawData +Relperm::Water::Details::tableData(const std::vector& tabdims, + const std::vector& tab) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.numCols = 3; // Sw, Krw, Pcow + t.numRows = tabdims[ TABDIMS_NSSWFN_ITEM ]; + t.numTables = tabdims[ TABDIMS_NTSWFN_ITEM ]; + + const auto nTabElems = t.numRows * t.numTables * t.numCols; + + // Subtract one to account for offset being one-based index. + const auto start = tabdims[ TABDIMS_IBSWFN_OFFSET_ITEM ] - 1; + + t.data.assign(&tab[start], &tab[start] + nTabElems); + + return t; +} + +// ===================================================================== + +class Opm::ECLSaturationFunc::Impl +{ +public: + Impl(const ECLGraph& G, + const ECLInitFileData& init); + + Impl(Impl&& rhs); + Impl(const Impl& rhs); + + void init(const ECLGraph& G, + const ECLInitFileData& init, + const bool useEPS); + + std::vector + relperm(const ECLGraph& G, + const ECLRestartData& rstrt, + const ECLPhaseIndex p) const; + +private: + class EPSEvaluator + { + public: + using RawTEP = ::Opm::SatFunc::CreateEPS::RawTableEndPoints; + using FuncCat = ::Opm::SatFunc::CreateEPS::FunctionCategory; + + struct ActPh + { + ActPh(const unsigned int iphs) + : oil((iphs & (1u << 0)) != 0) + , gas((iphs & (1u << 2)) != 0) + , wat((iphs & (1u << 1)) != 0) + {} + + bool oil; + bool gas; + bool wat; + }; + + void define(const ECLGraph& G, + const ECLInitFileData& init, + const RawTEP& ep, + const bool use3PtScaling, + const FuncCat curve, + const ActPh& active) + { + auto opt = Create::EPSOptions{}; + opt.use3PtScaling = use3PtScaling; + opt.curve = curve; + + if (active.oil) { + this->create_oil_eps(G, init, ep, active, opt); + } + + if (active.gas) { + this->create_gas_eps(G, init, ep, opt); + } + + if (active.wat) { + this->create_wat_eps(G, init, ep, opt); + } + } + + void scaleOG(const RegionMapping& rmap, + std::vector& so) const + { + this->scale(this->oil_in_og_, rmap, so); + } + + void scaleOW(const RegionMapping& rmap, + std::vector& so) const + { + this->scale(this->oil_in_ow_, rmap, so); + } + + void scaleGas(const RegionMapping& rmap, + std::vector& sg) const + { + this->scale(this->gas_, rmap, sg); + } + + void scaleWat(const RegionMapping& rmap, + std::vector& sw) const + { + this->scale(this->wat_, rmap, sw); + } + + private: + using Create = ::Opm::SatFunc::CreateEPS; + using SSys = ::Opm::SatFunc::CreateEPS::SubSystem; + using PhIdx = ::Opm::ECLPhaseIndex; + + using EPSInterface = ::Opm::SatFunc::EPSEvalInterface; + using EPSEndPts = ::Opm::SatFunc::EPSEvalInterface::TableEndPoints; + using EPSEndPtVec = std::vector; + + using EPSPtr = std::unique_ptr; + using EndPtsPtr = std::unique_ptr; + + struct EPS { + EPS() {} + + EPS(const EPS& rhs) + { + if (rhs.scaling) { + this->scaling = rhs.scaling->clone(); + } + + if (rhs.tep) { + this->tep = EndPtsPtr(new EPSEndPtVec(*rhs.tep)); + } + } + + EPS(EPS&& rhs) + : scaling(std::move(rhs.scaling)) + , tep (std::move(rhs.tep)) + {} + + EPS& operator=(const EPS& rhs) + { + if (rhs.scaling) { + this->scaling = rhs.scaling->clone(); + } + + if (rhs.tep) { + this->tep = EndPtsPtr(new EPSEndPtVec(*rhs.tep)); + } + + return *this; + } + + EPS& operator=(EPS&& rhs) + { + this->scaling = std::move(rhs.scaling); + this->tep = std::move(rhs.tep); + + return *this; + } + + EPSPtr scaling; + EndPtsPtr tep; + }; + + EPS oil_in_og_; + EPS oil_in_ow_; + EPS gas_; + EPS wat_; + + void scale(const EPS& eps, + const RegionMapping& rmap, + std::vector& s) const + { + if (! eps.scaling) { + // No end-point scaling defined for this curve. Return + // unchanged. + return; + } + + if (! eps.tep) { + throw std::logic_error { + "Cannot Perform EPS in Absence of " + "Table End-Point Data" + }; + } + + if (rmap.numRegions() == 1) { + this->scaleSingleRegion(eps, s); + } + else { + this->scaleMultiRegion(eps, rmap, s); + } + } + + void scaleSingleRegion(const EPS& eps, std::vector& s) const + { + assert (eps.tep->size() == 1); + + using Assoc = EPSInterface::SaturationAssoc; + using CellID = decltype(std::declval().cell); + + auto sp = EPSInterface::SaturationPoints{}; + + sp.reserve(s.size()); + + auto cell = static_cast(0); + for (const auto& si : s) { + sp.push_back(Assoc{ cell++, si }); + } + + s = eps.scaling->eval((*eps.tep)[0], sp); + } + + void scaleMultiRegion(const EPS& eps, + const RegionMapping& rmap, + std::vector& s) const + { + const auto nreg = rmap.numRegions(); + + assert (eps.tep->size() == nreg); + + using Assoc = EPSInterface::SaturationAssoc; + using CellID = decltype(std::declval().cell); + + for (auto reg = 0*nreg; reg < nreg; ++reg) { + auto sp = EPSInterface::SaturationPoints{}; + + for (const auto& cell : rmap.cells(reg)) { + sp.push_back(Assoc{CellID(cell), s[cell]}); + } + + const auto& sr = + eps.scaling->eval((*eps.tep)[reg], sp); + + auto i = static_cast(0); + for (const auto& cell : rmap.cells(reg)) { + s[cell] = sr[i++]; + } + } + } + + void create_oil_eps(const ECLGraph& G, + const ECLInitFileData& init, + const RawTEP& ep, + const ActPh& active, + Create::EPSOptions& opt) + { + opt.thisPh = PhIdx::Liquid; + + if (active.gas) { + opt.subSys = SSys::OilGas; + + this->oil_in_og_.scaling = + Create::fromECLOutput(G, init, opt); + + this->oil_in_og_.tep = this->endPoints(ep, opt); + } + + if (active.wat) { + opt.subSys = SSys::OilWater; + + this->oil_in_ow_.scaling = + Create::fromECLOutput(G, init, opt); + + this->oil_in_ow_.tep = this->endPoints(ep, opt); + } + } + + void create_gas_eps(const ECLGraph& G, + const ECLInitFileData& init, + const RawTEP& ep, + Create::EPSOptions& opt) + { + opt.thisPh = PhIdx::Vapour; + opt.subSys = SSys::OilGas; + + this->gas_.scaling = + Create::fromECLOutput(G, init, opt); + + this->gas_.tep = this->endPoints(ep, opt); + } + + void create_wat_eps(const ECLGraph& G, + const ECLInitFileData& init, + const RawTEP& ep, + Create::EPSOptions& opt) + { + opt.thisPh = PhIdx::Aqua; + opt.subSys = SSys::OilWater; + + this->wat_.scaling = + Create::fromECLOutput(G, init, opt); + + this->wat_.tep = this->endPoints(ep, opt); + } + + EndPtsPtr + endPoints(const RawTEP& ep, const Create::EPSOptions& opt) + { + return EndPtsPtr { + new EPSEndPtVec(Create::unscaledEndPoints(ep, opt)) + }; + } + }; + + using RegionID = + decltype(std::declval().numRegions()); + + RegionMapping rmap_; + + std::unique_ptr oil_; + std::unique_ptr gas_; + std::unique_ptr wat_; + + std::unique_ptr eps_; + + void initRelPermInterp(const EPSEvaluator::ActPh& active, + const ECLInitFileData& init); + + void initEPS(const EPSEvaluator::ActPh& active, + const bool use3PtScaling, + const ECLGraph& G, + const ECLInitFileData& init); + + std::vector + kro(const ECLGraph& G, + const ECLRestartData& rstrt) const; + + std::vector + krg(const ECLGraph& G, + const ECLRestartData& rstrt) const; + + std::vector + krw(const ECLGraph& G, + const ECLRestartData& rstrt) const; + + EPSEvaluator::RawTEP + extractRawTableEndPoints(const EPSEvaluator::ActPh& active) const; + + template + std::vector + gatherRegionSubset(const RegionID reg, + const std::vector& x) const + { + auto y = std::vector{}; + + if (x.empty()) { + return y; + } + + for (const auto& cell : this->rmap_.cells(reg)) { + y.push_back(x[cell]); + } + + return y; + } + + template + void scatterRegionResults(const RegionID reg, + const std::vector& x_reg, + std::vector& x) const + { + auto i = static_cast(0); + + for (const auto& cell : this->rmap_.cells(reg)) { + x[cell] = x_reg[i++]; + } + } + + template + void regionLoop(RegionOperation&& regOp) const + { + for (auto nreg = this->rmap_.numRegions(), + reg = 0*nreg; reg < nreg; ++reg) + { + regOp(reg); + } + } +}; + +Opm::ECLSaturationFunc::Impl::Impl(const ECLGraph& G, + const ECLInitFileData& init) + : rmap_(G.numCells(), G.rawLinearisedCellData(init, "SATNUM")) +{ +} + +Opm::ECLSaturationFunc::Impl::Impl(Impl&& rhs) + : rmap_(std::move(rhs.rmap_)) + , oil_ (std::move(rhs.oil_ )) + , gas_ (std::move(rhs.gas_ )) + , wat_ (std::move(rhs.wat_ )) +{} + +// --------------------------------------------------------------------- + +void +Opm::ECLSaturationFunc::Impl::init(const ECLGraph& G, + const ECLInitFileData& init, + const bool useEPS) +{ + // Extract INTEHEAD from main grid + const auto& ih = init.keywordData(INTEHEAD_KW); + const auto iphs = static_cast(ih[INTEHEAD_PHASE_INDEX]); + + const auto active = EPSEvaluator::ActPh{iphs}; + + this->initRelPermInterp(active, init); + + if (useEPS) { + const auto& lh = init.keywordData(LOGIHEAD_KW); + + const auto haveEPS = static_cast( + lh[LOGIHEAD_ENDPOINT_SCALING_INDEX]); + + if (haveEPS) { + const auto use3PtScaling = static_cast( + lh[LOGIHEAD_ALT_ENDPOINT_SCALING_INDEX]); + + // Must be called *after* initRelPermInterp(). + this->initEPS(active, use3PtScaling, G, init); + } + } +} + +void +Opm::ECLSaturationFunc:: +Impl::initRelPermInterp(const EPSEvaluator::ActPh& active, + const ECLInitFileData& init) +{ + const auto isThreePh = + active.oil && active.gas && active.wat; + + // Extract tabular data from main grid + const auto& tabdims = init.keywordData("TABDIMS"); + const auto& tab = init.keywordData("TAB"); + + if (active.gas) { + this->gas_.reset(new Relperm::Gas::KrFunction(tabdims, tab)); + } + + if (active.wat) { + this->wat_.reset(new Relperm::Water::KrFunction(tabdims, tab)); + } + + if (active.oil) { + if (! isThreePh) { + using KrModel = Relperm::Oil::TwoPhase; + + if (active.gas) { + const auto subsys = KrModel::SubSys::OilGas; + + this->oil_.reset(new KrModel(subsys, tabdims, tab)); + } + else if (active.wat) { + const auto subsys = KrModel::SubSys::OilWater; + + this->oil_.reset(new KrModel(subsys, tabdims, tab)); + } + else { + throw std::invalid_argument { + "Single-Phase Oil System Not Supported" + }; + } + } + + if (isThreePh) { + using KrModel = Relperm::Oil::ECLStdThreePhase; + + this->oil_.reset(new KrModel(tabdims, tab, this->wat_->swco())); + } + } +} + +void Opm::ECLSaturationFunc:: +Impl::initEPS(const EPSEvaluator::ActPh& active, + const bool use3PtScaling, + const ECLGraph& G, + const ECLInitFileData& init) +{ + const auto ep = this->extractRawTableEndPoints(active); + + const auto curve = ::Opm::SatFunc::CreateEPS:: + FunctionCategory::Relperm; + + this->eps_.reset(new EPSEvaluator()); + + this->eps_->define(G, init, ep, use3PtScaling, curve, active); +} + +// ##################################################################### + +Opm::ECLSaturationFunc::Impl::Impl(const Impl& rhs) + : rmap_(rhs.rmap_) +{ + if (rhs.oil_) { + // Polymorphic object must use clone(). + this->oil_ = rhs.oil_->clone(); + } + + if (rhs.gas_) { + this->gas_.reset(new Relperm::Gas::KrFunction(*rhs.gas_)); + } + + if (rhs.wat_) { + this->wat_.reset(new Relperm::Water::KrFunction(*rhs.wat_)); + } +} + +// ##################################################################### + +std::vector +Opm::ECLSaturationFunc::Impl:: +relperm(const ECLGraph& G, + const ECLRestartData& rstrt, + const ECLPhaseIndex p) const +{ + switch (p) { + case ECLPhaseIndex::Aqua: + return this->krw(G, rstrt); + + case ECLPhaseIndex::Liquid: + return this->kro(G, rstrt); + + case ECLPhaseIndex::Vapour: + return this->krg(G, rstrt); + } + + return {}; +} + +std::vector +Opm::ECLSaturationFunc::Impl:: +kro(const ECLGraph& G, + const ECLRestartData& rstrt) const +{ + auto kr = std::vector{}; + + if (! this->oil_) { + return kr; + } + + const auto& sg = G.rawLinearisedCellData(rstrt, "SGAS"); + const auto& sw = G.rawLinearisedCellData(rstrt, "SWAT"); + + auto so_g = oil_saturation(sg, sw, G, rstrt); + auto so_w = so_g; + + if (this->eps_) { + // Independent scaling of So in O/G and O/W sub-systems of an O/G/W + // run. Performs duplicate work in a two-phase case. Need to take + // action if this becomes a bottleneck. + this->eps_->scaleOG(this->rmap_, so_g); + this->eps_->scaleOW(this->rmap_, so_w); + } + + // Allocate result. Member function scatterRegionResult() depends on + // having an allocated result vector into which to write the values from + // a single region. + kr.resize(so_g.size(), 0.0); + + // Compute relative permeability per region. + this->regionLoop([this, &so_g, &so_w, &sg, &sw, &kr] + (const RegionID reg) + { + const auto So_g = Relperm::Oil::KrFunction::SOil { + this->gatherRegionSubset(reg, so_g) + }; + + const auto So_w = Relperm::Oil::KrFunction::SOil { + this->gatherRegionSubset(reg, so_w) + }; + + const auto Sg = Relperm::Oil::KrFunction::SGas { + // Empty in case of Oil/Water system + this->gatherRegionSubset(reg, sg) + }; + + const auto Sw = Relperm::Oil::KrFunction::SWat { + // Empty in case of Oil/Gas system + this->gatherRegionSubset(reg, sw) + }; + + const auto& kro_reg = + this->oil_->kro(reg, So_g, Sg, So_w, Sw); + + this->scatterRegionResults(reg, kro_reg, kr); + }); + + return kr; +} + +std::vector +Opm::ECLSaturationFunc::Impl:: +krg(const ECLGraph& G, + const ECLRestartData& rstrt) const +{ + auto kr = std::vector{}; + + if (! this->gas_) { + return kr; + } + + auto sg = G.rawLinearisedCellData(rstrt, "SGAS"); + + if (this->eps_) { + this->eps_->scaleGas(this->rmap_, sg); + } + + // Allocate result. Member function scatterRegionResult() depends on + // having an allocated result vector into which to write the values from + // a single region. + kr.resize(sg.size(), 0.0); + + // Compute relative permeability per region. + this->regionLoop([this, &sg, &kr](const RegionID reg) + { + const auto sg_reg = this->gatherRegionSubset(reg, sg); + + const auto krg_reg = + this->gas_->krg(reg, sg_reg); + + this->scatterRegionResults(reg, krg_reg, kr); + }); + + return kr; +} + +std::vector +Opm::ECLSaturationFunc::Impl:: +krw(const ECLGraph& G, + const ECLRestartData& rstrt) const +{ + auto kr = std::vector{}; + + if (! this->wat_) { + return kr; + } + + auto sw = G.rawLinearisedCellData(rstrt, "SWAT"); + + if (this->eps_) { + this->eps_->scaleWat(this->rmap_, sw); + } + + // Allocate result. Member function scatterRegionResult() depends on + // having an allocated result vector into which to write the values from + // a single region. + kr.resize(sw.size(), 0.0); + + // Compute relative permeability per region. + this->regionLoop([this, &sw, &kr](const RegionID reg) + { + const auto sw_reg = this->gatherRegionSubset(reg, sw); + + const auto krw_reg = + this->wat_->krw(reg, sw_reg); + + this->scatterRegionResults(reg, krw_reg, kr); + }); + + return kr; +} + +Opm::ECLSaturationFunc::Impl::EPSEvaluator::RawTEP +Opm::ECLSaturationFunc::Impl:: +extractRawTableEndPoints(const EPSEvaluator::ActPh& active) const +{ + auto ep = EPSEvaluator::RawTEP{}; + + if (active.oil) { + ep.conn.oil = this->oil_->soco(); + ep.crit.oil_in_gas = this->oil_->sogcr(); + ep.crit.oil_in_water = this->oil_->sowcr(); + ep.smax.oil = this->oil_->somax(); + } + + if (active.gas) { + ep.conn.gas = this->gas_->sgco(); + ep.crit.gas = this->gas_->sgcr(); + ep.smax.gas = this->gas_->sgmax(); + } + + if (active.wat) { + ep.conn.water = this->wat_->swco(); + ep.crit.water = this->wat_->swcr(); + ep.smax.water = this->wat_->swmax(); + } + + return ep; +} + +// ===================================================================== + +Opm::ECLSaturationFunc:: +ECLSaturationFunc(const ECLGraph& G, + const ECLInitFileData& init, + const bool useEPS) + : pImpl_(new Impl(G, init)) +{ + this->pImpl_->init(G, init, useEPS); +} + +Opm::ECLSaturationFunc::~ECLSaturationFunc() +{} + +Opm::ECLSaturationFunc::ECLSaturationFunc(ECLSaturationFunc&& rhs) + : pImpl_(std::move(rhs.pImpl_)) +{} + +Opm::ECLSaturationFunc::ECLSaturationFunc(const ECLSaturationFunc& rhs) + : pImpl_(new Impl(*rhs.pImpl_)) +{} + +Opm::ECLSaturationFunc& +Opm::ECLSaturationFunc::operator=(ECLSaturationFunc&& rhs) +{ + this->pImpl_ = std::move(rhs.pImpl_); + + return *this; +} + +Opm::ECLSaturationFunc& +Opm::ECLSaturationFunc::operator=(const ECLSaturationFunc& rhs) +{ + this->pImpl_.reset(new Impl(*rhs.pImpl_)); + + return *this; +} + +std::vector +Opm::ECLSaturationFunc:: +relperm(const ECLGraph& G, + const ECLRestartData& rstrt, + const ECLPhaseIndex p) const +{ + return this->pImpl_->relperm(G, rstrt, p); +} diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLSaturationFunc.hpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLSaturationFunc.hpp new file mode 100644 index 0000000000..658b4048cd --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLSaturationFunc.hpp @@ -0,0 +1,139 @@ +/* + Copyright 2017 Statoil ASA. + + This file is part of the Open Porous Media Project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#ifndef OPM_ECLSATURATIONFUNC_HEADER_INCLUDED +#define OPM_ECLSATURATIONFUNC_HEADER_INCLUDED + +#include + +#include +#include + +/// \file +/// +/// Public interface to relative permeability evaluation machinery. The +/// back-end is aware of ECLIPSE's standard three-phase model for relative +/// permeability of oil and the two- and three-point saturation end-point +/// scaling options. Vertical scaling of relative permeability is not +/// supported at present. + +namespace Opm { + class ECLGraph; + class ECLRestartData; + class ECLInitFileData; + + /// Gateway to engine for computing relative permeability values based + /// on tabulated saturation functions in ECL output. + class ECLSaturationFunc + { + public: + /// Constructor + /// + /// \param[in] G Connected topology of current model's active cells. + /// Needed to linearise region mapping (e.g., SATNUM) that is + /// distributed on local grids to all of the model's active cells + /// (\code member function G.rawLinearisedCellData() \endcode). + /// + /// \param[in] init Container of tabulated saturation functions and + /// saturation table end points, if applicable, for all active + /// cells in the model \p G. + /// + /// \param[in] useEPS Whether or not to include effects of + /// saturation end-point scaling. No effect if the INIT result + /// set does not actually include saturation end-point scaling + /// data. Otherwise, enables turning EPS off even if associate + /// data is present in the INIT result set. + /// + /// Default value (\c true) means that effects of EPS are + /// included if requisite data is present in the INIT result. + ECLSaturationFunc(const ECLGraph& G, + const ECLInitFileData& init, + const bool useEPS = true); + + /// Destructor. + ~ECLSaturationFunc(); + + /// Move constructor. + /// + /// Subsumes the implementation of an existing object. + /// + /// \param[in] rhs Existing engine for saturation function + /// evaluation. Does not have a valid implementation when the + /// constructor completes. + ECLSaturationFunc(ECLSaturationFunc&& rhs); + + /// Copy constructor. + /// + /// \param[in] rhs Existing engine for saturation function + /// evaluation. + ECLSaturationFunc(const ECLSaturationFunc& rhs); + + /// Move assignment operator. + /// + /// Subsumes the implementation of an existing object. + /// + /// \param[in] rhs Existing engine for saturation function + /// evaluation. Does not have a valid implementation when the + /// constructor completes. + /// + /// \return \code *this \endcode. + ECLSaturationFunc& operator=(ECLSaturationFunc&& rhs); + + /// Assignment operator. + /// + /// \param[in] rhs Existing engine for saturation function + /// evaluation. + /// + /// \return \code *this \endcode. + ECLSaturationFunc& operator=(const ECLSaturationFunc& rhs); + + /// Compute relative permeability values in all active cells for a + /// single phase. + /// + /// \param[in] G Connected topology of current model's active cells. + /// Needed to linearise phase saturations (e.g., SOIL) that are + /// distributed on local grids to all of the model's active cells + /// (\code member function G.rawLinearisedCellData() \endcode). + /// + /// \param[in] rstrt ECLIPSE restart vectors. Result set view + /// assumed to be positioned at a particular report step of + /// interest. + /// + /// \param[in] p Phase for which to compute relative permeability + /// values. + /// + /// \return Derived relative permeability values of active phase \p + /// p for all active cells in model \p G. Empty if phase \p p is + /// not actually active in the current result set. + std::vector + relperm(const ECLGraph& G, + const ECLRestartData& rstrt, + const ECLPhaseIndex p) const; + + private: + /// Implementation backend. + class Impl; + + /// Pointer to actual backend/engine object. + std::unique_ptr pImpl_; + }; + +} // namespace Opm + +#endif // OPM_ECLSATURATIONFUNC_HEADER_INCLUDED diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLUnitHandling.cpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLUnitHandling.cpp new file mode 100644 index 0000000000..4f29ba1ae6 --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLUnitHandling.cpp @@ -0,0 +1,208 @@ +/* + Copyright 2017 Statoil ASA. + + This file is part of the Open Porous Media Project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#if HAVE_CONFIG_H +#include +#endif + +#include + +#include + +#include +#include +#include + +#include + +namespace Opm { namespace ECLUnits { + namespace Impl { + ert_ecl_unit_enum getUnitConvention(const int usys); + + template + class USys; + + template <> + class USys : public ::Opm::ECLUnits::UnitSystem + { + public: + virtual double pressure() const override + { + return Metric::Pressure; + } + + virtual double reservoirRate() const override + { + return Metric::ReservoirVolume / Metric::Time; + } + + virtual double reservoirVolume() const override + { + return Metric::ReservoirVolume; + } + + virtual double time() const override + { + return Metric::Time; + } + + virtual double transmissibility() const override + { + return Metric::Transmissibility; + } + }; + + template <> + class USys : public ::Opm::ECLUnits::UnitSystem + { + public: + virtual double pressure() const override + { + return Field::Pressure; + } + + virtual double reservoirRate() const override + { + return Field::ReservoirVolume / Field::Time; + } + + virtual double reservoirVolume() const override + { + return Field::ReservoirVolume; + } + + virtual double time() const override + { + return Field::Time; + } + + virtual double transmissibility() const override + { + return Field::Transmissibility; + } + }; + + template <> + class USys : public ::Opm::ECLUnits::UnitSystem + { + public: + virtual double pressure() const override + { + return Lab::Pressure; + } + + virtual double reservoirRate() const override + { + return Lab::ReservoirVolume / Lab::Time; + } + + virtual double reservoirVolume() const override + { + return Lab::ReservoirVolume; + } + + virtual double time() const override + { + return Lab::Time; + } + + virtual double transmissibility() const override + { + return Lab::Transmissibility; + } + }; + + template <> + class USys : public ::Opm::ECLUnits::UnitSystem + { + public: + virtual double pressure() const override + { + return unit::atm; + } + + virtual double reservoirRate() const override + { + using namespace prefix; + using namespace unit; + + return cubic(meter) / day; + } + + virtual double reservoirVolume() const override + { + using namespace prefix; + using namespace unit; + + return cubic(meter); + } + + virtual double time() const override + { + return unit::day; + } + + virtual double transmissibility() const override + { + using namespace prefix; + using namespace unit; + + return centi*Poise * cubic(meter) / (day * atm); + } + }; + } // namespace Impl +}} // namespace Opm::ECLUnits + +ert_ecl_unit_enum +Opm::ECLUnits::Impl::getUnitConvention(const int usys) +{ + switch (usys) { + case 1: return ECL_METRIC_UNITS; + case 2: return ECL_FIELD_UNITS; + case 3: return ECL_LAB_UNITS; + case 4: return ECL_PVT_M_UNITS; + } + + throw std::runtime_error("Unsupported Unit Convention: " + + std::to_string(usys)); +} + +std::unique_ptr +Opm::ECLUnits::createUnitSystem(const int usys) +{ + using UPtr = + std::unique_ptr; + + switch (Impl::getUnitConvention(usys)) { + case ECL_METRIC_UNITS: + return UPtr{ new Impl::USys{} }; + + case ECL_FIELD_UNITS: + return UPtr{ new Impl::USys{} }; + + case ECL_LAB_UNITS: + return UPtr{ new Impl::USys{} }; + + case ECL_PVT_M_UNITS: + return UPtr{ new Impl::USys{} }; + } + + throw std::runtime_error("Unsupported Unit Convention: " + + std::to_string(usys)); +} diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLUnitHandling.hpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLUnitHandling.hpp new file mode 100644 index 0000000000..87fe95d75b --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLUnitHandling.hpp @@ -0,0 +1,44 @@ +/* + Copyright 2017 Statoil ASA. + + This file is part of the Open Porous Media Project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#ifndef OPM_ECLUNITHANDLING_HEADER_INCLUDED +#define OPM_ECLUNITHANDLING_HEADER_INCLUDED + +#include + +namespace Opm { + + namespace ECLUnits { + + struct UnitSystem + { + virtual double pressure() const = 0; + virtual double reservoirRate() const = 0; + virtual double reservoirVolume() const = 0; + virtual double time() const = 0; + virtual double transmissibility() const = 0; + }; + + std::unique_ptr + createUnitSystem(const int usys); + + } // namespace ECLUnits +} // namespace Opm + +#endif // OPM_ECLUNITHANDLING_HEADER_INCLUDED diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLWellSolution.cpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLWellSolution.cpp new file mode 100644 index 0000000000..f1c17fbc52 --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLWellSolution.cpp @@ -0,0 +1,244 @@ +/* + Copyright 2016 SINTEF ICT, Applied Mathematics. + Copyright 2016, 2017 Statoil ASA. + + This file is part of the Open Porous Media project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#if HAVE_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Opm +{ + + namespace { + + // --------- Restart file keywords. --------- + + // Note: + // This struct is more complete (containing more fields) + // than currently needed, but we should expect that more + // fields could be needed in the future. + struct INTEHEAD + { + + // Unit codes used in INTEHEAD + enum { + Metric = 1, + Field = 2, + Lab = 3 + }; + + explicit INTEHEAD(const std::vector& v) + : unit (v[INTEHEAD_UNIT_INDEX]) + , nx (v[INTEHEAD_NX_INDEX]) + , ny (v[INTEHEAD_NY_INDEX]) + , nz (v[INTEHEAD_NZ_INDEX]) + , nactive(v[INTEHEAD_NACTIVE_INDEX]) + , iphs (v[INTEHEAD_PHASE_INDEX]) + , nwell (v[INTEHEAD_NWELLS_INDEX]) + , ncwma (v[INTEHEAD_NCWMAX_INDEX]) + , nwgmax (v[INTEHEAD_NWGMAX_INDEX]) + , ngmaxz (v[INTEHEAD_NGMAXZ_INDEX]) + , niwel (v[INTEHEAD_NIWELZ_INDEX]) + , nswel (v[INTEHEAD_NSWELZ_INDEX]) + , nxwel (v[INTEHEAD_NXWELZ_INDEX]) + , nzwel (v[INTEHEAD_NZWELZ_INDEX]) + , nicon (v[INTEHEAD_NICONZ_INDEX]) + , nscon (v[INTEHEAD_NSCONZ_INDEX]) + , nxcon (v[INTEHEAD_NXCONZ_INDEX]) + , nigrpz (v[INTEHEAD_NIGRPZ_INDEX]) + , iday (v[INTEHEAD_DAY_INDEX]) + , imon (v[INTEHEAD_MONTH_INDEX]) + , iyear (v[INTEHEAD_YEAR_INDEX]) + , iprog (v[INTEHEAD_IPROG_INDEX]) + { + } + + int unit; // Unit system. 1:metric, 2:field, 3:lab. + int nx; // Cartesian size i-direction. + int ny; // Cartesian size j-direction. + int nz; // Cartesian size k-direction. + int nactive; // Number of active cells. + int iphs; // Phase. 1:o, 2:w, 3:ow, 4:g, 5:og, 6:wg, 7:owg. + int nwell; // Number of wells. + int ncwma; // Maximum number of completions per well. + int nwgmax; // Maximum number of wells in any group. + int ngmaxz; // Maximum number of groups in field. + int niwel; // Number of elements pr. well in the IWEL array. + int nswel; // Number of elements pr. well in the SWEL array. + int nxwel; // Number of elements pr. well in the XWEL array. + int nzwel; // Number of 8 character words pr. well in ZWEL. + int nicon; // Number of elements pr completion in the ICON array. + int nscon; // Number of elements pr completion in the SCON array. + int nxcon; // Number of elements pr completion in the XCON array. + int nigrpz; // Number of elements pr group in the IGRP array. + int iday; // Report day. + int imon; // Report month. + int iyear; // Report year. + int iprog; // Eclipse program type. 100, 300 or 500. + }; + + + + + // Reservoir rate units from code used in INTEHEAD. + double resRateUnit(const int unit_code) + { + return ECLUnits::createUnitSystem(unit_code)->reservoirRate(); + } + + + + + // Return input string with spaces stripped of the right end. + std::string trimSpacesRight(const std::string& s) + { + return std::string(s.begin(), s.begin() + s.find_last_not_of(' ') + 1); + } + + + + + // Constants not provided by ert. + enum { XWEL_RESV_INDEX = 4 }; + enum { IWEL_TYPE_PRODUCER = 1 }; + + + } // anonymous namespace + + + + + ECLWellSolution::ECLWellSolution(const double rate_threshold, + const bool disallow_crossflow) + : rate_threshold_(rate_threshold) + , disallow_crossflow_(disallow_crossflow) + { + } + + + + + + std::vector + ECLWellSolution::solution(const ECLRestartData& restart, + const std::vector& grids) const + { + // Note: this function expects to be called with the correct restart + // block--e.g., a report step--selected in the caller. + + // Read well data for global grid. + std::vector all_wd{}; + for (const auto& gridName : grids) { + std::vector wd = readWellData(restart, gridName); + // Append to set of all well data. + all_wd.insert(all_wd.end(), wd.begin(), wd.end()); + } + return all_wd; + } + + + + + std::vector + ECLWellSolution::readWellData(const ECLRestartData& restart, + const std::string& gridName) const + { + // Check if result set provides complete set of well solution data. + if (! (restart.haveKeywordData(ZWEL_KW, gridName) && + restart.haveKeywordData(IWEL_KW, gridName) && + restart.haveKeywordData("XWEL" , gridName) && + restart.haveKeywordData(ICON_KW, gridName) && + restart.haveKeywordData("XCON" , gridName))) + { + // Not all requisite keywords present in this grid. Can't + // create a well solution. + return {}; + } + + // Read header, return if trivial. + INTEHEAD ih(restart.keywordData(INTEHEAD_KW, gridName)); + if (ih.nwell == 0) { + return {}; + } + const double qr_unit = resRateUnit(ih.unit); + + // Load well topology and flow rates. + auto zwel = restart.keywordData(ZWEL_KW, gridName); + auto iwel = restart.keywordData (IWEL_KW, gridName); + auto xwel = restart.keywordData ("XWEL" , gridName); + auto icon = restart.keywordData (ICON_KW, gridName); + auto xcon = restart.keywordData ("XCON" , gridName); + + // Create well data. + std::vector wd_vec; + wd_vec.reserve(ih.nwell); + for (int well = 0; well < ih.nwell; ++well) { + // Skip if total rate below threshold (for wells that are + // shut or stopped for example). + const double well_reservoir_inflow_rate = -unit::convert::from(xwel[well * ih.nxwel + XWEL_RESV_INDEX], qr_unit); + if (std::fabs(well_reservoir_inflow_rate) < rate_threshold_) { + continue; + } + // Otherwise: add data for this well. + WellData wd; + wd.name = trimSpacesRight(zwel[well * ih.nzwel]); + const bool is_producer = (iwel[well * ih.niwel + IWEL_TYPE_INDEX] == IWEL_TYPE_PRODUCER); + wd.is_injector_well = !is_producer; + const int ncon = iwel[well * ih.niwel + IWEL_CONNECTIONS_INDEX]; + wd.completions.reserve(ncon); + for (int comp_index = 0; comp_index < ncon; ++comp_index) { + const int icon_offset = (well*ih.ncwma + comp_index) * ih.nicon; + const int xcon_offset = (well*ih.ncwma + comp_index) * ih.nxcon; + WellData::Completion completion; + // Note: subtracting 1 from indices (Fortran -> C convention). + completion.gridName = gridName; + completion.ijk = { icon[icon_offset + ICON_I_INDEX] - 1, + icon[icon_offset + ICON_J_INDEX] - 1, + icon[icon_offset + ICON_K_INDEX] - 1 }; + // Note: taking the negative input, to get inflow rate. + completion.reservoir_inflow_rate = -unit::convert::from(xcon[xcon_offset + XCON_QR_INDEX], qr_unit); + if (disallow_crossflow_) { + // Add completion only if not cross-flowing (injecting producer or producing injector). + if ((completion.reservoir_inflow_rate < 0.0) == is_producer) { + wd.completions.push_back(completion); + } + } else { + // Always add completion. + wd.completions.push_back(completion); + } + } + wd_vec.push_back(wd); + } + return wd_vec; + } + + + + +} // namespace Opm diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLWellSolution.hpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLWellSolution.hpp new file mode 100644 index 0000000000..94e24c65ec --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/opm/utility/ECLWellSolution.hpp @@ -0,0 +1,77 @@ +/* + Copyright 2016 SINTEF ICT, Applied Mathematics. + Copyright 2016, 2017 Statoil ASA. + + This file is part of the Open Porous Media project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#ifndef OPM_ECLWELLSOLUTION_HEADER_INCLUDED +#define OPM_ECLWELLSOLUTION_HEADER_INCLUDED + +#include +#include +#include +#include + +namespace Opm +{ + + class ECLRestartData; + + class ECLWellSolution + { + public: + /// Constructor. + /// \param[in] rate_threshold a well will be ignored if its total RESV rate is less than this (m^3/s) + /// \param[in] disallow_crossflow if true, injecting perforations of production wells and vice versa will be ignored + explicit ECLWellSolution(const double rate_threshold = 1e-14, + const bool disallow_crossflow = true); + + /// Contains the well data extracted from the restart file. + struct WellData + { + std::string name; + bool is_injector_well; + struct Completion + { + std::string gridName; // empty for main grid, otherwise LGR grid. + std::array ijk; // Cartesian location in grid. + double reservoir_inflow_rate; // Total fluid rate in SI (m^3/s). + }; + std::vector completions; + }; + + /// Return well solution for pre-selected report step + /// + /// Will throw if required data is not available for the + /// requested step. + std::vector solution(const ECLRestartData& restart, + const std::vector& grids) const; + + private: + // Data members. + double rate_threshold_; + bool disallow_crossflow_; + + // Methods. + std::vector readWellData(const ECLRestartData& restart, + const std::string& gridName) const; + }; + + +} // namespace Opm + +#endif // OPM_ECLWELLSOLUTION_HEADER_INCLUDED diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/tests/runAcceptanceTest.cpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/tests/runAcceptanceTest.cpp new file mode 100644 index 0000000000..bb8108d72d --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/tests/runAcceptanceTest.cpp @@ -0,0 +1,450 @@ +/* + Copyright 2017 SINTEF ICT, Applied Mathematics. + Copyright 2017 Statoil ASA. + + This file is part of the Open Porous Media project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + + +namespace { + struct PoreVolume + { + std::vector data; + }; + + class VectorDifference + { + public: + using Vector = std::vector; + using size_type = Vector::size_type; + + VectorDifference(const Vector& x, const Vector& y) + : x_(x), y_(y) + { + if (x_.size() != y_.size()) { + std::ostringstream os; + + os << "Incompatible Array Sizes: Expected 2x" + << x_.size() << ", but got (" + << x_.size() << ", " << y_.size() << ')'; + + throw std::domain_error(os.str()); + } + } + + size_type size() const + { + return x_.size(); + } + + bool empty() const + { + return this->size() == 0; + } + + double operator[](const size_type i) const + { + return x_[i] - y_[i]; + } + + private: + const Vector& x_; + const Vector& y_; + }; + + template + class VectorRatio + { + public: + using size_type = typename std::decay< + decltype(std::declval()[0]) + >::type; + + VectorRatio(const Vector1& x, const Vector2& y) + : x_(x), y_(y) + { + if (x_.size() != y.size()) { + std::ostringstream os; + + os << "Incompatible Array Sizes: Expected 2x" + << x_.size() << ", but got (" + << x_.size() << ", " << y_.size() << ')'; + + throw std::domain_error(os.str()); + } + } + + size_type size() const + { + return x_.size(); + } + + bool empty() const + { + return x_.empty(); + } + + double operator[](const size_type i) const + { + return x_[i] / y_[i]; + } + + private: + const Vector1& x_; + const Vector2& y_; + }; + + struct ErrorMeasurement + { + double volume; + double inf; + }; + + struct ErrorTolerance + { + double absolute; + double relative; + }; + + struct AggregateErrors + { + std::vector absolute; + std::vector relative; + }; + + struct ReferenceToF + { + std::vector forward; + std::vector reverse; + }; + + template + double volumeMetric(const PoreVolume& pv, + const FieldVariable& x) + { + if (x.size() != pv.data.size()) { + std::ostringstream os; + + os << "Incompatible Array Sizes: Expected 2x" + << pv.data.size() << ", but got (" + << pv.data.size() << ", " << x.size() << ')'; + + throw std::domain_error(os.str()); + } + + auto num = 0.0; + auto den = 0.0; + + for (decltype(pv.data.size()) + i = 0, n = pv.data.size(); i < n; ++i) + { + num += std::abs(x[i]) * pv.data[i]; + den += pv.data[i]; + } + + return num / den; + } + + template + double pointMetric(const FieldVariable& x) + { + static_assert(std::is_same::type, double>::value, + "Field Variable Value Type Must be 'double'"); + + if (x.empty()) { + return 0; + } + + auto max = 0*x[0] - 1; + + for (decltype(x.size()) + i = 0, n = x.size(); i < n; ++i) + { + const auto t = std::abs(x[i]); + + if (t > max) { + max = t; + } + } + + return max; + } + + std::vector + availableReportSteps(const example::FilePaths& paths) + { + using FilePtr = ::ERT:: + ert_unique_ptr; + + const auto rsspec_fn = example:: + deriveFileName(paths.grid, { ".RSSPEC", ".FRSSPEC" }); + + // Read-only, keep open between requests + const auto open_flags = 0; + + auto rsspec = FilePtr{ + ecl_file_open(rsspec_fn.generic_string().c_str(), open_flags) + }; + + auto* globView = ecl_file_get_global_view(rsspec.get()); + + const auto* ITIME_kw = "ITIME"; + const auto n = ecl_file_view_get_num_named_kw(globView, ITIME_kw); + + auto steps = std::vector(n); + + for (auto i = 0*n; i < n; ++i) { + const auto* itime = + ecl_file_view_iget_named_kw(globView, ITIME_kw, i); + + const auto* itime_data = + static_cast(ecl_kw_iget_ptr(itime, 0)); + + steps[i] = itime_data[0]; + } + + return steps; + } + + ErrorTolerance + testTolerances(const ::Opm::ParameterGroup& param) + { + const auto atol = param.getDefault("atol", 1.0e-8); + const auto rtol = param.getDefault("rtol", 5.0e-12); + + return ErrorTolerance{ atol, rtol }; + } + + int numDigits(const std::vector& steps) + { + if (steps.empty()) { + return 1; + } + + const auto m = + *std::max_element(std::begin(steps), std::end(steps)); + + if (m == 0) { + return 1; + } + + assert (m > 0); + + return std::floor(std::log10(static_cast(m))) + 1; + } + + ReferenceToF + loadReference(const ::Opm::ParameterGroup& param, + const int step, + const int nDigits) + { + namespace fs = boost::filesystem; + + using VRef = std::reference_wrapper>; + + auto fname = fs::path(param.get("ref-dir")); + { + std::ostringstream os; + + os << "tof-" << std::setw(nDigits) << std::setfill('0') + << step << ".txt"; + + fname /= os.str(); + } + + fs::ifstream input(fname); + + if (! input) { + std::ostringstream os; + + os << "Unable to Open Reference Data File " + << fname.filename(); + + throw std::domain_error(os.str()); + } + + auto tof = ReferenceToF{}; + + auto ref = std::array{{ std::ref(tof.forward) , + std::ref(tof.reverse) }}; + + { + auto i = static_cast(0); + auto t = 0.0; + + while (input >> t) { + ref[i].get().push_back(t); + + i = (i + 1) % 2; + } + } + + if (tof.forward.size() != tof.reverse.size()) { + std::ostringstream os; + + os << "Unable to Read Consistent ToF Reference Data From " + << fname.filename(); + + throw std::out_of_range(os.str()); + } + + return tof; + } + + void computeErrors(const PoreVolume& pv, + const std::vector& ref, + const ::Opm::FlowDiagnostics::Solution& fd, + AggregateErrors& E) + { + const auto tof = fd.timeOfFlight(); + const auto diff = VectorDifference(tof, ref); // tof - ref + + using Vector1 = std::decay::type; + using Vector2 = std::decay::type; + using Ratio = VectorRatio; + + const auto rat = Ratio(diff, ref); // (tof - ref) / ref + + auto abs = ErrorMeasurement{}; + { + abs.volume = volumeMetric(pv, diff); + abs.inf = pointMetric ( diff); + } + + auto rel = ErrorMeasurement{}; + { + rel.volume = volumeMetric(pv, rat); + rel.inf = pointMetric ( rat); + } + + E.absolute.push_back(std::move(abs)); + E.relative.push_back(std::move(rel)); + } + + std::array + sampleDifferences(example::Setup&& setup, + const std::vector& steps) + { + const auto start = + std::vector{}; + + const auto nDigits = numDigits(steps); + + const auto pv = PoreVolume{ setup.graph.poreVolume() }; + + auto E = std::array{}; + + for (const auto& step : steps) { + if (step == 0) { + // Ignore initial condition + continue; + } + + if (! setup.selectReportStep(step)) { + continue; + } + + const auto ref = loadReference(setup.param, step, nDigits); + + { + const auto fwd = setup.toolbox + .computeInjectionDiagnostics(start); + + computeErrors(pv, ref.forward, fwd.fd, E[0]); + } + + { + const auto rev = setup.toolbox + .computeProductionDiagnostics(start); + + computeErrors(pv, ref.reverse, rev.fd, E[1]); + } + } + + return E; + } + + bool errorAcceptable(const std::vector& E, + const double tol) + { + return std::accumulate(std::begin(E), std::end(E), true, + [tol](const bool ok, const ErrorMeasurement& e) + { + // Fine if at least one of .volume or .inf <= tol. + return ok && ! ((e.volume > tol) && (e.inf > tol)); + }); + } + + bool everythingFine(const AggregateErrors& E, + const ErrorTolerance& tol) + { + return errorAcceptable(E.absolute, tol.absolute) + && errorAcceptable(E.relative, tol.relative); + } +} // namespace Anonymous + +int main(int argc, char* argv[]) +try { + auto setup = example::Setup(argc, argv); + + const auto tol = testTolerances(setup.param); + const auto steps = availableReportSteps(setup.file_paths); + + const auto E = sampleDifferences(std::move(setup), steps); + const auto ok = + everythingFine(E[0], tol) && everythingFine(E[1], tol); + + std::cout << (ok ? "OK" : "FAIL") << '\n'; + + if (! ok) { + return EXIT_FAILURE; + } +} +catch (const std::exception& e) { + std::cerr << "Caught Exception: " << e.what() << '\n'; + + return EXIT_FAILURE; +} diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/tests/runLinearisedCellDataTest.cpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/tests/runLinearisedCellDataTest.cpp new file mode 100644 index 0000000000..4fdd583e62 --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/tests/runLinearisedCellDataTest.cpp @@ -0,0 +1,598 @@ +/* + Copyright 2017 SINTEF ICT, Applied Mathematics. + Copyright 2017 Statoil ASA. + + This file is part of the Open Porous Media project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +namespace StringUtils { + namespace { + std::string trim(const std::string& s) + { + const auto anchor_ws = + boost::regex(R"~~(^\s+([^\s]+)\s+$)~~"); + + auto m = boost::smatch{}; + + if (boost::regex_match(s, m, anchor_ws)) { + return m[1]; + } + + return s; + } + + std::vector split(const std::string& s) + { + if (s.empty()) { + // Single element vector whose only element is the empty + // string. + return { "" }; + } + + const auto sep = boost::regex(R"~~([\s,;.|]+)~~"); + + using TI = boost::sregex_token_iterator; + + // vector(begin, end) + // + // Range is every substring (i.e., token) in input string 's' + // that does NOT match 'sep'. + return{ TI(s.begin(), s.end(), sep, -1), TI{} }; + } + } // namespace Anonymous + + template + struct StringTo; + + template <> + struct StringTo + { + static int value(const std::string& s); + }; + + template <> + struct StringTo + { + static double value(const std::string& s); + }; + + template <> + struct StringTo + { + static std::string value(const std::string& s); + }; + + int StringTo::value(const std::string& s) + { + return std::stoi(s); + } + + double StringTo::value(const std::string& s) + { + return std::stod(s); + } + + std::string StringTo::value(const std::string& s) + { + return trim(s); + } + + namespace VectorValue { + template + std::vector get(const std::string& s, std::true_type) + { + return split(s); + } + + template + std::vector get(const std::string& s, std::false_type) + { + const auto tokens = split(s); + + auto ret = std::vector{}; + ret.reserve(tokens.size()); + for (const auto& token : tokens) { + ret.push_back(StringTo::value(token)); + } + + return ret; + } + + template + std::vector get(const std::string& s) + { + return get(s, typename std::is_same::type()); + } + } // namespace VectorValue +} // namespace StringUtils + +namespace { + struct Reference + { + std::vector data; + }; + + struct Calculated + { + std::vector data; + }; + + class VectorUnits + { + private: + using USys = ::Opm::ECLUnits::UnitSystem; + + public: + using UnitConvention = ::Opm::ECLGraph::UnitConvention; + + VectorUnits() + : units_({ { "pressure", &USys::pressure } }) + { + } + + UnitConvention getUnit(const std::string& vector) const + { + auto p = units_.find(vector); + + if (p == units_.end()) { + std::ostringstream os; + + os << "Unsupported Vector Quantity '" << vector << '\''; + + throw std::domain_error(os.str()); + } + + return p->second; + } + + private: + std::map units_; + }; + + class VectorDifference + { + public: + using Vector = std::vector; + using size_type = Vector::size_type; + + VectorDifference(const Vector& x, const Vector& y) + : x_(x), y_(y) + { + if (x_.size() != y_.size()) { + std::ostringstream os; + + os << "Incompatible Array Sizes: Expected 2x" + << x_.size() << ", but got (" + << x_.size() << ", " << y_.size() << ')'; + + throw std::domain_error(os.str()); + } + } + + size_type size() const + { + return x_.size(); + } + + bool empty() const + { + return this->size() == 0; + } + + double operator[](const size_type i) const + { + return x_[i] - y_[i]; + } + + private: + const Vector& x_; + const Vector& y_; + }; + + template + class VectorRatio + { + public: + using size_type = typename std::decay< + decltype(std::declval()[0]) + >::type; + + VectorRatio(const Vector1& x, const Vector2& y) + : x_(x), y_(y) + { + if (x_.size() != y.size()) { + std::ostringstream os; + + os << "Incompatible Array Sizes: Expected 2x" + << x_.size() << ", but got (" + << x_.size() << ", " << y_.size() << ')'; + + throw std::domain_error(os.str()); + } + } + + size_type size() const + { + return x_.size(); + } + + bool empty() const + { + return x_.empty(); + } + + double operator[](const size_type i) const + { + return x_[i] / y_[i]; + } + + private: + const Vector1& x_; + const Vector2& y_; + }; + + struct ErrorMeasurement + { + double volume; + double inf; + }; + + struct ErrorTolerance + { + double absolute; + double relative; + }; + + struct AggregateErrors + { + std::vector absolute; + std::vector relative; + }; + + struct ReferenceSolution + { + std::vector raw; + std::vector SI; + }; + + template + double volumeMetric(const FieldVariable& x) + { + auto result = 0.0; + + for (decltype(x.size()) + i = 0, n = x.size(); i < n; ++i) + { + const auto m = std::abs(x[i]); + result += m * m; + } + + return std::sqrt(result / x.size()); + } + + template + double pointMetric(const FieldVariable& x) + { + static_assert(std::is_same::type, double>::value, + "Field Variable Value Type Must be 'double'"); + + if (x.empty()) { + return 0; + } + + auto max = 0*x[0] - 1; + + for (decltype(x.size()) + i = 0, n = x.size(); i < n; ++i) + { + const auto t = std::abs(x[i]); + + if (t > max) { + max = t; + } + } + + return max; + } + + std::vector + availableReportSteps(const example::FilePaths& paths) + { + using FilePtr = ::ERT:: + ert_unique_ptr; + + const auto rsspec_fn = example:: + deriveFileName(paths.grid, { ".RSSPEC", ".FRSSPEC" }); + + // Read-only, keep open between requests + const auto open_flags = 0; + + auto rsspec = FilePtr{ + ecl_file_open(rsspec_fn.generic_string().c_str(), open_flags) + }; + + auto* globView = ecl_file_get_global_view(rsspec.get()); + + const auto* ITIME_kw = "ITIME"; + const auto n = ecl_file_view_get_num_named_kw(globView, ITIME_kw); + + auto steps = std::vector(n); + + for (auto i = 0*n; i < n; ++i) { + const auto* itime = + ecl_file_view_iget_named_kw(globView, ITIME_kw, i); + + const auto* itime_data = + static_cast(ecl_kw_iget_ptr(itime, 0)); + + steps[i] = itime_data[0]; + } + + return steps; + } + + ErrorTolerance + testTolerances(const ::Opm::ParameterGroup& param) + { + const auto atol = param.getDefault("atol", 1.0e-8); + const auto rtol = param.getDefault("rtol", 5.0e-12); + + return ErrorTolerance{ atol, rtol }; + } + + std::vector + testQuantities(const ::Opm::ParameterGroup& param) + { + return StringUtils::VectorValue:: + get(param.get("quant")); + } + + int numDigits(const std::vector& steps) + { + if (steps.empty()) { + return 1; + } + + const auto m = + *std::max_element(std::begin(steps), std::end(steps)); + + if (m == 0) { + return 1; + } + + assert (m > 0); + + return std::floor(std::log10(static_cast(m))) + 1; + } + + ReferenceSolution + loadReference(const ::Opm::ParameterGroup& param, + const std::string& quant, + const int step, + const int nDigits) + { + namespace fs = boost::filesystem; + + using VRef = std::reference_wrapper>; + + auto x = ReferenceSolution{}; + auto ref = std::array{{ std::ref(x.raw) , + std::ref(x.SI ) }}; + + auto i = 0; + + for (const auto* q : { "raw", "SI" }) { + auto fname = fs::path(param.get("ref-dir")) + / boost::algorithm::to_lower_copy(quant); + { + std::ostringstream os; + + os << q << '-' + << std::setw(nDigits) << std::setfill('0') + << step << ".txt"; + + fname /= os.str(); + } + + fs::ifstream input(fname); + + if (input) { + ref[i].get().assign(std::istream_iterator(input), + std::istream_iterator()); + } + + i += 1; + } + + if (x.raw.size() != x.SI.size()) { + std::ostringstream os; + + os << "Unable to Read Consistent Reference Data From '" + << param.get("ref-dir") << "' In Step " + << step; + + throw std::out_of_range(os.str()); + } + + return x; + } + + void computeErrors(const Reference& ref, + const Calculated& calc, + AggregateErrors& E) + { + const auto diff = + VectorDifference(calc.data, ref.data); // calc - ref + + using Vector1 = std::decay::type; + using Vector2 = std::decay::type; + using Ratio = VectorRatio; + + const auto rat = Ratio(diff, ref.data); // (tof - ref) / ref + + auto abs = ErrorMeasurement{}; + { + abs.volume = volumeMetric(diff); + abs.inf = pointMetric (diff); + } + + auto rel = ErrorMeasurement{}; + { + rel.volume = volumeMetric(rat); + rel.inf = pointMetric (rat); + } + + E.absolute.push_back(std::move(abs)); + E.relative.push_back(std::move(rel)); + } + + std::array + sampleDifferences(const ::Opm::ECLGraph& graph, + const ::Opm::ECLRestartData& rstrt, + const ::Opm::ParameterGroup& param, + const std::string& quant, + const std::vector& steps) + { + const auto ECLquant = boost::algorithm::to_upper_copy(quant); + + auto unit = VectorUnits() + .getUnit(boost::algorithm::to_lower_copy(quant)); + + const auto start = + std::vector{}; + + const auto nDigits = numDigits(steps); + + auto E = std::array{}; + + for (const auto& step : steps) { + if (! rstrt.selectReportStep(step)) { + continue; + } + + const auto ref = loadReference(param, quant, step, nDigits); + + { + const auto raw = Calculated { + graph.rawLinearisedCellData(rstrt, ECLquant) + }; + + computeErrors(Reference{ ref.raw }, raw, E[0]); + } + + { + const auto SI = Calculated { + graph.linearisedCellData(rstrt, ECLquant, unit) + }; + + computeErrors(Reference{ ref.SI }, SI, E[1]); + } + } + + return E; + } + + bool errorAcceptable(const std::vector& E, + const double tol) + { + return std::accumulate(std::begin(E), std::end(E), true, + [tol](const bool ok, const ErrorMeasurement& e) + { + // Fine if at least one of .volume or .inf <= tol. + return ok && ! ((e.volume > tol) && (e.inf > tol)); + }); + } + + bool everythingFine(const AggregateErrors& E, + const ErrorTolerance& tol) + { + return errorAcceptable(E.absolute, tol.absolute) + && errorAcceptable(E.relative, tol.relative); + } + + ::Opm::ECLGraph + constructGraph(const example::FilePaths& pth) + { + const auto I = ::Opm::ECLInitFileData(pth.init); + + return ::Opm::ECLGraph::load(pth.grid, I); + } +} // namespace Anonymous + +int main(int argc, char* argv[]) +try { + const auto prm = example::initParam(argc, argv); + const auto pth = example::FilePaths(prm); + const auto tol = testTolerances(prm); + + const auto rstrt = ::Opm::ECLRestartData(pth.restart); + const auto steps = availableReportSteps(pth); + const auto graph = constructGraph(pth); + + auto all_ok = true; + for (const auto& quant : testQuantities(prm)) { + const auto E = + sampleDifferences(graph, rstrt, prm, quant, steps); + + const auto ok = + everythingFine(E[0], tol) && everythingFine(E[1], tol); + + std::cout << quant << ": " << (ok ? "OK" : "FAIL") << '\n'; + + all_ok = all_ok && ok; + } + + if (! all_ok) { + return EXIT_FAILURE; + } +} +catch (const std::exception& e) { + std::cerr << "Caught Exception: " << e.what() << '\n'; + + return EXIT_FAILURE; +} diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/tests/runTransTest.cpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/tests/runTransTest.cpp new file mode 100644 index 0000000000..e42ee4e862 --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/tests/runTransTest.cpp @@ -0,0 +1,237 @@ +/* + Copyright 2017 SINTEF ICT, Applied Mathematics. + Copyright 2017 Statoil ASA. + + This file is part of the Open Porous Media project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +namespace { + class VectorDifference + { + public: + using Vector = std::vector; + using size_type = Vector::size_type; + + VectorDifference(const Vector& x, const Vector& y) + : x_(x), y_(y) + { + if (x_.size() != y_.size()) { + std::ostringstream os; + + os << "Incompatible Array Sizes: Expected 2x" + << x_.size() << ", but got (" + << x_.size() << ", " << y_.size() << ')'; + + throw std::domain_error(os.str()); + } + } + + size_type size() const + { + return x_.size(); + } + + bool empty() const + { + return this->size() == 0; + } + + double operator[](const size_type i) const + { + return x_[i] - y_[i]; + } + + private: + const Vector& x_; + const Vector& y_; + }; + + template + class VectorRatio + { + public: + using size_type = typename std::decay< + decltype(std::declval()[0]) + >::type; + + VectorRatio(const Vector1& x, const Vector2& y) + : x_(x), y_(y) + { + if (x_.size() != y.size()) { + std::ostringstream os; + + os << "Incompatible Array Sizes: Expected 2x" + << x_.size() << ", but got (" + << x_.size() << ", " << y_.size() << ')'; + + throw std::domain_error(os.str()); + } + } + + size_type size() const + { + return x_.size(); + } + + bool empty() const + { + return x_.empty(); + } + + double operator[](const size_type i) const + { + return x_[i] / y_[i]; + } + + private: + const Vector1& x_; + const Vector2& y_; + }; + + struct ErrorTolerance + { + double absolute; + double relative; + }; + + template + double pointMetric(const FieldVariable& x) + { + static_assert(std::is_same::type, double>::value, + "Field Variable Value Type Must be 'double'"); + + if (x.empty()) { + return 0; + } + + auto max = 0*x[0] - 1; + + for (decltype(x.size()) + i = 0, n = x.size(); i < n; ++i) + { + const auto t = std::abs(x[i]); + + if (t > max) { + max = t; + } + } + + return max; + } + + ErrorTolerance + testTolerances(const ::Opm::ParameterGroup& param) + { + const auto atol = param.getDefault("atol", 1.0e-8); + const auto rtol = param.getDefault("rtol", 5.0e-12); + + return ErrorTolerance{ atol, rtol }; + } + + std::vector + loadReference(const ::Opm::ParameterGroup& param) + { + namespace fs = boost::filesystem; + + const auto fname = + fs::path(param.get("ref-dir")) / "trans.txt"; + + fs::ifstream input(fname); + + if (! input) { + std::ostringstream os; + + os << "Unable to Open Reference Trans-Data File " + << fname.filename(); + + throw std::domain_error(os.str()); + } + + return { + std::istream_iterator(input), + std::istream_iterator() + }; + } + + bool transfieldAcceptable(const ::Opm::ParameterGroup& param, + const std::vector& trans) + { + const auto Tref = loadReference(param); + + if (Tref.size() != trans.size()) { + return false; + } + + const auto diff = VectorDifference{ trans, Tref }; + + using Vector1 = std::decay::type; + using Vector2 = std::decay::type; + using Ratio = VectorRatio; + + const auto rat = Ratio(diff, Tref); + const auto tol = testTolerances(param); + + return ! ((pointMetric(diff) > tol.absolute) || + (pointMetric(rat) > tol.relative)); + } + + ::Opm::ECLGraph + constructGraph(const example::FilePaths& pth) + { + const auto I = ::Opm::ECLInitFileData(pth.init); + + return ::Opm::ECLGraph::load(pth.grid, I); + } +} // namespace Anonymous + +int main(int argc, char* argv[]) +try { + const auto prm = example::initParam(argc, argv); + const auto pth = example::FilePaths(prm); + const auto G = constructGraph(pth); + const auto T = G.transmissibility(); + const auto ok = transfieldAcceptable(prm, T); + + std::cout << (ok ? "OK" : "FAIL") << '\n'; + + if (! ok) { + return EXIT_FAILURE; + } +} +catch (const std::exception& e) { + std::cerr << "Caught Exception: " << e.what() << '\n'; + + return EXIT_FAILURE; +} diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/tests/test_eclendpointscaling.cpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/tests/test_eclendpointscaling.cpp new file mode 100644 index 0000000000..1aff18e58c --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/tests/test_eclendpointscaling.cpp @@ -0,0 +1,469 @@ +/* + Copyright 2017 Statoil ASA. + + This file is part of the Open Porous Media Project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#if HAVE_CONFIG_H +#include +#endif // HAVE_CONFIG_H + +#if HAVE_DYNAMIC_BOOST_TEST +#define BOOST_TEST_DYN_LINK +#endif + +#define NVERBOSE + +#define BOOST_TEST_MODULE TEST_ECLENDPOINTSCALING + +#include +#include +#include + +#include + +#include +#include +#include + +namespace { + template + void check_is_close(const Collection1& c1, const Collection2& c2) + { + BOOST_REQUIRE_EQUAL(c1.size(), c2.size()); + + if (! c1.empty()) { + auto i1 = c1.begin(), e1 = c1.end(); + auto i2 = c2.begin(); + + for (; i1 != e1; ++i1, ++i2) { + BOOST_CHECK_CLOSE(*i1, *i2, 1.0e-10); + } + } + } + + ::Opm::SatFunc::EPSEvalInterface::SaturationPoints + associate(const std::vector& s) + { + using SatAssoc = ::Opm::SatFunc:: + EPSEvalInterface::SaturationAssoc; + + auto sp = ::Opm::SatFunc:: + EPSEvalInterface::SaturationPoints{}; + + sp.reserve(s.size()); + + for (const auto& si : s) { + sp.push_back(SatAssoc{ 0, si }); + } + + return sp; + } +} // Namespace Anonymous + +// ===================================================================== +// Two-point scaling +// --------------------------------------------------------------------- + +BOOST_AUTO_TEST_SUITE (TwoPointScaling_FullRange) + +BOOST_AUTO_TEST_CASE (NoScaling) +{ + namespace SF = ::Opm::SatFunc; + + const auto tep = SF::EPSEvalInterface:: + TableEndPoints { 0.0, 0.0, 1.0 }; + + const auto smin = std::vector{ 0.0 }; + const auto smax = std::vector{ 1.0 }; + + const auto s = std::vector { + 0.0, + 0.2, + 0.4, + 0.6, + 0.8, + 1.0, + }; + + const auto sp = associate(s); + const auto expect = std::vector { + 0.0, + 0.2, + 0.4, + 0.6, + 0.8, + 1.0, + }; + + const auto eps = SF::TwoPointScaling{ smin, smax }; + + const auto s_eff = eps.eval(tep, sp); + + check_is_close(s_eff, expect); +} + +BOOST_AUTO_TEST_CASE (ScaledConnate) +{ + namespace SF = ::Opm::SatFunc; + + // Mobile Range: [0.2, 1.0] maps to [ 0.0, 1.0 ] + const auto smin = std::vector{ 0.2 }; + const auto smax = std::vector{ 1.0 }; + + const auto tep = SF::EPSEvalInterface:: + TableEndPoints { 0.0, 0.0, 1.0 }; + + const auto s = std::vector { + 0.0, + 0.2, + 0.4, + 0.6, + 0.8, + 1.0, + }; + + const auto sp = associate(s); + const auto expect = std::vector { + 0, + 0, + 0.25, + 0.5, + 0.75, + 1.0, + }; + + const auto eps = SF::TwoPointScaling{ smin, smax }; + + const auto s_eff = eps.eval(tep, sp); + + check_is_close(s_eff, expect); +} + +BOOST_AUTO_TEST_CASE (ScaledMax) +{ + namespace SF = ::Opm::SatFunc; + + // Mobile Range: [0.0, 0.8] maps to [ 0.0, 1.0 ] + const auto smin = std::vector{ 0.0 }; + const auto smax = std::vector{ 0.8 }; + + const auto tep = SF::EPSEvalInterface:: + TableEndPoints { 0.0, 0.0, 1.0 }; + + const auto s = std::vector { + 0.0, + 0.2, + 0.4, + 0.6, + 0.8, + 1.0, + }; + + const auto sp = associate(s); + const auto expect = std::vector { + 0, + 0.25, + 0.5, + 0.75, + 1.0, + 1.0, + }; + + const auto eps = SF::TwoPointScaling{ smin, smax }; + + const auto s_eff = eps.eval(tep, sp); + + check_is_close(s_eff, expect); +} + +BOOST_AUTO_TEST_CASE (ScaledBoth) +{ + namespace SF = ::Opm::SatFunc; + + // Mobile Range: [0.2, 0.8] maps to [ 0.0, 1.0 ] + const auto smin = std::vector{ 0.2 }; + const auto smax = std::vector{ 0.8 }; + + const auto tep = SF::EPSEvalInterface:: + TableEndPoints { 0.0, 0.0, 1.0 }; + + const auto s = std::vector { + 0.0, + 0.2, + 0.4, + 0.6, + 0.8, + 1.0, + }; + + const auto sp = associate(s); + const auto expect = std::vector { + 0, + 0.0, + 1.0 / 3.0, + 2.0 / 3.0, + 1.0, + 1.0, + }; + + const auto eps = SF::TwoPointScaling{ smin, smax }; + + const auto s_eff = eps.eval(tep, sp); + + check_is_close(s_eff, expect); +} + +BOOST_AUTO_TEST_SUITE_END () + +// ===================================================================== + +BOOST_AUTO_TEST_SUITE (TwoPointScaling_ReducedRange) + +BOOST_AUTO_TEST_CASE (NoScaling) +{ + namespace SF = ::Opm::SatFunc; + + const auto smin = std::vector{ 0.2 }; + const auto smax = std::vector{ 0.8 }; + + const auto tep = SF::EPSEvalInterface:: + TableEndPoints { 0.2, 0.0, 0.8 }; + + const auto s = std::vector { + 0.0, + 0.2, + 0.4, + 0.6, + 0.8, + 1.0, + }; + + const auto sp = associate(s); + const auto expect = std::vector { + 0.2, + 0.2, + 0.4, + 0.6, + 0.8, + 0.8, + }; + + const auto eps = SF::TwoPointScaling{ smin, smax }; + + const auto s_eff = eps.eval(tep, sp); + + check_is_close(s_eff, expect); +} + +BOOST_AUTO_TEST_CASE (ScaledConnate) +{ + namespace SF = ::Opm::SatFunc; + + // Mobile Range: [0.0, 1.0] maps to [ 0.2, 0.8 ] + // s_eff = 0.6*s + 0.2 + const auto smin = std::vector{ 0.0 }; + const auto smax = std::vector{ 1.0 }; + + const auto tep = SF::EPSEvalInterface:: + TableEndPoints { 0.2, 0.0, 0.8 }; + + const auto s = std::vector { + 0.0, + 0.2, + 0.4, + 0.6, + 0.8, + 1.0, + }; + + const auto sp = associate(s); + const auto expect = std::vector { + 0.20, + 0.32, + 0.44, + 0.56, + 0.68, + 0.80, + }; + + const auto eps = SF::TwoPointScaling{ smin, smax }; + + const auto s_eff = eps.eval(tep, sp); + + check_is_close(s_eff, expect); +} + +BOOST_AUTO_TEST_CASE (ScaledMax) +{ + namespace SF = ::Opm::SatFunc; + + // Mobile Range: [0.2, 0.8] maps to [ 0.0, 1.0 ] + // s_eff = max(0.75*s + 0.05, 0.2) + const auto smin = std::vector{ 0.2 }; + const auto smax = std::vector{ 1.0 }; + + const auto tep = SF::EPSEvalInterface:: + TableEndPoints { 0.2, 0.0, 0.8 }; + + const auto s = std::vector { + 0.0, + 0.2, + 0.4, + 0.6, + 0.8, + 1.0, + }; + + const auto sp = associate(s); + const auto expect = std::vector { + 0.20, + 0.20, + 0.35, + 0.50, + 0.65, + 0.80, + }; + + const auto eps = SF::TwoPointScaling{ smin, smax }; + + const auto s_eff = eps.eval(tep, sp); + + check_is_close(s_eff, expect); +} + +BOOST_AUTO_TEST_CASE (ScaledBoth) +{ + namespace SF = ::Opm::SatFunc; + + // Mobile Range: [0.2, 0.8] maps to [ 0.5, 0.7 ] + // s_eff = min(max(0.2, 3*s - 13/10), 0.8) + const auto smin = std::vector{ 0.5 }; + const auto smax = std::vector{ 0.7 }; + + const auto tep = SF::EPSEvalInterface:: + TableEndPoints { 0.2, 0.0, 0.8 }; + + const auto s = std::vector { + 0.0, + 0.2, + 0.4, + 0.6, + 0.8, + 1.0, + }; + + const auto sp = associate(s); + const auto expect = std::vector { + 0.2, + 0.2, + 0.2, + 0.5, + 0.8, + 0.8, + }; + + const auto eps = SF::TwoPointScaling{ smin, smax }; + + const auto s_eff = eps.eval(tep, sp); + + check_is_close(s_eff, expect); +} + +BOOST_AUTO_TEST_SUITE_END () + +// ===================================================================== +// Three-point (alternative) scaling, applicable to relperm only. +// --------------------------------------------------------------------- + +BOOST_AUTO_TEST_SUITE (ThreePointScaling_FullRange) + +BOOST_AUTO_TEST_CASE (NoScaling) +{ + namespace SF = ::Opm::SatFunc; + + const auto tep = SF::EPSEvalInterface:: + TableEndPoints { 0.0, 0.2, 1.0 }; + + const auto smin = std::vector{ 0.0 }; + const auto sdisp = std::vector{ 0.2 }; + const auto smax = std::vector{ 1.0 }; + + const auto s = std::vector { + 0.0, + 0.2, + 0.4, + 0.6, + 0.8, + 1.0, + }; + + const auto sp = associate(s); + const auto expect = std::vector { + 0.0, + 0.2, + 0.4, + 0.6, + 0.8, + 1.0, + }; + + const auto eps = SF::ThreePointScaling{ smin, sdisp, smax }; + + const auto s_eff = eps.eval(tep, sp); + + check_is_close(s_eff, expect); +} + +BOOST_AUTO_TEST_CASE (ScaledConnate) +{ + namespace SF = ::Opm::SatFunc; + + // Mobile Range: [0.4, 1.0] maps to [ 0.0, 1.0 ] + const auto smin = std::vector{ 0.1 }; + const auto sdisp = std::vector{ 0.4 }; + const auto smax = std::vector{ 1.0 }; + + const auto tep = SF::EPSEvalInterface:: + TableEndPoints { 0.0, 0.2, 1.0 }; + + const auto s = std::vector { + 0.0, + 0.2, + 0.4, + 0.6, + 0.8, + 1.0, + }; + + const auto sp = associate(s); + const auto expect = std::vector { + 0, + 1.0 / 15, + 0.2, + 7.0 / 15, + 11.0 / 15, + 1.0, + }; + + const auto eps = SF::ThreePointScaling{ smin, sdisp, smax }; + + const auto s_eff = eps.eval(tep, sp); + + check_is_close(s_eff, expect); +} + +BOOST_AUTO_TEST_SUITE_END () diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/tests/test_eclproptable.cpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/tests/test_eclproptable.cpp new file mode 100644 index 0000000000..f6e4f4f92c --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/tests/test_eclproptable.cpp @@ -0,0 +1,2417 @@ +/* + Copyright 2017 Statoil ASA. + + This file is part of the Open Porous Media Project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#if HAVE_CONFIG_H +#include +#endif // HAVE_CONFIG_H + +#if HAVE_DYNAMIC_BOOST_TEST +#define BOOST_TEST_DYN_LINK +#endif + +#define NVERBOSE + +#define BOOST_TEST_MODULE TEST_ECLPROPTABLE + +#include +#include +#include + +#include + +#include +#include + +namespace { + template + void check_is_close(const Collection1& c1, const Collection2& c2) + { + BOOST_REQUIRE_EQUAL(c1.size(), c2.size()); + + if (! c1.empty()) { + auto i1 = c1.begin(), e1 = c1.end(); + auto i2 = c2.begin(); + + for (; i1 != e1; ++i1, ++i2) { + BOOST_CHECK_CLOSE(*i1, *i2, 1.0e-10); + } + } + } + + Opm::ECLPropTableRawData + toRawTableFormat(Opm::ECLPropTableRawData t) + { + // Note: Raw table format is nTab*nRows consecutive values for one + // column followed by nTab*nRows consecutive values for the next + // column &c. + + const auto d = t.data; + const auto rTabStride = t.numRows * t.numCols; + const auto wColStride = t.numRows * t.numTables; + + for (auto c = 0*t.numCols; c < t.numCols; ++c) { + const auto wStart = c * wColStride; + + for (auto k = 0*t.numTables; k < t.numTables; ++k) { + const auto rStart = k * rTabStride; + const auto wOff = k * t.numRows; + + for (auto i = 0*t.numRows; i < t.numRows; ++i) { + t.data[wStart + wOff + i] = + d [rStart + i*t.numCols + c]; + } + } + } + + return t; + } +} // Namespace Anonymous + +// ===================================================================== +// Invalid tables (error handling/input validation) +// --------------------------------------------------------------------- + +BOOST_AUTO_TEST_SUITE (InvalidTables) + +BOOST_AUTO_TEST_CASE (EmptyTable) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s, kr , pc + }; + + t.numRows = 0; + t.numCols = 3; + t.numTables = 1; + + BOOST_CHECK_THROW(Opm::SatFuncInterpolant(toRawTableFormat(t)), + std::invalid_argument); +} + +BOOST_AUTO_TEST_CASE (SingleNode) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s, kr , pc + 0.3 , 0.1 , 0.0, + }; + + t.numRows = 1; + t.numCols = 3; + t.numTables = 1; + + BOOST_CHECK_THROW(Opm::SatFuncInterpolant(toRawTableFormat(t)), + std::invalid_argument); +} + +BOOST_AUTO_TEST_CASE (NoResultColumns) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s + 0.2, + 0.3, + 0.7, + 0.8, + }; + + t.numRows = 4; + t.numCols = 1; + t.numTables = 1; + + BOOST_CHECK_THROW(Opm::SatFuncInterpolant(toRawTableFormat(t)), + std::invalid_argument); +} + +BOOST_AUTO_TEST_CASE (EmptyTableLargeNodeAlloc) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s , kr , pc + -1.0e+20, -1.0e+20, 0.0, + -1.0e+20, -1.0e+20, 0.0, + -1.0e+20, -1.0e+20, 0.0, + -1.0e+20, -1.0e+20, 0.0, + 1.0e+20 , 1.0e+20, 0.0, + 1.0e+20 , 1.0e+20, 0.0, + 1.0e+20 , 1.0e+20, 0.0, + 1.0e+20 , 1.0e+20, 0.0, + }; + + t.numRows = 8; + t.numCols = 3; + t.numTables = 1; + + BOOST_CHECK_THROW(Opm::SatFuncInterpolant(toRawTableFormat(t)), + std::invalid_argument); +} + +BOOST_AUTO_TEST_CASE (SingleNodeLargeNodeAlloc) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s , kr , pc + -1.0e+20, -1.0e+20, 0.0, + -1.0e+20, -1.0e+20, 0.0, + -1.0e+20, -1.0e+20, 0.0, + -1.0e+20, -1.0e+20, 0.0, + 0.3 , 0.1 , 0.0, + 1.0e+20 , 1.0e+20, 0.0, + 1.0e+20 , 1.0e+20, 0.0, + 1.0e+20 , 1.0e+20, 0.0, + 1.0e+20 , 1.0e+20, 0.0, + }; + + t.numRows = 9; + t.numCols = 3; + t.numTables = 1; + + BOOST_CHECK_THROW(Opm::SatFuncInterpolant(toRawTableFormat(t)), + std::invalid_argument); +} + +BOOST_AUTO_TEST_CASE (NoResultColumnsLargeNodeAlloc) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s + -1.0e+20, + -1.0e+20, + -1.0e+20, + -1.0e+20, + 0.2, + 0.3, + 0.7, + 0.8, + 1.0e+20, + 1.0e+20, + 1.0e+20, + 1.0e+20, + }; + + t.numRows = 12; + t.numCols = 1; + t.numTables = 1; + + BOOST_CHECK_THROW(Opm::SatFuncInterpolant(toRawTableFormat(t)), + std::invalid_argument); +} + +BOOST_AUTO_TEST_SUITE_END () + +// ===================================================================== +// Single table (i.e., a single region). +// --------------------------------------------------------------------- + +BOOST_AUTO_TEST_SUITE (InterpolationSingleTable) + +BOOST_AUTO_TEST_CASE (AtNodes) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s, kr , pc + 0.2 , 0.0 , 0.0, + 0.3 , 0.1 , 0.0, + 0.8 , 0.5 , 0.0, + }; + + t.numRows = 3; + t.numCols = 3; + t.numTables = 1; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + const auto s = std::vector{ 0.8, 0.3, 0.3, 0.2 }; + const auto kr_expect = std::vector{ 0.5, 0.1, 0.1, 0.0 }; + const auto pc_expect = std::vector{ 0.0, 0.0, 0.0, 0.0 }; + + using InTable = Opm::SatFuncInterpolant::InTable; + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + // Check interpolation + + const auto kr = swfunc.interpolate(InTable{0}, ResultColumn{0}, s); + const auto pc = swfunc.interpolate(InTable{0}, ResultColumn{1}, s); + + check_is_close(kr, kr_expect); + check_is_close(pc, pc_expect); + + // Check error handling + + // Table ID out of range. + BOOST_CHECK_THROW(swfunc.interpolate(InTable{10}, ResultColumn{0}, s), + std::invalid_argument); + + // Result Column ID out of range. + BOOST_CHECK_THROW(swfunc.interpolate(InTable{0}, ResultColumn{2}, s), + std::invalid_argument); +} + +BOOST_AUTO_TEST_CASE (AboveAndBelow) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s, kr , pc + 0.2 , 0.0 , 0.0, + 0.3 , 0.1 , 0.0, + 0.8 , 0.5 , 0.0, + }; + + t.numRows = 3; + t.numCols = 3; + t.numTables = 1; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + const auto s = std::vector{ 0.80000001, 0.9, 0.199999999, 0.1 }; + const auto kr_expect = std::vector{ 0.5, 0.5, 0.0, 0.0 }; + const auto pc_expect = std::vector{ 0.0, 0.0, 0.0, 0.0 }; + + using InTable = Opm::SatFuncInterpolant::InTable; + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + const auto kr = swfunc.interpolate(InTable{0}, ResultColumn{0}, s); + const auto pc = swfunc.interpolate(InTable{0}, ResultColumn{1}, s); + + check_is_close(kr, kr_expect); + check_is_close(pc, pc_expect); +} + +BOOST_AUTO_TEST_CASE (Interpolation) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s, kr , pc + 0.2 , 0.0 , 0.0, + 0.3 , 0.1 , 0.0, + 0.8 , 0.5 , 0.0, + }; + + t.numRows = 3; + t.numCols = 3; + t.numTables = 1; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + const auto s = std::vector{ + 0.2000, + 0.2300, + 0.2600, + 0.2900, + 0.3200, + 0.3500, + 0.3800, + 0.4100, + 0.4400, + 0.4700, + 0.5000, + 0.5300, + 0.5600, + 0.5900, + 0.6200, + 0.6500, + 0.6800, + 0.7100, + 0.7400, + 0.7700, + 0.8000, + }; + + const auto kr_expect = std::vector{ + 0, + 0.0300, + 0.0600, + 0.0900, + 0.1160, + 0.1400, + 0.1640, + 0.1880, + 0.2120, + 0.2360, + 0.2600, + 0.2840, + 0.3080, + 0.3320, + 0.3560, + 0.3800, + 0.4040, + 0.4280, + 0.4520, + 0.4760, + 0.5000, + }; + + const auto pc_expect = std::vector(s.size(), 0.0); + + using InTable = Opm::SatFuncInterpolant::InTable; + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + const auto kr = swfunc.interpolate(InTable{0}, ResultColumn{0}, s); + const auto pc = swfunc.interpolate(InTable{0}, ResultColumn{1}, s); + + check_is_close(kr, kr_expect); + check_is_close(pc, pc_expect); +} + +BOOST_AUTO_TEST_CASE (InterpolationLargeNodeAlloc) +{ + auto t = Opm::ECLPropTableRawData{}; + + // 1e20 is a sentinel value that counts as row "ignored". + t.data = std::vector{ + // s , kr , pc + -1.0e20, -1.0e+100, 0.0, // 1 + -1.0e20, -1.0e+100, 0.0, // 2 + -1.0e20, -1.0e+100, 0.0, // 3 + -1.0e20, -1.0e+100, 0.0, // 4 + -1.0e20, -1.0e+100, 0.0, // 5 + 0.2 , 0.0 , 0.0, // 6 + 0.3 , 0.1 , 0.0, // 7 + 0.8 , 0.5 , 0.0, // 8 + 1.0e20 , 1.0e+100 , 0.0, // 9 + 1.0e20 , 1.0e+100 , 0.0, // 10 + 1.0e20 , 1.0e+100 , 0.0, // 11 + 1.0e20 , 1.0e+100 , 0.0, // 12 + 1.0e20 , 1.0e+100 , 0.0, // 13 + 1.0e20 , 1.0e+100 , 0.0, // 14 + 1.0e20 , 1.0e+100 , 0.0, // 15 + }; + + t.numRows = 15; + t.numCols = 3; + t.numTables = 1; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + const auto s = std::vector{ + 0.0000, + 0.1000, + 0.1500, + 0.1900, + 0.2000, + 0.2300, + 0.2600, + 0.2900, + 0.3200, + 0.3500, + 0.3800, + 0.4100, + 0.4400, + 0.4700, + 0.5000, + 0.5300, + 0.5600, + 0.5900, + 0.6200, + 0.6500, + 0.6800, + 0.7100, + 0.7400, + 0.7700, + 0.8000, + 0.8100, + 0.8500, + 0.9000, + 1.0000, + }; + + const auto kr_expect = std::vector{ + 0, + 0, + 0, + 0, + 0, + 0.0300, + 0.0600, + 0.0900, + 0.1160, + 0.1400, + 0.1640, + 0.1880, + 0.2120, + 0.2360, + 0.2600, + 0.2840, + 0.3080, + 0.3320, + 0.3560, + 0.3800, + 0.4040, + 0.4280, + 0.4520, + 0.4760, + 0.5000, + 0.5000, + 0.5000, + 0.5000, + 0.5000, + }; + + const auto pc_expect = std::vector(s.size(), 0.0); + + using InTable = Opm::SatFuncInterpolant::InTable; + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + const auto kr = swfunc.interpolate(InTable{0}, ResultColumn{0}, s); + const auto pc = swfunc.interpolate(InTable{0}, ResultColumn{1}, s); + + check_is_close(kr, kr_expect); + check_is_close(pc, pc_expect); +} + +BOOST_AUTO_TEST_SUITE_END () + +// ===================================================================== +// Multiple tables (i.e., multiple regions). +// --------------------------------------------------------------------- + +BOOST_AUTO_TEST_SUITE (InterpolationFourTables) + +BOOST_AUTO_TEST_CASE (AtNodes) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // Table 0 + // s, kr , pc + 0.2 , 0.0 , 0.0, + 0.3 , 0.1 , 0.0, + 0.8 , 0.5 , 0.0, + + // Table 1 + // s, kr , pc + 0.2 , 0.0 , 0.0, + 0.3 , 0.1 , 0.0, + 0.8 , 0.5 , 0.0, + + // Table 2 + // s, kr , pc + 0.2 , 0.0 , 0.0, + 0.3 , 0.1 , 0.0, + 0.8 , 0.5 , 0.0, + + // Table 3 + // s, kr , pc + 0.2 , 0.0 , 0.0, + 0.3 , 0.1 , 0.0, + 0.8 , 0.5 , 0.0, + }; + + t.numRows = 3; + t.numCols = 3; + t.numTables = 4; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + const auto s = std::vector{ 0.8, 0.3, 0.3, 0.2 }; + const auto kr_expect = std::vector{ 0.5, 0.1, 0.1, 0.0 }; + const auto pc_expect = std::vector{ 0.0, 0.0, 0.0, 0.0 }; + + using InTable = Opm::SatFuncInterpolant::InTable; + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + for (auto ti = 0*t.numTables; ti < t.numTables; ++ti) { + const auto kr = swfunc.interpolate(InTable{ti}, ResultColumn{0}, s); + const auto pc = swfunc.interpolate(InTable{ti}, ResultColumn{1}, s); + + check_is_close(kr, kr_expect); + check_is_close(pc, pc_expect); + + // Check error handling + + // Table ID out of range. + BOOST_CHECK_THROW(swfunc.interpolate(InTable{10}, ResultColumn{0}, s), + std::invalid_argument); + + // Result Column ID out of range. + BOOST_CHECK_THROW(swfunc.interpolate(InTable{0}, ResultColumn{2}, s), + std::invalid_argument); + } +} + +BOOST_AUTO_TEST_CASE (AboveAndBelow) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // Table 0 + // s, kr , pc + 0.2 , 0.0 , 0.0, + 0.3 , 0.1 , 0.0, + 0.8 , 0.5 , 0.0, + + // Table 1 + // s, kr , pc + 0.2 , 0.0 , 0.0, + 0.3 , 0.1 , 0.0, + 0.8 , 0.5 , 0.0, + + // Table 2 + // s, kr , pc + 0.2 , 0.0 , 0.0, + 0.3 , 0.1 , 0.0, + 0.8 , 0.5 , 0.0, + + // Table 3 + // s, kr , pc + 0.2 , 0.0 , 0.0, + 0.3 , 0.1 , 0.0, + 0.8 , 0.5 , 0.0, + }; + + t.numRows = 3; + t.numCols = 3; + t.numTables = 4; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + const auto s = std::vector{ 0.80000001, 0.9, 0.199999999, 0.1 }; + const auto kr_expect = std::vector{ 0.5, 0.5, 0.0, 0.0 }; + const auto pc_expect = std::vector{ 0.0, 0.0, 0.0, 0.0 }; + + using InTable = Opm::SatFuncInterpolant::InTable; + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + for (auto ti = 0*t.numTables; ti < t.numTables; ++ti) { + const auto kr = swfunc.interpolate(InTable{ti}, ResultColumn{0}, s); + const auto pc = swfunc.interpolate(InTable{ti}, ResultColumn{1}, s); + + check_is_close(kr, kr_expect); + check_is_close(pc, pc_expect); + } +} + +BOOST_AUTO_TEST_CASE (Interpolation) +{ + auto t = Opm::ECLPropTableRawData{}; + + // 1e20 is a sentinel value that counts as row "ignored". + t.data = std::vector{ + // Table 0 + // s, kr , pc + 0.2 , 0.0 , 0.0, + 0.3 , 0.1 , 0.0, + 0.8 , 0.5 , 0.0, + + // Table 1 + // s, kr , pc + 0.2 , 0.0 , 0.0, + 0.3 , 0.1 , 0.0, + 0.8 , 0.5 , 0.0, + + // Table 2 + // s, kr , pc + 0.2 , 0.0 , 0.0, + 0.3 , 0.1 , 0.0, + 0.8 , 0.5 , 0.0, + + // Table 3 + // s, kr , pc + 0.2 , 0.0 , 0.0, + 0.3 , 0.1 , 0.0, + 0.8 , 0.5 , 0.0, + }; + + t.numRows = 3; + t.numCols = 3; + t.numTables = 4; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + const auto s = std::vector{ + 0.2000, + 0.2300, + 0.2600, + 0.2900, + 0.3200, + 0.3500, + 0.3800, + 0.4100, + 0.4400, + 0.4700, + 0.5000, + 0.5300, + 0.5600, + 0.5900, + 0.6200, + 0.6500, + 0.6800, + 0.7100, + 0.7400, + 0.7700, + 0.8000, + }; + + const auto kr_expect = std::vector{ + 0, + 0.0300, + 0.0600, + 0.0900, + 0.1160, + 0.1400, + 0.1640, + 0.1880, + 0.2120, + 0.2360, + 0.2600, + 0.2840, + 0.3080, + 0.3320, + 0.3560, + 0.3800, + 0.4040, + 0.4280, + 0.4520, + 0.4760, + 0.5000, + }; + + const auto pc_expect = std::vector(s.size(), 0.0); + + using InTable = Opm::SatFuncInterpolant::InTable; + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + for (auto ti = 0*t.numTables; ti < t.numTables; ++ti) { + const auto kr = swfunc.interpolate(InTable{ti}, ResultColumn{0}, s); + const auto pc = swfunc.interpolate(InTable{ti}, ResultColumn{1}, s); + + check_is_close(kr, kr_expect); + check_is_close(pc, pc_expect); + } +} + +BOOST_AUTO_TEST_CASE (InterpolationLargeNodeAlloc) +{ + auto t = Opm::ECLPropTableRawData{}; + + // 1e20 is a sentinel value that counts as row "ignored". + t.data = std::vector{ + // Table 0 + // s , kr , pc + -1.0e20, -1.0e+100, 0.0, // 1 + -1.0e20, -1.0e+100, 0.0, // 2 + -1.0e20, -1.0e+100, 0.0, // 3 + -1.0e20, -1.0e+100, 0.0, // 4 + -1.0e20, -1.0e+100, 0.0, // 5 + 0.2 , 0.0 , 0.0, // 6 + 0.3 , 0.1 , 0.0, // 7 + 0.7 , 0.15 , 0.0, // 8 + 0.8 , 0.5 , 0.0, // 9 + 1.0e20 , 1.0e+100 , 0.0, // 10 + 1.0e20 , 1.0e+100 , 0.0, // 11 + 1.0e20 , 1.0e+100 , 0.0, // 12 + 1.0e20 , 1.0e+100 , 0.0, // 13 + 1.0e20 , 1.0e+100 , 0.0, // 14 + 1.0e20 , 1.0e+100 , 0.0, // 15 + + // Table 1 + // s , kr , pc + -1.0e20, -1.0e+100, 0.0, // 1 + -1.0e20, -1.0e+100, 0.0, // 2 + -1.0e20, -1.0e+100, 0.0, // 3 + -1.0e20, -1.0e+100, 0.0, // 4 + -1.0e20, -1.0e+100, 0.0, // 5 + 0.2 , 0.0 , 0.0, // 6 + 0.3 , 0.1 , 0.0, // 7 + 0.7 , 0.15 , 0.0, // 8 + 0.8 , 0.5 , 0.0, // 9 + 1.0e20 , 1.0e+100 , 0.0, // 10 + 1.0e20 , 1.0e+100 , 0.0, // 11 + 1.0e20 , 1.0e+100 , 0.0, // 12 + 1.0e20 , 1.0e+100 , 0.0, // 13 + 1.0e20 , 1.0e+100 , 0.0, // 14 + 1.0e20 , 1.0e+100 , 0.0, // 15 + + // Table 2 + // s , kr , pc + -1.0e20, -1.0e+100, 0.0, // 1 + -1.0e20, -1.0e+100, 0.0, // 2 + -1.0e20, -1.0e+100, 0.0, // 3 + -1.0e20, -1.0e+100, 0.0, // 4 + -1.0e20, -1.0e+100, 0.0, // 5 + 0.2 , 0.0 , 0.0, // 6 + 0.3 , 0.1 , 0.0, // 7 + 0.7 , 0.15 , 0.0, // 8 + 0.8 , 0.5 , 0.0, // 9 + 1.0e20 , 1.0e+100 , 0.0, // 10 + 1.0e20 , 1.0e+100 , 0.0, // 11 + 1.0e20 , 1.0e+100 , 0.0, // 12 + 1.0e20 , 1.0e+100 , 0.0, // 13 + 1.0e20 , 1.0e+100 , 0.0, // 14 + 1.0e20 , 1.0e+100 , 0.0, // 15 + + // Table 3 + // s , kr , pc + -1.0e20, -1.0e+100, 0.0, // 1 + -1.0e20, -1.0e+100, 0.0, // 2 + -1.0e20, -1.0e+100, 0.0, // 3 + -1.0e20, -1.0e+100, 0.0, // 4 + -1.0e20, -1.0e+100, 0.0, // 5 + 0.2 , 0.0 , 0.0, // 6 + 0.3 , 0.1 , 0.0, // 7 + 0.7 , 0.15 , 0.0, // 8 + 0.8 , 0.5 , 0.0, // 9 + 1.0e20 , 1.0e+100 , 0.0, // 10 + 1.0e20 , 1.0e+100 , 0.0, // 11 + 1.0e20 , 1.0e+100 , 0.0, // 12 + 1.0e20 , 1.0e+100 , 0.0, // 13 + 1.0e20 , 1.0e+100 , 0.0, // 14 + 1.0e20 , 1.0e+100 , 0.0, // 15 + }; + + t.numRows = 15; + t.numCols = 3; + t.numTables = 4; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + const auto s = std::vector{ + 0.0000, + 0.1000, + 0.1500, + 0.1900, + 0.2000, + 0.2300, + 0.2600, + 0.2900, + 0.3200, + 0.3500, + 0.3800, + 0.4100, + 0.4400, + 0.4700, + 0.5000, + 0.5300, + 0.5600, + 0.5900, + 0.6200, + 0.6500, + 0.6800, + 0.7100, + 0.7400, + 0.7700, + 0.8000, + 0.8100, + 0.8500, + 0.9000, + 1.0000, + }; + + const auto kr_expect = std::vector{ + 0, + 0, + 0, + 0, + 0, + 3.0000e-02, + 6.0000e-02, + 9.0000e-02, + 1.0250e-01, + 1.0625e-01, + 1.1000e-01, + 1.1375e-01, + 1.1750e-01, + 1.2125e-01, + 1.2500e-01, + 1.2875e-01, + 1.3250e-01, + 1.3625e-01, + 1.4000e-01, + 1.4375e-01, + 1.4750e-01, + 1.8500e-01, + 2.9000e-01, + 3.9500e-01, + 5.0000e-01, + 5.0000e-01, + 5.0000e-01, + 5.0000e-01, + 5.0000e-01, + }; + + const auto pc_expect = std::vector(s.size(), 0.0); + + using InTable = Opm::SatFuncInterpolant::InTable; + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + for (auto ti = 0*t.numTables; ti < t.numTables; ++ti) { + const auto kr = swfunc.interpolate(InTable{ti}, ResultColumn{0}, s); + const auto pc = swfunc.interpolate(InTable{ti}, ResultColumn{1}, s); + + check_is_close(kr, kr_expect); + check_is_close(pc, pc_expect); + } +} + +BOOST_AUTO_TEST_SUITE_END () + +// ===================================================================== +// Single Table End-Points +// --------------------------------------------------------------------- + +BOOST_AUTO_TEST_SUITE (SingleTableEndPoints) + +BOOST_AUTO_TEST_CASE (SWFN_CritIsConn) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s, kr , pc + 0.2 , 0.0 , 0.0, + 0.3 , 0.1 , 0.0, + 0.8 , 0.5 , 0.0, + }; + + t.numRows = 3; + t.numCols = 3; + t.numTables = 1; + + // Table end-points + const auto sconn_expect = std::vector{ 0.2 }; + const auto scrit_expect = std::vector{ 0.2 }; + const auto smax_expect = std::vector{ 0.8 }; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + const auto sconn = swfunc.connateSat(); + const auto scrit = swfunc.criticalSat(ResultColumn{0}); + const auto smax = swfunc.maximumSat(); + + check_is_close(sconn, sconn_expect); + check_is_close(scrit, scrit_expect); + check_is_close(smax , smax_expect ); +} + +BOOST_AUTO_TEST_CASE (SWFN_CritIsConn_LargeNodeAlloc) +{ + auto t = Opm::ECLPropTableRawData{}; + + // 1e20 is a sentinel value that counts as row "ignored". + t.data = std::vector{ + // s , kr , pc + -1.0e20, -1.0e+100, 0.0, // 1 + -1.0e20, -1.0e+100, 0.0, // 2 + -1.0e20, -1.0e+100, 0.0, // 3 + -1.0e20, -1.0e+100, 0.0, // 4 + -1.0e20, -1.0e+100, 0.0, // 5 + 0.2 , 0.0 , 0.0, // 6 + 0.3 , 0.1 , 0.0, // 7 + 0.8 , 0.5 , 0.0, // 8 + 1.0e20 , 1.0e+100 , 0.0, // 9 + 1.0e20 , 1.0e+100 , 0.0, // 10 + 1.0e20 , 1.0e+100 , 0.0, // 11 + 1.0e20 , 1.0e+100 , 0.0, // 12 + 1.0e20 , 1.0e+100 , 0.0, // 13 + 1.0e20 , 1.0e+100 , 0.0, // 14 + 1.0e20 , 1.0e+100 , 0.0, // 15 + }; + + t.numRows = 15; + t.numCols = 3; + t.numTables = 1; + + // Table end-points + const auto sconn_expect = std::vector{ 0.2 }; + const auto scrit_expect = std::vector{ 0.2 }; + const auto smax_expect = std::vector{ 0.8 }; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + const auto sconn = swfunc.connateSat(); + const auto scrit = swfunc.criticalSat(ResultColumn{0}); + const auto smax = swfunc.maximumSat(); + + check_is_close(sconn, sconn_expect); + check_is_close(scrit, scrit_expect); + check_is_close(smax , smax_expect ); +} + +BOOST_AUTO_TEST_CASE (SWFN) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s, kr , pc + 0.2 , 0.0 , 0.0, + 0.21, 0.0 , 0.0, + 0.3 , 0.1 , 0.0, + 0.8 , 0.5 , 0.0, + }; + + t.numRows = 4; + t.numCols = 3; + t.numTables = 1; + + // Table end-points + const auto sconn_expect = std::vector{ 0.2 }; + const auto scrit_expect = std::vector{ 0.21 }; + const auto smax_expect = std::vector{ 0.8 }; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + const auto sconn = swfunc.connateSat(); + const auto scrit = swfunc.criticalSat(ResultColumn{0}); + const auto smax = swfunc.maximumSat(); + + check_is_close(sconn, sconn_expect); + check_is_close(scrit, scrit_expect); + check_is_close(smax , smax_expect ); +} + +BOOST_AUTO_TEST_CASE (SWFN_LargeNodeAlloc) +{ + auto t = Opm::ECLPropTableRawData{}; + + // 1e20 is a sentinel value that counts as row "ignored". + t.data = std::vector{ + // s , kr , pc + -1.0e20, -1.0e+100, 0.0, // 1 + -1.0e20, -1.0e+100, 0.0, // 2 + -1.0e20, -1.0e+100, 0.0, // 3 + -1.0e20, -1.0e+100, 0.0, // 4 + -1.0e20, -1.0e+100, 0.0, // 5 + 0.2 , 0.0 , 0.0, // 6 + 0.21 , 0.0 , 0.0, // 7 + 0.3 , 0.1 , 0.0, // 8 + 0.8 , 0.5 , 0.0, // 9 + 1.0e20 , 1.0e+100 , 0.0, // 10 + 1.0e20 , 1.0e+100 , 0.0, // 11 + 1.0e20 , 1.0e+100 , 0.0, // 12 + 1.0e20 , 1.0e+100 , 0.0, // 13 + 1.0e20 , 1.0e+100 , 0.0, // 14 + 1.0e20 , 1.0e+100 , 0.0, // 15 + 1.0e20 , 1.0e+100 , 0.0, // 16 + }; + + t.numRows = 16; + t.numCols = 3; + t.numTables = 1; + + // Table end-points + const auto sconn_expect = std::vector{ 0.2 }; + const auto scrit_expect = std::vector{ 0.21 }; + const auto smax_expect = std::vector{ 0.8 }; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + const auto sconn = swfunc.connateSat(); + const auto scrit = swfunc.criticalSat(ResultColumn{0}); + const auto smax = swfunc.maximumSat(); + + check_is_close(sconn, sconn_expect); + check_is_close(scrit, scrit_expect); + check_is_close(smax , smax_expect ); +} + +BOOST_AUTO_TEST_CASE (SOF3_CritIsConn) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s, krow, krog + 0.2 , 0.0 , 0.0, + 0.3 , 0.1 , 0.5, + 0.8 , 0.5 , 0.8, + }; + + t.numRows = 3; + t.numCols = 3; + t.numTables = 1; + + // Table end-points + const auto sconn_expect = std::vector{ 0.2 }; + const auto scrit_krow_expect = std::vector{ 0.2 }; + const auto scrit_krog_expect = std::vector{ 0.2 }; + const auto smax_expect = std::vector{ 0.8 }; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + const auto sconn = swfunc.connateSat(); + const auto scrit_krow = swfunc.criticalSat(ResultColumn{0}); + const auto scrit_krog = swfunc.criticalSat(ResultColumn{1}); + const auto smax = swfunc.maximumSat(); + + check_is_close(sconn , sconn_expect ); + check_is_close(scrit_krow, scrit_krow_expect); + check_is_close(scrit_krog, scrit_krog_expect); + check_is_close(smax , smax_expect ); +} + +BOOST_AUTO_TEST_CASE (SOF3_CritIsConn_LargeNodeAlloc) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s , krow , krog + -1.0e20, -1.0e+100, -1.0e+100, // 1 + -1.0e20, -1.0e+100, -1.0e+100, // 2 + -1.0e20, -1.0e+100, -1.0e+100, // 3 + -1.0e20, -1.0e+100, -1.0e+100, // 4 + -1.0e20, -1.0e+100, -1.0e+100, // 5 + 0.2 , 0.0 , 0.0, // 6 + 0.3 , 0.1 , 0.5, // 7 + 0.8 , 0.5 , 0.8, // 8 + 1.0e20 , 1.0e+100, 1.0e+100, // 9 + 1.0e20 , 1.0e+100, 1.0e+100, // 10 + 1.0e20 , 1.0e+100, 1.0e+100, // 11 + 1.0e20 , 1.0e+100, 1.0e+100, // 12 + 1.0e20 , 1.0e+100, 1.0e+100, // 13 + 1.0e20 , 1.0e+100, 1.0e+100, // 14 + 1.0e20 , 1.0e+100, 1.0e+100, // 15 + }; + + t.numRows = 15; + t.numCols = 3; + t.numTables = 1; + + // Table end-points + const auto sconn_expect = std::vector{ 0.2 }; + const auto scrit_krow_expect = std::vector{ 0.2 }; + const auto scrit_krog_expect = std::vector{ 0.2 }; + const auto smax_expect = std::vector{ 0.8 }; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + const auto sconn = swfunc.connateSat(); + const auto scrit_krow = swfunc.criticalSat(ResultColumn{0}); + const auto scrit_krog = swfunc.criticalSat(ResultColumn{1}); + const auto smax = swfunc.maximumSat(); + + check_is_close(sconn , sconn_expect ); + check_is_close(scrit_krow, scrit_krow_expect); + check_is_close(scrit_krog, scrit_krog_expect); + check_is_close(smax , smax_expect ); +} + +BOOST_AUTO_TEST_CASE (SOF3_SOGCR_is_Conn) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s, krow, krog + 0.2 , 0.0 , 0.0, + 0.21, 0.0 , 0.1, + 0.3 , 0.1 , 0.5, + 0.8 , 0.5 , 0.8, + }; + + t.numRows = 4; + t.numCols = 3; + t.numTables = 1; + + // Table end-points + const auto sconn_expect = std::vector{ 0.2 }; + const auto scrit_krow_expect = std::vector{ 0.21 }; + const auto scrit_krog_expect = std::vector{ 0.2 }; + const auto smax_expect = std::vector{ 0.8 }; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + const auto sconn = swfunc.connateSat(); + const auto scrit_krow = swfunc.criticalSat(ResultColumn{0}); + const auto scrit_krog = swfunc.criticalSat(ResultColumn{1}); + const auto smax = swfunc.maximumSat(); + + check_is_close(sconn , sconn_expect ); + check_is_close(scrit_krow, scrit_krow_expect); + check_is_close(scrit_krog, scrit_krog_expect); + check_is_close(smax , smax_expect ); +} + +BOOST_AUTO_TEST_CASE (SOF3_SOGCR_is_Conn_LargeNodeAlloc) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s , krow , krog + -1.0e20, -1.0e+100, -1.0e+100, // 1 + -1.0e20, -1.0e+100, -1.0e+100, // 2 + -1.0e20, -1.0e+100, -1.0e+100, // 3 + -1.0e20, -1.0e+100, -1.0e+100, // 4 + -1.0e20, -1.0e+100, -1.0e+100, // 5 + 0.2 , 0.0 , 0.0, // 6 + 0.21 , 0.0 , 0.1, // 7 + 0.3 , 0.1 , 0.5, // 8 + 0.8 , 0.5 , 0.8, // 9 + 1.0e20 , 1.0e+100, 1.0e+100, // 10 + 1.0e20 , 1.0e+100, 1.0e+100, // 11 + 1.0e20 , 1.0e+100, 1.0e+100, // 12 + 1.0e20 , 1.0e+100, 1.0e+100, // 13 + 1.0e20 , 1.0e+100, 1.0e+100, // 14 + 1.0e20 , 1.0e+100, 1.0e+100, // 15 + 1.0e20 , 1.0e+100, 1.0e+100, // 16 + }; + + t.numRows = 16; + t.numCols = 3; + t.numTables = 1; + + // Table end-points + const auto sconn_expect = std::vector{ 0.2 }; + const auto scrit_krow_expect = std::vector{ 0.21 }; + const auto scrit_krog_expect = std::vector{ 0.2 }; + const auto smax_expect = std::vector{ 0.8 }; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + const auto sconn = swfunc.connateSat(); + const auto scrit_krow = swfunc.criticalSat(ResultColumn{0}); + const auto scrit_krog = swfunc.criticalSat(ResultColumn{1}); + const auto smax = swfunc.maximumSat(); + + check_is_close(sconn , sconn_expect ); + check_is_close(scrit_krow, scrit_krow_expect); + check_is_close(scrit_krog, scrit_krog_expect); + check_is_close(smax , smax_expect ); +} + +BOOST_AUTO_TEST_CASE (SOF3_SOWCR_is_Conn) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s, krow, krog + 0.2 , 0.0 , 0.0, + 0.21, 0.1 , 0.0, + 0.3 , 0.1 , 0.5, + 0.8 , 0.5 , 0.8, + }; + + t.numRows = 4; + t.numCols = 3; + t.numTables = 1; + + // Table end-points + const auto sconn_expect = std::vector{ 0.2 }; + const auto scrit_krow_expect = std::vector{ 0.2 }; + const auto scrit_krog_expect = std::vector{ 0.21 }; + const auto smax_expect = std::vector{ 0.8 }; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + const auto sconn = swfunc.connateSat(); + const auto scrit_krow = swfunc.criticalSat(ResultColumn{0}); + const auto scrit_krog = swfunc.criticalSat(ResultColumn{1}); + const auto smax = swfunc.maximumSat(); + + check_is_close(sconn , sconn_expect ); + check_is_close(scrit_krow, scrit_krow_expect); + check_is_close(scrit_krog, scrit_krog_expect); + check_is_close(smax , smax_expect ); +} + +BOOST_AUTO_TEST_CASE (SOF3_SOWCR_is_Conn_LargeNodeAlloc) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s , krow , krog + -1.0e20, -1.0e+100, -1.0e+100, // 1 + -1.0e20, -1.0e+100, -1.0e+100, // 2 + -1.0e20, -1.0e+100, -1.0e+100, // 3 + -1.0e20, -1.0e+100, -1.0e+100, // 4 + -1.0e20, -1.0e+100, -1.0e+100, // 5 + 0.2 , 0.0 , 0.0, // 6 + 0.21 , 0.1 , 0.0, // 7 + 0.3 , 0.1 , 0.5, // 8 + 0.8 , 0.5 , 0.8, // 9 + 1.0e20 , 1.0e+100, 1.0e+100, // 10 + 1.0e20 , 1.0e+100, 1.0e+100, // 11 + 1.0e20 , 1.0e+100, 1.0e+100, // 12 + 1.0e20 , 1.0e+100, 1.0e+100, // 13 + 1.0e20 , 1.0e+100, 1.0e+100, // 14 + 1.0e20 , 1.0e+100, 1.0e+100, // 15 + 1.0e20 , 1.0e+100, 1.0e+100, // 16 + }; + + t.numRows = 16; + t.numCols = 3; + t.numTables = 1; + + // Table end-points + const auto sconn_expect = std::vector{ 0.2 }; + const auto scrit_krow_expect = std::vector{ 0.2 }; + const auto scrit_krog_expect = std::vector{ 0.21 }; + const auto smax_expect = std::vector{ 0.8 }; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + const auto sconn = swfunc.connateSat(); + const auto scrit_krow = swfunc.criticalSat(ResultColumn{0}); + const auto scrit_krog = swfunc.criticalSat(ResultColumn{1}); + const auto smax = swfunc.maximumSat(); + + check_is_close(sconn , sconn_expect ); + check_is_close(scrit_krow, scrit_krow_expect); + check_is_close(scrit_krog, scrit_krog_expect); + check_is_close(smax , smax_expect ); +} + +BOOST_AUTO_TEST_CASE (SOF3_SCR_Not_Conn) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s, krow, krog + 0.2 , 0.0 , 0.0, + 0.205, 0.0 , 0.0, + 0.21 , 0.0 , 0.1, + 0.25 , 0.1 , 0.2, + 0.3 , 0.1 , 0.5, + 0.8 , 0.5 , 0.8, + }; + + t.numRows = 6; + t.numCols = 3; + t.numTables = 1; + + // Table end-points + const auto sconn_expect = std::vector{ 0.2 }; + const auto scrit_krow_expect = std::vector{ 0.21 }; + const auto scrit_krog_expect = std::vector{ 0.205 }; + const auto smax_expect = std::vector{ 0.8 }; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + const auto sconn = swfunc.connateSat(); + const auto scrit_krow = swfunc.criticalSat(ResultColumn{0}); + const auto scrit_krog = swfunc.criticalSat(ResultColumn{1}); + const auto smax = swfunc.maximumSat(); + + check_is_close(sconn , sconn_expect ); + check_is_close(scrit_krow, scrit_krow_expect); + check_is_close(scrit_krog, scrit_krog_expect); + check_is_close(smax , smax_expect ); +} + +BOOST_AUTO_TEST_CASE (SOF3_SCR_Not_Conn_LargeNodeAlloc) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s , krow , krog + -1.0e20, -1.0e+100, -1.0e+100, // 1 + -1.0e20, -1.0e+100, -1.0e+100, // 2 + -1.0e20, -1.0e+100, -1.0e+100, // 3 + -1.0e20, -1.0e+100, -1.0e+100, // 4 + 0.2 , 0.0 , 0.0 , // 5 + 0.205 , 0.0 , 0.0 , // 6 + 0.21 , 0.0 , 0.1 , // 7 + 0.25 , 0.1 , 0.2 , // 8 + 0.3 , 0.1 , 0.5 , // 9 + 0.8 , 0.5 , 0.8 , // 10 + 1.0e20 , 1.0e+100, 1.0e+100, // 11 + 1.0e20 , 1.0e+100, 1.0e+100, // 12 + 1.0e20 , 1.0e+100, 1.0e+100, // 13 + 1.0e20 , 1.0e+100, 1.0e+100, // 14 + 1.0e20 , 1.0e+100, 1.0e+100, // 15 + 1.0e20 , 1.0e+100, 1.0e+100, // 16 + }; + + t.numRows = 16; + t.numCols = 3; + t.numTables = 1; + + // Table end-points + const auto sconn_expect = std::vector{ 0.2 }; + const auto scrit_krow_expect = std::vector{ 0.21 }; + const auto scrit_krog_expect = std::vector{ 0.205 }; + const auto smax_expect = std::vector{ 0.8 }; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + const auto sconn = swfunc.connateSat(); + const auto scrit_krow = swfunc.criticalSat(ResultColumn{0}); + const auto scrit_krog = swfunc.criticalSat(ResultColumn{1}); + const auto smax = swfunc.maximumSat(); + + check_is_close(sconn , sconn_expect ); + check_is_close(scrit_krow, scrit_krow_expect); + check_is_close(scrit_krog, scrit_krog_expect); + check_is_close(smax , smax_expect ); +} + +BOOST_AUTO_TEST_SUITE_END () + +// ===================================================================== +// Table End-Points in Multiple Tables +// --------------------------------------------------------------------- + +BOOST_AUTO_TEST_SUITE (TableEndPointsMultiTable) + +BOOST_AUTO_TEST_CASE (SWFN_CritIsConn) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s, kr , pc + 0.2 , 0.0 , 0.0, + 0.3 , 0.1 , 0.0, + 0.8 , 0.5 , 0.0, + + // s, kr , pc + 0.2 , 0.0 , 0.0, + 0.3 , 0.1 , 0.0, + 0.8 , 0.5 , 0.0, + + // s, kr , pc + 0.2 , 0.0 , 0.0, + 0.3 , 0.1 , 0.0, + 0.8 , 0.5 , 0.0, + + // s, kr , pc + 0.2 , 0.0 , 0.0, + 0.3 , 0.1 , 0.0, + 0.8 , 0.5 , 0.0, + }; + + t.numRows = 3; + t.numCols = 3; + t.numTables = 4; + + // Table end-points + const auto sconn_expect = std::vector{ 0.2, 0.2, 0.2, 0.2 }; + const auto scrit_expect = std::vector{ 0.2, 0.2, 0.2, 0.2 }; + const auto smax_expect = std::vector{ 0.8, 0.8, 0.8, 0.8 }; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + const auto sconn = swfunc.connateSat(); + const auto scrit = swfunc.criticalSat(ResultColumn{0}); + const auto smax = swfunc.maximumSat(); + + check_is_close(sconn, sconn_expect); + check_is_close(scrit, scrit_expect); + check_is_close(smax , smax_expect ); +} + +BOOST_AUTO_TEST_CASE (SWFN_CritIsConn_LargeNodeAlloc) +{ + auto t = Opm::ECLPropTableRawData{}; + + // 1e20 is a sentinel value that counts as row "ignored". + t.data = std::vector{ + // s , kr , pc + -1.0e20, -1.0e+100, 0.0, // 1 + -1.0e20, -1.0e+100, 0.0, // 2 + -1.0e20, -1.0e+100, 0.0, // 3 + -1.0e20, -1.0e+100, 0.0, // 4 + -1.0e20, -1.0e+100, 0.0, // 5 + 0.2 , 0.0 , 0.0, // 6 + 0.3 , 0.1 , 0.0, // 7 + 0.8 , 0.5 , 0.0, // 8 + 1.0e20 , 1.0e+100 , 0.0, // 9 + 1.0e20 , 1.0e+100 , 0.0, // 10 + 1.0e20 , 1.0e+100 , 0.0, // 11 + 1.0e20 , 1.0e+100 , 0.0, // 12 + 1.0e20 , 1.0e+100 , 0.0, // 13 + 1.0e20 , 1.0e+100 , 0.0, // 14 + 1.0e20 , 1.0e+100 , 0.0, // 15 + + // s , kr , pc + -1.0e20, -1.0e+100, 0.0, // 1 + -1.0e20, -1.0e+100, 0.0, // 2 + -1.0e20, -1.0e+100, 0.0, // 3 + -1.0e20, -1.0e+100, 0.0, // 4 + -1.0e20, -1.0e+100, 0.0, // 5 + 0.2 , 0.0 , 0.0, // 6 + 0.3 , 0.1 , 0.0, // 7 + 0.8 , 0.5 , 0.0, // 8 + 1.0e20 , 1.0e+100 , 0.0, // 9 + 1.0e20 , 1.0e+100 , 0.0, // 10 + 1.0e20 , 1.0e+100 , 0.0, // 11 + 1.0e20 , 1.0e+100 , 0.0, // 12 + 1.0e20 , 1.0e+100 , 0.0, // 13 + 1.0e20 , 1.0e+100 , 0.0, // 14 + 1.0e20 , 1.0e+100 , 0.0, // 15 + + // s , kr , pc + -1.0e20, -1.0e+100, 0.0, // 1 + -1.0e20, -1.0e+100, 0.0, // 2 + -1.0e20, -1.0e+100, 0.0, // 3 + -1.0e20, -1.0e+100, 0.0, // 4 + -1.0e20, -1.0e+100, 0.0, // 5 + 0.2 , 0.0 , 0.0, // 6 + 0.3 , 0.1 , 0.0, // 7 + 0.8 , 0.5 , 0.0, // 8 + 1.0e20 , 1.0e+100 , 0.0, // 9 + 1.0e20 , 1.0e+100 , 0.0, // 10 + 1.0e20 , 1.0e+100 , 0.0, // 11 + 1.0e20 , 1.0e+100 , 0.0, // 12 + 1.0e20 , 1.0e+100 , 0.0, // 13 + 1.0e20 , 1.0e+100 , 0.0, // 14 + 1.0e20 , 1.0e+100 , 0.0, // 15 + + // s , kr , pc + -1.0e20, -1.0e+100, 0.0, // 1 + -1.0e20, -1.0e+100, 0.0, // 2 + -1.0e20, -1.0e+100, 0.0, // 3 + -1.0e20, -1.0e+100, 0.0, // 4 + -1.0e20, -1.0e+100, 0.0, // 5 + 0.2 , 0.0 , 0.0, // 6 + 0.3 , 0.1 , 0.0, // 7 + 0.8 , 0.5 , 0.0, // 8 + 1.0e20 , 1.0e+100 , 0.0, // 9 + 1.0e20 , 1.0e+100 , 0.0, // 10 + 1.0e20 , 1.0e+100 , 0.0, // 11 + 1.0e20 , 1.0e+100 , 0.0, // 12 + 1.0e20 , 1.0e+100 , 0.0, // 13 + 1.0e20 , 1.0e+100 , 0.0, // 14 + 1.0e20 , 1.0e+100 , 0.0, // 15 + }; + + t.numRows = 15; + t.numCols = 3; + t.numTables = 4; + + // Table end-points + const auto sconn_expect = std::vector{ 0.2, 0.2, 0.2, 0.2 }; + const auto scrit_expect = std::vector{ 0.2, 0.2, 0.2, 0.2 }; + const auto smax_expect = std::vector{ 0.8, 0.8, 0.8, 0.8 }; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + const auto sconn = swfunc.connateSat(); + const auto scrit = swfunc.criticalSat(ResultColumn{0}); + const auto smax = swfunc.maximumSat(); + + check_is_close(sconn, sconn_expect); + check_is_close(scrit, scrit_expect); + check_is_close(smax , smax_expect ); +} + +BOOST_AUTO_TEST_CASE (SWFN) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s, kr , pc + 0.2 , 0.0 , 0.0, + 0.21, 0.0 , 0.0, + 0.3 , 0.1 , 0.0, + 0.8 , 0.5 , 0.0, + + // s, kr , pc + 0.2 , 0.0 , 0.0, + 0.21, 0.0 , 0.0, + 0.3 , 0.1 , 0.0, + 0.8 , 0.5 , 0.0, + + // s, kr , pc + 0.2 , 0.0 , 0.0, + 0.21, 0.0 , 0.0, + 0.3 , 0.1 , 0.0, + 0.8 , 0.5 , 0.0, + + // s, kr , pc + 0.2 , 0.0 , 0.0, + 0.21, 0.0 , 0.0, + 0.3 , 0.1 , 0.0, + 0.8 , 0.5 , 0.0, + }; + + t.numRows = 4; + t.numCols = 3; + t.numTables = 4; + + // Table end-points + const auto sconn_expect = std::vector{ 0.2 , 0.2 , 0.2 , 0.2 }; + const auto scrit_expect = std::vector{ 0.21, 0.21, 0.21, 0.21 }; + const auto smax_expect = std::vector{ 0.8 , 0.8 , 0.8 , 0.8 }; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + const auto sconn = swfunc.connateSat(); + const auto scrit = swfunc.criticalSat(ResultColumn{0}); + const auto smax = swfunc.maximumSat(); + + check_is_close(sconn, sconn_expect); + check_is_close(scrit, scrit_expect); + check_is_close(smax , smax_expect ); +} + +BOOST_AUTO_TEST_CASE (SWFN_LargeNodeAlloc) +{ + auto t = Opm::ECLPropTableRawData{}; + + // 1e20 is a sentinel value that counts as row "ignored". + t.data = std::vector{ + // s , kr , pc + -1.0e20, -1.0e+100, 0.0, // 1 + -1.0e20, -1.0e+100, 0.0, // 2 + -1.0e20, -1.0e+100, 0.0, // 3 + -1.0e20, -1.0e+100, 0.0, // 4 + -1.0e20, -1.0e+100, 0.0, // 5 + 0.2 , 0.0 , 0.0, // 6 + 0.21 , 0.0 , 0.0, // 7 + 0.3 , 0.1 , 0.0, // 8 + 0.7 , 0.5 , 0.0, // 9 + 1.0e20 , 1.0e+100 , 0.0, // 10 + 1.0e20 , 1.0e+100 , 0.0, // 11 + 1.0e20 , 1.0e+100 , 0.0, // 12 + 1.0e20 , 1.0e+100 , 0.0, // 13 + 1.0e20 , 1.0e+100 , 0.0, // 14 + 1.0e20 , 1.0e+100 , 0.0, // 15 + 1.0e20 , 1.0e+100 , 0.0, // 16 + + // s , kr , pc + -1.0e20, -1.0e+100, 0.0, // 1 + -1.0e20, -1.0e+100, 0.0, // 2 + -1.0e20, -1.0e+100, 0.0, // 3 + -1.0e20, -1.0e+100, 0.0, // 4 + 0.1 , 0.0 , 0.0, // 5 + 0.2 , 0.0 , 0.0, // 6 + 0.21 , 0.0 , 0.0, // 7 + 0.3 , 0.1 , 0.0, // 8 + 0.8 , 0.5 , 0.0, // 9 + 1.0e20 , 1.0e+100 , 0.0, // 10 + 1.0e20 , 1.0e+100 , 0.0, // 11 + 1.0e20 , 1.0e+100 , 0.0, // 12 + 1.0e20 , 1.0e+100 , 0.0, // 13 + 1.0e20 , 1.0e+100 , 0.0, // 14 + 1.0e20 , 1.0e+100 , 0.0, // 15 + 1.0e20 , 1.0e+100 , 0.0, // 16 + + // s , kr , pc + -1.0e20, -1.0e+100, 0.0, // 1 + -1.0e20, -1.0e+100, 0.0, // 2 + -1.0e20, -1.0e+100, 0.0, // 3 + -1.0e20, -1.0e+100, 0.0, // 4 + 0.1 , 0.0 , 0.0, // 5 + 0.2 , 0.0 , 0.0, // 6 + 0.21 , 0.0 , 0.0, // 7 + 0.3 , 0.1 , 0.0, // 8 + 0.5 , 0.35 , 0.0, // 9 + 0.9 , 0.5 , 0.0, // 10 + 1.0e20 , 1.0e+100 , 0.0, // 11 + 1.0e20 , 1.0e+100 , 0.0, // 12 + 1.0e20 , 1.0e+100 , 0.0, // 13 + 1.0e20 , 1.0e+100 , 0.0, // 14 + 1.0e20 , 1.0e+100 , 0.0, // 15 + 1.0e20 , 1.0e+100 , 0.0, // 16 + + // s , kr , pc + -1.0e20, -1.0e+100, 0.0, // 1 + -1.0e20, -1.0e+100, 0.0, // 2 + -1.0e20, -1.0e+100, 0.0, // 3 + 0.0 , 0.0 , 0.0, // 4 + 0.1 , 0.0 , 0.0, // 5 + 0.2 , 0.0 , 0.0, // 6 + 0.21 , 0.0 , 0.0, // 7 + 0.3 , 0.1 , 0.0, // 8 + 0.5 , 0.35 , 0.0, // 9 + 0.8 , 0.5 , 0.0, // 10 + 0.95 , 0.5 , 0.0, // 11 + 1.0e20 , 1.0e+100 , 0.0, // 12 + 1.0e20 , 1.0e+100 , 0.0, // 13 + 1.0e20 , 1.0e+100 , 0.0, // 14 + 1.0e20 , 1.0e+100 , 0.0, // 15 + 1.0e20 , 1.0e+100 , 0.0, // 16 + }; + + t.numRows = 16; + t.numCols = 3; + t.numTables = 4; + + // Table end-points + const auto sconn_expect = std::vector{ 0.2 , 0.1 , 0.1 , 0.0 }; + const auto scrit_expect = std::vector{ 0.21, 0.21, 0.21, 0.21 }; + const auto smax_expect = std::vector{ 0.7 , 0.8 , 0.9 , 0.95 }; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + const auto sconn = swfunc.connateSat(); + const auto scrit = swfunc.criticalSat(ResultColumn{0}); + const auto smax = swfunc.maximumSat(); + + check_is_close(sconn, sconn_expect); + check_is_close(scrit, scrit_expect); + check_is_close(smax , smax_expect ); +} + +BOOST_AUTO_TEST_CASE (SOF3_CritIsConn) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s, krow, krog + 0.2 , 0.0 , 0.0, + 0.3 , 0.1 , 0.5, + 0.8 , 0.5 , 0.8, + + // s, krow, krog + 0.2 , 0.0 , 0.0, + 0.3 , 0.1 , 0.5, + 0.8 , 0.5 , 0.8, + + // s, krow, krog + 0.2 , 0.0 , 0.0, + 0.3 , 0.1 , 0.5, + 0.8 , 0.5 , 0.8, + + // s, krow, krog + 0.2 , 0.0 , 0.0, + 0.3 , 0.1 , 0.5, + 0.8 , 0.5 , 0.8, + }; + + t.numRows = 3; + t.numCols = 3; + t.numTables = 4; + + // Table end-points + const auto sconn_expect = std::vector{ 0.2, 0.2, 0.2, 0.2 }; + const auto scrit_krow_expect = std::vector{ 0.2, 0.2, 0.2, 0.2 }; + const auto scrit_krog_expect = std::vector{ 0.2, 0.2, 0.2, 0.2 }; + const auto smax_expect = std::vector{ 0.8, 0.8, 0.8, 0.8 }; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + const auto sconn = swfunc.connateSat(); + const auto scrit_krow = swfunc.criticalSat(ResultColumn{0}); + const auto scrit_krog = swfunc.criticalSat(ResultColumn{1}); + const auto smax = swfunc.maximumSat(); + + check_is_close(sconn , sconn_expect ); + check_is_close(scrit_krow, scrit_krow_expect); + check_is_close(scrit_krog, scrit_krog_expect); + check_is_close(smax , smax_expect ); +} + +BOOST_AUTO_TEST_CASE (SOF3_CritIsConn_LargeNodeAlloc) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s , krow , krog + -1.0e20, -1.0e+100, -1.0e+100, // 1 + -1.0e20, -1.0e+100, -1.0e+100, // 2 + -1.0e20, -1.0e+100, -1.0e+100, // 3 + -1.0e20, -1.0e+100, -1.0e+100, // 4 + -1.0e20, -1.0e+100, -1.0e+100, // 5 + 0.2 , 0.0 , 0.0, // 6 + 0.3 , 0.1 , 0.5, // 7 + 0.8 , 0.5 , 0.8, // 8 + 1.0e20 , 1.0e+100, 1.0e+100, // 9 + 1.0e20 , 1.0e+100, 1.0e+100, // 10 + 1.0e20 , 1.0e+100, 1.0e+100, // 11 + 1.0e20 , 1.0e+100, 1.0e+100, // 12 + 1.0e20 , 1.0e+100, 1.0e+100, // 13 + 1.0e20 , 1.0e+100, 1.0e+100, // 14 + 1.0e20 , 1.0e+100, 1.0e+100, // 15 + + // s , krow , krog + -1.0e20, -1.0e+100, -1.0e+100, // 1 + -1.0e20, -1.0e+100, -1.0e+100, // 2 + -1.0e20, -1.0e+100, -1.0e+100, // 3 + -1.0e20, -1.0e+100, -1.0e+100, // 4 + 0.1 , 0.0 , 0.0, // 5 + 0.2 , 0.0 , 0.0, // 6 + 0.3 , 0.1 , 0.5, // 7 + 0.8 , 0.5 , 0.8, // 8 + 1.0e20 , 1.0e+100, 1.0e+100, // 9 + 1.0e20 , 1.0e+100, 1.0e+100, // 10 + 1.0e20 , 1.0e+100, 1.0e+100, // 11 + 1.0e20 , 1.0e+100, 1.0e+100, // 12 + 1.0e20 , 1.0e+100, 1.0e+100, // 13 + 1.0e20 , 1.0e+100, 1.0e+100, // 14 + 1.0e20 , 1.0e+100, 1.0e+100, // 15 + + // s , krow , krog + -1.0e20, -1.0e+100, -1.0e+100, // 1 + -1.0e20, -1.0e+100, -1.0e+100, // 2 + -1.0e20, -1.0e+100, -1.0e+100, // 3 + 0.0 , 0.0 , 0.0, // 4 + 0.15 , 0.0 , 0.0, // 5 + 0.2 , 0.0 , 0.0, // 6 + 0.3 , 0.1 , 0.5, // 7 + 0.7 , 0.35 , 0.8, // 8 + 0.8 , 0.5 , 0.8, // 9 + 1.0e20 , 1.0e+100, 1.0e+100, // 10 + 1.0e20 , 1.0e+100, 1.0e+100, // 11 + 1.0e20 , 1.0e+100, 1.0e+100, // 12 + 1.0e20 , 1.0e+100, 1.0e+100, // 13 + 1.0e20 , 1.0e+100, 1.0e+100, // 14 + 1.0e20 , 1.0e+100, 1.0e+100, // 15 + + // s , krow , krog + -1.0e20, -1.0e+100, -1.0e+100, // 1 + -1.0e20, -1.0e+100, -1.0e+100, // 2 + -1.0e20, -1.0e+100, -1.0e+100, // 3 + -1.0e20, -1.0e+100, -1.0e+100, // 4 + 0.1 , 0.0 , 0.0, // 5 + 0.2 , 0.0 , 0.0, // 6 + 0.3 , 0.1 , 0.5, // 7 + 0.8 , 0.5 , 0.8, // 8 + 0.9 , 0.85 , 0.8, // 9 + 1.0e20 , 1.0e+100, 1.0e+100, // 10 + 1.0e20 , 1.0e+100, 1.0e+100, // 11 + 1.0e20 , 1.0e+100, 1.0e+100, // 12 + 1.0e20 , 1.0e+100, 1.0e+100, // 13 + 1.0e20 , 1.0e+100, 1.0e+100, // 14 + 1.0e20 , 1.0e+100, 1.0e+100, // 15 + }; + + t.numRows = 15; + t.numCols = 3; + t.numTables = 4; + + // Table end-points + const auto sconn_expect = std::vector{ 0.2, 0.1, 0.0, 0.1 }; + const auto scrit_krow_expect = std::vector{ 0.2, 0.2, 0.2, 0.2 }; + const auto scrit_krog_expect = std::vector{ 0.2, 0.2, 0.2, 0.2 }; + const auto smax_expect = std::vector{ 0.8, 0.8, 0.8, 0.9 }; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + const auto sconn = swfunc.connateSat(); + const auto scrit_krow = swfunc.criticalSat(ResultColumn{0}); + const auto scrit_krog = swfunc.criticalSat(ResultColumn{1}); + const auto smax = swfunc.maximumSat(); + + check_is_close(sconn , sconn_expect ); + check_is_close(scrit_krow, scrit_krow_expect); + check_is_close(scrit_krog, scrit_krog_expect); + check_is_close(smax , smax_expect ); +} + +BOOST_AUTO_TEST_CASE (SOF3_SOGCR_is_Conn) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s, krow, krog + 0.2 , 0.0 , 0.0, + 0.21, 0.0 , 0.1, + 0.3 , 0.1 , 0.5, + 0.8 , 0.5 , 0.8, + + // s, krow, krog + 0.2 , 0.0 , 0.0, + 0.21, 0.0 , 0.1, + 0.3 , 0.1 , 0.5, + 0.8 , 0.5 , 0.8, + + // s, krow, krog + 0.2 , 0.0 , 0.0, + 0.21, 0.0 , 0.1, + 0.3 , 0.1 , 0.5, + 0.8 , 0.5 , 0.8, + + // s, krow, krog + 0.2 , 0.0 , 0.0, + 0.21, 0.0 , 0.1, + 0.3 , 0.1 , 0.5, + 0.8 , 0.5 , 0.8, + }; + + t.numRows = 4; + t.numCols = 3; + t.numTables = 4; + + // Table end-points + const auto sconn_expect = std::vector{ 0.2 , 0.2 , 0.2 , 0.2 }; + const auto scrit_krow_expect = std::vector{ 0.21, 0.21, 0.21, 0.21 }; + const auto scrit_krog_expect = std::vector{ 0.2 , 0.2 , 0.2 , 0.2 }; + const auto smax_expect = std::vector{ 0.8 , 0.8 , 0.8 , 0.8 }; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + const auto sconn = swfunc.connateSat(); + const auto scrit_krow = swfunc.criticalSat(ResultColumn{0}); + const auto scrit_krog = swfunc.criticalSat(ResultColumn{1}); + const auto smax = swfunc.maximumSat(); + + check_is_close(sconn , sconn_expect ); + check_is_close(scrit_krow, scrit_krow_expect); + check_is_close(scrit_krog, scrit_krog_expect); + check_is_close(smax , smax_expect ); +} + +BOOST_AUTO_TEST_CASE (SOF3_SOGCR_is_Conn_LargeNodeAlloc) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s , krow , krog + -1.0e20, -1.0e+100, -1.0e+100, // 1 + -1.0e20, -1.0e+100, -1.0e+100, // 2 + -1.0e20, -1.0e+100, -1.0e+100, // 3 + -1.0e20, -1.0e+100, -1.0e+100, // 4 + -1.0e20, -1.0e+100, -1.0e+100, // 5 + 0.2 , 0.0 , 0.0, // 6 + 0.21 , 0.0 , 0.1, // 7 + 0.3 , 0.1 , 0.5, // 8 + 0.8 , 0.5 , 0.8, // 9 + 1.0e20 , 1.0e+100, 1.0e+100, // 10 + 1.0e20 , 1.0e+100, 1.0e+100, // 11 + 1.0e20 , 1.0e+100, 1.0e+100, // 12 + 1.0e20 , 1.0e+100, 1.0e+100, // 13 + 1.0e20 , 1.0e+100, 1.0e+100, // 14 + 1.0e20 , 1.0e+100, 1.0e+100, // 15 + 1.0e20 , 1.0e+100, 1.0e+100, // 16 + + // s , krow , krog + -1.0e20, -1.0e+100, -1.0e+100, // 1 + -1.0e20, -1.0e+100, -1.0e+100, // 2 + -1.0e20, -1.0e+100, -1.0e+100, // 3 + -1.0e20, -1.0e+100, -1.0e+100, // 4 + -1.0e20, -1.0e+100, -1.0e+100, // 5 + 0.2 , 0.0 , 0.0, // 6 + 0.21 , 0.0 , 0.1, // 7 + 0.25 , 0.0 , 0.5, // 8 + 0.3 , 0.1 , 0.5, // 9 + 0.8 , 0.5 , 0.8, // 10 + 1.0e20 , 1.0e+100, 1.0e+100, // 11 + 1.0e20 , 1.0e+100, 1.0e+100, // 12 + 1.0e20 , 1.0e+100, 1.0e+100, // 13 + 1.0e20 , 1.0e+100, 1.0e+100, // 14 + 1.0e20 , 1.0e+100, 1.0e+100, // 15 + 1.0e20 , 1.0e+100, 1.0e+100, // 16 + + // s , krow , krog + -1.0e20, -1.0e+100, -1.0e+100, // 1 + -1.0e20, -1.0e+100, -1.0e+100, // 2 + -1.0e20, -1.0e+100, -1.0e+100, // 3 + -1.0e20, -1.0e+100, -1.0e+100, // 4 + 0.1 , 0.0 , 0.0, // 5 + 0.2 , 0.0 , 0.00001, // 6 + 0.21 , 0.0 , 0.1, // 7 + 0.3 , 0.1 , 0.5, // 8 + 0.8 , 0.5 , 0.8, // 9 + 0.9 , 0.75 , 0.9, // 10 + 1.0e20 , 1.0e+100, 1.0e+100, // 11 + 1.0e20 , 1.0e+100, 1.0e+100, // 12 + 1.0e20 , 1.0e+100, 1.0e+100, // 13 + 1.0e20 , 1.0e+100, 1.0e+100, // 14 + 1.0e20 , 1.0e+100, 1.0e+100, // 15 + 1.0e20 , 1.0e+100, 1.0e+100, // 16 + + // s , krow , krog + -1.0e20, -1.0e+100, -1.0e+100, // 1 + -1.0e20, -1.0e+100, -1.0e+100, // 2 + -1.0e20, -1.0e+100, -1.0e+100, // 3 + -1.0e20, -1.0e+100, -1.0e+100, // 4 + -1.0e20, -1.0e+100, -1.0e+100, // 5 + 0.2 , 0.0 , 0.0, // 6 + 0.21 , 0.0 , 0.1, // 7 + 0.3 , 0.0 , 0.25, // 8 + 0.4 , 0.00001 , 0.30, // 9 + 0.5 , 0.1 , 0.5, // 10 + 0.8 , 0.5 , 0.8, // 11 + 1.0e20 , 1.0e+100, 1.0e+100, // 12 + 1.0e20 , 1.0e+100, 1.0e+100, // 13 + 1.0e20 , 1.0e+100, 1.0e+100, // 14 + 1.0e20 , 1.0e+100, 1.0e+100, // 15 + 1.0e20 , 1.0e+100, 1.0e+100, // 16 + }; + + t.numRows = 16; + t.numCols = 3; + t.numTables = 4; + + // Table end-points + const auto sconn_expect = std::vector{ 0.2 , 0.2 , 0.1 , 0.2 }; + const auto scrit_krow_expect = std::vector{ 0.21, 0.25, 0.21, 0.3 }; + const auto scrit_krog_expect = std::vector{ 0.2 , 0.2 , 0.1 , 0.2 }; + const auto smax_expect = std::vector{ 0.8 , 0.8 , 0.9 , 0.8 }; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + const auto sconn = swfunc.connateSat(); + const auto scrit_krow = swfunc.criticalSat(ResultColumn{0}); + const auto scrit_krog = swfunc.criticalSat(ResultColumn{1}); + const auto smax = swfunc.maximumSat(); + + check_is_close(sconn , sconn_expect ); + check_is_close(scrit_krow, scrit_krow_expect); + check_is_close(scrit_krog, scrit_krog_expect); + check_is_close(smax , smax_expect ); +} + +BOOST_AUTO_TEST_CASE (SOF3_SOWCR_is_Conn) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s, krow, krog + 0.2 , 0.0 , 0.0, + 0.21, 0.1 , 0.0, + 0.3 , 0.1 , 0.5, + 0.8 , 0.5 , 0.8, + + // s, krow, krog + 0.2 , 0.0 , 0.0, + 0.21, 0.1 , 0.0, + 0.3 , 0.1 , 0.5, + 0.8 , 0.5 , 0.8, + + // s, krow, krog + 0.2 , 0.0 , 0.0, + 0.21, 0.1 , 0.0, + 0.3 , 0.1 , 0.5, + 0.8 , 0.5 , 0.8, + + // s, krow, krog + 0.2 , 0.0 , 0.0, + 0.21, 0.1 , 0.0, + 0.3 , 0.1 , 0.5, + 0.8 , 0.5 , 0.8, + }; + + t.numRows = 4; + t.numCols = 3; + t.numTables = 4; + + // Table end-points + const auto sconn_expect = std::vector{ 0.2 , 0.2 , 0.2 , 0.2 }; + const auto scrit_krow_expect = std::vector{ 0.2 , 0.2 , 0.2 , 0.2 }; + const auto scrit_krog_expect = std::vector{ 0.21, 0.21, 0.21, 0.21 }; + const auto smax_expect = std::vector{ 0.8 , 0.8 , 0.8 , 0.8 }; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + const auto sconn = swfunc.connateSat(); + const auto scrit_krow = swfunc.criticalSat(ResultColumn{0}); + const auto scrit_krog = swfunc.criticalSat(ResultColumn{1}); + const auto smax = swfunc.maximumSat(); + + check_is_close(sconn , sconn_expect ); + check_is_close(scrit_krow, scrit_krow_expect); + check_is_close(scrit_krog, scrit_krog_expect); + check_is_close(smax , smax_expect ); +} + +BOOST_AUTO_TEST_CASE (SOF3_SOWCR_is_Conn_LargeNodeAlloc) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s , krow , krog + -1.0e20, -1.0e+100, -1.0e+100, // 1 + -1.0e20, -1.0e+100, -1.0e+100, // 2 + -1.0e20, -1.0e+100, -1.0e+100, // 3 + -1.0e20, -1.0e+100, -1.0e+100, // 4 + -1.0e20, -1.0e+100, -1.0e+100, // 5 + 0.2 , 0.0 , 0.0, // 6 + 0.21 , 0.1 , 0.0, // 7 + 0.3 , 0.1 , 0.5, // 8 + 0.8 , 0.5 , 0.8, // 9 + 1.0e20 , 1.0e+100, 1.0e+100, // 10 + 1.0e20 , 1.0e+100, 1.0e+100, // 11 + 1.0e20 , 1.0e+100, 1.0e+100, // 12 + 1.0e20 , 1.0e+100, 1.0e+100, // 13 + 1.0e20 , 1.0e+100, 1.0e+100, // 14 + 1.0e20 , 1.0e+100, 1.0e+100, // 15 + 1.0e20 , 1.0e+100, 1.0e+100, // 16 + + // s , krow , krog + -1.0e20, -1.0e+100, -1.0e+100, // 1 + -1.0e20, -1.0e+100, -1.0e+100, // 2 + -1.0e20, -1.0e+100, -1.0e+100, // 3 + -1.0e20, -1.0e+100, -1.0e+100, // 4 + -1.0e20, -1.0e+100, -1.0e+100, // 5 + 0.2 , 0.0 , 0.0, // 6 + 0.21 , 0.1 , 0.0, // 7 + 0.25 , 0.15 , 0.0, // 8 + 0.3 , 0.1 , 0.5, // 9 + 0.8 , 0.5 , 0.8, // 10 + 1.0e20 , 1.0e+100, 1.0e+100, // 11 + 1.0e20 , 1.0e+100, 1.0e+100, // 12 + 1.0e20 , 1.0e+100, 1.0e+100, // 13 + 1.0e20 , 1.0e+100, 1.0e+100, // 14 + 1.0e20 , 1.0e+100, 1.0e+100, // 15 + 1.0e20 , 1.0e+100, 1.0e+100, // 16 + + // s , krow , krog + -1.0e20, -1.0e+100, -1.0e+100, // 1 + -1.0e20, -1.0e+100, -1.0e+100, // 2 + -1.0e20, -1.0e+100, -1.0e+100, // 3 + -1.0e20, -1.0e+100, -1.0e+100, // 4 + 0.0 , 0.0 , 0.0, // 5 + 0.1 , 0.000001, 0.0, // 6 + 0.21 , 0.1 , 0.0, // 7 + 0.3 , 0.15 , 0.5, // 8 + 0.8 , 0.5 , 0.8, // 9 + 0.82 , 0.6 , 0.8, // 10 + 0.9 , 0.8 , 0.89, // 11 + 1.0e20 , 1.0e+100, 1.0e+100, // 12 + 1.0e20 , 1.0e+100, 1.0e+100, // 13 + 1.0e20 , 1.0e+100, 1.0e+100, // 14 + 1.0e20 , 1.0e+100, 1.0e+100, // 15 + 1.0e20 , 1.0e+100, 1.0e+100, // 16 + + // s , krow , krog + -1.0e20, -1.0e+100, -1.0e+100, // 1 + -1.0e20, -1.0e+100, -1.0e+100, // 2 + -1.0e20, -1.0e+100, -1.0e+100, // 3 + -1.0e20, -1.0e+100, -1.0e+100, // 4 + -1.0e20, -1.0e+100, -1.0e+100, // 5 + 0.2 , 0.0 , 0.0, // 6 + 0.21 , 0.1 , 0.0, // 7 + 0.3 , 0.1 , 0.5, // 8 + 0.8 , 0.5 , 0.8, // 9 + 0.80001, 0.500001, 0.8, // 10 + 1.0e20 , 1.0e+100, 1.0e+100, // 11 + 1.0e20 , 1.0e+100, 1.0e+100, // 12 + 1.0e20 , 1.0e+100, 1.0e+100, // 13 + 1.0e20 , 1.0e+100, 1.0e+100, // 14 + 1.0e20 , 1.0e+100, 1.0e+100, // 15 + 1.0e20 , 1.0e+100, 1.0e+100, // 16 + }; + + t.numRows = 16; + t.numCols = 3; + t.numTables = 4; + + // Table end-points + const auto sconn_expect = std::vector{ 0.2 , 0.2 , 0.0 , 0.2 }; + const auto scrit_krow_expect = std::vector{ 0.2 , 0.2 , 0.0 , 0.2 }; + const auto scrit_krog_expect = std::vector{ 0.21, 0.25, 0.21, 0.21 }; + const auto smax_expect = std::vector{ 0.8 , 0.8 , 0.9 , 0.80001 }; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + const auto sconn = swfunc.connateSat(); + const auto scrit_krow = swfunc.criticalSat(ResultColumn{0}); + const auto scrit_krog = swfunc.criticalSat(ResultColumn{1}); + const auto smax = swfunc.maximumSat(); + + check_is_close(sconn , sconn_expect ); + check_is_close(scrit_krow, scrit_krow_expect); + check_is_close(scrit_krog, scrit_krog_expect); + check_is_close(smax , smax_expect ); +} + +BOOST_AUTO_TEST_CASE (SOF3_SCR_Not_Conn) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s, krow, krog + 0.2 , 0.0 , 0.0, + 0.205, 0.0 , 0.0, + 0.21 , 0.0 , 0.1, + 0.25 , 0.1 , 0.2, + 0.3 , 0.1 , 0.5, + 0.8 , 0.5 , 0.8, + + // s, krow, krog + 0.2 , 0.0 , 0.0, + 0.206, 0.0 , 0.0, + 0.211, 0.0 , 0.1, + 0.25 , 0.1 , 0.2, + 0.3 , 0.1 , 0.5, + 0.8 , 0.5 , 0.8, + + // s, krow, krog + 0.2 , 0.0 , 0.0, + 0.207, 0.0 , 0.0, + 0.212, 0.0 , 0.1, + 0.25 , 0.1 , 0.2, + 0.3 , 0.1 , 0.5, + 0.85 , 0.6 , 0.8, + + // s, krow, krog + 0.2 , 0.0 , 0.0, + 0.209, 0.0 , 0.0, + 0.225, 0.0 , 0.1, + 0.25 , 0.1 , 0.2, + 0.3 , 0.1 , 0.5, + 0.9 , 0.8 , 0.9, + }; + + t.numRows = 6; + t.numCols = 3; + t.numTables = 4; + + // Table end-points + const auto sconn_expect = std::vector{ 0.2 , 0.2 , 0.2 , 0.2 }; + const auto scrit_krow_expect = std::vector{ 0.21 , 0.211, 0.212, 0.225 }; + const auto scrit_krog_expect = std::vector{ 0.205, 0.206, 0.207, 0.209 }; + const auto smax_expect = std::vector{ 0.8 , 0.8 , 0.85 , 0.9 }; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + const auto sconn = swfunc.connateSat(); + const auto scrit_krow = swfunc.criticalSat(ResultColumn{0}); + const auto scrit_krog = swfunc.criticalSat(ResultColumn{1}); + const auto smax = swfunc.maximumSat(); + + check_is_close(sconn , sconn_expect ); + check_is_close(scrit_krow, scrit_krow_expect); + check_is_close(scrit_krog, scrit_krog_expect); + check_is_close(smax , smax_expect ); +} + +BOOST_AUTO_TEST_CASE (SOF3_SCR_Not_Conn_LargeNodeAlloc) +{ + auto t = Opm::ECLPropTableRawData{}; + + t.data = std::vector{ + // s , krow , krog + -1.0e20, -1.0e+100, -1.0e+100, // 1 + -1.0e20, -1.0e+100, -1.0e+100, // 2 + -1.0e20, -1.0e+100, -1.0e+100, // 3 + -1.0e20, -1.0e+100, -1.0e+100, // 4 + 0.2 , 0.0 , 0.0 , // 5 + 0.205 , 0.0 , 0.0 , // 6 + 0.21 , 0.0 , 0.1 , // 7 + 0.25 , 0.1 , 0.2 , // 8 + 0.3 , 0.1 , 0.5 , // 9 + 0.8 , 0.5 , 0.8 , // 10 + 1.0e20 , 1.0e+100, 1.0e+100, // 11 + 1.0e20 , 1.0e+100, 1.0e+100, // 12 + 1.0e20 , 1.0e+100, 1.0e+100, // 13 + 1.0e20 , 1.0e+100, 1.0e+100, // 14 + 1.0e20 , 1.0e+100, 1.0e+100, // 15 + 1.0e20 , 1.0e+100, 1.0e+100, // 16 + + // s , krow , krog + -1.0e20, -1.0e+100, -1.0e+100, // 1 + -1.0e20, -1.0e+100, -1.0e+100, // 2 + -1.0e20, -1.0e+100, -1.0e+100, // 3 + 0.1 , 0.0 , 0.0 , // 4 + 0.2 , 0.0 , 0.0 , // 5 + 0.205 , 0.0 , 0.0 , // 6 + 0.21 , 0.0 , 0.1 , // 7 + 0.25 , 0.1 , 0.2 , // 8 + 0.3 , 0.15 , 0.5 , // 9 + 0.5 , 0.25 , 0.6 , // 10 + 0.8 , 0.5 , 0.8 , // 11 + 0.9 , 0.75 , 0.9 , // 12 + 1.0e20 , 1.0e+100, 1.0e+100, // 13 + 1.0e20 , 1.0e+100, 1.0e+100, // 14 + 1.0e20 , 1.0e+100, 1.0e+100, // 15 + 1.0e20 , 1.0e+100, 1.0e+100, // 16 + + // s , krow , krog + -1.0e20, -1.0e+100, -1.0e+100, // 1 + -1.0e20, -1.0e+100, -1.0e+100, // 2 + -1.0e20, -1.0e+100, -1.0e+100, // 3 + -1.0e20, -1.0e+100, -1.0e+100, // 4 + 0.2 , 0.0 , 0.0 , // 5 + 0.205 , 0.000001, 0.000001, // 6 + 0.21 , 0.000002, 0.1 , // 7 + 0.25 , 0.1 , 0.2 , // 8 + 0.3 , 0.1 , 0.5 , // 9 + 0.8 , 0.5 , 0.8 , // 10 + 0.825 , 0.75 , 0.825 , // 11 + 1.0e20 , 1.0e+100, 1.0e+100, // 12 + 1.0e20 , 1.0e+100, 1.0e+100, // 13 + 1.0e20 , 1.0e+100, 1.0e+100, // 14 + 1.0e20 , 1.0e+100, 1.0e+100, // 15 + 1.0e20 , 1.0e+100, 1.0e+100, // 16 + + // s , krow , krog + -1.0e20, -1.0e+100, -1.0e+100, // 1 + -1.0e20, -1.0e+100, -1.0e+100, // 2 + -1.0e20, -1.0e+100, -1.0e+100, // 3 + -1.0e20, -1.0e+100, -1.0e+100, // 4 + 0.2 , 0.0 , 0.0 , // 5 + 0.205 , 0.0 , 0.0 , // 6 + 0.21 , 0.0 , 0.0 , // 7 + 0.25 , 0.0 , 0.0 , // 8 + 0.3 , 0.0 , 0.000001, // 9 + 0.8 , 0.0 , 0.8 , // 10 + 0.99 , 0.000001, 0.99 , // 11 + 1.0e20 , 1.0e+100, 1.0e+100, // 12 + 1.0e20 , 1.0e+100, 1.0e+100, // 13 + 1.0e20 , 1.0e+100, 1.0e+100, // 14 + 1.0e20 , 1.0e+100, 1.0e+100, // 15 + 1.0e20 , 1.0e+100, 1.0e+100, // 16 + }; + + t.numRows = 16; + t.numCols = 3; + t.numTables = 4; + + // Table end-points + const auto sconn_expect = std::vector{ 0.2 , 0.1 , 0.2 , 0.2 }; + const auto scrit_krow_expect = std::vector{ 0.21 , 0.21 , 0.2 , 0.8 }; + const auto scrit_krog_expect = std::vector{ 0.205, 0.205, 0.2 , 0.25 }; + const auto smax_expect = std::vector{ 0.8 , 0.9 , 0.825, 0.99 }; + + // Note: Need to convert input table to column major (Fortran) order + // because that is the format in which PropTable1D expects the tabular + // data. + const auto swfunc = Opm::SatFuncInterpolant(toRawTableFormat(t)); + + using ResultColumn = Opm::SatFuncInterpolant::ResultColumn; + + const auto sconn = swfunc.connateSat(); + const auto scrit_krow = swfunc.criticalSat(ResultColumn{0}); + const auto scrit_krog = swfunc.criticalSat(ResultColumn{1}); + const auto smax = swfunc.maximumSat(); + + check_is_close(sconn , sconn_expect ); + check_is_close(scrit_krow, scrit_krow_expect); + check_is_close(scrit_krog, scrit_krog_expect); + check_is_close(smax , smax_expect ); +} + +BOOST_AUTO_TEST_SUITE_END () diff --git a/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/tests/test_eclunithandling.cpp b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/tests/test_eclunithandling.cpp new file mode 100644 index 0000000000..94bd19594d --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opm-flowdiagnostics-applications/tests/test_eclunithandling.cpp @@ -0,0 +1,235 @@ +/* + Copyright 2017 SINTEF ICT, Applied Mathematics. + Copyright 2017 Statoil ASA. + + This file is part of the Open Porous Media Project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#if HAVE_CONFIG_H +#include +#endif // HAVE_CONFIG_H + +#if HAVE_DYNAMIC_BOOST_TEST +#define BOOST_TEST_DYN_LINK +#endif + +#define NVERBOSE + +#define BOOST_TEST_MODULE TEST_ASSEMBLED_CONNECTIONS + +#include +#include +#include + +#include + +#include +#include + +BOOST_AUTO_TEST_SUITE (Basic_Conversion) + +BOOST_AUTO_TEST_CASE (Constructor) +{ + auto M = ::Opm::ECLUnits::createUnitSystem(1); // METRIC + auto F = ::Opm::ECLUnits::createUnitSystem(2); // FIELD + auto L = ::Opm::ECLUnits::createUnitSystem(3); // LAB + auto P = ::Opm::ECLUnits::createUnitSystem(4); // PVT-M + + BOOST_CHECK_THROW(::Opm::ECLUnits::createUnitSystem( 5), std::runtime_error); + BOOST_CHECK_THROW(::Opm::ECLUnits::createUnitSystem(-1), std::runtime_error); +} + +BOOST_AUTO_TEST_CASE (Metric) +{ + auto M = ::Opm::ECLUnits::createUnitSystem(1); + + // Pressure (bars) + { + const auto scale = M->pressure(); + const auto expect = 100.0e3; + + BOOST_CHECK_CLOSE(scale, expect, 1.0e-10); + } + + // Reservoir Volume Rate (rm^3 / day) + { + const auto scale = M->reservoirRate(); + const auto expect = 1.157407407407407e-05; + + BOOST_CHECK_CLOSE(scale, expect, 1.0e-10); + } + + // Reservoir Volume (rm^3) + { + const auto scale = M->reservoirVolume(); + const auto expect = 1.0; + + BOOST_CHECK_CLOSE(scale, expect, 1.0e-10); + } + + // Time (day) + { + const auto scale = M->time(); + const auto expect = 86.400e+03; + + BOOST_CHECK_CLOSE(scale, expect, 1.0e-10); + } + + // Transmissibility ((cP * m^3) / (day * barsa)) + { + const auto scale = M->transmissibility(); + const auto expect = 1.157407407407407e-13; + + BOOST_CHECK_CLOSE(scale, expect, 1.0e-10); + } +} + +BOOST_AUTO_TEST_CASE (Field) +{ + auto F = ::Opm::ECLUnits::createUnitSystem(2); + + // Pressure (psi) + { + const auto scale = F->pressure(); + const auto expect = 6.894757293168360e+03; + + BOOST_CHECK_CLOSE(scale, expect, 1.0e-10); + } + + // Reservoir Volume Rate (rb / day) + { + const auto scale = F->reservoirRate(); + const auto expect = 1.840130728333334e-06; + + BOOST_CHECK_CLOSE(scale, expect, 1.0e-10); + } + + // Reservoir Volume (rb) + { + const auto scale = F->reservoirVolume(); + const auto expect = 1.589872949280001e-01; + + BOOST_CHECK_CLOSE(scale, expect, 1.0e-10); + } + + // Time (day) + { + const auto scale = F->time(); + const auto expect = 86.400e+03; + + BOOST_CHECK_CLOSE(scale, expect, 1.0e-10); + } + + // Transmissibility ((cP * rb) / (day * psia)) + { + const auto scale = F->transmissibility(); + const auto expect = 2.668883979653090e-13; + + BOOST_CHECK_CLOSE(scale, expect, 1.0e-10); + } +} + +BOOST_AUTO_TEST_CASE (Lab) +{ + auto L = ::Opm::ECLUnits::createUnitSystem(3); + + // Pressure (atm) + { + const auto scale = L->pressure(); + const auto expect = 101.325e+03; + + BOOST_CHECK_CLOSE(scale, expect, 1.0e-10); + } + + // Reservoir Volume Rate (r(cm)^3 / h) + { + const auto scale = L->reservoirRate(); + const auto expect = 2.777777777777778e-10; + + BOOST_CHECK_CLOSE(scale, expect, 1.0e-10); + } + + // Reservoir Volume (r(cm)^3) + { + const auto scale = L->reservoirVolume(); + const auto expect = 1.0e-06; + + BOOST_CHECK_CLOSE(scale, expect, 1.0e-10); + } + + // Time (hour) + { + const auto scale = L->time(); + const auto expect = 3600.0; + + BOOST_CHECK_CLOSE(scale, expect, 1.0e-10); + } + + // Transmissibility ((cP * (cm)^3) / (h * atm)) + { + const auto scale = L->transmissibility(); + const auto expect = 2.741453518655592e-18; + + BOOST_CHECK_CLOSE(scale, expect, 1.0e-10); + } +} + +BOOST_AUTO_TEST_CASE (PVT_M) +{ + auto P = ::Opm::ECLUnits::createUnitSystem(4); + + // Pressure (atm) + { + const auto scale = P->pressure(); + const auto expect = 101.325e+03; + + BOOST_CHECK_CLOSE(scale, expect, 1.0e-10); + } + + // Reservoir Volume Rate (rm^3 / day) + { + const auto scale = P->reservoirRate(); + const auto expect = 1.157407407407407e-05; + + BOOST_CHECK_CLOSE(scale, expect, 1.0e-10); + } + + // Reservoir Volume (rm^3) + { + const auto scale = P->reservoirVolume(); + const auto expect = 1.0; + + BOOST_CHECK_CLOSE(scale, expect, 1.0e-10); + } + + // Time (day) + { + const auto scale = P->time(); + const auto expect = 86.400e+03; + + BOOST_CHECK_CLOSE(scale, expect, 1.0e-10); + } + + // Transmissibility ((cP * rm^3 / (day * atm)) + { + const auto scale = P->transmissibility(); + const auto expect = 1.142272299439830e-13; + + BOOST_CHECK_CLOSE(scale, expect, 1.0e-10); + } +} + +BOOST_AUTO_TEST_SUITE_END () diff --git a/ThirdParty/custom-opm-flowdiag-app/opmCore/opm/parser/eclipse/Units/Units.hpp b/ThirdParty/custom-opm-flowdiag-app/opmCore/opm/parser/eclipse/Units/Units.hpp new file mode 100644 index 0000000000..cc1dde7e66 --- /dev/null +++ b/ThirdParty/custom-opm-flowdiag-app/opmCore/opm/parser/eclipse/Units/Units.hpp @@ -0,0 +1,326 @@ +//=========================================================================== +// +// File: Units.hpp +// +// Created: Thu Jul 2 09:19:08 2009 +// +// Author(s): Halvor M Nilsen +// +// $Date$ +// +// $Revision$ +// +//=========================================================================== + +/* +Copyright 2009, 2010, 2011, 2012 SINTEF ICT, Applied Mathematics. +Copyright 2009, 2010, 2011, 2012 Statoil ASA. + +This file is part of the Open Porous Media project (OPM). + +OPM 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. + +OPM 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 for more details. + +You should have received a copy of the GNU General Public License +along with OPM. If not, see . +*/ + +#ifndef OPM_UNITS_HEADER +#define OPM_UNITS_HEADER + +/** +The unit sets emplyed in ECLIPSE, in particular the FIELD units, +are quite inconsistent. Ideally one should choose units for a set +of base quantities like Mass,Time and Length and then derive the +units for e.g. pressure and flowrate in a consisten manner. However +that is not the case; for instance in the metric system we have: + +[Length] = meters +[time] = days +[mass] = kg + +This should give: + +[Pressure] = [mass] / ([length] * [time]^2) = kg / (m * days * days) + +Instead pressure is given in Bars. When it comes to FIELD units the +number of such examples is long. +*/ +namespace Opm { +namespace prefix + /// Conversion prefix for units. +{ +constexpr const double micro = 1.0e-6; /**< Unit prefix [\f$\mu\f$] */ +constexpr const double milli = 1.0e-3; /**< Unit prefix [m] */ +constexpr const double centi = 1.0e-2; /**< Non-standard unit prefix [c] */ +constexpr const double deci = 1.0e-1; /**< Non-standard unit prefix [d] */ +constexpr const double kilo = 1.0e3; /**< Unit prefix [k] */ +constexpr const double mega = 1.0e6; /**< Unit prefix [M] */ +constexpr const double giga = 1.0e9; /**< Unit prefix [G] */ +} // namespace prefix + +namespace unit + /// Definition of various units. + /// All the units are defined in terms of international standard + /// units (SI). Example of use: We define a variable \c k which + /// gives a permeability. We want to set \c k to \f$1\,mD\f$. + /// \code + /// using namespace Opm::unit + /// double k = 0.001*darcy; + /// \endcode + /// We can also use one of the prefixes defined in Opm::prefix + /// \code + /// using namespace Opm::unit + /// using namespace Opm::prefix + /// double k = 1.0*milli*darcy; + /// \endcode +{ +///\name Common powers +/// @{ +constexpr double square(double v) { return v * v; } +constexpr double cubic (double v) { return v * v * v; } +/// @} + +// -------------------------------------------------------------- +// Basic (fundamental) units and conversions +// -------------------------------------------------------------- + +/// \name Length +/// @{ +constexpr const double meter = 1; +constexpr const double inch = 2.54 * prefix::centi*meter; +constexpr const double feet = 12 * inch; +/// @} + +/// \name Time +/// @{ +constexpr const double second = 1; +constexpr const double minute = 60 * second; +constexpr const double hour = 60 * minute; +constexpr const double day = 24 * hour; +constexpr const double year = 365 * day; +/// @} + +/// \name Volume +/// @{ +constexpr const double gallon = 231 * cubic(inch); +constexpr const double stb = 42 * gallon; +constexpr const double liter = 1 * cubic(prefix::deci*meter); +/// @} + +/// \name Mass +/// @{ +constexpr const double kilogram = 1; +constexpr const double gram = 1.0e-3 * kilogram; +// http://en.wikipedia.org/wiki/Pound_(mass)#Avoirdupois_pound +constexpr const double pound = 0.45359237 * kilogram; +/// @} + +// -------------------------------------------------------------- +// Standardised constants +// -------------------------------------------------------------- + +/// \name Standardised constant +/// @{ +constexpr const double gravity = 9.80665 * meter/square(second); +/// @} + +// -------------------------------------------------------------- +// Derived units and conversions +// -------------------------------------------------------------- + +/// \name Force +/// @{ +constexpr const double Newton = kilogram*meter / square(second); // == 1 +constexpr const double dyne = 1e-5*Newton; +constexpr const double lbf = pound * gravity; // Pound-force + /// @} + + /// \name Pressure + /// @{ +constexpr const double Pascal = Newton / square(meter); // == 1 +constexpr const double barsa = 100000 * Pascal; +constexpr const double atm = 101325 * Pascal; +constexpr const double psia = lbf / square(inch); +/// @} + +/// \name Temperature. This one is more complicated +/// because the unit systems used by Eclipse (i.e. degrees +/// Celsius and degrees Fahrenheit require to add or +/// subtract an offset for the conversion between from/to +/// Kelvin +/// @{ +constexpr const double degCelsius = 1.0; // scaling factor C -> K +constexpr const double degCelsiusOffset = 273.15; // offset for the C -> K conversion + +constexpr const double degFahrenheit = 5.0/9; // scaling factor F -> K +constexpr const double degFahrenheitOffset = 255.37; // offset for the C -> K conversion + /// @} + + /// \name Viscosity + /// @{ +constexpr const double Pas = Pascal * second; // == 1 +constexpr const double Poise = prefix::deci*Pas; +/// @} + +namespace perm_details { +constexpr const double p_grad = atm / (prefix::centi*meter); +constexpr const double area = square(prefix::centi*meter); +constexpr const double flux = cubic (prefix::centi*meter) / second; +constexpr const double velocity = flux / area; +constexpr const double visc = prefix::centi*Poise; +constexpr const double darcy = (velocity * visc) / p_grad; +// == 1e-7 [m^2] / 101325 +// == 9.869232667160130e-13 [m^2] +} +/// \name Permeability +/// @{ +/// +/// A porous medium with a permeability of 1 darcy permits a flow (flux) +/// of \f$1\,\mathit{cm}^3/s\f$ of a fluid with viscosity +/// \f$1\,\mathit{cP}\f$ (\f$1\,mPa\cdot s\f$) under a pressure gradient +/// of \f$1\,\mathit{atm}/\mathit{cm}\f$ acting across an area of +/// \f$1\,\mathit{cm}^2\f$. +/// +constexpr const double darcy = perm_details::darcy; +/// @} + +/** +* Unit conversion routines. +*/ +namespace convert { +/** +* Convert from external units of measurements to equivalent +* internal units of measurements. Note: The internal units of +* measurements are *ALWAYS*, and exclusively, SI. +* +* Example: Convert a double @c kx, containing a permeability value +* in units of milli-darcy (mD) to the equivalent value in SI units +* (i.e., \f$m^2\f$). +* \code +* using namespace Opm::unit; +* using namespace Opm::prefix; +* convert::from(kx, milli*darcy); +* \endcode +* +* @param[in] q Physical quantity. +* @param[in] unit Physical unit of measurement. +* @return Value of @c q in equivalent SI units of measurements. +*/ +constexpr double from(const double q, const double unit) +{ + return q * unit; +} + +/** +* Convert from internal units of measurements to equivalent +* external units of measurements. Note: The internal units of +* measurements are *ALWAYS*, and exclusively, SI. +* +* Example: Convert a std::vector p, containing +* pressure values in the SI unit Pascal (i.e., unit::Pascal) to the +* equivalent values in Psi (unit::psia). +* \code +* using namespace Opm::unit; +* std::transform(p.begin(), p.end(), p.begin(), +* boost::bind(convert::to, _1, psia)); +* \endcode +* +* @param[in] q Physical quantity, measured in SI units. +* @param[in] unit Physical unit of measurement. +* @return Value of @c q in unit unit. +*/ +constexpr double to(const double q, const double unit) +{ + return q / unit; +} +} // namespace convert +} + +namespace Metric { +using namespace prefix; +using namespace unit; +constexpr const double Pressure = barsa; +constexpr const double Temperature = degCelsius; +constexpr const double TemperatureOffset = degCelsiusOffset; +constexpr const double AbsoluteTemperature = degCelsius; // actually [K], but the these two are identical +constexpr const double Length = meter; +constexpr const double Time = day; +constexpr const double Mass = kilogram; +constexpr const double Permeability = milli*darcy; +constexpr const double Transmissibility = centi*Poise*cubic(meter)/(day*barsa); +constexpr const double LiquidSurfaceVolume = cubic(meter); +constexpr const double GasSurfaceVolume = cubic(meter); +constexpr const double ReservoirVolume = cubic(meter); +constexpr const double GasDissolutionFactor = GasSurfaceVolume/LiquidSurfaceVolume; +constexpr const double OilDissolutionFactor = LiquidSurfaceVolume/GasSurfaceVolume; +constexpr const double Density = kilogram/cubic(meter); +constexpr const double PolymerDensity = kilogram/cubic(meter); +constexpr const double Salinity = kilogram/cubic(meter); +constexpr const double Viscosity = centi*Poise; +constexpr const double Timestep = day; +constexpr const double SurfaceTension = dyne/(centi*meter); +} + + +namespace Field { +using namespace prefix; +using namespace unit; +constexpr const double Pressure = psia; +constexpr const double Temperature = degFahrenheit; +constexpr const double TemperatureOffset = degFahrenheitOffset; +constexpr const double AbsoluteTemperature = degFahrenheit; // actually [R], but the these two are identical +constexpr const double Length = feet; +constexpr const double Time = day; +constexpr const double Mass = pound; +constexpr const double Permeability = milli*darcy; +constexpr const double Transmissibility = centi*Poise*stb/(day*psia); +constexpr const double LiquidSurfaceVolume = stb; +constexpr const double GasSurfaceVolume = 1000*cubic(feet); +constexpr const double ReservoirVolume = stb; +constexpr const double GasDissolutionFactor = GasSurfaceVolume/LiquidSurfaceVolume; +constexpr const double OilDissolutionFactor = LiquidSurfaceVolume/GasSurfaceVolume; +constexpr const double Density = pound/cubic(feet); +constexpr const double PolymerDensity = pound/stb; +constexpr const double Salinity = pound/stb; +constexpr const double Viscosity = centi*Poise; +constexpr const double Timestep = day; +constexpr const double SurfaceTension = dyne/(centi*meter); +} + + +namespace Lab { +using namespace prefix; +using namespace unit; +constexpr const double Pressure = atm; +constexpr const double Temperature = degCelsius; +constexpr const double TemperatureOffset = degCelsiusOffset; +constexpr const double AbsoluteTemperature = degCelsius; // actually [K], but the these two are identical +constexpr const double Length = centi*meter; +constexpr const double Time = hour; +constexpr const double Mass = gram; +constexpr const double Permeability = milli*darcy; +constexpr const double Transmissibility = centi*Poise*cubic(centi*meter)/(hour*atm); +constexpr const double LiquidSurfaceVolume = cubic(centi*meter); +constexpr const double GasSurfaceVolume = cubic(centi*meter); +constexpr const double ReservoirVolume = cubic(centi*meter); +constexpr const double GasDissolutionFactor = GasSurfaceVolume/LiquidSurfaceVolume; +constexpr const double OilDissolutionFactor = LiquidSurfaceVolume/GasSurfaceVolume; +constexpr const double Density = gram/cubic(centi*meter); +constexpr const double PolymerDensity = gram/cubic(centi*meter); +constexpr const double Salinity = gram/cubic(centi*meter); +constexpr const double Viscosity = centi*Poise; +constexpr const double Timestep = hour; +constexpr const double SurfaceTension = dyne/(centi*meter); +} + +} + +#endif // OPM_UNITS_HEADER diff --git a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/CMakeLists_files.cmake b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/CMakeLists_files.cmake index 6ae42606e4..d6388a0a20 100644 --- a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/CMakeLists_files.cmake +++ b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/CMakeLists_files.cmake @@ -25,9 +25,9 @@ list (APPEND MAIN_SOURCE_FILES opm/flowdiagnostics/CellSet.cpp - opm/flowdiagnostics/CellSetValues.cpp opm/flowdiagnostics/ConnectionValues.cpp opm/flowdiagnostics/ConnectivityGraph.cpp + opm/flowdiagnostics/DerivedQuantities.cpp opm/flowdiagnostics/Solution.cpp opm/flowdiagnostics/Toolbox.cpp opm/flowdiagnostics/TracerTofSolver.cpp @@ -39,9 +39,9 @@ list (APPEND MAIN_SOURCE_FILES list (APPEND TEST_SOURCE_FILES tests/test_assembledconnections.cpp tests/test_cellset.cpp - tests/test_cellsetvalues.cpp tests/test_connectionvalues.cpp tests/test_connectivitygraph.cpp + tests/test_derivedquantities.cpp tests/test_flowdiagnosticstool.cpp tests/test_tarjan.cpp ) @@ -51,6 +51,7 @@ list (APPEND PUBLIC_HEADER_FILES opm/flowdiagnostics/CellSetValues.hpp opm/flowdiagnostics/ConnectionValues.hpp opm/flowdiagnostics/ConnectivityGraph.hpp + opm/flowdiagnostics/DerivedQuantities.hpp opm/flowdiagnostics/Solution.hpp opm/flowdiagnostics/Toolbox.hpp opm/flowdiagnostics/TracerTofSolver.hpp diff --git a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/CellSet.cpp b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/CellSet.cpp index 9653771637..28488341f2 100644 --- a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/CellSet.cpp +++ b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/CellSet.cpp @@ -46,12 +46,22 @@ CellSetID::to_string() const return id_; } +bool +CellSetID::operator<(const CellSetID& other) const +{ + return id_ < other.id_; +} + // ===================================================================== -void -CellSet::identify(CellSetID id) +CellSet::CellSet(CellSetID id) + : id_(std::move(id)) +{ +} + +CellSet::CellSet(CellSetID id, const std::vector& cells) + : id_(std::move(id)), iset_(cells.begin(), cells.end()) { - id_ = std::move(id); } const CellSetID& diff --git a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/CellSet.hpp b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/CellSet.hpp index 6baa7c7eb7..fcbe37bbd0 100644 --- a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/CellSet.hpp +++ b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/CellSet.hpp @@ -23,6 +23,7 @@ #include #include +#include namespace Opm { @@ -41,24 +42,32 @@ namespace FlowDiagnostics std::string to_string() const; + bool operator<(const CellSetID& other) const; + private: Repr id_; }; + + + class CellSet { private: using IndexSet = std::unordered_set; public: - using const_iterator = IndexSet::const_iterator; + /// Contruct empty cell set, use insert() to populate. + explicit CellSet(CellSetID id); - void identify(CellSetID id); + /// Construct non-empty cell set. + CellSet(CellSetID id, const std::vector& cells); const CellSetID& id() const; void insert(const int cell); + using const_iterator = IndexSet::const_iterator; const_iterator begin() const; const_iterator end() const; diff --git a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/CellSetValues.cpp b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/CellSetValues.cpp deleted file mode 100644 index 7744a8ab0d..0000000000 --- a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/CellSetValues.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - Copyright 2016 SINTEF ICT, Applied Mathematics. - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media Project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#if HAVE_CONFIG_H -#include -#endif // HAVE_CONFIG_H - -#include - -#include -#include - -namespace Opm { -namespace FlowDiagnostics { - -CellSetValues::CellSetValues(const SizeType initialCapacity) -{ - assoc_.reserve(initialCapacity); -} - -void -CellSetValues::addCellValue(const int cellIndex, - const double cellValue) -{ - assoc_.push_back(Association{cellIndex, cellValue}); -} - -CellSetValues::SizeType -CellSetValues::cellValueCount() const -{ - return assoc_.size(); -} - -CellSetValues::CellValue -CellSetValues::cellValue(const SizeType cellValueIndex) const -{ - const auto& a = assoc_[cellValueIndex]; - - return { a.index, a.value }; -} - -} // namespace FlowDiagnostics -} // namespace Opm diff --git a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/CellSetValues.hpp b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/CellSetValues.hpp index 68bbb26b57..50475c01c6 100644 --- a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/CellSetValues.hpp +++ b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/CellSetValues.hpp @@ -21,54 +21,12 @@ #ifndef OPM_CELLSETVALUES_HEADER_INCLUDED #define OPM_CELLSETVALUES_HEADER_INCLUDED -#include -#include +#include namespace Opm { namespace FlowDiagnostics { - class CellSetValues - { - public: - using SizeType = std::vector::size_type; - using CellValue = std::pair; - - /// Constructor. - /// - /// @param[in] initialCapacity Number of elements that can be stored - /// in set without reallocation. - explicit CellSetValues(const SizeType initialCapacity = 0); - - /// Associate value with specific cell, represented by its index. - /// - /// @param[in] cellIndex Index of specific cell. - /// - /// @param[in] cellValue Value associated with cell @p cellIndex. - void addCellValue(const int cellIndex, - const double cellValue); - - /// Retrieve number of elements stored in set. - SizeType cellValueCount() const; - - /// Retrieve value association for single set element. - /// - /// @param[in] cellValueIndex Linear ID of single cell->value - /// association. Must be in the range @code [0, - /// cellValueCount()) @endcode. - /// - /// @returns Single association between cell index and numerical - /// value. - CellValue cellValue(const SizeType cellValueIndex) const; - - private: - struct Association - { - int index; - double value; - }; - - std::vector assoc_; - }; + using CellSetValues = std::map; } // namespace FlowDiagnostics } // namespace Opm diff --git a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/DerivedQuantities.cpp b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/DerivedQuantities.cpp new file mode 100644 index 0000000000..71f416f233 --- /dev/null +++ b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/DerivedQuantities.cpp @@ -0,0 +1,284 @@ +/* + Copyright 2015, 2016, 2017 SINTEF ICT, Applied Mathematics. + Copyright 2017 Statoil ASA. + + This file is part of the Open Porous Media project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#if HAVE_CONFIG_H +#include +#endif // HAVE_CONFIG_H + +#include +#include +#include + +namespace Opm +{ +namespace FlowDiagnostics +{ + + namespace { + /// Helper function for flowCapacityStorageCapacityCurve(). + template + std::vector + cumulativeNormalized(const InputValues& input, + ExtractElement&& extract) + { + // Extract quantity. + auto q = std::vector{}; + q.reserve(input.size() + 1); + q.push_back(0.0); + for (const auto& e : input) { + q.push_back(extract(e)); + } + + // Accumulate and normalize. + std::partial_sum(q.begin(), q.end(), q.begin()); + const auto t = q.back(); + for (auto& qi : q) { + qi /= t; + } + + return q; + } + + } // anonymous namespace + + + + /// The F-Phi curve. + /// + /// The F-Phi curve is an analogue to the fractional flow + /// curve in a 1D displacement. It can be used to compute + /// other interesting diagnostic quantities such as the Lorenz + /// coefficient. For a technical description see Shavali et + /// al. (SPE 146446), Shook and Mitchell (SPE 124625). + Graph flowCapacityStorageCapacityCurve(const Toolbox::Forward& injector_solution, + const Toolbox::Reverse& producer_solution, + const std::vector& pv, + const double max_pv_fraction) + { + return flowCapacityStorageCapacityCurve(injector_solution.fd.timeOfFlight(), + producer_solution.fd.timeOfFlight(), + pv, + max_pv_fraction); + } + + + + + /// The F-Phi curve. + /// + /// The F-Phi curve is an analogue to the fractional flow + /// curve in a 1D displacement. It can be used to compute + /// other interesting diagnostic quantities such as the Lorenz + /// coefficient. For a technical description see Shavali et + /// al. (SPE 146446), Shook and Mitchell (SPE 124625). + Graph flowCapacityStorageCapacityCurve(const std::vector& injector_tof, + const std::vector& producer_tof, + const std::vector& pv, + const double max_pv_fraction) + { + if (pv.size() != injector_tof.size() || pv.size() != producer_tof.size()) { + throw std::runtime_error("flowCapacityStorageCapacityCurve(): " + "Input solutions must have same size."); + } + + // Compute max pv cutoff. + const double total_pv = std::accumulate(pv.begin(), pv.end(), 0.0); + const double max_pv = max_pv_fraction * total_pv; + + // Sort according to total travel time. + const int n = pv.size(); + typedef std::pair D2; + std::vector time_and_pv(n); + for (int ii = 0; ii < n; ++ii) { + if (pv[ii] > max_pv) { + time_and_pv[ii].first = 1e100; + time_and_pv[ii].second = 0.0; + } else { + time_and_pv[ii].first = injector_tof[ii] + producer_tof[ii]; // Total travel time. + time_and_pv[ii].second = pv[ii]; + } + } + std::sort(time_and_pv.begin(), time_and_pv.end()); + + auto Phi = cumulativeNormalized(time_and_pv, [](const D2& i) { return i.second; }); + auto F = cumulativeNormalized(time_and_pv, [](const D2& i) { return i.second / i.first; }); + + return Graph{std::move(Phi), std::move(F)}; + } + + + + + /// The Lorenz coefficient from the F-Phi curve. + /// + /// The Lorenz coefficient is a measure of heterogeneity. It + /// is equal to twice the area between the F-Phi curve and the + /// F = Phi line. The coefficient can vary from zero to + /// one. If the coefficient is zero (so the F-Phi curve is a + /// straight line) we have perfect piston-like displacement + /// while a coefficient of one indicates infinitely + /// heterogenous displacement (essentially no sweep). + /// + /// Note: The coefficient is analogous to the Gini coefficient + /// of economic theory, where the name Lorenz curve is applied + /// to what we call the F-Phi curve. + double lorenzCoefficient(const Graph& flowcap_storagecap_curve) + { + const auto& storagecap = flowcap_storagecap_curve.first; + const auto& flowcap = flowcap_storagecap_curve.second; + if (flowcap.size() != storagecap.size()) { + throw std::runtime_error("lorenzCoefficient(): Inconsistent sizes in input graph."); + } + double integral = 0.0; + // Trapezoid quadrature of the curve F(Phi). + const int num_intervals = flowcap.size() - 1; + for (int ii = 0; ii < num_intervals; ++ii) { + const double len = storagecap[ii+1] - storagecap[ii]; + integral += (flowcap[ii] + flowcap[ii+1]) * len / 2.0; + } + return 2.0 * (integral - 0.5); + } + + + + + /// Compute sweep efficiency versus dimensionless time (pore + /// volumes injected). + /// + /// The sweep efficiency is analogue to 1D displacement using + /// the F-Phi curve as flux function. + Graph sweepEfficiency(const Graph& flowcap_storagecap_curve) + { + const auto& storagecap = flowcap_storagecap_curve.first; + const auto& flowcap = flowcap_storagecap_curve.second; + if (flowcap.size() != storagecap.size()) { + throw std::runtime_error("sweepEfficiency(): Inconsistent sizes in input graph."); + } + + // Compute tD and Ev simultaneously, + // skipping identical Phi data points. + const int n = flowcap.size(); + std::vector Ev; + std::vector tD; + tD.reserve(n); + Ev.reserve(n); + tD.push_back(0.0); + Ev.push_back(0.0); + for (int ii = 1; ii < n; ++ii) { // Note loop limits. + const double fd = flowcap[ii] - flowcap[ii-1]; + const double sd = storagecap[ii] - storagecap[ii-1]; + if (fd != 0.0) { + tD.push_back(sd/fd); + Ev.push_back(storagecap[ii] + (1.0 - flowcap[ii]) * tD.back()); + } + } + + return std::make_pair(tD, Ev); + } + + + + + + /// Compute pore volume associated with an injector-producer pair. + double injectorProducerPairVolume(const Toolbox::Forward& injector_solution, + const Toolbox::Reverse& producer_solution, + const std::vector& pore_volume, + const CellSetID& injector, + const CellSetID& producer) + { + const auto& inj_tracer = injector_solution.fd.concentration(injector); + const auto& prod_tracer = producer_solution.fd.concentration(producer); + + double volume = 0.0; + for (const auto& inj_data : inj_tracer) { + const int cell = inj_data.first; + const auto prod_data = prod_tracer.find(cell); + if (prod_data != prod_tracer.end()) { + volume += pore_volume[cell] * inj_data.second * prod_data->second; + } + } + return volume; + } + + + + + + namespace { + + // Helper for injectorProducerPairFlux(). + double pairFlux(const CellSetValues& tracer, + const CellSet& well_cells, + const CellSetValues& inflow_flux, + const bool require_inflow) + { + double flux = 0.0; + for (const int cell : well_cells) { + const auto tracer_iter = tracer.find(cell); + if (tracer_iter != tracer.end()) { + // Tracer present in cell. + const auto source_iter = inflow_flux.find(cell); + if (source_iter != inflow_flux.end()) { + // Cell has source term. + const double source = source_iter->second; + if ((source > 0.0) == require_inflow) { + // Source term has correct sign. + flux += source * tracer_iter->second; + } + } + } + } + return flux; + } + + } // anonymous namespace + + + + + /// Compute fluxes associated with an injector-producer pair. + /// + /// The first flux returned is the injection flux associated with the given producers, + /// (equal to the accumulated product of producer tracer values at the injector cells + /// with the injection fluxes), the second is the production flux associated with the + /// given injectors. In general, they will only be the same (up to sign) for + /// incompressible cases. + /// + /// Note: since we consider injecting fluxes positive and producing fluxes negative + /// (for the inflow_flux), the first returned element will be positive and the second + /// will be negative. + std::pair + injectorProducerPairFlux(const Toolbox::Forward& injector_solution, + const Toolbox::Reverse& producer_solution, + const CellSet& injector_cells, + const CellSet& producer_cells, + const CellSetValues& inflow_flux) + { + const auto& inj_tracer = injector_solution.fd.concentration(injector_cells.id()); + const auto& prod_tracer = producer_solution.fd.concentration(producer_cells.id()); + const double inj_flux = pairFlux(prod_tracer, injector_cells, inflow_flux, true); + const double prod_flux = pairFlux(inj_tracer, producer_cells, inflow_flux, false); + return { inj_flux, prod_flux }; + } + + +} // namespace FlowDiagnostics +} // namespace Opm diff --git a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/DerivedQuantities.hpp b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/DerivedQuantities.hpp new file mode 100644 index 0000000000..86975628a4 --- /dev/null +++ b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/DerivedQuantities.hpp @@ -0,0 +1,123 @@ +/* + Copyright 2016 Statoil ASA. + Copyright 2015, 2016 SINTEF ICT, Applied Mathematics. + + This file is part of the Open Porous Media project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#ifndef OPM_DERIVEDQUANTITIES_HEADER_INCLUDED +#define OPM_DERIVEDQUANTITIES_HEADER_INCLUDED + +#include +#include +#include +#include +#include + +namespace Opm +{ +namespace FlowDiagnostics +{ + /// Class used to return graph objects. For a graph g, the + /// abscissa (x) values should go in g.first and the ordinate (y) + /// values in g.second. + using Graph = std::pair< std::vector, std::vector >; + + /// The F-Phi curve. + /// + /// The F-Phi curve is an analogue to the fractional flow + /// curve in a 1D displacement. It can be used to compute + /// other interesting diagnostic quantities such as the Lorenz + /// coefficient. For a technical description see Shavali et + /// al. (SPE 146446), Shook and Mitchell (SPE 124625). + /// + /// Single cells with a very large pore volume can be filtered out + /// before creating the curve. The 'max_pv_fraction' parameter + /// gives a fraction such that, if a cell's fraction of the total + /// pore volume is above this number, that cell will be + /// ignored. This can be used to disregard numerical aquifers for + /// example. + /// + /// Returns F (flow capacity) as a function of Phi (storage capacity), + /// that is for the returned Graph g, g.first is Phi and g.second is F. + Graph flowCapacityStorageCapacityCurve(const Toolbox::Forward& injector_solution, + const Toolbox::Reverse& producer_solution, + const std::vector& pore_volume, + const double max_pv_fraction = 1.0); + + /// This overload gets the injector and producer time-of-flight + /// directly instead of extracting it from the solution + /// objects. It otherwise behaves identically to the other + /// overload. + Graph flowCapacityStorageCapacityCurve(const std::vector& injector_tof, + const std::vector& producer_tof, + const std::vector& pore_volume, + const double max_pv_fraction = 1.0); + + /// The Lorenz coefficient from the F-Phi curve. + /// + /// The Lorenz coefficient is a measure of heterogeneity. It + /// is equal to twice the area between the F-Phi curve and the + /// F = Phi line. The coefficient can vary from zero to + /// one. If the coefficient is zero (so the F-Phi curve is a + /// straight line) we have perfect piston-like displacement + /// while a coefficient of one indicates infinitely + /// heterogenous displacement (essentially no sweep). + /// + /// Note: The coefficient is analogous to the Gini coefficient + /// of economic theory, where the name Lorenz curve is applied + /// to what we call the F-Phi curve. + double lorenzCoefficient(const Graph& flowcap_storagecap_curve); + + /// Compute sweep efficiency versus dimensionless time (pore + /// volumes injected). + /// + /// The sweep efficiency is analogue to 1D displacement using + /// the F-Phi curve as flux function. + Graph sweepEfficiency(const Graph& flowcap_storagecap_curve); + + /// Compute pore volume associated with an injector-producer pair. + double injectorProducerPairVolume(const Toolbox::Forward& injector_solution, + const Toolbox::Reverse& producer_solution, + const std::vector& pore_volume, + const CellSetID& injector, + const CellSetID& producer); + + /// Compute fluxes associated with an injector-producer pair. + /// + /// The first flux returned is the injection flux associated with the given producers, + /// (equal to the accumulated product of producer tracer values at the injector cells + /// with the injection fluxes), the second is the production flux associated with the + /// given injectors. In general, they will only be the same (up to sign) for + /// incompressible cases. + /// + /// Note: since we consider injecting fluxes positive and producing fluxes negative + /// (for the inflow_flux), the first returned element will be positive and the second + /// will be negative. + std::pair + injectorProducerPairFlux(const Toolbox::Forward& injector_solution, + const Toolbox::Reverse& producer_solution, + const CellSet& injector_cells, + const CellSet& producer_cells, + const CellSetValues& inflow_flux); + + +} // namespace FlowDiagnostics +} // namespace Opm + + + +#endif // OPM_DERIVEDQUANTITIES_HEADER_INCLUDED diff --git a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/Solution.cpp b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/Solution.cpp index 98e72c90a9..d31e65bc7e 100644 --- a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/Solution.cpp +++ b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/Solution.cpp @@ -1,5 +1,6 @@ /* Copyright 2016 SINTEF ICT, Applied Mathematics. + Copyright 2016 Statoil ASA. This file is part of the Open Porous Media project (OPM). @@ -53,17 +54,8 @@ class Solution::Impl CellSetValues concentration(const CellSetID& tracer) const; private: - struct CompareCellSetIDs - { - bool operator()(const CellSetID& x, - const CellSetID& y) const - { - return x.to_string() < y.to_string(); - } - }; - using SolutionMap = - std::map; + std::map; GlobalToF tof_; SolutionMap tracerToF_; diff --git a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/Toolbox.cpp b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/Toolbox.cpp index 9199377db8..c2e15444ee 100644 --- a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/Toolbox.cpp +++ b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/Toolbox.cpp @@ -69,8 +69,8 @@ class Toolbox::Impl CellSetValues only_inflow_flux_; CellSetValues only_outflow_flux_; - AssembledConnections inj_conn_; - AssembledConnections prod_conn_; + AssembledConnections downstream_conn_; + AssembledConnections upstream_conn_; bool conn_built_ = false; void buildAssembledConnections(); @@ -111,26 +111,13 @@ Toolbox::Impl::assignConnectionFlux(const ConnectionValues& flux) void Toolbox::Impl::assignInflowFlux(const CellSetValues& inflow_flux) { - // Count the inflow (>0) fluxes. - const int num_items = inflow_flux.cellValueCount(); - int num_inflows = 0; - for (int item = 0; item < num_items; ++item) { - if (inflow_flux.cellValue(item).second > 0.0) { - ++num_inflows; - } - } - - // Reserve memory. - only_inflow_flux_ = CellSetValues(num_inflows); - only_outflow_flux_ = CellSetValues(num_items - num_inflows); - - // Build in- and out-flow structures. - for (int item = 0; item < num_items; ++item) { - auto data = inflow_flux.cellValue(item); + only_inflow_flux_.clear(); + only_outflow_flux_.clear(); + for (const auto& data : inflow_flux) { if (data.second > 0.0) { - only_inflow_flux_.addCellValue(data.first, data.second); - } else { - only_outflow_flux_.addCellValue(data.first, -data.second); + only_inflow_flux_[data.first] = data.second; + } else if (data.second < 0.0) { + only_outflow_flux_[data.first] = -data.second; } } } @@ -143,6 +130,15 @@ Toolbox::Impl::injDiag(const std::vector& start_sets) throw std::logic_error("Must set pore volumes and fluxes before calling diagnostics."); } + // Check that start sets are valid. + for (const auto& start : start_sets) { + for (const int cell : start) { + if (only_inflow_flux_.count(cell) != 1 || only_outflow_flux_.count(cell) != 0) { + throw std::runtime_error("Start set inconsistent with assignInflowFlux()-given values"); + } + } + } + if (!conn_built_) { buildAssembledConnections(); } @@ -151,8 +147,8 @@ Toolbox::Impl::injDiag(const std::vector& start_sets) using ToF = Solution::TimeOfFlight; using Conc = Solution::TracerConcentration; - TracerTofSolver solver(inj_conn_, pvol_, only_inflow_flux_); - sol.assignGlobalToF(solver.solveGlobal(start_sets)); + TracerTofSolver solver(downstream_conn_, upstream_conn_, pvol_, only_inflow_flux_); + sol.assignGlobalToF(solver.solveGlobal()); for (const auto& start : start_sets) { auto solution = solver.solveLocal(start); @@ -171,6 +167,15 @@ Toolbox::Impl::prodDiag(const std::vector& start_sets) throw std::logic_error("Must set pore volumes and fluxes before calling diagnostics."); } + // Check that start sets are valid. + for (const auto& start : start_sets) { + for (const int cell : start) { + if (only_inflow_flux_.count(cell) != 0 || only_outflow_flux_.count(cell) != 1) { + throw std::runtime_error("Start set inconsistent with assignInflowFlux()-given values"); + } + } + } + if (!conn_built_) { buildAssembledConnections(); } @@ -179,8 +184,8 @@ Toolbox::Impl::prodDiag(const std::vector& start_sets) using ToF = Solution::TimeOfFlight; using Conc = Solution::TracerConcentration; - TracerTofSolver solver(prod_conn_, pvol_, only_outflow_flux_); - sol.assignGlobalToF(solver.solveGlobal(start_sets)); + TracerTofSolver solver(upstream_conn_, downstream_conn_, pvol_, only_outflow_flux_); + sol.assignGlobalToF(solver.solveGlobal()); for (const auto& start : start_sets) { auto solution = solver.solveLocal(start); @@ -197,8 +202,8 @@ Toolbox::Impl::buildAssembledConnections() // Create the data structures needed by the tracer/tof solver. const size_t num_connections = g_.numConnections(); const size_t num_phases = flux_.numPhases(); - inj_conn_ = AssembledConnections(); - prod_conn_ = AssembledConnections(); + downstream_conn_ = AssembledConnections(); + upstream_conn_ = AssembledConnections(); for (size_t conn_idx = 0; conn_idx < num_connections; ++conn_idx) { auto cells = g_.connection(conn_idx); using ConnID = ConnectionValues::ConnID; @@ -209,16 +214,16 @@ Toolbox::Impl::buildAssembledConnections() connection_flux += flux_(ConnID{conn_idx}, PhaseID{phase}); } if (connection_flux > 0.0) { - inj_conn_.addConnection(cells.first, cells.second, connection_flux); - prod_conn_.addConnection(cells.second, cells.first, connection_flux); - } else { - inj_conn_.addConnection(cells.second, cells.first, -connection_flux); - prod_conn_.addConnection(cells.first, cells.second, -connection_flux); + downstream_conn_.addConnection(cells.first, cells.second, connection_flux); + upstream_conn_.addConnection(cells.second, cells.first, connection_flux); + } else if (connection_flux < 0.0) { + downstream_conn_.addConnection(cells.second, cells.first, -connection_flux); + upstream_conn_.addConnection(cells.first, cells.second, -connection_flux); } } const int num_cells = g_.numCells(); - inj_conn_.compress(num_cells); - prod_conn_.compress(num_cells); + downstream_conn_.compress(num_cells); + upstream_conn_.compress(num_cells); // Mark as built (until flux changed). conn_built_ = true; diff --git a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/TracerTofSolver.cpp b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/TracerTofSolver.cpp index 0e6309d068..dc1994df86 100644 --- a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/TracerTofSolver.cpp +++ b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/TracerTofSolver.cpp @@ -1,6 +1,6 @@ /* Copyright 2016 SINTEF ICT, Applied Mathematics. - Copyright 2016 Statoil ASA. + Copyright 2016, 2017 Statoil ASA. This file is part of the Open Porous Media project (OPM). @@ -41,9 +41,7 @@ namespace FlowDiagnostics std::vector expandSparse(const int n, const CellSetValues& v) { std::vector r(n, 0.0); - const int num_items = v.cellValueCount(); - for (int item = 0; item < num_items; ++item) { - auto data = v.cellValue(item); + for (const auto& data : v) { r[data.first] = data.second; } return r; @@ -78,9 +76,10 @@ namespace FlowDiagnostics TracerTofSolver::TracerTofSolver(const AssembledConnections& graph, + const AssembledConnections& reverse_graph, const std::vector& pore_volumes, const CellSetValues& source_inflow) - : TracerTofSolver(graph, pore_volumes, source_inflow, InOutFluxComputer(graph)) + : TracerTofSolver(graph, reverse_graph, pore_volumes, source_inflow, InOutFluxComputer(graph)) { } @@ -91,10 +90,12 @@ namespace FlowDiagnostics // The InOutFluxComputer is used so that influx_ and outflux_ can be // const members of the class. TracerTofSolver::TracerTofSolver(const AssembledConnections& graph, + const AssembledConnections& reverse_graph, const std::vector& pore_volumes, const CellSetValues& source_inflow, InOutFluxComputer&& inout) : g_(graph) + , g_reverse_(reverse_graph) , pv_(pore_volumes) , influx_(std::move(inout.influx)) , outflux_(std::move(inout.outflux)) @@ -106,13 +107,11 @@ namespace FlowDiagnostics - std::vector TracerTofSolver::solveGlobal(const std::vector& all_startsets) + std::vector TracerTofSolver::solveGlobal() { // Reset solver variables and set source terms. prepareForSolve(); - for (const CellSet& startset : all_startsets) { - setupStartArray(startset); - } + setupStartArrayFromSource(); // Compute topological ordering and solve. computeOrdering(); @@ -138,12 +137,14 @@ namespace FlowDiagnostics // Return computed time-of-flight. CellSetValues local_tof; + CellSetValues local_tracer; const int num_elements = component_starts_.back(); for (int element = 0; element < num_elements; ++element) { const int cell = sequence_[element]; - local_tof.addCellValue(cell, tof_[cell]); + local_tof[cell] = tof_[cell]; + local_tracer[cell] = tracer_[cell]; } - return LocalSolution{ local_tof, CellSetValues{} }; // TODO also return tracer + return LocalSolution{ std::move(local_tof), std::move(local_tracer) }; } @@ -156,10 +157,10 @@ namespace FlowDiagnostics const int num_cells = pv_.size(); is_start_.clear(); is_start_.resize(num_cells, 0); - upwind_contrib_.clear(); - upwind_contrib_.resize(num_cells, 0.0); tof_.clear(); - tof_.resize(num_cells, -1e100); + tof_.resize(num_cells, 0.0); + tracer_.clear(); + tracer_.resize(num_cells, 0.0); num_multicell_ = 0; max_size_multicell_ = 0; max_iter_multicell_ = 0; @@ -180,6 +181,20 @@ namespace FlowDiagnostics + void TracerTofSolver::setupStartArrayFromSource() + { + const int num_cells = pv_.size(); + for (int cell = 0; cell < num_cells; ++cell) { + if (source_term_[cell] > 0.0) { + is_start_[cell] = 1; + } + } + } + + + + + void TracerTofSolver::computeOrdering() { // Compute reverse topological ordering. @@ -236,7 +251,7 @@ namespace FlowDiagnostics } // Extract data from solution. - sequence_.resize(num_cells); + sequence_.resize(num_cells); // For local solutions this is the upper limit of the size. TODO: use exact size. const int num_comp = tarjan_get_numcomponents(result.get()); component_starts_.resize(num_comp + 1); component_starts_[0] = 0; @@ -263,6 +278,11 @@ namespace FlowDiagnostics solveMultiCell(comp_size, &sequence_[component_starts_[comp]]); } } + + // Threshold time-of-flight values. + for (double& t : tof_) { + t = std::min(t, max_tof_); + } } @@ -272,27 +292,55 @@ namespace FlowDiagnostics void TracerTofSolver::solveSingleCell(const int cell) { // Compute influx (divisor of tof expression). - double source = 2.0 * source_term_[cell]; // Initial tof for well cell equal to half fill time. + double source = source_term_[cell]; // Initial tof for well cell equal to fill time. if (source == 0.0 && is_start_[cell]) { source = std::numeric_limits::infinity(); // Gives 0 tof in start cell. } const double total_influx = influx_[cell] + source; - // Compute effective pv (dividend of tof expression). - const double eff_pv = pv_[cell] + upwind_contrib_[cell]; - - // Compute (capped) tof. - if (total_influx < eff_pv / max_tof_) { + // Cap time-of-flight if time to fill cell is greater than + // max_tof_. Note that cells may still have larger than + // max_tof_ after solveSingleCell() when including upwind + // contributions, and those in turn can affect cells + // downstream (so capping in this method will not produce the + // same result). All tofs will finally be capped in solve() as + // a post-process. The reason for the somewhat convoluted + // behaviour is to match existing MRST results. + if (total_influx < pv_[cell] / max_tof_) { tof_[cell] = max_tof_; - } else { - tof_[cell] = eff_pv / total_influx; + return; } - // Set contribution for my downwind cells (if any). - for (const auto& conn : g_.cellNeighbourhood(cell)) { - const int downwind_cell = conn.neighbour; + // Compute upwind contribution. + double upwind_tof_contrib = 0.0; + double upwind_tracer_contrib = 0.0; + for (const auto& conn : g_reverse_.cellNeighbourhood(cell)) { + const int upwind_cell = conn.neighbour; const double flux = conn.weight; - upwind_contrib_[downwind_cell] += tof_[cell] * flux; + upwind_tof_contrib += tof_[upwind_cell] * tracer_[upwind_cell] * flux; + upwind_tracer_contrib += tracer_[upwind_cell] * flux; + } + if (is_start_[cell]) { + // For cells tagged as start cells, the tracer value + // should get a contribution from the local source term + // (which is then considered to be containing the + // currently considered tracer). + // + // Start cells should therefore never have a zero source + // term. This may need to change in the future to support + // local tracing from arbitrary locations. + upwind_tracer_contrib += source; + } + + // Compute time-of-flight and tracer. + tracer_[cell] = upwind_tracer_contrib / total_influx; + + if (tracer_[cell] > 0.0) { + tof_[cell] = (pv_[cell]*tracer_[cell] + upwind_tof_contrib) + / (total_influx * tracer_[cell]); + } + else { + tof_[cell] = max_tof_; } } @@ -302,9 +350,9 @@ namespace FlowDiagnostics void TracerTofSolver::solveMultiCell(const int num_cells, const int* cells) { + // Record some statistics. ++num_multicell_; max_size_multicell_ = std::max(max_size_multicell_, num_cells); - // std::cout << "Multiblock solve with " << num_cells << " cells." << std::endl; // Using a Gauss-Seidel approach. double max_delta = 1e100; @@ -318,7 +366,6 @@ namespace FlowDiagnostics solveSingleCell(cell); max_delta = std::max(max_delta, std::fabs(tof_[cell] - tof_before)); } - // std::cout << "Max delta = " << max_delta << std::endl; } max_iter_multicell_ = std::max(max_iter_multicell_, num_iter); } diff --git a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/TracerTofSolver.hpp b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/TracerTofSolver.hpp index 59a31b4a85..b97410176a 100644 --- a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/TracerTofSolver.hpp +++ b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/flowdiagnostics/TracerTofSolver.hpp @@ -49,15 +49,17 @@ namespace FlowDiagnostics public: /// Initialize solver with a given flow graph (a weighted, /// directed asyclic graph) containing the out-fluxes from - /// each cell, pore volumes and inflow sources (positive). + /// each cell, the reverse graph (with in-fluxes from each + /// cell), pore volumes and inflow sources (positive). TracerTofSolver(const AssembledConnections& graph, + const AssembledConnections& reverse_graph, const std::vector& pore_volumes, const CellSetValues& source_inflow); /// Compute the global (combining all sources) time-of-flight of each cell. /// /// TODO: also compute tracer solution. - std::vector solveGlobal(const std::vector& all_startsets); + std::vector solveGlobal(); /// Output data struct for solveLocal(). struct LocalSolution { @@ -77,6 +79,7 @@ namespace FlowDiagnostics // -------------- Private data members -------------- const AssembledConnections& g_; + const AssembledConnections& g_reverse_; const std::vector& pv_; const std::vector influx_; const std::vector outflux_; @@ -84,8 +87,8 @@ namespace FlowDiagnostics std::vector is_start_; // char to avoid the nasty vector specialization std::vector sequence_; std::vector component_starts_; - std::vector upwind_contrib_; std::vector tof_; + std::vector tracer_; int num_multicell_ = 0; int max_size_multicell_ = 0; int max_iter_multicell_ = 0; @@ -99,6 +102,7 @@ namespace FlowDiagnostics // -------------- Private methods -------------- TracerTofSolver(const AssembledConnections& graph, + const AssembledConnections& reverse_graph, const std::vector& pore_volumes, const CellSetValues& source_inflow, InOutFluxComputer&& inout); @@ -107,6 +111,8 @@ namespace FlowDiagnostics void setupStartArray(const CellSet& startset); + void setupStartArrayFromSource(); + void computeOrdering(); void computeLocalOrdering(const CellSet& startset); diff --git a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/utility/graph/AssembledConnectionsIteration.hpp b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/utility/graph/AssembledConnectionsIteration.hpp index b949242505..d91baeaeff 100644 --- a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/utility/graph/AssembledConnectionsIteration.hpp +++ b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/opm/utility/graph/AssembledConnectionsIteration.hpp @@ -1,5 +1,6 @@ /* Copyright 2016 SINTEF ICT, Applied Mathematics. + Copyright 2016 Statoil ASA. This file is part of the Open Porous Media project (OPM). diff --git a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/tests/test_cellset.cpp b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/tests/test_cellset.cpp index ad4c1c9cb0..53c2036fc4 100644 --- a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/tests/test_cellset.cpp +++ b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/tests/test_cellset.cpp @@ -56,6 +56,12 @@ BOOST_AUTO_TEST_CASE (Construct) BOOST_CHECK_EQUAL(i.to_string(), name); } + { + const auto i1 = CellSetID("I-1"); + const auto i2 = CellSetID("I-2"); + BOOST_CHECK_EQUAL(i1 < i2, true); + BOOST_CHECK_EQUAL(i1 < i2, i1.to_string() < i2.to_string()); + } } BOOST_AUTO_TEST_SUITE_END() @@ -65,19 +71,10 @@ BOOST_AUTO_TEST_SUITE(CellSetTest) BOOST_AUTO_TEST_CASE (Constructor) { - { - auto s = CellSet{}; - - BOOST_CHECK_EQUAL(s.id().to_string(), ""); - } - { const auto name = std::string("Test-Ctor"); - auto s = CellSet{}; - { - s.identify(CellSetID(name)); - } + auto s = CellSet{CellSetID(name)}; BOOST_CHECK_EQUAL(s.id().to_string(), name); } @@ -85,27 +82,43 @@ BOOST_AUTO_TEST_CASE (Constructor) BOOST_AUTO_TEST_CASE (AssignCells) { - auto s = CellSet{}; - const auto cells = std::vector { 0, 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000 }; - for (const auto& cell : cells) { - s.insert(cell); + { + // Using insert() to populate. + auto s = CellSet{CellSetID("TestSet")}; + for (const auto& cell : cells) { + s.insert(cell); + } + + auto out = std::vector(s.begin(), s.end()); + { + std::sort(out.begin(), out.end()); + } + + BOOST_CHECK_EQUAL_COLLECTIONS(out .begin(), out .end(), + cells.begin(), cells.end()); } - auto out = std::vector(s.begin(), s.end()); { - std::sort(out.begin(), out.end()); - } + // Using direct constructor to populate. + auto s = CellSet{CellSetID("TestSet"), cells}; - BOOST_CHECK_EQUAL_COLLECTIONS(out .begin(), out .end(), - cells.begin(), cells.end()); + auto out = std::vector(s.begin(), s.end()); + { + std::sort(out.begin(), out.end()); + } + + BOOST_CHECK_EQUAL_COLLECTIONS(out .begin(), out .end(), + cells.begin(), cells.end()); + } } + BOOST_AUTO_TEST_CASE (Duplicates) { - auto s = CellSet{}; + auto s = CellSet{CellSetID("TestSet")}; const auto cells = std::vector { 0, 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000 }; @@ -125,4 +138,25 @@ BOOST_AUTO_TEST_CASE (Duplicates) cells.begin(), cells.end()); } + +BOOST_AUTO_TEST_CASE (DuplicatesDirectConstruction) +{ + const auto cells = std::vector + { 0, 100, 100, 100, 2, 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000 }; + + const auto expected = std::vector + { 0, 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000 }; + + auto s = CellSet{CellSetID("TestSet"), cells}; + + auto out = std::vector(s.begin(), s.end()); + { + std::sort(out.begin(), out.end()); + } + + BOOST_CHECK_EQUAL_COLLECTIONS(out .begin(), out .end(), + expected.begin(), expected.end()); +} + + BOOST_AUTO_TEST_SUITE_END() diff --git a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/tests/test_cellsetvalues.cpp b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/tests/test_cellsetvalues.cpp deleted file mode 100644 index 63872a72a7..0000000000 --- a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/tests/test_cellsetvalues.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - Copyright 2016 SINTEF ICT, Applied Mathematics. - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media Project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#if HAVE_CONFIG_H -#include -#endif // HAVE_CONFIG_H - -#if HAVE_DYNAMIC_BOOST_TEST -#define BOOST_TEST_DYN_LINK -#endif - -#define NVERBOSE - -#define BOOST_TEST_MODULE TEST_CELLSETVALUES - -#include -#include -#include - -#include - -using Opm::FlowDiagnostics::CellSetValues; - -BOOST_AUTO_TEST_SUITE(CellSet_Values) - -BOOST_AUTO_TEST_CASE (Constructor) -{ - { - CellSetValues s{}; - } - - { - auto s = CellSetValues{ 100 }; - } -} - -BOOST_AUTO_TEST_CASE (AssignValues) -{ - auto s = CellSetValues{ 100 }; - - for (decltype(s.cellValueCount()) - i = 0, n = 100; - i < n; ++i) - { - s.addCellValue(100 - i, i * 10.0); - } - - BOOST_CHECK_EQUAL(s.cellValueCount(), 100); - - { - const auto a = s.cellValue(0); - - BOOST_CHECK_EQUAL(a.first , 100); - BOOST_CHECK_CLOSE(a.second, 0.0, 1.0e-10); - } - - { - const auto a = s.cellValue(s.cellValueCount() - 1); - - BOOST_CHECK_EQUAL(a.first , 1); - BOOST_CHECK_CLOSE(a.second, 990.0, 1.0e-10); - } - - { - const auto a = s.cellValue(50); - - BOOST_CHECK_EQUAL(a.first , 50); - BOOST_CHECK_CLOSE(a.second, 500.0, 1.0e-10); - } -} - -BOOST_AUTO_TEST_SUITE_END() diff --git a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/tests/test_derivedquantities.cpp b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/tests/test_derivedquantities.cpp new file mode 100644 index 0000000000..6c14694949 --- /dev/null +++ b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/tests/test_derivedquantities.cpp @@ -0,0 +1,325 @@ +/* + Copyright 2016 Statoil ASA. + + This file is part of the Open Porous Media Project (OPM). + + OPM 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. + + OPM 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 for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#if HAVE_CONFIG_H +#include +#endif // HAVE_CONFIG_H + +#if HAVE_DYNAMIC_BOOST_TEST +#define BOOST_TEST_DYN_LINK +#endif // HAVE_DYNAMIC_BOOST_TEST + +#define NVERBOSE + +#define BOOST_TEST_MODULE TEST_DERIVEDQUANTITIES + +#include + +#include +#include + +#include + +using namespace Opm::FlowDiagnostics; + +namespace +{ + std::size_t + numIntConn(const std::size_t nx, + const std::size_t ny) + { + return (nx - 1)*ny + nx*(ny - 1); + } + + std::vector + internalConnections(const std::size_t nx, + const std::size_t ny) + { + auto cellID = [](const std::size_t start, + const std::size_t off) + { + return static_cast(start + off); + }; + + auto neighbours = std::vector{}; + neighbours.reserve(2 * numIntConn(nx, ny)); + + // I connections + { + for (auto j = 0*ny; j < ny; ++j) { + const auto start = j * nx; + + for (auto i = 0*nx + 1; i < nx; ++i) { + neighbours.push_back(cellID(start, i - 1)); + neighbours.push_back(cellID(start, i - 0)); + } + } + } + + // J connections + { + for (auto j = 0*ny + 1; j < ny; ++j) { + const auto start = (j - 1)*nx; + + for (auto i = 0*nx; i < nx; ++i) { + neighbours.push_back(cellID(start, i + 0 )); + neighbours.push_back(cellID(start, i + nx)); + } + } + } + + return neighbours; + } + + std::vector + flowField(const std::vector::size_type n) + { + return std::vector(n, 0.3); + } + +} // Namespace anonymous + +class Setup +{ +public: + Setup(const std::size_t nx, + const std::size_t ny); + + const ConnectivityGraph& connectivity() const; + const std::vector& poreVolume() const; + const ConnectionValues& flux() const; + +private: + ConnectivityGraph g_; + std::vector pvol_; + ConnectionValues flux_; +}; + +Setup::Setup(const std::size_t nx, + const std::size_t ny) + : g_ (nx * ny, internalConnections(nx, ny)) + , pvol_(g_.numCells(), 0.3) + , flux_(ConnectionValues::NumConnections{ g_.numConnections() }, + ConnectionValues::NumPhases { 1 }) +{ + const auto flux = flowField(g_.numConnections()); + + using ConnID = ConnectionValues::ConnID; + + const auto phaseID = + ConnectionValues::PhaseID{ 0 }; + + for (decltype(flux_.numConnections()) + conn = 0, nconn = flux_.numConnections(); + conn < nconn; ++conn) + { + flux_(ConnID{conn}, phaseID) = flux[conn]; + } +} + +const ConnectivityGraph& +Setup::connectivity() const +{ + return g_; +} + +const std::vector& +Setup::poreVolume() const +{ + return pvol_; +} + +const ConnectionValues& +Setup::flux() const +{ + return flux_; +} + +BOOST_AUTO_TEST_SUITE(Test_DerivedQuantities) + +BOOST_AUTO_TEST_CASE (Constructor) +{ + const auto cas = Setup(2, 2); + + Toolbox diagTool(cas.connectivity()); + + diagTool.assignPoreVolume(cas.poreVolume()); + diagTool.assignConnectionFlux(cas.flux()); +} + + +namespace { + + template + void element_is_close(const T& t1, const T& t2) + { + BOOST_CHECK_CLOSE(t1, t2, 1.0e-10); + } + + // using DP = std::pair; + + // template<> + // void element_is_close(const DP& p1, const DP& p2) + // { + // BOOST_CHECK_CLOSE(p1.first, p2.first, 1.0e-10); + // BOOST_CHECK_CLOSE(p1.second, p2.second, 1.0e-10); + // } + + template + void check_is_close(const Collection1& c1, const Collection2& c2) + { + BOOST_REQUIRE_EQUAL(c1.size(), c2.size()); + + if (! c1.empty()) { + auto i1 = c1.begin(), e1 = c1.end(); + auto i2 = c2.begin(); + + for (; i1 != e1; ++i1, ++i2) { + element_is_close(*i1, *i2); + } + } + } + + template <> + void check_is_close<>(const Graph& c1, const Graph& c2) + { + BOOST_TEST_MESSAGE("Comparing first collections"); + check_is_close(c1.first, c2.first); + BOOST_TEST_MESSAGE("Comparing second collections"); + check_is_close(c1.second, c2.second); + } + +} // Namespace Anonymous + + + + + + +BOOST_AUTO_TEST_CASE (OneDimCase) +{ + using namespace Opm::FlowDiagnostics; + + const auto cas = Setup(5, 1); + const auto& graph = cas.connectivity(); + const auto& pv = cas.poreVolume(); + const auto& flux = cas.flux(); + + // Create well in/out flows. + CellSetValues wellflow = { {0, 0.3}, {4, -0.3} }; + + Toolbox diagTool(graph); + diagTool.assignPoreVolume(pv); + diagTool.assignConnectionFlux(flux); + diagTool.assignInflowFlux(wellflow); + + auto inje = std::vector{CellSet(CellSetID("I-1"), {0})}; + + auto prod = std::vector{CellSet(CellSetID("P-1"), {int(graph.numCells()) - 1})}; + + { + const auto fwd = diagTool.computeInjectionDiagnostics(inje); + const auto rev = diagTool.computeProductionDiagnostics(prod); + + BOOST_TEST_MESSAGE("==== F-Phi graph"); + const Graph expectedFPhi{ + { 0.0, 0.2, 0.4, 0.6, 0.8, 1.0 }, + { 0.0, 0.2, 0.4, 0.6, 0.8, 1.0 } + }; + BOOST_CHECK_THROW(flowCapacityStorageCapacityCurve({}, rev, pv), std::runtime_error); + BOOST_CHECK_THROW(flowCapacityStorageCapacityCurve(fwd, {}, pv), std::runtime_error); + BOOST_CHECK_THROW(flowCapacityStorageCapacityCurve(fwd, rev, {}), std::runtime_error); + const auto fcapscap = flowCapacityStorageCapacityCurve(fwd, rev, pv); + check_is_close(fcapscap, expectedFPhi); + const auto fcapscap2 = flowCapacityStorageCapacityCurve(fwd.fd.timeOfFlight(), rev.fd.timeOfFlight(), pv); + check_is_close(fcapscap2, expectedFPhi); + + BOOST_TEST_MESSAGE("==== Lorenz coefficient"); + const double expectedLorenz = 0.0; + BOOST_CHECK_CLOSE(lorenzCoefficient(fcapscap), expectedLorenz, 1e-10); + const Graph wrongGraph { + { 0.0, 0.5, 1.0 }, + { 1.0, 1.0 } + }; + BOOST_CHECK_THROW(lorenzCoefficient(wrongGraph), std::runtime_error); + const Graph maxLorenzGraph { + { 0.0, 1.0 }, + { 1.0, 1.0 } + }; + BOOST_CHECK_CLOSE(lorenzCoefficient(maxLorenzGraph), 1.0, 1e-10); + const Graph inbetweenLorenzGraph { + { 0.0, 0.45, 1.0 }, + { 0.0, 0.75, 1.0 } + }; + BOOST_CHECK_CLOSE(lorenzCoefficient(inbetweenLorenzGraph), 0.3, 1e-10); + + BOOST_TEST_MESSAGE("==== Sweep efficiency"); + const Graph expectedSweep{ + { 0.0, 1.0, 1.0, 1.0, 1.0, 1.0 }, + { 0.0, 1.0, 1.0, 1.0, 1.0, 1.0 }, + }; + BOOST_CHECK_THROW(sweepEfficiency(wrongGraph), std::runtime_error); + check_is_close(sweepEfficiency(fcapscap), expectedSweep); + const Graph expSweepMax { + { 0.0 }, + { 0.0 } + }; + check_is_close(sweepEfficiency(maxLorenzGraph), expSweepMax); + const Graph expSweepInbetween { // Verified against MRST version + { 0.0, 0.6, 2.2 }, + { 0.0, 0.6, 1.0 } + }; + check_is_close(sweepEfficiency(inbetweenLorenzGraph), expSweepInbetween); + + const double expectedVol12 = 1.5; + const double vol12 = injectorProducerPairVolume(fwd, rev, pv, CellSetID("I-1"), CellSetID("P-1")); + BOOST_CHECK_CLOSE(vol12, expectedVol12, 1e-10); + + const auto pairflux = injectorProducerPairFlux(fwd, rev, inje[0], prod[0], wellflow); + BOOST_CHECK_CLOSE(pairflux.first, 0.3, 1e-10); + BOOST_CHECK_CLOSE(pairflux.second, -0.3, 1e-10); + } + +} + + + + + +BOOST_AUTO_TEST_CASE (GeneralCase) +{ + BOOST_TEST_MESSAGE("==== F-Phi graph"); + + std::vector pv { 1.0, 2.0, 1.0 }; + std::vector ftof { 0.0, 2.0, 1.0 }; + std::vector rtof { 1.0, 2.0, 0.0 }; + const Graph expectedFPhi{ + { 0.0, 0.25, 0.5, 1.0 }, + { 0.0, 0.4, 0.8, 1.0 } + }; + const auto fcapscap = flowCapacityStorageCapacityCurve(ftof, rtof, pv); + check_is_close(fcapscap, expectedFPhi); + + BOOST_TEST_MESSAGE("==== Lorenz coefficient"); + const double expectedLorenz = 0.3; + BOOST_CHECK_CLOSE(lorenzCoefficient(fcapscap), expectedLorenz, 1e-10); +} + + +BOOST_AUTO_TEST_SUITE_END() diff --git a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/tests/test_flowdiagnosticstool.cpp b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/tests/test_flowdiagnosticstool.cpp index b1b44eadb8..57c1b00569 100644 --- a/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/tests/test_flowdiagnosticstool.cpp +++ b/ThirdParty/custom-opm-flowdiagnostics/opm-flowdiagnostics/tests/test_flowdiagnosticstool.cpp @@ -162,6 +162,8 @@ BOOST_AUTO_TEST_SUITE(FlowDiagnostics_Toolbox) BOOST_AUTO_TEST_CASE (Constructor) { + BOOST_TEST_MESSAGE("============== Test: Constructor =============="); + const auto cas = Setup(2, 2); Toolbox diagTool(cas.connectivity()); @@ -170,133 +172,237 @@ BOOST_AUTO_TEST_CASE (Constructor) diagTool.assignConnectionFlux(cas.flux()); } -BOOST_AUTO_TEST_CASE (InjectionDiagnostics) -{ - const auto cas = Setup(2, 2); - Toolbox diagTool(cas.connectivity()); - diagTool.assignPoreVolume(cas.poreVolume()); - diagTool.assignConnectionFlux(cas.flux()); - auto start = std::vector{}; +namespace { + + template + void check_is_close(const Collection1& c1, const Collection2& c2) { - start.emplace_back(); + BOOST_REQUIRE_EQUAL(c1.size(), c2.size()); - auto& s = start.back(); + if (! c1.empty()) { + auto i1 = c1.begin(), e1 = c1.end(); + auto i2 = c2.begin(); - s.identify(CellSetID("I-1")); - s.insert(0); + for (; i1 != e1; ++i1, ++i2) { + BOOST_CHECK_CLOSE(*i1, *i2, 1.0e-10); + } + } } - { - start.emplace_back(); +} // Namespace Anonymous + + - auto& s = start.back(); - s.identify(CellSetID("I-2")); - s.insert(cas.connectivity().numCells() - 1); + + +BOOST_AUTO_TEST_CASE (OneDimCase) +{ + BOOST_TEST_MESSAGE("============== Test: OneDimCase =============="); + using namespace Opm::FlowDiagnostics; + + const auto cas = Setup(5, 1); + const auto& graph = cas.connectivity(); + + // Create fluxes. + ConnectionValues flux(ConnectionValues::NumConnections{ graph.numConnections() }, + ConnectionValues::NumPhases { 1 }); + const size_t nconn = cas.connectivity().numConnections(); + for (size_t conn = 0; conn < nconn; ++conn) { + flux(ConnectionValues::ConnID{conn}, ConnectionValues::PhaseID{0}) = 0.3; + } + + // Create well in/out flows. + CellSetValues wellflow = { {0, 0.3}, {4, -0.3} }; + + Toolbox diagTool(graph); + diagTool.assignPoreVolume(cas.poreVolume()); + diagTool.assignConnectionFlux(flux); + diagTool.assignInflowFlux(wellflow); + + // Check that inconsistent start set specifications will throw. + { + const int first_cell = 0; + const int last_cell = cas.connectivity().numCells() - 1; + auto start = std::vector{ CellSet(CellSetID("I-1"), {first_cell}), + CellSet(CellSetID("I-2"), {last_cell}) }; + BOOST_CHECK_THROW(diagTool.computeInjectionDiagnostics(start), std::runtime_error); + BOOST_CHECK_THROW(diagTool.computeProductionDiagnostics(start), std::runtime_error); } - const auto fwd = diagTool - .computeInjectionDiagnostics(start); + const int first_cell = 0; + const int last_cell = cas.connectivity().numCells() - 1; + auto start_fwd = std::vector{ CellSet(CellSetID("I-1"), {first_cell}) }; + auto start_rev = std::vector{ CellSet(CellSetID("I-2"), {last_cell}) }; + const auto fwd = diagTool.computeInjectionDiagnostics(start_fwd); + const auto rev = diagTool.computeProductionDiagnostics(start_rev); // Global ToF field (accumulated from all injectors) { const auto tof = fwd.fd.timeOfFlight(); - BOOST_CHECK_EQUAL(tof.size(), cas.connectivity().numCells()); + BOOST_REQUIRE_EQUAL(tof.size(), cas.connectivity().numCells()); + std::vector expected = { 1.0, 2.0, 3.0, 4.0, 5.0 }; + check_is_close(tof, expected); + } + + // Global ToF field (accumulated from all producers) + { + const auto tof = rev.fd.timeOfFlight(); + + BOOST_REQUIRE_EQUAL(tof.size(), cas.connectivity().numCells()); + std::vector expected = { 5.0, 4.0, 3.0, 2.0, 1.0 }; + check_is_close(tof, expected); } // Verify set of start points. { const auto startpts = fwd.fd.startPoints(); - BOOST_CHECK_EQUAL(startpts.size(), start.size()); + BOOST_CHECK_EQUAL(startpts.size(), start_fwd.size()); for (const auto& pt : startpts) { auto pos = - std::find_if(start.begin(), start.end(), + std::find_if(start_fwd.begin(), start_fwd.end(), [&pt](const CellSet& s) { return s.id().to_string() == pt.to_string(); }); // ID of 'pt' *MUST* be in set of identified start points. - BOOST_CHECK(pos != start.end()); + BOOST_CHECK(pos != start_fwd.end()); } } // Tracer-ToF { const auto tof = fwd.fd - .timeOfFlight(CellSetID("I-1")); + .timeOfFlight(CellSetID("BogusID")); - for (decltype(tof.cellValueCount()) - i = 0, n = tof.cellValueCount(); - i < n; ++i) - { - const auto v = tof.cellValue(i); + std::vector> expected = {}; + BOOST_REQUIRE_EQUAL(tof.size(), expected.size()); - BOOST_TEST_MESSAGE("[" << i << "] -> ToF[" - << v.first << "] = " - << v.second); + int i = 0; + for (const auto& v : tof) { + BOOST_TEST_MESSAGE("ToF[" << v.first << "] = " << v.second); + BOOST_CHECK_EQUAL(v.first, expected[i].first); + BOOST_CHECK_CLOSE(v.second, expected[i].second, 1.0e-10); + ++i; } } // Tracer Concentration { const auto conc = fwd.fd - .concentration(CellSetID("I-2")); - - BOOST_TEST_MESSAGE("conc.cellValueCount() = " << - conc.cellValueCount()); + .concentration(CellSetID("BogusID")); - for (decltype(conc.cellValueCount()) - i = 0, n = conc.cellValueCount(); - i < n; ++i) - { - const auto v = conc.cellValue(i); + std::vector> expected = {}; + BOOST_REQUIRE_EQUAL(conc.size(), expected.size()); - BOOST_TEST_MESSAGE("[" << i << "] -> Conc[" - << v.first << "] = " - << v.second); + int i = 0; + for (const auto& v : conc) { + BOOST_TEST_MESSAGE("Conc[" << v.first << "] = " << v.second); + BOOST_CHECK_EQUAL(v.first, expected[i].first); + BOOST_CHECK_CLOSE(v.second, expected[i].second, 1.0e-10); + ++i; } - } -} - - + } -namespace { - template - void check_is_close(const Collection1& c1, const Collection2& c2) + // Tracer-ToF { - BOOST_REQUIRE_EQUAL(c1.size(), c2.size()); + const auto tof = fwd.fd + .timeOfFlight(CellSetID("I-1")); - if (! c1.empty()) { - auto i1 = c1.begin(), e1 = c1.end(); - auto i2 = c2.begin(); + std::vector expected = { 1.0, 2.0, 3.0, 4.0, 5.0 }; + BOOST_REQUIRE_EQUAL(tof.size(), expected.size()); - for (; i1 != e1; ++i1, ++i2) { - BOOST_CHECK_CLOSE(*i1, *i2, 1.0e-10); - } + for (const auto& v : tof) { + BOOST_TEST_MESSAGE("ToF[" << v.first << "] = " << v.second); + BOOST_CHECK_CLOSE(v.second, expected[v.first], 1.0e-10); } } -} // Namespace Anonymous - + // Tracer Concentration + { + const auto conc = fwd.fd + .concentration(CellSetID("I-1")); + std::vector expected = { 1.0, 1.0, 1.0, 1.0, 1.0 }; + BOOST_REQUIRE_EQUAL(conc.size(), expected.size()); + for (const auto& v : conc) { + BOOST_TEST_MESSAGE("Conc[" << v.first << "] = " << v.second); + BOOST_CHECK_CLOSE(v.second, expected[v.first], 1.0e-10); + } + } + // Add a start point in the middle. + const int middle_cell = 2; + start_fwd.emplace_back(CellSet(CellSetID("Middle"), {middle_cell})); + BOOST_CHECK_THROW(diagTool.computeInjectionDiagnostics(start_fwd), std::runtime_error); +} -BOOST_AUTO_TEST_CASE (OneDimCase) +// Arrows indicate a flux of 0.3, O is a source of 0.3 +// and X is a sink of 0.3 (each cell has a pore volume of 0.3). +// ---------------------------- +// | | | | +// | O -> -> | +// | | -> | +// | | | || | +// -------------^--------VV---- +// | | | | | +// | | | | +// | O -> | XX | +// | | | | +// ---------------------------- +// Cell indices: +// ---------------------------- +// | | | | +// | | | | +// | 3 | 4 | 5 | +// | | | | +// ---------------------------- +// | | | | +// | | | | +// | 0 | 1 | 2 | +// | | | | +// ---------------------------- +// Expected global injection TOF: +// ---------------------------- +// | | | | +// | | | | +// | 1.0 | 2.0 | 2.5 | +// | | | | +// ---------------------------- +// | | | | +// | | | | +// | 1.0 | 2.0 | 3.0 | +// | | | | +// ---------------------------- +// Expected global production TOF: +// ---------------------------- +// | | | | +// | | | | +// | 2.5 | 1.5 | 1.0 | +// | | | | +// ---------------------------- +// | | | | +// | | | | +// | 3.5 | 2.5 | 0.5 | +// | | | | +// ---------------------------- +BOOST_AUTO_TEST_CASE (LocalSolutions) { + BOOST_TEST_MESSAGE("============== Test: LocalSolutions =============="); using namespace Opm::FlowDiagnostics; - const auto cas = Setup(5, 1); + const auto cas = Setup(3, 2); const auto& graph = cas.connectivity(); // Create fluxes. @@ -304,114 +410,338 @@ BOOST_AUTO_TEST_CASE (OneDimCase) ConnectionValues::NumPhases { 1 }); const size_t nconn = cas.connectivity().numConnections(); for (size_t conn = 0; conn < nconn; ++conn) { - flux(ConnectionValues::ConnID{conn}, ConnectionValues::PhaseID{0}) = 0.3; + BOOST_TEST_MESSAGE("Connection " << conn << " connects cells " + << graph.connection(conn).first << " and " + << graph.connection(conn).second); } + using C = ConnectionValues::ConnID; + using P = ConnectionValues::PhaseID; + flux(C{0}, P{0}) = 0.3; + flux(C{1}, P{0}) = 0.0; + flux(C{2}, P{0}) = 0.3; + flux(C{3}, P{0}) = 0.6; + flux(C{4}, P{0}) = 0.0; + flux(C{5}, P{0}) = 0.3; + flux(C{6}, P{0}) = -0.6; + // Create well in/out flows. - CellSetValues wellflow; - wellflow.addCellValue(0, 0.3); - wellflow.addCellValue(4, -0.3); + CellSetValues wellflow = { {0, 0.3}, {3, 0.3}, {2, -0.6} }; Toolbox diagTool(graph); diagTool.assignPoreVolume(cas.poreVolume()); diagTool.assignConnectionFlux(flux); diagTool.assignInflowFlux(wellflow); - auto start = std::vector{}; + auto injstart = std::vector{ CellSet(CellSetID("I-1"), {0}), + CellSet(CellSetID("I-2"), {3}) }; + auto prdstart = std::vector{ CellSet(CellSetID("P-1"), {2}) }; + + const auto fwd = diagTool.computeInjectionDiagnostics(injstart); + const auto rev = diagTool.computeProductionDiagnostics(prdstart); + + // Global ToF field (accumulated from all injectors) + { + const auto tof = fwd.fd.timeOfFlight(); + + BOOST_REQUIRE_EQUAL(tof.size(), cas.connectivity().numCells()); + std::vector expected = { 1.0, 2.0, 3.0, 1.0, 2.0, 2.5 }; + check_is_close(tof, expected); + } + + // Global ToF field (accumulated from all producers) { - start.emplace_back(); + const auto tof = rev.fd.timeOfFlight(); - auto& s = start.back(); + BOOST_REQUIRE_EQUAL(tof.size(), cas.connectivity().numCells()); + std::vector expected = { 3.5, 2.5, 0.5, 2.5, 1.5, 1.0 }; + check_is_close(tof, expected); + } + + // Verify set of start points. + { + using VCS = std::vector; + using VCSI = std::vector; + using P = std::pair; + std::vector

pairs { P{ injstart, fwd.fd.startPoints() }, P{ prdstart, rev.fd.startPoints() } }; + for (const auto& p : pairs) { + const auto& s1 = p.first; + const auto& s2 = p.second; + BOOST_CHECK_EQUAL(s1.size(), s2.size()); + for (const auto& pt : s2) { + // ID of 'pt' *MUST* be in set of identified start points. + auto pos = std::find_if(s1.begin(), s1.end(), + [&pt](const CellSet& s) + { + return s.id().to_string() == pt.to_string(); + }); + BOOST_CHECK(pos != s1.end()); + } + } + } - s.identify(CellSetID("I-1")); - s.insert(0); + // Local I-1 tracer concentration. + { + const auto conc = fwd.fd.concentration(CellSetID("I-1")); + std::vector> expected = { {0, 1.0}, {1, 1.0}, {2, 0.5}, {4, 0.5}, {5, 0.5} }; + BOOST_REQUIRE_EQUAL(conc.size(), expected.size()); + + int i = 0; + for (const auto& v : conc) { + BOOST_TEST_MESSAGE("Conc[" << v.first << "] = " << v.second); + BOOST_CHECK_EQUAL(v.first, expected[i].first); + BOOST_CHECK_CLOSE(v.second, expected[i].second, 1.0e-10); + ++i; + } } + // Local I-1 tof. { - start.emplace_back(); + const auto tof = fwd.fd.timeOfFlight(CellSetID("I-1")); + std::vector> expected = { {0, 1.0}, {1, 2.0}, {2, 3.5}, {4, 2.5}, {5, 3.0} }; + BOOST_REQUIRE_EQUAL(tof.size(), expected.size()); + + int i = 0; + for (const auto& v : tof) { + BOOST_TEST_MESSAGE("ToF[" << v.first << "] = " << v.second); + BOOST_CHECK_EQUAL(v.first, expected[i].first); + BOOST_CHECK_CLOSE(v.second, expected[i].second, 1.0e-10); + ++i; + } + } - auto& s = start.back(); + // Local I-2 tracer concentration. + { + const auto conc = fwd.fd.concentration(CellSetID("I-2")); + std::vector> expected = { {2, 0.5}, {3, 1.0}, {4, 0.5}, {5, 0.5} }; + BOOST_REQUIRE_EQUAL(conc.size(), expected.size()); + + int i = 0; + for (const auto& v : conc) { + BOOST_TEST_MESSAGE("Conc[" << v.first << "] = " << v.second); + BOOST_CHECK_EQUAL(v.first, expected[i].first); + BOOST_CHECK_CLOSE(v.second, expected[i].second, 1.0e-10); + ++i; + } + } - s.identify(CellSetID("I-2")); - s.insert(cas.connectivity().numCells() - 1); + // Local I-2 tof. + { + const auto tof = fwd.fd.timeOfFlight(CellSetID("I-2")); + std::vector> expected = { {2, 2.5}, {3, 1.0}, {4, 1.5}, {5, 2.0} }; + BOOST_REQUIRE_EQUAL(tof.size(), expected.size()); + + int i = 0; + for (const auto& v : tof) { + BOOST_TEST_MESSAGE("ToF[" << v.first << "] = " << v.second); + BOOST_CHECK_EQUAL(v.first, expected[i].first); + BOOST_CHECK_CLOSE(v.second, expected[i].second, 1.0e-10); + ++i; + } } - const auto fwd = diagTool.computeInjectionDiagnostics(start); - const auto rev = diagTool.computeProductionDiagnostics(start); +} + + + +// Arrows indicate a flux of 0.3, O is a source of 0.3 +// and X is a sink of 0.3 (each cell has a pore volume of 0.3). +// ---------------------------- +// | | | | +// | O -> O -> XX | +// | "I-1" | "I-2" -> "P-1" | +// | | | | +// ---------------------------- +// Cell indices: +// ---------------------------- +// | | | | +// | | | | +// | 0 | 1 | 2 | +// | | | | +// ---------------------------- +// Expected global injection TOF: +// ---------------------------- +// | | | | +// | | | | +// | 1.0 | 1.0 | 1.5 | +// | | | | +// ---------------------------- +// Expected global production TOF: +// ---------------------------- +// | | | | +// | | | | +// | 2.0 | 1.0 | 0.5 | +// | | | | +// ---------------------------- +// Expected local tracer I-1: +// ---------------------------- +// | | | | +// | | | | +// | 1.0 | 0.5 | 0.5 | +// | | | | +// ---------------------------- +// Expected local tracer I-2: +// ---------------------------- +// | | | | +// | | | | +// | 0.0 | 0.5 | 0.5 | +// | | | | +// ---------------------------- +// Expected local tof I-1: +// ---------------------------- +// | | | | +// | | | | +// | 1.0 | 1.5 | 2.0 | +// | | | | +// ---------------------------- +// Expected local tof I-2: +// ---------------------------- +// | | | | +// | | | | +// | | 0.5 | 1.0 | +// | | | | +// ---------------------------- +BOOST_AUTO_TEST_CASE (LocalSolutionsWithMidflowSource) +{ + BOOST_TEST_MESSAGE("============== Test: LocalSolutionsWithMidflowSource =============="); + using namespace Opm::FlowDiagnostics; + const auto cas = Setup(3, 1); + const auto& graph = cas.connectivity(); + + // Create fluxes. + ConnectionValues flux(ConnectionValues::NumConnections{ graph.numConnections() }, + ConnectionValues::NumPhases { 1 }); + const size_t nconn = cas.connectivity().numConnections(); + for (size_t conn = 0; conn < nconn; ++conn) { + BOOST_TEST_MESSAGE("Connection " << conn << " connects cells " + << graph.connection(conn).first << " and " + << graph.connection(conn).second); + } + using C = ConnectionValues::ConnID; + using P = ConnectionValues::PhaseID; + flux(C{0}, P{0}) = 0.3; + flux(C{1}, P{0}) = 0.6; + + // Create well in/out flows. + CellSetValues wellflow = { {0, 0.3}, {1, 0.3}, {2, -0.6} }; + + Toolbox diagTool(graph); + diagTool.assignPoreVolume(cas.poreVolume()); + diagTool.assignConnectionFlux(flux); + diagTool.assignInflowFlux(wellflow); + + auto injstart = std::vector{ CellSet(CellSetID("I-1"), {0}), + CellSet(CellSetID("I-2"), {1}) }; + auto prdstart = std::vector{ CellSet(CellSetID("P-1"), {2}) }; + + const auto fwd = diagTool.computeInjectionDiagnostics(injstart); + const auto rev = diagTool.computeProductionDiagnostics(prdstart); // Global ToF field (accumulated from all injectors) { + BOOST_TEST_MESSAGE("== Global injector ToF"); const auto tof = fwd.fd.timeOfFlight(); - BOOST_REQUIRE_EQUAL(tof.size(), cas.connectivity().numCells()); - std::vector expected = { 0.5, 1.5, 2.5, 3.5, 0.0 }; + std::vector expected = { 1.0, 1.0, 1.5 }; check_is_close(tof, expected); } // Global ToF field (accumulated from all producers) { + BOOST_TEST_MESSAGE("== Global producer ToF"); const auto tof = rev.fd.timeOfFlight(); - BOOST_REQUIRE_EQUAL(tof.size(), cas.connectivity().numCells()); - std::vector expected = { 0.0, 3.5, 2.5, 1.5, 0.5 }; + std::vector expected = { 2.0, 1.0, 0.5 }; check_is_close(tof, expected); } // Verify set of start points. { - const auto startpts = fwd.fd.startPoints(); - - BOOST_CHECK_EQUAL(startpts.size(), start.size()); - - for (const auto& pt : startpts) { - auto pos = - std::find_if(start.begin(), start.end(), - [&pt](const CellSet& s) - { - return s.id().to_string() == pt.to_string(); - }); - - // ID of 'pt' *MUST* be in set of identified start points. - BOOST_CHECK(pos != start.end()); + using VCS = std::vector; + using VCSI = std::vector; + using P = std::pair; + std::vector

pairs { P{ injstart, fwd.fd.startPoints() }, P{ prdstart, rev.fd.startPoints() } }; + for (const auto& p : pairs) { + const auto& s1 = p.first; + const auto& s2 = p.second; + BOOST_CHECK_EQUAL(s1.size(), s2.size()); + for (const auto& pt : s2) { + // ID of 'pt' *MUST* be in set of identified start points. + auto pos = std::find_if(s1.begin(), s1.end(), + [&pt](const CellSet& s) + { + return s.id().to_string() == pt.to_string(); + }); + BOOST_CHECK(pos != s1.end()); + } } } - // Tracer-ToF + // Local I-1 tracer concentration. { - const auto tof = fwd.fd - .timeOfFlight(CellSetID("I-2")); - - for (decltype(tof.cellValueCount()) - i = 0, n = tof.cellValueCount(); - i < n; ++i) - { - const auto v = tof.cellValue(i); - - BOOST_TEST_MESSAGE("[" << i << "] -> ToF[" - << v.first << "] = " - << v.second); + BOOST_TEST_MESSAGE("== I-1 tracer"); + const auto conc = fwd.fd.concentration(CellSetID("I-1")); + std::vector> expected = { {0, 1.0}, {1, 0.5}, {2, 0.5} }; + BOOST_REQUIRE_EQUAL(conc.size(), expected.size()); + + int i = 0; + for (const auto& v : conc) { + BOOST_TEST_MESSAGE("Conc[" << v.first << "] = " << v.second); + BOOST_CHECK_EQUAL(v.first, expected[i].first); + BOOST_CHECK_CLOSE(v.second, expected[i].second, 1.0e-10); + ++i; } } - // Tracer Concentration + // Local I-1 tof. { - const auto conc = fwd.fd - .concentration(CellSetID("I-2")); - - BOOST_TEST_MESSAGE("conc.cellValueCount() = " << - conc.cellValueCount()); + BOOST_TEST_MESSAGE("== I-1 tof"); + const auto tof = fwd.fd.timeOfFlight(CellSetID("I-1")); + std::vector> expected = { {0, 1.0}, {1, 1.5}, {2, 2.0} }; + BOOST_REQUIRE_EQUAL(tof.size(), expected.size()); + + int i = 0; + for (const auto& v : tof) { + BOOST_TEST_MESSAGE("ToF[" << v.first << "] = " << v.second); + BOOST_CHECK_EQUAL(v.first, expected[i].first); + BOOST_CHECK_CLOSE(v.second, expected[i].second, 1.0e-10); + ++i; + } + } - for (decltype(conc.cellValueCount()) - i = 0, n = conc.cellValueCount(); - i < n; ++i) - { - const auto v = conc.cellValue(i); + // Local I-2 tracer concentration. + { + BOOST_TEST_MESSAGE("== I-2 tracer"); + const auto conc = fwd.fd.concentration(CellSetID("I-2")); + std::vector> expected = { {1, 0.5}, {2, 0.5} }; + BOOST_REQUIRE_EQUAL(conc.size(), expected.size()); + + int i = 0; + for (const auto& v : conc) { + BOOST_TEST_MESSAGE("Conc[" << v.first << "] = " << v.second); + BOOST_CHECK_EQUAL(v.first, expected[i].first); + BOOST_CHECK_CLOSE(v.second, expected[i].second, 1.0e-10); + ++i; + } + } - BOOST_TEST_MESSAGE("[" << i << "] -> Conc[" - << v.first << "] = " - << v.second); + // Local I-2 tof. + { + BOOST_TEST_MESSAGE("== I-2 tof"); + const auto tof = fwd.fd.timeOfFlight(CellSetID("I-2")); + std::vector> expected = { {1, 0.5}, {2, 1.0} }; + BOOST_REQUIRE_EQUAL(tof.size(), expected.size()); + + int i = 0; + for (const auto& v : tof) { + BOOST_TEST_MESSAGE("ToF[" << v.first << "] = " << v.second); + BOOST_CHECK_EQUAL(v.first, expected[i].first); + BOOST_CHECK_CLOSE(v.second, expected[i].second, 1.0e-10); + ++i; } } } + + BOOST_AUTO_TEST_SUITE_END() diff --git a/ThirdParty/custom-opm-parser/CMakeLists.txt b/ThirdParty/custom-opm-parser/CMakeLists.txt deleted file mode 100644 index 9eccc59c89..0000000000 --- a/ThirdParty/custom-opm-parser/CMakeLists.txt +++ /dev/null @@ -1,36 +0,0 @@ -cmake_minimum_required (VERSION 2.8) - -# -DBOOST_FILESYSTEM_VERSION=3 -DBOOST_TEST_DYN_LINK -DHAVE_CASE_SENSITIVE_FILESYSTEM=1 -DHAVE_REGEX=1 -DOPM_PARSER_DECK_API=1 -Wall -std=c++11 -fopenmp -Wall -g -O0 -DDEBUG -ggdb3 - - if(MSVC) - add_definitions( "/W3 /D_CRT_SECURE_NO_WARNINGS /wd4996 /wd4244 /wd4267" ) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") -else() - #always set these flags to make opm-parser compile on Linux - SET( CMAKE_CXX_FLAGS "-pipe -std=c++0x -pedantic -Wall -Wextra -Wformat-nonliteral -Wcast-align -Wpointer-arith -Wmissing-declarations -Wcast-qual -Wshadow -Wwrite-strings -Wchar-subscripts -Wredundant-decls") - - SET( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} -O0 -DDEBUG -ggdb3") - SET( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} -O3 -DNDEBUG -mtune=native") -endif(MSVC) - -project (custom-opm-parser) - -include_directories( - ${Boost_INCLUDE_DIRS} - ${ERT_INCLUDE_DIRS} -) - -include_directories( - opm-parser - generated-source/include -) - -# TODO: opm-parser should hold a cmake file with source code files only -#include(opm-parser/CMakeLists_files.cmake) -include ( CMakeLists_files.cmake ) - -add_library(${PROJECT_NAME} - STATIC - ${opm_parser_source_files} -) - diff --git a/ThirdParty/custom-opm-parser/CMakeLists_files.cmake b/ThirdParty/custom-opm-parser/CMakeLists_files.cmake deleted file mode 100644 index 44eb6da7d0..0000000000 --- a/ThirdParty/custom-opm-parser/CMakeLists_files.cmake +++ /dev/null @@ -1,304 +0,0 @@ -# -# All the source files in the opm-parser project -# - -set( rawdeck_source -RawDeck/StarToken.cpp -RawDeck/RawKeyword.cpp -RawDeck/RawRecord.cpp ) - -set( unit_source -Units/UnitSystem.cpp -Units/Dimension.cpp) - -set( deck_source -Deck/Deck.cpp -Deck/DeckKeyword.cpp -Deck/DeckRecord.cpp -Deck/DeckItem.cpp -Deck/Section.cpp -) - -set( parser_source -Parser/ParseContext.cpp -Parser/MessageContainer.cpp -Parser/ParserEnums.cpp -Parser/ParserKeyword.cpp -Parser/Parser.cpp -Parser/ParserRecord.cpp -Parser/ParserItem.cpp -Parser/ParserIntItem.cpp -Parser/ParserDoubleItem.cpp -Parser/ParserStringItem.cpp -) - -set( generator_source -Generator/KeywordGenerator.cpp -Generator/KeywordLoader.cpp ) - -set( build_parser_source -Parser/ParseContext.cpp -Parser/MessageContainer.cpp -Parser/ParserEnums.cpp -Parser/ParserKeyword.cpp -Parser/ParserRecord.cpp -Parser/ParserItem.cpp -Parser/ParserIntItem.cpp -Parser/ParserDoubleItem.cpp -Parser/ParserStringItem.cpp -${generator_source} -) - -set (state_source -EclipseState/EclipseState.cpp -EclipseState/EclipseConfig.cpp -EclipseState/Eclipse3DProperties.cpp -EclipseState/Messages.cpp -# -EclipseState/checkDeck.cpp -# -EclipseState/Schedule/OilVaporizationProperties.cpp -EclipseState/Schedule/TimeMap.cpp -EclipseState/Schedule/Schedule.cpp -EclipseState/Schedule/Well.cpp -EclipseState/Schedule/WellProductionProperties.cpp -EclipseState/Schedule/WellInjectionProperties.cpp -EclipseState/Schedule/WellPolymerProperties.cpp -EclipseState/Schedule/WellEconProductionLimits.cpp -EclipseState/Schedule/MSW/Segment.cpp -EclipseState/Schedule/MSW/SegmentSet.cpp -EclipseState/Schedule/MSW/Compsegs.cpp -EclipseState/Schedule/WellSet.cpp -EclipseState/Schedule/Group.cpp -EclipseState/Schedule/Completion.cpp -EclipseState/Schedule/CompletionSet.cpp -EclipseState/Schedule/ScheduleEnums.cpp -EclipseState/Schedule/GroupTreeNode.cpp -EclipseState/Schedule/GroupTree.cpp -EclipseState/Schedule/Tuning.cpp -EclipseState/Schedule/Events.cpp -# -EclipseState/Tables/SimpleTable.cpp -EclipseState/Tables/VFPProdTable.cpp -EclipseState/Tables/VFPInjTable.cpp -EclipseState/Tables/TableManager.cpp -EclipseState/Tables/TableContainer.cpp -EclipseState/Tables/TableColumn.cpp -EclipseState/Tables/ColumnSchema.cpp -EclipseState/Tables/TableSchema.cpp -EclipseState/Tables/TableIndex.cpp -EclipseState/Tables/PvtxTable.cpp -EclipseState/Tables/Tables.cpp -# -EclipseState/Grid/SatfuncPropertyInitializers.cpp -EclipseState/Grid/GridDims.cpp -EclipseState/Grid/GridProperty.cpp -EclipseState/Grid/GridProperties.cpp -EclipseState/Grid/Box.cpp -EclipseState/Grid/BoxManager.cpp -EclipseState/Grid/FaceDir.cpp -EclipseState/Grid/TransMult.cpp -EclipseState/Grid/MULTREGTScanner.cpp -EclipseState/Grid/EclipseGrid.cpp -EclipseState/Grid/FaultFace.cpp -EclipseState/Grid/Fault.cpp -EclipseState/Grid/FaultCollection.cpp -EclipseState/Grid/NNC.cpp -EclipseState/Grid/PinchMode.cpp -# -EclipseState/InitConfig/InitConfig.cpp -EclipseState/InitConfig/Equil.cpp -EclipseState/SimulationConfig/SimulationConfig.cpp -EclipseState/SimulationConfig/ThresholdPressure.cpp -EclipseState/SummaryConfig/SummaryConfig.cpp -EclipseState/IOConfig/RestartConfig.cpp -EclipseState/IOConfig/IOConfig.cpp) -# - -set( utility_source -Utility/Functional.cpp -Utility/Stringview.cpp -) - -set( HEADER_FILES -RawDeck/RawConsts.hpp -RawDeck/RawKeyword.hpp -RawDeck/RawRecord.hpp -RawDeck/StarToken.hpp -RawDeck/RawEnums.hpp -# -Deck/Deck.hpp -Deck/DeckKeyword.hpp -Deck/DeckRecord.hpp -Deck/DeckItem.hpp -Deck/Section.hpp -# -Parser/ParserEnums.hpp -Parser/ParserKeyword.hpp -Parser/Parser.hpp -Parser/ParserRecord.hpp -Parser/ParserItem.hpp -Parser/ParserIntItem.hpp -Parser/ParserDoubleItem.hpp -Parser/ParserStringItem.hpp -Parser/InputErrorAction.hpp -Parser/ParseContext.hpp -Parser/MessageContainer.hpp -# -Generator/KeywordLoader.hpp -Generator/KeywordGenerator.hpp -# -Units/UnitSystem.hpp -Units/Dimension.hpp -Units/ConversionFactors.hpp -# -EclipseState/EclipseState.hpp -EclipseState/EclipseConfig.hpp -EclipseState/Eclipse3DProperties.hpp -EclipseState/Messages.hpp -# -EclipseState/checkDeck.hpp -# -EclipseState/Schedule/OilVaporizationProperties.hpp -EclipseState/Schedule/TimeMap.hpp -EclipseState/Schedule/Schedule.hpp -EclipseState/Schedule/Well.hpp -EclipseState/Schedule/WellProductionProperties.hpp -EclipseState/Schedule/WellInjectionProperties.hpp -EclipseState/Schedule/WellPolymerProperties.hpp -EclipseState/Schedule/WellEconProductionLimits.hpp -EclipseState/Schedule/MSW/Segment.hpp -EclipseState/Schedule/MSW/SegmentSet.hpp -EclipseState/Schedule/MSW/Compsegs.hpp -EclipseState/Schedule/WellSet.hpp -EclipseState/Schedule/Group.hpp -EclipseState/Schedule/DynamicState.hpp -EclipseState/Schedule/DynamicVector.hpp -EclipseState/Schedule/Completion.hpp -EclipseState/Schedule/CompletionSet.hpp -EclipseState/Schedule/ScheduleEnums.hpp -EclipseState/Schedule/GroupTreeNode.hpp -EclipseState/Schedule/GroupTree.hpp -EclipseState/Schedule/Tuning.hpp -EclipseState/Schedule/Events.hpp -# -EclipseState/Util/RecordVector.hpp -EclipseState/Util/OrderedMap.hpp -EclipseState/Util/Value.hpp -# -EclipseState/Grid/Box.hpp -EclipseState/Grid/BoxManager.hpp -EclipseState/Grid/EclipseGrid.hpp -EclipseState/Grid/FaceDir.hpp -EclipseState/Grid/FaultCollection.hpp -EclipseState/Grid/FaultFace.hpp -EclipseState/Grid/Fault.hpp -EclipseState/Grid/GridDims.hpp -EclipseState/Grid/GridProperties.hpp -EclipseState/Grid/GridProperty.hpp -EclipseState/Grid/MinpvMode.hpp -EclipseState/Grid/MULTREGTScanner.hpp -EclipseState/Grid/NNC.hpp -EclipseState/Grid/PinchMode.hpp -EclipseState/Grid/SatfuncPropertyInitializers.hpp -EclipseState/Grid/TransMult.hpp -# -EclipseState/InitConfig/InitConfig.hpp -EclipseState/InitConfig/Equil.hpp -EclipseState/SimulationConfig/SimulationConfig.hpp -EclipseState/SimulationConfig/ThresholdPressure.hpp -EclipseState/SummaryConfig/SummaryConfig.hpp -EclipseState/IOConfig/RestartConfig.hpp -EclipseState/IOConfig/IOConfig.hpp -# -EclipseState/Tables/Tabdims.hpp -EclipseState/Tables/Eqldims.hpp -EclipseState/Tables/Regdims.hpp -EclipseState/Tables/PlyadsTable.hpp -EclipseState/Tables/PvtoTable.hpp -EclipseState/Tables/RocktabTable.hpp -EclipseState/Tables/PvdoTable.hpp -EclipseState/Tables/PvdgTable.hpp -EclipseState/Tables/PvdsTable.hpp -EclipseState/Tables/SimpleTable.hpp -EclipseState/Tables/PlymaxTable.hpp -EclipseState/Tables/PlyrockTable.hpp -EclipseState/Tables/SwofTable.hpp -EclipseState/Tables/SgwfnTable.hpp -EclipseState/Tables/SwfnTable.hpp -EclipseState/Tables/SgfnTable.hpp -EclipseState/Tables/SsfnTable.hpp -EclipseState/Tables/Sof2Table.hpp -EclipseState/Tables/Sof3Table.hpp -EclipseState/Tables/EnptvdTable.hpp -EclipseState/Tables/PlyviscTable.hpp -EclipseState/Tables/PlydhflfTable.hpp -EclipseState/Tables/PlyshlogTable.hpp -EclipseState/Tables/EnkrvdTable.hpp -EclipseState/Tables/ImkrvdTable.hpp -EclipseState/Tables/SgofTable.hpp -EclipseState/Tables/SlgofTable.hpp -EclipseState/Tables/PvtxTable.hpp -EclipseState/Tables/ImptvdTable.hpp -EclipseState/Tables/RsvdTable.hpp -EclipseState/Tables/RvvdTable.hpp -EclipseState/Tables/RtempvdTable.hpp -EclipseState/Tables/OilvisctTable.hpp -EclipseState/Tables/GasvisctTable.hpp -EclipseState/Tables/WatvisctTable.hpp -EclipseState/Tables/PvtgTable.hpp -EclipseState/Tables/VFPProdTable.hpp -EclipseState/Tables/VFPInjTable.hpp -EclipseState/Tables/TableManager.hpp -EclipseState/Tables/TableContainer.hpp -EclipseState/Tables/SorwmisTable.hpp -EclipseState/Tables/SgcwmisTable.hpp -EclipseState/Tables/MiscTable.hpp -EclipseState/Tables/PmiscTable.hpp -EclipseState/Tables/TlpmixpaTable.hpp -EclipseState/Tables/MsfnTable.hpp -EclipseState/Tables/TableColumn.hpp -EclipseState/Tables/ColumnSchema.hpp -EclipseState/Tables/TableEnums.hpp -EclipseState/Tables/TableSchema.hpp -EclipseState/Tables/TableIndex.hpp -# -Utility/Functional.hpp -Utility/Stringview.hpp) - -set(opm_parser_generated_source_files - generated-source/ParserKeywords.cpp - generated-source/ParserKeywords0.cpp - generated-source/ParserKeywords1.cpp - generated-source/ParserKeywords2.cpp - generated-source/ParserKeywords3.cpp -) - -# JSON files included directly, not as a separate lib as in original build configuration -set (json_source - opm-parser/opm/json/JsonObject.cpp - opm-parser/opm/json/cjson/cJSON.c -) - -# Assemble all the files and add path as needed - -set(opm_parser_source_files_short_path - ${generated_source} - ${state_source} - ${rawdeck_source} - ${parser_source} - ${deck_source} - ${unit_source} - ${generator_source} - ${utility_source} -) - -foreach (file ${opm_parser_source_files_short_path} ) - list(APPEND opm_parser_source_files_long_path "opm-parser/opm/parser/eclipse/${file}" ) -endforeach() - -set(opm_parser_source_files - ${opm_parser_source_files_long_path} - ${json_source} - ${opm_parser_generated_source_files} -) diff --git a/ThirdParty/custom-opm-parser/custom-opm-parser-tests/CMakeLists.txt b/ThirdParty/custom-opm-parser/custom-opm-parser-tests/CMakeLists.txt deleted file mode 100644 index 5a0622ee72..0000000000 --- a/ThirdParty/custom-opm-parser/custom-opm-parser-tests/CMakeLists.txt +++ /dev/null @@ -1,37 +0,0 @@ -cmake_minimum_required (VERSION 2.8) - - -project ( opm-parser-tests ) - -include_directories ( - ${CMAKE_CURRENT_SOURCE_DIR}/../.. - ${CMAKE_CURRENT_SOURCE_DIR}/../opm-parser - - ${CMAKE_CURRENT_SOURCE_DIR}/../../custom-opm-common/opm-common - - ${ERT_INCLUDE_DIRS} - - ${Boost_INCLUDE_DIRS} -) - -set( PROJECT_FILES - - opm-parser_UnitTests.cpp - ../../gtest/gtest-all.cc - - opm-parser-BasicTest.cpp -) - -# add the executable -add_executable (${PROJECT_NAME} - ${PROJECT_FILES} -) - -source_group("" FILES ${PROJECT_FILES}) - -target_link_libraries ( ${PROJECT_NAME} - custom-opm-parser - ${ERT_LIBRARIES} - ${Boost_LIBRARIES} -) - diff --git a/ThirdParty/custom-opm-parser/custom-opm-parser-tests/opm-parser-BasicTest.cpp b/ThirdParty/custom-opm-parser/custom-opm-parser-tests/opm-parser-BasicTest.cpp deleted file mode 100644 index cda5973279..0000000000 --- a/ThirdParty/custom-opm-parser/custom-opm-parser-tests/opm-parser-BasicTest.cpp +++ /dev/null @@ -1,132 +0,0 @@ - -#include "gtest/gtest.h" - -#include "opm/parser/eclipse/Parser/Parser.hpp" - - -using namespace Opm; - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -TEST(OpmParserTest, ReadFromFile) -{ - - - - // Several filenames taken from Models/Statoil folder - - /* - std::string filename = "d:/Models/MRST/simple/SIMPLE.DATA"; - std::string filename = "d:/gitroot/opm-data/spe1/SPE1CASE1.DATA"; - std::string filename = "d:/gitroot-magnesj/opm-parser/testdata/cases_with_issues/testcase_juli_2011/TEST10K_FLT_LGR_NNC.DATA"; - std::string filename = "d:/gitroot-magnesj/opm-parser/testdata/cases_with_issues/testcase_juli_2011/TEST10K_FLT_LGR_NNC.DATA"; - */ - std::string filename = "d:/Models/Statoil/Brillig/BRILLIG.DATA"; - - /* - std::string filename = "d:/Models/Statoil/1.2.0_Osesyd_segfault/BASEPRED6.DATA"; - std::string filename = "d:/Models/Statoil/1.3.0_fault_assert_binary/BV-R2-11-0.DATA"; - std::string filename = "d:/Models/Statoil/Brillig/BRILLIG_FMTOUT.DATA"; - std::string filename = "d:/Models/Statoil/ceetron-case.tar/ceetron-case.tar"; - std::string filename = "d:/Models/Statoil/ceetron-case/.#R5_22X22_H25_C1_SW2_FV1.DATA"; - std::string filename = "d:/Models/Statoil/ceetron-case/R5_22X22_H25_C1_SW2_FV1.DATA"; - std::string filename = "d:/Models/Statoil/CO2_well_rst_error/E300_THERMAL_23_RS.DATA"; - std::string filename = "d:/Models/Statoil/E300_thermal_option/DualProperty/DUALPERM.DATA"; - std::string filename = "d:/Models/Statoil/E300_thermal_option/DualProperty/DUALPORO.DATA"; - std::string filename = "d:/Models/Statoil/HD_TEST/HD_TEST.DATA"; - std::string filename = "d:/Models/Statoil/HM_10/HM_10.DATA"; - std::string filename = "d:/Models/Statoil/LGC_TESTCASE2/LGC_TESTCASE2.DATA"; - std::string filename = "d:/Models/Statoil/MAGNE_DUALK2PORO_DPNUMz/DUALK2PORO_DPNUM.DATA"; - std::string filename = "d:/Models/Statoil/missingCorner_TP4093/TRAINING_FIXED_MOVE_INJ1.DATA"; - std::string filename = "d:/Models/Statoil/nnc_faults/TEST10K_FLT_LGR_NNC0P03_FAULTS1P0.DATA"; - std::string filename = "d:/Models/Statoil/NNCsDisconnected/TEST10K_FLT_LGR_NNC0P03_LGRNNC0P02_FAULTS0P1.DATA"; - std::string filename = "d:/Models/Statoil/NNCsDisconnected/TEST10K_FLT_LGR_NNC0P03_NNC0P02_FAULTS0P1.DATA"; - std::string filename = "d:/Models/Statoil/RegressionTests/1NotRun/TestCase_10K_MultipleTimestepsSameDay/TEST10K_FLT_LGR_NNC_TSTEP.DATA"; - std::string filename = "d:/Models/Statoil/RegressionTests/1NotRun/TestCase_10K_SingleTStep/TEST10K_FLT_LGR_NNC_TSTEP.DATA"; - std::string filename = "d:/Models/Statoil/RegressionTests/1NotRun/TestCase_DualPerm/DUALPERM.DATA"; - std::string filename = "d:/Models/Statoil/RegressionTests/1NotRun/TestCase_DualPoro/DUALPORO.DATA"; - std::string filename = "d:/Models/Statoil/RegressionTests/1NotRun/TestCase_Large_FirstLargeCase/R5_22X22_H25_C1_SW2_FV1.DATA"; - std::string filename = "d:/Models/Statoil/RegressionTests/1NotRun/TestCase_LGC/LGC_TESTCASE2.DATA"; - std::string filename = "d:/Models/Statoil/RegressionTests/1NotRun/TestCase_LGR_Amalg/TESTCASE_AMALG_LGR.DATA"; - std::string filename = "d:/Models/Statoil/RegressionTests/1NotRun/TestCase_Wells_HM_10/HM_10.DATA"; - std::string filename = "d:/Models/Statoil/RegressionTests/TestCase_10K_Complete/TEST10K_FLT_LGR_NNC.DATA"; - std::string filename = "d:/Models/Statoil/RegressionTests/tmp/TestCase_MultiRestartFile_CO2_well_rst_error/E300_THERMAL_23_RS.DATA"; - std::string filename = "d:/Models/Statoil/SmbS_ffm/REF161213.DATA"; - std::string filename = "d:/Models/Statoil/TEST_RKMFAULTS/TEST_RKMFAULTS.DATA"; - std::string filename = "d:/Models/Statoil/TEST10K_FLT_LGR_NNC_TSTEP/TEST10K_FLT_LGR_NNC_TSTEP.DATA"; - std::string filename = "d:/Models/Statoil/TestCase_10K_MultipleTimestepsSameDay/TEST10K_FLT_LGR_NNC_TSTEP.DATA"; - std::string filename = "d:/Models/Statoil/testcase_amalg_lgr/TESTCASE_AMALG_LGR.DATA"; - std::string filename = "d:/Models/Statoil/testcase_juli_2011/data/TEST10K_FLT_LGR_NNC.DATA"; - std::string filename = "d:/Models/Statoil/trainint_fixed_move/TRAINING_FIXED_MOVE_INJ1.DATA"; - std::string filename = "d:/Models/Statoil/troll_Ref2014/T07-4A-W2014-06.DATA"; - */ - - // GRDECL files - //std::string filename = "d:/Models/Statoil/no_map_axis/geocell.grdecl"; - - - //ParseContext parseContext; - //parseContext.update(InputError::WARN); - - // parseContext.update(ParseContext::PARSE_RANDOM_SLASH, InputError::IGNORE); - //parseContext.update(ParseContext::PARSE_UNKNOWN_KEYWORD, InputError::IGNORE); - - ParseContext parseContext; - Parser parser; - - parseContext.update(ParseContext::PARSE_UNKNOWN_KEYWORD, InputError::WARN); - parseContext.update(ParseContext::PARSE_RANDOM_SLASH, InputError::WARN); - parseContext.update(ParseContext::PARSE_RANDOM_TEXT, InputError::WARN); - parseContext.update(ParseContext::PARSE_MISSING_INCLUDE, InputError::WARN); - - //parseContext.update(ParseContext::PARSE_UNKNOWN_KEYWORD, InputError::IGNORE); - //parser.parseString(deck, parseContext); - //BOOST_CHECK_NO_THROW(parser.parseString(deck, parseContext)); - -/* - Opm::ParserPtr parser(new Opm::Parser()); - parser->parseString(deck, parseContext); - - Opm::DeckConstPtr deck = parser->parseFile(filename, parseContext); - - Opm::EclipseState es(deck, parseContext); - auto ep = es.get3DProperties(); - auto grid = es.getInputGrid(); -*/ - - - const auto deck = parser.parseFile(filename, parseContext); - const auto grid = Parser::parseGrid(*deck); - - /* - { - std::string inline_json = "{\"key\": \"value\"}"; - Json::JsonObject parser(inline_json); - parser.has_item("key"); - parser.has_item("keyX"); - } - - { - ParserStringItemPtr itemString(new ParserStringItem(std::string("STRINGITEM1"))); - ParserRecordPtr record1(new ParserRecord()); - RawRecord rawRecord(" ' VALUE ' "); - ParseContext parseContext; - record1->addItem(itemString); - //BOOST_CHECK_EQUAL(" VALUE ", deckRecord.getItem(0).get< std::string >(0)); - } - - */ - { - const auto* input_deck = "RUNSPEC\n\n" - "TITLE\n\n" - "DIMENS\n10 10 10/\n" - "EQLDIMS\n/\n"; - - Parser parser; - const auto deck = parser.newDeckFromString(input_deck, ParseContext()); - //BOOST_CHECK_EQUAL("untitled", deck->getKeyword("TITLE").getStringData().front()); - - } -} diff --git a/ThirdParty/custom-opm-parser/custom-opm-parser-tests/opm-parser_UnitTests.cpp b/ThirdParty/custom-opm-parser/custom-opm-parser-tests/opm-parser_UnitTests.cpp deleted file mode 100644 index be0fb9328d..0000000000 --- a/ThirdParty/custom-opm-parser/custom-opm-parser-tests/opm-parser_UnitTests.cpp +++ /dev/null @@ -1,20 +0,0 @@ - - -#include "gtest/gtest.h" -#include -#include -#include - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -int main(int argc, char **argv) -{ - testing::InitGoogleTest(&argc, argv); - int result = RUN_ALL_TESTS(); - - char text[5]; - std::cin.getline(text, 5); - - return result; -} diff --git a/ThirdParty/custom-opm-parser/generated-source/ParserKeywords.cpp b/ThirdParty/custom-opm-parser/generated-source/ParserKeywords.cpp deleted file mode 100644 index e27b025f17..0000000000 --- a/ThirdParty/custom-opm-parser/generated-source/ParserKeywords.cpp +++ /dev/null @@ -1,14457 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - - -namespace Opm { -namespace ParserKeywords { - -ACTDIMS::ACTDIMS( ) : ParserKeyword("ACTDIMS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("ACTDIMS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("MAX_ACTION",Opm::SINGLE,2)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_ACTION_LINES",Opm::SINGLE,50)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_ACTION_LINE_CHARACTERS",Opm::SINGLE,80)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_ACTION_COND",Opm::SINGLE,3)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string ACTDIMS::keywordName = "ACTDIMS"; -const std::string ACTDIMS::MAX_ACTION::itemName = "MAX_ACTION"; -const int ACTDIMS::MAX_ACTION::defaultValue = 2; -const std::string ACTDIMS::MAX_ACTION_LINES::itemName = "MAX_ACTION_LINES"; -const int ACTDIMS::MAX_ACTION_LINES::defaultValue = 50; -const std::string ACTDIMS::MAX_ACTION_LINE_CHARACTERS::itemName = "MAX_ACTION_LINE_CHARACTERS"; -const int ACTDIMS::MAX_ACTION_LINE_CHARACTERS::defaultValue = 80; -const std::string ACTDIMS::MAX_ACTION_COND::itemName = "MAX_ACTION_COND"; -const int ACTDIMS::MAX_ACTION_COND::defaultValue = 3; - - -ACTNUM::ACTNUM( ) : ParserKeyword("ACTNUM") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("ACTNUM"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("data",Opm::ALL)); - item->setDescription(""); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string ACTNUM::keywordName = "ACTNUM"; -const std::string ACTNUM::data::itemName = "data"; - - -ADD::ADD( ) : ParserKeyword("ADD") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - addValidSectionName("GRID"); - addValidSectionName("PROPS"); - addValidSectionName("REGIONS"); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("ADD"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("field",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("shift",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string ADD::keywordName = "ADD"; -const std::string ADD::field::itemName = "field"; -const std::string ADD::shift::itemName = "shift"; -const std::string ADD::I1::itemName = "I1"; -const std::string ADD::I2::itemName = "I2"; -const std::string ADD::J1::itemName = "J1"; -const std::string ADD::J2::itemName = "J2"; -const std::string ADD::K1::itemName = "K1"; -const std::string ADD::K2::itemName = "K2"; - - -ADDREG::ADDREG( ) : ParserKeyword("ADDREG") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - addValidSectionName("GRID"); - addValidSectionName("PROPS"); - addValidSectionName("REGIONS"); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("ADDREG"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("ARRAY",Opm::SINGLE)); - item->setDescription("The 3D array we will update"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("SHIFT",Opm::SINGLE,0)); - item->setDescription("The value we will multiply with"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("REGION_NUMBER",Opm::SINGLE)); - item->setDescription("The region number we are interested in"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("REGION_NAME",Opm::SINGLE,"M")); - item->setDescription("The name of the region we are interested in"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string ADDREG::keywordName = "ADDREG"; -const std::string ADDREG::ARRAY::itemName = "ARRAY"; -const std::string ADDREG::SHIFT::itemName = "SHIFT"; -const double ADDREG::SHIFT::defaultValue = 0; -const std::string ADDREG::REGION_NUMBER::itemName = "REGION_NUMBER"; -const std::string ADDREG::REGION_NAME::itemName = "REGION_NAME"; -const std::string ADDREG::REGION_NAME::defaultValue = "M"; - - -ADSALNOD::ADSALNOD( ) : ParserKeyword("ADSALNOD") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTSFUN"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("ADSALNOD"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Density"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string ADSALNOD::keywordName = "ADSALNOD"; -const std::string ADSALNOD::DATA::itemName = "DATA"; - - -ALL::ALL( ) : ParserKeyword("ALL") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("ALL"); -} -const std::string ALL::keywordName = "ALL"; - - -API::API( ) : ParserKeyword("API") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("API"); -} -const std::string API::keywordName = "API"; - - -AQUANCON::AQUANCON( ) : ParserKeyword("AQUANCON") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("AQUANCON"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("AQUIFER_ID",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("FACE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("INFLUX_COEFF",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Length*Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("INFLUX_MULT",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("CONNECT_ADJOINING_ACTIVE_CELL",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string AQUANCON::keywordName = "AQUANCON"; -const std::string AQUANCON::AQUIFER_ID::itemName = "AQUIFER_ID"; -const std::string AQUANCON::I1::itemName = "I1"; -const std::string AQUANCON::I2::itemName = "I2"; -const std::string AQUANCON::J1::itemName = "J1"; -const std::string AQUANCON::J2::itemName = "J2"; -const std::string AQUANCON::K1::itemName = "K1"; -const std::string AQUANCON::K2::itemName = "K2"; -const std::string AQUANCON::FACE::itemName = "FACE"; -const std::string AQUANCON::INFLUX_COEFF::itemName = "INFLUX_COEFF"; -const std::string AQUANCON::INFLUX_MULT::itemName = "INFLUX_MULT"; -const std::string AQUANCON::CONNECT_ADJOINING_ACTIVE_CELL::itemName = "CONNECT_ADJOINING_ACTIVE_CELL"; - - -AQUCON::AQUCON( ) : ParserKeyword("AQUCON") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("AQUCON"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("ID",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("CONNECT_FACE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("TRANS_MULT",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("TRANS_OPTION",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("ALLOW_INTERNAL_CELLS",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("VEFRAC",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("VEFRACP",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string AQUCON::keywordName = "AQUCON"; -const std::string AQUCON::ID::itemName = "ID"; -const std::string AQUCON::I1::itemName = "I1"; -const std::string AQUCON::I2::itemName = "I2"; -const std::string AQUCON::J1::itemName = "J1"; -const std::string AQUCON::J2::itemName = "J2"; -const std::string AQUCON::K1::itemName = "K1"; -const std::string AQUCON::K2::itemName = "K2"; -const std::string AQUCON::CONNECT_FACE::itemName = "CONNECT_FACE"; -const std::string AQUCON::TRANS_MULT::itemName = "TRANS_MULT"; -const std::string AQUCON::TRANS_OPTION::itemName = "TRANS_OPTION"; -const std::string AQUCON::ALLOW_INTERNAL_CELLS::itemName = "ALLOW_INTERNAL_CELLS"; -const std::string AQUCON::VEFRAC::itemName = "VEFRAC"; -const std::string AQUCON::VEFRACP::itemName = "VEFRACP"; - - -AQUDIMS::AQUDIMS( ) : ParserKeyword("AQUDIMS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("AQUDIMS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("MXNAQN",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MXNAQC",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NIFTBL",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NRIFTB",Opm::SINGLE,36)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NANAQU",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NCAMAX",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MXNALI",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MXAAQL",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string AQUDIMS::keywordName = "AQUDIMS"; -const std::string AQUDIMS::MXNAQN::itemName = "MXNAQN"; -const int AQUDIMS::MXNAQN::defaultValue = 1; -const std::string AQUDIMS::MXNAQC::itemName = "MXNAQC"; -const int AQUDIMS::MXNAQC::defaultValue = 1; -const std::string AQUDIMS::NIFTBL::itemName = "NIFTBL"; -const int AQUDIMS::NIFTBL::defaultValue = 1; -const std::string AQUDIMS::NRIFTB::itemName = "NRIFTB"; -const int AQUDIMS::NRIFTB::defaultValue = 36; -const std::string AQUDIMS::NANAQU::itemName = "NANAQU"; -const int AQUDIMS::NANAQU::defaultValue = 1; -const std::string AQUDIMS::NCAMAX::itemName = "NCAMAX"; -const int AQUDIMS::NCAMAX::defaultValue = 1; -const std::string AQUDIMS::MXNALI::itemName = "MXNALI"; -const int AQUDIMS::MXNALI::defaultValue = 0; -const std::string AQUDIMS::MXAAQL::itemName = "MXAAQL"; -const int AQUDIMS::MXAAQL::defaultValue = 0; - - -AQUFETP::AQUFETP( ) : ParserKeyword("AQUFETP") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("AQUDIMS","NANAQU"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("AQUFETP"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("ID",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("DATUM_DEPTH",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("P0",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("V0",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Length*Length*Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("COMPRESSIBILITY",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("1/Pressure"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("PI",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("ReservoirVolume/Pressure*Time"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("WATER_TABLE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("SALINITY",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Salinity"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("TEMP",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string AQUFETP::keywordName = "AQUFETP"; -const std::string AQUFETP::ID::itemName = "ID"; -const std::string AQUFETP::DATUM_DEPTH::itemName = "DATUM_DEPTH"; -const std::string AQUFETP::P0::itemName = "P0"; -const std::string AQUFETP::V0::itemName = "V0"; -const std::string AQUFETP::COMPRESSIBILITY::itemName = "COMPRESSIBILITY"; -const std::string AQUFETP::PI::itemName = "PI"; -const std::string AQUFETP::WATER_TABLE::itemName = "WATER_TABLE"; -const std::string AQUFETP::SALINITY::itemName = "SALINITY"; -const std::string AQUFETP::TEMP::itemName = "TEMP"; - - -AQUIFER_PROBE_ANALYTIC::AQUIFER_PROBE_ANALYTIC( ) : ParserKeyword("AQUIFER_PROBE_ANALYTIC") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SUMMARY"); - clearDeckNames(); - setMatchRegex("AA.+"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("data",Opm::ALL)); - item->setDescription(""); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string AQUIFER_PROBE_ANALYTIC::keywordName = "AQUIFER_PROBE_ANALYTIC"; -const std::string AQUIFER_PROBE_ANALYTIC::data::itemName = "data"; - - -AQUNUM::AQUNUM( ) : ParserKeyword("AQUNUM") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("AQUNUM"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("AQUIFER_ID",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("CROSS_SECTION",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Length*Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("LENGTH",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("PORO",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("1"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("PERM",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Permeability"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("DEPTH",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("INITIAL_PRESSURE",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("PVT_TABLE_NUM",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("SAT_TABLE_NUM",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string AQUNUM::keywordName = "AQUNUM"; -const std::string AQUNUM::AQUIFER_ID::itemName = "AQUIFER_ID"; -const std::string AQUNUM::I::itemName = "I"; -const std::string AQUNUM::J::itemName = "J"; -const std::string AQUNUM::K::itemName = "K"; -const std::string AQUNUM::CROSS_SECTION::itemName = "CROSS_SECTION"; -const std::string AQUNUM::LENGTH::itemName = "LENGTH"; -const std::string AQUNUM::PORO::itemName = "PORO"; -const std::string AQUNUM::PERM::itemName = "PERM"; -const std::string AQUNUM::DEPTH::itemName = "DEPTH"; -const std::string AQUNUM::INITIAL_PRESSURE::itemName = "INITIAL_PRESSURE"; -const std::string AQUNUM::PVT_TABLE_NUM::itemName = "PVT_TABLE_NUM"; -const std::string AQUNUM::SAT_TABLE_NUM::itemName = "SAT_TABLE_NUM"; - - -BLOCK_PROBE::BLOCK_PROBE( ) : ParserKeyword("BLOCK_PROBE") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("BAPI"); - addDeckName("BCGC"); - addDeckName("BCSC"); - addDeckName("BCTRA_X"); - addDeckName("BDENG"); - addDeckName("BDENO"); - addDeckName("BDENW"); - addDeckName("BESALPLY"); - addDeckName("BESALSUR"); - addDeckName("BEWV_SAL"); - addDeckName("BEWV_SUR"); - addDeckName("BFLOGI"); - addDeckName("BFLOGJ"); - addDeckName("BFLOGK"); - addDeckName("BFLOOI"); - addDeckName("BFLOOJ"); - addDeckName("BFLOOK"); - addDeckName("BFLOWI"); - addDeckName("BGDEN"); - addDeckName("BGI"); - addDeckName("BGIP"); - addDeckName("BGIPG"); - addDeckName("BGIPL"); - addDeckName("BGKR"); - addDeckName("BGPC"); - addDeckName("BGPR"); - addDeckName("BGPV"); - addDeckName("BGSAT"); - addDeckName("BGSHY"); - addDeckName("BGSTRP"); - addDeckName("BGTPD"); - addDeckName("BGTRP"); - addDeckName("BGVIS"); - addDeckName("BHD"); - addDeckName("BHDF"); - addDeckName("BHDF_X"); - addDeckName("BHD_X"); - addDeckName("BHPV"); - addDeckName("BKRG"); - addDeckName("BKRO"); - addDeckName("BKRW"); - addDeckName("BNIP"); - addDeckName("BNKR"); - addDeckName("BNSAT"); - addDeckName("BODEN"); - addDeckName("BOIP"); - addDeckName("BOIPG"); - addDeckName("BOIPL"); - addDeckName("BOKR"); - addDeckName("BOPV"); - addDeckName("BOSAT"); - addDeckName("BOVIS"); - addDeckName("BPBUB"); - addDeckName("BPDEW"); - addDeckName("BPERMMOD"); - addDeckName("BPORVMOD"); - addDeckName("BPPC"); - addDeckName("BPPG"); - addDeckName("BPPO"); - addDeckName("BPPW"); - addDeckName("BPR"); - addDeckName("BPR_X"); - addDeckName("BRPV"); - addDeckName("BRS"); - addDeckName("BRSSAT"); - addDeckName("BRTM"); - addDeckName("BRV"); - addDeckName("BRVSAT"); - addDeckName("BSCN"); - addDeckName("BSCN_X"); - addDeckName("BSGAS"); - addDeckName("BSIP"); - addDeckName("BSOIL"); - addDeckName("BSTATE"); - addDeckName("BSWAT"); - addDeckName("BTADSALK"); - addDeckName("BTADSFOA"); - addDeckName("BTADSUR"); - addDeckName("BTCASUR"); - addDeckName("BTCNFALK"); - addDeckName("BTCNFANI"); - addDeckName("BTCNFCAT"); - addDeckName("BTCNFFOA"); - addDeckName("BTCNFHEA"); - addDeckName("BTCNFSUR"); - addDeckName("BTCNMFOA"); - addDeckName("BTDCYFOA"); - addDeckName("BTHLFFOA"); - addDeckName("BTIPTFOA"); - addDeckName("BTIPTHEA"); - addDeckName("BTIPTSUR"); - addDeckName("BTMOBFOA"); - addDeckName("BTPADALK"); - addDeckName("BTRADCAT"); - addDeckName("BTSADALK"); - addDeckName("BTSADCAT"); - addDeckName("BTSTMALK"); - addDeckName("BTSTSUR"); - addDeckName("BVELGI"); - addDeckName("BVELGJ"); - addDeckName("BVELGK"); - addDeckName("BVELOI"); - addDeckName("BVELOJ"); - addDeckName("BVELOK"); - addDeckName("BVELWI"); - addDeckName("BVELWJ"); - addDeckName("BVELWK"); - addDeckName("BVGAS"); - addDeckName("BVOIL"); - addDeckName("BVWAT"); - addDeckName("BWDEN"); - addDeckName("BWIP"); - addDeckName("BWKR"); - addDeckName("BWPC"); - addDeckName("BWPR"); - addDeckName("BWPV"); - addDeckName("BWSAT"); - addDeckName("BWSHY"); - addDeckName("BWSMA"); - addDeckName("BWVIS"); - addDeckName("LBCTRA_X"); - addDeckName("LBHDF_X"); - addDeckName("LBHD_X"); - addDeckName("LBPR_X"); - addDeckName("LBSCN_X"); - setMatchRegex("BU.+|BTIPF.+|BTIPS.+|BTCNF.+|BTCNS.+|BTCN[1-9][0-9]*.+|BTIPT.+|BTIPF.+|BTIPS.+|BTIP[1-9][0-9]*.+|BTADS.+|BTDCY"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("I",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string BLOCK_PROBE::keywordName = "BLOCK_PROBE"; -const std::string BLOCK_PROBE::I::itemName = "I"; -const std::string BLOCK_PROBE::J::itemName = "J"; -const std::string BLOCK_PROBE::K::itemName = "K"; - - -BLOCK_PROBE300::BLOCK_PROBE300( ) : ParserKeyword("BLOCK_PROBE300") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("BTEMP"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("I",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string BLOCK_PROBE300::keywordName = "BLOCK_PROBE300"; -const std::string BLOCK_PROBE300::I::itemName = "I"; -const std::string BLOCK_PROBE300::J::itemName = "J"; -const std::string BLOCK_PROBE300::K::itemName = "K"; - - -BOX::BOX( ) : ParserKeyword("BOX") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - addValidSectionName("GRID"); - addValidSectionName("PROPS"); - addValidSectionName("REGIONS"); - addValidSectionName("SCHEDULE"); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("BOX"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("I1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string BOX::keywordName = "BOX"; -const std::string BOX::I1::itemName = "I1"; -const std::string BOX::I2::itemName = "I2"; -const std::string BOX::J1::itemName = "J1"; -const std::string BOX::J2::itemName = "J2"; -const std::string BOX::K1::itemName = "K1"; -const std::string BOX::K2::itemName = "K2"; - - -COMPDAT::COMPDAT( ) : ParserKeyword("COMPDAT") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("COMPDAT"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("WELL",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("STATE",Opm::SINGLE,"OPEN")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("SAT_TABLE",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("CONNECTION_TRANSMISSIBILITY_FACTOR",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Viscosity*ReservoirVolume/Time*Pressure"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("DIAMETER",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("Kh",Opm::SINGLE,-1)); - item->setDescription(""); - item->push_backDimension("Permeability*Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("SKIN",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("1"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("D_FACTOR",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("1"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("DIR",Opm::SINGLE,"Z")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("PR",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string COMPDAT::keywordName = "COMPDAT"; -const std::string COMPDAT::WELL::itemName = "WELL"; -const std::string COMPDAT::I::itemName = "I"; -const int COMPDAT::I::defaultValue = 0; -const std::string COMPDAT::J::itemName = "J"; -const int COMPDAT::J::defaultValue = 0; -const std::string COMPDAT::K1::itemName = "K1"; -const std::string COMPDAT::K2::itemName = "K2"; -const std::string COMPDAT::STATE::itemName = "STATE"; -const std::string COMPDAT::STATE::defaultValue = "OPEN"; -const std::string COMPDAT::SAT_TABLE::itemName = "SAT_TABLE"; -const int COMPDAT::SAT_TABLE::defaultValue = 0; -const std::string COMPDAT::CONNECTION_TRANSMISSIBILITY_FACTOR::itemName = "CONNECTION_TRANSMISSIBILITY_FACTOR"; -const std::string COMPDAT::DIAMETER::itemName = "DIAMETER"; -const std::string COMPDAT::Kh::itemName = "Kh"; -const double COMPDAT::Kh::defaultValue = -1; -const std::string COMPDAT::SKIN::itemName = "SKIN"; -const double COMPDAT::SKIN::defaultValue = 0; -const std::string COMPDAT::D_FACTOR::itemName = "D_FACTOR"; -const std::string COMPDAT::DIR::itemName = "DIR"; -const std::string COMPDAT::DIR::defaultValue = "Z"; -const std::string COMPDAT::PR::itemName = "PR"; - - -COMPLUMP::COMPLUMP( ) : ParserKeyword("COMPLUMP") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("COMPLUMP"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("WELL",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("N",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string COMPLUMP::keywordName = "COMPLUMP"; -const std::string COMPLUMP::WELL::itemName = "WELL"; -const std::string COMPLUMP::I::itemName = "I"; -const std::string COMPLUMP::J::itemName = "J"; -const std::string COMPLUMP::K1::itemName = "K1"; -const std::string COMPLUMP::K2::itemName = "K2"; -const std::string COMPLUMP::N::itemName = "N"; - - -COMPORD::COMPORD( ) : ParserKeyword("COMPORD") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("COMPORD"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("WELL",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("ORDER_TYPE",Opm::SINGLE,"TRACK")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string COMPORD::keywordName = "COMPORD"; -const std::string COMPORD::WELL::itemName = "WELL"; -const std::string COMPORD::ORDER_TYPE::itemName = "ORDER_TYPE"; -const std::string COMPORD::ORDER_TYPE::defaultValue = "TRACK"; - - -COMPS::COMPS( ) : ParserKeyword("COMPS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("COMPS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("NUM_COMPS",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string COMPS::keywordName = "COMPS"; -const std::string COMPS::NUM_COMPS::itemName = "NUM_COMPS"; - - -COMPSEGS::COMPSEGS( ) : ParserKeyword("COMPSEGS") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("COMPSEGS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("WELL",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("I",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("BRANCH",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("DISTANCE_START",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("DISTANCE_END",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("DIRECTION",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("END_IJK",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("CENTER_DEPTH",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("THERMAL_LENGTH",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("SEGMENT_NUMBER",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string COMPSEGS::keywordName = "COMPSEGS"; -const std::string COMPSEGS::WELL::itemName = "WELL"; -const std::string COMPSEGS::I::itemName = "I"; -const std::string COMPSEGS::J::itemName = "J"; -const std::string COMPSEGS::K::itemName = "K"; -const std::string COMPSEGS::BRANCH::itemName = "BRANCH"; -const std::string COMPSEGS::DISTANCE_START::itemName = "DISTANCE_START"; -const std::string COMPSEGS::DISTANCE_END::itemName = "DISTANCE_END"; -const std::string COMPSEGS::DIRECTION::itemName = "DIRECTION"; -const std::string COMPSEGS::END_IJK::itemName = "END_IJK"; -const std::string COMPSEGS::CENTER_DEPTH::itemName = "CENTER_DEPTH"; -const double COMPSEGS::CENTER_DEPTH::defaultValue = 0; -const std::string COMPSEGS::THERMAL_LENGTH::itemName = "THERMAL_LENGTH"; -const std::string COMPSEGS::SEGMENT_NUMBER::itemName = "SEGMENT_NUMBER"; - - -CONNECTION_PROBE::CONNECTION_PROBE( ) : ParserKeyword("CONNECTION_PROBE") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("CAPI"); - addDeckName("CCFR"); - addDeckName("CCIC"); - addDeckName("CCIT"); - addDeckName("CCPC"); - addDeckName("CCPT"); - addDeckName("CDBF"); - addDeckName("CDFAC"); - addDeckName("CDSF"); - addDeckName("CDSM"); - addDeckName("CDSML"); - addDeckName("CGFR"); - addDeckName("CGFRF"); - addDeckName("CGFRL"); - addDeckName("CGFRS"); - addDeckName("CGFRU"); - addDeckName("CGIR"); - addDeckName("CGIRL"); - addDeckName("CGIT"); - addDeckName("CGITL"); - addDeckName("CGLR"); - addDeckName("CGLRL"); - addDeckName("CGOR"); - addDeckName("CGORL"); - addDeckName("CGPI"); - addDeckName("CGPP"); - addDeckName("CGPR"); - addDeckName("CGPRL"); - addDeckName("CGPT"); - addDeckName("CGPTF"); - addDeckName("CGPTL"); - addDeckName("CGPTS"); - addDeckName("CGQ"); - addDeckName("CLFR"); - addDeckName("CLFRL"); - addDeckName("CLPT"); - addDeckName("CLPTL"); - addDeckName("CNFR"); - addDeckName("CNIT"); - addDeckName("CNPT"); - addDeckName("COFR"); - addDeckName("COFRF"); - addDeckName("COFRL"); - addDeckName("COFRS"); - addDeckName("COFRU"); - addDeckName("COGR"); - addDeckName("COGRL"); - addDeckName("COIT"); - addDeckName("COITL"); - addDeckName("COPI"); - addDeckName("COPP"); - addDeckName("COPR"); - addDeckName("COPRL"); - addDeckName("COPT"); - addDeckName("COPTF"); - addDeckName("COPTL"); - addDeckName("COPTS"); - addDeckName("CPI"); - addDeckName("CSFR"); - addDeckName("CSIC"); - addDeckName("CSIR"); - addDeckName("CSIT"); - addDeckName("CSPC"); - addDeckName("CSPR"); - addDeckName("CSPT"); - addDeckName("CTFAC"); - addDeckName("CTFRALK"); - addDeckName("CTFRANI"); - addDeckName("CTFRCAT"); - addDeckName("CTFRFOA"); - addDeckName("CTFRSUR"); - addDeckName("CTITALK"); - addDeckName("CTITANI"); - addDeckName("CTITCAT"); - addDeckName("CTITFOA"); - addDeckName("CTITSUR"); - addDeckName("CTPTALK"); - addDeckName("CTPTANI"); - addDeckName("CTPTCAT"); - addDeckName("CTPTFOA"); - addDeckName("CTPTSUR"); - addDeckName("CVFR"); - addDeckName("CVFRL"); - addDeckName("CVIR"); - addDeckName("CVIRL"); - addDeckName("CVIT"); - addDeckName("CVITL"); - addDeckName("CVPT"); - addDeckName("CVPTL"); - addDeckName("CWCT"); - addDeckName("CWCTL"); - addDeckName("CWFR"); - addDeckName("CWFRL"); - addDeckName("CWFRU"); - addDeckName("CWGR"); - addDeckName("CWGRL"); - addDeckName("CWIR"); - addDeckName("CWIRL"); - addDeckName("CWIT"); - addDeckName("CWITL"); - addDeckName("CWPI"); - addDeckName("CWPP"); - addDeckName("CWPR"); - addDeckName("CWPRL"); - addDeckName("CWPT"); - addDeckName("CWPTL"); - addDeckName("LCGFRU"); - addDeckName("LCOFRU"); - addDeckName("LCWFRU"); - setMatchRegex("CU.+|CTFR.+|CTPR.+|CTPT.+|CTPC.+|CTIR.+|CTIT.+|CTIC.+|CTFR.+|CTPR.+|CTPT.+|CTPC.+|CTIR.+|CTIT.+|CTIC.+|CTIRF.+|CTIRS.+|CTPRF.+|CTPRS.+|CTITF.+|CTITS.+|CTPTF.+|CTPTS.+|CTICF.+|CTICS.+|CTPCF.+|CTPCS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("WELL",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string CONNECTION_PROBE::keywordName = "CONNECTION_PROBE"; -const std::string CONNECTION_PROBE::WELL::itemName = "WELL"; -const std::string CONNECTION_PROBE::I::itemName = "I"; -const std::string CONNECTION_PROBE::J::itemName = "J"; -const std::string CONNECTION_PROBE::K::itemName = "K"; - - -COORD::COORD( ) : ParserKeyword("COORD") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("COORD"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string COORD::keywordName = "COORD"; -const std::string COORD::data::itemName = "data"; - - -COPY::COPY( ) : ParserKeyword("COPY") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - addValidSectionName("GRID"); - addValidSectionName("PROPS"); - addValidSectionName("REGIONS"); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("COPY"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("src",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("target",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string COPY::keywordName = "COPY"; -const std::string COPY::src::itemName = "src"; -const std::string COPY::target::itemName = "target"; -const std::string COPY::I1::itemName = "I1"; -const std::string COPY::I2::itemName = "I2"; -const std::string COPY::J1::itemName = "J1"; -const std::string COPY::J2::itemName = "J2"; -const std::string COPY::K1::itemName = "K1"; -const std::string COPY::K2::itemName = "K2"; - - -COPYREG::COPYREG( ) : ParserKeyword("COPYREG") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - addValidSectionName("GRID"); - addValidSectionName("PROPS"); - addValidSectionName("REGIONS"); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("COPYREG"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("ARRAY",Opm::SINGLE)); - item->setDescription("The 3D array we will update"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("TARGET_ARRAY",Opm::SINGLE)); - item->setDescription("The name of the array which will be set"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("REGION_NUMBER",Opm::SINGLE)); - item->setDescription("The region number we are interested in"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("REGION_NAME",Opm::SINGLE,"M")); - item->setDescription("The name of the region we are interested in"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string COPYREG::keywordName = "COPYREG"; -const std::string COPYREG::ARRAY::itemName = "ARRAY"; -const std::string COPYREG::TARGET_ARRAY::itemName = "TARGET_ARRAY"; -const std::string COPYREG::REGION_NUMBER::itemName = "REGION_NUMBER"; -const std::string COPYREG::REGION_NAME::itemName = "REGION_NAME"; -const std::string COPYREG::REGION_NAME::defaultValue = "M"; - - -CPR::CPR( ) : ParserKeyword("CPR") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("CPR"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("WELL",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string CPR::keywordName = "CPR"; -const std::string CPR::WELL::itemName = "WELL"; -const std::string CPR::I::itemName = "I"; -const std::string CPR::J::itemName = "J"; -const std::string CPR::K::itemName = "K"; - - -CREF::CREF( ) : ParserKeyword("CREF") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NUM_STATE_EQ"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("CREF"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("COMPRESSIBILITY",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1/Pressure"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string CREF::keywordName = "CREF"; -const std::string CREF::COMPRESSIBILITY::itemName = "COMPRESSIBILITY"; - - -CREFS::CREFS( ) : ParserKeyword("CREFS") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NUM_STATE_EQ"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("CREFS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("COMPRESSIBILITY",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1/Pressure"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string CREFS::keywordName = "CREFS"; -const std::string CREFS::COMPRESSIBILITY::itemName = "COMPRESSIBILITY"; - - -DATE::DATE( ) : ParserKeyword("DATE") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("DATE"); -} -const std::string DATE::keywordName = "DATE"; - - -DATES::DATES( ) : ParserKeyword("DATES") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("DATES"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("DAY",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("MONTH",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("YEAR",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("TIME",Opm::SINGLE,"00:00:00.000")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string DATES::keywordName = "DATES"; -const std::string DATES::DAY::itemName = "DAY"; -const std::string DATES::MONTH::itemName = "MONTH"; -const std::string DATES::YEAR::itemName = "YEAR"; -const std::string DATES::TIME::itemName = "TIME"; -const std::string DATES::TIME::defaultValue = "00:00:00.000"; - - -DATUM::DATUM( ) : ParserKeyword("DATUM") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("DATUM"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DEPTH",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string DATUM::keywordName = "DATUM"; -const std::string DATUM::DEPTH::itemName = "DEPTH"; - - -DENSITY::DENSITY( ) : ParserKeyword("DENSITY") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTPVT"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("DENSITY"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("OIL",Opm::SINGLE,600)); - item->setDescription(""); - item->push_backDimension("Density"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("WATER",Opm::SINGLE,999.01400000000001)); - item->setDescription(""); - item->push_backDimension("Density"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("GAS",Opm::SINGLE,1)); - item->setDescription(""); - item->push_backDimension("Density"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string DENSITY::keywordName = "DENSITY"; -const std::string DENSITY::OIL::itemName = "OIL"; -const double DENSITY::OIL::defaultValue = 600; -const std::string DENSITY::WATER::itemName = "WATER"; -const double DENSITY::WATER::defaultValue = 999.014; -const std::string DENSITY::GAS::itemName = "GAS"; -const double DENSITY::GAS::defaultValue = 1; - - -DEPTH::DEPTH( ) : ParserKeyword("DEPTH") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - clearDeckNames(); - addDeckName("DEPTH"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string DEPTH::keywordName = "DEPTH"; -const std::string DEPTH::data::itemName = "data"; - - -DEPTHZ::DEPTHZ( ) : ParserKeyword("DEPTHZ") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("DEPTHZ"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string DEPTHZ::keywordName = "DEPTHZ"; -const std::string DEPTHZ::data::itemName = "data"; - - -DIMENS::DIMENS( ) : ParserKeyword("DIMENS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("DIMENS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("NX",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NY",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NZ",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string DIMENS::keywordName = "DIMENS"; -const std::string DIMENS::NX::itemName = "NX"; -const std::string DIMENS::NY::itemName = "NY"; -const std::string DIMENS::NZ::itemName = "NZ"; - - -DISGAS::DISGAS( ) : ParserKeyword("DISGAS") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("DISGAS"); -} -const std::string DISGAS::keywordName = "DISGAS"; - - -DREF::DREF( ) : ParserKeyword("DREF") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NUM_STATE_EQ"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("DREF"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DENSITY",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Density"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string DREF::keywordName = "DREF"; -const std::string DREF::DENSITY::itemName = "DENSITY"; - - -DREFS::DREFS( ) : ParserKeyword("DREFS") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NUM_STATE_EQ"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("DREFS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DENSITY",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Density"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string DREFS::keywordName = "DREFS"; -const std::string DREFS::DENSITY::itemName = "DENSITY"; - - -DRSDT::DRSDT( ) : ParserKeyword("DRSDT") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("DRSDT"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DRSDT_MAX",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("GasDissolutionFactor/Time"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("Option",Opm::SINGLE,"ALL")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string DRSDT::keywordName = "DRSDT"; -const std::string DRSDT::DRSDT_MAX::itemName = "DRSDT_MAX"; -const std::string DRSDT::Option::itemName = "Option"; -const std::string DRSDT::Option::defaultValue = "ALL"; - - -DRVDT::DRVDT( ) : ParserKeyword("DRVDT") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("DRVDT"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DRVDT_MAX",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("OilDissolutionFactor/Time"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string DRVDT::keywordName = "DRVDT"; -const std::string DRVDT::DRVDT_MAX::itemName = "DRVDT_MAX"; - - -DUMPFLUX::DUMPFLUX( ) : ParserKeyword("DUMPFLUX") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("DUMPFLUX"); -} -const std::string DUMPFLUX::keywordName = "DUMPFLUX"; - - -DX::DX( ) : ParserKeyword("DX") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("DX"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string DX::keywordName = "DX"; -const std::string DX::data::itemName = "data"; - - -DXV::DXV( ) : ParserKeyword("DXV") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("DXV"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string DXV::keywordName = "DXV"; -const std::string DXV::data::itemName = "data"; - - -DY::DY( ) : ParserKeyword("DY") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("DY"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string DY::keywordName = "DY"; -const std::string DY::data::itemName = "data"; - - -DYV::DYV( ) : ParserKeyword("DYV") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("DYV"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string DYV::keywordName = "DYV"; -const std::string DYV::data::itemName = "data"; - - -DZ::DZ( ) : ParserKeyword("DZ") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("DZ"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string DZ::keywordName = "DZ"; -const std::string DZ::data::itemName = "data"; - - -DZV::DZV( ) : ParserKeyword("DZV") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("DZV"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string DZV::keywordName = "DZV"; -const std::string DZV::data::itemName = "data"; - - -ECHO::ECHO( ) : ParserKeyword("ECHO") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - addValidSectionName("GRID"); - addValidSectionName("PROPS"); - addValidSectionName("REGIONS"); - addValidSectionName("RUNSPEC"); - addValidSectionName("SCHEDULE"); - addValidSectionName("SOLUTION"); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("ECHO"); -} -const std::string ECHO::keywordName = "ECHO"; - - -EDIT::EDIT( ) : ParserKeyword("EDIT") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - clearDeckNames(); - addDeckName("EDIT"); -} -const std::string EDIT::keywordName = "EDIT"; - - -EDITNNC::EDITNNC( ) : ParserKeyword("EDITNNC") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - clearDeckNames(); - addDeckName("EDITNNC"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("I1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("TRAN_MULT",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("SAT_TABLE12",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("SAT_TABLE21",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("PRESS_TABLE12",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("PRESS_TABLE21",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("FACE_FLOW12",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("FACE_FLOW21",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("DIFFM",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string EDITNNC::keywordName = "EDITNNC"; -const std::string EDITNNC::I1::itemName = "I1"; -const std::string EDITNNC::J1::itemName = "J1"; -const std::string EDITNNC::K1::itemName = "K1"; -const std::string EDITNNC::I2::itemName = "I2"; -const std::string EDITNNC::J2::itemName = "J2"; -const std::string EDITNNC::K2::itemName = "K2"; -const std::string EDITNNC::TRAN_MULT::itemName = "TRAN_MULT"; -const std::string EDITNNC::SAT_TABLE12::itemName = "SAT_TABLE12"; -const std::string EDITNNC::SAT_TABLE21::itemName = "SAT_TABLE21"; -const std::string EDITNNC::PRESS_TABLE12::itemName = "PRESS_TABLE12"; -const std::string EDITNNC::PRESS_TABLE21::itemName = "PRESS_TABLE21"; -const std::string EDITNNC::FACE_FLOW12::itemName = "FACE_FLOW12"; -const std::string EDITNNC::FACE_FLOW21::itemName = "FACE_FLOW21"; -const std::string EDITNNC::DIFFM::itemName = "DIFFM"; - - -EHYSTR::EHYSTR( ) : ParserKeyword("EHYSTR") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("EHYSTR"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("curvature_caplillary_pressure_hyst",Opm::SINGLE,0.10000000000000001)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("relative_perm_hyst",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("curvature_param_killough_wetting",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("mod_param_trapped",Opm::SINGLE,0.10000000000000001)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("limiting_hyst_flag",Opm::SINGLE,"BOTH")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("shape_cap_press_flag",Opm::SINGLE,"RETR")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("init_fluid_mob_flag",Opm::SINGLE,"DRAIN")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("wetting_phase_flag",Opm::SINGLE,"OIL")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("baker_flag_oil",Opm::SINGLE,"NO")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("baker_flag_gas",Opm::SINGLE,"NO")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("baker_flag_water",Opm::SINGLE,"NO")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("threshold_saturation",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string EHYSTR::keywordName = "EHYSTR"; -const std::string EHYSTR::curvature_caplillary_pressure_hyst::itemName = "curvature_caplillary_pressure_hyst"; -const double EHYSTR::curvature_caplillary_pressure_hyst::defaultValue = 0.1; -const std::string EHYSTR::relative_perm_hyst::itemName = "relative_perm_hyst"; -const int EHYSTR::relative_perm_hyst::defaultValue = 0; -const std::string EHYSTR::curvature_param_killough_wetting::itemName = "curvature_param_killough_wetting"; -const double EHYSTR::curvature_param_killough_wetting::defaultValue = 1; -const std::string EHYSTR::mod_param_trapped::itemName = "mod_param_trapped"; -const double EHYSTR::mod_param_trapped::defaultValue = 0.1; -const std::string EHYSTR::limiting_hyst_flag::itemName = "limiting_hyst_flag"; -const std::string EHYSTR::limiting_hyst_flag::defaultValue = "BOTH"; -const std::string EHYSTR::shape_cap_press_flag::itemName = "shape_cap_press_flag"; -const std::string EHYSTR::shape_cap_press_flag::defaultValue = "RETR"; -const std::string EHYSTR::init_fluid_mob_flag::itemName = "init_fluid_mob_flag"; -const std::string EHYSTR::init_fluid_mob_flag::defaultValue = "DRAIN"; -const std::string EHYSTR::wetting_phase_flag::itemName = "wetting_phase_flag"; -const std::string EHYSTR::wetting_phase_flag::defaultValue = "OIL"; -const std::string EHYSTR::baker_flag_oil::itemName = "baker_flag_oil"; -const std::string EHYSTR::baker_flag_oil::defaultValue = "NO"; -const std::string EHYSTR::baker_flag_gas::itemName = "baker_flag_gas"; -const std::string EHYSTR::baker_flag_gas::defaultValue = "NO"; -const std::string EHYSTR::baker_flag_water::itemName = "baker_flag_water"; -const std::string EHYSTR::baker_flag_water::defaultValue = "NO"; -const std::string EHYSTR::threshold_saturation::itemName = "threshold_saturation"; -const double EHYSTR::threshold_saturation::defaultValue = 0; - - -END::END( ) : ParserKeyword("END") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - addValidSectionName("GRID"); - addValidSectionName("PROPS"); - addValidSectionName("REGIONS"); - addValidSectionName("RUNSPEC"); - addValidSectionName("SCHEDULE"); - addValidSectionName("SOLUTION"); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("END"); -} -const std::string END::keywordName = "END"; - - -ENDBOX::ENDBOX( ) : ParserKeyword("ENDBOX") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - addValidSectionName("GRID"); - addValidSectionName("PROPS"); - addValidSectionName("REGIONS"); - addValidSectionName("SCHEDULE"); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("ENDBOX"); -} -const std::string ENDBOX::keywordName = "ENDBOX"; - - -ENDINC::ENDINC( ) : ParserKeyword("ENDINC") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - addValidSectionName("GRID"); - addValidSectionName("PROPS"); - addValidSectionName("REGIONS"); - addValidSectionName("RUNSPEC"); - addValidSectionName("SCHEDULE"); - addValidSectionName("SOLUTION"); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("ENDINC"); -} -const std::string ENDINC::keywordName = "ENDINC"; - - -ENDNUM::ENDNUM( ) : ParserKeyword("ENDNUM") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("REGIONS"); - clearDeckNames(); - addDeckName("ENDNUM"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("data",Opm::ALL)); - item->setDescription(""); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string ENDNUM::keywordName = "ENDNUM"; -const std::string ENDNUM::data::itemName = "data"; - - -ENDPOINT_SPECIFIERS::ENDPOINT_SPECIFIERS( ) : ParserKeyword("ENDPOINT_SPECIFIERS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("IKRG"); - addDeckName("IKRGR"); - addDeckName("IKRGRX"); - addDeckName("IKRGRX-"); - addDeckName("IKRGRY"); - addDeckName("IKRGRY-"); - addDeckName("IKRGRZ"); - addDeckName("IKRGRZ-"); - addDeckName("IKRGX"); - addDeckName("IKRGX-"); - addDeckName("IKRGY"); - addDeckName("IKRGY-"); - addDeckName("IKRGZ"); - addDeckName("IKRGZ-"); - addDeckName("IKRO"); - addDeckName("IKRORG"); - addDeckName("IKRORGX"); - addDeckName("IKRORGX-"); - addDeckName("IKRORGY"); - addDeckName("IKRORGY-"); - addDeckName("IKRORGZ"); - addDeckName("IKRORGZ-"); - addDeckName("IKRORW"); - addDeckName("IKRORWX"); - addDeckName("IKRORWX-"); - addDeckName("IKRORWY"); - addDeckName("IKRORWY-"); - addDeckName("IKRORWZ"); - addDeckName("IKRORWZ-"); - addDeckName("IKROX-"); - addDeckName("IKROY-"); - addDeckName("IKROZ-"); - addDeckName("IKRW"); - addDeckName("IKRWR"); - addDeckName("IKRWRX"); - addDeckName("IKRWRX-"); - addDeckName("IKRWRY"); - addDeckName("IKRWRY-"); - addDeckName("IKRWRZ"); - addDeckName("IKRWRZ-"); - addDeckName("IKRWX"); - addDeckName("IKRWX-"); - addDeckName("IKRWY"); - addDeckName("IKRWY-"); - addDeckName("IKRWZ"); - addDeckName("IKRWZ-"); - addDeckName("ISGCR"); - addDeckName("ISGCRX"); - addDeckName("ISGCRX-"); - addDeckName("ISGCRY"); - addDeckName("ISGCRY-"); - addDeckName("ISGCRZ"); - addDeckName("ISGCRZ-"); - addDeckName("ISGU"); - addDeckName("ISGUX"); - addDeckName("ISGUX-"); - addDeckName("ISGUY"); - addDeckName("ISGUY-"); - addDeckName("ISGUZ"); - addDeckName("ISGUZ-"); - addDeckName("ISOGCR"); - addDeckName("ISOGCRX"); - addDeckName("ISOGCRX-"); - addDeckName("ISOGCRY"); - addDeckName("ISOGCRY-"); - addDeckName("ISOGCRZ"); - addDeckName("ISOGCRZ-"); - addDeckName("ISOWCR"); - addDeckName("ISOWCRX"); - addDeckName("ISOWCRX-"); - addDeckName("ISOWCRY"); - addDeckName("ISOWCRY-"); - addDeckName("ISOWCRZ"); - addDeckName("ISOWCRZ-"); - addDeckName("ISWCR"); - addDeckName("ISWCRX"); - addDeckName("ISWCRX-"); - addDeckName("ISWCRZ"); - addDeckName("ISWCRZ-"); - addDeckName("ISWL"); - addDeckName("ISWLX"); - addDeckName("ISWLX-"); - addDeckName("ISWLY"); - addDeckName("ISWLY-"); - addDeckName("ISWLZ"); - addDeckName("ISWLZ-"); - addDeckName("ISWU"); - addDeckName("ISWUX"); - addDeckName("ISWUX-"); - addDeckName("ISWUY"); - addDeckName("ISWUY-"); - addDeckName("ISWUZ"); - addDeckName("ISWUZ-"); - addDeckName("KRG"); - addDeckName("KRGR"); - addDeckName("KRGRX"); - addDeckName("KRGRX-"); - addDeckName("KRGRY"); - addDeckName("KRGRY-"); - addDeckName("KRGRZ"); - addDeckName("KRGRZ-"); - addDeckName("KRGX"); - addDeckName("KRGX-"); - addDeckName("KRGY"); - addDeckName("KRGY-"); - addDeckName("KRGZ"); - addDeckName("KRGZ-"); - addDeckName("KRO"); - addDeckName("KRORG"); - addDeckName("KRORGX"); - addDeckName("KRORGX-"); - addDeckName("KRORGY"); - addDeckName("KRORGY-"); - addDeckName("KRORGZ"); - addDeckName("KRORGZ-"); - addDeckName("KRORW"); - addDeckName("KRORWX"); - addDeckName("KRORWX-"); - addDeckName("KRORWY"); - addDeckName("KRORWY-"); - addDeckName("KRORWZ"); - addDeckName("KRORWZ-"); - addDeckName("KROX"); - addDeckName("KROX-"); - addDeckName("KROY"); - addDeckName("KROY-"); - addDeckName("KROZ"); - addDeckName("KROZ-"); - addDeckName("KRW"); - addDeckName("KRWR"); - addDeckName("KRWRX"); - addDeckName("KRWRX-"); - addDeckName("KRWRY"); - addDeckName("KRWRY-"); - addDeckName("KRWRZ"); - addDeckName("KRWRZ-"); - addDeckName("KRWX"); - addDeckName("KRWX-"); - addDeckName("KRWY"); - addDeckName("KRWY-"); - addDeckName("KRWZ"); - addDeckName("KRWZ-"); - addDeckName("SGCR"); - addDeckName("SGCRX"); - addDeckName("SGCRX-"); - addDeckName("SGCRY"); - addDeckName("SGCRY-"); - addDeckName("SGCRZ"); - addDeckName("SGCRZ-"); - addDeckName("SGU"); - addDeckName("SGUX"); - addDeckName("SGUX-"); - addDeckName("SGUY"); - addDeckName("SGUY-"); - addDeckName("SGUZ"); - addDeckName("SGUZ-"); - addDeckName("SOGCR"); - addDeckName("SOGCRX"); - addDeckName("SOGCRX-"); - addDeckName("SOGCRY"); - addDeckName("SOGCRY-"); - addDeckName("SOGCRZ"); - addDeckName("SOGCRZ-"); - addDeckName("SOWCR"); - addDeckName("SOWCRX"); - addDeckName("SOWCRX-"); - addDeckName("SOWCRY"); - addDeckName("SOWCRY-"); - addDeckName("SOWCRZ"); - addDeckName("SOWCRZ-"); - addDeckName("SWCR"); - addDeckName("SWCRX"); - addDeckName("SWCRX-"); - addDeckName("SWCRY"); - addDeckName("SWCRY-"); - addDeckName("SWCRZ"); - addDeckName("SWCRZ-"); - addDeckName("SWL"); - addDeckName("SWLX"); - addDeckName("SWLX-"); - addDeckName("SWLY"); - addDeckName("SWLY-"); - addDeckName("SWLZ"); - addDeckName("SWLZ-"); - addDeckName("SWU"); - addDeckName("SWUX"); - addDeckName("SWUX-"); - addDeckName("SWUY"); - addDeckName("SWUY-"); - addDeckName("SWUZ"); - addDeckName("SWUZ-"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string ENDPOINT_SPECIFIERS::keywordName = "ENDPOINT_SPECIFIERS"; -const std::string ENDPOINT_SPECIFIERS::data::itemName = "data"; - - -ENDSCALE::ENDSCALE( ) : ParserKeyword("ENDSCALE") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("ENDSCALE"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("DIRECT",Opm::SINGLE,"NODIR")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("IRREVERS",Opm::SINGLE,"REVER")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NUM_TABLES",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NUM_NODES",Opm::SINGLE,20)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("COMB_MODE",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string ENDSCALE::keywordName = "ENDSCALE"; -const std::string ENDSCALE::DIRECT::itemName = "DIRECT"; -const std::string ENDSCALE::DIRECT::defaultValue = "NODIR"; -const std::string ENDSCALE::IRREVERS::itemName = "IRREVERS"; -const std::string ENDSCALE::IRREVERS::defaultValue = "REVER"; -const std::string ENDSCALE::NUM_TABLES::itemName = "NUM_TABLES"; -const int ENDSCALE::NUM_TABLES::defaultValue = 1; -const std::string ENDSCALE::NUM_NODES::itemName = "NUM_NODES"; -const int ENDSCALE::NUM_NODES::defaultValue = 20; -const std::string ENDSCALE::COMB_MODE::itemName = "COMB_MODE"; -const int ENDSCALE::COMB_MODE::defaultValue = 0; - - -ENDSKIP::ENDSKIP( ) : ParserKeyword("ENDSKIP") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - addValidSectionName("GRID"); - addValidSectionName("PROPS"); - addValidSectionName("REGIONS"); - addValidSectionName("RUNSPEC"); - addValidSectionName("SCHEDULE"); - addValidSectionName("SOLUTION"); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("ENDSKIP"); -} -const std::string ENDSKIP::keywordName = "ENDSKIP"; - - -ENKRVD::ENKRVD( ) : ParserKeyword("ENKRVD") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("ENDSCALE","NUM_TABLES"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("ENKRVD"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL,-1)); - item->setDescription(""); - item->push_backDimension("Length"); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string ENKRVD::keywordName = "ENKRVD"; -const std::string ENKRVD::DATA::itemName = "DATA"; -const double ENKRVD::DATA::defaultValue = -1; - - -ENPTVD::ENPTVD( ) : ParserKeyword("ENPTVD") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("ENDSCALE","NUM_TABLES"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("ENPTVD"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL,-1)); - item->setDescription(""); - item->push_backDimension("Length"); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string ENPTVD::keywordName = "ENPTVD"; -const std::string ENPTVD::DATA::itemName = "DATA"; -const double ENPTVD::DATA::defaultValue = -1; - - -EQLDIMS::EQLDIMS( ) : ParserKeyword("EQLDIMS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("EQLDIMS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("NTEQUL",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("DEPTH_NODES_P",Opm::SINGLE,100)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("DEPTH_NODES_TAB",Opm::SINGLE,20)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NTTRVD",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NSTRVD",Opm::SINGLE,20)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string EQLDIMS::keywordName = "EQLDIMS"; -const std::string EQLDIMS::NTEQUL::itemName = "NTEQUL"; -const int EQLDIMS::NTEQUL::defaultValue = 1; -const std::string EQLDIMS::DEPTH_NODES_P::itemName = "DEPTH_NODES_P"; -const int EQLDIMS::DEPTH_NODES_P::defaultValue = 100; -const std::string EQLDIMS::DEPTH_NODES_TAB::itemName = "DEPTH_NODES_TAB"; -const int EQLDIMS::DEPTH_NODES_TAB::defaultValue = 20; -const std::string EQLDIMS::NTTRVD::itemName = "NTTRVD"; -const int EQLDIMS::NTTRVD::defaultValue = 1; -const std::string EQLDIMS::NSTRVD::itemName = "NSTRVD"; -const int EQLDIMS::NSTRVD::defaultValue = 20; - - -EQLNUM::EQLNUM( ) : ParserKeyword("EQLNUM") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("REGIONS"); - clearDeckNames(); - addDeckName("EQLNUM"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("data",Opm::ALL)); - item->setDescription(""); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string EQLNUM::keywordName = "EQLNUM"; -const std::string EQLNUM::data::itemName = "data"; - - -EQLOPTS::EQLOPTS( ) : ParserKeyword("EQLOPTS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("EQLOPTS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("OPTION1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("OPTION2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("OPTION3",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("OPTION4",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string EQLOPTS::keywordName = "EQLOPTS"; -const std::string EQLOPTS::OPTION1::itemName = "OPTION1"; -const std::string EQLOPTS::OPTION2::itemName = "OPTION2"; -const std::string EQLOPTS::OPTION3::itemName = "OPTION3"; -const std::string EQLOPTS::OPTION4::itemName = "OPTION4"; - - -EQUALREG::EQUALREG( ) : ParserKeyword("EQUALREG") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - addValidSectionName("GRID"); - addValidSectionName("PROPS"); - addValidSectionName("REGIONS"); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("EQUALREG"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("ARRAY",Opm::SINGLE)); - item->setDescription("The 3D array we will update"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("VALUE",Opm::SINGLE,0)); - item->setDescription("The value we will assign"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("REGION_NUMBER",Opm::SINGLE)); - item->setDescription("The region number we are interested in"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("REGION_NAME",Opm::SINGLE,"M")); - item->setDescription("The name of the region we are interested in"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string EQUALREG::keywordName = "EQUALREG"; -const std::string EQUALREG::ARRAY::itemName = "ARRAY"; -const std::string EQUALREG::VALUE::itemName = "VALUE"; -const double EQUALREG::VALUE::defaultValue = 0; -const std::string EQUALREG::REGION_NUMBER::itemName = "REGION_NUMBER"; -const std::string EQUALREG::REGION_NAME::itemName = "REGION_NAME"; -const std::string EQUALREG::REGION_NAME::defaultValue = "M"; - - -EQUALS::EQUALS( ) : ParserKeyword("EQUALS") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - addValidSectionName("GRID"); - addValidSectionName("PROPS"); - addValidSectionName("REGIONS"); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("EQUALS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("field",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("value",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string EQUALS::keywordName = "EQUALS"; -const std::string EQUALS::field::itemName = "field"; -const std::string EQUALS::value::itemName = "value"; -const std::string EQUALS::I1::itemName = "I1"; -const std::string EQUALS::I2::itemName = "I2"; -const std::string EQUALS::J1::itemName = "J1"; -const std::string EQUALS::J2::itemName = "J2"; -const std::string EQUALS::K1::itemName = "K1"; -const std::string EQUALS::K2::itemName = "K2"; - - -EQUIL::EQUIL( ) : ParserKeyword("EQUIL") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("EQLDIMS","NTEQUL"); - setDescription("The EQUIL item is used when equilibrationg the model. The item should consist of one record for each PVT region"); - clearValidSectionNames(); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("EQUIL"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATUM_DEPTH",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("DATUM_PRESSURE",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("OWC",Opm::SINGLE,0)); - item->setDescription("The OWC item is depth of the OIL Water contact. This should ..."); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("PC_OWC",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("GOC",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("PC_GOC",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("BLACK_OIL_INIT",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("BLACK_OIL_INIT_WG",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("OIP_INIT",Opm::SINGLE,-5)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string EQUIL::keywordName = "EQUIL"; -const std::string EQUIL::DATUM_DEPTH::itemName = "DATUM_DEPTH"; -const double EQUIL::DATUM_DEPTH::defaultValue = 0; -const std::string EQUIL::DATUM_PRESSURE::itemName = "DATUM_PRESSURE"; -const std::string EQUIL::OWC::itemName = "OWC"; -const double EQUIL::OWC::defaultValue = 0; -const std::string EQUIL::PC_OWC::itemName = "PC_OWC"; -const double EQUIL::PC_OWC::defaultValue = 0; -const std::string EQUIL::GOC::itemName = "GOC"; -const double EQUIL::GOC::defaultValue = 0; -const std::string EQUIL::PC_GOC::itemName = "PC_GOC"; -const double EQUIL::PC_GOC::defaultValue = 0; -const std::string EQUIL::BLACK_OIL_INIT::itemName = "BLACK_OIL_INIT"; -const int EQUIL::BLACK_OIL_INIT::defaultValue = 0; -const std::string EQUIL::BLACK_OIL_INIT_WG::itemName = "BLACK_OIL_INIT_WG"; -const int EQUIL::BLACK_OIL_INIT_WG::defaultValue = 0; -const std::string EQUIL::OIP_INIT::itemName = "OIP_INIT"; -const int EQUIL::OIP_INIT::defaultValue = -5; - - -EXCEL::EXCEL( ) : ParserKeyword("EXCEL") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("EXCEL"); -} -const std::string EXCEL::keywordName = "EXCEL"; - - -EXTRAPMS::EXTRAPMS( ) : ParserKeyword("EXTRAPMS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - addValidSectionName("GRID"); - addValidSectionName("PROPS"); - addValidSectionName("REGIONS"); - addValidSectionName("RUNSPEC"); - addValidSectionName("SCHEDULE"); - addValidSectionName("SOLUTION"); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("EXTRAPMS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("LEVEL",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string EXTRAPMS::keywordName = "EXTRAPMS"; -const std::string EXTRAPMS::LEVEL::itemName = "LEVEL"; -const int EXTRAPMS::LEVEL::defaultValue = 0; - - -FAULTDIM::FAULTDIM( ) : ParserKeyword("FAULTDIM") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("FAULTDIM"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("MFSEGS",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string FAULTDIM::keywordName = "FAULTDIM"; -const std::string FAULTDIM::MFSEGS::itemName = "MFSEGS"; -const int FAULTDIM::MFSEGS::defaultValue = 0; - - -FAULTS::FAULTS( ) : ParserKeyword("FAULTS") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("FAULTS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("NAME",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("IX1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("IX2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("IY1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("IY2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("IZ1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("IZ2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("FACE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string FAULTS::keywordName = "FAULTS"; -const std::string FAULTS::NAME::itemName = "NAME"; -const std::string FAULTS::IX1::itemName = "IX1"; -const std::string FAULTS::IX2::itemName = "IX2"; -const std::string FAULTS::IY1::itemName = "IY1"; -const std::string FAULTS::IY2::itemName = "IY2"; -const std::string FAULTS::IZ1::itemName = "IZ1"; -const std::string FAULTS::IZ2::itemName = "IZ2"; -const std::string FAULTS::FACE::itemName = "FACE"; - - -FIELD::FIELD( ) : ParserKeyword("FIELD") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("FIELD"); -} -const std::string FIELD::keywordName = "FIELD"; - - -FIELD_PROBE::FIELD_PROBE( ) : ParserKeyword("FIELD_PROBE") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("FAPI"); - addDeckName("FAQR"); - addDeckName("FAQRG"); - addDeckName("FAQT"); - addDeckName("FAQTG"); - addDeckName("FCAD"); - addDeckName("FCGC"); - addDeckName("FCIC"); - addDeckName("FCIP"); - addDeckName("FCIR"); - addDeckName("FCIT"); - addDeckName("FCPC"); - addDeckName("FCPR"); - addDeckName("FCPT"); - addDeckName("FCSC"); - addDeckName("FEPR"); - addDeckName("FEPT"); - addDeckName("FGCR"); - addDeckName("FGCT"); - addDeckName("FGDC"); - addDeckName("FGDCQ"); - addDeckName("FGDEN"); - addDeckName("FGIMR"); - addDeckName("FGIMT"); - addDeckName("FGIP"); - addDeckName("FGIPG"); - addDeckName("FGIPL"); - addDeckName("FGIR"); - addDeckName("FGIRH"); - addDeckName("FGIRT"); - addDeckName("FGIT"); - addDeckName("FGITH"); - addDeckName("FGLIR"); - addDeckName("FGLR"); - addDeckName("FGLRH"); - addDeckName("FGOR"); - addDeckName("FGORH"); - addDeckName("FGPI"); - addDeckName("FGPI2"); - addDeckName("FGPP"); - addDeckName("FGPP2"); - addDeckName("FGPPF"); - addDeckName("FGPPF2"); - addDeckName("FGPPS"); - addDeckName("FGPPS2"); - addDeckName("FGPR"); - addDeckName("FGPRF"); - addDeckName("FGPRH"); - addDeckName("FGPRS"); - addDeckName("FGPRT"); - addDeckName("FGPT"); - addDeckName("FGPTF"); - addDeckName("FGPTH"); - addDeckName("FGPTS"); - addDeckName("FGPV"); - addDeckName("FGQ"); - addDeckName("FGSAT"); - addDeckName("FGSPR"); - addDeckName("FGSR"); - addDeckName("FGSRL"); - addDeckName("FGSRU"); - addDeckName("FGSSP"); - addDeckName("FGST"); - addDeckName("FGSTP"); - addDeckName("FGVIS"); - addDeckName("FHPV"); - addDeckName("FJPR"); - addDeckName("FJPRH"); - addDeckName("FJPRT"); - addDeckName("FJPT"); - addDeckName("FJPTH"); - addDeckName("FLPR"); - addDeckName("FLPRH"); - addDeckName("FLPRT"); - addDeckName("FLPT"); - addDeckName("FLPTH"); - addDeckName("FMCTG"); - addDeckName("FMCTP"); - addDeckName("FMCTW"); - addDeckName("FMIR"); - addDeckName("FMIT"); - addDeckName("FMPR"); - addDeckName("FMPT"); - addDeckName("FMWDR"); - addDeckName("FMWDT"); - addDeckName("FMWIA"); - addDeckName("FMWIG"); - addDeckName("FMWIN"); - addDeckName("FMWIP"); - addDeckName("FMWIS"); - addDeckName("FMWIT"); - addDeckName("FMWIU"); - addDeckName("FMWIV"); - addDeckName("FMWPA"); - addDeckName("FMWPG"); - addDeckName("FMWPL"); - addDeckName("FMWPO"); - addDeckName("FMWPP"); - addDeckName("FMWPR"); - addDeckName("FMWPS"); - addDeckName("FMWPT"); - addDeckName("FMWPU"); - addDeckName("FMWPV"); - addDeckName("FMWWO"); - addDeckName("FMWWT"); - addDeckName("FNIP"); - addDeckName("FNIR"); - addDeckName("FNIT"); - addDeckName("FNPR"); - addDeckName("FNPT"); - addDeckName("FNQR"); - addDeckName("FNQT"); - addDeckName("FODEN"); - addDeckName("FOE"); - addDeckName("FOEIG"); - addDeckName("FOEIW"); - addDeckName("FOEW"); - addDeckName("FOEWG"); - addDeckName("FOEWW"); - addDeckName("FOGR"); - addDeckName("FOGRH"); - addDeckName("FOIP"); - addDeckName("FOIPG"); - addDeckName("FOIPL"); - addDeckName("FOIR"); - addDeckName("FOIRH"); - addDeckName("FOIRT"); - addDeckName("FOIT"); - addDeckName("FOITH"); - addDeckName("FOPI"); - addDeckName("FOPI2"); - addDeckName("FOPP"); - addDeckName("FOPP2"); - addDeckName("FOPR"); - addDeckName("FOPRF"); - addDeckName("FOPRH"); - addDeckName("FOPRS"); - addDeckName("FOPRT"); - addDeckName("FOPT"); - addDeckName("FOPTF"); - addDeckName("FOPTH"); - addDeckName("FOPTS"); - addDeckName("FOPV"); - addDeckName("FORFE"); - addDeckName("FORFF"); - addDeckName("FORFG"); - addDeckName("FORFR"); - addDeckName("FORFS"); - addDeckName("FORFW"); - addDeckName("FORFX"); - addDeckName("FORFY"); - addDeckName("FORME"); - addDeckName("FORMF"); - addDeckName("FORMG"); - addDeckName("FORMR"); - addDeckName("FORMS"); - addDeckName("FORMW"); - addDeckName("FORMX"); - addDeckName("FORMY"); - addDeckName("FOSAT"); - addDeckName("FOSPR"); - addDeckName("FOSRL"); - addDeckName("FOSRU"); - addDeckName("FOSSP"); - addDeckName("FOSTP"); - addDeckName("FOVIS"); - addDeckName("FPPC"); - addDeckName("FPPG"); - addDeckName("FPPO"); - addDeckName("FPPW"); - addDeckName("FPR"); - addDeckName("FPRGZ"); - addDeckName("FPRH"); - addDeckName("FPRP"); - addDeckName("FRPV"); - addDeckName("FRS"); - addDeckName("FRTM"); - addDeckName("FRV"); - addDeckName("FSGR"); - addDeckName("FSGT"); - addDeckName("FSIC"); - addDeckName("FSIP"); - addDeckName("FSIR"); - addDeckName("FSIT"); - addDeckName("FSPC"); - addDeckName("FSPR"); - addDeckName("FSPT"); - addDeckName("FTADSFOA"); - addDeckName("FTADSUR"); - addDeckName("FTDCYFOA"); - addDeckName("FTICHEA"); - addDeckName("FTIPTFOA"); - addDeckName("FTIPTHEA"); - addDeckName("FTIPTSUR"); - addDeckName("FTIRALK"); - addDeckName("FTIRANI"); - addDeckName("FTIRCAT"); - addDeckName("FTIRFOA"); - addDeckName("FTIRHEA"); - addDeckName("FTIRSUR"); - addDeckName("FTITALK"); - addDeckName("FTITANI"); - addDeckName("FTITCAT"); - addDeckName("FTITFOA"); - addDeckName("FTITHEA"); - addDeckName("FTITSUR"); - addDeckName("FTMOBFOA"); - addDeckName("FTPCHEA"); - addDeckName("FTPRALK"); - addDeckName("FTPRANI"); - addDeckName("FTPRCAT"); - addDeckName("FTPRFOA"); - addDeckName("FTPRHEA"); - addDeckName("FTPRSUR"); - addDeckName("FTPTALK"); - addDeckName("FTPTANI"); - addDeckName("FTPTCAT"); - addDeckName("FTPTFOA"); - addDeckName("FTPTHEA"); - addDeckName("FTPTSUR"); - addDeckName("FVIR"); - addDeckName("FVIRT"); - addDeckName("FVIT"); - addDeckName("FVPR"); - addDeckName("FVPRT"); - addDeckName("FVPT"); - addDeckName("FWCT"); - addDeckName("FWCTH"); - addDeckName("FWDEN"); - addDeckName("FWGR"); - addDeckName("FWGRH"); - addDeckName("FWIP"); - addDeckName("FWIR"); - addDeckName("FWIRH"); - addDeckName("FWIRT"); - addDeckName("FWIT"); - addDeckName("FWITH"); - addDeckName("FWPI"); - addDeckName("FWPI2"); - addDeckName("FWPIR"); - addDeckName("FWPP"); - addDeckName("FWPP2"); - addDeckName("FWPR"); - addDeckName("FWPRH"); - addDeckName("FWPRT"); - addDeckName("FWPT"); - addDeckName("FWPTH"); - addDeckName("FWPV"); - addDeckName("FWSAT"); - addDeckName("FWSPR"); - addDeckName("FWSRL"); - addDeckName("FWSRU"); - addDeckName("FWSSP"); - addDeckName("FWSTP"); - addDeckName("FWVIS"); - addDeckName("PSSPR"); - addDeckName("PSSSC"); - addDeckName("PSSSG"); - addDeckName("PSSSO"); - addDeckName("PSSSW"); - setMatchRegex("FU.+|FTPR.+|FTPT.+|FTPC.+|FTIR.+|FTIT.+|FTIC.+|FTIPT.+|FTIPF.+|FTIPS|FTIP[1-9][0-9]*.+|FTPR.+|FTPT.+|FTPC.+|FTIR.+|FTIT.+|FTIC.+|FTADS.+|FTDCY.+|FTIRF.+|FTIRS.+|FTPRF.+|FTPRS.+|FTITF.+|FTITS.+|FTPTF.+|FTPTS.+|FTICF.+|FTICS.+|FTPCF.+|FTPCS.+"); -} -const std::string FIELD_PROBE::keywordName = "FIELD_PROBE"; - - -FILLEPS::FILLEPS( ) : ParserKeyword("FILLEPS") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("FILLEPS"); -} -const std::string FILLEPS::keywordName = "FILLEPS"; - - -FIPNUM::FIPNUM( ) : ParserKeyword("FIPNUM") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("REGIONS"); - clearDeckNames(); - addDeckName("FIPNUM"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("data",Opm::ALL)); - item->setDescription(""); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string FIPNUM::keywordName = "FIPNUM"; -const std::string FIPNUM::data::itemName = "data"; - - -FLUXNUM::FLUXNUM( ) : ParserKeyword("FLUXNUM") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("FLUXNUM"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("data",Opm::ALL)); - item->setDescription(""); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string FLUXNUM::keywordName = "FLUXNUM"; -const std::string FLUXNUM::data::itemName = "data"; - - -FMTIN::FMTIN( ) : ParserKeyword("FMTIN") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("FMTIN"); -} -const std::string FMTIN::keywordName = "FMTIN"; - - -FMTOUT::FMTOUT( ) : ParserKeyword("FMTOUT") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("FMTOUT"); -} -const std::string FMTOUT::keywordName = "FMTOUT"; - - -FULLIMP::FULLIMP( ) : ParserKeyword("FULLIMP") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("FULLIMP"); -} -const std::string FULLIMP::keywordName = "FULLIMP"; - - -GAS::GAS( ) : ParserKeyword("GAS") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("GAS"); -} -const std::string GAS::keywordName = "GAS"; - - -GASVISCT::GASVISCT( ) : ParserKeyword("GASVISCT") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTPVT"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("GASVISCT"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("ContextDependent"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string GASVISCT::keywordName = "GASVISCT"; -const std::string GASVISCT::DATA::itemName = "DATA"; - - -GCOMPIDX::GCOMPIDX( ) : ParserKeyword("GCOMPIDX") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("GCOMPIDX"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("GAS_COMPONENT_INDEX",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string GCOMPIDX::keywordName = "GCOMPIDX"; -const std::string GCOMPIDX::GAS_COMPONENT_INDEX::itemName = "GAS_COMPONENT_INDEX"; - - -GCONINJE::GCONINJE( ) : ParserKeyword("GCONINJE") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("GCONINJE"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("GROUP",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("PHASE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("CONTROL_MODE",Opm::SINGLE,"NONE")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("SURFACE_TARGET",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("ContextDependent"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("RESV_TARGET",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("ReservoirVolume/Time"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("REINJ_TARGET",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("1"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("VOIDAGE_TARGET",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("1"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("FREE",Opm::SINGLE,"YES")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("GUIDE_FRACTION",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("1"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("GUIDE_DEF",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("REINJECT_GROUP",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("VOIDAGE_GROUP",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("WETGAS_TARGET",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("GasSurfaceVolume/Time"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string GCONINJE::keywordName = "GCONINJE"; -const std::string GCONINJE::GROUP::itemName = "GROUP"; -const std::string GCONINJE::PHASE::itemName = "PHASE"; -const std::string GCONINJE::CONTROL_MODE::itemName = "CONTROL_MODE"; -const std::string GCONINJE::CONTROL_MODE::defaultValue = "NONE"; -const std::string GCONINJE::SURFACE_TARGET::itemName = "SURFACE_TARGET"; -const double GCONINJE::SURFACE_TARGET::defaultValue = 0; -const std::string GCONINJE::RESV_TARGET::itemName = "RESV_TARGET"; -const double GCONINJE::RESV_TARGET::defaultValue = 0; -const std::string GCONINJE::REINJ_TARGET::itemName = "REINJ_TARGET"; -const double GCONINJE::REINJ_TARGET::defaultValue = 0; -const std::string GCONINJE::VOIDAGE_TARGET::itemName = "VOIDAGE_TARGET"; -const double GCONINJE::VOIDAGE_TARGET::defaultValue = 0; -const std::string GCONINJE::FREE::itemName = "FREE"; -const std::string GCONINJE::FREE::defaultValue = "YES"; -const std::string GCONINJE::GUIDE_FRACTION::itemName = "GUIDE_FRACTION"; -const double GCONINJE::GUIDE_FRACTION::defaultValue = 0; -const std::string GCONINJE::GUIDE_DEF::itemName = "GUIDE_DEF"; -const std::string GCONINJE::REINJECT_GROUP::itemName = "REINJECT_GROUP"; -const std::string GCONINJE::VOIDAGE_GROUP::itemName = "VOIDAGE_GROUP"; -const std::string GCONINJE::WETGAS_TARGET::itemName = "WETGAS_TARGET"; - - -GCONPROD::GCONPROD( ) : ParserKeyword("GCONPROD") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("GCONPROD"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("GROUP",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("CONTROL_MODE",Opm::SINGLE,"NONE")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("OIL_TARGET",Opm::SINGLE,-9.9899999999999998e+102)); - item->setDescription(""); - item->push_backDimension("LiquidSurfaceVolume/Time"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("WATER_TARGET",Opm::SINGLE,-9.9899999999999998e+102)); - item->setDescription(""); - item->push_backDimension("LiquidSurfaceVolume/Time"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("GAS_TARGET",Opm::SINGLE,-9.9899999999999998e+102)); - item->setDescription(""); - item->push_backDimension("GasSurfaceVolume/Time"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("LIQUID_TARGET",Opm::SINGLE,-9.9899999999999998e+102)); - item->setDescription(""); - item->push_backDimension("LiquidSurfaceVolume/Time"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("EXCEED_PROC",Opm::SINGLE,"NONE")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("RESPOND_TO_PARENT",Opm::SINGLE,"YES")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("GUIDE_RATE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("GUIDE_RATE_DEF",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("WATER_EXCEED_PROCEDURE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("GAS_EXCEED_PROCEDURE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("LIQUID_EXCEED_PROCEDURE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("RESERVOIR_FLUID_TARGET",Opm::SINGLE,-9.9899999999999998e+102)); - item->setDescription(""); - item->push_backDimension("ReservoirVolume/Time"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("RESERVOIR_VOLUME_BALANCE",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string GCONPROD::keywordName = "GCONPROD"; -const std::string GCONPROD::GROUP::itemName = "GROUP"; -const std::string GCONPROD::CONTROL_MODE::itemName = "CONTROL_MODE"; -const std::string GCONPROD::CONTROL_MODE::defaultValue = "NONE"; -const std::string GCONPROD::OIL_TARGET::itemName = "OIL_TARGET"; -const double GCONPROD::OIL_TARGET::defaultValue = -9.99e+102; -const std::string GCONPROD::WATER_TARGET::itemName = "WATER_TARGET"; -const double GCONPROD::WATER_TARGET::defaultValue = -9.99e+102; -const std::string GCONPROD::GAS_TARGET::itemName = "GAS_TARGET"; -const double GCONPROD::GAS_TARGET::defaultValue = -9.99e+102; -const std::string GCONPROD::LIQUID_TARGET::itemName = "LIQUID_TARGET"; -const double GCONPROD::LIQUID_TARGET::defaultValue = -9.99e+102; -const std::string GCONPROD::EXCEED_PROC::itemName = "EXCEED_PROC"; -const std::string GCONPROD::EXCEED_PROC::defaultValue = "NONE"; -const std::string GCONPROD::RESPOND_TO_PARENT::itemName = "RESPOND_TO_PARENT"; -const std::string GCONPROD::RESPOND_TO_PARENT::defaultValue = "YES"; -const std::string GCONPROD::GUIDE_RATE::itemName = "GUIDE_RATE"; -const std::string GCONPROD::GUIDE_RATE_DEF::itemName = "GUIDE_RATE_DEF"; -const std::string GCONPROD::WATER_EXCEED_PROCEDURE::itemName = "WATER_EXCEED_PROCEDURE"; -const std::string GCONPROD::GAS_EXCEED_PROCEDURE::itemName = "GAS_EXCEED_PROCEDURE"; -const std::string GCONPROD::LIQUID_EXCEED_PROCEDURE::itemName = "LIQUID_EXCEED_PROCEDURE"; -const std::string GCONPROD::RESERVOIR_FLUID_TARGET::itemName = "RESERVOIR_FLUID_TARGET"; -const double GCONPROD::RESERVOIR_FLUID_TARGET::defaultValue = -9.99e+102; -const std::string GCONPROD::RESERVOIR_VOLUME_BALANCE::itemName = "RESERVOIR_VOLUME_BALANCE"; - - -GDORIENT::GDORIENT( ) : ParserKeyword("GDORIENT") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("GDORIENT"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("I",Opm::SINGLE,"INC")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("J",Opm::SINGLE,"INC")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("K",Opm::SINGLE,"INC")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("Z",Opm::SINGLE,"DOWN")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("HAND",Opm::SINGLE,"RIGHT")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string GDORIENT::keywordName = "GDORIENT"; -const std::string GDORIENT::I::itemName = "I"; -const std::string GDORIENT::I::defaultValue = "INC"; -const std::string GDORIENT::J::itemName = "J"; -const std::string GDORIENT::J::defaultValue = "INC"; -const std::string GDORIENT::K::itemName = "K"; -const std::string GDORIENT::K::defaultValue = "INC"; -const std::string GDORIENT::Z::itemName = "Z"; -const std::string GDORIENT::Z::defaultValue = "DOWN"; -const std::string GDORIENT::HAND::itemName = "HAND"; -const std::string GDORIENT::HAND::defaultValue = "RIGHT"; - - -GECON::GECON( ) : ParserKeyword("GECON") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("GECON"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("GROUP",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("MIN_OIL_RATE",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("MIN_GAS_RATE",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("MAX_WCT",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("MAX_GOR",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("MAX_WATER_GAS_RATIO",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("WORKOVER",Opm::SINGLE,"NONE")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("END_RUN",Opm::SINGLE,"NO")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_OPEN_WELLS",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string GECON::keywordName = "GECON"; -const std::string GECON::GROUP::itemName = "GROUP"; -const std::string GECON::MIN_OIL_RATE::itemName = "MIN_OIL_RATE"; -const double GECON::MIN_OIL_RATE::defaultValue = 0; -const std::string GECON::MIN_GAS_RATE::itemName = "MIN_GAS_RATE"; -const double GECON::MIN_GAS_RATE::defaultValue = 0; -const std::string GECON::MAX_WCT::itemName = "MAX_WCT"; -const double GECON::MAX_WCT::defaultValue = 0; -const std::string GECON::MAX_GOR::itemName = "MAX_GOR"; -const double GECON::MAX_GOR::defaultValue = 0; -const std::string GECON::MAX_WATER_GAS_RATIO::itemName = "MAX_WATER_GAS_RATIO"; -const double GECON::MAX_WATER_GAS_RATIO::defaultValue = 0; -const std::string GECON::WORKOVER::itemName = "WORKOVER"; -const std::string GECON::WORKOVER::defaultValue = "NONE"; -const std::string GECON::END_RUN::itemName = "END_RUN"; -const std::string GECON::END_RUN::defaultValue = "NO"; -const std::string GECON::MAX_OPEN_WELLS::itemName = "MAX_OPEN_WELLS"; -const int GECON::MAX_OPEN_WELLS::defaultValue = 0; - - -GEFAC::GEFAC( ) : ParserKeyword("GEFAC") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("GEFAC"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("GROUP",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("EFFICIENCY_FACTOR",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("TRANSFER_EXT_NET",Opm::SINGLE,"YES")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string GEFAC::keywordName = "GEFAC"; -const std::string GEFAC::GROUP::itemName = "GROUP"; -const std::string GEFAC::EFFICIENCY_FACTOR::itemName = "EFFICIENCY_FACTOR"; -const double GEFAC::EFFICIENCY_FACTOR::defaultValue = 1; -const std::string GEFAC::TRANSFER_EXT_NET::itemName = "TRANSFER_EXT_NET"; -const std::string GEFAC::TRANSFER_EXT_NET::defaultValue = "YES"; - - -GRAVITY::GRAVITY( ) : ParserKeyword("GRAVITY") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTPVT"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("GRAVITY"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("API_GRAVITY",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("1"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("WATER_SP_GRAVITY",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("GAS_SP_GRAVITY",Opm::SINGLE,0.77729999999999999)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string GRAVITY::keywordName = "GRAVITY"; -const std::string GRAVITY::API_GRAVITY::itemName = "API_GRAVITY"; -const std::string GRAVITY::WATER_SP_GRAVITY::itemName = "WATER_SP_GRAVITY"; -const double GRAVITY::WATER_SP_GRAVITY::defaultValue = 1; -const std::string GRAVITY::GAS_SP_GRAVITY::itemName = "GAS_SP_GRAVITY"; -const double GRAVITY::GAS_SP_GRAVITY::defaultValue = 0.7773; - - -GRID::GRID( ) : ParserKeyword("GRID") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - clearDeckNames(); - addDeckName("GRID"); -} -const std::string GRID::keywordName = "GRID"; - - -GRIDFILE::GRIDFILE( ) : ParserKeyword("GRIDFILE") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("GRIDFILE"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("GRID",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("EGRID",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string GRIDFILE::keywordName = "GRIDFILE"; -const std::string GRIDFILE::GRID::itemName = "GRID"; -const int GRIDFILE::GRID::defaultValue = 0; -const std::string GRIDFILE::EGRID::itemName = "EGRID"; -const int GRIDFILE::EGRID::defaultValue = 1; - - -GRIDOPTS::GRIDOPTS( ) : ParserKeyword("GRIDOPTS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("GRIDOPTS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("TRANMULT",Opm::SINGLE,"NO")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NRMULT",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NRPINC",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string GRIDOPTS::keywordName = "GRIDOPTS"; -const std::string GRIDOPTS::TRANMULT::itemName = "TRANMULT"; -const std::string GRIDOPTS::TRANMULT::defaultValue = "NO"; -const std::string GRIDOPTS::NRMULT::itemName = "NRMULT"; -const int GRIDOPTS::NRMULT::defaultValue = 0; -const std::string GRIDOPTS::NRPINC::itemName = "NRPINC"; -const int GRIDOPTS::NRPINC::defaultValue = 0; - - -GRIDUNIT::GRIDUNIT( ) : ParserKeyword("GRIDUNIT") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("GRIDUNIT"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("LengthUnit",Opm::SINGLE,"METRES")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("MAP",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string GRIDUNIT::keywordName = "GRIDUNIT"; -const std::string GRIDUNIT::LengthUnit::itemName = "LengthUnit"; -const std::string GRIDUNIT::LengthUnit::defaultValue = "METRES"; -const std::string GRIDUNIT::MAP::itemName = "MAP"; - - -GROUP_PROBE::GROUP_PROBE( ) : ParserKeyword("GROUP_PROBE") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("GALQ"); - addDeckName("GAPI"); - addDeckName("GCIC"); - addDeckName("GCIR"); - addDeckName("GCIT"); - addDeckName("GCPC"); - addDeckName("GCPR"); - addDeckName("GCPT"); - addDeckName("GEDC"); - addDeckName("GEDCQ"); - addDeckName("GEFF"); - addDeckName("GEPR"); - addDeckName("GEPT"); - addDeckName("GESR"); - addDeckName("GEST"); - addDeckName("GFGR"); - addDeckName("GFGT"); - addDeckName("GFMF"); - addDeckName("GGCR"); - addDeckName("GGCT"); - addDeckName("GGCV"); - addDeckName("GGDC"); - addDeckName("GGDCQ"); - addDeckName("GGIGR"); - addDeckName("GGIMR"); - addDeckName("GGIMT"); - addDeckName("GGIR"); - addDeckName("GGIRH"); - addDeckName("GGIRL"); - addDeckName("GGIRNB"); - addDeckName("GGIRT"); - addDeckName("GGIT"); - addDeckName("GGITH"); - addDeckName("GGLIR"); - addDeckName("GGLR"); - addDeckName("GGLRH"); - addDeckName("GGOR"); - addDeckName("GGORH"); - addDeckName("GGPGR"); - addDeckName("GGPI"); - addDeckName("GGPI2"); - addDeckName("GGPP"); - addDeckName("GGPP2"); - addDeckName("GGPPF"); - addDeckName("GGPPF2"); - addDeckName("GGPPS"); - addDeckName("GGPPS2"); - addDeckName("GGPR"); - addDeckName("GGPRF"); - addDeckName("GGPRH"); - addDeckName("GGPRL"); - addDeckName("GGPRNB"); - addDeckName("GGPRNBFP"); - addDeckName("GGPRS"); - addDeckName("GGPRT"); - addDeckName("GGPT"); - addDeckName("GGPTF"); - addDeckName("GGPTH"); - addDeckName("GGPTS"); - addDeckName("GGQ"); - addDeckName("GGSPR"); - addDeckName("GGSR"); - addDeckName("GGSRL"); - addDeckName("GGSRU"); - addDeckName("GGSSP"); - addDeckName("GGST"); - addDeckName("GGSTP"); - addDeckName("GJPR"); - addDeckName("GJPRH"); - addDeckName("GJPRL"); - addDeckName("GJPRT"); - addDeckName("GJPT"); - addDeckName("GJPTH"); - addDeckName("GLPR"); - addDeckName("GLPRH"); - addDeckName("GLPRL"); - addDeckName("GLPRNB"); - addDeckName("GLPRT"); - addDeckName("GLPT"); - addDeckName("GLPTH"); - addDeckName("GMCPL"); - addDeckName("GMCTG"); - addDeckName("GMCTP"); - addDeckName("GMCTW"); - addDeckName("GMIR"); - addDeckName("GMIT"); - addDeckName("GMPR"); - addDeckName("GMPT"); - addDeckName("GMWDR"); - addDeckName("GMWDT"); - addDeckName("GMWIA"); - addDeckName("GMWIG"); - addDeckName("GMWIN"); - addDeckName("GMWIP"); - addDeckName("GMWIS"); - addDeckName("GMWIT"); - addDeckName("GMWIU"); - addDeckName("GMWIV"); - addDeckName("GMWPA"); - addDeckName("GMWPG"); - addDeckName("GMWPL"); - addDeckName("GMWPO"); - addDeckName("GMWPP"); - addDeckName("GMWPR"); - addDeckName("GMWPS"); - addDeckName("GMWPT"); - addDeckName("GMWPU"); - addDeckName("GMWPV"); - addDeckName("GMWWO"); - addDeckName("GMWWT"); - addDeckName("GNIR"); - addDeckName("GNIT"); - addDeckName("GNPR"); - addDeckName("GNPT"); - addDeckName("GOGR"); - addDeckName("GOGRH"); - addDeckName("GOIGR"); - addDeckName("GOIR"); - addDeckName("GOIRH"); - addDeckName("GOIRL"); - addDeckName("GOIRT"); - addDeckName("GOIT"); - addDeckName("GOITH"); - addDeckName("GOPGR"); - addDeckName("GOPI"); - addDeckName("GOPI2"); - addDeckName("GOPP"); - addDeckName("GOPP2"); - addDeckName("GOPR"); - addDeckName("GOPRF"); - addDeckName("GOPRH"); - addDeckName("GOPRL"); - addDeckName("GOPRNB"); - addDeckName("GOPRS"); - addDeckName("GOPRT"); - addDeckName("GOPT"); - addDeckName("GOPTF"); - addDeckName("GOPTH"); - addDeckName("GOPTS"); - addDeckName("GOSPR"); - addDeckName("GOSRL"); - addDeckName("GOSRU"); - addDeckName("GOSSP"); - addDeckName("GOSTP"); - addDeckName("GPR"); - addDeckName("GPRB"); - addDeckName("GPRBG"); - addDeckName("GPRBW"); - addDeckName("GPRDC"); - addDeckName("GPRFP"); - addDeckName("GPRG"); - addDeckName("GPRW"); - addDeckName("GSGR"); - addDeckName("GSGT"); - addDeckName("GSIC"); - addDeckName("GSIR"); - addDeckName("GSIT"); - addDeckName("GSMF"); - addDeckName("GSPC"); - addDeckName("GSPR"); - addDeckName("GSPT"); - addDeckName("GTICHEA"); - addDeckName("GTIRALK"); - addDeckName("GTIRANI"); - addDeckName("GTIRCAT"); - addDeckName("GTIRFOA"); - addDeckName("GTIRHEA"); - addDeckName("GTIRSUR"); - addDeckName("GTITALK"); - addDeckName("GTITANI"); - addDeckName("GTITCAT"); - addDeckName("GTITFOA"); - addDeckName("GTITHEA"); - addDeckName("GTITSUR"); - addDeckName("GTPCHEA"); - addDeckName("GTPRALK"); - addDeckName("GTPRANI"); - addDeckName("GTPRCAT"); - addDeckName("GTPRFOA"); - addDeckName("GTPRHEA"); - addDeckName("GTPRSUR"); - addDeckName("GTPTALK"); - addDeckName("GTPTANI"); - addDeckName("GTPTCAT"); - addDeckName("GTPTFOA"); - addDeckName("GTPTHEA"); - addDeckName("GTPTSUR"); - addDeckName("GVIR"); - addDeckName("GVIRL"); - addDeckName("GVIRT"); - addDeckName("GVIT"); - addDeckName("GVPGR"); - addDeckName("GVPR"); - addDeckName("GVPRL"); - addDeckName("GVPRT"); - addDeckName("GVPT"); - addDeckName("GWCT"); - addDeckName("GWCTH"); - addDeckName("GWGR"); - addDeckName("GWGRH"); - addDeckName("GWIGR"); - addDeckName("GWIR"); - addDeckName("GWIRH"); - addDeckName("GWIRL"); - addDeckName("GWIRNB"); - addDeckName("GWIRT"); - addDeckName("GWIT"); - addDeckName("GWITH"); - addDeckName("GWPGR"); - addDeckName("GWPI"); - addDeckName("GWPI2"); - addDeckName("GWPIR"); - addDeckName("GWPP"); - addDeckName("GWPP2"); - addDeckName("GWPR"); - addDeckName("GWPRH"); - addDeckName("GWPRL"); - addDeckName("GWPRNB"); - addDeckName("GWPRT"); - addDeckName("GWPT"); - addDeckName("GWPTH"); - addDeckName("GWSPR"); - addDeckName("GWSRL"); - addDeckName("GWSRU"); - addDeckName("GWSSP"); - addDeckName("GWSTP"); - setMatchRegex("GU.+|GTPR.+|GTPT.+|GTPC.+|GTIR.+|GTIT.+|GTIC.+|GTIRF.+|GTIRS.+|GTPRF.+|GTPRS.+|GTITF.+|GTITS.+|GTPTF.+|GTPTS.+|GTICF.+|GTICS.+|GTPCF.+|GTPCS.+"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("GROUPS",Opm::ALL)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string GROUP_PROBE::keywordName = "GROUP_PROBE"; -const std::string GROUP_PROBE::GROUPS::itemName = "GROUPS"; - - -GRUPNET::GRUPNET( ) : ParserKeyword("GRUPNET") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - addValidSectionName("SPECIAL"); - clearDeckNames(); - addDeckName("GRUPNET"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("NAME",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("TERMINAL_PRESSURE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("VFP_TABLE",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("ALQ",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("SUB_SEA_MANIFOLD",Opm::SINGLE,"NO")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("LIFT_GAS_FLOW_THROUGH",Opm::SINGLE,"NO")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("ALQ_SURFACE_EQV",Opm::SINGLE,"NONE")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string GRUPNET::keywordName = "GRUPNET"; -const std::string GRUPNET::NAME::itemName = "NAME"; -const std::string GRUPNET::TERMINAL_PRESSURE::itemName = "TERMINAL_PRESSURE"; -const std::string GRUPNET::VFP_TABLE::itemName = "VFP_TABLE"; -const int GRUPNET::VFP_TABLE::defaultValue = 0; -const std::string GRUPNET::ALQ::itemName = "ALQ"; -const double GRUPNET::ALQ::defaultValue = 0; -const std::string GRUPNET::SUB_SEA_MANIFOLD::itemName = "SUB_SEA_MANIFOLD"; -const std::string GRUPNET::SUB_SEA_MANIFOLD::defaultValue = "NO"; -const std::string GRUPNET::LIFT_GAS_FLOW_THROUGH::itemName = "LIFT_GAS_FLOW_THROUGH"; -const std::string GRUPNET::LIFT_GAS_FLOW_THROUGH::defaultValue = "NO"; -const std::string GRUPNET::ALQ_SURFACE_EQV::itemName = "ALQ_SURFACE_EQV"; -const std::string GRUPNET::ALQ_SURFACE_EQV::defaultValue = "NONE"; - - -GRUPTREE::GRUPTREE( ) : ParserKeyword("GRUPTREE") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("GRUPTREE"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("CHILD_GROUP",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("PARENT_GROUP",Opm::SINGLE,"FIELD")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string GRUPTREE::keywordName = "GRUPTREE"; -const std::string GRUPTREE::CHILD_GROUP::itemName = "CHILD_GROUP"; -const std::string GRUPTREE::PARENT_GROUP::itemName = "PARENT_GROUP"; -const std::string GRUPTREE::PARENT_GROUP::defaultValue = "FIELD"; - - -IMBNUM::IMBNUM( ) : ParserKeyword("IMBNUM") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("REGIONS"); - clearDeckNames(); - addDeckName("IMBNUM"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("data",Opm::ALL)); - item->setDescription(""); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string IMBNUM::keywordName = "IMBNUM"; -const std::string IMBNUM::data::itemName = "data"; - - -IMKRVD::IMKRVD( ) : ParserKeyword("IMKRVD") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("ENDSCALE","NUM_TABLES"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("IMKRVD"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Length"); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string IMKRVD::keywordName = "IMKRVD"; -const std::string IMKRVD::DATA::itemName = "DATA"; - - -IMPES::IMPES( ) : ParserKeyword("IMPES") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("IMPES"); -} -const std::string IMPES::keywordName = "IMPES"; - - -IMPTVD::IMPTVD( ) : ParserKeyword("IMPTVD") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("ENDSCALE","NUM_TABLES"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("IMPTVD"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Length"); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string IMPTVD::keywordName = "IMPTVD"; -const std::string IMPTVD::DATA::itemName = "DATA"; - - -INCLUDE::INCLUDE( ) : ParserKeyword("INCLUDE") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - addValidSectionName("GRID"); - addValidSectionName("PROPS"); - addValidSectionName("REGIONS"); - addValidSectionName("RUNSPEC"); - addValidSectionName("SCHEDULE"); - addValidSectionName("SOLUTION"); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("INCLUDE"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("IncludeFile",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string INCLUDE::keywordName = "INCLUDE"; -const std::string INCLUDE::IncludeFile::itemName = "IncludeFile"; - - -INIT::INIT( ) : ParserKeyword("INIT") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("INIT"); -} -const std::string INIT::keywordName = "INIT"; - - -IPCG::IPCG( ) : ParserKeyword("IPCG") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("IPCG"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string IPCG::keywordName = "IPCG"; -const std::string IPCG::data::itemName = "data"; - - -IPCW::IPCW( ) : ParserKeyword("IPCW") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("IPCW"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string IPCW::keywordName = "IPCW"; -const std::string IPCW::data::itemName = "data"; - - -ISGCR::ISGCR( ) : ParserKeyword("ISGCR") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("ISGCR"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string ISGCR::keywordName = "ISGCR"; -const std::string ISGCR::data::itemName = "data"; - - -ISGL::ISGL( ) : ParserKeyword("ISGL") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("ISGL"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string ISGL::keywordName = "ISGL"; -const std::string ISGL::data::itemName = "data"; - - -ISGU::ISGU( ) : ParserKeyword("ISGU") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("ISGU"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string ISGU::keywordName = "ISGU"; -const std::string ISGU::data::itemName = "data"; - - -ISOGCR::ISOGCR( ) : ParserKeyword("ISOGCR") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("ISOGCR"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string ISOGCR::keywordName = "ISOGCR"; -const std::string ISOGCR::data::itemName = "data"; - - -ISOWCR::ISOWCR( ) : ParserKeyword("ISOWCR") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("ISOWCR"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string ISOWCR::keywordName = "ISOWCR"; -const std::string ISOWCR::data::itemName = "data"; - - -ISWCR::ISWCR( ) : ParserKeyword("ISWCR") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("ISWCR"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string ISWCR::keywordName = "ISWCR"; -const std::string ISWCR::data::itemName = "data"; - - -ISWL::ISWL( ) : ParserKeyword("ISWL") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("ISWL"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string ISWL::keywordName = "ISWL"; -const std::string ISWL::data::itemName = "data"; - - -ISWU::ISWU( ) : ParserKeyword("ISWU") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("ISWU"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string ISWU::keywordName = "ISWU"; -const std::string ISWU::data::itemName = "data"; - - -JFUNC::JFUNC( ) : ParserKeyword("JFUNC") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("JFUNC"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("FLAG",Opm::SINGLE,"BOTH")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("OW_SURFACE_TENSION",Opm::SINGLE,-1)); - item->setDescription(""); - item->push_backDimension("SurfaceTension"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("GO_SURFACE_TENSION",Opm::SINGLE,-1)); - item->setDescription(""); - item->push_backDimension("SurfaceTension"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("ALPHA_FACTOR",Opm::SINGLE,0.5)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("BETA_FACTOR",Opm::SINGLE,0.5)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("DIRECTION",Opm::SINGLE,"XY")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string JFUNC::keywordName = "JFUNC"; -const std::string JFUNC::FLAG::itemName = "FLAG"; -const std::string JFUNC::FLAG::defaultValue = "BOTH"; -const std::string JFUNC::OW_SURFACE_TENSION::itemName = "OW_SURFACE_TENSION"; -const double JFUNC::OW_SURFACE_TENSION::defaultValue = -1; -const std::string JFUNC::GO_SURFACE_TENSION::itemName = "GO_SURFACE_TENSION"; -const double JFUNC::GO_SURFACE_TENSION::defaultValue = -1; -const std::string JFUNC::ALPHA_FACTOR::itemName = "ALPHA_FACTOR"; -const double JFUNC::ALPHA_FACTOR::defaultValue = 0.5; -const std::string JFUNC::BETA_FACTOR::itemName = "BETA_FACTOR"; -const double JFUNC::BETA_FACTOR::defaultValue = 0.5; -const std::string JFUNC::DIRECTION::itemName = "DIRECTION"; -const std::string JFUNC::DIRECTION::defaultValue = "XY"; - - -MAPAXES::MAPAXES( ) : ParserKeyword("MAPAXES") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("MAPAXES"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("X1",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("Y1",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("X2",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("Y2",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("X3",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("Y3",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string MAPAXES::keywordName = "MAPAXES"; -const std::string MAPAXES::X1::itemName = "X1"; -const std::string MAPAXES::Y1::itemName = "Y1"; -const std::string MAPAXES::X2::itemName = "X2"; -const std::string MAPAXES::Y2::itemName = "Y2"; -const std::string MAPAXES::X3::itemName = "X3"; -const std::string MAPAXES::Y3::itemName = "Y3"; - - -MAPUNITS::MAPUNITS( ) : ParserKeyword("MAPUNITS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("MAPUNITS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("UNIT",Opm::SINGLE,"METRES")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string MAPUNITS::keywordName = "MAPUNITS"; -const std::string MAPUNITS::UNIT::itemName = "UNIT"; -const std::string MAPUNITS::UNIT::defaultValue = "METRES"; - - -MAXVALUE::MAXVALUE( ) : ParserKeyword("MAXVALUE") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - addValidSectionName("GRID"); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("MAXVALUE"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("field",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("value",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string MAXVALUE::keywordName = "MAXVALUE"; -const std::string MAXVALUE::field::itemName = "field"; -const std::string MAXVALUE::value::itemName = "value"; -const std::string MAXVALUE::I1::itemName = "I1"; -const std::string MAXVALUE::I2::itemName = "I2"; -const std::string MAXVALUE::J1::itemName = "J1"; -const std::string MAXVALUE::J2::itemName = "J2"; -const std::string MAXVALUE::K1::itemName = "K1"; -const std::string MAXVALUE::K2::itemName = "K2"; - - -MEMORY::MEMORY( ) : ParserKeyword("MEMORY") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("MEMORY"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("UNUSED",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("THOUSANDS_CHAR8",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string MEMORY::keywordName = "MEMORY"; -const std::string MEMORY::UNUSED::itemName = "UNUSED"; -const std::string MEMORY::THOUSANDS_CHAR8::itemName = "THOUSANDS_CHAR8"; - - -MESSAGES::MESSAGES( ) : ParserKeyword("MESSAGES") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - addValidSectionName("GRID"); - addValidSectionName("PROPS"); - addValidSectionName("REGIONS"); - addValidSectionName("RUNSPEC"); - addValidSectionName("SCHEDULE"); - addValidSectionName("SOLUTION"); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("MESSAGES"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("MESSAGE_PRINT_LIMIT",Opm::SINGLE,1000000)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("COMMENT_PRINT_LIMIT",Opm::SINGLE,1000000)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("WARNING_PRINT_LIMIT",Opm::SINGLE,10000)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("PROBLEM_PRINT_LIMIT",Opm::SINGLE,100)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ERROR_PRINT_LIMIT",Opm::SINGLE,100)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("BUG_PRINT_LIMIT",Opm::SINGLE,100)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MESSAGE_STOP_LIMIT",Opm::SINGLE,1000000)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("COMMENT_STOP_LIMIT",Opm::SINGLE,1000000)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("WARNING_STOP_LIMIT",Opm::SINGLE,10000)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("PROBLEM_STOP_LIMIT",Opm::SINGLE,100)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ERROR_STOP_LIMIT",Opm::SINGLE,10)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("BUG_STOP_LIMIT",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string MESSAGES::keywordName = "MESSAGES"; -const std::string MESSAGES::MESSAGE_PRINT_LIMIT::itemName = "MESSAGE_PRINT_LIMIT"; -const int MESSAGES::MESSAGE_PRINT_LIMIT::defaultValue = 1000000; -const std::string MESSAGES::COMMENT_PRINT_LIMIT::itemName = "COMMENT_PRINT_LIMIT"; -const int MESSAGES::COMMENT_PRINT_LIMIT::defaultValue = 1000000; -const std::string MESSAGES::WARNING_PRINT_LIMIT::itemName = "WARNING_PRINT_LIMIT"; -const int MESSAGES::WARNING_PRINT_LIMIT::defaultValue = 10000; -const std::string MESSAGES::PROBLEM_PRINT_LIMIT::itemName = "PROBLEM_PRINT_LIMIT"; -const int MESSAGES::PROBLEM_PRINT_LIMIT::defaultValue = 100; -const std::string MESSAGES::ERROR_PRINT_LIMIT::itemName = "ERROR_PRINT_LIMIT"; -const int MESSAGES::ERROR_PRINT_LIMIT::defaultValue = 100; -const std::string MESSAGES::BUG_PRINT_LIMIT::itemName = "BUG_PRINT_LIMIT"; -const int MESSAGES::BUG_PRINT_LIMIT::defaultValue = 100; -const std::string MESSAGES::MESSAGE_STOP_LIMIT::itemName = "MESSAGE_STOP_LIMIT"; -const int MESSAGES::MESSAGE_STOP_LIMIT::defaultValue = 1000000; -const std::string MESSAGES::COMMENT_STOP_LIMIT::itemName = "COMMENT_STOP_LIMIT"; -const int MESSAGES::COMMENT_STOP_LIMIT::defaultValue = 1000000; -const std::string MESSAGES::WARNING_STOP_LIMIT::itemName = "WARNING_STOP_LIMIT"; -const int MESSAGES::WARNING_STOP_LIMIT::defaultValue = 10000; -const std::string MESSAGES::PROBLEM_STOP_LIMIT::itemName = "PROBLEM_STOP_LIMIT"; -const int MESSAGES::PROBLEM_STOP_LIMIT::defaultValue = 100; -const std::string MESSAGES::ERROR_STOP_LIMIT::itemName = "ERROR_STOP_LIMIT"; -const int MESSAGES::ERROR_STOP_LIMIT::defaultValue = 10; -const std::string MESSAGES::BUG_STOP_LIMIT::itemName = "BUG_STOP_LIMIT"; -const int MESSAGES::BUG_STOP_LIMIT::defaultValue = 1; - - -METRIC::METRIC( ) : ParserKeyword("METRIC") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("METRIC"); -} -const std::string METRIC::keywordName = "METRIC"; - - -MINPV::MINPV( ) : ParserKeyword("MINPV") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("MINPV"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("VALUE",Opm::SINGLE,9.9999999999999995e-07)); - item->setDescription(""); - item->push_backDimension("ReservoirVolume"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string MINPV::keywordName = "MINPV"; -const std::string MINPV::VALUE::itemName = "VALUE"; -const double MINPV::VALUE::defaultValue = 1e-06; - - -MINPVFIL::MINPVFIL( ) : ParserKeyword("MINPVFIL") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("MINPVFIL"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("VALUE",Opm::SINGLE,9.9999999999999995e-07)); - item->setDescription(""); - item->push_backDimension("LiquidSurfaceVolume"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string MINPVFIL::keywordName = "MINPVFIL"; -const std::string MINPVFIL::VALUE::itemName = "VALUE"; -const double MINPVFIL::VALUE::defaultValue = 1e-06; - - -MINVALUE::MINVALUE( ) : ParserKeyword("MINVALUE") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - addValidSectionName("GRID"); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("MINVALUE"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("field",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("value",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string MINVALUE::keywordName = "MINVALUE"; -const std::string MINVALUE::field::itemName = "field"; -const std::string MINVALUE::value::itemName = "value"; -const std::string MINVALUE::I1::itemName = "I1"; -const std::string MINVALUE::I2::itemName = "I2"; -const std::string MINVALUE::J1::itemName = "J1"; -const std::string MINVALUE::J2::itemName = "J2"; -const std::string MINVALUE::K1::itemName = "K1"; -const std::string MINVALUE::K2::itemName = "K2"; - - -MISC::MISC( ) : ParserKeyword("MISC") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("MISCIBLE","NTMISC"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("MISC"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string MISC::keywordName = "MISC"; -const std::string MISC::DATA::itemName = "DATA"; - - -MISCIBLE::MISCIBLE( ) : ParserKeyword("MISCIBLE") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("MISCIBLE"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("NTMISC",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NSMISC",Opm::SINGLE,20)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("TWOPOINT",Opm::SINGLE,"NONE")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string MISCIBLE::keywordName = "MISCIBLE"; -const std::string MISCIBLE::NTMISC::itemName = "NTMISC"; -const int MISCIBLE::NTMISC::defaultValue = 1; -const std::string MISCIBLE::NSMISC::itemName = "NSMISC"; -const int MISCIBLE::NSMISC::defaultValue = 20; -const std::string MISCIBLE::TWOPOINT::itemName = "TWOPOINT"; -const std::string MISCIBLE::TWOPOINT::defaultValue = "NONE"; - - -MISCNUM::MISCNUM( ) : ParserKeyword("MISCNUM") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("REGIONS"); - clearDeckNames(); - addDeckName("MISCNUM"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("data",Opm::ALL)); - item->setDescription(""); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string MISCNUM::keywordName = "MISCNUM"; -const std::string MISCNUM::data::itemName = "data"; - - -MONITOR::MONITOR( ) : ParserKeyword("MONITOR") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("MONITOR"); -} -const std::string MONITOR::keywordName = "MONITOR"; - - -MSFN::MSFN( ) : ParserKeyword("MSFN") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTSFUN"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("MSFN"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("table",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string MSFN::keywordName = "MSFN"; -const std::string MSFN::table::itemName = "table"; - - -MSGFILE::MSGFILE( ) : ParserKeyword("MSGFILE") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("MSGFILE"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("ENABLE_FLAG",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string MSGFILE::keywordName = "MSGFILE"; -const std::string MSGFILE::ENABLE_FLAG::itemName = "ENABLE_FLAG"; - - -MULTFLT::MULTFLT( ) : ParserKeyword("MULTFLT") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - addValidSectionName("GRID"); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("MULTFLT"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("fault",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("factor",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string MULTFLT::keywordName = "MULTFLT"; -const std::string MULTFLT::fault::itemName = "fault"; -const std::string MULTFLT::factor::itemName = "factor"; - - -MULTIPLY::MULTIPLY( ) : ParserKeyword("MULTIPLY") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - addValidSectionName("GRID"); - addValidSectionName("PROPS"); - addValidSectionName("REGIONS"); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("MULTIPLY"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("field",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("factor",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string MULTIPLY::keywordName = "MULTIPLY"; -const std::string MULTIPLY::field::itemName = "field"; -const std::string MULTIPLY::factor::itemName = "factor"; -const std::string MULTIPLY::I1::itemName = "I1"; -const std::string MULTIPLY::I2::itemName = "I2"; -const std::string MULTIPLY::J1::itemName = "J1"; -const std::string MULTIPLY::J2::itemName = "J2"; -const std::string MULTIPLY::K1::itemName = "K1"; -const std::string MULTIPLY::K2::itemName = "K2"; - - -MULTIREG::MULTIREG( ) : ParserKeyword("MULTIREG") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - addValidSectionName("GRID"); - addValidSectionName("PROPS"); - addValidSectionName("REGIONS"); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("MULTIREG"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("ARRAY",Opm::SINGLE)); - item->setDescription("The 3D array we will update"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("FACTOR",Opm::SINGLE,0)); - item->setDescription("The value we will multiply with"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("REGION_NUMBER",Opm::SINGLE)); - item->setDescription("The region number we are interested in"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("REGION_NAME",Opm::SINGLE,"M")); - item->setDescription("The name of the region we are interested in"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string MULTIREG::keywordName = "MULTIREG"; -const std::string MULTIREG::ARRAY::itemName = "ARRAY"; -const std::string MULTIREG::FACTOR::itemName = "FACTOR"; -const double MULTIREG::FACTOR::defaultValue = 0; -const std::string MULTIREG::REGION_NUMBER::itemName = "REGION_NUMBER"; -const std::string MULTIREG::REGION_NAME::itemName = "REGION_NAME"; -const std::string MULTIREG::REGION_NAME::defaultValue = "M"; - - -MULTNUM::MULTNUM( ) : ParserKeyword("MULTNUM") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("MULTNUM"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("data",Opm::ALL)); - item->setDescription(""); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string MULTNUM::keywordName = "MULTNUM"; -const std::string MULTNUM::data::itemName = "data"; - - -MULTPV::MULTPV( ) : ParserKeyword("MULTPV") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("MULTPV"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string MULTPV::keywordName = "MULTPV"; -const std::string MULTPV::data::itemName = "data"; - - -MULTREGP::MULTREGP( ) : ParserKeyword("MULTREGP") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("MULTREGP"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("REGION",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("MULTIPLIER",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("REGION_TYPE",Opm::SINGLE,"M")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string MULTREGP::keywordName = "MULTREGP"; -const std::string MULTREGP::REGION::itemName = "REGION"; -const std::string MULTREGP::MULTIPLIER::itemName = "MULTIPLIER"; -const std::string MULTREGP::REGION_TYPE::itemName = "REGION_TYPE"; -const std::string MULTREGP::REGION_TYPE::defaultValue = "M"; - - -MULTREGT::MULTREGT( ) : ParserKeyword("MULTREGT") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - addValidSectionName("GRID"); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("MULTREGT"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("SRC_REGION",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("TARGET_REGION",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("TRAN_MULT",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("DIRECTIONS",Opm::SINGLE,"XYZ")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("NNC_MULT",Opm::SINGLE,"ALL")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("REGION_DEF",Opm::SINGLE,"M")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string MULTREGT::keywordName = "MULTREGT"; -const std::string MULTREGT::SRC_REGION::itemName = "SRC_REGION"; -const std::string MULTREGT::TARGET_REGION::itemName = "TARGET_REGION"; -const std::string MULTREGT::TRAN_MULT::itemName = "TRAN_MULT"; -const std::string MULTREGT::DIRECTIONS::itemName = "DIRECTIONS"; -const std::string MULTREGT::DIRECTIONS::defaultValue = "XYZ"; -const std::string MULTREGT::NNC_MULT::itemName = "NNC_MULT"; -const std::string MULTREGT::NNC_MULT::defaultValue = "ALL"; -const std::string MULTREGT::REGION_DEF::itemName = "REGION_DEF"; -const std::string MULTREGT::REGION_DEF::defaultValue = "M"; - - -MULT_XYZ::MULT_XYZ( ) : ParserKeyword("MULT_XYZ") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("MULTX"); - addDeckName("MULTX-"); - addDeckName("MULTY"); - addDeckName("MULTY-"); - addDeckName("MULTZ"); - addDeckName("MULTZ-"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string MULT_XYZ::keywordName = "MULT_XYZ"; -const std::string MULT_XYZ::data::itemName = "data"; - - -MW::MW( ) : ParserKeyword("MW") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NUM_STATE_EQ"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("MW"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("MOLAR_WEIGHT",Opm::ALL)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string MW::keywordName = "MW"; -const std::string MW::MOLAR_WEIGHT::itemName = "MOLAR_WEIGHT"; - - -MWS::MWS( ) : ParserKeyword("MWS") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NUM_STATE_EQ"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("MWS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("MOLAR_WEIGHT",Opm::ALL)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string MWS::keywordName = "MWS"; -const std::string MWS::MOLAR_WEIGHT::itemName = "MOLAR_WEIGHT"; - - -NETBALAN::NETBALAN( ) : ParserKeyword("NETBALAN") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - addValidSectionName("SPECIAL"); - clearDeckNames(); - addDeckName("NETBALAN"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("TIME_INTERVAL",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("PRESSURE_CONVERGENCE_LIMT",Opm::SINGLE,1.0000000000000001e-05)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_ITER",Opm::SINGLE,10)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("THP_CONVERGENCE_LIMIT",Opm::SINGLE,0.01)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_ITER_THP",Opm::SINGLE,10)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("TARGET_BALANCE_ERROR",Opm::SINGLE,1e+20)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("MAX_BALANCE_ERROR",Opm::SINGLE,1e+20)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("MIN_TIME_STEP",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string NETBALAN::keywordName = "NETBALAN"; -const std::string NETBALAN::TIME_INTERVAL::itemName = "TIME_INTERVAL"; -const double NETBALAN::TIME_INTERVAL::defaultValue = 0; -const std::string NETBALAN::PRESSURE_CONVERGENCE_LIMT::itemName = "PRESSURE_CONVERGENCE_LIMT"; -const double NETBALAN::PRESSURE_CONVERGENCE_LIMT::defaultValue = 1e-05; -const std::string NETBALAN::MAX_ITER::itemName = "MAX_ITER"; -const int NETBALAN::MAX_ITER::defaultValue = 10; -const std::string NETBALAN::THP_CONVERGENCE_LIMIT::itemName = "THP_CONVERGENCE_LIMIT"; -const double NETBALAN::THP_CONVERGENCE_LIMIT::defaultValue = 0.01; -const std::string NETBALAN::MAX_ITER_THP::itemName = "MAX_ITER_THP"; -const int NETBALAN::MAX_ITER_THP::defaultValue = 10; -const std::string NETBALAN::TARGET_BALANCE_ERROR::itemName = "TARGET_BALANCE_ERROR"; -const double NETBALAN::TARGET_BALANCE_ERROR::defaultValue = 1e+20; -const std::string NETBALAN::MAX_BALANCE_ERROR::itemName = "MAX_BALANCE_ERROR"; -const double NETBALAN::MAX_BALANCE_ERROR::defaultValue = 1e+20; -const std::string NETBALAN::MIN_TIME_STEP::itemName = "MIN_TIME_STEP"; - - -NEWTRAN::NEWTRAN( ) : ParserKeyword("NEWTRAN") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("NEWTRAN"); -} -const std::string NEWTRAN::keywordName = "NEWTRAN"; - - -NEXTSTEP::NEXTSTEP( ) : ParserKeyword("NEXTSTEP") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("NEXTSTEP"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("MAX_STEP",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Time"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("APPLY_TO_ALL",Opm::SINGLE,"NO")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string NEXTSTEP::keywordName = "NEXTSTEP"; -const std::string NEXTSTEP::MAX_STEP::itemName = "MAX_STEP"; -const std::string NEXTSTEP::APPLY_TO_ALL::itemName = "APPLY_TO_ALL"; -const std::string NEXTSTEP::APPLY_TO_ALL::defaultValue = "NO"; - - -NNC::NNC( ) : ParserKeyword("NNC") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("NNC"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("I1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("TRAN",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("Transmissibility"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("SIM_DEPENDENT1",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("ContextDependent"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("SIM_DEPENDENT2",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("ContextDependent"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("PRESSURE_TABLE1",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("PRESSURE_TABLE2",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("VE_FACE1",Opm::SINGLE,"")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("VE_FACE2",Opm::SINGLE,"")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("DIFFUSIVITY",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("SIM_DEPENDENT3",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("ContextDependent"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("VDFLOW_AREA",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("Length*Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("VDFLOW_PERM",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("Permeability"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string NNC::keywordName = "NNC"; -const std::string NNC::I1::itemName = "I1"; -const std::string NNC::J1::itemName = "J1"; -const std::string NNC::K1::itemName = "K1"; -const std::string NNC::I2::itemName = "I2"; -const std::string NNC::J2::itemName = "J2"; -const std::string NNC::K2::itemName = "K2"; -const std::string NNC::TRAN::itemName = "TRAN"; -const double NNC::TRAN::defaultValue = 0; -const std::string NNC::SIM_DEPENDENT1::itemName = "SIM_DEPENDENT1"; -const double NNC::SIM_DEPENDENT1::defaultValue = 0; -const std::string NNC::SIM_DEPENDENT2::itemName = "SIM_DEPENDENT2"; -const double NNC::SIM_DEPENDENT2::defaultValue = 0; -const std::string NNC::PRESSURE_TABLE1::itemName = "PRESSURE_TABLE1"; -const int NNC::PRESSURE_TABLE1::defaultValue = 0; -const std::string NNC::PRESSURE_TABLE2::itemName = "PRESSURE_TABLE2"; -const int NNC::PRESSURE_TABLE2::defaultValue = 0; -const std::string NNC::VE_FACE1::itemName = "VE_FACE1"; -const std::string NNC::VE_FACE1::defaultValue = ""; -const std::string NNC::VE_FACE2::itemName = "VE_FACE2"; -const std::string NNC::VE_FACE2::defaultValue = ""; -const std::string NNC::DIFFUSIVITY::itemName = "DIFFUSIVITY"; -const double NNC::DIFFUSIVITY::defaultValue = 0; -const std::string NNC::SIM_DEPENDENT3::itemName = "SIM_DEPENDENT3"; -const double NNC::SIM_DEPENDENT3::defaultValue = 0; -const std::string NNC::VDFLOW_AREA::itemName = "VDFLOW_AREA"; -const double NNC::VDFLOW_AREA::defaultValue = 0; -const std::string NNC::VDFLOW_PERM::itemName = "VDFLOW_PERM"; -const double NNC::VDFLOW_PERM::defaultValue = 0; - - -NOCASC::NOCASC( ) : ParserKeyword("NOCASC") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("NOCASC"); -} -const std::string NOCASC::keywordName = "NOCASC"; - - -NOECHO::NOECHO( ) : ParserKeyword("NOECHO") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - addValidSectionName("GRID"); - addValidSectionName("PROPS"); - addValidSectionName("REGIONS"); - addValidSectionName("RUNSPEC"); - addValidSectionName("SCHEDULE"); - addValidSectionName("SOLUTION"); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("NOECHO"); -} -const std::string NOECHO::keywordName = "NOECHO"; - - -NOGGF::NOGGF( ) : ParserKeyword("NOGGF") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("NOGGF"); -} -const std::string NOGGF::keywordName = "NOGGF"; - - -NOGRAV::NOGRAV( ) : ParserKeyword("NOGRAV") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("NOGRAV"); -} -const std::string NOGRAV::keywordName = "NOGRAV"; - - -NOINSPEC::NOINSPEC( ) : ParserKeyword("NOINSPEC") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("NOINSPEC"); -} -const std::string NOINSPEC::keywordName = "NOINSPEC"; - - -NOMONITO::NOMONITO( ) : ParserKeyword("NOMONITO") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("NOMONITO"); -} -const std::string NOMONITO::keywordName = "NOMONITO"; - - -NONNC::NONNC( ) : ParserKeyword("NONNC") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("NONNC"); -} -const std::string NONNC::keywordName = "NONNC"; - - -NORSSPEC::NORSSPEC( ) : ParserKeyword("NORSSPEC") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("NORSSPEC"); -} -const std::string NORSSPEC::keywordName = "NORSSPEC"; - - -NOSIM::NOSIM( ) : ParserKeyword("NOSIM") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("NOSIM"); -} -const std::string NOSIM::keywordName = "NOSIM"; - - -NSTACK::NSTACK( ) : ParserKeyword("NSTACK") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("NSTACK"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("LINEAR_SOLVER_SIZE",Opm::SINGLE,10)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string NSTACK::keywordName = "NSTACK"; -const std::string NSTACK::LINEAR_SOLVER_SIZE::itemName = "LINEAR_SOLVER_SIZE"; -const int NSTACK::LINEAR_SOLVER_SIZE::defaultValue = 10; - - -NTG::NTG( ) : ParserKeyword("NTG") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("NTG"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string NTG::keywordName = "NTG"; -const std::string NTG::data::itemName = "data"; - - -NUMRES::NUMRES( ) : ParserKeyword("NUMRES") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("NUMRES"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("num",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string NUMRES::keywordName = "NUMRES"; -const std::string NUMRES::num::itemName = "num"; -const int NUMRES::num::defaultValue = 1; - - -NUPCOL::NUPCOL( ) : ParserKeyword("NUPCOL") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("NUPCOL"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("NUM_ITER",Opm::SINGLE,3)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string NUPCOL::keywordName = "NUPCOL"; -const std::string NUPCOL::NUM_ITER::itemName = "NUM_ITER"; -const int NUPCOL::NUM_ITER::defaultValue = 3; - - -OCOMPIDX::OCOMPIDX( ) : ParserKeyword("OCOMPIDX") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("OCOMPIDX"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("OIL_COMPONENT_INDEX",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string OCOMPIDX::keywordName = "OCOMPIDX"; -const std::string OCOMPIDX::OIL_COMPONENT_INDEX::itemName = "OIL_COMPONENT_INDEX"; - - -OIL::OIL( ) : ParserKeyword("OIL") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("OIL"); -} -const std::string OIL::keywordName = "OIL"; - - -OILCOMPR::OILCOMPR( ) : ParserKeyword("OILCOMPR") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTPVT"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("OILCOMPR"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("COMPRESSIBILITY",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("EXPANSION_COEFF_LINEAR",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("1/AbsoluteTemperature"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("EXPANSION_COEFF_QUADRATIC",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("1/AbsoluteTemperature*AbsoluteTemperature"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string OILCOMPR::keywordName = "OILCOMPR"; -const std::string OILCOMPR::COMPRESSIBILITY::itemName = "COMPRESSIBILITY"; -const double OILCOMPR::COMPRESSIBILITY::defaultValue = 0; -const std::string OILCOMPR::EXPANSION_COEFF_LINEAR::itemName = "EXPANSION_COEFF_LINEAR"; -const double OILCOMPR::EXPANSION_COEFF_LINEAR::defaultValue = 0; -const std::string OILCOMPR::EXPANSION_COEFF_QUADRATIC::itemName = "EXPANSION_COEFF_QUADRATIC"; -const double OILCOMPR::EXPANSION_COEFF_QUADRATIC::defaultValue = 0; - - -OILMW::OILMW( ) : ParserKeyword("OILMW") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTPVT"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("OILMW"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("MOLAR_WEIGHT",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string OILMW::keywordName = "OILMW"; -const std::string OILMW::MOLAR_WEIGHT::itemName = "MOLAR_WEIGHT"; - - -OILVISCT::OILVISCT( ) : ParserKeyword("OILVISCT") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTPVT"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("OILVISCT"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Temperature"); - item->push_backDimension("Viscosity"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string OILVISCT::keywordName = "OILVISCT"; -const std::string OILVISCT::DATA::itemName = "DATA"; - - -OILVTIM::OILVTIM( ) : ParserKeyword("OILVTIM") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("OILVTIM"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("INTERPOLATION_METHOD",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string OILVTIM::keywordName = "OILVTIM"; -const std::string OILVTIM::INTERPOLATION_METHOD::itemName = "INTERPOLATION_METHOD"; - - -OLDTRAN::OLDTRAN( ) : ParserKeyword("OLDTRAN") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("OLDTRAN"); -} -const std::string OLDTRAN::keywordName = "OLDTRAN"; - - -OPERATE::OPERATE( ) : ParserKeyword("OPERATE") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - addValidSectionName("GRID"); - addValidSectionName("PROPS"); - addValidSectionName("REGIONS"); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("OPERATE"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("RESULT_ARRAY",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("OPERATION",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("ARRAY_ARG",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("PARAM1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("PARAM2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string OPERATE::keywordName = "OPERATE"; -const std::string OPERATE::RESULT_ARRAY::itemName = "RESULT_ARRAY"; -const std::string OPERATE::I1::itemName = "I1"; -const std::string OPERATE::I2::itemName = "I2"; -const std::string OPERATE::J1::itemName = "J1"; -const std::string OPERATE::J2::itemName = "J2"; -const std::string OPERATE::K1::itemName = "K1"; -const std::string OPERATE::K2::itemName = "K2"; -const std::string OPERATE::OPERATION::itemName = "OPERATION"; -const std::string OPERATE::ARRAY_ARG::itemName = "ARRAY_ARG"; -const std::string OPERATE::PARAM1::itemName = "PARAM1"; -const std::string OPERATE::PARAM2::itemName = "PARAM2"; - - -OPTIONS::OPTIONS( ) : ParserKeyword("OPTIONS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("OPTIONS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("ITEM1",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM2",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM3",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM4",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM5",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM6",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM7",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM8",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM9",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM10",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM11",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM12",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM13",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM14",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM15",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM16",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM17",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM18",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM19",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM20",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM21",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM22",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM23",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM24",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM25",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM26",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM27",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM28",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM29",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM30",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM31",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM32",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM33",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM34",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM35",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM36",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM37",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM38",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM39",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM40",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM41",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM42",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM43",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM44",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM45",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM46",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM47",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM48",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM49",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM50",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM51",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM52",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM53",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM54",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM55",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM56",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM57",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM58",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM59",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM60",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM61",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM62",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM63",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM64",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM65",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM66",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM67",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM68",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM69",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM70",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM71",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM72",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM73",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM74",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM75",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM76",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM77",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM78",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM79",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM80",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM81",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM82",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM83",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM84",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM85",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM86",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM87",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM88",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM89",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM90",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM91",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM92",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM93",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM94",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM95",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM96",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM97",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM98",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM99",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM100",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM101",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM102",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM103",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM104",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM105",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM106",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM107",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM108",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM109",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM110",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM111",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM112",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM113",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM114",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM115",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM116",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM117",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM118",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM119",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM120",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM121",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM122",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM123",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM124",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM125",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM126",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM127",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM128",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM129",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM130",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM131",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM132",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM133",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM134",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM135",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM136",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM137",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM138",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM139",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM140",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM141",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM142",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM143",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM144",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM145",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM146",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM147",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM148",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM149",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM150",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM151",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM152",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM153",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM154",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM155",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM156",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM157",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM158",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM159",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM160",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM161",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM162",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM163",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM164",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM165",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM166",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM167",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM168",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM169",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM170",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM171",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM172",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM173",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM174",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM175",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM176",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM177",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM178",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM179",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM180",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM181",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM182",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM183",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM184",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM185",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM186",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM187",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM188",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM189",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM190",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM191",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM192",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM193",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM194",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM195",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM196",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ITEM197",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string OPTIONS::keywordName = "OPTIONS"; -const std::string OPTIONS::ITEM1::itemName = "ITEM1"; -const int OPTIONS::ITEM1::defaultValue = 0; -const std::string OPTIONS::ITEM2::itemName = "ITEM2"; -const int OPTIONS::ITEM2::defaultValue = 0; -const std::string OPTIONS::ITEM3::itemName = "ITEM3"; -const int OPTIONS::ITEM3::defaultValue = 0; -const std::string OPTIONS::ITEM4::itemName = "ITEM4"; -const int OPTIONS::ITEM4::defaultValue = 0; -const std::string OPTIONS::ITEM5::itemName = "ITEM5"; -const int OPTIONS::ITEM5::defaultValue = 0; -const std::string OPTIONS::ITEM6::itemName = "ITEM6"; -const int OPTIONS::ITEM6::defaultValue = 0; -const std::string OPTIONS::ITEM7::itemName = "ITEM7"; -const int OPTIONS::ITEM7::defaultValue = 0; -const std::string OPTIONS::ITEM8::itemName = "ITEM8"; -const int OPTIONS::ITEM8::defaultValue = 0; -const std::string OPTIONS::ITEM9::itemName = "ITEM9"; -const int OPTIONS::ITEM9::defaultValue = 0; -const std::string OPTIONS::ITEM10::itemName = "ITEM10"; -const int OPTIONS::ITEM10::defaultValue = 0; -const std::string OPTIONS::ITEM11::itemName = "ITEM11"; -const int OPTIONS::ITEM11::defaultValue = 0; -const std::string OPTIONS::ITEM12::itemName = "ITEM12"; -const int OPTIONS::ITEM12::defaultValue = 0; -const std::string OPTIONS::ITEM13::itemName = "ITEM13"; -const int OPTIONS::ITEM13::defaultValue = 0; -const std::string OPTIONS::ITEM14::itemName = "ITEM14"; -const int OPTIONS::ITEM14::defaultValue = 0; -const std::string OPTIONS::ITEM15::itemName = "ITEM15"; -const int OPTIONS::ITEM15::defaultValue = 0; -const std::string OPTIONS::ITEM16::itemName = "ITEM16"; -const int OPTIONS::ITEM16::defaultValue = 0; -const std::string OPTIONS::ITEM17::itemName = "ITEM17"; -const int OPTIONS::ITEM17::defaultValue = 0; -const std::string OPTIONS::ITEM18::itemName = "ITEM18"; -const int OPTIONS::ITEM18::defaultValue = 0; -const std::string OPTIONS::ITEM19::itemName = "ITEM19"; -const int OPTIONS::ITEM19::defaultValue = 0; -const std::string OPTIONS::ITEM20::itemName = "ITEM20"; -const int OPTIONS::ITEM20::defaultValue = 0; -const std::string OPTIONS::ITEM21::itemName = "ITEM21"; -const int OPTIONS::ITEM21::defaultValue = 0; -const std::string OPTIONS::ITEM22::itemName = "ITEM22"; -const int OPTIONS::ITEM22::defaultValue = 0; -const std::string OPTIONS::ITEM23::itemName = "ITEM23"; -const int OPTIONS::ITEM23::defaultValue = 0; -const std::string OPTIONS::ITEM24::itemName = "ITEM24"; -const int OPTIONS::ITEM24::defaultValue = 0; -const std::string OPTIONS::ITEM25::itemName = "ITEM25"; -const int OPTIONS::ITEM25::defaultValue = 0; -const std::string OPTIONS::ITEM26::itemName = "ITEM26"; -const int OPTIONS::ITEM26::defaultValue = 0; -const std::string OPTIONS::ITEM27::itemName = "ITEM27"; -const int OPTIONS::ITEM27::defaultValue = 0; -const std::string OPTIONS::ITEM28::itemName = "ITEM28"; -const int OPTIONS::ITEM28::defaultValue = 0; -const std::string OPTIONS::ITEM29::itemName = "ITEM29"; -const int OPTIONS::ITEM29::defaultValue = 0; -const std::string OPTIONS::ITEM30::itemName = "ITEM30"; -const int OPTIONS::ITEM30::defaultValue = 0; -const std::string OPTIONS::ITEM31::itemName = "ITEM31"; -const int OPTIONS::ITEM31::defaultValue = 0; -const std::string OPTIONS::ITEM32::itemName = "ITEM32"; -const int OPTIONS::ITEM32::defaultValue = 0; -const std::string OPTIONS::ITEM33::itemName = "ITEM33"; -const int OPTIONS::ITEM33::defaultValue = 0; -const std::string OPTIONS::ITEM34::itemName = "ITEM34"; -const int OPTIONS::ITEM34::defaultValue = 0; -const std::string OPTIONS::ITEM35::itemName = "ITEM35"; -const int OPTIONS::ITEM35::defaultValue = 0; -const std::string OPTIONS::ITEM36::itemName = "ITEM36"; -const int OPTIONS::ITEM36::defaultValue = 0; -const std::string OPTIONS::ITEM37::itemName = "ITEM37"; -const int OPTIONS::ITEM37::defaultValue = 0; -const std::string OPTIONS::ITEM38::itemName = "ITEM38"; -const int OPTIONS::ITEM38::defaultValue = 0; -const std::string OPTIONS::ITEM39::itemName = "ITEM39"; -const int OPTIONS::ITEM39::defaultValue = 0; -const std::string OPTIONS::ITEM40::itemName = "ITEM40"; -const int OPTIONS::ITEM40::defaultValue = 0; -const std::string OPTIONS::ITEM41::itemName = "ITEM41"; -const int OPTIONS::ITEM41::defaultValue = 0; -const std::string OPTIONS::ITEM42::itemName = "ITEM42"; -const int OPTIONS::ITEM42::defaultValue = 0; -const std::string OPTIONS::ITEM43::itemName = "ITEM43"; -const int OPTIONS::ITEM43::defaultValue = 0; -const std::string OPTIONS::ITEM44::itemName = "ITEM44"; -const int OPTIONS::ITEM44::defaultValue = 0; -const std::string OPTIONS::ITEM45::itemName = "ITEM45"; -const int OPTIONS::ITEM45::defaultValue = 0; -const std::string OPTIONS::ITEM46::itemName = "ITEM46"; -const int OPTIONS::ITEM46::defaultValue = 0; -const std::string OPTIONS::ITEM47::itemName = "ITEM47"; -const int OPTIONS::ITEM47::defaultValue = 0; -const std::string OPTIONS::ITEM48::itemName = "ITEM48"; -const int OPTIONS::ITEM48::defaultValue = 0; -const std::string OPTIONS::ITEM49::itemName = "ITEM49"; -const int OPTIONS::ITEM49::defaultValue = 0; -const std::string OPTIONS::ITEM50::itemName = "ITEM50"; -const int OPTIONS::ITEM50::defaultValue = 0; -const std::string OPTIONS::ITEM51::itemName = "ITEM51"; -const int OPTIONS::ITEM51::defaultValue = 0; -const std::string OPTIONS::ITEM52::itemName = "ITEM52"; -const int OPTIONS::ITEM52::defaultValue = 0; -const std::string OPTIONS::ITEM53::itemName = "ITEM53"; -const int OPTIONS::ITEM53::defaultValue = 0; -const std::string OPTIONS::ITEM54::itemName = "ITEM54"; -const int OPTIONS::ITEM54::defaultValue = 0; -const std::string OPTIONS::ITEM55::itemName = "ITEM55"; -const int OPTIONS::ITEM55::defaultValue = 0; -const std::string OPTIONS::ITEM56::itemName = "ITEM56"; -const int OPTIONS::ITEM56::defaultValue = 0; -const std::string OPTIONS::ITEM57::itemName = "ITEM57"; -const int OPTIONS::ITEM57::defaultValue = 0; -const std::string OPTIONS::ITEM58::itemName = "ITEM58"; -const int OPTIONS::ITEM58::defaultValue = 0; -const std::string OPTIONS::ITEM59::itemName = "ITEM59"; -const int OPTIONS::ITEM59::defaultValue = 0; -const std::string OPTIONS::ITEM60::itemName = "ITEM60"; -const int OPTIONS::ITEM60::defaultValue = 0; -const std::string OPTIONS::ITEM61::itemName = "ITEM61"; -const int OPTIONS::ITEM61::defaultValue = 0; -const std::string OPTIONS::ITEM62::itemName = "ITEM62"; -const int OPTIONS::ITEM62::defaultValue = 0; -const std::string OPTIONS::ITEM63::itemName = "ITEM63"; -const int OPTIONS::ITEM63::defaultValue = 0; -const std::string OPTIONS::ITEM64::itemName = "ITEM64"; -const int OPTIONS::ITEM64::defaultValue = 0; -const std::string OPTIONS::ITEM65::itemName = "ITEM65"; -const int OPTIONS::ITEM65::defaultValue = 0; -const std::string OPTIONS::ITEM66::itemName = "ITEM66"; -const int OPTIONS::ITEM66::defaultValue = 0; -const std::string OPTIONS::ITEM67::itemName = "ITEM67"; -const int OPTIONS::ITEM67::defaultValue = 0; -const std::string OPTIONS::ITEM68::itemName = "ITEM68"; -const int OPTIONS::ITEM68::defaultValue = 0; -const std::string OPTIONS::ITEM69::itemName = "ITEM69"; -const int OPTIONS::ITEM69::defaultValue = 0; -const std::string OPTIONS::ITEM70::itemName = "ITEM70"; -const int OPTIONS::ITEM70::defaultValue = 0; -const std::string OPTIONS::ITEM71::itemName = "ITEM71"; -const int OPTIONS::ITEM71::defaultValue = 0; -const std::string OPTIONS::ITEM72::itemName = "ITEM72"; -const int OPTIONS::ITEM72::defaultValue = 0; -const std::string OPTIONS::ITEM73::itemName = "ITEM73"; -const int OPTIONS::ITEM73::defaultValue = 0; -const std::string OPTIONS::ITEM74::itemName = "ITEM74"; -const int OPTIONS::ITEM74::defaultValue = 0; -const std::string OPTIONS::ITEM75::itemName = "ITEM75"; -const int OPTIONS::ITEM75::defaultValue = 0; -const std::string OPTIONS::ITEM76::itemName = "ITEM76"; -const int OPTIONS::ITEM76::defaultValue = 0; -const std::string OPTIONS::ITEM77::itemName = "ITEM77"; -const int OPTIONS::ITEM77::defaultValue = 0; -const std::string OPTIONS::ITEM78::itemName = "ITEM78"; -const int OPTIONS::ITEM78::defaultValue = 0; -const std::string OPTIONS::ITEM79::itemName = "ITEM79"; -const int OPTIONS::ITEM79::defaultValue = 0; -const std::string OPTIONS::ITEM80::itemName = "ITEM80"; -const int OPTIONS::ITEM80::defaultValue = 0; -const std::string OPTIONS::ITEM81::itemName = "ITEM81"; -const int OPTIONS::ITEM81::defaultValue = 0; -const std::string OPTIONS::ITEM82::itemName = "ITEM82"; -const int OPTIONS::ITEM82::defaultValue = 0; -const std::string OPTIONS::ITEM83::itemName = "ITEM83"; -const int OPTIONS::ITEM83::defaultValue = 0; -const std::string OPTIONS::ITEM84::itemName = "ITEM84"; -const int OPTIONS::ITEM84::defaultValue = 0; -const std::string OPTIONS::ITEM85::itemName = "ITEM85"; -const int OPTIONS::ITEM85::defaultValue = 0; -const std::string OPTIONS::ITEM86::itemName = "ITEM86"; -const int OPTIONS::ITEM86::defaultValue = 0; -const std::string OPTIONS::ITEM87::itemName = "ITEM87"; -const int OPTIONS::ITEM87::defaultValue = 0; -const std::string OPTIONS::ITEM88::itemName = "ITEM88"; -const int OPTIONS::ITEM88::defaultValue = 0; -const std::string OPTIONS::ITEM89::itemName = "ITEM89"; -const int OPTIONS::ITEM89::defaultValue = 0; -const std::string OPTIONS::ITEM90::itemName = "ITEM90"; -const int OPTIONS::ITEM90::defaultValue = 0; -const std::string OPTIONS::ITEM91::itemName = "ITEM91"; -const int OPTIONS::ITEM91::defaultValue = 0; -const std::string OPTIONS::ITEM92::itemName = "ITEM92"; -const int OPTIONS::ITEM92::defaultValue = 0; -const std::string OPTIONS::ITEM93::itemName = "ITEM93"; -const int OPTIONS::ITEM93::defaultValue = 0; -const std::string OPTIONS::ITEM94::itemName = "ITEM94"; -const int OPTIONS::ITEM94::defaultValue = 0; -const std::string OPTIONS::ITEM95::itemName = "ITEM95"; -const int OPTIONS::ITEM95::defaultValue = 0; -const std::string OPTIONS::ITEM96::itemName = "ITEM96"; -const int OPTIONS::ITEM96::defaultValue = 0; -const std::string OPTIONS::ITEM97::itemName = "ITEM97"; -const int OPTIONS::ITEM97::defaultValue = 0; -const std::string OPTIONS::ITEM98::itemName = "ITEM98"; -const int OPTIONS::ITEM98::defaultValue = 0; -const std::string OPTIONS::ITEM99::itemName = "ITEM99"; -const int OPTIONS::ITEM99::defaultValue = 0; -const std::string OPTIONS::ITEM100::itemName = "ITEM100"; -const int OPTIONS::ITEM100::defaultValue = 0; -const std::string OPTIONS::ITEM101::itemName = "ITEM101"; -const int OPTIONS::ITEM101::defaultValue = 0; -const std::string OPTIONS::ITEM102::itemName = "ITEM102"; -const int OPTIONS::ITEM102::defaultValue = 0; -const std::string OPTIONS::ITEM103::itemName = "ITEM103"; -const int OPTIONS::ITEM103::defaultValue = 0; -const std::string OPTIONS::ITEM104::itemName = "ITEM104"; -const int OPTIONS::ITEM104::defaultValue = 0; -const std::string OPTIONS::ITEM105::itemName = "ITEM105"; -const int OPTIONS::ITEM105::defaultValue = 0; -const std::string OPTIONS::ITEM106::itemName = "ITEM106"; -const int OPTIONS::ITEM106::defaultValue = 0; -const std::string OPTIONS::ITEM107::itemName = "ITEM107"; -const int OPTIONS::ITEM107::defaultValue = 0; -const std::string OPTIONS::ITEM108::itemName = "ITEM108"; -const int OPTIONS::ITEM108::defaultValue = 0; -const std::string OPTIONS::ITEM109::itemName = "ITEM109"; -const int OPTIONS::ITEM109::defaultValue = 0; -const std::string OPTIONS::ITEM110::itemName = "ITEM110"; -const int OPTIONS::ITEM110::defaultValue = 0; -const std::string OPTIONS::ITEM111::itemName = "ITEM111"; -const int OPTIONS::ITEM111::defaultValue = 0; -const std::string OPTIONS::ITEM112::itemName = "ITEM112"; -const int OPTIONS::ITEM112::defaultValue = 0; -const std::string OPTIONS::ITEM113::itemName = "ITEM113"; -const int OPTIONS::ITEM113::defaultValue = 0; -const std::string OPTIONS::ITEM114::itemName = "ITEM114"; -const int OPTIONS::ITEM114::defaultValue = 0; -const std::string OPTIONS::ITEM115::itemName = "ITEM115"; -const int OPTIONS::ITEM115::defaultValue = 0; -const std::string OPTIONS::ITEM116::itemName = "ITEM116"; -const int OPTIONS::ITEM116::defaultValue = 0; -const std::string OPTIONS::ITEM117::itemName = "ITEM117"; -const int OPTIONS::ITEM117::defaultValue = 0; -const std::string OPTIONS::ITEM118::itemName = "ITEM118"; -const int OPTIONS::ITEM118::defaultValue = 0; -const std::string OPTIONS::ITEM119::itemName = "ITEM119"; -const int OPTIONS::ITEM119::defaultValue = 0; -const std::string OPTIONS::ITEM120::itemName = "ITEM120"; -const int OPTIONS::ITEM120::defaultValue = 0; -const std::string OPTIONS::ITEM121::itemName = "ITEM121"; -const int OPTIONS::ITEM121::defaultValue = 0; -const std::string OPTIONS::ITEM122::itemName = "ITEM122"; -const int OPTIONS::ITEM122::defaultValue = 0; -const std::string OPTIONS::ITEM123::itemName = "ITEM123"; -const int OPTIONS::ITEM123::defaultValue = 0; -const std::string OPTIONS::ITEM124::itemName = "ITEM124"; -const int OPTIONS::ITEM124::defaultValue = 0; -const std::string OPTIONS::ITEM125::itemName = "ITEM125"; -const int OPTIONS::ITEM125::defaultValue = 0; -const std::string OPTIONS::ITEM126::itemName = "ITEM126"; -const int OPTIONS::ITEM126::defaultValue = 0; -const std::string OPTIONS::ITEM127::itemName = "ITEM127"; -const int OPTIONS::ITEM127::defaultValue = 0; -const std::string OPTIONS::ITEM128::itemName = "ITEM128"; -const int OPTIONS::ITEM128::defaultValue = 0; -const std::string OPTIONS::ITEM129::itemName = "ITEM129"; -const int OPTIONS::ITEM129::defaultValue = 0; -const std::string OPTIONS::ITEM130::itemName = "ITEM130"; -const int OPTIONS::ITEM130::defaultValue = 0; -const std::string OPTIONS::ITEM131::itemName = "ITEM131"; -const int OPTIONS::ITEM131::defaultValue = 0; -const std::string OPTIONS::ITEM132::itemName = "ITEM132"; -const int OPTIONS::ITEM132::defaultValue = 0; -const std::string OPTIONS::ITEM133::itemName = "ITEM133"; -const int OPTIONS::ITEM133::defaultValue = 0; -const std::string OPTIONS::ITEM134::itemName = "ITEM134"; -const int OPTIONS::ITEM134::defaultValue = 0; -const std::string OPTIONS::ITEM135::itemName = "ITEM135"; -const int OPTIONS::ITEM135::defaultValue = 0; -const std::string OPTIONS::ITEM136::itemName = "ITEM136"; -const int OPTIONS::ITEM136::defaultValue = 0; -const std::string OPTIONS::ITEM137::itemName = "ITEM137"; -const int OPTIONS::ITEM137::defaultValue = 0; -const std::string OPTIONS::ITEM138::itemName = "ITEM138"; -const int OPTIONS::ITEM138::defaultValue = 0; -const std::string OPTIONS::ITEM139::itemName = "ITEM139"; -const int OPTIONS::ITEM139::defaultValue = 0; -const std::string OPTIONS::ITEM140::itemName = "ITEM140"; -const int OPTIONS::ITEM140::defaultValue = 0; -const std::string OPTIONS::ITEM141::itemName = "ITEM141"; -const int OPTIONS::ITEM141::defaultValue = 0; -const std::string OPTIONS::ITEM142::itemName = "ITEM142"; -const int OPTIONS::ITEM142::defaultValue = 0; -const std::string OPTIONS::ITEM143::itemName = "ITEM143"; -const int OPTIONS::ITEM143::defaultValue = 0; -const std::string OPTIONS::ITEM144::itemName = "ITEM144"; -const int OPTIONS::ITEM144::defaultValue = 0; -const std::string OPTIONS::ITEM145::itemName = "ITEM145"; -const int OPTIONS::ITEM145::defaultValue = 0; -const std::string OPTIONS::ITEM146::itemName = "ITEM146"; -const int OPTIONS::ITEM146::defaultValue = 0; -const std::string OPTIONS::ITEM147::itemName = "ITEM147"; -const int OPTIONS::ITEM147::defaultValue = 0; -const std::string OPTIONS::ITEM148::itemName = "ITEM148"; -const int OPTIONS::ITEM148::defaultValue = 0; -const std::string OPTIONS::ITEM149::itemName = "ITEM149"; -const int OPTIONS::ITEM149::defaultValue = 0; -const std::string OPTIONS::ITEM150::itemName = "ITEM150"; -const int OPTIONS::ITEM150::defaultValue = 0; -const std::string OPTIONS::ITEM151::itemName = "ITEM151"; -const int OPTIONS::ITEM151::defaultValue = 0; -const std::string OPTIONS::ITEM152::itemName = "ITEM152"; -const int OPTIONS::ITEM152::defaultValue = 0; -const std::string OPTIONS::ITEM153::itemName = "ITEM153"; -const int OPTIONS::ITEM153::defaultValue = 0; -const std::string OPTIONS::ITEM154::itemName = "ITEM154"; -const int OPTIONS::ITEM154::defaultValue = 0; -const std::string OPTIONS::ITEM155::itemName = "ITEM155"; -const int OPTIONS::ITEM155::defaultValue = 0; -const std::string OPTIONS::ITEM156::itemName = "ITEM156"; -const int OPTIONS::ITEM156::defaultValue = 0; -const std::string OPTIONS::ITEM157::itemName = "ITEM157"; -const int OPTIONS::ITEM157::defaultValue = 0; -const std::string OPTIONS::ITEM158::itemName = "ITEM158"; -const int OPTIONS::ITEM158::defaultValue = 0; -const std::string OPTIONS::ITEM159::itemName = "ITEM159"; -const int OPTIONS::ITEM159::defaultValue = 0; -const std::string OPTIONS::ITEM160::itemName = "ITEM160"; -const int OPTIONS::ITEM160::defaultValue = 0; -const std::string OPTIONS::ITEM161::itemName = "ITEM161"; -const int OPTIONS::ITEM161::defaultValue = 0; -const std::string OPTIONS::ITEM162::itemName = "ITEM162"; -const int OPTIONS::ITEM162::defaultValue = 0; -const std::string OPTIONS::ITEM163::itemName = "ITEM163"; -const int OPTIONS::ITEM163::defaultValue = 0; -const std::string OPTIONS::ITEM164::itemName = "ITEM164"; -const int OPTIONS::ITEM164::defaultValue = 0; -const std::string OPTIONS::ITEM165::itemName = "ITEM165"; -const int OPTIONS::ITEM165::defaultValue = 0; -const std::string OPTIONS::ITEM166::itemName = "ITEM166"; -const int OPTIONS::ITEM166::defaultValue = 0; -const std::string OPTIONS::ITEM167::itemName = "ITEM167"; -const int OPTIONS::ITEM167::defaultValue = 0; -const std::string OPTIONS::ITEM168::itemName = "ITEM168"; -const int OPTIONS::ITEM168::defaultValue = 0; -const std::string OPTIONS::ITEM169::itemName = "ITEM169"; -const int OPTIONS::ITEM169::defaultValue = 0; -const std::string OPTIONS::ITEM170::itemName = "ITEM170"; -const int OPTIONS::ITEM170::defaultValue = 0; -const std::string OPTIONS::ITEM171::itemName = "ITEM171"; -const int OPTIONS::ITEM171::defaultValue = 0; -const std::string OPTIONS::ITEM172::itemName = "ITEM172"; -const int OPTIONS::ITEM172::defaultValue = 0; -const std::string OPTIONS::ITEM173::itemName = "ITEM173"; -const int OPTIONS::ITEM173::defaultValue = 0; -const std::string OPTIONS::ITEM174::itemName = "ITEM174"; -const int OPTIONS::ITEM174::defaultValue = 0; -const std::string OPTIONS::ITEM175::itemName = "ITEM175"; -const int OPTIONS::ITEM175::defaultValue = 0; -const std::string OPTIONS::ITEM176::itemName = "ITEM176"; -const int OPTIONS::ITEM176::defaultValue = 0; -const std::string OPTIONS::ITEM177::itemName = "ITEM177"; -const int OPTIONS::ITEM177::defaultValue = 0; -const std::string OPTIONS::ITEM178::itemName = "ITEM178"; -const int OPTIONS::ITEM178::defaultValue = 0; -const std::string OPTIONS::ITEM179::itemName = "ITEM179"; -const int OPTIONS::ITEM179::defaultValue = 0; -const std::string OPTIONS::ITEM180::itemName = "ITEM180"; -const int OPTIONS::ITEM180::defaultValue = 0; -const std::string OPTIONS::ITEM181::itemName = "ITEM181"; -const int OPTIONS::ITEM181::defaultValue = 0; -const std::string OPTIONS::ITEM182::itemName = "ITEM182"; -const int OPTIONS::ITEM182::defaultValue = 0; -const std::string OPTIONS::ITEM183::itemName = "ITEM183"; -const int OPTIONS::ITEM183::defaultValue = 0; -const std::string OPTIONS::ITEM184::itemName = "ITEM184"; -const int OPTIONS::ITEM184::defaultValue = 0; -const std::string OPTIONS::ITEM185::itemName = "ITEM185"; -const int OPTIONS::ITEM185::defaultValue = 0; -const std::string OPTIONS::ITEM186::itemName = "ITEM186"; -const int OPTIONS::ITEM186::defaultValue = 0; -const std::string OPTIONS::ITEM187::itemName = "ITEM187"; -const int OPTIONS::ITEM187::defaultValue = 0; -const std::string OPTIONS::ITEM188::itemName = "ITEM188"; -const int OPTIONS::ITEM188::defaultValue = 0; -const std::string OPTIONS::ITEM189::itemName = "ITEM189"; -const int OPTIONS::ITEM189::defaultValue = 0; -const std::string OPTIONS::ITEM190::itemName = "ITEM190"; -const int OPTIONS::ITEM190::defaultValue = 0; -const std::string OPTIONS::ITEM191::itemName = "ITEM191"; -const int OPTIONS::ITEM191::defaultValue = 0; -const std::string OPTIONS::ITEM192::itemName = "ITEM192"; -const int OPTIONS::ITEM192::defaultValue = 0; -const std::string OPTIONS::ITEM193::itemName = "ITEM193"; -const int OPTIONS::ITEM193::defaultValue = 0; -const std::string OPTIONS::ITEM194::itemName = "ITEM194"; -const int OPTIONS::ITEM194::defaultValue = 0; -const std::string OPTIONS::ITEM195::itemName = "ITEM195"; -const int OPTIONS::ITEM195::defaultValue = 0; -const std::string OPTIONS::ITEM196::itemName = "ITEM196"; -const int OPTIONS::ITEM196::defaultValue = 0; -const std::string OPTIONS::ITEM197::itemName = "ITEM197"; -const int OPTIONS::ITEM197::defaultValue = 0; - - -PARALLEL::PARALLEL( ) : ParserKeyword("PARALLEL") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("PARALLEL"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("NDMAIN",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("MACHINE_TYPE",Opm::SINGLE,"DISTRIBUTED")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string PARALLEL::keywordName = "PARALLEL"; -const std::string PARALLEL::NDMAIN::itemName = "NDMAIN"; -const int PARALLEL::NDMAIN::defaultValue = 1; -const std::string PARALLEL::MACHINE_TYPE::itemName = "MACHINE_TYPE"; -const std::string PARALLEL::MACHINE_TYPE::defaultValue = "DISTRIBUTED"; - - -PATHS::PATHS( ) : ParserKeyword("PATHS") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("PATHS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("PathName",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("PathValue",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string PATHS::keywordName = "PATHS"; -const std::string PATHS::PathName::itemName = "PathName"; -const std::string PATHS::PathValue::itemName = "PathValue"; - - -PBVD::PBVD( ) : ParserKeyword("PBVD") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("EQLDIMS","NTEQUL"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("PBVD"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("table",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Length"); - item->push_backDimension("Pressure"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string PBVD::keywordName = "PBVD"; -const std::string PBVD::table::itemName = "table"; - - -PCG::PCG( ) : ParserKeyword("PCG") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("PCG"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string PCG::keywordName = "PCG"; -const std::string PCG::data::itemName = "data"; - - -PERFORMANCE_PROBE::PERFORMANCE_PROBE( ) : ParserKeyword("PERFORMANCE_PROBE") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("ELAPSED"); - addDeckName("HLINEARS"); - addDeckName("HSUMLINS"); - addDeckName("MAXDPR"); - addDeckName("MAXDSG"); - addDeckName("MAXDSO"); - addDeckName("MAXDSW"); - addDeckName("MEMORYTS"); - addDeckName("MLINEARS"); - addDeckName("MSUMLINS"); - addDeckName("MSUMNEWT"); - addDeckName("NBYTOT"); - addDeckName("NEWTON"); - addDeckName("NLINEARS"); - addDeckName("NLINSMAX"); - addDeckName("NLINSMIN"); - addDeckName("PERFORMA"); - addDeckName("STEPTYPE"); - addDeckName("TCPU"); - addDeckName("TCPUDAY"); - addDeckName("TCPUH"); - addDeckName("TCPUHT"); - addDeckName("TCPUSCH"); - addDeckName("TCPUTS"); - addDeckName("TCPUTSH"); - addDeckName("TCPUTSHT"); - addDeckName("TELAPDAY"); - addDeckName("TELAPLIN"); - addDeckName("TELAPTS"); - addDeckName("TIMESTEP"); - addDeckName("WNEWTON"); - addDeckName("ZIPEFF"); - addDeckName("ZIPEFFC"); -} -const std::string PERFORMANCE_PROBE::keywordName = "PERFORMANCE_PROBE"; - - -PERMX::PERMX( ) : ParserKeyword("PERMX") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("PERMX"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Permeability"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string PERMX::keywordName = "PERMX"; -const std::string PERMX::data::itemName = "data"; - - -PERMXY::PERMXY( ) : ParserKeyword("PERMXY") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("PERMXY"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Permeability"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string PERMXY::keywordName = "PERMXY"; -const std::string PERMXY::data::itemName = "data"; - - -PERMY::PERMY( ) : ParserKeyword("PERMY") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("PERMY"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL,0)); - item->setDescription(""); - item->push_backDimension("Permeability"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string PERMY::keywordName = "PERMY"; -const std::string PERMY::data::itemName = "data"; -const double PERMY::data::defaultValue = 0; - - -PERMYZ::PERMYZ( ) : ParserKeyword("PERMYZ") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("PERMYZ"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Permeability"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string PERMYZ::keywordName = "PERMYZ"; -const std::string PERMYZ::data::itemName = "data"; - - -PERMZ::PERMZ( ) : ParserKeyword("PERMZ") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("PERMZ"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL,0)); - item->setDescription(""); - item->push_backDimension("Permeability"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string PERMZ::keywordName = "PERMZ"; -const std::string PERMZ::data::itemName = "data"; -const double PERMZ::data::defaultValue = 0; - - -PERMZX::PERMZX( ) : ParserKeyword("PERMZX") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("PERMZX"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Permeability"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string PERMZX::keywordName = "PERMZX"; -const std::string PERMZX::data::itemName = "data"; - - -PIMTDIMS::PIMTDIMS( ) : ParserKeyword("PIMTDIMS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("PIMTDIMS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("NTPIMT",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NPPIMT",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string PIMTDIMS::keywordName = "PIMTDIMS"; -const std::string PIMTDIMS::NTPIMT::itemName = "NTPIMT"; -const int PIMTDIMS::NTPIMT::defaultValue = 0; -const std::string PIMTDIMS::NPPIMT::itemName = "NPPIMT"; -const int PIMTDIMS::NPPIMT::defaultValue = 0; - - -PIMULTAB::PIMULTAB( ) : ParserKeyword("PIMULTAB") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("PIMTDIMS","NTPIMT"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("PIMULTAB"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("TABLE",Opm::ALL)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string PIMULTAB::keywordName = "PIMULTAB"; -const std::string PIMULTAB::TABLE::itemName = "TABLE"; - - -PINCH::PINCH( ) : ParserKeyword("PINCH") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("PINCH"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("THRESHOLD_THICKNESS",Opm::SINGLE,0.001)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("CONTROL_OPTION",Opm::SINGLE,"GAP")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("MAX_EMPTY_GAP",Opm::SINGLE,1e+20)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("PINCHOUT_OPTION",Opm::SINGLE,"TOPBOT")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("MULTZ_OPTION",Opm::SINGLE,"TOP")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string PINCH::keywordName = "PINCH"; -const std::string PINCH::THRESHOLD_THICKNESS::itemName = "THRESHOLD_THICKNESS"; -const double PINCH::THRESHOLD_THICKNESS::defaultValue = 0.001; -const std::string PINCH::CONTROL_OPTION::itemName = "CONTROL_OPTION"; -const std::string PINCH::CONTROL_OPTION::defaultValue = "GAP"; -const std::string PINCH::MAX_EMPTY_GAP::itemName = "MAX_EMPTY_GAP"; -const double PINCH::MAX_EMPTY_GAP::defaultValue = 1e+20; -const std::string PINCH::PINCHOUT_OPTION::itemName = "PINCHOUT_OPTION"; -const std::string PINCH::PINCHOUT_OPTION::defaultValue = "TOPBOT"; -const std::string PINCH::MULTZ_OPTION::itemName = "MULTZ_OPTION"; -const std::string PINCH::MULTZ_OPTION::defaultValue = "TOP"; - - -PLMIXPAR::PLMIXPAR( ) : ParserKeyword("PLMIXPAR") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("REGDIMS","NPLMIX"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("PLMIXPAR"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("TODD_LONGSTAFF",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string PLMIXPAR::keywordName = "PLMIXPAR"; -const std::string PLMIXPAR::TODD_LONGSTAFF::itemName = "TODD_LONGSTAFF"; - - -PLYADS::PLYADS( ) : ParserKeyword("PLYADS") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTSFUN"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - addValidSectionName("SPECIAL"); - clearDeckNames(); - addDeckName("PLYADS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("PolymerDensity"); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string PLYADS::keywordName = "PLYADS"; -const std::string PLYADS::DATA::itemName = "DATA"; - - -PLYADSS::PLYADSS( ) : ParserKeyword("PLYADSS") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTSFUN"); -setTableCollection( true ); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("PLYADSS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("POLYMER_C",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("PolymerDensity"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("POLYMER_ADS_C",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("1"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string PLYADSS::keywordName = "PLYADSS"; -const std::string PLYADSS::POLYMER_C::itemName = "POLYMER_C"; -const std::string PLYADSS::POLYMER_ADS_C::itemName = "POLYMER_ADS_C"; -const std::string PLYADSS::DATA::itemName = "DATA"; - - -PLYDHFLF::PLYDHFLF( ) : ParserKeyword("PLYDHFLF") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTPVT"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - addValidSectionName("SCHEDULE"); - addValidSectionName("SPECIAL"); - clearDeckNames(); - addDeckName("PLYDHFLF"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Temperature"); - item->push_backDimension("Time"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string PLYDHFLF::keywordName = "PLYDHFLF"; -const std::string PLYDHFLF::DATA::itemName = "DATA"; - - -PLYMAX::PLYMAX( ) : ParserKeyword("PLYMAX") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("REGDIMS","NPLMIX"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - addValidSectionName("SPECIAL"); - clearDeckNames(); - addDeckName("PLYMAX"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("MAX_POLYMER_CONCENTRATION",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("PolymerDensity"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("MAX_SALT_CONCENTRATION",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("PolymerDensity"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string PLYMAX::keywordName = "PLYMAX"; -const std::string PLYMAX::MAX_POLYMER_CONCENTRATION::itemName = "MAX_POLYMER_CONCENTRATION"; -const std::string PLYMAX::MAX_SALT_CONCENTRATION::itemName = "MAX_SALT_CONCENTRATION"; - - -PLYROCK::PLYROCK( ) : ParserKeyword("PLYROCK") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTSFUN"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - addValidSectionName("SPECIAL"); - clearDeckNames(); - addDeckName("PLYROCK"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("IPV",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("1"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("RRF",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("1"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("ROCK_DENSITY",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Density"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("AI",Opm::SINGLE,1)); - item->setDescription(""); - item->push_backDimension("1"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("MAX_ADSORPTION",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string PLYROCK::keywordName = "PLYROCK"; -const std::string PLYROCK::IPV::itemName = "IPV"; -const std::string PLYROCK::RRF::itemName = "RRF"; -const std::string PLYROCK::ROCK_DENSITY::itemName = "ROCK_DENSITY"; -const std::string PLYROCK::AI::itemName = "AI"; -const double PLYROCK::AI::defaultValue = 1; -const std::string PLYROCK::MAX_ADSORPTION::itemName = "MAX_ADSORPTION"; - - -PLYSHEAR::PLYSHEAR( ) : ParserKeyword("PLYSHEAR") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTPVT"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - addValidSectionName("SPECIAL"); - clearDeckNames(); - addDeckName("PLYSHEAR"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("WATER_VELOCITY",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Length/Time"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("VRF",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string PLYSHEAR::keywordName = "PLYSHEAR"; -const std::string PLYSHEAR::WATER_VELOCITY::itemName = "WATER_VELOCITY"; -const std::string PLYSHEAR::VRF::itemName = "VRF"; - - -PLYSHLOG::PLYSHLOG( ) : ParserKeyword("PLYSHLOG") { - setFixedSize( (size_t) 2); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - addValidSectionName("SCHEDULE"); - addValidSectionName("SPECIAL"); - clearDeckNames(); - addDeckName("PLYSHLOG"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("REF_POLYMER_CONCENTRATION",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("PolymerDensity"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("REF_SALINITY",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Salinity"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("REF_TEMPERATURE",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Temperature"); - record->addItem(item); - } - addRecord( record ); - } - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string PLYSHLOG::keywordName = "PLYSHLOG"; -const std::string PLYSHLOG::REF_POLYMER_CONCENTRATION::itemName = "REF_POLYMER_CONCENTRATION"; -const std::string PLYSHLOG::REF_SALINITY::itemName = "REF_SALINITY"; -const std::string PLYSHLOG::REF_TEMPERATURE::itemName = "REF_TEMPERATURE"; -const std::string PLYSHLOG::DATA::itemName = "DATA"; - - -PLYVISC::PLYVISC( ) : ParserKeyword("PLYVISC") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTPVT"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - addValidSectionName("SCHEDULE"); - addValidSectionName("SPECIAL"); - clearDeckNames(); - addDeckName("PLYVISC"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("PolymerDensity"); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string PLYVISC::keywordName = "PLYVISC"; -const std::string PLYVISC::DATA::itemName = "DATA"; - - -PMISC::PMISC( ) : ParserKeyword("PMISC") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("MISCIBLE","NTMISC"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("PMISC"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Pressure"); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string PMISC::keywordName = "PMISC"; -const std::string PMISC::DATA::itemName = "DATA"; - - -POLYMER::POLYMER( ) : ParserKeyword("POLYMER") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("POLYMER"); -} -const std::string POLYMER::keywordName = "POLYMER"; - - -PORO::PORO( ) : ParserKeyword("PORO") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("PORO"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL,0)); - item->setDescription(""); - item->push_backDimension("1"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string PORO::keywordName = "PORO"; -const std::string PORO::data::itemName = "data"; -const double PORO::data::defaultValue = 0; - - -PORV::PORV( ) : ParserKeyword("PORV") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - clearDeckNames(); - addDeckName("PORV"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("ReservoirVolume"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string PORV::keywordName = "PORV"; -const std::string PORV::data::itemName = "data"; - - -PREF::PREF( ) : ParserKeyword("PREF") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NUM_STATE_EQ"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("PREF"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("PRESSURE",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string PREF::keywordName = "PREF"; -const std::string PREF::PRESSURE::itemName = "PRESSURE"; - - -PREFS::PREFS( ) : ParserKeyword("PREFS") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NUM_STATE_EQ"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("PREFS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("PRESSURE",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string PREFS::keywordName = "PREFS"; -const std::string PREFS::PRESSURE::itemName = "PRESSURE"; - - -PRESSURE::PRESSURE( ) : ParserKeyword("PRESSURE") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("PRESSURE"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string PRESSURE::keywordName = "PRESSURE"; -const std::string PRESSURE::data::itemName = "data"; - - -PROPS::PROPS( ) : ParserKeyword("PROPS") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - clearDeckNames(); - addDeckName("PROPS"); -} -const std::string PROPS::keywordName = "PROPS"; - - -PVCDO::PVCDO( ) : ParserKeyword("PVCDO") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTPVT"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("PVCDO"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("P_REF",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("OIL_VOL_FACTOR",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("1"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("OIL_COMPRESSIBILITY",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("1/Pressure"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("OIL_VISCOSITY",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Viscosity"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("OIL_VISCOSIBILITY",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("1/Pressure"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string PVCDO::keywordName = "PVCDO"; -const std::string PVCDO::P_REF::itemName = "P_REF"; -const std::string PVCDO::OIL_VOL_FACTOR::itemName = "OIL_VOL_FACTOR"; -const std::string PVCDO::OIL_COMPRESSIBILITY::itemName = "OIL_COMPRESSIBILITY"; -const std::string PVCDO::OIL_VISCOSITY::itemName = "OIL_VISCOSITY"; -const std::string PVCDO::OIL_VISCOSIBILITY::itemName = "OIL_VISCOSIBILITY"; - - -PVDG::PVDG( ) : ParserKeyword("PVDG") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTPVT"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("PVDG"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Pressure"); - item->push_backDimension("OilDissolutionFactor"); - item->push_backDimension("Viscosity"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string PVDG::keywordName = "PVDG"; -const std::string PVDG::data::itemName = "data"; - - -PVDO::PVDO( ) : ParserKeyword("PVDO") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTPVT"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("PVDO"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Pressure"); - item->push_backDimension("1"); - item->push_backDimension("Viscosity"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string PVDO::keywordName = "PVDO"; -const std::string PVDO::data::itemName = "data"; - - -PVDS::PVDS( ) : ParserKeyword("PVDS") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTPVT"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("PVDS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Pressure"); - item->push_backDimension("OilDissolutionFactor"); - item->push_backDimension("Viscosity"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string PVDS::keywordName = "PVDS"; -const std::string PVDS::data::itemName = "data"; - - -PVTG::PVTG( ) : ParserKeyword("PVTG") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTPVT"); -setTableCollection( true ); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("PVTG"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("GAS_PRESSURE",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("OilDissolutionFactor"); - item->push_backDimension("OilDissolutionFactor"); - item->push_backDimension("Viscosity"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string PVTG::keywordName = "PVTG"; -const std::string PVTG::GAS_PRESSURE::itemName = "GAS_PRESSURE"; -const std::string PVTG::DATA::itemName = "DATA"; - - -PVTNUM::PVTNUM( ) : ParserKeyword("PVTNUM") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("REGIONS"); - clearDeckNames(); - addDeckName("PVTNUM"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("data",Opm::ALL)); - item->setDescription(""); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string PVTNUM::keywordName = "PVTNUM"; -const std::string PVTNUM::data::itemName = "data"; - - -PVTO::PVTO( ) : ParserKeyword("PVTO") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTPVT"); -setTableCollection( true ); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("PVTO"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("RS",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("GasDissolutionFactor"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Pressure"); - item->push_backDimension("1"); - item->push_backDimension("Viscosity"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string PVTO::keywordName = "PVTO"; -const std::string PVTO::RS::itemName = "RS"; -const std::string PVTO::DATA::itemName = "DATA"; - - -PVTW::PVTW( ) : ParserKeyword("PVTW") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTPVT"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("PVTW"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("P_REF",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("WATER_VOL_FACTOR",Opm::SINGLE,1)); - item->setDescription(""); - item->push_backDimension("1"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("WATER_COMPRESSIBILITY",Opm::SINGLE,4.0000000000000003e-05)); - item->setDescription(""); - item->push_backDimension("1/Pressure"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("WATER_VISCOSITY",Opm::SINGLE,0.5)); - item->setDescription(""); - item->push_backDimension("Viscosity"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("WATER_VISCOSIBILITY",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("1/Pressure"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string PVTW::keywordName = "PVTW"; -const std::string PVTW::P_REF::itemName = "P_REF"; -const std::string PVTW::WATER_VOL_FACTOR::itemName = "WATER_VOL_FACTOR"; -const double PVTW::WATER_VOL_FACTOR::defaultValue = 1; -const std::string PVTW::WATER_COMPRESSIBILITY::itemName = "WATER_COMPRESSIBILITY"; -const double PVTW::WATER_COMPRESSIBILITY::defaultValue = 4e-05; -const std::string PVTW::WATER_VISCOSITY::itemName = "WATER_VISCOSITY"; -const double PVTW::WATER_VISCOSITY::defaultValue = 0.5; -const std::string PVTW::WATER_VISCOSIBILITY::itemName = "WATER_VISCOSIBILITY"; -const double PVTW::WATER_VISCOSIBILITY::defaultValue = 0; - - -RADFIN4::RADFIN4( ) : ParserKeyword("RADFIN4") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - addValidSectionName("SPECIAL"); - clearDeckNames(); - addDeckName("RADFIN4"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("NAME",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NR",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NTHETA",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NZ",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NWMAX",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string RADFIN4::keywordName = "RADFIN4"; -const std::string RADFIN4::NAME::itemName = "NAME"; -const std::string RADFIN4::I1::itemName = "I1"; -const std::string RADFIN4::I2::itemName = "I2"; -const std::string RADFIN4::J1::itemName = "J1"; -const std::string RADFIN4::J2::itemName = "J2"; -const std::string RADFIN4::K1::itemName = "K1"; -const std::string RADFIN4::K2::itemName = "K2"; -const std::string RADFIN4::NR::itemName = "NR"; -const std::string RADFIN4::NTHETA::itemName = "NTHETA"; -const std::string RADFIN4::NZ::itemName = "NZ"; -const std::string RADFIN4::NWMAX::itemName = "NWMAX"; -const int RADFIN4::NWMAX::defaultValue = 1; - - -REGDIMS::REGDIMS( ) : ParserKeyword("REGDIMS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("REGDIMS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("NTFIP",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NMFIPR",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NRFREG",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NTFREG",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_ETRACK",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NTCREG",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_OPERNUM",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_OPERATE_DWORK",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_OPERATE_IWORK",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NPLMIX",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string REGDIMS::keywordName = "REGDIMS"; -const std::string REGDIMS::NTFIP::itemName = "NTFIP"; -const int REGDIMS::NTFIP::defaultValue = 1; -const std::string REGDIMS::NMFIPR::itemName = "NMFIPR"; -const int REGDIMS::NMFIPR::defaultValue = 1; -const std::string REGDIMS::NRFREG::itemName = "NRFREG"; -const int REGDIMS::NRFREG::defaultValue = 0; -const std::string REGDIMS::NTFREG::itemName = "NTFREG"; -const int REGDIMS::NTFREG::defaultValue = 0; -const std::string REGDIMS::MAX_ETRACK::itemName = "MAX_ETRACK"; -const int REGDIMS::MAX_ETRACK::defaultValue = 0; -const std::string REGDIMS::NTCREG::itemName = "NTCREG"; -const int REGDIMS::NTCREG::defaultValue = 1; -const std::string REGDIMS::MAX_OPERNUM::itemName = "MAX_OPERNUM"; -const int REGDIMS::MAX_OPERNUM::defaultValue = 0; -const std::string REGDIMS::MAX_OPERATE_DWORK::itemName = "MAX_OPERATE_DWORK"; -const int REGDIMS::MAX_OPERATE_DWORK::defaultValue = 0; -const std::string REGDIMS::MAX_OPERATE_IWORK::itemName = "MAX_OPERATE_IWORK"; -const int REGDIMS::MAX_OPERATE_IWORK::defaultValue = 0; -const std::string REGDIMS::NPLMIX::itemName = "NPLMIX"; -const int REGDIMS::NPLMIX::defaultValue = 1; - - -REGIONS::REGIONS( ) : ParserKeyword("REGIONS") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - clearDeckNames(); - addDeckName("REGIONS"); -} -const std::string REGIONS::keywordName = "REGIONS"; - - -REGION_PROBE::REGION_PROBE( ) : ParserKeyword("REGION_PROBE") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("RAPI"); - addDeckName("RCAD"); - addDeckName("RCFT"); - addDeckName("RCGC"); - addDeckName("RCIP"); - addDeckName("RCSC"); - addDeckName("RGDEN"); - addDeckName("RGFT"); - addDeckName("RGFTG"); - addDeckName("RGFTL"); - addDeckName("RGIP"); - addDeckName("RGIPG"); - addDeckName("RGIPL"); - addDeckName("RGIR"); - addDeckName("RGIT"); - addDeckName("RGP"); - addDeckName("RGPR"); - addDeckName("RGPRF"); - addDeckName("RGPRS"); - addDeckName("RGPT"); - addDeckName("RGPTF"); - addDeckName("RGPTS"); - addDeckName("RGPV"); - addDeckName("RGSAT"); - addDeckName("RGVIS"); - addDeckName("RHPV"); - addDeckName("RNFT"); - addDeckName("RNIP"); - addDeckName("RODEN"); - addDeckName("ROE"); - addDeckName("ROEIG"); - addDeckName("ROEIW"); - addDeckName("ROEW"); - addDeckName("ROEWG"); - addDeckName("ROEWW"); - addDeckName("ROFT"); - addDeckName("ROIP"); - addDeckName("ROIPG"); - addDeckName("ROIPL"); - addDeckName("ROIR"); - addDeckName("ROIT"); - addDeckName("ROP"); - addDeckName("ROPR"); - addDeckName("ROPT"); - addDeckName("ROPV"); - addDeckName("RORFE"); - addDeckName("RORFF"); - addDeckName("RORFG"); - addDeckName("RORFR"); - addDeckName("RORFS"); - addDeckName("RORFW"); - addDeckName("RORFX"); - addDeckName("RORFY"); - addDeckName("RORME"); - addDeckName("RORMF"); - addDeckName("RORMG"); - addDeckName("RORMR"); - addDeckName("RORMS"); - addDeckName("RORMW"); - addDeckName("RORMX"); - addDeckName("RORMY"); - addDeckName("ROSAT"); - addDeckName("ROVIS"); - addDeckName("RPPC"); - addDeckName("RPPG"); - addDeckName("RPPO"); - addDeckName("RPPW"); - addDeckName("RPR"); - addDeckName("RPRGZ"); - addDeckName("RPRH"); - addDeckName("RPRP"); - addDeckName("RRPV"); - addDeckName("RRS"); - addDeckName("RRTM"); - addDeckName("RRV"); - addDeckName("RSFT"); - addDeckName("RSIP"); - addDeckName("RTADSFOA"); - addDeckName("RTADSUR"); - addDeckName("RTDCYFOA"); - addDeckName("RTFTTFOA"); - addDeckName("RTFTTSUR"); - addDeckName("RTIPT"); - addDeckName("RTIPTFOA"); - addDeckName("RTIPTHEA"); - addDeckName("RTIPTSUR"); - addDeckName("RTMOBFOA"); - addDeckName("RWDEN"); - addDeckName("RWFT"); - addDeckName("RWIP"); - addDeckName("RWIR"); - addDeckName("RWIT"); - addDeckName("RWP"); - addDeckName("RWPR"); - addDeckName("RWPT"); - addDeckName("RWPV"); - addDeckName("RWSAT"); - addDeckName("RWVIS"); - setMatchRegex("R[OGW]?[IP][PRT]_.+|RU.+|RTIPF.+|RTIPS.+|RTFTF.+|RTFTS.+|RTFTT.+|RTIPT.+|RTIPF.+|RTIPS.+|RTIP[1-9][0-9]*.+|RTFTT.+|RTFTF.+|RTFTS.+|RTFT[1-9][0-9]*.+|RTADS.+|RTDCY.+"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("REGIONS",Opm::ALL)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string REGION_PROBE::keywordName = "REGION_PROBE"; -const std::string REGION_PROBE::REGIONS::itemName = "REGIONS"; - - -RESTART::RESTART( ) : ParserKeyword("RESTART") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("RESTART"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("ROOTNAME",Opm::SINGLE,"BASE")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("REPORTNUMBER",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("SAVEFILE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("SAVEFILE_FORMAT",Opm::SINGLE,"UNFORMATTED")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string RESTART::keywordName = "RESTART"; -const std::string RESTART::ROOTNAME::itemName = "ROOTNAME"; -const std::string RESTART::ROOTNAME::defaultValue = "BASE"; -const std::string RESTART::REPORTNUMBER::itemName = "REPORTNUMBER"; -const std::string RESTART::SAVEFILE::itemName = "SAVEFILE"; -const std::string RESTART::SAVEFILE_FORMAT::itemName = "SAVEFILE_FORMAT"; -const std::string RESTART::SAVEFILE_FORMAT::defaultValue = "UNFORMATTED"; - - -RKTRMDIR::RKTRMDIR( ) : ParserKeyword("RKTRMDIR") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("RKTRMDIR"); -} -const std::string RKTRMDIR::keywordName = "RKTRMDIR"; - - -ROCK::ROCK( ) : ParserKeyword("ROCK") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTPVT"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("ROCK"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("PREF",Opm::SINGLE,1.0132000000000001)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("COMPRESSIBILITY",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("1/Pressure"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string ROCK::keywordName = "ROCK"; -const std::string ROCK::PREF::itemName = "PREF"; -const double ROCK::PREF::defaultValue = 1.0132; -const std::string ROCK::COMPRESSIBILITY::itemName = "COMPRESSIBILITY"; -const double ROCK::COMPRESSIBILITY::defaultValue = 0; - - -ROCKCOMP::ROCKCOMP( ) : ParserKeyword("ROCKCOMP") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("ROCKCOMP"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("HYSTERESIS",Opm::SINGLE,"REVERS")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NTROCC",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("WATER_COMPACTION",Opm::SINGLE,"NO")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string ROCKCOMP::keywordName = "ROCKCOMP"; -const std::string ROCKCOMP::HYSTERESIS::itemName = "HYSTERESIS"; -const std::string ROCKCOMP::HYSTERESIS::defaultValue = "REVERS"; -const std::string ROCKCOMP::NTROCC::itemName = "NTROCC"; -const int ROCKCOMP::NTROCC::defaultValue = 1; -const std::string ROCKCOMP::WATER_COMPACTION::itemName = "WATER_COMPACTION"; -const std::string ROCKCOMP::WATER_COMPACTION::defaultValue = "NO"; - - -ROCKOPTS::ROCKOPTS( ) : ParserKeyword("ROCKOPTS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("ROCKOPTS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("METHOD",Opm::SINGLE,"PRESSURE")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("REF_PRESSURE",Opm::SINGLE,"NOSTORE")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("TABLE_TYPE",Opm::SINGLE,"PVTNUM")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("HYST_TYPE",Opm::SINGLE,"DEFLATION")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string ROCKOPTS::keywordName = "ROCKOPTS"; -const std::string ROCKOPTS::METHOD::itemName = "METHOD"; -const std::string ROCKOPTS::METHOD::defaultValue = "PRESSURE"; -const std::string ROCKOPTS::REF_PRESSURE::itemName = "REF_PRESSURE"; -const std::string ROCKOPTS::REF_PRESSURE::defaultValue = "NOSTORE"; -const std::string ROCKOPTS::TABLE_TYPE::itemName = "TABLE_TYPE"; -const std::string ROCKOPTS::TABLE_TYPE::defaultValue = "PVTNUM"; -const std::string ROCKOPTS::HYST_TYPE::itemName = "HYST_TYPE"; -const std::string ROCKOPTS::HYST_TYPE::defaultValue = "DEFLATION"; - - -ROCKTAB::ROCKTAB( ) : ParserKeyword("ROCKTAB") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("ROCKCOMP","NTROCC"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("ROCKTAB"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Pressure"); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string ROCKTAB::keywordName = "ROCKTAB"; -const std::string ROCKTAB::DATA::itemName = "DATA"; - - -RPTGRID::RPTGRID( ) : ParserKeyword("RPTGRID") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("RPTGRID"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("DATA",Opm::ALL)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string RPTGRID::keywordName = "RPTGRID"; -const std::string RPTGRID::DATA::itemName = "DATA"; - - -RPTONLY::RPTONLY( ) : ParserKeyword("RPTONLY") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("RPTONLY"); -} -const std::string RPTONLY::keywordName = "RPTONLY"; - - -RPTONLYO::RPTONLYO( ) : ParserKeyword("RPTONLYO") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("RPTONLYO"); -} -const std::string RPTONLYO::keywordName = "RPTONLYO"; - - -RPTPROPS::RPTPROPS( ) : ParserKeyword("RPTPROPS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("RPTPROPS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("mnemonics",Opm::ALL)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string RPTPROPS::keywordName = "RPTPROPS"; -const std::string RPTPROPS::mnemonics::itemName = "mnemonics"; - - -RPTREGS::RPTREGS( ) : ParserKeyword("RPTREGS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("REGIONS"); - clearDeckNames(); - addDeckName("RPTREGS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("MNEMONIC_LIST",Opm::ALL)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string RPTREGS::keywordName = "RPTREGS"; -const std::string RPTREGS::MNEMONIC_LIST::itemName = "MNEMONIC_LIST"; - - -RPTRST::RPTRST( ) : ParserKeyword("RPTRST") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("RPTRST"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("MNEMONIC_LIST",Opm::ALL)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string RPTRST::keywordName = "RPTRST"; -const std::string RPTRST::MNEMONIC_LIST::itemName = "MNEMONIC_LIST"; - - -RPTRUNSP::RPTRUNSP( ) : ParserKeyword("RPTRUNSP") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("RPTRUNSP"); -} -const std::string RPTRUNSP::keywordName = "RPTRUNSP"; - - -RPTSCHED::RPTSCHED( ) : ParserKeyword("RPTSCHED") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("RPTSCHED"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("MNEMONIC_LIST",Opm::ALL)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string RPTSCHED::keywordName = "RPTSCHED"; -const std::string RPTSCHED::MNEMONIC_LIST::itemName = "MNEMONIC_LIST"; - - -RPTSOL::RPTSOL( ) : ParserKeyword("RPTSOL") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("RPTSOL"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("mnemonics",Opm::ALL)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string RPTSOL::keywordName = "RPTSOL"; -const std::string RPTSOL::mnemonics::itemName = "mnemonics"; - - -RS::RS( ) : ParserKeyword("RS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("RS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("GasDissolutionFactor"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string RS::keywordName = "RS"; -const std::string RS::data::itemName = "data"; - - -RSVD::RSVD( ) : ParserKeyword("RSVD") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("EQLDIMS","NTEQUL"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("RSVD"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("table",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Length"); - item->push_backDimension("GasDissolutionFactor"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string RSVD::keywordName = "RSVD"; -const std::string RSVD::table::itemName = "table"; - - -RTEMPVD::RTEMPVD( ) : ParserKeyword("RTEMPVD") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("EQLDIMS","NTEQUL"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("RTEMPVD"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Length"); - item->push_backDimension("Temperature"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string RTEMPVD::keywordName = "RTEMPVD"; -const std::string RTEMPVD::DATA::itemName = "DATA"; - - -RUNSPEC::RUNSPEC( ) : ParserKeyword("RUNSPEC") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - clearDeckNames(); - addDeckName("RUNSPEC"); -} -const std::string RUNSPEC::keywordName = "RUNSPEC"; - - -RUNSUM::RUNSUM( ) : ParserKeyword("RUNSUM") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("RUNSUM"); -} -const std::string RUNSUM::keywordName = "RUNSUM"; - - -RV::RV( ) : ParserKeyword("RV") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("RV"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("OilDissolutionFactor"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string RV::keywordName = "RV"; -const std::string RV::data::itemName = "data"; - - -RVVD::RVVD( ) : ParserKeyword("RVVD") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("EQLDIMS","NTEQUL"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("RVVD"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("table",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Length"); - item->push_backDimension("OilDissolutionFactor"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string RVVD::keywordName = "RVVD"; -const std::string RVVD::table::itemName = "table"; - - -SATNUM::SATNUM( ) : ParserKeyword("SATNUM") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("REGIONS"); - clearDeckNames(); - addDeckName("SATNUM"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("data",Opm::ALL)); - item->setDescription(""); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string SATNUM::keywordName = "SATNUM"; -const std::string SATNUM::data::itemName = "data"; - - -SATOPTS::SATOPTS( ) : ParserKeyword("SATOPTS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("SATOPTS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("options",Opm::ALL)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string SATOPTS::keywordName = "SATOPTS"; -const std::string SATOPTS::options::itemName = "options"; - - -SAVE::SAVE( ) : ParserKeyword("SAVE") { - setSizeType(UNKNOWN); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("SAVE"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("FILE_TYPE",Opm::SINGLE,"UNFORMATTED")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string SAVE::keywordName = "SAVE"; -const std::string SAVE::FILE_TYPE::itemName = "FILE_TYPE"; -const std::string SAVE::FILE_TYPE::defaultValue = "UNFORMATTED"; - - -SCALECRS::SCALECRS( ) : ParserKeyword("SCALECRS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("SCALECRS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("VALUE",Opm::SINGLE,"NO")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string SCALECRS::keywordName = "SCALECRS"; -const std::string SCALECRS::VALUE::itemName = "VALUE"; -const std::string SCALECRS::VALUE::defaultValue = "NO"; - - -SCHEDULE::SCHEDULE( ) : ParserKeyword("SCHEDULE") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - clearDeckNames(); - addDeckName("SCHEDULE"); -} -const std::string SCHEDULE::keywordName = "SCHEDULE"; - - -SDENSITY::SDENSITY( ) : ParserKeyword("SDENSITY") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTPVT"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("SDENSITY"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("SOLVENT_DENSITY",Opm::SINGLE,1)); - item->setDescription(""); - item->push_backDimension("Density"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string SDENSITY::keywordName = "SDENSITY"; -const std::string SDENSITY::SOLVENT_DENSITY::itemName = "SOLVENT_DENSITY"; -const double SDENSITY::SOLVENT_DENSITY::defaultValue = 1; - - -SEPARATE::SEPARATE( ) : ParserKeyword("SEPARATE") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("SEPARATE"); -} -const std::string SEPARATE::keywordName = "SEPARATE"; - - -SGAS::SGAS( ) : ParserKeyword("SGAS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("SGAS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string SGAS::keywordName = "SGAS"; -const std::string SGAS::data::itemName = "data"; - - -SGCR::SGCR( ) : ParserKeyword("SGCR") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("SGCR"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string SGCR::keywordName = "SGCR"; -const std::string SGCR::data::itemName = "data"; - - -SGCWMIS::SGCWMIS( ) : ParserKeyword("SGCWMIS") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("MISCIBLE","NTMISC"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("SGCWMIS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string SGCWMIS::keywordName = "SGCWMIS"; -const std::string SGCWMIS::DATA::itemName = "DATA"; - - -SGFN::SGFN( ) : ParserKeyword("SGFN") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTSFUN"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("SGFN"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("Pressure"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string SGFN::keywordName = "SGFN"; -const std::string SGFN::DATA::itemName = "DATA"; - - -SGL::SGL( ) : ParserKeyword("SGL") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("SGL"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string SGL::keywordName = "SGL"; -const std::string SGL::data::itemName = "data"; - - -SGOF::SGOF( ) : ParserKeyword("SGOF") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTSFUN"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("SGOF"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("table",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("Pressure"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string SGOF::keywordName = "SGOF"; -const std::string SGOF::table::itemName = "table"; - - -SGU::SGU( ) : ParserKeyword("SGU") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("SGU"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string SGU::keywordName = "SGU"; -const std::string SGU::data::itemName = "data"; - - -SGWFN::SGWFN( ) : ParserKeyword("SGWFN") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTSFUN"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("SGWFN"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("Pressure"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string SGWFN::keywordName = "SGWFN"; -const std::string SGWFN::DATA::itemName = "DATA"; - - -SHRATE::SHRATE( ) : ParserKeyword("SHRATE") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTPVT"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("SHRATE"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("SHEAR_RATE",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string SHRATE::keywordName = "SHRATE"; -const std::string SHRATE::SHEAR_RATE::itemName = "SHEAR_RATE"; - - -SKIP::SKIP( ) : ParserKeyword("SKIP") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - addValidSectionName("GRID"); - addValidSectionName("PROPS"); - addValidSectionName("REGIONS"); - addValidSectionName("RUNSPEC"); - addValidSectionName("SCHEDULE"); - addValidSectionName("SOLUTION"); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("SKIP"); -} -const std::string SKIP::keywordName = "SKIP"; - - -SKIP100::SKIP100( ) : ParserKeyword("SKIP100") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - addValidSectionName("GRID"); - addValidSectionName("PROPS"); - addValidSectionName("REGIONS"); - addValidSectionName("RUNSPEC"); - addValidSectionName("SCHEDULE"); - addValidSectionName("SOLUTION"); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("SKIP100"); -} -const std::string SKIP100::keywordName = "SKIP100"; - - -SKIP300::SKIP300( ) : ParserKeyword("SKIP300") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - addValidSectionName("GRID"); - addValidSectionName("PROPS"); - addValidSectionName("REGIONS"); - addValidSectionName("RUNSPEC"); - addValidSectionName("SCHEDULE"); - addValidSectionName("SOLUTION"); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("SKIP300"); -} -const std::string SKIP300::keywordName = "SKIP300"; - - -SKIPREST::SKIPREST( ) : ParserKeyword("SKIPREST") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("SKIPREST"); -} -const std::string SKIPREST::keywordName = "SKIPREST"; - - -SLGOF::SLGOF( ) : ParserKeyword("SLGOF") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTSFUN"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("SLGOF"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("Pressure"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string SLGOF::keywordName = "SLGOF"; -const std::string SLGOF::DATA::itemName = "DATA"; - - -SMRYDIMS::SMRYDIMS( ) : ParserKeyword("SMRYDIMS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("SMRYDIMS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("DIMS",Opm::SINGLE,10000)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string SMRYDIMS::keywordName = "SMRYDIMS"; -const std::string SMRYDIMS::DIMS::itemName = "DIMS"; -const int SMRYDIMS::DIMS::defaultValue = 10000; - - -SOF2::SOF2( ) : ParserKeyword("SOF2") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTSFUN"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("SOF2"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string SOF2::keywordName = "SOF2"; -const std::string SOF2::DATA::itemName = "DATA"; - - -SOF3::SOF3( ) : ParserKeyword("SOF3") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTSFUN"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("SOF3"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string SOF3::keywordName = "SOF3"; -const std::string SOF3::DATA::itemName = "DATA"; - - -SOGCR::SOGCR( ) : ParserKeyword("SOGCR") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("SOGCR"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string SOGCR::keywordName = "SOGCR"; -const std::string SOGCR::data::itemName = "data"; - - -SOIL::SOIL( ) : ParserKeyword("SOIL") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("SOIL"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string SOIL::keywordName = "SOIL"; -const std::string SOIL::data::itemName = "data"; - - -SOLUTION::SOLUTION( ) : ParserKeyword("SOLUTION") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - clearDeckNames(); - addDeckName("SOLUTION"); -} -const std::string SOLUTION::keywordName = "SOLUTION"; - - -SOLVENT::SOLVENT( ) : ParserKeyword("SOLVENT") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("SOLVENT"); -} -const std::string SOLVENT::keywordName = "SOLVENT"; - - -SORWMIS::SORWMIS( ) : ParserKeyword("SORWMIS") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("MISCIBLE","NTMISC"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("SORWMIS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string SORWMIS::keywordName = "SORWMIS"; -const std::string SORWMIS::DATA::itemName = "DATA"; - - -SOWCR::SOWCR( ) : ParserKeyword("SOWCR") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("SOWCR"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string SOWCR::keywordName = "SOWCR"; -const std::string SOWCR::data::itemName = "data"; - - -SPECGRID::SPECGRID( ) : ParserKeyword("SPECGRID") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("SPECGRID"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("NX",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NY",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NZ",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NUMRES",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("COORD_TYPE",Opm::SINGLE,"F")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string SPECGRID::keywordName = "SPECGRID"; -const std::string SPECGRID::NX::itemName = "NX"; -const int SPECGRID::NX::defaultValue = 1; -const std::string SPECGRID::NY::itemName = "NY"; -const int SPECGRID::NY::defaultValue = 1; -const std::string SPECGRID::NZ::itemName = "NZ"; -const int SPECGRID::NZ::defaultValue = 1; -const std::string SPECGRID::NUMRES::itemName = "NUMRES"; -const int SPECGRID::NUMRES::defaultValue = 1; -const std::string SPECGRID::COORD_TYPE::itemName = "COORD_TYPE"; -const std::string SPECGRID::COORD_TYPE::defaultValue = "F"; - - -SPECHEAT::SPECHEAT( ) : ParserKeyword("SPECHEAT") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTPVT"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("SPECHEAT"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string SPECHEAT::keywordName = "SPECHEAT"; -const std::string SPECHEAT::DATA::itemName = "DATA"; - - -SPECROCK::SPECROCK( ) : ParserKeyword("SPECROCK") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTSFUN"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("SPECROCK"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string SPECROCK::keywordName = "SPECROCK"; -const std::string SPECROCK::DATA::itemName = "DATA"; - - -SSFN::SSFN( ) : ParserKeyword("SSFN") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTSFUN"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("SSFN"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string SSFN::keywordName = "SSFN"; -const std::string SSFN::DATA::itemName = "DATA"; - - -SSOL::SSOL( ) : ParserKeyword("SSOL") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("SSOL"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string SSOL::keywordName = "SSOL"; -const std::string SSOL::data::itemName = "data"; - - -START::START( ) : ParserKeyword("START") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("START"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("DAY",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("MONTH",Opm::SINGLE,"JAN")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("YEAR",Opm::SINGLE,1983)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("TIME",Opm::SINGLE,"00:00:00.000")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string START::keywordName = "START"; -const std::string START::DAY::itemName = "DAY"; -const int START::DAY::defaultValue = 1; -const std::string START::MONTH::itemName = "MONTH"; -const std::string START::MONTH::defaultValue = "JAN"; -const std::string START::YEAR::itemName = "YEAR"; -const int START::YEAR::defaultValue = 1983; -const std::string START::TIME::itemName = "TIME"; -const std::string START::TIME::defaultValue = "00:00:00.000"; - - -STCOND::STCOND( ) : ParserKeyword("STCOND") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("STCOND"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("TEMPERATURE",Opm::SINGLE,60)); - item->setDescription(""); - item->push_backDimension("Temperature"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("PRESSURE",Opm::SINGLE,14.6959)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string STCOND::keywordName = "STCOND"; -const std::string STCOND::TEMPERATURE::itemName = "TEMPERATURE"; -const double STCOND::TEMPERATURE::defaultValue = 60; -const std::string STCOND::PRESSURE::itemName = "PRESSURE"; -const double STCOND::PRESSURE::defaultValue = 14.6959; - - -STONE1::STONE1( ) : ParserKeyword("STONE1") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("STONE1"); -} -const std::string STONE1::keywordName = "STONE1"; - - -STONE1EX::STONE1EX( ) : ParserKeyword("STONE1EX") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTSFUN"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("STONE1EX"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("EXP_VALUE",Opm::SINGLE,1)); - item->setDescription(""); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string STONE1EX::keywordName = "STONE1EX"; -const std::string STONE1EX::EXP_VALUE::itemName = "EXP_VALUE"; -const double STONE1EX::EXP_VALUE::defaultValue = 1; - - -SUMMARY::SUMMARY( ) : ParserKeyword("SUMMARY") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - clearDeckNames(); - addDeckName("SUMMARY"); -} -const std::string SUMMARY::keywordName = "SUMMARY"; - - -SUMTHIN::SUMTHIN( ) : ParserKeyword("SUMTHIN") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("SUMTHIN"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("TIME",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Time"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string SUMTHIN::keywordName = "SUMTHIN"; -const std::string SUMTHIN::TIME::itemName = "TIME"; - - -SWAT::SWAT( ) : ParserKeyword("SWAT") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("SWAT"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string SWAT::keywordName = "SWAT"; -const std::string SWAT::data::itemName = "data"; - - -SWATINIT::SWATINIT( ) : ParserKeyword("SWATINIT") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("SWATINIT"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string SWATINIT::keywordName = "SWATINIT"; -const std::string SWATINIT::data::itemName = "data"; - - -SWCR::SWCR( ) : ParserKeyword("SWCR") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("SWCR"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string SWCR::keywordName = "SWCR"; -const std::string SWCR::data::itemName = "data"; - - -SWFN::SWFN( ) : ParserKeyword("SWFN") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTSFUN"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("SWFN"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("Pressure"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string SWFN::keywordName = "SWFN"; -const std::string SWFN::DATA::itemName = "DATA"; - - -SWL::SWL( ) : ParserKeyword("SWL") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("SWL"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string SWL::keywordName = "SWL"; -const std::string SWL::data::itemName = "data"; - - -SWOF::SWOF( ) : ParserKeyword("SWOF") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTSFUN"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("SWOF"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("1"); - item->push_backDimension("Pressure"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string SWOF::keywordName = "SWOF"; -const std::string SWOF::DATA::itemName = "DATA"; - - -SWU::SWU( ) : ParserKeyword("SWU") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("SWU"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string SWU::keywordName = "SWU"; -const std::string SWU::data::itemName = "data"; - - -TABDIMS::TABDIMS( ) : ParserKeyword("TABDIMS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("TABDIMS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("NTSFUN",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NTPVT",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NSSFUN",Opm::SINGLE,20)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NPPVT",Opm::SINGLE,20)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NTFIP",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NRPVT",Opm::SINGLE,20)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_RV_NODES",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NTENDP",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NUM_STATE_EQ",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NUM_EOS_RES",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NUM_EOS_SURFACE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_FLUX_REGIONS",Opm::SINGLE,10)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_THERMAL_REGIONS",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NTROCC",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_PRESSURE_MAINTAINANCE_REGIONS",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_KVALUE_TABLES",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NTALPHA",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ASPHALTENE_ASPKDAM_MAX_ROWS",Opm::SINGLE,10)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ASPHALTENE_ASPREWG_MAX_ROWS",Opm::SINGLE,10)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ASPHALTENE_ASPVISO_MAX_ROWS",Opm::SINGLE,10)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("ITEM20_NOT_USED",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ASPHALTENE_ASPPW2D_MAX_COLUMNS",Opm::SINGLE,5)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ASPHALTENE_ASPPW2D_MAX_ROWS",Opm::SINGLE,5)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ASPHALTENE_ASPWETF_MAX_ROWS",Opm::SINGLE,5)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NUM_KVALUE_TABLES",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("RESERVED",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string TABDIMS::keywordName = "TABDIMS"; -const std::string TABDIMS::NTSFUN::itemName = "NTSFUN"; -const int TABDIMS::NTSFUN::defaultValue = 1; -const std::string TABDIMS::NTPVT::itemName = "NTPVT"; -const int TABDIMS::NTPVT::defaultValue = 1; -const std::string TABDIMS::NSSFUN::itemName = "NSSFUN"; -const int TABDIMS::NSSFUN::defaultValue = 20; -const std::string TABDIMS::NPPVT::itemName = "NPPVT"; -const int TABDIMS::NPPVT::defaultValue = 20; -const std::string TABDIMS::NTFIP::itemName = "NTFIP"; -const int TABDIMS::NTFIP::defaultValue = 1; -const std::string TABDIMS::NRPVT::itemName = "NRPVT"; -const int TABDIMS::NRPVT::defaultValue = 20; -const std::string TABDIMS::MAX_RV_NODES::itemName = "MAX_RV_NODES"; -const std::string TABDIMS::NTENDP::itemName = "NTENDP"; -const int TABDIMS::NTENDP::defaultValue = 1; -const std::string TABDIMS::NUM_STATE_EQ::itemName = "NUM_STATE_EQ"; -const int TABDIMS::NUM_STATE_EQ::defaultValue = 1; -const std::string TABDIMS::NUM_EOS_RES::itemName = "NUM_EOS_RES"; -const int TABDIMS::NUM_EOS_RES::defaultValue = 1; -const std::string TABDIMS::NUM_EOS_SURFACE::itemName = "NUM_EOS_SURFACE"; -const std::string TABDIMS::MAX_FLUX_REGIONS::itemName = "MAX_FLUX_REGIONS"; -const int TABDIMS::MAX_FLUX_REGIONS::defaultValue = 10; -const std::string TABDIMS::MAX_THERMAL_REGIONS::itemName = "MAX_THERMAL_REGIONS"; -const int TABDIMS::MAX_THERMAL_REGIONS::defaultValue = 1; -const std::string TABDIMS::NTROCC::itemName = "NTROCC"; -const std::string TABDIMS::MAX_PRESSURE_MAINTAINANCE_REGIONS::itemName = "MAX_PRESSURE_MAINTAINANCE_REGIONS"; -const int TABDIMS::MAX_PRESSURE_MAINTAINANCE_REGIONS::defaultValue = 0; -const std::string TABDIMS::MAX_KVALUE_TABLES::itemName = "MAX_KVALUE_TABLES"; -const int TABDIMS::MAX_KVALUE_TABLES::defaultValue = 0; -const std::string TABDIMS::NTALPHA::itemName = "NTALPHA"; -const std::string TABDIMS::ASPHALTENE_ASPKDAM_MAX_ROWS::itemName = "ASPHALTENE_ASPKDAM_MAX_ROWS"; -const int TABDIMS::ASPHALTENE_ASPKDAM_MAX_ROWS::defaultValue = 10; -const std::string TABDIMS::ASPHALTENE_ASPREWG_MAX_ROWS::itemName = "ASPHALTENE_ASPREWG_MAX_ROWS"; -const int TABDIMS::ASPHALTENE_ASPREWG_MAX_ROWS::defaultValue = 10; -const std::string TABDIMS::ASPHALTENE_ASPVISO_MAX_ROWS::itemName = "ASPHALTENE_ASPVISO_MAX_ROWS"; -const int TABDIMS::ASPHALTENE_ASPVISO_MAX_ROWS::defaultValue = 10; -const std::string TABDIMS::ITEM20_NOT_USED::itemName = "ITEM20_NOT_USED"; -const std::string TABDIMS::ASPHALTENE_ASPPW2D_MAX_COLUMNS::itemName = "ASPHALTENE_ASPPW2D_MAX_COLUMNS"; -const int TABDIMS::ASPHALTENE_ASPPW2D_MAX_COLUMNS::defaultValue = 5; -const std::string TABDIMS::ASPHALTENE_ASPPW2D_MAX_ROWS::itemName = "ASPHALTENE_ASPPW2D_MAX_ROWS"; -const int TABDIMS::ASPHALTENE_ASPPW2D_MAX_ROWS::defaultValue = 5; -const std::string TABDIMS::ASPHALTENE_ASPWETF_MAX_ROWS::itemName = "ASPHALTENE_ASPWETF_MAX_ROWS"; -const int TABDIMS::ASPHALTENE_ASPWETF_MAX_ROWS::defaultValue = 5; -const std::string TABDIMS::NUM_KVALUE_TABLES::itemName = "NUM_KVALUE_TABLES"; -const int TABDIMS::NUM_KVALUE_TABLES::defaultValue = 0; -const std::string TABDIMS::RESERVED::itemName = "RESERVED"; - - -TEMP::TEMP( ) : ParserKeyword("TEMP") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("TEMP"); -} -const std::string TEMP::keywordName = "TEMP"; - - -TEMPI::TEMPI( ) : ParserKeyword("TEMPI") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("TEMPI"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Temperature"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string TEMPI::keywordName = "TEMPI"; -const std::string TEMPI::data::itemName = "data"; - - -TEMPVD::TEMPVD( ) : ParserKeyword("TEMPVD") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("EQLDIMS","NTEQUL"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("TEMPVD"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Length"); - item->push_backDimension("Temperature"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string TEMPVD::keywordName = "TEMPVD"; -const std::string TEMPVD::DATA::itemName = "DATA"; - - -THCONR::THCONR( ) : ParserKeyword("THCONR") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("THCONR"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string THCONR::keywordName = "THCONR"; -const std::string THCONR::data::itemName = "data"; - - -THERMAL::THERMAL( ) : ParserKeyword("THERMAL") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("THERMAL"); -} -const std::string THERMAL::keywordName = "THERMAL"; - - -THERMEX1::THERMEX1( ) : ParserKeyword("THERMEX1") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NUM_STATE_EQ"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("THERMEX1"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("EXPANSION_COEFF",Opm::ALL,0)); - item->setDescription(""); - item->push_backDimension("1/AbsoluteTemperature"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string THERMEX1::keywordName = "THERMEX1"; -const std::string THERMEX1::EXPANSION_COEFF::itemName = "EXPANSION_COEFF"; -const double THERMEX1::EXPANSION_COEFF::defaultValue = 0; - - -THPRES::THPRES( ) : ParserKeyword("THPRES") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("THPRES"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("REGION1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("REGION2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("VALUE",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string THPRES::keywordName = "THPRES"; -const std::string THPRES::REGION1::itemName = "REGION1"; -const std::string THPRES::REGION2::itemName = "REGION2"; -const std::string THPRES::VALUE::itemName = "VALUE"; - - -TITLE::TITLE( ) : ParserKeyword("TITLE") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("TITLE"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("TitleText",Opm::ALL)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string TITLE::keywordName = "TITLE"; -const std::string TITLE::TitleText::itemName = "TitleText"; - - -TLMIXPAR::TLMIXPAR( ) : ParserKeyword("TLMIXPAR") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("MISCIBLE","NTMISC"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("TLMIXPAR"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("TL_VISCOSITY_PARAMETER",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("1"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("TL_DENSITY_PARAMETER",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string TLMIXPAR::keywordName = "TLMIXPAR"; -const std::string TLMIXPAR::TL_VISCOSITY_PARAMETER::itemName = "TL_VISCOSITY_PARAMETER"; -const std::string TLMIXPAR::TL_DENSITY_PARAMETER::itemName = "TL_DENSITY_PARAMETER"; - - -TLPMIXPA::TLPMIXPA( ) : ParserKeyword("TLPMIXPA") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("MISCIBLE","NTMISC"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("TLPMIXPA"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Pressure"); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string TLPMIXPA::keywordName = "TLPMIXPA"; -const std::string TLPMIXPA::DATA::itemName = "DATA"; - - -TNUM::TNUM( ) : ParserKeyword("TNUM") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("REGIONS"); - clearDeckNames(); - setMatchRegex("TNUM(F|S).{1,3}"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("data",Opm::ALL)); - item->setDescription(""); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string TNUM::keywordName = "TNUM"; -const std::string TNUM::data::itemName = "data"; - - -TOPS::TOPS( ) : ParserKeyword("TOPS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("TOPS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string TOPS::keywordName = "TOPS"; -const std::string TOPS::data::itemName = "data"; - - -TRACER::TRACER( ) : ParserKeyword("TRACER") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("TRACER"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("NAME",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("FLUID",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("UNIT",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("SOLUTION_PHASE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NUM_PART_TABLE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("ADSORB_PHASE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string TRACER::keywordName = "TRACER"; -const std::string TRACER::NAME::itemName = "NAME"; -const std::string TRACER::FLUID::itemName = "FLUID"; -const std::string TRACER::UNIT::itemName = "UNIT"; -const std::string TRACER::SOLUTION_PHASE::itemName = "SOLUTION_PHASE"; -const std::string TRACER::NUM_PART_TABLE::itemName = "NUM_PART_TABLE"; -const std::string TRACER::ADSORB_PHASE::itemName = "ADSORB_PHASE"; - - -TRACERS::TRACERS( ) : ParserKeyword("TRACERS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("TRACERS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("MAX_OIL_TRACERS",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_WATER_TRACERS",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_GAS_TRACERS",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_ENV_TRACERS",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("NUMERIC_DIFF",Opm::SINGLE,"NODIFF")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_ITER",Opm::SINGLE,12)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MIN_ITER",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string TRACERS::keywordName = "TRACERS"; -const std::string TRACERS::MAX_OIL_TRACERS::itemName = "MAX_OIL_TRACERS"; -const int TRACERS::MAX_OIL_TRACERS::defaultValue = 0; -const std::string TRACERS::MAX_WATER_TRACERS::itemName = "MAX_WATER_TRACERS"; -const int TRACERS::MAX_WATER_TRACERS::defaultValue = 0; -const std::string TRACERS::MAX_GAS_TRACERS::itemName = "MAX_GAS_TRACERS"; -const int TRACERS::MAX_GAS_TRACERS::defaultValue = 0; -const std::string TRACERS::MAX_ENV_TRACERS::itemName = "MAX_ENV_TRACERS"; -const int TRACERS::MAX_ENV_TRACERS::defaultValue = 0; -const std::string TRACERS::NUMERIC_DIFF::itemName = "NUMERIC_DIFF"; -const std::string TRACERS::NUMERIC_DIFF::defaultValue = "NODIFF"; -const std::string TRACERS::MAX_ITER::itemName = "MAX_ITER"; -const int TRACERS::MAX_ITER::defaultValue = 12; -const std::string TRACERS::MIN_ITER::itemName = "MIN_ITER"; -const int TRACERS::MIN_ITER::defaultValue = 1; - - -TRANX::TRANX( ) : ParserKeyword("TRANX") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - clearDeckNames(); - addDeckName("TRANX"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Transmissibility"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string TRANX::keywordName = "TRANX"; -const std::string TRANX::data::itemName = "data"; - - -TRANY::TRANY( ) : ParserKeyword("TRANY") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - clearDeckNames(); - addDeckName("TRANY"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Transmissibility"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string TRANY::keywordName = "TRANY"; -const std::string TRANY::data::itemName = "data"; - - -TRANZ::TRANZ( ) : ParserKeyword("TRANZ") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("EDIT"); - clearDeckNames(); - addDeckName("TRANZ"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Transmissibility"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string TRANZ::keywordName = "TRANZ"; -const std::string TRANZ::data::itemName = "data"; - - -TREF::TREF( ) : ParserKeyword("TREF") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NUM_STATE_EQ"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("TREF"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("TEMPERATURE",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("AbsoluteTemperature"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string TREF::keywordName = "TREF"; -const std::string TREF::TEMPERATURE::itemName = "TEMPERATURE"; - - -TREFS::TREFS( ) : ParserKeyword("TREFS") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NUM_STATE_EQ"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("TREFS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("TEMPERATURE",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("AbsoluteTemperature"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string TREFS::keywordName = "TREFS"; -const std::string TREFS::TEMPERATURE::itemName = "TEMPERATURE"; - - -TSTEP::TSTEP( ) : ParserKeyword("TSTEP") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("TSTEP"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("step_list",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Timestep"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string TSTEP::keywordName = "TSTEP"; -const std::string TSTEP::step_list::itemName = "step_list"; - - -TUNING::TUNING( ) : ParserKeyword("TUNING") { - setFixedSize( (size_t) 3); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("TUNING"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("TSINIT",Opm::SINGLE,1)); - item->setDescription(""); - item->push_backDimension("Time"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("TSMAXZ",Opm::SINGLE,365)); - item->setDescription(""); - item->push_backDimension("Time"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("TSMINZ",Opm::SINGLE,0.10000000000000001)); - item->setDescription(""); - item->push_backDimension("Time"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("TSMCHP",Opm::SINGLE,0.14999999999999999)); - item->setDescription(""); - item->push_backDimension("Time"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("TSFMAX",Opm::SINGLE,3)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("TSFMIN",Opm::SINGLE,0.30000000000000004)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("TSFCNV",Opm::SINGLE,0.10000000000000001)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("TFDIFF",Opm::SINGLE,1.25)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("THRUPT",Opm::SINGLE,1e+20)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("TMAXWC",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Time"); - record->addItem(item); - } - addRecord( record ); - } - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("TRGTTE",Opm::SINGLE,0.10000000000000001)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("TRGCNV",Opm::SINGLE,0.001)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("TRGMBE",Opm::SINGLE,9.9999999999999995e-08)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("TRGLCV",Opm::SINGLE,0.0001)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("XXXTTE",Opm::SINGLE,10)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("XXXCNV",Opm::SINGLE,0.01)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("XXXMBE",Opm::SINGLE,9.9999999999999995e-07)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("XXXLCV",Opm::SINGLE,0.001)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("XXXWFL",Opm::SINGLE,0.001)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("TRGFIP",Opm::SINGLE,0.025000000000000001)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("TRGSFT",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("THIONX",Opm::SINGLE,0.01)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("TRWGHT",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("NEWTMX",Opm::SINGLE,12)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NEWTMN",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("LITMAX",Opm::SINGLE,25)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("LITMIN",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MXWSIT",Opm::SINGLE,8)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MXWPIT",Opm::SINGLE,8)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("DDPLIM",Opm::SINGLE,1000000)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("DDSLIM",Opm::SINGLE,1000000)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("TRGDPR",Opm::SINGLE,1000000)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("XXXDPR",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string TUNING::keywordName = "TUNING"; -const std::string TUNING::TSINIT::itemName = "TSINIT"; -const double TUNING::TSINIT::defaultValue = 1; -const std::string TUNING::TSMAXZ::itemName = "TSMAXZ"; -const double TUNING::TSMAXZ::defaultValue = 365; -const std::string TUNING::TSMINZ::itemName = "TSMINZ"; -const double TUNING::TSMINZ::defaultValue = 0.1; -const std::string TUNING::TSMCHP::itemName = "TSMCHP"; -const double TUNING::TSMCHP::defaultValue = 0.15; -const std::string TUNING::TSFMAX::itemName = "TSFMAX"; -const double TUNING::TSFMAX::defaultValue = 3; -const std::string TUNING::TSFMIN::itemName = "TSFMIN"; -const double TUNING::TSFMIN::defaultValue = 0.3; -const std::string TUNING::TSFCNV::itemName = "TSFCNV"; -const double TUNING::TSFCNV::defaultValue = 0.1; -const std::string TUNING::TFDIFF::itemName = "TFDIFF"; -const double TUNING::TFDIFF::defaultValue = 1.25; -const std::string TUNING::THRUPT::itemName = "THRUPT"; -const double TUNING::THRUPT::defaultValue = 1e+20; -const std::string TUNING::TMAXWC::itemName = "TMAXWC"; -const std::string TUNING::TRGTTE::itemName = "TRGTTE"; -const double TUNING::TRGTTE::defaultValue = 0.1; -const std::string TUNING::TRGCNV::itemName = "TRGCNV"; -const double TUNING::TRGCNV::defaultValue = 0.001; -const std::string TUNING::TRGMBE::itemName = "TRGMBE"; -const double TUNING::TRGMBE::defaultValue = 1e-07; -const std::string TUNING::TRGLCV::itemName = "TRGLCV"; -const double TUNING::TRGLCV::defaultValue = 0.0001; -const std::string TUNING::XXXTTE::itemName = "XXXTTE"; -const double TUNING::XXXTTE::defaultValue = 10; -const std::string TUNING::XXXCNV::itemName = "XXXCNV"; -const double TUNING::XXXCNV::defaultValue = 0.01; -const std::string TUNING::XXXMBE::itemName = "XXXMBE"; -const double TUNING::XXXMBE::defaultValue = 1e-06; -const std::string TUNING::XXXLCV::itemName = "XXXLCV"; -const double TUNING::XXXLCV::defaultValue = 0.001; -const std::string TUNING::XXXWFL::itemName = "XXXWFL"; -const double TUNING::XXXWFL::defaultValue = 0.001; -const std::string TUNING::TRGFIP::itemName = "TRGFIP"; -const double TUNING::TRGFIP::defaultValue = 0.025; -const std::string TUNING::TRGSFT::itemName = "TRGSFT"; -const std::string TUNING::THIONX::itemName = "THIONX"; -const double TUNING::THIONX::defaultValue = 0.01; -const std::string TUNING::TRWGHT::itemName = "TRWGHT"; -const int TUNING::TRWGHT::defaultValue = 1; -const std::string TUNING::NEWTMX::itemName = "NEWTMX"; -const int TUNING::NEWTMX::defaultValue = 12; -const std::string TUNING::NEWTMN::itemName = "NEWTMN"; -const int TUNING::NEWTMN::defaultValue = 1; -const std::string TUNING::LITMAX::itemName = "LITMAX"; -const int TUNING::LITMAX::defaultValue = 25; -const std::string TUNING::LITMIN::itemName = "LITMIN"; -const int TUNING::LITMIN::defaultValue = 1; -const std::string TUNING::MXWSIT::itemName = "MXWSIT"; -const int TUNING::MXWSIT::defaultValue = 8; -const std::string TUNING::MXWPIT::itemName = "MXWPIT"; -const int TUNING::MXWPIT::defaultValue = 8; -const std::string TUNING::DDPLIM::itemName = "DDPLIM"; -const double TUNING::DDPLIM::defaultValue = 1e+06; -const std::string TUNING::DDSLIM::itemName = "DDSLIM"; -const double TUNING::DDSLIM::defaultValue = 1e+06; -const std::string TUNING::TRGDPR::itemName = "TRGDPR"; -const double TUNING::TRGDPR::defaultValue = 1e+06; -const std::string TUNING::XXXDPR::itemName = "XXXDPR"; - - -TVDP::TVDP( ) : ParserKeyword("TVDP") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("EQLDIMS","NTTRVD"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SOLUTION"); - clearDeckNames(); - setMatchRegex("TVDP.+"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("table",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Length"); - item->push_backDimension("ContextDependent"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string TVDP::keywordName = "TVDP"; -const std::string TVDP::table::itemName = "table"; - - -UDADIMS::UDADIMS( ) : ParserKeyword("UDADIMS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("UDADIMS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("NUM_UDQ_REPLACE",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("IGNORED",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("TOTAL_UDQ_UNIQUE",Opm::SINGLE,100)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string UDADIMS::keywordName = "UDADIMS"; -const std::string UDADIMS::NUM_UDQ_REPLACE::itemName = "NUM_UDQ_REPLACE"; -const int UDADIMS::NUM_UDQ_REPLACE::defaultValue = 0; -const std::string UDADIMS::IGNORED::itemName = "IGNORED"; -const int UDADIMS::IGNORED::defaultValue = 0; -const std::string UDADIMS::TOTAL_UDQ_UNIQUE::itemName = "TOTAL_UDQ_UNIQUE"; -const int UDADIMS::TOTAL_UDQ_UNIQUE::defaultValue = 100; - - -UDQDIMS::UDQDIMS( ) : ParserKeyword("UDQDIMS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("UDQDIMS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("MAX_FUNCTIONS",Opm::SINGLE,16)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_ITEMS",Opm::SINGLE,16)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_CONNECTIONS",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_FIELDS",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_GROUP",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_REGION",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_SEGMENT",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_WELL",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_AQUIFER",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_BLOCK",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("RESTART_NEW_SEED",Opm::SINGLE,"N")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string UDQDIMS::keywordName = "UDQDIMS"; -const std::string UDQDIMS::MAX_FUNCTIONS::itemName = "MAX_FUNCTIONS"; -const int UDQDIMS::MAX_FUNCTIONS::defaultValue = 16; -const std::string UDQDIMS::MAX_ITEMS::itemName = "MAX_ITEMS"; -const int UDQDIMS::MAX_ITEMS::defaultValue = 16; -const std::string UDQDIMS::MAX_CONNECTIONS::itemName = "MAX_CONNECTIONS"; -const int UDQDIMS::MAX_CONNECTIONS::defaultValue = 0; -const std::string UDQDIMS::MAX_FIELDS::itemName = "MAX_FIELDS"; -const int UDQDIMS::MAX_FIELDS::defaultValue = 0; -const std::string UDQDIMS::MAX_GROUP::itemName = "MAX_GROUP"; -const int UDQDIMS::MAX_GROUP::defaultValue = 0; -const std::string UDQDIMS::MAX_REGION::itemName = "MAX_REGION"; -const int UDQDIMS::MAX_REGION::defaultValue = 0; -const std::string UDQDIMS::MAX_SEGMENT::itemName = "MAX_SEGMENT"; -const int UDQDIMS::MAX_SEGMENT::defaultValue = 0; -const std::string UDQDIMS::MAX_WELL::itemName = "MAX_WELL"; -const int UDQDIMS::MAX_WELL::defaultValue = 0; -const std::string UDQDIMS::MAX_AQUIFER::itemName = "MAX_AQUIFER"; -const int UDQDIMS::MAX_AQUIFER::defaultValue = 0; -const std::string UDQDIMS::MAX_BLOCK::itemName = "MAX_BLOCK"; -const int UDQDIMS::MAX_BLOCK::defaultValue = 0; -const std::string UDQDIMS::RESTART_NEW_SEED::itemName = "RESTART_NEW_SEED"; -const std::string UDQDIMS::RESTART_NEW_SEED::defaultValue = "N"; - - -UNIFIN::UNIFIN( ) : ParserKeyword("UNIFIN") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("UNIFIN"); -} -const std::string UNIFIN::keywordName = "UNIFIN"; - - -UNIFOUT::UNIFOUT( ) : ParserKeyword("UNIFOUT") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("UNIFOUT"); -} -const std::string UNIFOUT::keywordName = "UNIFOUT"; - - -VAPOIL::VAPOIL( ) : ParserKeyword("VAPOIL") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("VAPOIL"); -} -const std::string VAPOIL::keywordName = "VAPOIL"; - - -VAPPARS::VAPPARS( ) : ParserKeyword("VAPPARS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - addValidSectionName("SOLUTION"); - clearDeckNames(); - addDeckName("VAPPARS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("OIL_VAP_PROPENSITY",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("OIL_DENSITY_PROPENSITY",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string VAPPARS::keywordName = "VAPPARS"; -const std::string VAPPARS::OIL_VAP_PROPENSITY::itemName = "OIL_VAP_PROPENSITY"; -const std::string VAPPARS::OIL_DENSITY_PROPENSITY::itemName = "OIL_DENSITY_PROPENSITY"; - - -VFPIDIMS::VFPIDIMS( ) : ParserKeyword("VFPIDIMS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("VFPIDIMS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("MAX_FLOW_TABLE",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_THP_TABLE",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_INJ_VFP_TABLE",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string VFPIDIMS::keywordName = "VFPIDIMS"; -const std::string VFPIDIMS::MAX_FLOW_TABLE::itemName = "MAX_FLOW_TABLE"; -const int VFPIDIMS::MAX_FLOW_TABLE::defaultValue = 0; -const std::string VFPIDIMS::MAX_THP_TABLE::itemName = "MAX_THP_TABLE"; -const int VFPIDIMS::MAX_THP_TABLE::defaultValue = 0; -const std::string VFPIDIMS::MAX_INJ_VFP_TABLE::itemName = "MAX_INJ_VFP_TABLE"; -const int VFPIDIMS::MAX_INJ_VFP_TABLE::defaultValue = 0; - - -VFPINJ::VFPINJ( ) : ParserKeyword("VFPINJ") { - setSizeType(UNKNOWN); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("VFPINJ"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("TABLE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("DATUM_DEPTH",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("RATE_TYPE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("PRESSURE_DEF",Opm::SINGLE,"THP")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("UNITS",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("BODY_DEF",Opm::SINGLE,"BHP")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("FLOW_VALUES",Opm::ALL)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("THP_VALUES",Opm::ALL)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("THP_INDEX",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("VALUES",Opm::ALL)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string VFPINJ::keywordName = "VFPINJ"; -const std::string VFPINJ::TABLE::itemName = "TABLE"; -const std::string VFPINJ::DATUM_DEPTH::itemName = "DATUM_DEPTH"; -const std::string VFPINJ::RATE_TYPE::itemName = "RATE_TYPE"; -const std::string VFPINJ::PRESSURE_DEF::itemName = "PRESSURE_DEF"; -const std::string VFPINJ::PRESSURE_DEF::defaultValue = "THP"; -const std::string VFPINJ::UNITS::itemName = "UNITS"; -const std::string VFPINJ::BODY_DEF::itemName = "BODY_DEF"; -const std::string VFPINJ::BODY_DEF::defaultValue = "BHP"; -const std::string VFPINJ::FLOW_VALUES::itemName = "FLOW_VALUES"; -const std::string VFPINJ::THP_VALUES::itemName = "THP_VALUES"; -const std::string VFPINJ::THP_INDEX::itemName = "THP_INDEX"; -const std::string VFPINJ::VALUES::itemName = "VALUES"; - - -VFPPDIMS::VFPPDIMS( ) : ParserKeyword("VFPPDIMS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("VFPPDIMS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("MAX_FLOW_TABLE",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_THP_TABLE",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_WCT_TABLE",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_GCT_TABLE",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_ALQ_TABLE",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_PROD_VFP_TABLE",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string VFPPDIMS::keywordName = "VFPPDIMS"; -const std::string VFPPDIMS::MAX_FLOW_TABLE::itemName = "MAX_FLOW_TABLE"; -const int VFPPDIMS::MAX_FLOW_TABLE::defaultValue = 0; -const std::string VFPPDIMS::MAX_THP_TABLE::itemName = "MAX_THP_TABLE"; -const int VFPPDIMS::MAX_THP_TABLE::defaultValue = 0; -const std::string VFPPDIMS::MAX_WCT_TABLE::itemName = "MAX_WCT_TABLE"; -const int VFPPDIMS::MAX_WCT_TABLE::defaultValue = 0; -const std::string VFPPDIMS::MAX_GCT_TABLE::itemName = "MAX_GCT_TABLE"; -const int VFPPDIMS::MAX_GCT_TABLE::defaultValue = 0; -const std::string VFPPDIMS::MAX_ALQ_TABLE::itemName = "MAX_ALQ_TABLE"; -const int VFPPDIMS::MAX_ALQ_TABLE::defaultValue = 0; -const std::string VFPPDIMS::MAX_PROD_VFP_TABLE::itemName = "MAX_PROD_VFP_TABLE"; -const int VFPPDIMS::MAX_PROD_VFP_TABLE::defaultValue = 0; - - -VFPPROD::VFPPROD( ) : ParserKeyword("VFPPROD") { - setSizeType(UNKNOWN); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("VFPPROD"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("TABLE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("DATUM_DEPTH",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("RATE_TYPE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("WFR",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("GFR",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("PRESSURE_DEF",Opm::SINGLE,"THP")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("ALQ_DEF",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("UNITS",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("BODY_DEF",Opm::SINGLE,"BHP")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("FLOW_VALUES",Opm::ALL)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("THP_VALUES",Opm::ALL)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("WFR_VALUES",Opm::ALL)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("GFR_VALUES",Opm::ALL)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("ALQ_VALUES",Opm::ALL)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("THP_INDEX",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("WFR_INDEX",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("GFR_INDEX",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("ALQ_INDEX",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("VALUES",Opm::ALL)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string VFPPROD::keywordName = "VFPPROD"; -const std::string VFPPROD::TABLE::itemName = "TABLE"; -const std::string VFPPROD::DATUM_DEPTH::itemName = "DATUM_DEPTH"; -const std::string VFPPROD::RATE_TYPE::itemName = "RATE_TYPE"; -const std::string VFPPROD::WFR::itemName = "WFR"; -const std::string VFPPROD::GFR::itemName = "GFR"; -const std::string VFPPROD::PRESSURE_DEF::itemName = "PRESSURE_DEF"; -const std::string VFPPROD::PRESSURE_DEF::defaultValue = "THP"; -const std::string VFPPROD::ALQ_DEF::itemName = "ALQ_DEF"; -const std::string VFPPROD::UNITS::itemName = "UNITS"; -const std::string VFPPROD::BODY_DEF::itemName = "BODY_DEF"; -const std::string VFPPROD::BODY_DEF::defaultValue = "BHP"; -const std::string VFPPROD::FLOW_VALUES::itemName = "FLOW_VALUES"; -const std::string VFPPROD::THP_VALUES::itemName = "THP_VALUES"; -const std::string VFPPROD::WFR_VALUES::itemName = "WFR_VALUES"; -const std::string VFPPROD::GFR_VALUES::itemName = "GFR_VALUES"; -const std::string VFPPROD::ALQ_VALUES::itemName = "ALQ_VALUES"; -const std::string VFPPROD::THP_INDEX::itemName = "THP_INDEX"; -const std::string VFPPROD::WFR_INDEX::itemName = "WFR_INDEX"; -const std::string VFPPROD::GFR_INDEX::itemName = "GFR_INDEX"; -const std::string VFPPROD::ALQ_INDEX::itemName = "ALQ_INDEX"; -const std::string VFPPROD::VALUES::itemName = "VALUES"; - - -VISCREF::VISCREF( ) : ParserKeyword("VISCREF") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTPVT"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("VISCREF"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("REFERENCE_PRESSURE",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("REFERENCE_RS",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("GasDissolutionFactor"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string VISCREF::keywordName = "VISCREF"; -const std::string VISCREF::REFERENCE_PRESSURE::itemName = "REFERENCE_PRESSURE"; -const std::string VISCREF::REFERENCE_RS::itemName = "REFERENCE_RS"; - - -WATDENT::WATDENT( ) : ParserKeyword("WATDENT") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTPVT"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("WATDENT"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("REFERENCE_TEMPERATURE",Opm::SINGLE,527.66999999999996)); - item->setDescription(""); - item->push_backDimension("AbsoluteTemperature"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("EXPANSION_COEFF_LINEAR",Opm::SINGLE,0.00016699999999999999)); - item->setDescription(""); - item->push_backDimension("1/AbsoluteTemperature"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("EXPANSION_COEFF_QUADRATIC",Opm::SINGLE,9.2600000000000001e-07)); - item->setDescription(""); - item->push_backDimension("1/AbsoluteTemperature*AbsoluteTemperature"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string WATDENT::keywordName = "WATDENT"; -const std::string WATDENT::REFERENCE_TEMPERATURE::itemName = "REFERENCE_TEMPERATURE"; -const double WATDENT::REFERENCE_TEMPERATURE::defaultValue = 527.67; -const std::string WATDENT::EXPANSION_COEFF_LINEAR::itemName = "EXPANSION_COEFF_LINEAR"; -const double WATDENT::EXPANSION_COEFF_LINEAR::defaultValue = 0.000167; -const std::string WATDENT::EXPANSION_COEFF_QUADRATIC::itemName = "EXPANSION_COEFF_QUADRATIC"; -const double WATDENT::EXPANSION_COEFF_QUADRATIC::defaultValue = 9.26e-07; - - -WATER::WATER( ) : ParserKeyword("WATER") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("WATER"); -} -const std::string WATER::keywordName = "WATER"; - - -WATVISCT::WATVISCT( ) : ParserKeyword("WATVISCT") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NTPVT"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("WATVISCT"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("DATA",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Temperature"); - item->push_backDimension("Viscosity"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string WATVISCT::keywordName = "WATVISCT"; -const std::string WATVISCT::DATA::itemName = "DATA"; - - -WCONHIST::WCONHIST( ) : ParserKeyword("WCONHIST") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("WCONHIST"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("WELL",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("STATUS",Opm::SINGLE,"OPEN")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("CMODE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("ORAT",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("LiquidSurfaceVolume/Time"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("WRAT",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("LiquidSurfaceVolume/Time"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("GRAT",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("GasSurfaceVolume/Time"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("VFPTable",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("Lift",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("THP",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("BHP",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("NGLRAT",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("LiquidSurfaceVolume/Time"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string WCONHIST::keywordName = "WCONHIST"; -const std::string WCONHIST::WELL::itemName = "WELL"; -const std::string WCONHIST::STATUS::itemName = "STATUS"; -const std::string WCONHIST::STATUS::defaultValue = "OPEN"; -const std::string WCONHIST::CMODE::itemName = "CMODE"; -const std::string WCONHIST::ORAT::itemName = "ORAT"; -const double WCONHIST::ORAT::defaultValue = 0; -const std::string WCONHIST::WRAT::itemName = "WRAT"; -const double WCONHIST::WRAT::defaultValue = 0; -const std::string WCONHIST::GRAT::itemName = "GRAT"; -const double WCONHIST::GRAT::defaultValue = 0; -const std::string WCONHIST::VFPTable::itemName = "VFPTable"; -const int WCONHIST::VFPTable::defaultValue = 0; -const std::string WCONHIST::Lift::itemName = "Lift"; -const double WCONHIST::Lift::defaultValue = 0; -const std::string WCONHIST::THP::itemName = "THP"; -const double WCONHIST::THP::defaultValue = 0; -const std::string WCONHIST::BHP::itemName = "BHP"; -const double WCONHIST::BHP::defaultValue = 0; -const std::string WCONHIST::NGLRAT::itemName = "NGLRAT"; -const double WCONHIST::NGLRAT::defaultValue = 0; - - -WCONINJ::WCONINJ( ) : ParserKeyword("WCONINJ") { - setFixedSize( (size_t) 0); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("WCONINJ"); -} -const std::string WCONINJ::keywordName = "WCONINJ"; - - -WCONINJE::WCONINJE( ) : ParserKeyword("WCONINJE") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("WCONINJE"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("WELL",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("TYPE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("STATUS",Opm::SINGLE,"OPEN")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("CMODE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("RATE",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("ContextDependent"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("RESV",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("ReservoirVolume/Time"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("BHP",Opm::SINGLE,6891)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("THP",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("VFP_TABLE",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("VAPOIL_C",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("GAS_STEAM_RATIO",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("SURFACE_OIL_FRACTION",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("SURFACE_GAS_FRACTION",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("OIL_STEAM_RATIO",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string WCONINJE::keywordName = "WCONINJE"; -const std::string WCONINJE::WELL::itemName = "WELL"; -const std::string WCONINJE::TYPE::itemName = "TYPE"; -const std::string WCONINJE::STATUS::itemName = "STATUS"; -const std::string WCONINJE::STATUS::defaultValue = "OPEN"; -const std::string WCONINJE::CMODE::itemName = "CMODE"; -const std::string WCONINJE::RATE::itemName = "RATE"; -const std::string WCONINJE::RESV::itemName = "RESV"; -const std::string WCONINJE::BHP::itemName = "BHP"; -const double WCONINJE::BHP::defaultValue = 6891; -const std::string WCONINJE::THP::itemName = "THP"; -const std::string WCONINJE::VFP_TABLE::itemName = "VFP_TABLE"; -const int WCONINJE::VFP_TABLE::defaultValue = 0; -const std::string WCONINJE::VAPOIL_C::itemName = "VAPOIL_C"; -const double WCONINJE::VAPOIL_C::defaultValue = 0; -const std::string WCONINJE::GAS_STEAM_RATIO::itemName = "GAS_STEAM_RATIO"; -const double WCONINJE::GAS_STEAM_RATIO::defaultValue = 0; -const std::string WCONINJE::SURFACE_OIL_FRACTION::itemName = "SURFACE_OIL_FRACTION"; -const double WCONINJE::SURFACE_OIL_FRACTION::defaultValue = 0; -const std::string WCONINJE::SURFACE_GAS_FRACTION::itemName = "SURFACE_GAS_FRACTION"; -const double WCONINJE::SURFACE_GAS_FRACTION::defaultValue = 0; -const std::string WCONINJE::OIL_STEAM_RATIO::itemName = "OIL_STEAM_RATIO"; -const double WCONINJE::OIL_STEAM_RATIO::defaultValue = 0; - - -WCONINJH::WCONINJH( ) : ParserKeyword("WCONINJH") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("WCONINJH"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("WELL",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("TYPE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("STATUS",Opm::SINGLE,"OPEN")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("RATE",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("ContextDependent"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("BHP",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("THP",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("VFP_TABLE",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("VAPOIL_C",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("SURFACE_OIL_FRACTION",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("SURFACE_WATER_FRACTION",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("SURFACE_GAS_FRACTION",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("CMODE",Opm::SINGLE,"RATE")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string WCONINJH::keywordName = "WCONINJH"; -const std::string WCONINJH::WELL::itemName = "WELL"; -const std::string WCONINJH::TYPE::itemName = "TYPE"; -const std::string WCONINJH::STATUS::itemName = "STATUS"; -const std::string WCONINJH::STATUS::defaultValue = "OPEN"; -const std::string WCONINJH::RATE::itemName = "RATE"; -const std::string WCONINJH::BHP::itemName = "BHP"; -const std::string WCONINJH::THP::itemName = "THP"; -const std::string WCONINJH::VFP_TABLE::itemName = "VFP_TABLE"; -const int WCONINJH::VFP_TABLE::defaultValue = 0; -const std::string WCONINJH::VAPOIL_C::itemName = "VAPOIL_C"; -const double WCONINJH::VAPOIL_C::defaultValue = 0; -const std::string WCONINJH::SURFACE_OIL_FRACTION::itemName = "SURFACE_OIL_FRACTION"; -const double WCONINJH::SURFACE_OIL_FRACTION::defaultValue = 0; -const std::string WCONINJH::SURFACE_WATER_FRACTION::itemName = "SURFACE_WATER_FRACTION"; -const double WCONINJH::SURFACE_WATER_FRACTION::defaultValue = 0; -const std::string WCONINJH::SURFACE_GAS_FRACTION::itemName = "SURFACE_GAS_FRACTION"; -const double WCONINJH::SURFACE_GAS_FRACTION::defaultValue = 0; -const std::string WCONINJH::CMODE::itemName = "CMODE"; -const std::string WCONINJH::CMODE::defaultValue = "RATE"; - - -WCONPROD::WCONPROD( ) : ParserKeyword("WCONPROD") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("WCONPROD"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("WELL",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("STATUS",Opm::SINGLE,"OPEN")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("CMODE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("ORAT",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("LiquidSurfaceVolume/Time"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("WRAT",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("LiquidSurfaceVolume/Time"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("GRAT",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("GasSurfaceVolume/Time"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("LRAT",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("LiquidSurfaceVolume/Time"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("RESV",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("LiquidSurfaceVolume/Time"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("BHP",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("THP",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("VFP_TABLE",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("ALQ",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("E300_ITEM13",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("E300_ITEM14",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("E300_ITEM15",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("E300_ITEM16",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("E300_ITEM17",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("E300_ITEM18",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("E300_ITEM19",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("E300_ITEM20",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string WCONPROD::keywordName = "WCONPROD"; -const std::string WCONPROD::WELL::itemName = "WELL"; -const std::string WCONPROD::STATUS::itemName = "STATUS"; -const std::string WCONPROD::STATUS::defaultValue = "OPEN"; -const std::string WCONPROD::CMODE::itemName = "CMODE"; -const std::string WCONPROD::ORAT::itemName = "ORAT"; -const double WCONPROD::ORAT::defaultValue = 0; -const std::string WCONPROD::WRAT::itemName = "WRAT"; -const double WCONPROD::WRAT::defaultValue = 0; -const std::string WCONPROD::GRAT::itemName = "GRAT"; -const double WCONPROD::GRAT::defaultValue = 0; -const std::string WCONPROD::LRAT::itemName = "LRAT"; -const double WCONPROD::LRAT::defaultValue = 0; -const std::string WCONPROD::RESV::itemName = "RESV"; -const double WCONPROD::RESV::defaultValue = 0; -const std::string WCONPROD::BHP::itemName = "BHP"; -const double WCONPROD::BHP::defaultValue = 0; -const std::string WCONPROD::THP::itemName = "THP"; -const double WCONPROD::THP::defaultValue = 0; -const std::string WCONPROD::VFP_TABLE::itemName = "VFP_TABLE"; -const int WCONPROD::VFP_TABLE::defaultValue = 0; -const std::string WCONPROD::ALQ::itemName = "ALQ"; -const double WCONPROD::ALQ::defaultValue = 0; -const std::string WCONPROD::E300_ITEM13::itemName = "E300_ITEM13"; -const std::string WCONPROD::E300_ITEM14::itemName = "E300_ITEM14"; -const std::string WCONPROD::E300_ITEM15::itemName = "E300_ITEM15"; -const std::string WCONPROD::E300_ITEM16::itemName = "E300_ITEM16"; -const std::string WCONPROD::E300_ITEM17::itemName = "E300_ITEM17"; -const std::string WCONPROD::E300_ITEM18::itemName = "E300_ITEM18"; -const std::string WCONPROD::E300_ITEM19::itemName = "E300_ITEM19"; -const std::string WCONPROD::E300_ITEM20::itemName = "E300_ITEM20"; - - -WDRILTIM::WDRILTIM( ) : ParserKeyword("WDRILTIM") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("WDRILTIM"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("WELL",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("DRILL_TIME",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Time"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("WORKOVER_CLOSE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("COMPARTMENT",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string WDRILTIM::keywordName = "WDRILTIM"; -const std::string WDRILTIM::WELL::itemName = "WELL"; -const std::string WDRILTIM::DRILL_TIME::itemName = "DRILL_TIME"; -const std::string WDRILTIM::WORKOVER_CLOSE::itemName = "WORKOVER_CLOSE"; -const std::string WDRILTIM::COMPARTMENT::itemName = "COMPARTMENT"; - - -WECON::WECON( ) : ParserKeyword("WECON") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("WECON"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("WELL",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("MIN_OIL_PRODUCTION",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("LiquidSurfaceVolume/Time"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("MIN_GAS_PRODUCTION",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("GasSurfaceVolume/Time"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("MAX_WATER_CUT",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("MAX_GAS_OIL_RATIO",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("MAX_WATER_GAS_RATIO",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("WORKOVER_RATIO_LIMIT",Opm::SINGLE,"NONE")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("END_RUN_FLAG",Opm::SINGLE,"NO")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("FOLLOW_ON_WELL",Opm::SINGLE,"'")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("LIMITED_QUANTITY",Opm::SINGLE,"RATE")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("SECOND_MAX_WATER_CUT",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("WORKOVER_SECOND_WATER_CUT_LIMIT",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("MAX_GAS_LIQUID_RATIO",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("MIN_LIQUID_PRODCUTION_RATE",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("LiquidSurfaceVolume/Time"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("MAX_TEMP",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Temperature"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("MIN_RES_FLUID_RATE",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("ReservoirVolume/Time"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string WECON::keywordName = "WECON"; -const std::string WECON::WELL::itemName = "WELL"; -const std::string WECON::MIN_OIL_PRODUCTION::itemName = "MIN_OIL_PRODUCTION"; -const double WECON::MIN_OIL_PRODUCTION::defaultValue = 0; -const std::string WECON::MIN_GAS_PRODUCTION::itemName = "MIN_GAS_PRODUCTION"; -const double WECON::MIN_GAS_PRODUCTION::defaultValue = 0; -const std::string WECON::MAX_WATER_CUT::itemName = "MAX_WATER_CUT"; -const double WECON::MAX_WATER_CUT::defaultValue = 0; -const std::string WECON::MAX_GAS_OIL_RATIO::itemName = "MAX_GAS_OIL_RATIO"; -const double WECON::MAX_GAS_OIL_RATIO::defaultValue = 0; -const std::string WECON::MAX_WATER_GAS_RATIO::itemName = "MAX_WATER_GAS_RATIO"; -const double WECON::MAX_WATER_GAS_RATIO::defaultValue = 0; -const std::string WECON::WORKOVER_RATIO_LIMIT::itemName = "WORKOVER_RATIO_LIMIT"; -const std::string WECON::WORKOVER_RATIO_LIMIT::defaultValue = "NONE"; -const std::string WECON::END_RUN_FLAG::itemName = "END_RUN_FLAG"; -const std::string WECON::END_RUN_FLAG::defaultValue = "NO"; -const std::string WECON::FOLLOW_ON_WELL::itemName = "FOLLOW_ON_WELL"; -const std::string WECON::FOLLOW_ON_WELL::defaultValue = "'"; -const std::string WECON::LIMITED_QUANTITY::itemName = "LIMITED_QUANTITY"; -const std::string WECON::LIMITED_QUANTITY::defaultValue = "RATE"; -const std::string WECON::SECOND_MAX_WATER_CUT::itemName = "SECOND_MAX_WATER_CUT"; -const double WECON::SECOND_MAX_WATER_CUT::defaultValue = 0; -const std::string WECON::WORKOVER_SECOND_WATER_CUT_LIMIT::itemName = "WORKOVER_SECOND_WATER_CUT_LIMIT"; -const std::string WECON::MAX_GAS_LIQUID_RATIO::itemName = "MAX_GAS_LIQUID_RATIO"; -const double WECON::MAX_GAS_LIQUID_RATIO::defaultValue = 0; -const std::string WECON::MIN_LIQUID_PRODCUTION_RATE::itemName = "MIN_LIQUID_PRODCUTION_RATE"; -const double WECON::MIN_LIQUID_PRODCUTION_RATE::defaultValue = 0; -const std::string WECON::MAX_TEMP::itemName = "MAX_TEMP"; -const std::string WECON::MIN_RES_FLUID_RATE::itemName = "MIN_RES_FLUID_RATE"; -const double WECON::MIN_RES_FLUID_RATE::defaultValue = 0; - - -WELLDIMS::WELLDIMS( ) : ParserKeyword("WELLDIMS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("WELLDIMS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("MAXWELLS",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAXCONN",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAXGROUPS",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_GROUPSIZE",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_STAGES",Opm::SINGLE,5)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_STREAMS",Opm::SINGLE,10)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_MIXTURES",Opm::SINGLE,5)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_SEPARATORS",Opm::SINGLE,4)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_MIXTURE_ITEMS",Opm::SINGLE,3)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_COMPLETION_X",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_WELLIST_PR_WELL",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_DYNAMIC_WELLIST",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("MAX_SECONDARY_WELLS",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string WELLDIMS::keywordName = "WELLDIMS"; -const std::string WELLDIMS::MAXWELLS::itemName = "MAXWELLS"; -const int WELLDIMS::MAXWELLS::defaultValue = 0; -const std::string WELLDIMS::MAXCONN::itemName = "MAXCONN"; -const int WELLDIMS::MAXCONN::defaultValue = 0; -const std::string WELLDIMS::MAXGROUPS::itemName = "MAXGROUPS"; -const int WELLDIMS::MAXGROUPS::defaultValue = 0; -const std::string WELLDIMS::MAX_GROUPSIZE::itemName = "MAX_GROUPSIZE"; -const int WELLDIMS::MAX_GROUPSIZE::defaultValue = 0; -const std::string WELLDIMS::MAX_STAGES::itemName = "MAX_STAGES"; -const int WELLDIMS::MAX_STAGES::defaultValue = 5; -const std::string WELLDIMS::MAX_STREAMS::itemName = "MAX_STREAMS"; -const int WELLDIMS::MAX_STREAMS::defaultValue = 10; -const std::string WELLDIMS::MAX_MIXTURES::itemName = "MAX_MIXTURES"; -const int WELLDIMS::MAX_MIXTURES::defaultValue = 5; -const std::string WELLDIMS::MAX_SEPARATORS::itemName = "MAX_SEPARATORS"; -const int WELLDIMS::MAX_SEPARATORS::defaultValue = 4; -const std::string WELLDIMS::MAX_MIXTURE_ITEMS::itemName = "MAX_MIXTURE_ITEMS"; -const int WELLDIMS::MAX_MIXTURE_ITEMS::defaultValue = 3; -const std::string WELLDIMS::MAX_COMPLETION_X::itemName = "MAX_COMPLETION_X"; -const int WELLDIMS::MAX_COMPLETION_X::defaultValue = 0; -const std::string WELLDIMS::MAX_WELLIST_PR_WELL::itemName = "MAX_WELLIST_PR_WELL"; -const int WELLDIMS::MAX_WELLIST_PR_WELL::defaultValue = 1; -const std::string WELLDIMS::MAX_DYNAMIC_WELLIST::itemName = "MAX_DYNAMIC_WELLIST"; -const int WELLDIMS::MAX_DYNAMIC_WELLIST::defaultValue = 1; -const std::string WELLDIMS::MAX_SECONDARY_WELLS::itemName = "MAX_SECONDARY_WELLS"; -const int WELLDIMS::MAX_SECONDARY_WELLS::defaultValue = 1; - - -WELL_PROBE::WELL_PROBE( ) : ParserKeyword("WELL_PROBE") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SUMMARY"); - clearDeckNames(); - addDeckName("NGOPAS"); - addDeckName("WALQ"); - addDeckName("WAPI"); - addDeckName("WBGLR"); - addDeckName("WBHP"); - addDeckName("WBHPFP"); - addDeckName("WBHPH"); - addDeckName("WBP"); - addDeckName("WBP4"); - addDeckName("WBP5"); - addDeckName("WBP9"); - addDeckName("WCIC"); - addDeckName("WCIR"); - addDeckName("WCIT"); - addDeckName("WCPC"); - addDeckName("WCPR"); - addDeckName("WCPT"); - addDeckName("WDRPR"); - addDeckName("WEDC"); - addDeckName("WEFF"); - addDeckName("WEFFG"); - addDeckName("WEPR"); - addDeckName("WEPT"); - addDeckName("WGCV"); - addDeckName("WGDC"); - addDeckName("WGFRL"); - addDeckName("WGIGR"); - addDeckName("WGIP"); - addDeckName("WGIP2"); - addDeckName("WGIR"); - addDeckName("WGIRH"); - addDeckName("WGIRL"); - addDeckName("WGIRT"); - addDeckName("WGIT"); - addDeckName("WGITH"); - addDeckName("WGITL"); - addDeckName("WGLIR"); - addDeckName("WGLR"); - addDeckName("WGLRH"); - addDeckName("WGLRL"); - addDeckName("WGOR"); - addDeckName("WGORH"); - addDeckName("WGORL"); - addDeckName("WGPGR"); - addDeckName("WGPI"); - addDeckName("WGPI2"); - addDeckName("WGPP"); - addDeckName("WGPP2"); - addDeckName("WGPPF"); - addDeckName("WGPPF2"); - addDeckName("WGPPS"); - addDeckName("WGPPS2"); - addDeckName("WGPR"); - addDeckName("WGPRF"); - addDeckName("WGPRFP"); - addDeckName("WGPRH"); - addDeckName("WGPRL"); - addDeckName("WGPRS"); - addDeckName("WGPRT"); - addDeckName("WGPT"); - addDeckName("WGPTF"); - addDeckName("WGPTH"); - addDeckName("WGPTL"); - addDeckName("WGPTS"); - addDeckName("WGQ"); - addDeckName("WHD"); - addDeckName("WHDF"); - addDeckName("WJPR"); - addDeckName("WJPRH"); - addDeckName("WJPRT"); - addDeckName("WJPT"); - addDeckName("WJPTH"); - addDeckName("WLFRL"); - addDeckName("WLPR"); - addDeckName("WLPRH"); - addDeckName("WLPRT"); - addDeckName("WLPT"); - addDeckName("WLPTH"); - addDeckName("WLPTL"); - addDeckName("WMCON"); - addDeckName("WMCTL"); - addDeckName("WMIR"); - addDeckName("WMIT"); - addDeckName("WMMW"); - addDeckName("WMPR"); - addDeckName("WMPT"); - addDeckName("WMVFP"); - addDeckName("WNIR"); - addDeckName("WNIT"); - addDeckName("WNPR"); - addDeckName("WNPT"); - addDeckName("WOFRL"); - addDeckName("WOGLR"); - addDeckName("WOGR"); - addDeckName("WOGRH"); - addDeckName("WOGRL"); - addDeckName("WOIGR"); - addDeckName("WOIR"); - addDeckName("WOIRH"); - addDeckName("WOIRT"); - addDeckName("WOIT"); - addDeckName("WOITH"); - addDeckName("WOITL"); - addDeckName("WOPGR"); - addDeckName("WOPI"); - addDeckName("WOPI2"); - addDeckName("WOPP"); - addDeckName("WOPP2"); - addDeckName("WOPR"); - addDeckName("WOPRF"); - addDeckName("WOPRH"); - addDeckName("WOPRL"); - addDeckName("WOPRS"); - addDeckName("WOPRT"); - addDeckName("WOPT"); - addDeckName("WOPTF"); - addDeckName("WOPTH"); - addDeckName("WOPTL"); - addDeckName("WOPTS"); - addDeckName("WPI"); - addDeckName("WPI1"); - addDeckName("WPI4"); - addDeckName("WPI5"); - addDeckName("WPI9"); - addDeckName("WPWE0"); - addDeckName("WPWE1"); - addDeckName("WPWE2"); - addDeckName("WPWE3"); - addDeckName("WPWE4"); - addDeckName("WPWE5"); - addDeckName("WPWE6"); - addDeckName("WPWE7"); - addDeckName("WPWEM"); - addDeckName("WSIC"); - addDeckName("WSIR"); - addDeckName("WSIT"); - addDeckName("WSPC"); - addDeckName("WSPR"); - addDeckName("WSPT"); - addDeckName("WSTAT"); - addDeckName("WTHP"); - addDeckName("WTHPFP"); - addDeckName("WTHPH"); - addDeckName("WTHT"); - addDeckName("WTIC"); - addDeckName("WTICF"); - addDeckName("WTICHEA"); - addDeckName("WTICS"); - addDeckName("WTIR"); - addDeckName("WTIRALK"); - addDeckName("WTIRANI"); - addDeckName("WTIRCAT"); - addDeckName("WTIRF"); - addDeckName("WTIRFOA"); - addDeckName("WTIRHEA"); - addDeckName("WTIRS"); - addDeckName("WTIRSUR"); - addDeckName("WTIT"); - addDeckName("WTITALK"); - addDeckName("WTITANI"); - addDeckName("WTITCAT"); - addDeckName("WTITF"); - addDeckName("WTITFOA"); - addDeckName("WTITHEA"); - addDeckName("WTITS"); - addDeckName("WTITSUR"); - addDeckName("WTPC"); - addDeckName("WTPCF"); - addDeckName("WTPCHEA"); - addDeckName("WTPCS"); - addDeckName("WTPR"); - addDeckName("WTPRALK"); - addDeckName("WTPRANI"); - addDeckName("WTPRCAT"); - addDeckName("WTPRF"); - addDeckName("WTPRFOA"); - addDeckName("WTPRHEA"); - addDeckName("WTPRS"); - addDeckName("WTPRSUR"); - addDeckName("WTPT"); - addDeckName("WTPTALK"); - addDeckName("WTPTANI"); - addDeckName("WTPTCAT"); - addDeckName("WTPTF"); - addDeckName("WTPTFOA"); - addDeckName("WTPTHEA"); - addDeckName("WTPTS"); - addDeckName("WTPTSUR"); - addDeckName("WVFRL"); - addDeckName("WVIR"); - addDeckName("WVIRL"); - addDeckName("WVIRT"); - addDeckName("WVIT"); - addDeckName("WVITL"); - addDeckName("WVPGR"); - addDeckName("WVPR"); - addDeckName("WVPRT"); - addDeckName("WVPT"); - addDeckName("WVPTL"); - addDeckName("WWCT"); - addDeckName("WWCTH"); - addDeckName("WWCTL"); - addDeckName("WWFRL"); - addDeckName("WWGR"); - addDeckName("WWGRH"); - addDeckName("WWGRL"); - addDeckName("WWIGR"); - addDeckName("WWIP"); - addDeckName("WWIP2"); - addDeckName("WWIR"); - addDeckName("WWIRH"); - addDeckName("WWIRL"); - addDeckName("WWIRT"); - addDeckName("WWIT"); - addDeckName("WWITH"); - addDeckName("WWITL"); - addDeckName("WWPGR"); - addDeckName("WWPI"); - addDeckName("WWPI2"); - addDeckName("WWPIR"); - addDeckName("WWPP"); - addDeckName("WWPP2"); - addDeckName("WWPR"); - addDeckName("WWPRH"); - addDeckName("WWPRL"); - addDeckName("WWPRT"); - addDeckName("WWPT"); - addDeckName("WWPTH"); - addDeckName("WWPTL"); - setMatchRegex("WU.+|(WBHWC|WGFWC|WOFWC|WWFWC)[1-9][0-9]?|WTPR.+|WTPT.+|WTPC.+|WTIR.+|WTIT.+|WTIC.+"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("WELLS",Opm::ALL)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string WELL_PROBE::keywordName = "WELL_PROBE"; -const std::string WELL_PROBE::WELLS::itemName = "WELLS"; - - -WELOPEN::WELOPEN( ) : ParserKeyword("WELOPEN") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("WELOPEN"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("WELL",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("STATUS",Opm::SINGLE,"OPEN")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("C1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("C2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string WELOPEN::keywordName = "WELOPEN"; -const std::string WELOPEN::WELL::itemName = "WELL"; -const std::string WELOPEN::STATUS::itemName = "STATUS"; -const std::string WELOPEN::STATUS::defaultValue = "OPEN"; -const std::string WELOPEN::I::itemName = "I"; -const std::string WELOPEN::J::itemName = "J"; -const std::string WELOPEN::K::itemName = "K"; -const std::string WELOPEN::C1::itemName = "C1"; -const std::string WELOPEN::C2::itemName = "C2"; - - -WELSEGS::WELSEGS( ) : ParserKeyword("WELSEGS") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("WELSEGS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("WELL",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("DEPTH",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("LENGTH",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("WELLBORE_VOLUME",Opm::SINGLE,1.0000000000000001e-05)); - item->setDescription(""); - item->push_backDimension("Length*Length*Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("INFO_TYPE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("PRESSURE_COMPONENTS",Opm::SINGLE,"HFA")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("FLOW_MODEL",Opm::SINGLE,"HO")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("TOP_X",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("TOP_Y",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - addRecord( record ); - } - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("SEGMENT1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("SEGMENT2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("BRANCH",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("JOIN_SEGMENT",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("SEGMENT_LENGTH",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("DEPTH_CHANGE",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("DIAMETER",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("ROUGHNESS",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("AREA",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Length*Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("VOLUME",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Length*Length*Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("LENGTH_X",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("LENGTH_Y",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string WELSEGS::keywordName = "WELSEGS"; -const std::string WELSEGS::WELL::itemName = "WELL"; -const std::string WELSEGS::DEPTH::itemName = "DEPTH"; -const std::string WELSEGS::LENGTH::itemName = "LENGTH"; -const double WELSEGS::LENGTH::defaultValue = 0; -const std::string WELSEGS::WELLBORE_VOLUME::itemName = "WELLBORE_VOLUME"; -const double WELSEGS::WELLBORE_VOLUME::defaultValue = 1e-05; -const std::string WELSEGS::INFO_TYPE::itemName = "INFO_TYPE"; -const std::string WELSEGS::PRESSURE_COMPONENTS::itemName = "PRESSURE_COMPONENTS"; -const std::string WELSEGS::PRESSURE_COMPONENTS::defaultValue = "HFA"; -const std::string WELSEGS::FLOW_MODEL::itemName = "FLOW_MODEL"; -const std::string WELSEGS::FLOW_MODEL::defaultValue = "HO"; -const std::string WELSEGS::TOP_X::itemName = "TOP_X"; -const double WELSEGS::TOP_X::defaultValue = 0; -const std::string WELSEGS::TOP_Y::itemName = "TOP_Y"; -const double WELSEGS::TOP_Y::defaultValue = 0; -const std::string WELSEGS::SEGMENT1::itemName = "SEGMENT1"; -const std::string WELSEGS::SEGMENT2::itemName = "SEGMENT2"; -const std::string WELSEGS::BRANCH::itemName = "BRANCH"; -const std::string WELSEGS::JOIN_SEGMENT::itemName = "JOIN_SEGMENT"; -const std::string WELSEGS::SEGMENT_LENGTH::itemName = "SEGMENT_LENGTH"; -const std::string WELSEGS::DEPTH_CHANGE::itemName = "DEPTH_CHANGE"; -const std::string WELSEGS::DIAMETER::itemName = "DIAMETER"; -const std::string WELSEGS::ROUGHNESS::itemName = "ROUGHNESS"; -const std::string WELSEGS::AREA::itemName = "AREA"; -const std::string WELSEGS::VOLUME::itemName = "VOLUME"; -const std::string WELSEGS::LENGTH_X::itemName = "LENGTH_X"; -const double WELSEGS::LENGTH_X::defaultValue = 0; -const std::string WELSEGS::LENGTH_Y::itemName = "LENGTH_Y"; -const double WELSEGS::LENGTH_Y::defaultValue = 0; - - -WELSPECS::WELSPECS( ) : ParserKeyword("WELSPECS") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("WELSPECS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("WELL",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("GROUP",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("HEAD_I",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("HEAD_J",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("REF_DEPTH",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("PHASE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("D_RADIUS",Opm::SINGLE,0)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("INFLOW_EQ",Opm::SINGLE,"STD")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("AUTO_SHUTIN",Opm::SINGLE,"SHUT")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("CROSSFLOW",Opm::SINGLE,"YES")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("P_TABLE",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("DENSITY_CALC",Opm::SINGLE,"SEG")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("FIP_REGION",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("FRONTSIM1",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("FRONTSIM2",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("well_model",Opm::SINGLE,"STD")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("POLYMER_TABLE",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string WELSPECS::keywordName = "WELSPECS"; -const std::string WELSPECS::WELL::itemName = "WELL"; -const std::string WELSPECS::GROUP::itemName = "GROUP"; -const std::string WELSPECS::HEAD_I::itemName = "HEAD_I"; -const std::string WELSPECS::HEAD_J::itemName = "HEAD_J"; -const std::string WELSPECS::REF_DEPTH::itemName = "REF_DEPTH"; -const std::string WELSPECS::PHASE::itemName = "PHASE"; -const std::string WELSPECS::D_RADIUS::itemName = "D_RADIUS"; -const double WELSPECS::D_RADIUS::defaultValue = 0; -const std::string WELSPECS::INFLOW_EQ::itemName = "INFLOW_EQ"; -const std::string WELSPECS::INFLOW_EQ::defaultValue = "STD"; -const std::string WELSPECS::AUTO_SHUTIN::itemName = "AUTO_SHUTIN"; -const std::string WELSPECS::AUTO_SHUTIN::defaultValue = "SHUT"; -const std::string WELSPECS::CROSSFLOW::itemName = "CROSSFLOW"; -const std::string WELSPECS::CROSSFLOW::defaultValue = "YES"; -const std::string WELSPECS::P_TABLE::itemName = "P_TABLE"; -const int WELSPECS::P_TABLE::defaultValue = 0; -const std::string WELSPECS::DENSITY_CALC::itemName = "DENSITY_CALC"; -const std::string WELSPECS::DENSITY_CALC::defaultValue = "SEG"; -const std::string WELSPECS::FIP_REGION::itemName = "FIP_REGION"; -const int WELSPECS::FIP_REGION::defaultValue = 0; -const std::string WELSPECS::FRONTSIM1::itemName = "FRONTSIM1"; -const std::string WELSPECS::FRONTSIM2::itemName = "FRONTSIM2"; -const std::string WELSPECS::well_model::itemName = "well_model"; -const std::string WELSPECS::well_model::defaultValue = "STD"; -const std::string WELSPECS::POLYMER_TABLE::itemName = "POLYMER_TABLE"; -const int WELSPECS::POLYMER_TABLE::defaultValue = 0; - - -WELTARG::WELTARG( ) : ParserKeyword("WELTARG") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("WELTARG"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("WELL",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("CMODE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("NEW_VALUE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string WELTARG::keywordName = "WELTARG"; -const std::string WELTARG::WELL::itemName = "WELL"; -const std::string WELTARG::CMODE::itemName = "CMODE"; -const std::string WELTARG::NEW_VALUE::itemName = "NEW_VALUE"; - - -WGRUPCON::WGRUPCON( ) : ParserKeyword("WGRUPCON") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("WGRUPCON"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("WELL",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("GROUP_CONTROLLED",Opm::SINGLE,"YES")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("GUIDE_RATE",Opm::SINGLE,-1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("PHASE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("SCALING_FACTOR",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string WGRUPCON::keywordName = "WGRUPCON"; -const std::string WGRUPCON::WELL::itemName = "WELL"; -const std::string WGRUPCON::GROUP_CONTROLLED::itemName = "GROUP_CONTROLLED"; -const std::string WGRUPCON::GROUP_CONTROLLED::defaultValue = "YES"; -const std::string WGRUPCON::GUIDE_RATE::itemName = "GUIDE_RATE"; -const double WGRUPCON::GUIDE_RATE::defaultValue = -1; -const std::string WGRUPCON::PHASE::itemName = "PHASE"; -const std::string WGRUPCON::SCALING_FACTOR::itemName = "SCALING_FACTOR"; -const double WGRUPCON::SCALING_FACTOR::defaultValue = 1; - - -WHISTCTL::WHISTCTL( ) : ParserKeyword("WHISTCTL") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("WHISTCTL"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("CMODE",Opm::SINGLE,"NONE")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("BPH_TERMINATE",Opm::SINGLE,"NO")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string WHISTCTL::keywordName = "WHISTCTL"; -const std::string WHISTCTL::CMODE::itemName = "CMODE"; -const std::string WHISTCTL::CMODE::defaultValue = "NONE"; -const std::string WHISTCTL::BPH_TERMINATE::itemName = "BPH_TERMINATE"; -const std::string WHISTCTL::BPH_TERMINATE::defaultValue = "NO"; - - -WLIFT::WLIFT( ) : ParserKeyword("WLIFT") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("WLIFT"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("WELL",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("TRIGGER_LIMIT",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("TRIGGRE_PHASE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NEW_VFP_TABLE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("NEW_ALQ_VALUE",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("NEW_WEFAC",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("WWCT_LIMIT",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("NEW_THP_LIMIT",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("WGOR_LIMIT",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("ALQ_SHIFT",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("THP_SHIFT",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Pressure"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string WLIFT::keywordName = "WLIFT"; -const std::string WLIFT::WELL::itemName = "WELL"; -const std::string WLIFT::TRIGGER_LIMIT::itemName = "TRIGGER_LIMIT"; -const std::string WLIFT::TRIGGRE_PHASE::itemName = "TRIGGRE_PHASE"; -const std::string WLIFT::NEW_VFP_TABLE::itemName = "NEW_VFP_TABLE"; -const std::string WLIFT::NEW_ALQ_VALUE::itemName = "NEW_ALQ_VALUE"; -const std::string WLIFT::NEW_WEFAC::itemName = "NEW_WEFAC"; -const std::string WLIFT::WWCT_LIMIT::itemName = "WWCT_LIMIT"; -const std::string WLIFT::NEW_THP_LIMIT::itemName = "NEW_THP_LIMIT"; -const std::string WLIFT::WGOR_LIMIT::itemName = "WGOR_LIMIT"; -const std::string WLIFT::ALQ_SHIFT::itemName = "ALQ_SHIFT"; -const std::string WLIFT::THP_SHIFT::itemName = "THP_SHIFT"; - - -WPAVE::WPAVE( ) : ParserKeyword("WPAVE") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("WPAVE"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("WEIGTH_FACTOR1",Opm::SINGLE,0.5)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("WEIGTH_FACTOR2",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("DEPTH_CORRECTION",Opm::SINGLE,"WELL")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("CONNECTION",Opm::SINGLE,"OPEN")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string WPAVE::keywordName = "WPAVE"; -const std::string WPAVE::WEIGTH_FACTOR1::itemName = "WEIGTH_FACTOR1"; -const double WPAVE::WEIGTH_FACTOR1::defaultValue = 0.5; -const std::string WPAVE::WEIGTH_FACTOR2::itemName = "WEIGTH_FACTOR2"; -const double WPAVE::WEIGTH_FACTOR2::defaultValue = 1; -const std::string WPAVE::DEPTH_CORRECTION::itemName = "DEPTH_CORRECTION"; -const std::string WPAVE::DEPTH_CORRECTION::defaultValue = "WELL"; -const std::string WPAVE::CONNECTION::itemName = "CONNECTION"; -const std::string WPAVE::CONNECTION::defaultValue = "OPEN"; - - -WPIMULT::WPIMULT( ) : ParserKeyword("WPIMULT") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("WPIMULT"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("WELL",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("WELLPI",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("I",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("J",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("K",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("FIRST",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("LAST",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string WPIMULT::keywordName = "WPIMULT"; -const std::string WPIMULT::WELL::itemName = "WELL"; -const std::string WPIMULT::WELLPI::itemName = "WELLPI"; -const double WPIMULT::WELLPI::defaultValue = 1; -const std::string WPIMULT::I::itemName = "I"; -const std::string WPIMULT::J::itemName = "J"; -const std::string WPIMULT::K::itemName = "K"; -const std::string WPIMULT::FIRST::itemName = "FIRST"; -const std::string WPIMULT::LAST::itemName = "LAST"; - - -WPITAB::WPITAB( ) : ParserKeyword("WPITAB") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("WPITAB"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("WELL",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("PI",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string WPITAB::keywordName = "WPITAB"; -const std::string WPITAB::WELL::itemName = "WELL"; -const std::string WPITAB::PI::itemName = "PI"; -const double WPITAB::PI::defaultValue = 0; - - -WPOLYMER::WPOLYMER( ) : ParserKeyword("WPOLYMER") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - addValidSectionName("SPECIAL"); - clearDeckNames(); - addDeckName("WPOLYMER"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("WELL",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("POLYMER_CONCENTRATION",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("PolymerDensity"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("SALT_CONCENTRATION",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("PolymerDensity"); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("GROUP_POLYMER_CONCENTRATION",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("GROUP_SALT_CONCENTRATION",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string WPOLYMER::keywordName = "WPOLYMER"; -const std::string WPOLYMER::WELL::itemName = "WELL"; -const std::string WPOLYMER::POLYMER_CONCENTRATION::itemName = "POLYMER_CONCENTRATION"; -const std::string WPOLYMER::SALT_CONCENTRATION::itemName = "SALT_CONCENTRATION"; -const std::string WPOLYMER::GROUP_POLYMER_CONCENTRATION::itemName = "GROUP_POLYMER_CONCENTRATION"; -const std::string WPOLYMER::GROUP_SALT_CONCENTRATION::itemName = "GROUP_SALT_CONCENTRATION"; - - -WRFT::WRFT( ) : ParserKeyword("WRFT") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("WRFT"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("WELL",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string WRFT::keywordName = "WRFT"; -const std::string WRFT::WELL::itemName = "WELL"; - - -WRFTPLT::WRFTPLT( ) : ParserKeyword("WRFTPLT") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("WRFTPLT"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("WELL",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("OUTPUT_RFT",Opm::SINGLE,"NO")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("OUTPUT_PLT",Opm::SINGLE,"NO")); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("OUTPUT_SEGMENT",Opm::SINGLE,"NO")); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string WRFTPLT::keywordName = "WRFTPLT"; -const std::string WRFTPLT::WELL::itemName = "WELL"; -const std::string WRFTPLT::OUTPUT_RFT::itemName = "OUTPUT_RFT"; -const std::string WRFTPLT::OUTPUT_RFT::defaultValue = "NO"; -const std::string WRFTPLT::OUTPUT_PLT::itemName = "OUTPUT_PLT"; -const std::string WRFTPLT::OUTPUT_PLT::defaultValue = "NO"; -const std::string WRFTPLT::OUTPUT_SEGMENT::itemName = "OUTPUT_SEGMENT"; -const std::string WRFTPLT::OUTPUT_SEGMENT::defaultValue = "NO"; - - -WSEGDIMS::WSEGDIMS( ) : ParserKeyword("WSEGDIMS") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("RUNSPEC"); - clearDeckNames(); - addDeckName("WSEGDIMS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserIntItem("NSWLMX",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NSEGMX",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NLBRMX",Opm::SINGLE,1)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("NCRDMX",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string WSEGDIMS::keywordName = "WSEGDIMS"; -const std::string WSEGDIMS::NSWLMX::itemName = "NSWLMX"; -const int WSEGDIMS::NSWLMX::defaultValue = 0; -const std::string WSEGDIMS::NSEGMX::itemName = "NSEGMX"; -const int WSEGDIMS::NSEGMX::defaultValue = 1; -const std::string WSEGDIMS::NLBRMX::itemName = "NLBRMX"; -const int WSEGDIMS::NLBRMX::defaultValue = 1; -const std::string WSEGDIMS::NCRDMX::itemName = "NCRDMX"; -const int WSEGDIMS::NCRDMX::defaultValue = 0; - - -WSOLVENT::WSOLVENT( ) : ParserKeyword("WSOLVENT") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("WSOLVENT"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("WELL",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("SOLVENT_FRACTION",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string WSOLVENT::keywordName = "WSOLVENT"; -const std::string WSOLVENT::WELL::itemName = "WELL"; -const std::string WSOLVENT::SOLVENT_FRACTION::itemName = "SOLVENT_FRACTION"; - - -WTEMP::WTEMP( ) : ParserKeyword("WTEMP") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("WTEMP"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("WELL",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("TEMP",Opm::SINGLE)); - item->setDescription(""); - item->push_backDimension("Temperature"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string WTEMP::keywordName = "WTEMP"; -const std::string WTEMP::WELL::itemName = "WELL"; -const std::string WTEMP::TEMP::itemName = "TEMP"; - - -WTEST::WTEST( ) : ParserKeyword("WTEST") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("WTEST"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("well",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("interval",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("reason",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserIntItem("TEST_NUM",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("START_TIME",Opm::SINGLE,0)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string WTEST::keywordName = "WTEST"; -const std::string WTEST::well::itemName = "well"; -const std::string WTEST::interval::itemName = "interval"; -const std::string WTEST::reason::itemName = "reason"; -const std::string WTEST::TEST_NUM::itemName = "TEST_NUM"; -const int WTEST::TEST_NUM::defaultValue = 0; -const std::string WTEST::START_TIME::itemName = "START_TIME"; -const double WTEST::START_TIME::defaultValue = 0; - - -WTRACER::WTRACER( ) : ParserKeyword("WTRACER") { - setSizeType(SLASH_TERMINATED); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("WTRACER"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("WELL",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("TRACER",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("CONCENTRATION",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserDoubleItem("CUM_TRACER_FACTOR",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - { - ParserItemPtr item(new ParserStringItem("PRODUCTION_GROUP",Opm::SINGLE)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string WTRACER::keywordName = "WTRACER"; -const std::string WTRACER::WELL::itemName = "WELL"; -const std::string WTRACER::TRACER::itemName = "TRACER"; -const std::string WTRACER::CONCENTRATION::itemName = "CONCENTRATION"; -const std::string WTRACER::CUM_TRACER_FACTOR::itemName = "CUM_TRACER_FACTOR"; -const std::string WTRACER::PRODUCTION_GROUP::itemName = "PRODUCTION_GROUP"; - - -ZCORN::ZCORN( ) : ParserKeyword("ZCORN") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("ZCORN"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("data",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("Length"); - record->addDataItem(item); - } - addDataRecord( record ); - } -} -const std::string ZCORN::keywordName = "ZCORN"; -const std::string ZCORN::data::itemName = "data"; - - -ZFACT1::ZFACT1( ) : ParserKeyword("ZFACT1") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NUM_STATE_EQ"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("ZFACT1"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("Z0",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string ZFACT1::keywordName = "ZFACT1"; -const std::string ZFACT1::Z0::itemName = "Z0"; - - -ZFACT1S::ZFACT1S( ) : ParserKeyword("ZFACT1S") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NUM_STATE_EQ"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("ZFACT1S"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("Z0",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string ZFACT1S::keywordName = "ZFACT1S"; -const std::string ZFACT1S::Z0::itemName = "Z0"; - - -ZFACTOR::ZFACTOR( ) : ParserKeyword("ZFACTOR") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NUM_STATE_EQ"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("ZFACTOR"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("Z0",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string ZFACTOR::keywordName = "ZFACTOR"; -const std::string ZFACTOR::Z0::itemName = "Z0"; - - -ZFACTORS::ZFACTORS( ) : ParserKeyword("ZFACTORS") { - setSizeType(OTHER_KEYWORD_IN_DECK); - initSizeKeyword("TABDIMS","NUM_STATE_EQ"); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("PROPS"); - clearDeckNames(); - addDeckName("ZFACTORS"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserDoubleItem("Z0",Opm::ALL)); - item->setDescription(""); - item->push_backDimension("1"); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string ZFACTORS::keywordName = "ZFACTORS"; -const std::string ZFACTORS::Z0::itemName = "Z0"; - - -ZIPPY2::ZIPPY2( ) : ParserKeyword("ZIPPY2") { - setFixedSize( (size_t) 1); - setDescription(""); - clearValidSectionNames(); - addValidSectionName("SCHEDULE"); - clearDeckNames(); - addDeckName("ZIPPY2"); - { - std::shared_ptr record = std::make_shared(); - { - ParserItemPtr item(new ParserStringItem("SETTINGS",Opm::ALL)); - item->setDescription(""); - record->addItem(item); - } - addRecord( record ); - } -} -const std::string ZIPPY2::keywordName = "ZIPPY2"; -const std::string ZIPPY2::SETTINGS::itemName = "SETTINGS"; - - -void addDefaultKeywords0(Parser& p); -void addDefaultKeywords1(Parser& p); -void addDefaultKeywords2(Parser& p); -void addDefaultKeywords3(Parser& p); -} -void Parser::addDefaultKeywords() { -Opm::ParserKeywords::addDefaultKeywords0(*this); -Opm::ParserKeywords::addDefaultKeywords1(*this); -Opm::ParserKeywords::addDefaultKeywords2(*this); -Opm::ParserKeywords::addDefaultKeywords3(*this); -}} diff --git a/ThirdParty/custom-opm-parser/generated-source/ParserKeywords0.cpp b/ThirdParty/custom-opm-parser/generated-source/ParserKeywords0.cpp deleted file mode 100644 index c390d1333f..0000000000 --- a/ThirdParty/custom-opm-parser/generated-source/ParserKeywords0.cpp +++ /dev/null @@ -1,104 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - - -namespace Opm { -namespace ParserKeywords { - - -void addDefaultKeywords0(Parser& p); -void addDefaultKeywords0(Parser& p) { -p.addKeyword< ParserKeywords::ACTDIMS >(); -p.addKeyword< ParserKeywords::ACTNUM >(); -p.addKeyword< ParserKeywords::ADD >(); -p.addKeyword< ParserKeywords::ADDREG >(); -p.addKeyword< ParserKeywords::ADSALNOD >(); -p.addKeyword< ParserKeywords::ALL >(); -p.addKeyword< ParserKeywords::API >(); -p.addKeyword< ParserKeywords::AQUANCON >(); -p.addKeyword< ParserKeywords::AQUCON >(); -p.addKeyword< ParserKeywords::AQUDIMS >(); -p.addKeyword< ParserKeywords::AQUFETP >(); -p.addKeyword< ParserKeywords::AQUIFER_PROBE_ANALYTIC >(); -p.addKeyword< ParserKeywords::AQUNUM >(); -p.addKeyword< ParserKeywords::BLOCK_PROBE >(); -p.addKeyword< ParserKeywords::BLOCK_PROBE300 >(); -p.addKeyword< ParserKeywords::BOX >(); -p.addKeyword< ParserKeywords::COMPDAT >(); -p.addKeyword< ParserKeywords::COMPLUMP >(); -p.addKeyword< ParserKeywords::COMPORD >(); -p.addKeyword< ParserKeywords::COMPS >(); -p.addKeyword< ParserKeywords::COMPSEGS >(); -p.addKeyword< ParserKeywords::CONNECTION_PROBE >(); -p.addKeyword< ParserKeywords::COORD >(); -p.addKeyword< ParserKeywords::COPY >(); -p.addKeyword< ParserKeywords::COPYREG >(); -p.addKeyword< ParserKeywords::CPR >(); -p.addKeyword< ParserKeywords::CREF >(); -p.addKeyword< ParserKeywords::CREFS >(); -p.addKeyword< ParserKeywords::DATE >(); -p.addKeyword< ParserKeywords::DATES >(); -p.addKeyword< ParserKeywords::DATUM >(); -p.addKeyword< ParserKeywords::DENSITY >(); -p.addKeyword< ParserKeywords::DEPTH >(); -p.addKeyword< ParserKeywords::DEPTHZ >(); -p.addKeyword< ParserKeywords::DIMENS >(); -p.addKeyword< ParserKeywords::DISGAS >(); -p.addKeyword< ParserKeywords::DREF >(); -p.addKeyword< ParserKeywords::DREFS >(); -p.addKeyword< ParserKeywords::DRSDT >(); -p.addKeyword< ParserKeywords::DRVDT >(); -p.addKeyword< ParserKeywords::DUMPFLUX >(); -p.addKeyword< ParserKeywords::DX >(); -p.addKeyword< ParserKeywords::DXV >(); -p.addKeyword< ParserKeywords::DY >(); -p.addKeyword< ParserKeywords::DYV >(); -p.addKeyword< ParserKeywords::DZ >(); -p.addKeyword< ParserKeywords::DZV >(); -p.addKeyword< ParserKeywords::ECHO >(); -p.addKeyword< ParserKeywords::EDIT >(); -p.addKeyword< ParserKeywords::EDITNNC >(); -p.addKeyword< ParserKeywords::EHYSTR >(); -p.addKeyword< ParserKeywords::END >(); -p.addKeyword< ParserKeywords::ENDBOX >(); -p.addKeyword< ParserKeywords::ENDINC >(); -p.addKeyword< ParserKeywords::ENDNUM >(); -p.addKeyword< ParserKeywords::ENDPOINT_SPECIFIERS >(); -p.addKeyword< ParserKeywords::ENDSCALE >(); -p.addKeyword< ParserKeywords::ENDSKIP >(); -p.addKeyword< ParserKeywords::ENKRVD >(); -p.addKeyword< ParserKeywords::ENPTVD >(); -p.addKeyword< ParserKeywords::EQLDIMS >(); -p.addKeyword< ParserKeywords::EQLNUM >(); -p.addKeyword< ParserKeywords::EQLOPTS >(); -p.addKeyword< ParserKeywords::EQUALREG >(); -p.addKeyword< ParserKeywords::EQUALS >(); -p.addKeyword< ParserKeywords::EQUIL >(); -p.addKeyword< ParserKeywords::EXCEL >(); -p.addKeyword< ParserKeywords::EXTRAPMS >(); -p.addKeyword< ParserKeywords::FAULTDIM >(); -p.addKeyword< ParserKeywords::FAULTS >(); -p.addKeyword< ParserKeywords::FIELD >(); -p.addKeyword< ParserKeywords::FIELD_PROBE >(); -p.addKeyword< ParserKeywords::FILLEPS >(); -p.addKeyword< ParserKeywords::FIPNUM >(); -p.addKeyword< ParserKeywords::FLUXNUM >(); -p.addKeyword< ParserKeywords::FMTIN >(); -p.addKeyword< ParserKeywords::FMTOUT >(); -p.addKeyword< ParserKeywords::FULLIMP >(); -p.addKeyword< ParserKeywords::GAS >(); -p.addKeyword< ParserKeywords::GASVISCT >(); -p.addKeyword< ParserKeywords::GCOMPIDX >(); -p.addKeyword< ParserKeywords::GCONINJE >(); -p.addKeyword< ParserKeywords::GCONPROD >(); -p.addKeyword< ParserKeywords::GDORIENT >(); -p.addKeyword< ParserKeywords::GECON >(); -p.addKeyword< ParserKeywords::GEFAC >(); -p.addKeyword< ParserKeywords::GRAVITY >(); -}}} diff --git a/ThirdParty/custom-opm-parser/generated-source/ParserKeywords1.cpp b/ThirdParty/custom-opm-parser/generated-source/ParserKeywords1.cpp deleted file mode 100644 index f7a6f2af1c..0000000000 --- a/ThirdParty/custom-opm-parser/generated-source/ParserKeywords1.cpp +++ /dev/null @@ -1,104 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - - -namespace Opm { -namespace ParserKeywords { - - -void addDefaultKeywords1(Parser& p); -void addDefaultKeywords1(Parser& p) { -p.addKeyword< ParserKeywords::GRID >(); -p.addKeyword< ParserKeywords::GRIDFILE >(); -p.addKeyword< ParserKeywords::GRIDOPTS >(); -p.addKeyword< ParserKeywords::GRIDUNIT >(); -p.addKeyword< ParserKeywords::GROUP_PROBE >(); -p.addKeyword< ParserKeywords::GRUPNET >(); -p.addKeyword< ParserKeywords::GRUPTREE >(); -p.addKeyword< ParserKeywords::IMBNUM >(); -p.addKeyword< ParserKeywords::IMKRVD >(); -p.addKeyword< ParserKeywords::IMPES >(); -p.addKeyword< ParserKeywords::IMPTVD >(); -p.addKeyword< ParserKeywords::INCLUDE >(); -p.addKeyword< ParserKeywords::INIT >(); -p.addKeyword< ParserKeywords::IPCG >(); -p.addKeyword< ParserKeywords::IPCW >(); -p.addKeyword< ParserKeywords::ISGCR >(); -p.addKeyword< ParserKeywords::ISGL >(); -p.addKeyword< ParserKeywords::ISGU >(); -p.addKeyword< ParserKeywords::ISOGCR >(); -p.addKeyword< ParserKeywords::ISOWCR >(); -p.addKeyword< ParserKeywords::ISWCR >(); -p.addKeyword< ParserKeywords::ISWL >(); -p.addKeyword< ParserKeywords::ISWU >(); -p.addKeyword< ParserKeywords::JFUNC >(); -p.addKeyword< ParserKeywords::MAPAXES >(); -p.addKeyword< ParserKeywords::MAPUNITS >(); -p.addKeyword< ParserKeywords::MAXVALUE >(); -p.addKeyword< ParserKeywords::MEMORY >(); -p.addKeyword< ParserKeywords::MESSAGES >(); -p.addKeyword< ParserKeywords::METRIC >(); -p.addKeyword< ParserKeywords::MINPV >(); -p.addKeyword< ParserKeywords::MINPVFIL >(); -p.addKeyword< ParserKeywords::MINVALUE >(); -p.addKeyword< ParserKeywords::MISC >(); -p.addKeyword< ParserKeywords::MISCIBLE >(); -p.addKeyword< ParserKeywords::MISCNUM >(); -p.addKeyword< ParserKeywords::MONITOR >(); -p.addKeyword< ParserKeywords::MSFN >(); -p.addKeyword< ParserKeywords::MSGFILE >(); -p.addKeyword< ParserKeywords::MULTFLT >(); -p.addKeyword< ParserKeywords::MULTIPLY >(); -p.addKeyword< ParserKeywords::MULTIREG >(); -p.addKeyword< ParserKeywords::MULTNUM >(); -p.addKeyword< ParserKeywords::MULTPV >(); -p.addKeyword< ParserKeywords::MULTREGP >(); -p.addKeyword< ParserKeywords::MULTREGT >(); -p.addKeyword< ParserKeywords::MULT_XYZ >(); -p.addKeyword< ParserKeywords::MW >(); -p.addKeyword< ParserKeywords::MWS >(); -p.addKeyword< ParserKeywords::NETBALAN >(); -p.addKeyword< ParserKeywords::NEWTRAN >(); -p.addKeyword< ParserKeywords::NEXTSTEP >(); -p.addKeyword< ParserKeywords::NNC >(); -p.addKeyword< ParserKeywords::NOCASC >(); -p.addKeyword< ParserKeywords::NOECHO >(); -p.addKeyword< ParserKeywords::NOGGF >(); -p.addKeyword< ParserKeywords::NOGRAV >(); -p.addKeyword< ParserKeywords::NOINSPEC >(); -p.addKeyword< ParserKeywords::NOMONITO >(); -p.addKeyword< ParserKeywords::NONNC >(); -p.addKeyword< ParserKeywords::NORSSPEC >(); -p.addKeyword< ParserKeywords::NOSIM >(); -p.addKeyword< ParserKeywords::NSTACK >(); -p.addKeyword< ParserKeywords::NTG >(); -p.addKeyword< ParserKeywords::NUMRES >(); -p.addKeyword< ParserKeywords::NUPCOL >(); -p.addKeyword< ParserKeywords::OCOMPIDX >(); -p.addKeyword< ParserKeywords::OIL >(); -p.addKeyword< ParserKeywords::OILCOMPR >(); -p.addKeyword< ParserKeywords::OILMW >(); -p.addKeyword< ParserKeywords::OILVISCT >(); -p.addKeyword< ParserKeywords::OILVTIM >(); -p.addKeyword< ParserKeywords::OLDTRAN >(); -p.addKeyword< ParserKeywords::OPERATE >(); -p.addKeyword< ParserKeywords::OPTIONS >(); -p.addKeyword< ParserKeywords::PARALLEL >(); -p.addKeyword< ParserKeywords::PATHS >(); -p.addKeyword< ParserKeywords::PBVD >(); -p.addKeyword< ParserKeywords::PCG >(); -p.addKeyword< ParserKeywords::PERFORMANCE_PROBE >(); -p.addKeyword< ParserKeywords::PERMX >(); -p.addKeyword< ParserKeywords::PERMXY >(); -p.addKeyword< ParserKeywords::PERMY >(); -p.addKeyword< ParserKeywords::PERMYZ >(); -p.addKeyword< ParserKeywords::PERMZ >(); -p.addKeyword< ParserKeywords::PERMZX >(); -p.addKeyword< ParserKeywords::PIMTDIMS >(); -}}} diff --git a/ThirdParty/custom-opm-parser/generated-source/ParserKeywords2.cpp b/ThirdParty/custom-opm-parser/generated-source/ParserKeywords2.cpp deleted file mode 100644 index 3d93f81f4e..0000000000 --- a/ThirdParty/custom-opm-parser/generated-source/ParserKeywords2.cpp +++ /dev/null @@ -1,104 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - - -namespace Opm { -namespace ParserKeywords { - - -void addDefaultKeywords2(Parser& p); -void addDefaultKeywords2(Parser& p) { -p.addKeyword< ParserKeywords::PIMULTAB >(); -p.addKeyword< ParserKeywords::PINCH >(); -p.addKeyword< ParserKeywords::PLMIXPAR >(); -p.addKeyword< ParserKeywords::PLYADS >(); -p.addKeyword< ParserKeywords::PLYADSS >(); -p.addKeyword< ParserKeywords::PLYDHFLF >(); -p.addKeyword< ParserKeywords::PLYMAX >(); -p.addKeyword< ParserKeywords::PLYROCK >(); -p.addKeyword< ParserKeywords::PLYSHEAR >(); -p.addKeyword< ParserKeywords::PLYSHLOG >(); -p.addKeyword< ParserKeywords::PLYVISC >(); -p.addKeyword< ParserKeywords::PMISC >(); -p.addKeyword< ParserKeywords::POLYMER >(); -p.addKeyword< ParserKeywords::PORO >(); -p.addKeyword< ParserKeywords::PORV >(); -p.addKeyword< ParserKeywords::PREF >(); -p.addKeyword< ParserKeywords::PREFS >(); -p.addKeyword< ParserKeywords::PRESSURE >(); -p.addKeyword< ParserKeywords::PROPS >(); -p.addKeyword< ParserKeywords::PVCDO >(); -p.addKeyword< ParserKeywords::PVDG >(); -p.addKeyword< ParserKeywords::PVDO >(); -p.addKeyword< ParserKeywords::PVDS >(); -p.addKeyword< ParserKeywords::PVTG >(); -p.addKeyword< ParserKeywords::PVTNUM >(); -p.addKeyword< ParserKeywords::PVTO >(); -p.addKeyword< ParserKeywords::PVTW >(); -p.addKeyword< ParserKeywords::RADFIN4 >(); -p.addKeyword< ParserKeywords::REGDIMS >(); -p.addKeyword< ParserKeywords::REGIONS >(); -p.addKeyword< ParserKeywords::REGION_PROBE >(); -p.addKeyword< ParserKeywords::RESTART >(); -p.addKeyword< ParserKeywords::RKTRMDIR >(); -p.addKeyword< ParserKeywords::ROCK >(); -p.addKeyword< ParserKeywords::ROCKCOMP >(); -p.addKeyword< ParserKeywords::ROCKOPTS >(); -p.addKeyword< ParserKeywords::ROCKTAB >(); -p.addKeyword< ParserKeywords::RPTGRID >(); -p.addKeyword< ParserKeywords::RPTONLY >(); -p.addKeyword< ParserKeywords::RPTONLYO >(); -p.addKeyword< ParserKeywords::RPTPROPS >(); -p.addKeyword< ParserKeywords::RPTREGS >(); -p.addKeyword< ParserKeywords::RPTRST >(); -p.addKeyword< ParserKeywords::RPTRUNSP >(); -p.addKeyword< ParserKeywords::RPTSCHED >(); -p.addKeyword< ParserKeywords::RPTSOL >(); -p.addKeyword< ParserKeywords::RS >(); -p.addKeyword< ParserKeywords::RSVD >(); -p.addKeyword< ParserKeywords::RTEMPVD >(); -p.addKeyword< ParserKeywords::RUNSPEC >(); -p.addKeyword< ParserKeywords::RUNSUM >(); -p.addKeyword< ParserKeywords::RV >(); -p.addKeyword< ParserKeywords::RVVD >(); -p.addKeyword< ParserKeywords::SATNUM >(); -p.addKeyword< ParserKeywords::SATOPTS >(); -p.addKeyword< ParserKeywords::SAVE >(); -p.addKeyword< ParserKeywords::SCALECRS >(); -p.addKeyword< ParserKeywords::SCHEDULE >(); -p.addKeyword< ParserKeywords::SDENSITY >(); -p.addKeyword< ParserKeywords::SEPARATE >(); -p.addKeyword< ParserKeywords::SGAS >(); -p.addKeyword< ParserKeywords::SGCR >(); -p.addKeyword< ParserKeywords::SGCWMIS >(); -p.addKeyword< ParserKeywords::SGFN >(); -p.addKeyword< ParserKeywords::SGL >(); -p.addKeyword< ParserKeywords::SGOF >(); -p.addKeyword< ParserKeywords::SGU >(); -p.addKeyword< ParserKeywords::SGWFN >(); -p.addKeyword< ParserKeywords::SHRATE >(); -p.addKeyword< ParserKeywords::SKIP >(); -p.addKeyword< ParserKeywords::SKIP100 >(); -p.addKeyword< ParserKeywords::SKIP300 >(); -p.addKeyword< ParserKeywords::SKIPREST >(); -p.addKeyword< ParserKeywords::SLGOF >(); -p.addKeyword< ParserKeywords::SMRYDIMS >(); -p.addKeyword< ParserKeywords::SOF2 >(); -p.addKeyword< ParserKeywords::SOF3 >(); -p.addKeyword< ParserKeywords::SOGCR >(); -p.addKeyword< ParserKeywords::SOIL >(); -p.addKeyword< ParserKeywords::SOLUTION >(); -p.addKeyword< ParserKeywords::SOLVENT >(); -p.addKeyword< ParserKeywords::SORWMIS >(); -p.addKeyword< ParserKeywords::SOWCR >(); -p.addKeyword< ParserKeywords::SPECGRID >(); -p.addKeyword< ParserKeywords::SPECHEAT >(); -p.addKeyword< ParserKeywords::SPECROCK >(); -p.addKeyword< ParserKeywords::SSFN >(); -}}} diff --git a/ThirdParty/custom-opm-parser/generated-source/ParserKeywords3.cpp b/ThirdParty/custom-opm-parser/generated-source/ParserKeywords3.cpp deleted file mode 100644 index a0509a4a45..0000000000 --- a/ThirdParty/custom-opm-parser/generated-source/ParserKeywords3.cpp +++ /dev/null @@ -1,101 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - - -namespace Opm { -namespace ParserKeywords { - - -void addDefaultKeywords3(Parser& p); -void addDefaultKeywords3(Parser& p) { -p.addKeyword< ParserKeywords::SSOL >(); -p.addKeyword< ParserKeywords::START >(); -p.addKeyword< ParserKeywords::STCOND >(); -p.addKeyword< ParserKeywords::STONE1 >(); -p.addKeyword< ParserKeywords::STONE1EX >(); -p.addKeyword< ParserKeywords::SUMMARY >(); -p.addKeyword< ParserKeywords::SUMTHIN >(); -p.addKeyword< ParserKeywords::SWAT >(); -p.addKeyword< ParserKeywords::SWATINIT >(); -p.addKeyword< ParserKeywords::SWCR >(); -p.addKeyword< ParserKeywords::SWFN >(); -p.addKeyword< ParserKeywords::SWL >(); -p.addKeyword< ParserKeywords::SWOF >(); -p.addKeyword< ParserKeywords::SWU >(); -p.addKeyword< ParserKeywords::TABDIMS >(); -p.addKeyword< ParserKeywords::TEMP >(); -p.addKeyword< ParserKeywords::TEMPI >(); -p.addKeyword< ParserKeywords::TEMPVD >(); -p.addKeyword< ParserKeywords::THCONR >(); -p.addKeyword< ParserKeywords::THERMAL >(); -p.addKeyword< ParserKeywords::THERMEX1 >(); -p.addKeyword< ParserKeywords::THPRES >(); -p.addKeyword< ParserKeywords::TITLE >(); -p.addKeyword< ParserKeywords::TLMIXPAR >(); -p.addKeyword< ParserKeywords::TLPMIXPA >(); -p.addKeyword< ParserKeywords::TNUM >(); -p.addKeyword< ParserKeywords::TOPS >(); -p.addKeyword< ParserKeywords::TRACER >(); -p.addKeyword< ParserKeywords::TRACERS >(); -p.addKeyword< ParserKeywords::TRANX >(); -p.addKeyword< ParserKeywords::TRANY >(); -p.addKeyword< ParserKeywords::TRANZ >(); -p.addKeyword< ParserKeywords::TREF >(); -p.addKeyword< ParserKeywords::TREFS >(); -p.addKeyword< ParserKeywords::TSTEP >(); -p.addKeyword< ParserKeywords::TUNING >(); -p.addKeyword< ParserKeywords::TVDP >(); -p.addKeyword< ParserKeywords::UDADIMS >(); -p.addKeyword< ParserKeywords::UDQDIMS >(); -p.addKeyword< ParserKeywords::UNIFIN >(); -p.addKeyword< ParserKeywords::UNIFOUT >(); -p.addKeyword< ParserKeywords::VAPOIL >(); -p.addKeyword< ParserKeywords::VAPPARS >(); -p.addKeyword< ParserKeywords::VFPIDIMS >(); -p.addKeyword< ParserKeywords::VFPINJ >(); -p.addKeyword< ParserKeywords::VFPPDIMS >(); -p.addKeyword< ParserKeywords::VFPPROD >(); -p.addKeyword< ParserKeywords::VISCREF >(); -p.addKeyword< ParserKeywords::WATDENT >(); -p.addKeyword< ParserKeywords::WATER >(); -p.addKeyword< ParserKeywords::WATVISCT >(); -p.addKeyword< ParserKeywords::WCONHIST >(); -p.addKeyword< ParserKeywords::WCONINJ >(); -p.addKeyword< ParserKeywords::WCONINJE >(); -p.addKeyword< ParserKeywords::WCONINJH >(); -p.addKeyword< ParserKeywords::WCONPROD >(); -p.addKeyword< ParserKeywords::WDRILTIM >(); -p.addKeyword< ParserKeywords::WECON >(); -p.addKeyword< ParserKeywords::WELLDIMS >(); -p.addKeyword< ParserKeywords::WELL_PROBE >(); -p.addKeyword< ParserKeywords::WELOPEN >(); -p.addKeyword< ParserKeywords::WELSEGS >(); -p.addKeyword< ParserKeywords::WELSPECS >(); -p.addKeyword< ParserKeywords::WELTARG >(); -p.addKeyword< ParserKeywords::WGRUPCON >(); -p.addKeyword< ParserKeywords::WHISTCTL >(); -p.addKeyword< ParserKeywords::WLIFT >(); -p.addKeyword< ParserKeywords::WPAVE >(); -p.addKeyword< ParserKeywords::WPIMULT >(); -p.addKeyword< ParserKeywords::WPITAB >(); -p.addKeyword< ParserKeywords::WPOLYMER >(); -p.addKeyword< ParserKeywords::WRFT >(); -p.addKeyword< ParserKeywords::WRFTPLT >(); -p.addKeyword< ParserKeywords::WSEGDIMS >(); -p.addKeyword< ParserKeywords::WSOLVENT >(); -p.addKeyword< ParserKeywords::WTEMP >(); -p.addKeyword< ParserKeywords::WTEST >(); -p.addKeyword< ParserKeywords::WTRACER >(); -p.addKeyword< ParserKeywords::ZCORN >(); -p.addKeyword< ParserKeywords::ZFACT1 >(); -p.addKeyword< ParserKeywords::ZFACT1S >(); -p.addKeyword< ParserKeywords::ZFACTOR >(); -p.addKeyword< ParserKeywords::ZFACTORS >(); -p.addKeyword< ParserKeywords::ZIPPY2 >(); -}}} diff --git a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords.hpp b/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords.hpp deleted file mode 100644 index eb2b02aa5d..0000000000 --- a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords.hpp +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef PARSER_KEYWORDS__HPP -#define PARSER_KEYWORDS__HPP -#include -namespace Opm { -namespace ParserKeywords { - -}} -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#endif diff --git a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/A.hpp b/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/A.hpp deleted file mode 100644 index 5fc85fbdec..0000000000 --- a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/A.hpp +++ /dev/null @@ -1,487 +0,0 @@ -#ifndef PARSER_KEYWORDS_A_HPP -#define PARSER_KEYWORDS_A_HPP -#include -namespace Opm { -namespace ParserKeywords { - - class ACTDIMS : public ParserKeyword { - public: - ACTDIMS(); - static const std::string keywordName; - - class MAX_ACTION { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_ACTION_LINES { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_ACTION_LINE_CHARACTERS { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_ACTION_COND { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - - class ACTNUM : public ParserKeyword { - public: - ACTNUM(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class ADD : public ParserKeyword { - public: - ADD(); - static const std::string keywordName; - - class field { - public: - static const std::string itemName; - }; - - class shift { - public: - static const std::string itemName; - }; - - class I1 { - public: - static const std::string itemName; - }; - - class I2 { - public: - static const std::string itemName; - }; - - class J1 { - public: - static const std::string itemName; - }; - - class J2 { - public: - static const std::string itemName; - }; - - class K1 { - public: - static const std::string itemName; - }; - - class K2 { - public: - static const std::string itemName; - }; - }; - - - - class ADDREG : public ParserKeyword { - public: - ADDREG(); - static const std::string keywordName; - - class ARRAY { - public: - static const std::string itemName; - }; - - class SHIFT { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class REGION_NUMBER { - public: - static const std::string itemName; - }; - - class REGION_NAME { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class ADSALNOD : public ParserKeyword { - public: - ADSALNOD(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class ALL : public ParserKeyword { - public: - ALL(); - static const std::string keywordName; - }; - - - - class API : public ParserKeyword { - public: - API(); - static const std::string keywordName; - }; - - - - class AQUANCON : public ParserKeyword { - public: - AQUANCON(); - static const std::string keywordName; - - class AQUIFER_ID { - public: - static const std::string itemName; - }; - - class I1 { - public: - static const std::string itemName; - }; - - class I2 { - public: - static const std::string itemName; - }; - - class J1 { - public: - static const std::string itemName; - }; - - class J2 { - public: - static const std::string itemName; - }; - - class K1 { - public: - static const std::string itemName; - }; - - class K2 { - public: - static const std::string itemName; - }; - - class FACE { - public: - static const std::string itemName; - }; - - class INFLUX_COEFF { - public: - static const std::string itemName; - }; - - class INFLUX_MULT { - public: - static const std::string itemName; - }; - - class CONNECT_ADJOINING_ACTIVE_CELL { - public: - static const std::string itemName; - }; - }; - - - - class AQUCON : public ParserKeyword { - public: - AQUCON(); - static const std::string keywordName; - - class ID { - public: - static const std::string itemName; - }; - - class I1 { - public: - static const std::string itemName; - }; - - class I2 { - public: - static const std::string itemName; - }; - - class J1 { - public: - static const std::string itemName; - }; - - class J2 { - public: - static const std::string itemName; - }; - - class K1 { - public: - static const std::string itemName; - }; - - class K2 { - public: - static const std::string itemName; - }; - - class CONNECT_FACE { - public: - static const std::string itemName; - }; - - class TRANS_MULT { - public: - static const std::string itemName; - }; - - class TRANS_OPTION { - public: - static const std::string itemName; - }; - - class ALLOW_INTERNAL_CELLS { - public: - static const std::string itemName; - }; - - class VEFRAC { - public: - static const std::string itemName; - }; - - class VEFRACP { - public: - static const std::string itemName; - }; - }; - - - - class AQUDIMS : public ParserKeyword { - public: - AQUDIMS(); - static const std::string keywordName; - - class MXNAQN { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MXNAQC { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NIFTBL { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NRIFTB { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NANAQU { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NCAMAX { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MXNALI { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MXAAQL { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - - class AQUFETP : public ParserKeyword { - public: - AQUFETP(); - static const std::string keywordName; - - class ID { - public: - static const std::string itemName; - }; - - class DATUM_DEPTH { - public: - static const std::string itemName; - }; - - class P0 { - public: - static const std::string itemName; - }; - - class V0 { - public: - static const std::string itemName; - }; - - class COMPRESSIBILITY { - public: - static const std::string itemName; - }; - - class PI { - public: - static const std::string itemName; - }; - - class WATER_TABLE { - public: - static const std::string itemName; - }; - - class SALINITY { - public: - static const std::string itemName; - }; - - class TEMP { - public: - static const std::string itemName; - }; - }; - - - - class AQUIFER_PROBE_ANALYTIC : public ParserKeyword { - public: - AQUIFER_PROBE_ANALYTIC(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class AQUNUM : public ParserKeyword { - public: - AQUNUM(); - static const std::string keywordName; - - class AQUIFER_ID { - public: - static const std::string itemName; - }; - - class I { - public: - static const std::string itemName; - }; - - class J { - public: - static const std::string itemName; - }; - - class K { - public: - static const std::string itemName; - }; - - class CROSS_SECTION { - public: - static const std::string itemName; - }; - - class LENGTH { - public: - static const std::string itemName; - }; - - class PORO { - public: - static const std::string itemName; - }; - - class PERM { - public: - static const std::string itemName; - }; - - class DEPTH { - public: - static const std::string itemName; - }; - - class INITIAL_PRESSURE { - public: - static const std::string itemName; - }; - - class PVT_TABLE_NUM { - public: - static const std::string itemName; - }; - - class SAT_TABLE_NUM { - public: - static const std::string itemName; - }; - }; - - - -} -} -#endif diff --git a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/B.hpp b/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/B.hpp deleted file mode 100644 index 486c6e7e21..0000000000 --- a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/B.hpp +++ /dev/null @@ -1,93 +0,0 @@ -#ifndef PARSER_KEYWORDS_B_HPP -#define PARSER_KEYWORDS_B_HPP -#include -namespace Opm { -namespace ParserKeywords { - - class BLOCK_PROBE : public ParserKeyword { - public: - BLOCK_PROBE(); - static const std::string keywordName; - - class I { - public: - static const std::string itemName; - }; - - class J { - public: - static const std::string itemName; - }; - - class K { - public: - static const std::string itemName; - }; - }; - - - - class BLOCK_PROBE300 : public ParserKeyword { - public: - BLOCK_PROBE300(); - static const std::string keywordName; - - class I { - public: - static const std::string itemName; - }; - - class J { - public: - static const std::string itemName; - }; - - class K { - public: - static const std::string itemName; - }; - }; - - - - class BOX : public ParserKeyword { - public: - BOX(); - static const std::string keywordName; - - class I1 { - public: - static const std::string itemName; - }; - - class I2 { - public: - static const std::string itemName; - }; - - class J1 { - public: - static const std::string itemName; - }; - - class J2 { - public: - static const std::string itemName; - }; - - class K1 { - public: - static const std::string itemName; - }; - - class K2 { - public: - static const std::string itemName; - }; - }; - - - -} -} -#endif diff --git a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/C.hpp b/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/C.hpp deleted file mode 100644 index 887537c69b..0000000000 --- a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/C.hpp +++ /dev/null @@ -1,405 +0,0 @@ -#ifndef PARSER_KEYWORDS_C_HPP -#define PARSER_KEYWORDS_C_HPP -#include -namespace Opm { -namespace ParserKeywords { - - class COMPDAT : public ParserKeyword { - public: - COMPDAT(); - static const std::string keywordName; - - class WELL { - public: - static const std::string itemName; - }; - - class I { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class J { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class K1 { - public: - static const std::string itemName; - }; - - class K2 { - public: - static const std::string itemName; - }; - - class STATE { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class SAT_TABLE { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class CONNECTION_TRANSMISSIBILITY_FACTOR { - public: - static const std::string itemName; - }; - - class DIAMETER { - public: - static const std::string itemName; - }; - - class Kh { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class SKIN { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class D_FACTOR { - public: - static const std::string itemName; - }; - - class DIR { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class PR { - public: - static const std::string itemName; - }; - }; - - - - class COMPLUMP : public ParserKeyword { - public: - COMPLUMP(); - static const std::string keywordName; - - class WELL { - public: - static const std::string itemName; - }; - - class I { - public: - static const std::string itemName; - }; - - class J { - public: - static const std::string itemName; - }; - - class K1 { - public: - static const std::string itemName; - }; - - class K2 { - public: - static const std::string itemName; - }; - - class N { - public: - static const std::string itemName; - }; - }; - - - - class COMPORD : public ParserKeyword { - public: - COMPORD(); - static const std::string keywordName; - - class WELL { - public: - static const std::string itemName; - }; - - class ORDER_TYPE { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class COMPS : public ParserKeyword { - public: - COMPS(); - static const std::string keywordName; - - class NUM_COMPS { - public: - static const std::string itemName; - }; - }; - - - - class COMPSEGS : public ParserKeyword { - public: - COMPSEGS(); - static const std::string keywordName; - - class WELL { - public: - static const std::string itemName; - }; - - class I { - public: - static const std::string itemName; - }; - - class J { - public: - static const std::string itemName; - }; - - class K { - public: - static const std::string itemName; - }; - - class BRANCH { - public: - static const std::string itemName; - }; - - class DISTANCE_START { - public: - static const std::string itemName; - }; - - class DISTANCE_END { - public: - static const std::string itemName; - }; - - class DIRECTION { - public: - static const std::string itemName; - }; - - class END_IJK { - public: - static const std::string itemName; - }; - - class CENTER_DEPTH { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class THERMAL_LENGTH { - public: - static const std::string itemName; - }; - - class SEGMENT_NUMBER { - public: - static const std::string itemName; - }; - }; - - - - class CONNECTION_PROBE : public ParserKeyword { - public: - CONNECTION_PROBE(); - static const std::string keywordName; - - class WELL { - public: - static const std::string itemName; - }; - - class I { - public: - static const std::string itemName; - }; - - class J { - public: - static const std::string itemName; - }; - - class K { - public: - static const std::string itemName; - }; - }; - - - - class COORD : public ParserKeyword { - public: - COORD(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class COPY : public ParserKeyword { - public: - COPY(); - static const std::string keywordName; - - class src { - public: - static const std::string itemName; - }; - - class target { - public: - static const std::string itemName; - }; - - class I1 { - public: - static const std::string itemName; - }; - - class I2 { - public: - static const std::string itemName; - }; - - class J1 { - public: - static const std::string itemName; - }; - - class J2 { - public: - static const std::string itemName; - }; - - class K1 { - public: - static const std::string itemName; - }; - - class K2 { - public: - static const std::string itemName; - }; - }; - - - - class COPYREG : public ParserKeyword { - public: - COPYREG(); - static const std::string keywordName; - - class ARRAY { - public: - static const std::string itemName; - }; - - class TARGET_ARRAY { - public: - static const std::string itemName; - }; - - class REGION_NUMBER { - public: - static const std::string itemName; - }; - - class REGION_NAME { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class CPR : public ParserKeyword { - public: - CPR(); - static const std::string keywordName; - - class WELL { - public: - static const std::string itemName; - }; - - class I { - public: - static const std::string itemName; - }; - - class J { - public: - static const std::string itemName; - }; - - class K { - public: - static const std::string itemName; - }; - }; - - - - class CREF : public ParserKeyword { - public: - CREF(); - static const std::string keywordName; - - class COMPRESSIBILITY { - public: - static const std::string itemName; - }; - }; - - - - class CREFS : public ParserKeyword { - public: - CREFS(); - static const std::string keywordName; - - class COMPRESSIBILITY { - public: - static const std::string itemName; - }; - }; - - - -} -} -#endif diff --git a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/D.hpp b/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/D.hpp deleted file mode 100644 index 934314eed1..0000000000 --- a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/D.hpp +++ /dev/null @@ -1,286 +0,0 @@ -#ifndef PARSER_KEYWORDS_D_HPP -#define PARSER_KEYWORDS_D_HPP -#include -namespace Opm { -namespace ParserKeywords { - - class DATE : public ParserKeyword { - public: - DATE(); - static const std::string keywordName; - }; - - - - class DATES : public ParserKeyword { - public: - DATES(); - static const std::string keywordName; - - class DAY { - public: - static const std::string itemName; - }; - - class MONTH { - public: - static const std::string itemName; - }; - - class YEAR { - public: - static const std::string itemName; - }; - - class TIME { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class DATUM : public ParserKeyword { - public: - DATUM(); - static const std::string keywordName; - - class DEPTH { - public: - static const std::string itemName; - }; - }; - - - - class DENSITY : public ParserKeyword { - public: - DENSITY(); - static const std::string keywordName; - - class OIL { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class WATER { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class GAS { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class DEPTH : public ParserKeyword { - public: - DEPTH(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class DEPTHZ : public ParserKeyword { - public: - DEPTHZ(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class DIMENS : public ParserKeyword { - public: - DIMENS(); - static const std::string keywordName; - - class NX { - public: - static const std::string itemName; - }; - - class NY { - public: - static const std::string itemName; - }; - - class NZ { - public: - static const std::string itemName; - }; - }; - - - - class DISGAS : public ParserKeyword { - public: - DISGAS(); - static const std::string keywordName; - }; - - - - class DREF : public ParserKeyword { - public: - DREF(); - static const std::string keywordName; - - class DENSITY { - public: - static const std::string itemName; - }; - }; - - - - class DREFS : public ParserKeyword { - public: - DREFS(); - static const std::string keywordName; - - class DENSITY { - public: - static const std::string itemName; - }; - }; - - - - class DRSDT : public ParserKeyword { - public: - DRSDT(); - static const std::string keywordName; - - class DRSDT_MAX { - public: - static const std::string itemName; - }; - - class Option { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class DRVDT : public ParserKeyword { - public: - DRVDT(); - static const std::string keywordName; - - class DRVDT_MAX { - public: - static const std::string itemName; - }; - }; - - - - class DUMPFLUX : public ParserKeyword { - public: - DUMPFLUX(); - static const std::string keywordName; - }; - - - - class DX : public ParserKeyword { - public: - DX(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class DXV : public ParserKeyword { - public: - DXV(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class DY : public ParserKeyword { - public: - DY(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class DYV : public ParserKeyword { - public: - DYV(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class DZ : public ParserKeyword { - public: - DZ(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class DZV : public ParserKeyword { - public: - DZV(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - -} -} -#endif diff --git a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/E.hpp b/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/E.hpp deleted file mode 100644 index cdf75b7880..0000000000 --- a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/E.hpp +++ /dev/null @@ -1,547 +0,0 @@ -#ifndef PARSER_KEYWORDS_E_HPP -#define PARSER_KEYWORDS_E_HPP -#include -namespace Opm { -namespace ParserKeywords { - - class ECHO : public ParserKeyword { - public: - ECHO(); - static const std::string keywordName; - }; - - - - class EDIT : public ParserKeyword { - public: - EDIT(); - static const std::string keywordName; - }; - - - - class EDITNNC : public ParserKeyword { - public: - EDITNNC(); - static const std::string keywordName; - - class I1 { - public: - static const std::string itemName; - }; - - class J1 { - public: - static const std::string itemName; - }; - - class K1 { - public: - static const std::string itemName; - }; - - class I2 { - public: - static const std::string itemName; - }; - - class J2 { - public: - static const std::string itemName; - }; - - class K2 { - public: - static const std::string itemName; - }; - - class TRAN_MULT { - public: - static const std::string itemName; - }; - - class SAT_TABLE12 { - public: - static const std::string itemName; - }; - - class SAT_TABLE21 { - public: - static const std::string itemName; - }; - - class PRESS_TABLE12 { - public: - static const std::string itemName; - }; - - class PRESS_TABLE21 { - public: - static const std::string itemName; - }; - - class FACE_FLOW12 { - public: - static const std::string itemName; - }; - - class FACE_FLOW21 { - public: - static const std::string itemName; - }; - - class DIFFM { - public: - static const std::string itemName; - }; - }; - - - - class EHYSTR : public ParserKeyword { - public: - EHYSTR(); - static const std::string keywordName; - - class curvature_caplillary_pressure_hyst { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class relative_perm_hyst { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class curvature_param_killough_wetting { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class mod_param_trapped { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class limiting_hyst_flag { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class shape_cap_press_flag { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class init_fluid_mob_flag { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class wetting_phase_flag { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class baker_flag_oil { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class baker_flag_gas { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class baker_flag_water { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class threshold_saturation { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class END : public ParserKeyword { - public: - END(); - static const std::string keywordName; - }; - - - - class ENDBOX : public ParserKeyword { - public: - ENDBOX(); - static const std::string keywordName; - }; - - - - class ENDINC : public ParserKeyword { - public: - ENDINC(); - static const std::string keywordName; - }; - - - - class ENDNUM : public ParserKeyword { - public: - ENDNUM(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class ENDPOINT_SPECIFIERS : public ParserKeyword { - public: - ENDPOINT_SPECIFIERS(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class ENDSCALE : public ParserKeyword { - public: - ENDSCALE(); - static const std::string keywordName; - - class DIRECT { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class IRREVERS { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class NUM_TABLES { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NUM_NODES { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class COMB_MODE { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - - class ENDSKIP : public ParserKeyword { - public: - ENDSKIP(); - static const std::string keywordName; - }; - - - - class ENKRVD : public ParserKeyword { - public: - ENKRVD(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class ENPTVD : public ParserKeyword { - public: - ENPTVD(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class EQLDIMS : public ParserKeyword { - public: - EQLDIMS(); - static const std::string keywordName; - - class NTEQUL { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class DEPTH_NODES_P { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class DEPTH_NODES_TAB { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NTTRVD { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NSTRVD { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - - class EQLNUM : public ParserKeyword { - public: - EQLNUM(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class EQLOPTS : public ParserKeyword { - public: - EQLOPTS(); - static const std::string keywordName; - - class OPTION1 { - public: - static const std::string itemName; - }; - - class OPTION2 { - public: - static const std::string itemName; - }; - - class OPTION3 { - public: - static const std::string itemName; - }; - - class OPTION4 { - public: - static const std::string itemName; - }; - }; - - - - class EQUALREG : public ParserKeyword { - public: - EQUALREG(); - static const std::string keywordName; - - class ARRAY { - public: - static const std::string itemName; - }; - - class VALUE { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class REGION_NUMBER { - public: - static const std::string itemName; - }; - - class REGION_NAME { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class EQUALS : public ParserKeyword { - public: - EQUALS(); - static const std::string keywordName; - - class field { - public: - static const std::string itemName; - }; - - class value { - public: - static const std::string itemName; - }; - - class I1 { - public: - static const std::string itemName; - }; - - class I2 { - public: - static const std::string itemName; - }; - - class J1 { - public: - static const std::string itemName; - }; - - class J2 { - public: - static const std::string itemName; - }; - - class K1 { - public: - static const std::string itemName; - }; - - class K2 { - public: - static const std::string itemName; - }; - }; - - - - class EQUIL : public ParserKeyword { - public: - EQUIL(); - static const std::string keywordName; - - class DATUM_DEPTH { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class DATUM_PRESSURE { - public: - static const std::string itemName; - }; - - class OWC { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class PC_OWC { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class GOC { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class PC_GOC { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class BLACK_OIL_INIT { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class BLACK_OIL_INIT_WG { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class OIP_INIT { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - - class EXCEL : public ParserKeyword { - public: - EXCEL(); - static const std::string keywordName; - }; - - - - class EXTRAPMS : public ParserKeyword { - public: - EXTRAPMS(); - static const std::string keywordName; - - class LEVEL { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - -} -} -#endif diff --git a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/F.hpp b/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/F.hpp deleted file mode 100644 index c8915ea9d3..0000000000 --- a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/F.hpp +++ /dev/null @@ -1,145 +0,0 @@ -#ifndef PARSER_KEYWORDS_F_HPP -#define PARSER_KEYWORDS_F_HPP -#include -namespace Opm { -namespace ParserKeywords { - - class FAULTDIM : public ParserKeyword { - public: - FAULTDIM(); - static const std::string keywordName; - - class MFSEGS { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - - class FAULTS : public ParserKeyword { - public: - FAULTS(); - static const std::string keywordName; - - class NAME { - public: - static const std::string itemName; - }; - - class IX1 { - public: - static const std::string itemName; - }; - - class IX2 { - public: - static const std::string itemName; - }; - - class IY1 { - public: - static const std::string itemName; - }; - - class IY2 { - public: - static const std::string itemName; - }; - - class IZ1 { - public: - static const std::string itemName; - }; - - class IZ2 { - public: - static const std::string itemName; - }; - - class FACE { - public: - static const std::string itemName; - }; - }; - - - - class FIELD : public ParserKeyword { - public: - FIELD(); - static const std::string keywordName; - }; - - - - class FIELD_PROBE : public ParserKeyword { - public: - FIELD_PROBE(); - static const std::string keywordName; - }; - - - - class FILLEPS : public ParserKeyword { - public: - FILLEPS(); - static const std::string keywordName; - }; - - - - class FIPNUM : public ParserKeyword { - public: - FIPNUM(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class FLUXNUM : public ParserKeyword { - public: - FLUXNUM(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class FMTIN : public ParserKeyword { - public: - FMTIN(); - static const std::string keywordName; - }; - - - - class FMTOUT : public ParserKeyword { - public: - FMTOUT(); - static const std::string keywordName; - }; - - - - class FULLIMP : public ParserKeyword { - public: - FULLIMP(); - static const std::string keywordName; - }; - - - -} -} -#endif diff --git a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/G.hpp b/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/G.hpp deleted file mode 100644 index e51c7d3491..0000000000 --- a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/G.hpp +++ /dev/null @@ -1,516 +0,0 @@ -#ifndef PARSER_KEYWORDS_G_HPP -#define PARSER_KEYWORDS_G_HPP -#include -namespace Opm { -namespace ParserKeywords { - - class GAS : public ParserKeyword { - public: - GAS(); - static const std::string keywordName; - }; - - - - class GASVISCT : public ParserKeyword { - public: - GASVISCT(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class GCOMPIDX : public ParserKeyword { - public: - GCOMPIDX(); - static const std::string keywordName; - - class GAS_COMPONENT_INDEX { - public: - static const std::string itemName; - }; - }; - - - - class GCONINJE : public ParserKeyword { - public: - GCONINJE(); - static const std::string keywordName; - - class GROUP { - public: - static const std::string itemName; - }; - - class PHASE { - public: - static const std::string itemName; - }; - - class CONTROL_MODE { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class SURFACE_TARGET { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class RESV_TARGET { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class REINJ_TARGET { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class VOIDAGE_TARGET { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class FREE { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class GUIDE_FRACTION { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class GUIDE_DEF { - public: - static const std::string itemName; - }; - - class REINJECT_GROUP { - public: - static const std::string itemName; - }; - - class VOIDAGE_GROUP { - public: - static const std::string itemName; - }; - - class WETGAS_TARGET { - public: - static const std::string itemName; - }; - }; - - - - class GCONPROD : public ParserKeyword { - public: - GCONPROD(); - static const std::string keywordName; - - class GROUP { - public: - static const std::string itemName; - }; - - class CONTROL_MODE { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class OIL_TARGET { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class WATER_TARGET { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class GAS_TARGET { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class LIQUID_TARGET { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class EXCEED_PROC { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class RESPOND_TO_PARENT { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class GUIDE_RATE { - public: - static const std::string itemName; - }; - - class GUIDE_RATE_DEF { - public: - static const std::string itemName; - }; - - class WATER_EXCEED_PROCEDURE { - public: - static const std::string itemName; - }; - - class GAS_EXCEED_PROCEDURE { - public: - static const std::string itemName; - }; - - class LIQUID_EXCEED_PROCEDURE { - public: - static const std::string itemName; - }; - - class RESERVOIR_FLUID_TARGET { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class RESERVOIR_VOLUME_BALANCE { - public: - static const std::string itemName; - }; - }; - - - - class GDORIENT : public ParserKeyword { - public: - GDORIENT(); - static const std::string keywordName; - - class I { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class J { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class K { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class Z { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class HAND { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class GECON : public ParserKeyword { - public: - GECON(); - static const std::string keywordName; - - class GROUP { - public: - static const std::string itemName; - }; - - class MIN_OIL_RATE { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class MIN_GAS_RATE { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class MAX_WCT { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class MAX_GOR { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class MAX_WATER_GAS_RATIO { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class WORKOVER { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class END_RUN { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class MAX_OPEN_WELLS { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - - class GEFAC : public ParserKeyword { - public: - GEFAC(); - static const std::string keywordName; - - class GROUP { - public: - static const std::string itemName; - }; - - class EFFICIENCY_FACTOR { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class TRANSFER_EXT_NET { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class GRAVITY : public ParserKeyword { - public: - GRAVITY(); - static const std::string keywordName; - - class API_GRAVITY { - public: - static const std::string itemName; - }; - - class WATER_SP_GRAVITY { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class GAS_SP_GRAVITY { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class GRID : public ParserKeyword { - public: - GRID(); - static const std::string keywordName; - }; - - - - class GRIDFILE : public ParserKeyword { - public: - GRIDFILE(); - static const std::string keywordName; - - class GRID { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class EGRID { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - - class GRIDOPTS : public ParserKeyword { - public: - GRIDOPTS(); - static const std::string keywordName; - - class TRANMULT { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class NRMULT { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NRPINC { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - - class GRIDUNIT : public ParserKeyword { - public: - GRIDUNIT(); - static const std::string keywordName; - - class LengthUnit { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class MAP { - public: - static const std::string itemName; - }; - }; - - - - class GROUP_PROBE : public ParserKeyword { - public: - GROUP_PROBE(); - static const std::string keywordName; - - class GROUPS { - public: - static const std::string itemName; - }; - }; - - - - class GRUPNET : public ParserKeyword { - public: - GRUPNET(); - static const std::string keywordName; - - class NAME { - public: - static const std::string itemName; - }; - - class TERMINAL_PRESSURE { - public: - static const std::string itemName; - }; - - class VFP_TABLE { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ALQ { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class SUB_SEA_MANIFOLD { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class LIFT_GAS_FLOW_THROUGH { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class ALQ_SURFACE_EQV { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class GRUPTREE : public ParserKeyword { - public: - GRUPTREE(); - static const std::string keywordName; - - class CHILD_GROUP { - public: - static const std::string itemName; - }; - - class PARENT_GROUP { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - -} -} -#endif diff --git a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/I.hpp b/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/I.hpp deleted file mode 100644 index 686a1bfd47..0000000000 --- a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/I.hpp +++ /dev/null @@ -1,207 +0,0 @@ -#ifndef PARSER_KEYWORDS_I_HPP -#define PARSER_KEYWORDS_I_HPP -#include -namespace Opm { -namespace ParserKeywords { - - class IMBNUM : public ParserKeyword { - public: - IMBNUM(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class IMKRVD : public ParserKeyword { - public: - IMKRVD(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class IMPES : public ParserKeyword { - public: - IMPES(); - static const std::string keywordName; - }; - - - - class IMPTVD : public ParserKeyword { - public: - IMPTVD(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class INCLUDE : public ParserKeyword { - public: - INCLUDE(); - static const std::string keywordName; - - class IncludeFile { - public: - static const std::string itemName; - }; - }; - - - - class INIT : public ParserKeyword { - public: - INIT(); - static const std::string keywordName; - }; - - - - class IPCG : public ParserKeyword { - public: - IPCG(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class IPCW : public ParserKeyword { - public: - IPCW(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class ISGCR : public ParserKeyword { - public: - ISGCR(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class ISGL : public ParserKeyword { - public: - ISGL(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class ISGU : public ParserKeyword { - public: - ISGU(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class ISOGCR : public ParserKeyword { - public: - ISOGCR(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class ISOWCR : public ParserKeyword { - public: - ISOWCR(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class ISWCR : public ParserKeyword { - public: - ISWCR(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class ISWL : public ParserKeyword { - public: - ISWL(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class ISWU : public ParserKeyword { - public: - ISWU(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - -} -} -#endif diff --git a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/J.hpp b/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/J.hpp deleted file mode 100644 index c8072410b2..0000000000 --- a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/J.hpp +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef PARSER_KEYWORDS_J_HPP -#define PARSER_KEYWORDS_J_HPP -#include -namespace Opm { -namespace ParserKeywords { - - class JFUNC : public ParserKeyword { - public: - JFUNC(); - static const std::string keywordName; - - class FLAG { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class OW_SURFACE_TENSION { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class GO_SURFACE_TENSION { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class ALPHA_FACTOR { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class BETA_FACTOR { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class DIRECTION { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - -} -} -#endif diff --git a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/M.hpp b/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/M.hpp deleted file mode 100644 index 4dc5f6ff85..0000000000 --- a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/M.hpp +++ /dev/null @@ -1,603 +0,0 @@ -#ifndef PARSER_KEYWORDS_M_HPP -#define PARSER_KEYWORDS_M_HPP -#include -namespace Opm { -namespace ParserKeywords { - - class MAPAXES : public ParserKeyword { - public: - MAPAXES(); - static const std::string keywordName; - - class X1 { - public: - static const std::string itemName; - }; - - class Y1 { - public: - static const std::string itemName; - }; - - class X2 { - public: - static const std::string itemName; - }; - - class Y2 { - public: - static const std::string itemName; - }; - - class X3 { - public: - static const std::string itemName; - }; - - class Y3 { - public: - static const std::string itemName; - }; - }; - - - - class MAPUNITS : public ParserKeyword { - public: - MAPUNITS(); - static const std::string keywordName; - - class UNIT { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class MAXVALUE : public ParserKeyword { - public: - MAXVALUE(); - static const std::string keywordName; - - class field { - public: - static const std::string itemName; - }; - - class value { - public: - static const std::string itemName; - }; - - class I1 { - public: - static const std::string itemName; - }; - - class I2 { - public: - static const std::string itemName; - }; - - class J1 { - public: - static const std::string itemName; - }; - - class J2 { - public: - static const std::string itemName; - }; - - class K1 { - public: - static const std::string itemName; - }; - - class K2 { - public: - static const std::string itemName; - }; - }; - - - - class MEMORY : public ParserKeyword { - public: - MEMORY(); - static const std::string keywordName; - - class UNUSED { - public: - static const std::string itemName; - }; - - class THOUSANDS_CHAR8 { - public: - static const std::string itemName; - }; - }; - - - - class MESSAGES : public ParserKeyword { - public: - MESSAGES(); - static const std::string keywordName; - - class MESSAGE_PRINT_LIMIT { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class COMMENT_PRINT_LIMIT { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class WARNING_PRINT_LIMIT { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class PROBLEM_PRINT_LIMIT { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ERROR_PRINT_LIMIT { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class BUG_PRINT_LIMIT { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MESSAGE_STOP_LIMIT { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class COMMENT_STOP_LIMIT { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class WARNING_STOP_LIMIT { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class PROBLEM_STOP_LIMIT { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ERROR_STOP_LIMIT { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class BUG_STOP_LIMIT { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - - class METRIC : public ParserKeyword { - public: - METRIC(); - static const std::string keywordName; - }; - - - - class MINPV : public ParserKeyword { - public: - MINPV(); - static const std::string keywordName; - - class VALUE { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class MINPVFIL : public ParserKeyword { - public: - MINPVFIL(); - static const std::string keywordName; - - class VALUE { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class MINVALUE : public ParserKeyword { - public: - MINVALUE(); - static const std::string keywordName; - - class field { - public: - static const std::string itemName; - }; - - class value { - public: - static const std::string itemName; - }; - - class I1 { - public: - static const std::string itemName; - }; - - class I2 { - public: - static const std::string itemName; - }; - - class J1 { - public: - static const std::string itemName; - }; - - class J2 { - public: - static const std::string itemName; - }; - - class K1 { - public: - static const std::string itemName; - }; - - class K2 { - public: - static const std::string itemName; - }; - }; - - - - class MISC : public ParserKeyword { - public: - MISC(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class MISCIBLE : public ParserKeyword { - public: - MISCIBLE(); - static const std::string keywordName; - - class NTMISC { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NSMISC { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class TWOPOINT { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class MISCNUM : public ParserKeyword { - public: - MISCNUM(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class MONITOR : public ParserKeyword { - public: - MONITOR(); - static const std::string keywordName; - }; - - - - class MSFN : public ParserKeyword { - public: - MSFN(); - static const std::string keywordName; - - class table { - public: - static const std::string itemName; - }; - }; - - - - class MSGFILE : public ParserKeyword { - public: - MSGFILE(); - static const std::string keywordName; - - class ENABLE_FLAG { - public: - static const std::string itemName; - }; - }; - - - - class MULTFLT : public ParserKeyword { - public: - MULTFLT(); - static const std::string keywordName; - - class fault { - public: - static const std::string itemName; - }; - - class factor { - public: - static const std::string itemName; - }; - }; - - - - class MULTIPLY : public ParserKeyword { - public: - MULTIPLY(); - static const std::string keywordName; - - class field { - public: - static const std::string itemName; - }; - - class factor { - public: - static const std::string itemName; - }; - - class I1 { - public: - static const std::string itemName; - }; - - class I2 { - public: - static const std::string itemName; - }; - - class J1 { - public: - static const std::string itemName; - }; - - class J2 { - public: - static const std::string itemName; - }; - - class K1 { - public: - static const std::string itemName; - }; - - class K2 { - public: - static const std::string itemName; - }; - }; - - - - class MULTIREG : public ParserKeyword { - public: - MULTIREG(); - static const std::string keywordName; - - class ARRAY { - public: - static const std::string itemName; - }; - - class FACTOR { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class REGION_NUMBER { - public: - static const std::string itemName; - }; - - class REGION_NAME { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class MULTNUM : public ParserKeyword { - public: - MULTNUM(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class MULTPV : public ParserKeyword { - public: - MULTPV(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class MULTREGP : public ParserKeyword { - public: - MULTREGP(); - static const std::string keywordName; - - class REGION { - public: - static const std::string itemName; - }; - - class MULTIPLIER { - public: - static const std::string itemName; - }; - - class REGION_TYPE { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class MULTREGT : public ParserKeyword { - public: - MULTREGT(); - static const std::string keywordName; - - class SRC_REGION { - public: - static const std::string itemName; - }; - - class TARGET_REGION { - public: - static const std::string itemName; - }; - - class TRAN_MULT { - public: - static const std::string itemName; - }; - - class DIRECTIONS { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class NNC_MULT { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class REGION_DEF { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class MULT_XYZ : public ParserKeyword { - public: - MULT_XYZ(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class MW : public ParserKeyword { - public: - MW(); - static const std::string keywordName; - - class MOLAR_WEIGHT { - public: - static const std::string itemName; - }; - }; - - - - class MWS : public ParserKeyword { - public: - MWS(); - static const std::string keywordName; - - class MOLAR_WEIGHT { - public: - static const std::string itemName; - }; - }; - - - -} -} -#endif diff --git a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/N.hpp b/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/N.hpp deleted file mode 100644 index 6a2a2b9613..0000000000 --- a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/N.hpp +++ /dev/null @@ -1,322 +0,0 @@ -#ifndef PARSER_KEYWORDS_N_HPP -#define PARSER_KEYWORDS_N_HPP -#include -namespace Opm { -namespace ParserKeywords { - - class NETBALAN : public ParserKeyword { - public: - NETBALAN(); - static const std::string keywordName; - - class TIME_INTERVAL { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class PRESSURE_CONVERGENCE_LIMT { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class MAX_ITER { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class THP_CONVERGENCE_LIMIT { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class MAX_ITER_THP { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class TARGET_BALANCE_ERROR { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class MAX_BALANCE_ERROR { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class MIN_TIME_STEP { - public: - static const std::string itemName; - }; - }; - - - - class NEWTRAN : public ParserKeyword { - public: - NEWTRAN(); - static const std::string keywordName; - }; - - - - class NEXTSTEP : public ParserKeyword { - public: - NEXTSTEP(); - static const std::string keywordName; - - class MAX_STEP { - public: - static const std::string itemName; - }; - - class APPLY_TO_ALL { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class NNC : public ParserKeyword { - public: - NNC(); - static const std::string keywordName; - - class I1 { - public: - static const std::string itemName; - }; - - class J1 { - public: - static const std::string itemName; - }; - - class K1 { - public: - static const std::string itemName; - }; - - class I2 { - public: - static const std::string itemName; - }; - - class J2 { - public: - static const std::string itemName; - }; - - class K2 { - public: - static const std::string itemName; - }; - - class TRAN { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class SIM_DEPENDENT1 { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class SIM_DEPENDENT2 { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class PRESSURE_TABLE1 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class PRESSURE_TABLE2 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class VE_FACE1 { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class VE_FACE2 { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class DIFFUSIVITY { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class SIM_DEPENDENT3 { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class VDFLOW_AREA { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class VDFLOW_PERM { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class NOCASC : public ParserKeyword { - public: - NOCASC(); - static const std::string keywordName; - }; - - - - class NOECHO : public ParserKeyword { - public: - NOECHO(); - static const std::string keywordName; - }; - - - - class NOGGF : public ParserKeyword { - public: - NOGGF(); - static const std::string keywordName; - }; - - - - class NOGRAV : public ParserKeyword { - public: - NOGRAV(); - static const std::string keywordName; - }; - - - - class NOINSPEC : public ParserKeyword { - public: - NOINSPEC(); - static const std::string keywordName; - }; - - - - class NOMONITO : public ParserKeyword { - public: - NOMONITO(); - static const std::string keywordName; - }; - - - - class NONNC : public ParserKeyword { - public: - NONNC(); - static const std::string keywordName; - }; - - - - class NORSSPEC : public ParserKeyword { - public: - NORSSPEC(); - static const std::string keywordName; - }; - - - - class NOSIM : public ParserKeyword { - public: - NOSIM(); - static const std::string keywordName; - }; - - - - class NSTACK : public ParserKeyword { - public: - NSTACK(); - static const std::string keywordName; - - class LINEAR_SOLVER_SIZE { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - - class NTG : public ParserKeyword { - public: - NTG(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class NUMRES : public ParserKeyword { - public: - NUMRES(); - static const std::string keywordName; - - class num { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - - class NUPCOL : public ParserKeyword { - public: - NUPCOL(); - static const std::string keywordName; - - class NUM_ITER { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - -} -} -#endif diff --git a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/O.hpp b/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/O.hpp deleted file mode 100644 index 6787d1c918..0000000000 --- a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/O.hpp +++ /dev/null @@ -1,1356 +0,0 @@ -#ifndef PARSER_KEYWORDS_O_HPP -#define PARSER_KEYWORDS_O_HPP -#include -namespace Opm { -namespace ParserKeywords { - - class OCOMPIDX : public ParserKeyword { - public: - OCOMPIDX(); - static const std::string keywordName; - - class OIL_COMPONENT_INDEX { - public: - static const std::string itemName; - }; - }; - - - - class OIL : public ParserKeyword { - public: - OIL(); - static const std::string keywordName; - }; - - - - class OILCOMPR : public ParserKeyword { - public: - OILCOMPR(); - static const std::string keywordName; - - class COMPRESSIBILITY { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class EXPANSION_COEFF_LINEAR { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class EXPANSION_COEFF_QUADRATIC { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class OILMW : public ParserKeyword { - public: - OILMW(); - static const std::string keywordName; - - class MOLAR_WEIGHT { - public: - static const std::string itemName; - }; - }; - - - - class OILVISCT : public ParserKeyword { - public: - OILVISCT(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class OILVTIM : public ParserKeyword { - public: - OILVTIM(); - static const std::string keywordName; - - class INTERPOLATION_METHOD { - public: - static const std::string itemName; - }; - }; - - - - class OLDTRAN : public ParserKeyword { - public: - OLDTRAN(); - static const std::string keywordName; - }; - - - - class OPERATE : public ParserKeyword { - public: - OPERATE(); - static const std::string keywordName; - - class RESULT_ARRAY { - public: - static const std::string itemName; - }; - - class I1 { - public: - static const std::string itemName; - }; - - class I2 { - public: - static const std::string itemName; - }; - - class J1 { - public: - static const std::string itemName; - }; - - class J2 { - public: - static const std::string itemName; - }; - - class K1 { - public: - static const std::string itemName; - }; - - class K2 { - public: - static const std::string itemName; - }; - - class OPERATION { - public: - static const std::string itemName; - }; - - class ARRAY_ARG { - public: - static const std::string itemName; - }; - - class PARAM1 { - public: - static const std::string itemName; - }; - - class PARAM2 { - public: - static const std::string itemName; - }; - }; - - - - class OPTIONS : public ParserKeyword { - public: - OPTIONS(); - static const std::string keywordName; - - class ITEM1 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM2 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM3 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM4 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM5 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM6 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM7 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM8 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM9 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM10 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM11 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM12 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM13 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM14 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM15 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM16 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM17 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM18 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM19 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM20 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM21 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM22 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM23 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM24 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM25 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM26 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM27 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM28 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM29 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM30 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM31 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM32 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM33 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM34 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM35 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM36 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM37 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM38 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM39 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM40 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM41 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM42 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM43 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM44 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM45 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM46 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM47 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM48 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM49 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM50 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM51 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM52 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM53 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM54 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM55 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM56 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM57 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM58 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM59 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM60 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM61 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM62 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM63 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM64 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM65 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM66 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM67 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM68 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM69 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM70 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM71 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM72 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM73 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM74 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM75 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM76 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM77 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM78 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM79 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM80 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM81 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM82 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM83 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM84 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM85 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM86 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM87 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM88 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM89 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM90 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM91 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM92 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM93 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM94 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM95 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM96 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM97 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM98 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM99 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM100 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM101 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM102 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM103 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM104 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM105 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM106 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM107 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM108 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM109 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM110 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM111 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM112 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM113 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM114 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM115 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM116 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM117 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM118 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM119 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM120 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM121 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM122 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM123 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM124 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM125 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM126 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM127 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM128 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM129 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM130 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM131 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM132 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM133 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM134 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM135 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM136 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM137 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM138 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM139 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM140 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM141 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM142 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM143 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM144 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM145 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM146 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM147 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM148 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM149 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM150 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM151 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM152 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM153 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM154 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM155 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM156 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM157 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM158 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM159 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM160 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM161 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM162 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM163 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM164 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM165 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM166 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM167 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM168 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM169 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM170 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM171 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM172 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM173 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM174 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM175 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM176 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM177 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM178 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM179 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM180 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM181 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM182 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM183 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM184 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM185 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM186 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM187 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM188 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM189 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM190 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM191 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM192 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM193 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM194 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM195 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM196 { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM197 { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - -} -} -#endif diff --git a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/P.hpp b/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/P.hpp deleted file mode 100644 index 7e2857cdea..0000000000 --- a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/P.hpp +++ /dev/null @@ -1,658 +0,0 @@ -#ifndef PARSER_KEYWORDS_P_HPP -#define PARSER_KEYWORDS_P_HPP -#include -namespace Opm { -namespace ParserKeywords { - - class PARALLEL : public ParserKeyword { - public: - PARALLEL(); - static const std::string keywordName; - - class NDMAIN { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MACHINE_TYPE { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class PATHS : public ParserKeyword { - public: - PATHS(); - static const std::string keywordName; - - class PathName { - public: - static const std::string itemName; - }; - - class PathValue { - public: - static const std::string itemName; - }; - }; - - - - class PBVD : public ParserKeyword { - public: - PBVD(); - static const std::string keywordName; - - class table { - public: - static const std::string itemName; - }; - }; - - - - class PCG : public ParserKeyword { - public: - PCG(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class PERFORMANCE_PROBE : public ParserKeyword { - public: - PERFORMANCE_PROBE(); - static const std::string keywordName; - }; - - - - class PERMX : public ParserKeyword { - public: - PERMX(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class PERMXY : public ParserKeyword { - public: - PERMXY(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class PERMY : public ParserKeyword { - public: - PERMY(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class PERMYZ : public ParserKeyword { - public: - PERMYZ(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class PERMZ : public ParserKeyword { - public: - PERMZ(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class PERMZX : public ParserKeyword { - public: - PERMZX(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class PIMTDIMS : public ParserKeyword { - public: - PIMTDIMS(); - static const std::string keywordName; - - class NTPIMT { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NPPIMT { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - - class PIMULTAB : public ParserKeyword { - public: - PIMULTAB(); - static const std::string keywordName; - - class TABLE { - public: - static const std::string itemName; - }; - }; - - - - class PINCH : public ParserKeyword { - public: - PINCH(); - static const std::string keywordName; - - class THRESHOLD_THICKNESS { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class CONTROL_OPTION { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class MAX_EMPTY_GAP { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class PINCHOUT_OPTION { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class MULTZ_OPTION { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class PLMIXPAR : public ParserKeyword { - public: - PLMIXPAR(); - static const std::string keywordName; - - class TODD_LONGSTAFF { - public: - static const std::string itemName; - }; - }; - - - - class PLYADS : public ParserKeyword { - public: - PLYADS(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class PLYADSS : public ParserKeyword { - public: - PLYADSS(); - static const std::string keywordName; - - class POLYMER_C { - public: - static const std::string itemName; - }; - - class POLYMER_ADS_C { - public: - static const std::string itemName; - }; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class PLYDHFLF : public ParserKeyword { - public: - PLYDHFLF(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class PLYMAX : public ParserKeyword { - public: - PLYMAX(); - static const std::string keywordName; - - class MAX_POLYMER_CONCENTRATION { - public: - static const std::string itemName; - }; - - class MAX_SALT_CONCENTRATION { - public: - static const std::string itemName; - }; - }; - - - - class PLYROCK : public ParserKeyword { - public: - PLYROCK(); - static const std::string keywordName; - - class IPV { - public: - static const std::string itemName; - }; - - class RRF { - public: - static const std::string itemName; - }; - - class ROCK_DENSITY { - public: - static const std::string itemName; - }; - - class AI { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class MAX_ADSORPTION { - public: - static const std::string itemName; - }; - }; - - - - class PLYSHEAR : public ParserKeyword { - public: - PLYSHEAR(); - static const std::string keywordName; - - class WATER_VELOCITY { - public: - static const std::string itemName; - }; - - class VRF { - public: - static const std::string itemName; - }; - }; - - - - class PLYSHLOG : public ParserKeyword { - public: - PLYSHLOG(); - static const std::string keywordName; - - class REF_POLYMER_CONCENTRATION { - public: - static const std::string itemName; - }; - - class REF_SALINITY { - public: - static const std::string itemName; - }; - - class REF_TEMPERATURE { - public: - static const std::string itemName; - }; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class PLYVISC : public ParserKeyword { - public: - PLYVISC(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class PMISC : public ParserKeyword { - public: - PMISC(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class POLYMER : public ParserKeyword { - public: - POLYMER(); - static const std::string keywordName; - }; - - - - class PORO : public ParserKeyword { - public: - PORO(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class PORV : public ParserKeyword { - public: - PORV(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class PREF : public ParserKeyword { - public: - PREF(); - static const std::string keywordName; - - class PRESSURE { - public: - static const std::string itemName; - }; - }; - - - - class PREFS : public ParserKeyword { - public: - PREFS(); - static const std::string keywordName; - - class PRESSURE { - public: - static const std::string itemName; - }; - }; - - - - class PRESSURE : public ParserKeyword { - public: - PRESSURE(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class PROPS : public ParserKeyword { - public: - PROPS(); - static const std::string keywordName; - }; - - - - class PVCDO : public ParserKeyword { - public: - PVCDO(); - static const std::string keywordName; - - class P_REF { - public: - static const std::string itemName; - }; - - class OIL_VOL_FACTOR { - public: - static const std::string itemName; - }; - - class OIL_COMPRESSIBILITY { - public: - static const std::string itemName; - }; - - class OIL_VISCOSITY { - public: - static const std::string itemName; - }; - - class OIL_VISCOSIBILITY { - public: - static const std::string itemName; - }; - }; - - - - class PVDG : public ParserKeyword { - public: - PVDG(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class PVDO : public ParserKeyword { - public: - PVDO(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class PVDS : public ParserKeyword { - public: - PVDS(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class PVTG : public ParserKeyword { - public: - PVTG(); - static const std::string keywordName; - - class GAS_PRESSURE { - public: - static const std::string itemName; - }; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class PVTNUM : public ParserKeyword { - public: - PVTNUM(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class PVTO : public ParserKeyword { - public: - PVTO(); - static const std::string keywordName; - - class RS { - public: - static const std::string itemName; - }; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class PVTW : public ParserKeyword { - public: - PVTW(); - static const std::string keywordName; - - class P_REF { - public: - static const std::string itemName; - }; - - class WATER_VOL_FACTOR { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class WATER_COMPRESSIBILITY { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class WATER_VISCOSITY { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class WATER_VISCOSIBILITY { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - -} -} -#endif diff --git a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/R.hpp b/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/R.hpp deleted file mode 100644 index 83bfe61190..0000000000 --- a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/R.hpp +++ /dev/null @@ -1,474 +0,0 @@ -#ifndef PARSER_KEYWORDS_R_HPP -#define PARSER_KEYWORDS_R_HPP -#include -namespace Opm { -namespace ParserKeywords { - - class RADFIN4 : public ParserKeyword { - public: - RADFIN4(); - static const std::string keywordName; - - class NAME { - public: - static const std::string itemName; - }; - - class I1 { - public: - static const std::string itemName; - }; - - class I2 { - public: - static const std::string itemName; - }; - - class J1 { - public: - static const std::string itemName; - }; - - class J2 { - public: - static const std::string itemName; - }; - - class K1 { - public: - static const std::string itemName; - }; - - class K2 { - public: - static const std::string itemName; - }; - - class NR { - public: - static const std::string itemName; - }; - - class NTHETA { - public: - static const std::string itemName; - }; - - class NZ { - public: - static const std::string itemName; - }; - - class NWMAX { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - - class REGDIMS : public ParserKeyword { - public: - REGDIMS(); - static const std::string keywordName; - - class NTFIP { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NMFIPR { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NRFREG { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NTFREG { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_ETRACK { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NTCREG { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_OPERNUM { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_OPERATE_DWORK { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_OPERATE_IWORK { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NPLMIX { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - - class REGIONS : public ParserKeyword { - public: - REGIONS(); - static const std::string keywordName; - }; - - - - class REGION_PROBE : public ParserKeyword { - public: - REGION_PROBE(); - static const std::string keywordName; - - class REGIONS { - public: - static const std::string itemName; - }; - }; - - - - class RESTART : public ParserKeyword { - public: - RESTART(); - static const std::string keywordName; - - class ROOTNAME { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class REPORTNUMBER { - public: - static const std::string itemName; - }; - - class SAVEFILE { - public: - static const std::string itemName; - }; - - class SAVEFILE_FORMAT { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class RKTRMDIR : public ParserKeyword { - public: - RKTRMDIR(); - static const std::string keywordName; - }; - - - - class ROCK : public ParserKeyword { - public: - ROCK(); - static const std::string keywordName; - - class PREF { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class COMPRESSIBILITY { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class ROCKCOMP : public ParserKeyword { - public: - ROCKCOMP(); - static const std::string keywordName; - - class HYSTERESIS { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class NTROCC { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class WATER_COMPACTION { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class ROCKOPTS : public ParserKeyword { - public: - ROCKOPTS(); - static const std::string keywordName; - - class METHOD { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class REF_PRESSURE { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class TABLE_TYPE { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class HYST_TYPE { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class ROCKTAB : public ParserKeyword { - public: - ROCKTAB(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class RPTGRID : public ParserKeyword { - public: - RPTGRID(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class RPTONLY : public ParserKeyword { - public: - RPTONLY(); - static const std::string keywordName; - }; - - - - class RPTONLYO : public ParserKeyword { - public: - RPTONLYO(); - static const std::string keywordName; - }; - - - - class RPTPROPS : public ParserKeyword { - public: - RPTPROPS(); - static const std::string keywordName; - - class mnemonics { - public: - static const std::string itemName; - }; - }; - - - - class RPTREGS : public ParserKeyword { - public: - RPTREGS(); - static const std::string keywordName; - - class MNEMONIC_LIST { - public: - static const std::string itemName; - }; - }; - - - - class RPTRST : public ParserKeyword { - public: - RPTRST(); - static const std::string keywordName; - - class MNEMONIC_LIST { - public: - static const std::string itemName; - }; - }; - - - - class RPTRUNSP : public ParserKeyword { - public: - RPTRUNSP(); - static const std::string keywordName; - }; - - - - class RPTSCHED : public ParserKeyword { - public: - RPTSCHED(); - static const std::string keywordName; - - class MNEMONIC_LIST { - public: - static const std::string itemName; - }; - }; - - - - class RPTSOL : public ParserKeyword { - public: - RPTSOL(); - static const std::string keywordName; - - class mnemonics { - public: - static const std::string itemName; - }; - }; - - - - class RS : public ParserKeyword { - public: - RS(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class RSVD : public ParserKeyword { - public: - RSVD(); - static const std::string keywordName; - - class table { - public: - static const std::string itemName; - }; - }; - - - - class RTEMPVD : public ParserKeyword { - public: - RTEMPVD(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class RUNSPEC : public ParserKeyword { - public: - RUNSPEC(); - static const std::string keywordName; - }; - - - - class RUNSUM : public ParserKeyword { - public: - RUNSUM(); - static const std::string keywordName; - }; - - - - class RV : public ParserKeyword { - public: - RV(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class RVVD : public ParserKeyword { - public: - RVVD(); - static const std::string keywordName; - - class table { - public: - static const std::string itemName; - }; - }; - - - -} -} -#endif diff --git a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/S.hpp b/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/S.hpp deleted file mode 100644 index 1a7d0b33b1..0000000000 --- a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/S.hpp +++ /dev/null @@ -1,639 +0,0 @@ -#ifndef PARSER_KEYWORDS_S_HPP -#define PARSER_KEYWORDS_S_HPP -#include -namespace Opm { -namespace ParserKeywords { - - class SATNUM : public ParserKeyword { - public: - SATNUM(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class SATOPTS : public ParserKeyword { - public: - SATOPTS(); - static const std::string keywordName; - - class options { - public: - static const std::string itemName; - }; - }; - - - - class SAVE : public ParserKeyword { - public: - SAVE(); - static const std::string keywordName; - - class FILE_TYPE { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class SCALECRS : public ParserKeyword { - public: - SCALECRS(); - static const std::string keywordName; - - class VALUE { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class SCHEDULE : public ParserKeyword { - public: - SCHEDULE(); - static const std::string keywordName; - }; - - - - class SDENSITY : public ParserKeyword { - public: - SDENSITY(); - static const std::string keywordName; - - class SOLVENT_DENSITY { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class SEPARATE : public ParserKeyword { - public: - SEPARATE(); - static const std::string keywordName; - }; - - - - class SGAS : public ParserKeyword { - public: - SGAS(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class SGCR : public ParserKeyword { - public: - SGCR(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class SGCWMIS : public ParserKeyword { - public: - SGCWMIS(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class SGFN : public ParserKeyword { - public: - SGFN(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class SGL : public ParserKeyword { - public: - SGL(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class SGOF : public ParserKeyword { - public: - SGOF(); - static const std::string keywordName; - - class table { - public: - static const std::string itemName; - }; - }; - - - - class SGU : public ParserKeyword { - public: - SGU(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class SGWFN : public ParserKeyword { - public: - SGWFN(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class SHRATE : public ParserKeyword { - public: - SHRATE(); - static const std::string keywordName; - - class SHEAR_RATE { - public: - static const std::string itemName; - }; - }; - - - - class SKIP : public ParserKeyword { - public: - SKIP(); - static const std::string keywordName; - }; - - - - class SKIP100 : public ParserKeyword { - public: - SKIP100(); - static const std::string keywordName; - }; - - - - class SKIP300 : public ParserKeyword { - public: - SKIP300(); - static const std::string keywordName; - }; - - - - class SKIPREST : public ParserKeyword { - public: - SKIPREST(); - static const std::string keywordName; - }; - - - - class SLGOF : public ParserKeyword { - public: - SLGOF(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class SMRYDIMS : public ParserKeyword { - public: - SMRYDIMS(); - static const std::string keywordName; - - class DIMS { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - - class SOF2 : public ParserKeyword { - public: - SOF2(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class SOF3 : public ParserKeyword { - public: - SOF3(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class SOGCR : public ParserKeyword { - public: - SOGCR(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class SOIL : public ParserKeyword { - public: - SOIL(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class SOLUTION : public ParserKeyword { - public: - SOLUTION(); - static const std::string keywordName; - }; - - - - class SOLVENT : public ParserKeyword { - public: - SOLVENT(); - static const std::string keywordName; - }; - - - - class SORWMIS : public ParserKeyword { - public: - SORWMIS(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class SOWCR : public ParserKeyword { - public: - SOWCR(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class SPECGRID : public ParserKeyword { - public: - SPECGRID(); - static const std::string keywordName; - - class NX { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NY { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NZ { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NUMRES { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class COORD_TYPE { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class SPECHEAT : public ParserKeyword { - public: - SPECHEAT(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class SPECROCK : public ParserKeyword { - public: - SPECROCK(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class SSFN : public ParserKeyword { - public: - SSFN(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class SSOL : public ParserKeyword { - public: - SSOL(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class START : public ParserKeyword { - public: - START(); - static const std::string keywordName; - - class DAY { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MONTH { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class YEAR { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class TIME { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class STCOND : public ParserKeyword { - public: - STCOND(); - static const std::string keywordName; - - class TEMPERATURE { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class PRESSURE { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class STONE1 : public ParserKeyword { - public: - STONE1(); - static const std::string keywordName; - }; - - - - class STONE1EX : public ParserKeyword { - public: - STONE1EX(); - static const std::string keywordName; - - class EXP_VALUE { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class SUMMARY : public ParserKeyword { - public: - SUMMARY(); - static const std::string keywordName; - }; - - - - class SUMTHIN : public ParserKeyword { - public: - SUMTHIN(); - static const std::string keywordName; - - class TIME { - public: - static const std::string itemName; - }; - }; - - - - class SWAT : public ParserKeyword { - public: - SWAT(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class SWATINIT : public ParserKeyword { - public: - SWATINIT(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class SWCR : public ParserKeyword { - public: - SWCR(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class SWFN : public ParserKeyword { - public: - SWFN(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class SWL : public ParserKeyword { - public: - SWL(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class SWOF : public ParserKeyword { - public: - SWOF(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class SWU : public ParserKeyword { - public: - SWU(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - -} -} -#endif diff --git a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/T.hpp b/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/T.hpp deleted file mode 100644 index 80d21085a8..0000000000 --- a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/T.hpp +++ /dev/null @@ -1,711 +0,0 @@ -#ifndef PARSER_KEYWORDS_T_HPP -#define PARSER_KEYWORDS_T_HPP -#include -namespace Opm { -namespace ParserKeywords { - - class TABDIMS : public ParserKeyword { - public: - TABDIMS(); - static const std::string keywordName; - - class NTSFUN { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NTPVT { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NSSFUN { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NPPVT { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NTFIP { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NRPVT { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_RV_NODES { - public: - static const std::string itemName; - }; - - class NTENDP { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NUM_STATE_EQ { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NUM_EOS_RES { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NUM_EOS_SURFACE { - public: - static const std::string itemName; - }; - - class MAX_FLUX_REGIONS { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_THERMAL_REGIONS { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NTROCC { - public: - static const std::string itemName; - }; - - class MAX_PRESSURE_MAINTAINANCE_REGIONS { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_KVALUE_TABLES { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NTALPHA { - public: - static const std::string itemName; - }; - - class ASPHALTENE_ASPKDAM_MAX_ROWS { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ASPHALTENE_ASPREWG_MAX_ROWS { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ASPHALTENE_ASPVISO_MAX_ROWS { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ITEM20_NOT_USED { - public: - static const std::string itemName; - }; - - class ASPHALTENE_ASPPW2D_MAX_COLUMNS { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ASPHALTENE_ASPPW2D_MAX_ROWS { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ASPHALTENE_ASPWETF_MAX_ROWS { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NUM_KVALUE_TABLES { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class RESERVED { - public: - static const std::string itemName; - }; - }; - - - - class TEMP : public ParserKeyword { - public: - TEMP(); - static const std::string keywordName; - }; - - - - class TEMPI : public ParserKeyword { - public: - TEMPI(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class TEMPVD : public ParserKeyword { - public: - TEMPVD(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class THCONR : public ParserKeyword { - public: - THCONR(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class THERMAL : public ParserKeyword { - public: - THERMAL(); - static const std::string keywordName; - }; - - - - class THERMEX1 : public ParserKeyword { - public: - THERMEX1(); - static const std::string keywordName; - - class EXPANSION_COEFF { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class THPRES : public ParserKeyword { - public: - THPRES(); - static const std::string keywordName; - - class REGION1 { - public: - static const std::string itemName; - }; - - class REGION2 { - public: - static const std::string itemName; - }; - - class VALUE { - public: - static const std::string itemName; - }; - }; - - - - class TITLE : public ParserKeyword { - public: - TITLE(); - static const std::string keywordName; - - class TitleText { - public: - static const std::string itemName; - }; - }; - - - - class TLMIXPAR : public ParserKeyword { - public: - TLMIXPAR(); - static const std::string keywordName; - - class TL_VISCOSITY_PARAMETER { - public: - static const std::string itemName; - }; - - class TL_DENSITY_PARAMETER { - public: - static const std::string itemName; - }; - }; - - - - class TLPMIXPA : public ParserKeyword { - public: - TLPMIXPA(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class TNUM : public ParserKeyword { - public: - TNUM(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class TOPS : public ParserKeyword { - public: - TOPS(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class TRACER : public ParserKeyword { - public: - TRACER(); - static const std::string keywordName; - - class NAME { - public: - static const std::string itemName; - }; - - class FLUID { - public: - static const std::string itemName; - }; - - class UNIT { - public: - static const std::string itemName; - }; - - class SOLUTION_PHASE { - public: - static const std::string itemName; - }; - - class NUM_PART_TABLE { - public: - static const std::string itemName; - }; - - class ADSORB_PHASE { - public: - static const std::string itemName; - }; - }; - - - - class TRACERS : public ParserKeyword { - public: - TRACERS(); - static const std::string keywordName; - - class MAX_OIL_TRACERS { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_WATER_TRACERS { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_GAS_TRACERS { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_ENV_TRACERS { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NUMERIC_DIFF { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class MAX_ITER { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MIN_ITER { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - - class TRANX : public ParserKeyword { - public: - TRANX(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class TRANY : public ParserKeyword { - public: - TRANY(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class TRANZ : public ParserKeyword { - public: - TRANZ(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class TREF : public ParserKeyword { - public: - TREF(); - static const std::string keywordName; - - class TEMPERATURE { - public: - static const std::string itemName; - }; - }; - - - - class TREFS : public ParserKeyword { - public: - TREFS(); - static const std::string keywordName; - - class TEMPERATURE { - public: - static const std::string itemName; - }; - }; - - - - class TSTEP : public ParserKeyword { - public: - TSTEP(); - static const std::string keywordName; - - class step_list { - public: - static const std::string itemName; - }; - }; - - - - class TUNING : public ParserKeyword { - public: - TUNING(); - static const std::string keywordName; - - class TSINIT { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class TSMAXZ { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class TSMINZ { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class TSMCHP { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class TSFMAX { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class TSFMIN { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class TSFCNV { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class TFDIFF { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class THRUPT { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class TMAXWC { - public: - static const std::string itemName; - }; - - class TRGTTE { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class TRGCNV { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class TRGMBE { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class TRGLCV { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class XXXTTE { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class XXXCNV { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class XXXMBE { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class XXXLCV { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class XXXWFL { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class TRGFIP { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class TRGSFT { - public: - static const std::string itemName; - }; - - class THIONX { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class TRWGHT { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NEWTMX { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NEWTMN { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class LITMAX { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class LITMIN { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MXWSIT { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MXWPIT { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class DDPLIM { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class DDSLIM { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class TRGDPR { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class XXXDPR { - public: - static const std::string itemName; - }; - }; - - - - class TVDP : public ParserKeyword { - public: - TVDP(); - static const std::string keywordName; - - class table { - public: - static const std::string itemName; - }; - }; - - - -} -} -#endif diff --git a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/U.hpp b/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/U.hpp deleted file mode 100644 index 40be727aa1..0000000000 --- a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/U.hpp +++ /dev/null @@ -1,125 +0,0 @@ -#ifndef PARSER_KEYWORDS_U_HPP -#define PARSER_KEYWORDS_U_HPP -#include -namespace Opm { -namespace ParserKeywords { - - class UDADIMS : public ParserKeyword { - public: - UDADIMS(); - static const std::string keywordName; - - class NUM_UDQ_REPLACE { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class IGNORED { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class TOTAL_UDQ_UNIQUE { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - - class UDQDIMS : public ParserKeyword { - public: - UDQDIMS(); - static const std::string keywordName; - - class MAX_FUNCTIONS { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_ITEMS { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_CONNECTIONS { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_FIELDS { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_GROUP { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_REGION { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_SEGMENT { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_WELL { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_AQUIFER { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_BLOCK { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class RESTART_NEW_SEED { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class UNIFIN : public ParserKeyword { - public: - UNIFIN(); - static const std::string keywordName; - }; - - - - class UNIFOUT : public ParserKeyword { - public: - UNIFOUT(); - static const std::string keywordName; - }; - - - -} -} -#endif diff --git a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/V.hpp b/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/V.hpp deleted file mode 100644 index 786e913b31..0000000000 --- a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/V.hpp +++ /dev/null @@ -1,288 +0,0 @@ -#ifndef PARSER_KEYWORDS_V_HPP -#define PARSER_KEYWORDS_V_HPP -#include -namespace Opm { -namespace ParserKeywords { - - class VAPOIL : public ParserKeyword { - public: - VAPOIL(); - static const std::string keywordName; - }; - - - - class VAPPARS : public ParserKeyword { - public: - VAPPARS(); - static const std::string keywordName; - - class OIL_VAP_PROPENSITY { - public: - static const std::string itemName; - }; - - class OIL_DENSITY_PROPENSITY { - public: - static const std::string itemName; - }; - }; - - - - class VFPIDIMS : public ParserKeyword { - public: - VFPIDIMS(); - static const std::string keywordName; - - class MAX_FLOW_TABLE { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_THP_TABLE { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_INJ_VFP_TABLE { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - - class VFPINJ : public ParserKeyword { - public: - VFPINJ(); - static const std::string keywordName; - - class TABLE { - public: - static const std::string itemName; - }; - - class DATUM_DEPTH { - public: - static const std::string itemName; - }; - - class RATE_TYPE { - public: - static const std::string itemName; - }; - - class PRESSURE_DEF { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class UNITS { - public: - static const std::string itemName; - }; - - class BODY_DEF { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class FLOW_VALUES { - public: - static const std::string itemName; - }; - - class THP_VALUES { - public: - static const std::string itemName; - }; - - class THP_INDEX { - public: - static const std::string itemName; - }; - - class VALUES { - public: - static const std::string itemName; - }; - }; - - - - class VFPPDIMS : public ParserKeyword { - public: - VFPPDIMS(); - static const std::string keywordName; - - class MAX_FLOW_TABLE { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_THP_TABLE { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_WCT_TABLE { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_GCT_TABLE { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_ALQ_TABLE { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_PROD_VFP_TABLE { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - - class VFPPROD : public ParserKeyword { - public: - VFPPROD(); - static const std::string keywordName; - - class TABLE { - public: - static const std::string itemName; - }; - - class DATUM_DEPTH { - public: - static const std::string itemName; - }; - - class RATE_TYPE { - public: - static const std::string itemName; - }; - - class WFR { - public: - static const std::string itemName; - }; - - class GFR { - public: - static const std::string itemName; - }; - - class PRESSURE_DEF { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class ALQ_DEF { - public: - static const std::string itemName; - }; - - class UNITS { - public: - static const std::string itemName; - }; - - class BODY_DEF { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class FLOW_VALUES { - public: - static const std::string itemName; - }; - - class THP_VALUES { - public: - static const std::string itemName; - }; - - class WFR_VALUES { - public: - static const std::string itemName; - }; - - class GFR_VALUES { - public: - static const std::string itemName; - }; - - class ALQ_VALUES { - public: - static const std::string itemName; - }; - - class THP_INDEX { - public: - static const std::string itemName; - }; - - class WFR_INDEX { - public: - static const std::string itemName; - }; - - class GFR_INDEX { - public: - static const std::string itemName; - }; - - class ALQ_INDEX { - public: - static const std::string itemName; - }; - - class VALUES { - public: - static const std::string itemName; - }; - }; - - - - class VISCREF : public ParserKeyword { - public: - VISCREF(); - static const std::string keywordName; - - class REFERENCE_PRESSURE { - public: - static const std::string itemName; - }; - - class REFERENCE_RS { - public: - static const std::string itemName; - }; - }; - - - -} -} -#endif diff --git a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/W.hpp b/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/W.hpp deleted file mode 100644 index b484eccf1a..0000000000 --- a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/W.hpp +++ /dev/null @@ -1,1360 +0,0 @@ -#ifndef PARSER_KEYWORDS_W_HPP -#define PARSER_KEYWORDS_W_HPP -#include -namespace Opm { -namespace ParserKeywords { - - class WATDENT : public ParserKeyword { - public: - WATDENT(); - static const std::string keywordName; - - class REFERENCE_TEMPERATURE { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class EXPANSION_COEFF_LINEAR { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class EXPANSION_COEFF_QUADRATIC { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class WATER : public ParserKeyword { - public: - WATER(); - static const std::string keywordName; - }; - - - - class WATVISCT : public ParserKeyword { - public: - WATVISCT(); - static const std::string keywordName; - - class DATA { - public: - static const std::string itemName; - }; - }; - - - - class WCONHIST : public ParserKeyword { - public: - WCONHIST(); - static const std::string keywordName; - - class WELL { - public: - static const std::string itemName; - }; - - class STATUS { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class CMODE { - public: - static const std::string itemName; - }; - - class ORAT { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class WRAT { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class GRAT { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class VFPTable { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class Lift { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class THP { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class BHP { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class NGLRAT { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class WCONINJ : public ParserKeyword { - public: - WCONINJ(); - static const std::string keywordName; - }; - - - - class WCONINJE : public ParserKeyword { - public: - WCONINJE(); - static const std::string keywordName; - - class WELL { - public: - static const std::string itemName; - }; - - class TYPE { - public: - static const std::string itemName; - }; - - class STATUS { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class CMODE { - public: - static const std::string itemName; - }; - - class RATE { - public: - static const std::string itemName; - }; - - class RESV { - public: - static const std::string itemName; - }; - - class BHP { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class THP { - public: - static const std::string itemName; - }; - - class VFP_TABLE { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class VAPOIL_C { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class GAS_STEAM_RATIO { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class SURFACE_OIL_FRACTION { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class SURFACE_GAS_FRACTION { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class OIL_STEAM_RATIO { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class WCONINJH : public ParserKeyword { - public: - WCONINJH(); - static const std::string keywordName; - - class WELL { - public: - static const std::string itemName; - }; - - class TYPE { - public: - static const std::string itemName; - }; - - class STATUS { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class RATE { - public: - static const std::string itemName; - }; - - class BHP { - public: - static const std::string itemName; - }; - - class THP { - public: - static const std::string itemName; - }; - - class VFP_TABLE { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class VAPOIL_C { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class SURFACE_OIL_FRACTION { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class SURFACE_WATER_FRACTION { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class SURFACE_GAS_FRACTION { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class CMODE { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class WCONPROD : public ParserKeyword { - public: - WCONPROD(); - static const std::string keywordName; - - class WELL { - public: - static const std::string itemName; - }; - - class STATUS { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class CMODE { - public: - static const std::string itemName; - }; - - class ORAT { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class WRAT { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class GRAT { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class LRAT { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class RESV { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class BHP { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class THP { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class VFP_TABLE { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class ALQ { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class E300_ITEM13 { - public: - static const std::string itemName; - }; - - class E300_ITEM14 { - public: - static const std::string itemName; - }; - - class E300_ITEM15 { - public: - static const std::string itemName; - }; - - class E300_ITEM16 { - public: - static const std::string itemName; - }; - - class E300_ITEM17 { - public: - static const std::string itemName; - }; - - class E300_ITEM18 { - public: - static const std::string itemName; - }; - - class E300_ITEM19 { - public: - static const std::string itemName; - }; - - class E300_ITEM20 { - public: - static const std::string itemName; - }; - }; - - - - class WDRILTIM : public ParserKeyword { - public: - WDRILTIM(); - static const std::string keywordName; - - class WELL { - public: - static const std::string itemName; - }; - - class DRILL_TIME { - public: - static const std::string itemName; - }; - - class WORKOVER_CLOSE { - public: - static const std::string itemName; - }; - - class COMPARTMENT { - public: - static const std::string itemName; - }; - }; - - - - class WECON : public ParserKeyword { - public: - WECON(); - static const std::string keywordName; - - class WELL { - public: - static const std::string itemName; - }; - - class MIN_OIL_PRODUCTION { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class MIN_GAS_PRODUCTION { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class MAX_WATER_CUT { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class MAX_GAS_OIL_RATIO { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class MAX_WATER_GAS_RATIO { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class WORKOVER_RATIO_LIMIT { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class END_RUN_FLAG { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class FOLLOW_ON_WELL { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class LIMITED_QUANTITY { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class SECOND_MAX_WATER_CUT { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class WORKOVER_SECOND_WATER_CUT_LIMIT { - public: - static const std::string itemName; - }; - - class MAX_GAS_LIQUID_RATIO { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class MIN_LIQUID_PRODCUTION_RATE { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class MAX_TEMP { - public: - static const std::string itemName; - }; - - class MIN_RES_FLUID_RATE { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class WELLDIMS : public ParserKeyword { - public: - WELLDIMS(); - static const std::string keywordName; - - class MAXWELLS { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAXCONN { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAXGROUPS { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_GROUPSIZE { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_STAGES { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_STREAMS { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_MIXTURES { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_SEPARATORS { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_MIXTURE_ITEMS { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_COMPLETION_X { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_WELLIST_PR_WELL { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_DYNAMIC_WELLIST { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_SECONDARY_WELLS { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - - class WELL_PROBE : public ParserKeyword { - public: - WELL_PROBE(); - static const std::string keywordName; - - class WELLS { - public: - static const std::string itemName; - }; - }; - - - - class WELOPEN : public ParserKeyword { - public: - WELOPEN(); - static const std::string keywordName; - - class WELL { - public: - static const std::string itemName; - }; - - class STATUS { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class I { - public: - static const std::string itemName; - }; - - class J { - public: - static const std::string itemName; - }; - - class K { - public: - static const std::string itemName; - }; - - class C1 { - public: - static const std::string itemName; - }; - - class C2 { - public: - static const std::string itemName; - }; - }; - - - - class WELSEGS : public ParserKeyword { - public: - WELSEGS(); - static const std::string keywordName; - - class WELL { - public: - static const std::string itemName; - }; - - class DEPTH { - public: - static const std::string itemName; - }; - - class LENGTH { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class WELLBORE_VOLUME { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class INFO_TYPE { - public: - static const std::string itemName; - }; - - class PRESSURE_COMPONENTS { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class FLOW_MODEL { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class TOP_X { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class TOP_Y { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class SEGMENT1 { - public: - static const std::string itemName; - }; - - class SEGMENT2 { - public: - static const std::string itemName; - }; - - class BRANCH { - public: - static const std::string itemName; - }; - - class JOIN_SEGMENT { - public: - static const std::string itemName; - }; - - class SEGMENT_LENGTH { - public: - static const std::string itemName; - }; - - class DEPTH_CHANGE { - public: - static const std::string itemName; - }; - - class DIAMETER { - public: - static const std::string itemName; - }; - - class ROUGHNESS { - public: - static const std::string itemName; - }; - - class AREA { - public: - static const std::string itemName; - }; - - class VOLUME { - public: - static const std::string itemName; - }; - - class LENGTH_X { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class LENGTH_Y { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class WELSPECS : public ParserKeyword { - public: - WELSPECS(); - static const std::string keywordName; - - class WELL { - public: - static const std::string itemName; - }; - - class GROUP { - public: - static const std::string itemName; - }; - - class HEAD_I { - public: - static const std::string itemName; - }; - - class HEAD_J { - public: - static const std::string itemName; - }; - - class REF_DEPTH { - public: - static const std::string itemName; - }; - - class PHASE { - public: - static const std::string itemName; - }; - - class D_RADIUS { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class INFLOW_EQ { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class AUTO_SHUTIN { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class CROSSFLOW { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class P_TABLE { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class DENSITY_CALC { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class FIP_REGION { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class FRONTSIM1 { - public: - static const std::string itemName; - }; - - class FRONTSIM2 { - public: - static const std::string itemName; - }; - - class well_model { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class POLYMER_TABLE { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - - class WELTARG : public ParserKeyword { - public: - WELTARG(); - static const std::string keywordName; - - class WELL { - public: - static const std::string itemName; - }; - - class CMODE { - public: - static const std::string itemName; - }; - - class NEW_VALUE { - public: - static const std::string itemName; - }; - }; - - - - class WGRUPCON : public ParserKeyword { - public: - WGRUPCON(); - static const std::string keywordName; - - class WELL { - public: - static const std::string itemName; - }; - - class GROUP_CONTROLLED { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class GUIDE_RATE { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class PHASE { - public: - static const std::string itemName; - }; - - class SCALING_FACTOR { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class WHISTCTL : public ParserKeyword { - public: - WHISTCTL(); - static const std::string keywordName; - - class CMODE { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class BPH_TERMINATE { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class WLIFT : public ParserKeyword { - public: - WLIFT(); - static const std::string keywordName; - - class WELL { - public: - static const std::string itemName; - }; - - class TRIGGER_LIMIT { - public: - static const std::string itemName; - }; - - class TRIGGRE_PHASE { - public: - static const std::string itemName; - }; - - class NEW_VFP_TABLE { - public: - static const std::string itemName; - }; - - class NEW_ALQ_VALUE { - public: - static const std::string itemName; - }; - - class NEW_WEFAC { - public: - static const std::string itemName; - }; - - class WWCT_LIMIT { - public: - static const std::string itemName; - }; - - class NEW_THP_LIMIT { - public: - static const std::string itemName; - }; - - class WGOR_LIMIT { - public: - static const std::string itemName; - }; - - class ALQ_SHIFT { - public: - static const std::string itemName; - }; - - class THP_SHIFT { - public: - static const std::string itemName; - }; - }; - - - - class WPAVE : public ParserKeyword { - public: - WPAVE(); - static const std::string keywordName; - - class WEIGTH_FACTOR1 { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class WEIGTH_FACTOR2 { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class DEPTH_CORRECTION { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class CONNECTION { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class WPIMULT : public ParserKeyword { - public: - WPIMULT(); - static const std::string keywordName; - - class WELL { - public: - static const std::string itemName; - }; - - class WELLPI { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class I { - public: - static const std::string itemName; - }; - - class J { - public: - static const std::string itemName; - }; - - class K { - public: - static const std::string itemName; - }; - - class FIRST { - public: - static const std::string itemName; - }; - - class LAST { - public: - static const std::string itemName; - }; - }; - - - - class WPITAB : public ParserKeyword { - public: - WPITAB(); - static const std::string keywordName; - - class WELL { - public: - static const std::string itemName; - }; - - class PI { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class WPOLYMER : public ParserKeyword { - public: - WPOLYMER(); - static const std::string keywordName; - - class WELL { - public: - static const std::string itemName; - }; - - class POLYMER_CONCENTRATION { - public: - static const std::string itemName; - }; - - class SALT_CONCENTRATION { - public: - static const std::string itemName; - }; - - class GROUP_POLYMER_CONCENTRATION { - public: - static const std::string itemName; - }; - - class GROUP_SALT_CONCENTRATION { - public: - static const std::string itemName; - }; - }; - - - - class WRFT : public ParserKeyword { - public: - WRFT(); - static const std::string keywordName; - - class WELL { - public: - static const std::string itemName; - }; - }; - - - - class WRFTPLT : public ParserKeyword { - public: - WRFTPLT(); - static const std::string keywordName; - - class WELL { - public: - static const std::string itemName; - }; - - class OUTPUT_RFT { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class OUTPUT_PLT { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class OUTPUT_SEGMENT { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class WSEGDIMS : public ParserKeyword { - public: - WSEGDIMS(); - static const std::string keywordName; - - class NSWLMX { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NSEGMX { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NLBRMX { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class NCRDMX { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - - class WSOLVENT : public ParserKeyword { - public: - WSOLVENT(); - static const std::string keywordName; - - class WELL { - public: - static const std::string itemName; - }; - - class SOLVENT_FRACTION { - public: - static const std::string itemName; - }; - }; - - - - class WTEMP : public ParserKeyword { - public: - WTEMP(); - static const std::string keywordName; - - class WELL { - public: - static const std::string itemName; - }; - - class TEMP { - public: - static const std::string itemName; - }; - }; - - - - class WTEST : public ParserKeyword { - public: - WTEST(); - static const std::string keywordName; - - class well { - public: - static const std::string itemName; - }; - - class interval { - public: - static const std::string itemName; - }; - - class reason { - public: - static const std::string itemName; - }; - - class TEST_NUM { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class START_TIME { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class WTRACER : public ParserKeyword { - public: - WTRACER(); - static const std::string keywordName; - - class WELL { - public: - static const std::string itemName; - }; - - class TRACER { - public: - static const std::string itemName; - }; - - class CONCENTRATION { - public: - static const std::string itemName; - }; - - class CUM_TRACER_FACTOR { - public: - static const std::string itemName; - }; - - class PRODUCTION_GROUP { - public: - static const std::string itemName; - }; - }; - - - -} -} -#endif diff --git a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/Z.hpp b/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/Z.hpp deleted file mode 100644 index 146ee0457f..0000000000 --- a/ThirdParty/custom-opm-parser/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords/Z.hpp +++ /dev/null @@ -1,87 +0,0 @@ -#ifndef PARSER_KEYWORDS_Z_HPP -#define PARSER_KEYWORDS_Z_HPP -#include -namespace Opm { -namespace ParserKeywords { - - class ZCORN : public ParserKeyword { - public: - ZCORN(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class ZFACT1 : public ParserKeyword { - public: - ZFACT1(); - static const std::string keywordName; - - class Z0 { - public: - static const std::string itemName; - }; - }; - - - - class ZFACT1S : public ParserKeyword { - public: - ZFACT1S(); - static const std::string keywordName; - - class Z0 { - public: - static const std::string itemName; - }; - }; - - - - class ZFACTOR : public ParserKeyword { - public: - ZFACTOR(); - static const std::string keywordName; - - class Z0 { - public: - static const std::string itemName; - }; - }; - - - - class ZFACTORS : public ParserKeyword { - public: - ZFACTORS(); - static const std::string keywordName; - - class Z0 { - public: - static const std::string itemName; - }; - }; - - - - class ZIPPY2 : public ParserKeyword { - public: - ZIPPY2(); - static const std::string keywordName; - - class SETTINGS { - public: - static const std::string itemName; - }; - }; - - - -} -} -#endif diff --git a/ThirdParty/custom-opm-parser/generated-source/inlineKeywordTest.cpp b/ThirdParty/custom-opm-parser/generated-source/inlineKeywordTest.cpp deleted file mode 100644 index a68fc9eedd..0000000000 --- a/ThirdParty/custom-opm-parser/generated-source/inlineKeywordTest.cpp +++ /dev/null @@ -1,6570 +0,0 @@ -#define BOOST_TEST_MODULE ParserRecordTests -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -using namespace Opm; -std::shared_ptr unitSystem( UnitSystem::newMETRIC() ); -BOOST_AUTO_TEST_CASE(TESTACTDIMSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/ACTDIMS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ACTDIMS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTACTNUMKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/ACTNUM"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ACTNUM inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTADDKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/ADD"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ADD inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTADDREGKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/ADDREG"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ADDREG inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTADSALNODKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/ADSALNOD"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ADSALNOD inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTALLKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/ALL"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ALL inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTAPIKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/API"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::API inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTAQUANCONKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/AQUANCON"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::AQUANCON inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTAQUCONKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/AQUCON"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::AQUCON inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTAQUDIMSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/AQUDIMS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::AQUDIMS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTAQUFETPKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/AQUFETP"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::AQUFETP inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTAQUIFER_PROBE_ANALYTICKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/AQUIFER_PROBE_ANALYTIC"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::AQUIFER_PROBE_ANALYTIC inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTAQUNUMKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/AQUNUM"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::AQUNUM inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTBLOCK_PROBEKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/B/BLOCK_PROBE"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::BLOCK_PROBE inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTBLOCK_PROBE300Keyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/001_Eclipse300/B/BLOCK_PROBE300"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::BLOCK_PROBE300 inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTBOXKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/B/BOX"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::BOX inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTCOMPDATKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/COMPDAT"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::COMPDAT inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTCOMPLUMPKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/COMPLUMP"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::COMPLUMP inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTCOMPORDKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/COMPORD"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::COMPORD inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTCOMPSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/001_Eclipse300/C/COMPS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::COMPS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTCOMPSEGSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/COMPSEGS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::COMPSEGS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTCONNECTION_PROBEKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/CONNECTION_PROBE"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::CONNECTION_PROBE inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTCOORDKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/COORD"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::COORD inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTCOPYKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/COPY"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::COPY inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTCOPYREGKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/COPYREG"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::COPYREG inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTCPRKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/CPR"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::CPR inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTCREFKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/001_Eclipse300/C/CREF"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::CREF inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTCREFSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/001_Eclipse300/C/CREFS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::CREFS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTDATEKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DATE"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::DATE inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTDATESKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DATES"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::DATES inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTDATUMKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DATUM"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::DATUM inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTDENSITYKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DENSITY"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::DENSITY inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTDEPTHKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DEPTH"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::DEPTH inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTDEPTHZKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DEPTHZ"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::DEPTHZ inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTDIMENSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DIMENS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::DIMENS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTDISGASKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DISGAS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::DISGAS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTDREFKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/001_Eclipse300/D/DREF"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::DREF inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTDREFSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/001_Eclipse300/D/DREFS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::DREFS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTDRSDTKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DRSDT"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::DRSDT inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTDRVDTKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DRVDT"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::DRVDT inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTDUMPFLUXKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DUMPFLUX"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::DUMPFLUX inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTDXKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DX"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::DX inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTDXVKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DXV"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::DXV inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTDYKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DY"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::DY inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTDYVKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DYV"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::DYV inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTDZKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DZ"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::DZ inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTDZVKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/001_Eclipse300/D/DZV"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::DZV inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTECHOKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ECHO"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ECHO inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTEDITKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EDIT"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::EDIT inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTEDITNNCKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EDITNNC"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::EDITNNC inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTEHYSTRKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EHYSTR"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::EHYSTR inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTENDKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/END"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::END inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTENDBOXKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENDBOX"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ENDBOX inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTENDINCKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENDINC"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ENDINC inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTENDNUMKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENDNUM"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ENDNUM inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTENDPOINT_SPECIFIERSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENDPOINT_SPECIFIERS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ENDPOINT_SPECIFIERS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTENDSCALEKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENDSCALE"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ENDSCALE inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTENDSKIPKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENDSKIP"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ENDSKIP inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTENKRVDKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENKRVD"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ENKRVD inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTENPTVDKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENPTVD"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ENPTVD inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTEQLDIMSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EQLDIMS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::EQLDIMS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTEQLNUMKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EQLNUM"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::EQLNUM inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTEQLOPTSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EQLOPTS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::EQLOPTS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTEQUALREGKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EQUALREG"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::EQUALREG inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTEQUALSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EQUALS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::EQUALS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTEQUILKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EQUIL"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::EQUIL inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTEXCELKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EXCEL"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::EXCEL inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTEXTRAPMSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EXTRAPMS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::EXTRAPMS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTFAULTDIMKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FAULTDIM"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::FAULTDIM inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTFAULTSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FAULTS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::FAULTS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTFIELDKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FIELD"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::FIELD inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTFIELD_PROBEKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FIELD_PROBE"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::FIELD_PROBE inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTFILLEPSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FILLEPS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::FILLEPS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTFIPNUMKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FIPNUM"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::FIPNUM inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTFLUXNUMKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FLUXNUM"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::FLUXNUM inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTFMTINKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FMTIN"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::FMTIN inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTFMTOUTKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FMTOUT"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::FMTOUT inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTFULLIMPKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FULLIMP"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::FULLIMP inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTGASKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GAS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::GAS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTGASVISCTKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/001_Eclipse300/G/GASVISCT"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::GASVISCT inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTGCOMPIDXKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/900_OPM/G/GCOMPIDX"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::GCOMPIDX inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTGCONINJEKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GCONINJE"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::GCONINJE inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTGCONPRODKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GCONPROD"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::GCONPROD inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTGDORIENTKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GDORIENT"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::GDORIENT inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTGECONKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GECON"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::GECON inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTGEFACKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GEFAC"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::GEFAC inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTGRAVITYKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GRAVITY"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::GRAVITY inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTGRIDKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GRID"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::GRID inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTGRIDFILEKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GRIDFILE"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::GRIDFILE inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTGRIDOPTSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GRIDOPTS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::GRIDOPTS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTGRIDUNITKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GRIDUNIT"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::GRIDUNIT inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTGROUP_PROBEKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GROUP_PROBE"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::GROUP_PROBE inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTGRUPNETKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GRUPNET"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::GRUPNET inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTGRUPTREEKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GRUPTREE"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::GRUPTREE inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTIMBNUMKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/IMBNUM"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::IMBNUM inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTIMKRVDKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/IMKRVD"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::IMKRVD inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTIMPESKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/IMPES"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::IMPES inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTIMPTVDKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/IMPTVD"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::IMPTVD inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTINCLUDEKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/INCLUDE"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::INCLUDE inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTINITKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/INIT"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::INIT inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTIPCGKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/IPCG"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::IPCG inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTIPCWKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/IPCW"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::IPCW inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTISGCRKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISGCR"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ISGCR inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTISGLKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISGL"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ISGL inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTISGUKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISGU"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ISGU inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTISOGCRKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISOGCR"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ISOGCR inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTISOWCRKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISOWCR"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ISOWCR inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTISWCRKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISWCR"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ISWCR inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTISWLKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISWL"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ISWL inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTISWUKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISWU"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ISWU inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTJFUNCKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/J/JFUNC"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::JFUNC inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTMAPAXESKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MAPAXES"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::MAPAXES inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTMAPUNITSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MAPUNITS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::MAPUNITS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTMAXVALUEKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MAXVALUE"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::MAXVALUE inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTMEMORYKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MEMORY"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::MEMORY inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTMESSAGESKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MESSAGES"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::MESSAGES inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTMETRICKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/METRIC"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::METRIC inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTMINPVKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MINPV"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::MINPV inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTMINPVFILKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/900_OPM/M/MINPVFIL"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::MINPVFIL inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTMINVALUEKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MINVALUE"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::MINVALUE inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTMISCKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MISC"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::MISC inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTMISCIBLEKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MISCIBLE"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::MISCIBLE inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTMISCNUMKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MISCNUM"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::MISCNUM inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTMONITORKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MONITOR"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::MONITOR inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTMSFNKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MSFN"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::MSFN inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTMSGFILEKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MSGFILE"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::MSGFILE inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTMULTFLTKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULTFLT"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::MULTFLT inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTMULTIPLYKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULTIPLY"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::MULTIPLY inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTMULTIREGKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULTIREG"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::MULTIREG inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTMULTNUMKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULTNUM"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::MULTNUM inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTMULTPVKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULTPV"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::MULTPV inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTMULTREGPKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULTREGP"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::MULTREGP inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTMULTREGTKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULTREGT"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::MULTREGT inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTMULT_XYZKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULT_XYZ"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::MULT_XYZ inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTMWKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/001_Eclipse300/M/MW"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::MW inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTMWSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/001_Eclipse300/M/MWS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::MWS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTNETBALANKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NETBALAN"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::NETBALAN inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTNEWTRANKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NEWTRAN"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::NEWTRAN inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTNEXTSTEPKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NEXTSTEP"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::NEXTSTEP inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTNNCKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NNC"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::NNC inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTNOCASCKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NOCASC"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::NOCASC inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTNOECHOKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NOECHO"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::NOECHO inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTNOGGFKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NOGGF"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::NOGGF inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTNOGRAVKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/002_Frontsim/N/NOGRAV"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::NOGRAV inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTNOINSPECKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NOINSPEC"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::NOINSPEC inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTNOMONITOKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NOMONITO"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::NOMONITO inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTNONNCKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NONNC"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::NONNC inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTNORSSPECKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NORSSPEC"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::NORSSPEC inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTNOSIMKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NOSIM"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::NOSIM inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTNSTACKKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NSTACK"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::NSTACK inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTNTGKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NTG"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::NTG inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTNUMRESKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NUMRES"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::NUMRES inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTNUPCOLKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NUPCOL"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::NUPCOL inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTOCOMPIDXKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/900_OPM/O/OCOMPIDX"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::OCOMPIDX inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTOILKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/O/OIL"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::OIL inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTOILCOMPRKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/001_Eclipse300/O/OILCOMPR"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::OILCOMPR inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTOILMWKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/001_Eclipse300/O/OILMW"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::OILMW inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTOILVISCTKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/O/OILVISCT"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::OILVISCT inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTOILVTIMKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/001_Eclipse300/O/OILVTIM"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::OILVTIM inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTOLDTRANKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/O/OLDTRAN"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::OLDTRAN inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTOPERATEKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/O/OPERATE"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::OPERATE inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTOPTIONSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/O/OPTIONS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::OPTIONS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPARALLELKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PARALLEL"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PARALLEL inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPATHSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PATHS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PATHS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPBVDKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PBVD"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PBVD inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPCGKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PCG"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PCG inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPERFORMANCE_PROBEKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PERFORMANCE_PROBE"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PERFORMANCE_PROBE inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPERMXKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PERMX"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PERMX inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPERMXYKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PERMXY"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PERMXY inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPERMYKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PERMY"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PERMY inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPERMYZKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PERMYZ"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PERMYZ inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPERMZKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PERMZ"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PERMZ inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPERMZXKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PERMZX"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PERMZX inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPIMTDIMSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PIMTDIMS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PIMTDIMS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPIMULTABKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PIMULTAB"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PIMULTAB inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPINCHKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PINCH"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PINCH inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPLMIXPARKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLMIXPAR"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PLMIXPAR inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPLYADSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYADS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PLYADS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPLYADSSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYADSS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PLYADSS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPLYDHFLFKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYDHFLF"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PLYDHFLF inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPLYMAXKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYMAX"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PLYMAX inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPLYROCKKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYROCK"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PLYROCK inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPLYSHEARKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYSHEAR"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PLYSHEAR inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPLYSHLOGKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYSHLOG"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PLYSHLOG inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPLYVISCKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYVISC"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PLYVISC inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPMISCKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PMISC"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PMISC inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPOLYMERKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/POLYMER"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::POLYMER inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPOROKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PORO"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PORO inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPORVKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PORV"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PORV inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPREFKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/001_Eclipse300/P/PREF"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PREF inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPREFSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/001_Eclipse300/P/PREFS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PREFS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPRESSUREKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PRESSURE"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PRESSURE inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPROPSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PROPS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PROPS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPVCDOKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVCDO"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PVCDO inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPVDGKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVDG"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PVDG inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPVDOKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVDO"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PVDO inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPVDSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVDS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PVDS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPVTGKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVTG"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PVTG inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPVTNUMKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVTNUM"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PVTNUM inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPVTOKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVTO"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PVTO inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTPVTWKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVTW"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::PVTW inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTRADFIN4Keyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RADFIN4"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::RADFIN4 inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTREGDIMSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/REGDIMS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::REGDIMS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTREGIONSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/REGIONS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::REGIONS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTREGION_PROBEKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/REGION_PROBE"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::REGION_PROBE inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTRESTARTKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RESTART"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::RESTART inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTRKTRMDIRKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RKTRMDIR"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::RKTRMDIR inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTROCKKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/ROCK"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ROCK inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTROCKCOMPKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/ROCKCOMP"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ROCKCOMP inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTROCKOPTSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/ROCKOPTS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ROCKOPTS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTROCKTABKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/ROCKTAB"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ROCKTAB inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTRPTGRIDKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTGRID"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::RPTGRID inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTRPTONLYKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTONLY"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::RPTONLY inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTRPTONLYOKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTONLYO"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::RPTONLYO inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTRPTPROPSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTPROPS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::RPTPROPS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTRPTREGSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTREGS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::RPTREGS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTRPTRSTKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTRST"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::RPTRST inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTRPTRUNSPKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTRUNSP"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::RPTRUNSP inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTRPTSCHEDKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTSCHED"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::RPTSCHED inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTRPTSOLKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTSOL"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::RPTSOL inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTRSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::RS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTRSVDKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RSVD"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::RSVD inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTRTEMPVDKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RTEMPVD"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::RTEMPVD inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTRUNSPECKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RUNSPEC"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::RUNSPEC inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTRUNSUMKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RUNSUM"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::RUNSUM inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTRVKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RV"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::RV inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTRVVDKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RVVD"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::RVVD inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSATNUMKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SATNUM"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SATNUM inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSATOPTSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SATOPTS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SATOPTS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSAVEKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SAVE"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SAVE inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSCALECRSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SCALECRS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SCALECRS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSCHEDULEKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SCHEDULE"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SCHEDULE inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSDENSITYKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SDENSITY"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SDENSITY inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSEPARATEKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SEPARATE"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SEPARATE inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSGASKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGAS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SGAS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSGCRKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGCR"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SGCR inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSGCWMISKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGCWMIS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SGCWMIS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSGFNKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGFN"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SGFN inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSGLKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGL"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SGL inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSGOFKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGOF"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SGOF inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSGUKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGU"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SGU inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSGWFNKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGWFN"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SGWFN inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSHRATEKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SHRATE"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SHRATE inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSKIPKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SKIP"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SKIP inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSKIP100Keyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SKIP100"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SKIP100 inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSKIP300Keyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SKIP300"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SKIP300 inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSKIPRESTKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SKIPREST"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SKIPREST inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSLGOFKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SLGOF"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SLGOF inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSMRYDIMSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SMRYDIMS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SMRYDIMS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSOF2Keyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SOF2"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SOF2 inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSOF3Keyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SOF3"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SOF3 inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSOGCRKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SOGCR"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SOGCR inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSOILKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SOIL"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SOIL inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSOLUTIONKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SOLUTION"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SOLUTION inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSOLVENTKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SOLVENT"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SOLVENT inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSORWMISKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SORWMIS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SORWMIS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSOWCRKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SOWCR"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SOWCR inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSPECGRIDKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SPECGRID"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SPECGRID inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSPECHEATKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SPECHEAT"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SPECHEAT inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSPECROCKKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SPECROCK"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SPECROCK inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSSFNKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SSFN"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SSFN inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSSOLKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SSOL"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SSOL inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSTARTKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/START"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::START inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSTCONDKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/001_Eclipse300/S/STCOND"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::STCOND inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSTONE1Keyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/STONE1"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::STONE1 inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSTONE1EXKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/STONE1EX"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::STONE1EX inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSUMMARYKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SUMMARY"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SUMMARY inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSUMTHINKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SUMTHIN"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SUMTHIN inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSWATKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SWAT"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SWAT inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSWATINITKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SWATINIT"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SWATINIT inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSWCRKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SWCR"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SWCR inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSWFNKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SWFN"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SWFN inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSWLKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SWL"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SWL inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSWOFKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SWOF"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SWOF inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTSWUKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SWU"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::SWU inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTTABDIMSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TABDIMS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::TABDIMS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTTEMPKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TEMP"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::TEMP inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTTEMPIKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/001_Eclipse300/T/TEMPI"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::TEMPI inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTTEMPVDKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/001_Eclipse300/T/TEMPVD"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::TEMPVD inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTTHCONRKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/THCONR"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::THCONR inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTTHERMALKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/001_Eclipse300/T/THERMAL"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::THERMAL inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTTHERMEX1Keyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/001_Eclipse300/T/THERMEX1"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::THERMEX1 inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTTHPRESKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/THPRES"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::THPRES inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTTITLEKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TITLE"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::TITLE inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTTLMIXPARKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TLMIXPAR"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::TLMIXPAR inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTTLPMIXPAKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/900_OPM/T/TLPMIXPA"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::TLPMIXPA inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTTNUMKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TNUM"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::TNUM inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTTOPSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TOPS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::TOPS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTTRACERKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TRACER"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::TRACER inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTTRACERSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TRACERS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::TRACERS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTTRANXKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TRANX"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::TRANX inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTTRANYKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TRANY"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::TRANY inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTTRANZKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TRANZ"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::TRANZ inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTTREFKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/001_Eclipse300/T/TREF"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::TREF inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTTREFSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/001_Eclipse300/T/TREFS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::TREFS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTTSTEPKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TSTEP"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::TSTEP inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTTUNINGKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TUNING"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::TUNING inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTTVDPKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TVDP"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::TVDP inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTUDADIMSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/U/UDADIMS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::UDADIMS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTUDQDIMSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/U/UDQDIMS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::UDQDIMS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTUNIFINKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/U/UNIFIN"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::UNIFIN inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTUNIFOUTKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/U/UNIFOUT"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::UNIFOUT inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTVAPOILKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/V/VAPOIL"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::VAPOIL inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTVAPPARSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/V/VAPPARS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::VAPPARS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTVFPIDIMSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/V/VFPIDIMS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::VFPIDIMS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTVFPINJKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/V/VFPINJ"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::VFPINJ inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTVFPPDIMSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/V/VFPPDIMS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::VFPPDIMS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTVFPPRODKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/V/VFPPROD"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::VFPPROD inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTVISCREFKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/V/VISCREF"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::VISCREF inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWATDENTKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/001_Eclipse300/W/WATDENT"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WATDENT inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWATERKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WATER"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WATER inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWATVISCTKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WATVISCT"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WATVISCT inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWCONHISTKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WCONHIST"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WCONHIST inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWCONINJKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WCONINJ"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WCONINJ inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWCONINJEKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WCONINJE"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WCONINJE inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWCONINJHKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WCONINJH"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WCONINJH inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWCONPRODKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WCONPROD"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WCONPROD inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWDRILTIMKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WDRILTIM"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WDRILTIM inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWECONKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WECON"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WECON inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWELLDIMSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WELLDIMS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WELLDIMS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWELL_PROBEKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WELL_PROBE"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WELL_PROBE inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWELOPENKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WELOPEN"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WELOPEN inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWELSEGSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WELSEGS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WELSEGS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWELSPECSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WELSPECS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WELSPECS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWELTARGKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WELTARG"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WELTARG inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWGRUPCONKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WGRUPCON"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WGRUPCON inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWHISTCTLKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WHISTCTL"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WHISTCTL inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWLIFTKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WLIFT"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WLIFT inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWPAVEKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WPAVE"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WPAVE inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWPIMULTKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WPIMULT"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WPIMULT inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWPITABKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WPITAB"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WPITAB inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWPOLYMERKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WPOLYMER"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WPOLYMER inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWRFTKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WRFT"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WRFT inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWRFTPLTKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WRFTPLT"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WRFTPLT inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWSEGDIMSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WSEGDIMS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WSEGDIMS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWSOLVENTKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WSOLVENT"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WSOLVENT inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWTEMPKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WTEMP"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WTEMP inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWTESTKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WTEST"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WTEST inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTWTRACERKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WTRACER"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::WTRACER inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTZCORNKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/Z/ZCORN"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ZCORN inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTZFACT1Keyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/001_Eclipse300/Z/ZFACT1"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ZFACT1 inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTZFACT1SKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/001_Eclipse300/Z/ZFACT1S"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ZFACT1S inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTZFACTORKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/001_Eclipse300/Z/ZFACTOR"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ZFACTOR inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTZFACTORSKeyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/001_Eclipse300/Z/ZFACTORS"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ZFACTORS inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - -BOOST_AUTO_TEST_CASE(TESTZIPPY2Keyword) { - std::string jsonFile = "E:/Jenkins/jobs/opm-parser-create-keywords/workspace/opm-parser/opm/parser/share/keywords/000_Eclipse100/Z/ZIPPY2"; - boost::filesystem::path jsonPath( jsonFile ); - Json::JsonObject jsonConfig( jsonPath ); - ParserKeyword jsonKeyword(jsonConfig); - ParserKeywords::ZIPPY2 inlineKeyword; - BOOST_CHECK( jsonKeyword.equal( inlineKeyword )); - if (jsonKeyword.hasDimension()) { - ParserRecordConstPtr parserRecord = jsonKeyword.getRecord(0); - for (size_t i=0; i < parserRecord->size(); i++){ - ParserItemConstPtr item = parserRecord->get( i ); - for (size_t j=0; j < item->numDimensions(); j++) { - std::string dimString = item->getDimension(j); - BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString )); - } - } - } -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/.gitignore b/ThirdParty/custom-opm-parser/opm-parser/.gitignore deleted file mode 100644 index bd1e923eb6..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -*~ -*.user -.dir-locals.el -gmon.out -log.log -build -install -.cproject -.project -/testdata/statoil -.idea -/Debug/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/.travis.yml b/ThirdParty/custom-opm-parser/opm-parser/.travis.yml deleted file mode 100644 index 693cc749a1..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ -language: cpp - -compiler: - - gcc - -addons: - apt: - sources: - - boost-latest - - ubuntu-toolchain-r-test - packages: - - libboost1.55-all-dev - - gcc-4.8 - - g++-4.8 - - gfortran-4.8 - - liblapack-dev - - libgmp3-dev - - libsuitesparse-dev - - libeigen3-dev - -before_script: - - export CXX="g++-4.8" CC="gcc-4.8" FC="gfortran-4.8" - - cd .. - - git clone https://github.com/OPM/opm-common.git - - opm-common/travis/clone-opm.sh opm-parser - - opm-common/travis/build-prereqs.sh - - -script: opm-common/travis/build-and-test.sh opm-parser - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/CMakeLists.txt deleted file mode 100644 index cbe48e383b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/CMakeLists.txt +++ /dev/null @@ -1,184 +0,0 @@ -cmake_minimum_required (VERSION 2.6) -project (OPMParser CXX) -enable_testing() -enable_language(C) -include(CTest) -include(TestCXXAcceptsFlag) - -if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) - message(STATUS "No build type specified - defaulting to 'Debug'.") - set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose build type." FORCE) - set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Release" "Debug" "RelWithDebInfo" "MinSizeRel") -endif() - -# project information is in dune.module. Read this file and set variables. -# we cannot generate dune.module since it is read by dunecontrol before -# the build starts, so it makes sense to keep the data there then. -set( OPM_COMMON_ROOT "" CACHE PATH "Root directory containing OPM related cmake modules") -option(SIBLING_SEARCH "Search for other modules in sibling directories?" ON) -option(BUILD_TESTING "Build test applications by default?" ON) - -if(NOT OPM_COMMON_ROOT) - find_package(opm-common QUIET) -endif() - -#----------------------------------------------------------------- -option (ENABLE_PYTHON "Enable simple python wappers" OFF) -if (ENABLE_PYTHON) - if (NOT BUILD_SHARED_LIBS) - set( BUILD_SHARED_LIBS ON) - message( WARNING "When ENABLE_PYTHON is ON we must use shared libraries - forcing BUILD_SHARED_LIBS to ON") - endif() -endif() -#----------------------------------------------------------------- - - -if (NOT opm-common_FOUND) - unset(opm-common_FOUND) - - if (NOT OPM_COMMON_ROOT AND SIBLING_SEARCH) - set(OPM_COMMON_ROOT ${PROJECT_SOURCE_DIR}/../opm-common) - endif() - if (OPM_COMMON_ROOT) - list( APPEND CMAKE_MODULE_PATH "${OPM_COMMON_ROOT}/cmake/Modules") - include (OpmInit OPTIONAL RESULT_VARIABLE OPM_INIT) - set( OPM_MACROS_ROOT ${OPM_COMMON_ROOT} ) - endif() - - if (NOT OPM_INIT) - message( "" ) - message( " /---------------------------------------------------------------------------------\\") - message( " | Could not locate the opm build macros. The opm build macros |") - message( " | are in a separate repository - instructions to proceed: |") - message( " | |") - message( " | 1. Clone the repository: git clone git@github.com:OPM/opm-common.git |") - message( " | |") - message( " | 2. Run cmake in the current project with -DOPM_COMMON_ROOT=/opm-common |") - message( " | |") - message( " \\---------------------------------------------------------------------------------/") - message( "" ) - message( FATAL_ERROR "Could not find OPM Macros") - endif() - -else() - include(OpmInit) -endif() - -include(UseMultiArch) -include(OpmSatellites) -include(UseWarnings) -include(cmake/build_check.cmake) - -#----------------------------------------------------------------- -# This is modified copy & paste from the OpmDefaults.cmake module. -option (USE_RUNPATH "Embed original dependency paths in installed library" ON) -if (USE_RUNPATH) - check_cxx_accepts_flag("-Wl,--enable-new-dtags" HAVE_RUNPATH) - if (HAVE_RUNPATH) - SET( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--enable-new-dtags") - set (CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") - set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) - endif() -endif (USE_RUNPATH) - -if (MSVC) - add_definitions( "/W3 /D_CRT_SECURE_NO_WARNINGS /wd4996 /wd4244 /wd4267") - set(CMAKE_CXX_FLAGS "/MP ${CMAKE_CXX_FLAGS}") -else() - # The cmake macros are expanded *after* our flags so that options can be - # overriden via -DCMAKE_FLAGS from the command line or ccmake - SET( CMAKE_CXX_FLAGS "-pipe -std=c++0x ${CMAKE_CXX_FLAGS}") - SET( CMAKE_CXX_FLAGS_DEBUG "-pedantic -Wall -Wextra -Wformat-nonliteral -Wcast-align -Wpointer-arith -Wmissing-declarations -Wcast-qual -Wshadow -Wwrite-strings -Wchar-subscripts -Wredundant-decls ${CMAKE_CXX_FLAGS_DEBUG}") - SET( CMAKE_CXX_FLAGS_DEBUG "-O0 -DDEBUG -ggdb3 ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} ") - SET( CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG -mtune=native ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}") -endif(MSVC) - -SET( CMAKE_C_FLAGS "-pipe -Wall -Wno-unknown-pragmas -std=c99 ${CMAKE_C_FLAGS}") -SET( CMAKE_C_FLAGS_DEBUG "-O0 -DDEBUG -ggdb3 ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_DEBUG} ") -SET( CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG -mtune=native ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}") - - -if (BOOST_ROOT AND NOT DEFINED Boost_NO_SYSTEM_PATHS) - set (Boost_NO_SYSTEM_PATHS TRUE) -endif (BOOST_ROOT AND NOT DEFINED Boost_NO_SYSTEM_PATHS) - -# if we are building shared libraries ourselves, then don't include Boost in them -if (BUILD_SHARED_LIBS) - set(Boost_USE_STATIC_LIBS OFF) -elseif (DEFINED BUILD_SHARED_LIBS) - set(Boost_USE_STATIC_LIBS ON) -endif () -set(Boost_USE_MULTITHREADED ON) -set(Boost_USE_STATIC_RUNTIME OFF) - - -add_definitions(-DOPM_PARSER_DECK_API=1) -# Requires BOOST filesystem version 3, thus 1.44 is necessary. -add_definitions(-DBOOST_FILESYSTEM_VERSION=3) -find_package(Boost 1.44.0 COMPONENTS filesystem date_time system unit_test_framework regex REQUIRED) -include_directories(SYSTEM ${Boost_INCLUDE_DIRS}) - -include_directories(BEFORE ${PROJECT_SOURCE_DIR}) -include_directories(${PROJECT_BINARY_DIR}) - -# if we are using dynamic boost, the header file must generate a main() function -if (NOT Boost_USE_STATIC_LIBS) - add_definitions(-DBOOST_TEST_DYN_LINK) -endif () - -find_package(CXX11Features) -if (HAVE_REGEX) - add_definitions(-DHAVE_REGEX=${HAVE_REGEX}) -endif() - -set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}) -find_package(cjson) -if (HAVE_CJSON) - include_directories( ${CJSON_INCLUDE_DIR} ) -else() - include_directories( "${CMAKE_CURRENT_SOURCE_DIR}/opm/json" ) -endif() - -include( cmake/Modules/CheckCaseSensitiveFileSystem.cmake ) -add_definitions("-DHAVE_CASE_SENSITIVE_FILESYSTEM=${HAVE_CASE_SENSITIVE_FILESYSTEM}") - -include( Findopm-data ) - -find_package(ERT) -include_directories( ${ERT_INCLUDE_DIRS} ) - -set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) -set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/bin) - -add_subdirectory(opm/json) -add_subdirectory(opm/parser) - -add_custom_target(check ${CMAKE_CTEST_COMMAND} WORKING_DIRECTORY ${PROJECT_BINARY_DIR}) -add_dependencies(check test-suite) - -# use this target to check local git commits -add_custom_target(check-commits - COMMAND ${CMAKE_COMMAND} - -DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR} - -DCMAKE_BINARY_DIR=${CMAKE_BINARY_DIR} - -P ${OPM_MACROS_ROOT}/cmake/Scripts/CheckCommits.cmake) - -# This commands should be run unconditionally; i.e. the testdata -# directory should be copied to the EXECUTABLE_OUTPUT_PATH for each -# invocation of cmake. This dependencies are currently not correctly -# handled. - -file(COPY ${PROJECT_SOURCE_DIR}/testdata DESTINATION ${EXECUTABLE_OUTPUT_PATH}) - -install(FILES dune.module DESTINATION lib/dunecontrol/opm-parser) - -include(OpmProject) -include(ConfigVars) -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) -set(opm-parser_NAME opm-parser) -set(opm-parser_LIBRARIES opmparser opmjson) -if(NOT BUILD_SHARED_LIBS) - list(APPEND opm-parser_LIBRARIES cjson) -endif() -set(opm-parser_TARGET opmparser) -opm_cmake_config(opm-parser) diff --git a/ThirdParty/custom-opm-parser/opm-parser/README.md b/ThirdParty/custom-opm-parser/opm-parser/README.md deleted file mode 100644 index 68a0ea1123..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# opm-parser ![alt text](https://travis-ci.org/OPM/opm-parser.svg?branch=master "TravisCI Build Status") - -### eclipse - -A small library for parsing the ECLIPSE datafile. - -Dependencies: -- boost version 1.45 or newer. If cmake does not find it, specify the - boost root when running cmake, like this: - `cmake -DBOOST_ROOT=/path/to/boost path/to/project` diff --git a/ThirdParty/custom-opm-parser/opm-parser/appveyor.yml b/ThirdParty/custom-opm-parser/opm-parser/appveyor.yml deleted file mode 100644 index 4cbf25f6ad..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/appveyor.yml +++ /dev/null @@ -1,36 +0,0 @@ -version: 1.0.{build} -clone_depth: 1 - -configuration: - - Debug - - Release - -os: Visual Studio 2015 -image: Visual Studio 2015 - -platform: - - x64 - -environment: - BOOST_ROOT: C:\Libraries\boost_1_59_0\boost - BOOST_INCLUDEDIR: C:\Libraries\boost_1_59_0 - BOOST_LIBRARYDIR: C:\Libraries\boost_1_59_0\lib64-msvc-14.0 - BOOST_FLAGS: -DBoost_USE_MULTITHREAD=ON -DBUILD_SHARED_LIBS=OFF -DBoost_USE_STATIC_LIBS=TRUE -DBOOST_ALL_DYN_LINK=OFF - BOOST_OPTIONS: -DBOOST_ROOT=%BOOST_ROOT% -DBOOST_LIBRARYDIR=%BOOST_LIBRARYDIR% -DBOOST_INCLUDEDIR=%BOOST_INCLUDEDIR% %BOOST_FLAGS% - COMMON_ROOT: "C:/Program Files/Project/share/opm/" - ERT_ROOT: "C:/Program Files/ERT" - GEN: "Visual Studio 14 2015 Win64" - -build_script: - - git clone https://github.com/OPM/opm-common.git - - git clone https://github.com/Ensembles/ert.git - - cd ert - - cmake C:\projects\opm-parser\ert -G"%GEN%" -DCMAKE_BUILD_TYPE=%configuration% -DERT_BUILD_CXX=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_PYTHON=OFF - - cmake --build . --target install --config %configuration% - - cd ../opm-common - - cmake C:\projects\opm-parser\opm-common -G"%GEN%" %BOOST_OPTIONS% -DCMAKE_BUILD_TYPE=%configuration% -DBUILD_TESTING=OFF - - cmake --build . --config %configuration% --target install - - cd .. - - cmake C:\projects\opm-parser -G"%GEN%" %BOOST_OPTIONS% -DOPM_COMMON_ROOT="%COMMON_ROOT%" -DCMAKE_PREFIX_PATH="%ERT_ROOT%" -DCMAKE_BUILD_TYPE=%configuration% - - cmake --build . --config %configuration% - - ctest -C %configuration% --output-on-failure diff --git a/ThirdParty/custom-opm-parser/opm-parser/cmake/Modules/CheckCaseSensitiveFileSystem.cmake b/ThirdParty/custom-opm-parser/opm-parser/cmake/Modules/CheckCaseSensitiveFileSystem.cmake deleted file mode 100644 index 8e3581a629..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/cmake/Modules/CheckCaseSensitiveFileSystem.cmake +++ /dev/null @@ -1,29 +0,0 @@ -# -# Module to check whether the file system is case sensitive or not -# -# Sets the following variable: -# -# HAVE_CASE_SENSITIVE_FILESYSTEM True if the file system honors the case of files - -message(STATUS "Checking whether the file system is case-sensitive") -# create a file containing uppercase characters -file(WRITE "${CMAKE_BINARY_DIR}/UPPER" "Foo") - -# check if the all-lowercase file with the same name can be opened -set(FooContents "") -if (EXISTS "${CMAKE_BINARY_DIR}/upper") - file(READ "${CMAKE_BINARY_DIR}/upper" FooContents) -endif() - -# remove the file again in order not to have it dangling around... -file(REMOVE "${CMAKE_BINARY_DIR}/UPPER") - -# check the contents of the file opened with lower-case. If it is -# empty, the file system is case sensitive. -if ("${FooContents}" STREQUAL "Foo") - message(STATUS "File system is not case-sensitive") - set(HAVE_CASE_SENSITIVE_FILESYSTEM 0) -else() - message(STATUS "File system is case-sensitive") - set(HAVE_CASE_SENSITIVE_FILESYSTEM 1) -endif() diff --git a/ThirdParty/custom-opm-parser/opm-parser/cmake/Modules/install_headers.cmake b/ThirdParty/custom-opm-parser/opm-parser/cmake/Modules/install_headers.cmake deleted file mode 100644 index dc962da1d5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/cmake/Modules/install_headers.cmake +++ /dev/null @@ -1,8 +0,0 @@ -function ( install_headers header-list prefix ) - foreach (header ${header-list}) - set( abs_path "${CMAKE_CURRENT_SOURCE_DIR}/${header}") - get_filename_component( path ${abs_path} PATH ) - file( RELATIVE_PATH rel_path "${PROJECT_SOURCE_DIR}" "${path}") - install ( FILES ${header} DESTINATION ${prefix}/include/${rel_path} ) - endforeach() -endfunction() \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/cmake/build_check.cmake b/ThirdParty/custom-opm-parser/opm-parser/cmake/build_check.cmake deleted file mode 100644 index b266b844ad..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/cmake/build_check.cmake +++ /dev/null @@ -1,13 +0,0 @@ -# This file contains checks which are used to implement portable -# utility functions. The results of these check are assembled in the -# generated header "opm_parser_build_config.hpp" - that header is NOT part -# of the public api and it should only be included from source files -# as part of the compilation. - -include( CheckFunctionExists ) - - -check_function_exists( symlink OPM_PARSER_BUILD_HAVE_SYMLINK ) - - -configure_file( ${PROJECT_SOURCE_DIR}/cmake/config/opm_parser_build_config.hpp.in ${PROJECT_BINARY_DIR}/opm_parser_build_config.hpp) \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/cmake/config/opm_parser_build_config.hpp.in b/ThirdParty/custom-opm-parser/opm-parser/cmake/config/opm_parser_build_config.hpp.in deleted file mode 100644 index 4b3e938988..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/cmake/config/opm_parser_build_config.hpp.in +++ /dev/null @@ -1,7 +0,0 @@ -// This file contains #define symols which come from feature tests -// during the configure phase. This file should not be part of the -// public api of opm-parser, and it should *only* be included in .cpp -// files. - -#cmakedefine OPM_PARSER_BUILD_HAVE_SYMLINK - diff --git a/ThirdParty/custom-opm-parser/opm-parser/configure b/ThirdParty/custom-opm-parser/opm-parser/configure deleted file mode 100644 index 47e27af24f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/configure +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# this file is supposed to be located in the source directory -src_dir=$(dirname $0) - -# scan the arguments and set this if build macros could be specified -mod_dir= -for OPT in "$@"; do - case "$OPT" in - --with-opm-common=*) - # remove everything before equal sign and assign the rest - mod_dir=${OPT#*=} - # tilde expansion; note that doing eval may have side effects - mod_dir=$(eval echo $mod_dir) - # absolute path - [ -d "$mod_dir" ] && mod_dir=$(cd $mod_dir ; pwd) - ;; - esac -done - -# if it isn't specified, the look around in other known places -conf_file=cmake/Scripts/configure -if [ -z "$mod_dir" ]; then - if [ -r "$src_dir/$conf_file" ]; then - mod_dir="$src_dir" - fi -fi - -# terminate with error message here if the module directory is not found -if [ ! -r "$mod_dir/$conf_file" ]; then - echo Build macros not located in \"$mod_dir\", use --with-opm-common= to specify! 1>&2 - exit 1 -fi - -# forward to the corresponding script in the cmake/Scripts/ directory -exec "$mod_dir/$conf_file" --src-dir="$src_dir" "$@" diff --git a/ThirdParty/custom-opm-parser/opm-parser/debian/changelog b/ThirdParty/custom-opm-parser/opm-parser/debian/changelog deleted file mode 100644 index cc65c6238e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/debian/changelog +++ /dev/null @@ -1,5 +0,0 @@ -opm-parser (2015.01-1~trusty) trusty; urgency=low - - * New release - - -- Arne Morten Kvarving Tue, 22 Oct 2013 12:22:29 +0200 diff --git a/ThirdParty/custom-opm-parser/opm-parser/debian/compat b/ThirdParty/custom-opm-parser/opm-parser/debian/compat deleted file mode 100644 index ec635144f6..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/ThirdParty/custom-opm-parser/opm-parser/debian/control b/ThirdParty/custom-opm-parser/opm-parser/debian/control deleted file mode 100644 index 26794d82c9..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/debian/control +++ /dev/null @@ -1,90 +0,0 @@ -Source: opm-parser -Priority: extra -Maintainer: Arne Morten Kvarving -Build-Depends: build-essential, debhelper (>= 9), pkg-config, libopm-common-dev, - cmake, libtinyxml-dev, bc, libboost-filesystem-dev, zlib1g-dev, - libert.ecl-dev, git, libtool, doxygen, libboost-date-time-dev, - texlive-latex-extra, texlive-latex-recommended, ghostscript, - libboost-system-dev, libboost-test-dev, libboost-regex-dev, - python-ert.ecl, python-cwrap -Standards-Version: 3.9.2 -Section: libs -Homepage: http://opm-project.org -Vcs-Git: git://github.com/OPM/opm-core.git -Vcs-Browser: https://github.com/OPM/opm-core - -Package: libopm-parser1-dev -Section: libdevel -Architecture: any -Multi-Arch: foreign -Depends: libopm-parser1 (= ${binary:Version}) -Provides: libopm-parser-dev -Suggests: libopm-parser1-doc -Description: OPM parser library -- development files - The OPM parser library is the eclipse parser library within OPM - -Package: libopm-parser1 -Section: libs -Pre-Depends: ${misc:Pre-Depends}, multiarch-support -Architecture: any -Multi-Arch: same -Depends: ${shlibs:Depends}, ${misc:Depends} -Provides: libopm-parser -Description: OPM parser library - The OPM parser library is the eclipse parser library within OPM - -Package: libopm-parser1-bin -Section: science -Pre-Depends: ${misc:Pre-Depends}, multiarch-support -Architecture: any -Multi-Arch: same -Depends: ${shlibs:Depends}, ${misc:Depends} -Provides: libopm-parser-bin -Description: OPM parser library -- applications - The OPM parser library is the eclipse parser library within OPM - -Package: libopm-parser1-dbg -Section: debug -Architecture: any -Multi-Arch: foreign -Provides: libopm-parser-dbg -Depends: libopm-parser1 (= ${binary:Version}), ${misc:Depends} -Description: OPM parser library -- debug symbols - -Package: libopm-cparser1-dev -Section: libdevel -Architecture: any -Multi-Arch: foreign -Depends: libopm-cparser1 (= ${binary:Version}) -Provides: libopm-cparser-dev -Description: OPM parser c wrapping library -- development files - The OPM parser library is the eclipse parser library within OPM. - This package contains the development for the c wrapping library - -Package: libopm-cparser1 -Section: libs -Pre-Depends: ${misc:Pre-Depends}, multiarch-support -Architecture: any -Multi-Arch: same -Depends: ${shlibs:Depends}, ${misc:Depends} -Provides: libopm-cparser -Description: OPM parser c wrapping library - The OPM parser library is the eclipse parser library within OPM. This - package contains a small C wrapper library for libopm-parser. - -Package: libopm-cparser1-dbg -Section: debug -Architecture: any -Multi-Arch: foreign -Provides: libopm-cparser-dbg -Depends: libopm-cparser1 (= ${binary:Version}), ${misc:Depends} -Description: OPM parser c wrapping library -- debug symbols - -Package: python-opm-parser -Section: python -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, python-ert.ecl, - python-cwrap, libopm-cparser -Description: OPM parser library -- python bindings - The OPM parser library is the eclipse parser library within OPM - of reservoir models. This package contains the python bindings. diff --git a/ThirdParty/custom-opm-parser/opm-parser/debian/copyright b/ThirdParty/custom-opm-parser/opm-parser/debian/copyright deleted file mode 100644 index 00e820065d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/debian/copyright +++ /dev/null @@ -1,13 +0,0 @@ -License: GPL-3+ - This package 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. - - This package 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 for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see diff --git a/ThirdParty/custom-opm-parser/opm-parser/debian/docs b/ThirdParty/custom-opm-parser/opm-parser/debian/docs deleted file mode 100644 index b43bf86b50..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/debian/docs +++ /dev/null @@ -1 +0,0 @@ -README.md diff --git a/ThirdParty/custom-opm-parser/opm-parser/debian/libopm-cparser1-dev.install b/ThirdParty/custom-opm-parser/opm-parser/debian/libopm-cparser1-dev.install deleted file mode 100644 index 1d60972b79..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/debian/libopm-cparser1-dev.install +++ /dev/null @@ -1 +0,0 @@ -usr/lib/*/libcopm*.so diff --git a/ThirdParty/custom-opm-parser/opm-parser/debian/libopm-cparser1.install b/ThirdParty/custom-opm-parser/opm-parser/debian/libopm-cparser1.install deleted file mode 100644 index 0a7fed10ea..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/debian/libopm-cparser1.install +++ /dev/null @@ -1 +0,0 @@ -usr/lib/*/libcopm*.so.* diff --git a/ThirdParty/custom-opm-parser/opm-parser/debian/libopm-parser1-bin.install b/ThirdParty/custom-opm-parser/opm-parser/debian/libopm-parser1-bin.install deleted file mode 100644 index 1df36c612f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/debian/libopm-parser1-bin.install +++ /dev/null @@ -1 +0,0 @@ -usr/bin/* diff --git a/ThirdParty/custom-opm-parser/opm-parser/debian/libopm-parser1-dev.install b/ThirdParty/custom-opm-parser/opm-parser/debian/libopm-parser1-dev.install deleted file mode 100644 index b265500689..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/debian/libopm-parser1-dev.install +++ /dev/null @@ -1,5 +0,0 @@ -usr/include/* -usr/lib/*/libopm*.so -usr/lib/dunecontrol/* -usr/share/cmake/* -usr/lib/*/pkgconfig/* diff --git a/ThirdParty/custom-opm-parser/opm-parser/debian/libopm-parser1.install b/ThirdParty/custom-opm-parser/opm-parser/debian/libopm-parser1.install deleted file mode 100644 index de5875ee26..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/debian/libopm-parser1.install +++ /dev/null @@ -1 +0,0 @@ -usr/lib/*/libopm*.so.* diff --git a/ThirdParty/custom-opm-parser/opm-parser/debian/python-opm-parser.install b/ThirdParty/custom-opm-parser/opm-parser/debian/python-opm-parser.install deleted file mode 100644 index 670205536d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/debian/python-opm-parser.install +++ /dev/null @@ -1 +0,0 @@ -usr/lib/python2.7/*/opm/* diff --git a/ThirdParty/custom-opm-parser/opm-parser/debian/rules b/ThirdParty/custom-opm-parser/opm-parser/debian/rules deleted file mode 100644 index e0b67b43d9..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/debian/rules +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -%: - dh $@ - -override_dh_auto_clean: - dh_auto_clean --buildsystem=cmake - -override_dh_auto_build: - dh_auto_build --buildsystem=cmake - -# consider using -DUSE_VERSIONED_DIR=ON if backporting -override_dh_auto_configure: - dh_auto_configure --buildsystem=cmake -- -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=1 -DENABLE_PYTHON=1 - -override_dh_installdocs: - dh_installdocs --link-doc=libopm-parser1 - -override_dh_strip: - dh_strip -plibopm-parser1 --dbg-package=libopm-parser1-dbg - dh_strip -plibopm-cparser1 --dbg-package=libopm-cparser1-dbg diff --git a/ThirdParty/custom-opm-parser/opm-parser/debian/source/format b/ThirdParty/custom-opm-parser/opm-parser/debian/source/format deleted file mode 100644 index d3827e75a5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -1.0 diff --git a/ThirdParty/custom-opm-parser/opm-parser/docs/keywords.txt b/ThirdParty/custom-opm-parser/opm-parser/docs/keywords.txt deleted file mode 100644 index 5eebe72b61..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/docs/keywords.txt +++ /dev/null @@ -1,336 +0,0 @@ -Keywords is the most important aspect of the ECLIPSE datafile -parser. - -1. The structure of a keyword ------------------------------ - -A keyword is the fundamental unit when parsing. Keywords are added to -the parser by schema definitions. The schema definition of the keywords -are given as Json files under the opm/share/keywords directory. Json -can be thought of as a lean alternative to XML, you will find it described -here: http://www.json.org/ -As part of the build process these keyword definitions are compiled -to ParserKeyword instances. - - -1.1 Starting a keyword ----------------------- -The keywords are defined as follows: - - 1. The keyword should start in column 0; everything beyond character - 8 is ignored. - - 2. The keyword should start with a alphabet character, subsequent - characters should be alphanumeric or in the set [-,_,+]. - - 3. We think ECLIPSE is case insensitive. - -This is cehcked by the static method: -ParserKeyword::validDeckName(). An important part of the parsing of -keywords is to detect when the keyword specification is complete. For -most keywords we can detect that either by a terminating '/' or the -keywords have a predefined size, but for some odd keywords we can not -reliably detect the end-of-keyword condition and instead we terminate -keyword1 when we find a string which corresponds to the start of a new -keyword. Examples of such oddball keywords include: VFPPROD and -VFPINJ. - - -1.2 Records ------------ - -The data content of a keyword comes as a collection of -records. Records are a collection of 'data', terminated by a '/'. Here -are three examples of records: - - 'METRES' / - - 1 'OFF' 100 '*' 24.0 / - - 0.26 0.27 0.26 0.78 - 0.82 0.66 0.27 0.78 - 0.76 0.56 0.23 0.67 / - -From these examples we see that: - - 1. One record can contain a mix of integer, float and string values. - 2. Records typically correspond to one line in the data-file, but - that is purely convention; the records can be sprinkled with - newlines. - 3. Each record is terminated with a '/' - - -1.3 How many records in a keyword ---------------------------------- - -One of the first structural elements which must be configured into the -the parser keywords is the number of records in the different -keywords, this is closely related to how the keyboard is -terminated. Here comes some typical examples of keywords: - - - GRID - - - WCONHIST - ... / - ... / - ... / - / - - ---\ - EQLDIMS | - .... / | - | - EQUIL | - .... / | - .... / | - ---/ - - VFPPROD - A .. / - B... / - .... / - .... / - - - PVGO - / - / - - -In the list above here the GRID keyword has zero records, i.e. no data -at all. The WCONHIST keyword has three records of data, the EQLDIMS -keyword has one record, the EQUIL keyword has two records and finally -the VFPPROD keyword has four records. The number of records, or how to -infer it, must be configured with the "size" attribute in the JSON -configuration. When it comes to the number of records and termination -we currently have five different categories: - - 1. Keywords with a fixed number of records. Both the GRID keyword - and the EQLDIMS keyword have a fixed number of records, zero and - one respectively. These keywords are therefor not explicitly - terminated in any way, and the "size" attribute has the numerical - explicitly: - - {"name" : "EQLDIMS" , "size" : 1 , ....} - {"name" : "GRID" , "size" : 0, .... } - - - 2. Keywords with a variable number of records like the - WCONHIST. Becase the number of records is not known in advance - this keyword must be explicitly terminated with a '/'. This is - the most common configuration and for keywords of this type it is - not necessary to specify a size attribute at all: - - {"name" : "WCONHIST" , .... } - - - 3. Keywords where the number of records is inferred from the content - of another keyword; this is the case with EQUIL which reads the - number of records from the xxx item of the EQLDIMS keyword. Since - the number of records is known in advance (indirectly through the - EQLDIMS keyword) the EQUIL keyword is not explicitly terminated - with a '/'. In the json file this is specified with the "size" - attribute being an object containing the name and item of keyword - which should be consulted to infer the size; so for the EQUIL - keyword the size attribute looks like: - - {"name" : "EQUIL" , - "size" : {"keyword" : "EQLDIMS" , "item" : "NTEQUL"} , ... - - When parsing the EQUIL keyword the parser will consult the - already parsed content of the 'EQLDIMS' keyword (i.e. a - DeckKeyword instance) and get the numerical value of the 'NTEQUL' - item. - - - 4. For some keywords the number of records should be calculated - run-time based based on the content of the first records in the - keyword - this at least applies to VFPPROD and VFPINJ. Since the - size of the keyword is deterministic - given the first few - records - the keyword is not slash terminated. - - To infer the number of records in the keyword based on an - internal calculation is not supported, hence for these keywords - size is given as unkown, and the keywords are terminated when the - next valid keyword is found: - - {"name" : "VFPPROD" , "size" : "UNKNOWN", .... - - - - 5. Tables PVTG and PVTO: The two tables PVTG and PVTO are special - cased. The special casing should probably be removed, and the - "size" : "UNKNOWN" could be used for these two keyword. - - - - -1.4 The content of a record: items ----------------------------------- - -A record consist of one or several items. An item can consist of one -or several values from the record, for items with more than one value -it is not possible to specify the exact number of values - the item -will just consume the remaining values in the input stream. An item -has a name, a data type and optionally a default value. For instance -the WCONHIST keyword has the the following items specification: - - "items": - [{"name" : "WELL" , "value_type" : "STRING"}, - {"name" : "STATUS" , "value_type" : "STRING" , "default" : "OPEN"}, - {"name" : "CMODE" , "value_type" : "STRING"}, - {"name" : "ORAT" , "value_type" : "DOUBLE", "default" : 0.0, "dimension" : "LiquidSurfaceVolume/Time"}, - {"name" : "WRAT" , "value_type" : "DOUBLE" , "default" : 0.0, "dimension" : "LiquidSurfaceVolume/Time"}, - {"name" : "GRAT" , "value_type" : "DOUBLE" , "default" : 0.0, "dimension" : "GasSurfaceVolume/Time"}, - {"name" : "VFPTable" , "value_type" : "INT" , "default" : 0.0 , "comment":"The default is a state variable"}, - {"name" : "Lift" , "value_type" : "DOUBLE" , "default" : 0.0 , "comment":"The default is a state variable"}, - {"name" : "THP" , "value_type" : "DOUBLE" , "default" : 0.0 , "dimension" : "Pressure"}, - {"name" : "BHP" , "value_type" : "DOUBLE" , "default" : 0.0 ,"dimension" : "Pressure"}, - {"name" : "NGLRAT" , "value_type" : "DOUBLE" , "default" : 0.0 ,"dimension" : "LiquidSurfaceVolume/Time"}]} - -Here we can see the following: - - 1. The items can be of types string, integer and float, the type is - specified with the "value_type" attribute which must equal - "STRING", "DOUBLE" or "INT". - - 2. You can optionally specify a default value, see the discussion of - the parsing workflow below for the treatment of defaults. - - 3. For items of type double you can specify a dimension, see XXXX for - the available dimensions. For quantities with a dimension the - parser will convert to SI units, and the DeckDoubleItem class has - a getSIDouble() and getRawDouble() method. - - -Items consuming the rest of the record --------------------------------------- - -Most of the items will consume exactly one value from the input deck, -but it is also possible that the last item consumes the remaining -items in the input deck, these typically correspond to table keywords -or lists of memnonics. In the input deck the PVTG keyword will -typically appear like this: - -PVTG -200 0.15 0.15 10 - 0.20 0.20 12 - 0.25 0.20 15 / -250 0.05 0.05 20 - 0.15 0.10 40 / -... - -In the manual this is described as two tables with three columns, one -with three rows and one with two rows. The leading values of 200 and -250 are the pressure values where the two tables apply. The visual -formatting in the deck, and also the written desciption in the manual, -strongly hints at a table structure - however from a parsing point of -view this corresponds to just two records of different length. Both -records start with a pressure value, and then follows 3n consecutive -values. The item configuration of PVTG looks like this: - - "items" : [ - {"name":"GAS_PRESSURE", "value_type" : "DOUBLE", "dimension":"Pressure" }, - {"name":"DATA", "size_type" : "ALL" , "value_type":"DOUBLE" , - "dimension" : ["OilDissolutionFactor","OilDissolutionFactor","Viscosity"]} - ] - -I.e. first we consume one value from the input deck and assign it to -the GAS_PRESSURE item, then the DATA item has "size_type" : "ALL" - -meaning that this item will consume the the rest of the values in the -input record. Also observe that for the "DATA" item the dimension is a -vector of three elements, when converting to SI the dimension applied -to element i is given as: - - dim[i] = dimension[i % 3] - -In addition to tables the grid property keywords use items which -consume the rest of the record. For instance the PORO keyword will -typcially look like this in the input deck: - -PORO -0.14 0.15 0.0 0.10 -0.16 0.25 0.1 0.11 -0.14 0.15 0.0 0.09 -... -0.21 0.07 0.1 0.13 -/ - -From a parsing point of view this is one single record; which contains -one item consuming all of the values in the input deck. In the -configuration this could have been configured as: - - "items" : [{"name" : "DATA", - "value_type" : "DOUBLE" , - "size_type" : "ALL" , - "default" : 0 , - "dimension" : "1"}] - -However, since keywords containing large data arrays, like e.g. COORD -and PERMX are quite common a shortcut has been created for such -keywords, for instance the PORO keyword is configures as: - - {"name" : "PORO" , "sections" : ["GRID"], - "data" : {"value_type" : "DOUBLE" , "default" : 0 , "dimension":"1"}} - -i.e. the "data" attribute is used as shorthand to configure a keyword -with one record and one item which consumes all the data of the input -deck. - - -Multirecord keyword configuration ---------------------------------- - - -Units and dimensions --------------------- - -The values given in the input dataset are generally dimensionfull, and -before the simulator can start we must convert to internal SI values -based on the unit system used in the input deck. In the input deck the -different physical quantities are generally expressed with -per-quantity units. The unit system is *not* based on selecting a unit -for the fundamental dimensions length, mass and time and then deriving -composite units based on the dimension of the composite quantity. As a -consequence the list of dimensions supported by the parser is long, -and growing. The current list can be found in the source file: - - opm/parser/eclipse/Units/UnitSystem.cpp - - - -Default values --------------- - - - - -Classes: --------- - -The library contains classes along two dimensions: - - +----------------+ +----------------+ +----------------+ - | Parser | | RawDeck | | Deck | - +----------------+ +----------------+ +----------------+ - - +----------------+ +----------------+ +----------------+ - | ParserKeyword | | Rawkeyword | | DeckKeyword | - +----------------+ +----------------+ +----------------+ - - +----------------+ +----------------+ +----------------+ - | ParserRecord | | RawRecord | | DeckRecord | - +----------------+ +----------------+ +----------------+ - - +----------------+ +----------------+ - | ParserItem | | DeckItem | - +----------------+ +----------------+ - - - - - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/dune.module b/ThirdParty/custom-opm-parser/opm-parser/dune.module deleted file mode 100644 index 5b42e882fc..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/dune.module +++ /dev/null @@ -1,13 +0,0 @@ -#################################################################### -# Dune module information file: This file gets parsed by dunecontrol -# and by the CMake build scripts. -#################################################################### - -Module: opm-parser -Description: Open Porous Media Initiative File Parser Library -Version: 2016.10-pre -Label: 2016.10-pre -Maintainer: joaho@statoil.com -MaintainerName: Joakim Hove -Url: http://opm-project.org -Depends: opm-common diff --git a/ThirdParty/custom-opm-parser/opm-parser/jenkins/README.md b/ThirdParty/custom-opm-parser/opm-parser/jenkins/README.md deleted file mode 100644 index abed8fa18a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/jenkins/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# opm-parser jenkins build scripts: - -**build.sh**: -This script will build dependencies, then build opm-parser and execute its tests. -It also inspects the $ghbPrBuildComment environmental variable and builds -downstreams if requested. It inspects the $ghbPrBuildComment -environmental variable to obtain a pull request to use for the modules. - -It is intended for pre-merge builds of pull requests. - -To specify a given pull request to use for upstreams and downstreams, -trigger line needs to contain <module-name>=<pull request number>. - -To build with downstreams the trigger line needs to contain 'with downstreams'. diff --git a/ThirdParty/custom-opm-parser/opm-parser/jenkins/build.sh b/ThirdParty/custom-opm-parser/opm-parser/jenkins/build.sh deleted file mode 100644 index 9a1aaea185..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/jenkins/build.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash - -declare -a upstreams -upstreams=(opm-common - ert) - -declare -A upstreamRev -upstreamRev[opm-common]=master -upstreamRev[ert]=master - -if grep -q "opm-common=" <<< $ghprbCommentBody -then - upstreamRev[opm-common]=pull/`echo $ghprbCommentBody | sed -r 's/.*opm-common=([0-9]+).*/\1/g'`/merge -fi - -# Downstream revisions -declare -a downstreams -downstreams=(opm-material - opm-output - opm-core - opm-grid - opm-simulators - opm-upscaling - ewoms) - -declare -A downstreamRev -downstreamRev[opm-material]=master -downstreamRev[opm-core]=master -downstreamRev[opm-grid]=master -downstreamRev[opm-output]=master -downstreamRev[opm-simulators]=master -downstreamRev[opm-upscaling]=master -downstreamRev[ewoms]=master - -# Clone opm-common -pushd . -mkdir -p $WORKSPACE/deps/opm-common -cd $WORKSPACE/deps/opm-common -git init . -git remote add origin https://github.com/OPM/opm-common -git fetch --depth 1 origin ${upstreamRev[opm-common]}:branch_to_build -test $? -eq 0 || exit 1 -git checkout branch_to_build -popd - -source $WORKSPACE/deps/opm-common/jenkins/build-opm-module.sh - -parseRevisions -printHeader opm-parser - -# Setup opm-data -source $WORKSPACE/deps/opm-common/jenkins/setup-opm-data.sh - -build_module_full opm-parser diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/json/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/json/CMakeLists.txt deleted file mode 100644 index 8f1e5aeb7d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/json/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -set( json_source JsonObject.cpp ) -set( json_headers JsonObject.hpp ) -if (NOT HAVE_CJSON) - list(APPEND json_source cjson/cJSON.c) - set( CJSON_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} ) - set(CJSON_LIBRARY "") -endif() -add_library(opmjson ${json_source}) -target_link_libraries( opmjson ${CJSON_LIBRARY} ${Boost_LIBRARIES} ) -set_target_properties(opmjson PROPERTIES VERSION ${opm-parser_VERSION_MAJOR}.${opm-parser_VERSION_MINOR} - SOVERSION ${opm-parser_VERSION_MAJOR}) - -install( TARGETS opmjson DESTINATION ${CMAKE_INSTALL_LIBDIR} ) -foreach ( header ${json_headers} ) - install( FILES ${header} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/opm/json RENAME ${header}) -endforeach() - -add_subdirectory( tests ) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/json/JsonObject.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/json/JsonObject.cpp deleted file mode 100644 index 8ddc82e1e4..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/json/JsonObject.cpp +++ /dev/null @@ -1,206 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - - -#include -#include -#include -#include - -#include -#include - -#include -#include "cjson/cJSON.h" - -namespace Json { - - void JsonObject::initialize(const std::string& inline_json) { - root = cJSON_Parse( inline_json.c_str() ); - if (!root) - throw std::invalid_argument("Parsing json input failed"); - owner = true; - } - - - JsonObject::JsonObject(const std::string& inline_json) { - initialize( inline_json ); - } - - JsonObject::JsonObject(const char * inline_json) { - initialize( inline_json ); - } - - - - JsonObject::JsonObject(const boost::filesystem::path& jsonFile ) { - std::ifstream stream(jsonFile.string().c_str()); - if (stream) { - std::string content_from_file( (std::istreambuf_iterator(stream)), - (std::istreambuf_iterator())); - initialize( content_from_file ); - } else - throw std::invalid_argument("Loading json from file: " + jsonFile.string() + " failed."); - } - - - - - JsonObject::JsonObject( cJSON * object ) { - root = object; - owner = false; - } - - - JsonObject::~JsonObject() { - if (owner && root) - cJSON_Delete(root); - } - - - - bool JsonObject::has_item( const std::string& key) const { - cJSON * object = cJSON_GetObjectItem( root , key.c_str() ); - if (object) - return true; - else - return false; - } - - - bool JsonObject::is_array( ) const { - if (root->type == cJSON_Array) - return true; - else - return false; - } - - bool JsonObject::is_number( ) const { - if (root->type == cJSON_Number) - return true; - else - return false; - } - - - bool JsonObject::is_string( ) const { - if (root->type == cJSON_String) - return true; - else - return false; - } - - bool JsonObject::is_object( ) const { - if (root->type == cJSON_Object) - return true; - else - return false; - } - - - size_t JsonObject::size() const { - int int_size = cJSON_GetArraySize( root ); - return (size_t) int_size; - } - - - JsonObject JsonObject::get_array_item( size_t index ) const { - if (is_array()) { - cJSON * new_c_ptr = cJSON_GetArrayItem( root , index ); - if (new_c_ptr) - return JsonObject( new_c_ptr ); - else - throw std::invalid_argument("Index is out ouf range."); - } else - throw std::invalid_argument("Object is not an array."); - } - - - JsonObject JsonObject::get_item(const std::string& key) const { - cJSON * c_ptr = cJSON_GetObjectItem( root , key.c_str() ); - if (c_ptr) - return JsonObject( c_ptr ); - else - throw std::invalid_argument("Key: " + key + " does not exist in json object"); - } - - - std::string JsonObject::get_string(const std::string& key) const { - JsonObject child = get_scalar_object( key ); - return child.as_string(); - } - - - std::string JsonObject::as_string() const { - if (is_string()) - return root->valuestring; - else - throw std::invalid_argument("Object is not a string object"); - } - - - int JsonObject::get_int(const std::string& key) const { - JsonObject child = get_scalar_object( key ); - return child.as_int( ); - } - - - int JsonObject::as_int() const { - if (root->type == cJSON_Number) - return root->valueint; - else - throw std::invalid_argument("Object is not a number object."); - } - - - double JsonObject::get_double(const std::string& key) const { - JsonObject child = get_scalar_object( key ); - return child.as_double( ); - } - - - double JsonObject::as_double() const { - if (root->type == cJSON_Number) - return root->valuedouble; - else - throw std::invalid_argument("Object is not a number object."); - } - - - JsonObject JsonObject::get_scalar_object(const std::string& key) const{ - JsonObject child = get_item( key ); - if (child.size()) - throw std::invalid_argument("Key: " + key + " is not a scalar object"); - else - return child; - } - - - - std::string JsonObject::to_string() const { - char * c_str = cJSON_Print( root ); - std::string s(c_str); - free( c_str ); - - return s; - } - - -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/json/JsonObject.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/json/JsonObject.hpp deleted file mode 100644 index a9ce32c4d0..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/json/JsonObject.hpp +++ /dev/null @@ -1,74 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef JSON_OBJECT_HPP -#define JSON_OBJECT_HPP - -#include - -struct cJSON; - -namespace boost { - namespace filesystem { - class path; - } -} - -namespace Json { - - class JsonObject { - public: - explicit JsonObject(const boost::filesystem::path& jsonFile ); - explicit JsonObject(const std::string& inline_json); - explicit JsonObject(const char * inline_json); - explicit JsonObject(cJSON * root); - ~JsonObject(); - - bool has_item(const std::string& key) const; - JsonObject get_array_item( size_t index ) const; - JsonObject get_item(const std::string& key) const; - - std::string to_string() const; - std::string get_string(const std::string& key) const; - std::string as_string() const; - bool is_string( ) const; - - bool is_number( ) const; - int get_int(const std::string& key) const; - int as_int() const; - double get_double(const std::string& key) const; - double as_double() const; - - bool is_array( ) const; - bool is_object( ) const; - - size_t size() const; - private: - JsonObject get_scalar_object(const std::string& key) const; - void initialize(const std::string& inline_json); - cJSON * root; - bool owner; - }; -} - - - -#endif - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/json/cjson/README b/ThirdParty/custom-opm-parser/opm-parser/opm/json/cjson/README deleted file mode 100644 index 59a8ac88cd..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/json/cjson/README +++ /dev/null @@ -1,247 +0,0 @@ -/* - Copyright (c) 2009 Dave Gamble - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -*/ - -Welcome to cJSON. - -cJSON aims to be the dumbest possible parser that you can get your job done with. -It's a single file of C, and a single header file. - -JSON is described best here: http://www.json.org/ -It's like XML, but fat-free. You use it to move data around, store things, or just -generally represent your program's state. - - -First up, how do I build? -Add cJSON.c to your project, and put cJSON.h somewhere in the header search path. -For example, to build the test app: - -gcc cJSON.c test.c -o test -lm -./test - - -As a library, cJSON exists to take away as much legwork as it can, but not get in your way. -As a point of pragmatism (i.e. ignoring the truth), I'm going to say that you can use it -in one of two modes: Auto and Manual. Let's have a quick run-through. - - -I lifted some JSON from this page: http://www.json.org/fatfree.html -That page inspired me to write cJSON, which is a parser that tries to share the same -philosophy as JSON itself. Simple, dumb, out of the way. - -Some JSON: -{ - "name": "Jack (\"Bee\") Nimble", - "format": { - "type": "rect", - "width": 1920, - "height": 1080, - "interlace": false, - "frame rate": 24 - } -} - -Assume that you got this from a file, a webserver, or magic JSON elves, whatever, -you have a char * to it. Everything is a cJSON struct. -Get it parsed: - cJSON *root = cJSON_Parse(my_json_string); - -This is an object. We're in C. We don't have objects. But we do have structs. -What's the framerate? - - cJSON *format = cJSON_GetObjectItem(root,"format"); - int framerate = cJSON_GetObjectItem(format,"frame rate")->valueint; - - -Want to change the framerate? - cJSON_GetObjectItem(format,"frame rate")->valueint=25; - -Back to disk? - char *rendered=cJSON_Print(root); - -Finished? Delete the root (this takes care of everything else). - cJSON_Delete(root); - -That's AUTO mode. If you're going to use Auto mode, you really ought to check pointers -before you dereference them. If you want to see how you'd build this struct in code? - cJSON *root,*fmt; - root=cJSON_CreateObject(); - cJSON_AddItemToObject(root, "name", cJSON_CreateString("Jack (\"Bee\") Nimble")); - cJSON_AddItemToObject(root, "format", fmt=cJSON_CreateObject()); - cJSON_AddStringToObject(fmt,"type", "rect"); - cJSON_AddNumberToObject(fmt,"width", 1920); - cJSON_AddNumberToObject(fmt,"height", 1080); - cJSON_AddFalseToObject (fmt,"interlace"); - cJSON_AddNumberToObject(fmt,"frame rate", 24); - -Hopefully we can agree that's not a lot of code? There's no overhead, no unnecessary setup. -Look at test.c for a bunch of nice examples, mostly all ripped off the json.org site, and -a few from elsewhere. - -What about manual mode? First up you need some detail. -Let's cover how the cJSON objects represent the JSON data. -cJSON doesn't distinguish arrays from objects in handling; just type. -Each cJSON has, potentially, a child, siblings, value, a name. - -The root object has: Object Type and a Child -The Child has name "name", with value "Jack ("Bee") Nimble", and a sibling: -Sibling has type Object, name "format", and a child. -That child has type String, name "type", value "rect", and a sibling: -Sibling has type Number, name "width", value 1920, and a sibling: -Sibling has type Number, name "height", value 1080, and a sibling: -Sibling hs type False, name "interlace", and a sibling: -Sibling has type Number, name "frame rate", value 24 - -Here's the structure: -typedef struct cJSON { - struct cJSON *next,*prev; - struct cJSON *child; - - int type; - - char *valuestring; - int valueint; - double valuedouble; - - char *string; -} cJSON; - -By default all values are 0 unless set by virtue of being meaningful. - -next/prev is a doubly linked list of siblings. next takes you to your sibling, -prev takes you back from your sibling to you. -Only objects and arrays have a "child", and it's the head of the doubly linked list. -A "child" entry will have prev==0, but next potentially points on. The last sibling has next=0. -The type expresses Null/True/False/Number/String/Array/Object, all of which are #defined in -cJSON.h - -A Number has valueint and valuedouble. If you're expecting an int, read valueint, if not read -valuedouble. - -Any entry which is in the linked list which is the child of an object will have a "string" -which is the "name" of the entry. When I said "name" in the above example, that's "string". -"string" is the JSON name for the 'variable name' if you will. - -Now you can trivially walk the lists, recursively, and parse as you please. -You can invoke cJSON_Parse to get cJSON to parse for you, and then you can take -the root object, and traverse the structure (which is, formally, an N-tree), -and tokenise as you please. If you wanted to build a callback style parser, this is how -you'd do it (just an example, since these things are very specific): - -void parse_and_callback(cJSON *item,const char *prefix) -{ - while (item) - { - char *newprefix=malloc(strlen(prefix)+strlen(item->name)+2); - sprintf(newprefix,"%s/%s",prefix,item->name); - int dorecurse=callback(newprefix, item->type, item); - if (item->child && dorecurse) parse_and_callback(item->child,newprefix); - item=item->next; - free(newprefix); - } -} - -The prefix process will build you a separated list, to simplify your callback handling. -The 'dorecurse' flag would let the callback decide to handle sub-arrays on it's own, or -let you invoke it per-item. For the item above, your callback might look like this: - -int callback(const char *name,int type,cJSON *item) -{ - if (!strcmp(name,"name")) { /* populate name */ } - else if (!strcmp(name,"format/type") { /* handle "rect" */ } - else if (!strcmp(name,"format/width") { /* 800 */ } - else if (!strcmp(name,"format/height") { /* 600 */ } - else if (!strcmp(name,"format/interlace") { /* false */ } - else if (!strcmp(name,"format/frame rate") { /* 24 */ } - return 1; -} - -Alternatively, you might like to parse iteratively. -You'd use: - -void parse_object(cJSON *item) -{ - int i; for (i=0;ichild; - while (subitem) - { - // handle subitem - if (subitem->child) parse_object(subitem->child); - - subitem=subitem->next; - } -} - -Of course, this should look familiar, since this is just a stripped-down version -of the callback-parser. - -This should cover most uses you'll find for parsing. The rest should be possible -to infer.. and if in doubt, read the source! There's not a lot of it! ;) - - -In terms of constructing JSON data, the example code above is the right way to do it. -You can, of course, hand your sub-objects to other functions to populate. -Also, if you find a use for it, you can manually build the objects. -For instance, suppose you wanted to build an array of objects? - -cJSON *objects[24]; - -cJSON *Create_array_of_anything(cJSON **items,int num) -{ - int i;cJSON *prev, *root=cJSON_CreateArray(); - for (i=0;i<24;i++) - { - if (!i) root->child=objects[i]; - else prev->next=objects[i], objects[i]->prev=prev; - prev=objects[i]; - } - return root; -} - -and simply: Create_array_of_anything(objects,24); - -cJSON doesn't make any assumptions about what order you create things in. -You can attach the objects, as above, and later add children to each -of those objects. - -As soon as you call cJSON_Print, it renders the structure to text. - - - -The test.c code shows how to handle a bunch of typical cases. If you uncomment -the code, it'll load, parse and print a bunch of test files, also from json.org, -which are more complex than I'd care to try and stash into a const char array[]. - - -Enjoy cJSON! - - -- Dave Gamble, Aug 2009 diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/json/cjson/README.opm b/ThirdParty/custom-opm-parser/opm-parser/opm/json/cjson/README.opm deleted file mode 100644 index 06c6b87ae0..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/json/cjson/README.opm +++ /dev/null @@ -1,4 +0,0 @@ -This directory contains the cJSON package downloaded unchanged from: -http://sourceforge.net/projects/cjson/. The cJSON package is plain C, -the JsonObject class provides a minimal C++ wrapping of this. - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/json/cjson/cJSON.c b/ThirdParty/custom-opm-parser/opm-parser/opm/json/cjson/cJSON.c deleted file mode 100644 index 96e503842d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/json/cjson/cJSON.c +++ /dev/null @@ -1,569 +0,0 @@ -/* - Copyright (c) 2009 Dave Gamble - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -*/ - -/* cJSON */ -/* JSON parser in C. */ - -#include -#include -#include -#include -#include -#include -#include -#include "cJSON.h" - -static const char *ep; - -const char *cJSON_GetErrorPtr(void) {return ep;} - -static int cJSON_strcasecmp(const char *s1,const char *s2) -{ - if (!s1) return (s1==s2)?0:1;if (!s2) return 1; - for(; tolower(*s1) == tolower(*s2); ++s1, ++s2) if(*s1 == 0) return 0; - return tolower(*(const unsigned char *)s1) - tolower(*(const unsigned char *)s2); -} - -static void *(*cJSON_malloc)(size_t sz) = malloc; -static void (*cJSON_free)(void *ptr) = free; - -static char* cJSON_strdup(const char* str) -{ - size_t len; - char* copy; - - len = strlen(str) + 1; - if (!(copy = (char*)cJSON_malloc(len))) return 0; - memcpy(copy,str,len); - return copy; -} - -void cJSON_InitHooks(cJSON_Hooks* hooks) -{ - if (!hooks) { /* Reset hooks */ - cJSON_malloc = malloc; - cJSON_free = free; - return; - } - - cJSON_malloc = (hooks->malloc_fn)?hooks->malloc_fn:malloc; - cJSON_free = (hooks->free_fn)?hooks->free_fn:free; -} - -/* Internal constructor. */ -static cJSON *cJSON_New_Item(void) -{ - cJSON* node = (cJSON*)cJSON_malloc(sizeof(cJSON)); - if (node) memset(node,0,sizeof(cJSON)); - return node; -} - -/* Delete a cJSON structure. */ -void cJSON_Delete(cJSON *c) -{ - cJSON *next; - while (c) - { - next=c->next; - if (!(c->type&cJSON_IsReference) && c->child) cJSON_Delete(c->child); - if (!(c->type&cJSON_IsReference) && c->valuestring) cJSON_free(c->valuestring); - if (c->string) cJSON_free(c->string); - cJSON_free(c); - c=next; - } -} - -/* Parse the input text to generate a number, and populate the result into item. */ -static const char *parse_number(cJSON *item,const char *num) -{ - double n=0,sign=1,scale=0;int subscale=0,signsubscale=1; - - /* Could use sscanf for this? */ - if (*num=='-') sign=-1,num++; /* Has sign? */ - if (*num=='0') num++; /* is zero */ - if (*num>='1' && *num<='9') do n=(n*10.0)+(*num++ -'0'); while (*num>='0' && *num<='9'); /* Number? */ - if (*num=='.' && num[1]>='0' && num[1]<='9') {num++; do n=(n*10.0)+(*num++ -'0'),scale--; while (*num>='0' && *num<='9');} /* Fractional part? */ - if (*num=='e' || *num=='E') /* Exponent? */ - { num++;if (*num=='+') num++; else if (*num=='-') signsubscale=-1,num++; /* With sign? */ - while (*num>='0' && *num<='9') subscale=(subscale*10)+(*num++ - '0'); /* Number? */ - } - - n=sign*n*pow(10.0,(scale+subscale*signsubscale)); /* number = +/- number.fraction * 10^+/- exponent */ - - item->valuedouble=n; - item->valueint=(int)n; - item->type=cJSON_Number; - return num; -} - -/* Render the number nicely from the given item into a string. */ -static char *print_number(cJSON *item) -{ - char *str; - double d=item->valuedouble; - if (fabs(((double)item->valueint)-d)<=DBL_EPSILON && d<=INT_MAX && d>=INT_MIN) - { - str=(char*)cJSON_malloc(21); /* 2^64+1 can be represented in 21 chars. */ - if (str) sprintf(str,"%d",item->valueint); - } - else - { - str=(char*)cJSON_malloc(64); /* This is a nice tradeoff. */ - if (str) - { - if (fabs(floor(d)-d)<=DBL_EPSILON && fabs(d)<1.0e60)sprintf(str,"%.0f",d); - else if (fabs(d)<1.0e-6 || fabs(d)>1.0e9) sprintf(str,"%e",d); - else sprintf(str,"%f",d); - } - } - return str; -} - -/* Parse the input text into an unescaped cstring, and populate item. */ -static const unsigned char firstByteMark[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }; -static const char *parse_string(cJSON *item,const char *str) -{ - const char *ptr=str+1;char *ptr2;char *out;int len=0;unsigned uc,uc2; - if (*str!='\"') {ep=str;return 0;} /* not a string! */ - - while (*ptr!='\"' && *ptr && ++len) if (*ptr++ == '\\') ptr++; /* Skip escaped quotes. */ - - out=(char*)cJSON_malloc(len+1); /* This is how long we need for the string, roughly. */ - if (!out) return 0; - - ptr=str+1;ptr2=out; - while (*ptr!='\"' && *ptr) - { - if (*ptr!='\\') *ptr2++=*ptr++; - else - { - ptr++; - switch (*ptr) - { - case 'b': *ptr2++='\b'; break; - case 'f': *ptr2++='\f'; break; - case 'n': *ptr2++='\n'; break; - case 'r': *ptr2++='\r'; break; - case 't': *ptr2++='\t'; break; - case 'u': /* transcode utf16 to utf8. */ - sscanf(ptr+1,"%4x",&uc);ptr+=4; /* get the unicode char. */ - - if ((uc>=0xDC00 && uc<=0xDFFF) || uc==0) break; /* check for invalid. */ - - if (uc>=0xD800 && uc<=0xDBFF) /* UTF16 surrogate pairs. */ - { - if (ptr[1]!='\\' || ptr[2]!='u') break; /* missing second-half of surrogate. */ - sscanf(ptr+3,"%4x",&uc2);ptr+=6; - if (uc2<0xDC00 || uc2>0xDFFF) break; /* invalid second-half of surrogate. */ - uc=0x10000 + (((uc&0x3FF)<<10) | (uc2&0x3FF)); - } - - len=4;if (uc<0x80) len=1;else if (uc<0x800) len=2;else if (uc<0x10000) len=3; ptr2+=len; - - switch (len) { - case 4: *--ptr2 =((uc | 0x80) & 0xBF); uc >>= 6; - case 3: *--ptr2 =((uc | 0x80) & 0xBF); uc >>= 6; - case 2: *--ptr2 =((uc | 0x80) & 0xBF); uc >>= 6; - case 1: *--ptr2 =(uc | firstByteMark[len]); - } - ptr2+=len; - break; - default: *ptr2++=*ptr; break; - } - ptr++; - } - } - *ptr2=0; - if (*ptr=='\"') ptr++; - item->valuestring=out; - item->type=cJSON_String; - return ptr; -} - -/* Render the cstring provided to an escaped version that can be printed. */ -static char *print_string_ptr(const char *str) -{ - const char *ptr;char *ptr2,*out;int len=0;unsigned char token; - - if (!str) return cJSON_strdup(""); - ptr=str;while ((token=*ptr) && ++len) {if (strchr("\"\\\b\f\n\r\t",token)) len++; else if (token<32) len+=5;ptr++;} - - out=(char*)cJSON_malloc(len+3); - if (!out) return 0; - - ptr2=out;ptr=str; - *ptr2++='\"'; - while (*ptr) - { - if ((unsigned char)*ptr>31 && *ptr!='\"' && *ptr!='\\') *ptr2++=*ptr++; - else - { - *ptr2++='\\'; - switch (token=*ptr++) - { - case '\\': *ptr2++='\\'; break; - case '\"': *ptr2++='\"'; break; - case '\b': *ptr2++='b'; break; - case '\f': *ptr2++='f'; break; - case '\n': *ptr2++='n'; break; - case '\r': *ptr2++='r'; break; - case '\t': *ptr2++='t'; break; - default: sprintf(ptr2,"u%04x",token);ptr2+=5; break; /* escape and print */ - } - } - } - *ptr2++='\"';*ptr2++=0; - return out; -} -/* Invote print_string_ptr (which is useful) on an item. */ -static char *print_string(cJSON *item) {return print_string_ptr(item->valuestring);} - -/* Predeclare these prototypes. */ -static const char *parse_value(cJSON *item,const char *value); -static char *print_value(cJSON *item,int depth,int fmt); -static const char *parse_array(cJSON *item,const char *value); -static char *print_array(cJSON *item,int depth,int fmt); -static const char *parse_object(cJSON *item,const char *value); -static char *print_object(cJSON *item,int depth,int fmt); - -/* Utility to jump whitespace and cr/lf */ -static const char *skip(const char *in) {while (in && *in && (unsigned char)*in<=32) in++; return in;} - -/* Parse an object - create a new root, and populate. */ -cJSON *cJSON_ParseWithOpts(const char *value,const char **return_parse_end,int require_null_terminated) -{ - const char *end=0; - cJSON *c=cJSON_New_Item(); - ep=0; - if (!c) return 0; /* memory fail */ - - end=parse_value(c,skip(value)); - if (!end) {cJSON_Delete(c);return 0;} /* parse failure. ep is set. */ - - /* if we require null-terminated JSON without appended garbage, skip and then check for a null terminator */ - if (require_null_terminated) {end=skip(end);if (*end) {cJSON_Delete(c);ep=end;return 0;}} - if (return_parse_end) *return_parse_end=end; - return c; -} -/* Default options for cJSON_Parse */ -cJSON *cJSON_Parse(const char *value) {return cJSON_ParseWithOpts(value,0,0);} - -/* Render a cJSON item/entity/structure to text. */ -char *cJSON_Print(cJSON *item) {return print_value(item,0,1);} -char *cJSON_PrintUnformatted(cJSON *item) {return print_value(item,0,0);} - -/* Parser core - when encountering text, process appropriately. */ -static const char *parse_value(cJSON *item,const char *value) -{ - if (!value) return 0; /* Fail on null. */ - if (!strncmp(value,"null",4)) { item->type=cJSON_NULL; return value+4; } - if (!strncmp(value,"false",5)) { item->type=cJSON_False; return value+5; } - if (!strncmp(value,"true",4)) { item->type=cJSON_True; item->valueint=1; return value+4; } - if (*value=='\"') { return parse_string(item,value); } - if (*value=='-' || (*value>='0' && *value<='9')) { return parse_number(item,value); } - if (*value=='[') { return parse_array(item,value); } - if (*value=='{') { return parse_object(item,value); } - - ep=value;return 0; /* failure. */ -} - -/* Render a value to text. */ -static char *print_value(cJSON *item,int depth,int fmt) -{ - char *out=0; - if (!item) return 0; - switch ((item->type)&255) - { - case cJSON_NULL: out=cJSON_strdup("null"); break; - case cJSON_False: out=cJSON_strdup("false");break; - case cJSON_True: out=cJSON_strdup("true"); break; - case cJSON_Number: out=print_number(item);break; - case cJSON_String: out=print_string(item);break; - case cJSON_Array: out=print_array(item,depth,fmt);break; - case cJSON_Object: out=print_object(item,depth,fmt);break; - } - return out; -} - -/* Build an array from input text. */ -static const char *parse_array(cJSON *item,const char *value) -{ - cJSON *child; - if (*value!='[') {ep=value;return 0;} /* not an array! */ - - item->type=cJSON_Array; - value=skip(value+1); - if (*value==']') return value+1; /* empty array. */ - - item->child=child=cJSON_New_Item(); - if (!item->child) return 0; /* memory fail */ - value=skip(parse_value(child,skip(value))); /* skip any spacing, get the value. */ - if (!value) return 0; - - while (*value==',') - { - cJSON *new_item; - if (!(new_item=cJSON_New_Item())) return 0; /* memory fail */ - child->next=new_item;new_item->prev=child;child=new_item; - value=skip(parse_value(child,skip(value+1))); - if (!value) return 0; /* memory fail */ - } - - if (*value==']') return value+1; /* end of array */ - ep=value;return 0; /* malformed. */ -} - -/* Render an array to text */ -static char *print_array(cJSON *item,int depth,int fmt) -{ - char **entries; - char *out=0,*ptr,*ret;int len=5; - cJSON *child=item->child; - int numentries=0,i=0,fail=0; - - /* How many entries in the array? */ - while (child) numentries++,child=child->next; - /* Explicitly handle numentries==0 */ - if (!numentries) - { - out=(char*)cJSON_malloc(3); - if (out) strcpy(out,"[]"); - return out; - } - /* Allocate an array to hold the values for each */ - entries=(char**)cJSON_malloc(numentries*sizeof(char*)); - if (!entries) return 0; - memset(entries,0,numentries*sizeof(char*)); - /* Retrieve all the results: */ - child=item->child; - while (child && !fail) - { - ret=print_value(child,depth+1,fmt); - entries[i++]=ret; - if (ret) len+=strlen(ret)+2+(fmt?1:0); else fail=1; - child=child->next; - } - - /* If we didn't fail, try to malloc the output string */ - if (!fail) out=(char*)cJSON_malloc(len); - /* If that fails, we fail. */ - if (!out) fail=1; - - /* Handle failure. */ - if (fail) - { - for (i=0;itype=cJSON_Object; - value=skip(value+1); - if (*value=='}') return value+1; /* empty array. */ - - item->child=child=cJSON_New_Item(); - if (!item->child) return 0; - value=skip(parse_string(child,skip(value))); - if (!value) return 0; - child->string=child->valuestring;child->valuestring=0; - if (*value!=':') {ep=value;return 0;} /* fail! */ - value=skip(parse_value(child,skip(value+1))); /* skip any spacing, get the value. */ - if (!value) return 0; - - while (*value==',') - { - cJSON *new_item; - if (!(new_item=cJSON_New_Item())) return 0; /* memory fail */ - child->next=new_item;new_item->prev=child;child=new_item; - value=skip(parse_string(child,skip(value+1))); - if (!value) return 0; - child->string=child->valuestring;child->valuestring=0; - if (*value!=':') {ep=value;return 0;} /* fail! */ - value=skip(parse_value(child,skip(value+1))); /* skip any spacing, get the value. */ - if (!value) return 0; - } - - if (*value=='}') return value+1; /* end of array */ - ep=value;return 0; /* malformed. */ -} - -/* Render an object to text. */ -static char *print_object(cJSON *item,int depth,int fmt) -{ - char **entries=0,**names=0; - char *out=0,*ptr,*ret,*str;int len=7,i=0,j; - cJSON *child=item->child; - int numentries=0,fail=0; - /* Count the number of entries. */ - while (child) numentries++,child=child->next; - /* Explicitly handle empty object case */ - if (!numentries) - { - out=(char*)cJSON_malloc(fmt?depth+3:3); - if (!out) return 0; - ptr=out;*ptr++='{'; - if (fmt) {*ptr++='\n';for (i=0;ichild;depth++;if (fmt) len+=depth; - while (child) - { - names[i]=str=print_string_ptr(child->string); - entries[i++]=ret=print_value(child,depth,fmt); - if (str && ret) len+=strlen(ret)+strlen(str)+2+(fmt?2+depth:0); else fail=1; - child=child->next; - } - - /* Try to allocate the output string */ - if (!fail) out=(char*)cJSON_malloc(len); - if (!out) fail=1; - - /* Handle failure */ - if (fail) - { - for (i=0;ichild;int i=0;while(c)i++,c=c->next;return i;} -cJSON *cJSON_GetArrayItem(cJSON *array,int item) {cJSON *c=array->child; while (c && item>0) item--,c=c->next; return c;} -cJSON *cJSON_GetObjectItem(cJSON *object,const char *string) {cJSON *c=object->child; while (c && cJSON_strcasecmp(c->string,string)) c=c->next; return c;} - -/* Utility for array list handling. */ -static void suffix_object(cJSON *prev,cJSON *item) {prev->next=item;item->prev=prev;} -/* Utility for handling references. */ -static cJSON *create_reference(cJSON *item) {cJSON *ref=cJSON_New_Item();if (!ref) return 0;memcpy(ref,item,sizeof(cJSON));ref->string=0;ref->type|=cJSON_IsReference;ref->next=ref->prev=0;return ref;} - -/* Add item to array/object. */ -void cJSON_AddItemToArray(cJSON *array, cJSON *item) {cJSON *c=array->child;if (!item) return; if (!c) {array->child=item;} else {while (c && c->next) c=c->next; suffix_object(c,item);}} -void cJSON_AddItemToObject(cJSON *object,const char *string,cJSON *item) {if (!item) return; if (item->string) cJSON_free(item->string);item->string=cJSON_strdup(string);cJSON_AddItemToArray(object,item);} -void cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item) {cJSON_AddItemToArray(array,create_reference(item));} -void cJSON_AddItemReferenceToObject(cJSON *object,const char *string,cJSON *item) {cJSON_AddItemToObject(object,string,create_reference(item));} - -cJSON *cJSON_DetachItemFromArray(cJSON *array,int which) {cJSON *c=array->child;while (c && which>0) c=c->next,which--;if (!c) return 0; - if (c->prev) c->prev->next=c->next;if (c->next) c->next->prev=c->prev;if (c==array->child) array->child=c->next;c->prev=c->next=0;return c;} -void cJSON_DeleteItemFromArray(cJSON *array,int which) {cJSON_Delete(cJSON_DetachItemFromArray(array,which));} -cJSON *cJSON_DetachItemFromObject(cJSON *object,const char *string) {int i=0;cJSON *c=object->child;while (c && cJSON_strcasecmp(c->string,string)) i++,c=c->next;if (c) return cJSON_DetachItemFromArray(object,i);return 0;} -void cJSON_DeleteItemFromObject(cJSON *object,const char *string) {cJSON_Delete(cJSON_DetachItemFromObject(object,string));} - -/* Replace array/object items with new ones. */ -void cJSON_ReplaceItemInArray(cJSON *array,int which,cJSON *newitem) {cJSON *c=array->child;while (c && which>0) c=c->next,which--;if (!c) return; - newitem->next=c->next;newitem->prev=c->prev;if (newitem->next) newitem->next->prev=newitem; - if (c==array->child) array->child=newitem; else newitem->prev->next=newitem;c->next=c->prev=0;cJSON_Delete(c);} -void cJSON_ReplaceItemInObject(cJSON *object,const char *string,cJSON *newitem){int i=0;cJSON *c=object->child;while(c && cJSON_strcasecmp(c->string,string))i++,c=c->next;if(c){newitem->string=cJSON_strdup(string);cJSON_ReplaceItemInArray(object,i,newitem);}} - -/* Create basic types: */ -cJSON *cJSON_CreateNull(void) {cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_NULL;return item;} -cJSON *cJSON_CreateTrue(void) {cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_True;return item;} -cJSON *cJSON_CreateFalse(void) {cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_False;return item;} -cJSON *cJSON_CreateBool(int b) {cJSON *item=cJSON_New_Item();if(item)item->type=b?cJSON_True:cJSON_False;return item;} -cJSON *cJSON_CreateNumber(double num) {cJSON *item=cJSON_New_Item();if(item){item->type=cJSON_Number;item->valuedouble=num;item->valueint=(int)num;}return item;} -cJSON *cJSON_CreateString(const char *string) {cJSON *item=cJSON_New_Item();if(item){item->type=cJSON_String;item->valuestring=cJSON_strdup(string);}return item;} -cJSON *cJSON_CreateArray(void) {cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_Array;return item;} -cJSON *cJSON_CreateObject(void) {cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_Object;return item;} - -/* Create Arrays: */ -cJSON *cJSON_CreateIntArray(int *numbers,int count) {int i;cJSON *n=0,*p=0,*a=cJSON_CreateArray();for(i=0;a && ichild=n;else suffix_object(p,n);p=n;}return a;} -cJSON *cJSON_CreateFloatArray(float *numbers,int count) {int i;cJSON *n=0,*p=0,*a=cJSON_CreateArray();for(i=0;a && ichild=n;else suffix_object(p,n);p=n;}return a;} -cJSON *cJSON_CreateDoubleArray(double *numbers,int count) {int i;cJSON *n=0,*p=0,*a=cJSON_CreateArray();for(i=0;a && ichild=n;else suffix_object(p,n);p=n;}return a;} -cJSON *cJSON_CreateStringArray(const char **strings,int count) {int i;cJSON *n=0,*p=0,*a=cJSON_CreateArray();for(i=0;a && ichild=n;else suffix_object(p,n);p=n;}return a;} - -/* Duplication */ -cJSON *cJSON_Duplicate(cJSON *item,int recurse) -{ - cJSON *newitem,*cptr,*nptr=0,*newchild; - /* Bail on bad ptr */ - if (!item) return 0; - /* Create new item */ - newitem=cJSON_New_Item(); - if (!newitem) return 0; - /* Copy over all vars */ - newitem->type=item->type&(~cJSON_IsReference),newitem->valueint=item->valueint,newitem->valuedouble=item->valuedouble; - if (item->valuestring) {newitem->valuestring=cJSON_strdup(item->valuestring); if (!newitem->valuestring) {cJSON_Delete(newitem);return 0;}} - if (item->string) {newitem->string=cJSON_strdup(item->string); if (!newitem->string) {cJSON_Delete(newitem);return 0;}} - /* If non-recursive, then we're done! */ - if (!recurse) return newitem; - /* Walk the ->next chain for the child. */ - cptr=item->child; - while (cptr) - { - newchild=cJSON_Duplicate(cptr,1); /* Duplicate (with recurse) each item in the ->next chain */ - if (!newchild) {cJSON_Delete(newitem);return 0;} - if (nptr) {nptr->next=newchild,newchild->prev=nptr;nptr=newchild;} /* If newitem->child already set, then crosswire ->prev and ->next and move on */ - else {newitem->child=newchild;nptr=newchild;} /* Set newitem->child and move to it */ - cptr=cptr->next; - } - return newitem; -} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/json/cjson/cJSON.h b/ThirdParty/custom-opm-parser/opm-parser/opm/json/cjson/cJSON.h deleted file mode 100644 index 2f61096a3d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/json/cjson/cJSON.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - Copyright (c) 2009 Dave Gamble - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -*/ - -#ifndef cJSON__h -#define cJSON__h - -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* cJSON Types: */ -#define cJSON_False 0 -#define cJSON_True 1 -#define cJSON_NULL 2 -#define cJSON_Number 3 -#define cJSON_String 4 -#define cJSON_Array 5 -#define cJSON_Object 6 - -#define cJSON_IsReference 256 - -/* The cJSON structure: */ -typedef struct cJSON { - struct cJSON *next,*prev; /* next/prev allow you to walk array/object chains. Alternatively, use GetArraySize/GetArrayItem/GetObjectItem */ - struct cJSON *child; /* An array or object item will have a child pointer pointing to a chain of the items in the array/object. */ - - int type; /* The type of the item, as above. */ - - char *valuestring; /* The item's string, if type==cJSON_String */ - int valueint; /* The item's number, if type==cJSON_Number */ - double valuedouble; /* The item's number, if type==cJSON_Number */ - - char *string; /* The item's name string, if this item is the child of, or is in the list of subitems of an object. */ -} cJSON; - -typedef struct cJSON_Hooks { - void *(*malloc_fn)(size_t sz); - void (*free_fn)(void *ptr); -} cJSON_Hooks; - -/* Supply malloc, realloc and free functions to cJSON */ -extern void cJSON_InitHooks(cJSON_Hooks* hooks); - - -/* Supply a block of JSON, and this returns a cJSON object you can interrogate. Call cJSON_Delete when finished. */ -extern cJSON *cJSON_Parse(const char *value); -/* Render a cJSON entity to text for transfer/storage. Free the char* when finished. */ -extern char *cJSON_Print(cJSON *item); -/* Render a cJSON entity to text for transfer/storage without any formatting. Free the char* when finished. */ -extern char *cJSON_PrintUnformatted(cJSON *item); -/* Delete a cJSON entity and all subentities. */ -extern void cJSON_Delete(cJSON *c); - -/* Returns the number of items in an array (or object). */ -extern int cJSON_GetArraySize(cJSON *array); -/* Retrieve item number "item" from array "array". Returns NULL if unsuccessful. */ -extern cJSON *cJSON_GetArrayItem(cJSON *array,int item); -/* Get item "string" from object. Case insensitive. */ -extern cJSON *cJSON_GetObjectItem(cJSON *object,const char *string); - -/* For analysing failed parses. This returns a pointer to the parse error. You'll probably need to look a few chars back to make sense of it. Defined when cJSON_Parse() returns 0. 0 when cJSON_Parse() succeeds. */ -extern const char *cJSON_GetErrorPtr(void); - -/* These calls create a cJSON item of the appropriate type. */ -extern cJSON *cJSON_CreateNull(void); -extern cJSON *cJSON_CreateTrue(void); -extern cJSON *cJSON_CreateFalse(void); -extern cJSON *cJSON_CreateBool(int b); -extern cJSON *cJSON_CreateNumber(double num); -extern cJSON *cJSON_CreateString(const char *string); -extern cJSON *cJSON_CreateArray(void); -extern cJSON *cJSON_CreateObject(void); - -/* These utilities create an Array of count items. */ -extern cJSON *cJSON_CreateIntArray(int *numbers,int count); -extern cJSON *cJSON_CreateFloatArray(float *numbers,int count); -extern cJSON *cJSON_CreateDoubleArray(double *numbers,int count); -extern cJSON *cJSON_CreateStringArray(const char **strings,int count); - -/* Append item to the specified array/object. */ -extern void cJSON_AddItemToArray(cJSON *array, cJSON *item); -extern void cJSON_AddItemToObject(cJSON *object,const char *string,cJSON *item); -/* Append reference to item to the specified array/object. Use this when you want to add an existing cJSON to a new cJSON, but don't want to corrupt your existing cJSON. */ -extern void cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item); -extern void cJSON_AddItemReferenceToObject(cJSON *object,const char *string,cJSON *item); - -/* Remove/Detatch items from Arrays/Objects. */ -extern cJSON *cJSON_DetachItemFromArray(cJSON *array,int which); -extern void cJSON_DeleteItemFromArray(cJSON *array,int which); -extern cJSON *cJSON_DetachItemFromObject(cJSON *object,const char *string); -extern void cJSON_DeleteItemFromObject(cJSON *object,const char *string); - -/* Update array items. */ -extern void cJSON_ReplaceItemInArray(cJSON *array,int which,cJSON *newitem); -extern void cJSON_ReplaceItemInObject(cJSON *object,const char *string,cJSON *newitem); - -/* Duplicate a cJSON item */ -extern cJSON *cJSON_Duplicate(cJSON *item,int recurse); -/* Duplicate will create a new, identical cJSON item to the one you pass, in new memory that will -need to be released. With recurse!=0, it will duplicate any children connected to the item. -The item->next and ->prev pointers are always zero on return from Duplicate. */ - -/* ParseWithOpts allows you to require (and check) that the JSON is null terminated, and to retrieve the pointer to the final byte parsed. */ -extern cJSON *cJSON_ParseWithOpts(const char *value,const char **return_parse_end,int require_null_terminated); - -/* Macros for creating things quickly. */ -#define cJSON_AddNullToObject(object,name) cJSON_AddItemToObject(object, name, cJSON_CreateNull()) -#define cJSON_AddTrueToObject(object,name) cJSON_AddItemToObject(object, name, cJSON_CreateTrue()) -#define cJSON_AddFalseToObject(object,name) cJSON_AddItemToObject(object, name, cJSON_CreateFalse()) -#define cJSON_AddBoolToObject(object,name,b) cJSON_AddItemToObject(object, name, cJSON_CreateBool(b)) -#define cJSON_AddNumberToObject(object,name,n) cJSON_AddItemToObject(object, name, cJSON_CreateNumber(n)) -#define cJSON_AddStringToObject(object,name,s) cJSON_AddItemToObject(object, name, cJSON_CreateString(s)) - -/* When assigning an integer value, it needs to be propagated to valuedouble too. */ -#define cJSON_SetIntValue(object,val) ((object)?(object)->valueint=(object)->valuedouble=(val):(val)) - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/json/tests/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/json/tests/CMakeLists.txt deleted file mode 100644 index 548f7eafbc..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/json/tests/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -opm_add_test(runjsonTests SOURCES jsonTests.cpp - LIBRARIES opmjson ${Boost_LIBRARIES}) -if (NOT MSVC) - set_source_files_properties( jsonTests.cpp PROPERTIES COMPILE_FLAGS "-Wno-unused-variable") -endif() diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/json/tests/jsonTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/json/tests/jsonTests.cpp deleted file mode 100644 index a76ab07581..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/json/tests/jsonTests.cpp +++ /dev/null @@ -1,281 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#include -#include -#include - -#define BOOST_TEST_MODULE jsonParserTests -#include -#include - -#include - -#include - - - - - -BOOST_AUTO_TEST_CASE(ParseValidJson) { - std::string inline_json = "{\"key\": \"value\"}"; - BOOST_CHECK_NO_THROW(Json::JsonObject parser(inline_json)); -} - - -BOOST_AUTO_TEST_CASE(ParseValidJson_fromLiteral) { - BOOST_CHECK_NO_THROW(Json::JsonObject parser("{\"key\": \"value\"}")); -} - - - -BOOST_AUTO_TEST_CASE(ParseInvalidJSON_throw) { - std::string inline_json = "{\"key\": \"value\""; - BOOST_CHECK_THROW(Json::JsonObject parser(inline_json) , std::invalid_argument); -} - - - -BOOST_AUTO_TEST_CASE(ParsevalidJSON_getString) { - std::string inline_json = "{\"key\": \"value\"}"; - Json::JsonObject parser(inline_json); - - BOOST_CHECK_EQUAL( "value" , parser.get_string("key") ); -} - - -BOOST_AUTO_TEST_CASE(ParsevalidJSONString_asString) { - std::string inline_json = "{\"key\": \"value\"}"; - Json::JsonObject parser(inline_json); - Json::JsonObject value = parser.get_item("key"); - - BOOST_CHECK_EQUAL( "value" , value.as_string() ); -} - - -BOOST_AUTO_TEST_CASE(ParsevalidJSONnotString_asString_throws) { - std::string inline_json = "{\"key\": 100}"; - Json::JsonObject parser(inline_json); - Json::JsonObject value = parser.get_item("key"); - - BOOST_CHECK_THROW( value.as_string() , std::invalid_argument ); -} - - -BOOST_AUTO_TEST_CASE(ParsevalidJSONint_asNumber) { - std::string inline_json = "{\"key1\": 100, \"key2\" : 100.100 }"; - Json::JsonObject parser(inline_json); - Json::JsonObject value1 = parser.get_item("key1"); - Json::JsonObject value2 = parser.get_item("key2"); - - BOOST_CHECK_EQUAL( 100 , value1.as_int() ); - BOOST_CHECK( fabs(100.100 - value2.as_double()) < 0.00001 ); -} - -BOOST_AUTO_TEST_CASE(ParsevalidJSONint_isNumber) { - std::string inline_json = "{\"key1\": 100, \"key2\" : 100.100 , \"key3\": \"string\"}"; - Json::JsonObject parser(inline_json); - Json::JsonObject value1 = parser.get_item("key1"); - Json::JsonObject value2 = parser.get_item("key2"); - Json::JsonObject value3 = parser.get_item("key3"); - - BOOST_CHECK( value1.is_number()) ; - BOOST_CHECK( value2.is_number()) ; - BOOST_CHECK_EQUAL( false , value3.is_number()) ; -} - - -BOOST_AUTO_TEST_CASE(ParsevalidJSONnotNumber_asNumber_throws) { - std::string inline_json = "{\"key\": \"100X\"}"; - Json::JsonObject parser(inline_json); - Json::JsonObject value = parser.get_item("key"); - - BOOST_CHECK_THROW( value.as_int() , std::invalid_argument ); - BOOST_CHECK_THROW( value.as_double() , std::invalid_argument ); -} - - - -BOOST_AUTO_TEST_CASE(ParsevalidJSON_getInt_OK) { - std::string inline_json = "{\"key1\": 100 , \"key2\" : 200}"; - Json::JsonObject parser(inline_json); - BOOST_CHECK_EQUAL( 100 , parser.get_int("key1") ); - BOOST_CHECK_EQUAL( 200 , parser.get_int("key2") ); -} - - - -BOOST_AUTO_TEST_CASE(ParsevalidJSON_hasItem) { - std::string inline_json = "{\"key\": \"value\"}"; - Json::JsonObject parser(inline_json); - BOOST_CHECK( parser.has_item("key")); - BOOST_CHECK_EQUAL( false , parser.has_item("keyX")); -} - - - -BOOST_AUTO_TEST_CASE(ParsevalidJSON_getMissingValue) { - std::string inline_json = "{\"key\": \"value\"}"; - Json::JsonObject parser(inline_json); - BOOST_CHECK_THROW( parser.get_string("keyX") , std::invalid_argument ); -} - - -BOOST_AUTO_TEST_CASE(ParsevalidJSON_getNotScalar_throws) { - std::string inline_json = "{\"key\": \"value\", \"list\": [1,2,3]}"; - Json::JsonObject parser(inline_json); - BOOST_CHECK_EQUAL( "value" , parser.get_string("key")); - BOOST_CHECK_THROW( parser.get_string("list") , std::invalid_argument ); -} - - -BOOST_AUTO_TEST_CASE(ParsevalidJSON_getObject) { - std::string inline_json = "{\"key\": \"value\", \"list\": [1,2,3]}"; - Json::JsonObject parser(inline_json); - BOOST_CHECK_NO_THROW( Json::JsonObject object = parser.get_item("list") ); - BOOST_CHECK_NO_THROW( Json::JsonObject object = parser.get_item("key") ); -} - - -BOOST_AUTO_TEST_CASE(ParsevalidJSON_getObject_missing_throw) { - std::string inline_json = "{\"key\": \"value\", \"list\": [1,2,3]}"; - Json::JsonObject parser(inline_json); - BOOST_CHECK_THROW( parser.get_item("listX") , std::invalid_argument ); -} - - - -BOOST_AUTO_TEST_CASE(ParsevalidJSON_CheckArraySize) { - std::string inline_json = "{\"key\": \"value\", \"list\": [1,2,3]}"; - Json::JsonObject parser(inline_json); - Json::JsonObject object = parser.get_item("list"); - BOOST_CHECK_EQUAL( 3U , object.size() ); -} - - -BOOST_AUTO_TEST_CASE(ParsevalidJSON_isArray){ - std::string inline_json = "{\"key\": \"value\", \"list\": [1,2,3]}"; - Json::JsonObject parser(inline_json); - Json::JsonObject list = parser.get_item("list"); - Json::JsonObject key = parser.get_item("key"); - - BOOST_CHECK( list.is_array() ); - BOOST_CHECK_EQUAL( false , key.is_array( ) ); -} - - -BOOST_AUTO_TEST_CASE(ParsevalidJSON_arrayGet) { - std::string inline_json = "{\"key\": \"value\", \"list\": [1,2,3]}"; - Json::JsonObject parser(inline_json); - Json::JsonObject list = parser.get_item("list"); - Json::JsonObject key = parser.get_item("key"); - - BOOST_CHECK_NO_THROW( list.get_array_item( 0U )); - BOOST_CHECK_NO_THROW( list.get_array_item( 1U )); - BOOST_CHECK_NO_THROW( list.get_array_item( 2U )); - - BOOST_CHECK_THROW( list.get_array_item( 3U ) , std::invalid_argument ); - BOOST_CHECK_THROW( key.get_array_item( 0U ) , std::invalid_argument ); -} - - -BOOST_AUTO_TEST_CASE(parseJSONString_testType) { - std::string inline_json = "{\"item\": \"string\"}"; - Json::JsonObject json(inline_json); - Json::JsonObject item = json.get_item( "item" ); - - BOOST_CHECK( item.is_string() ); - BOOST_CHECK_EQUAL( false , item.is_number( ) ); - BOOST_CHECK_EQUAL( false , item.is_array( ) ); - BOOST_CHECK_EQUAL( false , item.is_object( ) ); -} - - -BOOST_AUTO_TEST_CASE(parseJSONNumber_testType) { - std::string inline_json = "{\"item\": 100}"; - Json::JsonObject json(inline_json); - Json::JsonObject item = json.get_item( "item" ); - - BOOST_CHECK_EQUAL( true , item.is_number( ) ); - BOOST_CHECK_EQUAL( false , item.is_string() ); - BOOST_CHECK_EQUAL( false , item.is_array( ) ); - BOOST_CHECK_EQUAL( false , item.is_object( ) ); -} - - -BOOST_AUTO_TEST_CASE(parseJSONArray_testType) { - std::string inline_json = "{\"item\": [1,2,3]}"; - Json::JsonObject json(inline_json); - Json::JsonObject item = json.get_item( "item" ); - - BOOST_CHECK_EQUAL( false , item.is_number( ) ); - BOOST_CHECK_EQUAL( false , item.is_string() ); - BOOST_CHECK_EQUAL( true , item.is_array( ) ); - BOOST_CHECK_EQUAL( false , item.is_object( ) ); -} - - -BOOST_AUTO_TEST_CASE(parseJSONObject_testType) { - std::string inline_json = "{\"item\": {\"list\": [0,1,2]}}"; - Json::JsonObject json(inline_json); - Json::JsonObject item = json.get_item( "item" ); - - BOOST_CHECK_EQUAL( false , item.is_number( ) ); - BOOST_CHECK_EQUAL( false , item.is_string() ); - BOOST_CHECK_EQUAL( false , item.is_array( ) ); - BOOST_CHECK_EQUAL( true , item.is_object( ) ); -} - - - -BOOST_AUTO_TEST_CASE(Parse_fileDoesNotExist_Throws) { - boost::filesystem::path jsonFile("file/does/not/exist"); - BOOST_CHECK_THROW( Json::JsonObject parser(jsonFile) , std::invalid_argument); -} - - - -BOOST_AUTO_TEST_CASE(Parse_fileExists_OK) { - boost::filesystem::path jsonFile("testdata/json/example1.json"); - BOOST_CHECK_NO_THROW( Json::JsonObject parser(jsonFile) ); -} - - -BOOST_AUTO_TEST_CASE(to_string_ok) { - boost::filesystem::path jsonFile("testdata/json/example1.json"); - Json::JsonObject parser(jsonFile); - std::string json_string = - "{\n" - " \"keywords\": [{\n" - " \"name\": \"BPR\",\n" - " \"items\": [{\n" - " \"name\": \"ItemX\",\n" - " \"size_type\": \"SINGLE\",\n" - " \"value_type\": \"FLOAT\"\n" - " }]\n" - " }, {\n" - " \"name\": \"WWCT\",\n" - " \"size\": 0\n" - " }]\n" - "}"; - - BOOST_CHECK_EQUAL( parser.to_string() , json_string); -} - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/CMakeLists.txt deleted file mode 100644 index 1852a5ea59..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -add_subdirectory( share ) -add_subdirectory( eclipse ) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Applications/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Applications/CMakeLists.txt deleted file mode 100644 index 50ccbfa58f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Applications/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -add_executable(opmi opmi.cpp) -target_link_libraries(opmi opmparser) -install(TARGETS opmi DESTINATION "bin") - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Applications/opmi.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Applications/opmi.cpp deleted file mode 100644 index b344f4e6d0..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Applications/opmi.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include -#include - -#include -#include -#include -#include -#include - - -inline void dumpMessages( const Opm::MessageContainer& messageContainer) { - auto extractMessage = [](const Opm::Message& msg) { - const auto& location = msg.location; - if (location) - return location.filename + ":" + std::to_string( location.lineno ) + " " + msg.message; - else - return msg.message; - }; - - - for(const auto& msg : messageContainer) - std::cout << extractMessage(msg) << std::endl; -} - - -inline void loadDeck( const char * deck_file) { - Opm::ParseContext parseContext; - Opm::ParserPtr parser(new Opm::Parser()); - std::shared_ptr deck; - std::shared_ptr state; - - std::cout << "Loading deck: " << deck_file << " ..... "; std::cout.flush(); - deck = parser->parseFile(deck_file, parseContext); - std::cout << "parse complete - creating EclipseState .... "; std::cout.flush(); - state = std::make_shared( *deck , parseContext ); - std::cout << "complete." << std::endl; - - dumpMessages( deck->getMessageContainer() ); -} - - -int main(int argc, char** argv) { - for (int iarg = 1; iarg < argc; iarg++) - loadDeck( argv[iarg] ); - - return 0; -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/CMakeLists.txt deleted file mode 100644 index 2fb980f146..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/CMakeLists.txt +++ /dev/null @@ -1,354 +0,0 @@ -include_directories(BEFORE ${PROJECT_BINARY_DIR}/generated-source/include) - -add_subdirectory(Parser/tests) -add_subdirectory(Generator/tests) -add_subdirectory(RawDeck/tests) -add_subdirectory(Deck/tests) -add_subdirectory(Units/tests) -add_subdirectory(EclipseState/tests) -add_subdirectory(EclipseState/Schedule/tests) -add_subdirectory(EclipseState/SimulationConfig/tests) -add_subdirectory(EclipseState/Tables/tests) -add_subdirectory(EclipseState/Grid/tests) -add_subdirectory(EclipseState/Util/tests) -add_subdirectory(EclipseState/IOConfig/tests) -add_subdirectory(EclipseState/InitConfig/tests) -add_subdirectory(EclipseState/SummaryConfig/tests) -add_subdirectory(Utility/tests) - -add_subdirectory(Applications) -add_subdirectory(IntegrationTests) - -set( rawdeck_source -RawDeck/StarToken.cpp -RawDeck/RawKeyword.cpp -RawDeck/RawRecord.cpp ) - -set( unit_source -Units/UnitSystem.cpp -Units/Dimension.cpp) - -set( deck_source -Deck/Deck.cpp -Deck/DeckKeyword.cpp -Deck/DeckRecord.cpp -Deck/DeckItem.cpp -Deck/Section.cpp -) - -set( parser_source -Parser/ParseContext.cpp -Parser/MessageContainer.cpp -Parser/ParserEnums.cpp -Parser/ParserKeyword.cpp -Parser/Parser.cpp -Parser/ParserRecord.cpp -Parser/ParserItem.cpp -Parser/ParserIntItem.cpp -Parser/ParserDoubleItem.cpp -Parser/ParserStringItem.cpp -) - -set( generator_source -Generator/KeywordGenerator.cpp -Generator/KeywordLoader.cpp ) - -set( build_parser_source -Parser/ParseContext.cpp -Parser/MessageContainer.cpp -Parser/ParserEnums.cpp -Parser/ParserKeyword.cpp -Parser/ParserRecord.cpp -Parser/ParserItem.cpp -Parser/ParserIntItem.cpp -Parser/ParserDoubleItem.cpp -Parser/ParserStringItem.cpp -${generator_source} -) - -set (state_source -EclipseState/EclipseState.cpp -EclipseState/EclipseConfig.cpp -EclipseState/Eclipse3DProperties.cpp -EclipseState/Messages.cpp -# -EclipseState/checkDeck.cpp -# -EclipseState/Schedule/OilVaporizationProperties.cpp -EclipseState/Schedule/TimeMap.cpp -EclipseState/Schedule/Schedule.cpp -EclipseState/Schedule/Well.cpp -EclipseState/Schedule/WellProductionProperties.cpp -EclipseState/Schedule/WellInjectionProperties.cpp -EclipseState/Schedule/WellPolymerProperties.cpp -EclipseState/Schedule/WellEconProductionLimits.cpp -EclipseState/Schedule/MSW/Segment.cpp -EclipseState/Schedule/MSW/SegmentSet.cpp -EclipseState/Schedule/MSW/Compsegs.cpp -EclipseState/Schedule/WellSet.cpp -EclipseState/Schedule/Group.cpp -EclipseState/Schedule/Completion.cpp -EclipseState/Schedule/CompletionSet.cpp -EclipseState/Schedule/ScheduleEnums.cpp -EclipseState/Schedule/GroupTreeNode.cpp -EclipseState/Schedule/GroupTree.cpp -EclipseState/Schedule/Tuning.cpp -EclipseState/Schedule/Events.cpp -# -EclipseState/Tables/SimpleTable.cpp -EclipseState/Tables/VFPProdTable.cpp -EclipseState/Tables/VFPInjTable.cpp -EclipseState/Tables/TableManager.cpp -EclipseState/Tables/TableContainer.cpp -EclipseState/Tables/TableColumn.cpp -EclipseState/Tables/ColumnSchema.cpp -EclipseState/Tables/TableSchema.cpp -EclipseState/Tables/TableIndex.cpp -EclipseState/Tables/PvtxTable.cpp -EclipseState/Tables/Tables.cpp -# -EclipseState/Grid/SatfuncPropertyInitializers.cpp -EclipseState/Grid/GridDims.cpp -EclipseState/Grid/GridProperty.cpp -EclipseState/Grid/GridProperties.cpp -EclipseState/Grid/Box.cpp -EclipseState/Grid/BoxManager.cpp -EclipseState/Grid/FaceDir.cpp -EclipseState/Grid/TransMult.cpp -EclipseState/Grid/MULTREGTScanner.cpp -EclipseState/Grid/EclipseGrid.cpp -EclipseState/Grid/FaultFace.cpp -EclipseState/Grid/Fault.cpp -EclipseState/Grid/FaultCollection.cpp -EclipseState/Grid/NNC.cpp -EclipseState/Grid/PinchMode.cpp -# -EclipseState/InitConfig/InitConfig.cpp -EclipseState/InitConfig/Equil.cpp -EclipseState/SimulationConfig/SimulationConfig.cpp -EclipseState/SimulationConfig/ThresholdPressure.cpp -EclipseState/SummaryConfig/SummaryConfig.cpp -EclipseState/IOConfig/RestartConfig.cpp -EclipseState/IOConfig/IOConfig.cpp) -# - -set( utility_source -Utility/Functional.cpp -Utility/Stringview.cpp -) - -set( HEADER_FILES -RawDeck/RawConsts.hpp -RawDeck/RawKeyword.hpp -RawDeck/RawRecord.hpp -RawDeck/StarToken.hpp -RawDeck/RawEnums.hpp -# -Deck/Deck.hpp -Deck/DeckKeyword.hpp -Deck/DeckRecord.hpp -Deck/DeckItem.hpp -Deck/Section.hpp -# -Parser/ParserEnums.hpp -Parser/ParserKeyword.hpp -Parser/Parser.hpp -Parser/ParserRecord.hpp -Parser/ParserItem.hpp -Parser/ParserIntItem.hpp -Parser/ParserDoubleItem.hpp -Parser/ParserStringItem.hpp -Parser/InputErrorAction.hpp -Parser/ParseContext.hpp -Parser/MessageContainer.hpp -# -Generator/KeywordLoader.hpp -Generator/KeywordGenerator.hpp -# -Units/UnitSystem.hpp -Units/Dimension.hpp -Units/ConversionFactors.hpp -# -EclipseState/EclipseState.hpp -EclipseState/EclipseConfig.hpp -EclipseState/Eclipse3DProperties.hpp -EclipseState/Messages.hpp -# -EclipseState/checkDeck.hpp -# -EclipseState/Schedule/OilVaporizationProperties.hpp -EclipseState/Schedule/TimeMap.hpp -EclipseState/Schedule/Schedule.hpp -EclipseState/Schedule/Well.hpp -EclipseState/Schedule/WellProductionProperties.hpp -EclipseState/Schedule/WellInjectionProperties.hpp -EclipseState/Schedule/WellPolymerProperties.hpp -EclipseState/Schedule/WellEconProductionLimits.hpp -EclipseState/Schedule/MSW/Segment.hpp -EclipseState/Schedule/MSW/SegmentSet.hpp -EclipseState/Schedule/MSW/Compsegs.hpp -EclipseState/Schedule/WellSet.hpp -EclipseState/Schedule/Group.hpp -EclipseState/Schedule/DynamicState.hpp -EclipseState/Schedule/DynamicVector.hpp -EclipseState/Schedule/Completion.hpp -EclipseState/Schedule/CompletionSet.hpp -EclipseState/Schedule/ScheduleEnums.hpp -EclipseState/Schedule/GroupTreeNode.hpp -EclipseState/Schedule/GroupTree.hpp -EclipseState/Schedule/Tuning.hpp -EclipseState/Schedule/Events.hpp -# -EclipseState/Util/RecordVector.hpp -EclipseState/Util/OrderedMap.hpp -EclipseState/Util/Value.hpp -# -EclipseState/Grid/Box.hpp -EclipseState/Grid/BoxManager.hpp -EclipseState/Grid/EclipseGrid.hpp -EclipseState/Grid/FaceDir.hpp -EclipseState/Grid/FaultCollection.hpp -EclipseState/Grid/FaultFace.hpp -EclipseState/Grid/Fault.hpp -EclipseState/Grid/GridDims.hpp -EclipseState/Grid/GridProperties.hpp -EclipseState/Grid/GridProperty.hpp -EclipseState/Grid/MinpvMode.hpp -EclipseState/Grid/MULTREGTScanner.hpp -EclipseState/Grid/NNC.hpp -EclipseState/Grid/PinchMode.hpp -EclipseState/Grid/SatfuncPropertyInitializers.hpp -EclipseState/Grid/TransMult.hpp -# -EclipseState/InitConfig/InitConfig.hpp -EclipseState/InitConfig/Equil.hpp -EclipseState/SimulationConfig/SimulationConfig.hpp -EclipseState/SimulationConfig/ThresholdPressure.hpp -EclipseState/SummaryConfig/SummaryConfig.hpp -EclipseState/IOConfig/RestartConfig.hpp -EclipseState/IOConfig/IOConfig.hpp -# -EclipseState/Tables/Tabdims.hpp -EclipseState/Tables/Eqldims.hpp -EclipseState/Tables/Regdims.hpp -EclipseState/Tables/PlyadsTable.hpp -EclipseState/Tables/PvtoTable.hpp -EclipseState/Tables/RocktabTable.hpp -EclipseState/Tables/PvdoTable.hpp -EclipseState/Tables/PvdgTable.hpp -EclipseState/Tables/PvdsTable.hpp -EclipseState/Tables/SimpleTable.hpp -EclipseState/Tables/PlymaxTable.hpp -EclipseState/Tables/PlyrockTable.hpp -EclipseState/Tables/SwofTable.hpp -EclipseState/Tables/SgwfnTable.hpp -EclipseState/Tables/SwfnTable.hpp -EclipseState/Tables/SgfnTable.hpp -EclipseState/Tables/SsfnTable.hpp -EclipseState/Tables/Sof2Table.hpp -EclipseState/Tables/Sof3Table.hpp -EclipseState/Tables/EnptvdTable.hpp -EclipseState/Tables/PlyviscTable.hpp -EclipseState/Tables/PlydhflfTable.hpp -EclipseState/Tables/PlyshlogTable.hpp -EclipseState/Tables/EnkrvdTable.hpp -EclipseState/Tables/ImkrvdTable.hpp -EclipseState/Tables/SgofTable.hpp -EclipseState/Tables/SlgofTable.hpp -EclipseState/Tables/PvtxTable.hpp -EclipseState/Tables/ImptvdTable.hpp -EclipseState/Tables/RsvdTable.hpp -EclipseState/Tables/RvvdTable.hpp -EclipseState/Tables/RtempvdTable.hpp -EclipseState/Tables/OilvisctTable.hpp -EclipseState/Tables/GasvisctTable.hpp -EclipseState/Tables/WatvisctTable.hpp -EclipseState/Tables/PvtgTable.hpp -EclipseState/Tables/VFPProdTable.hpp -EclipseState/Tables/VFPInjTable.hpp -EclipseState/Tables/TableManager.hpp -EclipseState/Tables/TableContainer.hpp -EclipseState/Tables/SorwmisTable.hpp -EclipseState/Tables/SgcwmisTable.hpp -EclipseState/Tables/MiscTable.hpp -EclipseState/Tables/PmiscTable.hpp -EclipseState/Tables/TlpmixpaTable.hpp -EclipseState/Tables/MsfnTable.hpp -EclipseState/Tables/TableColumn.hpp -EclipseState/Tables/ColumnSchema.hpp -EclipseState/Tables/TableEnums.hpp -EclipseState/Tables/TableSchema.hpp -EclipseState/Tables/TableIndex.hpp -# -Utility/Functional.hpp -Utility/Stringview.hpp) - -add_library(buildParser ${rawdeck_source} ${build_parser_source} ${deck_source} ${unit_source} ${generator_source} ${utility_source}) -target_link_libraries(buildParser opmjson ${opm-common_LIBRARIES} ${Boost_LIBRARIES} ${ERT_LIBRARIES}) - -#----------------------------------------------------------------- -# This section manages the generation of C++ code for the default keywords. - -# 1. Create an executable 'createDefaultKeywordList'. - -add_executable( createDefaultKeywordList Parser/createDefaultKeywordList.cpp ) -target_link_libraries( createDefaultKeywordList buildParser opmjson ${Boost_LIBRARIES}) - - - -# 2. Run the generated application createDefaultKeywordlist - this -# application will recursively scan through all the json keyword -# files in the source tree. It will maintain a signature of these json files, -# and only update the generated files if the json files have changed. -# -# This target will always run - the dependency "management" is -# implicitly handled in the createDefaultKeywordList application. - -set( generated_source ${PROJECT_BINARY_DIR}/generated-source/ParserKeywords.cpp) -# to tune the number of files addDefaultKeywords is split into, change -# generated_num_files. 4 is a very reasonable estimate. -# TODO: support from command line options? -set( generated_num_files 4 ) -math( EXPR generated_num_files_end "${generated_num_files} - 1" ) -foreach( n RANGE ${generated_num_files_end} ) - list(APPEND generated_source ${PROJECT_BINARY_DIR}/generated-source/ParserKeywords${n}.cpp) - set_source_files_properties(${PROJECT_BINARY_DIR}/generated-source/ParserKeywords${n}.cpp PROPERTIES GENERATED TRUE) -endforeach( n ) - -set_source_files_properties(${PROJECT_BINARY_DIR}/generated-source/ParserKeywords.cpp PROPERTIES GENERATED TRUE) -set_source_files_properties(${PROJECT_BINARY_DIR}/generated-source/inlcude/opm/parser/eclipse/Parser/ParserKeywords.hpp PROPERTIES GENERATED TRUE) -set_source_files_properties(${PROJECT_BINARY_DIR}/generated-source/inlineKeywordTest.cpp PROPERTIES GENERATED TRUE) - -add_custom_target( generatedCode ALL COMMAND createDefaultKeywordList - ${PROJECT_SOURCE_DIR}/opm/parser/share/keywords - ${PROJECT_BINARY_DIR}/generated-source/ParserKeywords.cpp - ${PROJECT_BINARY_DIR}/generated-source/include/ - opm/parser/eclipse/Parser/ParserKeywords - ${PROJECT_BINARY_DIR}/generated-source/inlineKeywordTest.cpp - ${generated_num_files} - ) - -opm_add_test( runInlineKeywordTest SOURCES ${PROJECT_BINARY_DIR}/generated-source/inlineKeywordTest.cpp - LIBRARIES opmparser ${opm-common_LIBRARIES} ${Boost_LIBRARIES} - DEPENDS generatedCode ) - -#----------------------------------------------------------------- - -add_library(opmparser ${generated_source} ${state_source} ${rawdeck_source} ${parser_source} ${deck_source} ${unit_source} ${generator_source} ${utility_source}) -add_dependencies( opmparser generatedCode ) -target_link_libraries(opmparser opmjson ${opm-common_LIBRARIES} ${Boost_LIBRARIES} ${ERT_LIBRARIES}) -set_target_properties(opmparser PROPERTIES VERSION ${opm-parser_VERSION_MAJOR}.${opm-parser_VERSION_MINOR} - SOVERSION ${opm-parser_VERSION_MAJOR}) - -include( ${PROJECT_SOURCE_DIR}/cmake/Modules/install_headers.cmake ) -install_headers( "${HEADER_FILES}" "${CMAKE_INSTALL_PREFIX}" ) -install( TARGETS opmparser DESTINATION ${CMAKE_INSTALL_LIBDIR} ) - -install(FILES ${PROJECT_BINARY_DIR}/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords.hpp - DESTINATION include/opm/parser/eclipse/Parser) -install(DIRECTORY ${PROJECT_BINARY_DIR}/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords - DESTINATION include/opm/parser/eclipse/Parser) - -if (ENABLE_PYTHON) - add_subdirectory( python ) -endif() diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/Deck.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/Deck.cpp deleted file mode 100644 index 90e3c6752b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/Deck.cpp +++ /dev/null @@ -1,218 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include - -#include -#include -#include -#include - -namespace Opm { - - bool DeckView::hasKeyword( const DeckKeyword& keyword ) const { - auto key = this->keywordMap.find( keyword.name() ); - - if( key == this->keywordMap.end() ) return false; - - for( auto index : key->second ) - if( &this->getKeyword( index ) == &keyword ) return true; - - return false; - } - - bool DeckView::hasKeyword( const std::string& keyword ) const { - return this->keywordMap.find( keyword ) != this->keywordMap.end(); - } - - const DeckKeyword& DeckView::getKeyword( const std::string& keyword, size_t index ) const { - if( !this->hasKeyword( keyword ) ) - throw std::invalid_argument("Keyword " + keyword + " not in deck."); - - return this->getKeyword( this->offsets( keyword ).at( index ) ); - } - - const DeckKeyword& DeckView::getKeyword( const std::string& keyword ) const { - if( !this->hasKeyword( keyword ) ) - throw std::invalid_argument("Keyword " + keyword + " not in deck."); - - return this->getKeyword( this->offsets( keyword ).back() ); - } - - const DeckKeyword& DeckView::getKeyword( size_t index ) const { - if( index >= this->size() ) - throw std::out_of_range("Keyword index " + std::to_string( index ) + " is out of range."); - - return *( this->begin() + index ); - } - - size_t DeckView::count( const std::string& keyword ) const { - if( !this->hasKeyword( keyword ) ) return 0; - - return this->offsets( keyword ).size(); - } - - const std::vector< const DeckKeyword* > DeckView::getKeywordList( const std::string& keyword ) const { - if( !hasKeyword( keyword ) ) return {}; - - const auto& indices = this->offsets( keyword ); - - std::vector< const DeckKeyword* > ret; - ret.reserve( indices.size() ); - - for( size_t i : indices ) - ret.push_back( &this->getKeyword( i ) ); - - return ret; - } - - size_t DeckView::size() const { - return std::distance( this->begin(), this->end() ); - } - - DeckView::const_iterator DeckView::begin() const { - return this->first; - } - - DeckView::const_iterator DeckView::end() const { - return this->last; - } - - void DeckView::add( const DeckKeyword* kw, const_iterator f, const_iterator l ) { - this->keywordMap[ kw->name() ].push_back( std::distance( f, l ) - 1 ); - this->first = f; - this->last = l; - } - - static const std::vector< size_t > empty_indices = {}; - const std::vector< size_t >& DeckView::offsets( const std::string& keyword ) const { - if( !hasKeyword( keyword ) ) return empty_indices; - - return this->keywordMap.find( keyword )->second; - } - - DeckView::DeckView( const_iterator first_arg, const_iterator last_arg ) : - first( first_arg ), last( last_arg ) - { - size_t index = 0; - for( const auto& kw : *this ) - this->keywordMap[ kw.name() ].push_back( index++ ); - } - - DeckView::DeckView( std::pair< const_iterator, const_iterator > limits ) : - DeckView( limits.first, limits.second ) - {} - - Deck::Deck() : Deck( std::vector< DeckKeyword >() ) {} - - Deck::Deck( std::vector< DeckKeyword >&& x ) : - DeckView( x.begin(), x.end() ), - keywordList( std::move( x ) ), - m_dataFile("") - {} - - Deck::Deck( std::initializer_list< DeckKeyword > ilist ) : - Deck( std::vector< DeckKeyword >( ilist ) ) - {} - - Deck::Deck( std::initializer_list< std::string > ilist ) : - Deck( std::vector< DeckKeyword >( ilist.begin(), ilist.end() ) ) - {} - - void Deck::addKeyword( DeckKeyword&& keyword ) { - this->keywordList.push_back( std::move( keyword ) ); - - auto fst = this->keywordList.begin(); - auto lst = this->keywordList.end(); - - this->add( &this->keywordList.back(), fst, lst ); - } - - void Deck::addKeyword( const DeckKeyword& keyword ) { - DeckKeyword kw = keyword; - this->addKeyword( std::move( kw ) ); - } - - - DeckKeyword& Deck::getKeyword( size_t index ) { - return this->keywordList.at( index ); - } - - MessageContainer& Deck::getMessageContainer() const { - return this->m_messageContainer; - } - - - UnitSystem& Deck::getDefaultUnitSystem() { - if( !this->defaultUnits ) this->initUnitSystem(); - return *this->defaultUnits; - } - - UnitSystem& Deck::getActiveUnitSystem() { - if( !this->activeUnits ) this->initUnitSystem(); - return *this->activeUnits; - } - - const UnitSystem& Deck::getDefaultUnitSystem() const { - if( !this->defaultUnits ) this->initUnitSystem(); - return *this->defaultUnits; - } - - const UnitSystem& Deck::getActiveUnitSystem() const { - if( !this->activeUnits ) this->initUnitSystem(); - return *this->activeUnits; - } - - void Deck::initUnitSystem() const { - /* - * The unit systems are lazily created as their exact value depend on - * input values of the deck, but in a constructed deck this can be - * considered constant (and in fact, if the deck is obtained through - * ParseFromString/File, this these values set before the Deck is - * available). The unit systems are needed from const contexts though, - * but might not have been generated at that time. Generation is done - * in this method, but it has to be callable from const'd this, and are - * marked mutable. - */ - - this->defaultUnits = std::unique_ptr< UnitSystem >( UnitSystem::newMETRIC() ); - if (hasKeyword("FIELD")) - this->activeUnits = std::unique_ptr< UnitSystem >( UnitSystem::newFIELD() ); - else - this->activeUnits = std::unique_ptr< UnitSystem >( UnitSystem::newMETRIC() ); - } - - const std::string Deck::getDataFile() const { - return m_dataFile; - } - - void Deck::setDataFile(const std::string& dataFile) { - m_dataFile = dataFile; - } - - Deck::iterator Deck::begin() { - return this->keywordList.begin(); - } - - Deck::iterator Deck::end() { - return this->keywordList.end(); - } - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/Deck.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/Deck.hpp deleted file mode 100644 index b4744336e8..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/Deck.hpp +++ /dev/null @@ -1,162 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef DECK_HPP -#define DECK_HPP - -#include -#include -#include -#include - -#include - -#include -#include -#include - -#ifdef OPM_PARSER_DECK_API_WARNING -#ifndef OPM_PARSER_DECK_API -#pragma message "\n\n" \ -" ----------------------------------------------------------------------------------\n" \ -" The current compilation unit includes the header Deck.hpp. Outside of opm-parser \n" \ -" you are encouraged to use the EclipseState API instead of the low level Deck API. \n" \ -" If use of the Deck API is absolutely necessary you can silence this warning with \n" \ -" #define OPM_PARSER_DECK_API before including the Deck.hpp header. \n" \ -" ----------------------------------------------------------------------------------\n" \ -"" -#endif -#endif - - - -namespace Opm { - - /* - * The Deck (container) class owns all memory given to it via .addX(), as - * do all inner objects. This means that the Deck object itself must stay - * alive as long as DeckItem (and friends) are needed, to avoid - * use-after-free. - */ - - class DeckView { - public: - typedef std::vector< DeckKeyword >::const_iterator const_iterator; - - bool hasKeyword( const DeckKeyword& keyword ) const; - bool hasKeyword( const std::string& keyword ) const; - template< class Keyword > - bool hasKeyword() const { - return hasKeyword( Keyword::keywordName ); - } - - const DeckKeyword& getKeyword( const std::string& keyword, size_t index ) const; - const DeckKeyword& getKeyword( const std::string& keyword ) const; - const DeckKeyword& getKeyword( size_t index ) const; - DeckKeyword& getKeyword( size_t index ); - template< class Keyword > - const DeckKeyword& getKeyword() const { - return getKeyword( Keyword::keywordName ); - } - template< class Keyword > - const DeckKeyword& getKeyword( size_t index ) const { - return getKeyword( Keyword::keywordName, index ); - } - - const std::vector< const DeckKeyword* > getKeywordList( const std::string& keyword ) const; - template< class Keyword > - const std::vector< const DeckKeyword* > getKeywordList() const { - return getKeywordList( Keyword::keywordName ); - } - - size_t count(const std::string& keyword) const; - size_t size() const; - - const_iterator begin() const; - const_iterator end() const; - - protected: - void add( const DeckKeyword*, const_iterator, const_iterator ); - - const std::vector< size_t >& offsets( const std::string& ) const; - - DeckView( const_iterator first, const_iterator last ); - DeckView( std::pair< const_iterator, const_iterator > ); - - private: - const_iterator first; - const_iterator last; - std::map< std::string, std::vector< size_t > > keywordMap; - - }; - - class Deck : private DeckView { - public: - using DeckView::const_iterator; - using DeckView::hasKeyword; - using DeckView::getKeyword; - using DeckView::getKeywordList; - using DeckView::count; - using DeckView::size; - using DeckView::begin; - using DeckView::end; - - using iterator = std::vector< DeckKeyword >::iterator; - - Deck(); - Deck( std::initializer_list< DeckKeyword > ); - Deck( std::initializer_list< std::string > ); - void addKeyword( DeckKeyword&& keyword ); - void addKeyword( const DeckKeyword& keyword ); - - DeckKeyword& getKeyword( size_t ); - MessageContainer& getMessageContainer() const; - - UnitSystem& getDefaultUnitSystem(); - UnitSystem& getActiveUnitSystem(); - - const UnitSystem& getDefaultUnitSystem() const; - const UnitSystem& getActiveUnitSystem() const; - - const std::string getDataFile() const; - void setDataFile(const std::string& dataFile); - - iterator begin(); - iterator end(); - - private: - Deck( std::vector< DeckKeyword >&& ); - - void initUnitSystem() const; - - - std::vector< DeckKeyword > keywordList; - mutable MessageContainer m_messageContainer; - - mutable std::unique_ptr< UnitSystem > activeUnits; - mutable std::unique_ptr< UnitSystem > defaultUnits; - - std::string m_dataFile; - }; - - typedef std::shared_ptr DeckPtr; - typedef std::shared_ptr DeckConstPtr; -} -#endif /* DECK_HPP */ - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/DeckItem.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/DeckItem.cpp deleted file mode 100644 index 9460d77eb3..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/DeckItem.cpp +++ /dev/null @@ -1,394 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include - -#include - -#include - -namespace Opm { - - template< typename T > - class DeckTypeItem : public DeckItemBase { - public: - const std::string& name() const override; - bool defaultApplied( size_t ) const override; - bool hasValue( size_t ) const override; - size_t size() const override; - - void push_back( T ); - void push_back( T, size_t numValues ); - void push_backDefault( T ); - void push_backDummyDefault() override; - - const T& get( size_t ) const; - const std::vector< T >& getData() const; - - protected: - DeckTypeItem( const std::string&, size_t ); - - private: - std::string item_name; - std::vector< bool > dataPointDefaulted; - std::vector< T > data; - }; - - template< typename T > - class DeckItemT : public DeckTypeItem< T > { - private: - using DeckTypeItem< T >::DeckTypeItem; - std::unique_ptr< DeckItemBase > clone() const override; - - friend class DeckItem; - }; - - template<> - class DeckItemT< double > : public DeckTypeItem< double > { - public: - using DeckTypeItem< double >::DeckTypeItem; - - const double& getSI( size_t ) const; - const std::vector< double >& getSIData() const; - - void push_backDimension( - std::shared_ptr< const Dimension > activeDimension, - std::shared_ptr< const Dimension > defaultDimension ); - - private: - const std::vector< double >& assertSIData() const; - std::unique_ptr< DeckItemBase > clone() const override; - - mutable std::vector< double > SIdata; - std::vector< std::shared_ptr< const Dimension > > dimensions; - - friend class DeckItem; - }; - - template< typename T > static inline DeckItem::type type_to_tag(); - template<> - DeckItem::type type_to_tag< int >() { - return DeckItem::integer; - } - - template<> - DeckItem::type type_to_tag< double >() { - return DeckItem::fdouble; - } - - template<> - DeckItem::type type_to_tag< std::string >() { - return DeckItem::string; - } - - static inline std::string tag_to_string( DeckItem::type x ) { - switch( x ) { - case DeckItem::type::integer: return "int"; - case DeckItem::type::string: return "std::string"; - case DeckItem::type::fdouble: return "double"; - case DeckItem::type::unknown: return "unknown"; - - } - return "unknown"; - } - - - template< typename T > - DeckTypeItem< T >::DeckTypeItem( const std::string& nm, size_t sz ) : - DeckItemBase( type_to_tag< T >() ), - item_name( nm ) - { - this->dataPointDefaulted.reserve( sz ); - this->data.reserve( sz ); - } - - template< typename T > - const std::string& DeckTypeItem< T >::name() const { - return this->item_name; - } - - template< typename T > - bool DeckTypeItem< T >::defaultApplied( size_t index ) const { - return this->dataPointDefaulted.at( index ); - } - - template< typename T > - bool DeckTypeItem< T >::hasValue( size_t index ) const { - return index < this->size(); - } - - template< typename T > - size_t DeckTypeItem< T >::size() const { - return this->data.size(); - } - - template< typename T > - void DeckTypeItem< T >::push_back( T x ) { - if( this->dataPointDefaulted.size() != this->data.size() ) - throw std::logic_error("To add a value to an item, no \"pseudo defaults\" can be added before"); - - this->data.push_back( x ); - this->dataPointDefaulted.push_back( false ); - } - - template< typename T > - void DeckTypeItem< T >::push_backDefault( T data_arg ) { - if( this->dataPointDefaulted.size() != this->data.size() ) - throw std::logic_error("To add a value to an item, no \"pseudo defaults\" can be added before"); - - this->data.push_back( data_arg ); - this->dataPointDefaulted.push_back(true); - } - - template< typename T > - void DeckTypeItem< T >::push_backDummyDefault() { - if( this->dataPointDefaulted.size() != 0 ) - throw std::logic_error("Pseudo defaults can only be specified for empty items"); - - this->dataPointDefaulted.push_back( true ); - } - - template< typename T > - void DeckTypeItem< T >::push_back( T x, size_t numValues ) { - if( this->dataPointDefaulted.size() != this->data.size() ) - throw std::logic_error("To add a value to an item, no \"pseudo defaults\" can be added before"); - - this->data.insert( this->data.end(), numValues, x ); - this->dataPointDefaulted.insert( this->dataPointDefaulted.end(), numValues, false ); - } - - template< typename T > - const T& DeckTypeItem< T >::get( size_t index ) const { - return this->data.at( index ); - } - - template< typename T > - const std::vector< T >& DeckTypeItem< T >::getData() const { - return this->data; - } - - const double& DeckItemT< double >::getSI( size_t index ) const { - return this->assertSIData().at( index ); - } - - const std::vector< double >& DeckItemT< double >::getSIData() const { - return this->assertSIData(); - } - - void DeckItemT< double >::push_backDimension( - std::shared_ptr< const Dimension > activeDimension, - std::shared_ptr< const Dimension > defaultDimension ) { - - if( this->size() == 0 || this->defaultApplied( this->size() - 1 ) ) - this->dimensions.push_back( defaultDimension ); - else - this->dimensions.push_back( activeDimension ); - } - - template< typename T > - std::unique_ptr< DeckItemBase > DeckItemT< T >::clone() const { - return std::unique_ptr< DeckItemBase > { new DeckItemT< T >( *this ) }; - } - - std::unique_ptr< DeckItemBase > DeckItemT< double >::clone() const { - return std::unique_ptr< DeckItemBase > { new DeckItemT< double >( *this ) }; - } - - const std::vector< double >& DeckItemT< double >::assertSIData() const { - // we already converted this item to SI? - if( !this->SIdata.empty() ) return this->SIdata; - - if( this->dimensions.empty() ) - throw std::invalid_argument("No dimension has been set for item:" + this->name() + " can not ask for SI data"); - - /* - * This is an unobservable state change - SIData is lazily converted to - * SI units, so externally the object still behaves as const - */ - const auto dim_size = dimensions.size(); - const auto sz = this->size(); - this->SIdata.resize( sz ); - - for( size_t index = 0; index < sz; index++ ) { - const auto dimIndex = index % dim_size; - this->SIdata[ index ] = this->dimensions[ dimIndex ] - ->convertRawToSi( this->get( index ) ); - } - - return this->SIdata; - } - - template< typename T > - static inline DeckItemT< T >* conv( std::unique_ptr< DeckItemBase >& ptr ) { - if( ptr->type_tag == type_to_tag< T >() ) - return static_cast< DeckItemT< T >* >( ptr.get() ); - - throw std::logic_error( - "Treating item " + ptr->name() - + " as " + tag_to_string( type_to_tag< T >() ) - + ", but is " - + tag_to_string( ptr->type_tag ) ); - } - - template< typename T > - static inline - const DeckItemT< T >* conv( const std::unique_ptr< DeckItemBase >& ptr ) { - if( ptr->type_tag == type_to_tag< T >() ) - return static_cast< const DeckItemT< T >* >( ptr.get() ); - - throw std::logic_error( - "Treating item " + ptr->name() - + " as " + tag_to_string( type_to_tag< T >() ) - + ", but is " - + tag_to_string( ptr->type_tag ) ); - } - - DeckItem::DeckItem( const DeckItem& rhs ) : - ptr( rhs.ptr->clone() ) - {} - - DeckItem::DeckItem( std::unique_ptr< DeckItemBase >&& x ) : - ptr( std::move( x ) ) - {} - - template< typename T > - DeckItem DeckItem::make( const std::string& name, size_t size ) { - return DeckItem( std::unique_ptr< DeckItemBase > { new DeckItemT< T >( name, size ) } ); - } - - const std::string& DeckItem::name() const { - return this->ptr->name(); - } - - bool DeckItem::defaultApplied( size_t index ) const { - return this->ptr->defaultApplied( index ); - } - - bool DeckItem::hasValue( size_t index ) const { - return this->ptr->hasValue( index ); - } - - size_t DeckItem::size() const { - return this->ptr->size(); - } - - template< typename T > - const T& DeckItem::get( size_t index ) const { - return conv< T >( this->ptr )->get( index ); - } - - template< typename T > - const std::vector< T >& DeckItem::getData() const { - return conv< T >( this->ptr )->getData(); - } - - template< typename T > - void DeckItem::push_back( T x ) { - return conv< T >( this->ptr )->push_back( x ); - } - - template< typename T > - void DeckItem::push_back( T x, size_t n ) { - return conv< T >( this->ptr )->push_back( x, n ); - } - - template< typename T > - void DeckItem::push_backDefault( T x ) { - return conv< T >( this->ptr )->push_backDefault( x ); - } - - template<> - void DeckItem::push_back( const char* x ) { - return conv< std::string >( this->ptr )->push_back( x ); - } - - template<> - void DeckItem::push_back( const char* x, size_t n ) { - return conv< std::string >( this->ptr )->push_back( x, n ); - } - - template<> - void DeckItem::push_backDefault( const char* x ) { - return conv< std::string >( this->ptr )->push_backDefault( x ); - } - - void DeckItem::push_backDummyDefault() { - return this->ptr->push_backDummyDefault(); - } - - std::string DeckItem::getTrimmedString( size_t index ) const { - return boost::algorithm::trim_copy( - conv< std::string >( this->ptr )->get( index ) - ); - } - - double DeckItem::getSIDouble( size_t index ) const { - return conv< double >( this->ptr )->getSI( index ); - } - - const std::vector< double >& DeckItem::getSIDoubleData() const { - return conv< double >( this->ptr )->getSIData(); - } - - void DeckItem::push_backDimension( std::shared_ptr< const Dimension > active, - std::shared_ptr< const Dimension > def ) { - return conv< double >( this->ptr )->push_backDimension( active, def ); - } - - DeckItem::type DeckItem::typeof() const { - return this->ptr->type_tag; - } - - /* - * Explicit template instantiations. These must be manually maintained and - * updated with changes in DeckItem so that code is emitted. - */ - - template class DeckTypeItem< int >; - template class DeckTypeItem< double >; - template class DeckTypeItem< std::string >; - - template class DeckItemT< int >; - template class DeckItemT< double >; - template class DeckItemT< std::string >; - - template DeckItem DeckItem::make< int >( const std::string&, size_t ); - template DeckItem DeckItem::make< double >( const std::string&, size_t ); - template DeckItem DeckItem::make< std::string >( const std::string&, size_t ); - - template const int& DeckItem::get< int >( size_t ) const; - template const double& DeckItem::get< double >( size_t ) const; - template const std::string& DeckItem::get< std::string >( size_t ) const; - - template const std::vector< int >& DeckItem::getData< int >() const; - template const std::vector< double >& DeckItem::getData< double >() const; - template const std::vector< std::string >& DeckItem::getData< std::string >() const; - - template void DeckItem::push_back< int >( int ); - template void DeckItem::push_back< double >( double ); - template void DeckItem::push_back< std::string >( std::string ); - template void DeckItem::push_back< int >( int, size_t ); - template void DeckItem::push_back< double >( double, size_t ); - template void DeckItem::push_back< std::string >( std::string, size_t ); - template void DeckItem::push_backDefault< int >( int ); - template void DeckItem::push_backDefault< double >( double ); - template void DeckItem::push_backDefault< std::string >( std::string ); - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/DeckItem.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/DeckItem.hpp deleted file mode 100644 index 9fd5a778b6..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/DeckItem.hpp +++ /dev/null @@ -1,111 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef DECKITEM_HPP -#define DECKITEM_HPP - -#include -#include -#include - -namespace Opm { - - class DeckItem; - class Dimension; - class DeckItemBase; - - class DeckItem { - public: - DeckItem() = delete; - DeckItem( const DeckItem& ); - - /* for python interop as well as queries, must be manually synchronised - * with cdeck_item.cc and opm/deck/item_type_enum.py - */ - enum type { - unknown = 0, /* this signals an error */ - integer = 1, - string = 2, - fdouble = 3 - }; - - template< typename T > - static DeckItem make( const std::string&, size_t = 1 ); - - const std::string& name() const; - - // return true if the default value was used for a given data point - bool defaultApplied( size_t ) const; - - // Return true if the item has a value for the current index; - // does not differentiate between default values from the - // config and values which have been set in the deck. - bool hasValue( size_t ) const; - - // if the number returned by this method is less than what is semantically - // expected (e.g. size() is less than the number of cells in the grid for - // keywords like e.g. SGL), then the remaining values are defaulted. The deck - // creates the defaulted items if all their sizes are fully specified by the - // keyword, though... - size_t size() const; - - template< typename T > const T& get( size_t ) const; - double getSIDouble( size_t ) const; - std::string getTrimmedString( size_t ) const; - - template< typename T > const std::vector< T >& getData() const; - const std::vector< double >& getSIDoubleData() const; - - template< typename T > void push_back( T ); - template< typename T > void push_back( T, size_t ); - template< typename T > void push_backDefault( T ); - // trying to access the data of a "dummy default item" will raise an exception - void push_backDummyDefault(); - - void push_backDimension(std::shared_ptr /* activeDimension */, - std::shared_ptr /* defaultDimension */); - - type typeof() const; - - private: - DeckItem( std::unique_ptr< DeckItemBase >&& ); - std::unique_ptr< DeckItemBase > ptr; - }; - - class DeckItemBase { - public: - virtual const std::string& name() const = 0; - virtual bool defaultApplied( size_t ) const = 0; - virtual bool hasValue( size_t ) const = 0; - virtual size_t size() const = 0; - virtual void push_backDummyDefault() = 0; - virtual ~DeckItemBase() = default; - const DeckItem::type type_tag; - - protected: - DeckItemBase( DeckItem::type tag ) : type_tag( tag ) {} - - private: - virtual std::unique_ptr< DeckItemBase > clone() const = 0; - friend class DeckItem; - }; - -} -#endif /* DECKITEM_HPP */ - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/DeckKeyword.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/DeckKeyword.cpp deleted file mode 100644 index eda3d30e22..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/DeckKeyword.cpp +++ /dev/null @@ -1,128 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include "DeckKeyword.hpp" -#include "DeckRecord.hpp" -#include "DeckItem.hpp" - -namespace Opm { - - DeckKeyword::DeckKeyword(const std::string& keywordName) { - m_knownKeyword = true; - m_keywordName = keywordName; - m_isDataKeyword = false; - m_fileName = ""; - m_lineNumber = -1; - } - - DeckKeyword::DeckKeyword(const std::string& keywordName, bool knownKeyword) { - m_knownKeyword = knownKeyword; - m_keywordName = keywordName; - m_isDataKeyword = false; - m_fileName = ""; - m_lineNumber = -1; - } - - void DeckKeyword::setLocation(const std::string& fileName, int lineNumber) { - m_fileName = fileName; - m_lineNumber = lineNumber; - } - - const std::string& DeckKeyword::getFileName() const { - return m_fileName; - } - - int DeckKeyword::getLineNumber() const { - return m_lineNumber; - } - - void DeckKeyword::setDataKeyword(bool isDataKeyword_) { - m_isDataKeyword = isDataKeyword_; - } - - bool DeckKeyword::isDataKeyword() const { - return m_isDataKeyword; - } - - - const std::string& DeckKeyword::name() const { - return m_keywordName; - } - - size_t DeckKeyword::size() const { - return m_recordList.size(); - } - - bool DeckKeyword::isKnown() const { - return m_knownKeyword; - } - - void DeckKeyword::addRecord(DeckRecord&& record) { - this->m_recordList.push_back( std::move( record ) ); - } - - DeckKeyword::const_iterator DeckKeyword::begin() const { - return m_recordList.begin(); - } - - DeckKeyword::const_iterator DeckKeyword::end() const { - return m_recordList.end(); - } - - const DeckRecord& DeckKeyword::getRecord(size_t index) const { - return this->m_recordList.at( index ); - } - - DeckRecord& DeckKeyword::getRecord(size_t index) { - return this->m_recordList.at( index ); - } - - const DeckRecord& DeckKeyword::getDataRecord() const { - if (m_recordList.size() == 1) - return getRecord(0); - else - throw std::range_error("Not a data keyword \"" + name() + "\"?"); - } - - - size_t DeckKeyword::getDataSize() const { - return this->getDataRecord().getDataItem().size(); - } - - - const std::vector& DeckKeyword::getIntData() const { - return this->getDataRecord().getDataItem().getData< int >(); - } - - - const std::vector& DeckKeyword::getStringData() const { - return this->getDataRecord().getDataItem().getData< std::string >(); - } - - - const std::vector& DeckKeyword::getRawDoubleData() const { - return this->getDataRecord().getDataItem().getData< double >(); - } - - const std::vector& DeckKeyword::getSIDoubleData() const { - return this->getDataRecord().getDataItem().getSIDoubleData(); - } - -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/DeckKeyword.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/DeckKeyword.hpp deleted file mode 100644 index 0f327567a3..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/DeckKeyword.hpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef DECKKEYWORD_HPP -#define DECKKEYWORD_HPP - -#include -#include -#include - -#include - -namespace Opm { - class ParserKeyword; - - class DeckKeyword { - public: - typedef std::vector< DeckRecord >::const_iterator const_iterator; - - DeckKeyword(const std::string& keywordName); - DeckKeyword(const std::string& keywordName, bool knownKeyword); - - const std::string& name() const; - void setLocation(const std::string& fileName, int lineNumber); - const std::string& getFileName() const; - int getLineNumber() const; - - size_t size() const; - void addRecord(DeckRecord&& record); - const DeckRecord& getRecord(size_t index) const; - DeckRecord& getRecord(size_t index); - const DeckRecord& getDataRecord() const; - void setDataKeyword(bool isDataKeyword = true); - bool isKnown() const; - bool isDataKeyword() const; - - const std::vector& getIntData() const; - const std::vector& getRawDoubleData() const; - const std::vector& getSIDoubleData() const; - const std::vector& getStringData() const; - size_t getDataSize() const; - - template - bool isKeyword() const { - if (Keyword::keywordName == m_keywordName) - return true; - else - return false; - } - - const_iterator begin() const; - const_iterator end() const; - - private: - std::string m_keywordName; - std::string m_fileName; - int m_lineNumber; - - std::vector< DeckRecord > m_recordList; - bool m_knownKeyword; - bool m_isDataKeyword; - }; -} - -#endif /* DECKKEYWORD_HPP */ - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/DeckRecord.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/DeckRecord.cpp deleted file mode 100644 index d2b53834b5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/DeckRecord.cpp +++ /dev/null @@ -1,133 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - -#include -#include -#include -#include - -#include -#include - - -namespace Opm { - - - DeckRecord::DeckRecord( std::vector< DeckItem >&& items ) : - m_items( std::move( items ) ) { - - std::unordered_set< std::string > names; - for( const auto& item : this->m_items ) - names.insert( item.name() ); - - if( names.size() == this->m_items.size() ) - return; - - names.clear(); - std::string msg = "Duplicate item names in DeckRecord:"; - for( const auto& item : this->m_items ) { - if( names.count( item.name() ) != 0 ) - msg += std::string( " " ) += item.name(); - - names.insert( item.name() ); - } - - throw std::invalid_argument( msg ); - } - - size_t DeckRecord::size() const { - return m_items.size(); - } - - void DeckRecord::addItem( DeckItem&& deckItem ) { - if( this->hasItem( deckItem.name() ) ) - throw std::invalid_argument( - "Item with name: " - + deckItem.name() - + " already exists in DeckRecord"); - - m_items.push_back( std::move( deckItem ) ); - } - - DeckItem& DeckRecord::getItem( size_t index ) { - return this->m_items.at( index ); - } - - DeckItem& DeckRecord::getItem(const std::string& name) { - const auto eq = [&name]( const DeckItem& e ) { - return e.name() == name; - }; - - auto item = std::find_if( m_items.begin(), m_items.end(), eq ); - - if( item == m_items.end() ) - throw std::invalid_argument("Item: " + name + " does not exist."); - - return *item; - } - - DeckItem& DeckRecord::getDataItem() { - if (m_items.size() == 1) - return getItem(0); - else - throw std::range_error("Not a data keyword ?"); - } - - const DeckItem& DeckRecord::getItem( size_t index ) const { - return this->m_items.at( index ); - } - - const DeckItem& DeckRecord::getItem(const std::string& name) const { - const auto eq = [&name]( const DeckItem& e ) { - return e.name() == name; - }; - - auto item = std::find_if( this->begin(), this->end(), eq ); - - if( item == m_items.end() ) - throw std::invalid_argument("Item: " + name + " does not exist."); - - return *item; - } - - const DeckItem& DeckRecord::getDataItem() const { - if (m_items.size() == 1) - return getItem(0); - else - throw std::range_error("Not a data keyword ?"); - } - - bool DeckRecord::hasItem(const std::string& name) const { - const auto eq = [&name]( const DeckItem& e ) { - return e.name() == name; - }; - - return std::any_of( this->begin(), this->end(), eq ); - } - - DeckRecord::const_iterator DeckRecord::begin() const { - return this->m_items.begin(); - } - - DeckRecord::const_iterator DeckRecord::end() const { - return this->m_items.end(); - } - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/DeckRecord.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/DeckRecord.hpp deleted file mode 100644 index 752f91c3ab..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/DeckRecord.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef DECKRECORD_HPP -#define DECKRECORD_HPP - -#include -#include -#include - -#include - -namespace Opm { - - class DeckRecord { - public: - typedef std::vector< DeckItem >::const_iterator const_iterator; - - DeckRecord() = default; - DeckRecord( std::vector< DeckItem >&& ); - - size_t size() const; - void addItem( DeckItem&& deckItem ); - - DeckItem& getItem( size_t index ); - DeckItem& getItem( const std::string& name ); - DeckItem& getDataItem(); - - const DeckItem& getItem( size_t index ) const; - const DeckItem& getItem( const std::string& name ) const; - const DeckItem& getDataItem() const; - - bool hasItem(const std::string& name) const; - - template - DeckItem& getItem() { - return getItem( Item::itemName ); - } - - template - const DeckItem& getItem() const { - return getItem( Item::itemName ); - } - - const_iterator begin() const; - const_iterator end() const; - - private: - std::vector< DeckItem > m_items; - - }; - -} -#endif /* DECKRECORD_HPP */ - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/Section.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/Section.cpp deleted file mode 100644 index f0e8ec90b4..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/Section.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -namespace Opm { - - static bool isSectionDelimiter( const DeckKeyword& keyword ) { - const auto& name = keyword.name(); - for( const auto& x : { "RUNSPEC", "GRID", "EDIT", "PROPS", - "REGIONS", "SOLUTION", "SUMMARY", "SCHEDULE" } ) - if( name == x ) return true; - - return false; - } - - static std::pair< DeckView::const_iterator, DeckView::const_iterator > - find_section( const Deck& deck, const std::string& keyword ) { - - const auto fn = [&keyword]( const DeckKeyword& kw ) { - return kw.name() == keyword; - }; - - auto first = std::find_if( deck.begin(), deck.end(), fn ); - - if( first == deck.end() ) - return { first, first }; - - auto last = std::find_if( first + 1, deck.end(), isSectionDelimiter ); - - if( last != deck.end() && last->name() == keyword ) - throw std::invalid_argument( std::string( "Deck contains the '" ) + keyword + "' section multiple times" ); - - return { first, last }; - } - - Section::Section( const Deck& deck, const std::string& section ) - : DeckView( find_section( deck, section ) ), - section_name( section ), - units( deck.getActiveUnitSystem() ) - {} - - const std::string& Section::name() const { - return this->section_name; - } - - const UnitSystem& Section::unitSystem() const { - return this->units; - } - - bool Section::hasRUNSPEC(const Deck& deck) { return deck.hasKeyword( "RUNSPEC" ); } - bool Section::hasGRID(const Deck& deck) { return deck.hasKeyword( "GRID" ); } - bool Section::hasEDIT(const Deck& deck) { return deck.hasKeyword( "EDIT" ); } - bool Section::hasPROPS(const Deck& deck) { return deck.hasKeyword( "PROPS" ); } - bool Section::hasREGIONS(const Deck& deck) { return deck.hasKeyword( "REGIONS" ); } - bool Section::hasSOLUTION(const Deck& deck) { return deck.hasKeyword( "SOLUTION" ); } - bool Section::hasSUMMARY(const Deck& deck) { return deck.hasKeyword( "SUMMARY" ); } - bool Section::hasSCHEDULE(const Deck& deck) { return deck.hasKeyword( "SCHEDULE" ); } - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/Section.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/Section.hpp deleted file mode 100644 index 2bbbf28b56..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/Section.hpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef SECTION_HPP -#define SECTION_HPP - -#include - -#include - -namespace Opm { - - class UnitSystem; - class Parser; - -class Section : public DeckView { - public: - using DeckView::const_iterator; - - Section( const Deck& deck, const std::string& startKeyword ); - const std::string& name() const; - const UnitSystem& unitSystem() const; - - static bool hasRUNSPEC( const Deck& ); - static bool hasGRID( const Deck& ); - static bool hasEDIT( const Deck& ); - static bool hasPROPS( const Deck& ); - static bool hasREGIONS( const Deck& ); - static bool hasSOLUTION( const Deck& ); - static bool hasSUMMARY( const Deck& ); - static bool hasSCHEDULE( const Deck& ); - - // returns whether the deck has all mandatory sections and if all sections are in - // the right order - static bool checkSectionTopology(const Deck& deck, - const Parser&, - bool ensureKeywordSectionAffiliation = false); - - private: - std::string section_name; - const UnitSystem& units; - - }; - - class RUNSPECSection : public Section { - public: - using Section::const_iterator; - RUNSPECSection(const Deck& deck) : Section(deck, "RUNSPEC") {} - }; - - class GRIDSection : public Section { - public: - using Section::const_iterator; - GRIDSection(const Deck& deck) : Section(deck, "GRID") {} - }; - - class EDITSection : public Section { - public: - using Section::const_iterator; - EDITSection(const Deck& deck) : Section(deck, "EDIT") {} - }; - - class PROPSSection : public Section { - public: - using Section::const_iterator; - PROPSSection(const Deck& deck) : Section(deck, "PROPS") {} - }; - - class REGIONSSection : public Section { - public: - using Section::const_iterator; - REGIONSSection(const Deck& deck) : Section(deck, "REGIONS") {} - }; - - class SOLUTIONSection : public Section { - public: - using Section::const_iterator; - SOLUTIONSection(const Deck& deck) : Section(deck, "SOLUTION") {} - }; - - class SUMMARYSection : public Section { - public: - using Section::const_iterator; - SUMMARYSection(const Deck& deck) : Section(deck, "SUMMARY") {} - }; - - class SCHEDULESection : public Section { - public: - using Section::const_iterator; - SCHEDULESection(const Deck& deck) : Section(deck, "SCHEDULE") {} - }; -} - -#endif // SECTION_HPP diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/tests/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/tests/CMakeLists.txt deleted file mode 100644 index d8e441b6bf..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/tests/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -foreach(tapp DeckRecordTests DeckIntItemTests DeckDoubleItemTests - DeckStringItemTests DeckTests DeckKeywordTests SectionTests) - opm_add_test(run${tapp} SOURCES ${tapp}.cpp - LIBRARIES opmparser ${Boost_LIBRARIES}) -endforeach() diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/tests/DeckDoubleItemTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/tests/DeckDoubleItemTests.cpp deleted file mode 100644 index f39e970ed9..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/tests/DeckDoubleItemTests.cpp +++ /dev/null @@ -1,164 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - -#define BOOST_TEST_MODULE DeckItemTests - -#include - -#include -#include - -#include - -using namespace Opm; - -BOOST_AUTO_TEST_CASE(InitializeDouble) { - BOOST_REQUIRE_NO_THROW( DeckItem::make< double >("HEI") ); -} - -BOOST_AUTO_TEST_CASE(GetDoubleAtIndex_NoData_ExceptionThrown) { - auto deckDoubleItem = DeckItem::make< double >("TEST"); - - BOOST_CHECK_THROW(deckDoubleItem.get< double >(0), std::out_of_range); - deckDoubleItem.push_back(1.89); - BOOST_CHECK_THROW(deckDoubleItem.get< double >(1), std::out_of_range); -} - - -BOOST_AUTO_TEST_CASE(sizeDouble_correct) { - auto deckDoubleItem = DeckItem::make< double >("TEST"); - - BOOST_CHECK_EQUAL( 0U , deckDoubleItem.size()); - deckDoubleItem.push_back( 100.0 ); - BOOST_CHECK_EQUAL( 1U , deckDoubleItem.size()); - - deckDoubleItem.push_back( 100.0 ); - deckDoubleItem.push_back( 100.0 ); - BOOST_CHECK_EQUAL( 3U , deckDoubleItem.size()); -} - - - -BOOST_AUTO_TEST_CASE(SetInDeck) { - auto deckDoubleItem = DeckItem::make< double >("TEST"); - BOOST_CHECK( deckDoubleItem.size() == 0 ); - - deckDoubleItem.push_backDefault( 1.0 ); - BOOST_CHECK( deckDoubleItem.size() == 1 ); - BOOST_CHECK_EQUAL( true , deckDoubleItem.defaultApplied(0) ); - - deckDoubleItem.push_back( 10.0 ); - BOOST_CHECK( deckDoubleItem.size() == 2 ); - BOOST_CHECK_EQUAL( false , deckDoubleItem.defaultApplied(1) ); - - deckDoubleItem.push_backDefault( 1.0 ); - BOOST_CHECK( deckDoubleItem.size() == 3 ); - BOOST_CHECK_EQUAL( true , deckDoubleItem.defaultApplied(2) ); -} - -BOOST_AUTO_TEST_CASE(DummyDefaults) { - auto deckDoubleItem = DeckItem::make< double >("TEST"); - BOOST_CHECK_EQUAL(deckDoubleItem.size(), 0); - - deckDoubleItem.push_backDummyDefault(); - BOOST_CHECK_EQUAL(deckDoubleItem.size(), 0); - BOOST_CHECK_EQUAL(true, deckDoubleItem.defaultApplied(0)); - BOOST_CHECK_THROW(deckDoubleItem.get< double >(0), std::out_of_range); -} - -BOOST_AUTO_TEST_CASE(PushBackMultiple) { - auto item = DeckItem::make< double >("HEI"); - item.push_back(10.22 , 100 ); - BOOST_CHECK_EQUAL( 100U , item.size() ); - for (size_t i=0; i < 100; i++) - BOOST_CHECK_EQUAL(10.22 , item.get< double >(i)); -} - -BOOST_AUTO_TEST_CASE(PushBackDimension) { - auto item = DeckItem::make< double >("HEI"); - std::shared_ptr activeDimension(new Dimension("Length" , 100)); - std::shared_ptr defaultDimension(new Dimension("Length" , 10)); - - item.push_back(1.234); - item.push_backDimension( activeDimension , defaultDimension); - - item.push_backDefault(5.678); - item.push_backDimension( activeDimension , defaultDimension); -} - -BOOST_AUTO_TEST_CASE(PushBackDimensionInvalidType) { - auto item = DeckItem::make< int >("HEI"); - std::shared_ptr dim(new Dimension("Length" , 100)); - BOOST_CHECK_THROW( item.push_backDimension( dim , dim ) , std::logic_error ); -} - -BOOST_AUTO_TEST_CASE(GetSIWithoutDimensionThrows) { - auto item = DeckItem::make< double >("HEI"); - item.push_back(10.22 , 100 ); - - BOOST_CHECK_THROW( item.getSIDouble(0) , std::invalid_argument ); - BOOST_CHECK_THROW( item.getSIDoubleData() , std::invalid_argument ); -} - -BOOST_AUTO_TEST_CASE(GetSISingleDimensionCorrect) { - auto item = DeckItem::make< double >("HEI"); - std::shared_ptr dim(new Dimension("Length" , 100)); - - item.push_back(1.0 , 100 ); - item.push_backDimension( dim , dim ); - - BOOST_CHECK_EQUAL( 1.0 , item.get< double >(0) ); - BOOST_CHECK_EQUAL( 100 , item.getSIDouble(0) ); -} - -BOOST_AUTO_TEST_CASE(GetSISingleDefault) { - auto item = DeckItem::make< double >("HEI"); - std::shared_ptr dim(new Dimension("Length" , 1)); - std::shared_ptr defaultDim(new Dimension("Length" , 100)); - - item.push_backDefault( 1.0 ); - item.push_backDimension( dim , defaultDim ); - - BOOST_CHECK_EQUAL( 1 , item.get< double >(0) ); - BOOST_CHECK_EQUAL( 100 , item.getSIDouble(0) ); -} - -BOOST_AUTO_TEST_CASE(GetSIMultipleDim) { - auto item = DeckItem::make< double >("HEI"); - std::shared_ptr dim1(new Dimension("Length" , 2)); - std::shared_ptr dim2(new Dimension("Length" , 4)); - std::shared_ptr dim3(new Dimension("Length" , 8)); - std::shared_ptr dim4(new Dimension("Length" ,16)); - std::shared_ptr defaultDim(new Dimension("Length" , 100)); - - item.push_back( 1.0, 16 ); - item.push_backDimension( dim1 , defaultDim ); - item.push_backDimension( dim2 , defaultDim ); - item.push_backDimension( dim3 , defaultDim ); - item.push_backDimension( dim4 , defaultDim ); - - for (size_t i=0; i < 16; i+= 4) { - BOOST_CHECK_EQUAL( 2 , item.getSIDouble(i) ); - BOOST_CHECK_EQUAL( 4 , item.getSIDouble(i+ 1) ); - BOOST_CHECK_EQUAL( 8 , item.getSIDouble(i+2) ); - BOOST_CHECK_EQUAL(16 , item.getSIDouble(i+3) ); - } -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/tests/DeckIntItemTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/tests/DeckIntItemTests.cpp deleted file mode 100644 index 9985828596..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/tests/DeckIntItemTests.cpp +++ /dev/null @@ -1,128 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE DeckItemTests - -#include - -#include -#include - -using namespace Opm; - -BOOST_AUTO_TEST_CASE(Initialize) { - BOOST_REQUIRE_NO_THROW( DeckItem::make< int >("TEST") ); -} - - -BOOST_AUTO_TEST_CASE(HasValue) { - auto deckIntItem = DeckItem::make< int >("TEST"); - BOOST_CHECK_EQUAL( false , deckIntItem.hasValue(0) ); - deckIntItem.push_back(1); - BOOST_CHECK_EQUAL( true , deckIntItem.hasValue(0) ); - BOOST_CHECK_EQUAL( false , deckIntItem.hasValue(1) ); -} - -BOOST_AUTO_TEST_CASE(DummyDefaults) { - auto deckIntItem = DeckItem::make< int >("TEST"); - BOOST_CHECK_EQUAL(deckIntItem.size(), 0); - - deckIntItem.push_backDummyDefault(); - BOOST_CHECK_EQUAL(deckIntItem.size(), 0); - BOOST_CHECK_EQUAL(true, deckIntItem.defaultApplied(0)); - BOOST_CHECK_EQUAL( false , deckIntItem.hasValue(0)); - BOOST_CHECK_EQUAL( false , deckIntItem.hasValue(1)); - BOOST_CHECK_THROW(deckIntItem.get< int >(0), std::out_of_range); -} - -BOOST_AUTO_TEST_CASE(GetIntAtIndex_NoData_ExceptionThrown) { - auto deckIntItem = DeckItem::make< int >("TEST"); - deckIntItem.push_back(100); - BOOST_CHECK(deckIntItem.get< int >(0) == 100); - BOOST_CHECK_THROW(deckIntItem.get< int >(1), std::out_of_range); -} - -BOOST_AUTO_TEST_CASE(InitializeDefaultApplied) { - auto deckIntItem = DeckItem::make< int >("TEST"); - BOOST_CHECK( deckIntItem.size() == 0 ); -} - -BOOST_AUTO_TEST_CASE(size_correct) { - auto deckIntItem = DeckItem::make< int >("TEST"); - - BOOST_CHECK_EQUAL( 0U , deckIntItem.size()); - deckIntItem.push_back( 100 ); - BOOST_CHECK_EQUAL( 1U , deckIntItem.size()); - - deckIntItem.push_back( 100 ); - deckIntItem.push_back( 100 ); - BOOST_CHECK_EQUAL( 3U , deckIntItem.size()); -} - -BOOST_AUTO_TEST_CASE(DefaultNotApplied) { - auto deckIntItem = DeckItem::make< int >("TEST"); - BOOST_CHECK( deckIntItem.size() == 0 ); - - deckIntItem.push_back( 100 ); - BOOST_CHECK( deckIntItem.size() == 1 ); - BOOST_CHECK( deckIntItem.get< int >(0) == 100 ); - BOOST_CHECK( !deckIntItem.defaultApplied(0) ); - - BOOST_CHECK_THROW( deckIntItem.defaultApplied(1), std::out_of_range ); - BOOST_CHECK_THROW( deckIntItem.get< int >(1), std::out_of_range ); -} - -BOOST_AUTO_TEST_CASE(UseDefault) { - auto deckIntItem = DeckItem::make< int >("TEST"); - - deckIntItem.push_backDefault( 100 ); - - BOOST_CHECK( deckIntItem.defaultApplied(0) ); - BOOST_CHECK( deckIntItem.get< int >(0) == 100 ); - - BOOST_CHECK_THROW( deckIntItem.defaultApplied(1), std::out_of_range ); - BOOST_CHECK_THROW( deckIntItem.get< int >(1), std::out_of_range ); -} - -BOOST_AUTO_TEST_CASE(DefaultApplied) { - auto deckIntItem = DeckItem::make< int >("TEST"); - BOOST_CHECK( deckIntItem.size() == 0 ); - - deckIntItem.push_backDefault( 100 ); - BOOST_CHECK( deckIntItem.size() == 1 ); - BOOST_CHECK( deckIntItem.get< int >(0) == 100 ); - BOOST_CHECK( deckIntItem.defaultApplied(0) ); - deckIntItem.push_back( 10 ); - BOOST_CHECK_EQUAL( false, deckIntItem.defaultApplied(1) ); - deckIntItem.push_backDefault( 1 ); - BOOST_CHECK_EQUAL( true , deckIntItem.defaultApplied(2) ); - BOOST_CHECK_EQUAL( 3 , deckIntItem.size() ); -} - - -BOOST_AUTO_TEST_CASE(PushBackMultiple) { - auto item = DeckItem::make< int >("HEI"); - item.push_back(10 , 100U ); - BOOST_CHECK_EQUAL( 100U , item.size() ); - for (size_t i=0; i < 100; i++) - BOOST_CHECK_EQUAL(10 , item.get< int >(i)); -} - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/tests/DeckKeywordTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/tests/DeckKeywordTests.cpp deleted file mode 100644 index 9549d71e9b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/tests/DeckKeywordTests.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - -#include - -#define BOOST_TEST_MODULE DeckKeywordTests - -#include - - -#include -#include -#include - -using namespace Opm; - -BOOST_AUTO_TEST_CASE(Initialize) { - DeckKeyword deckKeyword1("KW"); -} - -BOOST_AUTO_TEST_CASE(DataKeyword) { - DeckKeyword kw("KW"); - BOOST_CHECK_EQUAL( false , kw.isDataKeyword()); - kw.setDataKeyword( ); - BOOST_CHECK_EQUAL( true , kw.isDataKeyword()); - kw.setDataKeyword( false ); - BOOST_CHECK_EQUAL( false , kw.isDataKeyword()); - kw.setDataKeyword( true ); - BOOST_CHECK_EQUAL( true , kw.isDataKeyword()); -} - - - -BOOST_AUTO_TEST_CASE(name_nameSetInConstructor_nameReturned) { - DeckKeyword deckKeyword( "KW" ); - BOOST_CHECK_EQUAL("KW", deckKeyword.name()); -} - -BOOST_AUTO_TEST_CASE(size_noRecords_returnszero) { - DeckKeyword deckKeyword( "KW" ); - BOOST_CHECK_EQUAL(0U, deckKeyword.size()); -} - - -BOOST_AUTO_TEST_CASE(addRecord_onerecord_recordadded) { - DeckKeyword deckKeyword( "KW" ); - deckKeyword.addRecord( DeckRecord() ); - BOOST_CHECK_EQUAL(1U, deckKeyword.size()); - for (auto iter = deckKeyword.begin(); iter != deckKeyword.end(); ++iter) { - // - } - -} - -BOOST_AUTO_TEST_CASE(getRecord_outofrange_exceptionthrown) { - DeckKeyword deckKeyword( "KW" ); - deckKeyword.addRecord(DeckRecord()); - BOOST_CHECK_THROW(deckKeyword.getRecord(1), std::out_of_range); -} - -BOOST_AUTO_TEST_CASE(setUnknown_wasknown_nowunknown) { - DeckKeyword deckKeyword( "KW", false ); - BOOST_CHECK(!deckKeyword.isKnown()); -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/tests/DeckRecordTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/tests/DeckRecordTests.cpp deleted file mode 100644 index e66056142d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/tests/DeckRecordTests.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - -#define BOOST_TEST_MODULE DeckRecordTests - -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace Opm; - -static DeckItem mkIntItem( std::string name ) { - return DeckItem::make< int >( name ); -} - -BOOST_AUTO_TEST_CASE(Initialize) { - BOOST_CHECK_NO_THROW(DeckRecord deckRecord); -} - -BOOST_AUTO_TEST_CASE(size_defaultConstructor_sizezero) { - DeckRecord deckRecord; - BOOST_CHECK_EQUAL(0U, deckRecord.size()); -} - -BOOST_AUTO_TEST_CASE(addItem_singleItem_sizeone) { - DeckRecord deckRecord; - deckRecord.addItem( mkIntItem( "TEST" ) ); - BOOST_CHECK_EQUAL(1U, deckRecord.size()); -} - -BOOST_AUTO_TEST_CASE(addItem_multipleItems_sizecorrect) { - - DeckRecord deckRecord; - deckRecord.addItem( mkIntItem( "TEST" ) ); - deckRecord.addItem( mkIntItem( "TEST2" ) ); - deckRecord.addItem( mkIntItem( "TEST3" ) ); - - BOOST_CHECK_EQUAL(3U, deckRecord.size()); -} - -BOOST_AUTO_TEST_CASE(addItem_sameItemTwoTimes_throws) { - DeckRecord deckRecord; - auto intItem1 = mkIntItem( "TEST" ); - deckRecord.addItem( std::move( intItem1 ) ); - BOOST_CHECK_THROW(deckRecord.addItem( std::move( intItem1 ) ), std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(addItem_differentItemsSameName_throws) { - DeckRecord deckRecord; - deckRecord.addItem( mkIntItem( "TEST" ) ); - BOOST_CHECK_THROW( deckRecord.addItem( mkIntItem( "TEST" ) ), std::invalid_argument ); - std::vector< DeckItem > items = { mkIntItem( "TEST" ), mkIntItem( "TEST" ) }; - BOOST_CHECK_THROW( DeckRecord( std::move( items ) ), std::invalid_argument ); -} - -BOOST_AUTO_TEST_CASE(get_byIndex_returnsItem) { - DeckRecord deckRecord; - deckRecord.addItem( mkIntItem( "TEST" ) ); - BOOST_CHECK_NO_THROW(deckRecord.getItem(0U)); -} - -BOOST_AUTO_TEST_CASE(get_indexoutofbounds_throws) { - DeckRecord deckRecord; - deckRecord.addItem( mkIntItem( "TEST" ) ); - BOOST_CHECK_THROW(deckRecord.getItem(1), std::out_of_range); -} - -BOOST_AUTO_TEST_CASE(get_byName_returnsItem) { - DeckRecord deckRecord; - deckRecord.addItem( mkIntItem( "TEST" ) ); - deckRecord.getItem("TEST"); -} - -BOOST_AUTO_TEST_CASE(get_byNameNonExisting_throws) { - DeckRecord deckRecord; - deckRecord.addItem( mkIntItem( "TEST" ) ); - BOOST_CHECK_THROW(deckRecord.getItem("INVALID"), std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(StringsWithSpaceOK) { - ParserStringItemPtr itemString(new ParserStringItem(std::string("STRINGITEM1"))); - ParserRecordPtr record1(new ParserRecord()); - RawRecord rawRecord( " ' VALUE ' " ); - ParseContext parseContext; - MessageContainer msgContainer; - record1->addItem( itemString ); - - - const auto deckRecord = record1->parse( parseContext , msgContainer, rawRecord ); - BOOST_CHECK_EQUAL(" VALUE " , deckRecord.getItem(0).get< std::string >(0)); -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/tests/DeckStringItemTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/tests/DeckStringItemTests.cpp deleted file mode 100644 index f78b3c7269..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/tests/DeckStringItemTests.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include - -#define BOOST_TEST_MODULE DeckStringItemTests - -#include - -#include - -using namespace Opm; - -BOOST_AUTO_TEST_CASE(InitializeString) { - auto stringItem = DeckItem::make< std::string >("TEST"); - BOOST_CHECK_EQUAL("TEST", stringItem.name()); -} - -BOOST_AUTO_TEST_CASE(DummyDefaults) { - auto deckStringItem = DeckItem::make< std::string >("TEST"); - BOOST_CHECK_EQUAL(deckStringItem.size(), 0); - - deckStringItem.push_backDummyDefault(); - BOOST_CHECK_EQUAL(deckStringItem.size(), 0); - BOOST_CHECK_EQUAL(true, deckStringItem.defaultApplied(0)); - BOOST_CHECK_THROW(deckStringItem.get< std::string >(0), std::out_of_range); -} - -BOOST_AUTO_TEST_CASE(GetStringAtIndex_NoData_ExceptionThrown) { - auto deckStringItem = DeckItem::make< std::string >("TEST"); - BOOST_CHECK_THROW(deckStringItem.get< std::string >(0), std::out_of_range); - deckStringItem.push_back("SA"); - BOOST_CHECK_THROW(deckStringItem.get< std::string >(1), std::out_of_range); -} - -BOOST_AUTO_TEST_CASE(size_variouspushes_sizecorrect) { - auto deckStringItem = DeckItem::make< std::string >("TEST"); - - BOOST_CHECK_EQUAL(0U, deckStringItem.size()); - deckStringItem.push_back("WELL-3"); - BOOST_CHECK_EQUAL(1U, deckStringItem.size()); - - deckStringItem.push_back("WELL-4"); - deckStringItem.push_back("WELL-5"); - BOOST_CHECK_EQUAL(3U, deckStringItem.size()); -} - -BOOST_AUTO_TEST_CASE(DefaultNotApplied) { - auto deckStringItem = DeckItem::make< std::string >("TEST"); - BOOST_CHECK( deckStringItem.size() == 0 ); - - deckStringItem.push_back( "FOO") ; - BOOST_CHECK( deckStringItem.size() == 1 ); - BOOST_CHECK( deckStringItem.get< std::string >(0) == "FOO" ); - BOOST_CHECK( !deckStringItem.defaultApplied(0) ); -} - -BOOST_AUTO_TEST_CASE(DefaultApplied) { - auto deckStringItem = DeckItem::make< std::string >("TEST"); - BOOST_CHECK( deckStringItem.size() == 0 ); - - deckStringItem.push_backDefault( "FOO" ); - BOOST_CHECK( deckStringItem.size() == 1 ); - BOOST_CHECK( deckStringItem.get< std::string >(0) == "FOO" ); - BOOST_CHECK( deckStringItem.defaultApplied(0) ); -} - - -BOOST_AUTO_TEST_CASE(PushBackMultiple) { - auto stringItem = DeckItem::make< std::string >("HEI"); - stringItem.push_back("Heisann ", 100U ); - BOOST_CHECK_EQUAL( 100U , stringItem.size() ); - for (size_t i=0; i < 100; i++) - BOOST_CHECK_EQUAL("Heisann " , stringItem.get< std::string >(i)); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/tests/DeckTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/tests/DeckTests.cpp deleted file mode 100644 index fb3733e564..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/tests/DeckTests.cpp +++ /dev/null @@ -1,173 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - -#include - -#define BOOST_TEST_MODULE DeckTests - -#include - -#include -#include - -using namespace Opm; - -BOOST_AUTO_TEST_CASE(Initialize) { - BOOST_REQUIRE_NO_THROW(Deck deck); - BOOST_REQUIRE_NO_THROW(DeckPtr deckPtr(new Deck())); - BOOST_REQUIRE_NO_THROW(DeckConstPtr deckConstPtr(new Deck())); -} - -BOOST_AUTO_TEST_CASE(Initializer_lists) { - DeckKeyword foo( "foo" ); - DeckKeyword bar( "bar" ); - - std::string foostr( "foo" ); - std::string barstr( "bar" ); - - BOOST_REQUIRE_NO_THROW( Deck( { foo, bar } ) ); - BOOST_REQUIRE_NO_THROW( Deck( { foostr, barstr } ) ); - BOOST_REQUIRE_NO_THROW( Deck( { "Kappa", "Phi" } ) ); -} - -BOOST_AUTO_TEST_CASE(hasKeyword_empty_returnFalse) { - Deck deck; - BOOST_CHECK_EQUAL(false, deck.hasKeyword("Bjarne")); - BOOST_CHECK_THROW( deck.getKeyword("Bjarne") , std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(addKeyword_singlekeyword_keywordAdded) { - Deck deck; - BOOST_CHECK_NO_THROW(deck.addKeyword( DeckKeyword( "BJARNE" ) ) ); -} - - -BOOST_AUTO_TEST_CASE(getKeywordList_empty_list) { - Deck deck; - auto kw_list = deck.getKeywordList("TRULS"); - BOOST_CHECK_EQUAL( kw_list.size() , 0 ); -} - -BOOST_AUTO_TEST_CASE(getKeyword_singlekeyword_outRange_throws) { - Deck deck; - deck.addKeyword( DeckKeyword( "BJARNE" ) ); - BOOST_CHECK_THROW(deck.getKeyword("BJARNE" , 10) , std::out_of_range); -} - - -BOOST_AUTO_TEST_CASE(getKeywordList_returnOK) { - Deck deck; - deck.addKeyword( DeckKeyword( "BJARNE" ) ); - BOOST_CHECK_NO_THROW( deck.getKeywordList("BJARNE") ); -} - - -BOOST_AUTO_TEST_CASE(getKeyword_indexok_returnskeyword) { - Deck deck; - deck.addKeyword( DeckKeyword( "BJARNE" ) ); - BOOST_CHECK_NO_THROW(deck.getKeyword(0)); -} - -BOOST_AUTO_TEST_CASE(numKeyword_singlekeyword_return1) { - Deck deck; - deck.addKeyword( DeckKeyword( "BJARNE" ) ); - BOOST_CHECK_EQUAL(1U , deck.count("BJARNE")); -} - - -BOOST_AUTO_TEST_CASE(numKeyword_twokeyword_return2) { - Deck deck; - DeckKeyword keyword("BJARNE"); - deck.addKeyword(keyword); - deck.addKeyword(keyword); - BOOST_CHECK_EQUAL(2U , deck.count("BJARNE")); -} - - -BOOST_AUTO_TEST_CASE(numKeyword_nokeyword_return0) { - Deck deck; - deck.addKeyword( DeckKeyword( "BJARNE" ) ); - BOOST_CHECK_EQUAL(0U , deck.count("BJARNEX")); -} - - -BOOST_AUTO_TEST_CASE(size_twokeyword_return2) { - Deck deck; - DeckKeyword keyword ("BJARNE"); - deck.addKeyword(keyword); - deck.addKeyword(keyword); - BOOST_CHECK_EQUAL(2U , deck.size()); -} - -BOOST_AUTO_TEST_CASE(getKeyword_outOfRange_throws) { - Deck deck; - deck.addKeyword(DeckKeyword( "TRULS" ) ); - BOOST_CHECK_THROW( deck.getKeyword("TRULS" , 3) , std::out_of_range); -} - -BOOST_AUTO_TEST_CASE(getKeywordList_OK) { - Deck deck; - deck.addKeyword( DeckKeyword( "TRULS" ) ); - deck.addKeyword( DeckKeyword( "TRULS" ) ); - deck.addKeyword( DeckKeyword( "TRULS" ) ); - - const auto& keywordList = deck.getKeywordList("TRULS"); - BOOST_CHECK_EQUAL( 3U , keywordList.size() ); -} - -BOOST_AUTO_TEST_CASE(keywordList_getnum_OK) { - Deck deck; - deck.addKeyword( DeckKeyword( "TRULS" ) ); - deck.addKeyword( DeckKeyword( "TRULS" ) ); - deck.addKeyword( DeckKeyword( "TRULSX" ) ); - - BOOST_CHECK_EQUAL( 0U , deck.count( "TRULSY" )); - BOOST_CHECK_EQUAL( 2U , deck.count( "TRULS" )); - BOOST_CHECK_EQUAL( 1U , deck.count( "TRULSX" )); -} - -BOOST_AUTO_TEST_CASE(keywordList_getbyindexoutofbounds_exceptionthrown) { - Deck deck; - BOOST_CHECK_THROW(deck.getKeyword(0), std::out_of_range); - deck.addKeyword( DeckKeyword( "TRULS" ) ); - deck.addKeyword( DeckKeyword( "TRULS" ) ); - deck.addKeyword( DeckKeyword( "TRULSX" ) ); - BOOST_CHECK_NO_THROW(deck.getKeyword(2)); - BOOST_CHECK_THROW(deck.getKeyword(3), std::out_of_range); -} - -BOOST_AUTO_TEST_CASE(keywordList_getbyindex_correctkeywordreturned) { - Deck deck; - deck.addKeyword( DeckKeyword( "TRULS" ) ); - deck.addKeyword( DeckKeyword( "TRULS" ) ); - deck.addKeyword( DeckKeyword( "TRULSX" ) ); - BOOST_CHECK_EQUAL("TRULS", deck.getKeyword(0).name()); - BOOST_CHECK_EQUAL("TRULS", deck.getKeyword(1).name()); - BOOST_CHECK_EQUAL("TRULSX", deck.getKeyword(2).name()); -} - -BOOST_AUTO_TEST_CASE(set_and_get_data_file) { - Deck deck; - BOOST_CHECK_EQUAL("", deck.getDataFile()); - std::string file("/path/to/file.DATA"); - deck.setDataFile( file ); - BOOST_CHECK_EQUAL(file, deck.getDataFile()); -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/tests/SectionTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/tests/SectionTests.cpp deleted file mode 100644 index bf07879756..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Deck/tests/SectionTests.cpp +++ /dev/null @@ -1,391 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - -#define BOOST_TEST_MODULE SectionTests - -#include -#include -#include - -#include - -#include -#include -#include -#include - -using namespace Opm; - -BOOST_AUTO_TEST_CASE(SectionTest) { - DeckPtr deck(new Deck()); - deck->addKeyword( DeckKeyword("TEST0") ); - deck->addKeyword( DeckKeyword("RUNSPEC") ); - deck->addKeyword( DeckKeyword("TEST1") ); - deck->addKeyword( DeckKeyword("GRID") ); - deck->addKeyword( DeckKeyword("TEST2") ); - deck->addKeyword( DeckKeyword("SCHEDULE") ); - deck->addKeyword( DeckKeyword("TEST3") ); - - Section runspecSection(*deck, "RUNSPEC"); - Section gridSection(*deck, "GRID"); - BOOST_CHECK(runspecSection.hasKeyword("TEST1")); - BOOST_CHECK(gridSection.hasKeyword("TEST2")); - - BOOST_CHECK(!runspecSection.hasKeyword("TEST0")); - BOOST_CHECK(!gridSection.hasKeyword("TEST0")); - BOOST_CHECK(!runspecSection.hasKeyword("TEST3")); - BOOST_CHECK(!gridSection.hasKeyword("TEST3")); - BOOST_CHECK(!runspecSection.hasKeyword("TEST2")); - BOOST_CHECK(!gridSection.hasKeyword("TEST1")); -} - -BOOST_AUTO_TEST_CASE(IteratorTest) { - DeckPtr deck(new Deck()); - deck->addKeyword( DeckKeyword( "RUNSPEC" ) ); - deck->addKeyword( DeckKeyword("TEST2") ); - deck->addKeyword( DeckKeyword( "TEST3" ) ); - deck->addKeyword( DeckKeyword( "GRID" ) ); - Section section(*deck, "RUNSPEC"); - - int numberOfItems = 0; - for (auto iter=section.begin(); iter != section.end(); ++iter) { - std::cout << iter->name() << std::endl; - numberOfItems++; - } - - // the keywords expected here are RUNSPEC, TEST2 and TEST3... - BOOST_CHECK_EQUAL(3, numberOfItems); -} - -BOOST_AUTO_TEST_CASE(RUNSPECSection_EmptyDeck) { - DeckPtr deck(new Deck()); - BOOST_REQUIRE_NO_THROW(RUNSPECSection section(*deck)); -} - -BOOST_AUTO_TEST_CASE(RUNSPECSection_ReadSimpleDeck) { - DeckPtr deck(new Deck()); - deck->addKeyword( DeckKeyword( "TEST1") ); - deck->addKeyword( DeckKeyword( "RUNSPEC") ); - deck->addKeyword( DeckKeyword( "TEST2") ); - deck->addKeyword( DeckKeyword( "TEST3") ); - deck->addKeyword( DeckKeyword( "GRID") ); - deck->addKeyword( DeckKeyword( "TEST4") ); - - RUNSPECSection section(*deck); - BOOST_CHECK(!section.hasKeyword("TEST1")); - BOOST_CHECK(section.hasKeyword("RUNSPEC")); - BOOST_CHECK(section.hasKeyword("TEST2")); - BOOST_CHECK(section.hasKeyword("TEST3")); - BOOST_CHECK(!section.hasKeyword("GRID")); - BOOST_CHECK(!section.hasKeyword("TEST4")); -} - -BOOST_AUTO_TEST_CASE(RUNSPECSection_ReadSmallestPossibleDeck) { - DeckPtr deck(new Deck()); - deck->addKeyword( DeckKeyword( "RUNSPEC" ) ); - deck->addKeyword( DeckKeyword( "GRID") ); - RUNSPECSection section(*deck); - BOOST_CHECK_EQUAL(true, section.hasKeyword("RUNSPEC")); - BOOST_CHECK_EQUAL(false, section.hasKeyword("GRID")); -} - -BOOST_AUTO_TEST_CASE(GRIDSection_TerminatedByEDITKeyword) { - DeckPtr deck(new Deck()); - deck->addKeyword( DeckKeyword( "GRID" ) ); - deck->addKeyword( DeckKeyword( "EDIT" ) ); - GRIDSection section(*deck); - BOOST_CHECK_EQUAL(true, section.hasKeyword("GRID")); - BOOST_CHECK_EQUAL(false, section.hasKeyword("EDIT")); -} - -BOOST_AUTO_TEST_CASE(GRIDSection_TerminatedByPROPSKeyword) { - DeckPtr deck(new Deck()); - deck->addKeyword( DeckKeyword( "GRID" ) ); - deck->addKeyword( DeckKeyword( "PROPS" ) ); - GRIDSection section(*deck); - BOOST_CHECK_EQUAL(true, section.hasKeyword("GRID")); - BOOST_CHECK_EQUAL(false, section.hasKeyword("PROPS")); -} - -BOOST_AUTO_TEST_CASE(EDITSection_TerminatedByPROPSKeyword) { - DeckPtr deck(new Deck()); - deck->addKeyword( DeckKeyword( "EDIT" ) ); - deck->addKeyword( DeckKeyword( "PROPS" ) ); - EDITSection section(*deck); - BOOST_CHECK_EQUAL(true, section.hasKeyword("EDIT")); - BOOST_CHECK_EQUAL(false, section.hasKeyword("PROPS")); -} - -BOOST_AUTO_TEST_CASE(PROPSSection_TerminatedByREGIONSKeyword) { - DeckPtr deck(new Deck()); - deck->addKeyword( DeckKeyword( "PROPS" ) ); - deck->addKeyword( DeckKeyword( "REGIONS" ) ); - PROPSSection section(*deck); - BOOST_CHECK_EQUAL(true, section.hasKeyword("PROPS")); - BOOST_CHECK_EQUAL(false, section.hasKeyword("REGIONS")); -} - -BOOST_AUTO_TEST_CASE(PROPSSection_TerminatedBySOLUTIONKeyword) { - DeckPtr deck(new Deck()); - - deck->addKeyword( DeckKeyword( "PROPS" ) ); - deck->addKeyword( DeckKeyword( "SOLUTION" ) ); - - PROPSSection section(*deck); - BOOST_CHECK_EQUAL(true, section.hasKeyword("PROPS")); - BOOST_CHECK_EQUAL(false, section.hasKeyword("SOLUTION")); -} - -BOOST_AUTO_TEST_CASE(REGIONSSection_TerminatedBySOLUTIONKeyword) { - DeckPtr deck(new Deck()); - - deck->addKeyword( DeckKeyword( "REGIONS" ) ); - deck->addKeyword( DeckKeyword( "SOLUTION" ) ); - - REGIONSSection section(*deck); - BOOST_CHECK_EQUAL(true, section.hasKeyword("REGIONS")); - BOOST_CHECK_EQUAL(false, section.hasKeyword("SOLUTION")); -} - -BOOST_AUTO_TEST_CASE(SOLUTIONSection_TerminatedBySUMMARYKeyword) { - DeckPtr deck(new Deck()); - - deck->addKeyword( DeckKeyword( "SOLUTION" ) ); - deck->addKeyword( DeckKeyword( "SUMMARY" ) ); - - SOLUTIONSection section(*deck); - BOOST_CHECK_EQUAL(true, section.hasKeyword("SOLUTION")); - BOOST_CHECK_EQUAL(false, section.hasKeyword("SUMMARY")); -} - -BOOST_AUTO_TEST_CASE(SOLUTIONSection_TerminatedBySCHEDULEKeyword) { - DeckPtr deck(new Deck()); - - deck->addKeyword( DeckKeyword( "SOLUTION" ) ); - deck->addKeyword( DeckKeyword( "SCHEDULE" ) ); - - SOLUTIONSection section(*deck); - BOOST_CHECK_EQUAL(true, section.hasKeyword("SOLUTION")); - BOOST_CHECK_EQUAL(false, section.hasKeyword("SCHEDULE")); -} - -BOOST_AUTO_TEST_CASE(SCHEDULESection_NotTerminated) { - DeckPtr deck(new Deck()); - - deck->addKeyword( DeckKeyword( "SCHEDULE" ) ); - deck->addKeyword( DeckKeyword( "TEST1" ) ); - deck->addKeyword( DeckKeyword( "TEST2" ) ); - deck->addKeyword( DeckKeyword( "TEST3" ) ); - deck->addKeyword( DeckKeyword( "TEST4" ) ); - - SCHEDULESection section(*deck); - BOOST_CHECK_EQUAL(true, section.hasKeyword("SCHEDULE")); - BOOST_CHECK_EQUAL(true, section.hasKeyword("TEST1")); - BOOST_CHECK_EQUAL(true, section.hasKeyword("TEST2")); - BOOST_CHECK_EQUAL(true, section.hasKeyword("TEST3")); - - BOOST_CHECK( Section::hasSCHEDULE(*deck )); - BOOST_CHECK( !Section::hasREGIONS(*deck )); -} - -BOOST_AUTO_TEST_CASE(Section_ValidDecks) { - - ParseContext mode = { { { ParseContext::PARSE_UNKNOWN_KEYWORD, InputError::IGNORE } } }; - Parser parser; - - const std::string minimal = "RUNSPEC\n" - "TEST1\n" - "GRID\n" - "TEST2\n" - "PROPS\n" - "TEST3\n" - "SOLUTION\n" - "TEST4\n" - "SCHEDULE\n" - "TEST5\n"; - - std::unique_ptr< Deck > deck( parser.newDeckFromString( minimal, mode ) ); - BOOST_CHECK( Opm::Section::checkSectionTopology(*deck, parser) ); - - const std::string with_opt = "RUNSPEC\n" - "TEST1\n" - "GRID\n" - "TEST2\n" - "EDIT\n" - "TEST3\n" - "PROPS\n" - "TEST4\n" - "REGIONS\n" - "TEST5\n" - "SOLUTION\n" - "TEST6\n" - "SUMMARY\n" - "TEST7\n" - "SCHEDULE\n" - "TEST8\n"; - - deck.reset( parser.newDeckFromString( with_opt, mode ) ); - BOOST_CHECK(Opm::Section::checkSectionTopology(*deck, parser)); -} - -BOOST_AUTO_TEST_CASE(Section_InvalidDecks) { - - Parser parser; - ParseContext mode = { { { ParseContext::PARSE_UNKNOWN_KEYWORD, InputError::IGNORE } } }; - - const std::string keyword_before_RUNSPEC = - "WWCT \n /\n" - "RUNSPEC\n" - "TEST1\n" - "GRID\n" - "TEST2\n" - "PROPS\n" - "TEST3\n" - "SOLUTION\n" - "TEST4\n" - "SCHEDULE\n" - "TEST5\n"; - - std::unique_ptr< Deck > deck( parser.newDeckFromString( keyword_before_RUNSPEC, mode ) ); - BOOST_CHECK(!Opm::Section::checkSectionTopology(*deck, parser)); - - const std::string wrong_order = "RUNSPEC\n" - "TEST1\n" - "EDIT\n" - "TEST3\n" - "GRID\n" - "TEST2\n" - "PROPS\n" - "TEST4\n" - "REGIONS\n" - "TEST5\n" - "SOLUTION\n" - "TEST6\n" - "SUMMARY\n" - "TEST7\n" - "SCHEDULE\n" - "TEST8\n"; - - deck.reset( parser.newDeckFromString( wrong_order, mode ) ); - BOOST_CHECK(!Opm::Section::checkSectionTopology(*deck, parser)); - - const std::string duplicate = "RUNSPEC\n" - "TEST1\n" - "GRID\n" - "TEST2\n" - "GRID\n" - "TEST21\n" - "EDIT\n" - "TEST3\n" - "PROPS\n" - "TEST4\n" - "REGIONS\n" - "TEST5\n" - "SOLUTION\n" - "TEST6\n" - "SUMMARY\n" - "TEST7\n" - "SCHEDULE\n" - "TEST8\n"; - - deck.reset( parser.newDeckFromString( duplicate, mode ) ); - BOOST_CHECK(!Opm::Section::checkSectionTopology(*deck, parser)); - - const std::string section_after_SCHEDULE = "RUNSPEC\n" - "TEST1\n" - "GRID\n" - "TEST2\n" - "PROPS\n" - "TEST4\n" - "REGIONS\n" - "TEST5\n" - "SOLUTION\n" - "TEST6\n" - "SUMMARY\n" - "TEST7\n" - "SCHEDULE\n" - "TEST8\n" - "EDIT\n" - "TEST3\n"; - - deck.reset( parser.newDeckFromString( section_after_SCHEDULE, mode ) ); - BOOST_CHECK(!Opm::Section::checkSectionTopology(*deck, parser)); - - const std::string missing_runspec = "GRID\n" - "TEST2\n" - "PROPS\n" - "TEST3\n" - "SOLUTION\n" - "TEST4\n" - "SCHEDULE\n" - "TEST5\n"; - - deck.reset( parser.newDeckFromString( missing_runspec, mode ) ); - BOOST_CHECK(!Opm::Section::checkSectionTopology(*deck, parser)); - - - const std::string missing_GRID = "RUNSPEC\n" - "TEST1\n" - "PROPS\n" - "TEST3\n" - "SOLUTION\n" - "TEST4\n" - "SCHEDULE\n" - "TEST5\n"; - - deck.reset( parser.newDeckFromString( missing_GRID, mode ) ); - BOOST_CHECK(!Opm::Section::checkSectionTopology(*deck, parser)); - - const std::string missing_PROPS = "RUNSPEC\n" - "TEST1\n" - "GRID\n" - "TEST2\n" - "SOLUTION\n" - "TEST4\n" - "SCHEDULE\n" - "TEST5\n"; - - deck.reset( parser.newDeckFromString( missing_PROPS, mode ) ); - BOOST_CHECK(!Opm::Section::checkSectionTopology(*deck, parser)); - - const std::string missing_SOLUTION = "RUNSPEC\n" - "TEST1\n" - "GRID\n" - "TEST2\n" - "PROPS\n" - "TEST3\n" - "SCHEDULE\n" - "TEST5\n"; - - deck.reset( parser.newDeckFromString( missing_SOLUTION, mode ) ); - BOOST_CHECK(!Opm::Section::checkSectionTopology(*deck, parser)); - - const std::string missing_SCHEDULE = "RUNSPEC\n" - "TEST1\n" - "GRID\n" - "TEST2\n" - "PROPS\n" - "TEST3\n" - "SOLUTION\n" - "TEST4\n"; - - deck.reset( parser.newDeckFromString( missing_SCHEDULE, mode ) ); - BOOST_CHECK(!Opm::Section::checkSectionTopology(*deck, parser)); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Eclipse3DProperties.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Eclipse3DProperties.cpp deleted file mode 100644 index cd1dc27921..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Eclipse3DProperties.cpp +++ /dev/null @@ -1,941 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License along with - OPM. If not, see . - */ - - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace Opm { - - namespace { - - void distTopLayer( std::vector& values, - const EclipseGrid* eclipseGrid ) - { - size_t layerSize = eclipseGrid->getNX() * eclipseGrid->getNY(); - size_t gridSize = eclipseGrid->getCartesianSize(); - - for( size_t globalIndex = layerSize; globalIndex < gridSize; globalIndex++ ) { - if( std::isnan( values[ globalIndex ] ) ) - values[globalIndex] = values[globalIndex - layerSize]; - } - } - - // this funcion applies a single pore volume multiplier (i.e., it deals with a single - // record of the MULTREGP keyword) - void applyPorosityRegionMultiplier_(std::vector& porev, - const std::vector& regionId, - int multRegionId, - double multValue) - { - for (unsigned i = 0; i < porev.size(); ++i) { - if (regionId[i] == multRegionId) - porev[i] *= multValue; - } - } - - /// this function initializes the pore volume of all cells. it uses the raw keyword - /// 'MULTREGP', the integer grid properties 'FLUXNUM', 'MULTNUM' and 'OPERNUM' as - /// well as the double grid properties 'PORV', 'PORO', 'NTG' and 'MULTPV' - void initPORV( std::vector& values, - const Deck* deck, - const EclipseGrid* eclipseGrid, - const GridProperties* intGridProperties, - const GridProperties* doubleGridProperties) - { - const auto iter = std::find_if( values.begin(), values.end(), []( double value ) { return std::isnan(value); }); - if (iter != values.end()) { - const auto& poro = doubleGridProperties->getKeyword("PORO"); - const auto& ntg = doubleGridProperties->getKeyword("NTG"); - - if (poro.containsNaN()) - throw std::logic_error("Do not have information for the PORV keyword - some defaulted values in PORO"); - else { - const auto& poroData = poro.getData(); - for (size_t globalIndex = 0; globalIndex < poro.getCartesianSize(); globalIndex++) { - if (std::isnan(values[globalIndex])) { - double cell_poro = poroData[globalIndex]; - double cell_ntg = ntg.iget(globalIndex); - double cell_volume = eclipseGrid->getCellVolume(globalIndex); - values[globalIndex] = cell_poro * cell_volume * cell_ntg; - } - } - } - } - - if (doubleGridProperties->hasKeyword("MULTPV")) { - const GridProperty& multpvKeyword = doubleGridProperties->getKeyword("MULTPV"); - const auto& multpvData = multpvKeyword.getData(); - for (size_t globalIndex = 0; globalIndex < multpvData.size(); globalIndex++) - values[globalIndex] *= multpvData[globalIndex]; - } - - // deal with the region multiplier for porosity - if (deck->hasKeyword("MULTREGP")) { - const DeckKeyword& multregpKeyword = deck->getKeyword("MULTREGP"); - for (unsigned recordIdx = 0; recordIdx < multregpKeyword.size(); ++recordIdx) { - const DeckRecord& multregpRecord = multregpKeyword.getRecord(recordIdx); - - int regionId = multregpRecord.getItem("REGION").template get(0); - std::string regionType = multregpRecord.getItem("REGION_TYPE").template get(0); - double multValue = multregpRecord.getItem("MULTIPLIER").template get(0); - uppercase(regionType, regionType); - - // deal with the "convenience" feature of ECL: if the region index is - // zero or negative, the record is ignored. - if (regionId <= 0) - continue; - - // implement a (documented) ECL bug: the region index must be unique - // (i.e., it is impossible to specify multipliers for different - // region types with the same index). Also, only the last occurence - // of each region counts. - unsigned record2Idx = recordIdx + 1; - for (; record2Idx < multregpKeyword.size(); ++record2Idx) { - const DeckRecord& multregpRecord2 = multregpKeyword.getRecord(record2Idx); - int region2Idx = multregpRecord2.getItem("REGION").template get(0); - if (region2Idx == regionId) - break; - } - if (record2Idx < multregpKeyword.size()) - // the region was specified twice - continue; - - if (regionType == "M") { - const GridProperty& multnumProp = intGridProperties->getKeyword("MULTNUM"); - applyPorosityRegionMultiplier_(values, multnumProp.getData(), regionId, multValue); - } - else if (regionType == "F") { - const GridProperty& fluxnumProp = intGridProperties->getKeyword("FLUXNUM"); - applyPorosityRegionMultiplier_(values, fluxnumProp.getData(), regionId, multValue); - } - else if (regionType == "O") { - const GridProperty& opernumProp = intGridProperties->getKeyword("OPERNUM"); - applyPorosityRegionMultiplier_(values, opernumProp.getData(), regionId, multValue); - } - else - throw std::logic_error("Unknown or illegal region type for MULTREGP keyword: '"+regionType+"'"); - } - } - } - - - /* - In this codeblock we explicitly set the ACTNUM value to zero - for cells with pore volume equal to zero. Observe the - following: - - 1. The current processing only considers cells with PORV - == 0. Processing of the MINPV keyword for cells with - small nonzero poervolumes is currently performed along - with the Grid processing code. - - 2. The PORO or PORV keyword must be explicitly entered - in the deck, using getDoubleGridProperty( ) and - relying on autocreation will fail - we therefor - explicitly check if the PORO or PORV keywords are - present in the deck. - - 3. The code below will fail hard if it is called with a - grid which does not have full cell information. - */ - - void ACTNUMPostProcessor( std::vector& values, - const GridProperties* doubleGridProperties) - { - const bool hasPORV = doubleGridProperties->hasKeyword( "PORV" ) || doubleGridProperties->hasKeyword( "PORO"); - if (!hasPORV) - return; - - { - const auto& porv = doubleGridProperties->getKeyword("PORV"); - { - const auto& porvData = porv.getData(); - for (size_t i = 0; i < porvData.size(); i++) - if (porvData[i] == 0) - values[i] = 0; - } - } - } - } - - - - static std::vector< GridProperties< int >::SupportedKeywordInfo > - makeSupportedIntKeywords() { - return { GridProperties< int >::SupportedKeywordInfo( "SATNUM" , 1, "1" ), - GridProperties< int >::SupportedKeywordInfo( "IMBNUM" , 1, "1" ), - GridProperties< int >::SupportedKeywordInfo( "PVTNUM" , 1, "1" ), - GridProperties< int >::SupportedKeywordInfo( "EQLNUM" , 1, "1" ), - GridProperties< int >::SupportedKeywordInfo( "ENDNUM" , 1, "1" ), - GridProperties< int >::SupportedKeywordInfo( "FLUXNUM", 1, "1" ), - GridProperties< int >::SupportedKeywordInfo( "MULTNUM", 1, "1" ), - GridProperties< int >::SupportedKeywordInfo( "FIPNUM" , 1, "1" ), - GridProperties< int >::SupportedKeywordInfo( "MISCNUM", 1, "1" ), - GridProperties< int >::SupportedKeywordInfo( "OPERNUM", 1, "1" ) }; - } - - - static std::vector< GridProperties< double >::SupportedKeywordInfo > - makeSupportedDoubleKeywords(const TableManager* tableManager, - const EclipseGrid* eclipseGrid, - GridProperties* intGridProperties) - { - using std::placeholders::_1; - - const auto SGLLookup = std::bind( SGLEndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto ISGLLookup = std::bind( ISGLEndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto SWLLookup = std::bind( SWLEndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto ISWLLookup = std::bind( ISWLEndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto SGULookup = std::bind( SGUEndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto ISGULookup = std::bind( ISGUEndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto SWULookup = std::bind( SWUEndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto ISWULookup = std::bind( ISWUEndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto SGCRLookup = std::bind( SGCREndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto ISGCRLookup = std::bind( ISGCREndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto SOWCRLookup = std::bind( SOWCREndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto ISOWCRLookup = std::bind( ISOWCREndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto SOGCRLookup = std::bind( SOGCREndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto ISOGCRLookup = std::bind( ISOGCREndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto SWCRLookup = std::bind( SWCREndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto ISWCRLookup = std::bind( ISWCREndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - - const auto PCWLookup = std::bind( PCWEndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto IPCWLookup = std::bind( IPCWEndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto PCGLookup = std::bind( PCGEndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto IPCGLookup = std::bind( IPCGEndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto KRWLookup = std::bind( KRWEndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto IKRWLookup = std::bind( IKRWEndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto KRWRLookup = std::bind( KRWREndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto IKRWRLookup = std::bind( IKRWREndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto KROLookup = std::bind( KROEndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto IKROLookup = std::bind( IKROEndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto KRORWLookup = std::bind( KRORWEndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto IKRORWLookup = std::bind( IKRORWEndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto KRORGLookup = std::bind( KRORGEndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto IKRORGLookup = std::bind( IKRORGEndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto KRGLookup = std::bind( KRGEndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto IKRGLookup = std::bind( IKRGEndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto KRGRLookup = std::bind( KRGREndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - const auto IKRGRLookup = std::bind( IKRGREndpoint, _1, tableManager, eclipseGrid, intGridProperties ); - - const auto tempLookup = std::bind( temperature_lookup, _1, tableManager, eclipseGrid, intGridProperties ); - - const auto distributeTopLayer = std::bind( &distTopLayer, _1, eclipseGrid ); - - std::vector< GridProperties< double >::SupportedKeywordInfo > supportedDoubleKeywords; - - // keywords to specify the scaled connate gas saturations. - for( const auto& kw : { "SGL", "SGLX", "SGLX-", "SGLY", "SGLY-", "SGLZ", "SGLZ-" } ) - supportedDoubleKeywords.emplace_back( kw, SGLLookup, "1" ); - for( const auto& kw : { "ISGL", "ISGLX", "ISGLX-", "ISGLY", "ISGLY-", "ISGLZ", "ISGLZ-" } ) - supportedDoubleKeywords.emplace_back( kw, ISGLLookup, "1" ); - - // keywords to specify the connate water saturation. - for( const auto& kw : { "SWL", "SWLX", "SWLX-", "SWLY", "SWLY-", "SWLZ", "SWLZ-" } ) - supportedDoubleKeywords.emplace_back( kw, SWLLookup, "1" ); - for( const auto& kw : { "ISWL", "ISWLX", "ISWLX-", "ISWLY", "ISWLY-", "ISWLZ", "ISWLZ-" } ) - supportedDoubleKeywords.emplace_back( kw, ISWLLookup, "1" ); - - // keywords to specify the maximum gas saturation. - for( const auto& kw : { "SGU", "SGUX", "SGUX-", "SGUY", "SGUY-", "SGUZ", "SGUZ-" } ) - supportedDoubleKeywords.emplace_back( kw, SGULookup, "1" ); - for( const auto& kw : { "ISGU", "ISGUX", "ISGUX-", "ISGUY", "ISGUY-", "ISGUZ", "ISGUZ-" } ) - supportedDoubleKeywords.emplace_back( kw, ISGULookup, "1" ); - - // keywords to specify the maximum water saturation. - for( const auto& kw : { "SWU", "SWUX", "SWUX-", "SWUY", "SWUY-", "SWUZ", "SWUZ-" } ) - supportedDoubleKeywords.emplace_back( kw, SWULookup, "1" ); - for( const auto& kw : { "ISWU", "ISWUX", "ISWUX-", "ISWUY", "ISWUY-", "ISWUZ", "ISWUZ-" } ) - supportedDoubleKeywords.emplace_back( kw, ISWULookup, "1" ); - - // keywords to specify the scaled critical gas saturation. - for( const auto& kw : { "SGCR", "SGCRX", "SGCRX-", "SGCRY", "SGCRY-", "SGCRZ", "SGCRZ-" } ) - supportedDoubleKeywords.emplace_back( kw, SGCRLookup, "1" ); - for( const auto& kw : { "ISGCR", "ISGCRX", "ISGCRX-", "ISGCRY", "ISGCRY-", "ISGCRZ", "ISGCRZ-" } ) - supportedDoubleKeywords.emplace_back( kw, ISGCRLookup, "1" ); - - // keywords to specify the scaled critical oil-in-water saturation. - for( const auto& kw : { "SOWCR", "SOWCRX", "SOWCRX-", "SOWCRY", "SOWCRY-", "SOWCRZ", "SOWCRZ-" } ) - supportedDoubleKeywords.emplace_back( kw, SOWCRLookup, "1" ); - for( const auto& kw : { "ISOWCR", "ISOWCRX", "ISOWCRX-", "ISOWCRY", "ISOWCRY-", "ISOWCRZ", "ISOWCRZ-" } ) - supportedDoubleKeywords.emplace_back( kw, ISOWCRLookup, "1" ); - - // keywords to specify the scaled critical oil-in-gas saturation. - for( const auto& kw : { "SOGCR", "SOGCRX", "SOGCRX-", "SOGCRY", "SOGCRY-", "SOGCRZ", "SOGCRZ-" } ) - supportedDoubleKeywords.emplace_back( kw, SOGCRLookup, "1" ); - for( const auto& kw : { "ISOGCR", "ISOGCRX", "ISOGCRX-", "ISOGCRY", "ISOGCRY-", "ISOGCRZ", "ISOGCRZ-" } ) - supportedDoubleKeywords.emplace_back( kw, ISOGCRLookup, "1" ); - - // keywords to specify the scaled critical water saturation. - for( const auto& kw : { "SWCR", "SWCRX", "SWCRX-", "SWCRY", "SWCRY-", "SWCRZ", "SWCRZ-" } ) - supportedDoubleKeywords.emplace_back( kw, SWCRLookup, "1" ); - for( const auto& kw : { "ISWCR", "ISWCRX", "ISWCRX-", "ISWCRY", "ISWCRY-", "ISWCRZ", "ISWCRZ-" } ) - supportedDoubleKeywords.emplace_back( kw, ISWCRLookup, "1" ); - - // keywords to specify the scaled oil-water capillary pressure - for( const auto& kw : { "PCW", "PCWX", "PCWX-", "PCWY", "PCWY-", "PCWZ", "PCWZ-" } ) - supportedDoubleKeywords.emplace_back( kw, PCWLookup, "1" ); - for( const auto& kw : { "IPCW", "IPCWX", "IPCWX-", "IPCWY", "IPCWY-", "IPCWZ", "IPCWZ-" } ) - supportedDoubleKeywords.emplace_back( kw, IPCWLookup, "1" ); - - // keywords to specify the scaled gas-oil capillary pressure - for( const auto& kw : { "PCG", "PCGX", "PCGX-", "PCGY", "PCGY-", "PCGZ", "PCGZ-" } ) - supportedDoubleKeywords.emplace_back( kw, PCGLookup, "1" ); - for( const auto& kw : { "IPCG", "IPCGX", "IPCGX-", "IPCGY", "IPCGY-", "IPCGZ", "IPCGZ-" } ) - supportedDoubleKeywords.emplace_back( kw, IPCGLookup, "1" ); - - // keywords to specify the scaled water relative permeability - for( const auto& kw : { "KRW", "KRWX", "KRWX-", "KRWY", "KRWY-", "KRWZ", "KRWZ-" } ) - supportedDoubleKeywords.emplace_back( kw, KRWLookup, "1" ); - for( const auto& kw : { "IKRW", "IKRWX", "IKRWX-", "IKRWY", "IKRWY-", "IKRWZ", "IKRWZ-" } ) - supportedDoubleKeywords.emplace_back( kw, IKRWLookup, "1" ); - - // keywords to specify the scaled water relative permeability at the critical - // saturation - for( const auto& kw : { "KRWR" , "KRWRX" , "KRWRX-" , "KRWRY" , "KRWRY-" , "KRWRZ" , "KRWRZ-" } ) - supportedDoubleKeywords.emplace_back( kw, KRWRLookup, "1" ); - for( const auto& kw : { "IKRWR" , "IKRWRX" , "IKRWRX-" , "IKRWRY" , "IKRWRY-" , "IKRWRZ" , "IKRWRZ-" } ) - supportedDoubleKeywords.emplace_back( kw, IKRWRLookup, "1" ); - - // keywords to specify the scaled oil relative permeability - for( const auto& kw : { "KRO", "KROX", "KROX-", "KROY", "KROY-", "KROZ", "KROZ-" } ) - supportedDoubleKeywords.emplace_back( kw, KROLookup, "1" ); - for( const auto& kw : { "IKRO", "IKROX", "IKROX-", "IKROY", "IKROY-", "IKROZ", "IKROZ-" } ) - supportedDoubleKeywords.emplace_back( kw, IKROLookup, "1" ); - - // keywords to specify the scaled water relative permeability at the critical - // water saturation - for( const auto& kw : { "KRORW", "KRORWX", "KRORWX-", "KRORWY", "KRORWY-", "KRORWZ", "KRORWZ-" } ) - supportedDoubleKeywords.emplace_back( kw, KRORWLookup, "1" ); - for( const auto& kw : { "IKRORW", "IKRORWX", "IKRORWX-", "IKRORWY", "IKRORWY-", "IKRORWZ", "IKRORWZ-" } ) - supportedDoubleKeywords.emplace_back( kw, IKRORWLookup, "1" ); - - // keywords to specify the scaled water relative permeability at the critical - // water saturation - for( const auto& kw : { "KRORG", "KRORGX", "KRORGX-", "KRORGY", "KRORGY-", "KRORGZ", "KRORGZ-" } ) - supportedDoubleKeywords.emplace_back( kw, KRORGLookup, "1" ); - for( const auto& kw : { "IKRORG", "IKRORGX", "IKRORGX-", "IKRORGY", "IKRORGY-", "IKRORGZ", "IKRORGZ-" } ) - supportedDoubleKeywords.emplace_back( kw, IKRORGLookup, "1" ); - - // keywords to specify the scaled gas relative permeability - for( const auto& kw : { "KRG", "KRGX", "KRGX-", "KRGY", "KRGY-", "KRGZ", "KRGZ-" } ) - supportedDoubleKeywords.emplace_back( kw, KRGLookup, "1" ); - for( const auto& kw : { "IKRG", "IKRGX", "IKRGX-", "IKRGY", "IKRGY-", "IKRGZ", "IKRGZ-" } ) - supportedDoubleKeywords.emplace_back( kw, IKRGLookup, "1" ); - - // keywords to specify the scaled gas relative permeability - for( const auto& kw : { "KRGR", "KRGRX", "KRGRX-", "KRGRY", "KRGRY-", "KRGRZ", "KRGRZ-" } ) - supportedDoubleKeywords.emplace_back( kw, KRGRLookup, "1" ); - for( const auto& kw : { "IKRGR", "IKRGRX", "IKRGRX-", "IKRGRY", "IKRGRY-", "IKRGRZ", "IKRGRZ-" } ) - supportedDoubleKeywords.emplace_back( kw, IKRGRLookup, "1" ); - - // Solution keywords - required fror enumerated restart. - supportedDoubleKeywords.emplace_back( "PRESSURE", 0.0 , "Pressure" ); - supportedDoubleKeywords.emplace_back( "SWAT", 0.0 , "1" ); - supportedDoubleKeywords.emplace_back( "SGAS", 0.0 , "1" ); - - - // cell temperature (E300 only, but makes a lot of sense for E100, too) - supportedDoubleKeywords.emplace_back( "TEMPI", tempLookup, "Temperature" ); - - const double nan = std::numeric_limits::quiet_NaN(); - // porosity - supportedDoubleKeywords.emplace_back( "PORO", nan, distributeTopLayer, "1" ); - - // pore volume multipliers - supportedDoubleKeywords.emplace_back( "MULTPV", 1.0, "1" ); - - // the permeability keywords - for( const auto& kw : { "PERMX", "PERMY", "PERMZ" } ) - supportedDoubleKeywords.emplace_back( kw, nan, distributeTopLayer, "Permeability" ); - - /* E300 only */ - for( const auto& kw : { "PERMXY", "PERMYZ", "PERMZX" } ) - supportedDoubleKeywords.emplace_back( kw, nan, distributeTopLayer, "Permeability" ); - - /* the transmissibility keywords for neighboring connections. note that - * these keywords don't seem to require a post-processor - */ - for( const auto& kw : { "TRANX", "TRANY", "TRANZ" } ) - supportedDoubleKeywords.emplace_back( kw, nan, "Transmissibility" ); - - /* gross-to-net thickness (acts as a multiplier for PORO and the - * permeabilities in the X-Y plane as well as for the well rates.) - */ - supportedDoubleKeywords.emplace_back( "NTG", 1.0, "1" ); - - // transmissibility multipliers - for( const auto& kw : { "MULTX", "MULTY", "MULTZ", "MULTX-", "MULTY-", "MULTZ-" } ) - supportedDoubleKeywords.emplace_back( kw, 1.0, "1" ); - - // initialisation - supportedDoubleKeywords.emplace_back( "SWATINIT", 0.0, "1"); - supportedDoubleKeywords.emplace_back( "THCONR", 0.0, "1"); - - return supportedDoubleKeywords; - } - - Eclipse3DProperties::Eclipse3DProperties( const Deck& deck, - const TableManager& tableManager, - const EclipseGrid& eclipseGrid) - : - - m_defaultRegion("FLUXNUM"), - m_deckUnitSystem(deck.getActiveUnitSystem()), - // Note that the variants of grid keywords for radial grids are not - // supported. (and hopefully never will be) - // register the grid properties - m_intGridProperties(eclipseGrid, makeSupportedIntKeywords()), - m_doubleGridProperties(eclipseGrid, &m_deckUnitSystem, - makeSupportedDoubleKeywords(&tableManager, &eclipseGrid, &m_intGridProperties)) - { - /* - * The EQUALREG, MULTREG, COPYREG, ... keywords are used to manipulate - * vectors based on region values; for instance the statement - * - * EQUALREG - * PORO 0.25 3 / -- Region array not specified - * PERMX 100 3 F / - * / - * - * will set the PORO field to 0.25 for all cells in region 3 and the PERMX - * value to 100 mD for the same cells. The fourth optional argument to the - * EQUALREG keyword is used to indicate which REGION array should be used - * for the selection. - * - * If the REGION array is not indicated (as in the PORO case) above, the - * default region to use in the xxxREG keywords depends on the GRIDOPTS - * keyword: - * - * 1. If GRIDOPTS is present, and the NRMULT item is greater than zero, - * the xxxREG keywords will default to use the MULTNUM region. - * - * 2. If the GRIDOPTS keyword is not present - or the NRMULT item equals - * zero, the xxxREG keywords will default to use the FLUXNUM keyword. - * - * This quite weird behaviour comes from reading the GRIDOPTS and MULTNUM - * documentation, and practical experience with ECLIPSE - * simulations. Ufortunately the documentation of the xxxREG keywords does - * not confirm this. - */ - if (deck.hasKeyword( "GRIDOPTS" )) { - const auto& gridOpts = deck.getKeyword( "GRIDOPTS" ); - const auto& record = gridOpts.getRecord( 0 ); - const auto& nrmult_item = record.getItem( "NRMULT" ); - - if (nrmult_item.get( 0 ) > 0) - m_defaultRegion = "MULTNUM"; // GRIDOPTS and positive NRMULT - } - - - { - auto initPORVProcessor = std::bind(&initPORV, - std::placeholders::_1, - &deck, - &eclipseGrid, - &m_intGridProperties, - &m_doubleGridProperties); - - m_doubleGridProperties.postAddKeyword( "PORV", - std::numeric_limits::quiet_NaN(), - initPORVProcessor, - "Volume" ); - } - - { - auto actnumPP = std::bind(&ACTNUMPostProcessor, - std::placeholders::_1, - &m_doubleGridProperties); - - m_intGridProperties.postAddKeyword( "ACTNUM", - 1, - actnumPP , - "1"); - } - - processGridProperties(deck, eclipseGrid); - } - - bool Eclipse3DProperties::supportsGridProperty(const std::string& keyword) const { - return m_doubleGridProperties.supportsKeyword( keyword ) || m_intGridProperties.supportsKeyword( keyword ); - } - - - - bool Eclipse3DProperties::hasDeckIntGridProperty(const std::string& keyword) const { - if (!m_intGridProperties.supportsKeyword( keyword )) - throw std::logic_error("Integer grid property " + keyword + " is unsupported!"); - - return m_intGridProperties.hasKeyword( keyword ); - } - - bool Eclipse3DProperties::hasDeckDoubleGridProperty(const std::string& keyword) const { - if (!m_doubleGridProperties.supportsKeyword( keyword )) - throw std::logic_error("Double grid property " + keyword + " is unsupported!"); - - return m_doubleGridProperties.hasKeyword( keyword ); - } - - - const GridProperty& Eclipse3DProperties::getIntGridProperty( const std::string& keyword ) const { - auto& gridProperty = const_cast< Eclipse3DProperties* >( this )->m_intGridProperties.getKeyword( keyword ); - gridProperty.runPostProcessor(); - return gridProperty; - } - - - - /// gets property from doubleGridProperty --- and calls the runPostProcessor - const GridProperty& Eclipse3DProperties::getDoubleGridProperty( const std::string& keyword ) const { - auto& gridProperty = const_cast< Eclipse3DProperties* >( this )->m_doubleGridProperties.getKeyword( keyword ); - gridProperty.runPostProcessor(); - return gridProperty; - } - - const GridProperties& Eclipse3DProperties::getIntProperties() const { - return m_intGridProperties; - } - - const GridProperties& Eclipse3DProperties::getDoubleProperties() const { - return m_doubleGridProperties; - } - - - std::string Eclipse3DProperties::getDefaultRegionKeyword() const { - return m_defaultRegion; - } - - const GridProperty& Eclipse3DProperties::getRegion( const DeckItem& regionItem ) const { - if (regionItem.defaultApplied(0)) - return m_intGridProperties.getKeyword( m_defaultRegion ); - else { - const std::string regionArray = MULTREGT::RegionNameFromDeckValue( regionItem.get< std::string >(0) ); - return m_intGridProperties.getInitializedKeyword( regionArray ); - } - } - - std::vector< int > Eclipse3DProperties::getRegions( const std::string& keyword ) const { - if( !this->hasDeckIntGridProperty( keyword ) ) return {}; - - const auto& property = this->getIntGridProperty( keyword ); - - std::set< int > regions( property.getData().begin(), - property.getData().end() ); - - return { regions.begin(), regions.end() }; - } - - /// Due to the post processor which might be applied to the GridProperty - /// objects it is essential that this method use the m_intGridProperties / - /// m_doubleGridProperties fields directly and *NOT* use the public methods - /// getIntGridProperty / getDoubleGridProperty. - void Eclipse3DProperties::loadGridPropertyFromDeckKeyword(const Box& inputBox, - const DeckKeyword& deckKeyword) { - const std::string& keyword = deckKeyword.name(); - if (m_intGridProperties.supportsKeyword( keyword )) { - auto& gridProperty = m_intGridProperties.getOrCreateProperty( keyword ); - gridProperty.loadFromDeckKeyword( inputBox, deckKeyword ); - } else if (m_doubleGridProperties.supportsKeyword( keyword )) { - auto& gridProperty = m_doubleGridProperties.getOrCreateProperty( keyword ); - gridProperty.loadFromDeckKeyword( inputBox, deckKeyword ); - } else { - throw std::logic_error( "Tried to load unsupported grid property from keyword: " + deckKeyword.name() ); - } - } - - /* - Issues regarding initialization order and default values. - ========================================================= - - The 3D properties objects, and in particular their - initialization touches upon very fine details of the Eclipse - behavior; which are not entirely clear from the documentation: - - - Default values and EQUALS / COPY / ADD / ... - -------------------------------------------- - - The keywords which operate on an existing keyword, i.e. COPY, - ADD and MULTIPLY require that the mentioned keyword has already - been introduced explicitly in the deck, i.e. if this is the - first mention of the PORO keyword in the deck this will fail - hard: - - - ADD - PORO 0.10 / - / - - Because the PORO keyword is undefined. - - All keywords have a default value or initializer; for some - keywords this default value is sensical which can be used in a - simulation, e.g. ACTNUM; defaults to 1 - whereas PORO defaults - to nan. - - Using BOX functionality it is possible to limit the assignment - and manipulations to only parts of a 3D property, we then have a - partly initialized keyword which can be used in subsequent - operations, and undetected give nonsensical results. Consider - the following sequyence of keywords: - - -- Set the porosity equal to 0.25 in the top layer. - EQUALS - PORO 0.25 1 100 1 100 1 1 / - / - - -- Shift the porosity with 0.10 in all cells - ADD - PORO 0.10 - / - - Now - the second ADD operation will 'silently succeed' because - the PORO keyword has been autocreated with the preceeding EQUALS - keyword, but since the EQUALS keyword only set a subset of the - cells the PORO keyword will not be fully defined. This is fully - undedected, and will hopefully blow up hard when you start - simualating. - - - Order of initialization - ----------------------- - - The kewyords are come into life and are manipulated as you go - through the deck; i.e. in this part of the code some of the - underlying imperative nature of the Eclipse datamodel comes - through - hopefully we have got it right: - - 1. The REGIONS section is scanned before the other sections; - this is out-of-order compared to the ordering of ECLIPSE - sections, but it is required to ensure that the relevant - region keywords are defined before we read the properties - keywords like SGU and SGOF. - - 2. When using the region keywords in e.g. MULTIREG the current - state of the region keyword is used, i.e. in the example - below the two MULTIREG keywords will use different versions - of the MULTNUM keyword: - - - MULTIREG - PORO 2.0 1 M / - / - - ADD - MULTNUM 1 / - / - - MULTIREG - PERMX 2.0 1 M / - / - */ - - - void Eclipse3DProperties::processGridProperties( const Deck& deck, - const EclipseGrid& eclipseGrid) { - - - /* - Observe that the REGIONS section is scanned out of order - - before the other section, to ensure that the integer region - keywords are correctly defined before parsing the remaining - keywords. - */ - if (Section::hasREGIONS(deck)) - scanSection(REGIONSSection(deck), eclipseGrid); - - if (Section::hasGRID(deck)) - scanSection(GRIDSection(deck), eclipseGrid); - - if (Section::hasEDIT(deck)) - scanSection(EDITSection(deck), eclipseGrid); - - if (Section::hasPROPS(deck)) - scanSection(PROPSSection(deck), eclipseGrid); - - if (Section::hasSOLUTION(deck)) - scanSection(SOLUTIONSection(deck), eclipseGrid); - } - - - - void Eclipse3DProperties::scanSection(const Section& section, - const EclipseGrid& eclipseGrid) { - BoxManager boxManager(eclipseGrid.getNX(), - eclipseGrid.getNY(), - eclipseGrid.getNZ()); - - for( const auto& deckKeyword : section ) { - - if (supportsGridProperty(deckKeyword.name()) ) - loadGridPropertyFromDeckKeyword( *boxManager.getActiveBox(), - deckKeyword); - else { - if (deckKeyword.name() == "BOX") - handleBOXKeyword(deckKeyword, boxManager); - - else if (deckKeyword.name() == "ENDBOX") - handleENDBOXKeyword(boxManager); - - - else if (deckKeyword.name() == "COPY") - handleCOPYKeyword( deckKeyword , boxManager); - - else if (deckKeyword.name() == "EQUALS") - handleEQUALSKeyword(deckKeyword, boxManager); - - - else if (deckKeyword.name() == "ADD") - handleADDKeyword( deckKeyword , boxManager); - - else if (deckKeyword.name() == "MULTIPLY") - handleMULTIPLYKeyword(deckKeyword, boxManager); - - - else if (deckKeyword.name() == "EQUALREG") - handleEQUALREGKeyword(deckKeyword); - - else if (deckKeyword.name() == "ADDREG") - handleADDREGKeyword(deckKeyword); - - else if (deckKeyword.name() == "MULTIREG") - handleMULTIREGKeyword(deckKeyword); - - else if (deckKeyword.name() == "COPYREG") - handleCOPYREGKeyword(deckKeyword); - - boxManager.endKeyword(); - } - } - boxManager.endSection(); - } - - - void Eclipse3DProperties::handleBOXKeyword( const DeckKeyword& deckKeyword, BoxManager& boxManager) { - const auto& record = deckKeyword.getRecord(0); - int I1 = record.getItem("I1").get< int >(0) - 1; - int I2 = record.getItem("I2").get< int >(0) - 1; - int J1 = record.getItem("J1").get< int >(0) - 1; - int J2 = record.getItem("J2").get< int >(0) - 1; - int K1 = record.getItem("K1").get< int >(0) - 1; - int K2 = record.getItem("K2").get< int >(0) - 1; - - boxManager.setInputBox( I1 , I2 , J1 , J2 , K1 , K2 ); - } - - - void Eclipse3DProperties::handleENDBOXKeyword(BoxManager& boxManager) { - boxManager.endInputBox(); - } - - - void Eclipse3DProperties::handleEQUALREGKeyword( const DeckKeyword& deckKeyword) { - for( const auto& record : deckKeyword ) { - const std::string& targetArray = record.getItem("ARRAY").get< std::string >(0); - auto& regionProperty = getRegion( record.getItem("REGION_NAME") ); - - if (m_intGridProperties.supportsKeyword( targetArray )) - m_intGridProperties.handleEQUALREGRecord( record , regionProperty ); - else if (m_doubleGridProperties.supportsKeyword( targetArray )) - m_doubleGridProperties.handleEQUALREGRecord( record , regionProperty ); - else - throw std::invalid_argument("Fatal error processing EQUALREG keyword - invalid/undefined keyword: " + targetArray); - } - } - - - void Eclipse3DProperties::handleADDREGKeyword( const DeckKeyword& deckKeyword) { - for( const auto& record : deckKeyword ) { - const std::string& targetArray = record.getItem("ARRAY").get< std::string >(0); - const auto& regionProperty = getRegion( record.getItem("REGION_NAME") ); - - if (m_intGridProperties.hasKeyword( targetArray )) - m_intGridProperties.handleADDREGRecord( record , regionProperty ); - else if (m_doubleGridProperties.hasKeyword( targetArray )) - m_doubleGridProperties.handleADDREGRecord( record , regionProperty ); - else - throw std::invalid_argument("Fatal error processing ADDREG keyword - invalid/undefined keyword: " + targetArray); - } - } - - - - void Eclipse3DProperties::handleMULTIREGKeyword( const DeckKeyword& deckKeyword) { - for( const auto& record : deckKeyword ) { - const std::string& targetArray = record.getItem("ARRAY").get< std::string >(0); - const auto& regionProperty = getRegion( record.getItem("REGION_NAME") ); - - if (m_intGridProperties.supportsKeyword( targetArray )) - m_intGridProperties.handleMULTIREGRecord( record , regionProperty ); - else if (m_doubleGridProperties.supportsKeyword( targetArray )) - m_doubleGridProperties.handleMULTIREGRecord( record , regionProperty ); - else - throw std::invalid_argument("Fatal error processing MULTIREG keyword - invalid/undefined keyword: " + targetArray); - } - } - - - void Eclipse3DProperties::handleCOPYREGKeyword( const DeckKeyword& deckKeyword) { - for( const auto& record : deckKeyword ) { - const std::string& srcArray = record.getItem("ARRAY").get< std::string >(0); - const auto& regionProperty = getRegion( record.getItem("REGION_NAME") ); - - if (m_intGridProperties.hasKeyword( srcArray )) - m_intGridProperties.handleCOPYREGRecord( record, regionProperty ); - else if (m_doubleGridProperties.hasKeyword( srcArray )) - m_doubleGridProperties.handleCOPYREGRecord( record, regionProperty ); - else - throw std::invalid_argument("Fatal error processing COPYREG keyword - invalid/undefined keyword: " + srcArray); - } - } - - - - - void Eclipse3DProperties::handleMULTIPLYKeyword( const DeckKeyword& deckKeyword, BoxManager& boxManager) { - for( const auto& record : deckKeyword ) { - const std::string& field = record.getItem("field").get< std::string >(0); - - if (m_doubleGridProperties.hasKeyword( field )) - m_doubleGridProperties.handleMULTIPLYRecord( record , boxManager ); - else if (m_intGridProperties.hasKeyword( field )) - m_intGridProperties.handleMULTIPLYRecord( record , boxManager ); - else - throw std::invalid_argument("Fatal error processing MULTIPLY keyword. Tried to shift not defined keyword " + field); - - } - } - - - /** - The fine print of the manual says the ADD keyword should support - some state dependent semantics regarding endpoint scaling arrays - in the PROPS section. That is not supported. - */ - void Eclipse3DProperties::handleADDKeyword( const DeckKeyword& deckKeyword, BoxManager& boxManager) { - for( const auto& record : deckKeyword ) { - const std::string& field = record.getItem("field").get< std::string >(0); - - if (m_doubleGridProperties.hasKeyword( field )) - m_doubleGridProperties.handleADDRecord( record , boxManager ); - else if (m_intGridProperties.hasKeyword( field )) - m_intGridProperties.handleADDRecord( record , boxManager ); - else - throw std::invalid_argument("Fatal error processing ADD keyword. Tried to shift not defined keyword " + field); - - } - } - - - void Eclipse3DProperties::handleCOPYKeyword( const DeckKeyword& deckKeyword, BoxManager& boxManager) { - for( const auto& record : deckKeyword ) { - const std::string& field = record.getItem("src").get< std::string >(0); - - if (m_doubleGridProperties.hasKeyword( field )) - m_doubleGridProperties.handleCOPYRecord( record , boxManager ); - else if (m_intGridProperties.hasKeyword( field )) - m_intGridProperties.handleCOPYRecord( record , boxManager ); - else - throw std::invalid_argument("Fatal error processing COPY keyword. Tried to copy not defined keyword " + field); - - } - } - - - void Eclipse3DProperties::handleEQUALSKeyword( const DeckKeyword& deckKeyword, BoxManager& boxManager) { - for( const auto& record : deckKeyword ) { - const std::string& field = record.getItem("field").get< std::string >(0); - - if (m_doubleGridProperties.supportsKeyword( field )) - m_doubleGridProperties.handleEQUALSRecord( record , boxManager ); - else if (m_intGridProperties.supportsKeyword( field )) - m_intGridProperties.handleEQUALSRecord( record , boxManager ); - else - throw std::invalid_argument("Fatal error processing EQUALS keyword. Tried to assign not defined keyword " + field); - - } - } - - - - MessageContainer Eclipse3DProperties::getMessageContainer() { - MessageContainer messages; - messages.appendMessages(m_intGridProperties.getMessageContainer()); - messages.appendMessages(m_doubleGridProperties.getMessageContainer()); - return messages; - } - - - void Eclipse3DProperties::setKeywordBox( const DeckKeyword& deckKeyword, - const DeckRecord& deckRecord, - BoxManager& boxManager) { - const auto& I1Item = deckRecord.getItem("I1"); - const auto& I2Item = deckRecord.getItem("I2"); - const auto& J1Item = deckRecord.getItem("J1"); - const auto& J2Item = deckRecord.getItem("J2"); - const auto& K1Item = deckRecord.getItem("K1"); - const auto& K2Item = deckRecord.getItem("K2"); - - size_t setCount = 0; - - if (!I1Item.defaultApplied(0)) - setCount++; - - if (!I2Item.defaultApplied(0)) - setCount++; - - if (!J1Item.defaultApplied(0)) - setCount++; - - if (!J2Item.defaultApplied(0)) - setCount++; - - if (!K1Item.defaultApplied(0)) - setCount++; - - if (!K2Item.defaultApplied(0)) - setCount++; - - if (setCount == 6) { - boxManager.setKeywordBox( I1Item.get< int >(0) - 1, - I2Item.get< int >(0) - 1, - J1Item.get< int >(0) - 1, - J2Item.get< int >(0) - 1, - K1Item.get< int >(0) - 1, - K2Item.get< int >(0) - 1); - } else if (setCount != 0) { - std::string msg = "BOX modifiers on keywords must be either " - "specified completely or not at all. Ignoring."; - m_intGridProperties.getMessageContainer().error(deckKeyword.getFileName() + std::to_string(deckKeyword.getLineNumber()) + msg); - } - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Eclipse3DProperties.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Eclipse3DProperties.hpp deleted file mode 100644 index 495238e89b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Eclipse3DProperties.hpp +++ /dev/null @@ -1,102 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License along with - OPM. If not, see . -*/ - -#ifndef OPM_ECLIPSE_PROPERTIES_HPP -#define OPM_ECLIPSE_PROPERTIES_HPP - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -namespace Opm { - - class Box; - class BoxManager; - class Deck; - class DeckItem; - class DeckKeyword; - class DeckRecord; - class EclipseGrid; - class Section; - class TableManager; - class UnitSystem; - - /// Class representing properties on 3D grid for use in EclipseState. - class Eclipse3DProperties - { - public: - - Eclipse3DProperties(const Deck& deck, - const TableManager& tableManager, - const EclipseGrid& eclipseGrid); - - - const GridProperty& getRegion(const DeckItem& regionItem) const; - std::vector< int > getRegions( const std::string& keyword ) const; - std::string getDefaultRegionKeyword() const; - - const GridProperty& getIntGridProperty ( const std::string& keyword ) const; - const GridProperty& getDoubleGridProperty ( const std::string& keyword ) const; - - const GridProperties& getIntProperties() const; - const GridProperties& getDoubleProperties() const; - - bool hasDeckIntGridProperty(const std::string& keyword) const; - bool hasDeckDoubleGridProperty(const std::string& keyword) const; - bool supportsGridProperty(const std::string& keyword) const; - MessageContainer getMessageContainer(); - - private: - void processGridProperties(const Deck& deck, - const EclipseGrid& eclipseGrid); - - void scanSection(const Section& section, - const EclipseGrid& eclipseGrid); - - void handleADDKeyword( const DeckKeyword& deckKeyword, BoxManager& boxManager); - void handleBOXKeyword( const DeckKeyword& deckKeyword, BoxManager& boxManager); - void handleCOPYKeyword( const DeckKeyword& deckKeyword, BoxManager& boxManager); - void handleENDBOXKeyword( BoxManager& boxManager); - void handleEQUALSKeyword( const DeckKeyword& deckKeyword, BoxManager& boxManager); - void handleMULTIPLYKeyword(const DeckKeyword& deckKeyword, BoxManager& boxManager); - - void handleADDREGKeyword( const DeckKeyword& deckKeyword ); - void handleCOPYREGKeyword( const DeckKeyword& deckKeyword ); - void handleEQUALREGKeyword(const DeckKeyword& deckKeyword ); - void handleMULTIREGKeyword(const DeckKeyword& deckKeyword ); - - void loadGridPropertyFromDeckKeyword(const Box& inputBox, - const DeckKeyword& deckKeyword); - - void setKeywordBox(const DeckKeyword& deckKeyword, const DeckRecord&, BoxManager& boxManager); - - std::string m_defaultRegion; - const UnitSystem& m_deckUnitSystem; - GridProperties m_intGridProperties; - GridProperties m_doubleGridProperties; - }; -} - -#endif // OPM_ECLIPSE_PROPERTIES_HPP diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/EclipseConfig.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/EclipseConfig.cpp deleted file mode 100644 index 29daf4276a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/EclipseConfig.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace Opm { - - EclipseConfig::EclipseConfig(const Deck& deck, - const Eclipse3DProperties& eclipse3DProperties, - const GridDims& inputGrid, - const Schedule& schedule, - const ParseContext& parseContext) : - m_ioConfig( std::make_shared(deck)), - m_initConfig( deck), - m_simulationConfig(deck, eclipse3DProperties), - m_summaryConfig( deck, schedule, eclipse3DProperties, parseContext , inputGrid.getNXYZ()), - m_restartConfig( deck ) - { - m_ioConfig->initFirstRFTOutput(schedule); - } - - - const InitConfig& EclipseConfig::init() const { - return m_initConfig; - } - - const IOConfig& EclipseConfig::io() const { - return *m_ioConfig; - } - - IOConfig& EclipseConfig::io() { - return *m_ioConfig; - } - - const SimulationConfig& EclipseConfig::simulation() const { - return m_simulationConfig; - } - - const SummaryConfig& EclipseConfig::summary() const { - return m_summaryConfig; - } - - const RestartConfig& EclipseConfig::restart() const { - return this->m_restartConfig; - } - - // [[deprecated]] --- use summary() - const SummaryConfig& EclipseConfig::getSummaryConfig() const { - return summary(); - } - - // [[deprecated]] --- use restart() - const RestartConfig& EclipseConfig::getRestartConfig() const { - return this->restart(); - } - - IOConfigConstPtr EclipseConfig::getIOConfigConst() const { - return m_ioConfig; - } - - IOConfigPtr EclipseConfig::getIOConfig() const { - return m_ioConfig; - } - - // [[deprecated]] --- use init() - const InitConfig& EclipseConfig::getInitConfig() const { - return init(); - } - - // [[deprecated]] --- use simulation() - const SimulationConfig& EclipseConfig::getSimulationConfig() const { - return simulation(); - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/EclipseConfig.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/EclipseConfig.hpp deleted file mode 100644 index 248c80511a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/EclipseConfig.hpp +++ /dev/null @@ -1,70 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef OPM_ECLIPSE_CONFIG_HPP -#define OPM_ECLIPSE_CONFIG_HPP - -#include - -#include -#include -#include -#include - -namespace Opm { - - class Deck; - class GridDims; - class Eclipse3DProperties; - class IOConfig; - class ParseContext; - - class EclipseConfig - { - public: - EclipseConfig(const Deck& deck, - const Eclipse3DProperties& eclipse3DProperties, - const GridDims& gridDims, - const Schedule& schedule, - const ParseContext& parseContext); - - const InitConfig& init() const; - const IOConfig& io() const; - IOConfig& io(); - const SimulationConfig & simulation() const; - const SummaryConfig& summary() const; - const RestartConfig& restart() const; - - std::shared_ptr getIOConfigConst() const; - std::shared_ptr getIOConfig() const; - const InitConfig& getInitConfig() const; - const SimulationConfig & getSimulationConfig() const; - const SummaryConfig& getSummaryConfig() const; - const RestartConfig& getRestartConfig() const; - - private: - std::shared_ptr m_ioConfig; - const InitConfig m_initConfig; - const SimulationConfig m_simulationConfig; - SummaryConfig m_summaryConfig; - RestartConfig m_restartConfig; - }; -} - -#endif // OPM_ECLIPSE_CONFIG_HPP diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/EclipseState.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/EclipseState.cpp deleted file mode 100644 index f3e7093be7..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/EclipseState.cpp +++ /dev/null @@ -1,292 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -namespace Opm { - - EclipseState::EclipseState(std::shared_ptr deckptr, ParseContext parseContext) : - EclipseState(*deckptr, parseContext) - {} - - EclipseState::EclipseState(const Deck& deck, ParseContext parseContext) : - m_parseContext( parseContext ), - m_tables( deck ), - m_gridDims( deck ), - m_inputGrid( std::make_shared(deck, nullptr) ), - m_transMult( m_inputGrid->getNX(), m_inputGrid->getNY(), m_inputGrid->getNZ()), - m_schedule( std::make_shared( m_parseContext, *m_inputGrid, deck ) ), - m_eclipseProperties( deck, m_tables, *m_inputGrid ), - m_eclipseConfig( deck, m_eclipseProperties, m_gridDims, *m_schedule , parseContext), - m_inputNnc( deck, m_gridDims ), - m_deckUnitSystem( deck.getActiveUnitSystem() ) - - { - m_inputGrid->resetACTNUM(m_eclipseProperties.getIntGridProperty("ACTNUM").getData().data()); - - if (deck.hasKeyword( "TITLE" )) { - const auto& titleKeyword = deck.getKeyword( "TITLE" ); - const auto& item = titleKeyword.getRecord( 0 ).getItem( 0 ); - std::vector itemValue = item.getData(); - m_title = boost::algorithm::join( itemValue, " " ); - } - - initTransMult(); - initFaults(deck); - - std::vector< const DeckKeyword* > multregtKeywords; - if (deck.hasKeyword("MULTREGT")) - multregtKeywords = deck.getKeywordList("MULTREGT"); - m_transMult.createMultregtScanner(m_eclipseProperties, multregtKeywords); - - - m_messageContainer.appendMessages(m_tables.getMessageContainer()); - m_messageContainer.appendMessages(m_schedule->getMessageContainer()); - m_messageContainer.appendMessages(m_inputGrid->getMessageContainer()); - m_messageContainer.appendMessages(m_eclipseProperties.getMessageContainer()); - } - - const UnitSystem& EclipseState::getDeckUnitSystem() const { - return m_deckUnitSystem; - } - - const UnitSystem& EclipseState::getUnits() const { - return m_deckUnitSystem; - } - - EclipseGridConstPtr EclipseState::getInputGrid() const { - return m_inputGrid; - } - - EclipseGridPtr EclipseState::getInputGridCopy() const { - return std::make_shared( *m_inputGrid ); - } - - const SummaryConfig& EclipseState::getSummaryConfig() const { - return m_eclipseConfig.getSummaryConfig(); - } - - const RestartConfig& EclipseState::getRestartConfig() const { - return m_eclipseConfig.getRestartConfig(); - } - - RestartConfig& EclipseState::getRestartConfig() { - return const_cast< RestartConfig& >( m_eclipseConfig.getRestartConfig() ); - } - - const Eclipse3DProperties& EclipseState::get3DProperties() const { - return m_eclipseProperties; - } - - const MessageContainer& EclipseState::getMessageContainer() const { - return m_messageContainer; - } - - - MessageContainer& EclipseState::getMessageContainer() { - return m_messageContainer; - } - - - const TableManager& EclipseState::getTableManager() const { - return m_tables; - } - - const ParseContext& EclipseState::getParseContext() const { - return m_parseContext; - } - - ScheduleConstPtr EclipseState::getSchedule() const { - return m_schedule; - } - - /// [[deprecated]] --- use cfg().io() - IOConfigConstPtr EclipseState::getIOConfigConst() const { - return m_eclipseConfig.getIOConfigConst(); - } - - /// [[deprecated]] --- use cfg().io() - IOConfigPtr EclipseState::getIOConfig() const { - return m_eclipseConfig.getIOConfig(); - } - - /// [[deprecated]] --- use cfg().init() - const InitConfig& EclipseState::getInitConfig() const { - return m_eclipseConfig.getInitConfig(); - } - - /// [[deprecated]] --- use cfg() - const EclipseConfig& EclipseState::getEclipseConfig() const { - return cfg(); - } - - const EclipseConfig& EclipseState::cfg() const { - return m_eclipseConfig; - } - - /// [[deprecated]] --- use cfg().simulation() - const SimulationConfig& EclipseState::getSimulationConfig() const { - return m_eclipseConfig.getSimulationConfig(); - } - - const FaultCollection& EclipseState::getFaults() const { - return m_faults; - } - - const TransMult& EclipseState::getTransMult() const { - return m_transMult; - } - - const NNC& EclipseState::getInputNNC() const { - return m_inputNnc; - } - - bool EclipseState::hasInputNNC() const { - return m_inputNnc.hasNNC(); - } - - std::string EclipseState::getTitle() const { - return m_title; - } - - void EclipseState::initTransMult() { - const auto& p = m_eclipseProperties; - if (m_eclipseProperties.hasDeckDoubleGridProperty("MULTX")) - m_transMult.applyMULT(p.getDoubleGridProperty("MULTX"), FaceDir::XPlus); - if (m_eclipseProperties.hasDeckDoubleGridProperty("MULTX-")) - m_transMult.applyMULT(p.getDoubleGridProperty("MULTX-"), FaceDir::XMinus); - - if (m_eclipseProperties.hasDeckDoubleGridProperty("MULTY")) - m_transMult.applyMULT(p.getDoubleGridProperty("MULTY"), FaceDir::YPlus); - if (m_eclipseProperties.hasDeckDoubleGridProperty("MULTY-")) - m_transMult.applyMULT(p.getDoubleGridProperty("MULTY-"), FaceDir::YMinus); - - if (m_eclipseProperties.hasDeckDoubleGridProperty("MULTZ")) - m_transMult.applyMULT(p.getDoubleGridProperty("MULTZ"), FaceDir::ZPlus); - if (m_eclipseProperties.hasDeckDoubleGridProperty("MULTZ-")) - m_transMult.applyMULT(p.getDoubleGridProperty("MULTZ-"), FaceDir::ZMinus); - } - - void EclipseState::initFaults(const Deck& deck) { - const GRIDSection gridSection ( deck ); - - m_faults = FaultCollection(gridSection, *m_inputGrid); - setMULTFLT(gridSection); - - if (Section::hasEDIT(deck)) { - setMULTFLT(EDITSection ( deck )); - } - - m_transMult.applyMULTFLT( m_faults ); - } - - - - void EclipseState::setMULTFLT(const Section& section) { - for (size_t index=0; index < section.count("MULTFLT"); index++) { - const auto& faultsKeyword = section.getKeyword("MULTFLT" , index); - for (auto iter = faultsKeyword.begin(); iter != faultsKeyword.end(); ++iter) { - - const auto& faultRecord = *iter; - const std::string& faultName = faultRecord.getItem(0).get< std::string >(0); - double multFlt = faultRecord.getItem(1).get< double >(0); - - m_faults.setTransMult( faultName , multFlt ); - } - } - } - - void EclipseState::complainAboutAmbiguousKeyword(const Deck& deck, const std::string& keywordName) { - m_messageContainer.error("The " + keywordName + " keyword must be unique in the deck. Ignoring all!"); - auto keywords = deck.getKeywordList(keywordName); - for (size_t i = 0; i < keywords.size(); ++i) { - std::string msg = "Ambiguous keyword "+keywordName+" defined here"; - m_messageContainer.error(keywords[i]->getFileName(), msg, keywords[i]->getLineNumber()); - } - } - - void EclipseState::applyModifierDeck(const Deck& deck) { - using namespace ParserKeywords; - for (const auto& keyword : deck) { - - if (keyword.isKeyword()) { - for (const auto& record : keyword) { - const std::string& faultName = record.getItem().get< std::string >(0); - auto& fault = m_faults.getFault( faultName ); - double tmpMultFlt = record.getItem().get< double >(0); - double oldMultFlt = fault.getTransMult( ); - double newMultFlt = oldMultFlt * tmpMultFlt; - - /* - This extremely contrived way of doing it is because of difference in - behavior and section awareness between the Fault object and the - Transmult object: - - 1. MULTFLT keywords found in the SCHEDULE section should apply the - transmissibility modifiers cumulatively - i.e. the current - transmissibility across the fault should be *multiplied* with the - newly entered MULTFLT value, and the resulting transmissibility - multplier for this fault should be the product of the newly - entered value and the current value. - - 2. The TransMult::applyMULTFLT() implementation will *multiply* the - transmissibility across a face with the value in the fault - object. Hence the current value has already been multiplied in; - we therefor first *set* the MULTFLT value to the new value, then - apply it to the TransMult object and then eventually update the - MULTFLT value in the fault instance. - - */ - fault.setTransMult( tmpMultFlt ); - m_transMult.applyMULTFLT( fault ); - fault.setTransMult( newMultFlt ); - } - } - } - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/EclipseState.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/EclipseState.hpp deleted file mode 100644 index 3be3afa5c0..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/EclipseState.hpp +++ /dev/null @@ -1,143 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef OPM_ECLIPSE_STATE_HPP -#define OPM_ECLIPSE_STATE_HPP - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace Opm { - - template< typename > class GridProperty; - template< typename > class GridProperties; - - class Box; - class BoxManager; - class Deck; - class DeckItem; - class DeckKeyword; - class DeckRecord; - class EclipseGrid; - class InitConfig; - class IOConfig; - class ParseContext; - class RestartConfig; - class Schedule; - class Section; - class SimulationConfig; - class TableManager; - class UnitSystem; - - class EclipseState { - public: - enum EnabledTypes { - IntProperties = 0x01, - DoubleProperties = 0x02, - - AllProperties = IntProperties | DoubleProperties - }; - - EclipseState(const Deck& deck , ParseContext parseContext = ParseContext()); - - /// [deprecated] - EclipseState(std::shared_ptr< const Deck > deck , ParseContext parseContext = ParseContext()); - - const ParseContext& getParseContext() const; - - std::shared_ptr< const Schedule > getSchedule() const; - std::shared_ptr< const IOConfig > getIOConfigConst() const; - std::shared_ptr< IOConfig > getIOConfig() const; - - const InitConfig& getInitConfig() const; - const SimulationConfig& getSimulationConfig() const; - const SummaryConfig& getSummaryConfig() const; - const RestartConfig& getRestartConfig() const; - RestartConfig& getRestartConfig(); - - std::shared_ptr< const EclipseGrid > getInputGrid() const; - std::shared_ptr< EclipseGrid > getInputGridCopy() const; - - const FaultCollection& getFaults() const; - const TransMult& getTransMult() const; - - /// non-neighboring connections - /// the non-standard adjacencies as specified in input deck - const NNC& getInputNNC() const; - bool hasInputNNC() const; - - const Eclipse3DProperties& get3DProperties() const; - - const TableManager& getTableManager() const; - const EclipseConfig& getEclipseConfig() const; - const EclipseConfig& cfg() const; - - // the unit system used by the deck. note that it is rarely needed to convert - // units because internally to opm-parser everything is represented by SI - // units... - const UnitSystem& getDeckUnitSystem() const; - const UnitSystem& getUnits() const; - - const MessageContainer& getMessageContainer() const; - MessageContainer& getMessageContainer(); - std::string getTitle() const; - - void applyModifierDeck(const Deck& deck); - - private: - void initIOConfigPostSchedule(const Deck& deck); - void initTransMult(); - void initFaults(const Deck& deck); - - void setMULTFLT(const Opm::Section& section); - - void complainAboutAmbiguousKeyword(const Deck& deck, - const std::string& keywordName); - - ParseContext m_parseContext; - const TableManager m_tables; - const GridDims m_gridDims; - std::shared_ptr m_inputGrid; - TransMult m_transMult; - std::shared_ptr< const Schedule > m_schedule; - Eclipse3DProperties m_eclipseProperties; - EclipseConfig m_eclipseConfig; - NNC m_inputNnc; - UnitSystem m_deckUnitSystem; - - FaultCollection m_faults; - std::string m_title; - - MessageContainer m_messageContainer; - }; - - typedef std::shared_ptr EclipseStatePtr; - typedef std::shared_ptr EclipseStateConstPtr; -} - -#endif // OPM_ECLIPSE_STATE_HPP diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/Box.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/Box.cpp deleted file mode 100644 index d0ff0bc183..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/Box.cpp +++ /dev/null @@ -1,154 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include - -#include - -namespace Opm { - - Box::Box(int nx , int ny , int nz) { - if (nx <= 0) - throw std::invalid_argument("The input nx value is invalid"); - - if (ny <= 0) - throw std::invalid_argument("The input ny value is invalid"); - - if (nz <= 0) - throw std::invalid_argument("The input nz value is invalid"); - - m_dims[0] = (size_t) nx; - m_dims[1] = (size_t) ny; - m_dims[2] = (size_t) nz; - - m_offset[0] = 0; - m_offset[1] = 0; - m_offset[2] = 0; - - m_stride[0] = 1; - m_stride[1] = m_dims[0]; - m_stride[2] = m_dims[0] * m_dims[1]; - - m_isGlobal = true; - initIndexList(); - } - - - Box::Box(const Box& globalBox , int i1 , int i2 , int j1 , int j2 , int k1 , int k2) { - assertDims(globalBox , 0 , i1 , i2); - assertDims(globalBox , 1 , j1 , j2); - assertDims(globalBox , 2 , k1 , k2); - - m_dims[0] = (size_t) (i2 - i1 + 1); - m_dims[1] = (size_t) (j2 - j1 + 1); - m_dims[2] = (size_t) (k2 - k1 + 1); - - m_offset[0] = (size_t) i1; - m_offset[1] = (size_t) j1; - m_offset[2] = (size_t) k1; - - m_stride[0] = 1; - m_stride[1] = globalBox.getDim(0); - m_stride[2] = globalBox.getDim(0) * globalBox.getDim(1); - - if (size() == globalBox.size()) - m_isGlobal = true; - else - m_isGlobal = false; - - initIndexList(); - } - - - void Box::assertDims(const Box& globalBox, size_t idim , int l1 , int l2) { - if ((l1 < 0) || (l2 < 0) || (l1 > l2)) - throw std::invalid_argument("Invalid index values for sub box"); - - if ((size_t) l2 >= globalBox.getDim(idim)) - throw std::invalid_argument("Invalid index values for sub box"); - } - - - size_t Box::size() const { - return m_dims[0] * m_dims[1] * m_dims[2]; - } - - - bool Box::isGlobal() const { - return m_isGlobal; - } - - - size_t Box::getDim(size_t idim) const { - if (idim >= 3) - throw std::invalid_argument("The input dimension value is invalid"); - - return m_dims[idim]; - } - - - const std::vector& Box::getIndexList() const { - return m_indexList; - } - - - void Box::initIndexList() { - m_indexList.resize( size() ); - - size_t ii,ij,ik; - size_t l = 0; - - for (ik=0; ik < m_dims[2]; ik++) { - size_t k = ik + m_offset[2]; - for (ij=0; ij < m_dims[1]; ij++) { - size_t j = ij + m_offset[1]; - for (ii=0; ii < m_dims[0]; ii++) { - size_t i = ii + m_offset[0]; - size_t g = i * m_stride[0] + j*m_stride[1] + k*m_stride[2]; - - m_indexList[l] = g; - l++; - } - } - } - } - - bool Box::equal(const Box& other) const { - - if (size() != other.size()) - return false; - - { - for (size_t idim = 0; idim < 3; idim++) { - if (m_dims[idim] != other.m_dims[idim]) - return false; - - if (m_stride[idim] != other.m_stride[idim]) - return false; - - if (m_offset[idim] != other.m_offset[idim]) - return false; - } - } - - return true; - } - -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/Box.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/Box.hpp deleted file mode 100644 index 3fcac49dd1..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/Box.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - - -#ifndef BOX_HPP_ -#define BOX_HPP_ - -#include -#include - -namespace Opm { - - class Box { - public: - Box(int nx , int ny , int nz); - Box(const Box& globalBox , int i1 , int i2 , int j1 , int j2 , int k1 , int k2); // Zero offset coordinates. - size_t size() const; - bool isGlobal() const; - size_t getDim(size_t idim) const; - const std::vector& getIndexList() const; - bool equal(const Box& other) const; - - - private: - void initIndexList(); - static void assertDims(const Box& globalBox, size_t idim , int l1 , int l2); - size_t m_dims[3]; - size_t m_offset[3]; - size_t m_stride[3]; - - bool m_isGlobal; - std::vector m_indexList; - }; -} - - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/BoxManager.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/BoxManager.cpp deleted file mode 100644 index 3474a251a5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/BoxManager.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include - -#include - - -namespace Opm { - - BoxManager::BoxManager(int nx , int ny , int nz) { - m_globalBox = std::make_shared(nx,ny,nz); - } - - - std::shared_ptr BoxManager::getGlobalBox() const { - return m_globalBox; - } - - - std::shared_ptr BoxManager::getInputBox() const { - return m_inputBox; - } - - - std::shared_ptr BoxManager::getKeywordBox() const { - return m_keywordBox; - } - - std::shared_ptr BoxManager::getActiveBox() const { - if (m_keywordBox) - return m_keywordBox; - - if (m_inputBox) - return m_inputBox; - - return m_globalBox; - } - - - void BoxManager::setInputBox( int i1,int i2 , int j1 , int j2 , int k1 , int k2) { - m_inputBox.reset( new Box( *m_globalBox , i1,i2,j1,j2,k1,k2) ); - } - - void BoxManager::endInputBox() { - if (m_keywordBox) - throw std::invalid_argument("Hmmm - this seems like an internal error - the SECTION is terminated with an active keyword box"); - - m_inputBox.reset( ); - } - - void BoxManager::endSection() { - endInputBox(); - } - - void BoxManager::setKeywordBox( int i1,int i2 , int j1 , int j2 , int k1 , int k2) { - m_keywordBox.reset( new Box( *m_globalBox , i1,i2,j1,j2,k1,k2) ); - } - - void BoxManager::endKeyword() { - m_keywordBox.reset( ); - } - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/BoxManager.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/BoxManager.hpp deleted file mode 100644 index 3e32dc4e57..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/BoxManager.hpp +++ /dev/null @@ -1,78 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - - -#ifndef BOXMANAGER_HPP_ -#define BOXMANAGER_HPP_ - -#include -#include - -#include - -/* - This class implements a simple book keeping system for the current - input box. In general there are three different input boxes which - are relevant: - - 1. The global box give by the complete dimensions of the grid. - - 2. The input box given explicitly by the BOX keyword. That BOX will - apply to all following FIELD properties, and it will continue - to apply until either: - - - ENDBOX - - A new BOX - - End of current section - - is encountered. - - 3. Some keywords allow for a Box which applies only to the elements - of that keyword. - -*/ - - -namespace Opm { - - class BoxManager { - public: - BoxManager(int nx , int ny , int nz); - - void setInputBox( int i1,int i2 , int j1 , int j2 , int k1 , int k2); - void setKeywordBox( int i1,int i2 , int j1 , int j2 , int k1 , int k2); - - void endSection(); - void endInputBox(); - void endKeyword(); - - std::shared_ptr getActiveBox() const; - std::shared_ptr getGlobalBox() const; - std::shared_ptr getInputBox() const; - std::shared_ptr getKeywordBox() const; - - private: - std::shared_ptr m_globalBox; - std::shared_ptr m_inputBox; - std::shared_ptr m_keywordBox; - }; -} - - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/EclipseGrid.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/EclipseGrid.cpp deleted file mode 100644 index 99a3e26a0b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/EclipseGrid.cpp +++ /dev/null @@ -1,776 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - - -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -namespace Opm { - - - EclipseGrid::EclipseGrid(std::array& dims , - const std::vector& coord , - const std::vector& zcorn , - const int * actnum, - const double * mapaxes) - : m_minpvValue(0), - m_minpvMode(MinpvMode::ModeEnum::Inactive), - m_pinch("PINCH"), - m_pinchoutMode(PinchMode::ModeEnum::TOPBOT), - m_multzMode(PinchMode::ModeEnum::TOP) - { - initCornerPointGrid( dims, coord , zcorn , actnum , mapaxes ); - } - - - - /** - Will create an EclipseGrid instance based on an existing - GRID/EGRID file. - */ - EclipseGrid::EclipseGrid(const std::string& filename ) - : GridDims(), - m_minpvValue(0), - m_minpvMode(MinpvMode::ModeEnum::Inactive), - m_pinch("PINCH"), - m_pinchoutMode(PinchMode::ModeEnum::TOPBOT), - m_multzMode(PinchMode::ModeEnum::TOP) - { - ecl_grid_type * new_ptr = ecl_grid_load_case__( filename.c_str() , false ); - if (new_ptr) - m_grid.reset( new_ptr ); - else - throw std::invalid_argument("Could not load grid from binary file: " + filename); - - m_nx = ecl_grid_get_nx( c_ptr() ); - m_ny = ecl_grid_get_ny( c_ptr() ); - m_nz = ecl_grid_get_nz( c_ptr() ); - } - - - EclipseGrid::EclipseGrid(size_t nx, size_t ny , size_t nz, - double dx, double dy, double dz) - : GridDims(nx, ny, nz), - m_minpvValue(0), - m_minpvMode(MinpvMode::ModeEnum::Inactive), - m_pinch("PINCH"), - m_pinchoutMode(PinchMode::ModeEnum::TOPBOT), - m_multzMode(PinchMode::ModeEnum::TOP), - m_grid( ecl_grid_alloc_rectangular(nx, ny, nz, dx, dy, dz, NULL) ) - { - } - - EclipseGrid::EclipseGrid(const std::shared_ptr& deckptr, const int * actnum) - : EclipseGrid(*deckptr, actnum) - {} - - - EclipseGrid::EclipseGrid(const EclipseGrid& src, const double* zcorn , const std::vector& actnum) - : GridDims(src.getNX(), src.getNY(), src.getNZ()), - m_messages( src.m_messages ), - m_minpvValue( src.m_minpvValue ), - m_minpvMode( src.m_minpvMode ), - m_pinch( src.m_pinch ), - m_pinchoutMode( src.m_pinchoutMode ), - m_multzMode( src.m_multzMode ) - { - const int * actnum_data = (actnum.empty()) ? nullptr : actnum.data(); - m_grid.reset( ecl_grid_alloc_processed_copy( src.c_ptr(), zcorn , actnum_data )); - } - - - EclipseGrid::EclipseGrid(const EclipseGrid& src, const std::vector& zcorn , const std::vector& actnum) - : EclipseGrid( src , (zcorn.empty()) ? nullptr : zcorn.data(), actnum ) - { } - - - EclipseGrid::EclipseGrid(const EclipseGrid& src, const std::vector& actnum) - : EclipseGrid( src , nullptr , actnum ) - { } - - - - /* - This is the main EclipseGrid constructor, it will inspect the - input Deck for grid keywords, either the corner point keywords - COORD and ZCORN, or the various rectangular keywords like DX,DY - and DZ. - - Actnum is treated specially: - - 1. If an actnum pointer is passed in that should be a pointer - to 0 and 1 values which will be used as actnum mask. - - 2. If the actnum pointer is not present the constructor will - look in the deck for an actnum keyword, and use that if it - is found. This is a best effort which will work in many - cases, but if the ACTNUM keyword is manipulated in the deck - those manipulations will be silently lost; if the ACTNUM - keyword has size different from nx*ny*nz it will also be - silently ignored. - - With a mutable EclipseGrid instance you can later call the - EclipseGrid::resetACTNUM() method when you have complete actnum - information. The EclipseState based construction of EclipseGrid - is a two-pass operation, which guarantees that actnum is handled - correctly. - */ - - - - - EclipseGrid::EclipseGrid(const Deck& deck, const int * actnum) - : GridDims(deck), - m_minpvValue(0), - m_minpvMode(MinpvMode::ModeEnum::Inactive), - m_pinch("PINCH"), - m_pinchoutMode(PinchMode::ModeEnum::TOPBOT), - m_multzMode(PinchMode::ModeEnum::TOP) - { - - const std::array dims = getNXYZ(); - initGrid(dims, deck); - - if (actnum != nullptr) - resetACTNUM(actnum); - else { - if (deck.hasKeyword()) { - const auto& actnumData = deck.getKeyword().getIntData(); - if (actnumData.size() == getCartesianSize()) - resetACTNUM( actnumData.data()); - else { - const std::string msg = "The ACTNUM keyword has " + std::to_string( actnumData.size() ) + " elements - expected : " + std::to_string( getCartesianSize()) + " - ignored."; - m_messages.warning(msg); - } - } - } - } - - - void EclipseGrid::initGrid( const std::array& dims, const Deck& deck) { - if (hasCornerPointKeywords(deck)) { - initCornerPointGrid(dims , deck); - } else if (hasCartesianKeywords(deck)) { - initCartesianGrid(dims , deck); - } else { - throw std::invalid_argument("EclipseGrid needs cornerpoint or cartesian keywords."); - } - - if (deck.hasKeyword()) { - const auto& record = deck.getKeyword( ).getRecord(0); - const auto& item = record.getItem( ); - m_pinch.setValue( item.getSIDouble(0) ); - - auto pinchoutString = record.getItem().get< std::string >(0); - m_pinchoutMode = PinchMode::PinchModeFromString(pinchoutString); - - auto multzString = record.getItem().get< std::string >(0); - m_multzMode = PinchMode::PinchModeFromString(multzString); - } - - if (deck.hasKeyword() && deck.hasKeyword()) { - throw std::invalid_argument("Can not have both MINPV and MINPVFIL in deck."); - } - - if (deck.hasKeyword()) { - const auto& record = deck.getKeyword( ).getRecord(0); - const auto& item = record.getItem( ); - m_minpvValue = item.getSIDouble(0); - m_minpvMode = MinpvMode::ModeEnum::EclSTD; - } - - - if (deck.hasKeyword()) { - const auto& record = deck.getKeyword( ).getRecord(0); - const auto& item = record.getItem( ); - m_minpvValue = item.getSIDouble(0); - m_minpvMode = MinpvMode::ModeEnum::OpmFIL; - } - } - - - size_t EclipseGrid::activeIndex(size_t i, size_t j, size_t k) const { - return activeIndex( getGlobalIndex( i,j,k )); - } - - size_t EclipseGrid::activeIndex(size_t globalIndex) const { - int active_index = ecl_grid_get_active_index1( m_grid.get() , globalIndex ); - if (active_index < 0) - throw std::invalid_argument("Input argument does not correspond to an active cell"); - return static_cast( active_index ); - } - - /** - Observe: the input argument is assumed to be in the space - [0,num_active). - */ - size_t EclipseGrid::getGlobalIndex(size_t active_index) const { - int global_index = ecl_grid_get_global_index1A( m_grid.get() , active_index ); - return static_cast(global_index); - } - - size_t EclipseGrid::getGlobalIndex(size_t i, size_t j, size_t k) const { - return GridDims::getGlobalIndex(i,j,k); - } - - - bool EclipseGrid::isPinchActive( ) const { - return m_pinch.hasValue(); - } - - double EclipseGrid::getPinchThresholdThickness( ) const { - return m_pinch.getValue(); - } - - PinchMode::ModeEnum EclipseGrid::getPinchOption( ) const { - return m_pinchoutMode; - } - - PinchMode::ModeEnum EclipseGrid::getMultzOption( ) const { - return m_multzMode; - } - - MinpvMode::ModeEnum EclipseGrid::getMinpvMode() const { - return m_minpvMode; - } - - double EclipseGrid::getMinpvValue( ) const { - return m_minpvValue; - } - - - void EclipseGrid::initCartesianGrid(const std::array& dims , const Deck& deck) { - if (hasDVDEPTHZKeywords( deck )) - initDVDEPTHZGrid( dims , deck ); - else if (hasDTOPSKeywords(deck)) - initDTOPSGrid( dims ,deck ); - else - throw std::invalid_argument("Tried to initialize cartesian grid without all required keywords"); - } - - - void EclipseGrid::initDVDEPTHZGrid(const std::array& dims, const Deck& deck) { - const std::vector& DXV = deck.getKeyword().getSIDoubleData(); - const std::vector& DYV = deck.getKeyword().getSIDoubleData(); - const std::vector& DZV = deck.getKeyword().getSIDoubleData(); - const std::vector& DEPTHZ = deck.getKeyword().getSIDoubleData(); - - assertVectorSize( DEPTHZ , static_cast( (dims[0] + 1)*(dims[1] +1 )) , "DEPTHZ"); - assertVectorSize( DXV , static_cast( dims[0] ) , "DXV"); - assertVectorSize( DYV , static_cast( dims[1] ) , "DYV"); - assertVectorSize( DZV , static_cast( dims[2] ) , "DZV"); - - m_grid.reset( ecl_grid_alloc_dxv_dyv_dzv_depthz( dims[0] , dims[1] , dims[2] , DXV.data() , DYV.data() , DZV.data() , DEPTHZ.data() , nullptr ) ); - } - - - void EclipseGrid::initDTOPSGrid(const std::array& dims , const Deck& deck) { - std::vector DX = createDVector( dims , 0 , "DX" , "DXV" , deck); - std::vector DY = createDVector( dims , 1 , "DY" , "DYV" , deck); - std::vector DZ = createDVector( dims , 2 , "DZ" , "DZV" , deck); - std::vector TOPS = createTOPSVector( dims , DZ , deck ); - m_grid.reset( ecl_grid_alloc_dx_dy_dz_tops( dims[0] , dims[1] , dims[2] , DX.data() , DY.data() , DZ.data() , TOPS.data() , nullptr ) ); - } - - - - void EclipseGrid::initCornerPointGrid(const std::array& dims , - const std::vector& coord , - const std::vector& zcorn , - const int * actnum, - const double * mapaxes) - { - const std::vector zcorn_float( zcorn.begin() , zcorn.end() ); - const std::vector coord_float( coord.begin() , coord.end() ); - float * mapaxes_float = nullptr; - if (mapaxes) { - mapaxes_float = new float[6]; - for (size_t i=0; i < 6; i++) - mapaxes_float[i] = mapaxes[i]; - } - - m_grid.reset( ecl_grid_alloc_GRDECL_data(dims[0] , - dims[1] , - dims[2] , - zcorn_float.data() , - coord_float.data() , - actnum , - false, // We do not apply the MAPAXES transformations - mapaxes_float) ); - - if (mapaxes) - delete[] mapaxes_float; - } - - void EclipseGrid::initCornerPointGrid(const std::array& dims, const Deck& deck) { - assertCornerPointKeywords( dims , deck); - { - const auto& ZCORNKeyWord = deck.getKeyword(); - const auto& COORDKeyWord = deck.getKeyword(); - const std::vector& zcorn = ZCORNKeyWord.getSIDoubleData(); - const std::vector& coord = COORDKeyWord.getSIDoubleData(); - double * mapaxes = nullptr; - - if (deck.hasKeyword()) { - const auto& mapaxesKeyword = deck.getKeyword(); - const auto& record = mapaxesKeyword.getRecord(0); - mapaxes = new double[6]; - for (size_t i = 0; i < 6; i++) { - mapaxes[i] = record.getItem( i ).getSIDouble( 0 ); - } - } - initCornerPointGrid( dims, coord , zcorn , nullptr , mapaxes ); - if (mapaxes) - delete[] mapaxes; - } - } - - - - bool EclipseGrid::hasCornerPointKeywords(const Deck& deck) { - if (deck.hasKeyword() && deck.hasKeyword()) - return true; - else - return false; - } - - - void EclipseGrid::assertCornerPointKeywords(const std::array& dims , const Deck& deck) - { - const int nx = dims[0]; - const int ny = dims[1]; - const int nz = dims[2]; - { - const auto& ZCORNKeyWord = deck.getKeyword(); - - if (ZCORNKeyWord.getDataSize() != static_cast(8*nx*ny*nz)) { - const std::string msg = - "Wrong size of the ZCORN keyword: Expected 8*x*ny*nz = " - + std::to_string(static_cast(8*nx*ny*nz)) + " is " - + std::to_string(static_cast(ZCORNKeyWord.getDataSize())); - m_messages.error(msg); - throw std::invalid_argument(msg); - } - } - - { - const auto& COORDKeyWord = deck.getKeyword(); - if (COORDKeyWord.getDataSize() != static_cast(6*(nx + 1)*(ny + 1))) { - const std::string msg = - "Wrong size of the COORD keyword: Expected 6*(nx + 1)*(ny + 1) = " - + std::to_string(static_cast(6*(nx + 1)*(ny + 1))) + " is " - + std::to_string(static_cast(COORDKeyWord.getDataSize())); - m_messages.error(msg); - throw std::invalid_argument(msg); - } - } - } - - - - bool EclipseGrid::hasCartesianKeywords(const Deck& deck) { - if (hasDVDEPTHZKeywords( deck )) - return true; - else - return hasDTOPSKeywords(deck); - } - - - bool EclipseGrid::hasDVDEPTHZKeywords(const Deck& deck) { - if (deck.hasKeyword() && - deck.hasKeyword() && - deck.hasKeyword() && - deck.hasKeyword()) - return true; - else - return false; - } - - bool EclipseGrid::hasDTOPSKeywords(const Deck& deck) { - if ((deck.hasKeyword() || deck.hasKeyword()) && - (deck.hasKeyword() || deck.hasKeyword()) && - (deck.hasKeyword() || deck.hasKeyword()) && - deck.hasKeyword()) - return true; - else - return false; - } - - - - void EclipseGrid::assertVectorSize(const std::vector& vector , size_t expectedSize , const std::string& vectorName) { - if (vector.size() != expectedSize) - throw std::invalid_argument("Wrong size for keyword: " + vectorName + ". Expected: " + boost::lexical_cast(expectedSize) + " got: " + boost::lexical_cast(vector.size())); - } - - - /* - The body of the for loop in this method looks slightly - peculiar. The situation is as follows: - - 1. The EclipseGrid class will assemble the necessary keywords - and create an ert ecl_grid instance. - - 2. The ecl_grid instance will export ZCORN, COORD and ACTNUM - data which will be used by the UnstructureGrid constructor - in opm-core. If the ecl_grid is created with ZCORN as an - input keyword that data is retained in the ecl_grid - structure, otherwise the ZCORN data is created based on the - internal cell geometries. - - 3. When constructing the UnstructuredGrid structure strict - numerical comparisons of ZCORN values are used to detect - cells in contact, if all the elements the elements in the - TOPS vector are specified[1] we will typically not get - bitwise equality between the bottom of one cell and the top - of the next. - - To remedy this we enforce bitwise equality with the - construction: - - if (std::abs(nextValue - TOPS[targetIndex]) < z_tolerance) - TOPS[targetIndex] = nextValue; - - [1]: This is of course assuming the intention is to construct a - fully connected space covering grid - if that is indeed - not the case the barriers must be thicker than 1e-6m to be - retained. - */ - - std::vector EclipseGrid::createTOPSVector(const std::array& dims, - const std::vector& DZ, const Deck& deck) - { - double z_tolerance = 1e-6; - size_t volume = dims[0] * dims[1] * dims[2]; - size_t area = dims[0] * dims[1]; - const auto& TOPSKeyWord = deck.getKeyword(); - std::vector TOPS = TOPSKeyWord.getSIDoubleData(); - - if (TOPS.size() >= area) { - size_t initialTOPSize = TOPS.size(); - TOPS.resize( volume ); - - for (size_t targetIndex = area; targetIndex < volume; targetIndex++) { - size_t sourceIndex = targetIndex - area; - double nextValue = TOPS[sourceIndex] + DZ[sourceIndex]; - - if (targetIndex >= initialTOPSize) - TOPS[targetIndex] = nextValue; - else { - if (std::abs(nextValue - TOPS[targetIndex]) < z_tolerance) - TOPS[targetIndex] = nextValue; - } - - } - } - - if (TOPS.size() != volume) - throw std::invalid_argument("TOPS size mismatch"); - - return TOPS; - } - - std::vector EclipseGrid::createDVector(const std::array& dims, size_t dim, const std::string& DKey, - const std::string& DVKey, const Deck& deck) - { - size_t volume = dims[0] * dims[1] * dims[2]; - size_t area = dims[0] * dims[1]; - std::vector D; - if (deck.hasKeyword(DKey)) { - D = deck.getKeyword( DKey ).getSIDoubleData(); - - - if (D.size() >= area && D.size() < volume) { - /* - Only the top layer is required; for layers below the - top layer the value from the layer above is used. - */ - size_t initialDSize = D.size(); - D.resize( volume ); - for (size_t targetIndex = initialDSize; targetIndex < volume; targetIndex++) { - size_t sourceIndex = targetIndex - area; - D[targetIndex] = D[sourceIndex]; - } - } - - if (D.size() != volume) - throw std::invalid_argument(DKey + " size mismatch"); - } else { - const auto& DVKeyWord = deck.getKeyword(DVKey); - const std::vector& DV = DVKeyWord.getSIDoubleData(); - if (DV.size() != (size_t) dims[dim]) - throw std::invalid_argument(DVKey + " size mismatch"); - D.resize( volume ); - scatterDim( dims , dim , DV , D ); - } - return D; - } - - - void EclipseGrid::scatterDim(const std::array& dims , size_t dim , const std::vector& DV , std::vector& D) { - int index[3]; - for (index[2] = 0; index[2] < dims[2]; index[2]++) { - for (index[1] = 0; index[1] < dims[1]; index[1]++) { - for (index[0] = 0; index[0] < dims[0]; index[0]++) { - size_t globalIndex = index[2] * dims[1] * dims[0] + index[1] * dims[0] + index[0]; - D[globalIndex] = DV[ index[dim] ]; - } - } - } - } - - const ecl_grid_type * EclipseGrid::c_ptr() const { - return m_grid.get(); - } - - - const MessageContainer& EclipseGrid::getMessageContainer() const { - return m_messages; - } - - - MessageContainer& EclipseGrid::getMessageContainer() { - return m_messages; - } - - - bool EclipseGrid::equal(const EclipseGrid& other) const { - bool status = (m_pinch.equal( other.m_pinch ) && (ecl_grid_compare( c_ptr() , other.c_ptr() , true , false , false )) && (m_minpvMode == other.getMinpvMode())); - if(m_minpvMode!=MinpvMode::ModeEnum::Inactive){ - status = status && (m_minpvValue == other.getMinpvValue()); - } - return status; - } - - - size_t EclipseGrid::getNumActive( ) const { - return static_cast(ecl_grid_get_nactive( c_ptr() )); - } - - bool EclipseGrid::allActive( ) const { - return (getNumActive() == getCartesianSize()); - } - - bool EclipseGrid::cellActive( size_t globalIndex ) const { - assertGlobalIndex( globalIndex ); - return ecl_grid_cell_active1( c_ptr() , static_cast(globalIndex)); - } - - bool EclipseGrid::cellActive( size_t i , size_t j , size_t k ) const { - assertIJK(i,j,k); - return ecl_grid_cell_active3( c_ptr() , static_cast(i),static_cast(j),static_cast(k)); - } - - - double EclipseGrid::getCellVolume(size_t globalIndex) const { - assertGlobalIndex( globalIndex ); - return ecl_grid_get_cell_volume1( c_ptr() , static_cast(globalIndex)); - } - - - double EclipseGrid::getCellVolume(size_t i , size_t j , size_t k) const { - assertIJK(i,j,k); - return ecl_grid_get_cell_volume3( c_ptr() , static_cast(i),static_cast(j),static_cast(k)); - } - - double EclipseGrid::getCellThicknes(size_t i , size_t j , size_t k) const { - assertIJK(i,j,k); - return ecl_grid_get_cell_thickness3( c_ptr() , static_cast(i),static_cast(j),static_cast(k)); - } - - double EclipseGrid::getCellThicknes(size_t globalIndex) const { - assertGlobalIndex( globalIndex ); - return ecl_grid_get_cell_thickness1( c_ptr() , static_cast(globalIndex)); - } - - - std::array EclipseGrid::getCellDims(size_t globalIndex) const { - assertGlobalIndex( globalIndex ); - { - double dx = ecl_grid_get_cell_dx1( c_ptr() , globalIndex); - double dy = ecl_grid_get_cell_dy1( c_ptr() , globalIndex); - double dz = ecl_grid_get_cell_thickness1( c_ptr() , globalIndex); - - return std::array{ {dx , dy , dz }}; - } - } - - std::array EclipseGrid::getCellDims(size_t i , size_t j , size_t k) const { - assertIJK(i,j,k); - { - size_t globalIndex = getGlobalIndex( i,j,k ); - double dx = ecl_grid_get_cell_dx1( c_ptr() , globalIndex); - double dy = ecl_grid_get_cell_dy1( c_ptr() , globalIndex); - double dz = ecl_grid_get_cell_thickness1( c_ptr() , globalIndex); - - return std::array{ {dx , dy , dz }}; - } - } - - std::array EclipseGrid::getCellCenter(size_t globalIndex) const { - assertGlobalIndex( globalIndex ); - { - double x,y,z; - ecl_grid_get_xyz1( c_ptr() , static_cast(globalIndex) , &x , &y , &z); - return std::array{{x,y,z}}; - } - } - - - std::array EclipseGrid::getCellCenter(size_t i,size_t j, size_t k) const { - assertIJK(i,j,k); - { - double x,y,z; - ecl_grid_get_xyz3( c_ptr() , static_cast(i),static_cast(j),static_cast(k), &x , &y , &z); - return std::array{{x,y,z}}; - } - } - - double EclipseGrid::getCellDepth(size_t globalIndex) const { - assertGlobalIndex( globalIndex ); - return ecl_grid_get_cdepth1( c_ptr() , static_cast(globalIndex)); - } - - - double EclipseGrid::getCellDepth(size_t i,size_t j, size_t k) const { - assertIJK(i,j,k); - return ecl_grid_get_cdepth3( c_ptr() , static_cast(i),static_cast(j),static_cast(k)); - } - - - - void EclipseGrid::exportACTNUM( std::vector& actnum) const { - size_t volume = getNX() * getNY() * getNZ(); - if (getNumActive() == volume) - actnum.resize(0); - else { - actnum.resize( volume ); - ecl_grid_init_actnum_data( c_ptr() , actnum.data() ); - } - } - - void EclipseGrid::exportMAPAXES( std::vector& mapaxes) const { - if (ecl_grid_use_mapaxes( c_ptr())) { - mapaxes.resize(6); - ecl_grid_init_mapaxes_data_double( c_ptr() , mapaxes.data() ); - } else { - mapaxes.resize(0); - } - } - - void EclipseGrid::exportCOORD( std::vector& coord) const { - coord.resize( ecl_grid_get_coord_size( c_ptr() )); - ecl_grid_init_coord_data_double( c_ptr() , coord.data() ); - } - - void EclipseGrid::exportZCORN( std::vector& zcorn) const { - zcorn.resize( ecl_grid_get_zcorn_size( c_ptr() )); - ecl_grid_init_zcorn_data_double( c_ptr() , zcorn.data() ); - } - - const std::vector& EclipseGrid::getActiveMap() const { - if( !this->activeMap.empty() ) return this->activeMap; - - this->activeMap.resize( this->getNumActive() ); - const auto size = int(this->getCartesianSize()); - - for( int global_index = 0; global_index < size; global_index++) { - // Using the low level C function to get the active index, because the C++ - // version will throw for inactive cells. - int active_index = ecl_grid_get_active_index1( m_grid.get() , global_index ); - if (active_index >= 0) - this->activeMap[ active_index ] = global_index; - } - - return this->activeMap; - } - - void EclipseGrid::resetACTNUM( const int * actnum) { - ecl_grid_reset_actnum( m_grid.get() , actnum ); - /* re-build the active map cache */ - this->activeMap.clear(); - this->getActiveMap(); - } - - ZcornMapper EclipseGrid::zcornMapper() const { - return ZcornMapper( getNX() , getNY(), getNZ() ); - } - - ZcornMapper::ZcornMapper(size_t nx , size_t ny, size_t nz) - : dims( {nx,ny,nz} ), - stride( {2 , 4*nx, 8*nx*ny} ), - cell_shift( {0 , 1 , 2*nx , 2*nx + 1 , 4*nx*ny , 4*nx*ny + 1, 4*nx*ny + 2*nx , 4*nx*ny + 2*nx + 1 }) - { - } - - - /* lower layer: upper layer (higher value of z - i.e. lower down in resrvoir). - - 2---3 6---7 - | | | | - 0---1 4---5 - */ - - size_t ZcornMapper::index(size_t i, size_t j, size_t k, int c) const { - if ((i >= dims[0]) || (j >= dims[1]) || (k >= dims[2]) || (c < 0) || (c >= 8)) - throw std::invalid_argument("Invalid cell argument"); - - return i*stride[0] + j*stride[1] + k*stride[2] + cell_shift[c]; - } - - - - size_t ZcornMapper::index(size_t g, int c) const { - int k = g / (dims[0] * dims[1]); - g -= k * dims[0] * dims[1]; - - int j = g / dims[0]; - g -= j * dims[0]; - - int i = g; - - return index(i,j,k,c); - } -} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp deleted file mode 100644 index 2b7540ab56..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp +++ /dev/null @@ -1,238 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - - -#ifndef OPM_PARSER_ECLIPSE_GRID_HPP -#define OPM_PARSER_ECLIPSE_GRID_HPP - - -#include -#include -#include -#include - -#include - -#include -#include - -#include -#include -#include - -namespace Opm { - - class Deck; - class ZcornMapper; - - /** - About cell information and dimension: The actual grid - information is held in a pointer to an ERT ecl_grid_type - instance. This pointer must be used for access to all cell - related properties, including: - - - Size of cells - - Real world position of cells - - Active/inactive status of cells - */ - - class EclipseGrid : public GridDims { - public: - explicit EclipseGrid(const std::string& filename); - - /* - These constructors will make a copy of the src grid, with - zcorn and or actnum have been adjustments. - */ - EclipseGrid(const EclipseGrid& src, const double* zcorn , const std::vector& actnum); - EclipseGrid(const EclipseGrid& src, const std::vector& zcorn , const std::vector& actnum); - EclipseGrid(const EclipseGrid& src, const std::vector& actnum); - - EclipseGrid(size_t nx, size_t ny, size_t nz, - double dx = 1.0, double dy = 1.0, double dz = 1.0); - - EclipseGrid(std::array& dims , - const std::vector& coord , - const std::vector& zcorn , - const int * actnum = nullptr, - const double * mapaxes = nullptr); - - - /// EclipseGrid ignores ACTNUM in Deck, and therefore needs ACTNUM - /// explicitly. If a null pointer is passed, every cell is active. - explicit EclipseGrid(const Deck& deck, const int * actnum = nullptr); - /// [deprecated] - explicit EclipseGrid(const std::shared_ptr& deck, const int * actnum = nullptr); - - static bool hasCornerPointKeywords(const Deck&); - static bool hasCartesianKeywords(const Deck&); - size_t getNumActive( ) const; - bool allActive() const; - - size_t activeIndex(size_t i, size_t j, size_t k) const; - size_t activeIndex(size_t globalIndex) const; - - /* - Observe that the there is a getGlobalIndex(i,j,k) - implementation in the base class. This method - translating - from an active index to a global index must be implemented - in the current class. - */ - size_t getGlobalIndex(size_t active_index) const; - size_t getGlobalIndex(size_t i, size_t j, size_t k) const; - - bool isPinchActive( ) const; - double getPinchThresholdThickness( ) const; - PinchMode::ModeEnum getPinchOption( ) const; - PinchMode::ModeEnum getMultzOption( ) const; - - MinpvMode::ModeEnum getMinpvMode() const; - double getMinpvValue( ) const; - - - /* - Will return a vector of nactive elements. The method will - behave differently depending on the lenght of the - input_vector: - - nx*ny*nz: only the values corresponding to active cells - are copied out. - - nactive: The input vector is copied straight out again. - - ??? : Exception. - */ - template - std::vector compressedVector(const std::vector& input_vector) const { - if( input_vector.size() == this->getNumActive() ) { - return input_vector; - } - - if (input_vector.size() != getCartesianSize()) - throw std::invalid_argument("Input vector must have full size"); - - { - std::vector compressed_vector( this->getNumActive() ); - const auto& active_map = this->getActiveMap( ); - - for (size_t i = 0; i < this->getNumActive(); ++i) - compressed_vector[i] = input_vector[ active_map[i] ]; - - return compressed_vector; - } - } - - - /// Will return a vector a length num_active; where the value - /// of each element is the corresponding global index. - const std::vector& getActiveMap() const; - std::array getCellCenter(size_t i,size_t j, size_t k) const; - std::array getCellCenter(size_t globalIndex) const; - double getCellVolume(size_t globalIndex) const; - double getCellVolume(size_t i , size_t j , size_t k) const; - double getCellThicknes(size_t globalIndex) const; - double getCellThicknes(size_t i , size_t j , size_t k) const; - std::array getCellDims(size_t i,size_t j, size_t k) const; - std::array getCellDims(size_t globalIndex) const; - bool cellActive( size_t globalIndex ) const; - bool cellActive( size_t i , size_t j, size_t k ) const; - double getCellDepth(size_t i,size_t j, size_t k) const; - double getCellDepth(size_t globalIndex) const; - ZcornMapper zcornMapper() const; - - - void exportMAPAXES( std::vector& mapaxes) const; - void exportCOORD( std::vector& coord) const; - void exportZCORN( std::vector& zcorn) const; - void exportACTNUM( std::vector& actnum) const; - void resetACTNUM( const int * actnum); - bool equal(const EclipseGrid& other) const; - const ecl_grid_type * c_ptr() const; - const MessageContainer& getMessageContainer() const; - MessageContainer& getMessageContainer(); - private: - MessageContainer m_messages; - - double m_minpvValue; - MinpvMode::ModeEnum m_minpvMode; - Value m_pinch; - PinchMode::ModeEnum m_pinchoutMode; - PinchMode::ModeEnum m_multzMode; - mutable std::vector< int > activeMap; - - /* - The internal class grid_ptr is a a std::unique_ptr with - special copy semantics. The purpose of implementing this is - that the EclipseGrid class can now use the default - implementation for the copy and move constructors. - */ - using ert_ptr = ERT::ert_unique_ptr; - class grid_ptr : public ert_ptr { - public: - using ert_ptr::unique_ptr; - grid_ptr() = default; - grid_ptr(grid_ptr&&) = default; - grid_ptr(const grid_ptr& src) : - ert_ptr( ecl_grid_alloc_copy( src.get() ) ) {} - }; - grid_ptr m_grid; - - void initCornerPointGrid(const std::array& dims , - const std::vector& coord , - const std::vector& zcorn , - const int * actnum, - const double * mapaxes); - - void initCartesianGrid( const std::array&, const Deck&); - void initCornerPointGrid( const std::array&, const Deck&); - void initDTOPSGrid( const std::array&, const Deck&); - void initDVDEPTHZGrid( const std::array&, const Deck&); - void initGrid( const std::array&, const Deck&); - void assertCornerPointKeywords( const std::array&, const Deck&); - - static bool hasDVDEPTHZKeywords(const Deck&); - static bool hasDTOPSKeywords( const Deck&); - static void assertVectorSize( const std::vector& vector, size_t expectedSize, const std::string& msg); - static std::vector createTOPSVector(const std::array& dims, const std::vector& DZ, - const Deck&); - static std::vector createDVector(const std::array& dims, size_t dim, const std::string& DKey, - const std::string& DVKey, const Deck&); - static void scatterDim(const std::array& dims , size_t dim , const std::vector& DV , std::vector& D); - }; - - typedef std::shared_ptr EclipseGridPtr; - typedef std::shared_ptr EclipseGridConstPtr; - - class ZcornMapper { - public: - ZcornMapper(size_t nx, size_t ny, size_t nz); - size_t index(size_t i, size_t j, size_t k, int c) const; - size_t index(size_t g, int c) const; - - private: - std::array dims; - std::array stride; - std::array cell_shift; - }; -} - - - - -#endif // OPM_PARSER_ECLIPSE_GRID_HPP diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/FaceDir.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/FaceDir.cpp deleted file mode 100644 index b8d8f8b01d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/FaceDir.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include - -#include - - - -namespace Opm { - - namespace FaceDir { - - DirEnum FromString(const std::string& stringValue) { - if ((stringValue == "X") || (stringValue == "I")) - return XPlus; - if ((stringValue == "X-") || (stringValue == "I-")) - return XMinus; - - if ((stringValue == "Y") || (stringValue == "J")) - return YPlus; - if ((stringValue == "Y-") || (stringValue == "J-")) - return YMinus; - - if ((stringValue == "Z") || (stringValue == "K")) - return ZPlus; - if ((stringValue == "Z-") || (stringValue == "K-")) - return ZMinus; - - throw std::invalid_argument("The string value " + stringValue + " could not be converted to a FaceDir enum value"); - } - - - int FromMULTREGTString(const std::string& stringValue) { - if (stringValue == "X") - return XPlus + XMinus; - - if (stringValue == "Y") - return YPlus + YMinus; - - if (stringValue == "Z") - return ZPlus + ZMinus; - - if (stringValue == "XY") - return XPlus + YPlus + XMinus + YMinus; - - if (stringValue == "XZ") - return XPlus + ZPlus + XMinus + ZMinus; - - if (stringValue == "YZ") - return YPlus + ZPlus + YMinus + ZMinus; - - if (stringValue == "XYZ") - return XPlus + YPlus + ZPlus + XMinus + YMinus + ZMinus; - - throw std::invalid_argument("The string " + stringValue + " is not a valid MULTREGT direction value"); - } - - - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/FaceDir.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/FaceDir.hpp deleted file mode 100644 index f49b71a094..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/FaceDir.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef OPM_FACEDIR_HPP -#define OPM_FACEDIR_HPP - -#include - -namespace Opm { - - - namespace FaceDir { - - enum DirEnum { - XPlus = 1, - XMinus = 2, - YPlus = 4, - YMinus = 8, - ZPlus = 16, - ZMinus = 32 - }; - /** - The MULTREGTScanner will use these values as bitmaps; - i.e. it is essential they form a 2^n sequence. - */ - - - DirEnum FromString(const std::string& stringValue); - int FromMULTREGTString(const std::string& stringValue); - } -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/Fault.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/Fault.cpp deleted file mode 100644 index fd2943a5ad..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/Fault.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include - -namespace Opm { - - Fault::Fault(const std::string& faultName) : - m_name( faultName ), - m_transMult( 1 ) - { - } - - - const std::string& Fault::getName() const { - return m_name; - } - - double Fault::getTransMult() const { - return m_transMult; - } - - void Fault::setTransMult(double transMult) { - m_transMult = transMult; - } - - - void Fault::addFace(std::shared_ptr face) { - m_faceList.push_back( face ); - } - - std::vector >::const_iterator Fault::begin() const { - return m_faceList.begin(); - } - - - std::vector >::const_iterator Fault::end() const { - return m_faceList.end(); - } - - - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/Fault.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/Fault.hpp deleted file mode 100644 index e457511d97..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/Fault.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ -#ifndef FAULT_HPP_ -#define FAULT_HPP_ - -#include -#include -#include - -namespace Opm { - - class FaultFace; - - -class Fault { -public: - Fault(const std::string& faultName); - - const std::string& getName() const; - void setTransMult(double transMult); - double getTransMult() const; - void addFace(std::shared_ptr face); - std::vector >::const_iterator begin() const; - std::vector >::const_iterator end() const; - -private: - std::string m_name; - double m_transMult; - std::vector > m_faceList; -}; -} - - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/FaultCollection.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/FaultCollection.cpp deleted file mode 100644 index 96c6c4d165..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/FaultCollection.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace Opm { - - - FaultCollection::FaultCollection() - {} - - FaultCollection::FaultCollection(const GRIDSection& gridSection, - const GridDims& grid) { - const auto& faultKeywords = gridSection.getKeywordList(); - - for (auto keyword_iter = faultKeywords.begin(); keyword_iter != faultKeywords.end(); ++keyword_iter) { - const auto& faultsKeyword = *keyword_iter; - for (auto iter = faultsKeyword->begin(); iter != faultsKeyword->end(); ++iter) { - const auto& faultRecord = *iter; - const std::string& faultName = faultRecord.getItem(0).get< std::string >(0); - - addFaultFaces(grid, faultRecord, faultName); - } - } - } - - - void FaultCollection::addFaultFaces(const GridDims& grid, - const DeckRecord& faultRecord, - const std::string& faultName) - { - int I1 = faultRecord.getItem(1).get(0) - 1; - int I2 = faultRecord.getItem(2).get(0) - 1; - int J1 = faultRecord.getItem(3).get(0) - 1; - int J2 = faultRecord.getItem(4).get(0) - 1; - int K1 = faultRecord.getItem(5).get(0) - 1; - int K2 = faultRecord.getItem(6).get(0) - 1; - FaceDir::DirEnum faceDir = FaceDir::FromString(faultRecord.getItem(7).get(0)); - std::shared_ptr face = std::make_shared( - grid.getNX(), grid.getNY(), grid.getNZ(), - static_cast(I1), static_cast(I2), - static_cast(J1), static_cast(J2), - static_cast(K1), static_cast(K2), - faceDir); - - if (!hasFault(faultName)) - addFault(faultName); - - Fault& fault = getFault(faultName); - fault.addFace(face); - } - - size_t FaultCollection::size() const { - return m_faults.size(); - } - - bool FaultCollection::hasFault(const std::string& faultName) const { - return m_faults.hasKey( faultName ); - } - - const Fault& FaultCollection::getFault(const std::string& faultName) const { - return m_faults.get( faultName ); - } - - Fault& FaultCollection::getFault(const std::string& faultName) { - return m_faults.get( faultName ); - } - - Fault& FaultCollection::getFault(size_t faultIndex) { - return m_faults.get( faultIndex ); - } - - const Fault& FaultCollection::getFault(size_t faultIndex) const { - return m_faults.get( faultIndex ); - } - - void FaultCollection::addFault(const std::string& faultName) { - Fault fault(faultName); - m_faults.insert(fault.getName() , fault); - } - - void FaultCollection::setTransMult(const std::string& faultName , double transMult) { - Fault& fault = getFault( faultName ); - fault.setTransMult( transMult ); - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/FaultCollection.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/FaultCollection.hpp deleted file mode 100644 index 527812af71..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/FaultCollection.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ -#ifndef OPM_PARSER_FAULT_COLLECTION_HPP -#define OPM_PARSER_FAULT_COLLECTION_HPP - -#include -#include - -#include -#include - -namespace Opm { - - class DeckRecord; - class GridDims; - class GRIDSection; - - -class FaultCollection { -public: - FaultCollection(); - FaultCollection(const GRIDSection& gridSection, const GridDims& grid); - - size_t size() const; - bool hasFault(const std::string& faultName) const; - Fault& getFault(const std::string& faultName); - const Fault& getFault(const std::string& faultName) const; - Fault& getFault(size_t faultIndex); - const Fault& getFault(size_t faultIndex) const; - - /// we construct the fault based on faultName. To get the fault: getFault - void addFault(const std::string& faultName); - void setTransMult(const std::string& faultName , double transMult); - -private: - void addFaultFaces(const GridDims& grid, - const DeckRecord& faultRecord, - const std::string& faultName); - OrderedMap m_faults; - -}; -} - -#endif // OPM_PARSER_FAULT_COLLECTION_HPP diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/FaultFace.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/FaultFace.cpp deleted file mode 100644 index 7445f20250..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/FaultFace.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ -#include - -#include - -namespace Opm { - - FaultFace::FaultFace(size_t nx , size_t ny , size_t nz, - size_t I1 , size_t I2, - size_t J1 , size_t J2, - size_t K1 , size_t K2, - FaceDir::DirEnum faceDir) - : m_faceDir( faceDir ) - { - checkCoord(nx , I1,I2); - checkCoord(ny , J1,J2); - checkCoord(nz , K1,K2); - - - if ((faceDir == FaceDir::XPlus) || (faceDir == FaceDir::XMinus)) - if (I1 != I2) - throw std::invalid_argument("When the face is in X direction we must have I1 == I2"); - - if ((faceDir == FaceDir::YPlus) || (faceDir == FaceDir::YMinus)) - if (J1 != J2) - throw std::invalid_argument("When the face is in Y direction we must have J1 == J2"); - - if ((faceDir == FaceDir::ZPlus) || (faceDir == FaceDir::ZMinus)) - if (K1 != K2) - throw std::invalid_argument("When the face is in Z direction we must have K1 == K2"); - - - for (size_t k=K1; k <= K2; k++) - for (size_t j=J1; j <= J2; j++) - for (size_t i=I1; i <= I2; i++) { - size_t globalIndex = i + j*nx + k*nx*ny; - m_indexList.push_back( globalIndex ); - } - } - - - void FaultFace::checkCoord(size_t dim , size_t l1 , size_t l2) { - if (l1 > l2) - throw std::invalid_argument("Invalid coordinates"); - - if (l2 >= dim) - throw std::invalid_argument("Invalid coordinates"); - } - - - std::vector::const_iterator FaultFace::begin() const { - return m_indexList.begin(); - } - - std::vector::const_iterator FaultFace::end() const { - return m_indexList.end(); - } - - - FaceDir::DirEnum FaultFace::getDir() const { - return m_faceDir; - } - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/FaultFace.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/FaultFace.hpp deleted file mode 100644 index e268e75b02..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/FaultFace.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ -#ifndef OPM_PARSER_FAULT_FACE_HPP -#define OPM_PARSER_FAULT_FACE_HPP - -#include -#include - -#include - -namespace Opm { - - -class FaultFace { -public: - FaultFace(size_t nx , size_t ny , size_t nz, - size_t I1 , size_t I2, - size_t J1 , size_t J2, - size_t K1 , size_t K2, - FaceDir::DirEnum faceDir); - - std::vector::const_iterator begin() const; - std::vector::const_iterator end() const; - FaceDir::DirEnum getDir() const; - -private: - static void checkCoord(size_t dim , size_t l1 , size_t l2); - FaceDir::DirEnum m_faceDir; - std::vector m_indexList; -}; - - -} - -#endif // OPM_PARSER_FAULT_FACE_HPP diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/GridDims.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/GridDims.cpp deleted file mode 100644 index 5a65c47b39..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/GridDims.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include -#include -#include - -#include -#include -#include - -#include - -#include // DIMENS -#include // SPECGRID - -namespace Opm { - GridDims::GridDims(std::array xyz) : - GridDims(xyz[0], xyz[1], xyz[2]) - { - } - - GridDims::GridDims(size_t nx, size_t ny, size_t nz) : - m_nx(nx), m_ny(ny), m_nz(nz) - { - } - - GridDims::GridDims(const Deck& deck) { - if (deck.hasKeyword("SPECGRID")) - init(deck.getKeyword("SPECGRID")); - else if (deck.hasKeyword("DIMENS")) - init(deck.getKeyword("DIMENS")); - else - throw std::invalid_argument("Must have either SPECGRID or DIMENS to indicate grid dimensions"); - } - - size_t GridDims::getNX() const { - return m_nx; - } - - size_t GridDims::getNY() const { - return m_ny; - } - - size_t GridDims::getNZ() const { - return m_nz; - } - - const std::array GridDims::getNXYZ() const { - return std::array {int( m_nx ), int( m_ny ), int( m_nz )}; - } - - size_t GridDims::getGlobalIndex(size_t i, size_t j, size_t k) const { - return (i + j * getNX() + k * getNX() * getNY()); - } - - const std::array GridDims::getIJK(size_t globalIndex) const { - std::array r = { { 0, 0, 0 } }; - int k = globalIndex / (getNX() * getNY()); - globalIndex -= k * (getNX() * getNY()); - int j = globalIndex / getNX(); - globalIndex -= j * getNX(); - int i = globalIndex; - r[0] = i; - r[1] = j; - r[2] = k; - return r; - } - - size_t GridDims::getCartesianSize() const { - return m_nx * m_ny * m_nz; - } - - void GridDims::assertGlobalIndex(size_t globalIndex) const { - if (globalIndex >= getCartesianSize()) - throw std::invalid_argument("input index above valid range"); - } - - void GridDims::assertIJK(size_t i, size_t j, size_t k) const { - if (i >= getNX() || j >= getNY() || k >= getNZ()) - throw std::invalid_argument("input index above valid range"); - } - - GridDims::GridDims() : - m_nx(0), m_ny(0), m_nz(0) - { - } - - // keyword must be DIMENS or SPECGRID - inline std::array< int, 3 > readDims(const DeckKeyword& keyword) { - const auto& record = keyword.getRecord(0); - return { { record.getItem("NX").get(0), - record.getItem("NY").get(0), - record.getItem("NZ").get(0) } }; - } - - void GridDims::init(const DeckKeyword& keyword) { - auto dims = readDims(keyword); - m_nx = dims[0]; - m_ny = dims[1]; - m_nz = dims[2]; - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/GridDims.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/GridDims.hpp deleted file mode 100644 index 9815ccf8b6..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/GridDims.hpp +++ /dev/null @@ -1,70 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef OPM_PARSER_GRIDDIMS_HPP -#define OPM_PARSER_GRIDDIMS_HPP - -#include -#include -#include - -#include -#include - -namespace Opm { - class GridDims - { - public: - - GridDims(std::array xyz); - - GridDims(size_t nx, size_t ny, size_t nz); - - GridDims(const Deck& deck); - - size_t getNX() const; - - size_t getNY() const; - size_t getNZ() const; - - const std::array getNXYZ() const; - - size_t getGlobalIndex(size_t i, size_t j, size_t k) const; - - const std::array getIJK(size_t globalIndex) const; - - size_t getCartesianSize() const; - - void assertGlobalIndex(size_t globalIndex) const; - - void assertIJK(size_t i, size_t j, size_t k) const; - - protected: - GridDims(); - - size_t m_nx; - size_t m_ny; - size_t m_nz; - - private: - void init(const DeckKeyword& keyword); - }; -} - -#endif /* OPM_PARSER_GRIDDIMS_HPP */ diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/GridProperties.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/GridProperties.cpp deleted file mode 100644 index 9301ab5f29..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/GridProperties.cpp +++ /dev/null @@ -1,449 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include - -#include -#include -#include - -namespace Opm { - - /* - Before lookup the keyword strings are uppercased and trailing - space is trimmed. - */ - - static std::string normalize(const std::string& keyword) { - std::string kw(keyword.begin() , std::find( keyword.begin() , keyword.end() , ' ')); - uppercase( kw , kw ); - return kw; - } - - - template <> - GridProperties::GridProperties(const EclipseGrid& eclipseGrid, - const UnitSystem* deckUnitSystem, - std::vector< GridProperty::SupportedKeywordInfo >&& supportedKeywords) : - m_eclipseGrid( eclipseGrid ), - m_deckUnitSystem( deckUnitSystem ) - { - for (auto iter = supportedKeywords.begin(); iter != supportedKeywords.end(); ++iter) - m_supportedKeywords.emplace( iter->getKeywordName(), std::move( *iter ) ); - } - - - template <> - GridProperties::GridProperties(const EclipseGrid& eclipseGrid, - std::vector< GridProperty::SupportedKeywordInfo >&& supportedKeywords) : - m_eclipseGrid( eclipseGrid ) - { - for (auto iter = supportedKeywords.begin(); iter != supportedKeywords.end(); ++iter) - m_supportedKeywords.emplace( iter->getKeywordName(), std::move( *iter ) ); - } - - - - - /* - In the case of integer properties we never really do any - transformation, but we have implemented this dummy int - specializations to enable a uniform implementation. - */ - - - template<> - double GridProperties::convertInputValue(const GridProperty& property, double doubleValue) const { - const std::string& dimensionString = property.getDimensionString( ); - return m_deckUnitSystem->getDimension(dimensionString)->getSIScaling() * doubleValue; - } - - - - template<> - double GridProperties::convertInputValue( double doubleValue) const { - return doubleValue; - } - - - template<> - int GridProperties::convertInputValue(double doubleValue) const { - if (std::fabs( std::nearbyint( doubleValue ) - doubleValue ) < 1e-6) - return static_cast( doubleValue ); - else - throw std::invalid_argument("Expected integer argument - got: " + std::to_string( doubleValue )); - } - - template<> - int GridProperties::convertInputValue(const GridProperty& /* property */, double doubleValue) const { - return convertInputValue(doubleValue); - } - - - - void setKeywordBox( const DeckRecord& deckRecord, - BoxManager& boxManager) { - const auto& I1Item = deckRecord.getItem("I1"); - const auto& I2Item = deckRecord.getItem("I2"); - const auto& J1Item = deckRecord.getItem("J1"); - const auto& J2Item = deckRecord.getItem("J2"); - const auto& K1Item = deckRecord.getItem("K1"); - const auto& K2Item = deckRecord.getItem("K2"); - - size_t setCount = 0; - - if (!I1Item.defaultApplied(0)) - setCount++; - - if (!I2Item.defaultApplied(0)) - setCount++; - - if (!J1Item.defaultApplied(0)) - setCount++; - - if (!J2Item.defaultApplied(0)) - setCount++; - - if (!K1Item.defaultApplied(0)) - setCount++; - - if (!K2Item.defaultApplied(0)) - setCount++; - - if (setCount == 6) { - boxManager.setKeywordBox( I1Item.get< int >(0) - 1, - I2Item.get< int >(0) - 1, - J1Item.get< int >(0) - 1, - J2Item.get< int >(0) - 1, - K1Item.get< int >(0) - 1, - K2Item.get< int >(0) - 1); - } else if (setCount != 0) { - std::string msg = "BOX modifiers on keywords must be either " - "specified completely or not at all. Ignoring."; - throw std::invalid_argument( msg ); - } - } - - template< typename T > - const MessageContainer& GridProperties::getMessageContainer() const { - return m_messages; - } - - template< typename T > - MessageContainer& GridProperties::getMessageContainer() { - return m_messages; - } - - - template< typename T > - bool GridProperties::supportsKeyword(const std::string& keyword) const { - return m_supportedKeywords.count( normalize( keyword ) ) > 0; - } - - template< typename T > - bool GridProperties::hasKeyword(const std::string& keyword) const { - const std::string kw = normalize( keyword ); - - const auto cnt = m_properties.count( kw ); - const bool positive = cnt > 0; - - return positive && !isAutoGenerated_(kw); - } - - - - template< typename T > - size_t GridProperties::size() const { - return m_properties.size(); - } - - - template< typename T > - const GridProperty& GridProperties::getKeyword(const std::string& keyword) const { - const std::string kw = normalize(keyword); - - if (!hasKeyword(kw)) - addAutoGeneratedKeyword_(kw); - - GridProperty& property = m_properties.at( kw ); - property.runPostProcessor( ); - return property; - } - - - - template< typename T > - const GridProperty& GridProperties::getInitializedKeyword(const std::string& keyword) const { - const std::string kw = normalize(keyword); - - if (hasKeyword(kw)) - return m_properties.at( kw ); - else { - if (supportsKeyword(kw)) - throw std::invalid_argument("Keyword: " + kw + " is supported - but not initialized."); - else - throw std::invalid_argument("Keyword: " + kw + " is not supported."); - } - } - - - template< typename T > - void GridProperties::insertKeyword(const SupportedKeywordInfo& supportedKeyword) const { - int nx = m_eclipseGrid.getNX(); - int ny = m_eclipseGrid.getNY(); - int nz = m_eclipseGrid.getNZ(); - - m_properties.emplace( supportedKeyword.getKeywordName() , GridProperty( nx, ny , nz , supportedKeyword )); - } - - - template< typename T > - bool GridProperties::addKeyword(const std::string& keywordName) { - - if (!supportsKeyword( keywordName )) - throw std::invalid_argument("The keyword: " + keywordName + " is not supported in this container"); - - if (hasKeyword(keywordName)) - return false; - else { - const std::string kw = normalize(keywordName); - - // if the property was already added auto generated, we just need to make it - // non-auto generated - if (m_autoGeneratedProperties.count(kw)) { - m_messages.warning("The keyword "+kw+" has been used to calculate the " - "defaults of another keyword before the first time it was " - "explicitly mentioned in the deck. Maybe you need to change " - "the ordering of your keywords (move "+kw+" to the front?)."); - m_autoGeneratedProperties.erase(m_autoGeneratedProperties.find(kw)); - return true; - } - - insertKeyword( m_supportedKeywords.at( kw ) ); - return true; - } - } - - - template< typename T > - void GridProperties::copyKeyword(const std::string& srcField , - const std::string& targetField , - const Box& inputBox) { - const auto& src = this->getKeyword( srcField ); - auto& target = this->getOrCreateProperty( targetField ); - - target.copyFrom( src , inputBox ); - } - - - - - template< typename T > - GridProperty& GridProperties::getOrCreateProperty(const std::string& name) { - if (!hasKeyword(name)) - addKeyword(name); - - return getKeyword(name); - } - - /** - The fine print of the manual says the ADD keyword should support - some state dependent semantics regarding endpoint scaling arrays - in the PROPS section. That is not supported. - */ - - template< typename T > - void GridProperties::handleADDRecord( const DeckRecord& record, BoxManager& boxManager) { - const std::string& field = record.getItem("field").get< std::string >(0); - - if (hasKeyword( field )) { - GridProperty& property = getKeyword( field ); - T shiftValue = convertInputValue( property , record.getItem("shift").get< double >(0) ); - setKeywordBox(record, boxManager); - property.add( shiftValue , *boxManager.getActiveBox() ); - } else - throw std::invalid_argument("Fatal error processing ADD keyword. Tried to shift not defined keyword " + field); - } - - template< typename T > - void GridProperties::handleMULTIPLYRecord( const DeckRecord& record, BoxManager& boxManager) { - const std::string& field = record.getItem("field").get< std::string >(0); - - if (hasKeyword( field )) { - GridProperty& property = getKeyword( field ); - T factor = convertInputValue( record.getItem("factor").get< double >(0) ); - setKeywordBox(record, boxManager); - property.scale( factor , *boxManager.getActiveBox() ); - } else - throw std::invalid_argument("Fatal error processing ADD keyword. Tried to shift not defined keyword " + field); - } - - - template< typename T > - void GridProperties::handleCOPYRecord( const DeckRecord& record, BoxManager& boxManager) { - const std::string& srcField = record.getItem("src").get< std::string >(0); - const std::string& targetField = record.getItem("target").get< std::string >(0); - - if (hasKeyword( srcField )) { - setKeywordBox(record, boxManager); - copyKeyword( srcField , targetField , *boxManager.getActiveBox() ); - } else { - if (!supportsKeyword( srcField)) - throw std::invalid_argument("Fatal error processing COPY keyword." - " Tried to copy from not defined keyword " + srcField); - } - } - - template< typename T > - void GridProperties::handleEQUALSRecord( const DeckRecord& record, BoxManager& boxManager) { - const std::string& field = record.getItem("field").get< std::string >(0); - double value = record.getItem("value").get< double >(0); - - if (supportsKeyword( field )) { - GridProperty& property = getOrCreateProperty( field ); - T targetValue = convertInputValue( property , value ); - - setKeywordBox(record, boxManager); - property.setScalar( targetValue , *boxManager.getActiveBox() ); - } else - throw std::invalid_argument("Fatal error processing EQUALS keyword. Tried to set not defined keyword " + field); - } - - - template< typename T > - void GridProperties::handleEQUALREGRecord( const DeckRecord& record, const GridProperty& regionProperty ) { - const std::string& targetArray = record.getItem("ARRAY").get< std::string >(0); - if (supportsKeyword( targetArray )) { - GridProperty& targetProperty = getOrCreateProperty( targetArray ); - double inputValue = record.getItem("VALUE").get(0); - int regionValue = record.getItem("REGION_NUMBER").get(0); - T targetValue = convertInputValue( targetProperty , inputValue ); - std::vector mask; - - regionProperty.initMask( regionValue , mask); - targetProperty.maskedSet( targetValue , mask); - } else - throw std::invalid_argument("Fatal error processing EQUALREG record - invalid/undefined keyword: " + targetArray); - } - - template< typename T > - void GridProperties::handleADDREGRecord( const DeckRecord& record, const GridProperty& regionProperty ) { - const std::string& targetArray = record.getItem("ARRAY").get< std::string >(0); - if (hasKeyword( targetArray )) { - GridProperty& targetProperty = getKeyword( targetArray ); - double inputValue = record.getItem("SHIFT").get(0); - int regionValue = record.getItem("REGION_NUMBER").get(0); - T shiftValue = convertInputValue( targetProperty , inputValue ); - std::vector mask; - - regionProperty.initMask( regionValue , mask); - targetProperty.maskedAdd( shiftValue , mask); - } else - throw std::invalid_argument("Fatal error processing ADDREG record - invalid/undefined keyword: " + targetArray); - } - - template< typename T > - void GridProperties::handleMULTIREGRecord( const DeckRecord& record, const GridProperty& regionProperty ) { - const std::string& targetArray = record.getItem("ARRAY").get< std::string >(0); - if (supportsKeyword( targetArray )) { - GridProperty& targetProperty = getOrCreateProperty( targetArray ); - double inputValue = record.getItem("FACTOR").get(0); - int regionValue = record.getItem("REGION_NUMBER").get(0); - T factor = convertInputValue( inputValue ); - std::vector mask; - - regionProperty.initMask( regionValue , mask); - targetProperty.maskedMultiply( factor , mask); - } else - throw std::invalid_argument("Fatal error processing MULTIREG record - invalid/undefined keyword: " + targetArray); - } - - template< typename T > - void GridProperties::handleCOPYREGRecord( const DeckRecord& record, const GridProperty& regionProperty ) { - const std::string& srcArray = record.getItem("ARRAY").get< std::string >(0); - const std::string& targetArray = record.getItem("TARGET_ARRAY").get< std::string >(0); - - if (!supportsKeyword( targetArray)) - throw std::invalid_argument("Fatal error processing COPYREG record - invalid/undefined keyword: " + targetArray); - - if (!hasKeyword( srcArray )) - throw std::invalid_argument("Fatal error processing COPYREG record - invalid/undefined keyword: " + srcArray); - - { - int regionValue = record.getItem("REGION_NUMBER").get< int >(0); - std::vector mask; - GridProperty& targetProperty = getOrCreateProperty( targetArray ); - GridProperty& srcProperty = getKeyword( srcArray ); - - regionProperty.initMask( regionValue , mask); - targetProperty.maskedCopy( srcProperty , mask ); - } - } - - template< typename T > - void GridProperties::postAddKeyword(const std::string& name, - const T defaultValue, - std::function< void( std::vector< T >& ) > postProcessor, - const std::string& dimString ) - { - m_supportedKeywords.emplace(name, - SupportedKeywordInfo( name, - defaultValue, - postProcessor, - dimString )); - } - - template< typename T > - GridProperty& GridProperties::getKeyword(const std::string& keyword) { - const std::string kw = normalize(keyword); - - if (!hasKeyword(kw)) - addAutoGeneratedKeyword_(kw); - - return m_properties.at( kw ); - } - - - /* - This is const because of the auto-generation of keywords on get(). - */ - template< typename T > - bool GridProperties::addAutoGeneratedKeyword_(const std::string& keywordName) const { - if (!supportsKeyword( keywordName )) - throw std::invalid_argument("The keyword: " + keywordName + " is not supported in this container"); - - if (m_properties.count( keywordName ) > 0) - return false; // property already exists (if it is auto generated or not doesn't matter) - else { - m_autoGeneratedProperties.insert(keywordName); - insertKeyword( m_supportedKeywords.at( keywordName ) ); - return true; - } - } - - template< typename T > - bool GridProperties::isAutoGenerated_(const std::string& keyword) const { - return m_autoGeneratedProperties.count(keyword) > 0; - } - -} - - -template class Opm::GridProperties< int >; -template class Opm::GridProperties< double >; diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/GridProperties.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/GridProperties.hpp deleted file mode 100644 index bc1e18d271..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/GridProperties.hpp +++ /dev/null @@ -1,179 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ -#ifndef ECLIPSE_GRIDPROPERTIES_HPP_ -#define ECLIPSE_GRIDPROPERTIES_HPP_ - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - - -/* - This class implements a container (std::unordered_map>) of Gridproperties. Usage is as follows: - - 1. Instantiate the class; passing the number of grid cells and the - supported keywords as a list of strings to the constructor. - - 2. Query the container with the supportsKeyword() and hasKeyword() - methods. - - 3. When you ask the container to get a keyword with the - getKeyword() method it will automatically create a new - GridProperty object if the container does not have this - property. -*/ - - -namespace Opm { - - void setKeywordBox( const DeckRecord& deckRecord, - BoxManager& boxManager); - - class Eclipse3DProperties; - - template - class GridProperties { - public: - typedef typename GridProperty::SupportedKeywordInfo SupportedKeywordInfo; - - struct const_iterator; - - GridProperties(const EclipseGrid& eclipseGrid, - const UnitSystem* deckUnitSystem, - std::vector< SupportedKeywordInfo >&& supportedKeywords); - - GridProperties(const EclipseGrid& eclipseGrid, - std::vector< SupportedKeywordInfo >&& supportedKeywords); - - T convertInputValue( const GridProperty& property , double doubleValue) const; - T convertInputValue( double doubleValue ) const; - - bool supportsKeyword(const std::string& keyword) const; - bool hasKeyword(const std::string& keyword) const; - size_t size() const; - const GridProperty& getKeyword(const std::string& keyword) const; - const GridProperty& getInitializedKeyword(const std::string& keyword) const; - - - bool addKeyword(const std::string& keywordName); - void copyKeyword(const std::string& srcField , - const std::string& targetField , - const Box& inputBox); - - - const MessageContainer& getMessageContainer() const; - MessageContainer& getMessageContainer(); - - - template - bool hasKeyword() const { - return hasKeyword( Keyword::keywordName ); - } - - template - const GridProperty& getKeyword() const { - return getKeyword( Keyword::keywordName ); - } - - template - const GridProperty& getInitializedKeyword() const { - return getInitializedKeyword( Keyword::keywordName ); - } - - GridProperty& getOrCreateProperty(const std::string& name); - - /** - The fine print of the manual says the ADD keyword should support - some state dependent semantics regarding endpoint scaling arrays - in the PROPS section. That is not supported. - */ - - void handleADDRecord( const DeckRecord& record, BoxManager& boxManager); - void handleMULTIPLYRecord( const DeckRecord& record, BoxManager& boxManager); - void handleCOPYRecord( const DeckRecord& record, BoxManager& boxManager); - void handleEQUALSRecord( const DeckRecord& record, BoxManager& boxManager); - - void handleEQUALREGRecord( const DeckRecord& record, const GridProperty& regionProperty ); - void handleADDREGRecord( const DeckRecord& record, const GridProperty& regionProperty ); - void handleMULTIREGRecord( const DeckRecord& record, const GridProperty& regionProperty ); - void handleCOPYREGRecord( const DeckRecord& record, const GridProperty& regionProperty ); - - /* - Iterators over initialized properties. The overloaded - operator*() opens the pair which comes natively from the - std::map iterator. - */ - const_iterator begin() const { - return const_iterator( m_properties.begin() ); - } - - const_iterator end() const { - return const_iterator( m_properties.end() ); - } - - typedef typename std::map > storage; - typedef typename storage::const_iterator storage_iterator; - - struct const_iterator : public storage_iterator { - const_iterator( storage_iterator iter ) : storage_iterator( iter ) { } - - const GridProperty& operator*( ) { - const auto& pair = storage_iterator::operator*( ); - return pair.second; - } - }; - - - private: - /// this method exists for (friend) Eclipse3DProperties to be allowed initializing PORV and ACTNUM keyword - void postAddKeyword(const std::string& name, - const T defaultValue, - std::function< void( std::vector< T >& ) > postProcessor, - const std::string& dimString ); - GridProperty& getKeyword(const std::string& keyword); - bool addAutoGeneratedKeyword_(const std::string& keywordName) const; - void insertKeyword(const SupportedKeywordInfo& supportedKeyword) const; - bool isAutoGenerated_(const std::string& keyword) const; - - friend class Eclipse3DProperties; // needed for PORV keyword entanglement - const EclipseGrid& m_eclipseGrid; - const UnitSystem * m_deckUnitSystem = nullptr; - MessageContainer m_messages; - std::unordered_map m_supportedKeywords; - - mutable storage m_properties; - mutable std::set m_autoGeneratedProperties; - }; - -} - -#endif // ECLIPSE_GRIDPROPERTIES_HPP_ diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/GridProperty.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/GridProperty.cpp deleted file mode 100644 index 06203d93e3..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/GridProperty.cpp +++ /dev/null @@ -1,484 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -namespace Opm { - - template< typename T > - static std::function< std::vector< T >( size_t ) > constant( T val ) { - return [=]( size_t size ) { return std::vector< T >( size, val ); }; - } - - template< typename T > - static std::function< void( std::vector< T >& ) > noop() { - return []( std::vector< T >& ) { return; }; - } - - template< typename T > - GridPropertySupportedKeywordInfo< T >::GridPropertySupportedKeywordInfo( - const std::string& name, - std::function< std::vector< T >( size_t ) > init, - std::function< void( std::vector< T >& ) > post, - const std::string& dimString ) : - m_keywordName( name ), - m_initializer( init ), - m_postProcessor( post ), - m_dimensionString( dimString ) - {} - - template< typename T > - GridPropertySupportedKeywordInfo< T >::GridPropertySupportedKeywordInfo( - const std::string& name, - std::function< std::vector< T >( size_t ) > init, - const std::string& dimString ) : - m_keywordName( name ), - m_initializer( init ), - m_postProcessor( noop< T >() ), - m_dimensionString( dimString ) - {} - - template< typename T > - GridPropertySupportedKeywordInfo< T >::GridPropertySupportedKeywordInfo( - const std::string& name, - const T defaultValue, - const std::string& dimString ) : - m_keywordName( name ), - m_initializer( constant( defaultValue ) ), - m_postProcessor( noop< T >() ), - m_dimensionString( dimString ) - {} - - template< typename T > - GridPropertySupportedKeywordInfo< T >::GridPropertySupportedKeywordInfo( - const std::string& name, - const T defaultValue, - std::function< void( std::vector< T >& ) > post, - const std::string& dimString ) : - m_keywordName( name ), - m_initializer( constant( defaultValue ) ), - m_postProcessor( post ), - m_dimensionString( dimString ) - {} - - template< typename T > - const std::string& GridPropertySupportedKeywordInfo< T >::getKeywordName() const { - return this->m_keywordName; - } - - template< typename T > - const std::string& GridPropertySupportedKeywordInfo< T >::getDimensionString() const { - return this->m_dimensionString; - } - - template< typename T > - const std::function< std::vector< T >( size_t ) >& GridPropertySupportedKeywordInfo< T >::initializer() const { - return this->m_initializer; - } - - template< typename T > - const std::function< void( std::vector< T >& ) >& GridPropertySupportedKeywordInfo< T >::postProcessor() const { - return this->m_postProcessor; - } - - template< typename T > - GridProperty< T >::GridProperty( size_t nx, size_t ny, size_t nz, const SupportedKeywordInfo& kwInfo ) : - m_nx( nx ), - m_ny( ny ), - m_nz( nz ), - m_kwInfo( kwInfo ), - m_data( kwInfo.initializer()( nx * ny * nz ) ), - m_hasRunPostProcessor( false ) - {} - - template< typename T > - size_t GridProperty< T >::getCartesianSize() const { - return m_data.size(); - } - - template< typename T > - size_t GridProperty< T >::getNX() const { - return m_nx; - } - - template< typename T > - size_t GridProperty< T >::getNY() const { - return m_ny; - } - - template< typename T > - size_t GridProperty< T >::getNZ() const { - return m_nz; - } - - template< typename T > - T GridProperty< T >::iget( size_t index ) const { - return this->m_data.at( index ); - } - - template< typename T > - T GridProperty< T >::iget(size_t i , size_t j , size_t k) const { - size_t g = i + j*m_nx + k*m_nx*m_ny; - return iget(g); - } - - template< typename T > - void GridProperty< T >::iset(size_t index, T value) { - this->m_data.at( index ) = value; - } - - template< typename T > - void GridProperty< T >::iset(size_t i , size_t j , size_t k , T value) { - size_t g = i + j*m_nx + k*m_nx*m_ny; - iset(g,value); - } - - template< typename T > - const std::vector< T >& GridProperty< T >::getData() const { - return m_data; - } - - template< typename T > - void GridProperty< T >::multiplyWith( const GridProperty< T >& other ) { - if ((m_nx == other.m_nx) && (m_ny == other.m_ny) && (m_nz == other.m_nz)) { - for (size_t g=0; g < m_data.size(); g++) - m_data[g] *= other.m_data[g]; - } else - throw std::invalid_argument("Size mismatch between properties in mulitplyWith."); - } - - template< typename T > - void GridProperty< T >::multiplyValueAtIndex(size_t index, T factor) { - m_data[index] *= factor; - } - - template< typename T > - void GridProperty< T >::maskedSet( T value, const std::vector< bool >& mask ) { - for (size_t g = 0; g < getCartesianSize(); g++) { - if (mask[g]) - m_data[g] = value; - } - } - - template< typename T > - void GridProperty< T >::maskedMultiply( T value, const std::vector& mask ) { - for (size_t g = 0; g < getCartesianSize(); g++) { - if (mask[g]) - m_data[g] *= value; - } - } - - - template< typename T > - void GridProperty< T >::maskedAdd( T value, const std::vector& mask ) { - for (size_t g = 0; g < getCartesianSize(); g++) { - if (mask[g]) - m_data[g] += value; - } - } - - template< typename T > - void GridProperty< T >::maskedCopy( const GridProperty< T >& other, const std::vector< bool >& mask) { - for (size_t g = 0; g < getCartesianSize(); g++) { - if (mask[g]) - m_data[g] = other.m_data[g]; - } - } - - template< typename T > - void GridProperty< T >::initMask( T value, std::vector< bool >& mask ) const { - mask.resize(getCartesianSize()); - for (size_t g = 0; g < getCartesianSize(); g++) { - if (m_data[g] == value) - mask[g] = true; - else - mask[g] = false; - } - } - - template< typename T > - void GridProperty< T >::loadFromDeckKeyword( const DeckKeyword& deckKeyword ) { - const auto& deckItem = getDeckItem(deckKeyword); - const auto size = deckItem.size(); - for (size_t dataPointIdx = 0; dataPointIdx < size; ++dataPointIdx) { - if (!deckItem.defaultApplied(dataPointIdx)) - setDataPoint(dataPointIdx, dataPointIdx, deckItem); - } - } - - template< typename T > - void GridProperty< T >::loadFromDeckKeyword( const Box& inputBox, const DeckKeyword& deckKeyword) { - if (inputBox.isGlobal()) - loadFromDeckKeyword( deckKeyword ); - else { - const auto& deckItem = getDeckItem(deckKeyword); - const std::vector& indexList = inputBox.getIndexList(); - if (indexList.size() == deckItem.size()) { - for (size_t sourceIdx = 0; sourceIdx < indexList.size(); sourceIdx++) { - size_t targetIdx = indexList[sourceIdx]; - if (sourceIdx < deckItem.size() - && !deckItem.defaultApplied(sourceIdx)) - { - setDataPoint(sourceIdx, targetIdx, deckItem); - } - } - } else { - std::string boxSize = std::to_string(static_cast(indexList.size())); - std::string keywordSize = std::to_string(static_cast(deckItem.size())); - - throw std::invalid_argument("Size mismatch: Box:" + boxSize + " DeckKeyword:" + keywordSize); - } - } - } - - template< typename T > - void GridProperty< T >::copyFrom( const GridProperty< T >& src, const Box& inputBox ) { - if (inputBox.isGlobal()) { - for (size_t i = 0; i < src.getCartesianSize(); ++i) - m_data[i] = src.m_data[i]; - } else { - const std::vector& indexList = inputBox.getIndexList(); - for (size_t i = 0; i < indexList.size(); i++) { - size_t targetIndex = indexList[i]; - m_data[targetIndex] = src.m_data[targetIndex]; - } - } - } - - template< typename T > - void GridProperty< T >::scale( T scaleFactor, const Box& inputBox ) { - if (inputBox.isGlobal()) { - for (size_t i = 0; i < m_data.size(); ++i) - m_data[i] *= scaleFactor; - } else { - const std::vector& indexList = inputBox.getIndexList(); - for (size_t i = 0; i < indexList.size(); i++) { - size_t targetIndex = indexList[i]; - m_data[targetIndex] *= scaleFactor; - } - } - } - - template< typename T > - void GridProperty< T >::add( T shiftValue, const Box& inputBox ) { - if (inputBox.isGlobal()) { - for (size_t i = 0; i < m_data.size(); ++i) - m_data[i] += shiftValue; - } else { - const std::vector& indexList = inputBox.getIndexList(); - for (size_t i = 0; i < indexList.size(); i++) { - size_t targetIndex = indexList[i]; - m_data[targetIndex] += shiftValue; - } - } - } - - template< typename T > - void GridProperty< T >::setScalar( T value, const Box& inputBox ) { - if (inputBox.isGlobal()) { - std::fill(m_data.begin(), m_data.end(), value); - } else { - const std::vector& indexList = inputBox.getIndexList(); - for (size_t i = 0; i < indexList.size(); i++) { - size_t targetIndex = indexList[i]; - m_data[targetIndex] = value; - } - } - } - - template< typename T > - const std::string& GridProperty< T >::getKeywordName() const { - return m_kwInfo.getKeywordName(); - } - - template< typename T > - const typename GridProperty< T >::SupportedKeywordInfo& - GridProperty< T >::getKeywordInfo() const { - return m_kwInfo; - } - - template< typename T > - void GridProperty< T >::runPostProcessor() { - if( this->m_hasRunPostProcessor ) return; - this->m_hasRunPostProcessor = true; - this->m_kwInfo.postProcessor()( m_data ); - } - - template< typename T > - void GridProperty< T >::checkLimits( T min, T max ) const { - for (size_t g=0; g < m_data.size(); g++) { - T value = m_data[g]; - if ((value < min) || (value > max)) - throw std::invalid_argument("Property element " + std::to_string( value) + " in " + getKeywordName() + " outside valid limits: [" + std::to_string(min) + ", " + std::to_string(max) + "]"); - } - } - - template< typename T > - const DeckItem& GridProperty< T >::getDeckItem( const DeckKeyword& deckKeyword ) { - if (deckKeyword.size() != 1) - throw std::invalid_argument("Grid properties can only have a single record (keyword " - + deckKeyword.name() + ")"); - if (deckKeyword.getRecord(0).size() != 1) - // this is an error of the definition of the ParserKeyword (most likely in - // the corresponding JSON file) - throw std::invalid_argument("Grid properties may only exhibit a single item (keyword " - + deckKeyword.name() + ")"); - - const auto& deckItem = deckKeyword.getRecord(0).getItem(0); - - if (deckItem.size() > m_data.size()) - throw std::invalid_argument("Size mismatch when setting data for:" + getKeywordName() - + " keyword size: " + std::to_string( deckItem.size() ) - + " input size: " + std::to_string( m_data.size()) ); - - return deckItem; - } - -template<> -void GridProperty::setDataPoint(size_t sourceIdx, size_t targetIdx, const DeckItem& deckItem) { - m_data[targetIdx] = deckItem.get< int >(sourceIdx); -} - -template<> -void GridProperty::setDataPoint(size_t sourceIdx, size_t targetIdx, const DeckItem& deckItem) { - m_data[targetIdx] = deckItem.getSIDouble(sourceIdx); -} - -template<> -bool GridProperty::containsNaN( ) const { - throw std::logic_error("Only and can be meaningfully queried for nan"); -} - -template<> -bool GridProperty::containsNaN( ) const { - bool return_value = false; - size_t size = m_data.size(); - size_t index = 0; - while (true) { - if (std::isnan(m_data[index])) { - return_value = true; - break; - } - - index++; - if (index == size) - break; - } - return return_value; -} - -template<> -const std::string& GridProperty::getDimensionString() const { - throw std::logic_error("Only grid properties have dimension"); -} - -template<> -const std::string& GridProperty::getDimensionString() const { - return m_kwInfo.getDimensionString(); -} - - -template -std::vector GridProperty::compressedCopy(const EclipseGrid& grid) const { - if (grid.allActive()) - return m_data; - else { - return grid.compressedVector( m_data ); - } -} - - - -template -std::vector GridProperty::cellsEqual(T value, const std::vector& activeMap) const { - std::vector cells; - for (size_t active_index = 0; active_index < activeMap.size(); active_index++) { - size_t global_index = activeMap[ active_index ]; - if (m_data[global_index] == value) - cells.push_back( active_index ); - } - return cells; -} - - -template -std::vector GridProperty::indexEqual(T value) const { - std::vector index_list; - for (size_t index = 0; index < m_data.size(); index++) { - if (m_data[index] == value) - index_list.push_back( index ); - } - return index_list; -} - - -template -std::vector GridProperty::cellsEqual(T value, const EclipseGrid& grid, bool active) const { - if (active) - return cellsEqual( value , grid.getActiveMap()); - else - return indexEqual( value ); -} - -std::vector< double > temperature_lookup( size_t size, - const TableManager* tables, - const EclipseGrid* grid, - const GridProperties* ig_props ) { - - if( !tables->useEqlnum() ) { - /* if values are defaulted in the TEMPI keyword, but no - * EQLNUM is specified, you will get NaNs - */ - return std::vector< double >( size, std::numeric_limits< double >::quiet_NaN() ); - } - - std::vector< double > values( size, 0 ); - - const auto& rtempvdTables = tables->getRtempvdTables(); - const std::vector< int >& eqlNum = ig_props->getKeyword("EQLNUM").getData(); - - for (size_t cellIdx = 0; cellIdx < eqlNum.size(); ++ cellIdx) { - int cellEquilNum = eqlNum[cellIdx]; - const RtempvdTable& rtempvdTable = rtempvdTables.getTable(cellEquilNum); - double cellDepth = std::get<2>(grid->getCellCenter(cellIdx)); - values[cellIdx] = rtempvdTable.evaluate("Temperature", cellDepth); - } - - return values; -} - -} - -template class Opm::GridPropertySupportedKeywordInfo< int >; -template class Opm::GridPropertySupportedKeywordInfo< double >; - -template class Opm::GridProperty< int >; -template class Opm::GridProperty< double >; diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/GridProperty.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/GridProperty.hpp deleted file mode 100644 index 719d3d93f6..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/GridProperty.hpp +++ /dev/null @@ -1,195 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ -#ifndef ECLIPSE_GRIDPROPERTY_HPP_ -#define ECLIPSE_GRIDPROPERTY_HPP_ - -#include -#include -#include - -/* - This class implemenents a class representing properties which are - define over an ECLIPSE grid, i.e. with one value for each logical - cartesian cell in the grid. -*/ - -namespace Opm { - - class Box; - class DeckItem; - class DeckKeyword; - class EclipseGrid; - class TableManager; - template< typename > class GridProperties; - -template< typename T > -class GridPropertySupportedKeywordInfo { - - public: - GridPropertySupportedKeywordInfo() = default; - - using init = std::function< std::vector< T >( size_t ) >; - using post = std::function< void( std::vector< T >& ) >; - - GridPropertySupportedKeywordInfo( - const std::string& name, - init initializer, - post postProcessor, - const std::string& dimString ); - - GridPropertySupportedKeywordInfo( - const std::string& name, - init initializer, - const std::string& dimString); - - /* this is a convenience constructor which can be used if the default - * value for the grid property is just a constant. - */ - GridPropertySupportedKeywordInfo( - const std::string& name, - const T defaultValue, - const std::string& dimString ); - - GridPropertySupportedKeywordInfo( - const std::string& name, - const T defaultValue, - post postProcessor, - const std::string& dimString ); - - const std::string& getKeywordName() const; - const std::string& getDimensionString() const; - const init& initializer() const; - const post& postProcessor() const; - - private: - - std::string m_keywordName; - init m_initializer; - post m_postProcessor; - std::string m_dimensionString; -}; - -template< typename T > -class GridProperty { -public: - typedef GridPropertySupportedKeywordInfo SupportedKeywordInfo; - - GridProperty( size_t nx, size_t ny, size_t nz, const SupportedKeywordInfo& kwInfo ); - - size_t getCartesianSize() const; - size_t getNX() const; - size_t getNY() const; - size_t getNZ() const; - - - T iget(size_t index) const; - T iget(size_t i , size_t j , size_t k) const; - void iset(size_t index, T value); - void iset(size_t i , size_t j , size_t k , T value); - - const std::vector& getData() const; - - bool containsNaN() const; - const std::string& getDimensionString() const; - - void multiplyWith( const GridProperty& ); - void multiplyValueAtIndex( size_t index, T factor ); - void maskedSet( T value, const std::vector< bool >& mask ); - void maskedMultiply( T value, const std::vector< bool >& mask ); - void maskedAdd( T value, const std::vector< bool >& mask ); - void maskedCopy( const GridProperty< T >& other, const std::vector< bool >& mask ); - void initMask( T value, std::vector& mask ) const; - - /** - Due to the convention where it is only necessary to supply the - top layer of the petrophysical properties we can unfortunately - not enforce that the number of elements elements in the - DeckKeyword equals nx*ny*nz. - */ - - void loadFromDeckKeyword( const DeckKeyword& ); - void loadFromDeckKeyword( const Box&, const DeckKeyword& ); - - void copyFrom( const GridProperty< T >&, const Box& ); - void scale( T scaleFactor, const Box& ); - void add( T shiftValue, const Box& ); - void setScalar( T value, const Box& ); - - const std::string& getKeywordName() const; - const SupportedKeywordInfo& getKeywordInfo() const; - - /** - Will check that all elements in the property are in the closed - interval [min,max]. - */ - void checkLimits( T min, T max ) const; - - /* - The runPostProcessor() method is public; and it is no harm in - calling it from arbitrary locations. But the intention is that - should only be called from the Eclipse3DProperties class - assembling the properties. - */ - void runPostProcessor(); - /* - Will scan through the roperty and return a vector of all the - indices where the property value agrees with the input value. - */ - std::vector indexEqual(T value) const; - - - /* - Will run through all the cells in the activeMap and return a - list of the elements where the property value agrees with the - input value. The values returned will be in the space - [0,nactive) - i.e. 'active' indices. - */ - std::vector cellsEqual(T value , const std::vector& activeMap) const; - - /* - If active == true the method will get the activeMap from the - grid and call the cellsEqual( T , std::vector&) overload, - otherwise it will return indexEqual( value ); - */ - std::vector cellsEqual(T value, const EclipseGrid& grid, bool active = true) const; - - /* - Will return a std::vector of the data in the active cells. - */ - std::vector compressedCopy( const EclipseGrid& grid) const; - -private: - const DeckItem& getDeckItem( const DeckKeyword& ); - void setDataPoint(size_t sourceIdx, size_t targetIdx, const DeckItem& deckItem); - - size_t m_nx, m_ny, m_nz; - SupportedKeywordInfo m_kwInfo; - std::vector m_data; - bool m_hasRunPostProcessor = false; -}; - -// initialize the TEMPI grid property using the temperature vs depth -// table (stemming from the TEMPVD or the RTEMPVD keyword) -std::vector< double > temperature_lookup( size_t, - const TableManager*, - const EclipseGrid*, - const GridProperties* ); -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/MULTREGTScanner.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/MULTREGTScanner.cpp deleted file mode 100644 index eb954bdefa..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/MULTREGTScanner.cpp +++ /dev/null @@ -1,276 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -namespace Opm { - - namespace MULTREGT { - - std::string RegionNameFromDeckValue(const std::string& stringValue) { - if (stringValue == "O") - return "OPERNUM"; - - if (stringValue == "F") - return "FLUXNUM"; - - if (stringValue == "M") - return "MULTNUM"; - - throw std::invalid_argument("The input string: " + stringValue + " was invalid. Expected: O/F/M"); - } - - - - NNCBehaviourEnum NNCBehaviourFromString(const std::string& stringValue) { - if (stringValue == "ALL") - return ALL; - - if (stringValue == "NNC") - return NNC; - - if (stringValue == "NONNC") - return NONNC; - - if (stringValue == "NOAQUNNC") - return NOAQUNNC; - - throw std::invalid_argument("The input string: " + stringValue + " was invalid. Expected: ALL/NNC/NONNC/NOAQUNNC"); - } - - - } - - - - - MULTREGTRecord::MULTREGTRecord( const DeckRecord& deckRecord, const std::string& defaultRegion) : - m_srcRegion("SRC_REGION"), - m_targetRegion("TARGET_REGION"), - m_region("REGION" , defaultRegion) - { - const auto& srcItem = deckRecord.getItem("SRC_REGION"); - const auto& targetItem = deckRecord.getItem("TARGET_REGION"); - const auto& tranItem = deckRecord.getItem("TRAN_MULT"); - const auto& dirItem = deckRecord.getItem("DIRECTIONS"); - const auto& nncItem = deckRecord.getItem("NNC_MULT"); - const auto& defItem = deckRecord.getItem("REGION_DEF"); - - - if (!srcItem.defaultApplied(0)) - m_srcRegion.setValue( srcItem.get< int >(0) ); - - if (!targetItem.defaultApplied(0)) - m_targetRegion.setValue( targetItem.get< int >(0) ); - - m_transMultiplier = tranItem.get< double >(0); - m_directions = FaceDir::FromMULTREGTString( dirItem.get< std::string >(0) ); - m_nncBehaviour = MULTREGT::NNCBehaviourFromString( nncItem.get< std::string >(0)); - - if (!defItem.defaultApplied(0)) - m_region.setValue( MULTREGT::RegionNameFromDeckValue ( defItem.get< std::string >(0) )); - } - - - /*****************************************************************/ - /* - Observe that the (REGION1 -> REGION2) pairs behave like keys; - i.e. for the MULTREGT keyword - - MULTREGT - 2 4 0.75 Z ALL M / - 2 4 2.50 XY ALL F / - / - - The first record is completely overweritten by the second - record, this is because the both have the (2 -> 4) region - identifiers. This behaviourt is ensured by using a map with - std::pair as key. - - This function starts with some initial preprocessing to create a - map which looks like this: - - - searchMap = {"MULTNUM" : {std::pair(1,2) : std::tuple(TransFactor , Face , Region), - std::pair(4,7) : std::tuple(TransFactor , Face , Region), - ...}, - "FLUXNUM" : {std::pair(4,8) : std::tuple(TransFactor , Face , Region), - std::pair(1,4) : std::tuple(TransFactor , Face , Region), - ...}} - - Then it will go through the different regions and looking for - interface with the wanted region values. - */ - MULTREGTScanner::MULTREGTScanner(const Eclipse3DProperties& e3DProps, - const std::vector< const DeckKeyword* >& keywords) : - m_e3DProps(e3DProps) { - - for (size_t idx = 0; idx < keywords.size(); idx++) - this->addKeyword(*keywords[idx] , e3DProps.getDefaultRegionKeyword()); - - MULTREGTSearchMap searchPairs; - for (std::vector::const_iterator record = m_records.begin(); record != m_records.end(); ++record) { - if (e3DProps.hasDeckIntGridProperty( record->m_region.getValue())) { - if (record->m_srcRegion.hasValue() && record->m_targetRegion.hasValue()) { - int srcRegion = record->m_srcRegion.getValue(); - int targetRegion = record->m_targetRegion.getValue(); - if (srcRegion != targetRegion) { - std::pair pair{ srcRegion, targetRegion }; - searchPairs[pair] = &(*record); - } - } - } - else - throw std::logic_error( - "MULTREGT record is based on region: " - + record->m_region.getValue() - + " which is not in the deck"); - } - - for (auto iter = searchPairs.begin(); iter != searchPairs.end(); ++iter) { - const MULTREGTRecord * record = (*iter).second; - std::pair pair = (*iter).first; - const std::string& keyword = record->m_region.getValue(); - if (m_searchMap.count(keyword) == 0) - m_searchMap[keyword] = MULTREGTSearchMap(); - - m_searchMap[keyword][pair] = record; - } - } - - - void MULTREGTScanner::assertKeywordSupported( const DeckKeyword& deckKeyword, const std::string& defaultRegion) { - for (auto iter = deckKeyword.begin(); iter != deckKeyword.end(); ++iter) { - MULTREGTRecord record( *iter , defaultRegion); - - if (record.m_nncBehaviour == MULTREGT::NOAQUNNC) - throw std::invalid_argument("Sorry - currently we do not support \'NOAQUNNC\' for MULTREGT."); - - if (!record.m_srcRegion.hasValue()) - throw std::invalid_argument("Sorry - currently it is not supported with a defaulted source region value."); - - if (!record.m_targetRegion.hasValue()) - throw std::invalid_argument("Sorry - currently it is not supported with a defaulted target region value."); - - if (record.m_srcRegion.getValue() == record.m_targetRegion.getValue()) - throw std::invalid_argument("Sorry - multregt applied internally to a region is not yet supported"); - - } - } - - - - void MULTREGTScanner::addKeyword( const DeckKeyword& deckKeyword , const std::string& defaultRegion) { - assertKeywordSupported( deckKeyword , defaultRegion ); - - for (auto iter = deckKeyword.begin(); iter != deckKeyword.end(); ++iter) { - MULTREGTRecord record( *iter , defaultRegion ); - /* - The default value for the region item is to use the - region item on the previous record, or alternatively - 'MULTNUM' for the first record. - */ - if (!record.m_region.hasValue()) { - if (m_records.size() > 0) { - auto previousRecord = m_records.back(); - record.m_region.setValue( previousRecord.m_region.getValue() ); - } else - record.m_region.setValue( "MULTNUM" ); - } - m_records.push_back( record ); - } - - } - - - /* - This function will check the region values in globalIndex1 and - globalIndex and see if they match the regionvalues specified in - the deck. The function checks both directions: - - Assume the relevant MULTREGT record looks like: - - 1 2 0.10 XYZ ALL M / - - I.e. we are checking for the boundary between regions 1 and - 2. We assign the transmissibility multiplier to the correct face - of the cell with value 1: - - ----------- - | 1 | 2 | => MultTrans( i,j,k,FaceDir::XPlus ) *= 0.50 - ----------- - - ----------- - | 2 | 1 | => MultTrans( i+1,j,k,FaceDir::XMinus ) *= 0.50 - ----------- - - */ - double MULTREGTScanner::getRegionMultiplier(size_t globalIndex1 , size_t globalIndex2, FaceDir::DirEnum faceDir) const { - - for (auto iter = m_searchMap.begin(); iter != m_searchMap.end(); iter++) { - const Opm::GridProperty& region = m_e3DProps.getIntGridProperty( (*iter).first ); - MULTREGTSearchMap map = (*iter).second; - - int regionId1 = region.iget(globalIndex1); - int regionId2 = region.iget(globalIndex2); - - - std::pair pair{regionId1 , regionId2}; - if (map.count(pair) != 1 || !(map.at(pair)->m_directions & faceDir)) { - pair = std::pair{regionId2 , regionId1}; - if (map.count(pair) != 1 || !(map.at(pair)->m_directions & faceDir)) - continue; - } - const MULTREGTRecord * record = map[pair]; - - bool applyMultiplier = true; - int i1 = globalIndex1 % region.getNX(); - int i2 = globalIndex2 % region.getNX(); - int j1 = globalIndex1 / region.getNX() % region.getNY(); - int j2 = globalIndex2 / region.getNX() % region.getNY(); - - if (record->m_nncBehaviour == MULTREGT::NNC){ - applyMultiplier = true; - if ((std::abs(i1-i2) == 0 && std::abs(j1-j2) == 1) || (std::abs(i1-i2) == 1 && std::abs(j1-j2) == 0)) - applyMultiplier = false; - } - else if (record->m_nncBehaviour == MULTREGT::NONNC){ - applyMultiplier = false; - if ((std::abs(i1-i2) == 0 && std::abs(j1-j2) == 1) || (std::abs(i1-i2) == 1 && std::abs(j1-j2) == 0)) - applyMultiplier = true; - } - - if (applyMultiplier) { - return record->m_transMultiplier; - } - - } - return 1; - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/MULTREGTScanner.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/MULTREGTScanner.hpp deleted file mode 100644 index 74d12669f7..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/MULTREGTScanner.hpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - - -#ifndef OPM_PARSER_MULTREGTSCANNER_HPP -#define OPM_PARSER_MULTREGTSCANNER_HPP - -#include -#include -#include - - -namespace Opm { - - template< typename > class GridProperties; - - class DeckRecord; - class DeckKeyword; - - namespace MULTREGT { - - - enum NNCBehaviourEnum { - NNC = 1, - NONNC = 2, - ALL = 3, - NOAQUNNC = 4 - }; - - std::string RegionNameFromDeckValue(const std::string& stringValue); - NNCBehaviourEnum NNCBehaviourFromString(const std::string& stringValue); - } - - - - - class MULTREGTRecord { - public: - MULTREGTRecord(const DeckRecord& deckRecord , const std::string& defaultRegion); - - Value m_srcRegion; - Value m_targetRegion; - double m_transMultiplier; - int m_directions; - MULTREGT::NNCBehaviourEnum m_nncBehaviour; - Value m_region; - }; - - typedef std::map< std::pair , const MULTREGTRecord * > MULTREGTSearchMap; - typedef std::tuple MULTREGTConnection; - - - - class MULTREGTScanner { - - public: - MULTREGTScanner(const Eclipse3DProperties& e3DProps, - const std::vector< const DeckKeyword* >& keywords); - double getRegionMultiplier(size_t globalCellIdx1, size_t globalCellIdx2, FaceDir::DirEnum faceDir) const; - - private: - void addKeyword( const DeckKeyword& deckKeyword, const std::string& defaultRegion); - void assertKeywordSupported(const DeckKeyword& deckKeyword, const std::string& defaultRegion); - std::vector< MULTREGTRecord > m_records; - std::map m_searchMap; - const Eclipse3DProperties& m_e3DProps; - }; - -} - -#endif // OPM_PARSER_MULTREGTSCANNER_HPP diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/MinpvMode.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/MinpvMode.hpp deleted file mode 100644 index f35354db93..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/MinpvMode.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef OPM_MINPVMODE_HPP -#define OPM_MINPVMODE_HPP - -#include - -namespace Opm { - - namespace MinpvMode { - enum ModeEnum { - Inactive = 1, - EclSTD = 2, - OpmFIL = 3 - }; - } -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/NNC.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/NNC.cpp deleted file mode 100644 index 9faae2d409..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/NNC.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - Copyright 2015 IRIS - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ -#include - -#include -#include -#include -#include -#include -#include -#include -#include - - -namespace Opm -{ - /// [[deprecated]] - NNC::NNC(std::shared_ptr deck, EclipseGridConstPtr eclipseGrid) : - NNC(*deck, eclipseGrid) - {} - - /// [[deprecated]] - NNC::NNC(const Deck& deck, EclipseGridConstPtr eclipseGrid) : - NNC(deck, *eclipseGrid) - {} - - NNC::NNC(const Deck& deck, const GridDims& gridDims) { - const auto& nncs = deck.getKeywordList(); - for (size_t idx_nnc = 0; idx_nnc ijk1; - ijk1[0] = static_cast(nnc.getRecord(i).getItem(0).get< int >(0)-1); - ijk1[1] = static_cast(nnc.getRecord(i).getItem(1).get< int >(0)-1); - ijk1[2] = static_cast(nnc.getRecord(i).getItem(2).get< int >(0)-1); - size_t global_index1 = gridDims.getGlobalIndex(ijk1[0],ijk1[1],ijk1[2]); - - std::array ijk2; - ijk2[0] = static_cast(nnc.getRecord(i).getItem(3).get< int >(0)-1); - ijk2[1] = static_cast(nnc.getRecord(i).getItem(4).get< int >(0)-1); - ijk2[2] = static_cast(nnc.getRecord(i).getItem(5).get< int >(0)-1); - size_t global_index2 = gridDims.getGlobalIndex(ijk2[0],ijk2[1],ijk2[2]); - - const double trans = nnc.getRecord(i).getItem(6).getSIDouble(0); - - addNNC(global_index1,global_index2,trans); - } - } - } - - // default constructor - NNC::NNC() { - } - - - void NNC::addNNC(const size_t cell1, const size_t cell2, const double trans) { - NNCdata tmp; - tmp.cell1 = cell1; - tmp.cell2 = cell2; - tmp.trans = trans; - m_nnc.push_back(tmp); - } - - size_t NNC::numNNC() const { - return(m_nnc.size()); - } - - bool NNC::hasNNC() const { - return m_nnc.size()>0; - } - -} // namespace Opm - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/NNC.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/NNC.hpp deleted file mode 100644 index fb23ac73a7..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/NNC.hpp +++ /dev/null @@ -1,69 +0,0 @@ -/* - Copyright 2015 IRIS - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef OPM_PARSER_NNC_HPP -#define OPM_PARSER_NNC_HPP - -#include -#include -#include - -#include -#include -#include - -namespace Opm -{ - -struct NNCdata { - size_t cell1; - size_t cell2; - double trans; -}; - -/// Represents non-neighboring connections (non-standard adjacencies). -/// This class is essentially a directed weighted graph. -class NNC -{ -public: - NNC(); - - /// [[deprecated]] - NNC(std::shared_ptr deck_ptr, std::shared_ptr< const EclipseGrid > eclipseGrid); - - /// [[deprecated]] - NNC(const Deck& deck, std::shared_ptr< const EclipseGrid > eclipseGrid); - - /// Construct from input deck. - NNC(const Deck& deck, const GridDims& gridDims); - void addNNC(const size_t cell1, const size_t cell2, const double trans); - const std::vector& nncdata() const { return m_nnc; } - size_t numNNC() const; - bool hasNNC() const; - -private: - - std::vector m_nnc; -}; - - -} // namespace Opm - - -#endif // OPM_PARSER_NNC_HPP diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/PinchMode.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/PinchMode.cpp deleted file mode 100644 index f79712ca5d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/PinchMode.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include -#include - -namespace Opm { - - namespace PinchMode { - - const std::string PinchMode2String(const ModeEnum enumValue) { - std::string stringValue; - switch (enumValue) { - case ModeEnum::ALL: - stringValue = "ALL"; - break; - - case ModeEnum::TOPBOT: - stringValue = "TOPBOT"; - break; - - case ModeEnum::TOP: - stringValue = "TOP"; - break; - } - - return stringValue; - } - - ModeEnum PinchModeFromString(const std::string& stringValue) { - std::string s(stringValue); - boost::algorithm::trim(s); - - ModeEnum mode; - if (s == "ALL") { mode = ModeEnum::ALL; } - else if (s == "TOPBOT") { mode = ModeEnum::TOPBOT; } - else if (s == "TOP") { mode = ModeEnum::TOP; } - else { - std::string msg = "Unsupported pinchout mode " + s; - throw std::invalid_argument(msg); - } - - return mode; - } - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/PinchMode.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/PinchMode.hpp deleted file mode 100644 index 13abf082cd..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/PinchMode.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef OPM_PINCHMODE_HPP -#define OPM_PINCHMODE_HPP - -#include - -namespace Opm { - - namespace PinchMode { - enum ModeEnum { - ALL = 1, - TOPBOT = 2, - TOP = 3 - }; - - const std::string PinchMode2String(const ModeEnum enumValue); - ModeEnum PinchModeFromString(const std::string& stringValue); - } -} - - -#endif // _PINCHMODE_ diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/SatfuncPropertyInitializers.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/SatfuncPropertyInitializers.cpp deleted file mode 100644 index 90e63440f1..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/SatfuncPropertyInitializers.cpp +++ /dev/null @@ -1,1108 +0,0 @@ -/* - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License along with - OPM. If not, see . -*/ - - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace Opm { - - /* - * See the "Saturation Functions" chapter in the Eclipse Technical - * Description; there are several alternative families of keywords which - * can be used to enter relperm and capillary pressure tables. - * - * If SWOF and SGOF are specified in the deck it return I - * If SWFN, SGFN and SOF3 are specified in the deck it return II - * If keywords are missing or mixed, an error is given. - */ - enum class SatfuncFamily { none = 0, I = 1, II = 2 }; - - static SatfuncFamily getSaturationFunctionFamily( const TableManager* tm ) { - const TableContainer& swofTables = tm->getSwofTables(); - const TableContainer& sgofTables = tm->getSgofTables(); - const TableContainer& slgofTables = tm->getSlgofTables(); - const TableContainer& sof3Tables = tm->getSof3Tables(); - const TableContainer& swfnTables = tm->getSwfnTables(); - const TableContainer& sgfnTables = tm->getSgfnTables(); - - - bool family1 = (!sgofTables.empty() || !slgofTables.empty()) && !swofTables.empty(); - bool family2 = !swfnTables.empty() && !sgfnTables.empty() && !sof3Tables.empty(); - - if (family1 && family2) { - throw std::invalid_argument("Saturation families should not be mixed \n" - "Use either SGOF (or SLGOF) and SWOF or SGFN, SWFN and SOF3"); - } - - if (!family1 && !family2) { - throw std::invalid_argument("Saturations function must be specified using either " - "family 1 or family 2 keywords \n" - "Use either SGOF (or SLGOF) and SWOF or SGFN, SWFN and SOF3" ); - } - - if( family1 ) return SatfuncFamily::I; - if( family2 ) return SatfuncFamily::II; - return SatfuncFamily::none; - } - - enum class limit { min, max }; - - static std::vector< double > findMinWaterSaturation( const TableManager* tm ) { - const auto num_tables = tm->getTabdims()->getNumSatTables(); - const auto& swofTables = tm->getSwofTables(); - const auto& swfnTables = tm->getSwfnTables(); - - const auto famI = [&swofTables]( int i ) { - return swofTables.getTable< SwofTable >( i ).getSwColumn().front(); - }; - - const auto famII = [&swfnTables]( int i ) { - return swfnTables.getTable< SwfnTable >( i ).getSwColumn().front(); - }; - - switch( getSaturationFunctionFamily( tm ) ) { - case SatfuncFamily::I: return map( famI, fun::iota( num_tables ) ); - case SatfuncFamily::II: return map( famII, fun::iota( num_tables ) ); - default: - throw std::domain_error("No valid saturation keyword family specified"); - } - } - - static std::vector< double > findMaxWaterSaturation( const TableManager* tm ) { - const auto num_tables = tm->getTabdims()->getNumSatTables(); - const auto& swofTables = tm->getSwofTables(); - const auto& swfnTables = tm->getSwfnTables(); - - const auto famI = [&swofTables]( int i ) { - return swofTables.getTable< SwofTable >( i ).getSwColumn().back(); - }; - - const auto famII = [&swfnTables]( int i ) { - return swfnTables.getTable< SwfnTable >( i ).getSwColumn().back(); - }; - - switch( getSaturationFunctionFamily( tm ) ) { - case SatfuncFamily::I: return map( famI, fun::iota( num_tables ) ); - case SatfuncFamily::II: return map( famII, fun::iota( num_tables ) ); - default: - throw std::domain_error("No valid saturation keyword family specified"); - } - } - - static std::vector< double > findMinGasSaturation( const TableManager* tm ) { - const auto num_tables = tm->getTabdims()->getNumSatTables(); - const auto& sgofTables = tm->getSgofTables(); - const auto& slgofTables = tm->getSlgofTables(); - const auto& sgfnTables = tm->getSgfnTables(); - - const auto famI_sgof = [&sgofTables]( int i ) { - return sgofTables.getTable< SgofTable >( i ).getSgColumn().front(); - }; - - const auto famI_slgof = [&slgofTables]( int i ) { - return 1.0 - slgofTables.getTable< SlgofTable >( i ).getSlColumn().back(); - }; - - const auto famII = [&sgfnTables]( int i ) { - return sgfnTables.getTable< SgfnTable >( i ).getSgColumn().front(); - }; - - - switch( getSaturationFunctionFamily( tm ) ) { - case SatfuncFamily::I: - - if( sgofTables.empty() && slgofTables.empty() ) - throw std::runtime_error( "Saturation keyword family I requires either sgof or slgof non-empty" ); - - if( !sgofTables.empty() ) - return fun::map( famI_sgof, fun::iota( num_tables ) ); - else - return fun::map( famI_slgof, fun::iota( num_tables ) ); - - case SatfuncFamily::II: - return fun::map( famII, fun::iota( num_tables ) ); - - default: - throw std::domain_error("No valid saturation keyword family specified"); - - } - - } - - static std::vector< double > findMaxGasSaturation( const TableManager* tm ) { - const auto num_tables = tm->getTabdims()->getNumSatTables(); - const auto& sgofTables = tm->getSgofTables(); - const auto& slgofTables = tm->getSlgofTables(); - const auto& sgfnTables = tm->getSgfnTables(); - - const auto famI_sgof = [&sgofTables]( int i ) { - return sgofTables.getTable< SgofTable >( i ).getSgColumn().back(); - }; - - const auto famI_slgof = [&slgofTables]( int i ) { - return 1.0 - slgofTables.getTable< SlgofTable >( i ).getSlColumn().front(); - }; - - const auto famII = [&sgfnTables]( int i ) { - return sgfnTables.getTable< SgfnTable >( i ).getSgColumn().back(); - }; - - - switch( getSaturationFunctionFamily( tm ) ) { - case SatfuncFamily::I: - if( sgofTables.empty() && slgofTables.empty() ) - throw std::runtime_error( "Saturation keyword family I requires either sgof or slgof non-empty" ); - - if( !sgofTables.empty() ) - return fun::map( famI_sgof, fun::iota( num_tables ) ); - else - return fun::map( famI_slgof, fun::iota( num_tables ) ); - - case SatfuncFamily::II: - return fun::map( famII, fun::iota( num_tables ) ); - - default: - throw std::domain_error("No valid saturation keyword family specified"); - } - } - - /* - * These functions have been ported from an older implementation to instead - * use std::upper_bound and more from to make code -intent- - * clearer. This also made some (maybe intentional) details easier to spot. - * A short discussion: - * - * I don't know if not finding any element larger than 0.0 in the tables - * was ever supposed to happen (or even possible), in which case the vector - * elements remained at their initial value of 0.0. This behaviour has been - * preserved, but is now explicit. The original code was also not clear if - * it was possible to look up columns at index -1 (see critical_water for - * an example), but the new version is explicit about this. Unfortuately - * I'm not familiar enough with the maths or internal structure to make - * more than a guess here, but most of this behaviour should be preserved. - * - */ - - template< typename T > - static inline double critical_water( const T& table ) { - - const auto& col = table.getKrwColumn(); - const auto end = col.begin() + table.numRows(); - const auto critical = std::upper_bound( col.begin(), end, 0.0 ); - const auto index = std::distance( col.begin(), critical ); - - if( index == 0 || critical == end ) return 0.0; - - return table.getSwColumn()[ index - 1 ]; - } - - static std::vector< double > findCriticalWater( const TableManager* tm ) { - - const auto num_tables = tm->getTabdims()->getNumSatTables(); - const auto& swofTables = tm->getSwofTables(); - const auto& swfnTables = tm->getSwfnTables(); - - const auto famI = [&swofTables]( int i ) { - return critical_water( swofTables.getTable< SwofTable >( i ) ); - }; - - const auto famII = [&swfnTables]( int i ) { - return critical_water( swfnTables.getTable< SwfnTable >( i ) ); - }; - - switch( getSaturationFunctionFamily( tm ) ) { - case SatfuncFamily::I: return fun::map( famI, fun::iota( num_tables ) ); - case SatfuncFamily::II: return fun::map( famII, fun::iota( num_tables ) ); - default: throw std::domain_error("No valid saturation keyword family specified"); - } - } - - template< typename T > - static inline double critical_gas( const T& table ) { - const auto& col = table.getKrgColumn(); - const auto end = col.begin() + table.numRows(); - const auto critical = std::upper_bound( col.begin(), end, 0.0 ); - const auto index = std::distance( col.begin(), critical ); - - if( index == 0 || critical == end ) return 0.0; - - return table.getSgColumn()[ index - 1 ]; - } - - static inline double critical_gas( const SlgofTable& slgofTable ) { - const auto& col = slgofTable.getKrgColumn(); - const auto critical = std::upper_bound( col.begin(), col.end(), 0.0 ); - const auto index = std::distance( col.begin(), critical ); - - if( index == 0 || critical == col.end() ) return 0.0; - - return slgofTable.getSlColumn()[ index - 1 ]; - } - - static std::vector< double > findCriticalGas( const TableManager* tm ) { - - const auto num_tables = tm->getTabdims()->getNumSatTables(); - const auto& sgfnTables = tm->getSgfnTables(); - const auto& sgofTables = tm->getSgofTables(); - const auto& slgofTables = tm->getSlgofTables(); - - const auto famI_sgof = [&sgofTables]( int i ) { - return critical_gas( sgofTables.getTable< SgofTable >( i ) ); - }; - - const auto famI_slgof = [&slgofTables]( int i ) { - return critical_gas( slgofTables.getTable< SlgofTable >( i ) ); - }; - - const auto famII = [&sgfnTables]( int i ) { - return critical_gas( sgfnTables.getTable< SgfnTable >( i ) ); - }; - - switch( getSaturationFunctionFamily( tm ) ) { - case SatfuncFamily::I: - if( sgofTables.empty() && slgofTables.empty() ) - throw std::runtime_error( "Saturation keyword family I requires either sgof or slgof non-empty" ); - - if( !sgofTables.empty() ) - return fun::map( famI_sgof, fun::iota( num_tables ) ); - else - return fun::map( famI_slgof, fun::iota( num_tables ) ); - - case SatfuncFamily::II: - return fun::map( famII, fun::iota( num_tables ) ); - - default: - throw std::domain_error("No valid saturation keyword family specified"); - } - } - - static inline double critical_oil_water( const SwofTable& swofTable ) { - const auto& col = swofTable.getKrowColumn(); - - using reverse = std::reverse_iterator< decltype( col.begin() ) >; - auto rbegin = reverse( col.begin() + swofTable.numRows() ); - auto rend = reverse( col.begin() ); - const auto critical = std::upper_bound( rbegin, rend, 0.0 ); - const auto index = std::distance( col.begin(), critical.base() - 1 ); - - if( critical == rend ) return 0.0; - - return 1 - swofTable.getSwColumn()[ index + 1 ]; - } - - static inline double critical_oil( const Sof3Table& sof3Table, const TableColumn& col ) { - const auto critical = std::upper_bound( col.begin(), col.end(), 0.0 ); - const auto index = std::distance( col.begin(), critical ); - - if( index == 0 || critical == col.end() ) return 0.0; - - return sof3Table.getSoColumn()[ index - 1 ]; - } - - static std::vector< double > findCriticalOilWater( const TableManager* tm ) { - const auto num_tables = tm->getTabdims()->getNumSatTables(); - const auto& swofTables = tm->getSwofTables(); - const auto& sof3Tables= tm->getSof3Tables(); - - const auto famI = [&swofTables]( int i ) { - return critical_oil_water( swofTables.getTable< SwofTable >( i ) ); - }; - - const auto famII = [&sof3Tables]( int i ) { - const auto& tb = sof3Tables.getTable< Sof3Table >( i ); - return critical_oil( tb, tb.getKrowColumn() ); - }; - - switch( getSaturationFunctionFamily( tm ) ) { - case SatfuncFamily::I: return fun::map( famI, fun::iota( num_tables ) ); - case SatfuncFamily::II: return fun::map( famII, fun::iota( num_tables ) ); - default: throw std::domain_error("No valid saturation keyword family specified"); - } - } - - static inline double critical_oil_gas( const SgofTable& sgofTable ) { - const auto& col = sgofTable.getKrogColumn(); - - using reverse = std::reverse_iterator< decltype( col.begin() ) >; - auto rbegin = reverse( col.begin() + sgofTable.numRows() ); - auto rend = reverse( col.begin() ); - const auto critical = std::upper_bound( rbegin, rend, 0.0 ); - const auto index = std::distance( col.begin(), critical.base() - 1 ); - - if( critical == rend ) return 0.0; - - return 1 - sgofTable.getSgColumn()[ index + 1 ]; - } - - static inline double critical_oil_gas( const SlgofTable& sgofTable ) { - - const auto& col = sgofTable.getKrogColumn(); - using reverse = std::reverse_iterator< decltype( col.begin() ) >; - auto rbegin = reverse( col.begin() + sgofTable.numRows() ); - auto rend = reverse( col.begin() ); - const auto critical = std::upper_bound( rbegin, rend, 0.0 ); - const auto index = std::distance( col.begin(), critical.base() - 1 ); - - if( critical == rend ) return 0.0; - - return 1 - sgofTable.getSlColumn()[ index + 1 ]; - } - - - static std::vector< double > findCriticalOilGas( const TableManager* tm ) { - - const auto num_tables = tm->getTabdims()->getNumSatTables(); - const auto& sgofTables = tm->getSgofTables(); - const auto& slgofTables = tm->getSlgofTables(); - const auto& sof3Tables = tm->getSof3Tables(); - - const auto famI_sgof = [&sgofTables]( int i ) { - return critical_oil_gas( sgofTables.getTable< SgofTable >( i ) ); - }; - - const auto famI_slgof = [&slgofTables]( int i ) { - return critical_oil_gas( slgofTables.getTable< SlgofTable >( i ) ); - }; - - const auto famII = [&sof3Tables]( int i ) { - const auto& tb = sof3Tables.getTable< Sof3Table >( i ); - return critical_oil( tb, tb.getKrogColumn() ); - }; - - switch( getSaturationFunctionFamily( tm ) ) { - case SatfuncFamily::I: - if( sgofTables.empty() && slgofTables.empty() ) - throw std::runtime_error( "Saturation keyword family I requires either sgof or slgof non-empty" ); - - if( !sgofTables.empty() ) - return fun::map( famI_sgof, fun::iota( num_tables ) ); - else - return fun::map( famI_slgof, fun::iota( num_tables ) ); - - case SatfuncFamily::II: - return fun::map( famII, fun::iota( num_tables ) ); - - default: - throw std::domain_error("No valid saturation keyword family specified"); - } - } - - static std::vector< double > findMaxKrg( const TableManager* tm ) { - const auto num_tables = tm->getTabdims()->getNumSatTables(); - const auto& sgofTables = tm->getSgofTables(); - const auto& sgfnTables = tm->getSgfnTables(); - - const auto& famI = [&sgofTables]( int i ) { - return sgofTables.getTable< SgofTable >( i ).getKrgColumn().back(); - }; - - const auto& famII = [&sgfnTables]( int i ) { - return sgfnTables.getTable< SgfnTable >( i ).getKrgColumn().back(); - }; - - switch( getSaturationFunctionFamily( tm ) ) { - case SatfuncFamily::I: - return fun::map( famI, fun::iota( num_tables ) ); - case SatfuncFamily::II: - return fun::map( famII, fun::iota( num_tables ) ); - default: - throw std::domain_error("No valid saturation keyword family specified"); - } - } - - static std::vector< double > findKrgr( const TableManager* tm ) { - const auto num_tables = tm->getTabdims()->getNumSatTables(); - const auto& sgofTables = tm->getSgofTables(); - const auto& sgfnTables = tm->getSgfnTables(); - - const auto& famI = [&sgofTables]( int i ) { - return sgofTables.getTable< SgofTable >( i ).getKrgColumn().front(); - }; - - const auto& famII = [&sgfnTables]( int i ) { - return sgfnTables.getTable< SgfnTable >( i ).getKrgColumn().back(); - }; - - switch( getSaturationFunctionFamily( tm ) ) { - case SatfuncFamily::I: - return fun::map( famI, fun::iota( num_tables ) ); - case SatfuncFamily::II: - return fun::map( famII, fun::iota( num_tables ) ); - default: - throw std::domain_error("No valid saturation keyword family specified"); - } - } - - static std::vector< double > findKrwr( const TableManager* tm ) { - const auto num_tables = tm->getTabdims()->getNumSatTables(); - const auto& swofTables = tm->getSwofTables(); - const auto& swfnTables = tm->getSwfnTables(); - - const auto& famI = [&swofTables]( int i ) { - return swofTables.getTable< SwofTable >( i ).getKrwColumn().front(); - }; - - const auto& famII = [&swfnTables]( int i ) { - return swfnTables.getTable< SwfnTable >( i ).getKrwColumn().front(); - }; - - switch( getSaturationFunctionFamily( tm ) ) { - case SatfuncFamily::I: - return fun::map( famI, fun::iota( num_tables ) ); - case SatfuncFamily::II: - return fun::map( famII, fun::iota( num_tables ) ); - default: - throw std::domain_error("No valid saturation keyword family specified"); - } - } - - static std::vector< double > findKrorw( const TableManager* tm ) { - const auto num_tables = tm->getTabdims()->getNumSatTables(); - const auto& swofTables = tm->getSwofTables(); - const auto& sof3Tables = tm->getSof3Tables(); - - const auto& famI = [&swofTables]( int i ) { - const auto& swofTable = swofTables.getTable< SwofTable >( i ); - const auto& krwCol = swofTable.getKrwColumn(); - const auto crit = std::upper_bound( krwCol.begin(), krwCol.end(), 0.0 ); - const auto index = std::distance( krwCol.begin(), crit ); - - if( crit == krwCol.end() ) return 0.0; - - return swofTable.getKrowColumn()[ index - 1 ]; - }; - - const auto crit_water = findCriticalWater( tm ); - const auto min_gas = findMinGasSaturation( tm ); - const auto& famII = [&sof3Tables,&crit_water,&min_gas]( int i ) { - const double OilSatAtcritialWaterSat = 1.0 - crit_water[ i ] - min_gas[ i ]; - return sof3Tables.getTable< Sof3Table >( i ) - .evaluate("KROW", OilSatAtcritialWaterSat); - }; - - switch( getSaturationFunctionFamily( tm ) ) { - case SatfuncFamily::I: - return fun::map( famI, fun::iota( num_tables ) ); - case SatfuncFamily::II: - return fun::map( famII, fun::iota( num_tables ) ); - default: - throw std::domain_error("No valid saturation keyword family specified"); - } - } - - static std::vector< double > findKrorg( const TableManager* tm ) { - const auto num_tables = tm->getTabdims()->getNumSatTables(); - const auto& sgofTables = tm->getSgofTables(); - const auto& sof3Tables = tm->getSof3Tables(); - - const auto& famI = [&sgofTables]( int i ) { - const auto& sgofTable = sgofTables.getTable< SgofTable >( i ); - const auto& krgCol = sgofTable.getKrgColumn(); - const auto crit = std::upper_bound( krgCol.begin(), krgCol.end(), 0.0 ); - const auto index = std::distance( krgCol.begin(), crit ); - - if( crit == krgCol.end() ) return 0.0; - - return sgofTable.getKrogColumn()[ index - 1 ]; - }; - - const auto crit_gas = findCriticalGas( tm ); - const auto min_water = findMinWaterSaturation( tm ); - const auto& famII = [&sof3Tables,&crit_gas,&min_water]( int i ) { - const double OilSatAtcritialGasSat = 1.0 - crit_gas[ i ] - min_water[ i ]; - return sof3Tables.getTable< Sof3Table >( i ) - .evaluate("KROG", OilSatAtcritialGasSat); - }; - - switch( getSaturationFunctionFamily( tm ) ) { - case SatfuncFamily::I: - return fun::map( famI, fun::iota( num_tables ) ); - case SatfuncFamily::II: - return fun::map( famII, fun::iota( num_tables ) ); - default: - throw std::domain_error("No valid saturation keyword family specified"); - } - } - - /* find the maximum output values of the water-oil system. the maximum oil - * relperm is possibly wrong because we have two oil relperms in a threephase - * system. the documentation is very ambiguos here, though: it says that the - * oil relperm at the maximum oil saturation is scaled according to maximum - * specified the KRO keyword. the first part of the statement points at - * scaling the resultant threephase oil relperm, but then the gas saturation - * is not taken into account which means that some twophase quantity must be - * scaled. - */ - static std::vector< double > findMaxPcog( const TableManager* tm ) { - const auto num_tables = tm->getTabdims()->getNumSatTables(); - const auto& sgofTables = tm->getSgofTables(); - const auto& sgfnTables = tm->getSgfnTables(); - - const auto& famI = [&sgofTables]( int i ) { - return sgofTables.getTable< SgofTable >( i ).getPcogColumn().front(); - }; - - const auto& famII = [&sgfnTables]( int i ) { - return sgfnTables.getTable< SgfnTable >( i ).getPcogColumn().back(); - }; - - switch( getSaturationFunctionFamily( tm ) ) { - case SatfuncFamily::I: - return fun::map( famI, fun::iota( num_tables ) ); - case SatfuncFamily::II: - return fun::map( famII, fun::iota( num_tables ) ); - default: - throw std::domain_error("No valid saturation keyword family specified"); - } - } - - static std::vector< double > findMaxPcow( const TableManager* tm ) { - const auto num_tables = tm->getTabdims()->getNumSatTables(); - const auto& swofTables = tm->getSwofTables(); - const auto& swfnTables = tm->getSwfnTables(); - - const auto& famI = [&swofTables]( int i ) { - return swofTables.getTable< SwofTable >( i ).getPcowColumn().front(); - }; - - const auto& famII = [&swfnTables]( int i ) { - return swfnTables.getTable< SwfnTable >( i ).getPcowColumn().front(); - }; - - switch( getSaturationFunctionFamily( tm ) ) { - case SatfuncFamily::I: - return fun::map( famI, fun::iota( num_tables ) ); - case SatfuncFamily::II: - return fun::map( famII, fun::iota( num_tables ) ); - default: - throw std::domain_error("No valid saturation keyword family specified"); - } - } - - static std::vector< double > findMaxKro( const TableManager* tm ) { - const auto num_tables = tm->getTabdims()->getNumSatTables(); - const auto& swofTables = tm->getSwofTables(); - const auto& sof3Tables = tm->getSof3Tables(); - - const auto& famI = [&swofTables]( int i ) { - return swofTables.getTable< SwofTable >( i ).getKrowColumn().front(); - }; - - const auto& famII = [&sof3Tables]( int i ) { - return sof3Tables.getTable< Sof3Table >( i ).getKrowColumn().back(); - }; - - switch( getSaturationFunctionFamily( tm ) ) { - case SatfuncFamily::I: - return fun::map( famI, fun::iota( num_tables ) ); - case SatfuncFamily::II: - return fun::map( famII, fun::iota( num_tables ) ); - default: - throw std::domain_error("No valid saturation keyword family specified"); - } - } - - static std::vector< double > findMaxKrw( const TableManager* tm ) { - const auto num_tables = tm->getTabdims()->getNumSatTables(); - const auto& swofTables = tm->getSwofTables(); - const auto& swfnTables = tm->getSwfnTables(); - - const auto& famI = [&swofTables]( int i ) { - return swofTables.getTable< SwofTable >( i ).getKrwColumn().back(); - }; - - const auto& famII = [&swfnTables]( int i ) { - return swfnTables.getTable< SwfnTable >( i ).getKrwColumn().back(); - }; - - switch( getSaturationFunctionFamily( tm ) ) { - case SatfuncFamily::I: - return fun::map( famI, fun::iota( num_tables ) ); - case SatfuncFamily::II: - return fun::map( famII, fun::iota( num_tables ) ); - default: - throw std::domain_error("No valid saturation keyword family specified"); - } - } - - static double selectValue( const TableContainer& depthTables, - int tableIdx, - const std::string& columnName, - double cellDepth, - double fallbackValue, - bool useOneMinusTableValue) { - - if( tableIdx < 0 ) return fallbackValue; - - const auto& table = depthTables.getTable( tableIdx ); - - if( tableIdx >= int( depthTables.size() ) ) - throw std::invalid_argument("Not enough tables!"); - - // evaluate the table at the cell depth - const double value = table.evaluate( columnName, cellDepth ); - - // a column can be fully defaulted. In this case, eval() returns a NaN - // and we have to use the data from saturation tables - if( !std::isfinite( value ) ) return fallbackValue; - if( useOneMinusTableValue ) return 1 - value; - return value; - } - - static std::vector< double > satnumApply( size_t size, - const std::string& columnName, - const std::vector< double >& fallbackValues, - const TableManager* tableManager, - const EclipseGrid* eclipseGrid, - const GridProperties* intGridProperties, - bool useOneMinusTableValue ) { - - - std::vector< double > values( size, 0 ); - auto tabdims = tableManager->getTabdims(); - - const auto& satnum = intGridProperties->getKeyword("SATNUM"); - const auto& endnum = intGridProperties->getKeyword("ENDNUM"); - int numSatTables = tabdims->getNumSatTables(); - - satnum.checkLimits( 1 , numSatTables ); - - // All table lookup assumes three-phase model - assert( tableManager->getNumPhases() == 3 ); - - // acctually assign the defaults. if the ENPVD keyword was specified in the deck, - // this currently cannot be done because we would need the Z-coordinate of the - // cell and we would need to know how the simulator wants to interpolate between - // sampling points. Both of these are outside the scope of opm-parser, so we just - // assign a NaN in this case... - const bool useEnptvd = tableManager->useEnptvd(); - const auto& enptvdTables = tableManager->getEnptvdTables(); - - const auto gridsize = eclipseGrid->getCartesianSize(); - for( size_t cellIdx = 0; cellIdx < gridsize; cellIdx++ ) { - int satTableIdx = satnum.iget( cellIdx ) - 1; - int endNum = endnum.iget( cellIdx ) - 1; - double cellDepth = eclipseGrid->getCellDepth( cellIdx ); - - - values[cellIdx] = selectValue(enptvdTables, - (useEnptvd && endNum >= 0) ? endNum : -1, - columnName, - cellDepth, - fallbackValues[ satTableIdx ], - useOneMinusTableValue); - } - - return values; - } - - static std::vector< double > imbnumApply( size_t size, - const std::string& columnName, - const std::vector< double >& fallBackValues, - const TableManager* tableManager, - const EclipseGrid* eclipseGrid, - const GridProperties* intGridProperties, - bool useOneMinusTableValue ) { - - std::vector< double > values( size, 0 ); - - const auto& imbnum = intGridProperties->getKeyword("IMBNUM"); - const auto& endnum = intGridProperties->getKeyword("ENDNUM"); - - auto tabdims = tableManager->getTabdims(); - const int numSatTables = tabdims->getNumSatTables(); - - imbnum.checkLimits( 1 , numSatTables ); - // acctually assign the defaults. if the ENPVD keyword was specified in the deck, - // this currently cannot be done because we would need the Z-coordinate of the - // cell and we would need to know how the simulator wants to interpolate between - // sampling points. Both of these are outside the scope of opm-parser, so we just - // assign a NaN in this case... - const bool useImptvd = tableManager->useImptvd(); - const TableContainer& imptvdTables = tableManager->getImptvdTables(); - const auto gridsize = eclipseGrid->getCartesianSize(); - for( size_t cellIdx = 0; cellIdx < gridsize; cellIdx++ ) { - int imbTableIdx = imbnum.iget( cellIdx ) - 1; - int endNum = endnum.iget( cellIdx ) - 1; - double cellDepth = eclipseGrid->getCellDepth( cellIdx ); - - values[cellIdx] = selectValue(imptvdTables, - (useImptvd && endNum >= 0) ? endNum : -1, - columnName, - cellDepth, - fallBackValues[imbTableIdx], - useOneMinusTableValue); - } - - return values; - } - - std::vector< double > SGLEndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid* eclipseGrid, - GridProperties* intGridProperties ) - { - const auto min_gas = findMinGasSaturation( tableManager ); - return satnumApply( size, "SGCO", min_gas, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > ISGLEndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid* eclipseGrid, - GridProperties* intGridProperties ) - { - const auto min_gas = findMinGasSaturation( tableManager ); - return imbnumApply( size, "SGCO", min_gas, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > SGUEndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid* eclipseGrid, - GridProperties* intGridProperties ) - { - const auto max_gas = findMaxGasSaturation( tableManager ); - return satnumApply( size, "SGMAX", max_gas, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > ISGUEndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid* eclipseGrid, - GridProperties* intGridProperties ) - { - const auto max_gas = findMaxGasSaturation( tableManager ); - return imbnumApply( size, "SGMAX", max_gas, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > SWLEndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid* eclipseGrid, - GridProperties* intGridProperties ) - { - const auto min_water = findMinWaterSaturation( tableManager ); - return satnumApply( size, "SWCO", min_water, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > ISWLEndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid * eclipseGrid, - GridProperties* intGridProperties ) - { - const auto min_water = findMinWaterSaturation( tableManager ); - return imbnumApply( size, "SWCO", min_water, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > SWUEndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid * eclipseGrid, - GridProperties* intGridProperties ) - { - const auto max_water = findMaxWaterSaturation( tableManager ); - return satnumApply( size, "SWMAX", max_water, tableManager, eclipseGrid, - intGridProperties, true ); - } - - std::vector< double > ISWUEndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid * eclipseGrid, - GridProperties* intGridProperties ) - { - const auto max_water = findMaxWaterSaturation( tableManager ); - return imbnumApply( size, "SWMAX", max_water, tableManager, eclipseGrid, - intGridProperties, true); - } - - std::vector< double > SGCREndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid * eclipseGrid, - GridProperties* intGridProperties ) - { - const auto crit_gas = findCriticalGas( tableManager ); - return satnumApply( size, "SGCRIT", crit_gas, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > ISGCREndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid * eclipseGrid, - GridProperties* intGridProperties ) - { - const auto crit_gas = findCriticalGas( tableManager ); - return imbnumApply( size, "SGCRIT", crit_gas, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > SOWCREndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid * eclipseGrid, - GridProperties* intGridProperties ) - { - const auto oil_water = findCriticalOilWater( tableManager ); - return satnumApply( size, "SOWCRIT", oil_water, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > ISOWCREndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid * eclipseGrid, - GridProperties* intGridProperties ) - { - const auto oil_water = findCriticalOilWater( tableManager ); - return imbnumApply( size, "SOWCRIT", oil_water, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > SOGCREndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid * eclipseGrid, - GridProperties* intGridProperties ) - { - const auto crit_oil_gas = findCriticalOilGas( tableManager ); - return satnumApply( size, "SOGCRIT", crit_oil_gas, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > ISOGCREndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid * eclipseGrid, - GridProperties* intGridProperties ) - { - const auto crit_oil_gas = findCriticalOilGas( tableManager ); - return imbnumApply( size, "SOGCRIT", crit_oil_gas, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > SWCREndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid * eclipseGrid, - GridProperties* intGridProperties ) - { - const auto crit_water = findCriticalWater( tableManager ); - return satnumApply( size, "SWCRIT", crit_water, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > ISWCREndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid * eclipseGrid, - GridProperties* intGridProperties ) - { - const auto crit_water = findCriticalWater( tableManager ); - return imbnumApply( size, "SWCRIT", crit_water, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > PCWEndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid * eclipseGrid, - GridProperties* intGridProperties ) - { - const auto max_pcow = findMaxPcow( tableManager ); - return satnumApply( size, "PCW", max_pcow, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > IPCWEndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid * eclipseGrid, - GridProperties* intGridProperties ) - { - const auto max_pcow = findMaxPcow( tableManager ); - return imbnumApply( size, "IPCW", max_pcow, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > PCGEndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid * eclipseGrid, - GridProperties* intGridProperties ) - { - const auto max_pcog = findMaxPcog( tableManager ); - return satnumApply( size, "PCG", max_pcog, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > IPCGEndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid * eclipseGrid, - GridProperties* intGridProperties ) - { - const auto max_pcog = findMaxPcog( tableManager ); - return imbnumApply( size, "IPCG", max_pcog, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > KRWEndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid * eclipseGrid, - GridProperties* intGridProperties ) - { - const auto max_krw = findMaxKrw( tableManager ); - return satnumApply( size, "KRW", max_krw, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > IKRWEndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid * eclipseGrid, - GridProperties* intGridProperties ) - { - const auto krwr = findKrwr( tableManager ); - return imbnumApply( size, "IKRW", krwr, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > KRWREndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid * eclipseGrid, - GridProperties* intGridProperties ) - { - const auto krwr = findKrwr( tableManager ); - return satnumApply( size, "KRWR", krwr, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > IKRWREndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid * eclipseGrid, - GridProperties* intGridProperties ) - { - const auto krwr = findKrwr( tableManager ); - return imbnumApply( size, "IKRWR", krwr, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > KROEndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid * eclipseGrid, - GridProperties* intGridProperties ) - { - const auto max_kro = findMaxKro( tableManager ); - return satnumApply( size, "KRO", max_kro, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > IKROEndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid * eclipseGrid, - GridProperties* intGridProperties ) - { - const auto max_kro = findMaxKro( tableManager ); - return imbnumApply( size, "IKRO", max_kro, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > KRORWEndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid * eclipseGrid, - GridProperties* intGridProperties ) - { - const auto krorw = findKrorw( tableManager ); - return satnumApply( size, "KRORW", krorw, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > IKRORWEndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid * eclipseGrid, - GridProperties* intGridProperties ) - { - const auto krorw = findKrorw( tableManager ); - return imbnumApply( size, "IKRORW", krorw, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > KRORGEndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid * eclipseGrid, - GridProperties* intGridProperties ) - { - const auto krorg = findKrorg( tableManager ); - return satnumApply( size, "KRORG", krorg, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > IKRORGEndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid * eclipseGrid, - GridProperties* intGridProperties ) - { - const auto krorg = findKrorg( tableManager ); - return imbnumApply( size, "IKRORG", krorg, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > KRGEndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid * eclipseGrid, - GridProperties* intGridProperties ) - { - const auto max_krg = findMaxKrg( tableManager ); - return satnumApply( size, "KRG", max_krg, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > IKRGEndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid * eclipseGrid, - GridProperties* intGridProperties ) - { - const auto max_krg = findMaxKrg( tableManager ); - return imbnumApply( size, "IKRG", max_krg, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > KRGREndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid * eclipseGrid, - GridProperties* intGridProperties ) - { - const auto krgr = findKrgr( tableManager ); - return satnumApply( size, "KRGR", krgr, tableManager, eclipseGrid, - intGridProperties, false ); - } - - std::vector< double > IKRGREndpoint( size_t size, - const TableManager * tableManager, - const EclipseGrid* eclipseGrid, - GridProperties* intGridProperties ) - { - const auto krgr = findKrgr( tableManager ); - return imbnumApply( size, "IKRGR", krgr, tableManager, eclipseGrid, - intGridProperties, false ); - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/SatfuncPropertyInitializers.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/SatfuncPropertyInitializers.hpp deleted file mode 100644 index 2d20392825..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/SatfuncPropertyInitializers.hpp +++ /dev/null @@ -1,202 +0,0 @@ -/* - Copyright 2014 Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ -#ifndef ECLIPSE_SATFUNCPROPERTY_INITIALIZERS_HPP -#define ECLIPSE_SATFUNCPROPERTY_INITIALIZERS_HPP - -#include -#include - -#include - -namespace Opm { - - class EclipseGrid; - class TableManager; - - std::vector SGLEndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector ISGLEndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector SGUEndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector ISGUEndpoint(size_t, const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector SWLEndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector ISWLEndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector SWUEndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector ISWUEndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector SGCREndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector ISGCREndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector SOWCREndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector ISOWCREndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector SOGCREndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector ISOGCREndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector SWCREndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector ISWCREndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector PCWEndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector IPCWEndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector PCGEndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector IPCGEndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector KRWEndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector IKRWEndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector KRWREndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector IKRWREndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector KROEndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector IKROEndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector KRORWEndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector IKRORWEndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector KRORGEndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector IKRORGEndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector KRGEndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector IKRGEndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector KRGREndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); - - std::vector IKRGREndpoint(size_t, - const TableManager*, - const EclipseGrid*, - GridProperties*); -} - -#endif // ECLIPSE_SATFUNCPROPERTY_INITIALIZERS_HPP diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/TransMult.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/TransMult.cpp deleted file mode 100644 index ac1203c9d2..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/TransMult.cpp +++ /dev/null @@ -1,144 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include - -#include -#include -#include -#include -#include -#include - - -namespace Opm { - - TransMult::TransMult(size_t nx , size_t ny , size_t nz) : - m_nx(nx), - m_ny(ny), - m_nz(nz) - { - m_names[FaceDir::XPlus] = "MULTX"; - m_names[FaceDir::YPlus] = "MULTY"; - m_names[FaceDir::ZPlus] = "MULTZ"; - m_names[FaceDir::XMinus] = "MULTX-"; - m_names[FaceDir::YMinus] = "MULTY-"; - m_names[FaceDir::ZMinus] = "MULTZ-"; - } - - - - void TransMult::assertIJK(size_t i , size_t j , size_t k) const { - if ((i >= m_nx) || (j >= m_ny) || (k >= m_nz)) - throw std::invalid_argument("Invalid ijk"); - } - - - size_t TransMult::getGlobalIndex(size_t i , size_t j , size_t k) const { - assertIJK(i,j,k); - return i + j*m_nx + k*m_nx*m_ny; - } - - - double TransMult::getMultiplier(size_t globalIndex, FaceDir::DirEnum faceDir) const { - if (globalIndex < m_nx * m_ny * m_nz) - return getMultiplier__(globalIndex , faceDir); - else - throw std::invalid_argument("Invalid global index"); - } - - double TransMult::getMultiplier__(size_t globalIndex, FaceDir::DirEnum faceDir) const { - if (hasDirectionProperty( faceDir )) { - return m_trans.at(faceDir).iget( globalIndex ); - } else - return 1.0; - } - - - - - double TransMult::getMultiplier(size_t i , size_t j , size_t k, FaceDir::DirEnum faceDir) const { - size_t globalIndex = getGlobalIndex(i,j,k); - return getMultiplier__( globalIndex , faceDir ); - } - - double TransMult::getRegionMultiplier(size_t globalCellIndex1, size_t globalCellIndex2, FaceDir::DirEnum faceDir) const { - if (m_multregtScanner == nullptr) - throw new std::logic_error("MULTREGTScanner has not been initialized."); - return m_multregtScanner->getRegionMultiplier(globalCellIndex1, globalCellIndex2, faceDir); - } - - bool TransMult::hasDirectionProperty(FaceDir::DirEnum faceDir) const { - return m_trans.count(faceDir) == 1; - } - - void TransMult::insertNewProperty(FaceDir::DirEnum faceDir) { - GridPropertySupportedKeywordInfo kwInfo(m_names[faceDir] , 1.0 , "1"); - GridProperty< double > prop( m_nx, m_ny, m_nz, kwInfo ); - m_trans.emplace( faceDir, std::move( prop ) ); - } - - - GridProperty& TransMult::getDirectionProperty(FaceDir::DirEnum faceDir) { - if (m_trans.count(faceDir) == 0) - insertNewProperty(faceDir); - - return m_trans.at( faceDir ); - } - - void TransMult::applyMULT(const GridProperty& srcProp, FaceDir::DirEnum faceDir) - { - auto& dstProp = getDirectionProperty(faceDir); - - const std::vector &srcData = srcProp.getData(); - for (size_t i = 0; i < srcData.size(); ++i) - dstProp.multiplyValueAtIndex(i, srcData[i]); - } - - - void TransMult::applyMULTFLT(const Fault& fault) { - double transMult = fault.getTransMult(); - - for (auto face_iter = fault.begin(); face_iter != fault.end(); ++face_iter) { - std::shared_ptr face = *face_iter; - FaceDir::DirEnum faceDir = face->getDir(); - auto& multProperty = getDirectionProperty(faceDir); - - for (auto cell_iter = face->begin(); cell_iter != face->end(); ++cell_iter) { - size_t globalIndex = *cell_iter; - multProperty.multiplyValueAtIndex( globalIndex , transMult); - } - } - } - - - void TransMult::applyMULTFLT(const FaultCollection& faults) { - for (size_t faultIndex = 0; faultIndex < faults.size(); faultIndex++) { - auto& fault = faults.getFault(faultIndex); - applyMULTFLT(fault); - } - } - - - - void TransMult::createMultregtScanner(const Eclipse3DProperties& e3DProps, - std::vector< const DeckKeyword* > multregtKeywords) { - m_multregtScanner = new MULTREGTScanner(e3DProps, multregtKeywords); - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/TransMult.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/TransMult.hpp deleted file mode 100644 index d8c7a279e2..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/TransMult.hpp +++ /dev/null @@ -1,74 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -/** - This class implements a small container which holds the - transmissibility mulitpliers for all the faces in the grid. The - multipliers in this class are built up from the transmissibility - modifier keywords: - - {MULTX , MULTX- , MULTY , MULTY- , MULTZ , MULTZ-, MULTFLT , MULTREGT} - -*/ -#ifndef OPM_PARSER_TRANSMULT_HPP -#define OPM_PARSER_TRANSMULT_HPP - - -#include -#include -#include - -#include -#include - -namespace Opm { - template< typename > class GridProperty; - class Fault; - class FaultCollection; - - class TransMult { - - public: - TransMult(size_t nx , size_t ny , size_t nz); - double getMultiplier(size_t globalIndex, FaceDir::DirEnum faceDir) const; - double getMultiplier(size_t i , size_t j , size_t k, FaceDir::DirEnum faceDir) const; - double getRegionMultiplier( size_t globalCellIndex1, size_t globalCellIndex2, FaceDir::DirEnum faceDir) const; - void applyMULT(const GridProperty& srcMultProp, FaceDir::DirEnum faceDir); - void applyMULTFLT(const FaultCollection& faults); - void applyMULTFLT(const Fault& fault); - void createMultregtScanner(const Eclipse3DProperties& e3DProps, - std::vector multregtKeywords); - - private: - size_t getGlobalIndex(size_t i , size_t j , size_t k) const; - void assertIJK(size_t i , size_t j , size_t k) const; - double getMultiplier__(size_t globalIndex , FaceDir::DirEnum faceDir) const; - void insertNewProperty(FaceDir::DirEnum faceDir); - bool hasDirectionProperty(FaceDir::DirEnum faceDir) const; - GridProperty& getDirectionProperty(FaceDir::DirEnum faceDir); - - size_t m_nx , m_ny , m_nz; - std::map > m_trans; - std::map m_names; - MULTREGTScanner* m_multregtScanner = nullptr; - }; - -} - -#endif // OPM_PARSER_TRANSMULT_HPP diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/ADDREGTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/ADDREGTests.cpp deleted file mode 100644 index 98876c354a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/ADDREGTests.cpp +++ /dev/null @@ -1,298 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include -#include - -#define BOOST_TEST_MODULE EqualRegTests -#include -#include - -#include - -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - -static Opm::DeckPtr createDeckInvalidArray() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "ADDREG\n" - " MISSING 10 10 M / \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -static Opm::DeckPtr createDeckInvalidRegion() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "ADDREG\n" - " MISSING 10 10 MX / \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -static Opm::DeckPtr createDeckInvalidValue() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "MULTNUM \n" - " 1000*1 /\n" - "ADDREG\n" - " SATNUM 0.2 10 M / \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -static Opm::DeckPtr createDeckUnInitializedRegion() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "SATNUM \n" - " 1000*1 /\n" - "REGIONS\n" - "ADDREG\n" - " SATNUM 2 10 M / \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -static Opm::DeckPtr createDeckUnInitializedVector() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "MULTNUM \n" - " 1000*1 /\n" - "REGIONS\n" - "ADDREG\n" - " SATNUM 2 10 M / \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - - -static Opm::DeckPtr createValidIntDeck() { - const char *deckData = - "RUNSPEC\n" - "GRIDOPTS\n" - " 'YES' 2 /\n" - "\n" - "DIMENS\n" - " 5 5 1 /\n" - "GRID\n" - "DX\n" - "25*0.25 /\n" - "DY\n" - "25*0.25 /\n" - "DZ\n" - "25*0.25 /\n" - "TOPS\n" - "25*0.25 /\n" - "MULTNUM \n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "/\n" - "SATNUM\n" - " 25*1 \n" - "/\n" - "ADDREG\n" - " SATNUM 11 1 M / \n" - " SATNUM 20 2 / \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -static Opm::DeckPtr createValidPERMXDeck() { - const char *deckData = - "RUNSPEC\n" - "GRIDOPTS\n" - " 'YES' 2 /\n" - "\n" - "DIMENS\n" - " 5 5 1 /\n" - "GRID\n" - "DX\n" - "25*0.25 /\n" - "DY\n" - "25*0.25 /\n" - "DZ\n" - "25*0.25 /\n" - "TOPS\n" - "25*0.25 /\n" - "MULTNUM \n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "/\n" - "BOX\n" - " 1 2 1 5 1 1 / \n" - "PERMZ\n" - " 10*1 /\n" - "ENDBOX\n" - "BOX\n" - " 3 5 1 5 1 1 / \n" - "PERMZ\n" - " 15*2 /\n" - "ENDBOX\n" - "PERMX\n" - "25*1 /\n" - "ADDREG\n" - " PERMX 1 1 / \n" - " PERMX 3 2 / \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - - - - - - -BOOST_AUTO_TEST_CASE(InvalidArrayThrows) { - Opm::DeckPtr deck = createDeckInvalidArray(); - BOOST_CHECK_THROW( new Opm::EclipseState( *deck, Opm::ParseContext()) , std::invalid_argument ); -} - - -BOOST_AUTO_TEST_CASE(InvalidRegionThrows) { - Opm::DeckPtr deck = createDeckInvalidRegion(); - BOOST_CHECK_THROW( new Opm::EclipseState( *deck, Opm::ParseContext()) , std::invalid_argument ); -} - - -BOOST_AUTO_TEST_CASE(ExpectedIntThrows) { - Opm::DeckPtr deck = createDeckInvalidValue(); - BOOST_CHECK_THROW( new Opm::EclipseState( *deck, Opm::ParseContext()) , std::invalid_argument ); -} - - -BOOST_AUTO_TEST_CASE(UnInitializedRegionThrows) { - Opm::DeckPtr deck = createDeckUnInitializedRegion(); - BOOST_CHECK_THROW( new Opm::EclipseState( *deck, Opm::ParseContext()) , std::invalid_argument ); -} - - -BOOST_AUTO_TEST_CASE(UnInitializedVectorThrows) { - Opm::DeckPtr deck = createDeckUnInitializedVector(); - BOOST_CHECK_THROW( new Opm::EclipseState( *deck, Opm::ParseContext()) , std::invalid_argument ); -} - - - -BOOST_AUTO_TEST_CASE(IntSetCorrectly) { - Opm::DeckPtr deck = createValidIntDeck(); - Opm::TableManager tm(*deck); - Opm::EclipseGrid eg(deck); - Opm::Eclipse3DProperties props(*deck, tm, eg); - const auto& property = props.getIntGridProperty("SATNUM"); - - for (size_t j = 0; j < 5; j++) - for (size_t i = 0; i < 5; i++) { - if (i < 2) - BOOST_CHECK_EQUAL( 12 , property.iget(i,j,0)); - else - BOOST_CHECK_EQUAL( 21 , property.iget(i,j,0)); - } - -} - - -BOOST_AUTO_TEST_CASE(UnitAppliedCorrectly) { - Opm::DeckPtr deck = createValidPERMXDeck(); - Opm::TableManager tm(*deck); - Opm::EclipseGrid eg(deck); - Opm::Eclipse3DProperties props(*deck, tm, eg); - const auto& permx = props.getDoubleGridProperty("PERMX"); - - for (size_t j=0; j< 5; j++) - for (size_t i = 0; i < 5; i++) { - if (i < 2) - BOOST_CHECK_CLOSE( 2 * Opm::Metric::Permeability , permx.iget(i,j,0), 0.0001); - else - BOOST_CHECK_CLOSE( 4 * Opm::Metric::Permeability , permx.iget(i,j,0), 0.0001); - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/BoxManagerTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/BoxManagerTests.cpp deleted file mode 100644 index f777be20c9..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/BoxManagerTests.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include -#include - -#define BOOST_TEST_MODULE BoxManagerTests -#include -#include - -#include -#include - - -BOOST_AUTO_TEST_CASE(CreateBoxManager) { - Opm::BoxManager boxManager(10,10,10); - Opm::Box box(10,10,10); - - BOOST_CHECK( box.equal( *boxManager.getGlobalBox()) ); - BOOST_CHECK( box.equal( *boxManager.getActiveBox()) ); - BOOST_CHECK( !boxManager.getInputBox() ); - BOOST_CHECK( !boxManager.getKeywordBox() ); -} - - - - -BOOST_AUTO_TEST_CASE(TestInputBox) { - Opm::BoxManager boxManager(10,10,10); - Opm::Box inputBox( *boxManager.getGlobalBox() , 0,4,0,4,0,4); - - boxManager.setInputBox( 0,4,0,4,0,4 ); - BOOST_CHECK( inputBox.equal( *boxManager.getInputBox()) ); - BOOST_CHECK( inputBox.equal( *boxManager.getActiveBox()) ); - - - boxManager.endSection(); - BOOST_CHECK( !boxManager.getInputBox() ); - BOOST_CHECK( boxManager.getActiveBox()->equal( *boxManager.getGlobalBox())); -} - - - - -BOOST_AUTO_TEST_CASE(TestKeywordBox) { - Opm::BoxManager boxManager(10,10,10); - Opm::Box inputBox( *boxManager.getGlobalBox() , 0,4,0,4,0,4); - Opm::Box keywordBox( *boxManager.getGlobalBox() , 0,2,0,2,0,2); - - - boxManager.setInputBox( 0,4,0,4,0,4 ); - boxManager.setKeywordBox( 0,2,0,2,0,2 ); - BOOST_CHECK( inputBox.equal( *boxManager.getInputBox()) ); - BOOST_CHECK( keywordBox.equal( *boxManager.getKeywordBox()) ); - BOOST_CHECK( keywordBox.equal( *boxManager.getActiveBox()) ); - - // Must end keyword first - BOOST_CHECK_THROW( boxManager.endSection() , std::invalid_argument ); - - boxManager.endKeyword(); - BOOST_CHECK( inputBox.equal( *boxManager.getActiveBox()) ); - BOOST_CHECK( !boxManager.getKeywordBox() ); - - boxManager.endSection(); - BOOST_CHECK( !boxManager.getInputBox() ); - BOOST_CHECK( boxManager.getActiveBox()->equal( *boxManager.getGlobalBox())); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/BoxTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/BoxTests.cpp deleted file mode 100644 index 0e888cb517..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/BoxTests.cpp +++ /dev/null @@ -1,117 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include - -#define BOOST_TEST_MODULE BoxManagereTests - -#include -#include -#include - -#include - -BOOST_AUTO_TEST_CASE(CreateBox) { - BOOST_CHECK_THROW( new Opm::Box(-1,0,0) , std::invalid_argument); - BOOST_CHECK_THROW( new Opm::Box(10,0,10) , std::invalid_argument); - BOOST_CHECK_THROW( new Opm::Box(10,10,-1) , std::invalid_argument); - - Opm::Box box(4,3,2); - BOOST_CHECK_EQUAL( 24U , box.size() ); - BOOST_CHECK( box.isGlobal() ); - BOOST_CHECK_EQUAL( 4 , box.getDim(0) ); - BOOST_CHECK_EQUAL( 3 , box.getDim(1) ); - BOOST_CHECK_EQUAL( 2 , box.getDim(2) ); - - BOOST_CHECK_THROW( box.getDim(5) , std::invalid_argument); - - - { - size_t i,j,k; - const std::vector& indexList = box.getIndexList(); - - for (k=0; k < box.getDim(2); k++) { - for (j=0; j < box.getDim(1); j++) { - for (i=0; i < box.getDim(0); i++) { - size_t g = i + j*box.getDim(0) + k*box.getDim(0)*box.getDim(1); - BOOST_CHECK_EQUAL( indexList[g] , g); - - } - } - } - } -} - - - -BOOST_AUTO_TEST_CASE(CreateSubBox) { - Opm::Box globalBox( 10,10,10 ); - - BOOST_CHECK_THROW( new Opm::Box( globalBox , -1 , 9 , 1 , 8 , 1, 8) , std::invalid_argument); // Negative throw - BOOST_CHECK_THROW( new Opm::Box( globalBox , 1 , 19 , 1 , 8 , 1, 8) , std::invalid_argument); // Bigger than global: throw - BOOST_CHECK_THROW( new Opm::Box( globalBox , 9 , 1 , 1 , 8 , 1, 8) , std::invalid_argument); // Inverted order: throw - - Opm::Box subBox1(globalBox , 0,9,0,9,0,9); - BOOST_CHECK( subBox1.isGlobal()); - - - Opm::Box subBox2(globalBox , 1,3,1,4,1,5); - BOOST_CHECK( !subBox2.isGlobal()); - BOOST_CHECK_EQUAL( 60U , subBox2.size() ); - - { - size_t i,j,k; - size_t d = 0; - const std::vector& indexList = subBox2.getIndexList(); - - for (k=0; k < subBox2.getDim(2); k++) { - for (j=0; j < subBox2.getDim(1); j++) { - for (i=0; i < subBox2.getDim(0); i++) { - - size_t g = (i + 1) + (j + 1)*globalBox.getDim(0) + (k + 1)*globalBox.getDim(0)*globalBox.getDim(1); - BOOST_CHECK_EQUAL( indexList[d] , g); - d++; - } - } - } - } -} - - -BOOST_AUTO_TEST_CASE(BoxEqual) { - Opm::Box globalBox1( 10,10,10 ); - Opm::Box globalBox2( 10,10,10 ); - Opm::Box globalBox3( 10,10,11 ); - - Opm::Box globalBox4( 20,20,20 ); - Opm::Box subBox1( globalBox1 , 0 , 9 , 0 , 9 , 0, 9); - Opm::Box subBox4( globalBox4 , 0 , 9 , 0 , 9 , 0, 9); - Opm::Box subBox5( globalBox4 , 10 , 19 , 10 , 19 , 10, 19); - - BOOST_CHECK( globalBox1.equal( globalBox2 )); - BOOST_CHECK( !globalBox1.equal( globalBox3 )); - BOOST_CHECK( globalBox1.equal( subBox1 )); - - BOOST_CHECK( !globalBox4.equal( subBox4 )); - BOOST_CHECK( !subBox4.equal( subBox5 )); -} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/CMakeLists.txt deleted file mode 100644 index 16e423313a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -foreach(tapp EclipseGridTests MULTREGTScannerTests GridPropertyTests - FaceDirTests GridPropertiesTests BoxTests PORVTests - BoxManagerTests TransMultTests FaultTests - EqualRegTests MultiRegTests ADDREGTests CopyRegTests - SatfuncPropertyInitializersTests) - opm_add_test(run${tapp} SOURCES ${tapp}.cpp - LIBRARIES opmparser ${Boost_LIBRARIES}) -endforeach() diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/CopyRegTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/CopyRegTests.cpp deleted file mode 100644 index ba8cac39c6..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/CopyRegTests.cpp +++ /dev/null @@ -1,231 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include -#include - -#define BOOST_TEST_MODULE CopyRegTests -#include -#include - - -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - - -static Opm::DeckPtr createDeckInvalidArray1() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "SATNUM\n" - " 1000*1 /\n" - "COPYREG\n" - " MISSING SATNUM 10 M / \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - -static Opm::DeckPtr createDeckInvalidArray2() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "SATNUM\n" - " 1000*1 /\n" - "COPYREG\n" - " SATNUM MISSING 10 M / \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -static Opm::DeckPtr createDeckInvalidTypeMismatch() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "SATNUM\n" - " 1000*1 /\n" - "COPYREG\n" - " SATNUM PERMX 10 M / \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - - -static Opm::DeckPtr createDeckInvalidRegion() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "SATNUM\n" - " 1000*1 /\n" - "COPYREG\n" - " SATNUM FLUXNUM 10 MX / \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - - - -static Opm::DeckPtr createDeckUnInitialized() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "REGIONS\n" - "COPYREG\n" - " SATNUM FLUXNUM 10 M / \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -static Opm::DeckPtr createValidIntDeck() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 5 5 1 /\n" - "GRID\n" - "DX\n" - "25*0.25 /\n" - "DY\n" - "25*0.25 /\n" - "DZ\n" - "25*0.25 /\n" - "TOPS\n" - "25*0.25 /\n" - "MULTNUM \n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "/\n" - "SATNUM\n" - " 25*10 /\n" - "FLUXNUM\n" - " 25*3 /\n" - "COPYREG\n" - " SATNUM FLUXNUM 1 M / \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - - - -BOOST_AUTO_TEST_CASE(InvalidArrayThrows1) { - Opm::DeckPtr deck = createDeckInvalidArray1(); - BOOST_CHECK_THROW( new Opm::EclipseState( *deck, Opm::ParseContext()) , std::invalid_argument ); -} - -BOOST_AUTO_TEST_CASE(InvalidArrayThrows2) { - Opm::DeckPtr deck = createDeckInvalidArray2(); - BOOST_CHECK_THROW( new Opm::EclipseState( *deck, Opm::ParseContext()) , std::invalid_argument ); -} - - - -BOOST_AUTO_TEST_CASE(InvalidRegionThrows) { - Opm::DeckPtr deck = createDeckInvalidRegion(); - BOOST_CHECK_THROW( new Opm::EclipseState( *deck, Opm::ParseContext()) , std::invalid_argument ); -} - - - - -BOOST_AUTO_TEST_CASE(UnInitializedVectorThrows) { - Opm::DeckPtr deck = createDeckUnInitialized(); - BOOST_CHECK_THROW( new Opm::EclipseState( *deck, Opm::ParseContext()) , std::invalid_argument ); -} - - -BOOST_AUTO_TEST_CASE(TypeMismatchThrows) { - Opm::DeckPtr deck = createDeckInvalidTypeMismatch(); - BOOST_CHECK_THROW( new Opm::EclipseState( *deck, Opm::ParseContext()) , std::invalid_argument ); -} - - - -BOOST_AUTO_TEST_CASE(IntSetCorrectly) { - Opm::DeckPtr deck = createValidIntDeck(); - Opm::TableManager tm(*deck); - Opm::EclipseGrid eg(deck); - Opm::Eclipse3DProperties props(*deck, tm, eg); - auto& property = props.getIntGridProperty("FLUXNUM"); - - for (size_t j = 0; j < 5; j++) - for (size_t i = 0; i < 5; i++) { - if (i < 2) - BOOST_CHECK_EQUAL( 10 , property.iget(i,j,0)); - else - BOOST_CHECK_EQUAL( 3 , property.iget(i,j,0)); - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/EclipseGridTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/EclipseGridTests.cpp deleted file mode 100644 index 9755b43cd9..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/EclipseGridTests.cpp +++ /dev/null @@ -1,1101 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include -#include - -#define BOOST_TEST_MODULE EclipseGridTests -#include -#include - -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include - - -BOOST_AUTO_TEST_CASE(CreateMissingDIMENS_throws) { - Opm::DeckPtr deck(new Opm::Deck()); - deck->addKeyword( Opm::DeckKeyword( "RUNSPEC" ) ); - deck->addKeyword( Opm::DeckKeyword( "GRID" ) ); - deck->addKeyword( Opm::DeckKeyword( "EDIT" ) ); - - BOOST_CHECK_THROW(new Opm::EclipseGrid( deck ) , std::invalid_argument); -} - -static Opm::DeckPtr createDeckHeaders() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()); -} - -static Opm::DeckPtr createDeckDIMENS() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 13 17 19/\n" - "GRID\n" - "EDIT\n" - "\n"; - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()); -} - -static Opm::DeckPtr createDeckSPECGRID() { - const char *deckData = - "GRID\n" - "SPECGRID \n" - " 13 17 19 / \n" - "COORD\n" - " 726*1 / \n" - "ZCORN \n" - " 8000*1 / \n" - "ACTNUM \n" - " 1000*1 / \n" - "EDIT\n" - "\n"; - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()); -} - -static Opm::DeckPtr createDeckMissingDIMS() { - const char *deckData = - "RUNSPEC\n" - "\n" - "GRID\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - -BOOST_AUTO_TEST_CASE(MissingDimsThrows) { - Opm::DeckPtr deck = createDeckMissingDIMS(); - BOOST_CHECK_THROW( new Opm::EclipseGrid( deck ) , std::invalid_argument); -} - - -BOOST_AUTO_TEST_CASE(HasGridKeywords) { - Opm::DeckPtr deck = createDeckHeaders(); - BOOST_CHECK( !Opm::EclipseGrid::hasCornerPointKeywords( *deck )); - BOOST_CHECK( !Opm::EclipseGrid::hasCartesianKeywords( *deck )); -} - - -BOOST_AUTO_TEST_CASE(CreateGridNoCells) { - Opm::DeckPtr deckptr = createDeckHeaders(); - const Opm::Deck& deck = *deckptr; - { - Opm::EclipseGrid* gridptr = nullptr; - BOOST_CHECK_THROW( gridptr = new Opm::EclipseGrid( deck ) , std::invalid_argument); - delete gridptr; - } - const Opm::GridDims grid(deck); - BOOST_CHECK_EQUAL( 10 , grid.getNX()); - BOOST_CHECK_EQUAL( 10 , grid.getNY()); - BOOST_CHECK_EQUAL( 10 , grid.getNZ()); - BOOST_CHECK_EQUAL( 1000 , grid.getCartesianSize()); -} - -BOOST_AUTO_TEST_CASE(CheckGridIndex) { - Opm::EclipseGrid grid(17, 19, 41); // prime time - - auto v_start = grid.getIJK(0); - BOOST_CHECK_EQUAL(v_start[0], 0); - BOOST_CHECK_EQUAL(v_start[1], 0); - BOOST_CHECK_EQUAL(v_start[2], 0); - - auto v_end = grid.getIJK(17*19*41 - 1); - BOOST_CHECK_EQUAL(v_end[0], 16); - BOOST_CHECK_EQUAL(v_end[1], 18); - BOOST_CHECK_EQUAL(v_end[2], 40); - - auto v167 = grid.getIJK(167); - BOOST_CHECK_EQUAL(v167[0], 14); - BOOST_CHECK_EQUAL(v167[1], 9); - BOOST_CHECK_EQUAL(v167[2], 0); - BOOST_CHECK_EQUAL(grid.getGlobalIndex(14, 9, 0), 167); - - auto v5723 = grid.getIJK(5723); - BOOST_CHECK_EQUAL(v5723[0], 11); - BOOST_CHECK_EQUAL(v5723[1], 13); - BOOST_CHECK_EQUAL(v5723[2], 17); - BOOST_CHECK_EQUAL(grid.getGlobalIndex(11, 13, 17), 5723); - - BOOST_CHECK_EQUAL(17 * 19 * 41, grid.getCartesianSize()); -} - -static Opm::DeckPtr createCPDeck() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "COORD\n" - " 726*1 / \n" - "ZCORN \n" - " 8000*1 / \n" - "ACTNUM \n" - " 1000*1 / \n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -static Opm::DeckPtr createPinchedCPDeck() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "COORD\n" - " 726*1 / \n" - "ZCORN \n" - " 8000*1 / \n" - "ACTNUM \n" - " 1000*1 / \n" - "PINCH \n" - " 0.2 / \n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -static Opm::DeckPtr createMinpvDefaultCPDeck() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "COORD\n" - " 726*1 / \n" - "ZCORN \n" - " 8000*1 / \n" - "ACTNUM \n" - " 1000*1 / \n" - "MINPV \n" - " / \n" - "MINPVFIL \n" - " / \n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -static Opm::DeckPtr createMinpvCPDeck() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "COORD\n" - " 726*1 / \n" - "ZCORN \n" - " 8000*1 / \n" - "ACTNUM \n" - " 1000*1 / \n" - "MINPV \n" - " 10 / \n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - - -static Opm::DeckPtr createMinpvFilCPDeck() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "COORD\n" - " 726*1 / \n" - "ZCORN \n" - " 8000*1 / \n" - "ACTNUM \n" - " 1000*1 / \n" - "MINPVFIL \n" - " 20 / \n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -static Opm::DeckPtr createCARTDeck() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "DX\n" - "1000*0.25 /\n" - "DYV\n" - "10*0.25 /\n" - "DZ\n" - "1000*0.25 /\n" - "TOPS\n" - "100*0.25 /\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -static Opm::DeckPtr createCARTDeckDEPTHZ() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "DXV\n" - "10*0.25 /\n" - "DYV\n" - "10*0.25 /\n" - "DZV\n" - "10*0.25 /\n" - "DEPTHZ\n" - "121*0.25 /\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -static Opm::DeckPtr createCARTInvalidDeck() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "DX\n" - "1000*0.25 /\n" - "DYV\n" - "1000*0.25 /\n" - "DZ\n" - "1000*0.25 /\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - -BOOST_AUTO_TEST_CASE(CREATE_SIMPLE) { - Opm::EclipseGrid grid(10,20,30); - - BOOST_CHECK_EQUAL( grid.getNX() , 10 ); - BOOST_CHECK_EQUAL( grid.getNY() , 20 ); - BOOST_CHECK_EQUAL( grid.getNZ() , 30 ); - BOOST_CHECK_EQUAL( grid.getCartesianSize() , 6000 ); -} - -BOOST_AUTO_TEST_CASE(DEPTHZ_EQUAL_TOPS) { - Opm::DeckPtr deck1 = createCARTDeck(); - Opm::DeckPtr deck2 = createCARTDeckDEPTHZ(); - - std::shared_ptr grid1(new Opm::EclipseGrid( deck1 )); - std::shared_ptr grid2(new Opm::EclipseGrid( deck2 )); - - BOOST_CHECK( grid1->equal( *(grid2.get()) )); - - { - BOOST_CHECK_THROW( grid1->getCellVolume(1000) , std::invalid_argument); - BOOST_CHECK_THROW( grid1->getCellVolume(10,0,0) , std::invalid_argument); - BOOST_CHECK_THROW( grid1->getCellVolume(0,10,0) , std::invalid_argument); - BOOST_CHECK_THROW( grid1->getCellVolume(0,0,10) , std::invalid_argument); - - for (size_t g=0; g < 1000; g++) - BOOST_CHECK_CLOSE( grid1->getCellVolume(g) , 0.25*0.25*0.25 , 0.001); - - - for (size_t k= 0; k < 10; k++) - for (size_t j= 0; j < 10; j++) - for (size_t i= 0; i < 10; i++) - BOOST_CHECK_CLOSE( grid1->getCellVolume(i,j,k) , 0.25*0.25*0.25 , 0.001 ); - } - { - BOOST_CHECK_THROW( grid1->getCellCenter(1000) , std::invalid_argument); - BOOST_CHECK_THROW( grid1->getCellCenter(10,0,0) , std::invalid_argument); - BOOST_CHECK_THROW( grid1->getCellCenter(0,10,0) , std::invalid_argument); - BOOST_CHECK_THROW( grid1->getCellCenter(0,0,10) , std::invalid_argument); - - for (size_t k= 0; k < 10; k++) - for (size_t j= 0; j < 10; j++) - for (size_t i= 0; i < 10; i++) { - auto pos = grid1->getCellCenter(i,j,k); - - BOOST_CHECK_CLOSE( std::get<0>(pos) , i*0.25 + 0.125, 0.001); - BOOST_CHECK_CLOSE( std::get<1>(pos) , j*0.25 + 0.125, 0.001); - BOOST_CHECK_CLOSE( std::get<2>(pos) , k*0.25 + 0.125 + 0.25, 0.001); - - } - } -} - - - -BOOST_AUTO_TEST_CASE(HasCPKeywords) { - Opm::DeckPtr deck = createCPDeck(); - BOOST_CHECK( Opm::EclipseGrid::hasCornerPointKeywords( *deck )); - BOOST_CHECK( !Opm::EclipseGrid::hasCartesianKeywords( *deck )); -} - - -BOOST_AUTO_TEST_CASE(HasCartKeywords) { - Opm::DeckPtr deck = createCARTDeck(); - BOOST_CHECK( !Opm::EclipseGrid::hasCornerPointKeywords( *deck )); - BOOST_CHECK( Opm::EclipseGrid::hasCartesianKeywords( *deck )); -} - - -BOOST_AUTO_TEST_CASE(HasCartKeywordsDEPTHZ) { - Opm::DeckPtr deck = createCARTDeckDEPTHZ(); - BOOST_CHECK( !Opm::EclipseGrid::hasCornerPointKeywords( *deck )); - BOOST_CHECK( Opm::EclipseGrid::hasCartesianKeywords( *deck )); -} - - -BOOST_AUTO_TEST_CASE(HasINVALIDCartKeywords) { - Opm::DeckPtr deck = createCARTInvalidDeck(); - BOOST_CHECK( !Opm::EclipseGrid::hasCornerPointKeywords( *deck )); - BOOST_CHECK( !Opm::EclipseGrid::hasCartesianKeywords( *deck )); -} - - - - - -BOOST_AUTO_TEST_CASE(CreateMissingGRID_throws) { - auto deckptr = createDeckHeaders(); - const Opm::Deck& deck = *deckptr; - { - Opm::EclipseGrid* gridptr = nullptr; - BOOST_CHECK_THROW( gridptr = new Opm::EclipseGrid( deck ) , std::invalid_argument); - delete gridptr; - } -} - - -static Opm::DeckPtr createInvalidDXYZCARTDeck() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "DX\n" - "99*0.25 /\n" - "DY\n" - "1000*0.25 /\n" - "DZ\n" - "1000*0.25 /\n" - "TOPS\n" - "1000*0.25 /\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - - -BOOST_AUTO_TEST_CASE(CreateCartesianGRID) { - auto deckptr = createInvalidDXYZCARTDeck(); - const Opm::Deck& deck = *deckptr; - BOOST_CHECK_THROW(new Opm::EclipseGrid( deck ) , std::invalid_argument); -} - - -static Opm::DeckPtr createInvalidDXYZCARTDeckDEPTHZ() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "DX\n" - "100*0.25 /\n" - "DY\n" - "1000*0.25 /\n" - "DZ\n" - "1000*0.25 /\n" - "DEPTHZ\n" - "101*0.25 /\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - - -BOOST_AUTO_TEST_CASE(CreateCartesianGRIDDEPTHZ) { - auto deckptr = createInvalidDXYZCARTDeckDEPTHZ(); - const Opm::Deck& deck = *deckptr; - { - Opm::EclipseGrid* gridptr = nullptr; - BOOST_CHECK_THROW( gridptr = new Opm::EclipseGrid( deck ) , std::invalid_argument); - delete gridptr; - } -} - - -static Opm::DeckPtr createOnlyTopDZCartGrid() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 5 20 /\n" - "GRID\n" - "DX\n" - "1000*0.25 /\n" - "DY\n" - "1000*0.25 /\n" - "DZ\n" - "101*0.25 /\n" - "TOPS\n" - "110*0.25 /\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -static Opm::DeckPtr createInvalidDEPTHZDeck1 () { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 5 20 /\n" - "GRID\n" - "DXV\n" - "1000*0.25 /\n" - "DYV\n" - "5*0.25 /\n" - "DZV\n" - "20*0.25 /\n" - "DEPTHZ\n" - "66*0.25 /\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -BOOST_AUTO_TEST_CASE(CreateCartesianGRIDInvalidDEPTHZ1) { - auto deckptr = createInvalidDEPTHZDeck1(); - const Opm::Deck& deck = *deckptr; - { - Opm::EclipseGrid* gridptr = nullptr; - BOOST_CHECK_THROW( gridptr = new Opm::EclipseGrid( deck ) , std::invalid_argument); - delete gridptr; - } - -} - - -static Opm::DeckPtr createInvalidDEPTHZDeck2 () { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 5 20 /\n" - "GRID\n" - "DXV\n" - "10*0.25 /\n" - "DYV\n" - "5*0.25 /\n" - "DZV\n" - "20*0.25 /\n" - "DEPTHZ\n" - "67*0.25 /\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - -BOOST_AUTO_TEST_CASE(CreateCartesianGRIDInvalidDEPTHZ2) { - auto deckptr = createInvalidDEPTHZDeck2(); - const Opm::Deck& deck = *deckptr; - { - Opm::EclipseGrid* gridptr = nullptr; - BOOST_CHECK_THROW( gridptr = new Opm::EclipseGrid( deck ) , std::invalid_argument); - delete gridptr; - } - -} - - - -BOOST_AUTO_TEST_CASE(CreateCartesianGRIDOnlyTopLayerDZ) { - Opm::DeckPtr deck = createOnlyTopDZCartGrid(); - Opm::EclipseGrid grid( *deck ); - - BOOST_CHECK_EQUAL( 10 , grid.getNX( )); - BOOST_CHECK_EQUAL( 5 , grid.getNY( )); - BOOST_CHECK_EQUAL( 20 , grid.getNZ( )); - BOOST_CHECK_EQUAL( 1000 , grid.getNumActive()); -} - - - -BOOST_AUTO_TEST_CASE(AllActiveExportActnum) { - Opm::DeckPtr deck = createOnlyTopDZCartGrid(); - std::shared_ptr grid(new Opm::EclipseGrid( deck )); - - std::vector actnum; - - actnum.push_back(100); - - grid->exportACTNUM( actnum ); - BOOST_CHECK_EQUAL( 0U , actnum.size()); -} - - -BOOST_AUTO_TEST_CASE(CornerPointSizeMismatchCOORD) { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "COORD\n" - " 725*1 / \n" - "ZCORN \n" - " 8000*1 / \n" - "ACTNUM \n" - " 1000*1 / \n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - Opm::DeckConstPtr deck = parser->parseString(deckData, Opm::ParseContext()) ; - const auto& zcorn = deck->getKeyword("ZCORN"); - BOOST_CHECK_EQUAL( 8000U , zcorn.getDataSize( )); - - BOOST_CHECK_THROW(Opm::EclipseGrid( std::move(deck) ) , std::invalid_argument); -} - - -BOOST_AUTO_TEST_CASE(CornerPointSizeMismatchZCORN) { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "COORD\n" - " 726*1 / \n" - "ZCORN \n" - " 8001*1 / \n" - "ACTNUM \n" - " 1000*1 / \n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - Opm::DeckConstPtr deck = parser->parseString(deckData, Opm::ParseContext()) ; - BOOST_CHECK_THROW((void)Opm::EclipseGrid(deck), std::invalid_argument); -} - - -BOOST_AUTO_TEST_CASE(ResetACTNUM) { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "COORD\n" - " 726*1 / \n" - "ZCORN \n" - " 8000*1 / \n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - Opm::DeckConstPtr deck = parser->parseString(deckData, Opm::ParseContext()) ; - - Opm::EclipseGrid grid(deck); - BOOST_CHECK_EQUAL( 1000U , grid.getNumActive()); - std::vector actnum(1000); - actnum[0] = 1; - actnum[2] = 1; - actnum[4] = 1; - actnum[6] = 1; - grid.resetACTNUM( actnum.data() ); - BOOST_CHECK_EQUAL( 4U , grid.getNumActive() ); - { - std::vector full(grid.getCartesianSize()); - std::iota(full.begin(), full.end(), 0); - - auto compressed = grid.compressedVector( full ); - BOOST_CHECK_EQUAL( compressed.size() , 4U ); - BOOST_CHECK_EQUAL( compressed[0] , 0 ); - BOOST_CHECK_EQUAL( compressed[1] , 2 ); - BOOST_CHECK_EQUAL( compressed[2] , 4 ); - BOOST_CHECK_EQUAL( compressed[3] , 6 ); - } - { - const auto& activeMap = grid.getActiveMap( ); - BOOST_CHECK_EQUAL( 4U , activeMap.size() ); - BOOST_CHECK_EQUAL( 0 , activeMap[0] ); - BOOST_CHECK_EQUAL( 2 , activeMap[1] ); - BOOST_CHECK_EQUAL( 4 , activeMap[2] ); - BOOST_CHECK_EQUAL( 6 , activeMap[3] ); - } - - grid.resetACTNUM( NULL ); - BOOST_CHECK_EQUAL( 1000U , grid.getNumActive() ); - - { - const auto& activeMap = grid.getActiveMap( ); - BOOST_CHECK_EQUAL( 1000U , activeMap.size() ); - BOOST_CHECK_EQUAL( 0 , activeMap[0] ); - BOOST_CHECK_EQUAL( 1 , activeMap[1] ); - BOOST_CHECK_EQUAL( 2 , activeMap[2] ); - BOOST_CHECK_EQUAL( 999 , activeMap[999] ); - } -} - - -BOOST_AUTO_TEST_CASE(ACTNUM_BEST_EFFORT) { - const char *deckData1 = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "COORD\n" - " 726*1 / \n" - "ZCORN \n" - " 8000*1 / \n" - "ACTNUM \n" - " 100*1 /\n" - "EDIT\n" - "\n"; - - const char *deckData2 = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "COORD\n" - " 726*1 / \n" - "ZCORN \n" - " 8000*1 / \n" - "ACTNUM \n" - " 100*1 800*0 100*1 /\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - Opm::DeckConstPtr deck1 = parser->parseString(deckData1, Opm::ParseContext()) ; - Opm::DeckConstPtr deck2 = parser->parseString(deckData2, Opm::ParseContext()) ; - - Opm::EclipseGrid grid1(deck1); - // Actnum vector is too short - ignored - BOOST_CHECK_EQUAL( 1000U , grid1.getNumActive()); - - Opm::EclipseGrid grid2(deck2); - BOOST_CHECK_EQUAL( 200U , grid2.getNumActive()); -} - - - -BOOST_AUTO_TEST_CASE(LoadFromBinary) { - BOOST_CHECK_THROW(Opm::EclipseGrid( "No/does/not/exist" ) , std::invalid_argument); -} - - - - - - -BOOST_AUTO_TEST_CASE(ConstructorNORUNSPEC) { - const char *deckData = - "GRID\n" - "SPECGRID \n" - " 10 10 10 / \n" - "COORD\n" - " 726*1 / \n" - "ZCORN \n" - " 8000*1 / \n" - "ACTNUM \n" - " 1000*1 / \n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - Opm::DeckConstPtr deck1 = parser->parseString(deckData, Opm::ParseContext()) ; - Opm::DeckConstPtr deck2 = createCPDeck(); - - Opm::EclipseGrid grid1(deck1); - Opm::EclipseGrid grid2(deck2); - - BOOST_CHECK(grid1.equal( grid2 )); -} - - - -BOOST_AUTO_TEST_CASE(ConstructorNoSections) { - const char *deckData = - "DIMENS \n" - " 10 10 10 / \n" - "COORD \n" - " 726*1 / \n" - "ZCORN \n" - " 8000*1 / \n" - "ACTNUM \n" - " 1000*1 / \n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - Opm::DeckConstPtr deck1 = parser->parseString(deckData, Opm::ParseContext()) ; - Opm::DeckConstPtr deck2 = createCPDeck(); - - Opm::EclipseGrid grid1(deck1); - Opm::EclipseGrid grid2(deck2); - - BOOST_CHECK(grid1.equal( grid2 )); -} - - - -BOOST_AUTO_TEST_CASE(ConstructorNORUNSPEC_PINCH) { - Opm::DeckConstPtr deck1 = createCPDeck(); - Opm::DeckConstPtr deck2 = createPinchedCPDeck(); - - Opm::EclipseGrid grid1(deck1); - Opm::EclipseGrid grid2(deck2); - - BOOST_CHECK(!grid1.equal( grid2 )); - BOOST_CHECK(!grid1.isPinchActive()); - BOOST_CHECK_THROW(grid1.getPinchThresholdThickness(), std::logic_error); - BOOST_CHECK(grid2.isPinchActive()); - BOOST_CHECK_EQUAL(grid2.getPinchThresholdThickness(), 0.2); -} - - - - -BOOST_AUTO_TEST_CASE(ConstructorMINPV) { - Opm::DeckConstPtr deck1 = createCPDeck(); - Opm::DeckConstPtr deck2 = createMinpvDefaultCPDeck(); - Opm::DeckConstPtr deck3 = createMinpvCPDeck(); - Opm::DeckConstPtr deck4 = createMinpvFilCPDeck(); - - Opm::EclipseGrid grid1(deck1); - BOOST_CHECK_THROW(Opm::EclipseGrid grid2(deck2), std::invalid_argument); - Opm::EclipseGrid grid3(deck3); - Opm::EclipseGrid grid4(deck4); - - BOOST_CHECK(!grid1.equal( grid3 )); - BOOST_CHECK_EQUAL(grid1.getMinpvMode(), Opm::MinpvMode::ModeEnum::Inactive); - BOOST_CHECK_EQUAL(grid3.getMinpvMode(), Opm::MinpvMode::ModeEnum::EclSTD); - BOOST_CHECK_EQUAL(grid3.getMinpvValue(), 10.0); - BOOST_CHECK_EQUAL(grid4.getMinpvMode(), Opm::MinpvMode::ModeEnum::OpmFIL); - BOOST_CHECK_EQUAL(grid4.getMinpvValue(), 20.0); -} - - -static Opm::DeckPtr createActnumDeck() { - const char *deckData = "RUNSPEC\n" - "\n" - "DIMENS \n" - " 2 2 2 / \n" - "GRID\n" - "DXV\n" - " 2*0.25 /\n" - "DYV\n" - " 2*0.25 /\n" - "DZV\n" - " 2*0.25 /\n" - "DEPTHZ\n" - " 9*0.25 /\n" - "EQUALS\n" - " ACTNUM 0 1 1 1 1 1 1 /\n" - "/ \n" - "FLUXNUM\n" - "8*0 /\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()); -} - - -/// creates a deck where the top-layer has ACTNUM = 0 and two partially -/// overlapping 2*2*2 boxes in the center, one [5,7]^3 and one [6,8]^3 -/// have ACTNUM = 0 -static Opm::DeckPtr createActnumBoxDeck() { - const char *deckData = "RUNSPEC\n" - "\n" - "DIMENS \n" - " 10 10 10 / \n" - "GRID\n" - "DXV\n" - " 10*0.25 /\n" - "DYV\n" - " 10*0.25 /\n" - "DZV\n" - " 10*0.25 /\n" - "DEPTHZ\n" - " 121*0.25 /\n" - "EQUALS\n" - " ACTNUM 0 1 10 1 10 1 1 /\n" // disable top layer - "/ \n" - // start box - "BOX\n" - " 5 7 5 7 5 7 /\n" - "ACTNUM \n" - " 0 0 0 0 0 0 0 0 0\n" - " 0 0 0 0 0 0 0 0 0\n" - " 0 0 0 0 0 0 0 0 0\n" - "/\n" - "BOX\n" // don't need ENDBOX - " 6 8 6 8 6 8 /\n" - "ACTNUM \n" - " 27*0\n" - "/\n" - "ENDBOX\n" - // end box - "FLUXNUM\n" - "1000*0 /\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()); -} - -BOOST_AUTO_TEST_CASE(GridBoxActnum) { - Opm::DeckConstPtr deck = createActnumBoxDeck(); - Opm::EclipseState es(*deck, Opm::ParseContext()); - auto ep = es.get3DProperties(); - auto grid = es.getInputGrid(); - - BOOST_CHECK_NO_THROW(ep.getIntGridProperty("ACTNUM")); - - size_t active = 10 * 10 * 10 // 1000 - - (10 * 10 * 1) // - top layer - - ( 3 * 3 * 3) // - [5,7]^3 box - - ( 3 * 3 * 3) // - [6,8]^3 box - + ( 2 * 2 * 2); // + inclusion/exclusion - - BOOST_CHECK_NO_THROW(grid->getNumActive()); - BOOST_CHECK_EQUAL(grid->getNumActive(), active); - - BOOST_CHECK_EQUAL(es.getInputGrid()->getNumActive(), active); - - { - size_t active_index = 0; - // NB: The implementation of this test actually assumes that - // the loops are running with z as the outer and x as the - // inner direction. - for (size_t z = 0; z < grid->getNZ(); z++) { - for (size_t y = 0; y < grid->getNY(); y++) { - for (size_t x = 0; x < grid->getNX(); x++) { - if (z == 0) - BOOST_CHECK(!grid->cellActive(x, y, z)); - else if (x >= 4 && x <= 6 && y >= 4 && y <= 6 && z >= 4 && z <= 6) - BOOST_CHECK(!grid->cellActive(x, y, z)); - else if (x >= 5 && x <= 7 && y >= 5 && y <= 7 && z >= 5 && z <= 7) - BOOST_CHECK(!grid->cellActive(x, y, z)); - else { - size_t g = grid->getGlobalIndex( x,y,z ); - - BOOST_CHECK(grid->cellActive(x, y, z)); - BOOST_CHECK_EQUAL( grid->activeIndex(x,y,z) , active_index ); - BOOST_CHECK_EQUAL( grid->activeIndex(g) , active_index ); - - active_index++; - } - } - } - } - - BOOST_CHECK_THROW( grid->activeIndex(0,0,0) , std::invalid_argument ); - } -} - -BOOST_AUTO_TEST_CASE(GridActnumVia3D) { - Opm::DeckConstPtr deck = createActnumDeck(); - - Opm::EclipseState es(*deck, Opm::ParseContext()); - auto ep = es.get3DProperties(); - auto grid = es.getInputGrid(); - Opm::EclipseGrid grid2( *grid ); - - BOOST_CHECK_NO_THROW(ep.getIntGridProperty("ACTNUM")); - BOOST_CHECK_NO_THROW(grid->getNumActive()); - BOOST_CHECK_EQUAL(grid->getNumActive(), 2 * 2 * 2 - 1); - - BOOST_CHECK_NO_THROW(grid2.getNumActive()); - BOOST_CHECK_EQUAL(grid2.getNumActive(), 2 * 2 * 2 - 1); -} - -BOOST_AUTO_TEST_CASE(GridActnumViaState) { - Opm::DeckConstPtr deck = createActnumDeck(); - - BOOST_CHECK_NO_THROW(Opm::EclipseState(*deck, Opm::ParseContext())); - Opm::EclipseState es(*deck, Opm::ParseContext()); - BOOST_CHECK_EQUAL(es.getInputGrid()->getNumActive(), 2 * 2 * 2 - 1); -} - - -BOOST_AUTO_TEST_CASE(GridDimsSPECGRID) { - auto deckptr = createDeckSPECGRID(); - auto gd = Opm::GridDims(*deckptr); - BOOST_CHECK_EQUAL(gd.getNX(), 13); - BOOST_CHECK_EQUAL(gd.getNY(), 17); - BOOST_CHECK_EQUAL(gd.getNZ(), 19); -} - -BOOST_AUTO_TEST_CASE(GridDimsDIMENS) { - auto deckptr = createDeckDIMENS(); - auto gd = Opm::GridDims(*deckptr); - BOOST_CHECK_EQUAL(gd.getNX(), 13); - BOOST_CHECK_EQUAL(gd.getNY(), 17); - BOOST_CHECK_EQUAL(gd.getNZ(), 19); -} - - -BOOST_AUTO_TEST_CASE(ProcessedCopy) { - Opm::EclipseGrid gd(10,10,10); - std::vector zcorn; - std::vector actnum; - - gd.exportZCORN( zcorn ); - gd.exportACTNUM( actnum ); - - { - Opm::EclipseGrid gd2(gd , zcorn , actnum ); - BOOST_CHECK( gd.equal( gd2 )); - } - - zcorn[0] -= 1; - { - Opm::EclipseGrid gd2(gd , zcorn , actnum ); - BOOST_CHECK( !gd.equal( gd2 )); - } - - { - Opm::EclipseGrid gd2(gd , actnum ); - BOOST_CHECK( gd.equal( gd2 )); - } - - actnum.assign( gd.getCartesianSize() , 1); - actnum[0] = 0; - { - Opm::EclipseGrid gd2(gd , actnum ); - BOOST_CHECK( !gd.equal( gd2 )); - BOOST_CHECK( !gd2.cellActive( 0 )); - } -} - - -BOOST_AUTO_TEST_CASE(ZcornMapper) { - int nx = 3; - int ny = 4; - int nz = 5; - Opm::EclipseGrid grid(nx,ny,nz); - Opm::ZcornMapper zmp = grid.zcornMapper( ); - const ecl_grid_type * ert_grid = grid.c_ptr(); - - - BOOST_CHECK_THROW(zmp.index(nx,1,1,0) , std::invalid_argument); - BOOST_CHECK_THROW(zmp.index(0,ny,1,0) , std::invalid_argument); - BOOST_CHECK_THROW(zmp.index(0,1,nz,0) , std::invalid_argument); - BOOST_CHECK_THROW(zmp.index(0,1,2,8) , std::invalid_argument); - - for (int k=0; k < nz; k++) - for (int j=0; j < ny; j++) - for (int i=0; i < nx; i++) - for (int c=0; c < 8; c++) { - size_t g = i + j*nx + k*nx*ny; - BOOST_CHECK_EQUAL( zmp.index(g , c) , zmp.index( i,j,k,c)); - BOOST_CHECK_EQUAL( zmp.index(i,j,k,c) , ecl_grid_zcorn_index( ert_grid, i , j , k, c)); - } -} - - - -BOOST_AUTO_TEST_CASE(MoveTest) { - int nx = 3; - int ny = 4; - int nz = 5; - Opm::EclipseGrid grid1(nx,ny,nz); - Opm::EclipseGrid grid2( std::move( grid1 )); // grid2 should be move constructed from grid1 - - BOOST_CHECK( !grid1.c_ptr() ); // We peek at some internal details ... -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/EqualRegTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/EqualRegTests.cpp deleted file mode 100644 index 05cc65a91d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/EqualRegTests.cpp +++ /dev/null @@ -1,260 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include -#include - -#define BOOST_TEST_MODULE EqualRegTests -#include -#include - - -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - - -static Opm::DeckPtr createDeckInvalidArray() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "EQUALREG\n" - " MISSING 10 10 M / \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -static Opm::DeckPtr createDeckInvalidRegion() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "EQUALREG\n" - " MISSING 10 10 MX / \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -static Opm::DeckPtr createDeckInvalidValue() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "EQUALREG\n" - " SATNUM 0.2 10 M / \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -static Opm::DeckPtr createDeckUnInitialized() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "REGIONS\n" - "EQUALREG\n" - " SATNUM 2 10 M / \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -static Opm::DeckPtr createValidIntDeck() { - const char *deckData = - "RUNSPEC\n" - "GRIDOPTS\n" - " 'YES' 2 /" - "\n" - "DIMENS\n" - " 5 5 1 /\n" - "GRID\n" - "DX\n" - "25*0.25 /\n" - "DY\n" - "25*0.25 /\n" - "DZ\n" - "25*0.25 /\n" - "TOPS\n" - "25*0.25 /\n" - "FLUXNUM \n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "/\n" - "MULTNUM \n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "/\n" - "EQUALREG\n" - " SATNUM 11 1 M / \n" - " SATNUM 20 2 / \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -static Opm::DeckPtr createValidPERMXDeck() { - const char *deckData = - "RUNSPEC\n" - "GRIDOPTS\n" - " 'YES' 2 /" - "\n" - "DIMENS\n" - " 5 5 1 /\n" - "GRID\n" - "DX\n" - "25*0.25 /\n" - "DY\n" - "25*0.25 /\n" - "DZ\n" - "25*0.25 /\n" - "TOPS\n" - "25*0.25 /\n" - "MULTNUM \n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "/\n" - "BOX\n" - " 1 2 1 5 1 1 / \n" - "PERMZ\n" - " 10*1 /\n" - "ENDBOX\n" - "BOX\n" - " 3 5 1 5 1 1 / \n" - "PERMZ\n" - " 15*2 /\n" - "ENDBOX\n" - "EQUALREG\n" - " PERMX 1 1 / \n" - " PERMX 2 2 / \n" - "/\n" - "EQUALS\n" - " PERMY 1 1 2 1 5 1 1 / \n" - " PERMY 2 3 5 1 5 1 1 / \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - - - -BOOST_AUTO_TEST_CASE(InvalidArrayThrows) { - Opm::DeckPtr deck = createDeckInvalidArray(); - BOOST_CHECK_THROW( new Opm::EclipseState( *deck, Opm::ParseContext()) , std::invalid_argument ); -} - - -BOOST_AUTO_TEST_CASE(InvalidRegionThrows) { - Opm::DeckPtr deck = createDeckInvalidRegion(); - BOOST_CHECK_THROW( new Opm::EclipseState( *deck, Opm::ParseContext()) , std::invalid_argument ); -} - -BOOST_AUTO_TEST_CASE(ExpectedIntThrows) { - Opm::DeckPtr deck = createDeckInvalidValue(); - BOOST_CHECK_THROW( new Opm::EclipseState( *deck, Opm::ParseContext()) , std::invalid_argument ); -} - -BOOST_AUTO_TEST_CASE(UnInitializedVectorThrows) { - Opm::DeckPtr deck = createDeckUnInitialized(); - BOOST_CHECK_THROW( new Opm::EclipseState( *deck, Opm::ParseContext()) , std::invalid_argument ); -} - -BOOST_AUTO_TEST_CASE(IntSetCorrectly) { - Opm::DeckPtr deck = createValidIntDeck(); - Opm::TableManager tm(*deck); - Opm::EclipseGrid eg(deck); - Opm::Eclipse3DProperties props(*deck, tm, eg); - auto& property = props.getIntGridProperty("SATNUM"); - for (size_t j = 0; j < 5; j++) - for (size_t i = 0; i < 5; i++) { - if (i < 2) - BOOST_CHECK_EQUAL(11, property.iget(i, j, 0)); - else - BOOST_CHECK_EQUAL(20, property.iget(i, j, 0)); - } -} - -BOOST_AUTO_TEST_CASE(UnitAppliedCorrectly) { - Opm::DeckPtr deck = createValidPERMXDeck(); - Opm::TableManager tm(*deck); - Opm::EclipseGrid eg(deck); - Opm::Eclipse3DProperties props(*deck, tm, eg); - const auto& permx = props.getDoubleGridProperty("PERMX"); - const auto& permy = props.getDoubleGridProperty("PERMY"); - const auto& permz = props.getDoubleGridProperty("PERMZ"); - for (size_t g = 0; g < 25; g++) { - BOOST_CHECK_EQUAL(permz.iget(g), permx.iget(g)); - BOOST_CHECK_EQUAL(permy.iget(g), permx.iget(g)); - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/FaceDirTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/FaceDirTests.cpp deleted file mode 100644 index 13c5cd61c9..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/FaceDirTests.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include -#include - -#define BOOST_TEST_MODULE FaceDirTests -#include -#include - -#include - - -namespace Opm { - -BOOST_AUTO_TEST_CASE(CheckEnum) { - BOOST_CHECK_EQUAL( FaceDir::XPlus , FaceDir::FromString( "X")); - BOOST_CHECK_EQUAL( FaceDir::XPlus , FaceDir::FromString( "I")); - BOOST_CHECK_EQUAL( FaceDir::XMinus , FaceDir::FromString( "X-")); - BOOST_CHECK_EQUAL( FaceDir::XMinus , FaceDir::FromString( "I-")); - - BOOST_CHECK_EQUAL( FaceDir::YPlus , FaceDir::FromString( "Y")); - BOOST_CHECK_EQUAL( FaceDir::YPlus , FaceDir::FromString( "J")); - BOOST_CHECK_EQUAL( FaceDir::YMinus , FaceDir::FromString( "Y-")); - BOOST_CHECK_EQUAL( FaceDir::YMinus , FaceDir::FromString( "J-")); - - BOOST_CHECK_EQUAL( FaceDir::ZPlus , FaceDir::FromString( "Z")); - BOOST_CHECK_EQUAL( FaceDir::ZPlus , FaceDir::FromString( "K")); - BOOST_CHECK_EQUAL( FaceDir::ZMinus , FaceDir::FromString( "Z-")); - BOOST_CHECK_EQUAL( FaceDir::ZMinus , FaceDir::FromString( "K-")); - - BOOST_CHECK_THROW( FaceDir::FromString("??") , std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(CheckComposite) { - BOOST_CHECK( FaceDir::XPlus & FaceDir::FromMULTREGTString("X")); - BOOST_CHECK( FaceDir::XMinus & FaceDir::FromMULTREGTString("X")); - BOOST_CHECK_EQUAL( FaceDir::XPlus + FaceDir::XMinus , FaceDir::FromMULTREGTString("X")); - - BOOST_CHECK( FaceDir::YPlus & FaceDir::FromMULTREGTString("Y")); - BOOST_CHECK( FaceDir::YMinus & FaceDir::FromMULTREGTString("Y")); - BOOST_CHECK_EQUAL( FaceDir::YPlus + FaceDir::YMinus , FaceDir::FromMULTREGTString("Y")); - - BOOST_CHECK( FaceDir::ZPlus & FaceDir::FromMULTREGTString("Z")); - BOOST_CHECK( FaceDir::ZMinus & FaceDir::FromMULTREGTString("Z")); - BOOST_CHECK_EQUAL( FaceDir::ZPlus + FaceDir::ZMinus , FaceDir::FromMULTREGTString("Z")); - - - BOOST_CHECK_EQUAL( FaceDir::XPlus + FaceDir::YPlus + FaceDir::XMinus + FaceDir::YMinus , FaceDir::FromMULTREGTString("XY")); - BOOST_CHECK_EQUAL( FaceDir::XPlus + FaceDir::ZPlus + FaceDir::XMinus + FaceDir::ZMinus, FaceDir::FromMULTREGTString("XZ")); - BOOST_CHECK_EQUAL( FaceDir::ZPlus + FaceDir::YPlus + FaceDir::ZMinus + FaceDir::YMinus, FaceDir::FromMULTREGTString("YZ")); - BOOST_CHECK_EQUAL( FaceDir::ZPlus + FaceDir::XPlus + FaceDir::YPlus + FaceDir::ZMinus + FaceDir::XMinus + FaceDir::YMinus , FaceDir::FromMULTREGTString("XYZ")); - - BOOST_CHECK_THROW( FaceDir::FromString("??") , std::invalid_argument); - BOOST_CHECK_THROW( FaceDir::FromString("x") , std::invalid_argument); - BOOST_CHECK_THROW( FaceDir::FromString("ZY") , std::invalid_argument); - BOOST_CHECK_THROW( FaceDir::FromString("YX") , std::invalid_argument); -} - - -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/FaultTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/FaultTests.cpp deleted file mode 100644 index 3f1bf2208d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/FaultTests.cpp +++ /dev/null @@ -1,132 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include - -#define BOOST_TEST_MODULE FaultTests - -#include -#include -#include - -#include -#include -#include -#include - - - -BOOST_AUTO_TEST_CASE(CreateInvalidFace) { - // I out of range - BOOST_CHECK_THROW( Opm::FaultFace(10,10,10,10 , 10 , 1 , 1 , 5 , 5 , Opm::FaceDir::XPlus) , std::invalid_argument ); - - // I1 != I2 when face == X - BOOST_CHECK_THROW( Opm::FaultFace( 10,10,10, 1 , 3 , 1 , 1 , 5 , 5 , Opm::FaceDir::XPlus) , std::invalid_argument ); - - // J1 < J2 - BOOST_CHECK_THROW( Opm::FaultFace( 10,10,10,3 , 3 , 3 , 1 , 5 , 5 , Opm::FaceDir::XPlus) , std::invalid_argument ); - -} - - -BOOST_AUTO_TEST_CASE(CreateFace) { - std::shared_ptr face1 = std::make_shared(10,10,10,0, 2 , 0 , 0 , 0 , 0 , Opm::FaceDir::YPlus); - std::shared_ptr face2 = std::make_shared(10,10,10,0, 2 , 1 , 1 , 0 , 0 , Opm::FaceDir::YPlus); - std::shared_ptr face3 = std::make_shared(10,10,10,0, 2 , 0 , 0 , 1 , 1 , Opm::FaceDir::YPlus); - - std::vector trueValues1{0,1,2}; - std::vector trueValues2{10,11,12}; - std::vector trueValues3{100,101,102}; - size_t i = 0; - - { - auto iter3 = face3->begin(); - auto iter2 = face2->begin(); - for (auto iter1 = face1->begin(); iter1 != face1->end(); ++iter1) { - size_t index1 = *iter1; - size_t index2 = *iter2; - size_t index3 = *iter3; - - BOOST_CHECK_EQUAL( index1 , trueValues1[i] ); - BOOST_CHECK_EQUAL( index2 , trueValues2[i] ); - BOOST_CHECK_EQUAL( index3 , trueValues3[i] ); - - ++iter2; - ++iter3; - ++i; - } - } - BOOST_CHECK_EQUAL( face1->getDir() , Opm::FaceDir::YPlus); -} - - -BOOST_AUTO_TEST_CASE(CreateFault) { - Opm::Fault fault("FAULT1"); - BOOST_CHECK_EQUAL( "FAULT1" , fault.getName()); - BOOST_CHECK_EQUAL( 1.0 , fault.getTransMult()); -} - - - -BOOST_AUTO_TEST_CASE(AddFaceToFaults) { - Opm::Fault fault("FAULT1"); - std::shared_ptr face1 = std::make_shared(10,10,10,0, 2 , 0 , 0 , 0 , 0 , Opm::FaceDir::YPlus); - std::shared_ptr face2 = std::make_shared(10,10,10,0, 2 , 1 , 1 , 0 , 0 , Opm::FaceDir::YPlus); - std::shared_ptr face3 = std::make_shared(10,10,10,0, 2 , 0 , 0 , 1 , 1 , Opm::FaceDir::YPlus); - fault.addFace( face1 ); - fault.addFace( face2 ); - fault.addFace( face3 ); - - { - auto iter = fault.begin(); - BOOST_CHECK_EQUAL( *iter , face1 ); ++iter; - BOOST_CHECK_EQUAL( *iter , face2 ); ++iter; - BOOST_CHECK_EQUAL( *iter , face3 ); ++iter; - } - -} - - - -BOOST_AUTO_TEST_CASE(CreateFaultCollection) { - Opm::FaultCollection faults; - BOOST_CHECK_EQUAL( faults.size() , 0 ); - BOOST_CHECK(! faults.hasFault("NO-NotThisOne")); - BOOST_CHECK_THROW( faults.getFault("NO") , std::invalid_argument ); -} - - -BOOST_AUTO_TEST_CASE(AddFaultsToCollection) { - Opm::FaultCollection faults; - - faults.addFault("FAULT"); - BOOST_CHECK_EQUAL( faults.size() , 1 ); - BOOST_CHECK(faults.hasFault("FAULT")); - - const auto& fault1 = faults.getFault("FAULT"); - const auto& fault2 = faults.getFault(0); - BOOST_CHECK_EQUAL(fault1.getName(), fault2.getName()); - - faults.addFault("FAULTX"); - const auto& faultx = faults.getFault("FAULTX"); - BOOST_CHECK_EQUAL( faults.size() , 2 ); - BOOST_CHECK(faults.hasFault("FAULTX")); - BOOST_CHECK_EQUAL( faultx.getName() , faults.getFault(1).getName()); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/FaultsTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/FaultsTests.cpp deleted file mode 100644 index 9b0e5dba29..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/FaultsTests.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include - -#define BOOST_TEST_MODULE FaultsTests -#include -#include - -#include - - -BOOST_AUTO_TEST_CASE(CreateFaultCollection) { - Opm::FaultCollection faults; - BOOST_CHECK_EQUAL( faults.size() , 0 ); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/GridPropertiesTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/GridPropertiesTests.cpp deleted file mode 100644 index 41bcff75c2..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/GridPropertiesTests.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include - -#define BOOST_TEST_MODULE EclipseGridTests - -#include -#include -#include - -#include - -#include -#include -#include - -#include - - -BOOST_AUTO_TEST_CASE(Empty) { - typedef Opm::GridProperties::SupportedKeywordInfo SupportedKeywordInfo; - std::vector supportedKeywords = { - SupportedKeywordInfo("SATNUM" , 0, "1"), - SupportedKeywordInfo("FIPNUM" , 2, "1") - }; - - const Opm::EclipseGrid grid(10, 7, 9); - Opm::GridProperties gridProperties(grid, std::move(supportedKeywords)); - - BOOST_CHECK( gridProperties.supportsKeyword("SATNUM") ); - BOOST_CHECK( gridProperties.supportsKeyword("FIPNUM") ); - BOOST_CHECK( !gridProperties.supportsKeyword("FLUXNUM") ); - BOOST_CHECK( !gridProperties.hasKeyword("SATNUM")); - BOOST_CHECK( !gridProperties.hasKeyword("FLUXNUM")); - - BOOST_CHECK_THROW( gridProperties.getInitializedKeyword("SATNUM") , std::invalid_argument); - BOOST_CHECK_THROW( gridProperties.getInitializedKeyword("NONONO") , std::invalid_argument); -} - - - -BOOST_AUTO_TEST_CASE(addKeyword) { - typedef Opm::GridProperties::SupportedKeywordInfo SupportedKeywordInfo; - std::vector supportedKeywords = { - SupportedKeywordInfo("SATNUM" , 0, "1") - }; - Opm::EclipseGrid grid(10,7,9); - Opm::GridProperties gridProperties(grid, std::move( supportedKeywords )); - - BOOST_CHECK_THROW( gridProperties.addKeyword("NOT-SUPPORTED"), std::invalid_argument); - - BOOST_CHECK( gridProperties.addKeyword("SATNUM")); - BOOST_CHECK( !gridProperties.addKeyword("SATNUM")); - BOOST_CHECK( gridProperties.hasKeyword("SATNUM")); -} - - -BOOST_AUTO_TEST_CASE(hasKeyword) { - typedef Opm::GridProperties::SupportedKeywordInfo SupportedKeywordInfo; - std::vector supportedKeywords = { - SupportedKeywordInfo("SATNUM" , 0, "1") - }; - const Opm::EclipseGrid grid(10, 7, 9); - const Opm::GridProperties gridProperties( grid, std::move( supportedKeywords ) ); - - // calling getKeyword() should not change the semantics of hasKeyword()! - BOOST_CHECK(!gridProperties.hasKeyword("SATNUM")); - gridProperties.getKeyword("SATNUM"); - BOOST_CHECK(!gridProperties.hasKeyword("SATNUM")); - BOOST_CHECK_THROW( gridProperties.getKeyword( "NOT-SUPPORTED" ), std::invalid_argument ); -} - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/GridPropertyTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/GridPropertyTests.cpp deleted file mode 100644 index 236289f07a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/GridPropertyTests.cpp +++ /dev/null @@ -1,491 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include - -#define BOOST_TEST_MODULE EclipseGridTests - -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -static const Opm::DeckKeyword createSATNUMKeyword( ) { - const char *deckData = - "SATNUM \n" - " 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 / \n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - Opm::DeckPtr deck = parser->parseString(deckData, Opm::ParseContext()); - return deck->getKeyword("SATNUM"); -} - -static const Opm::DeckKeyword createTABDIMSKeyword( ) { - const char *deckData = - "TABDIMS\n" - " 0 1 2 3 4 5 / \n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - Opm::DeckPtr deck = parser->parseString(deckData, Opm::ParseContext()); - return deck->getKeyword("TABDIMS"); -} - -BOOST_AUTO_TEST_CASE(Empty) { - typedef Opm::GridProperty::SupportedKeywordInfo SupportedKeywordInfo; - SupportedKeywordInfo keywordInfo("SATNUM" , 77, "1"); - Opm::GridProperty gridProperty( 5 , 5 , 4 , keywordInfo); - const std::vector& data = gridProperty.getData(); - BOOST_CHECK_EQUAL( 100U , data.size()); - BOOST_CHECK_EQUAL( 100U , gridProperty.getCartesianSize()); - BOOST_CHECK_EQUAL( 5U , gridProperty.getNX()); - BOOST_CHECK_EQUAL( 5U , gridProperty.getNY()); - BOOST_CHECK_EQUAL( 4U , gridProperty.getNZ()); - for (size_t k=0; k < 4; k++) { - for (size_t j=0; j < 5; j++) { - for (size_t i=0; i < 5; i++) { - size_t g = i + j*5 + k*25; - BOOST_CHECK_EQUAL( 77 , data[g] ); - BOOST_CHECK_EQUAL( 77 , gridProperty.iget( g )); - BOOST_CHECK_EQUAL( 77 , gridProperty.iget( i,j,k )); - } - } - } -} - - -BOOST_AUTO_TEST_CASE(HasNAN) { - double nan = std::numeric_limits::quiet_NaN(); - typedef Opm::GridProperty::SupportedKeywordInfo SupportedKeywordInfo; - SupportedKeywordInfo keywordInfo("PORO" , nan , "1"); - Opm::GridProperty poro( 2 , 2 , 1 , keywordInfo); - - BOOST_CHECK( poro.containsNaN() ); - poro.iset(0,0.15); - poro.iset(1,0.15); - poro.iset(2,0.15); - BOOST_CHECK( poro.containsNaN() ); - poro.iset(3,0.15); - BOOST_CHECK( !poro.containsNaN() ); -} - -BOOST_AUTO_TEST_CASE(EmptyDefault) { - typedef Opm::GridProperty::SupportedKeywordInfo SupportedKeywordInfo; - SupportedKeywordInfo keywordInfo("SATNUM" , 0, "1"); - Opm::GridProperty gridProperty( /*nx=*/10, - /*ny=*/10, - /*nz=*/1 , - keywordInfo); - const std::vector& data = gridProperty.getData(); - BOOST_CHECK_EQUAL( 100U , data.size()); - for (size_t i=0; i < data.size(); i++) - BOOST_CHECK_EQUAL( 0 , data[i] ); -} - -BOOST_AUTO_TEST_CASE(SetFromDeckKeyword_notData_Throws) { - const auto& tabdimsKw = createTABDIMSKeyword(); - typedef Opm::GridProperty::SupportedKeywordInfo SupportedKeywordInfo; - SupportedKeywordInfo keywordInfo("TABDIMS" , 100, "1"); - Opm::GridProperty gridProperty( 6 ,1,1 , keywordInfo); - BOOST_CHECK_THROW( gridProperty.loadFromDeckKeyword( tabdimsKw ) , std::invalid_argument ); -} - - -BOOST_AUTO_TEST_CASE(SetFromDeckKeyword_wrong_size_throws) { - const auto& satnumKw = createSATNUMKeyword(); - typedef Opm::GridProperty::SupportedKeywordInfo SupportedKeywordInfo; - SupportedKeywordInfo keywordInfo("SATNUM" , 66, "1"); - Opm::GridProperty gridProperty( 15 ,1,1, keywordInfo); - BOOST_CHECK_THROW( gridProperty.loadFromDeckKeyword( satnumKw ) , std::invalid_argument ); -} - - - -BOOST_AUTO_TEST_CASE(SetFromDeckKeyword) { - const auto& satnumKw = createSATNUMKeyword(); - typedef Opm::GridProperty::SupportedKeywordInfo SupportedKeywordInfo; - SupportedKeywordInfo keywordInfo("SATNUM" , 99, "1"); - Opm::GridProperty gridProperty( 4 , 4 , 2 , keywordInfo); - gridProperty.loadFromDeckKeyword( satnumKw ); - const std::vector& data = gridProperty.getData(); - for (size_t k=0; k < 2; k++) { - for (size_t j=0; j < 4; j++) { - for (size_t i=0; i < 4; i++) { - size_t g = i + j*4 + k*16; - - BOOST_CHECK_EQUAL( g , data[g] ); - BOOST_CHECK_EQUAL( g , gridProperty.iget(g) ); - BOOST_CHECK_EQUAL( g , gridProperty.iget(i,j,k) ); - - } - } - } -} - -BOOST_AUTO_TEST_CASE(copy) { - typedef Opm::GridProperty::SupportedKeywordInfo SupportedKeywordInfo; - SupportedKeywordInfo keywordInfo1("P1", 0, "1"); - SupportedKeywordInfo keywordInfo2("P2", 9, "1"); - Opm::GridProperty prop1(4, 4, 2, keywordInfo1); - Opm::GridProperty prop2(4, 4, 2, keywordInfo2); - - Opm::Box global(4, 4, 2); - Opm::Box layer0(global, 0, 3, 0, 3, 0, 0); - - prop2.copyFrom(prop1, layer0); - - for (size_t j = 0; j < 4; j++) { - for (size_t i = 0; i < 4; i++) { - - BOOST_CHECK_EQUAL(prop2.iget(i, j, 0), 0); - BOOST_CHECK_EQUAL(prop2.iget(i, j, 1), 9); - } - } -} - - -BOOST_AUTO_TEST_CASE(SCALE) { - typedef Opm::GridProperty::SupportedKeywordInfo SupportedKeywordInfo; - SupportedKeywordInfo keywordInfo1( "P1", 1, "1" ); - SupportedKeywordInfo keywordInfo2( "P2", 9, "1" ); - - Opm::GridProperty prop1( 4, 4, 2, keywordInfo1 ); - Opm::GridProperty prop2( 4, 4, 2, keywordInfo2 ); - - Opm::Box global( 4, 4, 2 ); - Opm::Box layer0( global, 0, 3, 0, 3, 0, 0 ); - - prop2.copyFrom( prop1, layer0 ); - prop2.scale( 2, global ); - prop2.scale( 2, layer0 ); - - for (size_t j = 0; j < 4; j++) { - for (size_t i = 0; i < 4; i++) { - - BOOST_CHECK_EQUAL( prop2.iget( i, j, 0 ), 4 ); - BOOST_CHECK_EQUAL( prop2.iget( i, j, 1 ), 18 ); - } - } -} - -BOOST_AUTO_TEST_CASE(SET) { - typedef Opm::GridProperty::SupportedKeywordInfo SupportedKeywordInfo; - SupportedKeywordInfo keywordInfo( "P1", 1, "1" ); - Opm::GridProperty prop( 4, 4, 2, keywordInfo ); - - Opm::Box global( 4, 4, 2 ); - Opm::Box layer0( global, 0, 3, 0, 3, 0, 0 ); - - prop.setScalar( 2, global ); - prop.setScalar( 4, layer0 ); - - for (size_t j = 0; j < 4; j++) { - for (size_t i = 0; i < 4; i++) { - - BOOST_CHECK_EQUAL( prop.iget( i, j, 0 ), 4 ); - BOOST_CHECK_EQUAL( prop.iget( i, j, 1 ), 2 ); - } - } -} - -BOOST_AUTO_TEST_CASE(ADD) { - typedef Opm::GridProperty::SupportedKeywordInfo SupportedKeywordInfo; - SupportedKeywordInfo keywordInfo1( "P1", 1, "1" ); - SupportedKeywordInfo keywordInfo2( "P2", 9, "1" ); - Opm::GridProperty prop1( 4, 4, 2, keywordInfo1 ); - Opm::GridProperty prop2( 4, 4, 2, keywordInfo2 ); - - Opm::Box global( 4, 4, 2 ); - Opm::Box layer0( global, 0, 3, 0, 3, 0, 0 ); - - prop2.copyFrom( prop1, layer0 ); - prop2.add( 2, global ); - prop2.add( 2, layer0 ); - - for (size_t j = 0; j < 4; j++) { - for (size_t i = 0; i < 4; i++) { - - BOOST_CHECK_EQUAL( prop2.iget( i, j, 0 ), 5 ); - BOOST_CHECK_EQUAL( prop2.iget( i, j, 1 ), 11 ); - } - } -} - -BOOST_AUTO_TEST_CASE(GridPropertyInitialization) { - const char *deckString = - "RUNSPEC\n" - "\n" - "OIL\n" - "GAS\n" - "WATER\n" - "TABDIMS\n" - "3 /\n" - "\n" - "METRIC\n" - "\n" - "DIMENS\n" - "3 3 3 /\n" - "\n" - "GRID\n" - "\n" - "ACTNUM\n" - " 0 8*1 0 8*1 0 8*1 /\n" - "DXV\n" - "1 1 1 /\n" - "\n" - "DYV\n" - "1 1 1 /\n" - "\n" - "DZV\n" - "1 1 1 /\n" - "\n" - "TOPS\n" - "9*100 /\n" - "\n" - "PROPS\n" - "\n" - "SWOF\n" - // table 1 - // S_w k_r,w k_r,o p_c,ow - " 0.1 0 1.0 2.0\n" - " 0.15 0 0.9 1.0\n" - " 0.2 0.01 0.5 0.5\n" - " 0.93 0.91 0.0 0.0\n" - "/\n" - // table 2 - // S_w k_r,w k_r,o p_c,ow - " 0.00 0 1.0 2.0\n" - " 0.05 0.01 1.0 2.0\n" - " 0.10 0.02 0.9 1.0\n" - " 0.15 0.03 0.5 0.5\n" - " 0.852 1.00 0.0 0.0\n" - "/\n" - // table 3 - // S_w k_r,w k_r,o p_c,ow - " 0.00 0.00 0.9 2.0\n" - " 0.05 0.02 0.8 1.0\n" - " 0.10 0.03 0.5 0.5\n" - " 0.801 1.00 0.0 0.0\n" - "/\n" - "\n" - "SGOF\n" - // table 1 - // S_g k_r,g k_r,o p_c,og - " 0.00 0.00 0.9 2.0\n" - " 0.05 0.02 0.8 1.0\n" - " 0.10 0.03 0.5 0.5\n" - " 0.80 1.00 0.0 0.0\n" - "/\n" - // table 2 - // S_g k_r,g k_r,o p_c,og - " 0.05 0.00 1.0 2\n" - " 0.10 0.02 0.9 1\n" - " 0.15 0.03 0.5 0.5\n" - " 0.85 1.00 0.0 0\n" - "/\n" - // table 3 - // S_g k_r,g k_r,o p_c,og - " 0.1 0 1.0 2\n" - " 0.15 0 0.9 1\n" - " 0.2 0.01 0.5 0.5\n" - " 0.9 0.91 0.0 0\n" - "/\n" - "\n" - "SWU\n" - "* /\n" - "\n" - "ISGU\n" - "* /\n" - "\n" - "SGCR\n" - "* /\n" - "\n" - "ISGCR\n" - "* /\n" - "\n" - "REGIONS\n" - "\n" - "SATNUM\n" - "9*1 9*2 9*3 /\n" - "\n" - "IMBNUM\n" - "9*3 9*2 9*1 /\n" - "\n" - "SOLUTION\n" - "\n" - "SCHEDULE\n"; - - Opm::ParseContext parseContext; - Opm::ParserPtr parser(new Opm::Parser); - - auto deck = parser->parseString(deckString, parseContext); - Opm::TableManager tm(*deck); - Opm::EclipseGrid eg(deck); - Opm::Eclipse3DProperties props(*deck, tm, eg); - - // make sure that Eclipse3DProperties throws if it is bugged about an _unsupported_ keyword - BOOST_CHECK_THROW(props.hasDeckIntGridProperty("ISWU"), std::logic_error); - BOOST_CHECK_THROW(props.hasDeckDoubleGridProperty("FLUXNUM"), std::logic_error); - - // make sure that Eclipse3DProperties does not throw if it is asked for a supported - // grid property that is not contained in the deck - BOOST_CHECK_NO_THROW(props.hasDeckDoubleGridProperty("ISWU")); - BOOST_CHECK_NO_THROW(props.hasDeckIntGridProperty("FLUXNUM")); - - BOOST_CHECK(!props.hasDeckDoubleGridProperty("ISWU")); - BOOST_CHECK(!props.hasDeckIntGridProperty("FLUXNUM")); - - BOOST_CHECK(props.hasDeckIntGridProperty("SATNUM")); - BOOST_CHECK(props.hasDeckIntGridProperty("IMBNUM")); - - BOOST_CHECK(props.hasDeckDoubleGridProperty("SWU")); - BOOST_CHECK(props.hasDeckDoubleGridProperty("ISGU")); - BOOST_CHECK(props.hasDeckDoubleGridProperty("SGCR")); - BOOST_CHECK(props.hasDeckDoubleGridProperty("ISGCR")); - - const auto& swuPropData = props.getDoubleGridProperty("SWU").getData(); - BOOST_CHECK_EQUAL(swuPropData[0 * 3*3], 0.93); - BOOST_CHECK_EQUAL(swuPropData[1 * 3*3], 0.852); - BOOST_CHECK_EQUAL(swuPropData[2 * 3*3], 0.801); - - const auto& sguPropData = props.getDoubleGridProperty("ISGU").getData(); - BOOST_CHECK_EQUAL(sguPropData[0 * 3*3], 0.9); - BOOST_CHECK_EQUAL(sguPropData[1 * 3*3], 0.85); - BOOST_CHECK_EQUAL(sguPropData[2 * 3*3], 0.80); - - - const auto& satnum = props.getIntGridProperty("SATNUM"); - { - const auto& activeMap = eg.getActiveMap(); - const auto cells1 = satnum.cellsEqual(1 , activeMap); - const auto cells2 = satnum.cellsEqual(2 , activeMap); - const auto cells3 = satnum.cellsEqual(3 , activeMap); - - BOOST_CHECK_EQUAL( cells1.size() , 8 ); - BOOST_CHECK_EQUAL( cells2.size() , 8 ); - BOOST_CHECK_EQUAL( cells3.size() , 8 ); - - for (size_t i = 0; i < 8; i++) { - BOOST_CHECK_EQUAL( cells1[i] , i ); - BOOST_CHECK_EQUAL( cells2[i] , i + 8); - BOOST_CHECK_EQUAL( cells3[i] , i + 16); - } - } - { - const auto cells1 = satnum.indexEqual(1 ); - const auto cells2 = satnum.indexEqual(2 ); - const auto cells3 = satnum.indexEqual(3 ); - - BOOST_CHECK_EQUAL( cells1.size() , 9 ); - BOOST_CHECK_EQUAL( cells2.size() , 9 ); - BOOST_CHECK_EQUAL( cells3.size() , 9 ); - - for (size_t i = 0; i < 9; i++) { - BOOST_CHECK_EQUAL( cells1[i] , i ); - BOOST_CHECK_EQUAL( cells2[i] , i + 9); - BOOST_CHECK_EQUAL( cells3[i] , i + 18); - } - } - - { - const auto cells3_a = satnum.cellsEqual(3 , eg); - const auto cells3_g = satnum.cellsEqual(3 , eg , false); - - for (size_t i = 0; i < 8; i++) { - BOOST_CHECK_EQUAL( cells3_a[i] , i + 16); - BOOST_CHECK_EQUAL( cells3_g[i] , i + 18); - } - BOOST_CHECK_EQUAL( cells3_g[8] , 26); - } - - const auto compressedSatnum = satnum.compressedCopy( eg ); - BOOST_CHECK_EQUAL( compressedSatnum.size() , eg.getNumActive()); - for (size_t i=0; i < eg.getNumActive(); i++) { - size_t g = eg.getGlobalIndex( i ); - BOOST_CHECK_EQUAL( compressedSatnum[i] , satnum.getData()[g]); - } -} - - -inline void TestPostProcessorMul(std::vector< double >& values, - const Opm::TableManager*, - const Opm::EclipseGrid*, - Opm::GridProperties*, - Opm::GridProperties*) -{ - for( size_t g = 0; g < values.size(); g++ ) - values[g] *= 2.0; -} - - -BOOST_AUTO_TEST_CASE(multiply) { - typedef Opm::GridProperty::SupportedKeywordInfo SupportedKeywordInfo; - SupportedKeywordInfo keywordInfo("P" , 10 , "1"); - Opm::GridProperty p1( 5 , 5 , 4 , keywordInfo); - Opm::GridProperty p2( 5 , 5 , 5 , keywordInfo); - Opm::GridProperty p3( 5 , 5 , 4 , keywordInfo); - - BOOST_CHECK_THROW( p1.multiplyWith(p2) , std::invalid_argument ); - p1.multiplyWith(p3); - - for (size_t g = 0; g < p1.getCartesianSize(); g++) - BOOST_CHECK_EQUAL( 100 , p1.iget(g)); - -} - - - -BOOST_AUTO_TEST_CASE(mask_test) { - typedef Opm::GridProperty::SupportedKeywordInfo SupportedKeywordInfo; - SupportedKeywordInfo keywordInfo1("P" , 10 , "1"); - SupportedKeywordInfo keywordInfo2("P" , 20 , "1"); - Opm::GridProperty p1( 5 , 5 , 4 , keywordInfo1); - Opm::GridProperty p2( 5 , 5 , 4 , keywordInfo2); - - std::vector mask; - - p1.initMask(10 , mask); - p2.maskedSet( 10 , mask); - - for (size_t g = 0; g < p1.getCartesianSize(); g++) - BOOST_CHECK_EQUAL( p1.iget(g) , p2.iget(g)); -} - -BOOST_AUTO_TEST_CASE(CheckLimits) { - typedef Opm::GridProperty::SupportedKeywordInfo SupportedKeywordInfo; - SupportedKeywordInfo keywordInfo1("P" , 1 , "1"); - Opm::GridProperty p1( 5 , 5 , 4 , keywordInfo1); - - p1.checkLimits(0,2); - BOOST_CHECK_THROW( p1.checkLimits(-2,0) , std::invalid_argument); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/MULTREGTScannerTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/MULTREGTScannerTests.cpp deleted file mode 100644 index 59b2966bfd..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/MULTREGTScannerTests.cpp +++ /dev/null @@ -1,266 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include - -#define BOOST_TEST_MODULE MULTREGTScannerTests -#include -#include - -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - - - - -BOOST_AUTO_TEST_CASE(TestRegionName) { - BOOST_CHECK_EQUAL( "FLUXNUM" , Opm::MULTREGT::RegionNameFromDeckValue( "F")); - BOOST_CHECK_EQUAL( "MULTNUM" , Opm::MULTREGT::RegionNameFromDeckValue( "M")); - BOOST_CHECK_EQUAL( "OPERNUM" , Opm::MULTREGT::RegionNameFromDeckValue( "O")); - - BOOST_CHECK_THROW( Opm::MULTREGT::RegionNameFromDeckValue("o") , std::invalid_argument); - BOOST_CHECK_THROW( Opm::MULTREGT::RegionNameFromDeckValue("X") , std::invalid_argument); -} - - -BOOST_AUTO_TEST_CASE(TestNNCBehaviourEnum) { - BOOST_CHECK_EQUAL( Opm::MULTREGT::ALL , Opm::MULTREGT::NNCBehaviourFromString( "ALL")); - BOOST_CHECK_EQUAL( Opm::MULTREGT::NNC , Opm::MULTREGT::NNCBehaviourFromString( "NNC")); - BOOST_CHECK_EQUAL( Opm::MULTREGT::NONNC , Opm::MULTREGT::NNCBehaviourFromString( "NONNC")); - BOOST_CHECK_EQUAL( Opm::MULTREGT::NOAQUNNC , Opm::MULTREGT::NNCBehaviourFromString( "NOAQUNNC")); - - - BOOST_CHECK_THROW( Opm::MULTREGT::NNCBehaviourFromString( "Invalid") , std::invalid_argument); -} - - - -static Opm::DeckPtr createInvalidMULTREGTDeck() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 3 3 2 /\n" - "GRID\n" - "DX\n" - "18*0.25 /\n" - "DY\n" - "18*0.25 /\n" - "DZ\n" - "18*0.25 /\n" - "TOPS\n" - "9*0.25 /\n" - "FLUXNUM\n" - "1 1 2\n" - "1 1 2\n" - "1 1 2\n" - "3 4 5\n" - "3 4 5\n" - "3 4 5\n" - "/\n" - "MULTREGT\n" - "1 2 0.50 G ALL M / -- Invalid direction\n" - "/\n" - "MULTREGT\n" - "1 2 0.50 X ALL G / -- Invalid region \n" - "/\n" - "MULTREGT\n" - "1 2 0.50 X ALL M / -- Region not in deck \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -BOOST_AUTO_TEST_CASE(InvalidInput) { - Opm::DeckPtr deck = createInvalidMULTREGTDeck(); - Opm::EclipseGrid grid( deck ); - Opm::TableManager tm(*deck); - Opm::EclipseGrid eg(deck); - Opm::Eclipse3DProperties props(*deck, tm, eg); - - - // Invalid direction - std::vector keywords0; - const auto& multregtKeyword0 = deck->getKeyword( "MULTREGT", 0 ); - keywords0.push_back( &multregtKeyword0 ); - BOOST_CHECK_THROW( Opm::MULTREGTScanner scanner( props, keywords0 ); , std::invalid_argument ); - - // Not supported region - std::vector keywords1; - const auto& multregtKeyword1 = deck->getKeyword( "MULTREGT", 1 ); - keywords1.push_back( &multregtKeyword1 ); - BOOST_CHECK_THROW( Opm::MULTREGTScanner scanner( props, keywords1 ); , std::invalid_argument ); - - // The keyword is ok; but it refers to a region which is not in the deck. - std::vector keywords2; - const auto& multregtKeyword2 = deck->getKeyword( "MULTREGT", 2 ); - keywords2.push_back( &multregtKeyword2 ); - BOOST_CHECK_THROW( Opm::MULTREGTScanner scanner( props, keywords2 ); , std::logic_error ); -} - - -static Opm::DeckPtr createNotSupportedMULTREGTDeck() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 3 3 2 /\n" - "GRID\n" - "DX\n" - "18*0.25 /\n" - "DY\n" - "18*0.25 /\n" - "DZ\n" - "18*0.25 /\n" - "TOPS\n" - "9*0.25 /\n" - "FLUXNUM\n" - "1 1 2\n" - "1 1 2\n" - "1 1 2\n" - "3 4 5\n" - "3 4 5\n" - "3 4 5\n" - "/\n" - "MULTREGT\n" - "1 2 0.50 X NOAQUNNC F / -- Not support NOAQUNNC behaviour \n" - "/\n" - "MULTREGT\n" - "* 2 0.50 X ALL M / -- Defaulted from region value \n" - "/\n" - "MULTREGT\n" - "2 * 0.50 X ALL M / -- Defaulted to region value \n" - "/\n" - "MULTREGT\n" - "2 2 0.50 X ALL M / -- Region values equal \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - - - -BOOST_AUTO_TEST_CASE(NotSupported) { - Opm::DeckPtr deck = createNotSupportedMULTREGTDeck(); - Opm::EclipseGrid grid( deck ); - Opm::TableManager tm(*deck); - Opm::EclipseGrid eg(deck); - Opm::Eclipse3DProperties props(*deck, tm, eg); - - - // Not support NOAQUNNC behaviour - std::vector keywords0; - const auto& multregtKeyword0 = deck->getKeyword( "MULTREGT", 0 ); - keywords0.push_back( &multregtKeyword0 ); - BOOST_CHECK_THROW( Opm::MULTREGTScanner scanner( props, keywords0 ); , std::invalid_argument ); - - // Defaulted from value - not supported - std::vector keywords1; - const auto& multregtKeyword1 = deck->getKeyword( "MULTREGT", 1 ); - keywords1.push_back( &multregtKeyword1 ); - BOOST_CHECK_THROW( Opm::MULTREGTScanner scanner( props, keywords1 ); , std::invalid_argument ); - - - // Defaulted to value - not supported - std::vector keywords2; - const auto& multregtKeyword2 = deck->getKeyword( "MULTREGT", 2 ); - keywords2.push_back( &multregtKeyword2 ); - BOOST_CHECK_THROW( Opm::MULTREGTScanner scanner( props, keywords2 ); , std::invalid_argument ); - - // srcValue == targetValue - not supported - std::vector keywords3; - const Opm::DeckKeyword& multregtKeyword3 = deck->getKeyword( "MULTREGT", 3 ); - keywords3.push_back( &multregtKeyword3 ); - BOOST_CHECK_THROW( Opm::MULTREGTScanner scanner( props, keywords3 ); , std::invalid_argument ); -} - -static Opm::DeckPtr createCopyMULTNUMDeck() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - "2 2 2 /\n" - "GRID\n" - "DX\n" - "8*0.25 /\n" - "DY\n" - "8*0.25 /\n" - "DZ\n" - "8*0.25 /\n" - "TOPS\n" - "4*0.25 /\n" - "FLUXNUM\n" - "1 2\n" - "1 2\n" - "3 4\n" - "3 4\n" - "/\n" - "COPY\n" - " FLUXNUM MULTNUM /\n" - "/\n" - "MULTREGT\n" - "1 2 0.50/ \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - -BOOST_AUTO_TEST_CASE(MULTREGT_COPY_MULTNUM) { - Opm::DeckPtr deck = createCopyMULTNUMDeck(); - Opm::TableManager tm(*deck); - Opm::EclipseGrid eg(deck); - Opm::Eclipse3DProperties props(*deck, tm, eg); - - BOOST_CHECK_NO_THROW(props.hasDeckIntGridProperty("FLUXNUM")); - BOOST_CHECK_NO_THROW(props.hasDeckIntGridProperty("MULTNUM")); - const auto& fdata = props.getIntGridProperty("FLUXNUM").getData(); - const auto& mdata = props.getIntGridProperty("MULTNUM").getData(); - std::vector data = { 1, 2, 1, 2, 3, 4, 3, 4 }; - - for (auto i = 0; i < 2 * 2 * 2; i++) { - BOOST_CHECK_EQUAL(fdata[i], mdata[i]); - BOOST_CHECK_EQUAL(fdata[i], data[i]); - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/MultiRegTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/MultiRegTests.cpp deleted file mode 100644 index 02a81952c7..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/MultiRegTests.cpp +++ /dev/null @@ -1,229 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include -#include - -#define BOOST_TEST_MODULE MultiRegTests -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - - -static Opm::DeckPtr createDeckInvalidArray() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "MULTIREG\n" - " MISSING 10 10 M / \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -static Opm::DeckPtr createDeckInvalidRegion() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "REGIONS\n" - "SATNUM\n" - " 1000*1 /\n" - "MULTIREG\n" - " SATNUM 10 10 MX / \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -static Opm::DeckPtr createDeckInvalidValue() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "REGIONS\n" - "SATNUM\n" - " 1000*1 /\n" - "MULTIREG\n" - " SATNUM 0.2 10 M / \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -static Opm::DeckPtr createDeckMissingVector() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "REGIONS\n" - "SATNUM\n" - " 1000*1 /\n" - "MULTIREG\n" - " SATNUM 2 10 M / \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -static Opm::DeckPtr createDeckUnInitialized() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "REGIONS\n" - "MULTIREG\n" - " SATNUM 2 10 M / \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -static Opm::DeckPtr createValidIntDeck() { - const char *deckData = - "RUNSPEC\n" - "GRIDOPTS\n" - " 'YES' 2 /\n" - "\n" - "DIMENS\n" - " 5 5 1 /\n" - "GRID\n" - "DX\n" - "25*0.25 /\n" - "DY\n" - "25*0.25 /\n" - "DZ\n" - "25*0.25 /\n" - "TOPS\n" - "25*0.25 /\n" - "REGIONS\n" - "SATNUM \n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "/\n" - "MULTNUM \n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "/\n" - "MULTIREG\n" - " SATNUM 11 1 M / \n" - " SATNUM 20 2 / \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - - - - - -BOOST_AUTO_TEST_CASE(InvalidArrayThrows) { - Opm::DeckPtr deck = createDeckInvalidArray(); - BOOST_CHECK_THROW( new Opm::EclipseState( *deck, Opm::ParseContext()) , std::invalid_argument ); -} - - -BOOST_AUTO_TEST_CASE(InvalidRegionThrows) { - Opm::DeckPtr deck = createDeckInvalidRegion(); - BOOST_CHECK_THROW( new Opm::EclipseState( *deck, Opm::ParseContext()) , std::invalid_argument ); -} - - -BOOST_AUTO_TEST_CASE(ExpectedIntThrows) { - Opm::DeckPtr deck = createDeckInvalidValue(); - BOOST_CHECK_THROW( new Opm::EclipseState( *deck, Opm::ParseContext()) , std::invalid_argument ); -} - -BOOST_AUTO_TEST_CASE(MissingRegionVectorThrows) { - Opm::DeckPtr deck = createDeckMissingVector(); - BOOST_CHECK_THROW( new Opm::EclipseState( *deck, Opm::ParseContext()) , std::invalid_argument ); -} - -BOOST_AUTO_TEST_CASE(UnInitializedVectorThrows) { - Opm::DeckPtr deck = createDeckUnInitialized(); - BOOST_CHECK_THROW( new Opm::EclipseState( *deck, Opm::ParseContext()) , std::invalid_argument ); -} - -BOOST_AUTO_TEST_CASE(IntSetCorrectly) { - Opm::DeckPtr deck = createValidIntDeck(); - Opm::TableManager tm(*deck); - Opm::EclipseGrid eg(deck); - Opm::Eclipse3DProperties props(*deck, tm, eg); - - const auto& property = props.getIntGridProperty("SATNUM"); - for (size_t j = 0; j < 5; j++) - for (size_t i = 0; i < 5; i++) { - if (i < 2) - BOOST_CHECK_EQUAL(11, property.iget(i, j, 0)); - else - BOOST_CHECK_EQUAL(40, property.iget(i, j, 0)); - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/PORVTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/PORVTests.cpp deleted file mode 100644 index 06ff9e581c..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/PORVTests.cpp +++ /dev/null @@ -1,460 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include - -#define BOOST_TEST_MODULE PORVTESTS -#include -#include - - -#include -#include - -#include -#include -#include -#include -#include -#include - -static Opm::Eclipse3DProperties getProps(Opm::DeckPtr deck) { - return Opm::Eclipse3DProperties(*deck, *new Opm::TableManager(*deck), *new Opm::EclipseGrid(deck)); -} - -static Opm::DeckPtr createCARTDeck() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "DX\n" - "1000*0.25 /\n" - "DYV\n" - "10*0.25 /\n" - "DZ\n" - "1000*0.25 /\n" - "TOPS\n" - "100*0.25 /\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - - - - -static Opm::DeckPtr createDeckWithPORO() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "DX\n" - "1000*0.25 /\n" - "DYV\n" - "10*0.25 /\n" - "DZ\n" - "1000*0.25 /\n" - "TOPS\n" - "100*0.25 /\n" - "PORO\n" - "100*0.10 100*0.20 100*0.30 100*0.40 100*0.50 100*0.60 100*0.70 100*0.80 100*0.90 100*1.0 /\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - - -static Opm::DeckPtr createDeckWithPORVPORO() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "DX\n" - "1000*0.25 /\n" - "DYV\n" - "10*0.25 /\n" - "DZ\n" - "1000*0.25 /\n" - "TOPS\n" - "100*0.25 /\n" - "BOX \n" - "1 10 1 10 1 1 /\n" - "PORV\n" - "100*77 /\n" - "ENDBOX \n" - "PORO\n" - "100*0.10 100*0.20 100*0.30 100*0.40 100*0.50 100*0.60 100*0.70 100*0.80 100*0.90 100*1.0 /\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -static Opm::DeckPtr createDeckWithMULTPV() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "DX\n" - "1000*0.25 /\n" - "DYV\n" - "10*0.25 /\n" - "DZ\n" - "1000*0.25 /\n" - "TOPS\n" - "100*0.25 /\n" - "BOX \n" - "1 10 1 10 1 1 /\n" - "PORV\n" - "100*77 /\n" - "ENDBOX \n" - "PORO\n" - "100*0.10 100*0.20 100*0.30 100*0.40 100*0.50 100*0.60 100*0.70 100*0.80 100*0.90 100*1.0 /\n" - "EDIT\n" - "BOX \n" - "1 5 1 5 1 1 /\n" - "MULTPV\n" - "25*10 / \n" - "ENDBOX \n" - "BOX \n" - "1 10 1 10 10 10 /\n" - "MULTPV\n" - "100*10 / \n" - "ENDBOX \n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -static Opm::DeckPtr createDeckWithBOXPORV() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "DX\n" - "1000*0.25 /\n" - "DYV\n" - "10*0.25 /\n" - "DZ\n" - "1000*0.25 /\n" - "TOPS\n" - "100*0.25 /\n" - "PORV\n" - "1000*123.456 /\n" - "BOX \n" - "2 3 2 3 2 3 /\n" - "PORV\n" - "8*789.012 /\n" - "ENDBOX\n" - "MULTPV\n" - "1000*10 /\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -static Opm::DeckPtr createDeckWithNTG() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "DX\n" - "1000*0.25 /\n" - "DYV\n" - "10*0.25 /\n" - "DZ\n" - "1000*0.25 /\n" - "TOPS\n" - "100*0.25 /\n" - "PORO\n" - "1000*0.20 /\n" - "BOX \n" - "1 1 1 1 1 1 /\n" - "PORV \n" - "1*10 /\n" - "ENDBOX\n" - "MULTPV\n" - "1000*10 /\n" - "NTG\n" - "1000*2 /\n" - "EDIT\n" - "\n"; - - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - -static Opm::DeckPtr createDeckWithMULTREGP() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "DX\n" - "1000*0.25 /\n" - "DYV\n" - "10*0.25 /\n" - "DZ\n" - "1000*0.25 /\n" - "TOPS\n" - "100*0.25 /\n" - "PORV\n" - "1000*77 /\n" - "MULTNUM\n" - "100*1 700*2 200*3 / \n" - "FLUXNUM\n" - "200*1 700*2 100*3 / \n" - "MULTREGP\n" - "1 10.0 / \n" - "1 2.0 F/ \n" - "0 123.0 F/ \n" // ignored - "2 20.0 M / \n" - "/\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - -BOOST_AUTO_TEST_CASE(PORV_cartesianDeck) { - /* Check that an exception is raised if we try to create a PORV field without PORO. */ - Opm::DeckPtr deck = createCARTDeck(); - const auto props = getProps(deck); - const auto& poro = props.getDoubleGridProperty("PORO"); - BOOST_CHECK(poro.containsNaN()); - BOOST_CHECK_THROW(props.getDoubleGridProperty("PORV"), std::logic_error); -} - -BOOST_AUTO_TEST_CASE(PORV_initFromPoro) { - /* Check that the PORV field is correctly calculated from PORO. */ - Opm::DeckPtr deck = createDeckWithPORO(); - const auto props = getProps(deck); - const auto& poro = props.getDoubleGridProperty("PORO"); - BOOST_CHECK( !poro.containsNaN() ); - - const auto& porv = props.getDoubleGridProperty("PORV"); - double cell_volume = 0.25 * 0.25 * 0.25; - - BOOST_CHECK_CLOSE( cell_volume * 0.10 , porv.iget(0,0,0) , 0.001); - BOOST_CHECK_CLOSE( cell_volume * 0.10 , porv.iget(9,9,0) , 0.001); - - BOOST_CHECK_CLOSE( cell_volume * 0.50 , porv.iget(0,0,4) , 0.001); - BOOST_CHECK_CLOSE( cell_volume * 0.50 , porv.iget(9,9,4) , 0.001); - - BOOST_CHECK_CLOSE( cell_volume * 1.00 , porv.iget(0,0,9) , 0.001); - BOOST_CHECK_CLOSE( cell_volume * 1.00 , porv.iget(9,9,9) , 0.001); -} - -BOOST_AUTO_TEST_CASE(PORV_initFromPoroWithCellVolume) { - /* Check that explicit PORV and CellVOlume * PORO can be combined. */ - Opm::DeckPtr deck = createDeckWithPORVPORO(); - const auto props = getProps(deck); - const auto& porv = props.getDoubleGridProperty("PORV"); - double cell_volume = 0.25 * 0.25 * 0.25; - - BOOST_CHECK_CLOSE( 77.0 , porv.iget(0,0,0) , 0.001); - BOOST_CHECK_CLOSE( 77.0 , porv.iget(9,9,0) , 0.001); - - BOOST_CHECK_CLOSE( cell_volume * 0.50 , porv.iget(0,0,4) , 0.001); - BOOST_CHECK_CLOSE( cell_volume * 0.50 , porv.iget(9,9,4) , 0.001); - - BOOST_CHECK_CLOSE( cell_volume * 1.00 , porv.iget(0,0,9) , 0.001); - BOOST_CHECK_CLOSE( cell_volume * 1.00 , porv.iget(9,9,9) , 0.001); -} - -BOOST_AUTO_TEST_CASE(PORV_multpv) { - /* Check that MULTPV is correctly accounted for. */ - Opm::DeckPtr deck = createDeckWithMULTPV(); - const auto props = getProps(deck); - const auto& porv = props.getDoubleGridProperty("PORV"); - double cell_volume = 0.25 * 0.25 * 0.25; - - BOOST_CHECK_CLOSE( 770.0 , porv.iget(0,0,0) , 0.001); - BOOST_CHECK_CLOSE( 770.0 , porv.iget(4,4,0) , 0.001); - BOOST_CHECK_CLOSE( 77.0 , porv.iget(9,9,0) , 0.001); - - BOOST_CHECK_CLOSE( cell_volume * 0.50 , porv.iget(0,0,4) , 0.001); - BOOST_CHECK_CLOSE( cell_volume * 0.50 , porv.iget(9,9,4) , 0.001); - - BOOST_CHECK_CLOSE( cell_volume * 0.90 , porv.iget(0,0,8) , 0.001); - BOOST_CHECK_CLOSE( cell_volume * 0.90 , porv.iget(9,9,8) , 0.001); - - BOOST_CHECK_CLOSE( cell_volume * 10.00 , porv.iget(0,0,9) , 0.001); - BOOST_CHECK_CLOSE( cell_volume * 10.00 , porv.iget(9,9,9) , 0.001); -} - -BOOST_AUTO_TEST_CASE(PORV_mutipleBoxAndMultpv) { - /* Check that MULTIPLE Boxed PORV and MULTPV statements work */ - Opm::DeckPtr deck = createDeckWithBOXPORV(); - const auto props = getProps(deck); - const auto& porv = props.getDoubleGridProperty("PORV"); - - BOOST_CHECK_CLOSE( 1234.56 , porv.iget(0,0,0) , 0.001); - BOOST_CHECK_CLOSE( 1234.56 , porv.iget(9,9,9) , 0.001); - - BOOST_CHECK_CLOSE( 7890.12 , porv.iget(1,1,1) , 0.001); - BOOST_CHECK_CLOSE( 7890.12 , porv.iget(2,2,2) , 0.001); - -} - -BOOST_AUTO_TEST_CASE(PORV_multpvAndNtg) { - /* Check that MULTIPLE Boxed PORV and MULTPV statements work and NTG */ - Opm::DeckPtr deck = createDeckWithNTG(); - const auto props = getProps(deck); - const auto& porv = props.getDoubleGridProperty("PORV"); - double cell_volume = 0.25 * 0.25 * 0.25; - double poro = 0.20; - double multpv = 10; - double NTG = 2; - double PORV = 10; - - BOOST_CHECK_CLOSE( PORV * multpv , porv.iget(0,0,0) , 0.001); - BOOST_CHECK_CLOSE( cell_volume * poro*multpv*NTG , porv.iget(9,9,9) , 0.001); -} - -BOOST_AUTO_TEST_CASE(PORV_multregp) { - Opm::DeckPtr deck = createDeckWithMULTREGP(); - const auto props = getProps(deck); - const auto& porv = props.getDoubleGridProperty("PORV"); - const auto& porvData = porv.getData(); - double basePorv = 77.0; - - // the cumlative effect of the base pore volume is multiplied 2 for the cells in - // region 1 of FLUXNUM and by 20 for region 2 of MULTNUM. This means that the first - // 100 cels are multiplied by 2, then follow 100 cells multiplied by 2*20, then - // 600 cells multiplied by 20 while the last 200 cells are not modified at all. - for (int i=0; i < 100; ++i) - BOOST_CHECK_CLOSE(porvData[i], basePorv*2, 1e-8); - - for (int i=100; i < 200; ++i) - BOOST_CHECK_CLOSE(porvData[i], basePorv*2*20, 1e-8); - - for (int i=200; i < 800; ++i) - BOOST_CHECK_CLOSE(porvData[i], basePorv*20, 1e-8); - - for (int i=800; i < 1000; ++i) - BOOST_CHECK_CLOSE(porvData[i], basePorv, 1e-8); -} - - -static Opm::DeckPtr createDeckNakedGRID() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "PORO\n" - "100*0.10 100*0.20 100*0.30 100*0.40 100*0.50 100*0.60 100*0.70 100*0.80 100*0.90 100*1.0 /\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - - -BOOST_AUTO_TEST_CASE(NAKED_GRID_THROWS) { - /* Check that MULTIPLE Boxed PORV and MULTPV statements work and NTG */ - Opm::DeckPtr deck = createDeckNakedGRID(); - BOOST_CHECK_THROW( getProps(deck) , std::invalid_argument ); -} - -static Opm::DeckPtr createDeckWithPOROZero() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "DX\n" - "1000*0.25 /\n" - "DYV\n" - "10*0.25 /\n" - "DZ\n" - "1000*0.25 /\n" - "TOPS\n" - "100*0.25 /\n" - "PORO\n" - "100*0.10 100*0.20 100*0.30 100*0.40 100*0.50 100*0.60 100*0.70 100*0.80 100*0.90 100*1.0 /\n" - "EQUALS\n" - " ACTNUM 0 1 10 1 10 2 2 /\n" - "/\n" - "EQUALS\n" - " PORO 0 1 10 1 10 3 3 /\n" - "/\n" - "EQUALS\n" - " NTG 0 1 10 1 10 4 4 /\n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()) ; -} - -BOOST_AUTO_TEST_CASE(PORO_ZERO_ACTNUM_CORRECT) { - /* Check that MULTIPLE Boxed PORV and MULTPV statements work and NTG */ - Opm::DeckPtr deck = createDeckWithPOROZero(); - Opm::EclipseState state( *deck , Opm::ParseContext()); - auto grid = state.getInputGrid( ); - - /* Top layer is active */ - BOOST_CHECK( grid->cellActive( 0,0,0 )); - - /* Layer k=1 is inactive due to EQUAL ACTNUM */ - BOOST_CHECK( !grid->cellActive(0,0,1)); - - /* Layer k = 2 is inactive due t PORO = 0 */ - BOOST_CHECK( !grid->cellActive(0,0,2)); - - /* Layer k = 3 is inactive due t NTG = 0 */ - BOOST_CHECK( !grid->cellActive(0,0,2)); - - BOOST_CHECK_EQUAL( grid->getNumActive() , 700U ); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/SatfuncPropertyInitializersTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/SatfuncPropertyInitializersTests.cpp deleted file mode 100644 index d3c5a45729..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/SatfuncPropertyInitializersTests.cpp +++ /dev/null @@ -1,152 +0,0 @@ -/* - Copyright 2015 IRIS - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include -#include -#include - -#define BOOST_TEST_MODULE SatfuncPropertyInitializersTests - -#include - -#include -#include -#include -#include -#include -#include - -using namespace Opm; - -inline void check_property(const Eclipse3DProperties& props1, - const Eclipse3DProperties& props2, - const std::string& propertyName) { - auto& data1 = props1.getDoubleGridProperty(propertyName).getData(); - auto& data2 = props2.getDoubleGridProperty(propertyName).getData(); - - BOOST_CHECK_CLOSE(data1[0], data2[0], 1e-12); -} - -inline Opm::Eclipse3DProperties getProps(Opm::DeckPtr deck) { - return Opm::Eclipse3DProperties(*deck, *new Opm::TableManager(*deck), *new Opm::EclipseGrid(deck)); -} - -BOOST_AUTO_TEST_CASE(SaturationFunctionFamilyTests) { - const char * deckdefault = - "RUNSPEC\n" - "OIL\n" - "GAS\n" - "WATER\n" - "DIMENS\n" - " 1 1 1 /\n" - "TABDIMS\n" - "1 /\n" - "\n" - "GRID\n" - "DX\n" - "1*0.25 /\n" - "DYV\n" - "1*0.25 /\n" - "DZ\n" - "1*0.25 /\n" - "TOPS\n" - "1*0.25 /\n" - "PORO \n" - "1*0.10 /\n" - "PERMX \n" - "10.25 /\n"; - - const char *family1 = - "SWOF\n" - " .2 .0 1.0 .0\n" - " .3 .0 .8 .0\n" - " .5 .5 .5 .0\n" - " .8 .8 .0 .0\n" - " 1.0 1.0 .0 .0 /\n" - "SGOF\n" - " .0 .0 1.0 .0\n" - " .1 .0 .3 .0\n" - " .5 .5 .1 .0\n" - " .7 .8 .0 .0\n" - " .8 1.0 .0 .0/\n"; - - const char *family2 = - "SWFN\n" - " .2 .0 .0\n" - " .3 .0 .0\n" - " .5 .5 .0\n" - " .8 .8 .0\n" - " 1.0 1.0 .0 /\n" - "SGFN\n" - " .0 .0 .0\n" - " .1 .0 .0\n" - " .5 .5 .0\n" - " .7 .8 .0\n" - " .8 1.0 .0/\n" - "SOF3\n" - " .0 .0 .0\n" - " .2 .0 .0\n" - " .3 1* .0\n" - " .5 .5 .1\n" - " .7 .8 .3\n" - " .8 1.0 1.0/\n"; - - ParseContext parseContext; - ParserPtr parser(new Parser()); - - char family1Deck[500] = " "; - strcat(family1Deck , deckdefault); - strcat(family1Deck , family1); - DeckPtr deck1 = parser->parseString(family1Deck, parseContext) ; - const auto prop1 = getProps(deck1); - - - char family2Deck[700] = " "; - strcat(family2Deck , deckdefault); - strcat(family2Deck , family2); - DeckPtr deck2 = parser->parseString(family2Deck, parseContext) ; - const auto prop2 = getProps(deck2); - - check_property(prop1, prop2, "SWL"); - check_property(prop1, prop2, "SWU"); - check_property(prop1, prop2, "SWCR"); - - check_property(prop1, prop2, "SGL"); - check_property(prop1, prop2, "SGU"); - check_property(prop1, prop2, "SGCR"); - - check_property(prop1, prop2, "SOWCR"); - check_property(prop1, prop2, "SOGCR"); - - check_property(prop1, prop2, "PCW"); - check_property(prop1, prop2, "PCG"); - - check_property(prop1, prop2, "KRW"); - check_property(prop1, prop2, "KRO"); - check_property(prop1, prop2, "KRG"); - - char familyMixDeck[1000] = " "; - strcat(familyMixDeck , deckdefault); - strcat(familyMixDeck , family1); - strcat(familyMixDeck , family2); - - DeckPtr deckMix = parser->parseString(familyMixDeck, parseContext) ; - const auto propMix = getProps(deckMix); - BOOST_CHECK_THROW(propMix.getDoubleGridProperty("SGCR") , std::invalid_argument); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/TransMultTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/TransMultTests.cpp deleted file mode 100644 index 6801406207..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Grid/tests/TransMultTests.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include - -#define BOOST_TEST_MODULE EclipseGridTests -#include -#include - -#include -#include - -BOOST_AUTO_TEST_CASE(Empty) { - Opm::TransMult transMult(10,10,10); - - BOOST_CHECK_THROW( transMult.getMultiplier(12,10,10 , Opm::FaceDir::XPlus) , std::invalid_argument ); - BOOST_CHECK_THROW( transMult.getMultiplier(1000 , Opm::FaceDir::XPlus) , std::invalid_argument ); - - BOOST_CHECK_EQUAL( transMult.getMultiplier(9,9,9, Opm::FaceDir::YPlus) , 1.0 ); - BOOST_CHECK_EQUAL( transMult.getMultiplier(100 , Opm::FaceDir::ZPlus) , 1.0 ); - - BOOST_CHECK_EQUAL( transMult.getMultiplier(9,9,9, Opm::FaceDir::YMinus) , 1.0 ); - BOOST_CHECK_EQUAL( transMult.getMultiplier(100 , Opm::FaceDir::ZMinus) , 1.0 ); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/IOConfig/IOConfig.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/IOConfig/IOConfig.cpp deleted file mode 100644 index 5a66b4be1d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/IOConfig/IOConfig.cpp +++ /dev/null @@ -1,249 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - - - - -namespace Opm { - - namespace { - const char* default_dir = "."; - - inline std::string basename( const std::string& path ) { - return boost::filesystem::path( path ).stem().string(); - } - - inline std::string outputdir( const std::string& path ) { - auto dir = boost::filesystem::path( path ).parent_path().string(); - - if( dir.empty() ) return default_dir; - - return dir; - } - } - - - IOConfig::IOConfig( const Deck& deck ) : - IOConfig( GRIDSection( deck ), - RUNSPECSection( deck ), - std::make_shared< const TimeMap >( deck ), - deck.hasKeyword("NOSIM"), - deck.getDataFile() ) - {} - - IOConfig::IOConfig( const std::string& input_path ) : - m_deck_filename( input_path ), - m_output_dir( outputdir( input_path ) ), - m_base_name( basename( input_path ) ) - {} - - static inline bool write_egrid_file( const GRIDSection& grid ) { - if( grid.hasKeyword( "NOGGF" ) ) return false; - if( !grid.hasKeyword( "GRIDFILE" ) ) return true; - - const auto& keyword = grid.getKeyword( "GRIDFILE" ); - - if( keyword.size() == 0 ) return false; - - const auto& rec = keyword.getRecord( 0 ); - const auto& item1 = rec.getItem( 0 ); - - if( item1.hasValue( 0 ) && item1.get< int >( 0 ) != 0 ) { - std::cerr << "IOConfig: Reading GRIDFILE keyword from GRID section: " - << "Output of GRID file is not supported. " - << "Supported format: EGRID" - << std::endl; - return true; - } - - if( rec.size() < 1 ) return true; - - const auto& item2 = rec.getItem( 1 ); - return !item2.hasValue( 0 ) || item2.get< int >( 0 ) != 0; - } - - IOConfig::IOConfig( const GRIDSection& grid, - const RUNSPECSection& runspec, - std::shared_ptr< const TimeMap > timemap, - bool nosim, - const std::string& input_path ) : - m_timemap( timemap ), - m_write_INIT_file( grid.hasKeyword( "INIT" ) ), - m_write_EGRID_file( write_egrid_file( grid ) ), - m_UNIFIN( runspec.hasKeyword( "UNIFIN" ) ), - m_UNIFOUT( runspec.hasKeyword( "UNIFOUT" ) ), - m_FMTIN( runspec.hasKeyword( "FMTIN" ) ), - m_FMTOUT( runspec.hasKeyword( "FMTOUT" ) ), - m_deck_filename( input_path ), - m_output_dir( outputdir( input_path ) ), - m_base_name( basename( input_path ) ), - m_nosim( nosim ) - {} - - - bool IOConfig::getWriteEGRIDFile() const { - return m_write_EGRID_file; - } - - bool IOConfig::getWriteINITFile() const { - return m_write_INIT_file; - } - - - /* - Will initialize an internal variable holding the first report - step when rft output is queried. The reason we are interested in - this report step is that when we reach this step the output - files should be opened with mode 'w' - whereas for subsequent - steps it should be opened with mode 'a'. - */ - - void IOConfig::initFirstRFTOutput(const Schedule& schedule) { - m_first_rft_step = -1; - - for (const auto& well : schedule.getWells( )) { - int well_output = well->firstRFTOutput(); - if (well_output >= 0) { - if ((m_first_rft_step < 0) || (well_output < m_first_rft_step)) - m_first_rft_step = well_output; - } - } - } - - - - - void IOConfig::overrideNOSIM(bool nosim) { - m_nosim = nosim; - } - - - bool IOConfig::getUNIFIN() const { - return m_UNIFIN; - } - - bool IOConfig::getUNIFOUT() const { - return m_UNIFOUT; - } - - bool IOConfig::getFMTIN() const { - return m_FMTIN; - } - - bool IOConfig::getFMTOUT() const { - return m_FMTOUT; - } - - - - boost::gregorian::date IOConfig::getTimestepDate(size_t reportStep) const { - auto time = (*m_timemap)[reportStep]; - return time.date(); - } - - - - std::string IOConfig::getRestartFileName(const std::string& restart_base, int report_step, bool output) const { - bool unified = output ? getUNIFOUT() : getUNIFIN(); - bool fmt_file = output ? getFMTOUT() : getFMTIN(); - - ecl_file_enum file_type = (unified) ? ECL_UNIFIED_RESTART_FILE : ECL_RESTART_FILE; - char * c_str = ecl_util_alloc_filename( NULL , restart_base.c_str() , file_type, fmt_file , report_step); - std::string restart_filename = c_str; - free( c_str ); - - return restart_filename; - } - - - int IOConfig::getFirstRFTStep() const { - return m_first_rft_step; - } - - bool IOConfig::getOutputEnabled(){ - return m_output_enabled; - } - - void IOConfig::setOutputEnabled(bool enabled){ - m_output_enabled = enabled; - } - - std::string IOConfig::getOutputDir() const { - return m_output_dir; - } - - void IOConfig::setOutputDir(const std::string& outputDir) { - m_output_dir = outputDir; - } - - const std::string& IOConfig::getBaseName() const { - return m_base_name; - } - - void IOConfig::setBaseName(std::string baseName) { - m_base_name = baseName; - } - - std::string IOConfig::fullBasePath( ) const { - namespace fs = boost::filesystem; - - fs::path dir( m_output_dir ); - fs::path base( m_base_name ); - fs::path full_path = dir.make_preferred() / base.make_preferred(); - - return full_path.string(); - } - - - bool IOConfig::initOnly( ) const { - return m_nosim; - } - - - /*****************************************************************/ - /* Here at the bottom are some forwarding proxy methods which just - forward to the appropriate RestartConfig method. They are - retained here as a temporary convenience method to prevent - downstream breakage. - - Currently the EclipseState object can return a mutable IOConfig - object, which application code can alter to override settings - from the deck - this is quite ugly. When the API is reworked to - remove the ability modify IOConfig objects we should also - remove these forwarding methods. - */ - -} //namespace Opm diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp deleted file mode 100644 index 44c8d0d3d6..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp +++ /dev/null @@ -1,197 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef OPM_IO_CONFIG_HPP -#define OPM_IO_CONFIG_HPP - -#include - -namespace Opm { - - template< typename > class DynamicState; - - class Deck; - class DeckKeyword; - class GRIDSection; - class RUNSPECSection; - class TimeMap; - class Schedule; - - /*The IOConfig class holds data about input / ouput configurations - - Amongst these configuration settings, a IOConfig object knows if - a restart file should be written for a specific report step - - The write of restart files is governed by several eclipse keywords. - These keywords are all described in the eclipse manual, but some - of them are rather porly described there. - To have equal sets of restart files written from Eclipse and Flow for various - configurations, we have made a qualified guess on the behaviour - for some of the keywords (by running eclipse for different configurations, - and looked at which restart files that have been written). - - - ------ RPTSOL RESTART (solution section) ------ - If RPTSOL RESTART > 1 initial restart file is written. - - - ------ RPTRST (solution section) ------ - Eclipse manual states that the initial restart file is to be written - if RPTSOL RESTART > 1. But - due to that the initial restart file - is written from Eclipse for data where RPTSOL RESTART is not set, - we - have made a guess that when RPTRST is set in SOLUTION (no basic though...), - it means that the initial restart file should be written. - Running of eclipse with different settings have proven this to be a qualified guess. - - - ------ RPTRST BASIC=0 (solution or schedule section) ------ - No restart files are written - - - ------ RPTRST BASIC=1 or RPTRST BASIC=2 (solution or schedule section) ------ - Restart files are written for every timestep, from timestep 1 to number of timesteps. - (Write of inital timestep is governed by a separate setting) - - Notice! Eclipse simulator RPTRST BASIC=1 writes restart files for every - report step, but only keeps the last one written. This functionality is - not supported in Flow; so to compare Eclipse results with Flow results - for every report step, set RPTRST BASIC=2 for the eclipse run - - - ------ RPTRST BASIC=3 FREQ=n (solution or schedule section) ------ - Restart files are created every nth report time. Default frequency is 1 (every report step) - - If a frequency higher than 1 is given: - start_rs = report step the setting was given. - write report step rstep if (rstep >= start_rs) && ((rstep % frequency) == 0). - - - ------ RPTRST BASIC=4 FREQ=n or RPTRST BASIC=5 FREQ=n (solution or schedule section) ------ - For the settings BASIC 4 or BASIC 5, - first report step of every new year(4) or new month(5), - the first report step is compared with report step 0 (start), and then every report step is - compared with the previous one to see if year/month has changed. - - This leaves us with a set of timesteps. - All timesteps in the set that are higher or equal to the timestep the RPTRST keyword was set on is written. - - If in addition FREQUENCY is given (higher than 1), every n'the value of this set are to be written. - - If the setting BASIC=4 or BASIC=5 is set on a timestep that is a member of the set "first timestep of - each year" / "First timestep of each month", then the timestep that is freq-1 timesteps (within the set) from - this start timestep will be written, and then every n'the timestep (within the set) from this one will be written. - - If the setting BASIC=4 or BASIC=5 is set on a timestep that is not a member of the list "first timestep of - each year" / "First timestep of each month", then the list is searched for the closest timestep that are - larger than the timestep that introduced the setting, and then; same as above - the timestep that is freq-1 - timesteps from this one (within the set) will be written, and then every n'the timestep (within the set) from - this one will be written. - - - ------ RPTRST BASIC=6 (solution or schedule section) ------ - Not supported in Flow - - - ------ Default ------ - If no keywords for config of writing restart files have been handled; no restart files are written. - - */ - - - - class IOConfig { - - public: - - IOConfig() = default; - explicit IOConfig( const Deck& ); - explicit IOConfig( const std::string& input_path ); - - - int getFirstRFTStep() const; - bool getWriteEGRIDFile() const; - bool getWriteINITFile() const; - bool getUNIFOUT() const; - bool getUNIFIN() const; - bool getFMTIN() const; - bool getFMTOUT() const; - const std::string& getEclipseInputPath() const; - - void overrideNOSIM(bool nosim); - - - - boost::gregorian::date getTimestepDate(size_t timestep) const; - - std::string getRestartFileName(const std::string& restart_base, int report_step, bool output) const; - - bool getOutputEnabled(); - void setOutputEnabled(bool enabled); - - std::string getOutputDir() const; - void setOutputDir(const std::string& outputDir); - - const std::string& getBaseName() const; - void setBaseName(std::string baseName); - - /// Return a string consisting of outputpath and basename; - /// i.e. /path/to/sim/CASE - std::string fullBasePath( ) const; - - bool initOnly() const; - void initFirstRFTOutput(const Schedule& schedule); - - // Proxy methods forwarding directly to corresponding RestartConfig - bool getWriteRestartFile(size_t timestep) const; - int getFirstRestartStep() const; - void overrideRestartWriteInterval(size_t interval); - void setWriteInitialRestartFile(bool writeInitialRestartFile); - - private: - std::shared_ptr< const TimeMap > m_timemap; - bool m_write_INIT_file = false; - bool m_write_EGRID_file = true; - bool m_UNIFIN = false; - bool m_UNIFOUT = false; - bool m_FMTIN = false; - bool m_FMTOUT = false; - int m_first_restart_step; - int m_first_rft_step; - std::string m_deck_filename; - bool m_output_enabled = true; - std::string m_output_dir; - std::string m_base_name; - bool m_nosim; - - IOConfig( const GRIDSection&, - const RUNSPECSection&, - std::shared_ptr< const TimeMap >, - bool nosim, - const std::string& input_path ); - - }; - - - typedef std::shared_ptr IOConfigPtr; - typedef std::shared_ptr IOConfigConstPtr; - -} //namespace Opm - - - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/IOConfig/RestartConfig.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/IOConfig/RestartConfig.cpp deleted file mode 100644 index 4c034c8a5f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/IOConfig/RestartConfig.cpp +++ /dev/null @@ -1,650 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - - - -namespace Opm { - -namespace { - -inline bool is_int( const std::string& x ) { - auto is_digit = []( char c ) { return std::isdigit( c ); }; - - return !x.empty() - && ( x.front() == '-' || is_digit( x.front() ) ) - && std::all_of( x.begin() + 1, x.end(), is_digit ); -} - -constexpr const char* RSTIntegerKeywords[] = { "BASIC", // 1 - "FLOWS", // 2 - "FIP", // 3 - "POT", // 4 - "PBPD", // 5 - "FREQ", // 6 - "PRES", // 7 - "VISC", // 8 - "DEN", // 9 - "DRAIN", // 10 - "KRO", // 11 - "KRW", // 12 - "KRG", // 13 - "PORO", // 14 - "NOGRAD", // 15 - "NORST", // 16 NORST - not supported - "SAVE", // 17 - "SFREQ", // 18 SFREQ=?? - not supported - "ALLPROPS", // 19 - "ROCKC", // 20 - "SGTRAP", // 21 - "", // 22 - Blank - ignored. - "RSSAT", // 23 - "RVSAT", // 24 - "GIMULT", // 25 - "SURFBLK", // 26 - "", // 27 - PCOW, PCOG, special cased - "STREAM", // 28 STREAM=?? - not supported - "RK", // 29 - "VELOCITY", // 30 - "COMPRESS" }; // 31 - -constexpr const char* SCHEDIntegerKeywords[] = { "PRES", // 1 - "SOIL", // 2 - "SWAT", // 3 - "SGAS", // 4 - "RS", // 5 - "RV", // 6 - "RESTART", // 7 - "FIP", // 8 - "WELLS", // 9 - "VFPPROD", // 10 - "SUMMARY", // 11 - "CPU", // 12 - "AQUCT", // 13 - "WELSPECS",// 14 - "NEWTON", // 15 - "POILD", // 16 - "PWAT", // 17 - "PWATD", // 18 - "PGAS", // 19 - "PGASD", // 20 - "FIPVE", // 21 - "WOC", // 22 - "GOC", // 23 - "WOCDIFF", // 24 - "GOCDIFF", // 25 - "WOCGOC", // 26 - "ODGAS", // 27 - "ODWAT", // 28 - "GDOWAT", // 29 - "WDOGAS", // 30 - "OILAPI", // 31 - "FIPITR", // 32 - "TBLK", // 33 - "PBLK", // 34 - "SALT", // 35 - "PLYADS", // 36 - "RK", // 37 - "FIPSALT", // 38 - "TUNING", // 39 - "GI", // 40 - "ROCKC", // 41 - "SPENWAT", // 42 - "FIPSOL", // 43 - "SURFBLK", // 44 - "SURFADS", // 45 - "FIPSURF", // 46 - "TRADS", // 47 - "VOIL", // 48 - "VWAT", // 49 - "VGAS", // 50 - "DENO", // 51 - "DENW", // 52 - "DENG", // 53 - "GASCONC", // 54 - "PB", // 55 - "PD", // 56 - "KRW", // 57 - "KRO", // 58 - "KRG", // 59 - "MULT", // 60 - "UNKNOWN", // 61 61 and 62 are not listed in the manual - "UNKNOWN", // 62 - "FOAM", // 63 - "FIPFOAM", // 64 - "TEMP", // 65 - "FIPTEMP", // 66 - "POTC", // 67 - "FOAMADS", // 68 - "FOAMDCY", // 69 - "FOAMMOB", // 70 - "RECOV", // 71 - "FLOOIL", // 72 - "FLOWAT", // 73 - "FLOGAS", // 74 - "SGTRAP", // 75 - "FIPRESV", // 76 - "FLOSOL", // 77 - "KRN", // 78 - "GRAD", // 79 - }; - -bool is_RPTRST_mnemonic( const std::string& kw ) { - /* all eclipse 100 keywords we want to not simply ignore. The list is - * sorted, so we can use binary_search for log(n) lookup. It is important - * that the list is sorted, but these are all the keywords listed in the - * manual and unlikely to change at all - */ - static constexpr const char* valid[] = { - "ACIP", "ACIS", "ALLPROPS", "BASIC", "BG", "BO", - "BW", "CELLINDX", "COMPRESS", "CONV", "DEN", "DRAIN", - "DRAINAGE", "DYNREG", "FIP", "FLORES", "FLOWS", "FREQ", - "GIMULT", "HYDH", "HYDHFW", "KRG", "KRO", "KRW", - "NOGRAD", "NORST", "NPMREB", "PBPD", "PCOG", "PCOW", - "PERMREDN", "POIS", "PORO", "PORV", "POT", "PRES", - "RFIP", "RK", "ROCKC", "RPORV", "RSSAT", "RVSAT", - "SAVE", "SDENO", "SFIP", "SFREQ", "SGTRAP", "SIGM_MOD", - "STREAM", "SURFBLK", "TRAS", "VELGAS", "VELOCITY", "VELOIL", - "VELWAT", "VISC", - }; - - return std::binary_search( std::begin( valid ), std::end( valid ), kw ); -} - -bool is_RPTSCHED_mnemonic( const std::string& kw ) { - static constexpr const char* valid[] = { - "ALKALINE", "ANIONS", "AQUCT", "AQUFET", "AQUFETP", "BFORG", - "CATIONS", "CPU", "DENG", "DENO", "DENW", "ESALPLY", - "ESALSUR", "FFORG", "FIP", "FIPFOAM", "FIPHEAT", "FIPRESV", - "FIPSALT", "FIPSOL", "FIPSURF", "FIPTEMP", "FIPTR", "FIPVE", - "FLOGAS", "FLOOIL", "FLOSOL", "FLOWAT", "FMISC", "FOAM", - "FOAMADS", "FOAMCNM", "FOAMDCY", "FOAMMOB", "GASCONC", "GASSATC", - "GDOWAT", "GI", "GOC", "GOCDIFF", "GRAD", "KRG", - "KRN", "KRO", "KRW", "MULT", "NEWTON", "NOTHING", - "NPMREB", "ODGAS", "ODWAT", "OILAPI", "PB", "PBLK", - "PBU", "PD", "PDEW", "PGAS", "PGASD", "PLYADS", - "POIL", "POILD", "POLYMER", "POTC", "POTG", "POTO", - "POTW", "PRES", "PRESSURE", "PWAT", "PWATD", "RECOV", - "RESTART", "ROCKC", "RS", "RSSAT", "RV", "RVSAT", - "SALT", "SGAS", "SGTRAP", "SIGM_MOD", "SOIL", "SSOL", - "SUMMARY", "SURFADS", "SURFBLK", "SWAT", "TBLK", "TEMP", - "TRACER", "TRADS", "TRDCY", "TUNING", "VFPPROD", "VGAS", - "VOIL", "VWAT", "WDOGAS", "WELLS", "WELSPECL", "WELSPECS", - "WOC", "WOCDIFF", "WOCGOC", - }; - - return std::binary_search( std::begin( valid ), std::end( valid ), kw ); -} - -} - - RestartSchedule::RestartSchedule( size_t sched_restart) : - rptsched_restart_set( true ), - rptsched_restart( sched_restart ) - { - } - - RestartSchedule::RestartSchedule( size_t step, size_t b, size_t freq) : - timestep( step ), - basic( b ), - frequency( basic > 2 ? std::max( freq, size_t{ 1 } ) : freq ) - { - /* - * if basic > 2 and freq is default (zero) we're looking at an error - * (every Nth step where N = 0). Instead of throwing we default this to - * 1 so that basic > 2 and freq unset essentially is - * write-every-timestep. It could've just as easily been an exception, - * but to be more robust handling poorly written decks we instead set a - * reasonable default and carry on. - */ - } - - bool RestartSchedule::operator!=(const RestartSchedule & rhs) const { - return !( *this == rhs ); - } - - bool RestartSchedule::operator==( const RestartSchedule& rhs ) const { - if( this->rptsched_restart_set ) { - return rhs.rptsched_restart_set - && this->rptsched_restart == rhs.rptsched_restart; - } - - return this->timestep == rhs.timestep && - this->basic == rhs.basic && - this->frequency == rhs.frequency; - } - -inline std::map< std::string, int > -RPTRST_integer( const std::vector< int >& ints ) { - const size_t PCO_index = 26; - const size_t BASIC_index = 0; - - std::map< std::string, int > mnemonics; - const size_t size = std::min( ints.size(), sizeof( RSTIntegerKeywords ) ); - - /* fun with special cases. Eclipse seems to ignore the BASIC=0, - * interpreting it as sort-of "don't modify". Handle this by *not* - * adding/updating the integer list sourced BASIC mnemonic, should it be - * zero. I'm not sure if this applies to other mnemonics, but the eclipse - * manual indicates that any zero here should disable the output. - * - * See https://github.com/OPM/opm-parser/issues/886 for reference - */ - if( size > 0 && ints[ BASIC_index ] != 0 ) - mnemonics[ RSTIntegerKeywords[ BASIC_index ] ] = ints[ BASIC_index ]; - - for( size_t i = 1; i < std::min( size, PCO_index ); ++i ) - mnemonics[ RSTIntegerKeywords[ i ] ] = ints[ i ]; - - for( size_t i = PCO_index + 1; i < size; ++i ) - mnemonics[ RSTIntegerKeywords[ i ] ] = ints[ i ]; - - /* item 27 (index 26) sets both PCOW and PCOG, so we special case it */ - if( ints.size() >= PCO_index ) { - mnemonics[ "PCOW" ] = ints[ PCO_index ]; - mnemonics[ "PCOG" ] = ints[ PCO_index ]; - } - - return std::move( mnemonics ); -} - -inline std::map< std::string, int > -RPTSCHED_integer( const std::vector< int >& ints ) { - const size_t size = std::min( ints.size(), sizeof( SCHEDIntegerKeywords ) ); - - std::map< std::string, int > mnemonics; - for( size_t i = 0; i < size; ++i ) - mnemonics[ SCHEDIntegerKeywords[ i ] ] = ints[ i ]; - - return std::move( mnemonics ); -} - -template< typename F, typename G > -inline std::map< std::string, int > RPT( const DeckKeyword& keyword, - F is_mnemonic, - G integer_mnemonic ) { - - const auto& items = keyword.getStringData(); - const auto ints = std::any_of( items.begin(), items.end(), is_int ); - const auto strs = !std::all_of( items.begin(), items.end(), is_int ); - - /* if any of the values are pure integers we assume this is meant to be - * the slash-terminated list of integers way of configuring. If - * integers and non-integers are mixed, this is an error. - */ - if( ints && strs ) throw std::runtime_error( - "RPTRST does not support mixed mnemonics and integer list." - ); - - auto stoi = []( const std::string& str ) { return std::stoi( str ); }; - if( ints ) - return integer_mnemonic( fun::map( stoi, items ) ); - - std::map< std::string, int > mnemonics; - - for( const auto& mnemonic : items ) { - const auto pos = mnemonic.find( '=' ); - - std::string base = mnemonic.substr( 0, pos ); - if( !is_mnemonic( base ) ) continue; - - const int val = pos != std::string::npos - ? std::stoi( mnemonic.substr( pos + 1 ) ) - : 1; - - mnemonics.emplace( base, val ); - } - - return std::move( mnemonics ); -} - -void expand_RPTRST_mnemonics(std::map< std::string, int >& mnemonics) { - const auto allprops = mnemonics.find( "ALLPROPS"); - if (allprops != mnemonics.end()) { - const auto value = allprops->second; - mnemonics.erase( "ALLPROPS" ); - - for (const auto& kw : {"BG","BO","BW","KRG","KRO","KRW","VOIL","VGAS","VWAT","DEN"}) - mnemonics[kw] = value; - - } -} - - -inline std::pair< std::map< std::string, int >, RestartSchedule > -RPTRST( const DeckKeyword& keyword, RestartSchedule prev, size_t step ) { - auto mnemonics = RPT( keyword, is_RPTRST_mnemonic, RPTRST_integer ); - - const bool has_freq = mnemonics.find( "FREQ" ) != mnemonics.end(); - const bool has_basic = mnemonics.find( "BASIC" ) != mnemonics.end(); - - expand_RPTRST_mnemonics( mnemonics ); - - if( !has_freq && !has_basic ) return { std::move( mnemonics ), {} }; - - const auto basic = has_basic ? mnemonics.at( "BASIC" ) : prev.basic; - const auto freq = has_freq ? mnemonics.at( "FREQ" ) : prev.frequency; - - return { std::move( mnemonics ), { step, basic, freq } }; -} - -inline std::pair< std::map< std::string, int >, RestartSchedule > -RPTSCHED( const DeckKeyword& keyword ) { - auto mnemonics = RPT( keyword, is_RPTSCHED_mnemonic, RPTSCHED_integer ); - - if( mnemonics.count( "NOTHING" ) ) - return { std::move( mnemonics ), { 0 } }; - - if( mnemonics.count( "RESTART" ) ) - return { std::move( mnemonics ), size_t( mnemonics.at( "RESTART" ) ) }; - - return { std::move( mnemonics ), {} }; -} - - - -void RestartConfig::handleScheduleSection(const SCHEDULESection& schedule) { - size_t current_step = 1; - RestartSchedule unset; - - auto ignore_RPTSCHED_RESTART = []( decltype( restart_schedule )& x ) { - return x.back().basic > 2; - }; - - for( const auto& keyword : schedule ) { - const auto& name = keyword.name(); - - if( name == "DATES" ) { - current_step += keyword.size(); - continue; - } - - if( name == "TSTEP" ) { - current_step += keyword.getRecord( 0 ).getItem( 0 ).size(); - continue; - } - - if( !( name == "RPTRST" || name == "RPTSCHED" ) ) continue; - if( this->m_timemap->size() <= current_step ) continue; - - const bool is_RPTRST = name == "RPTRST"; - const auto& prev_sched = this->restart_schedule.back(); - - auto config = is_RPTRST - ? RPTRST( keyword, prev_sched, current_step ) - : RPTSCHED( keyword ); - - /* add the missing entries from the previous step */ - { - auto& mnemonics = config.first; - const auto& prev_mnemonics = this->restart_keywords.back(); - mnemonics.insert( prev_mnemonics.begin(), prev_mnemonics.end() ); - - if( mnemonics.find( "NOTHING" ) != mnemonics.end() ) - mnemonics.clear(); - - this->restart_keywords.update( current_step , mnemonics ); - } - const bool ignore_RESTART = - !is_RPTRST && ignore_RPTSCHED_RESTART( this->restart_schedule ); - - const auto& rs = config.second; - if( rs == unset || ignore_RESTART ) continue; - - if( 6 == rs.rptsched_restart || 6 == rs.basic ) - throw std::runtime_error( - "OPM does not support the RESTART=6 setting " - "(write restart file every timestep)" - ); - - this->restart_schedule.update( current_step, rs ); - } -} - - bool RestartSchedule::writeRestartFile( size_t input_timestep , const TimeMap& timemap) const { - if (this->rptsched_restart_set && (this->rptsched_restart > 0)) - return true; - - switch (basic) { - //Do not write restart files - case 0: return false; - - //Write restart file every report time - case 1: return true; - - //Write restart file every report time - case 2: return true; - - //Every n'th report time - case 3: return ((input_timestep % this->frequency) == 0) ? true : false; - - //First reportstep of every year, or if n > 1, n'th years - case 4: return timemap.isTimestepInFirstOfMonthsYearsSequence(input_timestep, true , this->timestep, this->frequency); - - //First reportstep of every month, or if n > 1, n'th months - case 5: return timemap.isTimestepInFirstOfMonthsYearsSequence(input_timestep, false , this->timestep, this->frequency); - - default: return false; - } - } - - - - RestartConfig::RestartConfig( const Deck& deck ) : - RestartConfig( SCHEDULESection( deck ), - SOLUTIONSection( deck ), - std::make_shared< const TimeMap >( deck )) - {} - - - RestartConfig::RestartConfig( const SCHEDULESection& schedule, - const SOLUTIONSection& solution, - std::shared_ptr< const TimeMap > timemap) : - m_timemap( timemap ), - m_first_restart_step( -1 ), - restart_schedule( timemap, { 0, 0, 1 } ), - restart_keywords( timemap, {} ) - { - handleSolutionSection( solution ); - handleScheduleSection( schedule ); - - initFirstOutput( ); - } - - - RestartSchedule RestartConfig::getNode( size_t timestep ) const{ - return restart_schedule.get(timestep); - } - - - bool RestartConfig::getWriteRestartFile(size_t timestep) const { - if (0 == timestep) - return m_write_initial_RST_file; - - { - RestartSchedule ts_restart_config = getNode( timestep ); - return ts_restart_config.writeRestartFile( timestep , *m_timemap ); - } - } - - - const std::map< std::string, int >& RestartConfig::getRestartKeywords( size_t timestep ) const { - return restart_keywords.at( timestep ); - } - - - int RestartConfig::getKeyword( const std::string& keyword, size_t timeStep) const { - const std::map< std::string, int >& keywords = this->getRestartKeywords( timeStep ); - const auto iter = keywords.find( keyword ); - if (iter == keywords.end()) { - if (is_RPTRST_mnemonic( keyword )) - return 0; - else - throw std::invalid_argument("The mnenomic " + keyword + " is not recognized"); - } else - return iter->second; - } - - /* - Will initialize the internal variable holding the first report - step when restart output is queried. - - The reason we are interested in this report step is that when we - reach this step the output files should be opened with mode 'w' - - whereas for subsequent steps they should be opened with mode - 'a'. - */ - - void RestartConfig::initFirstOutput( ) { - size_t report_step = 0; - while (true) { - if (getWriteRestartFile(report_step)) { - m_first_restart_step = report_step; - break; - } - report_step++; - if (report_step == m_timemap->size()) - break; - } - } - - - void RestartConfig::handleSolutionSection(const SOLUTIONSection& solutionSection) { - if (solutionSection.hasKeyword("RPTRST")) { - const auto& rptrstkeyword = solutionSection.getKeyword("RPTRST"); - - const auto rptrst = RPTRST( rptrstkeyword, {}, 0 ); - this->restart_keywords.updateInitial( rptrst.first ); - this->restart_schedule.updateInitial( rptrst.second ); - setWriteInitialRestartFile(true); // Guessing on eclipse rules for write of initial RESTART file (at time 0): - // Write of initial restart file is (due to the eclipse reference manual) - // governed by RPTSOL RESTART in solution section, - // if RPTSOL RESTART > 1 initial restart file is written. - // but - due to initial restart file written from Eclipse - // for data where RPTSOL RESTART not set - guessing that - // when RPTRST is set in SOLUTION (no basic though...) -> write inital restart. - } //RPTRST - - - if (solutionSection.hasKeyword("RPTSOL") && (m_timemap->size() > 0)) { - handleRPTSOL(solutionSection.getKeyword("RPTSOL")); - } //RPTSOL - } - - - void RestartConfig::overrideRestartWriteInterval(size_t interval) { - size_t step = 0; - /* write restart files if the interval is non-zero. The restart - * mnemonic (setting) that governs restart-on-interval is BASIC=3 - */ - size_t basic = interval > 0 ? 3 : 0; - - RestartSchedule rs( step, basic, interval ); - restart_schedule.globalReset( rs ); - - setWriteInitialRestartFile( interval > 0 ); - } - - - void RestartConfig::setWriteInitialRestartFile(bool writeInitialRestartFile) { - m_write_initial_RST_file = writeInitialRestartFile; - } - - - void RestartConfig::handleRPTSOL( const DeckKeyword& keyword) { - const auto& record = keyword.getRecord(0); - - size_t restart = 0; - size_t found_mnemonic_RESTART = 0; - bool handle_RPTSOL_RESTART = false; - - const auto& item = record.getItem(0); - - for (size_t index = 0; index < item.size(); ++index) { - const std::string& mnemonic = item.get< std::string >(index); - - found_mnemonic_RESTART = mnemonic.find("RESTART="); - if (found_mnemonic_RESTART != std::string::npos) { - std::string restart_no = mnemonic.substr(found_mnemonic_RESTART+8, mnemonic.size()); - restart = boost::lexical_cast(restart_no); - handle_RPTSOL_RESTART = true; - } - } - - - /* If no RESTART mnemonic is found, either it is not present or we might - have an old data set containing integer controls instead of mnemonics. - Restart integer switch is integer control nr 7 */ - - if (found_mnemonic_RESTART == std::string::npos) { - if (item.size() >= 7) { - const std::string& integer_control = item.get< std::string >(6); - try { - restart = boost::lexical_cast(integer_control); - handle_RPTSOL_RESTART = true; - } catch (boost::bad_lexical_cast &) { - //do nothing - } - } - } - - if (handle_RPTSOL_RESTART) { - if (restart > 1) { - setWriteInitialRestartFile(true); - } else { - setWriteInitialRestartFile(false); - } - } - } - - - - std::string RestartConfig::getRestartFileName(const std::string& restart_base, int report_step, bool unified , bool fmt_file) { - - ecl_file_enum file_type = (unified) ? ECL_UNIFIED_RESTART_FILE : ECL_RESTART_FILE; - char * c_str = ecl_util_alloc_filename( NULL , restart_base.c_str() , file_type, fmt_file , report_step); - std::string restart_filename = c_str; - free( c_str ); - - return restart_filename; - } - - - int RestartConfig::getFirstRestartStep() const { - return m_first_restart_step; - } - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/IOConfig/RestartConfig.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/IOConfig/RestartConfig.hpp deleted file mode 100644 index 83b015b187..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/IOConfig/RestartConfig.hpp +++ /dev/null @@ -1,375 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef OPM_RESTART_CONFIG_HPP -#define OPM_RESTART_CONFIG_HPP - -#include -#include -#include -#include - -/* - The RestartConfig class internalizes information of when (at which - report steps) we should save restart files, and which properties - should be included in the restart files. The configuration of this - immensely complex, and this code is unfortunately also way too - complex. - - The most basic question to disentangle is the "When to write restart - files" versus "What data to store write in the restart file". As - expressed in the deck keywords this completely entangled, in this - implementation we have tried to disentangle it: - - Keywords involved - ----------------- - - RPTRST: This is the main keyword for configuring restart output; it - can be used to configure bothe when to write the files and which - properties should be included in the restart files. - - - RPTSCHED: The main purpose of the RPTSCHED keyword is to configure - output from the SCHEDULE section to the PRINT file. However the - mneomnic RESTART=n can be used to turn writing of restart files - on, and also for values > 2 to some configuration of what is - written to the restart file: - - RESTART=1 : As RPTRST,BASIC=1 - RESTART>1 : As RPTRST,BASIC=2 - RESTART>2 : Flow is added to restart file - RESTART>3 : Fluid in place is added to restart file - RESTART=6 : Restart file for every timestep. - - - - RPTSOL: The RPTSOL keyword is very similar to the RPTCHED keyword, - it configures output from the SOLUTION section to the PRINT file, - but just as the RPTSCHED keyword it accepts a RESTART=n mnenonic - which can be used similarly to the BASIC=n mnenonic of the RPTRST - keyword. In particular the writing of an initial restart files - with initial equilibrium solution is controlled by the RPTSOL - keyword. If the restart mneonic is greater than 2 that can be - used to configure FLOWS and FIP keywords in the restart file. - - RESTART=1 : As RPTRST,BASIC=1 - RESTART>1 : As RPTRST,BASIC=2 - RESTART>2 : Flow is added to restart file - RESTART>3 : Fluid in place is added to restart file - - - The basic rule in ECLIPSE is generally that the 'last keyword wins', - but for the RPTRST RPTSHCED combination a BASIC setting with n >= 3 - will override consecutive RESTART=n settings from RPTSCHED. - - - When to write restart files: - ---------------------------- - - When to write the restart file is governed by the BASIC=n setting in - the RPTRST keyword and the RESTART=n settings in the RPTSOL and - RPTSCHED keywords. The most common setting is 'ON' - i.e. BASIC=2 - which means write a restart file for every report step, that can be - turned off again with BASIC=0. For BASIC>2 there are varietes of - every n'th report step, and the first report step in every month and - every year. - - - Old style / new style - --------------------- - - All of the relevant keywords can be specified using a new style - based on string mneomnics and alternatively an old style represented - with a *strictly ordered* list of integers. For instance both of - these keywords request restart files written for every report step; - in addition to the fields required to actually restart the files - should contain the relative permeabilities KRO, KRW, KRG: - - RPTRST - BASIC=2 KRG KRW KRO / - - - RPTRST - 2 9*0 3*1 17*0 - - Integer controls and string mneomnics can not be mixed in the same - keyword, but they can be mixed in the same deck - and that is - actually quite common. - - - What is written to the restart file - ----------------------------------- - - The BASIC=n mneonics request the writing of a restart file which - should contain 'all properties required to restart', in addition you - can configure extra keywords to be added to the restart file. This - is configured by just adding a list as: - - RPTRST - BASIC=2 KRG KRW KRO / - - It is really *not clear* what is the correct persistence semantics - for these keywords, consider for insance the following series of keywords: - - -- Request restart file at every report step, the restart files - -- should contain additional properties KRO, KRG and KRW. - RPTRST - BASIC=2 KRG KRW KRO / - - -- Advance the simulator forward with TSTEP / DATES - TSTEP / DATES / WCONxxx - - -- Turn writing of restart files OFF using integer controls. - RPTRST - 0 / - - -- Advance the simulator forward with TSTEP / DATES - TSTEP / DATES / WCONxxx - - -- Turn writing of restart files ON using integer controls. - RPTRST - 2 / - - When writing of restart files is turned on again with the last - RPTRST keyword, should still the relative permeabilites KRO, KRW and - KRG be added to the restart files? The model we have implemented is: - - - The list of keywords written to the restart file is persisted - independtly of the BASIC=n setting. - - - Using string based mnonics you can *only add* kewyords to be - written to the files. To stop writing a keyword you must use an - integer control with value 0. - - Based on this best guess heuristic the final restart files will - still contain KRO, KRW and KRG. - - - - What is required to restart? - ---------------------------- - - A restart capable files is requested with the 'BASIC' mneomnic, but - exactly which properties the 'BASIC' keyword is expanded to is the - responsability of the simulator; i.e. for a black oil simulation you - will at the very least need the expansion: - - BASIC -> PRESSURE, SWAT, SGAS, RS, RV - - But this class just carries the boolean information: Yes - restart - is requested - expanding as illustrated is the responsability of the - simulator. - - - - - What is not supported? - ---------------------- - - The SAVE keyword is not supported in OPM at all, this implies that - the SAVE and SFREQ mneomics are not supported. -*/ - - - -namespace Opm { - - template< typename > class DynamicState; - - class Deck; - class DeckKeyword; - class GRIDSection; - class RUNSPECSection; - class SCHEDULESection; - class SOLUTIONSection; - class TimeMap; - class Schedule; - - - /*The IOConfig class holds data about input / ouput configurations - - Amongst these configuration settings, a IOConfig object knows if - a restart file should be written for a specific report step - - The write of restart files is governed by several eclipse keywords. - These keywords are all described in the eclipse manual, but some - of them are rather porly described there. - To have equal sets of restart files written from Eclipse and Flow for various - configurations, we have made a qualified guess on the behaviour - for some of the keywords (by running eclipse for different configurations, - and looked at which restart files that have been written). - - - ------ RPTSOL RESTART (solution section) ------ - If RPTSOL RESTART > 1 initial restart file is written. - - - ------ RPTRST (solution section) ------ - Eclipse manual states that the initial restart file is to be written - if RPTSOL RESTART > 1. But - due to that the initial restart file - is written from Eclipse for data where RPTSOL RESTART is not set, - we - have made a guess that when RPTRST is set in SOLUTION (no basic though...), - it means that the initial restart file should be written. - Running of eclipse with different settings have proven this to be a qualified guess. - - - ------ RPTRST BASIC=0 (solution or schedule section) ------ - No restart files are written - - - ------ RPTRST BASIC=1 or RPTRST BASIC=2 (solution or schedule section) ------ - Restart files are written for every timestep, from timestep 1 to number of timesteps. - (Write of inital timestep is governed by a separate setting) - - Notice! Eclipse simulator RPTRST BASIC=1 writes restart files for every - report step, but only keeps the last one written. This functionality is - not supported in Flow; so to compare Eclipse results with Flow results - for every report step, set RPTRST BASIC=2 for the eclipse run - - - ------ RPTRST BASIC=3 FREQ=n (solution or schedule section) ------ - Restart files are created every nth report time. Default frequency is 1 (every report step) - - If a frequency higher than 1 is given: - start_rs = report step the setting was given. - write report step rstep if (rstep >= start_rs) && ((rstep % frequency) == 0). - - - ------ RPTRST BASIC=4 FREQ=n or RPTRST BASIC=5 FREQ=n (solution or schedule section) ------ - For the settings BASIC 4 or BASIC 5, - first report step of every new year(4) or new month(5), - the first report step is compared with report step 0 (start), and then every report step is - compared with the previous one to see if year/month has changed. - - This leaves us with a set of timesteps. - All timesteps in the set that are higher or equal to the timestep the RPTRST keyword was set on is written. - - If in addition FREQUENCY is given (higher than 1), every n'the value of this set are to be written. - - If the setting BASIC=4 or BASIC=5 is set on a timestep that is a member of the set "first timestep of - each year" / "First timestep of each month", then the timestep that is freq-1 timesteps (within the set) from - this start timestep will be written, and then every n'the timestep (within the set) from this one will be written. - - If the setting BASIC=4 or BASIC=5 is set on a timestep that is not a member of the list "first timestep of - each year" / "First timestep of each month", then the list is searched for the closest timestep that are - larger than the timestep that introduced the setting, and then; same as above - the timestep that is freq-1 - timesteps from this one (within the set) will be written, and then every n'the timestep (within the set) from - this one will be written. - - - ------ RPTRST BASIC=6 (solution or schedule section) ------ - Not supported in Flow - - - ------ Default ------ - If no keywords for config of writing restart files have been handled; no restart files are written. - - */ - - //namespace { - - class RestartSchedule { - /* - The content of this struct is logically divided in two; either the - restart behaviour is governed by { timestep , basic , frequency }, or - alternatively by { rptshec_restart_set , rptsched_restart }. - - The former triplet is mainly governed by the RPTRST keyword and the - latter pair by the RPTSCHED keyword. - */ - public: - - RestartSchedule() = default; - RestartSchedule( size_t sched_restart); - RestartSchedule( size_t step, size_t b, size_t freq); - bool writeRestartFile( size_t timestep , const TimeMap& timemap) const; - bool operator!=(const RestartSchedule& rhs) const; - bool operator==( const RestartSchedule& rhs ) const; - - - - //private: - size_t timestep = 0; - size_t basic = 0; - size_t frequency = 0; - bool rptsched_restart_set = false; - size_t rptsched_restart = 0; - }; - // } - - class RestartConfig { - - public: - - RestartConfig(); - explicit RestartConfig( const Deck& ); - RestartConfig( const SCHEDULESection& schedule, - const SOLUTIONSection& solution, - std::shared_ptr< const TimeMap > timemap); - - - int getFirstRestartStep() const; - bool getWriteRestartFile(size_t timestep) const; - const std::map< std::string, int >& getRestartKeywords( size_t timestep ) const; - int getKeyword( const std::string& keyword, size_t timeStep) const; - - void overrideRestartWriteInterval(size_t interval); - void handleSolutionSection(const SOLUTIONSection& solutionSection); - void setWriteInitialRestartFile(bool writeInitialRestartFile); - - boost::gregorian::date getTimestepDate(size_t reportStep) const { - auto time = (*m_timemap)[reportStep]; - return time.date(); - } - - RestartSchedule getNode( size_t timestep ) const; - static std::string getRestartFileName(const std::string& restart_base, int report_step, bool unified, bool fmt_file); - private: - - - - /// This method will internalize variables with information of - /// the first report step with restart and rft output - /// respectively. This information is important because right - /// at the first output step we must reset the files to size - /// zero, for subsequent output steps we should append. - void initFirstOutput( ); - - bool getWriteRestartFileFrequency(size_t timestep, - size_t start_timestep, - size_t frequency, - bool years = false, - bool months = false) const; - void handleRPTSOL( const DeckKeyword& keyword); - - std::shared_ptr< const TimeMap > m_timemap; - int m_first_restart_step; - bool m_write_initial_RST_file = false; - - void handleScheduleSection( const SCHEDULESection& schedule); - void update( size_t step, const RestartSchedule& rs); - static RestartSchedule rptsched( const DeckKeyword& ); - - DynamicState< RestartSchedule > restart_schedule; - DynamicState< std::map< std::string, int > > restart_keywords; - }; -} //namespace Opm - - - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/IOConfig/tests/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/IOConfig/tests/CMakeLists.txt deleted file mode 100644 index f43bdb387d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/IOConfig/tests/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -opm_add_test(runIOConfigTests SOURCES IOConfigTest.cpp - LIBRARIES opmparser ${Boost_LIBRARIES}) - -opm_add_test(runRestartConfigTests SOURCES RestartConfigTests.cpp - LIBRARIES opmparser ${Boost_LIBRARIES}) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/IOConfig/tests/IOConfigTest.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/IOConfig/tests/IOConfigTest.cpp deleted file mode 100644 index 0ca00560b3..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/IOConfig/tests/IOConfigTest.cpp +++ /dev/null @@ -1,289 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - - -#define BOOST_TEST_MODULE IOConfigTests - -#include - -#include -#include -#include -#include - -using namespace Opm; - -const std::string& deckStr = "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "GRIDFILE\n" - " 0 1 /\n" - "\n" - "START\n" - " 21 MAY 1981 /\n" - "\n" - "SCHEDULE\n" - "DATES\n" - " 22 MAY 1981 /\n" // timestep 1 - " 23 MAY 1981 /\n" // timestep 2 - " 24 MAY 1981 /\n" // timestep 3 - " 25 MAY 1981 /\n" // timestep 4 - " 26 MAY 1981 /\n" // timestep 5 - " 1 JAN 1982 /\n" // timestep 6 - " 1 JAN 1982 13:55:44 /\n" // timestep 7 - " 3 JAN 1982 14:56:45.123 /\n" // timestep 8 - " 4 JAN 1982 14:56:45.123 /\n" // timestep 9 - " 5 JAN 1982 14:56:45.123 /\n" // timestep 10 - " 6 JAN 1982 14:56:45.123 /\n" // timestep 11 - " 7 JAN 1982 14:56:45.123 /\n" // timestep 12 - " 8 JAN 1982 14:56:45.123 /\n" // timestep 13 - " 9 JAN 1982 14:56:45.123 /\n" // timestep 14 - " 10 JAN 1982 14:56:45.123 /\n" // timestep 15 - " 11 JAN 1982 14:56:45.123 /\n" // timestep 16 - " 1 JAN 1983 /\n" // timestep 17 - " 2 JAN 1983 /\n" // timestep 18 - " 3 JAN 1983 /\n" // timestep 19 - " 1 JAN 1984 /\n" // timestep 20 - " 2 JAN 1984 /\n" // timestep 21 - " 1 JAN 1985 /\n" // timestep 22 - " 3 JAN 1986 14:56:45.123 /\n" // timestep 23 - " 4 JAN 1986 14:56:45.123 /\n" // timestep 24 - " 5 JAN 1986 14:56:45.123 /\n" // timestep 25 - " 1 JAN 1987 /\n" // timestep 26 - " 1 JAN 1988 /\n" // timestep 27 - " 2 JAN 1988 /\n" // timestep 28 - " 3 JAN 1988 /\n" // timestep 29 - " 1 JAN 1989 /\n" // timestep 30 - " 2 JAN 1989 /\n" // timestep 31 - " 2 JAN 1990 /\n" // timestep 32 - " 2 JAN 1991 /\n" // timestep 33 - " 3 JAN 1991 /\n" // timestep 34 - " 4 JAN 1991 /\n" // timestep 35 - " 1 JAN 1992 /\n" // timestep 36 - " 1 FEB 1992 /\n" // timestep 37 - " 1 MAR 1992 /\n" // timestep 38 - " 2 MAR 1992 /\n" // timestep 39 - " 3 MAR 1992 /\n" // timestep 40 - " 4 MAR 1992 /\n" // timestep 41 - " 1 APR 1992 /\n" // timestep 42 - " 2 APR 1992 /\n" // timestep 43 - " 1 MAY 1992 /\n" // timestep 44 - " 2 MAY 1992 /\n" // timestep 45 - " 3 MAY 1992 /\n" // timestep 46 - " 3 JUN 1992 /\n" // timestep 47 - " 3 JUL 1992 /\n" // timestep 48 - " 3 AUG 1992 /\n" // timestep 49 - " 4 AUG 1992 /\n" // timestep 50 - " 5 AUG 1992 /\n" // timestep 51 - " 6 AUG 1992 /\n" // timestep 52 - " 7 AUG 1992 /\n" // timestep 53 - " 8 AUG 1992 /\n" // timestep 54 - " 9 AUG 1992 /\n" // timestep 55 - " 10 AUG 1992 /\n" // timestep 56 - " 11 AUG 1992 /\n" // timestep 57 - " 12 AUG 1992 /\n" // timestep 58 - " 13 AUG 1992 /\n" // timestep 59 - " 14 AUG 1992 /\n" // timestep 60 - " 15 AUG 1992 /\n" // timestep 61 - "/\n" - "\n"; - -const std::string deckStr_RFT = "RUNSPEC\n" - "OIL\n" - "GAS\n" - "WATER\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "DXV\n" - "10*0.25 /\n" - "DYV\n" - "10*0.25 /\n" - "DZV\n" - "10*0.25 /\n" - "TOPS\n" - "100*0.25 /\n" - "\n" - "START -- 0 \n" - "1 NOV 1979 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 1 DES 1979/ \n" - "/\n" - "WELSPECS\n" - " 'OP_1' 'OP' 9 9 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - " 'OP_2' 'OP' 4 4 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - "/\n" - "COMPDAT\n" - " 'OP_1' 9 9 1 1 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'OP_1' 9 9 2 2 'OPEN' 1* 46.825 0.311 4332.346 1* 1* 'X' 22.123 / \n" - " 'OP_1' 9 9 3 9 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'OP_2' 4 4 4 9 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - "/\n" - "DATES -- 2\n" - " 10 OKT 2008 / \n" - "/\n" - "WRFT \n" - "/ \n" - "WELOPEN\n" - " 'OP_1' OPEN / \n" - " 'OP_2' OPEN / \n" - "/\n" - "DATES -- 3\n" - " 10 NOV 2008 / \n" - "/\n"; - - - -static DeckPtr createDeck(const std::string& input) { - Opm::Parser parser; - return parser.parseString(input, Opm::ParseContext()); -} - - -BOOST_AUTO_TEST_CASE( RFT_TIME) { - DeckPtr deck = createDeck(deckStr_RFT); - EclipseState state( *deck , Opm::ParseContext() ); - const IOConfig& ioConfig = state.cfg().io(); - - - BOOST_CHECK_EQUAL( ioConfig.getFirstRFTStep() , 2 ); -} - -BOOST_AUTO_TEST_CASE(DefaultProperties) { - const char* data = "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "START\n" - " 21 MAY 1981 /\n" - "\n" - "SCHEDULE\n" - "RPTRST\n" - "BASIC=1" - "/\n" - "DATES\n" - " 22 MAY 1981 /\n" - "/\n" - "RPTSCHED\n" - "RESTART=0\n" - "/\n" - "DATES\n" - " 23 MAY 1981 /\n" - " 24 MAY 1981 /\n" - " 23 MAY 1982 /\n" - " 24 MAY 1982 /\n" - " 24 MAY 1983 /\n" - " 25 MAY 1984 /\n" - " 26 MAY 1984 /\n" - " 26 MAY 1985 /\n" - " 27 MAY 1985 /\n" - " 1 JAN 1986 /\n" - "/\n"; - - auto deck = Parser().parseString( data, ParseContext() ); - IOConfig ioConfig( *deck ); - - /*If no GRIDFILE nor NOGGF keywords are specified, default output an EGRID file*/ - BOOST_CHECK( ioConfig.getWriteEGRIDFile() ); - /*If no INIT keyword is specified, verify no write of INIT file*/ - BOOST_CHECK( !ioConfig.getWriteINITFile() ); - /*If no UNIFIN keyword is specified, verify UNIFIN false (default is multiple) */ - BOOST_CHECK( !ioConfig.getUNIFIN() ); - /*If no UNIFOUT keyword is specified, verify UNIFOUT false (default is multiple) */ - BOOST_CHECK( !ioConfig.getUNIFOUT() ); - /*If no FMTIN keyword is specified, verify FMTIN false (default is unformatted) */ - BOOST_CHECK( !ioConfig.getFMTIN() ); - /*If no FMTOUT keyword is specified, verify FMTOUT false (default is unformatted) */ - BOOST_CHECK( !ioConfig.getFMTOUT() ); -} - -BOOST_AUTO_TEST_CASE(OutputProperties) { - const char* data = "RUNSPEC\n" - "UNIFIN\n" - "UNIFOUT\n" - "FMTIN\n" - "FMTOUT\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "NOGGF\n" - "INIT\n" - "START\n" - " 21 MAY 1981 /\n" - "\n" - "SCHEDULE\n"; - - - auto deck = Parser().parseString( data, ParseContext() ); - IOConfig ioConfig( *deck ); - - BOOST_CHECK( !ioConfig.getWriteEGRIDFile() ); - /*If INIT keyword is specified, verify write of INIT file*/ - BOOST_CHECK( ioConfig.getWriteINITFile() ); - /*If UNIFOUT keyword is specified, verify unified write*/ - BOOST_CHECK( ioConfig.getUNIFOUT() ); - /*If FMTOUT keyword is specified, verify formatted write*/ - BOOST_CHECK( ioConfig.getFMTOUT() ); -} - -BOOST_AUTO_TEST_CASE(NoGRIDFILE) { - const char* data = "RUNSPEC\n" - "\n" - "DIMENS\n" - "10 10 10 /\n" - "GRID\n" - "GRIDFILE\n" - " 0 0 /\n" - "\n"; - - auto deck = Parser().parseString( data, ParseContext() ); - IOConfig ioConfig( *deck ); - - /*If GRIDFILE 0 0 is specified, no EGRID file is written */ - BOOST_CHECK( !ioConfig.getWriteEGRIDFile() ); -} - -BOOST_AUTO_TEST_CASE(OutputPaths) { - - IOConfig config1( "" ); - BOOST_CHECK_EQUAL("", config1.getBaseName() ); - - Deck deck2; - deck2.setDataFile( "testString.DATA" ); - IOConfig config2( deck2 ); - std::string output_dir2 = "."; - BOOST_CHECK_EQUAL( output_dir2, config2.getOutputDir() ); - BOOST_CHECK_EQUAL( "testString", config2.getBaseName() ); - - namespace fs = boost::filesystem; - - Deck deck3; - deck3.setDataFile( "/path/to/testString.DATA" ); - IOConfig config3( deck3 ); - std::string output_dir3 = "/path/to"; - config3.setOutputDir( output_dir3 ); - auto testpath = fs::path( "/path/to/testString" ).make_preferred().string(); - BOOST_CHECK_EQUAL( output_dir3, config3.getOutputDir() ); - BOOST_CHECK_EQUAL( "testString", config3.getBaseName() ); - BOOST_CHECK_EQUAL( testpath, config3.fullBasePath() ); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/IOConfig/tests/RestartConfigTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/IOConfig/tests/RestartConfigTests.cpp deleted file mode 100644 index eddd264c9f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/IOConfig/tests/RestartConfigTests.cpp +++ /dev/null @@ -1,901 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - - -#define BOOST_TEST_MODULE RestartConfigTests - -#include - - -#include -#include -#include -#include -#include - -inline std::string fst( const std::pair< std::string, int >& p ) { - return p.first; -} - -using namespace Opm; - - -BOOST_AUTO_TEST_CASE(RPTSCHED_INTEGER) { - - const char *deckData1 = - "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "START -- 0 \n" - "19 JUN 2007 / \n" - "SOLUTION\n" - "RPTRST -- PRES,DEN,PCOW,PCOG,RK,VELOCITY,COMPRESS\n" - " 6*0 1 0 1 9*0 1 7*0 1 0 3*1 /\n" - "SCHEDULE\n" - "DATES -- 1\n" - " 10 OKT 2008 / \n" - "/\n" - "RPTSCHED\n" - "RESTART=1\n" - "/\n" - "DATES -- 2\n" - " 20 JAN 2010 / \n" - "/\n" - "RPTRST -- RK,VELOCITY,COMPRESS\n" - " 18*0 0 8*0 /\n" - "DATES -- 3\n" - " 20 FEB 2010 / \n" - "/\n" - "RPTSCHED\n" - "RESTART=0\n" - "/\n"; - - Parser parser; - ParseContext ctx; - - auto deck1 = parser.parseString( deckData1, ctx ); - RestartConfig rstConfig1( *deck1 ); - - BOOST_CHECK( rstConfig1.getWriteRestartFile( 0 ) ); - BOOST_CHECK( !rstConfig1.getWriteRestartFile( 1 ) ); - BOOST_CHECK( rstConfig1.getWriteRestartFile( 2 ) ); - BOOST_CHECK( !rstConfig1.getWriteRestartFile( 3 ) ); - - std::vector< std::string > kw_list1; - for( const auto& pair : rstConfig1.getRestartKeywords( 0 ) ) - if( pair.second != 0 ) kw_list1.push_back( pair.first ); - - const auto expected1 = {"BG","BO","BW","COMPRESS","DEN","KRG","KRO","KRW","PCOG","PCOW","PRES","RK","VELOCITY","VGAS","VOIL","VWAT"}; - BOOST_CHECK_EQUAL_COLLECTIONS( expected1.begin(), expected1.end(), - kw_list1.begin(), kw_list1.end() ); - - // ACIP is a valid mneonic - but not in this deck. - BOOST_CHECK_EQUAL( rstConfig1.getKeyword( "ACIP" , 0) , 0 ); - BOOST_CHECK_EQUAL( rstConfig1.getKeyword( "COMPRESS" , 0) , 1 ); - BOOST_CHECK_EQUAL( rstConfig1.getKeyword( "PCOG", 0) , 1 ); - BOOST_CHECK_THROW( rstConfig1.getKeyword( "UNKNOWN_KW", 0) , std::invalid_argument); - - std::vector< std::string > kw_list2; - for( const auto& pair : rstConfig1.getRestartKeywords( 3 ) ) - if( pair.second != 0 ) kw_list2.push_back( pair.first ); - - const auto expected2 = { "COMPRESS", "RESTART", "RK", "VELOCITY" }; - BOOST_CHECK_EQUAL_COLLECTIONS( expected2.begin(), expected2.end(), - kw_list2.begin(), kw_list2.end() ); - - BOOST_CHECK_EQUAL( rstConfig1.getKeyword( "ALLPROPS" , 0 ) , 0); - BOOST_CHECK_EQUAL( rstConfig1.getKeyword( "ALLPROPS" , 3 ) , 0); -} - - -const std::string& deckStr = "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "GRIDFILE\n" - " 0 1 /\n" - "\n" - "START\n" - " 21 MAY 1981 /\n" - "\n" - "SCHEDULE\n" - "DATES\n" - " 22 MAY 1981 /\n" // timestep 1 - " 23 MAY 1981 /\n" // timestep 2 - " 24 MAY 1981 /\n" // timestep 3 - " 25 MAY 1981 /\n" // timestep 4 - " 26 MAY 1981 /\n" // timestep 5 - " 1 JAN 1982 /\n" // timestep 6 - " 1 JAN 1982 13:55:44 /\n" // timestep 7 - " 3 JAN 1982 14:56:45.123 /\n" // timestep 8 - " 4 JAN 1982 14:56:45.123 /\n" // timestep 9 - " 5 JAN 1982 14:56:45.123 /\n" // timestep 10 - " 6 JAN 1982 14:56:45.123 /\n" // timestep 11 - " 7 JAN 1982 14:56:45.123 /\n" // timestep 12 - " 8 JAN 1982 14:56:45.123 /\n" // timestep 13 - " 9 JAN 1982 14:56:45.123 /\n" // timestep 14 - " 10 JAN 1982 14:56:45.123 /\n" // timestep 15 - " 11 JAN 1982 14:56:45.123 /\n" // timestep 16 - " 1 JAN 1983 /\n" // timestep 17 - " 2 JAN 1983 /\n" // timestep 18 - " 3 JAN 1983 /\n" // timestep 19 - " 1 JAN 1984 /\n" // timestep 20 - " 2 JAN 1984 /\n" // timestep 21 - " 1 JAN 1985 /\n" // timestep 22 - " 3 JAN 1986 14:56:45.123 /\n" // timestep 23 - " 4 JAN 1986 14:56:45.123 /\n" // timestep 24 - " 5 JAN 1986 14:56:45.123 /\n" // timestep 25 - " 1 JAN 1987 /\n" // timestep 26 - " 1 JAN 1988 /\n" // timestep 27 - " 2 JAN 1988 /\n" // timestep 28 - " 3 JAN 1988 /\n" // timestep 29 - " 1 JAN 1989 /\n" // timestep 30 - " 2 JAN 1989 /\n" // timestep 31 - " 2 JAN 1990 /\n" // timestep 32 - " 2 JAN 1991 /\n" // timestep 33 - " 3 JAN 1991 /\n" // timestep 34 - " 4 JAN 1991 /\n" // timestep 35 - " 1 JAN 1992 /\n" // timestep 36 - " 1 FEB 1992 /\n" // timestep 37 - " 1 MAR 1992 /\n" // timestep 38 - " 2 MAR 1992 /\n" // timestep 39 - " 3 MAR 1992 /\n" // timestep 40 - " 4 MAR 1992 /\n" // timestep 41 - " 1 APR 1992 /\n" // timestep 42 - " 2 APR 1992 /\n" // timestep 43 - " 1 MAY 1992 /\n" // timestep 44 - " 2 MAY 1992 /\n" // timestep 45 - " 3 MAY 1992 /\n" // timestep 46 - " 3 JUN 1992 /\n" // timestep 47 - " 3 JUL 1992 /\n" // timestep 48 - " 3 AUG 1992 /\n" // timestep 49 - " 4 AUG 1992 /\n" // timestep 50 - " 5 AUG 1992 /\n" // timestep 51 - " 6 AUG 1992 /\n" // timestep 52 - " 7 AUG 1992 /\n" // timestep 53 - " 8 AUG 1992 /\n" // timestep 54 - " 9 AUG 1992 /\n" // timestep 55 - " 10 AUG 1992 /\n" // timestep 56 - " 11 AUG 1992 /\n" // timestep 57 - " 12 AUG 1992 /\n" // timestep 58 - " 13 AUG 1992 /\n" // timestep 59 - " 14 AUG 1992 /\n" // timestep 60 - " 15 AUG 1992 /\n" // timestep 61 - "/\n" - "\n"; - -const std::string deckStr_RFT = "RUNSPEC\n" - "OIL\n" - "GAS\n" - "WATER\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "DXV\n" - "10*0.25 /\n" - "DYV\n" - "10*0.25 /\n" - "DZV\n" - "10*0.25 /\n" - "TOPS\n" - "100*0.25 /\n" - "\n" - "START -- 0 \n" - "1 NOV 1979 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 1 DES 1979/ \n" - "/\n" - "WELSPECS\n" - " 'OP_1' 'OP' 9 9 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - " 'OP_2' 'OP' 4 4 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - "/\n" - "COMPDAT\n" - " 'OP_1' 9 9 1 1 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'OP_1' 9 9 2 2 'OPEN' 1* 46.825 0.311 4332.346 1* 1* 'X' 22.123 / \n" - " 'OP_1' 9 9 3 9 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'OP_2' 4 4 4 9 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - "/\n" - "DATES -- 2\n" - " 10 OKT 2008 / \n" - "/\n" - "WRFT \n" - "/ \n" - "WELOPEN\n" - " 'OP_1' OPEN / \n" - " 'OP_2' OPEN / \n" - "/\n" - "DATES -- 3\n" - " 10 NOV 2008 / \n" - "/\n"; - - - -BOOST_AUTO_TEST_CASE(RPTRST_mixed_mnemonics_int_list) { - const char* data = "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 10 OKT 2008 / \n" - "/\n" - "RPTRST\n" - "BASIC=3 0 1 2\n" - "/\n" - "DATES -- 2\n" - " 20 JAN 2010 / \n" - "/\n" - "DATES -- 3\n" - " 20 FEB 2010 / \n" - "/\n" - "RPTSCHED\n" - "BASIC=1\n" - "/\n"; - - auto deck = Parser().parseString( data, ParseContext() ); - BOOST_CHECK_THROW( RestartConfig c( *deck ), std::runtime_error ); -} - -BOOST_AUTO_TEST_CASE(RPTRST) { - - const char *deckData1 = - "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "START -- 0 \n" - "19 JUN 2007 / \n" - "SOLUTION\n" - "RPTRST\n" - " ACIP KRG KRO KRW NORST SFREQ=10 ALLPROPS/\n" - "SCHEDULE\n" - "DATES -- 1\n" - " 10 OKT 2008 / \n" - "/\n" - "RPTRST\n" - "BASIC=1\n" - "/\n" - "DATES -- 2\n" - " 20 JAN 2010 / \n" - "/\n"; - - const char *deckData2 = - "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 10 OKT 2008 / \n" - "/\n" - "RPTRST\n" - "BASIC=3 FREQ=2 FLOWS RUBBISH=5\n" - "/\n" - "DATES -- 2\n" - " 20 JAN 2010 / \n" - "/\n" - "DATES -- 3\n" - " 20 JAN 2011 / \n" - "/\n"; - - const char *deckData3 = - "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 10 OKT 2008 / \n" - "/\n" - "RPTRST\n" - "3 0 0 0 0 2\n" - "/\n" - "DATES -- 2\n" - " 20 JAN 2010 / \n" - "/\n" - "DATES -- 3\n" - " 20 JAN 2011 / \n" - "/\n"; - - Opm::Parser parser; - ParseContext ctx; - - auto deck1 = parser.parseString( deckData1, ctx ); - RestartConfig rstConfig1( *deck1 ); - - // Observe that this is true due to some undocumented guessing that - // the initial restart file should be written if a RPTRST keyword is - // found in the SOLUTION section, irrespective of the content of that - // keyword. - BOOST_CHECK( rstConfig1.getWriteRestartFile( 0 ) ); - BOOST_CHECK( !rstConfig1.getWriteRestartFile( 1 ) ); - BOOST_CHECK( rstConfig1.getWriteRestartFile( 2 ) ); - - - std::vector expected = { "ACIP","BASIC", "BG","BO","BW","DEN","KRG", "KRO", "KRW", "NORST", "SFREQ", "VGAS", "VOIL", "VWAT"}; - const auto kw_list = fun::map( fst, rstConfig1.getRestartKeywords(2) ); - - BOOST_CHECK_EQUAL_COLLECTIONS( expected.begin() ,expected.end(), - kw_list.begin() , kw_list.end() ); - - BOOST_CHECK_EQUAL( rstConfig1.getKeyword( "ALLPROPS" , 2 ) , 0); - - auto deck2 = parser.parseString( deckData2, ctx ); - RestartConfig rstConfig2( *deck2 ); - - const auto expected2 = { "BASIC", "FLOWS", "FREQ" }; - const auto kw_list2 = fun::map( fst, rstConfig2.getRestartKeywords( 2 ) ); - BOOST_CHECK_EQUAL_COLLECTIONS( expected2.begin(), expected2.end(), - kw_list2.begin(), kw_list2.end() ); - - BOOST_CHECK( !rstConfig2.getWriteRestartFile( 0 ) ); - BOOST_CHECK( !rstConfig2.getWriteRestartFile( 1 ) ); - BOOST_CHECK( rstConfig2.getWriteRestartFile( 2 ) ); - BOOST_CHECK( !rstConfig2.getWriteRestartFile( 3 ) ); - - auto deck3 = parser.parseString( deckData3, ctx ); - RestartConfig rstConfig3( *deck3 ); - - BOOST_CHECK( !rstConfig3.getWriteRestartFile( 0 ) ); - BOOST_CHECK( !rstConfig3.getWriteRestartFile( 1 ) ); - BOOST_CHECK( rstConfig3.getWriteRestartFile( 2 ) ); - BOOST_CHECK( !rstConfig3.getWriteRestartFile( 3 ) ); -} - - - - -BOOST_AUTO_TEST_CASE(RPTSCHED) { - - const char *deckData1 = - "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 10 OKT 2008 / \n" - "/\n" - "RPTSCHED\n" - "RESTART=1\n" - "/\n" - "DATES -- 2\n" - " 20 JAN 2010 / \n" - "/\n" - "DATES -- 3\n" - " 20 FEB 2010 / \n" - "/\n" - "RPTSCHED\n" - "RESTART=0\n" - "/\n"; - - - const char *deckData2 = - "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 10 OKT 2008 / \n" - "/\n" - "RPTSCHED\n" - "RESTART=3 FIP\n" - "/\n" - "DATES -- 2\n" - " 20 JAN 2010 / \n" - "/\n" - "RPTSCHED\n" - "RESTART=4\n" - "/\n" - "DATES -- 3\n" - " 20 FEB 2010 / \n" - "/\n" - "RPTSCHED\n" - "NOTHING RUBBISH\n" - "/\n"; - - const char *deckData3 = - "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "START -- 0 \n" - "19 JUN 2007 / \n" - "SOLUTION\n" - "RPTSOL\n" - " RESTART=4 /\n" - "SCHEDULE\n" - "DATES -- 1\n" - " 10 OKT 2008 / \n" - "/\n" - "RPTRST\n" - "BASIC=3 FREQ=1 RUBBISH=5\n" - "/\n" - "DATES -- 2\n" - " 20 JAN 2010 / \n" - "/\n" - "DATES -- 3\n" - " 20 FEB 2010 / \n" - "/\n" - "RPTSCHED\n" - "0 0 0 0 0 0 0 0\n" - "/\n"; - - Parser parser; - ParseContext ctx; - - auto deck1 = parser.parseString( deckData1, ctx ); - RestartConfig rstConfig1( *deck1 ); - - BOOST_CHECK( !rstConfig1.getWriteRestartFile( 0 ) ); - BOOST_CHECK( !rstConfig1.getWriteRestartFile( 1 ) ); - BOOST_CHECK( rstConfig1.getWriteRestartFile( 2 ) ); - BOOST_CHECK( rstConfig1.getWriteRestartFile( 3 ) ); - - - auto deck2 = parser.parseString( deckData2, ctx ); - RestartConfig rstConfig2( *deck2 ); - - BOOST_CHECK( !rstConfig2.getWriteRestartFile( 0 ) ); - BOOST_CHECK( !rstConfig2.getWriteRestartFile( 1 ) ); - BOOST_CHECK( rstConfig2.getWriteRestartFile( 2 ) ); - BOOST_CHECK( rstConfig2.getWriteRestartFile( 3 ) ); - - const auto expected2 = { "FIP", "RESTART" }; - const auto kw_list2 = fun::map( fst, rstConfig2.getRestartKeywords( 2 ) ); - BOOST_CHECK_EQUAL_COLLECTIONS( expected2.begin(), expected2.end(), - kw_list2.begin(), kw_list2.end() ); - - - auto deck3 = parser.parseString( deckData3, ctx ); - RestartConfig rstConfig3( *deck3 ); - //Older ECLIPSE 100 data set may use integer controls instead of mnemonics - BOOST_CHECK( rstConfig3.getWriteRestartFile( 0 ) ); - BOOST_CHECK( !rstConfig3.getWriteRestartFile( 1 ) ); - BOOST_CHECK( rstConfig3.getWriteRestartFile( 2 ) ); - BOOST_CHECK( rstConfig3.getWriteRestartFile( 3 ) ); - - std::vector expected3 = { "BASIC", "FREQ" }; - const auto kw_list3 = fun::map( fst, rstConfig3.getRestartKeywords(2) ); - BOOST_CHECK_EQUAL_COLLECTIONS( expected3.begin() , expected3.end() , kw_list3.begin() , kw_list3.end() ); -} - - -BOOST_AUTO_TEST_CASE(RPTSCHED_and_RPTRST) { - const char *deckData = - "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 10 OKT 2008 / \n" - "/\n" - "RPTRST\n" - "BASIC=3 FREQ=3 BG BO\n" - "/\n" - "DATES -- 2\n" - " 20 JAN 2010 / \n" - "/\n" - "DATES -- 3\n" - " 20 FEB 2010 / \n" - "/\n" - "RPTSCHED\n" - "RESTART=1\n" - "/\n"; - - - Opm::Parser parser; - ParseContext ctx; - - auto deck = parser.parseString( deckData, ctx ); - RestartConfig rstConfig( *deck ); - - BOOST_CHECK( !rstConfig.getWriteRestartFile( 0 ) ); - BOOST_CHECK( !rstConfig.getWriteRestartFile( 1 ) ); - BOOST_CHECK( !rstConfig.getWriteRestartFile( 2 ) ); - BOOST_CHECK( rstConfig.getWriteRestartFile( 3 ) ); -} - - -BOOST_AUTO_TEST_CASE(NO_BASIC) { - const char* data = "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 10 OKT 2008 / \n" - "/\n" - "DATES -- 2\n" - " 20 JAN 2010 / \n" - "/\n" - "DATES -- 3\n" - " 20 FEB 2010 / \n" - "/\n" - "RPTSCHED\n" - "/\n"; - - auto deck = Parser().parseString( data, ParseContext() ); - RestartConfig ioConfig( *deck ); - - for( size_t ts = 0; ts < 4; ++ts ) - BOOST_CHECK( !ioConfig.getWriteRestartFile( ts ) ); -} - -BOOST_AUTO_TEST_CASE(BASIC_EQ_1) { - const char* data = "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 10 OKT 2008 / \n" - "/\n" - "RPTRST\n" - "BASIC=3 FREQ=3\n" - "/\n" - "DATES -- 2\n" - " 20 JAN 2010 / \n" - "/\n" - "DATES -- 3\n" - " 20 FEB 2010 / \n" - "/\n" - "RPTSCHED\n" - "BASIC=1\n" - "/\n"; - - auto deck = Parser().parseString( data, ParseContext() ); - RestartConfig ioConfig( *deck ); - - for( size_t ts = 0; ts < 3; ++ts ) - BOOST_CHECK( !ioConfig.getWriteRestartFile( ts ) ); - - BOOST_CHECK( ioConfig.getWriteRestartFile( 3 ) ); -} - -BOOST_AUTO_TEST_CASE(BASIC_EQ_3) { - const char* data = "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "START\n" - " 21 MAY 1981 /\n" - "\n" - "SCHEDULE\n" - "RPTRST\n" - "BASIC=3 FREQ=3\n" - "/\n" - "DATES\n" - " 22 MAY 1981 /\n" // timestep 1 - " 23 MAY 1981 /\n" // timestep 2 - " 24 MAY 1981 /\n" // timestep 3 - " 25 MAY 1981 /\n" // timestep 4 - " 26 MAY 1981 /\n" // timestep 5 - " 1 JAN 1982 /\n" // timestep 6 - " 1 JAN 1982 13:55:44 /\n" // timestep 7 - " 3 JAN 1982 14:56:45.123 /\n" // timestep 8 - " 4 JAN 1982 14:56:45.123 /\n" // timestep 9 - " 5 JAN 1982 14:56:45.123 /\n" // timestep 10 - " 6 JAN 1982 14:56:45.123 /\n" // timestep 11 - "/\n"; - - auto deck = Parser().parseString( data, ParseContext() ); - RestartConfig ioConfig( *deck ); - - const size_t freq = 3; - - /* BASIC=3, restart files are created every nth report time, n=3 */ - for( size_t ts = 1; ts < 12; ++ts ) - BOOST_CHECK_EQUAL( ts % freq == 0, ioConfig.getWriteRestartFile( ts ) ); -} - -BOOST_AUTO_TEST_CASE(BASIC_EQ_4) { - const char* data = "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "START\n" - " 21 MAY 1981 /\n" - "\n" - "SCHEDULE\n" - "RPTRST\n" - "BASIC=4\n" - "/\n" - "DATES\n" - " 22 MAY 1981 /\n" // timestep 1 - " 23 MAY 1981 /\n" // timestep 2 - " 24 MAY 1981 /\n" // timestep 3 - " 25 MAY 1981 /\n" // timestep 4 - " 26 MAY 1981 /\n" // timestep 5 - " 1 JAN 1982 /\n" // timestep 6 - " 1 JAN 1982 13:55:44 /\n" // timestep 7 - " 3 JAN 1982 14:56:45.123 /\n" // timestep 8 - " 4 JAN 1982 14:56:45.123 /\n" // timestep 9 - " 5 JAN 1982 14:56:45.123 /\n" // timestep 10 - " 6 JAN 1982 14:56:45.123 /\n" // timestep 11 - " 6 JAN 1983 14:56:45.123 /\n" // timestep 12 - "/\n"; - - auto deck = Parser().parseString( data, ParseContext() ); - RestartConfig ioConfig( *deck ); - - /* BASIC=4, restart file is written at the first report step of each year. - */ - for( size_t ts : { 1, 2, 3, 4, 5, 7, 8, 9, 10, 11 } ) - BOOST_CHECK( !ioConfig.getWriteRestartFile( ts ) ); - - for( size_t ts : { 6, 12 } ) - BOOST_CHECK( ioConfig.getWriteRestartFile( ts ) ); -} - -BOOST_AUTO_TEST_CASE(BASIC_EQ_4_FREQ_2) { - const char* data = "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "START\n" - " 21 MAY 1981 /\n" - "\n" - "SCHEDULE\n" - "RPTRST\n" - "BASIC=4 FREQ=2\n" - "/\n" - "DATES\n" - " 22 MAY 1981 /\n" - " 23 MAY 1981 /\n" - " 24 MAY 1981 /\n" - " 23 MAY 1982 /\n" - " 24 MAY 1982 /\n" - " 24 MAY 1983 /\n" // write - " 25 MAY 1984 /\n" - " 26 MAY 1984 /\n" - " 26 MAY 1985 /\n" // write - " 27 MAY 1985 /\n" - " 1 JAN 1986 /\n" - "/\n"; - - auto deck = Parser().parseString( data, ParseContext() ); - RestartConfig ioConfig( *deck ); - - /* BASIC=4, restart file is written at the first report step of each year. - * Optionally, if the mnemonic FREQ is set >1 the restart is written only - * every n'th year. - * - * FREQ=2 - */ - for( size_t ts : { 1, 2, 3, 4, 5, 7, 8, 10, 11 } ) - BOOST_CHECK( !ioConfig.getWriteRestartFile( ts ) ); - - for( size_t ts : { 6, 9 } ) - BOOST_CHECK( ioConfig.getWriteRestartFile( ts ) ); -} - -BOOST_AUTO_TEST_CASE(BASIC_EQ_5) { - const char* data = "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "START\n" - " 21 MAY 1981 /\n" - "\n" - "SCHEDULE\n" - "RPTRST\n" - "BASIC=5 FREQ=2\n" - "/\n" - "DATES\n" - " 22 MAY 1981 /\n" - " 23 MAY 1981 /\n" - " 24 MAY 1981 /\n" - " 1 JUN 1981 /\n" - " 1 JUL 1981 /\n" // write - " 1 JAN 1982 /\n" - " 2 JAN 1982 /\n" - " 1 FEB 1982 /\n" // write - " 1 MAR 1982 /\n" - " 1 APR 1983 /\n" //write - " 2 JUN 1983 /\n" - "/\n"; - - auto deck = Parser().parseString( data, ParseContext() ); - RestartConfig ioConfig( *deck ); - - /* BASIC=5, restart file is written at the first report step of each month. - */ - for( size_t ts : { 1, 2, 3, 4, 6, 7, 9, 11 } ) - BOOST_CHECK( !ioConfig.getWriteRestartFile( ts ) ); - - for( size_t ts : { 5, 8, 10 } ) - BOOST_CHECK( ioConfig.getWriteRestartFile( ts ) ); -} - -BOOST_AUTO_TEST_CASE(BASIC_EQ_0) { - const char* data = "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "START\n" - " 21 MAY 1981 /\n" - "\n" - "SCHEDULE\n" - "RPTRST\n" - "BASIC=0 FREQ=2\n" - "/\n" - "DATES\n" - " 22 MAY 1981 /\n" - " 23 MAY 1981 /\n" - " 24 MAY 1981 /\n" - " 1 JUN 1981 /\n" - " 1 JUL 1981 /\n" - " 1 JAN 1982 /\n" - " 2 JAN 1982 /\n" - " 1 FEB 1982 /\n" - " 1 MAR 1982 /\n" - " 1 APR 1983 /\n" - " 2 JUN 1983 /\n" - "/\n"; - - auto deck = Parser().parseString( data, ParseContext() ); - RestartConfig ioConfig( *deck ); - - /* RESTART=0, no restart file is written - */ - for( size_t ts = 0; ts < 11; ++ts ) - BOOST_CHECK( !ioConfig.getWriteRestartFile( ts ) ); -} - - -BOOST_AUTO_TEST_CASE(RESTART_EQ_0) { - const char* data = "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "START\n" - " 21 MAY 1981 /\n" - "\n" - "SCHEDULE\n" - "RPTSCHED\n" - "RESTART=0\n" - "/\n" - "DATES\n" - " 22 MAY 1981 /\n" - " 23 MAY 1981 /\n" - " 24 MAY 1981 /\n" - " 1 JUN 1981 /\n" - " 1 JUL 1981 /\n" - " 1 JAN 1982 /\n" - " 2 JAN 1982 /\n" - " 1 FEB 1982 /\n" - " 1 MAR 1982 /\n" - " 1 APR 1983 /\n" - " 2 JUN 1983 /\n" - "/\n"; - - auto deck = Parser().parseString( data, ParseContext() ); - RestartConfig ioConfig( *deck ); - - /* RESTART=0, no restart file is written - */ - for( size_t ts = 0; ts < 11; ++ts ) - BOOST_CHECK( !ioConfig.getWriteRestartFile( ts ) ); -} - -BOOST_AUTO_TEST_CASE(RESTART_BASIC_GT_2) { - const char* data = "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "START\n" - " 21 MAY 1981 /\n" - "\n" - "SCHEDULE\n" - "RPTRST\n" - "BASIC=4 FREQ=2\n" - "/\n" - "DATES\n" - " 22 MAY 1981 /\n" - "/\n" - "RPTSCHED\n" // BASIC >2, ignore RPTSCHED RESTART - "RESTART=3, FREQ=1\n" - "/\n" - "DATES\n" - " 23 MAY 1981 /\n" - " 24 MAY 1981 /\n" - " 23 MAY 1982 /\n" - " 24 MAY 1982 /\n" - " 24 MAY 1983 /\n" // write - " 25 MAY 1984 /\n" - " 26 MAY 1984 /\n" - " 26 MAY 1985 /\n" // write - " 27 MAY 1985 /\n" - " 1 JAN 1986 /\n" - "/\n"; - - auto deck = Parser().parseString( data, ParseContext() ); - RestartConfig ioConfig( *deck ); - - for( size_t ts : { 1, 2, 3, 4, 5, 7, 8, 10, 11 } ) - BOOST_CHECK( !ioConfig.getWriteRestartFile( ts ) ); - - for( size_t ts : { 6, 9 } ) - BOOST_CHECK( ioConfig.getWriteRestartFile( ts ) ); -} - -BOOST_AUTO_TEST_CASE(RESTART_BASIC_LEQ_2) { - const char* data = "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "START\n" - " 21 MAY 1981 /\n" - "\n" - "SCHEDULE\n" - "RPTRST\n" - "BASIC=1" - "/\n" - "DATES\n" - " 22 MAY 1981 /\n" - "/\n" - "RPTSCHED\n" - "RESTART=0\n" - "/\n" - "DATES\n" - " 23 MAY 1981 /\n" - " 24 MAY 1981 /\n" - " 23 MAY 1982 /\n" - " 24 MAY 1982 /\n" - " 24 MAY 1983 /\n" - " 25 MAY 1984 /\n" - " 26 MAY 1984 /\n" - " 26 MAY 1985 /\n" - " 27 MAY 1985 /\n" - " 1 JAN 1986 /\n" - "/\n"; - - auto deck = Parser().parseString( data, ParseContext() ); - RestartConfig ioConfig( *deck ); - - BOOST_CHECK( ioConfig.getWriteRestartFile( 1 ) ); - for( size_t ts = 2; ts < 11; ++ts ) - BOOST_CHECK( !ioConfig.getWriteRestartFile( ts ) ); -} - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/InitConfig/Equil.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/InitConfig/Equil.cpp deleted file mode 100644 index 195ca8fff5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/InitConfig/Equil.cpp +++ /dev/null @@ -1,81 +0,0 @@ -#include -#include -#include -#include - -namespace Opm { - - EquilRecord::EquilRecord( const DeckRecord& record ) : - datum_depth( record.getItem( 0 ).getSIDouble( 0 ) ), - datum_depth_ps( record.getItem( 1 ).getSIDouble( 0 ) ), - water_oil_contact_depth( record.getItem( 2 ).getSIDouble( 0 ) ), - water_oil_contact_capillary_pressure( record.getItem( 3 ).getSIDouble( 0 ) ), - gas_oil_contact_depth( record.getItem( 4 ).getSIDouble( 0 ) ), - gas_oil_contact_capillary_pressure( record.getItem( 5 ).getSIDouble( 0 ) ), - live_oil_init_proc( record.getItem( 6 ).get< int >( 0 ) <= 0 ), - wet_gas_init_proc( record.getItem( 7 ).get< int >( 0 ) <= 0 ), - init_target_accuracy( record.getItem( 8 ).get< int >( 0 ) ) - {} - - double EquilRecord::datumDepth() const { - return this->datum_depth; - } - - double EquilRecord::datumDepthPressure() const { - return this->datum_depth_ps; - } - - double EquilRecord::waterOilContactDepth() const { - return this->water_oil_contact_depth; - } - - double EquilRecord::waterOilContactCapillaryPressure() const { - return this->water_oil_contact_capillary_pressure; - } - - double EquilRecord::gasOilContactDepth() const { - return this->gas_oil_contact_depth; - } - - double EquilRecord::gasOilContactCapillaryPressure() const { - return this->gas_oil_contact_capillary_pressure; - } - - bool EquilRecord::liveOilInitConstantRs() const { - return this->live_oil_init_proc; - } - - bool EquilRecord::wetGasInitConstantRv() const { - return this->wet_gas_init_proc; - } - - int EquilRecord::initializationTargetAccuracy() const { - return this->init_target_accuracy; - } - - /* */ - - Equil::Equil( const DeckKeyword& keyword ) : - records( keyword.begin(), keyword.end() ) - {} - - const EquilRecord& Equil::getRecord( size_t id ) const { - return this->records.at( id ); - } - - size_t Equil::size() const { - return this->records.size(); - } - - bool Equil::empty() const { - return this->records.empty(); - } - - Equil::const_iterator Equil::begin() const { - return this->records.begin(); - } - - Equil::const_iterator Equil::end() const { - return this->records.end(); - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/InitConfig/Equil.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/InitConfig/Equil.hpp deleted file mode 100644 index 9c9f6ccf6a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/InitConfig/Equil.hpp +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef OPM_EQUIL_HPP -#define OPM_EQUIL_HPP - -namespace Opm { - - class DeckKeyword; - class DeckRecord; - - class EquilRecord { - public: - explicit EquilRecord( const DeckRecord& ); - - double datumDepth() const; - double datumDepthPressure() const; - double waterOilContactDepth() const; - double waterOilContactCapillaryPressure() const; - double gasOilContactDepth() const; - double gasOilContactCapillaryPressure() const; - - bool liveOilInitConstantRs() const; - bool wetGasInitConstantRv() const; - int initializationTargetAccuracy() const; - - private: - double datum_depth; - double datum_depth_ps; - double water_oil_contact_depth; - double water_oil_contact_capillary_pressure; - double gas_oil_contact_depth; - double gas_oil_contact_capillary_pressure; - - bool live_oil_init_proc; - bool wet_gas_init_proc; - int init_target_accuracy; - }; - - class Equil { - public: - using const_iterator = std::vector< EquilRecord >::const_iterator; - - Equil() = default; - explicit Equil( const DeckKeyword& ); - - const EquilRecord& getRecord( size_t id ) const; - - size_t size() const; - bool empty() const; - - const_iterator begin() const; - const_iterator end() const; - - private: - std::vector< EquilRecord > records; - }; - -} - -#endif //OPM_EQUIL_HPP diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/InitConfig/InitConfig.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/InitConfig/InitConfig.cpp deleted file mode 100644 index fe296b4da8..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/InitConfig/InitConfig.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -namespace Opm { - - static inline Equil equils( const Deck& deck ) { - if( !deck.hasKeyword( ) ) return {}; - return Equil( deck.getKeyword( ) ); - } - - InitConfig::InitConfig(DeckConstPtr deck) : InitConfig(*deck) {} - - InitConfig::InitConfig(const Deck& deck) : equil(equils(deck)) { - initRestartKW(deck); - } - - void InitConfig::setRestart( const std::string& root, int step) { - m_restartRequested = true; - m_restartStep = step; - m_restartRootName = root; - } - - - void InitConfig::initRestartKW(const Deck& deck) { - if (deck.hasKeyword( )) { - const auto& keyword = deck.getKeyword( ); - const auto& record = keyword.getRecord(0); - const auto& save_item = record.getItem(2); - if (save_item.hasValue(0)) - throw std::runtime_error("OPM does not support RESTART from a SAVE file, only from RESTART files"); - - { - const auto& root_item = record.getItem(0); - const std::string& root = root_item.get< std::string >(0); - - const auto& step_item = record.getItem(1); - int step = step_item.get< int >(0); - - setRestart( root , step ); - } - } else if (deck.hasKeyword()) - throw std::runtime_error("Error in deck: Can not supply SKIPREST keyword without a preceeding RESTART."); - } - - bool InitConfig::restartRequested() const { - return m_restartRequested; - } - - int InitConfig::getRestartStep() const { - return m_restartStep; - } - - const std::string& InitConfig::getRestartRootName() const { - return m_restartRootName; - } - - bool InitConfig::hasEquil() const { - return !this->equil.empty(); - } - - const Equil& InitConfig::getEquil() const { - if( !this->hasEquil() ) - throw std::runtime_error( "Error: No 'EQUIL' present" ); - - return this->equil; - } - -} //namespace Opm diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp deleted file mode 100644 index b783fc15c0..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef OPM_INIT_CONFIG_HPP -#define OPM_INIT_CONFIG_HPP - -#include - -namespace Opm { - - class Deck; - - class InitConfig { - - public: - InitConfig(std::shared_ptr< const Deck > deck); - InitConfig(const Deck& deck); - - void setRestart( const std::string& root, int step); - bool restartRequested() const; - int getRestartStep() const; - const std::string& getRestartRootName() const; - - bool hasEquil() const; - const Equil& getEquil() const; - - private: - void initRestartKW(const Deck& deck); - - bool m_restartRequested = false; - int m_restartStep = 0; - std::string m_restartRootName; - - Equil equil; - }; - - typedef std::shared_ptr InitConfigPtr; - typedef std::shared_ptr InitConfigConstPtr; - -} //namespace Opm - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/InitConfig/tests/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/InitConfig/tests/CMakeLists.txt deleted file mode 100644 index 6d416580c1..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/InitConfig/tests/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -opm_add_test(runInitConfigTests SOURCES InitConfigTest.cpp - LIBRARIES opmparser ${Boost_LIBRARIES}) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/InitConfig/tests/InitConfigTest.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/InitConfig/tests/InitConfigTest.cpp deleted file mode 100644 index f6e05981d0..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/InitConfig/tests/InitConfigTest.cpp +++ /dev/null @@ -1,176 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - - -#define BOOST_TEST_MODULE InitConfigTests - -#include - -#include -#include -#include -#include -#include -#include - - -using namespace Opm; - -const std::string& deckStr = - "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /\n" - "SOLUTION\n" - "RESTART\n" - "BASE 5\n" - "/\n" - "GRID\n" - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - "SKIPREST \n"; - - -const std::string& deckStr2 = - "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /\n" - "SOLUTION\n" - "GRID\n" - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n"; - - -const std::string& deckStr3 = - "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /\n" - "SOLUTION\n" - "RESTART\n" - "BASE 5 SAVE UNFORMATTED /\n" - "GRID\n" - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - "SKIPREST \n"; - -const std::string& deckStr4 = - "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /\n" - "SOLUTION\n" - "RESTART\n" - "BASE 5 /\n" - "GRID\n" - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n"; - -const std::string& deckWithEquil = - "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /\n" - "EQLDIMS\n" - "1 100 20 1 1 /\n" - "SOLUTION\n" - "RESTART\n" - "BASE 5\n" - "/\n" - "EQUIL\n" - "2469 382.4 1705.0 0.0 500 0.0 1 1 20 /\n" - "GRID\n" - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - "SKIPREST \n"; - -static DeckPtr createDeck(const std::string& input) { - Opm::Parser parser; - return parser.parseString(input, Opm::ParseContext()); -} - -BOOST_AUTO_TEST_CASE(InitConfigTest) { - - DeckPtr deck = createDeck(deckStr); - InitConfigPtr initConfigPtr; - BOOST_CHECK_NO_THROW(initConfigPtr = std::make_shared(deck)); - BOOST_CHECK_EQUAL(initConfigPtr->restartRequested(), true); - BOOST_CHECK_EQUAL(initConfigPtr->getRestartStep(), 5); - BOOST_CHECK_EQUAL(initConfigPtr->getRestartRootName(), "BASE"); - - DeckPtr deck2 = createDeck(deckStr2); - InitConfigPtr initConfigPtr2; - BOOST_CHECK_NO_THROW(initConfigPtr2 = std::make_shared(deck2)); - BOOST_CHECK_EQUAL(initConfigPtr2->restartRequested(), false); - BOOST_CHECK_EQUAL(initConfigPtr2->getRestartStep(), 0); - BOOST_CHECK_EQUAL(initConfigPtr2->getRestartRootName(), ""); - - initConfigPtr2->setRestart( "CASE" , 100); - BOOST_CHECK_EQUAL(initConfigPtr2->restartRequested(), true); - BOOST_CHECK_EQUAL(initConfigPtr2->getRestartStep(), 100); - BOOST_CHECK_EQUAL(initConfigPtr2->getRestartRootName(), "CASE"); - - DeckPtr deck3 = createDeck(deckStr3); - BOOST_CHECK_THROW(std::make_shared(deck3), std::runtime_error); - - DeckPtr deck4 = createDeck(deckStr4); - BOOST_CHECK_NO_THROW(std::make_shared(deck4)); -} - -BOOST_AUTO_TEST_CASE( InitConfigWithoutEquil ) { - auto deck = createDeck( deckStr ); - InitConfig config( deck ); - - BOOST_CHECK( !config.hasEquil() ); - BOOST_CHECK_THROW( config.getEquil(), std::runtime_error ); -} - -BOOST_AUTO_TEST_CASE( InitConfigWithEquil ) { - auto deck = createDeck( deckWithEquil ); - InitConfig config( deck ); - - BOOST_CHECK( config.hasEquil() ); - BOOST_CHECK_NO_THROW( config.getEquil() ); -} - -BOOST_AUTO_TEST_CASE( EquilOperations ) { - auto deck = createDeck( deckWithEquil ); - InitConfig config( deck ); - - const auto& equil = config.getEquil(); - - BOOST_CHECK( !equil.empty() ); - BOOST_CHECK_EQUAL( 1U, equil.size() ); - - BOOST_CHECK_NO_THROW( equil.getRecord( 0 ) ); - BOOST_CHECK_THROW( equil.getRecord( 1 ), std::out_of_range ); - - const auto& record = equil.getRecord( 0 ); - BOOST_CHECK_CLOSE( 2469, record.datumDepth(), 1e-12 ); - BOOST_CHECK_CLOSE( 382.4 * details::unit::barsa, record.datumDepthPressure(), 1e-12 ); - BOOST_CHECK_CLOSE( 1705.0, record.waterOilContactDepth(), 1e-12 ); - BOOST_CHECK_CLOSE( 0.0, record.waterOilContactCapillaryPressure(), 1e-12 ); - BOOST_CHECK_CLOSE( 500, record.gasOilContactDepth(), 1e-12 ); - BOOST_CHECK_CLOSE( 0.0, record.gasOilContactCapillaryPressure(), 1e-12 ); - BOOST_CHECK( !record.liveOilInitConstantRs() ); - BOOST_CHECK( !record.wetGasInitConstantRv() ); - BOOST_CHECK_EQUAL( 20, record.initializationTargetAccuracy() ); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Messages.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Messages.cpp deleted file mode 100644 index 624c97fbcf..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Messages.cpp +++ /dev/null @@ -1,98 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include -#include -#include - - -namespace Opm { - - Messages::Messages(const Messages& messages, const DeckRecord& record) : - m_message_print_limit( messages.m_message_print_limit ), - m_comment_print_limit( messages.m_comment_print_limit ), - m_warning_print_limit( messages.m_warning_print_limit ), - m_problem_print_limit( messages.m_problem_print_limit ), - m_error_print_limit( messages.m_error_print_limit ), - m_bug_print_limit( messages.m_bug_print_limit ), - m_message_stop_limit( messages.m_message_stop_limit ), - m_comment_stop_limit( messages.m_comment_stop_limit ), - m_warning_stop_limit( messages.m_warning_stop_limit ), - m_problem_stop_limit( messages.m_problem_stop_limit ), - m_error_stop_limit( messages.m_error_stop_limit ), - m_bug_stop_limit( messages.m_bug_stop_limit ) - - { - if (!record.getItem().defaultApplied(0)) - m_message_print_limit = record.getItem().get< int >( 0 ); - - if (!record.getItem().defaultApplied(0)) - m_comment_print_limit = record.getItem().get< int >( 0 ); - - if (!record.getItem().defaultApplied(0)) - m_warning_print_limit = record.getItem().get< int >( 0 ); - - if (!record.getItem().defaultApplied(0)) - m_problem_print_limit = record.getItem().get< int >( 0 ); - - if (!record.getItem().defaultApplied(0)) - m_error_print_limit = record.getItem().get< int >( 0 ); - - if (!record.getItem().defaultApplied(0)) - m_bug_print_limit = record.getItem().get< int >( 0 ); - - /*****************************************************************/ - - if (!record.getItem().defaultApplied(0)) - m_message_stop_limit = record.getItem().get< int >( 0 ); - - if (!record.getItem().defaultApplied(0)) - m_comment_stop_limit = record.getItem().get< int >( 0 ); - - if (!record.getItem().defaultApplied(0)) - m_warning_stop_limit = record.getItem().get< int >( 0 ); - - if (!record.getItem().defaultApplied(0)) - m_problem_stop_limit = record.getItem().get< int >( 0 ); - - if (!record.getItem().defaultApplied(0)) - m_error_stop_limit = record.getItem().get< int >( 0 ); - - if (!record.getItem().defaultApplied(0)) - m_bug_stop_limit = record.getItem().get< int >( 0 ); - } - - Messages::Messages(const DeckRecord& record) : - m_message_print_limit( record.getItem().get< int >( 0 )), - m_comment_print_limit( record.getItem().get< int >( 0 )), - m_warning_print_limit( record.getItem().get< int >(0)), - m_problem_print_limit( record.getItem().get< int >(0)), - m_error_print_limit( record.getItem().get< int >(0)), - m_bug_print_limit( record.getItem().get< int >(0)), - m_message_stop_limit( record.getItem().get< int >(0)), - m_comment_stop_limit( record.getItem().get< int >(0)), - m_warning_stop_limit( record.getItem().get< int >(0)), - m_problem_stop_limit( record.getItem().get< int >(0)), - m_error_stop_limit( record.getItem().get< int >(0)), - m_bug_stop_limit( record.getItem().get< int >(0)) - { } - -} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Messages.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Messages.hpp deleted file mode 100644 index 59fa5f4bac..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Messages.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef OPM_MESSAGES_HPP -#define OPM_MESSAGES_HPP - -#include - -namespace Opm { - - class Messages { - public: - - /* - This constructor will create a new Messages object which is - a copy of the input argument, and then all items explicitly - set in the record are modified. - */ - Messages(const Messages& message , const DeckRecord& record); - - Messages(const DeckRecord& record); - - private: - int m_message_print_limit; - int m_comment_print_limit; - int m_warning_print_limit; - int m_problem_print_limit; - int m_error_print_limit; - int m_bug_print_limit; - - int m_message_stop_limit; - int m_comment_stop_limit; - int m_warning_stop_limit; - int m_problem_stop_limit; - int m_error_stop_limit; - int m_bug_stop_limit; - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Completion.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Completion.cpp deleted file mode 100644 index fb083cbaa4..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Completion.cpp +++ /dev/null @@ -1,313 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace Opm { - - Completion::Completion(int i, int j , int k , - double depth, - WellCompletion::StateEnum state , - const Value& connectionTransmissibilityFactor, - const Value& diameter, - const Value& skinFactor, - const WellCompletion::DirectionEnum direction) - : m_i(i), m_j(j), m_k(k), - m_diameter(diameter), - m_connectionTransmissibilityFactor(connectionTransmissibilityFactor), - m_wellPi(1.0), - m_skinFactor(skinFactor), - m_state(state), - m_direction(direction), - m_segment_number(-1), - m_center_depth( depth ) - {} - - Completion::Completion(std::shared_ptr oldCompletion, WellCompletion::StateEnum newStatus) - : - m_i(oldCompletion->getI()), - m_j(oldCompletion->getJ()), - m_k(oldCompletion->getK()), - m_diameter(oldCompletion->getDiameterAsValueObject()), - m_connectionTransmissibilityFactor(oldCompletion->getConnectionTransmissibilityFactorAsValueObject()), - m_wellPi(oldCompletion->getWellPi()), - m_skinFactor(oldCompletion->getSkinFactorAsValueObject()), - m_state(newStatus), - m_direction(oldCompletion->getDirection()), - m_center_depth(oldCompletion->getCenterDepth()) - { - if (oldCompletion->attachedToSegment()) { - m_segment_number = oldCompletion->getSegmentNumber(); - } else { - m_segment_number = -1; - } - } - - Completion::Completion(std::shared_ptr oldCompletion, double wellPi) - : - m_i(oldCompletion->getI()), - m_j(oldCompletion->getJ()), - m_k(oldCompletion->getK()), - m_diameter(oldCompletion->getDiameterAsValueObject()), - m_connectionTransmissibilityFactor(oldCompletion->getConnectionTransmissibilityFactorAsValueObject()), - m_wellPi(oldCompletion->getWellPi()), - m_skinFactor(oldCompletion->getSkinFactorAsValueObject()), - m_state(oldCompletion->getState()), - m_direction(oldCompletion->getDirection()), - m_center_depth(oldCompletion->getCenterDepth()) - { - if (oldCompletion->attachedToSegment()) { - m_segment_number = oldCompletion->getSegmentNumber(); - } else { - m_segment_number = -1; - } - - if(m_wellPi!=0){ - m_wellPi*=wellPi; - }else{ - m_wellPi=wellPi; - } - } - - Completion::Completion(std::shared_ptr oldCompletion) - : - m_i(oldCompletion->getI()), - m_j(oldCompletion->getJ()), - m_k(oldCompletion->getK()), - m_diameter(oldCompletion->getDiameterAsValueObject()), - m_connectionTransmissibilityFactor(oldCompletion->getConnectionTransmissibilityFactorAsValueObject()), - m_wellPi(oldCompletion->getWellPi()), - m_skinFactor(oldCompletion->getSkinFactorAsValueObject()), - m_state(oldCompletion->getState()), - m_direction(oldCompletion->getDirection()), - m_center_depth(oldCompletion->getCenterDepth()) - { - if (oldCompletion->attachedToSegment()) { - m_segment_number = oldCompletion->getSegmentNumber(); - } else { - m_segment_number = -1; - } - } - - bool Completion::sameCoordinate(const Completion& other) const { - if ((m_i == other.m_i) && - (m_j == other.m_j) && - (m_k == other.m_k)) - return true; - else - return false; - } - - bool Completion::sameCoordinate(const int i, const int j, const int k) const { - if ((m_i == i) && (m_j == j) && (m_k == k)) { - return true; - } else { - return false; - } - } - - - /** - This will break up one record and return a pair: . The reason it - will return a list is that the 'K1 K2' structure is - disentangled, and each completion is returned separately. - */ - - inline std::vector< CompletionPtr > - fromCOMPDAT( const EclipseGrid& grid, const DeckRecord& compdatRecord, const Well& well ) { - - std::vector completions; - - // We change from eclipse's 1 - n, to a 0 - n-1 solution - // I and J can be defaulted with 0 or *, in which case they are fetched - // from the well head - const auto& itemI = compdatRecord.getItem( "I" ); - const auto defaulted_I = itemI.defaultApplied( 0 ) || itemI.get< int >( 0 ) == 0; - const int I = !defaulted_I ? itemI.get< int >( 0 ) - 1 : well.getHeadI(); - - const auto& itemJ = compdatRecord.getItem( "J" ); - const auto defaulted_J = itemJ.defaultApplied( 0 ) || itemJ.get< int >( 0 ) == 0; - const int J = !defaulted_J ? itemJ.get< int >( 0 ) - 1 : well.getHeadJ(); - - int K1 = compdatRecord.getItem("K1").get< int >(0) - 1; - int K2 = compdatRecord.getItem("K2").get< int >(0) - 1; - WellCompletion::StateEnum state = WellCompletion::StateEnumFromString( compdatRecord.getItem("STATE").getTrimmedString(0) ); - Value connectionTransmissibilityFactor("ConnectionTransmissibilityFactor"); - Value diameter("Diameter"); - Value skinFactor("SkinFactor"); - - { - const auto& connectionTransmissibilityFactorItem = compdatRecord.getItem("CONNECTION_TRANSMISSIBILITY_FACTOR"); - const auto& diameterItem = compdatRecord.getItem("DIAMETER"); - const auto& skinFactorItem = compdatRecord.getItem("SKIN"); - - if (connectionTransmissibilityFactorItem.hasValue(0) && connectionTransmissibilityFactorItem.getSIDouble(0) > 0) - connectionTransmissibilityFactor.setValue(connectionTransmissibilityFactorItem.getSIDouble(0)); - - if (diameterItem.hasValue(0)) - diameter.setValue( diameterItem.getSIDouble(0)); - - if (skinFactorItem.hasValue(0)) - skinFactor.setValue( skinFactorItem.get< double >(0)); - } - - const WellCompletion::DirectionEnum direction = WellCompletion::DirectionEnumFromString(compdatRecord.getItem("DIR").getTrimmedString(0)); - - for (int k = K1; k <= K2; k++) { - double depth = grid.getCellDepth( I,J,k ); - CompletionPtr completion(new Completion(I , J , k , depth , state , connectionTransmissibilityFactor, diameter, skinFactor, direction )); - completions.push_back( completion ); - } - - return completions; - } - - /* - Will return a map: - - { - "WELL1" : [ Completion1 , Completion2 , ... , CompletionN ], - "WELL2" : [ Completion1 , Completion2 , ... , CompletionN ], - ... - } - */ - - std::map< std::string, std::vector< CompletionPtr > > - Completion::fromCOMPDAT( const EclipseGrid& grid , - const DeckKeyword& compdatKeyword, - const std::vector< const Well* >& wells ) { - - std::map< std::string, std::vector< CompletionPtr > > res; - - for( const auto& record : compdatKeyword ) { - - const auto wellname = record.getItem( "WELL" ).getTrimmedString( 0 ); - const auto name_eq = [&]( const Well* w ) { - return w->name() == wellname; - }; - - auto well = std::find_if( wells.begin(), wells.end(), name_eq ); - - if( well == wells.end() ) continue; - - auto completions = Opm::fromCOMPDAT( grid, record, **well ); - - res[ wellname ].insert( res[ wellname ].end(), - completions.begin(), - completions.end() ); - } - - return res; - } - - void Completion::fixDefaultIJ(int wellHeadI , int wellHeadJ) { - if (m_i < 0) - m_i = wellHeadI; - - if (m_j < 0) - m_j = wellHeadJ; - } - - - int Completion::getI() const { - return m_i; - } - - int Completion::getJ() const { - return m_j; - } - - int Completion::getK() const { - return m_k; - } - - WellCompletion::StateEnum Completion::getState() const { - return m_state; - } - - double Completion::getConnectionTransmissibilityFactor() const { - return m_connectionTransmissibilityFactor.getValue(); - } - - double Completion::getDiameter() const { - return m_diameter.getValue(); - } - - double Completion::getSkinFactor() const { - return m_skinFactor.getValue(); - } - - const Value& Completion::getConnectionTransmissibilityFactorAsValueObject() const { - return m_connectionTransmissibilityFactor; - } - - Value Completion::getDiameterAsValueObject() const { - return m_diameter; - } - - Value Completion::getSkinFactorAsValueObject() const { - return m_skinFactor; - } - - WellCompletion::DirectionEnum Completion::getDirection() const { - return m_direction; - } - - double Completion::getWellPi() const { - return m_wellPi; - } - - int Completion::getSegmentNumber() const { - if (!attachedToSegment()) { - throw std::runtime_error(" the completion is not attached to a segment!\n "); - } - return m_segment_number; - } - - double Completion::getCenterDepth() const { - return m_center_depth; - } - - void Completion::attachSegment(int segmentNumber , double centerDepth) { - assert(segmentNumber > 0); - - m_segment_number = segmentNumber; - m_center_depth = centerDepth; - } - - bool Completion::attachedToSegment() const { - return (m_segment_number > 0); - } - - -} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Completion.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Completion.hpp deleted file mode 100644 index f5e3425eb4..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Completion.hpp +++ /dev/null @@ -1,102 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - - -#ifndef COMPLETION_HPP_ -#define COMPLETION_HPP_ - -#include -#include -#include -#include - -#include -#include - - -namespace Opm { - - class DeckKeyword; - class DeckRecord; - class Well; - class EclipseGrid; - - class Completion { - public: - Completion(int i, int j , int k , - double depth, - WellCompletion::StateEnum state , - const Value& connectionTransmissibilityFactor, - const Value& diameter, - const Value& skinFactor, - const WellCompletion::DirectionEnum direction = WellCompletion::DirectionEnum::Z); - - Completion(std::shared_ptr oldCompletion, WellCompletion::StateEnum newStatus); - Completion(std::shared_ptr oldCompletion, double wellPi); - Completion(std::shared_ptr oldCompletion); - - bool sameCoordinate(const Completion& other) const; - bool sameCoordinate(const int i, const int j, const int k) const; - - int getI() const; - int getJ() const; - int getK() const; - WellCompletion::StateEnum getState() const; - double getConnectionTransmissibilityFactor() const; - double getWellPi() const; - const Value& getConnectionTransmissibilityFactorAsValueObject() const; - double getDiameter() const; - double getSkinFactor() const; - void fixDefaultIJ(int wellHeadI , int wellHeadJ); - int getSegmentNumber() const; - double getCenterDepth() const; - void attachSegment(const int segmentNumber , const double centerDepth); - bool attachedToSegment() const; - - WellCompletion::DirectionEnum getDirection() const; - - static std::map< std::string, std::vector< std::shared_ptr< Completion > > > - fromCOMPDAT( const EclipseGrid& grid, - const DeckKeyword& compdatKeyword, - const std::vector< const Well* >& ); - - private: - int m_i, m_j, m_k; - Value m_diameter; - Value m_connectionTransmissibilityFactor; - double m_wellPi; - Value m_skinFactor; - WellCompletion::StateEnum m_state; - WellCompletion::DirectionEnum m_direction; - Value getDiameterAsValueObject() const; - Value getSkinFactorAsValueObject() const; - // related segment number - // -1 means the completion is not related to segment - int m_segment_number; - double m_center_depth; - - }; - - typedef std::shared_ptr CompletionPtr; - typedef std::shared_ptr CompletionConstPtr; -} - - - -#endif /* COMPLETION_HPP_ */ diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/CompletionSet.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/CompletionSet.cpp deleted file mode 100644 index 9aa73129b4..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/CompletionSet.cpp +++ /dev/null @@ -1,151 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include -#include -#include - -#include -#include -#include -#include - -namespace Opm { - - CompletionSet::CompletionSet() {} - - - size_t CompletionSet::size() const { - return m_completions.size(); - } - - - CompletionConstPtr CompletionSet::get(size_t index) const { - if (index >= m_completions.size()) - throw std::range_error("Out of bounds"); - - return m_completions[index]; - } - - - CompletionConstPtr CompletionSet::getFromIJK(const int i, const int j, const int k) const { - for (size_t ic = 0; ic < size(); ++ic) { - if (get(ic)->sameCoordinate(i, j, k)) { - return get(ic); - } - } - throw std::runtime_error(" the completion is not found! \n "); - } - - - void CompletionSet::add(CompletionConstPtr completion) { - bool inserted = false; - - for (size_t ic = 0; ic < m_completions.size(); ic++) { - CompletionConstPtr current = m_completions[ic]; - if (current->sameCoordinate( *completion )) { - m_completions[ic] = completion; - inserted = true; - } - } - - if (!inserted) - m_completions.push_back( completion ); - } - - - CompletionSet * CompletionSet::shallowCopy() const { - CompletionSet * copy = new CompletionSet(); - for (size_t ic = 0; ic < m_completions.size(); ic++) { - CompletionConstPtr completion = m_completions[ic]; - copy->m_completions.push_back( completion ); - } - return copy; - } - - - bool CompletionSet::allCompletionsShut( ) const { - bool allShut = true; - for (auto ci = m_completions.begin(); ci != m_completions.end(); ++ci) { - CompletionConstPtr completion_ptr = *ci; - if (completion_ptr->getState() != WellCompletion::StateEnum::SHUT) { - allShut = false; - break; - } - } - return allShut; - } - - - - void CompletionSet::orderCompletions(size_t well_i, size_t well_j) - { - if (m_completions.empty()) { - return; - } - - // Find the first completion and swap it into the 0-position. - const double surface_z = 0.0; - size_t first_index = findClosestCompletion(well_i, well_j, surface_z, 0); - std::swap(m_completions[first_index], m_completions[0]); - - // Repeat for remaining completions. - // - // Note that since findClosestCompletion() is O(n), this is an - // O(n^2) algorithm. However, it should be acceptable since - // the expected number of completions is fairly low (< 100). - - for (size_t pos = 1; pos < m_completions.size() - 1; ++pos) { - CompletionConstPtr prev = m_completions[pos - 1]; - const double prevz = prev->getCenterDepth(); - size_t next_index = findClosestCompletion(prev->getI(), prev->getJ(), prevz, pos); - std::swap(m_completions[next_index], m_completions[pos]); - } - } - - - - size_t CompletionSet::findClosestCompletion(int oi, int oj, double oz, size_t start_pos) - { - size_t closest = std::numeric_limits::max(); - int min_ijdist2 = std::numeric_limits::max(); - double min_zdiff = std::numeric_limits::max(); - for (size_t pos = start_pos; pos < m_completions.size(); ++pos) { - const double depth = m_completions[pos]->getCenterDepth(); - const int ci = m_completions[pos]->getI(); - const int cj = m_completions[pos]->getJ(); - // Using square of distance to avoid non-integer arithmetics. - const int ijdist2 = (ci - oi) * (ci - oi) + (cj - oj) * (cj - oj); - if (ijdist2 < min_ijdist2) { - min_ijdist2 = ijdist2; - min_zdiff = std::abs(depth - oz); - closest = pos; - } else if (ijdist2 == min_ijdist2) { - const double zdiff = std::abs(depth - oz); - if (zdiff < min_zdiff) { - min_zdiff = zdiff; - closest = pos; - } - } - } - assert(closest != std::numeric_limits::max()); - return closest; - } - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/CompletionSet.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/CompletionSet.hpp deleted file mode 100644 index 1361e0630b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/CompletionSet.hpp +++ /dev/null @@ -1,69 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - - -#ifndef COMPLETIONSET_HPP_ -#define COMPLETIONSET_HPP_ - -#include - -#include - -namespace Opm { - - class CompletionSet { - public: - using const_iterator = std::vector< std::shared_ptr< const Completion > >::const_iterator; - - CompletionSet(); - void add(std::shared_ptr< const Completion > completion); - size_t size() const; - CompletionSet * shallowCopy() const; - std::shared_ptr< const Completion > get(size_t index) const; - std::shared_ptr< const Completion > getFromIJK(const int i, const int j, const int k) const; - - const_iterator begin() const { return this->m_completions.begin(); } - const_iterator end() const { return this->m_completions.end(); } - - bool allCompletionsShut() const; - /// Order completions irrespective of input order. - /// The algorithm used is the following: - /// 1. The completion nearest to the given (well_i, well_j) - /// coordinates in terms of the completion's (i, j) is chosen - /// to be the first completion. If non-unique, choose one with - /// lowest z-depth (shallowest). - /// 2. Choose next completion to be nearest to current in (i, j) sense. - /// If non-unique choose closest in z-depth (not logical cartesian k). - /// - /// \param[in] well_i logical cartesian i-coordinate of well head - /// \param[in] well_j logical cartesian j-coordinate of well head - /// \param[in] grid EclipseGrid object, used for cell depths - void orderCompletions(size_t well_i, size_t well_j); - private: - std::vector> m_completions; - size_t findClosestCompletion(int oi, int oj, double oz, size_t start_pos); - }; - - typedef std::shared_ptr CompletionSetPtr; - typedef std::shared_ptr CompletionSetConstPtr; -} - - - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/DynamicState.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/DynamicState.hpp deleted file mode 100644 index f65b77779f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/DynamicState.hpp +++ /dev/null @@ -1,187 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - - -#ifndef DYNAMICSTATE_HPP_ -#define DYNAMICSTATE_HPP_ - -#include - -#include - -#include - - -namespace Opm { - - /** - The DynamicState class is designed to hold information about - properties with the following semantics: - - 1. The property can be updated repeatedly at different - timesteps; observe that the class does not support - operator[] - only updates with weakly increasing timesteps - are supported. - - 2. At any point in the time the previous last set value - applies. - - The class is very much tailored to support the Schedule file of - Eclipse where a control applied at time T will apply - indefinitely, or until explicitly set to a different value. - - The update() method returns true if the updated value is - different from the current value, this implies that the - class must support operator!= - */ - - - - template - class DynamicState { - public: - - - DynamicState(const std::shared_ptr< const TimeMap > timeMap, T initialValue) { - m_timeMap = timeMap; - init( initialValue ); - } - - void globalReset( T newValue ) { - init( newValue ); - } - - - const T& back() const { - if (m_data.size() > 0) - return m_data.back(); - else - return m_initialValue; - } - - const T& at(size_t index) const { - if (index >= m_timeMap->size()) - throw std::range_error("Index value is out range."); - - if (index >= m_data.size()) - return m_currentValue; - - return m_data.at(index); - } - - - const T& operator[](size_t index) const { - return at(index); - } - - - const T& get(size_t index) const { - return this->at( index ); - } - - - - void updateInitial(T initialValue) { - if (m_initialValue != initialValue) { - size_t index; - m_initialValue = initialValue; - if (m_initialRange > 0) { - for (index = 0; index < m_initialRange; index++) - m_data[index] = m_initialValue; - } else - m_currentValue = initialValue; - } - } - - - size_t size() const { - return m_data.size(); - } - - - /** - If the current value has been changed the method will - return true, otherwise it will return false. - */ - bool update(size_t index , T value) { - bool change = (value != m_currentValue); - if (index >= (m_timeMap->size())) - throw std::range_error("Index value is out range."); - - if (m_data.size() > 0) { - if (index < (m_data.size() - 1)) - throw std::invalid_argument("Elements must be added in weakly increasing order"); - } - - { - size_t currentSize = m_data.size(); - if (currentSize <= index) { - for (size_t i = currentSize; i <= index; i++) - m_data.push_back( m_currentValue ); - } - } - - m_data[index] = value; - m_currentValue = value; - if (m_initialRange == 0) - m_initialRange = index; - - return change; - } - - - /// Will return the index of the first occurence of @value, or - /// -1 if @value is not found. - ssize_t find(const T& value) { - auto iter = std::find( m_data.begin() , m_data.end() , value); - if (iter != m_data.end()) { - // Found normally - return std::distance( m_data.begin() , iter ); - } else { - if ((m_data.size() == 0) && (value == m_currentValue)) - // Not found explicitly - but the value corresponds to the initial 'current value' - return 0; - - // Not found - return -1; - } - } - - - private: - - void init(T initialValue) { - m_data.clear(); - m_currentValue = initialValue; - m_initialValue = initialValue; - m_initialRange = 0; - } - - - std::vector m_data; - std::shared_ptr< const TimeMap > m_timeMap; - T m_currentValue; - T m_initialValue; - size_t m_initialRange; - }; -} - - - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/DynamicVector.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/DynamicVector.hpp deleted file mode 100644 index 92b3d4fdda..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/DynamicVector.hpp +++ /dev/null @@ -1,104 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - - -#ifndef DYNAMICVECTOR_HPP_ -#define DYNAMICVECTOR_HPP_ - - -#include - - -#include - -namespace Opm { - - /* - The DynamicVector class is a thin wrapper around - std::vector with the following twists: - - - The vector is bound to a TimeMap instance. - - - The operator[] supports arbitrary assignment - the vector - will grow as needed, however it will *not* grow beyond the - length of the TimeMap. - - - The vector is created with a default value which will be - used to 'fill in the holes' when growing; and that value - will also be returned if you ask for values beyond the end - of the vector. - */ - - template - class DynamicVector { - public: - - - DynamicVector(const std::shared_ptr< const TimeMap > timeMap, T defaultValue) { - m_timeMap = timeMap; - m_defaultValue = defaultValue; - } - - - const T& operator[](size_t index) const { - assertSize( index ); - - if (index < m_data.size()) - return m_data[index]; - else - return m_defaultValue; - } - - - const T& iget(size_t index) const { - return (*this)[index]; - } - - - - T& operator[](size_t index) { - assertSize( index ); - - if (index >= m_data.size()) - m_data.resize( index + 1 , m_defaultValue); - - return m_data[index]; - } - - void iset(size_t index, T value) { - (*this)[index] = value; - } - - - private: - void assertSize(size_t index) const { - if (index >= m_timeMap->size()) - throw std::range_error("Index value is out range."); - } - - - std::vector m_data; - std::shared_ptr< const TimeMap > m_timeMap; - T m_defaultValue; - }; -} - - - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Events.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Events.cpp deleted file mode 100644 index 5939ea1cb2..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Events.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ -#include - -#include - -namespace Opm { - - Events::Events(std::shared_ptr timeMap) - : m_events( DynamicVector( timeMap , 0 ) ) - { - } - - - bool Events::hasEvent(uint64_t eventMask , size_t reportStep) const { - uint64_t eventSum = m_events[reportStep]; - if (eventSum & eventMask) - return true; - else - return false; - } - - - void Events::addEvent(ScheduleEvents::Events event, size_t reportStep) { - m_events[reportStep] |= event; - } - -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Events.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Events.hpp deleted file mode 100644 index 0703bae0e5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Events.hpp +++ /dev/null @@ -1,102 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ -#ifndef SCHEDULE_EVENTS_HPP -#define SCHEDULE_EVENTS_HPP - -#include - -#include - -namespace Opm -{ - namespace ScheduleEvents { - // These values are used as bitmask - 2^n structure is essential. - enum Events { - /* The NEW_WELL event is triggered by the WELSPECS - keyword. */ - NEW_WELL = 1, - - /* - The NEW_GROUP event is triggered by the WELSPECS and - GRUPTREE keywords. - */ - NEW_GROUP = 2, - - /* - The PRODUCTION_UPDATE event is triggered by the - WCONPROD and WCONHIST keywords. The event will be - triggered if *any* of the elements in one of keywords - is changed. Quite simlar for INJECTION_UPDATE and - POLYMER_UPDATE. - */ - PRODUCTION_UPDATE = 4, - INJECTION_UPDATE = 8, - POLYMER_UPDATES = 16, - - /* - This event is triggered if the well status is changed - between {OPEN,SHUT,STOP,AUTO}. There are many keywords - which can trigger a well status change. - */ - WELL_STATUS_CHANGE = 32, - - /* - COMPDAT and WELOPEN - */ - COMPLETION_CHANGE = 64, - - /* - The well group topolyg has changed. - */ - GROUP_CHANGE = 128, - - - /* - Geology modifier. - */ - GEO_MODIFIER = 256 - }; - } - - /* - This class implements a simple system for recording when various - events happen in the Schedule file. The purpose of the class is - that downstream code can query this system whether a certain a - event has taken place, and then perform potentially expensive - calculations conditionally: - - auto events = schedule->getEvents(); - if (events.hasEvent(SchedulEvents::NEW_WELL , reportStep)) - // Perform expensive calculation which must be performed - // when a new well is introduced. - ... - - */ - - class Events { - public: - Events(std::shared_ptr timeMap); - void addEvent(ScheduleEvents::Events event, size_t reportStep); - bool hasEvent(uint64_t eventMask, size_t reportStep) const; - private: - DynamicVector m_events; - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Group.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Group.cpp deleted file mode 100644 index 5a1c6e7553..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Group.cpp +++ /dev/null @@ -1,352 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - - -#include -#include -#include - -#define INVALID_GROUP_RATE -999e100 -#define INVALID_EFFICIENCY_FACTOR 0.0 - - -namespace Opm { - namespace GroupProduction { - struct ProductionData { - ProductionData(TimeMapConstPtr timeMap); - - std::shared_ptr > controlMode; - std::shared_ptr > exceedAction; - std::shared_ptr > oilTarget; - std::shared_ptr > waterTarget; - std::shared_ptr > gasTarget; - std::shared_ptr > liquidTarget; - std::shared_ptr > reservoirVolumeTarget; - std::shared_ptr > efficiencyFactor; - std::shared_ptr > transferEfficiencyFactor; - - }; - - ProductionData::ProductionData(TimeMapConstPtr timeMap) : - controlMode( new DynamicState(timeMap , GroupProduction::NONE)), - exceedAction( new DynamicState(timeMap , GroupProductionExceedLimit::NONE)), - oilTarget( new DynamicState(timeMap , INVALID_GROUP_RATE)), - waterTarget( new DynamicState(timeMap , INVALID_GROUP_RATE)), - gasTarget( new DynamicState(timeMap , INVALID_GROUP_RATE)), - liquidTarget( new DynamicState(timeMap , INVALID_GROUP_RATE)), - reservoirVolumeTarget( new DynamicState(timeMap , INVALID_GROUP_RATE)), - efficiencyFactor( new DynamicState(timeMap, INVALID_EFFICIENCY_FACTOR)), - transferEfficiencyFactor( new DynamicState(timeMap, false)) - { - - } - } - - - - - namespace GroupInjection { - struct InjectionData { - InjectionData(TimeMapConstPtr timeMap); - - std::shared_ptr > phase; - std::shared_ptr > controlMode; - std::shared_ptr > rate; - std::shared_ptr > surfaceFlowMaxRate; - std::shared_ptr > reservoirFlowMaxRate; - std::shared_ptr > targetReinjectFraction; - std::shared_ptr > targetVoidReplacementFraction; - }; - - InjectionData::InjectionData(TimeMapConstPtr timeMap) : - phase( new DynamicState( timeMap , Phase::WATER )), - controlMode( new DynamicState( timeMap , NONE )), - rate( new DynamicState( timeMap , 0 )), - surfaceFlowMaxRate( new DynamicState( timeMap , 0)), - reservoirFlowMaxRate( new DynamicState( timeMap , 0)), - targetReinjectFraction( new DynamicState( timeMap , 0)), - targetVoidReplacementFraction( new DynamicState( timeMap , 0)) - { - - } - } - - - - - /*****************************************************************/ - - Group::Group(const std::string& name_, TimeMapConstPtr timeMap , size_t creationTimeStep) : - m_injection( new GroupInjection::InjectionData(timeMap) ), - m_production( new GroupProduction::ProductionData( timeMap )), - m_wells( new DynamicState< std::shared_ptr< const WellSet > >( timeMap , std::make_shared< const WellSet >() ) ), - m_isProductionGroup( timeMap, false), - m_isInjectionGroup( timeMap, false) - { - m_name = name_; - m_creationTimeStep = creationTimeStep; - } - - - const std::string& Group::name() const { - return m_name; - } - - - bool Group::hasBeenDefined(size_t timeStep) const { - if (timeStep < m_creationTimeStep) - return false; - else - return true; - } - - bool Group::isProductionGroup(size_t timeStep) const { - return bool( m_isProductionGroup.get(timeStep) ); - } - - bool Group::isInjectionGroup(size_t timeStep) const { - return bool( m_isInjectionGroup.get(timeStep) ); - } - - void Group::setProductionGroup(size_t timeStep, bool isProductionGroup_) { - m_isProductionGroup.update(timeStep, isProductionGroup_); - } - - void Group::setInjectionGroup(size_t timeStep, bool isInjectionGroup_) { - m_isInjectionGroup.update(timeStep, isInjectionGroup_); - } - - - /**********************************************************************/ - - - void Group::setInjectionPhase(size_t time_step , Phase::PhaseEnum phase){ - if (m_injection->phase->size() == time_step + 1) { - Phase::PhaseEnum currentPhase = m_injection->phase->get(time_step); - /* - The ECLIPSE documentation of the GCONINJE keyword seems - to indicate that a group can inject more than one phase - simultaneously. This should be implemented in the input - file as: - - GCONINJE - 'GROUP' 'PHASE1' 'RATE' ... / - 'GROUP' 'PHASE2' 'RATE' ... / - ... - / - - I.e. the same group occurs more than once at the same - time step, with different phases. This seems quite - weird, and we do currently not support it. Changing the - injected phase from one time step to the next is - supported. - */ - if (phase != currentPhase) - throw std::invalid_argument("Sorry - we currently do not support injecting multiple phases at the same time."); - } - m_injection->phase->update( time_step , phase ); - } - - Phase::PhaseEnum Group::getInjectionPhase( size_t time_step ) const { - return m_injection->phase->get( time_step ); - } - - void Group::setInjectionRate( size_t time_step , double rate) { - m_injection->rate->update( time_step , rate); - } - - double Group::getInjectionRate( size_t time_step ) const { - return m_injection->rate->get( time_step ); - } - - void Group::setInjectionControlMode(size_t time_step , GroupInjection::ControlEnum controlMode) { - m_injection->controlMode->update( time_step , controlMode ); - } - - GroupInjection::ControlEnum Group::getInjectionControlMode( size_t time_step) const { - return m_injection->controlMode->get( time_step ); - } - - void Group::setSurfaceMaxRate( size_t time_step , double rate) { - m_injection->surfaceFlowMaxRate->update( time_step , rate); - } - - double Group::getSurfaceMaxRate( size_t time_step ) const { - return m_injection->surfaceFlowMaxRate->get( time_step ); - } - - void Group::setReservoirMaxRate( size_t time_step , double rate) { - m_injection->reservoirFlowMaxRate->update( time_step , rate); - } - - double Group::getReservoirMaxRate( size_t time_step ) const { - return m_injection->reservoirFlowMaxRate->get( time_step ); - } - - void Group::setTargetReinjectFraction( size_t time_step , double rate) { - m_injection->targetReinjectFraction->update( time_step , rate); - } - - double Group::getTargetReinjectFraction( size_t time_step ) const { - return m_injection->targetReinjectFraction->get( time_step ); - } - - void Group::setTargetVoidReplacementFraction( size_t time_step , double rate) { - m_injection->targetVoidReplacementFraction->update( time_step , rate); - } - - double Group::getTargetVoidReplacementFraction( size_t time_step ) const { - return m_injection->targetVoidReplacementFraction->get( time_step ); - } - - - /*****************************************************************/ - - void Group::setProductionControlMode( size_t time_step , GroupProduction::ControlEnum controlMode) { - m_production->controlMode->update(time_step , controlMode ); - } - - GroupProduction::ControlEnum Group::getProductionControlMode( size_t time_step ) const { - return m_production->controlMode->get(time_step); - } - - - GroupProductionExceedLimit::ActionEnum Group::getProductionExceedLimitAction( size_t time_step ) const { - return m_production->exceedAction->get(time_step); - } - - - void Group::setProductionExceedLimitAction( size_t time_step , GroupProductionExceedLimit::ActionEnum action) { - m_production->exceedAction->update(time_step , action); - } - - - void Group::setOilTargetRate(size_t time_step , double oilTargetRate) { - m_production->oilTarget->update(time_step , oilTargetRate); - } - - - double Group::getOilTargetRate(size_t time_step) const { - return m_production->oilTarget->get(time_step); - } - - - void Group::setGasTargetRate(size_t time_step , double gasTargetRate) { - m_production->gasTarget->update(time_step , gasTargetRate); - } - - - double Group::getGasTargetRate(size_t time_step) const { - return m_production->gasTarget->get(time_step); - } - - - void Group::setWaterTargetRate(size_t time_step , double waterTargetRate) { - m_production->waterTarget->update(time_step , waterTargetRate); - } - - - double Group::getWaterTargetRate(size_t time_step) const { - return m_production->waterTarget->get(time_step); - } - - - void Group::setLiquidTargetRate(size_t time_step , double liquidTargetRate) { - m_production->liquidTarget->update(time_step , liquidTargetRate); - } - - - double Group::getLiquidTargetRate(size_t time_step) const { - return m_production->liquidTarget->get(time_step); - } - - - void Group::setReservoirVolumeTargetRate(size_t time_step , double reservoirVolumeTargetRate) { - m_production->reservoirVolumeTarget->update(time_step , reservoirVolumeTargetRate); - } - - - double Group::getReservoirVolumeTargetRate(size_t time_step) const { - return m_production->reservoirVolumeTarget->get(time_step); - } - - - void Group::setGroupEfficiencyFactor(size_t time_step, double factor) { - m_production->efficiencyFactor->update(time_step , factor); - } - - double Group::getGroupEfficiencyFactor(size_t time_step) const { - return m_production->efficiencyFactor->get(time_step); - } - - void Group::setTransferGroupEfficiencyFactor(size_t time_step, bool transfer) { - m_production->transferEfficiencyFactor->update(time_step , transfer); - } - - - bool Group::getTransferGroupEfficiencyFactor(size_t time_step) const { - return m_production->transferEfficiencyFactor->get(time_step); - } - - /*****************************************************************/ - - std::shared_ptr< const WellSet > Group::wellMap(size_t time_step) const { - return m_wells->get(time_step); - } - - - bool Group::hasWell(const std::string& wellName , size_t time_step) const { - return this->wellMap(time_step)->hasWell( wellName ); - } - - - const Well* Group::getWell(const std::string& wellName , size_t time_step) const { - return this->wellMap( time_step )->getWell( wellName ); - } - - const WellSet& Group::getWells( size_t time_step ) const { - return *this->wellMap( time_step ); - } - - size_t Group::numWells(size_t time_step) const { - return wellMap(time_step)->size(); - } - - void Group::addWell(size_t time_step, Well* well ) { - auto wellSet = wellMap(time_step); - std::shared_ptr< WellSet > newWellSet( wellSet->shallowCopy() ); - - newWellSet->addWell(well); - m_wells->update(time_step , newWellSet); - } - - - void Group::delWell(size_t time_step, const std::string& wellName) { - auto wellSet = wellMap(time_step); - std::shared_ptr< WellSet > newWellSet( wellSet->shallowCopy() ); - - newWellSet->delWell(wellName); - m_wells->update(time_step , newWellSet); - } - -} - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Group.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Group.hpp deleted file mode 100644 index e34785a606..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Group.hpp +++ /dev/null @@ -1,126 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - - -#ifndef GROUP_HPP_ -#define GROUP_HPP_ - -#include -#include - -#include -#include - -namespace Opm { - - - class TimeMap; - class Well; - class WellSet; - - namespace GroupInjection { - struct InjectionData; - } - - - namespace GroupProduction { - struct ProductionData; - } - - class Group { - public: - Group(const std::string& name, std::shared_ptr< const TimeMap > timeMap , size_t creationTimeStep); - bool hasBeenDefined(size_t timeStep) const; - const std::string& name() const; - bool isProductionGroup(size_t timeStep) const; - bool isInjectionGroup(size_t timeStep) const; - void setProductionGroup(size_t timeStep, bool isProductionGroup); - void setInjectionGroup(size_t timeStep, bool isInjectionGroup_); - - /******************************************************************/ - void setInjectionPhase(size_t time_step , Phase::PhaseEnum phase); - Phase::PhaseEnum getInjectionPhase(size_t time_step) const; - - void setInjectionControlMode(size_t time_step , GroupInjection::ControlEnum ControlMode); - GroupInjection::ControlEnum getInjectionControlMode( size_t time_step) const; - - void setInjectionRate(size_t time_step , double rate); - double getInjectionRate( size_t time_step) const; - - void setSurfaceMaxRate( size_t time_step , double rate); - double getSurfaceMaxRate( size_t time_step ) const; - - void setReservoirMaxRate( size_t time_step , double rate); - double getReservoirMaxRate( size_t time_step ) const; - - void setTargetReinjectFraction( size_t time_step , double rate); - double getTargetReinjectFraction( size_t time_step ) const; - - void setTargetVoidReplacementFraction( size_t time_step , double rate); - double getTargetVoidReplacementFraction( size_t time_step ) const; - - /******************************************************************/ - - void setProductionControlMode( size_t time_step , GroupProduction::ControlEnum controlMode); - GroupProduction::ControlEnum getProductionControlMode( size_t time_step ) const; - - GroupProductionExceedLimit::ActionEnum getProductionExceedLimitAction(size_t time_step) const; - void setProductionExceedLimitAction(size_t time_step , GroupProductionExceedLimit::ActionEnum action); - - void setOilTargetRate(size_t time_step , double oilTargetRate); - double getOilTargetRate(size_t time_step) const; - void setGasTargetRate(size_t time_step , double gasTargetRate); - double getGasTargetRate(size_t time_step) const; - void setWaterTargetRate(size_t time_step , double waterTargetRate); - double getWaterTargetRate(size_t time_step) const; - void setLiquidTargetRate(size_t time_step , double liquidTargetRate); - double getLiquidTargetRate(size_t time_step) const; - void setReservoirVolumeTargetRate(size_t time_step , double reservoirVolumeTargetRate); - double getReservoirVolumeTargetRate(size_t time_step) const; - void setGroupEfficiencyFactor(size_t time_step, double factor); - double getGroupEfficiencyFactor(size_t time_step) const; - void setTransferGroupEfficiencyFactor(size_t time_step, bool transfer); - bool getTransferGroupEfficiencyFactor(size_t time_step) const; - - /*****************************************************************/ - - bool hasWell(const std::string& wellName , size_t time_step) const; - const Well* getWell(const std::string& wellName , size_t time_step) const; - const WellSet& getWells( size_t time_step ) const; - size_t numWells(size_t time_step) const; - void addWell(size_t time_step , Well* well); - void delWell(size_t time_step, const std::string& wellName ); - private: - std::shared_ptr< const WellSet > wellMap(size_t time_step) const; - - size_t m_creationTimeStep; - std::string m_name; - std::shared_ptr m_injection; - std::shared_ptr m_production; - std::shared_ptr> > m_wells; - DynamicState m_isProductionGroup; - DynamicState m_isInjectionGroup; - }; - typedef std::shared_ptr GroupPtr; - typedef std::shared_ptr GroupConstPtr; -} - - - -#endif /* WELL_HPP_ */ diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/GroupTree.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/GroupTree.cpp deleted file mode 100644 index 116d517bd6..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/GroupTree.cpp +++ /dev/null @@ -1,158 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include - - -#include - - -namespace Opm { - - GroupTree::GroupTree() { - m_root = GroupTreeNode::createFieldNode(); - } - - GroupTree::GroupTree( const GroupTree& x ) : - m_root( GroupTreeNode::createFieldNode() ) { - deepCopy( x.m_root, this->m_root ); - } - - void GroupTree::updateTree(const std::string& childName) { - updateTree(childName, m_root->name()); - } - - void GroupTree::updateTree(const std::string& childName, const std::string& parentName) { - if (childName == m_root->name()) { - throw std::domain_error("Error, trying to add node with the same name as the root, offending name: " + childName); - } - - GroupTreeNodePtr newParentNode = getNode(parentName); - if (!newParentNode) { - newParentNode = m_root->addChildGroup(parentName); - } - - GroupTreeNodePtr childNodeInTree = getNode(childName); - if (childNodeInTree) { - GroupTreeNodePtr currentParent = getParent(childName); - currentParent->removeChild(childNodeInTree); - newParentNode->addChildGroup(childNodeInTree); - } else { - newParentNode->addChildGroup(childName); - } - } - - GroupTreeNodePtr GroupTree::getNode(const std::string& nodeName) const { - GroupTreeNodePtr current = m_root; - return getNode(nodeName, current); - } - - GroupTreeNodePtr GroupTree::getNode(const std::string& nodeName, GroupTreeNodePtr current) const { - if (current->name() == nodeName) { - return current; - } else { - std::map::const_iterator iter = current->begin(); - while (iter != current->end()) { - GroupTreeNodePtr result = getNode(nodeName, (*iter).second); - if (result) { - return result; - } - ++iter; - } - return GroupTreeNodePtr(); - } - } - - std::vector GroupTree::getNodes() const { - std::vector nodes; - nodes.push_back(m_root); - getNodes(m_root, nodes); - return nodes; - } - - void GroupTree::getNodes(GroupTreeNodePtr fromNode, std::vector& nodes) const { - std::map::const_iterator iter = fromNode->begin(); - while (iter != fromNode->end()) { - GroupTreeNodePtr child = (*iter).second; - nodes.push_back(child); - getNodes(child, nodes); - ++iter; - } - } - - GroupTreeNodePtr GroupTree::getParent(const std::string& childName) const { - GroupTreeNodePtr currentChild = m_root; - return getParent(childName, currentChild, GroupTreeNodePtr()); - } - - GroupTreeNodePtr GroupTree::getParent(const std::string& childName, GroupTreeNodePtr currentChild, GroupTreeNodePtr parent) const { - if (currentChild->name() == childName) { - return parent; - } else { - std::map::const_iterator iter = currentChild->begin(); - while (iter != currentChild->end()) { - GroupTreeNodePtr result = getParent(childName, (*iter).second, currentChild); - if (result) { - return result; - } - ++iter; - } - return GroupTreeNodePtr(); - } - } - - GroupTreePtr GroupTree::deepCopy() const { - GroupTreePtr newTree(new GroupTree()); - GroupTreeNodePtr currentOriginNode = m_root; - GroupTreeNodePtr currentNewNode = newTree->getNode("FIELD"); - - deepCopy(currentOriginNode, currentNewNode); - return newTree; - - } - - void GroupTree::deepCopy(GroupTreeNodePtr origin, GroupTreeNodePtr copy) const { - std::map::const_iterator iter = origin->begin(); - while (iter != origin->end()) { - GroupTreeNodePtr originChild = (*iter).second; - GroupTreeNodePtr copyChild = copy->addChildGroup(originChild->name()); - deepCopy(originChild, copyChild); - ++iter; - } - } - - void GroupTree::printTree(std::ostream &os) const { - printTree(os , m_root); - os << std::endl; - os << "End of tree" << std::endl; - } - - void GroupTree::printTree(std::ostream &os , GroupTreeNodePtr fromNode) const { - os << fromNode->name() << "(" << fromNode.get() << ")"; - std::map::const_iterator iter = fromNode->begin(); - while (iter != fromNode->end()) { - GroupTreeNodePtr child = (*iter).second; - os << "<-" << child->name() << "(" << child.get() << ")" << std::endl; - printTree(os , child); - ++iter; - } - } - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/GroupTree.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/GroupTree.hpp deleted file mode 100644 index bcb16139b8..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/GroupTree.hpp +++ /dev/null @@ -1,70 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef GROUPTREE_HPP -#define GROUPTREE_HPP - -#include - -#include -#include -#include -#include - -namespace Opm { - - class GroupTree { - public: - GroupTree(); - GroupTree( const GroupTree& ); - void updateTree(const std::string& childName); - void updateTree(const std::string& childName, const std::string& parentName); - - GroupTreeNodePtr getNode(const std::string& nodeName) const; - std::vector getNodes() const; - GroupTreeNodePtr getParent(const std::string& childName) const; - - std::shared_ptr deepCopy() const; - void printTree(std::ostream &os) const; - - bool operator==( const GroupTree& rhs ) { - return this->m_root == rhs.m_root; - } - - bool operator!=( const GroupTree& rhs ) { - return !(*this == rhs ); - } - - - private: - GroupTreeNodePtr m_root; - GroupTreeNodePtr getNode(const std::string& nodeName, GroupTreeNodePtr current) const; - GroupTreeNodePtr getParent(const std::string& childName, GroupTreeNodePtr currentChild, GroupTreeNodePtr parent) const; - - void getNodes(GroupTreeNodePtr fromNode, std::vector& nodes) const; - void deepCopy(GroupTreeNodePtr origin, GroupTreeNodePtr copy) const; - void printTree(std::ostream &os , GroupTreeNodePtr fromNode) const; - }; - - typedef std::shared_ptr GroupTreePtr; - typedef std::shared_ptr GroupTreeConstPtr; -} - -#endif /* GROUPTREE_HPP */ - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/GroupTreeNode.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/GroupTreeNode.cpp deleted file mode 100644 index 7a2c31124e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/GroupTreeNode.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include - -namespace Opm { - - GroupTreeNode::GroupTreeNode(const std::string& name_) { - m_name = name_; - } - - const std::string& GroupTreeNode::name() const { - return m_name; - } - - GroupTreeNodePtr GroupTreeNode::addChildGroup(const std::string& childName) { - if (hasChildGroup(childName)) { - throw std::invalid_argument("Child group with name \"" + childName + "\"already exists."); - } - GroupTreeNodePtr child(new GroupTreeNode(childName)); - m_childGroups[childName] = child; - return child; - } - - void GroupTreeNode::addChildGroup(std::shared_ptr childGroup) { - if (hasChildGroup(childGroup->name())) { - throw std::invalid_argument("Child group with name \"" + childGroup->name() + "\"already exists under node " + m_name); - } - m_childGroups[childGroup->name()] = childGroup; - } - - - void GroupTreeNode::removeChild(GroupTreeNodePtr child) { - if (!hasChildGroup(child->name())) { - throw std::invalid_argument("The node " + m_name + " does not have a child named " + child->name()); - } - m_childGroups.erase(child->name()); - } - - bool GroupTreeNode::hasChildGroup(const std::string& childName) const { - return m_childGroups.find(childName) != m_childGroups.end(); - } - - GroupTreeNodePtr GroupTreeNode::getChildGroup(const std::string& childName) { - if (hasChildGroup(childName)) { - return m_childGroups[childName]; - } - throw std::invalid_argument("Child group with name \"" + childName + "\" does not exist."); - } - - GroupTreeNodePtr GroupTreeNode::createFieldNode() { - return GroupTreeNodePtr(new GroupTreeNode("FIELD")); - } - - std::map >::const_iterator GroupTreeNode::begin() const { - return m_childGroups.begin(); - } - - std::map >::const_iterator GroupTreeNode::end() const { - return m_childGroups.end(); - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/GroupTreeNode.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/GroupTreeNode.hpp deleted file mode 100644 index 7b64f19193..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/GroupTreeNode.hpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef GROUPTREENODE_HPP -#define GROUPTREENODE_HPP - -#include -#include -#include - -namespace Opm { - - /// This Class is currently ONLY keeping track of the actual group nodes, - /// and knows nothing about the wells. The wells will know which group - /// (leaf) node they belong to. - class GroupTreeNode { - public: - const std::string& name() const; - std::shared_ptr addChildGroup(const std::string& childName); - void addChildGroup(std::shared_ptr childGroup); - - bool hasChildGroup(const std::string& childName) const; - void removeChild(std::shared_ptr child); - std::shared_ptr getChildGroup(const std::string& childName); - - static std::shared_ptr createFieldNode(); - std::map >::const_iterator begin() const; - std::map >::const_iterator end() const; - - - private: - GroupTreeNode(const std::string& name); - std::string m_name; - std::map > m_childGroups; - }; - - typedef std::shared_ptr GroupTreeNodePtr; - typedef std::shared_ptr GroupTreeNodeConstPtr; -} - -#endif /* GROUPTREENODE_HPP */ - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/MSW/Compsegs.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/MSW/Compsegs.cpp deleted file mode 100644 index 56c9a37fb6..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/MSW/Compsegs.cpp +++ /dev/null @@ -1,197 +0,0 @@ -/* - Copyright 2015 SINTEF ICT, Applied Mathematics. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace Opm { - - - Compsegs::Compsegs(int i_in, int j_in, int k_in, int branch_number_in, double distance_start_in, double distance_end_in, - WellCompletion::DirectionEnum dir_in, double center_depth_in, int segment_number_in) - : m_i(i_in), - m_j(j_in), - m_k(k_in), - m_branch_number(branch_number_in), - m_distance_start(distance_start_in), - m_distance_end(distance_end_in), - m_dir(dir_in), - m_center_depth(center_depth_in), - m_segment_number(segment_number_in) - { - } - - std::vector Compsegs::compsegsFromCOMPSEGSKeyword( const DeckKeyword& compsegsKeyword ) { - - // only handle the second record here - // The first record here only contains the well name - std::vector compsegs; - - for (size_t recordIndex = 1; recordIndex < compsegsKeyword.size(); ++recordIndex) { - const auto& record = compsegsKeyword.getRecord(recordIndex); - // following the coordinate rule for completions - const int I = record.getItem().get< int >(0) - 1; - const int J = record.getItem().get< int >(0) - 1; - const int K = record.getItem().get< int >(0) - 1; - const int branch = record.getItem().get< int >(0); - - double distance_start; - double distance_end; - if (record.getItem().hasValue(0)) { - distance_start = record.getItem().getSIDouble(0); - } else if (recordIndex == 1) { - distance_start = 0.; - } else { - // TODO: the end of the previous connection or range - // 'previous' should be in term of the input order - // since basically no specific order for the completions - throw std::runtime_error("this way to obtain DISTANCE_START not implemented yet!"); - } - if (record.getItem().hasValue(0)) { - distance_end = record.getItem().getSIDouble(0); - } else { - // TODO: the distance_start plus the thickness of the grid block - throw std::runtime_error("this way to obtain DISTANCE_END not implemented yet!"); - } - - if( !record.getItem< ParserKeywords::COMPSEGS::DIRECTION >().hasValue( 0 ) && - !record.getItem< ParserKeywords::COMPSEGS::DISTANCE_END >().hasValue( 0 ) ) { - throw std::runtime_error("the direction has to be specified when DISTANCE_END in the record is not specified"); - } - - if( record.getItem< ParserKeywords::COMPSEGS::END_IJK >().hasValue( 0 ) && - !record.getItem< ParserKeywords::COMPSEGS::DIRECTION >().hasValue( 0 ) ) { - throw std::runtime_error("the direction has to be specified when END_IJK in the record is specified"); - } - - /* - * Defaulted well completion. Must be non-defaulted if DISTANCE_END - * is set or a range is specified. If not this is effectively ignored. - */ - WellCompletion::DirectionEnum direction = WellCompletion::X; - if( record.getItem< ParserKeywords::COMPSEGS::DIRECTION >().hasValue( 0 ) ) { - direction = WellCompletion::DirectionEnumFromString(record.getItem().get< std::string >(0)); - } - - double center_depth; - if (!record.getItem().defaultApplied(0)) { - center_depth = record.getItem().getSIDouble(0); - } else { - // 0.0 is also the defaulted value - // which is used to indicate to obtain the final value through related segment - center_depth = 0.; - } - - if (center_depth < 0.) { - //TODO: get the depth from COMPDAT data. - throw std::runtime_error("this way to obtain CENTER_DISTANCE not implemented yet either!"); - } - - int segment_number; - if (record.getItem().hasValue(0)) { - segment_number = record.getItem().get< int >(0); - } else { - segment_number = 0; - // will decide the segment number based on the distance in a process later. - } - - if (!record.getItem().hasValue(0)) { // only one compsegs - CompsegsPtr new_compsegs = std::make_shared(I, J, K, branch, distance_start, distance_end, - direction, center_depth, segment_number); - compsegs.push_back(new_compsegs); - } else { // a range is defined. genrate a range of Compsegs - throw std::runtime_error("entering COMPSEGS entries with a range is not supported yet!"); - } - } - - return compsegs; - } - - void Compsegs::processCOMPSEGS(std::vector& compsegs, SegmentSetConstPtr segment_set) { - // for the current cases we have at the moment, the distance information is specified explicitly, - // while the depth information is defaulted though, which need to be obtained from the related segment - for (size_t i_comp = 0; i_comp < compsegs.size(); ++i_comp) { - if (compsegs[i_comp]->m_segment_number == 0) { // need to determine the related segment number first - const double center_distance = (compsegs[i_comp]->m_distance_start + compsegs[i_comp]->m_distance_end) / 2.0; - const int branch_number = compsegs[i_comp]->m_branch_number; - - int segment_number = 0; - double min_distance_difference = 1.e100; // begin with a big value - for (int i_segment = 0; i_segment < segment_set->numberSegment(); ++i_segment) { - SegmentConstPtr current_segment = (*segment_set)[i_segment]; - if (branch_number == current_segment->branchNumber()) { - const double distance = current_segment->totalLength(); - const double distance_difference = std::abs(center_distance - distance); - if (distance_difference < min_distance_difference) { - min_distance_difference = distance_difference; - segment_number = current_segment->segmentNumber(); - } - } - } - - if (segment_number != 0) { - compsegs[i_comp]->m_segment_number = segment_number; - if (compsegs[i_comp]->m_center_depth == 0.) { - // using the depth of the segment node as the depth of the completion - // TODO: now only one completion for one segment is hanlded, - // TODO: later we will try to handle more than one completion for each segment, - // TODO: which will be a linear interpolation based on the segment node depth - // TODO: in the same branch, while the actually way is not clear yet - const int segment_location = segment_set->numberToLocation(segment_number); - compsegs[i_comp]->m_center_depth = (*segment_set)[segment_location]->depth(); - } else if (compsegs[i_comp]->m_center_depth < 0.) { - throw std::runtime_error(" obtaining perforation depth from COMPDAT data is not supported yet \n"); - } - } else { - throw std::runtime_error(" the perforation failed in finding a related segment \n"); - } - } - } - } - - - void Compsegs::updateCompletionsWithSegment(const std::vector& compsegs, - CompletionSetPtr completion_set) { - - for (size_t i_comp = 0; i_comp < compsegs.size(); ++i_comp) { - const int i = compsegs[i_comp]->m_i; - const int j = compsegs[i_comp]->m_j; - const int k = compsegs[i_comp]->m_k; - - CompletionPtr new_completion = std::make_shared(completion_set->getFromIJK(i, j, k)); - new_completion->attachSegment(compsegs[i_comp]->m_segment_number, compsegs[i_comp]->m_center_depth); - completion_set->add(new_completion); - } - - for (size_t ic = 0; ic < completion_set->size(); ++ic) { - if ( !(completion_set->get(ic)->attachedToSegment()) ) { - throw std::runtime_error(" not all the completions are attached with a segment,\n the information from COMPSEGS are not complete"); - } - } - } - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/MSW/Compsegs.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/MSW/Compsegs.hpp deleted file mode 100644 index 0ca8a0158d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/MSW/Compsegs.hpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - Copyright 2015 SINTEF ICT, Applied Mathematics. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - - -#ifndef COMPSEGS_HPP_ -#define COMPSEGS_HPP_ - -#include -#include - -#include - -namespace Opm { - - class CompletionSet; - class DeckKeyword; - class SegmentSet; - - struct Compsegs { - int m_i; - int m_j; - int m_k; - // the branch number on the main stem is always 1. - // lateral branches should be numbered bigger than 1. - // a suboridnate branch must have a higher branch number than parent branch. - int m_branch_number; - double m_distance_start; - double m_distance_end; - - WellCompletion::DirectionEnum m_dir; - double m_center_depth; - // we do not handle thermal length for the moment - // double m_thermal_length; - int m_segment_number; - - Compsegs(int i_in, int j_in, int k_in, int branch_number_in, double distance_start_in, double distance_end_in, - WellCompletion::DirectionEnum dir_in, double center_depth_in, int segment_number_in); - - static std::vector> compsegsFromCOMPSEGSKeyword( const DeckKeyword& compsegsKeyword ); - - // get the segment number information and depth information based on the information from SegmentSet - static void processCOMPSEGS(std::vector>& compsegs, std::shared_ptr< const SegmentSet > segment_set); - - // update the segment related information for Completions - static void updateCompletionsWithSegment(const std::vector>& compsegs, - std::shared_ptr< CompletionSet > completion_set); - - }; - - typedef std::shared_ptr CompsegsPtr; - typedef std::shared_ptr CompsegsConstPtr; -} - - - -#endif /* COMPSEGS_HPP_ */ diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/MSW/Segment.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/MSW/Segment.cpp deleted file mode 100644 index d62915f1c7..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/MSW/Segment.cpp +++ /dev/null @@ -1,131 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ -#include - - -namespace Opm { - - Segment::Segment() - : m_segment_number(-1), - m_branch(-1), - m_outlet_segment(-1), - m_total_length(invalid_value), - m_depth(invalid_value), - m_internal_diameter(invalid_value), - m_roughness(invalid_value), - m_cross_area(invalid_value), - m_volume(invalid_value), - m_data_ready(false) - { - } - - - Segment::Segment(int segment_number_in, int branch_in, int outlet_segment_in, double length_in, double depth_in, - double internal_diameter_in, double roughness_in, double cross_area_in, - double volume_in, bool data_ready_in) - : m_segment_number(segment_number_in), - m_branch(branch_in), - m_outlet_segment(outlet_segment_in), - m_total_length(length_in), - m_depth(depth_in), - m_internal_diameter(internal_diameter_in), - m_roughness(roughness_in), - m_cross_area(cross_area_in), - m_volume(volume_in), - m_data_ready(data_ready_in) - { - } - - Segment::Segment(std::shared_ptr segment_in) - : m_segment_number(segment_in->segmentNumber()), - m_branch(segment_in->branchNumber()), - m_outlet_segment(segment_in->outletSegment()), - m_total_length(segment_in->totalLength()), - m_depth(segment_in->depth()), - m_internal_diameter(segment_in->internalDiameter()), - m_roughness(segment_in->roughness()), - m_cross_area(segment_in->crossArea()), - m_volume(segment_in->volume()), - m_data_ready(segment_in->dataReady()) - { - } - - - int Segment::segmentNumber() const { - return m_segment_number; - } - - - int Segment::branchNumber() const { - return m_branch; - } - - - int Segment::outletSegment() const { - return m_outlet_segment; - } - - - double Segment::totalLength() const { - return m_total_length; - } - - - double Segment::depth() const { - return m_depth; - } - - - double Segment::internalDiameter() const { - return m_internal_diameter; - } - - - double Segment::roughness() const { - return m_roughness; - } - - - double Segment::crossArea() const { - return m_cross_area; - } - - double Segment::volume() const { - return m_volume; - } - - bool Segment::dataReady() const { - return m_data_ready; - } - - void Segment::setDepthAndLength(const double depth_in, const double length_in) { - m_total_length = length_in; - m_depth = depth_in; - m_data_ready = true; - } - - void Segment::setVolume(const double volume_in) { - m_volume = volume_in; - } - - double Segment::invalidValue() { - return invalid_value; - } - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/MSW/Segment.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/MSW/Segment.hpp deleted file mode 100644 index 16c3d6f820..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/MSW/Segment.hpp +++ /dev/null @@ -1,109 +0,0 @@ -/* - Copyright 2015 SINTEF ICT, Applied Mathematics. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef SEGMENT_HPP_HEADER_INCLUDED -#define SEGMENT_HPP_HEADER_INCLUDED - -#include - -namespace Opm { - - class Segment { - public: - Segment(); - - Segment(int segment_number_in, int branch_in, int outlet_segment_in, double length_in, double depth_in, - double internal_diameter_in, double roughness_in, double cross_area_in, double volume_in, bool data_ready_in); - Segment(std::shared_ptr segment_in); - - int segmentNumber() const; - int branchNumber() const; - int outletSegment() const; - double totalLength() const; - double depth() const; - double internalDiameter() const; - double roughness() const; - double crossArea() const; - double volume() const; - bool dataReady() const; - - void setVolume(const double volume_in); - void setDepthAndLength(const double depth_in, const double length_in); - - static double invalidValue(); - - - private: - // segment number - // it should work as a ID. - int m_segment_number; - // branch number - // for top segment, it should always be 1 - int m_branch; - // the outlet junction segment - // for top segment, it should be -1 - int m_outlet_segment; - // length of the segment node to the bhp reference point. - // when reading in from deck, with 'INC', - // it will be incremental length before processing. - // After processing and in the class Well, it always stores the 'ABS' value. - // which means the total_length - double m_total_length; - // depth of the nodes to the bhp reference point - // when reading in from deck, with 'INC', - // it will be the incremental depth before processing. - // in the class Well, it always stores the 'ABS' value. - // TODO: to check if it is good to use 'ABS' always. - double m_depth; - // tubing internal diameter - // or the equivalent diameter for annular cross-sections - // for top segment, it is UNDEFINED - // we use invalid_value for the top segment - double m_internal_diameter; - // effective roughness of the tubing - // used to calculate the Fanning friction factor - // for top segment, it is UNDEFINED - // we use invalid_value for the top segment - double m_roughness; - // cross-sectional area for fluid flow - // not defined for the top segment, - // we use invalid_value for the top segment. - double m_cross_area; - // valume of the segment; - // it is defined for top segment. - // TODO: to check if the definition is the same with other segments. - double m_volume; - // indicate if the data related to 'INC' or 'ABS' is ready - // the volume will be updated at a final step. - bool m_data_ready; - - static constexpr double invalid_value = -1.e100; - // We are not handling the length of segment projected onto the X-axis and Y-axis. - // They are not used in the simulations and we are not supporting the plotting. - // There are other three properties for segment related to thermal conduction, - // while they are not supported by the keyword at the moment. - - }; - - typedef std::shared_ptr SegmentPtr; - typedef std::shared_ptr SegmentConstPtr; - -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/MSW/SegmentSet.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/MSW/SegmentSet.cpp deleted file mode 100644 index 94cd924f01..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/MSW/SegmentSet.cpp +++ /dev/null @@ -1,398 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ -#include -#include -#include -#include - -#ifdef _WIN32 -#define _USE_MATH_DEFINES -#include -#endif - -#include -#include -#include -#include -#include - - -namespace Opm { - - SegmentSet::SegmentSet() { - } - - std::string SegmentSet::wellName() const { - return m_well_name; - } - - int SegmentSet::numberBranch() const { - return m_number_branch; - } - - int SegmentSet::numberSegment() const { - return m_segments.size(); - } - - double SegmentSet::depthTopSegment() const { - return m_depth_top; - } - - double SegmentSet::lengthTopSegment() const { - return m_length_top; - } - - double SegmentSet::volumeTopSegment() const { - return m_volume_top; - } - - WellSegment::LengthDepthEnum SegmentSet::lengthDepthType() const { - return m_length_depth_type; - } - - WellSegment::CompPressureDropEnum SegmentSet::compPressureDrop() const { - return m_comp_pressure_drop; - } - - WellSegment::MultiPhaseModelEnum SegmentSet::multiPhaseModel() const { - return m_multiphase_model; - } - - SegmentConstPtr SegmentSet::operator[](size_t idx) const { - return m_segments[idx]; - } - - int SegmentSet::numberToLocation(const int segment_number) const { - auto it = m_number_to_location.find(segment_number); - if (it != m_number_to_location.end()) { - return it->second; - } else { - return -1; - } - } - - void SegmentSet::addSegment(SegmentConstPtr new_segment) { - // decide whether to push_back or insert - int segment_number = new_segment->segmentNumber(); - - const int segment_location = numberToLocation(segment_number); - - if (segment_location < 0) { // it is a new segment - m_number_to_location[segment_number] = numberSegment(); - m_segments.push_back(new_segment); - } else { // the segment already exists - m_segments[segment_location] = new_segment; - } - } - - SegmentSet* SegmentSet::shallowCopy() const { - SegmentSet* copy = new SegmentSet(); - copy->m_well_name = m_well_name; - copy->m_number_branch = m_number_branch; - copy->m_depth_top = m_depth_top; - copy->m_length_top = m_length_top; - copy->m_volume_top = m_volume_top; - copy->m_length_depth_type = m_length_depth_type; - copy->m_comp_pressure_drop = m_comp_pressure_drop; - copy->m_multiphase_model = m_multiphase_model; - copy->m_number_to_location = m_number_to_location; - copy->m_segments.resize(m_segments.size()); - for (int i = 0; i < int(m_segments.size()); ++i) { - copy->m_segments[i] = m_segments[i]; - } - return copy; - } - - void SegmentSet::segmentsFromWELSEGSKeyword( const DeckKeyword& welsegsKeyword ) { - - // for the first record, which provides the information for the top segment - // and information for the whole segment set - const auto& record1 = welsegsKeyword.getRecord(0); - m_well_name = record1.getItem("WELL").getTrimmedString(0); - - m_segments.clear(); - - const double invalid_value = Segment::invalidValue(); // meaningless value to indicate unspecified values - - m_depth_top = record1.getItem("DEPTH").getSIDouble(0); - m_length_top = record1.getItem("LENGTH").getSIDouble(0); - m_length_depth_type = WellSegment::LengthDepthEnumFromString(record1.getItem("INFO_TYPE").getTrimmedString(0)); - m_volume_top = record1.getItem("WELLBORE_VOLUME").getSIDouble(0); - m_comp_pressure_drop = WellSegment::CompPressureDropEnumFromString(record1.getItem("PRESSURE_COMPONENTS").getTrimmedString(0)); - m_multiphase_model = WellSegment::MultiPhaseModelEnumFromString(record1.getItem("FLOW_MODEL").getTrimmedString(0)); - - // the main branch is 1 instead of 0 - // the segment number for top segment is also 1 - if (m_length_depth_type == WellSegment::INC) { - SegmentConstPtr top_segment(new Segment(1, 1, 0, 0., 0., invalid_value, invalid_value, invalid_value, - m_volume_top, false)); - m_segments.push_back(top_segment); - } else if (m_length_depth_type == WellSegment::ABS) { - SegmentConstPtr top_segment(new Segment(1, 1, 0, m_length_top, m_depth_top, invalid_value, invalid_value, - invalid_value, m_volume_top, true)); - m_segments.push_back(top_segment); - } - - // read all the information out from the DECK first then process to get all the required information - for (size_t recordIndex = 1; recordIndex < welsegsKeyword.size(); ++recordIndex) { - const auto& record = welsegsKeyword.getRecord(recordIndex); - const int segment1 = record.getItem("SEGMENT1").get< int >(0); - const int segment2 = record.getItem("SEGMENT2").get< int >(0); - if ((segment1 < 2) || (segment2 < segment1)) { - throw std::logic_error("illegal segment number input is found in WELSEGS!\n"); - } - - // how to handle the logical relations between lateral branches and parent branches. - // so far, the branch number has not been used. - const int branch = record.getItem("BRANCH").get< int >(0); - if ((branch < 1)) { - throw std::logic_error("illegal branch number input is found in WELSEGS!\n"); - } - const int outlet_segment_readin = record.getItem("JOIN_SEGMENT").get< int >(0); - double diameter = record.getItem("DIAMETER").getSIDouble(0); - const auto& itemArea = record.getItem("AREA"); - double area; - if (itemArea.hasValue(0)) { - area = itemArea.getSIDouble(0); - } else { - area = M_PI * diameter * diameter / 4.0; - } - - // if the values are incremental values, then we can just use the values - // if the values are absolute values, then we need to calculate them during the next process - // only the value for the last segment in the range is recorded - const double segment_length = record.getItem("SEGMENT_LENGTH").getSIDouble(0); - // the naming is a little confusing here. - // naming following the definition from the current keyword for the moment - const double depth_change = record.getItem("DEPTH_CHANGE").getSIDouble(0); - - const auto& itemVolume = record.getItem("VOLUME"); - double volume; - if (itemVolume.hasValue(0)) { - volume = itemVolume.getSIDouble(0); - } else if (m_length_depth_type == WellSegment::INC) { - volume = area * segment_length; - } else { - volume = invalid_value; // A * L, while L is not determined yet - } - - const double roughness = record.getItem("ROUGHNESS").getSIDouble(0); - - for (int i = segment1; i <= segment2; ++i) { - // for the first or the only segment in the range is the one specified in the WELSEGS - // from the second segment in the range, the outlet segment is the previous segment in the range - int outlet_segment = -1; - if (i == segment1) { - outlet_segment = outlet_segment_readin; - } else { - outlet_segment = i - 1; - } - - if (m_length_depth_type == WellSegment::INC) { - m_segments.push_back(std::make_shared(i, branch, outlet_segment, segment_length, depth_change, - diameter, roughness, area, volume, false)); - } else if (i == segment2) { - m_segments.push_back(std::make_shared(i, branch, outlet_segment, segment_length, depth_change, - diameter, roughness, area, volume, true)); - } else { - m_segments.push_back(std::make_shared(i, branch, outlet_segment, invalid_value, invalid_value, - diameter, roughness, area, volume, false)); - } - } - } - - for (size_t i_segment = 0; i_segment < m_segments.size(); ++i_segment){ - const int segment_number = m_segments[i_segment]->segmentNumber(); - const int location = numberToLocation(segment_number); - if (location >= 0) { // found in the existing m_segments already - throw std::logic_error("Segments with same segment number are found!\n"); - } - m_number_to_location[segment_number] = i_segment; - } - - } - - void SegmentSet::processABS() { - const double invalid_value = Segment::invalidValue(); // meaningless value to indicate unspecified/uncompleted values - - orderSegments(); - - int current_loc = 1; - while (current_loc < numberSegment()) { - if (m_segments[current_loc]->dataReady()) { - current_loc ++; - continue; - } - - const int range_begin = current_loc; - const int outlet_segment = m_segments[range_begin]->outletSegment(); - const int outlet_loc = numberToLocation(outlet_segment); - - assert(m_segments[outlet_loc]->dataReady() == true); - - int range_end = range_begin + 1; - for (; range_end < numberSegment(); ++range_end) { - if (m_segments[range_end]->dataReady() == true) { - break; - } - } - - if (range_end >= numberSegment()) { - throw std::logic_error(" One range records in WELSEGS is wrong. "); - } - - // set the length and depth values in the range. - int number_segments = range_end - range_begin + 1; - assert(number_segments > 1); //if only 1, the information should be complete - - const double length_outlet = m_segments[outlet_loc]->totalLength(); - const double depth_outlet = m_segments[outlet_loc]->depth(); - - const double length_last = m_segments[range_end]->totalLength(); - const double depth_last = m_segments[range_end]->depth(); - - // incremental length and depth for the segments within the range - const double length_inc = (length_last - length_outlet) / number_segments; - const double depth_inc = (depth_last - depth_outlet) / number_segments; - const double volume_segment = m_segments[range_end]->crossArea() * length_inc; - - for (int k = range_begin; k <= range_end; ++k) { - SegmentPtr new_segment = std::make_shared(m_segments[k]); - const double temp_length = length_outlet + (k - range_begin + 1) * length_inc; - const double temp_depth = depth_outlet + (k - range_end + 1) * depth_inc; - if (k != range_end) { - new_segment->setDepthAndLength(temp_depth, temp_length); - } - - if (new_segment->volume() < 0.5 * invalid_value) { - new_segment->setVolume(volume_segment); - } - addSegment(new_segment); - } - current_loc = range_end + 1; - } - - // then update the volume for all the segments except the top segment - // this is for the segments specified individually while the volume is not specified. - for (int i = 1; i < numberSegment(); ++i) { - assert(m_segments[i]->dataReady()); - if (m_segments[i]->volume() == invalid_value) { - SegmentPtr new_segment = std::make_shared(m_segments[i]); - const int outlet_segment = m_segments[i]->outletSegment(); - const int outlet_location = numberToLocation(outlet_segment); - const double segment_length = m_segments[i]->totalLength() - m_segments[outlet_location]->totalLength(); - const double segment_volume = m_segments[i]->crossArea() * segment_length; - new_segment->setVolume(segment_volume); - addSegment(new_segment); - } - } - } - - void SegmentSet::processINC(const bool first_time) { - - // update the information inside the SegmentSet to be in ABS way - if (first_time) { - SegmentPtr new_top_segment = std::make_shared((*this)[0]); - new_top_segment->setDepthAndLength(depthTopSegment(), lengthTopSegment()); - this->addSegment(new_top_segment); - } - - orderSegments(); - - // begin with the second segment - for (int i_loc = 1; i_loc < numberSegment(); ++i_loc) { - if (m_segments[i_loc]->dataReady() == false) { - // find its outlet segment - const int outlet_segment = m_segments[i_loc]->outletSegment(); - const int outlet_loc = numberToLocation(outlet_segment); - - // assert some information of the outlet_segment - assert(outlet_loc >= 0); - assert(m_segments[outlet_loc]->dataReady()); - - const double outlet_depth = m_segments[outlet_loc]->depth(); - const double outlet_length = m_segments[outlet_loc]->totalLength(); - const double temp_depth = outlet_depth + m_segments[i_loc]->depth(); - const double temp_length = outlet_length + m_segments[i_loc]->totalLength(); - - // applying the calculated length and depth to the current segment - SegmentPtr new_segment = std::make_shared(m_segments[i_loc]); - new_segment->setDepthAndLength(temp_depth, temp_length); - addSegment(new_segment); - } - } - } - - void SegmentSet::orderSegments() { - // re-ordering the segments to make later use easier. - // two principles - // 1. the location of the outlet segment will be stored in the lower location than the segment. - // 2. the segments belong to the same branch will be continuously stored. - - // top segment will always be the first one - // before this location, the reordering is done. - int current_loc = 1; - - // clear the mapping from segment number to store location - m_number_to_location.clear(); - // for the top segment - m_number_to_location[1] = 0; - - while (current_loc < numberSegment()) { - // the branch number of the last segment that is done re-ordering - const int last_branch_number = m_segments[current_loc-1]->branchNumber(); - // the one need to be swapped to the current_loc. - int target_segment_loc = -1; - - // looking for target_segment_loc - for (int i_loc = current_loc; i_loc < numberSegment(); ++i_loc) { - const int outlet_segment_number = m_segments[i_loc]->outletSegment(); - const int outlet_segment_location = numberToLocation(outlet_segment_number); - if (outlet_segment_location < 0) { // not found the outlet_segment in the done re-ordering segments - continue; - } - if (target_segment_loc < 0) { // first time found a candidate - target_segment_loc = i_loc; - } else { // there is already a candidate, chosing the one with the same branch number with last_branch_number - const int old_target_segment_loc_branch = m_segments[target_segment_loc]->branchNumber(); - const int new_target_segment_loc_branch = m_segments[i_loc]->branchNumber(); - if (new_target_segment_loc_branch == last_branch_number) { - if (old_target_segment_loc_branch != last_branch_number) { - target_segment_loc = i_loc; - } else { - throw std::logic_error("two segments in the same branch share the same outlet segment !!\n"); - } - } - } - } - - if (target_segment_loc < 0) { - throw std::logic_error("could not find candidate segment to swap in before the re-odering process get done !!\n"); - } - assert(target_segment_loc >= current_loc); - if (target_segment_loc > current_loc) { - std::swap(m_segments[current_loc], m_segments[target_segment_loc]); - } - const int segment_number = m_segments[current_loc]->segmentNumber(); - m_number_to_location[segment_number] = current_loc; - current_loc++; - } - } - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/MSW/SegmentSet.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/MSW/SegmentSet.hpp deleted file mode 100644 index 5eed1aeebf..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/MSW/SegmentSet.hpp +++ /dev/null @@ -1,96 +0,0 @@ -/* - Copyright 2015 SINTEF ICT, Applied Mathematics. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef SEGMENTSET_HPP_HEADER_INCLUDED -#define SEGMENTSET_HPP_HEADER_INCLUDED - -#include -#include - -#include -#include - -namespace Opm { - - class DeckKeyword; - - class SegmentSet { - public: - SegmentSet(); - - std::string wellName() const; - int numberBranch() const; - int numberSegment() const; - double depthTopSegment() const; - double lengthTopSegment() const; - double volumeTopSegment() const; - - WellSegment::LengthDepthEnum lengthDepthType() const; - WellSegment::CompPressureDropEnum compPressureDrop() const; - WellSegment::MultiPhaseModelEnum multiPhaseModel() const; - - int numberToLocation(const int segment_number) const; - void addSegment(std::shared_ptr< const Segment > new_segment); - - void segmentsFromWELSEGSKeyword( const DeckKeyword& welsegsKeyword); - - SegmentSet* shallowCopy() const; - - std::shared_ptr< const Segment > operator[](size_t idx) const; - void orderSegments(); - void processABS(); - void processINC(const bool first_time); - - private: - - // name of the well - std::string m_well_name; - // number of the branches - int m_number_branch; - // depth of the nodal point of the top segment - // it is taken as the BHP reference depth of the well - // BHP reference depth data from elsewhere will be ignored for multi-segmented wells - double m_depth_top; - // length down the tubing to the nodal point of the top segment - double m_length_top; - // effective wellbore volume of the top segment - double m_volume_top; - // type of the tubing length and depth information - WellSegment::LengthDepthEnum m_length_depth_type; - // components of the pressure drop to be included - WellSegment::CompPressureDropEnum m_comp_pressure_drop; - // multi-phase flow model - WellSegment::MultiPhaseModelEnum m_multiphase_model; - // There are X and Y cooridnate of the nodal point of the top segment - // Since they are not used for simulations and we are not supporting plotting, - // we are not handling them at the moment. - // There are other three properties for segment related to thermal conduction, - // while they are not supported by the keyword at the moment. - - std::vector> m_segments; - // the mapping from the segment number to the - // storage location in the vector - std::map m_number_to_location; - }; - - typedef std::shared_ptr SegmentSetPtr; - typedef std::shared_ptr SegmentSetConstPtr; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/OilVaporizationProperties.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/OilVaporizationProperties.cpp deleted file mode 100644 index 3ed27ad47c..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/OilVaporizationProperties.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ -#include - -namespace Opm { - - double OilVaporizationProperties::getMaxDRVDT() const{ - if (m_type == Opm::OilVaporizationEnum::DRVDT){ - return m_maxDRVDT; - }else{ - throw std::logic_error("Only valid if type is DRVDT"); - } - } - - double OilVaporizationProperties::getMaxDRSDT() const{ - if (m_type == Opm::OilVaporizationEnum::DRSDT){ - return m_maxDRSDT; - }else{ - throw std::logic_error("Only valid if type is DRSDT"); - } - } - - bool OilVaporizationProperties::getOption() const{ - if (m_type == Opm::OilVaporizationEnum::DRSDT){ - return m_maxDRSDT_allCells; - }else{ - throw std::logic_error("Only valid if type is DRSDT"); - } - } - - Opm::OilVaporizationEnum OilVaporizationProperties::getType() const{ - return m_type; - } - - double OilVaporizationProperties::getVap1() const{ - if (m_type == Opm::OilVaporizationEnum::VAPPARS){ - return m_vap1; - }else{ - throw std::logic_error("Only valid if type is VAPPARS"); - } - } - - double OilVaporizationProperties::getVap2() const{ - if (m_type == Opm::OilVaporizationEnum::VAPPARS){ - return m_vap2; - }else{ - throw std::logic_error("Only valid if type is VAPPARS"); - } - } - - OilVaporizationProperties OilVaporizationProperties::createDRSDT(double maximum, std::string option){ - OilVaporizationProperties ovp; - ovp.m_type = Opm::OilVaporizationEnum::DRSDT; - ovp.m_maxDRSDT = maximum; - if (option == "ALL"){ - ovp.m_maxDRSDT_allCells = true; - }else if (option == "FREE") { - ovp.m_maxDRSDT_allCells = false; - }else{ - throw std::invalid_argument("Only ALL or FREE is allowed as option string"); - } - return ovp; - } - - OilVaporizationProperties OilVaporizationProperties::createDRVDT(double maximum){ - OilVaporizationProperties ovp; - ovp.m_type = Opm::OilVaporizationEnum::DRVDT; - ovp.m_maxDRVDT = maximum; - return ovp; - } - - OilVaporizationProperties OilVaporizationProperties::createVAPPARS(double vap1, double vap2){ - OilVaporizationProperties ovp; - ovp.m_type = Opm::OilVaporizationEnum::VAPPARS; - ovp.m_vap1 = vap1; - ovp.m_vap2 = vap2; - return ovp; - } - - bool OilVaporizationProperties::operator==( const OilVaporizationProperties& rhs ) const { - if( this->m_type == OilVaporizationEnum::UNDEF - || rhs.m_type == OilVaporizationEnum::UNDEF - || this->m_type != rhs.m_type ) return false; - - switch( this->m_type ) { - case OilVaporizationEnum::DRSDT: - return this->m_maxDRSDT == rhs.m_maxDRSDT - && this->m_maxDRSDT_allCells == rhs.m_maxDRSDT_allCells; - - case OilVaporizationEnum::DRVDT: - return this->m_maxDRVDT == rhs.m_maxDRVDT; - - case OilVaporizationEnum::VAPPARS: - return this->m_vap1 == rhs.m_vap1 - && this->m_vap2 == rhs.m_vap2; - - default: - throw std::logic_error( "UNDEF Oil vaporization property; this should never happen" ); - } - } - - bool OilVaporizationProperties::operator!=( const OilVaporizationProperties& rhs ) const { - return this->m_type == OilVaporizationEnum::UNDEF - || rhs.m_type == OilVaporizationEnum::UNDEF - || this->m_type != rhs.m_type; - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/OilVaporizationProperties.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/OilVaporizationProperties.hpp deleted file mode 100644 index c843f824cb..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/OilVaporizationProperties.hpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ -#ifndef DRSDT_HPP -#define DRSDT_HPP - -#include -#include - -#include - -namespace Opm -{ - /* - * The OilVaporizationProperties class - * This classe is used to store the values from {VAPPARS, DRSDT, DRVDT} the behavior of the keywords are mutal exclusive. - * Any one of the three keywords {VAPPARS, DRSDT, DRVDT} will cancel previous settings of the other keywords. - * Ask for type first and the ask for the correct values for this type, asking for values not valid for the current type will throw a logic exception. - */ - class OilVaporizationProperties { - public: - static OilVaporizationProperties createDRSDT(double maxDRSDT, std::string option); - static OilVaporizationProperties createDRVDT(double maxDRVDT); - static OilVaporizationProperties createVAPPARS(double vap1, double vap2); - - Opm::OilVaporizationEnum getType() const; - double getVap1() const; - double getVap2() const; - double getMaxDRSDT() const; - double getMaxDRVDT() const; - bool getOption() const; - - /* - * if either argument was default constructed == will always be false - * and != will always be true - */ - bool operator==( const OilVaporizationProperties& ) const; - bool operator!=( const OilVaporizationProperties& ) const; - - private: - Opm::OilVaporizationEnum m_type = OilVaporizationEnum::UNDEF; - double m_vap1; - double m_vap2; - double m_maxDRSDT; - double m_maxDRVDT; - bool m_maxDRSDT_allCells; - }; -} -#endif // DRSDT_H diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp deleted file mode 100644 index 6b6a532ec9..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp +++ /dev/null @@ -1,1575 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace Opm { - - namespace { - - time_t posixTime( const boost::posix_time::ptime& t) { - boost::posix_time::ptime epoch( boost::gregorian::date( 1970, 1, 1 ) ); - return time_t( ( t - epoch ).total_seconds() ); - } - - } - - - Schedule::Schedule(const ParseContext& parseContext, - const EclipseGrid& grid, - std::shared_ptr< const Deck > deckptr ) : - Schedule(parseContext, grid, *deckptr ) - {} - - Schedule::Schedule( const ParseContext& parseContext, - const EclipseGrid& grid, - const Deck& deck ) : - m_timeMap( std::make_shared< TimeMap>( deck )), - m_rootGroupTree( m_timeMap, GroupTree{} ), - m_oilvaporizationproperties( m_timeMap, OilVaporizationProperties{} ), - m_events( m_timeMap ), - m_modifierDeck( m_timeMap, nullptr ), - m_tuning( m_timeMap ) - - { - m_controlModeWHISTCTL = WellProducer::CMODE_UNDEFINED; - addGroup( "FIELD", 0 ); - - if (Section::hasSCHEDULE(deck)) { - std::shared_ptr scheduleSection = std::make_shared(deck); - iterateScheduleSection(parseContext , *scheduleSection , grid ); - } - } - - boost::posix_time::ptime Schedule::getStartTime() const { - return m_timeMap->getStartTime(/*timeStepIdx=*/0); - } - - time_t Schedule::posixStartTime() const { - return posixTime(this->getStartTime()); - } - - time_t Schedule::posixEndTime() const { - return posixTime( this->m_timeMap->getEndTime() ); - } - - void Schedule::iterateScheduleSection(const ParseContext& parseContext , const SCHEDULESection& section , const EclipseGrid& grid) { - /* - geoModifiers is a list of geo modifiers which can be found in the schedule - section. This is only partly supported, support is indicated by the bool - value. The keywords which are supported will be assembled in a per-timestep - 'minideck', whereas ParseContext::UNSUPPORTED_SCHEDULE_GEO_MODIFIER will be - consulted for the others. - */ - - const std::map geoModifiers = {{"MULTFLT" , true}, - {"MULTPV" , false}, - {"MULTX" , false}, - {"MULTX-" , false}, - {"MULTY" , false}, - {"MULTY-" , false}, - {"MULTZ" , false}, - {"MULTZ-" , false}, - {"MULTREGT" , false}, - {"MULTR" , false}, - {"MULTR-" , false}, - {"MULTSIG" , false}, - {"MULTSIGV" , false}, - {"MULTTHT" , false}, - {"MULTTHT-" , false}}; - - size_t currentStep = 0; - std::vector > rftProperties; - - for (size_t keywordIdx = 0; keywordIdx < section.size(); ++keywordIdx) { - const auto& keyword = section.getKeyword(keywordIdx); - - if (keyword.name() == "DATES") - currentStep += keyword.size(); - - else if (keyword.name() == "TSTEP") - currentStep += keyword.getRecord(0).getItem(0).size(); // This is a bit weird API. - - else if (keyword.name() == "WELSPECS") - handleWELSPECS( section, keywordIdx, currentStep ); - - else if (keyword.name() == "WHISTCTL") - handleWHISTCTL(parseContext, keyword); - - else if (keyword.name() == "WCONHIST") - handleWCONHIST(keyword, currentStep); - - else if (keyword.name() == "WCONPROD") - handleWCONPROD(keyword, currentStep); - - else if (keyword.name() == "WCONINJE") - handleWCONINJE(section, keyword, currentStep); - - else if (keyword.name() == "WPOLYMER") - handleWPOLYMER(keyword, currentStep); - - else if (keyword.name() == "WSOLVENT") - handleWSOLVENT(keyword, currentStep); - - else if (keyword.name() == "WCONINJH") - handleWCONINJH(section, keyword, currentStep); - - else if (keyword.name() == "WGRUPCON") - handleWGRUPCON(keyword, currentStep); - - else if (keyword.name() == "COMPDAT") - handleCOMPDAT(keyword, currentStep, grid); - - else if (keyword.name() == "WELSEGS") - handleWELSEGS(keyword, currentStep); - - else if (keyword.name() == "COMPSEGS") - handleCOMPSEGS(keyword, currentStep); - - else if (keyword.name() == "WELOPEN") - handleWELOPEN(keyword, currentStep , section.hasKeyword("COMPLUMP")); - - else if (keyword.name() == "WELTARG") - handleWELTARG(section, keyword, currentStep); - - else if (keyword.name() == "GRUPTREE") - handleGRUPTREE(keyword, currentStep); - - else if (keyword.name() == "GCONINJE") - handleGCONINJE(section, keyword, currentStep); - - else if (keyword.name() == "GCONPROD") - handleGCONPROD(keyword, currentStep); - - else if (keyword.name() == "GEFAC") - handleGEFAC(keyword, currentStep); - - else if (keyword.name() == "TUNING") - handleTUNING(keyword, currentStep); - - else if (keyword.name() == "WRFT") - rftProperties.push_back( std::make_pair( &keyword , currentStep )); - - else if (keyword.name() == "WRFTPLT") - rftProperties.push_back( std::make_pair( &keyword , currentStep )); - - else if (keyword.name() == "WPIMULT") - handleWPIMULT(keyword, currentStep); - - else if (keyword.name() == "COMPORD") - handleCOMPORD(parseContext , keyword, currentStep); - - else if (keyword.name() == "DRSDT") - handleDRSDT(keyword, currentStep); - - else if (keyword.name() == "DRVDT") - handleDRVDT(keyword, currentStep); - - else if (keyword.name() == "VAPPARS") - handleVAPPARS(keyword, currentStep); - - else if (keyword.name() == "WECON") - handleWECON(keyword, currentStep); - - else if (geoModifiers.find( keyword.name() ) != geoModifiers.end()) { - bool supported = geoModifiers.at( keyword.name() ); - if (supported) { - /* - If the deck stored at currentStep is a null pointer (i.e. evaluates - to false) we must first create a new deck and install that under - index currentstep; then we fetch the deck (newly created - or old) - from the container and add the keyword. - */ - if (!m_modifierDeck.iget(currentStep)) - m_modifierDeck.iset( currentStep , std::make_shared( )); - - m_modifierDeck.iget( currentStep )->addKeyword( keyword ); - m_events.addEvent( ScheduleEvents::GEO_MODIFIER , currentStep); - - } else { - std::string msg = "OPM does not support grid property modifier " + keyword.name() + " in the Schedule section. Error at report: " + std::to_string( currentStep ); - parseContext.handleError( ParseContext::UNSUPPORTED_SCHEDULE_GEO_MODIFIER , m_messages, msg ); - } - } - } - - for (auto rftPair = rftProperties.begin(); rftPair != rftProperties.end(); ++rftPair) { - const DeckKeyword& keyword = *rftPair->first; - size_t timeStep = rftPair->second; - if (keyword.name() == "WRFT") { - handleWRFT(keyword, timeStep); - } - - if (keyword.name() == "WRFTPLT"){ - handleWRFTPLT(keyword, timeStep); - } - } - - checkUnhandledKeywords(section); - } - - void Schedule::checkUnhandledKeywords(const SCHEDULESection& /*section*/) const - { - } - - - bool Schedule::handleGroupFromWELSPECS(const std::string& groupName, GroupTree& newTree) const { - bool treeUpdated = false; - if (!newTree.getNode(groupName)) { - treeUpdated = true; - newTree.updateTree(groupName); - } - return treeUpdated; - } - - void Schedule::handleWHISTCTL(const ParseContext& parseContext, const DeckKeyword& keyword) { - for( const auto& record : keyword ) { - const std::string& cmodeString = record.getItem("CMODE").getTrimmedString(0); - WellProducer::ControlModeEnum controlMode = WellProducer::ControlModeFromString( cmodeString ); - m_controlModeWHISTCTL = controlMode; - const std::string bhp_terminate = record.getItem("BPH_TERMINATE").getTrimmedString(0); - if (bhp_terminate == "YES") { - std::string msg = "The WHISTCTL keyword does not handle 'YES'. i.e. to terminate the run"; - m_messages.error(msg); - parseContext.handleError( ParseContext::UNSUPPORTED_TERMINATE_IF_BHP , m_messages, msg ); - } - - } - } - - - void Schedule::handleCOMPORD(const ParseContext& parseContext, const DeckKeyword& compordKeyword, size_t /* currentStep */) { - for (const auto& record : compordKeyword) { - const auto& methodItem = record.getItem(); - if ((methodItem.get< std::string >(0) != "TRACK") && (methodItem.get< std::string >(0) != "INPUT")) { - std::string msg = "The COMPORD keyword only handles 'TRACK' or 'INPUT' order."; - m_messages.error(msg); - parseContext.handleError( ParseContext::UNSUPPORTED_COMPORD_TYPE , m_messages, msg ); - } - } - } - - - - void Schedule::handleWELSPECS( const SCHEDULESection& section, - size_t index, - size_t currentStep ) { - bool needNewTree = false; - auto newTree = m_rootGroupTree.get(currentStep); - - const auto COMPORD_in_timestep = [&]() -> const DeckKeyword* { - auto itr = section.begin() + index; - for( ; itr != section.end(); ++itr ) { - if( itr->name() == "DATES" ) return nullptr; - if( itr->name() == "TSTEP" ) return nullptr; - if( itr->name() == "COMPORD" ) return std::addressof( *itr ); - } - - return nullptr; - }; - - const auto& keyword = section.getKeyword( index ); - - for (size_t recordNr = 0; recordNr < keyword.size(); recordNr++) { - const auto& record = keyword.getRecord(recordNr); - const std::string& wellName = record.getItem("WELL").getTrimmedString(0); - const std::string& groupName = record.getItem("GROUP").getTrimmedString(0); - - if (!hasGroup(groupName)) - addGroup(groupName , currentStep); - - if (!hasWell(wellName)) { - WellCompletion::CompletionOrderEnum wellCompletionOrder = WellCompletion::TRACK; - - if( const auto* compordp = COMPORD_in_timestep() ) { - const auto& compord = *compordp; - - for (size_t compordRecordNr = 0; compordRecordNr < compord.size(); compordRecordNr++) { - const auto& compordRecord = compord.getRecord(compordRecordNr); - - const std::string& wellNamePattern = compordRecord.getItem(0).getTrimmedString(0); - if (Well::wellNameInWellNamePattern(wellName, wellNamePattern)) { - const std::string& compordString = compordRecord.getItem(1).getTrimmedString(0); - wellCompletionOrder = WellCompletion::CompletionOrderEnumFromString(compordString); - } - } - } - addWell(wellName, record, currentStep, wellCompletionOrder); - } - - const auto* currentWell = getWell(wellName); - checkWELSPECSConsistency( *currentWell, keyword, recordNr); - - addWellToGroup( this->m_groups.at( groupName ), *this->m_wells.get( wellName ), currentStep); - if (handleGroupFromWELSPECS(groupName, newTree)) - needNewTree = true; - - //Collect messages from wells. - m_messages.appendMessages(currentWell->getMessageContainer()); - } - - if (needNewTree) { - m_rootGroupTree.update(currentStep, newTree); - m_events.addEvent( ScheduleEvents::GROUP_CHANGE , currentStep); - } - } - - void Schedule::handleVAPPARS( const DeckKeyword& keyword, size_t currentStep){ - for( const auto& record : keyword ) { - double vap = record.getItem("OIL_VAP_PROPENSITY").get< double >(0); - double density = record.getItem("OIL_DENSITY_PROPENSITY").get< double >(0); - auto vappars = OilVaporizationProperties::createVAPPARS(vap, density); - this->m_oilvaporizationproperties.update( currentStep, vappars ); - - } - } - - void Schedule::handleDRVDT( const DeckKeyword& keyword, size_t currentStep){ - for( const auto& record : keyword ) { - double max = record.getItem("DRVDT_MAX").getSIDouble(0); - auto drvdt = OilVaporizationProperties::createDRVDT(max); - this->m_oilvaporizationproperties.update( currentStep, drvdt ); - - } - } - - - void Schedule::handleDRSDT( const DeckKeyword& keyword, size_t currentStep){ - for( const auto& record : keyword ) { - double max = record.getItem("DRSDT_MAX").getSIDouble(0); - std::string option = record.getItem("Option").get< std::string >(0); - auto drsdt = OilVaporizationProperties::createDRSDT(max, option); - this->m_oilvaporizationproperties.update( currentStep, drsdt ); - } - } - - - - void Schedule::checkWELSPECSConsistency( const Well& well, const DeckKeyword& keyword, size_t recordIdx) { - const auto& record = keyword.getRecord(recordIdx); - if (well.getHeadI() != record.getItem("HEAD_I").get< int >(0) - 1) { - std::string msg = - "Unable process WELSPECS for well " + well.name() + ", HEAD_I deviates from existing value"; - m_messages.error(keyword.getFileName(), msg, keyword.getLineNumber()); - throw std::invalid_argument(msg); - } - if (well.getHeadJ() != record.getItem("HEAD_J").get< int >(0) - 1) { - std::string msg = - "Unable process WELSPECS for well " + well.name() + ", HEAD_J deviates from existing value"; - m_messages.error(keyword.getFileName(), msg, keyword.getLineNumber()); - throw std::invalid_argument(msg); - } - } - - void Schedule::handleWCONProducer( const DeckKeyword& keyword, size_t currentStep, bool isPredictionMode) { - for( const auto& record : keyword ) { - const std::string& wellNamePattern = - record.getItem("WELL").getTrimmedString(0); - - const WellCommon::StatusEnum status = - WellCommon::StatusFromString(record.getItem("STATUS").getTrimmedString(0)); - - auto wells = getWells(wellNamePattern); - - for( auto* well : getWells( wellNamePattern ) ) { - WellProductionProperties properties; - - - if (isPredictionMode) { - auto addGrupProductionControl = well->isAvailableForGroupControl(currentStep); - properties = WellProductionProperties::prediction( record, addGrupProductionControl ); - } else { - const WellProductionProperties& prev_properties = well->getProductionProperties(currentStep); - double BHPLimit = prev_properties.BHPLimit; - properties = WellProductionProperties::history( BHPLimit , record); - } - - if (status != WellCommon::SHUT) { - const std::string& cmodeString = - record.getItem("CMODE").getTrimmedString(0); - - WellProducer::ControlModeEnum control = - WellProducer::ControlModeFromString(cmodeString); - - if ( m_controlModeWHISTCTL != WellProducer::CMODE_UNDEFINED && - m_controlModeWHISTCTL != WellProducer::NONE) { - control = m_controlModeWHISTCTL; // overwrite given control - } - - if (properties.hasProductionControl(control)) { - properties.controlMode = control; - } - else { - std::string msg = - "Tried to set invalid control: " + - cmodeString + " for well: " + well->name(); - m_messages.error(keyword.getFileName(), msg, keyword.getLineNumber()); - throw std::invalid_argument(msg); - } - } - updateWellStatus( *well , currentStep , status ); - if (well->setProductionProperties(currentStep, properties)) - m_events.addEvent( ScheduleEvents::PRODUCTION_UPDATE , currentStep); - - if ( !well->getAllowCrossFlow() && !isPredictionMode && (properties.OilRate + properties.WaterRate + properties.GasRate) == 0 ) { - - std::string msg = - "Well " + well->name() + " is a history matched well with zero rate where crossflow is banned. " + - "This well will be closed at " + std::to_string ( m_timeMap->getTimePassedUntil(currentStep) / (60*60*24) ) + " days"; - m_messages.note(msg); - updateWellStatus( *well, currentStep, WellCommon::StatusEnum::SHUT ); - } - } - } - } - - void Schedule::updateWellStatus( Well& well, size_t reportStep , WellCommon::StatusEnum status) { - if( well.setStatus( reportStep, status ) ) - m_events.addEvent( ScheduleEvents::WELL_STATUS_CHANGE, reportStep ); - } - - - void Schedule::handleWCONHIST(const DeckKeyword& keyword, size_t currentStep) { - handleWCONProducer(keyword, currentStep, false); - } - - void Schedule::handleWCONPROD( const DeckKeyword& keyword, size_t currentStep) { - handleWCONProducer(keyword, currentStep, true); - } - - static Opm::Value getValueItem( const DeckItem& item ){ - Opm::Value data(item.name()); - if(item.hasValue(0)) { - int tempValue = item.get< int >(0); - if( tempValue >0){ - data.setValue(tempValue-1); - } - } - return data; - } - - - void Schedule::handleWPIMULT( const DeckKeyword& keyword, size_t currentStep) { - for( const auto& record : keyword ) { - const std::string& wellNamePattern = record.getItem("WELL").getTrimmedString(0); - double wellPi = record.getItem("WELLPI").get< double >(0); - - for( auto* well : getWells( wellNamePattern ) ) { - CompletionSetConstPtr currentCompletionSet = well->getCompletions(currentStep); - - CompletionSetPtr newCompletionSet(new CompletionSet( )); - - Opm::Value I = getValueItem(record.getItem("I")); - Opm::Value J = getValueItem(record.getItem("J")); - Opm::Value K = getValueItem(record.getItem("K")); - Opm::Value FIRST = getValueItem(record.getItem("FIRST")); - Opm::Value LAST = getValueItem(record.getItem("LAST")); - - size_t completionSize = currentCompletionSet->size(); - - for(size_t i = 0; i < completionSize;i++) { - - CompletionConstPtr currentCompletion = currentCompletionSet->get(i); - - if (FIRST.hasValue()) { - if (i < (size_t) FIRST.getValue()) { - newCompletionSet->add(currentCompletion); - continue; - } - } - if (LAST.hasValue()) { - if (i > (size_t) LAST.getValue()) { - newCompletionSet->add(currentCompletion); - continue; - } - } - - int ci = currentCompletion->getI(); - int cj = currentCompletion->getJ(); - int ck = currentCompletion->getK(); - - if (I.hasValue() && (!(I.getValue() == ci) )) { - newCompletionSet->add(currentCompletion); - continue; - } - - if (J.hasValue() && (!(J.getValue() == cj) )) { - newCompletionSet->add(currentCompletion); - continue; - } - - if (K.hasValue() && (!(K.getValue() == ck) )) { - newCompletionSet->add(currentCompletion); - continue; - } - - CompletionPtr newCompletion = std::make_shared(currentCompletion, wellPi); - newCompletionSet->add(newCompletion); - } - well->addCompletionSet(currentStep, newCompletionSet); - - - - } - } - } - - - void Schedule::handleWCONINJE( const SCHEDULESection& section, const DeckKeyword& keyword, size_t currentStep) { - for( const auto& record : keyword ) { - const std::string& wellNamePattern = record.getItem("WELL").getTrimmedString(0); - - for( auto* well : getWells( wellNamePattern ) ) { - WellInjector::TypeEnum injectorType = WellInjector::TypeFromString( record.getItem("TYPE").getTrimmedString(0) ); - WellCommon::StatusEnum status = WellCommon::StatusFromString( record.getItem("STATUS").getTrimmedString(0)); - - updateWellStatus( *well , currentStep , status ); - WellInjectionProperties properties(well->getInjectionPropertiesCopy(currentStep)); - - properties.injectorType = injectorType; - properties.predictionMode = true; - - if (!record.getItem("RATE").defaultApplied(0)) { - properties.surfaceInjectionRate = convertInjectionRateToSI(record.getItem("RATE").get< double >(0) , injectorType, section.unitSystem()); - properties.addInjectionControl(WellInjector::RATE); - } else - properties.dropInjectionControl(WellInjector::RATE); - - - if (!record.getItem("RESV").defaultApplied(0)) { - properties.reservoirInjectionRate = record.getItem("RESV").getSIDouble(0); - properties.addInjectionControl(WellInjector::RESV); - } else - properties.dropInjectionControl(WellInjector::RESV); - - - if (!record.getItem("THP").defaultApplied(0)) { - properties.THPLimit = record.getItem("THP").getSIDouble(0); - properties.VFPTableNumber = record.getItem("VFP_TABLE").get< int >(0); - properties.addInjectionControl(WellInjector::THP); - } else - properties.dropInjectionControl(WellInjector::THP); - - /* - What a mess; there is a sensible default BHP limit - defined, so the BHPLimit can be safely set - unconditionally - but should we make BHP control - available based on that default value - currently we - do not do that. - */ - properties.BHPLimit = record.getItem("BHP").getSIDouble(0); - if (!record.getItem("BHP").defaultApplied(0)) { - properties.addInjectionControl(WellInjector::BHP); - } else - properties.dropInjectionControl(WellInjector::BHP); - - if (well->isAvailableForGroupControl(currentStep)) - properties.addInjectionControl(WellInjector::GRUP); - else - properties.dropInjectionControl(WellInjector::GRUP); - { - const std::string& cmodeString = record.getItem("CMODE").getTrimmedString(0); - WellInjector::ControlModeEnum controlMode = WellInjector::ControlModeFromString( cmodeString ); - if (properties.hasInjectionControl( controlMode)) - properties.controlMode = controlMode; - else { - throw std::invalid_argument("Tried to set invalid control: " + cmodeString + " for well: " + wellNamePattern); - } - } - - if (well->setInjectionProperties(currentStep, properties)) - m_events.addEvent( ScheduleEvents::INJECTION_UPDATE , currentStep ); - - if ( ! well->getAllowCrossFlow() && (properties.surfaceInjectionRate == 0) ) { - std::string msg = - "Well " + well->name() + " is an injector with zero rate where crossflow is banned. " + - "This well will be closed at " + std::to_string ( m_timeMap->getTimePassedUntil(currentStep) / (60*60*24) ) + " days"; - m_messages.note(msg); - updateWellStatus( *well, currentStep, WellCommon::StatusEnum::SHUT ); - } - } - } - } - - - void Schedule::handleWPOLYMER( const DeckKeyword& keyword, size_t currentStep) { - for( const auto& record : keyword ) { - const std::string& wellNamePattern = record.getItem("WELL").getTrimmedString(0); - - for( auto* well : getWells( wellNamePattern ) ) { - WellPolymerProperties properties(well->getPolymerPropertiesCopy(currentStep)); - - properties.m_polymerConcentration = record.getItem("POLYMER_CONCENTRATION").getSIDouble(0); - properties.m_saltConcentration = record.getItem("SALT_CONCENTRATION").getSIDouble(0); - - const auto& group_polymer_item = record.getItem("GROUP_POLYMER_CONCENTRATION"); - const auto& group_salt_item = record.getItem("GROUP_SALT_CONCENTRATION"); - - if (!group_polymer_item.defaultApplied(0)) { - throw std::logic_error("Sorry explicit setting of \'GROUP_POLYMER_CONCENTRATION\' is not supported!"); - } - - if (!group_salt_item.defaultApplied(0)) { - throw std::logic_error("Sorry explicit setting of \'GROUP_SALT_CONCENTRATION\' is not supported!"); - } - well->setPolymerProperties(currentStep, properties); - } - } - } - - - - void Schedule::handleWECON( const DeckKeyword& keyword, size_t currentStep) { - for( const auto& record : keyword ) { - const std::string& wellNamePattern = record.getItem("WELL").getTrimmedString(0); - WellEconProductionLimits econ_production_limits(record); - - for( auto* well : getWells( wellNamePattern ) ) { - well->setEconProductionLimits(currentStep, econ_production_limits); - } - } - } - - - void Schedule::handleWSOLVENT( const DeckKeyword& keyword, size_t currentStep) { - - for( const auto& record : keyword ) { - const std::string& wellNamePattern = record.getItem("WELL").getTrimmedString(0); - - for( auto* well : getWells( wellNamePattern ) ) { - WellInjectionProperties injectionProperties = well->getInjectionProperties( currentStep ); - if (well->isInjector( currentStep ) && injectionProperties.injectorType == WellInjector::GAS) { - double fraction = record.getItem("SOLVENT_FRACTION").get< double >(0); - well->setSolventFraction(currentStep, fraction); - } else { - throw std::invalid_argument("WSOLVENT keyword can only be applied to Gas injectors"); - } - } - } - } - - void Schedule::handleWCONINJH( const SCHEDULESection& section, const DeckKeyword& keyword, size_t currentStep) { - for( const auto& record : keyword ) { - const std::string& wellName = record.getItem("WELL").getTrimmedString(0); - - // convert injection rates to SI - WellInjector::TypeEnum injectorType = WellInjector::TypeFromString( record.getItem("TYPE").getTrimmedString(0)); - double injectionRate = record.getItem("RATE").get< double >(0); - injectionRate = convertInjectionRateToSI(injectionRate, injectorType, section.unitSystem()); - - WellCommon::StatusEnum status = WellCommon::StatusFromString( record.getItem("STATUS").getTrimmedString(0)); - - auto& well = *this->m_wells.get( wellName ); - updateWellStatus( well, currentStep, status ); - WellInjectionProperties properties(well.getInjectionPropertiesCopy(currentStep)); - - properties.injectorType = injectorType; - - const std::string& cmodeString = record.getItem("CMODE").getTrimmedString(0); - WellInjector::ControlModeEnum controlMode = WellInjector::ControlModeFromString( cmodeString ); - if (!record.getItem("RATE").defaultApplied(0)) { - properties.surfaceInjectionRate = injectionRate; - properties.addInjectionControl(controlMode); - properties.controlMode = controlMode; - } - properties.predictionMode = false; - - if (well.setInjectionProperties(currentStep, properties)) - m_events.addEvent( ScheduleEvents::INJECTION_UPDATE , currentStep ); - - if ( ! well.getAllowCrossFlow() && (injectionRate == 0) ) { - std::string msg = - "Well " + well.name() + " is an injector with zero rate where crossflow is banned. " + - "This well will be closed at " + std::to_string ( m_timeMap->getTimePassedUntil(currentStep) / (60*60*24) ) + " days"; - m_messages.note(msg); - updateWellStatus( well, currentStep, WellCommon::StatusEnum::SHUT ); - } - } - } - - - - void Schedule::handleWELOPEN( const DeckKeyword& keyword, size_t currentStep , bool hascomplump) { - - for( const auto& record : keyword ) { - bool haveCompletionData = false; - for (size_t i=2; i<7; i++) { - const auto& item = record.getItem(i); - if (!item.defaultApplied(0)) { - haveCompletionData = true; - break; - } - } - - const std::string& wellNamePattern = record.getItem("WELL").getTrimmedString(0); - - for( auto* well : getWells( wellNamePattern ) ) { - - if(haveCompletionData){ - CompletionSetConstPtr currentCompletionSet = well->getCompletions(currentStep); - - CompletionSetPtr newCompletionSet(new CompletionSet( )); - - Opm::Value I = getValueItem(record.getItem("I")); - Opm::Value J = getValueItem(record.getItem("J")); - Opm::Value K = getValueItem(record.getItem("K")); - Opm::Value C1 = getValueItem(record.getItem("C1")); - Opm::Value C2 = getValueItem(record.getItem("C2")); - - if(hascomplump && (C2.hasValue() || C1.hasValue())){ - std::cerr << "ERROR the keyword COMPLUMP is not supported used when C1 or C2 in WELOPEN have values" << std::endl; - throw std::exception(); - } - - size_t completionSize = currentCompletionSet->size(); - - for(size_t i = 0; i < completionSize;i++) { - - CompletionConstPtr currentCompletion = currentCompletionSet->get(i); - - if (C1.hasValue()) { - if (i < (size_t) C1.getValue()) { - newCompletionSet->add(currentCompletion); - continue; - } - } - if (C2.hasValue()) { - if (i > (size_t) C2.getValue()) { - newCompletionSet->add(currentCompletion); - continue; - } - } - - int ci = currentCompletion->getI(); - int cj = currentCompletion->getJ(); - int ck = currentCompletion->getK(); - - if (I.hasValue() && (!(I.getValue() == ci) )) { - newCompletionSet->add(currentCompletion); - continue; - } - - if (J.hasValue() && (!(J.getValue() == cj) )) { - newCompletionSet->add(currentCompletion); - continue; - } - - if (K.hasValue() && (!(K.getValue() == ck) )) { - newCompletionSet->add(currentCompletion); - continue; - } - WellCompletion::StateEnum completionStatus = WellCompletion::StateEnumFromString(record.getItem("STATUS").getTrimmedString(0)); - CompletionPtr newCompletion = std::make_shared(currentCompletion, completionStatus); - newCompletionSet->add(newCompletion); - } - - well->addCompletionSet(currentStep, newCompletionSet); - m_events.addEvent(ScheduleEvents::COMPLETION_CHANGE, currentStep); - if (newCompletionSet->allCompletionsShut()) - updateWellStatus( *well, currentStep, WellCommon::StatusEnum::SHUT); - - } - else if(!haveCompletionData) { - WellCommon::StatusEnum status = WellCommon::StatusFromString( record.getItem("STATUS").getTrimmedString(0)); - if (status == WellCommon::StatusEnum::OPEN && !well->canOpen(currentStep)) { - std::string msg = - "Well " + well->name() + " where crossflow is banned has zero total rate. " + - "This well is prevented from opening at " + std::to_string ( m_timeMap->getTimePassedUntil(currentStep) / (60*60*24) ) + " days"; - m_messages.note(msg); - continue; - } - updateWellStatus( *well, currentStep, status ); - } - } - } - } - - /* - The documentation for the WELTARG keyword says that the well - must have been fully specified and initialized using one of the - WCONxxxx keywords prior to modifying the well using the WELTARG - keyword. - - The following implementation of handling the WELTARG keyword - does not check or enforce in any way that this is done (i.e. it - is not checked or verified that the well is initialized with any - WCONxxxx keyword). - */ - - void Schedule::handleWELTARG( const SCHEDULESection& section , const DeckKeyword& keyword, size_t currentStep) { - Opm::UnitSystem unitSystem = section.unitSystem(); - double siFactorL = unitSystem.parse("LiquidSurfaceVolume/Time")->getSIScaling(); - double siFactorG = unitSystem.parse("GasSurfaceVolume/Time")->getSIScaling(); - double siFactorP = unitSystem.parse("Pressure")->getSIScaling(); - - for( const auto& record : keyword ) { - - const std::string& wellNamePattern = record.getItem("WELL").getTrimmedString(0); - const std::string& cMode = record.getItem("CMODE").getTrimmedString(0); - double newValue = record.getItem("NEW_VALUE").get< double >(0); - - const auto wells = getWells( wellNamePattern ); - - if( wells.empty() ) - throw std::invalid_argument( - wellNamePattern + " does not match any wells. " + - "Specify wells with the WCONxxxx keywords." ); - - for( auto* well : wells ) { - if(well->isProducer(currentStep)){ - WellProductionProperties prop = well->getProductionPropertiesCopy(currentStep); - - if (cMode == "ORAT"){ - prop.OilRate = newValue * siFactorL; - } - else if (cMode == "WRAT"){ - prop.WaterRate = newValue * siFactorL; - } - else if (cMode == "GRAT"){ - prop.GasRate = newValue * siFactorG; - } - else if (cMode == "LRAT"){ - prop.LiquidRate = newValue * siFactorL; - } - else if (cMode == "RESV"){ - prop.ResVRate = newValue * siFactorL; - } - else if (cMode == "BHP"){ - prop.BHPLimit = newValue * siFactorP; - /* For wells controlled by WCONHIST the BHP value given by the - WCHONHIST keyword can not be used to control the well - i.e BHP - control is not natively available - however when BHP has been - specified with WELTARG we can enable BHP control. - */ - if (prop.predictionMode == false) - prop.addProductionControl(WellProducer::BHP); - } - else if (cMode == "THP"){ - prop.THPLimit = newValue * siFactorP; - } - else if (cMode == "VFP"){ - prop.VFPTableNumber = static_cast (newValue); - } - else if (cMode == "GUID"){ - well->setGuideRate(currentStep, newValue); - } - else{ - throw std::invalid_argument("Invalid keyword (MODE) supplied"); - } - - well->setProductionProperties(currentStep, prop); - }else{ - WellInjectionProperties prop = well->getInjectionPropertiesCopy(currentStep); - if (cMode == "BHP"){ - prop.BHPLimit = newValue * siFactorP; - /* For wells controlled by WCONINJH the BHP value given by the - WCHONINJH keyword can not be used to control the well - i.e BHP - control is not natively available - however when BHP has been - specified with WELTARG we can enable BHP control. - */ - if (prop.predictionMode == false) - prop.addInjectionControl(WellInjector::BHP); - } - else if (cMode == "ORAT"){ - if(prop.injectorType == WellInjector::TypeEnum::OIL){ - prop.surfaceInjectionRate = newValue * siFactorL; - }else{ - std::invalid_argument("Well type must be OIL to set the oil rate"); - } - } - else if (cMode == "WRAT"){ - if(prop.injectorType == WellInjector::TypeEnum::WATER){ - prop.surfaceInjectionRate = newValue * siFactorL; - }else{ - std::invalid_argument("Well type must be WATER to set the water rate"); - } - } - else if (cMode == "GRAT"){ - if(prop.injectorType == WellInjector::TypeEnum::GAS){ - prop.surfaceInjectionRate = newValue * siFactorG; - }else{ - std::invalid_argument("Well type must be GAS to set the gas rate"); - } - } - else if (cMode == "THP"){ - prop.THPLimit = newValue * siFactorP; - } - else if (cMode == "VFP"){ - prop.VFPTableNumber = static_cast (newValue); - } - else if (cMode == "GUID"){ - well->setGuideRate(currentStep, newValue); - } - else if (cMode == "RESV"){ - prop.reservoirInjectionRate = newValue * siFactorL; - } - else{ - throw std::invalid_argument("Invalid keyword (MODE) supplied"); - } - - well->setInjectionProperties(currentStep, prop); - } - - - } - } - } - - void Schedule::handleGCONINJE( const SCHEDULESection& section, const DeckKeyword& keyword, size_t currentStep) { - for( const auto& record : keyword ) { - const std::string& groupName = record.getItem("GROUP").getTrimmedString(0); - auto& group = this->m_groups.at( groupName ); - - { - Phase::PhaseEnum phase = Phase::PhaseEnumFromString( record.getItem("PHASE").getTrimmedString(0) ); - group.setInjectionPhase( currentStep , phase ); - } - { - GroupInjection::ControlEnum controlMode = GroupInjection::ControlEnumFromString( record.getItem("CONTROL_MODE").getTrimmedString(0) ); - group.setInjectionControlMode( currentStep , controlMode ); - } - - Phase::PhaseEnum wellPhase = Phase::PhaseEnumFromString( record.getItem("PHASE").getTrimmedString(0)); - - // calculate SI injection rates for the group - double surfaceInjectionRate = record.getItem("SURFACE_TARGET").get< double >(0); - surfaceInjectionRate = convertInjectionRateToSI(surfaceInjectionRate, wellPhase, section.unitSystem()); - double reservoirInjectionRate = record.getItem("RESV_TARGET").getSIDouble(0); - - group.setSurfaceMaxRate( currentStep , surfaceInjectionRate); - group.setReservoirMaxRate( currentStep , reservoirInjectionRate); - group.setTargetReinjectFraction( currentStep , record.getItem("REINJ_TARGET").getSIDouble(0)); - group.setTargetVoidReplacementFraction( currentStep , record.getItem("VOIDAGE_TARGET").getSIDouble(0)); - - group.setInjectionGroup(currentStep, true); - } - } - - void Schedule::handleGCONPROD( const DeckKeyword& keyword, size_t currentStep) { - for( const auto& record : keyword ) { - const std::string& groupName = record.getItem("GROUP").getTrimmedString(0); - auto& group = this->m_groups.at( groupName ); - { - GroupProduction::ControlEnum controlMode = GroupProduction::ControlEnumFromString( record.getItem("CONTROL_MODE").getTrimmedString(0) ); - group.setProductionControlMode( currentStep , controlMode ); - } - group.setOilTargetRate( currentStep , record.getItem("OIL_TARGET").getSIDouble(0)); - group.setGasTargetRate( currentStep , record.getItem("GAS_TARGET").getSIDouble(0)); - group.setWaterTargetRate( currentStep , record.getItem("WATER_TARGET").getSIDouble(0)); - group.setLiquidTargetRate( currentStep , record.getItem("LIQUID_TARGET").getSIDouble(0)); - group.setReservoirVolumeTargetRate( currentStep , record.getItem("RESERVOIR_FLUID_TARGET").getSIDouble(0)); - { - GroupProductionExceedLimit::ActionEnum exceedAction = GroupProductionExceedLimit::ActionEnumFromString(record.getItem("EXCEED_PROC").getTrimmedString(0) ); - group.setProductionExceedLimitAction( currentStep , exceedAction ); - } - - group.setProductionGroup(currentStep, true); - } - } - - - void Schedule::handleGEFAC( const DeckKeyword& keyword, size_t currentStep) { - for( const auto& record : keyword ) { - const std::string& groupName = record.getItem("GROUP").getTrimmedString(0); - auto& group = this->m_groups.at( groupName ); - - group.setGroupEfficiencyFactor(currentStep, record.getItem("EFFICIENCY_FACTOR").get< double >(0)); - - const std::string& transfer_str = record.getItem("TRANSFER_EXT_NET").getTrimmedString(0); - bool transfer = (transfer_str == "YES") ? true : false; - group.setTransferGroupEfficiencyFactor(currentStep, transfer); - } - } - - - void Schedule::handleTUNING( const DeckKeyword& keyword, size_t currentStep) { - - int numrecords = keyword.size(); - - if (numrecords > 0) { - const auto& record1 = keyword.getRecord(0); - - double TSINIT = record1.getItem("TSINIT").getSIDouble(0); - this->m_tuning.setTSINIT(currentStep, TSINIT); - - double TSMAXZ = record1.getItem("TSMAXZ").getSIDouble(0); - this->m_tuning.setTSMAXZ(currentStep, TSMAXZ); - - double TSMINZ = record1.getItem("TSMINZ").getSIDouble(0); - this->m_tuning.setTSMINZ(currentStep, TSMINZ); - - double TSMCHP = record1.getItem("TSMCHP").getSIDouble(0); - this->m_tuning.setTSMCHP(currentStep, TSMCHP); - - double TSFMAX = record1.getItem("TSFMAX").get< double >(0); - this->m_tuning.setTSFMAX(currentStep, TSFMAX); - - double TSFMIN = record1.getItem("TSFMIN").get< double >(0); - this->m_tuning.setTSFMIN(currentStep, TSFMIN); - - double TSFCNV = record1.getItem("TSFCNV").get< double >(0); - this->m_tuning.setTSFCNV(currentStep, TSFCNV); - - double TFDIFF = record1.getItem("TFDIFF").get< double >(0); - this->m_tuning.setTFDIFF(currentStep, TFDIFF); - - double THRUPT = record1.getItem("THRUPT").get< double >(0); - this->m_tuning.setTHRUPT(currentStep, THRUPT); - - const auto& TMAXWCdeckItem = record1.getItem("TMAXWC"); - if (TMAXWCdeckItem.hasValue(0)) { - double TMAXWC = TMAXWCdeckItem.getSIDouble(0); - this->m_tuning.setTMAXWC(currentStep, TMAXWC); - } - } - - - if (numrecords > 1) { - const auto& record2 = keyword.getRecord(1); - - double TRGTTE = record2.getItem("TRGTTE").get< double >(0); - this->m_tuning.setTRGTTE(currentStep, TRGTTE); - - double TRGCNV = record2.getItem("TRGCNV").get< double >(0); - this->m_tuning.setTRGCNV(currentStep, TRGCNV); - - double TRGMBE = record2.getItem("TRGMBE").get< double >(0); - this->m_tuning.setTRGMBE(currentStep, TRGMBE); - - double TRGLCV = record2.getItem("TRGLCV").get< double >(0); - this->m_tuning.setTRGLCV(currentStep, TRGLCV); - - double XXXTTE = record2.getItem("XXXTTE").get< double >(0); - this->m_tuning.setXXXTTE(currentStep, XXXTTE); - - double XXXCNV = record2.getItem("XXXCNV").get< double >(0); - this->m_tuning.setXXXCNV(currentStep, XXXCNV); - - double XXXMBE = record2.getItem("XXXMBE").get< double >(0); - this->m_tuning.setXXXMBE(currentStep, XXXMBE); - - double XXXLCV = record2.getItem("XXXLCV").get< double >(0); - this->m_tuning.setXXXLCV(currentStep, XXXLCV); - - double XXXWFL = record2.getItem("XXXWFL").get< double >(0); - this->m_tuning.setXXXWFL(currentStep, XXXWFL); - - double TRGFIP = record2.getItem("TRGFIP").get< double >(0); - this->m_tuning.setTRGFIP(currentStep, TRGFIP); - - const auto& TRGSFTdeckItem = record2.getItem("TRGSFT"); - if (TRGSFTdeckItem.hasValue(0)) { - double TRGSFT = TRGSFTdeckItem.get< double >(0); - this->m_tuning.setTRGSFT(currentStep, TRGSFT); - } - - double THIONX = record2.getItem("THIONX").get< double >(0); - this->m_tuning.setTHIONX(currentStep, THIONX); - - int TRWGHT = record2.getItem("TRWGHT").get< int >(0); - this->m_tuning.setTRWGHT(currentStep, TRWGHT); - } - - - if (numrecords > 2) { - const auto& record3 = keyword.getRecord(2); - - int NEWTMX = record3.getItem("NEWTMX").get< int >(0); - this->m_tuning.setNEWTMX(currentStep, NEWTMX); - - int NEWTMN = record3.getItem("NEWTMN").get< int >(0); - this->m_tuning.setNEWTMN(currentStep, NEWTMN); - - int LITMAX = record3.getItem("LITMAX").get< int >(0); - this->m_tuning.setLITMAX(currentStep, LITMAX); - - int LITMIN = record3.getItem("LITMIN").get< int >(0); - this->m_tuning.setLITMIN(currentStep, LITMIN); - - int MXWSIT = record3.getItem("MXWSIT").get< int >(0); - this->m_tuning.setMXWSIT(currentStep, MXWSIT); - - int MXWPIT = record3.getItem("MXWPIT").get< int >(0); - this->m_tuning.setMXWPIT(currentStep, MXWPIT); - - double DDPLIM = record3.getItem("DDPLIM").getSIDouble(0); - this->m_tuning.setDDPLIM(currentStep, DDPLIM); - - double DDSLIM = record3.getItem("DDSLIM").get< double >(0); - this->m_tuning.setDDSLIM(currentStep, DDSLIM); - - double TRGDPR = record3.getItem("TRGDPR").getSIDouble(0); - this->m_tuning.setTRGDPR(currentStep, TRGDPR); - - const auto& XXXDPRdeckItem = record3.getItem("XXXDPR"); - if (XXXDPRdeckItem.hasValue(0)) { - double XXXDPR = XXXDPRdeckItem.getSIDouble(0); - this->m_tuning.setXXXDPR(currentStep, XXXDPR); - } - } - } - - - void Schedule::handleCOMPDAT( const DeckKeyword& keyword, size_t currentStep, const EclipseGrid& grid) { - const auto wells = this->getWells( currentStep ); - auto completions = Completion::fromCOMPDAT( grid, keyword, wells ); - - for( const auto pair : completions ) { - auto& well = *this->m_wells.get( pair.first ); - well.addCompletions( currentStep, pair.second ); - if (well.getCompletions( currentStep )->allCompletionsShut()) { - std::string msg = - "All completions in well " + well.name() + " is shut at " + std::to_string ( m_timeMap->getTimePassedUntil(currentStep) / (60*60*24) ) + " days. \n" + - "The well is therefore also shut."; - m_messages.note(msg); - updateWellStatus( well, currentStep, WellCommon::StatusEnum::SHUT); - } - } - m_events.addEvent(ScheduleEvents::COMPLETION_CHANGE, currentStep); - } - - void Schedule::handleWELSEGS( const DeckKeyword& keyword, size_t currentStep) { - SegmentSetPtr newSegmentset= std::make_shared(); - newSegmentset->segmentsFromWELSEGSKeyword(keyword); - - const std::string& well_name = newSegmentset->wellName(); - auto well = this->m_wells.get( well_name ); - - // update multi-segment related information for the well - well->addSegmentSet(currentStep, newSegmentset); - } - - void Schedule::handleCOMPSEGS( const DeckKeyword& keyword, size_t currentStep) { - const auto& record1 = keyword.getRecord(0); - const std::string& well_name = record1.getItem("WELL").getTrimmedString(0); - auto& well = *this->m_wells.get( well_name ); - - std::vector compsegs_vector = Compsegs::compsegsFromCOMPSEGSKeyword( keyword ); - - SegmentSetConstPtr current_segmentSet = well.getSegmentSet(currentStep); - Compsegs::processCOMPSEGS(compsegs_vector, current_segmentSet); - - CompletionSetConstPtr current_completionSet = well.getCompletions(currentStep); - // it is necessary to update the segment related information for some completions. - CompletionSetPtr new_completionSet = CompletionSetPtr(current_completionSet->shallowCopy()); - Compsegs::updateCompletionsWithSegment(compsegs_vector, new_completionSet); - - well.addCompletionSet(currentStep, new_completionSet); - } - - void Schedule::handleWGRUPCON( const DeckKeyword& keyword, size_t currentStep) { - for( const auto& record : keyword ) { - const std::string& wellName = record.getItem("WELL").getTrimmedString(0); - auto& well = *this->m_wells.get( wellName ); - - bool availableForGroupControl = convertEclipseStringToBool(record.getItem("GROUP_CONTROLLED").getTrimmedString(0)); - well.setAvailableForGroupControl(currentStep, availableForGroupControl); - - well.setGuideRate(currentStep, record.getItem("GUIDE_RATE").get< double >(0)); - - if (!record.getItem("PHASE").defaultApplied(0)) { - std::string guideRatePhase = record.getItem("PHASE").getTrimmedString(0); - well.setGuideRatePhase(currentStep, GuideRate::GuideRatePhaseEnumFromString(guideRatePhase)); - } else - well.setGuideRatePhase(currentStep, GuideRate::UNDEFINED); - - well.setGuideRateScalingFactor(currentStep, record.getItem("SCALING_FACTOR").get< double >(0)); - } - } - - void Schedule::handleGRUPTREE( const DeckKeyword& keyword, size_t currentStep) { - const auto& currentTree = m_rootGroupTree.get(currentStep); - auto newTree = currentTree; - for( const auto& record : keyword ) { - const std::string& childName = record.getItem("CHILD_GROUP").getTrimmedString(0); - const std::string& parentName = record.getItem("PARENT_GROUP").getTrimmedString(0); - newTree.updateTree(childName, parentName); - - if (!hasGroup(parentName)) - addGroup( parentName , currentStep ); - - if (!hasGroup(childName)) - addGroup( childName , currentStep ); - } - m_rootGroupTree.update(currentStep, newTree); - } - - void Schedule::handleWRFT( const DeckKeyword& keyword, size_t currentStep) { - - /* Rule for handling RFT: Request current RFT data output for specified wells, plus output when - * any well is subsequently opened - */ - - for( const auto& record : keyword ) { - - const std::string& wellNamePattern = record.getItem("WELL").getTrimmedString(0); - - for( auto* well : getWells( wellNamePattern ) ) { - - well->setRFTActive(currentStep, true); - size_t numStep = m_timeMap->numTimesteps(); - if(currentStepsetRFTActive(currentStep+1, false); - } - } - } - - for (auto iter = m_wells.begin(); iter != m_wells.end(); ++iter) { - auto well = *iter; - well->setRFTForWellWhenFirstOpen(m_timeMap->numTimesteps(), currentStep); - } - } - - void Schedule::handleWRFTPLT( const DeckKeyword& keyword, size_t currentStep) { - - for( const auto& record : keyword ) { - - const std::string& wellNamePattern = record.getItem("WELL").getTrimmedString(0); - - RFTConnections::RFTEnum RFTKey = RFTConnections::RFTEnumFromString(record.getItem("OUTPUT_RFT").getTrimmedString(0)); - PLTConnections::PLTEnum PLTKey = PLTConnections::PLTEnumFromString(record.getItem("OUTPUT_PLT").getTrimmedString(0)); - - for( auto* well : getWells( wellNamePattern ) ) { - switch(RFTKey){ - case RFTConnections::RFTEnum::YES: - well->setRFTActive(currentStep, true); - break; - case RFTConnections::RFTEnum::REPT: - well->setRFTActive(currentStep, true); - break; - case RFTConnections::RFTEnum::TIMESTEP: - well->setRFTActive(currentStep, true); - break; - case RFTConnections::RFTEnum::FOPN: - well->setRFTForWellWhenFirstOpen(m_timeMap->numTimesteps(),currentStep); - break; - case RFTConnections::RFTEnum::NO: - well->setRFTActive(currentStep, false); - break; - } - - switch(PLTKey){ - case PLTConnections::PLTEnum::YES: - well->setPLTActive(currentStep, true); - break; - case PLTConnections::PLTEnum::REPT: - well->setPLTActive(currentStep, true); - break; - case PLTConnections::PLTEnum::TIMESTEP: - well->setPLTActive(currentStep, true); - break; - case PLTConnections::PLTEnum::NO: - well->setPLTActive(currentStep, false); - break; - } - } - } - } - - TimeMapConstPtr Schedule::getTimeMap() const { - return m_timeMap; - } - - const GroupTree& Schedule::getGroupTree(size_t timeStep) const { - return m_rootGroupTree.get(timeStep); - } - - void Schedule::addWell(const std::string& wellName, const DeckRecord& record, size_t timeStep, WellCompletion::CompletionOrderEnum wellCompletionOrder) { - // We change from eclipse's 1 - n, to a 0 - n-1 solution - int headI = record.getItem("HEAD_I").get< int >(0) - 1; - int headJ = record.getItem("HEAD_J").get< int >(0) - 1; - Phase::PhaseEnum preferredPhase = Phase::PhaseEnumFromString(record.getItem("PHASE").getTrimmedString(0)); - Value refDepth("REF_DEPTH"); - const auto& refDepthItem = record.getItem("REF_DEPTH"); - - if (refDepthItem.hasValue(0)) - refDepth.setValue( refDepthItem.getSIDouble(0)); - - bool allowCrossFlow = true; - const std::string& allowCrossFlowStr = record.getItem().getTrimmedString(0); - if (allowCrossFlowStr == "NO") - allowCrossFlow = false; - - bool automaticShutIn = true; - const std::string& automaticShutInStr = record.getItem().getTrimmedString(0); - if (automaticShutInStr == "STOP") { - automaticShutIn = false; - } - - auto well = std::make_shared(wellName, headI, headJ, refDepth, preferredPhase, m_timeMap , timeStep, - wellCompletionOrder, allowCrossFlow, automaticShutIn); - m_wells.insert( wellName , well); - m_events.addEvent( ScheduleEvents::NEW_WELL , timeStep ); - } - - size_t Schedule::numWells() const { - return m_wells.size(); - } - - size_t Schedule::numWells(size_t timestep) const { - return this->getWells( timestep ).size(); - } - - bool Schedule::hasWell(const std::string& wellName) const { - return m_wells.hasKey( wellName ); - } - - std::vector< const Well* > Schedule::getWells() const { - return getWells(m_timeMap->size()-1); - } - - std::vector< const Well* > Schedule::getWells(size_t timeStep) const { - if (timeStep >= m_timeMap->size()) { - throw std::invalid_argument("Timestep to large"); - } - - auto defined = [=]( const Well* w ) { - return w->hasBeenDefined( timeStep ); - }; - - std::vector< const Well* > wells; - for( const auto well : m_wells ) { - if( !defined( well.get() ) ) continue; - wells.push_back( well.get() ); - } - - return wells; - } - - const Well* Schedule::getWell(const std::string& wellName) const { - return m_wells.get( wellName ).get(); - } - - - /* - Observe that this method only returns wells which have state == - OPEN; it does not include wells in state AUTO which might have - been opened by the simulator. - */ - - std::vector< const Well* > Schedule::getOpenWells(size_t timeStep) const { - - auto open = [=]( const Well* w ) { - return w->getStatus( timeStep ) == WellCommon::OPEN; - }; - - std::vector< const Well* > wells; - for( const auto well : m_wells ) { - if( !open( well.get() ) ) continue; - wells.push_back( well.get() ); - } - - return wells; - } - - std::vector< const Well* > Schedule::getWellsMatching( const std::string& wellNamePattern ) const { - auto tmp = const_cast< Schedule* >( this )->getWells( wellNamePattern ); - return { tmp.begin(), tmp.end() }; - } - - std::vector< Well* > Schedule::getWells(const std::string& wellNamePattern) { - size_t wildcard_pos = wellNamePattern.find("*"); - - if( wildcard_pos != wellNamePattern.length()-1 ) { - if( !m_wells.hasKey( wellNamePattern ) ) return {}; - return { m_wells.get( wellNamePattern ).get() }; - } - - std::vector< Well* > wells; - for (auto wellIter = m_wells.begin(); wellIter != m_wells.end(); ++wellIter) { - Well* well = wellIter->get(); - if (Well::wellNameInWellNamePattern(well->name(), wellNamePattern)) { - wells.push_back (well); - } - } - - return wells; - } - - void Schedule::addGroup(const std::string& groupName, size_t timeStep) { - if (!m_timeMap) { - throw std::invalid_argument("TimeMap is null, can't add group named: " + groupName); - } - m_groups.emplace( groupName, Group { groupName, m_timeMap, timeStep } ); - m_events.addEvent( ScheduleEvents::NEW_GROUP , timeStep ); - } - - size_t Schedule::numGroups() const { - return m_groups.size(); - } - - bool Schedule::hasGroup(const std::string& groupName) const { - return m_groups.find(groupName) != m_groups.end(); - } - - - const Group& Schedule::getGroup(const std::string& groupName) const { - if (hasGroup(groupName)) { - return m_groups.at(groupName); - } else - throw std::invalid_argument("Group: " + groupName + " does not exist"); - } - - std::vector< const Group* > Schedule::getGroups() const { - std::vector< const Group* > groups; - - for( const auto& itr : m_groups ) - groups.push_back( &itr.second ); - - return groups; - } - - void Schedule::addWellToGroup( Group& newGroup, Well& well , size_t timeStep) { - const std::string currentGroupName = well.getGroupName(timeStep); - if (currentGroupName != "") { - m_groups.at( currentGroupName ).delWell( timeStep, well.name() ); - } - well.setGroupName(timeStep , newGroup.name()); - newGroup.addWell(timeStep , &well); - } - - - double Schedule::convertInjectionRateToSI(double rawRate, WellInjector::TypeEnum wellType, const Opm::UnitSystem &unitSystem) { - switch (wellType) { - case WellInjector::MULTI: - // multi-phase controlled injectors are a really funny - // construct in Eclipse: the quantity controlled for is - // not physically meaningful, i.e. Eclipse adds up - // MCFT/day and STB/day. - throw std::logic_error("There is no generic way to handle multi-phase injectors at this level!"); - - case WellInjector::OIL: - case WellInjector::WATER: - return unitSystem.to_si( UnitSystem::measure::liquid_surface_rate, rawRate ); - - case WellInjector::GAS: - return unitSystem.to_si( UnitSystem::measure::gas_surface_rate, rawRate ); - - default: - throw std::logic_error("Unknown injector type"); - } - } - - double Schedule::convertInjectionRateToSI(double rawRate, Phase::PhaseEnum wellPhase, const Opm::UnitSystem& unitSystem) { - switch (wellPhase) { - case Phase::OIL: - case Phase::WATER: - return unitSystem.to_si( UnitSystem::measure::liquid_surface_rate, rawRate ); - - case Phase::GAS: - return unitSystem.to_si( UnitSystem::measure::gas_surface_rate, rawRate ); - - default: - throw std::logic_error("Unknown injection phase"); - } - } - - bool Schedule::convertEclipseStringToBool(const std::string& eclipseString) { - std::string lowerTrimmed = boost::algorithm::to_lower_copy(eclipseString); - boost::algorithm::trim(lowerTrimmed); - - if (lowerTrimmed == "y" || lowerTrimmed == "yes") { - return true; - } - else if (lowerTrimmed == "n" || lowerTrimmed == "no") { - return false; - } - else throw std::invalid_argument("String " + eclipseString + " not recognized as a boolean-convertible string."); - } - - size_t Schedule::getMaxNumCompletionsForWells(size_t timestep) const { - size_t ncwmax = 0; - for( const auto* wellPtr : getWells() ) { - CompletionSetConstPtr completionsSetPtr = wellPtr->getCompletions(timestep); - - if (completionsSetPtr->size() > ncwmax ) - ncwmax = completionsSetPtr->size(); - - } - return ncwmax; - } - - const Tuning& Schedule::getTuning() const { - return this->m_tuning; - } - - std::shared_ptr Schedule::getModifierDeck(size_t timeStep) const { - return m_modifierDeck.iget( timeStep ); - } - - - const MessageContainer& Schedule::getMessageContainer() const { - return m_messages; - } - - - MessageContainer& Schedule::getMessageContainer() { - return m_messages; - } - - - const Events& Schedule::getEvents() const { - return this->m_events; - } - - const OilVaporizationProperties& Schedule::getOilVaporizationProperties(size_t timestep){ - return m_oilvaporizationproperties.get(timestep); - } - - bool Schedule::hasOilVaporizationProperties(){ - return m_oilvaporizationproperties.size() > 0; - } - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp deleted file mode 100644 index e18c2ba00e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp +++ /dev/null @@ -1,156 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ -#ifndef SCHEDULE_HPP -#define SCHEDULE_HPP - -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace Opm -{ - - class Deck; - class DeckKeyword; - class DeckRecord; - class EclipseGrid; - class ParseContext; - class SCHEDULESection; - class TimeMap; - class UnitSystem; - class Well; - - class Schedule { - public: - Schedule(const ParseContext& parseContext, const EclipseGrid& grid, - const Deck& deck ); - - /// [deprecated] - Schedule(const ParseContext& parseContext, const EclipseGrid& grid, - std::shared_ptr deck ); - - /* - * If the input deck does not specify a start time, Eclipse's 1. Jan - * 1983 is defaulted - */ - boost::posix_time::ptime getStartTime() const; - time_t posixStartTime() const; - time_t posixEndTime() const; - - - std::shared_ptr< const TimeMap > getTimeMap() const; - - size_t numWells() const; - size_t numWells(size_t timestep) const; - size_t getMaxNumCompletionsForWells(size_t timestep) const; - bool hasWell(const std::string& wellName) const; - const Well* getWell(const std::string& wellName) const; - std::vector< const Well* > getOpenWells(size_t timeStep) const; - std::vector< const Well* > getWells() const; - std::vector< const Well* > getWells(size_t timeStep) const; - std::vector< const Well* > getWellsMatching( const std::string& ) const; - const OilVaporizationProperties& getOilVaporizationProperties(size_t timestep); - - const GroupTree& getGroupTree(size_t t) const; - size_t numGroups() const; - bool hasGroup(const std::string& groupName) const; - const Group& getGroup(const std::string& groupName) const; - std::vector< const Group* > getGroups() const; - const Tuning& getTuning() const; - - const Events& getEvents() const; - bool hasOilVaporizationProperties(); - std::shared_ptr getModifierDeck(size_t timeStep) const; - const MessageContainer& getMessageContainer() const; - MessageContainer& getMessageContainer(); - - - private: - std::shared_ptr< TimeMap > m_timeMap; - OrderedMap> m_wells; - std::map m_groups; - DynamicState< GroupTree > m_rootGroupTree; - DynamicState< OilVaporizationProperties > m_oilvaporizationproperties; - Events m_events; - DynamicVector > m_modifierDeck; - Tuning m_tuning; - MessageContainer m_messages; - WellProducer::ControlModeEnum m_controlModeWHISTCTL; - - std::vector< Well* > getWells(const std::string& wellNamePattern); - void updateWellStatus( Well& well, size_t reportStep , WellCommon::StatusEnum status); - void addWellToGroup( Group& newGroup , Well& well , size_t timeStep); - void iterateScheduleSection(const ParseContext& parseContext , const SCHEDULESection& , const EclipseGrid& grid); - bool handleGroupFromWELSPECS(const std::string& groupName, GroupTree& newTree) const; - void addGroup(const std::string& groupName , size_t timeStep); - void addWell(const std::string& wellName, const DeckRecord& record, size_t timeStep, WellCompletion::CompletionOrderEnum wellCompletionOrder); - void handleCOMPORD(const ParseContext& parseContext, const DeckKeyword& compordKeyword, size_t currentStep); - void checkWELSPECSConsistency( const Well&, const DeckKeyword& keyword, size_t recordIdx); - void handleWELSPECS( const SCHEDULESection&, size_t, size_t ); - void handleWCONProducer( const DeckKeyword& keyword, size_t currentStep, bool isPredictionMode); - void handleWCONHIST( const DeckKeyword& keyword, size_t currentStep); - void handleWCONPROD( const DeckKeyword& keyword, size_t currentStep); - void handleWGRUPCON( const DeckKeyword& keyword, size_t currentStep); - void handleCOMPDAT( const DeckKeyword& keyword, size_t currentStep, const EclipseGrid& grid); - void handleWELSEGS( const DeckKeyword& keyword, size_t currentStep); - void handleCOMPSEGS( const DeckKeyword& keyword, size_t currentStep); - void handleWCONINJE( const SCHEDULESection&, const DeckKeyword& keyword, size_t currentStep); - void handleWPOLYMER( const DeckKeyword& keyword, size_t currentStep); - void handleWSOLVENT( const DeckKeyword& keyword, size_t currentStep); - void handleWCONINJH( const SCHEDULESection&, const DeckKeyword& keyword, size_t currentStep); - void handleWELOPEN( const DeckKeyword& keyword, size_t currentStep, bool hascomplump); - void handleWELTARG( const SCHEDULESection&, const DeckKeyword& keyword, size_t currentStep); - void handleGCONINJE( const SCHEDULESection&, const DeckKeyword& keyword, size_t currentStep); - void handleGCONPROD( const DeckKeyword& keyword, size_t currentStep); - void handleGEFAC( const DeckKeyword& keyword, size_t currentStep); - void handleTUNING( const DeckKeyword& keyword, size_t currentStep); - void handleGRUPTREE( const DeckKeyword& keyword, size_t currentStep); - void handleWRFT( const DeckKeyword& keyword, size_t currentStep); - void handleWRFTPLT( const DeckKeyword& keyword, size_t currentStep); - void handleWPIMULT( const DeckKeyword& keyword, size_t currentStep); - void handleDRSDT( const DeckKeyword& keyword, size_t currentStep); - void handleDRVDT( const DeckKeyword& keyword, size_t currentStep); - void handleVAPPARS( const DeckKeyword& keyword, size_t currentStep); - void handleWECON( const DeckKeyword& keyword, size_t currentStep); - void handleWHISTCTL(const ParseContext& parseContext, const DeckKeyword& keyword); - - void checkUnhandledKeywords( const SCHEDULESection& ) const; - - static double convertInjectionRateToSI(double rawRate, WellInjector::TypeEnum wellType, const Opm::UnitSystem &unitSystem); - static double convertInjectionRateToSI(double rawRate, Phase::PhaseEnum wellPhase, const Opm::UnitSystem &unitSystem); - static bool convertEclipseStringToBool(const std::string& eclipseString); - - }; - typedef std::shared_ptr SchedulePtr; - typedef std::shared_ptr ScheduleConstPtr; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/ScheduleEnums.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/ScheduleEnums.cpp deleted file mode 100644 index 927da84d7f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/ScheduleEnums.cpp +++ /dev/null @@ -1,717 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include - -#include - -namespace Opm { - - namespace WellCompletion { - - std::string - DirectionEnum2String(const DirectionEnum enumValue) - { - std::string stringValue; - - switch (enumValue) { - case DirectionEnum::X: - stringValue = "X"; - break; - - case DirectionEnum::Y: - stringValue = "Y"; - break; - - case DirectionEnum::Z: - stringValue = "Z"; - break; - } - - return stringValue; - } - - DirectionEnum - DirectionEnumFromString(const std::string& s ) - { - DirectionEnum direction; - - if (s == "X") { direction = DirectionEnum::X; } - else if (s == "Y") { direction = DirectionEnum::Y; } - else if (s == "Z") { direction = DirectionEnum::Z; } - else { - std::string msg = "Unsupported completion direction " + s; - throw std::invalid_argument(msg); - } - - return direction; - } - - - const std::string StateEnum2String( StateEnum enumValue ) { - switch( enumValue ) { - case OPEN: - return "OPEN"; - case AUTO: - return "AUTO"; - case SHUT: - return "SHUT"; - default: - throw std::invalid_argument("Unhandled enum value"); - } - } - - - StateEnum StateEnumFromString( const std::string& stringValue ) { - if (stringValue == "OPEN") - return OPEN; - else if (stringValue == "SHUT") - return SHUT; - else if (stringValue == "STOP") - return SHUT; - else if (stringValue == "AUTO") - return AUTO; - else - throw std::invalid_argument("Unknown enum state string: " + stringValue ); - } - - - const std::string CompletionOrderEnum2String( CompletionOrderEnum enumValue ) { - switch( enumValue ) { - case DEPTH: - return "DEPTH"; - case INPUT: - return "INPUT"; - case TRACK: - return "TRACK"; - default: - throw std::invalid_argument("Unhandled enum value"); - } - - } - - CompletionOrderEnum CompletionOrderEnumFromString(const std::string& stringValue ) { - if (stringValue == "DEPTH") - return DEPTH; - else if (stringValue == "INPUT") - return INPUT; - else if (stringValue == "TRACK") - return TRACK; - else - throw std::invalid_argument("Unknown enum state string: " + stringValue ); - } - } - - - /*****************************************************************/ - - namespace GroupInjection { - - const std::string ControlEnum2String( ControlEnum enumValue ) { - switch( enumValue ) { - case NONE: - return "NONE"; - case RATE: - return "RATE"; - case RESV: - return "RESV"; - case REIN: - return "REIN"; - case VREP: - return "VREP"; - case FLD: - return "FLD"; - default: - throw std::invalid_argument("Unhandled enum value"); - } - } - - - ControlEnum ControlEnumFromString( const std::string& stringValue ) { - if (stringValue == "NONE") - return NONE; - else if (stringValue == "RATE") - return RATE; - else if (stringValue == "RESV") - return RESV; - else if (stringValue == "REIN") - return REIN; - else if (stringValue == "VREP") - return VREP; - else if (stringValue == "FLD") - return FLD; - else - throw std::invalid_argument("Unknown enum state string: " + stringValue ); - } - - } - - /*****************************************************************/ - - namespace GroupProduction { - - const std::string ControlEnum2String( ControlEnum enumValue ) { - switch( enumValue ) { - case NONE: - return "NONE"; - case ORAT: - return "ORAT"; - case WRAT: - return "WRAT"; - case GRAT: - return "GRAT"; - case LRAT: - return "LRAT"; - case CRAT: - return "CRAT"; - case RESV: - return "RESV"; - case PRBL: - return "PRBL"; - case FLD: - return "FLD"; - default: - throw std::invalid_argument("Unhandled enum value"); - } - } - - - ControlEnum ControlEnumFromString( const std::string& stringValue ) { - if (stringValue == "NONE") - return NONE; - else if (stringValue == "ORAT") - return ORAT; - else if (stringValue == "WRAT") - return WRAT; - else if (stringValue == "GRAT") - return GRAT; - else if (stringValue == "LRAT") - return LRAT; - else if (stringValue == "CRAT") - return CRAT; - else if (stringValue == "RESV") - return RESV; - else if (stringValue == "PRBL") - return PRBL; - else if (stringValue == "FLD") - return FLD; - else - throw std::invalid_argument("Unknown enum state string: " + stringValue ); - } - } - - /*****************************************************************/ - namespace GroupProductionExceedLimit { - - const std::string ActionEnum2String( ActionEnum enumValue ) { - switch(enumValue) { - case NONE: - return "NONE"; - case CON: - return "CON"; - case CON_PLUS: - return "+CON"; - case WELL: - return "WELL"; - case PLUG: - return "PLUG"; - case RATE: - return "RATE"; - default: - throw std::invalid_argument("unhandled enum value"); - } - } - - - ActionEnum ActionEnumFromString( const std::string& stringValue ) { - - if (stringValue == "NONE") - return NONE; - else if (stringValue == "CON") - return CON; - else if (stringValue == "+CON") - return CON_PLUS; - else if (stringValue == "WELL") - return WELL; - else if (stringValue == "PLUG") - return PLUG; - else if (stringValue == "RATE") - return RATE; - else - throw std::invalid_argument("Unknown enum state string: " + stringValue ); - } - - } - - /*****************************************************************/ - - namespace Phase { - const std::string PhaseEnum2String( PhaseEnum enumValue ) { - switch( enumValue ) { - case OIL: - return "OIL"; - case GAS: - return "GAS"; - case WATER: - return "WATER"; - default: - throw std::invalid_argument("unhandled enum value"); - } - } - - PhaseEnum PhaseEnumFromString( const std::string& stringValue ) { - - if (stringValue == "OIL") - return OIL; - else if (stringValue == "WATER") - return WATER; - else if (stringValue == "WAT") - return WATER; - else if (stringValue == "GAS") - return GAS; - else - throw std::invalid_argument("Unknown enum state string: " + stringValue ); - } - } - - /*****************************************************************/ - - namespace WellProducer { - - const std::string ControlMode2String( ControlModeEnum enumValue ) { - switch( enumValue ) { - case ORAT: - return "ORAT"; - case WRAT: - return "WRAT"; - case GRAT: - return "GRAT"; - case LRAT: - return "LRAT"; - case CRAT: - return "CRAT"; - case RESV: - return "RESV"; - case BHP: - return "BHP"; - case THP: - return "THP"; - case GRUP: - return "GRUP"; - default: - throw std::invalid_argument("unhandled enum value"); - } - } - - ControlModeEnum ControlModeFromString( const std::string& stringValue ) { - if (stringValue == "ORAT") - return ORAT; - else if (stringValue == "WRAT") - return WRAT; - else if (stringValue == "GRAT") - return GRAT; - else if (stringValue == "LRAT") - return LRAT; - else if (stringValue == "CRAT") - return CRAT; - else if (stringValue == "RESV") - return RESV; - else if (stringValue == "BHP") - return BHP; - else if (stringValue == "THP") - return THP; - else if (stringValue == "GRUP") - return GRUP; - else if (stringValue == "NONE") - return NONE; - else - throw std::invalid_argument("Unknown enum state string: " + stringValue ); - } - } - - - namespace WellInjector { - - const std::string Type2String( TypeEnum enumValue ) { - switch( enumValue ) { - case OIL: - return "OIL"; - case GAS: - return "GAS"; - case WATER: - return "WATER"; - case MULTI: - return "MULTI"; - default: - throw std::invalid_argument("unhandled enum value"); - } - } - - TypeEnum TypeFromString( const std::string& stringValue ) { - if (stringValue == "OIL") - return OIL; - else if (stringValue == "WATER") - return WATER; - else if (stringValue == "WAT") - return WATER; - else if (stringValue == "GAS") - return GAS; - else if (stringValue == "MULTI") - return MULTI; - else - throw std::invalid_argument("Unknown enum state string: " + stringValue ); - } - - /*****************************************************************/ - - const std::string ControlMode2String( ControlModeEnum enumValue ) { - switch( enumValue ) { - case RESV: - return "RESV"; - case RATE: - return "RATE"; - case BHP: - return "BHP"; - case THP: - return "THP"; - case GRUP: - return "GRUP"; - default: - throw std::invalid_argument("unhandled enum value"); - } - } - - ControlModeEnum ControlModeFromString( const std::string& stringValue ) { - if (stringValue == "RATE") - return RATE; - else if (stringValue == "RESV") - return RESV; - else if (stringValue == "BHP") - return BHP; - else if (stringValue == "THP") - return THP; - else if (stringValue == "GRUP") - return GRUP; - else - throw std::invalid_argument("Unknown enum state string: " + stringValue ); - } - - } - - - namespace WellCommon { - - const std::string Status2String(StatusEnum enumValue) { - switch( enumValue ) { - case OPEN: - return "OPEN"; - case SHUT: - return "SHUT"; - case AUTO: - return "AUTO"; - case STOP: - return "STOP"; - default: - throw std::invalid_argument("unhandled enum value"); - } - } - - - StatusEnum StatusFromString(const std::string& stringValue) { - if (stringValue == "OPEN") - return OPEN; - else if (stringValue == "SHUT") - return SHUT; - else if (stringValue == "STOP") - return STOP; - else if (stringValue == "AUTO") - return AUTO; - else - throw std::invalid_argument("Unknown enum state string: " + stringValue ); - } - - } - - namespace GuideRate { - - const std::string GuideRatePhaseEnum2String( GuideRatePhaseEnum enumValue ) { - switch( enumValue ) { - case OIL: - return "OIL"; - case WAT: - return "WAT"; - case GAS: - return "GAS"; - case LIQ: - return "LIQ"; - case COMB: - return "COMB"; - case WGA: - return "WGA"; - case CVAL: - return "CVAL"; - case RAT: - return "RAT"; - case RES: - return "RES"; - case UNDEFINED: - return "UNDEFINED"; - default: - throw std::invalid_argument("unhandled enum value"); - } - } - - GuideRatePhaseEnum GuideRatePhaseEnumFromString( const std::string& stringValue ) { - - if (stringValue == "OIL") - return OIL; - else if (stringValue == "WAT") - return WAT; - else if (stringValue == "GAS") - return GAS; - else if (stringValue == "LIQ") - return LIQ; - else if (stringValue == "COMB") - return COMB; - else if (stringValue == "WGA") - return WGA; - else if (stringValue == "CVAL") - return CVAL; - else if (stringValue == "RAT") - return RAT; - else if (stringValue == "RES") - return RES; - else if (stringValue == "UNDEFINED") - return UNDEFINED; - else - throw std::invalid_argument("Unknown enum state string: " + stringValue ); - } - } - - namespace RFTConnections { - const std::string RFTEnum2String(RFTEnum enumValue) { - switch (enumValue) { - case YES: - return "YES"; - case REPT: - return "REPT"; - case TIMESTEP: - return "TIMESTEP"; - case FOPN: - return "FOPN"; - case NO: - return "NO"; - default: - throw std::invalid_argument("unhandled enum value"); - } - } - - RFTEnum RFTEnumFromString(const std::string& stringValue) { - - if (stringValue == "YES") - return YES; - else if (stringValue == "REPT") - return REPT; - else if (stringValue == "TIMESTEP") - return TIMESTEP; - else if (stringValue == "FOPN") - return FOPN; - else if (stringValue == "NO") - return NO; - else - throw std::invalid_argument("Unknown enum state string: " + stringValue); - } - - } - namespace PLTConnections { - const std::string PLTEnum2String(PLTEnum enumValue) { - switch (enumValue) { - case YES: - return "YES"; - case REPT: - return "REPT"; - case TIMESTEP: - return "TIMESTEP"; - case NO: - return "NO"; - default: - throw std::invalid_argument("unhandled enum value"); - } - } - - PLTEnum PLTEnumFromString( const std::string& stringValue ){ - if (stringValue == "YES") - return YES; - else if (stringValue == "REPT") - return REPT; - else if (stringValue == "TIMESTEP") - return TIMESTEP; - else if (stringValue == "NO") - return NO; - else - throw std::invalid_argument("Unknown enum state string: " + stringValue ); - } - } - - namespace WellSegment{ - - const std::string LengthDepthEnumToString(LengthDepthEnum enumValue) { - switch (enumValue) { - case INC: - return "INC"; - case ABS: - return "ABS"; - default: - throw std::invalid_argument("unhandled LengthDepthEnum value"); - } - } - - LengthDepthEnum LengthDepthEnumFromString(const std::string& string ) { - if (string == "INC") { - return INC; - } else if (string == "ABS") { - return ABS; - } else { - throw std::invalid_argument("Unknown enum string: " + string + " for LengthDepthEnum"); - } - } - - const std::string CompPressureDropEnumToString(CompPressureDropEnum enumValue) { - switch (enumValue) { - case HFA: - return "HFA"; - case HF_: - return "HF-"; - case H__: - return "H--"; - default: - throw std::invalid_argument("unhandled CompPressureDropEnum value"); - } - } - - CompPressureDropEnum CompPressureDropEnumFromString( const std::string& string ) { - - if (string == "HFA") { - return HFA; - } else if (string == "HF-") { - return HF_; - } else if (string == "H--") { - return H__; - } else { - throw std::invalid_argument("Unknown enum string: " + string + " for CompPressureDropEnum"); - } - } - - const std::string MultiPhaseModelEnumToString(MultiPhaseModelEnum enumValue) { - switch (enumValue) { - case HO: - return "HO"; - case DF: - return "DF"; - default: - throw std::invalid_argument("unhandled MultiPhaseModelEnum value"); - } - } - - MultiPhaseModelEnum MultiPhaseModelEnumFromString(const std::string& string ) { - - if ((string == "HO") || (string == "H0")) { - return HO; - } else if (string == "DF") { - return DF; - } else { - throw std::invalid_argument("Unknown enum string: " + string + " for MultiPhaseModelEnum"); - } - - } - - } - - - - namespace WellEcon { - const std::string WorkoverEnumToString(WorkoverEnum enumValue) { - switch(enumValue) { - case NONE: - return "NONE"; - case CON: - return "CON"; - case CONP: - return "+CON"; - case WELL: - return "WELL"; - case PLUG: - return "PLUG"; - case LAST: - return "LAST"; - case RED: - return "RED"; - default: - throw std::invalid_argument("unhandled WorkoverEnum value"); - } - } - - WorkoverEnum WorkoverEnumFromString( const std::string& string ) { - - if (string == "NONE") { - return NONE; - } else if (string == "CON") { - return CON; - } else if (string == "+CON") { - return CONP; - } else if (string == "WELL") { - return WELL; - } else if (string == "PLUG") { - return PLUG; - } else if (string == "LAST") { - return LAST; - } else if (string == "RED") { - return RED; - } else { - throw std::invalid_argument("Unknown enum string: " + string + " for WorkoverEnum"); - } - } - - const std::string QuantityLimitEnumToString(QuantityLimitEnum enumValue) { - switch(enumValue) { - case RATE: - return "RATE"; - case POTN: - return "POTN"; - default: - throw std::invalid_argument("unhandled QuantityLimitvalue"); - } - } - - QuantityLimitEnum QuantityLimitEnumFromString(const std::string& string ) { - if (string == "RATE") { - return RATE; - } else if (string == "POTN") { - return POTN; - } else { - throw std::invalid_argument("Unknown enum string: " + string + " for QuantityLimitEnum"); - } - } - - - } - - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/ScheduleEnums.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/ScheduleEnums.hpp deleted file mode 100644 index 583655bb27..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/ScheduleEnums.hpp +++ /dev/null @@ -1,305 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef SCHEDULE_ENUMS_H -#define SCHEDULE_ENUMS_H - -#include - -namespace Opm { - namespace WellCommon { - - enum StatusEnum { - OPEN = 1, - STOP = 2, - SHUT = 3, - AUTO = 4 - }; - - const std::string Status2String(StatusEnum enumValue); - StatusEnum StatusFromString(const std::string& stringValue); - } - - namespace WellCompletion { - - enum StateEnum { - OPEN = 1, - SHUT = 2, - AUTO = 3 - }; - - - enum DirectionEnum { - X = 1, - Y = 2, - Z = 3 - }; - - - enum CompletionOrderEnum{ - DEPTH, - INPUT, - TRACK - }; - - std::string DirectionEnum2String(const DirectionEnum enumValue); - DirectionEnum DirectionEnumFromString(const std::string& stringValue); - - const std::string StateEnum2String( StateEnum enumValue ); - StateEnum StateEnumFromString( const std::string& stringValue ); - - const std::string CompletionOrderEnum2String( CompletionOrderEnum enumValue ); - CompletionOrderEnum CompletionOrderEnumFromString(const std::string& comporderStringValue); - - } - - - namespace Phase { - enum PhaseEnum { - OIL = 1, - GAS = 2, - WATER = 4 - }; - - const std::string PhaseEnum2String( PhaseEnum enumValue ); - PhaseEnum PhaseEnumFromString( const std::string& stringValue ); - } - - - - namespace WellInjector { - enum TypeEnum { - WATER = 1, - GAS = 2, - OIL = 3, - MULTI = 4 - }; - - - enum ControlModeEnum { - RATE = 1 , - RESV = 2 , - BHP = 4 , - THP = 8 , - GRUP = 16 , - CMODE_UNDEFINED = 512 - }; - /* - The elements in this enum are used as bitmasks to keep track - of which controls are present, i.e. the 2^n structure must - be intact. - */ - - - - const std::string ControlMode2String( ControlModeEnum enumValue ); - ControlModeEnum ControlModeFromString( const std::string& stringValue ); - - const std::string Type2String( TypeEnum enumValue ); - TypeEnum TypeFromString( const std::string& stringValue ); - } - - - namespace WellProducer { - - enum ControlModeEnum { - NONE = 0, - ORAT = 1, - WRAT = 2, - GRAT = 4, - LRAT = 8, - CRAT = 16, - RESV = 32, - BHP = 64, - THP = 128, - GRUP = 256, - CMODE_UNDEFINED = 1024 - }; - - /* - The items BHP, THP and GRUP only apply in prediction mode: - WCONPROD. The elements in this enum are used as bitmasks to - keep track of which controls are present, i.e. the 2^n - structure must be intact.The NONE item is only used in WHISTCTL - to cancel its effect. - - The properties are initialized with the CMODE_UNDEFINED - value, but the undefined value is never assigned apart from - that; and it is not part of the string conversion routines. - */ - - - const std::string ControlMode2String( ControlModeEnum enumValue ); - ControlModeEnum ControlModeFromString( const std::string& stringValue ); - } - - - namespace GroupInjection { - - enum ControlEnum { - NONE = 0, - RATE = 1, - RESV = 2, - REIN = 3, - VREP = 4, - FLD = 5 - }; - - const std::string ControlEnum2String( ControlEnum enumValue ); - ControlEnum ControlEnumFromString( const std::string& stringValue ); - } - - - namespace GroupProductionExceedLimit { - enum ActionEnum { - NONE = 0, - CON = 1, - CON_PLUS = 2, // String: "+CON" - WELL = 3, - PLUG = 4, - RATE = 5 - }; - - const std::string ActionEnum2String( ActionEnum enumValue ); - ActionEnum ActionEnumFromString( const std::string& stringValue ); - } - - - - namespace GroupProduction { - - enum ControlEnum { - NONE = 0, - ORAT = 1, - WRAT = 2, - GRAT = 3, - LRAT = 4, - CRAT = 5, - RESV = 6, - PRBL = 7, - FLD = 8 - }; - - const std::string ControlEnum2String( GroupProduction::ControlEnum enumValue ); - GroupProduction::ControlEnum ControlEnumFromString( const std::string& stringValue ); - } - - namespace GuideRate { - enum GuideRatePhaseEnum { - OIL = 0, - WAT = 1, - GAS = 2, - LIQ = 3, - COMB = 4, - WGA = 5, - CVAL = 6, - RAT = 7, - RES = 8, - UNDEFINED = 9 - }; - const std::string GuideRatePhaseEnum2String( GuideRatePhaseEnum enumValue ); - GuideRatePhaseEnum GuideRatePhaseEnumFromString( const std::string& stringValue ); - } - - namespace RFTConnections { - enum RFTEnum { - YES = 1, - REPT = 2, - TIMESTEP = 3, - FOPN = 4, - NO = 5 - }; - - const std::string RFTEnum2String(RFTEnum enumValue); - - RFTEnum RFTEnumFromString(const std::string &stringValue); - } - namespace PLTConnections{ - enum PLTEnum{ - YES = 1, - REPT = 2, - TIMESTEP = 3, - NO = 4 - }; - const std::string PLTEnum2String( PLTEnum enumValue); - PLTEnum PLTEnumFromString( const std::string& stringValue); - } - - enum OilVaporizationEnum{ - UNDEF = 0, - VAPPARS = 1, - DRSDT = 2, - DRVDT = 3 - }; - - - namespace WellSegment{ - - enum LengthDepthEnum { - INC = 0, - ABS = 1 - }; - const std::string LengthDepthEnumToString(LengthDepthEnum enumValue); - LengthDepthEnum LengthDepthEnumFromString(const std::string& stringValue); - - enum CompPressureDropEnum { - HFA = 0, - HF_ = 1, - H__ = 2 - }; - const std::string CompPressureDropEnumToString(CompPressureDropEnum enumValue); - CompPressureDropEnum CompPressureDropEnumFromString(const std::string& stringValue); - - enum MultiPhaseModelEnum { - HO = 0, - DF = 1 - }; - const std::string MultiPhaseModelEnumToString(MultiPhaseModelEnum enumValue); - MultiPhaseModelEnum MultiPhaseModelEnumFromString(const std::string& stringValue); - - } - - - namespace WellEcon { - enum WorkoverEnum { - NONE = 0, - CON = 1, // CON - CONP = 2, // +CON - WELL = 3, - PLUG = 4, - // the following two only related to workover action - // on exceeding secondary water cut limit - LAST = 5, - RED = 6 - }; - const std::string WorkoverEnumToString(WorkoverEnum enumValue); - WorkoverEnum WorkoverEnumFromString(const std::string& stringValue); - - enum QuantityLimitEnum { - RATE = 0, - POTN = 1 - }; - const std::string QuantityLimitEnumToString(QuantityLimitEnum enumValue); - QuantityLimitEnum QuantityLimitEnumFromString(const std::string& stringValue); - } - - -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/TimeMap.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/TimeMap.cpp deleted file mode 100644 index 057b3bc008..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/TimeMap.cpp +++ /dev/null @@ -1,335 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include - -#include -#include -#include -#include -#include - - -namespace Opm { - TimeMap::TimeMap(boost::posix_time::ptime startDate) { - if (startDate.is_not_a_date_time()) - throw std::invalid_argument("Input argument not properly initialized."); - - m_timeList.push_back( boost::posix_time::ptime(startDate) ); - } - - TimeMap::TimeMap(Opm::DeckConstPtr deck) : TimeMap( *deck ) {} - - TimeMap::TimeMap( const Deck& deck) { - // The default start date is not specified in the Eclipse - // reference manual. We hence just assume it is same as for - // the START keyword for Eclipse R100, i.e., January 1st, - // 1983... - boost::posix_time::ptime startTime(boost::gregorian::date(1983, 1, 1)); - - // use the 'START' keyword to find out the start date (if the - // keyword was specified) - if (deck.hasKeyword("START")) { - const auto& keyword = deck.getKeyword("START"); - startTime = timeFromEclipse(keyword.getRecord(0)); - } - - m_timeList.push_back( startTime ); - - // find all "TSTEP" and "DATES" keywords in the deck and deal - // with them one after another - for( const auto& keyword : deck ) { - // We're only interested in "TSTEP" and "DATES" keywords, - // so we ignore everything else here... - if (keyword.name() != "TSTEP" && - keyword.name() != "DATES") - { - continue; - } - - if (keyword.name() == "TSTEP") - addFromTSTEPKeyword(keyword); - else if (keyword.name() == "DATES") - addFromDATESKeyword(keyword); - } - } - - size_t TimeMap::numTimesteps() const { - return m_timeList.size() - 1; - } - - - boost::posix_time::ptime TimeMap::getStartTime(size_t tStepIdx) const { - return m_timeList[tStepIdx]; - } - - boost::posix_time::ptime TimeMap::getEndTime() const { - return m_timeList.back(); - } - - double TimeMap::getTotalTime() const - { - if (m_timeList.size() < 2) - return 0.0; - boost::posix_time::time_duration deltaT = m_timeList.back() - m_timeList.front(); - return static_cast(deltaT.total_milliseconds())/1000.0; - } - - - void TimeMap::addTime(boost::posix_time::ptime newTime) { - boost::posix_time::ptime lastTime = m_timeList.back(); - size_t step = m_timeList.size(); - if (newTime > lastTime) { - boost::gregorian::date new_date = newTime.date(); - boost::gregorian::date prev_date = lastTime.date(); - - if (new_date.month() != prev_date.month()) - m_first_timestep_months.push_back(step); - - if (new_date.year() != prev_date.year()) - m_first_timestep_years.push_back( step ); - - m_timeList.push_back( newTime ); - } else - throw std::invalid_argument("Times added must be in strictly increasing order."); - } - - - void TimeMap::addTStep(boost::posix_time::time_duration step) { - boost::posix_time::ptime newTime = m_timeList.back() + step; - addTime(newTime); - } - - - size_t TimeMap::size() const { - return m_timeList.size(); - } - - size_t TimeMap::last() const { - return this->numTimesteps(); - } - - const std::map& TimeMap::eclipseMonthNames() { - static std::map monthNames; - - if (monthNames.size() == 0) { - monthNames.insert( std::make_pair( "JAN" , boost::gregorian::Jan )); - monthNames.insert( std::make_pair( "FEB" , boost::gregorian::Feb )); - monthNames.insert( std::make_pair( "MAR" , boost::gregorian::Mar )); - monthNames.insert( std::make_pair( "APR" , boost::gregorian::Apr )); - monthNames.insert( std::make_pair( "MAI" , boost::gregorian::May )); - monthNames.insert( std::make_pair( "MAY" , boost::gregorian::May )); - monthNames.insert( std::make_pair( "JUN" , boost::gregorian::Jun )); - monthNames.insert( std::make_pair( "JUL" , boost::gregorian::Jul )); - monthNames.insert( std::make_pair( "JLY" , boost::gregorian::Jul )); - monthNames.insert( std::make_pair( "AUG" , boost::gregorian::Aug )); - monthNames.insert( std::make_pair( "SEP" , boost::gregorian::Sep )); - monthNames.insert( std::make_pair( "OCT" , boost::gregorian::Oct )); - monthNames.insert( std::make_pair( "OKT" , boost::gregorian::Oct )); - monthNames.insert( std::make_pair( "NOV" , boost::gregorian::Nov )); - monthNames.insert( std::make_pair( "DEC" , boost::gregorian::Dec )); - monthNames.insert( std::make_pair( "DES" , boost::gregorian::Dec )); - } - - return monthNames; - } - - boost::posix_time::ptime TimeMap::timeFromEclipse(int day, - const std::string& eclipseMonthName, - int year, - const std::string& eclipseTimeString) { - boost::gregorian::greg_month month = eclipseMonthNames().at( eclipseMonthName ); - boost::gregorian::date date( year , month , day ); - boost::posix_time::time_duration dayTime = dayTimeFromEclipse(eclipseTimeString); - return boost::posix_time::ptime(date, dayTime); - } - - boost::posix_time::time_duration TimeMap::dayTimeFromEclipse(const std::string& eclipseTimeString) { - return boost::posix_time::duration_from_string(eclipseTimeString); - } - - boost::posix_time::ptime TimeMap::timeFromEclipse( const DeckRecord& dateRecord ) { - static const std::string errorMsg("The datarecord must consist of the for values " - "\"DAY(int), MONTH(string), YEAR(int), TIME(string)\".\n"); - if (dateRecord.size() != 4) { - throw std::invalid_argument( errorMsg); - } - - const auto& dayItem = dateRecord.getItem( 0 ); - const auto& monthItem = dateRecord.getItem( 1 ); - const auto& yearItem = dateRecord.getItem( 2 ); - const auto& timeItem = dateRecord.getItem( 3 ); - - try { - int day = dayItem.get< int >(0); - const std::string& month = monthItem.get< std::string >(0); - int year = yearItem.get< int >(0); - std::string eclipseTimeString = timeItem.get< std::string >(0); - - return TimeMap::timeFromEclipse(day, month, year, eclipseTimeString); - } catch (...) { - throw std::invalid_argument( errorMsg ); - } - } - - void TimeMap::addFromDATESKeyword( const DeckKeyword& DATESKeyword ) { - if (DATESKeyword.name() != "DATES") - throw std::invalid_argument("Method requires DATES keyword input."); - - for (size_t recordIndex = 0; recordIndex < DATESKeyword.size(); recordIndex++) { - const auto& record = DATESKeyword.getRecord( recordIndex ); - boost::posix_time::ptime nextTime = TimeMap::timeFromEclipse( record ); - addTime( nextTime ); - } - } - - void TimeMap::addFromTSTEPKeyword( const DeckKeyword& TSTEPKeyword ) { - if (TSTEPKeyword.name() != "TSTEP") - throw std::invalid_argument("Method requires TSTEP keyword input."); - { - const auto& item = TSTEPKeyword.getRecord( 0 ).getItem( 0 ); - - for (size_t itemIndex = 0; itemIndex < item.size(); itemIndex++) { - double days = item.get< double >( itemIndex ); - long int wholeSeconds = static_cast(days * 24*60*60); - long int milliSeconds = static_cast((days * 24*60*60 - wholeSeconds)*1000); - boost::posix_time::time_duration step = - boost::posix_time::seconds(wholeSeconds) + - boost::posix_time::milliseconds(milliSeconds); - addTStep( step ); - } - } - } - - double TimeMap::getTimeStepLength(size_t tStepIdx) const - { - assert(tStepIdx < numTimesteps()); - const boost::posix_time::ptime &t1 - = m_timeList[tStepIdx]; - const boost::posix_time::ptime &t2 - = m_timeList[tStepIdx + 1]; - const boost::posix_time::time_duration &deltaT - = t2 - t1; - return static_cast(deltaT.total_milliseconds())/1000.0; - } - - double TimeMap::getTimePassedUntil(size_t tLevelIdx) const - { - assert(tLevelIdx < m_timeList.size()); - const boost::posix_time::ptime &t1 - = m_timeList.front(); - const boost::posix_time::ptime &t2 - = m_timeList[tLevelIdx]; - const boost::posix_time::time_duration &deltaT - = t2 - t1; - return static_cast(deltaT.total_milliseconds())/1000.0; - } - - - - - bool TimeMap::isTimestepInFirstOfMonthsYearsSequence(size_t timestep, bool years, size_t start_timestep, size_t frequency) const { - bool timestep_first_of_month_year = false; - const std::vector& timesteps = (years) ? getFirstTimestepYears() : getFirstTimestepMonths(); - - std::vector::const_iterator ci_timestep = std::find(timesteps.begin(), timesteps.end(), timestep); - if (ci_timestep != timesteps.end()) { - if (1 >= frequency) { - timestep_first_of_month_year = true; - } else { //Frequency given - timestep_first_of_month_year = isTimestepInFreqSequence(timestep, start_timestep, frequency, years); - } - } - return timestep_first_of_month_year; - } - - - // This method returns true for every n'th timestep in the vector of timesteps m_first_timestep_years or m_first_timestep_months, - // starting from one before the position of start_timestep. If the given start_timestep is not a value in the month or year vector, - // set the first timestep that are both within the vector and higher than the initial start_timestep as new start_timestep. - - bool TimeMap::isTimestepInFreqSequence (size_t timestep, size_t start_timestep, size_t frequency, bool years) const { - bool timestep_right_frequency = false; - const std::vector& timesteps = (years) ? getFirstTimestepYears() : getFirstTimestepMonths(); - - std::vector::const_iterator ci_timestep = std::find(timesteps.begin(), timesteps.end(), timestep); - std::vector::const_iterator ci_start_timestep = std::find(timesteps.begin(), timesteps.end(), start_timestep); - - //Find new start_timestep if the given one is not a value in the timesteps vector - bool start_ts_in_timesteps = false; - if (ci_start_timestep != timesteps.end()) { - start_ts_in_timesteps = true; - } else if (ci_start_timestep == timesteps.end()) { - size_t new_start = closest(timesteps, start_timestep); - if (0 != new_start) { - ci_start_timestep = std::find(timesteps.begin(), timesteps.end(), new_start); - start_ts_in_timesteps = true; - } - } - - - if (start_ts_in_timesteps) { - //Pick every n'th element, starting on start_timestep + (n-1), that is, every n'th element from ci_start_timestep - 1 for freq n > 1 - if (ci_timestep >= ci_start_timestep) { - int dist = std::distance( ci_start_timestep, ci_timestep ) + 1; - if ((dist % frequency) == 0) { - timestep_right_frequency = true; - } - } - } - - return timestep_right_frequency; - } - - - - - - const std::vector& TimeMap::getFirstTimestepMonths() const { - return m_first_timestep_months; - } - - - const std::vector& TimeMap::getFirstTimestepYears() const { - return m_first_timestep_years; - } - - // vec is assumed to be sorted - size_t TimeMap::closest(const std::vector & vec, size_t value) const - { - std::vector::const_iterator ci = - std::lower_bound(vec.begin(), vec.end(), value); - if (ci != vec.end()) { - return *ci; - } - return 0; - } - - - const boost::posix_time::ptime& TimeMap::operator[] (size_t index) const { - if (index < m_timeList.size()) - return m_timeList[index]; - else - throw std::invalid_argument("Index out of range"); - } - - -} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp deleted file mode 100644 index 59a9f33b6f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp +++ /dev/null @@ -1,84 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - - -#ifndef TIMEMAP_HPP_ -#define TIMEMAP_HPP_ - -#include - -#include - -namespace Opm { - - class Deck; - class DeckKeyword; - class DeckRecord; - - class TimeMap { - public: - explicit TimeMap(boost::posix_time::ptime startDate); - explicit TimeMap(std::shared_ptr< const Deck > deck); - explicit TimeMap( const Deck& deck); - - void addTime(boost::posix_time::ptime newTime); - void addTStep(boost::posix_time::time_duration step); - void addFromDATESKeyword( const DeckKeyword& DATESKeyword ); - void addFromTSTEPKeyword( const DeckKeyword& TSTEPKeyword ); - size_t size() const; - size_t last() const; - size_t numTimesteps() const; - double getTotalTime() const; - const boost::posix_time::ptime& operator[] (size_t index) const; - /// Return the date and time where a given time step starts. - boost::posix_time::ptime getStartTime(size_t tStepIdx) const; - boost::posix_time::ptime getEndTime() const; - /// Return the period of time in seconds which passed between the start of the simulation and a given point in time. - double getTimePassedUntil(size_t tLevelIdx) const; - /// Return the length of a given time step in seconds. - double getTimeStepLength(size_t tStepIdx) const; - - /// Return true if the given timestep is the first one of a new month or year, or if frequency > 1, - /// return true for every n'th timestep of every first new month or first new year timesteps, - /// starting from start_timestep-1. - bool isTimestepInFirstOfMonthsYearsSequence(size_t timestep, bool years = true, size_t start_timestep = 1, size_t frequency = 1) const; - - static boost::posix_time::ptime timeFromEclipse( const DeckRecord& dateRecord); - static boost::posix_time::ptime timeFromEclipse(int day , const std::string& month, int year, const std::string& eclipseTimeString = "00:00:00.000"); - static boost::posix_time::time_duration dayTimeFromEclipse(const std::string& eclipseTimeString); - private: - static const std::map& eclipseMonthNames(); - - std::vector m_timeList; - - const std::vector& getFirstTimestepMonths() const; - const std::vector& getFirstTimestepYears() const; - bool isTimestepInFreqSequence (size_t timestep, size_t start_timestep, size_t frequency, bool years) const; - size_t closest(const std::vector & vec, size_t value) const; - - std::vector m_first_timestep_years; // A list of the first timestep of every year - std::vector m_first_timestep_months; // A list of the first timestep of every month - }; - typedef std::shared_ptr TimeMapPtr; - typedef std::shared_ptr TimeMapConstPtr; -} - - - -#endif /* TIMEMAP_HPP_ */ diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Tuning.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Tuning.cpp deleted file mode 100644 index b2f2ba11a5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Tuning.cpp +++ /dev/null @@ -1,287 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - -#include -#include -#include -#include - -namespace Opm { - - Tuning::Tuning(TimeMapConstPtr timemap): - /* Hardcoding default values to support getting defaults before any TUNING keyword has occured */ - m_TSINIT( new DynamicState(timemap, 1.0 * Metric::Time)), - m_TSMAXZ( new DynamicState(timemap, 365.0 * Metric::Time)), - m_TSMINZ( new DynamicState(timemap, 0.1 * Metric::Time)), - m_TSMCHP( new DynamicState(timemap, 0.15 * Metric::Time)), - m_TSFMAX( new DynamicState(timemap, 3.0)), - m_TSFMIN( new DynamicState(timemap, 0.3)), - m_TSFCNV( new DynamicState(timemap, 0.1)), - m_TFDIFF( new DynamicState(timemap, 1.25)), - m_THRUPT( new DynamicState(timemap, 1.0E20)), - m_TMAXWC( new DynamicState(timemap, 0.0 * Metric::Time)), - m_TMAXWC_has_value( new DynamicState(timemap, false)), - m_TRGTTE( new DynamicState(timemap, 0.1)), - m_TRGCNV( new DynamicState(timemap, 0.001)), - m_TRGMBE( new DynamicState(timemap, 1.0E-7)), - m_TRGLCV( new DynamicState(timemap, 0.0001)), - m_XXXTTE( new DynamicState(timemap, 10.0)), - m_XXXCNV( new DynamicState(timemap, 0.01)), - m_XXXMBE( new DynamicState(timemap, 1.0E-6)), - m_XXXLCV( new DynamicState(timemap, 0.001)), - m_XXXWFL( new DynamicState(timemap, 0.001)), - m_TRGFIP( new DynamicState(timemap, 0.025)), - m_TRGSFT( new DynamicState(timemap, 0.0)), - m_TRGSFT_has_value( new DynamicState(timemap, false)), - m_THIONX( new DynamicState(timemap, 0.01)), - m_TRWGHT( new DynamicState(timemap, 1)), - m_NEWTMX( new DynamicState(timemap, 12)), - m_NEWTMN( new DynamicState(timemap, 1)), - m_LITMAX( new DynamicState(timemap, 25)), - m_LITMIN( new DynamicState(timemap, 1)), - m_MXWSIT( new DynamicState(timemap, 8)), - m_MXWPIT( new DynamicState(timemap, 8)), - m_DDPLIM( new DynamicState(timemap, 1.0E6 * Metric::Pressure)), - m_DDSLIM( new DynamicState(timemap, 1.0E6)), - m_TRGDPR( new DynamicState(timemap, 1.0E6 * Metric::Pressure)), - m_XXXDPR( new DynamicState(timemap, 0.0 * Metric::Pressure)), - m_XXXDPR_has_value( new DynamicState(timemap, false)) - { - } - - - void Tuning::getTuningItemValue(const std::string& tuningItem, size_t timestep, double& value) { - if(m_ResetValue.find(tuningItem)!= m_ResetValue.end()){ - timestep = 0; - } - - /*The following code diverges from coding standard to improve readabillity*/ - if ("TSINIT" == tuningItem) { value = m_TSINIT->get(timestep); } //RECORD 1 - else if ("TSMAXZ" == tuningItem) { value = m_TSMAXZ->get(timestep); } - else if ("TSMINZ" == tuningItem) { value = m_TSMINZ->get(timestep); } - else if ("TSMCHP" == tuningItem) { value = m_TSMCHP->get(timestep); } - else if ("TSFMAX" == tuningItem) { value = m_TSFMAX->get(timestep); } - else if ("TSFMIN" == tuningItem) { value = m_TSFMIN->get(timestep); } - else if ("TSFCNV" == tuningItem) { value = m_TSFCNV->get(timestep); } - else if ("TFDIFF" == tuningItem) { value = m_TFDIFF->get(timestep); } - else if ("THRUPT" == tuningItem) { value = m_THRUPT->get(timestep); } - else if ("TMAXWC" == tuningItem) { value = m_TMAXWC->get(timestep); } - - else if ("TRGTTE" == tuningItem) { value = m_TRGTTE->get(timestep); } //RECORD 2 - else if ("TRGCNV" == tuningItem) { value = m_TRGCNV->get(timestep); } - else if ("TRGMBE" == tuningItem) { value = m_TRGMBE->get(timestep); } - else if ("TRGLCV" == tuningItem) { value = m_TRGLCV->get(timestep); } - else if ("XXXTTE" == tuningItem) { value = m_XXXTTE->get(timestep); } - else if ("XXXCNV" == tuningItem) { value = m_XXXCNV->get(timestep); } - else if ("XXXMBE" == tuningItem) { value = m_XXXMBE->get(timestep); } - else if ("XXXLCV" == tuningItem) { value = m_XXXLCV->get(timestep); } - else if ("XXXWFL" == tuningItem) { value = m_XXXWFL->get(timestep); } - else if ("TRGFIP" == tuningItem) { value = m_TRGFIP->get(timestep); } - else if ("TRGSFT" == tuningItem) { value = m_TRGSFT->get(timestep); } - else if ("THIONX" == tuningItem) { value = m_THIONX->get(timestep); } - - else if ("DDPLIM" == tuningItem) { value = m_DDPLIM->get(timestep); } //RECORD 3 - else if ("DDSLIM" == tuningItem) { value = m_DDSLIM->get(timestep); } - else if ("TRGDPR" == tuningItem) { value = m_TRGDPR->get(timestep); } - else if ("XXXDPR" == tuningItem) { value = m_XXXDPR->get(timestep); } - - else { - throw std::invalid_argument("Method getTuningItemValue(): The TUNING keyword item: " + tuningItem + " was not recognized or has wrong type"); - } - } - - void Tuning::getTuningItemValue(const std::string& tuningItem, size_t timestep, int& value) { - - /*The following code diverges from coding standard to improve readabillity*/ - if ("TRWGHT" == tuningItem) { value = m_TRWGHT->get(timestep); } //RECORD 2 - - else if ("NEWTMX" == tuningItem) { value = m_NEWTMX->get(timestep); } //RECORD 3 - else if ("NEWTMN" == tuningItem) { value = m_NEWTMN->get(timestep); } - else if ("LITMAX" == tuningItem) { value = m_LITMAX->get(timestep); } - else if ("LITMIN" == tuningItem) { value = m_LITMIN->get(timestep); } - else if ("MXWSIT" == tuningItem) { value = m_MXWSIT->get(timestep); } - else if ("MXWPIT" == tuningItem) { value = m_MXWPIT->get(timestep); } - - else { - throw std::invalid_argument("Method getTuningItemValue(): The TUNING keyword item: " + tuningItem + " was not recognized or has wrong type"); - } - } - - void Tuning::setTuningInitialValue(const std::string tuningItem, double value, bool resetVector) { - /*The following code diverges from coding standard to improve readabillity*/ - if ("TSINIT" == tuningItem) { m_TSINIT->updateInitial(value); } //RECORD 1 - else if ("TSMAXZ" == tuningItem) { m_TSMAXZ->updateInitial(value); } - else if ("TSMINZ" == tuningItem) { m_TSMINZ->updateInitial(value); } - else if ("TSMCHP" == tuningItem) { m_TSMCHP->updateInitial(value); } - else if ("TSFMAX" == tuningItem) { m_TSFMAX->updateInitial(value); } - else if ("TSFMIN" == tuningItem) { m_TSFMIN->updateInitial(value); } - else if ("TSFCNV" == tuningItem) { m_TSFCNV->updateInitial(value); } - else if ("TFDIFF" == tuningItem) { m_TFDIFF->updateInitial(value); } - else if ("THRUPT" == tuningItem) { m_THRUPT->updateInitial(value); } - else if ("TMAXWC" == tuningItem) { m_TMAXWC->updateInitial(value); } - - else if ("TRGTTE" == tuningItem) { m_TRGTTE->updateInitial(value); } //RECORD 2 - else if ("TRGCNV" == tuningItem) { m_TRGCNV->updateInitial(value); } - else if ("TRGMBE" == tuningItem) { m_TRGMBE->updateInitial(value); } - else if ("TRGLCV" == tuningItem) { m_TRGLCV->updateInitial(value); } - else if ("XXXTTE" == tuningItem) { m_XXXTTE->updateInitial(value); } - else if ("XXXCNV" == tuningItem) { m_XXXCNV->updateInitial(value); } - else if ("XXXMBE" == tuningItem) { m_XXXMBE->updateInitial(value); } - else if ("XXXLCV" == tuningItem) { m_XXXLCV->updateInitial(value); } - else if ("XXXWFL" == tuningItem) { m_XXXWFL->updateInitial(value); } - else if ("TRGFIP" == tuningItem) { m_TRGFIP->updateInitial(value); } - else if ("TRGSFT" == tuningItem) { m_TRGSFT->updateInitial(value); } - else if ("THIONX" == tuningItem) { m_THIONX->updateInitial(value); } - - else if ("DDPLIM" == tuningItem) { m_DDPLIM->updateInitial(value); } //RECORD 3 - else if ("DDSLIM" == tuningItem) { m_DDSLIM->updateInitial(value); } - else if ("TRGDPR" == tuningItem) { m_TRGDPR->updateInitial(value); } - else if ("XXXDPR" == tuningItem) { m_XXXDPR->updateInitial(value); } - - else { - throw std::invalid_argument("Method getTuningItemValue(): The TUNING keyword item: " + tuningItem + " was not recognized or has wrong type"); - } - if(resetVector){ - m_ResetValue[tuningItem]=true; - } - } - - void Tuning::setTuningInitialValue(const std::string tuningItem, int value, bool resetVector) { - /*The following code diverges from coding standard to improve readabillity*/ - if ("TRWGHT" == tuningItem) { m_TRWGHT->updateInitial(value); } //RECORD 2 - - else if ("NEWTMX" == tuningItem) { m_NEWTMX->updateInitial(value); } //RECORD 3 - else if ("NEWTMN" == tuningItem) { m_NEWTMN->updateInitial(value); } - else if ("LITMAX" == tuningItem) { m_LITMAX->updateInitial(value); } - else if ("LITMIN" == tuningItem) { m_LITMIN->updateInitial(value); } - else if ("MXWSIT" == tuningItem) { m_MXWSIT->updateInitial(value); } - else if ("MXWPIT" == tuningItem) { m_MXWPIT->updateInitial(value); } - - else { - throw std::invalid_argument("Method getTuningItemValue(): The TUNING keyword item: " + tuningItem + " was not recognized or has wrong type"); - } - if(resetVector){ - m_ResetValue[tuningItem]=true; - } - } - - double Tuning::getDoubleValue(const std::string tuningItem, std::shared_ptr> values, size_t timestep) const{ - if(m_ResetValue.find(tuningItem)!= m_ResetValue.end()){ - timestep = 0; - } - return values->get(timestep); - } - - int Tuning::getIntValue(const std::string tuningItem, std::shared_ptr> values, size_t timestep) const{ - if(m_ResetValue.find(tuningItem)!= m_ResetValue.end()){ - timestep = 0; - } - return values->get(timestep); - } - - bool Tuning::getBoolValue(const std::string tuningItem, std::shared_ptr> values, size_t timestep) const{ - if(m_ResetValue.find(tuningItem)!= m_ResetValue.end()){ - timestep = 0; - } - return bool( values->get(timestep) ); - } - - - - /*The following "get" method declarations diverges from coding standard to improve readability*/ - double Tuning::getTSINIT(size_t timestep) const { return getDoubleValue("TSINIT",m_TSINIT, timestep); } - double Tuning::getTSMAXZ(size_t timestep) const { return getDoubleValue("TSMAXZ",m_TSMAXZ, timestep); } - double Tuning::getTSMINZ(size_t timestep) const { return getDoubleValue("TSMINZ",m_TSMINZ, timestep); } - double Tuning::getTSMCHP(size_t timestep) const { return getDoubleValue("TSMCHP",m_TSMCHP, timestep); } - double Tuning::getTSFMAX(size_t timestep) const { return getDoubleValue("TSFMAX",m_TSFMAX, timestep); } - double Tuning::getTSFMIN(size_t timestep) const { return getDoubleValue("TSFMIN",m_TSFMIN, timestep); } - double Tuning::getTSFCNV(size_t timestep) const { return getDoubleValue("TSFCNV",m_TSFCNV, timestep); } - double Tuning::getTFDIFF(size_t timestep) const { return getDoubleValue("TFDIFF",m_TFDIFF, timestep); } - double Tuning::getTHRUPT(size_t timestep) const { return getDoubleValue("THRUPT",m_THRUPT, timestep); } - double Tuning::getTMAXWC(size_t timestep) const { return getDoubleValue("TMAXWC",m_TMAXWC, timestep); } - bool Tuning::getTMAXWChasValue(size_t timestep) const { return getBoolValue("TMAXWC",m_TMAXWC_has_value, timestep); } - double Tuning::getTRGTTE(size_t timestep) const { return getDoubleValue("TRGTTE",m_TRGTTE, timestep); } - double Tuning::getTRGCNV(size_t timestep) const { return getDoubleValue("TRGCNV",m_TRGCNV, timestep); } - double Tuning::getTRGMBE(size_t timestep) const { return getDoubleValue("TRGMBE",m_TRGMBE, timestep); } - double Tuning::getTRGLCV(size_t timestep) const { return getDoubleValue("TRGLCV",m_TRGLCV, timestep); } - double Tuning::getXXXTTE(size_t timestep) const { return getDoubleValue("XXXTTE",m_XXXTTE, timestep); } - double Tuning::getXXXCNV(size_t timestep) const { return getDoubleValue("XXXCNV",m_XXXCNV, timestep); } - double Tuning::getXXXMBE(size_t timestep) const { return getDoubleValue("XXXMBE",m_XXXMBE, timestep); } - double Tuning::getXXXLCV(size_t timestep) const { return getDoubleValue("XXXLCV",m_XXXLCV, timestep); } - double Tuning::getXXXWFL(size_t timestep) const { return getDoubleValue("XXXWFL",m_XXXWFL, timestep); } - double Tuning::getTRGFIP(size_t timestep) const { return getDoubleValue("TRGFIP",m_TRGFIP, timestep); } - double Tuning::getTRGSFT(size_t timestep) const { return getDoubleValue("TRGSFT", m_TRGSFT, timestep); } - bool Tuning::getTRGSFThasValue(size_t timestep) const { return getBoolValue("TRGSFT",m_TRGSFT_has_value, timestep); } - double Tuning::getTHIONX(size_t timestep) const { return getDoubleValue("",m_THIONX, timestep); } - int Tuning::getTRWGHT(size_t timestep) const { return getIntValue("TRWGHT",m_TRWGHT, timestep); } - int Tuning::getNEWTMX(size_t timestep) const { return getIntValue("NEWTMX",m_NEWTMX, timestep); } - int Tuning::getNEWTMN(size_t timestep) const { return getIntValue("NEWTMN",m_NEWTMN, timestep); } - int Tuning::getLITMAX(size_t timestep) const { return getIntValue("LITMAX",m_LITMAX, timestep); } - int Tuning::getLITMIN(size_t timestep) const { return getIntValue("LITMIN",m_LITMIN, timestep); } - int Tuning::getMXWSIT(size_t timestep) const { return getIntValue("MXWSIT",m_MXWSIT, timestep); } - int Tuning::getMXWPIT(size_t timestep) const { return getIntValue("MXWPIT",m_MXWPIT, timestep); } - double Tuning::getDDPLIM(size_t timestep) const { return getDoubleValue("DDPLIM",m_DDPLIM, timestep); } - double Tuning::getDDSLIM(size_t timestep) const { return getDoubleValue("DDSLIM",m_DDSLIM, timestep); } - double Tuning::getTRGDPR(size_t timestep) const { return getDoubleValue("TRGDPR",m_TRGDPR, timestep); } - double Tuning::getXXXDPR(size_t timestep) const { return getDoubleValue("XXXDPR",m_XXXDPR, timestep); } - bool Tuning::getXXXDPRhasValue(size_t timestep) const { return getBoolValue("XXXDPR", m_XXXDPR_has_value, timestep); - } - - /*The following "set" method declarations diverges from coding standard to improve readability*/ - void Tuning::setTSINIT(size_t timestep, double TSINIT) { m_TSINIT->update(timestep, TSINIT); } - void Tuning::setTSMAXZ(size_t timestep, double TSMAXZ) { m_TSMAXZ->update(timestep, TSMAXZ); } - void Tuning::setTSMINZ(size_t timestep, double TSMINZ) { m_TSMINZ->update(timestep, TSMINZ); } - void Tuning::setTSMCHP(size_t timestep, double TSMCHP) { m_TSMCHP->update(timestep, TSMCHP); } - void Tuning::setTSFMAX(size_t timestep, double TSFMAX) { m_TSFMAX->update(timestep, TSFMAX); } - void Tuning::setTSFMIN(size_t timestep, double TSFMIN) { m_TSFMIN->update(timestep, TSFMIN); } - void Tuning::setTSFCNV(size_t timestep, double TSFCNV) { m_TSFCNV->update(timestep, TSFCNV); } - void Tuning::setTFDIFF(size_t timestep, double TFDIFF) { m_TFDIFF->update(timestep, TFDIFF); } - void Tuning::setTHRUPT(size_t timestep, double THRUPT) { m_THRUPT->update(timestep, THRUPT); } - void Tuning::setTMAXWC(size_t timestep, double TMAXWC) { m_TMAXWC->update(timestep, TMAXWC); m_TMAXWC_has_value->update(timestep, true); } - void Tuning::setTRGTTE(size_t timestep, double TRGTTE) { m_TRGTTE->update(timestep, TRGTTE); } - void Tuning::setTRGCNV(size_t timestep, double TRGCNV) { m_TRGCNV->update(timestep, TRGCNV); } - void Tuning::setTRGMBE(size_t timestep, double TRGMBE) { m_TRGMBE->update(timestep, TRGMBE); } - void Tuning::setTRGLCV(size_t timestep, double TRGLCV) { m_TRGLCV->update(timestep, TRGLCV); } - void Tuning::setXXXTTE(size_t timestep, double XXXTTE) { m_XXXTTE->update(timestep, XXXTTE); } - void Tuning::setXXXCNV(size_t timestep, double XXXCNV) { m_XXXCNV->update(timestep, XXXCNV); } - void Tuning::setXXXMBE(size_t timestep, double XXXMBE) { m_XXXMBE->update(timestep, XXXMBE); } - void Tuning::setXXXLCV(size_t timestep, double XXXLCV) { m_XXXLCV->update(timestep, XXXLCV); } - void Tuning::setXXXWFL(size_t timestep, double XXXWFL) { m_XXXWFL->update(timestep, XXXWFL); } - void Tuning::setTRGFIP(size_t timestep, double TRGFIP) { m_TRGFIP->update(timestep, TRGFIP); } - void Tuning::setTRGSFT(size_t timestep, double TRGSFT) { m_TRGSFT->update(timestep, TRGSFT); m_TRGSFT_has_value->update(timestep, true); } - void Tuning::setTHIONX(size_t timestep, double THIONX) { m_THIONX->update(timestep, THIONX); } - void Tuning::setTRWGHT(size_t timestep, int TRWGHT) { m_TRWGHT->update(timestep, TRWGHT); } - void Tuning::setNEWTMX(size_t timestep, int NEWTMX) { m_NEWTMX->update(timestep, NEWTMX); } - void Tuning::setNEWTMN(size_t timestep, int NEWTMN) { m_NEWTMN->update(timestep, NEWTMN); } - void Tuning::setLITMAX(size_t timestep, int LITMAX) { m_LITMAX->update(timestep, LITMAX); } - void Tuning::setLITMIN(size_t timestep, int LITMIN) { m_LITMIN->update(timestep, LITMIN); } - void Tuning::setMXWSIT(size_t timestep, int MXWSIT) { m_MXWSIT->update(timestep, MXWSIT); } - void Tuning::setMXWPIT(size_t timestep, int MXWPIT) { m_MXWPIT->update(timestep, MXWPIT); } - void Tuning::setDDPLIM(size_t timestep, double DDPLIM) { m_DDPLIM->update(timestep, DDPLIM); } - void Tuning::setDDSLIM(size_t timestep, double DDSLIM) { m_DDSLIM->update(timestep, DDSLIM); } - void Tuning::setTRGDPR(size_t timestep, double TRGDPR) { m_TRGDPR->update(timestep, TRGDPR); } - void Tuning::setXXXDPR(size_t timestep, double XXXDPR) { m_XXXDPR->update(timestep, XXXDPR); m_XXXDPR_has_value->update(timestep, true); } - -} //namespace Opm - - - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Tuning.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Tuning.hpp deleted file mode 100644 index 6e162f0884..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Tuning.hpp +++ /dev/null @@ -1,184 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef OPM_TUNING_HPP -#define OPM_TUNING_HPP - -namespace Opm { - - template< typename > class DynamicState; - - class TimeMap; - - class Tuning { - - /* - When the TUNING keyword has occured in the Schedule section and - has been handled by the Schedule::handleTUNING() method, - the value for each TUNING keyword item is either - set from the keyword occurence or a default is set if specified in - the keyword description. Items that do not have a specified default - has got a separate hasValue() method. - - Before any TUNING keyword has occured in the Schedule section, - the different TUNING keyword items has got hardcoded default values - (See Tuning constructor) - Hardcoded values are set as the same as specified in the keyword description, - or 0 if no default is specified in the description. - */ - - public: - Tuning(std::shared_ptr< const TimeMap > timemap); - - void setTuningInitialValue(const std::string tuningItem, double value,bool resetVector); - void setTuningInitialValue(const std::string tuningItem, int value, bool resetVector); - - void getTuningItemValue(const std::string& tuningItem, size_t timestep, double& value); - void getTuningItemValue(const std::string& tuningItem, size_t timestep, int& value); - - - /* Record 1 */ - double getTSINIT(size_t timestep) const; - double getTSMAXZ(size_t timestep) const; - double getTSMINZ(size_t timestep) const; - double getTSMCHP(size_t timestep) const; - double getTSFMAX(size_t timestep) const; - double getTSFMIN(size_t timestep) const; - double getTSFCNV(size_t timestep) const; - double getTFDIFF(size_t timestep) const; - double getTHRUPT(size_t timestep) const; - double getTMAXWC(size_t timestep) const; - bool getTMAXWChasValue(size_t timestep) const; - void setTSINIT(size_t timestep, double TSINIT); - void setTSMAXZ(size_t timestep, double TSMAXZ); - void setTSMINZ(size_t timestep, double TSMINZ); - void setTSMCHP(size_t timestep, double TSMCHP); - void setTSFMAX(size_t timestep, double TSFMAX); - void setTSFMIN(size_t timestep, double TSFMIN); - void setTSFCNV(size_t timestep, double TSFCNV); - void setTFDIFF(size_t timestep, double TFDIFF); - void setTHRUPT(size_t timestep, double THRUPT); - void setTMAXWC(size_t timestep, double TMAXWC); - /* Record 2 */ - double getTRGTTE(size_t timestep) const; - double getTRGCNV(size_t timestep) const; - double getTRGMBE(size_t timestep) const; - double getTRGLCV(size_t timestep) const; - double getXXXTTE(size_t timestep) const; - double getXXXCNV(size_t timestep) const; - double getXXXMBE(size_t timestep) const; - double getXXXLCV(size_t timestep) const; - double getXXXWFL(size_t timestep) const; - double getTRGFIP(size_t timestep) const; - double getTRGSFT(size_t timestep) const; - bool getTRGSFThasValue(size_t timestep) const; - double getTHIONX(size_t timestep) const; - int getTRWGHT(size_t timestep) const; - void setTRGTTE(size_t timestep, double TRGTTE); - void setTRGCNV(size_t timestep, double TRGCNV); - void setTRGMBE(size_t timestep, double TRGMBE); - void setTRGLCV(size_t timestep, double TRGLCV); - void setXXXTTE(size_t timestep, double XXXTTE); - void setXXXCNV(size_t timestep, double XXXCNV); - void setXXXMBE(size_t timestep, double XXXMBE); - void setXXXLCV(size_t timestep, double XXXLCV); - void setXXXWFL(size_t timestep, double XXXWFL); - void setTRGFIP(size_t timestep, double TRGFIP); - void setTRGSFT(size_t timestep, double TRGFIP); - void setTHIONX(size_t timestep, double THIONX); - void setTRWGHT(size_t timestep, int TRWGHT); - /* Record 3 */ - int getNEWTMX(size_t timestep) const; - int getNEWTMN(size_t timestep) const; - int getLITMAX(size_t timestep) const; - int getLITMIN(size_t timestep) const; - int getMXWSIT(size_t timestep) const; - int getMXWPIT(size_t timestep) const; - double getDDPLIM(size_t timestep) const; - double getDDSLIM(size_t timestep) const; - double getTRGDPR(size_t timestep) const; - double getXXXDPR(size_t timestep) const; - bool getXXXDPRhasValue(size_t timestep) const; - void setNEWTMX(size_t timestep, int NEWTMX); - void setNEWTMN(size_t timestep, int NEWTMN); - void setLITMAX(size_t timestep, int LITMAX); - void setLITMIN(size_t timestep, int LITMIN); - void setMXWSIT(size_t timestep, int MXWSIT); - void setMXWPIT(size_t timestep, int MXWPIT); - void setDDPLIM(size_t timestep, double DDPLIM); - void setDDSLIM(size_t timestep, double DDSLIM); - void setTRGDPR(size_t timestep, double TRGDPR); - void setXXXDPR(size_t timestep, double XXXDPR); - - - private: - /* Record1 */ - std::shared_ptr> m_TSINIT; - std::shared_ptr> m_TSMAXZ; - std::shared_ptr> m_TSMINZ; - std::shared_ptr> m_TSMCHP; - std::shared_ptr> m_TSFMAX; - std::shared_ptr> m_TSFMIN; - std::shared_ptr> m_TSFCNV; - std::shared_ptr> m_TFDIFF; - std::shared_ptr> m_THRUPT; - std::shared_ptr> m_TMAXWC; - std::shared_ptr> m_TMAXWC_has_value; - /* Record 2 */ - std::shared_ptr> m_TRGTTE; - std::shared_ptr> m_TRGCNV; - std::shared_ptr> m_TRGMBE; - std::shared_ptr> m_TRGLCV; - std::shared_ptr> m_XXXTTE; - std::shared_ptr> m_XXXCNV; - std::shared_ptr> m_XXXMBE; - std::shared_ptr> m_XXXLCV; - std::shared_ptr> m_XXXWFL; - std::shared_ptr> m_TRGFIP; - std::shared_ptr> m_TRGSFT; - std::shared_ptr> m_TRGSFT_has_value; - std::shared_ptr> m_THIONX; - std::shared_ptr> m_TRWGHT; - /* Record 3 */ - std::shared_ptr> m_NEWTMX; - std::shared_ptr> m_NEWTMN; - std::shared_ptr> m_LITMAX; - std::shared_ptr> m_LITMIN; - std::shared_ptr> m_MXWSIT; - std::shared_ptr> m_MXWPIT; - std::shared_ptr> m_DDPLIM; - std::shared_ptr> m_DDSLIM; - std::shared_ptr> m_TRGDPR; - std::shared_ptr> m_XXXDPR; - std::shared_ptr> m_XXXDPR_has_value; - std::map m_ResetValue; - - double getDoubleValue(const std::string tuningItem, std::shared_ptr> values, size_t timestep) const; - int getIntValue(const std::string tuningItem, std::shared_ptr> values, size_t timestep) const; - bool getBoolValue(const std::string tuningItem, std::shared_ptr> values, size_t timestep) const; - - }; - - - typedef std::shared_ptr TuningPtr; - typedef std::shared_ptr TuningConstPtr; - -} //namespace Opm - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Well.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Well.cpp deleted file mode 100644 index 9cad174478..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Well.cpp +++ /dev/null @@ -1,460 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - - -namespace Opm { - - Well::Well(const std::string& name_, int headI, - int headJ, Value refDepth , Phase::PhaseEnum preferredPhase, - TimeMapConstPtr timeMap, size_t creationTimeStep, - WellCompletion::CompletionOrderEnum completionOrdering, - bool allowCrossFlow, bool automaticShutIn) - : m_status(new DynamicState(timeMap, WellCommon::SHUT)), - m_isAvailableForGroupControl(new DynamicState(timeMap, true)), - m_guideRate(new DynamicState(timeMap, -1.0)), - m_guideRatePhase(new DynamicState(timeMap, GuideRate::UNDEFINED)), - m_guideRateScalingFactor(new DynamicState(timeMap, 1.0)), - m_isProducer(new DynamicState(timeMap, true)) , - m_completions( new DynamicState( timeMap , CompletionSetConstPtr( new CompletionSet()) )), - m_productionProperties( new DynamicState(timeMap, WellProductionProperties() )), - m_injectionProperties( new DynamicState(timeMap, WellInjectionProperties() )), - m_polymerProperties( new DynamicState(timeMap, WellPolymerProperties() )), - m_econproductionlimits( new DynamicState(timeMap, WellEconProductionLimits()) ), - m_solventFraction( new DynamicState(timeMap, 0.0 )), - m_groupName( new DynamicState( timeMap , "" )), - m_rft( new DynamicState(timeMap,false)), - m_plt( new DynamicState(timeMap,false)), - m_timeMap( timeMap ), - m_headI(headI), - m_headJ(headJ), - m_refDepth(refDepth), - m_preferredPhase(preferredPhase), - m_comporder(completionOrdering), - m_allowCrossFlow(allowCrossFlow), - m_automaticShutIn(automaticShutIn), - m_segmentset(new DynamicState(timeMap, SegmentSetPtr(new SegmentSet()))) - { - m_name = name_; - m_creationTimeStep = creationTimeStep; - - - } - - const std::string& Well::name() const { - return m_name; - } - - - void Well::switchToProducer( size_t timeStep) { - WellInjectionProperties p = getInjectionPropertiesCopy(timeStep); - - p.BHPLimit = 0; - p.dropInjectionControl( Opm::WellInjector::BHP ); - setInjectionProperties( timeStep , p ); - } - - - void Well::switchToInjector( size_t timeStep) { - WellProductionProperties p = getProductionPropertiesCopy(timeStep); - - p.BHPLimit = 0; - p.dropProductionControl( Opm::WellProducer::BHP ); - setProductionProperties( timeStep , p ); - } - - - double Well::production_rate( Phase::PhaseEnum phase, size_t timestep ) const { - if( !this->isProducer( timestep ) ) return 0.0; - - const auto& p = this->getProductionProperties( timestep ); - - switch( phase ) { - case Phase::WATER: return p.WaterRate; - case Phase::OIL: return p.OilRate; - case Phase::GAS: return p.GasRate; - } - - throw std::logic_error( "Unreachable state. Invalid PhaseEnum value. " - "This is likely a programming error." ); - } - - double Well::injection_rate( Phase::PhaseEnum phase, size_t timestep ) const { - if( !this->isInjector( timestep ) ) return 0.0; - - const auto& i = this->getInjectionProperties( timestep ); - const auto type = i.injectorType; - - if( phase == Phase::WATER && type != WellInjector::WATER ) return 0.0; - if( phase == Phase::OIL && type != WellInjector::OIL ) return 0.0; - if( phase == Phase::GAS && type != WellInjector::GAS ) return 0.0; - - return i.surfaceInjectionRate; - } - - bool Well::setProductionProperties(size_t timeStep , const WellProductionProperties newProperties) { - if (isInjector(timeStep)) - switchToProducer( timeStep ); - - m_isProducer->update(timeStep , true); - return m_productionProperties->update(timeStep, newProperties); - } - - WellProductionProperties Well::getProductionPropertiesCopy(size_t timeStep) const { - return m_productionProperties->get(timeStep); - } - - const WellProductionProperties& Well::getProductionProperties(size_t timeStep) const { - return m_productionProperties->at(timeStep); - } - - bool Well::setInjectionProperties(size_t timeStep , const WellInjectionProperties newProperties) { - if (isProducer(timeStep)) - switchToInjector( timeStep ); - - m_isProducer->update(timeStep , false); - return m_injectionProperties->update(timeStep, newProperties); - } - - WellInjectionProperties Well::getInjectionPropertiesCopy(size_t timeStep) const { - return m_injectionProperties->get(timeStep); - } - - const WellInjectionProperties& Well::getInjectionProperties(size_t timeStep) const { - return m_injectionProperties->at(timeStep); - } - - bool Well::setPolymerProperties(size_t timeStep , const WellPolymerProperties newProperties) { - m_isProducer->update(timeStep , false); - return m_polymerProperties->update(timeStep, newProperties); - } - - WellPolymerProperties Well::getPolymerPropertiesCopy(size_t timeStep) const { - return m_polymerProperties->get(timeStep); - } - - const WellPolymerProperties& Well::getPolymerProperties(size_t timeStep) const { - return m_polymerProperties->at(timeStep); - } - - bool Well::setSolventFraction(size_t timeStep , const double fraction) { - m_isProducer->update(timeStep , false); - return m_solventFraction->update(timeStep, fraction); - } - - bool Well::setEconProductionLimits(const size_t timeStep, const WellEconProductionLimits& productionlimits) { - // not sure if this keyword turning a well to be producer. - // not sure what will happen if we use this keyword to a injector. - return m_econproductionlimits->update(timeStep, productionlimits); - } - - const WellEconProductionLimits& Well::getEconProductionLimits(const size_t timeStep) const { - return m_econproductionlimits->at(timeStep); - } - - const double& Well::getSolventFraction(size_t timeStep) const { - return m_solventFraction->at(timeStep); - } - - bool Well::hasBeenDefined(size_t timeStep) const { - if (timeStep < m_creationTimeStep) - return false; - else - return true; - } - - WellCommon::StatusEnum Well::getStatus(size_t timeStep) const { - return m_status->get( timeStep ); - } - - bool Well::setStatus(size_t timeStep, WellCommon::StatusEnum status) { - if ((WellCommon::StatusEnum::OPEN == status) && getCompletions(timeStep)->allCompletionsShut()) { - m_messages.note("When handling keyword for well " + name() + ": Cannot open a well where all completions are shut"); - return false; - } else - return m_status->update( timeStep , status ); - } - - const MessageContainer& Well::getMessageContainer() const { - return m_messages; - } - bool Well::isProducer(size_t timeStep) const { - return bool( m_isProducer->get(timeStep) ); - } - - bool Well::isInjector(size_t timeStep) const { - return !bool( isProducer(timeStep) ); - } - - bool Well::isAvailableForGroupControl(size_t timeStep) const { - return m_isAvailableForGroupControl->get(timeStep); - } - - void Well::setAvailableForGroupControl(size_t timeStep, bool isAvailableForGroupControl_) { - m_isAvailableForGroupControl->update(timeStep, isAvailableForGroupControl_); - } - - double Well::getGuideRate(size_t timeStep) const { - return m_guideRate->get(timeStep); - } - - void Well::setGuideRate(size_t timeStep, double guideRate) { - m_guideRate->update(timeStep, guideRate); - } - - GuideRate::GuideRatePhaseEnum Well::getGuideRatePhase(size_t timeStep) const { - return m_guideRatePhase->get(timeStep); - } - - void Well::setGuideRatePhase(size_t timeStep, GuideRate::GuideRatePhaseEnum phase) { - m_guideRatePhase->update(timeStep, phase); - } - - double Well::getGuideRateScalingFactor(size_t timeStep) const { - return m_guideRateScalingFactor->get(timeStep); - } - - void Well::setGuideRateScalingFactor(size_t timeStep, double scalingFactor) { - m_guideRateScalingFactor->update(timeStep, scalingFactor); - } - - /*****************************************************************/ - - // WELSPECS - - int Well::getHeadI() const { - return m_headI; - } - - int Well::getHeadJ() const { - return m_headJ; - } - - - double Well::getRefDepth() const{ - if (!m_refDepth.hasValue()) - setRefDepthFromCompletions(); - - return m_refDepth.getValue(); - } - - - void Well::setRefDepthFromCompletions() const { - size_t timeStep = m_creationTimeStep; - while (true) { - auto completions = getCompletions( timeStep ); - if (completions->size() > 0) { - auto firstCompletion = completions->get(0); - m_refDepth.setValue( firstCompletion->getCenterDepth() ); - break; - } else { - timeStep++; - if (timeStep >= m_timeMap->size()) - throw std::invalid_argument("No completions defined for well: " + name() + " can not infer reference depth"); - } - } - } - - - Phase::PhaseEnum Well::getPreferredPhase() const { - return m_preferredPhase; - } - - CompletionSetConstPtr Well::getCompletions(size_t timeStep) const { - return m_completions->get( timeStep ); - } - - CompletionSetConstPtr Well::getCompletions() const { - return m_completions->back(); - } - - void Well::addCompletions(size_t time_step , const std::vector& newCompletions) { - CompletionSetConstPtr currentCompletionSet = m_completions->get(time_step); - CompletionSetPtr newCompletionSet = CompletionSetPtr( currentCompletionSet->shallowCopy() ); - - for (size_t ic = 0; ic < newCompletions.size(); ic++) { - newCompletions[ic]->fixDefaultIJ( m_headI , m_headJ ); - newCompletionSet->add( newCompletions[ic] ); - } - - addCompletionSet( time_step , newCompletionSet); - } - - void Well::addCompletionSet(size_t time_step, const CompletionSetConstPtr newCompletionSet){ - CompletionSetPtr mutable_copy(newCompletionSet->shallowCopy()); - if (getWellCompletionOrdering() == WellCompletion::TRACK) { - mutable_copy->orderCompletions(m_headI, m_headJ); - } - m_completions->update(time_step, mutable_copy); - } - - const std::string Well::getGroupName(size_t time_step) const { - return m_groupName->get(time_step); - } - - - void Well::setGroupName(size_t time_step, const std::string& groupName ) { - m_groupName->update(time_step , groupName); - } - - - - void Well::setRFTActive(size_t time_step, bool value){ - m_rft->update(time_step, value); - } - - bool Well::getRFTActive(size_t time_step) const{ - return bool( m_rft->get(time_step) ); - } - - bool Well::getPLTActive(size_t time_step) const{ - return bool( m_plt->get(time_step) ); - } - void Well::setPLTActive(size_t time_step, bool value){ - m_plt->update(time_step, value); - } - - /* - The first report step where *either* RFT or PLT output is active. - */ - int Well::firstRFTOutput( ) const { - int rft_output = m_rft->find( true ); - int plt_output = m_plt->find( true ); - - if (rft_output < plt_output) { - if (rft_output >= 0) - return rft_output; - else - return plt_output; - } else { - if (plt_output >= 0) - return plt_output; - else - return rft_output; - } - } - - - int Well::findWellFirstOpen(int startTimeStep) const{ - int numberOfTimeSteps = m_timeMap->numTimesteps(); - for(int i = startTimeStep; i < numberOfTimeSteps;i++){ - if(getStatus(i)==WellCommon::StatusEnum::OPEN){ - return i; - } - } - return -1; - } - - void Well::setRFTForWellWhenFirstOpen(int numSteps,size_t currentStep){ - int time; - if(getStatus(currentStep)==WellCommon::StatusEnum::OPEN ){ - time = currentStep; - }else { - time = findWellFirstOpen(currentStep); - } - if(time>-1){ - setRFTActive(time, true); - if(time < numSteps){ - setRFTActive(time+1, false); - } - } - } - - WellCompletion::CompletionOrderEnum Well::getWellCompletionOrdering() const { - return m_comporder; - } - - - bool Well::wellNameInWellNamePattern(const std::string& wellName, const std::string& wellNamePattern) { - bool wellNameInPattern = false; - if (util_fnmatch( wellNamePattern.c_str() , wellName.c_str()) == 0) { - wellNameInPattern = true; - } - return wellNameInPattern; - } - - bool Well::getAllowCrossFlow() const { - return m_allowCrossFlow; - } - - bool Well::getAutomaticShutIn() const { - return m_automaticShutIn; - } - - bool Well::canOpen(size_t currentStep) const { - if( getAllowCrossFlow() ) return true; - - if( isInjector( currentStep ) ) - return getInjectionProperties( currentStep ).surfaceInjectionRate != 0; - - const auto& prod = getProductionProperties( currentStep ); - return (prod.WaterRate + prod.OilRate + prod.GasRate) != 0; - } - - - SegmentSetConstPtr Well::getSegmentSet(size_t time_step) const { - return m_segmentset->get(time_step); - } - - bool Well::isMultiSegment(size_t time_step) const { - return (getSegmentSet(time_step)->numberSegment() > 0); - } - - void Well::addSegmentSet(size_t time_step, SegmentSetConstPtr new_segmentset_in) { - // to see if it is the first time entering WELSEGS input to this well. - // if the well is not multi-segment well, it will be the first time - // not sure if a well can switch between mutli-segment well and other - // type of well - // Here, we assume not - const bool first_time = !isMultiSegment(time_step); - - if (first_time) { - // overwrite the BHP reference depth with the one from WELSEGS keyword - const double ref_depth = new_segmentset_in->depthTopSegment(); - m_refDepth.setValue(ref_depth); - SegmentSetPtr new_segmentset = SegmentSetPtr(new_segmentset_in->shallowCopy()); - if (new_segmentset->lengthDepthType() == WellSegment::ABS) { - new_segmentset->processABS(); - } else if (new_segmentset->lengthDepthType() == WellSegment::INC) { - new_segmentset->processINC(first_time); - } else { - throw std::logic_error(" unknown length_depth_type in the new_segmentset"); - } - m_segmentset->update(time_step, new_segmentset); - } else { - // checking the consistency of the input WELSEGS information - throw std::logic_error("re-entering WELSEGS for a well is not supported yet!!."); - } - } - -} - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Well.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Well.hpp deleted file mode 100644 index ce700ca853..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/Well.hpp +++ /dev/null @@ -1,182 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - - -#ifndef WELL_HPP_ -#define WELL_HPP_ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -namespace Opm { - - template< typename > class DynamicState; - - class Completion; - class CompletionSet; - class Segment; - class SegmentSet; - class TimeMap; - - class Well { - public: - Well(const std::string& name, int headI, - int headJ, Value refDepth , Phase::PhaseEnum preferredPhase, - std::shared_ptr< const TimeMap > timeMap, size_t creationTimeStep, - WellCompletion::CompletionOrderEnum completionOrdering = WellCompletion::TRACK, - bool allowCrossFlow = true, bool automaticShutIn = true); - const std::string& name() const; - - bool hasBeenDefined(size_t timeStep) const; - const std::string getGroupName(size_t timeStep) const; - void setGroupName(size_t timeStep , const std::string& groupName); - - WellCommon::StatusEnum getStatus(size_t timeStep) const; - bool setStatus(size_t timeStep, WellCommon::StatusEnum Status); - - int getHeadI() const; - int getHeadJ() const; - double getRefDepth() const; - Phase::PhaseEnum getPreferredPhase() const; - - bool isAvailableForGroupControl(size_t timeStep) const; - void setAvailableForGroupControl(size_t timeStep, bool isAvailableForGroupControl); - double getGuideRate(size_t timeStep) const; - void setGuideRate(size_t timeStep, double guideRate); - GuideRate::GuideRatePhaseEnum getGuideRatePhase(size_t timeStep) const; - void setGuideRatePhase(size_t timeStep, GuideRate::GuideRatePhaseEnum phase); - double getGuideRateScalingFactor(size_t timeStep) const; - void setGuideRateScalingFactor(size_t timeStep, double scalingFactor); - - void switchToInjector( size_t timeStep); - void switchToProducer( size_t timeStep); - - bool isProducer(size_t timeStep) const; - bool isInjector(size_t timeStep) const; - void addWELSPECS(const DeckRecord& deckRecord); - void addCompletions(size_t time_step , const std::vector>& newCompletions); - void addCompletionSet(size_t time_step, const std::shared_ptr< const CompletionSet > newCompletionSet); - std::shared_ptr< const CompletionSet > getCompletions(size_t timeStep) const; - std::shared_ptr< const CompletionSet > getCompletions( ) const; - - /* The rate of a given phase under the following assumptions: - * * Returns zero if production is requested for an injector (and vice - * versa) - * * If this is an injector and something else than the - * requested phase is injected, returns 0, i.e. - * water_injector.injection_rate( gas ) == 0 - * * Mixed injection is not supported and always returns 0. - */ - double production_rate( Phase::PhaseEnum phase, size_t timestep ) const; - double injection_rate( Phase::PhaseEnum phase, size_t timestep ) const; - - bool setProductionProperties(size_t timeStep , const WellProductionProperties properties); - WellProductionProperties getProductionPropertiesCopy(size_t timeStep) const; - const WellProductionProperties& getProductionProperties(size_t timeStep) const; - - bool setInjectionProperties(size_t timeStep , const WellInjectionProperties properties); - WellInjectionProperties getInjectionPropertiesCopy(size_t timeStep) const; - const WellInjectionProperties& getInjectionProperties(size_t timeStep) const; - - bool setPolymerProperties(size_t timeStep , const WellPolymerProperties properties); - WellPolymerProperties getPolymerPropertiesCopy(size_t timeStep) const; - const WellPolymerProperties& getPolymerProperties(size_t timeStep) const; - - bool setSolventFraction(size_t timeStep , const double fraction); - const double& getSolventFraction(size_t timeStep) const; - - bool setEconProductionLimits(const size_t timeStep, const WellEconProductionLimits& productionlimits); - const WellEconProductionLimits& getEconProductionLimits(const size_t timeStep) const; - - int firstRFTOutput( ) const; - bool getRFTActive(size_t time_step) const; - void setRFTActive(size_t time_step, bool value); - bool getPLTActive(size_t time_step) const; - void setPLTActive(size_t time_step, bool value); - int findWellFirstOpen(int startTimeStep) const; - void setRFTForWellWhenFirstOpen(int numSteps,size_t currentStep); - - static bool wellNameInWellNamePattern(const std::string& wellName, const std::string& wellNamePattern); - - WellCompletion::CompletionOrderEnum getWellCompletionOrdering() const; - - bool getAllowCrossFlow() const; - bool getAutomaticShutIn() const; - bool canOpen(size_t time_step) const; - - - // for multi-segment wells - bool isMultiSegment(size_t time_step) const; - std::shared_ptr< const SegmentSet > getSegmentSet(size_t time_step) const; - - void addSegmentSet(size_t time_step, std::shared_ptr< const SegmentSet > new_segmentset); - - const MessageContainer& getMessageContainer() const; - private: - void setRefDepthFromCompletions() const; - size_t m_creationTimeStep; - std::string m_name; - - std::shared_ptr > m_status; - - std::shared_ptr > m_isAvailableForGroupControl; - std::shared_ptr > m_guideRate; - std::shared_ptr > m_guideRatePhase; - std::shared_ptr > m_guideRateScalingFactor; - - std::shared_ptr > m_isProducer; - std::shared_ptr> > m_completions; - std::shared_ptr > m_productionProperties; - std::shared_ptr > m_injectionProperties; - std::shared_ptr > m_polymerProperties; - std::shared_ptr > m_econproductionlimits; - std::shared_ptr > m_solventFraction; - std::shared_ptr > m_groupName; - std::shared_ptr > m_rft; - std::shared_ptr > m_plt; - - // WELSPECS data - assumes this is not dynamic - - std::shared_ptr< const TimeMap > m_timeMap; - int m_headI; - int m_headJ; - mutable Value m_refDepth; - Phase::PhaseEnum m_preferredPhase; - - WellCompletion::CompletionOrderEnum m_comporder; - bool m_allowCrossFlow; - bool m_automaticShutIn; - MessageContainer m_messages; - // WELSEGS DATA - for mutli-segment wells - // flag indicating if the well is a multi-segment well - std::shared_ptr>> m_segmentset; - }; -} - - - -#endif /* WELL_HPP_ */ diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellEconProductionLimits.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellEconProductionLimits.cpp deleted file mode 100644 index 29c85be965..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellEconProductionLimits.cpp +++ /dev/null @@ -1,122 +0,0 @@ -/* - Copyright 2016 SINTEF ICT, Applied Mathematics. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - - -#include - -#include -#include -#include - - -namespace Opm { - - WellEconProductionLimits::WellEconProductionLimits() - : m_min_oil_rate(0.0) - , m_min_gas_rate(0.0) - , m_max_water_cut(0.0) - , m_max_gas_oil_ratio(0.0) - , m_max_water_gas_ratio(0.0) - , m_workover(WellEcon::NONE) - , m_end_run(false) - , m_followon_well("'") - , m_quantity_limit(WellEcon::RATE) - , m_secondary_max_water_cut(0.0) - , m_workover_secondary(m_workover) - , m_max_gas_liquid_ratio(0.0) - , m_min_liquid_rate(0.0) - , m_max_temperature(-1e8) - , m_min_reservoir_fluid_rate(0.0) - { - } - - - - WellEconProductionLimits::WellEconProductionLimits(const DeckRecord& record) - : m_min_oil_rate(record.getItem("MIN_OIL_PRODUCTION").getSIDouble(0)) - , m_min_gas_rate(record.getItem("MIN_GAS_PRODUCTION").getSIDouble(0)) - , m_max_water_cut(record.getItem("MAX_WATER_CUT").get(0)) - , m_max_gas_oil_ratio(record.getItem("MAX_GAS_OIL_RATIO").get(0)) - , m_max_water_gas_ratio(record.getItem("MAX_WATER_GAS_RATIO").get(0)) - , m_workover(WellEcon::WorkoverEnumFromString(record.getItem("WORKOVER_RATIO_LIMIT").getTrimmedString(0))) - , m_end_run(false) - , m_followon_well(record.getItem("FOLLOW_ON_WELL").getTrimmedString(0)) - , m_quantity_limit(WellEcon::QuantityLimitEnumFromString(record.getItem("LIMITED_QUANTITY").getTrimmedString(0))) - , m_secondary_max_water_cut(record.getItem("SECOND_MAX_WATER_CUT").get(0)) - , m_max_gas_liquid_ratio(record.getItem("MAX_GAS_LIQUID_RATIO").get(0)) - , m_min_liquid_rate(record.getItem("MIN_LIQUID_PRODCUTION_RATE").getSIDouble(0)) - , m_min_reservoir_fluid_rate(record.getItem("MIN_RES_FLUID_RATE").getSIDouble(0)) - { - assert(m_workover != WellEcon::LAST); - assert(m_workover != WellEcon::RED); - - if (record.getItem("MAX_TEMP").hasValue(0)) { - m_max_temperature = record.getItem("MAX_TEMP").getSIDouble(0); - } else { - // defaulted with one really non-physical value. - m_max_temperature = -1e8; - } - - if (record.getItem("WORKOVER_SECOND_WATER_CUT_LIMIT").hasValue(0)) { - const std::string string_workover = record.getItem("WORKOVER_SECOND_WATER_CUT_LIMIT").getTrimmedString(0); - m_workover_secondary = WellEcon::WorkoverEnumFromString(string_workover); - } else { - m_workover_secondary = m_workover; - } - - if (record.getItem("END_RUN_FLAG").hasValue(0)) { - std::string string_endrun = record.getItem("END_RUN_FLAG").getTrimmedString(0); - if (string_endrun == "YES") { - m_end_run = true; - } else if (string_endrun != "NO") { - throw std::invalid_argument("Unknown input: " + string_endrun + " for END_RUN_FLAG in WECON"); - } - } - } - - - bool WellEconProductionLimits::operator==(const WellEconProductionLimits& other) const { - if ((minOilRate() == other.minOilRate()) && - (minGasRate() == other.minGasRate()) && - (maxWaterCut() == other.maxWaterCut()) && - (maxGasOilRatio() == other.maxGasOilRatio()) && - (maxWaterGasRatio() == other.maxWaterGasRatio()) && - (workover() == other.workover()) && - (followonWell() == other.followonWell()) && - (quantityLimit() == other.quantityLimit()) && - (maxSecondaryMaxWaterCut() == other.maxSecondaryMaxWaterCut()) && - (workoverSecondary() == other.workoverSecondary()) && - (maxGasLiquidRatio() == other.maxGasLiquidRatio()) && - (minLiquidRate() == other.minLiquidRate()) && - (maxTemperature() == other.maxTemperature()) && - (minReservoirFluidRate() == other.minReservoirFluidRate())) - { - - return true; - } else { - return false; - } - } - - - bool WellEconProductionLimits::operator!=(const WellEconProductionLimits& other) const { - return (!(*this == other)); - } - -} // namespace Opm diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellEconProductionLimits.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellEconProductionLimits.hpp deleted file mode 100644 index 2cd05e7efa..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellEconProductionLimits.hpp +++ /dev/null @@ -1,169 +0,0 @@ -/* - Copyright 2016 SINTEF ICT, Applied Mathematics. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef WELLECONPRODUCTIONLIMITS_HPP_HEADER_INCLUDED -#define WELLECONPRODUCTIONLIMITS_HPP_HEADER_INCLUDED - -#include - -#include - -namespace Opm { - - class DeckRecord; - - class WellEconProductionLimits{ - public: - WellEconProductionLimits(const DeckRecord& record); - WellEconProductionLimits(); - - // TODO: not handling things related to m_secondary_max_water_cut - // for the moment. - - // limit switch on? - bool onAnyEffectiveLimit() const { - return (onAnyRatioLimit() || - onAnyRateLimit()); - }; - - bool onAnyRatioLimit() const { - return (onMaxWaterCut() || - onMaxGasOilRatio() || - onMaxWaterGasRatio() || - onMaxGasLiquidRatio()); - }; - - - bool onAnyRateLimit() const { - return (onMinOilRate() || - onMinGasRate() || - onMinLiquidRate() || - onMinReservoirFluidRate()); - }; - - bool onMinOilRate() const { - return (m_min_oil_rate > 0.0); - }; - - bool onMinGasRate() const { - return (m_min_gas_rate > 0.0); - }; - - bool onMaxWaterCut() const { - return (m_max_water_cut > 0.0); - }; - - bool onMaxGasOilRatio() const { - return (m_max_gas_oil_ratio > 0.0); - }; - - bool onMaxWaterGasRatio() const { - return (m_max_water_gas_ratio > 0.0); - }; - - bool onSecondaryMaxWaterCut() const { - return (m_secondary_max_water_cut > 0.0); - }; - - bool onMaxGasLiquidRatio() const { - return (m_max_gas_oil_ratio > 0.0); - }; - - // assuming Celsius temperature is used internally - bool onMaxTemperature() const { - return (m_max_temperature > -273.15); - }; - - bool onMinLiquidRate() const { - return (m_min_liquid_rate > 0.0); - }; - - bool onMinReservoirFluidRate() const { - return (m_min_reservoir_fluid_rate > 0.0); - }; - - // not sure what will happen if the followon well is a well does not exist. - bool validFollowonWell() const { - return (m_followon_well != "'"); - }; - - bool requireWorkover() const { - return (m_workover != WellEcon::NONE); - }; - - bool requireSecondaryWorkover() const { - return (m_workover_secondary != WellEcon::NONE); - } - - bool endRun() const { - return m_end_run; - } - - double minOilRate() const { return m_min_oil_rate; }; - - double minGasRate() const { return m_min_gas_rate; }; - - double maxWaterCut() const { return m_max_water_cut; }; - - double maxGasOilRatio() const { return m_max_gas_oil_ratio; }; - - double maxWaterGasRatio() const { return m_max_water_gas_ratio; }; - - WellEcon::WorkoverEnum workover() const { return m_workover; }; - - const std::string& followonWell() const { return m_followon_well; }; - - WellEcon::QuantityLimitEnum quantityLimit() const {return m_quantity_limit; }; - - double maxSecondaryMaxWaterCut() const { return m_secondary_max_water_cut; }; - - WellEcon::WorkoverEnum workoverSecondary() const { return m_workover_secondary; }; - - double maxGasLiquidRatio() const { return m_max_gas_liquid_ratio; }; - - double minLiquidRate() const { return m_min_liquid_rate; }; - - double maxTemperature() const { return m_max_temperature; }; - - double minReservoirFluidRate() const { return m_min_reservoir_fluid_rate; }; - - bool operator==(const WellEconProductionLimits& other) const; - - bool operator!=(const WellEconProductionLimits& other) const; - - private: - double m_min_oil_rate; - double m_min_gas_rate; - double m_max_water_cut; - double m_max_gas_oil_ratio; - double m_max_water_gas_ratio; - WellEcon::WorkoverEnum m_workover; - bool m_end_run; - std::string m_followon_well; - WellEcon::QuantityLimitEnum m_quantity_limit; - double m_secondary_max_water_cut; - WellEcon::WorkoverEnum m_workover_secondary; - double m_max_gas_liquid_ratio; - double m_min_liquid_rate; - double m_max_temperature; - double m_min_reservoir_fluid_rate; - }; -} // namespace Opm - -#endif // WELLECONPRODUCTIONLIMITS_HPP_HEADER_INCLUDED diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellInjectionProperties.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellInjectionProperties.cpp deleted file mode 100644 index 1c615fcde2..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellInjectionProperties.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ -#include - -#include -#include - -namespace Opm { - - WellInjectionProperties::WellInjectionProperties() { - surfaceInjectionRate=0.0; - reservoirInjectionRate=0.0; - BHPLimit=0.0; - THPLimit=0.0; - VFPTableNumber=0; - predictionMode=true; - injectionControls=0; - injectorType = WellInjector::WATER; - controlMode = WellInjector::CMODE_UNDEFINED; - } - - - bool WellInjectionProperties::operator==(const WellInjectionProperties& other) const { - if ((surfaceInjectionRate == other.surfaceInjectionRate) && - (reservoirInjectionRate == other.reservoirInjectionRate) && - (BHPLimit == other.BHPLimit) && - (THPLimit == other.THPLimit) && - (VFPTableNumber == other.VFPTableNumber) && - (predictionMode == other.predictionMode) && - (injectionControls == other.injectionControls) && - (injectorType == other.injectorType) && - (controlMode == other.controlMode)) - return true; - else - return false; - } - - bool WellInjectionProperties::operator!=(const WellInjectionProperties& other) const { - return !(*this == other); - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellInjectionProperties.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellInjectionProperties.hpp deleted file mode 100644 index c36279653d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellInjectionProperties.hpp +++ /dev/null @@ -1,61 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef WELLINJECTIONPROPERTIES_HPP_HEADER_INCLUDED -#define WELLINJECTIONPROPERTIES_HPP_HEADER_INCLUDED - -#include - -namespace Opm { - - struct WellInjectionProperties { - double surfaceInjectionRate; - double reservoirInjectionRate; - double BHPLimit; - double THPLimit; - int VFPTableNumber; - bool predictionMode; - int injectionControls; - WellInjector::TypeEnum injectorType; - WellInjector::ControlModeEnum controlMode; - - bool operator==(const WellInjectionProperties& other) const; - bool operator!=(const WellInjectionProperties& other) const; - - WellInjectionProperties(); - bool hasInjectionControl(WellInjector::ControlModeEnum controlModeArg) const { - if (injectionControls & controlModeArg) - return true; - else - return false; - } - - void dropInjectionControl(WellInjector::ControlModeEnum controlModeArg) { - if ((injectionControls & controlModeArg) != 0) - injectionControls -= controlModeArg; - } - - void addInjectionControl(WellInjector::ControlModeEnum controlModeArg) { - if ((injectionControls & controlModeArg) == 0) - injectionControls += controlModeArg; - } - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellPolymerProperties.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellPolymerProperties.cpp deleted file mode 100644 index ec99654b19..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellPolymerProperties.cpp +++ /dev/null @@ -1,43 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ -#include - -#include -#include - -namespace Opm { - - WellPolymerProperties::WellPolymerProperties() { - m_polymerConcentration = 0.0; - m_saltConcentration = 0.0; - } - - bool WellPolymerProperties::operator==(const WellPolymerProperties& other) const { - if ((m_polymerConcentration == other.m_polymerConcentration) && - (m_saltConcentration == other.m_saltConcentration)) - return true; - else - return false; - - } - - bool WellPolymerProperties::operator!=(const WellPolymerProperties& other) const { - return !(*this == other); - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellPolymerProperties.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellPolymerProperties.hpp deleted file mode 100644 index 6b8bc23d25..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellPolymerProperties.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef WELLPOLYMERPROPERTIES_HPP_HEADER_INCLUDED -#define WELLPOLYMERPROPERTIES_HPP_HEADER_INCLUDED - - -namespace Opm { - - struct WellPolymerProperties { - double m_polymerConcentration; - double m_saltConcentration; - - bool operator==(const WellPolymerProperties& other) const; - bool operator!=(const WellPolymerProperties& other) const; - WellPolymerProperties(); - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellProductionProperties.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellProductionProperties.cpp deleted file mode 100644 index 1cf30438fd..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellProductionProperties.cpp +++ /dev/null @@ -1,151 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ -#include -#include - -#include -#include -#include -#include - - -namespace Opm { - - WellProductionProperties:: - WellProductionProperties() : predictionMode( true ) - {} - - WellProductionProperties:: - WellProductionProperties( const DeckRecord& record ) : - OilRate( record.getItem( "ORAT" ).getSIDouble( 0 ) ), - WaterRate( record.getItem( "WRAT" ).getSIDouble( 0 ) ), - GasRate( record.getItem( "GRAT" ).getSIDouble( 0 ) ) - {} - - - WellProductionProperties WellProductionProperties::history(double BHPLimit, const DeckRecord& record) - { - // Modes supported in WCONHIST just from {O,W,G}RAT values - // - // Note: The default value of observed {O,W,G}RAT is zero - // (numerically) whence the following control modes are - // unconditionally supported. - WellProductionProperties p(record); - p.predictionMode = false; - - namespace wp = WellProducer; - for( auto cmode : { wp::ORAT, wp::WRAT, wp::GRAT, - wp::LRAT, wp::RESV, wp::GRUP } ) { - p.addProductionControl( cmode ); - } - - /* - We do not update the BHPLIMIT based on the BHP value given - in WCONHIST, that is purely a historical value; instead we - copy the old value of the BHP limit from the previous - timestep. - - To actually set the BHPLIMIT in historical mode you must - use the WELTARG keyword. - */ - p.BHPLimit = BHPLimit; - - const auto& cmodeItem = record.getItem("CMODE"); - if (!cmodeItem.defaultApplied(0)) { - const auto cmode = WellProducer::ControlModeFromString( cmodeItem.getTrimmedString( 0 ) ); - - if (p.hasProductionControl( cmode )) - p.controlMode = cmode; - else - throw std::invalid_argument("Setting CMODE to unspecified control"); - } - - return p; - } - - - - WellProductionProperties WellProductionProperties::prediction( const DeckRecord& record, bool addGroupProductionControl) - { - WellProductionProperties p(record); - p.predictionMode = true; - - p.LiquidRate = record.getItem("LRAT" ).getSIDouble(0); - p.ResVRate = record.getItem("RESV" ).getSIDouble(0); - p.BHPLimit = record.getItem("BHP" ).getSIDouble(0); - p.THPLimit = record.getItem("THP" ).getSIDouble(0); - p.ALQValue = record.getItem("ALQ" ).get< double >(0); //NOTE: Unit of ALQ is never touched - p.VFPTableNumber = record.getItem("VFP_TABLE").get< int >(0); - - namespace wp = WellProducer; - using mode = std::pair< const char*, wp::ControlModeEnum >; - static const mode modes[] = { - { "ORAT", wp::ORAT }, { "WRAT", wp::WRAT }, { "GRAT", wp::GRAT }, - { "LRAT", wp::LRAT }, { "RESV", wp::RESV }, { "BHP", wp::BHP }, - { "THP", wp::THP } - }; - - for( const auto& cmode : modes ) { - if( !record.getItem( cmode.first ).defaultApplied( 0 ) ) - p.addProductionControl( cmode.second ); - } - - if (addGroupProductionControl) { - p.addProductionControl(WellProducer::GRUP); - } - - - { - const auto& cmodeItem = record.getItem("CMODE"); - if (cmodeItem.hasValue(0)) { - const WellProducer::ControlModeEnum cmode = WellProducer::ControlModeFromString( cmodeItem.getTrimmedString(0) ); - - if (p.hasProductionControl( cmode )) - p.controlMode = cmode; - else - throw std::invalid_argument("Setting CMODE to unspecified control"); - } - } - return p; - } - - - bool WellProductionProperties::operator==(const WellProductionProperties& other) const { - if ((OilRate == other.OilRate) && - (WaterRate == other.WaterRate) && - (GasRate == other.GasRate) && - (LiquidRate == other.LiquidRate) && - (ResVRate == other.ResVRate) && - (BHPLimit == other.BHPLimit) && - (THPLimit == other.THPLimit) && - (VFPTableNumber == other.VFPTableNumber) && - (controlMode == other.controlMode) && - (m_productionControls == other.m_productionControls)) - return true; - else - return false; - } - - - bool WellProductionProperties::operator!=(const WellProductionProperties& other) const { - return !(*this == other); - } - - -} // namespace Opm diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellProductionProperties.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellProductionProperties.hpp deleted file mode 100644 index 85a2f9911a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellProductionProperties.hpp +++ /dev/null @@ -1,74 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef WELLPRODUCTIONPROPERTIES_HPP_HEADER_INCLUDED -#define WELLPRODUCTIONPROPERTIES_HPP_HEADER_INCLUDED - -#include - -#include - -namespace Opm { - - class DeckRecord; - - class WellProductionProperties { - public: - double OilRate = 0.0; - double WaterRate = 0.0; - double GasRate = 0.0; - double LiquidRate = 0.0; - double ResVRate = 0.0; - double BHPLimit = 0.0; - double THPLimit = 0.0; - int VFPTableNumber = 0; - double ALQValue = 0.0; - bool predictionMode = false; - - WellProducer::ControlModeEnum controlMode = WellProducer::CMODE_UNDEFINED; - - bool operator==(const WellProductionProperties& other) const; - bool operator!=(const WellProductionProperties& other) const; - WellProductionProperties(); - - static WellProductionProperties history(double BHPLimit, const DeckRecord& record ); - static WellProductionProperties prediction( const DeckRecord& record, bool addGroupProductionControl ); - - bool hasProductionControl(WellProducer::ControlModeEnum controlModeArg) const { - return (m_productionControls & controlModeArg) != 0; - } - - void dropProductionControl(WellProducer::ControlModeEnum controlModeArg) { - if (hasProductionControl(controlModeArg)) - m_productionControls -= controlModeArg; - } - - void addProductionControl(WellProducer::ControlModeEnum controlModeArg) { - if (! hasProductionControl(controlModeArg)) - m_productionControls += controlModeArg; - } - - private: - int m_productionControls = 0; - - WellProductionProperties(const DeckRecord& record); - }; -} // namespace Opm - -#endif // WELLPRODUCTIONPROPERTIES_HPP_HEADER_INCLUDED diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellSet.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellSet.cpp deleted file mode 100644 index 48d89de5d4..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellSet.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include -#include - -namespace Opm { - - - WellSet::WellSet() { - } - - size_t WellSet::size() const { - return m_wells.size(); - } - - - bool WellSet::hasWell(const std::string& wellName) const { - return (m_wells.find(wellName) != m_wells.end()); - } - - - const Well* WellSet::getWell(const std::string& wellName) const { - if (hasWell(wellName)) - return m_wells.find(wellName)->second; - else - throw std::invalid_argument("Do not have well '"+wellName+"'?!\n"); - } - - - void WellSet::addWell( Well* well) { - const std::string& wellName = well->name(); - if (!hasWell(wellName)) - m_wells[wellName] = well; - else if (well != getWell(wellName)) - throw std::invalid_argument("Well has changed - internal fuckup"); - } - - - void WellSet::delWell(const std::string& wellName) { - if (hasWell(wellName)) - m_wells.erase( wellName ); - else - throw std::invalid_argument("Cannot delete unknown well '"+wellName+"'"); - } - - - WellSet * WellSet::shallowCopy() const { - std::unique_ptr< WellSet > copy( new WellSet() ); - - for( auto pair : this->m_wells ) - copy->addWell( pair.second ); - - return copy.release(); - } - - WellSet::const_iterator WellSet::begin() const { - return this->m_wells.begin(); - } - - WellSet::const_iterator WellSet::end() const { - return this->m_wells.end(); - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellSet.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellSet.hpp deleted file mode 100644 index 82897b25cc..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/WellSet.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ -#ifndef WELLSET_HPP -#define WELLSET_HPP - -#include -#include -#include - -namespace Opm { - - class Well; - - class WellSet { - public: - using const_iterator = std::map< std::string, Well* >::const_iterator; - - WellSet(); - size_t size() const; - bool hasWell(const std::string& wellName) const; - const Well* getWell(const std::string& wellName) const; - void addWell( Well* well); - void delWell(const std::string& wellName); - WellSet * shallowCopy() const; - - const_iterator begin() const; - const_iterator end() const; - - private: - std::map m_wells; - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/CMakeLists.txt deleted file mode 100644 index ca272cf830..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -foreach(tapp TimeMapTest ScheduleTests WellTests - WellPropertiesTests WellSetTests - GroupTests ScheduleEnumTests - CompletionTests CompletionSetTests - DynamicStateTests GroupTreeNodeTests - GroupTreeTests TuningTests EventTests - WellSolventTests DynamicVectorTests - GeomodifierTests) - opm_add_test(run${tapp} SOURCES ${tapp}.cpp - LIBRARIES opmparser ${Boost_LIBRARIES}) -endforeach() diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/CompletionSetTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/CompletionSetTests.cpp deleted file mode 100644 index a715fde9dd..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/CompletionSetTests.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include - -#define BOOST_TEST_MODULE CompletionSetTests -#include -#include - - - - -#include -#include -#include - -#include -#include -#include - - - -BOOST_AUTO_TEST_CASE(CreateCompletionSetOK) { - Opm::CompletionSet completionSet; - BOOST_CHECK_EQUAL( 0U , completionSet.size() ); -} - - - -BOOST_AUTO_TEST_CASE(AddCompletionSizeCorrect) { - Opm::CompletionSet completionSet; - Opm::CompletionConstPtr completion1(new Opm::Completion(10,10,10,0.0,Opm::WellCompletion::OPEN , Opm::Value("ConnectionTransmissibilityFactor",99.88), Opm::Value("D",22.33), Opm::Value("SKIN",33.22))); - Opm::CompletionConstPtr completion2(new Opm::Completion(11,10,10,0.0,Opm::WellCompletion::OPEN , Opm::Value("ConnectionTransmissibilityFactor",99.88), Opm::Value("D",22.33), Opm::Value("SKIN",33.22))); - completionSet.add( completion1 ); - BOOST_CHECK_EQUAL( 1U , completionSet.size() ); - - completionSet.add( completion2 ); - BOOST_CHECK_EQUAL( 2U , completionSet.size() ); - - BOOST_CHECK_EQUAL( completion1 , completionSet.get(0)); -} - - -BOOST_AUTO_TEST_CASE(CompletionSetGetOutOfRangeThrows) { - Opm::CompletionSet completionSet; - Opm::CompletionConstPtr completion1(new Opm::Completion(10,10,10,0.0,Opm::WellCompletion::OPEN , Opm::Value("ConnectionTransmissibilityFactor",99.88), Opm::Value("D",22.33), Opm::Value("SKIN",33.22))); - Opm::CompletionConstPtr completion2(new Opm::Completion(11,10,10,0.0,Opm::WellCompletion::OPEN , Opm::Value("ConnectionTransmissibilityFactor",99.88), Opm::Value("D",22.33), Opm::Value("SKIN",33.22))); - completionSet.add( completion1 ); - BOOST_CHECK_EQUAL( 1U , completionSet.size() ); - - completionSet.add( completion2 ); - BOOST_CHECK_EQUAL( 2U , completionSet.size() ); - - BOOST_CHECK_THROW( completionSet.get(10) , std::range_error ); -} - - - - -BOOST_AUTO_TEST_CASE(AddCompletionSameCellUpdates) { - Opm::CompletionSet completionSet; - Opm::CompletionConstPtr completion1(new Opm::Completion(10,10,10,0.0, Opm::WellCompletion::OPEN , Opm::Value("ConnectionTransmissibilityFactor",99.88), Opm::Value("D",22.33), Opm::Value("SKIN",33.22))); - Opm::CompletionConstPtr completion2(new Opm::Completion(10,10,10,0.0,Opm::WellCompletion::SHUT , Opm::Value("ConnectionTransmissibilityFactor",99.88), Opm::Value("D",22.33), Opm::Value("SKIN",33.22))); - - - completionSet.add( completion1 ); - BOOST_CHECK_EQUAL( 1U , completionSet.size() ); - - completionSet.add( completion2 ); - BOOST_CHECK_EQUAL( 1U , completionSet.size() ); -} - - - -BOOST_AUTO_TEST_CASE(AddCompletionShallowCopy) { - Opm::CompletionSet completionSet; - - Opm::CompletionConstPtr completion1(new Opm::Completion(10,10,10,0.0, Opm::WellCompletion::OPEN , Opm::Value("ConnectionTransmissibilityFactor",99.88), Opm::Value("D",22.33), Opm::Value("SKIN",33.22))); - Opm::CompletionConstPtr completion2(new Opm::Completion(10,10,11,0.0, Opm::WellCompletion::SHUT , Opm::Value("ConnectionTransmissibilityFactor",99.88), Opm::Value("D",22.33), Opm::Value("SKIN",33.22))); - Opm::CompletionConstPtr completion3(new Opm::Completion(10,10,12,0.0, Opm::WellCompletion::SHUT , Opm::Value("ConnectionTransmissibilityFactor",99.88), Opm::Value("D",22.33), Opm::Value("SKIN",33.22))); - - completionSet.add( completion1 ); - completionSet.add( completion2 ); - completionSet.add( completion3 ); - BOOST_CHECK_EQUAL( 3U , completionSet.size() ); - - Opm::CompletionSetConstPtr copy = Opm::CompletionSetConstPtr( completionSet.shallowCopy() ); - BOOST_CHECK_EQUAL( 3U , copy->size() ); - - BOOST_CHECK_EQUAL( completion1 , copy->get(0)); - BOOST_CHECK_EQUAL( completion2 , copy->get(1)); - BOOST_CHECK_EQUAL( completion3 , copy->get(2)); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/CompletionTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/CompletionTests.cpp deleted file mode 100644 index 8f01961997..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/CompletionTests.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include - -#define BOOST_TEST_MODULE CompletionTests -#include -#include - - - - -#include -#include -#include - -#include -#include - - - -BOOST_AUTO_TEST_CASE(CreateCompletionOK) { - Opm::Completion completion(10,10,10,0.0,Opm::WellCompletion::OPEN,Opm::Value("ConnectionTransmissibilityFactor",99.88), Opm::Value("D",22.33), Opm::Value("SKIN",33.22)); -} - - -BOOST_AUTO_TEST_CASE(testGetFunctions) { - Opm::Completion completion(10,11,12,0.0, Opm::WellCompletion::OPEN,Opm::Value("ConnectionTransmissibilityFactor",99.88), Opm::Value("D",22.33), Opm::Value("SKIN",33.22)); - BOOST_CHECK_EQUAL( 10 , completion.getI() ); - BOOST_CHECK_EQUAL( 11 , completion.getJ() ); - BOOST_CHECK_EQUAL( 12 , completion.getK() ); - - BOOST_CHECK_EQUAL( Opm::WellCompletion::OPEN , completion.getState()); - BOOST_CHECK_EQUAL( 99.88 , completion.getConnectionTransmissibilityFactor()); - BOOST_CHECK_EQUAL( 22.33 , completion.getDiameter()); - BOOST_CHECK_EQUAL( 33.22 , completion.getSkinFactor()); -} - - -BOOST_AUTO_TEST_CASE(CompletionTestssameCoordinate) { - Opm::Completion completion1(10,10,10,0.0, Opm::WellCompletion::OPEN, Opm::Value("ConnectionTransmissibilityFactor",99.88), Opm::Value("D",22.33), Opm::Value("SKIN",33.22)); - Opm::Completion completion2(10,10,10,0.0, Opm::WellCompletion::OPEN, Opm::Value("ConnectionTransmissibilityFactor",99.88), Opm::Value("D",22.33), Opm::Value("SKIN",33.22)); - Opm::Completion completion3(11,10,10,0.0, Opm::WellCompletion::OPEN, Opm::Value("ConnectionTransmissibilityFactor",99.88), Opm::Value("D",22.33), Opm::Value("SKIN",33.22)); - Opm::Completion completion4(10,11,10,0.0, Opm::WellCompletion::OPEN, Opm::Value("ConnectionTransmissibilityFactor",99.88), Opm::Value("D",22.33), Opm::Value("SKIN",33.22)); - Opm::Completion completion5(10,10,11,0.0, Opm::WellCompletion::OPEN, Opm::Value("ConnectionTransmissibilityFactor",99.88), Opm::Value("D",22.33), Opm::Value("SKIN",33.22)); - - BOOST_CHECK( completion1.sameCoordinate( completion2 )); - BOOST_CHECK_EQUAL( false , completion1.sameCoordinate( completion3 )); - BOOST_CHECK_EQUAL( false , completion1.sameCoordinate( completion4 )); - BOOST_CHECK_EQUAL( false , completion1.sameCoordinate( completion5 )); -} - - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/DynamicStateTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/DynamicStateTests.cpp deleted file mode 100644 index 8d3d7e0198..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/DynamicStateTests.cpp +++ /dev/null @@ -1,277 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include - - -#define BOOST_TEST_MODULE DynamicStateTests -#include -#include - - -#include -#include -#include - - - -BOOST_AUTO_TEST_CASE(CreateDynamicTest) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - Opm::TimeMapPtr timeMap(new Opm::TimeMap(boost::posix_time::ptime(startDate))); - Opm::DynamicState state(timeMap , 9.99); -} - - -BOOST_AUTO_TEST_CASE(DynamicStateGetOutOfRangeThrows) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - Opm::TimeMapPtr timeMap(new Opm::TimeMap(boost::posix_time::ptime(startDate))); - Opm::DynamicState state(timeMap , 9.99); - BOOST_CHECK_THROW( state.get(1) , std::range_error); -} - - -BOOST_AUTO_TEST_CASE(DynamicStateGetDefault) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - Opm::TimeMapPtr timeMap(new Opm::TimeMap(boost::posix_time::ptime(startDate))); - Opm::DynamicState state(timeMap , 137); - BOOST_CHECK_EQUAL( 137 , state.get(0)); - BOOST_CHECK_EQUAL( 137 , state.back() ); -} - - -BOOST_AUTO_TEST_CASE(DynamicStateSetOutOfRangeThrows) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - Opm::TimeMapPtr timeMap(new Opm::TimeMap(boost::posix_time::ptime(startDate))); - Opm::DynamicState state(timeMap , 137); - for (size_t i = 0; i < 2; i++) - timeMap->addTStep( boost::posix_time::hours( (i+1) * 24 )); - - BOOST_CHECK_THROW( state.update(3 , 100) , std::range_error); -} - - -BOOST_AUTO_TEST_CASE(DynamicStateSetOK) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - Opm::TimeMapPtr timeMap(new Opm::TimeMap(boost::posix_time::ptime(startDate))); - Opm::DynamicState state(timeMap , 137); - for (size_t i = 0; i < 10; i++) - timeMap->addTStep( boost::posix_time::hours( (i+1) * 24 )); - - state.update(2 , 23 ); - BOOST_CHECK_EQUAL( 137 , state.get(0)); - BOOST_CHECK_EQUAL( 137 , state.get(1)); - BOOST_CHECK_EQUAL( 23 , state.get(2)); - BOOST_CHECK_EQUAL( 23 , state.get(5)); - - state.update(2 , 17); - BOOST_CHECK_EQUAL( 137 , state.get(0)); - BOOST_CHECK_EQUAL( 137 , state.get(1)); - BOOST_CHECK_EQUAL( 17 , state.get(2)); - BOOST_CHECK_EQUAL( 17 , state.get(5)); - - state.update(6 , 60); - BOOST_CHECK_EQUAL( 17 , state.get(2)); - BOOST_CHECK_EQUAL( 17 , state.get(5)); - BOOST_CHECK_EQUAL( 60 , state.get(6)); - BOOST_CHECK_EQUAL( 60 , state.get(8)); - BOOST_CHECK_EQUAL( 60 , state.get(9)); - BOOST_CHECK_EQUAL( 60 , state.back()); -} - - - -BOOST_AUTO_TEST_CASE(DynamicStateAddIndexAlreadySetThrows) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - Opm::TimeMapPtr timeMap(new Opm::TimeMap(boost::posix_time::ptime(startDate))); - Opm::DynamicState state(timeMap , 137); - for (size_t i = 0; i < 10; i++) - timeMap->addTStep( boost::posix_time::hours( (i+1) * 24 )); - - state.update( 5 , 60); - BOOST_CHECK_THROW( state.update(3 , 78) , std::invalid_argument); -} - - -BOOST_AUTO_TEST_CASE(DynamicStateAddAt) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - Opm::TimeMapPtr timeMap(new Opm::TimeMap(boost::posix_time::ptime(startDate))); - Opm::DynamicState state(timeMap , 0); - for (size_t i = 0; i < 10; i++) - timeMap->addTStep( boost::posix_time::hours( (i+1) * 24 )); - - state.update( 10 , 77 ); - { - const int& v1 = state.at(10); - int v2 = state.get(10); - BOOST_CHECK_EQUAL( v1 , 77 ); - BOOST_CHECK_EQUAL( v1 , v2 ); - BOOST_CHECK( &v1 != &v2 ); - } -} - - -BOOST_AUTO_TEST_CASE(DynamicStateCheckSize) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - Opm::TimeMapPtr timeMap(new Opm::TimeMap(boost::posix_time::ptime(startDate))); - Opm::DynamicState state(timeMap , 137); - for (size_t i = 0; i < 10; i++) - timeMap->addTStep( boost::posix_time::hours( (i+1) * 24 )); - - BOOST_CHECK_EQUAL( 0U , state.size() ); - - state.update( 0 , 10 ); - BOOST_CHECK_EQUAL( 1U , state.size() ); - - state.update( 2 , 10 ); - BOOST_CHECK_EQUAL( 3U , state.size() ); - state.update( 2 , 10 ); - BOOST_CHECK_EQUAL( 3U , state.size() ); - - state.update( 6 , 10 ); - BOOST_CHECK_EQUAL( 7U , state.size() ); -} - - -BOOST_AUTO_TEST_CASE(DynamicStateOperatorSubscript) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - Opm::TimeMapPtr timeMap(new Opm::TimeMap(boost::posix_time::ptime(startDate))); - Opm::DynamicState state(timeMap , 137); - for (size_t i = 0; i < 10; i++) - timeMap->addTStep( boost::posix_time::hours( (i+1) * 24 )); - - state.update( 10 , 200 ); - BOOST_CHECK_EQUAL( state[9] , 137 ); - BOOST_CHECK_EQUAL( state[0] , 137 ); - -} - - -BOOST_AUTO_TEST_CASE(DynamicStateInitial) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - Opm::TimeMapPtr timeMap(new Opm::TimeMap(boost::posix_time::ptime(startDate))); - Opm::DynamicState state(timeMap , 137); - Opm::DynamicState state2(timeMap , 137); - for (size_t i = 0; i < 10; i++) - timeMap->addTStep( boost::posix_time::hours( (i+1) * 24 )); - - - state.update( 10 , 200 ); - BOOST_CHECK_EQUAL( state[9] , 137 ); - BOOST_CHECK_EQUAL( state[0] , 137 ); - BOOST_CHECK_EQUAL( state[10] , 200 ); - - state.updateInitial( 63 ); - BOOST_CHECK_EQUAL( state[9] , 63 ); - BOOST_CHECK_EQUAL( state[0] , 63 ); - BOOST_CHECK_EQUAL( state[10] , 200 ); - - state.updateInitial( 73 ); - BOOST_CHECK_EQUAL( state[9] , 73 ); - BOOST_CHECK_EQUAL( state[0] , 73 ); - BOOST_CHECK_EQUAL( state[10] , 200 ); - - - state2.update( 10 , 200 ); - BOOST_CHECK_EQUAL( state2[9] , 137 ); - BOOST_CHECK_EQUAL( state2[0] , 137 ); - BOOST_CHECK_EQUAL( state2[10] , 200 ); - state.updateInitial( 73 ); - BOOST_CHECK_EQUAL( state2[9] , 137 ); - BOOST_CHECK_EQUAL( state2[0] , 137 ); - BOOST_CHECK_EQUAL( state2[10] , 200 ); -} - -BOOST_AUTO_TEST_CASE( ResetGlobal ) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - Opm::TimeMapPtr timeMap(new Opm::TimeMap(boost::posix_time::ptime(startDate))); - Opm::DynamicState state(timeMap , 137); - for (size_t i = 0; i < 10; i++) - timeMap->addTStep( boost::posix_time::hours( (i+1) * 24 )); - - state.update(5 , 100); - BOOST_CHECK_EQUAL( state[0] , 137 ); - BOOST_CHECK_EQUAL( state[4] , 137 ); - BOOST_CHECK_EQUAL( state[5] , 100 ); - BOOST_CHECK_EQUAL( state[9] , 100 ); - - state.updateInitial( 22 ); - BOOST_CHECK_EQUAL( state[0] , 22 ); - BOOST_CHECK_EQUAL( state[4] , 22 ); - BOOST_CHECK_EQUAL( state[5] , 100 ); - BOOST_CHECK_EQUAL( state[9] , 100 ); - - state.globalReset( 88 ); - BOOST_CHECK_EQUAL( state[0] , 88 ); - BOOST_CHECK_EQUAL( state[4] , 88 ); - BOOST_CHECK_EQUAL( state[5] , 88 ); - BOOST_CHECK_EQUAL( state[9] , 88 ); -} - - -BOOST_AUTO_TEST_CASE( CheckReturn ) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - Opm::TimeMapPtr timeMap(new Opm::TimeMap(boost::posix_time::ptime(startDate))); - Opm::DynamicState state(timeMap , 137); - for (size_t i = 0; i < 10; i++) - timeMap->addTStep( boost::posix_time::hours( (i+1) * 24 )); - - BOOST_CHECK_EQUAL( false , state.update( 0 , 137 )); - BOOST_CHECK_EQUAL( false , state.update( 3 , 137 )); - BOOST_CHECK_EQUAL( true , state.update( 5 , 200 )); -} - - -BOOST_AUTO_TEST_CASE( UpdateEmptyInitial ) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - Opm::TimeMapPtr timeMap(new Opm::TimeMap(boost::posix_time::ptime(startDate))); - Opm::DynamicState state(timeMap , 137); - for (size_t i = 0; i < 10; i++) - timeMap->addTStep( boost::posix_time::hours( (i+1) * 24 )); - - BOOST_CHECK_EQUAL( state[5] , 137 ); - state.updateInitial( 99 ); - BOOST_CHECK_EQUAL( state[5] , 99 ); -} - - -BOOST_AUTO_TEST_CASE( find ) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - Opm::TimeMapPtr timeMap(new Opm::TimeMap(boost::posix_time::ptime(startDate))); - Opm::DynamicState state(timeMap , 137); - for (size_t i = 0; i < 5; i++) - timeMap->addTStep( boost::posix_time::hours( (i+1) * 24 )); - - BOOST_CHECK_EQUAL( state.find( 137 ) , 0 ); - BOOST_CHECK_EQUAL( state.find( 200 ) , -1 ); - state.update( 0 , 200 ); - BOOST_CHECK_EQUAL( state.find( 137 ) , -1 ); - BOOST_CHECK_EQUAL( state.find( 200 ) , 0 ); - - state.update( 2 , 300 ); - BOOST_CHECK_EQUAL( state.find( 200 ) , 0 ); - BOOST_CHECK_EQUAL( state.find( 300 ) , 2 ); - - state.update( 4 , 400 ); - BOOST_CHECK_EQUAL( state.find( 200 ) , 0 ); - BOOST_CHECK_EQUAL( state.find( 300 ) , 2 ); - BOOST_CHECK_EQUAL( state.find( 400 ) , 4 ); - BOOST_CHECK_EQUAL( state.find( 500 ) , -1 ); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/DynamicVectorTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/DynamicVectorTests.cpp deleted file mode 100644 index a6e5c30ac9..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/DynamicVectorTests.cpp +++ /dev/null @@ -1,97 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include - - -#define BOOST_TEST_MODULE DynamicVectorTests -#include -#include - - -#include -#include -#include -#include - - - -BOOST_AUTO_TEST_CASE(CreateDynamicTest) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - Opm::TimeMapPtr timeMap(new Opm::TimeMap(boost::posix_time::ptime(startDate))); - Opm::DynamicVector vector(timeMap , 9.99); - - BOOST_CHECK_EQUAL( vector[0] , 9.99 ); - BOOST_CHECK_THROW( vector[1] , std::range_error); -} - - - -BOOST_AUTO_TEST_CASE(DynamicVectorSet) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - Opm::TimeMapPtr timeMap(new Opm::TimeMap(boost::posix_time::ptime(startDate))); - Opm::DynamicVector state(timeMap , 137); - for (size_t i = 0; i < 4; i++) - timeMap->addTStep( boost::posix_time::hours( (i+1) * 24 )); - - BOOST_CHECK_EQUAL( 137 , state[0] ); - BOOST_CHECK_EQUAL( 137 , state[1] ); - BOOST_CHECK_EQUAL( 137 , state[2] ); - BOOST_CHECK_EQUAL( 137 , state[3] ); - BOOST_CHECK_EQUAL( 137 , state[4] ); - - state[2] = 99; - BOOST_CHECK_EQUAL( 137 , state[1] ); - BOOST_CHECK_EQUAL( 99 , state[2] ); - BOOST_CHECK_EQUAL( 137 , state[3] ); - - state[0] = 88; - BOOST_CHECK_EQUAL( 88 , state[0]); - BOOST_CHECK_THROW( state[5] = 99 , std::range_error); -} - - - -BOOST_AUTO_TEST_CASE(DynamicVectorPtr) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - Opm::TimeMapPtr timeMap(new Opm::TimeMap(boost::posix_time::ptime(startDate))); - Opm::DynamicVector * state = new Opm::DynamicVector( timeMap , 137 ); - for (size_t i = 0; i < 4; i++) - timeMap->addTStep( boost::posix_time::hours( (i+1) * 24 )); - - BOOST_CHECK_EQUAL( 137 , state->iget(0) ); - BOOST_CHECK_EQUAL( 137 , state->iget(1) ); - BOOST_CHECK_EQUAL( 137 , state->iget(2) ); - BOOST_CHECK_EQUAL( 137 , state->iget(3) ); - BOOST_CHECK_EQUAL( 137 , state->iget(4) ); - - state->iset(2 , 99); - BOOST_CHECK_EQUAL( 137 , state->iget(1) ); - BOOST_CHECK_EQUAL( 99 , state->iget(2) ); - BOOST_CHECK_EQUAL( 137 , state->iget(3) ); - - state->iset(0,88); - BOOST_CHECK_EQUAL( 88 , state->iget(0)); - BOOST_CHECK_THROW( state->iset(5 , 99) , std::range_error); - - delete state; -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/EventTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/EventTests.cpp deleted file mode 100644 index 38813ddfab..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/EventTests.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include - -#define BOOST_TEST_MODULE EventTests -#include -#include - -#include -#include - -BOOST_AUTO_TEST_CASE(CreateEmpty) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - Opm::TimeMapPtr timeMap(new Opm::TimeMap(boost::posix_time::ptime(startDate))); - Opm::DynamicVector vector(timeMap , 9.99); - Opm::Events events( timeMap ); - - for (size_t i = 0; i < 11; i++) - timeMap->addTStep( boost::posix_time::hours( (i+1) * 24 )); - - BOOST_CHECK_EQUAL( false , events.hasEvent(Opm::ScheduleEvents::NEW_WELL , 10)); - - events.addEvent( Opm::ScheduleEvents::NEW_WELL , 0 ); - BOOST_CHECK_EQUAL( true , events.hasEvent(Opm::ScheduleEvents::NEW_WELL , 0)); - - events.addEvent( Opm::ScheduleEvents::NEW_WELL , 10 ); - BOOST_CHECK_EQUAL( false , events.hasEvent(Opm::ScheduleEvents::NEW_WELL , 9)); - BOOST_CHECK_EQUAL( true , events.hasEvent(Opm::ScheduleEvents::NEW_WELL , 10)); - BOOST_CHECK_EQUAL( false , events.hasEvent(Opm::ScheduleEvents::NEW_WELL , 11)); - - events.addEvent( Opm::ScheduleEvents::NEW_WELL , 10 ); - BOOST_CHECK_EQUAL( false , events.hasEvent(Opm::ScheduleEvents::NEW_WELL , 9)); - BOOST_CHECK_EQUAL( true , events.hasEvent(Opm::ScheduleEvents::NEW_WELL , 10)); - BOOST_CHECK_EQUAL( false , events.hasEvent(Opm::ScheduleEvents::NEW_WELL , 11)); - - events.addEvent( Opm::ScheduleEvents::WELL_STATUS_CHANGE , 9 ); - events.addEvent( Opm::ScheduleEvents::WELL_STATUS_CHANGE , 10 ); - BOOST_CHECK_EQUAL( false , events.hasEvent(Opm::ScheduleEvents::NEW_WELL , 9)); - BOOST_CHECK_EQUAL( true , events.hasEvent(Opm::ScheduleEvents::NEW_WELL , 10)); - BOOST_CHECK_EQUAL( false , events.hasEvent(Opm::ScheduleEvents::NEW_WELL , 11)); - BOOST_CHECK_EQUAL( true , events.hasEvent(Opm::ScheduleEvents::WELL_STATUS_CHANGE , 9)); - BOOST_CHECK_EQUAL( true , events.hasEvent(Opm::ScheduleEvents::WELL_STATUS_CHANGE , 10)); -} - - -BOOST_AUTO_TEST_CASE(TestMultiple) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - Opm::TimeMapPtr timeMap(new Opm::TimeMap(boost::posix_time::ptime(startDate))); - Opm::DynamicVector vector(timeMap , 9.99); - Opm::Events events( timeMap ); - - events.addEvent( Opm::ScheduleEvents::NEW_WELL , 0 ); - BOOST_CHECK( events.hasEvent( Opm::ScheduleEvents::NEW_WELL | Opm::ScheduleEvents::NEW_GROUP , 0 )); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/GeomodifierTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/GeomodifierTests.cpp deleted file mode 100644 index 4e0fa5b1d2..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/GeomodifierTests.cpp +++ /dev/null @@ -1,108 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include -#define BOOST_TEST_MODULE GeoModifiersTests -#include - - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -using namespace Opm; - - -BOOST_AUTO_TEST_CASE( CheckUnsoppertedInSCHEDULE ) { - const char * deckString = - "START\n" - " 10 'JAN' 2000 /\n" - "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 / \n" - "GRID\n" - "DX\n" - "1000*0.25 /\n" - "DY\n" - "1000*0.25 /\n" - "DZ\n" - "1000*0.25 /\n" - "TOPS\n" - "100*0.25 /\n" - "SCHEDULE\n" - "TSTEP -- 1,2\n" - " 10 10/\n" - "MULTFLT\n" - " 'F1' 100 /\n" - "/\n" - "MULTFLT\n" - " 'F2' 77 /\n" - "/\n" - "TSTEP -- 3,4\n" - " 10 10/\n" - "\n"; - - ParseContext parseContext; - Parser parser(true); - - auto deck = parser.parseString( deckString , parseContext ); - EclipseGrid grid( deck ); - - parseContext.update( ParseContext::UNSUPPORTED_SCHEDULE_GEO_MODIFIER , InputError::IGNORE ); - { - Schedule schedule( parseContext , grid , deck ); - auto events = schedule.getEvents( ); - BOOST_CHECK_EQUAL( false , events.hasEvent( ScheduleEvents::GEO_MODIFIER , 1 )); - BOOST_CHECK_EQUAL( true , events.hasEvent( ScheduleEvents::GEO_MODIFIER , 2 )); - BOOST_CHECK_EQUAL( false , events.hasEvent( ScheduleEvents::GEO_MODIFIER , 3 )); - - - BOOST_CHECK( !schedule.getModifierDeck(1) ); - BOOST_CHECK( !schedule.getModifierDeck(3) ); - - std::shared_ptr multflt_deck = schedule.getModifierDeck(2); - BOOST_CHECK_EQUAL( 2U , multflt_deck->size()); - BOOST_CHECK( multflt_deck->hasKeyword() ); - - const auto& multflt1 = multflt_deck->getKeyword(0); - BOOST_CHECK_EQUAL( 1U , multflt1.size( ) ); - - const auto& record0 = multflt1.getRecord( 0 ); - BOOST_CHECK_EQUAL( 100.0 , record0.getItem().get< double >(0)); - BOOST_CHECK_EQUAL( "F1" , record0.getItem().get< std::string >(0)); - - const auto& multflt2 = multflt_deck->getKeyword(1); - BOOST_CHECK_EQUAL( 1U , multflt2.size( ) ); - - const auto& record1 = multflt2.getRecord( 0 ); - BOOST_CHECK_EQUAL( 77.0 , record1.getItem().get< double >(0)); - BOOST_CHECK_EQUAL( "F2" , record1.getItem().get< std::string >(0)); - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/GroupTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/GroupTests.cpp deleted file mode 100644 index e13cf543fb..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/GroupTests.cpp +++ /dev/null @@ -1,348 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include - -#define BOOST_TEST_MODULE GroupTests -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace Opm; - -static Opm::TimeMapPtr createXDaysTimeMap(size_t numDays) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - Opm::TimeMapPtr timeMap(new Opm::TimeMap(boost::posix_time::ptime(startDate))); - for (size_t i = 0; i < numDays; i++) - timeMap->addTStep( boost::posix_time::hours( (i+1) * 24 )); - return timeMap; -} - - - -BOOST_AUTO_TEST_CASE(CreateGroup_CorrectNameAndDefaultValues) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Group group("G1" , timeMap , 0); - BOOST_CHECK_EQUAL( "G1" , group.name() ); -} - - -BOOST_AUTO_TEST_CASE(CreateGroupCreateTimeOK) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Group group("G1" , timeMap , 5); - BOOST_CHECK_EQUAL( false, group.hasBeenDefined( 4 )); - BOOST_CHECK_EQUAL( true, group.hasBeenDefined( 5 )); - BOOST_CHECK_EQUAL( true, group.hasBeenDefined( 6 )); -} - - - -BOOST_AUTO_TEST_CASE(CreateGroup_SetInjectorProducer_CorrectStatusSet) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Group group1("IGROUP" , timeMap , 0); - Opm::Group group2("PGROUP" , timeMap , 0); - - group1.setProductionGroup(0, true); - BOOST_CHECK(group1.isProductionGroup(1)); - BOOST_CHECK(!group1.isInjectionGroup(1)); - group1.setProductionGroup(3, false); - BOOST_CHECK(!group1.isProductionGroup(3)); - BOOST_CHECK(!group1.isInjectionGroup(3)); - - group2.setProductionGroup(0, false); - BOOST_CHECK(!group2.isProductionGroup(1)); - BOOST_CHECK(!group2.isInjectionGroup(1)); - group2.setProductionGroup(3, true); - BOOST_CHECK(group2.isProductionGroup(4)); - BOOST_CHECK(!group2.isInjectionGroup(4)); - group2.setInjectionGroup(4, true); - BOOST_CHECK(group2.isProductionGroup(5)); - BOOST_CHECK(group2.isInjectionGroup(5)); - -} - - -BOOST_AUTO_TEST_CASE(InjectRateOK) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Group group("G1" , timeMap , 0); - BOOST_CHECK_EQUAL( 0 , group.getInjectionRate( 0 )); - group.setInjectionRate( 2 , 100 ); - BOOST_CHECK_EQUAL( 100 , group.getInjectionRate( 2 )); - BOOST_CHECK_EQUAL( 100 , group.getInjectionRate( 8 )); -} - - -BOOST_AUTO_TEST_CASE(ControlModeOK) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Group group("G1" , timeMap , 0); - BOOST_CHECK_EQUAL( Opm::GroupInjection::NONE , group.getInjectionControlMode( 0 )); - group.setInjectionControlMode( 2 , Opm::GroupInjection::RESV ); - BOOST_CHECK_EQUAL( Opm::GroupInjection::RESV , group.getInjectionControlMode( 2 )); - BOOST_CHECK_EQUAL( Opm::GroupInjection::RESV , group.getInjectionControlMode( 8 )); -} - - - -BOOST_AUTO_TEST_CASE(GroupChangePhaseSameTimeThrows) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Group group("G1" , timeMap , 0); - BOOST_CHECK_EQUAL( Opm::Phase::WATER , group.getInjectionPhase( 0 )); // Default phase - assumed WATER - group.setInjectionPhase(5 , Opm::Phase::WATER ); - BOOST_CHECK_THROW( group.setInjectionPhase( 5 , Opm::Phase::GAS ) , std::invalid_argument ); - BOOST_CHECK_NO_THROW( group.setInjectionPhase( 5 , Opm::Phase::WATER )); - BOOST_CHECK_NO_THROW( group.setInjectionPhase( 6 , Opm::Phase::GAS )); - BOOST_CHECK_EQUAL( Opm::Phase::GAS , group.getInjectionPhase( 6 )); - BOOST_CHECK_EQUAL( Opm::Phase::GAS , group.getInjectionPhase( 8 )); -} - - - - -BOOST_AUTO_TEST_CASE(GroupMiscInjection) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Group group("G1" , timeMap , 0); - - group.setSurfaceMaxRate( 3 , 100 ); - BOOST_CHECK_EQUAL( 100 , group.getSurfaceMaxRate( 5 )); - - group.setReservoirMaxRate( 3 , 200 ); - BOOST_CHECK_EQUAL( 200 , group.getReservoirMaxRate( 5 )); - - group.setTargetReinjectFraction( 3 , 300 ); - BOOST_CHECK_EQUAL( 300 , group.getTargetReinjectFraction( 5 )); - - group.setTargetVoidReplacementFraction( 3 , 400 ); - BOOST_CHECK_EQUAL( 400 , group.getTargetVoidReplacementFraction( 5 )); -} - - - -BOOST_AUTO_TEST_CASE(GroupDoesNotHaveWell) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Group group("G1" , timeMap , 0); - - BOOST_CHECK_EQUAL(false , group.hasWell("NO", 2)); - BOOST_CHECK_EQUAL(0U , group.numWells(2)); - BOOST_CHECK_THROW(group.getWell("NO" , 2) , std::invalid_argument); -} - - -BOOST_AUTO_TEST_CASE(GroupAddWell) { - - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Group group("G1" , timeMap , 0); - auto well1 = std::make_shared< Well >("WELL1", 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::OIL, timeMap, 0); - auto well2 = std::make_shared< Well >("WELL2", 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::OIL, timeMap, 0); - - BOOST_CHECK_EQUAL(0U , group.numWells(2)); - group.addWell( 3 , well1.get() ); - BOOST_CHECK_EQUAL( 1U , group.numWells(3)); - BOOST_CHECK_EQUAL( 0U , group.numWells(1)); - - group.addWell( 4 , well1.get() ); - BOOST_CHECK_EQUAL( 1U , group.numWells(4)); - BOOST_CHECK_EQUAL( 0U , group.numWells(1)); - BOOST_CHECK_EQUAL( 1U , group.numWells(5)); - - group.addWell( 6 , well2.get() ); - BOOST_CHECK_EQUAL( 1U , group.numWells(4)); - BOOST_CHECK_EQUAL( 0U , group.numWells(1)); - BOOST_CHECK_EQUAL( 1U , group.numWells(5)); - BOOST_CHECK_EQUAL( 2U , group.numWells(6)); - BOOST_CHECK_EQUAL( 2U , group.numWells(8)); - - BOOST_CHECK(group.hasWell("WELL1" , 8 )); - BOOST_CHECK(group.hasWell("WELL2" , 8 )); - - BOOST_CHECK_EQUAL(false , group.hasWell("WELL1" , 0 )); - BOOST_CHECK_EQUAL(false , group.hasWell("WELL2" , 0 )); - - BOOST_CHECK_EQUAL(true , group.hasWell("WELL1" , 5 )); - BOOST_CHECK_EQUAL(false , group.hasWell("WELL2" , 5 )); - -} - - - -BOOST_AUTO_TEST_CASE(GroupAddAndDelWell) { - - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Group group("G1" , timeMap , 0); - auto well1 = std::make_shared< Well >("WELL1", 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::OIL, timeMap, 0); - auto well2 = std::make_shared< Well >("WELL2", 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::OIL, timeMap, 0); - - BOOST_CHECK_EQUAL(0U , group.numWells(2)); - group.addWell( 3 , well1.get() ); - BOOST_CHECK_EQUAL( 1U , group.numWells(3)); - BOOST_CHECK_EQUAL( 0U , group.numWells(1)); - - group.addWell( 6 , well2.get() ); - BOOST_CHECK_EQUAL( 1U , group.numWells(4)); - BOOST_CHECK_EQUAL( 0U , group.numWells(1)); - BOOST_CHECK_EQUAL( 1U , group.numWells(5)); - BOOST_CHECK_EQUAL( 2U , group.numWells(6)); - BOOST_CHECK_EQUAL( 2U , group.numWells(8)); - - group.delWell( 7 , "WELL1"); - BOOST_CHECK_EQUAL(false , group.hasWell("WELL1" , 7)); - BOOST_CHECK_EQUAL(true , group.hasWell("WELL2" , 7)); - BOOST_CHECK_EQUAL( 1U , group.numWells(7)); - BOOST_CHECK_EQUAL( 2U , group.numWells(6)); - - - group.delWell( 8 , "WELL2"); - BOOST_CHECK_EQUAL(false , group.hasWell("WELL1" , 8)); - BOOST_CHECK_EQUAL(false , group.hasWell("WELL2" , 8)); - BOOST_CHECK_EQUAL( 0U , group.numWells(8)); - BOOST_CHECK_EQUAL( 1U , group.numWells(7)); - BOOST_CHECK_EQUAL( 2U , group.numWells(6)); - - BOOST_CHECK_THROW( group.delWell( 8 , "WeLLDOESNOT" ) , std::invalid_argument); - BOOST_CHECK_THROW( group.delWell( 8 , "WELL1" ) , std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(getWells) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Group group("G1" , timeMap , 0); - auto well1 = std::make_shared< Well >("WELL1", 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::OIL, timeMap, 0); - auto well2 = std::make_shared< Well >("WELL2", 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::OIL, timeMap, 0); - - group.addWell( 2 , well1.get() ); - group.addWell( 3 , well1.get() ); - group.addWell( 3 , well2.get() ); - group.addWell( 4 , well1.get() ); - - std::vector< std::string > names = { "WELL1", "WELL2" }; - std::vector< std::string > wnames; - for( const auto& pair : group.getWells( 3 ) ) - wnames.push_back( pair.first ); - - BOOST_CHECK_EQUAL_COLLECTIONS( names.begin(), names.end(), - wnames.begin(), wnames.end() ); - - const auto& wells = group.getWells( 3 ); - BOOST_CHECK_EQUAL( wells.size(), 2U ); - BOOST_CHECK( wells.hasWell( "WELL1" ) ); - BOOST_CHECK( wells.hasWell( "WELL2" ) ); - - BOOST_CHECK_EQUAL( group.getWells( 0 ).size(), 0U ); - BOOST_CHECK_EQUAL( group.getWells( 2 ).size(), 1U ); - BOOST_CHECK( group.getWells( 2 ).hasWell( "WELL1" ) ); - BOOST_CHECK( !group.getWells( 2 ).hasWell( "WELL2" ) ); - BOOST_CHECK_EQUAL( group.getWells( 4 ).size(), 2U ); - BOOST_CHECK( group.getWells( 4 ).hasWell( "WELL1" ) ); - BOOST_CHECK( group.getWells( 4 ).hasWell( "WELL2" ) ); - -} - -BOOST_AUTO_TEST_CASE(createDeckWithGEFAC) { - Opm::Parser parser; - std::string input = - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - - "WELSPECS\n" - " 'B-37T2' 'PRODUC' 9 9 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - " 'B-43A' 'PRODUC' 8 8 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - "/\n" - - "COMPDAT\n" - " 'B-37T2' 9 9 1 1 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'B-43A' 8 8 2 2 'OPEN' 1* 46.825 0.311 4332.346 1* 1* 'X' 22.123 / \n" - "/\n" - - "GEFAC\n" - " 'PRODUC' 0.85 / \n" - "/\n"; - - Opm::ParseContext parseContext; - Opm::DeckPtr deck = parser.parseString(input, parseContext); - EclipseGrid grid(10,10,10); - Opm::Schedule schedule(parseContext , grid, deck ); - - const auto& group1 = schedule.getGroup("PRODUC"); - BOOST_CHECK_EQUAL(group1.getGroupEfficiencyFactor(0), 0.85); - BOOST_CHECK(group1.getTransferGroupEfficiencyFactor(0)); -} - - - -BOOST_AUTO_TEST_CASE(createDeckWithWGRUPCONandWCONPROD) { - - /* Test deck with well guide rates for group control: - GRUPCON (well guide rates for group control) - WCONPROD (conrol data for production wells) with GRUP control mode */ - - Opm::Parser parser; - std::string input = - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - - "WELSPECS\n" - " 'B-37T2' 'PRODUC' 9 9 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - " 'B-43A' 'PRODUC' 8 8 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - "/\n" - - "COMPDAT\n" - " 'B-37T2' 9 9 1 1 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'B-43A' 8 8 2 2 'OPEN' 1* 46.825 0.311 4332.346 1* 1* 'X' 22.123 / \n" - "/\n" - - - "WGRUPCON\n" - " 'B-37T2' YES 30 OIL / \n" - " 'B-43A' YES 30 OIL / \n" - "/\n" - - "WCONPROD\n" - " 'B-37T2' 'OPEN' 'GRUP' 1000 2* 2000.000 2* 1* 10 200000.000 5* / / \n" - " 'B-43A' 'OPEN' 'GRUP' 1200 2* 3000.000 2* 1* 11 0.000 5* / / \n" - "/\n"; - - - - Opm::ParseContext parseContext; - Opm::DeckPtr deck = parser.parseString(input, parseContext); - EclipseGrid grid(10,10,10); - Opm::Schedule schedule(parseContext , grid, deck ); - const auto* currentWell = schedule.getWell("B-37T2"); - const Opm::WellProductionProperties& wellProductionProperties = currentWell->getProductionProperties(0); - BOOST_CHECK_EQUAL(wellProductionProperties.controlMode, Opm::WellProducer::ControlModeEnum::GRUP); - - BOOST_CHECK_EQUAL(currentWell->isAvailableForGroupControl(0), true); - BOOST_CHECK_EQUAL(currentWell->getGuideRate(0), 30); - BOOST_CHECK_EQUAL(currentWell->getGuideRatePhase(0), Opm::GuideRate::OIL); - BOOST_CHECK_EQUAL(currentWell->getGuideRateScalingFactor(0), 1.0); - - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/GroupTreeNodeTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/GroupTreeNodeTests.cpp deleted file mode 100644 index 4b9f40f6f7..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/GroupTreeNodeTests.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include - -#define BOOST_TEST_MODULE GroupTreeNodeTests - -#include - -#include - - -using namespace Opm; - -BOOST_AUTO_TEST_CASE(CreateFieldNode) { - GroupTreeNodePtr node = GroupTreeNode::createFieldNode(); - BOOST_CHECK_EQUAL("FIELD", node->name()); -} - -BOOST_AUTO_TEST_CASE(CreateChild_WithFieldParent_ParentHasChild) { - GroupTreeNodePtr fieldNode = GroupTreeNode::createFieldNode(); - BOOST_CHECK(!fieldNode->hasChildGroup("Child")); - GroupTreeNodePtr child = fieldNode->addChildGroup("Child"); - BOOST_REQUIRE(fieldNode->hasChildGroup("Child")); - BOOST_CHECK_EQUAL(child, fieldNode->getChildGroup("Child")); -} - -BOOST_AUTO_TEST_CASE(CreateChildGroup_ChildExists_Throws) { - GroupTreeNodePtr fieldNode = GroupTreeNode::createFieldNode(); - GroupTreeNodePtr child = fieldNode->addChildGroup("Child"); - BOOST_CHECK_THROW(fieldNode->addChildGroup("Child"), std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(GetChildGroup_ChildNotExisting_Throws) { - GroupTreeNodePtr fieldNode = GroupTreeNode::createFieldNode(); - GroupTreeNodePtr child = fieldNode->addChildGroup("Child2"); - BOOST_CHECK_THROW(fieldNode->getChildGroup("Child"), std::invalid_argument); -} - - -BOOST_AUTO_TEST_CASE(RemoveChild_ChildNonExisting_Throws) { - GroupTreeNodePtr fieldNodeDummy = GroupTreeNode::createFieldNode(); - GroupTreeNodePtr fieldNode = GroupTreeNode::createFieldNode(); - GroupTreeNodePtr child = fieldNode->addChildGroup("Child1"); - BOOST_CHECK_THROW(fieldNode->removeChild(fieldNodeDummy), std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(RemoveChild_RemoveTwice_Throws) { - GroupTreeNodePtr fieldNodeDummy = GroupTreeNode::createFieldNode(); - GroupTreeNodePtr fieldNode = GroupTreeNode::createFieldNode(); - GroupTreeNodePtr child = fieldNode->addChildGroup("Child1"); - BOOST_CHECK_NO_THROW(fieldNode->removeChild(child));; - BOOST_CHECK_THROW(fieldNode->removeChild(child), std::invalid_argument); - -} - -BOOST_AUTO_TEST_CASE(RemoveChild_ChildExists_ChildRemoved) { - GroupTreeNodePtr fieldNode = GroupTreeNode::createFieldNode(); - GroupTreeNodePtr child = fieldNode->addChildGroup("Child1"); - BOOST_CHECK_NO_THROW(fieldNode->removeChild(child)); - BOOST_CHECK(!fieldNode->hasChildGroup("Child1")); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/GroupTreeTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/GroupTreeTests.cpp deleted file mode 100644 index 91338de194..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/GroupTreeTests.cpp +++ /dev/null @@ -1,169 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include - -#define BOOST_TEST_MODULE GroupTreeTests - -#include - -#include -#include - - - -using namespace Opm; - -BOOST_AUTO_TEST_CASE(CreateGroupTree_DefaultConstructor_HasFieldNode) { - GroupTree tree; - BOOST_CHECK(tree.getNode("FIELD")); -} - -BOOST_AUTO_TEST_CASE(GetNode_NonExistingNode_ReturnsNull) { - GroupTree tree; - BOOST_CHECK_EQUAL(GroupTreeNodePtr(), tree.getNode("Non-existing")); -} - -BOOST_AUTO_TEST_CASE(GetNodeAndParent_AllOK) { - GroupTree tree; - tree.updateTree("GRANDPARENT", "FIELD"); - tree.updateTree("PARENT", "GRANDPARENT"); - tree.updateTree("GRANDCHILD", "PARENT"); - - GroupTreeNodePtr grandchild = tree.getNode("GRANDCHILD"); - BOOST_CHECK(grandchild); - GroupTreeNodePtr parent = tree.getParent("GRANDCHILD"); - BOOST_CHECK_EQUAL("PARENT", parent->name()); - BOOST_CHECK(parent->hasChildGroup("GRANDCHILD")); -} - -BOOST_AUTO_TEST_CASE(UpdateTree_ParentNotSpecified_AddedUnderField) { - GroupTree tree; - tree.updateTree("CHILD_OF_FIELD"); - BOOST_CHECK(tree.getNode("CHILD_OF_FIELD")); - GroupTreeNodePtr rootNode = tree.getNode("FIELD"); - BOOST_CHECK(rootNode->hasChildGroup("CHILD_OF_FIELD")); -} - -BOOST_AUTO_TEST_CASE(UpdateTree_ParentIsField_AddedUnderField) { - GroupTree tree; - tree.updateTree("CHILD_OF_FIELD", "FIELD"); - BOOST_CHECK(tree.getNode("CHILD_OF_FIELD")); - GroupTreeNodePtr rootNode = tree.getNode("FIELD"); - BOOST_CHECK(rootNode->hasChildGroup("CHILD_OF_FIELD")); -} - -BOOST_AUTO_TEST_CASE(UpdateTree_ParentNotAdded_ChildAndParentAdded) { - GroupTree tree; - tree.updateTree("CHILD", "NEWPARENT"); - BOOST_CHECK(tree.getNode("CHILD")); - GroupTreeNodePtr rootNode = tree.getNode("FIELD"); - BOOST_CHECK(rootNode->hasChildGroup("NEWPARENT")); - GroupTreeNodePtr newParent = tree.getNode("NEWPARENT"); - BOOST_CHECK(newParent->hasChildGroup("CHILD")); -} - -BOOST_AUTO_TEST_CASE(UpdateTree_AddFieldNode_Throws) { - GroupTree tree; - BOOST_CHECK_THROW(tree.updateTree("FIELD", "NEWPARENT"), std::domain_error); - BOOST_CHECK_THROW(tree.updateTree("FIELD"), std::domain_error); -} - -BOOST_AUTO_TEST_CASE(UpdateTree_ChildExists_ChildMoved) { - GroupTree tree; - tree.updateTree("OLDPARENT", "FIELD"); - tree.updateTree("NEWPARENT", "FIELD"); - tree.updateTree("THECHILD", "OLDPARENT"); - tree.updateTree("GRANDCHILD1", "THECHILD"); - tree.updateTree("GRANDCHILD2", "THECHILD"); - - GroupTreeNodePtr oldParent = tree.getNode("OLDPARENT"); - BOOST_CHECK(oldParent->hasChildGroup("THECHILD")); - GroupTreeNodePtr theChild = oldParent->getChildGroup("THECHILD"); - BOOST_CHECK(theChild->hasChildGroup("GRANDCHILD1")); - - GroupTreeNodePtr newParent = tree.getNode("NEWPARENT"); - BOOST_CHECK(!newParent->hasChildGroup("THECHILD")); - - tree.updateTree("THECHILD", "NEWPARENT"); - - BOOST_CHECK(!oldParent->hasChildGroup("THECHILD")); - - BOOST_CHECK(newParent->hasChildGroup("THECHILD")); - theChild = newParent->getChildGroup("THECHILD"); - BOOST_CHECK(theChild->hasChildGroup("GRANDCHILD1")); -} - -BOOST_AUTO_TEST_CASE(DeepCopy_TreeWithChildren_ObjectsDifferContentMatch) { - GroupTreePtr tree(new GroupTree()); - tree->updateTree("L1CHILD1", "FIELD"); - tree->updateTree("L1CHILD2", "FIELD"); - tree->updateTree("L2CHILD1", "L1CHILD1"); - tree->updateTree("L2CHILD2", "L1CHILD1"); - tree->updateTree("L3CHILD1", "L2CHILD1"); - - GroupTreePtr copiedTree = tree->deepCopy(); - GroupTreeNodePtr fieldNodeCopy = copiedTree->getNode("FIELD"); - GroupTreeNodePtr fieldNodeOriginal = tree->getNode("FIELD"); - BOOST_CHECK(!(fieldNodeCopy == fieldNodeOriginal)); - BOOST_CHECK_EQUAL(fieldNodeCopy->name(), fieldNodeOriginal->name()); - - GroupTreeNodePtr L1CHILD1NodeCopy = fieldNodeCopy->getChildGroup("L1CHILD1"); - GroupTreeNodePtr L1CHILD1NodeOriginal = fieldNodeOriginal->getChildGroup("L1CHILD1"); - BOOST_CHECK(!(L1CHILD1NodeCopy == L1CHILD1NodeOriginal)); - BOOST_CHECK_EQUAL(L1CHILD1NodeCopy->name(), L1CHILD1NodeOriginal->name()); - - GroupTreeNodePtr L1CHILD2NodeCopy = fieldNodeCopy->getChildGroup("L1CHILD2"); - GroupTreeNodePtr L1CHILD2NodeOriginal = fieldNodeOriginal->getChildGroup("L1CHILD2"); - BOOST_CHECK(!(L1CHILD2NodeCopy == L1CHILD2NodeOriginal)); - BOOST_CHECK_EQUAL(L1CHILD2NodeCopy->name(), L1CHILD2NodeOriginal->name()); - - GroupTreeNodePtr L2CHILD1NodeCopy = L1CHILD1NodeCopy->getChildGroup("L2CHILD1"); - GroupTreeNodePtr L2CHILD1NodeOriginal = L1CHILD1NodeOriginal->getChildGroup("L2CHILD1"); - BOOST_CHECK(!(L2CHILD1NodeCopy == L2CHILD1NodeOriginal)); - BOOST_CHECK_EQUAL(L2CHILD1NodeCopy->name(), L2CHILD1NodeOriginal->name()); - - GroupTreeNodePtr L2CHILD2NodeCopy = L1CHILD1NodeCopy->getChildGroup("L2CHILD2"); - GroupTreeNodePtr L2CHILD2NodeOriginal = L1CHILD1NodeOriginal->getChildGroup("L2CHILD2"); - BOOST_CHECK(!(L2CHILD2NodeCopy == L2CHILD2NodeOriginal)); - BOOST_CHECK_EQUAL(L2CHILD2NodeCopy->name(), L2CHILD2NodeOriginal->name()); - - GroupTreeNodePtr L3CHILD1NodeCopy = L2CHILD1NodeCopy->getChildGroup("L3CHILD1"); - GroupTreeNodePtr L3CHILD1NodeOriginal = L2CHILD1NodeOriginal->getChildGroup("L3CHILD1"); - BOOST_CHECK(!(L3CHILD1NodeCopy == L3CHILD1NodeOriginal)); - BOOST_CHECK_EQUAL(L3CHILD1NodeCopy->name(), L3CHILD1NodeOriginal->name()); -} - -BOOST_AUTO_TEST_CASE(GetNodes_ReturnsAllNodes) { - GroupTreePtr tree(new GroupTree()); - tree->updateTree("L1CHILD1", "FIELD"); - tree->updateTree("L1CHILD2", "FIELD"); - tree->updateTree("L2CHILD1", "L1CHILD1"); - tree->updateTree("L2CHILD2", "L1CHILD1"); - tree->updateTree("L3CHILD1", "L2CHILD1"); - - std::vector nodes = tree->getNodes(); - BOOST_CHECK_EQUAL(6U, nodes.size()); - BOOST_CHECK_EQUAL("FIELD", nodes[0U]->name()); - BOOST_CHECK_EQUAL("L1CHILD1", nodes[1U]->name()); - BOOST_CHECK_EQUAL("L2CHILD1", nodes[2U]->name()); - BOOST_CHECK_EQUAL("L3CHILD1", nodes[3U]->name()); - BOOST_CHECK_EQUAL("L2CHILD2", nodes[4U]->name()); - BOOST_CHECK_EQUAL("L1CHILD2", nodes[5U]->name()); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/ScheduleEnumTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/ScheduleEnumTests.cpp deleted file mode 100644 index fbb584439e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/ScheduleEnumTests.cpp +++ /dev/null @@ -1,473 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - -#define BOOST_TEST_MODULE ParserEnumTests -#include - -#include - -using namespace Opm; - -BOOST_AUTO_TEST_CASE(TestCompletionStateEnum2String) { - BOOST_CHECK_EQUAL( "AUTO" , WellCompletion::StateEnum2String(WellCompletion::AUTO)); - BOOST_CHECK_EQUAL( "OPEN" , WellCompletion::StateEnum2String(WellCompletion::OPEN)); - BOOST_CHECK_EQUAL( "SHUT" , WellCompletion::StateEnum2String(WellCompletion::SHUT)); -} - - -BOOST_AUTO_TEST_CASE(TestCompletionStateEnumFromString) { - BOOST_CHECK_THROW( WellCompletion::StateEnumFromString("XXX") , std::invalid_argument ); - BOOST_CHECK_EQUAL( WellCompletion::AUTO , WellCompletion::StateEnumFromString("AUTO")); - BOOST_CHECK_EQUAL( WellCompletion::SHUT , WellCompletion::StateEnumFromString("SHUT")); - BOOST_CHECK_EQUAL( WellCompletion::SHUT , WellCompletion::StateEnumFromString("STOP")); - BOOST_CHECK_EQUAL( WellCompletion::OPEN , WellCompletion::StateEnumFromString("OPEN")); -} - - - -BOOST_AUTO_TEST_CASE(TestCompletionStateEnumLoop) { - BOOST_CHECK_EQUAL( WellCompletion::AUTO , WellCompletion::StateEnumFromString( WellCompletion::StateEnum2String( WellCompletion::AUTO ) )); - BOOST_CHECK_EQUAL( WellCompletion::SHUT , WellCompletion::StateEnumFromString( WellCompletion::StateEnum2String( WellCompletion::SHUT ) )); - BOOST_CHECK_EQUAL( WellCompletion::OPEN , WellCompletion::StateEnumFromString( WellCompletion::StateEnum2String( WellCompletion::OPEN ) )); - - BOOST_CHECK_EQUAL( "AUTO" , WellCompletion::StateEnum2String(WellCompletion::StateEnumFromString( "AUTO" ) )); - BOOST_CHECK_EQUAL( "OPEN" , WellCompletion::StateEnum2String(WellCompletion::StateEnumFromString( "OPEN" ) )); - BOOST_CHECK_EQUAL( "SHUT" , WellCompletion::StateEnum2String(WellCompletion::StateEnumFromString( "SHUT" ) )); -} - - -/*****************************************************************/ - -BOOST_AUTO_TEST_CASE(TestCompletionDirectionEnum2String) -{ - using namespace WellCompletion; - - BOOST_CHECK_EQUAL("X", DirectionEnum2String(DirectionEnum::X)); - BOOST_CHECK_EQUAL("Y", DirectionEnum2String(DirectionEnum::Y)); - BOOST_CHECK_EQUAL("Z", DirectionEnum2String(DirectionEnum::Z)); -} - -BOOST_AUTO_TEST_CASE(TestCompletionDirectionEnumFromString) -{ - using namespace WellCompletion; - - BOOST_CHECK_THROW(DirectionEnumFromString("XXX"), std::invalid_argument); - - BOOST_CHECK_EQUAL(DirectionEnum::X, DirectionEnumFromString("X")); - BOOST_CHECK_EQUAL(DirectionEnum::Y, DirectionEnumFromString("Y")); - BOOST_CHECK_EQUAL(DirectionEnum::Z, DirectionEnumFromString("Z")); -} - -BOOST_AUTO_TEST_CASE(TestCompletionDirectionEnumLoop) -{ - using namespace WellCompletion; - - BOOST_CHECK_EQUAL(DirectionEnum::X, DirectionEnumFromString(DirectionEnum2String(DirectionEnum::X))); - BOOST_CHECK_EQUAL(DirectionEnum::Y, DirectionEnumFromString(DirectionEnum2String(DirectionEnum::Y))); - BOOST_CHECK_EQUAL(DirectionEnum::Z, DirectionEnumFromString(DirectionEnum2String(DirectionEnum::Z))); - - BOOST_CHECK_EQUAL("X", DirectionEnum2String(DirectionEnumFromString("X"))); - BOOST_CHECK_EQUAL("Y", DirectionEnum2String(DirectionEnumFromString("Y"))); - BOOST_CHECK_EQUAL("Z", DirectionEnum2String(DirectionEnumFromString("Z"))); -} - -/*****************************************************************/ - -BOOST_AUTO_TEST_CASE(TestGroupInjectionControlEnum2String) { - BOOST_CHECK_EQUAL( "NONE" , GroupInjection::ControlEnum2String(GroupInjection::NONE)); - BOOST_CHECK_EQUAL( "RATE" , GroupInjection::ControlEnum2String(GroupInjection::RATE)); - BOOST_CHECK_EQUAL( "RESV" , GroupInjection::ControlEnum2String(GroupInjection::RESV)); - BOOST_CHECK_EQUAL( "REIN" , GroupInjection::ControlEnum2String(GroupInjection::REIN)); - BOOST_CHECK_EQUAL( "VREP" , GroupInjection::ControlEnum2String(GroupInjection::VREP)); - BOOST_CHECK_EQUAL( "FLD" , GroupInjection::ControlEnum2String(GroupInjection::FLD)); -} - - -BOOST_AUTO_TEST_CASE(TestGroupInjectionControlEnumFromString) { - BOOST_CHECK_THROW( GroupInjection::ControlEnumFromString("XXX") , std::invalid_argument ); - BOOST_CHECK_EQUAL( GroupInjection::NONE , GroupInjection::ControlEnumFromString("NONE")); - BOOST_CHECK_EQUAL( GroupInjection::RATE , GroupInjection::ControlEnumFromString("RATE")); - BOOST_CHECK_EQUAL( GroupInjection::RESV , GroupInjection::ControlEnumFromString("RESV")); - BOOST_CHECK_EQUAL( GroupInjection::REIN , GroupInjection::ControlEnumFromString("REIN")); - BOOST_CHECK_EQUAL( GroupInjection::VREP , GroupInjection::ControlEnumFromString("VREP")); - BOOST_CHECK_EQUAL( GroupInjection::FLD , GroupInjection::ControlEnumFromString("FLD")); -} - - - -BOOST_AUTO_TEST_CASE(TestGroupInjectionControlEnumLoop) { - BOOST_CHECK_EQUAL( GroupInjection::NONE , GroupInjection::ControlEnumFromString( GroupInjection::ControlEnum2String( GroupInjection::NONE ) )); - BOOST_CHECK_EQUAL( GroupInjection::RATE , GroupInjection::ControlEnumFromString( GroupInjection::ControlEnum2String( GroupInjection::RATE ) )); - BOOST_CHECK_EQUAL( GroupInjection::RESV , GroupInjection::ControlEnumFromString( GroupInjection::ControlEnum2String( GroupInjection::RESV ) )); - BOOST_CHECK_EQUAL( GroupInjection::REIN , GroupInjection::ControlEnumFromString( GroupInjection::ControlEnum2String( GroupInjection::REIN ) )); - BOOST_CHECK_EQUAL( GroupInjection::VREP , GroupInjection::ControlEnumFromString( GroupInjection::ControlEnum2String( GroupInjection::VREP ) )); - BOOST_CHECK_EQUAL( GroupInjection::FLD , GroupInjection::ControlEnumFromString( GroupInjection::ControlEnum2String( GroupInjection::FLD ) )); - - BOOST_CHECK_EQUAL( "NONE" , GroupInjection::ControlEnum2String(GroupInjection::ControlEnumFromString( "NONE" ) )); - BOOST_CHECK_EQUAL( "RATE" , GroupInjection::ControlEnum2String(GroupInjection::ControlEnumFromString( "RATE" ) )); - BOOST_CHECK_EQUAL( "RESV" , GroupInjection::ControlEnum2String(GroupInjection::ControlEnumFromString( "RESV" ) )); - BOOST_CHECK_EQUAL( "REIN" , GroupInjection::ControlEnum2String(GroupInjection::ControlEnumFromString( "REIN" ) )); - BOOST_CHECK_EQUAL( "VREP" , GroupInjection::ControlEnum2String(GroupInjection::ControlEnumFromString( "VREP" ) )); - BOOST_CHECK_EQUAL( "FLD" , GroupInjection::ControlEnum2String(GroupInjection::ControlEnumFromString( "FLD" ) )); -} - -/*****************************************************************/ - -BOOST_AUTO_TEST_CASE(TestGroupProductionControlEnum2String) { - BOOST_CHECK_EQUAL( "NONE" , GroupProduction::ControlEnum2String(GroupProduction::NONE)); - BOOST_CHECK_EQUAL( "ORAT" , GroupProduction::ControlEnum2String(GroupProduction::ORAT)); - BOOST_CHECK_EQUAL( "WRAT" , GroupProduction::ControlEnum2String(GroupProduction::WRAT)); - BOOST_CHECK_EQUAL( "GRAT" , GroupProduction::ControlEnum2String(GroupProduction::GRAT)); - BOOST_CHECK_EQUAL( "LRAT" , GroupProduction::ControlEnum2String(GroupProduction::LRAT)); - BOOST_CHECK_EQUAL( "CRAT" , GroupProduction::ControlEnum2String(GroupProduction::CRAT)); - BOOST_CHECK_EQUAL( "RESV" , GroupProduction::ControlEnum2String(GroupProduction::RESV)); - BOOST_CHECK_EQUAL( "PRBL" , GroupProduction::ControlEnum2String(GroupProduction::PRBL)); -} - - -BOOST_AUTO_TEST_CASE(TestGroupProductionControlEnumFromString) { - BOOST_CHECK_THROW( GroupProduction::ControlEnumFromString("XXX") , std::invalid_argument ); - BOOST_CHECK_EQUAL(GroupProduction::NONE , GroupProduction::ControlEnumFromString("NONE")); - BOOST_CHECK_EQUAL(GroupProduction::ORAT , GroupProduction::ControlEnumFromString("ORAT")); - BOOST_CHECK_EQUAL(GroupProduction::WRAT , GroupProduction::ControlEnumFromString("WRAT")); - BOOST_CHECK_EQUAL(GroupProduction::GRAT , GroupProduction::ControlEnumFromString("GRAT")); - BOOST_CHECK_EQUAL(GroupProduction::LRAT , GroupProduction::ControlEnumFromString("LRAT")); - BOOST_CHECK_EQUAL(GroupProduction::CRAT , GroupProduction::ControlEnumFromString("CRAT")); - BOOST_CHECK_EQUAL(GroupProduction::RESV , GroupProduction::ControlEnumFromString("RESV")); - BOOST_CHECK_EQUAL(GroupProduction::PRBL , GroupProduction::ControlEnumFromString("PRBL")); -} - - - -BOOST_AUTO_TEST_CASE(TestGroupProductionControlEnumLoop) { - BOOST_CHECK_EQUAL( GroupProduction::NONE, GroupProduction::ControlEnumFromString( GroupProduction::ControlEnum2String( GroupProduction::NONE ) )); - BOOST_CHECK_EQUAL( GroupProduction::ORAT, GroupProduction::ControlEnumFromString( GroupProduction::ControlEnum2String( GroupProduction::ORAT ) )); - BOOST_CHECK_EQUAL( GroupProduction::WRAT, GroupProduction::ControlEnumFromString( GroupProduction::ControlEnum2String( GroupProduction::WRAT ) )); - BOOST_CHECK_EQUAL( GroupProduction::GRAT, GroupProduction::ControlEnumFromString( GroupProduction::ControlEnum2String( GroupProduction::GRAT ) )); - BOOST_CHECK_EQUAL( GroupProduction::LRAT, GroupProduction::ControlEnumFromString( GroupProduction::ControlEnum2String( GroupProduction::LRAT ) )); - BOOST_CHECK_EQUAL( GroupProduction::CRAT, GroupProduction::ControlEnumFromString( GroupProduction::ControlEnum2String( GroupProduction::CRAT ) )); - BOOST_CHECK_EQUAL( GroupProduction::RESV, GroupProduction::ControlEnumFromString( GroupProduction::ControlEnum2String( GroupProduction::RESV ) )); - BOOST_CHECK_EQUAL( GroupProduction::PRBL, GroupProduction::ControlEnumFromString( GroupProduction::ControlEnum2String( GroupProduction::PRBL ) )); - - BOOST_CHECK_EQUAL( "NONE" , GroupProduction::ControlEnum2String(GroupProduction::ControlEnumFromString( "NONE" ) )); - BOOST_CHECK_EQUAL( "ORAT" , GroupProduction::ControlEnum2String(GroupProduction::ControlEnumFromString( "ORAT" ) )); - BOOST_CHECK_EQUAL( "WRAT" , GroupProduction::ControlEnum2String(GroupProduction::ControlEnumFromString( "WRAT" ) )); - BOOST_CHECK_EQUAL( "GRAT" , GroupProduction::ControlEnum2String(GroupProduction::ControlEnumFromString( "GRAT" ) )); - BOOST_CHECK_EQUAL( "LRAT" , GroupProduction::ControlEnum2String(GroupProduction::ControlEnumFromString( "LRAT" ) )); - BOOST_CHECK_EQUAL( "CRAT" , GroupProduction::ControlEnum2String(GroupProduction::ControlEnumFromString( "CRAT" ) )); - BOOST_CHECK_EQUAL( "RESV" , GroupProduction::ControlEnum2String(GroupProduction::ControlEnumFromString( "RESV" ) )); - BOOST_CHECK_EQUAL( "PRBL" , GroupProduction::ControlEnum2String(GroupProduction::ControlEnumFromString( "PRBL" ) )); -} - -/*****************************************************************/ - -BOOST_AUTO_TEST_CASE(TestGroupProductionExceedLimitControlEnum2String) { - BOOST_CHECK_EQUAL( "NONE" , GroupProductionExceedLimit::ActionEnum2String(GroupProductionExceedLimit::NONE)); - BOOST_CHECK_EQUAL( "CON" , GroupProductionExceedLimit::ActionEnum2String(GroupProductionExceedLimit::CON)); - BOOST_CHECK_EQUAL( "+CON" , GroupProductionExceedLimit::ActionEnum2String(GroupProductionExceedLimit::CON_PLUS)); - BOOST_CHECK_EQUAL( "WELL" , GroupProductionExceedLimit::ActionEnum2String(GroupProductionExceedLimit::WELL)); - BOOST_CHECK_EQUAL( "PLUG" , GroupProductionExceedLimit::ActionEnum2String(GroupProductionExceedLimit::PLUG)); - BOOST_CHECK_EQUAL( "RATE" , GroupProductionExceedLimit::ActionEnum2String(GroupProductionExceedLimit::RATE)); -} - - -BOOST_AUTO_TEST_CASE(TestGroupProductionExceedLimitActionEnumFromString) { - BOOST_CHECK_THROW( GroupProductionExceedLimit::ActionEnumFromString("XXX") , std::invalid_argument ); - - BOOST_CHECK_EQUAL(GroupProductionExceedLimit::NONE , GroupProductionExceedLimit::ActionEnumFromString("NONE")); - BOOST_CHECK_EQUAL(GroupProductionExceedLimit::CON , GroupProductionExceedLimit::ActionEnumFromString("CON" )); - BOOST_CHECK_EQUAL(GroupProductionExceedLimit::CON_PLUS , GroupProductionExceedLimit::ActionEnumFromString("+CON")); - BOOST_CHECK_EQUAL(GroupProductionExceedLimit::WELL , GroupProductionExceedLimit::ActionEnumFromString("WELL")); - BOOST_CHECK_EQUAL(GroupProductionExceedLimit::PLUG , GroupProductionExceedLimit::ActionEnumFromString("PLUG")); - BOOST_CHECK_EQUAL(GroupProductionExceedLimit::RATE , GroupProductionExceedLimit::ActionEnumFromString("RATE")); -} - - - -BOOST_AUTO_TEST_CASE(TestGroupProductionExceedLimitActionEnumLoop) { - BOOST_CHECK_EQUAL( GroupProductionExceedLimit::NONE , GroupProductionExceedLimit::ActionEnumFromString( GroupProductionExceedLimit::ActionEnum2String( GroupProductionExceedLimit::NONE ) )); - BOOST_CHECK_EQUAL( GroupProductionExceedLimit::CON , GroupProductionExceedLimit::ActionEnumFromString( GroupProductionExceedLimit::ActionEnum2String( GroupProductionExceedLimit::CON ) )); - BOOST_CHECK_EQUAL( GroupProductionExceedLimit::CON_PLUS , GroupProductionExceedLimit::ActionEnumFromString( GroupProductionExceedLimit::ActionEnum2String( GroupProductionExceedLimit::CON_PLUS ) )); - BOOST_CHECK_EQUAL( GroupProductionExceedLimit::WELL , GroupProductionExceedLimit::ActionEnumFromString( GroupProductionExceedLimit::ActionEnum2String( GroupProductionExceedLimit::WELL ) )); - BOOST_CHECK_EQUAL( GroupProductionExceedLimit::PLUG , GroupProductionExceedLimit::ActionEnumFromString( GroupProductionExceedLimit::ActionEnum2String( GroupProductionExceedLimit::PLUG ) )); - BOOST_CHECK_EQUAL( GroupProductionExceedLimit::RATE , GroupProductionExceedLimit::ActionEnumFromString( GroupProductionExceedLimit::ActionEnum2String( GroupProductionExceedLimit::RATE ) )); - - BOOST_CHECK_EQUAL("NONE" , GroupProductionExceedLimit::ActionEnum2String(GroupProductionExceedLimit::ActionEnumFromString( "NONE" ) )); - BOOST_CHECK_EQUAL("CON" , GroupProductionExceedLimit::ActionEnum2String(GroupProductionExceedLimit::ActionEnumFromString( "CON" ) )); - BOOST_CHECK_EQUAL("+CON" , GroupProductionExceedLimit::ActionEnum2String(GroupProductionExceedLimit::ActionEnumFromString( "+CON" ) )); - BOOST_CHECK_EQUAL("WELL" , GroupProductionExceedLimit::ActionEnum2String(GroupProductionExceedLimit::ActionEnumFromString( "WELL" ) )); - BOOST_CHECK_EQUAL("PLUG" , GroupProductionExceedLimit::ActionEnum2String(GroupProductionExceedLimit::ActionEnumFromString( "PLUG" ) )); - BOOST_CHECK_EQUAL("RATE" , GroupProductionExceedLimit::ActionEnum2String(GroupProductionExceedLimit::ActionEnumFromString( "RATE" ) )); -} - - -/*****************************************************************/ - -BOOST_AUTO_TEST_CASE(TestPhaseEnum2String) { - BOOST_CHECK_EQUAL( "OIL" , Phase::PhaseEnum2String(Phase::OIL)); - BOOST_CHECK_EQUAL( "GAS" , Phase::PhaseEnum2String(Phase::GAS)); - BOOST_CHECK_EQUAL( "WATER" , Phase::PhaseEnum2String(Phase::WATER)); -} - - -BOOST_AUTO_TEST_CASE(TestPhaseEnumFromString) { - BOOST_CHECK_THROW( Phase::PhaseEnumFromString("XXX") , std::invalid_argument ); - BOOST_CHECK_EQUAL( Phase::OIL , Phase::PhaseEnumFromString("OIL")); - BOOST_CHECK_EQUAL( Phase::WATER , Phase::PhaseEnumFromString("WATER")); - BOOST_CHECK_EQUAL( Phase::WATER , Phase::PhaseEnumFromString("WAT")); - BOOST_CHECK_EQUAL( Phase::GAS , Phase::PhaseEnumFromString("GAS")); -} - - - -BOOST_AUTO_TEST_CASE(TestPhaseEnumLoop) { - BOOST_CHECK_EQUAL( Phase::OIL , Phase::PhaseEnumFromString( Phase::PhaseEnum2String( Phase::OIL ) )); - BOOST_CHECK_EQUAL( Phase::WATER , Phase::PhaseEnumFromString( Phase::PhaseEnum2String( Phase::WATER ) )); - BOOST_CHECK_EQUAL( Phase::GAS , Phase::PhaseEnumFromString( Phase::PhaseEnum2String( Phase::GAS ) )); - - BOOST_CHECK_EQUAL( "OIL" , Phase::PhaseEnum2String(Phase::PhaseEnumFromString( "OIL" ) )); - BOOST_CHECK_EQUAL( "GAS" , Phase::PhaseEnum2String(Phase::PhaseEnumFromString( "GAS" ) )); - BOOST_CHECK_EQUAL( "WATER" , Phase::PhaseEnum2String(Phase::PhaseEnumFromString( "WATER" ) )); -} - - - -BOOST_AUTO_TEST_CASE(TestPhaseEnumMask) { - BOOST_CHECK_EQUAL( 0 , Phase::OIL & Phase::GAS ); - BOOST_CHECK_EQUAL( 0 , Phase::OIL & Phase::WATER ); - BOOST_CHECK_EQUAL( 0 , Phase::WATER & Phase::GAS ); -} - - - -/*****************************************************************/ - -BOOST_AUTO_TEST_CASE(TestInjectorEnum2String) { - BOOST_CHECK_EQUAL( "OIL" , WellInjector::Type2String(WellInjector::OIL)); - BOOST_CHECK_EQUAL( "GAS" , WellInjector::Type2String(WellInjector::GAS)); - BOOST_CHECK_EQUAL( "WATER" , WellInjector::Type2String(WellInjector::WATER)); - BOOST_CHECK_EQUAL( "MULTI" , WellInjector::Type2String(WellInjector::MULTI)); -} - - -BOOST_AUTO_TEST_CASE(TestInjectorEnumFromString) { - BOOST_CHECK_THROW( WellInjector::TypeFromString("XXX") , std::invalid_argument ); - BOOST_CHECK_EQUAL( WellInjector::OIL , WellInjector::TypeFromString("OIL")); - BOOST_CHECK_EQUAL( WellInjector::WATER , WellInjector::TypeFromString("WATER")); - BOOST_CHECK_EQUAL( WellInjector::WATER , WellInjector::TypeFromString("WAT")); - BOOST_CHECK_EQUAL( WellInjector::GAS , WellInjector::TypeFromString("GAS")); - BOOST_CHECK_EQUAL( WellInjector::MULTI , WellInjector::TypeFromString("MULTI")); -} - - - -BOOST_AUTO_TEST_CASE(TestInjectorEnumLoop) { - BOOST_CHECK_EQUAL( WellInjector::OIL , WellInjector::TypeFromString( WellInjector::Type2String( WellInjector::OIL ) )); - BOOST_CHECK_EQUAL( WellInjector::WATER , WellInjector::TypeFromString( WellInjector::Type2String( WellInjector::WATER ) )); - BOOST_CHECK_EQUAL( WellInjector::GAS , WellInjector::TypeFromString( WellInjector::Type2String( WellInjector::GAS ) )); - BOOST_CHECK_EQUAL( WellInjector::MULTI , WellInjector::TypeFromString( WellInjector::Type2String( WellInjector::MULTI ) )); - - BOOST_CHECK_EQUAL( "MULTI" , WellInjector::Type2String(WellInjector::TypeFromString( "MULTI" ) )); - BOOST_CHECK_EQUAL( "OIL" , WellInjector::Type2String(WellInjector::TypeFromString( "OIL" ) )); - BOOST_CHECK_EQUAL( "GAS" , WellInjector::Type2String(WellInjector::TypeFromString( "GAS" ) )); - BOOST_CHECK_EQUAL( "WATER" , WellInjector::Type2String(WellInjector::TypeFromString( "WATER" ) )); -} - -/*****************************************************************/ - -BOOST_AUTO_TEST_CASE(InjectorCOntrolMopdeEnum2String) { - BOOST_CHECK_EQUAL( "RATE" , WellInjector::ControlMode2String(WellInjector::RATE)); - BOOST_CHECK_EQUAL( "RESV" , WellInjector::ControlMode2String(WellInjector::RESV)); - BOOST_CHECK_EQUAL( "BHP" , WellInjector::ControlMode2String(WellInjector::BHP)); - BOOST_CHECK_EQUAL( "THP" , WellInjector::ControlMode2String(WellInjector::THP)); - BOOST_CHECK_EQUAL( "GRUP" , WellInjector::ControlMode2String(WellInjector::GRUP)); -} - - -BOOST_AUTO_TEST_CASE(InjectorControlModeEnumFromString) { - BOOST_CHECK_THROW( WellInjector::ControlModeFromString("XXX") , std::invalid_argument ); - BOOST_CHECK_EQUAL( WellInjector::RATE , WellInjector::ControlModeFromString("RATE")); - BOOST_CHECK_EQUAL( WellInjector::BHP , WellInjector::ControlModeFromString("BHP")); - BOOST_CHECK_EQUAL( WellInjector::RESV , WellInjector::ControlModeFromString("RESV")); - BOOST_CHECK_EQUAL( WellInjector::THP , WellInjector::ControlModeFromString("THP")); - BOOST_CHECK_EQUAL( WellInjector::GRUP , WellInjector::ControlModeFromString("GRUP")); -} - - - -BOOST_AUTO_TEST_CASE(InjectorControlModeEnumLoop) { - BOOST_CHECK_EQUAL( WellInjector::RATE , WellInjector::ControlModeFromString( WellInjector::ControlMode2String( WellInjector::RATE ) )); - BOOST_CHECK_EQUAL( WellInjector::BHP , WellInjector::ControlModeFromString( WellInjector::ControlMode2String( WellInjector::BHP ) )); - BOOST_CHECK_EQUAL( WellInjector::RESV , WellInjector::ControlModeFromString( WellInjector::ControlMode2String( WellInjector::RESV ) )); - BOOST_CHECK_EQUAL( WellInjector::THP , WellInjector::ControlModeFromString( WellInjector::ControlMode2String( WellInjector::THP ) )); - BOOST_CHECK_EQUAL( WellInjector::GRUP , WellInjector::ControlModeFromString( WellInjector::ControlMode2String( WellInjector::GRUP ) )); - - BOOST_CHECK_EQUAL( "THP" , WellInjector::ControlMode2String(WellInjector::ControlModeFromString( "THP" ) )); - BOOST_CHECK_EQUAL( "RATE" , WellInjector::ControlMode2String(WellInjector::ControlModeFromString( "RATE" ) )); - BOOST_CHECK_EQUAL( "RESV" , WellInjector::ControlMode2String(WellInjector::ControlModeFromString( "RESV" ) )); - BOOST_CHECK_EQUAL( "BHP" , WellInjector::ControlMode2String(WellInjector::ControlModeFromString( "BHP" ) )); - BOOST_CHECK_EQUAL( "GRUP" , WellInjector::ControlMode2String(WellInjector::ControlModeFromString( "GRUP" ) )); -} - - - -/*****************************************************************/ - -BOOST_AUTO_TEST_CASE(InjectorStatusEnum2String) { - BOOST_CHECK_EQUAL( "OPEN" , WellCommon::Status2String(WellCommon::OPEN)); - BOOST_CHECK_EQUAL( "SHUT" , WellCommon::Status2String(WellCommon::SHUT)); - BOOST_CHECK_EQUAL( "AUTO" , WellCommon::Status2String(WellCommon::AUTO)); - BOOST_CHECK_EQUAL( "STOP" , WellCommon::Status2String(WellCommon::STOP)); -} - - -BOOST_AUTO_TEST_CASE(InjectorStatusEnumFromString) { - BOOST_CHECK_THROW( WellCommon::StatusFromString("XXX") , std::invalid_argument ); - BOOST_CHECK_EQUAL( WellCommon::OPEN , WellCommon::StatusFromString("OPEN")); - BOOST_CHECK_EQUAL( WellCommon::AUTO , WellCommon::StatusFromString("AUTO")); - BOOST_CHECK_EQUAL( WellCommon::SHUT , WellCommon::StatusFromString("SHUT")); - BOOST_CHECK_EQUAL( WellCommon::STOP , WellCommon::StatusFromString("STOP")); -} - - - -BOOST_AUTO_TEST_CASE(InjectorStatusEnumLoop) { - BOOST_CHECK_EQUAL( WellCommon::OPEN , WellCommon::StatusFromString( WellCommon::Status2String( WellCommon::OPEN ) )); - BOOST_CHECK_EQUAL( WellCommon::AUTO , WellCommon::StatusFromString( WellCommon::Status2String( WellCommon::AUTO ) )); - BOOST_CHECK_EQUAL( WellCommon::SHUT , WellCommon::StatusFromString( WellCommon::Status2String( WellCommon::SHUT ) )); - BOOST_CHECK_EQUAL( WellCommon::STOP , WellCommon::StatusFromString( WellCommon::Status2String( WellCommon::STOP ) )); - - BOOST_CHECK_EQUAL( "STOP" , WellCommon::Status2String(WellCommon::StatusFromString( "STOP" ) )); - BOOST_CHECK_EQUAL( "OPEN" , WellCommon::Status2String(WellCommon::StatusFromString( "OPEN" ) )); - BOOST_CHECK_EQUAL( "SHUT" , WellCommon::Status2String(WellCommon::StatusFromString( "SHUT" ) )); - BOOST_CHECK_EQUAL( "AUTO" , WellCommon::Status2String(WellCommon::StatusFromString( "AUTO" ) )); -} - - - -/*****************************************************************/ - -BOOST_AUTO_TEST_CASE(ProducerCOntrolMopdeEnum2String) { - BOOST_CHECK_EQUAL( "ORAT" , WellProducer::ControlMode2String(WellProducer::ORAT)); - BOOST_CHECK_EQUAL( "WRAT" , WellProducer::ControlMode2String(WellProducer::WRAT)); - BOOST_CHECK_EQUAL( "GRAT" , WellProducer::ControlMode2String(WellProducer::GRAT)); - BOOST_CHECK_EQUAL( "LRAT" , WellProducer::ControlMode2String(WellProducer::LRAT)); - BOOST_CHECK_EQUAL( "CRAT" , WellProducer::ControlMode2String(WellProducer::CRAT)); - BOOST_CHECK_EQUAL( "RESV" , WellProducer::ControlMode2String(WellProducer::RESV)); - BOOST_CHECK_EQUAL( "BHP" , WellProducer::ControlMode2String(WellProducer::BHP)); - BOOST_CHECK_EQUAL( "THP" , WellProducer::ControlMode2String(WellProducer::THP)); - BOOST_CHECK_EQUAL( "GRUP" , WellProducer::ControlMode2String(WellProducer::GRUP)); -} - - -BOOST_AUTO_TEST_CASE(ProducerControlModeEnumFromString) { - BOOST_CHECK_THROW( WellProducer::ControlModeFromString("XRAT") , std::invalid_argument ); - BOOST_CHECK_EQUAL( WellProducer::ORAT , WellProducer::ControlModeFromString("ORAT")); - BOOST_CHECK_EQUAL( WellProducer::WRAT , WellProducer::ControlModeFromString("WRAT")); - BOOST_CHECK_EQUAL( WellProducer::GRAT , WellProducer::ControlModeFromString("GRAT")); - BOOST_CHECK_EQUAL( WellProducer::LRAT , WellProducer::ControlModeFromString("LRAT")); - BOOST_CHECK_EQUAL( WellProducer::CRAT , WellProducer::ControlModeFromString("CRAT")); - BOOST_CHECK_EQUAL( WellProducer::RESV , WellProducer::ControlModeFromString("RESV")); - BOOST_CHECK_EQUAL( WellProducer::BHP , WellProducer::ControlModeFromString("BHP" )); - BOOST_CHECK_EQUAL( WellProducer::THP , WellProducer::ControlModeFromString("THP" )); - BOOST_CHECK_EQUAL( WellProducer::GRUP , WellProducer::ControlModeFromString("GRUP")); -} - - - -BOOST_AUTO_TEST_CASE(ProducerControlModeEnumLoop) { - BOOST_CHECK_EQUAL( WellProducer::ORAT , WellProducer::ControlModeFromString( WellProducer::ControlMode2String( WellProducer::ORAT ) )); - BOOST_CHECK_EQUAL( WellProducer::WRAT , WellProducer::ControlModeFromString( WellProducer::ControlMode2String( WellProducer::WRAT ) )); - BOOST_CHECK_EQUAL( WellProducer::GRAT , WellProducer::ControlModeFromString( WellProducer::ControlMode2String( WellProducer::GRAT ) )); - BOOST_CHECK_EQUAL( WellProducer::LRAT , WellProducer::ControlModeFromString( WellProducer::ControlMode2String( WellProducer::LRAT ) )); - BOOST_CHECK_EQUAL( WellProducer::CRAT , WellProducer::ControlModeFromString( WellProducer::ControlMode2String( WellProducer::CRAT ) )); - BOOST_CHECK_EQUAL( WellProducer::RESV , WellProducer::ControlModeFromString( WellProducer::ControlMode2String( WellProducer::RESV ) )); - BOOST_CHECK_EQUAL( WellProducer::BHP , WellProducer::ControlModeFromString( WellProducer::ControlMode2String( WellProducer::BHP ) )); - BOOST_CHECK_EQUAL( WellProducer::THP , WellProducer::ControlModeFromString( WellProducer::ControlMode2String( WellProducer::THP ) )); - BOOST_CHECK_EQUAL( WellProducer::GRUP , WellProducer::ControlModeFromString( WellProducer::ControlMode2String( WellProducer::GRUP ) )); - - BOOST_CHECK_EQUAL( "ORAT" , WellProducer::ControlMode2String(WellProducer::ControlModeFromString( "ORAT" ) )); - BOOST_CHECK_EQUAL( "WRAT" , WellProducer::ControlMode2String(WellProducer::ControlModeFromString( "WRAT" ) )); - BOOST_CHECK_EQUAL( "GRAT" , WellProducer::ControlMode2String(WellProducer::ControlModeFromString( "GRAT" ) )); - BOOST_CHECK_EQUAL( "LRAT" , WellProducer::ControlMode2String(WellProducer::ControlModeFromString( "LRAT" ) )); - BOOST_CHECK_EQUAL( "CRAT" , WellProducer::ControlMode2String(WellProducer::ControlModeFromString( "CRAT" ) )); - BOOST_CHECK_EQUAL( "RESV" , WellProducer::ControlMode2String(WellProducer::ControlModeFromString( "RESV" ) )); - BOOST_CHECK_EQUAL( "BHP" , WellProducer::ControlMode2String(WellProducer::ControlModeFromString( "BHP" ) )); - BOOST_CHECK_EQUAL( "THP" , WellProducer::ControlMode2String(WellProducer::ControlModeFromString( "THP" ) )); - BOOST_CHECK_EQUAL( "GRUP" , WellProducer::ControlMode2String(WellProducer::ControlModeFromString( "GRUP" ) )); -} - -/*******************************************************************/ -/*****************************************************************/ - -BOOST_AUTO_TEST_CASE(GuideRatePhaseEnum2String) { - BOOST_CHECK_EQUAL( "OIL" , GuideRate::GuideRatePhaseEnum2String(GuideRate::OIL)); - BOOST_CHECK_EQUAL( "WAT" , GuideRate::GuideRatePhaseEnum2String(GuideRate::WAT)); - BOOST_CHECK_EQUAL( "GAS" , GuideRate::GuideRatePhaseEnum2String(GuideRate::GAS)); - BOOST_CHECK_EQUAL( "LIQ" , GuideRate::GuideRatePhaseEnum2String(GuideRate::LIQ)); - BOOST_CHECK_EQUAL( "COMB" , GuideRate::GuideRatePhaseEnum2String(GuideRate::COMB)); - BOOST_CHECK_EQUAL( "WGA" , GuideRate::GuideRatePhaseEnum2String(GuideRate::WGA)); - BOOST_CHECK_EQUAL( "CVAL" , GuideRate::GuideRatePhaseEnum2String(GuideRate::CVAL)); - BOOST_CHECK_EQUAL( "RAT" , GuideRate::GuideRatePhaseEnum2String(GuideRate::RAT)); - BOOST_CHECK_EQUAL( "RES" , GuideRate::GuideRatePhaseEnum2String(GuideRate::RES)); - BOOST_CHECK_EQUAL( "UNDEFINED" , GuideRate::GuideRatePhaseEnum2String(GuideRate::UNDEFINED)); -} - - -BOOST_AUTO_TEST_CASE(GuideRatePhaseEnumFromString) { - BOOST_CHECK_THROW( GuideRate::GuideRatePhaseEnumFromString("XRAT") , std::invalid_argument ); - BOOST_CHECK_EQUAL( GuideRate::OIL , GuideRate::GuideRatePhaseEnumFromString("OIL")); - BOOST_CHECK_EQUAL( GuideRate::WAT , GuideRate::GuideRatePhaseEnumFromString("WAT")); - BOOST_CHECK_EQUAL( GuideRate::GAS , GuideRate::GuideRatePhaseEnumFromString("GAS")); - BOOST_CHECK_EQUAL( GuideRate::LIQ , GuideRate::GuideRatePhaseEnumFromString("LIQ")); - BOOST_CHECK_EQUAL( GuideRate::COMB , GuideRate::GuideRatePhaseEnumFromString("COMB")); - BOOST_CHECK_EQUAL( GuideRate::WGA , GuideRate::GuideRatePhaseEnumFromString("WGA")); - BOOST_CHECK_EQUAL( GuideRate::CVAL , GuideRate::GuideRatePhaseEnumFromString("CVAL")); - BOOST_CHECK_EQUAL( GuideRate::RAT , GuideRate::GuideRatePhaseEnumFromString("RAT")); - BOOST_CHECK_EQUAL( GuideRate::RES , GuideRate::GuideRatePhaseEnumFromString("RES")); - BOOST_CHECK_EQUAL( GuideRate::UNDEFINED, GuideRate::GuideRatePhaseEnumFromString("UNDEFINED")); -} - - - -BOOST_AUTO_TEST_CASE(GuideRatePhaseEnum2Loop) { - BOOST_CHECK_EQUAL( GuideRate::OIL , GuideRate::GuideRatePhaseEnumFromString( GuideRate::GuideRatePhaseEnum2String( GuideRate::OIL ) )); - BOOST_CHECK_EQUAL( GuideRate::WAT , GuideRate::GuideRatePhaseEnumFromString( GuideRate::GuideRatePhaseEnum2String( GuideRate::WAT ) )); - BOOST_CHECK_EQUAL( GuideRate::GAS , GuideRate::GuideRatePhaseEnumFromString( GuideRate::GuideRatePhaseEnum2String( GuideRate::GAS ) )); - BOOST_CHECK_EQUAL( GuideRate::LIQ , GuideRate::GuideRatePhaseEnumFromString( GuideRate::GuideRatePhaseEnum2String( GuideRate::LIQ ) )); - BOOST_CHECK_EQUAL( GuideRate::COMB , GuideRate::GuideRatePhaseEnumFromString( GuideRate::GuideRatePhaseEnum2String( GuideRate::COMB ) )); - BOOST_CHECK_EQUAL( GuideRate::WGA , GuideRate::GuideRatePhaseEnumFromString( GuideRate::GuideRatePhaseEnum2String( GuideRate::WGA ) )); - BOOST_CHECK_EQUAL( GuideRate::CVAL , GuideRate::GuideRatePhaseEnumFromString( GuideRate::GuideRatePhaseEnum2String( GuideRate::CVAL ) )); - BOOST_CHECK_EQUAL( GuideRate::RAT , GuideRate::GuideRatePhaseEnumFromString( GuideRate::GuideRatePhaseEnum2String( GuideRate::RAT ) )); - BOOST_CHECK_EQUAL( GuideRate::RES , GuideRate::GuideRatePhaseEnumFromString( GuideRate::GuideRatePhaseEnum2String( GuideRate::RES ) )); - BOOST_CHECK_EQUAL( GuideRate::UNDEFINED , GuideRate::GuideRatePhaseEnumFromString( GuideRate::GuideRatePhaseEnum2String( GuideRate::UNDEFINED ) )); - - BOOST_CHECK_EQUAL( "OIL" , GuideRate::GuideRatePhaseEnum2String(GuideRate::GuideRatePhaseEnumFromString( "OIL" ) )); - BOOST_CHECK_EQUAL( "WAT" , GuideRate::GuideRatePhaseEnum2String(GuideRate::GuideRatePhaseEnumFromString( "WAT" ) )); - BOOST_CHECK_EQUAL( "GAS" , GuideRate::GuideRatePhaseEnum2String(GuideRate::GuideRatePhaseEnumFromString( "GAS" ) )); - BOOST_CHECK_EQUAL( "LIQ" , GuideRate::GuideRatePhaseEnum2String(GuideRate::GuideRatePhaseEnumFromString( "LIQ" ) )); - BOOST_CHECK_EQUAL( "COMB" , GuideRate::GuideRatePhaseEnum2String(GuideRate::GuideRatePhaseEnumFromString( "COMB" ) )); - BOOST_CHECK_EQUAL( "WGA" , GuideRate::GuideRatePhaseEnum2String(GuideRate::GuideRatePhaseEnumFromString( "WGA" ) )); - BOOST_CHECK_EQUAL( "CVAL" , GuideRate::GuideRatePhaseEnum2String(GuideRate::GuideRatePhaseEnumFromString( "CVAL" ) )); - BOOST_CHECK_EQUAL( "RAT" , GuideRate::GuideRatePhaseEnum2String(GuideRate::GuideRatePhaseEnumFromString( "RAT" ) )); - BOOST_CHECK_EQUAL( "RES" , GuideRate::GuideRatePhaseEnum2String(GuideRate::GuideRatePhaseEnumFromString( "RES" ) )); - BOOST_CHECK_EQUAL( "UNDEFINED" , GuideRate::GuideRatePhaseEnum2String(GuideRate::GuideRatePhaseEnumFromString( "UNDEFINED" ) )); - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/ScheduleTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/ScheduleTests.cpp deleted file mode 100644 index 231e4fe047..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/ScheduleTests.cpp +++ /dev/null @@ -1,1317 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include - -#define BOOST_TEST_MODULE ScheduleTests - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace Opm; - -static DeckPtr createDeck() { - Opm::Parser parser; - std::string input = - "START\n" - "8 MAR 1998 /\n" - "\n" - "SCHEDULE\n" - "\n"; - - return parser.parseString(input, ParseContext()); -} - -static DeckPtr createDeckWithWells() { - Opm::Parser parser; - std::string input = - "START -- 0 \n" - "10 MAI 2007 / \n" - "SCHEDULE\n" - "WELSPECS\n" - " \'W_1\' \'OP\' 30 37 3.33 \'OIL\' 7* / \n" - "/ \n" - "DATES -- 1\n" - " 10 \'JUN\' 2007 / \n" - "/\n" - "DATES -- 2,3\n" - " 10 JLY 2007 / \n" - " 10 AUG 2007 / \n" - "/\n" - "WELSPECS\n" - " \'WX2\' \'OP\' 30 37 3.33 \'OIL\' 7* / \n" - " \'W_3\' \'OP\' 20 51 3.92 \'OIL\' 7* / \n" - "/\n"; - - return parser.parseString(input, ParseContext()); -} - -static DeckPtr createDeckForTestingCrossFlow() { - Opm::Parser parser; - std::string input = - "START -- 0 \n" - "10 MAI 2007 / \n" - "SCHEDULE\n" - "WELSPECS\n" - " \'DEFAULT\' \'OP\' 30 37 3.33 \'OIL\' 7*/ \n" - " \'ALLOW\' \'OP\' 30 37 3.33 \'OIL\' 3* YES / \n" - " \'BAN\' \'OP\' 20 51 3.92 \'OIL\' 3* NO / \n" - "/\n" - - "COMPDAT\n" - " \'BAN\' 1 1 1 1 \'OPEN\' 1* 1.168 0.311 107.872 1* 1* \'Z\' 21.925 / \n" - "/\n" - - "WCONHIST\n" - " 'BAN' 'OPEN' 'RESV' 0.000 0.000 0.000 5* / \n" - "/\n" - - "DATES -- 1\n" - " 10 JUN 2007 / \n" - "/\n" - - "WCONHIST\n" - " 'BAN' 'OPEN' 'RESV' 1.000 0.000 0.000 5* / \n" - "/\n" - - "DATES -- 2\n" - " 10 JUL 2007 / \n" - "/\n" - - "WCONPROD\n" - " 'BAN' 'OPEN' 'ORAT' 0.000 0.000 0.000 5* / \n" - "/\n" - - - "DATES -- 3\n" - " 10 AUG 2007 / \n" - "/\n" - - "WCONINJH\n" - " 'BAN' 'WATER' 1* 0 / \n" - "/\n" - - "DATES -- 4\n" - " 10 SEP 2007 / \n" - "/\n" - - "WELOPEN\n" - " 'BAN' OPEN / \n" - "/\n" - - "DATES -- 4\n" - " 10 NOV 2007 / \n" - "/\n" - - "WCONINJH\n" - " 'BAN' 'WATER' 1* 1.0 / \n" - "/\n"; - - - return parser.parseString(input, ParseContext()); -} - -static DeckPtr createDeckWithWellsOrdered() { - Opm::Parser parser; - std::string input = - "START -- 0 \n" - "10 MAI 2007 / \n" - "SCHEDULE\n" - "WELSPECS\n" - " \'CW_1\' \'OP\' 30 37 3.33 \'OIL\' 7* / \n" - " \'BW_2\' \'OP\' 30 37 3.33 \'OIL\' 7* / \n" - " \'AW_3\' \'OP\' 20 51 3.92 \'OIL\' 7* / \n" - "/\n"; - - return parser.parseString(input, ParseContext()); -} - -static DeckPtr createDeckWithWellsAndCompletionData() { - Opm::Parser parser; - std::string input = - "START -- 0 \n" - "1 NOV 1979 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 1 DES 1979/ \n" - "/\n" - "WELSPECS\n" - " 'OP_1' 'OP' 9 9 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - " 'OP_2' 'OP' 8 8 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - " 'OP_3' 'OP' 7 7 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - "/\n" - "COMPDAT\n" - " 'OP_1' 9 9 1 1 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'OP_1' 9 9 2 2 'OPEN' 1* 46.825 0.311 4332.346 1* 1* 'X' 22.123 / \n" - " 'OP_2' 8 8 1 3 'OPEN' 1* 1.168 0.311 107.872 1* 1* 'Y' 21.925 / \n" - " 'OP_2' 8 7 3 3 'OPEN' 1* 15.071 0.311 1391.859 1* 1* 'Y' 21.920 / \n" - " 'OP_2' 8 7 3 6 'OPEN' 1* 6.242 0.311 576.458 1* 1* 'Y' 21.915 / \n" - " 'OP_3' 7 7 1 1 'OPEN' 1* 27.412 0.311 2445.337 1* 1* 'Y' 18.521 / \n" - " 'OP_3' 7 7 2 2 'OPEN' 1* 55.195 0.311 4923.842 1* 1* 'Y' 18.524 / \n" - "/\n" - "DATES -- 2,3\n" - " 10 JUL 2007 / \n" - " 10 AUG 2007 / \n" - "/\n" - "COMPDAT\n" // with defaulted I and J - " 'OP_1' 0 * 3 9 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - "/\n"; - - return parser.parseString(input, ParseContext()); -} - -BOOST_AUTO_TEST_CASE(CreateScheduleDeckMissingReturnsDefaults) { - DeckPtr deck(new Deck()); - deck->addKeyword( DeckKeyword( "SCHEDULE" ) ); - EclipseGrid grid(10,10,10); - Schedule schedule(ParseContext() , grid , deck ); - BOOST_CHECK_EQUAL( schedule.getStartTime() , boost::posix_time::ptime(boost::gregorian::date( 1983 , boost::gregorian::Jan , 1))); -} - -BOOST_AUTO_TEST_CASE(CreateScheduleDeckWellsOrdered) { - DeckPtr deck = createDeckWithWellsOrdered(); - EclipseGrid grid(100,100,100); - Schedule schedule(ParseContext() , grid , deck ); - auto wells = schedule.getWells(); - - BOOST_CHECK_EQUAL( "CW_1" , wells[0]->name()); - BOOST_CHECK_EQUAL( "BW_2" , wells[1]->name()); - BOOST_CHECK_EQUAL( "AW_3" , wells[2]->name()); -} - -BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithStart) { - DeckPtr deck = createDeck(); - EclipseGrid grid(10,10,10); - Schedule schedule(ParseContext() , grid , deck ); - BOOST_CHECK_EQUAL( schedule.getStartTime() , boost::posix_time::ptime(boost::gregorian::date( 1998 , boost::gregorian::Mar , 8))); -} - -BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithSCHEDULENoThrow) { - DeckPtr deck(new Deck()); - EclipseGrid grid(10,10,10); - deck->addKeyword( DeckKeyword( "SCHEDULE" ) ); - - BOOST_CHECK_NO_THROW(Schedule schedule(ParseContext() , grid , deck )); -} - -BOOST_AUTO_TEST_CASE(EmptyScheduleHasNoWells) { - EclipseGrid grid(10,10,10); - DeckPtr deck = createDeck(); - Schedule schedule(ParseContext() , grid , deck ); - BOOST_CHECK_EQUAL( 0U , schedule.numWells() ); - BOOST_CHECK_EQUAL( false , schedule.hasWell("WELL1") ); - BOOST_CHECK_THROW( schedule.getWell("WELL2") , std::invalid_argument ); -} - -BOOST_AUTO_TEST_CASE(CreateSchedule_DeckWithoutGRUPTREE_HasRootGroupTreeNodeForTimeStepZero) { - EclipseGrid grid(10,10,10); - DeckPtr deck = createDeck(); - Schedule schedule(ParseContext() , grid , deck ); - BOOST_CHECK_EQUAL("FIELD", schedule.getGroupTree(0).getNode("FIELD")->name()); -} - -static std::shared_ptr< Deck > deckWithGRUPTREE() { - DeckPtr deck = createDeck(); - DeckKeyword gruptreeKeyword("GRUPTREE"); - - DeckRecord recordChildOfField; - auto itemChild1 = DeckItem::make< std::string >( "CHILD_GROUP" ); - itemChild1.push_back(std::string("BARNET")); - auto itemParent1 = DeckItem::make< std::string >( "PARENT_GROUP" ); - itemParent1.push_back(std::string("FAREN")); - - recordChildOfField.addItem( std::move( itemChild1 ) ); - recordChildOfField.addItem( std::move( itemParent1 ) ); - gruptreeKeyword.addRecord( std::move( recordChildOfField ) ); - deck->addKeyword( std::move( gruptreeKeyword ) ); - - return deck; -} - -BOOST_AUTO_TEST_CASE(CreateSchedule_DeckWithGRUPTREE_HasRootGroupTreeNodeForTimeStepZero) { - EclipseGrid grid(10,10,10); - auto deck = deckWithGRUPTREE(); - Schedule schedule(ParseContext() , grid , deck ); - GroupTreeNodePtr fieldNode = schedule.getGroupTree(0).getNode("FIELD"); - BOOST_CHECK_EQUAL("FIELD", fieldNode->name()); - GroupTreeNodePtr FAREN = fieldNode->getChildGroup("FAREN"); - BOOST_CHECK(FAREN->hasChildGroup("BARNET")); -} - -BOOST_AUTO_TEST_CASE(GetGroups) { - auto deck = deckWithGRUPTREE(); - EclipseGrid grid(10,10,10); - Schedule schedule(ParseContext() , grid , deck ); - - auto groups = schedule.getGroups(); - - BOOST_CHECK_EQUAL( 3, groups.size() ); - - std::vector< std::string > names; - for( const auto group : groups ) names.push_back( group->name() ); - std::sort( names.begin(), names.end() ); - - BOOST_CHECK_EQUAL( "BARNET", names[ 0 ] ); - BOOST_CHECK_EQUAL( "FAREN", names[ 1 ] ); - BOOST_CHECK_EQUAL( "FIELD", names[ 2 ] ); -} - -BOOST_AUTO_TEST_CASE(EmptyScheduleHasFIELDGroup) { - EclipseGrid grid(10,10,10); - DeckPtr deck = createDeck(); - Schedule schedule(ParseContext() , grid , deck ); - BOOST_CHECK_EQUAL( 1U , schedule.numGroups() ); - BOOST_CHECK_EQUAL( true , schedule.hasGroup("FIELD") ); - BOOST_CHECK_EQUAL( false , schedule.hasGroup("GROUP") ); - BOOST_CHECK_THROW( schedule.getGroup("GROUP") , std::invalid_argument ); -} - -BOOST_AUTO_TEST_CASE(WellsIterator_Empty_EmptyVectorReturned) { - EclipseGrid grid(10,10,10); - DeckPtr deck = createDeck(); - Schedule schedule(ParseContext() , grid , deck ); - size_t timeStep = 0; - const auto wells_alltimesteps = schedule.getWells(); - BOOST_CHECK_EQUAL(0U, wells_alltimesteps.size()); - const auto wells_t0 = schedule.getWells(timeStep); - BOOST_CHECK_EQUAL(0U, wells_t0.size()); - - BOOST_CHECK_THROW(schedule.getWells(1), std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(WellsIterator_HasWells_WellsReturned) { - EclipseGrid grid(10,10,10); - DeckPtr deck = createDeckWithWells(); - Schedule schedule(ParseContext() , grid , deck ); - size_t timeStep = 0; - - const auto wells_alltimesteps = schedule.getWells(); - BOOST_CHECK_EQUAL(3U, wells_alltimesteps.size()); - const auto wells_t0 = schedule.getWells(timeStep); - BOOST_CHECK_EQUAL(1U, wells_t0.size()); - const auto wells_t3 = schedule.getWells(3); - BOOST_CHECK_EQUAL(3U, wells_t3.size()); -} - -BOOST_AUTO_TEST_CASE(WellsIteratorWithRegex_HasWells_WellsReturned) { - EclipseGrid grid(10,10,10); - DeckPtr deck = createDeckWithWells(); - Schedule schedule(ParseContext() , grid , deck ); - std::string wellNamePattern; - - wellNamePattern = "*"; - auto wells = schedule.getWellsMatching(wellNamePattern); - BOOST_CHECK_EQUAL(3U, wells.size()); - - wellNamePattern = "W_*"; - wells = schedule.getWellsMatching(wellNamePattern); - BOOST_CHECK_EQUAL(2U, wells.size()); - - wellNamePattern = "W_3"; - wells = schedule.getWellsMatching(wellNamePattern); - BOOST_CHECK_EQUAL(1U, wells.size()); -} - -BOOST_AUTO_TEST_CASE(ReturnNumWellsTimestep) { - EclipseGrid grid(10,10,10); - DeckPtr deck = createDeckWithWells(); - Schedule schedule(ParseContext() , grid , deck ); - - BOOST_CHECK_EQUAL(schedule.numWells(0), 1); - BOOST_CHECK_EQUAL(schedule.numWells(1), 1); - BOOST_CHECK_EQUAL(schedule.numWells(2), 1); - BOOST_CHECK_EQUAL(schedule.numWells(3), 3); -} - -BOOST_AUTO_TEST_CASE(ReturnMaxNumCompletionsForWellsInTimestep) { - EclipseGrid grid(10,10,10); - DeckPtr deck = createDeckWithWellsAndCompletionData(); - Schedule schedule(ParseContext() , grid , deck ); - - BOOST_CHECK_EQUAL(schedule.getMaxNumCompletionsForWells(1), 7); - BOOST_CHECK_EQUAL(schedule.getMaxNumCompletionsForWells(3), 9); -} - -BOOST_AUTO_TEST_CASE(TestCrossFlowHandling) { - EclipseGrid grid(10,10,10); - DeckPtr deck = createDeckForTestingCrossFlow(); - Schedule schedule(ParseContext() , grid , deck ); - - auto well_ban = schedule.getWell("BAN"); - BOOST_CHECK_EQUAL(well_ban->getAllowCrossFlow(), false); - - - BOOST_CHECK_EQUAL(WellCommon::StatusEnum::SHUT, well_ban->getStatus(0)); - BOOST_CHECK_EQUAL(WellCommon::StatusEnum::OPEN, well_ban->getStatus(1)); - BOOST_CHECK_EQUAL(WellCommon::StatusEnum::OPEN, well_ban->getStatus(2)); - BOOST_CHECK_EQUAL(WellCommon::StatusEnum::SHUT, well_ban->getStatus(3)); - BOOST_CHECK_EQUAL(WellCommon::StatusEnum::SHUT, well_ban->getStatus(4)); // not allow to open - BOOST_CHECK_EQUAL(WellCommon::StatusEnum::OPEN, well_ban->getStatus(5)); - - - { - auto well_allow = schedule.getWell("ALLOW"); - auto well_default = schedule.getWell("DEFAULT"); - - BOOST_CHECK_EQUAL(well_default->getAllowCrossFlow(), true); - BOOST_CHECK_EQUAL(well_allow->getAllowCrossFlow(), true); - } -} - -static DeckPtr createDeckWithWellsAndCompletionDataWithWELOPEN() { - Opm::Parser parser; - std::string input = - "START -- 0 \n" - "1 NOV 1979 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 1 DES 1979/ \n" - "/\n" - "WELSPECS\n" - " 'OP_1' 'OP' 9 9 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - " 'OP_2' 'OP' 8 8 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - " 'OP_3' 'OP' 7 7 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - "/\n" - "COMPDAT\n" - " 'OP_1' 9 9 1 1 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'OP_1' 9 9 2 2 'OPEN' 1* 46.825 0.311 4332.346 1* 1* 'X' 22.123 / \n" - " 'OP_2' 8 8 1 3 'OPEN' 1* 1.168 0.311 107.872 1* 1* 'Y' 21.925 / \n" - " 'OP_2' 8 7 3 3 'OPEN' 1* 15.071 0.311 1391.859 1* 1* 'Y' 21.920 / \n" - " 'OP_2' 8 7 3 6 'OPEN' 1* 6.242 0.311 576.458 1* 1* 'Y' 21.915 / \n" - " 'OP_3' 7 7 1 1 'OPEN' 1* 27.412 0.311 2445.337 1* 1* 'Y' 18.521 / \n" - " 'OP_3' 7 7 2 2 'OPEN' 1* 55.195 0.311 4923.842 1* 1* 'Y' 18.524 / \n" - "/\n" - "DATES -- 2,3\n" - " 10 JUL 2007 / \n" - " 10 AUG 2007 / \n" - "/\n" - "COMPDAT\n" - " 'OP_1' 9 9 3 9 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - "/\n" - "WELOPEN\n" - " 'OP_1' SHUT / \n" - " '*' OPEN 0 0 3 / \n" - " 'OP_2' SHUT 0 0 0 4 6 / \n " - " 'OP_3' SHUT 0 0 0 / \n" - "/\n" - "DATES -- 4\n" - " 10 JUL 2008 / \n" - "/\n" - "WELOPEN\n" - " 'OP_1' OPEN / \n" - " 'OP_2' OPEN 0 0 0 4 6 / \n " - " 'OP_3' OPEN 0 0 0 / \n" - "/\n" - "DATES -- 5\n" - " 10 OKT 2008 / \n" - "/\n" - "WELOPEN\n" - " 'OP_1' SHUT 0 0 0 0 0 / \n " - "/\n"; - - return parser.parseString(input, ParseContext()); -} - -BOOST_AUTO_TEST_CASE(CreateScheduleDeckWellsAndCompletionDataWithWELOPEN) { - EclipseGrid grid(10,10,10); - DeckPtr deck = createDeckWithWellsAndCompletionDataWithWELOPEN(); - Schedule schedule(ParseContext() , grid , deck ); - auto* well = schedule.getWell("OP_1"); - size_t currentStep = 0; - BOOST_CHECK_EQUAL(WellCommon::StatusEnum::SHUT, well->getStatus(currentStep)); - currentStep = 3; - BOOST_CHECK_EQUAL(WellCommon::StatusEnum::SHUT, well->getStatus(currentStep)); - - well = schedule.getWell("OP_2"); - CompletionSetConstPtr completionSet = well->getCompletions(currentStep); - - size_t index = 3; - CompletionConstPtr completion = completionSet->get(index); - BOOST_CHECK_EQUAL(WellCompletion::StateEnum::SHUT, completion->getState()); - index = 4; - completion = completionSet->get(index); - BOOST_CHECK_EQUAL(WellCompletion::StateEnum::SHUT, completion->getState()); - index = 5; - completion = completionSet->get(index); - BOOST_CHECK_EQUAL(WellCompletion::StateEnum::SHUT, completion->getState()); - index = 6; - completion = completionSet->get(index); - BOOST_CHECK_EQUAL(WellCompletion::StateEnum::OPEN, completion->getState()); - - currentStep = 4; - completionSet = well->getCompletions(currentStep); - index = 3; - completion = completionSet->get(index); - BOOST_CHECK_EQUAL(WellCompletion::StateEnum::OPEN, completion->getState()); - index = 4; - completion = completionSet->get(index); - BOOST_CHECK_EQUAL(WellCompletion::StateEnum::OPEN, completion->getState()); - index = 5; - completion = completionSet->get(index); - BOOST_CHECK_EQUAL(WellCompletion::StateEnum::OPEN, completion->getState()); - index = 6; - completion = completionSet->get(index); - BOOST_CHECK_EQUAL(WellCompletion::StateEnum::OPEN, completion->getState()); - - well = schedule.getWell("OP_3"); - currentStep = 3; - completionSet = well->getCompletions(currentStep); - - index = 0; - completion = completionSet->get(index); - BOOST_CHECK_EQUAL(WellCompletion::StateEnum::SHUT, completion->getState()); - - currentStep = 4; - completionSet = well->getCompletions(currentStep); - - index = 0; - completion = completionSet->get(index); - BOOST_CHECK_EQUAL(WellCompletion::StateEnum::OPEN, completion->getState()); - - well = schedule.getWell("OP_1"); - - currentStep = 3; - BOOST_CHECK_EQUAL(WellCommon::StatusEnum::SHUT, well->getStatus(currentStep)); - - currentStep = 4; - BOOST_CHECK_EQUAL(WellCommon::StatusEnum::OPEN, well->getStatus(currentStep)); - - currentStep = 5; - BOOST_CHECK_EQUAL(WellCommon::StatusEnum::SHUT, well->getStatus(currentStep)); -} - -BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithWELOPEN_TryToOpenWellWithShutCompletionsDoNotOpenWell) { - Opm::Parser parser; - std::string input = - "START -- 0 \n" - "1 NOV 1979 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 1 DES 1979/ \n" - "/\n" - "WELSPECS\n" - " 'OP_1' 'OP' 9 9 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - "/\n" - "COMPDAT\n" - " 'OP_1' 9 9 1 1 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'OP_1' 9 9 2 2 'OPEN' 1* 46.825 0.311 4332.346 1* 1* 'X' 22.123 / \n" - " 'OP_1' 9 9 3 9 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - "/\n" - "DATES -- 2\n" - " 10 JUL 2008 / \n" - "/\n" - "WELOPEN\n" - " 'OP_1' OPEN / \n" - "/\n" - "DATES -- 3\n" - " 10 OKT 2008 / \n" - "/\n" - "WELOPEN\n" - " 'OP_1' SHUT 0 0 0 0 0 / \n " - "/\n" - "DATES -- 4\n" - " 10 NOV 2008 / \n" - "/\n" - "WELOPEN\n" - " 'OP_1' OPEN / \n " - "/\n"; - - EclipseGrid grid(10,10,10); - ParseContext parseContext; - DeckPtr deck = parser.parseString(input, parseContext); - Schedule schedule(parseContext , grid , deck ); - auto* well = schedule.getWell("OP_1"); - size_t currentStep = 3; - BOOST_CHECK_EQUAL(WellCommon::StatusEnum::SHUT, well->getStatus(currentStep)); - currentStep = 4; - BOOST_CHECK_EQUAL(WellCommon::StatusEnum::SHUT, well->getStatus(currentStep)); -} - -BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithCOMPLUMPwithC1_ThrowsExcpetion) { - Opm::Parser parser; - std::string input = - "START -- 0 \n" - "1 NOV 1979 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 1 DES 1979/ \n" - "/\n" - "WELSPECS\n" - " 'OP_1' 'OP' 9 9 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - "/\n" - "COMPDAT\n" - " 'OP_1' 9 9 1 1 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'OP_1' 9 9 2 2 'OPEN' 1* 46.825 0.311 4332.346 1* 1* 'X' 22.123 / \n" - " 'OP_1' 9 9 3 9 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - "/\n" - "DATES -- 3\n" - " 10 OKT 2008 / \n" - "/\n" - "WELOPEN\n" - " 'OP_1' OPEN 0 0 0 1 0 / \n" - "/\n" - "COMPLUMP\n" - " 'OP_1' 0 0 0 0 0 / \n " - "/\n" - "DATES -- 4\n" - " 10 NOV 2008 / \n" - "/\n"; - - - DeckPtr deck = parser.parseString(input, ParseContext()); - EclipseGrid grid(10,10,10); - BOOST_CHECK_THROW(Schedule schedule(ParseContext() , grid , deck ), std::exception); -} - -BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithCOMPLUMPwithC1andC2_ThrowsExcpetion) { - Opm::Parser parser; - std::string input = - "START -- 0 \n" - "1 NOV 1979 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 1 DES 1979/ \n" - "/\n" - "WELSPECS\n" - " 'OP_1' 'OP' 9 9 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - "/\n" - "COMPDAT\n" - " 'OP_1' 9 9 1 1 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'OP_1' 9 9 2 2 'OPEN' 1* 46.825 0.311 4332.346 1* 1* 'X' 22.123 / \n" - " 'OP_1' 9 9 3 9 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - "/\n" - "DATES -- 3\n" - " 10 OKT 2008 / \n" - "/\n" - "WELOPEN\n" - " 'OP_1' OPEN 0 0 0 1 4 / \n" - "/\n" - "COMPLUMP\n" - " 'OP_1' 0 0 0 0 0 / \n " - "/\n" - "DATES -- 4\n" - " 10 NOV 2008 / \n" - "/\n"; - - - DeckPtr deck = parser.parseString(input, ParseContext()); - EclipseGrid grid(10,10,10); - BOOST_CHECK_THROW(Schedule schedule(ParseContext() , grid , deck ), std::exception); -} - -BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithCOMPLUMPwithC2_ThrowsExcpetion) { - Opm::Parser parser; - std::string input = - "START -- 0 \n" - "1 NOV 1979 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 1 DES 1979/ \n" - "/\n" - "WELSPECS\n" - " 'OP_1' 'OP' 9 9 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - "/\n" - "COMPDAT\n" - " 'OP_1' 9 9 1 1 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'OP_1' 9 9 2 2 'OPEN' 1* 46.825 0.311 4332.346 1* 1* 'X' 22.123 / \n" - " 'OP_1' 9 9 3 9 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - "/\n" - "DATES -- 3\n" - " 10 OKT 2008 / \n" - "/\n" - "WELOPEN\n" - " 'OP_1' OPEN 0 0 0 0 4 / \n" - "/\n" - "COMPLUMP\n" - " 'OP_1' 0 0 0 0 0 / \n " - "/\n" - "DATES -- 4\n" - " 10 NOV 2008 / \n" - "/\n"; - - - DeckPtr deck = parser.parseString(input, ParseContext()); - EclipseGrid grid(10,10,10); - BOOST_CHECK_THROW(Schedule schedule(ParseContext() , grid , deck ), std::exception); -} - -BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithCOMPLUMPwithDefaultValuesInWELOPEN) { - Opm::Parser parser; - std::string input = - "START -- 0 \n" - "1 NOV 1979 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 1 DES 1979/ \n" - "/\n" - "WELSPECS\n" - " 'OP_1' 'OP' 9 9 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - "/\n" - "COMPDAT\n" - " 'OP_1' 9 9 1 1 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'OP_1' 9 9 2 2 'OPEN' 1* 46.825 0.311 4332.346 1* 1* 'X' 22.123 / \n" - " 'OP_1' 9 9 3 9 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - "/\n" - "DATES -- 3\n" - " 10 OKT 2008 / \n" - "/\n" - "WELOPEN\n" - " 'OP_1' OPEN/ \n" - "/\n" - "COMPLUMP\n" - " 'OP_1' 0 0 0 0 0 / \n " - "/\n" - "DATES -- 4\n" - " 10 NOV 2008 / \n" - "/\n"; - - EclipseGrid grid(10,10,10); - DeckPtr deck = parser.parseString(input, ParseContext()); - Schedule schedule(ParseContext() , grid , deck ); - auto* well = schedule.getWell("OP_1"); - size_t currentStep = 3; - BOOST_CHECK_EQUAL(WellCommon::StatusEnum::OPEN, well->getStatus(currentStep)); -} - -BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithWRFT) { - Opm::Parser parser; - std::string input = - "START -- 0 \n" - "1 NOV 1979 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 1 DES 1979/ \n" - "/\n" - "WELSPECS\n" - " 'OP_1' 'OP' 9 9 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - " 'OP_2' 'OP' 4 4 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - "/\n" - "COMPDAT\n" - " 'OP_1' 9 9 1 1 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'OP_1' 9 9 2 2 'OPEN' 1* 46.825 0.311 4332.346 1* 1* 'X' 22.123 / \n" - " 'OP_1' 9 9 3 9 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'OP_2' 4 4 4 9 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - "/\n" - "DATES -- 2\n" - " 10 OKT 2008 / \n" - "/\n" - "WRFT \n" - "/ \n" - "WELOPEN\n" - " 'OP_1' OPEN / \n" - "/\n" - "DATES -- 3\n" - " 10 NOV 2008 / \n" - "/\n" - "WELOPEN\n" - " 'OP_2' OPEN / \n" - "/\n" - "DATES -- 4\n" - " 30 NOV 2008 / \n" - "/\n"; - - - EclipseGrid grid(10,10,10); - ParseContext parseContext; - DeckPtr deck = parser.parseString(input, parseContext); - Schedule schedule(parseContext , grid , deck ); - - { - auto* well = schedule.getWell("OP_1"); - BOOST_CHECK_EQUAL(well->getRFTActive(2),true); - BOOST_CHECK_EQUAL(2 , well->firstRFTOutput( )); - } - - { - auto* well = schedule.getWell("OP_2"); - BOOST_CHECK_EQUAL(well->getRFTActive(3),true); - BOOST_CHECK_EQUAL(3 , well->firstRFTOutput( )); - } -} - -BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithWRFTPLT) { - Opm::Parser parser; - std::string input = - "START -- 0 \n" - "1 NOV 1979 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 1 DES 1979/ \n" - "/\n" - "WELSPECS\n" - " 'OP_1' 'OP' 9 9 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - "/\n" - "COMPDAT\n" - " 'OP_1' 9 9 1 1 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'OP_1' 9 9 2 2 'OPEN' 1* 46.825 0.311 4332.346 1* 1* 'X' 22.123 / \n" - " 'OP_1' 9 9 3 9 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - "/\n" - "WELOPEN\n" - " 'OP_1' SHUT / \n" - "/\n" - "DATES -- 2\n" - " 10 OKT 2006 / \n" - "/\n" - "WELOPEN\n" - " 'OP_1' SHUT / \n" - "/\n" - "WRFTPLT \n" - " 'OP_1' FOPN / \n" - "/ \n" - "DATES -- 3\n" - " 10 OKT 2007 / \n" - "/\n" - "WELOPEN\n" - " 'OP_1' OPEN 0 0 0 0 0 / \n" - "/\n" - "DATES -- 4\n" - " 10 OKT 2008 / \n" - "/\n" - "WELOPEN\n" - " 'OP_1' OPEN / \n" - "/\n" - "COMPLUMP\n" - " 'OP_1' 0 0 0 0 0 / \n " - "/\n" - "DATES -- 5\n" - " 10 NOV 2008 / \n" - "/\n"; - ParseContext parseContext; - EclipseGrid grid(10,10,10); - DeckPtr deck = parser.parseString(input, parseContext); - Schedule schedule(parseContext , grid , deck ); - auto* well = schedule.getWell("OP_1"); - - size_t currentStep = 3; - BOOST_CHECK_EQUAL(well->getRFTActive(currentStep),false); - currentStep = 4; - BOOST_CHECK_EQUAL(well->getRFTActive(currentStep),true); - BOOST_CHECK_EQUAL(WellCommon::StatusEnum::OPEN, well->getStatus(currentStep)); - currentStep = 5; - BOOST_CHECK_EQUAL(well->getRFTActive(currentStep),false); -} - -BOOST_AUTO_TEST_CASE(createDeckWithWeltArg) { - Opm::Parser parser; - std::string input = - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 10 OKT 2008 / \n" - "/\n" - "WELSPECS\n" - " 'OP_1' 'OP' 9 9 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - "/\n" - "COMPDAT\n" - " 'OP_1' 9 9 1 1 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'OP_1' 9 9 2 2 'OPEN' 1* 46.825 0.311 4332.346 1* 1* 'X' 22.123 / \n" - " 'OP_1' 9 9 3 9 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - "/\n" - "DATES -- 2\n" - " 20 JAN 2010 / \n" - "/\n" - "WELTARG\n" - " OP_1 ORAT 1300 /\n" - " OP_1 WRAT 1400 /\n" - " OP_1 GRAT 1500.52 /\n" - " OP_1 LRAT 1600.58 /\n" - " OP_1 RESV 1801.05 /\n" - " OP_1 BHP 1900 /\n" - " OP_1 THP 2000 /\n" - " OP_1 VFP 2100.09 /\n" - " OP_1 GUID 2300.14 /\n" - "/\n"; - - ParseContext parseContext; - DeckPtr deck = parser.parseString(input, parseContext); - EclipseGrid grid(10,10,10); - Schedule schedule(parseContext , grid , deck ); - auto* well = schedule.getWell("OP_1"); - - size_t currentStep = 1; - WellProductionProperties wpp = well->getProductionProperties(currentStep); - BOOST_CHECK_EQUAL(wpp.WaterRate,0); - - Opm::UnitSystem unitSystem = deck->getActiveUnitSystem(); - double siFactorL = unitSystem.parse("LiquidSurfaceVolume/Time")->getSIScaling(); - double siFactorG = unitSystem.parse("GasSurfaceVolume/Time")->getSIScaling(); - double siFactorP = unitSystem.parse("Pressure")->getSIScaling(); - - currentStep = 2; - wpp = well->getProductionProperties(currentStep); - BOOST_CHECK_EQUAL(wpp.OilRate, 1300 * siFactorL); - BOOST_CHECK_EQUAL(wpp.WaterRate, 1400 * siFactorL); - BOOST_CHECK_EQUAL(wpp.GasRate, 1500.52 * siFactorG); - BOOST_CHECK_EQUAL(wpp.LiquidRate, 1600.58 * siFactorL); - BOOST_CHECK_EQUAL(wpp.ResVRate, 1801.05 * siFactorL); - BOOST_CHECK_EQUAL(wpp.BHPLimit, 1900 * siFactorP); - BOOST_CHECK_EQUAL(wpp.THPLimit, 2000 * siFactorP); - BOOST_CHECK_EQUAL(wpp.VFPTableNumber, 2100); - BOOST_CHECK_EQUAL(well->getGuideRate(2), 2300.14); -} - -BOOST_AUTO_TEST_CASE(createDeckWithWeltArgException) { - Opm::Parser parser; - std::string input = - "SCHEDULE\n" - "WELTARG\n" - " OP_1 GRAT 1500.52 /\n" - " OP_1 LRAT /\n" - " OP_1 RESV 1801.05 /\n" - "/\n"; - - ParseContext parseContext; - DeckPtr deck = parser.parseString(input, parseContext); - EclipseGrid grid(10,10,10); - - BOOST_CHECK_THROW(Schedule (parseContext , grid , deck ), std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(createDeckWithWeltArgException2) { - Opm::Parser parser; - std::string input = - "SCHEDULE\n" - "WELTARG\n" - " OP_1 LRAT /\n" - " OP_1 RESV 1801.05 /\n" - "/\n"; - - ParseContext parseContext; - DeckPtr deck = parser.parseString(input, parseContext); - EclipseGrid grid(10,10,10); - - BOOST_CHECK_THROW(Schedule (parseContext , grid , deck ), std::out_of_range); -} - -BOOST_AUTO_TEST_CASE(createDeckWithWPIMULT) { - Opm::Parser parser; - std::string input = - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 10 OKT 2008 / \n" - "/\n" - "WELSPECS\n" - " 'OP_1' 'OP' 9 9 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - "/\n" - "COMPDAT\n" - " 'OP_1' 9 9 1 1 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'OP_1' 9 9 2 2 'OPEN' 1* 46.825 0.311 4332.346 1* 1* 'X' 22.123 / \n" - " 'OP_1' 9 9 3 9 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - "/\n" - "DATES -- 2\n" - " 20 JAN 2010 / \n" - "/\n" - "WELTARG\n" - " OP_1 ORAT 1300 /\n" - " OP_1 WRAT 1400 /\n" - " OP_1 GRAT 1500.52 /\n" - " OP_1 LRAT 1600.58 /\n" - " OP_1 RESV 1801.05 /\n" - " OP_1 BHP 1900 /\n" - " OP_1 THP 2000 /\n" - " OP_1 VFP 2100.09 /\n" - " OP_1 GUID 2300.14 /\n" - "/\n" - "WPIMULT\n" - "OP_1 1.30 /\n" - "/\n" - "DATES -- 3\n" - " 20 JAN 2011 / \n" - "/\n" - "WPIMULT\n" - "OP_1 1.30 /\n" - "/\n" - "DATES -- 4\n" - " 20 JAN 2012 / \n" - "/\n" - "COMPDAT\n" - " 'OP_1' 9 9 1 1 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'OP_1' 9 9 2 2 'OPEN' 1* 46.825 0.311 4332.346 1* 1* 'X' 22.123 / \n" - " 'OP_1' 9 9 3 9 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - "/\n"; - - ParseContext parseContext; - DeckPtr deck = parser.parseString(input, parseContext); - EclipseGrid grid(10,10,10); - Schedule schedule(parseContext , grid, deck ); - auto* well = schedule.getWell("OP_1"); - - size_t currentStep = 2; - CompletionSetConstPtr currentCompletionSet = well->getCompletions(currentStep); - size_t completionSize = currentCompletionSet->size(); - - for(size_t i = 0; i < completionSize;i++) { - CompletionConstPtr currentCompletion = currentCompletionSet->get(i); - BOOST_CHECK_EQUAL(currentCompletion->getWellPi(), 1.3); - } - - currentStep = 3; - currentCompletionSet = well->getCompletions(currentStep); - completionSize = currentCompletionSet->size(); - - for(size_t i = 0; i < completionSize;i++) { - CompletionConstPtr currentCompletion = currentCompletionSet->get(i); - BOOST_CHECK_EQUAL(currentCompletion->getWellPi(), (1.3*1.3)); - } - - currentStep = 4; - currentCompletionSet = well->getCompletions(currentStep); - completionSize = currentCompletionSet->size(); - - for(size_t i = 0; i < completionSize;i++) { - CompletionConstPtr currentCompletion = currentCompletionSet->get(i); - BOOST_CHECK_EQUAL(currentCompletion->getWellPi(), 1.0); - } - -} - -BOOST_AUTO_TEST_CASE(createDeckWithDRSDT) { - Opm::Parser parser; - std::string input = - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 10 OKT 2008 / \n" - "/\n" - "DRSDT\n" - "0.0003\n" - "/\n"; - - ParseContext parseContext; - DeckPtr deck = parser.parseString(input, parseContext); - EclipseGrid grid(10,10,10); - Schedule schedule(parseContext , grid, deck ); - size_t currentStep = 1; - BOOST_CHECK_EQUAL(schedule.hasOilVaporizationProperties(), true); - const auto& ovap = schedule.getOilVaporizationProperties(currentStep); - - BOOST_CHECK_EQUAL(true, ovap.getOption()); - BOOST_CHECK_EQUAL(ovap.getType(), Opm::OilVaporizationEnum::DRSDT); -} - - -BOOST_AUTO_TEST_CASE(createDeckWithDRSDTthenDRVDT) { - Opm::Parser parser; - std::string input = - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 10 OKT 2008 / \n" - "/\n" - "DRSDT\n" - "0.0003\n" - "/\n" - "DATES -- 1\n" - " 10 OKT 2009 / \n" - "/\n" - "DRVDT\n" - "0.100\n" - "/\n"; - - ParseContext parseContext; - DeckPtr deck = parser.parseString(input, parseContext); - EclipseGrid grid(10,10,10); - Schedule schedule(parseContext , grid, deck ); - size_t currentStep = 2; - BOOST_CHECK_EQUAL(schedule.hasOilVaporizationProperties(), true); - const OilVaporizationProperties& ovap = schedule.getOilVaporizationProperties(currentStep); - double value = ovap.getMaxDRVDT(); - BOOST_CHECK_EQUAL(1.1574074074074074e-06, value); - BOOST_CHECK_EQUAL(ovap.getType(), Opm::OilVaporizationEnum::DRVDT); -} - -BOOST_AUTO_TEST_CASE(createDeckWithVAPPARS) { - Opm::Parser parser; - std::string input = - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 10 OKT 2008 / \n" - "/\n" - "VAPPARS\n" - "2 0.100\n" - "/\n"; - - ParseContext parseContext; - DeckPtr deck = parser.parseString(input, parseContext); - EclipseGrid grid(10,10,10); - Schedule schedule(parseContext , grid, deck ); - size_t currentStep = 1; - BOOST_CHECK_EQUAL(schedule.hasOilVaporizationProperties(), true); - const OilVaporizationProperties& ovap = schedule.getOilVaporizationProperties(currentStep); - BOOST_CHECK_EQUAL(ovap.getType(), Opm::OilVaporizationEnum::VAPPARS); - double vap1 = ovap.getVap1(); - BOOST_CHECK_EQUAL(2, vap1); - double vap2 = ovap.getVap2(); - BOOST_CHECK_EQUAL(0.100, vap2); - -} - - -BOOST_AUTO_TEST_CASE(createDeckWithOutOilVaporizationProperties) { - Opm::Parser parser; - std::string input = - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 10 OKT 2008 / \n" - "/\n"; - - - ParseContext parseContext; - DeckPtr deck = parser.parseString(input, parseContext); - EclipseGrid grid(10,10,10); - Schedule schedule(parseContext , grid, deck ); - - BOOST_CHECK_EQUAL(schedule.hasOilVaporizationProperties(), false); - - -} - -BOOST_AUTO_TEST_CASE(changeBhpLimitInHistoryModeWithWeltarg) { - Opm::Parser parser; - std::string input = - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 10 OKT 2008 / \n" - "/\n" - "WELSPECS\n" - " 'P' 'OP' 9 9 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - " 'I' 'OP' 1 1 1* 'WATER' 1* 1* 1* 1* 1* 1* 1* / \n" - "/\n" - "COMPDAT\n" - " 'P' 9 9 1 1 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'P' 9 9 2 2 'OPEN' 1* 46.825 0.311 4332.346 1* 1* 'X' 22.123 / \n" - " 'I' 1 1 1 1 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - "/\n" - "WCONHIST\n" - " 'P' 'OPEN' 'RESV' 6* 500 / \n" - "/\n" - "WCONINJH\n" - " 'I' 'WATER' 1* 100 250 / \n" - "/\n" - "WELTARG\n" - " 'P' 'BHP' 50 / \n" - " 'I' 'BHP' 600 / \n" - "/\n" - "DATES -- 2\n" - " 15 OKT 2008 / \n" - "/\n" - "WCONHIST\n" - " 'P' 'OPEN' 'RESV' 6* 500/\n/\n" - "WCONINJH\n" - " 'I' 'WATER' 1* 100 250 / \n" - "/\n" - "DATES -- 3\n" - " 18 OKT 2008 / \n" - "/\n" - "WCONHIST\n" - " 'I' 'OPEN' 'RESV' 6* /\n/\n" - "DATES -- 3\n" - " 20 OKT 2008 / \n" - "/\n" - "WCONINJH\n" - " 'I' 'WATER' 1* 100 250 / \n" - "/\n" - ; - - ParseContext parseContext; - DeckPtr deck = parser.parseString(input, parseContext); - EclipseGrid grid(10,10,10); - Schedule schedule(parseContext , grid, deck ); - auto* well_p = schedule.getWell("P"); - - BOOST_CHECK_EQUAL(well_p->getProductionProperties(0).BHPLimit, 0); //start - BOOST_CHECK_EQUAL(well_p->getProductionProperties(1).BHPLimit, 50 * 1e5); // 1 - // The BHP limit should not be effected by WCONHIST - BOOST_CHECK_EQUAL(well_p->getProductionProperties(2).BHPLimit, 50 * 1e5); // 2 - - auto* well_i = schedule.getWell("I"); - - BOOST_CHECK_EQUAL(well_i->getInjectionProperties(0).BHPLimit, 0); //start - BOOST_CHECK_EQUAL(well_i->getInjectionProperties(1).BHPLimit, 600 * 1e5); // 1 - BOOST_CHECK_EQUAL(well_i->getInjectionProperties(2).BHPLimit, 600 * 1e5); // 2 - - // Check that the BHP limit is reset when changing between injector and producer. - BOOST_CHECK_EQUAL(well_i->getInjectionProperties(3).BHPLimit, 0); // 3 - BOOST_CHECK_EQUAL(well_i->getInjectionProperties(4).BHPLimit, 0); // 4 - - BOOST_CHECK_EQUAL( true , well_i->getInjectionProperties(2).hasInjectionControl(Opm::WellInjector::BHP) ); - BOOST_CHECK_EQUAL( false , well_i->getInjectionProperties(3).hasInjectionControl(Opm::WellInjector::BHP) ); - BOOST_CHECK_EQUAL( false , well_i->getInjectionProperties(4).hasInjectionControl(Opm::WellInjector::BHP) ); -} - -BOOST_AUTO_TEST_CASE(changeModeWithWHISTCTL) { - Opm::Parser parser; - std::string input = - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 10 OKT 2008 / \n" - "/\n" - "WELSPECS\n" - " 'P1' 'OP' 9 9 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - " 'P2' 'OP' 5 5 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - " 'I' 'OP' 1 1 1* 'WATER' 1* 1* 1* 1* 1* 1* 1* / \n" - "/\n" - "COMPDAT\n" - " 'P1' 9 9 1 1 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'P1' 9 9 2 2 'OPEN' 1* 46.825 0.311 4332.346 1* 1* 'X' 22.123 / \n" - " 'P2' 5 5 1 1 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'P2' 5 5 2 2 'OPEN' 1* 46.825 0.311 4332.346 1* 1* 'X' 22.123 / \n" - " 'I' 1 1 1 1 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - "/\n" - "WCONHIST\n" - " 'P1' 'OPEN' 'ORAT' 5*/ \n" - " 'P2' 'OPEN' 'ORAT' 5*/ \n" - "/\n" - "DATES -- 2\n" - " 15 OKT 2008 / \n" - "/\n" - "WHISTCTL\n" - " RESV / \n" - "WCONHIST\n" - " 'P1' 'OPEN' 'ORAT' 5*/ \n" - " 'P2' 'OPEN' 'ORAT' 5*/ \n" - "/\n" - "DATES -- 3\n" - " 18 OKT 2008 / \n" - "/\n" - "WCONHIST\n" - " 'P1' 'OPEN' 'ORAT' 5*/ \n" - " 'P2' 'OPEN' 'ORAT' 5*/ \n" - "/\n" - "DATES -- 4\n" - " 20 OKT 2008 / \n" - "/\n" - "WHISTCTL\n" - " LRAT / \n" - "WCONHIST\n" - " 'P1' 'OPEN' 'ORAT' 5*/ \n" - " 'P2' 'OPEN' 'ORAT' 5*/ \n" - "/\n" - "DATES -- 5\n" - " 25 OKT 2008 / \n" - "/\n" - "WHISTCTL\n" - " NONE / \n" - "WCONHIST\n" - " 'P1' 'OPEN' 'ORAT' 5*/ \n" - " 'P2' 'OPEN' 'ORAT' 5*/ \n" - "/\n" - ; - - ParseContext parseContext; - DeckPtr deck = parser.parseString(input, parseContext); - EclipseGrid grid(10,10,10); - Schedule schedule(parseContext , grid, deck ); - auto* well_p1 = schedule.getWell("P1"); - auto* well_p2 = schedule.getWell("P2"); - - //Start - BOOST_CHECK_EQUAL(well_p1->getProductionProperties(0).controlMode, Opm::WellProducer::CMODE_UNDEFINED); - BOOST_CHECK_EQUAL(well_p2->getProductionProperties(0).controlMode, Opm::WellProducer::CMODE_UNDEFINED); - - //10 OKT 2008 - BOOST_CHECK_EQUAL(well_p1->getProductionProperties(1).controlMode, Opm::WellProducer::ORAT); - BOOST_CHECK_EQUAL(well_p2->getProductionProperties(1).controlMode, Opm::WellProducer::ORAT); - - //15 OKT 2008 - BOOST_CHECK_EQUAL(well_p1->getProductionProperties(2).controlMode, Opm::WellProducer::RESV); - BOOST_CHECK_EQUAL(well_p2->getProductionProperties(2).controlMode, Opm::WellProducer::RESV); - - //18 OKT 2008 - BOOST_CHECK_EQUAL(well_p1->getProductionProperties(3).controlMode, Opm::WellProducer::RESV); - BOOST_CHECK_EQUAL(well_p2->getProductionProperties(3).controlMode, Opm::WellProducer::RESV); - - // 20 OKT 2008 - BOOST_CHECK_EQUAL(well_p1->getProductionProperties(4).controlMode, Opm::WellProducer::LRAT); - BOOST_CHECK_EQUAL(well_p2->getProductionProperties(4).controlMode, Opm::WellProducer::LRAT); - - // 25 OKT 2008 - BOOST_CHECK_EQUAL(well_p1->getProductionProperties(5).controlMode, Opm::WellProducer::ORAT); - BOOST_CHECK_EQUAL(well_p2->getProductionProperties(5).controlMode, Opm::WellProducer::ORAT); -} - -BOOST_AUTO_TEST_CASE(unsupportedOptionWHISTCTL) { - Opm::Parser parser; - std::string input = - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 10 OKT 2008 / \n" - "/\n" - "WELSPECS\n" - " 'P1' 'OP' 9 9 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - " 'P2' 'OP' 5 5 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - " 'I' 'OP' 1 1 1* 'WATER' 1* 1* 1* 1* 1* 1* 1* / \n" - "/\n" - "COMPDAT\n" - " 'P1' 9 9 1 1 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'P1' 9 9 2 2 'OPEN' 1* 46.825 0.311 4332.346 1* 1* 'X' 22.123 / \n" - " 'P2' 5 5 1 1 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'P2' 5 5 2 2 'OPEN' 1* 46.825 0.311 4332.346 1* 1* 'X' 22.123 / \n" - " 'I' 1 1 1 1 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - "/\n" - "WCONHIST\n" - " 'P1' 'OPEN' 'ORAT' 5*/ \n" - " 'P2' 'OPEN' 'ORAT' 5*/ \n" - "/\n" - "DATES -- 2\n" - " 15 OKT 2008 / \n" - "/\n" - "WHISTCTL\n" - " * YES / \n" - ; - - ParseContext parseContext; - DeckPtr deck = parser.parseString(input, parseContext); - EclipseGrid grid(10,10,10); - BOOST_CHECK_THROW(Schedule schedule(parseContext , grid, deck ), std::invalid_argument); -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/TimeMapTest.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/TimeMapTest.cpp deleted file mode 100644 index 49a7427a6c..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/TimeMapTest.cpp +++ /dev/null @@ -1,346 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include - -#define BOOST_TEST_MODULE TimeMapTests - -#include -#include - - - -#include -#include -#include -#include -#include -#include -#include -#include - -BOOST_AUTO_TEST_CASE(CreateTimeMap_InvalidThrow) { - boost::gregorian::date startDate; - BOOST_CHECK_THROW(Opm::TimeMap(boost::posix_time::ptime(startDate)) , std::invalid_argument); -} - - -BOOST_AUTO_TEST_CASE(CreateTimeMap) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - Opm::TimeMap timeMap((boost::posix_time::ptime(startDate))); - BOOST_CHECK_EQUAL(1U , timeMap.size()); -} - - - -BOOST_AUTO_TEST_CASE(AddDateBeforeThrows) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - Opm::TimeMap timeMap((boost::posix_time::ptime(startDate))); - - BOOST_CHECK_THROW( timeMap.addTime( boost::posix_time::ptime(boost::gregorian::date(2009,boost::gregorian::Feb,2))), - std::invalid_argument); -} - - -BOOST_AUTO_TEST_CASE(GetStartDate) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - boost::posix_time::ptime startTime(startDate); - Opm::TimeMap timeMap(startTime); - BOOST_CHECK_EQUAL( startTime , timeMap.getStartTime(/*timeStepIdx=*/0)); -} - - - -BOOST_AUTO_TEST_CASE(AddDateAfterSizeCorrect) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - Opm::TimeMap timeMap((boost::posix_time::ptime(startDate))); - - timeMap.addTime( boost::posix_time::ptime(boost::gregorian::date(2010,boost::gregorian::Feb,2))); - BOOST_CHECK_EQUAL( 2U , timeMap.size()); -} - - -BOOST_AUTO_TEST_CASE(AddDateNegativeStepThrows) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - Opm::TimeMap timeMap((boost::posix_time::ptime(startDate))); - - BOOST_CHECK_THROW( timeMap.addTStep( boost::posix_time::hours(-1)) , std::invalid_argument); -} - - - -BOOST_AUTO_TEST_CASE(AddStepSizeCorrect) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - std::shared_ptr timeMap = std::make_shared(boost::posix_time::ptime(boost::posix_time::ptime(startDate))); - - timeMap->addTStep( boost::posix_time::hours(1)); - timeMap->addTStep( boost::posix_time::hours(23)); - BOOST_CHECK_EQUAL( 3U , timeMap->size()); - - BOOST_CHECK_THROW( (*timeMap)[3] , std::invalid_argument ); - BOOST_CHECK_EQUAL( (*timeMap)[0] , boost::posix_time::ptime(boost::posix_time::ptime(startDate))); - BOOST_CHECK_EQUAL( (*timeMap)[2] , boost::posix_time::ptime(boost::posix_time::ptime( boost::gregorian::date( 2010 , boost::gregorian::Jan , 2 )))); -} - - -BOOST_AUTO_TEST_CASE( dateFromEclipseThrowsInvalidRecord ) { - Opm::DeckRecord startRecord; - auto dayItem = Opm::DeckItem::make< int >("DAY"); - auto monthItem = Opm::DeckItem::make< std::string >("MONTH"); - auto yearItem = Opm::DeckItem::make< int >("YEAR"); - auto timeItem = Opm::DeckItem::make< std::string >("TIME"); - auto extraItem = Opm::DeckItem::make< int >("EXTRA"); - - dayItem.push_back( 10 ); - yearItem.push_back(1987 ); - monthItem.push_back("FEB"); - timeItem.push_back("00:00:00.000"); - - BOOST_CHECK_THROW( Opm::TimeMap::timeFromEclipse( startRecord ) , std::invalid_argument ); - - startRecord.addItem( std::move( dayItem ) ); - BOOST_CHECK_THROW( Opm::TimeMap::timeFromEclipse( startRecord ) , std::invalid_argument ); - - startRecord.addItem( std::move( monthItem ) ); - BOOST_CHECK_THROW( Opm::TimeMap::timeFromEclipse( startRecord ) , std::invalid_argument ); - - startRecord.addItem( std::move( yearItem ) ); - BOOST_CHECK_THROW(Opm::TimeMap::timeFromEclipse( startRecord ) , std::invalid_argument ); - - startRecord.addItem( std::move( timeItem ) ); - BOOST_CHECK_NO_THROW(Opm::TimeMap::timeFromEclipse( startRecord )); - - startRecord.addItem( std::move( extraItem ) ); - BOOST_CHECK_THROW( Opm::TimeMap::timeFromEclipse( startRecord ) , std::invalid_argument ); -} - - - -BOOST_AUTO_TEST_CASE( dateFromEclipseInvalidMonthThrows ) { - Opm::DeckRecord startRecord; - auto dayItem = Opm::DeckItem::make< int >("DAY"); - auto monthItem = Opm::DeckItem::make< std::string >("MONTH"); - auto yearItem = Opm::DeckItem::make< int >("YEAR"); - - dayItem.push_back( 10 ); - yearItem.push_back(1987 ); - monthItem.push_back("XXX"); - - startRecord.addItem( std::move( dayItem ) ); - startRecord.addItem( std::move( monthItem ) ); - startRecord.addItem( std::move( yearItem ) ); - - BOOST_CHECK_THROW( Opm::TimeMap::timeFromEclipse( startRecord ) , std::invalid_argument ); -} - - -BOOST_AUTO_TEST_CASE( timeFromEclipseCheckMonthNames ) { - - BOOST_CHECK_EQUAL( boost::posix_time::ptime(boost::gregorian::date( 2000 , boost::gregorian::Jan , 1 )) , Opm::TimeMap::timeFromEclipse( 1 , "JAN" , 2000)); - BOOST_CHECK_EQUAL( boost::posix_time::ptime(boost::gregorian::date( 2000 , boost::gregorian::Feb , 1 )) , Opm::TimeMap::timeFromEclipse( 1 , "FEB" , 2000)); - BOOST_CHECK_EQUAL( boost::posix_time::ptime(boost::gregorian::date( 2000 , boost::gregorian::Mar , 1 )) , Opm::TimeMap::timeFromEclipse( 1 , "MAR" , 2000)); - BOOST_CHECK_EQUAL( boost::posix_time::ptime(boost::gregorian::date( 2000 , boost::gregorian::Apr , 1 )) , Opm::TimeMap::timeFromEclipse( 1 , "APR" , 2000)); - BOOST_CHECK_EQUAL( boost::posix_time::ptime(boost::gregorian::date( 2000 , boost::gregorian::May , 1 )) , Opm::TimeMap::timeFromEclipse( 1 , "MAI" , 2000)); - BOOST_CHECK_EQUAL( boost::posix_time::ptime(boost::gregorian::date( 2000 , boost::gregorian::May , 1 )) , Opm::TimeMap::timeFromEclipse( 1 , "MAY" , 2000)); - BOOST_CHECK_EQUAL( boost::posix_time::ptime(boost::gregorian::date( 2000 , boost::gregorian::Jun , 1 )) , Opm::TimeMap::timeFromEclipse( 1 , "JUN" , 2000)); - BOOST_CHECK_EQUAL( boost::posix_time::ptime(boost::gregorian::date( 2000 , boost::gregorian::Jul , 1 )) , Opm::TimeMap::timeFromEclipse( 1 , "JUL" , 2000)); - BOOST_CHECK_EQUAL( boost::posix_time::ptime(boost::gregorian::date( 2000 , boost::gregorian::Jul , 1 )) , Opm::TimeMap::timeFromEclipse( 1 , "JLY" , 2000)); - BOOST_CHECK_EQUAL( boost::posix_time::ptime(boost::gregorian::date( 2000 , boost::gregorian::Aug , 1 )) , Opm::TimeMap::timeFromEclipse( 1 , "AUG" , 2000)); - BOOST_CHECK_EQUAL( boost::posix_time::ptime(boost::gregorian::date( 2000 , boost::gregorian::Sep , 1 )) , Opm::TimeMap::timeFromEclipse( 1 , "SEP" , 2000)); - BOOST_CHECK_EQUAL( boost::posix_time::ptime(boost::gregorian::date( 2000 , boost::gregorian::Oct , 1 )) , Opm::TimeMap::timeFromEclipse( 1 , "OKT" , 2000)); - BOOST_CHECK_EQUAL( boost::posix_time::ptime(boost::gregorian::date( 2000 , boost::gregorian::Oct , 1 )) , Opm::TimeMap::timeFromEclipse( 1 , "OCT" , 2000)); - BOOST_CHECK_EQUAL( boost::posix_time::ptime(boost::gregorian::date( 2000 , boost::gregorian::Nov , 1 )) , Opm::TimeMap::timeFromEclipse( 1 , "NOV" , 2000)); - BOOST_CHECK_EQUAL( boost::posix_time::ptime(boost::gregorian::date( 2000 , boost::gregorian::Dec , 1 )) , Opm::TimeMap::timeFromEclipse( 1 , "DEC" , 2000)); - BOOST_CHECK_EQUAL( boost::posix_time::ptime(boost::gregorian::date( 2000 , boost::gregorian::Dec , 1 )) , Opm::TimeMap::timeFromEclipse( 1 , "DES" , 2000)); - -} - - - -BOOST_AUTO_TEST_CASE( timeFromEclipseInputRecord ) { - Opm::DeckRecord startRecord; - auto dayItem = Opm::DeckItem::make< int >("DAY"); - auto monthItem = Opm::DeckItem::make< std::string >("MONTH"); - auto yearItem = Opm::DeckItem::make< int >("YEAR"); - auto timeItem = Opm::DeckItem::make< std::string >("TIME"); - - dayItem.push_back( 10 ); - yearItem.push_back( 1987 ); - monthItem.push_back("JAN"); - timeItem.push_back("00:00:00.000"); - - startRecord.addItem( std::move( dayItem ) ); - startRecord.addItem( std::move( monthItem ) ); - startRecord.addItem( std::move( yearItem ) ); - startRecord.addItem( std::move( timeItem ) ); - - BOOST_CHECK_EQUAL( boost::posix_time::ptime(boost::gregorian::date( 1987 , boost::gregorian::Jan , 10 )) , Opm::TimeMap::timeFromEclipse( startRecord )); -} - - - -BOOST_AUTO_TEST_CASE( addDATESFromWrongKeywordThrows ) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - Opm::TimeMap timeMap((boost::posix_time::ptime(startDate))); - Opm::DeckKeyword deckKeyword("NOTDATES"); - BOOST_CHECK_THROW( timeMap.addFromDATESKeyword( deckKeyword ) , std::invalid_argument ); -} - - - -BOOST_AUTO_TEST_CASE( addTSTEPFromWrongKeywordThrows ) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - boost::posix_time::ptime ptime(startDate); - Opm::TimeMap timeMap(ptime); - Opm::DeckKeyword deckKeyword("NOTTSTEP"); - BOOST_CHECK_THROW( timeMap.addFromTSTEPKeyword( deckKeyword ) , std::invalid_argument ); -} - -BOOST_AUTO_TEST_CASE(TimeStepsCorrect) { - const char *deckData = - "START\n" - " 21 MAY 1981 /\n" - "\n" - "TSTEP\n" - " 1 2 3 4 5 /\n" - "\n" - "DATES\n" - " 1 JAN 1982 /\n" - " 1 JAN 1982 13:55:44 /\n" - " 3 JAN 1982 14:56:45.123 /\n" - "/\n" - "\n" - "TSTEP\n" - " 6 7 /\n"; - - Opm::ParserPtr parser(new Opm::Parser(/*addDefault=*/true)); - Opm::DeckPtr deck = parser->parseString(deckData, Opm::ParseContext()); - Opm::TimeMap tmap(deck); - - BOOST_CHECK_EQUAL(tmap.getStartTime(/*timeLevelIdx=*/0), - boost::posix_time::ptime(boost::gregorian::date(1981, 5, 21))); - BOOST_CHECK_EQUAL(tmap.getTimeStepLength(/*index=*/0), 1*24*60*60); - BOOST_CHECK_EQUAL(tmap.getTimePassedUntil(/*timeLevelIdx=*/1), 1.0*24*60*60); - BOOST_CHECK_EQUAL(tmap.getStartTime(/*timeLevelIdx=*/1), - boost::posix_time::ptime(boost::gregorian::date(1981, 5, 21), - boost::posix_time::time_duration(1*24, 0, 0))); - BOOST_CHECK_EQUAL(tmap.getTimeStepLength(/*index=*/1), 2*24*60*60); - BOOST_CHECK_EQUAL(tmap.getTimePassedUntil(/*timeLevelIdx=*/2), (1.0 + 2.0)*24*60*60); - BOOST_CHECK_EQUAL(tmap.getStartTime(/*timeLevelIdx=*/2), - boost::posix_time::ptime(boost::gregorian::date(1981, 5, 21), - boost::posix_time::time_duration((1 + 2)*24, 0, 0))); - BOOST_CHECK_EQUAL(tmap.getTimeStepLength(/*index=*/2), 3*24*60*60); - BOOST_CHECK_EQUAL(tmap.getTimePassedUntil(/*timeLevelIdx=*/3), (1.0 + 2.0 + 3.0)*24*60*60); - BOOST_CHECK_EQUAL(tmap.getStartTime(/*timeLevelIdx=*/3), - boost::posix_time::ptime(boost::gregorian::date(1981, 5, 21), - boost::posix_time::time_duration((1 + 2 + 3)*24, 0, 0))); - BOOST_CHECK_EQUAL(tmap.getTimeStepLength(/*index=*/3), 4*24*60*60); - BOOST_CHECK_EQUAL(tmap.getTimePassedUntil(/*timeLevelIdx=*/4), (1.0 + 2.0 + 3.0 + 4.0)*24*60*60); - BOOST_CHECK_EQUAL(tmap.getStartTime(/*timeLevelIdx=*/4), - boost::posix_time::ptime(boost::gregorian::date(1981, 5, 21), - boost::posix_time::time_duration((1 + 2 + 3 + 4)*24, 0, 0))); - BOOST_CHECK_EQUAL(tmap.getTimeStepLength(/*index=*/4), 5*24*60*60); - BOOST_CHECK_EQUAL(tmap.getTimePassedUntil(/*timeLevelIdx=*/5), (1.0 + 2.0 + 3.0 + 4.0 + 5.0)*24*60*60); - BOOST_CHECK_EQUAL(tmap.getStartTime(/*timeLevelIdx=*/5), - boost::posix_time::ptime(boost::gregorian::date(1981, 5, 21), - boost::posix_time::time_duration((1 + 2 + 3 + 4 + 5)*24, 0, 0))); - // timestep 5 is the period between the last step specified using - // of the TIMES keyword and the first record of DATES - BOOST_CHECK_EQUAL(tmap.getStartTime(/*timeLevelIndex=*/6), - boost::posix_time::ptime(boost::gregorian::date(1982, 1, 1))); - BOOST_CHECK_EQUAL(tmap.getStartTime(/*timeLevelIndex=*/7), - boost::posix_time::ptime(boost::gregorian::date(1982, 1, 1), - boost::posix_time::time_duration(13, 55, 44))); - BOOST_CHECK_EQUAL(tmap.getStartTime(/*timeLevelIndex=*/8), - boost::posix_time::ptime(boost::gregorian::date(1982, 1, 3), - boost::posix_time::time_duration(14, 56, 45) + - boost::posix_time::milliseconds(123))); - BOOST_CHECK_EQUAL(tmap.getTimeStepLength(/*index=*/8), 6*24*60*60); - BOOST_CHECK_EQUAL(tmap.getTimeStepLength(/*index=*/9), 7*24*60*60); -} - - -BOOST_AUTO_TEST_CASE(initTimestepsYearsAndMonths) { - const char *deckData = - "START\n" - " 21 MAY 1981 /\n" - "\n" - "TSTEP\n" - " 1 2 3 4 5 /\n" - "\n" - "DATES\n" - " 5 JUL 1981 /\n" - " 6 JUL 1981 /\n" - " 5 AUG 1981 /\n" - " 5 SEP 1981 /\n" - " 1 OCT 1981 /\n" - " 1 NOV 1981 /\n" - " 1 DEC 1981 /\n" - " 1 JAN 1982 /\n" - " 1 JAN 1982 13:55:44 /\n" - " 3 JAN 1982 14:56:45.123 /\n" - "/\n" - "\n" - "TSTEP\n" - " 6 7 /\n"; - - Opm::ParserPtr parser(new Opm::Parser(true)); - Opm::DeckPtr deck = parser->parseString(deckData, Opm::ParseContext()); - const Opm::TimeMap tmap(deck); - - /*deckData timesteps: - 0 21 may 1981 START - 1 22 may 1981 - 2 24 may 1981 - 3 27 may 1981 - 4 31 may 1981 - 5 5 jun 1981 - 6 5 jul 1981 - 7 6 jul 1981 - 8 5 aug 1981 - 9 5 sep 1981 - 10 1 oct 1981 - 11 1 nov 1981 - 12 1 dec 1981 - 13 1 jan 1982 - 14 1 jan 1982 - 15 3 jan 1982 - 16 9 jan 1982 - 17 16 jan 1982*/ - - for (size_t timestep = 0; timestep <= 17; ++timestep) { - if ((5 == timestep) || (6 == timestep) || (8 == timestep) || (9 == timestep) || - (10 == timestep) || (11 == timestep) || (12 == timestep) || (13 == timestep)) { - BOOST_CHECK_EQUAL(true, tmap.isTimestepInFirstOfMonthsYearsSequence(timestep, false, true)); - } else { - BOOST_CHECK_EQUAL(false, tmap.isTimestepInFirstOfMonthsYearsSequence(timestep, false, true)); - } - } - - for (size_t timestep = 0; timestep <= 17; ++timestep) { - if (13 == timestep) { - BOOST_CHECK_EQUAL(true, tmap.isTimestepInFirstOfMonthsYearsSequence(timestep, true, false)); - } else { - BOOST_CHECK_EQUAL(false, tmap.isTimestepInFirstOfMonthsYearsSequence(timestep, true, false)); - } - } -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/TuningTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/TuningTests.cpp deleted file mode 100644 index fcce67fb39..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/TuningTests.cpp +++ /dev/null @@ -1,372 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - -#define BOOST_TEST_MODULE TuningTests - -#include - -#include -#include -#include -#include -#include -#include -#include - - -using namespace Opm; - - -const std::string& deckStr = "START\n" - " 21 MAY 1981 /\n" - "\n" - "SCHEDULE\n" - "TSTEP\n" - " 1 2 3 4 5 /\n" - "\n" - "TUNING\n" - "2 300 0.3 0.30 6 0.6 0.2 2.25 2E20 /\n" - "0.2 0.002 2E-7 0.0002 11 0.02 2.0E-6 0.002 0.002 0.035 66 0.02 2/\n" - "13 2 26 2 9 9 4.0E6 4.0E6 4.0E6 1/\n" - "DATES\n" - " 1 JAN 1982 /\n" - " 1 JAN 1982 13:55:44 /\n" - " 3 JAN 1982 14:56:45.123 /\n" - "/\n" - "TSTEP\n" - " 9 10 /\n" - "\n" - "TUNING\n" - "2 300 0.3 0.30 6 0.6 0.2 2.25 2E20 10.0/\n" - "/\n" - "/\n"; - - - -static DeckPtr createDeck(const std::string& input) { - Opm::Parser parser; - return parser.parseString(input, ParseContext()); -} - - - -BOOST_AUTO_TEST_CASE(TuningTest) { - - DeckPtr deck = createDeck(deckStr); - EclipseGrid grid(10,10,10); - Schedule schedule( ParseContext() , grid , deck ); - auto tuning = schedule.getTuning(); - - - const double diff = 1.0e-14; - - /*** TIMESTEP 4***/ - /********* Record 1 ***********/ - size_t timestep = 4; - double TSINIT_default = tuning.getTSINIT(timestep); - BOOST_CHECK_CLOSE(TSINIT_default, 1 * Metric::Time, diff); - - double TSMAXZ_default = tuning.getTSMAXZ(timestep); - BOOST_CHECK_CLOSE(TSMAXZ_default, 365 * Metric::Time, diff); - - double TSMINZ_default = tuning.getTSMINZ(timestep); - BOOST_CHECK_CLOSE(TSMINZ_default, 0.1 * Metric::Time, diff); - - double TSMCHP_default = tuning.getTSMCHP(timestep); - BOOST_CHECK_CLOSE(TSMCHP_default, 0.15 * Metric::Time, diff); - - double TSFMAX_default = tuning.getTSFMAX(timestep); - BOOST_CHECK_CLOSE(TSFMAX_default, 3.0, diff); - - double TSFMIN_default = tuning.getTSFMIN(timestep); - BOOST_CHECK_CLOSE(TSFMIN_default, 0.3, diff); - - double TSFCNV_default = tuning.getTSFCNV(timestep); - BOOST_CHECK_CLOSE(TSFCNV_default, 0.1, diff); - - double TFDIFF_default = tuning.getTFDIFF(timestep); - BOOST_CHECK_CLOSE(TFDIFF_default, 1.25, diff); - - double THRUPT_default = tuning.getTHRUPT(timestep); - BOOST_CHECK_CLOSE(THRUPT_default, 1E20, diff); - - bool TMAXWC_has_value = tuning.getTMAXWChasValue(timestep); - double TMAXWC_default = tuning.getTMAXWC(timestep); - BOOST_CHECK_EQUAL(false, TMAXWC_has_value); - BOOST_CHECK_CLOSE(TMAXWC_default, 0.0 * Metric::Time, diff); - - - /********* Record 2 ************/ - double TRGTTE_default = tuning.getTRGTTE(timestep); - BOOST_CHECK_CLOSE(TRGTTE_default, 0.1, diff); - - double TRGCNV_default = tuning.getTRGCNV(timestep); - BOOST_CHECK_CLOSE(TRGCNV_default, 0.001, diff); - - double TRGMBE_default = tuning.getTRGMBE(timestep); - BOOST_CHECK_CLOSE(TRGMBE_default, 1.0E-7, diff); - - double TRGLCV_default = tuning.getTRGLCV(timestep); - BOOST_CHECK_CLOSE(TRGLCV_default, 0.0001, diff); - - double XXXTTE_default = tuning.getXXXTTE(timestep); - BOOST_CHECK_CLOSE(XXXTTE_default, 10.0, diff); - - double XXXCNV_default = tuning.getXXXCNV(timestep); - BOOST_CHECK_CLOSE(XXXCNV_default, 0.01, diff); - - double XXXMBE_default = tuning.getXXXMBE(timestep); - BOOST_CHECK_CLOSE(XXXMBE_default, 1.0E-6, diff); - - double XXXLCV_default = tuning.getXXXLCV(timestep); - BOOST_CHECK_CLOSE(XXXLCV_default, 0.001, diff); - - double XXXWFL_default = tuning.getXXXWFL(timestep); - BOOST_CHECK_CLOSE(XXXWFL_default, 0.001, diff); - - double TRGFIP_default = tuning.getTRGFIP(timestep); - BOOST_CHECK_CLOSE(TRGFIP_default, 0.025, diff); - - bool TRGSFT_has_value = tuning.getTRGSFThasValue(timestep); - double TRGSFT_default = tuning.getTRGSFT(timestep); - BOOST_CHECK_EQUAL(false, TRGSFT_has_value); - BOOST_CHECK_CLOSE(TRGSFT_default, 0.0, diff); - - double THIONX_default = tuning.getTHIONX(timestep); - BOOST_CHECK_CLOSE(THIONX_default, 0.01, diff); - - int TRWGHT_default = tuning.getTRWGHT(timestep); - BOOST_CHECK_EQUAL(TRWGHT_default, 1); - - - /********* Record 3 ************/ - int NEWTMX_default = tuning.getNEWTMX(timestep); - BOOST_CHECK_EQUAL(NEWTMX_default, 12); - - int NEWTMN_default = tuning.getNEWTMN(timestep); - BOOST_CHECK_EQUAL(NEWTMN_default, 1); - - int LITMAX_default = tuning.getLITMAX(timestep); - BOOST_CHECK_EQUAL(LITMAX_default, 25); - - int LITMIN_default = tuning.getLITMIN(timestep); - BOOST_CHECK_EQUAL(LITMIN_default, 1); - - int MXWSIT_default = tuning.getMXWSIT(timestep); - BOOST_CHECK_EQUAL(MXWSIT_default, 8); - - int MXWPIT_default = tuning.getMXWPIT(timestep); - BOOST_CHECK_EQUAL(MXWPIT_default, 8); - - double DDPLIM_default = tuning.getDDPLIM(timestep); - BOOST_CHECK_CLOSE(DDPLIM_default, 1.0E6 * Metric::Pressure, diff); - - double DDSLIM_default = tuning.getDDSLIM(timestep); - BOOST_CHECK_CLOSE(DDSLIM_default, 1.0E6, diff); - - double TRGDPR_default = tuning.getTRGDPR(timestep); - BOOST_CHECK_CLOSE(TRGDPR_default, 1.0E6 * Metric::Pressure, diff); - - bool XXXDPR_has_value = tuning.getXXXDPRhasValue(timestep); - double XXXDPR_default = tuning.getXXXDPR(timestep); - BOOST_CHECK_EQUAL(false, XXXDPR_has_value); - BOOST_CHECK_CLOSE(XXXDPR_default, 0.0, diff); - - - - - /*** TIMESTEP 5***/ - /********* Record 1 ***********/ - timestep = 5; - double TSINIT = tuning.getTSINIT(timestep); - BOOST_CHECK_CLOSE(TSINIT, 2 * Metric::Time, diff); - - double TSMAXZ = tuning.getTSMAXZ(timestep); - BOOST_CHECK_CLOSE(TSMAXZ, 300 * Metric::Time, diff); - - double TSMINZ = tuning.getTSMINZ(timestep); - BOOST_CHECK_CLOSE(TSMINZ, 0.3 * Metric::Time, diff); - - double TSMCHP = tuning.getTSMCHP(timestep); - BOOST_CHECK_CLOSE(TSMCHP, 0.30 * Metric::Time, diff); - - double TSFMAX = tuning.getTSFMAX(timestep); - BOOST_CHECK_CLOSE(TSFMAX, 6.0, 1.0); - - double TSFMIN = tuning.getTSFMIN(timestep); - BOOST_CHECK_CLOSE(TSFMIN, 0.6, 1.0); - - double TSFCNV = tuning.getTSFCNV(timestep); - BOOST_CHECK_CLOSE(TSFCNV, 0.2, diff); - - double TFDIFF = tuning.getTFDIFF(timestep); - BOOST_CHECK_CLOSE(TFDIFF, 2.25, diff); - - double THRUPT = tuning.getTHRUPT(timestep); - BOOST_CHECK_CLOSE(THRUPT, 2E20, diff); - - TMAXWC_has_value = tuning.getTMAXWChasValue(timestep); - TMAXWC_default = tuning.getTMAXWC(timestep); - BOOST_CHECK_EQUAL(false, TMAXWC_has_value); - BOOST_CHECK_CLOSE(TMAXWC_default, 0.0 * Metric::Time, diff); - - /********* Record 2 ***********/ - double TRGTTE = tuning.getTRGTTE(timestep); - BOOST_CHECK_CLOSE(TRGTTE, 0.2, diff); - - double TRGCNV = tuning.getTRGCNV(timestep); - BOOST_CHECK_CLOSE(TRGCNV, 0.002, diff); - - double TRGMBE = tuning.getTRGMBE(timestep); - BOOST_CHECK_CLOSE(TRGMBE, 2.0E-7, diff); - - double TRGLCV = tuning.getTRGLCV(timestep); - BOOST_CHECK_CLOSE(TRGLCV, 0.0002, diff); - - double XXXTTE = tuning.getXXXTTE(timestep); - BOOST_CHECK_CLOSE(XXXTTE, 11.0, diff); - - double XXXCNV = tuning.getXXXCNV(timestep); - BOOST_CHECK_CLOSE(XXXCNV, 0.02, diff); - - double XXXMBE = tuning.getXXXMBE(timestep); - BOOST_CHECK_CLOSE(XXXMBE, 2.0E-6, diff); - - double XXXLCV = tuning.getXXXLCV(timestep); - BOOST_CHECK_CLOSE(XXXLCV, 0.002, diff); - - double XXXWFL = tuning.getXXXWFL(timestep); - BOOST_CHECK_CLOSE(XXXWFL, 0.002, diff); - - double TRGFIP = tuning.getTRGFIP(timestep); - BOOST_CHECK_CLOSE(TRGFIP, 0.035, diff); - - TRGSFT_has_value = tuning.getTRGSFThasValue(timestep); - double TRGSFT = tuning.getTRGSFT(timestep); - BOOST_CHECK_EQUAL(true, TRGSFT_has_value); - BOOST_CHECK_CLOSE(TRGSFT, 66.0, diff); - - double THIONX = tuning.getTHIONX(timestep); - BOOST_CHECK_CLOSE(THIONX, 0.02, diff); - - int TRWGHT = tuning.getTRWGHT(timestep); - BOOST_CHECK_EQUAL(TRWGHT, 2); - - /********* Record 3 ***********/ - int NEWTMX = tuning.getNEWTMX(timestep); - BOOST_CHECK_EQUAL(NEWTMX, 13); - - int NEWTMN = tuning.getNEWTMN(timestep); - BOOST_CHECK_EQUAL(NEWTMN, 2); - - int LITMAX = tuning.getLITMAX(timestep); - BOOST_CHECK_EQUAL(LITMAX, 26); - - int LITMIN = tuning.getLITMIN(timestep); - BOOST_CHECK_EQUAL(LITMIN, 2); - - int MXWSIT = tuning.getMXWSIT(timestep); - BOOST_CHECK_EQUAL(MXWSIT, 9); - - int MXWPIT = tuning.getMXWPIT(timestep); - BOOST_CHECK_EQUAL(MXWPIT, 9); - - double DDPLIM= tuning.getDDPLIM(timestep); - BOOST_CHECK_CLOSE(DDPLIM, 4.0E6 * Metric::Pressure, diff); - - double DDSLIM= tuning.getDDSLIM(timestep); - BOOST_CHECK_CLOSE(DDSLIM, 4.0E6, diff); - - double TRGDPR = tuning.getTRGDPR(timestep); - BOOST_CHECK_CLOSE(TRGDPR, 4.0E6 * Metric::Pressure, diff); - - XXXDPR_has_value = tuning.getXXXDPRhasValue(timestep); - double XXXDPR = tuning.getXXXDPR(timestep); - BOOST_CHECK_EQUAL(true, XXXDPR_has_value); - BOOST_CHECK_CLOSE(XXXDPR, 1.0 * Metric::Pressure, diff); - - - - - /*** TIMESTEP 10 ***/ - /********* Record 1 ***********/ - timestep = 10; - TMAXWC_has_value = tuning.getTMAXWChasValue(timestep); - TMAXWC_default = tuning.getTMAXWC(timestep); - BOOST_CHECK_EQUAL(true, TMAXWC_has_value); - BOOST_CHECK_CLOSE(TMAXWC_default, 10.0 * Metric::Time, diff); - - - -} - - -BOOST_AUTO_TEST_CASE(TuningInitTest) { - - DeckPtr deck = createDeck(deckStr); - EclipseGrid grid(10,10,10); - Schedule schedule(ParseContext() , grid , deck); - auto tuning = schedule.getTuning(); - - - const double diff = 1.0e-14; - - /*** TIMESTEP 4***/ - /********* Record 1 ***********/ - size_t timestep = 0; - double value = 100.00; - tuning.setTuningInitialValue("TSINIT",value, false); - double TSINIT_default = tuning.getTSINIT(timestep); - BOOST_CHECK_CLOSE(TSINIT_default, 100.00, diff); - - timestep = 10; - bool TMAXWC_has_value = tuning.getTMAXWChasValue(timestep); - double TMAXWC_default = tuning.getTMAXWC(timestep); - BOOST_CHECK_EQUAL(true, TMAXWC_has_value); - BOOST_CHECK_CLOSE(TMAXWC_default, 10.0 * Metric::Time, diff); - - - } - - -BOOST_AUTO_TEST_CASE(TuningResetTest) { - - DeckPtr deck = createDeck(deckStr); - EclipseGrid grid(10,10,10); - Schedule schedule(ParseContext() , grid , deck); - auto tuning = schedule.getTuning(); - - - const double diff = 1.0e-14; - - /*** TIMESTEP 4***/ - /********* Record 1 ***********/ - size_t timestep = 0; - double value = 666.00; - tuning.setTuningInitialValue("TSINIT",value, true); - double TSINIT_default = tuning.getTSINIT(timestep); - BOOST_CHECK_CLOSE(TSINIT_default, 666.00, diff); - - timestep = 10; - TSINIT_default = tuning.getTSINIT(timestep); - BOOST_CHECK_CLOSE(TSINIT_default, 666.00, diff); - - - } diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/WellPropertiesTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/WellPropertiesTests.cpp deleted file mode 100644 index 0c105bd49a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/WellPropertiesTests.cpp +++ /dev/null @@ -1,237 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE WellPropertiesTest -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace { - namespace WCONHIST { - std::string all_specified_CMODE_BHP() { - const std::string input = - "WCONHIST\n" - "'P' 'OPEN' 'BHP' 1 2 3/\n/\n"; - - return input; - } - - - - std::string all_specified() { - const std::string input = - "WCONHIST\n" - "'P' 'OPEN' 'ORAT' 1 2 3/\n/\n"; - - return input; - } - - std::string orat_defaulted() { - const std::string input = - "WCONHIST\n" - "'P' 'OPEN' 'WRAT' 1* 2 3/\n/\n"; - - return input; - } - - std::string owrat_defaulted() { - const std::string input = - "WCONHIST\n" - "'P' 'OPEN' 'GRAT' 1* 1* 3/\n/\n"; - - return input; - } - - std::string all_defaulted() { - const std::string input = - "WCONHIST\n" - "'P' 'OPEN' 'LRAT'/\n/\n"; - - return input; - } - - std::string all_defaulted_with_bhp() { - const std::string input = - "WCONHIST\n" - "-- 1 2 3 4-9 10\n" - " 'P' 'OPEN' 'RESV' 6* 500/\n/\n"; - - return input; - } - - Opm::WellProductionProperties properties(const std::string& input) { - Opm::Parser parser; - - Opm::DeckPtr deck = parser.parseString(input, Opm::ParseContext()); - const auto& record = deck->getKeyword("WCONHIST").getRecord(0); - Opm::WellProductionProperties hist = Opm::WellProductionProperties::history( 100 , record);; - - return hist; - } - } // namespace WCONHIST - - namespace WCONPROD { - std::string - all_specified_CMODE_BHP() - { - const std::string input = - "WCONPROD\n" - "'P' 'OPEN' 'BHP' 1 2 3/\n/\n"; - - return input; - } - - - Opm::WellProductionProperties - properties(const std::string& input) - { - Opm::Parser parser; - - Opm::DeckPtr deck = parser.parseString(input, Opm::ParseContext()); - const auto& kwd = deck->getKeyword("WCONHIST"); - const auto& record = kwd.getRecord(0); - Opm::WellProductionProperties pred = Opm::WellProductionProperties::prediction( record, false ); - - return pred; - } - } - -} // namespace anonymous - -BOOST_AUTO_TEST_CASE(WCH_All_Specified_BHP_Defaulted) -{ - const Opm::WellProductionProperties& p = - WCONHIST::properties(WCONHIST::all_specified()); - - // WCONHIST always supports {O,W,G}RAT, LRAT, and - // RESV--irrespective of actual specification. - BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::ORAT)); - BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::WRAT)); - BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::GRAT)); - BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::LRAT)); - BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::RESV)); - - BOOST_CHECK_EQUAL(p.controlMode , Opm::WellProducer::ORAT); - - // BHP must be explicitly provided/specified - BOOST_CHECK(! p.hasProductionControl(Opm::WellProducer::BHP)); -} - -BOOST_AUTO_TEST_CASE(WCH_ORAT_Defaulted_BHP_Defaulted) -{ - const Opm::WellProductionProperties& p = - WCONHIST::properties(WCONHIST::orat_defaulted()); - - // WCONHIST always supports {O,W,G}RAT, LRAT, and - // RESV--irrespective of actual specification. - BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::ORAT)); - BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::WRAT)); - BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::GRAT)); - BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::LRAT)); - BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::RESV)); - BOOST_CHECK_EQUAL(p.controlMode , Opm::WellProducer::WRAT); - - // BHP must be explicitly provided/specified - BOOST_CHECK(! p.hasProductionControl(Opm::WellProducer::BHP)); -} - -BOOST_AUTO_TEST_CASE(WCH_OWRAT_Defaulted_BHP_Defaulted) -{ - const Opm::WellProductionProperties& p = - WCONHIST::properties(WCONHIST::owrat_defaulted()); - - // WCONHIST always supports {O,W,G}RAT, LRAT, and - // RESV--irrespective of actual specification. - BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::ORAT)); - BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::WRAT)); - BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::GRAT)); - BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::LRAT)); - BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::RESV)); - BOOST_CHECK_EQUAL(p.controlMode , Opm::WellProducer::GRAT); - - // BHP must be explicitly provided/specified - BOOST_CHECK(! p.hasProductionControl(Opm::WellProducer::BHP)); -} - -BOOST_AUTO_TEST_CASE(WCH_Rates_Defaulted_BHP_Defaulted) -{ - const Opm::WellProductionProperties& p = - WCONHIST::properties(WCONHIST::all_defaulted()); - - // WCONHIST always supports {O,W,G}RAT, LRAT, and - // RESV--irrespective of actual specification. - BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::ORAT)); - BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::WRAT)); - BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::GRAT)); - BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::LRAT)); - BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::RESV)); - BOOST_CHECK_EQUAL(p.controlMode , Opm::WellProducer::LRAT); - - // BHP must be explicitly provided/specified - BOOST_CHECK(! p.hasProductionControl(Opm::WellProducer::BHP)); -} - -BOOST_AUTO_TEST_CASE(WCH_Rates_Defaulted_BHP_Specified) -{ - const Opm::WellProductionProperties& p = - WCONHIST::properties(WCONHIST::all_defaulted_with_bhp()); - - // WCONHIST always supports {O,W,G}RAT, LRAT, and - // RESV--irrespective of actual specification. - BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::ORAT)); - BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::WRAT)); - BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::GRAT)); - BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::LRAT)); - BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::RESV)); - - BOOST_CHECK_EQUAL(p.controlMode , Opm::WellProducer::RESV); - - /* - BHP in WCONHIST is not an available control; just information - about the historical BHP. - */ - BOOST_CHECK_EQUAL(false , p.hasProductionControl(Opm::WellProducer::BHP)); -} - - -BOOST_AUTO_TEST_CASE(BHP_CMODE) -{ - BOOST_CHECK_THROW( WCONHIST::properties(WCONHIST::all_specified_CMODE_BHP()) , std::invalid_argument); - BOOST_CHECK_THROW( WCONPROD::properties(WCONPROD::all_specified_CMODE_BHP()) , std::invalid_argument); -} - - - - -BOOST_AUTO_TEST_CASE(CMODE_DEFAULT) { - const Opm::WellProductionProperties Pproperties; - const Opm::WellInjectionProperties Iproperties; - - BOOST_CHECK_EQUAL( Pproperties.controlMode , Opm::WellProducer::CMODE_UNDEFINED ); - BOOST_CHECK_EQUAL( Iproperties.controlMode , Opm::WellInjector::CMODE_UNDEFINED ); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/WellSetTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/WellSetTests.cpp deleted file mode 100644 index 44bc08e1ca..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/WellSetTests.cpp +++ /dev/null @@ -1,101 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include -#include -#include - -#define BOOST_TEST_MODULE WellSetTest -#include -#include - -#include -#include -#include - -using namespace Opm; - -static Opm::TimeMapPtr createXDaysTimeMap(size_t numDays) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - Opm::TimeMapPtr timeMap(new Opm::TimeMap(boost::posix_time::ptime(startDate))); - for (size_t i = 0; i < numDays; i++) - timeMap->addTStep( boost::posix_time::hours( (i+1) * 24 )); - return timeMap; -} - - -BOOST_AUTO_TEST_CASE(CreatEmptyWellSet) { - Opm::WellSet wellSet; - - BOOST_CHECK_EQUAL(false , wellSet.hasWell("WELL")); - BOOST_CHECK_EQUAL(0U , wellSet.size()); - BOOST_CHECK_THROW( wellSet.getWell( "WELL") , std::invalid_argument); -} - - - -BOOST_AUTO_TEST_CASE(AddAndDeleteWell) { - Opm::WellSet wellSet; - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - - auto well = std::make_shared< Well >("WELL1", 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0); - auto well2 = std::make_shared< Well >("WELL2", 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0); - - wellSet.addWell( well.get() ); - BOOST_CHECK_EQUAL(true , wellSet.hasWell("WELL1")); - BOOST_CHECK_EQUAL(1U , wellSet.size()); - BOOST_CHECK_EQUAL( well.get(), wellSet.getWell("WELL1")); - - - wellSet.addWell( well2.get() ); - BOOST_CHECK_EQUAL(true , wellSet.hasWell("WELL2")); - BOOST_CHECK_EQUAL(2U , wellSet.size()); - BOOST_CHECK_EQUAL( well2.get(), wellSet.getWell("WELL2")); - - wellSet.delWell("WELL1"); - BOOST_CHECK_EQUAL(false , wellSet.hasWell("WELL1")); - BOOST_CHECK_EQUAL(1U , wellSet.size()); - BOOST_CHECK_EQUAL( well2.get(), wellSet.getWell("WELL2")); -} - - -BOOST_AUTO_TEST_CASE(AddWellSameName) { - Opm::WellSet wellSet; - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - - auto well1 = std::make_shared< Well >("WELL", 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::OIL, timeMap, 0); - auto well2 = std::make_shared< Well >("WELL", 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::OIL, timeMap, 0); - - wellSet.addWell( well1.get() ); - BOOST_CHECK_EQUAL(true , wellSet.hasWell("WELL")); - - BOOST_CHECK_NO_THROW( wellSet.addWell( well1.get() )); - BOOST_CHECK_THROW( wellSet.addWell( well2.get() ) , std::invalid_argument ); -} - -BOOST_AUTO_TEST_CASE(Iterator) { - Opm::WellSet wellSet; - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - - auto well1 = std::make_shared< Well >("WELL", 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0); - auto well2 = std::make_shared< Well >("WELL", 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0); - - for( const auto& well : wellSet ) - BOOST_CHECK( well.second->isProducer( 0 ) ); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/WellSolventTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/WellSolventTests.cpp deleted file mode 100644 index 6973e0d79e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/WellSolventTests.cpp +++ /dev/null @@ -1,182 +0,0 @@ -/* - Copyright 2015 IRIS - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#define BOOST_TEST_MODULE WellSolventTests - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace Opm; - -static DeckPtr createDeckWithOutSolvent() { - Opm::Parser parser; - std::string input = - "SCHEDULE\n" - "WELSPECS\n" - " 'W_1' 'OP' 2 2 1* \'OIL\' 7* / \n" - "/\n" - "COMPDAT\n" - " 'W_1' 2* 1 1 'OPEN' / \n" - "/\n" - "WCONINJE\n" - " 'W_1' 'WATER' 'OPEN' 'BHP' 1 2 3/\n/\n"; - - return parser.parseString(input, ParseContext()); -} - -static DeckPtr createDeckWithGasInjector() { - Opm::Parser parser; - std::string input = - "SCHEDULE\n" - "WELSPECS\n" - " 'W_1' 'OP' 1 1 1* \'GAS\' 7* / \n" - "/\n" - "COMPDAT\n" - " 'W_1' 2* 1 1 'OPEN' / \n" - "/\n" - "WCONINJE\n" - " 'W_1' 'GAS' 'OPEN' 'BHP' 1 2 3/\n/\n" - "WSOLVENT\n" - " 'W_1' 1 / \n " - "/\n"; - - return parser.parseString(input, ParseContext()); -} - -static DeckPtr createDeckWithDynamicWSOLVENT() { - Opm::Parser parser; - std::string input = - "START -- 0 \n" - "1 JAN 2000 / \n" - "SCHEDULE\n" - "WELSPECS\n" - " 'W_1' 'OP' 1 1 1* \'GAS\' 7* / \n" - "/\n" - "COMPDAT\n" - " 'W_1' 2* 1 1 'OPEN' / \n" - "/\n" - "WCONINJE\n" - " 'W_1' 'GAS' 'OPEN' 'BHP' 1 2 3/\n/\n" - "DATES -- 2\n" - " 1 MAY 2000 / \n" - "/\n" - "WSOLVENT\n" - " 'W_1' 1 / \n " - "/\n" - "DATES -- 3,4\n" - " 1 JUL 2000 / \n" - " 1 AUG 2000 / \n" - "/\n" - "WSOLVENT\n" - " 'W_1' 0 / \n " - "/\n"; - - return parser.parseString(input, ParseContext()); -} - -static DeckPtr createDeckWithOilInjector() { - Opm::Parser parser; - std::string input = - "SCHEDULE\n" - "WELSPECS\n" - " 'W_1' 'OP' 2 2 1* \'OIL\' 7* / \n" - "/\n" - "COMPDAT\n" - " 'W_1' 2* 1 1 'OPEN' / \n" - "/\n" - "WCONINJE\n" - " 'W_1' 'OIL' 'OPEN' 'BHP' 1 2 3/\n/\n" - "WSOLVENT\n" - " 'W_1' 1 / \n " - "/\n"; - - return parser.parseString(input, ParseContext()); -} - -static DeckPtr createDeckWithWaterInjector() { - Opm::Parser parser; - std::string input = - "SCHEDULE\n" - "WELSPECS\n" - " 'W_1' 'OP' 2 2 1* \'OIL\' 7* / \n" - "/\n" - "COMPDAT\n" - " 'W_1' 2* 1 1 'OPEN' / \n" - "/\n" - "WCONINJE\n" - " 'W_1' 'WATER' 'OPEN' 'BHP' 1 2 3/\n/\n" - "WSOLVENT\n" - " 'W_1' 1 / \n " - "/\n"; - - return parser.parseString(input, ParseContext()); -} -BOOST_AUTO_TEST_CASE(TestNoSolvent) { - DeckPtr deck = createDeckWithOutSolvent(); - EclipseGrid grid(10,10,10); - Schedule schedule(ParseContext() , grid , deck ); - BOOST_CHECK(!deck->hasKeyword("WSOLVENT")); -} - -BOOST_AUTO_TEST_CASE(TestGasInjector) { - DeckPtr deck = createDeckWithGasInjector(); - EclipseGrid grid(10,10,10); - Schedule schedule(ParseContext(), grid , deck ); - BOOST_CHECK(deck->hasKeyword("WSOLVENT")); - -} - -BOOST_AUTO_TEST_CASE(TestDynamicWSOLVENT) { - DeckPtr deck = createDeckWithDynamicWSOLVENT(); - EclipseGrid grid(10,10,10); - Schedule schedule(ParseContext() , grid , deck ); - BOOST_CHECK(deck->hasKeyword("WSOLVENT")); - const auto& keyword = deck->getKeyword("WSOLVENT"); - BOOST_CHECK_EQUAL(keyword.size(),1); - const auto& record = keyword.getRecord(0); - const std::string& wellNamesPattern = record.getItem("WELL").getTrimmedString(0); - auto wells_solvent = schedule.getWellsMatching(wellNamesPattern); - BOOST_CHECK_EQUAL(wellNamesPattern, "W_1"); - BOOST_CHECK_EQUAL(wells_solvent[0]->getSolventFraction(0),0); //default 0 - BOOST_CHECK_EQUAL(wells_solvent[0]->getSolventFraction(1),1); - BOOST_CHECK_EQUAL(wells_solvent[0]->getSolventFraction(2),1); - BOOST_CHECK_EQUAL(wells_solvent[0]->getSolventFraction(3),0); -} - -BOOST_AUTO_TEST_CASE(TestOilInjector) { - DeckPtr deck = createDeckWithOilInjector(); - EclipseGrid grid(10,10,10); - BOOST_CHECK_THROW (Schedule(ParseContext() , grid , deck ), std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(TestWaterInjector) { - DeckPtr deck = createDeckWithWaterInjector(); - EclipseGrid grid(10,10,10); - BOOST_CHECK_THROW (Schedule(ParseContext(), grid , deck ), std::invalid_argument); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/WellTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/WellTests.cpp deleted file mode 100644 index c47d463b6d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Schedule/tests/WellTests.cpp +++ /dev/null @@ -1,773 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include - -#define BOOST_TEST_MODULE WellTest -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static Opm::TimeMapPtr createXDaysTimeMap(size_t numDays) { - boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); - Opm::TimeMapPtr timeMap(new Opm::TimeMap(boost::posix_time::ptime(startDate))); - for (size_t i = 0; i < numDays; i++) - timeMap->addTStep( boost::posix_time::hours( (i+1) * 24 )); - return timeMap; -} - -BOOST_AUTO_TEST_CASE(CreateWell_CorrectNameAndDefaultValues) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0); - BOOST_CHECK_EQUAL( "WELL1" , well.name() ); - BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy(5).OilRate); -} - -BOOST_AUTO_TEST_CASE(CreateWell_GetProductionPropertiesShouldReturnSameObject) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0); - - BOOST_CHECK_EQUAL(&(well.getProductionProperties(5)), &(well.getProductionProperties(5))); - BOOST_CHECK_EQUAL(&(well.getProductionProperties(8)), &(well.getProductionProperties(8))); - BOOST_CHECK_EQUAL(&(well.getProductionProperties(5)), &(well.getProductionProperties(8))); -} - -BOOST_AUTO_TEST_CASE(CreateWell_GetInjectionPropertiesShouldReturnSameObject) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::WATER, timeMap , 0); - - BOOST_CHECK_EQUAL(&(well.getInjectionProperties(5)), &(well.getInjectionProperties(5))); - BOOST_CHECK_EQUAL(&(well.getInjectionProperties(8)), &(well.getInjectionProperties(8))); - BOOST_CHECK_EQUAL(&(well.getInjectionProperties(5)), &(well.getInjectionProperties(8))); -} - -BOOST_AUTO_TEST_CASE(CreateWellCreateTimeStepOK) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::OIL, timeMap , 5); - BOOST_CHECK_EQUAL( false , well.hasBeenDefined(0) ); - BOOST_CHECK_EQUAL( false , well.hasBeenDefined(4) ); - BOOST_CHECK_EQUAL( true , well.hasBeenDefined(5) ); - BOOST_CHECK_EQUAL( true , well.hasBeenDefined(7) ); - -} - - -BOOST_AUTO_TEST_CASE(setWellProductionProperties_PropertiesSetCorrect) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0); - - BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy( 5 ).OilRate); - Opm::WellProductionProperties props; - props.OilRate = 99; - props.GasRate = 98; - props.WaterRate = 97; - props.LiquidRate = 96; - props.ResVRate = 95; - well.setProductionProperties( 5 , props); - BOOST_CHECK_EQUAL(99 , well.getProductionPropertiesCopy( 5 ).OilRate); - BOOST_CHECK_EQUAL(98 , well.getProductionPropertiesCopy( 5 ).GasRate); - BOOST_CHECK_EQUAL(97 , well.getProductionPropertiesCopy( 5 ).WaterRate); - BOOST_CHECK_EQUAL(96 , well.getProductionPropertiesCopy( 5 ).LiquidRate); - BOOST_CHECK_EQUAL(95 , well.getProductionPropertiesCopy( 5 ).ResVRate); - BOOST_CHECK_EQUAL(99 , well.getProductionPropertiesCopy( 8 ).OilRate); - BOOST_CHECK_EQUAL(98 , well.getProductionPropertiesCopy( 8 ).GasRate); - BOOST_CHECK_EQUAL(97 , well.getProductionPropertiesCopy( 8 ).WaterRate); - BOOST_CHECK_EQUAL(96 , well.getProductionPropertiesCopy( 8 ).LiquidRate); - BOOST_CHECK_EQUAL(95 , well.getProductionPropertiesCopy( 8 ).ResVRate); -} - -BOOST_AUTO_TEST_CASE(setOilRate_RateSetCorrect) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0); - - BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy(5).OilRate); - Opm::WellProductionProperties props; - props.OilRate = 99; - well.setProductionProperties( 5 , props); - BOOST_CHECK_EQUAL(99 , well.getProductionPropertiesCopy(5).OilRate); - BOOST_CHECK_EQUAL(99 , well.getProductionPropertiesCopy(8).OilRate); -} - -BOOST_AUTO_TEST_CASE(seLiquidRate_RateSetCorrect) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0); - - BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy(5).LiquidRate); - Opm::WellProductionProperties props; - props.LiquidRate = 99; - well.setProductionProperties( 5 , props); - BOOST_CHECK_EQUAL(99 , well.getProductionPropertiesCopy(5).LiquidRate); - BOOST_CHECK_EQUAL(99 , well.getProductionPropertiesCopy(8).LiquidRate); -} - - -BOOST_AUTO_TEST_CASE(setPredictionModeProduction_ModeSetCorrect) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0); - - BOOST_CHECK_EQUAL( true, well.getProductionPropertiesCopy(5).predictionMode); - Opm::WellProductionProperties props; - props.predictionMode = false; - well.setProductionProperties( 5 , props); - BOOST_CHECK_EQUAL(false , well.getProductionPropertiesCopy(5).predictionMode); - BOOST_CHECK_EQUAL(false , well.getProductionPropertiesCopy(8).predictionMode); -} - - - -BOOST_AUTO_TEST_CASE(setpredictionModeInjection_ModeSetCorrect) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::WATER, timeMap , 0); - - BOOST_CHECK_EQUAL( true, well.getInjectionPropertiesCopy(5).predictionMode); - Opm::WellInjectionProperties props; - props.predictionMode = false; - well.setInjectionProperties( 5 , props); - BOOST_CHECK_EQUAL(false , well.getInjectionPropertiesCopy(5).predictionMode); - BOOST_CHECK_EQUAL(false , well.getInjectionPropertiesCopy(8).predictionMode); -} - - -BOOST_AUTO_TEST_CASE(WellCOMPDATtestTRACK) { - Opm::Parser parser; - std::string input = - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 10 OKT 2008 / \n" - "/\n" - "WELSPECS\n" - " 'OP_1' 'OP' 9 9 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - "/\n" - "COMPORD\n" - " OP_1 TRACK / \n" - "/\n" - "COMPDAT\n" - " 'OP_1' 9 9 1 1 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'OP_1' 9 9 3 9 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'OP_1' 9 9 2 2 'OPEN' 1* 46.825 0.311 4332.346 1* 1* 'X' 22.123 / \n" - "/\n" - "DATES -- 2\n" - " 20 JAN 2010 / \n" - "/\n"; - - - Opm::ParseContext parseContext; - Opm::DeckPtr deck = parser.parseString(input, parseContext); - Opm::EclipseGrid grid(10,10,10); - Opm::Schedule schedule(Opm::ParseContext() , grid , deck ); - auto* op_1 = schedule.getWell("OP_1"); - - size_t timestep = 2; - Opm::CompletionSetConstPtr completions = op_1->getCompletions( timestep ); - BOOST_CHECK_EQUAL((size_t)9 , completions->size()); - - //Verify TRACK completion ordering - Opm::CompletionConstPtr completion; - for (size_t k = 0; ksize(); ++k) { - completion = completions->get(k); - BOOST_CHECK_EQUAL((size_t)completion->getK(), k); - } -} - - -BOOST_AUTO_TEST_CASE(WellCOMPDATtestDefaultTRACK) { - Opm::Parser parser; - std::string input = - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 10 OKT 2008 / \n" - "/\n" - "WELSPECS\n" - " 'OP_1' 'OP' 9 9 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - "/\n" - "COMPDAT\n" - " 'OP_1' 9 9 1 1 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'OP_1' 9 9 3 9 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'OP_1' 9 9 2 2 'OPEN' 1* 46.825 0.311 4332.346 1* 1* 'X' 22.123 / \n" - "/\n" - "DATES -- 2\n" - " 20 JAN 2010 / \n" - "/\n"; - - - Opm::ParseContext parseContext; - Opm::DeckPtr deck = parser.parseString(input, parseContext); - Opm::EclipseGrid grid(10,10,10); - Opm::Schedule schedule(Opm::ParseContext() , grid , deck ); - auto* op_1 = schedule.getWell("OP_1"); - - size_t timestep = 2; - Opm::CompletionSetConstPtr completions = op_1->getCompletions( timestep ); - BOOST_CHECK_EQUAL((size_t)9 , completions->size()); - - //Verify TRACK completion ordering - Opm::CompletionConstPtr completion; - for (size_t k = 0; ksize(); ++k) { - completion = completions->get(k); - BOOST_CHECK_EQUAL((size_t)completion->getK(), k); - } -} - -BOOST_AUTO_TEST_CASE(WellCOMPDATtestINPUT) { - Opm::Parser parser; - std::string input = - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 10 OKT 2008 / \n" - "/\n" - "WELSPECS\n" - " 'OP_1' 'OP' 9 9 1* 'OIL' 1* 1* 1* 1* 1* 1* 1* / \n" - "/\n" - "COMPORD\n" - " OP_1 INPUT / \n" - "/\n" - "COMPDAT\n" - " 'OP_1' 9 9 1 1 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'OP_1' 9 9 3 9 'OPEN' 1* 32.948 0.311 3047.839 1* 1* 'X' 22.100 / \n" - " 'OP_1' 9 9 2 2 'OPEN' 1* 46.825 0.311 4332.346 1* 1* 'X' 22.123 / \n" - "/\n" - "DATES -- 2\n" - " 20 JAN 2010 / \n" - "/\n"; - - - Opm::ParseContext parseContext; - Opm::DeckPtr deck = parser.parseString(input, parseContext); - Opm::EclipseGrid grid(10,10,10); - Opm::Schedule schedule(Opm::ParseContext() , grid , deck ); - auto* op_1 = schedule.getWell("OP_1"); - - size_t timestep = 2; - Opm::CompletionSetConstPtr completions = op_1->getCompletions( timestep ); - BOOST_CHECK_EQUAL((size_t)9 , completions->size()); - - //Verify INPUT completion ordering - Opm::CompletionConstPtr completion; - { - completion = completions->get(0); - BOOST_CHECK_EQUAL(completion->getK(), 0); - - completion = completions->get(1); - BOOST_CHECK_EQUAL(completion->getK(), 2); - - completion = completions->get(2); - BOOST_CHECK_EQUAL(completion->getK(), 3); - - completion = completions->get(3); - BOOST_CHECK_EQUAL(completion->getK(), 4); - - completion = completions->get(4); - BOOST_CHECK_EQUAL(completion->getK(), 5); - - completion = completions->get(5); - BOOST_CHECK_EQUAL(completion->getK(), 6); - - completion = completions->get(6); - BOOST_CHECK_EQUAL(completion->getK(), 7); - - completion = completions->get(7); - BOOST_CHECK_EQUAL(completion->getK(), 8); - - completion = completions->get(8); - BOOST_CHECK_EQUAL(completion->getK(), 1); - } -} - -BOOST_AUTO_TEST_CASE(NewWellZeroCompletions) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0); - Opm::CompletionSetConstPtr completions = well.getCompletions( 0 ); - BOOST_CHECK_EQUAL( 0U , completions->size()); -} - - -BOOST_AUTO_TEST_CASE(UpdateCompletions) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - - Opm::Well well("WELL1" , 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0); - Opm::CompletionSetConstPtr completions = well.getCompletions( 0 ); - BOOST_CHECK_EQUAL( 0U , completions->size()); - - std::vector newCompletions; - std::vector newCompletions2; - Opm::CompletionPtr comp1(new Opm::Completion( 10 , 10 , 10 , 10,Opm::WellCompletion::AUTO , Opm::Value("ConnectionTransmissibilityFactor",99.88), Opm::Value("D",22.33), Opm::Value("SKIN",33.22))); - Opm::CompletionPtr comp2(new Opm::Completion( 10 , 10 , 11 , 11,Opm::WellCompletion::SHUT , Opm::Value("ConnectionTransmissibilityFactor",99.88), Opm::Value("D",22.33), Opm::Value("SKIN",33.22))); - Opm::CompletionPtr comp3(new Opm::Completion( 10 , 10 , 12 , 12,Opm::WellCompletion::OPEN , Opm::Value("ConnectionTransmissibilityFactor",99.88), Opm::Value("D",22.33), Opm::Value("SKIN",33.22))); - Opm::CompletionPtr comp4(new Opm::Completion( 10 , 10 , 12 , 12,Opm::WellCompletion::SHUT , Opm::Value("ConnectionTransmissibilityFactor",99.88), Opm::Value("D",22.33), Opm::Value("SKIN",33.22))); - Opm::CompletionPtr comp5(new Opm::Completion( 10 , 10 , 13 , 13,Opm::WellCompletion::OPEN , Opm::Value("ConnectionTransmissibilityFactor",99.88), Opm::Value("D",22.33), Opm::Value("SKIN",33.22))); - - //std::vector newCompletions2{ comp4 , comp5}; Newer c++ - - newCompletions.push_back( comp1 ); - newCompletions.push_back( comp2 ); - newCompletions.push_back( comp3 ); - - newCompletions2.push_back( comp4 ); - newCompletions2.push_back( comp5 ); - - BOOST_CHECK_EQUAL( 3U , newCompletions.size()); - well.addCompletions( 5 , newCompletions ); - completions = well.getCompletions( 5 ); - BOOST_CHECK_EQUAL( 3U , completions->size()); - BOOST_CHECK_EQUAL( comp3 , completions->get(2)); - - well.addCompletions( 6 , newCompletions2 ); - - completions = well.getCompletions( 6 ); - BOOST_CHECK_EQUAL( 4U , completions->size()); - BOOST_CHECK_EQUAL( comp4 , completions->get(2)); - -} - -Opm::CompletionPtr completion(const size_t i, const size_t j, const size_t k); - -// Helper function for CompletionOrder test. -Opm::CompletionPtr completion(const size_t i, const size_t j, const size_t k) -{ - return std::make_shared(i, j, k, - k*1.0, - Opm::WellCompletion::AUTO, - Opm::Value("ConnectionTransmissibilityFactor",99.88), - Opm::Value("D",22.33), - Opm::Value("SKIN",33.22), - Opm::WellCompletion::DirectionEnum::Z); -} - - - -BOOST_AUTO_TEST_CASE(CompletionOrder) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - { - // Vertical well. - Opm::Well well("WELL1" , 5, 5, Opm::Value("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0); - auto c1 = completion(5, 5, 8); - auto c2 = completion(5, 5, 9); - auto c3 = completion(5, 5, 1); - auto c4 = completion(5, 5, 0); - std::vector cv1 = { c1, c2 }; - well.addCompletions(1, cv1); - BOOST_CHECK_EQUAL(well.getCompletions(1)->get(0), c1); - std::vector cv2 = { c3, c4 }; - well.addCompletions(2, cv2); - BOOST_CHECK_EQUAL(well.getCompletions(1)->get(0), c1); - BOOST_CHECK_EQUAL(well.getCompletions(2)->get(0), c4); - } - - { - // Horizontal well. - Opm::Well well("WELL1" , 5, 5, Opm::Value("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0); - auto c1 = completion(6, 5, 8); - auto c2 = completion(5, 6, 7); - auto c3 = completion(7, 5, 8); - auto c4 = completion(9, 5, 8); - auto c5 = completion(8, 5, 9); - auto c6 = completion(5, 5, 4); - std::vector cv1 = { c1, c2 }; - well.addCompletions(1, cv1); - BOOST_CHECK_EQUAL(well.getCompletions(1)->get(0), c2); - std::vector cv2 = { c3, c4, c5 }; - well.addCompletions(2, cv2); - BOOST_CHECK_EQUAL(well.getCompletions(1)->get(0), c2); - BOOST_CHECK_EQUAL(well.getCompletions(2)->get(0), c2); - BOOST_CHECK_EQUAL(well.getCompletions(2)->get(1), c1); - BOOST_CHECK_EQUAL(well.getCompletions(2)->get(2), c3); - BOOST_CHECK_EQUAL(well.getCompletions(2)->get(3), c5); - BOOST_CHECK_EQUAL(well.getCompletions(2)->get(4), c4); - std::vector cv3 = { c6 }; - well.addCompletions(3, cv3); - BOOST_CHECK_EQUAL(well.getCompletions(1)->get(0), c2); - BOOST_CHECK_EQUAL(well.getCompletions(2)->get(0), c2); - BOOST_CHECK_EQUAL(well.getCompletions(2)->get(1), c1); - BOOST_CHECK_EQUAL(well.getCompletions(2)->get(2), c3); - BOOST_CHECK_EQUAL(well.getCompletions(2)->get(3), c5); - BOOST_CHECK_EQUAL(well.getCompletions(2)->get(4), c4); - BOOST_CHECK_EQUAL(well.getCompletions(3)->get(0), c6); - BOOST_CHECK_EQUAL(well.getCompletions(3)->get(1), c2); - BOOST_CHECK_EQUAL(well.getCompletions(3)->get(2), c1); - BOOST_CHECK_EQUAL(well.getCompletions(3)->get(3), c3); - BOOST_CHECK_EQUAL(well.getCompletions(3)->get(4), c5); - BOOST_CHECK_EQUAL(well.getCompletions(3)->get(5), c4); - } -} - - - -BOOST_AUTO_TEST_CASE(setGasRate_RateSetCorrect) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::GAS, timeMap , 0); - - BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy(5).GasRate); - Opm::WellProductionProperties properties; - properties.GasRate = 108; - well.setProductionProperties(5, properties); - BOOST_CHECK_EQUAL(108 , well.getProductionPropertiesCopy(5).GasRate); - BOOST_CHECK_EQUAL(108 , well.getProductionPropertiesCopy(8).GasRate); -} - - - -BOOST_AUTO_TEST_CASE(setWaterRate_RateSetCorrect) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::WATER, timeMap , 0); - - BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy(5).WaterRate); - Opm::WellProductionProperties properties; - properties.WaterRate = 108; - well.setProductionProperties(5, properties); - BOOST_CHECK_EQUAL(108 , well.getProductionPropertiesCopy(5).WaterRate); - BOOST_CHECK_EQUAL(108 , well.getProductionPropertiesCopy(8).WaterRate); -} - - -BOOST_AUTO_TEST_CASE(setSurfaceInjectionRate_RateSetCorrect) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::WATER, timeMap , 0); - - BOOST_CHECK_EQUAL(0.0 , well.getInjectionPropertiesCopy(5).surfaceInjectionRate); - Opm::WellInjectionProperties props(well.getInjectionPropertiesCopy(5)); - props.surfaceInjectionRate = 108; - well.setInjectionProperties(5, props); - BOOST_CHECK_EQUAL(108 , well.getInjectionPropertiesCopy(5).surfaceInjectionRate); - BOOST_CHECK_EQUAL(108 , well.getInjectionPropertiesCopy(8).surfaceInjectionRate); -} - - -BOOST_AUTO_TEST_CASE(setReservoirInjectionRate_RateSetCorrect) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::WATER, timeMap , 0); - - BOOST_CHECK_EQUAL(0.0 , well.getInjectionPropertiesCopy(5).reservoirInjectionRate); - Opm::WellInjectionProperties properties(well.getInjectionPropertiesCopy(5)); - properties.reservoirInjectionRate = 108; - well.setInjectionProperties(5, properties); - BOOST_CHECK_EQUAL(108 , well.getInjectionPropertiesCopy(5).reservoirInjectionRate); - BOOST_CHECK_EQUAL(108 , well.getInjectionPropertiesCopy(8).reservoirInjectionRate); -} - - -BOOST_AUTO_TEST_CASE(isProducerCorrectlySet) { - // HACK: This test checks correctly setting of isProducer/isInjector. This property depends on which of - // WellProductionProperties/WellInjectionProperties is set last, independent of actual values. - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::OIL, timeMap ,0); - - /* 1: Well is created as producer */ - BOOST_CHECK_EQUAL( false , well.isInjector(0)); - BOOST_CHECK_EQUAL( true , well.isProducer(0)); - - /* Set a surface injection rate => Well becomes an Injector */ - Opm::WellInjectionProperties injectionProps1(well.getInjectionPropertiesCopy(3)); - injectionProps1.surfaceInjectionRate = 100; - well.setInjectionProperties(3, injectionProps1); - BOOST_CHECK_EQUAL( true , well.isInjector(3)); - BOOST_CHECK_EQUAL( false , well.isProducer(3)); - BOOST_CHECK_EQUAL( 100 , well.getInjectionPropertiesCopy(3).surfaceInjectionRate); - - /* Set a reservoir injection rate => Well becomes an Injector */ - Opm::WellInjectionProperties injectionProps2(well.getInjectionPropertiesCopy(4)); - injectionProps2.reservoirInjectionRate = 200; - well.setInjectionProperties(4, injectionProps2); - BOOST_CHECK_EQUAL( true , well.isInjector(4)); - BOOST_CHECK_EQUAL( false , well.isProducer(4)); - BOOST_CHECK_EQUAL( 200 , well.getInjectionPropertiesCopy(4).reservoirInjectionRate); - - - /* Set rates => Well becomes a producer; injection rate should be set to 0. */ - Opm::WellInjectionProperties injectionProps3; - well.setInjectionProperties(4, injectionProps3); - Opm::WellProductionProperties properties(well.getProductionPropertiesCopy(4)); - properties.OilRate = 100; - properties.GasRate = 200; - properties.WaterRate = 300; - well.setProductionProperties(4, properties); - BOOST_CHECK_EQUAL( false , well.isInjector(4)); - BOOST_CHECK_EQUAL( true , well.isProducer(4)); - BOOST_CHECK_EQUAL( 0 , well.getInjectionPropertiesCopy(4).surfaceInjectionRate); - BOOST_CHECK_EQUAL( 0 , well.getInjectionPropertiesCopy(4).reservoirInjectionRate); - BOOST_CHECK_EQUAL( 100 , well.getProductionPropertiesCopy(4).OilRate); - BOOST_CHECK_EQUAL( 200 , well.getProductionPropertiesCopy(4).GasRate); - BOOST_CHECK_EQUAL( 300 , well.getProductionPropertiesCopy(4).WaterRate); - - /* Set injection rate => Well becomes injector - all produced rates -> 0 */ - Opm::WellProductionProperties prodProps2; - well.setProductionProperties(6, prodProps2); - Opm::WellInjectionProperties injectionProps4(well.getInjectionPropertiesCopy(6)); - injectionProps4.reservoirInjectionRate = 50; - well.setInjectionProperties(6, injectionProps4); - BOOST_CHECK_EQUAL( true , well.isInjector(6)); - BOOST_CHECK_EQUAL( false , well.isProducer(6)); - BOOST_CHECK_EQUAL( 50 , well.getInjectionPropertiesCopy(6).reservoirInjectionRate); - BOOST_CHECK_EQUAL( 0 , well.getProductionPropertiesCopy(6).OilRate); - BOOST_CHECK_EQUAL( 0 , well.getProductionPropertiesCopy(6).GasRate); - BOOST_CHECK_EQUAL( 0 , well.getProductionPropertiesCopy(6).WaterRate); -} - - -BOOST_AUTO_TEST_CASE(GroupnameCorretlySet) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::WATER, timeMap ,0); - - BOOST_CHECK_EQUAL("" , well.getGroupName(2)); - - well.setGroupName(3 , "GROUP2"); - BOOST_CHECK_EQUAL("GROUP2" , well.getGroupName(3)); - BOOST_CHECK_EQUAL("GROUP2" , well.getGroupName(6)); - well.setGroupName(7 , "NEWGROUP"); - BOOST_CHECK_EQUAL("NEWGROUP" , well.getGroupName(7)); -} - - -BOOST_AUTO_TEST_CASE(addWELSPECS_setData_dataSet) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1", 23, 42, Opm::Value("REF_DEPTH" , 2334.32) , Opm::Phase::WATER, timeMap, 3); - - BOOST_CHECK(!well.hasBeenDefined(2)); - BOOST_CHECK(well.hasBeenDefined(3)); - BOOST_CHECK_EQUAL(23, well.getHeadI()); - BOOST_CHECK_EQUAL(42, well.getHeadJ()); - BOOST_CHECK_EQUAL(2334.32, well.getRefDepth()); - BOOST_CHECK_EQUAL(Opm::Phase::WATER, well.getPreferredPhase()); -} - - -BOOST_AUTO_TEST_CASE(XHPLimitDefault) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1", 1, 2, Opm::Value("REF_DEPTH" , 2334.32), Opm::Phase::WATER, timeMap, 0); - - - Opm::WellProductionProperties productionProps(well.getProductionPropertiesCopy(1)); - productionProps.BHPLimit = 100; - productionProps.addProductionControl(Opm::WellProducer::BHP); - well.setProductionProperties(1, productionProps); - BOOST_CHECK_EQUAL( 100 , well.getProductionPropertiesCopy(5).BHPLimit); - BOOST_CHECK( well.getProductionPropertiesCopy(5).hasProductionControl( Opm::WellProducer::BHP )); - - Opm::WellInjectionProperties injProps(well.getInjectionPropertiesCopy(1)); - injProps.THPLimit = 200; - well.setInjectionProperties(1, injProps); - BOOST_CHECK_EQUAL( 200 , well.getInjectionPropertiesCopy(5).THPLimit); - BOOST_CHECK( !well.getInjectionPropertiesCopy(5).hasInjectionControl( Opm::WellInjector::THP )); -} - - - -BOOST_AUTO_TEST_CASE(InjectorType) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1", 1, 2, Opm::Value("REF_DEPTH" , 2334.32), Opm::Phase::WATER, timeMap, 0); - - Opm::WellInjectionProperties injectionProps(well.getInjectionPropertiesCopy(1)); - injectionProps.injectorType = Opm::WellInjector::WATER; - well.setInjectionProperties(1, injectionProps); - // TODO: Should we test for something other than water here, as long as - // the default value for InjectorType is WellInjector::WATER? - BOOST_CHECK_EQUAL( Opm::WellInjector::WATER , well.getInjectionPropertiesCopy(5).injectorType); -} - - - - -BOOST_AUTO_TEST_CASE(WellStatus) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); - - Opm::Well well("WELL1" , 0, 0, Opm::Value("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0); - - std::vector newCompletions; - Opm::CompletionPtr comp1(new Opm::Completion( 10 , 10 , 10 , 0.25 , Opm::WellCompletion::OPEN , Opm::Value("ConnectionTransmissibilityFactor",99.88), Opm::Value("D",22.33), Opm::Value("SKIN",33.22))); - - newCompletions.push_back( comp1 ); - - well.addCompletions( 2 , newCompletions ); - - well.setStatus( 3 , Opm::WellCommon::OPEN ); - BOOST_CHECK_EQUAL( Opm::WellCommon::OPEN , well.getStatus( 5 )); -} - - - -/*****************************************************************/ - - -BOOST_AUTO_TEST_CASE(WellHaveProductionControlLimit) { - - Opm::TimeMapPtr timeMap = createXDaysTimeMap(20); - Opm::Well well("WELL1", 1, 2, Opm::Value("REF_DEPTH" , 2334.32), Opm::Phase::OIL, timeMap, 0); - - - BOOST_CHECK( !well.getProductionPropertiesCopy(1).hasProductionControl( Opm::WellProducer::ORAT )); - BOOST_CHECK( !well.getProductionPropertiesCopy(1).hasProductionControl( Opm::WellProducer::RESV )); - - Opm::WellProductionProperties properties(well.getProductionPropertiesCopy(1)); - properties.OilRate = 100; - properties.addProductionControl(Opm::WellProducer::ORAT); - well.setProductionProperties(2, properties); - BOOST_CHECK( well.getProductionPropertiesCopy(2).hasProductionControl( Opm::WellProducer::ORAT )); - BOOST_CHECK( !well.getProductionPropertiesCopy(2).hasProductionControl( Opm::WellProducer::RESV )); - - Opm::WellProductionProperties properties2(well.getProductionPropertiesCopy(2)); - properties2.ResVRate = 100; - properties2.addProductionControl(Opm::WellProducer::RESV); - well.setProductionProperties(2, properties2); - BOOST_CHECK( well.getProductionPropertiesCopy(2).hasProductionControl( Opm::WellProducer::RESV )); - - Opm::WellProductionProperties properties3(well.getProductionPropertiesCopy(2)); - properties3.OilRate = 100; - properties3.WaterRate = 100; - properties3.GasRate = 100; - properties3.LiquidRate = 100; - properties3.ResVRate = 100; - properties3.BHPLimit = 100; - properties3.THPLimit = 100; - properties3.addProductionControl(Opm::WellProducer::ORAT); - properties3.addProductionControl(Opm::WellProducer::LRAT); - properties3.addProductionControl(Opm::WellProducer::BHP); - well.setProductionProperties(10, properties3); - - BOOST_CHECK( well.getProductionPropertiesCopy(10).hasProductionControl( Opm::WellProducer::ORAT )); - BOOST_CHECK( well.getProductionPropertiesCopy(10).hasProductionControl( Opm::WellProducer::LRAT )); - BOOST_CHECK( well.getProductionPropertiesCopy(10).hasProductionControl( Opm::WellProducer::BHP )); - - Opm::WellProductionProperties properties4(well.getProductionPropertiesCopy(10)); - properties4.dropProductionControl( Opm::WellProducer::LRAT ); - well.setProductionProperties(10, properties4); - - BOOST_CHECK( well.getProductionPropertiesCopy(11).hasProductionControl( Opm::WellProducer::ORAT )); - BOOST_CHECK( !well.getProductionPropertiesCopy(11).hasProductionControl( Opm::WellProducer::LRAT )); - BOOST_CHECK( well.getProductionPropertiesCopy(11).hasProductionControl( Opm::WellProducer::BHP )); -} - - - -BOOST_AUTO_TEST_CASE(WellHaveInjectionControlLimit) { - - Opm::TimeMapPtr timeMap = createXDaysTimeMap(20); - Opm::Well well("WELL1", 1, 2, Opm::Value("REF_DEPTH" , 2334.32), Opm::Phase::WATER, timeMap, 0); - - BOOST_CHECK( !well.getInjectionPropertiesCopy(1).hasInjectionControl( Opm::WellInjector::RATE )); - BOOST_CHECK( !well.getInjectionPropertiesCopy(1).hasInjectionControl( Opm::WellInjector::RESV )); - - Opm::WellInjectionProperties injProps1(well.getInjectionPropertiesCopy(2)); - injProps1.surfaceInjectionRate = 100; - injProps1.addInjectionControl(Opm::WellInjector::RATE); - well.setInjectionProperties(2, injProps1); - BOOST_CHECK( well.getInjectionPropertiesCopy(2).hasInjectionControl( Opm::WellInjector::RATE )); - BOOST_CHECK( !well.getInjectionPropertiesCopy(2).hasInjectionControl( Opm::WellInjector::RESV )); - - Opm::WellInjectionProperties injProps2(well.getInjectionPropertiesCopy(2)); - injProps2.reservoirInjectionRate = 100; - injProps2.addInjectionControl(Opm::WellInjector::RESV); - well.setInjectionProperties(2, injProps2); - BOOST_CHECK( well.getInjectionPropertiesCopy(2).hasInjectionControl( Opm::WellInjector::RESV )); - - Opm::WellInjectionProperties injProps3(well.getInjectionPropertiesCopy(10)); - injProps3.BHPLimit = 100; - injProps3.addInjectionControl(Opm::WellInjector::BHP); - injProps3.THPLimit = 100; - injProps3.addInjectionControl(Opm::WellInjector::THP); - well.setInjectionProperties(10, injProps3); - - BOOST_CHECK( well.getInjectionPropertiesCopy(10).hasInjectionControl( Opm::WellInjector::RATE )); - BOOST_CHECK( well.getInjectionPropertiesCopy(10).hasInjectionControl( Opm::WellInjector::RESV )); - BOOST_CHECK( well.getInjectionPropertiesCopy(10).hasInjectionControl( Opm::WellInjector::THP )); - BOOST_CHECK( well.getInjectionPropertiesCopy(10).hasInjectionControl( Opm::WellInjector::BHP )); - - Opm::WellInjectionProperties injProps4(well.getInjectionPropertiesCopy(11)); - injProps4.dropInjectionControl( Opm::WellInjector::RESV ); - well.setInjectionProperties(11, injProps4); - - BOOST_CHECK( well.getInjectionPropertiesCopy(11).hasInjectionControl( Opm::WellInjector::RATE )); - BOOST_CHECK( !well.getInjectionPropertiesCopy(11).hasInjectionControl( Opm::WellInjector::RESV )); - BOOST_CHECK( well.getInjectionPropertiesCopy(11).hasInjectionControl( Opm::WellInjector::THP )); - BOOST_CHECK( well.getInjectionPropertiesCopy(11).hasInjectionControl( Opm::WellInjector::BHP )); -} -/*********************************************************************/ - - -BOOST_AUTO_TEST_CASE(WellSetAvailableForGroupControl_ControlSet) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(20); - Opm::Well well("WELL1", 1, 2, Opm::Value("REF_DEPTH" , 2334.32), Opm::Phase::WATER, timeMap, 0); - - BOOST_CHECK(well.isAvailableForGroupControl(10)); - well.setAvailableForGroupControl(12, false); - BOOST_CHECK(!well.isAvailableForGroupControl(13)); - well.setAvailableForGroupControl(15, true); - BOOST_CHECK(well.isAvailableForGroupControl(15)); -} - -BOOST_AUTO_TEST_CASE(WellSetGuideRate_GuideRateSet) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(20); - Opm::Well well("WELL1", 1, 2, Opm::Value("REF_DEPTH" , 2334.32), Opm::Phase::WATER, timeMap, 0); - - BOOST_CHECK_LT(well.getGuideRate(0), 0); - well.setGuideRate(1, 32.2); - BOOST_CHECK_LT(well.getGuideRate(0), 0); - BOOST_CHECK_EQUAL(32.2, well.getGuideRate(1)); -} - -BOOST_AUTO_TEST_CASE(WellGuideRatePhase_GuideRatePhaseSet) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(20); - Opm::Well well("WELL1", 1, 2, Opm::Value("REF_DEPTH" , 2334.32), Opm::Phase::WATER, timeMap, 0); - BOOST_CHECK_EQUAL(Opm::GuideRate::UNDEFINED, well.getGuideRatePhase(0)); - well.setGuideRatePhase(3, Opm::GuideRate::RAT); - BOOST_CHECK_EQUAL(Opm::GuideRate::UNDEFINED, well.getGuideRatePhase(2)); - BOOST_CHECK_EQUAL(Opm::GuideRate::RAT, well.getGuideRatePhase(3)); -} - - -BOOST_AUTO_TEST_CASE(WellSetScalingFactor_ScalingFactorSetSet) { - Opm::TimeMapPtr timeMap = createXDaysTimeMap(20); - Opm::Well well("WELL1", 1, 2, Opm::Value("REF_DEPTH" , 2334.32), Opm::Phase::WATER, timeMap, 0); - BOOST_CHECK_EQUAL(1.0, well.getGuideRateScalingFactor(0)); - well.setGuideRateScalingFactor(4, 0.6); - BOOST_CHECK_EQUAL(1.0, well.getGuideRateScalingFactor(3)); - BOOST_CHECK_EQUAL(0.6, well.getGuideRateScalingFactor(4)); -} - - -BOOST_AUTO_TEST_CASE(testWellNameInWellNamePattern) { - const std::string& wellnamePattern1 = "OP_*"; - const std::string& wellname1 = "OP_1"; - - BOOST_CHECK_EQUAL(Opm::Well::wellNameInWellNamePattern(wellname1, wellnamePattern1), true); - - const std::string& wellnamePattern2 = "NONE"; - BOOST_CHECK_EQUAL(Opm::Well::wellNameInWellNamePattern(wellname1, wellnamePattern2), false); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SimulationConfig/SimulationConfig.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SimulationConfig/SimulationConfig.cpp deleted file mode 100644 index add001f241..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SimulationConfig/SimulationConfig.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include - - - -/* - The internalization of the CPR keyword has been temporarily - disabled, suddenly decks with 'CPR' in the summary section turned - up. Keywords with section aware keyword semantics is currently not - handled by the parser. - - When the CPR is added again the following keyword configuration must - be added: - - {"name" : "CPR" , "sections" : ["RUNSPEC"], "size": 1 } - -*/ - - -namespace Opm { - - SimulationConfig::SimulationConfig(const Deck& deck, - const Eclipse3DProperties& eclipseProperties) : - m_useCPR(false), - m_DISGAS(false), - m_VAPOIL(false) - { - if (Section::hasRUNSPEC(deck)) { - const RUNSPECSection runspec(deck); - if (runspec.hasKeyword()) { - const auto& cpr = runspec.getKeyword(); - if (cpr.size() > 0) - throw std::invalid_argument("ERROR: In the RUNSPEC section the CPR keyword should EXACTLY one empty record."); - - m_useCPR = true; - } - if (runspec.hasKeyword()) { - m_DISGAS = true; - } - if (runspec.hasKeyword()) { - m_VAPOIL = true; - } - } - - initThresholdPressure(deck, eclipseProperties); - } - - - void SimulationConfig::initThresholdPressure(const Deck& deck, - const Eclipse3DProperties& eclipseProperties) { - m_ThresholdPressure = std::make_shared(deck, eclipseProperties); - } - - - std::shared_ptr SimulationConfig::getThresholdPressure() const { - return m_ThresholdPressure; - } - - - bool SimulationConfig::hasThresholdPressure() const { - return m_ThresholdPressure->size() > 0; - } - - bool SimulationConfig::useCPR() const { - return m_useCPR; - } - - bool SimulationConfig::hasDISGAS() const { - return m_DISGAS; - } - - bool SimulationConfig::hasVAPOIL() const { - return m_VAPOIL; - } - -} //namespace Opm diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SimulationConfig/SimulationConfig.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SimulationConfig/SimulationConfig.hpp deleted file mode 100644 index 57ed15ea0c..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SimulationConfig/SimulationConfig.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef OPM_SIMULATION_CONFIG_HPP -#define OPM_SIMULATION_CONFIG_HPP - -#include -#include - -namespace Opm { - - class ThresholdPressure; - - class SimulationConfig { - - public: - - SimulationConfig(const Deck& deck, - const Eclipse3DProperties& gridProperties); - - std::shared_ptr getThresholdPressure() const; - bool hasThresholdPressure() const; - bool useCPR() const; - bool hasDISGAS() const; - bool hasVAPOIL() const; - - private: - - void initThresholdPressure(const Deck& deck, - const Eclipse3DProperties& gridProperties); - - std::shared_ptr< const ThresholdPressure > m_ThresholdPressure; - bool m_useCPR; - bool m_DISGAS; - bool m_VAPOIL; - }; - - - - typedef std::shared_ptr SimulationConfigPtr; - typedef std::shared_ptr SimulationConfigConstPtr; - -} //namespace Opm - - - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SimulationConfig/ThresholdPressure.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SimulationConfig/ThresholdPressure.cpp deleted file mode 100644 index 6e4e5c06d1..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SimulationConfig/ThresholdPressure.cpp +++ /dev/null @@ -1,189 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace Opm { - - ThresholdPressure::ThresholdPressure(const Deck& deck, - const Eclipse3DProperties& eclipseProperties) - { - - if (Section::hasRUNSPEC( deck ) && Section::hasSOLUTION( deck )) { - std::shared_ptr runspecSection = std::make_shared( deck ); - std::shared_ptr solutionSection = std::make_shared( deck ); - initThresholdPressure( runspecSection, solutionSection, eclipseProperties ); - } - } - - - std::pair ThresholdPressure::makeIndex(int r1 , int r2) { - if (r1 < r2) - return std::make_pair(r1,r2); - else - return std::make_pair(r2,r1); - } - - void ThresholdPressure::addPair(int r1 , int r2 , const std::pair& valuePair) { - std::pair indexPair = makeIndex(r1,r2); - m_pressureTable[indexPair] = valuePair; - } - - void ThresholdPressure::addBarrier(int r1 , int r2 , double p) { - std::pair valuePair = std::make_pair(true , p); - addPair( r1,r2, valuePair ); - } - - void ThresholdPressure::addBarrier(int r1 , int r2) { - std::pair valuePair = std::make_pair(false , 0); - addPair( r1,r2, valuePair ); - } - - - void ThresholdPressure::initThresholdPressure(std::shared_ptr runspecSection, - std::shared_ptr solutionSection, - const Eclipse3DProperties& eclipseProperties) { - - bool thpresOption = false; - const bool thpresKeyword = solutionSection->hasKeyword( ); - const bool hasEqlnumKeyword = eclipseProperties.hasDeckIntGridProperty( "EQLNUM" ); - int maxEqlnum = 0; - - //Is THPRES option set? - if (runspecSection->hasKeyword( )) { - const auto& eqlopts = runspecSection->getKeyword( ); - const auto& rec = eqlopts.getRecord(0); - for (size_t i = 0; i < rec.size(); ++i) { - const auto& item = rec.getItem(i); - if (item.hasValue(0)) { - if (item.get< std::string >(0) == "THPRES") { - thpresOption = true; - } else if (item.get< std::string >(0) == "IRREVERS") { - throw std::runtime_error("Cannot use IRREVERS version of THPRES option, not implemented"); - } - } - } - } - - //Option is set and keyword is found - if (thpresOption && thpresKeyword) - { - //Find max of eqlnum - if (hasEqlnumKeyword) { - const auto& eqlnumKeyword = eclipseProperties.getIntGridProperty( "EQLNUM" ); - const auto& eqlnum = eqlnumKeyword.getData(); - maxEqlnum = *std::max_element(eqlnum.begin(), eqlnum.end()); - - if (0 == maxEqlnum) { - throw std::runtime_error("Error in EQLNUM data: all values are 0"); - } - } else { - throw std::runtime_error("Error when internalizing THPRES: EQLNUM keyword not found in deck"); - } - - - // Fill threshold pressure table. - const auto& thpres = solutionSection->getKeyword( ); - - const int numRecords = thpres.size(); - for (int rec_ix = 0; rec_ix < numRecords; ++rec_ix) { - const auto& rec = thpres.getRecord(rec_ix); - const auto& region1Item = rec.getItem(); - const auto& region2Item = rec.getItem(); - const auto& thpressItem = rec.getItem(); - - if (region1Item.hasValue(0) && region2Item.hasValue(0)) { - const int r1 = region1Item.get< int >(0); - const int r2 = region2Item.get< int >(0); - if (r1 > maxEqlnum || r2 > maxEqlnum) { - throw std::runtime_error("Too high region numbers in THPRES keyword"); - } - - if (thpressItem.hasValue(0)) { - addBarrier( r1 , r2 , thpressItem.getSIDouble( 0 ) ); - } else - addBarrier( r1 , r2 ); - } else - throw std::runtime_error("Missing region data for use of the THPRES keyword"); - - } - } else if (thpresOption && !thpresKeyword) { - throw std::runtime_error("Invalid solution section; the EQLOPTS THPRES option is set in RUNSPEC, but no THPRES keyword is found in SOLUTION"); - - } - } - - - bool ThresholdPressure::hasRegionBarrier(int r1 , int r2) const { - std::pair indexPair = makeIndex(r1,r2); - if (m_pressureTable.find( indexPair ) == m_pressureTable.end()) - return false; - else - return true; - } - - - double ThresholdPressure::getThresholdPressure(int r1 , int r2) const { - std::pair indexPair = makeIndex(r1,r2); - auto iter = m_pressureTable.find( indexPair ); - if (iter == m_pressureTable.end()) - return 0.0; - else { - auto pair_pair = *iter; - auto value_pair = pair_pair.second; - bool valid = value_pair.first; - double value = value_pair.second; - if (valid) - return value; - else { - std::string msg = "The THPRES value for regions " + std::to_string(r1) + " and " + std::to_string(r2) + " has not been initialized. Using 0.0"; - throw std::invalid_argument(msg); - return 0; - } - } - - } - - - size_t ThresholdPressure::size() const { - return m_pressureTable.size(); - } - - - bool ThresholdPressure::hasThresholdPressure(int r1 , int r2) const { - std::pair indexPair = makeIndex(r1,r2); - auto iter = m_pressureTable.find( indexPair ); - if (iter == m_pressureTable.end()) - return false; - else { - auto pair_pair = *iter; - auto value_pair = pair_pair.second; - return value_pair.first; - } - } - - -} //namespace Opm diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SimulationConfig/ThresholdPressure.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SimulationConfig/ThresholdPressure.hpp deleted file mode 100644 index 5f5a9446a9..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SimulationConfig/ThresholdPressure.hpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef OPM_TRESHOLD_PRESSURES_HPP -#define OPM_TRESHOLD_PRESSURES_HPP - -#include -#include - -#include - -namespace Opm { - - - class Deck; - class RUNSPECSection; - class SOLUTIONSection; - - class ThresholdPressure { - - public: - - ThresholdPressure(const Deck& deck, - const Eclipse3DProperties& eclipseProperties); - - - /* - The hasRegionBarrier() method checks if a threshold pressure - has been configured between the equilibration regions r1 and - r2; i.e. if the deck contains a THPRES record with regions - r1 and r2. - */ - bool hasRegionBarrier(int r1 , int r2) const; - - /* - Checks if a threshold presssure has been configured between - the equilibration regions r1 and r2; the function will - return false either if no THPRES record with r1 and r2 has - been configured - or if THPRES record with ra and r2 has - defaulted pressure. - */ - bool hasThresholdPressure(int r1 , int r2) const; - - /* - Will return the threshold pressure between equilibration - regions r1 and r2; if the pressure has been defaulted the - function will raise the error - INTERNAL_ERROR_UNINITIALIZED_THPRES - check with - hasThresholdPressure(r1,r2) first to be safe. - */ - double getThresholdPressure(int r1 , int r2) const; - size_t size() const; - private: - void initThresholdPressure(std::shared_ptr runspecSection, - std::shared_ptr solutionSection, - const Eclipse3DProperties& eclipseProperties); - - static std::pair makeIndex(int r1 , int r2); - void addPair(int r1 , int r2 , const std::pair& valuePair); - void addBarrier(int r1 , int r2); - void addBarrier(int r1 , int r2 , double p); - - std::vector> m_thresholdPressureTable; - std::map , std::pair > m_pressureTable; - }; - - - typedef std::shared_ptr ThresholdPressurePtr; - typedef std::shared_ptr ThresholdPressureConstPtr; - -} //namespace Opm - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SimulationConfig/tests/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SimulationConfig/tests/CMakeLists.txt deleted file mode 100644 index b539652fcd..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SimulationConfig/tests/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -foreach(tapp ThresholdPressureTest SimulationConfigTest) - opm_add_test(run${tapp} SOURCES ${tapp}.cpp - LIBRARIES opmparser ${Boost_LIBRARIES}) -endforeach() diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SimulationConfig/tests/SimulationConfigTest.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SimulationConfig/tests/SimulationConfigTest.cpp deleted file mode 100644 index 1de6f83051..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SimulationConfig/tests/SimulationConfigTest.cpp +++ /dev/null @@ -1,214 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - - -#define BOOST_TEST_MODULE SimulationConfigTests - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - - -using namespace Opm; - -const std::string& inputStr = "RUNSPEC\n" - "EQLOPTS\n" - "THPRES /\n" - "DIMENS\n" - "10 3 4 /\n" - "\n" - "GRID\n" - "REGIONS\n" - "EQLNUM\n" - "10*1 10*2 100*3 /\n " - "\n" - - "SOLUTION\n" - "THPRES\n" - "1 2 12.0/\n" - "1 3 5.0/\n" - "2 3 7.0/\n" - "/\n" - "\n"; - -const std::string& inputStr_noTHPRES = "RUNSPEC\n" - "EQLOPTS\n" - "DIMENS\n" - "10 3 4 /\n" - "\n" - "GRID\n" - "REGIONS\n" - "EQLNUM\n" - "10*1 10*2 100*3 /\n " - "\n" - "SOLUTION\n" - "\n"; - -const std::string& inputStr_cpr = "RUNSPEC\n" - "CPR\n" - "/\n" - "SUMMARY\n"; - - -const std::string& inputStr_INVALID = "RUNSPEC\n" - "CPR\n" - "WEll 10 10 17/" - "/\n" - "SUMMARY\n"; - - - -const std::string& inputStr_cpr_in_SUMMARY = "SUMMARY\n" - "CPR\n" - "well1 10 27 10/\n/\n"; - -const std::string& inputStr_cpr_BOTH = "RUNSPEC\n" - "CPR\n" - "/\n" - "SUMMARY\n" - "CPR\n" - "well1 10 20 30/\n/\n"; - -const std::string& inputStr_vap_dis = "RUNSPEC\n" - "VAPOIL\n" - "DISGAS\n" - "DIMENS\n" - "10 3 4 /\n" - "\n" - "GRID\n" - "REGIONS\n" - "\n"; - -static DeckPtr createDeck(const ParseContext& parseContext , const std::string& input) { - Opm::Parser parser; - return parser.parseString(input, parseContext); -} - - -BOOST_AUTO_TEST_CASE(SimulationConfigGetThresholdPressureTableTest) { - ParseContext parseContext; - DeckPtr deck = createDeck(parseContext , inputStr); - TableManager tm(*deck); - EclipseGrid eg(10, 3, 4); - Eclipse3DProperties ep(*deck, tm, eg); - SimulationConfigConstPtr simulationConfigPtr; - BOOST_CHECK_NO_THROW(simulationConfigPtr = std::make_shared - (*deck, ep)); -} - - -BOOST_AUTO_TEST_CASE(SimulationConfigNOTHPRES) { - ParseContext parseContext; - DeckPtr deck = createDeck(parseContext, inputStr_noTHPRES); - TableManager tm(*deck); - EclipseGrid eg(10, 3, 4); - Eclipse3DProperties ep(*deck, tm, eg); - SimulationConfig simulationConfig(*deck, ep); - BOOST_CHECK( !simulationConfig.hasThresholdPressure() ); -} - -BOOST_AUTO_TEST_CASE(SimulationConfigCPRNotUsed) { - ParseContext parseContext; - DeckPtr deck = createDeck(parseContext, inputStr_noTHPRES); - TableManager tm(*deck); - EclipseGrid eg(10, 3, 4); - Eclipse3DProperties ep(*deck, tm, eg); - SimulationConfig simulationConfig(*deck, ep); - BOOST_CHECK( ! simulationConfig.useCPR()); -} - -BOOST_AUTO_TEST_CASE(SimulationConfigCPRUsed) { - ParseContext parseContext; - DeckPtr deck = createDeck(parseContext, inputStr_cpr); - TableManager tm(*deck); - EclipseGrid eg(10, 3, 4); - Eclipse3DProperties ep(*deck, tm, eg); - SUMMARYSection summary(*deck); - SimulationConfig simulationConfig(*deck, ep); - BOOST_CHECK( simulationConfig.useCPR() ); - BOOST_CHECK( ! summary.hasKeyword("CPR") ); -} - - -BOOST_AUTO_TEST_CASE(SimulationConfigCPRInSUMMARYSection) { - ParseContext parseContext; - DeckPtr deck = createDeck(parseContext, inputStr_cpr_in_SUMMARY); - TableManager tm(*deck); - EclipseGrid eg(10, 3, 4); - Eclipse3DProperties ep(*deck, tm, eg); - SUMMARYSection summary(*deck); - SimulationConfig simulationConfig(*deck, ep); - BOOST_CHECK( ! simulationConfig.useCPR()); - BOOST_CHECK( summary.hasKeyword("CPR")); -} - - -BOOST_AUTO_TEST_CASE(SimulationConfigCPRBoth) { - ParseContext parseContext; - DeckPtr deck = createDeck(parseContext, inputStr_cpr_BOTH); - TableManager tm(*deck); - EclipseGrid eg(10, 3, 4); - Eclipse3DProperties ep(*deck, tm, eg); - SUMMARYSection summary(*deck); - SimulationConfig simulationConfig(*deck, ep); - BOOST_CHECK( simulationConfig.useCPR()); - BOOST_CHECK( summary.hasKeyword("CPR")); - - const auto& cpr = summary.getKeyword(); - const auto& record = cpr.getRecord(0); - BOOST_CHECK_EQUAL( 1 , cpr.size()); - BOOST_CHECK_EQUAL( record.getItem().get< std::string >(0) , "well1"); - BOOST_CHECK_EQUAL( record.getItem().get< int >(0) , 10); - BOOST_CHECK_EQUAL( record.getItem().get< int >(0) , 20); - BOOST_CHECK_EQUAL( record.getItem().get< int >(0) , 30); -} - - -BOOST_AUTO_TEST_CASE(SimulationConfigCPRRUnspecWithData) { - ParseContext parseContext; - BOOST_CHECK_THROW( createDeck(parseContext , inputStr_INVALID) , std::invalid_argument ); -} - - -BOOST_AUTO_TEST_CASE(SimulationConfig_VAPOIL_DISGAS) { - ParseContext parseContext; - DeckPtr deck = createDeck(parseContext, inputStr); - TableManager tm(*deck); - EclipseGrid eg(10, 3, 4); - Eclipse3DProperties ep(*deck, tm, eg); - SimulationConfig simulationConfig(*deck, ep); - BOOST_CHECK_EQUAL( false , simulationConfig.hasDISGAS()); - BOOST_CHECK_EQUAL( false , simulationConfig.hasVAPOIL()); - - DeckPtr deck_vd = createDeck(parseContext, inputStr_vap_dis); - TableManager tm_vd(*deck_vd); - EclipseGrid eg_vd(10, 3, 4); - Eclipse3DProperties ep_vd(*deck_vd, tm, eg); - SimulationConfig simulationConfig_vd(*deck_vd, ep_vd); - BOOST_CHECK_EQUAL( true , simulationConfig_vd.hasDISGAS()); - BOOST_CHECK_EQUAL( true , simulationConfig_vd.hasVAPOIL()); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SimulationConfig/tests/ThresholdPressureTest.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SimulationConfig/tests/ThresholdPressureTest.cpp deleted file mode 100644 index b46fa9e472..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SimulationConfig/tests/ThresholdPressureTest.cpp +++ /dev/null @@ -1,270 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - - -#include - -#define BOOST_TEST_MODULE ThresholdPressureTests - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - - -using namespace Opm; - -const std::string& inputStr = "RUNSPEC\n" - "EQLOPTS\n" - "THPRES /\n " - "\n" - - "SOLUTION\n" - "THPRES\n" - "1 2 12.0/\n" - "1 3 5.0/\n" - "2 3 33.0 /\n" - "2 3 7.0/\n" - "/\n" - "\n"; - -const std::string& inputStrWithEqlNum = - "RUNSPEC\n" - "EQLOPTS\n" - "THPRES /\n " - "\n" - "REGIONS\n" - "EQLNUM\n" - " 27*3 /\n" - "SOLUTION\n" - "THPRES\n" - "1 2 12.0/\n" - "1 3 5.0/\n" - "2 3 33.0 /\n" - "2 3 7.0/\n" - "/\n" - "\n"; - - -const std::string& inputStrWithEqlNumall0 = - "RUNSPEC\n" - "EQLOPTS\n" - "THPRES /\n " - "\n" - "REGIONS\n" - "EQLNUM\n" - " 27*0 /\n" - "SOLUTION\n" - "THPRES\n" - "1 2 12.0/\n" - "1 3 5.0/\n" - "2 3 33.0 /\n" - "2 3 7.0/\n" - "/\n" - "\n"; - - -const std::string& inputStrNoSolutionSection = "RUNSPEC\n" - "EQLOPTS\n" - "THPRES /\n " - "\n"; - - -const std::string& inputStrNoTHPRESinSolutionNorRUNSPEC = "RUNSPEC\n" - "\n" - "SOLUTION\n" - "\n" - "SCHEDULE\n"; - -const std::string& inputStrTHPRESinRUNSPECnotSoultion = "RUNSPEC\n" - "EQLOPTS\n" - "ss /\n " - "\n" - "SOLUTION\n" - "\n"; - - -const std::string& inputStrIrrevers = "RUNSPEC\n" - "EQLOPTS\n" - "THPRES IRREVERS/\n " - "\n" - - "SOLUTION\n" - "THPRES\n" - "/\n" - "\n"; - -const std::string& inputStrInconsistency = "RUNSPEC\n" - "EQLOPTS\n" - "THPRES /\n " - "\n" - - "SOLUTION\n" - "\n"; - -const std::string& inputStrTooHighRegionNumbers = "RUNSPEC\n" - "EQLOPTS\n" - "THPRES /\n " - "\n" - - "SOLUTION\n" - "THPRES\n" - "1 2 12.0/\n" - "4 3 5.0/\n" - "2 3 7.0/\n" - "/\n" - "\n"; - - -const std::string& inputStrMissingData = "RUNSPEC\n" - "EQLOPTS\n" - "THPRES /\n " - "\n" - - "SOLUTION\n" - "THPRES\n" - "1 2 12.0/\n" - "2 3 5.0/\n" - "1 /\n" - "/\n" - "\n"; - - -const std::string& inputStrMissingPressure = "RUNSPEC\n" - "EQLOPTS\n" - "THPRES /\n " - "\n" - "REGIONS\n" - "EQLNUM\n" - " 27*3 /\n" - "SOLUTION\n" - "THPRES\n" - "1 2 12.0/\n" - "2 3 5.0/\n" - "2 3 /\n" - "/\n" - "\n"; - -static DeckPtr createDeck(const ParseContext& parseContext, const std::string& input) { - Opm::Parser parser; - return parser.parseString(input, parseContext); -} - -/// Setup fixture -struct Setup -{ - ParseContext parseContext; - DeckPtr deck; - TableManager tablemanager; - EclipseGrid grid; - Eclipse3DProperties props; - ThresholdPressure threshPres; - - explicit Setup(const std::string& input) : - parseContext(), - deck(createDeck(parseContext, input)), - tablemanager(*deck), - grid(10, 3, 4), - props(*deck, tablemanager, grid), - threshPres(*deck, props) - { - } - explicit Setup(const std::string& input, ParseContext& parseContextArg) : - parseContext(), // not used - deck(createDeck(parseContextArg, input)), - tablemanager(*deck), - grid(10, 3, 4), - props(*deck, tablemanager, grid), - threshPres(*deck, props) - { - } - -}; - -BOOST_AUTO_TEST_CASE(ThresholdPressureDeckHasEqlnum) { - Setup s(inputStrWithEqlNum); - - BOOST_CHECK(s.props.hasDeckIntGridProperty("EQLNUM")); -} - -BOOST_AUTO_TEST_CASE(ThresholdPressureTest) { - Setup s(inputStrWithEqlNum); - auto thp = s.threshPres; - - BOOST_CHECK_EQUAL(thp.getThresholdPressure(1, 2), 1200000.0); - BOOST_CHECK_EQUAL(thp.getThresholdPressure(2, 1), 1200000.0); - BOOST_CHECK_EQUAL(thp.getThresholdPressure(1, 3), 500000.0); - BOOST_CHECK_EQUAL(thp.getThresholdPressure(3, 1), 500000.0); - BOOST_CHECK_EQUAL(thp.getThresholdPressure(2, 3), 700000.0); - BOOST_CHECK_EQUAL(thp.getThresholdPressure(3, 2), 700000.0); -} - -BOOST_AUTO_TEST_CASE(ThresholdPressureEmptyTest) { - Setup s(inputStrNoSolutionSection); - BOOST_CHECK_EQUAL(0, s.threshPres.size()); -} - -BOOST_AUTO_TEST_CASE(ThresholdPressureNoTHPREStest) { - Setup s(inputStrNoTHPRESinSolutionNorRUNSPEC); - Setup s2(inputStrTHPRESinRUNSPECnotSoultion); - - BOOST_CHECK_EQUAL(0, s.threshPres.size()); - BOOST_CHECK_EQUAL(0, s.threshPres.size()); -} - -BOOST_AUTO_TEST_CASE(ThresholdPressureThrowTest) { - BOOST_CHECK_THROW(Setup sx(inputStrIrrevers), std::runtime_error); - BOOST_CHECK_THROW(Setup sx(inputStrInconsistency), std::runtime_error); - BOOST_CHECK_THROW(Setup sx(inputStrTooHighRegionNumbers), std::runtime_error); - BOOST_CHECK_THROW(Setup sx(inputStrMissingData), std::runtime_error); - BOOST_CHECK_THROW(Setup sx(inputStr), std::runtime_error); - BOOST_CHECK_THROW(Setup sx(inputStrWithEqlNumall0), std::runtime_error); - - BOOST_CHECK_THROW(Setup sx(inputStr), std::runtime_error); - ParseContext pc; - pc.update(ParseContext::UNSUPPORTED_INITIAL_THPRES, InputError::IGNORE); - BOOST_CHECK_NO_THROW(Setup sx(inputStrMissingPressure, pc)); - - Setup s(inputStrMissingPressure, pc); - BOOST_CHECK( s.threshPres.hasRegionBarrier(2, 3)); - BOOST_CHECK(!s.threshPres.hasThresholdPressure(2, 3)); - - pc.update(ParseContext::INTERNAL_ERROR_UNINITIALIZED_THPRES, InputError::THROW_EXCEPTION); - BOOST_CHECK_THROW(s.threshPres.getThresholdPressure(2, 3), std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(HasPair) { - Setup s(inputStrWithEqlNum); - - BOOST_CHECK( s.threshPres.hasRegionBarrier(1, 2)); - BOOST_CHECK(!s.threshPres.hasRegionBarrier(1, 7)); - BOOST_CHECK( s.threshPres.hasThresholdPressure(1, 2)); - BOOST_CHECK(!s.threshPres.hasThresholdPressure(1, 7)); - BOOST_CHECK_EQUAL(1200000.0, s.threshPres.getThresholdPressure(1, 2)); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.cpp deleted file mode 100644 index 9d8e466618..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.cpp +++ /dev/null @@ -1,351 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -namespace Opm { - -namespace { - /* A dummy deck that holds a Summary section with the keyword list that ALL - * expands to, plus the SUMMARY header - */ - const Deck ALL_keywords = { - "SUMMARY", - "FAQR", "FAQRG", "FAQT", "FAQTG", "FGIP", "FGIPG", "FGIPL", - "FGIR", "FGIT", "FGOR", "FGPR", "FGPT", "FOIP", "FOIPG", - "FOIPL", "FOIR", "FOIT", "FOPR", "FOPT", "FPR", "FVIR", - "FVIT", "FVPR", "FVPT", "FWCT", "FWGR", "FWIP", "FWIR", - "FWIT", "FWPR", "FWPT", - "GGIR", "GGIT", "GGOR", "GGPR", "GGPT", "GOIR", "GOIT", - "GOPR", "GOPT", "GVIR", "GVIT", "GVPR", "GVPT", "GWCT", - "GWGR", "GWIR", "GWIT", "GWPR", "GWPT", - "WBHP", "WGIR", "WGIT", "WGOR", "WGPR", "WGPT", "WOIR", - "WOIT", "WOPR", "WOPT", "WPI", "WTHP", "WVIR", "WVIT", - "WVPR", "WVPT", "WWCT", "WWGR", "WWIR", "WWIT", "WWPR", - "WWPT", - // ALL will not expand to these keywords yet - "AAQR", "AAQRG", "AAQT", "AAQTG" - }; - -/* - When the error handling config says that the error should be - logged, the handleMissingWell and handleMissingGroup routines - cheat. Ideally we should have a MessageContainer instance around - and pass that to the parseContext::handlError() routine. Instead - we: - - 1. We instantiate new MessageContainer() which is just - immediately dropped to floor, leaving the messages behind. - - 2. Print a message on stderr. - - The case of incorrectly/missing well/group names in the SUMMARY - section did just not seem important enough to warrant the - refactoring required to pass a mutable proper MessageContainer - all the way down here. -*/ - -void handleMissingWell( const ParseContext& parseContext , const std::string& keyword, const std::string& well) { - std::string msg = std::string("Error in keyword:") + keyword + std::string(" No such well: ") + well; - MessageContainer msgContainer; - if (parseContext.get( ParseContext::SUMMARY_UNKNOWN_WELL) == InputError::WARN) - std::cerr << "ERROR: " << msg << std::endl; - - parseContext.handleError( ParseContext::SUMMARY_UNKNOWN_WELL , msgContainer , msg ); -} - - -void handleMissingGroup( const ParseContext& parseContext , const std::string& keyword, const std::string& group) { - std::string msg = std::string("Error in keyword:") + keyword + std::string(" No such group: ") + group; - MessageContainer msgContainer; - if (parseContext.get( ParseContext::SUMMARY_UNKNOWN_GROUP) == InputError::WARN) - std::cerr << "ERROR: " << msg << std::endl; - - parseContext.handleError( ParseContext::SUMMARY_UNKNOWN_GROUP , msgContainer , msg ); -} - -inline void keywordW( std::vector< ERT::smspec_node >& list, - const ParseContext& parseContext, - const DeckKeyword& keyword, - const Schedule& schedule ) { - - const auto type = ECL_SMSPEC_WELL_VAR; - static const std::vector< std::string > wildcard = { "*" }; - - const auto hasValue = []( const DeckKeyword& kw ) { - return kw.getDataRecord().getDataItem().hasValue( 0 ); - }; - - const auto& patterns = keyword.size() > 0 && hasValue( keyword ) - ? keyword.getStringData() - : wildcard; - - for( const std::string& pattern : patterns ) { - auto wells = schedule.getWellsMatching( pattern ); - - if( wells.empty() ) - handleMissingWell( parseContext, keyword.name(), pattern ); - - for( const auto* well : wells ) - list.emplace_back( type, well->name(), keyword.name() ); - } -} - -inline void keywordG( std::vector< ERT::smspec_node >& list, - const ParseContext& parseContext, - const DeckKeyword& keyword, - const Schedule& schedule ) { - - const auto type = ECL_SMSPEC_GROUP_VAR; - - if( keyword.size() == 0 || - !keyword.getDataRecord().getDataItem().hasValue( 0 ) ) { - - for( const auto& group : schedule.getGroups() ) - list.emplace_back( type, group->name(), keyword.name() ); - - return; - } - - const auto& item = keyword.getDataRecord().getDataItem(); - - for( const std::string& group : item.getData< std::string >() ) { - if( schedule.hasGroup( group ) ) - list.emplace_back( ECL_SMSPEC_GROUP_VAR, group, keyword.name() ); - else - handleMissingGroup( parseContext, keyword.name(), group ); - } -} - -inline void keywordF( std::vector< ERT::smspec_node >& list, - const DeckKeyword& keyword ) { - list.emplace_back( keyword.name() ); -} - -inline std::array< int, 3 > dimensions( const EclipseGrid& grid ) { - return {{ int( grid.getNX() ), int( grid.getNY() ), int( grid.getNZ() ) }}; -} - -inline std::array< int, 3 > getijk( const DeckRecord& record, - int offset = 0 ) { - return {{ - record.getItem( offset + 0 ).get< int >( 0 ) - 1, - record.getItem( offset + 1 ).get< int >( 0 ) - 1, - record.getItem( offset + 2 ).get< int >( 0 ) - 1 - }}; -} - -inline std::array< int, 3 > getijk( const Completion& completion ) { - return {{ completion.getI(), completion.getJ(), completion.getK() }}; -} - -inline void keywordB( std::vector< ERT::smspec_node >& list, - const DeckKeyword& keyword, - std::array< int, 3 > dims ) { - for( const auto& record : keyword ) { - auto ijk = getijk( record ); - list.emplace_back( keyword.name(), dims.data(), ijk.data() ); - } -} - -inline void keywordR( std::vector< ERT::smspec_node >& list, - const DeckKeyword& keyword, - const Eclipse3DProperties& props, - std::array< int, 3 > dims ) { - - /* RUNSUM is not a region keyword but a directive for how to format and - * print output. Unfortunately its *recognised* as a region keyword - * because of its structure and position. Hence the special handling of ignoring it. - */ - if( keyword.name() == "RUNSUM" ) return; - if( keyword.name() == "RPTONLY" ) return; - - const auto& item = keyword.getDataRecord().getDataItem(); - const auto regions = item.hasValue( 0 ) - ? item.getData< int >() - : props.getRegions( "FIPNUM" ); - - for( const int region : regions ) - list.emplace_back( keyword.name(), dims.data(), region ); -} - -inline void keywordC( std::vector< ERT::smspec_node >& list, - const ParseContext& parseContext, - const DeckKeyword& keyword, - const Schedule& schedule, - std::array< int, 3 > dims ) { - - const auto& keywordstring = keyword.name(); - const auto last_timestep = schedule.getTimeMap()->last(); - - for( const auto& record : keyword ) { - - const auto& wellitem = record.getItem( 0 ); - - const auto wells = wellitem.defaultApplied( 0 ) - ? schedule.getWells() - : schedule.getWellsMatching( wellitem.getTrimmedString( 0 ) ); - - if( wells.empty() ) - handleMissingWell( parseContext, keyword.name(), wellitem.getTrimmedString( 0 ) ); - - for( const auto* well : wells ) { - const auto& name = well->name(); - - /* - * we don't want to add completions that don't exist, so we iterate - * over a well's completions regardless of the desired block is - * defaulted or not - */ - for( const auto& completion : *well->getCompletions( last_timestep ) ) { - /* block coordinates defaulted */ - auto cijk = getijk( *completion ); - - if( record.getItem( 1 ).defaultApplied( 0 ) ) { - list.emplace_back( keywordstring, name, dims.data(), cijk.data() ); - } - else { - /* block coordinates specified */ - auto recijk = getijk( record, 1 ); - if( std::equal( recijk.begin(), recijk.end(), cijk.begin() ) ) - list.emplace_back( keywordstring, name, dims.data(), cijk.data() ); - } - } - } - } -} - -inline void handleKW( std::vector< ERT::smspec_node >& list, - const DeckKeyword& keyword, - const Schedule& schedule, - const Eclipse3DProperties& props, - const ParseContext& parseContext, - std::array< int, 3 > n_xyz ) { - const auto var_type = ecl_smspec_identify_var_type( keyword.name().c_str() ); - - switch( var_type ) { - case ECL_SMSPEC_WELL_VAR: return keywordW( list, parseContext, keyword, schedule ); - case ECL_SMSPEC_GROUP_VAR: return keywordG( list, parseContext, keyword, schedule ); - case ECL_SMSPEC_FIELD_VAR: return keywordF( list, keyword ); - case ECL_SMSPEC_BLOCK_VAR: return keywordB( list, keyword, n_xyz ); - case ECL_SMSPEC_REGION_VAR: return keywordR( list, keyword, props, n_xyz ); - case ECL_SMSPEC_COMPLETION_VAR: return keywordC( list, parseContext, keyword, schedule, n_xyz ); - - default: return; - } -} - -inline void uniq( std::vector< ERT::smspec_node >& vec ) { - const auto lt = []( const ERT::smspec_node& lhs, - const ERT::smspec_node& rhs ) { - return std::strcmp( lhs.key1(), rhs.key1() ) < 0; - }; - const auto eq = []( const ERT::smspec_node& lhs, - const ERT::smspec_node& rhs ) { - return std::strcmp( lhs.key1(), rhs.key1() ) == 0; - }; - - std::sort( vec.begin(), vec.end(), lt ); - auto logical_end = std::unique( vec.begin(), vec.end(), eq ); - vec.erase( logical_end, vec.end() ); -} - -} - -SummaryConfig::SummaryConfig( const Deck& deck, const EclipseState& es , const ParseContext& parseContext) - : SummaryConfig( deck, - *es.getSchedule(), - es.get3DProperties(), - parseContext, - dimensions( *es.getInputGrid() ) ) -{} - -SummaryConfig::SummaryConfig( const Deck& deck, - const Schedule& schedule, - const Eclipse3DProperties& props, - const ParseContext& parseContext, - std::array< int, 3 > n_xyz ) { - - SUMMARYSection section( deck ); - for( auto& x : section ) - handleKW( this->keywords, x, schedule, props, parseContext, n_xyz ); - - if( section.hasKeyword( "ALL" ) ) - this->merge( { ALL_keywords, schedule, props, parseContext, n_xyz } ); - - uniq( this->keywords ); - for (const auto& kw: this->keywords) - this->short_keywords.insert( kw.keyword() ); -} - -SummaryConfig::const_iterator SummaryConfig::begin() const { - return this->keywords.cbegin(); -} - -SummaryConfig::const_iterator SummaryConfig::end() const { - return this->keywords.cend(); -} - -SummaryConfig& SummaryConfig::merge( const SummaryConfig& other ) { - this->keywords.insert( this->keywords.end(), - other.keywords.begin(), - other.keywords.end() ); - - uniq( this->keywords ); - return *this; -} - -SummaryConfig& SummaryConfig::merge( SummaryConfig&& other ) { - auto fst = std::make_move_iterator( other.keywords.begin() ); - auto lst = std::make_move_iterator( other.keywords.end() ); - this->keywords.insert( this->keywords.end(), fst, lst ); - other.keywords.clear(); - - uniq( this->keywords ); - return *this; -} - -bool SummaryConfig::hasKeyword( const std::string& keyword ) const { - return (this->short_keywords.count( keyword ) == 1); -} - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp deleted file mode 100644 index 874924a34a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp +++ /dev/null @@ -1,74 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef OPM_SUMMARY_CONFIG_HPP -#define OPM_SUMMARY_CONFIG_HPP - -#include -#include -#include - -#include - -namespace Opm { - - class Deck; - class Eclipse3DProperties; - class EclipseState; - class ParserKeyword; - class Schedule; - class ParseContext; - - class SummaryConfig { - public: - typedef std::vector< ERT::smspec_node >::const_iterator const_iterator; - - SummaryConfig( const Deck&, const EclipseState& , const ParseContext& ); - SummaryConfig( const Deck&, const Schedule&, - const Eclipse3DProperties&, const ParseContext&, std::array< int, 3 > ); - SummaryConfig( const Deck&, const Schedule&, - const Eclipse3DProperties&, const ParseContext&, int, int, int ); - - const_iterator begin() const; - const_iterator end() const; - - SummaryConfig& merge( const SummaryConfig& ); - SummaryConfig& merge( SummaryConfig&& ); - - /* - The hasKeyword() method will consult the internal set - 'short_keywords', i.e. the query should be based on pure - keywords like 'WWCT' and 'BPR' - and *not* fully - identifiers like 'WWCT:OPX' and 'BPR:10,12,3'. - */ - bool hasKeyword( const std::string& keyword ) const; - private: - - /* - The short_keywords set contains only the pure keyword - part, e.g. "WWCT", and not the qualification with - well/group name or a numerical value. - */ - std::vector< ERT::smspec_node > keywords; - std::set short_keywords; - }; - -} //namespace Opm - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SummaryConfig/tests/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SummaryConfig/tests/CMakeLists.txt deleted file mode 100644 index 9e6dfc3c15..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SummaryConfig/tests/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -opm_add_test(runSummaryConfigTests SOURCES SummaryConfigTests.cpp - LIBRARIES opmparser ${Boost_LIBRARIES}) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SummaryConfig/tests/SummaryConfigTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SummaryConfig/tests/SummaryConfigTests.cpp deleted file mode 100644 index ad1227d563..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/SummaryConfig/tests/SummaryConfigTests.cpp +++ /dev/null @@ -1,370 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE SummaryConfigTests - -#include - -#include -#include -#include -#include -#include - -using namespace Opm; - -static DeckPtr createDeck( const std::string& summary ) { - Opm::Parser parser; - std::string input = - "START -- 0 \n" - "10 MAI 2007 / \n" - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "DXV \n 10*400 /\n" - "DYV \n 10*400 /\n" - "DZV \n 10*400 /\n" - "TOPS \n 100*2202 / \n" - "REGIONS\n" - "FIPNUM\n" - "200*1 300*2 500*3 /\n" - "SCHEDULE\n" - "WELSPECS\n" - " \'W_1\' \'OP\' 1 1 3.33 \'OIL\' 7* / \n" - " \'WX2\' \'OP\' 2 2 3.33 \'OIL\' 7* / \n" - " \'W_3\' \'OP\' 2 5 3.92 \'OIL\' 7* / \n" - " 'PRODUCER' 'G' 5 5 2000 'GAS' /\n" - "/\n" - "COMPDAT\n" - "'PRODUCER' 5 5 1 1 'OPEN' 1* -1 0.5 / \n" - "'W_1' 3 7 2 2 'OPEN' 1* * 0.311 4332.346 2* 'X' 22.123 / \n" - "'W_1' 2 2 1 1 /\n" - "'WX2' 2 2 1 1 /\n" - "/\n" - "SUMMARY\n" - + summary; - - return parser.parseString(input, ParseContext()); -} - -static std::vector< std::string > sorted_names( const SummaryConfig& summary ) { - std::vector< std::string > ret; - for( const auto& x : summary ) { - auto wgname = x.wgname(); - if(wgname) - ret.push_back( x.wgname() ); - } - - std::sort( ret.begin(), ret.end() ); - return ret; -} - -static std::vector< std::string > sorted_keywords( const SummaryConfig& summary ) { - std::vector< std::string > ret; - for( const auto& x : summary ) - ret.push_back( x.keyword() ); - - std::sort( ret.begin(), ret.end() ); - return ret; -} - -static std::vector< std::string > sorted_key_names( const SummaryConfig& summary ) { - std::vector< std::string > ret; - for( const auto& x : summary ) { - ret.push_back( x.key1() ); - } - - std::sort( ret.begin(), ret.end() ); - return ret; -} - -static SummaryConfig createSummary( std::string input , const ParseContext& parseContext = ParseContext()) { - auto deck = createDeck( input ); - EclipseState state( *deck, parseContext ); - return state.getEclipseConfig().getSummaryConfig(); -} - -BOOST_AUTO_TEST_CASE(wells_all) { - const auto input = "WWCT\n/\n"; - const auto summary = createSummary( input ); - - const auto wells = { "PRODUCER", "WX2", "W_1", "W_3" }; - const auto names = sorted_names( summary ); - - BOOST_CHECK_EQUAL_COLLECTIONS( - wells.begin(), wells.end(), - names.begin(), names.end() ); -} - -BOOST_AUTO_TEST_CASE(wells_select) { - const auto input = "WWCT\n'W_1' 'WX2' /\n"; - const auto summary = createSummary( input ); - const auto wells = { "WX2", "W_1" }; - const auto names = sorted_names( summary ); - - BOOST_CHECK_EQUAL_COLLECTIONS( - wells.begin(), wells.end(), - names.begin(), names.end() ); -} - -BOOST_AUTO_TEST_CASE(wells_pattern) { - const auto input = "WWCT\n'W*' /\n"; - const auto summary = createSummary( input ); - const auto wells = { "WX2", "W_1", "W_3" }; - const auto names = sorted_names( summary ); - - BOOST_CHECK_EQUAL_COLLECTIONS( - wells.begin(), wells.end(), - names.begin(), names.end() ); -} - -BOOST_AUTO_TEST_CASE(fields) { - const auto input = "FOPT\n"; - const auto summary = createSummary( input ); - const auto keywords = { "FOPT" }; - const auto names = sorted_keywords( summary ); - - BOOST_CHECK_EQUAL_COLLECTIONS( - keywords.begin(), keywords.end(), - names.begin(), names.end() ); -} - -BOOST_AUTO_TEST_CASE(blocks) { - const auto input = "BPR\n" - "3 3 6 /\n" - "4 3 6 /\n" - "/"; - const auto summary = createSummary( input ); - const auto keywords = { "BPR", "BPR" }; - const auto names = sorted_keywords( summary ); - - BOOST_CHECK_EQUAL_COLLECTIONS( - keywords.begin(), keywords.end(), - names.begin(), names.end() ); -} - -BOOST_AUTO_TEST_CASE(regions) { - const auto input = "ROIP\n" - "1 2 3 /\n" - "RWIP\n" - "/\n" - "RGIP\n" - "1 2 /\n"; - - const auto summary = createSummary( input ); - const auto keywords = { "RGIP", "RGIP", - "ROIP", "ROIP", "ROIP", - "RWIP", "RWIP", "RWIP" }; - const auto names = sorted_keywords( summary ); - - BOOST_CHECK_EQUAL_COLLECTIONS( - keywords.begin(), keywords.end(), - names.begin(), names.end() ); -} - -BOOST_AUTO_TEST_CASE(completions) { - const auto input = "CWIR\n" // all specified - "'PRODUCER' /\n" - "'WX2' 1 1 1 /\n" - "'WX2' 2 2 1 /\n" - "/\n" - "CWIT\n" // block defaulted - "'W_1' /\n" - "/\n" - "CGIT\n" // well defaulted - "* 2 2 1 /\n" - "/\n" - "CGIR\n" // all defaulted - " '*' /\n" - "/\n"; - - const auto summary = createSummary( input ); - const auto keywords = { "CGIR", "CGIR", "CGIR", "CGIR", - "CGIT", "CGIT", - "CWIR", "CWIR", - "CWIT", "CWIT" }; - const auto names = sorted_keywords( summary ); - - BOOST_CHECK_EQUAL_COLLECTIONS( - keywords.begin(), keywords.end(), - names.begin(), names.end() ); - -} - -BOOST_AUTO_TEST_CASE( merge ) { - const auto input1 = "WWCT\n/\n"; - auto summary1 = createSummary( input1 ); - - const auto keywords = { "FOPT", "WWCT", "WWCT", "WWCT", "WWCT" }; - const auto wells = { "PRODUCER", "WX2", "W_1", "W_3" }; - - const auto input2 = "FOPT\n"; - const auto summary2 = createSummary( input2 ); - - summary1.merge( summary2 ); - const auto kw_names = sorted_keywords( summary1 ); - const auto well_names = sorted_names( summary1 ); - - BOOST_CHECK_EQUAL_COLLECTIONS( - keywords.begin(), keywords.end(), - kw_names.begin(), kw_names.end() ); - - BOOST_CHECK_EQUAL_COLLECTIONS( - wells.begin(), wells.end(), - well_names.begin(), well_names.end() ); -} - -BOOST_AUTO_TEST_CASE( merge_move ) { - const auto input = "WWCT\n/\n"; - auto summary = createSummary( input ); - - const auto keywords = { "FOPT", "WWCT", "WWCT", "WWCT", "WWCT" }; - const auto wells = { "PRODUCER", "WX2", "W_1", "W_3" }; - - summary.merge( createSummary( "FOPT\n" ) ); - - const auto kw_names = sorted_keywords( summary ); - const auto well_names = sorted_names( summary ); - - BOOST_CHECK_EQUAL_COLLECTIONS( - keywords.begin(), keywords.end(), - kw_names.begin(), kw_names.end() ); - - BOOST_CHECK_EQUAL_COLLECTIONS( - wells.begin(), wells.end(), - well_names.begin(), well_names.end() ); -} - -static const auto ALL_keywords = { - "FAQR", "FAQRG", "FAQT", "FAQTG", "FGIP", "FGIPG", "FGIPL", - "FGIR", "FGIT", "FGOR", "FGPR", "FGPT", "FOIP", "FOIPG", - "FOIPL", "FOIR", "FOIT", "FOPR", "FOPT", "FPR", "FVIR", - "FVIT", "FVPR", "FVPT", "FWCT", "FWGR", "FWIP", "FWIR", - "FWIT", "FWPR", "FWPT", - "GGIR", "GGIT", "GGOR", "GGPR", "GGPT", "GOIR", "GOIT", - "GOPR", "GOPT", "GVIR", "GVIT", "GVPR", "GVPT", "GWCT", - "GWGR", "GWIR", "GWIT", "GWPR", "GWPT", - "WBHP", "WGIR", "WGIT", "WGOR", "WGPR", "WGPT", "WOIR", - "WOIT", "WOPR", "WOPT", "WPI", "WTHP", "WVIR", "WVIT", - "WVPR", "WVPT", "WWCT", "WWGR", "WWIR", "WWIT", "WWPR", - "WWPT", - // ALL will not expand to these keywords yet - "AAQR", "AAQRG", "AAQT", "AAQTG" -}; - - -BOOST_AUTO_TEST_CASE(summary_ALL) { - - const auto input = "ALL\n"; - - const auto summary = createSummary( input ); - const auto key_names = sorted_key_names( summary ); - - std::vector all; - - for( std::string keyword: ALL_keywords ) { - if(keyword[0]=='F') { - all.push_back(keyword); - } - else if (keyword[0]=='G') { - auto kn = keyword + ":"; - all.push_back(kn + "G"); - all.push_back(kn + "OP"); - all.push_back(kn + "FIELD"); - } - else if (keyword[0]=='W') { - auto kn = keyword + ":"; - all.push_back(kn + "W_1"); - all.push_back(kn + "WX2"); - all.push_back(kn + "W_3"); - all.push_back(kn + "PRODUCER"); - } - } - - std::sort(all.begin(), all.end()); - - BOOST_CHECK_EQUAL_COLLECTIONS( - all.begin(), all.end(), - key_names.begin(), key_names.end()); - - BOOST_CHECK_EQUAL( true , summary.hasKeyword( "FOPT")); - BOOST_CHECK_EQUAL( true , summary.hasKeyword( "GGIT")); - BOOST_CHECK_EQUAL( true , summary.hasKeyword( "WWCT")); - - BOOST_CHECK_EQUAL( false , summary.hasKeyword("NO-NOT-THIS")); -} - - - -BOOST_AUTO_TEST_CASE(INVALID_WELL1) { - ParseContext parseContext; - const auto input = "CWIR\n" - "NEW-WELL /\n" - "/\n"; - parseContext.updateKey( ParseContext::SUMMARY_UNKNOWN_WELL , InputError::THROW_EXCEPTION ); - BOOST_CHECK_THROW( createSummary( input , parseContext ) , std::invalid_argument); - - parseContext.updateKey( ParseContext::SUMMARY_UNKNOWN_WELL , InputError::IGNORE ); - BOOST_CHECK_NO_THROW( createSummary( input , parseContext )); -} - - -BOOST_AUTO_TEST_CASE(INVALID_WELL2) { - ParseContext parseContext; - const auto input = "WWCT\n" - " NEW-WELL /\n"; - parseContext.updateKey( ParseContext::SUMMARY_UNKNOWN_WELL , InputError::THROW_EXCEPTION ); - BOOST_CHECK_THROW( createSummary( input , parseContext ) , std::invalid_argument); - - parseContext.updateKey( ParseContext::SUMMARY_UNKNOWN_WELL , InputError::IGNORE ); - BOOST_CHECK_NO_THROW( createSummary( input , parseContext )); -} - - -BOOST_AUTO_TEST_CASE(INVALID_GROUP) { - ParseContext parseContext; - const auto input = "GWCT\n" - " NEW-GR /\n"; - parseContext.updateKey( ParseContext::SUMMARY_UNKNOWN_GROUP , InputError::THROW_EXCEPTION ); - BOOST_CHECK_THROW( createSummary( input , parseContext ) , std::invalid_argument); - - parseContext.updateKey( ParseContext::SUMMARY_UNKNOWN_GROUP , InputError::IGNORE ); - BOOST_CHECK_NO_THROW( createSummary( input , parseContext )); -} - -BOOST_AUTO_TEST_CASE( REMOVE_DUPLICATED_ENTRIES ) { - ParseContext parseContext; - const auto input = "WGPR \n/\n" - "WGPR \n/\n" - "ALL\n"; - - const auto summary = createSummary( input ); - const auto keys = sorted_key_names( summary ); - auto uniq_keys = keys; - uniq_keys.erase( std::unique( uniq_keys.begin(), - uniq_keys.end(), - std::equal_to< std::string >() ), - uniq_keys.end() ); - - BOOST_CHECK_EQUAL_COLLECTIONS( - keys.begin(), keys.end(), - uniq_keys.begin(), uniq_keys.end() ); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/ColumnSchema.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/ColumnSchema.cpp deleted file mode 100644 index dae6e90d09..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/ColumnSchema.cpp +++ /dev/null @@ -1,117 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include - -#include - -namespace Opm { - - ColumnSchema::ColumnSchema(const std::string& nm, Table::ColumnOrderEnum order, Table::DefaultAction defaultAction) : - m_name( nm ), - m_order( order ), - m_defaultAction( defaultAction ) - { - - } - - - ColumnSchema::ColumnSchema(const std::string& nm, Table::ColumnOrderEnum order, double defaultValue ) : - m_name( nm ), - m_order( order ), - m_defaultAction( Table::DEFAULT_CONST ), - m_defaultValue( defaultValue ) - { - } - - const std::string& ColumnSchema::name() const { - return m_name; - } - - - bool ColumnSchema::validOrder( double value1 , double value2) const { - switch (m_order) { - case Table::RANDOM: - return true; - break; - case Table::INCREASING: - return (value2 >= value1); - break; - case Table::STRICTLY_INCREASING: - return (value2 > value1); - break; - case Table::DECREASING: - return (value2 <= value1); - break; - case Table::STRICTLY_DECREASING: - return (value2 < value1); - break; - default: - throw std::invalid_argument("Internal error - should not be here\n"); - } - } - - bool ColumnSchema::lookupValid( ) const { - if (m_order == Table::RANDOM) - return false; - else - return true; - } - - - bool ColumnSchema::acceptsDefault( ) const { - if (m_defaultAction == Table::DEFAULT_NONE) - return false; - else - return true; - } - - - bool ColumnSchema::isIncreasing( ) const { - if ((m_order == Table::INCREASING) || (m_order == Table::STRICTLY_INCREASING)) - return true; - else - return false; - } - - bool ColumnSchema::isDecreasing( ) const { - if ((m_order == Table::DECREASING) || (m_order == Table::STRICTLY_DECREASING)) - return true; - else - return false; - } - - - Table::DefaultAction ColumnSchema::getDefaultMode( ) const { - return m_defaultAction; - } - - - double ColumnSchema::getDefaultValue( ) const { - if (m_defaultAction == Table::DEFAULT_CONST) - return m_defaultValue; - else - throw std::invalid_argument("Column must be configured with constant default when using this method"); - } - -} - - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/ColumnSchema.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/ColumnSchema.hpp deleted file mode 100644 index 91aa299a00..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/ColumnSchema.hpp +++ /dev/null @@ -1,52 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - -#ifndef OPM_COLUMN_SCHEMA_HPP -#define OPM_COLUMN_SCHEMA_HPP - -#include -#include - -#include - -namespace Opm { - - class ColumnSchema { - public: - ColumnSchema(const std::string& name , Table::ColumnOrderEnum order, Table::DefaultAction defaultAction); - ColumnSchema(const std::string& name , Table::ColumnOrderEnum order, double defaultValue); - const std::string& name() const; - bool validOrder( double value1 , double value2) const; - bool lookupValid( ) const; - bool acceptsDefault( ) const; - bool isIncreasing( ) const; - bool isDecreasing( ) const; - Table::DefaultAction getDefaultMode( ) const; - double getDefaultValue( ) const; - private: - std::string m_name; - Table::ColumnOrderEnum m_order; - Table::DefaultAction m_defaultAction; - double m_defaultValue; - }; -} - -#endif - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/EnkrvdTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/EnkrvdTable.hpp deleted file mode 100644 index d3163d0319..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/EnkrvdTable.hpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - Copyright (C) 2014 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_ENKRVD_TABLE_HPP -#define OPM_PARSER_ENKRVD_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class EnkrvdTable : public SimpleTable { - public: - - EnkrvdTable( const DeckItem& item ); - - - // using this method is strongly discouraged but the current endpoint scaling - // code makes it hard to avoid - using SimpleTable::getColumn; - - /*! - * \brief The datum depth for the remaining columns - */ - const TableColumn& getDepthColumn() const; - - /*! - * \brief Maximum relative permeability of water - */ - const TableColumn& getKrwmaxColumn() const; - - /*! - * \brief Maximum relative permeability of gas - */ - const TableColumn& getKrgmaxColumn() const; - - /*! - * \brief Maximum relative permeability of oil - */ - const TableColumn& getKromaxColumn() const; - - /*! - * \brief Relative permeability of water at the critical oil (or gas) saturation - */ - const TableColumn& getKrwcritColumn() const; - - /*! - * \brief Relative permeability of gas at the critical oil (or water) saturation - */ - const TableColumn& getKrgcritColumn() const; - - /*! - * \brief Oil relative permeability of oil at the critical gas saturation - */ - const TableColumn& getKrocritgColumn() const; - - /*! - * \brief Oil relative permeability of oil at the critical water saturation - */ - const TableColumn& getKrocritwColumn() const; - }; -} - -#endif - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/EnptvdTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/EnptvdTable.hpp deleted file mode 100644 index d45c61b5aa..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/EnptvdTable.hpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - Copyright (C) 2014 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_ENPTVD_TABLE_HPP -#define OPM_PARSER_ENPTVD_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class EnptvdTable : public SimpleTable { - public: - EnptvdTable( const DeckItem& item ); - - // using this method is strongly discouraged but the current endpoint scaling - // code makes it hard to avoid - using SimpleTable::getColumn; - - const TableColumn& getDepthColumn() const; - - /*! - * \brief Connate water saturation - */ - const TableColumn& getSwcoColumn() const; - - /*! - * \brief Critical water saturation - */ - const TableColumn& getSwcritColumn() const; - - /*! - * \brief Maximum water saturation - */ - const TableColumn& getSwmaxColumn() const; - - /*! - * \brief Connate gas saturation - */ - const TableColumn& getSgcoColumn() const; - - /*! - * \brief Critical gas saturation - */ - const TableColumn& getSgcritColumn() const; - - /*! - * \brief Maximum gas saturation - */ - const TableColumn& getSgmaxColumn() const; - - /*! - * \brief Critical oil-in-water saturation - */ - const TableColumn& getSowcritColumn() const; - - /*! - * \brief Critical oil-in-gas saturation - */ - const TableColumn& getSogcritColumn() const; - }; -} - -#endif - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/Eqldims.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/Eqldims.hpp deleted file mode 100644 index bf3d0c9574..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/Eqldims.hpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef EQLDIMS_HPP -#define EQLDIMS_HPP - -/* - The Eqldims class is a small utility class designed to hold on to - the values from the EQLDIMS keyword. -*/ - -#include - -namespace Opm { - class Eqldims { - public: - - Eqldims() : - m_ntequl( ParserKeywords::EQLDIMS::NTEQUL::defaultValue ), - m_depth_nodes_p( ParserKeywords::EQLDIMS::DEPTH_NODES_P::defaultValue ), - m_depth_nodes_tab( ParserKeywords::EQLDIMS::DEPTH_NODES_TAB::defaultValue ), - m_nttrvd( ParserKeywords::EQLDIMS::NTTRVD::defaultValue ), - m_nstrvd( ParserKeywords::EQLDIMS::NSTRVD::defaultValue ) - { } - - - Eqldims( size_t ntequl , size_t depth_nodes_p , size_t depth_nodes_tab , size_t nttrvd , size_t nstrvd) : - m_ntequl( ntequl ), - m_depth_nodes_p( depth_nodes_p ), - m_depth_nodes_tab( depth_nodes_tab ), - m_nttrvd( nttrvd ), - m_nstrvd( nstrvd ) - { } - - size_t getNumEquilRegions() const - { - return m_ntequl; - } - - size_t getNumDepthNodesP() const - { - return m_depth_nodes_p; - } - - - size_t getNumDepthNodesTable() const - { - return m_depth_nodes_tab; - } - - size_t getNumTracerTables() const - { - return m_nttrvd; - } - - size_t getNumDepthNodesTracer() const - { - return m_nstrvd; - } - private: - size_t m_ntequl , m_depth_nodes_p , m_depth_nodes_tab , m_nttrvd , m_nstrvd; - - }; -} - - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/GasvisctTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/GasvisctTable.hpp deleted file mode 100644 index f75256741d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/GasvisctTable.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - Copyright (C) 2015 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef OPM_PARSER_GASVISCT_TABLE_HPP -#define OPM_PARSER_GASVISCT_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class Deck; - class DeckItem; - - class GasvisctTable : public SimpleTable { - public: - GasvisctTable( const Deck& deck, const DeckItem& deckItem ); - - const TableColumn& getTemperatureColumn() const; - const TableColumn& getGasViscosityColumn(size_t compIdx) const; - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/ImkrvdTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/ImkrvdTable.hpp deleted file mode 100644 index c40b2a7b0b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/ImkrvdTable.hpp +++ /dev/null @@ -1,74 +0,0 @@ -/* - Copyright (C) 2014 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_IMKRVD_TABLE_HPP -#define OPM_PARSER_IMKRVD_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class ImkrvdTable : public SimpleTable { - public: - ImkrvdTable( const DeckItem& item ); - - /*! - * \brief The datum depth for the remaining columns - */ - const TableColumn& getDepthColumn() const; - - /*! - * \brief Maximum relative permeability of water - */ - const TableColumn& getKrwmaxColumn() const; - - /*! - * \brief Maximum relative permeability of gas - */ - const TableColumn& getKrgmaxColumn() const; - - /*! - * \brief Maximum relative permeability of oil - */ - const TableColumn& getKromaxColumn() const; - - /*! - * \brief Relative permeability of water at the critical oil (or gas) saturation - */ - const TableColumn& getKrwcritColumn() const; - - /*! - * \brief Relative permeability of gas at the critical oil (or water) saturation - */ - const TableColumn& getKrgcritColumn() const; - - /*! - * \brief Oil relative permeability of oil at the critical gas saturation - */ - const TableColumn& getKrocritgColumn() const; - - /*! - * \brief Oil relative permeability of oil at the critical water saturation - */ - const TableColumn& getKrocritwColumn() const; - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/ImptvdTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/ImptvdTable.hpp deleted file mode 100644 index 707816b4f6..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/ImptvdTable.hpp +++ /dev/null @@ -1,80 +0,0 @@ -/* - Copyright (C) 2014 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef OPM_PARSER_IMPTVD_TABLE_HPP -#define OPM_PARSER_IMPTVD_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class ImptvdTable : public SimpleTable { - public: - - ImptvdTable( const DeckItem& item ); - - const TableColumn& getDepthColumn() const; - - /*! - * \brief Connate water saturation - */ - const TableColumn& getSwcoColumn() const; - - /*! - * \brief Critical water saturation - */ - const TableColumn& getSwcritColumn() const; - - /*! - * \brief Maximum water saturation - */ - const TableColumn& getSwmaxColumn() const; - - /*! - * \brief Connate gas saturation - */ - const TableColumn& getSgcoColumn() const; - - /*! - * \brief Critical gas saturation - */ - const TableColumn& getSgcritColumn() const; - - /*! - * \brief Maximum gas saturation - */ - const TableColumn& getSgmaxColumn() const; - - /*! - * \brief Critical oil-in-water saturation - */ - const TableColumn& getSowcritColumn() const; - - /*! - * \brief Critical oil-in-gas saturation - */ - const TableColumn& getSogcritColumn() const; - - }; -} - -#endif - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/MiscTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/MiscTable.hpp deleted file mode 100644 index 06e8b20dbb..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/MiscTable.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA. - 2015 IRIS AS - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_MISC_TABLE_HPP -#define OPM_PARSER_MISC_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class MiscTable : public SimpleTable { - public: - MiscTable( const DeckItem& item ); - - const TableColumn& getSolventFractionColumn() const; - const TableColumn& getMiscibilityColumn() const; - - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/MsfnTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/MsfnTable.hpp deleted file mode 100644 index 9fb1a2812e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/MsfnTable.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA. - 2015 IRIS AS - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_MSFN_TABLE_HPP -#define OPM_PARSER_MSFN_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class MsfnTable : public SimpleTable { - public: - MsfnTable( const DeckItem& item ); - - const TableColumn& getGasPhaseFractionColumn() const; - const TableColumn& getGasSolventRelpermMultiplierColumn() const; - const TableColumn& getOilRelpermMultiplierColumn() const; - - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/OilvisctTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/OilvisctTable.hpp deleted file mode 100644 index 2f7d738480..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/OilvisctTable.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/* - Copyright (C) 2015 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_OILVISCT_TABLE_HPP -#define OPM_PARSER_OILVISCT_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class OilvisctTable : public SimpleTable { - public: - OilvisctTable( const DeckItem& item ); - - const TableColumn& getTemperatureColumn() const; - const TableColumn& getOilViscosityColumn() const; - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PlyadsTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PlyadsTable.hpp deleted file mode 100644 index 0c9b9dc34b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PlyadsTable.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/* - Copyright (C) 2014 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_PLYADS_TABLE_HPP -#define OPM_PARSER_PLYADS_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class PlyadsTable : public SimpleTable { - public: - PlyadsTable( const DeckItem& item ); - - const TableColumn& getPolymerConcentrationColumn() const; - const TableColumn& getAdsorbedPolymerColumn() const; - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PlydhflfTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PlydhflfTable.hpp deleted file mode 100644 index 37efd2b9de..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PlydhflfTable.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_PLYDHFLF_TABLE_HPP -#define OPM_PARSER_PLYDHFLF_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class PlydhflfTable : public SimpleTable { - public: - - PlydhflfTable( const DeckItem& item ); - - const TableColumn& getTemperatureColumn() const; - const TableColumn& getPolymerHalflifeColumn() const; - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PlymaxTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PlymaxTable.hpp deleted file mode 100644 index f2d09480f5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PlymaxTable.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright (C) 2014 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_PLYMAX_TABLE_HPP -#define OPM_PARSER_PLYMAX_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckRecord; - - class PlymaxTable : public SimpleTable { - public: - - PlymaxTable( const DeckRecord& record ); - - const TableColumn& getPolymerConcentrationColumn() const; - const TableColumn& getMaxPolymerConcentrationColumn() const; - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PlyrockTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PlyrockTable.hpp deleted file mode 100644 index 6ee2ddf916..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PlyrockTable.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/* - Copyright (C) 2014 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_PLYROCK_TABLE_HPP -#define OPM_PARSER_PLYROCK_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class PlyrockTable : public SimpleTable { - public: - - // This is not really a table; every column has only one element. - PlyrockTable( const DeckRecord& record ); - - // since this keyword is not necessarily monotonic, it cannot be evaluated! - //using SimpleTable::evaluate; - - const TableColumn& getDeadPoreVolumeColumn() const; - const TableColumn& getResidualResistanceFactorColumn() const; - const TableColumn& getRockDensityFactorColumn() const; - - // is column is actually an integer, but this is not yet - // supported by opm-parser (yet?) as it would require quite a - // few changes in the table support classes (read: it would - // probably require a lot of template vodoo) and some in the - // JSON-to-C conversion code. In the meantime, the index is - // just a double which can be converted to an integer in the - // calling code. (Make sure, that you don't interpolate - // indices, though!) - const TableColumn& getAdsorbtionIndexColumn() const; - const TableColumn& getMaxAdsorbtionColumn() const; - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PlyshlogTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PlyshlogTable.hpp deleted file mode 100644 index 2ba8206fcf..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PlyshlogTable.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_PLYSHLOG_TABLE_HPP -#define OPM_PARSER_PLYSHLOG_TABLE_HPP - -#include -#include "SimpleTable.hpp" - - -namespace Opm { - - class DeckRecord; - class TableManager; - - class PlyshlogTable : public SimpleTable { - public: - friend class TableManager; - - PlyshlogTable(const DeckRecord& indexRecord, const DeckRecord& dataRecord); - - double getRefPolymerConcentration() const; - double getRefSalinity() const; - double getRefTemperature() const; - void setRefPolymerConcentration(const double refPlymerConcentration); - void setRefSalinity(const double refSalinity); - void setRefTemperature(const double refTemperature); - bool hasRefSalinity() const; - bool hasRefTemperature() const; - void setHasRefSalinity(const bool has); - void setHasRefTemperature(const bool has); - const TableColumn& getWaterVelocityColumn() const; - const TableColumn& getShearMultiplierColumn() const; - - private: - double m_refPolymerConcentration; - double m_refSalinity; - double m_refTemperature; - - bool m_hasRefSalinity; - bool m_hasRefTemperature; - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PlyviscTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PlyviscTable.hpp deleted file mode 100644 index df5f34a373..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PlyviscTable.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/* - Copyright (C) 2014 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_PLYVISC_TABLE_HPP -#define OPM_PARSER_PLYVISC_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class PlyviscTable : public SimpleTable { - public: - PlyviscTable( const DeckItem& item ); - - const TableColumn& getPolymerConcentrationColumn() const; - const TableColumn& getViscosityMultiplierColumn() const; - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PmiscTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PmiscTable.hpp deleted file mode 100644 index 1d1e106176..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PmiscTable.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA. - 2015 IRIS AS - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_PMISC_TABLE_HPP -#define OPM_PARSER_PMISC_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class PmiscTable : public SimpleTable { - public: - - PmiscTable( const DeckItem& item ); - - const TableColumn& getOilPhasePressureColumn() const; - const TableColumn& getMiscibilityColumn() const; - - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PvdgTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PvdgTable.hpp deleted file mode 100644 index 996eb43a4b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PvdgTable.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright (C) 2014 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_PVDG_TABLE_HPP -#define OPM_PARSER_PVDG_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class PvdgTable : public SimpleTable { - public: - PvdgTable( const DeckItem& item ); - - const TableColumn& getPressureColumn() const; - const TableColumn& getFormationFactorColumn() const; - const TableColumn& getViscosityColumn() const; - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PvdoTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PvdoTable.hpp deleted file mode 100644 index d046c493f5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PvdoTable.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - Copyright (C) 2014 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_PVDO_TABLE_HPP -#define OPM_PARSER_PVDO_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class PvdoTable : public SimpleTable { - public: - - PvdoTable( const DeckItem& item ); - - const TableColumn& getPressureColumn() const; - const TableColumn& getFormationFactorColumn() const; - const TableColumn& getViscosityColumn() const; - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PvdsTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PvdsTable.hpp deleted file mode 100644 index 2fcf096c5e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PvdsTable.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - Copyright 2015 IRIS AS - - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_PVDS_TABLE_HPP -#define OPM_PARSER_PVDS_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class PvdsTable : public SimpleTable { - public: - PvdsTable( const DeckItem& item ); - - const TableColumn& getPressureColumn() const; - const TableColumn& getFormationFactorColumn() const; - const TableColumn& getViscosityColumn() const; - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PvtgTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PvtgTable.hpp deleted file mode 100644 index cede8328b0..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PvtgTable.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/* - Copyright (C) 2013 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_PVTG_TABLE_HPP -#define OPM_PARSER_PVTG_TABLE_HPP - -#include - -namespace Opm { - - class DeckKeyword; - - class PvtgTable : public PvtxTable { - public: - PvtgTable( const DeckKeyword& keyword, size_t tableIdx); - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PvtoTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PvtoTable.hpp deleted file mode 100644 index 694dc19e0b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PvtoTable.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/* - Copyright (C) 2014 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_PVTO_TABLE_HPP -#define OPM_PARSER_PVTO_TABLE_HPP - -#include - -namespace Opm { - - class DeckKeyword; - - class PvtoTable : public PvtxTable { - public: - PvtoTable(const DeckKeyword& keyword, size_t tableIdx); - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PvtxTable.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PvtxTable.cpp deleted file mode 100644 index 3ca790ce79..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PvtxTable.cpp +++ /dev/null @@ -1,143 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include -#include -#include -#include - -namespace Opm { - - PvtxTable::PvtxTable(const std::string& columnName) : - m_outerColumnSchema( columnName , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE ), - m_outerColumn( m_outerColumnSchema ) - { - - } - - - - /* - The Schema pointers m_saturatedSchema and m_underSaturatedSchema must - have been explicitly set before calling this method. - */ - - void PvtxTable::init( const DeckKeyword& keyword, size_t tableIdx) { - auto ranges = recordRanges( keyword ); - if (tableIdx >= ranges.size()) - throw std::invalid_argument("Asked for table: " + std::to_string( tableIdx ) + " in keyword + " + keyword.name() + " which only has " + std::to_string( ranges.size() ) + " tables"); - - { - auto range = ranges[ tableIdx ]; - for (size_t rowIdx = range.first; rowIdx < range.second; rowIdx++) { - const auto& deckRecord = keyword.getRecord(rowIdx); - m_outerColumn.addValue( deckRecord.getItem( 0 ).getSIDouble( 0 )); - - const auto& dataItem = deckRecord.getItem(1); - std::shared_ptr underSaturatedTable = std::make_shared(m_underSaturatedSchema , dataItem); - m_underSaturatedTables.push_back( underSaturatedTable ); - } - - - m_saturatedTable = std::make_shared(m_saturatedSchema); - for (size_t sat_index = 0; sat_index < size(); sat_index++) { - const auto& underSaturatedTable = getUnderSaturatedTable( sat_index ); - std::vector row(4); - row[0] = m_outerColumn[sat_index]; - for (size_t col_index = 0; col_index < m_underSaturatedSchema->size(); col_index++) - row[col_index + 1] = underSaturatedTable.get( col_index , 0 ); - - m_saturatedTable->addRow( row ); - } - } - } - - - double PvtxTable::evaluate(const std::string& column, double outerArg, double innerArg) const - { - TableIndex outerIndex = m_outerColumn.lookup( outerArg ); - const auto& underSaturatedTable1 = getUnderSaturatedTable( outerIndex.getIndex1( ) ); - double weight1 = outerIndex.getWeight1( ); - double value = weight1 * underSaturatedTable1.evaluate( column , innerArg ); - - if (weight1 < 1) { - const auto& underSaturatedTable2 = getUnderSaturatedTable( outerIndex.getIndex2( ) ); - double weight2 = outerIndex.getWeight2( ); - - value += weight2 * underSaturatedTable2.evaluate( column , innerArg ); - } - - return value; - } - - - const SimpleTable& PvtxTable::getSaturatedTable() const { - return *m_saturatedTable; - } - - - - const SimpleTable& PvtxTable::getUnderSaturatedTable(size_t tableNumber) const { - if (tableNumber >= size()) - throw std::invalid_argument("Invalid table number: " + std::to_string( tableNumber) + " max: " + std::to_string( size() - 1 )); - return *m_underSaturatedTables[ tableNumber ]; - } - - - size_t PvtxTable::size() const - { - return m_outerColumn.size(); - } - - - size_t PvtxTable::numTables( const DeckKeyword& keyword ) - { - auto ranges = recordRanges(keyword); - return ranges.size(); - } - - - std::vector > PvtxTable::recordRanges( const DeckKeyword& keyword ) { - std::vector > ranges; - size_t startRecord = 0; - size_t recordIndex = 0; - while (recordIndex < keyword.size()) { - const auto& item = keyword.getRecord(recordIndex).getItem(0); - if (item.size( ) == 0) { - ranges.push_back( std::make_pair( startRecord , recordIndex ) ); - startRecord = recordIndex + 1; - } - recordIndex++; - } - ranges.push_back( std::make_pair( startRecord , recordIndex ) ); - return ranges; - } - - - double PvtxTable::getArgValue(size_t index) const { - if (index < m_outerColumn.size()) - return m_outerColumn[index]; - else - throw std::invalid_argument("Invalid index"); - } - -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PvtxTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PvtxTable.hpp deleted file mode 100644 index d2dfd1490b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/PvtxTable.hpp +++ /dev/null @@ -1,137 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_PVTX_TABLE_HPP -#define OPM_PARSER_PVTX_TABLE_HPP - -#include - -#include -#include - -/* - This class is a common base class for the PVTG and PVTO tables. The - PVTO and PVTG keywords have a quite complex structure. The structure - consists of alternating records of saturated data and corresponding - undersaturated tables, this structure is again repeated for the - different satnum regions. - - - PVTO - --- RSO PRESSURE B-OIL VISCOSITY --- (BAR) (CP) - - [ 20.59 { 50.00 1.10615 1.180 } ] \ - { 75.00 1.10164 1.247 } | - { 100.00 1.09744 1.315 } | - { 125.00 1.09351 1.384 } | - { 150.00 1.08984 1.453 }/ | - | - [ 28.19 { 70.00 1.12522 1.066 } ] | - { 95.00 1.12047 1.124 } | - { 120.00 1.11604 1.182 } |-- Satnum region 1 - { 145.00 1.11191 1.241 } | - { 170.00 1.10804 1.300 }/ | - | - [ 36.01 { 90.00 1.14458 0.964 } ] | - { 115.00 1.13959 1.014 } | - { 140.00 1.13494 1.064 } | - { 165.00 1.13060 1.115 } | - { 190.00 1.12653 1.166 }/ | -/ / - 404.60 594.29 1.97527 0.21564 \ - 619.29 1.96301 0.21981 | - 644.29 1.95143 0.22393 |-- Satnum region 2 - 669.29 1.94046 0.22801 | - 694.29 1.93005 0.23204 / | -/ / - 404.60 594.29 1.97527 0.21564 \ - 619.29 1.96301 0.21981 | - 644.29 1.95143 0.22393 | - 669.29 1.94046 0.22801 | - 694.29 1.93005 0.23204 / |-- Satnum region 3 - 404.60 594.29 1.97527 0.21564 | - 619.29 1.96301 0.21981 | - 644.29 1.95143 0.22393 | - 669.29 1.94046 0.22801 | - 694.29 1.93005 0.23204 / / -/ - - -In satnum region1 the saturated records are marked with [ ... ], and -the corresponding undersaturated tables are marked with { ... }. So -for satnum region1 the table of saturated properties looks like: - - RSO PRESSURE B-OIL VISCOSITY - 20.59 50.00 1.10615 1.180 - 28.19 70.00 1.12522 1.066 - 36.01 90.00 1.14458 0.964 - -In the PvtxTable class this table is available as the method -getSaturatedTable( ). For each RS value there is a table of -undersaturated properties; since the saturated table for region1 has -three rows there are three such tables, these tables are available as -getUnderSaturatedTable( index ). In this particular example the first -undersaturated table looks like: - - PRESSURE B-OIL VISCOSITY - 50.00 1.10615 1.180 - 75.00 1.10164 1.247 - 100.00 1.09744 1.315 - 125.00 1.09351 1.384 - 150.00 1.08984 1.453 - -The first row actually corresponds to saturated values. -*/ - - - namespace Opm { - - class DeckKeyword; - class SimpleTable; - class TableSchema; - - class PvtxTable - { - - public: - static size_t numTables( const DeckKeyword& keyword); - static std::vector > recordRanges( const DeckKeyword& keyword); - - PvtxTable(const std::string& columnName); - const SimpleTable& getUnderSaturatedTable(size_t tableNumber) const; - void init(const DeckKeyword& keyword, size_t tableIdx); - size_t size() const; - double evaluate(const std::string& column, double outerArg, double innerArg) const; - double getArgValue(size_t index) const; - const SimpleTable& getSaturatedTable() const; - - protected: - ColumnSchema m_outerColumnSchema; - TableColumn m_outerColumn; - - std::shared_ptr m_underSaturatedSchema; - std::shared_ptr m_saturatedSchema; - std::vector > m_underSaturatedTables; - std::shared_ptr m_saturatedTable; - }; - -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/Regdims.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/Regdims.hpp deleted file mode 100644 index e7d55f60d8..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/Regdims.hpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANREGILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef REGDIMS_HPP -#define REGDIMS_HPP - -/* - The Regdims class is a small utility class designed to hold on to - the values from the REGDIMS keyword. -*/ - -#include - -namespace Opm { - class Regdims { - public: - - Regdims() : - m_NTFIP( ParserKeywords::REGDIMS::NTFIP::defaultValue ), - m_NMFIPR( ParserKeywords::REGDIMS::NMFIPR::defaultValue ), - m_NRFREG( ParserKeywords::REGDIMS::NRFREG::defaultValue ), - m_NTFREG( ParserKeywords::REGDIMS::NTFREG::defaultValue ), - m_NPLMIX( ParserKeywords::REGDIMS::NPLMIX::defaultValue ) - { } - - Regdims(size_t ntfip , size_t nmfipr , size_t nrfregr , size_t ntfreg , size_t nplmix) : - m_NTFIP( ntfip ), - m_NMFIPR( nmfipr ), - m_NRFREG( nrfregr ), - m_NTFREG( ntfreg ), - m_NPLMIX( nplmix ) - {} - - size_t getNTFIP() const { - return m_NTFIP; - } - - - size_t getNMFIPR() const { - return m_NMFIPR; - } - - - size_t getNRFREG() const { - return m_NRFREG; - } - - - size_t getNTFREG() const { - return m_NTFREG; - } - - - size_t getNPLMIX() const { - return m_NPLMIX; - } - - - - - private: - size_t m_NTFIP; - size_t m_NMFIPR; - size_t m_NRFREG; - size_t m_NTFREG; - size_t m_NPLMIX; - }; -} - - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/RocktabTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/RocktabTable.hpp deleted file mode 100644 index 9d1b6d4591..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/RocktabTable.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - Copyright (C) 2014 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_ROCKTAB_TABLE_HPP -#define OPM_PARSER_ROCKTAB_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class RocktabTable : public SimpleTable { - public: - RocktabTable(const DeckItem& item, - bool isDirectional, - bool hasStressOption); - - const TableColumn& getPressureColumn() const; - const TableColumn& getPoreVolumeMultiplierColumn() const; - const TableColumn& getTransmissibilityMultiplierColumn() const; - const TableColumn& getTransmissibilityMultiplierXColumn() const; - const TableColumn& getTransmissibilityMultiplierYColumn() const; - const TableColumn& getTransmissibilityMultiplierZColumn() const; - - private: - bool m_isDirectional; - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/RsvdTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/RsvdTable.hpp deleted file mode 100644 index 4ddc23e72f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/RsvdTable.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/* - Copyright (C) 2014 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_RSVD_TABLE_HPP -#define OPM_PARSER_RSVD_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class RsvdTable : public SimpleTable { - public: - RsvdTable( const DeckItem& item ); - - const TableColumn& getDepthColumn() const; - const TableColumn& getRsColumn() const; - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/RtempvdTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/RtempvdTable.hpp deleted file mode 100644 index d442925e45..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/RtempvdTable.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/* - Copyright (C) 2014 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_RTEMPVD_TABLE_HPP -#define OPM_PARSER_RTEMPVD_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class RtempvdTable : public SimpleTable { - public: - RtempvdTable( const DeckItem& item ); - - const TableColumn& getDepthColumn() const; - const TableColumn& getTemperatureColumn() const; - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/RvvdTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/RvvdTable.hpp deleted file mode 100644 index 717920990b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/RvvdTable.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/* - Copyright (C) 2014 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_RVVD_TABLE_HPP -#define OPM_PARSER_RVVD_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class RvvdTable : public SimpleTable { - public: - RvvdTable( const DeckItem& item ); - - const TableColumn& getDepthColumn() const; - const TableColumn& getRvColumn() const; - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SgcwmisTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SgcwmisTable.hpp deleted file mode 100644 index 0803a49eed..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SgcwmisTable.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA. - 2015 IRIS AS - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_SGCWMIS_TABLE_HPP -#define OPM_PARSER_SGCWMIS_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class SgcwmisTable : public SimpleTable { - public: - SgcwmisTable( const DeckItem& item ); - - const TableColumn& getWaterSaturationColumn() const; - const TableColumn& getMiscibleResidualGasColumn() const; - - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SgfnTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SgfnTable.hpp deleted file mode 100644 index 4080c5267f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SgfnTable.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (C) 2015 IRIS AS - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_SGFN_TABLE_HPP -#define OPM_PARSER_SGFN_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class SgfnTable : public SimpleTable { - - public: - SgfnTable( const DeckItem& item ); - - const TableColumn& getSgColumn() const; - const TableColumn& getKrgColumn() const; - const TableColumn& getPcogColumn() const; - }; -} - -#endif - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SgofTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SgofTable.hpp deleted file mode 100644 index 3335d5c72b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SgofTable.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - Copyright (C) 2014 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_SGOF_TABLE_HPP -#define OPM_PARSER_SGOF_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - class DeckItem; - - class SgofTable : public SimpleTable { - - public: - SgofTable( const DeckItem& item ); - - const TableColumn& getSgColumn() const; - const TableColumn& getKrgColumn() const; - const TableColumn& getKrogColumn() const; - - // this column is p_g - p_o (non-wetting phase pressure minus - // wetting phase pressure for a given gas saturation. the name - // is inconsistent, but it is the one used in the Eclipse - // manual...) - const TableColumn& getPcogColumn() const; - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SgwfnTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SgwfnTable.hpp deleted file mode 100644 index ac47c018db..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SgwfnTable.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/* - Copyright (C) 2015 by Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_SGWFN_TABLE_HPP -#define OPM_PARSER_SGWFN_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class SgwfnTable : public SimpleTable { - - public: - SgwfnTable( const DeckItem& item ); - const TableColumn& getSgColumn() const; - const TableColumn& getKrgColumn() const; - const TableColumn& getKrgwColumn() const; - - // this column is p_g - p_w (non-wetting phase pressure minus - // wetting phase pressure for a given water saturation) - const TableColumn& getPcgwColumn() const; - }; -} - -#endif - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SimpleTable.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SimpleTable.cpp deleted file mode 100644 index d61da9eb47..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SimpleTable.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/* - Copyright (C) 2013 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#include -#include - -#include -#include -#include - -namespace Opm { - - SimpleTable::SimpleTable() - { - - } - - - SimpleTable::SimpleTable(std::shared_ptr schema , const DeckItem& deckItem) - : m_schema( schema ) - { - init(deckItem); - } - - - SimpleTable::SimpleTable(std::shared_ptr schema ) - : m_schema( schema ) - { - addColumns(); - } - - - void SimpleTable::addRow( const std::vector& row) { - if (row.size() == numColumns()) { - for (size_t colIndex = 0; colIndex < numColumns(); colIndex++) { - auto& col = getColumn( colIndex ); - col.addValue( row[colIndex] ); - } - } else - throw std::invalid_argument("Size mismatch"); - } - - - void SimpleTable::addColumns() { - for (size_t colIdx = 0; colIdx < m_schema->size(); ++colIdx) { - const auto& schemaColumn = m_schema->getColumn( colIdx ); - TableColumn column(schemaColumn); // Some move trickery here ... - m_columns.insert( schemaColumn.name() , column ); - } - } - - - double SimpleTable::get(const std::string& column , size_t row) const { - const auto& col = getColumn( column ); - return col[row]; - } - - - double SimpleTable::get(size_t column , size_t row) const { - const auto& col = getColumn( column ); - return col[row]; - } - - - -// create table from single record -void SimpleTable::init( const DeckItem& deckItem) -{ - addColumns(); - if ( (deckItem.size() % numColumns()) != 0) - throw std::runtime_error("Number of columns in the data file is" - "inconsistent with the ones specified"); - { - size_t rows = deckItem.size() / numColumns(); - for (size_t colIdx = 0; colIdx < numColumns(); ++colIdx) { - auto& column = getColumn( colIdx ); - for (size_t rowIdx = 0; rowIdx < rows; rowIdx++) { - size_t deckItemIdx = rowIdx*numColumns() + colIdx; - if (deckItem.defaultApplied(deckItemIdx)) - column.addDefault( ); - else - column.addValue( deckItem.getSIDouble(deckItemIdx) ); - } - if (colIdx > 0) - column.applyDefaults(getColumn( 0 )); - } - } -} - -size_t SimpleTable::numColumns() const { - return m_schema->size(); -} - -size_t SimpleTable::numRows() const { - const auto column0 = getColumn(0); - return column0.size(); -} - - - - const TableColumn& SimpleTable::getColumn( const std::string& name) const { - return std::forward(m_columns.get( name )); - } - - const TableColumn& SimpleTable::getColumn( size_t columnIndex ) const { - return std::forward(m_columns.get( columnIndex )); - } - - - TableColumn& SimpleTable::getColumn( const std::string& name) { - return std::forward(m_columns.get( name )); - } - - TableColumn& SimpleTable::getColumn( size_t columnIndex ) { - return std::forward(m_columns.get( columnIndex )); - } - - - bool SimpleTable::hasColumn(const std::string& name) const { - return m_schema->hasColumn( name ); - } - - double SimpleTable::evaluate(const std::string& columnName, double xPos) const - { - const auto& argColumn = getColumn( 0 ); - const auto& valueColumn = getColumn( columnName ); - - const auto index = argColumn.lookup( xPos ); - return valueColumn.eval( index ); - } - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SimpleTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SimpleTable.hpp deleted file mode 100644 index aaf04b92dd..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SimpleTable.hpp +++ /dev/null @@ -1,75 +0,0 @@ -/* - Copyright (C) 2013 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_SIMPLE_TABLE_HPP -#define OPM_PARSER_SIMPLE_TABLE_HPP - -#include -#include - -#include -#include -#include -#include - -namespace Opm { - - class DeckItem; - class TableSchema; - - class SimpleTable { - - public: - SimpleTable(const SimpleTable&) = default; - SimpleTable(); - SimpleTable(std::shared_ptr schema, const DeckItem& deckItem); - explicit SimpleTable(std::shared_ptr schema); - void addColumns(); - void init(const DeckItem& deckItem); - size_t numColumns() const; - size_t numRows() const; - void addRow( const std::vector& row); - const TableColumn& getColumn(const std::string &name) const; - const TableColumn& getColumn(size_t colIdx) const; - bool hasColumn(const std::string& name) const; - - TableColumn& getColumn(const std::string &name); - TableColumn& getColumn(size_t colIdx); - - double get(const std::string& column , size_t row) const; - double get(size_t column , size_t row) const; - /*! - * \brief Evaluate a column of the table at a given position. - * - * This method uses linear interpolation and always uses the first column as the - * X coordinate. - */ - double evaluate(const std::string& columnName, double xPos) const; - - protected: - std::map m_columnNames; - std::vector > m_valueDefaulted; - std::shared_ptr m_schema; - OrderedMap m_columns; - }; - - typedef std::shared_ptr SimpleTablePtr; - typedef std::shared_ptr SimpleTableConstPtr; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SlgofTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SlgofTable.hpp deleted file mode 100644 index 33040ab344..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SlgofTable.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - Copyright (C) 2015 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_SLGOF_TABLE_HPP -#define OPM_PARSER_SLGOF_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class SlgofTable : public SimpleTable { - - public: - SlgofTable( const DeckItem& item ); - const TableColumn& getSlColumn() const; - const TableColumn& getKrgColumn() const; - const TableColumn& getKrogColumn() const; - - // this column is p_g - p_o (non-wetting phase pressure minus - // wetting phase pressure for a given gas saturation. the name - // is inconsistent, but it is the one used in the Eclipse - // manual...) - const TableColumn& getPcogColumn() const; - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/Sof2Table.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/Sof2Table.hpp deleted file mode 100644 index 9e6686ad86..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/Sof2Table.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/* - Copyright (C) 2012 IRIS AS - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_SOF2_TABLE_HPP -#define OPM_PARSER_SOF2_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class Sof2Table : public SimpleTable { - public: - Sof2Table( const DeckItem& item ); - - const TableColumn& getSoColumn() const; - const TableColumn& getKroColumn() const; - }; -} -#endif - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/Sof3Table.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/Sof3Table.hpp deleted file mode 100644 index e3e66a2e1d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/Sof3Table.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - Copyright (C) 2015 IRIS AS - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_SOF3_TABLE_HPP -#define OPM_PARSER_SOF3_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class Sof3Table : public SimpleTable { - public: - Sof3Table( const DeckItem& item ); - - const TableColumn& getSoColumn() const; - const TableColumn& getKrowColumn() const; - const TableColumn& getKrogColumn() const; - }; -} - -#endif - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SorwmisTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SorwmisTable.hpp deleted file mode 100644 index e280aa6850..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SorwmisTable.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA. - 2015 IRIS AS - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_SORWMIS_TABLE_HPP -#define OPM_PARSER_SORWMIS_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class SorwmisTable : public SimpleTable { - public: - - SorwmisTable( const DeckItem& item ); - - const TableColumn& getWaterSaturationColumn() const; - const TableColumn& getMiscibleResidualOilColumn() const; - - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SsfnTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SsfnTable.hpp deleted file mode 100644 index 8095bdd565..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SsfnTable.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (C) 2015 IRIS AS - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_SSFN_TABLE_HPP -#define OPM_PARSER_SSFN_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class SsfnTable : public SimpleTable { - public: - friend class TableManager; - SsfnTable( const DeckItem& item ); - - const TableColumn& getSolventFractionColumn() const; - const TableColumn& getGasRelPermMultiplierColumn() const; - const TableColumn& getSolventRelPermMultiplierColumn() const; - }; -} - -#endif - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SwfnTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SwfnTable.hpp deleted file mode 100644 index 0889c2072c..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SwfnTable.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (C) 2014 IRIS AS - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_SWFN_TABLE_HPP -#define OPM_PARSER_SWFN_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - class SwfnTable : public SimpleTable { - - public: - SwfnTable( const DeckItem& item ); - - const TableColumn& getSwColumn() const; - const TableColumn& getKrwColumn() const; - - // this column is p_o - p_w (non-wetting phase pressure minus - // wetting phase pressure for a given water saturation) - const TableColumn& getPcowColumn() const; - }; -} - -#endif - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SwofTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SwofTable.hpp deleted file mode 100644 index b962d6c4c5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/SwofTable.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/* - Copyright (C) 2014 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_SWOF_TABLE_HPP -#define OPM_PARSER_SWOF_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class SwofTable : public SimpleTable { - public: - SwofTable( const DeckItem& item ); - const TableColumn& getSwColumn() const; - const TableColumn& getKrwColumn() const; - const TableColumn& getKrowColumn() const; - - // this column is p_o - p_w (non-wetting phase pressure minus - // wetting phase pressure for a given water saturation) - const TableColumn& getPcowColumn() const; - }; -} - -#endif - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/Tabdims.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/Tabdims.hpp deleted file mode 100644 index 725a7420cd..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/Tabdims.hpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef TABDIMS_HPP -#define TABDIMS_HPP - -/* - The Tabdims class is a small utility class designed to hold on to - the values from the TABDIMS keyword. -*/ - -#include - -namespace Opm { - class Tabdims { - public: - - /* - The TABDIMS keyword has a total of 25 items; most of them - are ECLIPSE300 only and quite exotic. Here we only - internalize the most common items. - */ - Tabdims() : - m_ntsfun( ParserKeywords::TABDIMS::NTSFUN::defaultValue ), - m_ntpvt( ParserKeywords::TABDIMS::NTPVT::defaultValue ), - m_nssfun( ParserKeywords::TABDIMS::NSSFUN::defaultValue ), - m_nppvt( ParserKeywords::TABDIMS::NPPVT::defaultValue ), - m_ntfip( ParserKeywords::TABDIMS::NTFIP::defaultValue ), - m_nrpvt( ParserKeywords::TABDIMS::NRPVT::defaultValue ) - { } - - - Tabdims(size_t ntsfun, size_t ntpvt, size_t nssfun , size_t nppvt, size_t ntfip , size_t nrpvt) : - m_ntsfun( ntsfun ), - m_ntpvt( ntpvt ), - m_nssfun( nssfun ), - m_nppvt( nppvt ), - m_ntfip( ntfip ), - m_nrpvt( nrpvt ) {} - - - size_t getNumSatTables() const { - return m_ntsfun; - } - - size_t getNumPVTTables() const { - return m_ntpvt; - } - - size_t getNumSatNodes() const { - return m_nssfun; - } - - size_t getNumPressureNodes() const { - return m_nppvt; - } - - size_t getNumFIPRegions() const { - return m_ntfip; - } - - size_t getNumRSNodes() const { - return m_nrpvt; - } - - private: - size_t m_ntsfun,m_ntpvt,m_nssfun,m_nppvt,m_ntfip,m_nrpvt; - }; -} - - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableColumn.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableColumn.cpp deleted file mode 100644 index d18f00ea9f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableColumn.cpp +++ /dev/null @@ -1,323 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#include -#include - -#include -#include - -#include - -namespace Opm { - - TableColumn::TableColumn(const ColumnSchema& schema) : - m_schema( &schema ) - { - m_defaultCount = 0; - } - - - - size_t TableColumn::size() const { - return m_values.size(); - } - - - void TableColumn::assertOrder(double value1 , double value2) const { - if (!m_schema->validOrder( value1 , value2) ) - throw std::invalid_argument("Incorrect ordering of values in column: " + m_schema->name()); - } - - - - void TableColumn::assertNext(size_t index , double value) const { - size_t nextIndex = index + 1; - if (nextIndex < m_values.size()) { - if (!m_default[nextIndex]) { - double nextValue = m_values[nextIndex]; - assertOrder( value , nextValue ); - } - } - } - - - void TableColumn::assertPrevious(size_t index , double value) const { - if (index > 0) { - size_t prevIndex = index - 1; - if (!m_default[prevIndex]) { - double prevValue = m_values[prevIndex]; - assertOrder( prevValue , value ); - } - } - } - - - void TableColumn::assertUpdate(size_t index, double value) const { - assertNext( index , value ); - assertPrevious( index, value ); - } - - - - - void TableColumn::addValue(double value) { - assertUpdate( m_values.size() , value ); - m_values.push_back( value ); - m_default.push_back( false ); - } - - - void TableColumn::addDefault() { - Table::DefaultAction defaultAction = m_schema->getDefaultMode( ); - - if (defaultAction == Table::DEFAULT_CONST) - addValue( m_schema->getDefaultValue( )); - else if (defaultAction == Table::DEFAULT_LINEAR) { - m_values.push_back( -1 ); // Should never even be read. - m_default.push_back( true ); - m_defaultCount += 1; - } else - throw std::invalid_argument("The column does not accept default values"); - - } - - - void TableColumn::updateValue( size_t index , double value ) { - assertUpdate( index , value ); - m_values[index] = value; - if (m_default[index]) { - m_default[index] = false; - m_defaultCount -= 1; - } - } - - bool TableColumn::defaultApplied(size_t index) const { - if (index >= m_values.size()) - throw std::invalid_argument("Value: " + std::to_string( index ) + " out of range: [0," + std::to_string( m_values.size()) + ")"); - - return m_default[index]; - } - - double TableColumn::operator[](size_t index) const { - if (index >= m_values.size()) - throw std::invalid_argument("Value: " + std::to_string( index ) + " out of range: [0," + std::to_string( m_values.size()) + ")"); - - if (m_default[index]) - throw std::invalid_argument("Value at index " + std::to_string( index ) + " is defaulted - can not ask!"); - - return m_values[index]; - } - - double TableColumn::back() const { - return m_values.back( ); - } - - - double TableColumn::front() const { - return m_values.front( ); - } - - double TableColumn::max( ) const { - if (hasDefault()) - throw std::invalid_argument("Can not lookup elements in a column with defaulted values."); - if (m_values.size() > 0) - return *std::max_element( m_values.begin() , m_values.end()); - else - throw std::invalid_argument("Can not find max in empty column"); - } - - - double TableColumn::min( ) const { - if (hasDefault()) - throw std::invalid_argument("Can not lookup elements in a column with defaulted values."); - if (m_values.size() > 0) - return *std::min_element( m_values.begin() , m_values.end()); - else - throw std::invalid_argument("Can not find max in empty column"); - } - - - bool TableColumn::inRange( double arg ) const { - if (m_values.size( ) >= 2) { - if (!m_schema->lookupValid( )) - throw std::invalid_argument("Must have an ordered column to check in range."); - - if ((arg >= min()) && (arg <= max())) - return true; - else - return false; - - } else - throw std::invalid_argument("Minimum size 2 "); - } - - - TableIndex TableColumn::lookup( double argValue ) const { - if (!m_schema->lookupValid( )) - throw std::invalid_argument("Must have an ordered column to perform table argument lookup."); - - if (size() < 1) - throw std::invalid_argument("Must have at least one elements in column for table argument lookup."); - - if (hasDefault()) - throw std::invalid_argument("Can not lookup elements in a column with defaulted values."); - - if (argValue >= max()) { - const auto max_iter = std::max_element( m_values.begin() , m_values.end()); - const size_t max_index = max_iter - m_values.begin(); - return TableIndex( max_index , 1.0 ); - } - - if (argValue <= min()) { - const auto min_iter = std::min_element( m_values.begin() , m_values.end()); - const size_t min_index = min_iter - m_values.begin(); - return TableIndex( min_index , 1.0 ); - } - - { - bool isDescending = m_schema->isDecreasing( ); - size_t lowIntervalIdx = 0; - size_t intervalIdx = (size() - 1)/2; - size_t highIntervalIdx = size() - 1; - double weight1; - - while (lowIntervalIdx + 1 < highIntervalIdx) { - if (isDescending) { - if (m_values[intervalIdx] < argValue) - highIntervalIdx = intervalIdx; - else - lowIntervalIdx = intervalIdx; - } - else { - if (m_values[intervalIdx] < argValue) - lowIntervalIdx = intervalIdx; - else - highIntervalIdx = intervalIdx; - } - - intervalIdx = (highIntervalIdx + lowIntervalIdx)/2; - } - - weight1 = 1 - (argValue - m_values[intervalIdx])/(m_values[intervalIdx + 1] - m_values[intervalIdx]); - - return TableIndex( intervalIdx , weight1 ); - } - } - - std::vector::const_iterator TableColumn::begin() const { - return m_values.begin(); - } - - std::vector::const_iterator TableColumn::end() const { - return m_values.end(); - } - - - bool TableColumn::hasDefault( ) const { - if (m_defaultCount > 0) - return true; - else - return false; - } - - - double TableColumn::eval( const TableIndex& index) const { - size_t index1 = index.getIndex1(); - double weight1 = index.getWeight1( ); - double value = m_values[index1] * weight1; - if (weight1 < 1.0) { - double weight2 = index.getWeight2( ); - value += weight2 * m_values[index1 + 1]; - } - return value; - } - - - TableColumn& TableColumn::operator= (const TableColumn& other) { - if (this != &other) { - m_schema = other.m_schema; - m_name = other.m_name; - m_values = other.m_values; - m_default = other.m_default; - m_defaultCount = other.m_defaultCount; - } - return *this; - } - - - void TableColumn::applyDefaults( const TableColumn& argColumn ) { - if (m_schema->getDefaultMode() == Table::DEFAULT_LINEAR) { - if (size() != argColumn.size()) - throw std::invalid_argument("Size mismatch with argument column"); - - for (size_t rowIdx = 0; rowIdx < size(); ++rowIdx) { - if (defaultApplied( rowIdx )) { - // find first row which was not defaulted before the current one - ssize_t rowBeforeIdx = rowIdx; - for (; rowBeforeIdx >= 0; -- rowBeforeIdx) - if (!defaultApplied(rowBeforeIdx)) - break; - - // find first row which was not defaulted after the current one - ssize_t rowAfterIdx = rowIdx; - for (; rowAfterIdx < static_cast(size()); ++ rowAfterIdx) - if (!defaultApplied(rowAfterIdx)) - break; - - - // switch to extrapolation by a constant at the fringes - if (rowBeforeIdx < 0 && rowAfterIdx >= static_cast(size())) - throw std::invalid_argument("Column " + m_schema->name() + " can't be fully defaulted"); - else if (rowBeforeIdx < 0) - rowBeforeIdx = rowAfterIdx; - else if (rowAfterIdx >= static_cast(size())) - rowAfterIdx = rowBeforeIdx; - - { - // linear interpolation - double alpha = 0.0; - if (rowBeforeIdx != rowAfterIdx) - alpha = (argColumn[rowIdx] - argColumn[rowBeforeIdx]) / (argColumn[rowAfterIdx] - argColumn[rowBeforeIdx]); - - double value = m_values[rowBeforeIdx]*(1-alpha) + m_values[rowAfterIdx]*alpha; - - updateValue( rowIdx , value ); - } - } - } - } - } - - - void TableColumn::assertUnitRange() const { - if (front() != 0.0) - throw std::invalid_argument("Column " + m_schema->name() + " must span range [0 1]"); - - if (back() != 1.0) - throw std::invalid_argument("Column " + m_schema->name() + " must span range [0 1]"); - } - - - std::vector TableColumn::vectorCopy() const { - return std::vector( begin() , end()); - } - -} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableColumn.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableColumn.hpp deleted file mode 100644 index 5fa75ae4ed..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableColumn.hpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - -#ifndef OPM_TABLE_COLUMN_HPP -#define OPM_TABLE_COLUMN_HPP - -#include -#include -#include - -#include - -namespace Opm { - - class ColumnSchema; - - class TableColumn { - public: - explicit TableColumn( const ColumnSchema& schema ); - size_t size( ) const; - const std::string& name() const; - void assertOrder(double value1 , double value2) const; - void addValue(double); - void addDefault(); - void updateValue(size_t index, double value); - double operator[](size_t index) const; - bool defaultApplied(size_t index) const; - bool hasDefault( ) const; - double front() const; - double back() const; - double min() const; - double max() const; - bool inRange( double arg ) const; - - /* - Will extrapolate with constant endpoint values if @argValue - is out of range. - */ - TableIndex lookup(double argValue) const; - double eval( const TableIndex& index) const; - void applyDefaults( const TableColumn& argColumn ); - void assertUnitRange() const; - TableColumn& operator= (const TableColumn& other); - - std::vector vectorCopy() const; - std::vector::const_iterator begin() const; - std::vector::const_iterator end() const; - private: - void assertUpdate(size_t index, double value) const; - void assertPrevious(size_t index , double value) const; - void assertNext(size_t index , double value) const; - - const ColumnSchema * m_schema; - std::string m_name; - std::vector m_values; - std::vector m_default; - size_t m_defaultCount; - }; - - -} - - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableContainer.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableContainer.cpp deleted file mode 100644 index d3f435a1f2..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableContainer.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include - -#include - -namespace Opm { - - TableContainer::TableContainer(size_t maxTables) : - m_maxTables(maxTables) - { - } - - - bool TableContainer::empty() const { - return m_tables.empty(); - } - - - size_t TableContainer::size() const { - return m_tables.size(); - } - - - size_t TableContainer::hasTable(size_t tableNumber) const { - if (m_tables.find( tableNumber ) == m_tables.end()) - return false; - else - return true; - } - - - const SimpleTable& TableContainer::getTable(size_t tableNumber) const { - if (tableNumber >= m_maxTables) - throw std::invalid_argument("TableContainer - invalid tableNumber"); - - if (hasTable(tableNumber)) { - auto pair = m_tables.find( tableNumber ); - return *(pair->second.get()); - } else { - if (tableNumber > 0) - return getTable(tableNumber -1); - else - throw std::invalid_argument("TableContainer does not have any table in the range 0..." + std::to_string( tableNumber )); - } - } - - - const SimpleTable& TableContainer::operator[](size_t tableNumber) const { - return getTable(tableNumber); - } - - void TableContainer::addTable(size_t tableNumber , std::shared_ptr table) { - if (tableNumber >= m_maxTables) - throw std::invalid_argument("TableContainer has max: " + std::to_string( m_maxTables ) + " tables. Table number: " + std::to_string( tableNumber ) + " illegal."); - - m_tables[tableNumber] = table; - } -} - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableContainer.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableContainer.hpp deleted file mode 100644 index da88bd7d29..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableContainer.hpp +++ /dev/null @@ -1,95 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef OPM_TABLE_CONTAINER_HPP -#define OPM_TABLE_CONTAINER_HPP - -#include -#include -#include - -namespace Opm { - - class SimpleTable; - - class TableContainer { - /* - The TableContainer class implements a simple map: - {tableNumber , Table}. The main functionality of the - TableContainer class is that the getTable method implements - the Eclipse behavior: - - If table N is not implemented - use table N - 1. - - The getTable() method will eventually throw an exception if - not even table 0 is there. - - Consider the following code: - - TableContainer container(10); - - std::shared_ptr table0 = std::make_shared(...); - container.addTable( table0 , 0 ) - - We create a container with maximum 10 tables, and then we add - one single table at slot 0; then we have: - - container.size() == 1 - container.hasTable( 0 ) == true - container.hasTable( 9 ) == false - container.hasTable(10 ) == false - - container.getTable( 0 ) == container[9] == table0; - container.gteTable(10 ) ==> exception - */ - public: - explicit TableContainer( size_t maxTables ); - bool empty() const; - - /* - This is the number of actual tables in the container. - */ - size_t size() const; - void addTable(size_t tableNumber , std::shared_ptr table); - - - /* - Observe that the hasTable() method does not invoke the "If - table N is not implemented use table N - 1 behavior. - */ - size_t hasTable(size_t tableNumber) const; - const SimpleTable& getTable(size_t tableNumber) const; - const SimpleTable& operator[](size_t tableNumber) const; - - template - const TableType& getTable(size_t tableNumber) const { - const SimpleTable &simpleTable = getTable( tableNumber ); - const TableType * table = static_cast( &simpleTable ); - return *table; - } - - private: - size_t m_maxTables; - std::map > m_tables; - }; - -} - - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableEnums.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableEnums.hpp deleted file mode 100644 index 2cb6519443..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableEnums.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - -#ifndef OPM_TABLE_ENUMS_HPP -#define OPM_TABLE_ENUMS_HPP - -namespace Opm { - namespace Table { - enum ColumnOrderEnum { - INCREASING = 1, - STRICTLY_INCREASING = 2, - DECREASING = 3, - STRICTLY_DECREASING = 4, - RANDOM = 5 - }; - - enum DefaultAction { - DEFAULT_NONE = 1, - DEFAULT_CONST = 2, - DEFAULT_LINEAR = 3, - }; - - } -} - - - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableIndex.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableIndex.cpp deleted file mode 100644 index d5b48a58b0..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableIndex.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - - -#include - -namespace Opm { - - TableIndex::TableIndex( size_t index1 , double weight1) : - m_index1( index1 ), - m_weight1( weight1 ) - { - - } - - - TableIndex::TableIndex(const TableIndex& tableIndex) - : m_index1( tableIndex.m_index1 ), - m_weight1(tableIndex.m_weight1 ) - { - } - - - size_t TableIndex::getIndex1( ) const { - return m_index1; - } - - size_t TableIndex::getIndex2( ) const { - return m_index1 + 1; - } - - - double TableIndex::getWeight1( ) const { - return m_weight1; - } - - - double TableIndex::getWeight2( ) const { - return 1 - m_weight1; - } - - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableIndex.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableIndex.hpp deleted file mode 100644 index f2fc23e8e0..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableIndex.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - -#ifndef OPM_TABLE_INDEX_HPP -#define OPM_TABLE_INDEX_HPP - -#include - -/* - Small class used to simplify lookup in tables based on linear - interpolation; first binear search in an ordered column is used to - instantiate a TableIndex object, and then subsequently that - TableIndex instance is used to evaluate the corresponding value over - another column. -*/ - -namespace Opm { - - class TableIndex { - public: - TableIndex( size_t index1 , double weight1); - TableIndex( const TableIndex& tableIndex); - size_t getIndex1( ) const; - size_t getIndex2( ) const; - double getWeight1( ) const; - double getWeight2( ) const; - private: - size_t m_index1; - double m_weight1; - }; -} - - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableManager.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableManager.cpp deleted file mode 100644 index c1cca8ee82..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableManager.cpp +++ /dev/null @@ -1,730 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include // Phase::PhaseEnum -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -namespace Opm { - - TableManager::TableManager( const Deck& deck ) - : - hasImptvd (deck.hasKeyword("IMPTVD")), - hasEnptvd (deck.hasKeyword("ENPTVD")), - hasEqlnum (deck.hasKeyword("EQLNUM")) - { - initPhases( deck ); - initDims( deck ); - initSimpleTables( deck ); - initFullTables(deck, "PVTG", m_pvtgTables); - initFullTables(deck, "PVTO", m_pvtoTables); - - initVFPProdTables(deck, m_vfpprodTables); - initVFPInjTables(deck, m_vfpinjTables); - } - - void TableManager::initPhases(const Deck& deck) { - if (deck.hasKeyword("OIL")) - phases.insert(Phase::PhaseEnum::OIL); - - if (deck.hasKeyword("GAS")) - phases.insert(Phase::PhaseEnum::GAS); - - if (deck.hasKeyword("WATER")) - phases.insert(Phase::PhaseEnum::WATER); - - if (phases.size() < 3) - m_messages.info("Only " + std::to_string(static_cast(phases.size())) + " fluid phases are enabled"); - } - - size_t TableManager::getNumPhases() const{ - return phases.size(); - } - - bool TableManager::hasPhase(enum Phase::PhaseEnum phase) const { - return (phases.count(phase) == 1); - } - - - void TableManager::initDims(const Deck& deck) { - using namespace Opm::ParserKeywords; - if (deck.hasKeyword()) { - const auto& keyword = deck.getKeyword(); - const auto& record = keyword.getRecord(0); - int ntsfun = record.getItem().get< int >(0); - int ntpvt = record.getItem().get< int >(0); - int nssfun = record.getItem().get< int >(0); - int nppvt = record.getItem().get< int >(0); - int ntfip = record.getItem().get< int >(0); - int nrpvt = record.getItem().get< int >(0); - - m_tabdims = std::make_shared(ntsfun , ntpvt , nssfun , nppvt , ntfip , nrpvt); - } else - m_tabdims = std::make_shared(); - - if (deck.hasKeyword()) { - const auto& keyword = deck.getKeyword(); - const auto& record = keyword.getRecord(0); - int ntsequl = record.getItem().get< int >(0); - int nodes_p = record.getItem().get< int >(0); - int nodes_tab = record.getItem().get< int >(0); - int nttrvd = record.getItem().get< int >(0); - int ntsrvd = record.getItem().get< int >(0); - - m_eqldims = std::make_shared(ntsequl , nodes_p , nodes_tab , nttrvd , ntsrvd ); - } else - m_eqldims = std::make_shared(); - - if (deck.hasKeyword()) { - const auto& keyword = deck.getKeyword(); - const auto& record = keyword.getRecord(0); - int ntfip = record.getItem().get< int >(0); - int nmfipr = record.getItem().get< int >(0); - int nrfreg = record.getItem().get< int >(0); - int ntfreg = record.getItem().get< int >(0); - int nplmix = record.getItem().get< int >(0); - m_regdims = std::make_shared( ntfip , nmfipr , nrfreg , ntfreg , nplmix ); - } else - m_regdims = std::make_shared(); - } - - - void TableManager::addTables( const std::string& tableName , size_t numTables) { - m_simpleTables.emplace(std::make_pair(tableName , TableContainer( numTables ))); - } - - - bool TableManager::hasTables( const std::string& tableName ) const { - auto pair = m_simpleTables.find( tableName ); - if (pair == m_simpleTables.end()) - return false; - else { - const auto& tables = pair->second; - return !tables.empty(); - } - } - - - const TableContainer& TableManager::getTables( const std::string& tableName ) const { - auto pair = m_simpleTables.find( tableName ); - if (pair == m_simpleTables.end()) - throw std::invalid_argument("No such table collection: " + tableName); - else - return pair->second; - } - - TableContainer& TableManager::forceGetTables( const std::string& tableName , size_t numTables ) { - auto pair = m_simpleTables.find( tableName ); - if (pair == m_simpleTables.end()) { - addTables( tableName , numTables ); - pair = m_simpleTables.find( tableName ); - } - return pair->second; - } - - - const TableContainer& TableManager::operator[](const std::string& tableName) const { - return getTables(tableName); - } - - void TableManager::initSimpleTables(const Deck& deck) { - addTables( "SWOF" , m_tabdims->getNumSatTables() ); - addTables( "SGWFN", m_tabdims->getNumSatTables() ); - addTables( "SGOF", m_tabdims->getNumSatTables() ); - addTables( "SLGOF", m_tabdims->getNumSatTables() ); - addTables( "SOF2", m_tabdims->getNumSatTables() ); - addTables( "SOF3", m_tabdims->getNumSatTables() ); - addTables( "SWFN", m_tabdims->getNumSatTables() ); - addTables( "SGFN", m_tabdims->getNumSatTables() ); - addTables( "SSFN", m_tabdims->getNumSatTables() ); - addTables( "MSFN", m_tabdims->getNumSatTables() ); - - addTables( "PLYADS", m_tabdims->getNumSatTables() ); - addTables( "PLYROCK", m_tabdims->getNumSatTables()); - addTables( "PLYVISC", m_tabdims->getNumPVTTables()); - addTables( "PLYDHFLF", m_tabdims->getNumPVTTables()); - - addTables( "PVDG", m_tabdims->getNumPVTTables()); - addTables( "PVDO", m_tabdims->getNumPVTTables()); - addTables( "PVDS", m_tabdims->getNumPVTTables()); - - addTables( "OILVISCT", m_tabdims->getNumPVTTables()); - addTables( "WATVISCT", m_tabdims->getNumPVTTables()); - addTables( "GASVISCT", m_tabdims->getNumPVTTables()); - - addTables( "PLYMAX", m_regdims->getNPLMIX()); - addTables( "RSVD", m_eqldims->getNumEquilRegions()); - addTables( "RVVD", m_eqldims->getNumEquilRegions()); - - { - size_t numMiscibleTables = ParserKeywords::MISCIBLE::NTMISC::defaultValue; - if (deck.hasKeyword()) { - const auto& keyword = deck.getKeyword(); - const auto& record = keyword.getRecord(0); - numMiscibleTables = static_cast(record.getItem().get< int >(0)); - } - addTables( "SORWMIS", numMiscibleTables); - addTables( "SGCWMIS", numMiscibleTables); - addTables( "MISC", numMiscibleTables); - addTables( "PMISC", numMiscibleTables); - addTables( "TLPMIXPA", numMiscibleTables); - } - - { - size_t numEndScaleTables = ParserKeywords::ENDSCALE::NUM_TABLES::defaultValue; - - if (deck.hasKeyword()) { - const auto& keyword = deck.getKeyword(); - const auto& record = keyword.getRecord(0); - numEndScaleTables = static_cast(record.getItem().get< int >(0)); - } - - addTables( "ENKRVD", numEndScaleTables); - addTables( "ENPTVD", numEndScaleTables); - addTables( "IMKRVD", numEndScaleTables); - addTables( "IMPTVD", numEndScaleTables); - } - { - size_t numRocktabTables = ParserKeywords::ROCKCOMP::NTROCC::defaultValue; - - if (deck.hasKeyword()) { - const auto& keyword = deck.getKeyword(); - const auto& record = keyword.getRecord(0); - numRocktabTables = static_cast(record.getItem().get< int >(0)); - } - addTables( "ROCKTAB", numRocktabTables); - } - - initSimpleTableContainer(deck, "SWOF" , m_tabdims->getNumSatTables()); - initSimpleTableContainer(deck, "SGWFN", m_tabdims->getNumSatTables()); - initSimpleTableContainer(deck, "SGOF" , m_tabdims->getNumSatTables()); - initSimpleTableContainer(deck, "SLGOF" , m_tabdims->getNumSatTables()); - initSimpleTableContainer(deck, "SOF2" , m_tabdims->getNumSatTables()); - initSimpleTableContainer(deck, "SOF3" , m_tabdims->getNumSatTables()); - initSimpleTableContainer(deck, "SWFN" , m_tabdims->getNumSatTables()); - initSimpleTableContainer(deck, "SGFN" , m_tabdims->getNumSatTables()); - initSimpleTableContainer(deck, "SSFN" , m_tabdims->getNumSatTables()); - initSimpleTableContainer(deck, "MSFN" , m_tabdims->getNumSatTables()); - - - initSimpleTableContainer(deck, "RSVD" , m_eqldims->getNumEquilRegions()); - initSimpleTableContainer(deck, "RVVD" , m_eqldims->getNumEquilRegions()); - { - size_t numEndScaleTables = ParserKeywords::ENDSCALE::NUM_TABLES::defaultValue; - - if (deck.hasKeyword()) { - const auto& keyword = deck.getKeyword(); - const auto& record = keyword.getRecord(0); - numEndScaleTables = static_cast(record.getItem().get< int >(0)); - } - - initSimpleTableContainer( deck , "ENKRVD", numEndScaleTables); - initSimpleTableContainer( deck , "ENPTVD", numEndScaleTables); - initSimpleTableContainer( deck , "IMKRVD", numEndScaleTables); - initSimpleTableContainer( deck , "IMPTVD", numEndScaleTables); - } - - { - size_t numMiscibleTables = ParserKeywords::MISCIBLE::NTMISC::defaultValue; - if (deck.hasKeyword()) { - const auto& keyword = deck.getKeyword(); - const auto& record = keyword.getRecord(0); - numMiscibleTables = static_cast(record.getItem().get< int >(0)); - } - initSimpleTableContainer(deck, "SORWMIS", numMiscibleTables); - initSimpleTableContainer(deck, "SGCWMIS", numMiscibleTables); - initSimpleTableContainer(deck, "MISC", numMiscibleTables); - initSimpleTableContainer(deck, "PMISC", numMiscibleTables); - initSimpleTableContainer(deck, "TLPMIXPA", numMiscibleTables); - - } - - initSimpleTableContainer(deck, "PVDG", m_tabdims->getNumPVTTables()); - initSimpleTableContainer(deck, "PVDO", m_tabdims->getNumPVTTables()); - initSimpleTableContainer(deck, "PVDS", m_tabdims->getNumPVTTables()); - initSimpleTableContainer(deck, "OILVISCT", m_tabdims->getNumPVTTables()); - initSimpleTableContainer(deck, "WATVISCT", m_tabdims->getNumPVTTables()); - - initSimpleTableContainer(deck, "PLYADS", m_tabdims->getNumSatTables()); - initSimpleTableContainer(deck, "PLYVISC", m_tabdims->getNumPVTTables()); - initSimpleTableContainer(deck, "PLYDHFLF", m_tabdims->getNumPVTTables()); - initPlyrockTables(deck); - initPlymaxTables(deck); - initGasvisctTables(deck); - initRTempTables(deck); - initRocktabTables(deck); - initPlyshlogTables(deck); - } - - - void TableManager::initRTempTables(const Deck& deck) { - // the temperature vs depth table. the problem here is that - // the TEMPVD (E300) and RTEMPVD (E300 + E100) keywords are - // synonymous, but we want to provide only a single cannonical - // API here, so we jump through some small hoops... - if (deck.hasKeyword("TEMPVD") && deck.hasKeyword("RTEMPVD")) - throw std::invalid_argument("The TEMPVD and RTEMPVD tables are mutually exclusive!"); - else if (deck.hasKeyword("TEMPVD")) - initSimpleTableContainer(deck, "TEMPVD", "RTEMPVD", m_eqldims->getNumEquilRegions()); - else if (deck.hasKeyword("RTEMPVD")) - initSimpleTableContainer(deck, "RTEMPVD", "RTEMPVD" , m_eqldims->getNumEquilRegions()); - } - - - void TableManager::initGasvisctTables(const Deck& deck) { - - const std::string keywordName = "GASVISCT"; - size_t numTables = m_tabdims->getNumPVTTables(); - - if (!deck.hasKeyword(keywordName)) - return; // the table is not featured by the deck... - - auto& container = forceGetTables(keywordName , numTables); - - if (deck.count(keywordName) > 1) { - complainAboutAmbiguousKeyword(deck, keywordName); - return; - } - - const auto& tableKeyword = deck.getKeyword(keywordName); - for (size_t tableIdx = 0; tableIdx < tableKeyword.size(); ++tableIdx) { - const auto& tableRecord = tableKeyword.getRecord( tableIdx ); - const auto& dataItem = tableRecord.getItem( 0 ); - if (dataItem.size() > 0) { - std::shared_ptr table = std::make_shared( deck , dataItem ); - container.addTable( tableIdx , table ); - } - } - } - - - void TableManager::initPlyshlogTables(const Deck& deck) { - const std::string keywordName = "PLYSHLOG"; - - if (!deck.hasKeyword(keywordName)) { - return; - } - - if (!deck.count(keywordName)) { - complainAboutAmbiguousKeyword(deck, keywordName); - return; - } - size_t numTables = m_tabdims->getNumPVTTables(); - auto& container = forceGetTables(keywordName , numTables); - const auto& tableKeyword = deck.getKeyword(keywordName); - - if (tableKeyword.size() > 2) { - std::string msg = "The Parser does currently NOT support the alternating record schema used in PLYSHLOG"; - throw std::invalid_argument( msg ); - } - - for (size_t tableIdx = 0; tableIdx < tableKeyword.size(); tableIdx += 2) { - const auto& indexRecord = tableKeyword.getRecord( tableIdx ); - const auto& dataRecord = tableKeyword.getRecord( tableIdx + 1); - const auto& dataItem = dataRecord.getItem( 0 ); - if (dataItem.size() > 0) { - std::shared_ptr table = std::make_shared(indexRecord , dataRecord); - container.addTable( tableIdx , table ); - } - } - } - - - void TableManager::initPlyrockTables(const Deck& deck) { - size_t numTables = m_tabdims->getNumSatTables(); - const std::string keywordName = "PLYROCK"; - if (!deck.hasKeyword(keywordName)) { - return; - } - - if (!deck.count(keywordName)) { - complainAboutAmbiguousKeyword(deck, keywordName); - return; - } - - const auto& keyword = deck.getKeyword(); - auto& container = forceGetTables(keywordName , numTables); - for (size_t tableIdx = 0; tableIdx < keyword.size(); ++tableIdx) { - const auto& tableRecord = keyword.getRecord( tableIdx ); - std::shared_ptr table = std::make_shared(tableRecord); - container.addTable( tableIdx , table ); - } - } - - - void TableManager::initPlymaxTables(const Deck& deck) { - size_t numTables = m_regdims->getNPLMIX(); - const std::string keywordName = "PLYMAX"; - if (!deck.hasKeyword(keywordName)) { - return; - } - - if (!deck.count(keywordName)) { - complainAboutAmbiguousKeyword(deck, keywordName); - return; - } - - const auto& keyword = deck.getKeyword(); - auto& container = forceGetTables(keywordName , numTables); - for (size_t tableIdx = 0; tableIdx < keyword.size(); ++tableIdx) { - const auto& tableRecord = keyword.getRecord( tableIdx ); - std::shared_ptr table = std::make_shared( tableRecord ); - container.addTable( tableIdx , table ); - } - } - - - - void TableManager::initRocktabTables(const Deck& deck) { - if (!deck.hasKeyword("ROCKTAB")) - return; // ROCKTAB is not featured by the deck... - - if (deck.count("ROCKTAB") > 1) { - complainAboutAmbiguousKeyword(deck, "ROCKTAB"); - return; - } - const auto& rockcompKeyword = deck.getKeyword(); - const auto& record = rockcompKeyword.getRecord( 0 ); - size_t numTables = record.getItem().get< int >(0); - auto& container = forceGetTables("ROCKTAB" , numTables); - const auto rocktabKeyword = deck.getKeyword("ROCKTAB"); - - bool isDirectional = deck.hasKeyword(); - bool useStressOption = false; - if (deck.hasKeyword()) { - const auto rockoptsKeyword = deck.getKeyword(); - const auto& rockoptsRecord = rockoptsKeyword.getRecord(0); - const auto& item = rockoptsRecord.getItem(); - useStressOption = (item.getTrimmedString(0) == "STRESS"); - } - - for (size_t tableIdx = 0; tableIdx < rocktabKeyword.size(); ++tableIdx) { - const auto& tableRecord = rocktabKeyword.getRecord( tableIdx ); - const auto& dataItem = tableRecord.getItem( 0 ); - if (dataItem.size() > 0) { - std::shared_ptr table = std::make_shared( dataItem , isDirectional, useStressOption ); - container.addTable( tableIdx , table ); - } - } - } - - - - void TableManager::initVFPProdTables(const Deck& deck, - std::map& tableMap) { - if (!deck.hasKeyword(ParserKeywords::VFPPROD::keywordName)) { - return; - } - - int num_tables = deck.count(ParserKeywords::VFPPROD::keywordName); - const auto& keywords = deck.getKeywordList(); - const auto& unit_system = deck.getActiveUnitSystem(); - for (int i=0; i& tableMap) { - if (!deck.hasKeyword(ParserKeywords::VFPINJ::keywordName)) { - return; - } - - int num_tables = deck.count(ParserKeywords::VFPINJ::keywordName); - const auto& keywords = deck.getKeywordList(); - const auto& unit_system = deck.getActiveUnitSystem(); - for (int i=0; i TableManager::getTabdims() const { - return m_tabdims; - } - - - /* - const std::vector& TableManager::getSwofTables() const { - return m_swofTables; - } - */ - - const TableContainer& TableManager::getSwofTables() const { - return getTables("SWOF"); - } - - const TableContainer& TableManager::getSgwfnTables() const { - return getTables("SGWFN"); - } - - const TableContainer& TableManager::getSlgofTables() const { - return getTables("SLGOF"); - } - - - const TableContainer& TableManager::getSgofTables() const { - return getTables("SGOF"); - } - - const TableContainer& TableManager::getSof2Tables() const { - return getTables("SOF2"); - } - - const TableContainer& TableManager::getSof3Tables() const { - return getTables("SOF3"); - } - - const TableContainer& TableManager::getSwfnTables() const { - return getTables("SWFN"); - } - - const TableContainer& TableManager::getSgfnTables() const { - return getTables("SGFN"); - } - - const TableContainer& TableManager::getSsfnTables() const { - return getTables("SSFN"); - } - - const TableContainer& TableManager::getRsvdTables() const { - return getTables("RSVD"); - } - - const TableContainer& TableManager::getRvvdTables() const { - return getTables("RVVD"); - } - - const TableContainer& TableManager::getEnkrvdTables() const { - return getTables("ENKRVD"); - } - - const TableContainer& TableManager::getEnptvdTables() const { - return getTables("ENPTVD"); - } - - - const TableContainer& TableManager::getImkrvdTables() const { - return getTables("IMKRVD"); - } - - const TableContainer& TableManager::getImptvdTables() const { - return getTables("IMPTVD"); - } - - const TableContainer& TableManager::getPvdgTables() const { - return getTables("PVDG"); - } - - const TableContainer& TableManager::getPvdoTables() const { - return getTables("PVDO"); - } - - const TableContainer& TableManager::getPvdsTables() const { - return getTables("PVDS"); - } - - const TableContainer& TableManager::getOilvisctTables() const { - return getTables("OILVISCT"); - } - - const TableContainer& TableManager::getWatvisctTables() const { - return getTables("WATVISCT"); - } - - const TableContainer& TableManager::getGasvisctTables() const { - return getTables("GASVISCT"); - } - - const TableContainer& TableManager::getRtempvdTables() const { - return getTables("RTEMPVD"); - } - - const TableContainer& TableManager::getRocktabTables() const { - return getTables("ROCKTAB"); - } - - - const TableContainer& TableManager::getPlyadsTables() const { - return getTables("PLYADS"); - } - - const TableContainer& TableManager::getPlyviscTables() const { - return getTables("PLYVISC"); - } - - const TableContainer& TableManager::getPlydhflfTables() const { - return getTables("PLYDHFL"); - } - - const TableContainer& TableManager::getPlymaxTables() const { - return getTables("PLYMAX"); - } - - const TableContainer& TableManager::getPlyrockTables() const { - return getTables("PLYROCK"); - } - - const TableContainer& TableManager::getPlyshlogTables() const { - return getTables("PLYSHLOG"); - } - - const std::vector& TableManager::getPvtgTables() const { - return m_pvtgTables; - } - - const std::vector& TableManager::getPvtoTables() const { - return m_pvtoTables; - } - - const TableContainer& TableManager::getMsfnTables() const { - return getTables("MSFN"); - } - const TableContainer& TableManager::getPmiscTables() const { - return getTables("PMISC"); - } - const TableContainer& TableManager::getMiscTables() const { - return getTables("MISC"); - } - const TableContainer& TableManager::getSgcwmisTables() const { - return getTables("SGCWMIS"); - } - const TableContainer& TableManager::getSorwmisTables() const { - return getTables("SORWMIS"); - } - const TableContainer& TableManager::getTlpmixpaTables() const { - return getTables("TLPMIXPA"); - } - - const std::map& TableManager::getVFPProdTables() const { - return m_vfpprodTables; - } - - const std::map& TableManager::getVFPInjTables() const { - return m_vfpinjTables; - } - - bool TableManager::useImptvd() const { - return hasImptvd; - } - - bool TableManager::useEnptvd() const { - return hasEnptvd; - } - - bool TableManager::useEqlnum() const { - return hasEqlnum; - } - - - const MessageContainer& TableManager::getMessageContainer() const { - return m_messages; - } - - - MessageContainer& TableManager::getMessageContainer() { - return m_messages; - } - - - void TableManager::complainAboutAmbiguousKeyword(const Deck& deck, const std::string& keywordName) { - m_messages.error("The " + keywordName + " keyword must be unique in the deck. Ignoring all!"); - const auto& keywords = deck.getKeywordList(keywordName); - for (size_t i = 0; i < keywords.size(); ++i) { - std::string msg = "Ambiguous keyword "+keywordName+" defined here"; - m_messages.error(keywords[i]->getFileName(), msg, keywords[i]->getLineNumber()); - } - } -} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableManager.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableManager.hpp deleted file mode 100644 index baa2b24cce..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableManager.hpp +++ /dev/null @@ -1,254 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef OPM_TABLE_MANAGER_HPP -#define OPM_TABLE_MANAGER_HPP - -#include - -#include -#include -#include - -#include // Phase::PhaseEnum -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -namespace Opm { - - class Tabdims; - class Eqldims; - class Regdims; - - class TableManager { - public: - TableManager( const Deck& deck ); - - const TableContainer& getTables( const std::string& tableName ) const; - const TableContainer& operator[](const std::string& tableName) const; - bool hasTables( const std::string& tableName ) const; - - - std::shared_ptr getTabdims() const; - - const TableContainer& getSwofTables() const; - const TableContainer& getSgwfnTables() const; - const TableContainer& getSof2Tables() const; - const TableContainer& getSof3Tables() const; - const TableContainer& getSgofTables() const; - const TableContainer& getSlgofTables() const; - const TableContainer& getSwfnTables() const; - const TableContainer& getSgfnTables() const; - const TableContainer& getSsfnTables() const; - const TableContainer& getRsvdTables() const; - const TableContainer& getRvvdTables() const; - const TableContainer& getEnkrvdTables() const; - const TableContainer& getEnptvdTables() const; - const TableContainer& getImkrvdTables() const; - const TableContainer& getImptvdTables() const; - const TableContainer& getPvdgTables() const; - const TableContainer& getPvdoTables() const; - const TableContainer& getPvdsTables() const; - const TableContainer& getWatvisctTables() const; - const TableContainer& getOilvisctTables() const; - const TableContainer& getGasvisctTables() const; - const TableContainer& getRtempvdTables() const; - const TableContainer& getRocktabTables() const; - const TableContainer& getPlyadsTables() const; - const TableContainer& getPlyviscTables() const; - const TableContainer& getPlydhflfTables() const; - const TableContainer& getPlymaxTables() const; - const TableContainer& getPlyrockTables() const; - const TableContainer& getPlyshlogTables() const; - - const TableContainer& getSorwmisTables() const; - const TableContainer& getSgcwmisTables() const; - const TableContainer& getMiscTables() const; - const TableContainer& getPmiscTables() const; - const TableContainer& getMsfnTables() const; - const TableContainer& getTlpmixpaTables() const; - - - const std::vector& getPvtgTables() const; - const std::vector& getPvtoTables() const; - const std::map& getVFPProdTables() const; - const std::map& getVFPInjTables() const; - - bool hasPhase(enum Phase::PhaseEnum phase) const; - - /// number of phases, [gas, oil, water] = 3 - size_t getNumPhases() const; - - /// deck has keyword "IMPTVD" --- Imbition end-point versus depth tables - bool useImptvd() const; - - /// deck has keyword "ENPTVD" --- Saturation end-point versus depth tables - bool useEnptvd() const; - - /// deck has keyword "EQLNUM" --- Equilibriation region numbers - bool useEqlnum() const; - - const MessageContainer& getMessageContainer() const; - MessageContainer& getMessageContainer(); - - private: - TableContainer& forceGetTables( const std::string& tableName , size_t numTables); - - void complainAboutAmbiguousKeyword(const Deck& deck, const std::string& keywordName); - - void addTables( const std::string& tableName , size_t numTables); - void initSimpleTables(const Deck& deck); - void initRTempTables(const Deck& deck); - void initPhases(const Deck& deck); - void initDims(const Deck& deck); - void initRocktabTables(const Deck& deck); - void initGasvisctTables(const Deck& deck); - - void initVFPProdTables(const Deck& deck, - std::map& tableMap); - - void initVFPInjTables(const Deck& deck, - std::map& tableMap); - - - void initPlymaxTables(const Deck& deck); - void initPlyrockTables(const Deck& deck); - void initPlyshlogTables(const Deck& deck); - - template - void initSimpleTableContainer(const Deck& deck, - const std::string& keywordName, - const std::string& tableName, - size_t numTables) { - if (!deck.hasKeyword(keywordName)) - return; // the table is not featured by the deck... - - auto& container = forceGetTables(tableName , numTables); - - if (deck.count(keywordName) > 1) { - complainAboutAmbiguousKeyword(deck, keywordName); - return; - } - - const auto& tableKeyword = deck.getKeyword(keywordName); - for (size_t tableIdx = 0; tableIdx < tableKeyword.size(); ++tableIdx) { - const auto& dataItem = tableKeyword.getRecord( tableIdx ).getItem( 0 ); - if (dataItem.size() > 0) { - std::shared_ptr table = std::make_shared( dataItem ); - container.addTable( tableIdx , table ); - } - } - } - - template - void initSimpleTableContainer(const Deck& deck, - const std::string& keywordName, - size_t numTables) { - initSimpleTableContainer(deck , keywordName , keywordName , numTables); - } - - - template - void initSimpleTable(const Deck& deck, - const std::string& keywordName, - std::vector& tableVector) { - if (!deck.hasKeyword(keywordName)) - return; // the table is not featured by the deck... - - if (deck.count(keywordName) > 1) { - complainAboutAmbiguousKeyword(deck, keywordName); - return; - } - - const auto& tableKeyword = deck.getKeyword(keywordName); - for (size_t tableIdx = 0; tableIdx < tableKeyword.size(); ++tableIdx) { - const auto& dataItem = tableKeyword.getRecord( tableIdx ).getItem( 0 ); - if (dataItem.size() == 0) { - // for simple tables, an empty record indicates that the previous table - // should be copied... - if (tableIdx == 0) { - std::string msg = "The first table for keyword "+keywordName+" must be explicitly defined! Ignoring keyword"; - m_messages.warning(tableKeyword.getFileName() + std::to_string(tableKeyword.getLineNumber()) + msg); - return; - } - tableVector.push_back(tableVector.back()); - continue; - } - - tableVector.push_back(TableType()); - tableVector[tableIdx].init(dataItem); - } - } - - - template - void initFullTables(const Deck& deck, - const std::string& keywordName, - std::vector& tableVector) { - if (!deck.hasKeyword(keywordName)) - return; // the table is not featured by the deck... - - if (deck.count(keywordName) > 1) { - complainAboutAmbiguousKeyword(deck, keywordName); - return; - } - - const auto& tableKeyword = deck.getKeyword(keywordName); - - int numTables = TableType::numTables( tableKeyword ); - for (int tableIdx = 0; tableIdx < numTables; ++tableIdx) - tableVector.push_back(TableType(tableKeyword , tableIdx)); - } - - std::map m_simpleTables; - std::map m_vfpprodTables; - std::map m_vfpinjTables; - std::vector m_pvtgTables; - std::vector m_pvtoTables; - - std::shared_ptr m_regdims; - std::shared_ptr m_tabdims; - std::shared_ptr m_eqldims; - - std::set phases; - - const bool hasImptvd;// if deck has keyword IMPTVD - const bool hasEnptvd;// if deck has keyword ENPTVD - const bool hasEqlnum;// if deck has keyword EQLNUM - - MessageContainer m_messages; - }; -} - - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableSchema.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableSchema.cpp deleted file mode 100644 index 164b32ccb7..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableSchema.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#include - -#include - -namespace Opm { - - TableSchema::TableSchema() - { - - } - - void TableSchema::addColumn(const ColumnSchema& column) { - m_columns.insert( column.name() , column ); - } - - - const ColumnSchema&& TableSchema::getColumn( const std::string& name ) const { - return std::forward( m_columns.get( name ) ); - } - - const ColumnSchema&& TableSchema::getColumn( size_t columnIndex ) const { - return std::forward( m_columns.get( columnIndex) ); - } - - size_t TableSchema::size() const { - return m_columns.size(); - } - - bool TableSchema::hasColumn(const std::string& name) const { - return m_columns.hasKey( name ); - } - -} - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableSchema.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableSchema.hpp deleted file mode 100644 index 3e31100df3..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TableSchema.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - -#ifndef OPM_TABLE_SCHEMA_HPP -#define OPM_TABLE_SCHEMA_HPP - -#include -#include - -#include - -#include - -namespace Opm { - - class TableSchema { - public: - TableSchema(); - void addColumn(const ColumnSchema& column); - const ColumnSchema&& getColumn( const std::string& name ) const; - const ColumnSchema&& getColumn( size_t columnIndex ) const; - bool hasColumn(const std::string&) const; - - /* Number of columns */ - size_t size() const; - private: - OrderedMap m_columns; - }; -} - -#endif - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/Tables.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/Tables.cpp deleted file mode 100644 index c91bacd79f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/Tables.cpp +++ /dev/null @@ -1,1088 +0,0 @@ -/* - Copyright (C) 2013 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace Opm { - -PvtgTable::PvtgTable( const DeckKeyword& keyword, size_t tableIdx ) : - PvtxTable("P") { - - m_saturatedSchema = std::make_shared< TableSchema >(); - m_underSaturatedSchema = std::make_shared< TableSchema >(); - - m_underSaturatedSchema->addColumn( ColumnSchema( "RV" , Table::STRICTLY_DECREASING , Table::DEFAULT_NONE )); - m_underSaturatedSchema->addColumn( ColumnSchema( "BG" , Table::RANDOM , Table::DEFAULT_LINEAR )); - m_underSaturatedSchema->addColumn( ColumnSchema( "MUG" , Table::RANDOM , Table::DEFAULT_LINEAR )); - - m_saturatedSchema = std::make_shared< TableSchema >( ); - m_saturatedSchema->addColumn( ColumnSchema( "PG" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE )); - m_saturatedSchema->addColumn( ColumnSchema( "RV" , Table::RANDOM , Table::DEFAULT_NONE )); - m_saturatedSchema->addColumn( ColumnSchema( "BG" , Table::RANDOM , Table::DEFAULT_LINEAR )); - m_saturatedSchema->addColumn( ColumnSchema( "MUG" , Table::RANDOM , Table::DEFAULT_LINEAR )); - - PvtxTable::init(keyword, tableIdx); - } - -PvtoTable::PvtoTable( const DeckKeyword& keyword, size_t tableIdx) : - PvtxTable("P") { - - m_saturatedSchema = std::make_shared< TableSchema >(); - m_underSaturatedSchema = std::make_shared< TableSchema >(); - - m_underSaturatedSchema->addColumn( ColumnSchema( "P" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE )); - m_underSaturatedSchema->addColumn( ColumnSchema( "BO" , Table::RANDOM , Table::DEFAULT_LINEAR )); - m_underSaturatedSchema->addColumn( ColumnSchema( "MU" , Table::RANDOM , Table::DEFAULT_LINEAR )); - - m_saturatedSchema->addColumn( ColumnSchema( "RS" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE )); - m_saturatedSchema->addColumn( ColumnSchema( "P" , Table::RANDOM , Table::DEFAULT_NONE )); - m_saturatedSchema->addColumn( ColumnSchema( "BO" , Table::RANDOM , Table::DEFAULT_LINEAR )); - m_saturatedSchema->addColumn( ColumnSchema( "MU" , Table::RANDOM , Table::DEFAULT_LINEAR )); - - PvtxTable::init(keyword , tableIdx); - } - -SwofTable::SwofTable( const DeckItem& item ) { - - m_schema = std::make_shared< TableSchema >(); - - m_schema->addColumn( ColumnSchema( "SW" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE) ); - m_schema->addColumn( ColumnSchema( "KRW" , Table::RANDOM , Table::DEFAULT_LINEAR) ); - m_schema->addColumn( ColumnSchema( "KROW" , Table::RANDOM , Table::DEFAULT_LINEAR) ); - m_schema->addColumn( ColumnSchema( "PCOW" , Table::RANDOM , Table::DEFAULT_LINEAR) ); - - SimpleTable::init( item ); -} - -const TableColumn& SwofTable::getSwColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& SwofTable::getKrwColumn() const { - return SimpleTable::getColumn(1); -} - -const TableColumn& SwofTable::getKrowColumn() const { - return SimpleTable::getColumn(2); -} - -const TableColumn& SwofTable::getPcowColumn() const { - return SimpleTable::getColumn(3); -} - -SgwfnTable::SgwfnTable( const DeckItem& item ) { - - m_schema = std::make_shared< TableSchema >(); - - m_schema->addColumn( ColumnSchema( "SG" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE ) ); - m_schema->addColumn( ColumnSchema( "KRG" , Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema( "KRGW" , Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema( "PCGW" , Table::RANDOM , Table::DEFAULT_LINEAR ) ); - - SimpleTable::init( item ); -} - -const TableColumn& SgwfnTable::getSgColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& SgwfnTable::getKrgColumn() const { - return SimpleTable::getColumn(1); -} - -const TableColumn& SgwfnTable::getKrgwColumn() const { - return SimpleTable::getColumn(2); -} - -const TableColumn& SgwfnTable::getPcgwColumn() const { - return SimpleTable::getColumn(3); -} - -SgofTable::SgofTable( const DeckItem& item ) { - m_schema = std::make_shared< TableSchema >(); - m_schema->addColumn( ColumnSchema("SG" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE)); - m_schema->addColumn( ColumnSchema("KRG" , Table::RANDOM , Table::DEFAULT_LINEAR )); - m_schema->addColumn( ColumnSchema("KROG" , Table::RANDOM , Table::DEFAULT_LINEAR )); - m_schema->addColumn( ColumnSchema("PCOG" , Table::RANDOM , Table::DEFAULT_LINEAR )); - - SimpleTable::init( item ); -} - -const TableColumn& SgofTable::getSgColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& SgofTable::getKrgColumn() const { - return SimpleTable::getColumn(1); -} - -const TableColumn& SgofTable::getKrogColumn() const { - return SimpleTable::getColumn(2); -} - -const TableColumn& SgofTable::getPcogColumn() const { - return SimpleTable::getColumn(3); - -} - -SlgofTable::SlgofTable( const DeckItem& item ) { - m_schema = std::make_shared< TableSchema >(); - - m_schema->addColumn( ColumnSchema("SL" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE )); - m_schema->addColumn( ColumnSchema("KRG" , Table::DECREASING , Table::DEFAULT_LINEAR )); - m_schema->addColumn( ColumnSchema("KROG" , Table::INCREASING , Table::DEFAULT_LINEAR )); - m_schema->addColumn( ColumnSchema("PCOG" , Table::DECREASING , Table::DEFAULT_LINEAR )); - - SimpleTable::init( item ); - - if (getSlColumn().back() != 1.0) { - throw std::invalid_argument("The last saturation of the SLGOF keyword must be 1!"); - } -} - -const TableColumn& SlgofTable::getSlColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& SlgofTable::getKrgColumn() const { - return SimpleTable::getColumn(1); -} - -const TableColumn& SlgofTable::getKrogColumn() const { - return SimpleTable::getColumn(2); -} - -const TableColumn& SlgofTable::getPcogColumn() const { - return SimpleTable::getColumn(3); -} - -Sof2Table::Sof2Table( const DeckItem& item ) { - m_schema = std::make_shared< TableSchema >(); - - m_schema->addColumn( ColumnSchema( "SO" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE )); - m_schema->addColumn( ColumnSchema( "KRO" , Table::INCREASING , Table::DEFAULT_NONE )); - - SimpleTable::init(item); -} - -const TableColumn& Sof2Table::getSoColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& Sof2Table::getKroColumn() const { - return SimpleTable::getColumn(1); -} - -Sof3Table::Sof3Table( const DeckItem& item ) { - m_schema = std::make_shared< TableSchema >(); - - m_schema->addColumn( ColumnSchema("SO" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE )); - m_schema->addColumn( ColumnSchema("KROW" , Table::INCREASING , Table::DEFAULT_LINEAR )); - m_schema->addColumn( ColumnSchema("KROG" , Table::INCREASING , Table::DEFAULT_LINEAR )); - - SimpleTable::init( item ); -} - - -const TableColumn& Sof3Table::getSoColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& Sof3Table::getKrowColumn() const { - return SimpleTable::getColumn(1); -} - -const TableColumn& Sof3Table::getKrogColumn() const { - return SimpleTable::getColumn(2); -} - -PvdgTable::PvdgTable( const DeckItem& item ) { - m_schema = std::make_shared< TableSchema >(); - m_schema->addColumn( ColumnSchema( "P" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE )); - m_schema->addColumn( ColumnSchema( "BG" , Table::STRICTLY_DECREASING , Table::DEFAULT_LINEAR)); - m_schema->addColumn( ColumnSchema( "MUG" , Table::INCREASING , Table::DEFAULT_LINEAR )); - - SimpleTable::init( item ); -} - - -const TableColumn& PvdgTable::getPressureColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& PvdgTable::getFormationFactorColumn() const { - return SimpleTable::getColumn(1); -} - -const TableColumn& PvdgTable::getViscosityColumn() const { - return SimpleTable::getColumn(2); -} - -PvdoTable::PvdoTable( const DeckItem& item ) { - m_schema = std::make_shared< TableSchema >(); - m_schema->addColumn( ColumnSchema( "P" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE )); - m_schema->addColumn( ColumnSchema( "BO" , Table::STRICTLY_DECREASING , Table::DEFAULT_LINEAR)); - m_schema->addColumn( ColumnSchema( "MUO" , Table::INCREASING , Table::DEFAULT_LINEAR )); - - SimpleTable::init( item ); -} - - -const TableColumn& PvdoTable::getPressureColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& PvdoTable::getFormationFactorColumn() const { - return SimpleTable::getColumn(1); -} - -const TableColumn& PvdoTable::getViscosityColumn() const { - return SimpleTable::getColumn(2); -} - -SwfnTable::SwfnTable( const DeckItem& item ) { - m_schema = std::make_shared< TableSchema >(); - - m_schema->addColumn( ColumnSchema("SW" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE )); - m_schema->addColumn( ColumnSchema("KRW" , Table::INCREASING , Table::DEFAULT_LINEAR )); - m_schema->addColumn( ColumnSchema("PCOW" , Table::DECREASING , Table::DEFAULT_LINEAR )); - - SimpleTable::init(item); -} - -const TableColumn& SwfnTable::getSwColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& SwfnTable::getKrwColumn() const { - return SimpleTable::getColumn(1); -} - -const TableColumn& SwfnTable::getPcowColumn() const { - return SimpleTable::getColumn(2); -} - -SgfnTable::SgfnTable( const DeckItem& item ) { - m_schema = std::make_shared< TableSchema >(); - - m_schema->addColumn( ColumnSchema("SG" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE ) ); - m_schema->addColumn( ColumnSchema("KRG" , Table::INCREASING , Table::DEFAULT_LINEAR)); - m_schema->addColumn( ColumnSchema("PCOG" , Table::INCREASING , Table::DEFAULT_LINEAR)); - - SimpleTable::init(item); -} - - -const TableColumn& SgfnTable::getSgColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& SgfnTable::getKrgColumn() const { - return SimpleTable::getColumn(1); -} - -const TableColumn& SgfnTable::getPcogColumn() const { - return SimpleTable::getColumn(2); -} - -SsfnTable::SsfnTable( const DeckItem& item ) { - m_schema = std::make_shared< TableSchema >(); - - m_schema->addColumn( ColumnSchema("SolventFraction" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE)); - m_schema->addColumn( ColumnSchema("GasRelPermMultiplier" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE)); - m_schema->addColumn( ColumnSchema("SolventRelPermMultiplier" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE)); - - SimpleTable::init(item); -} - -const TableColumn& SsfnTable::getSolventFractionColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& SsfnTable::getGasRelPermMultiplierColumn() const { - return SimpleTable::getColumn(1); -} - -const TableColumn& SsfnTable::getSolventRelPermMultiplierColumn() const { - return SimpleTable::getColumn(2); - -} - -PvdsTable::PvdsTable( const DeckItem& item ) { - m_schema = std::make_shared< TableSchema >(); - - m_schema->addColumn( ColumnSchema( "P" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE )); - m_schema->addColumn( ColumnSchema( "BG" , Table::STRICTLY_DECREASING , Table::DEFAULT_LINEAR )); - m_schema->addColumn( ColumnSchema( "MUG" , Table::INCREASING , Table::DEFAULT_LINEAR )); - - SimpleTable::init(item); -} - -const TableColumn& PvdsTable::getPressureColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& PvdsTable::getFormationFactorColumn() const { - return SimpleTable::getColumn(1); -} - -const TableColumn& PvdsTable::getViscosityColumn() const { - return SimpleTable::getColumn(2); -} - -PlyadsTable::PlyadsTable( const DeckItem& item ) { - m_schema = std::make_shared< TableSchema >(); - - m_schema->addColumn( ColumnSchema("PolymerConcentration" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE )); - m_schema->addColumn( ColumnSchema("AdsorbedPolymer" , Table::INCREASING , Table::DEFAULT_NONE )); - - SimpleTable::init(item); -} - - -const TableColumn& PlyadsTable::getPolymerConcentrationColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& PlyadsTable::getAdsorbedPolymerColumn() const { - return SimpleTable::getColumn(1); -} - -PlymaxTable::PlymaxTable( const DeckRecord& record ) { - m_schema = std::make_shared< TableSchema >(); - - m_schema->addColumn( ColumnSchema("C_POLYMER", Table::RANDOM , Table::DEFAULT_NONE) ); - m_schema->addColumn( ColumnSchema("C_POLYMER_MAX", Table::RANDOM , Table::DEFAULT_NONE) ); - - addColumns(); - for (size_t colIdx = 0; colIdx < record.size(); colIdx++) { - auto& column = getColumn( colIdx ); - - column.addValue( record.getItem( colIdx ).getSIDouble(0) ); - } -} - -const TableColumn& PlymaxTable::getPolymerConcentrationColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& PlymaxTable::getMaxPolymerConcentrationColumn() const { - return SimpleTable::getColumn(1); -} - -PlyrockTable::PlyrockTable( const DeckRecord& record ) { - m_schema = std::make_shared< TableSchema >(); - m_schema->addColumn( ColumnSchema("DeadPoreVolume", Table::RANDOM , Table::DEFAULT_NONE) ); - m_schema->addColumn( ColumnSchema("ResidualResistanceFactor", Table::RANDOM , Table::DEFAULT_NONE) ); - m_schema->addColumn( ColumnSchema("RockDensityFactor", Table::RANDOM , Table::DEFAULT_NONE) ); - m_schema->addColumn( ColumnSchema("AdsorbtionIndex", Table::RANDOM , Table::DEFAULT_NONE) ); - m_schema->addColumn( ColumnSchema("MaxAdsorbtion", Table::RANDOM , Table::DEFAULT_NONE) ); - - addColumns(); - for (size_t colIdx = 0; colIdx < record.size(); colIdx++) { - auto& column = getColumn( colIdx ); - - column.addValue( record.getItem( colIdx ).getSIDouble(0) ); - } -} - -const TableColumn& PlyrockTable::getDeadPoreVolumeColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& PlyrockTable::getResidualResistanceFactorColumn() const { - return SimpleTable::getColumn(1); -} - -const TableColumn& PlyrockTable::getRockDensityFactorColumn() const { - return SimpleTable::getColumn(2); -} - -const TableColumn& PlyrockTable::getAdsorbtionIndexColumn() const { - return SimpleTable::getColumn(3); -} - -const TableColumn& PlyrockTable::getMaxAdsorbtionColumn() const { - return SimpleTable::getColumn(4); -} - -PlyviscTable::PlyviscTable( const DeckItem& item ) { - m_schema = std::make_shared< TableSchema >(); - - m_schema->addColumn( ColumnSchema( "PolymerConcentration" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE)); - m_schema->addColumn( ColumnSchema( "ViscosityMultiplier" , Table::INCREASING , Table::DEFAULT_NONE)); - SimpleTable::init(item); -} - -const TableColumn& PlyviscTable::getPolymerConcentrationColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& PlyviscTable::getViscosityMultiplierColumn() const { - return SimpleTable::getColumn(1); -} - -PlydhflfTable::PlydhflfTable( const DeckItem& item ) { - m_schema = std::make_shared< TableSchema >(); - - m_schema->addColumn( ColumnSchema("Temperature" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE ) ); - m_schema->addColumn( ColumnSchema("PolymerHalflife" , Table::STRICTLY_DECREASING , Table::DEFAULT_NONE ) ); - - SimpleTable::init(item); -} - -const TableColumn& PlydhflfTable::getTemperatureColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& PlydhflfTable::getPolymerHalflifeColumn() const { - return SimpleTable::getColumn(1); -} - -PlyshlogTable::PlyshlogTable( - const DeckRecord& indexRecord, - const DeckRecord& dataRecord ) { - m_schema = std::make_shared< TableSchema >(); - - { - const auto& item = indexRecord.getItem(); - setRefPolymerConcentration(item.get< double >(0)); - } - - { - const auto& item = indexRecord.getItem(); - if (item.hasValue(0)) { - setHasRefSalinity(true); - setRefSalinity(item.get< double >(0)); - } else - setHasRefSalinity(false); - } - - { - const auto& item = indexRecord.getItem(); - if (item.hasValue(0)) { - setHasRefTemperature(true); - setRefTemperature(item.get< double >(0)); - } else - setHasRefTemperature(false); - } - - m_schema->addColumn( ColumnSchema("WaterVelocity" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE)); - m_schema->addColumn( ColumnSchema("ShearMultiplier" , Table::RANDOM , Table::DEFAULT_NONE)); - - SimpleTable::init( dataRecord.getItem() ); -} - -double PlyshlogTable::getRefPolymerConcentration() const { - return m_refPolymerConcentration; -} -double PlyshlogTable::getRefSalinity() const { - return m_refSalinity; -} - -double PlyshlogTable::getRefTemperature() const{ - return m_refTemperature; -} - -void PlyshlogTable::setRefPolymerConcentration(const double refPlymerConcentration) { - m_refPolymerConcentration = refPlymerConcentration; -} - -void PlyshlogTable::setRefSalinity(const double refSalinity) { - m_refSalinity = refSalinity; -} - -void PlyshlogTable::setRefTemperature(const double refTemperature) { - m_refTemperature = refTemperature; -} - -bool PlyshlogTable::hasRefSalinity() const { - return m_hasRefSalinity; -} - -bool PlyshlogTable::hasRefTemperature() const { - return m_hasRefTemperature; -} - -void PlyshlogTable::setHasRefSalinity(const bool has) { - m_hasRefSalinity = has; -} - -void PlyshlogTable::setHasRefTemperature(const bool has) { - m_refTemperature = has; -} - -const TableColumn& PlyshlogTable::getWaterVelocityColumn() const { - return getColumn(0); -} - -const TableColumn& PlyshlogTable::getShearMultiplierColumn() const { - return getColumn(1); -} - -OilvisctTable::OilvisctTable( const DeckItem& item ) { - - m_schema = std::make_shared< TableSchema >(); - - m_schema->addColumn( ColumnSchema("Temperature" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE) ); - m_schema->addColumn( ColumnSchema("Viscosity" , Table::DECREASING , Table::DEFAULT_NONE) ); - SimpleTable::init(item); -} - -const TableColumn& OilvisctTable::getTemperatureColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& OilvisctTable::getOilViscosityColumn() const { - return SimpleTable::getColumn(1); -} - -WatvisctTable::WatvisctTable( const DeckItem& item ) { - m_schema = std::make_shared< TableSchema >(); - - m_schema->addColumn(ColumnSchema("Temperature" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE)); - m_schema->addColumn(ColumnSchema("Viscosity" , Table::DECREASING , Table::DEFAULT_NONE)); - - SimpleTable::init(item); -} - -const TableColumn& WatvisctTable::getTemperatureColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& WatvisctTable::getWaterViscosityColumn() const { - return SimpleTable::getColumn(1); -} - -GasvisctTable::GasvisctTable( const Deck& deck, const DeckItem& deckItem ) { - m_schema = std::make_shared< TableSchema >(); - - int numComponents = deck.getKeyword().getRecord(0).getItem(0).get< int >(0); - - auto temperatureDimension = deck.getActiveUnitSystem().getDimension("Temperature"); - auto viscosityDimension = deck.getActiveUnitSystem().getDimension("Viscosity"); - - m_schema->addColumn( ColumnSchema( "Temperature" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE)); - for (int compIdx = 0; compIdx < numComponents; ++ compIdx) { - std::string columnName = "Viscosity" + std::to_string(compIdx); - m_schema->addColumn( ColumnSchema( columnName, Table::INCREASING , Table::DEFAULT_NONE ) ); - } - - SimpleTable::addColumns(); - - if ( deckItem.size() % numColumns() != 0) - throw std::runtime_error("Number of columns in the data file is inconsistent " - "with the expected number for keyword GASVISCT"); - - size_t rows = deckItem.size() / m_schema->size(); - for (size_t columnIndex=0; columnIndex < m_schema->size(); columnIndex++) { - auto& column = getColumn( columnIndex ); - for (size_t rowIdx = 0; rowIdx < rows; rowIdx++) { - size_t deckIndex = rowIdx * m_schema->size() + columnIndex; - - if (deckItem.defaultApplied( deckIndex )) - column.addDefault(); - else { - double rawValue = deckItem.get< double >( deckIndex ); - double SIValue; - - if (columnIndex == 0) - SIValue = temperatureDimension->convertRawToSi(rawValue); - else - SIValue = viscosityDimension->convertRawToSi(rawValue); - - column.addValue( SIValue ); - } - } - } -} - -const TableColumn& GasvisctTable::getTemperatureColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& GasvisctTable::getGasViscosityColumn(size_t compIdx) const { - return SimpleTable::getColumn(1 + compIdx); -} - -RtempvdTable::RtempvdTable(const DeckItem& item) { - m_schema = std::make_shared< TableSchema >(); - - m_schema->addColumn( ColumnSchema( "Depth" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE) ); - m_schema->addColumn( ColumnSchema( "Temperature" , Table::RANDOM , Table::DEFAULT_NONE) ); - - SimpleTable::init( item ); -} - -const TableColumn& RtempvdTable::getDepthColumn() const { - return SimpleTable::getColumn(0); -} - - -const TableColumn& RtempvdTable::getTemperatureColumn() const { - return SimpleTable::getColumn(1); -} - -RocktabTable::RocktabTable( - const DeckItem& item, - bool isDirectional, - bool hasStressOption ) : - m_isDirectional( isDirectional ) -{ - - m_schema = std::make_shared< TableSchema >(); - - Table::ColumnOrderEnum POOrder; - - if (hasStressOption) - POOrder = Table::STRICTLY_INCREASING; - else - POOrder = Table::STRICTLY_DECREASING; - - m_schema->addColumn( ColumnSchema("PO" , POOrder , Table::DEFAULT_NONE ) ); - m_schema->addColumn( ColumnSchema("PV_MULT" , Table::RANDOM , Table::DEFAULT_LINEAR ) ); - - if (isDirectional) { - m_schema->addColumn( ColumnSchema("PV_MULT_TRANX" , Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema("PV_MULT_TRANY" , Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema("PV_MULT_TRANZ" , Table::RANDOM , Table::DEFAULT_LINEAR ) ); - } else - m_schema->addColumn( ColumnSchema("PV_MULT_TRAN" , Table::RANDOM , Table::DEFAULT_LINEAR ) ); - - SimpleTable::init(item); -} - - -const TableColumn& RocktabTable::getPressureColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& RocktabTable::getPoreVolumeMultiplierColumn() const { - return SimpleTable::getColumn(1); -} - -const TableColumn& RocktabTable::getTransmissibilityMultiplierColumn() const { - return SimpleTable::getColumn(2); -} - -const TableColumn& RocktabTable::getTransmissibilityMultiplierXColumn() const { - return SimpleTable::getColumn(2); -} - -const TableColumn& RocktabTable::getTransmissibilityMultiplierYColumn() const { - if (!m_isDirectional) - return SimpleTable::getColumn(2); - return SimpleTable::getColumn(3); -} - -const TableColumn& RocktabTable::getTransmissibilityMultiplierZColumn() const { - if (!m_isDirectional) - return SimpleTable::getColumn(2); - return SimpleTable::getColumn(4); -} - -RsvdTable::RsvdTable( const DeckItem& item ) { - m_schema = std::make_shared< TableSchema >(); - - m_schema->addColumn( ColumnSchema( "DEPTH" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE )); - m_schema->addColumn( ColumnSchema( "RS" , Table::RANDOM , Table::DEFAULT_NONE )); - - SimpleTable::init(item); -} - -const TableColumn& RsvdTable::getDepthColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& RsvdTable::getRsColumn() const { - return SimpleTable::getColumn(1); -} - -RvvdTable::RvvdTable( const DeckItem& item ) { - m_schema = std::make_shared< TableSchema >(); - - m_schema->addColumn( ColumnSchema( "DEPTH" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE ) ); - m_schema->addColumn( ColumnSchema( "RV" , Table::RANDOM , Table::DEFAULT_LINEAR ) ); - SimpleTable::init(item); -} - -const TableColumn& RvvdTable::getDepthColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& RvvdTable::getRvColumn() const { - return SimpleTable::getColumn(1); -} - -EnkrvdTable::EnkrvdTable( const DeckItem& item ) { - m_schema = std::make_shared< TableSchema >(); - - m_schema->addColumn( ColumnSchema( "DEPTH" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE ) ); - m_schema->addColumn( ColumnSchema( "KRWMAX", Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema( "KRGMAX", Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema( "KROMAX", Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema( "KRWCRIT", Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema( "KRGCRIT", Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema( "KROCRITG",Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema( "KROCRITW",Table::RANDOM , Table::DEFAULT_LINEAR ) ); - - SimpleTable::init(item); -} - -const TableColumn& EnkrvdTable::getDepthColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& EnkrvdTable::getKrwmaxColumn() const { - return SimpleTable::getColumn(1); -} - -const TableColumn& EnkrvdTable::getKrgmaxColumn() const { - return SimpleTable::getColumn(2); -} - -const TableColumn& EnkrvdTable::getKromaxColumn() const { - return SimpleTable::getColumn(3); -} - -const TableColumn& EnkrvdTable::getKrwcritColumn() const { - return SimpleTable::getColumn(4); -} - -const TableColumn& EnkrvdTable::getKrgcritColumn() const { - return SimpleTable::getColumn(5); -} - -const TableColumn& EnkrvdTable::getKrocritgColumn() const { - return SimpleTable::getColumn(6); -} - -const TableColumn& EnkrvdTable::getKrocritwColumn() const { - return SimpleTable::getColumn(7); -} - -EnptvdTable::EnptvdTable( const DeckItem& item ) { - m_schema = std::make_shared< TableSchema >(); - - m_schema->addColumn( ColumnSchema( "DEPTH" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE ) ); - m_schema->addColumn( ColumnSchema( "SWCO", Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema( "SWCRIT", Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema( "SWMAX", Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema( "SGCO", Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema( "SGCRIT", Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema( "SGMAX", Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema( "SOWCRIT", Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema( "SOGCRIT", Table::RANDOM , Table::DEFAULT_LINEAR ) ); - - SimpleTable::init(item); -} - -const TableColumn& EnptvdTable::getDepthColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& EnptvdTable::getSwcoColumn() const { - return SimpleTable::getColumn(1); -} - -const TableColumn& EnptvdTable::getSwcritColumn() const { - return SimpleTable::getColumn(2); -} - -const TableColumn& EnptvdTable::getSwmaxColumn() const { - return SimpleTable::getColumn(3); -} - -const TableColumn& EnptvdTable::getSgcoColumn() const { - return SimpleTable::getColumn(4); -} - -const TableColumn& EnptvdTable::getSgcritColumn() const { - return SimpleTable::getColumn(5); -} - -const TableColumn& EnptvdTable::getSgmaxColumn() const { - return SimpleTable::getColumn(6); -} - -const TableColumn& EnptvdTable::getSowcritColumn() const { - return SimpleTable::getColumn(7); -} - -const TableColumn& EnptvdTable::getSogcritColumn() const { - return SimpleTable::getColumn(8); -} - -ImkrvdTable::ImkrvdTable( const DeckItem& item ) { - m_schema = std::make_shared< TableSchema >(); - - m_schema->addColumn( ColumnSchema( "DEPTH" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE ) ); - m_schema->addColumn( ColumnSchema( "KRWMAX", Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema( "KRGMAX", Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema( "KROMAX", Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema( "KRWCRIT", Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema( "KRGCRIT", Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema( "KROCRITG",Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema( "KROCRITW", Table::RANDOM , Table::DEFAULT_LINEAR ) ); - - SimpleTable::init(item); -} - -const TableColumn& ImkrvdTable::getDepthColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& ImkrvdTable::getKrwmaxColumn() const { - return SimpleTable::getColumn(1); -} - -const TableColumn& ImkrvdTable::getKrgmaxColumn() const { - return SimpleTable::getColumn(2); -} - -const TableColumn& ImkrvdTable::getKromaxColumn() const { - return SimpleTable::getColumn(3); -} - -const TableColumn& ImkrvdTable::getKrwcritColumn() const { - return SimpleTable::getColumn(4); -} - -const TableColumn& ImkrvdTable::getKrgcritColumn() const { - return SimpleTable::getColumn(5); -} - -const TableColumn& ImkrvdTable::getKrocritgColumn() const { - return SimpleTable::getColumn(6); -} - -const TableColumn& ImkrvdTable::getKrocritwColumn() const { - return SimpleTable::getColumn(7); -} - - -ImptvdTable::ImptvdTable( const DeckItem& item ) { - m_schema = std::make_shared< TableSchema >(); - - m_schema->addColumn( ColumnSchema( "DEPTH" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE ) ); - m_schema->addColumn( ColumnSchema( "SWCO", Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema( "SWCRIT", Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema( "SWMAX", Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema( "SGCO", Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema( "SGCRIT", Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema( "SGMAX", Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema( "SOWCRIT", Table::RANDOM , Table::DEFAULT_LINEAR ) ); - m_schema->addColumn( ColumnSchema( "SOGCRIT", Table::RANDOM , Table::DEFAULT_LINEAR ) ); - - SimpleTable::init(item); -} - -const TableColumn& ImptvdTable::getDepthColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& ImptvdTable::getSwcoColumn() const { - return SimpleTable::getColumn(1); -} - -const TableColumn& ImptvdTable::getSwcritColumn() const { - return SimpleTable::getColumn(2); -} - -const TableColumn& ImptvdTable::getSwmaxColumn() const { - return SimpleTable::getColumn(3); -} - -const TableColumn& ImptvdTable::getSgcoColumn() const { - return SimpleTable::getColumn(4); -} - -const TableColumn& ImptvdTable::getSgcritColumn() const { - return SimpleTable::getColumn(5); -} - -const TableColumn& ImptvdTable::getSgmaxColumn() const { - return SimpleTable::getColumn(6); -} - -const TableColumn& ImptvdTable::getSowcritColumn() const { - return SimpleTable::getColumn(7); -} - -const TableColumn& ImptvdTable::getSogcritColumn() const { - return SimpleTable::getColumn(8); -} - -SorwmisTable::SorwmisTable( const DeckItem& item ) { - m_schema = std::make_shared< TableSchema >(); - - m_schema->addColumn( ColumnSchema( "WaterSaturation" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE) ); - m_schema->addColumn( ColumnSchema( "MiscibleResidualOilSaturation" , Table::INCREASING , Table::DEFAULT_NONE) ); - - SimpleTable::init(item); -} - -const TableColumn& SorwmisTable::getWaterSaturationColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& SorwmisTable::getMiscibleResidualOilColumn() const { - return SimpleTable::getColumn(1); -} - -SgcwmisTable::SgcwmisTable( const DeckItem& item ) { - m_schema = std::make_shared< TableSchema >(); - - m_schema->addColumn( ColumnSchema( "WaterSaturation" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE) ); - m_schema->addColumn( ColumnSchema( "MiscibleResidualGasSaturation" , Table::INCREASING , Table::DEFAULT_NONE) ); - SimpleTable::init(item); -} - -const TableColumn& SgcwmisTable::getWaterSaturationColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& SgcwmisTable::getMiscibleResidualGasColumn() const { - return SimpleTable::getColumn(1); -} - -MiscTable::MiscTable( const DeckItem& item ) { - m_schema = std::make_shared< TableSchema >(); - - m_schema->addColumn( ColumnSchema( "SolventFraction" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE) ); - m_schema->addColumn( ColumnSchema( "Miscibility" , Table::INCREASING , Table::DEFAULT_NONE) ); - SimpleTable::init( item ); -} - -const TableColumn& MiscTable::getSolventFractionColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& MiscTable::getMiscibilityColumn() const { - return SimpleTable::getColumn(1); -} - - -PmiscTable::PmiscTable( const DeckItem& item ) { - m_schema = std::make_shared< TableSchema >(); - - m_schema->addColumn( ColumnSchema( "OilPhasePressure" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE) ); - m_schema->addColumn( ColumnSchema( "Miscibility" , Table::INCREASING , Table::DEFAULT_NONE) ); - SimpleTable::init( item ); -} - -const TableColumn& PmiscTable::getOilPhasePressureColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& PmiscTable::getMiscibilityColumn() const { - return SimpleTable::getColumn(1); -} - -TlpmixpaTable::TlpmixpaTable( const DeckItem& item ) { - m_schema = std::make_shared< TableSchema >(); - - m_schema->addColumn( ColumnSchema( "OilPhasePressure" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE) ); - m_schema->addColumn( ColumnSchema( "Miscibility" , Table::INCREASING , Table::DEFAULT_NONE) ); - SimpleTable::init( item ); -} - -const TableColumn& TlpmixpaTable::getOilPhasePressureColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& TlpmixpaTable::getMiscibilityColumn() const { - return SimpleTable::getColumn(1); -} - -MsfnTable::MsfnTable( const DeckItem& item ) { - m_schema = std::make_shared< TableSchema >(); - - m_schema->addColumn( ColumnSchema( "GasPhaseFraction", Table::STRICTLY_INCREASING , Table::DEFAULT_NONE)); - m_schema->addColumn( ColumnSchema( "GasSolventRelpermMultiplier", Table::INCREASING , Table::DEFAULT_NONE)); - m_schema->addColumn( ColumnSchema( "OilRelpermMultiplier", Table::DECREASING , Table::DEFAULT_NONE)); - - SimpleTable::init( item ); - - getColumn("GasPhaseFraction").assertUnitRange(); -} - - -const TableColumn& MsfnTable::getGasPhaseFractionColumn() const { - return SimpleTable::getColumn(0); -} - -const TableColumn& MsfnTable::getGasSolventRelpermMultiplierColumn() const { - return SimpleTable::getColumn(1); -} - -const TableColumn& MsfnTable::getOilRelpermMultiplierColumn() const { - return SimpleTable::getColumn(2); -} - -} // namespace Opm diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TlpmixpaTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TlpmixpaTable.hpp deleted file mode 100644 index 1dd6fddabd..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/TlpmixpaTable.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA. - 2016 IRIS AS - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_TLPMIXPA_TABLE_HPP -#define OPM_PARSER_TLPMIXPA_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class DeckItem; - - class TlpmixpaTable : public SimpleTable { - public: - TlpmixpaTable( const DeckItem& item ); - - const TableColumn& getOilPhasePressureColumn() const; - const TableColumn& getMiscibilityColumn() const; - - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/VFPInjTable.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/VFPInjTable.cpp deleted file mode 100644 index 243ae703de..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/VFPInjTable.cpp +++ /dev/null @@ -1,322 +0,0 @@ -/* - Copyright 2015 SINTEF ICT, Applied Mathematics. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include - -#include -#include -#include -#include -#include -#include -#include - - -//Anonymous namespace -namespace { - -/** - * Trivial helper function that throws if a zero-sized item is found. - */ -template -inline const Opm::DeckItem& getNonEmptyItem( const Opm::DeckRecord& record) { - const auto& retval = record.getItem(); - if (retval.size() == 0) { - throw std::invalid_argument("Zero-sized record found where non-empty record expected"); - } - return retval; -} - -} //Namespace - - - - -namespace Opm { - - - -void VFPInjTable::init(int table_num, - double datum_depth, - FLO_TYPE flo_type, - const std::vector& flo_data, - const std::vector& thp_data, - const array_type& data) { - m_table_num = table_num; - m_datum_depth = datum_depth; - m_flo_type = flo_type; - m_flo_data = flo_data; - m_thp_data = thp_data; - - extents shape; - shape[0] = data.shape()[0]; - shape[1] = data.shape()[1]; - m_data.resize(shape); - m_data = data; - - check(); -} - - - - - - - -void VFPInjTable::init( const DeckKeyword& table, const UnitSystem& deck_unit_system) { - using ParserKeywords::VFPINJ; - - //Check that the table has enough records - if (table.size() < 4) { - throw std::invalid_argument("VFPINJ table does not appear to have enough records to be valid"); - } - - //Get record 1, the metadata for the table - const auto& header = table.getRecord(0); - - //Get the different header items - m_table_num = getNonEmptyItem(header).get< int >(0); - m_datum_depth = getNonEmptyItem(header).getSIDouble(0); - - m_flo_type = getFloType(getNonEmptyItem(header).get< std::string >(0)); - - //Not used, but check that PRESSURE_DEF is indeed THP - std::string quantity_string = getNonEmptyItem(header).get< std::string >(0); - if (quantity_string != "THP") { - throw std::invalid_argument("PRESSURE_DEF is required to be THP"); - } - - //Check units used for this table - std::string units_string = ""; - if (header.getItem().hasValue(0)) { - units_string = header.getItem().get< std::string >(0); - } - else { - //If units does not exist in record, the default value is the - //unit system of the deck itself: do nothing... - } - - if (units_string != "") { - UnitSystem::UnitType table_unit_type; - - //FIXME: Only metric and field supported at the moment. - //Need to change all of the convertToSI functions to support LAB/PVT-M - - if (units_string == "METRIC") { - table_unit_type = UnitSystem::UNIT_TYPE_METRIC; - } - else if (units_string == "FIELD") { - table_unit_type = UnitSystem::UNIT_TYPE_FIELD; - } - else if (units_string == "LAB") { - throw std::invalid_argument("Unsupported UNITS string: 'LAB'"); - } - else if (units_string == "PVT-M") { - throw std::invalid_argument("Unsupported UNITS string: 'PVT-M'"); - } - else { - throw std::invalid_argument("Invalid UNITS string"); - } - - //Sanity check - if(table_unit_type != deck_unit_system.getType()) { - throw std::invalid_argument("Deck units are not equal VFPINJ table units."); - } - } - - //Quantity in the body of the table - std::string body_string = getNonEmptyItem(header).get< std::string >(0); - if (body_string != "BHP") { - throw std::invalid_argument("Invalid BODY_DEF string"); - } - - - //Get actual rate / flow values - m_flo_data = getNonEmptyItem(table.getRecord(1)).getData< double >(); - convertFloToSI(m_flo_type, m_flo_data, deck_unit_system); - - //Get actual tubing head pressure values - m_thp_data = getNonEmptyItem(table.getRecord(2)).getData< double >(); - convertTHPToSI(m_thp_data, deck_unit_system); - - //Finally, read the actual table itself. - size_t nt = m_thp_data.size(); - size_t nf = m_flo_data.size(); - extents shape; - shape[0] = nt; - shape[1] = nf; - m_data.resize(shape); - std::fill_n(m_data.data(), m_data.num_elements(), std::nan("0")); - - //Check that size of table matches size of axis: - if (table.size() != nt + 3) { - throw std::invalid_argument("VFPINJ table does not contain enough records."); - } - - const double table_scaling_factor = deck_unit_system.parse("Pressure")->getSIScaling(); - for (size_t i=3; i(record).get< int >(0) - 1; - - //Rest of values (bottom hole pressure or tubing head temperature) have index of flo value - const std::vector& bhp_tht = getNonEmptyItem(record).getData< double >(); - - if (bhp_tht.size() != nf) { - throw std::invalid_argument("VFPINJ table does not contain enough FLO values."); - } - - for (unsigned int f=0; f 1.0e10) { - //TODO: Replace with proper log message - std::cerr << "Too large value encountered in VFPINJ in [" - << t << "," << f << "]=" << value << std::endl; - } - m_data[t][f] = table_scaling_factor*value; - } - } - - check(); -} - - - - - - - -void VFPInjTable::check() { - //Table number - assert(m_table_num > 0); - - //Misc types - assert(m_flo_type >= FLO_OIL && m_flo_type < FLO_INVALID); - - //Data axis size - assert(m_flo_data.size() > 0); - assert(m_thp_data.size() > 0); - - //Data axis sorted? - assert(is_sorted(m_flo_data.begin(), m_flo_data.end())); - assert(is_sorted(m_thp_data.begin(), m_thp_data.end())); - - //Check data size matches axes - assert(m_data.num_dimensions() == 2); - assert(m_data.shape()[0] == m_thp_data.size()); - assert(m_data.shape()[1] == m_flo_data.size()); - - //Finally, check that all data is within reasonable ranges, defined to be up-to 1.0e10... - typedef array_type::size_type size_type; - for (size_type t=0; t& values, - const double& scaling_factor) { - if (scaling_factor == 1.0) { - return; - } - else { - for (unsigned int i=0; i& values, - const UnitSystem& unit_system) { - double scaling_factor = 1.0; - switch (type) { - case FLO_OIL: - case FLO_WAT: - scaling_factor = unit_system.parse("LiquidSurfaceVolume/Time")->getSIScaling(); - break; - case FLO_GAS: - scaling_factor = unit_system.parse("GasSurfaceVolume/Time")->getSIScaling(); - break; - default: - throw std::logic_error("Invalid FLO type"); - } - scaleValues(values, scaling_factor); -} - - - - - - - -void VFPInjTable::convertTHPToSI(std::vector& values, - const UnitSystem& unit_system) { - double scaling_factor = unit_system.parse("Pressure")->getSIScaling(); - scaleValues(values, scaling_factor); -} - - - - - - -} //Namespace diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/VFPInjTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/VFPInjTable.hpp deleted file mode 100644 index e33628d430..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/VFPInjTable.hpp +++ /dev/null @@ -1,175 +0,0 @@ -/* - Copyright 2015 SINTEF ICT, Applied Mathematics. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - - -#ifndef OPM_PARSER_ECLIPSE_ECLIPSESTATE_TABLES_VFPINJTABLE_HPP_ -#define OPM_PARSER_ECLIPSE_ECLIPSESTATE_TABLES_VFPINJTABLE_HPP_ - -#include - - -#include - - -namespace Opm { - - class DeckKeyword; - -/** - * Class for reading data from a VFPINJ (vertical flow performance injection) table - */ -class VFPInjTable { -public: - typedef boost::multi_array array_type; - typedef boost::array extents; - - ///Rate type - enum FLO_TYPE { - FLO_OIL=1, //< Oil rate - FLO_WAT, //< Water rate - FLO_GAS, //< Gas rate - FLO_INVALID - }; - - /** - * Constructor - */ - inline VFPInjTable() : m_table_num(-1), - m_datum_depth(-1), - m_flo_type(FLO_INVALID) { - - } - - /** - * Initializes objects from raw data. NOTE: All raw data assumed to be in SI units - * @param table_num VFP table number - * @param datum_depth Reference depth for BHP - * @param flo_type Specifies what flo_data represents - * @param flo_data Axis for flo_type - * @param thp_data Axis for thp_type - * @param data BHP to be interpolated. Given as a 2D array so that - * BHP = data[thp][flo] for the indices thp, flo. - */ - void init(int table_num, - double datum_depth, - FLO_TYPE flo_type, - const std::vector& flo_data, - const std::vector& thp_data, - const array_type& data); - - /** - * Constructor which parses a deck keyword and retrieves the relevant parts for a - * VFP table. - */ - void init(const DeckKeyword& table, const UnitSystem& deck_unit_system); - - /** - * Returns the table number - * @return table number - */ - inline int getTableNum() const { - return m_table_num; - } - - /** - * Returns the datum depth for the table data - * @return datum depth - */ - inline double getDatumDepth() const { - return m_datum_depth; - } - - /** - * Returns the rate/flo type for the flo axis - * @return flo type - */ - inline FLO_TYPE getFloType() const { - return m_flo_type; - } - - /** - * Returns the coordinates of the FLO sample points in the table - * @return Flo sample coordinates - */ - inline const std::vector& getFloAxis() const { - return m_flo_data; - } - - /** - * Returns the coordinates for the tubing head pressure sample points in the table - * @return Tubing head pressure coordinates - */ - inline const std::vector& getTHPAxis() const { - return m_thp_data; - } - - /** - * Returns the data of the table itself. The data is ordered so that - * - * table = getTable(); - * bhp = table[thp_idx][flo_idx]; - * - * gives the bottom hole pressure value in the table for the coordinate - * given by - * flo_axis = getFloAxis(); - * thp_axis = getTHPAxis(); - * - * flo_coord = flo_axis(flo_idx); - * thp_coord = thp_axis(thp_idx); - */ - inline const array_type& getTable() const { - return m_data; - } -private: - - //"Header" variables - int m_table_num; - double m_datum_depth; - FLO_TYPE m_flo_type; - - //The actual table axes - std::vector m_flo_data; - std::vector m_thp_data; - - //The data itself, using the data ordering m_data[thp][flo] - array_type m_data; - - /** - * Debug function that runs a series of asserts to check for sanity of inputs. - * Called after init to check that everything looks ok. - */ - void check(); - - static FLO_TYPE getFloType(std::string flo_string); - - static void scaleValues(std::vector& values, - const double& scaling_factor); - - static void convertFloToSI(const FLO_TYPE& type, - std::vector& values, - const UnitSystem& unit_system); - static void convertTHPToSI(std::vector& values, - const UnitSystem& unit_system); -}; - - -} //Namespace Opm - - -#endif /* OPM_PARSER_ECLIPSE_ECLIPSESTATE_TABLES_VFPINJTABLE_HPP_ */ diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/VFPProdTable.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/VFPProdTable.cpp deleted file mode 100644 index a6b75940c5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/VFPProdTable.cpp +++ /dev/null @@ -1,549 +0,0 @@ -/* - Copyright 2015 SINTEF ICT, Applied Mathematics. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - - -namespace Opm { - -namespace { - -VFPProdTable::FLO_TYPE getFloType( const DeckItem& item) { - const std::string& flo_string = item.getTrimmedString(0); - if (flo_string == "OIL") { - return VFPProdTable::FLO_OIL; - } - else if (flo_string == "LIQ") { - return VFPProdTable::FLO_LIQ; - } - else if (flo_string == "GAS") { - return VFPProdTable::FLO_GAS; - } - else { - throw std::invalid_argument("Invalid RATE_TYPE string"); - } - return VFPProdTable::FLO_INVALID; -} - -VFPProdTable::WFR_TYPE getWFRType( const DeckItem& item) { - const std::string& wfr_string = item.getTrimmedString(0); - if (wfr_string == "WOR") { - return VFPProdTable::WFR_WOR; - } - else if (wfr_string == "WCT") { - return VFPProdTable::WFR_WCT; - } - else if (wfr_string == "WGR") { - return VFPProdTable::WFR_WGR; - } - else { - throw std::invalid_argument("Invalid WFR string"); - } - return VFPProdTable::WFR_INVALID; -} - -VFPProdTable::GFR_TYPE getGFRType( const DeckItem& item) {; - const std::string& gfr_string = item.getTrimmedString(0); - if (gfr_string == "GOR") { - return VFPProdTable::GFR_GOR; - } - else if (gfr_string == "GLR") { - return VFPProdTable::GFR_GLR; - } - else if (gfr_string == "OGR") { - return VFPProdTable::GFR_OGR; - } - else { - throw std::invalid_argument("Invalid GFR string"); - } - return VFPProdTable::GFR_INVALID; -} - -VFPProdTable::ALQ_TYPE getALQType( const DeckItem& item) { - if (item.defaultApplied(0)) { - return VFPProdTable::ALQ_UNDEF; - } else { - const std::string& alq_string = item.getTrimmedString(0); - - if (alq_string == "GRAT") { - return VFPProdTable::ALQ_GRAT; - } - else if (alq_string == "IGLR") { - return VFPProdTable::ALQ_IGLR; - } - else if (alq_string == "TGLR") { - return VFPProdTable::ALQ_TGLR; - } - else if (alq_string == "PUMP") { - return VFPProdTable::ALQ_PUMP; - } - else if (alq_string == "COMP") { - return VFPProdTable::ALQ_COMP; - } - else if (alq_string == "BEAN") { - return VFPProdTable::ALQ_BEAN; - } - else if (alq_string == "") { - return VFPProdTable::ALQ_UNDEF; - } - else { - throw std::invalid_argument("Invalid ALQ_DEF string: " + alq_string); - } - - return VFPProdTable::ALQ_INVALID; - } -} - -} - -void VFPProdTable::init(int table_num, - double datum_depth, - FLO_TYPE flo_type, - WFR_TYPE wfr_type, - GFR_TYPE gfr_type, - ALQ_TYPE alq_type, - const std::vector& flo_data, - const std::vector& thp_data, - const std::vector& wfr_data, - const std::vector& gfr_data, - const std::vector& alq_data, - const array_type& data) { - m_table_num = table_num; - m_datum_depth = datum_depth; - m_flo_type = flo_type; - m_wfr_type = wfr_type; - m_gfr_type = gfr_type; - m_alq_type = alq_type; - m_flo_data = flo_data; - m_thp_data = thp_data; - m_wfr_data = wfr_data; - m_gfr_data = gfr_data; - m_alq_data = alq_data; - - extents shape; - shape[0] = data.shape()[0]; - shape[1] = data.shape()[1]; - shape[2] = data.shape()[2]; - shape[3] = data.shape()[3]; - shape[4] = data.shape()[4]; - m_data.resize(shape); - m_data = data; - - //check(); -} - -void VFPProdTable::init( const DeckKeyword& table, const UnitSystem& deck_unit_system) { - using ParserKeywords::VFPPROD; - - //Check that the table has enough records - if (table.size() < 7) { - throw std::invalid_argument("VFPPROD table does not appear to have enough records to be valid"); - } - - //Get record 1, the metadata for the table - const auto& header = table.getRecord(0); - - //Get the different header items - m_table_num = header.getItem().get< int >(0); - m_datum_depth = header.getItem().getSIDouble(0); - - m_flo_type = Opm::getFloType(header.getItem()); - m_wfr_type = Opm::getWFRType(header.getItem()); - m_gfr_type = Opm::getGFRType(header.getItem()); - - //Not used, but check that PRESSURE_DEF is indeed THP - std::string quantity_string = header.getItem().get< std::string >(0); - if (quantity_string != "THP") { - throw std::invalid_argument("PRESSURE_DEF is required to be THP"); - } - - m_alq_type = Opm::getALQType(header.getItem()); - - //Check units used for this table - std::string units_string = ""; - if (header.getItem().hasValue(0)) { - units_string = header.getItem().get< std::string >(0); - } - else { - //If units does not exist in record, the default value is the - //unit system of the deck itself: do nothing... - } - - if (units_string != "") { - UnitSystem::UnitType table_unit_type; - - //FIXME: Only metric and field supported at the moment. - //Need to change all of the convertToSI functions to support LAB/PVT-M - - if (units_string == "METRIC") { - table_unit_type = UnitSystem::UNIT_TYPE_METRIC; - } - else if (units_string == "FIELD") { - table_unit_type = UnitSystem::UNIT_TYPE_FIELD; - } - else if (units_string == "LAB") { - throw std::invalid_argument("Unsupported UNITS string: 'LAB'"); - } - else if (units_string == "PVT-M") { - throw std::invalid_argument("Unsupported UNITS string: 'PVT-M'"); - } - else { - throw std::invalid_argument("Invalid UNITS string"); - } - - //Sanity check - if(table_unit_type != deck_unit_system.getType()) { - throw std::invalid_argument("Deck units are not equal VFPPROD table units."); - } - } - - //Quantity in the body of the table - std::string body_string = header.getItem().get< std::string >(0); - if (body_string == "TEMP") { - throw std::invalid_argument("Invalid BODY_DEF string: TEMP not supported"); - } - else if (body_string == "BHP") { - - } - else { - throw std::invalid_argument("Invalid BODY_DEF string"); - } - - - //Get actual rate / flow values - m_flo_data = table.getRecord(1).getItem().getData< double >(); - convertFloToSI(m_flo_type, m_flo_data, deck_unit_system); - - //Get actual tubing head pressure values - m_thp_data = table.getRecord(2).getItem().getData< double >(); - convertTHPToSI(m_thp_data, deck_unit_system); - - //Get actual water fraction values - m_wfr_data = table.getRecord(3).getItem().getData< double >(); - convertWFRToSI(m_wfr_type, m_wfr_data, deck_unit_system); - - //Get actual gas fraction values - m_gfr_data = table.getRecord(4).getItem().getData< double >(); - convertGFRToSI(m_gfr_type, m_gfr_data, deck_unit_system); - - //Get actual gas fraction values - m_alq_data = table.getRecord(5).getItem().getData< double >(); - convertALQToSI(m_alq_type, m_alq_data, deck_unit_system); - - //Finally, read the actual table itself. - size_t nt = m_thp_data.size(); - size_t nw = m_wfr_data.size(); - size_t ng = m_gfr_data.size(); - size_t na = m_alq_data.size(); - size_t nf = m_flo_data.size(); - extents shape; - shape[0] = nt; - shape[1] = nw; - shape[2] = ng; - shape[3] = na; - shape[4] = nf; - m_data.resize(shape); - std::fill_n(m_data.data(), m_data.num_elements(), std::nan("0")); - - //Check that size of table matches size of axis: - if (table.size() != nt*nw*ng*na + 6) { - throw std::invalid_argument("VFPPROD table does not contain enough records."); - } - - //FIXME: Unit for TEMP=Tubing head temperature is not Pressure, see BODY_DEF - const double table_scaling_factor = deck_unit_system.parse("Pressure")->getSIScaling(); - for (size_t i=6; i().get< int >(0) - 1; - int w = record.getItem().get< int >(0) - 1; - int g = record.getItem().get< int >(0) - 1; - int a = record.getItem().get< int >(0) - 1; - - //Rest of values (bottom hole pressure or tubing head temperature) have index of flo value - const std::vector& bhp_tht = record.getItem().getData< double >(); - - if (bhp_tht.size() != nf) { - throw std::invalid_argument("VFPPROD table does not contain enough FLO values."); - } - - for (size_t f=0; f 1.0e10) { - //TODO: Replace with proper log message - std::cerr << "VFPPROD element [" - << t << "," << w << "," << g << "," << a << "," << f - << "]=" << bhp_tht[f] << " too large" << std::endl; - } - m_data[t][w][g][a][f] = table_scaling_factor*bhp_tht[f]; - } - } - - check(table, table_scaling_factor); -} - - - - - - - - - -void VFPProdTable::check(const DeckKeyword& keyword, const double table_scaling_factor) { - //Table number - assert(m_table_num > 0); - - //Misc types - assert(m_flo_type >= FLO_OIL && m_flo_type < FLO_INVALID); - assert(m_wfr_type >= WFR_WOR && m_wfr_type < WFR_INVALID); - assert(m_gfr_type >= GFR_GOR && m_gfr_type < GFR_INVALID); - assert(m_alq_type >= ALQ_GRAT && m_alq_type < ALQ_INVALID); - - //Data axis size - assert(m_flo_data.size() > 0); - assert(m_thp_data.size() > 0); - assert(m_wfr_data.size() > 0); - assert(m_gfr_data.size() > 0); - assert(m_alq_data.size() > 0); - - //Data axis sorted? - assert(std::is_sorted(m_flo_data.begin(), m_flo_data.end())); - assert(std::is_sorted(m_thp_data.begin(), m_thp_data.end())); - assert(std::is_sorted(m_wfr_data.begin(), m_wfr_data.end())); - assert(std::is_sorted(m_gfr_data.begin(), m_gfr_data.end())); - assert(std::is_sorted(m_alq_data.begin(), m_alq_data.end())); - - //Check data size matches axes - assert(m_data.num_dimensions() == 5); - assert(m_data.shape()[0] == m_thp_data.size()); - assert(m_data.shape()[1] == m_wfr_data.size()); - assert(m_data.shape()[2] == m_gfr_data.size()); - assert(m_data.shape()[3] == m_alq_data.size()); - assert(m_data.shape()[4] == m_flo_data.size()); - - - //Check that all elements have been set - typedef array_type::size_type size_type; - for (size_type t=0; t& values, - const double& scaling_factor) { - if (scaling_factor == 1.0) { - return; - } - else { - for (size_t i=0; i& values, - const UnitSystem& unit_system) { - double scaling_factor = 1.0; - switch (type) { - case FLO_OIL: - case FLO_LIQ: - scaling_factor = unit_system.parse("LiquidSurfaceVolume/Time")->getSIScaling(); - break; - case FLO_GAS: - scaling_factor = unit_system.parse("GasSurfaceVolume/Time")->getSIScaling(); - break; - default: - throw std::logic_error("Invalid FLO type"); - } - scaleValues(values, scaling_factor); -} - - - - - - - -void VFPProdTable::convertTHPToSI(std::vector& values, - const UnitSystem& unit_system) { - double scaling_factor = unit_system.parse("Pressure")->getSIScaling(); - scaleValues(values, scaling_factor); -} - - - - - - - -void VFPProdTable::convertWFRToSI(const WFR_TYPE& type, - std::vector& values, - const UnitSystem& unit_system) { - double scaling_factor = 1.0; - switch (type) { - case WFR_WOR: - case WFR_WCT: - scaling_factor = unit_system.parse("LiquidSurfaceVolume/LiquidSurfaceVolume")->getSIScaling(); - break; - case WFR_WGR: - scaling_factor = unit_system.parse("LiquidSurfaceVolume/GasSurfaceVolume")->getSIScaling(); - break; - default: - throw std::logic_error("Invalid FLO type"); - } - scaleValues(values, scaling_factor); -} - - - - - - - -void VFPProdTable::convertGFRToSI(const GFR_TYPE& type, - std::vector& values, - const UnitSystem& unit_system) { - double scaling_factor = 1.0; - switch (type) { - case GFR_GOR: - case GFR_GLR: - scaling_factor = unit_system.parse("GasSurfaceVolume/LiquidSurfaceVolume")->getSIScaling(); - break; - case GFR_OGR: - scaling_factor = unit_system.parse("LiquidSurfaceVolume/GasSurfaceVolume")->getSIScaling(); - break; - default: - throw std::logic_error("Invalid FLO type"); - } - scaleValues(values, scaling_factor); -} - - - - - - - -void VFPProdTable::convertALQToSI(const ALQ_TYPE& type, - std::vector& values, - const UnitSystem& unit_system) { - double scaling_factor = 1.0; - switch (type) { - case ALQ_GRAT: - scaling_factor = unit_system.parse("GasSurfaceVolume/Time")->getSIScaling(); - break; - case ALQ_IGLR: - case ALQ_TGLR: - scaling_factor = unit_system.parse("GasSurfaceVolume/LiquidSurfaceVolume")->getSIScaling(); - break; - case ALQ_PUMP: - case ALQ_COMP: - case ALQ_BEAN: - case ALQ_UNDEF: - break; - default: - throw std::logic_error("Invalid FLO type"); - } - scaleValues(values, scaling_factor); -} - - - -const MessageContainer& VFPProdTable::getMessageContainer() const -{ - return m_messages; -} - - -} //Namespace opm diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/VFPProdTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/VFPProdTable.hpp deleted file mode 100644 index cb45815e7f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/VFPProdTable.hpp +++ /dev/null @@ -1,286 +0,0 @@ -/* - Copyright 2015 SINTEF ICT, Applied Mathematics. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef OPM_PARSER_ECLIPSE_ECLIPSESTATE_TABLES_VFPPRODTABLE_HPP_ -#define OPM_PARSER_ECLIPSE_ECLIPSESTATE_TABLES_VFPPRODTABLE_HPP_ - - -#include - -#include - -namespace Opm { - - class DeckItem; - class DeckKeyword; - class UnitSystem; - -/** - * Class for reading data from a VFPPROD (vertical flow performance production) table - */ -class VFPProdTable { -public: - typedef boost::multi_array array_type; - typedef boost::array extents; - - ///Rate type - enum FLO_TYPE { - FLO_OIL=1, //< Oil rate - FLO_LIQ, //< Liquid rate - FLO_GAS, //< Gas rate - FLO_INVALID - }; - - ///Water fraction variable - enum WFR_TYPE { - WFR_WOR=11, //< Water-oil ratio - WFR_WCT, //< Water cut - WFR_WGR, //< Water-gas ratio - WFR_INVALID - }; - - ///Gas fraction variable - enum GFR_TYPE { - GFR_GOR=21, //< Gas-oil ratio - GFR_GLR, //< Gas-liquid ratio - GFR_OGR, //< Oil-gas ratio - GFR_INVALID - }; - - ///Artificial lift quantity - enum ALQ_TYPE { - ALQ_GRAT=31, //< Lift as injection rate - ALQ_IGLR, //< Injection gas-liquid ratio - ALQ_TGLR, //< Total gas-liquid ratio - ALQ_PUMP, //< Pump rating - ALQ_COMP, //< Compressor power - ALQ_BEAN, //< Choke diameter - ALQ_UNDEF, //< Undefined - ALQ_INVALID - }; - - /** - * Constructor - */ - inline VFPProdTable() : m_table_num(-1), - m_datum_depth(-1), - m_flo_type(FLO_INVALID), - m_wfr_type(WFR_INVALID), - m_gfr_type(GFR_INVALID), - m_alq_type(ALQ_INVALID) { - - } - - /** - * Initializes objects from raw data. NOTE: All raw data assumed to be in SI units - * @param table_num VFP table number - * @param datum_depth Reference depth for BHP - * @param flo_type Specifies what flo_data represents - * @param wfr_type Specifies what wfr_data represents - * @param gfr_type Specifies what gfr_data represents - * @param alq_type Specifies what alq_data represents - * @param flo_data Axis for flo_type - * @param thp_data Axis for tubing head pressure - * @param wfr_data Axis for wfr_type - * @param gfr_data Axis for gfr_type - * @param alq_data Axis for alq_type - * @param data BHP to be interpolated. Given as a 5D array so that - * BHP = data[thp][wfr][gfr][alq][flo] for the indices thp, wfr, etc. - */ - void init(int table_num, - double datum_depth, - FLO_TYPE flo_type, - WFR_TYPE wfr_type, - GFR_TYPE gfr_type, - ALQ_TYPE alq_type, - const std::vector& flo_data, - const std::vector& thp_data, - const std::vector& wfr_data, - const std::vector& gfr_data, - const std::vector& alq_data, - const array_type& data); - - /** - * Constructor which parses a deck keyword and retrieves the relevant parts for a - * VFP table. - */ - void init( const DeckKeyword& table, const UnitSystem& deck_unit_system); - - /** - * Returns the table number - * @return table number - */ - inline int getTableNum() const { - return m_table_num; - } - - /** - * Returns the datum depth for the table data - * @return datum depth - */ - inline double getDatumDepth() const { - return m_datum_depth; - } - - /** - * Returns the rate/flo type for the flo axis - * @return flo type - */ - inline FLO_TYPE getFloType() const { - return m_flo_type; - } - - /** - * Returns the water fraction type for the WFR axis - * @return water fraction type - */ - inline WFR_TYPE getWFRType() const { - return m_wfr_type; - } - - /** - * Returns the gas fraction type for the GFR axis - * @return gas fraction type - */ - inline GFR_TYPE getGFRType() const { - return m_gfr_type; - } - - /** - * Returns the artificial lift quantity type for the ALQ axis - * @return artificial lift quantity type - */ - inline ALQ_TYPE getALQType() const { - return m_alq_type; - } - - /** - * Returns the coordinates of the FLO sample points in the table - * @return Flo sample coordinates - */ - inline const std::vector& getFloAxis() const { - return m_flo_data; - } - - /** - * Returns the coordinates for the tubing head pressure sample points in the table - * @return Tubing head pressure coordinates - */ - inline const std::vector& getTHPAxis() const { - return m_thp_data; - } - - /** - * Returns the coordinates for the water fraction sample points in the table - * @return Water fraction coordinates - */ - inline const std::vector& getWFRAxis() const { - return m_wfr_data; - } - - /** - * Returns the coordinates for the gas fraction sample points in the table - * @return Gas fraction coordinates - */ - inline const std::vector& getGFRAxis() const { - return m_gfr_data; - } - - /** - * Returns the coordinates for the artificial lift quantity points in the table - * @return Artificial lift quantity coordinates - */ - inline const std::vector& getALQAxis() const { - return m_alq_data; - } - - /** - * Returns the data of the table itself. The data is ordered so that - * - * table = getTable(); - * bhp = table[thp_idx][wfr_idx][gfr_idx][alq_idx][flo_idx]; - * - * gives the bottom hole pressure value in the table for the coordinate - * given by - * flo_axis = getFloAxis(); - * thp_axis = getTHPAxis(); - * ... - * - * flo_coord = flo_axis(flo_idx); - * thp_coord = thp_axis(thp_idx); - * ... - */ - inline const array_type& getTable() const { - return m_data; - } - - const MessageContainer& getMessageContainer() const; - -private: - - //"Header" variables - int m_table_num; - double m_datum_depth; - FLO_TYPE m_flo_type; - WFR_TYPE m_wfr_type; - GFR_TYPE m_gfr_type; - ALQ_TYPE m_alq_type; - - //The actual table axes - std::vector m_flo_data; - std::vector m_thp_data; - std::vector m_wfr_data; - std::vector m_gfr_data; - std::vector m_alq_data; - - //The data itself, using the data ordering m_data[thp][wfr][gfr][alq][flo] - array_type m_data; - - MessageContainer m_messages; - /** - * Debug function that runs a series of asserts to check for sanity of inputs. - * Called after init to check that everything looks ok. - */ - void check(const DeckKeyword& table, const double factor); - - static void scaleValues(std::vector& values, - const double& scaling_factor); - - static void convertFloToSI(const FLO_TYPE& type, - std::vector& values, - const UnitSystem& unit_system); - static void convertTHPToSI(std::vector& values, - const UnitSystem& unit_system); - static void convertWFRToSI(const WFR_TYPE& type, - std::vector& values, - const UnitSystem& unit_system); - static void convertGFRToSI(const GFR_TYPE& type, - std::vector& values, - const UnitSystem& unit_system); - static void convertALQToSI(const ALQ_TYPE& type, - std::vector& values, - const UnitSystem& unit_system); -}; - - - -} //Namespace opm - - -#endif /* OPM_PARSER_ECLIPSE_ECLIPSESTATE_TABLES_VFPPRODTABLE_HPP_ */ diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/WatvisctTable.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/WatvisctTable.hpp deleted file mode 100644 index 944a7ba137..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/WatvisctTable.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/* - Copyright (C) 2015 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef OPM_PARSER_WATVISCT_TABLE_HPP -#define OPM_PARSER_WATVISCT_TABLE_HPP - -#include "SimpleTable.hpp" - -namespace Opm { - - class WatvisctTable : public SimpleTable { - public: - WatvisctTable( const DeckItem& item ); - - const TableColumn& getTemperatureColumn() const; - const TableColumn& getWaterViscosityColumn() const; - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/tests/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/tests/CMakeLists.txt deleted file mode 100644 index 8bd5842a2a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/tests/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -foreach(tapp TableManagerTests - TabdimsTests - TableContainerTests - SimpleTableTests - ColumnSchemaTests - TableSchemaTests - TableColumnTests - PvtxTableTests) - - opm_add_test(run${tapp} SOURCES ${tapp}.cpp - LIBRARIES opmparser ${Boost_LIBRARIES}) - -endforeach() diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/tests/ColumnSchemaTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/tests/ColumnSchemaTests.cpp deleted file mode 100644 index f3d7584204..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/tests/ColumnSchemaTests.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/* - Copyright (C) 2015 by Statoil ASA - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE ColumnSchemaTests - -#include - - -#include - -using namespace Opm; - - -BOOST_AUTO_TEST_CASE( CreateTest ) { - ColumnSchema schema("Name" , Table::INCREASING , Table::DEFAULT_NONE); - BOOST_CHECK_EQUAL( schema.name() , "Name"); - BOOST_CHECK_THROW( schema.getDefaultValue() , std::invalid_argument ); -} - - -BOOST_AUTO_TEST_CASE( CreateDefaultConst ) { - ColumnSchema schema("Name" , Table::INCREASING , 1.76); - BOOST_CHECK_EQUAL( schema.name() , "Name"); - BOOST_CHECK_EQUAL( schema.getDefaultMode() , Table::DEFAULT_CONST ); - BOOST_CHECK_EQUAL( schema.getDefaultValue() , 1.76 ); -} - - -BOOST_AUTO_TEST_CASE( TestOrder) { - { - ColumnSchema schema("Name" , Table::INCREASING , Table::DEFAULT_NONE); - BOOST_CHECK_EQUAL( true , schema.validOrder( 0 , 0 ) ); - BOOST_CHECK_EQUAL( true , schema.validOrder( 0 , 1 ) ); - BOOST_CHECK_EQUAL( false , schema.validOrder( 1 , 0 ) ); - } - - { - ColumnSchema schema("Name" , Table::DECREASING , Table::DEFAULT_NONE); - BOOST_CHECK_EQUAL( true , schema.validOrder( 0 , 0 ) ); - BOOST_CHECK_EQUAL( false , schema.validOrder( 0 , 1 ) ); - BOOST_CHECK_EQUAL( true , schema.validOrder( 1 , 0 ) ); - } - - { - ColumnSchema schema("Name" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE); - BOOST_CHECK_EQUAL( false , schema.validOrder( 0 , 0 ) ); - BOOST_CHECK_EQUAL( true , schema.validOrder( 0 , 1 ) ); - BOOST_CHECK_EQUAL( false , schema.validOrder( 1 , 0 ) ); - } - - { - ColumnSchema schema("Name" , Table::STRICTLY_DECREASING , Table::DEFAULT_NONE); - BOOST_CHECK_EQUAL( false , schema.validOrder( 0 , 0 ) ); - BOOST_CHECK_EQUAL( false , schema.validOrder( 0 , 1 ) ); - BOOST_CHECK_EQUAL( true , schema.validOrder( 1 , 0 ) ); - } -} - - -BOOST_AUTO_TEST_CASE( CanLookup ) { - ColumnSchema schema1("Name" , Table::INCREASING , Table::DEFAULT_NONE); - ColumnSchema schema2("Name" , Table::RANDOM , Table::DEFAULT_NONE); - - BOOST_CHECK( schema1.lookupValid( ) ); - BOOST_CHECK( !schema2.lookupValid( ) ); -} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/tests/PvtxTableTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/tests/PvtxTableTests.cpp deleted file mode 100644 index 1431e594fe..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/tests/PvtxTableTests.cpp +++ /dev/null @@ -1,152 +0,0 @@ -/* - Copyright (C) 2013 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE PvtxTableTests - -#include - -#include -#include -#include -#include - -// generic table classes -#include -#include -#include - -// keyword specific table classes -//#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -using namespace Opm; - - -BOOST_AUTO_TEST_CASE( PvtxNumTables1 ) { - ParserPtr parser(new Parser()); - boost::filesystem::path deckFile("testdata/integration_tests/TABLES/PVTX1.DATA"); - ParseContext parseContext; - DeckPtr deck = parser->parseFile(deckFile.string(), parseContext); - BOOST_CHECK_EQUAL( PvtxTable::numTables( deck->getKeyword()) , 1); - - auto ranges = PvtxTable::recordRanges( deck->getKeyword() ); - auto range = ranges[0]; - BOOST_CHECK_EQUAL( range.first , 0 ); - BOOST_CHECK_EQUAL( range.second , 2 ); -} - - -BOOST_AUTO_TEST_CASE( PvtxNumTables2 ) { - ParserPtr parser(new Parser()); - boost::filesystem::path deckFile("testdata/integration_tests/TABLES/PVTO2.DATA"); - ParseContext parseContext; - DeckPtr deck = parser->parseFile(deckFile.string(), parseContext); - BOOST_CHECK_EQUAL( PvtxTable::numTables( deck->getKeyword()) , 3); - - auto ranges = PvtxTable::recordRanges( deck->getKeyword() ); - auto range1 = ranges[0]; - BOOST_CHECK_EQUAL( range1.first , 0 ); - BOOST_CHECK_EQUAL( range1.second , 41 ); - - auto range2 = ranges[1]; - BOOST_CHECK_EQUAL( range2.first , 42 ); - BOOST_CHECK_EQUAL( range2.second , 43 ); - - auto range3 = ranges[2]; - BOOST_CHECK_EQUAL( range3.first , 44 ); - BOOST_CHECK_EQUAL( range3.second , 46 ); -} - -BOOST_AUTO_TEST_CASE( PvtxNumTables3 ) { - const char *deckData = - "TABDIMS\n" - "1 2 /\n" - "\n" - "PVTO\n" - " 1 2 3 4" - " 5 6 7/\n" - " 8 9 10 11 /\n" - "/\n" - "12 13 14 15\n" - " 16 17 18/\n" - "19 20 21 22/\n" - "/\n"; - - Opm::ParserPtr parser(new Opm::Parser); - Opm::DeckConstPtr deck(parser->parseString(deckData, Opm::ParseContext())); - - auto ranges = PvtxTable::recordRanges( deck->getKeyword() ); - BOOST_CHECK_EQUAL( 2 ,ranges.size() ); - - auto range1 = ranges[0]; - BOOST_CHECK_EQUAL( range1.first , 0 ); - BOOST_CHECK_EQUAL( range1.second , 2 ); - - auto range2 = ranges[1]; - BOOST_CHECK_EQUAL( range2.first , 3 ); - BOOST_CHECK_EQUAL( range2.second , 5 ); -} - - - -BOOST_AUTO_TEST_CASE( PVTOSaturatedTable ) { - ParserPtr parser(new Parser()); - boost::filesystem::path deckFile("testdata/integration_tests/TABLES/PVTX1.DATA"); - ParseContext parseContext; - DeckPtr deck = parser->parseFile(deckFile.string(), parseContext); - Opm::TableManager tables(*deck); - const auto& pvtoTables = tables.getPvtoTables( ); - const auto& pvtoTable = pvtoTables[0]; - - const auto& saturatedTable = pvtoTable.getSaturatedTable( ); - BOOST_CHECK_EQUAL( saturatedTable.numColumns( ) , 4 ); - BOOST_CHECK_EQUAL( saturatedTable.numRows( ) , 2 ); - - BOOST_CHECK_EQUAL( saturatedTable.get(0 , 0) , 20.59 ); - BOOST_CHECK_EQUAL( saturatedTable.get(0 , 1) , 28.19 ); -} - - -BOOST_AUTO_TEST_CASE( PVTGSaturatedTable ) { - ParserPtr parser(new Parser()); - boost::filesystem::path deckFile("testdata/integration_tests/TABLES/PVTX1.DATA"); - ParseContext parseContext; - DeckPtr deck = parser->parseFile(deckFile.string(), parseContext); - Opm::TableManager tables(*deck); - const auto& pvtgTables = tables.getPvtgTables( ); - const auto& pvtgTable = pvtgTables[0]; - - const auto& saturatedTable = pvtgTable.getSaturatedTable( ); - BOOST_CHECK_EQUAL( saturatedTable.numColumns( ) , 4 ); - BOOST_CHECK_EQUAL( saturatedTable.numRows( ) , 2 ); - - BOOST_CHECK_EQUAL( saturatedTable.get(1 , 0) , 0.00002448 ); - BOOST_CHECK_EQUAL( saturatedTable.get(1 , 1) , 0.00000628 ); -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/tests/SimpleTableTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/tests/SimpleTableTests.cpp deleted file mode 100644 index 9cc4f912ae..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/tests/SimpleTableTests.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - Copyright (C) 2015 by Statoil ASA - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE SimpleTableTests - -#include - - -#include -#include -#include -#include -#include - -using namespace Opm; - - -BOOST_AUTO_TEST_CASE( CreateTest ) { - std::shared_ptr schema = std::make_shared( ); - - { - ColumnSchema col1("Name1" , Table::INCREASING , Table::DEFAULT_NONE); - ColumnSchema col2("Name2" , Table::INCREASING , Table::DEFAULT_NONE); - schema->addColumn( col1 ); - schema->addColumn( col2 ); - } - - SimpleTable table(schema); - - BOOST_CHECK_THROW( table.addRow( {1,2,3} ), std::invalid_argument); - table.addRow( {1,2} ); - table.addRow( {3,4} ); - - { - const auto& col1 = table.getColumn( 0 ); - const auto& col2 = table.getColumn( 1 ); - - - BOOST_CHECK_EQUAL( col1[0] , 1 ); - BOOST_CHECK_EQUAL( col2[0] , 2 ); - BOOST_CHECK_EQUAL( col1[1] , 3 ); - BOOST_CHECK_EQUAL( col2[1] , 4 ); - } - - BOOST_CHECK_THROW( table.get("NameX" , 0) , std::invalid_argument); - BOOST_CHECK_THROW( table.get(3 , 0) , std::invalid_argument); - - BOOST_CHECK_THROW( table.get("Name1" , 3) , std::invalid_argument); - BOOST_CHECK_THROW( table.get(0 , 3) , std::invalid_argument); - - - BOOST_CHECK_EQUAL( table.get("Name1" , 0) , 1 ); - BOOST_CHECK_EQUAL( table.get("Name1" , 1) , 3 ); - BOOST_CHECK_EQUAL( table.get(0 , 0) , 1 ); - BOOST_CHECK_EQUAL( table.get(0 , 1) , 3 ); - - BOOST_CHECK_EQUAL( table.get("Name2" , 0) , 2 ); - BOOST_CHECK_EQUAL( table.get("Name2" , 1) , 4 ); - BOOST_CHECK_EQUAL( table.get(1 , 0) , 2 ); - BOOST_CHECK_EQUAL( table.get(1 , 1) , 4 ); - - { - const auto& col = table.getColumn("Name1"); - auto exportCol = col.vectorCopy(); - - BOOST_CHECK_EQUAL( col.size() , exportCol.size()); - for (size_t i = 0; i < col.size(); i++) - BOOST_CHECK_EQUAL( col[i] , exportCol[i]); - } -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/tests/TabdimsTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/tests/TabdimsTests.cpp deleted file mode 100644 index 1fa0de25bf..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/tests/TabdimsTests.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/* - Copyright (C) 2015 Statoil ASA - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#define BOOST_TEST_MODULE TABDIMS_TESTS -#include - -#include - -BOOST_AUTO_TEST_CASE(TEST_CREATE) { - Opm::Tabdims tabdims1(1,2,3,4,5,6); - Opm::Tabdims tabdims2; - - BOOST_CHECK_EQUAL( tabdims1.getNumSatNodes() , 3U ); - BOOST_CHECK_EQUAL( tabdims2.getNumSatNodes() , 20U ); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/tests/TableColumnTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/tests/TableColumnTests.cpp deleted file mode 100644 index e37f74758f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/tests/TableColumnTests.cpp +++ /dev/null @@ -1,324 +0,0 @@ -/* - Copyright (C) 2015 by Statoil ASA - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE TableColumnTests - -#include - - -#include -#include -#include - -using namespace Opm; - - -BOOST_AUTO_TEST_CASE( CreateTest ) { - ColumnSchema schema("COLUMN" , Table::STRICTLY_INCREASING , Table::DEFAULT_LINEAR ); - TableColumn column( schema ); - BOOST_CHECK_EQUAL( column.size() , 0 ); - - column.addValue( 0 ); - column.addValue( 1 ); - column.addValue( 2 ); - - BOOST_CHECK_EQUAL( column.size() , 3 ); - - BOOST_CHECK_EQUAL( column[0] , 0 ); - BOOST_CHECK_EQUAL( column[1] , 1 ); - BOOST_CHECK_EQUAL( column[2] , 2 ); - - BOOST_CHECK_THROW( column[3] , std::invalid_argument ); - - { - std::vector cp(column.size()); - std::copy( column.begin() , column.end() , cp.begin()); - - for (size_t i = 0; i < column.size(); i++) - BOOST_CHECK_EQUAL( column[i] , cp[i] ); - } -} - - - -BOOST_AUTO_TEST_CASE( TestDefault ) { - ColumnSchema schema("COLUMN" , Table::STRICTLY_INCREASING , Table::DEFAULT_LINEAR ); - TableColumn column( schema ); - - - column.addDefault( ); - column.addDefault( ); - column.addDefault( ); - BOOST_CHECK_EQUAL( column.size() , 3 ); - BOOST_CHECK_THROW( column[0] , std::invalid_argument ); - - column.updateValue(0 , 10); - BOOST_CHECK_EQUAL( column[0] , 10 ); - BOOST_CHECK( column.hasDefault( ) ); -} - - -BOOST_AUTO_TEST_CASE( TestAscending ) { - ColumnSchema schema("COLUMN" , Table::STRICTLY_INCREASING , Table::DEFAULT_LINEAR); - TableColumn column( schema ); - - BOOST_CHECK_EQUAL( column.size() , 0 ); - - column.addValue( 10 ); - BOOST_CHECK_THROW( column.addValue( 9 ) , std::invalid_argument ); - column.addDefault( ); - BOOST_CHECK( column.hasDefault( ) ); - BOOST_CHECK_THROW( column.updateValue( 1, 9 ) , std::invalid_argument ); - column.addValue( 12 ); - BOOST_CHECK_THROW( column.updateValue( 1, 13 ) , std::invalid_argument ); - column.updateValue( 1, 11 ); - - column.addDefault( ); - column.addDefault( ); - column.addDefault( ); - column.addValue(16); - - column.updateValue( 3,13 ); - column.updateValue( 4,14 ); - column.updateValue( 5,15 ); - BOOST_CHECK( !column.hasDefault( ) ); -} - - -BOOST_AUTO_TEST_CASE( TestWeaklyAscending ) { - ColumnSchema schema("COLUMN" , Table::INCREASING , Table::DEFAULT_LINEAR); - TableColumn column( schema ); - - column.addValue(1); - column.addValue(1); - - BOOST_CHECK( !column.hasDefault( ) ); -} - - -BOOST_AUTO_TEST_CASE( TestDescending ) { - ColumnSchema schema("COLUMN" , Table::STRICTLY_DECREASING , Table::DEFAULT_LINEAR); - TableColumn column( schema ); - - BOOST_CHECK_EQUAL( column.size() , 0 ); - - column.addValue( -10 ); - BOOST_CHECK_THROW( column.addValue( -9 ) , std::invalid_argument ); - column.addDefault( ); - BOOST_CHECK_THROW( column.updateValue( 1, -9 ) , std::invalid_argument ); - column.addValue( -12 ); - BOOST_CHECK_THROW( column.updateValue( 1, -13 ) , std::invalid_argument ); - column.updateValue( 1, -11 ); - - column.addDefault( ); - column.addDefault( ); - column.addDefault( ); - column.addValue(-16); - - column.updateValue( 3,-13 ); - column.updateValue( 4,-14 ); - column.updateValue( 5,-15 ); -} - - -BOOST_AUTO_TEST_CASE( TestDEFAULT_NONE) { - ColumnSchema schema("COLUMN" , Table::STRICTLY_DECREASING , Table::DEFAULT_NONE); - TableColumn column( schema ); - - BOOST_CHECK_THROW( column.addDefault( ) , std::invalid_argument ); -} - - -BOOST_AUTO_TEST_CASE( Test_MIN_MAX) { - ColumnSchema schema("COLUMN" , Table::RANDOM , Table::DEFAULT_LINEAR); - TableColumn column( schema ); - - BOOST_CHECK_THROW( column.max( ) , std::invalid_argument ); - BOOST_CHECK_THROW( column.min( ) , std::invalid_argument ); - - column.addValue( 1 ); - BOOST_CHECK_EQUAL( 1 , column.min() ); - BOOST_CHECK_EQUAL( 1 , column.max() ); - - column.addValue( 100 ); - BOOST_CHECK_EQUAL( 1 , column.min() ); - BOOST_CHECK_EQUAL( 100 , column.max() ); - - column.addValue( 50 ); - BOOST_CHECK_EQUAL( 1 , column.min() ); - BOOST_CHECK_EQUAL( 100 , column.max() ); - - column.addDefault( ); - BOOST_CHECK_THROW( column.max( ) , std::invalid_argument ); - BOOST_CHECK_THROW( column.min( ) , std::invalid_argument ); - - column.updateValue( 3 , 67 ); - BOOST_CHECK_EQUAL( 1 , column.min() ); - BOOST_CHECK_EQUAL( 100 , column.max() ); -} - -BOOST_AUTO_TEST_CASE( Test_IN_RANGE) { - ColumnSchema schema("COLUMN" , Table::RANDOM , Table::DEFAULT_LINEAR); - TableColumn column( schema ); - - column.addValue(10); - column.addValue(20); - BOOST_CHECK_THROW( column.inRange( 15 ) , std::invalid_argument ); - - - ColumnSchema schema2("COLUMN" , Table::INCREASING, Table::DEFAULT_LINEAR); - TableColumn column2( schema2 ); - - - BOOST_CHECK_THROW( column2.inRange( 15 ) , std::invalid_argument ); - column2.addValue(10); - BOOST_CHECK_THROW( column2.inRange( 15 ) , std::invalid_argument ); - column2.addValue(20); - BOOST_CHECK( column2.inRange( 15 )); - BOOST_CHECK( column2.inRange( 10 )); - BOOST_CHECK( column2.inRange( 20 )); - - BOOST_CHECK( !column2.inRange( 9 )); - BOOST_CHECK( !column2.inRange( 21 )); - - column2.addDefault( ); - BOOST_CHECK_THROW( column2.inRange( 15 ) , std::invalid_argument ); -} - - - -BOOST_AUTO_TEST_CASE( Test_Table_Index ) { - { - ColumnSchema schema("COLUMN" , Table::RANDOM , Table::DEFAULT_NONE); - TableColumn column( schema ); - - /* Can not look up with random ordering */ - BOOST_CHECK_THROW( column.lookup( 0.67 ) , std::invalid_argument ); - } - - { - ColumnSchema schema("COLUMN" , Table::INCREASING , Table::DEFAULT_LINEAR); - TableColumn column( schema ); - - /* Can not look up in empty column */ - BOOST_CHECK_THROW( column.lookup( 0.67 ) , std::invalid_argument ); - - column.addValue( 10 ); - - column.addDefault( ); - /* Can not look up in column with defaults */ - BOOST_CHECK_THROW( column.lookup( 0.67 ) , std::invalid_argument ); - - - column.updateValue(1 , 20 ); - } -} - - -BOOST_AUTO_TEST_CASE( Test_EVAL_INCREASING ) { - ColumnSchema schema("COLUMN" , Table::INCREASING , Table::DEFAULT_LINEAR); - TableColumn column( schema ); - - column.addValue(0); - - /* Out of range - constant end-point extrapolation , size = 1*/ - BOOST_CHECK_EQUAL( column.eval( column.lookup( -1 )) , 0 ); - BOOST_CHECK_EQUAL( column.eval( column.lookup( 1 )) , 0 ); - - - column.addValue(1); - column.addValue(2); - column.addValue(3); - - BOOST_CHECK_EQUAL( column.eval( column.lookup( 0 )) , 0 ); - BOOST_CHECK_EQUAL( column.eval( column.lookup( 1 )) , 1 ); - BOOST_CHECK_EQUAL( column.eval( column.lookup( 2 )) , 2 ); - BOOST_CHECK_EQUAL( column.eval( column.lookup( 3 )) , 3 ); - - BOOST_CHECK_EQUAL( column.eval( column.lookup( 0.25 )) , 0.25 ); - BOOST_CHECK_EQUAL( column.eval( column.lookup( 1.75 )) , 1.75 ); - BOOST_CHECK_EQUAL( column.eval( column.lookup( 2.5 )) , 2.5 ); - - /* Out of range - constant end-point extrapolation */ - BOOST_CHECK_EQUAL( column.eval( column.lookup( -1 )) , 0 ); - BOOST_CHECK_EQUAL( column.eval( column.lookup( 4 )) , 3 ); -} - - -BOOST_AUTO_TEST_CASE( Test_EVAL_DECREASING ) { - ColumnSchema schema("COLUMN" , Table::DECREASING , Table::DEFAULT_LINEAR); - TableColumn column( schema ); - - column.addValue(3); - column.addValue(2); - column.addValue(1); - column.addValue(0); - - BOOST_CHECK_EQUAL( column.eval( column.lookup( 0 )) , 0 ); - BOOST_CHECK_EQUAL( column.eval( column.lookup( 1 )) , 1 ); - BOOST_CHECK_EQUAL( column.eval( column.lookup( 2 )) , 2 ); - BOOST_CHECK_EQUAL( column.eval( column.lookup( 3 )) , 3 ); - - BOOST_CHECK_EQUAL( column.eval( column.lookup( 0.25 )) , 0.25 ); - BOOST_CHECK_EQUAL( column.eval( column.lookup( 1.75 )) , 1.75 ); - BOOST_CHECK_EQUAL( column.eval( column.lookup( 2.5 )) , 2.5 ); - - /* Out of range - constant end-point extrapolation */ - BOOST_CHECK_EQUAL( column.eval( column.lookup( -1 )) , 0 ); - BOOST_CHECK_EQUAL( column.eval( column.lookup( 4 )) , 3 ); -} - - - - -BOOST_AUTO_TEST_CASE( Test_CONST_DEFAULT ) { - ColumnSchema schema("COLUMN" , Table::DECREASING , 1.0); - TableColumn column( schema ); - column.addDefault( ); - column.addDefault( ); - BOOST_CHECK( !column.hasDefault( ) ); - - BOOST_CHECK_EQUAL( column[0] , 1.0 ); - BOOST_CHECK_EQUAL( column[1] , 1.0 ); -} - - -BOOST_AUTO_TEST_CASE( Test_LINEAR_DEFAULT ) { - ColumnSchema argSchema("COLUMN" , Table::INCREASING , Table::DEFAULT_NONE); - ColumnSchema valueSchema("COLUMN" , Table::RANDOM , Table::DEFAULT_LINEAR); - TableColumn argColumn( argSchema ); - TableColumn valueColumn( valueSchema ); - - argColumn.addValue( 0 ); valueColumn.addValue( 0 ); - argColumn.addValue( 0.05 ); valueColumn.addDefault( ); - argColumn.addValue( 0.10 ); valueColumn.addValue(1.0); - argColumn.addValue( 0.50 ); valueColumn.addDefault( ); - argColumn.addValue( 0.80 ); valueColumn.addValue(1.0); - argColumn.addValue( 0.95 ); valueColumn.addDefault( ); - argColumn.addValue( 1.00 ); - - BOOST_CHECK_THROW( valueColumn.applyDefaults( argColumn ) , std::invalid_argument ); - valueColumn.addValue(0.0); - valueColumn.applyDefaults( argColumn ); - - BOOST_CHECK( !valueColumn.hasDefault( ) ); - BOOST_CHECK_CLOSE( valueColumn[1] , 0.50 , 1e-6); - BOOST_CHECK_CLOSE( valueColumn[3] , 1.00 , 1e-6); - BOOST_CHECK_CLOSE( valueColumn[5] , 0.25 , 1e-6); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/tests/TableContainerTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/tests/TableContainerTests.cpp deleted file mode 100644 index 293940aca4..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/tests/TableContainerTests.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/* - Copyright (C) 2013 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE TableContainerTests - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -inline std::shared_ptr createSWOFDeck() { - const char *deckData = - "TABDIMS\n" - " 2 /\n" - "\n" - "SWOF\n" - " 1 2 3 4\n" - " 5 6 7 8 /\n" - " 9 10 11 12 /\n"; - - Opm::Parser parser; - Opm::DeckConstPtr deck(parser.parseString(deckData, Opm::ParseContext())); - return deck; -} - -BOOST_AUTO_TEST_CASE( CreateContainer ) { - std::vector columnNames{"A", "B", "C", "D"}; - Opm::DeckConstPtr deck = createSWOFDeck(); - Opm::TableContainer container(10); - BOOST_CHECK( container.empty() ); - BOOST_CHECK_EQUAL( 0 , container.size() ); - BOOST_CHECK_EQUAL( false , container.hasTable( 1 )); - - std::shared_ptr table = std::make_shared( deck->getKeyword("SWOF").getRecord(0).getItem(0) ); - BOOST_CHECK_THROW( container.addTable( 10 , table ), std::invalid_argument ); - container.addTable( 6 , table ); - BOOST_CHECK_EQUAL( 1 , container.size() ); - - BOOST_CHECK_EQUAL( table.get() , &(container[6])); - BOOST_CHECK_EQUAL( table.get() , &(container[9])); - - BOOST_CHECK_THROW( container[5] , std::invalid_argument ); - BOOST_CHECK_THROW( container[10] , std::invalid_argument ); -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/tests/TableManagerTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/tests/TableManagerTests.cpp deleted file mode 100644 index 330b7ce848..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/tests/TableManagerTests.cpp +++ /dev/null @@ -1,1079 +0,0 @@ -/* - Copyright (C) 2013 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE SimpleTableTests - -#include - -#include -#include -#include - -// generic table classes -#include -#include - -// keyword specific table classes -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -namespace { - -std::shared_ptr createSingleRecordDeck() { - const char *deckData = - "TABDIMS\n" - " 2 /\n" - "\n" - "SWOF\n" - " 1 2 3 4\n" - " 5 6 7 8 /\n" - " 9 10 11 12 /\n"; - - Opm::ParserPtr parser(new Opm::Parser); - Opm::DeckConstPtr deck(parser->parseString(deckData, Opm::ParseContext())); - return deck; -} - - -std::shared_ptr createSingleRecordDeckWithVd() { - const char *deckData = - "RUNSPEC\n" - "ENDSCALE\n" - "2* 1 2 /\n" - "PROPS\n" - "TABDIMS\n" - " 2 /\n" - "\n" - "SWFN\n" - "0.22 .0 7.0 \n" - "0.3 .0 4.0 \n" - "0.5 .24 2.5 \n" - "0.8 .65 1.0 \n" - "0.9 .83 .5 \n" - "1.0 1.00 .0 /\n" - "/\n" - "IMPTVD\n" - "3000.0 6*0.1 0.31 1*0.1\n" - "9000.0 6*0.1 0.32 1*0.1/\n" - "ENPTVD\n" - "3000.0 0.20 0.20 1.0 0.0 0.04 1.0 0.18 0.22\n" - "9000.0 0.22 0.22 1.0 0.0 0.04 1.0 0.18 0.22 /"; - - Opm::ParserPtr parser(new Opm::Parser); - Opm::DeckConstPtr deck(parser->parseString(deckData, Opm::ParseContext())); - return deck; -} - -} - -BOOST_AUTO_TEST_CASE( CreateTables ) { - std::shared_ptr deck = createSingleRecordDeck(); - Opm::TableManager tables(*deck); - auto tabdims = tables.getTabdims(); - BOOST_CHECK_EQUAL( tabdims->getNumSatTables() , 2 ); - BOOST_CHECK( !tables.useImptvd() ); - BOOST_CHECK( !tables.useEnptvd() ); -} - -BOOST_AUTO_TEST_CASE( CreateTablesWithVd ) { - std::shared_ptr deck = createSingleRecordDeckWithVd(); - Opm::TableManager tables(*deck); - auto tabdims = tables.getTabdims(); - BOOST_CHECK_EQUAL( tabdims->getNumSatTables() , 2 ); - BOOST_CHECK( tables.useImptvd() ); - BOOST_CHECK( tables.useEnptvd() ); -} - - -/*****************************************************************/ - - - -BOOST_AUTO_TEST_CASE(SwofTable_Tests) { - const char *deckData = - "TABDIMS\n" - "2 /\n" - "\n" - "SWOF\n" - " 1 2 3 4\n" - " 5 6 7 8/\n" - " 9 10 11 12\n" - " 13 14 15 16\n" - " 17 18 19 20/\n"; - - Opm::ParserPtr parser(new Opm::Parser); - Opm::DeckConstPtr deck(parser->parseString(deckData, Opm::ParseContext())); - - Opm::SwofTable swof1Table(deck->getKeyword("SWOF").getRecord(0).getItem(0)); - Opm::SwofTable swof2Table(deck->getKeyword("SWOF").getRecord(1).getItem(0)); - - BOOST_CHECK_EQUAL(swof1Table.numRows(), 2); - BOOST_CHECK_EQUAL(swof2Table.numRows(), 3); - - BOOST_CHECK_EQUAL(swof1Table.numColumns(), 4); - BOOST_CHECK_EQUAL(swof2Table.numColumns(), 4); - - BOOST_CHECK_EQUAL(swof1Table.getSwColumn().front(), 1.0); - BOOST_CHECK_EQUAL(swof1Table.getSwColumn().back(), 5.0); - - BOOST_CHECK_EQUAL(swof1Table.getKrwColumn().front(), 2.0); - BOOST_CHECK_EQUAL(swof1Table.getKrwColumn().back(), 6.0); - - BOOST_CHECK_EQUAL(swof1Table.getKrowColumn().front(), 3.0); - BOOST_CHECK_EQUAL(swof1Table.getKrowColumn().back(), 7.0); - - BOOST_CHECK_EQUAL(swof1Table.getPcowColumn().front(), 4.0e5); - BOOST_CHECK_EQUAL(swof1Table.getPcowColumn().back(), 8.0e5); - - // for the second table, we only check the first column and trust - // that everything else is fine... - BOOST_CHECK_EQUAL(swof2Table.getSwColumn().front(), 9.0); - BOOST_CHECK_EQUAL(swof2Table.getSwColumn().back(), 17.0); -} - - -BOOST_AUTO_TEST_CASE(SgwfnTable_Tests) { - const char *deckData = - "TABDIMS\n" - "2 /\n" - "\n" - "SGWFN\n" - " 1 2 3 4\n" - " 5 6 7 8/\n" - " 9 10 11 12\n" - " 13 14 15 16\n" - " 17 18 19 20/\n"; - - Opm::ParserPtr parser(new Opm::Parser); - Opm::DeckConstPtr deck(parser->parseString(deckData, Opm::ParseContext())); - - - Opm::SgwfnTable sgwfn1Table(deck->getKeyword("SGWFN").getRecord(0).getItem(0)); - Opm::SgwfnTable sgwfn2Table(deck->getKeyword("SGWFN").getRecord(1).getItem(0)); - - BOOST_CHECK_EQUAL(sgwfn1Table.numRows(), 2); - BOOST_CHECK_EQUAL(sgwfn2Table.numRows(), 3); - - BOOST_CHECK_EQUAL(sgwfn1Table.numColumns(), 4); - BOOST_CHECK_EQUAL(sgwfn2Table.numColumns(), 4); - - BOOST_CHECK_EQUAL(sgwfn1Table.getSgColumn().front(), 1.0); - BOOST_CHECK_EQUAL(sgwfn1Table.getSgColumn().back(), 5.0); - - BOOST_CHECK_EQUAL(sgwfn1Table.getKrgColumn().front(), 2.0); - BOOST_CHECK_EQUAL(sgwfn1Table.getKrgColumn().back(), 6.0); - - BOOST_CHECK_EQUAL(sgwfn1Table.getKrgwColumn().front(), 3.0); - BOOST_CHECK_EQUAL(sgwfn1Table.getKrgwColumn().back(), 7.0); - - BOOST_CHECK_EQUAL(sgwfn1Table.getPcgwColumn().front(), 4.0e5); - BOOST_CHECK_EQUAL(sgwfn1Table.getPcgwColumn().back(), 8.0e5); - - // for the second table, we only check the first column and trust - // that everything else is fine... - BOOST_CHECK_EQUAL(sgwfn2Table.getSgColumn().front(), 9.0); - BOOST_CHECK_EQUAL(sgwfn2Table.getSgColumn().back(), 17.0); -} - -BOOST_AUTO_TEST_CASE(SgofTable_Tests) { - const char *deckData = - "TABDIMS\n" - "2 /\n" - "\n" - "SGOF\n" - " 1 2 3 4\n" - " 5 6 7 8/\n" - " 9 10 11 12\n" - " 13 14 15 16\n" - " 17 18 19 20/\n"; - - Opm::ParserPtr parser(new Opm::Parser); - Opm::DeckConstPtr deck(parser->parseString(deckData, Opm::ParseContext())); - - Opm::SgofTable sgof1Table(deck->getKeyword("SGOF").getRecord(0).getItem(0)); - Opm::SgofTable sgof2Table(deck->getKeyword("SGOF").getRecord(1).getItem(0)); - - BOOST_CHECK_EQUAL(sgof1Table.numRows(), 2); - BOOST_CHECK_EQUAL(sgof2Table.numRows(), 3); - - BOOST_CHECK_EQUAL(sgof1Table.numColumns(), 4); - BOOST_CHECK_EQUAL(sgof2Table.numColumns(), 4); - - BOOST_CHECK_EQUAL(sgof1Table.getSgColumn().front(), 1.0); - BOOST_CHECK_EQUAL(sgof1Table.getSgColumn().back(), 5.0); - - BOOST_CHECK_EQUAL(sgof1Table.getKrgColumn().front(), 2.0); - BOOST_CHECK_EQUAL(sgof1Table.getKrgColumn().back(), 6.0); - - BOOST_CHECK_EQUAL(sgof1Table.getKrogColumn().front(), 3.0); - BOOST_CHECK_EQUAL(sgof1Table.getKrogColumn().back(), 7.0); - - BOOST_CHECK_EQUAL(sgof1Table.getPcogColumn().front(), 4.0e5); - BOOST_CHECK_EQUAL(sgof1Table.getPcogColumn().back(), 8.0e5); - - // for the second table, we only check the first column and trust - // that everything else is fine... - BOOST_CHECK_EQUAL(sgof2Table.getSgColumn().front(), 9.0); - BOOST_CHECK_EQUAL(sgof2Table.getSgColumn().back(), 17.0); -} - -BOOST_AUTO_TEST_CASE(PlyadsTable_Tests) { - { - const char *correctDeckData = - "TABDIMS\n" - "/\n" - "PLYADS\n" - "0.00 0.0 \n" - "0.25 0.000010\n" - "0.50 0.000018\n" - "0.75 0.000023\n" - "1.00 0.000027\n" - "1.25 0.000030\n" - "1.50 0.000030\n" - "1.75 0.000030\n" - "2.00 0.000030\n" - "3.00 0.000030 /\n"; - Opm::ParserPtr parser(new Opm::Parser); - Opm::DeckConstPtr deck(parser->parseString(correctDeckData, Opm::ParseContext())); - const auto& plyadsKeyword = deck->getKeyword("PLYADS"); - Opm::PlyadsTable plyadsTable(plyadsKeyword.getRecord(0).getItem(0)); - - - BOOST_CHECK_CLOSE(plyadsTable.getPolymerConcentrationColumn().front(), 0.0, 1e-6); - BOOST_CHECK_CLOSE(plyadsTable.getPolymerConcentrationColumn().back(), 3.0, 1e-6); - - BOOST_CHECK_CLOSE(plyadsTable.getAdsorbedPolymerColumn().front(), 0.0, 1e-6); - BOOST_CHECK_CLOSE(plyadsTable.getAdsorbedPolymerColumn().back(), 0.000030, 1e-6); - } - - { - // first column not strictly monotonic - const char *incorrectDeckData = - "TABDIMS\n" - "/\n" - "PLYADS\n" - "0.00 0.0 \n" - "0.00 0.000010\n" - "0.50 0.000018\n" - "0.75 0.000023\n" - "1.00 0.000027\n" - "1.25 0.000030\n" - "1.50 0.000030\n" - "1.75 0.000030\n" - "2.00 0.000030\n" - "3.00 0.000030 /\n"; - Opm::ParserPtr parser(new Opm::Parser); - Opm::DeckConstPtr deck(parser->parseString(incorrectDeckData, Opm::ParseContext())); - const auto& plyadsKeyword = deck->getKeyword("PLYADS"); - - BOOST_CHECK_THROW(Opm::PlyadsTable(plyadsKeyword.getRecord(0).getItem(0)), std::invalid_argument); - } - - { - // second column not monotonic - const char *incorrectDeckData = - "TABDIMS\n" - "/\n" - "PLYADS\n" - "0.00 0.0 \n" - "0.25 0.000010\n" - "0.50 0.000018\n" - "0.75 0.000023\n" - "1.00 0.000027\n" - "1.25 0.000030\n" - "1.50 0.000030\n" - "1.75 0.000030\n" - "2.00 0.000030\n" - "3.00 0.000029 /\n"; - Opm::ParserPtr parser(new Opm::Parser); - Opm::DeckConstPtr deck(parser->parseString(incorrectDeckData, Opm::ParseContext())); - const auto& plyadsKeyword = deck->getKeyword("PLYADS"); - - BOOST_CHECK_THROW(Opm::PlyadsTable(plyadsKeyword.getRecord(0).getItem(0)), std::invalid_argument); - } -} - - - - -/** - * Tests "happy path" for a VFPPROD table, i.e., when everything goes well - */ -BOOST_AUTO_TEST_CASE(VFPProdTable_happy_Test) { - const char *deckData = "\ -VFPPROD \n\ --- Table Depth Rate WFR GFR TAB ALQ UNITS BODY \n\ --- ----- ----- ----- ----- ----- ----- --- -------- ----- \n\ - 5 32.9 'LIQ' 'WCT' 'GOR' 'THP' ' ' 'METRIC' 'BHP' / \n\ --- Rate axis \n\ -1 3 5 / \n\ --- THP axis \n\ -7 11 / \n\ --- WFR axis \n\ -13 17 / \n\ --- GFR axis \n\ -19 23 / \n\ --- ALQ axis \n\ -29 31 / \n\ --- Table data with THP# WFR# GFR# ALQ# \n\ -1 1 1 1 1.5 2.5 3.5 / \n\ -2 1 1 1 4.5 5.5 6.5 / \n\ -1 2 1 1 7.5 8.5 9.5 / \n\ -2 2 1 1 10.5 11.5 12.5 / \n\ -1 1 2 1 13.5 14.5 15.5 / \n\ -2 1 2 1 16.5 17.5 18.5 / \n\ -1 2 2 1 19.5 20.5 21.5 / \n\ -2 2 2 1 22.5 23.5 24.5 / \n\ -1 1 1 2 25.5 26.5 27.5 / \n\ -2 1 1 2 28.5 29.5 30.5 / \n\ -1 2 1 2 31.5 32.5 33.5 / \n\ -2 2 1 2 34.5 35.5 36.5 / \n\ -1 1 2 2 37.5 38.5 39.5 / \n\ -2 1 2 2 40.5 41.5 42.5 / \n\ -1 2 2 2 43.5 44.5 45.5 / \n\ -2 2 2 2 46.5 47.5 48.5 / \n"; - - Opm::ParserPtr parser(new Opm::Parser); - Opm::DeckConstPtr deck(parser->parseString(deckData, Opm::ParseContext())); - std::shared_ptr units(Opm::UnitSystem::newMETRIC()); - const auto& vfpprodKeyword = deck->getKeyword("VFPPROD"); - - BOOST_CHECK_EQUAL(deck->count("VFPPROD"), 1); - - Opm::VFPProdTable vfpprodTable; - - vfpprodTable.init(vfpprodKeyword, *units); - - BOOST_CHECK_EQUAL(vfpprodTable.getTableNum(), 5); - BOOST_CHECK_EQUAL(vfpprodTable.getDatumDepth(), 32.9); - BOOST_CHECK_EQUAL(vfpprodTable.getFloType(), Opm::VFPProdTable::FLO_LIQ); - BOOST_CHECK_EQUAL(vfpprodTable.getWFRType(), Opm::VFPProdTable::WFR_WCT); - BOOST_CHECK_EQUAL(vfpprodTable.getGFRType(), Opm::VFPProdTable::GFR_GOR); - BOOST_CHECK_EQUAL(vfpprodTable.getALQType(), Opm::VFPProdTable::ALQ_UNDEF); - - //Flo axis - { - const std::vector& flo = vfpprodTable.getFloAxis(); - BOOST_REQUIRE_EQUAL(flo.size(), 3); - - //Unit of FLO is SM3/day, convert to SM3/second - double conversion_factor = 1.0 / (60*60*24); - BOOST_CHECK_EQUAL(flo[0], 1*conversion_factor); - BOOST_CHECK_EQUAL(flo[1], 3*conversion_factor); - BOOST_CHECK_EQUAL(flo[2], 5*conversion_factor); - } - - //THP axis - { - const std::vector& thp = vfpprodTable.getTHPAxis(); - BOOST_REQUIRE_EQUAL(thp.size(), 2); - - //Unit of THP is barsa => convert to pascal - double conversion_factor = 100000.0; - BOOST_CHECK_EQUAL(thp[0], 7*conversion_factor); - BOOST_CHECK_EQUAL(thp[1], 11*conversion_factor); - } - - //WFR axis - { - const std::vector& wfr = vfpprodTable.getWFRAxis(); - BOOST_REQUIRE_EQUAL(wfr.size(), 2); - - //Unit of WFR is SM3/SM3 - BOOST_CHECK_EQUAL(wfr[0], 13); - BOOST_CHECK_EQUAL(wfr[1], 17); - } - - //GFR axis - { - const std::vector& gfr = vfpprodTable.getGFRAxis(); - BOOST_REQUIRE_EQUAL(gfr.size(), 2); - - //Unit of GFR is SM3/SM3 - BOOST_CHECK_EQUAL(gfr[0], 19); - BOOST_CHECK_EQUAL(gfr[1], 23); - } - - //ALQ axis - { - const std::vector& alq = vfpprodTable.getALQAxis(); - BOOST_REQUIRE_EQUAL(alq.size(), 2); - - //Unit of ALQ undefined - BOOST_CHECK_EQUAL(alq[0], 29); - BOOST_CHECK_EQUAL(alq[1], 31); - } - - //The data itself - { - typedef Opm::VFPProdTable::array_type::size_type size_type; - const Opm::VFPProdTable::array_type& data = vfpprodTable.getTable(); - const size_type* size = data.shape(); - - BOOST_CHECK_EQUAL(size[0], 2); - BOOST_CHECK_EQUAL(size[1], 2); - BOOST_CHECK_EQUAL(size[2], 2); - BOOST_CHECK_EQUAL(size[3], 2); - BOOST_CHECK_EQUAL(size[4], 3); - - //Table given as BHP => barsa. Convert to pascal - double conversion_factor = 100000.0; - - double index = 0.5; - for (size_type a=0; aparseString(deckData, Opm::ParseContext())); - const auto& vfpprodKeyword = deck->getKeyword("VFPPROD"); - std::shared_ptr units(Opm::UnitSystem::newMETRIC()); - - BOOST_CHECK_EQUAL(deck->count("VFPPROD"), 1); - - Opm::VFPProdTable vfpprodTable; - - vfpprodTable.init(vfpprodKeyword, *units); - - BOOST_CHECK_EQUAL(vfpprodTable.getTableNum(), 5); - BOOST_CHECK_EQUAL(vfpprodTable.getDatumDepth(), 32.9); - BOOST_CHECK_EQUAL(vfpprodTable.getFloType(), Opm::VFPProdTable::FLO_LIQ); - BOOST_CHECK_EQUAL(vfpprodTable.getWFRType(), Opm::VFPProdTable::WFR_WCT); - BOOST_CHECK_EQUAL(vfpprodTable.getGFRType(), Opm::VFPProdTable::GFR_GOR); - BOOST_CHECK_EQUAL(vfpprodTable.getALQType(), Opm::VFPProdTable::ALQ_UNDEF); - - //Flo axis - { - const std::vector& flo = vfpprodTable.getFloAxis(); - BOOST_REQUIRE_EQUAL(flo.size(), 1); - - //Unit of FLO is SM3/day, convert to SM3/second - double conversion_factor = 1.0 / (60*60*24); - BOOST_CHECK_EQUAL(flo[0], 1*conversion_factor); - } - - //THP axis - { - const std::vector& thp = vfpprodTable.getTHPAxis(); - BOOST_REQUIRE_EQUAL(thp.size(), 1); - - //Unit of THP is barsa => convert to pascal - double conversion_factor = 100000.0; - BOOST_CHECK_EQUAL(thp[0], 7*conversion_factor); - } - - //WFR axis - { - const std::vector& wfr = vfpprodTable.getWFRAxis(); - BOOST_REQUIRE_EQUAL(wfr.size(), 1); - - //Unit of WFR is SM3/SM3 - BOOST_CHECK_EQUAL(wfr[0], 13); - } - - //GFR axis - { - const std::vector& gfr = vfpprodTable.getGFRAxis(); - BOOST_REQUIRE_EQUAL(gfr.size(), 1); - - //Unit of GFR is SM3/SM3 - BOOST_CHECK_EQUAL(gfr[0], 19); - } - - //ALQ axis - { - const std::vector& alq = vfpprodTable.getALQAxis(); - BOOST_REQUIRE_EQUAL(alq.size(), 1); - - //Unit of ALQ undefined - BOOST_CHECK_EQUAL(alq[0], 29); - } - - //The data itself - { - typedef Opm::VFPProdTable::array_type::size_type size_type; - const Opm::VFPProdTable::array_type& data = vfpprodTable.getTable(); - const size_type* size = data.shape(); - - //Table given as BHP => barsa. Convert to pascal - double conversion_factor = 100000.0; - - BOOST_CHECK_EQUAL(size[0]*size[1]*size[2]*size[3]*size[4], 1); - BOOST_CHECK_EQUAL(data[0][0][0][0][0], 1.5*conversion_factor); - } -} - - - - - - - -/** - * Spot checks that the VFPPROD table will fail nicely when given invalid data - */ -BOOST_AUTO_TEST_CASE(VFPProdTable_sad_Test) { - /** - * Missing value in table - */ - { - const char *missing_values = "\ -VFPPROD \n\ --- Table Depth Rate WFR GFR \n\ --- ----- ----- ----- ----- ----- \n\ - 5 32.9 'LIQ' 'WCT' 'GOR' / \n\ --- Rate axis \n\ -1 2 / \n\ --- THP axis \n\ -7 / \n\ --- WFR axis \n\ -13 / \n\ --- GFR axis \n\ -19 / \n\ --- ALQ axis \n\ -29 / \n\ --- Table data with THP# WFR# GFR# ALQ# \n\ --- Will fail, as rate axis requires two elements \n\ -1 1 1 1 1.5 / \n"; - - Opm::ParserPtr parser(new Opm::Parser); - Opm::DeckConstPtr deck(parser->parseString(missing_values, Opm::ParseContext())); - const auto& vfpprodKeyword = deck->getKeyword("VFPPROD"); - std::shared_ptr units(Opm::UnitSystem::newMETRIC()); - BOOST_CHECK_EQUAL(deck->count("VFPPROD"), 1); - - Opm::VFPProdTable vfpprodTable; - - - BOOST_CHECK_THROW(vfpprodTable.init(vfpprodKeyword, *units), std::invalid_argument); - } - - - - /** - * Missing value in table #2 - */ - { - const char *missing_values = "\ -VFPPROD \n\ --- Table Depth Rate WFR GFR \n\ --- ----- ----- ----- ----- ----- \n\ - 5 32.9 'LIQ' 'WCT' 'GOR' / \n\ --- Rate axis \n\ -1 / \n\ --- THP axis \n\ -7 9 / \n\ --- WFR axis \n\ -13 / \n\ --- GFR axis \n\ -19 / \n\ --- ALQ axis \n\ -29 / \n\ --- Table data with THP# WFR# GFR# ALQ# \n\ --- Will fail, as two entries are required \n\ -1 1 1 1 1.5 / \n"; - - Opm::ParserPtr parser(new Opm::Parser); - Opm::DeckConstPtr deck(parser->parseString(missing_values, Opm::ParseContext())); - const auto& vfpprodKeyword = deck->getKeyword("VFPPROD"); - std::shared_ptr units(Opm::UnitSystem::newMETRIC()); - BOOST_CHECK_EQUAL(deck->count("VFPPROD"), 1); - - Opm::VFPProdTable vfpprodTable; - - - BOOST_CHECK_THROW(vfpprodTable.init(vfpprodKeyword, *units), std::invalid_argument); - } - - - /** - * Missing items in header - */ - { - const char *missing_metadata = "\ -VFPPROD \n\ --- Table Depth \n\ --- ----- ----- \n\ - 5 32.9 / \n\ --- Rate axis \n\ -1 2 / \n\ --- THP axis \n\ -7 / \n\ --- WFR axis \n\ -13 / \n\ --- GFR axis \n\ -19 / \n\ --- ALQ axis \n\ -29 / \n\ --- Table data with THP# WFR# GFR# ALQ# \n\ -1 1 1 1 1.5 2.5 / \n"; - - Opm::ParserPtr parser(new Opm::Parser); - Opm::DeckConstPtr deck(parser->parseString(missing_metadata, Opm::ParseContext())); - const auto& vfpprodKeyword = deck->getKeyword("VFPPROD"); - std::shared_ptr units(Opm::UnitSystem::newMETRIC()); - BOOST_CHECK_EQUAL(deck->count("VFPPROD"), 1); - - Opm::VFPProdTable vfpprodTable; - - - BOOST_CHECK_THROW(vfpprodTable.init(vfpprodKeyword, *units), std::out_of_range); - } - - - - /** - * Wrong items in header - */ - { - const char *wrong_metadata = "\ -VFPPROD \n\ --- Table Depth \n\ --- ----- ----- \n\ - 5 32.9 'WCT' 'LIC' 'GARBAGE' / \n\ --- Rate axis \n\ -1 2 / \n\ --- THP axis \n\ -7 / \n\ --- WFR axis \n\ -13 / \n\ --- GFR axis \n\ -19 / \n\ --- ALQ axis \n\ -29 / \n\ --- Table data with THP# WFR# GFR# ALQ# \n\ -1 1 1 1 1.5 2.5 / \n"; - - Opm::ParserPtr parser(new Opm::Parser); - Opm::DeckConstPtr deck(parser->parseString(wrong_metadata, Opm::ParseContext())); - const auto& vfpprodKeyword = deck->getKeyword("VFPPROD"); - std::shared_ptr units(Opm::UnitSystem::newMETRIC()); - BOOST_CHECK_EQUAL(deck->count("VFPPROD"), 1); - - Opm::VFPProdTable vfpprodTable; - - BOOST_CHECK_THROW(vfpprodTable.init(vfpprodKeyword, *units), std::invalid_argument); - } - - - - /** - * Wrong axes in header - */ - { - const char *missing_axes = "\ -VFPPROD \n\ --- Table Depth \n\ --- ----- ----- \n\ - 5 32.9 'LIC' 'WCT' 'OGR' / \n\ --- Rate axis \n\ -1 2 / \n\ --- THP axis \n\ -7 / \n\ --- WFR axis \n\ -13 / \n\ --- GFR axis \n\ -19 / \n\ --- ALQ axis \n\ --- Missing! \n\ --- Table data with THP# WFR# GFR# ALQ# \n\ -1 1 1 1 1.5 2.5 / \n"; - - Opm::ParserPtr parser(new Opm::Parser); - Opm::DeckConstPtr deck(parser->parseString(missing_axes, Opm::ParseContext())); - const auto& vfpprodKeyword = deck->getKeyword("VFPPROD"); - std::shared_ptr units(Opm::UnitSystem::newMETRIC()); - BOOST_CHECK_EQUAL(deck->count("VFPPROD"), 1); - - Opm::VFPProdTable vfpprodTable; - - BOOST_CHECK_THROW(vfpprodTable.init(vfpprodKeyword, *units), std::invalid_argument); - } -} - - - - - -/** - * Tests "happy path" for a VFPPROD table, i.e., when everything goes well - */ -BOOST_AUTO_TEST_CASE(VFPInjTable_happy_Test) { - const char *deckData = "\ -VFPINJ \n\ --- Table Depth Rate TAB UNITS BODY \n\ --- ----- ----- ----- ----- ------ ----- \n\ - 5 32.9 WAT THP METRIC BHP / \n\ --- Rate axis \n\ -1 3 5 / \n\ --- THP axis \n\ -7 11 / \n\ --- Table data with THP# \n\ -1 1.5 2.5 3.5 / \n\ -2 4.5 5.5 6.5 / \n"; - - Opm::ParserPtr parser(new Opm::Parser); - Opm::DeckConstPtr deck(parser->parseString(deckData, Opm::ParseContext())); - const auto& vfpprodKeyword = deck->getKeyword("VFPINJ"); - std::shared_ptr units(Opm::UnitSystem::newMETRIC()); - - BOOST_CHECK_EQUAL(deck->count("VFPINJ"), 1); - - Opm::VFPInjTable vfpinjTable; - - vfpinjTable.init(vfpprodKeyword, *units); - - BOOST_CHECK_EQUAL(vfpinjTable.getTableNum(), 5); - BOOST_CHECK_EQUAL(vfpinjTable.getDatumDepth(), 32.9); - BOOST_CHECK_EQUAL(vfpinjTable.getFloType(), Opm::VFPInjTable::FLO_WAT); - - //Flo axis - { - const std::vector& flo = vfpinjTable.getFloAxis(); - BOOST_REQUIRE_EQUAL(flo.size(), 3); - - //Unit of FLO is SM3/day, convert to SM3/second - double conversion_factor = 1.0 / (60*60*24); - BOOST_CHECK_EQUAL(flo[0], 1*conversion_factor); - BOOST_CHECK_EQUAL(flo[1], 3*conversion_factor); - BOOST_CHECK_EQUAL(flo[2], 5*conversion_factor); - } - - //THP axis - { - const std::vector& thp = vfpinjTable.getTHPAxis(); - BOOST_REQUIRE_EQUAL(thp.size(), 2); - - //Unit of THP is barsa => convert to pascal - double conversion_factor = 100000.0; - BOOST_CHECK_EQUAL(thp[0], 7*conversion_factor); - BOOST_CHECK_EQUAL(thp[1], 11*conversion_factor); - } - - //The data itself - { - typedef Opm::VFPInjTable::array_type::size_type size_type; - const Opm::VFPInjTable::array_type& data = vfpinjTable.getTable(); - const size_type* size = data.shape(); - - BOOST_CHECK_EQUAL(size[0], 2); - BOOST_CHECK_EQUAL(size[1], 3); - - //Table given as BHP => barsa. Convert to pascal - double conversion_factor = 100000.0; - - double index = 0.5; - for (size_type t=0; t deck = createSingleRecordDeck(); - Opm::TableManager tables( *deck ); - BOOST_CHECK_EQUAL( false , tables.hasTables("SGOF") ); - BOOST_CHECK_EQUAL( false , tables.hasTables("STUPID") ); - - BOOST_CHECK_THROW( tables.getTables("STUPID") , std::invalid_argument); - BOOST_CHECK_THROW( tables["STUPID"] , std::invalid_argument); -} - -/** - * Spot checks that the VFPPROD table will fail nicely when given invalid data - */ -BOOST_AUTO_TEST_CASE(VFPInjTable_sad_Test) { - /** - * Missing value in table - */ - { - const char *missing_values = "\ -VFPINJ \n\ --- Table Depth Rate TAB UNITS BODY \n\ --- ----- ----- ----- ----- ------ ----- \n\ - 5 32.9 WAT THP METRIC BHP / \n\ --- Rate axis \n\ -1 3 5 / \n\ --- THP axis \n\ -7 11 / \n\ --- Table data with THP# \n\ --- Will fail, as rate axis requires three elements \n\ -1 1.5 2.5 / \n\ -2 4.5 5.5 / \n"; - - Opm::ParserPtr parser(new Opm::Parser); - Opm::DeckConstPtr deck(parser->parseString(missing_values, Opm::ParseContext())); - const auto& vfpinjKeyword = deck->getKeyword("VFPINJ"); - std::shared_ptr units(Opm::UnitSystem::newMETRIC()); - BOOST_CHECK_EQUAL(deck->count("VFPINJ"), 1); - - Opm::VFPProdTable vfpprodTable; - - - BOOST_CHECK_THROW(vfpprodTable.init(vfpinjKeyword, *units), std::invalid_argument); - } - - - - /** - * Missing value in table #2 - */ - { - const char *missing_values = "\ -VFPINJ \n\ --- Table Depth Rate TAB UNITS BODY \n\ --- ----- ----- ----- ----- ------ ----- \n\ - 5 32.9 WAT THP METRIC BHP / \n\ --- Rate axis \n\ -1 3 5 / \n\ --- THP axis \n\ -7 11 / \n\ --- Table data with THP# \n\ --- Will fail, as two entries are required \n\ -1 1.5 2.5 3.5 / \n"; - - Opm::ParserPtr parser(new Opm::Parser); - Opm::DeckConstPtr deck(parser->parseString(missing_values, Opm::ParseContext())); - const auto& vfpinjKeyword = deck->getKeyword("VFPINJ"); - std::shared_ptr units(Opm::UnitSystem::newMETRIC()); - BOOST_CHECK_EQUAL(deck->count("VFPINJ"), 1); - - Opm::VFPProdTable vfpprodTable; - - - BOOST_CHECK_THROW(vfpprodTable.init(vfpinjKeyword, *units), std::invalid_argument); - } - - - /** - * Missing items in header - */ - { - const char *missing_metadata = "\ -VFPINJ \n\ --- Table Depth \n\ --- ----- ----- \n\ - 5 32.9 / \n\ --- Rate axis \n\ -1 3 5 / \n\ --- THP axis \n\ -7 11 / \n\ --- Table data with THP# \n\ -1 1.5 2.5 3.5 / \n\ -2 4.5 5.5 6.5 / \n"; - - Opm::ParserPtr parser(new Opm::Parser); - Opm::DeckConstPtr deck(parser->parseString(missing_metadata, Opm::ParseContext())); - const auto& vfpinjKeyword = deck->getKeyword("VFPINJ"); - std::shared_ptr units(Opm::UnitSystem::newMETRIC()); - BOOST_CHECK_EQUAL(deck->count("VFPINJ"), 1); - - Opm::VFPProdTable vfpprodTable; - - - BOOST_CHECK_THROW(vfpprodTable.init(vfpinjKeyword, *units), std::invalid_argument); - } - - - - /** - * Wrong items in header - */ - { - const char *wrong_metadata = "\ -VFPINJ \n\ --- Table Depth Rate TAB UNITS BODY \n\ --- ----- ----- ----- ----- ------ ----- \n\ - 5 32.9 GOR BHP FOO GAGA / \n\ --- Rate axis \n\ -1 3 5 / \n\ --- THP axis \n\ -7 11 / \n\ --- Table data with THP# \n\ -1 1.5 2.5 3.5 / \n\ -2 4.5 5.5 6.5 / \n"; - - Opm::ParserPtr parser(new Opm::Parser); - Opm::DeckConstPtr deck(parser->parseString(wrong_metadata, Opm::ParseContext())); - const auto& vfpinjKeyword = deck->getKeyword("VFPINJ"); - std::shared_ptr units(Opm::UnitSystem::newMETRIC()); - BOOST_CHECK_EQUAL(deck->count("VFPINJ"), 1); - - Opm::VFPProdTable vfpprodTable; - - BOOST_CHECK_THROW(vfpprodTable.init(vfpinjKeyword, *units), std::invalid_argument); - } - - - - /** - * Wrong axes in header - */ - { - const char *missing_axes = "\ -VFPINJ \n\ --- Table Depth Rate TAB UNITS BODY \n\ --- ----- ----- ----- ----- ------ ----- \n\ - 5 32.9 WAT THP METRIC BHP / \n\ --- Rate axis \n\ -1 3 5 / \n\ --- THP axis \n\ --- Missing! \n\ --- Table data with THP# \n\ -1 1.5 2.5 3.5 / \n\ -2 4.5 5.5 6.5 / \n"; - - Opm::ParserPtr parser(new Opm::Parser); - Opm::DeckConstPtr deck(parser->parseString(missing_axes, Opm::ParseContext())); - const auto& vfpinjKeyword = deck->getKeyword("VFPINJ"); - std::shared_ptr units(Opm::UnitSystem::newMETRIC()); - BOOST_CHECK_EQUAL(deck->count("VFPINJ"), 1); - - Opm::VFPProdTable vfpprodTable; - - BOOST_CHECK_THROW(vfpprodTable.init(vfpinjKeyword, *units), std::invalid_argument); - } -} - - -BOOST_AUTO_TEST_CASE( TestPLYROCK ) { - const char *data = - "TABDIMS\n" - " 2 /\n" - "\n" - "PLYROCK\n" - " 1 2 3 4 5 /\n" - " 10 20 30 40 50 /\n"; - - Opm::ParserPtr parser(new Opm::Parser); - Opm::DeckConstPtr deck(parser->parseString(data, Opm::ParseContext())); - Opm::TableManager tables( *deck ); - const Opm::TableContainer& plyrock = tables.getPlyrockTables(); - - BOOST_CHECK_EQUAL( plyrock.size() , 2 ) ; - const Opm::PlyrockTable& table0 = plyrock.getTable(0); - const Opm::PlyrockTable& table1 = plyrock.getTable(1); - - BOOST_CHECK_EQUAL( table0.numColumns() , 5 ); - BOOST_CHECK_EQUAL( table0.getDeadPoreVolumeColumn()[0] , 1.0 ); - BOOST_CHECK_EQUAL( table0.getMaxAdsorbtionColumn()[0] , 5.0 ); - - BOOST_CHECK_EQUAL( table1.numColumns() , 5 ); - BOOST_CHECK_EQUAL( table1.getDeadPoreVolumeColumn()[0] , 10.0 ); - BOOST_CHECK_EQUAL( table1.getMaxAdsorbtionColumn()[0] , 50.0 ); -} - - -BOOST_AUTO_TEST_CASE( TestPLYMAX ) { - const char *data = - "REGDIMS\n" - " 9* 2 /\n" - "\n" - "PLYMAX\n" - " 1 2 /\n" - " 10 20 /\n"; - - Opm::ParserPtr parser(new Opm::Parser); - Opm::DeckConstPtr deck(parser->parseString(data, Opm::ParseContext())); - Opm::TableManager tables( *deck ); - const Opm::TableContainer& plymax = tables.getPlymaxTables(); - - BOOST_CHECK_EQUAL( plymax.size() , 2 ) ; - const Opm::PlymaxTable& table0 = plymax.getTable(0); - const Opm::PlymaxTable& table1 = plymax.getTable(1); - - BOOST_CHECK_EQUAL( table0.numColumns() , 2 ); - BOOST_CHECK_EQUAL( table0.getPolymerConcentrationColumn()[0] , 1.0 ); - BOOST_CHECK_EQUAL( table0.getMaxPolymerConcentrationColumn()[0] , 2.0 ); - - BOOST_CHECK_EQUAL( table1.numColumns() , 2 ); - BOOST_CHECK_EQUAL( table1.getPolymerConcentrationColumn()[0] , 10.0 ); - BOOST_CHECK_EQUAL( table1.getMaxPolymerConcentrationColumn()[0] , 20.0 ); -} - - - -BOOST_AUTO_TEST_CASE( TestParseTABDIMS ) { - const char *data = - "TABDIMS\n" - " 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 /\n"; - Opm::ParserPtr parser(new Opm::Parser); - BOOST_CHECK_NO_THROW( parser->parseString(data, Opm::ParseContext())); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/tests/TableSchemaTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/tests/TableSchemaTests.cpp deleted file mode 100644 index 5e71a31e34..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Tables/tests/TableSchemaTests.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - Copyright (C) 2015 by Statoil ASA - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE TableSchemaTests - -#include - - -#include -#include -#include - -using namespace Opm; - - -BOOST_AUTO_TEST_CASE( CreateTest ) { - TableSchema schema; - ColumnSchema col1("Name1" , Table::INCREASING , Table::DEFAULT_NONE); - ColumnSchema col2("Name2" , Table::INCREASING , Table::DEFAULT_NONE); - BOOST_CHECK_EQUAL( 0 , schema.size( ) ); - - schema.addColumn( col1 ); - BOOST_CHECK_EQUAL( 1 , schema.size( ) ); - - schema.addColumn( col2 ); - BOOST_CHECK_EQUAL( 2 , schema.size( ) ); - - BOOST_CHECK_THROW( schema.getColumn( "NO/NOT/THIS/COLUMN" ) , std::invalid_argument ); - BOOST_CHECK_THROW( schema.getColumn( 5 ) , std::invalid_argument ); -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Util/OrderedMap.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Util/OrderedMap.hpp deleted file mode 100644 index 796fe65e17..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Util/OrderedMap.hpp +++ /dev/null @@ -1,128 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef OPM_ORDERED_MAP_HPP -#define OPM_ORDERED_MAP_HPP - -#include -#include -#include -#include - - -namespace Opm { - -template -class OrderedMap { -private: - std::unordered_map m_map; - std::vector m_vector; - -public: - bool hasKey(const std::string& key) const { - auto iter = m_map.find(key); - if (iter == m_map.end()) - return false; - else - return true; - } - - - void insert(std::string key, T value) { - if (hasKey(key)) { - auto iter = m_map.find( key ); - size_t index = iter->second; - m_vector[index] = value; - } else { - size_t index = m_vector.size(); - m_vector.push_back( value ); - m_map.insert( std::pair(key , index)); - } - } - - - T& get(const std::string& key) { - auto iter = m_map.find( key ); - if (iter == m_map.end()) - throw std::invalid_argument("Key not found:" + key); - else { - size_t index = iter->second; - return get(index); - } - } - - - T& get(size_t index) { - if (index >= m_vector.size()) - throw std::invalid_argument("Invalid index"); - return m_vector[index]; - } - - const T& get(const std::string& key) const { - auto iter = m_map.find( key ); - if (iter == m_map.end()) - throw std::invalid_argument("Key not found:" + key); - else { - size_t index = iter->second; - return get(index); - } - } - - - const T& get(size_t index) const { - if (index >= m_vector.size()) - throw std::invalid_argument("Invalid index"); - return m_vector[index]; - } - - - T* getPtr(const std::string& key) const { - auto iter = m_map.find( key ); - if (iter == m_map.end()) - throw std::invalid_argument("Key not found:" + key); - else { - size_t index = iter->second; - return getPtr(index); - } - } - - T* getPtr(size_t index) const { - if (index >= m_vector.size()) - throw std::invalid_argument("Invalid index"); - return &m_vector[index]; - } - - - size_t size() const { - return m_vector.size(); - } - - - typename std::vector::const_iterator begin() const { - return m_vector.begin(); - } - - - typename std::vector::const_iterator end() const { - return m_vector.end(); - } -}; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Util/RecordVector.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Util/RecordVector.hpp deleted file mode 100644 index d612f7728c..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Util/RecordVector.hpp +++ /dev/null @@ -1,70 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - -#ifndef OPM_RECORD_VECTOR_HPP -#define OPM_RECORD_VECTOR_HPP - -#include -#include - -/* - A vector like container which will return the last valid element - when the lookup index is out of range. -*/ - -namespace Opm { - -template -class RecordVector { -private: - std::vector m_data; -public: - size_t size() const { - return m_data.size(); - } - - T get(size_t index) const { - if (m_data.size() > 0) { - if (index >= m_data.size()) - return m_data.back(); - else - return m_data[index]; - } else - throw std::invalid_argument("Trying to get from empty RecordVector"); - } - - - void push_back(T value) { - m_data.push_back(value); - } - - typename std::vector::const_iterator begin() const { - return m_data.begin(); - } - - - typename std::vector::const_iterator end() const { - return m_data.end(); - } - -}; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Util/Value.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Util/Value.hpp deleted file mode 100644 index 1945a5f504..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Util/Value.hpp +++ /dev/null @@ -1,102 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef OPM_VALUE_HPP -#define OPM_VALUE_HPP - -#include -#include - - -/* - The simple class Value keeps track of a named scalar variable; - the purpose of this class is to keep strick track of whether the - value has been assigned or not. Will throw an exception if trying to - use an unitialized value. -*/ - - - -namespace Opm { - -template -class Value { - -private: - std::string m_name; - bool m_initialized; - T m_value; - - -public: - - Value(const std::string& name) : - m_name( name ), - m_initialized( false ) - { } - - - Value(const std::string& name ,T value) : - m_name( name ) - { - setValue( value ); - } - - - bool hasValue() const { - return m_initialized; - } - - - T getValue() const { - if (m_initialized) - return m_value; - else - throw std::logic_error("The value has: " + m_name + " has not been initialized"); - } - - - void setValue( T value ) { - m_initialized = true; - m_value = value; - } - - /** - Will return true if both value instances have been initialized - to the same value; or none of the values have been - initialized. Does not compare names. - */ - bool equal( const Value& other) const { - if (m_initialized == other.m_initialized) { - if (m_initialized) { - if (m_value == other.m_value) - return true; // Have been initialized to same value - else - return false; - } else - return true; // Both undefined - } else - return false; - } - - -}; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Util/tests/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Util/tests/CMakeLists.txt deleted file mode 100644 index 09ccd26918..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Util/tests/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -foreach(tapp OrderedMapTests ValueTests RecordVectorTests) - opm_add_test(run${tapp} SOURCES ${tapp}.cpp - LIBRARIES opmparser ${Boost_LIBRARIES}) -endforeach() diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Util/tests/OrderedMapTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Util/tests/OrderedMapTests.cpp deleted file mode 100644 index 358ab17884..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Util/tests/OrderedMapTests.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include - -#define BOOST_TEST_MODULE ScheduleTests -#include -#include - -#include - - -BOOST_AUTO_TEST_CASE( check_empty) { - Opm::OrderedMap map; - BOOST_CHECK_EQUAL( 0U , map.size() ); - BOOST_CHECK( !map.hasKey("KEY")); - BOOST_CHECK_THROW( map.get( 0 ) , std::invalid_argument); - BOOST_CHECK_THROW( map.get( "KEY" ) , std::invalid_argument); -} - - -BOOST_AUTO_TEST_CASE( check_order ) { - Opm::OrderedMap map; - map.insert("CKEY1" , "Value1"); - map.insert("BKEY2" , "Value2"); - map.insert("AKEY3" , "Value3"); - - BOOST_CHECK_EQUAL( 3U , map.size() ); - BOOST_CHECK( map.hasKey("CKEY1")); - BOOST_CHECK( map.hasKey("BKEY2")); - BOOST_CHECK( map.hasKey("AKEY3")); - - BOOST_CHECK_EQUAL( "Value1" , map.get("CKEY1")); - BOOST_CHECK_EQUAL( "Value1" , map.get( 0 )); - - BOOST_CHECK_EQUAL( "Value2" , map.get("BKEY2")); - BOOST_CHECK_EQUAL( "Value2" , map.get( 1 )); - - BOOST_CHECK_EQUAL( "Value3" , map.get("AKEY3")); - BOOST_CHECK_EQUAL( "Value3" , map.get( 2 )); - - map.insert( "CKEY1" , "NewValue1"); - BOOST_CHECK_EQUAL( "NewValue1" , map.get("CKEY1")); - BOOST_CHECK_EQUAL( "NewValue1" , map.get( 0 )); - - { - std::vector values; - for (auto iter = map.begin(); iter != map.end(); ++iter) - values.push_back( *iter ); - - BOOST_CHECK_EQUAL( values[0] , "NewValue1"); - BOOST_CHECK_EQUAL( values[1] , "Value2"); - BOOST_CHECK_EQUAL( values[2] , "Value3"); - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Util/tests/RecordVectorTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Util/tests/RecordVectorTests.cpp deleted file mode 100644 index 17344dc65e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Util/tests/RecordVectorTests.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include - -#define BOOST_TEST_MODULE ScheduleTests -#include -#include - -#include - -BOOST_AUTO_TEST_CASE( check_empty) { - Opm::RecordVector vector; - BOOST_CHECK_EQUAL( 0U , vector.size()); - BOOST_CHECK_THROW( vector.get(0) , std::invalid_argument ); -} - - -BOOST_AUTO_TEST_CASE( check_add ) { - Opm::RecordVector vector; - vector.push_back(10); - BOOST_CHECK_EQUAL( 1U , vector.size()); - BOOST_CHECK_EQUAL( 10 , vector.get(0)); - BOOST_CHECK_EQUAL( 10 , vector.get(10)); - - vector.push_back(20); - BOOST_CHECK_EQUAL( 2U , vector.size()); - BOOST_CHECK_EQUAL( 10 , vector.get(0)); - BOOST_CHECK_EQUAL( 20 , vector.get(1)); - BOOST_CHECK_EQUAL( 20 , vector.get(10)); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Util/tests/ValueTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Util/tests/ValueTests.cpp deleted file mode 100644 index 93d5eda684..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/Util/tests/ValueTests.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include - -#define BOOST_TEST_MODULE VALUETESTS -#include -#include - -#include - - -BOOST_AUTO_TEST_CASE( check_default_constructor ) { - Opm::Value v("Value"); - - BOOST_CHECK_EQUAL( false , v.hasValue() ); - BOOST_CHECK_THROW( v.getValue() , std::logic_error ); - - v.setValue( 70 ); - BOOST_CHECK_EQUAL( 70 , v.getValue()); -} - - -BOOST_AUTO_TEST_CASE( check_value_constructor ) { - Opm::Value v("Value" , 100); - - BOOST_CHECK_EQUAL( true , v.hasValue() ); - BOOST_CHECK_EQUAL( 100 , v.getValue()); -} - - - -BOOST_AUTO_TEST_CASE( check_equal1 ) { - Opm::Value v1("v1" , 100); - Opm::Value v2("v2" , 100); - - BOOST_CHECK(v1.equal( v2 )); - - v1.setValue(110); - BOOST_CHECK_EQUAL( false , v1.equal(v2)); -} - - -BOOST_AUTO_TEST_CASE( check_equal2 ) { - Opm::Value v1("v1"); - Opm::Value v2("v2"); - - BOOST_CHECK_EQUAL(true , v1.equal( v2 )); - - v1.setValue(110); - BOOST_CHECK_EQUAL( false , v1.equal(v2)); - v2.setValue(110); - BOOST_CHECK_EQUAL( true , v1.equal(v2)); -} - - -BOOST_AUTO_TEST_CASE( check_assign) { - Opm::Value v1("v1",100); - Opm::Value v2(v1); - - BOOST_CHECK(v1.equal(v2)); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/checkDeck.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/checkDeck.cpp deleted file mode 100644 index deefc86c49..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/checkDeck.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* - Copyright 2014 Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#include "checkDeck.hpp" - -#include -#include -#include - -namespace Opm { -bool checkDeck(DeckConstPtr deck, ParserConstPtr parser, size_t enabledChecks) { - bool deckValid = true; - - // make sure that the deck does not contain unknown keywords - if (enabledChecks & UnknownKeywords) { - size_t keywordIdx = 0; - for (; keywordIdx < deck->size(); keywordIdx++) { - const auto& keyword = deck->getKeyword(keywordIdx); - if (!parser->isRecognizedKeyword( keyword.name() ) ) { - std::string msg("Keyword '" + keyword.name() + "' is unknown."); - deck->getMessageContainer().warning(msg, keyword.getFileName(), keyword.getLineNumber()); - deckValid = false; - } - } - } - - // make sure all mandatory sections are present and that their order is correct - if (enabledChecks & SectionTopology) { - bool ensureKeywordSection = enabledChecks & KeywordSection; - deckValid = deckValid && Section::checkSectionTopology(*deck, *parser, ensureKeywordSection); - } - - return deckValid; -} -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/checkDeck.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/checkDeck.hpp deleted file mode 100644 index 1858f3e017..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/checkDeck.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - Copyright 2014 Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef OPM_CHECK_DECK_HPP -#define OPM_CHECK_DECK_HPP - -#include - -namespace Opm { - - class Deck; - class Parser; - -enum DeckChecks { - SectionTopology = 0x0001, - - // KeywordSection check only has an effect of the SectionTopology test is enabled - KeywordSection = 0x0002, - - UnknownKeywords = 0x0004, - - AllChecks = 0xffff -}; - -// some semantical correctness checks of the deck. this method adds a warning to -// the deck object if any issue is found ... -bool checkDeck(std::shared_ptr< const Deck > deck, std::shared_ptr< const Parser >, size_t enabledChecks = AllChecks); - -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/tests/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/tests/CMakeLists.txt deleted file mode 100644 index 3958dada8b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/tests/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -foreach(tapp EclipseStateTests Eclipse3DPropertiesTests) - - opm_add_test(run${tapp} SOURCES ${tapp}.cpp - LIBRARIES opmparser ${Boost_LIBRARIES}) - -endforeach() diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/tests/Eclipse3DPropertiesTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/tests/Eclipse3DPropertiesTests.cpp deleted file mode 100644 index 95b1ba4312..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/tests/Eclipse3DPropertiesTests.cpp +++ /dev/null @@ -1,320 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include - -#define BOOST_TEST_MODULE Eclipse3DPropertiesTests - -#include -#include - -#include -#include - -#include -#include -#include - -#include -#include - -#include - -static Opm::DeckPtr createDeck() { - const char *deckData = "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "DX\n" - "1000*0.25 /\n" - "DY\n" - "1000*0.25 /\n" - "DZ\n" - "1000*0.25 /\n" - "TOPS\n" - "100*0.25 /\n" - "FAULTS \n" - " 'F1' 1 1 1 4 1 4 'X' / \n" - " 'F2' 5 5 1 4 1 4 'X-' / \n" - "/\n" - "MULTFLT \n" - " 'F1' 0.50 / \n" - " 'F2' 0.50 / \n" - "/\n" - "EDIT\n" - "MULTFLT /\n" - " 'F2' 0.25 / \n" - "/\n" - "OIL\n" - "\n" - "GAS\n" - "\n" - "PROPS\n" - "REGIONS\n" - "swat\n" - "1000*1 /\n" - "SATNUM\n" - "1000*2 /\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()); -} - - - -static Opm::DeckPtr createValidIntDeck() { - const char *deckData = "RUNSPEC\n" - "GRIDOPTS\n" - " 'YES' 2 /\n" - "\n" - "DIMENS\n" - " 5 5 1 /\n" - "GRID\n" - "DX\n" - "25*0.25 /\n" - "DY\n" - "25*0.25 /\n" - "DZ\n" - "25*0.25 /\n" - "TOPS\n" - "25*0.25 /\n" - "MULTNUM \n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "/\n" - "SATNUM\n" - " 25*1 \n" - "/\n" - "ADDREG\n" - " satnum 11 1 M / \n" - " SATNUM 20 2 / \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()); -} - -static Opm::DeckPtr createValidPERMXDeck() { - const char *deckData = "RUNSPEC\n" - "GRIDOPTS\n" - " 'YES' 2 /\n" - "\n" - "DIMENS\n" - " 5 5 1 /\n" - "GRID\n" - "DX\n" - "25*0.25 /\n" - "DY\n" - "25*0.25 /\n" - "DZ\n" - "25*0.25 /\n" - "TOPS\n" - "25*0.25 /\n" - "MULTNUM \n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "1 1 2 2 2\n" - "/\n" - "BOX\n" - " 1 2 1 5 1 1 / \n" - "PERMZ\n" - " 10*1 /\n" - "ENDBOX\n" - "BOX\n" - " 3 5 1 5 1 1 / \n" - "PERMZ\n" - " 15*2 /\n" - "ENDBOX\n" - "PERMX\n" - "25*1 /\n" - "ADDREG\n" - "'PermX ' 1 1 / \n" - "PErmX 3 2 / \n" - "/\n" - "EDIT\n" - "\n"; - - Opm::ParserPtr parser(new Opm::Parser()); - return parser->parseString(deckData, Opm::ParseContext()); -} - - -/// Setup fixture -struct Setup -{ - Opm::ParseContext parseContext; - Opm::DeckPtr deck; - Opm::TableManager tablemanager; - Opm::EclipseGrid grid; - Opm::Eclipse3DProperties props; - - explicit Setup(Opm::DeckPtr deckArg) : - deck(deckArg), - tablemanager(*deck), - grid(deck), - props(*deck, tablemanager, grid) - { - } -}; - - -BOOST_AUTO_TEST_CASE(HasDeckProperty) { - Setup s(createDeck()); - BOOST_CHECK(s.props.hasDeckIntGridProperty("SATNUM")); -} - -BOOST_AUTO_TEST_CASE(SupportsProperty) { - Setup s(createDeck()); - std::vector keywordList = { - // int props - "ACTNUM", "SATNUM", "IMBNUM", "PVTNUM", "EQLNUM", "ENDNUM", "FLUXNUM", "MULTNUM", "FIPNUM", "MISCNUM", "OPERNUM", - // double props - "TEMPI", "MULTPV", "PERMX", "permy", "PERMZ", "SWATINIT", "THCONR", "NTG" - }; - - for (auto keyword : keywordList) - BOOST_CHECK(s.props.supportsGridProperty(keyword)); - -} - -BOOST_AUTO_TEST_CASE(DefaultRegionFluxnum) { - Setup s(createDeck()); - BOOST_CHECK_EQUAL(s.props.getDefaultRegionKeyword(), "FLUXNUM"); -} - -BOOST_AUTO_TEST_CASE(UnsupportedKeywordsThrows) { - Setup s(createDeck()); - BOOST_CHECK_THROW(s.props.hasDeckIntGridProperty("NONO"), std::logic_error); - BOOST_CHECK_THROW(s.props.hasDeckDoubleGridProperty("NONO"), std::logic_error); - - BOOST_CHECK_THROW(s.props.getIntGridProperty("NONO"), std::logic_error); - BOOST_CHECK_THROW(s.props.getDoubleGridProperty("NONO"), std::logic_error); - - BOOST_CHECK_NO_THROW(s.props.hasDeckIntGridProperty("FluxNUM")); - BOOST_CHECK_NO_THROW(s.props.supportsGridProperty("NONO")); -} - -BOOST_AUTO_TEST_CASE(IntGridProperty) { - Setup s(createDeck()); - int cnt = 0; - for (auto x : s.props.getIntGridProperty("SaTNuM").getData()) { - BOOST_CHECK_EQUAL(x, 2); - cnt++; - } - BOOST_CHECK_EQUAL(cnt, 1000); -} - -BOOST_AUTO_TEST_CASE(AddregIntSetCorrectly) { - Opm::DeckPtr deck = createValidIntDeck(); - Setup s(deck); - const auto& property = s.props.getIntGridProperty("SATNUM"); - for (size_t j = 0; j < 5; j++) - for (size_t i = 0; i < 5; i++) { - if (i < 2) - BOOST_CHECK_EQUAL(12, property.iget(i, j, 0)); - else - BOOST_CHECK_EQUAL(21, property.iget(i, j, 0)); - } - -} - -BOOST_AUTO_TEST_CASE(PermxUnitAppliedCorrectly) { - Opm::DeckPtr deck = createValidPERMXDeck(); - Setup s(deck); - const auto& permx = s.props.getDoubleGridProperty("PermX"); - - for (size_t j = 0; j < 5; j++) - for (size_t i = 0; i < 5; i++) { - if (i < 2) - BOOST_CHECK_CLOSE(2 * Opm::Metric::Permeability, permx.iget(i, j, 0), 0.0001); - else - BOOST_CHECK_CLOSE(4 * Opm::Metric::Permeability, permx.iget(i, j, 0), 0.0001); - } -} - -BOOST_AUTO_TEST_CASE(DoubleIterator) { - Opm::DeckPtr deck = createValidPERMXDeck(); - Setup s(deck); - const auto& doubleProperties = s.props.getDoubleProperties(); - std::vector kw_list; - for (const auto& prop : doubleProperties ) - kw_list.push_back( prop.getKeywordName() ); - - BOOST_CHECK_EQUAL( 2 , kw_list.size() ); - BOOST_CHECK( std::find( kw_list.begin() , kw_list.end() , "PERMX") != kw_list.end()); - BOOST_CHECK( std::find( kw_list.begin() , kw_list.end() , "PERMZ") != kw_list.end()); -} - - -BOOST_AUTO_TEST_CASE(IntIterator) { - Opm::DeckPtr deck = createValidPERMXDeck(); - Setup s(deck); - const auto& intProperties = s.props.getIntProperties(); - std::vector kw_list; - for (const auto& prop : intProperties ) - kw_list.push_back( prop.getKeywordName() ); - - BOOST_CHECK_EQUAL( 1 , kw_list.size() ); - BOOST_CHECK_EQUAL( kw_list[0] , "MULTNUM" ); -} - - -BOOST_AUTO_TEST_CASE(getRegions) { - const char* input = - "START -- 0 \n" - "10 MAI 2007 / \n" - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 2 2 1 /\n" - "GRID\n" - "DX\n" - "4*0.25 /\n" - "DY\n" - "4*0.25 /\n" - "DZ\n" - "4*0.25 /\n" - "TOPS\n" - "4*0.25 /\n" - "REGIONS\n" - "FIPNUM\n" - "1 1 2 3 /\n"; - - auto deck = Opm::Parser().parseString(input, Opm::ParseContext()); - Setup s( deck ); - - std::vector< int > ref = { 1, 2, 3 }; - const auto regions = s.props.getRegions( "FIPNUM" ); - - BOOST_CHECK_EQUAL_COLLECTIONS( ref.begin(), ref.end(), - regions.begin(), regions.end() ); - - BOOST_CHECK( s.props.getRegions( "EQLNUM" ).empty() ); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/tests/EclipseStateTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/tests/EclipseStateTests.cpp deleted file mode 100644 index b81d92ca8e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/EclipseState/tests/EclipseStateTests.cpp +++ /dev/null @@ -1,655 +0,0 @@ -/* -Copyright 2013 Statoil ASA. - -This file is part of the Open Porous Media project (OPM). - -OPM 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. - -OPM 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 for more details. - -You should have received a copy of the GNU General Public License -along with OPM. If not, see . -*/ - -#include -#include -#include - -#define BOOST_TEST_MODULE EclipseStateTests - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace Opm; - - -static DeckPtr createDeckTOP() { -const char *deckData = -"RUNSPEC\n" -"\n" -"DIMENS\n" -" 10 10 10 /\n" -"GRID\n" -"DX\n" -"1000*0.25 /\n" -"DYV\n" -"10*0.25 /\n" -"DZ\n" -"1000*0.25 /\n" -"TOPS\n" -"1000*0.25 /\n" -"PORO \n" -"100*0.10 /\n" -"PERMX \n" -"100*0.25 /\n" -"EDIT\n" -"OIL\n" -"\n" -"GAS\n" -"\n" -"TITLE\n" -"The title\n" -"\n" -"START\n" -"8 MAR 1998 /\n" -"\n" -"PROPS\n" -"REGIONS\n" -"SWAT\n" -"1000*1 /\n" -"SATNUM\n" -"1000*2 /\n" -"\n"; - -ParserPtr parser(new Parser()); -return parser->parseString(deckData, ParseContext()) ; -} - -BOOST_AUTO_TEST_CASE(GetPOROTOPBased) { - DeckPtr deck = createDeckTOP(); - EclipseState state(*deck , ParseContext()); - const Eclipse3DProperties& props = state.get3DProperties(); - - const GridProperty& poro = props.getDoubleGridProperty( "PORO" ); - const GridProperty& permx = props.getDoubleGridProperty( "PERMX" ); - - BOOST_CHECK_EQUAL(1000U , poro.getCartesianSize() ); - BOOST_CHECK_EQUAL(1000U , permx.getCartesianSize() ); - for (size_t i=0; i < poro.getCartesianSize(); i++) { - BOOST_CHECK_EQUAL( 0.10 , poro.iget(i) ); - BOOST_CHECK_EQUAL( 0.25 * Metric::Permeability , permx.iget(i) ); - } -} - -static DeckPtr createDeck() { -const char *deckData = -"RUNSPEC\n" -"\n" -"DIMENS\n" -" 10 10 10 /\n" -"GRID\n" -"DX\n" -"1000*0.25 /\n" -"DY\n" -"1000*0.25 /\n" -"DZ\n" -"1000*0.25 /\n" -"TOPS\n" -"100*0.25 /\n" -"FAULTS \n" -" 'F1' 1 1 1 4 1 4 'X' / \n" -" 'F2' 5 5 1 4 1 4 'X-' / \n" -"/\n" -"MULTFLT \n" -" 'F1' 0.50 / \n" -" 'F2' 0.50 / \n" -"/\n" -"EDIT\n" -"MULTFLT /\n" -" 'F2' 0.25 / \n" -"/\n" -"OIL\n" -"\n" -"GAS\n" -"\n" -"TITLE\n" -"The title\n" -"\n" -"START\n" -"8 MAR 1998 /\n" -"\n" -"PROPS\n" -"REGIONS\n" -"SWAT\n" -"1000*1 /\n" -"SATNUM\n" -"1000*2 /\n" -"\n"; - -ParserPtr parser(new Parser()); -return parser->parseString(deckData, ParseContext()) ; -} - - -static DeckPtr createDeckNoFaults() { -const char *deckData = -"RUNSPEC\n" -"\n" -"DIMENS\n" -" 10 10 10 /\n" -"GRID\n" -"DX\n" -"1000*0.25 /\n" -"DY\n" -"1000*0.25 /\n" -"DZ\n" -"1000*0.25 /\n" -"TOPS\n" -"100*0.25 /\n" -"PROPS\n" -"-- multiply one layer for each face\n" -"MULTX\n" -" 100*1 100*10 800*1 /\n" -"MULTX-\n" -" 200*1 100*11 700*1 /\n" -"MULTY\n" -" 300*1 100*12 600*1 /\n" -"MULTY-\n" -" 400*1 100*13 500*1 /\n" -"MULTZ\n" -" 500*1 100*14 400*1 /\n" -"MULTZ-\n" -" 600*1 100*15 300*1 /\n" -"\n"; - -ParserPtr parser(new Parser()); -return parser->parseString(deckData, ParseContext()) ; -} - -BOOST_AUTO_TEST_CASE(CreateSchedule) { - DeckPtr deck = createDeck(); - EclipseState state(*deck, ParseContext()); - ScheduleConstPtr schedule = state.getSchedule(); - EclipseGridConstPtr eclipseGrid = state.getInputGrid(); - - BOOST_CHECK_EQUAL(schedule->getStartTime(), boost::posix_time::ptime(boost::gregorian::date(1998, 3, 8))); -} - - - -static DeckPtr createDeckSimConfig() { -const std::string& inputStr = "RUNSPEC\n" - "EQLOPTS\n" - "THPRES /\n " - "DIMENS\n" - "10 3 4 /\n" - "\n" - "GRID\n" - "DX\n" - "120*0.25 /\n" - "DY\n" - "120*0.25 /\n" - "DZ\n" - "120*0.25 /\n" - "TOPS\n" - "30*0.25 /\n" - "REGIONS\n" - "EQLNUM\n" - "10*1 10*2 100*3 /\n " - "\n" - "SOLUTION\n" - "THPRES\n" - "1 2 12.0/\n" - "1 3 5.0/\n" - "2 3 7.0/\n" - "/\n" - "\n"; - - -ParserPtr parser(new Parser()); -return parser->parseString(inputStr, ParseContext()) ; -} - -BOOST_AUTO_TEST_CASE(CreateSimulationConfig) { - - DeckPtr deck = createDeckSimConfig(); - EclipseState state(*deck, ParseContext()); - const auto& simConf = state.getSimulationConfig(); - - BOOST_CHECK(simConf.hasThresholdPressure()); - - std::shared_ptr thresholdPressure = simConf.getThresholdPressure(); - BOOST_CHECK_EQUAL(thresholdPressure->size(), 3); -} - - - -BOOST_AUTO_TEST_CASE(PhasesCorrect) { - DeckPtr deck = createDeck(); - EclipseState state( *deck, ParseContext() ); - const auto& tm = state.getTableManager(); - BOOST_CHECK( tm.hasPhase( Phase::PhaseEnum::OIL )); - BOOST_CHECK( tm.hasPhase( Phase::PhaseEnum::GAS )); - BOOST_CHECK( ! tm.hasPhase( Phase::PhaseEnum::WATER )); -} - -BOOST_AUTO_TEST_CASE(TitleCorrect) { - DeckPtr deck = createDeck(); - EclipseState state( *deck, ParseContext() ); - - BOOST_CHECK_EQUAL( state.getTitle(), "The title" ); -} - -BOOST_AUTO_TEST_CASE(IntProperties) { - DeckPtr deck = createDeck(); - EclipseState state( *deck, ParseContext() ); - - BOOST_CHECK_EQUAL( false, state.get3DProperties().supportsGridProperty( "NONO" ) ); - BOOST_CHECK_EQUAL( true, state.get3DProperties().supportsGridProperty( "SATNUM" ) ); - BOOST_CHECK_EQUAL( true, state.get3DProperties().hasDeckIntGridProperty( "SATNUM" ) ); -} - - -BOOST_AUTO_TEST_CASE(GetProperty) { - DeckPtr deck = createDeck(); - EclipseState state(*deck, ParseContext()); - - const auto& satNUM = state.get3DProperties().getIntGridProperty( "SATNUM" ); - - BOOST_CHECK_EQUAL(1000U , satNUM.getCartesianSize() ); - for (size_t i=0; i < satNUM.getCartesianSize(); i++) - BOOST_CHECK_EQUAL( 2 , satNUM.iget(i) ); - - BOOST_CHECK_THROW( satNUM.iget(100000) , std::out_of_range ); -} - -BOOST_AUTO_TEST_CASE(GetTransMult) { - DeckPtr deck = createDeck(); - EclipseState state( *deck, ParseContext() ); - const auto& transMult = state.getTransMult(); - - BOOST_CHECK_EQUAL( 1.0, transMult.getMultiplier( 1, 0, 0, FaceDir::XPlus ) ); - BOOST_CHECK_THROW( transMult.getMultiplier( 1000, FaceDir::XPlus ), std::invalid_argument ); -} - -BOOST_AUTO_TEST_CASE(GetFaults) { - DeckPtr deck = createDeck(); - EclipseState state( *deck, ParseContext() ); - const auto& faults = state.getFaults(); - - BOOST_CHECK( faults.hasFault( "F1" ) ); - BOOST_CHECK( faults.hasFault( "F2" ) ); - - const auto& F1 = faults.getFault( "F1" ); - const auto& F2 = faults.getFault( "F2" ); - - BOOST_CHECK_EQUAL( 0.50, F1.getTransMult() ); - BOOST_CHECK_EQUAL( 0.25, F2.getTransMult() ); - - const auto& transMult = state.getTransMult(); - BOOST_CHECK_EQUAL( transMult.getMultiplier( 0, 0, 0, FaceDir::XPlus ), 0.50 ); - BOOST_CHECK_EQUAL( transMult.getMultiplier( 4, 3, 0, FaceDir::XMinus ), 0.25 ); - BOOST_CHECK_EQUAL( transMult.getMultiplier( 4, 3, 0, FaceDir::ZPlus ), 1.00 ); -} - - -BOOST_AUTO_TEST_CASE(FaceTransMults) { - DeckPtr deck = createDeckNoFaults(); - EclipseState state(*deck, ParseContext()); - const auto& transMult = state.getTransMult(); - - for (int i = 0; i < 10; ++ i) { - for (int j = 0; j < 10; ++ j) { - for (int k = 0; k < 10; ++ k) { - if (k == 1) - BOOST_CHECK_EQUAL(transMult.getMultiplier(i, j, k, FaceDir::XPlus), 10.0); - else - BOOST_CHECK_EQUAL(transMult.getMultiplier(i, j, k, FaceDir::XPlus), 1.0); - - if (k == 2) - BOOST_CHECK_EQUAL(transMult.getMultiplier(i, j, k, FaceDir::XMinus), 11.0); - else - BOOST_CHECK_EQUAL(transMult.getMultiplier(i, j, k, FaceDir::XMinus), 1.0); - - if (k == 3) - BOOST_CHECK_EQUAL(transMult.getMultiplier(i, j, k, FaceDir::YPlus), 12.0); - else - BOOST_CHECK_EQUAL(transMult.getMultiplier(i, j, k, FaceDir::YPlus), 1.0); - - if (k == 4) - BOOST_CHECK_EQUAL(transMult.getMultiplier(i, j, k, FaceDir::YMinus), 13.0); - else - BOOST_CHECK_EQUAL(transMult.getMultiplier(i, j, k, FaceDir::YMinus), 1.0); - - if (k == 5) - BOOST_CHECK_EQUAL(transMult.getMultiplier(i, j, k, FaceDir::ZPlus), 14.0); - else - BOOST_CHECK_EQUAL(transMult.getMultiplier(i, j, k, FaceDir::ZPlus), 1.0); - - if (k == 6) - BOOST_CHECK_EQUAL(transMult.getMultiplier(i, j, k, FaceDir::ZMinus), 15.0); - else - BOOST_CHECK_EQUAL(transMult.getMultiplier(i, j, k, FaceDir::ZMinus), 1.0); - } - } - } -} - - -static DeckPtr createDeckNoGridOpts() { - const char *deckData = - "RUNSPEC\n" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "DX\n" - "1000*0.25 /\n" - "DY\n" - "1000*0.25 /\n" - "DZ\n" - "1000*0.25 /\n" - "TOPS\n" - "100*0.25 /\n" - "FLUXNUM\n" - " 1000*1 /\n" - "MULTNUM\n" - " 1000*1 /\n"; - - ParserPtr parser(new Parser()); - return parser->parseString(deckData, ParseContext()) ; -} - - -static DeckPtr createDeckWithGridOpts() { - const char *deckData = - "RUNSPEC\n" - "GRIDOPTS\n" - " 'YES' 10 /" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "DX\n" - "1000*0.25 /\n" - "DY\n" - "1000*0.25 /\n" - "DZ\n" - "1000*0.25 /\n" - "TOPS\n" - "100*0.25 /\n" - "FLUXNUM\n" - " 1000*1 /\n" - "MULTNUM\n" - " 1000*1 /\n"; - - ParserPtr parser(new Parser()); - return parser->parseString(deckData, ParseContext()) ; -} - - -BOOST_AUTO_TEST_CASE(NoGridOptsDefaultRegion) { - DeckPtr deck = createDeckNoGridOpts(); - EclipseState state(*deck, ParseContext()); - const auto& props = state.get3DProperties(); - const auto& multnum = props.getIntGridProperty("MULTNUM"); - const auto& fluxnum = props.getIntGridProperty("FLUXNUM"); - const auto default_kw = props.getDefaultRegionKeyword(); - const auto& def_pro = props.getIntGridProperty(default_kw); - - BOOST_CHECK_EQUAL( &fluxnum , &def_pro ); - BOOST_CHECK_NE( &fluxnum , &multnum ); -} - - -BOOST_AUTO_TEST_CASE(WithGridOptsDefaultRegion) { - DeckPtr deck = createDeckWithGridOpts(); - EclipseState state(*deck, ParseContext()); - const auto& props = state.get3DProperties(); - const auto& multnum = props.getIntGridProperty("MULTNUM"); - const auto& fluxnum = props.getIntGridProperty("FLUXNUM"); - const auto default_kw = props.getDefaultRegionKeyword(); - const auto& def_pro = props.getIntGridProperty(default_kw); - - BOOST_CHECK_EQUAL( &multnum , &def_pro ); - BOOST_CHECK_NE( &fluxnum , &multnum ); -} - -BOOST_AUTO_TEST_CASE(TestIOConfigBaseName) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/SPE1CASE2.DATA", parseContext); - EclipseState state(*deck, parseContext); - const auto& io = state.cfg().io(); - BOOST_CHECK_EQUAL(io.getBaseName(), "SPE1CASE2"); - BOOST_CHECK_EQUAL(io.getOutputDir(), "testdata/integration_tests/IOConfig"); - - ParserPtr parser2(new Parser()); - DeckConstPtr deck2 = createDeckWithGridOpts(); - EclipseState state2(*deck2, parseContext); - const auto& io2 = state2.cfg().io(); - BOOST_CHECK_EQUAL(io2.getBaseName(), ""); - BOOST_CHECK_EQUAL(io2.getOutputDir(), "."); -} - -BOOST_AUTO_TEST_CASE(TestIOConfigCreation) { - const char * deckData = - "RUNSPEC\n" - "GRIDOPTS\n" - " 'YES' 10 /" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "DX\n" - "1000*0.25 /\n" - "DY\n" - "1000*0.25 /\n" - "DZ\n" - "1000*0.25 /\n" - "TOPS\n" - "100*0.25 /\n" - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 10 OKT 2008 / \n" - "/\n" - "RPTRST\n" - "BASIC=3 FREQ=2 /\n" - "DATES -- 2\n" - " 20 JAN 2010 / \n" - "/\n" - "DATES -- 3\n" - " 20 JAN 2011 / \n" - "/\n"; - - - ParserPtr parser(new Parser()); - DeckPtr deck = parser->parseString(deckData, ParseContext()) ; - EclipseState state(*deck , ParseContext()); - - const RestartConfig& rstConfig = state.cfg().restart(); - - BOOST_CHECK_EQUAL(false, rstConfig.getWriteRestartFile(0)); - BOOST_CHECK_EQUAL(false, rstConfig.getWriteRestartFile(1)); - BOOST_CHECK_EQUAL(true, rstConfig.getWriteRestartFile(2)); - BOOST_CHECK_EQUAL(false, rstConfig.getWriteRestartFile(3)); -} - - -BOOST_AUTO_TEST_CASE(TestIOConfigCreationWithSolutionRPTRST) { - const char * deckData = - "RUNSPEC\n" - "GRIDOPTS\n" - " 'YES' 10 /" - "\n" - "DIMENS\n" - " 10 10 10 /\n" - "DX\n" - "1000*0.25 /\n" - "DY\n" - "1000*0.25 /\n" - "DZ\n" - "1000*0.25 /\n" - "TOPS\n" - "100*0.25 /\n" - "SOLUTION\n" - "RPTRST\n" - "BASIC=1/\n" - "RPTRST\n" - "BASIC=3 FREQ=5 /\n" - "GRID\n" - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 10 OKT 2008 / \n" - "/\n" - "DATES -- 2\n" - " 20 JAN 2010 / \n" - "/\n" - "RPTRST\n" - "BASIC=3 FREQ=2 /\n" - "DATES -- 3\n" - " 20 JAN 2011 / \n" - "/\n"; - - ParseContext parseContext; - ParserPtr parser(new Parser()); - DeckPtr deck = parser->parseString(deckData, parseContext) ; - EclipseState state(*deck, parseContext); - - const RestartConfig& rstConfig = state.cfg().restart(); - - BOOST_CHECK_EQUAL(true , rstConfig.getWriteRestartFile(0)); - BOOST_CHECK_EQUAL(false , rstConfig.getWriteRestartFile(1)); - BOOST_CHECK_EQUAL(false , rstConfig.getWriteRestartFile(2)); - BOOST_CHECK_EQUAL(false , rstConfig.getWriteRestartFile(3)); -} - - - -BOOST_AUTO_TEST_CASE(TestIOConfigCreationWithSolutionRPTSOL) { - const char *deckData = - "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "DX\n" - "1000*0.25 /\n" - "DY\n" - "1000*0.25 /\n" - "DZ\n" - "1000*0.25 /\n" - "TOPS\n" - "100*0.25 /\n" - "SOLUTION\n" - "RPTSOL\n" - "RESTART=2\n" - "/\n" - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 10 OKT 2008 / \n" - "/\n" - "RPTRST\n" - "BASIC=3 FREQ=3\n" - "/\n" - "DATES -- 2\n" - " 20 JAN 2010 / \n" - "/\n" - "DATES -- 3\n" - " 20 FEB 2010 / \n" - "/\n" - "RPTSCHED\n" - "RESTART=1\n" - "/\n"; - - const char *deckData2 = - "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /\n" - "GRID\n" - "DX\n" - "1000*0.25 /\n" - "DY\n" - "1000*0.25 /\n" - "DZ\n" - "1000*0.25 /\n" - "TOPS\n" - "100*0.25 /\n" - "SOLUTION\n" - "RPTSOL\n" - "0 0 0 0 0 0 2\n" - "/\n" - "START -- 0 \n" - "19 JUN 2007 / \n" - "SCHEDULE\n" - "DATES -- 1\n" - " 10 OKT 2008 / \n" - "/\n" - "RPTRST\n" - "BASIC=3 FREQ=3\n" - "/\n" - "DATES -- 2\n" - " 20 JAN 2010 / \n" - "/\n" - "DATES -- 3\n" - " 20 FEB 2010 / \n" - "/\n" - "RPTSCHED\n" - "RESTART=1\n" - "/\n"; - - - ParseContext parseContext; - ParserPtr parser(new Parser()); - - { //mnemnonics - DeckPtr deck = parser->parseString(deckData, parseContext) ; - EclipseState state(*deck, parseContext); - - const RestartConfig& rstConfig = state.cfg().restart(); - - BOOST_CHECK_EQUAL(true, rstConfig.getWriteRestartFile(0)); - } - - { //old fashion integer mnemonics - DeckPtr deck = parser->parseString(deckData2, parseContext) ; - EclipseState state(*deck, parseContext); - - const RestartConfig& rstConfig = state.cfg().restart(); - - BOOST_CHECK_EQUAL(true, rstConfig.getWriteRestartFile(0)); - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Generator/KeywordGenerator.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Generator/KeywordGenerator.cpp deleted file mode 100644 index ebac3b1b9e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Generator/KeywordGenerator.cpp +++ /dev/null @@ -1,253 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include - - -namespace { - -const std::string testHeader = - "#define BOOST_TEST_MODULE ParserRecordTests\n" - "#include \n" - "#include \n" - "#include \n" - "#include \n" - "#include \n" - "#include \n" - "#include \n" - "#include \n" - "#include \n" - "#include \n" - "#include \n" - "#include \n" - "using namespace Opm;\n" - "std::shared_ptr unitSystem( UnitSystem::newMETRIC() );\n"; - -const std::string sourceHeader = - "#include \n" - "#include \n" - "#include \n" - "#include \n" - "#include \n" - "#include \n" - "#include \n" - "#include \n\n\n" - "namespace Opm {\n" - "namespace ParserKeywords {\n\n"; -} - -namespace Opm { - - KeywordGenerator::KeywordGenerator(bool verbose) - : m_verbose( verbose ) - { - } - - std::string KeywordGenerator::headerHeader(const std::string& suffix) { - std::string header = "#ifndef PARSER_KEYWORDS_" + suffix + "_HPP\n" - "#define PARSER_KEYWORDS_" + suffix + "_HPP\n" - "#include \n" - "namespace Opm {\n" - "namespace ParserKeywords {\n\n"; - - return header; - } - - void KeywordGenerator::ensurePath( const std::string& file_name) { - boost::filesystem::path file(file_name); - if (!boost::filesystem::is_directory( file.parent_path())) - boost::filesystem::create_directories( file.parent_path()); - } - - bool KeywordGenerator::updateFile(const std::stringstream& newContent , const std::string& filename) { - bool update = true; - { - // Check if file already contains the newContent. - std::ifstream inputStream(filename); - if (inputStream) { - std::stringstream oldContent; - oldContent << inputStream.rdbuf(); - if (oldContent.str() == newContent.str()) { - update = false; - } - } - } - - if (update) { - ensurePath(filename); - std::ofstream outputStream(filename); - outputStream << newContent.str(); - } - - return update; - } - - static bool write_file( const std::stringstream& stream, const std::string& file, bool verbose, std::string desc = "source" ) { - auto update = KeywordGenerator::updateFile( stream, file ); - if( !verbose ) return update; - - if( update ) - std::cout << "Updated " << desc << " file written to: " << file << std::endl; - else - std::cout << "No changes to " << desc << " file: " << file << std::endl; - - return update; - } - - - bool KeywordGenerator::updateSource(const KeywordLoader& loader , const std::string& sourceFile, int blocks ) const { - std::stringstream newSource; - - const int keywords = loader.size(); - const int blocksize = (keywords / blocks) + 1; - - std::vector< std::stringstream > streams( blocks ); - for( unsigned int i = 0; i < streams.size(); ++i ) - streams[ i ] << sourceHeader << std::endl - << "void addDefaultKeywords" << i << "(Parser& p);" << std::endl - << "void addDefaultKeywords" << i << "(Parser& p) {" << std::endl; - - int bi = 0; - for( auto iter = loader.keyword_begin(); iter != loader.keyword_end(); ++iter ) { - auto block = bi++ / blocksize; - streams[ block ] << "p.addKeyword< ParserKeywords::" - << iter->second->className() << " >();" << std::endl; - } - - for( auto& stream : streams ) stream << "}}}" << std::endl; - - for( unsigned int i = 0; i < streams.size(); ++i ) { - auto srcfile = sourceFile; - updateFile( streams[i], srcfile.insert( srcfile.size() - 4, std::to_string( i ) ) ); - } - - newSource << sourceHeader; - for (auto iter = loader.keyword_begin(); iter != loader.keyword_end(); ++iter) { - std::shared_ptr keyword = (*iter).second; - newSource << keyword->createCode() << std::endl; - } - - for( auto i = 0; i < blocks; ++i ) - newSource << "void addDefaultKeywords" << i << "(Parser& p);" << std::endl; - - newSource << "}" << std::endl; - - newSource << "void Parser::addDefaultKeywords() {" << std::endl; - for( auto i = 0; i < blocks; ++i ) - newSource << "Opm::ParserKeywords::addDefaultKeywords" << i << "(*this);" << std::endl; - - newSource << "}}" << std::endl; - - return write_file( newSource, sourceFile, m_verbose, "source" ); - } - - bool KeywordGenerator::updateHeader(const KeywordLoader& loader, const std::string& headerBuildPath, const std::string& headerFile) const { - bool update = false; - - std::map< char, std::vector< const ParserKeyword* > > keywords; - for( auto iter = loader.keyword_begin(); iter != loader.keyword_end(); ++iter ) - keywords[ std::toupper( iter->second->className().at(0) ) ].push_back( iter->second.get() ); - - for( const auto& iter : keywords ) { - std::stringstream stream; - - stream << headerHeader( std::string( 1, std::toupper( iter.first ) ) ); - for( auto& kw : iter.second ) - stream << kw->createDeclaration(" ") << std::endl; - - stream << "}" << std::endl << "}" << std::endl; - stream << "#endif" << std::endl; - - const auto final_path = headerBuildPath + headerFile + "/" + std::string( 1, iter.first ) + ".hpp"; - if( write_file( stream, final_path, m_verbose, "header" ) ) - update = true; - } - - std::stringstream stream; - stream << headerHeader(""); - stream << "}}" << std::endl; - - for( const auto& iter : keywords ) - stream << "#include <" - << headerFile + "/" - << std::string( 1, std::toupper( iter.first ) ) + ".hpp>" - << std::endl; - - stream << "#endif" << std::endl; - - const auto final_path = headerBuildPath + headerFile + ".hpp"; - return write_file( stream, final_path, m_verbose, "header" ) || update; - } - - - std::string KeywordGenerator::startTest(const std::string& keyword_name) { - return std::string("BOOST_AUTO_TEST_CASE(TEST") + keyword_name + std::string("Keyword) {\n"); - } - - - std::string KeywordGenerator::endTest() { - return "}\n\n"; - } - - - - bool KeywordGenerator::updateTest(const KeywordLoader& loader , const std::string& testFile) const { - std::stringstream stream; - - stream << testHeader; - for (auto iter = loader.keyword_begin(); iter != loader.keyword_end(); ++iter) { - const std::string& keywordName = (*iter).first; - std::shared_ptr keyword = (*iter).second; - stream << startTest(keywordName); - stream << " std::string jsonFile = \"" << loader.getJsonFile( keywordName) << "\";" << std::endl; - stream << " boost::filesystem::path jsonPath( jsonFile );" << std::endl; - stream << " Json::JsonObject jsonConfig( jsonPath );" << std::endl; - stream << " ParserKeyword jsonKeyword(jsonConfig);" << std::endl; - stream << " ParserKeywords::" << keywordName << " inlineKeyword;" << std::endl; - stream << " BOOST_CHECK( jsonKeyword.equal( inlineKeyword ));" << std::endl; - stream << " if (jsonKeyword.hasDimension()) {" <size(); i++){ " << std::endl; - stream << " ParserItemConstPtr item = parserRecord->get( i );" << std::endl; - stream << " for (size_t j=0; j < item->numDimensions(); j++) {" << std::endl; - stream << " std::string dimString = item->getDimension(j);" << std::endl; - stream << " BOOST_CHECK_NO_THROW( unitSystem->getNewDimension( dimString ));" << std::endl; - stream << " }" << std::endl; - stream << " }" << std::endl; - stream << " }" << std::endl; - stream << endTest( ); - } - - return updateFile( stream , testFile ); - } -} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Generator/KeywordGenerator.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Generator/KeywordGenerator.hpp deleted file mode 100644 index d265bd57a1..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Generator/KeywordGenerator.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - - -#ifndef KEYWORD_GENERATOR_HPP -#define KEYWORD_GENERATOR_HPP - -#include - -namespace Opm { - - class KeywordLoader; - - class KeywordGenerator { - - public: - KeywordGenerator(bool verbose); - - static void ensurePath( const std::string& file_name); - static std::string endTest(); - static std::string startTest(const std::string& test_name); - static std::string headerHeader( const std::string& ); - static bool updateFile(const std::stringstream& newContent, const std::string& filename); - - bool updateSource(const KeywordLoader& loader, const std::string& sourceFile, int ) const; - bool updateHeader(const KeywordLoader& loader, const std::string& headerBuildPath, const std::string& headerFile) const; - bool updateTest(const KeywordLoader& loader , const std::string& testFile) const; - - private: - bool m_verbose; - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Generator/KeywordLoader.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Generator/KeywordLoader.cpp deleted file mode 100644 index 6bb69efea4..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Generator/KeywordLoader.cpp +++ /dev/null @@ -1,175 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include -#include -#include - -#include -#include - -#include -#include -#include - -namespace Opm { - - KeywordLoader::KeywordLoader(bool verbose) - : m_verbose(verbose) - { - } - - - size_t KeywordLoader::size() const { - return m_keywords.size(); - } - - - bool KeywordLoader::hasKeyword(const std::string& keyword) const { - if (m_keywords.find( keyword ) == m_keywords.end()) - return false; - else - return true; - } - - - std::shared_ptr KeywordLoader::getKeyword(const std::string& keyword) const { - auto iter = m_keywords.find( keyword ); - if (iter == m_keywords.end()) - throw std::invalid_argument("Keyword " + keyword + " not loaded"); - else - return (*iter).second; - } - - - std::string KeywordLoader::getJsonFile(const std::string& keyword) const { - auto iter = m_jsonFile.find( keyword ); - if (iter == m_jsonFile.end()) - throw std::invalid_argument("Keyword " + keyword + " not loaded"); - else - return (*iter).second; - } - - - size_t KeywordLoader::loadKeywordDirectory(boost::filesystem::path& path) { - size_t loadCount = 0; - if (boost::filesystem::is_directory( path )) { - boost::filesystem::directory_iterator end_iterator; - - for (boost::filesystem::directory_iterator iter(path); iter != end_iterator; ++iter) { - boost::filesystem::path iter_path = iter->path(); - - if (boost::filesystem::is_directory( iter_path )) { - loadCount += loadKeywordDirectory( iter_path ); - } else { - std::string internalName = iter_path.filename().string(); - if (ParserKeyword::validInternalName(internalName)) { - if (m_verbose) - std::cout << "Loading keyword " << internalName << " from file: " << iter_path << "...."; - loadKeyword( iter_path ); - if (m_verbose) - std::cout << std::endl; - loadCount += 1; - } else { - if (m_verbose) - std::cout << "Ignoring file " << iter_path << " - incorrectly formatted name." << std::endl; - } - } - } - - } else - throw std::invalid_argument("Input does not correspond to existing directory\n"); - - return loadCount; - } - - size_t KeywordLoader::loadKeywordDirectory(const std::string& directory) { - boost::filesystem::path path( directory ); - return loadKeywordDirectory( path ); - } - - void KeywordLoader::loadKeyword(boost::filesystem::path& path) { - std::shared_ptr jsonConfig = std::make_shared( path ); - std::shared_ptr parserKeyword = std::make_shared(*jsonConfig); - { - boost::filesystem::path abs_path = boost::filesystem::absolute( path ); - addKeyword( parserKeyword , abs_path.generic_string() ); - } - } - - - size_t KeywordLoader::loadMultipleKeywordDirectories(const std::string& directory) { - std::vector directories = sortSubdirectories( directory ); - - size_t load_count = 0; - for (auto iter = directories.begin(); iter != directories.end(); ++iter) - load_count += loadKeywordDirectory(*iter); - - return load_count; - } - - - void KeywordLoader::loadKeyword(const std::string& filename) { - boost::filesystem::path path( filename ); - return loadKeyword( path ); - } - - - void KeywordLoader::addKeyword(std::shared_ptr keyword , const std::string& jsonFile) { - const std::string& name = keyword->getName(); - - if (hasKeyword(name)) { - m_keywords[name] = keyword; - m_jsonFile[name] = jsonFile; - } else { - m_keywords.insert( std::pair > (name , keyword) ); - m_jsonFile.insert( std::pair ( name , jsonFile)); - } - } - - - std::vector KeywordLoader::sortSubdirectories( const std::string& root_path) { - boost::filesystem::path root(root_path); - if (boost::filesystem::is_directory( root )) { - std::vector paths_in_root; - boost::filesystem::directory_iterator end_iterator; - - for (boost::filesystem::directory_iterator iter(root); iter != end_iterator; ++iter) { - if (boost::filesystem::is_directory( iter->path() )) - paths_in_root.push_back(iter->path().string()); - } - - std::sort(paths_in_root.begin(), paths_in_root.end()); - return paths_in_root; - } else - throw std::invalid_argument("Input argument is not a directory"); - } - - std::map >::const_iterator KeywordLoader::keyword_begin( ) const { - return m_keywords.begin( ); - } - - std::map >::const_iterator KeywordLoader::keyword_end( ) const { - return m_keywords.end( ); - } - - -} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Generator/KeywordLoader.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Generator/KeywordLoader.hpp deleted file mode 100644 index abbc446d46..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Generator/KeywordLoader.hpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - - -#ifndef KEYWORD_LOADER_HPP -#define KEYWORD_LOADER_HPP - -#include -#include -#include -#include - -namespace boost { - namespace filesystem { - class path; - } -} - -namespace Opm { - - class ParserKeyword; - - class KeywordLoader { - - public: - KeywordLoader(bool verbose); - size_t size() const; - bool hasKeyword(const std::string& keyword) const; - std::shared_ptr getKeyword(const std::string& keyword) const; - std::string getJsonFile(const std::string& keyword) const; - size_t loadKeywordDirectory(const std::string& pathname); - size_t loadKeywordDirectory(boost::filesystem::path& path); - void loadKeyword(const std::string& filename); - void loadKeyword(boost::filesystem::path& path); - - static std::vector sortSubdirectories( const std::string& directory ); - size_t loadMultipleKeywordDirectories(const std::string& directory); - - std::map >::const_iterator keyword_begin( ) const; - std::map >::const_iterator keyword_end( ) const; - private: - void addKeyword(std::shared_ptr keyword , const std::string& jsonFile); - - bool m_verbose; - std::map > m_keywords; - std::map m_jsonFile; - }; -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Generator/tests/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Generator/tests/CMakeLists.txt deleted file mode 100644 index 24fd5d931f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Generator/tests/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -foreach(tapp KeywordLoaderTests) - opm_add_test(run${tapp} SOURCES ${tapp}.cpp - LIBRARIES opmparser ${Boost_LIBRARIES}) -endforeach() diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Generator/tests/KeywordLoaderTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Generator/tests/KeywordLoaderTests.cpp deleted file mode 100644 index bd3ee48cbc..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Generator/tests/KeywordLoaderTests.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include - -#define BOOST_TEST_MODULE InputKeywordTests - -#include -#include -#include - - -#include -#include -#include - -BOOST_AUTO_TEST_CASE(EmptyKeywordLoader) { - Opm::KeywordLoader loader(false); - - BOOST_CHECK_EQUAL( false , loader.hasKeyword("NO")); - BOOST_CHECK_EQUAL( 0U , loader.size() ); - BOOST_CHECK_THROW( loader.getKeyword("NO") , std::invalid_argument); -} - - - -BOOST_AUTO_TEST_CASE(LoadKeyword) { - Opm::KeywordLoader loader(false); - - BOOST_CHECK_THROW( loader.loadKeyword("does/not/exists") , std::invalid_argument ); - BOOST_CHECK_THROW( loader.loadKeyword("testdata/parser/keyword-generator/invalid.json") , std::invalid_argument); - BOOST_CHECK_THROW( loader.loadKeyword("testdata/parser/keyword-generator/PORO-invalid") , std::invalid_argument); - - loader.loadKeyword("testdata/parser/keyword-generator/PORO.json"); - loader.loadKeyword("testdata/parser/keyword-generator/PORO.json"); - - BOOST_CHECK_EQUAL( true , loader.hasKeyword("PORO")); - BOOST_CHECK_EQUAL( 1U , loader.size() ); - - loader.getKeyword("PORO"); -} - - - -BOOST_AUTO_TEST_CASE(LoadKeywordDirectory) { - Opm::KeywordLoader loader(false); - BOOST_CHECK_THROW( loader.loadKeywordDirectory("does/not/exists") , std::invalid_argument ); - BOOST_CHECK_THROW( loader.loadKeywordDirectory("testdata/parser/keyword-generator/invalid.json") , std::invalid_argument); - - BOOST_CHECK_EQUAL( 4 , loader.loadKeywordDirectory( "testdata/parser/keyword-generator/loader/001_ECLIPSE100")); - BOOST_CHECK( loader.hasKeyword("ADDREG") ); - BOOST_CHECK( loader.hasKeyword("ACTNUM") ); - BOOST_CHECK( loader.hasKeyword("BOX") ); - BOOST_CHECK( loader.hasKeyword("BLOCK_PROBE") ); - { - auto kw = loader.getKeyword("ADDREG"); - auto record = kw->getRecord(0); - BOOST_CHECK_EQUAL( false, record->hasItem("REGION_NUMBER")); - } -} - - -BOOST_AUTO_TEST_CASE(DirectorySort) { - BOOST_CHECK_THROW( Opm::KeywordLoader::sortSubdirectories( "testdata/parser/keyword-generator/loader/ZCORN") , std::invalid_argument ); - std::vector dir_list = Opm::KeywordLoader::sortSubdirectories( "testdata/parser/keyword-generator/loader"); - - namespace fs = boost::filesystem; - - BOOST_CHECK_EQUAL( 2U , dir_list.size()); - BOOST_CHECK_EQUAL( fs::path( dir_list[0] ), fs::path( "testdata/parser/keyword-generator/loader/001_ECLIPSE100" ) ); - BOOST_CHECK_EQUAL( fs::path( dir_list[1] ), fs::path( "testdata/parser/keyword-generator/loader/002_ECLIPSE300" ) ); -} - - -BOOST_AUTO_TEST_CASE(BigLoad) { - Opm::KeywordLoader loader(false); - BOOST_CHECK_THROW( loader.loadMultipleKeywordDirectories("does/not/exists") , std::invalid_argument ); - BOOST_CHECK_THROW( loader.loadMultipleKeywordDirectories("testdata/parser/keyword-generator/invalid.json") , std::invalid_argument); - - loader.loadMultipleKeywordDirectories("testdata/parser/keyword-generator/loader"); - BOOST_CHECK( loader.hasKeyword("EQUIL")); - { - auto kw = loader.getKeyword("ADDREG"); - auto record = kw->getRecord(0); - BOOST_CHECK( record->hasItem("REGION_NUMBER")); - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/BoxTest.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/BoxTest.cpp deleted file mode 100644 index 603215c594..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/BoxTest.cpp +++ /dev/null @@ -1,146 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE BoxTest - -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - - -using namespace Opm; - -// forward declaration to avoid a pedantic compiler warning -EclipseState makeState(const std::string& fileName); - -EclipseState makeState(const std::string& fileName) { - ParserPtr parser(new Parser( )); - boost::filesystem::path boxFile(fileName); - DeckPtr deck = parser->parseFile(boxFile.string(), ParseContext()); - EclipseState state(*deck , ParseContext()); - return state; -} - - - -BOOST_AUTO_TEST_CASE( PERMX ) { - EclipseState state = makeState( "testdata/integration_tests/BOX/BOXTEST1" ); - const auto& permx = state.get3DProperties().getDoubleGridProperty( "PERMX" ); - const auto& permy = state.get3DProperties().getDoubleGridProperty( "PERMY" ); - const auto& permz = state.get3DProperties().getDoubleGridProperty( "PERMZ" ); - size_t i, j, k; - std::shared_ptr grid = state.getInputGrid(); - - for (k = 0; k < grid->getNZ(); k++) { - for (j = 0; j < grid->getNY(); j++) { - for (i = 0; i < grid->getNX(); i++) { - - BOOST_CHECK_CLOSE( permx.iget( i, j, k ) * 0.25, permz.iget( i, j, k ), 0.001 ); - BOOST_CHECK_EQUAL( permx.iget( i, j, k ) * 2, permy.iget( i, j, k ) ); - - } - } - } -} - - - -BOOST_AUTO_TEST_CASE( PARSE_BOX_OK ) { - EclipseState state = makeState( "testdata/integration_tests/BOX/BOXTEST1" ); - const auto& satnum = state.get3DProperties().getIntGridProperty( "SATNUM" ); - { - size_t i, j, k; - std::shared_ptr grid = state.getInputGrid(); - for (k = 0; k < grid->getNZ(); k++) { - for (j = 0; j < grid->getNY(); j++) { - for (i = 0; i < grid->getNX(); i++) { - - size_t g = i + j * grid->getNX() + k * grid->getNX() * grid->getNY(); - if (i <= 1 && j <= 1 && k <= 1) - BOOST_CHECK_EQUAL( satnum.iget( g ), 10 ); - else - BOOST_CHECK_EQUAL( satnum.iget( g ), 2 ); - - } - } - } - } -} - -BOOST_AUTO_TEST_CASE( PARSE_MULTIPLY_COPY ) { - EclipseState state = makeState( "testdata/integration_tests/BOX/BOXTEST1" ); - const auto& satnum = state.get3DProperties().getIntGridProperty( "SATNUM" ); - const auto& fipnum = state.get3DProperties().getIntGridProperty( "FIPNUM" ); - size_t i, j, k; - std::shared_ptr grid = state.getInputGrid(); - - for (k = 0; k < grid->getNZ(); k++) { - for (j = 0; j < grid->getNY(); j++) { - for (i = 0; i < grid->getNX(); i++) { - - size_t g = i + j * grid->getNX() + k * grid->getNX() * grid->getNY(); - if (i <= 1 && j <= 1 && k <= 1) - BOOST_CHECK_EQUAL( 4 * satnum.iget( g ), fipnum.iget( g ) ); - else - BOOST_CHECK_EQUAL( 2 * satnum.iget( i, j, k ), fipnum.iget( i, j, k ) ); - - } - } - } -} - - - - -BOOST_AUTO_TEST_CASE( KEYWORD_BOX_TOO_SMALL) { - BOOST_CHECK_THROW( makeState("testdata/integration_tests/BOX/BOXTEST3") , std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE( EQUALS ) { - EclipseState state = makeState( "testdata/integration_tests/BOX/BOXTEST1" ); - const auto& pvtnum = state.get3DProperties().getIntGridProperty( "PVTNUM" ); - const auto& eqlnum = state.get3DProperties().getIntGridProperty( "EQLNUM" ); - const auto& poro = state.get3DProperties().getDoubleGridProperty( "PORO" ); - size_t i, j, k; - std::shared_ptr grid = state.getInputGrid(); - - for (k = 0; k < grid->getNZ(); k++) { - for (j = 0; j < grid->getNY(); j++) { - for (i = 0; i < grid->getNX(); i++) { - - BOOST_CHECK_EQUAL( pvtnum.iget( i, j, k ), k ); - BOOST_CHECK_EQUAL( eqlnum.iget( i, j, k ), 77 + 2 * k ); - BOOST_CHECK_EQUAL( poro.iget( i, j, k ), 0.25 ); - - } - } - } -} - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/CMakeLists.txt deleted file mode 100644 index 30d66accc1..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/CMakeLists.txt +++ /dev/null @@ -1,40 +0,0 @@ -add_definitions( -DKEYWORD_DIRECTORY="${PROJECT_SOURCE_DIR}/opm/parser/share/keywords/000_Eclipse100") - -foreach(tapp TransMultIntegrationTests CheckDeckValidity IntegrationTests ParseWellProbe - ParseTITLE ParseTOPS ParseWCONHIST ParseWellWithWildcards - ParsePORO ParsePLYVISC ParsePLYDHFLF ParsePLYSHLOG ParseDATAWithDefault - ParseTVDP ParseDENSITY ParseVFPPROD ScheduleCreateFromDeck - CompletionsFromDeck ParseEND IncludeTest ParseEQUIL - ParseRSVD ParsePVTG ParsePVTO ParseSWOF BoxTest - ParseMULTREGT ParseSGOF ParseSLGOF EclipseGridCreateFromDeck NNCTests - ResinsightTest IOConfigIntegrationTest - Polymer ParsePLYADSS ParseMULTSEGWELL ParseMiscible) - opm_add_test(run${tapp} SOURCES ${tapp}.cpp LIBRARIES opmparser ${Boost_LIBRARIES}) -endforeach() - - -if (HAVE_OPM_DATA) - foreach( test_deck ${OPM_DATA_ROOT}/norne/NORNE_ATW2013.DATA - ${OPM_DATA_ROOT}/solvent_test_suite/SPE1CASE2_SOLVENT.DATA - ${OPM_DATA_ROOT}/solvent_test_suite/SPE9_CP_SOLVENT_CO2.DATA - ${OPM_DATA_ROOT}/solvent_test_suite/SPE5CASE1.DATA - ${OPM_DATA_ROOT}/polymer_test_suite/simple2D/2D_THREEPHASE_POLY_HETER.DATA - ${OPM_DATA_ROOT}/spe1/SPE1CASE1.DATA - ${OPM_DATA_ROOT}/spe1/SPE1CASE2.DATA - ${OPM_DATA_ROOT}/spe1/SPE1CASE2_FAMII.DATA - ${OPM_DATA_ROOT}/spe1/SPE1CASE2_SLGOF.DATA - ${OPM_DATA_ROOT}/spe3/SPE3CASE1.DATA - ${OPM_DATA_ROOT}/spe3/SPE3CASE2.DATA - ${OPM_DATA_ROOT}/spe9/SPE9_CP.DATA - ${OPM_DATA_ROOT}/spe9/SPE9_CP_GROUP.DATA - ${OPM_DATA_ROOT}/spe9/SPE9.DATA - ${OPM_DATA_ROOT}/spe10model1/SPE10_MODEL1.DATA - ${OPM_DATA_ROOT}/spe10model2/SPE10_MODEL2.DATA - ${OPM_DATA_ROOT}/wells_test_suite/MSW/2D_H__/2D_H__.DATA ) - get_filename_component( test_name ${test_deck} NAME_WE ) - add_test( NAME ${test_name} COMMAND opmi ${test_deck}) - endforeach() - - set_property(TEST NORNE_ATW2013 PROPERTY ENVIRONMENT "OPM_ERRORS_IGNORE=PARSE_RANDOM_SLASH") -endif() - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/CheckDeckValidity.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/CheckDeckValidity.cpp deleted file mode 100644 index c2f37bf3cd..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/CheckDeckValidity.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/* - Copyright 2014 Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE ParserIntegrationTests -#include -#include - -#include -#include -#include -#include -#include - -BOOST_AUTO_TEST_CASE( KeywordInCorrectSection ) { - Opm::ParserConstPtr parser(new Opm::Parser); - - { - const char *correctDeckString = - "RUNSPEC\n" - "DIMENS\n" - "3 3 3 /\n" - "GRID\n" - "DXV\n" - "1 1 1 /\n" - "DYV\n" - "1 1 1 /\n" - "DZV\n" - "1 1 1 /\n" - "TOPS\n" - "9*100 /\n" - "BOX\n" - "1 3 1 3 1 3 /\n" - "PROPS\n" - "SOLUTION\n" - "SCHEDULE\n"; - - auto deck = parser->parseString(correctDeckString, Opm::ParseContext()); - BOOST_CHECK(Opm::checkDeck(deck, parser)); - } - - { - // wrong section ordering - const char *correctDeckString = - "GRID\n" - "RUNSPEC\n" - "PROPS\n" - "SOLUTION\n" - "SCHEDULE\n"; - - auto deck = parser->parseString(correctDeckString, Opm::ParseContext()); - BOOST_CHECK(!Opm::checkDeck(deck, parser)); - BOOST_CHECK(Opm::checkDeck(deck, parser, ~Opm::SectionTopology)); - } - - { - // the BOX keyword is in a section where it's not supposed to be - const char *incorrectDeckString = - "RUNSPEC\n" - "BOX\n" - "1 3 1 3 1 3 /\n" - "DIMENS\n" - "3 3 3 /\n" - "GRID\n" - "DXV\n" - "1 1 1 /\n" - "DYV\n" - "1 1 1 /\n" - "DZV\n" - "1 1 1 /\n" - "TOPS\n" - "9*100 /\n" - "PROPS\n" - "SOLUTION\n" - "SCHEDULE\n"; - - auto deck = parser->parseString(incorrectDeckString, Opm::ParseContext()); - BOOST_CHECK(!Opm::checkDeck(deck, parser)); - - // this is supposed to succeed as we don't ensure that all keywords are in the - // correct section - BOOST_CHECK(Opm::checkDeck(deck, parser, Opm::SectionTopology)); - - // this fails because of the incorrect BOX keyword - BOOST_CHECK(!Opm::checkDeck(deck, parser, Opm::SectionTopology | Opm::KeywordSection)); - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/CompletionsFromDeck.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/CompletionsFromDeck.cpp deleted file mode 100644 index f52b2a46b1..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/CompletionsFromDeck.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#define BOOST_TEST_MODULE CompletionIntegrationTests - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace Opm; - -BOOST_AUTO_TEST_CASE( CreateCompletionsFromKeyword ) { - - ParserPtr parser(new Parser()); - const auto scheduleFile = "testdata/integration_tests/SCHEDULE/SCHEDULE_COMPDAT1"; - DeckPtr deck = parser->parseFile(scheduleFile, ParseContext()); - EclipseGrid grid(10,10,10); - const Schedule schedule( ParseContext(), grid, *deck ); - const auto& COMPDAT1 = deck->getKeyword("COMPDAT" , 1); - - const auto wells = schedule.getWells( 0 ); - auto completions = Completion::fromCOMPDAT( grid, COMPDAT1, wells ); - BOOST_CHECK_EQUAL( 3U , completions.size() ); - - BOOST_CHECK( completions.find("W_1") != completions.end() ); - BOOST_CHECK( completions.find("W_2") != completions.end() ); - BOOST_CHECK( completions.find("W_3") != completions.end() ); - - BOOST_CHECK_EQUAL( 17U , completions.find("W_1")->second.size() ); - BOOST_CHECK_EQUAL( 5U , completions.find("W_2")->second.size() ); - BOOST_CHECK_EQUAL( 5U , completions.find("W_3")->second.size() ); - - std::vector W_3Completions = completions.find("W_3")->second; - - CompletionConstPtr completion0 = W_3Completions[0]; - CompletionConstPtr completion4 = W_3Completions[4]; - - BOOST_CHECK_EQUAL( 2 , completion0->getI() ); - BOOST_CHECK_EQUAL( 7 , completion0->getJ() ); - BOOST_CHECK_EQUAL( 0 , completion0->getK() ); - BOOST_CHECK_EQUAL( WellCompletion::OPEN , completion0->getState() ); - BOOST_CHECK_EQUAL( 3.1726851851851847e-12 , completion0->getConnectionTransmissibilityFactor() ); - BOOST_CHECK_EQUAL( WellCompletion::DirectionEnum::Y, completion0->getDirection() ); - - BOOST_CHECK_EQUAL( 2 , completion4->getI() ); - BOOST_CHECK_EQUAL( 6 , completion4->getJ() ); - BOOST_CHECK_EQUAL( 3 , completion4->getK() ); - BOOST_CHECK_EQUAL( WellCompletion::OPEN , completion4->getState() ); - BOOST_CHECK_EQUAL( 5.4722222222222212e-13 , completion4->getConnectionTransmissibilityFactor() ); - BOOST_CHECK_EQUAL( WellCompletion::DirectionEnum::Y, completion4->getDirection() ); - - - // Check that wells with all completions shut is also itself shut - const Well* well1 = schedule.getWell("W_1"); - BOOST_CHECK (!well1->getCompletions(0)->allCompletionsShut()); - BOOST_CHECK_EQUAL (well1->getStatus(0) , WellCommon::StatusEnum::OPEN); - - const Well* well2 = schedule.getWell("W_2"); - BOOST_CHECK (well2->getCompletions(0)->allCompletionsShut()); - BOOST_CHECK_EQUAL (well2->getStatus(0) , WellCommon::StatusEnum::SHUT); - - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/EclipseGridCreateFromDeck.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/EclipseGridCreateFromDeck.cpp deleted file mode 100644 index 2598402ed0..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/EclipseGridCreateFromDeck.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/* - Copyright 2014 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#define BOOST_TEST_MODULE ScheduleIntegrationTests -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -using namespace Opm; - - -BOOST_AUTO_TEST_CASE(CreateCPGrid) { - ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/GRID/CORNERPOINT.DATA"); - DeckPtr deck = parser->parseFile(scheduleFile.string(), ParseContext()); - EclipseState es(*deck, ParseContext()); - auto grid = es.getInputGrid(); - - BOOST_CHECK_EQUAL( 10U , grid->getNX( )); - BOOST_CHECK_EQUAL( 10U , grid->getNY( )); - BOOST_CHECK_EQUAL( 5U , grid->getNZ( )); - BOOST_CHECK_EQUAL( 500U , grid->getNumActive() ); -} - - -BOOST_AUTO_TEST_CASE(CreateCPActnumGrid) { - ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/GRID/CORNERPOINT_ACTNUM.DATA"); - DeckPtr deck = parser->parseFile(scheduleFile.string(), ParseContext()); - EclipseState es(*deck, ParseContext()); - auto grid = es.getInputGrid(); - - BOOST_CHECK_EQUAL( 10U , grid->getNX( )); - BOOST_CHECK_EQUAL( 10U , grid->getNY( )); - BOOST_CHECK_EQUAL( 5U , grid->getNZ( )); - BOOST_CHECK_EQUAL( 100U , grid->getNumActive() ); -} - - -BOOST_AUTO_TEST_CASE(ExportFromCPGridAllActive) { - ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/GRID/CORNERPOINT.DATA"); - DeckPtr deck = parser->parseFile(scheduleFile.string(), ParseContext()); - EclipseState es(*deck, ParseContext()); - auto grid = es.getInputGrid(); - - std::vector actnum; - - actnum.push_back(100); - grid->exportACTNUM( actnum ); - BOOST_CHECK_EQUAL( actnum.size() , 0U ); -} - - - - -BOOST_AUTO_TEST_CASE(ExportFromCPGridACTNUM) { - ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/GRID/CORNERPOINT_ACTNUM.DATA"); - DeckPtr deck = parser->parseFile(scheduleFile.string(), ParseContext()); - EclipseState es(*deck, ParseContext()); - auto grid = es.getInputGrid(); - - std::vector coord; - std::vector zcorn; - std::vector actnum; - size_t volume = grid->getNX()*grid->getNY()*grid->getNZ(); - - grid->exportCOORD( coord ); - BOOST_CHECK_EQUAL( coord.size() , (grid->getNX() + 1) * (grid->getNY() + 1) * 6); - - grid->exportZCORN( zcorn ); - BOOST_CHECK_EQUAL( zcorn.size() , volume * 8); - - grid->exportACTNUM( actnum ); - BOOST_CHECK_EQUAL( actnum.size() , volume ); - - { - const std::vector& deckActnum = deck->getKeyword("ACTNUM").getIntData(); - const std::vector& deckZCORN = deck->getKeyword("ZCORN").getSIDoubleData(); - - for (size_t i = 0; i < volume; i++) { - BOOST_CHECK_EQUAL( deckActnum[i] , actnum[i]); - for (size_t j=0; j < 8; j++) - BOOST_CHECK_CLOSE( zcorn[i*8 + j] , deckZCORN[i*8 + j] , 0.0001); - } - } -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/IOConfigIntegrationTest.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/IOConfigIntegrationTest.cpp deleted file mode 100644 index c327b9ec73..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/IOConfigIntegrationTest.cpp +++ /dev/null @@ -1,355 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE IOCONFIG_INTEGRATION_TEST -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace Opm; - -inline void verifyRestartConfig( const RestartConfig& rst, std::vector>& rptConfig) { - - for (auto rptrst : rptConfig) { - int report_step = std::get<0>(rptrst); - bool save = std::get<1>(rptrst); - boost::gregorian::date report_date = std::get<2>(rptrst); - - BOOST_CHECK_EQUAL( save, rst.getWriteRestartFile( report_step ) ); - if (save) { - BOOST_CHECK_EQUAL( report_date, rst.getTimestepDate( report_step )); - } - } -} - -BOOST_AUTO_TEST_CASE( NorneRestartConfig ) { - std::vector > rptConfig; - rptConfig.push_back( std::make_tuple(0 , true , boost::gregorian::date( 1997,11,6)) ); - rptConfig.push_back( std::make_tuple(1 , true , boost::gregorian::date( 1997,11,14)) ); - rptConfig.push_back( std::make_tuple(2 , true , boost::gregorian::date( 1997,12,1)) ); - rptConfig.push_back( std::make_tuple(3 , true , boost::gregorian::date( 1997,12,17)) ); - rptConfig.push_back( std::make_tuple(4 , true , boost::gregorian::date( 1998,1,1)) ); - rptConfig.push_back( std::make_tuple(5 , true , boost::gregorian::date( 1998,2,1)) ); - rptConfig.push_back( std::make_tuple(6 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(7 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(8 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(9 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(10 , true , boost::gregorian::date( 1998,4,23)) ); - rptConfig.push_back( std::make_tuple(11 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(12 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(13 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(14 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(15 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(16 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(17 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(18 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(19 , true , boost::gregorian::date( 1998,7,16)) ); - rptConfig.push_back( std::make_tuple(20 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(21 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(22 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(23 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(24 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(25 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(26 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(27 , true , boost::gregorian::date( 1998,10,13)) ); - rptConfig.push_back( std::make_tuple(28 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(29 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(30 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(31 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(32 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(33 , true , boost::gregorian::date( 1999,1,4)) ); - rptConfig.push_back( std::make_tuple(34 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(35 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(36 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(37 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(38 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(39 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(40 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(41 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(42 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(43 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(44 , true , boost::gregorian::date( 1999,5,1)) ); - rptConfig.push_back( std::make_tuple(45 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(46 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(47 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(48 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(49 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(50 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(51 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(52 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(53 , true , boost::gregorian::date( 1999,7,15)) ); - rptConfig.push_back( std::make_tuple(54 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(55 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(56 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(57 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(58 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(59 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(60 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(61 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(62 , true , boost::gregorian::date( 1999,10,3)) ); - rptConfig.push_back( std::make_tuple(63 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(64 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(65 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(66 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(67 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(68 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(69 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(70 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(71 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(72 , true , boost::gregorian::date( 2000,2,1)) ); - rptConfig.push_back( std::make_tuple(73 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(74 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(75 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(76 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(77 , true , boost::gregorian::date( 2000,5,1)) ); - rptConfig.push_back( std::make_tuple(78 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(79 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(80 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(81 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(82 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(83 , true , boost::gregorian::date( 2000,8,1)) ); - rptConfig.push_back( std::make_tuple(84 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(85 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(86 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(87 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(88 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(89 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(90 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(91 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(92 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(93 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(94 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(95 , true , boost::gregorian::date( 2000,11,1)) ); - rptConfig.push_back( std::make_tuple(96 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(97 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(98 , true , boost::gregorian::date( 2001,2,1)) ); - rptConfig.push_back( std::make_tuple(99 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(100 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(101 , true , boost::gregorian::date( 2001,5,1)) ); - rptConfig.push_back( std::make_tuple(102 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(103 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(104 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(105 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(106 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(107 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(108 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(109 , true , boost::gregorian::date( 2001,7,2)) ); - rptConfig.push_back( std::make_tuple(110 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(111 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(112 , true , boost::gregorian::date( 2001,7,16)) ); - rptConfig.push_back( std::make_tuple(113 , true , boost::gregorian::date( 2001,7,30)) ); - rptConfig.push_back( std::make_tuple(114 , true , boost::gregorian::date( 2001,8,1)) ); - rptConfig.push_back( std::make_tuple(115 , true , boost::gregorian::date( 2001,8,10)) ); - rptConfig.push_back( std::make_tuple(116 , true , boost::gregorian::date( 2001,8,16)) ); - rptConfig.push_back( std::make_tuple(117 , true , boost::gregorian::date( 2001,9,1)) ); - rptConfig.push_back( std::make_tuple(118 , true , boost::gregorian::date( 2001,9,10)) ); - rptConfig.push_back( std::make_tuple(119 , true , boost::gregorian::date( 2001,10,1)) ); - rptConfig.push_back( std::make_tuple(120 , true , boost::gregorian::date( 2001,11,1)) ); - rptConfig.push_back( std::make_tuple(121 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(122 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(123 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(124 , true , boost::gregorian::date( 2002,2,1)) ); - rptConfig.push_back( std::make_tuple(125 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(126 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(127 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(128 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(129 , true , boost::gregorian::date( 2002,5,1)) ); - rptConfig.push_back( std::make_tuple(130 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(131 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(132 , true , boost::gregorian::date( 2002,7,8)) ); - rptConfig.push_back( std::make_tuple(133 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(134 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(135 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(136 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(137 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(138 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(139 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(140 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(141 , true , boost::gregorian::date( 2002,10,7)) ); - rptConfig.push_back( std::make_tuple(142 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(143 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(144 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(145 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(146 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(147 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(148 , true , boost::gregorian::date( 2003,1,2)) ); - rptConfig.push_back( std::make_tuple(149 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(150 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(151 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(152 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(153 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(154 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(155 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(156 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(157 , true , boost::gregorian::date( 2003,5,1)) ); - rptConfig.push_back( std::make_tuple(158 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(159 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(160 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(161 , true , boost::gregorian::date( 2003,7,10)) ); - rptConfig.push_back( std::make_tuple(162 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(163 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(164 , true , boost::gregorian::date( 2003,8,12)) ); - rptConfig.push_back( std::make_tuple(165 , true , boost::gregorian::date( 2003,9,1)) ); - rptConfig.push_back( std::make_tuple(166 , true , boost::gregorian::date( 2003,9,2)) ); - rptConfig.push_back( std::make_tuple(167 , true , boost::gregorian::date( 2003,9,10)) ); - rptConfig.push_back( std::make_tuple(168 , true , boost::gregorian::date( 2003,9,12)) ); - rptConfig.push_back( std::make_tuple(169 , true , boost::gregorian::date( 2003,9,13)) ); - rptConfig.push_back( std::make_tuple(170 , true , boost::gregorian::date( 2003,9,16)) ); - rptConfig.push_back( std::make_tuple(171 , true , boost::gregorian::date( 2003,10,1)) ); - rptConfig.push_back( std::make_tuple(172 , true , boost::gregorian::date( 2003,10,23)) ); - rptConfig.push_back( std::make_tuple(173 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(174 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(175 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(176 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(177 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(178 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(179 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(180 , true , boost::gregorian::date( 2004,1,19)) ); - rptConfig.push_back( std::make_tuple(181 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(182 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(183 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(184 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(185 , true , boost::gregorian::date( 2004,5,1)) ); - rptConfig.push_back( std::make_tuple(186 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(187 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(188 , true , boost::gregorian::date( 2004,7,3)) ); - rptConfig.push_back( std::make_tuple(189 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(190 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(191 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(192 , true , boost::gregorian::date( 2004,8,16)) ); - rptConfig.push_back( std::make_tuple(193 , true , boost::gregorian::date( 2004,9,1)) ); - rptConfig.push_back( std::make_tuple(194 , true , boost::gregorian::date( 2004,9,20)) ); - rptConfig.push_back( std::make_tuple(195 , true , boost::gregorian::date( 2004,10,1)) ); - rptConfig.push_back( std::make_tuple(196 , true , boost::gregorian::date( 2004,11,1)) ); - rptConfig.push_back( std::make_tuple(197 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(198 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(199 , true , boost::gregorian::date( 2005,1,12)) ); - rptConfig.push_back( std::make_tuple(200 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(201 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(202 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(203 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(204 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(205 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(206 , true , boost::gregorian::date( 2005,4,24)) ); - rptConfig.push_back( std::make_tuple(207 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(208 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(209 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(210 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(211 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(212 , true , boost::gregorian::date( 2005,7,10)) ); - rptConfig.push_back( std::make_tuple(213 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(214 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(215 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(216 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(217 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(218 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(219 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(220 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(221 , true , boost::gregorian::date( 2005,11,1)) ); - rptConfig.push_back( std::make_tuple(222 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(223 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(224 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(225 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(226 , true , boost::gregorian::date( 2006,1,18)) ); - rptConfig.push_back( std::make_tuple(227 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(228 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(229 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(230 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(231 , true , boost::gregorian::date( 2006,4,25)) ); - rptConfig.push_back( std::make_tuple(232 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(233 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(234 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(235 , true , boost::gregorian::date( 2006,8,1)) ); - rptConfig.push_back( std::make_tuple(236 , false , boost::gregorian::date(1970,1,1)) ); - rptConfig.push_back( std::make_tuple(237 , true , boost::gregorian::date( 2006,8,16)) ); - rptConfig.push_back( std::make_tuple(238 , true , boost::gregorian::date( 2006,9,1)) ); - rptConfig.push_back( std::make_tuple(239 , true , boost::gregorian::date( 2006,9,14)) ); - rptConfig.push_back( std::make_tuple(240 , true , boost::gregorian::date( 2006,10,1)) ); - rptConfig.push_back( std::make_tuple(241 , true , boost::gregorian::date( 2006,10,10)) ); - - - auto state = Parser::parse("testdata/integration_tests/IOConfig/RPTRST_DECK.DATA"); - verifyRestartConfig(state.cfg().restart(), rptConfig); -} - - -BOOST_AUTO_TEST_CASE( RestartConfig2 ) { - std::vector> rptConfig; - - for (size_t report_step = 0; report_step <= 251; ++report_step) { - if (0 == report_step) rptConfig.push_back( std::make_tuple(report_step, true, boost::gregorian::date(2000,1,1))); - else if (8 == report_step) rptConfig.push_back( std::make_tuple(report_step, true, boost::gregorian::date(2000,7,1))); - else if (27 == report_step) rptConfig.push_back( std::make_tuple(report_step, true, boost::gregorian::date(2001,1,1))); - else if (45 == report_step) rptConfig.push_back( std::make_tuple(report_step, true, boost::gregorian::date(2001,7,1))); - else if (61 == report_step) rptConfig.push_back( std::make_tuple(report_step, true, boost::gregorian::date(2002,1,1))); - else if (79 == report_step) rptConfig.push_back( std::make_tuple(report_step, true, boost::gregorian::date(2002,7,1))); - else if (89 == report_step) rptConfig.push_back( std::make_tuple(report_step, true, boost::gregorian::date(2003,1,1))); - else if (99 == report_step) rptConfig.push_back( std::make_tuple(report_step, true, boost::gregorian::date(2003,7,1))); - else if (109 == report_step) rptConfig.push_back( std::make_tuple(report_step, true, boost::gregorian::date(2004,1,1))); - else if (128 == report_step) rptConfig.push_back( std::make_tuple(report_step, true, boost::gregorian::date(2004,7,1))); - else if (136 == report_step) rptConfig.push_back( std::make_tuple(report_step, true, boost::gregorian::date(2005,1,1))); - else if (146 == report_step) rptConfig.push_back( std::make_tuple(report_step, true, boost::gregorian::date(2005,7,1))); - else if (158 == report_step) rptConfig.push_back( std::make_tuple(report_step, true, boost::gregorian::date(2006,1,1))); - else if (164 == report_step) rptConfig.push_back( std::make_tuple(report_step, true, boost::gregorian::date(2006,7,1))); - else if (170 == report_step) rptConfig.push_back( std::make_tuple(report_step, true, boost::gregorian::date(2007,1,1))); - else if (178 == report_step) rptConfig.push_back( std::make_tuple(report_step, true, boost::gregorian::date(2007,7,1))); - else if (184 == report_step) rptConfig.push_back( std::make_tuple(report_step, true, boost::gregorian::date(2008,1,1))); - else if (192 == report_step) rptConfig.push_back( std::make_tuple(report_step, true, boost::gregorian::date(2008,7,1))); - else if (198 == report_step) rptConfig.push_back( std::make_tuple(report_step, true, boost::gregorian::date(2009,1,1))); - else if (204 == report_step) rptConfig.push_back( std::make_tuple(report_step, true, boost::gregorian::date(2009,7,1))); - else if (210 == report_step) rptConfig.push_back( std::make_tuple(report_step, true, boost::gregorian::date(2010,1,1))); - else if (216 == report_step) rptConfig.push_back( std::make_tuple(report_step, true, boost::gregorian::date(2010,7,1))); - else if (222 == report_step) rptConfig.push_back( std::make_tuple(report_step, true, boost::gregorian::date(2011,1,1))); - else if (228 == report_step) rptConfig.push_back( std::make_tuple(report_step, true, boost::gregorian::date(2011,7,1))); - else if (234 == report_step) rptConfig.push_back( std::make_tuple(report_step, true, boost::gregorian::date(2012,1,1))); - else if (240 == report_step) rptConfig.push_back( std::make_tuple(report_step, true, boost::gregorian::date(2012,7,1))); - else if (246 == report_step) rptConfig.push_back( std::make_tuple(report_step, true, boost::gregorian::date(2013,1,1))); - else rptConfig.push_back( std::make_tuple(report_step, false, boost::gregorian::date(2000,1,1))); - } - - ParseContext parseContext; - ParserPtr parser(new Parser()); - DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/RPT_TEST2.DATA", parseContext); - EclipseState state( deck , parseContext ); - const auto& rstConfig = state.cfg().restart(); - verifyRestartConfig( rstConfig, rptConfig ); - - BOOST_CHECK_EQUAL( rstConfig.getFirstRestartStep() , 0 ); -} - - - -BOOST_AUTO_TEST_CASE( SPE9END ) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/SPE9_END.DATA", parseContext); - BOOST_CHECK_NO_THROW( EclipseState state( *deck , parseContext ) ); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/IncludeTest.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/IncludeTest.cpp deleted file mode 100644 index 3efa318dd3..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/IncludeTest.cpp +++ /dev/null @@ -1,193 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE ParserIntegrationTests -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include - -using namespace Opm; -using namespace boost::filesystem; - -static void -createDeckWithInclude(path& datafile, std::string addEndKeyword) -{ - path tmpdir = temp_directory_path(); - path root = tmpdir / unique_path("%%%%-%%%%"); - path absoluteInclude = root / "absolute.include"; - path includePath1 = root / "include"; - path includePath2 = root / "include2"; - path pathIncludeFile = "path.file"; - - create_directories(root); - create_directories(includePath1); - create_directories(includePath2); - - { - datafile = root / "TEST.DATA"; - - std::ofstream of(datafile.string().c_str()); - - of << "PATHS" << std::endl; - of << "PATH1 '" << includePath1.string() << "' /" << std::endl; - of << "PATH2 '" << includePath2.string() << "' /" << std::endl; - of << "/" << std::endl; - - of << "INCLUDE" << std::endl; - of << " \'relative.include\' /" << std::endl; - - of << std::endl; - - of << "INCLUDE" << std::endl; - of << " \'" << absoluteInclude.string() << "\' /" << std::endl; - - of << std::endl; - - of << "INCLUDE" << std::endl; - of << " \'include/nested.include\' /" << std::endl; - - of << std::endl; - - - - of << std::endl; - - of << "INCLUDE" << std::endl; - of << " \'$PATH1/" << pathIncludeFile.string() << "\' /" << std::endl; - - of << std::endl; - - of << "INCLUDE" << std::endl; - of << " \'$PATH2/" << pathIncludeFile.string() << "\' /" << std::endl; - - of.close(); - } - - { - path relativeInclude = root / "relative.include"; - std::ofstream of(relativeInclude.string().c_str()); - - of << "START" << std::endl; - of << " 10 'FEB' 2012 /" << std::endl; - of.close(); - } - - { - std::ofstream of(absoluteInclude.string().c_str()); - - if (addEndKeyword.length() > 0) { - of << addEndKeyword << std::endl; - } - of << "DIMENS" << std::endl; - of << " 10 20 30 /" << std::endl; - of.close(); - } - - { - path nestedInclude = includePath1 / "nested.include"; - path gridInclude = includePath1 / "grid.include"; - std::ofstream of(nestedInclude.string().c_str()); - - of << "INCLUDE" << std::endl; - of << " \'$PATH1/grid.include\' /" << std::endl; - of.close(); - - std::ofstream of2(gridInclude.string().c_str()); - of2 << "GRIDUNIT" << std::endl; - of2 << "/" << std::endl; - of2.close(); - } - - { - path fullPathToPathIncludeFile1 = includePath1 / pathIncludeFile; - std::ofstream of1(fullPathToPathIncludeFile1.string().c_str()); - of1 << "TITLE" << std::endl; - of1 << "This is the title /" << std::endl; - of1.close(); - - path fullPathToPathIncludeFile2 = includePath2 / pathIncludeFile; - std::ofstream of2(fullPathToPathIncludeFile2.string().c_str()); - of2 << "BOX" << std::endl; - of2 << " 1 2 3 4 5 6 /" << std::endl; - of2.close(); - } - - std::cout << datafile << std::endl; - - -} - - - - -BOOST_AUTO_TEST_CASE(parse_fileWithWWCTKeyword_deckReturned) { - path datafile; - ParserPtr parser(new Parser()); - createDeckWithInclude (datafile, ""); - DeckConstPtr deck = parser->parseFile(datafile.string(), ParseContext()); - - BOOST_CHECK( deck->hasKeyword("START")); - BOOST_CHECK( deck->hasKeyword("DIMENS")); - BOOST_CHECK( deck->hasKeyword("GRIDUNIT")); -} - -BOOST_AUTO_TEST_CASE(parse_fileWithENDINCKeyword_deckReturned) { - path datafile; - ParserPtr parser(new Parser()); - createDeckWithInclude (datafile, "ENDINC"); - DeckConstPtr deck = parser->parseFile(datafile.string(), ParseContext()); - - BOOST_CHECK( deck->hasKeyword("START")); - BOOST_CHECK( !deck->hasKeyword("DIMENS")); - BOOST_CHECK( deck->hasKeyword("GRIDUNIT")); -} - -BOOST_AUTO_TEST_CASE(parse_fileWithENDKeyword_deckReturned) { - path datafile; - ParserPtr parser(new Parser()); - createDeckWithInclude (datafile, "END"); - DeckConstPtr deck = parser->parseFile(datafile.string(), ParseContext()); - - BOOST_CHECK( deck->hasKeyword("START")); - BOOST_CHECK( !deck->hasKeyword("DIMENS")); - BOOST_CHECK( !deck->hasKeyword("GRIDUNIT")); -} - -BOOST_AUTO_TEST_CASE(parse_fileWithPathsKeyword_IncludeExtendsPath) { - path datafile; - ParserPtr parser(new Parser()); - createDeckWithInclude (datafile, ""); - DeckConstPtr deck = parser->parseFile(datafile.string(), ParseContext()); - - BOOST_CHECK( deck->hasKeyword("TITLE")); - BOOST_CHECK( deck->hasKeyword("BOX")); -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/IntegrationTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/IntegrationTests.cpp deleted file mode 100644 index e21f0b630b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/IntegrationTests.cpp +++ /dev/null @@ -1,238 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE ParserIntegrationTests -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -using namespace Opm; - -namespace { - -std::unique_ptr< ParserKeyword > createFixedSized(const std::string& kw , size_t size) { - std::unique_ptr< ParserKeyword > pkw( new ParserKeyword( kw ) ); - pkw->setFixedSize( size ); - return pkw; -} - -std::unique_ptr< ParserKeyword > createDynamicSized(const std::string& kw) { - std::unique_ptr< ParserKeyword > pkw( new ParserKeyword( kw ) ); - pkw->setSizeType(SLASH_TERMINATED); - return pkw; -} - -ParserPtr createWWCTParser() { - auto parserKeyword = createDynamicSized("WWCT"); - { - std::shared_ptr record = std::make_shared(); - record->addItem( ParserStringItemConstPtr(new ParserStringItem("WELL", ALL)) ); - parserKeyword->addRecord( record ); - } - auto summaryKeyword = createFixedSized("SUMMARY" , (size_t) 0); - - ParserPtr parser(new Parser()); - parser->addParserKeyword( std::move( parserKeyword ) ); - parser->addParserKeyword( std::move( summaryKeyword ) ); - return parser; -} - -} - -BOOST_AUTO_TEST_CASE(parse_fileWithWWCTKeyword_deckReturned) { - boost::filesystem::path singleKeywordFile("testdata/integration_tests/wwct.data"); - ParserPtr parser = createWWCTParser(); - BOOST_CHECK( parser->isRecognizedKeyword("WWCT")); - BOOST_CHECK( parser->isRecognizedKeyword("SUMMARY")); - BOOST_CHECK_NO_THROW( parser->parseFile(singleKeywordFile.string(), ParseContext()) ); -} - -BOOST_AUTO_TEST_CASE(parse_stringWithWWCTKeyword_deckReturned) { - const char *wwctString = - "SUMMARY\n" - "\n" - "-- Kommentar\n" - "WWCT\n" - " 'WELL-1' 'WELL-2' / -- Ehne mehne muh\n" - "/\n"; - ParserPtr parser = createWWCTParser(); - BOOST_CHECK( parser->isRecognizedKeyword("WWCT")); - BOOST_CHECK( parser->isRecognizedKeyword("SUMMARY")); - BOOST_CHECK_NO_THROW(DeckPtr deck = parser->parseString(wwctString, ParseContext())); -} - -BOOST_AUTO_TEST_CASE(parse_streamWithWWCTKeyword_deckReturned) { - const char *wwctString = - "SUMMARY\n" - "\n" - "-- Kommentar\n" - "WWCT\n" - " 'WELL-1' 'WELL-2' / -- Rumpelstilzchen\n" - "/\n"; - ParserPtr parser = createWWCTParser(); - BOOST_CHECK( parser->isRecognizedKeyword("WWCT")); - BOOST_CHECK( parser->isRecognizedKeyword("SUMMARY")); - BOOST_CHECK_NO_THROW(DeckPtr deck = parser->parseString( wwctString, ParseContext())); -} - -BOOST_AUTO_TEST_CASE(parse_fileWithWWCTKeyword_deckHasWWCT) { - boost::filesystem::path singleKeywordFile("testdata/integration_tests/wwct.data"); - ParserPtr parser = createWWCTParser(); - DeckPtr deck = parser->parseFile(singleKeywordFile.string(), ParseContext()); - BOOST_CHECK(deck->hasKeyword("SUMMARY")); - BOOST_CHECK(deck->hasKeyword("WWCT")); -} - -BOOST_AUTO_TEST_CASE(parse_fileWithWWCTKeyword_dataIsCorrect) { - boost::filesystem::path singleKeywordFile("testdata/integration_tests/wwct.data"); - ParserPtr parser = createWWCTParser(); - DeckPtr deck = parser->parseFile(singleKeywordFile.string(), ParseContext()); - BOOST_CHECK_EQUAL("WELL-1", deck->getKeyword("WWCT" , 0).getRecord(0).getItem(0).get< std::string >(0)); - BOOST_CHECK_EQUAL("WELL-2", deck->getKeyword("WWCT" , 0).getRecord(0).getItem(0).get< std::string >(1)); -} - -BOOST_AUTO_TEST_CASE(parser_internal_name_vs_deck_name) { - ParserPtr parser(new Opm::Parser()); - - // internal names cannot appear in the deck if the deck names and/or deck regular - // match expressions are given - BOOST_CHECK(!parser->isRecognizedKeyword("WELL_PROBE")); - - // an existing deck name - BOOST_CHECK(parser->isRecognizedKeyword("WWPR")); - - // a non-existing deck name - BOOST_CHECK(!parser->isRecognizedKeyword("WWPRFOO")); - - // user defined quantity. (regex needs to be used.) - BOOST_CHECK(parser->isRecognizedKeyword("WUFOO")); -} - -static ParserPtr createBPRParser() { - auto parserKeyword = createDynamicSized("BPR"); - { - std::shared_ptr bprRecord = std::make_shared(); - bprRecord->addItem(ParserIntItemConstPtr(new ParserIntItem("I", SINGLE))); - bprRecord->addItem(ParserIntItemConstPtr(new ParserIntItem("J", SINGLE))); - bprRecord->addItem(ParserIntItemConstPtr(new ParserIntItem("K", SINGLE))); - parserKeyword->addRecord( bprRecord ); - } - auto summaryKeyword = createFixedSized("SUMMARY" , (size_t) 0); - ParserPtr parser(new Parser()); - parser->addParserKeyword( std::move( parserKeyword ) ); - parser->addParserKeyword( std::move( summaryKeyword ) ); - return parser; -} - -BOOST_AUTO_TEST_CASE(parse_fileWithBPRKeyword_deckReturned) { - boost::filesystem::path singleKeywordFile("testdata/integration_tests/bpr.data"); - ParserPtr parser = createBPRParser(); - - BOOST_CHECK_NO_THROW(parser->parseFile(singleKeywordFile.string(), ParseContext())); -} - -BOOST_AUTO_TEST_CASE(parse_fileWithBPRKeyword_DeckhasBRP) { - boost::filesystem::path singleKeywordFile("testdata/integration_tests/bpr.data"); - - ParserPtr parser = createBPRParser(); - DeckPtr deck = parser->parseFile(singleKeywordFile.string(), ParseContext()); - - BOOST_CHECK_EQUAL(true, deck->hasKeyword("BPR")); -} - -BOOST_AUTO_TEST_CASE(parse_fileWithBPRKeyword_dataiscorrect) { - boost::filesystem::path singleKeywordFile("testdata/integration_tests/bpr.data"); - - ParserPtr parser = createBPRParser(); - DeckPtr deck = parser->parseFile(singleKeywordFile.string(), ParseContext()); - - const auto& keyword = deck->getKeyword("BPR" , 0); - BOOST_CHECK_EQUAL(2U, keyword.size()); - - const auto& record1 = keyword.getRecord(0); - BOOST_CHECK_EQUAL(3U, record1.size()); - - BOOST_CHECK_EQUAL(1, record1.getItem(0).get< int >(0)); - BOOST_CHECK_EQUAL(1, record1.getItem("I").get< int >(0)); - - BOOST_CHECK_EQUAL(2, record1.getItem(1).get< int >(0)); - BOOST_CHECK_EQUAL(2, record1.getItem("J").get< int >(0)); - - BOOST_CHECK_EQUAL(3, record1.getItem(2).get< int >(0)); - BOOST_CHECK_EQUAL(3, record1.getItem("K").get< int >(0)); -} - - -/***************** Testing non-recognized keywords ********************/ -BOOST_AUTO_TEST_CASE(parse_unknownkeyword_exceptionthrown) { - ParserPtr parser(new Parser()); - BOOST_CHECK_THROW( parser->parseFile("testdata/integration_tests/someobscureelements.data", ParseContext()), std::invalid_argument); -} - -/*********************Testing truncated (default) records ***************************/ - - -// Datafile contains 3 RADFIN4 keywords. One fully specified, one with 2 out of 11 items, and one with no items. -BOOST_AUTO_TEST_CASE(parse_truncatedrecords_deckFilledWithDefaults) { - ParserPtr parser(new Parser()); - DeckPtr deck = parser->parseFile("testdata/integration_tests/truncated_records.data", ParseContext()); - BOOST_CHECK_EQUAL(3U, deck->size()); - const auto& radfin4_0_full= deck->getKeyword("RADFIN4", 0); - const auto& radfin4_1_partial= deck->getKeyword("RADFIN4", 1); - - // Specified in datafile - BOOST_CHECK_EQUAL("NAME", radfin4_0_full.getRecord(0).getItem(0).get< std::string >(0)); - BOOST_CHECK_EQUAL("NAME", radfin4_1_partial.getRecord(0).getItem(0).get< std::string >(0)); - - // Specified in datafile - BOOST_CHECK_EQUAL(213, radfin4_0_full.getRecord(0).getItem(1).get< int >(0)); - BOOST_CHECK_EQUAL(213, radfin4_1_partial.getRecord(0).getItem(1).get< int >(0)); - - const auto& record_0 = radfin4_0_full.getRecord(0); - const auto& lastItem_0 = record_0.getItem(record_0.size() - 1); - BOOST_CHECK(!lastItem_0.defaultApplied(0)); - BOOST_CHECK_EQUAL(lastItem_0.get< int >(0), 18); - - const auto& record_1 = radfin4_1_partial.getRecord(0); - const auto& lastItem_1 = record_1.getItem(record_1.size() - 1); - BOOST_CHECK_EQUAL(213, radfin4_1_partial.getRecord(0).getItem(1).get< int >(0)); - BOOST_CHECK(lastItem_1.defaultApplied(0)); - BOOST_CHECK_EQUAL(lastItem_1.get< int >(0), 1); - - auto* parserKeyword = parser->getParserKeywordFromDeckName("RADFIN4"); - ParserRecordConstPtr parserRecord = parserKeyword->getRecord(0); - ParserItemConstPtr nwmaxItem = parserRecord->get("NWMAX"); - ParserIntItemConstPtr intItem = std::static_pointer_cast(nwmaxItem); - - BOOST_CHECK_EQUAL(18, radfin4_0_full.getRecord(0).getItem(10).get< int >(0)); - BOOST_CHECK_EQUAL(intItem->getDefault(), radfin4_1_partial.getRecord(0).getItem(10).get< int >(0)); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/NNCTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/NNCTests.cpp deleted file mode 100644 index faae9f277a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/NNCTests.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - Copyright 2015 IRIS - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include -#include -#include -#include -#include -#include -#include - -#define BOOST_TEST_MODULE NNCTests - -#include - -using namespace Opm; - -BOOST_AUTO_TEST_CASE(noNNC) -{ - auto eclipseState = Parser::parse("testdata/integration_tests/NNC/noNNC.DATA"); - const auto& nnc = eclipseState.getInputNNC(); - BOOST_CHECK(!eclipseState.hasInputNNC()); - BOOST_CHECK(!nnc.hasNNC()); -} - -BOOST_AUTO_TEST_CASE(readDeck) -{ - auto eclipseState = Parser::parse("testdata/integration_tests/NNC/NNC.DATA"); - const auto& nnc = eclipseState.getInputNNC(); - BOOST_CHECK(nnc.hasNNC()); - const std::vector& nncdata = nnc.nncdata(); - - // test the NNCs in nnc.DATA - BOOST_CHECK_EQUAL(nnc.numNNC(), 4); - BOOST_CHECK_EQUAL(nncdata[0].cell1, 0); - BOOST_CHECK_EQUAL(nncdata[0].cell2, 1); - BOOST_CHECK_EQUAL(nncdata[0].trans, 0.5 * Opm::Metric::Transmissibility); - BOOST_CHECK_EQUAL(nncdata[1].cell1, 0); - BOOST_CHECK_EQUAL(nncdata[1].cell2, 10); - BOOST_CHECK_EQUAL(nncdata[1].trans, 1.0 * Opm::Metric::Transmissibility); - -} - -BOOST_AUTO_TEST_CASE(addNNCfromDeck) -{ - auto eclipseState = Parser::parse("testdata/integration_tests/NNC/NNC.DATA"); - auto nnc = eclipseState.getInputNNC(); - BOOST_CHECK(nnc.hasNNC()); - const std::vector& nncdata = nnc.nncdata(); - - BOOST_CHECK_EQUAL(nnc.numNNC(), 4); - // test add NNC - nnc.addNNC(2, 2, 2.0); - BOOST_CHECK_EQUAL(nnc.numNNC(), 5); - BOOST_CHECK_EQUAL(nncdata[4].cell1, 2); - BOOST_CHECK_EQUAL(nncdata[4].cell2, 2); - BOOST_CHECK_EQUAL(nncdata[4].trans, 2.0); -} - -BOOST_AUTO_TEST_CASE(addNNC) -{ - Opm::NNC nnc; - // add NNC - nnc.addNNC(2,2,2.0); - const std::vector& nncdata = nnc.nncdata(); - BOOST_CHECK_EQUAL(nnc.numNNC(), 1); - BOOST_CHECK_EQUAL(nncdata[0].cell1, 2); - BOOST_CHECK_EQUAL(nncdata[0].cell1, 2); - BOOST_CHECK_EQUAL(nncdata[0].trans, 2.0); -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseDATAWithDefault.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseDATAWithDefault.cpp deleted file mode 100644 index 3da7e2c800..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseDATAWithDefault.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - Copyright (C) 2014 Statoil ASE - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#define BOOST_TEST_MODULE ParserIntegrationTests -#include - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace Opm; - - - -const char *dataMissingRecord = "\n\ -ENDSCALE\n\ - 1* 1* 2 /\n\ -\n\ -ENKRVD\n\ -100 1 2 3 4 5 6 7 200 11 22 33 44 55 66 77 /\n\ -"; - - - -BOOST_AUTO_TEST_CASE( ParseMissingRECORD_THrows) { - ParserPtr parser(new Parser()); - BOOST_CHECK_THROW( parser->parseString( dataMissingRecord , ParseContext()) , std::invalid_argument); -} - - - - -const char *data = "\n\ -ENDSCALE\n\ - 1* 1* 3 /\n\ -\n\ -ENKRVD\n\ -100 * 2 * 2* 6 7 200 11 22 33 3*55 10 /\n\ -100 * 2 3 4 5 6 7 200 11 22 33 44 55 66 77 /\n\ -100 * 2 3 4 5 6 7 200 11 22 33 44 55 66 * /\n\ -"; - - - -BOOST_AUTO_TEST_CASE( parse_DATAWithDefult_OK ) { - ParserPtr parser(new Parser()); - DeckConstPtr deck = parser->parseString( data , ParseContext()); - const auto& keyword = deck->getKeyword( "ENKRVD" ); - const auto& rec0 = keyword.getRecord(0); - const auto& rec1 = keyword.getRecord(1); - const auto& rec2 = keyword.getRecord(2); - - const auto& item0 = rec0.getItem(0); - const auto& item1 = rec1.getItem(0); - const auto& item2 = rec2.getItem(0); - - BOOST_CHECK_EQUAL( 3U , keyword.size()); - BOOST_CHECK( !item0.defaultApplied(0) ); - BOOST_CHECK( item0.defaultApplied(1) ); - - BOOST_CHECK_EQUAL( 100 , item0.get< double >(0)); - BOOST_CHECK_EQUAL( -1 , item0.get< double >(1)); - BOOST_CHECK_EQUAL( 2 , item0.get< double >(2)); - BOOST_CHECK_EQUAL( -1 , item0.get< double >(3)); - BOOST_CHECK_EQUAL( -1 , item0.get< double >(4)); - BOOST_CHECK_EQUAL( -1 , item0.get< double >(5)); - BOOST_CHECK_EQUAL( 6 , item0.get< double >(6)); - BOOST_CHECK_EQUAL( 55 , item0.get< double >(12)); - BOOST_CHECK_EQUAL( 55 , item0.get< double >(13)); - BOOST_CHECK_EQUAL( 55 , item0.get< double >(14)); - BOOST_CHECK_EQUAL( 10 , item0.get< double >(15)); - - BOOST_CHECK_EQUAL( 100 , item1.get< double >(0)); - BOOST_CHECK_EQUAL( -1 , item1.get< double >(1)); - - BOOST_CHECK( !item2.defaultApplied(0) ); - BOOST_CHECK( item2.defaultApplied(1) ); -} - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseDENSITY.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseDENSITY.cpp deleted file mode 100644 index 5b22941aec..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseDENSITY.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE ParserIntegrationTests -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -using namespace Opm; - - -BOOST_AUTO_TEST_CASE(ParseDENSITY) { - ParserPtr parser(new Parser()); - std::string file("testdata/integration_tests/DENSITY/DENSITY1"); - DeckPtr deck = parser->parseFile(file, ParseContext()); - const auto& densityKw = deck->getKeyword("DENSITY" , 0); - - - BOOST_CHECK_EQUAL( 2U , densityKw.size()); - const auto& rec1 = densityKw.getRecord(0); - - { - const auto& oilDensity = rec1.getItem("OIL"); - const auto& waterDensity = rec1.getItem("WATER"); - const auto& gasDensity = rec1.getItem("GAS"); - - BOOST_CHECK_CLOSE( 500 * Field::Density , oilDensity.getSIDouble(0) , 0.001); - BOOST_CHECK_CLOSE( 1000 * Field::Density , waterDensity.getSIDouble(0) , 0.001); - BOOST_CHECK_CLOSE( 1 * Field::Density , gasDensity.getSIDouble(0) , 0.001); - } - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseEND.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseEND.cpp deleted file mode 100644 index 5def87b57b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseEND.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE ParserIntegrationTests -#include -#include - -#include -#include - -#include -#include -#include -#include -#include - -#include - -using namespace Opm; - - - - -BOOST_AUTO_TEST_CASE( parse_END_OK ) { - ParserPtr parser(new Parser()); - std::string fileWithTitleKeyword("testdata/integration_tests/END/END1.txt"); - - DeckPtr deck = parser->parseFile(fileWithTitleKeyword, ParseContext()); - - BOOST_CHECK_EQUAL(size_t(1), deck->size()); - BOOST_CHECK_EQUAL (true, deck->hasKeyword("OIL")); - BOOST_CHECK_EQUAL (false, deck->hasKeyword("GAS")); - BOOST_CHECK_EQUAL (false, deck->hasKeyword("END")); -} - -BOOST_AUTO_TEST_CASE( parse_ENDINC_OK ) { - ParserPtr parser(new Parser()); - std::string fileWithTitleKeyword("testdata/integration_tests/END/ENDINC1.txt"); - - DeckPtr deck = parser->parseFile(fileWithTitleKeyword, ParseContext()); - - BOOST_CHECK_EQUAL(size_t(1), deck->size()); - BOOST_CHECK_EQUAL (true, deck->hasKeyword("OIL")); - BOOST_CHECK_EQUAL (false, deck->hasKeyword("GAS")); - BOOST_CHECK_EQUAL (false, deck->hasKeyword("ENDINC")); -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseEQUIL.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseEQUIL.cpp deleted file mode 100644 index b5f0d7a0d1..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseEQUIL.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE ParserIntegrationTests -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -using namespace Opm; - - - -BOOST_AUTO_TEST_CASE( parse_EQUIL_MISSING_DIMS ) { - Parser parser; - ParseContext parseContext; - parseContext.update(ParseContext::PARSE_MISSING_DIMS_KEYWORD, InputError::IGNORE); - const std::string equil = "EQUIL\n" - "2469 382.4 1705.0 0.0 500 0.0 1 1 20 /"; - std::shared_ptr deck = parser.parseString(equil, parseContext); - const auto& kw1 = deck->getKeyword("EQUIL" , 0); - BOOST_CHECK_EQUAL( 1U , kw1.size() ); - - const auto& rec1 = kw1.getRecord(0); - const auto& item1 = rec1.getItem("OWC"); - const auto& item1_index = rec1.getItem(2); - - BOOST_CHECK_EQUAL( &item1 , &item1_index ); - BOOST_CHECK( fabs(item1.getSIDouble(0) - 1705) < 0.001); - -} - - -BOOST_AUTO_TEST_CASE( parse_EQUIL_OK ) { - ParserPtr parser(new Parser()); - std::string pvtgFile("testdata/integration_tests/EQUIL/EQUIL1"); - DeckPtr deck = parser->parseFile(pvtgFile, ParseContext()); - const auto& kw1 = deck->getKeyword("EQUIL" , 0); - BOOST_CHECK_EQUAL( 3U , kw1.size() ); - - const auto& rec1 = kw1.getRecord(0); - BOOST_CHECK_EQUAL( 9U , rec1.size() ); - - const auto& rec2 = kw1.getRecord(1); - BOOST_CHECK_EQUAL( 9U , rec2.size() ); - - const auto& rec3 = kw1.getRecord(2); - BOOST_CHECK_EQUAL( 9U , rec3.size() ); - - const auto& item1 = rec1.getItem("OWC"); - const auto& item1_index = rec1.getItem(2); - - BOOST_CHECK_EQUAL( &item1 , &item1_index ); - BOOST_CHECK( fabs(item1.getSIDouble(0) - 1705) < 0.001); - - const auto& item3 = rec3.getItem("OWC"); - const auto& item3_index = rec3.getItem(2); - - BOOST_CHECK_EQUAL( &item3 , &item3_index ); - BOOST_CHECK( fabs(item3.getSIDouble(0) - 3000) < 0.001); - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseMULTREGT.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseMULTREGT.cpp deleted file mode 100644 index bb994031b4..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseMULTREGT.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE ParseMULTREGT -#include -#include - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -using namespace Opm; - - - - -BOOST_AUTO_TEST_CASE( parse_MULTREGT_OK ) { - ParserPtr parser(new Parser()); - DeckPtr deck = parser->parseFile("testdata/integration_tests/MULTREGT/MULTREGT", ParseContext()); - BOOST_CHECK_NO_THROW( deck->getKeyword("MULTREGT" , 0); ); -} - - - -BOOST_AUTO_TEST_CASE( MULTREGT_ECLIPSE_STATE ) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - DeckPtr deck = parser->parseFile("testdata/integration_tests/MULTREGT/MULTREGT.DATA", parseContext); - EclipseState state(*deck , parseContext); - auto transMult = state.getTransMult(); - - // Test NONNC - // cell 0 and 1 are neigbours - BOOST_CHECK_EQUAL( 0.10 , transMult.getRegionMultiplier( 0 , 1 , FaceDir::DirEnum::XPlus)); - // cell 0 and 3 are not neigbours ==> 1 - BOOST_CHECK_EQUAL( 1.00 , transMult.getRegionMultiplier( 0 , 3 , FaceDir::DirEnum::XPlus)); - - // Test NNC - // cell 4 and 5 are neigbours ==> 1 - BOOST_CHECK_EQUAL( 1.00 , transMult.getRegionMultiplier( 4 , 5 , FaceDir::DirEnum::XPlus)); - // cell 4 and 7 are not neigbours - BOOST_CHECK_EQUAL( 0.50 , transMult.getRegionMultiplier( 4 , 7 , FaceDir::DirEnum::XPlus)); - - // Test direction X, returns 1 for directions other than +-X - BOOST_CHECK_EQUAL( 1.00 , transMult.getRegionMultiplier( 0 , 1 , FaceDir::DirEnum::YPlus)); - BOOST_CHECK_EQUAL( 1.00 , transMult.getRegionMultiplier( 0 , 1 , FaceDir::DirEnum::ZPlus)); - BOOST_CHECK_EQUAL( 0.10 , transMult.getRegionMultiplier( 0 , 1 , FaceDir::DirEnum::XMinus)); - BOOST_CHECK_EQUAL( 1.00 , transMult.getRegionMultiplier( 0 , 1 , FaceDir::DirEnum::YMinus)); - BOOST_CHECK_EQUAL( 1.00 , transMult.getRegionMultiplier( 0 , 1 , FaceDir::DirEnum::ZMinus)); - BOOST_CHECK_EQUAL( 0.20 , transMult.getRegionMultiplier( 1 , 0 , FaceDir::DirEnum::XPlus)); - BOOST_CHECK_EQUAL( 1.00 , transMult.getRegionMultiplier( 1 , 0 , FaceDir::DirEnum::YPlus)); - BOOST_CHECK_EQUAL( 1.00 , transMult.getRegionMultiplier( 1 , 0 , FaceDir::DirEnum::ZPlus)); - BOOST_CHECK_EQUAL( 0.20 , transMult.getRegionMultiplier( 1 , 0 , FaceDir::DirEnum::XMinus)); - BOOST_CHECK_EQUAL( 1.00 , transMult.getRegionMultiplier( 1 , 0 , FaceDir::DirEnum::YMinus)); - BOOST_CHECK_EQUAL( 1.00 , transMult.getRegionMultiplier( 1 , 0 , FaceDir::DirEnum::ZMinus)); - - // Multipliers between cells of the same region should return 1 - BOOST_CHECK_EQUAL( 1.00 , transMult.getRegionMultiplier( 0 , 2 , FaceDir::DirEnum::XPlus)); - BOOST_CHECK_EQUAL( 1.00 , transMult.getRegionMultiplier( 2 , 0 , FaceDir::DirEnum::XPlus)); - - // Test direcion XYZ, returns values for all directions - BOOST_CHECK_EQUAL( 1.50 , transMult.getRegionMultiplier( 0 , 4 , FaceDir::DirEnum::XPlus)); - BOOST_CHECK_EQUAL( 1.50 , transMult.getRegionMultiplier( 0 , 4 , FaceDir::DirEnum::YPlus)); - BOOST_CHECK_EQUAL( 1.50 , transMult.getRegionMultiplier( 0 , 4 , FaceDir::DirEnum::ZPlus)); - BOOST_CHECK_EQUAL( 1.50 , transMult.getRegionMultiplier( 4 , 0 , FaceDir::DirEnum::XPlus)); - - // The first record is overwritten by the second - BOOST_CHECK_EQUAL( 2.50 , transMult.getRegionMultiplier( 3 , 7 , FaceDir::DirEnum::XPlus)); - BOOST_CHECK_EQUAL( 2.50 , transMult.getRegionMultiplier( 3 , 7 , FaceDir::DirEnum::YPlus)); - - // The 2 4 0.75 Z input is overwritten by 2 4 2.5 XY, ==) that 2 4 Z returns the 4 2 value = 0.6 - BOOST_CHECK_EQUAL( 0.60 , transMult.getRegionMultiplier( 7 , 3 , FaceDir::DirEnum::XPlus)); - BOOST_CHECK_EQUAL( 0.60 , transMult.getRegionMultiplier( 3 , 7 , FaceDir::DirEnum::ZPlus)); - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseMULTSEGWELL.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseMULTSEGWELL.cpp deleted file mode 100644 index 54d2a1d6ee..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseMULTSEGWELL.cpp +++ /dev/null @@ -1,160 +0,0 @@ -/* - Copyright (C) 2015 SINTEF ICT, Applied Mathematics - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE ParseMULTSEGWELL -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -using namespace Opm; - -BOOST_AUTO_TEST_CASE( PARSE_MULTISEGMENT_ABS ) { - - ParserPtr parser(new Parser()); - std::string deckFile("testdata/integration_tests/SCHEDULE/SCHEDULE_MULTISEGMENT_WELL"); - DeckPtr deck = parser->parseFile(deckFile, ParseContext()); - // for WELSEGS keyword - const auto& kw = deck->getKeyword("WELSEGS"); - - // check the size of the keywords - BOOST_CHECK_EQUAL( 6, kw.size() ); - - // check the information for the top segment and the segment set - { - const auto& rec1 = kw.getRecord(0); // top segment - - const std::string well_name = rec1.getItem("WELL").getTrimmedString(0); - const double depth_top = rec1.getItem("DEPTH").get< double >(0); - const double length_top = rec1.getItem("LENGTH").get< double >(0); - const double volume_top = rec1.getItem("WELLBORE_VOLUME").get< double >(0); - const WellSegment::LengthDepthEnum length_depth_type = WellSegment::LengthDepthEnumFromString(rec1.getItem("INFO_TYPE").getTrimmedString(0)); - const WellSegment::CompPressureDropEnum comp_pressure_drop = WellSegment::CompPressureDropEnumFromString(rec1.getItem("PRESSURE_COMPONENTS").getTrimmedString(0)); - const WellSegment::MultiPhaseModelEnum multiphase_model = WellSegment::MultiPhaseModelEnumFromString(rec1.getItem("FLOW_MODEL").getTrimmedString(0)); - - BOOST_CHECK_EQUAL( "PROD01", well_name ); - BOOST_CHECK_EQUAL( 2512.5, depth_top ); - BOOST_CHECK_EQUAL( 2512.5, length_top ); - BOOST_CHECK_EQUAL( 1.0e-5, volume_top ); - const std::string length_depth_type_string = WellSegment::LengthDepthEnumToString(length_depth_type); - BOOST_CHECK_EQUAL( length_depth_type_string, "ABS" ); - const std::string comp_pressure_drop_string = WellSegment::CompPressureDropEnumToString(comp_pressure_drop); - BOOST_CHECK_EQUAL( comp_pressure_drop_string, "H--" ); - const std::string multiphase_model_string = WellSegment::MultiPhaseModelEnumToString(multiphase_model); - BOOST_CHECK_EQUAL( multiphase_model_string, "HO" ); - } - - // check the information for the other segments - // Here, we check the information for the segment 2 and 6 as samples. - { - const auto& rec2 = kw.getRecord(1); - const int segment1 = rec2.getItem("SEGMENT2").get< int >(0); - const int segment2 = rec2.getItem("SEGMENT2").get< int >(0); - BOOST_CHECK_EQUAL( 2, segment1 ); - BOOST_CHECK_EQUAL( 2, segment2 ); - const int branch = rec2.getItem("BRANCH").get< int >(0); - const int outlet_segment = rec2.getItem("JOIN_SEGMENT").get< int >(0); - const double segment_length = rec2.getItem("SEGMENT_LENGTH").get< double >(0); - const double depth_change = rec2.getItem("DEPTH_CHANGE").get< double >(0); - const double diameter = rec2.getItem("DIAMETER").get< double >(0); - const double roughness = rec2.getItem("ROUGHNESS").get< double >(0); - BOOST_CHECK_EQUAL( 1, branch ); - BOOST_CHECK_EQUAL( 1, outlet_segment ); - BOOST_CHECK_EQUAL( 2537.5, segment_length ); - BOOST_CHECK_EQUAL( 2537.5, depth_change ); - BOOST_CHECK_EQUAL( 0.3, diameter ); - BOOST_CHECK_EQUAL( 0.0001, roughness ); - } - - { - const auto& rec6 = kw.getRecord(5); - const int segment1 = rec6.getItem("SEGMENT2").get< int >(0); - const int segment2 = rec6.getItem("SEGMENT2").get< int >(0); - BOOST_CHECK_EQUAL( 6, segment1 ); - BOOST_CHECK_EQUAL( 6, segment2 ); - const int branch = rec6.getItem("BRANCH").get< int >(0); - const int outlet_segment = rec6.getItem("JOIN_SEGMENT").get< int >(0); - const double segment_length = rec6.getItem("SEGMENT_LENGTH").get< double >(0); - const double depth_change = rec6.getItem("DEPTH_CHANGE").get< double >(0); - const double diameter = rec6.getItem("DIAMETER").get< double >(0); - const double roughness = rec6.getItem("ROUGHNESS").get< double >(0); - BOOST_CHECK_EQUAL( 2, branch ); - BOOST_CHECK_EQUAL( 5, outlet_segment ); - BOOST_CHECK_EQUAL( 3137.5, segment_length ); - BOOST_CHECK_EQUAL( 2537.5, depth_change ); - BOOST_CHECK_EQUAL( 0.2, diameter ); - BOOST_CHECK_EQUAL( 0.0001, roughness ); - } - - // for COMPSEG keyword - const auto& kw1 = deck->getKeyword("COMPSEGS"); - // check the size of the keywords - BOOST_CHECK_EQUAL( 7, kw1.size() ); - // first record only contains the well name - { - const auto& rec1 = kw1.getRecord(0); - const std::string well_name = rec1.getItem("WELL").getTrimmedString(0); - BOOST_CHECK_EQUAL( "PROD01", well_name ); - } - - // check the third record and the seventh record - { - const auto& rec3 = kw1.getRecord(2); - const int i = rec3.getItem("I").get< int >(0); - const int j = rec3.getItem("J").get< int >(0); - const int k = rec3.getItem("K").get< int >(0); - const int branch = rec3.getItem("BRANCH").get< int >(0); - const double distance_start = rec3.getItem("DISTANCE_START").get< double >(0); - const double distance_end = rec3.getItem("DISTANCE_END").get< double >(0); - - BOOST_CHECK_EQUAL( 20, i ); - BOOST_CHECK_EQUAL( 1, j ); - BOOST_CHECK_EQUAL( 2, k ); - BOOST_CHECK_EQUAL( 1, branch ); - BOOST_CHECK_EQUAL( 2525.0, distance_start ); - BOOST_CHECK_EQUAL( 2550.0, distance_end ); - } - - { - const auto& rec7 = kw1.getRecord(6); - const int i = rec7.getItem("I").get< int >(0); - const int j = rec7.getItem("J").get< int >(0); - const int k = rec7.getItem("K").get< int >(0); - const int branch = rec7.getItem("BRANCH").get< int >(0); - const double distance_start = rec7.getItem("DISTANCE_START").get< double >(0); - const double distance_end = rec7.getItem("DISTANCE_END").get< double >(0); - - BOOST_CHECK_EQUAL( 17, i ); - BOOST_CHECK_EQUAL( 1, j ); - BOOST_CHECK_EQUAL( 2, k ); - BOOST_CHECK_EQUAL( 2, branch ); - BOOST_CHECK_EQUAL( 3037.5, distance_start ); - BOOST_CHECK_EQUAL( 3237.5, distance_end ); - } - - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseMiscible.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseMiscible.cpp deleted file mode 100644 index b48e5778fe..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseMiscible.cpp +++ /dev/null @@ -1,271 +0,0 @@ -/* - Copyright 2015 IRIS AS. - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE ParseMiscible -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -using namespace Opm; - -const std::string miscibleData = "\n\ -MISCIBLE\n\ -2 3 /\n\ -\n"; - -const std::string miscibleTightData = "\n\ -MISCIBLE\n\ -1 2 /\n\ -\n"; - -const std::string sorwmisData = "\n\ -SORWMIS\n\ -.00 .00 \n\ -.50 .00 \n\ -1.0 .00 /\n\ -.00 .00 \n\ -.30 .20 \n\ -1.0 .80 /\n\ -\n"; - -const std::string sgcwmisData = "\n\ -SGCWMIS\n\ -.00 .00 \n\ -.20 .00 \n\ -1.0 .00 /\n\ -.00 .00 \n\ -.80 .20 \n\ -1.0 .70 /\n\ -\n"; - -BOOST_AUTO_TEST_CASE( PARSE_SORWMIS) -{ -ParserPtr parser(new Parser()); - -// missing miscible keyword -BOOST_CHECK_THROW (parser->parseString(sorwmisData, ParseContext()), std::invalid_argument ); - -//too many tables -BOOST_CHECK_THROW( parser->parseString(miscibleTightData + sorwmisData, ParseContext()), std::invalid_argument); - -DeckPtr deck1 = parser->parseString(miscibleData + sorwmisData, ParseContext()); - -const auto& sorwmis = deck1->getKeyword("SORWMIS"); -const auto& miscible = deck1->getKeyword("MISCIBLE"); - -const auto& miscible0 = miscible.getRecord(0); -const auto& sorwmis0 = sorwmis.getRecord(0); -const auto& sorwmis1 = sorwmis.getRecord(1); - - -// test number of columns -size_t ntmisc = miscible0.getItem(0).get< int >(0); -Opm::SorwmisTable sorwmisTable0(sorwmis0.getItem(0)); -BOOST_CHECK_EQUAL(sorwmisTable0.numColumns(),ntmisc); - -// test table input 1 -BOOST_CHECK_EQUAL(3U, sorwmisTable0.getWaterSaturationColumn().size()); -BOOST_CHECK_EQUAL(1.0, sorwmisTable0.getWaterSaturationColumn()[2]); -BOOST_CHECK_EQUAL(0.0, sorwmisTable0.getMiscibleResidualOilColumn()[2]); - -// test table input 2 - Opm::SorwmisTable sorwmisTable1(sorwmis1.getItem(0)); -BOOST_CHECK_EQUAL(sorwmisTable1.numColumns(),ntmisc); - -BOOST_CHECK_EQUAL(3U, sorwmisTable1.getWaterSaturationColumn().size()); -BOOST_CHECK_EQUAL(0.3, sorwmisTable1.getWaterSaturationColumn()[1]); -BOOST_CHECK_EQUAL(0.8, sorwmisTable1.getMiscibleResidualOilColumn()[2]); -} - -BOOST_AUTO_TEST_CASE( PARSE_SGCWMIS) -{ - ParserPtr parser(new Parser()); - - DeckPtr deck1 = parser->parseString(miscibleData + sgcwmisData, ParseContext()); - - const auto& sgcwmis = deck1->getKeyword("SGCWMIS"); - const auto& miscible = deck1->getKeyword("MISCIBLE"); - - const auto& miscible0 = miscible.getRecord(0); - const auto& sgcwmis0 = sgcwmis.getRecord(0); - const auto& sgcwmis1 = sgcwmis.getRecord(1); - - - // test number of columns - size_t ntmisc = miscible0.getItem(0).get< int >(0); - Opm::SgcwmisTable sgcwmisTable0(sgcwmis0.getItem(0)); - BOOST_CHECK_EQUAL(sgcwmisTable0.numColumns(),ntmisc); - - // test table input 1 - BOOST_CHECK_EQUAL(3U, sgcwmisTable0.getWaterSaturationColumn().size()); - BOOST_CHECK_EQUAL(0.2, sgcwmisTable0.getWaterSaturationColumn()[1]); - BOOST_CHECK_EQUAL(0.0, sgcwmisTable0.getMiscibleResidualGasColumn()[1]); - - // test table input 2 - Opm::SgcwmisTable sgcwmisTable1(sgcwmis1.getItem(0)); - BOOST_CHECK_EQUAL(sgcwmisTable1.numColumns(),ntmisc); - - BOOST_CHECK_EQUAL(3U, sgcwmisTable1.getWaterSaturationColumn().size()); - BOOST_CHECK_EQUAL(0.8, sgcwmisTable1.getWaterSaturationColumn()[1]); - BOOST_CHECK_EQUAL(0.2, sgcwmisTable1.getMiscibleResidualGasColumn()[1]); -} - -const char *miscData = "\n\ -MISCIBLE\n\ -1 3 /\n\ -\n\ -MISC\n\ - 0.0 0.0 \n\ - 0.1 0.5 \n\ - 1.0 1.0 /\n\ -\n"; - -const char *miscOutOfRangeData = "\n\ -MISCIBLE\n\ -1 3 /\n\ -\n\ -MISC\n\ -0.0 0.0 \n\ -1.0 0.5 \n\ -2.0 1.0 /\n\ -\n"; - -const char *miscTooSmallRangeData = "\n\ -MISCIBLE\n\ -1 3 /\n\ -\n\ -MISC\n\ -0.0 0.0 \n\ -1.0 0.5 /\n\ -\n"; - -BOOST_AUTO_TEST_CASE(PARSE_MISC) -{ - ParserPtr parser(new Parser()); - - // out of range MISC keyword - DeckPtr deck1 = parser->parseString(miscOutOfRangeData, ParseContext()); - const auto& item = deck1->getKeyword("MISC").getRecord(0).getItem(0); - Opm::MiscTable miscTable1(item); - - - // too litle range of MISC keyword - DeckPtr deck2 = parser->parseString(miscTooSmallRangeData, ParseContext()); - const auto& item2 = deck2->getKeyword("MISC").getRecord(0).getItem(0); - Opm::MiscTable miscTable2(item2); - - // test table input - DeckPtr deck3 = parser->parseString(miscData, ParseContext()); - const auto& item3 = deck3->getKeyword("MISC").getRecord(0).getItem(0); - Opm::MiscTable miscTable3(item3); - BOOST_CHECK_EQUAL(3U, miscTable3.getSolventFractionColumn().size()); - BOOST_CHECK_EQUAL(0.1, miscTable3.getSolventFractionColumn()[1]); - BOOST_CHECK_EQUAL(0.5, miscTable3.getMiscibilityColumn()[1]); -} - -const char *pmiscData = "\n\ -MISCIBLE\n\ -1 3 /\n\ -\n\ -PMISC\n\ -100 0.0 \n\ -200 0.5 \n\ -500 1.0 /\n\ -\n"; - -BOOST_AUTO_TEST_CASE(PARSE_PMISC) -{ - ParserPtr parser(new Parser()); - - // test table input - DeckPtr deck = parser->parseString(pmiscData, ParseContext()); - Opm::PmiscTable pmiscTable(deck->getKeyword("PMISC").getRecord(0).getItem(0)); - BOOST_CHECK_EQUAL(3U, pmiscTable.getOilPhasePressureColumn().size()); - BOOST_CHECK_EQUAL(200*1e5, pmiscTable.getOilPhasePressureColumn()[1]); - BOOST_CHECK_EQUAL(0.5, pmiscTable.getMiscibilityColumn()[1]); -} - -const char *msfnData = "\n\ -TABDIMS\n\ -2 /\n\ -\n\ -MSFN\n\ -0.0 0.0 1.0 \n\ -1.0 1.0 0.0 /\n\ -0.0 0.0 1.0 \n\ -0.5 0.3 0.7 \n\ -1.0 1.0 0.0 /\n\ -\n"; - -BOOST_AUTO_TEST_CASE(PARSE_MSFN) -{ -ParserPtr parser(new Parser()); -DeckPtr deck = parser->parseString(msfnData, ParseContext()); - -// test table input 1 - Opm::MsfnTable msfnTable1(deck->getKeyword("MSFN").getRecord(0).getItem(0)); - BOOST_CHECK_EQUAL(2U, msfnTable1.getGasPhaseFractionColumn().size()); - BOOST_CHECK_EQUAL(1.0, msfnTable1.getGasPhaseFractionColumn()[1]); - BOOST_CHECK_EQUAL(1.0, msfnTable1.getGasSolventRelpermMultiplierColumn()[1]); - BOOST_CHECK_EQUAL(0.0, msfnTable1.getOilRelpermMultiplierColumn()[1]); - -// test table input 2 -Opm::MsfnTable msfnTable2(deck->getKeyword("MSFN").getRecord(1).getItem(0)); -BOOST_CHECK_EQUAL(3U, msfnTable2.getGasPhaseFractionColumn().size()); -BOOST_CHECK_EQUAL(0.5, msfnTable2.getGasPhaseFractionColumn()[1]); -BOOST_CHECK_EQUAL(0.3, msfnTable2.getGasSolventRelpermMultiplierColumn()[1]); -BOOST_CHECK_EQUAL(0.7, msfnTable2.getOilRelpermMultiplierColumn()[1]); -} - -const char *tlpmixpa = "\n\ -MISCIBLE\n\ -1 3 /\n\ -\n\ -TLPMIXPA\n\ -100 0.0 \n\ -200 0.5 \n\ -500 1.0 /\n\ -\n"; - -BOOST_AUTO_TEST_CASE(PARSE_TLPMIXPA) -{ - ParserPtr parser(new Parser()); - - // test table input - DeckPtr deck = parser->parseString(tlpmixpa, ParseContext()); - Opm::TlpmixpaTable tlpmixpaTable(deck->getKeyword("TLPMIXPA").getRecord(0).getItem(0)); - BOOST_CHECK_EQUAL(3U, tlpmixpaTable.getOilPhasePressureColumn().size()); - BOOST_CHECK_EQUAL(200*1e5, tlpmixpaTable.getOilPhasePressureColumn()[1]); - BOOST_CHECK_EQUAL(0.5, tlpmixpaTable.getMiscibilityColumn()[1]); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParsePLYADS.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParsePLYADS.cpp deleted file mode 100644 index dc0da80734..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParsePLYADS.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE ParsePLYVISC -#include - -#include -#include -#include - -#include -#include -#include -#include - -using namespace Opm; - - - -BOOST_AUTO_TEST_CASE( PARSE_PLYADS_OK) { - ParserPtr parser(new Parser()); - std::string deckFile("testdata/integration_tests/POLYMER/plyads.data"); - DeckPtr deck = parser->parseFile(deckFile); - const auto& = deck->getKeyword("PLYADS"); - const auto& rec = kw.getRecord(0); - auto* item = rec.getItem(0); - - BOOST_CHECK_EQUAL( 0.0 , item.get< double >(0) ); - BOOST_CHECK_EQUAL( 0.25 , item.get< double >(2) ); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParsePLYADSS.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParsePLYADSS.cpp deleted file mode 100644 index 9314f1f6ee..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParsePLYADSS.cpp +++ /dev/null @@ -1,43 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE ParsePLYVISC -#include - -#include -#include - -#include -#include -#include -#include -#include - -using namespace Opm; - - - -BOOST_AUTO_TEST_CASE( PARSE_PLYADSS_OK) { - ParserPtr parser(new Parser()); - std::string deckFile("testdata/integration_tests/POLYMER/plyadss.data"); - DeckPtr deck = parser->parseFile(deckFile, ParseContext()); - const auto& kw = deck->getKeyword("PLYADSS"); - - BOOST_CHECK_EQUAL( kw.size() , 11U ); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParsePLYDHFLF.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParsePLYDHFLF.cpp deleted file mode 100644 index eafd5476a4..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParsePLYDHFLF.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE ParsePLYDHFLF -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -using namespace Opm; - - - -BOOST_AUTO_TEST_CASE( PARSE_PLYDHFLF_OK) { - ParserPtr parser(new Parser()); - std::string deckFile("testdata/integration_tests/POLYMER/plydhflf.data"); - DeckPtr deck = parser->parseFile(deckFile, ParseContext()); - const auto& kw = deck->getKeyword("PLYDHFLF"); - const auto& rec = kw.getRecord(0); - const auto& item = rec.getItem(0); - - BOOST_CHECK_EQUAL( 0.0 , item.get< double >(0) ); - BOOST_CHECK_EQUAL( 365.0, item.get< double >(1) ); - BOOST_CHECK_EQUAL( 200.0 , item.get< double >(5) ); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParsePLYSHLOG.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParsePLYSHLOG.cpp deleted file mode 100644 index 5ed3f24b3e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParsePLYSHLOG.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE ParsePLYSHLOG -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -using namespace Opm; - - - -BOOST_AUTO_TEST_CASE( PARSE_PLYSHLOG_OK) { - ParserPtr parser(new Parser()); - std::string deckFile("testdata/integration_tests/POLYMER/plyshlog.data"); - DeckPtr deck = parser->parseFile(deckFile, ParseContext()); - const auto& kw = deck->getKeyword("PLYSHLOG"); - const auto& rec1 = kw.getRecord(0); // reference conditions - - const auto& itemRefPolyConc = rec1.getItem("REF_POLYMER_CONCENTRATION"); - const auto& itemRefSali = rec1.getItem("REF_SALINITY"); - const auto& itemRefTemp = rec1.getItem("REF_TEMPERATURE"); - - BOOST_CHECK_EQUAL( true, itemRefPolyConc.hasValue(0) ); - BOOST_CHECK_EQUAL( true, itemRefSali.hasValue(0) ); - BOOST_CHECK_EQUAL( false, itemRefTemp.hasValue(0) ); - - BOOST_CHECK_EQUAL( 1.0, itemRefPolyConc.get< double >(0) ); - BOOST_CHECK_EQUAL( 3.0, itemRefSali.get< double >(0) ); - - const auto& rec2 = kw.getRecord(1); - const auto& itemData = rec2.getItem(0); - - BOOST_CHECK_EQUAL( 1.e-7 , itemData.get< double >(0) ); - BOOST_CHECK_EQUAL( 1.0 , itemData.get< double >(1) ); - BOOST_CHECK_EQUAL( 1.0 , itemData.get< double >(2) ); - BOOST_CHECK_EQUAL( 1.2 , itemData.get< double >(3) ); - BOOST_CHECK_EQUAL( 1.e3 , itemData.get< double >(4) ); - BOOST_CHECK_EQUAL( 2.4 , itemData.get< double >(5) ); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParsePLYVISC.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParsePLYVISC.cpp deleted file mode 100644 index e3a694180b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParsePLYVISC.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE ParsePLYVISC -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -using namespace Opm; - - - -BOOST_AUTO_TEST_CASE( PARSE_PLYVISC_OK) { - ParserPtr parser(new Parser()); - std::string deckFile("testdata/integration_tests/POLYMER/plyvisc.data"); - DeckPtr deck = parser->parseFile(deckFile, ParseContext()); - const auto& kw = deck->getKeyword("PLYVISC"); - const auto& rec = kw.getRecord(0); - const auto& item = rec.getItem(0); - - BOOST_CHECK_EQUAL( 0.0 , item.get< double >(0) ); - BOOST_CHECK_EQUAL( 1.25 , item.get< double >(2) ); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParsePORO.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParsePORO.cpp deleted file mode 100644 index 382dc29231..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParsePORO.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE ParserIntegrationTests -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -using namespace Opm; - - -BOOST_AUTO_TEST_CASE(ParsePOROandPERMX) { - ParserPtr parser(new Parser()); - std::string poroFile("testdata/integration_tests/PORO/PORO1"); - DeckPtr deck = parser->parseFile(poroFile, ParseContext()); - const auto& kw1 = deck->getKeyword("PORO" , 0); - const auto& kw2 = deck->getKeyword("PERMX" , 0); - - BOOST_CHECK_THROW( kw1.getIntData() , std::logic_error ); - BOOST_CHECK_THROW( kw1.getStringData() , std::logic_error ); - - { - const std::vector& poro = kw1.getRawDoubleData(); - BOOST_CHECK_EQUAL( 440U , poro.size() ); - BOOST_CHECK_EQUAL( 0.233782813 , poro[0]); - BOOST_CHECK_EQUAL( 0.251224369 , poro[1]); - BOOST_CHECK_EQUAL( 0.155628711 , poro[439]); - } - - { - const std::vector& permx = kw2.getSIDoubleData(); - const std::vector& permxRAW = kw2.getRawDoubleData(); - BOOST_CHECK_EQUAL( 1000U , permx.size() ); - BOOST_CHECK_EQUAL( 1000U , permxRAW.size() ); - - BOOST_CHECK_CLOSE( Metric::Permeability * 1 , permx[0] , 0.001); - BOOST_CHECK_CLOSE( Metric::Permeability * 2 , permx[1] , 0.001); - BOOST_CHECK_CLOSE( Metric::Permeability * 3 , permx[2] , 0.001); - BOOST_CHECK_CLOSE( Metric::Permeability * 10, permx[999] , 0.001); - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParsePVTG.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParsePVTG.cpp deleted file mode 100644 index 7cb18619a2..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParsePVTG.cpp +++ /dev/null @@ -1,143 +0,0 @@ -/* - Copyright (C) 2013 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#define BOOST_TEST_MODULE ParserIntegrationTests -#include - -#include -#include - - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace Opm; - -const char *pvtgData = "\n\ -TABDIMS\n\ --- NTSFUN NTPVT NSSFUN NPPVT NTFIP NRPVT\n\ - 1 2 30 24 10 20 /\n\ -\n\ -PVTG\n\ ---\n\ - 20.00 0.00002448 0.061895 0.01299\n\ - 0.00001224 0.061810 0.01300\n\ - 0.00000000 0.061725 0.01300 /\n\ - 40.00 0.00000628 0.030252 0.01383\n\ - 0.00000314 0.030249 0.01383\n\ - 0.00000000 0.030245 0.01383 /\n\ -/\n\ - 197.66 0.00006327 1* 0.02160\n\ - 0.00003164 * 0.02122\n\ - 0.00000000 0.005860 0.02086 /\n\ - 231.13 0.00010861 0.005042 0.02477\n\ - 0.00005431 0.005061 0.02389\n\ - 0.00000000 0.005082 0.02306 /\n\ - /\n"; - - -static void check_parser(ParserPtr parser) { - DeckPtr deck = parser->parseString(pvtgData, ParseContext()); - const auto& kw1 = deck->getKeyword("PVTG" , 0); - BOOST_CHECK_EQUAL(5U , kw1.size()); - - const auto& record0 = kw1.getRecord(0); - const auto& record1 = kw1.getRecord(1); - const auto& record2 = kw1.getRecord(2); - const auto& record3 = kw1.getRecord(3); - const auto& record4 = kw1.getRecord(4); - - const auto& item0_0 = record0.getItem("GAS_PRESSURE"); - const auto& item0_1 = record0.getItem("DATA"); - BOOST_CHECK_EQUAL(1U , item0_0.size()); - BOOST_CHECK_EQUAL(9U , item0_1.size()); - BOOST_CHECK_EQUAL(2U , record0.size()); - - const auto& item1_0 = record1.getItem("GAS_PRESSURE"); - const auto& item1_1 = record1.getItem("DATA"); - BOOST_CHECK_EQUAL(1U , item1_0.size()); - BOOST_CHECK_EQUAL(9U , item1_1.size()); - BOOST_CHECK_EQUAL(2U , record1.size()); - - const auto& item2_0 = record2.getItem("GAS_PRESSURE"); - const auto& item2_1 = record2.getItem("DATA"); - BOOST_CHECK( item2_0.defaultApplied(0)); - BOOST_CHECK_EQUAL(0U , item2_1.size()); - BOOST_CHECK_EQUAL(2U , record2.size()); - - - const auto& item3_0 = record3.getItem("GAS_PRESSURE"); - const auto& item3_1 = record3.getItem("DATA"); - BOOST_CHECK( !item3_1.defaultApplied(0)); - BOOST_CHECK( item3_1.defaultApplied(1)); - BOOST_CHECK( !item3_1.defaultApplied(2)); - BOOST_CHECK( !item3_1.defaultApplied(3)); - BOOST_CHECK( item3_1.defaultApplied(4)); - BOOST_CHECK( !item3_1.defaultApplied(5)); - BOOST_CHECK_EQUAL(1U , item3_0.size()); - BOOST_CHECK_EQUAL(9U , item3_1.size()); - BOOST_CHECK_EQUAL(2U , record3.size()); - - - const auto& item4_0 = record4.getItem("GAS_PRESSURE"); - const auto& item4_1 = record4.getItem("DATA"); - BOOST_CHECK_EQUAL(1U , item4_0.size()); - BOOST_CHECK_EQUAL(9U , item4_1.size()); - BOOST_CHECK_EQUAL(2U , record4.size()); - - /* - { - Opm::PvtgTable pvtgTable; - pvtgTable.initFORUNITTESTONLY(kw1, 0); - - const auto &outerTable = *pvtgTable.getOuterTable(); - const auto &innerTable0 = *pvtgTable.getInnerTable(0); - - BOOST_CHECK_EQUAL(2U, outerTable.numRows()); - BOOST_CHECK_EQUAL(4U, outerTable.numColumns()); - BOOST_CHECK_EQUAL(3U, innerTable0.numRows()); - BOOST_CHECK_EQUAL(3U, innerTable0.numColumns()); - - BOOST_CHECK_EQUAL(20.0e5, outerTable.getPressureColumn()[0]); - BOOST_CHECK_EQUAL(0.00002448, outerTable.getOilSolubilityColumn()[0]); - BOOST_CHECK_EQUAL(outerTable.getOilSolubilityColumn()[0], innerTable0.getOilSolubilityColumn()[0]); - BOOST_CHECK_EQUAL(0.061895, outerTable.getGasFormationFactorColumn()[0]); - BOOST_CHECK_EQUAL(outerTable.getGasFormationFactorColumn()[0], innerTable0.getGasFormationFactorColumn()[0]); - BOOST_CHECK_EQUAL(1.299e-5, outerTable.getGasViscosityColumn()[0]); - BOOST_CHECK_EQUAL(outerTable.getGasViscosityColumn()[0], innerTable0.getGasViscosityColumn()[0]); - } - */ -} - - -BOOST_AUTO_TEST_CASE( parse_PVTG_OK ) { - ParserPtr parser(new Parser()); - check_parser( parser ); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParsePVTO.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParsePVTO.cpp deleted file mode 100644 index 12e0a6e93f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParsePVTO.cpp +++ /dev/null @@ -1,131 +0,0 @@ -/* - Copyright (C) 2013 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#define BOOST_TEST_MODULE ParserIntegrationTests -#include - -#include -#include - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace Opm; - -const char *pvtoData = "\n\ -TABDIMS\n\ --- NTSFUN NTPVT NSSFUN NPPVT NTFIP NRPVT\n\ - 1 2 30 24 10 20 /\n\ -\n\ -PVTO\n\ --- Rs PO BO MUO\n\ - 1e-3 1 1.01 1.02\n\ - 250 1.15 0.95\n\ - 500 1.20 0.93 /\n\ - 1e-2 14.8 1.05 1.03\n\ - 251 1.25 0.98\n\ - 502 1.30 0.95 /\n\ -/\n\ - 1e-1 1.1 1.02 1.03\n\ - 253 1.16 0.96\n\ - 504 1.21 0.97 /\n\ - 1e00 15 1.06 1.04\n\ - 255 1.26 0.99\n\ - 506 1.31 0.96 /\n\ -/\n"; - - -static void check_parser(ParserPtr parser) { - DeckPtr deck = parser->parseString(pvtoData, ParseContext()); - const auto& kw1 = deck->getKeyword("PVTO" , 0); - BOOST_CHECK_EQUAL(5U , kw1.size()); - - const auto& record0 = kw1.getRecord(0); - const auto& record1 = kw1.getRecord(1); - const auto& record2 = kw1.getRecord(2); - const auto& record3 = kw1.getRecord(3); - const auto& record4 = kw1.getRecord(4); - - const auto& item0_0 = record0.getItem("RS"); - const auto& item0_1 = record0.getItem("DATA"); - BOOST_CHECK_EQUAL(1U , item0_0.size()); - BOOST_CHECK_EQUAL(9U , item0_1.size()); - BOOST_CHECK_EQUAL(2U , record0.size()); - - const auto& item1_0 = record1.getItem("RS"); - const auto& item1_1 = record1.getItem("DATA"); - BOOST_CHECK_EQUAL(1U , item1_0.size()); - BOOST_CHECK_EQUAL(9U , item1_1.size()); - BOOST_CHECK_EQUAL(2U , record1.size()); - - const auto& item2_0 = record2.getItem("RS"); - const auto& item2_1 = record2.getItem("DATA"); - BOOST_CHECK(item2_0.defaultApplied(0)); - BOOST_CHECK_EQUAL(0U , item2_1.size()); - BOOST_CHECK_EQUAL(2U , record2.size()); - - const auto& item3_0 = record3.getItem("RS"); - const auto& item3_1 = record3.getItem("DATA"); - BOOST_CHECK_EQUAL(1U , item3_0.size()); - BOOST_CHECK_EQUAL(9U , item3_1.size()); - BOOST_CHECK_EQUAL(2U , record3.size()); - - const auto& item4_0 = record4.getItem("RS"); - const auto& item4_1 = record4.getItem("DATA"); - BOOST_CHECK_EQUAL(1U , item4_0.size()); - BOOST_CHECK_EQUAL(9U , item4_1.size()); - BOOST_CHECK_EQUAL(2U , record4.size()); - - - Opm::PvtoTable pvtoTable(kw1 , 0); - BOOST_CHECK_EQUAL(2, pvtoTable.size()); - - const auto &table0 = pvtoTable.getUnderSaturatedTable(0); - const auto& BO = table0.getColumn( "BO" ); - - BOOST_CHECK_EQUAL( 3, table0.numRows()); - BOOST_CHECK_EQUAL( 3, table0.numColumns()); - BOOST_CHECK_EQUAL( BO.front( ) , 1.01 ); - BOOST_CHECK_EQUAL( BO.back( ) , 1.20 ); - - BOOST_CHECK_CLOSE(1.15 , table0.evaluate( "BO" , 250*1e5 ) , 1e-6); - - BOOST_CHECK_CLOSE( 1.15 , pvtoTable.evaluate( "BO" , 1e-3 , 250*1e5 ) , 1e-6 ); - BOOST_CHECK_CLOSE( 1.15 , pvtoTable.evaluate( "BO" , 0.0 , 250*1e5 ) , 1e-6 ); -} - - -BOOST_AUTO_TEST_CASE( parse_PVTO_OK ) { - ParserPtr parser(new Parser()); - check_parser( parser ); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseRSVD.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseRSVD.cpp deleted file mode 100644 index 120fe33759..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseRSVD.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#define BOOST_TEST_MODULE ParserIntegrationTests -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -using namespace Opm; - - - -BOOST_AUTO_TEST_CASE( parse_EQUIL_OK ) { - ParserPtr parser(new Parser()); - std::string pvtgFile("testdata/integration_tests/RSVD/RSVD.txt"); - DeckPtr deck = parser->parseFile(pvtgFile, ParseContext()); - const auto& kw1 = deck->getKeyword("RSVD" , 0); - BOOST_CHECK_EQUAL( 6U , kw1.size() ); - - - const auto& rec1 = kw1.getRecord(0); - const auto& rec3 = kw1.getRecord(2); - - const auto& item1 = rec1.getItem("table"); - BOOST_CHECK( fabs(item1.getSIDouble(0) - 2382) < 0.001); - - const auto& item3 = rec3.getItem("table"); - BOOST_CHECK( fabs(item3.getSIDouble(7) - 106.77) < 0.001); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseSGOF.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseSGOF.cpp deleted file mode 100644 index 3aa359d221..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseSGOF.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ -#define BOOST_TEST_MODULE ParserIntegrationTests -#include - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -using namespace Opm; - -// the data which ought to be parsed -const char *parserData = - "TABDIMS\n" - "-- NTSFUN NTPVT NSSFUN NPPVT NTFIP NRPVT\n" - " 1 1 30 1 1 1 /\n" - "\n" - "-- S_g k_rg k_rog p_cog\n" - "SGOF\n" - " 0.1 0.0 1.0 0.0\n" - " 0.2 0.1 1.0 1.0\n" - " 0.3 0.2 0.9 2.0\n" - " 0.4 0.3 0.8 3.0\n" - " 0.5 0.5 0.5 4.0\n" - " 0.6 0.6 0.4 5.0\n" - " 0.7 0.8 0.3 6.0\n" - " 0.8 0.9 0.2 7.0\n" - " 0.9 0.5 0.1 8.0\n" - " 1.0 1.0 0.1 9.0 /\n"; - -static void check_parser(ParserPtr parser) { - DeckPtr deck = parser->parseString(parserData, ParseContext()); - const auto& kw1 = deck->getKeyword("SGOF"); - BOOST_CHECK_EQUAL(1U , kw1.size()); - - const auto& record0 = kw1.getRecord(0); - BOOST_CHECK_EQUAL(1U , record0.size()); - - const auto& item0 = record0.getItem(0); - BOOST_CHECK_EQUAL(10U * 4, item0.size()); -} - -static void check_SgofTable(ParserPtr parser) { - DeckPtr deck = parser->parseString(parserData, ParseContext()); - Opm::SgofTable sgofTable(deck->getKeyword("SGOF").getRecord(0).getItem(0)); - - BOOST_CHECK_EQUAL(10U, sgofTable.getSgColumn().size()); - BOOST_CHECK_EQUAL(0.1, sgofTable.getSgColumn()[0]); - BOOST_CHECK_EQUAL(0.0, sgofTable.getKrgColumn()[0]); - BOOST_CHECK_EQUAL(1.0, sgofTable.getKrogColumn()[0]); - BOOST_CHECK_EQUAL(0.0, sgofTable.getPcogColumn()[0]); -} - -BOOST_AUTO_TEST_CASE( parse_SGOF_OK ) { - ParserPtr parser(new Parser(/*addDefault=*/true)); - - check_parser( parser ); - check_SgofTable(parser); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseSLGOF.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseSLGOF.cpp deleted file mode 100644 index db99e6c82a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseSLGOF.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ -#define BOOST_TEST_MODULE ParserIntegrationTests -#include - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -using namespace Opm; - -// the data which ought to be parsed -const char *parserData = - "TABDIMS\n" - "-- NTSFUN NTPVT NSSFUN NPPVT NTFIP NRPVT\n" - " 1 1 30 1 1 1 /\n" - "\n" - "-- S_l k_rg k_rog p_cog\n" - "SLGOF\n" - " 0.1 1.0 0.0 9.0\n" - " 0.2 0.9 0.2 8.0\n" - " 0.3 0.8 0.3 7.0\n" - " 0.4 0.7 0.3 6.0\n" - " 0.5 0.6 0.4 5.0\n" - " 0.6 0.5 0.5 4.0\n" - " 0.7 0.3 0.8 3.0\n" - " 0.8 0.2 0.9 2.0\n" - " 0.9 0.1 1.0 1.0\n" - " 1.0 0.0 1.0 0.0 /\n"; - -static void check_parser(ParserPtr parser) { - DeckPtr deck = parser->parseString(parserData, ParseContext()); - const auto& kw1 = deck->getKeyword("SLGOF"); - BOOST_CHECK_EQUAL(1U , kw1.size()); - - const auto& record0 = kw1.getRecord(0); - BOOST_CHECK_EQUAL(1U , record0.size()); - - const auto& item0 = record0.getItem(0); - BOOST_CHECK_EQUAL(10U * 4, item0.size()); -} - -static void check_SlgofTable(ParserPtr parser) { - DeckPtr deck = parser->parseString(parserData, ParseContext()); - Opm::SlgofTable slgofTable(deck->getKeyword("SLGOF").getRecord(0).getItem(0)); - - BOOST_CHECK_EQUAL(10U, slgofTable.getSlColumn().size()); - BOOST_CHECK_EQUAL(0.1, slgofTable.getSlColumn()[0]); - BOOST_CHECK_EQUAL(1.0, slgofTable.getSlColumn()[9]); - BOOST_CHECK_EQUAL(0.0, slgofTable.getKrgColumn()[9]); - BOOST_CHECK_EQUAL(1.0, slgofTable.getKrogColumn()[9]); - BOOST_CHECK_EQUAL(0.0, slgofTable.getPcogColumn()[9]); -} - -BOOST_AUTO_TEST_CASE( parse_SLGOF_OK ) { - ParserPtr parser(new Parser(/*addDefault=*/true)); - - check_parser( parser ); - check_SlgofTable(parser); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseSWOF.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseSWOF.cpp deleted file mode 100644 index 2ec9654c19..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseSWOF.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/* - Copyright (C) 2013 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - - -#define BOOST_TEST_MODULE ParserIntegrationTests -#include - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -using namespace Opm; - -// the data which ought to be parsed -const char *parserData = - "TABDIMS\n" - "-- NTSFUN NTPVT NSSFUN NPPVT NTFIP NRPVT\n" - " 1 1 30 1 1 1 /\n" - "\n" - "-- S_w k_rw k_row p_cow\n" - "SWOF\n" - " 0.1 2* 0.0\n" - " 0.2 0.1 1.0 1.0\n" - " 0.3 1* 0.9 2.0\n" - " 0.4 0.3 1* 3.0\n" - " 0.5 0.5 0.5 4.0\n" - " 0.6 0.6 0.4 1*\n" - " 0.7 0.8 0.3 6.0\n" - " 0.8 0.9 0.2 7.0\n" - " 0.9 0.5 0.1 8.0\n" - " 1.0 1* 0.1 9.0 /\n"; - -static void check_parser(ParserPtr parser) { - DeckPtr deck = parser->parseString(parserData, ParseContext()); - const auto& kw1 = deck->getKeyword("SWOF"); - BOOST_CHECK_EQUAL(1U , kw1.size()); - - const auto& record0 = kw1.getRecord(0); - BOOST_CHECK_EQUAL(1U , record0.size()); - - const auto& item0 = record0.getItem(0); - BOOST_CHECK_EQUAL(10U * 4, item0.size()); -} - -static void check_SwofTable(ParserPtr parser) { - DeckPtr deck = parser->parseString(parserData, ParseContext()); - Opm::SwofTable swofTable(deck->getKeyword("SWOF").getRecord(0).getItem(0)); - - BOOST_CHECK_EQUAL(10U, swofTable.getSwColumn().size()); - BOOST_CHECK_CLOSE(0.1, swofTable.getSwColumn()[0], 1e-8); - BOOST_CHECK_CLOSE(1.0, swofTable.getSwColumn().back(), 1e-8); - - BOOST_CHECK_CLOSE(0.1, swofTable.getKrwColumn()[0], 1e-8); - BOOST_CHECK_CLOSE(0.1, swofTable.getKrwColumn()[1], 1e-8); - BOOST_CHECK_CLOSE(0.2, swofTable.getKrwColumn()[2], 1e-8); - BOOST_CHECK_CLOSE(0.3, swofTable.getKrwColumn()[3], 1e-8); - BOOST_CHECK_CLOSE(0.5, swofTable.getKrwColumn().back(), 1e-8); - - BOOST_CHECK_CLOSE(1.0, swofTable.getKrowColumn()[0], 1e-8); - BOOST_CHECK_CLOSE(0.9, swofTable.getKrowColumn()[2], 1e-8); - BOOST_CHECK_CLOSE(0.7, swofTable.getKrowColumn()[3], 1e-8); - BOOST_CHECK_CLOSE(0.5, swofTable.getKrowColumn()[4], 1e-8); - - BOOST_CHECK_CLOSE(4.0e5, swofTable.getPcowColumn()[4], 1e-8); - BOOST_CHECK_CLOSE(5.0e5, swofTable.getPcowColumn()[5], 1e-8); - BOOST_CHECK_CLOSE(6.0e5, swofTable.getPcowColumn()[6], 1e-8); - - BOOST_CHECK_CLOSE(0.10, swofTable.evaluate("KRW", -0.1), 1e-8); - BOOST_CHECK_CLOSE(0.15, swofTable.evaluate("KRW", 0.25), 1e-8); - BOOST_CHECK_CLOSE(0.50, swofTable.evaluate("KRW", 1.1), 1e-8); -} - -BOOST_AUTO_TEST_CASE( parse_SWOF_OK ) { - ParserPtr parser(new Parser(/*addDefault=*/true)); - - check_parser( parser ); - check_SwofTable(parser); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseTITLE.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseTITLE.cpp deleted file mode 100644 index bd6f7a3d99..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseTITLE.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE ParserIntegrationTests -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -using namespace Opm; - - - - -BOOST_AUTO_TEST_CASE( parse_TITLE_OK ) { - ParserPtr parser(new Parser()); - std::string fileWithTitleKeyword("testdata/integration_tests/TITLE/TITLE1.txt"); - - DeckPtr deck = parser->parseFile(fileWithTitleKeyword, ParseContext()); - - BOOST_CHECK_EQUAL(size_t(2), deck->size()); - BOOST_CHECK_EQUAL (true, deck->hasKeyword("TITLE")); - const auto& titleKeyword = deck->getKeyword("TITLE"); - const auto& record = titleKeyword.getRecord(0); - const auto& item = record.getItem(0); - std::vector itemValue = item.getData< std::string >(); - std::string itemValueString = boost::algorithm::join(itemValue, " "); - - BOOST_CHECK_EQUAL (0, itemValueString.compare("This is the title of the model.")); - BOOST_CHECK_EQUAL (true, deck->hasKeyword("START")); - -} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseTOPS.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseTOPS.cpp deleted file mode 100644 index 3d9e58d1a2..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseTOPS.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE ParserIntegrationTests -#include - -#include -#include - -#include -#include -#include -#include -#include - -#include - -using namespace Opm; - - - -BOOST_AUTO_TEST_CASE( PARSE_TOPS_OK) { - ParserPtr parser(new Parser()); - std::string deckFile("testdata/integration_tests/GRID/TOPS.DATA"); - ParseContext parseContext; - DeckPtr deck = parser->parseFile(deckFile, parseContext); - EclipseState state(*deck , parseContext); - EclipseGridConstPtr grid = state.getInputGrid(); - - BOOST_CHECK_EQUAL( grid->getNX() , 9 ); - BOOST_CHECK_EQUAL( grid->getNY() , 9 ); - BOOST_CHECK_EQUAL( grid->getNZ() , 2 ); - - for (size_t g=0; g < 9*9*2; g++) - BOOST_CHECK_CLOSE( grid->getCellVolume( g ) , 400*300*10 , 0.1); - - for (size_t k=0; k < grid->getNZ(); k++) { - for (size_t j=0; j < grid->getNY(); j++) { - for (size_t i=0; i < grid->getNX(); i++) { - - auto pos = grid->getCellCenter( i,j,k ); - BOOST_CHECK_CLOSE( std::get<0>(pos) , i*400 + 200 , 0.10 ); - BOOST_CHECK_CLOSE( std::get<1>(pos) , j*300 + 150 , 0.10 ); - BOOST_CHECK_CLOSE( std::get<2>(pos) , k*10 + 5 + 2202 , 0.10 ); - - } - } - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseTVDP.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseTVDP.cpp deleted file mode 100644 index 91a4c3f711..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseTVDP.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE ParserTVPD -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -using namespace Opm; - - -BOOST_AUTO_TEST_CASE(ParseTVDP) { - ParserPtr parser(new Parser()); - std::string poroFile("testdata/integration_tests/TVDP/TVDP1"); - DeckPtr deck = parser->parseFile(poroFile, ParseContext()); - - BOOST_CHECK_EQUAL( false , deck->hasKeyword("TVDP*")); - BOOST_CHECK( deck->hasKeyword("TVDPA")); - BOOST_CHECK( deck->hasKeyword("TVDP1")); - BOOST_CHECK( deck->hasKeyword("TVDPXX")); - BOOST_CHECK( deck->hasKeyword("TVDPYY")); -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseTVPD.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseTVPD.cpp deleted file mode 100644 index 14b03abb35..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseTVPD.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE ParserTVPD -#include - -#include -#include - -#include -#include -#include -#include -#include - -#include - -using namespace Opm; - - -BOOST_AUTO_TEST_CASE(AddDataKeywordFromJson_correctlyConfigured) { - ParserPtr parser(new Parser()); - std::string poroFile("testdata/integration_tests/TVPD/TVPD1"); - DeckPtr deck = parser->parseFile(poroFile); - - BOOST_CHECK( deck->hasKeyword("TVDPA")); - BOOST_CHECK( deck->hasKeyword("TVDP1")); - BOOST_CHECK( deck->hasKeyword("TVDPXX")); - BOOST_CHECK( deck->hasKeyword("TVDPYY")); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseVFPPROD.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseVFPPROD.cpp deleted file mode 100644 index 227da0a248..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseVFPPROD.cpp +++ /dev/null @@ -1,171 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE ParserIntegrationTests -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -using namespace Opm; - - - -BOOST_AUTO_TEST_CASE( parse_VFPPROD_OK ) { - ParserPtr parser(new Parser()); - std::string file("testdata/integration_tests/VFPPROD/VFPPROD1"); - BOOST_CHECK( parser->isRecognizedKeyword("VFPPROD")); - - DeckPtr deck = parser->parseFile(file, ParseContext()); - - const auto& VFPPROD1 = deck->getKeyword("VFPPROD" , 0); - const auto& BPR = deck->getKeyword("BPR" , 0); - const auto& VFPPROD2 = deck->getKeyword("VFPPROD" , 1); - - BOOST_CHECK_EQUAL( 573U , VFPPROD1.size() ); - BOOST_CHECK_EQUAL( 1U , BPR.size()); - BOOST_CHECK_EQUAL( 573U , VFPPROD2.size()); - - { - const auto& record = VFPPROD1.getRecord(0); - - BOOST_CHECK_EQUAL( record.getItem("TABLE").get< int >(0) , 32 ); - BOOST_CHECK_EQUAL( record.getItem("DATUM_DEPTH").getSIDouble(0) , 394); - BOOST_CHECK_EQUAL( record.getItem("RATE_TYPE").get< std::string >(0) , "LIQ"); - BOOST_CHECK_EQUAL( record.getItem("WFR").get< std::string >(0) , "WCT"); - BOOST_CHECK_EQUAL( record.getItem("GFR").get< std::string >(0) , "GOR"); - } - - { - const auto& record = VFPPROD1.getRecord(1); - const auto& item = record.getItem("FLOW_VALUES"); - - BOOST_CHECK_EQUAL( item.size() , 12 ); - BOOST_CHECK_EQUAL( item.get< double >(0) , 100 ); - BOOST_CHECK_EQUAL( item.get< double >(11) , 20000 ); - } - - { - const auto& record = VFPPROD1.getRecord(2); - const auto& item = record.getItem("THP_VALUES"); - - BOOST_CHECK_EQUAL( item.size() , 7 ); - BOOST_CHECK_CLOSE( item.get< double >(0) , 16.01 , 0.0001 ); - BOOST_CHECK_CLOSE( item.get< double >(6) , 61.01 , 0.0001 ); - } - - { - const auto& record = VFPPROD1.getRecord(3); - const auto& item = record.getItem("WFR_VALUES"); - - BOOST_CHECK_EQUAL( item.size() , 9 ); - BOOST_CHECK_CLOSE( item.get< double >(1) , 0.1 , 0.0001 ); - BOOST_CHECK_CLOSE( item.get< double >(7) , 0.9 , 0.0001 ); - } - - { - const auto& record = VFPPROD1.getRecord(4); - const auto& item = record.getItem("GFR_VALUES"); - - BOOST_CHECK_EQUAL( item.size() , 9 ); - BOOST_CHECK_EQUAL( item.get< double >(0) , 90 ); - BOOST_CHECK_EQUAL( item.get< double >(8) , 10000 ); - } - - { - const auto& record = VFPPROD1.getRecord(5); - const auto& item = record.getItem("ALQ_VALUES"); - - BOOST_CHECK_EQUAL( item.size() , 1 ); - BOOST_CHECK_EQUAL( item.get< double >(0) , 0 ); - } - - { - const auto& record = VFPPROD1.getRecord(6); - - { - const auto& item = record.getItem("THP_INDEX"); - BOOST_CHECK_EQUAL( item.size() , 1 ); - BOOST_CHECK_EQUAL( item.get< int >(0) , 1 ); - } - - { - const auto& item = record.getItem("WFR_INDEX"); - BOOST_CHECK_EQUAL( item.size() , 1 ); - BOOST_CHECK_EQUAL( item.get< int >(0) , 1 ); - } - { - const auto& item = record.getItem("GFR_INDEX"); - BOOST_CHECK_EQUAL( item.size() , 1 ); - BOOST_CHECK_EQUAL( item.get< int >(0) , 1 ); - } - { - const auto& item = record.getItem("ALQ_INDEX"); - BOOST_CHECK_EQUAL( item.size() , 1 ); - BOOST_CHECK_EQUAL( item.get< int >(0) , 1 ); - } - { - const auto& item = record.getItem("VALUES"); - BOOST_CHECK_EQUAL( item.size() , 12 ); - BOOST_CHECK_EQUAL( item.get< double >(0) , 44.85 ); - BOOST_CHECK_EQUAL( item.get< double >(11) , 115.14 ); - } - } - - { - const auto& record = VFPPROD1.getRecord(572); - { - const auto& item = record.getItem("THP_INDEX"); - BOOST_CHECK_EQUAL( item.size() , 1 ); - BOOST_CHECK_EQUAL( item.get< int >(0) , 7 ); - } - { - const auto& item = record.getItem("WFR_INDEX"); - BOOST_CHECK_EQUAL( item.size() , 1 ); - BOOST_CHECK_EQUAL( item.get< int >(0) , 9 ); - } - { - const auto& item = record.getItem("GFR_INDEX"); - BOOST_CHECK_EQUAL( item.size() , 1 ); - BOOST_CHECK_EQUAL( item.get< int >(0) , 9 ); - } - { - const auto& item = record.getItem("ALQ_INDEX"); - BOOST_CHECK_EQUAL( item.size() , 1 ); - BOOST_CHECK_EQUAL( item.get< int >(0) , 1 ); - } - { - const auto& item = record.getItem("VALUES"); - BOOST_CHECK_EQUAL( item.size() , 12 ); - BOOST_CHECK_EQUAL( item.get< double >(0) , 100.80 ); - BOOST_CHECK_EQUAL( item.get< double >(11) , 147.79 ); - } - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseWCONHIST.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseWCONHIST.cpp deleted file mode 100644 index deecd37a18..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseWCONHIST.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE ParserIntegrationTests -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -using namespace Opm; - - - - -BOOST_AUTO_TEST_CASE( parse_WCHONHIST_OK ) { - ParserPtr parser(new Parser()); - std::string wconhistFile("testdata/integration_tests/WCONHIST/WCONHIST1"); - DeckPtr deck = parser->parseFile(wconhistFile, ParseContext()); - const auto& kw1 = deck->getKeyword("WCONHIST" , 0); - BOOST_CHECK_EQUAL( 3U , kw1.size() ); - - - const auto& rec1 = kw1.getRecord(0); - BOOST_CHECK_EQUAL( 11U , rec1.size() ); - - const auto& rec3 = kw1.getRecord(2); - BOOST_CHECK_EQUAL( 11U , rec3.size() ); - - const auto& item1 = rec1.getItem("WELL"); - const auto& item1_index = rec1.getItem(0); - - BOOST_CHECK_EQUAL( &item1 , &item1_index ); - BOOST_CHECK_EQUAL( "OP_1" , item1.get< std::string >(0)); - - - const auto& kw2 = deck->getKeyword( "WCONHIST", 1 ); - BOOST_CHECK_EQUAL( "OP_3" , rec3.getItem("WELL").get< std::string >(0)); - BOOST_CHECK_EQUAL( 2U , deck->count("WCONHIST")); - BOOST_CHECK_EQUAL( "OP_3_B" , kw2.getRecord( 2 ).getItem("WELL").get< std::string >(0)); - BOOST_CHECK_EQUAL( false , deck->hasKeyword( "DIMENS" )); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseWellProbe.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseWellProbe.cpp deleted file mode 100644 index f43542081b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseWellProbe.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE ParserWellProbe -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -using namespace Opm; - - -BOOST_AUTO_TEST_CASE(ParseWellProbe) { - const char *validDeckString = - "WBHP\n" - "/\n" - "\n" - "WOPR\n" - "/\n"; - - ParserPtr parser(new Parser()); - - // TODO: for some reason, the parser does not seem to throw here. Investigate -/* - const char *invalidDeckString = - "WELL_PROBE\n" - "/\n"; - BOOST_CHECK_THROW(parser->parseString(invalidDeckString), std::invalid_argument); -*/ - - DeckPtr deck = parser->parseString(validDeckString, ParseContext()); - BOOST_CHECK( !deck->hasKeyword("WELL_PROBE")); - BOOST_CHECK( deck->hasKeyword("WBHP")); - BOOST_CHECK( deck->hasKeyword("WOPR")); - BOOST_CHECK( !deck->hasKeyword("WWPR")); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseWellWithWildcards.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseWellWithWildcards.cpp deleted file mode 100644 index 75b1ef9bc2..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ParseWellWithWildcards.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE ParserIntegrationTests -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -using namespace Opm; - - -BOOST_AUTO_TEST_CASE( parse_WCONPROD_OK ) { - ParserPtr parser(new Parser()); - std::string wconprodFile("testdata/integration_tests/WellWithWildcards/WCONPROD1"); - DeckPtr deck = parser->parseFile(wconprodFile, ParseContext()); - EclipseGrid grid(30,30,30); - SchedulePtr sched(new Schedule(ParseContext() , grid , deck )); - - BOOST_CHECK_EQUAL(5U, sched->numWells()); - BOOST_CHECK(sched->hasWell("INJE1")); - BOOST_CHECK(sched->hasWell("PROD2")); - BOOST_CHECK(sched->hasWell("PROD3")); - BOOST_CHECK(sched->hasWell("PROD4")); - BOOST_CHECK(sched->hasWell("PROX5")); - - { - auto* well = sched->getWell("PROD2"); - BOOST_CHECK_CLOSE(1000/Metric::Time, well->getProductionProperties(0).OilRate, 0.001); - BOOST_CHECK_CLOSE(1500/Metric::Time, well->getProductionProperties(1).OilRate, 0.001); - } - - { - auto* well = sched->getWell("PROD3"); - BOOST_CHECK_CLOSE(0/Metric::Time, well->getProductionProperties(0).OilRate, 0.001); - BOOST_CHECK_CLOSE(1500/Metric::Time, well->getProductionProperties(1).OilRate, 0.001); - } - - { - auto* well = sched->getWell("PROX5"); - BOOST_CHECK_CLOSE(2000/Metric::Time, well->getProductionProperties(0).OilRate, 0.001); - BOOST_CHECK_CLOSE(2000/Metric::Time, well->getProductionProperties(1).OilRate, 0.001); - } -} - - -BOOST_AUTO_TEST_CASE( parse_WCONINJE_OK ) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - std::string wconprodFile("testdata/integration_tests/WellWithWildcards/WCONINJE1"); - DeckPtr deck = parser->parseFile(wconprodFile, parseContext); - EclipseGrid grid(30,30,30); - SchedulePtr sched(new Schedule(parseContext , grid , deck )); - - BOOST_CHECK_EQUAL(5U, sched->numWells()); - BOOST_CHECK(sched->hasWell("PROD1")); - BOOST_CHECK(sched->hasWell("INJE2")); - BOOST_CHECK(sched->hasWell("INJE3")); - BOOST_CHECK(sched->hasWell("PROD4")); - BOOST_CHECK(sched->hasWell("INJX5")); - - { - auto* well = sched->getWell("INJE2"); - BOOST_CHECK_CLOSE(1000/Metric::Time, well->getInjectionProperties(0).surfaceInjectionRate, 0.001); - BOOST_CHECK_CLOSE(1500/Metric::Time, well->getInjectionProperties(1).surfaceInjectionRate, 0.001); - } - - { - auto* well = sched->getWell("INJE3"); - BOOST_CHECK_CLOSE(0/Metric::Time, well->getInjectionProperties(0).surfaceInjectionRate, 0.001); - BOOST_CHECK_CLOSE(1500/Metric::Time, well->getInjectionProperties(1).surfaceInjectionRate, 0.001); - } - - { - auto* well = sched->getWell("INJX5"); - BOOST_CHECK_CLOSE(2000/Metric::Time, well->getInjectionProperties(0).surfaceInjectionRate, 0.001); - BOOST_CHECK_CLOSE(2000/Metric::Time, well->getInjectionProperties(1).surfaceInjectionRate, 0.001); - } -} - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/Polymer.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/Polymer.cpp deleted file mode 100644 index 4955c716cd..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/Polymer.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE ParserIntegrationTests -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace Opm; - - - - -BOOST_AUTO_TEST_CASE( parse_polymer_tables ) { - ParserPtr parser(new Parser()); - DeckPtr deck = parser->parseFile("testdata/integration_tests/POLYMER/POLY.inc", ParseContext()); - Opm::TableManager tables( *deck ); - const TableContainer& plymax = tables.getPlymaxTables(); - const TableContainer& plyrock = tables.getPlyrockTables(); - const TableContainer& plyads = tables.getPlyadsTables(); - const TableContainer& plyvis = tables.getPlyviscTables(); - - BOOST_CHECK_EQUAL( plymax.size() , 1U ); - BOOST_CHECK_EQUAL( plyrock.size() , 1U ); - BOOST_CHECK_EQUAL( plyvis.size() , 1U ); - BOOST_CHECK_EQUAL( plyads.size() , 1U ); - - { - const Opm::PlymaxTable& table0 = plymax.getTable(0); - BOOST_CHECK_EQUAL( table0.numColumns() , 2U ); - BOOST_CHECK_EQUAL( table0.getPolymerConcentrationColumn()[0] , 3.0 ); - BOOST_CHECK_EQUAL( table0.getMaxPolymerConcentrationColumn()[0] , 0.0 ); - } - - { - const Opm::PlyviscTable& table0 = plyvis.getTable(0); - BOOST_CHECK_EQUAL( table0.numColumns() , 2U ); - BOOST_CHECK_EQUAL( table0.getPolymerConcentrationColumn()[5] , 3.0 ); - BOOST_CHECK_EQUAL( table0.getViscosityMultiplierColumn()[5] , 48.0 ); - } - - { - const Opm::PlyrockTable& table0 = plyrock.getTable(0); - BOOST_CHECK_EQUAL( table0.numColumns() , 5U ); - BOOST_CHECK_EQUAL( table0.getDeadPoreVolumeColumn()[0] , 0.05 ); - BOOST_CHECK_EQUAL( table0.getMaxAdsorbtionColumn()[0] , 0.000025 ); - } - - { - const Opm::PlyadsTable& table0 = plyads.getTable(0); - BOOST_CHECK_EQUAL( table0.numColumns() , 2U ); - BOOST_CHECK_EQUAL( table0.getPolymerConcentrationColumn()[8] , 3.0 ); - BOOST_CHECK_EQUAL( table0.getAdsorbedPolymerColumn()[8] , 0.000025 ); - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ResinsightTest.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ResinsightTest.cpp deleted file mode 100644 index 073044cbc9..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ResinsightTest.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE ResinsightIntegrationTests - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -using namespace Opm; - -BOOST_AUTO_TEST_CASE( test_parse ) { - Parser parser(false); - ParseContext parseContext; - - parseContext.update( ParseContext::PARSE_UNKNOWN_KEYWORD , InputError::IGNORE ); - parseContext.update( ParseContext::PARSE_RANDOM_TEXT , InputError::IGNORE ); - parseContext.update( ParseContext::PARSE_RANDOM_SLASH , InputError::IGNORE ); - - parser.addKeyword(); - parser.addKeyword(); - - auto deckptr = parser.parseFile("testdata/integration_tests/Resinsight/DECK1.DATA" , parseContext); - const Deck& deck = *deckptr; - - BOOST_CHECK( deck.hasKeyword() ); - BOOST_CHECK( deck.hasKeyword() ); - - { - GridDims* grid = nullptr; - BOOST_CHECK_NO_THROW( grid = new GridDims(deck) ); - BOOST_CHECK_NO_THROW( grid->getCartesianSize() ); - delete grid; - } -} - - -BOOST_AUTO_TEST_CASE( test_state ) { - Parser parser(false); - ParseContext parseContext; - - parseContext.update( ParseContext::PARSE_UNKNOWN_KEYWORD , InputError::IGNORE ); - parseContext.update( ParseContext::PARSE_RANDOM_TEXT , InputError::IGNORE ); - parseContext.update( ParseContext::PARSE_RANDOM_SLASH , InputError::IGNORE ); - - parser.addKeyword(); - parser.addKeyword(); - parser.addKeyword(); - auto deckptr = parser.parseFile("testdata/integration_tests/Resinsight/DECK1.DATA" , parseContext); - const Deck& deck = *deckptr; - - GridDims grid(deck); - GRIDSection gsec(deck); - FaultCollection faults(gsec, grid); - BOOST_CHECK_EQUAL( grid.getNX(), 20U); - BOOST_CHECK_EQUAL( grid.getNY(), 20U); - BOOST_CHECK_EQUAL( grid.getNZ(), 10U); - BOOST_CHECK_EQUAL( faults.size(), 2U); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ScheduleCreateFromDeck.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ScheduleCreateFromDeck.cpp deleted file mode 100644 index 5dfa640e7a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/ScheduleCreateFromDeck.cpp +++ /dev/null @@ -1,899 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#define BOOST_TEST_MODULE ScheduleIntegrationTests -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace Opm; - - -BOOST_AUTO_TEST_CASE(CreateSchedule) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE1"); - DeckPtr deck = parser->parseFile(scheduleFile, parseContext); - EclipseGrid grid(10,10,10); - SchedulePtr sched(new Schedule(parseContext , grid , deck )); - TimeMapConstPtr timeMap = sched->getTimeMap(); - BOOST_CHECK_EQUAL(boost::posix_time::ptime(boost::gregorian::date(2007, boost::gregorian::May, 10)), sched->getStartTime()); - BOOST_CHECK_EQUAL(9U, timeMap->size()); - BOOST_CHECK( deck->hasKeyword("NETBALAN") ); -} - - -BOOST_AUTO_TEST_CASE(CreateSchedule_Comments_After_Keywords) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_COMMENTS_AFTER_KEYWORDS"); - DeckPtr deck = parser->parseFile(scheduleFile, parseContext); - EclipseGrid grid(10,10,10); - SchedulePtr sched(new Schedule(parseContext , grid , deck )); - TimeMapConstPtr timeMap = sched->getTimeMap(); - BOOST_CHECK_EQUAL(boost::posix_time::ptime(boost::gregorian::date(2007, boost::gregorian::May, 10)), sched->getStartTime()); - BOOST_CHECK_EQUAL(9U, timeMap->size()); -} - - -BOOST_AUTO_TEST_CASE(WCONPROD_MissingCmode) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_MISSING_CMODE"); - DeckPtr deck = parser->parseFile(scheduleFile, parseContext); - EclipseGrid grid(10,10,3); - BOOST_CHECK_NO_THROW( new Schedule(parseContext , grid , deck ) ); -} - - -BOOST_AUTO_TEST_CASE(WCONPROD_Missing_DATA) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_CMODE_MISSING_DATA"); - DeckPtr deck = parser->parseFile(scheduleFile, parseContext); - EclipseGrid grid(10,10,3); - - BOOST_CHECK_THROW( new Schedule(parseContext , grid , deck ) , std::invalid_argument ); -} - - -BOOST_AUTO_TEST_CASE(WellTestRefDepth) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2"); - DeckPtr deck = parser->parseFile(scheduleFile, parseContext); - EclipseGrid grid(40,60,30); - BOOST_CHECK_EQUAL(3, 3); - SchedulePtr sched(new Schedule(parseContext , grid , deck )); - BOOST_CHECK_EQUAL(4, 4); - - auto* well1 = sched->getWell("W_1"); - auto* well2 = sched->getWell("W_2"); - auto* well4 = sched->getWell("W_4"); - BOOST_CHECK_EQUAL( well1->getRefDepth() , grid.getCellDepth( 29 , 36 , 0 )); - BOOST_CHECK_EQUAL( well2->getRefDepth() , 100 ); - BOOST_CHECK_THROW( well4->getRefDepth() , std::invalid_argument ); -} - - -BOOST_AUTO_TEST_CASE(WellTestOpen) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2"); - DeckPtr deck = parser->parseFile(scheduleFile, parseContext); - EclipseGrid grid(40,60,30); - SchedulePtr sched(new Schedule(parseContext , grid , deck )); - - auto well1 = sched->getWell( "W_1" ); - auto well2 = sched->getWell( "W_2" ); - auto well3 = sched->getWell( "W_3" ); - - { - auto wells = sched->getOpenWells( 3 ); - BOOST_CHECK_EQUAL( 1U , wells.size() ); - BOOST_CHECK_EQUAL( well1 , wells[0] ); - } - - { - auto wells = sched->getOpenWells(6); - BOOST_CHECK_EQUAL( 3U , wells.size() ); - - BOOST_CHECK_EQUAL( well1 , wells[0] ); - BOOST_CHECK_EQUAL( well2 , wells[1] ); - BOOST_CHECK_EQUAL( well3 , wells[2] ); - } - - { - auto wells = sched->getOpenWells(12); - BOOST_CHECK_EQUAL( 2U , wells.size() ); - - BOOST_CHECK_EQUAL( well2 , wells[0] ); - BOOST_CHECK_EQUAL( well3 , wells[1] ); - } -} - - - - - -BOOST_AUTO_TEST_CASE(WellTesting) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2"); - DeckPtr deck = parser->parseFile(scheduleFile, parseContext); - EclipseGrid grid(40,60,30); - SchedulePtr sched(new Schedule(parseContext , grid , deck )); - - BOOST_CHECK_EQUAL(4U, sched->numWells()); - BOOST_CHECK(sched->hasWell("W_1")); - BOOST_CHECK(sched->hasWell("W_2")); - BOOST_CHECK(sched->hasWell("W_3")); - - { - auto* well2 = sched->getWell("W_2"); - BOOST_CHECK_EQUAL( 0 , well2->getProductionPropertiesCopy(2).ResVRate); - BOOST_CHECK_CLOSE( 777/Metric::Time , well2->getProductionPropertiesCopy(7).ResVRate , 0.0001); - BOOST_CHECK_EQUAL( 0 , well2->getProductionPropertiesCopy(8).ResVRate); - - BOOST_CHECK_EQUAL( WellCommon::SHUT , well2->getStatus(3)); - - { - const WellProductionProperties& prop3 = well2->getProductionProperties(3); - BOOST_CHECK_EQUAL( WellProducer::ORAT , prop3.controlMode); - BOOST_CHECK( prop3.hasProductionControl(WellProducer::ORAT)); - BOOST_CHECK( prop3.hasProductionControl(WellProducer::GRAT)); - BOOST_CHECK( prop3.hasProductionControl(WellProducer::WRAT)); - } - - // BOOST_CHECK( !well2->getProductionProperties(8).hasProductionControl(WellProducer::GRAT)); - } - - - { - auto* well3 = sched->getWell("W_3"); - - BOOST_CHECK_EQUAL( WellCommon::AUTO , well3->getStatus(3)); - BOOST_CHECK_EQUAL( 0 , well3->getProductionPropertiesCopy(2).LiquidRate); - - { - const WellProductionProperties& prop7 = well3->getProductionProperties(7); - BOOST_CHECK_CLOSE( 999/Metric::Time , prop7.LiquidRate , 0.001); - BOOST_CHECK_EQUAL( WellProducer::RESV, prop7.controlMode); - } - BOOST_CHECK_EQUAL( 0 , well3->getProductionPropertiesCopy(8).LiquidRate); - } - - { - auto* well1 = sched->getWell("W_1"); - - BOOST_CHECK(well1->getProductionPropertiesCopy(0).predictionMode); - BOOST_CHECK_EQUAL(0, well1->getProductionPropertiesCopy(0).OilRate); - - BOOST_CHECK_EQUAL(0, well1->getProductionPropertiesCopy(1).OilRate); - BOOST_CHECK_EQUAL(0, well1->getProductionPropertiesCopy(2).OilRate); - - BOOST_CHECK(!well1->getProductionPropertiesCopy(3).predictionMode); - BOOST_CHECK_CLOSE(4000/Metric::Time , well1->getProductionPropertiesCopy(3).OilRate , 0.001); - BOOST_CHECK_CLOSE(4000/Metric::Time , well1->getProductionPropertiesCopy(4).OilRate , 0.001); - BOOST_CHECK_CLOSE(4000/Metric::Time , well1->getProductionPropertiesCopy(5).OilRate , 0.001); - BOOST_CHECK_CLOSE(4/Metric::Time , well1->getProductionPropertiesCopy(3).WaterRate , 0.001); - BOOST_CHECK_CLOSE(12345/Metric::Time , well1->getProductionPropertiesCopy(3).GasRate , 0.001); - BOOST_CHECK_CLOSE(4/Metric::Time , well1->getProductionPropertiesCopy(4).WaterRate , 0.001); - BOOST_CHECK_CLOSE(12345/Metric::Time , well1->getProductionPropertiesCopy(4).GasRate , 0.001); - BOOST_CHECK_CLOSE(4/Metric::Time , well1->getProductionPropertiesCopy(5).WaterRate , 0.001); - BOOST_CHECK_CLOSE(12345/Metric::Time , well1->getProductionPropertiesCopy(5).GasRate , 0.001); - - - BOOST_CHECK(!well1->getProductionPropertiesCopy(6).predictionMode); - BOOST_CHECK_CLOSE(14000/Metric::Time , well1->getProductionPropertiesCopy(6).OilRate , 0.001); - - BOOST_CHECK(well1->getProductionPropertiesCopy(7).predictionMode); - BOOST_CHECK_CLOSE(11000/Metric::Time , well1->getProductionPropertiesCopy(7).OilRate , 0.001); - BOOST_CHECK_CLOSE(44/Metric::Time , well1->getProductionPropertiesCopy(7).WaterRate , 0.001); - BOOST_CHECK_CLOSE(188/Metric::Time , well1->getProductionPropertiesCopy(7).GasRate , 0.001); - - BOOST_CHECK(!well1->getProductionPropertiesCopy(8).predictionMode); - BOOST_CHECK_CLOSE(13000/Metric::Time , well1->getProductionPropertiesCopy(8).OilRate , 0.001); - - BOOST_CHECK_CLOSE(123.00 * Metric::Pressure , well1->getInjectionPropertiesCopy(10).BHPLimit, 0.001); - BOOST_CHECK_CLOSE(678.00 * Metric::Pressure , well1->getInjectionPropertiesCopy(10).THPLimit, 0.001); - - { - const WellInjectionProperties& prop11 = well1->getInjectionProperties(11); - BOOST_CHECK_CLOSE(5000/Metric::Time , prop11.surfaceInjectionRate, 0.001); - BOOST_CHECK_EQUAL( WellInjector::RATE , prop11.controlMode); - BOOST_CHECK_EQUAL( WellCommon::OPEN , well1->getStatus( 11 )); - } - - - - BOOST_CHECK( well1->isInjector(9)); - { - const WellInjectionProperties& prop9 = well1->getInjectionProperties(9); - BOOST_CHECK_CLOSE(20000/Metric::Time , prop9.surfaceInjectionRate , 0.001); - BOOST_CHECK_CLOSE(200000/Metric::Time , prop9.reservoirInjectionRate, 0.001); - BOOST_CHECK_CLOSE(6891 * Metric::Pressure , prop9.BHPLimit, 0.001); - BOOST_CHECK_CLOSE(0 , prop9.THPLimit , 0.001); - BOOST_CHECK_EQUAL( WellInjector::RESV , prop9.controlMode); - BOOST_CHECK( prop9.hasInjectionControl(WellInjector::RATE )); - BOOST_CHECK( prop9.hasInjectionControl(WellInjector::RESV )); - BOOST_CHECK( !prop9.hasInjectionControl(WellInjector::THP)); - BOOST_CHECK( !prop9.hasInjectionControl(WellInjector::BHP)); - } - - - BOOST_CHECK_EQUAL( WellCommon::SHUT , well1->getStatus( 12 )); - BOOST_CHECK( well1->getInjectionPropertiesCopy(12).hasInjectionControl(WellInjector::RATE )); - BOOST_CHECK( !well1->getInjectionPropertiesCopy(12).hasInjectionControl(WellInjector::RESV)); - BOOST_CHECK( well1->getInjectionPropertiesCopy(12).hasInjectionControl(WellInjector::THP )); - BOOST_CHECK( well1->getInjectionPropertiesCopy(12).hasInjectionControl(WellInjector::BHP )); - - } -} - - -BOOST_AUTO_TEST_CASE(WellTestCOMPDAT_DEFAULTED_ITEMS) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_COMPDAT1"); - DeckPtr deck = parser->parseFile(scheduleFile, parseContext); - EclipseGrid grid(40,60,30); - SchedulePtr sched(new Schedule(parseContext , grid, deck)); -} - - -BOOST_AUTO_TEST_CASE(WellTestCOMPDAT) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2"); - DeckPtr deck = parser->parseFile(scheduleFile, parseContext); - EclipseGrid grid(40,60,30); - SchedulePtr sched(new Schedule(parseContext , grid , deck)); - - BOOST_CHECK_EQUAL(4U, sched->numWells()); - BOOST_CHECK(sched->hasWell("W_1")); - BOOST_CHECK(sched->hasWell("W_2")); - BOOST_CHECK(sched->hasWell("W_3")); - { - auto* well1 = sched->getWell("W_1"); - BOOST_CHECK_CLOSE(13000/Metric::Time , well1->getProductionPropertiesCopy(8).OilRate , 0.0001); - CompletionSetConstPtr completions = well1->getCompletions(0); - BOOST_CHECK_EQUAL(0U, completions->size()); - - completions = well1->getCompletions(3); - BOOST_CHECK_EQUAL(4U, completions->size()); - - BOOST_CHECK_EQUAL(WellCompletion::OPEN, completions->get(3)->getState()); - BOOST_CHECK_EQUAL(2.2836805555555556e-12 , completions->get(3)->getConnectionTransmissibilityFactor()); - BOOST_CHECK_EQUAL(0.311/Metric::Length, completions->get(3)->getDiameter()); - BOOST_CHECK_EQUAL(3.3, completions->get(3)->getSkinFactor()); - - completions = well1->getCompletions(7); - BOOST_CHECK_EQUAL(4U, completions->size()); - BOOST_CHECK_EQUAL(WellCompletion::SHUT, completions->get(3)->getState()); - } -} - -BOOST_AUTO_TEST_CASE(GroupTreeTest_GRUPTREE_with_explicit_L0_parenting) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_GRUPTREE_EXPLICIT_PARENTING"); - DeckPtr deck = parser->parseFile(scheduleFile, parseContext); - EclipseGrid grid(10,10,3); - SchedulePtr sched(new Schedule(parseContext , grid , deck)); - - GroupTreeNodePtr rootNode = sched->getGroupTree(0).getNode("FIELD"); - - - BOOST_REQUIRE_EQUAL("FIELD", rootNode->name()); - - BOOST_CHECK(rootNode->hasChildGroup("FIRST_LEVEL1")); - GroupTreeNodePtr FIRST_LEVEL1 = rootNode->getChildGroup("FIRST_LEVEL1"); - BOOST_CHECK(rootNode->hasChildGroup("FIRST_LEVEL2")); - GroupTreeNodePtr FIRST_LEVEL2 = rootNode->getChildGroup("FIRST_LEVEL2"); - - BOOST_CHECK(FIRST_LEVEL1->hasChildGroup("SECOND_LEVEL1")); - GroupTreeNodePtr SECOND_LEVEL1 = FIRST_LEVEL1->getChildGroup("SECOND_LEVEL1"); - - BOOST_CHECK(FIRST_LEVEL2->hasChildGroup("SECOND_LEVEL2")); - GroupTreeNodePtr SECOND_LEVEL2 = FIRST_LEVEL2->getChildGroup("SECOND_LEVEL2"); - - BOOST_CHECK(SECOND_LEVEL1->hasChildGroup("THIRD_LEVEL1")); - GroupTreeNodePtr THIRD_LEVEL1 = SECOND_LEVEL1->getChildGroup("THIRD_LEVEL1"); -} - - -BOOST_AUTO_TEST_CASE(GroupTreeTest_GRUPTREE_correct) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GRUPTREE"); - DeckPtr deck = parser->parseFile(scheduleFile, parseContext); - EclipseGrid grid(10,10,3); - SchedulePtr schedule(new Schedule(parseContext , grid , deck)); - - BOOST_CHECK( schedule->hasGroup( "FIELD" )); - BOOST_CHECK( schedule->hasGroup( "PROD" )); - BOOST_CHECK( schedule->hasGroup( "INJE" )); - BOOST_CHECK( schedule->hasGroup( "MANI-PROD" )); - BOOST_CHECK( schedule->hasGroup( "MANI-INJ" )); - BOOST_CHECK( schedule->hasGroup( "DUMMY-PROD" )); - BOOST_CHECK( schedule->hasGroup( "DUMMY-INJ" )); -} - - - -BOOST_AUTO_TEST_CASE(GroupTreeTest_WELSPECS_AND_GRUPTREE_correct_iter_function) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GROUPS"); - DeckPtr deck = parser->parseFile(scheduleFile, parseContext); - EclipseGrid grid(10,10,3); - SchedulePtr schedule(new Schedule(parseContext , grid , deck)); - - // Time 0, only from WELSPECS - GroupTreeNodeConstPtr root = schedule->getGroupTree(0).getNode("FIELD"); - - int iter_counted = 0; - - for (auto iter=root->begin(); iter != root->end(); ++iter) - iter_counted++; - - BOOST_CHECK_EQUAL(2, iter_counted); - // Time 1, a new group added in tree - iter_counted = 0; - - root = schedule->getGroupTree(1).getNode("FIELD"); - for (auto iter=root->begin(); iter != root->end(); ++iter) { - iter_counted++; - } - BOOST_CHECK_EQUAL(3, iter_counted); -} - -BOOST_AUTO_TEST_CASE(GroupTreeTest_WELSPECS_AND_GRUPTREE_correct_tree) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GROUPS"); - DeckPtr deck = parser->parseFile(scheduleFile, parseContext); - EclipseGrid grid(10,10,3); - SchedulePtr schedule(new Schedule(parseContext , grid , deck)); - - // Time 0, only from WELSPECS - GroupTreeNodePtr root0 = schedule->getGroupTree(0).getNode("FIELD"); - BOOST_REQUIRE_EQUAL("FIELD", root0->name()); - BOOST_CHECK(root0->hasChildGroup("GROUP_BJARNE")); - GroupTreeNodePtr GROUP_BJARNE = root0->getChildGroup("GROUP_BJARNE"); - BOOST_CHECK_EQUAL("GROUP_BJARNE", GROUP_BJARNE->name()); - - BOOST_CHECK(root0->hasChildGroup("GROUP_ODD")); - GroupTreeNodePtr GROUP_ODD = root0->getChildGroup("GROUP_ODD"); - BOOST_CHECK_EQUAL("GROUP_ODD", GROUP_ODD->name()); - - // Time 1, now also from GRUPTREE - GroupTreeNodePtr root1 = schedule->getGroupTree(1).getNode("FIELD"); - BOOST_REQUIRE_EQUAL("FIELD", root1->name()); - BOOST_CHECK(root1->hasChildGroup("GROUP_BJARNE")); - GroupTreeNodePtr GROUP_BJARNE1 = root1->getChildGroup("GROUP_BJARNE"); - BOOST_CHECK_EQUAL("GROUP_BJARNE", GROUP_BJARNE1->name()); - - BOOST_CHECK(root1->hasChildGroup("GROUP_ODD")); - GroupTreeNodePtr GROUP_ODD1 = root1->getChildGroup("GROUP_ODD"); - BOOST_CHECK_EQUAL("GROUP_ODD", GROUP_ODD1->name()); - - // - from GRUPTREE - - BOOST_CHECK(GROUP_BJARNE1->hasChildGroup("GROUP_BIRGER")); - GroupTreeNodePtr GROUP_BIRGER = GROUP_BJARNE1->getChildGroup("GROUP_BIRGER"); - BOOST_CHECK_EQUAL("GROUP_BIRGER", GROUP_BIRGER->name()); - - BOOST_CHECK(root1->hasChildGroup("GROUP_NEW")); - GroupTreeNodePtr GROUP_NEW = root1->getChildGroup("GROUP_NEW"); - BOOST_CHECK_EQUAL("GROUP_NEW", GROUP_NEW->name()); - - BOOST_CHECK(GROUP_NEW->hasChildGroup("GROUP_NILS")); - GroupTreeNodePtr GROUP_NILS = GROUP_NEW->getChildGroup("GROUP_NILS"); - BOOST_CHECK_EQUAL("GROUP_NILS", GROUP_NILS->name()); -} - -BOOST_AUTO_TEST_CASE(GroupTreeTest_GRUPTREE_WITH_REPARENT_correct_tree) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_GROUPS_REPARENT"); - DeckPtr deck = parser->parseFile(scheduleFile, parseContext); - EclipseGrid grid(10,10,3); - SchedulePtr schedule(new Schedule(parseContext , grid , deck)); - - - // Time , from first GRUPTREE - GroupTreeNodePtr root0 = schedule->getGroupTree(0).getNode("FIELD"); - BOOST_REQUIRE_EQUAL("FIELD", root0->name()); - BOOST_CHECK(root0->hasChildGroup("GROUP_BJARNE")); - GroupTreeNodePtr GROUP_BJARNE0 = root0->getChildGroup("GROUP_BJARNE"); - BOOST_CHECK_EQUAL("GROUP_BJARNE", GROUP_BJARNE0->name()); - - BOOST_CHECK(root0->hasChildGroup("GROUP_NEW")); - GroupTreeNodePtr GROUP_NEW0 = root0->getChildGroup("GROUP_NEW"); - BOOST_CHECK_EQUAL("GROUP_NEW", GROUP_NEW0->name()); - - - BOOST_CHECK(GROUP_BJARNE0->hasChildGroup("GROUP_BIRGER")); - GroupTreeNodePtr GROUP_BIRGER0 = GROUP_BJARNE0->getChildGroup("GROUP_BIRGER"); - BOOST_CHECK_EQUAL("GROUP_BIRGER", GROUP_BIRGER0->name()); - - BOOST_CHECK(GROUP_NEW0->hasChildGroup("GROUP_NILS")); - GroupTreeNodePtr GROUP_NILS0 = GROUP_NEW0->getChildGroup("GROUP_NILS"); - BOOST_CHECK_EQUAL("GROUP_NILS", GROUP_NILS0->name()); - - // SÅ den nye strukturen med et barneflytt -} - - -BOOST_AUTO_TEST_CASE(GroupTreeTest_PrintGrouptree) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GROUPS"); - DeckPtr deck = parser->parseFile(scheduleFile, parseContext); - EclipseGrid grid(10,10,3); - SchedulePtr sched(new Schedule(parseContext , grid , deck)); - - const auto& rootNode = sched->getGroupTree(0); - rootNode.printTree(std::cout); - -} - - -BOOST_AUTO_TEST_CASE( WellTestGroups ) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_GROUPS"); - DeckPtr deck = parser->parseFile(scheduleFile, parseContext); - EclipseGrid grid(10,10,3); - SchedulePtr sched( new Schedule(parseContext , grid , deck)); - - BOOST_CHECK_EQUAL( 3U , sched->numGroups() ); - BOOST_CHECK( sched->hasGroup( "INJ" )); - BOOST_CHECK( sched->hasGroup( "OP" )); - - { - auto& group = sched->getGroup("INJ"); - BOOST_CHECK_EQUAL( Phase::WATER , group.getInjectionPhase( 3 )); - BOOST_CHECK_EQUAL( GroupInjection::VREP , group.getInjectionControlMode( 3 )); - BOOST_CHECK_CLOSE( 10/Metric::Time , group.getSurfaceMaxRate( 3 ) , 0.001); - BOOST_CHECK_CLOSE( 20/Metric::Time , group.getReservoirMaxRate( 3 ) , 0.001); - BOOST_CHECK_EQUAL( 0.75 , group.getTargetReinjectFraction( 3 )); - BOOST_CHECK_EQUAL( 0.95 , group.getTargetVoidReplacementFraction( 3 )); - - BOOST_CHECK_EQUAL( Phase::OIL , group.getInjectionPhase( 6 )); - BOOST_CHECK_EQUAL( GroupInjection::RATE , group.getInjectionControlMode( 6 )); - BOOST_CHECK_CLOSE( 1000/Metric::Time , group.getSurfaceMaxRate( 6 ) , 0.0001); - - BOOST_CHECK(group.isInjectionGroup(3)); - } - - { - auto& group = sched->getGroup("OP"); - BOOST_CHECK_EQUAL( GroupProduction::ORAT , group.getProductionControlMode(3)); - BOOST_CHECK_CLOSE( 10/Metric::Time , group.getOilTargetRate(3) , 0.001); - BOOST_CHECK_CLOSE( 20/Metric::Time , group.getWaterTargetRate(3) , 0.001); - BOOST_CHECK_CLOSE( 30/Metric::Time , group.getGasTargetRate(3) , 0.001); - BOOST_CHECK_CLOSE( 40/Metric::Time , group.getLiquidTargetRate(3) , 0.001); - - BOOST_CHECK(group.isProductionGroup(3)); - } - -} - - -BOOST_AUTO_TEST_CASE( WellTestGroupAndWellRelation ) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS_AND_GROUPS"); - DeckPtr deck = parser->parseFile(scheduleFile, parseContext); - EclipseGrid grid(10,10,3); - SchedulePtr sched( new Schedule(parseContext , grid , deck)); - - auto& group1 = sched->getGroup("GROUP1"); - auto& group2 = sched->getGroup("GROUP2"); - - BOOST_CHECK( group1.hasBeenDefined(0) ); - BOOST_CHECK_EQUAL(false , group2.hasBeenDefined(0)); - BOOST_CHECK( group2.hasBeenDefined(1)); - - BOOST_CHECK_EQUAL( true , group1.hasWell("W_1" , 0)); - BOOST_CHECK_EQUAL( true , group1.hasWell("W_2" , 0)); - BOOST_CHECK_EQUAL( false, group2.hasWell("W_1" , 0)); - BOOST_CHECK_EQUAL( false, group2.hasWell("W_2" , 0)); - - - - BOOST_CHECK_EQUAL( true , group1.hasWell("W_1" , 1)); - BOOST_CHECK_EQUAL( false , group1.hasWell("W_2" , 1)); - BOOST_CHECK_EQUAL( false , group2.hasWell("W_1" , 1)); - BOOST_CHECK_EQUAL( true , group2.hasWell("W_2" , 1)); -} - - -BOOST_AUTO_TEST_CASE(WellTestWELSPECSDataLoaded) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2"); - DeckPtr deck = parser->parseFile(scheduleFile, parseContext); - EclipseGrid grid(40,60,30); - SchedulePtr sched(new Schedule(parseContext , grid , deck)); - - BOOST_CHECK_EQUAL(4U, sched->numWells()); - BOOST_CHECK(sched->hasWell("W_1")); - BOOST_CHECK(sched->hasWell("W_2")); - BOOST_CHECK(sched->hasWell("W_3")); - { - const auto* well1 = sched->getWell("W_1"); - BOOST_CHECK(!well1->hasBeenDefined(2)); - BOOST_CHECK(well1->hasBeenDefined(3)); - BOOST_CHECK_EQUAL(29, well1->getHeadI()); - BOOST_CHECK_EQUAL(36, well1->getHeadJ()); - - const auto* well2 = sched->getWell("W_2"); - BOOST_CHECK(!well2->hasBeenDefined(2)); - BOOST_CHECK(well2->hasBeenDefined(3)); - BOOST_CHECK_EQUAL(19, well2->getHeadI()); - BOOST_CHECK_EQUAL(50, well2->getHeadJ()); - - const auto* well3 = sched->getWell("W_3"); - BOOST_CHECK(!well3->hasBeenDefined(2)); - BOOST_CHECK(well3->hasBeenDefined(3)); - BOOST_CHECK_EQUAL(30, well3->getHeadI()); - BOOST_CHECK_EQUAL(17, well3->getHeadJ()); - } -} - -BOOST_AUTO_TEST_CASE(WellTestWELSPECS_InvalidConfig_Throws) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELL_INVALID_WELSPECS"); - DeckPtr deck = parser->parseFile(scheduleFile, parseContext); - EclipseGrid grid(10,10,3); - BOOST_CHECK_THROW(new Schedule(parseContext , grid , deck), std::invalid_argument); - -} - -/* -BOOST_AUTO_TEST_CASE(WellTestWELOPEN_ConfigWithIndexes_Throws) { - ParserPtr parser(new Parser()); - std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELOPEN_INVALID"); - DeckPtr deck = parser->parseFile(scheduleFile); - std::shared_ptr grid = std::make_shared(10,10,3); - BOOST_CHECK_THROW(new Schedule(grid , deck), std::logic_error); -} - - -BOOST_AUTO_TEST_CASE(WellTestWELOPENControlsSet) { - ParserPtr parser(new Parser()); - std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELOPEN"); - DeckPtr deck = parser->parseFile(scheduleFile); - std::shared_ptr grid = std::make_shared( 10,10,10 ); - SchedulePtr sched(new Schedule(grid , deck)); - - const auto* well1 = sched->getWell("W_1"); - BOOST_CHECK_EQUAL(WellCommon::StatusEnum::OPEN, sched->getWell("W_1")->getStatus(0)); - BOOST_CHECK_EQUAL(WellCommon::StatusEnum::SHUT, sched->getWell("W_1")->getStatus(1)); - BOOST_CHECK_EQUAL(WellCommon::StatusEnum::OPEN, sched->getWell("W_1")->getStatus(2)); - BOOST_CHECK_EQUAL(WellCommon::StatusEnum::STOP, sched->getWell("W_1")->getStatus(3)); - BOOST_CHECK_EQUAL(WellCommon::StatusEnum::AUTO, sched->getWell("W_1")->getStatus(4)); - BOOST_CHECK_EQUAL(WellCommon::StatusEnum::STOP, sched->getWell("W_1")->getStatus(5)); -} -*/ - - - -BOOST_AUTO_TEST_CASE(WellTestWGRUPCONWellPropertiesSet) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WGRUPCON"); - DeckPtr deck = parser->parseFile(scheduleFile, parseContext); - EclipseGrid grid(10,10,10); - SchedulePtr sched(new Schedule(parseContext , grid , deck)); - - const auto* well1 = sched->getWell("W_1"); - BOOST_CHECK(well1->isAvailableForGroupControl(0)); - BOOST_CHECK_EQUAL(-1, well1->getGuideRate(0)); - BOOST_CHECK_EQUAL(GuideRate::OIL, well1->getGuideRatePhase(0)); - BOOST_CHECK_EQUAL(1.0, well1->getGuideRateScalingFactor(0)); - - const auto* well2 = sched->getWell("W_2"); - BOOST_CHECK(!well2->isAvailableForGroupControl(0)); - BOOST_CHECK_EQUAL(-1, well2->getGuideRate(0)); - BOOST_CHECK_EQUAL(GuideRate::UNDEFINED, well2->getGuideRatePhase(0)); - BOOST_CHECK_EQUAL(1.0, well2->getGuideRateScalingFactor(0)); - - const auto* well3 = sched->getWell("W_3"); - BOOST_CHECK(well3->isAvailableForGroupControl(0)); - BOOST_CHECK_EQUAL(100, well3->getGuideRate(0)); - BOOST_CHECK_EQUAL(GuideRate::RAT, well3->getGuideRatePhase(0)); - BOOST_CHECK_EQUAL(0.5, well3->getGuideRateScalingFactor(0)); -} - - -BOOST_AUTO_TEST_CASE(TestDefaultedCOMPDATIJ) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - const char * deckString = "\n\ -START\n\ -\n\ -10 MAI 2007 /\n\ -\n\ -SCHEDULE\n\ -WELSPECS \n\ - 'W1' 'OP' 11 21 3.33 'OIL' 7* / \n\ -/\n\ -COMPDAT \n\ - 'W1' 2* 1 1 'OPEN' 1* 32.948 0.311 3047.839 2* 'X' 22.100 /\n\ -/\n"; - DeckPtr deck = parser->parseString(deckString, parseContext); - EclipseGrid grid(30,30,10); - SchedulePtr sched(new Schedule(parseContext , grid , deck)); - const auto* well = sched->getWell("W1"); - CompletionSetConstPtr completions = well->getCompletions(0); - BOOST_CHECK_EQUAL( 10 , completions->get(0)->getI() ); - BOOST_CHECK_EQUAL( 20 , completions->get(0)->getJ() ); -} - - -/** - This is a deck used in the opm-core wellsManager testing; just be - certain we can parse it. -*/ -BOOST_AUTO_TEST_CASE(OpmCode) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - std::string scheduleFile("testdata/integration_tests/SCHEDULE/wells_group.data"); - DeckPtr deck = parser->parseFile(scheduleFile, parseContext); - EclipseGrid grid(10,10,3); - BOOST_CHECK_NO_THROW( new Schedule(parseContext , grid , deck) ); -} - - - -BOOST_AUTO_TEST_CASE(WELLS_SHUT) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_SHUT_WELL"); - DeckPtr deck = parser->parseFile(scheduleFile, parseContext); - EclipseGrid grid(20,40,1); - SchedulePtr sched(new Schedule(parseContext , grid , deck)); - - - const auto* well1 = sched->getWell("W1"); - const auto* well2 = sched->getWell("W2"); - const auto* well3 = sched->getWell("W3"); - - BOOST_CHECK_EQUAL( WellCommon::StatusEnum::OPEN , well1->getStatus(1)); - BOOST_CHECK_EQUAL( WellCommon::StatusEnum::OPEN , well2->getStatus(1)); - BOOST_CHECK_EQUAL( WellCommon::StatusEnum::OPEN , well3->getStatus(1)); - - - BOOST_CHECK_EQUAL( WellCommon::StatusEnum::SHUT , well1->getStatus(2)); - BOOST_CHECK_EQUAL( WellCommon::StatusEnum::SHUT , well2->getStatus(2)); - BOOST_CHECK_EQUAL( WellCommon::StatusEnum::SHUT , well3->getStatus(2)); -} - - -BOOST_AUTO_TEST_CASE(WellTestWPOLYMER) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_POLYMER"); - DeckPtr deck = parser->parseFile(scheduleFile, parseContext); - EclipseGrid grid(30,30,30); - SchedulePtr sched(new Schedule(parseContext , grid , deck)); - - - BOOST_CHECK_EQUAL(4U, sched->numWells()); - BOOST_CHECK(sched->hasWell("INJE01")); - BOOST_CHECK(sched->hasWell("PROD01")); - - const auto* well1 = sched->getWell("INJE01"); - BOOST_CHECK( well1->isInjector(0)); - { - const WellPolymerProperties& props_well10 = well1->getPolymerProperties(0); - BOOST_CHECK_CLOSE(1.5*Metric::PolymerDensity, props_well10.m_polymerConcentration, 0.0001); - const WellPolymerProperties& props_well11 = well1->getPolymerProperties(1); - BOOST_CHECK_CLOSE(1.0*Metric::PolymerDensity, props_well11.m_polymerConcentration, 0.0001); - const WellPolymerProperties& props_well12 = well1->getPolymerProperties(2); - BOOST_CHECK_CLOSE(0.1*Metric::PolymerDensity, props_well12.m_polymerConcentration, 0.0001); - } - - const auto* well2 = sched->getWell("INJE02"); - BOOST_CHECK( well2->isInjector(0)); - { - const WellPolymerProperties& props_well20 = well2->getPolymerProperties(0); - BOOST_CHECK_CLOSE(2.0*Metric::PolymerDensity, props_well20.m_polymerConcentration, 0.0001); - const WellPolymerProperties& props_well21 = well2->getPolymerProperties(1); - BOOST_CHECK_CLOSE(1.5*Metric::PolymerDensity, props_well21.m_polymerConcentration, 0.0001); - const WellPolymerProperties& props_well22 = well2->getPolymerProperties(2); - BOOST_CHECK_CLOSE(0.2*Metric::PolymerDensity, props_well22.m_polymerConcentration, 0.0001); - } - - const auto* well3 = sched->getWell("INJE03"); - BOOST_CHECK( well3->isInjector(0)); - { - const WellPolymerProperties& props_well30 = well3->getPolymerProperties(0); - BOOST_CHECK_CLOSE(2.5*Metric::PolymerDensity, props_well30.m_polymerConcentration, 0.0001); - const WellPolymerProperties& props_well31 = well3->getPolymerProperties(1); - BOOST_CHECK_CLOSE(2.0*Metric::PolymerDensity, props_well31.m_polymerConcentration, 0.0001); - const WellPolymerProperties& props_well32 = well3->getPolymerProperties(2); - BOOST_CHECK_CLOSE(0.3*Metric::PolymerDensity, props_well32.m_polymerConcentration, 0.0001); - } -} - - -BOOST_AUTO_TEST_CASE(WellTestWECON) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WECON"); - DeckPtr deck = parser->parseFile(scheduleFile, parseContext); - EclipseGrid grid(30,30,30); - SchedulePtr sched(new Schedule(parseContext , grid , deck)); - - BOOST_CHECK_EQUAL(3U, sched->numWells()); - BOOST_CHECK(sched->hasWell("INJE01")); - BOOST_CHECK(sched->hasWell("PROD01")); - BOOST_CHECK(sched->hasWell("PROD02")); - - const auto* prod1 = sched->getWell("PROD01"); - { - const WellEconProductionLimits& econ_limit1 = prod1->getEconProductionLimits(0); - BOOST_CHECK(econ_limit1.onMinOilRate()); - BOOST_CHECK(econ_limit1.onMaxWaterCut()); - BOOST_CHECK(!(econ_limit1.onMinGasRate())); - BOOST_CHECK(!(econ_limit1.onMaxGasOilRatio())); - BOOST_CHECK_EQUAL(econ_limit1.maxWaterCut(), 0.95); - BOOST_CHECK_EQUAL(econ_limit1.minOilRate(), 50.0/86400.); - BOOST_CHECK_EQUAL(econ_limit1.minGasRate(), 0.0); - BOOST_CHECK_EQUAL(econ_limit1.maxGasOilRatio(), 0.0); - BOOST_CHECK_EQUAL(econ_limit1.endRun(), false); - BOOST_CHECK_EQUAL(econ_limit1.followonWell(), "'"); - BOOST_CHECK_EQUAL(econ_limit1.quantityLimit(), WellEcon::RATE); - BOOST_CHECK_EQUAL(econ_limit1.workover(), WellEcon::CON); - BOOST_CHECK_EQUAL(econ_limit1.workoverSecondary(), WellEcon::CON); - BOOST_CHECK(econ_limit1.requireWorkover()); - BOOST_CHECK(econ_limit1.requireSecondaryWorkover()); - BOOST_CHECK(!(econ_limit1.validFollowonWell())); - BOOST_CHECK(!(econ_limit1.endRun())); - BOOST_CHECK(econ_limit1.onAnyRatioLimit()); - BOOST_CHECK(econ_limit1.onAnyRateLimit()); - BOOST_CHECK(econ_limit1.onAnyEffectiveLimit()); - - const WellEconProductionLimits& econ_limit2 = prod1->getEconProductionLimits(1); - BOOST_CHECK(!(econ_limit2.onMinOilRate())); - BOOST_CHECK(econ_limit2.onMaxWaterCut()); - BOOST_CHECK(econ_limit2.onMinGasRate()); - BOOST_CHECK(!(econ_limit2.onMaxGasOilRatio())); - BOOST_CHECK_EQUAL(econ_limit2.maxWaterCut(), 0.95); - BOOST_CHECK_EQUAL(econ_limit2.minOilRate(), 0.0); - BOOST_CHECK_EQUAL(econ_limit2.minGasRate(), 1000./86400.); - BOOST_CHECK_EQUAL(econ_limit2.maxGasOilRatio(), 0.0); - BOOST_CHECK_EQUAL(econ_limit2.endRun(), false); - BOOST_CHECK_EQUAL(econ_limit2.followonWell(), "'"); - BOOST_CHECK_EQUAL(econ_limit2.quantityLimit(), WellEcon::RATE); - BOOST_CHECK_EQUAL(econ_limit2.workover(), WellEcon::CON); - BOOST_CHECK_EQUAL(econ_limit2.workoverSecondary(), WellEcon::CON); - BOOST_CHECK(econ_limit2.requireWorkover()); - BOOST_CHECK(econ_limit2.requireSecondaryWorkover()); - BOOST_CHECK(!(econ_limit2.validFollowonWell())); - BOOST_CHECK(!(econ_limit2.endRun())); - BOOST_CHECK(econ_limit2.onAnyRatioLimit()); - BOOST_CHECK(econ_limit2.onAnyRateLimit()); - BOOST_CHECK(econ_limit2.onAnyEffectiveLimit()); - } - - const auto* prod2 = sched->getWell("PROD02"); - { - const WellEconProductionLimits& econ_limit1 = prod2->getEconProductionLimits(0); - BOOST_CHECK(!(econ_limit1.onMinOilRate())); - BOOST_CHECK(!(econ_limit1.onMaxWaterCut())); - BOOST_CHECK(!(econ_limit1.onMinGasRate())); - BOOST_CHECK(!(econ_limit1.onMaxGasOilRatio())); - BOOST_CHECK_EQUAL(econ_limit1.maxWaterCut(), 0.0); - BOOST_CHECK_EQUAL(econ_limit1.minOilRate(), 0.0); - BOOST_CHECK_EQUAL(econ_limit1.minGasRate(), 0.0); - BOOST_CHECK_EQUAL(econ_limit1.maxGasOilRatio(), 0.0); - BOOST_CHECK_EQUAL(econ_limit1.endRun(), false); - BOOST_CHECK_EQUAL(econ_limit1.followonWell(), "'"); - BOOST_CHECK_EQUAL(econ_limit1.quantityLimit(), WellEcon::RATE); - BOOST_CHECK_EQUAL(econ_limit1.workover(), WellEcon::NONE); - BOOST_CHECK_EQUAL(econ_limit1.workoverSecondary(), WellEcon::NONE); - BOOST_CHECK(!(econ_limit1.requireWorkover())); - BOOST_CHECK(!(econ_limit1.requireSecondaryWorkover())); - BOOST_CHECK(!(econ_limit1.validFollowonWell())); - BOOST_CHECK(!(econ_limit1.endRun())); - BOOST_CHECK(!(econ_limit1.onAnyRatioLimit())); - BOOST_CHECK(!(econ_limit1.onAnyRateLimit())); - BOOST_CHECK(!(econ_limit1.onAnyEffectiveLimit())); - - const WellEconProductionLimits& econ_limit2 = prod2->getEconProductionLimits(1); - BOOST_CHECK(!(econ_limit2.onMinOilRate())); - BOOST_CHECK(econ_limit2.onMaxWaterCut()); - BOOST_CHECK(econ_limit2.onMinGasRate()); - BOOST_CHECK(!(econ_limit2.onMaxGasOilRatio())); - BOOST_CHECK_EQUAL(econ_limit2.maxWaterCut(), 0.95); - BOOST_CHECK_EQUAL(econ_limit2.minOilRate(), 0.0); - BOOST_CHECK_EQUAL(econ_limit2.minGasRate(), 1000.0/86400.); - BOOST_CHECK_EQUAL(econ_limit2.maxGasOilRatio(), 0.0); - BOOST_CHECK_EQUAL(econ_limit2.endRun(), false); - BOOST_CHECK_EQUAL(econ_limit2.followonWell(), "'"); - BOOST_CHECK_EQUAL(econ_limit2.quantityLimit(), WellEcon::RATE); - BOOST_CHECK_EQUAL(econ_limit2.workover(), WellEcon::CON); - BOOST_CHECK_EQUAL(econ_limit2.workoverSecondary(), WellEcon::CON); - BOOST_CHECK(econ_limit2.requireWorkover()); - BOOST_CHECK(econ_limit2.requireSecondaryWorkover()); - BOOST_CHECK(!(econ_limit2.validFollowonWell())); - BOOST_CHECK(!(econ_limit2.endRun())); - BOOST_CHECK(econ_limit2.onAnyRatioLimit()); - BOOST_CHECK(econ_limit2.onAnyRateLimit()); - BOOST_CHECK(econ_limit2.onAnyEffectiveLimit()); - } -} - - -BOOST_AUTO_TEST_CASE(TestEvents) { - ParseContext parseContext; - ParserPtr parser(new Parser()); - std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_EVENTS"); - - DeckPtr deck = parser->parseFile(scheduleFile, parseContext); - EclipseGrid grid(40,40,30); - SchedulePtr sched(new Schedule(parseContext , grid , deck)); - const Events& events = sched->getEvents(); - - BOOST_CHECK_EQUAL( true , events.hasEvent(ScheduleEvents::NEW_WELL , 0 ) ); - BOOST_CHECK_EQUAL( false , events.hasEvent(ScheduleEvents::NEW_WELL , 1 ) ); - BOOST_CHECK_EQUAL( true , events.hasEvent(ScheduleEvents::NEW_WELL , 2 ) ); - BOOST_CHECK_EQUAL( false , events.hasEvent(ScheduleEvents::NEW_WELL , 3 ) ); - - BOOST_CHECK_EQUAL( true , events.hasEvent(ScheduleEvents::COMPLETION_CHANGE , 0 ) ); - BOOST_CHECK_EQUAL( false , events.hasEvent(ScheduleEvents::COMPLETION_CHANGE , 1) ); - BOOST_CHECK_EQUAL( true , events.hasEvent(ScheduleEvents::COMPLETION_CHANGE , 5 ) ); - - BOOST_CHECK_EQUAL( true , events.hasEvent(ScheduleEvents::WELL_STATUS_CHANGE , 1 )); - BOOST_CHECK_EQUAL( false , events.hasEvent(ScheduleEvents::WELL_STATUS_CHANGE , 2 )); - BOOST_CHECK_EQUAL( true , events.hasEvent(ScheduleEvents::WELL_STATUS_CHANGE , 3 )); - BOOST_CHECK_EQUAL( true , events.hasEvent(ScheduleEvents::COMPLETION_CHANGE , 5) ); - - BOOST_CHECK_EQUAL( true , events.hasEvent(ScheduleEvents::GROUP_CHANGE , 0 )); - BOOST_CHECK_EQUAL( false , events.hasEvent(ScheduleEvents::GROUP_CHANGE , 1 )); - BOOST_CHECK_EQUAL( true , events.hasEvent(ScheduleEvents::GROUP_CHANGE , 3 ) ); - BOOST_CHECK_EQUAL( false , events.hasEvent(ScheduleEvents::NEW_GROUP , 2 ) ); - BOOST_CHECK_EQUAL( true , events.hasEvent(ScheduleEvents::NEW_GROUP , 3 ) ); -} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/TransMultIntegrationTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/TransMultIntegrationTests.cpp deleted file mode 100644 index 6ffa19dddd..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/IntegrationTests/TransMultIntegrationTests.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#define BOOST_TEST_MODULE TransMultTests -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace Opm; - - -BOOST_AUTO_TEST_CASE(MULTFLT_IN_SCHEDULE) { - ParserPtr parser(new Parser()); - std::string scheduleFile("testdata/integration_tests/TRANS/Deck1"); - ParseContext parseContext; - DeckPtr deck = parser->parseFile(scheduleFile, parseContext); - EclipseState state(*deck, parseContext); - const auto& trans = state.getTransMult(); - std::shared_ptr schedule = state.getSchedule(); - const Events& events = schedule->getEvents(); - - BOOST_CHECK_EQUAL( 0.10 , trans.getMultiplier( 3,2,0,FaceDir::XPlus )); - BOOST_CHECK_EQUAL( 0.10 , trans.getMultiplier( 2,2,0,FaceDir::XPlus )); - BOOST_CHECK( events.hasEvent( ScheduleEvents::GEO_MODIFIER , 3 ) ); - { - std::shared_ptr mini_deck = schedule->getModifierDeck(3); - state.applyModifierDeck( *mini_deck ); - } - BOOST_CHECK_EQUAL( 2.00 , trans.getMultiplier( 2,2,0,FaceDir::XPlus )); - BOOST_CHECK_EQUAL( 0.10 , trans.getMultiplier( 3,2,0,FaceDir::XPlus )); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/InputErrorAction.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/InputErrorAction.hpp deleted file mode 100644 index 532f3352ec..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/InputErrorAction.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef OPM_INPUT_ERROR_ACTION_HPP -#define OPM_INPUT_ERROR_ACTION_HPP - -namespace Opm { - - namespace InputError { - - enum Action { - THROW_EXCEPTION = 0, - WARN = 1, - IGNORE = 2 - }; - } -} - - - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/MessageContainer.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/MessageContainer.cpp deleted file mode 100644 index c284e4a56a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/MessageContainer.cpp +++ /dev/null @@ -1,167 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include - -#include - - -namespace Opm { - - Location::Location( const std::string& fn, size_t ln ) : - filename( fn ), lineno( ln ) - { - if( ln == 0 ) - throw std::invalid_argument( "Invalid line number 0 for file '" - + fn + "'" ); - } - - void MessageContainer::error( const std::string& msg, - const std::string& filename, - const size_t lineno ) { - m_messages.emplace_back( - Message { Message::Error, msg, Location { filename, lineno } } - ); - } - - - void MessageContainer::error( const std::string& msg ) { - m_messages.emplace_back( Message { Message::Error, msg, {} } ); - } - - - void MessageContainer::bug( const std::string& msg, - const std::string& filename, - const size_t lineno ) { - m_messages.emplace_back( - Message { Message::Bug, msg, { filename, lineno } } - ); - } - - - void MessageContainer::bug( const std::string& msg ) { - m_messages.emplace_back( Message { Message::Bug, msg, {} } ); - } - - - void MessageContainer::warning( const std::string& msg, - const std::string& filename, - const size_t lineno ) { - m_messages.emplace_back( Message { - Message::Warning, msg, { filename, lineno } - } - ); - } - - - void MessageContainer::warning( const std::string& msg ) { - m_messages.emplace_back( - Message { Message::Warning, msg,{} } - ); - } - - - - void MessageContainer::info( const std::string& msg, - const std::string& filename, - const size_t lineno ) { - m_messages.emplace_back( - Message { Message::Info, msg, { filename, lineno } } - ); - } - - - void MessageContainer::info( const std::string& msg ) { - m_messages.emplace_back( Message { Message::Info, msg, {} } ); - } - - - void MessageContainer::debug( const std::string& msg, - const std::string& filename, - const size_t lineno ) { - m_messages.emplace_back( - Message { Message::Debug, msg, { filename, lineno } } - ); - } - - - void MessageContainer::debug( const std::string& msg ) { - m_messages.emplace_back( Message { Message::Debug, msg, {} } ); - } - - - void MessageContainer::problem( const std::string& msg, - const std::string& filename, - const size_t lineno ) { - m_messages.emplace_back( - Message { Message::Problem, msg, { filename, lineno } } - ); - } - - - void MessageContainer::problem( const std::string& msg ) { - m_messages.emplace_back( Message { Message::Problem, msg, {} } ); - } - - - void MessageContainer::note( const std::string& msg, - const std::string& filename, - const size_t lineno ) { - m_messages.emplace_back( - Message { Message::Note, msg, { filename, lineno } } - ); - } - - - void MessageContainer::note( const std::string& msg ) { - m_messages.emplace_back( Message { Message::Note, msg, {} } ); - } - - - void MessageContainer::add( const Message& msg ) { - this->m_messages.push_back( msg ); - } - - void MessageContainer::add( Message&& msg ) { - this->m_messages.push_back( std::move( msg ) ); - } - - - void MessageContainer::appendMessages(const MessageContainer& other) - { - for(const auto& msg : other) { - this->add(msg); - } - } - - - MessageContainer::const_iterator MessageContainer::begin() const { - return m_messages.begin(); - } - - MessageContainer::const_iterator MessageContainer::end() const { - return m_messages.end(); - } - - std::size_t MessageContainer::size() const { - return m_messages.size(); - } - - -} // namespace Opm diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/MessageContainer.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/MessageContainer.hpp deleted file mode 100644 index dde8c6dfb2..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/MessageContainer.hpp +++ /dev/null @@ -1,108 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef MESSAGECONTAINER_H -#define MESSAGECONTAINER_H - -#include -#include -#include - -namespace Opm { - - struct Location { - Location() = default; - Location( const std::string&, size_t ); - - std::string filename; - size_t lineno = 0; - - explicit operator bool() const { - return lineno != 0; - } - }; - - struct Message { - enum type { - Debug = 1, - Note = 2, - Info = 3, - Warning = 4, - Error = 5, - Problem = 6, - Bug = 7 - }; - - Message( type mt, const std::string& msg, Location&& loc ) : - mtype( mt ), message( msg ), location( std::move( loc ) ) {} - - Message( type mt, const std::string& msg ) : - mtype( mt ), message( msg ) {} - - - type mtype; - std::string message; - Location location; - }; - - - ///Message container is used to replace OpmLog functionalities. - class MessageContainer { - public: - - using const_iterator = std::vector< Message >::const_iterator; - - void error(const std::string& msg, const std::string& filename, const size_t lineno); - void error(const std::string& msg); - - void bug(const std::string& msg, const std::string& filename, const size_t lineno); - void bug(const std::string& msg); - - void warning(const std::string& msg, const std::string& filename, const size_t lineno); - void warning(const std::string& msg); - - void info(const std::string& msg, const std::string& filename, const size_t lineno); - void info(const std::string& msg); - - void debug(const std::string& msg, const std::string& filename, const size_t lineno); - void debug(const std::string& msg); - - void problem(const std::string& msg, const std::string& filename, const size_t lineno); - void problem(const std::string& msg); - - void note(const std::string& msg, const std::string& filename, const size_t lineno); - void note(const std::string& msg); - - void add( const Message& ); - void add( Message&& ); - - void appendMessages(const MessageContainer& other); - - const_iterator begin() const; - const_iterator end() const; - - std::size_t size() const; - - private: - std::vector m_messages; - }; - -} // namespace Opm - -#endif // OPM_MESSAGECONTAINER_HEADER_INCLUDED diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParseContext.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParseContext.cpp deleted file mode 100644 index d6eb8826c4..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParseContext.cpp +++ /dev/null @@ -1,255 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include -#include - -#include - -#include -#include - -namespace Opm { - - - /* - A set of predefined error modes are added, with the default - setting 'InputError::IGNORE, then afterwards the environment - variables 'OPM_ERRORS_EXCEPTION', 'OPM_ERRORS_WARN' and - 'OPM_ERRORS_IGNORE' are consulted - */ - - ParseContext::ParseContext() { - initDefault(); - initEnv(); - } - - /* - If you intend to hardwire settings you should use this - constructor, as that way the environment variables are applied - after the hawrdwired settings. - */ - - ParseContext::ParseContext(const std::vector> initial) { - initDefault(); - - for (const auto& pair : initial) - update( pair.first , pair.second ); - - initEnv(); - } - - - void ParseContext::initDefault() { - addKey(PARSE_UNKNOWN_KEYWORD); - addKey(PARSE_RANDOM_TEXT); - addKey(PARSE_RANDOM_SLASH); - addKey(PARSE_MISSING_DIMS_KEYWORD); - addKey(PARSE_EXTRA_DATA); - addKey(PARSE_MISSING_INCLUDE); - - addKey(UNSUPPORTED_SCHEDULE_GEO_MODIFIER); - addKey(UNSUPPORTED_COMPORD_TYPE); - addKey(UNSUPPORTED_INITIAL_THPRES); - addKey(UNSUPPORTED_TERMINATE_IF_BHP); - - addKey(INTERNAL_ERROR_UNINITIALIZED_THPRES); - - addKey(SUMMARY_UNKNOWN_WELL); - addKey(SUMMARY_UNKNOWN_GROUP); - } - - void ParseContext::initEnv() { - envUpdate( "OPM_ERRORS_EXCEPTION" , InputError::THROW_EXCEPTION ); - envUpdate( "OPM_ERRORS_WARN" , InputError::WARN ); - envUpdate( "OPM_ERRORS_IGNORE" , InputError::IGNORE ); - } - - - Message::type ParseContext::handleError( - const std::string& errorKey, - MessageContainer& msgContainer, - const std::string& msg ) const { - - InputError::Action action = get( errorKey ); - - if (action == InputError::WARN) { - msgContainer.warning(msg); - return Message::Warning; - } - - else if (action == InputError::THROW_EXCEPTION) { - msgContainer.error(msg); - throw std::invalid_argument(errorKey + ": " + msg); - } - - return Message::Debug; - - } - - std::map::const_iterator ParseContext::begin() const { - return m_errorContexts.begin(); - } - - - std::map::const_iterator ParseContext::end() const { - return m_errorContexts.end(); - } - - ParseContext ParseContext::withKey(const std::string& key, InputError::Action action) const { - ParseContext pc(*this); - pc.addKey(key); - pc.updateKey(key, action); - return pc; - } - - ParseContext& ParseContext::withKey(const std::string& key, InputError::Action action) { - this->addKey(key); - this->updateKey(key, action); - return *this; - } - - bool ParseContext::hasKey(const std::string& key) const { - if (m_errorContexts.find( key ) == m_errorContexts.end()) - return false; - else - return true; - } - - - void ParseContext::addKey(const std::string& key) { - if (key.find_first_of("|:*") != std::string::npos) - throw std::invalid_argument("The ParseContext keys can not contain '|', '*' or ':'"); - - if (!hasKey(key)) - m_errorContexts.insert( std::pair( key , InputError::THROW_EXCEPTION )); - } - - - InputError::Action ParseContext::get(const std::string& key) const { - if (hasKey( key )) - return m_errorContexts.find( key )->second; - else - throw std::invalid_argument("The errormode key: " + key + " has not been registered"); - } - - /*****************************************************************/ - - /* - This is the 'strict' update function, it will throw an exception - if the input string is not a defined error mode. This should - typically be used in a downstream module where the policy - regarding an error mode is hardcoded. When using this method the - static string constanst for the different error modes should be - used as arguments: - - parseContext.updateKey( ParseContext::PARSE_RANDOM_SLASH , InputError::IGNORE ) - - */ - - void ParseContext::updateKey(const std::string& key , InputError::Action action) { - if (hasKey(key)) - m_errorContexts[key] = action; - else - throw std::invalid_argument("The errormode key: " + key + " has not been registered"); - } - - - void ParseContext::envUpdate( const std::string& envVariable , InputError::Action action ) { - const char * userSetting = getenv(envVariable.c_str()); - if (userSetting ) - update( userSetting , action); - } - - - void ParseContext::update(InputError::Action action) { - for (const auto& pair : m_errorContexts) { - const std::string& key = pair.first; - updateKey( key , action ); - } - } - - - void ParseContext::patternUpdate( const std::string& pattern , InputError::Action action) { - const char * c_pattern = pattern.c_str(); - for (const auto& pair : m_errorContexts) { - const std::string& key = pair.first; - if (util_fnmatch( c_pattern , key.c_str()) == 0) - updateKey( key , action ); - } - } - - - /* - This is the most general update function. The input keyString is - "selector string", and all matching error modes will be set to - @action. The algorithm for decoding the @keyString is: - - 1. The input string is split into several tokens on occurences - of ':' or ':' - and then each element is treated - seperately. - - 2. For each element in the list from 1): - - a) If it contains at least one '*' - update all error modes - matching the input string. - - b) If it is exactly equal to recognized error mode - update - that. - - c) Otherwise - silently ignore. - */ - - void ParseContext::update(const std::string& keyString , InputError::Action action) { - std::vector keys; - boost::split( keys , keyString , boost::is_any_of(":|")); - for (const auto& input_key : keys) { - std::vector matching_keys; - size_t wildcard_pos = input_key.find("*"); - - if (wildcard_pos == std::string::npos) { - if (hasKey( input_key )) - updateKey( input_key , action ); - } else - patternUpdate( input_key , action ); - - } - } - - const std::string ParseContext::PARSE_UNKNOWN_KEYWORD = "PARSE_UNKNOWN_KEYWORD"; - const std::string ParseContext::PARSE_RANDOM_TEXT = "PARSE_RANDOM_TEXT"; - const std::string ParseContext::PARSE_RANDOM_SLASH = "PARSE_RANDOM_SLASH"; - const std::string ParseContext::PARSE_MISSING_DIMS_KEYWORD = "PARSE_MISSING_DIMS_KEYWORD"; - const std::string ParseContext::PARSE_EXTRA_DATA = "PARSE_EXTRA_DATA"; - const std::string ParseContext::PARSE_MISSING_INCLUDE = "PARSE_MISSING_INCLUDE"; - - const std::string ParseContext::UNSUPPORTED_SCHEDULE_GEO_MODIFIER = "UNSUPPORTED_SCHEDULE_GEO_MODIFIER"; - const std::string ParseContext::UNSUPPORTED_COMPORD_TYPE = "UNSUPPORTED_COMPORD_TYPE"; - const std::string ParseContext::UNSUPPORTED_INITIAL_THPRES = "UNSUPPORTED_INITIAL_THPRES"; - const std::string ParseContext::UNSUPPORTED_TERMINATE_IF_BHP = "UNSUPPORTED_TERMINATE_IF_BHP"; - - const std::string ParseContext::INTERNAL_ERROR_UNINITIALIZED_THPRES = "INTERNAL_ERROR_UNINITIALIZED_THPRES"; - - const std::string ParseContext::PARSE_MISSING_SECTIONS = "PARSE_MISSING_SECTIONS"; - - const std::string ParseContext::SUMMARY_UNKNOWN_WELL = "SUMMARY_UNKNOWN_WELL"; - const std::string ParseContext::SUMMARY_UNKNOWN_GROUP = "SUMMARY_UNKNOWN_GROUP"; -} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParseContext.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParseContext.hpp deleted file mode 100644 index 76e076d627..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParseContext.hpp +++ /dev/null @@ -1,234 +0,0 @@ -/* - Copyright 2015 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - - -#ifndef OPM_PARSE_CONTEXT_HPP -#define OPM_PARSE_CONTEXT_HPP - -#include -#include -#include - -#include -#include - -namespace Opm { - - - /* - The ParseContext class is meant to control the behavior of the - parsing and EclipseState construction phase when - errors/inconsistencies/... are encountered in the input. - - For each of the possible problems encountered the possible - actions are goverened by the InputError::Action enum: - - InputError::THROW_EXCEPTION - InputError::WARN - InputError::IGNORE - - The internal datastructure is a map between string keys and - enum InputError::Action values. The string keys are meant to be - descriptive like: - - "PARSE_RANDOMTEXT" - - - The constructor will consult the env variable - OPM_ERRORS_IGNORE, OPM_ERRORS_WARN and OPM_ERRORS_EXCEPTION - when initializing. The variables should be set as strings of - update syntax. - - update_syntax: The main function for updating the policy of a - parseContext instance is the update() method. That takes a string - as input, and updates the matching flags. The string can - contain wildcards ('* and '?' mathced with fnmatch()) and is - split on ':' or '|' to allow multiple settings to be applied in - one go: - - Just set one variable: - update("PARSE_RANDOM_SLASH" , InputError::IGNORE) - - Ignore all unsupported features: - update("UNSUPPORTED_*" , InputError::IGNORE) - - Set two variables: - update("UNSUPPORTED_INIITIAL_THPRES:PARSE_RANDOM_SLASH" , InputError::IGNORE) - - The update function itself is quite tolerant, and will silently - ignore unknown keys. If you use the updateKey() function only - recognizd keys will be allowed. - */ - - class ParseContext { - public: - ParseContext(); - ParseContext(const std::vector> initial); - Message::type handleError( const std::string& errorKey, MessageContainer& msgContainer, const std::string& msg ) const; - bool hasKey(const std::string& key) const; - ParseContext withKey(const std::string& key, InputError::Action action = InputError::WARN) const; - ParseContext& withKey(const std::string& key, InputError::Action action = InputError::WARN); - void updateKey(const std::string& key , InputError::Action action); - void update(InputError::Action action); - void update(const std::string& keyString , InputError::Action action); - InputError::Action get(const std::string& key) const; - std::map::const_iterator begin() const; - std::map::const_iterator end() const; - /* - When the key is added it is inserted in 'strict mode', - i.e. with the value 'InputError::THROW_EXCEPTION. If you - want a different value you must subsequently call the update - method. - */ - void addKey(const std::string& key); - /* - The unknownKeyword field regulates how the parser should - react when it encounters an unknwon keyword. Observe that - 'keyword' in this context means: - - o A string of 8 characters or less - starting in column - 0. - - o A string consisiting of UPPERCASE characters and - numerals, staring with an UPPERCASE character [Hmmm - - actually lowercase is also accepted?!] - - Observe that unknownKeyword does *not* consult any global - collection of keywords to see if a particular string - corresponds to a known valid keyword which we just happen - to ignore for this particualar parse operation. - - The 'unknownkeyword' and 'randomText' error situations are - not fully orthogonal, and in particualar if a unknown - keyword has been encountered - without halting the parser, a - subsequent piece of 'random text' might not be identified - correctly as such. - */ - const static std::string PARSE_UNKNOWN_KEYWORD; - - /* - With random text we mean a string in the input deck is not - correctly formatted as a keyword heading. - */ - const static std::string PARSE_RANDOM_TEXT; - - /* - It turns out that random '/' - i.e. typically an extra slash - which is not needed - is quite common. This is therefor a - special case treatment of the 'randomText' behaviour. - */ - const static std::string PARSE_RANDOM_SLASH; - - - /* - For some keywords the number of records (i.e. size) is given - as an item in another keyword. A typical example is the - EQUIL keyword where the number of records is given by the - NTEQUL item of the EQLDIMS keyword. If the size defining - XXXDIMS keyword is not in the deck, we can use the default - values of the XXXDIMS keyword; this is regulated by the - 'missingDIMskeyword' field. - - Observe that a fully defaulted XXXDIMS keyword does not - trigger this behavior. - */ - const static std::string PARSE_MISSING_DIMS_KEYWORD; - - /* - If the number of elements in the input record exceeds the - number of items in the keyword configuration this error - situation will be triggered. Many keywords end with several - ECLIPSE300 only items - in some cases we have omitted those - items in the Json configuration; that will typically trigger - this error situation when encountering an ECLIPSE300 deck. - */ - const static std::string PARSE_EXTRA_DATA; - - /* - If an include file is not found we can configure the parser - to contine reading; of course the resulting deck can - obviously be quite broken. - */ - const static std::string PARSE_MISSING_INCLUDE; - - - /* - Some property modfiers can be modified in the Schedule - section; this effectively means that Eclipse supports time - dependent geology. This is marked as an exocit special - feature in Eclipse, and not supported at all in the - EclipseState object of opm-parser. If these modifiers are - encountered in the Schedule section the behavior is - regulated by this setting. - */ - const static std::string UNSUPPORTED_SCHEDULE_GEO_MODIFIER; - - /* - In the COMPORD implementation only the 'TRACK' input mode is supported. - */ - const static std::string UNSUPPORTED_COMPORD_TYPE; - - /* - If the third item in the THPRES keyword is defaulted the - threshold pressure is inferred from the initial pressure; - this currently not supported. - */ - const static std::string UNSUPPORTED_INITIAL_THPRES; - - /* - If the second item in the WHISTCTL keyword is set to YES - The simulator is supposed to terminate if the well is - changed to BHP control. This feature is not yet supported. - */ - const static std::string UNSUPPORTED_TERMINATE_IF_BHP; - - - /* - If the third item in the THPRES keyword is defaulted the - threshold pressure is inferred from the initial pressure - - if you still ask the ThresholdPressure instance for a - pressure value this error will be signalled. this currently - not supported. - */ - const static std::string INTERNAL_ERROR_UNINITIALIZED_THPRES; - - /* - If the deck is partial deck, and thus a full EclipseState is - meaningless, we can still construct a slim EclipseGrid. - */ - const static std::string PARSE_MISSING_SECTIONS; - - - /* - If you have configured a specific well in the summary section, - which is not recognized - how to handle. - */ - const static std::string SUMMARY_UNKNOWN_WELL; - const static std::string SUMMARY_UNKNOWN_GROUP; - - private: - void initDefault(); - void initEnv(); - void envUpdate( const std::string& envVariable , InputError::Action action ); - void patternUpdate( const std::string& pattern , InputError::Action action); - std::map m_errorContexts; -}; } - - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/Parser.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/Parser.cpp deleted file mode 100644 index 3e253ba613..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/Parser.cpp +++ /dev/null @@ -1,959 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include - -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace Opm { - -namespace { - -struct find_comment { - /* - * A note on performance: using a function to plug functionality into - * find_terminator rather than plain functions because it almost ensures - * inlining, where the plain function can reduce to a function pointer. - */ - template< typename Itr > - Itr operator()( Itr begin, Itr end ) const { - auto itr = std::find( begin, end, '-' ); - for( ; itr != end; itr = std::find( itr + 1, end, '-' ) ) - if( (itr + 1) != end && *( itr + 1 ) == '-' ) return itr; - - return end; - } -}; - -template< typename Itr, typename Term > -inline Itr find_terminator( Itr begin, Itr end, Term terminator ) { - - auto pos = terminator( begin, end ); - - if( pos == end ) return end; - - auto qbegin = std::find_if( begin, end, RawConsts::is_quote() ); - - if( qbegin == end || qbegin > pos ) - return pos; - - auto qend = std::find( qbegin + 1, end, *qbegin ); - - // Quotes are not balanced - probably an error?! - if( qend == end ) return end; - - return find_terminator( qend + 1, end, terminator ); -} - -/** - This function will return a copy of the input string where all - characters following '--' are removed. The copy is a view and relies on - the source string to remain alive. The function handles quoting with - single quotes and double quotes: - - ABC --Comment => ABC - ABC '--Comment1' --Comment2 => ABC '--Comment1' - ABC "-- Not balanced quote? => ABC "-- Not balanced quote? -*/ -static inline string_view strip_comments( string_view str ) { - return { str.begin(), - find_terminator( str.begin(), str.end(), find_comment() ) }; -} - -template< typename Itr > -inline Itr trim_left( Itr begin, Itr end ) { - return std::find_if_not( begin, end, RawConsts::is_separator() ); -} - -template< typename Itr > -inline Itr trim_right( Itr begin, Itr end ) { - - std::reverse_iterator< Itr > rbegin( end ); - std::reverse_iterator< Itr > rend( begin ); - - return std::find_if_not( rbegin, rend, RawConsts::is_separator() ).base(); -} - -inline string_view trim( string_view str ) { - auto fst = trim_left( str.begin(), str.end() ); - auto lst = trim_right( fst, str.end() ); - return { fst, lst }; -} - -inline string_view strip_slash( string_view view ) { - using itr = string_view::const_iterator; - const auto term = []( itr begin, itr end ) { - return std::find( begin, end, '/' ); - }; - - auto begin = view.begin(); - auto end = view.end(); - auto slash = find_terminator( begin, end, term ); - - /* we want to preserve terminating slashes */ - if( slash != end ) ++slash; - - return { begin, slash }; -} - -inline bool getline( string_view& input, string_view& line ) { - if( input.empty() ) return false; - - auto end = std::find( input.begin(), input.end(), '\n' ); - - line = string_view( input.begin(), end ); - input = string_view( end + 1, input.end() ); - return true; - - /* we know that we always append a newline onto the input string, so we can - * safely assume that end+1 will either be end-of-input (i.e. empty range) - * or the start of the next line - */ -} - -/* - * Read the input file and remove everything that isn't interesting data, - * including stripping comments, removing leading/trailing whitespaces and - * everything after (terminating) slashes. Manually copying into the string for - * performance. - */ -inline std::string clean( const std::string& str ) { - std::string dst; - dst.resize( str.size() ); - - string_view input( str ), line; - auto dsti = dst.begin(); - while( getline( input, line ) ) { - line = trim( strip_slash( strip_comments( line ) ) ); - - std::copy( line.begin(), line.end(), dsti ); - dsti += std::distance( line.begin(), line.end() ); - *dsti++ = '\n'; - } - - dst.resize( std::distance( dst.begin(), dsti ) ); - return dst; -} - -const std::string emptystr = ""; - -struct file { - file( boost::filesystem::path p, const std::string& in ) : - input( in ), path( p ) - {} - - string_view input; - size_t lineNR = 0; - boost::filesystem::path path; -}; - -class InputStack : public std::stack< file, std::vector< file > > { - public: - void push( std::string&& input, boost::filesystem::path p = "" ); - - private: - std::list< std::string > string_storage; - using base = std::stack< file, std::vector< file > >; -}; - -void InputStack::push( std::string&& input, boost::filesystem::path p ) { - this->string_storage.push_back( std::move( input ) ); - this->emplace( p, this->string_storage.back() ); -} - -class ParserState { - public: - ParserState( const ParseContext& ); - ParserState( const ParseContext&, boost::filesystem::path ); - - void loadString( const std::string& ); - void loadFile( const boost::filesystem::path& ); - void openRootFile( const boost::filesystem::path& ); - - void handleRandomText(const string_view& ) const; - boost::filesystem::path getIncludeFilePath( std::string ) const; - void addPathAlias( const std::string& alias, const std::string& path ); - - const boost::filesystem::path& current_path() const; - size_t line() const; - - bool done() const; - string_view getline(); - void closeFile(); - - private: - InputStack input_stack; - - std::map< std::string, std::string > pathMap; - boost::filesystem::path rootPath; - - public: - RawKeywordPtr rawKeyword; - string_view nextKeyword = emptystr; - Deck* deck; - const ParseContext& parseContext; -}; - - -const boost::filesystem::path& ParserState::current_path() const { - return this->input_stack.top().path; -} - -size_t ParserState::line() const { - return this->input_stack.top().lineNR; -} - -bool ParserState::done() const { - - while( !this->input_stack.empty() && - this->input_stack.top().input.empty() ) - const_cast< ParserState* >( this )->input_stack.pop(); - - return this->input_stack.empty(); -} - -string_view ParserState::getline() { - string_view ln; - - Opm::getline( this->input_stack.top().input, ln ); - this->input_stack.top().lineNR++; - - return ln; -} - -void ParserState::closeFile() { - this->input_stack.pop(); -} - -ParserState::ParserState(const ParseContext& __parseContext) - : deck( new Deck() ), - parseContext( __parseContext ) -{} - -ParserState::ParserState( const ParseContext& context, - boost::filesystem::path p ) : - rootPath( boost::filesystem::canonical( p ).parent_path() ), - deck( new Deck() ), - parseContext( context ) -{ - openRootFile( p ); -} - -void ParserState::loadString(const std::string& input) { - this->input_stack.push( clean( input + "\n" ) ); -} - -void ParserState::loadFile(const boost::filesystem::path& inputFile) { - - boost::filesystem::path inputFileCanonical; - try { - inputFileCanonical = boost::filesystem::canonical(inputFile); - } catch (boost::filesystem::filesystem_error fs_error) { - std::string msg = "Could not open file: " + inputFile.string(); - parseContext.handleError( ParseContext::PARSE_MISSING_INCLUDE , deck->getMessageContainer() , msg); - return; - } - - const auto closer = []( std::FILE* f ) { std::fclose( f ); }; - std::unique_ptr< std::FILE, decltype( closer ) > ufp( - std::fopen( inputFileCanonical.string().c_str(), "rb" ), - closer - ); - - // make sure the file we'd like to parse is readable - if( !ufp ) { - std::string msg = "Could not read from file: " + inputFile.string(); - parseContext.handleError( ParseContext::PARSE_MISSING_INCLUDE , deck->getMessageContainer() , msg); - return; - } - - /* - * read the input file C-style. This is done for performance - * reasons, as streams are slow - */ - - auto* fp = ufp.get(); - std::string buffer; - std::fseek( fp, 0, SEEK_END ); - buffer.resize( std::ftell( fp ) + 1 ); - std::rewind( fp ); - const auto readc = std::fread( &buffer[ 0 ], 1, buffer.size() - 1, fp ); - buffer.back() = '\n'; - - if( std::ferror( fp ) || readc != buffer.size() - 1 ) - throw std::runtime_error( "Error when reading input file '" - + inputFileCanonical.string() + "'" ); - - this->input_stack.push( clean( buffer ), inputFileCanonical ); -} - -/* - * We have encountered 'random' characters in the input file which - * are not correctly formatted as a keyword heading, and not part - * of the data section of any keyword. - */ - -void ParserState::handleRandomText(const string_view& keywordString ) const { - std::string errorKey; - std::stringstream msg; - std::string trimmedCopy = keywordString.string(); - - if (trimmedCopy == "/") { - errorKey = ParseContext::PARSE_RANDOM_SLASH; - msg << "Extra '/' detected at: " - << this->current_path() - << ":" << this->line(); - } else { - errorKey = ParseContext::PARSE_RANDOM_TEXT; - msg << "String \'" << keywordString - << "\' not formatted/recognized as valid keyword at: " - << this->current_path() - << ":" << this->line(); - } - parseContext.handleError( errorKey , deck->getMessageContainer() , msg.str() ); -} - -void ParserState::openRootFile( const boost::filesystem::path& inputFile) { - this->loadFile( inputFile ); - this->deck->setDataFile( inputFile.string() ); - const boost::filesystem::path& inputFileCanonical = boost::filesystem::canonical(inputFile); - rootPath = inputFileCanonical.parent_path(); -} - -boost::filesystem::path ParserState::getIncludeFilePath( std::string path ) const { - static const std::string pathKeywordPrefix("$"); - static const std::string validPathNameCharacters("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"); - - size_t positionOfPathName = path.find(pathKeywordPrefix); - - if ( positionOfPathName != std::string::npos) { - std::string stringStartingAtPathName = path.substr(positionOfPathName+1); - size_t cutOffPosition = stringStartingAtPathName.find_first_not_of(validPathNameCharacters); - std::string stringToFind = stringStartingAtPathName.substr(0, cutOffPosition); - std::string stringToReplace = this->pathMap.at( stringToFind ); - boost::replace_all(path, pathKeywordPrefix + stringToFind, stringToReplace); - } - - boost::filesystem::path includeFilePath(path); - - if (includeFilePath.is_relative()) - return this->rootPath / includeFilePath; - - return includeFilePath; -} - -void ParserState::addPathAlias( const std::string& alias, const std::string& path ) { - this->pathMap.emplace( alias, path ); -} - -std::shared_ptr< RawKeyword > createRawKeyword( const string_view& kw, ParserState& parserState, const Parser& parser ) { - auto keywordString = ParserKeyword::getDeckName( kw ); - - if( !parser.isRecognizedKeyword( keywordString ) ) { - if( ParserKeyword::validDeckName( keywordString ) ) { - std::string msg = "Keyword " + keywordString + " not recognized."; - auto& msgContainer = parserState.deck->getMessageContainer(); - parserState.parseContext.handleError( ParseContext::PARSE_UNKNOWN_KEYWORD, msgContainer, msg ); - return {}; - } - - parserState.handleRandomText( keywordString ); - return {}; - - } - - const auto* parserKeyword = parser.getParserKeywordFromDeckName( keywordString ); - - if( parserKeyword->getSizeType() == SLASH_TERMINATED || parserKeyword->getSizeType() == UNKNOWN) { - - const auto rawSizeType = parserKeyword->getSizeType() == SLASH_TERMINATED - ? Raw::SLASH_TERMINATED - : Raw::UNKNOWN; - - return std::make_shared< RawKeyword >( keywordString, rawSizeType, - parserState.current_path().string(), - parserState.line() ); - } - - if( parserKeyword->hasFixedSize() ) { - return std::make_shared< RawKeyword >( keywordString, - parserState.current_path().string(), - parserState.line(), - parserKeyword->getFixedSize(), - parserKeyword->isTableCollection() ); - } - - const auto& sizeKeyword = parserKeyword->getSizeDefinitionPair(); - const auto* deck = parserState.deck; - - if( deck->hasKeyword(sizeKeyword.first ) ) { - const auto& sizeDefinitionKeyword = deck->getKeyword(sizeKeyword.first); - const auto& record = sizeDefinitionKeyword.getRecord(0); - const auto targetSize = record.getItem( sizeKeyword.second ).get< int >( 0 ); - return std::make_shared< RawKeyword >( keywordString, - parserState.current_path().string(), - parserState.line(), - targetSize, - parserKeyword->isTableCollection() ); - } - - std::string msg = "Expected the kewyord: " + sizeKeyword.first - + " to infer the number of records in: " + keywordString; - auto& msgContainer = parserState.deck->getMessageContainer(); - parserState.parseContext.handleError(ParseContext::PARSE_MISSING_DIMS_KEYWORD , msgContainer, msg ); - - const auto* keyword = parser.getKeyword( sizeKeyword.first ); - const auto record = keyword->getRecord(0); - const auto int_item = std::dynamic_pointer_cast( record->get( sizeKeyword.second ) ); - - const auto targetSize = int_item->getDefault( ); - return std::make_shared< RawKeyword >( keywordString, - parserState.current_path().string(), - parserState.line(), - targetSize, - parserKeyword->isTableCollection() ); -} - -bool tryParseKeyword( ParserState& parserState, const Parser& parser ) { - if (parserState.nextKeyword.length() > 0) { - parserState.rawKeyword = createRawKeyword( parserState.nextKeyword, parserState, parser ); - parserState.nextKeyword = emptystr; - } - - if (parserState.rawKeyword && parserState.rawKeyword->isFinished()) - return true; - - while( !parserState.done() ) { - auto line = parserState.getline(); - - if( line.empty() && !parserState.rawKeyword ) continue; - if( line.empty() && !parserState.rawKeyword->is_title() ) continue; - - std::string keywordString; - - if( parserState.rawKeyword == NULL ) { - if( RawKeyword::isKeywordPrefix( line, keywordString ) ) { - parserState.rawKeyword = createRawKeyword( keywordString, parserState, parser ); - } else - /* We are looking at some random gibberish?! */ - parserState.handleRandomText( line ); - } else { - if (parserState.rawKeyword->getSizeType() == Raw::UNKNOWN) { - if( parser.isRecognizedKeyword( line ) ) { - parserState.rawKeyword->finalizeUnknownSize(); - parserState.nextKeyword = line; - return true; - } - } - parserState.rawKeyword->addRawRecordString(line); - } - - if (parserState.rawKeyword - && parserState.rawKeyword->isFinished() - && parserState.rawKeyword->getSizeType() != Raw::UNKNOWN) - { - return true; - } - } - - if (parserState.rawKeyword - && parserState.rawKeyword->getSizeType() == Raw::UNKNOWN) - { - parserState.rawKeyword->finalizeUnknownSize(); - } - - return false; -} - -bool parseState( ParserState& parserState, const Parser& parser ) { - - while( !parserState.done() ) { - - parserState.rawKeyword.reset(); - - const bool streamOK = tryParseKeyword( parserState, parser ); - if( !parserState.rawKeyword && !streamOK ) - continue; - - if (parserState.rawKeyword->getKeywordName() == Opm::RawConsts::end) - return true; - - if (parserState.rawKeyword->getKeywordName() == Opm::RawConsts::endinclude) { - parserState.closeFile(); - continue; - } - - if (parserState.rawKeyword->getKeywordName() == Opm::RawConsts::paths) { - for( const auto& record : *parserState.rawKeyword ) { - std::string pathName = readValueToken(record.getItem(0)); - std::string pathValue = readValueToken(record.getItem(1)); - parserState.addPathAlias( pathName, pathValue ); - } - - continue; - } - - if (parserState.rawKeyword->getKeywordName() == Opm::RawConsts::include) { - auto& firstRecord = parserState.rawKeyword->getFirstRecord( ); - std::string includeFileAsString = readValueToken(firstRecord.getItem(0)); - boost::filesystem::path includeFile = parserState.getIncludeFilePath( includeFileAsString ); - - parserState.loadFile( includeFile ); - continue; - } - - if( parser.isRecognizedKeyword( parserState.rawKeyword->getKeywordName() ) ) { - const auto& kwname = parserState.rawKeyword->getKeywordName(); - const auto* parserKeyword = parser.getParserKeywordFromDeckName( kwname ); - parserState.deck->addKeyword( parserKeyword->parse( parserState.parseContext, parserState.deck->getMessageContainer(), parserState.rawKeyword ) ); - } else { - DeckKeyword deckKeyword( parserState.rawKeyword->getKeywordName(), false ); - const std::string msg = "The keyword " + parserState.rawKeyword->getKeywordName() + " is not recognized"; - deckKeyword.setLocation( parserState.rawKeyword->getFilename(), - parserState.rawKeyword->getLineNR()); - parserState.deck->addKeyword( std::move( deckKeyword ) ); - parserState.deck->getMessageContainer().warning( - parserState.current_path().string(), msg, parserState.line() ); - } - } - - return true; -} - -} - - - /* stripComments only exists so that the unit tests can verify it. - * strip_comment is the actual (internal) implementation - */ - std::string Parser::stripComments( const std::string& str ) { - return { str.begin(), - find_terminator( str.begin(), str.end(), find_comment() ) }; - } - - Parser::Parser(bool addDefault) { - if (addDefault) - addDefaultKeywords(); - } - - - /* - About INCLUDE: Observe that the ECLIPSE parser is slightly unlogical - when it comes to nested includes; the path to an included file is always - interpreted relative to the filesystem location of the DATA file, and - not the location of the file issuing the INCLUDE command. That behaviour - is retained in the current implementation. - */ - - Deck * Parser::newDeckFromFile(const std::string &dataFileName, const ParseContext& parseContext) const { - ParserState parserState( parseContext, dataFileName ); - parseState( parserState, *this ); - applyUnitsToDeck( *parserState.deck ); - - return parserState.deck; - } - - Deck * Parser::newDeckFromString(const std::string &data, const ParseContext& parseContext) const { - ParserState parserState( parseContext ); - parserState.loadString( data ); - - parseState( parserState, *this ); - applyUnitsToDeck( *parserState.deck ); - - return parserState.deck; - } - - inline void assertFullDeck(const ParseContext& context) { - if (context.hasKey(ParseContext::PARSE_MISSING_SECTIONS)) - throw new std::logic_error("Cannot construct a state in partial deck context"); - } - - EclipseState Parser::parse(const std::string &filename, const ParseContext& context) { - assertFullDeck(context); - Parser p; - DeckPtr deck = p.parseFile(filename, context); - EclipseState es(deck, context); - return es; - } - - EclipseState Parser::parse(const Deck& deck, const ParseContext& context) { - assertFullDeck(context); - return EclipseState(deck, context); - } - - EclipseState Parser::parseData(const std::string &data, const ParseContext& context) { - assertFullDeck(context); - Parser p; - auto deck = p.parseString(data, context); - return parse(*deck, context); - } - - std::shared_ptr Parser::parseGrid(const std::string &filename, const ParseContext& context) { - if (context.hasKey(ParseContext::PARSE_MISSING_SECTIONS)) - return std::make_shared(filename); - return parse(filename, context).getInputGrid(); - } - - std::shared_ptr Parser::parseGrid(const Deck& deck, const ParseContext& context) - { - if (context.hasKey(ParseContext::PARSE_MISSING_SECTIONS)) - return std::make_shared(deck); - return parse(deck, context).getInputGrid(); - } - - std::shared_ptr Parser::parseGridData(const std::string &data, const ParseContext& context) { - Parser parser; - auto deck = parser.parseString(data, context); - if (context.hasKey(ParseContext::PARSE_MISSING_SECTIONS)) { - return std::make_shared(deck); - } - return parse(*deck, context).getInputGrid(); - } - - DeckPtr Parser::parseFile(const std::string &dataFileName, const ParseContext& parseContext) const { - return std::shared_ptr( newDeckFromFile( dataFileName , parseContext)); - } - - DeckPtr Parser::parseString(const std::string &data, const ParseContext& parseContext) const { - return std::shared_ptr( newDeckFromString( data , parseContext)); - } - - size_t Parser::size() const { - return m_deckParserKeywords.size(); - } - - const ParserKeyword* Parser::matchingKeyword(const string_view& name) const { - for (auto iter = m_wildCardKeywords.begin(); iter != m_wildCardKeywords.end(); ++iter) { - if (iter->second->matches(name)) - return iter->second; - } - return nullptr; - } - - bool Parser::hasWildCardKeyword(const std::string& internalKeywordName) const { - return (m_wildCardKeywords.count(internalKeywordName) > 0); - } - - bool Parser::isRecognizedKeyword(const string_view& name ) const { - if( !ParserKeyword::validDeckName( name ) ) - return false; - - if( m_deckParserKeywords.count( name ) ) - return true; - - return bool( matchingKeyword( name ) ); - } - -void Parser::addParserKeyword( std::unique_ptr< const ParserKeyword >&& parserKeyword) { - string_view name( parserKeyword->getName() ); - auto* ptr = parserKeyword.get(); - - /* Store the keywords in the keyword storage. They aren't free'd until the - * parser gets destroyed, even if there is no reasonable way to reach them - * (effectively making them leak). This is not a big problem because: - * - * * A keyword can be added that overwrites some *but not all* deckname -> - * keyword mappings. Keeping track of this is more hassle than worth for - * what is essentially edge case usage. - * * We can store (and search) via string_view's from the keyword added - * first because we know that it will be kept around, i.e. we don't have to - * deal with subtle lifetime issues. - * * It means we aren't reliant on some internal name mapping, and can only - * be concerned with interesting behaviour. - * * Finally, these releases would in practice never happen anyway until - * the parser went out of scope, and now they'll also be cleaned up in the - * same sweep. - */ - - this->keyword_storage.push_back( std::move( parserKeyword ) ); - - for (auto nameIt = ptr->deckNamesBegin(); - nameIt != ptr->deckNamesEnd(); - ++nameIt) - { - m_deckParserKeywords[ *nameIt ] = ptr; - } - - if (ptr->hasMatchRegex()) { - m_wildCardKeywords[ name ] = ptr; - } - -} - - -void Parser::addParserKeyword(const Json::JsonObject& jsonKeyword) { - addParserKeyword( std::unique_ptr< ParserKeyword >( new ParserKeyword( jsonKeyword ) ) ); -} - -bool Parser::hasKeyword( const std::string& name ) const { - return this->m_deckParserKeywords.find( string_view( name ) ) - != this->m_deckParserKeywords.end(); -} - -const ParserKeyword* Parser::getKeyword( const std::string& name ) const { - return getParserKeywordFromDeckName( string_view( name ) ); -} - -const ParserKeyword* Parser::getParserKeywordFromDeckName(const string_view& name ) const { - auto candidate = m_deckParserKeywords.find( name ); - - if( candidate != m_deckParserKeywords.end() ) return candidate->second; - - const auto* wildCardKeyword = matchingKeyword( name ); - - if ( !wildCardKeyword ) - throw std::invalid_argument( "Do not have parser keyword for parsing: " + name ); - - return wildCardKeyword; -} - -std::vector Parser::getAllDeckNames () const { - std::vector keywords; - for (auto iterator = m_deckParserKeywords.begin(); iterator != m_deckParserKeywords.end(); iterator++) { - keywords.push_back(iterator->first.string()); - } - for (auto iterator = m_wildCardKeywords.begin(); iterator != m_wildCardKeywords.end(); iterator++) { - keywords.push_back(iterator->first.string()); - } - return keywords; -} - - - void Parser::loadKeywords(const Json::JsonObject& jsonKeywords) { - if (jsonKeywords.is_array()) { - for (size_t index = 0; index < jsonKeywords.size(); index++) { - Json::JsonObject jsonKeyword = jsonKeywords.get_array_item(index); - addParserKeyword( std::unique_ptr< ParserKeyword >( new ParserKeyword( jsonKeyword ) ) ); - } - } else - throw std::invalid_argument("Input JSON object is not an array"); - } - - bool Parser::loadKeywordFromFile(const boost::filesystem::path& configFile) { - - try { - Json::JsonObject jsonKeyword(configFile); - ParserKeywordConstPtr parserKeyword = std::make_shared(jsonKeyword); - addParserKeyword( std::unique_ptr< ParserKeyword >( new ParserKeyword( jsonKeyword ) ) ); - return true; - } - catch (...) { - return false; - } - } - - - void Parser::loadKeywordsFromDirectory(const boost::filesystem::path& directory, bool recursive) { - if (!boost::filesystem::exists(directory)) - throw std::invalid_argument("Directory: " + directory.string() + " does not exist."); - else { - boost::filesystem::directory_iterator end; - for (boost::filesystem::directory_iterator iter(directory); iter != end; iter++) { - if (boost::filesystem::is_directory(*iter)) { - if (recursive) - loadKeywordsFromDirectory(*iter, recursive); - } else { - if (ParserKeyword::validInternalName(iter->path().filename().string())) { - if (!loadKeywordFromFile(*iter)) - std::cerr << "** Warning: failed to load keyword from file:" << iter->path() << std::endl; - } - } - } - } - } - - - void Parser::applyUnitsToDeck(Deck& deck) const { - for( auto& deckKeyword : deck ) { - - if( !isRecognizedKeyword( deckKeyword.name() ) ) continue; - - const auto* parserKeyword = getParserKeywordFromDeckName( deckKeyword.name() ); - if( !parserKeyword->hasDimension() ) continue; - - parserKeyword->applyUnitsToDeck(deck , deckKeyword); - } - } - - static bool isSectionDelimiter( const DeckKeyword& keyword ) { - const auto& name = keyword.name(); - for( const auto& x : { "RUNSPEC", "GRID", "EDIT", "PROPS", - "REGIONS", "SOLUTION", "SUMMARY", "SCHEDULE" } ) - if( name == x ) return true; - - return false; - } - - bool Section::checkSectionTopology(const Deck& deck, - const Parser& parser, - bool ensureKeywordSectionAffiliation) - { - if( deck.size() == 0 ) { - std::string msg = "empty decks are invalid\n"; - deck.getMessageContainer().warning(msg); - return false; - } - - bool deckValid = true; - - if( deck.getKeyword(0).name() != "RUNSPEC" ) { - std::string msg = "The first keyword of a valid deck must be RUNSPEC\n"; - auto curKeyword = deck.getKeyword(0); - deck.getMessageContainer().warning(msg, curKeyword.getFileName(), curKeyword.getLineNumber()); - deckValid = false; - } - - std::string curSectionName = deck.getKeyword(0).name(); - size_t curKwIdx = 1; - for (; curKwIdx < deck.size(); ++curKwIdx) { - const auto& curKeyword = deck.getKeyword(curKwIdx); - const std::string& curKeywordName = curKeyword.name(); - - if (!isSectionDelimiter( curKeyword )) { - if( !parser.isRecognizedKeyword( curKeywordName ) ) - // ignore unknown keywords for now (i.e. they can appear in any section) - continue; - - const auto& parserKeyword = parser.getParserKeywordFromDeckName( curKeywordName ); - if (ensureKeywordSectionAffiliation && !parserKeyword->isValidSection(curSectionName)) { - std::string msg = - "The keyword '"+curKeywordName+"' is located in the '"+curSectionName - +"' section where it is invalid"; - deck.getMessageContainer().warning(msg, curKeyword.getFileName(), curKeyword.getLineNumber()); - deckValid = false; - } - - continue; - } - - if (curSectionName == "RUNSPEC") { - if (curKeywordName != "GRID") { - std::string msg = - "The RUNSPEC section must be followed by GRID instead of "+curKeywordName; - deck.getMessageContainer().warning(msg, curKeyword.getFileName(), curKeyword.getLineNumber()); - deckValid = false; - } - - curSectionName = curKeywordName; - } - else if (curSectionName == "GRID") { - if (curKeywordName != "EDIT" && curKeywordName != "PROPS") { - std::string msg = - "The GRID section must be followed by EDIT or PROPS instead of "+curKeywordName; - deck.getMessageContainer().warning(msg, curKeyword.getFileName(), curKeyword.getLineNumber()); - deckValid = false; - } - - curSectionName = curKeywordName; - } - else if (curSectionName == "EDIT") { - if (curKeywordName != "PROPS") { - std::string msg = - "The EDIT section must be followed by PROPS instead of "+curKeywordName; - deck.getMessageContainer().warning(msg, curKeyword.getFileName(), curKeyword.getLineNumber()); - deckValid = false; - } - - curSectionName = curKeywordName; - } - else if (curSectionName == "PROPS") { - if (curKeywordName != "REGIONS" && curKeywordName != "SOLUTION") { - std::string msg = - "The PROPS section must be followed by REGIONS or SOLUTION instead of "+curKeywordName; - deck.getMessageContainer().warning(msg, curKeyword.getFileName(), curKeyword.getLineNumber()); - deckValid = false; - } - - curSectionName = curKeywordName; - } - else if (curSectionName == "REGIONS") { - if (curKeywordName != "SOLUTION") { - std::string msg = - "The REGIONS section must be followed by SOLUTION instead of "+curKeywordName; - deck.getMessageContainer().warning(msg, curKeyword.getFileName(), curKeyword.getLineNumber()); - deckValid = false; - } - - curSectionName = curKeywordName; - } - else if (curSectionName == "SOLUTION") { - if (curKeywordName != "SUMMARY" && curKeywordName != "SCHEDULE") { - std::string msg = - "The SOLUTION section must be followed by SUMMARY or SCHEDULE instead of "+curKeywordName; - deck.getMessageContainer().warning(msg, curKeyword.getFileName(), curKeyword.getLineNumber()); - deckValid = false; - } - - curSectionName = curKeywordName; - } - else if (curSectionName == "SUMMARY") { - if (curKeywordName != "SCHEDULE") { - std::string msg = - "The SUMMARY section must be followed by SCHEDULE instead of "+curKeywordName; - deck.getMessageContainer().warning(msg, curKeyword.getFileName(), curKeyword.getLineNumber()); - deckValid = false; - } - - curSectionName = curKeywordName; - } - else if (curSectionName == "SCHEDULE") { - // schedule is the last section, so every section delimiter after it is wrong... - std::string msg = - "The SCHEDULE section must be the last one (" - +curKeywordName+" specified after SCHEDULE)"; - deck.getMessageContainer().warning(msg, curKeyword.getFileName(), curKeyword.getLineNumber()); - deckValid = false; - } - } - - // SCHEDULE is the last section and it is mandatory, so make sure it is there - if (curSectionName != "SCHEDULE") { - const auto& curKeyword = deck.getKeyword(deck.size() - 1); - std::string msg = - "The last section of a valid deck must be SCHEDULE (is "+curSectionName+")"; - deck.getMessageContainer().warning(msg, curKeyword.getFileName(), curKeyword.getLineNumber()); - deckValid = false; - } - - return deckValid; - } - -} // namespace Opm diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/Parser.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/Parser.hpp deleted file mode 100644 index 8bbfc39409..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/Parser.hpp +++ /dev/null @@ -1,139 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef OPM_PARSER_HPP -#define OPM_PARSER_HPP - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -namespace Json { - class JsonObject; -} - -namespace Opm { - - class Deck; - class ParseContext; - class RawKeyword; - - /// The hub of the parsing process. - /// An input file in the eclipse data format is specified, several steps of parsing is performed - /// and the semantically parsed result is returned. - - class Parser { - public: - Parser(bool addDefault = true); - - static std::string stripComments(const std::string& inputString); - - /// The starting point of the parsing process. The supplied file is parsed, and the resulting Deck is returned. - std::shared_ptr< Deck > parseFile(const std::string &dataFile, const ParseContext& parseContext) const; - std::shared_ptr< Deck > parseString(const std::string &data, const ParseContext& parseContext) const; - std::shared_ptr< Deck > parseStream(std::unique_ptr&& inputStream , const ParseContext& parseContext) const; - - Deck * newDeckFromFile(const std::string &dataFileName, const ParseContext& parseContext) const; - Deck * newDeckFromString(const std::string &dataFileName, const ParseContext& parseContext) const; - - std::shared_ptr< Deck > parseFile(const std::string &dataFile, bool strict = true) const; - std::shared_ptr< Deck > parseString(const std::string &data, bool strict = true) const; - - /// Method to add ParserKeyword instances, these holding type and size information about the keywords and their data. - void addParserKeyword(const Json::JsonObject& jsonKeyword); - void addParserKeyword(std::unique_ptr< const ParserKeyword >&& parserKeyword); - - /*! - * \brief Returns whether the parser knows about a keyword - */ - bool hasKeyword( const std::string& ) const; - const ParserKeyword* getKeyword(const std::string& name) const; - - bool isRecognizedKeyword( const string_view& deckKeywordName) const; - const ParserKeyword* getParserKeywordFromDeckName(const string_view& deckKeywordName) const; - std::vector getAllDeckNames () const; - - void loadKeywords(const Json::JsonObject& jsonKeywords); - bool loadKeywordFromFile(const boost::filesystem::path& configFile); - - void loadKeywordsFromDirectory(const boost::filesystem::path& directory , bool recursive = true); - void applyUnitsToDeck(Deck& deck) const; - - /*! - * \brief Returns the approximate number of recognized keywords in decks - * - * This is an approximate number because regular expresions are disconsidered. - */ - size_t size() const; - - template - void addKeyword() { - addParserKeyword( std::unique_ptr< ParserKeyword >( new T ) ); - } - - static EclipseState parse(const Deck& deck, const ParseContext& context = ParseContext()); - static EclipseState parse(const std::string &filename, const ParseContext& context = ParseContext()); - static EclipseState parseData(const std::string &data, const ParseContext& context = ParseContext()); - - /// Parses the deck specified in filename. If context contains ParseContext::PARSE_PARTIAL_DECK, - /// we construct only a lean grid, otherwise, we construct a full EclipseState and return the - /// fully constructed InputGrid - static std::shared_ptr parseGrid(const std::string &filename, - const ParseContext& context = ParseContext()); - - /// Parses the provided deck. If context contains ParseContext::PARSE_PARTIAL_DECK, - /// we construct only a lean grid, otherwise, we construct a full EclipseState and return the - /// fully constructed InputGrid - static std::shared_ptr parseGrid(const Deck& deck, - const ParseContext& context = ParseContext()); - - /// Parses the provided deck string. If context contains ParseContext::PARSE_PARTIAL_DECK, - /// we construct only a lean grid, otherwise, we construct a full EclipseState and return the - /// fully constructed InputGrid - static std::shared_ptr parseGridData(const std::string &data, - const ParseContext& context = ParseContext()); - - private: - // associative map of the parser internal name and the corresponding ParserKeyword object - std::vector< std::unique_ptr< const ParserKeyword > > keyword_storage; - // associative map of deck names and the corresponding ParserKeyword object - std::map< string_view, const ParserKeyword* > m_deckParserKeywords; - // associative map of the parser internal names and the corresponding - // ParserKeyword object for keywords which match a regular expression - std::map< string_view, const ParserKeyword* > m_wildCardKeywords; - - bool hasWildCardKeyword(const std::string& keyword) const; - const ParserKeyword* matchingKeyword(const string_view& keyword) const; - - void addDefaultKeywords(); - }; - - - typedef std::shared_ptr ParserPtr; - typedef std::shared_ptr ParserConstPtr; -} // namespace Opm -#endif /* PARSER_H */ - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserConst.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserConst.hpp deleted file mode 100644 index a4a1d02a77..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserConst.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef PARSERCONST_H -#define PARSERCONST_H - - -namespace Opm { - namespace ParserConst { - const unsigned int maxKeywordLength = 8; - } -} - - - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserDoubleItem.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserDoubleItem.cpp deleted file mode 100644 index b1f726e43f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserDoubleItem.cpp +++ /dev/null @@ -1,160 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include - -#include - -#include -#include -#include - -#include -#include - -namespace Opm -{ - - ParserDoubleItem::ParserDoubleItem(const std::string& itemName, - ParserItemSizeEnum p_sizeType) : - ParserItem(itemName, p_sizeType) - { - // use NaN as 'default default'. (Keep in mind that in the deck it can be queried - // using deckItem->defaultApplied(idx) if an item was defaulted or not... - m_default = std::numeric_limits::quiet_NaN(); - } - - ParserDoubleItem::ParserDoubleItem(const std::string& itemName) - : ParserItem(itemName) - { - m_default = std::numeric_limits::quiet_NaN(); - m_defaultSet = false; - } - - - ParserDoubleItem::ParserDoubleItem(const std::string& itemName, double defaultValue) - : ParserItem(itemName) - { - setDefault( defaultValue ); - } - - - ParserDoubleItem::ParserDoubleItem(const std::string& itemName, ParserItemSizeEnum p_sizeType, double defaultValue) - : ParserItem(itemName, p_sizeType) - { - setDefault( defaultValue ); - } - - - double ParserDoubleItem::getDefault() const { - if (hasDefault()) - return m_default; - - if (sizeType() == Opm::ALL) - return std::numeric_limits::quiet_NaN(); - - throw std::invalid_argument("No default value available for item "+name()); - } - - - void ParserDoubleItem::setDefault(double defaultValue) { - m_default = defaultValue; - m_defaultSet = true; - } - - bool ParserDoubleItem::hasDefault() const { - return m_defaultSet; - } - - ParserDoubleItem::ParserDoubleItem(const Json::JsonObject& jsonConfig) : - ParserItem(jsonConfig) - { - m_default = std::numeric_limits::quiet_NaN(); - if (jsonConfig.has_item("default")) - setDefault( jsonConfig.get_double("default") ); - } - - bool ParserDoubleItem::equal(const ParserItem& other) const { - return parserRawItemEqual(other) && equalDimensions(other); - } - - - bool ParserDoubleItem::equalDimensions(const ParserItem& other) const { - bool equal_=false; - if (other.numDimensions() == numDimensions()) { - equal_ = true; - for (size_t idim=0; idim < numDimensions(); idim++) { - if (other.getDimension(idim) != getDimension(idim)) - equal_ = false; - } - } - return equal_; - } - - void ParserDoubleItem::push_backDimension(const std::string& dimension) { - if ((sizeType() == SINGLE) && (m_dimensions.size() > 0)) - throw std::invalid_argument("Internal error: cannot add more than one dimension to an item of size 1"); - - m_dimensions.push_back( dimension ); - } - - bool ParserDoubleItem::hasDimension() const { - return (m_dimensions.size() > 0); - } - - size_t ParserDoubleItem::numDimensions() const { - return m_dimensions.size(); - } - - const std::string& ParserDoubleItem::getDimension(size_t index) const { - if (index < m_dimensions.size()) - return m_dimensions[index]; - else - throw std::invalid_argument("Invalid index "); - } - - - DeckItem ParserDoubleItem::scan( RawRecord& rawRecord ) const { - return ParserItemScan(this , rawRecord); - } - - std::string ParserDoubleItem::createCode() const { - std::stringstream ss; - - ss << "new ParserDoubleItem(" << "\"" << name() << "\"" << ",Opm::" << ParserItemSizeEnum2String( sizeType() ); - if (m_defaultSet) - ss << "," << boost::lexical_cast(getDefault()); - ss << ")"; - - return ss.str(); - } - - - - void ParserDoubleItem::inlineClass(std::ostream& os, const std::string& indent) const { - ParserItemInlineClassDeclaration(this , os , indent , "double"); - } - - std::string ParserDoubleItem::inlineClassInit(const std::string& parentClass) const { - return ParserItemInlineClassInit(this , parentClass , "double"); - } - - -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserDoubleItem.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserDoubleItem.hpp deleted file mode 100644 index 25b4a43773..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserDoubleItem.hpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef PARSERDOUBLEITEM_HPP -#define PARSERDOUBLEITEM_HPP - -#include - -#include -#include - -namespace Json { - class JsonObject; -} - -namespace Opm { - - class RawRecord; - - class ParserDoubleItem : public ParserItem { - public: - ParserDoubleItem(const std::string& itemName); - ParserDoubleItem(const std::string& itemName, ParserItemSizeEnum sizeType); - ParserDoubleItem(const std::string& itemName, double defaultValue); - ParserDoubleItem(const std::string& itemName, ParserItemSizeEnum sizeType, double defaultValue); - explicit ParserDoubleItem( const Json::JsonObject& jsonConfig); - - size_t numDimensions() const override; - bool hasDimension() const override; - void push_backDimension(const std::string& dimension) override; - const std::string& getDimension(size_t index) const override; - bool equalDimensions(const ParserItem& other) const; - - DeckItem scan( RawRecord& rawRecord ) const override; - bool equal(const ParserItem& other) const override; - - std::string createCode() const override; - void inlineClass(std::ostream& os, const std::string& indent) const override; - std::string inlineClassInit(const std::string& parentClass) const override; - void setDefault(double defaultValue); - double getDefault() const; - bool hasDefault() const; - - size_t dimensionSize() const; - - private: - double m_default; - std::vector m_dimensions; - }; - - typedef std::shared_ptr ParserDoubleItemConstPtr; - typedef std::shared_ptr ParserDoubleItemPtr; -} - -#endif /* PARSERINTITEM_HPP */ - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserEnums.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserEnums.cpp deleted file mode 100644 index 6c6949117a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserEnums.cpp +++ /dev/null @@ -1,156 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include - -#include - -namespace Opm { - - - - const std::string ParserItemSizeEnum2String(ParserItemSizeEnum enumValue) { - switch (enumValue) { - case ALL: - return "ALL"; - break; - case SINGLE: - return "SINGLE"; - break; - default: - throw std::invalid_argument("Implementation error - should NOT be here"); - } - } - - - ParserItemSizeEnum ParserItemSizeEnumFromString(const std::string& stringValue) { - if (stringValue == "ALL") - return ALL; - else if (stringValue == "SINGLE") - return SINGLE; - else - throw std::invalid_argument("String: " + stringValue + " can not be converted to enum value"); - } - - - /*****************************************************************/ - - const std::string ParserKeywordSizeEnum2String(ParserKeywordSizeEnum enumValue) { - switch (enumValue) { - case SLASH_TERMINATED: - return "SLASH_TERMINATED"; - break; - case FIXED: - return "FIXED"; - break; - case OTHER_KEYWORD_IN_DECK: - return "OTHER_KEYWORD_IN_DECK"; - break; - case UNKNOWN: - return "UNKNOWN"; - break; - default: - throw std::invalid_argument("Implementation error - should NOT be here"); - } - } - - - - ParserKeywordSizeEnum ParserKeywordSizeEnumFromString(const std::string& stringValue) { - if (stringValue == "SLASH_TERMINATED") - return SLASH_TERMINATED; - else if (stringValue == "FIXED") - return FIXED; - else if (stringValue == "OTHER_KEYWORD_IN_DECK") - return OTHER_KEYWORD_IN_DECK; - else if (stringValue == "UNKNOWN") - return UNKNOWN; - else - throw std::invalid_argument("String: " + stringValue + " can not be converted to enum value"); - } - - /*****************************************************************/ - - const std::string ParserValueTypeEnum2String(ParserValueTypeEnum enumValue) { - switch (enumValue) { - case INT: - return "INT"; - break; - case FLOAT: - return "FLOAT"; - break; - case STRING: - return "STRING"; - break; - default: - throw std::invalid_argument("Implementation error - should NOT be here"); - } - } - - - ParserValueTypeEnum ParserValueTypeEnumFromString(const std::string& stringValue) { - if (stringValue == "INT") - return INT; - else if (stringValue == "FLOAT") - return FLOAT; - else if (stringValue == "DOUBLE") - return DOUBLE; - else if (stringValue == "STRING") - return STRING; - else - throw std::invalid_argument("String: " + stringValue + " can not be converted to enum value"); - } - - /*****************************************************************/ - - const std::string ParserKeywordActionEnum2String(ParserKeywordActionEnum enumValue) { - switch (enumValue) { - case INTERNALIZE: - return "INTERNALIZE"; - break; - case IGNORE: - return "IGNORE"; - break; - case THROW_EXCEPTION: - return "THROW_EXCEPTION"; - break; - case IGNORE_WARNING: - return "IGNORE_WARNING"; - break; - default: - throw std::invalid_argument("Implementation error - should NOT be here"); - } - } - - ParserKeywordActionEnum ParserKeywordActionEnumFromString(const std::string& stringValue) { - if (stringValue == "INTERNALIZE") - return INTERNALIZE; - else if (stringValue == "IGNORE") - return IGNORE; - else if (stringValue == "THROW_EXCEPTION") - return THROW_EXCEPTION; - else if (stringValue == "IGNORE_WARNING") - return IGNORE_WARNING; - else - throw std::invalid_argument("String: " + stringValue + " can not be converted to enum value"); - } - - - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserEnums.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserEnums.hpp deleted file mode 100644 index 90ed4b5d06..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserEnums.hpp +++ /dev/null @@ -1,69 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef PARSER_ENUMS_H -#define PARSER_ENUMS_H - -#include - -namespace Opm { - - enum ParserKeywordSizeEnum { - SLASH_TERMINATED = 0, - FIXED = 1, - OTHER_KEYWORD_IN_DECK = 2, - UNKNOWN=3 - }; - - - - enum ParserItemSizeEnum { - ALL = 0, - SINGLE = 1 - }; - - - - enum ParserValueTypeEnum { - INT = 0, - FLOAT = 1, - STRING = 2, - DOUBLE = 3 - }; - - - enum ParserKeywordActionEnum { - INTERNALIZE = 0, - IGNORE = 1, - IGNORE_WARNING = 2, - THROW_EXCEPTION = 3 - }; - - const std::string ParserKeywordActionEnum2String(ParserKeywordActionEnum enumValue); - const std::string ParserItemSizeEnum2String(ParserItemSizeEnum enumValue); - const std::string ParserKeywordSizeEnum2String(ParserKeywordSizeEnum enumValue); - const std::string ParserValueTypeEnum2String(ParserValueTypeEnum enumValue); - - ParserItemSizeEnum ParserItemSizeEnumFromString(const std::string& stringValue); - ParserKeywordSizeEnum ParserKeywordSizeEnumFromString(const std::string& stringValue); - ParserValueTypeEnum ParserValueTypeEnumFromString(const std::string& stringValue); - ParserKeywordActionEnum ParserKeywordActionEnumFromString(const std::string& stringValue); -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserIntItem.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserIntItem.cpp deleted file mode 100644 index 24ff1ec666..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserIntItem.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/* - - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include - -#include - -#include -#include -#include -#include - -namespace Opm { - - - ParserIntItem::ParserIntItem(const std::string& itemName) : ParserItem(itemName) - { - // integers do not have a representation for NaN. Let's use a negative value as - // this is usually meaningless. (Keep in mind that in the deck it can be queried - // using deckItem->defaultApplied(idx) if an item was defaulted or not... - m_default = -1; - m_defaultSet = false; - } - - ParserIntItem::ParserIntItem(const std::string& itemName, ParserItemSizeEnum p_sizeType) - : ParserItem(itemName, p_sizeType) - { - m_default = -1; - m_defaultSet = false; - } - - ParserIntItem::ParserIntItem(const std::string& itemName, int defaultValue) : ParserItem(itemName) - { - setDefault(defaultValue); - } - - - ParserIntItem::ParserIntItem(const std::string& itemName, ParserItemSizeEnum sizeType_, int defaultValue) : ParserItem(itemName, sizeType_) - { - setDefault(defaultValue); - } - - ParserIntItem::ParserIntItem(const Json::JsonObject& jsonConfig) : ParserItem(jsonConfig) - { - m_default = -1; - if (jsonConfig.has_item("default")) - setDefault( jsonConfig.get_int("default") ); - } - - - void ParserIntItem::setDefault(int defaultValue) { - if (sizeType() == ALL) - throw std::invalid_argument("The size type ALL can not be combined with an explicit default value"); - m_defaultSet = true; - m_default = defaultValue; - } - - int ParserIntItem::getDefault() const { - if (hasDefault()) - return m_default; - - if (sizeType() == Opm::ALL) - return -1; - - throw std::invalid_argument("No default value available for item "+name()); - } - - bool ParserIntItem::hasDefault() const { - return m_defaultSet; - } - - DeckItem ParserIntItem::scan( RawRecord& rawRecord) const { - return ParserItemScan(this , rawRecord); - } - - - bool ParserIntItem::equal(const ParserItem& other) const - { - return parserRawItemEqual(other); - } - - - std::string ParserIntItem::createCode() const { - std::stringstream ss; - - ss << "new ParserIntItem(" << "\"" << name() << "\"" << ",Opm::" << ParserItemSizeEnum2String( sizeType() ); - if (m_defaultSet) - ss << "," << getDefault(); - ss << ")"; - - return ss.str(); - } - - - - void ParserIntItem::inlineClass(std::ostream& os, const std::string& indent) const { - ParserItemInlineClassDeclaration(this , os , indent , "int"); - } - - - std::string ParserIntItem::inlineClassInit(const std::string& parentClass) const { - return ParserItemInlineClassInit(this , parentClass , "int"); - } - - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserIntItem.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserIntItem.hpp deleted file mode 100644 index 076abbcb18..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserIntItem.hpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - -#ifndef PARSERINTITEM_HPP -#define PARSERINTITEM_HPP - -#include - -#include -#include -#include - -namespace Json { - class JsonObject; -} - -namespace Opm { - - class RawRecord; - - class ParserIntItem : public ParserItem { - public: - ParserIntItem(const std::string& itemName); - ParserIntItem(const std::string& itemName, ParserItemSizeEnum sizeType); - ParserIntItem(const std::string& itemName, int defaultValue); - ParserIntItem(const std::string& itemName, ParserItemSizeEnum sizeType, int defaultValue); - explicit ParserIntItem(const Json::JsonObject& jsonConfig); - - DeckItem scan( RawRecord& rawRecord) const override; - bool equal(const ParserItem& other) const override; - - std::string createCode() const override; - void inlineClass(std::ostream& os, const std::string& indent) const override; - std::string inlineClassInit(const std::string& parentClass) const override; - - int getDefault() const; - bool hasDefault() const; - void setDefault(int defaultValue); - private: - int m_default; - }; - - typedef std::shared_ptr< ParserIntItem > ParserIntItemPtr; - typedef std::shared_ptr< const ParserIntItem > ParserIntItemConstPtr; -} - -#endif /* PARSERINTITEM_HPP */ - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserItem.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserItem.cpp deleted file mode 100644 index 78b10c48a3..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserItem.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include - -#include -#include - - -namespace Opm { - - ParserItem::ParserItem(const std::string& itemName, ParserItemSizeEnum p_sizeType) { - m_name.assign(itemName); - m_sizeType = p_sizeType; - m_defaultSet = false; - m_description = ""; - } - - - ParserItem::ParserItem(const std::string& itemName) { - m_name.assign(itemName); - m_sizeType = SINGLE; - m_defaultSet = false; - m_description = ""; - } - - bool ParserItem::hasDimension() const { - return false; - } - - size_t ParserItem::numDimensions() const { - return 0; - } - - const std::string& ParserItem::getDimension(size_t /* index */) const { - throw std::invalid_argument("Should not call this ... \n"); - } - - void ParserItem::push_backDimension(const std::string& /* dimension */) { - throw std::invalid_argument("Should not call this ... \n"); - } - - ParserItem::ParserItem(const Json::JsonObject& jsonConfig) { - if (jsonConfig.has_item("name")) - m_name = jsonConfig.get_string("name"); - else - throw std::invalid_argument("Json config object missing \"name\": ... item"); - - if (jsonConfig.has_item("size_type")) { - const std::string sizeTypeString = jsonConfig.get_string("size_type"); - m_sizeType = ParserItemSizeEnumFromString( sizeTypeString ); - } else - m_sizeType = SINGLE; - - if (jsonConfig.has_item("description")) { - m_description = jsonConfig.get_string("description"); - } - - m_defaultSet = false; - } - - const std::string& ParserItem::name() const { - return m_name; - } - - const std::string ParserItem::className() const { - return m_name; - } - - - - ParserItemSizeEnum ParserItem::sizeType() const { - return m_sizeType; - } - - bool ParserItem::scalar() const { - if (m_sizeType == SINGLE) - return true; - else - return false; - } - - std::string ParserItem::getDescription() const { - return m_description; - } - - void ParserItem::setDescription(std::string description) { - m_description = description; - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserItem.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserItem.hpp deleted file mode 100644 index d2a5f094ef..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserItem.hpp +++ /dev/null @@ -1,228 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef PARSER_ITEM_H -#define PARSER_ITEM_H - -#include -#include -#include -#include - -#include - -#include -#include -#include -#include - -namespace Json { - class JsonObject; -} - -namespace Opm { - - class ParserItem { - public: - ParserItem(const std::string& itemName); - ParserItem(const std::string& itemName, ParserItemSizeEnum sizeType); - explicit ParserItem(const Json::JsonObject& jsonConfig); - - virtual void push_backDimension(const std::string& dimension); - virtual const std::string& getDimension(size_t index) const; - virtual DeckItem scan( RawRecord& rawRecord) const = 0; - virtual bool hasDimension() const; - virtual size_t numDimensions() const; - const std::string className() const; - const std::string& name() const; - ParserItemSizeEnum sizeType() const; - std::string getDescription() const; - bool scalar() const; - void setDescription(std::string helpText); - - virtual std::string createCode() const = 0; - virtual void inlineClass(std::ostream& /* os */ , const std::string& indent) const = 0; - virtual std::string inlineClassInit(const std::string& parentClass) const = 0; - - virtual ~ParserItem() { - } - - virtual bool equal(const ParserItem& other) const = 0; - - protected: - template - bool parserRawItemEqual(const ParserItem &other) const { - const T * lhs = dynamic_cast(this); - const T * rhs = dynamic_cast(&other); - if (!lhs || !rhs) - return false; - - if (lhs->name() != rhs->name()) - return false; - - if (lhs->getDescription() != rhs->getDescription()) - return false; - - if (lhs->sizeType() != rhs->sizeType()) - return false; - - if (lhs->m_defaultSet != rhs->m_defaultSet) - return false; - - // we only care that the default value is equal if it was - // specified... - if (lhs->m_defaultSet && lhs->getDefault() != rhs->getDefault()) - return false; - - return true; - } - - bool m_defaultSet; - - private: - std::string m_name; - ParserItemSizeEnum m_sizeType; - std::string m_description; - }; - - typedef std::shared_ptr ParserItemPtr; - typedef std::shared_ptr ParserItemConstPtr; - - - - template - void ParserItemInlineClassDeclaration(const ParserItemType * self , std::ostream& os, const std::string& indent , const std::string& typeString) { - os << indent << "class " << self->className( ) << " {" << std::endl; - os << indent << "public:" << std::endl; - { - std::string local_indent = indent + " "; - os << local_indent << "static const std::string itemName;" << std::endl; - if (self->hasDefault()) - os << local_indent << "static const " << typeString << " defaultValue;" << std::endl; - } - os << indent << "};" << std::endl; - } - - - template - std::string ParserItemInlineClassInit(const ParserItemType * self , - const std::string& parentClass , - const std::string& typeString , - const std::string * defaultValue = NULL) { - - std::stringstream ss; - ss << "const std::string " << parentClass << "::" << self->className() << "::itemName = \"" << self->name() << "\";" << std::endl; - - if (self->hasDefault()) { - if (defaultValue) - ss << "const " << typeString << " " << parentClass << "::" << self->className() << "::defaultValue = " << *defaultValue << ";" << std::endl; - else - ss << "const " << typeString << " " << parentClass << "::" << self->className() << "::defaultValue = " << self->getDefault() << ";" << std::endl; - } - - return ss.str(); - } - - - - - - /// Scans the rawRecords data according to the ParserItems definition. - /// returns a DeckItem object. - /// NOTE: data are popped from the rawRecords deque! - template - DeckItem ParserItemScan(const ParserItemType * self, RawRecord& rawRecord ) { - auto deckItem = DeckItem::make< ValueType >( self->name(), rawRecord.size() ); - - if (self->sizeType() == ALL) { - while (rawRecord.size() > 0) { - auto token = rawRecord.pop_front(); - - std::string countString; - std::string valueString; - if (isStarToken(token, countString, valueString)) { - StarToken st(token, countString, valueString); - ValueType value; - - if (st.hasValue()) { - value = readValueToken(st.valueString()); - deckItem.push_back( value , st.count()); - } else { - value = self->getDefault(); - for (size_t i=0; i < st.count(); i++) - deckItem.push_backDefault( value ); - } - } else { - deckItem.push_back( readValueToken( token ) ); - } - } - } else { - if (rawRecord.size() == 0) { - // if the record was ended prematurely, - if (self->hasDefault()) { - // use the default value for the item, if there is one... - deckItem.push_backDefault( self->getDefault() ); - } else { - // ... otherwise indicate that the deck item should throw once the - // item's data is accessed. - deckItem.push_backDummyDefault(); - } - } else { - // The '*' should be interpreted as a repetition indicator, but it must - // be preceeded by an integer... - auto token = rawRecord.pop_front(); - std::string countString; - std::string valueString; - if (isStarToken(token, countString, valueString)) { - StarToken st(token, countString, valueString); - - if (!st.hasValue()) { - if (self->hasDefault()) - deckItem.push_backDefault( self->getDefault() ); - else - deckItem.push_backDummyDefault(); - } else - deckItem.push_back(readValueToken(st.valueString())); - - const auto value_start = token.size() - valueString.size(); - // replace the first occurence of "N*FOO" by a sequence of N-1 times - // "FOO". this is slightly hacky, but it makes it work if the - // number of defaults pass item boundaries... - // We can safely make a string_view of one_star because it - // has static storage - static const char* one_star = "1*"; - string_view rep = !st.hasValue() - ? string_view{ one_star } - : string_view{ token.begin() + value_start, token.end() }; - - rawRecord.prepend( st.count() - 1, rep ); - } else { - deckItem.push_back( readValueToken( token ) ); - } - } - } - - return deckItem; - } - - - -} - -#endif - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserKeyword.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserKeyword.cpp deleted file mode 100644 index cfa07079d8..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserKeyword.cpp +++ /dev/null @@ -1,731 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace Opm { - - void ParserKeyword::setSizeType( ParserKeywordSizeEnum sizeType ) { - m_keywordSizeType = sizeType; - } - - void ParserKeyword::setFixedSize( size_t keywordSize) { - m_keywordSizeType = FIXED; - m_fixedSize = keywordSize; - } - - void ParserKeyword::setTableCollection(bool _isTableCollection) { - m_isTableCollection = _isTableCollection; - } - - - void ParserKeyword::commonInit(const std::string& name, ParserKeywordSizeEnum sizeType) { - m_isTableCollection = false; - m_name = name; - m_keywordSizeType = sizeType; - m_Description = ""; - m_fixedSize = 0; - - m_deckNames.insert(m_name); - } - - ParserKeyword::ParserKeyword(const std::string& name) { - commonInit(name, FIXED); - } - - - ParserKeyword::ParserKeyword(const std::string& name, const std::string& sizeKeyword, const std::string& sizeItem, bool _isTableCollection) - { - commonInit( name , OTHER_KEYWORD_IN_DECK); - m_isTableCollection = _isTableCollection; - initSizeKeyword(sizeKeyword, sizeItem); - } - - void ParserKeyword::clearDeckNames() { - m_deckNames.clear(); - } - - void ParserKeyword::addDeckName( const std::string& deckName ) { - m_deckNames.insert(deckName); - } - - bool ParserKeyword::hasDimension() const { - for( const auto& record : m_records ) - if( record->hasDimension() ) return true; - - return false; - } - - - bool ParserKeyword::isTableCollection() const { - return m_isTableCollection; - } - - std::string ParserKeyword::getDescription() const { - return m_Description; - } - - void ParserKeyword::setDescription(const std::string& description) { - m_Description = description; - } - - void ParserKeyword::initSize(const Json::JsonObject& jsonConfig) { - // The number of record has been set explicitly with the size: keyword - if (jsonConfig.has_item("size")) { - Json::JsonObject sizeObject = jsonConfig.get_item("size"); - - if (sizeObject.is_number()) { - m_fixedSize = (size_t) sizeObject.as_int(); - m_keywordSizeType = FIXED; - } else - initSizeKeyword(sizeObject); - - } else { - if (jsonConfig.has_item("num_tables")) { - Json::JsonObject numTablesObject = jsonConfig.get_item("num_tables"); - - if (!numTablesObject.is_object()) - throw std::invalid_argument("The num_tables key must point to a {} object"); - - initSizeKeyword(numTablesObject); - m_isTableCollection = true; - } else { - if (jsonConfig.has_item("items") || jsonConfig.has_item("records")) - // The number of records is undetermined - the keyword will be '/' terminated. - m_keywordSizeType = SLASH_TERMINATED; - else { - m_keywordSizeType = FIXED; - if (jsonConfig.has_item("data")) - m_fixedSize = 1; - else - m_fixedSize = 0; - } - } - } - } - - ParserKeyword::ParserKeyword(const Json::JsonObject& jsonConfig) { - - if (jsonConfig.has_item("name")) { - ParserKeywordSizeEnum sizeType = UNKNOWN; - commonInit(jsonConfig.get_string("name"), sizeType); - } else - throw std::invalid_argument("Json object is missing the 'name' property"); - - if (jsonConfig.has_item("deck_names") || jsonConfig.has_item("deck_name_regex") ) - // if either the deck names or the regular expression for deck names are - // explicitly specified, we do not implicitly add the contents of the 'name' - // item to the deck names... - clearDeckNames(); - - initSize(jsonConfig); - initDeckNames(jsonConfig); - initSectionNames(jsonConfig); - initMatchRegex(jsonConfig); - - if (jsonConfig.has_item("items") && jsonConfig.has_item("records")) - throw std::invalid_argument("Fatal error in " + getName() + " configuration. Can NOT have both records: and items:"); - - if (jsonConfig.has_item("items")) { - const Json::JsonObject itemsConfig = jsonConfig.get_item("items"); - addItems(itemsConfig); - } - - if (jsonConfig.has_item("records")) { - const Json::JsonObject recordsConfig = jsonConfig.get_item("records"); - if (recordsConfig.is_array()) { - size_t num_records = recordsConfig.size(); - for (size_t i = 0; i < num_records; i++) { - const Json::JsonObject itemsConfig = recordsConfig.get_array_item(i); - addItems(itemsConfig); - } - } else - throw std::invalid_argument("The records item must point to an array item"); - } - - if (jsonConfig.has_item("data")) - initData(jsonConfig); - - if (jsonConfig.has_item("description")) { - m_Description = jsonConfig.get_string("description"); - } - - } - - - - void ParserKeyword::initSizeKeyword(const std::string& sizeKeyword, const std::string& sizeItem) { - m_sizeDefinitionPair = std::pair(sizeKeyword, sizeItem); - m_keywordSizeType = OTHER_KEYWORD_IN_DECK; - } - - void ParserKeyword::initSizeKeyword(const Json::JsonObject& sizeObject) { - if (sizeObject.is_object()) { - std::string sizeKeyword = sizeObject.get_string("keyword"); - std::string sizeItem = sizeObject.get_string("item"); - initSizeKeyword(sizeKeyword, sizeItem); - } else { - m_keywordSizeType = ParserKeywordSizeEnumFromString( sizeObject.as_string() ); - } - } - - - bool ParserKeyword::validNameStart( const string_view& name) { - if (name.length() > ParserConst::maxKeywordLength) - return false; - - if (!isalpha(name[0])) - return false; - - return true; - } - - bool ParserKeyword::validInternalName( const std::string& name ) { - if( name.length() < 2 ) return false; - if( !std::isalpha( name[0] ) ) return false; - - const auto ok = []( char c ) { return std::isalnum( c ) || c == '_'; }; - - return std::all_of( name.begin() + 1, name.end(), ok ); - } - - string_view ParserKeyword::getDeckName( const string_view& str ) { - - auto first_sep = std::find_if( str.begin(), str.end(), RawConsts::is_separator() ); - - // only look at the first 8 characters (at most) - if( std::distance( str.begin(), first_sep ) < 9 ) - return { str.begin(), first_sep }; - - return { str.begin(), str.begin() + 9 }; - } - - bool ParserKeyword::validDeckName( const string_view& name) { - - if( !validNameStart( name ) ) - return false; - - const auto valid = []( char c ) { - return std::isalnum( c ) || c == '-' || c == '_' || c == '+'; - }; - - return std::all_of( name.begin() + 1, name.end(), valid ); - } - - bool ParserKeyword::hasMultipleDeckNames() const { - return m_deckNames.size() > 1; - } - - void ParserKeyword::initDeckNames(const Json::JsonObject& jsonObject) { - if (!jsonObject.has_item("deck_names")) - return; - - const Json::JsonObject namesObject = jsonObject.get_item("deck_names"); - if (!namesObject.is_array()) - throw std::invalid_argument("The 'deck_names' JSON item of keyword "+m_name+" needs to be a list"); - - if (namesObject.size() > 0) - m_deckNames.clear(); - - for (size_t nameIdx = 0; nameIdx < namesObject.size(); ++ nameIdx) { - const Json::JsonObject nameObject = namesObject.get_array_item(nameIdx); - - if (!nameObject.is_string()) - throw std::invalid_argument("The sub-items of 'deck_names' of keyword "+m_name+" need to be strings"); - - addDeckName(nameObject.as_string()); - } - } - - void ParserKeyword::initSectionNames(const Json::JsonObject& jsonObject) { - if (!jsonObject.has_item("sections")) - throw std::invalid_argument("The 'sections' JSON item of keyword "+m_name+" needs to be defined"); - - const Json::JsonObject namesObject = jsonObject.get_item("sections"); - - if (!namesObject.is_array()) - throw std::invalid_argument("The 'sections' JSON item of keyword "+m_name+" needs to be a list"); - - m_validSectionNames.clear(); - for (size_t nameIdx = 0; nameIdx < namesObject.size(); ++ nameIdx) { - const Json::JsonObject nameObject = namesObject.get_array_item(nameIdx); - - if (!nameObject.is_string()) - throw std::invalid_argument("The sub-items of 'sections' of keyword "+m_name+" need to be strings"); - - addValidSectionName(nameObject.as_string()); - } - } - - void ParserKeyword::initMatchRegex(const Json::JsonObject& jsonObject) { - if (!jsonObject.has_item("deck_name_regex")) - return; - - const Json::JsonObject regexStringObject = jsonObject.get_item("deck_name_regex"); - if (!regexStringObject.is_string()) - throw std::invalid_argument("The 'deck_name_regex' JSON item of keyword "+m_name+" need to be a string"); - - setMatchRegex(regexStringObject.as_string()); - } - - void ParserKeyword::addItems(const Json::JsonObject& itemsConfig) { - if (itemsConfig.is_array()) { - size_t num_items = itemsConfig.size(); - std::shared_ptr record = std::make_shared(); - - for (size_t i = 0; i < num_items; i++) { - const Json::JsonObject itemConfig = itemsConfig.get_array_item(i); - - if (itemConfig.has_item("value_type")) { - ParserValueTypeEnum valueType = ParserValueTypeEnumFromString(itemConfig.get_string("value_type")); - switch (valueType) { - case INT: - { - ParserIntItemConstPtr item = ParserIntItemConstPtr(new ParserIntItem(itemConfig)); - record->addItem( item ); - } - break; - case STRING: - { - ParserStringItemConstPtr item = ParserStringItemConstPtr(new ParserStringItem(itemConfig)); - record->addItem(item); - } - break; - case DOUBLE: - { - ParserDoubleItemPtr item = ParserDoubleItemPtr(new ParserDoubleItem(itemConfig)); - initDoubleItemDimension( item , itemConfig ); - record->addItem(item); - } - break; - default: - throw std::invalid_argument("While parsing "+getName()+": Values of type "+itemConfig.get_string("value_type")+" are not implemented."); - } - } else - throw std::invalid_argument("'value_type' JSON item missing for keyword "+getName()+"."); - } - addRecord(record); - } else - throw std::invalid_argument("The 'items' JSON item missing must be an array in keyword "+getName()+"."); - } - - void ParserKeyword::initDoubleItemDimension( ParserDoubleItemPtr item, const Json::JsonObject itemConfig) { - if (itemConfig.has_item("dimension")) { - const Json::JsonObject dimensionConfig = itemConfig.get_item("dimension"); - if (dimensionConfig.is_string()) - item->push_backDimension( dimensionConfig.as_string() ); - else if (dimensionConfig.is_array()) { - for (size_t idim = 0; idim < dimensionConfig.size(); idim++) { - Json::JsonObject dimObject = dimensionConfig.get_array_item( idim ); - item->push_backDimension( dimObject.as_string()); - } - } else - throw std::invalid_argument("The 'dimension' attribute of keyword "+getName()+" must be a string or a list of strings"); - } - } - - - - void ParserKeyword::initData(const Json::JsonObject& jsonConfig) { - m_fixedSize = 1U; - m_keywordSizeType = FIXED; - - const Json::JsonObject dataConfig = jsonConfig.get_item("data"); - if (dataConfig.has_item("value_type")) { - ParserValueTypeEnum valueType = ParserValueTypeEnumFromString(dataConfig.get_string("value_type")); - const std::string itemName("data"); - bool hasDefault = dataConfig.has_item("default"); - std::shared_ptr record = std::make_shared(); - - switch (valueType) { - case INT: - { - ParserIntItemPtr item = ParserIntItemPtr(new ParserIntItem(itemName, ALL)); - if (hasDefault) { - int defaultValue = dataConfig.get_int("default"); - item->setDefault(defaultValue); - } - record->addDataItem( item ); - } - break; - case STRING: - { - ParserStringItemPtr item = ParserStringItemPtr(new ParserStringItem(itemName, ALL)); - if (hasDefault) { - std::string defaultValue = dataConfig.get_string("default"); - item->setDefault(defaultValue); - } - record->addItem( item ); - } - break; - case DOUBLE: - { - ParserDoubleItemPtr item = ParserDoubleItemPtr(new ParserDoubleItem(itemName, ALL)); - if (hasDefault) { - double defaultValue = dataConfig.get_double("default"); - item->setDefault(defaultValue); - } - initDoubleItemDimension( item , dataConfig ); - record->addDataItem( item ); - } - break; - default: - throw std::invalid_argument("While initializing keyword "+getName()+": Values of type "+dataConfig.get_string("value_type")+" are not implemented."); - } - addDataRecord( record ); - } else - throw std::invalid_argument("The 'value_type' JSON item of keyword "+getName()+" is missing"); - } - - ParserRecordPtr ParserKeyword::getRecord(size_t recordIndex) const { - return m_records.get( recordIndex ); - } - - - std::vector::const_iterator ParserKeyword::recordBegin() const { - return m_records.begin(); - } - - std::vector::const_iterator ParserKeyword::recordEnd() const { - return m_records.end(); - } - - - - void ParserKeyword::addRecord(std::shared_ptr record) { - m_records.push_back( record ); - } - - - void ParserKeyword::addDataRecord(std::shared_ptr record) { - if ((m_keywordSizeType == FIXED) && (m_fixedSize == 1U)) - addRecord(record); - else - throw std::invalid_argument("When calling addDataRecord() for keyword " + getName() + ", it must be configured with fixed size == 1."); - } - - - const std::string ParserKeyword::className() const { - return getName(); - } - - const std::string& ParserKeyword::getName() const { - return m_name; - } - - void ParserKeyword::clearValidSectionNames() { - m_validSectionNames.clear(); - } - - void ParserKeyword::addValidSectionName( const std::string& sectionName ) { - m_validSectionNames.insert(sectionName); - } - - bool ParserKeyword::isValidSection(const std::string& sectionName) const { - return m_validSectionNames.size() == 0 || m_validSectionNames.count(sectionName) > 0; - } - - ParserKeyword::SectionNameSet::const_iterator ParserKeyword::validSectionNamesBegin() const { - return m_validSectionNames.begin(); - } - - ParserKeyword::SectionNameSet::const_iterator ParserKeyword::validSectionNamesEnd() const { - return m_validSectionNames.end(); - } - - ParserKeyword::DeckNameSet::const_iterator ParserKeyword::deckNamesBegin() const { - return m_deckNames.begin(); - } - - ParserKeyword::DeckNameSet::const_iterator ParserKeyword::deckNamesEnd() const { - return m_deckNames.end(); - } - - DeckKeyword ParserKeyword::parse(const ParseContext& parseContext , MessageContainer& msgContainer, RawKeywordPtr rawKeyword) const { - if( !rawKeyword->isFinished() ) - throw std::invalid_argument("Tried to create a deck keyword from an incomplete raw keyword " + rawKeyword->getKeywordName()); - - DeckKeyword keyword( rawKeyword->getKeywordName() ); - keyword.setLocation( rawKeyword->getFilename(), rawKeyword->getLineNR() ); - keyword.setDataKeyword( isDataKeyword() ); - - size_t record_nr = 0; - for( auto& rawRecord : *rawKeyword ) { - if( m_records.size() == 0 && rawRecord.size() > 0 ) - throw std::invalid_argument("Missing item information " + rawKeyword->getKeywordName()); - - keyword.addRecord( getRecord( record_nr )->parse( parseContext, msgContainer, rawRecord ) ); - record_nr++; - } - - return keyword; - } - - size_t ParserKeyword::getFixedSize() const { - if (!hasFixedSize()) - throw std::logic_error("The parser keyword "+getName()+" does not have a fixed size!"); - return m_fixedSize; - } - - bool ParserKeyword::hasFixedSize() const { - return m_keywordSizeType == FIXED; - } - - enum ParserKeywordSizeEnum ParserKeyword::getSizeType() const { - return m_keywordSizeType; - } - - const std::pair& ParserKeyword::getSizeDefinitionPair() const { - return m_sizeDefinitionPair; - } - - - bool ParserKeyword::isDataKeyword() const { - if (m_records.size() > 0) { - auto record = m_records.get(0); - return record->isDataRecord(); - } else - return false; - } - - - bool ParserKeyword::hasMatchRegex() const { - return !m_matchRegexString.empty(); - } - - void ParserKeyword::setMatchRegex(const std::string& deckNameRegexp) { - try { - m_matchRegex = boost::regex(deckNameRegexp); - m_matchRegexString = deckNameRegexp; - } - catch (const std::exception &e) { - std::cerr << "Warning: Malformed regular expression for keyword '" << getName() << "':\n" - << "\n" - << e.what() << "\n" - << "\n" - << "Ignoring expression!\n"; - } - } - - bool ParserKeyword::matches(const string_view& name ) const { - if (!validDeckName(name )) - return false; - - else if( m_deckNames.count( name.string() ) ) - return true; - - else if (hasMatchRegex()) { - return boost::regex_match( name.begin(), name.end(), m_matchRegex); - } - - return false; - } - - bool ParserKeyword::equal(const ParserKeyword& other) const { - // compare the deck names. we don't care about the ordering of the strings. - if (m_deckNames != other.m_deckNames) - return false; - - if( m_name != other.m_name - || m_matchRegexString != other.m_matchRegexString - || m_keywordSizeType != other.m_keywordSizeType - || isDataKeyword() != other.isDataKeyword() - || m_isTableCollection != other.m_isTableCollection ) - return false; - - switch( m_keywordSizeType ) { - case FIXED: - if( m_fixedSize != other.m_fixedSize ) - return false; - break; - - case OTHER_KEYWORD_IN_DECK: - if( m_sizeDefinitionPair.first != other.m_sizeDefinitionPair.first - || m_sizeDefinitionPair.second != other.m_sizeDefinitionPair.second ) - return false; - break; - - default: - break; - } - - for( size_t i = 0; i < m_records.size(); i++ ) { - if( !getRecord( i )->equal( *other.getRecord( i ) ) ) - return false; - } - - return true; - } - - - std::string ParserKeyword::createDeclaration(const std::string& indent) const { - std::stringstream ss; - ss << indent << "class " << className() << " : public ParserKeyword {" << std::endl; - ss << indent << "public:" << std::endl; - { - std::string local_indent = indent + " "; - ss << local_indent << className() << "();" << std::endl; - ss << local_indent << "static const std::string keywordName;" << std::endl; - if (m_records.size() > 0 ) { - for (auto iter = recordBegin(); iter != recordEnd(); ++iter) { - std::shared_ptr record = *iter; - for (size_t i = 0; i < record->size(); i++) { - ParserItemConstPtr item = record->get(i); - ss << std::endl; - item->inlineClass(ss , local_indent ); - } - } - } - } - ss << indent << "};" << std::endl << std::endl << std::endl; - return ss.str(); - } - - - std::string ParserKeyword::createDecl() const { - return className() + "::" + className() + "()"; - } - - - std::string ParserKeyword::createCode() const { - std::stringstream ss; - const std::string lhs = "keyword"; - const std::string indent = " "; - - ss << className() << "::" << className() << "( ) : ParserKeyword(\"" << m_name << "\") {" << std::endl; - { - const std::string sizeString(ParserKeywordSizeEnum2String(m_keywordSizeType)); - ss << indent; - switch (m_keywordSizeType) { - case SLASH_TERMINATED: - ss << "setSizeType(" << sizeString << ");" << std::endl; - break; - case UNKNOWN: - ss << "setSizeType(" << sizeString << ");" << std::endl; - break; - case FIXED: - ss << "setFixedSize( (size_t) " << m_fixedSize << ");" << std::endl; - break; - case OTHER_KEYWORD_IN_DECK: - ss << "setSizeType(" << sizeString << ");" << std::endl; - ss << indent << "initSizeKeyword(\"" << m_sizeDefinitionPair.first << "\",\"" << m_sizeDefinitionPair.second << "\");" << std::endl; - if (m_isTableCollection) - ss << "setTableCollection( true );" << std::endl; - break; - } - } - ss << indent << "setDescription(\"" << getDescription() << "\");" << std::endl; - - // add the valid sections for the keyword - ss << indent << "clearValidSectionNames();\n"; - for (auto sectionNameIt = m_validSectionNames.begin(); - sectionNameIt != m_validSectionNames.end(); - ++sectionNameIt) - { - ss << indent << "addValidSectionName(\"" << *sectionNameIt << "\");" << std::endl; - } - - // add the deck names - ss << indent << "clearDeckNames();\n"; - for (auto deckNameIt = m_deckNames.begin(); - deckNameIt != m_deckNames.end(); - ++deckNameIt) - { - ss << indent << "addDeckName(\"" << *deckNameIt << "\");" << std::endl; - } - - // set the deck name match regex - if (hasMatchRegex()) - ss << indent << "setMatchRegex(\"" << m_matchRegexString << "\");" << std::endl; - - { - if (m_records.size() > 0 ) { - for (auto iter = recordBegin(); iter != recordEnd(); ++iter) { - std::shared_ptr record = *iter; - const std::string local_indent = indent + " "; - ss << indent << "{" << std::endl; - ss << local_indent << "std::shared_ptr record = std::make_shared();" << std::endl; - for (size_t i = 0; i < record->size(); i++) { - ParserItemConstPtr item = record->get(i); - ss << local_indent << "{" << std::endl; - { - std::string indent3 = local_indent + " "; - ss << indent3 << "ParserItemPtr item(" << item->createCode() << ");" << std::endl; - ss << indent3 << "item->setDescription(\"" << item->getDescription() << "\");" << std::endl; - for (size_t idim=0; idim < item->numDimensions(); idim++) - ss << indent3 <<"item->push_backDimension(\"" << item->getDimension( idim ) << "\");" << std::endl; - { - std::string addItemMethod = "addItem"; - if (isDataKeyword()) - addItemMethod = "addDataItem"; - - ss << indent3 << "record->" << addItemMethod << "(item);" << std::endl; - } - } - ss << local_indent << "}" << std::endl; - } - - if (record->isDataRecord()) - ss << local_indent << "addDataRecord( record );" << std::endl; - else - ss << local_indent << "addRecord( record );" << std::endl; - - ss << indent << "}" << std::endl; - } - } - } - ss << "}" << std::endl; - - ss << "const std::string " << className() << "::keywordName = \"" << getName() << "\";" << std::endl; - for (auto iter = recordBegin(); iter != recordEnd(); ++iter) { - std::shared_ptr record = *iter; - for (size_t i = 0; i < record->size(); i++) { - ParserItemConstPtr item = record->get(i); - ss << item->inlineClassInit(className()); - } - } - ss << std::endl; - return ss.str(); - } - - - void ParserKeyword::applyUnitsToDeck( Deck& deck, DeckKeyword& deckKeyword) const { - for (size_t index = 0; index < deckKeyword.size(); index++) { - std::shared_ptr parserRecord = getRecord(index); - auto& deckRecord = deckKeyword.getRecord(index); - parserRecord->applyUnitsToDeck( deck , deckRecord ); - } - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserKeyword.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserKeyword.hpp deleted file mode 100644 index 09660f877e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserKeyword.hpp +++ /dev/null @@ -1,136 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#ifndef PARSER_KEYWORD_H -#define PARSER_KEYWORD_H - -#include -#include -#include - -#include - -#include -#include - -namespace Json { - class JsonObject; -} - -namespace Opm { - class Deck; - class DeckKeyword; - class ParseContext; - class ParserDoubleItem; - class ParserRecord; - class RawKeyword; - class string_view; - class MessageContainer; - - class ParserKeyword { - public: - ParserKeyword(const std::string& name , - const std::string& sizeKeyword , - const std::string& sizeItem, - bool _isTableCollection = false); - explicit ParserKeyword(const std::string& name); - explicit ParserKeyword(const Json::JsonObject& jsonConfig); - - void setFixedSize( size_t keywordSize); - void setSizeType( ParserKeywordSizeEnum sizeType ); - void setTableCollection(bool _isTableCollection); - void initSizeKeyword( const std::string& sizeKeyword, const std::string& sizeItem); - - - typedef std::set DeckNameSet; - typedef std::set SectionNameSet; - - - static string_view getDeckName(const string_view& rawString); - static bool validInternalName(const std::string& name); - static bool validDeckName(const string_view& name); - bool hasMatchRegex() const; - void setMatchRegex(const std::string& deckNameRegexp); - bool matches(const string_view& ) const; - bool hasDimension() const; - void addRecord(std::shared_ptr record); - void addDataRecord(std::shared_ptr record); - std::shared_ptr< ParserRecord > getRecord(size_t recordIndex) const; - std::vector>::const_iterator recordBegin() const; - std::vector>::const_iterator recordEnd() const; - const std::string className() const; - const std::string& getName() const; - size_t getFixedSize() const; - bool hasFixedSize() const; - bool isTableCollection() const; - std::string getDescription() const; - void setDescription(const std::string &description); - - bool hasMultipleDeckNames() const; - void clearDeckNames(); - void addDeckName( const std::string& deckName ); - DeckNameSet::const_iterator deckNamesBegin() const; - DeckNameSet::const_iterator deckNamesEnd() const; - - void clearValidSectionNames(); - void addValidSectionName(const std::string& sectionName); - bool isValidSection(const std::string& sectionName) const; - SectionNameSet::const_iterator validSectionNamesBegin() const; - SectionNameSet::const_iterator validSectionNamesEnd() const; - - DeckKeyword parse(const ParseContext& parseContext , MessageContainer& msgContainer, std::shared_ptr< RawKeyword > rawKeyword) const; - enum ParserKeywordSizeEnum getSizeType() const; - const std::pair& getSizeDefinitionPair() const; - bool isDataKeyword() const; - bool equal(const ParserKeyword& other) const; - - std::string createDeclaration(const std::string& indent) const; - std::string createDecl() const; - std::string createCode() const; - void applyUnitsToDeck( Deck& deck, DeckKeyword& deckKeyword) const; - private: - std::pair m_sizeDefinitionPair; - std::string m_name; - DeckNameSet m_deckNames; - DeckNameSet m_validSectionNames; - std::string m_matchRegexString; - boost::regex m_matchRegex; - RecordVector> m_records; - enum ParserKeywordSizeEnum m_keywordSizeType; - size_t m_fixedSize; - bool m_isTableCollection; - std::string m_Description; - - static bool validNameStart(const string_view& name); - void initDeckNames( const Json::JsonObject& jsonConfig ); - void initSectionNames( const Json::JsonObject& jsonConfig ); - void initMatchRegex( const Json::JsonObject& jsonObject ); - void initData( const Json::JsonObject& jsonConfig ); - void initSize( const Json::JsonObject& jsonConfig ); - void initSizeKeyword(const Json::JsonObject& sizeObject); - void commonInit(const std::string& name, ParserKeywordSizeEnum sizeType); - void addItems( const Json::JsonObject& jsonConfig); - void initDoubleItemDimension( std::shared_ptr< ParserDoubleItem > item, const Json::JsonObject itemConfig); - }; - - typedef std::shared_ptr ParserKeywordPtr; - typedef std::shared_ptr ParserKeywordConstPtr; - -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserRecord.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserRecord.cpp deleted file mode 100644 index 1ae319a060..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserRecord.cpp +++ /dev/null @@ -1,164 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include -#include -#include -#include -#include - -namespace Opm { - - ParserRecord::ParserRecord() - : m_dataRecord( false ) - { - } - - size_t ParserRecord::size() const { - return m_items.size(); - } - - void ParserRecord::addItem(ParserItemConstPtr item) { - if (m_dataRecord) - throw std::invalid_argument("Record is already marked as DataRecord - can not add items"); - - if (m_itemMap.find(item->name()) == m_itemMap.end()) { - m_items.push_back(item); - m_itemMap[item->name()] = item; - } else - throw std::invalid_argument("Itemname: " + item->name() + " already exists."); - } - - void ParserRecord::addDataItem(ParserItemConstPtr item) { - if (m_items.size() > 0) - throw std::invalid_argument("Record already contains items - can not add Data Item"); - - addItem(item); - m_dataRecord = true; - } - - - - std::vector::const_iterator ParserRecord::begin() const { - return m_items.begin(); - } - - - std::vector::const_iterator ParserRecord::end() const { - return m_items.end(); - } - - - bool ParserRecord::hasDimension() const { - bool hasDim = false; - for (auto iter=begin(); iter != end(); ++iter) { - if ((*iter)->hasDimension()) - hasDim = true; - } - return hasDim; - } - - - - void ParserRecord::applyUnitsToDeck( Deck& deck, DeckRecord& deckRecord ) const { - for (auto iter=begin(); iter != end(); ++iter) { - if ((*iter)->hasDimension()) { - auto& deckItem = deckRecord.getItem( (*iter)->name() ); - std::shared_ptr parserItem = get( (*iter)->name() ); - - for (size_t idim=0; idim < (*iter)->numDimensions(); idim++) { - std::shared_ptr activeDimension = deck.getActiveUnitSystem().getNewDimension( parserItem->getDimension(idim) ); - std::shared_ptr defaultDimension = deck.getDefaultUnitSystem().getNewDimension( parserItem->getDimension(idim) ); - deckItem.push_backDimension( activeDimension , defaultDimension ); - } - } - } - } - - - ParserItemConstPtr ParserRecord::get(size_t index) const { - if (index < m_items.size()) - return m_items[ index ]; - else - throw std::out_of_range("Out of range"); - } - - bool ParserRecord::hasItem(const std::string& itemName) const { - if (m_itemMap.find(itemName) == m_itemMap.end()) - return false; - else - return true; - } - - ParserItemConstPtr ParserRecord::get(const std::string& itemName) const { - if (m_itemMap.find(itemName) == m_itemMap.end()) - throw std::invalid_argument("Itemname: " + itemName + " does not exist."); - else { - std::map::const_iterator theItem = m_itemMap.find(itemName); - return (*theItem).second; - } - } - - DeckRecord ParserRecord::parse(const ParseContext& parseContext , MessageContainer& msgContainer, RawRecord& rawRecord ) const { - std::vector< DeckItem > items; - items.reserve( this->size() + 20 ); - for( const auto& parserItem : *this ) - items.emplace_back( parserItem->scan( rawRecord ) ); - - if (rawRecord.size() > 0) { - std::string msg = "The RawRecord for keyword \"" + rawRecord.getKeywordName() + "\" in file\"" + rawRecord.getFileName() + "\" contained " + - std::to_string(rawRecord.size()) + - " too many items according to the spec. RawRecord was: " + rawRecord.getRecordString(); - parseContext.handleError(ParseContext::PARSE_EXTRA_DATA , msgContainer, msg); - } - - return { std::move( items ) }; - } - - bool ParserRecord::equal(const ParserRecord& other) const { - bool equal_ = true; - if (size() == other.size()) { - size_t itemIndex = 0; - while (true) { - if (itemIndex == size()) - break; - { - ParserItemConstPtr item = get(itemIndex); - ParserItemConstPtr otherItem = other.get(itemIndex); - - if (!item->equal(*otherItem)) { - equal_ = false; - break; - } - } - itemIndex++; - } - } else - equal_ = false; - return equal_; - } - - bool ParserRecord::isDataRecord() const { - return m_dataRecord; - } - - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserRecord.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserRecord.hpp deleted file mode 100644 index cc21975cd5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserRecord.hpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef PARSERRECORD_HPP -#define PARSERRECORD_HPP - -#include -#include -#include - -namespace Opm { - - class Deck; - class DeckRecord; - class ParseContext; - class ParserItem; - class RawRecord; - class MessageContainer; - - class ParserRecord { - public: - ParserRecord(); - size_t size() const; - void addItem( std::shared_ptr< const ParserItem > item ); - void addDataItem(std::shared_ptr< const ParserItem > item); - std::shared_ptr< const ParserItem > get(size_t index) const; - std::shared_ptr< const ParserItem > get(const std::string& itemName) const; - DeckRecord parse( const ParseContext&, MessageContainer&, RawRecord& ) const; - bool isDataRecord() const; - bool equal(const ParserRecord& other) const; - bool hasDimension() const; - bool hasItem(const std::string& itemName) const; - void applyUnitsToDeck( Deck& deck, DeckRecord& deckRecord) const; - std::vector>::const_iterator begin() const; - std::vector>::const_iterator end() const; - private: - bool m_dataRecord; - std::vector> m_items; - std::map> m_itemMap; - }; - - typedef std::shared_ptr ParserRecordConstPtr; - typedef std::shared_ptr ParserRecordPtr; -} - - -#endif /* PARSERRECORD_HPP */ - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserStringItem.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserStringItem.cpp deleted file mode 100644 index 25b45ed991..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserStringItem.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include - -#include -#include -namespace Opm { - - ParserStringItem::ParserStringItem(const std::string& itemName) : ParserItem(itemName) - { - m_default = ""; - m_defaultSet = false; - } - - - ParserStringItem::ParserStringItem(const std::string& itemName, ParserItemSizeEnum sizeType_) : ParserItem(itemName, sizeType_) - { - m_default = ""; - m_defaultSet = false; - } - - ParserStringItem::ParserStringItem(const std::string& itemName, ParserItemSizeEnum sizeType_, const std::string& defaultValue) : ParserItem(itemName, sizeType_) { - setDefault(defaultValue); - } - - - ParserStringItem::ParserStringItem(const std::string& itemName, const std::string& defaultValue) : ParserItem(itemName) { - setDefault(defaultValue); - } - - - ParserStringItem::ParserStringItem(const Json::JsonObject& jsonConfig) : ParserItem(jsonConfig) { - m_default = ""; - if (jsonConfig.has_item("default")) - setDefault( jsonConfig.get_string("default") ); - } - - - - void ParserStringItem::setDefault(const std::string& defaultValue) { - if (sizeType() == ALL) - throw std::invalid_argument("The size type ALL can not be combined with an explicit default value"); - - m_default = defaultValue; - m_defaultSet = true; - } - - std::string ParserStringItem::getDefault() const { - if (hasDefault()) - return m_default; - - if (sizeType() == Opm::ALL) - return ""; - - throw std::invalid_argument("No default value available for item "+name()); - } - - bool ParserStringItem::hasDefault() const { - return m_defaultSet; - } - - DeckItem ParserStringItem::scan( RawRecord& rawRecord ) const { - return ParserItemScan(this , rawRecord); - } - - - - bool ParserStringItem::equal(const ParserItem& other) const - { - return parserRawItemEqual(other); - } - - std::string ParserStringItem::createCode() const { - std::stringstream ss; - - ss << "new ParserStringItem(" << "\"" << name() << "\"" << ",Opm::" << ParserItemSizeEnum2String( sizeType() ); - if (m_defaultSet) - ss << ",\"" << getDefault() << "\""; - ss << ")"; - - return ss.str(); - } - - - - - void ParserStringItem::inlineClass(std::ostream& os , const std::string& indent) const { - ParserItemInlineClassDeclaration(this , os , indent , "std::string"); - } - - - std::string ParserStringItem::inlineClassInit(const std::string& parentClass) const { - if (hasDefault()) { - std::string quotedDefault = "\"" + getDefault() + "\""; - return ParserItemInlineClassInit(this , parentClass , "std::string" , "edDefault); - } else - return ParserItemInlineClassInit(this , parentClass , "std::string"); - } - - - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserStringItem.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserStringItem.hpp deleted file mode 100644 index 4cab9057f3..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/ParserStringItem.hpp +++ /dev/null @@ -1,62 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - -#ifndef PARSERSTRINGITEM_HPP -#define PARSERSTRINGITEM_HPP - -#include - -#include -#include - -namespace Json { - class JsonObject; -} - -namespace Opm { - - class ParserStringItem : public ParserItem { - public: - ParserStringItem(const std::string& itemName); - ParserStringItem(const std::string& itemName, ParserItemSizeEnum sizeType); - ParserStringItem(const std::string& itemName, ParserItemSizeEnum sizeType, const std::string& defaultValue); - ParserStringItem(const std::string& itemName, const std::string& defaultValue); - explicit ParserStringItem( const Json::JsonObject& jsonConfig); - - bool equal(const ParserItem& other) const override; - DeckItem scan( RawRecord& rawRecord ) const override; - - std::string createCode() const override; - void inlineClass(std::ostream& os, const std::string& indent) const override; - std::string inlineClassInit(const std::string& parentClass) const override; - void setDefault(const std::string& defaultValue); - std::string getDefault() const; - bool hasDefault() const; - - private: - std::string m_default; - }; - - typedef std::shared_ptr ParserStringItemConstPtr; - typedef std::shared_ptr ParserStringItemPtr; -} - -#endif /* PARSERSTRINGITEM_HPP */ - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/createDefaultKeywordList.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/createDefaultKeywordList.cpp deleted file mode 100644 index 9a2addc7cb..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/createDefaultKeywordList.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ -#include - -#include -#include - - - -int main(int argc , char ** argv) { - if (argc == 7) { - const char * config_root = argv[1]; - const char * source_file_name = argv[2]; - const char * header_file_base_path = argv[3]; - const char * header_file_name = argv[4]; - const char * test_file_name = argv[5]; - const char * output_files = argv[6]; - bool verboseLoader = false; - bool verboseGenerator = true; - - Opm::KeywordLoader loader(verboseLoader); - Opm::KeywordGenerator generator(verboseGenerator); - loader.loadMultipleKeywordDirectories( config_root ); - - const int num_output_files = std::atoi( output_files ); - generator.updateSource(loader , source_file_name, num_output_files ); - generator.updateHeader(loader, header_file_base_path, header_file_name ); - generator.updateTest(loader , test_file_name ); - - exit(0); - } else { - std::cerr << "Error calling keyword generator: Expected arguments: " << std::endl; - exit(1); - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/tests/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/tests/CMakeLists.txt deleted file mode 100644 index 6c1a0cb589..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/tests/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -foreach(tapp ParserTests ParserKeywordTests ParserRecordTests - ParserItemTests ParserEnumTests ParserIncludeTests ParseContextTests MessageContainerTest) - opm_add_test(run${tapp} SOURCES ${tapp}.cpp - LIBRARIES opmparser ${Boost_LIBRARIES}) -endforeach() -if (NOT MSVC) - set_property(SOURCE ParserRecordTests.cpp PROPERTY COMPILE_FLAGS "-Wno-error") -endif() - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/tests/MessageContainerTest.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/tests/MessageContainerTest.cpp deleted file mode 100644 index 6811f6bc2b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/tests/MessageContainerTest.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - - -#define BOOST_TEST_MODULE MessageContainerTest - -#include - -#include - - -using namespace Opm; - -BOOST_AUTO_TEST_CASE(TestIterator) { - - MessageContainer msgContainer; - msgContainer.error("This is an error."); - msgContainer.bug("This is a bug.", "dummy.log", 20); - { - BOOST_CHECK_EQUAL("This is an error.", msgContainer.begin()->message); - BOOST_CHECK_EQUAL("dummy.log", (msgContainer.end()-1)->location.filename); - BOOST_CHECK_EQUAL(20U , (msgContainer.end()-1)->location.lineno); - } - - MessageContainer msgList; - msgList.debug("Debug"); - msgList.info("Info"); - msgList.warning("Warning"); - msgList.error("Error"); - msgList.problem("Problem"); - msgList.bug("Bug"); - msgList.note("Note"); - std::vector msgString = {"Debug", "Info", "Warning", "Error", "Problem", "Bug", "Note"}; - int i = 0; - for (const auto& msg : msgList) { - BOOST_CHECK_EQUAL(msg.message, msgString[i]); - i++; - } -} - -BOOST_AUTO_TEST_CASE(LocationImplicitConversion) { - MessageContainer mc; - mc.warning( "Warning" ); - mc.info( "Info", "filename", 10 ); - - BOOST_CHECK( !mc.begin()->location ); - BOOST_CHECK( (mc.begin() + 1)->location ); - BOOST_CHECK_THROW( mc.info( "msg", "filename", 0 ), std::invalid_argument ); -} - - -BOOST_AUTO_TEST_CASE(appendMessages) { - MessageContainer msgContainer; - MessageContainer msgList; - - msgContainer.error("Error: msgContainer."); - BOOST_CHECK_EQUAL(1U, msgContainer.size()); - - msgList.warning("Warning: msgList."); - msgContainer.appendMessages(msgList); - BOOST_CHECK_EQUAL(2U, msgContainer.size()); - - BOOST_CHECK_EQUAL("Error: msgContainer.", msgContainer.begin()->message); - BOOST_CHECK_EQUAL("Warning: msgList.", (msgContainer.end()-1)->message); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/tests/ParseContextTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/tests/ParseContextTests.cpp deleted file mode 100644 index ee1eb72e5e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/tests/ParseContextTests.cpp +++ /dev/null @@ -1,348 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include -#define BOOST_TEST_MODULE ParseContextTests -#include - - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -using namespace Opm; - - -BOOST_AUTO_TEST_CASE(TestUnkownKeyword) { - const char * deck1 = - "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /n" - "\n"; - - const char * deck2 = - "1rdomTX\n" - "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 /n" - "\n"; - - - ParseContext parseContext; - Parser parser(false); - - - parser.addKeyword(); - parseContext.update(ParseContext::PARSE_UNKNOWN_KEYWORD , InputError::THROW_EXCEPTION ); - BOOST_CHECK_THROW( parser.parseString( deck1 , parseContext ) , std::invalid_argument); - - parseContext.update(ParseContext::PARSE_UNKNOWN_KEYWORD , InputError::IGNORE ); - BOOST_CHECK_NO_THROW( parser.parseString( deck1 , parseContext ) ); - - parseContext.update(ParseContext::PARSE_UNKNOWN_KEYWORD , InputError::THROW_EXCEPTION ); - parseContext.update(ParseContext::PARSE_RANDOM_TEXT , InputError::IGNORE ); - BOOST_CHECK_THROW( parser.parseString( deck2 , parseContext ) , std::invalid_argument); - - parseContext.update(ParseContext::PARSE_UNKNOWN_KEYWORD , InputError::IGNORE ); - parseContext.update(ParseContext::PARSE_RANDOM_TEXT , InputError::IGNORE ); - BOOST_CHECK_NO_THROW( parser.parseString( deck2 , parseContext ) ); - - parseContext.update(ParseContext::PARSE_UNKNOWN_KEYWORD , InputError::IGNORE ); - parseContext.update(ParseContext::PARSE_RANDOM_TEXT , InputError::THROW_EXCEPTION ); - BOOST_CHECK_THROW( parser.parseString( deck2 , parseContext ) , std::invalid_argument); - - parseContext.update(ParseContext::PARSE_UNKNOWN_KEYWORD , InputError::IGNORE ); - parseContext.update(ParseContext::PARSE_RANDOM_TEXT , InputError::IGNORE ); - BOOST_CHECK_NO_THROW( parser.parseString( deck2 , parseContext ) ); -} - - -BOOST_AUTO_TEST_CASE(TEST_UNKNOWN_OPERATE) { - const char * deck = - "OPERATE\n" - "SWL 6* MULTX PERMX 1.E10 / Temp: SWL=1.E10*PERMX\n" - "SWL 6* MINLIM SWL 1.0 /\n" - "SWL 6* LOG10 SWL / Temp: SWL=log(1.E10*PERMX)\n" - "SWL 6* MULTA SWL -0.06 0.91 / Final: SWL=0.31-0.06*log(PERMX)\n" - "--SWCR 6* COPY SWL / SWCR=SWL\n" - "SWCR 6* MULTA SWL 1.0 0.0 / SWCR=SWL+0.0 (+0.3)\n" - "SWCR 6* MAXLIM SWCR 0.7 / max(SWCR)=0.7\n" - "SGU 6* MULTA SWL -1.0 1.0 / SGU=1-SWL\n" - "/\n"; - - ParseContext parseContext; - Parser parser(false); - - parseContext.update(ParseContext::PARSE_UNKNOWN_KEYWORD , InputError::THROW_EXCEPTION ); - BOOST_CHECK_THROW( parser.parseString( deck , parseContext ) , std::invalid_argument); - - parseContext.update(ParseContext::PARSE_RANDOM_SLASH , InputError::IGNORE ); - parseContext.update(ParseContext::PARSE_UNKNOWN_KEYWORD , InputError::IGNORE ); - parser.parseString( deck , parseContext ); - BOOST_CHECK_NO_THROW( parser.parseString( deck , parseContext ) ); - - parser.addKeyword(); - parser.parseString( deck , parseContext ); - parseContext.update(ParseContext::PARSE_RANDOM_SLASH , InputError::THROW_EXCEPTION ); - parseContext.update(ParseContext::PARSE_UNKNOWN_KEYWORD , InputError::THROW_EXCEPTION ); - BOOST_CHECK_NO_THROW( parser.parseString( deck , parseContext ) ); -} - - - - -BOOST_AUTO_TEST_CASE( CheckMissingSizeKeyword) { - const char * deck = - "SOLUTION\n" - "EQUIL\n" - " 10 10 10 10 / \n" - "\n"; - - - ParseContext parseContext; - Parser parser(false); - - parser.addKeyword(); - parser.addKeyword(); - parser.addKeyword(); - - parseContext.update( ParseContext::PARSE_MISSING_DIMS_KEYWORD , InputError::THROW_EXCEPTION ); - BOOST_CHECK_THROW( parser.parseString( deck , parseContext ) , std::invalid_argument); - - parseContext.update( ParseContext::PARSE_MISSING_DIMS_KEYWORD , InputError::IGNORE ); - BOOST_CHECK_NO_THROW( parser.parseString( deck , parseContext ) ); -} - - -BOOST_AUTO_TEST_CASE( CheckUnsupportedInSCHEDULE ) { - const char * deckStringUnSupported = - "START\n" - " 10 'JAN' 2000 /\n" - "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 / \n" - "GRID\n" - "DX\n" - "1000*0.25 /\n" - "DY\n" - "1000*0.25 /\n" - "DZ\n" - "1000*0.25 /\n" - "TOPS\n" - "100*0.25 /\n" - "SCHEDULE\n" - "MULTZ\n" - " 1000*0.10 /\n" - "\n"; - - const char * deckStringSupported = - "START\n" - " 10 'JAN' 2000 /\n" - "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 / \n" - "GRID\n" - "DX\n" - "1000*0.25 /\n" - "DY\n" - "1000*0.25 /\n" - "DZ\n" - "1000*0.25 /\n" - "TOPS\n" - "100*0.25 /\n" - "SCHEDULE\n" - "MULTFLT\n" - " 'F1' 0.10 /\n" - "/\n" - "\n"; - - - ParseContext parseContext; - Parser parser(true); - - auto deckSupported = parser.parseString( deckStringSupported , parseContext ); - auto deckUnSupported = parser.parseString( deckStringUnSupported , parseContext ); - EclipseGrid grid( deckSupported ); - - parseContext.update( ParseContext::UNSUPPORTED_SCHEDULE_GEO_MODIFIER , InputError::IGNORE ); - BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , deckSupported )); - BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , deckUnSupported )); - - parseContext.update( ParseContext::UNSUPPORTED_SCHEDULE_GEO_MODIFIER , InputError::THROW_EXCEPTION ); - BOOST_CHECK_THROW( Schedule( parseContext , grid , deckUnSupported ), std::invalid_argument ); - BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , deckSupported )); -} - - - -BOOST_AUTO_TEST_CASE(TestRandomSlash) { - const char * deck1 = - "SCHEDULE\n" - "TSTEP\n" - " 10 10 10 /\n" - "/\n"; - - const char * deck2 = - "SCHEDULE\n" - "TSTEP\n" - " 10 10 10 /\n" - " /\n"; - - - - ParseContext parseContext; - Parser parser(false); - - - parser.addKeyword(); - parser.addKeyword(); - - parseContext.update(ParseContext::PARSE_RANDOM_SLASH , InputError::THROW_EXCEPTION); - parseContext.update(ParseContext::PARSE_RANDOM_TEXT , InputError::IGNORE); - BOOST_CHECK_THROW( parser.parseString( deck1 , parseContext ) , std::invalid_argument); - BOOST_CHECK_THROW( parser.parseString( deck2 , parseContext ) , std::invalid_argument); - - - parseContext.update(ParseContext::PARSE_RANDOM_SLASH , InputError::IGNORE); - parseContext.update(ParseContext::PARSE_RANDOM_TEXT , InputError::THROW_EXCEPTION); - BOOST_CHECK_NO_THROW( parser.parseString( deck1 , parseContext ) ); - BOOST_CHECK_NO_THROW( parser.parseString( deck2 , parseContext ) ); -} - - - -BOOST_AUTO_TEST_CASE(TestCOMPORD) { - const char * deckString = - "START\n" - " 10 'JAN' 2000 /\n" - "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 / \n" - "GRID\n" - "DX\n" - "1000*0.25 /\n" - "DY\n" - "1000*0.25 /\n" - "DZ\n" - "1000*0.25 /\n" - "TOPS\n" - "100*0.25 /\n" - "SCHEDULE\n" - "COMPORD\n" - " '*' 'DEPTH' /\n" - "/\n"; - - ParseContext parseContext; - Parser parser(true); - auto deck = parser.parseString( deckString , parseContext ); - - EclipseGrid grid( deck ); - - parseContext.update( ParseContext::UNSUPPORTED_COMPORD_TYPE , InputError::IGNORE); - BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , deck )); - - parseContext.update( ParseContext::UNSUPPORTED_COMPORD_TYPE , InputError::THROW_EXCEPTION); - BOOST_CHECK_THROW( Schedule( parseContext , grid , deck ), std::invalid_argument ); -} - - -BOOST_AUTO_TEST_CASE(TestInvalidKey) { - ParseContext parseContext; - BOOST_CHECK_THROW( parseContext.addKey("KEY*") , std::invalid_argument ); - BOOST_CHECK_THROW( parseContext.addKey("KEY:") , std::invalid_argument ); -} - - -BOOST_AUTO_TEST_CASE(TestNew) { - ParseContext parseContext; - - BOOST_CHECK_EQUAL( false , parseContext.hasKey("NO")); - parseContext.addKey("NEW_KEY"); - BOOST_CHECK_EQUAL( true , parseContext.hasKey("NEW_KEY")); - BOOST_CHECK_THROW( parseContext.get("NO") , std::invalid_argument ); - BOOST_CHECK_EQUAL( parseContext.get("NEW_KEY") , InputError::THROW_EXCEPTION ); - parseContext.addKey("KEY2"); - BOOST_CHECK_EQUAL( parseContext.get("NEW_KEY") , InputError::THROW_EXCEPTION ); - - BOOST_CHECK_THROW( parseContext.updateKey("NO" , InputError::IGNORE) , std::invalid_argument); - - parseContext.updateKey("NEW_KEY" , InputError::WARN); - BOOST_CHECK_EQUAL( parseContext.get("NEW_KEY") , InputError::WARN ); - - BOOST_CHECK_NO_THROW( parseContext.update("KEY2:NEW_KEY" , InputError::IGNORE)); - BOOST_CHECK_NO_THROW( parseContext.update("UnknownKey" , InputError::IGNORE)); - BOOST_CHECK_EQUAL( parseContext.get("NEW_KEY") , InputError::IGNORE ); - BOOST_CHECK_EQUAL( parseContext.get("KEY2") , InputError::IGNORE ); - - parseContext.addKey("SECRET_KEY"); - parseContext.addKey("NEW_KEY2"); - parseContext.addKey("NEW_KEY3"); - parseContext.update("NEW_KEY*" , InputError::WARN); - BOOST_CHECK_EQUAL( parseContext.get("NEW_KEY") , InputError::WARN ); - BOOST_CHECK_EQUAL( parseContext.get("NEW_KEY2") , InputError::WARN ); - BOOST_CHECK_EQUAL( parseContext.get("NEW_KEY3") , InputError::WARN ); - - parseContext.update( InputError::IGNORE ); - BOOST_CHECK_EQUAL( parseContext.get("NEW_KEY3") , InputError::IGNORE ); - BOOST_CHECK_EQUAL( parseContext.get("SECRET_KEY") , InputError::IGNORE ); - - -} - - -BOOST_AUTO_TEST_CASE( test_constructor_with_values) { - ParseContext parseContext( {{ParseContext::PARSE_RANDOM_SLASH , InputError::IGNORE}, - {"UNSUPPORTED_*" , InputError::WARN}, - {"UNKNWON-IGNORED" , InputError::WARN}}); - - BOOST_CHECK_EQUAL( parseContext.get(ParseContext::PARSE_RANDOM_SLASH) , InputError::IGNORE ); - BOOST_CHECK_EQUAL( parseContext.get(ParseContext::PARSE_RANDOM_TEXT) , InputError::THROW_EXCEPTION ); - BOOST_CHECK_EQUAL( parseContext.get(ParseContext::UNSUPPORTED_INITIAL_THPRES) , InputError::WARN ); - BOOST_CHECK_EQUAL( parseContext.get(ParseContext::UNSUPPORTED_COMPORD_TYPE) , InputError::WARN ); -} - - - -BOOST_AUTO_TEST_CASE( test_too_much_data ) { - const char * deckString = - "RUNSPEC\n" - "DIMENS\n" - " 10 10 10 10 /n" - "\n"; - - ParseContext parseContext; - Parser parser; - - - parseContext.update(ParseContext::PARSE_EXTRA_DATA , InputError::THROW_EXCEPTION ); - BOOST_CHECK_THROW( parser.parseString( deckString , parseContext ) , std::invalid_argument); - - parseContext.update(ParseContext::PARSE_EXTRA_DATA , InputError::IGNORE ); - auto deck = parser.parseString( deckString , parseContext ); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/tests/ParserEnumTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/tests/ParserEnumTests.cpp deleted file mode 100644 index 3850f26038..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/tests/ParserEnumTests.cpp +++ /dev/null @@ -1,145 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - -#define BOOST_TEST_MODULE ParserEnumTests -#include - -#include - -using namespace Opm; - -BOOST_AUTO_TEST_CASE(TestItemSizeEnum2String) { - BOOST_CHECK_EQUAL( "ALL" , ParserItemSizeEnum2String(ALL)); - BOOST_CHECK_EQUAL( "SINGLE" , ParserItemSizeEnum2String(SINGLE)); -} - - -BOOST_AUTO_TEST_CASE(TestItemSizeEnumFromString) { - BOOST_CHECK_THROW( ParserItemSizeEnumFromString("XXX") , std::invalid_argument ); - BOOST_CHECK_EQUAL( ALL , ParserItemSizeEnumFromString("ALL")); - BOOST_CHECK_EQUAL( SINGLE , ParserItemSizeEnumFromString("SINGLE")); -} - - - -BOOST_AUTO_TEST_CASE(TestItemSizeEnumLoop) { - BOOST_CHECK_EQUAL( ALL , ParserItemSizeEnumFromString( ParserItemSizeEnum2String( ALL ) )); - BOOST_CHECK_EQUAL( SINGLE , ParserItemSizeEnumFromString( ParserItemSizeEnum2String( SINGLE ) )); - - BOOST_CHECK_EQUAL( "ALL" , ParserItemSizeEnum2String(ParserItemSizeEnumFromString( "ALL" ) )); - BOOST_CHECK_EQUAL( "SINGLE" , ParserItemSizeEnum2String(ParserItemSizeEnumFromString( "SINGLE" ) )); -} - -/*****************************************************************/ - -BOOST_AUTO_TEST_CASE(TestKeywordSizeEnum2String) { - BOOST_CHECK_EQUAL( "SLASH_TERMINATED" , ParserKeywordSizeEnum2String(SLASH_TERMINATED)); - BOOST_CHECK_EQUAL( "FIXED" , ParserKeywordSizeEnum2String(FIXED)); - BOOST_CHECK_EQUAL( "OTHER_KEYWORD_IN_DECK" , ParserKeywordSizeEnum2String(OTHER_KEYWORD_IN_DECK)); - BOOST_CHECK_EQUAL( "UNKNOWN" , ParserKeywordSizeEnum2String(UNKNOWN)); -} - - -BOOST_AUTO_TEST_CASE(TestKeywordSizeEnumFromString) { - BOOST_CHECK_THROW( ParserKeywordSizeEnumFromString("XXX") , std::invalid_argument ); - BOOST_CHECK_EQUAL( FIXED , ParserKeywordSizeEnumFromString("FIXED")); - BOOST_CHECK_EQUAL( SLASH_TERMINATED , ParserKeywordSizeEnumFromString("SLASH_TERMINATED")); - BOOST_CHECK_EQUAL( "OTHER_KEYWORD_IN_DECK" , ParserKeywordSizeEnum2String(OTHER_KEYWORD_IN_DECK)); - BOOST_CHECK_EQUAL( "UNKNOWN" , ParserKeywordSizeEnum2String(UNKNOWN)); -} - - - -BOOST_AUTO_TEST_CASE(TestKeywordSizeEnumLoop) { - BOOST_CHECK_EQUAL( FIXED , ParserKeywordSizeEnumFromString( ParserKeywordSizeEnum2String( FIXED ) )); - BOOST_CHECK_EQUAL( SLASH_TERMINATED , ParserKeywordSizeEnumFromString( ParserKeywordSizeEnum2String( SLASH_TERMINATED ) )); - BOOST_CHECK_EQUAL( OTHER_KEYWORD_IN_DECK , ParserKeywordSizeEnumFromString( ParserKeywordSizeEnum2String( OTHER_KEYWORD_IN_DECK ) )); - BOOST_CHECK_EQUAL( UNKNOWN , ParserKeywordSizeEnumFromString( ParserKeywordSizeEnum2String( UNKNOWN ) )); - - BOOST_CHECK_EQUAL( "FIXED" , ParserKeywordSizeEnum2String(ParserKeywordSizeEnumFromString( "FIXED" ) )); - BOOST_CHECK_EQUAL( "SLASH_TERMINATED" , ParserKeywordSizeEnum2String(ParserKeywordSizeEnumFromString( "SLASH_TERMINATED" ) )); - BOOST_CHECK_EQUAL( "OTHER_KEYWORD_IN_DECK" , ParserKeywordSizeEnum2String(ParserKeywordSizeEnumFromString( "OTHER_KEYWORD_IN_DECK" ) )); - BOOST_CHECK_EQUAL( "UNKNOWN" , ParserKeywordSizeEnum2String(ParserKeywordSizeEnumFromString( "UNKNOWN" ) )); -} - - -/*****************************************************************/ - - -BOOST_AUTO_TEST_CASE(TestValueTypeEnum2String) { - BOOST_CHECK_EQUAL( "INT" , ParserValueTypeEnum2String(INT)); - BOOST_CHECK_EQUAL( "FLOAT" , ParserValueTypeEnum2String(FLOAT)); - BOOST_CHECK_EQUAL( "STRING" , ParserValueTypeEnum2String(STRING)); -} - - -BOOST_AUTO_TEST_CASE(TestValueTypeEnumFromString) { - BOOST_CHECK_THROW( ParserValueTypeEnumFromString("XXX") , std::invalid_argument ); - BOOST_CHECK_EQUAL( INT , ParserValueTypeEnumFromString("INT")); - BOOST_CHECK_EQUAL( STRING , ParserValueTypeEnumFromString("STRING")); - BOOST_CHECK_EQUAL( FLOAT , ParserValueTypeEnumFromString("FLOAT")); -} - - - -BOOST_AUTO_TEST_CASE(TestValueTypeEnumLoop) { - BOOST_CHECK_EQUAL( INT , ParserValueTypeEnumFromString( ParserValueTypeEnum2String( INT ) )); - BOOST_CHECK_EQUAL( FLOAT , ParserValueTypeEnumFromString( ParserValueTypeEnum2String( FLOAT ) )); - BOOST_CHECK_EQUAL( STRING , ParserValueTypeEnumFromString( ParserValueTypeEnum2String( STRING ) )); - - BOOST_CHECK_EQUAL( "INT" , ParserValueTypeEnum2String(ParserValueTypeEnumFromString( "INT" ) )); - BOOST_CHECK_EQUAL( "FLOAT" , ParserValueTypeEnum2String(ParserValueTypeEnumFromString( "FLOAT" ) )); - BOOST_CHECK_EQUAL( "STRING" , ParserValueTypeEnum2String(ParserValueTypeEnumFromString( "STRING" ) )); -} - - -/*****************************************************************/ - -BOOST_AUTO_TEST_CASE(TestKeywordActionEnum2String) { - BOOST_CHECK_EQUAL( "INTERNALIZE" , ParserKeywordActionEnum2String(INTERNALIZE)); - BOOST_CHECK_EQUAL( "IGNORE" , ParserKeywordActionEnum2String(IGNORE)); - BOOST_CHECK_EQUAL( "IGNORE_WARNING" , ParserKeywordActionEnum2String(IGNORE_WARNING)); - BOOST_CHECK_EQUAL( "THROW_EXCEPTION" , ParserKeywordActionEnum2String(THROW_EXCEPTION)); -} - - -BOOST_AUTO_TEST_CASE(TestKeywordActionEnumFromString) { - BOOST_CHECK_THROW( ParserKeywordActionEnumFromString("XXX") , std::invalid_argument ); - BOOST_CHECK_EQUAL( INTERNALIZE , ParserKeywordActionEnumFromString("INTERNALIZE")); - BOOST_CHECK_EQUAL( IGNORE_WARNING , ParserKeywordActionEnumFromString("IGNORE_WARNING")); - BOOST_CHECK_EQUAL( IGNORE , ParserKeywordActionEnumFromString("IGNORE")); - BOOST_CHECK_EQUAL( THROW_EXCEPTION , ParserKeywordActionEnumFromString("THROW_EXCEPTION")); -} - - - -BOOST_AUTO_TEST_CASE(TestKeywordActionEnumLoop) { - BOOST_CHECK_EQUAL( INTERNALIZE , ParserKeywordActionEnumFromString( ParserKeywordActionEnum2String( INTERNALIZE ) )); - BOOST_CHECK_EQUAL( IGNORE , ParserKeywordActionEnumFromString( ParserKeywordActionEnum2String( IGNORE ) )); - BOOST_CHECK_EQUAL( IGNORE_WARNING , ParserKeywordActionEnumFromString( ParserKeywordActionEnum2String( IGNORE_WARNING ) )); - BOOST_CHECK_EQUAL( THROW_EXCEPTION , ParserKeywordActionEnumFromString( ParserKeywordActionEnum2String( THROW_EXCEPTION ) )); - - BOOST_CHECK_EQUAL( "INTERNALIZE" , ParserKeywordActionEnum2String(ParserKeywordActionEnumFromString( "INTERNALIZE" ) )); - BOOST_CHECK_EQUAL( "IGNORE" , ParserKeywordActionEnum2String(ParserKeywordActionEnumFromString( "IGNORE" ) )); - BOOST_CHECK_EQUAL( "IGNORE_WARNING" , ParserKeywordActionEnum2String(ParserKeywordActionEnumFromString( "IGNORE_WARNING" ) )); - BOOST_CHECK_EQUAL( "THROW_EXCEPTION" , ParserKeywordActionEnum2String(ParserKeywordActionEnumFromString( "THROW_EXCEPTION" ) )); -} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/tests/ParserIncludeTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/tests/ParserIncludeTests.cpp deleted file mode 100644 index 898a7cadcb..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/tests/ParserIncludeTests.cpp +++ /dev/null @@ -1,127 +0,0 @@ -/* - Copyright 2014 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - -#define BOOST_TEST_MODULE ParserTests -#include -#include - -#include -#include -#include -#include - -#include "opm_parser_build_config.hpp" - - -#ifdef OPM_PARSER_BUILD_HAVE_SYMLINK - -BOOST_AUTO_TEST_CASE(ParserKeyword_includeInvalid) { - boost::filesystem::path inputFilePath("testdata/parser/includeInvalid.data"); - - Opm::ParserPtr parser(new Opm::Parser()); - Opm::ParseContext parseContext; - - parseContext.update(Opm::ParseContext::PARSE_MISSING_INCLUDE , Opm::InputError::THROW_EXCEPTION ); - BOOST_CHECK_THROW(parser->parseFile(inputFilePath.string() , parseContext) , std::invalid_argument); - - parseContext.update(Opm::ParseContext::PARSE_MISSING_INCLUDE , Opm::InputError::IGNORE ); - BOOST_CHECK_NO_THROW(parser->parseFile(inputFilePath.string() , parseContext)); -} - - - -BOOST_AUTO_TEST_CASE(Verify_find_includes_Data_file_is_a_symlink) { - boost::filesystem::path inputFilePath("testdata/parser/includeSymlinkTestdata/symlink1/case_symlink.data"); - Opm::ParserPtr parser(new Opm::Parser()); - Opm::DeckConstPtr deck = parser->parseFile(inputFilePath.string() , Opm::ParseContext()); - - BOOST_CHECK_EQUAL(true , deck->hasKeyword("OIL")); - BOOST_CHECK_EQUAL(false , deck->hasKeyword("WATER")); -} - - -BOOST_AUTO_TEST_CASE(Verify_find_includes_Data_file_has_include_that_is_a_symlink) { - boost::filesystem::path inputFilePath("testdata/parser/includeSymlinkTestdata/symlink2/caseWithIncludedSymlink.data"); - Opm::ParserPtr parser(new Opm::Parser()); - Opm::DeckConstPtr deck = parser->parseFile(inputFilePath.string() , Opm::ParseContext()); - - BOOST_CHECK_EQUAL(true , deck->hasKeyword("OIL")); - BOOST_CHECK_EQUAL(false , deck->hasKeyword("WATER")); -} - - -BOOST_AUTO_TEST_CASE(Verify_find_includes_Data_file_has_include_file_that_again_includes_a_symlink) { - boost::filesystem::path inputFilePath("testdata/parser/includeSymlinkTestdata/symlink3/case.data"); - Opm::ParserPtr parser(new Opm::Parser()); - Opm::DeckConstPtr deck = parser->parseFile(inputFilePath.string() , Opm::ParseContext()); - - BOOST_CHECK_EQUAL(true , deck->hasKeyword("OIL")); - BOOST_CHECK_EQUAL(false , deck->hasKeyword("WATER")); -} - -#endif - - -BOOST_AUTO_TEST_CASE(ParserKeyword_includeValid) { - boost::filesystem::path inputFilePath("testdata/parser/includeValid.data"); - - Opm::ParserPtr parser(new Opm::Parser()); - Opm::DeckConstPtr deck = parser->parseFile(inputFilePath.string() , Opm::ParseContext()); - - BOOST_CHECK_EQUAL(true , deck->hasKeyword("OIL")); - BOOST_CHECK_EQUAL(false , deck->hasKeyword("WATER")); -} - - - - - - -BOOST_AUTO_TEST_CASE(ParserKeyword_includeWrongCase) { - boost::filesystem::path inputFile1Path("testdata/parser/includeWrongCase1.data"); - boost::filesystem::path inputFile2Path("testdata/parser/includeWrongCase2.data"); - boost::filesystem::path inputFile3Path("testdata/parser/includeWrongCase3.data"); - - Opm::ParserPtr parser(new Opm::Parser()); - -#if HAVE_CASE_SENSITIVE_FILESYSTEM - // so far, we expect the files which are included to exhibit - // exactly the same spelling as their names on disk. Eclipse seems - // to be a bit more relaxed when it comes to this, so we might - // have to change the current behavior one not-so-fine day... - Opm::ParseContext parseContext; - parseContext.update(Opm::ParseContext::PARSE_MISSING_INCLUDE , Opm::InputError::THROW_EXCEPTION ); - - BOOST_CHECK_THROW(parser->parseFile(inputFile1Path.string(), parseContext), std::invalid_argument); - BOOST_CHECK_THROW(parser->parseFile(inputFile2Path.string(), parseContext), std::invalid_argument); - BOOST_CHECK_THROW(parser->parseFile(inputFile3Path.string(), parseContext), std::invalid_argument); -#else - // for case-insensitive filesystems, the include statement will - // always work regardless of how the capitalization of the - // included files is wrong... - BOOST_CHECK_EQUAL(true, parser->parseFile(inputFile1Path.string(), Opm::ParseContext())->hasKeyword("OIL")); - BOOST_CHECK_EQUAL(false, parser->parseFile(inputFile1Path.string(), Opm::ParseContext())->hasKeyword("WATER")); - BOOST_CHECK_EQUAL(true, parser->parseFile(inputFile2Path.string(), Opm::ParseContext())->hasKeyword("OIL")); - BOOST_CHECK_EQUAL(false, parser->parseFile(inputFile2Path.string(), Opm::ParseContext())->hasKeyword("WATER")); - BOOST_CHECK_EQUAL(true, parser->parseFile(inputFile3Path.string(), Opm::ParseContext())->hasKeyword("OIL")); - BOOST_CHECK_EQUAL(false, parser->parseFile(inputFile3Path.string(), Opm::ParseContext())->hasKeyword("WATER")); -#endif -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/tests/ParserItemTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/tests/ParserItemTests.cpp deleted file mode 100644 index cbb81a68ba..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/tests/ParserItemTests.cpp +++ /dev/null @@ -1,658 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - -#define BOOST_TEST_MODULE ParserItemTests -#include - -#include - -#include -#include -#include -#include -#include - -#include - -#include - -using namespace Opm; - -BOOST_AUTO_TEST_CASE(Initialize) { - ParserItemSizeEnum sizeType = SINGLE; - BOOST_CHECK_NO_THROW(ParserIntItem item1("ITEM1", sizeType)); - BOOST_CHECK_NO_THROW(ParserStringItem item1("ITEM1", sizeType)); - BOOST_CHECK_NO_THROW(ParserDoubleItem item1("ITEM1", sizeType)); -} - -BOOST_AUTO_TEST_CASE(ScalarCheck) { - ParserIntItem item1("ITEM1", SINGLE); - ParserIntItem item2("ITEM1", ALL); - - BOOST_CHECK( item1.scalar()); - BOOST_CHECK( !item2.scalar()); -} - -BOOST_AUTO_TEST_CASE(Initialize_DefaultSizeType) { - ParserIntItem item1(std::string("ITEM1")); - ParserStringItem item2(std::string("ITEM1")); - ParserDoubleItem item3(std::string("ITEM1")); - - BOOST_CHECK_EQUAL( SINGLE , item1.sizeType()); - BOOST_CHECK_EQUAL( SINGLE , item2.sizeType()); - BOOST_CHECK_EQUAL( SINGLE , item3.sizeType()); -} - - - -BOOST_AUTO_TEST_CASE(Initialize_Default) { - ParserIntItem item1(std::string("ITEM1")); - ParserIntItem item2(std::string("ITEM1"), 88); - BOOST_CHECK(!item1.hasDefault()); - BOOST_CHECK_THROW(item1.getDefault(), std::invalid_argument); - BOOST_CHECK(item2.hasDefault()); - BOOST_CHECK_EQUAL(item2.getDefault(), 88); -} - - -BOOST_AUTO_TEST_CASE(Initialize_Default_Double) { - ParserDoubleItem item1(std::string("ITEM1")); - ParserDoubleItem item2("ITEM1", 88.91); - BOOST_CHECK(!item1.hasDefault()); - BOOST_CHECK_THROW(item1.getDefault(), std::invalid_argument); - BOOST_CHECK_EQUAL( 88.91 , item2.getDefault()); -} - -BOOST_AUTO_TEST_CASE(Initialize_Default_String) { - ParserStringItem item1(std::string("ITEM1")); - BOOST_CHECK(!item1.hasDefault()); - BOOST_CHECK_THROW(item1.getDefault(), std::invalid_argument); - - ParserStringItem item2("ITEM1", "String"); - BOOST_CHECK(item2.hasDefault()); - BOOST_CHECK_EQUAL( "String" , item2.getDefault()); -} - -BOOST_AUTO_TEST_CASE(scan_PreMatureTerminator_defaultUsed) { - ParserIntItem itemInt(std::string("ITEM2"), 123); - - RawRecord rawRecord1( "" ); - const auto defaulted = itemInt.scan(rawRecord1); - - BOOST_CHECK(defaulted.defaultApplied(0)); - BOOST_CHECK_EQUAL(defaulted.get< int >(0), 123); -} - -BOOST_AUTO_TEST_CASE(InitializeIntItem_setDescription_canReadBack) { - ParserIntItem itemInt(std::string("ITEM1")); - std::string description("This is the description"); - itemInt.setDescription(description); - - BOOST_CHECK_EQUAL( description, itemInt.getDescription() ); -} - - -/******************************************************************/ -/* */ -BOOST_AUTO_TEST_CASE(InitializeIntItem_FromJsonObject_missingName_throws) { - Json::JsonObject jsonConfig("{\"nameX\": \"ITEM1\" , \"size_type\" : \"ALL\"}"); - BOOST_CHECK_THROW( ParserIntItem item1( jsonConfig ) , std::invalid_argument ); -} - - -BOOST_AUTO_TEST_CASE(InitializeIntItem_FromJsonObject_defaultSizeType) { - Json::JsonObject jsonConfig("{\"name\": \"ITEM1\" }"); - ParserIntItem item1( jsonConfig ); - BOOST_CHECK_EQUAL( SINGLE , item1.sizeType()); -} - - - -BOOST_AUTO_TEST_CASE(InitializeIntItem_FromJsonObject) { - Json::JsonObject jsonConfig("{\"name\": \"ITEM1\" , \"size_type\" : \"ALL\"}"); - ParserIntItem item1( jsonConfig ); - BOOST_CHECK_EQUAL( "ITEM1" , item1.name() ); - BOOST_CHECK_EQUAL( ALL , item1.sizeType() ); - BOOST_CHECK(item1.getDefault() < 0); -} - - -BOOST_AUTO_TEST_CASE(InitializeIntItem_FromJsonObject_withDefault) { - Json::JsonObject jsonConfig("{\"name\": \"ITEM1\" , \"size_type\" : \"SINGLE\", \"default\" : 100}"); - ParserIntItem item1( jsonConfig ); - BOOST_CHECK_EQUAL( 100 , item1.getDefault() ); -} - - -BOOST_AUTO_TEST_CASE(InitializeIntItem_FromJsonObject_withDefaultInvalid_throws) { - Json::JsonObject jsonConfig("{\"name\": \"ITEM1\" , \"size_type\" : \"SINGLE\", \"default\" : \"100X\"}"); - BOOST_CHECK_THROW( ParserIntItem item1( jsonConfig ) , std::invalid_argument ); -} - - -BOOST_AUTO_TEST_CASE(InitializeIntItem_FromJsonObject_withSizeTypeALL_throws) { - Json::JsonObject jsonConfig("{\"name\": \"ITEM1\" , \"size_type\" : \"ALL\", \"default\" : 100}"); - BOOST_CHECK_THROW( ParserIntItem item1( jsonConfig ) , std::invalid_argument ); -} - - - -BOOST_AUTO_TEST_CASE(InitializeIntItem_WithDescription_DescriptionPropertyShouldBePopulated) { - std::string description("Description goes here"); - Json::JsonObject jsonConfig("{\"name\": \"ITEM1\" , \"description\" : \"Description goes here\"}"); - ParserIntItem item(jsonConfig); - - BOOST_CHECK_EQUAL( "Description goes here", item.getDescription() ); -} - - -BOOST_AUTO_TEST_CASE(InitializeIntItem_WithoutDescription_DescriptionPropertyShouldBeEmpty) { - Json::JsonObject jsonConfig("{\"name\": \"ITEM1\"}"); - ParserIntItem item(jsonConfig); - - BOOST_CHECK_EQUAL( "", item.getDescription() ); -} - - - -/* */ -/******************************************************************/ - -/* EQUAL */ - - -BOOST_AUTO_TEST_CASE(IntItem_Equal_ReturnsTrue) { - ParserItemSizeEnum sizeType = ALL; - ParserIntItem item1("ITEM1", sizeType); - ParserIntItem item2("ITEM1", sizeType); - ParserIntItem item3 = item1; - - BOOST_CHECK( item1.equal( item2 )); - BOOST_CHECK( item1.equal( item3 )); -} - - -BOOST_AUTO_TEST_CASE(IntItem_Different_ReturnsFalse) { - ParserIntItem item1("ITEM1", ALL); - ParserIntItem item2("ITEM2", ALL); - ParserIntItem item3(std::string("ITEM1")); - ParserIntItem item4("ITEM1" , 42); - - BOOST_CHECK( !item1.equal( item2 )); - BOOST_CHECK( !item1.equal( item3 )); - BOOST_CHECK( !item2.equal( item3 )); - BOOST_CHECK( !item4.equal( item3 )); -} - -BOOST_AUTO_TEST_CASE(DoubleItem_Equal_ReturnsTrue) { - ParserItemSizeEnum sizeType = ALL; - ParserDoubleItem item1("ITEM1", sizeType); - ParserDoubleItem item2("ITEM1", sizeType); - ParserDoubleItem item3 = item1; - - BOOST_CHECK( item1.equal( item2 )); - BOOST_CHECK( item1.equal( item3 )); -} - - -BOOST_AUTO_TEST_CASE(DoubleItem_DimEqual_ReturnsTrue) { - ParserItemSizeEnum sizeType = ALL; - ParserDoubleItem item1("ITEM1", sizeType); - ParserDoubleItem item2("ITEM1", sizeType); - - item1.push_backDimension("Length*Length"); - item2.push_backDimension("Length*Length"); - - BOOST_CHECK( item1.equal( item2 )); -} - - -BOOST_AUTO_TEST_CASE(DoubleItem_DimDifferent_ReturnsFalse) { - ParserItemSizeEnum sizeType = ALL; - ParserDoubleItem item1("ITEM1", sizeType); // Dim: [] - ParserDoubleItem item2("ITEM1", sizeType); // Dim: [Length] - ParserDoubleItem item3("ITEM1", sizeType); // Dim: [Length ,Length] - ParserDoubleItem item4("ITEM1", sizeType); // Dim: [t] - - item2.push_backDimension("Length"); - - item3.push_backDimension("Length"); - item3.push_backDimension("Length"); - - item4.push_backDimension("Time"); - - BOOST_CHECK_EQUAL(false , item1.equal( item2 )); - BOOST_CHECK_EQUAL(false , item2.equal( item3 )); - BOOST_CHECK_EQUAL(false , item2.equal( item1 )); - BOOST_CHECK_EQUAL(false , item2.equal( item4 )); - BOOST_CHECK_EQUAL(false , item1.equal( item3 )); - BOOST_CHECK_EQUAL(false , item3.equal( item1 )); - BOOST_CHECK_EQUAL(false , item4.equal( item2 )); -} - - -BOOST_AUTO_TEST_CASE(DoubleItem_Different_ReturnsFalse) { - ParserDoubleItem item1("ITEM1", ALL); - ParserDoubleItem item2("ITEM2", ALL); - ParserDoubleItem item3(std::string("ITEM1") ); - ParserDoubleItem item4("ITEM1" , 42.89); - - BOOST_CHECK( !item1.equal( item2 )); - BOOST_CHECK( !item1.equal( item3 )); - BOOST_CHECK( !item2.equal( item3 )); - BOOST_CHECK( !item4.equal( item3 )); -} - - -BOOST_AUTO_TEST_CASE(StringItem_Equal_ReturnsTrue) { - ParserItemSizeEnum sizeType = ALL; - ParserStringItem item1("ITEM1", sizeType); - ParserStringItem item2("ITEM1", sizeType); - ParserStringItem item3 = item1; - - BOOST_CHECK( item1.equal( item2 )); - BOOST_CHECK( item1.equal( item3 )); -} - - -BOOST_AUTO_TEST_CASE(StringItem_Different_ReturnsFalse) { - ParserStringItem item1("ITEM1", ALL); - ParserStringItem item2("ITEM2", ALL); - ParserStringItem item3(std::string("ITEM1") ); - ParserStringItem item4("ITEM1" , "42.89"); - - BOOST_CHECK( !item1.equal( item2 )); - BOOST_CHECK( !item1.equal( item3 )); - BOOST_CHECK( !item2.equal( item3 )); - BOOST_CHECK( !item4.equal( item3 )); -} - - - - -/******************************************************************/ - -BOOST_AUTO_TEST_CASE(Name_ReturnsCorrectName) { - ParserItemSizeEnum sizeType = ALL; - - ParserIntItem item1("ITEM1", sizeType); - BOOST_CHECK_EQUAL("ITEM1", item1.name()); - - ParserIntItem item2("", sizeType); - BOOST_CHECK_EQUAL("", item2.name()); -} - -BOOST_AUTO_TEST_CASE(Size_ReturnsCorrectSizeTypeSingle) { - ParserItemSizeEnum sizeType = SINGLE; - ParserIntItem item1("ITEM1", sizeType); - BOOST_CHECK_EQUAL(sizeType, item1.sizeType()); -} - -BOOST_AUTO_TEST_CASE(Size_ReturnsCorrectSizeTypeAll) { - ParserItemSizeEnum sizeType = ALL; - ParserIntItem item1("ITEM1", sizeType); - BOOST_CHECK_EQUAL(sizeType, item1.sizeType()); -} - -BOOST_AUTO_TEST_CASE(Scan_All_CorrectIntSetInDeckItem) { - ParserItemSizeEnum sizeType = ALL; - ParserIntItem itemInt("ITEM", sizeType); - - RawRecord rawRecord( "100 443 10*77 10*1 25" ); - const auto deckIntItem = itemInt.scan(rawRecord); - BOOST_CHECK_EQUAL(23U, deckIntItem.size()); - BOOST_CHECK_EQUAL(77, deckIntItem.get< int >(3)); - BOOST_CHECK_EQUAL(1, deckIntItem.get< int >(21)); - BOOST_CHECK_EQUAL(25, deckIntItem.get< int >(22)); -} - -BOOST_AUTO_TEST_CASE(Scan_All_WithDefaults) { - ParserItemSizeEnum sizeType = ALL; - ParserIntItem itemInt("ITEM", sizeType); - - RawRecord rawRecord( "100 10* 10*1 25" ); - const auto deckIntItem = itemInt.scan(rawRecord); - BOOST_CHECK_EQUAL(22U, deckIntItem.size()); - BOOST_CHECK(!deckIntItem.defaultApplied(0)); - BOOST_CHECK(deckIntItem.defaultApplied(1)); - BOOST_CHECK(!deckIntItem.defaultApplied(11)); - BOOST_CHECK(!deckIntItem.defaultApplied(21)); - BOOST_CHECK_EQUAL(1, deckIntItem.get< int >(20)); - BOOST_CHECK_EQUAL(25, deckIntItem.get< int >(21)); -} - -BOOST_AUTO_TEST_CASE(Scan_SINGLE_CorrectIntSetInDeckItem) { - ParserIntItem itemInt(std::string("ITEM2")); - - RawRecord rawRecord("100 44.3 'Heisann'" ); - const auto deckIntItem = itemInt.scan(rawRecord); - BOOST_CHECK_EQUAL(100, deckIntItem.get< int >(0)); -} - -BOOST_AUTO_TEST_CASE(Scan_SeveralInts_CorrectIntsSetInDeckItem) { - ParserIntItem itemInt1(std::string("ITEM1")); - ParserIntItem itemInt2(std::string("ITEM2")); - ParserIntItem itemInt3(std::string("ITEM3")); - - RawRecord rawRecord( "100 443 338932 222.33 'Heisann' " ); - const auto deckIntItem1 = itemInt1.scan(rawRecord); - BOOST_CHECK_EQUAL(100, deckIntItem1.get< int >(0)); - - const auto deckIntItem2 = itemInt2.scan(rawRecord); - BOOST_CHECK_EQUAL(443, deckIntItem2.get< int >(0)); - - const auto deckIntItem3 = itemInt3.scan(rawRecord); - BOOST_CHECK_EQUAL(338932, deckIntItem3.get< int >(0)); -} - - - - - -BOOST_AUTO_TEST_CASE(Scan_Multiplier_CorrectIntsSetInDeckItem) { - ParserItemSizeEnum sizeType = ALL; - ParserIntItem itemInt("ITEM2", sizeType); - - RawRecord rawRecord( "3*4 " ); - const auto deckIntItem = itemInt.scan(rawRecord); - BOOST_CHECK_EQUAL(4, deckIntItem.get< int >(0)); - BOOST_CHECK_EQUAL(4, deckIntItem.get< int >(1)); - BOOST_CHECK_EQUAL(4, deckIntItem.get< int >(2)); -} - -BOOST_AUTO_TEST_CASE(Scan_StarNoMultiplier_ExceptionThrown) { - ParserItemSizeEnum sizeType = SINGLE; - ParserIntItem itemInt("ITEM2", sizeType , 100); - - RawRecord rawRecord( "*45 " ); - BOOST_CHECK_THROW(itemInt.scan(rawRecord), std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(Scan_MultipleItems_CorrectIntsSetInDeckItem) { - ParserIntItem itemInt1(std::string("ITEM1")); - ParserIntItem itemInt2(std::string("ITEM2")); - - RawRecord rawRecord( "10 20" ); - const auto deckIntItem1 = itemInt1.scan(rawRecord); - const auto deckIntItem2 = itemInt2.scan(rawRecord); - - BOOST_CHECK_EQUAL(10, deckIntItem1.get< int >(0)); - BOOST_CHECK_EQUAL(20, deckIntItem2.get< int >(0)); -} - -BOOST_AUTO_TEST_CASE(Scan_MultipleDefault_CorrectIntsSetInDeckItem) { - ParserIntItem itemInt1("ITEM1", 10); - ParserIntItem itemInt2("ITEM2", 20); - - RawRecord rawRecord( "* * " ); - const auto deckIntItem1 = itemInt1.scan(rawRecord); - const auto deckIntItem2 = itemInt2.scan(rawRecord); - - BOOST_CHECK_EQUAL(10, deckIntItem1.get< int >(0)); - BOOST_CHECK_EQUAL(20, deckIntItem2.get< int >(0)); -} - -BOOST_AUTO_TEST_CASE(Scan_MultipleWithMultiplier_CorrectIntsSetInDeckItem) { - ParserIntItem itemInt1("ITEM1", 10); - ParserIntItem itemInt2("ITEM2", 20); - - RawRecord rawRecord( "2*30" ); - const auto deckIntItem1 = itemInt1.scan(rawRecord); - const auto deckIntItem2 = itemInt2.scan(rawRecord); - - BOOST_CHECK_EQUAL(30, deckIntItem1.get< int >(0)); - BOOST_CHECK_EQUAL(30, deckIntItem2.get< int >(0)); -} - -BOOST_AUTO_TEST_CASE(Scan_MalformedMultiplier_Throw) { - ParserIntItem itemInt1("ITEM1" , 10); - - RawRecord rawRecord( "2.10*30" ); - BOOST_CHECK_THROW(itemInt1.scan(rawRecord), std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(Scan_MalformedMultiplierChar_Throw) { - ParserIntItem itemInt1("ITEM1", 10); - - RawRecord rawRecord( "210X30" ); - BOOST_CHECK_THROW(itemInt1.scan(rawRecord), std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(Scan_MultipleWithMultiplierDefault_CorrectIntsSetInDeckItem) { - ParserIntItem itemInt1("ITEM1", 10); - ParserIntItem itemInt2("ITEM2", 20); - - RawRecord rawRecord( "2*" ); - const auto deckIntItem1 = itemInt1.scan(rawRecord); - const auto deckIntItem2 = itemInt2.scan(rawRecord); - - BOOST_CHECK_EQUAL(10, deckIntItem1.get< int >(0)); - BOOST_CHECK_EQUAL(20, deckIntItem2.get< int >(0)); -} - -BOOST_AUTO_TEST_CASE(Scan_RawRecordErrorInRawData_ExceptionThrown) { - ParserIntItem itemInt(std::string("ITEM2")); - - // Wrong type - RawRecord rawRecord2( "333.2 /" ); - BOOST_CHECK_THROW(itemInt.scan(rawRecord2), std::invalid_argument); - - // Wrong type - RawRecord rawRecord3( "100X /" ); - BOOST_CHECK_THROW(itemInt.scan(rawRecord3), std::invalid_argument); - - // Wrong type - RawRecord rawRecord5( "astring /" ); - BOOST_CHECK_THROW(itemInt.scan(rawRecord5), std::invalid_argument); -} - -/*********************String************************'*/ -/*****************************************************************/ -/**/ - -BOOST_AUTO_TEST_CASE(InitializeStringItem_FromJsonObject_missingName_throws) { - Json::JsonObject jsonConfig("{\"nameX\": \"ITEM1\" , \"size_type\" : \"ALL\"}"); - BOOST_CHECK_THROW( ParserStringItem item1( jsonConfig ) , std::invalid_argument ); -} - - - - -BOOST_AUTO_TEST_CASE(InitializeStringItem_FromJsonObject) { - Json::JsonObject jsonConfig("{\"name\": \"ITEM1\" , \"size_type\" : \"ALL\"}"); - ParserStringItem item1( jsonConfig ); - BOOST_CHECK_EQUAL( "ITEM1" , item1.name() ); - BOOST_CHECK_EQUAL( ALL , item1.sizeType() ); - BOOST_CHECK(item1.getDefault() == ""); -} - - -BOOST_AUTO_TEST_CASE(InitializeStringItem_FromJsonObject_withDefault) { - Json::JsonObject jsonConfig("{\"name\": \"ITEM1\" , \"size_type\" : \"SINGLE\", \"default\" : \"100\"}"); - ParserStringItem item1( jsonConfig ); - BOOST_CHECK_EQUAL( "100" , item1.getDefault() ); -} - - - -BOOST_AUTO_TEST_CASE(InitializeStringItem_FromJsonObject_withDefaultInvalid_throws) { - Json::JsonObject jsonConfig("{\"name\": \"ITEM1\" , \"size_type\" : \"ALL\", \"default\" : [1,2,3]}"); - BOOST_CHECK_THROW( ParserStringItem item1( jsonConfig ) , std::invalid_argument ); -} -/**/ -/*****************************************************************/ - -BOOST_AUTO_TEST_CASE(init_defaultvalue_defaultset) { - ParserStringItem itemString(std::string("ITEM1") , "DEFAULT"); - RawRecord rawRecord( "'1*'" ); - BOOST_CHECK_EQUAL("1*", itemString.scan( rawRecord ).get< std::string >(0) ); - - RawRecord rawRecord1( "13*" ); - BOOST_CHECK_EQUAL("DEFAULT" , itemString.scan( rawRecord1 ).get< std::string >(0) ); - - RawRecord rawRecord2( "*" ); - BOOST_CHECK_EQUAL("DEFAULT", itemString.scan( rawRecord2 ).get< std::string >(0) ); - - ParserStringItem itemStringDefaultChanged("ITEM2", "SPECIAL"); - RawRecord rawRecord3( "*" ); - BOOST_CHECK_EQUAL("SPECIAL", itemStringDefaultChanged.scan( rawRecord3 ).get< std::string >(0) ); -} - -BOOST_AUTO_TEST_CASE(scan_all_valuesCorrect) { - ParserItemSizeEnum sizeType = ALL; - ParserStringItem itemString("ITEMWITHMANY", sizeType); - RawRecord rawRecord( "'WELL1' FISK BANAN 3*X OPPLEGG_FOR_DATAANALYSE 'Foo$*!% BAR' " ); - const auto deckItem = itemString.scan(rawRecord); - BOOST_CHECK_EQUAL(8U, deckItem.size()); - - BOOST_CHECK_EQUAL("WELL1", deckItem.get< std::string >(0)); - BOOST_CHECK_EQUAL("FISK", deckItem.get< std::string >(1)); - BOOST_CHECK_EQUAL("BANAN", deckItem.get< std::string >(2)); - BOOST_CHECK_EQUAL("X", deckItem.get< std::string >(3)); - BOOST_CHECK_EQUAL("X", deckItem.get< std::string >(4)); - BOOST_CHECK_EQUAL("X", deckItem.get< std::string >(5)); - BOOST_CHECK_EQUAL("OPPLEGG_FOR_DATAANALYSE", deckItem.get< std::string >(6)); - BOOST_CHECK_EQUAL("Foo$*!% BAR", deckItem.get< std::string >(7)); -} - -BOOST_AUTO_TEST_CASE(scan_all_withdefaults) { - ParserItemSizeEnum sizeType = ALL; - ParserIntItem itemString("ITEMWITHMANY", sizeType); - RawRecord rawRecord( "10*1 10* 10*2 " ); - const auto deckItem = itemString.scan(rawRecord); - - BOOST_CHECK_EQUAL(30U, deckItem.size()); - - BOOST_CHECK_EQUAL(false, deckItem.defaultApplied(0)); - BOOST_CHECK_EQUAL(false, deckItem.defaultApplied(9)); - BOOST_CHECK_EQUAL(true, deckItem.defaultApplied(10)); - BOOST_CHECK_EQUAL(true, deckItem.defaultApplied(19)); - BOOST_CHECK_EQUAL(false, deckItem.defaultApplied(20)); - BOOST_CHECK_EQUAL(false, deckItem.defaultApplied(29)); - - BOOST_CHECK_THROW(deckItem.get< int >(30), std::out_of_range); - BOOST_CHECK_THROW(deckItem.defaultApplied(30), std::out_of_range); - - BOOST_CHECK_EQUAL(1, deckItem.get< int >(0)); - BOOST_CHECK_EQUAL(1, deckItem.get< int >(9)); - BOOST_CHECK_EQUAL(2, deckItem.get< int >(20)); - BOOST_CHECK_EQUAL(2, deckItem.get< int >(29)); -} - -BOOST_AUTO_TEST_CASE(scan_single_dataCorrect) { - ParserStringItem itemString(std::string("ITEM1")); - RawRecord rawRecord( "'WELL1' 'WELL2'" ); - const auto deckItem = itemString.scan(rawRecord); - BOOST_CHECK_EQUAL(1U, deckItem.size()); - BOOST_CHECK_EQUAL("WELL1", deckItem.get< std::string >(0)); -} - -BOOST_AUTO_TEST_CASE(scan_singleWithMixedRecord_dataCorrect) { - ParserStringItem itemString(std::string("ITEM1")); - ParserStringItem itemInt(std::string("ITEM1")); - - RawRecord rawRecord( "2 'WELL1' /" ); - itemInt.scan(rawRecord); - const auto deckItem = itemString.scan(rawRecord); - BOOST_CHECK_EQUAL("WELL1", deckItem.get< std::string >(0)); -} - -/******************String and int**********************/ -BOOST_AUTO_TEST_CASE(scan_intsAndStrings_dataCorrect) { - RawRecord rawRecord( "'WELL1' 2 2 2*3" ); - - ParserItemSizeEnum sizeTypeItemBoxed = ALL; - - ParserStringItem itemSingleString(std::string("ITEM1")); - const auto deckItemWell1 = itemSingleString.scan(rawRecord); - BOOST_CHECK_EQUAL("WELL1", deckItemWell1.get< std::string >(0)); - - ParserIntItem itemSomeInts("SOMEINTS", sizeTypeItemBoxed); - const auto deckItemInts = itemSomeInts.scan(rawRecord); - BOOST_CHECK_EQUAL(2, deckItemInts.get< int >(0)); - BOOST_CHECK_EQUAL(2, deckItemInts.get< int >(1)); - BOOST_CHECK_EQUAL(3, deckItemInts.get< int >(2)); - BOOST_CHECK_EQUAL(3, deckItemInts.get< int >(3)); -} - - - - -BOOST_AUTO_TEST_CASE(ParserItemCheckEqualsOverride) { - ParserItemConstPtr itemDefault10( new ParserIntItem("ITEM" , 10) ); - ParserItemConstPtr itemDefault20( new ParserIntItem("ITEM" , 20) ); - - BOOST_CHECK( itemDefault10->equal( *itemDefault10 )); - BOOST_CHECK_EQUAL( false , itemDefault10->equal( *itemDefault20 )); -} - -/*****************************************************************/ - - -BOOST_AUTO_TEST_CASE(ParserDefaultHasDimensionReturnsFalse) { - ParserIntItem intItem(std::string("SOMEINTS")); - ParserStringItem stringItem(std::string("SOMESTRING")); - ParserDoubleItem doubleItem(std::string("SOMEDOUBLE")); - - BOOST_CHECK_EQUAL( false, intItem.hasDimension()); - BOOST_CHECK_EQUAL( false, stringItem.hasDimension()); - BOOST_CHECK_EQUAL( false, doubleItem.hasDimension()); -} - -BOOST_AUTO_TEST_CASE(ParserIntItemGetDimensionThrows) { - ParserIntItem intItem(std::string("SOMEINT")); - - BOOST_CHECK_THROW( intItem.getDimension(0) , std::invalid_argument ); - BOOST_CHECK_THROW( intItem.push_backDimension("Length") , std::invalid_argument ); -} - - - -BOOST_AUTO_TEST_CASE(ParserDoubleItemAddMultipleDimensionToSIngleSizeThrows) { - ParserDoubleItem doubleItem(std::string("SOMEDOUBLE")); - - doubleItem.push_backDimension("Length*Length"); - BOOST_CHECK_THROW( doubleItem.push_backDimension("Length*Length"), std::invalid_argument); -} - - -BOOST_AUTO_TEST_CASE(ParserDoubleItemWithDimensionHasReturnsCorrect) { - ParserDoubleItem doubleItem(std::string("SOMEDOUBLE")); - - BOOST_CHECK_EQUAL( false , doubleItem.hasDimension() ); - doubleItem.push_backDimension("Length*Length"); - BOOST_CHECK_EQUAL( true , doubleItem.hasDimension() ); -} - -BOOST_AUTO_TEST_CASE(ParserDoubleItemGetDimension) { - ParserDoubleItem doubleItem(std::string("SOMEDOUBLE") , ALL); - - BOOST_CHECK_THROW( doubleItem.getDimension( 10 ) , std::invalid_argument ); - BOOST_CHECK_THROW( doubleItem.getDimension( 0 ) , std::invalid_argument ); - - doubleItem.push_backDimension("Length"); - doubleItem.push_backDimension("Length*Length"); - doubleItem.push_backDimension("Length*Length*Length"); - - BOOST_CHECK_EQUAL( "Length" , doubleItem.getDimension(0)); - BOOST_CHECK_EQUAL( "Length*Length" , doubleItem.getDimension(1)); - BOOST_CHECK_EQUAL( "Length*Length*Length" , doubleItem.getDimension(2)); - BOOST_CHECK_THROW( doubleItem.getDimension( 3 ) , std::invalid_argument ); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/tests/ParserKeywordTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/tests/ParserKeywordTests.cpp deleted file mode 100644 index 2ba100e9fb..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/tests/ParserKeywordTests.cpp +++ /dev/null @@ -1,512 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - -#define BOOST_TEST_MODULE ParserTests - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace Opm; - -namespace { - -std::shared_ptr createFixedSized(const std::string& kw , size_t size) { - std::shared_ptr pkw = std::make_shared(kw); - pkw->setFixedSize( size ); - return pkw; -} - -std::shared_ptr createDynamicSized(const std::string& kw) { - std::shared_ptr pkw = std::make_shared(kw); - pkw->setSizeType(SLASH_TERMINATED); - return pkw; -} - - -std::shared_ptr createTable(const std::string& name, - const std::string& sizeKeyword, - const std::string& sizeItem, - bool isTableCollection) { - std::shared_ptr pkw = std::make_shared(name); - pkw->initSizeKeyword(sizeKeyword , sizeItem); - pkw->setTableCollection(isTableCollection); - return pkw; -} - -} - -BOOST_AUTO_TEST_CASE(construct_withname_nameSet) { - ParserKeywordConstPtr parserKeyword = createDynamicSized("BPR"); - BOOST_CHECK_EQUAL(parserKeyword->getName(), "BPR"); -} - -BOOST_AUTO_TEST_CASE(NamedInit) { - std::string keyword("KEYWORD"); - ParserKeywordConstPtr parserKeyword = createFixedSized(keyword, (size_t) 100); - BOOST_CHECK_EQUAL(parserKeyword->getName(), keyword); -} - -BOOST_AUTO_TEST_CASE(ParserKeyword_default_SizeTypedefault) { - std::string keyword("KEYWORD"); - ParserKeywordConstPtr parserKeyword = createDynamicSized(keyword); - BOOST_CHECK_EQUAL(parserKeyword->getSizeType() , SLASH_TERMINATED); -} - - -BOOST_AUTO_TEST_CASE(ParserKeyword_withSize_SizeTypeFIXED) { - std::string keyword("KEYWORD"); - ParserKeywordConstPtr parserKeyword = createFixedSized(keyword, (size_t) 100); - BOOST_CHECK_EQUAL(parserKeyword->getSizeType() , FIXED); -} - -BOOST_AUTO_TEST_CASE(ParserKeyword_withOtherSize_SizeTypeOTHER) { - std::string keyword("KEYWORD"); - ParserKeywordConstPtr parserKeyword = createTable(keyword, "EQUILDIMS" , "NTEQUIL" , false); - const std::pair& sizeKW = parserKeyword->getSizeDefinitionPair(); - BOOST_CHECK_EQUAL(OTHER_KEYWORD_IN_DECK , parserKeyword->getSizeType() ); - BOOST_CHECK_EQUAL("EQUILDIMS", sizeKW.first ); - BOOST_CHECK_EQUAL("NTEQUIL" , sizeKW.second ); -} - -BOOST_AUTO_TEST_CASE(ParserKeyword_validDeckName) { - BOOST_CHECK_EQUAL( true , ParserKeyword::validDeckName("SUMMARY")); - BOOST_CHECK_EQUAL( true , ParserKeyword::validDeckName("MixeCase")); - BOOST_CHECK_EQUAL( false , ParserKeyword::validDeckName("NAMETOOLONG")); - BOOST_CHECK_EQUAL( true , ParserKeyword::validDeckName("STRING88")); - BOOST_CHECK_EQUAL( false , ParserKeyword::validDeckName("88STRING")); - BOOST_CHECK_EQUAL( false , ParserKeyword::validDeckName("KEY.EXT")); - BOOST_CHECK_EQUAL( false , ParserKeyword::validDeckName("STRING~")); - BOOST_CHECK_EQUAL( true , ParserKeyword::validDeckName("MINUS-")); - BOOST_CHECK_EQUAL( true , ParserKeyword::validDeckName("PLUS+")); - BOOST_CHECK_EQUAL( false , ParserKeyword::validDeckName("SHARP#")); - BOOST_CHECK_EQUAL( false , ParserKeyword::validDeckName("-MINUS")); - BOOST_CHECK_EQUAL( false , ParserKeyword::validDeckName("+PLUS")); - BOOST_CHECK_EQUAL( false , ParserKeyword::validDeckName("#SHARP")); - - BOOST_CHECK_EQUAL( false , ParserKeyword::validDeckName("TVDP*")); - BOOST_CHECK_EQUAL( false , ParserKeyword::validDeckName("*")); -} - -BOOST_AUTO_TEST_CASE(ParserKeyword_validInternalName) { - BOOST_CHECK_EQUAL( true , ParserKeyword::validInternalName("SUMMARY")); - BOOST_CHECK_EQUAL( true , ParserKeyword::validInternalName("MixeCase")); - BOOST_CHECK_EQUAL( true , ParserKeyword::validInternalName("NAMEISQUITELONG")); - BOOST_CHECK_EQUAL( true , ParserKeyword::validInternalName("I_have_underscores")); - BOOST_CHECK_EQUAL( false , ParserKeyword::validInternalName("WHATABOUT+")); - BOOST_CHECK_EQUAL( false , ParserKeyword::validInternalName("ORMINUS-")); - BOOST_CHECK_EQUAL( false , ParserKeyword::validInternalName("NOSHARP#")); - BOOST_CHECK_EQUAL( true , ParserKeyword::validInternalName("STRING88")); - BOOST_CHECK_EQUAL( false , ParserKeyword::validInternalName("88STRING")); - BOOST_CHECK_EQUAL( false , ParserKeyword::validInternalName("KEY.EXT")); - BOOST_CHECK_EQUAL( false , ParserKeyword::validInternalName("STRING~")); - - BOOST_CHECK_EQUAL( false , ParserKeyword::validInternalName("TVDP*")); - BOOST_CHECK_EQUAL( false , ParserKeyword::validInternalName("*")); -} - -BOOST_AUTO_TEST_CASE(ParserKeywordMatches) { - ParserKeywordPtr parserKeyword = createFixedSized("HELLO", (size_t) 1); - parserKeyword->clearDeckNames(); - parserKeyword->setMatchRegex("WORLD.+"); - BOOST_CHECK_EQUAL( false , parserKeyword->matches("HELLO")); - BOOST_CHECK_EQUAL( false , parserKeyword->matches("WORLD")); - BOOST_CHECK_EQUAL( true , parserKeyword->matches("WORLDABC")); - BOOST_CHECK_EQUAL( false , parserKeyword->matches("WORLD#BC")); - BOOST_CHECK_EQUAL( false , parserKeyword->matches("WORLDIAMTOOLONG")); -} - -BOOST_AUTO_TEST_CASE(AddDataKeyword_correctlyConfigured) { - ParserKeywordPtr parserKeyword = createFixedSized("PORO", (size_t) 1); - ParserIntItemConstPtr item = ParserIntItemConstPtr(new ParserIntItem( "ACTNUM" , ALL)); - std::shared_ptr record = std::make_shared(); - - BOOST_CHECK_EQUAL( false , parserKeyword->isDataKeyword() ); - record->addDataItem( item ); - parserKeyword->addRecord( record ); - BOOST_CHECK_EQUAL( true , parserKeyword->isDataKeyword() ); - - BOOST_CHECK_EQUAL(true , parserKeyword->hasFixedSize( )); - BOOST_CHECK_EQUAL(1U , parserKeyword->getFixedSize() ); -} - -BOOST_AUTO_TEST_CASE(WrongConstructor_addDataItem_throws) { - ParserKeywordPtr parserKeyword = createDynamicSized("PORO"); - ParserIntItemConstPtr dataItem = ParserIntItemConstPtr(new ParserIntItem( "ACTNUM" , ALL )); - std::shared_ptr record = std::make_shared(); - record->addDataItem( dataItem ); - BOOST_CHECK_THROW( parserKeyword->addDataRecord( record ) , std::invalid_argument); -} - - -BOOST_AUTO_TEST_CASE(DefaultConstructur_setDescription_canReadBack) { - ParserKeywordPtr parserKeyword = createDynamicSized("BPR"); - std::string description("This is the description"); - parserKeyword->setDescription(description); - BOOST_CHECK_EQUAL( description, parserKeyword->getDescription()); -} - -/*****************************************************************/ -/* json */ -BOOST_AUTO_TEST_CASE(ConstructFromJsonObject) { - Json::JsonObject jsonObject("{\"name\": \"XXX\", \"sections\":[], \"size\" : 0}"); - ParserKeywordConstPtr parserKeyword = std::make_shared(jsonObject); - BOOST_CHECK_EQUAL("XXX" , parserKeyword->getName()); - BOOST_CHECK_EQUAL( true , parserKeyword->hasFixedSize() ); -} - -BOOST_AUTO_TEST_CASE(ConstructMultiNameFromJsonObject) { - const auto jsonString = - "{" - " \"name\": \"XXX\" ," - " \"sections\":[]," - " \"size\" : 0," - " \"deck_names\" : [" - " \"XXA\"," - " \"XXB\"," - " \"XXC\"" - " ]" - "}"; - Json::JsonObject jsonObject(jsonString); - auto parserKeyword = std::make_shared(jsonObject); - BOOST_CHECK_EQUAL("XXX" , parserKeyword->getName()); - BOOST_CHECK(parserKeyword->matches("XXA")); - BOOST_CHECK(parserKeyword->matches("XXB")); - BOOST_CHECK(parserKeyword->hasMultipleDeckNames()); - BOOST_CHECK(!parserKeyword->matches("XXD")); - BOOST_CHECK(!parserKeyword->matches("XXX")); -} - - -BOOST_AUTO_TEST_CASE(ConstructFromJsonObject_withSize) { - Json::JsonObject jsonObject("{\"name\": \"BPR\", \"sections\":[\"SUMMARY\"], \"size\" : 100 , \"items\" :[{\"name\":\"ItemX\" , \"size_type\":\"SINGLE\" , \"value_type\" : \"DOUBLE\"}]}"); - - ParserKeywordConstPtr parserKeyword = std::make_shared(jsonObject); - BOOST_CHECK_EQUAL("BPR" , parserKeyword->getName()); - BOOST_CHECK_EQUAL( true , parserKeyword->hasFixedSize() ); - BOOST_CHECK_EQUAL( 100U , parserKeyword->getFixedSize() ); - -} - -BOOST_AUTO_TEST_CASE(ConstructFromJsonObject_nosize_notItems_OK) { - Json::JsonObject jsonObject("{\"name\": \"BPR\", \"sections\":[\"SUMMARY\"]}"); - ParserKeywordConstPtr parserKeyword = std::make_shared(jsonObject); - BOOST_CHECK_EQUAL( true , parserKeyword->hasFixedSize() ); - BOOST_CHECK_EQUAL( 0U , parserKeyword->getFixedSize()); -} - -BOOST_AUTO_TEST_CASE(ConstructFromJsonObject_withSizeOther) { - Json::JsonObject jsonObject("{\"name\": \"BPR\", \"sections\":[\"SUMMARY\"], \"size\" : {\"keyword\" : \"Bjarne\" , \"item\": \"BjarneIgjen\"}, \"items\" :[{\"name\":\"ItemX\" , \"value_type\" : \"DOUBLE\"}]}"); - ParserKeywordConstPtr parserKeyword = std::make_shared(jsonObject); - const std::pair& sizeKW = parserKeyword->getSizeDefinitionPair(); - BOOST_CHECK_EQUAL("BPR" , parserKeyword->getName()); - BOOST_CHECK_EQUAL( false , parserKeyword->hasFixedSize() ); - BOOST_CHECK_EQUAL(OTHER_KEYWORD_IN_DECK , parserKeyword->getSizeType()); - BOOST_CHECK_EQUAL("Bjarne", sizeKW.first ); - BOOST_CHECK_EQUAL("BjarneIgjen" , sizeKW.second ); -} - -BOOST_AUTO_TEST_CASE(ConstructFromJsonObject_missingName_throws) { - Json::JsonObject jsonObject("{\"nameXX\": \"BPR\", \"sections\":[\"SUMMARY\"], \"size\" : 100}"); - BOOST_CHECK_THROW(std::make_shared(jsonObject) , std::invalid_argument); -} - -/* - "items": [{"name" : "I" , "size_type" : "SINGLE" , "value_type" : "int"}] -*/ -BOOST_AUTO_TEST_CASE(ConstructFromJsonObject_invalidItems_throws) { - Json::JsonObject jsonObject("{\"name\": \"BPR\", \"sections\":[\"SUMMARY\"], \"size\" : 100 , \"items\" : 100}"); - BOOST_CHECK_THROW(std::make_shared(jsonObject) , std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(ConstructFromJsonObject_ItemMissingName_throws) { - Json::JsonObject jsonObject("{\"name\": \"BPR\", \"sections\":[\"SUMMARY\"], \"size\" : 100 , \"items\" : [{\"nameX\" : \"I\" , \"value_type\" : \"INT\"}]}"); - BOOST_CHECK_THROW(std::make_shared(jsonObject) , std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(ConstructFromJsonObject_ItemMissingValueType_throws) { - Json::JsonObject jsonObject("{\"name\": \"BPR\", \"sections\":[\"SUMMARY\"], \"size\" : 100 , \"items\" : [{\"name\" : \"I\" , \"size_type\" : \"SINGLE\" , \"Xvalue_type\" : \"INT\"}]}"); - BOOST_CHECK_THROW(std::make_shared(jsonObject) , std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(ConstructFromJsonObject_ItemInvalidEnum_throws) { - Json::JsonObject jsonObject1("{\"name\": \"BPR\", \"sections\":[\"SUMMARY\"], \"size\" : 100 , \"items\" : [{\"name\" : \"I\" , \"size_type\" : \"XSINGLE\" , \"value_type\" : \"INT\"}]}"); - Json::JsonObject jsonObject2("{\"name\": \"BPR\", \"sections\":[\"SUMMARY\"], \"size\" : 100 , \"items\" : [{\"name\" : \"I\" , \"size_type\" : \"SINGLE\" , \"value_type\" : \"INTX\"}]}"); - - BOOST_CHECK_THROW(std::make_shared(jsonObject1) , std::invalid_argument); - BOOST_CHECK_THROW(std::make_shared(jsonObject2) , std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(ConstructFromJsonObjectItemsOK) { - Json::JsonObject jsonObject("{\"name\": \"BPR\", \"sections\":[\"SUMMARY\"], \"size\" : 100 , \"items\" : [{\"name\" : \"I\", \"value_type\" : \"INT\"}]}"); - ParserKeywordConstPtr parserKeyword = std::make_shared(jsonObject); - ParserRecordConstPtr record = parserKeyword->getRecord(0); - ParserItemConstPtr item = record->get( 0 ); - BOOST_CHECK_EQUAL( 1U , record->size( ) ); - BOOST_CHECK_EQUAL( "I" , item->name( ) ); - BOOST_CHECK_EQUAL( SINGLE , item->sizeType()); -} - -BOOST_AUTO_TEST_CASE(ConstructFromJsonObject_sizeFromOther) { - Json::JsonObject jsonConfig("{\"name\": \"EQUILX\", \"sections\":[\"PROPS\"], \"size\" : {\"keyword\":\"EQLDIMS\" , \"item\" : \"NTEQUL\"}, \"items\" :[{\"name\":\"ItemX\" ,\"value_type\" : \"DOUBLE\"}]}"); - BOOST_CHECK_NO_THROW( std::make_shared(jsonConfig) ); -} - -BOOST_AUTO_TEST_CASE(Default_NotData) { - ParserKeywordConstPtr parserKeyword = createDynamicSized("BPR"); - BOOST_CHECK_EQUAL( false , parserKeyword->isDataKeyword()); -} - - -BOOST_AUTO_TEST_CASE(AddDataKeywordFromJson_defaultThrows) { - Json::JsonObject jsonConfig("{\"name\": \"ACTNUM\", \"sections\":[\"GRID\"], \"data\" : {\"value_type\": \"INT\" , \"default\" : 100}}"); - BOOST_CHECK_THROW( std::make_shared(jsonConfig) , std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(AddDataKeywordFromJson_correctlyConfigured) { - Json::JsonObject jsonConfig("{\"name\": \"ACTNUM\", \"sections\":[\"GRID\"], \"data\" : {\"value_type\": \"INT\"}}"); - ParserKeywordConstPtr parserKeyword = std::make_shared(jsonConfig); - ParserRecordConstPtr parserRecord = parserKeyword->getRecord(0); - ParserItemConstPtr item = parserRecord->get(0); - - - BOOST_CHECK_EQUAL( true , parserKeyword->isDataKeyword()); - BOOST_CHECK_EQUAL(true , parserKeyword->hasFixedSize( )); - BOOST_CHECK_EQUAL(1U , parserKeyword->getFixedSize() ); - - BOOST_CHECK_EQUAL( item->name() , ParserKeywords::ACTNUM::data::itemName ); - BOOST_CHECK_EQUAL( ALL , item->sizeType() ); -} - -BOOST_AUTO_TEST_CASE(AddkeywordFromJson_numTables_incoorect_throw) { - Json::JsonObject jsonConfig("{\"name\": \"PVTG\", \"sections\":[\"PROPS\"], \"num_tables\" : 100}"); - BOOST_CHECK_THROW(std::make_shared(jsonConfig) , std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(AddkeywordFromJson_isTableCollection) { - Json::JsonObject jsonConfig("{\"name\": \"PVTG\", \"sections\":[\"PROPS\"], \"num_tables\" : {\"keyword\": \"TABDIMS\" , \"item\" : \"NTPVT\"} , \"items\" : [{\"name\" : \"data\", \"value_type\" : \"DOUBLE\"}]}"); - ParserKeywordConstPtr parserKeyword = std::make_shared(jsonConfig); - ParserRecordConstPtr parserRecord = parserKeyword->getRecord(0); - - - BOOST_CHECK_EQUAL( true , parserKeyword->isTableCollection() ); - BOOST_CHECK_EQUAL( false , parserKeyword->isDataKeyword()); - BOOST_CHECK_EQUAL( false , parserKeyword->hasFixedSize( )); -} - -BOOST_AUTO_TEST_CASE(ConstructFromJsonObject_InvalidSize_throws) { - Json::JsonObject jsonObject1("{\"name\": \"BPR\", \"sections\":[\"SUMMARY\"], \"size\" : \"string\" , \"items\" : [{\"name\" : \"I\" , \"size_type\" : \"SINGLE\" , \"value_type\" : \"INT\"}]}"); - Json::JsonObject jsonObject2("{\"name\": \"BPR\", \"sections\":[\"SUMMARY\"], \"size\" : [1,2,3] , \"items\" : [{\"name\" : \"I\" , \"size_type\" : \"SINGLE\" , \"value_type\" : \"INT\"}]}"); - - BOOST_CHECK_THROW(std::make_shared(jsonObject1) , std::invalid_argument); - BOOST_CHECK_THROW(std::make_shared(jsonObject2) , std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(ConstructFromJsonObject_SizeUNKNOWN_OK) { - Json::JsonObject jsonObject1("{\"name\": \"BPR\", \"sections\":[\"SUMMARY\"], \"size\" : \"UNKNOWN\" , \"items\" : [{\"name\" : \"I\" , \"size_type\" : \"SINGLE\" , \"value_type\" : \"INT\"}]}"); - ParserKeywordConstPtr parserKeyword = std::make_shared(jsonObject1); - - BOOST_CHECK_EQUAL( UNKNOWN , parserKeyword->getSizeType() ); -} - -BOOST_AUTO_TEST_CASE(ConstructFromJsonObject_WithDescription_DescriptionPropertyShouldBePopulated) { - Json::JsonObject jsonObject("{\"name\": \"BPR\", \"sections\":[\"SUMMARY\"], \"description\" : \"Description\"}"); - ParserKeywordConstPtr parserKeyword = std::make_shared(jsonObject); - - BOOST_CHECK_EQUAL( "Description", parserKeyword->getDescription() ); -} - -BOOST_AUTO_TEST_CASE(ConstructFromJsonObject_WithoutDescription_DescriptionPropertyShouldBeEmpty) { - Json::JsonObject jsonObject("{\"name\": \"BPR\", \"sections\":[\"SUMMARY\"]}"); - ParserKeywordConstPtr parserKeyword = std::make_shared(jsonObject); - - BOOST_CHECK_EQUAL( "", parserKeyword->getDescription() ); -} - -/* */ -/*****************************************************************/ -BOOST_AUTO_TEST_CASE(getFixedSize_sizeObjectHasFixedSize_sizeReturned) { - ParserKeywordPtr parserKeyword = createFixedSized("JA", (size_t) 3); - BOOST_CHECK_EQUAL(3U, parserKeyword->getFixedSize()); - -} - -BOOST_AUTO_TEST_CASE(getFixedSize_sizeObjectDoesNotHaveFixedSizeObjectSet_ExceptionThrown) { - ParserKeywordPtr parserKeyword = createDynamicSized("JA"); - BOOST_CHECK_THROW(parserKeyword->getFixedSize(), std::logic_error); -} - -BOOST_AUTO_TEST_CASE(hasFixedSize_hasFixedSizeObject_returnstrue) { - ParserKeywordPtr parserKeyword = createFixedSized("JA", (size_t) 2); - BOOST_CHECK(parserKeyword->hasFixedSize()); -} - -BOOST_AUTO_TEST_CASE(hasFixedSize_sizeObjectDoesNotHaveFixedSize_returnsfalse) { - ParserKeywordPtr parserKeyword = createDynamicSized("JA"); - BOOST_CHECK(!parserKeyword->hasFixedSize()); -} - -/******/ -/* Tables: */ -BOOST_AUTO_TEST_CASE(DefaultIsNot_TableKeyword) { - ParserKeywordPtr parserKeyword = createDynamicSized("JA"); - BOOST_CHECK(!parserKeyword->isTableCollection()); -} - -BOOST_AUTO_TEST_CASE(ConstructorIsTableCollection) { - ParserKeywordPtr parserKeyword = createTable("JA" , "TABDIMS" , "NTPVT" , true); - const std::pair& sizeKW = parserKeyword->getSizeDefinitionPair(); - BOOST_CHECK(parserKeyword->isTableCollection()); - BOOST_CHECK(!parserKeyword->hasFixedSize()); - - BOOST_CHECK_EQUAL( parserKeyword->getSizeType() , OTHER_KEYWORD_IN_DECK); - BOOST_CHECK_EQUAL("TABDIMS", sizeKW.first ); - BOOST_CHECK_EQUAL("NTPVT" , sizeKW.second ); -} - -BOOST_AUTO_TEST_CASE(ParseEmptyRecord) { - ParserKeywordPtr tabdimsKeyword = createFixedSized("TEST" , 1); - std::shared_ptr record = std::make_shared(); - ParserIntItemConstPtr item(new ParserIntItem(std::string("ITEM") , ALL)); - RawKeywordPtr rawkeyword(new RawKeyword( tabdimsKeyword->getName() , "FILE" , 10U , 1)); - ParseContext parseContext; - MessageContainer msgContainer; - - BOOST_CHECK_EQUAL( Raw::FIXED , rawkeyword->getSizeType()); - rawkeyword->addRawRecordString("/"); - record->addItem(item); - tabdimsKeyword->addRecord( record ); - - const auto deckKeyword = tabdimsKeyword->parse( parseContext , msgContainer, rawkeyword ); - BOOST_REQUIRE_EQUAL( 1U , deckKeyword.size()); - - const auto& deckRecord = deckKeyword.getRecord(0); - BOOST_REQUIRE_EQUAL( 1U , deckRecord.size()); - - BOOST_CHECK_EQUAL(0U , deckRecord.getItem( 0 ).size()); -} - - - -/*****************************************************************/ -/* Dimension */ -BOOST_AUTO_TEST_CASE(ParseKeywordHasDimensionCorrect) { - ParserKeywordPtr parserKeyword = createDynamicSized("JA"); - ParserIntItemConstPtr itemI(new ParserIntItem("I", SINGLE)); - ParserDoubleItemPtr item2(new ParserDoubleItem("ID", SINGLE)); - std::shared_ptr record = std::make_shared(); - - BOOST_CHECK_EQUAL( false , parserKeyword->hasDimension()); - - record->addItem( itemI ); - record->addItem( item2 ); - parserKeyword->addRecord( record ); - BOOST_CHECK_EQUAL( false , parserKeyword->hasDimension()); - BOOST_CHECK_EQUAL( 0U , itemI->numDimensions() ); - - item2->push_backDimension("Length*Length/Time"); - BOOST_CHECK_EQUAL( true , parserKeyword->hasDimension()); - BOOST_CHECK_EQUAL( 1U , item2->numDimensions() ); -} - -BOOST_AUTO_TEST_CASE(ConstructFromJsonObject_withDimension) { - Json::JsonObject jsonObject("{\"name\": \"BPR\", \"sections\":[\"SUMMARY\"], \"size\" : 100 , \"items\" :[{\"name\":\"ItemX\" , \"size_type\":\"SINGLE\" , \"value_type\" : \"DOUBLE\" , \"dimension\" : \"Length*Length/Time\"}]}"); - ParserKeywordPtr parserKeyword = std::make_shared(jsonObject); - ParserRecordConstPtr record = parserKeyword->getRecord(0); - ParserItemConstPtr item = record->get("ItemX"); - - BOOST_CHECK_EQUAL("BPR" , parserKeyword->getName()); - BOOST_CHECK_EQUAL( true , parserKeyword->hasFixedSize() ); - BOOST_CHECK_EQUAL( 100U , parserKeyword->getFixedSize() ); - - BOOST_CHECK( parserKeyword->hasDimension() ); - BOOST_CHECK( item->hasDimension() ); - BOOST_CHECK_EQUAL( 1U , item->numDimensions() ); -} - -BOOST_AUTO_TEST_CASE(ConstructFromJsonObject_withDimensionList) { - Json::JsonObject jsonObject("{\"name\": \"BPR\", \"sections\":[\"SUMMARY\"], \"size\" : 100 , \"items\" :[{\"name\":\"ItemX\" , \"size_type\":\"ALL\" , \"value_type\" : \"DOUBLE\" , \"dimension\" : [\"Length*Length/Time\" , \"Time\", \"1\"]}]}"); - ParserKeywordPtr parserKeyword = std::make_shared(jsonObject); - ParserRecordConstPtr record = parserKeyword->getRecord(0); - ParserItemConstPtr item = record->get("ItemX"); - - BOOST_CHECK_EQUAL("BPR" , parserKeyword->getName()); - BOOST_CHECK_EQUAL( true , parserKeyword->hasFixedSize() ); - BOOST_CHECK_EQUAL( 100U , parserKeyword->getFixedSize() ); - - BOOST_CHECK( parserKeyword->hasDimension() ); - BOOST_CHECK( item->hasDimension() ); - BOOST_CHECK_EQUAL( 3U , item->numDimensions() ); -} - - - - - -BOOST_AUTO_TEST_CASE(ConstructFromJson_withRecords) { - const std::string json_string1 = "{\"name\" : \"MULTFLT\", \"sections\" : [\"GRID\", \"EDIT\", \"SCHEDULE\"], \"records\" : [[" - "{\"name\" : \"fault\" , \"value_type\" : \"STRING\"}," - "{\"name\" : \"factor\" , \"value_type\" : \"DOUBLE\"}]]}"; - - const std::string json_string2 = "{\"name\" : \"MULTFLT\", \"sections\" : [\"GRID\", \"EDIT\", \"SCHEDULE\"], \"items\" : [" - "{\"name\" : \"fault\" , \"value_type\" : \"STRING\"}," - "{\"name\" : \"factor\" , \"value_type\" : \"DOUBLE\"}]}"; - - - Json::JsonObject jsonObject1( json_string1 ); - Json::JsonObject jsonObject2( json_string2 ); - ParserKeywordPtr kw1 = std::make_shared( jsonObject1 ); - ParserKeywordPtr kw2 = std::make_shared( jsonObject2 ); - - BOOST_CHECK( kw1->equal( *kw2 )); - -} - -BOOST_AUTO_TEST_CASE(ConstructFromJson_withRecords_and_items_throws) { - const std::string json_string = "{\"name\" : \"MULTFLT\", \"sections\" : [\"GRID\", \"EDIT\", \"SCHEDULE\"], \"records\" : [[" - "{\"name\" : \"fault\" , \"value_type\" : \"STRING\"}," - "{\"name\" : \"factor\" , \"value_type\" : \"DOUBLE\"}]],\"items\" : [" - "{\"name\" : \"fault\" , \"value_type\" : \"STRING\"}," - "{\"name\" : \"factor\" , \"value_type\" : \"DOUBLE\"}]}"; - Json::JsonObject jsonObject( json_string ); - BOOST_CHECK_THROW( std::make_shared( jsonObject ) , std::invalid_argument); -} - - -BOOST_AUTO_TEST_CASE(Create1Arg) { - ParserKeyword kw("GRID"); - BOOST_CHECK_EQUAL( false , kw.hasDimension() ); - BOOST_CHECK( kw.hasFixedSize() ); - BOOST_CHECK_EQUAL( kw.getFixedSize( ) , 0 ); - - BOOST_CHECK_THROW( kw.getRecord( 0 ) , std::invalid_argument ); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/tests/ParserRecordTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/tests/ParserRecordTests.cpp deleted file mode 100644 index d1912a9620..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/tests/ParserRecordTests.cpp +++ /dev/null @@ -1,390 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - - -#define BOOST_TEST_MODULE ParserTests -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "opm/parser/eclipse/RawDeck/RawKeyword.hpp" -#include "opm/parser/eclipse/Parser/ParserKeyword.hpp" - -using namespace Opm; - -BOOST_AUTO_TEST_CASE(DefaultConstructor_NoParams_NoThrow) { - BOOST_CHECK_NO_THROW(ParserRecord record); -} - -BOOST_AUTO_TEST_CASE(InitSharedPointer_NoThrow) { - BOOST_CHECK_NO_THROW(ParserRecordConstPtr ptr(new ParserRecord())); - BOOST_CHECK_NO_THROW(ParserRecordPtr ptr(new ParserRecord())); -} - -BOOST_AUTO_TEST_CASE(Size_NoElements_ReturnsZero) { - ParserRecord record; - BOOST_CHECK_EQUAL(0U, record.size()); -} - -BOOST_AUTO_TEST_CASE(Size_OneItem_Return1) { - ParserItemSizeEnum sizeType = SINGLE; - ParserIntItemPtr itemInt(new ParserIntItem("ITEM1", sizeType)); - ParserRecordPtr record(new ParserRecord()); - record->addItem(itemInt); - BOOST_CHECK_EQUAL(1U, record->size()); -} - -BOOST_AUTO_TEST_CASE(Get_OneItem_Return1) { - ParserItemSizeEnum sizeType = SINGLE; - ParserIntItemPtr itemInt(new ParserIntItem("ITEM1", sizeType)); - ParserRecordPtr record(new ParserRecord()); - record->addItem(itemInt); - { - ParserItemConstPtr item = record->get(0); - BOOST_CHECK_EQUAL(item, itemInt); - } -} - -BOOST_AUTO_TEST_CASE(Get_outOfRange_Throw) { - ParserRecordConstPtr record(new ParserRecord()); - BOOST_CHECK_THROW(record->get(0), std::out_of_range); -} - -BOOST_AUTO_TEST_CASE(Get_KeyNotFound_Throw) { - ParserRecordPtr record(new ParserRecord()); - BOOST_CHECK_THROW(record->get("Hei"), std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(Get_KeyFound_OK) { - ParserItemSizeEnum sizeType = SINGLE; - ParserIntItemPtr itemInt(new ParserIntItem("ITEM1", sizeType)); - ParserRecordPtr record(new ParserRecord()); - record->addItem(itemInt); - { - ParserItemConstPtr item = record->get("ITEM1"); - BOOST_CHECK_EQUAL(item, itemInt); - } -} - -BOOST_AUTO_TEST_CASE(Get_GetByNameAndIndex_OK) { - ParserItemSizeEnum sizeType = SINGLE; - ParserIntItemPtr itemInt(new ParserIntItem("ITEM1", sizeType)); - ParserRecordPtr record(new ParserRecord()); - record->addItem(itemInt); - { - ParserItemConstPtr itemByName = record->get("ITEM1"); - ParserItemConstPtr itemByIndex = record->get(0); - BOOST_CHECK_EQUAL(itemInt, itemByName); - BOOST_CHECK_EQUAL(itemInt, itemByIndex); - } -} - -BOOST_AUTO_TEST_CASE(addItem_SameName_Throw) { - ParserItemSizeEnum sizeType = SINGLE; - ParserIntItemPtr itemInt1(new ParserIntItem("ITEM1", sizeType)); - ParserIntItemPtr itemInt2(new ParserIntItem("ITEM1", sizeType)); - ParserRecordPtr record(new ParserRecord()); - record->addItem(itemInt1); - BOOST_CHECK_THROW(record->addItem(itemInt2), std::invalid_argument); -} - -static ParserRecordPtr createSimpleParserRecord() { - ParserItemSizeEnum sizeType = SINGLE; - ParserIntItemPtr itemInt1(new ParserIntItem("ITEM1", sizeType)); - ParserIntItemPtr itemInt2(new ParserIntItem("ITEM2", sizeType)); - ParserRecordPtr record(new ParserRecord()); - - record->addItem(itemInt1); - record->addItem(itemInt2); - - return record; -} - -BOOST_AUTO_TEST_CASE(parse_validRecord_noThrow) { - ParserRecordPtr record = createSimpleParserRecord(); - ParseContext parseContext; - RawRecord raw( string_view( "100 443" ) ); - MessageContainer msgContainer; - BOOST_CHECK_NO_THROW(record->parse(parseContext, msgContainer, raw ) ); -} - -BOOST_AUTO_TEST_CASE(parse_validRecord_deckRecordCreated) { - ParserRecordPtr record = createSimpleParserRecord(); - RawRecord rawRecord( string_view( "100 443" ) ); - ParseContext parseContext; - MessageContainer msgContainer; - const auto deckRecord = record->parse(parseContext , msgContainer, rawRecord); - BOOST_CHECK_EQUAL(2U, deckRecord.size()); -} - - -// INT INT DOUBLE DOUBLE INT DOUBLE - -static ParserRecordPtr createMixedParserRecord() { - - ParserItemSizeEnum sizeType = SINGLE; - ParserIntItemPtr itemInt1(new ParserIntItem("INTITEM1", sizeType)); - ParserIntItemPtr itemInt2(new ParserIntItem("INTITEM2", sizeType)); - ParserDoubleItemPtr itemDouble1(new ParserDoubleItem("DOUBLEITEM1", sizeType)); - ParserDoubleItemPtr itemDouble2(new ParserDoubleItem("DOUBLEITEM2", sizeType)); - - ParserIntItemPtr itemInt3(new ParserIntItem("INTITEM3", sizeType)); - ParserDoubleItemPtr itemDouble3(new ParserDoubleItem("DOUBLEITEM3", sizeType)); - - ParserRecordPtr record(new ParserRecord()); - record->addItem(itemInt1); - record->addItem(itemInt2); - record->addItem(itemDouble1); - record->addItem(itemDouble2); - record->addItem(itemInt3); - record->addItem(itemDouble3); - - return record; -} - -BOOST_AUTO_TEST_CASE(parse_validMixedRecord_noThrow) { - ParserRecordPtr record = createMixedParserRecord(); - RawRecord rawRecord( string_view( "1 2 10.0 20.0 4 90.0") ); - ParseContext parseContext; - MessageContainer msgContainer; - BOOST_CHECK_NO_THROW(record->parse(parseContext , msgContainer, rawRecord)); -} - -BOOST_AUTO_TEST_CASE(Equal_Equal_ReturnsTrue) { - ParserRecordPtr record1 = createMixedParserRecord(); - ParserRecordPtr record2 = createMixedParserRecord(); - - BOOST_CHECK(record1->equal(*record1)); - BOOST_CHECK(record1->equal(*record2)); -} - -BOOST_AUTO_TEST_CASE(Equal_Different_ReturnsFalse) { - ParserItemSizeEnum sizeType = SINGLE; - ParserIntItemPtr itemInt(new ParserIntItem("INTITEM1", sizeType, 0)); - ParserDoubleItemPtr itemDouble(new ParserDoubleItem("DOUBLEITEM1", sizeType, 0)); - ParserStringItemPtr itemString(new ParserStringItem("STRINGITEM1", sizeType)); - ParserRecordPtr record1(new ParserRecord()); - ParserRecordPtr record2(new ParserRecord()); - ParserRecordPtr record3(new ParserRecord()); - - record1->addItem(itemInt); - record1->addItem(itemDouble); - - record2->addItem(itemInt); - record2->addItem(itemDouble); - record2->addItem(itemString); - - record3->addItem(itemDouble); - record3->addItem(itemInt); - BOOST_CHECK(!record1->equal(*record2)); - BOOST_CHECK(!record1->equal(*record3)); - -} - -BOOST_AUTO_TEST_CASE(ParseWithDefault_defaultAppliedCorrectInDeck) { - ParserRecord parserRecord; - ParserIntItemConstPtr itemInt(new ParserIntItem("ITEM1", SINGLE , 100)); - ParserStringItemConstPtr itemString(new ParserStringItem("ITEM2", SINGLE , "DEFAULT")); - ParserDoubleItemConstPtr itemDouble(new ParserDoubleItem("ITEM3", SINGLE , 3.14 )); - - parserRecord.addItem(itemInt); - parserRecord.addItem(itemString); - parserRecord.addItem(itemDouble); - - // according to the RM, this is invalid ("an asterisk by itself is not sufficient"), - // but it seems to appear in the wild. Thus, we interpret this as "1*"... - { - RawRecord rawRecord( "* " ); - const auto deckStringItem = itemString->scan(rawRecord); - const auto deckIntItem = itemInt->scan(rawRecord); - const auto deckDoubleItem = itemDouble->scan(rawRecord); - - BOOST_CHECK(deckStringItem.size() == 1); - BOOST_CHECK(deckIntItem.size() == 1); - BOOST_CHECK(deckDoubleItem.size() == 1); - - BOOST_CHECK(deckStringItem.defaultApplied(0)); - BOOST_CHECK(deckIntItem.defaultApplied(0)); - BOOST_CHECK(deckDoubleItem.defaultApplied(0)); - } - - { - RawRecord rawRecord( "" ); - const auto deckStringItem = itemString->scan(rawRecord); - const auto deckIntItem = itemInt->scan(rawRecord); - const auto deckDoubleItem = itemDouble->scan(rawRecord); - - BOOST_CHECK(deckStringItem.size() == 1); - BOOST_CHECK(deckIntItem.size() == 1); - BOOST_CHECK(deckDoubleItem.size() == 1); - - BOOST_CHECK(deckStringItem.defaultApplied(0)); - BOOST_CHECK(deckIntItem.defaultApplied(0)); - BOOST_CHECK(deckDoubleItem.defaultApplied(0)); - } - - - { - RawRecord rawRecord( "TRYGVE 10 2.9 " ); - - // let the raw record be "consumed" by the items. Note that the scan() method - // modifies the rawRecord object! - const auto deckStringItem = itemString->scan(rawRecord); - const auto deckIntItem = itemInt->scan(rawRecord); - const auto deckDoubleItem = itemDouble->scan(rawRecord); - - BOOST_CHECK(deckStringItem.size() == 1); - BOOST_CHECK(deckIntItem.size() == 1); - BOOST_CHECK(deckDoubleItem.size() == 1); - - BOOST_CHECK(!deckStringItem.defaultApplied(0)); - BOOST_CHECK(!deckIntItem.defaultApplied(0)); - BOOST_CHECK(!deckDoubleItem.defaultApplied(0)); - } - - // again this is invalid according to the RM, but it is used anyway in the wild... - { - RawRecord rawRecord( "* * *" ); - const auto deckStringItem = itemString->scan(rawRecord); - const auto deckIntItem = itemInt->scan(rawRecord); - const auto deckDoubleItem = itemDouble->scan(rawRecord); - - BOOST_CHECK(deckStringItem.size() == 1); - BOOST_CHECK(deckIntItem.size() == 1); - BOOST_CHECK(deckDoubleItem.size() == 1); - - BOOST_CHECK(deckStringItem.defaultApplied(0)); - BOOST_CHECK(deckIntItem.defaultApplied(0)); - BOOST_CHECK(deckDoubleItem.defaultApplied(0)); - } - - { - RawRecord rawRecord( "3*" ); - const auto deckStringItem = itemString->scan(rawRecord); - const auto deckIntItem = itemInt->scan(rawRecord); - const auto deckDoubleItem = itemDouble->scan(rawRecord); - - BOOST_CHECK(deckStringItem.size() == 1); - BOOST_CHECK(deckIntItem.size() == 1); - BOOST_CHECK(deckDoubleItem.size() == 1); - - BOOST_CHECK(deckStringItem.defaultApplied(0)); - BOOST_CHECK(deckIntItem.defaultApplied(0)); - BOOST_CHECK(deckDoubleItem.defaultApplied(0)); - } -} - -BOOST_AUTO_TEST_CASE(Parse_RawRecordTooManyItems_Throws) { - ParserRecordPtr parserRecord(new ParserRecord()); - ParserIntItemConstPtr itemI(new ParserIntItem("I", SINGLE)); - ParserIntItemConstPtr itemJ(new ParserIntItem("J", SINGLE)); - ParserIntItemConstPtr itemK(new ParserIntItem("K", SINGLE)); - ParseContext parseContext; - - parserRecord->addItem(itemI); - parserRecord->addItem(itemJ); - parserRecord->addItem(itemK); - - - RawRecord rawRecord( "3 3 3 " ); - MessageContainer msgContainer; - - BOOST_CHECK_NO_THROW(parserRecord->parse(parseContext , msgContainer, rawRecord)); - - RawRecord rawRecordOneExtra( "3 3 3 4 " ); - BOOST_CHECK_THROW(parserRecord->parse(parseContext , msgContainer, rawRecordOneExtra), std::invalid_argument); - - RawRecord rawRecordForgotRecordTerminator( "3 3 3 \n 4 4 4 " ); - BOOST_CHECK_THROW(parserRecord->parse(parseContext , msgContainer, rawRecordForgotRecordTerminator), std::invalid_argument); - -} - - -BOOST_AUTO_TEST_CASE(Parse_RawRecordTooFewItems) { - ParserRecordPtr parserRecord(new ParserRecord()); - ParserIntItemConstPtr itemI(new ParserIntItem("I", SINGLE)); - ParserIntItemConstPtr itemJ(new ParserIntItem("J", SINGLE)); - ParserIntItemConstPtr itemK(new ParserIntItem("K", SINGLE)); - - parserRecord->addItem(itemI); - parserRecord->addItem(itemJ); - parserRecord->addItem(itemK); - - ParseContext parseContext; - RawRecord rawRecord( "3 3 " ); - // no default specified for the third item, record can be parsed just fine but trying - // to access the data will raise an exception... - MessageContainer msgContainer; - BOOST_CHECK_NO_THROW(parserRecord->parse(parseContext , msgContainer, rawRecord)); - auto record = parserRecord->parse(parseContext , msgContainer, rawRecord); - BOOST_CHECK_NO_THROW(record.getItem(2)); - BOOST_CHECK_THROW(record.getItem(2).get< int >(0), std::out_of_range); -} - - - -BOOST_AUTO_TEST_CASE(ParseRecordHasDimensionCorrect) { - ParserRecordPtr parserRecord(new ParserRecord()); - ParserIntItemConstPtr itemI(new ParserIntItem("I", SINGLE)); - ParserDoubleItemPtr item2(new ParserDoubleItem("ID", SINGLE)); - - BOOST_CHECK_EQUAL( false , parserRecord->hasDimension()); - - parserRecord->addItem( itemI ); - parserRecord->addItem( item2 ); - BOOST_CHECK_EQUAL( false , parserRecord->hasDimension()); - - item2->push_backDimension("Length*Length/Time"); - BOOST_CHECK_EQUAL( true , parserRecord->hasDimension()); -} - - -BOOST_AUTO_TEST_CASE(DefaultNotDataRecord) { - ParserRecord record; - BOOST_CHECK_EQUAL( false , record.isDataRecord() ); -} - - - -BOOST_AUTO_TEST_CASE(MixingDataAndItems_throws1) { - ParserRecord record; - ParserIntItemConstPtr dataItem = ParserIntItemConstPtr(new ParserIntItem( "ACTNUM" , ALL)); - ParserIntItemConstPtr item = ParserIntItemConstPtr(new ParserIntItem( "XXX" , ALL)); - record.addDataItem( dataItem ); - BOOST_CHECK_THROW( record.addItem( item ) , std::invalid_argument); - BOOST_CHECK_THROW( record.addItem( dataItem ) , std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(MixingDataAndItems_throws2) { - ParserRecord record; - ParserIntItemConstPtr dataItem = ParserIntItemConstPtr(new ParserIntItem( "ACTNUM" , ALL)); - ParserIntItemConstPtr item = ParserIntItemConstPtr(new ParserIntItem( "XXX" , ALL)); - - record.addItem( item ); - BOOST_CHECK_THROW( record.addDataItem( dataItem ) , std::invalid_argument); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/tests/ParserTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/tests/ParserTests.cpp deleted file mode 100644 index 0dc24dd2c2..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Parser/tests/ParserTests.cpp +++ /dev/null @@ -1,358 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include -#define BOOST_TEST_MODULE ParserTests -#include - -#include - -#include -#include - -#include -#include -#include -#include - -#include -#include - - -using namespace Opm; - -inline std::unique_ptr< ParserKeyword > createDynamicSized(const std::string& kw) { - std::unique_ptr< ParserKeyword > pkw( new ParserKeyword( kw ) ); - pkw->setSizeType(SLASH_TERMINATED); - return pkw; -} - - -/************************Basic structural tests**********************'*/ - -BOOST_AUTO_TEST_CASE(Initializing) { - BOOST_CHECK_NO_THROW(Parser parser); - BOOST_CHECK_NO_THROW(Parser parser); - BOOST_CHECK_NO_THROW(ParserPtr parserPtr(new Parser())); - BOOST_CHECK_NO_THROW(ParserConstPtr parserConstPtr(new Parser())); -} - -BOOST_AUTO_TEST_CASE(addKeyword_keyword_doesntfail) { - Parser parser; - parser.addParserKeyword( createDynamicSized( "EQUIL" ) ); -} - - -BOOST_AUTO_TEST_CASE(canParseDeckKeyword_returnstrue) { - ParserPtr parser(new Parser()); - parser->addParserKeyword(createDynamicSized("FJAS")); - BOOST_CHECK(parser->isRecognizedKeyword("FJAS")); -} - - -BOOST_AUTO_TEST_CASE(getKeyword_haskeyword_returnskeyword) { - ParserPtr parser(new Parser()); - parser->addParserKeyword( createDynamicSized( "FJAS" ) ); - BOOST_CHECK_EQUAL("FJAS", parser->getParserKeywordFromDeckName("FJAS")->getName()); -} - -BOOST_AUTO_TEST_CASE(getKeyword_hasnotkeyword_getKeywordThrowsException) { - ParserPtr parser(new Parser()); - parser->addParserKeyword( createDynamicSized( "FJAS" ) ); - BOOST_CHECK_THROW(parser->getParserKeywordFromDeckName("FJASS"), std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(getAllDeckNames_hasTwoKeywords_returnsCompleteList) { - ParserPtr parser(new Parser(false)); - std::cout << parser->getAllDeckNames().size() << std::endl; - parser->addParserKeyword( createDynamicSized( "FJAS" ) ); - parser->addParserKeyword( createDynamicSized( "SAJF" ) ); - BOOST_CHECK_EQUAL(2U, parser->getAllDeckNames().size()); -} - -BOOST_AUTO_TEST_CASE(getAllDeckNames_hasNoKeywords_returnsEmptyList) { - ParserPtr parser(new Parser(false)); - BOOST_CHECK_EQUAL(0U, parser->getAllDeckNames().size()); -} - - - -/************************ JSON config related tests **********************'*/ - - -BOOST_AUTO_TEST_CASE(addParserKeywordJSON_isRecognizedKeyword_returnstrue) { - ParserPtr parser(new Parser()); - Json::JsonObject jsonConfig("{\"name\": \"BPR\", \"sections\":[\"SUMMARY\"], \"size\" : 100 , \"items\" :[{\"name\":\"ItemX\" , \"size_type\":\"SINGLE\" , \"value_type\" : \"DOUBLE\"}]}"); - parser->addParserKeyword( jsonConfig ); - BOOST_CHECK(parser->isRecognizedKeyword("BPR")); -} - - -BOOST_AUTO_TEST_CASE(addParserKeywordJSON_size_isObject_allGood) { - ParserPtr parser(new Parser()); - Json::JsonObject jsonConfig("{\"name\": \"EQUIXL\", \"sections\":[], \"size\" : {\"keyword\":\"EQLDIMS\" , \"item\" : \"NTEQUL\"}, \"items\" :[{\"name\":\"ItemX\" , \"size_type\":\"SINGLE\" , \"value_type\" : \"DOUBLE\"}]}"); - parser->addParserKeyword( jsonConfig ); - BOOST_CHECK(parser->isRecognizedKeyword("EQUIXL")); -} - - - -BOOST_AUTO_TEST_CASE(loadKeywordsJSON_notArray_throw) { - ParserPtr parser(new Parser()); - Json::JsonObject jsonConfig( "{\"name\" : \"BPR\" , \"size\" : 100, \"sections\":[\"SUMMARY\"]}"); - - BOOST_CHECK_THROW(parser->loadKeywords( jsonConfig ) , std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(loadKeywordsJSON_noSectionsItem_throw) { - ParserPtr parser(new Parser()); - Json::JsonObject jsonConfig( "[{\"name\" : \"BPR\" , \"size\" : 100, \"items\" :[{\"name\":\"ItemX\" , \"size_type\":\"SINGLE\" , \"value_type\" : \"DOUBLE\"}]}]"); - - BOOST_CHECK_THROW(parser->loadKeywords( jsonConfig ) , std::invalid_argument); -} - - -BOOST_AUTO_TEST_CASE(loadKeywordsJSON_isRecognizedKeyword_returnstrue) { - ParserPtr parser(new Parser()); - Json::JsonObject jsonConfig( "[{\"name\" : \"BPR\" , \"size\" : 100, \"sections\":[\"SUMMARY\"], \"items\" :[{\"name\":\"ItemX\" , \"size_type\":\"SINGLE\" , \"value_type\" : \"DOUBLE\"}]}]"); - - parser->loadKeywords( jsonConfig ); - BOOST_CHECK(parser->isRecognizedKeyword("BPR")); -} - - -BOOST_AUTO_TEST_CASE(empty_sizeReturns0) { - ParserPtr parser(new Parser( false )); - BOOST_CHECK_EQUAL( 0U , parser->size()); -} - - - -BOOST_AUTO_TEST_CASE(loadKeywordsJSON_manyKeywords_returnstrue) { - ParserPtr parser(new Parser( false )); - Json::JsonObject jsonConfig( "[{\"name\" : \"BPR\" , \"size\" : 100, \"sections\":[\"SUMMARY\"] , \"items\" :[{\"name\":\"ItemX\" , \"size_type\":\"SINGLE\" , \"value_type\" : \"DOUBLE\"}]}, {\"name\" : \"WWCT\", \"sections\":[\"SUMMARY\"], \"size\" : 0} , {\"name\" : \"EQUIL\", \"sections\":[\"PROPS\"], \"size\" : 0}]"); - - parser->loadKeywords( jsonConfig ); - BOOST_CHECK(parser->isRecognizedKeyword("BPR")); - BOOST_CHECK(parser->isRecognizedKeyword("WWCT")); - BOOST_CHECK(parser->isRecognizedKeyword("EQUIL")); - BOOST_CHECK_EQUAL( 3U , parser->size() ); -} - - - - -/*****************************************************************/ - - -BOOST_AUTO_TEST_CASE(loadKeywordFromFile_fileDoesNotExist_returnsFalse) { - ParserPtr parser(new Parser()); - boost::filesystem::path configFile("File/does/not/exist"); - BOOST_CHECK_EQUAL( false , parser->loadKeywordFromFile( configFile )); -} - - -BOOST_AUTO_TEST_CASE(loadKeywordFromFile_invalidJson_returnsFalse) { - ParserPtr parser(new Parser()); - boost::filesystem::path configFile("testdata/json/example_invalid_json"); - BOOST_CHECK_EQUAL( false , parser->loadKeywordFromFile( configFile )); -} - - -BOOST_AUTO_TEST_CASE(loadKeywordFromFile_invalidConfig_returnsFalse) { - ParserPtr parser(new Parser()); - boost::filesystem::path configFile("testdata/json/example_missing_name.json"); - BOOST_CHECK_EQUAL( false , parser->loadKeywordFromFile( configFile )); -} - - -BOOST_AUTO_TEST_CASE(loadKeywordFromFile_validKeyword_returnsTrueHasKeyword) { - ParserPtr parser(new Parser( false )); - boost::filesystem::path configFile("testdata/json/BPR"); - BOOST_CHECK_EQUAL( true , parser->loadKeywordFromFile( configFile )); - BOOST_CHECK_EQUAL( 1U , parser->size() ); - BOOST_CHECK_EQUAL( true , parser->isRecognizedKeyword("BPR") ); -} - - - -BOOST_AUTO_TEST_CASE(loadConfigFromDirectory_directoryDoesNotexist_throws) { - ParserPtr parser(new Parser(false)); - boost::filesystem::path configPath("path/does/not/exist"); - BOOST_CHECK_THROW(parser->loadKeywordsFromDirectory( configPath), std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(loadConfigFromDirectory_notRecursive_allNames) { - ParserPtr parser(new Parser(false)); - BOOST_CHECK_EQUAL(false , parser->isRecognizedKeyword("BPR")); - boost::filesystem::path configPath("testdata/config/directory1"); - BOOST_CHECK_NO_THROW(parser->loadKeywordsFromDirectory( configPath, false)); - BOOST_CHECK(parser->isRecognizedKeyword("WWCT")); - BOOST_CHECK_EQUAL(true , parser->isRecognizedKeyword("BPR")); - BOOST_CHECK_EQUAL(false , parser->isRecognizedKeyword("DIMENS")); -} - - -BOOST_AUTO_TEST_CASE(loadConfigFromDirectory_notRecursive_strictNames) { - ParserPtr parser(new Parser(false)); - boost::filesystem::path configPath("testdata/config/directory1"); - BOOST_CHECK_NO_THROW(parser->loadKeywordsFromDirectory( configPath, false)); - BOOST_CHECK(parser->isRecognizedKeyword("WWCT")); - // the file name for the following keyword is "Bpr", but that - // does not matter - BOOST_CHECK_EQUAL(true , parser->isRecognizedKeyword("BPR")); - BOOST_CHECK_EQUAL(false , parser->isRecognizedKeyword("DIMENS")); -} - - -BOOST_AUTO_TEST_CASE(loadConfigFromDirectory_Recursive_allNames) { - ParserPtr parser(new Parser(false)); - BOOST_CHECK_EQUAL(false , parser->isRecognizedKeyword("BPR")); - boost::filesystem::path configPath("testdata/config/directory1"); - BOOST_CHECK_NO_THROW(parser->loadKeywordsFromDirectory( configPath, true)); - BOOST_CHECK(parser->isRecognizedKeyword("WWCT")); - BOOST_CHECK_EQUAL(true , parser->isRecognizedKeyword("BPR")); - BOOST_CHECK_EQUAL(true , parser->isRecognizedKeyword("DIMENS")); -} - - -BOOST_AUTO_TEST_CASE(loadConfigFromDirectory_default) { - ParserPtr parser(new Parser(false)); - BOOST_CHECK_EQUAL(false , parser->isRecognizedKeyword("BPR")); - boost::filesystem::path configPath("testdata/config/directory1"); - BOOST_CHECK_NO_THROW(parser->loadKeywordsFromDirectory( configPath )); - BOOST_CHECK(parser->isRecognizedKeyword("WWCT")); - // the file name for the following keyword is "Bpr", but that - // does not matter - BOOST_CHECK_EQUAL(true , parser->isRecognizedKeyword("BPR")); - BOOST_CHECK_EQUAL(true , parser->isRecognizedKeyword("DIMENS")); -} - -BOOST_AUTO_TEST_CASE(ReplaceKeyword) { - ParserPtr parser(new Parser()); - const auto* eqldims = parser->getParserKeywordFromDeckName("EQLDIMS"); - - BOOST_CHECK( parser->loadKeywordFromFile( "testdata/parser/EQLDIMS2" ) ); - - eqldims = parser->getParserKeywordFromDeckName("EQLDIMS"); - auto record = eqldims->getRecord(0); - BOOST_CHECK(record->hasItem("NEW")); -} - - -BOOST_AUTO_TEST_CASE(WildCardTest) { - ParserPtr parser(new Parser()); - BOOST_CHECK(!parser->isRecognizedKeyword("TVDP*")); - BOOST_CHECK(!parser->isRecognizedKeyword("TVDP")); - BOOST_CHECK(parser->isRecognizedKeyword("TVDPXXX")); - BOOST_CHECK(!parser->isRecognizedKeyword("TVDPIAMTOOLONG")); - BOOST_CHECK(!parser->isRecognizedKeyword("TVD")); - - BOOST_CHECK(!parser->isRecognizedKeyword("TVDP")); - - const auto* keyword1 = parser->getParserKeywordFromDeckName("TVDPA"); - const auto* keyword2 = parser->getParserKeywordFromDeckName("TVDPBC"); - const auto* keyword3 = parser->getParserKeywordFromDeckName("TVDPXXX"); - - BOOST_CHECK_EQUAL( keyword1 , keyword2 ); - BOOST_CHECK_EQUAL( keyword1 , keyword3 ); -} - - -BOOST_AUTO_TEST_CASE( quoted_comments ) { - BOOST_CHECK_EQUAL( Parser::stripComments( "ABC" ) , "ABC"); - BOOST_CHECK_EQUAL( Parser::stripComments( "--ABC") , ""); - BOOST_CHECK_EQUAL( Parser::stripComments( "ABC--DEF") , "ABC"); - BOOST_CHECK_EQUAL( Parser::stripComments( "'ABC'--DEF") , "'ABC'"); - BOOST_CHECK_EQUAL( Parser::stripComments( "\"ABC\"--DEF") , "\"ABC\""); - BOOST_CHECK_EQUAL( Parser::stripComments( "ABC--'DEF'") , "ABC"); - BOOST_CHECK_EQUAL( Parser::stripComments("ABC'--'DEF") , "ABC'--'DEF"); - BOOST_CHECK_EQUAL( Parser::stripComments("ABC'--'DEF\"--\"GHI") , "ABC'--'DEF\"--\"GHI"); - BOOST_CHECK_EQUAL( Parser::stripComments("ABC'--'DEF'GHI") , "ABC'--'DEF'GHI"); - BOOST_CHECK_EQUAL( Parser::stripComments("ABC'--'DEF'--GHI") , "ABC'--'DEF'--GHI"); -} - -BOOST_AUTO_TEST_CASE( PATHS_has_global_scope ) { - Parser parser; - ParseContext parseContext; - - parseContext.update( ParseContext::PARSE_MISSING_INCLUDE , Opm::InputError::THROW_EXCEPTION); - parser.newDeckFromFile( "testdata/parser/PATHSInInclude.data", parseContext ); - BOOST_CHECK_THROW( parser.newDeckFromFile( "testdata/parser/PATHSInIncludeInvalid.data", ParseContext() ), std::invalid_argument ); -} - -BOOST_AUTO_TEST_CASE( handle_empty_title ) { - const auto* input_deck = "RUNSPEC\n\n" - "TITLE\n\n" - "DIMENS\n10 10 10/\n" - "EQLDIMS\n/\n"; - - Parser parser; - const auto deck = parser.newDeckFromString( input_deck, ParseContext() ); - BOOST_CHECK_EQUAL( "untitled", deck->getKeyword( "TITLE" ).getStringData().front() ); - } - -BOOST_AUTO_TEST_CASE( deck_comma_separated_fields ) { - const char* deck = R"( -TABDIMS - 2* 24 2* 20 20 1* 1 7* / - -SWOF - 0.1000, 0.0000e+00, 8.0000e-01 0 - 0.2000, 0, 8.0000e-01 0 - 0.2500, 2.7310e-04, 5.8082e-01 0 - 0.3000, 2.1848e-03, 4.1010e-01 0 - 0.3500, 7.3737e-03, 2.8010e-01 0 - 0.4000, 1.7478e-02, 1.8378e-01 0 - 0.4500, 3.4138e-02, 1.1473e-01 0 - 0.5000, 5.8990e-02, 6.7253e-02 0 - 0.5500, 9.3673e-02, 3.6301e-02 0 - 0.6000, 1.3983e-01, 1.7506e-02 0 - 0.6500, 1.9909e-01, 7.1706e-03 0 - 0.7000, 2.7310e-01, 2.2688e-03 0 - 0.7500, 3.6350e-01, 4.4820e-04 0 - 0.8000, 4.7192e-01, 2.8000e-05 0 - 0.8500, 6.0000e-01, 0.0000e+00 0 - 0.9000, 7.4939e-01, 0.0000e+00 0 -/ -)"; - - BOOST_CHECK_NO_THROW( Parser().newDeckFromString( deck, ParseContext() ) ); - } - - -BOOST_AUTO_TEST_CASE(ParseTNUM) { - const char * deck1 = - "REGIONS\n" - "TNUMFSGS\n" - " 100*1/\n" - "\n" - "TNUMFXXX\n" - " 100*1/\n" - "\n"; - - Opm::ParseContext parseContext; - Opm::Parser parser; - auto deck = parser.parseString( deck1 , parseContext ); - BOOST_CHECK( deck->hasKeyword("TNUMFSGS")); - BOOST_CHECK( deck->hasKeyword("TNUMFXXX")); -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/RawConsts.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/RawConsts.hpp deleted file mode 100644 index 16afc012d3..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/RawConsts.hpp +++ /dev/null @@ -1,90 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef RAWCONSTS_HPP -#define RAWCONSTS_HPP - -#include - -namespace Opm { - - /// Consts used in the non semantic, raw parsing of the eclipse file - namespace RawConsts { - const char slash = '/'; - const char quote = '\''; - const std::string include = "INCLUDE"; - const std::string end = "END"; - const std::string endinclude = "ENDINC"; - const std::string paths = "PATHS"; - const unsigned int maxKeywordLength = 8; - - constexpr bool sep_table[ 256 ] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; - - struct is_separator { - /* - * ch is space, comma, \r, \n, \t, \v or \f => true - * else false - */ - bool operator()( char ch ) const { - return sep_table[ int( ch ) ]; - } - }; - - constexpr bool q_table[ 256 ] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; - - struct is_quote { - /* - * ch is ' or " => true - * else false - */ - bool operator()( char ch ) const { - return q_table[ int( ch ) ]; - } - }; - } -} - - -#endif /* RAWCONSTS_HPP */ - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/RawEnums.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/RawEnums.hpp deleted file mode 100644 index 34f60ba472..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/RawEnums.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef RAW_ENUMS_H -#define RAW_ENUMS_H - -namespace Opm { - - namespace Raw { - - enum KeywordSizeEnum { - SLASH_TERMINATED = 0, - FIXED = 1, - UNKNOWN = 3, - TABLE_COLLECTION = 4 - }; - } -} - - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/RawKeyword.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/RawKeyword.cpp deleted file mode 100644 index 261f236404..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/RawKeyword.cpp +++ /dev/null @@ -1,207 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ -#include -#include - -#include -#include -#include -#include -#include - -namespace Opm { - - static const std::string emptystr = ""; - - RawKeyword::RawKeyword(const string_view& name, Raw::KeywordSizeEnum sizeType , const std::string& filename, size_t lineNR) : - m_partialRecordString( emptystr ) - { - if (sizeType == Raw::SLASH_TERMINATED || sizeType == Raw::UNKNOWN) { - commonInit(name.string(),filename,lineNR); - m_sizeType = sizeType; - } else - throw std::invalid_argument("Error - invalid sizetype on input"); - } - - RawKeyword::RawKeyword(const string_view& name , const std::string& filename, size_t lineNR , size_t inputSize, bool isTableCollection ) { - commonInit(name.string(),filename,lineNR); - if (isTableCollection) { - m_sizeType = Raw::TABLE_COLLECTION; - m_numTables = inputSize; - } else { - m_sizeType = Raw::FIXED; - m_fixedSize = inputSize; - if (m_fixedSize == 0) - m_isFinished = true; - else - m_isFinished = false; - } - } - - - void RawKeyword::commonInit(const std::string& name , const std::string& filename, size_t lineNR) { - setKeywordName( name ); - m_filename = filename; - m_lineNR = lineNR; - - this->m_is_title = name == "TITLE"; - } - - - const std::string& RawKeyword::getKeywordName() const { - return m_name; - } - - size_t RawKeyword::size() const { - return m_records.size(); - } - - static inline bool isTerminator( const string_view& line ) { - return line.size() == 1 && line.back() == RawConsts::slash; - } - - /// Important method, being repeatedly called. When a record is terminated, - /// it is added to the list of records, and a new record is started. - - void RawKeyword::addRawRecordString(const string_view& partialRecordString) { - if( m_partialRecordString == emptystr ) m_partialRecordString = partialRecordString; - else m_partialRecordString = { m_partialRecordString.begin(), partialRecordString.end() }; - - - if( m_sizeType != Raw::FIXED && isTerminator( m_partialRecordString ) ) { - if (m_sizeType == Raw::TABLE_COLLECTION) { - m_currentNumTables += 1; - if (m_currentNumTables == m_numTables) { - m_isFinished = true; - m_partialRecordString = emptystr; - return; - } - } else if( m_sizeType != Raw::UNKNOWN ) { - m_isFinished = true; - m_partialRecordString = emptystr; - return; - } - } - - if( m_isFinished ) return; - - if( this->is_title() ) { - - string_view recstr = m_partialRecordString == "" - ? "untitled" - : m_partialRecordString; - - m_records.emplace_back( recstr, m_filename, m_name ); - m_partialRecordString = emptystr; - m_isFinished = true; - return; - } - - if( RawRecord::isTerminatedRecordString( partialRecordString ) ) { - - auto recstr = partialRecordString.back() == '/' - ? string_view{ m_partialRecordString.begin(), m_partialRecordString.end() - 1 } - : m_partialRecordString; - - m_records.emplace_back( recstr, m_filename, m_name ); - m_partialRecordString = emptystr; - - if( m_sizeType == Raw::FIXED && m_records.size() == m_fixedSize ) - m_isFinished = true; - } - } - - const RawRecord& RawKeyword::getFirstRecord() const { - return *m_records.begin(); - } - - bool RawKeyword::isKeywordPrefix(const string_view& line, std::string& keyword ) { - // make the keyword string ALL_UPPERCASE because Eclipse seems - // to be case-insensitive (although this is one of its - // undocumented features...) - keyword = uppercase( ParserKeyword::getDeckName( line ).string() ); - - return isValidKeyword( keyword ); - } - - bool RawKeyword::isValidKeyword(const std::string& keywordCandidate) { - return ParserKeyword::validDeckName(keywordCandidate); - } - - void RawKeyword::setKeywordName(const std::string& name) { - m_name = boost::algorithm::trim_right_copy(name); - if (!isValidKeyword(m_name)) { - throw std::invalid_argument("Not a valid keyword:" + name); - } else if (m_name.size() > Opm::RawConsts::maxKeywordLength) { - throw std::invalid_argument("Too long keyword:" + name); - } else if (boost::algorithm::trim_left_copy(m_name) != m_name) { - throw std::invalid_argument("Illegal whitespace start of keyword:" + name); - } - } - - bool RawKeyword::isPartialRecordStringEmpty() const { - return m_partialRecordString.size() == 0; - } - - - void RawKeyword::finalizeUnknownSize() { - if (m_sizeType == Raw::UNKNOWN) - m_isFinished = true; - else - throw std::invalid_argument("Fatal error finalizing keyword:" + m_name + " Only RawKeywords with UNKNOWN size can be explicitly finalized."); - } - - - bool RawKeyword::isFinished() const { - return m_isFinished; - } - - const std::string& RawKeyword::getFilename() const { - return m_filename; - } - - size_t RawKeyword::getLineNR() const { - return m_lineNR; - } - - RawKeyword::const_iterator RawKeyword::begin() const { - return this->m_records.begin(); - } - - RawKeyword::const_iterator RawKeyword::end() const { - return this->m_records.end(); - } - - RawKeyword::iterator RawKeyword::begin() { - return this->m_records.begin(); - } - - RawKeyword::iterator RawKeyword::end() { - return this->m_records.end(); - } - - bool RawKeyword::is_title() const { - return this->m_is_title; - } - - Raw::KeywordSizeEnum RawKeyword::getSizeType() const { - return m_sizeType; - } -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/RawKeyword.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/RawKeyword.hpp deleted file mode 100644 index 6ce0809e85..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/RawKeyword.hpp +++ /dev/null @@ -1,99 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef RAWKEYWORD_HPP -#define RAWKEYWORD_HPP - -#include -#include -#include -#include - -#include -#include - -namespace Opm { - - class RawRecord; - class string_view; - - /// Class representing a RawKeyword, meaning both the actual keyword phrase, and the records, - /// represented as a list of RawRecord objects. - /// The class also contains static functions to aid the parsing of the input file. - /// The creating of an instance is performed by calling the addRawRecordString method repeatedly. - - class RawKeyword { - public: - RawKeyword(const string_view& name , Raw::KeywordSizeEnum sizeType , const std::string& filename, size_t lineNR); - RawKeyword(const string_view& name , const std::string& filename, size_t lineNR , size_t inputSize , bool isTableCollection = false); - - const std::string& getKeywordName() const; - void addRawRecordString( const string_view& ); - size_t size() const; - Raw::KeywordSizeEnum getSizeType() const; - - // Special case method only for inspecting INCLUDE keywords; - // the general getRecords functionality should use the - // iterator interface. - const RawRecord& getFirstRecord( ) const; - - static bool isKeywordPrefix(const string_view& line, std::string& keywordName); - - bool isPartialRecordStringEmpty() const; - bool isFinished() const; - bool unKnownSize() const; - void finalizeUnknownSize(); - - const std::string& getFilename() const; - size_t getLineNR() const; - - using const_iterator = std::list< RawRecord >::const_iterator; - using iterator = std::list< RawRecord >::iterator; - - const_iterator begin() const; - const_iterator end() const; - iterator begin(); - iterator end(); - - bool is_title() const; - - private: - Raw::KeywordSizeEnum m_sizeType; - bool m_isFinished = false; - size_t m_fixedSize; - size_t m_numTables; - size_t m_currentNumTables = 0; - std::string m_name; - std::list< RawRecord > m_records; - string_view m_partialRecordString; - - size_t m_lineNR; - std::string m_filename; - bool m_is_title = false; - - void commonInit(const std::string& name,const std::string& filename, size_t lineNR); - void setKeywordName(const std::string& keyword); - static bool isValidKeyword(const std::string& keywordCandidate); - }; - typedef std::shared_ptr RawKeywordPtr; - typedef std::shared_ptr RawKeywordConstPtr; - -} -#endif /* RAWKEYWORD_HPP */ - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/RawRecord.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/RawRecord.cpp deleted file mode 100644 index 192acd0220..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/RawRecord.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include -#include -#include - -#include -#include - -#include - -using namespace Opm; -using namespace std; - -namespace Opm { - -namespace { - -std::deque< string_view > splitSingleRecordString( const string_view& record ) { - auto first_nonspace = []( string_view::const_iterator begin, - string_view::const_iterator end ) { - return std::find_if_not( begin, end, RawConsts::is_separator() ); - }; - - std::deque< string_view > dst; - auto current = record.begin(); - while( (current = first_nonspace( current, record.end() )) != record.end() ) - { - if( *current == RawConsts::quote ) { - auto quote_end = std::find( current + 1, record.end(), RawConsts::quote ) + 1; - dst.push_back( { current, quote_end } ); - current = quote_end; - } else { - auto token_end = std::find_if( current, record.end(), RawConsts::is_separator() ); - dst.push_back( { current, token_end } ); - current = token_end; - } - } - - return dst; -} - -/* - * It is assumed that after a record is terminated, there is no quote marks - * in the subsequent comment. This is in accordance with the Eclipse user - * manual. - * - * If a "non-complete" record string is supplied, an invalid_argument - * exception is thrown. - * - */ - -template< typename T > -inline bool even_quotes( const T& str ) { - return std::count( str.begin(), str.end(), RawConsts::quote ) % 2 == 0; -} - -} - - RawRecord::RawRecord(const string_view& singleRecordString, - const std::string& fileName, - const std::string& keywordName) : - m_sanitizedRecordString( singleRecordString ), - m_recordItems( splitSingleRecordString( m_sanitizedRecordString ) ), - m_fileName(fileName), - m_keywordName(keywordName) - { - - if( !even_quotes( singleRecordString ) ) - throw std::invalid_argument( - "Input string is not a complete record string, " - "offending string: '" + singleRecordString + "'" - ); - } - - const std::string& RawRecord::getFileName() const { - return m_fileName; - } - - const std::string& RawRecord::getKeywordName() const { - return m_keywordName; - } - - void RawRecord::prepend( size_t count, string_view tok ) { - this->m_recordItems.insert( this->m_recordItems.begin(), count, tok ); - } - - void RawRecord::dump() const { - std::cout << "RecordDump: "; - for (size_t i = 0; i < m_recordItems.size(); i++) { - std::cout - << this->m_recordItems[i] << "/" - << getItem( i ) << " "; - } - std::cout << std::endl; - } - - std::string RawRecord::getRecordString() const { - return m_sanitizedRecordString.string(); - } - - bool RawRecord::isTerminatedRecordString( const string_view& str ) { - return str.back() == RawConsts::slash; - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/RawRecord.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/RawRecord.hpp deleted file mode 100644 index 783f1618f7..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/RawRecord.hpp +++ /dev/null @@ -1,85 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef RECORD_HPP -#define RECORD_HPP - -#include -#include -#include -#include - -#include - -namespace Opm { - - /// Class representing the lowest level of the Raw datatypes, a record. A record is simply - /// a vector containing the record elements, represented as strings. Some logic is present - /// to handle special elements in a record string, particularly with quote characters. - - class RawRecord { - public: - RawRecord( const string_view&, const std::string& fileName = "", const std::string& keywordName = ""); - - inline string_view pop_front(); - void push_front( string_view token ); - void prepend( size_t count, string_view token ); - inline size_t size() const; - - std::string getRecordString() const; - inline string_view getItem(size_t index) const; - const std::string& getFileName() const; - const std::string& getKeywordName() const; - - static bool isTerminatedRecordString( const string_view& ); - - void dump() const; - - private: - string_view m_sanitizedRecordString; - std::deque< string_view > m_recordItems; - const std::string m_fileName; - const std::string m_keywordName; - - void setRecordString(const std::string& singleRecordString); - }; - typedef std::shared_ptr RawRecordPtr; - typedef std::shared_ptr RawRecordConstPtr; - - /* - * These are frequently called, but fairly trivial in implementation, and - * inlining the calls gives a decent low-effort performance benefit. - */ - string_view RawRecord::pop_front() { - auto front = m_recordItems.front(); - this->m_recordItems.pop_front(); - return front; - } - - size_t RawRecord::size() const { - return m_recordItems.size(); - } - - string_view RawRecord::getItem(size_t index) const { - return this->m_recordItems.at( index ); - } -} - -#endif /* RECORD_HPP */ - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/StarToken.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/StarToken.cpp deleted file mode 100644 index e9edd2d331..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/StarToken.cpp +++ /dev/null @@ -1,141 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -namespace qi = boost::spirit::qi; - -namespace Opm { - - bool isStarToken(const string_view& token, - std::string& countString, - std::string& valueString) { - // find first character which is not a digit - size_t pos = 0; - for (; pos < token.length(); ++pos) - if (!std::isdigit(token[pos])) - break; - - // if no such character exists or if this character is not a star, the token is - // not a "star token" (i.e. it is not a "repeat this value N times" token. - if (pos >= token.size() || token[pos] != '*') - return false; - // Quote from the Eclipse Reference Manual: "An asterisk by - // itself is not sufficent". However, our experience is that - // Eclipse accepts such tokens and we therefore interpret "*" - // as "1*". - // - // Tokens like "*12" are recognized as a star token - // here, but we will throw in the code which uses - // StarToken. (Because Eclipse does not seem to - // accept these and we would stay as closely to the spec as - // possible.) - else if (pos == 0) { - countString = ""; - valueString = token.substr(pos + 1); - return true; - } - - // if a star is prefixed by an unsigned integer N, then this should be - // interpreted as "repeat value after star N times" - countString = token.substr(0, pos); - valueString = token.substr(pos + 1); - return true; - } - - template<> - int readValueToken< int >( string_view view ) { - int n = 0; - auto cursor = view.begin(); - const bool ok = qi::parse( cursor, view.end(), qi::int_, n ); - - if( ok && cursor == view.end() ) return n; - throw std::invalid_argument( "Malformed integer '" + view + "'" ); - } - - template< typename T > - struct fortran_double : qi::real_policies< T > { - // Eclipse supports Fortran syntax for specifying exponents of floating point - // numbers ('D' and 'E', e.g., 1.234d5) - template< typename It > - static bool parse_exp( It& first, const It& last ) { - if( first == last || - (*first != 'e' && *first != 'E' && - *first != 'd' && *first != 'D' ) ) - return false; - ++first; - return true; - } - }; - - template<> - double readValueToken< double >( string_view view ) { - double n = 0; - qi::real_parser< double, fortran_double< double > > double_; - auto cursor = view.begin(); - const auto ok = qi::parse( cursor, view.end(), double_, n ); - - if( ok && cursor == view.end() ) return n; - throw std::invalid_argument( "Malformed floating point number '" + view + "'" ); - } - - template <> - std::string readValueToken< std::string >( string_view view ) { - if( view.size() == 0 || view[ 0 ] != '\'' ) - return view.string(); - - if( view.size() < 2 || view[ view.size() - 1 ] != '\'') - throw std::invalid_argument("Unable to parse string '" + view + "' as a string token"); - - return view.substr( 1, view.size() - 1 ); - } - - void StarToken::init_( const string_view& token ) { - // special-case the interpretation of a lone star as "1*" but do not - // allow constructs like "*123"... - if (m_countString == "") { - if (m_valueString != "") - // TODO: decorate the deck with a warning instead? - throw std::invalid_argument("Not specifying a count also implies not specifying a value. Token: \'" + token + "\'."); - - // TODO: since this is explicitly forbidden by the documentation it might - // be a good idea to decorate the deck with a warning? - m_count = 1; - } - else { - m_count = std::stoi( m_countString ); - - if (m_count == 0) - // TODO: decorate the deck with a warning instead? - throw std::invalid_argument("Specifing zero repetitions is not allowed. Token: \'" + token + "\'."); - } - } - -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/StarToken.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/StarToken.hpp deleted file mode 100644 index ded2f2c0c5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/StarToken.hpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef STAR_TOKEN_HPP -#define STAR_TOKEN_HPP - -#include - -#include -#include - -namespace Opm { - bool isStarToken(const string_view& token, - std::string& countString, - std::string& valueString); - - template - T readValueToken( string_view ); - -class StarToken { -public: - StarToken(const string_view& token) - { - if (!isStarToken(token, m_countString, m_valueString)) - throw std::invalid_argument("Token \""+ token +"\" is not a repetition specifier"); - init_(token); - } - - StarToken(const string_view& token, const std::string& countStr, const std::string& valueStr) - : m_countString(countStr) - , m_valueString(valueStr) - { - init_(token); - } - - size_t count() const { - return m_count; - } - - bool hasValue() const { - return !m_valueString.empty(); - } - - // returns the coubt as rendered in the deck. note that this might be different - // than just converting the return value of count() to a string because an empty - // count is interpreted as 1... - const std::string& countString() const { - return m_countString; - } - - // returns the value as rendered in the deck. note that this might be different - // than just converting the return value of value() to a string because values - // might have different representations in the deck (e.g. strings can be - // specified with and without quotes and but spaces are only allowed using the - // first representation.) - const std::string& valueString() const { - return m_valueString; - } - -private: - // internal initialization method. the m_countString and m_valueString attributes - // must be set before calling this method. - void init_(const string_view& token); - - ssize_t m_count; - std::string m_countString; - std::string m_valueString; -}; -} - - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/tests/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/tests/CMakeLists.txt deleted file mode 100644 index 731dbf7470..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/tests/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -foreach(tapp StarTokenTests RawRecordTests RawKeywordTests) - opm_add_test(run${tapp} SOURCES ${tapp}.cpp - LIBRARIES opmparser ${Boost_LIBRARIES}) -endforeach() diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/tests/RawKeywordTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/tests/RawKeywordTests.cpp deleted file mode 100644 index 5e9fc76c06..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/tests/RawKeywordTests.cpp +++ /dev/null @@ -1,193 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE RawKeywordTests -#include -#include -#include - -#include -#include -#include - - -using namespace Opm; - -BOOST_AUTO_TEST_CASE(RawKeywordGiveKeywordToConstructorKeywordSet) { - RawKeyword keyword("KEYYWORD", Raw::SLASH_TERMINATED , "FILE" , 10U); - BOOST_CHECK(keyword.getKeywordName() == "KEYYWORD"); - BOOST_CHECK_EQUAL(Raw::SLASH_TERMINATED , keyword.getSizeType()); -} - -BOOST_AUTO_TEST_CASE(RawKeywordSizeTypeInvalidThrows) { - BOOST_CHECK_THROW( RawKeyword("KEYYWORD", Raw::FIXED , "FILE" , 0U) , std::invalid_argument); - BOOST_CHECK_THROW( RawKeyword("KEYYWORD", Raw::TABLE_COLLECTION , "FILE" , 10U) , std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(RawKeywordFinalizeWrongSizeTYpeThrows) { - RawKeyword kw("KEYYWORD", Raw::SLASH_TERMINATED , "FILE" , 0U); - BOOST_CHECK_THROW( kw.finalizeUnknownSize() , std::invalid_argument ); -} - - -BOOST_AUTO_TEST_CASE(RawKeywordFinalizeUnknownSize) { - RawKeyword kw("KEYYWORD", Raw::UNKNOWN , "FILE" , 0U); - BOOST_CHECK( !kw.isFinished() ); - kw.finalizeUnknownSize(); - BOOST_CHECK( kw.isFinished() ); -} - - - - -BOOST_AUTO_TEST_CASE(RawKeywordGiveKeywordToConstructorTooLongThrows) { - BOOST_CHECK_THROW(RawKeyword keyword("KEYYYWORD", Raw::SLASH_TERMINATED , "FILE" , 10U), std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(RawKeywordSetKeywordInitialWhitespaceInKeywordThrows) { - BOOST_CHECK_THROW(RawKeyword(" TELONG", Raw::SLASH_TERMINATED, "FILE" , 10U), std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(constructor_mixedCaseName_throws) { - BOOST_CHECK_NO_THROW(RawKeyword("Test", Raw::SLASH_TERMINATED , "FILE" , 10U)); -} - -BOOST_AUTO_TEST_CASE(RawKeywordSetKeywordInitialTabInKeywordThrows) { - BOOST_CHECK_THROW( RawKeyword("\tTELONG", Raw::SLASH_TERMINATED , "FILE" , 10U), std::invalid_argument); -} - -BOOST_AUTO_TEST_CASE(RawKeywordSetCorrectLenghtKeywordNoError) { - RawKeyword keyword("GOODONE", Raw::SLASH_TERMINATED , "FILE" , 10U); - BOOST_CHECK(keyword.getKeywordName() == "GOODONE"); -} - -BOOST_AUTO_TEST_CASE(RawKeywordSet8CharKeywordWithTrailingWhitespaceKeywordTrimmed) { - RawKeyword keyword("GOODONEE ", Raw::SLASH_TERMINATED , "FILE" , 10U); - BOOST_CHECK(keyword.getKeywordName() == "GOODONEE"); -} - - -BOOST_AUTO_TEST_CASE(addRecord_singleRecord_recordAdded) { - RawKeyword keyword("TEST", Raw::SLASH_TERMINATED , "FILE" , 10U); - keyword.addRawRecordString("test 1 3 4 /"); - BOOST_CHECK_EQUAL(1U, keyword.size()); -} - - - - -BOOST_AUTO_TEST_CASE(isFinished_undef_size) { - /* addRawRecord assumes newlines etc. are stripped */ - /* also assumes all records are *immediately* following the previous one */ - const char* inputstr = "test 1 2 3 4 /test 1 2 3 4 test 1 2 3 4 //"; - - const size_t ln1 = std::strlen( "test 1 2 3 4 /" ); - const size_t ln2 = ln1 + std::strlen( "test 1 2 3 4 test 1 2 3 4 " ); - const size_t ln3 = ln2 + std::strlen( "/" ); - const size_t ln4 = ln3 + std::strlen( "/" ); - - string_view incomplete1( inputstr, inputstr + ln1 ); - string_view incomplete2( inputstr + ln1, inputstr + ln2 ); - string_view finalizer1( inputstr + ln2, inputstr + ln3 ); - string_view finalizer2( inputstr + ln3 , inputstr + ln4 ); - - RawKeyword keyword("TEST", Raw::SLASH_TERMINATED , "FILE" , 10U); - - BOOST_CHECK( !keyword.isFinished() ); - keyword.addRawRecordString( incomplete1 ); - keyword.addRawRecordString( incomplete2 ); - BOOST_CHECK( !keyword.isFinished() ); - keyword.addRawRecordString( finalizer1 ); - BOOST_CHECK( !keyword.isFinished() ); - keyword.addRawRecordString( finalizer2 ); - - BOOST_CHECK( keyword.isFinished() ); -} - - -BOOST_AUTO_TEST_CASE(isFinished_Fixedsize0) { - RawKeyword keyword("TEST" , "FILE" , 10U , 0U); - - BOOST_CHECK( keyword.isFinished() ); -} - -BOOST_AUTO_TEST_CASE(isFinished_Fixedsize1) { - RawKeyword keyword("TEST" , "FILE" , 10U, 1U); - BOOST_CHECK( !keyword.isFinished() ); - keyword.addRawRecordString("test 1 3 4 /"); - BOOST_CHECK( keyword.isFinished() ); -} - - -BOOST_AUTO_TEST_CASE(isFinished_FixedsizeMulti) { - RawKeyword keyword("TEST", "FILE" , 10U , 4U); - const char* inputstr = "test 1 2 3 4 //1 2 3 3 4 1 2 3 3 4 /1 2 3 3 /"; - - const size_t ln1 = std::strlen( "test 1 2 3 4 /" ); - const size_t ln2 = ln1 + std::strlen( "/" ); - const size_t ln3 = ln2 + std::strlen( "1 2 3 3 4 " ); - const size_t ln4 = ln3 + std::strlen( "1 2 3 3 4 /" ); - const size_t ln5 = ln4 + std::strlen( "1 2 3 3 /" ); - - string_view incomplete1( inputstr, inputstr + ln1 ); - string_view finalizer1( inputstr + ln1, inputstr + ln2 ); - string_view incomplete2( inputstr + ln2 , inputstr + ln3 ); - string_view incomplete3( inputstr + ln3 , inputstr + ln4 ); - string_view finalizer2( inputstr + ln4 , inputstr + ln5 ); - - BOOST_CHECK( !keyword.isFinished() ); - keyword.addRawRecordString( incomplete1 ); - BOOST_CHECK( !keyword.isFinished() ); - - keyword.addRawRecordString( finalizer1 ); - BOOST_CHECK( !keyword.isFinished() ); - - keyword.addRawRecordString( incomplete2 ); - BOOST_CHECK( !keyword.isFinished() ); - keyword.addRawRecordString( incomplete3 ); - BOOST_CHECK( !keyword.isFinished() ); - keyword.addRawRecordString( finalizer2 ); - BOOST_CHECK( keyword.isFinished() ); -} - -BOOST_AUTO_TEST_CASE(isTableCollection) { - RawKeyword keyword1("TEST" , "FILE" , 10U, 4U , false); - RawKeyword keyword2("TEST2", Raw::SLASH_TERMINATED , "FILE" , 10U); - BOOST_CHECK_EQUAL( Raw::FIXED , keyword1.getSizeType()); - BOOST_CHECK_EQUAL( Raw::SLASH_TERMINATED , keyword2.getSizeType()); - } - - -BOOST_AUTO_TEST_CASE(CreateTableCollection) { - RawKeyword keyword1("TEST" , "FILE" , 10U, 2, true); - BOOST_CHECK_EQUAL( Raw::TABLE_COLLECTION , keyword1.getSizeType()); -} - - -BOOST_AUTO_TEST_CASE(CreateWithFileAndLine) { - RawKeyword keyword1("TEST" , Raw::SLASH_TERMINATED , "XXX", 100); - BOOST_CHECK_EQUAL( "XXX" , keyword1.getFilename()); - BOOST_CHECK_EQUAL( 100U , keyword1.getLineNR() ); -} - -BOOST_AUTO_TEST_CASE(isUnknownSize) { - RawKeyword keyword("TEST2", Raw::UNKNOWN , "FILE" , 10U); - BOOST_CHECK_EQUAL( Raw::UNKNOWN , keyword.getSizeType( )); - } - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/tests/RawRecordTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/tests/RawRecordTests.cpp deleted file mode 100644 index b95e31f92b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/tests/RawRecordTests.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE ParserTests -#include -#include -#include - - -BOOST_AUTO_TEST_CASE(RawRecordGetRecordsCorrectElementsReturned) { - Opm::RawRecordPtr record(new Opm::RawRecord(" 'NODIR ' 'REVERS' 1 20 ")); - - BOOST_CHECK_EQUAL((unsigned) 4, record->size()); - - BOOST_CHECK_EQUAL("'NODIR '", record->getItem(0)); - BOOST_CHECK_EQUAL("'REVERS'", record->getItem(1)); - BOOST_CHECK_EQUAL("1", record->getItem(2)); - BOOST_CHECK_EQUAL("20", record->getItem(3)); -} - -BOOST_AUTO_TEST_CASE(RawRecordIsCompleteRecordCompleteRecordReturnsTrue) { - bool isComplete = Opm::RawRecord::isTerminatedRecordString("'NODIR ' 'REVERS' 1 20 /"); - BOOST_CHECK_EQUAL(true, isComplete); -} - -BOOST_AUTO_TEST_CASE(RawRecordIsCompleteRecordInCompleteRecordReturnsFalse) { - bool isComplete = Opm::RawRecord::isTerminatedRecordString("'NODIR ' 'REVERS' 1 20 "); - BOOST_CHECK_EQUAL(false, isComplete); -} - -BOOST_AUTO_TEST_CASE(Rawrecord_OperatorThis_OK) { - Opm::RawRecord record(" 'NODIR ' 'REVERS' 1 20 "); - Opm::RawRecordPtr recordPtr(new Opm::RawRecord(" 'NODIR ' 'REVERS' 1 20 ")); - - BOOST_CHECK_EQUAL("'NODIR '", record.getItem(0)); - BOOST_CHECK_EQUAL("'REVERS'", record.getItem(1)); - BOOST_CHECK_EQUAL("1", record.getItem(2)); - BOOST_CHECK_EQUAL("20", record.getItem(3)); - - BOOST_CHECK_EQUAL("20", recordPtr->getItem(3)); - - BOOST_CHECK_THROW(record.getItem(4), std::out_of_range); -} - -BOOST_AUTO_TEST_CASE(Rawrecord_PushFront_OK) { - Opm::RawRecordPtr record(new Opm::RawRecord(" 'NODIR ' 'REVERS' 1 20 ")); - record->prepend( 1, "String2" ); - record->prepend( 1, "String1" ); - - - BOOST_CHECK_EQUAL("String1", record->getItem(0)); - BOOST_CHECK_EQUAL("String2", record->getItem(1)); -} - -BOOST_AUTO_TEST_CASE(Rawrecord_size_OK) { - Opm::RawRecordPtr record(new Opm::RawRecord(" 'NODIR ' 'REVERS' 1 20 ")); - - BOOST_CHECK_EQUAL(4U, record->size()); - record->prepend( 1, "String2"); - record->prepend( 1, "String1"); - BOOST_CHECK_EQUAL(6U, record->size()); -} - -BOOST_AUTO_TEST_CASE(Rawrecord_sizeEmpty_OK) { - Opm::RawRecordPtr record(new Opm::RawRecord("")); - BOOST_CHECK_EQUAL(0U, record->size()); -} - -BOOST_AUTO_TEST_CASE(Rawrecord_spaceOnlyEmpty_OK) { - Opm::RawRecordPtr record(new Opm::RawRecord(" ")); - BOOST_CHECK_EQUAL(0U, record->size()); -} - -BOOST_AUTO_TEST_CASE(Rawrecord_noFileAndKeywordGiven_EmptyStringUsed) { - Opm::RawRecordPtr record(new Opm::RawRecord("32 33 ")); - BOOST_CHECK_EQUAL("", record->getKeywordName()); - BOOST_CHECK_EQUAL("", record->getFileName()); -} - -BOOST_AUTO_TEST_CASE(Rawrecord_FileAndKeywordGiven_CorrectStringsReturned) { - const std::string fileName = "/this/is/it"; - const std::string keywordName = "KEYWD"; - Opm::RawRecordPtr record(new Opm::RawRecord("32 33 ", fileName, keywordName)); - BOOST_CHECK_EQUAL(keywordName, record->getKeywordName()); - BOOST_CHECK_EQUAL(fileName, record->getFileName()); -} - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/tests/StarTokenTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/tests/StarTokenTests.cpp deleted file mode 100644 index 0460686b4f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/RawDeck/tests/StarTokenTests.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#define BOOST_TEST_MODULE ParserTests -#include -#include -#include - - -BOOST_AUTO_TEST_CASE(NoStarThrows) { - BOOST_REQUIRE_THROW(Opm::StarToken st("Hei...") , std::invalid_argument); -} - - -BOOST_AUTO_TEST_CASE(InvalidCountThrow) { - BOOST_REQUIRE_THROW( Opm::StarToken st("X*") , std::invalid_argument); - BOOST_REQUIRE_THROW( Opm::StarToken st("1.25*") , std::invalid_argument); - BOOST_REQUIRE_THROW( Opm::StarToken st("-3*") , std::invalid_argument); - BOOST_REQUIRE_THROW( Opm::StarToken st("0*") , std::invalid_argument); - BOOST_REQUIRE_THROW( Opm::StarToken st("*123") , std::invalid_argument); -} - - -BOOST_AUTO_TEST_CASE(CountCorrect) { - Opm::StarToken st1("*"); - Opm::StarToken st2("5*"); - Opm::StarToken st3("54*"); - BOOST_CHECK(st1.countString() == ""); - BOOST_CHECK(st2.countString() == "5"); - BOOST_CHECK(st3.countString() == "54"); - - BOOST_CHECK(st1.valueString() == ""); - BOOST_CHECK(st2.valueString() == ""); - BOOST_CHECK(st3.valueString() == ""); - - BOOST_CHECK(!st1.hasValue()); - BOOST_CHECK(!st2.hasValue()); - BOOST_CHECK(!st3.hasValue()); - - BOOST_REQUIRE_EQUAL(1U , st1.count()); - BOOST_REQUIRE_EQUAL(5U , st2.count()); - BOOST_REQUIRE_EQUAL(54U , st3.count()); -} - - -BOOST_AUTO_TEST_CASE(NoValueGetValueThrow) { - Opm::StarToken st1("*"); - Opm::StarToken st2("5*"); - BOOST_CHECK_EQUAL( false , st1.hasValue()); - BOOST_CHECK_EQUAL( false , st2.hasValue()); -} - -BOOST_AUTO_TEST_CASE(StarNoCountThrows) { - BOOST_CHECK_THROW( Opm::StarToken st1("*10") , std::invalid_argument); -} - - -BOOST_AUTO_TEST_CASE(CorrectValueString) { - Opm::StarToken st1("1*10.09"); - Opm::StarToken st2("5*20.13"); - Opm::StarToken st3("1*'123'"); - Opm::StarToken st4("1*123*456"); - BOOST_CHECK_EQUAL( true , st1.hasValue()); - BOOST_CHECK_EQUAL( true , st2.hasValue()); - BOOST_CHECK_EQUAL( true , st3.hasValue()); - BOOST_CHECK_EQUAL( true , st4.hasValue()); - - BOOST_CHECK_EQUAL( "10.09" , st1.valueString()); - BOOST_CHECK_EQUAL( "20.13" , st2.valueString()); - BOOST_CHECK_EQUAL( "'123'" , st3.valueString()); - BOOST_CHECK_EQUAL( "123*456" , st4.valueString()); -} - -BOOST_AUTO_TEST_CASE( ContainsStar_WithStar_ReturnsTrue ) { - std::string countString, valueString; - BOOST_CHECK_EQUAL( true , Opm::isStarToken("*", countString, valueString) ); - BOOST_CHECK_EQUAL( true , Opm::isStarToken("*1", countString, valueString) ); - BOOST_CHECK_EQUAL( true , Opm::isStarToken("1*", countString, valueString) ); - BOOST_CHECK_EQUAL( true , Opm::isStarToken("1*2", countString, valueString) ); - - BOOST_CHECK_EQUAL( false , Opm::isStarToken("12", countString, valueString) ); - BOOST_CHECK_EQUAL( false , Opm::isStarToken("'12*34'", countString, valueString) ); -} - -BOOST_AUTO_TEST_CASE( readValueToken_basic_validity_tests ) { - BOOST_CHECK_THROW( Opm::readValueToken( std::string( "3.3" ) ), std::invalid_argument ); - BOOST_CHECK_EQUAL( 3, Opm::readValueToken( std::string( "3" ) ) ); - BOOST_CHECK_EQUAL( 3, Opm::readValueToken( std::string( "+3" ) ) ); - BOOST_CHECK_EQUAL( -3, Opm::readValueToken( std::string( "-3" ) ) ); - BOOST_CHECK_THROW( Opm::readValueToken( std::string( "truls" ) ), std::invalid_argument ); - BOOST_CHECK_EQUAL( 0, Opm::readValueToken( std::string( "0" ) ) ); - BOOST_CHECK_EQUAL( 0, Opm::readValueToken( std::string( "0.0" ) ) ); - BOOST_CHECK_EQUAL( 0, Opm::readValueToken( std::string( "+0.0" ) ) ); - BOOST_CHECK_EQUAL( 0, Opm::readValueToken( std::string( "-0.0" ) ) ); - BOOST_CHECK_EQUAL( 0, Opm::readValueToken( std::string( ".0" ) ) ); - BOOST_CHECK_THROW( Opm::readValueToken( std::string( "1.0.0" ) ), std::invalid_argument ); - BOOST_CHECK_THROW( Opm::readValueToken( std::string( "1g0" ) ), std::invalid_argument ); - BOOST_CHECK_THROW( Opm::readValueToken( std::string( "1.23h" ) ), std::invalid_argument ); - BOOST_CHECK_THROW( Opm::readValueToken( std::string( "+1.23h" ) ), std::invalid_argument ); - BOOST_CHECK_THROW( Opm::readValueToken( std::string( "-1.23h" ) ), std::invalid_argument ); - BOOST_CHECK_EQUAL( 3.3, Opm::readValueToken( std::string( "3.3" ) ) ); - BOOST_CHECK_CLOSE( 3.3, Opm::readValueToken( std::string( "3.3e0" ) ), 1e-6 ); - BOOST_CHECK_CLOSE( 3.3, Opm::readValueToken( std::string( "3.3d0" ) ), 1e-6 ); - BOOST_CHECK_CLOSE( 3.3, Opm::readValueToken( std::string( "3.3E0" ) ), 1e-6 ); - BOOST_CHECK_CLOSE( 3.3, Opm::readValueToken( std::string( "3.3D0" ) ), 1e-6 ); - BOOST_CHECK_EQUAL( "OLGA", Opm::readValueToken( std::string( "OLGA" ) ) ); - BOOST_CHECK_EQUAL( "OLGA", Opm::readValueToken( std::string( "'OLGA'" ) ) ); - BOOST_CHECK_EQUAL( "123*456", Opm::readValueToken( std::string( "123*456" ) ) ); - BOOST_CHECK_EQUAL( "123*456", Opm::readValueToken( std::string( "'123*456'" ) ) ); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Units/ConversionFactors.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Units/ConversionFactors.hpp deleted file mode 100644 index 46b78fc3b9..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Units/ConversionFactors.hpp +++ /dev/null @@ -1,272 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef CONVERSION_FACTORS_HPP -#define CONVERSION_FACTORS_HPP - - -/** - The unit sets emplyed in ECLIPSE, in particular the FIELD units, - are quite inconsistent. Ideally one should choose units for a set - of base quantities like Mass,Time and Length and then derive the - units for e.g. pressure and flowrate in a consisten manner. However - that is not the case; for instance in the metric system we have: - - [Length] = meters - [time] = days - [mass] = kg - - This should give: - - [Pressure] = [mass] / ([length] * [time]^2) = kg / (m * days * days) - - Instead pressure is given in Bars. When it comes to FIELD units the - number of such examples is long. -*/ - - - - -namespace Opm { - - namespace details { - // Note: the following has been lifted from opm/core/utility/Units.hpp. - - namespace prefix - /// Conversion prefix for units. - { - constexpr const double micro = 1.0e-6; /**< Unit prefix [\f$\mu\f$] */ - constexpr const double milli = 1.0e-3; /**< Unit prefix [m] */ - constexpr const double centi = 1.0e-2; /**< Non-standard unit prefix [c] */ - constexpr const double deci = 1.0e-1; /**< Non-standard unit prefix [d] */ - constexpr const double kilo = 1.0e3; /**< Unit prefix [k] */ - constexpr const double mega = 1.0e6; /**< Unit prefix [M] */ - constexpr const double giga = 1.0e9; /**< Unit prefix [G] */ - } // namespace prefix - - namespace unit - /// Definition of various units. - /// All the units are defined in terms of international standard - /// units (SI). Example of use: We define a variable \c k which - /// gives a permeability. We want to set \c k to \f$1\,mD\f$. - /// \code - /// using namespace Opm::unit - /// double k = 0.001*darcy; - /// \endcode - /// We can also use one of the prefixes defined in Opm::prefix - /// \code - /// using namespace Opm::unit - /// using namespace Opm::prefix - /// double k = 1.0*milli*darcy; - /// \endcode - { - ///\name Common powers - /// @{ - constexpr double square(double v) { return v * v; } - constexpr double cubic (double v) { return v * v * v; } - /// @} - - // -------------------------------------------------------------- - // Basic (fundamental) units and conversions - // -------------------------------------------------------------- - - /// \name Length - /// @{ - constexpr const double meter = 1; - constexpr const double inch = 2.54 * prefix::centi*meter; - constexpr const double feet = 12 * inch; - /// @} - - /// \name Time - /// @{ - constexpr const double second = 1; - constexpr const double minute = 60 * second; - constexpr const double hour = 60 * minute; - constexpr const double day = 24 * hour; - constexpr const double year = 365 * day; - /// @} - - /// \name Volume - /// @{ - constexpr const double gallon = 231 * cubic(inch); - constexpr const double stb = 42 * gallon; - constexpr const double _liter = 1 * cubic(prefix::deci*meter); - /// @} - - /// \name Mass - /// @{ - constexpr const double kilogram = 1; - constexpr const double gram = 1.0e-3 * kilogram; - // http://en.wikipedia.org/wiki/Pound_(mass)#Avoirdupois_pound - constexpr const double pound = 0.45359237 * kilogram; - /// @} - - // -------------------------------------------------------------- - // Standardised constants - // -------------------------------------------------------------- - - /// \name Standardised constant - /// @{ - constexpr const double gravity = 9.80665 * meter/square(second); - /// @} - - // -------------------------------------------------------------- - // Derived units and conversions - // -------------------------------------------------------------- - - /// \name Force - /// @{ - constexpr const double Newton = kilogram*meter / square(second); // == 1 - constexpr const double dyne = 1e-5*Newton; - constexpr const double lbf = pound * gravity; // Pound-force - /// @} - - /// \name Pressure - /// @{ - constexpr const double Pascal = Newton / square(meter); // == 1 - constexpr const double barsa = 100000 * Pascal; - constexpr const double atm = 101325 * Pascal; - constexpr const double psia = lbf / square(inch); - /// @} - - /// \name Temperature. This one is more complicated - /// because the unit systems used by Eclipse (i.e. degrees - /// Celsius and degrees Fahrenheit require to add or - /// subtract an offset for the conversion between from/to - /// Kelvin - /// @{ - constexpr const double degCelsius = 1.0; // scaling factor °C -> K - constexpr const double degCelsiusOffset = 273.15; // offset for the °C -> K conversion - - constexpr const double degFahrenheit = 5.0/9; // scaling factor °F -> K - constexpr const double degFahrenheitOffset = 255.37; // offset for the °C -> K conversion - /// @} - - /// \name Viscosity - /// @{ - constexpr const double Pas = Pascal * second; // == 1 - constexpr const double Poise = prefix::deci*Pas; - /// @} - - namespace perm_details { - constexpr const double p_grad = atm / (prefix::centi*meter); - constexpr const double area = square(prefix::centi*meter); - constexpr const double flux = cubic (prefix::centi*meter) / second; - constexpr const double velocity = flux / area; - constexpr const double visc = prefix::centi*Poise; - constexpr const double darcy = (velocity * visc) / p_grad; - // == 1e-7 [m^2] / 101325 - // == 9.869232667160130e-13 [m^2] - } - /// \name Permeability - /// @{ - /// - /// A porous medium with a permeability of 1 darcy permits a flow (flux) - /// of \f$1\,\mathit{cm}^3/s\f$ of a fluid with viscosity - /// \f$1\,\mathit{cP}\f$ (\f$1\,mPa\cdot s\f$) under a pressure gradient - /// of \f$1\,\mathit{atm}/\mathit{cm}\f$ acting across an area of - /// \f$1\,\mathit{cm}^2\f$. - /// - constexpr const double darcy = perm_details::darcy; - /// @} - } - - } // namespace details - - - namespace Metric { - using namespace details::prefix; - using namespace details::unit; - constexpr const double Pressure = barsa; - constexpr const double Temperature = degCelsius; - constexpr const double TemperatureOffset = degCelsiusOffset; - constexpr const double AbsoluteTemperature = degCelsius; // actually [K], but the these two are identical - constexpr const double Length = meter; - constexpr const double Time = day; - constexpr const double Mass = kilogram; - constexpr const double Permeability = milli*darcy; - constexpr const double Transmissibility = centi*Poise*cubic(meter)/(day*barsa); - constexpr const double LiquidSurfaceVolume = cubic(meter); - constexpr const double GasSurfaceVolume = cubic(meter); - constexpr const double ReservoirVolume = cubic(meter); - constexpr const double GasDissolutionFactor = GasSurfaceVolume/LiquidSurfaceVolume; - constexpr const double OilDissolutionFactor = LiquidSurfaceVolume/GasSurfaceVolume; - constexpr const double Density = kilogram/cubic(meter); - constexpr const double PolymerDensity = kilogram/cubic(meter); - constexpr const double Salinity = kilogram/cubic(meter); - constexpr const double Viscosity = centi*Poise; - constexpr const double Timestep = day; - constexpr const double SurfaceTension = dyne/(centi*meter); - } - - - namespace Field { - using namespace details::prefix; - using namespace details::unit; - constexpr const double Pressure = psia; - constexpr const double Temperature = degFahrenheit; - constexpr const double TemperatureOffset = degFahrenheitOffset; - constexpr const double AbsoluteTemperature = degFahrenheit; // actually [°R], but the these two are identical - constexpr const double Length = feet; - constexpr const double Time = day; - constexpr const double Mass = pound; - constexpr const double Permeability = milli*darcy; - constexpr const double Transmissibility = centi*Poise*stb/(day*psia); - constexpr const double LiquidSurfaceVolume = stb; - constexpr const double GasSurfaceVolume = 1000*cubic(feet); - constexpr const double ReservoirVolume = stb; - constexpr const double GasDissolutionFactor = GasSurfaceVolume/LiquidSurfaceVolume; - constexpr const double OilDissolutionFactor = LiquidSurfaceVolume/GasSurfaceVolume; - constexpr const double Density = pound/cubic(feet); - constexpr const double PolymerDensity = pound/stb; - constexpr const double Salinity = pound/stb; - constexpr const double Viscosity = centi*Poise; - constexpr const double Timestep = day; - constexpr const double SurfaceTension = dyne/(centi*meter); - } - - - namespace Lab { - using namespace details::prefix; - using namespace details::unit; - constexpr const double Pressure = atm; - constexpr const double Temperature = degCelsius; - constexpr const double TemperatureOffset = degCelsiusOffset; - constexpr const double AbsoluteTemperature = degCelsius; // actually [K], but the these two are identical - constexpr const double Length = centi*meter; - constexpr const double Time = hour; - constexpr const double Mass = gram; - constexpr const double Permeability = milli*darcy; - constexpr const double Transmissibility = centi*Poise*cubic(centi*meter)/(hour*atm); - constexpr const double LiquidSurfaceVolume = cubic(centi*meter); - constexpr const double GasSurfaceVolume = cubic(centi*meter); - constexpr const double ReservoirVolume = cubic(centi*meter); - constexpr const double GasDissolutionFactor = GasSurfaceVolume/LiquidSurfaceVolume; - constexpr const double OilDissolutionFactor = LiquidSurfaceVolume/GasSurfaceVolume; - constexpr const double Density = gram/cubic(centi*meter); - constexpr const double PolymerDensity = gram/cubic(centi*meter); - constexpr const double Salinity = gram/cubic(centi*meter); - constexpr const double Viscosity = centi*Poise; - constexpr const double Timestep = hour; - constexpr const double SurfaceTension = dyne/(centi*meter); - } - -} - -#endif diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Units/Dimension.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Units/Dimension.cpp deleted file mode 100644 index 3ec8cd85ef..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Units/Dimension.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include - -#include -#include -#include - -namespace Opm { - - Dimension::Dimension() { - - } - - Dimension::Dimension(const std::string& name, double SIfactor, double SIoffset) - { - for (auto iter = name.begin(); iter != name.end(); ++iter) { - if (!isalpha(*iter) && (*iter) != '1') - throw std::invalid_argument("Invalid dimension name"); - } - m_name = name; - m_SIfactor = SIfactor; - m_SIoffset = SIoffset; - } - - double Dimension::getSIScaling() const { - if (!std::isfinite(m_SIfactor)) - throw std::logic_error("The DeckItem contains a field with a context dependent unit. " - "Use getData< double >() and convert the returned value manually!"); - return m_SIfactor; - } - - double Dimension::getSIOffset() const { - return m_SIoffset; - } - - double Dimension::convertRawToSi(double rawValue) const { - if (!std::isfinite(m_SIfactor)) - throw std::logic_error("The DeckItem contains a field with a context dependent unit. " - "Use getData< double >() and convert the returned value manually!"); - - return rawValue*m_SIfactor + m_SIoffset; - } - - double Dimension::convertSiToRaw(double siValue) const { - if (!std::isfinite(m_SIfactor)) - throw std::logic_error("The DeckItem contains a field with a context dependent unit. " - "Use getData< double >() and convert the returned value manually!"); - - return (siValue - m_SIoffset)/m_SIfactor; - } - - const std::string& Dimension::getName() const { - return m_name; - } - - // only dimensions with zero offset are compositable... - bool Dimension::isCompositable() const - { return m_SIoffset == 0.0; } - - Dimension * Dimension::newComposite(const std::string& dim , double SIfactor, double SIoffset) { - Dimension * dimension = new Dimension(); - dimension->m_name = dim; - dimension->m_SIfactor = SIfactor; - dimension->m_SIoffset = SIoffset; - - return dimension; - } - - - bool Dimension::equal(const Dimension& other) const { - if (m_name != other.m_name) - return false; - if (m_SIfactor == other.m_SIfactor && m_SIoffset == other.m_SIoffset) - return true; - if (std::isnan(m_SIfactor) && std::isnan(other.m_SIfactor)) - return true; - return false; - } - -} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Units/Dimension.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Units/Dimension.hpp deleted file mode 100644 index acc93094fd..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Units/Dimension.hpp +++ /dev/null @@ -1,52 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef DIMENSION_H -#define DIMENSION_H - -#include - -namespace Opm { - - class Dimension { - public: - Dimension(const std::string& name, double SIfactor, double SIoffset = 0.0); - - double getSIScaling() const; - double getSIOffset() const; - - double convertRawToSi(double rawValue) const; - double convertSiToRaw(double siValue) const; - - bool equal(const Dimension& other) const; - const std::string& getName() const; - bool isCompositable() const; - static Dimension * newComposite(const std::string& dim, double SIfactor, double SIoffset = 0.0); - - private: - Dimension(); - std::string m_name; - double m_SIfactor; - double m_SIoffset; - }; -} - - -#endif - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Units/UnitSystem.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Units/UnitSystem.cpp deleted file mode 100644 index a2fa5790a1..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Units/UnitSystem.cpp +++ /dev/null @@ -1,554 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - - -#include -#include -#include - -#include -#include -#include - -#include -#include - - -namespace Opm { - -namespace { - /* - * It is VERY important that the measure enum has the same order as the - * metric and field arrays. C++ does not support designated initializers, so - * this cannot be done in a declaration-order independent matter. - */ - - static const double to_metric[] = { - 1, - 1 / Metric::Length, - 1 / Metric::Time, - 1 / Metric::Density, - 1 / Metric::Pressure, - 1 / Metric::AbsoluteTemperature, - 1 / Metric::Temperature, - 1 / Metric::Viscosity, - 1 / Metric::Permeability, - 1 / Metric::LiquidSurfaceVolume, - 1 / Metric::GasSurfaceVolume, - 1 / Metric::ReservoirVolume, - 1 / ( Metric::LiquidSurfaceVolume / Metric::Time ), - 1 / ( Metric::GasSurfaceVolume / Metric::Time ), - 1 / ( Metric::ReservoirVolume / Metric::Time ), - 1 / Metric::Transmissibility, - 1 / Metric::Mass, - 1, /* gas-oil ratio */ - 1, /* oil-gas ratio */ - 1, /* water cut */ - 1, /* gas formation volume factor */ - 1, /* oil formation volume factor */ - 1, /* water formation volume factor */ - 1, /* gas inverse formation volume factor */ - 1, /* oil inverse formation volume factor */ - 1, /* water inverse formation volume factor */ - }; - - static const double from_metric[] = { - 1, - Metric::Length, - Metric::Time, - Metric::Density, - Metric::Pressure, - Metric::AbsoluteTemperature, - Metric::Temperature, - Metric::Viscosity, - Metric::Permeability, - Metric::LiquidSurfaceVolume, - Metric::GasSurfaceVolume, - Metric::ReservoirVolume, - Metric::LiquidSurfaceVolume / Metric::Time, - Metric::GasSurfaceVolume / Metric::Time, - Metric::ReservoirVolume / Metric::Time, - Metric::Transmissibility, - Metric::Mass, - 1, /* gas-oil ratio */ - 1, /* oil-gas ratio */ - 1, /* water cut */ - 1, /* gas formation volume factor */ - 1, /* oil formation volume factor */ - 1, /* water formation volume factor */ - 1, /* gas inverse formation volume factor */ - 1, /* oil inverse formation volume factor */ - 1, /* water inverse formation volume factor */ - }; - - static constexpr const char* metric_names[] = { - "", - "M", - "DAY", - "KG/M3", - "BARSA", - "K", - "C", - "CP", - "MD", - "SM3", - "SM3", - "RM3", - "SM3/DAY", - "SM3/DAY", - "RM3/DAY", - "CPR3/DAY/BARS", - "KG", - "SM3/SM3", - "SM3/SM3", - "SM3/SM3", - "RM3/SM3", /* gas formation volume factor */ - "RM3/SM3", /* oil formation volume factor */ - "RM3/SM3", /* water formation volume factor */ - "SM3/RM3", /* gas inverse formation volume factor */ - "SM3/RM3", /* oil inverse formation volume factor */ - "SM3/RM3", /* water inverse formation volume factor */ - }; - - static const double to_field[] = { - 1, - 1 / Field::Length, - 1 / Field::Time, - 1 / Field::Density, - 1 / Field::Pressure, - 1 / Field::AbsoluteTemperature, - 1 / Field::Temperature, - 1 / Field::Viscosity, - 1 / Field::Permeability, - 1 / Field::LiquidSurfaceVolume, - 1 / Field::GasSurfaceVolume, - 1 / Field::ReservoirVolume, - 1 / ( Field::LiquidSurfaceVolume / Field::Time ), - 1 / ( Field::GasSurfaceVolume / Field::Time ), - 1 / ( Field::ReservoirVolume / Field::Time ), - 1 / Field::Transmissibility, - 1 / Field::Mass, - 1, /* gas-oil ratio */ - 1, /* oil-gas ratio */ - 1, /* water cut */ - 1 / (Field::ReservoirVolume / Field::GasSurfaceVolume), /* gas formation volume factor */ - 1, /* oil formation volume factor */ - 1, /* water formation volume factor */ - 1 / (Field::GasSurfaceVolume / Field::ReservoirVolume), /* gas inverse formation volume factor */ - 1, /* oil inverse formation volume factor */ - 1, /* water inverse formation volume factor */ - }; - - static const double from_field[] = { - 1, - Field::Length, - Field::Time, - Field::Density, - Field::Pressure, - Field::AbsoluteTemperature, - Field::Temperature, - Field::Viscosity, - Field::Permeability, - Field::LiquidSurfaceVolume, - Field::GasSurfaceVolume, - Field::ReservoirVolume, - Field::LiquidSurfaceVolume / Field::Time, - Field::GasSurfaceVolume / Field::Time, - Field::ReservoirVolume / Field::Time, - Field::Transmissibility, - Field::Mass, - 1, /* gas-oil ratio */ - 1, /* oil-gas ratio */ - 1, /* water cut */ - Field::ReservoirVolume / Field::GasSurfaceVolume, /* gas formation volume factor */ - 1, /* oil formation volume factor */ - 1, /* water formation volume factor */ - Field::GasSurfaceVolume / Field::ReservoirVolume, /* gas inverse formation volume factor */ - 1, /* oil inverse formation volume factor */ - 1, /* water inverse formation volume factor */ - }; - - static constexpr const char* field_names[] = { - "", - "FT", - "DAY", - "LB/FT3", - "PSIA", - "R", - "F", - "CP", - "MD", - "STB", - "MSCF", - "RB", - "STB/DAY", - "MSCF/DAY", - "RB/DAY", - "CPRB/DAY/PSI", - "LB", - "MSCF/STB", - "STB/MSCF", - "STB/STB", - "RB/MSCF", /* gas formation volume factor */ - "RB/STB", /* oil formation volume factor */ - "RB/STB", /* water formation volume factor */ - "MSCF/RB", /* gas inverse formation volume factor */ - "STB/RB", /* oil inverse formation volume factor */ - "STB/RB", /* water inverse formation volume factor */ - }; - - static const double to_lab[] = { - 1, - 1 / Lab::Length, - 1 / Lab::Time, - 1 / Lab::Density, - 1 / Lab::Pressure, - 1 / Lab::AbsoluteTemperature, - 1 / Lab::Temperature, - 1 / Lab::Viscosity, - 1 / Lab::Permeability, - 1 / Lab::LiquidSurfaceVolume, - 1 / Lab::GasSurfaceVolume, - 1 / Lab::ReservoirVolume, - 1 / ( Lab::LiquidSurfaceVolume / Lab::Time ), - 1 / ( Lab::GasSurfaceVolume / Lab::Time ), - 1 / ( Lab::ReservoirVolume / Lab::Time ), - 1 / Lab::Transmissibility, - 1 / Lab::Mass, - 1 / Lab::GasDissolutionFactor, /* gas-oil ratio */ - 1 / Lab::OilDissolutionFactor, /* oil-gas ratio */ - 1, /* water cut */ - 1, /* gas formation volume factor */ - 1, /* oil formation volume factor */ - 1, /* water formation volume factor */ - 1, /* gas inverse formation volume factor */ - 1, /* oil inverse formation volume factor */ - 1, /* water inverse formation volume factor */ - }; - - static const double from_lab[] = { - 1, - Lab::Length, - Lab::Time, - Lab::Density, - Lab::Pressure, - Lab::AbsoluteTemperature, - Lab::Temperature, - Lab::Viscosity, - Lab::Permeability, - Lab::LiquidSurfaceVolume, - Lab::GasSurfaceVolume, - Lab::ReservoirVolume, - Lab::LiquidSurfaceVolume / Lab::Time, - Lab::GasSurfaceVolume / Lab::Time, - Lab::ReservoirVolume / Lab::Time, - Lab::Transmissibility, - Lab::Mass, - Lab::GasDissolutionFactor, /* gas-oil ratio */ - Lab::OilDissolutionFactor, /* oil-gas ratio */ - 1, /* water cut */ - 1, /* gas formation volume factor */ - 1, /* oil formation volume factor */ - 1, /* water formation volume factor */ - 1, /* gas inverse formation volume factor */ - 1, /* oil inverse formation volume factor */ - 1, /* water inverse formation volume factor */ - }; - - static constexpr const char* lab_names[] = { - "", - "CM", - "HR", - "G/CC", - "ATM", - "K", - "C", - "CP", - "MD", - "SCC", - "SCC", - "RCC", - "SCC/HR", - "SCC/HR", - "RCC/HR", - "CPRCC/HR/ATM", - "G", - "SCC/SCC", - "SCC/SCC", - "SCC/SCC", - "RCC/SCC", /* gas formation volume factor */ - "RCC/SCC", /* oil formation volume factor */ - "RCC/SCC", /* water formation volume factor */ - "SCC/RCC", /* gas formation volume factor */ - "SCC/RCC", /* oil inverse formation volume factor */ - "SCC/RCC", /* water inverse formation volume factor */ - }; -} - - UnitSystem::UnitSystem(const UnitType unit) : - m_unittype( unit ) - { - switch(unit) { - case(UNIT_TYPE_METRIC): - m_name = "Metric"; - this->measure_table_from_si = to_metric; - this->measure_table_to_si = from_metric; - this->unit_name_table = metric_names; - break; - case(UNIT_TYPE_FIELD): - m_name = "Field"; - this->measure_table_from_si = to_field; - this->measure_table_to_si = from_field; - this->unit_name_table = field_names; - break; - case(UNIT_TYPE_LAB): - m_name = "Lab"; - this->measure_table_from_si = to_lab; - this->measure_table_to_si = from_lab; - this->unit_name_table = lab_names; - break; - default: - //do nothing - break; - }; - } - - bool UnitSystem::hasDimension(const std::string& dimension) const { - return (m_dimensions.find( dimension ) != m_dimensions.end()); - } - - - std::shared_ptr UnitSystem::getNewDimension(const std::string& dimension) { - if (!hasDimension( dimension )) { - std::shared_ptr newDimension = parse( dimension ); - addDimension( newDimension ); - } - return getDimension( dimension ); - } - - - std::shared_ptr UnitSystem::getDimension(const std::string& dimension) const { - if (hasDimension( dimension )) - return m_dimensions.at( dimension ); - else - throw std::invalid_argument("Dimension: " + dimension + " not recognized "); - } - - - void UnitSystem::addDimension(std::shared_ptr dimension) { - if (hasDimension(dimension->getName())) - m_dimensions.erase( dimension->getName() ); - - m_dimensions.insert( std::make_pair(dimension->getName() , dimension)); - } - - void UnitSystem::addDimension(const std::string& dimension , double SIfactor, double SIoffset) { - std::shared_ptr dim( new Dimension(dimension , SIfactor, SIoffset) ); - addDimension(dim); - } - - const std::string& UnitSystem::getName() const { - return m_name; - } - - UnitSystem::UnitType UnitSystem::getType() const { - return m_unittype; - } - - - std::shared_ptr UnitSystem::parseFactor(const std::string& dimension) const { - std::vector dimensionList; - boost::split(dimensionList , dimension , boost::is_any_of("*")); - double SIfactor = 1.0; - for (auto iter = dimensionList.begin(); iter != dimensionList.end(); ++iter) { - std::shared_ptr dim = getDimension( *iter ); - - // all constituing dimension must be compositable. The - // only exception is if there is the "composite" dimension - // consists of exactly a single atomic dimension... - if (dimensionList.size() > 1 && !dim->isCompositable()) - throw std::invalid_argument("Composite dimensions currently cannot require a conversion offset"); - - SIfactor *= dim->getSIScaling(); - } - return std::shared_ptr(Dimension::newComposite( dimension , SIfactor )); - } - - - - std::shared_ptr UnitSystem::parse(const std::string& dimension) const { - bool haveDivisor; - { - size_t divCount = std::count( dimension.begin() , dimension.end() , '/' ); - if (divCount == 0) - haveDivisor = false; - else if (divCount == 1) - haveDivisor = true; - else - throw std::invalid_argument("Dimension string can only have one division sign /"); - } - - if (haveDivisor) { - std::vector parts; - boost::split(parts , dimension , boost::is_any_of("/")); - std::shared_ptr dividend = parseFactor( parts[0] ); - std::shared_ptr divisor = parseFactor( parts[1] ); - - if (dividend->getSIOffset() != 0.0 || divisor->getSIOffset() != 0.0) - throw std::invalid_argument("Composite dimensions cannot currently require a conversion offset"); - - return std::shared_ptr( Dimension::newComposite( dimension , dividend->getSIScaling() / divisor->getSIScaling() )); - } else { - return parseFactor( dimension ); - } - } - - - bool UnitSystem::equal(const UnitSystem& other) const { - bool equal_ = (m_dimensions.size() == other.m_dimensions.size()); - - if (equal_) { - for (auto iter = m_dimensions.begin(); iter != m_dimensions.end(); ++iter) { - std::shared_ptr dim = getDimension( iter->first ); - - if (other.hasDimension( iter->first )) { - std::shared_ptr otherDim = other.getDimension( iter->first ); - if (!dim->equal(*otherDim)) - equal_ = false; - } else - equal_ = false; - - } - } - return equal_; - } - - double UnitSystem::from_si( measure m, double val ) const { - return this->measure_table_from_si[ static_cast< int >( m ) ] * val; - } - - double UnitSystem::to_si( measure m, double val ) const { - return this->measure_table_to_si[ static_cast< int >( m ) ] * val; - } - - void UnitSystem::from_si( measure m, std::vector& data ) const { - double factor = this->measure_table_from_si[ static_cast< int >( m ) ]; - auto scale = [=](double x) { return x * factor; }; - std::transform( data.begin() , data.end() , data.begin() , scale); - } - - - void UnitSystem::to_si( measure m, std::vector& data) const { - double factor = this->measure_table_to_si[ static_cast< int >( m ) ]; - auto scale = [=](double x) { return x * factor; }; - std::transform( data.begin() , data.end() , data.begin() , scale); - } - - - - const char* UnitSystem::name( measure m ) const { - return this->unit_name_table[ static_cast< int >( m ) ]; - } - - UnitSystem * UnitSystem::newMETRIC() { - UnitSystem * system = new UnitSystem(UNIT_TYPE_METRIC); - - system->addDimension("1" , 1.0); - system->addDimension("Pressure" , Metric::Pressure ); - system->addDimension("Temperature", Metric::Temperature, Metric::TemperatureOffset); - system->addDimension("AbsoluteTemperature", Metric::AbsoluteTemperature); - system->addDimension("Length" , Metric::Length); - system->addDimension("Time" , Metric::Time ); - system->addDimension("Mass" , Metric::Mass ); - system->addDimension("Permeability", Metric::Permeability ); - system->addDimension("Transmissibility", Metric::Transmissibility ); - system->addDimension("GasDissolutionFactor", Metric::GasDissolutionFactor); - system->addDimension("OilDissolutionFactor", Metric::OilDissolutionFactor); - system->addDimension("LiquidSurfaceVolume", Metric::LiquidSurfaceVolume ); - system->addDimension("GasSurfaceVolume" , Metric::GasSurfaceVolume ); - system->addDimension("ReservoirVolume", Metric::ReservoirVolume ); - system->addDimension("Density" , Metric::Density ); - system->addDimension("PolymerDensity", Metric::PolymerDensity); - system->addDimension("Salinity", Metric::Salinity); - system->addDimension("Viscosity" , Metric::Viscosity); - system->addDimension("Timestep" , Metric::Timestep); - system->addDimension("SurfaceTension" , Metric::SurfaceTension); - system->addDimension("ContextDependent", std::numeric_limits::quiet_NaN()); - return system; - } - - - - UnitSystem * UnitSystem::newFIELD() { - UnitSystem * system = new UnitSystem(UNIT_TYPE_FIELD); - - system->addDimension("1" , 1.0); - system->addDimension("Pressure", Field::Pressure ); - system->addDimension("Temperature", Field::Temperature, Field::TemperatureOffset); - system->addDimension("AbsoluteTemperature", Field::AbsoluteTemperature); - system->addDimension("Length", Field::Length); - system->addDimension("Time" , Field::Time); - system->addDimension("Mass", Field::Mass); - system->addDimension("Permeability", Field::Permeability ); - system->addDimension("Transmissibility", Field::Transmissibility ); - system->addDimension("GasDissolutionFactor" , Field::GasDissolutionFactor); - system->addDimension("OilDissolutionFactor", Field::OilDissolutionFactor); - system->addDimension("LiquidSurfaceVolume", Field::LiquidSurfaceVolume ); - system->addDimension("GasSurfaceVolume", Field::GasSurfaceVolume ); - system->addDimension("ReservoirVolume", Field::ReservoirVolume ); - system->addDimension("Density", Field::Density ); - system->addDimension("PolymerDensity", Field::PolymerDensity); - system->addDimension("Salinity", Field::Salinity); - system->addDimension("Viscosity", Field::Viscosity); - system->addDimension("Timestep", Field::Timestep); - system->addDimension("SurfaceTension" , Field::SurfaceTension); - system->addDimension("ContextDependent", std::numeric_limits::quiet_NaN()); - return system; - } - - - - UnitSystem * UnitSystem::newLAB() { - UnitSystem * system = new UnitSystem(UNIT_TYPE_LAB); - - system->addDimension("1" , 1.0); - system->addDimension("Pressure", Lab::Pressure ); - system->addDimension("Temperature", Lab::Temperature, Lab::TemperatureOffset); - system->addDimension("AbsoluteTemperature", Lab::AbsoluteTemperature); - system->addDimension("Length", Lab::Length); - system->addDimension("Time" , Lab::Time); - system->addDimension("Mass", Lab::Mass); - system->addDimension("Permeability", Lab::Permeability ); - system->addDimension("Transmissibility", Lab::Transmissibility ); - system->addDimension("GasDissolutionFactor" , Lab::GasDissolutionFactor); - system->addDimension("OilDissolutionFactor", Lab::OilDissolutionFactor); - system->addDimension("LiquidSurfaceVolume", Lab::LiquidSurfaceVolume ); - system->addDimension("GasSurfaceVolume", Lab::GasSurfaceVolume ); - system->addDimension("ReservoirVolume", Lab::ReservoirVolume ); - system->addDimension("Density", Lab::Density ); - system->addDimension("PolymerDensity", Lab::PolymerDensity); - system->addDimension("Salinity", Lab::Salinity); - system->addDimension("Viscosity", Lab::Viscosity); - system->addDimension("Timestep", Lab::Timestep); - system->addDimension("SurfaceTension" , Lab::SurfaceTension); - system->addDimension("ContextDependent", std::numeric_limits::quiet_NaN()); - return system; - } - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Units/UnitSystem.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Units/UnitSystem.hpp deleted file mode 100644 index d22e6f3be2..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Units/UnitSystem.hpp +++ /dev/null @@ -1,106 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef UNITSYSTEM_H -#define UNITSYSTEM_H - -#include -#include -#include -#include - -namespace Opm { - - class Dimension; - - class UnitSystem { - public: - enum UnitType { - UNIT_TYPE_METRIC = 0, - UNIT_TYPE_FIELD = 1, - UNIT_TYPE_LAB = 2 - }; - - enum class measure : int { - identity, - length, - time, - density, - pressure, - temperature_absolute, - temperature, - viscosity, - permeability, - liquid_surface_volume, - gas_surface_volume, - volume, - liquid_surface_rate, - gas_surface_rate, - rate, - transmissibility, - mass, - gas_oil_ratio, - oil_gas_ratio, - water_cut, - gas_formation_volume_factor, - oil_formation_volume_factor, - water_formation_volume_factor, - gas_inverse_formation_volume_factor, - oil_inverse_formation_volume_factor, - water_inverse_formation_volume_factor, - }; - - UnitSystem(UnitType unit); - - const std::string& getName() const; - UnitType getType() const; - - void addDimension(const std::string& dimension, double SIfactor, double SIoffset = 0.0); - void addDimension(std::shared_ptr dimension); - std::shared_ptr getNewDimension(const std::string& dimension); - std::shared_ptr getDimension(const std::string& dimension) const; - bool hasDimension(const std::string& dimension) const; - bool equal(const UnitSystem& other) const; - - std::shared_ptr parse(const std::string& dimension) const; - - double from_si( measure, double ) const; - double to_si( measure, double ) const; - void from_si( measure, std::vector& ) const; - void to_si( measure, std::vector& ) const; - const char* name( measure ) const; - - static UnitSystem * newMETRIC(); - static UnitSystem * newFIELD(); - static UnitSystem * newLAB(); - private: - std::shared_ptr parseFactor(const std::string& dimension) const; - - std::string m_name; - UnitType m_unittype; - std::map > m_dimensions; - const double* measure_table_from_si; - const double* measure_table_to_si; - const char* const* unit_name_table; - }; -} - - -#endif - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Units/tests/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Units/tests/CMakeLists.txt deleted file mode 100644 index cba904c02d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Units/tests/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -foreach(tapp UnitTests COMPSEGUnits) - opm_add_test( run${tapp} SOURCES ${tapp}.cpp LIBRARIES opmparser ${Boost_LIBRARIES}) -endforeach() diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Units/tests/COMPSEGUnits.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Units/tests/COMPSEGUnits.cpp deleted file mode 100644 index 20c0fdb8bd..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Units/tests/COMPSEGUnits.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#define BOOST_TEST_MODULE COMPSEGUNITS - -#include - -#include -#include -#include -#include -#include -#include -#include - -using namespace Opm; - -inline std::shared_ptr createCOMPSEGSDeck() { - const char *deckData = - "COMPSEGS\n" - " WELL /\n" - " 1 1 1 1 100 100 X 10/\n" - "/\n"; - - Parser parser; - DeckConstPtr deck(parser.parseString(deckData, ParseContext())); - return deck; -} - - - -BOOST_AUTO_TEST_CASE(CreateDimension) { - DeckConstPtr deck = createCOMPSEGSDeck(); - const auto& keyword = deck->getKeyword(); - const auto& record = keyword.getRecord(1); - BOOST_CHECK_NO_THROW( record.getItem().getSIDouble(0) ); -} - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Units/tests/UnitTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Units/tests/UnitTests.cpp deleted file mode 100644 index 4cf311dd24..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Units/tests/UnitTests.cpp +++ /dev/null @@ -1,228 +0,0 @@ -/* - Copyright 2013 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#define BOOST_TEST_MODULE UnitTests - -#include -#include -#include - -#include - -#include - -using namespace Opm; - -BOOST_AUTO_TEST_CASE(CreateDimension) { - Dimension length("Length" , 1); - BOOST_CHECK_EQUAL("Length" , length.getName()); - BOOST_CHECK_EQUAL(1 , length.getSIScaling()); -} - -BOOST_AUTO_TEST_CASE(makeComposite) { - std::shared_ptr composite(Dimension::newComposite("Length*Length*Length/Time" , 100)); - BOOST_CHECK_EQUAL("Length*Length*Length/Time" , composite->getName()); - BOOST_CHECK_EQUAL(100 , composite->getSIScaling()); -} - - -BOOST_AUTO_TEST_CASE(CreateDimensionInvalidNameThrows) { - BOOST_CHECK_THROW(Dimension(" " , 1) , std::invalid_argument); - BOOST_CHECK_THROW(Dimension(".LX" , 1) , std::invalid_argument); - BOOST_CHECK_THROW(Dimension("*" , 1) , std::invalid_argument); - BOOST_CHECK_THROW(Dimension("/" , 1) , std::invalid_argument); - BOOST_CHECK_THROW(Dimension("2" , 1) , std::invalid_argument); - BOOST_CHECK_NO_THROW(Dimension("1" , 1)); -} - - -BOOST_AUTO_TEST_CASE(CreateUnitSystem) { - UnitSystem system(UnitSystem::UNIT_TYPE_METRIC); - BOOST_CHECK_EQUAL("Metric" , system.getName()); -} - - -BOOST_AUTO_TEST_CASE(UnitSystemEmptyHasNone) { - UnitSystem system(UnitSystem::UNIT_TYPE_METRIC); - BOOST_CHECK_EQUAL( false , system.hasDimension("Length")); - BOOST_CHECK_EQUAL( false , system.hasDimension("LXY")); -} - - - -BOOST_AUTO_TEST_CASE(UnitSystemGetMissingDimensionThrows) { - UnitSystem system(UnitSystem::UNIT_TYPE_METRIC); - BOOST_CHECK_THROW( system.getDimension("Length") , std::invalid_argument ); -} - -BOOST_AUTO_TEST_CASE(UnitSystemGetNewOK) { - UnitSystem system(UnitSystem::UNIT_TYPE_METRIC); - system.addDimension("Length" , 10 ); - system.addDimension("Time" , 100); - - BOOST_CHECK_EQUAL( false , system.hasDimension("Length*Length/Time")); - std::shared_ptr comp = system.getNewDimension("Length*Length/Time"); - BOOST_CHECK_EQUAL( true , system.hasDimension("Length*Length/Time")); - BOOST_CHECK_EQUAL(1 , comp->getSIScaling()); -} - - - - -BOOST_AUTO_TEST_CASE(UnitSystemAddDimensions) { - UnitSystem system(UnitSystem::UNIT_TYPE_METRIC); - system.addDimension("Length" , 1 ); - system.addDimension("Time" , 86400 ); - system.addDimension("Temperature", 1.0, 273.15); - - std::shared_ptr length = system.getDimension("Length"); - std::shared_ptr time = system.getDimension("Time"); - std::shared_ptr temperature = system.getDimension("Temperature"); - BOOST_CHECK_EQUAL(1 , length->getSIScaling()); - BOOST_CHECK_EQUAL(86400 , time->getSIScaling()); - BOOST_CHECK_EQUAL(1.0 , temperature->getSIScaling()); - BOOST_CHECK_EQUAL(273.15, temperature->getSIOffset()); - - system.addDimension("Length" , 0.3048); - length = system.getDimension("Length"); - BOOST_CHECK_EQUAL(0.3048 , length->getSIScaling()); -} - - -BOOST_AUTO_TEST_CASE(UnitSystemParseInvalidThrows) { - UnitSystem system(UnitSystem::UNIT_TYPE_METRIC); - BOOST_CHECK_THROW( system.parse("//") , std::invalid_argument); - BOOST_CHECK_THROW( system.parse("Length * Length / Time") , std::invalid_argument); - - system.addDimension("Length" , 3.00 ); - system.addDimension("Time" , 9.0 ); - - std::shared_ptr volumePerTime = system.parse("Length*Length*Length/Time"); - BOOST_CHECK_EQUAL("Length*Length*Length/Time" , volumePerTime->getName() ); - BOOST_CHECK_EQUAL(3.0 , volumePerTime->getSIScaling()); -} - - - -static void checkSystemHasRequiredDimensions(std::shared_ptr system) { - BOOST_CHECK( system->hasDimension("1")); - BOOST_CHECK( system->hasDimension("Length")); - BOOST_CHECK( system->hasDimension("Mass")); - BOOST_CHECK( system->hasDimension("Time")); - BOOST_CHECK( system->hasDimension("Permeability")); - BOOST_CHECK( system->hasDimension("Pressure")); - BOOST_CHECK( system->hasDimension("Temperature")); -} - - - -BOOST_AUTO_TEST_CASE(CreateMetricSystem) { - std::shared_ptr system = std::shared_ptr( UnitSystem::newMETRIC() ); - checkSystemHasRequiredDimensions( system ); - - BOOST_CHECK_EQUAL( Metric::Length , system->getDimension("Length")->getSIScaling() ); - BOOST_CHECK_EQUAL( Metric::Mass , system->getDimension("Mass")->getSIScaling() ); - BOOST_CHECK_EQUAL( Metric::Time , system->getDimension("Time")->getSIScaling() ); - BOOST_CHECK_EQUAL( Metric::Permeability , system->getDimension("Permeability")->getSIScaling() ); - BOOST_CHECK_EQUAL( Metric::Pressure , system->getDimension("Pressure")->getSIScaling() ); -} - - - -BOOST_AUTO_TEST_CASE(CreateFieldSystem) { - std::shared_ptr system = std::shared_ptr( UnitSystem::newFIELD() ); - checkSystemHasRequiredDimensions( system ); - - BOOST_CHECK_EQUAL( Field::Length , system->getDimension("Length")->getSIScaling() ); - BOOST_CHECK_EQUAL( Field::Mass , system->getDimension("Mass")->getSIScaling() ); - BOOST_CHECK_EQUAL( Field::Time , system->getDimension("Time")->getSIScaling() ); - BOOST_CHECK_EQUAL( Field::Permeability , system->getDimension("Permeability")->getSIScaling() ); - BOOST_CHECK_EQUAL( Field::Pressure , system->getDimension("Pressure")->getSIScaling() ); -} - - - - -BOOST_AUTO_TEST_CASE(DimensionEqual) { - Dimension d1("Length" , 1); - Dimension d2("Length" , 1); - Dimension d3("Time" , 1); - Dimension d4("Length" , 2); - - BOOST_CHECK_EQUAL( true , d1.equal(d1) ); - BOOST_CHECK_EQUAL( true , d1.equal(d2) ); - BOOST_CHECK_EQUAL( false , d1.equal(d3) ); - BOOST_CHECK_EQUAL( false , d1.equal(d4) ); -} - - -BOOST_AUTO_TEST_CASE(UnitSystemEqual) { - std::shared_ptr metric1 = std::shared_ptr( UnitSystem::newMETRIC() ); - std::shared_ptr metric2 = std::shared_ptr( UnitSystem::newMETRIC() ); - std::shared_ptr field = std::shared_ptr( UnitSystem::newFIELD() ); - - BOOST_CHECK_EQUAL( true , metric1->equal( *metric1 )); - BOOST_CHECK_EQUAL( true , metric1->equal( *metric2 )); - BOOST_CHECK_EQUAL( false , metric1->equal( *field )); - metric1->addDimension("g" , 3.00 ); - BOOST_CHECK_EQUAL( false , metric1->equal( *metric2 )); - BOOST_CHECK_EQUAL( false , metric2->equal( *metric1 )); - -} - - - -BOOST_AUTO_TEST_CASE(LabUnitConversions) { - using Meas = UnitSystem::measure; - - auto lab = std::unique_ptr( UnitSystem::newLAB() ); - - { - const auto furlong = 660*details::unit::feet; - BOOST_CHECK_CLOSE( 2.01168e4 , lab->from_si( Meas::length , furlong ) , 1.0e-10 ); - BOOST_CHECK_CLOSE( furlong , lab->to_si( Meas::length , 2.01168e4 ) , 1.0e-10 ); - } - - struct Factor { Meas m; double f; }; - - for (const auto& q : { Factor{ Meas::density , 1.0e3 } , - Factor{ Meas::pressure , 101325.0 } , - Factor{ Meas::viscosity , 1.0e-3 } , - Factor{ Meas::liquid_surface_volume , 1.0e-6 } , - Factor{ Meas::gas_surface_volume , 1.0e-6 } , - Factor{ Meas::time , 3600.0 } , - Factor{ Meas::mass , 1.0e-3 } }) - { - BOOST_CHECK_CLOSE( q.f , lab->to_si( q.m , 1.0 ) , 1.0e-10 ); - BOOST_CHECK_CLOSE( 1.0 , lab->from_si( q.m , q.f ) , 1.0e-10 ); - } -} - - -BOOST_AUTO_TEST_CASE( VectorConvert ) { - std::vector d0 = {1,2,3}; - std::vector d1 = {1,2,3}; - UnitSystem * units = UnitSystem::newLAB(); - - units->from_si( UnitSystem::measure::pressure , d0 ); - for (size_t i = 0; i < d1.size(); i++) - BOOST_CHECK_EQUAL( units->from_si( UnitSystem::measure::pressure , d1[i] ) , d0[i]); - - delete units; -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Utility/Functional.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Utility/Functional.cpp deleted file mode 100644 index 706715b760..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Utility/Functional.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ -#include - -namespace Opm { -namespace fun { - - iota::iota( int fst, int lst ) : first( fst ), last( lst ) {} - - iota::iota( int lst ) : iota( 0, lst ) {} - - size_t iota::size() const { - return this->last - this->first; - } - - iota::const_iterator iota::begin() const { - return { first }; - } - - iota::const_iterator iota::end() const { - return { last }; - } - - int iota::const_iterator::operator*() const { - return this->value; - } - - iota::const_iterator& iota::const_iterator::operator++() { - ++( this->value ); - return *this; - } - - iota::const_iterator iota::const_iterator::operator++( int ) { - iota::const_iterator copy( *this ); - this->operator++(); - return copy; - } - - bool iota::const_iterator::operator==( const const_iterator& rhs ) const { - return this->value == rhs.value; - } - - bool iota::const_iterator::operator!=( const const_iterator& rhs ) const { - return !(*this == rhs ); - } - - iota::const_iterator::const_iterator( int x ) : value( x ) {} - - -} -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Utility/Functional.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Utility/Functional.hpp deleted file mode 100644 index 680c1592ea..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Utility/Functional.hpp +++ /dev/null @@ -1,239 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef OPM_FUNCTIONAL_HPP -#define OPM_FUNCTIONAL_HPP - -#include -#include -#include -#include - -namespace Opm { - -namespace fun { - - /* - * The Utility/Functional library provides convenient high level - * functionality and higher order functions inspiried by functional - * languages (in particular Haskell) and modern C++. The goal is to provide - * lightweight features that reduce boilerplate and make code more - * declarative. - */ - - /* - * map :: (a -> b) -> [a] -> [b] - * - * maps the elements [a] of the passed container C to [b], by using the - * passed function f :: a -> b. Works like map in haskell, lisp, python etc. - * - * C can be any foreach-compatible container (that supports .begin, - * .end), but will always return a vector. - * - * F can be any Callable, that is both function pointer, - * operator()-providing class or std::function, including lambdas. F is - * typically passed by reference. F must be unary of type A (which must - * match what C::const_iterator::operator* returns) and have return - * type B (by value). - * - * In short, this function deal with vector allocation, resizing and - * population based on some function f. - * - * fun::map( f, vec ) is equivalent to: - * vector dst; - * for( auto& x : vec ) dst.push_back( f( x ) ); - * return dst; - * - * The behaviour is undefined if F has any side effects. - * - * -- - * - * int plus1( int x ) { return x + 1; } - * base_vec = { 0, 1, 2, 3, 4 }; - * vec = fun::map( &plus1, base_vec ); - * - * vec => { 1, 2, 3, 4, 5 } - * - * -- - * - * int mul2 = []( int x ) { return x * 2; }; - * base_vec = { 0, 1, 2, 3, 4 }; - * vec = fun::map( mul2, base_vec ); - * - * vec => { 0, 2, 4, 6, 8 }; - * - */ - template< typename F, typename C > - std::vector< typename std::result_of< F( typename C::const_iterator::value_type& ) >::type > - map( F f, const C& src ) { - using A = typename C::const_iterator::value_type; - using B = typename std::result_of< F( A& ) >::type; - std::vector< B > ret; - ret.reserve( src.size() ); - - std::transform( src.begin(), src.end(), std::back_inserter( ret ), f ); - return ret; - } - - /* - * concat :: [[a]] -> [a] - * - * A primitive concat taking a vector of vectors, flattened into a - * single 1 dimensional vector. Moves all the elements so no unecessary - * copies are done. - * - * vec = { { 1 }, { 2, 2 }, { 3, 3, 3 } } - * cvec = concat( vec ) => { 1, 2, 2, 3, 3, 3 } - */ - template< typename A > - std::vector< A > concat( std::vector< std::vector< A > >&& src ) { - const auto size = std::accumulate( src.begin(), src.end(), 0, - []( std::size_t acc, const std::vector< A >& x ) { - return acc + x.size(); - } - ); - - std::vector< A > dst; - dst.reserve( size ); - - for( auto& x : src ) - std::move( x.begin(), x.end(), std::back_inserter( dst ) ); - - return dst; - } - - - /* - * iota :: int -> [int] - * iota :: (int,int) -> [int] - * - * iota (ι) is borrowed from the APL programming language. This particular - * implementation behaves as a generator-like constant-space consecutive - * sequence of integers [m,n). Written to feel similar to std::iota, but as - * a producer instead of straight-up writer. This is similar to python2.7s - * xrange(), python3s range() and haskell's [0..(n-1)]. Some examples - * follow. - * - * Notes: - * * iota defaults to [0,n) - * * iota uses 0 indexing to feel more familiar to C++'s zero indexing. - * * iota can start at negative indices, but will always count upwards. - * * iota::const_iterator does not support operator-- (which would allow - * support for reverse iterators). This can be implemented if need arises. - * * iota is meant to play nice with the rest of fun and to be able to - * replace mundane for loops when the loops only purpose is to create the - * sequence of elements. iota can feel more declarative and work better - * with functions. - * * iota adds value semantics to things that in C++ normally relies on - * variable mutations. iota is meant to make it less painful to write - * immutable and declarative code. - * * as with all iterators, iota( n, m ) behaviour is undefined if m < n - * * unlike python's range, iota doesn't support steps (only increments). - * this is by design to keep this simple and minimal, as well as the name - * iota being somewhat unsuitable for stepping ranges. If the need for - * this arises it will be a separate function. - * - * fun::iota( 5 ) => [ 0, 1, 2, 3, 4 ] - * fun::iota( 3 ) => [ 0, 1, 2 ] - * fun::iota( 1, 6 ) => [ 1, 2, 3, 4, 5 ] - * - * -- - * - * std::vector< int > vec ( 5, 0 ); - * std::iota( vec.begin(), vec.end(), 0 ); - * vec => [ 0, 1, 2, 3, 4 ] - * - * fun::iota i( 5 ); - * std::vector vec( i.begin(), i.end() ); - * vec => [ 0, 1, 2, 3, 4 ] - * - * -- - * - * int plus( int x ) { return x + 1; } - * auto vec = fun::map( &plus, fun::iota( 5 ) ); - * vec => [ 1, 2, 3, 4, 5 ] - * - * is equivalent to - * - * int plus( int x ) { return x + 1; } - * std::vector< int > vec; - * for( int i = 0; i < 5; ++i ) - * vec.push_back( plus( i ) ); - * vec => [ 1, 2, 3, 4, 5 ] - * - * -- - * - * While not the primary intended use case, this enables foreach loop - * syntax over intervals: - * - * for( auto i : fun::iota( 5 ) ) - * std::cout << i << " "; - * - * => 0 1 2 3 4 - * - * for( auto i : fun::iota( 1, 6 ) ) - * std::cout << i << " "; - * - * => 1 2 3 4 5 - * - */ - class iota { - public: - iota( int end ); - iota( int begin, int end ); - - class const_iterator { - public: - using difference_type = int; - using value_type = int; - using pointer = int*; - using reference = int&; - using iterator_category = std::forward_iterator_tag; - - const_iterator() = default; - - int operator*() const; - - const_iterator& operator++(); - const_iterator operator++( int ); - - bool operator==( const const_iterator& rhs ) const; - bool operator!=( const const_iterator& rhs ) const; - - private: - const_iterator( int ); - int value; - - friend class iota; - }; - - size_t size() const; - - const_iterator begin() const; - const_iterator end() const; - - private: - int first; - int last; - }; - -} -} - -#endif //OPM_FUNCTIONAL_HPP diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Utility/String.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Utility/String.hpp deleted file mode 100644 index 8dacc0b778..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Utility/String.hpp +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef OPM_UTILITY_STRING_HPP -#define OPM_UTILITY_STRING_HPP - -#include -#include - -namespace Opm { - -template< typename T, typename U > -U& uppercase( const T& src, U& dst ) { - const auto up = []( char c ) { return std::toupper( c ); }; - std::transform( std::begin( src ), std::end( src ), std::begin( dst ), up ); - return dst; -} - -template< typename T > -typename std::decay< T >::type uppercase( T&& x ) { - typename std::decay< T >::type t( std::forward< T >( x ) ); - return std::move( uppercase( t, t ) ); -} - -} - -#endif //OPM_UTILITY_STRING_HPP diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Utility/Stringview.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Utility/Stringview.cpp deleted file mode 100644 index 0b06858ef1..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Utility/Stringview.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include -#include - -#include - -std::ostream& Opm::operator<<( std::ostream& stream, const Opm::string_view& view ) { - std::copy( view.begin(), view.end(), std::ostream_iterator< char >( stream ) ); - return stream; -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Utility/Stringview.hpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Utility/Stringview.hpp deleted file mode 100644 index bbd737c984..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Utility/Stringview.hpp +++ /dev/null @@ -1,238 +0,0 @@ -/* - Copyright (C) 2016 by Statoil ASA - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . - */ - -#ifndef OPM_UTILITY_SUBSTRING_HPP -#define OPM_UTILITY_SUBSTRING_HPP - -#include -#include -#include -#include -#include - -namespace Opm { - /* - * string_view is a simple view-into-substring feature whose primary - * usecase is to avoid deep copying strings in the inner loops of the - * parser. Relies on whatever it's viewing into is kept alive (as all - * iterators do): - * - * auto rec = make_raw_record(); - * string_view view = rec.getItem( 3 ); - * - * view.size(); view[ 10 ]; // ok - * ~rec(); - * view[ 3 ]; // not ok - * - * This is desired to fill out a gap in the C++ standard library, since - * string_view has yet to be standardised - * - * http://en.cppreference.com/w/cpp/experimental/basic_string_view - */ - class string_view { - public: - using const_iterator = const char*; - - inline string_view() = default; - inline string_view( const_iterator, const_iterator ); - inline string_view( const_iterator, size_t ); - inline string_view( const std::string& ); - inline string_view( const std::string&, size_t ); - inline string_view( const char* ); - - inline const_iterator begin() const; - inline const_iterator end() const; - - inline char front() const; - inline char back() const; - - inline char operator[]( size_t ) const; - inline bool operator<( const string_view& ) const; - inline bool operator==( const string_view& ) const; - - inline bool empty() const; - inline size_t size() const; - inline size_t length() const; - - /* - * substr operations are bounds checked, i.e. if to > from or to > - * size then exceptions are thrown. - * - * returns the substring [from,to), meaning - * view = "sample"; - * view.substr( 0, view.size() ) => sample - * view.substr( 0, 5 ) => sampl - */ - inline std::string string() const; - inline std::string substr( size_t from = 0 ) const; - inline std::string substr( size_t from, size_t to ) const; - - private: - const_iterator fst = nullptr; - const_iterator lst = nullptr; - }; - - /* - * The implementation of string_view is inline and therefore the definitions - * are also in this file. The reason for this is performance; string_view's - * logic is trivial and function call and indirection overhead is significant - * compared to the useful work it does. Additionally, string_view is a *very* - * much used class in the inner loops of the parser - inlining the - * implementation measured to improve performance by some 10%. - */ - - - // Non-member operators using string_view. - - std::ostream& operator<<( std::ostream& stream, const Opm::string_view& view ); - - inline std::string operator+( std::string str, const Opm::string_view& view ) { - return str.append( view.begin(), view.end() ); - } - - inline std::string operator+( const Opm::string_view& view, const std::string& str ) { - return view.string().append( str.begin(), str.end() ); - } - - inline bool operator==( const Opm::string_view& view, const std::string& rhs ) { - return rhs.size() == view.size() && - std::equal( view.begin(), view.end(), std::begin( rhs ) ); - } - - inline bool operator==( const Opm::string_view& view, const char* rhs ) { - return std::strlen( rhs ) == view.size() && - std::equal( view.begin(), view.end(), rhs ); - } - - inline bool operator==( const std::string& lhs, const Opm::string_view& view ) { - return view == lhs; - } - - inline bool operator==( const char* lhs, const Opm::string_view& view ) { - return view == lhs; - } - - inline bool operator!=( const Opm::string_view& view, const std::string& rhs ) { - return !( view == rhs ); - } - - inline bool operator!=( const std::string& lhs, const Opm::string_view& view ) { - return !( view == lhs ); - } - - inline bool operator!=( const Opm::string_view& view, const char* rhs ) { - return !( view == rhs ); - } - - inline bool operator!=( const char* lhs, const Opm::string_view& view ) { - return !( view == lhs ); - } - - - // Member functions of string_view. - - inline string_view::string_view( const_iterator first, - const_iterator last ) : - fst( first ), - lst( last ) - {} - - inline string_view::string_view( const_iterator first , - size_t count ) : - fst( first ), - lst( first + count ) - {} - - inline string_view::string_view( const std::string& str ) : - string_view( str.data(), str.size() ) - {} - - inline string_view::string_view( const std::string& str, size_t count ) : - string_view( str.data(), count ) - {} - - inline string_view::string_view( const char* str ) : - string_view( str, str + std::strlen( str ) ) - {} - - inline string_view::const_iterator string_view::begin() const { - return this->fst; - } - - inline string_view::const_iterator string_view::end() const { - return this->lst; - } - - inline char string_view::front() const { - return *this->fst; - } - - inline char string_view::back() const { - return *(this->lst - 1); - } - - inline char string_view::operator[]( size_t i ) const { - return *(this->begin() + i); - } - - inline bool string_view::operator<( const string_view& rhs ) const { - return std::lexicographical_compare( this->begin(), this->end(), - rhs.begin(), rhs.end() ); - } - - inline bool string_view::operator==( const string_view& rhs ) const { - return std::equal( this->begin(), this->end(), rhs.begin() ); - } - - inline bool string_view::empty() const { - return std::distance( this->begin(), this->end() ) == 0; - } - - inline size_t string_view::size() const { - return std::distance( this->begin(), this->end() ); - } - - inline size_t string_view::length() const { - return std::distance( this->begin(), this->end() ); - } - - inline std::string string_view::string() const { - return this->substr(); - } - - inline std::string string_view::substr( size_t from ) const { - return this->substr( from, this->size() ); - } - - inline std::string string_view::substr( size_t from, size_t to ) const { - if( from > this->size() ) - throw std::out_of_range( "'from' is greater than length" ); - - if( to > this->size() ) - throw std::out_of_range( "'to' is greater than length" ); - - if( from > to ) - throw std::invalid_argument( "'from' is greater than 'to'" ); - - return std::string( this->begin() + from, this->begin() + to ); - } - -} - -#endif //OPM_UTILITY_SUBSTRING_HPP diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Utility/tests/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Utility/tests/CMakeLists.txt deleted file mode 100644 index 9148d27616..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Utility/tests/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -foreach(tapp FunctionalTests StringviewTests StringTests ) - - opm_add_test(run${tapp} SOURCES ${tapp}.cpp - LIBRARIES opmparser ${Boost_LIBRARIES}) - -endforeach() diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Utility/tests/FunctionalTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Utility/tests/FunctionalTests.cpp deleted file mode 100644 index 3ec90dd592..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Utility/tests/FunctionalTests.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/* - Copyright 2016 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM 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. - - OPM 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 for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ -#define BOOST_TEST_MODULE FunctionalTests - -#include -#include -#include - -#include - -#include - - -using namespace Opm; - - -BOOST_AUTO_TEST_CASE(TestMap) { - std::map m = { {"C", 3}, {"B" , 2} , {"A" , 1}}; - std::vector keys_expected = {"A" , "B" , "C"}; - auto keys = fun::map( [] ( const std::pair& pair) { return pair.first; } , m); - - BOOST_CHECK_EQUAL_COLLECTIONS(keys.begin(), keys.end(), - keys_expected.begin(), keys_expected.end()); -} - - -BOOST_AUTO_TEST_CASE(TestConcat) { - std::vector> vector_of_vectors = {{1},{2,2},{3,3,3}}; - auto conc = fun::concat( std::move(vector_of_vectors) ); - std::vector expected = {1,2,2,3,3,3}; - - BOOST_CHECK_EQUAL_COLLECTIONS(conc.begin(), conc.end(), - expected.begin(), expected.end()); -} - - -BOOST_AUTO_TEST_CASE(TestConcatMap) { - std::vector input = {1,2,3}; - auto conc = fun::concat( fun::map( []( int x ) { return std::vector( x,x ); } , input)); - - std::vector expected = {1,2,2,3,3,3}; - BOOST_CHECK_EQUAL_COLLECTIONS(conc.begin(), conc.end(), - expected.begin(), expected.end()); - -} - - - -BOOST_AUTO_TEST_CASE(iotaEqualCollections) { - std::vector< int > vec( 5 ); - - for( int i = 0; i < 5; ++i ) - vec[ i ] = i; - - fun::iota iota( 5 ); - for( auto x : iota ) - std::cout << x << " "; - std::cout << std::endl; - std::vector< int > vec_iota( iota.begin(), iota.end() ); - - BOOST_CHECK_EQUAL_COLLECTIONS( - vec_iota.begin(), vec_iota.end(), - vec.begin(), vec.end() ); - BOOST_CHECK_EQUAL_COLLECTIONS( - vec_iota.begin(), vec_iota.end(), - fun::iota( 5 ).begin(), fun::iota( 5 ).end() ); - BOOST_CHECK_EQUAL_COLLECTIONS( - vec.begin(), vec.end(), - fun::iota( 5 ).begin(), fun::iota( 5 ).end() ); -} - -BOOST_AUTO_TEST_CASE(iotaForeach) { - /* this test is mostly a syntax verification test */ - - std::vector< int > vec = { 0, 1, 2, 3, 4 }; - - for( auto x : fun::iota( 5 ) ) - BOOST_CHECK_EQUAL( vec[ x ], x ); -} - -BOOST_AUTO_TEST_CASE(iotaSize) { - BOOST_CHECK_EQUAL( 5, fun::iota( 5 ).size() ); - BOOST_CHECK_EQUAL( 5, fun::iota( 1, 6 ).size() ); - BOOST_CHECK_EQUAL( 0, fun::iota( 0 ).size() ); - BOOST_CHECK_EQUAL( 0, fun::iota( 0, 0 ).size() ); -} - -BOOST_AUTO_TEST_CASE(iotaWithMap) { - const auto plus1 = []( int x ) { return x + 1; }; - - std::vector< int > vec = { 1, 2, 3, 4, 5 }; - auto vec_iota = fun::map( plus1, fun::iota( 5 ) ); - - BOOST_CHECK_EQUAL_COLLECTIONS( - vec_iota.begin(), vec_iota.end(), - vec.begin(), vec.end() ); -} - -BOOST_AUTO_TEST_CASE(iotaNegativeBegin) { - const auto vec = { -4, -3, -2, -1, 0 }; - - fun::iota iota( -4, 1 ); - - BOOST_CHECK_EQUAL_COLLECTIONS( - vec.begin(), vec.end(), - iota.begin(), iota.end() ); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Utility/tests/StringTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Utility/tests/StringTests.cpp deleted file mode 100644 index c2ea987384..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Utility/tests/StringTests.cpp +++ /dev/null @@ -1,62 +0,0 @@ -#define BOOST_TEST_MODULE StringTests - -#include - -#include -#include - -using namespace Opm; - -BOOST_AUTO_TEST_CASE( uppercase_copy ) { - const std::string src = "string"; - const std::string dst = uppercase( src ); - - BOOST_CHECK_EQUAL( src, "string" ); - BOOST_CHECK_EQUAL( dst, "STRING" ); -} - -BOOST_AUTO_TEST_CASE( uppercase_inplace ) { - std::string src = "string"; - auto& ref = uppercase( src, src ); - - BOOST_CHECK_EQUAL( src, "STRING" ); - BOOST_CHECK_EQUAL( src, ref ); - BOOST_CHECK_EQUAL( std::addressof( src ), std::addressof( ref ) ); -} - -BOOST_AUTO_TEST_CASE( nonconst_ref ) { - std::string src = "string"; - auto dst = uppercase( src ); - - BOOST_CHECK_EQUAL( src, "string" ); - BOOST_CHECK_EQUAL( dst, "STRING" ); -} - -BOOST_AUTO_TEST_CASE( uppercase_move ) { - std::string src = "string"; - auto dst = uppercase( std::move( src ) ); - - BOOST_CHECK_EQUAL( dst, "STRING" ); -} - -BOOST_AUTO_TEST_CASE( uppercase_mixed_type ) { - std::string src = "string"; - string_view view( src ); - - - std::string dst = "string"; - uppercase( view, dst ); - BOOST_CHECK_EQUAL( dst, "STRING" ); - BOOST_CHECK_EQUAL( view, "string" ); -} - -BOOST_AUTO_TEST_CASE( write_parts_of_dst ) { - std::string src = "string"; - string_view view( src ); - - - std::string dst = "stringmixed"; - uppercase( view, dst ); - BOOST_CHECK_EQUAL( dst, "STRINGmixed" ); - BOOST_CHECK_EQUAL( view, "string" ); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Utility/tests/StringviewTests.cpp b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Utility/tests/StringviewTests.cpp deleted file mode 100644 index 0a57384a01..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/Utility/tests/StringviewTests.cpp +++ /dev/null @@ -1,106 +0,0 @@ -#define BOOST_TEST_MODULE StringviewTests - -#include -#include - -#include - -#include - -using namespace Opm; - -BOOST_AUTO_TEST_CASE(fullStringView) { - std::string srcstr = "lorem ipsum"; - string_view view( srcstr ); - - BOOST_CHECK_EQUAL_COLLECTIONS( - srcstr.begin(), srcstr.end(), - view.begin(), view.end() ); -} - -BOOST_AUTO_TEST_CASE(viewCorrectSize) { - std::string srcstr = "lorem ipsum"; - - string_view full( srcstr ); - BOOST_CHECK_EQUAL( srcstr.size(), full.size() ); - - string_view view( srcstr, 5 ); - BOOST_CHECK_EQUAL( 5, view.size() ); - BOOST_CHECK_EQUAL( 5, view.length() ); -} - -BOOST_AUTO_TEST_CASE(viewOperatorAt) { - std::string srcstr = "lorem ipsum"; - string_view view( srcstr ); - - for( size_t i = 0; i < view.size(); ++i ) - BOOST_CHECK_EQUAL( view[ i ], srcstr[ i ] ); -} - -BOOST_AUTO_TEST_CASE(viewFrontBack) { - std::string srcstr = "lorem ipsum"; - string_view view( srcstr ); - - BOOST_CHECK_EQUAL( view.front(), 'l' ); - BOOST_CHECK_EQUAL( view.back(), 'm' ); -} - - -BOOST_AUTO_TEST_CASE(viewSubstr) { - std::string srcstr = "lorem ipsum"; - string_view view( srcstr ); - - BOOST_CHECK_NO_THROW( view.string() ); - BOOST_CHECK_EQUAL( srcstr, view.string() ); - BOOST_CHECK_EQUAL( srcstr, view.substr() ); - BOOST_CHECK_EQUAL( "", view.substr( 0, 0 ) ); - - BOOST_CHECK_EQUAL( srcstr.substr( 1 ), view.substr( 1 ) ); - - BOOST_CHECK_THROW( view.substr( srcstr.size() + 1 ), std::out_of_range ); - BOOST_CHECK_THROW( view.substr( 0, srcstr.size() + 1 ), std::out_of_range ); - BOOST_CHECK_THROW( view.substr( 1, 0 ), std::invalid_argument ); - BOOST_CHECK_NO_THROW( view.substr( 0, 0 ) ); -} - -BOOST_AUTO_TEST_CASE(viewStream) { - std::string srcstr = "lorem ipsum"; - string_view view( srcstr ); - - std::stringstream str; - str << view; - - BOOST_CHECK_EQUAL( srcstr, str.str() ); -} - -BOOST_AUTO_TEST_CASE(equalityOperators) { - std::string srcstr = "lorem ipsum"; - std::string diffstr = "lorem"; - string_view view( srcstr ); - - BOOST_CHECK_EQUAL( srcstr, view ); - BOOST_CHECK_NE( diffstr, view ); - - BOOST_CHECK_EQUAL( view, srcstr ); - BOOST_CHECK_NE( view, diffstr ); - - BOOST_CHECK_EQUAL( "lorem ipsum", view ); - BOOST_CHECK_NE( "lorem", view ); - - BOOST_CHECK_EQUAL( view, "lorem ipsum" ); - BOOST_CHECK_NE( view, "lorem" ); -} - -BOOST_AUTO_TEST_CASE(plusOperator) { - std::string total = "lorem ipsum"; - std::string lhs = "lorem"; - std::string ws = " "; - std::string rhs = "ipsum"; - - string_view lhs_view( lhs ); - string_view rhs_view( rhs ); - - BOOST_CHECK_EQUAL( total, lhs_view + ws + rhs_view ); - BOOST_CHECK_EQUAL( lhs + ws, lhs_view + ws ); - BOOST_CHECK_EQUAL( ws + rhs, ws + rhs_view ); -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/CMakeLists.txt deleted file mode 100644 index 9f02376fde..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ -find_package (PythonInterp REQUIRED) -find_package (Cwrap) - -if (CWRAP_PYTHON_PATH) - add_subdirectory( c_inter ) - - if (EXISTS "/etc/debian_version") - set( PYTHON_PACKAGE_PATH "dist-packages") - else() - set( PYTHON_PACKAGE_PATH "site-packages") - endif() - set(PYTHON_INSTALL_PREFIX "lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/${PYTHON_PACKAGE_PATH}" CACHE STRING "Subdirectory to install Python modules in") - - - include(cmake/python.cmake) - add_subdirectory( python ) - add_subdirectory( tests ) -else() - message("Could not find cwrap - Python bindings to Ert skipped") -endif() diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/CMakeLists.txt deleted file mode 100644 index b18fa63a2b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -add_library(copmparser SHARED -cparser.cc -cdeck.cc cdeck_keyword.cc cdeck_record.cc cdeck_item.cc -cparse_context.cc -ctable_manager.cc -ctable.cc -ctable_index.cc -ceclipse_grid.cc -cschedule.cc -) - -target_link_libraries(copmparser opmparser) -set_target_properties(copmparser PROPERTIES VERSION ${opm-parser_VERSION_MAJOR}.${opm-parser_VERSION_MINOR} - SOVERSION ${opm-parser_VERSION_MAJOR}) -install( TARGETS copmparser DESTINATION ${CMAKE_INSTALL_LIBDIR} ) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/cdeck.cc b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/cdeck.cc deleted file mode 100644 index 825b7edf38..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/cdeck.cc +++ /dev/null @@ -1,52 +0,0 @@ -#include -#include - -extern "C" { - - int deck_size( const Opm::Deck * deck ); - Opm::Deck * deck_alloc(); - void deck_free( Opm::Deck * deck ); - const Opm::DeckKeyword * deck_iget_keyword( const Opm::Deck * deck , int index); - const Opm::DeckKeyword * deck_iget_named_keyword( const Opm::Deck * deck , const char * keyword , int index); - bool deck_has_keyword( const Opm::Deck * deck , const char * keyword); - int deck_num_keywords( const Opm::Deck * deck , const char * keyword); - - /*-----------------------------------------------------------------*/ - - int deck_size( const Opm::Deck * deck ) { - return static_cast( deck->size() ); - } - - - Opm::Deck * deck_alloc() { - return new Opm::Deck(); - } - - - void deck_free( Opm::Deck * deck ) { - delete deck; - } - - - const Opm::DeckKeyword * deck_iget_keyword( const Opm::Deck * deck , int index) { - return &deck->getKeyword( index ); - } - - - const Opm::DeckKeyword * deck_iget_named_keyword( const Opm::Deck * deck , const char * keyword , int index) { - return &deck->getKeyword( keyword , index ); - } - - - bool deck_has_keyword( const Opm::Deck * deck , const char * keyword) { - return deck->hasKeyword( keyword ); - } - - int deck_num_keywords( const Opm::Deck * deck , const char * keyword) { - return static_cast( deck->count(keyword) ); - } - - -} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/cdeck_item.cc b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/cdeck_item.cc deleted file mode 100644 index 94b5e024a6..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/cdeck_item.cc +++ /dev/null @@ -1,40 +0,0 @@ -#include - -extern "C" { - - int deck_item_get_size( const Opm::DeckItem * item ); - int deck_item_get_type( const Opm::DeckItem * item ); - int deck_item_iget_int( const Opm::DeckItem * item , int index); - double deck_item_iget_double( const Opm::DeckItem * item , int index); - const char * deck_item_iget_string( const Opm::DeckItem * item , int index); - - /*-----------------------------------------------------------------*/ - - int deck_item_get_size( const Opm::DeckItem * item ) { - return static_cast(item->size()); - } - - /* - These types must be *manually* syncronized with the values in - the Python module: opm/deck/item_type_enum.py - */ - - int deck_item_get_type( const Opm::DeckItem * item ) { - return item->typeof(); - } - - int deck_item_iget_int( const Opm::DeckItem * item , int index) { - return item->get< int >(static_cast(index)); - } - - double deck_item_iget_double( const Opm::DeckItem * item , int index) { - return item->get< double >(static_cast(index)); - } - - const char * deck_item_iget_string( const Opm::DeckItem * item , int index) { - const std::string& string = item->get< std::string >(static_cast(index)); - return string.c_str(); - } -} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/cdeck_keyword.cc b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/cdeck_keyword.cc deleted file mode 100644 index a53e92af45..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/cdeck_keyword.cc +++ /dev/null @@ -1,41 +0,0 @@ -#include - -extern "C" { - - Opm::DeckKeyword * deck_keyword_alloc( const char * name ); - void deck_keyword_free( Opm::DeckKeyword * keyword ); - const char * deck_keyword_get_name( const Opm::DeckKeyword * keyword ); - int deck_keyword_get_size( const Opm::DeckKeyword * keyword ); - const Opm::DeckRecord* deck_keyword_iget_record( const Opm::DeckKeyword * keyword , int index); - - /*-----------------------------------------------------------------*/ - - Opm::DeckKeyword * deck_keyword_alloc( const char * name ) { - auto keyword = new Opm::DeckKeyword( name ); - return keyword; - } - - - void deck_keyword_free( Opm::DeckKeyword * keyword ) { - delete keyword; - } - - - const char * deck_keyword_get_name( const Opm::DeckKeyword * keyword ) { - const std::string& std_string = keyword->name(); - return std_string.c_str(); - } - - - int deck_keyword_get_size( const Opm::DeckKeyword * keyword ) { - return static_cast(keyword->size()); - } - - - const Opm::DeckRecord* deck_keyword_iget_record( const Opm::DeckKeyword * keyword , int index) { - return &keyword->getRecord( static_cast(index) ); - } - -} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/cdeck_record.cc b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/cdeck_record.cc deleted file mode 100644 index 342431eeda..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/cdeck_record.cc +++ /dev/null @@ -1,29 +0,0 @@ -#include - -extern "C" { - int deck_record_get_size( const Opm::DeckRecord * record ); - bool deck_record_has_item(const Opm::DeckRecord * record , const char * item); - Opm::DeckItem * deck_record_iget_item( Opm::DeckRecord * record , int index); - Opm::DeckItem * deck_record_get_item( Opm::DeckRecord * record , const char * name); - - /*-----------------------------------------------------------------*/ - - int deck_record_get_size( const Opm::DeckRecord * record ) { - return static_cast(record->size()); - } - - bool deck_record_has_item(const Opm::DeckRecord * record , const char * item) { - return record->hasItem( item ); - } - - Opm::DeckItem * deck_record_iget_item( Opm::DeckRecord * record , int index) { - return &record->getItem( static_cast(index)); - } - - Opm::DeckItem * deck_record_get_item( Opm::DeckRecord * record , const char * name) { - return &record->getItem( name ); - } - -} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/ceclipse_grid.cc b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/ceclipse_grid.cc deleted file mode 100644 index 569d412149..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/ceclipse_grid.cc +++ /dev/null @@ -1,21 +0,0 @@ -#include -#include - -extern "C" { - - Opm::EclipseGrid * eclipse_grid_alloc(Opm::Deck * deck); - void eclipse_grid_free( Opm::EclipseGrid * grid ); - - /*-----------------------------------------------------------------*/ - - Opm::EclipseGrid * eclipse_grid_alloc(Opm::Deck * deck) { - return new Opm::EclipseGrid( *deck, nullptr ); - } - - void eclipse_grid_free( Opm::EclipseGrid * grid ) { - delete grid; - } - -} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/cparse_context.cc b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/cparse_context.cc deleted file mode 100644 index d2194d5724..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/cparse_context.cc +++ /dev/null @@ -1,27 +0,0 @@ -#include -#include - -extern "C" { - - Opm::ParseContext * parse_context_alloc(); - void parse_context_free( Opm::ParseContext * parse_context ) ; - void parse_context_update( Opm::ParseContext * parse_context , const char * var , Opm::InputError::Action action); - - /*-----------------------------------------------------------------*/ - - Opm::ParseContext * parse_context_alloc() { - Opm::ParseContext * parse_context = new Opm::ParseContext( ); - return parse_context; - } - - - void parse_context_free( Opm::ParseContext * parse_context ) { - delete parse_context; - } - - - void parse_context_update( Opm::ParseContext * parse_context , const char * var , Opm::InputError::Action action) { - parse_context->update( var , action ); - } - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/cparser.cc b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/cparser.cc deleted file mode 100644 index 30a2725a2a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/cparser.cc +++ /dev/null @@ -1,43 +0,0 @@ -#include - -#include -#include -#include - - -extern "C" { - - Opm::Deck * parser_parse_file(const Opm::Parser * parser , const char * file , const Opm::ParseContext * parse_mode); - void * parser_alloc(); - bool parser_has_keyword(const Opm::Parser * parser , const char * keyword); - void parser_free(Opm::Parser * parser); - void parser_add_json_keyword(Opm::Parser * parser, const char * json_string); - - /*-----------------------------------------------------------------*/ - - Opm::Deck * parser_parse_file(const Opm::Parser * parser , const char * file , const Opm::ParseContext * parse_mode) { - return parser->newDeckFromFile( file , *parse_mode ); - } - - - void * parser_alloc() { - Opm::Parser * parser = new Opm::Parser( true ); - return parser; - } - - bool parser_has_keyword(const Opm::Parser * parser , const char * keyword) { - return parser->hasKeyword( keyword ); - } - - - void parser_free(Opm::Parser * parser) { - delete parser; - } - - - void parser_add_json_keyword(Opm::Parser * parser, const char * json_string) { - Json::JsonObject json_object(json_string); - parser->addParserKeyword( json_object ); - } - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/cschedule.cc b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/cschedule.cc deleted file mode 100644 index eb9261459a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/cschedule.cc +++ /dev/null @@ -1,34 +0,0 @@ -#include -#include -#include -#include - -extern "C" { - - Opm::Schedule * schedule_alloc(Opm::ParseContext * context, Opm::EclipseGrid * grid, Opm::Deck * deck); - void schedule_free( Opm::Schedule * schedule ); - time_t schedule_end( const Opm::Schedule * schedule ); - time_t schedule_start( const Opm::Schedule * schedule ); - - /*-----------------------------------------------------------------*/ - - time_t schedule_end( const Opm::Schedule * schedule ) { - return schedule->posixEndTime(); - } - - time_t schedule_start( const Opm::Schedule * schedule ) { - return schedule->posixStartTime(); - } - - - Opm::Schedule * schedule_alloc(Opm::ParseContext * context, Opm::EclipseGrid * grid, Opm::Deck * deck) { - return new Opm::Schedule( *context , *grid, *deck ); - } - - void schedule_free( Opm::Schedule * schedule ) { - delete schedule; - } - -} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/ctable.cc b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/ctable.cc deleted file mode 100644 index 567b5012bd..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/ctable.cc +++ /dev/null @@ -1,46 +0,0 @@ -#include -#include - -extern "C" { - - bool table_has_column( const Opm::SimpleTable * table , const char * column ); - int table_get_num_rows( const Opm::SimpleTable * table ); - double table_get_value( const Opm::SimpleTable * table , const char * column , int row_index); - double table_evaluate( const Opm::SimpleTable * table , const char * column , int row_index); - double table_evaluate_from_index( const Opm::SimpleTable * table , const char * column , const Opm::TableIndex * eval_index); - Opm::TableIndex * table_lookup( const Opm::SimpleTable * table , double arg_value ); - - /*-----------------------------------------------------------------*/ - - bool table_has_column( const Opm::SimpleTable * table , const char * column ) { - return table->hasColumn( column ); - } - - - int table_get_num_rows( const Opm::SimpleTable * table ) { - return table->numRows(); - } - - - double table_get_value( const Opm::SimpleTable * table , const char * column , int row_index) { - return table->get( column , row_index ); - } - - - double table_evaluate( const Opm::SimpleTable * table , const char * column , int row_index) { - return table->evaluate( column , row_index ); - } - - - double table_evaluate_from_index( const Opm::SimpleTable * table , const char * column , const Opm::TableIndex * eval_index) { - const auto& valueColumn = table->getColumn( column ); - return valueColumn.eval( *eval_index ); - } - - - Opm::TableIndex * table_lookup( const Opm::SimpleTable * table , double arg_value ) { - const auto& argColumn = table->getColumn( 0 ); - Opm::TableIndex index = argColumn.lookup( arg_value ); - return new Opm::TableIndex( index ); - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/ctable_index.cc b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/ctable_index.cc deleted file mode 100644 index c82b0739b4..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/ctable_index.cc +++ /dev/null @@ -1,14 +0,0 @@ -#include - -extern "C" { - - void table_index_free( Opm::TableIndex * table_index ); - - /*-----------------------------------------------------------------*/ - - void table_index_free( Opm::TableIndex * table_index ) { - delete table_index; - } - - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/ctable_manager.cc b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/ctable_manager.cc deleted file mode 100644 index ee85848ed7..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/ctable_manager.cc +++ /dev/null @@ -1,45 +0,0 @@ -#include -#include -#include - -extern "C" { - - Opm::TableManager * table_manager_alloc( const Opm::Deck * deck ); - void table_manager_free( Opm::TableManager * table_manager ); - bool table_manager_has_table( const Opm::TableManager * table_manager , const char * table_name); - int table_manager_num_tables( const Opm::TableManager * table_manager, const char * table_name); - const Opm::SimpleTable* table_manager_get_table( const Opm::TableManager * table_manager, const char * table_name, int table_num); - - /*-----------------------------------------------------------------*/ - - Opm::TableManager * table_manager_alloc( const Opm::Deck * deck ) { - return new Opm::TableManager( *deck ); - } - - - void table_manager_free( Opm::TableManager * table_manager ) { - delete table_manager; - } - - - bool table_manager_has_table( const Opm::TableManager * table_manager , const char * table_name) { - return table_manager->hasTables( table_name ); - } - - int table_manager_num_tables( const Opm::TableManager * table_manager, const char * table_name) { - if (table_manager->hasTables( table_name )) { - const auto& container = table_manager->getTables( table_name ); - return container.size(); - } else - return 0; - } - - - const Opm::SimpleTable* table_manager_get_table( const Opm::TableManager * table_manager, const char * table_name, int table_num) { - const auto& container = table_manager->getTables( table_name ); - const auto& table = container.getTable( table_num ); - - return &table; - } - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/parser-c.cc b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/parser-c.cc deleted file mode 100644 index f67f4d6b15..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/parser-c.cc +++ /dev/null @@ -1,22 +0,0 @@ -#include -#include - - -extern "C" { - -Opm::Deck * parser_parse_file(const Opm::Parser * parser , const char * file) { - return parser->newDeckFromFile( file , true ); -} - - -void * parser_alloc() { - Opm::Parser * parser = new Opm::Parser( true ); - return parser; -} - - -void parser_free(Opm::Parser * parser) { - delete parser; -} - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/parser.cc b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/parser.cc deleted file mode 100644 index 88bfb6a90c..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/parser.cc +++ /dev/null @@ -1,35 +0,0 @@ -#include - -#include - -/* -#include -#ifdef __cplusplus -extern "C" { -#endif - -void * parser_parse_file(const void * parser , const char * file); -void * parser_alloc(); - -#ifdef __cplusplus -} -#endif -*/ - -extern "C" { - -Opm::Deck * parser_parse_file(const Opm::Parser * parser , const char * file) { - return parser->newDeckFromFile( file , true ); -} - - -void * parser_alloc() { - Opm::Parser * parser = new Opm::Parser( true ); - return parser; -} - -void parser_free(Opm::Parser * parser) { - delete parser; -} - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/parser_c.cc b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/parser_c.cc deleted file mode 100644 index f67f4d6b15..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/c_inter/parser_c.cc +++ /dev/null @@ -1,22 +0,0 @@ -#include -#include - - -extern "C" { - -Opm::Deck * parser_parse_file(const Opm::Parser * parser , const char * file) { - return parser->newDeckFromFile( file , true ); -} - - -void * parser_alloc() { - Opm::Parser * parser = new Opm::Parser( true ); - return parser; -} - - -void parser_free(Opm::Parser * parser) { - delete parser; -} - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/cmake/cmake_pyc b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/cmake/cmake_pyc deleted file mode 100644 index cd2753ac98..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/cmake/cmake_pyc +++ /dev/null @@ -1,27 +0,0 @@ -import py_compile -import os -import os.path -import sys -import shutil - - -src_file = sys.argv[1] -target_file = sys.argv[2] - -(target_path , tail) = os.path.split( target_file ) -if not os.path.exists( target_path ): - try: - os.makedirs( target_path ) - except: - # When running with make -j 4 there might be a race to create this directory. - pass - -shutil.copyfile( src_file , target_file ) -shutil.copystat( src_file , target_file ) -try: - py_compile.compile( target_file , doraise = True) -except Exception,error: - sys.exit("py_compile(%s) failed:%s" % (target_file , error)) - - -sys.exit(0) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/cmake/ctest_run b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/cmake/ctest_run deleted file mode 100644 index 3e1328f28b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/cmake/ctest_run +++ /dev/null @@ -1,45 +0,0 @@ -import sys - -try: - from unittest2 import TextTestRunner -except ImportError: - from unittest import TextTestRunner - - -def runTestCase(tests): - test_result = TextTestRunner(verbosity=0).run(tests) - if test_result.errors or test_result.failures: - for (test, trace_back) in test_result.errors: - sys.stderr.write("=================================================================\n") - sys.stderr.write("Test:%s error \n" % test.id()) - sys.stderr.write("%s\n" % trace_back) - - for (test, trace_back) in test_result.failures: - sys.stderr.write("=================================================================\n") - sys.stderr.write("Test:%s failure \n" % test.id()) - sys.stderr.write("%s\n" % trace_back) - - return False - else: - return True - - -if __name__ == '__main__': - PYTHONPATH = sys.argv[1] - sys.path.insert(0, PYTHONPATH) - - test_class_path = sys.argv[2] - argv = [] - - try: - argv = sys.argv[3:] - except IndexError: - pass - - from ert.test import ErtTestRunner - tests = ErtTestRunner.getTestsFromTestClass(test_class_path, argv) - - if runTestCase(tests): - sys.exit(0) - else: - sys.exit(1) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/cmake/ctest_run_python b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/cmake/ctest_run_python deleted file mode 100644 index a4fdb2d7ae..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/cmake/ctest_run_python +++ /dev/null @@ -1,41 +0,0 @@ -import sys -from unittest import TextTestRunner - - -def runTestCase(tests): - test_result = TextTestRunner(verbosity=0).run(tests) - if test_result.errors or test_result.failures: - for (test, trace_back) in test_result.errors: - sys.stderr.write("=================================================================\n") - sys.stderr.write("Test:%s error \n" % test.id()) - sys.stderr.write("%s\n" % trace_back) - - for (test, trace_back) in test_result.failures: - sys.stderr.write("=================================================================\n") - sys.stderr.write("Test:%s failure \n" % test.id()) - sys.stderr.write("%s\n" % trace_back) - - return False - else: - return True - - -if __name__ == '__main__': - PYTHONPATH = sys.argv[1] - sys.path.insert(0, PYTHONPATH) - - test_class_path = sys.argv[2] - argv = [] - - try: - argv = sys.argv[3:] - except IndexError: - pass - - from ert.test import ErtTestRunner - tests = ErtTestRunner.getTestsFromTestClass(test_class_path, argv) - - if runTestCase(tests): - sys.exit(0) - else: - sys.exit(1) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/cmake/python.cmake b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/cmake/python.cmake deleted file mode 100644 index 7927f6d836..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/cmake/python.cmake +++ /dev/null @@ -1,61 +0,0 @@ -if (NOT PYTHONINTERP_FOUND) - find_package (PythonInterp REQUIRED) -endif () - - -function(add_python_package target package_path source_files install_package) - - set(build_files "") - - foreach (file ${source_files} ) - set( source_file ${CMAKE_CURRENT_SOURCE_DIR}/${file} ) - set( build_file ${PROJECT_BINARY_DIR}/${package_path}/${file} ) - set( install_file ${CMAKE_INSTALL_PREFIX}/${package_path}/${file} ) - - add_custom_command( - OUTPUT ${build_file} - COMMAND ${PYTHON_EXECUTABLE} - ARGS ${PROJECT_SOURCE_DIR}/opm/parser/eclipse/python/cmake/cmake_pyc ${source_file} ${build_file} - DEPENDS ${source_file} ) - - list(APPEND build_files ${build_file} ) - - if (install_package) - install(FILES ${build_file} DESTINATION ${CMAKE_INSTALL_PREFIX}/${package_path}) - install(CODE "execute_process(COMMAND ${PROJECT_SOURCE_DIR}/cmake/cmake_pyc_file ${install_file})") - endif() - - endforeach() - add_custom_target( ${target} ALL DEPENDS ${build_files}) - -endfunction() - - -function(add_python_module target package_path module_file install_package) - set (source_list ${module_file}) - add_python_package( ${target} ${package_path} ${source_list} ${install_package}) -endfunction() - -#----------------------------------------------------------------- - - -function (addPythonTest TEST_NAME TEST_CLASS) - set(oneValueArgs LABELS) - set(multiValueArgs ARGUMENTS ENVIRONMENT) - cmake_parse_arguments(TEST_OPTIONS "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - - add_test(NAME python.tests.${TEST_NAME} - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/${PYTHON_INSTALL_PREFIX} - COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/opm/parser/eclipse/python/cmake/ctest_run_python ${PROJECT_BINARY_DIR}/${PYTHON_INSTALL_PREFIX} ${TEST_CLASS} ${TEST_OPTIONS_ARGUMENTS}) - - if(TEST_OPTIONS_LABELS) - set_property(TEST python.tests.${TEST_NAME} PROPERTY LABELS "Python:${TEST_OPTIONS_LABELS}") - else() - set_property(TEST python.tests.${TEST_NAME} PROPERTY LABELS "Python") - endif() - - if(TEST_OPTIONS_ENVIRONMENT) - set_property(TEST python.tests.${TEST_NAME} PROPERTY ENVIRONMENT ${TEST_OPTIONS_ENVIRONMENT}) - endif() - set_property(TEST python.tests.${TEST_NAME} PROPERTY ENVIRONMENT "PYTHONPATH=${CWRAP_PYTHON_PATH}:${PYTHONPATH}") -endfunction(addPythonTest) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/doc/index.rst b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/doc/index.rst deleted file mode 100644 index 309c670da1..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/doc/index.rst +++ /dev/null @@ -1,336 +0,0 @@ -Parser -====== - -The class :code:`Parser` will create a parser object which can be used -to parse an Eclipse formatted file. To create a new parser object is -quite simple: - -.. code:: python - - from opm.parser import Parser - - parser = Parser() - - - -Parsing a file --------------- - -The parser class has a method :code:`parseFile()` which is used -to parse a file. The :code:`parseFile()` method can be invoked as an -ordinary method on a parser instance, or alternatively as a class -method directly on the :code:`Parser` class: - -.. code:: python - - from opm.parser import Parser - import sys - - - input_file1 = sys.argv[1] - - # Alternative 1 - parse directly from the class: - deck = Parser.parseFile( input_file1 ) - - # Alternative 2 - create a Parser instance and use that - # multiple times - parser = Parser( ) - for file in sys.argv[1:]: - deck = parser.parseFile( file ) - - -Keywords in the parser ----------------------- - -The :code:`__contains__()` method is implemented on the parser and can -be used to check if a certain keyword is recognized by the parser: - -.. code:: python - - from opm.parser import Parser - import sys - - parser = Parser() - for kw in sys.argv[1:]: - if kw in parser: - print("Parser has keyword:%s " % kw) - else: - print("Parser does not recognize keyword: %s" % kw) - -Using the method :code:`addKeyword( )` you can add keywords to the -parser runtime. Adding keywords dynamcally is a slightly advanced -topic, but if you look at the json strings for the built in keywords -you should get a good hint. - -In this example we add the keyword :code:`SALINITY` to the parser: - -.. code:: python - - from opm.parser import Parser - - salinity = {"name" : "SALINITY" , "sections" : ["PROPS"], size : 1, - "items" : [{"name" : "SALINITY" - "value_type" : "DOUBLE", - "dimension" : "Density"}]} - - parser = Parser( ) - parser.addKeyword( salinity ) - -Adding keywords this way requires some knowledge of the schma used to -define keywords, but it is possible. - - -ParseContext -============ - -By default the parser will parse the input files in the strictest mode -possible, this is quite strict and there are plenty of things which -can go wrong. Using the :code:`ParseContext` class you can optionally -configure how strict the parser should be when encountering various -common error situations. In the example below we configure the -:code:`ParseContext` object to ignore unknown keywords: - -.. code:: python - - - from opm.parser import Parser, ParseContext, ErrorAction - - pc = ParseContext() - # Ignore unknown keywords found during parsing - pc.update( "PARSE_UNKNOWN_KEYWORD" , ErrorAction.IGNORE ) - - deck = Parser.parseFile( input_file , parse_mode = pc ) - - -The :code:`ParseContext.update( )` method supports wildcards in the -variable name, so this code will instruct the parser in the most -lenient way possible: - -.. code:: python - - - from opm.parser import Parser, ParseContext, ErrorAction - - pc = ParseContext() - - # Ignore all possible error encountered during the parsing - pc.update( "*" , ErrorAction.IGNORE ) - - deck = Parser.parseFile( input_file , parse_mode = pc ) - -Observe that using :code:`ParseContext` to ignore parse errors is a -slippery slope, when a parser has detected and ignored an error the -internal state will be more fragile, and the chance of a complete -explosion - and also incorrect results, certainly increase this way. - - -Deck -==== - -The return value from the :code:`Parser::parseFile()` method is -an instance of the class :code:`Deck`. The :code:`Deck` class is a -faithful represantation of all the keywords in the input -file. Specifically the following transformations have been applied: - -1. All :code:`INCLUDE` files have been resolved and read. -2. Default values and multipliers have been handled. -3. All items have been converted to correct type; i.e. real, int and - string and all numeric values have been converted to SI units. - -Keyword keyword interactions like applying box modifiers to grid -properties have not been applied, that is in the :code:`EclipseState` -class which is not fully exposed in Python yet. - - -The Deck hierarchy ------------------- - -The information in a deck is organized in hierarchy going as -:code:`Deck`, :code:`DeckKeyword`, :code:`DeckRecord` and -:code:`DeckItem`. Consider the following (incomplete) input deck -consisting of only the :code:`EQLDIMS` and :code:`EQUIL` keywords: - -.. code:: - - EQLDIMS - 3 100 20 1 1 / - - - EQUIL - 2460 382.4 1705.0 0.0 500 0.0 1 1 20 / - 2470 383.4 1000.0 0.0 600 0.0 1 1 20 / - 2480 384.4 3000.0 0.0 400 0.0 1 1 20 / - -The :code:`Deck` is the complete set of keywords in the input and a -:code:`DekcKeyword` is one block of data like :code:`EQLDIMS` and -:code:`EQUIL`. A :code:`DeckRecord` is one *slash terminated* block of -data, and a :code:`DeckItem` is one - or several related - pieces of -data. In the example above the :code:`EQLDIMS` keyword contains one -record, which has five items, and the :code:`EQUIL` keyword has three -records, each consisting of 9 items. - -The concept of :code:`Deck` and :code:`DeckKeyword` are generally -quite clear. For the :code:`EQUIL` and :code:`EQLDIMS` example above -the :code:`DeckRecord` and :code:`DeckItem` are also easily -understable, but in the case of large numerical fields like -:code:`ACTNUM, PERMX` and :code:`PORO`, and also the tables like -:code:`SGOF3` and :code:`PVTG`, :code:`DeckRecord` and :code:`DeckItem` -are not so tightly bound to the input structure. Consider for example -the :code:`PORO` keyword which could look like this for a model with -25 cells: - -.. code:: - - - PORO - 0.15 0.16 0.17 0.62 0.62 - 0.15 0.16 0.42 0.62 0.51 - 0.18 0.12 0.17 0.65 0.52 - 0.12 0.26 0.27 0.65 0.62 - 0.11 0.09 9.15 0.62 0.62 / - -When this is parsed the :code:`PORO` :code:`DeckKeyword` will consists -of only *one* :code:`DeckRecord`, and that record consists of *one* -:code:`DeckItem` - with 25 numerical values. When working -with these keywords you should preferably work through the -:code:`EclipseState` API where these details have been abstracted away. - - -Iterating through the Deck --------------------------- - -The :code:`Deck` object support iteration and random access with the -:code:`[..]` operator, it also implements the :code:`in` -operator whcih can be used to check if the deck has a certain keyword: - -.. code:: python - - - from opm.parser import Parser - - deck = Parser.parseFile( input_file ) - - # Check of a certain keyword is in the deck: - if "NNC" in deck: - print("The deck has the NNC keyword") - else: - print("No NNC keyword found in deck") - - - # Go through all the keywords in the deck I: - for kw in deck: - print kw - - # Go through all the keywors in the deck II: - for index in range(len(deck)): - kw = deck[index] - - # Get a list of all the WCONHIST keywords: - wconhist_list = deck["WCONHIST"] - - - -Iterating through a DeckKeyword -------------------------------- -When you have a :code:`DeckKewyord` you can get the records using the -:code:`[..]` operator: - - -.. code:: python - - - from opm.parser import Parser - - deck = Parser.parseFile( input_file ) - equil = deck["EQUIL"][0] - - print("EQUIL keyword has %d records" % len(equil)) - for index in range(len(equil)): - record = equil[index] - - - -Iterating through a DeckRecord ------------------------------- - -From a :code:`DeckRecord` you can iterate over the items in the -:code:`DeckRecord`. The items in the record can be accessed either -through integer indices or item names; the item names are loosely -inspired by the Eclipse documentation, but the authorative source is -the set of Json files used to configure the keywords. - -.. code:: python - - - from opm.parser import Parser - - deck = Parser.parseFile( input_file ) - equil = deck["EQUIL"][0] - rec0 = equil[0] - - # Go through all the items: - for item in rec0: - print item - - # Fetch named items: - depth = rec0["DATUM_DEPTH"] - owc = rec0["OWC"] - goc = rec0["GOC"] - - - - -Getting values from a DeckItem ------------------------------- - -When you have finally gotten all the way down to a :code:`DeckItem` it -is time to get an actual value, so to actually get the numerical -values for reference depth, goc and owc from the :code:`EQUIL` keyword -you would do: - -.. code:: python - - - from opm.parser import Parser - - deck = Parser.parseFile( input_file ) - equil = deck["EQUIL"][0] - - for region in range(len(equil)): - depth_item = region["DATUM_DEPTH"] - owc = region["OWC"] - goc = region["GOC"] - print("Equilibration region: %d datum depth:%g OWC:%g GOC:%g" % - (depth_item[0] , owc[0] , goc[0])) - - -Since the :code:`DeckItem` instances can *in principle* be multivalued we must use -:code:`[0]` to access the first element. It is mostly for the large numerical -keywords like :code:`PORO` that the :code:`DeckRecord` / :code:`DeckItem` is not -entirely evident from the input structure. Consider this code to iterate through all -the elements in a :code:`PORO` keyword: - - -.. code:: python - - - from opm.parser import Parser - - deck = Parser.parseFile( input_file ) - equil = deck["PORO"][0] - rec0 = equil[0] - item0 = rec[0] - - min_value = 1 - max_value = 0 - sum = 0 - for value in item0: - min_value = min( min_value , value ) - max_value = max( max_value , value ) - sum += value - avg = sum / len(item0) - - print("PORO min:%g avg:%g max:%g" % (min_value , avg , max_value)) - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/CMakeLists.txt deleted file mode 100644 index 7bf1345417..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -add_subdirectory( opm ) - -add_python_module("opm_test" "${PYTHON_INSTALL_PREFIX}" "opm_test.py" False) - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/CMakeLists.txt deleted file mode 100644 index e12387dca8..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/CMakeLists.txt +++ /dev/null @@ -1,33 +0,0 @@ -set(PYTHON_SOURCES - __init__.py -) - -add_python_package("opm" ${PYTHON_INSTALL_PREFIX}/opm "${PYTHON_SOURCES}" True) - -add_subdirectory( parser ) -add_subdirectory( deck ) -add_subdirectory( ecl_state ) - - -configure_file(opm_lib_info_build.py.in ${PROJECT_BINARY_DIR}/${PYTHON_INSTALL_PREFIX}/opm/__opm_lib_info.py ) -configure_file(opm_lib_info_install.py.in ${PROJECT_BINARY_DIR}/${PYTHON_INSTALL_PREFIX}/opm_lib_info_install.py ) -install(FILES ${PROJECT_BINARY_DIR}/${PYTHON_INSTALL_PREFIX}/opm_lib_info_install.py DESTINATION ${PYTHON_INSTALL_PREFIX}/opm RENAME __opm_lib_info.py) - - -# The cmake variable OPM_SITE_INIT can optionally point to a python -# source file with site specific initialization. This file will be -# renamed 'opm_site_init.py' and copied to opm/ directory in the -# Python tree. The opm/__init__.py file contains the statement: -# -# try: -# import opm_site_init -# except ImportError: -# pass -# -# which will try to import this module. - -set( OPM_SITE_INIT "" CACHE FILE "Name of optional external site init module for top level opm package") -if (EXISTS ${OPM_SITE_INIT}) - message(STATUS "Using opm site init module: ${OPM_SITE_INIT}") - install(FILES ${OPM_SITE_INIT} DESTINATION ${PYTHON_INSTALL_PREFIX}/opm RENAME opm_site_init.py) -endif() diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/__init__.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/__init__.py deleted file mode 100644 index 8bdd616d23..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/__init__.py +++ /dev/null @@ -1,28 +0,0 @@ -import ctypes -from cwrap import lib_name, Prototype - - -lib_path = None -so_version = "" - -try: - import __opm_lib_info - lib_path = __opm_lib_info.lib_path - so_version = __opm_lib_info.so_version -except ImportError: - pass - - -try: - import opm_site_init -except ImportError: - pass - - - -class OPMPrototype(Prototype): - lib_file = lib_name( "libcopmparser" , path = lib_path , so_version = so_version) - lib = ctypes.CDLL( lib_file , ctypes.RTLD_GLOBAL ) - - def __init__(self , prototype , bind = True): - super(OPMPrototype , self).__init__( OPMPrototype.lib , prototype , bind = bind) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/deck/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/deck/CMakeLists.txt deleted file mode 100644 index fe38ce8357..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/deck/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - deck.py - deck_keyword.py - deck_record.py - deck_item.py - item_type_enum.py -) - -add_python_package("opm.deck" ${PYTHON_INSTALL_PREFIX}/opm/deck "${PYTHON_SOURCES}" True) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/deck/__init__.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/deck/__init__.py deleted file mode 100644 index cca3b64611..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/deck/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -from .item_type_enum import ItemType -from .deck_item import DeckItem -from .deck_record import DeckRecord -from .deck_keyword import DeckKeyword -from .deck import Deck diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/deck/deck.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/deck/deck.py deleted file mode 100644 index afc3ffde74..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/deck/deck.py +++ /dev/null @@ -1,122 +0,0 @@ -from cwrap import BaseCClass -from opm import OPMPrototype - -class Deck(BaseCClass): - TYPE_NAME = "deck" - _alloc = OPMPrototype("void* deck_alloc()" , bind = False) - _free = OPMPrototype("void deck_free(deck)") - _size = OPMPrototype("int deck_size(deck)") - _iget_keyword = OPMPrototype("deck_keyword_ref deck_iget_keyword(deck , int)") - _iget_named_keyword = OPMPrototype("deck_keyword_ref deck_iget_named_keyword(deck , char* , int)") - _has_keyword = OPMPrototype("bool deck_has_keyword(deck , char*)") - _num_keywords = OPMPrototype("int deck_num_keywords(deck , char*)") - - - def __init__(self): - c_ptr = self._alloc( ) - super(Deck , self).__init__( c_ptr ) - - - def __len__(self): - """ - Will return the number of keywords in the deck. - """ - return self._size() - - - def __contains__(self , keyword): - """ - Will return True if the deck has at least one occurence of @keword. - """ - return self._has_keyword(keyword) - - - def numKeywords(self , keyword): - """ - Will count the number of occurences of @keyword. - """ - return self._num_keywords(keyword) - - - def __igetKeyword(self , index): - keyword = self._iget_keyword(index ) - keyword.setParent( self ) - return keyword - - - def __igetNamedKeyword(self , name , index): - keyword = self._iget_named_keyword( name , index ) - keyword.setParent( self ) - return keyword - - - def __getitem__(self, index): - """Implements the [] operator for the deck. - - The @index variable can be either an integegr, i.e. deck[2] - will return the third keyword in the deck. The integer based - indexing supports slicing; in that case a normal Python list - of keywords will be returned. - - Alternatively the @index can be a string: deck["PORO"] will - return a Python list of all the PORO keywords in the - deck. Finally the @index can be a tuple of ("STRING",int) to - get directly get a named keyword instance: - - deck["PORO,0] - - will return the first PORO keyword. The tuple syntax supports - negative indexing. - """ - if isinstance(index , int): - if index < 0: - index += len(self) - - if 0 <= index < len(self): - return self.__igetKeyword( index ) - else: - raise IndexError - elif isinstance(index , slice): - (start , step, stop) = index.indices( len(self) ) - keyword_list = [] - print start,stop,step - for i in range(start,stop,step): - keyword_list.append( self.__igetKeyword( i )) - return keyword_list - elif isinstance(index , str): - if index in self: - keyword_list = [] - for i in range(self.numKeywords( index )): - keyword_list.append( self.__igetNamedKeyword(index , i)) - return keyword_list - else: - raise KeyError("No %s keyword in deck" % index) - elif isinstance(index,tuple): - if len(index) == 2: - kw = index[0] - int_index = index[1] - if isinstance(kw , str) and isinstance(int_index , int): - if kw in self: - num_kw = self.numKeywords( kw ) - if int_index < num_kw: - if int_index < 0: - int_index += num_kw - return self.__igetNamedKeyword(kw , int_index) - else: - raise IndexError("Not so many %s keywords" % kw) - else: - raise KeyError("No %s keyword in deck" % kw) - else: - raise TypeError("Tuple must be two elements : (string,int)") - else: - raise TypeError("Tuple must be two elements : (string,int)") - else: - raise TypeError("Index must integer or string") - - - - def free(self): - self._free( ) - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/deck/deck_item.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/deck/deck_item.py deleted file mode 100644 index 39af5360e8..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/deck/deck_item.py +++ /dev/null @@ -1,58 +0,0 @@ -from cwrap import BaseCClass -from opm import OPMPrototype -from opm.deck import ItemType - - -class DeckItem(BaseCClass): - TYPE_NAME = "deck_item" - - _size = OPMPrototype("int deck_item_get_size( deck_item )") - _get_type = OPMPrototype("item_type_enum deck_item_get_type( deck_item )") - _iget_int = OPMPrototype("int deck_item_iget_int( deck_item , int )") - _iget_double = OPMPrototype("double deck_item_iget_double( deck_item , int )") - _iget_string = OPMPrototype("char* deck_item_iget_string( deck_item , int )") - - - def __init__(self): - raise NotImplementedError("Can not create instantiate record directly") - - - def __len__(self): - """ - Returns the number of values in the item. - """ - return self._size( ) - - - def assertType(self): - if not hasattr(self,"value_type"): - self.value_type = self._get_type( ) - - if self.value_type == ItemType.INTEGER: - self.iget = self._iget_int - elif self.value_type == ItemType.DOUBLE: - self.iget = self._iget_double - elif self.value_type == ItemType.STRING: - self.iget = self._iget_string - else: - raise Exception("What the ??") - - - - def __getitem__(self , index): - """ - Will return value corresponding to @index. - """ - self.assertType() - if isinstance(index , int): - if index < 0: - index += len(self) - if 0 <= index < len(self): - return self.iget( index ) - else: - raise IndexError("Invalid index:%d -valid range [0,%d)" % (index , len(self))) - else: - raise TypeError("Expected integer index") - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/deck/deck_keyword.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/deck/deck_keyword.py deleted file mode 100644 index 6c1c8c894d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/deck/deck_keyword.py +++ /dev/null @@ -1,47 +0,0 @@ -from cwrap import BaseCClass -from opm import OPMPrototype - -class DeckKeyword(BaseCClass): - TYPE_NAME = "deck_keyword" - - _alloc = OPMPrototype("void* deck_keyword_alloc( char* )" , bind = False) - _get_name = OPMPrototype("char* deck_keyword_get_name( deck_keyword )") - _size = OPMPrototype("int deck_keyword_get_size( deck_keyword )") - _free = OPMPrototype("void deck_keyword_free( deck_keyword )") - _iget_record = OPMPrototype("deck_record_ref deck_keyword_iget_record( deck_keyword , int)") - - def __init__(self , kw): - c_ptr = self._alloc( kw ) - super(DeckKeyword, self).__init__(c_ptr) - - def __len__(self): - """ - Returns the number of records in the keyword. - """ - return self._size( ) - - def __getitem__(self , index): - """ - Will return DeckRecord corresponding to @index. - """ - if index < 0: - index += len(self) - - if 0 <= index < len(self): - record = self._iget_record( index ) - record.setParent( self ) - return record - else: - raise IndexError("Invalid index:%d -valid range [0,%d)" % (index , len(self))) - - def __str__(self): - return self.name() - - def name(self): - return self._get_name( ) - - - def free(self): - self._free( ) - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/deck/deck_record.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/deck/deck_record.py deleted file mode 100644 index 0252cf0f92..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/deck/deck_record.py +++ /dev/null @@ -1,62 +0,0 @@ -from cwrap import BaseCClass -from opm import OPMPrototype - -class DeckRecord(BaseCClass): - TYPE_NAME = "deck_record" - - _size = OPMPrototype("int deck_record_get_size( deck_record )") - _has_item = OPMPrototype("bool deck_record_has_item( deck_record , char*)") - _get_item = OPMPrototype("deck_item_ref deck_record_get_item( deck_record , char*)") - _iget_item = OPMPrototype("deck_item_ref deck_record_iget_item( deck_record , int)") - - - def __init__(self): - raise NotImplementedError("Can not create instantiate record directly") - - - def __len__(self): - """Returns the number of items in the record; observe that an item - can consist of several input values. Observe that the count - will include items with a default, which are not specified in - the deck, i.e. for a input item like: - - DATES - 10 'MAY' 2012 / - / - - dates_kw = deck["DATES"][0] - record = dates_kw[0] - length = len(record) - - The length variable will have the value 4 - because the DATES - item has an optional fourth item 'TIME' with a default value. - """ - return self._size( ) - - - def __contains__(self , item): - return self._has_item( item ) - - - def __getitem__(self , index): - """ - Will return DeckItem corresponding to @index. - """ - if isinstance(index , int): - if index < 0: - index += len(self) - - if 0 <= index < len(self): - item = self._iget_item( index ) - item.setParent( self ) - return item - else: - raise IndexError("Invalid index:%d -valid range [0,%d)" % (index , len(self))) - elif isinstance(index,str): - if index in self: - item = self._get_item( index ) - item.setParent( self ) - return item - else: - raise KeyError("Not recognized item key:%s" % index) - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/deck/item_type_enum.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/deck/item_type_enum.py deleted file mode 100644 index d8de296b77..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/deck/item_type_enum.py +++ /dev/null @@ -1,14 +0,0 @@ -from cwrap import BaseCEnum - - -class ItemType(BaseCEnum): - TYPE_NAME="item_type_enum" - INTEGER = None - STRING = None - DOUBLE = None - - -ItemType.addEnum("INTEGER", 1) -ItemType.addEnum("STRING", 2) -ItemType.addEnum("DOUBLE", 3) - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/CMakeLists.txt deleted file mode 100644 index 9b7da3406a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -set(PYTHON_SOURCES - __init__.py -) - -add_python_package("opm.ecl_state" ${PYTHON_INSTALL_PREFIX}/opm/ecl_state "${PYTHON_SOURCES}" True) - -add_subdirectory( tables ) -add_subdirectory( schedule ) -add_subdirectory( grid ) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/__init__.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/__init__.py deleted file mode 100644 index c01853b269..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# Empty package init diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/grid/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/grid/CMakeLists.txt deleted file mode 100644 index 662138905b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/grid/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - eclipse_grid.py -) - -add_python_package("opm.ecl_state.grid" ${PYTHON_INSTALL_PREFIX}/opm/ecl_state/grid "${PYTHON_SOURCES}" True) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/grid/__init__.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/grid/__init__.py deleted file mode 100644 index 8e1c4af961..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/grid/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .eclipse_grid import EclipseGrid diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/grid/eclipse_grid.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/grid/eclipse_grid.py deleted file mode 100644 index f12f9664d3..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/grid/eclipse_grid.py +++ /dev/null @@ -1,18 +0,0 @@ -from cwrap import BaseCClass - -from opm import OPMPrototype -from opm.deck import Deck - -class EclipseGrid(BaseCClass): - TYPE_NAME = "eclipse_grid" - _alloc = OPMPrototype("void* eclipse_grid_alloc( deck )" , bind = False) - _free = OPMPrototype("void eclipse_grid_free( eclipse_grid )") - - - def __init__(self , deck): - c_ptr = self._alloc( deck ) - super(EclipseGrid , self).__init__( c_ptr ) - - - def free(self): - self._free( ) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/schedule/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/schedule/CMakeLists.txt deleted file mode 100644 index 9ea2ead8f3..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/schedule/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - schedule.py -) - -add_python_package("opm.ecl_state.schedule" ${PYTHON_INSTALL_PREFIX}/opm/ecl_state/schedule "${PYTHON_SOURCES}" True) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/schedule/__init__.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/schedule/__init__.py deleted file mode 100644 index 7aef82b288..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/schedule/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .schedule import Schedule diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/schedule/schedule.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/schedule/schedule.py deleted file mode 100644 index 6b39abf5b5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/schedule/schedule.py +++ /dev/null @@ -1,35 +0,0 @@ -from cwrap import BaseCClass -from ert.util import CTime -from opm import OPMPrototype - -from opm.parser import ParseContext -from opm.ecl_state.grid import EclipseGrid - -class Schedule(BaseCClass): - TYPE_NAME = "schedule" - _alloc = OPMPrototype("void* schedule_alloc( parse_context , eclipse_grid , deck )" , bind = False) - _free = OPMPrototype("void schedule_free( schedule )") - _end_time = OPMPrototype("time_t schedule_end(schedule)") - _start_time = OPMPrototype("time_t schedule_start(schedule)") - - - def __init__(self , grid, deck , parse_context = None): - if parse_context is None: - parse_context = ParseContext( ) - c_ptr = self._alloc( parse_context , grid , deck ) - super(Schedule , self).__init__( c_ptr ) - - - def endTime(self): - ct = self._end_time( ) - return ct.datetime( ) - - - def startTime(self): - ct = self._start_time( ) - return ct.datetime( ) - - - def free(self): - self._free( ) - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/tables/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/tables/CMakeLists.txt deleted file mode 100644 index 3924fd17a6..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/tables/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - table_index.py - table.py - table_manager.py -) - -add_python_package("opm.ecl_state.tables" ${PYTHON_INSTALL_PREFIX}/opm/ecl_state/tables "${PYTHON_SOURCES}" True) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/tables/__init__.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/tables/__init__.py deleted file mode 100644 index 42a4092325..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/tables/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -from .table_index import TableIndex -from .table import Table -from .table_manager import TableManager diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/tables/table.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/tables/table.py deleted file mode 100644 index c64c4a0806..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/tables/table.py +++ /dev/null @@ -1,89 +0,0 @@ -import os.path - -from cwrap import BaseCClass -from opm import OPMPrototype - -from .table_index import TableIndex - - -class Table(BaseCClass): - TYPE_NAME = "table" - _has_column = OPMPrototype("bool table_has_column( table , char* )") - _num_rows = OPMPrototype("int table_get_num_rows( table )") - _get_value = OPMPrototype("double table_get_value( table , char* , int)") - _evaluate = OPMPrototype("double table_evaluate( table , char* , int)") - _evaluate_with_index = OPMPrototype("double table_evaluate_from_index( table , char* , table_index)") - _lookup = OPMPrototype("table_index_obj table_lookup( table , double)") - - def __init__(self , *args, **kwargs): - raise NotImplementedError("Can not create instantiate tables directly") - - - def __contains__(self , column): - return self._has_column( column ) - - - def hasColumn(self , column): - return self._has_column( column ) - - - def numRows(self): - return self._num_rows( ) - - - def getValue(self , column , row): - """Will return a value from the table. - - @column should be the name of a column, and @row should be an - integer value in the range [0,num_rows). - """ - if not column in self: - raise KeyError("No such column: %s" % column) - - if not 0 <= row < self.numRows( ): - raise IndexError("Invalid row index:%d Valid range: [0,%d)" % (row , self.numRows())) - - return self._get_value( column , row ) - - - def evaluate(self , column , arg_value): - """Will evaluate the column @column using linear interpolation of the - argument value @arg_value. The @arg_value will be looked up in - the first column: - - ARG_COLUM COL1 - 0 2.50 - <----- Here! - 1 7.50 - 2 10.00 - - table.evaluate("COL1" , 0.50) - - This will use linear interpolation of the value 0.50 in the - first column, and find that the answer should be just between - the two first elements in the "COL1" column - i.e. 5.00. - - Alternatively the @arg_value can be a TableIndex instance - which is an intermediate result from a previous linear - interpolation - typically inferred from another table. - """ - - - if not column in self: - raise KeyError("No such column: %s" % column) - - if isinstance(arg_value , TableIndex): - return self._evaluate_with_index( column , arg_value ) - else: - return self._evaluate( column , arg_value ) - - - def lookup(self , arg_value): - """ - Will do linear interpolation of the @arg_value in the argument - column of the table. The return value is a TableIndex instance - which can be used as arg_value argument in the - Table.evaluate() method. - """ - - return self._lookup(arg_value) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/tables/table_index.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/tables/table_index.py deleted file mode 100644 index 574417e220..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/tables/table_index.py +++ /dev/null @@ -1,17 +0,0 @@ -import os.path - -from cwrap import BaseCClass -from opm import OPMPrototype - - -class TableIndex(BaseCClass): - TYPE_NAME = "table_index" - _free = OPMPrototype("void table_index_free( table_index )") - - - def __init__(self , *args, **kwargs): - raise NotImplementedError("Can not create instantiate tables directly") - - - def free(self): - self._free( ) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/tables/table_manager.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/tables/table_manager.py deleted file mode 100644 index f78888f1ce..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/ecl_state/tables/table_manager.py +++ /dev/null @@ -1,61 +0,0 @@ -import os.path - -from cwrap import BaseCClass -from opm import OPMPrototype - - -class TableManager(BaseCClass): - TYPE_NAME = "table_manager" - _alloc = OPMPrototype("void* table_manager_alloc(deck)" , bind = False) - _free = OPMPrototype("void* table_manager_free(table_manager)") - _has_table = OPMPrototype("bool table_manager_has_table(table_manager , char*) ") - _num_tables = OPMPrototype("int table_manager_num_tables(table_manager , char*) ") - _get_table = OPMPrototype("table_ref table_manager_get_table(table_manager , char*, int) ") - - - def __init__(self , deck): - c_ptr = self._alloc(deck) - super(TableManager, self).__init__(c_ptr) - - - def __contains__(self,table_name): - return self._has_table( table_name ) - - - def free(self): - self._free( ) - - - def hasTable(self, name ): - """Will check if the table manager has table @name. Also available as - the __contains__() operator: - - if "SWOF" in table_manager: - print("Have SWOF") - - """ - return self._has_table( name ) - - - def numTables(self, name): - """Will return the number of @name tables. - - Observe that the number of tables will always be zero, or the - appropriate item (NTSFUN, NTPVT, NSSFUN, ...) from the TABDIMS - keyword; i.e. the manager does not differentiate between - tables explicitly added to the deck, and thoe which are - implicitly available through default behaviour. - """ - return self._num_tables( name ) - - - def getTable(self , name , num = 0): - if not name in self: - raise KeyError("No such table:%s" % name) - - if num >= self.numTables( name ): - raise IndexError("For table:%s allocwd num range is [0,%d)" % (name , self.numTables(name) - 1)) - - table = self._get_table(name , num ) - table.setParent( self ) - return table diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/opm_lib_info_build.py.in b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/opm_lib_info_build.py.in deleted file mode 100644 index 13b65b27b4..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/opm_lib_info_build.py.in +++ /dev/null @@ -1,3 +0,0 @@ -lib_path = "${LIBRARY_OUTPUT_PATH}" -so_version = "" - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/opm_lib_info_install.py.in b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/opm_lib_info_install.py.in deleted file mode 100644 index 733304fd63..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/opm_lib_info_install.py.in +++ /dev/null @@ -1,2 +0,0 @@ -lib_path = "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" -so_version = "" diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/parser/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/parser/CMakeLists.txt deleted file mode 100644 index 608b060897..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/parser/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -set(PYTHON_SOURCES - __init__.py - parser.py - parse_context.py - error_action.py -) - -add_python_package("opm.parser" ${PYTHON_INSTALL_PREFIX}/opm/parser "${PYTHON_SOURCES}" True) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/parser/__init__.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/parser/__init__.py deleted file mode 100644 index 2df54920d0..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/parser/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -from .error_action import ErrorAction -from .parse_context import ParseContext -from .parser import Parser - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/parser/error_action.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/parser/error_action.py deleted file mode 100644 index 44d04dc6df..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/parser/error_action.py +++ /dev/null @@ -1,13 +0,0 @@ -from cwrap import BaseCEnum - - -class ErrorAction(BaseCEnum): - TYPE_NAME = "error_action_enum" - THROW_EXCEPTION = None - WARN = None - IGNORE = None - - -ErrorAction.addEnum("THROW_EXCEPTION", 0) -ErrorAction.addEnum("WARN", 1) -ErrorAction.addEnum("IGNORE", 2) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/parser/parse_context.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/parser/parse_context.py deleted file mode 100644 index f93002ab84..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/parser/parse_context.py +++ /dev/null @@ -1,21 +0,0 @@ -from cwrap import BaseCClass, CWrapper -from opm import OPMPrototype - -class ParseContext(BaseCClass): - TYPE_NAME = "parse_context" - _alloc = OPMPrototype("void* parse_context_alloc()", bind = False) - _free = OPMPrototype("void parse_context_free(parse_context)") - _update = OPMPrototype("void parse_context_update(parse_context, char* , error_action_enum)") - - def __init__(self): - c_ptr = self._alloc() - super(ParseContext, self).__init__(c_ptr) - - - def free(self): - self._free( ) - - - def update(self , var , action): - self._update( var , action ) - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/parser/parser.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/parser/parser.py deleted file mode 100644 index 592a975045..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/parser/parser.py +++ /dev/null @@ -1,90 +0,0 @@ -import os.path -import json -import inspect -from functools import partial - -from cwrap import BaseCClass -from opm import OPMPrototype -from opm.deck import Deck -from opm.parser import ParseContext - - - -class class_and_instance_method(object): - def __init__(self , func): - self.func = func - - def __get__(self , obj , type = None): - if obj is None: - first_arg = type - else: - first_arg = obj - - return partial(self.func , first_arg) - - - -class Parser(BaseCClass): - TYPE_NAME = "parser" - _alloc = OPMPrototype("void* parser_alloc()" , bind = False) - _free = OPMPrototype("void parser_free(parser)") - _has_keyword = OPMPrototype("bool parser_has_keyword(parser, char*)") - _parse_file = OPMPrototype("deck_obj parser_parse_file(parser, char*, parse_context)") - _add_json_keyword = OPMPrototype("void parser_add_json_keyword(parser, char*)") - - - def __init__(self): - c_ptr = self._alloc() - super(Parser, self).__init__(c_ptr) - - - def __contains__(self , kw): - return self._has_keyword(kw) - - - def free(self): - self._free( ) - - - @class_and_instance_method - def parseFile(arg , filename , parse_mode = None): - """The parseFile() method will parse a filename and return a Deck - instance. The parseFile method can be called both as a bound - method on a Parser instance, and as a classmethod without first - creating a parser intance: - - Using a parser instance: - - parser = Parser( ) - parser.addKeyword({"name" : "MY_KEYWORD" , "sections" : ["SCHEDULE"] , "items" : [...]}) - deck = parser.parseFile("FILE.DATA") - - As illustrated the main purpose of the instance based method - is the ability to add additional keywords before actually - parsing. - Using the classmethod: - - deck = Parser.parseFile("FILE.DATA") - - """ - - if isinstance(arg , type): - parser = Parser() - else: - parser = arg - - if os.path.isfile( filename ): - if parse_mode is None: - parse_mode = ParseContext( ) - return parser._parse_file( filename, parse_mode) - else: - raise IOError("No such file:%s" % filename) - - - def addKeyword(self , schema): - """ - schema should be an ordinary Python dictionary describing the - keyword structure. - """ - json_string = json.dumps( schema ) - self._add_json_keyword( json_string ) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/parser/test.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm/parser/test.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm_test.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm_test.py deleted file mode 100644 index d6063b0812..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/python/opm_test.py +++ /dev/null @@ -1,8 +0,0 @@ -from unittest import TestCase -import os.path - - -class OpmTest(TestCase): - - def createPath(self, path): - return os.path.join( os.path.abspath( os.path.dirname(__file__ )) , "../../../bin/testdata" , path) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/test.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/test.py deleted file mode 100644 index 976dd2ffec..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/test.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python -import sys -sys.path += ["/private/joaho/work/OPM/opm-parser/opm/parser/eclipse/python/python"] -from opm.parser.parser import Parser - -p = Parser() - -deck = p.parseFile( sys.argv[1] ) -print "Number of keywords in deck: %s" % len(deck) - -for kw in deck: - print "%s:%d" % (kw.name() , len(kw)) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/CMakeLists.txt deleted file mode 100644 index 8257c19454..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -set(TEST_SOURCES - __init__.py -) - -add_python_package("python.tests" "${PYTHON_INSTALL_PREFIX}/tests" "${TEST_SOURCES}" False) -add_subdirectory( parser ) -add_subdirectory( deck ) -add_subdirectory( parse_context ) -add_subdirectory( ecl_state ) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/__init__.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/deck/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/deck/CMakeLists.txt deleted file mode 100644 index 1e8fdf05b7..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/deck/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -set (TEST_SOURCES - __init__.py - test_deck.py - test_deck_keyword.py - test_deck_record.py - test_deck_item.py ) - -add_python_package("python.tests.deck" "${PYTHON_INSTALL_PREFIX}/tests/deck" "${TEST_SOURCES}" False) - -addPythontest( python.test_deck tests.deck.test_deck.DeckTest ) -addPythontest( python.test_deck_keyword tests.deck.test_deck_keyword.DeckKeywordTest ) -addPythontest( python.test_deck_record tests.deck.test_deck_record.DeckRecordTest ) -addPythontest( python.test_deck_item tests.deck.test_deck_item.DeckItemTest ) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/deck/__init__.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/deck/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/deck/test_deck.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/deck/test_deck.py deleted file mode 100644 index 096ae85720..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/deck/test_deck.py +++ /dev/null @@ -1,67 +0,0 @@ -from unittest import TestCase - -from ert.test import TestAreaContext - -from opm.parser import Parser -from opm.deck import Deck - - - -class DeckTest(TestCase): - def test_empty_deck(self): - deck = Deck() - self.assertEqual( len(deck) , 0 ) - - with self.assertRaises(IndexError): - deck[9] - - with self.assertRaises(KeyError): - l = deck["EQUIL"] - - self.assertEqual( 0 , deck.numKeywords("EQUIL")) - - - def test_deck(self): - with TestAreaContext("parse-test"): - with open("test.DATA", "w") as fileH: - fileH.write("RUNSPEC\n") - fileH.write("DIMENS\n") - fileH.write(" 10 10 10 /\n") - fileH.write("SCHEDULE\n") - fileH.write("TSTEP\n") - fileH.write(" 10 10 /\n") - fileH.write("TSTEP\n") - fileH.write(" 20 20 /\n") - fileH.write("DATES\n") - fileH.write(" 10 'MAY' 2017 /\n") - fileH.write("/\n") - - p = Parser( ) - deck = p.parseFile("test.DATA") - self.assertEqual( len(deck) , 6 ) - self.assertEqual( 2 , deck.numKeywords("TSTEP")) - tstep = deck["TSTEP"] - self.assertEqual( len(tstep) , 2) - - slice_list = deck[0:2:6] - self.assertEqual( len(slice_list) , 3) - self.assertEqual( slice_list[0].name() , "RUNSPEC") - self.assertEqual( slice_list[1].name() , "SCHEDULE") - self.assertEqual( slice_list[2].name() , "TSTEP") - - dates_kw = deck[-1] - self.assertEqual( dates_kw.name() , "DATES") - - with self.assertRaises(IndexError): - deck["TSTEP" , 2] - - with self.assertRaises(TypeError): - deck["TSTEP" , "X"] - - t0 = deck["TSTEP",0] - t1 = deck["TSTEP",1] - t1 = deck["TSTEP",-1] - - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/deck/test_deck_item.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/deck/test_deck_item.py deleted file mode 100644 index 2bd6623fdc..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/deck/test_deck_item.py +++ /dev/null @@ -1,43 +0,0 @@ -from unittest import TestCase - -from ert.test import TestAreaContext - -from opm.parser import Parser -from opm.deck import Deck, DeckKeyword, DeckRecord , DeckItem - - - -class DeckItemTest(TestCase): - - def test_from_deck(self): - with TestAreaContext("parse-test"): - with open("test.DATA", "w") as fileH: - fileH.write("RUNSPEC\n") - fileH.write("DIMENS\n") - fileH.write(" 10 10 10 /\n") - fileH.write("SCHEDULE\n") - fileH.write("TSTEP\n") - fileH.write(" 10 10 /\n") - fileH.write("TSTEP\n") - fileH.write(" 20 20 /\n") - fileH.write("DATES\n") - fileH.write(" 10 'MAY' 2017 /\n") - fileH.write(" 15 'MAY' 2017 /\n") - fileH.write("/\n") - - p = Parser( ) - deck = p.parseFile("test.DATA") - - dates_kw = deck[-1] - record = dates_kw[0] - day_item = record[0] - year_item = record["YEAR"] - month_item = record[1] - - self.assertTrue( isinstance( day_item , DeckItem )) - self.assertTrue( isinstance( year_item , DeckItem )) - - self.assertEqual( day_item[0] , 10 ) - self.assertEqual( month_item[0] , "MAY") - self.assertEqual( year_item[0] , 2017) - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/deck/test_deck_keyword.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/deck/test_deck_keyword.py deleted file mode 100644 index e637268a06..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/deck/test_deck_keyword.py +++ /dev/null @@ -1,55 +0,0 @@ -from unittest import TestCase - -from ert.test import TestAreaContext - -from opm.parser import Parser -from opm.deck import Deck, DeckKeyword, DeckRecord - - - -class DeckKeywordTest(TestCase): - def test_empty_keyword(self): - kw = DeckKeyword("MYKW") - self.assertEqual( len(kw) , 0 ) - - with self.assertRaises(IndexError): - kw[9] - - self.assertEqual( kw.name() , "MYKW") - - - def test_from_deck(self): - with TestAreaContext("parse-test"): - with open("test.DATA", "w") as fileH: - fileH.write("RUNSPEC\n") - fileH.write("DIMENS\n") - fileH.write(" 10 10 10 /\n") - fileH.write("SCHEDULE\n") - fileH.write("TSTEP\n") - fileH.write(" 10 10 /\n") - fileH.write("TSTEP\n") - fileH.write(" 20 20 /\n") - fileH.write("DATES\n") - fileH.write(" 10 'MAY' 2017 /\n") - fileH.write(" 15 'MAY' 2017 /\n") - fileH.write("/\n") - - p = Parser( ) - deck = p.parseFile("test.DATA") - - self.assertEqual( len(deck) , 6 ) - dates_kw = deck[-1] - self.assertEqual( dates_kw.name() , "DATES") - self.assertEqual( len(dates_kw) , 2 ) - runspec_kw = deck["RUNSPEC"][0] - self.assertEqual( len(runspec_kw) , 0 ) - - with self.assertRaises( IndexError ): - runspec_kw[0] - - with self.assertRaises( IndexError ): - dates_kw[2] - - record = dates_kw[0] - self.assertTrue( isinstance( record , DeckRecord )) - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/deck/test_deck_record.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/deck/test_deck_record.py deleted file mode 100644 index 5342b0ec64..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/deck/test_deck_record.py +++ /dev/null @@ -1,44 +0,0 @@ -from unittest import TestCase - -from ert.test import TestAreaContext - -from opm.parser import Parser -from opm.deck import Deck, DeckKeyword, DeckRecord - - - -class DeckRecordTest(TestCase): - - def test_from_deck(self): - with TestAreaContext("parse-test"): - with open("test.DATA", "w") as fileH: - fileH.write("RUNSPEC\n") - fileH.write("DIMENS\n") - fileH.write(" 10 10 10 /\n") - fileH.write("SCHEDULE\n") - fileH.write("TSTEP\n") - fileH.write(" 10 10 /\n") - fileH.write("TSTEP\n") - fileH.write(" 20 20 /\n") - fileH.write("DATES\n") - fileH.write(" 10 'MAY' 2017 /\n") - fileH.write(" 15 'MAY' 2017 /\n") - fileH.write("/\n") - - p = Parser( ) - deck = p.parseFile("test.DATA") - - dates_kw = deck[-1] - record = dates_kw[0] - self.assertTrue( isinstance( record , DeckRecord )) - self.assertEqual( len(record) , 4 ) - - with self.assertRaises(IndexError): - record[100] - - with self.assertRaises(KeyError): - record["NO-NOT-THAT-ITEM"] - - self.assertTrue( "DAY" in record ) - self.assertFalse( "XXX" in record ) - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/CMakeLists.txt deleted file mode 100644 index 6fcc836257..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -set (TEST_SOURCES __init__.py ) - -add_python_package("python.tests.ecl_state" "${PYTHON_INSTALL_PREFIX}/tests/ecl_state" "${TEST_SOURCES}" False) - -add_subdirectory( table ) -add_subdirectory( grid ) -add_subdirectory( schedule ) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/__init__.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/grid/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/grid/CMakeLists.txt deleted file mode 100644 index f102238482..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/grid/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -set (TEST_SOURCES - __init__.py - test_grid.py) - -add_python_package("python.tests.ecl_state.grid" "${PYTHON_INSTALL_PREFIX}/tests/ecl_state/grid" "${TEST_SOURCES}" False) - -addPythontest( python.test_grid tests.ecl_state.grid.test_grid.EclipseGridTest ) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/grid/__init__.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/grid/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/grid/test_grid.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/grid/test_grid.py deleted file mode 100644 index 5678c5fbfc..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/grid/test_grid.py +++ /dev/null @@ -1,18 +0,0 @@ -from unittest import TestCase -import os.path -from ert.test import TestAreaContext - -from opm.parser import Parser -from opm.ecl_state.grid import EclipseGrid -from opm_test import OpmTest - -class EclipseGridTest(OpmTest): - def setUp(self): - pass - - def test_parse(self): - p = Parser() - test_file = self.createPath( "integration_tests/GRID/CORNERPOINT_ACTNUM.DATA" ) - deck = p.parseFile( test_file ) - grid = EclipseGrid( deck ) - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/schedule/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/schedule/CMakeLists.txt deleted file mode 100644 index 2e5e847fd2..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/schedule/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -set (TEST_SOURCES - __init__.py - test_schedule.py) - -add_python_package("python.tests.ecl_state.schedule" "${PYTHON_INSTALL_PREFIX}/tests/ecl_state/schedule" "${TEST_SOURCES}" False) - -addPythontest( python.test_schedule tests.ecl_state.schedule.test_schedule.ScheduleTest ) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/schedule/__init__.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/schedule/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/schedule/test_schedule.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/schedule/test_schedule.py deleted file mode 100644 index 7e0874979f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/schedule/test_schedule.py +++ /dev/null @@ -1,37 +0,0 @@ -import datetime -import os.path -from ert.test import TestAreaContext - -from opm_test import OpmTest -from opm.parser import Parser -from opm.ecl_state.schedule import Schedule -from opm.ecl_state.grid import EclipseGrid - - - -class ScheduleTest(OpmTest): - def setUp(self): - pass - - def test_parse(self): - p = Parser() - - # This is slightly awkward; since only the deck based - # constructor is wrapped in the grid case we need to different - # input files to instantiate the Schedule and EclipseGrid - # instances respectively. - grid_file = self.createPath( "integration_tests/GRID/CORNERPOINT_ACTNUM.DATA" ) - grid_deck = p.parseFile( grid_file ) - grid = EclipseGrid(grid_deck) - - sched_file = self.createPath("integration_tests/SCHEDULE/SCHEDULE1") - sched_deck = p.parseFile( sched_file ) - s = Schedule( grid , sched_deck ) - - end = s.endTime() - self.assertEqual( datetime.datetime( end.year , end.month , end.day) , datetime.datetime( 2008 , 8 , 10 )) - #self.assertEqual( s.endTime( ) , datetime.datetime( 2008 , 8 , 10 )) - - start = s.startTime() - self.assertEqual( datetime.datetime( start.year , start.month , start.day) , datetime.datetime( 2007 , 5 , 10 )) - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/table/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/table/CMakeLists.txt deleted file mode 100644 index 73c4959d95..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/table/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -set (TEST_SOURCES - __init__.py - test_table_manager.py) - -add_python_package("python.tests.ecl_state.table" "${PYTHON_INSTALL_PREFIX}/tests/ecl_state/table" "${TEST_SOURCES}" False) - -addPythontest( python.test_table_manager tests.ecl_state.table.test_table_manager.TableManagerTest ) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/table/__init__.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/table/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/table/test_table_manager.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/table/test_table_manager.py deleted file mode 100644 index acf26d67d5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/ecl_state/table/test_table_manager.py +++ /dev/null @@ -1,79 +0,0 @@ -from unittest import TestCase -from ert.test import TestAreaContext - -from opm.parser import Parser -from opm.ecl_state.tables import TableManager - - - -class TableManagerTest(TestCase): - def test_create(self): - with TestAreaContext("table-manager"): - p = Parser() - with open("test.DATA", "w") as fileH: - fileH.write(""" -TABDIMS - 2 / - -SWOF - 1 2 3 4 - 5 6 7 8 / - 9 10 11 12 / -""") - - deck = p.parseFile( "test.DATA") - table_manager = TableManager( deck ) - - - self.assertTrue( table_manager.hasTable( "SWOF" )) - self.assertFalse( table_manager.hasTable( "SGLF" )) - self.assertTrue( "SWOF" in table_manager ) - self.assertFalse( "SGLF" in table_manager ) - - with self.assertRaises(KeyError): - table_manager.getTable("SGFL") - - self.assertEqual( table_manager.numTables("SLGF") , 0 ) - self.assertEqual( table_manager.numTables("SWOF") , 2 ) - - with self.assertRaises(IndexError): - table = table_manager.getTable("SWOF", num = 10) - - - - - def test_table(self): - with TestAreaContext("table-manager"): - p = Parser() - with open("test.DATA", "w") as fileH: - fileH.write(""" -TABDIMS - 2 / - -SWOF - 1 2 3 4 - 5 6 7 8 / - 9 10 11 12 / -""") - - deck = p.parseFile( "test.DATA") - table_manager = TableManager( deck ) - table = table_manager.getTable("SWOF") - - self.assertTrue("SW" in table ) - self.assertFalse(table.hasColumn("JOE")) - - with self.assertRaises(KeyError): - table.getValue("NO_NOT_THIS" , 1) - - with self.assertRaises(IndexError): - table.getValue("SW" , 100) - - self.assertEqual( table.getValue("SW" , 0 ) , 1) - self.assertEqual( table.getValue("SW" , 1 ) , 5) - - self.assertEqual( table.evaluate("KRW" , 1) , 2) - - index = table.lookup( 1 ) - self.assertEqual( table.evaluate("KRW" , index) , 2) - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/parse_context/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/parse_context/CMakeLists.txt deleted file mode 100644 index 306d031de5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/parse_context/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -set (TEST_SOURCES - __init__.py - test_parse_context.py) - -add_python_package("python.tests.parse_context" "${PYTHON_INSTALL_PREFIX}/tests/parse_context" "${TEST_SOURCES}" False) - -addPythontest( python.test_parse_context tests.parse_context.test_parse_context.ParseContextTest ) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/parse_context/__init__.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/parse_context/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/parse_context/test_parse_context.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/parse_context/test_parse_context.py deleted file mode 100644 index 17c7ec7244..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/parse_context/test_parse_context.py +++ /dev/null @@ -1,26 +0,0 @@ -from unittest import TestCase - -from ert.test import TestAreaContext,ExtendedTestCase - -from opm.parser import ParseContext,ErrorAction - - - -class ParseContextTest(ExtendedTestCase): - - def test_parse_mode(self): - pm = ParseContext() - - pm.update( "PARSE*" , ErrorAction.IGNORE ) - - - - def test_action_enum(self): - #source_file_path = "../../../Parser/InputErrorAction.hpp" - #self.assertEnumIsFullyDefined(ErrorAction , "Action", source_file_path) - - for (key,value) in [("THROW_EXCEPTION" , 0), ("WARN" , 1) , ("IGNORE" , 2)]: - self.assertTrue(ErrorAction.__dict__.has_key(key), "Enum does not have identifier: %s" % key) - class_value = ErrorAction.__dict__[key] - self.assertEqual(class_value, value, "Enum value for identifier: %s does not match: %s != %s" % (key, class_value, value)) - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/parser/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/parser/CMakeLists.txt deleted file mode 100644 index b3e031ee8e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/parser/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -set (TEST_SOURCES - __init__.py - test_parser.py) - -add_python_package("python.tests.parser" "${PYTHON_INSTALL_PREFIX}/tests/parser" "${TEST_SOURCES}" False) - -addPythontest( python.test_parser tests.parser.test_parser.ParserTest ) diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/parser/__init__.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/parser/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/parser/test_parser.py b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/parser/test_parser.py deleted file mode 100644 index e7180e58c6..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/eclipse/python/tests/parser/test_parser.py +++ /dev/null @@ -1,44 +0,0 @@ -from unittest import TestCase - -from ert.test import TestAreaContext - -from opm.parser import Parser,ParseContext - - - -class ParserTest(TestCase): - def test_parse(self): - p = Parser() - pm = ParseContext() - with self.assertRaises(IOError): - p.parseFile("does/not/exist" , pm) - - with TestAreaContext("parse-test"): - with open("test.DATA", "w") as fileH: - fileH.write("RUNSPEC\n") - fileH.write("DIMENS\n") - fileH.write(" 10 10 10 /\n") - - deck = p.parseFile( "test.DATA" , pm) - self.assertEqual( len(deck) , 2 ) - - deck = Parser.parseFile( "test.DATA" ) - - - def test_add_keyword(self): - p = Parser() - schema = {'name' : 'KEYWORD' , 'size' : 1 , 'items' : [{'name' : 'File' , 'value_type' : 'STRING'}] , 'sections' : ["SCHEDULE"]} - p.addKeyword( schema ) - self.assertTrue("KEYWORD" in p) - - - with TestAreaContext("parse-test2"): - with open("test.DATA", "w") as fileH: - fileH.write("KEYWORD\n") - fileH.write(" ARG /\n") - - - deck = p.parseFile( "test.DATA" ) - self.assertTrue( "KEYWORD" in deck ) - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/CMakeLists.txt b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/CMakeLists.txt deleted file mode 100644 index 9c744f1dfc..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/CMakeLists.txt +++ /dev/null @@ -1,25 +0,0 @@ -install( DIRECTORY keywords DESTINATION ${CMAKE_INSTALL_PREFIX}/share/opm/parser/eclipse) - -#----------------------------------------------------------------- -# The install() command above will recursively install all the files and -# directories below the current directory. This will potentially include -# editor backup files and other garbage. -# -# An alternative which queries git for files to install is: -# -# execute_process( COMMAND git ls-tree --name-only -r HEAD WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE KEYWORD_LIST_STRING) -# string(REPLACE "\n" ";" KEYWORD_LIST ${KEYWORD_LIST_STRING}) -# -# foreach( keyword ${KEYWORD_LIST} ) -# install( FILES ${keyword} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/opm/parser/eclipse RENAME ${keyword}) -# endforeach() -# -# The disadvantage with this is approach is that: -# -# 1. You must be building from a proper git clone, and can not build -# from e.g. a .tar.gz distribution -# -# 2. The list of files is configured during the cmake configure -# process, and will typically be out of sync if you have added more -# keywords. -#----------------------------------------------------------------- diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/ACTDIMS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/ACTDIMS deleted file mode 100644 index 21d5f411d0..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/ACTDIMS +++ /dev/null @@ -1,7 +0,0 @@ -{"name" : "ACTDIMS" , "sections" : ["RUNSPEC"], - "size" : 1, - "items" : [ - {"name" : "MAX_ACTION", "value_type" : "INT" , "default" : 2}, - {"name" : "MAX_ACTION_LINES", "value_type" : "INT" , "default" : 50}, - {"name" : "MAX_ACTION_LINE_CHARACTERS" , "value_type" : "INT" , "default" : 80}, - {"name" : "MAX_ACTION_COND", "value_type" : "INT" , "default" : 3}]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/ACTNUM b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/ACTNUM deleted file mode 100644 index 26e9589211..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/ACTNUM +++ /dev/null @@ -1 +0,0 @@ -{"name" : "ACTNUM", "sections" : ["GRID"], "data" : {"value_type" : "INT" }} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/ADD b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/ADD deleted file mode 100644 index c5946d3396..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/ADD +++ /dev/null @@ -1,10 +0,0 @@ -{"name" : "ADD", "sections" : ["GRID", "EDIT", "PROPS", "REGIONS", "SOLUTION"], "items" : [ - {"name" : "field" , "value_type" : "STRING"}, - {"name" : "shift" , "value_type" : "DOUBLE"}, - {"name" : "I1" , "value_type" : "INT"}, - {"name" : "I2" , "value_type" : "INT"}, - {"name" : "J1" , "value_type" : "INT"}, - {"name" : "J2" , "value_type" : "INT"}, - {"name" : "K1" , "value_type" : "INT"}, - {"name" : "K2" , "value_type" : "INT"}]} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/ADDREG b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/ADDREG deleted file mode 100644 index 4cd4ad38f2..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/ADDREG +++ /dev/null @@ -1,6 +0,0 @@ -{"name" : "ADDREG" , "sections" : ["GRID","EDIT","PROPS","REGIONS","SOLUTION"], - "items" : - [{"name" : "ARRAY" , "value_type" : "STRING" , "description" : "The 3D array we will update"}, - {"name" : "SHIFT" , "value_type" : "DOUBLE" , "description" : "The value we will multiply with" , "default" : 0} , - {"name" : "REGION_NUMBER" , "value_type" : "INT" , "description" : "The region number we are interested in"} , - {"name" : "REGION_NAME" , "value_type" : "STRING" , "description" : "The name of the region we are interested in" , "default" : "M"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/ADSALNOD b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/ADSALNOD deleted file mode 100644 index 987c8ece33..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/ADSALNOD +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "ADSALNOD" , "sections" : ["PROPS"] , "size" : {"keyword" : "TABDIMS" , "item" : "NTSFUN"} , "items" : - [ - {"name" : "DATA" , "value_type":"DOUBLE","size_type":"ALL", "dimension":"Density"} - ] -} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/ALL b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/ALL deleted file mode 100644 index 29ace3f4c2..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/ALL +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name" : "ALL", - "sections" : [ "SUMMARY" ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/API b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/API deleted file mode 100644 index 3b8a8b7712..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/API +++ /dev/null @@ -1 +0,0 @@ -{"name" : "API" , "sections" : ["RUNSPEC"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/AQUANCON b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/AQUANCON deleted file mode 100644 index da6d1271a3..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/AQUANCON +++ /dev/null @@ -1,15 +0,0 @@ -{"name" : "AQUANCON" , "sections" : ["GRID" , "SOLUTION"], - "items" : [ - {"name" : "AQUIFER_ID" , "value_type" : "INT"}, - {"name" : "I1" , "value_type" : "INT"}, - {"name" : "I2" , "value_type" : "INT"}, - {"name" : "J1" , "value_type" : "INT"}, - {"name" : "J2" , "value_type" : "INT"}, - {"name" : "K1" , "value_type" : "INT"}, - {"name" : "K2" , "value_type" : "INT"}, - {"name" : "FACE" , "value_type" : "STRING"}, - {"name" : "INFLUX_COEFF" , "value_type" : "DOUBLE" , "dimension" : "Length*Length"}, - {"name" : "INFLUX_MULT" , "value_type" : "DOUBLE" , "default_value" : 1.0}, - {"name" : "CONNECT_ADJOINING_ACTIVE_CELL" , "value_type" : "STRING" , "default_value" : "NO"}]} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/AQUCON b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/AQUCON deleted file mode 100644 index dab9ec51ca..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/AQUCON +++ /dev/null @@ -1,15 +0,0 @@ -{"name" : "AQUCON" , "sections" : ["GRID"], - "items" : [ - {"name" : "ID" , "value_type" : "INT"}, - {"name" : "I1" , "value_type" : "INT"}, - {"name" : "I2" , "value_type" : "INT"}, - {"name" : "J1" , "value_type" : "INT"}, - {"name" : "J2" , "value_type" : "INT"}, - {"name" : "K1" , "value_type" : "INT"}, - {"name" : "K2" , "value_type" : "INT"}, - {"name" : "CONNECT_FACE" , "value_type" : "STRING"}, - {"name" : "TRANS_MULT" , "value_type" : "DOUBLE", "default_value" : 1.0}, - {"name" : "TRANS_OPTION" , "value_type" : "INT", "default_value" : 0}, - {"name" : "ALLOW_INTERNAL_CELLS" , "value_type" : "STRING", "default_value" : "NO"}, - {"name" : "VEFRAC" , "value_type" : "DOUBLE", "default_value" : 1.0}, - {"name" : "VEFRACP" , "value_type" : "DOUBLE", "default_value" : 1.0}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/AQUDIMS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/AQUDIMS deleted file mode 100644 index 62a8f85dd8..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/AQUDIMS +++ /dev/null @@ -1,11 +0,0 @@ -{"name" : "AQUDIMS" , "sections" : ["RUNSPEC"], -"size" : 1 , -"items" : [ - {"name" : "MXNAQN" , "value_type" : "INT" , "default": 1}, - {"name" : "MXNAQC" , "value_type" : "INT" , "default": 1}, - {"name" : "NIFTBL" , "value_type" : "INT" , "default": 1}, - {"name" : "NRIFTB" , "value_type" : "INT" , "default": 36}, - {"name" : "NANAQU" , "value_type" : "INT" , "default": 1}, - {"name" : "NCAMAX" , "value_type" : "INT" , "default": 1}, - {"name" : "MXNALI" , "value_type" : "INT" , "default": 0}, - {"name" : "MXAAQL" , "value_type" : "INT" , "default": 0}]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/AQUFETP b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/AQUFETP deleted file mode 100644 index f1b3d8bcb6..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/AQUFETP +++ /dev/null @@ -1,11 +0,0 @@ -{"name" : "AQUFETP" , "sections" : ["SOLUTION" , "SCHEDULE"], "size" : {"keyword":"AQUDIMS" , "item":"NANAQU"}, - "items" : [ - {"name" : "ID" , "value_type" : "INT"}, - {"name" : "DATUM_DEPTH" , "value_type" : "DOUBLE" , "dimension" : "Length"}, - {"name" : "P0" , "value_type" : "DOUBLE" , "dimension" : "Pressure"}, - {"name" : "V0" , "value_type" : "DOUBLE" , "dimension" : "Length*Length*Length"}, - {"name" : "COMPRESSIBILITY" , "value_type" : "DOUBLE" , "dimension" : "1/Pressure"}, - {"name" : "PI" , "value_type" : "DOUBLE" , "dimension" : "ReservoirVolume/Pressure*Time"}, - {"name" : "WATER_TABLE" , "value_type" : "INT" , "default_value" : 1}, - {"name" : "SALINITY" , "value_type" : "DOUBLE" , "default_value" : 0 , "dimension" : "Salinity"}, - {"name" : "TEMP" , "value_type" : "DOUBLE" , " dimension" : "Temperature"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/AQUIFER_PROBE_ANALYTIC b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/AQUIFER_PROBE_ANALYTIC deleted file mode 100644 index 375e3fba14..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/AQUIFER_PROBE_ANALYTIC +++ /dev/null @@ -1,8 +0,0 @@ -{"name" : "AQUIFER_PROBE_ANALYTIC" , - "sections" : ["SUMMARY"], - "data" : {"value_type" : "INT"}, - "deck_name_regex" : "AA.+"} - - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/AQUNUM b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/AQUNUM deleted file mode 100644 index 4789190842..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/A/AQUNUM +++ /dev/null @@ -1,14 +0,0 @@ -{"name" : "AQUNUM" , "sections" : ["GRID"], -"items" : [ - {"name" : "AQUIFER_ID" , "value_type" : "INT"}, - {"name" : "I" , "value_type" : "INT"}, - {"name" : "J" , "value_type" : "INT"}, - {"name" : "K" , "value_type" : "INT"}, - {"name" : "CROSS_SECTION" , "value_type" : "DOUBLE" , "dimension" : "Length*Length"}, - {"name" : "LENGTH" , "value_type" : "DOUBLE" , "dimension" : "Length"}, - {"name" : "PORO" , "value_type" : "DOUBLE" , "dimension" : "1"}, - {"name" : "PERM" , "value_type" : "DOUBLE" , "dimension" : "Permeability"}, - {"name" : "DEPTH" , "value_type" : "DOUBLE" , "dimension" : "Length"}, - {"name" : "INITIAL_PRESSURE" , "value_type" : "DOUBLE" , "dimension" : "Pressure"}, - {"name" : "PVT_TABLE_NUM" , "value_type" : "INT"}, - {"name" : "SAT_TABLE_NUM" , "value_type" : "INT"}]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/B/BLOCK_PROBE b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/B/BLOCK_PROBE deleted file mode 100644 index ba00cb3ff6..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/B/BLOCK_PROBE +++ /dev/null @@ -1,145 +0,0 @@ -{ - "name" : "BLOCK_PROBE" , - "sections" : ["SUMMARY"], - - "comment": "E100 only", - "deck_names" : [ - "BOSAT", - "BSOIL", - "BOIP", - "BOIPL", - "BOIPG", - "BPPO", - "BVOIL", - "BOVIS", - "BDENO", - "BODEN", - "BFLOOI", - "BFLOOJ", - "BFLOOK", - "BVELOI", - "BVELOJ", - "BVELOK", - "BWSAT", - "BSWAT", - "BWIP", - "BPPW", - "BVWAT", - "BWVIS", - "BDENW", - "BWDEN", - "BFLOWI", - "BVELWJ", - "BVELWK", - "BVELWI", - "BVELWJ", - "BVELWK", - "BGSAT", - "BSGAS", - "BGIP", - "BGIPL", - "BGIPG", - "BPPG", - "BVGAS", - "BGVIS", - "BDENG", - "BGDEN", - "BFLOGI", - "BFLOGJ", - "BFLOGK", - "BVELGI", - "BVELGJ", - "BVELGK", - "BPR", - "BWPR", - "BGPR", - "BRS", - "BRV", - "BPBUB", - "BPDEW", - "BRSSAT", - "BRVSAT", - "BSTATE", - "BPPC", - "BOKR", - "BWKR", - "BGKR", - "BKRO", - "BKRG", - "BKRW", - "BWPC", - "BGPC", - "BGTRP", - "BGTPD", - "BGSHY", - "BGSTRP", - "BWSHY", - "BWSMA", - "BHD", - "BHDF", - "BPR_X", - "BHD_X", - "BHDF_X", - "BSCN_X", - "BCTRA_X", - "LBPR_X", - "LBHD_X", - "LBHDF_X", - "LBSCN_X", - "LBCTRA_X", - "BRPV", - "BOPV", - "BWPV", - "BGPV", - "BHPV", - "BRTM", - "BPORVMOD", - "BPERMMOD", - "BAPI", - "BSCN", - "BSIP", - "BEWV_SAL", - "BTCNFANI", - "BTCNFCAT", - "BTRADCAT", - "BTSADCAT", - "BESALSUR", - "BESALPLY", - "BTCNFHEA", - "BTIPTHEA", - "BCGC", - "BCSC", - "BTCNFFOA", - "BTCNMFOA", - "BTIPTFOA", - "BTADSFOA", - "BTDCYFOA", - "BTMOBFOA", - "BTHLFFOA", - "BGI", - "BSIP", - "BNSAT", - "BNIP", - "BNKR", - "BTCNFSUR", - "BTIPTSUR", - "BTADSUR", - "BTCASUR", - "BTSTSUR", - "BEWV_SUR", - "BTCNFALK", - "BTADSALK", - "BTSTMALK", - "BTSADALK", - "BTPADALK" - ], - - "comment":"Some keywords need to be suffixed by a tracer name...", - "deck_name_regex":"BU.+|BTIPF.+|BTIPS.+|BTCNF.+|BTCNS.+|BTCN[1-9][0-9]*.+|BTIPT.+|BTIPF.+|BTIPS.+|BTIP[1-9][0-9]*.+|BTADS.+|BTDCY", - - "items" : [ - {"name": "I" , "value_type" : "INT"}, - {"name": "J" , "value_type" : "INT"}, - {"name": "K" , "value_type" : "INT"} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/B/BOX b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/B/BOX deleted file mode 100644 index 13b0a2f5a0..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/B/BOX +++ /dev/null @@ -1,7 +0,0 @@ -{"name" : "BOX" , "sections" : ["GRID", "EDIT", "PROPS", "REGIONS", "SOLUTION", "SCHEDULE"], "size" : 1 , "items" : [ - {"name" : "I1" , "value_type" : "INT"}, - {"name" : "I2" , "value_type" : "INT"}, - {"name" : "J1" , "value_type" : "INT"}, - {"name" : "J2" , "value_type" : "INT"}, - {"name" : "K1" , "value_type" : "INT"}, - {"name" : "K2" , "value_type" : "INT"}]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/COMPDAT b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/COMPDAT deleted file mode 100644 index 5117dcf07a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/COMPDAT +++ /dev/null @@ -1,15 +0,0 @@ -{"name" : "COMPDAT" , "sections" : ["SCHEDULE"], "items" : [ - {"name" : "WELL" , "value_type" : "STRING"}, - {"name" : "I" , "value_type" : "INT" , "default" : 0}, - {"name" : "J" , "value_type" : "INT" , "default" : 0}, - {"name" : "K1" , "value_type" : "INT" }, - {"name" : "K2" , "value_type" : "INT" }, - {"name" : "STATE" , "value_type" : "STRING" , "default" : "OPEN"}, - {"name" : "SAT_TABLE" , "value_type" : "INT" , "default" : 0}, - {"name" : "CONNECTION_TRANSMISSIBILITY_FACTOR" , "value_type" : "DOUBLE", "dimension" : "Viscosity*ReservoirVolume/Time*Pressure"}, - {"name" : "DIAMETER" , "value_type" : "DOUBLE", "dimension" : "Length"}, - {"name" : "Kh" , "value_type" : "DOUBLE", "dimension" : "Permeability*Length" , "default" : -1}, - {"name" : "SKIN" , "value_type" : "DOUBLE", "dimension" : "1" , "default" : 0}, - {"name" : "D_FACTOR" , "value_type" : "DOUBLE", "dimension" : "1" }, - {"name" : "DIR" , "value_type" : "STRING" , "default" : "Z"}, - {"name" : "PR" , "value_type" : "DOUBLE", "dimension" : "Pressure" }]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/COMPLUMP b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/COMPLUMP deleted file mode 100644 index e3f6a771e7..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/COMPLUMP +++ /dev/null @@ -1,9 +0,0 @@ -{"name" : "COMPLUMP", "sections" : ["SCHEDULE"], "items" : [ - {"name" : "WELL" , "value_type" : "STRING"}, - {"name" : "I" , "value_type" : "INT" }, - {"name" : "J" , "value_type" : "INT" }, - {"name" : "K1" , "value_type" : "INT" }, - {"name" : "K2" , "value_type" : "INT" }, - {"name" : "N" , "value_type" : "INT" } - -]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/COMPORD b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/COMPORD deleted file mode 100644 index b8570afc87..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/COMPORD +++ /dev/null @@ -1,3 +0,0 @@ -{"name" : "COMPORD" , "sections" : ["SCHEDULE"] , "items" : [ - {"name" : "WELL" , "value_type" : "STRING"}, - {"name" : "ORDER_TYPE" , "value_type" : "STRING" , "default" : "TRACK"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/COMPSEGS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/COMPSEGS deleted file mode 100644 index b90885493b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/COMPSEGS +++ /dev/null @@ -1,14 +0,0 @@ -{"name" : "COMPSEGS" , "sections" : ["SCHEDULE"] , "records" : [ - [{"name" : "WELL" , "value_type" : "STRING"}], - [{"name" : "I" , "value_type" : "INT"}, - {"name" : "J" , "value_type" : "INT"}, - {"name" : "K" , "value_type" : "INT"}, - {"name" : "BRANCH" , "value_type" : "INT"}, - {"name" : "DISTANCE_START" , "value_type" : "DOUBLE" , "dimension" : "Length"}, - {"name" : "DISTANCE_END" , "value_type" : "DOUBLE" , "dimension" : "Length"}, - {"name" : "DIRECTION" , "value_type" : "STRING"}, - {"name" : "END_IJK" , "value_type" : "INT"}, - {"name" : "CENTER_DEPTH" , "value_type" : "DOUBLE" , "dimension" : "Length" , "default" : 0}, - {"name" : "THERMAL_LENGTH" , "value_type" : "DOUBLE" , "dimension" : "Length"}, - {"name" : "SEGMENT_NUMBER" , "value_type" : "INT"} - ]]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/CONNECTION_PROBE b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/CONNECTION_PROBE deleted file mode 100644 index 87a710ff1d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/CONNECTION_PROBE +++ /dev/null @@ -1,136 +0,0 @@ -{ - "name" : "CONNECTION_PROBE", - "sections" : ["SUMMARY"], - "comment": "E100 only", - "comment" : "See comment in CPR keyword file - there is some serious special casing involved here", -"deck_names" : [ - "COFR", - "COFRF", - "COFRS", - "COFRL", - "COPRL", - "COFRU", - "COPR", - "COPT", - "COPTL", - "COPTF", - "COPTS", - "COIT", - "COITL", - "COPP", - "COPI", - "CWFR", - "CWFRL", - "CWPRL", - "CWFRU", - "CWPR", - "CWPT", - "CWPTL", - "CWIR", - "CWIT", - "CWIRL", - "CWITL", - "CWPP", - "CWPI", - "CGFR", - "CGFRF", - "CGFRS", - "CGFRL", - "CGPRL", - "CGFRU", - "CGPR", - "CGPT", - "CGPTL", - "CGPTF", - "CGPTS", - "CGIR", - "CGIT", - "CGIRL", - "CGITL", - "CGPP", - "CGPI", - "CGQ", - "CLFR", - "CLFRL", - "CLPT", - "CLPTL", - "CVFR", - "CVFRL", - "CVIRL", - "CVPT", - "CVPTL", - "CVIR", - "CVIT", - "CVITL", - "CWCT", - "CWCTL", - "CGOR", - "CGORL", - "COGR", - "COGRL", - "CWGR", - "CWGRL", - "CGLR", - "CGLRL", - "CPI", - "CTFAC", - "CDBF", - "CDSM", - "CDSML", - "CDSF", - "CDFAC", - "CAPI", - "CSFR", - "CSPR", - "CSPT", - "CSIR", - "CSIT", - "CSPC", - "CSIC", - "CTFRANI", - "CTPTANI", - "CTITANI", - "CTFRCAT", - "CTPTCAT", - "CTITCAT", - "CTFRFOA", - "CTPTFOA", - "CTITFOA", - "CCFR", - "CCPC", - "CCPT", - "CCIC", - "CCIT", - "CSFR", - "CSPR", - "CSPT", - "CSIR", - "CSIT", - "CNFR", - "CNPT", - "CNIT", - "CTFRSUR", - "CTPTSUR", - "CTITSUR", - "CTFRALK", - "CTPTALK", - "CTITALK", - "COFRU", - "CWFRU", - "CGFRU", - "LCOFRU", - "LCWFRU", - "LCGFRU" - ], - - "comment":"Some keywords need to be suffixed by a tracer name...", - "deck_name_regex":"CU.+|CTFR.+|CTPR.+|CTPT.+|CTPC.+|CTIR.+|CTIT.+|CTIC.+|CTFR.+|CTPR.+|CTPT.+|CTPC.+|CTIR.+|CTIT.+|CTIC.+|CTIRF.+|CTIRS.+|CTPRF.+|CTPRS.+|CTITF.+|CTITS.+|CTPTF.+|CTPTS.+|CTICF.+|CTICS.+|CTPCF.+|CTPCS", - - "items" : [ - {"name" : "WELL" , "value_type" : "STRING"}, - {"name" : "I" , "value_type" : "INT"}, - {"name" : "J" , "value_type" : "INT"}, - {"name" : "K" , "value_type" : "INT"} - ] - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/COORD b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/COORD deleted file mode 100644 index decc2fd568..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/COORD +++ /dev/null @@ -1 +0,0 @@ -{"name" : "COORD", "sections" : ["GRID"], "data" : {"value_type" : "DOUBLE", "dimension" : "Length" }} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/COPY b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/COPY deleted file mode 100644 index b344861932..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/COPY +++ /dev/null @@ -1,10 +0,0 @@ -{"name" : "COPY" , "sections" : ["GRID", "EDIT", "PROPS", "REGIONS", "SOLUTION"], "items" : [ - {"name" : "src", "value_type" : "STRING"}, - {"name" : "target", "value_type" : "STRING"}, - {"name" : "I1" , "value_type" : "INT"}, - {"name" : "I2" , "value_type" : "INT"}, - {"name" : "J1" , "value_type" : "INT"}, - {"name" : "J2" , "value_type" : "INT"}, - {"name" : "K1" , "value_type" : "INT"}, - {"name" : "K2" , "value_type" : "INT"}]} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/COPYREG b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/COPYREG deleted file mode 100644 index 07d84e0547..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/COPYREG +++ /dev/null @@ -1,6 +0,0 @@ -{"name" : "COPYREG" , "sections" : ["GRID","EDIT","PROPS","REGIONS","SOLUTION"], - "items" : - [{"name" : "ARRAY" , "value_type" : "STRING" , "description" : "The 3D array we will update"}, - {"name" : "TARGET_ARRAY" , "value_type" : "STRING" , "description" : "The name of the array which will be set"} , - {"name" : "REGION_NUMBER" , "value_type" : "INT" , "description" : "The region number we are interested in"} , - {"name" : "REGION_NAME" , "value_type" : "STRING" , "description" : "The name of the region we are interested in" , "default" : "M"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/CPR b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/CPR deleted file mode 100644 index 43747d9bf0..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/C/CPR +++ /dev/null @@ -1,14 +0,0 @@ -{"name" : "CPR" , -"items" : [ - {"name" : "WELL" , "value_type" : "STRING"}, - {"name" : "I" , "value_type" : "INT"}, - {"name" : "J" , "value_type" : "INT"}, - {"name" : "K" , "value_type" : "INT"}], -"sections" : ["RUNSPEC" , "SUMMARY"], -"comment" : "The CPR keyword can occur both in the RUNSPEC section and in the SUMMARY section", -"comment" : "the meaning of the keyword is completely different in the sections, but we just barely", -"comment" : "manage to get away by using the same configuration for both sections. When occuring", -"comment" : "in the RUNSPEC section the keyword should have exactly one-empty-record - that is enforced", -"comment" : "in the SimulationConfig() constructor"} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DATE b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DATE deleted file mode 100644 index e9a3b07740..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DATE +++ /dev/null @@ -1 +0,0 @@ -{"name" : "DATE", "sections" : ["SUMMARY"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DATES b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DATES deleted file mode 100644 index 5975165244..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DATES +++ /dev/null @@ -1,6 +0,0 @@ -{"name" : "DATES", "sections" : ["SCHEDULE"], "items" : [ - {"name" : "DAY" , "value_type" : "INT" }, - {"name" : "MONTH" , "value_type" : "STRING"}, - {"name" : "YEAR" , "value_type" : "INT" }, - {"name" : "TIME" , "value_type" : "STRING", "default":"00:00:00.000"} ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DATUM b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DATUM deleted file mode 100644 index 0afc763a7f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DATUM +++ /dev/null @@ -1,4 +0,0 @@ -{"name" : "DATUM" , "sections" : ["SOLUTION"] , "size" : 1, -"items" : [ - {"name" : "DEPTH" , "value_type" : "DOUBLE" , "dimension" : "Length"}]} - \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DENSITY b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DENSITY deleted file mode 100644 index a1b0920edc..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DENSITY +++ /dev/null @@ -1,4 +0,0 @@ -{"name" : "DENSITY", "sections" : ["PROPS"], "size" : {"keyword":"TABDIMS", "item":"NTPVT" }, "items" : - [{"name": "OIL" , "value_type" : "DOUBLE" , "default": 600 , "dimension" : "Density"}, - {"name": "WATER" , "value_type" : "DOUBLE" , "default": 999.014 , "dimension" : "Density"}, - {"name": "GAS" , "value_type" : "DOUBLE" , "default": 1 , "dimension" : "Density"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DEPTH b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DEPTH deleted file mode 100644 index 6a2e260eec..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DEPTH +++ /dev/null @@ -1 +0,0 @@ -{"name":"DEPTH", "sections" : ["EDIT"], "data": {"value_type" : "DOUBLE"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DEPTHZ b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DEPTHZ deleted file mode 100644 index 265a6f9a62..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DEPTHZ +++ /dev/null @@ -1,3 +0,0 @@ -{"name" : "DEPTHZ" , "sections" : ["GRID"], "data" : {"value_type" : "DOUBLE" , "dimension" : "Length"}, - "comment" : "DEPTHZ is not documented in the Eclipse manual, but found in the SPE1 case" -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DIMENS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DIMENS deleted file mode 100644 index 54153977b8..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DIMENS +++ /dev/null @@ -1,4 +0,0 @@ -{"name" : "DIMENS", "sections" : ["RUNSPEC"], "size" : 1 , "items" : - [{"name": "NX" , "value_type" : "INT"}, - {"name": "NY" , "value_type" : "INT"}, - {"name": "NZ" , "value_type" : "INT"}]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DISGAS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DISGAS deleted file mode 100644 index d47c652a62..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DISGAS +++ /dev/null @@ -1 +0,0 @@ -{"name" : "DISGAS", "sections" : ["RUNSPEC"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DRSDT b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DRSDT deleted file mode 100644 index ba59f20d10..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DRSDT +++ /dev/null @@ -1,4 +0,0 @@ -{"name" : "DRSDT", "sections" : ["SCHEDULE"], "size" : 1, "items" : - [{"name" : "DRSDT_MAX" , "value_type" : "DOUBLE", "dimension" : "GasDissolutionFactor/Time"}, - {"name" : "Option" , "value_type" : "STRING", "default" : "ALL"}] -} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DRVDT b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DRVDT deleted file mode 100644 index 7e8059b23c..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DRVDT +++ /dev/null @@ -1,3 +0,0 @@ -{"name" : "DRVDT", "sections" : ["SCHEDULE"], "size" : 1, "items" : - [{"name" : "DRVDT_MAX" , "value_type" : "DOUBLE", "dimension" : "OilDissolutionFactor/Time"}] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DUMPFLUX b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DUMPFLUX deleted file mode 100644 index 592fec119f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DUMPFLUX +++ /dev/null @@ -1 +0,0 @@ -{"name" : "DUMPFLUX" , "sections" : ["GRID"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DX b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DX deleted file mode 100644 index dc6330933c..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DX +++ /dev/null @@ -1 +0,0 @@ -{"name":"DX", "sections" : ["GRID"], "data" : {"value_type" : "DOUBLE", "dimension":"Length" }} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DXV b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DXV deleted file mode 100644 index 940e9791ea..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DXV +++ /dev/null @@ -1 +0,0 @@ -{"name":"DXV", "sections" : ["GRID"], "data" : {"value_type" : "DOUBLE", "dimension":"Length" }} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DY b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DY deleted file mode 100644 index 7c933256cd..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DY +++ /dev/null @@ -1 +0,0 @@ -{"name":"DY", "sections" : ["GRID"], "data" : {"value_type" : "DOUBLE", "dimension":"Length" }} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DYV b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DYV deleted file mode 100644 index d57395abc1..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DYV +++ /dev/null @@ -1 +0,0 @@ -{"name":"DYV", "sections" : ["GRID"], "data" : {"value_type" : "DOUBLE", "dimension":"Length" }} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DZ b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DZ deleted file mode 100644 index a7035dca15..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/D/DZ +++ /dev/null @@ -1 +0,0 @@ -{"name":"DZ", "sections" : ["GRID"], "data" : {"value_type" : "DOUBLE", "dimension":"Length" }} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ECHO b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ECHO deleted file mode 100644 index 261a79f31a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ECHO +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name" : "ECHO", - "sections": [ - "RUNSPEC", - "GRID", - "EDIT", - "PROPS", - "REGIONS", - "SOLUTION", - "SUMMARY", - "SCHEDULE" - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EDIT b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EDIT deleted file mode 100644 index 076e73b393..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EDIT +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name" : "EDIT", - "sections" : [] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EDITNNC b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EDITNNC deleted file mode 100644 index 5838eeb53e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EDITNNC +++ /dev/null @@ -1,19 +0,0 @@ -{"name" : "EDITNNC" , "sections" : ["EDIT"], - "items" : [ - {"name" : "I1" , "value_type" : "INT"}, - {"name" : "J1" , "value_type" : "INT"}, - {"name" : "K1" , "value_type" : "INT"}, - {"name" : "I2" , "value_type" : "INT"}, - {"name" : "J2" , "value_type" : "INT"}, - {"name" : "K2" , "value_type" : "INT"}, - {"name" : "TRAN_MULT" , "value_type" : "DOUBLE" , "default_value" : 1.0}, - {"name" : "SAT_TABLE12" , "value_type" : "INT" , "default_value" : 0}, - {"name" : "SAT_TABLE21" , "value_type" : "INT" , "default_value" : 0}, - {"name" : "PRESS_TABLE12" , "value_type" : "INT" , "default_value" : 0}, - {"name" : "PRESS_TABLE21" , "value_type" : "INT" , "default_value" : 0}, - {"name" : "FACE_FLOW12" , "value_type" : "STRING"}, - {"name" : "FACE_FLOW21" , "value_type" : "STRING"}, - {"name" : "DIFFM" , "value_type" : "DOUBLE" , "default_value" : 1.0}]} - - - \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EHYSTR b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EHYSTR deleted file mode 100644 index e8f1559339..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EHYSTR +++ /dev/null @@ -1,15 +0,0 @@ -{"name" : "EHYSTR" , "sections" : ["PROPS"], "size" : 1, "items" : -[ - {"name" : "curvature_caplillary_pressure_hyst", "value_type" : "DOUBLE", "default" : 0.1}, - {"name" : "relative_perm_hyst", "value_type" : "INT", "default" : 0, "comment" : "Default is 2 for Eclipse300"}, - {"name" : "curvature_param_killough_wetting", "value_type" : "DOUBLE", "default" : 1.0}, - {"name" : "mod_param_trapped", "value_type" : "DOUBLE", "default" : 0.1}, - {"name" : "limiting_hyst_flag", "value_type" : "STRING", "default" : "BOTH"}, - {"name" : "shape_cap_press_flag", "value_type" : "STRING", "default" : "RETR"}, - {"name" : "init_fluid_mob_flag", "value_type" : "STRING", "default" : "DRAIN"}, - {"name" : "wetting_phase_flag", "value_type" : "STRING" , "default" : "OIL"}, - {"name" : "baker_flag_oil", "value_type" : "STRING", "default" : "NO"}, - {"name" : "baker_flag_gas", "value_type" : "STRING", "default" : "NO"}, - {"name" : "baker_flag_water", "value_type" : "STRING", "default" : "NO"}, - {"name" : "threshold_saturation", "value_type" : "DOUBLE", "default" : 0.0} -]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/END b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/END deleted file mode 100644 index 160aa0680d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/END +++ /dev/null @@ -1 +0,0 @@ -{"name" : "END", "sections" : ["RUNSPEC", "GRID", "EDIT", "PROPS", "REGIONS", "SOLUTION", "SUMMARY", "SCHEDULE"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENDBOX b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENDBOX deleted file mode 100644 index cbf0532c82..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENDBOX +++ /dev/null @@ -1 +0,0 @@ -{"name" : "ENDBOX", "sections" : ["GRID", "EDIT", "PROPS", "REGIONS", "SOLUTION", "SCHEDULE"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENDINC b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENDINC deleted file mode 100644 index e85ba27aa3..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENDINC +++ /dev/null @@ -1 +0,0 @@ -{"name" : "ENDINC", "sections" : ["RUNSPEC", "GRID", "EDIT", "PROPS", "REGIONS", "SOLUTION", "SUMMARY", "SCHEDULE"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENDNUM b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENDNUM deleted file mode 100644 index 0a40b46c68..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENDNUM +++ /dev/null @@ -1 +0,0 @@ -{"name" : "ENDNUM", "sections" : ["REGIONS"], "data" : {"value_type" : "INT" }} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENDPOINT_SPECIFIERS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENDPOINT_SPECIFIERS deleted file mode 100644 index 17e3aa134e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENDPOINT_SPECIFIERS +++ /dev/null @@ -1,203 +0,0 @@ -{ - "name" : "ENDPOINT_SPECIFIERS", - "sections" : ["PROPS"], - "deck_names" : [ - "KRG", - "KRGX", - "KRGY", - "KRGZ", - "KRGX-", - "KRGY-", - "KRGZ-", - "KRGR", - "KRGRX", - "KRGRY", - "KRGRZ", - "KRGRX-", - "KRGRY-", - "KRGRZ-", - "IKRG", - "IKRGX", - "IKRGY", - "IKRGZ", - "IKRGX-", - "IKRGY-", - "IKRGZ-", - "IKRGR", - "IKRGRX", - "IKRGRY", - "IKRGRZ", - "IKRGRX-", - "IKRGRY-", - "IKRGRZ-", - "KRO", - "KROX", - "KROY", - "KROZ", - "KROX-", - "KROY-", - "KROZ-", - "KRORW", - "KRORWX", - "KRORWY", - "KRORWZ", - "KRORWX-", - "KRORWY-", - "KRORWZ-", - "KRORG", - "KRORGX", - "KRORGY", - "KRORGZ", - "KRORGX-", - "KRORGY-", - "KRORGZ-", - "IKRO", - "IKROX-", - "IKROY-", - "IKROZ-", - "IKRORW", - "IKRORWX", - "IKRORWY", - "IKRORWZ", - "IKRORWX-", - "IKRORWY-", - "IKRORWZ-", - "IKRORG", - "IKRORGX", - "IKRORGY", - "IKRORGZ", - "IKRORGX-", - "IKRORGY-", - "IKRORGZ-", - "KRW", - "KRWX", - "KRWY", - "KRWZ", - "KRWX-", - "KRWY-", - "KRWZ-", - "KRWR", - "KRWRX", - "KRWRY", - "KRWRZ", - "KRWRX-", - "KRWRY-", - "KRWRZ-", - "IKRW", - "IKRWX", - "IKRWY", - "IKRWZ", - "IKRWX-", - "IKRWY-", - "IKRWZ-", - "IKRWR", - "IKRWRX", - "IKRWRY", - "IKRWRZ", - "IKRWRX-", - "IKRWRY-", - "IKRWRZ-", - "SWL", - "ISWL", - "SWLX", - "SWLX-", - "ISWLX", - "ISWLX-", - "SWLY", - "SWLY-", - "ISWLY", - "ISWLY-", - "SWLZ", - "SWLZ-", - "ISWLZ", - "ISWLZ-", - "SGU", - "ISGU", - "SGUX", - "SGUX-", - "ISGUX", - "ISGUX-", - "SGUY", - "SGUY-", - "ISGUY", - "ISGUY-", - "SGUZ", - "SGUZ-", - "ISGUZ", - "ISGUZ-", - "SWU", - "ISWU", - "SWUX", - "SWUX-", - "ISWUX", - "ISWUX-", - "SWUY", - "SWUY-", - "ISWUY", - "SWUY-", - "ISWUY", - "ISWUY-", - "SWUZ", - "SWUZ-", - "ISWUZ", - "ISWUZ-", - "SGCR", - "ISGCR", - "SGCRX", - "SGCRX-", - "ISGCRX", - "ISGCRX-", - "SGCRY", - "SGCRY-", - "ISGCRY", - "ISGCRY-", - "SGCRZ", - "SGCRZ-", - "ISGCRZ", - "ISGCRZ-", - "SOWCR", - "ISOWCR", - "SOWCRX", - "SOWCRX-", - "ISOWCRX", - "ISOWCRX-", - "SOWCRY", - "SOWCRY-", - "ISOWCRY", - "ISOWCRY-", - "SOWCRZ", - "SOWCRZ-", - "ISOWCRZ", - "ISOWCRZ-", - "SOGCR", - "ISOGCR", - "SOGCRX", - "SOGCRX-", - "ISOGCRX", - "ISOGCRX-", - "SOGCRY", - "SOGCRY-", - "ISOGCRY", - "ISOGCRY-", - "SOGCRZ", - "SOGCRZ-", - "ISOGCRZ", - "ISOGCRZ-", - "SWCR", - "ISWCR", - "SWCRX", - "SWCRX-", - "ISWCRX", - "ISWCRX-", - "SWCRY", - "SWCRY-", - "SWCRZ", - "SWCRZ-", - "ISWCRZ", - "ISWCRZ-" - ], - "data" : { - "value_type" : "DOUBLE", - "dimension":"1" - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENDSCALE b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENDSCALE deleted file mode 100644 index 74345ef16f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENDSCALE +++ /dev/null @@ -1,7 +0,0 @@ -{"name" : "ENDSCALE", "sections" : ["RUNSPEC"], "size" : 1 , "items" : [ - {"name" : "DIRECT" , "value_type" : "STRING" , "default" : "NODIR"}, - {"name" : "IRREVERS" , "value_type" : "STRING" , "default" : "REVER"}, - {"name" : "NUM_TABLES" , "value_type" : "INT" , "default" : 1}, - {"name" : "NUM_NODES" , "value_type" : "INT" , "default" : 20}, - {"name" : "COMB_MODE" , "value_type" : "INT" , "default" : 0} - ]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENDSKIP b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENDSKIP deleted file mode 100644 index afbdfe0c3a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENDSKIP +++ /dev/null @@ -1 +0,0 @@ -{"name" : "ENDSKIP" , "size" : 0 , "sections" : ["RUNSPEC" , "GRID" , "EDIT" , "PROPS" , "REGIONS" , "SOLUTION" ,"SUMMARY" , "SCHEDULE"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENKRVD b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENKRVD deleted file mode 100644 index a43ccd39e8..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENKRVD +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "ENKRVD" , "sections" : ["PROPS"], "size" : {"keyword" : "ENDSCALE" , "item" : "NUM_TABLES"}, - "items" : [ - {"name":"DATA", "value_type":"DOUBLE", "default" : -1 , "size_type" : "ALL" , "dimension" : ["Length","1","1","1","1","1","1","1"]} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENPTVD b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENPTVD deleted file mode 100644 index 7726cd7fb6..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/ENPTVD +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "ENPTVD" , "sections" : ["PROPS"], "size" : {"keyword" : "ENDSCALE" , "item" : "NUM_TABLES"}, - "items" : [ - {"name":"DATA", "value_type":"DOUBLE", "default" : -1 , "size_type" : "ALL" , "dimension" : ["Length","1","1","1","1","1","1","1","1"]} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EQLDIMS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EQLDIMS deleted file mode 100644 index d4cd4c740e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EQLDIMS +++ /dev/null @@ -1,6 +0,0 @@ -{"name" : "EQLDIMS" , "sections" : ["RUNSPEC"], "size" : 1 , "items": - [{"name" : "NTEQUL" , "value_type" : "INT" , "default" : 1}, - {"name" : "DEPTH_NODES_P" , "value_type" : "INT", "default" : 100}, - {"name" : "DEPTH_NODES_TAB" , "value_type" : "INT" , "default" : 20}, - {"name" : "NTTRVD" , "value_type" : "INT" , "default" : 1}, - {"name" : "NSTRVD" , "value_type" : "INT" , "default" : 20}]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EQLNUM b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EQLNUM deleted file mode 100644 index 1936b117dc..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EQLNUM +++ /dev/null @@ -1 +0,0 @@ -{"name" : "EQLNUM", "sections" : ["REGIONS"], "data" : {"value_type" : "INT" }} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EQLOPTS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EQLOPTS deleted file mode 100644 index b0b3540c3b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EQLOPTS +++ /dev/null @@ -1,6 +0,0 @@ -{"name" : "EQLOPTS", "sections" : ["RUNSPEC"], "size" : 1, "items" : [ - {"name" : "OPTION1" , "value_type" : "STRING"}, - {"name" : "OPTION2" , "value_type" : "STRING"}, - {"name" : "OPTION3" , "value_type" : "STRING"}, - {"name" : "OPTION4" , "value_type" : "STRING"} - ]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EQUALREG b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EQUALREG deleted file mode 100644 index 3803c8ce53..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EQUALREG +++ /dev/null @@ -1,6 +0,0 @@ -{"name" : "EQUALREG" , "sections" : ["GRID","EDIT","PROPS","REGIONS","SOLUTION"], - "items" : - [{"name" : "ARRAY" , "value_type" : "STRING" , "description" : "The 3D array we will update"}, - {"name" : "VALUE" , "value_type" : "DOUBLE" , "description" : "The value we will assign" , "default" : 0} , - {"name" : "REGION_NUMBER" , "value_type" : "INT" , "description" : "The region number we are interested in"} , - {"name" : "REGION_NAME" , "value_type" : "STRING" , "description" : "The name of the region we are interested in" , "default" : "M"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EQUALS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EQUALS deleted file mode 100644 index 1dbdc9622d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EQUALS +++ /dev/null @@ -1,9 +0,0 @@ -{"name" : "EQUALS", "sections" : ["GRID", "EDIT", "PROPS", "REGIONS", "SOLUTION"], "items" : [ - {"name" : "field" , "value_type" : "STRING"}, - {"name" : "value" , "value_type" : "DOUBLE"}, - {"name" : "I1" , "value_type" : "INT"}, - {"name" : "I2" , "value_type" : "INT"}, - {"name" : "J1" , "value_type" : "INT"}, - {"name" : "J2" , "value_type" : "INT"}, - {"name" : "K1" , "value_type" : "INT"}, - {"name" : "K2" , "value_type" : "INT"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EQUIL b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EQUIL deleted file mode 100644 index 9f3ee5e3b5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EQUIL +++ /dev/null @@ -1,13 +0,0 @@ -{"name" : "EQUIL" , "sections" : ["SOLUTION"], "size" : {"keyword":"EQLDIMS" , "item":"NTEQUL"}, - "description": "The EQUIL item is used when equilibrationg the model. The item should consist of one record for each PVT region", - "items" : - [{"name" : "DATUM_DEPTH" , "value_type" : "DOUBLE" , "default" : 0.0 , "dimension" : "Length"}, - {"name" : "DATUM_PRESSURE" , "value_type" : "DOUBLE" , "dimension" : "Pressure"} , - {"name" : "OWC" , "value_type" : "DOUBLE" , "default" : 0.0 , "dimension" : "Length", - "description" : "The OWC item is depth of the OIL Water contact. This should ..."} , - {"name" : "PC_OWC" , "value_type" : "DOUBLE" , "default" : 0.0 , "dimension" : "Pressure"} , - {"name" : "GOC" , "value_type" : "DOUBLE" , "default" : 0.0 , "dimension" : "Length"} , - {"name" : "PC_GOC" , "value_type" : "DOUBLE" , "default" : 0.0 , "dimension" : "Pressure"} , - {"name" : "BLACK_OIL_INIT" , "value_type" : "INT" , "default" : 0} , - {"name" : "BLACK_OIL_INIT_WG" , "value_type" : "INT" , "default" : 0} , - {"name" : "OIP_INIT" , "value_type" : "INT" , "default" : -5 , "comment":"The default is a state variable"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EXCEL b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EXCEL deleted file mode 100644 index f597dc5e05..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EXCEL +++ /dev/null @@ -1 +0,0 @@ -{"name" : "EXCEL" , "sections" : ["SUMMARY"] } diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EXTRAPMS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EXTRAPMS deleted file mode 100644 index 99d23eb555..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/E/EXTRAPMS +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "EXTRAPMS" , - "sections" : ["RUNSPEC" , "GRID" , "PROPS" , "REGIONS" , "SOLUTION" , "SUMMARY" , "EDIT" , "SCHEDULE" ], - "size" : 1 , - "items" : [{"name" : "LEVEL" , "value_type" : "INT" , "default" : 0 }] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FAULTDIM b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FAULTDIM deleted file mode 100644 index d9792afbf6..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FAULTDIM +++ /dev/null @@ -1,3 +0,0 @@ -{"name" : "FAULTDIM", "sections" : ["RUNSPEC"], "size" : 1, "items" : - [{"name" : "MFSEGS" , "value_type" : "INT" , "default" : 0}] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FAULTS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FAULTS deleted file mode 100644 index 3e401226a2..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FAULTS +++ /dev/null @@ -1,13 +0,0 @@ -{"name" : "FAULTS", "sections" : ["GRID"], "items" : -[ - {"name" : "NAME", "value_type" : "STRING"}, - {"name" : "IX1", "value_type" : "INT"}, - {"name" : "IX2", "value_type" : "INT"}, - {"name" : "IY1", "value_type" : "INT"}, - {"name" : "IY2", "value_type" : "INT"}, - {"name" : "IZ1", "value_type" : "INT"}, - {"name" : "IZ2", "value_type" : "INT"}, - {"name" : "FACE", "value_type" : "STRING"} -] -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FIELD b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FIELD deleted file mode 100644 index 59ce0998d8..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FIELD +++ /dev/null @@ -1 +0,0 @@ -{"name":"FIELD", "sections" : ["RUNSPEC"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FIELD_PROBE b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FIELD_PROBE deleted file mode 100644 index 5a4fe9ad3f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FIELD_PROBE +++ /dev/null @@ -1,287 +0,0 @@ -{ - "name" : "FIELD_PROBE", - "sections" : ["SUMMARY"], - "comment":"E100 names only...", - - "deck_names" : [ - "FOPR", - "FOPRH", - "FOPRT", - "FOPRF", - "FOPRS", - "FOPT", - "FOPTH", - "FOPTF", - "FOPTS", - "FOIR", - "FOIRH", - "FOIRT", - "FOIT", - "FOITH", - "FOPP", - "FOPP2", - "FOPI", - "FOPI2", - "FWPR", - "FWPRH", - "FWPRT", - "FWPT", - "FWPTH", - "FWIR", - "FWIRH", - "FWIRT", - "FWIT", - "FWITH", - "FWPP", - "FWPP2", - "FWPI", - "FWPI2", - "FWPIR", - "FGPR", - "FGPRH", - "FGPRT", - "FGPRF", - "FGPRS", - "FGPT", - "FGPTH", - "FGPTF", - "FGPTS", - "FGIR", - "FGIRH", - "FGIRT", - "FGIT", - "FGITH", - "FGPP", - "FGPP2", - "FGPPS", - "FGPPS2", - "FGPPF", - "FGPPF2", - "FGPI", - "FGPI2", - "FSGR", - "FGSR", - "FSGT", - "FGST", - "FGCR", - "FGCT", - "FGIMR", - "FGIMT", - "FGLIR", - "FGQ", - "FLPR", - "FLPRH", - "FLPRT", - "FLPT", - "FLPTH", - "FJPR", - "FJPRH", - "FJPRT", - "FJPT", - "FJPTH", - "FVPR", - "FVPRT", - "FVPT", - "FVIR", - "FVIRT", - "FVIT", - "FWCT", - "FWCTH", - "FGOR", - "FGORH", - "FOGR", - "FOGRH", - "FWGR", - "FWGRH", - "FGLR", - "FGLRH", - "FMCTP", - "FMCTW", - "FMCTG", - "FMWPT", - "FMWPR", - "FMWPA", - "FMWPU", - "FMWPG", - "FMWPO", - "FMWPS", - "FMWPV", - "FMWPP", - "FMWPL", - "FMWIT", - "FMWIN", - "FMWIA", - "FMWIU", - "FMWIG", - "FMWIS", - "FMWIV", - "FMWIP", - "FMWDR", - "FMWDT", - "FMWWO", - "FMWWT", - "FEPR", - "FEPT", - "FGSPR", - "FGSRL", - "FGSRU", - "FGSSP", - "FGSTP", - "FOSPR", - "FOSRL", - "FOSRU", - "FOSSP", - "FOSTP", - "FWSPR", - "FWSRL", - "FWSRU", - "FWSSP", - "FWSTP", - "FOSAT", - "FOIP", - "FOIPL", - "FOIPG", - "FPPO", - "FOVIS", - "FODEN", - "FWSAT", - "FWIP", - "FPPW", - "FWVIS", - "FWDEN", - "FGSAT", - "FGIP", - "FGIPL", - "FGIPG", - "FPPG", - "FGVIS", - "FGDEN", - "FPR", - "FPRH", - "FPRP", - "FPRGZ", - "FRS", - "FRV", - "FPPC", - "FRPV", - "FOPV", - "FWPV", - "FGPV", - "FHPV", - "FRTM", - "FOE", - "FOEW", - "FOEIW", - "FOEWW", - "FOEIG", - "FOEWG", - "FORMR", - "FORMW", - "FORMG", - "FORME", - "FORMS", - "FORMF", - "FORMX", - "FORMY", - "FORFR", - "FORFW", - "FORFG", - "FORFE", - "FORFS", - "FORFF", - "FORFX", - "FORFY", - "FAQR", - "FAQT", - "FAQRG", - "FAQTG", - "FNQR", - "FNQT", - "FAPI", - "FSPR", - "FSPT", - "FSIR", - "FSIT", - "FSPC", - "FSIC", - "FSIP", - "FTPRANI", - "FTPTANI", - "FTIRANI", - "FTITANI", - "FTPRCAT", - "FTPTCAT", - "FTIRCAT", - "FTITCAT", - "FTPCHEA", - "FTICHEA", - "FTPRHEA", - "FTPTHEA", - "FTIRHEA", - "FTITHEA", - "FTIPTHEA", - "FMPR", - "FMPT", - "FMIR", - "FMIT", - "FCGC", - "FCSC", - "FTPRFOA", - "FTPTFOA", - "FTIRFOA", - "FTITFOA", - "FTIPTFOA", - "FTADSFOA", - "FTDCYFOA", - "FTMOBFOA", - "FSGR", - "FGSR", - "FSGT", - "FGST", - "FGDC", - "FGDCQ", - "FGCR", - "FGCT", - "FGIMR", - "FGIMT", - "FGLIR", - "FGQ", - "FEPR", - "FEPT", - "FCPR", - "FCPC", - "FCPT", - "FCIR", - "FCIC", - "FCIT", - "FCIP", - "FCAD", - "FSPR", - "FSPT", - "FSIR", - "FSIT", - "FSIP", - "PSSPR", - "PSSSO", - "PSSSW", - "PSSSG", - "PSSSC", - "FNPR", - "FNPT", - "FNIR", - "FNIT", - "FNIP", - "FTPRSUR", - "FTPTSUR", - "FTIRSUR", - "FTITSUR", - "FTIPTSUR", - "FTADSUR", - "FTPRALK", - "FTPTALK", - "FTIRALK", - "FTITALK" - ], - "comment":"Tracer keywords where the 2nd letter is a 'T' should be compounded with the tracer name", - "deck_name_regex" : "FU.+|FTPR.+|FTPT.+|FTPC.+|FTIR.+|FTIT.+|FTIC.+|FTIPT.+|FTIPF.+|FTIPS|FTIP[1-9][0-9]*.+|FTPR.+|FTPT.+|FTPC.+|FTIR.+|FTIT.+|FTIC.+|FTADS.+|FTDCY.+|FTIRF.+|FTIRS.+|FTPRF.+|FTPRS.+|FTITF.+|FTITS.+|FTPTF.+|FTPTS.+|FTICF.+|FTICS.+|FTPCF.+|FTPCS.+" -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FILLEPS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FILLEPS deleted file mode 100644 index 63ee86c3f5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FILLEPS +++ /dev/null @@ -1 +0,0 @@ -{"name" : "FILLEPS" , "sections" : ["PROPS"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FIPNUM b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FIPNUM deleted file mode 100644 index cc9582cbaa..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FIPNUM +++ /dev/null @@ -1 +0,0 @@ -{"name" : "FIPNUM" , "sections" : ["REGIONS"], "data" : {"value_type" : "INT"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FLUXNUM b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FLUXNUM deleted file mode 100644 index 8bedaa6ef6..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FLUXNUM +++ /dev/null @@ -1 +0,0 @@ -{"name" : "FLUXNUM" , "sections" : ["GRID"], "data" : {"value_type" : "INT"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FMTIN b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FMTIN deleted file mode 100644 index 9215dab6e3..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FMTIN +++ /dev/null @@ -1,2 +0,0 @@ -{"name" : "FMTIN", "sections" : ["RUNSPEC"]} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FMTOUT b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FMTOUT deleted file mode 100644 index 30a649622d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FMTOUT +++ /dev/null @@ -1,2 +0,0 @@ -{"name" : "FMTOUT", "sections" : ["RUNSPEC"]} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FULLIMP b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FULLIMP deleted file mode 100644 index 7ca7016692..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/F/FULLIMP +++ /dev/null @@ -1 +0,0 @@ -{"name" : "FULLIMP", "sections" : ["RUNSPEC"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GAS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GAS deleted file mode 100644 index a4b59ca765..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GAS +++ /dev/null @@ -1 +0,0 @@ -{"name" : "GAS", "sections" : ["RUNSPEC"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GCONINJE b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GCONINJE deleted file mode 100644 index 535a70db40..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GCONINJE +++ /dev/null @@ -1,15 +0,0 @@ -{"name" : "GCONINJE" , "sections" : ["SCHEDULE"], "items" : [ - {"name" : "GROUP" , "value_type" : "STRING" }, - {"name" : "PHASE" , "value_type" : "STRING"}, - {"name" : "CONTROL_MODE" , "value_type" : "STRING" , "default" : "NONE"}, - {"name" : "SURFACE_TARGET" , "value_type" : "DOUBLE" , "default" : 0 , "dimension" : "ContextDependent"}, - {"name" : "RESV_TARGET" , "value_type" : "DOUBLE" , "default" : 0 , "dimension" : "ReservoirVolume/Time"}, - {"name" : "REINJ_TARGET" , "value_type" : "DOUBLE" , "default" : 0, "dimension":"1"}, - {"name" : "VOIDAGE_TARGET" , "value_type" : "DOUBLE" , "default" : 0, "dimension":"1"}, - {"name" : "FREE" , "value_type" : "STRING" , "default" : "YES"}, - {"name" : "GUIDE_FRACTION" , "value_type" : "DOUBLE" , "default" : 0, "dimension":"1"}, - {"name" : "GUIDE_DEF" , "value_type" : "STRING"}, - {"name" : "REINJECT_GROUP" , "value_type" : "STRING"}, - {"name" : "VOIDAGE_GROUP" , "value_type" : "STRING"}, - {"name" : "WETGAS_TARGET", "value_type" : "DOUBLE" , "dimension" : "GasSurfaceVolume/Time"} -]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GCONPROD b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GCONPROD deleted file mode 100644 index 2b6b86ef59..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GCONPROD +++ /dev/null @@ -1,16 +0,0 @@ -{"name" : "GCONPROD" , "sections" : ["SCHEDULE"], "items" : [ - {"name" : "GROUP" , "value_type" : "STRING" }, - {"name" : "CONTROL_MODE" , "value_type" : "STRING" , "default" : "NONE"}, - {"name" : "OIL_TARGET" , "value_type" : "DOUBLE" , "dimension" : "LiquidSurfaceVolume/Time", "default" : -999e100}, - {"name" : "WATER_TARGET" , "value_type" : "DOUBLE" , "dimension" : "LiquidSurfaceVolume/Time", "default" : -999e100}, - {"name" : "GAS_TARGET" , "value_type" : "DOUBLE" , "dimension" : "GasSurfaceVolume/Time", "default" : -999e100}, - {"name" : "LIQUID_TARGET" , "value_type" : "DOUBLE" , "dimension" : "LiquidSurfaceVolume/Time", "default" : -999e100}, - {"name" : "EXCEED_PROC" , "value_type" : "STRING" , "default" : "NONE"}, - {"name" : "RESPOND_TO_PARENT" , "value_type" : "STRING" , "default" : "YES"}, - {"name" : "GUIDE_RATE" , "value_type" : "DOUBLE"}, - {"name" : "GUIDE_RATE_DEF" , "value_type" : "STRING"}, - {"name" : "WATER_EXCEED_PROCEDURE" , "value_type" : "STRING"}, - {"name" : "GAS_EXCEED_PROCEDURE" , "value_type" : "STRING"}, - {"name" : "LIQUID_EXCEED_PROCEDURE" , "value_type" : "STRING"}, - {"name" : "RESERVOIR_FLUID_TARGET" , "value_type" : "DOUBLE", "dimension" : "ReservoirVolume/Time", "default" : -999e100}, - {"name" : "RESERVOIR_VOLUME_BALANCE" , "value_type" : "DOUBLE", "dimension" : "1"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GDORIENT b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GDORIENT deleted file mode 100644 index bc1f5abded..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GDORIENT +++ /dev/null @@ -1,6 +0,0 @@ -{"name" : "GDORIENT" , "sections" : ["GRID"] , "size" : 1 , "items" : [ - {"name" : "I" , "value_type" : "STRING" , "default" : "INC"}, - {"name" : "J" , "value_type" : "STRING" , "default" : "INC"}, - {"name" : "K" , "value_type" : "STRING" , "default" : "INC"}, - {"name" : "Z" , "value_type" : "STRING" , "default" : "DOWN"}, - {"name" : "HAND" , "value_type" : "STRING" , "default" : "RIGHT"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GECON b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GECON deleted file mode 100644 index 87cfaa4c19..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GECON +++ /dev/null @@ -1,11 +0,0 @@ -{"name" : "GECON" , "sections" : ["SCHEDULE"], "items" : [ - {"name" : "GROUP" , "value_type" : "STRING"}, - {"name" : "MIN_OIL_RATE" , "value_type" : "DOUBLE" , "default" : 0.0}, - {"name" : "MIN_GAS_RATE" , "value_type" : "DOUBLE" , "default" : 0.0}, - {"name" : "MAX_WCT" , "value_type" : "DOUBLE" , "default" : 0.0}, - {"name" : "MAX_GOR" , "value_type" : "DOUBLE" , "default" : 0.0}, - {"name" : "MAX_WATER_GAS_RATIO" , "value_type" : "DOUBLE" , "default" : 0.0}, - {"name" : "WORKOVER" , "value_type" : "STRING" , "default" : "NONE"}, - {"name" : "END_RUN" , "value_type" : "STRING" , "default" : "NO"}, - {"name" : "MAX_OPEN_WELLS" , "value_type" : "INT" , "default" : 0} -]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GEFAC b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GEFAC deleted file mode 100644 index bd4ecf0d7f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GEFAC +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name" : "GEFAC", - "sections" : ["SCHEDULE"], - "items" : [ - {"name" : "GROUP", "value_type" : "STRING" }, - {"name" : "EFFICIENCY_FACTOR", "value_type" : "DOUBLE", "default" : 1}, - {"name" : "TRANSFER_EXT_NET", "value_type" : "STRING", "default" : "YES"} -]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GRAVITY b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GRAVITY deleted file mode 100644 index 7fef5d613c..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GRAVITY +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "GRAVITY" , "sections" : ["PROPS"] , "size" : {"keyword":"TABDIMS" , "item":"NTPVT"}, - "items" : [ - {"name" : "API_GRAVITY" , "value_type" : "DOUBLE" , "dimension" : "1" , "comment" : "Dimension should be API"}, - {"name" : "WATER_SP_GRAVITY" , "value_type" : "DOUBLE" , "default" : 1.0}, - {"name" : "GAS_SP_GRAVITY" , "value_type" : "DOUBLE" , "default" : 0.7773}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GRID b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GRID deleted file mode 100644 index baf607510c..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GRID +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name" : "GRID", - "sections" : [] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GRIDFILE b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GRIDFILE deleted file mode 100644 index a83a58104d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GRIDFILE +++ /dev/null @@ -1,3 +0,0 @@ -{"name" : "GRIDFILE" , "sections" : ["GRID"], "size" : 1 , "items" : [ - {"name" : "GRID" , "value_type" : "INT" , "default" : 0}, - {"name" : "EGRID" , "value_type" : "INT" , "default" : 1}]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GRIDOPTS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GRIDOPTS deleted file mode 100644 index d3ec35da61..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GRIDOPTS +++ /dev/null @@ -1,4 +0,0 @@ -{"name" : "GRIDOPTS" , "sections" : ["RUNSPEC"], "size" : 1 , "items" : [ - {"name" : "TRANMULT" , "value_type" : "STRING" , "default" : "NO"}, - {"name" : "NRMULT" , "value_type" : "INT" , "default" : 0}, - {"name" : "NRPINC" , "value_type" : "INT" , "default" : 0}]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GRIDUNIT b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GRIDUNIT deleted file mode 100644 index f4466cb57c..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GRIDUNIT +++ /dev/null @@ -1,3 +0,0 @@ -{"name" : "GRIDUNIT" , "sections" : ["GRID"], "size" : 1, "items" : - [{"name" : "LengthUnit" , "value_type" : "STRING" , "default" : "METRES"}, - {"name" : "MAP" , "value_type" : "STRING"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GROUP_PROBE b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GROUP_PROBE deleted file mode 100644 index 7fc896f5d5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GROUP_PROBE +++ /dev/null @@ -1,268 +0,0 @@ -{ - "name" : "GROUP_PROBE", - "sections" : ["SUMMARY"], - - "comment":"E100 only", - "deck_names" : [ - "GOPR", - "GOPRH", - "GOPRT", - "GOPRL", - "GOPRF", - "GOPRS", - "GOPT", - "GOPTH", - "GOPTF", - "GOPTS", - "GOIR", - "GOIRH", - "GOIRT", - "GOIRL", - "GOIT", - "GOITH", - "GOPP", - "GOPP2", - "GOPI", - "GOPI2", - "GOPGR", - "GOIGR", - "GWPR", - "GWPRH", - "GWPRT", - "GWPRL", - "GWPT", - "GWPTH", - "GWIR", - "GWIRH", - "GWIRT", - "GWIRL", - "GWIT", - "GWITH", - "GWPP", - "GWPP2", - "GWPI", - "GWPI2", - "GWPGR", - "GWIGR", - "GWPIR", - "GGPR", - "GGPRH", - "GGPRT", - "GGPRL", - "GGPRF", - "GGPRS", - "GGPT", - "GGPTH", - "GGPTF", - "GGPTS", - "GGIR", - "GGIRH", - "GGIRT", - "GGIRL", - "GGIT", - "GGITH", - "GGPP", - "GGPP2", - "GGPPS", - "GGPPS2", - "GGPPF", - "GGPPF2", - "GGPI", - "GGPI2", - "GGPGR", - "GGIGR", - "GSGR", - "GGSR", - "GSGT", - "GGST", - "GSMF", - "GFGR", - "GFGT", - "GFMF", - "GGCR", - "GGCT", - "GGIMR", - "GGIMT", - "GGLIR", - "GGQ", - "GLPR", - "GLPRH", - "GLPRT", - "GLPRL", - "GLPT", - "GLPTH", - "GJPR", - "GJPRH", - "GJPRT", - "GJPRL", - "GJPT", - "GJPTH", - "GVPR", - "GVPRT", - "GVPRL", - "GVPT", - "GVPGR", - "GVIR", - "GVIRT", - "GVIRL", - "GVIT", - "GWCT", - "GWCTH", - "GGOR", - "GGORH", - "GOGR", - "GOGRH", - "GWGR", - "GWGRH", - "GGLR", - "GGLRH", - "GMCTP", - "GMCTW", - "GMCTG", - "GMWPT", - "GMWPR", - "GMWPA", - "GMWPU", - "GMWPG", - "GMWPO", - "GMWPS", - "GMWPV", - "GMWPP", - "GMWPL", - "GMWIT", - "GMWIN", - "GMWIA", - "GMWIU", - "GMWIG", - "GMWIS", - "GMWIV", - "GMWIP", - "GMWDR", - "GMWDT", - "GMWWO", - "GMWWT", - "GEPR", - "GEPT", - "GEFF", - "GGSPR", - "GGSRL", - "GGSRU", - "GGSSP", - "GGSTP", - "GOSPR", - "GOSRL", - "GOSRU", - "GOSSP", - "GOSTP", - "GWSPR", - "GWSRL", - "GWSRU", - "GWSSP", - "GWSTP", - "GAPI", - "GSPR", - "GSPT", - "GSIR", - "GSIT", - "GSPC", - "GSIC", - "GTPRANI", - "GTPTANI", - "GTIRANI", - "GTITANI", - "GTPRCAT", - "GTPTCAT", - "GTIRCAT", - "GTITCAT", - "GTPCHEA", - "GTICHEA", - "GTPRHEA", - "GTPTHEA", - "GTIRHEA", - "GTITHEA", - "GMPR", - "GMPT", - "GMIR", - "GMIT", - "GTPRFOA", - "GTPTFOA", - "GTIRFOA", - "GTITFOA", - "GSGR", - "GGSR", - "GSGT", - "GGST", - "GGDC", - "GGDCQ", - "GMCPL", - "GPR", - "GPRDC", - "GGCR", - "GGCT", - "GGIMR", - "GGIMT", - "GPRFP", - "GGPRNBFP", - "GGLIR", - "GGCV", - "GGQ", - "GEPR", - "GEPT", - "GESR", - "GEST", - "GEDC", - "GEDCQ", - "GPR", - "GPRG", - "GPRW", - "GPRB", - "GPRBG", - "GPRBW", - "GALQ", - "GOPRNB", - "GWPRNB", - "GGPRNB", - "GLPRNB", - "GWIRNB", - "GGIRNB", - "GCPR", - "GCPC", - "GCPT", - "GCIR", - "GCIC", - "GCIT", - "GSPR", - "GSPT", - "GSIR", - "GSIT", - "GOPRL", - "GOIRL", - "GWPRL", - "GWIRL", - "GGPRL", - "GGIRL", - "GLPRL", - "GVPRL", - "GVIRL", - "GNPR", - "GNPT", - "GNIR", - "GNIT", - "GTPRSUR", - "GTPTSUR", - "GTIRSUR", - "GTITSUR", - "GTPRALK", - "GTPTALK", - "GTIRALK", - "GTITALK" - ], - - "comment":"Some keywords need to be suffixed by a tracer name...", - "deck_name_regex" : "GU.+|GTPR.+|GTPT.+|GTPC.+|GTIR.+|GTIT.+|GTIC.+|GTIRF.+|GTIRS.+|GTPRF.+|GTPRS.+|GTITF.+|GTITS.+|GTPTF.+|GTPTS.+|GTICF.+|GTICS.+|GTPCF.+|GTPCS.+", - - "size" : 1, - "items" : [ - {"name" : "GROUPS" , "size_type" : "ALL" , "value_type" : "STRING"} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GRUPNET b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GRUPNET deleted file mode 100644 index abb3809d92..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GRUPNET +++ /dev/null @@ -1,9 +0,0 @@ -{"name" : "GRUPNET" , "sections" : ["SPECIAL", "SCHEDULE"], "items" : [ - {"name" : "NAME" , "value_type" : "STRING"}, - {"name" : "TERMINAL_PRESSURE" , "value_type" : "DOUBLE"}, - {"name" : "VFP_TABLE" , "value_type" : "INT" , "default" : 0}, - {"name" : "ALQ" , "value_type" : "DOUBLE" , "default" : 0}, - {"name" : "SUB_SEA_MANIFOLD" , "value_type" : "STRING" , "default" : "NO"}, - {"name" : "LIFT_GAS_FLOW_THROUGH" , "value_type" : "STRING" , "default" : "NO"}, - {"name" : "ALQ_SURFACE_EQV" , "value_type" : "STRING" , "default" : "NONE"}]} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GRUPTREE b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GRUPTREE deleted file mode 100644 index 5ede4ef13d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/G/GRUPTREE +++ /dev/null @@ -1,4 +0,0 @@ -{"name" : "GRUPTREE" , "sections" : ["SCHEDULE"], "items" : [ - {"name" : "CHILD_GROUP" , "value_type" : "STRING"}, - {"name" : "PARENT_GROUP" , "value_type" : "STRING", "default" : "FIELD"} -]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/IMBNUM b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/IMBNUM deleted file mode 100644 index 01a4aedb61..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/IMBNUM +++ /dev/null @@ -1 +0,0 @@ -{"name" : "IMBNUM", "sections" : ["REGIONS"], "data" : {"value_type" : "INT" }} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/IMKRVD b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/IMKRVD deleted file mode 100644 index f71d7dd5b2..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/IMKRVD +++ /dev/null @@ -1,6 +0,0 @@ -{"name" : "IMKRVD" , "size" : {"keyword" : "ENDSCALE" , "item" : "NUM_TABLES"}, - "sections" : [ "PROPS" ], - "items" : [ - {"name":"DATA", "value_type":"DOUBLE", "size_type" : "ALL" , "dimension" : ["Length","1","1","1","1","1","1","1"]} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/IMPES b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/IMPES deleted file mode 100644 index dfecd094f4..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/IMPES +++ /dev/null @@ -1 +0,0 @@ -{"name" : "IMPES", "sections" : ["RUNSPEC"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/IMPTVD b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/IMPTVD deleted file mode 100644 index b40952eb8a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/IMPTVD +++ /dev/null @@ -1,6 +0,0 @@ -{"name" : "IMPTVD" , "size" : {"keyword" : "ENDSCALE" , "item" : "NUM_TABLES"}, - "sections" : [ "PROPS" ], - "items" : [ - {"name":"DATA", "value_type":"DOUBLE", "size_type" : "ALL" , "dimension" : ["Length","1","1","1","1","1","1","1","1"]} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/INCLUDE b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/INCLUDE deleted file mode 100644 index f13c7a8484..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/INCLUDE +++ /dev/null @@ -1 +0,0 @@ -{"name" : "INCLUDE" , "sections" : ["RUNSPEC", "GRID", "EDIT", "PROPS", "REGIONS", "SOLUTION", "SUMMARY", "SCHEDULE"], "size" : 1, "items" : [{"name" : "IncludeFile" , "value_type" : "STRING"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/INIT b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/INIT deleted file mode 100644 index bc961a1f22..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/INIT +++ /dev/null @@ -1 +0,0 @@ -{"name" : "INIT", "sections" : ["GRID"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/IPCG b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/IPCG deleted file mode 100644 index 2a4ae98e36..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/IPCG +++ /dev/null @@ -1 +0,0 @@ -{"name" : "IPCG" , "sections" : ["PROPS"], "data" : {"value_type" : "DOUBLE", "dimension" : "Pressure"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/IPCW b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/IPCW deleted file mode 100644 index 9156888b6c..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/IPCW +++ /dev/null @@ -1 +0,0 @@ -{"name" : "IPCW" , "sections" : ["PROPS"], "data" : {"value_type" : "DOUBLE", "dimension" : "Pressure"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISGCR b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISGCR deleted file mode 100644 index a07daa9063..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISGCR +++ /dev/null @@ -1 +0,0 @@ -{"name" : "ISGCR" , "sections" : ["PROPS"], "data" : {"value_type" : "DOUBLE", "dimension" : "1"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISGL b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISGL deleted file mode 100644 index 516d981cc5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISGL +++ /dev/null @@ -1 +0,0 @@ -{"name" : "ISGL" , "sections" : ["PROPS"], "data" : {"value_type" : "DOUBLE", "dimension" : "1"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISGU b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISGU deleted file mode 100644 index 7a696fac44..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISGU +++ /dev/null @@ -1 +0,0 @@ -{"name" : "ISGU" , "sections" : ["PROPS"], "data" : {"value_type" : "DOUBLE", "dimension" : "1"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISOGCR b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISOGCR deleted file mode 100644 index 766476b757..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISOGCR +++ /dev/null @@ -1 +0,0 @@ -{"name" : "ISOGCR" , "sections" : ["PROPS"], "data" : {"value_type" : "DOUBLE", "dimension" : "1"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISOWCR b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISOWCR deleted file mode 100644 index 4a32f32467..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISOWCR +++ /dev/null @@ -1 +0,0 @@ -{"name" : "ISOWCR" , "sections" : ["PROPS"], "data" : {"value_type" : "DOUBLE", "dimension" : "1"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISWCR b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISWCR deleted file mode 100644 index c4f1d51f1b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISWCR +++ /dev/null @@ -1 +0,0 @@ -{"name" : "ISWCR" , "sections" : ["PROPS"], "data" : {"value_type" : "DOUBLE", "dimension" : "1"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISWL b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISWL deleted file mode 100644 index c93acd73c5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISWL +++ /dev/null @@ -1 +0,0 @@ -{"name" : "ISWL" , "sections" : ["PROPS"], "data" : {"value_type" : "DOUBLE", "dimension" : "1"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISWU b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISWU deleted file mode 100644 index 08b66ed78b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/I/ISWU +++ /dev/null @@ -1 +0,0 @@ -{"name" : "ISWU" , "sections" : ["PROPS"], "data" : {"value_type" : "DOUBLE", "dimension" : "1"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/J/JFUNC b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/J/JFUNC deleted file mode 100644 index c0222b5571..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/J/JFUNC +++ /dev/null @@ -1,8 +0,0 @@ -{"name" : "JFUNC" , "sections" : ["GRID"], "size" : 1 , "items" : [ - {"name" : "FLAG" , "value_type" : "STRING", "default": "BOTH"}, - {"name" : "OW_SURFACE_TENSION" , "value_type" : "DOUBLE", "dimension":"SurfaceTension", "default": -1.0}, - {"name" : "GO_SURFACE_TENSION" , "value_type" : "DOUBLE", "dimension":"SurfaceTension", "default": -1.0}, - {"name" : "ALPHA_FACTOR" , "value_type" : "DOUBLE", "default": 0.5}, - {"name" : "BETA_FACTOR" , "value_type" : "DOUBLE", "default": 0.5}, - {"name" : "DIRECTION" , "value_type" : "STRING", "default": "XY" } -]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MAPAXES b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MAPAXES deleted file mode 100644 index 66d0f52bed..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MAPAXES +++ /dev/null @@ -1,7 +0,0 @@ -{"name" : "MAPAXES" , "sections" : ["GRID"], "size" : 1 , "items" : [ - {"name" : "X1" , "value_type" : "DOUBLE", "dimension" : "Length" }, - {"name" : "Y1" , "value_type" : "DOUBLE", "dimension" : "Length" }, - {"name" : "X2" , "value_type" : "DOUBLE", "dimension" : "Length" }, - {"name" : "Y2" , "value_type" : "DOUBLE", "dimension" : "Length" }, - {"name" : "X3" , "value_type" : "DOUBLE", "dimension" : "Length" }, - {"name" : "Y3" , "value_type" : "DOUBLE", "dimension" : "Length" }]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MAPUNITS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MAPUNITS deleted file mode 100644 index d14bdc2f68..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MAPUNITS +++ /dev/null @@ -1,3 +0,0 @@ -{"name" : "MAPUNITS" , "sections" : ["GRID"], "size" : 1 , "items" : [ - {"name" : "UNIT" , "value_type" : "STRING" , "default" : "METRES"}]} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MAXVALUE b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MAXVALUE deleted file mode 100644 index e5dabc6de3..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MAXVALUE +++ /dev/null @@ -1,9 +0,0 @@ -{"name" : "MAXVALUE", "sections" : ["GRID", "EDIT", "PROPS"], "items" : [ - {"name" : "field" , "value_type" : "STRING"}, - {"name" : "value" , "value_type" : "DOUBLE"}, - {"name" : "I1" , "value_type" : "INT"}, - {"name" : "I2" , "value_type" : "INT"}, - {"name" : "J1" , "value_type" : "INT"}, - {"name" : "J2" , "value_type" : "INT"}, - {"name" : "K1" , "value_type" : "INT"}, - {"name" : "K2" , "value_type" : "INT"}]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MEMORY b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MEMORY deleted file mode 100644 index 4b241023e7..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MEMORY +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "MEMORY" , "sections" : ["RUNSPEC"], -"size" : 1 , -"items" : [ - {"name" : "UNUSED" , "value_type" : "INT" }, - {"name" : "THOUSANDS_CHAR8" , "value_type" : "INT" }]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MESSAGES b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MESSAGES deleted file mode 100644 index 5488c6beef..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MESSAGES +++ /dev/null @@ -1,13 +0,0 @@ -{"name" : "MESSAGES" , "sections" : ["RUNSPEC", "GRID", "EDIT", "PROPS", "REGIONS", "SOLUTION", "SUMMARY", "SCHEDULE"], "size" : 1 , "items" : [ - {"name" : "MESSAGE_PRINT_LIMIT" , "value_type" : "INT" , "default" : 1000000}, - {"name" : "COMMENT_PRINT_LIMIT" , "value_type" : "INT" , "default" : 1000000}, - {"name" : "WARNING_PRINT_LIMIT" , "value_type" : "INT" , "default" : 10000}, - {"name" : "PROBLEM_PRINT_LIMIT" , "value_type" : "INT" , "default" : 100}, - {"name" : "ERROR_PRINT_LIMIT" , "value_type" : "INT" , "default" : 100}, - {"name" : "BUG_PRINT_LIMIT" , "value_type" : "INT" , "default" : 100}, - {"name" : "MESSAGE_STOP_LIMIT" , "value_type" : "INT" , "default" : 1000000}, - {"name" : "COMMENT_STOP_LIMIT" , "value_type" : "INT" , "default" : 1000000}, - {"name" : "WARNING_STOP_LIMIT" , "value_type" : "INT" , "default" : 10000}, - {"name" : "PROBLEM_STOP_LIMIT" , "value_type" : "INT" , "default" : 100}, - {"name" : "ERROR_STOP_LIMIT" , "value_type" : "INT" , "default" : 10}, - {"name" : "BUG_STOP_LIMIT" , "value_type" : "INT" , "default" : 1}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/METRIC b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/METRIC deleted file mode 100644 index 1e94b5e0ac..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/METRIC +++ /dev/null @@ -1 +0,0 @@ -{"name" : "METRIC", "sections" : ["RUNSPEC"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MINPV b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MINPV deleted file mode 100644 index 12cbd4e283..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MINPV +++ /dev/null @@ -1 +0,0 @@ -{"name" : "MINPV" , "sections" : ["GRID"], "size" : 1 , "items" : [{"name" : "VALUE" , "value_type" : "DOUBLE" , "default" : 0.000001, "dimension" : "ReservoirVolume"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MINVALUE b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MINVALUE deleted file mode 100644 index 6f262766f8..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MINVALUE +++ /dev/null @@ -1,9 +0,0 @@ -{"name" : "MINVALUE", "sections" : ["GRID", "EDIT", "PROPS"], "items" : [ - {"name" : "field" , "value_type" : "STRING"}, - {"name" : "value" , "value_type" : "DOUBLE"}, - {"name" : "I1" , "value_type" : "INT"}, - {"name" : "I2" , "value_type" : "INT"}, - {"name" : "J1" , "value_type" : "INT"}, - {"name" : "J2" , "value_type" : "INT"}, - {"name" : "K1" , "value_type" : "INT"}, - {"name" : "K2" , "value_type" : "INT"}]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MISC b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MISC deleted file mode 100644 index 91de67123c..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MISC +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "MISC" , "sections" : ["PROPS"], "size" : {"keyword" : "MISCIBLE" , "item" : "NTMISC"}, - "items" : [ - {"name":"DATA", "value_type":"DOUBLE", "size_type" : "ALL" , "dimension" : ["1","1"]} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MISCIBLE b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MISCIBLE deleted file mode 100644 index 30f546e9f6..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MISCIBLE +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "MISCIBLE", "sections" : ["RUNSPEC"], "size" : 1, "items" : [ - {"name" : "NTMISC" , "value_type" : "INT" , "default" : 1}, - {"name" : "NSMISC" , "value_type" : "INT" , "default" : 20}, - {"name" : "TWOPOINT" , "value_type" : "STRING" , "default" : "NONE"} - ]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MISCNUM b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MISCNUM deleted file mode 100644 index 3908f82f1e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MISCNUM +++ /dev/null @@ -1 +0,0 @@ -{"name" : "MISCNUM", "sections" : ["REGIONS"], "data" : {"value_type" : "INT" }} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MONITOR b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MONITOR deleted file mode 100644 index 3c6e8ba7dd..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MONITOR +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name" : "MONITOR", - "sections": [ - "RUNSPEC", - "SUMMARY" - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MSFN b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MSFN deleted file mode 100644 index b9d9de57e3..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MSFN +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "MSFN" , "sections" : ["PROPS"], "size" : {"keyword" : "TABDIMS" , "item" : "NTSFUN"}, - "items" : [ - {"name":"table", "value_type":"DOUBLE", "size_type" : "ALL", "dimension" : ["1","1","1"]} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MSGFILE b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MSGFILE deleted file mode 100644 index 1bd73cf40c..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MSGFILE +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name" : "MSGFILE", - "sections": [ - "RUNSPEC" - ], - "size" : 1, - "items" : [ - {"name" : "ENABLE_FLAG" , "value_type" : "INT" } -]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULTFLT b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULTFLT deleted file mode 100644 index 03e1c9020f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULTFLT +++ /dev/null @@ -1,3 +0,0 @@ -{"name" : "MULTFLT", "sections" : ["GRID", "EDIT", "SCHEDULE"], "items" : [ - {"name" : "fault" , "value_type" : "STRING"}, - {"name" : "factor" , "value_type" : "DOUBLE"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULTIPLY b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULTIPLY deleted file mode 100644 index 0ace771a9c..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULTIPLY +++ /dev/null @@ -1,9 +0,0 @@ -{"name" : "MULTIPLY", "sections" : ["GRID", "EDIT", "PROPS", "REGIONS", "SOLUTION"], "items" : [ - {"name" : "field" , "value_type" : "STRING"}, - {"name" : "factor" , "value_type" : "DOUBLE"}, - {"name" : "I1" , "value_type" : "INT" }, - {"name" : "I2" , "value_type" : "INT" }, - {"name" : "J1" , "value_type" : "INT" }, - {"name" : "J2" , "value_type" : "INT" }, - {"name" : "K1" , "value_type" : "INT" }, - {"name" : "K2" , "value_type" : "INT" }]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULTIREG b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULTIREG deleted file mode 100644 index c825ec0d6f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULTIREG +++ /dev/null @@ -1,6 +0,0 @@ -{"name" : "MULTIREG" , "sections" : ["GRID","EDIT","PROPS","REGIONS","SOLUTION"], - "items" : - [{"name" : "ARRAY" , "value_type" : "STRING" , "description" : "The 3D array we will update"}, - {"name" : "FACTOR" , "value_type" : "DOUBLE" , "description" : "The value we will multiply with" , "default" : 0} , - {"name" : "REGION_NUMBER" , "value_type" : "INT" , "description" : "The region number we are interested in"} , - {"name" : "REGION_NAME" , "value_type" : "STRING" , "description" : "The name of the region we are interested in" , "default" : "M"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULTNUM b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULTNUM deleted file mode 100644 index 2e5fccfc0e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULTNUM +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name" : "MULTNUM", - "sections" : [ "GRID" ], - "data" : {"value_type" : "INT" } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULTPV b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULTPV deleted file mode 100644 index c917261d5c..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULTPV +++ /dev/null @@ -1 +0,0 @@ -{"name" : "MULTPV" , "sections" : ["GRID" , "EDIT"] , "data" : {"value_type" : "DOUBLE" , "dimension":"1"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULTREGP b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULTREGP deleted file mode 100644 index 020f4386f6..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULTREGP +++ /dev/null @@ -1,8 +0,0 @@ -{"name": "MULTREGP", - "sections": ["GRID", "EDIT"], - "items": [ - {"name": "REGION", "value_type": "INT"}, - {"name": "MULTIPLIER", "value_type": "DOUBLE"}, - {"name": "REGION_TYPE", "value_type": "STRING", "default": "M"} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULTREGT b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULTREGT deleted file mode 100644 index 5b8e32d0f5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULTREGT +++ /dev/null @@ -1,9 +0,0 @@ -{"name" : "MULTREGT" , "sections" : ["GRID", "EDIT", "SCHEDULE"], "items" : [ - {"name" : "SRC_REGION" , "value_type" : "INT"}, - {"name" : "TARGET_REGION" , "value_type" : "INT" }, - {"name" : "TRAN_MULT" , "value_type" : "DOUBLE" }, - {"name" : "DIRECTIONS" , "value_type" : "STRING" , "default" : "XYZ"}, - {"name" : "NNC_MULT" , "value_type" : "STRING" , "default" : "ALL"}, - {"name" : "REGION_DEF" , "value_type" : "STRING" , "default" : "M"}]} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULT_XYZ b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULT_XYZ deleted file mode 100644 index 458c699315..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/M/MULT_XYZ +++ /dev/null @@ -1,16 +0,0 @@ -{"name" : "MULT_XYZ" , - "sections" : ["GRID"], - - "deck_names" : [ - "MULTX", - "MULTX-", - "MULTY", - "MULTY-", - "MULTZ", - "MULTZ-" - ], - "data" : { - "value_type" : "DOUBLE", - "dimension":"1" - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NETBALAN b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NETBALAN deleted file mode 100644 index e1adbb5ca4..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NETBALAN +++ /dev/null @@ -1,10 +0,0 @@ -{"name" : "NETBALAN" , "sections" : ["SPECIAL", "SCHEDULE"], "size" : 1 , "items" : [ - {"name" : "TIME_INTERVAL" , "value_type" : "DOUBLE" , "default" : 0.0}, - {"name" : "PRESSURE_CONVERGENCE_LIMT" , "value_type" : "DOUBLE" , "default" : 0.00001 }, - {"name" : "MAX_ITER" , "value_type" : "INT" , "default" : 10}, - {"name" : "THP_CONVERGENCE_LIMIT" , "value_type" : "DOUBLE" , "default" : 0.01 }, - {"name" : "MAX_ITER_THP" , "value_type" : "INT" , "default" : 10}, - {"name" : "TARGET_BALANCE_ERROR" , "value_type" : "DOUBLE" , "default" : 1e20}, - {"name" : "MAX_BALANCE_ERROR" , "value_type" : "DOUBLE" , "default" : 1e20}, - {"name" : "MIN_TIME_STEP" , "value_type" : "DOUBLE"} -]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NEWTRAN b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NEWTRAN deleted file mode 100644 index fccfdb59dc..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NEWTRAN +++ /dev/null @@ -1 +0,0 @@ -{"name" : "NEWTRAN", "sections" : ["GRID"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NEXTSTEP b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NEXTSTEP deleted file mode 100644 index 14a4a7972b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NEXTSTEP +++ /dev/null @@ -1,4 +0,0 @@ -{"name":"NEXTSTEP", "sections" : ["SCHEDULE"], "size" : 1 , -"items" : [ - {"name" : "MAX_STEP" , "value_type" : "DOUBLE" , "dimension" : "Time"}, - {"name" : "APPLY_TO_ALL" , "value_type" : "STRING" , "default" : "NO"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NNC b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NNC deleted file mode 100644 index afd28a4c72..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NNC +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "NNC", - "sections": ["GRID"], - "items": [ - {"name": "I1", "value_type": "INT"}, - {"name": "J1", "value_type": "INT"}, - {"name": "K1", "value_type": "INT"}, - {"name": "I2", "value_type": "INT"}, - {"name": "J2", "value_type": "INT"}, - {"name": "K2", "value_type": "INT"}, - {"name": "TRAN", - "value_type": "DOUBLE", - "dimension": "Transmissibility", - "default": 0.0 }, - {"name": "SIM_DEPENDENT1", - "value_type": "DOUBLE", - "dimension": "ContextDependent", - "default": 0.0 }, - {"name": "SIM_DEPENDENT2", - "comment": "This item is deprecated", - "value_type": "DOUBLE", - "dimension": "ContextDependent", - "default": 0.0 }, - {"name": "PRESSURE_TABLE1", - "value_type": "INT", - "default": 0 }, - {"name": "PRESSURE_TABLE2", - "value_type": "INT", - "default": 0 }, - {"name": "VE_FACE1", - "value_type": "STRING", - "default": "" }, - {"name": "VE_FACE2", - "value_type": "STRING", - "default": "" }, - {"name": "DIFFUSIVITY", - "value_type": "DOUBLE", - "default": 0.0 }, - {"name": "SIM_DEPENDENT3", - "value_type": "DOUBLE", - "dimension": "ContextDependent", - "default": 0.0 }, - {"name": "VDFLOW_AREA", - "value_type": "DOUBLE", - "dimension": "Length*Length", - "default": 0.0 }, - {"name": "VDFLOW_PERM", - "value_type": "DOUBLE", - "dimension": "Permeability", - "default": 0.0 } - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NOCASC b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NOCASC deleted file mode 100644 index 05bc8ad43e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NOCASC +++ /dev/null @@ -1 +0,0 @@ -{"name" : "NOCASC" , "sections" : ["RUNSPEC"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NOECHO b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NOECHO deleted file mode 100644 index 9f8f6c2c97..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NOECHO +++ /dev/null @@ -1 +0,0 @@ -{"name" : "NOECHO", "sections" : ["RUNSPEC", "GRID", "EDIT", "PROPS", "REGIONS", "SOLUTION", "SUMMARY", "SCHEDULE"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NOGGF b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NOGGF deleted file mode 100644 index 05cdc164ce..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NOGGF +++ /dev/null @@ -1 +0,0 @@ -{"name" : "NOGGF", "sections" : ["GRID"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NOINSPEC b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NOINSPEC deleted file mode 100644 index d52f8fec5a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NOINSPEC +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name" : "NOINSPEC", - "sections": [ - "RUNSPEC" - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NOMONITO b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NOMONITO deleted file mode 100644 index fc9d5fa2a5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NOMONITO +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name" : "NOMONITO", - "sections": [ - "RUNSPEC", - "SUMMARY" - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NONNC b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NONNC deleted file mode 100644 index f8ca55458f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NONNC +++ /dev/null @@ -1 +0,0 @@ -{"name" : "NONNC", "sections" : ["RUNSPEC"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NORSSPEC b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NORSSPEC deleted file mode 100644 index a7ba135b24..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NORSSPEC +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name" : "NORSSPEC", - "sections": [ - "RUNSPEC" - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NOSIM b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NOSIM deleted file mode 100644 index b673008e20..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NOSIM +++ /dev/null @@ -1 +0,0 @@ -{"name" : "NOSIM", "sections" : ["RUNSPEC", "SCHEDULE"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NSTACK b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NSTACK deleted file mode 100644 index a96a95f670..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NSTACK +++ /dev/null @@ -1,2 +0,0 @@ -{"name" : "NSTACK" , "sections" : ["RUNSPEC", "SCHEDULE"], "size" : 1 , "items" : [ - {"name" : "LINEAR_SOLVER_SIZE", "value_type" : "INT" , "default" : 10}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NTG b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NTG deleted file mode 100644 index c8d995180f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NTG +++ /dev/null @@ -1 +0,0 @@ -{"name" : "NTG" , "sections" : ["GRID"], "data" : {"value_type" : "DOUBLE", "dimension" : "1"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NUMRES b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NUMRES deleted file mode 100644 index 92f9cea724..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NUMRES +++ /dev/null @@ -1,2 +0,0 @@ -{"name" : "NUMRES" , "sections" : ["RUNSPEC"] , "items" : [ - {"name" : "num" , "value_type" : "INT" , "default" : 1}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NUPCOL b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NUPCOL deleted file mode 100644 index 272eab9619..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/N/NUPCOL +++ /dev/null @@ -1,2 +0,0 @@ -{"name" : "NUPCOL" , "sections" : ["RUNSPEC", "SCHEDULE"], "size" : 1 , "items" : [ - {"name" : "NUM_ITER", "value_type" : "INT" , "default" : 3, "comment": "The default is 2 in Eclipse300"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/O/OIL b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/O/OIL deleted file mode 100644 index da5df6b110..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/O/OIL +++ /dev/null @@ -1 +0,0 @@ -{"name":"OIL", "sections" : ["RUNSPEC"],"size":0} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/O/OILVISCT b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/O/OILVISCT deleted file mode 100644 index 5be7b4c917..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/O/OILVISCT +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "OILVISCT", - "sections": ["PROPS"], - "size" : { - "keyword": "TABDIMS", - "item" : "NTPVT" - }, - "items" : [{ - "name":"DATA", - "value_type": "DOUBLE", - "size_type": "ALL", - - "dimension" : ["Temperature", "Viscosity"] - }] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/O/OLDTRAN b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/O/OLDTRAN deleted file mode 100644 index 4991b93202..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/O/OLDTRAN +++ /dev/null @@ -1 +0,0 @@ -{"name" : "OLDTRAN", "sections" : ["GRID"]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/O/OPERATE b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/O/OPERATE deleted file mode 100644 index 04529e15eb..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/O/OPERATE +++ /dev/null @@ -1,15 +0,0 @@ -{"name" : "OPERATE" , "sections" : ["GRID" , "EDIT" , "PROPS" , "REGIONS" , "SOLUTION"], - "items" : [ - {"name" : "RESULT_ARRAY" , "value_type" : "STRING"}, - {"name" : "I1" , "value_type" : "INT"}, - {"name" : "I2" , "value_type" : "INT"}, - {"name" : "J1" , "value_type" : "INT"}, - {"name" : "J2" , "value_type" : "INT"}, - {"name" : "K1" , "value_type" : "INT"}, - {"name" : "K2" , "value_type" : "INT"}, - {"name" : "OPERATION" , "value_type" : "STRING"}, - {"name" : "ARRAY_ARG" , "value_type" : "STRING"}, - {"name" : "PARAM1" , "value_type" : "DOUBLE"}, - {"name" : "PARAM2" , "value_type" : "DOUBLE"}]} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/O/OPTIONS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/O/OPTIONS deleted file mode 100644 index 0bd1c2ce73..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/O/OPTIONS +++ /dev/null @@ -1,202 +0,0 @@ -{"name" : "OPTIONS" , - "sections" : ["RUNSPEC", "SCHEDULE"], - "size" : 1 , - "items" : [ - {"name" : "ITEM1", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM2", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM3", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM4", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM5", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM6", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM7", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM8", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM9", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM10", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM11", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM12", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM13", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM14", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM15", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM16", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM17", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM18", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM19", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM20", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM21", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM22", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM23", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM24", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM25", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM26", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM27", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM28", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM29", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM30", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM31", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM32", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM33", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM34", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM35", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM36", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM37", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM38", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM39", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM40", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM41", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM42", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM43", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM44", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM45", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM46", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM47", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM48", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM49", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM50", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM51", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM52", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM53", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM54", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM55", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM56", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM57", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM58", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM59", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM60", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM61", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM62", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM63", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM64", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM65", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM66", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM67", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM68", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM69", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM70", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM71", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM72", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM73", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM74", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM75", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM76", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM77", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM78", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM79", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM80", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM81", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM82", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM83", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM84", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM85", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM86", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM87", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM88", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM89", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM90", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM91", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM92", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM93", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM94", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM95", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM96", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM97", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM98", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM99", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM100", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM101", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM102", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM103", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM104", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM105", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM106", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM107", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM108", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM109", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM110", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM111", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM112", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM113", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM114", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM115", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM116", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM117", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM118", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM119", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM120", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM121", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM122", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM123", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM124", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM125", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM126", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM127", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM128", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM129", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM130", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM131", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM132", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM133", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM134", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM135", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM136", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM137", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM138", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM139", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM140", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM141", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM142", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM143", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM144", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM145", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM146", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM147", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM148", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM149", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM150", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM151", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM152", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM153", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM154", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM155", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM156", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM157", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM158", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM159", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM160", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM161", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM162", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM163", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM164", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM165", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM166", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM167", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM168", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM169", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM170", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM171", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM172", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM173", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM174", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM175", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM176", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM177", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM178", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM179", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM180", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM181", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM182", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM183", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM184", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM185", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM186", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM187", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM188", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM189", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM190", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM191", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM192", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM193", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM194", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM195", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM196", "value_type" : "INT" , "default" : 0}, - {"name" : "ITEM197", "value_type" : "INT" , "default" : 0}]} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PARALLEL b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PARALLEL deleted file mode 100644 index 6261ba3096..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PARALLEL +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "PARALLEL" , "sections" : ["RUNSPEC"], -"size" : 1 , -"items" : [ - {"name" : "NDMAIN" , "value_type" : "INT" , "default": 1}, - {"name" : "MACHINE_TYPE" , "value_type" : "STRING" , "default": "DISTRIBUTED"}]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PATHS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PATHS deleted file mode 100644 index df6d798d4a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PATHS +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "PATHS" , "sections" : ["RUNSPEC"], "items" : - [ - {"name" : "PathName" , "value_type" : "STRING"}, - {"name" : "PathValue" , "value_type" : "STRING"} - ]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PBVD b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PBVD deleted file mode 100644 index b722b2a2f1..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PBVD +++ /dev/null @@ -1,7 +0,0 @@ -{"name" : "PBVD" , "sections" : ["SOLUTION"], "size" : {"keyword" : "EQLDIMS" , "item" : "NTEQUL"}, - "items" : [{"name" : "table" , - "value_type" : "DOUBLE" , - "size_type" : "ALL", - "dimension" : ["Length" , "Pressure"]}]} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PCG b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PCG deleted file mode 100644 index 06421bac6d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PCG +++ /dev/null @@ -1 +0,0 @@ -{"name" : "PCG" , "sections" : ["PROPS"], "data" : {"value_type" : "DOUBLE", "dimension" : "Pressure"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PERFORMANCE_PROBE b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PERFORMANCE_PROBE deleted file mode 100644 index 4bc60c4d75..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PERFORMANCE_PROBE +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name" : "PERFORMANCE_PROBE", - "sections" : [ "SUMMARY" ], - "deck_names" : [ - "ELAPSED", - "HLINEARS", - "HSUMLINS", - "MAXDPR", - "MAXDSG", - "MAXDSO", - "MAXDSW", - "MEMORYTS", - "MLINEARS", - "MSUMLINS", - "MSUMNEWT", - "NBYTOT", - "NEWTON", - "NLINEARS", - "NLINSMIN", - "NLINSMAX", - "PERFORMA", - "STEPTYPE", - "TCPU", - "TCPUDAY", - "TCPUH", - "TCPUHT", - "TCPUSCH", - "TCPUTS", - "TCPUTSH", - "TCPUTSHT", - "TELAPDAY", - "TELAPLIN", - "TELAPTS", - "TIMESTEP", - "WNEWTON", - "ZIPEFF", - "ZIPEFFC" - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PERMX b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PERMX deleted file mode 100644 index a5dcb3d4d8..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PERMX +++ /dev/null @@ -1 +0,0 @@ -{"name" : "PERMX" , "sections" : ["GRID"], "data" : {"value_type" : "DOUBLE" , "dimension" : "Permeability"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PERMXY b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PERMXY deleted file mode 100644 index b9acc6e3da..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PERMXY +++ /dev/null @@ -1 +0,0 @@ -{"name" : "PERMXY" , "sections" : ["GRID"], "data" : {"value_type" : "DOUBLE" , "dimension" : "Permeability"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PERMY b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PERMY deleted file mode 100644 index c14f399227..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PERMY +++ /dev/null @@ -1 +0,0 @@ -{"name" : "PERMY" , "sections" : ["GRID"], "data" : {"value_type" : "DOUBLE" , "default" : 0 , "dimension" : "Permeability"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PERMYZ b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PERMYZ deleted file mode 100644 index d50ec6f8be..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PERMYZ +++ /dev/null @@ -1 +0,0 @@ -{"name" : "PERMYZ" , "sections" : ["GRID"], "data" : {"value_type" : "DOUBLE" , "dimension" : "Permeability"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PERMZ b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PERMZ deleted file mode 100644 index 101867b864..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PERMZ +++ /dev/null @@ -1 +0,0 @@ -{"name" : "PERMZ" , "sections" : ["GRID"], "data" : {"value_type" : "DOUBLE" , "default" : 0 , "dimension" : "Permeability"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PERMZX b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PERMZX deleted file mode 100644 index 4d705cb95d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PERMZX +++ /dev/null @@ -1 +0,0 @@ -{"name" : "PERMZX" , "sections" : ["GRID"], "data" : {"value_type" : "DOUBLE" , "dimension" : "Permeability"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PIMTDIMS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PIMTDIMS deleted file mode 100644 index 1bd2edcbbe..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PIMTDIMS +++ /dev/null @@ -1,4 +0,0 @@ -{"name" : "PIMTDIMS" , "sections" : ["RUNSPEC"], "size" : 1, "items" : [ - {"name" : "NTPIMT" , "value_type" : "INT", "default" : 0}, - {"name" : "NPPIMT" , "value_type" : "INT", "default" : 0}]} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PIMULTAB b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PIMULTAB deleted file mode 100644 index 73d12c98db..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PIMULTAB +++ /dev/null @@ -1,2 +0,0 @@ -{"name" : "PIMULTAB" , "sections" : ["SCHEDULE"], "size" : {"keyword" : "PIMTDIMS" , "item" : "NTPIMT"}, "items" : - [{"name" : "TABLE" , "value_type" : "DOUBLE" , "size_type" : "ALL"}]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PINCH b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PINCH deleted file mode 100644 index 4da449fd32..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PINCH +++ /dev/null @@ -1,6 +0,0 @@ -{"name" : "PINCH" , "sections" : ["GRID"], "size" : 1 , "items" : [ - {"name" : "THRESHOLD_THICKNESS" , "value_type" : "DOUBLE" , "default" : 0.001, "dimension":"Length"}, - {"name" : "CONTROL_OPTION", "value_type" : "STRING" , "default" : "GAP"}, - {"name" : "MAX_EMPTY_GAP" , "value_type" : "DOUBLE" , "default" : 1e20, "dimension":"Length"}, - {"name" : "PINCHOUT_OPTION" , "value_type" : "STRING" , "default" : "TOPBOT"}, - {"name" : "MULTZ_OPTION" , "value_type" : "STRING" , "default" : "TOP"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLMIXPAR b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLMIXPAR deleted file mode 100644 index 61f0b1ab0c..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLMIXPAR +++ /dev/null @@ -1,9 +0,0 @@ -{"name" : "PLMIXPAR" , "sections" : ["PROPS"], "size" : {"keyword" : "REGDIMS" , "item" : "NPLMIX"} , "items" : - [ - {"name" : "TODD_LONGSTAFF" , - "value_type" : "DOUBLE" , - "size_type" : "ALL" , - "dimension" : "1"} - ] -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYADS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYADS deleted file mode 100644 index f0bf3c45ef..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYADS +++ /dev/null @@ -1,7 +0,0 @@ -{"name" : "PLYADS" , "sections" : ["SPECIAL", "PROPS"], "size" : {"keyword" : "TABDIMS" , "item" : "NTSFUN"} , "items" : - [ - {"name":"DATA", "value_type":"DOUBLE","size_type":"ALL", "dimension":["PolymerDensity", "1"]} - ] -} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYADSS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYADSS deleted file mode 100644 index f532758d84..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYADSS +++ /dev/null @@ -1,4 +0,0 @@ -{"name" : "PLYADSS" , "sections" : ["PROPS"] , "num_tables" : {"keyword" : "TABDIMS" , "item" : "NTSFUN"}, -"items" : [{"name" : "POLYMER_C" , "value_type" : "DOUBLE" , "dimension" : "PolymerDensity"}, - {"name" : "POLYMER_ADS_C" , "value_type" : "DOUBLE" , "dimension" : "1"}, - {"name" : "DATA" , "value_type" : "DOUBLE" , "size_type" : "ALL"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYDHFLF b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYDHFLF deleted file mode 100644 index 655002214d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYDHFLF +++ /dev/null @@ -1,7 +0,0 @@ -{"name" : "PLYDHFLF" , "sections" : ["SPECIAL", "PROPS", "SCHEDULE"], "size" : {"keyword" : "TABDIMS" , "item" : "NTPVT"} , "items" : - [ - {"name":"DATA", "value_type":"DOUBLE", "size_type" : "ALL" , "dimension" : ["Temperature","Time"]} - ] -} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYMAX b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYMAX deleted file mode 100644 index 019f129eed..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYMAX +++ /dev/null @@ -1,6 +0,0 @@ -{"name" : "PLYMAX" , "sections" : ["SPECIAL", "PROPS"], "size" : {"keyword" : "REGDIMS" , "item" : "NPLMIX"} , "items" : - [ - {"name" : "MAX_POLYMER_CONCENTRATION" , "value_type" : "DOUBLE" , "dimension" : "PolymerDensity"}, - {"name" : "MAX_SALT_CONCENTRATION" , "value_type" : "DOUBLE" , "dimension" : "PolymerDensity"} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYROCK b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYROCK deleted file mode 100644 index 541fd05405..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYROCK +++ /dev/null @@ -1,9 +0,0 @@ -{"name" : "PLYROCK" , "sections" : ["SPECIAL", "PROPS"], "size" : {"keyword":"TABDIMS" , "item":"NTSFUN"}, "items": - [ {"name":"IPV", "value_type" : "DOUBLE", "dimension":"1" }, - {"name":"RRF", "value_type" : "DOUBLE", "dimension":"1" }, - {"name":"ROCK_DENSITY", "value_type" : "DOUBLE", "dimension":"Density"}, - {"name":"AI", "value_type" : "DOUBLE", "default" : 1, "dimension":"1"}, - {"name":"MAX_ADSORPTION", "value_type" : "DOUBLE", "dimension":"1"} - ] -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYSHEAR b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYSHEAR deleted file mode 100644 index c023632a27..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYSHEAR +++ /dev/null @@ -1,8 +0,0 @@ -{"name" : "PLYSHEAR" , "sections" : ["SPECIAL", "PROPS"], "size" : {"keyword" : "TABDIMS" , "item" : "NTPVT"} , "items" : - [ - {"name" : "WATER_VELOCITY" , "value_type" : "DOUBLE" , "dimension" : "Length/Time"}, - {"name" : "VRF" , "value_type" : "DOUBLE", "dimension" : "1"} - ] -} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYSHLOG b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYSHLOG deleted file mode 100644 index bf4e4e3931..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYSHLOG +++ /dev/null @@ -1,6 +0,0 @@ -{ "name" : "PLYSHLOG" , "size" : 2 , "sections" : ["SPECIAL", "PROPS", "SCHEDULE"] , "records" : [ - [{"name" : "REF_POLYMER_CONCENTRATION" , "value_type" : "DOUBLE" , "dimension" : "PolymerDensity"}, - {"name" : "REF_SALINITY" , "value_type" : "DOUBLE" , "dimension" : "Salinity"}, - {"name" : "REF_TEMPERATURE" , "value_type" : "DOUBLE" , "dimension" : "Temperature"}], - [{"name" : "DATA" , "value_type" : "DOUBLE" , "size_type" : "ALL" , "dimension" : ["1" , "1"]}] -]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYVISC b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYVISC deleted file mode 100644 index 91c041fc5f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PLYVISC +++ /dev/null @@ -1,7 +0,0 @@ -{"name" : "PLYVISC" , "sections" : ["SPECIAL", "PROPS", "SCHEDULE"], "size" : {"keyword" : "TABDIMS" , "item" : "NTPVT"} , "items" : - [ - {"name":"DATA", "value_type":"DOUBLE", "size_type" : "ALL" , "dimension" : ["PolymerDensity","1"]} - ] -} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PMISC b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PMISC deleted file mode 100644 index 2dd963eae8..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PMISC +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "PMISC" , "sections" : ["PROPS"], "size" : {"keyword" : "MISCIBLE" , "item" : "NTMISC"}, - "items" : [ - {"name":"DATA", "value_type":"DOUBLE", "size_type" : "ALL" , "dimension" : ["Pressure","1"]} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/POLYMER b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/POLYMER deleted file mode 100644 index 5963b24d38..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/POLYMER +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name" : "POLYMER", - "sections" : [ "RUNSPEC" ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PORO b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PORO deleted file mode 100644 index e10961bc48..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PORO +++ /dev/null @@ -1 +0,0 @@ -{"name" : "PORO" , "sections" : ["GRID"], "data" : {"value_type" : "DOUBLE" , "default" : 0 , "dimension":"1"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PORV b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PORV deleted file mode 100644 index 21f1fb883a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PORV +++ /dev/null @@ -1 +0,0 @@ -{"name" : "PORV" , "sections" : ["EDIT"] , "data" : {"value_type" : "DOUBLE" , "dimension":"ReservoirVolume"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PRESSURE b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PRESSURE deleted file mode 100644 index 45fa14612a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PRESSURE +++ /dev/null @@ -1 +0,0 @@ -{"name" : "PRESSURE" , "sections" : ["SOLUTION"], "data" : {"value_type" : "DOUBLE", "dimension" : "Pressure"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PROPS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PROPS deleted file mode 100644 index fbdf5067e7..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PROPS +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name" : "PROPS", - "sections" : [] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVCDO b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVCDO deleted file mode 100644 index f7bc397667..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVCDO +++ /dev/null @@ -1,7 +0,0 @@ -{"name" : "PVCDO" , "sections" : ["PROPS"], "size" : {"keyword":"TABDIMS" , "item":"NTPVT"}, "items": - [ {"name":"P_REF", "value_type" : "DOUBLE", "dimension":"Pressure" }, - {"name":"OIL_VOL_FACTOR", "value_type" : "DOUBLE","dimension":"1"}, - {"name":"OIL_COMPRESSIBILITY", "value_type" : "DOUBLE","dimension":"1/Pressure"}, - {"name":"OIL_VISCOSITY", "value_type" : "DOUBLE","dimension":"Viscosity"}, - {"name":"OIL_VISCOSIBILITY", "value_type" : "DOUBLE","dimension":"1/Pressure"} -]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVDG b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVDG deleted file mode 100644 index 6e1d129ac1..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVDG +++ /dev/null @@ -1,4 +0,0 @@ -{"name" : "PVDG" , "sections" : ["PROPS"], "size" : {"keyword" : "TABDIMS" , "item" : "NTPVT"} , "items" : [ - {"name" : "data" , "size_type" : "ALL" , "value_type" : "DOUBLE" , "dimension" : ["Pressure","OilDissolutionFactor","Viscosity"]}]} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVDO b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVDO deleted file mode 100644 index 03df7cff16..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVDO +++ /dev/null @@ -1,2 +0,0 @@ -{"name" : "PVDO" , "sections" : ["PROPS"], "size" : {"keyword" : "TABDIMS" , "item" : "NTPVT"} , "items" : [ - {"name" : "data" , "size_type" : "ALL" , "value_type" : "DOUBLE" , "dimension" : ["Pressure","1","Viscosity"]}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVDS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVDS deleted file mode 100644 index 0ccd5175da..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVDS +++ /dev/null @@ -1,4 +0,0 @@ -{"name" : "PVDS" , "sections" : ["PROPS"], "size" : {"keyword" : "TABDIMS" , "item" : "NTPVT"} , "items" : [ - {"name" : "data" , "size_type" : "ALL" , "value_type" : "DOUBLE" , "dimension" : ["Pressure","OilDissolutionFactor","Viscosity"]}]} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVTG b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVTG deleted file mode 100644 index 60a9e84c78..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVTG +++ /dev/null @@ -1,6 +0,0 @@ -{"name" : "PVTG" , "sections" : ["PROPS"], "num_tables" : {"keyword":"TABDIMS" , "item":"NTPVT"}, - "items" : [ - {"name":"GAS_PRESSURE", "value_type" : "DOUBLE", "dimension":"Pressure" }, - {"name":"DATA", "size_type" : "ALL" , "value_type":"DOUBLE" , "dimension" : ["OilDissolutionFactor","OilDissolutionFactor","Viscosity"]} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVTNUM b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVTNUM deleted file mode 100644 index 2846edb003..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVTNUM +++ /dev/null @@ -1 +0,0 @@ -{"name" : "PVTNUM", "sections" : ["REGIONS"], "data" : {"value_type" : "INT" }} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVTO b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVTO deleted file mode 100644 index 56ff7e1e47..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVTO +++ /dev/null @@ -1,6 +0,0 @@ -{"name" : "PVTO" , "sections" : ["PROPS"], "num_tables" : {"keyword" : "TABDIMS" , "item" : "NTPVT"}, - "items" : [ - {"name":"RS", "value_type" : "DOUBLE", "dimension":"GasDissolutionFactor" }, - {"name":"DATA", "value_type":"DOUBLE", "size_type" : "ALL" , "dimension" : ["Pressure","1","Viscosity"]} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVTW b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVTW deleted file mode 100644 index afe202b117..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/P/PVTW +++ /dev/null @@ -1,8 +0,0 @@ -{"name" : "PVTW" , "sections" : ["PROPS"], "size" : {"keyword":"TABDIMS" , "item":"NTPVT"}, "items": - [ {"name":"P_REF", "value_type" : "DOUBLE", "dimension":"Pressure" }, - {"name":"WATER_VOL_FACTOR", "value_type" : "DOUBLE", "default" : 1.0,"dimension":"1"}, - {"name":"WATER_COMPRESSIBILITY", "value_type" : "DOUBLE", "default" : 0.00004, "dimension":"1/Pressure"}, - {"name":"WATER_VISCOSITY", "value_type" : "DOUBLE", "default" : 0.5, "dimension":"Viscosity", "comment" : "Default is 0.3 in Eclipse300"}, - {"name":"WATER_VISCOSIBILITY", "value_type" : "DOUBLE", "default" : 0.0, "dimension":"1/Pressure"} - ]} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RADFIN4 b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RADFIN4 deleted file mode 100644 index 05ddf4cde5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RADFIN4 +++ /dev/null @@ -1,15 +0,0 @@ -{"name" : "RADFIN4", "sections" : ["SPECIAL", "GRID"], "size" : 1, "items" : -[ - {"name" : "NAME" , "value_type" : "STRING"}, - {"name" : "I1" , "value_type" : "INT"}, - {"name" : "I2" , "value_type" : "INT"}, - {"name" : "J1" , "value_type" : "INT"}, - {"name" : "J2" , "value_type" : "INT"}, - {"name" : "K1" , "value_type" : "INT"}, - {"name" : "K2" , "value_type" : "INT"}, - {"name" : "NR" , "value_type" : "INT"}, - {"name" : "NTHETA", "value_type" : "INT"}, - {"name" : "NZ" , "value_type" : "INT"}, - {"name" : "NWMAX" , "value_type" : "INT" , "default" : 1} -] -} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/REGDIMS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/REGDIMS deleted file mode 100644 index 7c51287f6a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/REGDIMS +++ /dev/null @@ -1,12 +0,0 @@ -{"name" : "REGDIMS", "sections" : ["RUNSPEC"], "size" : 1 , "items" : [ - {"name" : "NTFIP" , "value_type" : "INT" , "default" : 1}, - {"name" : "NMFIPR" , "value_type" : "INT" , "default" : 1}, - {"name" : "NRFREG" , "value_type" : "INT" , "default" : 0}, - {"name" : "NTFREG" , "value_type" : "INT" , "default" : 0}, - {"name" : "MAX_ETRACK" , "value_type" : "INT" , "default" : 0 , "E300" : true}, - {"name" : "NTCREG" , "value_type" : "INT" , "default" : 1}, - {"name" : "MAX_OPERNUM" , "value_type" : "INT" , "default" : 0}, - {"name" : "MAX_OPERATE_DWORK", "value_type" : "INT" , "default" : 0}, - {"name" : "MAX_OPERATE_IWORK", "value_type" : "INT" , "default" : 0}, - {"name" : "NPLMIX" , "value_type" : "INT" , "default" : 1} -]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/REGIONS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/REGIONS deleted file mode 100644 index 7e1f587a4e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/REGIONS +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name" : "REGIONS", - "sections" : [] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/REGION_PROBE b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/REGION_PROBE deleted file mode 100644 index b664ce4da2..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/REGION_PROBE +++ /dev/null @@ -1,117 +0,0 @@ -{ - "name" : "REGION_PROBE", - "sections" : ["SUMMARY"], - - "comment" : "E100 only", - "deck_names" : [ - "ROSAT", - "ROIP", - "ROIPL", - "ROIPG", - "ROP", - "RPPO", - "ROVIS", - "RODEN", - "ROPR", - "ROPT", - "ROIR", - "ROIT", - "RWSAT", - "RWIP", - "RWP", - "RPPW", - "RWVIS", - "RWDEN", - "RWPR", - "RWPT", - "RWIR", - "RWIT", - "RGSAT", - "RGIP", - "RGIPL", - "RGIPG", - "RGP", - "RPPG", - "RGVIS", - "RGDEN", - "RGPR", - "RGPRF", - "RGPRS", - "RGPT", - "RGPTF", - "RGPTS", - "RGIR", - "RGIT", - "ROFT", - "RGFT", - "RGFTL", - "RGFTG", - "RWFT", - "RPR", - "RPRH", - "RPRP", - "RPRGZ", - "RRS", - "RRV", - "RPPC", - "RRPV", - "ROPV", - "RWPV", - "RGPV", - "RHPV", - "RRTM", - "ROE", - "ROEW", - "ROEIW", - "ROEWW", - "ROEIG", - "ROEWG", - "RORMR", - "RORMW", - "RORMG", - "RORME", - "RORMS", - "RORMF", - "RORMX", - "RORMY", - "RORFR", - "RORFW", - "RORFG", - "RORFE", - "RORFS", - "RORFF", - "RORFX", - "RORFY", - "RTIPT", - "RAPI", - "RSIP", - "RSFT", - "RTIPTHEA", - "RCGC", - "RCSC", - "RTIPTFOA", - "RTFTTFOA", - "RTADSFOA", - "RTDCYFOA", - "RTMOBFOA", - "RCIP", - "RCFT", - "RCAD", - "RSIP", - "RSFT", - "RNIP", - "RNFT", - "RTIPTSUR", - "RTFTTSUR", - "RTADSUR" - ], - "comment":"Tracer keywords where the 2nd letter is a 'T' should be compounded with the tracer name", - "deck_name_regex": "R[OGW]?[IP][PRT]_.+|RU.+|RTIPF.+|RTIPS.+|RTFTF.+|RTFTS.+|RTFTT.+|RTIPT.+|RTIPF.+|RTIPS.+|RTIP[1-9][0-9]*.+|RTFTT.+|RTFTF.+|RTFTS.+|RTFT[1-9][0-9]*.+|RTADS.+|RTDCY.+", - - "size" : 1, - "items" : [{ - "name" : "REGIONS", - "value_type" : "INT", - "size_type" : "ALL" - }] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RESTART b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RESTART deleted file mode 100644 index e23dff4b0a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RESTART +++ /dev/null @@ -1,6 +0,0 @@ -{"name" : "RESTART", "sections" : ["SOLUTION"], "size" : 1 , "items" : [ - {"name" : "ROOTNAME" , "value_type" : "STRING" , "default" : "BASE" }, - {"name" : "REPORTNUMBER" , "value_type" : "INT" }, - {"name" : "SAVEFILE" , "value_type" : "STRING" }, - {"name" : "SAVEFILE_FORMAT" , "value_type" : "STRING" , "default" : "UNFORMATTED"} -]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RKTRMDIR b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RKTRMDIR deleted file mode 100644 index c5d8f3be98..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RKTRMDIR +++ /dev/null @@ -1 +0,0 @@ -{"name" : "RKTRMDIR", "sections" : ["PROPS"], "size" : 0 } diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/ROCK b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/ROCK deleted file mode 100644 index df4814dab2..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/ROCK +++ /dev/null @@ -1,3 +0,0 @@ -{"name" : "ROCK" , "sections" : ["PROPS"], "size" : {"keyword":"TABDIMS" , "item":"NTPVT"}, "items" : [ - {"name" : "PREF" , "value_type" : "DOUBLE" , "default" : 1.0132 , "dimension" : "Pressure"}, - {"name" : "COMPRESSIBILITY" , "value_type" : "DOUBLE" , "default" : 0 , "dimension" : "1/Pressure"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/ROCKCOMP b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/ROCKCOMP deleted file mode 100644 index 7cf4c12676..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/ROCKCOMP +++ /dev/null @@ -1,7 +0,0 @@ -{"name" : "ROCKCOMP" , "sections" : ["RUNSPEC"], "size" : 1 , "items" : [ - {"name" : "HYSTERESIS" , "value_type" : "STRING" , "default" : "REVERS"}, - {"name" : "NTROCC" , "value_type" : "INT" , "default" : 1}, - {"name" : "WATER_COMPACTION" , "value_type" : "STRING" , "default" : "NO"}]} - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/ROCKOPTS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/ROCKOPTS deleted file mode 100644 index ebe5b03bcd..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/ROCKOPTS +++ /dev/null @@ -1,10 +0,0 @@ -{"name" : "ROCKOPTS", - "sections" : [ "PROPS" ], - "size" : 1, - "items" : [ - {"name": "METHOD", "value_type": "STRING", "default": "PRESSURE"}, - {"name": "REF_PRESSURE", "value_type": "STRING", "default": "NOSTORE"}, - {"name": "TABLE_TYPE", "value_type": "STRING", "default": "PVTNUM"}, - {"name": "HYST_TYPE", "value_type": "STRING", "default": "DEFLATION"} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/ROCKTAB b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/ROCKTAB deleted file mode 100644 index 65ab1fa8af..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/ROCKTAB +++ /dev/null @@ -1,8 +0,0 @@ -{"name" : "ROCKTAB" , "sections" : ["PROPS"], "size" : {"keyword" : "ROCKCOMP" , "item" : "NTROCC"}, - "items" : [{ - "name":"DATA", - "value_type":"DOUBLE", - "size_type":"ALL", - "dimension":["Pressure","1","1","1","1"] - }] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTGRID b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTGRID deleted file mode 100644 index dabbf72114..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTGRID +++ /dev/null @@ -1 +0,0 @@ -{"name" : "RPTGRID" , "sections" : ["GRID"] , "size" : 1 , "items" : [{"name" : "DATA" , "size_type" : "ALL" , "value_type" : "STRING"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTONLY b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTONLY deleted file mode 100644 index eb095b04a6..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTONLY +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name" : "RPTONLY", - "sections": [ - "SUMMARY", - "SCHEDULE" - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTONLYO b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTONLYO deleted file mode 100644 index 20e3626b93..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTONLYO +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name" : "RPTONLYO", - "sections": [ - "SUMMARY", - "SCHEDULE" - ] - -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTPROPS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTPROPS deleted file mode 100644 index b87f2c5b36..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTPROPS +++ /dev/null @@ -1 +0,0 @@ -{"name" : "RPTPROPS" , "sections" : ["PROPS"], "size" : 1 , "items" : [{"name" : "mnemonics", "value_type" : "STRING" , "size_type" : "ALL"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTREGS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTREGS deleted file mode 100644 index 5b92715678..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTREGS +++ /dev/null @@ -1,3 +0,0 @@ -{"name" : "RPTREGS" , "sections" : ["REGIONS"], "size" : 1, "items" : [ - {"name" : "MNEMONIC_LIST" , "size_type" : "ALL" , "value_type" : "STRING"}]} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTRST b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTRST deleted file mode 100644 index 2c305def3c..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTRST +++ /dev/null @@ -1,2 +0,0 @@ -{"name" : "RPTRST", "sections" : ["SOLUTION", "SCHEDULE"], "size" : 1, "items" : [ - {"name" : "MNEMONIC_LIST" , "size_type" : "ALL" , "value_type" : "STRING"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTRUNSP b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTRUNSP deleted file mode 100644 index fb190aab9d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTRUNSP +++ /dev/null @@ -1 +0,0 @@ -{"name" : "RPTRUNSP", "size" : 0 , "sections" : ["RUNSPEC"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTSCHED b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTSCHED deleted file mode 100644 index 6b2ecc2681..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTSCHED +++ /dev/null @@ -1,3 +0,0 @@ -{"name" : "RPTSCHED", "sections" : ["SCHEDULE"], "size" : 1, "items" : [ - {"name" : "MNEMONIC_LIST" , "size_type" : "ALL" , "value_type" : "STRING"} -]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTSOL b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTSOL deleted file mode 100644 index a637dcdc85..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RPTSOL +++ /dev/null @@ -1 +0,0 @@ -{"name" : "RPTSOL" , "sections" : ["SOLUTION"], "size" : 1 , "items" : [{"name" : "mnemonics", "value_type" : "STRING" , "size_type" : "ALL"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RS deleted file mode 100644 index 2e59ca025d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RS +++ /dev/null @@ -1 +0,0 @@ -{"name" : "RS" , "sections" : ["SOLUTION"], "data" : {"value_type" : "DOUBLE", "dimension" : "GasDissolutionFactor"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RSVD b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RSVD deleted file mode 100644 index 50c05ca054..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RSVD +++ /dev/null @@ -1,7 +0,0 @@ -{"name" : "RSVD" , "sections" : ["SOLUTION"], "size" : {"keyword" : "EQLDIMS" , "item" : "NTEQUL"}, - "items" : [{"name" : "table" , - "value_type" : "DOUBLE" , - "size_type" : "ALL", - "dimension" : ["Length" , "GasDissolutionFactor"]}]} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RTEMPVD b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RTEMPVD deleted file mode 100644 index b98089dcd1..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RTEMPVD +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name" : "RTEMPVD", - "sections" : [ "PROPS", "SOLUTION" ], - "size" : { - "keyword" : "EQLDIMS" , - "item" : "NTEQUL" - }, - "items" : [ - { - "name":"DATA", - "value_type":"DOUBLE", - "size_type" : "ALL", - "dimension" : ["Length","Temperature"] - } - ] -} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RUNSPEC b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RUNSPEC deleted file mode 100644 index 27da499373..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RUNSPEC +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name" : "RUNSPEC", - "sections" : [] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RUNSUM b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RUNSUM deleted file mode 100644 index 7c719888ae..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RUNSUM +++ /dev/null @@ -1 +0,0 @@ -{"name" : "RUNSUM" , "sections" : ["SUMMARY"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RV b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RV deleted file mode 100644 index 3c7cb77e54..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RV +++ /dev/null @@ -1 +0,0 @@ -{"name" : "RV" , "sections" : ["SOLUTION"], "data" : {"value_type" : "DOUBLE", "dimension" : "OilDissolutionFactor"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RVVD b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RVVD deleted file mode 100644 index 77a683292d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/R/RVVD +++ /dev/null @@ -1,7 +0,0 @@ -{"name" : "RVVD" , "sections" : ["SOLUTION"], "size" : {"keyword" : "EQLDIMS" , "item" : "NTEQUL"}, - "items" : [{"name" : "table" , - "value_type" : "DOUBLE" , - "size_type" : "ALL", - "dimension" : ["Length" , "OilDissolutionFactor"]}]} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SATNUM b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SATNUM deleted file mode 100644 index 6bc0d13a71..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SATNUM +++ /dev/null @@ -1 +0,0 @@ -{"name" : "SATNUM", "sections" : ["REGIONS"], "data" : {"value_type" : "INT" }} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SATOPTS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SATOPTS deleted file mode 100644 index 56c432e8c5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SATOPTS +++ /dev/null @@ -1,3 +0,0 @@ -{"name" : "SATOPTS" , "sections" : ["RUNSPEC"], "size" : 1 , "items" : [ - {"name" : "options" , "value_type" : "STRING" , "size_type" : "ALL"} - ]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SAVE b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SAVE deleted file mode 100644 index 45e83bb850..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SAVE +++ /dev/null @@ -1 +0,0 @@ -{"name" : "SAVE" , "size" : "UNKNOWN" , "sections" : ["RUNSPEC" , "SCHEDULE"] , "items" : [{"name" : "FILE_TYPE" , "value_type" : "STRING" , "default" : "UNFORMATTED"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SCALECRS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SCALECRS deleted file mode 100644 index 9e3284698a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SCALECRS +++ /dev/null @@ -1,2 +0,0 @@ -{"name" : "SCALECRS" , "sections" : ["PROPS"], "size" : 1 , "items" : [ - {"name" : "VALUE" , "value_type" : "STRING" , "default" : "NO"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SCHEDULE b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SCHEDULE deleted file mode 100644 index 65d01b017e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SCHEDULE +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name" : "SCHEDULE", - "sections" : [] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SDENSITY b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SDENSITY deleted file mode 100644 index 81da6e45d9..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SDENSITY +++ /dev/null @@ -1,2 +0,0 @@ -{"name" : "SDENSITY", "sections" : ["PROPS"], "size" : {"keyword":"TABDIMS", "item":"NTPVT" }, "items" : - [{"name": "SOLVENT_DENSITY" , "value_type" : "DOUBLE" , "default": 1 , "dimension" : "Density"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SEPARATE b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SEPARATE deleted file mode 100644 index 3de9e762de..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SEPARATE +++ /dev/null @@ -1 +0,0 @@ -{"name":"SEPARATE", "sections" : ["SUMMARY"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGAS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGAS deleted file mode 100644 index 11acf8b1b8..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGAS +++ /dev/null @@ -1 +0,0 @@ -{"name" : "SGAS" , "sections" : ["SOLUTION"], "data" : {"value_type" : "DOUBLE", "dimension" : "1"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGCR b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGCR deleted file mode 100644 index de08692a26..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGCR +++ /dev/null @@ -1 +0,0 @@ -{"name" : "SGCR" , "sections" : ["PROPS"], "data" : {"value_type" : "DOUBLE", "dimension" : "1"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGCWMIS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGCWMIS deleted file mode 100644 index 8be35737b0..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGCWMIS +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "SGCWMIS" , "sections" : ["PROPS"], "size" : {"keyword" : "MISCIBLE" , "item" : "NTMISC"}, - "items" : [ - {"name":"DATA", "value_type":"DOUBLE", "size_type" : "ALL" , "dimension" : ["1","1"]} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGFN b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGFN deleted file mode 100644 index 1107470576..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGFN +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "SGFN" , "sections" : ["PROPS"], "size" : {"keyword" : "TABDIMS" , "item" : "NTSFUN"}, - "items" : [ - {"name":"DATA", "value_type":"DOUBLE", "size_type" : "ALL" , "dimension" : ["1","1","Pressure"]} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGL b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGL deleted file mode 100644 index c33e62240b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGL +++ /dev/null @@ -1 +0,0 @@ -{"name" : "SGL" , "sections" : ["PROPS"], "data" : {"value_type" : "DOUBLE", "dimension" : "1"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGOF b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGOF deleted file mode 100644 index 1cdd620549..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGOF +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "SGOF" , "sections" : ["PROPS"], "size" : {"keyword" : "TABDIMS" , "item" : "NTSFUN"}, - "items" : [ - {"name":"table", "value_type":"DOUBLE", "size_type" : "ALL", "dimension" : ["1","1","1","Pressure"]} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGU b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGU deleted file mode 100644 index 7d26c0e107..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGU +++ /dev/null @@ -1 +0,0 @@ -{"name" : "SGU" , "sections" : ["PROPS"], "data" : {"value_type" : "DOUBLE", "dimension" : "1"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGWFN b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGWFN deleted file mode 100644 index bb3a8f81b8..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SGWFN +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "SGWFN" , "sections" : ["PROPS"], "size" : {"keyword" : "TABDIMS" , "item" : "NTSFUN"}, - "items" : [ - {"name":"DATA", "value_type":"DOUBLE", "size_type" : "ALL" , "dimension" : ["1","1","1","Pressure"]} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SHRATE b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SHRATE deleted file mode 100644 index 48c1b79ddb..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SHRATE +++ /dev/null @@ -1,9 +0,0 @@ -{"name" : "SHRATE" , "sections" : ["PROPS"], "size" : {"keyword" : "TABDIMS" , "item" : "NTPVT"} , "items" : - [ - {"name" : "SHEAR_RATE" , - "value_type" : "DOUBLE" , - "size_type" : "ALL" , - "dimension" : "1"} - ] -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SKIP b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SKIP deleted file mode 100644 index 0bfd996d52..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SKIP +++ /dev/null @@ -1 +0,0 @@ -{"name" : "SKIP" , "size" : 0 , "sections" : ["RUNSPEC" , "GRID" , "EDIT" , "PROPS" , "REGIONS" , "SOLUTION" ,"SUMMARY" , "SCHEDULE"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SKIP100 b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SKIP100 deleted file mode 100644 index 8baf2fd00b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SKIP100 +++ /dev/null @@ -1 +0,0 @@ -{"name" : "SKIP100" , "size" : 0 , "sections" : ["RUNSPEC" , "GRID" , "EDIT" , "PROPS" , "REGIONS" , "SOLUTION" ,"SUMMARY" , "SCHEDULE"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SKIP300 b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SKIP300 deleted file mode 100644 index 2f8ef82947..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SKIP300 +++ /dev/null @@ -1 +0,0 @@ -{"name" : "SKIP300" , "size" : 0 , "sections" : ["RUNSPEC" , "GRID" , "EDIT" , "PROPS" , "REGIONS" , "SOLUTION" ,"SUMMARY" , "SCHEDULE"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SKIPREST b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SKIPREST deleted file mode 100644 index 7f9ec8bf36..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SKIPREST +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name" : "SKIPREST", - "sections": [ - "SCHEDULE" - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SLGOF b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SLGOF deleted file mode 100644 index 989178e0dc..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SLGOF +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "SLGOF" , "sections" : ["PROPS"], "size" : {"keyword" : "TABDIMS" , "item" : "NTSFUN"}, - "items" : [ - {"name":"DATA", "value_type":"DOUBLE", "size_type" : "ALL" , "dimension" : ["1","1","1","Pressure"]} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SMRYDIMS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SMRYDIMS deleted file mode 100644 index 1f56ec188b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SMRYDIMS +++ /dev/null @@ -1,3 +0,0 @@ -{"name" : "SMRYDIMS" , "sections" : ["RUNSPEC"], "size" : 1 , - "items" : [ - {"name" : "DIMS" , "value_type" : "INT" , "default" : 10000}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SOF2 b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SOF2 deleted file mode 100644 index 8127fc9e6b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SOF2 +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "SOF2" , "sections" : ["PROPS"], "size" : {"keyword" : "TABDIMS" , "item" : "NTSFUN"}, - "items" : [ - {"name":"DATA", "value_type":"DOUBLE", "size_type" : "ALL" , "dimension" : ["1","1"]} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SOF3 b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SOF3 deleted file mode 100644 index 3a2b1d4d00..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SOF3 +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "SOF3" , "sections" : ["PROPS"], "size" : {"keyword" : "TABDIMS" , "item" : "NTSFUN"}, - "items" : [ - {"name":"DATA", "value_type":"DOUBLE", "size_type" : "ALL" , "dimension" : ["1","1","1"]} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SOGCR b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SOGCR deleted file mode 100644 index 7030677c98..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SOGCR +++ /dev/null @@ -1 +0,0 @@ -{"name" : "SOGCR" , "sections" : ["PROPS"], "data" : {"value_type" : "DOUBLE", "dimension" : "1"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SOIL b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SOIL deleted file mode 100644 index 6a5aea2138..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SOIL +++ /dev/null @@ -1 +0,0 @@ -{"name" : "SOIL" , "sections" : ["SOLUTION"], "data" : {"value_type" : "DOUBLE", "dimension" : "1"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SOLUTION b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SOLUTION deleted file mode 100644 index 9305b87129..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SOLUTION +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name" : "SOLUTION", - "sections" : [] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SOLVENT b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SOLVENT deleted file mode 100644 index 8cd7f0f260..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SOLVENT +++ /dev/null @@ -1 +0,0 @@ -{"name" : "SOLVENT", "sections" : ["RUNSPEC"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SORWMIS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SORWMIS deleted file mode 100644 index c70987ba44..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SORWMIS +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "SORWMIS" , "sections" : ["PROPS"], "size" : {"keyword" : "MISCIBLE" , "item" : "NTMISC"}, - "items" : [ - {"name":"DATA", "value_type":"DOUBLE", "size_type" : "ALL" , "dimension" : ["1","1"]} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SOWCR b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SOWCR deleted file mode 100644 index 54a5275fe9..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SOWCR +++ /dev/null @@ -1 +0,0 @@ -{"name" : "SOWCR" , "sections" : ["PROPS"], "data" : {"value_type" : "DOUBLE", "dimension" : "1"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SPECGRID b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SPECGRID deleted file mode 100644 index 5fd359b255..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SPECGRID +++ /dev/null @@ -1,6 +0,0 @@ -{"name" : "SPECGRID" , "sections" : ["GRID"], "size" : 1 , "items" : [ - {"name" : "NX" , "value_type" : "INT" , "default" : 1}, - {"name" : "NY" , "value_type" : "INT" , "default" : 1}, - {"name" : "NZ" , "value_type" : "INT" , "default" : 1}, - {"name" : "NUMRES" , "value_type" : "INT" , "default" : 1}, - {"name" : "COORD_TYPE" , "value_type" : "STRING" , "default" : "F"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SPECHEAT b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SPECHEAT deleted file mode 100644 index b78ab52dde..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SPECHEAT +++ /dev/null @@ -1,3 +0,0 @@ -{"name" : "SPECHEAT" , "sections" : ["PROPS"], "size" : {"keyword":"TABDIMS" , "item":"NTPVT"}, - "items" : - [{"name" : "DATA" , "value_type" : "DOUBLE" , "size_type" : "ALL"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SPECROCK b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SPECROCK deleted file mode 100644 index f0e2466999..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SPECROCK +++ /dev/null @@ -1,3 +0,0 @@ -{"name" : "SPECROCK" , "sections" : ["PROPS"], "size" : {"keyword":"TABDIMS" , "item":"NTSFUN"}, - "items" : - [{"name" : "DATA" , "value_type" : "DOUBLE" , "size_type" : "ALL"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SSFN b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SSFN deleted file mode 100644 index fc3a03824d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SSFN +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "SSFN" , "sections" : ["PROPS"], "size" : {"keyword" : "TABDIMS" , "item" : "NTSFUN"}, - "items" : [ - {"name":"DATA", "value_type":"DOUBLE", "size_type" : "ALL" , "dimension" : ["1","1","1"]} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SSOL b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SSOL deleted file mode 100644 index ac7be3a785..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SSOL +++ /dev/null @@ -1 +0,0 @@ -{"name" : "SSOL" , "sections" : ["SOLUTION"], "data" : {"value_type" : "DOUBLE", "dimension" : "1"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/START b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/START deleted file mode 100644 index b78562281f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/START +++ /dev/null @@ -1,6 +0,0 @@ -{"name" : "START", "sections" : ["RUNSPEC"], "size" : 1 , "items" : [ -{"name" : "DAY" , "value_type" : "INT", "default":1}, -{"name" : "MONTH" , "value_type" : "STRING", "default":"JAN"}, -{"name" : "YEAR" , "value_type" : "INT", "default":1983 }, -{"name" : "TIME" , "value_type" : "STRING", "default":"00:00:00.000"}] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/STONE1 b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/STONE1 deleted file mode 100644 index 669119775c..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/STONE1 +++ /dev/null @@ -1 +0,0 @@ -{"name" : "STONE1" , "sections" : ["PROPS"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/STONE1EX b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/STONE1EX deleted file mode 100644 index 7f8495461e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/STONE1EX +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name" : "STONE1EX", - "sections" : ["PROPS"], - "size" : { - "keyword": "TABDIMS", - "item": "NTSFUN" - }, - "items" : [{ - "name": "EXP_VALUE", - "value_type" : "DOUBLE", - "default": 1.0, - "dimension" : "1" - }] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SUMMARY b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SUMMARY deleted file mode 100644 index ead415ff8d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SUMMARY +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name" : "SUMMARY", - "sections" : [] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SUMTHIN b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SUMTHIN deleted file mode 100644 index ba61547a6e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SUMTHIN +++ /dev/null @@ -1,2 +0,0 @@ -{"name" : "SUMTHIN" , "sections" : ["SUMMARY" , "SCHEDULE"] , "size" : 1, "items" : [ - {"name" : "TIME" , "value_type" : "DOUBLE" , "dimension" : "Time"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SWAT b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SWAT deleted file mode 100644 index 12a0c62a3f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SWAT +++ /dev/null @@ -1 +0,0 @@ -{"name" : "SWAT" , "sections" : ["SOLUTION"], "data" : {"value_type" : "DOUBLE", "dimension" : "1"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SWATINIT b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SWATINIT deleted file mode 100644 index 86f8868151..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SWATINIT +++ /dev/null @@ -1 +0,0 @@ -{"name" : "SWATINIT" , "sections" : ["PROPS"], "data" : {"value_type" : "DOUBLE" , "dimension" : "1"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SWCR b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SWCR deleted file mode 100644 index d94f8c438e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SWCR +++ /dev/null @@ -1 +0,0 @@ -{"name" : "SWCR" , "sections" : ["PROPS"], "data" : {"value_type" : "DOUBLE", "dimension" : "1"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SWFN b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SWFN deleted file mode 100644 index 2571f9aeb0..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SWFN +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "SWFN" , "sections" : ["PROPS"], "size" : {"keyword" : "TABDIMS" , "item" : "NTSFUN"}, - "items" : [ - {"name":"DATA", "value_type":"DOUBLE", "size_type" : "ALL" , "dimension" : ["1","1","Pressure"]} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SWL b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SWL deleted file mode 100644 index f70e5481b7..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SWL +++ /dev/null @@ -1 +0,0 @@ -{"name" : "SWL" , "sections" : ["PROPS"], "data" : {"value_type" : "DOUBLE", "dimension" : "1"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SWOF b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SWOF deleted file mode 100644 index ddfbc135fe..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SWOF +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "SWOF" , "sections" : ["PROPS"], "size" : {"keyword" : "TABDIMS" , "item" : "NTSFUN"}, - "items" : [ - {"name":"DATA", "value_type":"DOUBLE", "size_type" : "ALL" , "dimension" : ["1","1","1","Pressure"]} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SWU b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SWU deleted file mode 100644 index 0ceedb75c1..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/S/SWU +++ /dev/null @@ -1 +0,0 @@ -{"name" : "SWU" , "sections" : ["PROPS"], "data" : {"value_type" : "DOUBLE", "dimension" : "1"}} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TABDIMS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TABDIMS deleted file mode 100644 index f721e4b82d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TABDIMS +++ /dev/null @@ -1,28 +0,0 @@ -{"name" : "TABDIMS", "sections" : ["RUNSPEC"], "size" : 1, "items" : [ - {"name" : "NTSFUN" , "value_type" : "INT" , "default" : 1}, - {"name" : "NTPVT" , "value_type" : "INT" , "default" : 1}, - {"name" : "NSSFUN" , "value_type" : "INT" , "default" : 20}, - {"name" : "NPPVT" , "value_type" : "INT" , "default" : 20}, - {"name" : "NTFIP" , "value_type" : "INT" , "default" : 1}, - {"name" : "NRPVT" , "value_type" : "INT" , "default" : 20}, - {"name" : "MAX_RV_NODES" , "value_type" : "INT"}, - {"name" : "NTENDP" , "value_type" : "INT" , "default" : 1, "comment" : "This item is ECLIPSE300 specific"}, - {"name" : "NUM_STATE_EQ" , "value_type" : "INT" , "default" : 1, "comment" : "This item is ECLIPSE300 specific"}, - {"name" : "NUM_EOS_RES" , "value_type" : "INT" , "default" : 1}, - {"name" : "NUM_EOS_SURFACE" , "value_type" : "INT"}, - {"name" : "MAX_FLUX_REGIONS" , "value_type" : "INT" , "default" : 10}, - {"name" : "MAX_THERMAL_REGIONS" , "value_type" : "INT" , "default" : 1}, - {"name" : "NTROCC" , "value_type" : "INT"}, - {"name" : "MAX_PRESSURE_MAINTAINANCE_REGIONS" , "value_type" : "INT" , "default" : 0}, - {"name" : "MAX_KVALUE_TABLES" , "value_type" : "INT" , "default" : 0}, - {"name" : "NTALPHA" , "value_type" : "INT"}, - {"name" : "ASPHALTENE_ASPKDAM_MAX_ROWS" , "value_type" : "INT" , "default" : 10}, - {"name" : "ASPHALTENE_ASPREWG_MAX_ROWS" , "value_type" : "INT" , "default" : 10}, - {"name" : "ASPHALTENE_ASPVISO_MAX_ROWS" , "value_type" : "INT" , "default" : 10}, - {"name" : "ITEM20_NOT_USED" , "value_type" : "STRING"}, - {"name" : "ASPHALTENE_ASPPW2D_MAX_COLUMNS" , "value_type" : "INT" , "default" : 5}, - {"name" : "ASPHALTENE_ASPPW2D_MAX_ROWS" , "value_type" : "INT" , "default" : 5}, - {"name" : "ASPHALTENE_ASPWETF_MAX_ROWS" , "value_type" : "INT" , "default" : 5}, - {"name" : "NUM_KVALUE_TABLES" , "value_type" : "INT" , "default" : 0}, - {"name" : "RESERVED" , "value_type" : "STRING" } - ]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TEMP b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TEMP deleted file mode 100644 index 4da2ae3c64..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TEMP +++ /dev/null @@ -1 +0,0 @@ -{"name" : "TEMP", "sections" : ["RUNSPEC"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/THCONR b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/THCONR deleted file mode 100644 index 3989460039..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/THCONR +++ /dev/null @@ -1 +0,0 @@ -{"name" : "THCONR" , "sections" : ["GRID"], "data" : {"value_type" : "DOUBLE"}} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/THPRES b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/THPRES deleted file mode 100644 index b93e5e043a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/THPRES +++ /dev/null @@ -1,4 +0,0 @@ -{"name" : "THPRES" , "sections" : ["SOLUTION"], "items" : [ - {"name" : "REGION1" , "value_type" : "INT"}, - {"name" : "REGION2" , "value_type" : "INT"}, - {"name" : "VALUE" , "value_type" : "DOUBLE", "dimension" : "Pressure"}]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TITLE b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TITLE deleted file mode 100644 index 15ccc0fcef..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TITLE +++ /dev/null @@ -1,2 +0,0 @@ -{"name" : "TITLE" , "sections" : ["RUNSPEC"], "size" : 1 , "items" : [ - {"name" : "TitleText" , "value_type" : "STRING", "size_type" : "ALL"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TLMIXPAR b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TLMIXPAR deleted file mode 100644 index deb87cae32..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TLMIXPAR +++ /dev/null @@ -1,7 +0,0 @@ -{"name" : "TLMIXPAR" , "sections" : ["PROPS"], "size" : {"keyword" : "MISCIBLE" , "item" : "NTMISC"} , "items" : - [ - {"name" : "TL_VISCOSITY_PARAMETER" , "value_type" : "DOUBLE" , "dimension" : "1"}, - {"name" : "TL_DENSITY_PARAMETER" , "value_type" : "DOUBLE" , "dimension" : "1"} - ] -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TNUM b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TNUM deleted file mode 100644 index c407456727..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TNUM +++ /dev/null @@ -1,4 +0,0 @@ -{"name" : "TNUM" , - "deck_name_regex":"TNUM(F|S).{1,3}", - "sections" : ["REGIONS"], - "data" : {"value_type" : "INT" }} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TOPS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TOPS deleted file mode 100644 index b17db69fbf..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TOPS +++ /dev/null @@ -1 +0,0 @@ -{"name" : "TOPS" , "sections" : ["GRID"], "data" : {"value_type" : "DOUBLE", "dimension":"Length" }} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TRACER b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TRACER deleted file mode 100644 index dc4a4c8d42..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TRACER +++ /dev/null @@ -1,7 +0,0 @@ -{"name" : "TRACER" , "sections" : ["PROPS"], "items" : [ - {"name" : "NAME" , "value_type" : "STRING"}, - {"name" : "FLUID" , "value_type" : "STRING"}, - {"name" : "UNIT" , "value_type" : "STRING"}, - {"name" : "SOLUTION_PHASE" , "value_type" : "STRING"}, - {"name" : "NUM_PART_TABLE" , "value_type" : "INT"}, - {"name" : "ADSORB_PHASE" , "value_type" : "STRING"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TRACERS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TRACERS deleted file mode 100644 index d62fdc0a6e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TRACERS +++ /dev/null @@ -1,8 +0,0 @@ -{"name" : "TRACERS" , "sections" : ["RUNSPEC"], "size" : 1 , "items" : [ - {"name" : "MAX_OIL_TRACERS" , "value_type" : "INT" , "default" : 0}, - {"name" : "MAX_WATER_TRACERS" , "value_type" : "INT" , "default" : 0}, - {"name" : "MAX_GAS_TRACERS" , "value_type" : "INT" , "default" : 0}, - {"name" : "MAX_ENV_TRACERS" , "value_type" : "INT" , "default" : 0}, - {"name" : "NUMERIC_DIFF" , "value_type" : "STRING" , "default" : "NODIFF"}, - {"name" : "MAX_ITER" , "value_type" : "INT" , "default" : 12}, - {"name" : "MIN_ITER" , "value_type" : "INT" , "default" : 1}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TRANX b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TRANX deleted file mode 100644 index 2652c0362a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TRANX +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "TRANX", - "sections": ["EDIT"], - "data": { - "value_type": "DOUBLE", - "dimension" : "Transmissibility" - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TRANY b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TRANY deleted file mode 100644 index f0430582c8..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TRANY +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "TRANY", - "sections": ["EDIT"], - "data": { - "value_type": "DOUBLE", - "dimension" : "Transmissibility" - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TRANZ b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TRANZ deleted file mode 100644 index 1fcce58e12..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TRANZ +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "TRANZ", - "sections": ["EDIT"], - "data": { - "value_type": "DOUBLE", - "dimension" : "Transmissibility" - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TSTEP b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TSTEP deleted file mode 100644 index db34dbc5f2..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TSTEP +++ /dev/null @@ -1,8 +0,0 @@ -{"name" : "TSTEP" , - "sections" : ["SCHEDULE"], - "size" : 1, - "items" : [{ - "name" : "step_list" , - "value_type" : "DOUBLE" , - "dimension" : "Timestep", - "size_type" : "ALL"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TUNING b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TUNING deleted file mode 100644 index 8c37922529..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TUNING +++ /dev/null @@ -1,34 +0,0 @@ -{"name" : "TUNING" , "size" : 3, "sections" : ["SCHEDULE"] , "records" : [ - [{"name" : "TSINIT" , "value_type" : "DOUBLE", "dimension" : "Time" , "default" : 1.0}, - {"name" : "TSMAXZ" , "value_type" : "DOUBLE", "dimension" : "Time" , "default" : 365.0}, - {"name" : "TSMINZ", "value_type" : "DOUBLE" , "dimension" : "Time" , "default" : 0.1}, - {"name" : "TSMCHP", "value_type" : "DOUBLE" , "dimension" : "Time" , "default" : 0.15}, - {"name" : "TSFMAX", "value_type" : "DOUBLE" , "default" : 3.0}, - {"name" : "TSFMIN", "value_type" : "DOUBLE" , "default" : 0.3}, - {"name" : "TSFCNV", "value_type" : "DOUBLE" , "default" : 0.1}, - {"name" : "TFDIFF", "value_type" : "DOUBLE" , "default" : 1.25}, - {"name" : "THRUPT", "value_type" : "DOUBLE" , "default" : 1.0E20}, - {"name" : "TMAXWC", "value_type" : "DOUBLE" , "dimension" : "Time"}], - [{"name" : "TRGTTE" , "value_type" : "DOUBLE", "default" : 0.1}, - {"name" : "TRGCNV" , "value_type" : "DOUBLE", "default" : 0.001}, - {"name" : "TRGMBE" , "value_type" : "DOUBLE", "default" : 1.0E-7}, - {"name" : "TRGLCV" , "value_type" : "DOUBLE", "default" : 0.0001}, - {"name" : "XXXTTE" , "value_type" : "DOUBLE", "default" : 10.0}, - {"name" : "XXXCNV" , "value_type" : "DOUBLE", "default" : 0.01}, - {"name" : "XXXMBE" , "value_type" : "DOUBLE", "default" : 1.0E-6}, - {"name" : "XXXLCV" , "value_type" : "DOUBLE", "default" : 0.001}, - {"name" : "XXXWFL" , "value_type" : "DOUBLE", "default" : 0.001}, - {"name" : "TRGFIP" , "value_type" : "DOUBLE", "default" : 0.025}, - {"name" : "TRGSFT" , "value_type" : "DOUBLE"}, - {"name" : "THIONX" , "value_type" : "DOUBLE", "default" : 0.01}, - {"name" : "TRWGHT" , "value_type" : "INT", "default" : 1}], - [{"name" : "NEWTMX" , "value_type" : "INT", "default" : 12}, - {"name" : "NEWTMN" , "value_type" : "INT", "default" : 1}, - {"name" : "LITMAX" , "value_type" : "INT", "default" : 25}, - {"name" : "LITMIN" , "value_type" : "INT", "default" : 1}, - {"name" : "MXWSIT" , "value_type" : "INT", "default" : 8}, - {"name" : "MXWPIT" , "value_type" : "INT", "default" : 8}, - {"name" : "DDPLIM" , "value_type" : "DOUBLE", "dimension" : "Pressure" , "default" : 1.0E6}, - {"name" : "DDSLIM" , "value_type" : "DOUBLE", "default" : 1.0E6}, - {"name" : "TRGDPR" , "value_type" : "DOUBLE", "dimension" : "Pressure" , "default" : 1.0E6}, - {"name" : "XXXDPR" , "value_type" : "DOUBLE", "dimension" : "Pressure"}]]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TVDP b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TVDP deleted file mode 100644 index eb58d4509b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/T/TVDP +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name" : "TVDP", - "sections" : ["SOLUTION"], - "deck_name_regex" : "TVDP.+", - "size" : { - "keyword":"EQLDIMS" , "item":"NTTRVD" - }, - "items" : [{ - "name" : "table", - "value_type" : "DOUBLE", - "size_type" : "ALL", - "dimension" : ["Length" , "ContextDependent"] - }] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/U/UDADIMS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/U/UDADIMS deleted file mode 100644 index ae64cb0274..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/U/UDADIMS +++ /dev/null @@ -1,6 +0,0 @@ -{"name" : "UDADIMS" , "sections" : ["RUNSPEC"], -"size" : 1 , -"items" : [ - {"name" : "NUM_UDQ_REPLACE" , "value_type" : "INT" , "default": 0}, - {"name" : "IGNORED" , "value_type" : "INT" , "default": 0}, - {"name" : "TOTAL_UDQ_UNIQUE" , "value_type" : "INT" , "default": 100}]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/U/UDQDIMS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/U/UDQDIMS deleted file mode 100644 index 2d2b35035e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/U/UDQDIMS +++ /dev/null @@ -1,14 +0,0 @@ -{"name" : "UDQDIMS" , "sections" : ["RUNSPEC"], -"size" : 1 , -"items" : [ - {"name" : "MAX_FUNCTIONS", "value_type" : "INT" , "default" : 16}, - {"name" : "MAX_ITEMS", "value_type" : "INT" , "default" : 16}, - {"name" : "MAX_CONNECTIONS", "value_type" : "INT" , "default" : 0}, - {"name" : "MAX_FIELDS", "value_type" : "INT" , "default" : 0}, - {"name" : "MAX_GROUP", "value_type" : "INT" , "default" : 0}, - {"name" : "MAX_REGION", "value_type" : "INT" , "default" : 0}, - {"name" : "MAX_SEGMENT", "value_type" : "INT" , "default" : 0}, - {"name" : "MAX_WELL", "value_type" : "INT" , "default" : 0}, - {"name" : "MAX_AQUIFER", "value_type" : "INT" , "default" : 0}, - {"name" : "MAX_BLOCK", "value_type" : "INT" , "default" : 0}, - {"name" : "RESTART_NEW_SEED", "value_type" : "STRING" , "default" : "N"}]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/U/UNIFIN b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/U/UNIFIN deleted file mode 100644 index a9af1bb4e7..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/U/UNIFIN +++ /dev/null @@ -1 +0,0 @@ -{"name" : "UNIFIN", "sections" : ["RUNSPEC"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/U/UNIFOUT b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/U/UNIFOUT deleted file mode 100644 index 9722e252b9..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/U/UNIFOUT +++ /dev/null @@ -1 +0,0 @@ -{"name" : "UNIFOUT", "sections" : ["RUNSPEC"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/V/VAPOIL b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/V/VAPOIL deleted file mode 100644 index 0404cd345d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/V/VAPOIL +++ /dev/null @@ -1 +0,0 @@ -{"name" : "VAPOIL", "sections" : ["RUNSPEC"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/V/VAPPARS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/V/VAPPARS deleted file mode 100644 index 956a6524c2..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/V/VAPPARS +++ /dev/null @@ -1,3 +0,0 @@ -{"name" : "VAPPARS" , "sections" : ["SOLUTION", "SCHEDULE"], "size" : 1 , "items" : [ - {"name" : "OIL_VAP_PROPENSITY" , "value_type" : "DOUBLE"}, - {"name" : "OIL_DENSITY_PROPENSITY" , "value_type" : "DOUBLE"}]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/V/VFPIDIMS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/V/VFPIDIMS deleted file mode 100644 index 51b184a26d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/V/VFPIDIMS +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "VFPIDIMS" , "sections" : ["RUNSPEC"], "size" : 1 , "items" : [ - {"name" : "MAX_FLOW_TABLE" , "value_type" : "INT" , "default" : 0}, - {"name" : "MAX_THP_TABLE" , "value_type" : "INT" , "default" : 0}, - {"name" : "MAX_INJ_VFP_TABLE" , "value_type" : "INT" , "default" : 0}]} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/V/VFPINJ b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/V/VFPINJ deleted file mode 100644 index 4d47b85a40..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/V/VFPINJ +++ /dev/null @@ -1,15 +0,0 @@ -{"name" : "VFPINJ" , - "sections" : ["SCHEDULE"], - "size" : "UNKNOWN" , - "records" : [ -[{"name" : "TABLE" , "value_type" : "INT"}, - {"name" : "DATUM_DEPTH" , "value_type" : "DOUBLE" , "dimension" : "Length"}, - {"name" : "RATE_TYPE" , "value_type" : "STRING"}, - {"name" : "PRESSURE_DEF" , "value_type" : "STRING" , "default" : "THP"}, - {"name" : "UNITS" , "value_type" : "STRING"}, - {"name" : "BODY_DEF" , "value_type" : "STRING" , "default" : "BHP"}], -[{"name" : "FLOW_VALUES" , "value_type" : "DOUBLE" , "size_type" : "ALL"}], -[{"name" : "THP_VALUES" , "value_type" : "DOUBLE" , "size_type" : "ALL"}], -[{"name" : "THP_INDEX" , "value_type" : "INT"}, - {"name" : "VALUES" , "value_type" : "DOUBLE" , "size_type" : "ALL"}] -]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/V/VFPPDIMS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/V/VFPPDIMS deleted file mode 100644 index 25a6fd7843..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/V/VFPPDIMS +++ /dev/null @@ -1,8 +0,0 @@ -{"name" : "VFPPDIMS" , "sections" : ["RUNSPEC"], "size" : 1 , "items" : [ - {"name" : "MAX_FLOW_TABLE" , "value_type" : "INT" , "default" : 0}, - {"name" : "MAX_THP_TABLE" , "value_type" : "INT" , "default" : 0}, - {"name" : "MAX_WCT_TABLE" , "value_type" : "INT" , "default" : 0}, - {"name" : "MAX_GCT_TABLE" , "value_type" : "INT" , "default" : 0}, - {"name" : "MAX_ALQ_TABLE" , "value_type" : "INT" , "default" : 0}, - {"name" : "MAX_PROD_VFP_TABLE" , "value_type" : "INT" , "default" : 0}]} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/V/VFPPROD b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/V/VFPPROD deleted file mode 100644 index d06832390e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/V/VFPPROD +++ /dev/null @@ -1,24 +0,0 @@ -{"name" : "VFPPROD" , - "sections" : ["SCHEDULE"], - "size" : "UNKNOWN" , - "records" : [ -[{"name" : "TABLE" , "value_type" : "INT"}, - {"name" : "DATUM_DEPTH" , "value_type" : "DOUBLE" , "dimension" : "Length"}, - {"name" : "RATE_TYPE" , "value_type" : "STRING"}, - {"name" : "WFR" , "value_type" : "STRING"}, - {"name" : "GFR" , "value_type" : "STRING"}, - {"name" : "PRESSURE_DEF" , "value_type" : "STRING" , "default" : "THP"}, - {"name" : "ALQ_DEF" , "value_type" : "STRING"}, - {"name" : "UNITS" , "value_type" : "STRING"}, - {"name" : "BODY_DEF" , "value_type" : "STRING" , "default" : "BHP"}], -[{"name" : "FLOW_VALUES" , "value_type" : "DOUBLE" , "size_type" : "ALL"}], -[{"name" : "THP_VALUES" , "value_type" : "DOUBLE" , "size_type" : "ALL"}], -[{"name" : "WFR_VALUES" , "value_type" : "DOUBLE" , "size_type" : "ALL"}], -[{"name" : "GFR_VALUES" , "value_type" : "DOUBLE" , "size_type" : "ALL"}], -[{"name" : "ALQ_VALUES" , "value_type" : "DOUBLE" , "size_type" : "ALL"}], -[{"name" : "THP_INDEX" , "value_type" : "INT"}, - {"name" : "WFR_INDEX" , "value_type" : "INT"}, - {"name" : "GFR_INDEX" , "value_type" : "INT"}, - {"name" : "ALQ_INDEX" , "value_type" : "INT"}, - {"name" : "VALUES" , "value_type" : "DOUBLE" , "size_type" : "ALL"}] -]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/V/VISCREF b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/V/VISCREF deleted file mode 100644 index 2aea06d066..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/V/VISCREF +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "VISCREF", - "sections" : ["PROPS"], - "size" : {"keyword":"TABDIMS" , "item":"NTPVT"}, - "items": [ - {"name":"REFERENCE_PRESSURE", "value_type" : "DOUBLE", "dimension":"Pressure" }, - {"name":"REFERENCE_RS", "value_type" : "DOUBLE", "dimension":"GasDissolutionFactor" } - ] -} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WATER b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WATER deleted file mode 100644 index d6212d9de0..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WATER +++ /dev/null @@ -1 +0,0 @@ -{"name" : "WATER", "sections" : ["RUNSPEC"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WATVISCT b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WATVISCT deleted file mode 100644 index c186be4626..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WATVISCT +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "WATVISCT", - "sections": ["PROPS"], - "size" : { - "keyword": "TABDIMS", - "item" : "NTPVT" - }, - "items" : [{ - "name":"DATA", - "value_type": "DOUBLE", - "size_type": "ALL", - - "dimension" : ["Temperature", "Viscosity"] - }] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WCONHIST b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WCONHIST deleted file mode 100644 index 2e813f04d5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WCONHIST +++ /dev/null @@ -1,12 +0,0 @@ -{"name" : "WCONHIST", "sections" : ["SCHEDULE"], "items" : - [{"name" : "WELL" , "value_type" : "STRING"}, - {"name" : "STATUS" , "value_type" : "STRING" , "default" : "OPEN"}, - {"name" : "CMODE" , "value_type" : "STRING"}, - {"name" : "ORAT" , "value_type" : "DOUBLE", "default" : 0.0, "dimension" : "LiquidSurfaceVolume/Time"}, - {"name" : "WRAT" , "value_type" : "DOUBLE" , "default" : 0.0, "dimension" : "LiquidSurfaceVolume/Time"}, - {"name" : "GRAT" , "value_type" : "DOUBLE" , "default" : 0.0, "dimension" : "GasSurfaceVolume/Time"}, - {"name" : "VFPTable" , "value_type" : "INT" , "default" : 0.0 , "comment":"The default is a state variable"}, - {"name" : "Lift" , "value_type" : "DOUBLE" , "default" : 0.0 , "comment":"The default is a state variable"}, - {"name" : "THP" , "value_type" : "DOUBLE" , "default" : 0.0 , "dimension" : "Pressure"}, - {"name" : "BHP" , "value_type" : "DOUBLE" , "default" : 0.0 ,"dimension" : "Pressure"}, - {"name" : "NGLRAT" , "value_type" : "DOUBLE" , "default" : 0.0 ,"dimension" : "LiquidSurfaceVolume/Time"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WCONINJ b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WCONINJ deleted file mode 100644 index 85e2343172..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WCONINJ +++ /dev/null @@ -1 +0,0 @@ -{"name" : "WCONINJ" , "sections" : ["SCHEDULE"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WCONINJE b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WCONINJE deleted file mode 100644 index 3581c33c48..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WCONINJE +++ /dev/null @@ -1,16 +0,0 @@ -{"name" : "WCONINJE" , "sections" : ["SCHEDULE"], "items" : [ - {"name" : "WELL" , "value_type" : "STRING" }, - {"name" : "TYPE" , "value_type" : "STRING" }, - {"name" : "STATUS" , "value_type" : "STRING" , "default" : "OPEN"}, - {"name" : "CMODE" , "value_type" : "STRING" }, - {"name" : "RATE" , "value_type" : "DOUBLE" , "dimension" : "ContextDependent"}, - {"name" : "RESV" , "value_type" : "DOUBLE" , "dimension" : "ReservoirVolume/Time"}, - {"name" : "BHP" , "value_type" : "DOUBLE" , "dimension" : "Pressure" , "default" : 6891}, - {"name" : "THP" , "value_type" : "DOUBLE" , "dimension" : "Pressure"}, - {"name" : "VFP_TABLE" , "value_type" : "INT" , "default" : 0}, - {"name" : "VAPOIL_C" , "value_type" : "DOUBLE" , "default" : 0}, - {"name" : "GAS_STEAM_RATIO" , "value_type" : "DOUBLE" , "default" : 0}, - {"name" : "SURFACE_OIL_FRACTION" , "value_type" : "DOUBLE" , "default" : 0}, - {"name" : "SURFACE_GAS_FRACTION" , "value_type" : "DOUBLE" , "default" : 0}, - {"name" : "OIL_STEAM_RATIO" , "value_type" : "DOUBLE" , "default" : 0} -]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WCONINJH b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WCONINJH deleted file mode 100644 index 65ec88d8e5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WCONINJH +++ /dev/null @@ -1,14 +0,0 @@ -{"name" : "WCONINJH" , "sections" : ["SCHEDULE"], "items" : [ - {"name" : "WELL" , "value_type" : "STRING" }, - {"name" : "TYPE" , "value_type" : "STRING" }, - {"name" : "STATUS" , "value_type" : "STRING" , "default" : "OPEN"}, - {"name" : "RATE" , "value_type" : "DOUBLE" , "dimension" : "ContextDependent"}, - {"name" : "BHP" , "value_type" : "DOUBLE" , "dimension" : "Pressure"}, - {"name" : "THP" , "value_type" : "DOUBLE" , "dimension" : "Pressure"}, - {"name" : "VFP_TABLE" , "value_type" : "INT" , "default" : 0}, - {"name" : "VAPOIL_C" , "value_type" : "DOUBLE" , "default" : 0}, - {"name" : "SURFACE_OIL_FRACTION" , "value_type" : "DOUBLE" , "default" : 0}, - {"name" : "SURFACE_WATER_FRACTION" , "value_type" : "DOUBLE" , "default" : 0}, - {"name" : "SURFACE_GAS_FRACTION" , "value_type" : "DOUBLE" , "default" : 0}, - {"name" : "CMODE" , "value_type" : "STRING", "default" : "RATE" } -]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WCONPROD b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WCONPROD deleted file mode 100644 index 7ddaf873f2..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WCONPROD +++ /dev/null @@ -1,22 +0,0 @@ -{"name" : "WCONPROD" , "sections" : ["SCHEDULE"], "items" : - [{"name" : "WELL" , "value_type" : "STRING"}, - {"name" : "STATUS" , "value_type" : "STRING" , "default" : "OPEN"}, - {"name" : "CMODE" , "value_type" : "STRING"}, - {"name" : "ORAT" , "value_type" : "DOUBLE", "default" : 0.0 , "dimension" : "LiquidSurfaceVolume/Time"}, - {"name" : "WRAT" , "value_type" : "DOUBLE" , "default" : 0.0 , "dimension" : "LiquidSurfaceVolume/Time"}, - {"name" : "GRAT" , "value_type" : "DOUBLE" , "default" : 0.0 , "dimension" : "GasSurfaceVolume/Time"}, - {"name" : "LRAT" , "value_type" : "DOUBLE" , "default" : 0.0 , "dimension" : "LiquidSurfaceVolume/Time"}, - {"name" : "RESV" , "value_type" : "DOUBLE" , "default" : 0.0 , "dimension" : "LiquidSurfaceVolume/Time"}, - {"name" : "BHP" , "value_type" : "DOUBLE" , "default" : 0.0 , "dimension" : "Pressure"}, - {"name" : "THP" , "value_type" : "DOUBLE" , "default" : 0.0 , "dimension" : "Pressure"}, - {"name" : "VFP_TABLE" , "value_type" : "INT" , "default" : 0 }, - {"name" : "ALQ" , "value_type" : "DOUBLE" , "default" : 0.0 }, - {"name" : "E300_ITEM13" , "value_type" : "DOUBLE"}, - {"name" : "E300_ITEM14" , "value_type" : "DOUBLE"}, - {"name" : "E300_ITEM15" , "value_type" : "DOUBLE"}, - {"name" : "E300_ITEM16" , "value_type" : "DOUBLE"}, - {"name" : "E300_ITEM17" , "value_type" : "DOUBLE"}, - {"name" : "E300_ITEM18" , "value_type" : "DOUBLE"}, - {"name" : "E300_ITEM19" , "value_type" : "DOUBLE"}, - {"name" : "E300_ITEM20" , "value_type" : "DOUBLE"}]} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WDRILTIM b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WDRILTIM deleted file mode 100644 index 558ba5740c..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WDRILTIM +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "WDRILTIM" , "sections" : ["SCHEDULE"], "items": - [{"name" : "WELL" , "value_type" : "STRING"}, - {"name" : "DRILL_TIME" , "value_type" : "DOUBLE" , "dimension" : "Time" , "default_value" : 0.0}, - {"name" : "WORKOVER_CLOSE" , "value_type" : "STRING" , "default_value" : "NO"}, - {"name" : "COMPARTMENT" , "value_type" : "INT" , "default_value" : 0}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WECON b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WECON deleted file mode 100644 index 61179fad5b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WECON +++ /dev/null @@ -1,17 +0,0 @@ -{"name" : "WECON" , "sections" : ["SCHEDULE"], "items" : - [{"name" : "WELL" , "value_type" : "STRING"}, - {"name" : "MIN_OIL_PRODUCTION", "value_type" : "DOUBLE", "default" : 0.0 , "dimension" : "LiquidSurfaceVolume/Time"}, - {"name" : "MIN_GAS_PRODUCTION", "value_type" : "DOUBLE", "default" : 0.0 , "dimension" : "GasSurfaceVolume/Time"}, - {"name" : "MAX_WATER_CUT", "value_type" : "DOUBLE", "default" : 0.0}, - {"name" : "MAX_GAS_OIL_RATIO", "value_type" : "DOUBLE", "default" : 0.0}, - {"name" : "MAX_WATER_GAS_RATIO", "value_type" : "DOUBLE", "default" : 0.0}, - {"name" : "WORKOVER_RATIO_LIMIT", "value_type" : "STRING", "default" : "NONE"}, - {"name" : "END_RUN_FLAG", "value_type" : "STRING", "default" : "NO"}, - {"name" : "FOLLOW_ON_WELL", "value_type" : "STRING", "default" : "'"}, - {"name" : "LIMITED_QUANTITY", "value_type" : "STRING", "default" : "RATE"}, - {"name" : "SECOND_MAX_WATER_CUT", "value_type" : "DOUBLE", "default" : 0.0}, - {"name" : "WORKOVER_SECOND_WATER_CUT_LIMIT", "value_type" : "STRING"}, - {"name" : "MAX_GAS_LIQUID_RATIO", "value_type" : "DOUBLE", "default" : 0.0}, - {"name" : "MIN_LIQUID_PRODCUTION_RATE", "value_type" : "DOUBLE", "default" : 0.0, "dimension" : "LiquidSurfaceVolume/Time"}, - {"name" : "MAX_TEMP", "value_type" : "DOUBLE", "dimension" : "Temperature"}, - {"name" : "MIN_RES_FLUID_RATE", "value_type" : "DOUBLE", "dimension" : "ReservoirVolume/Time", "default" : 0.0}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WELLDIMS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WELLDIMS deleted file mode 100644 index 1a29d5674c..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WELLDIMS +++ /dev/null @@ -1,15 +0,0 @@ - {"name" : "WELLDIMS", "sections" : ["RUNSPEC"], "size" : 1, "items" : [ - {"name" : "MAXWELLS" , "value_type" : "INT" , "default" : 0}, - {"name" : "MAXCONN" , "value_type" : "INT" , "default" : 0}, - {"name" : "MAXGROUPS" , "value_type" : "INT" , "default" : 0}, - {"name" : "MAX_GROUPSIZE" , "value_type" : "INT" , "default" : 0}, - {"name" : "MAX_STAGES" , "value_type" : "INT" , "default" : 5}, - {"name" : "MAX_STREAMS" , "value_type" : "INT" , "default" : 10}, - {"name" : "MAX_MIXTURES" , "value_type" : "INT" , "default" : 5}, - {"name" : "MAX_SEPARATORS" , "value_type" : "INT" , "default" : 4}, - {"name" : "MAX_MIXTURE_ITEMS" , "value_type" : "INT" , "default" : 3}, - {"name" : "MAX_COMPLETION_X" , "value_type" : "INT" , "default" : 0}, - {"name" : "MAX_WELLIST_PR_WELL" , "value_type" : "INT" , "default" : 1}, - {"name" : "MAX_DYNAMIC_WELLIST" , "value_type" : "INT" , "default" : 1}, - {"name" : "MAX_SECONDARY_WELLS" , "value_type" : "INT" , "default" : 1} - ]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WELL_PROBE b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WELL_PROBE deleted file mode 100644 index 1b49d63229..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WELL_PROBE +++ /dev/null @@ -1,254 +0,0 @@ -{ - "name" : "WELL_PROBE", - "sections" : ["SUMMARY"], - - "comment": "E100 only", - "deck_names" : [ - "WOFRL", - "WOPRL", - "WOPR", - "WOPRH", - "WOPRT", - "WOPRF", - "WOPRS", - "WOPT", - "WOPTL", - "WOPTH", - "WOPTF", - "WOPTS", - "WOIR", - "WOIRH", - "WOIRT", - "WOIT", - "WOITL", - "WOITH", - "WOPP", - "WOPP2", - "WOPI", - "WOPI2", - "WOPGR", - "WOIGR", - "WWFRL", - "WWPRL", - "WWPR", - "WWPRH", - "WWPRT", - "WWPT", - "WWPTL", - "WWPTH", - "WWIR", - "WWIRH", - "WWIRT", - "WWIT", - "WWIRL", - "WWITL", - "WWITH", - "WWPP", - "WWPP2", - "WWPI", - "WWIP", - "WWPI2", - "WWIP2", - "WWPGR", - "WWIGR", - "WWPIR", - "WGFRL", - "WGPRL", - "WGPR", - "WGPRH", - "WGPRT", - "WGPRF", - "WGPRS", - "WGPT", - "WGPTL", - "WGPTH", - "WGPTF", - "WGPTS", - "WGIR", - "WGIRH", - "WGIRT", - "WGIT", - "WGIRL", - "WGITL", - "WGITH", - "WGPP", - "WGPP2", - "WGPPS", - "WGPPS2", - "WGPPF", - "WGPPF2", - "WGPI", - "WGIP", - "WGPI2", - "WGIP2", - "WGPGR", - "WGIGR", - "WGLIR", - "WGQ", - "WLFRL", - "WLPR", - "WLPRH", - "WLPRT", - "WLPT", - "WLPTL", - "WLPTH", - "WJPR", - "WJPRH", - "WJPRT", - "WJPT", - "WJPTH", - "WVFRL", - "WVIRL", - "WVPR", - "WVPRT", - "WVPT", - "WVPTL", - "WVPGR", - "WVIR", - "WVIRT", - "WVIT", - "WVITL", - "WWCT", - "WWCTL", - "WWCTH", - "WGOR", - "WGORL", - "WGORH", - "WOGR", - "WOGRL", - "WOGRH", - "WWGR", - "WWGRL", - "WWGRH", - "WGLR", - "WGLRL", - "WGLRH", - "WBGLR", - "WBHP", - "WBHPH", - "WTHP", - "WTHPH", - "WPI", - "WBP", - "WBP4", - "WBP5", - "WBP9", - "WPI1", - "WPI4", - "WPI5", - "WPI9", - "WHD", - "WHDF", - "WSTAT", - "WMCTL", - "WMCON", - "WEPR", - "WEPT", - "WEFF", - "WEFFG", - "WALQ", - "WMVFP", - "WTHT", - "WMMW", - "WPWE0", - "WPWE1", - "WPWE2", - "WPWE3", - "WPWE4", - "WPWE5", - "WPWE6", - "WPWE7", - "WPWEM", - "WDRPR", - "WAPI", - "WSPR", - "WSPT", - "WSIR", - "WSIT", - "WSPC", - "WSIC", - "WTPRANI", - "WTPTANI", - "WTIRANI", - "WTITANI", - "WTPRCAT", - "WTPTCAT", - "WTIRCAT", - "WTITCAT", - "WTPCHEA", - "WTICHEA", - "WTPRHEA", - "WTPTHEA", - "WTIRHEA", - "WTITHEA", - "WTPR", - "WTPT", - "WTPC", - "WTIR", - "WTIT", - "WTIC", - "WTIRF", - "WTIRS", - "WTPRF", - "WTPRS", - "WTITF", - "WTITS", - "WTPTF", - "WTPTS", - "WTICF", - "WTICS", - "WTPCF", - "WTPCS", - "WMPR", - "WMPT", - "WMIR", - "WMIT", - "WTPRFOA", - "WTPTFOA", - "WTIRFOA", - "WTITFOA", - "WGDC", - "NGOPAS", - "WGPRFP", - "WTHPFP", - "WBHPFP", - "WGLIR", - "WOGLR", - "WGCV", - "WGQ", - "WEPR", - "WEPT", - "WEDC", - "WCPR", - "WCPC", - "WCPT", - "WCIR", - "WCIC", - "WCIT", - "WSPR", - "WSPT", - "WSIR", - "WSIT", - "WNPR", - "WNPT", - "WNIR", - "WNIT", - "WTPRSUR", - "WTPTSUR", - "WTIRSUR", - "WTITSUR", - "WTPRALK", - "WTPTALK", - "WTIRALK", - "WTITALK" - ], - "comment":"Some keywords need to be suffixed by a number, some with the tracer name...", - "deck_name_regex":"WU.+|(WBHWC|WGFWC|WOFWC|WWFWC)[1-9][0-9]?|WTPR.+|WTPT.+|WTPC.+|WTIR.+|WTIT.+|WTIC.+", - - "size" : 1 , - "items" : [{ - "name" : "WELLS" , - "value_type" : "STRING" , - "size_type" : "ALL" - }] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WELOPEN b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WELOPEN deleted file mode 100644 index adb501d8f4..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WELOPEN +++ /dev/null @@ -1,9 +0,0 @@ -{"name" : "WELOPEN", "sections" : ["SCHEDULE"], "items" : [ - {"name" : "WELL" , "value_type" : "STRING"}, - {"name" : "STATUS" , "value_type" : "STRING" , "default" : "OPEN"}, - {"name" : "I" , "value_type" : "INT" }, - {"name" : "J" , "value_type" : "INT" }, - {"name" : "K" , "value_type" : "INT" }, - {"name" : "C1" , "value_type" : "INT" }, - {"name" : "C2" , "value_type" : "INT" } -]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WELSEGS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WELSEGS deleted file mode 100644 index d5985906d3..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WELSEGS +++ /dev/null @@ -1,22 +0,0 @@ -{"name" : "WELSEGS" , "sections" : ["SCHEDULE"] , "records" : [ - [{"name" : "WELL" , "value_type" : "STRING"}, - {"name" : "DEPTH" , "value_type" : "DOUBLE" , "dimension" : "Length"}, - {"name" : "LENGTH", "value_type" : "DOUBLE" , "dimension" : "Length" , "default" : 0}, - {"name" : "WELLBORE_VOLUME", "value_type" : "DOUBLE" , "dimension" : "Length*Length*Length" , "default" : 1e-5}, - {"name" : "INFO_TYPE", "value_type" : "STRING"}, - {"name" : "PRESSURE_COMPONENTS", "value_type" : "STRING" , "default" : "HFA"}, - {"name" : "FLOW_MODEL", "value_type" : "STRING" , "default" : "HO"}, - {"name" : "TOP_X", "value_type" : "DOUBLE" , "dimension" : "Length" , "default" : 0}, - {"name" : "TOP_Y", "value_type" : "DOUBLE" , "dimension" : "Length" , "default" : 0}], - [{"name" : "SEGMENT1" , "value_type" : "INT" }, - {"name" : "SEGMENT2" , "value_type" : "INT" }, - {"name" : "BRANCH" , "value_type" : "INT" }, - {"name" : "JOIN_SEGMENT" , "value_type" : "INT" }, - {"name" : "SEGMENT_LENGTH" , "value_type" : "DOUBLE" , "dimension" : "Length"}, - {"name" : "DEPTH_CHANGE" , "value_type" : "DOUBLE" , "dimension" : "Length"}, - {"name" : "DIAMETER" , "value_type" : "DOUBLE" , "dimension" : "Length"}, - {"name" : "ROUGHNESS" , "value_type" : "DOUBLE" , "dimension" : "Length"}, - {"name" : "AREA" , "value_type" : "DOUBLE" , "dimension" : "Length*Length"}, - {"name" : "VOLUME" , "value_type" : "DOUBLE" , "dimension" : "Length*Length*Length"}, - {"name" : "LENGTH_X", "value_type" : "DOUBLE" , "dimension" : "Length" , "default" : 0}, - {"name" : "LENGTH_Y", "value_type" : "DOUBLE" , "dimension" : "Length" , "default" : 0}]]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WELSPECS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WELSPECS deleted file mode 100644 index 63c5e2da7f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WELSPECS +++ /dev/null @@ -1,19 +0,0 @@ -{"name" : "WELSPECS" , "sections" : ["SCHEDULE"], "items" : [ - {"name" : "WELL" , "value_type" : "STRING" }, - {"name" : "GROUP" , "value_type" : "STRING" }, - {"name" : "HEAD_I" , "value_type" : "INT"}, - {"name" : "HEAD_J" , "value_type" : "INT"}, - {"name" : "REF_DEPTH" , "value_type" : "DOUBLE", "dimension" : "Length"}, - {"name" : "PHASE" , "value_type" : "STRING"}, - {"name" : "D_RADIUS" , "value_type" : "DOUBLE" , "default" : 0, "dimension" : "Length"}, - {"name" : "INFLOW_EQ" , "value_type" : "STRING" , "default" : "STD"}, - {"name" : "AUTO_SHUTIN" , "value_type" : "STRING" , "default" : "SHUT"}, - {"name" : "CROSSFLOW" , "value_type" : "STRING" , "default" : "YES"}, - {"name" : "P_TABLE" , "value_type" : "INT" , "default" : 0}, - {"name" : "DENSITY_CALC" , "value_type" : "STRING" , "default" : "SEG"}, - {"name" : "FIP_REGION" , "value_type" : "INT" , "default" : 0}, - {"name" : "FRONTSIM1" , "value_type" : "STRING"}, - {"name" : "FRONTSIM2" , "value_type" : "STRING"}, - {"name" : "well_model" , "value_type" : "STRING" , "default" : "STD"}, - {"name" : "POLYMER_TABLE" , "value_type" : "INT" , "default" : 0}]} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WELTARG b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WELTARG deleted file mode 100644 index 0e813b7dc4..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WELTARG +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "WELTARG" , "sections" : ["SCHEDULE"], "items" : [ - {"name" : "WELL" , "value_type" : "STRING" }, - {"name" : "CMODE" , "value_type" : "STRING" }, - {"name" : "NEW_VALUE" , "value_type" : "DOUBLE"} -]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WGRUPCON b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WGRUPCON deleted file mode 100644 index 898f390205..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WGRUPCON +++ /dev/null @@ -1,7 +0,0 @@ -{"name" : "WGRUPCON", "sections" : ["SCHEDULE"], "items" : [ - {"name" : "WELL" , "value_type" : "STRING"}, - {"name" : "GROUP_CONTROLLED" , "value_type" : "STRING" , "default" : "YES"}, - {"name" : "GUIDE_RATE" , "value_type" : "DOUBLE" , "default" : -1}, - {"name" : "PHASE" , "value_type" : "STRING"}, - {"name" : "SCALING_FACTOR" , "value_type" : "DOUBLE" , "default" : 1.0} -]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WHISTCTL b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WHISTCTL deleted file mode 100644 index acadc632fd..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WHISTCTL +++ /dev/null @@ -1,4 +0,0 @@ -{"name" : "WHISTCTL", "sections" : ["SCHEDULE"], "size" : 1, "items" : [ - {"name" : "CMODE" , "value_type" : "STRING" , "default" : "NONE" }, - {"name" : "BPH_TERMINATE" , "value_type" : "STRING" , "default" : "NO"} -]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WLIFT b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WLIFT deleted file mode 100644 index 609e1a0a80..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WLIFT +++ /dev/null @@ -1,14 +0,0 @@ -{"name" : "WLIFT" , "sections" : ["SCHEDULE"], -"items" : -[{"name" : "WELL" , "value_type" : "STRING"}, - {"name" : "TRIGGER_LIMIT" , "value_type" : "DOUBLE" , "default_value" : 0.0, "comment" : "The dimension here depends on the phase - must be handled in the application"}, - {"name" : "TRIGGRE_PHASE" , "value_type" : "STRING" , "default_value" : "OIL"}, - {"name" : "NEW_VFP_TABLE" , "value_type" : "INT" , "default_value" : 0}, - {"name" : "NEW_ALQ_VALUE" , "value_type" : "DOUBLE" , "default_value" : 0.0 , "comment" : "The dimension here depends on the phase - must be handled in the application"}, - {"name" : "NEW_WEFAC" , "value_type" : "DOUBLE" , "default_value" : 0.0}, - {"name" : "WWCT_LIMIT" , "value_type" : "DOUBLE" , "default_value" : 0.0}, - {"name" : "NEW_THP_LIMIT" , "value_type" : "DOUBLE" , "default_value" : 0.0 , "dimension" : "Pressure"}, - {"name" : "WGOR_LIMIT" , "value_type" : "DOUBLE" , "default_value" : 0.0}, - {"name" : "ALQ_SHIFT" , "value_type" : "DOUBLE" , "default_value" : 1e20}, - {"name" : "THP_SHIFT" , "value_type" : "DOUBLE" , "default_value" : 1e20 , "dimension" : "Pressure"}]} - \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WPAVE b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WPAVE deleted file mode 100644 index 7ba22644ef..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WPAVE +++ /dev/null @@ -1,6 +0,0 @@ -{"name" : "WPAVE" , "sections" : ["SCHEDULE"], "size" : 1 , "items" : [ - {"name" : "WEIGTH_FACTOR1" , "value_type" : "DOUBLE" , "default" : 0.5}, - {"name" : "WEIGTH_FACTOR2" , "value_type" : "DOUBLE" , "default" : 1.0}, - {"name" : "DEPTH_CORRECTION" , "value_type" : "STRING" , "default" : "WELL"}, - {"name" : "CONNECTION" , "value_type" : "STRING" , "default" : "OPEN"} -]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WPIMULT b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WPIMULT deleted file mode 100644 index a5bbe3647f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WPIMULT +++ /dev/null @@ -1,8 +0,0 @@ -{"name" : "WPIMULT" , "sections" : ["SCHEDULE"] , "items" : - [{"name" : "WELL" , "value_type" : "STRING"}, - {"name" : "WELLPI" , "value_type" : "DOUBLE" , "default" : 1.0}, - {"name" : "I" , "value_type" : "INT" }, - {"name" : "J" , "value_type" : "INT" }, - {"name" : "K" , "value_type" : "INT" }, - {"name" : "FIRST", "value_type" : "INT"}, - {"name" : "LAST", "value_type" : "INT"}]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WPITAB b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WPITAB deleted file mode 100644 index 13c6d26fa7..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WPITAB +++ /dev/null @@ -1,3 +0,0 @@ - {"name" : "WPITAB" , "sections" : ["SCHEDULE"], "items" : [ - {"name" : "WELL" , "value_type" : "STRING" }, - {"name" : "PI" , "value_type" : "DOUBLE" , "default" : 0}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WPOLYMER b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WPOLYMER deleted file mode 100644 index c7caf5c098..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WPOLYMER +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name" : "WPOLYMER", - "sections" : [ "SPECIAL", "SCHEDULE" ], - "items" : - [{"name" : "WELL" , "value_type" : "STRING"}, - {"name" : "POLYMER_CONCENTRATION" , "value_type" : "DOUBLE" , "dimension" : "PolymerDensity"}, - {"name" : "SALT_CONCENTRATION" , "value_type" : "DOUBLE" , "dimension" : "PolymerDensity"}, - {"name" : "GROUP_POLYMER_CONCENTRATION" , "value_type" : "STRING"}, - {"name" : "GROUP_SALT_CONCENTRATION" , "value_type" : "STRING"} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WRFT b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WRFT deleted file mode 100644 index cc2e2cb875..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WRFT +++ /dev/null @@ -1,3 +0,0 @@ -{"name" : "WRFT" , "sections" : ["SCHEDULE"], "items" : [ - {"name" : "WELL" , "value_type" : "STRING"} - ]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WRFTPLT b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WRFTPLT deleted file mode 100644 index f970946f3e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WRFTPLT +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "WRFTPLT" , "sections" : ["SCHEDULE"], "items" : [ - {"name" : "WELL" , "value_type" : "STRING"}, - {"name" : "OUTPUT_RFT" , "value_type" : "STRING" , "default" : "NO"}, - {"name" : "OUTPUT_PLT" , "value_type" : "STRING" , "default" : "NO"}, - {"name" : "OUTPUT_SEGMENT" , "value_type" : "STRING" , "default" : "NO"}]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WSEGDIMS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WSEGDIMS deleted file mode 100644 index 55a21f5fca..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WSEGDIMS +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "WSEGDIMS" , "sections" : ["RUNSPEC"] , "size" : 1 , "items" : - [{"name" : "NSWLMX" , "value_type" : "INT" , "default" : 0}, - {"name" : "NSEGMX" , "value_type" : "INT" , "default" : 1}, - {"name" : "NLBRMX" , "value_type" : "INT" , "default" : 1}, - {"name" : "NCRDMX" , "value_type" : "INT" , "default" : 0}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WSOLVENT b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WSOLVENT deleted file mode 100644 index c2162a1d94..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WSOLVENT +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name" : "WSOLVENT", - "sections" : ["SCHEDULE" ], - "items" : - [{"name" : "WELL" , "value_type" : "STRING"}, - {"name" : "SOLVENT_FRACTION" , "value_type" : "DOUBLE" , "dimension" : "1"} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WTEMP b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WTEMP deleted file mode 100644 index be909f7f36..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WTEMP +++ /dev/null @@ -1,4 +0,0 @@ -{"name" : "WTEMP" , "sections" : ["SCHEDULE"] , -"items" : [ - {"name" : "WELL" , "value_type" : "STRING"}, - {"name" : "TEMP" , "value_type" : "DOUBLE", "dimension" : "Temperature"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WTEST b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WTEST deleted file mode 100644 index 9c7dc491e0..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WTEST +++ /dev/null @@ -1,7 +0,0 @@ -{"name" : "WTEST" , "sections" : ["SCHEDULE"], "items" : [ - {"name" : "well" , "value_type" : "STRING"}, - {"name" : "interval" , "value_type" : "DOUBLE" }, - {"name" : "reason" , "value_type" : "STRING"}, - {"name" : "TEST_NUM" , "value_type" : "INT" , "default" : 0}, - {"name" : "START_TIME" , "value_type" : "DOUBLE" , "default" : 0}]} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WTRACER b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WTRACER deleted file mode 100644 index ca90fa38ef..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/W/WTRACER +++ /dev/null @@ -1,6 +0,0 @@ -{"name" : "WTRACER" , "sections" : ["SCHEDULE"], "items" : [ - {"name" : "WELL" , "value_type" : "STRING"}, - {"name" : "TRACER" , "value_type" : "STRING"}, - {"name" : "CONCENTRATION" , "value_type" : "DOUBLE"}, - {"name" : "CUM_TRACER_FACTOR" , "value_type" : "DOUBLE"}, - {"name" : "PRODUCTION_GROUP" , "value_type" : "STRING" , "comment" : "Defaulted means: use the concentration from the CONCENTRATION item"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/Z/ZCORN b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/Z/ZCORN deleted file mode 100644 index 523ae7792e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/Z/ZCORN +++ /dev/null @@ -1 +0,0 @@ -{"name" : "ZCORN", "sections" : ["GRID"], "data" : {"value_type" : "DOUBLE", "dimension" : "Length" }} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/Z/ZIPPY2 b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/Z/ZIPPY2 deleted file mode 100644 index e4ec58d61c..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/000_Eclipse100/Z/ZIPPY2 +++ /dev/null @@ -1 +0,0 @@ -{"name" : "ZIPPY2" , "sections" : ["SCHEDULE"], "size" : 1 , "items" : [{"name" : "SETTINGS", "value_type" : "STRING" , "size_type" : "ALL"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/B/BLOCK_PROBE300 b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/B/BLOCK_PROBE300 deleted file mode 100644 index e139c8b7b9..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/B/BLOCK_PROBE300 +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name" : "BLOCK_PROBE300" , - "sections" : ["SUMMARY"], - "comment": "E300 only", - "deck_names" : [ - "BTEMP" - ], - "items" : [ - {"name": "I" , "value_type" : "INT"}, - {"name": "J" , "value_type" : "INT"}, - {"name": "K" , "value_type" : "INT"} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/C/COMPS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/C/COMPS deleted file mode 100644 index 4d6138d6e8..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/C/COMPS +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "COMPS", - "sections": ["RUNSPEC"], - "size": 1, - "items": [ - {"name" : "NUM_COMPS" , "value_type" : "INT"} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/C/CREF b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/C/CREF deleted file mode 100644 index 97e950e2f2..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/C/CREF +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "CREF", - "sections": ["PROPS"], - "size" : { - "keyword": "TABDIMS", - "item" : "NUM_STATE_EQ" - }, - - "comment": "Note that the size of the records of this keyword is unknown. That's because", - "comment": "the keyword specifies one value per component (as determined by the COMPS keyword)", - "comment": "and this also cannot (yet?) be specified.", - "comment": "Also note that we don't provide a default here because the parser does not allow ", - "comment": "to set defaults for items of unspecified size.", - "items" : [{ - "name": "COMPRESSIBILITY", - "value_type": "DOUBLE", - "size_type": "ALL", - "dimension": ["1/Pressure"] - }] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/C/CREFS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/C/CREFS deleted file mode 100644 index 65a6c3f94a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/C/CREFS +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "CREFS", - "sections": ["PROPS"], - "size" : { - "keyword": "TABDIMS", - "item" : "NUM_STATE_EQ" - }, - - "comment": "Note that the size of the records of this keyword is unknown. That's because", - "comment": "the keyword specifies one value per component (as determined by the COMPS keyword)", - "comment": "and this also cannot (yet?) be specified.", - "comment": "Also note that we don't provide a default here because the parser does not allow ", - "comment": "to set defaults for items of unspecified size.", - "items" : [{ - "name": "COMPRESSIBILITY", - "value_type": "DOUBLE", - "size_type": "ALL", - "dimension": ["1/Pressure"] - }] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/D/DREF b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/D/DREF deleted file mode 100644 index 9a5ef978c3..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/D/DREF +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "DREF", - "sections": ["PROPS"], - "size" : { - "keyword": "TABDIMS", - "item" : "NUM_STATE_EQ" - }, - - "comment": "We don't provide a default here because the documented value ('80% the density of water')", - "comment": "cannot currently be implemented on a low level in the parser", - "comment": "Also note that the size of the records of this keyword is unknown. That's because", - "comment": "the keyword specifies one value per component (as determined by the COMPS keyword)", - "comment": "and this also cannot (yet?) be specified.", - "items" : [{ - "name": "DENSITY", - "value_type": "DOUBLE", - "size_type": "ALL", - "dimension" : ["Density"] - }] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/D/DREFS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/D/DREFS deleted file mode 100644 index 1f905acbb3..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/D/DREFS +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "DREFS", - "sections": ["PROPS"], - "size" : { - "keyword": "TABDIMS", - "item" : "NUM_STATE_EQ" - }, - - "comment": "We don't provide a default here because the documented value ('80% the density of water')", - "comment": "cannot currently be implemented on a low level in the parser", - "comment": "Also note that the size of the records of this keyword is unknown. That's because", - "comment": "the keyword specifies one value per component (as determined by the COMPS keyword)", - "comment": "and this also cannot (yet?) be specified.", - "items" : [{ - "name": "DENSITY", - "value_type": "DOUBLE", - "size_type": "ALL", - "dimension" : ["Density"] - }] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/D/DZV b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/D/DZV deleted file mode 100644 index 7d5d1375c6..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/D/DZV +++ /dev/null @@ -1 +0,0 @@ -{"name":"DZV", "sections" : ["GRID"], "data" : {"value_type" : "DOUBLE", "dimension":"Length" }} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/G/GASVISCT b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/G/GASVISCT deleted file mode 100644 index 5e46f29589..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/G/GASVISCT +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "GASVISCT", - "sections": ["PROPS"], - "size" : { - "keyword": "TABDIMS", - "item" : "NTPVT" - }, - "items" : [{ - "name":"DATA", - "value_type": "DOUBLE", - "size_type": "ALL", - - "comment":"The number of columns in this table depends on the number of gas components", - "comment":"(given by the COMPS keyword). Fun!", - "dimension" : ["ContextDependent"] - }] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/M/MW b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/M/MW deleted file mode 100644 index fa055a9cb7..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/M/MW +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "MW", - "sections": ["PROPS"], - "size" : { - "keyword": "TABDIMS", - "item" : "NUM_STATE_EQ" - }, - - "comment": "Note that the size of the records of this keyword is unknown. That's because", - "comment": "the keyword specifies one value per component (as determined by the COMPS keyword)", - "comment": "and this also cannot (yet?) be specified.", - "comment": "Also note that there is no dimension for this item because there is no unit for 'molar weight' yet", - "items" : [{ - "name": "MOLAR_WEIGHT", - "value_type": "DOUBLE", - "size_type": "ALL" - }] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/M/MWS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/M/MWS deleted file mode 100644 index 229844903b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/M/MWS +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "MWS", - "sections": ["PROPS"], - "size" : { - "keyword": "TABDIMS", - "item" : "NUM_STATE_EQ" - }, - - "comment": "Note that the size of the records of this keyword is unknown. That's because", - "comment": "the keyword specifies one value per component (as determined by the COMPS keyword)", - "comment": "and this also cannot (yet?) be specified.", - "comment": "Also note that there is no dimension for this item because there is no unit for 'molar weight' yet", - "items" : [{ - "name": "MOLAR_WEIGHT", - "value_type": "DOUBLE", - "size_type": "ALL" - }] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/O/OILCOMPR b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/O/OILCOMPR deleted file mode 100644 index 3f9216145b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/O/OILCOMPR +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "OILCOMPR", - "sections": ["PROPS"], - "size" : { - "keyword": "TABDIMS", - "item" : "NTPVT" - }, - "items" : [ - {"name" : "COMPRESSIBILITY" , "value_type" : "DOUBLE", "default": 0.0 }, - {"name" : "EXPANSION_COEFF_LINEAR" , "value_type" : "DOUBLE", "dimension" : "1/AbsoluteTemperature", "default": 0.0}, - {"name" : "EXPANSION_COEFF_QUADRATIC" , "value_type" : "DOUBLE", "dimension" : "1/AbsoluteTemperature*AbsoluteTemperature", "default": 0.0} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/O/OILMW b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/O/OILMW deleted file mode 100644 index ef50bd315c..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/O/OILMW +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "OILMW", - "sections": ["PROPS"], - "size" : { - "keyword": "TABDIMS", - "item" : "NTPVT" - }, - - "items" : [ - {"name" : "MOLAR_WEIGHT" , "value_type" : "DOUBLE"} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/O/OILVTIM b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/O/OILVTIM deleted file mode 100644 index cf18688a83..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/O/OILVTIM +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name" : "OILVTIM" , - "sections" : ["PROPS"], - - "items" : [ - {"name": "INTERPOLATION_METHOD" , "value_type" : "STRING"} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/P/PREF b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/P/PREF deleted file mode 100644 index 63333cea16..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/P/PREF +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "PREF", - "sections": ["PROPS"], - "size" : { - "keyword": "TABDIMS", - "item" : "NUM_STATE_EQ" - }, - - "comment": "Note that the size of the records of this keyword is unknown. That's because", - "comment": "the keyword specifies one value per component (as determined by the COMPS keyword)", - "comment": "and this also cannot (yet?) be specified.", - "comment": "Also note that there is no default for this item because the default is specified by STCOND", - "items" : [{ - "name": "PRESSURE", - "value_type": "DOUBLE", - "size_type": "ALL", - "dimension": ["Pressure"] - }] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/P/PREFS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/P/PREFS deleted file mode 100644 index a482b842f2..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/P/PREFS +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "PREFS", - "sections": ["PROPS"], - "size" : { - "keyword": "TABDIMS", - "item" : "NUM_STATE_EQ" - }, - - "comment": "Note that the size of the records of this keyword is unknown. That's because", - "comment": "the keyword specifies one value per component (as determined by the COMPS keyword)", - "comment": "and this also cannot (yet?) be specified.", - "comment": "Also note that there is no default for this item because the default is specified by STCOND", - "items" : [{ - "name": "PRESSURE", - "value_type": "DOUBLE", - "size_type": "ALL", - "dimension": ["Pressure"] - }] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/S/STCOND b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/S/STCOND deleted file mode 100644 index 31a04b19e3..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/S/STCOND +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "STCOND", - "sections": ["PROPS"], - "size": 1, - "items": [ - {"name": "TEMPERATURE", "value_type": "DOUBLE", "dimension": "Temperature", "default": 60}, - {"name": "PRESSURE", "value_type": "DOUBLE", "dimension": "Pressure", "default": 14.6959} -]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/T/TEMPI b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/T/TEMPI deleted file mode 100644 index 55717c1f39..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/T/TEMPI +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "TEMPI", - "sections": ["SOLUTION"], - "data": { - "value_type": "DOUBLE", - "dimension" : "Temperature" - } -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/T/TEMPVD b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/T/TEMPVD deleted file mode 100644 index 24dc66ddca..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/T/TEMPVD +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name" : "TEMPVD", - "sections" : [ "PROPS", "SOLUTION" ], - "size" : { - "keyword" : "EQLDIMS" , - "item" : "NTEQUL" - }, - "items" : [ - { - "name":"DATA", - "value_type":"DOUBLE", - "size_type" : "ALL", - "dimension" : ["Length","Temperature"] - } - ] -} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/T/THERMAL b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/T/THERMAL deleted file mode 100644 index 612e2e892b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/T/THERMAL +++ /dev/null @@ -1 +0,0 @@ -{"name" : "THERMAL", "sections" : ["RUNSPEC"]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/T/THERMEX1 b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/T/THERMEX1 deleted file mode 100644 index 22a6a8f9fe..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/T/THERMEX1 +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "THERMEX1", - "sections": ["PROPS"], - "size" : { - "keyword": "TABDIMS", - "item" : "NUM_STATE_EQ" - }, - - "comment": "Note that the size of the records of this keyword is unknown. That's because", - "comment": "the keyword specifies one value per component (as determined by the COMPS keyword)", - "comment": "and this also cannot (yet?) be specified.", - "items" : [{ - "name": "EXPANSION_COEFF", - "value_type": "DOUBLE", - "size_type": "ALL", - "dimension": ["1/AbsoluteTemperature"], - "default": 0.0 - }] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/T/TREF b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/T/TREF deleted file mode 100644 index 0b3f107572..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/T/TREF +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "TREF", - "sections": ["PROPS"], - "size" : { - "keyword": "TABDIMS", - "item" : "NUM_STATE_EQ" - }, - - "comment": "Note that the size of the records of this keyword is unknown. That's because", - "comment": "the keyword specifies one value per component (as determined by the COMPS keyword)", - "comment": "and this also cannot (yet?) be specified.", - "comment": "Also note that there is no default for this item because the default is specified by STCOND", - "items" : [{ - "name": "TEMPERATURE", - "value_type": "DOUBLE", - "size_type": "ALL", - "dimension": ["AbsoluteTemperature"] - }] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/T/TREFS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/T/TREFS deleted file mode 100644 index b255527e5e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/T/TREFS +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "TREFS", - "sections": ["PROPS"], - "size" : { - "keyword": "TABDIMS", - "item" : "NUM_STATE_EQ" - }, - - "comment": "Note that the size of the records of this keyword is unknown. That's because", - "comment": "the keyword specifies one value per component (as determined by the COMPS keyword)", - "comment": "and this also cannot (yet?) be specified.", - "comment": "Also note that there is no default for this item because the default is specified by STCOND", - "items" : [{ - "name": "TEMPERATURE", - "value_type": "DOUBLE", - "size_type": "ALL", - "dimension": ["AbsoluteTemperature"] - }] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/W/WATDENT b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/W/WATDENT deleted file mode 100644 index d8d3bfa1e7..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/W/WATDENT +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "WATDENT", - "sections": ["PROPS"], - "size" : { - "keyword": "TABDIMS", - "item" : "NTPVT" - }, - - "comment": "The default for the second item is different from the value given by the Eclipse RM, but for this", - "comment": "item, the RM is _very_ inconsistent. (it says that the default for the second item is 1.67/degR in", - "comment": "FIELD units which is the same the 3e-4/K for METRIC but four orders of magnitude off!)", - "items" : [ - {"name" : "REFERENCE_TEMPERATURE" , "value_type" : "DOUBLE", "dimension" : "AbsoluteTemperature", "default": 527.67 }, - {"name" : "EXPANSION_COEFF_LINEAR" , "value_type" : "DOUBLE", "dimension" : "1/AbsoluteTemperature", "default": 1.67e-4 }, - {"name" : "EXPANSION_COEFF_QUADRATIC" , "value_type" : "DOUBLE", "dimension" : "1/AbsoluteTemperature*AbsoluteTemperature", "default": 9.26e-7 } - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/Z/ZFACT1 b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/Z/ZFACT1 deleted file mode 100644 index 1c29fcd742..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/Z/ZFACT1 +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "ZFACT1", - "sections": ["PROPS"], - "size" : { - "keyword": "TABDIMS", - "item" : "NUM_STATE_EQ" - }, - - "comment": "Note that the size of the records of this keyword is unknown. That's because", - "comment": "the keyword specifies one value per component (as determined by the COMPS keyword)", - "comment": "and this also cannot (yet?) be specified.", - "comment": "Also note that there is no default for this item because the parser does not (yet?)", - "comment": "support default values for items of unknown size", - "items" : [{ - "name": "Z0", - "value_type": "DOUBLE", - "size_type": "ALL", - "dimension": ["1"] - }] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/Z/ZFACT1S b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/Z/ZFACT1S deleted file mode 100644 index 1abb4ec5dd..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/Z/ZFACT1S +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "ZFACT1S", - "sections": ["PROPS"], - "size" : { - "keyword": "TABDIMS", - "item" : "NUM_STATE_EQ" - }, - - "comment": "Note that the size of the records of this keyword is unknown. That's because", - "comment": "the keyword specifies one value per component (as determined by the COMPS keyword)", - "comment": "and this also cannot (yet?) be specified.", - "comment": "Also note that there is no default for this item because the parser does not (yet?)", - "comment": "support default values for items of unknown size", - "items" : [{ - "name": "Z0", - "value_type": "DOUBLE", - "size_type": "ALL", - "dimension": ["1"] - }] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/Z/ZFACTOR b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/Z/ZFACTOR deleted file mode 100644 index 6ee221ebfe..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/Z/ZFACTOR +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "ZFACTOR", - "sections": ["PROPS"], - "size" : { - "keyword": "TABDIMS", - "item" : "NUM_STATE_EQ" - }, - - "comment": "Note that the size of the records of this keyword is unknown. That's because", - "comment": "the keyword specifies one value per component (as determined by the COMPS keyword)", - "comment": "and this also cannot (yet?) be specified.", - "comment": "Also note that there is no default for this item because the parser does not (yet?)", - "comment": "support default values for items of unknown size", - "items" : [{ - "name": "Z0", - "value_type": "DOUBLE", - "size_type": "ALL", - "dimension": ["1"] - }] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/Z/ZFACTORS b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/Z/ZFACTORS deleted file mode 100644 index c96ad727d7..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/001_Eclipse300/Z/ZFACTORS +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "ZFACTORS", - "sections": ["PROPS"], - "size" : { - "keyword": "TABDIMS", - "item" : "NUM_STATE_EQ" - }, - - "comment": "Note that the size of the records of this keyword is unknown. That's because", - "comment": "the keyword specifies one value per component (as determined by the COMPS keyword)", - "comment": "and this also cannot (yet?) be specified.", - "comment": "Also note that there is no default for this item because the parser does not (yet?)", - "comment": "support default values for items of unknown size", - "items" : [{ - "name": "Z0", - "value_type": "DOUBLE", - "size_type": "ALL", - "dimension": ["1"] - }] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/002_Frontsim/N/NOGRAV b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/002_Frontsim/N/NOGRAV deleted file mode 100644 index 5a2ab847be..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/002_Frontsim/N/NOGRAV +++ /dev/null @@ -1 +0,0 @@ -{"name" : "NOGRAV", "sections" : [ "RUNSPEC" ] } diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/900_OPM/G/GCOMPIDX b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/900_OPM/G/GCOMPIDX deleted file mode 100644 index cdb3a7aaab..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/900_OPM/G/GCOMPIDX +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "GCOMPIDX", - "sections": ["RUNSPEC"], - "size": 1, - "items": [ - {"name" : "GAS_COMPONENT_INDEX" , "value_type" : "INT"} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/900_OPM/M/MINPVFIL b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/900_OPM/M/MINPVFIL deleted file mode 100644 index 3460610236..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/900_OPM/M/MINPVFIL +++ /dev/null @@ -1 +0,0 @@ -{"name" : "MINPVFIL" , "sections" : ["GRID"], "size" : 1 , "items" : [{"name" : "VALUE" , "value_type" : "DOUBLE" , "default" : 0.000001, "dimension" : "LiquidSurfaceVolume"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/900_OPM/O/OCOMPIDX b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/900_OPM/O/OCOMPIDX deleted file mode 100644 index 0a1c5e8d7b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/900_OPM/O/OCOMPIDX +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "OCOMPIDX", - "sections": ["RUNSPEC"], - "size": 1, - "items": [ - {"name" : "OIL_COMPONENT_INDEX" , "value_type" : "INT"} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/900_OPM/T/TLPMIXPA b/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/900_OPM/T/TLPMIXPA deleted file mode 100644 index c859278b22..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/opm/parser/share/keywords/900_OPM/T/TLPMIXPA +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "TLPMIXPA" , "sections" : ["PROPS"], "size" : {"keyword" : "MISCIBLE" , "item" : "NTMISC"}, - "items" : [ - {"name":"DATA", "value_type":"DOUBLE", "size_type" : "ALL" , "dimension" : ["Pressure","1"]} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/redhat/opm-parser.spec b/ThirdParty/custom-opm-parser/opm-parser/redhat/opm-parser.spec deleted file mode 100644 index 7680ca4046..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/redhat/opm-parser.spec +++ /dev/null @@ -1,142 +0,0 @@ -# -# spec file for package opm-parser -# - -%define tag 0test0 - -Name: opm-parser -Version: 2016.10 -Release: 0 -Summary: Open Porous Media - parser library -License: GPL-3.0 -Group: Development/Libraries/C and C++ -Url: http://www.opm-project.org/ -Source0: https://github.com/OPM/%{name}/archive/release/%{version}/%{tag}.tar.gz#/%{name}-%{version}.tar.gz -BuildRequires: blas-devel lapack-devel dune-common-devel -BuildRequires: git suitesparse-devel doxygen bc opm-common-devel -%{?el6:BuildRequires: cmake28 devtoolset-3-toolchain boost148-devel} -%{?!el6:BuildRequires: cmake gcc gcc-gfortran gcc-c++ boost-devel python-ert.ecl python-cwrap} -BuildRequires: tinyxml-devel ert.ecl-devel -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Requires: libopm-parser1 = %{version} - -%description -The Open Porous Media (OPM) initiative provides a set of open-source tools centered around the simulation of flow and transport of fluids in porous media. The goal of the initiative is to establish a sustainable environment for the development of an efficient and well-maintained software suite. - -%package -n libopm-parser1 -Summary: Open Porous Media - parser library -Group: System/Libraries - -%description -n libopm-parser1 -The Open Porous Media (OPM) initiative provides a set of open-source tools centered around the simulation of flow and transport of fluids in porous media. The goal of the initiative is to establish a sustainable environment for the development of an efficient and well-maintained software suite. - -%package devel -Summary: Development and header files for opm-parser -Group: Development/Libraries/C and C++ -Requires: %{name} = %{version} -Requires: blas-devel -Requires: lapack-devel -Requires: suitesparse-devel -Requires: libopm-parser1 = %{version} - -%description devel -This package contains the development and header files for opm-parser - -%package doc -Summary: Documentation files for opm-parser -Group: Documentation -BuildArch: noarch - -%description doc -This package contains the documentation files for opm-parser - -%package bin -Summary: Applications in opm-parser -Group: Scientific -Requires: %{name} = %{version} -Requires: libopm-parser1 = %{version} - -%description bin -This package contains the applications for opm-parser - -%{?!el6: - -%package -n libopm-cparser1 -Summary: Open Porous Media - parser library -Group: System/Libraries - -%package -n libopm-cparser1-devel -Summary: Development and header files for opm-cparser -Group: Development/Libraries/C and C++ -Requires: %{name} = %{version} -Requires: libopm-cparser1 = %{version} - -%description -n libopm-cparser1-devel -This package contains the development and header files for opm-cparser - -%description -n libopm-cparser1 -The Open Porous Media (OPM) initiative provides a set of open-source tools centered around the simulation of flow and transport of fluids in porous media. The goal of the initiative is to establish a sustainable environment for the development of an efficient and well-maintained software suite. This package contains the c wrapping library for the parser. - -%package -n python-opm-parser -Summary: ERT - Ensemble based Reservoir Tool - Python bindings -Group: Python/Libraries -Requires: libomp-cparser1 python-cwrap - -%description -n python-opm-parser -OPM parser python bindings. -} - -%prep -%setup -q -n %{name}-release-%{version}-%{tag} - -# consider using -DUSE_VERSIONED_DIR=ON if backporting -%build -%{?el6:scl enable devtoolset-3 bash} -%{?el6:cmake28} %{?!el6:cmake} -DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSTRIP_DEBUGGING_SYMBOLS=ON -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_INSTALL_DOCDIR=share/doc/%{name}-%{version} -DUSE_RUNPATH=OFF %{?el6:-DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-3/root/usr/bin/g++ -DCMAKE_C_COMPILER=/opt/rh/devtoolset-3/root/usr/bin/gcc -DCMAKE_Fortran_COMPILER=/opt/rh/devtoolset-3/root/usr/bin/gfortran -DBOOST_LIBRARYDIR=%{_libdir}/boost148 -DBOOST_INCLUDEDIR=%{_includedir}/boost148} %{?!el6:-DENABLE_PYTHON=1} -make - -%install -make install DESTDIR=${RPM_BUILD_ROOT} - -%clean -rm -rf %{buildroot} - -%post -n libopm-parser1 -p /sbin/ldconfig - -%postun -n libopm-parser1 -p /sbin/ldconfig - -%files -%doc README.md - -%files doc -%{_docdir}/* - -%files -n libopm-parser1 -%defattr(-,root,root,-) -%{_libdir}/libopm*.so.* - -%files devel -%defattr(-,root,root,-) -%{_libdir}/libopm*.so -%{_prefix}/lib/dunecontrol/* -%{_libdir}/pkgconfig/* -%{_includedir}/* -%{_datadir}/cmake/* -%{_datadir}/opm/* - -%files bin -%{_bindir}/* - -%{?!el6: -%files -n libopm-cparser1 -%defattr(-,root,root,-) -%{_libdir}/libcopm*.so.* - -%files -n libopm-cparser1-devel -%defattr(-,root,root,-) -%{_libdir}/libcopm*.so - -%files -n python-opm-parser -%defattr(-,root,root,-) -/usr/lib/python2.7/site-packages/opm/* -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/config/directory1/Bpr b/ThirdParty/custom-opm-parser/opm-parser/testdata/config/directory1/Bpr deleted file mode 100644 index adf3de67df..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/config/directory1/Bpr +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name" : "BPR", - "sections":["SUMMARY"], - "items" : - [{"name": "I" , "size_type" : "SINGLE" , "value_type" : "INT"}, - {"name": "J" , "size_type" : "SINGLE" , "value_type" : "INT"}, - {"name": "K" , "size_type" : "SINGLE" , "value_type" : "INT"}] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/config/directory1/WWCT b/ThirdParty/custom-opm-parser/opm-parser/testdata/config/directory1/WWCT deleted file mode 100644 index c7c324bd78..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/config/directory1/WWCT +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name" : "WWCT", - "sections":["SUMMARY"], - "items" : [{"name" : "wells" , "size_type" : "ALL" , "value_type" : "STRING"}] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/config/directory1/subdir/DIMENS b/ThirdParty/custom-opm-parser/opm-parser/testdata/config/directory1/subdir/DIMENS deleted file mode 100644 index b3f6fddf9a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/config/directory1/subdir/DIMENS +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name" : "DIMENS", - "sections":["RUNSPEC"], - "size" : 1, - "items" : - [{"name": "NX" , "size_type" : "SINGLE" , "value_type" : "INT"}, - {"name": "NY" , "size_type" : "SINGLE" , "value_type" : "INT"}, - {"name": "NZ" , "size_type" : "SINGLE" , "value_type" : "INT"}] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/ACTION/ACTION.txt b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/ACTION/ACTION.txt deleted file mode 100644 index 3f56f40649..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/ACTION/ACTION.txt +++ /dev/null @@ -1,15 +0,0 @@ - -DIMENS -- /This is flagged as IGNORE_WARNING - and should give a warning at line: 6 - 10 10 10 / - -WCONHIST - 'OP_1' 'OPEN' 'ORAT' 4000.000 4.000 1.46402E+006 5* / - 'OP_2' 'OPEN' 'ORAT' 7998.000 2.000 1461075.000 5* / - 'OP_3' 'OPEN' 'ORAT' 7999.000 1.000 1471824.000 1 0.25 0.25 0.25 1* / -/ - - - - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/ACTION/ACTION_EXCEPTION.txt b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/ACTION/ACTION_EXCEPTION.txt deleted file mode 100644 index cb22b6c18b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/ACTION/ACTION_EXCEPTION.txt +++ /dev/null @@ -1,8 +0,0 @@ -THROW - -- This keyword should raise an exception in the parser - Some data / -/ - - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/BOX/BOXTEST1 b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/BOX/BOXTEST1 deleted file mode 100644 index 5e9772add0..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/BOX/BOXTEST1 +++ /dev/null @@ -1,197 +0,0 @@ -RUNSPEC - -DIMENS - 10 10 10 / - -GRID -DX -1000*1 / -DY -1000*1 / -DZ -1000*1 / -TOPS -100*1 / - -PERMX - 1000*1 / - -COPY - PERMX PERMZ / - PERMX PERMY / -/ - -ADD - PERMY 1 / -/ - -MULTIPLY - PERMZ 0.25 / -/ - -EQUALS - PORO 0.25 / -/ - -EDIT - -OIL -GAS - -TITLE -The title - -START -8 MAR 1998 / - -PROPS - -REGIONS - -FLUXNUM - 1000*1 / - -SATNUM - 1000*2 / - -PVTNUM - 1000*77 / - -COPY - SATNUM FIPNUM / -/ - -BOX - 1 2 1 2 1 2 / - -SATNUM - 8*10 / - - -COPY - SATNUM FIPNUM / -/ - -ENDBOX - -MULTIPLY - FIPNUM 2 / -/ - -BOX - 1 2 1 2 1 2 / - -MULTIPLY - FIPNUM 2 / -/ - -ENDBOX - - -EQUALS - PVTNUM 0 1 10 1 10 1 1 / - PVTNUM 1 1 10 1 10 2 2 / - PVTNUM 2 1 10 1 10 3 3 / - PVTNUM 3 1 10 1 10 4 4 / - PVTNUM 4 1 10 1 10 5 5 / - PVTNUM 5 1 10 1 10 6 6 / - PVTNUM 6 1 10 1 10 7 7 / - PVTNUM 7 1 10 1 10 8 8 / - PVTNUM 8 1 10 1 10 9 9 / - PVTNUM 9 1 10 1 10 10 10 / -/ - -EQUALS - EQLNUM 77 / -/ - -ADD - EQLNUM 0 1 10 1 10 1 1 / - EQLNUM 1 1 10 1 10 2 2 / - EQLNUM 2 1 10 1 10 3 3 / - EQLNUM 3 1 10 1 10 4 4 / - EQLNUM 4 1 10 1 10 5 5 / - EQLNUM 5 1 10 1 10 6 6 / - EQLNUM 6 1 10 1 10 7 7 / - EQLNUM 7 1 10 1 10 8 8 / - EQLNUM 8 1 10 1 10 9 9 / - EQLNUM 9 1 10 1 10 10 10 / -/ - - - - -BOX - 1 10 1 10 1 1 / - -ADD - EQLNUM 0 / -/ - -BOX - 1 10 1 10 2 2 / - -ADD - EQLNUM 1 / -/ - -BOX - 1 10 1 10 3 3 / - -ADD - EQLNUM 2 / -/ - -BOX - 1 10 1 10 4 4 / - -ADD - EQLNUM 3 / -/ - -BOX - 1 10 1 10 5 5 / - -ADD - EQLNUM 4 / -/ - -BOX - 1 10 1 10 6 6 / - -ADD - EQLNUM 5 / -/ - -BOX - 1 10 1 10 7 7 / - -ADD - EQLNUM 6 / -/ - -BOX - 1 10 1 10 8 8 / - -ADD - EQLNUM 7 / -/ - -BOX - 1 10 1 10 9 9 / - -ADD - EQLNUM 8 / -/ - -BOX - 1 10 1 10 10 10 / - -ADD - EQLNUM 9 / -/ - -SOLUTION - -SCHEDULE - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/BOX/BOXTEST2 b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/BOX/BOXTEST2 deleted file mode 100644 index 0e4b5a1fdb..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/BOX/BOXTEST2 +++ /dev/null @@ -1,46 +0,0 @@ -RUNSPEC - -DIMENS - 10 10 10 / - -GRID - - -EDIT - -OIL -GAS - -TITLE -The title - -START -8 MAR 1998 / - -PROPS - -REGIONS - -FLUXNUM - 1000*1 / - -SATNUM - 1000*2 / - -BOX - 1 2 1 2 1 2 / - -SATNUM - 8*10 / - -COPY - SATNUM FIPNUM * * 4 5 * 7/ -/ - - -ENDBOX - -SOLUTION - -SCHEDULE - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/BOX/BOXTEST3 b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/BOX/BOXTEST3 deleted file mode 100644 index b33e4bbbbd..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/BOX/BOXTEST3 +++ /dev/null @@ -1,39 +0,0 @@ -RUNSPEC - -DIMENS - 10 10 10 / - -GRID - -EDIT - -OIL -GAS - -TITLE -The title - -START -8 MAR 1998 / - -PROPS - -REGIONS - - -SATNUM - 1000*2 / - -BOX - 1 2 1 2 1 2 / - -SATNUM - 80*10 / -- Too many elements in BOX - - -ENDBOX - -SOLUTION - -SCHEDULE - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/DENSITY/DENSITY1 b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/DENSITY/DENSITY1 deleted file mode 100644 index 38effae900..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/DENSITY/DENSITY1 +++ /dev/null @@ -1,9 +0,0 @@ -FIELD - -TABDIMS - 1 2 30 24 10 20 / - -DENSITY - 500 1000 1 / - 5000 10000 10 / - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/END/END1.txt b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/END/END1.txt deleted file mode 100644 index e527913e37..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/END/END1.txt +++ /dev/null @@ -1,14 +0,0 @@ -OIL --- Comment - -END - -- This keyword should cause the parser to terminate -/ - -GAS --- Comment - - - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/END/ENDINC1.txt b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/END/ENDINC1.txt deleted file mode 100644 index ad24d2fbe8..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/END/ENDINC1.txt +++ /dev/null @@ -1,14 +0,0 @@ -OIL --- Comment - -ENDINC - -- This keyword should cause the parser to terminate - - -GAS --- Comment - - - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/EQUIL/EQUIL1 b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/EQUIL/EQUIL1 deleted file mode 100644 index 6350df2b3f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/EQUIL/EQUIL1 +++ /dev/null @@ -1,8 +0,0 @@ -EQLDIMS - 3 100 20 1 1 / - - -EQUIL - 2469 382.4 1705.0 0.0 500 0.0 1 1 20 / - 2469 382.4 1000.0 0.0 500 0.0 1 1 20 / - 2469 382.4 3000.0 0.0 500 0.0 1 1 20 / diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/GRID/CORNERPOINT.DATA b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/GRID/CORNERPOINT.DATA deleted file mode 100644 index e02db0bbd9..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/GRID/CORNERPOINT.DATA +++ /dev/null @@ -1,1197 +0,0 @@ -RUNSPEC - -DIMENS - 10 10 5 / - -GRID - -COORD - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.20000000E+02 0.10000000E+02 0.00000000E+00 - 0.00000000E+00 0.10000000E+02 0.00000000E+00 0.20000000E+02 - 0.20000000E+02 0.00000000E+00 0.00000000E+00 0.20000000E+02 - 0.00000000E+00 0.20000000E+02 0.30000000E+02 0.00000000E+00 - 0.00000000E+00 0.30000000E+02 0.00000000E+00 0.20000000E+02 - 0.40000000E+02 0.00000000E+00 0.00000000E+00 0.40000000E+02 - 0.00000000E+00 0.20000000E+02 0.50000000E+02 0.00000000E+00 - 0.00000000E+00 0.50000000E+02 0.00000000E+00 0.20000000E+02 - 0.60000000E+02 0.00000000E+00 0.00000000E+00 0.60000000E+02 - 0.00000000E+00 0.20000000E+02 0.70000000E+02 0.00000000E+00 - 0.00000000E+00 0.70000000E+02 0.00000000E+00 0.20000000E+02 - 0.80000000E+02 0.00000000E+00 0.00000000E+00 0.80000000E+02 - 0.00000000E+00 0.20000000E+02 0.90000000E+02 0.00000000E+00 - 0.00000000E+00 0.90000000E+02 0.00000000E+00 0.20000000E+02 - 0.10000000E+03 0.00000000E+00 0.00000000E+00 0.10000000E+03 - 0.00000000E+00 0.20000000E+02 0.00000000E+00 0.12000000E+02 - 0.00000000E+00 0.00000000E+00 0.12000000E+02 0.20000000E+02 - 0.10000000E+02 0.12000000E+02 0.00000000E+00 0.10000000E+02 - 0.12000000E+02 0.20000000E+02 0.20000000E+02 0.12000000E+02 - 0.00000000E+00 0.20000000E+02 0.12000000E+02 0.20000000E+02 - 0.30000000E+02 0.12000000E+02 0.00000000E+00 0.30000000E+02 - 0.12000000E+02 0.20000000E+02 0.40000000E+02 0.12000000E+02 - 0.00000000E+00 0.40000000E+02 0.12000000E+02 0.20000000E+02 - 0.50000000E+02 0.12000000E+02 0.00000000E+00 0.50000000E+02 - 0.12000000E+02 0.20000000E+02 0.60000000E+02 0.12000000E+02 - 0.00000000E+00 0.60000000E+02 0.12000000E+02 0.20000000E+02 - 0.70000000E+02 0.12000000E+02 0.00000000E+00 0.70000000E+02 - 0.12000000E+02 0.20000000E+02 0.80000000E+02 0.12000000E+02 - 0.00000000E+00 0.80000000E+02 0.12000000E+02 0.20000000E+02 - 0.90000000E+02 0.12000000E+02 0.00000000E+00 0.90000000E+02 - 0.12000000E+02 0.20000000E+02 0.10000000E+03 0.12000000E+02 - 0.00000000E+00 0.10000000E+03 0.12000000E+02 0.20000000E+02 - 0.00000000E+00 0.24000000E+02 0.00000000E+00 0.00000000E+00 - 0.24000000E+02 0.20000000E+02 0.10000000E+02 0.24000000E+02 - 0.00000000E+00 0.10000000E+02 0.24000000E+02 0.20000000E+02 - 0.20000000E+02 0.24000000E+02 0.00000000E+00 0.20000000E+02 - 0.24000000E+02 0.20000000E+02 0.30000000E+02 0.24000000E+02 - 0.00000000E+00 0.30000000E+02 0.24000000E+02 0.20000000E+02 - 0.40000000E+02 0.24000000E+02 0.00000000E+00 0.40000000E+02 - 0.24000000E+02 0.20000000E+02 0.50000000E+02 0.24000000E+02 - 0.00000000E+00 0.50000000E+02 0.24000000E+02 0.20000000E+02 - 0.60000000E+02 0.24000000E+02 0.00000000E+00 0.60000000E+02 - 0.24000000E+02 0.20000000E+02 0.70000000E+02 0.24000000E+02 - 0.00000000E+00 0.70000000E+02 0.24000000E+02 0.20000000E+02 - 0.80000000E+02 0.24000000E+02 0.00000000E+00 0.80000000E+02 - 0.24000000E+02 0.20000000E+02 0.90000000E+02 0.24000000E+02 - 0.00000000E+00 0.90000000E+02 0.24000000E+02 0.20000000E+02 - 0.10000000E+03 0.24000000E+02 0.00000000E+00 0.10000000E+03 - 0.24000000E+02 0.20000000E+02 0.00000000E+00 0.36000000E+02 - 0.00000000E+00 0.00000000E+00 0.36000000E+02 0.20000000E+02 - 0.10000000E+02 0.36000000E+02 0.00000000E+00 0.10000000E+02 - 0.36000000E+02 0.20000000E+02 0.20000000E+02 0.36000000E+02 - 0.00000000E+00 0.20000000E+02 0.36000000E+02 0.20000000E+02 - 0.30000000E+02 0.36000000E+02 0.00000000E+00 0.30000000E+02 - 0.36000000E+02 0.20000000E+02 0.40000000E+02 0.36000000E+02 - 0.00000000E+00 0.40000000E+02 0.36000000E+02 0.20000000E+02 - 0.50000000E+02 0.36000000E+02 0.00000000E+00 0.50000000E+02 - 0.36000000E+02 0.20000000E+02 0.60000000E+02 0.36000000E+02 - 0.00000000E+00 0.60000000E+02 0.36000000E+02 0.20000000E+02 - 0.70000000E+02 0.36000000E+02 0.00000000E+00 0.70000000E+02 - 0.36000000E+02 0.20000000E+02 0.80000000E+02 0.36000000E+02 - 0.00000000E+00 0.80000000E+02 0.36000000E+02 0.20000000E+02 - 0.90000000E+02 0.36000000E+02 0.00000000E+00 0.90000000E+02 - 0.36000000E+02 0.20000000E+02 0.10000000E+03 0.36000000E+02 - 0.00000000E+00 0.10000000E+03 0.36000000E+02 0.20000000E+02 - 0.00000000E+00 0.48000000E+02 0.00000000E+00 0.00000000E+00 - 0.48000000E+02 0.20000000E+02 0.10000000E+02 0.48000000E+02 - 0.00000000E+00 0.10000000E+02 0.48000000E+02 0.20000000E+02 - 0.20000000E+02 0.48000000E+02 0.00000000E+00 0.20000000E+02 - 0.48000000E+02 0.20000000E+02 0.30000000E+02 0.48000000E+02 - 0.00000000E+00 0.30000000E+02 0.48000000E+02 0.20000000E+02 - 0.40000000E+02 0.48000000E+02 0.00000000E+00 0.40000000E+02 - 0.48000000E+02 0.20000000E+02 0.50000000E+02 0.48000000E+02 - 0.00000000E+00 0.50000000E+02 0.48000000E+02 0.20000000E+02 - 0.60000000E+02 0.48000000E+02 0.00000000E+00 0.60000000E+02 - 0.48000000E+02 0.20000000E+02 0.70000000E+02 0.48000000E+02 - 0.00000000E+00 0.70000000E+02 0.48000000E+02 0.20000000E+02 - 0.80000000E+02 0.48000000E+02 0.00000000E+00 0.80000000E+02 - 0.48000000E+02 0.20000000E+02 0.90000000E+02 0.48000000E+02 - 0.00000000E+00 0.90000000E+02 0.48000000E+02 0.20000000E+02 - 0.10000000E+03 0.48000000E+02 0.00000000E+00 0.10000000E+03 - 0.48000000E+02 0.20000000E+02 0.00000000E+00 0.60000000E+02 - 0.00000000E+00 0.00000000E+00 0.60000000E+02 0.20000000E+02 - 0.10000000E+02 0.60000000E+02 0.00000000E+00 0.10000000E+02 - 0.60000000E+02 0.20000000E+02 0.20000000E+02 0.60000000E+02 - 0.00000000E+00 0.20000000E+02 0.60000000E+02 0.20000000E+02 - 0.30000000E+02 0.60000000E+02 0.00000000E+00 0.30000000E+02 - 0.60000000E+02 0.20000000E+02 0.40000000E+02 0.60000000E+02 - 0.00000000E+00 0.40000000E+02 0.60000000E+02 0.20000000E+02 - 0.50000000E+02 0.60000000E+02 0.00000000E+00 0.50000000E+02 - 0.60000000E+02 0.20000000E+02 0.60000000E+02 0.60000000E+02 - 0.00000000E+00 0.60000000E+02 0.60000000E+02 0.20000000E+02 - 0.70000000E+02 0.60000000E+02 0.00000000E+00 0.70000000E+02 - 0.60000000E+02 0.20000000E+02 0.80000000E+02 0.60000000E+02 - 0.00000000E+00 0.80000000E+02 0.60000000E+02 0.20000000E+02 - 0.90000000E+02 0.60000000E+02 0.00000000E+00 0.90000000E+02 - 0.60000000E+02 0.20000000E+02 0.10000000E+03 0.60000000E+02 - 0.00000000E+00 0.10000000E+03 0.60000000E+02 0.20000000E+02 - 0.00000000E+00 0.72000000E+02 0.00000000E+00 0.00000000E+00 - 0.72000000E+02 0.20000000E+02 0.10000000E+02 0.72000000E+02 - 0.00000000E+00 0.10000000E+02 0.72000000E+02 0.20000000E+02 - 0.20000000E+02 0.72000000E+02 0.00000000E+00 0.20000000E+02 - 0.72000000E+02 0.20000000E+02 0.30000000E+02 0.72000000E+02 - 0.00000000E+00 0.30000000E+02 0.72000000E+02 0.20000000E+02 - 0.40000000E+02 0.72000000E+02 0.00000000E+00 0.40000000E+02 - 0.72000000E+02 0.20000000E+02 0.50000000E+02 0.72000000E+02 - 0.00000000E+00 0.50000000E+02 0.72000000E+02 0.20000000E+02 - 0.60000000E+02 0.72000000E+02 0.00000000E+00 0.60000000E+02 - 0.72000000E+02 0.20000000E+02 0.70000000E+02 0.72000000E+02 - 0.00000000E+00 0.70000000E+02 0.72000000E+02 0.20000000E+02 - 0.80000000E+02 0.72000000E+02 0.00000000E+00 0.80000000E+02 - 0.72000000E+02 0.20000000E+02 0.90000000E+02 0.72000000E+02 - 0.00000000E+00 0.90000000E+02 0.72000000E+02 0.20000000E+02 - 0.10000000E+03 0.72000000E+02 0.00000000E+00 0.10000000E+03 - 0.72000000E+02 0.20000000E+02 0.00000000E+00 0.84000000E+02 - 0.00000000E+00 0.00000000E+00 0.84000000E+02 0.20000000E+02 - 0.10000000E+02 0.84000000E+02 0.00000000E+00 0.10000000E+02 - 0.84000000E+02 0.20000000E+02 0.20000000E+02 0.84000000E+02 - 0.00000000E+00 0.20000000E+02 0.84000000E+02 0.20000000E+02 - 0.30000000E+02 0.84000000E+02 0.00000000E+00 0.30000000E+02 - 0.84000000E+02 0.20000000E+02 0.40000000E+02 0.84000000E+02 - 0.00000000E+00 0.40000000E+02 0.84000000E+02 0.20000000E+02 - 0.50000000E+02 0.84000000E+02 0.00000000E+00 0.50000000E+02 - 0.84000000E+02 0.20000000E+02 0.60000000E+02 0.84000000E+02 - 0.00000000E+00 0.60000000E+02 0.84000000E+02 0.20000000E+02 - 0.70000000E+02 0.84000000E+02 0.00000000E+00 0.70000000E+02 - 0.84000000E+02 0.20000000E+02 0.80000000E+02 0.84000000E+02 - 0.00000000E+00 0.80000000E+02 0.84000000E+02 0.20000000E+02 - 0.90000000E+02 0.84000000E+02 0.00000000E+00 0.90000000E+02 - 0.84000000E+02 0.20000000E+02 0.10000000E+03 0.84000000E+02 - 0.00000000E+00 0.10000000E+03 0.84000000E+02 0.20000000E+02 - 0.00000000E+00 0.96000000E+02 0.00000000E+00 0.00000000E+00 - 0.96000000E+02 0.20000000E+02 0.10000000E+02 0.96000000E+02 - 0.00000000E+00 0.10000000E+02 0.96000000E+02 0.20000000E+02 - 0.20000000E+02 0.96000000E+02 0.00000000E+00 0.20000000E+02 - 0.96000000E+02 0.20000000E+02 0.30000000E+02 0.96000000E+02 - 0.00000000E+00 0.30000000E+02 0.96000000E+02 0.20000000E+02 - 0.40000000E+02 0.96000000E+02 0.00000000E+00 0.40000000E+02 - 0.96000000E+02 0.20000000E+02 0.50000000E+02 0.96000000E+02 - 0.00000000E+00 0.50000000E+02 0.96000000E+02 0.20000000E+02 - 0.60000000E+02 0.96000000E+02 0.00000000E+00 0.60000000E+02 - 0.96000000E+02 0.20000000E+02 0.70000000E+02 0.96000000E+02 - 0.00000000E+00 0.70000000E+02 0.96000000E+02 0.20000000E+02 - 0.80000000E+02 0.96000000E+02 0.00000000E+00 0.80000000E+02 - 0.96000000E+02 0.20000000E+02 0.90000000E+02 0.96000000E+02 - 0.00000000E+00 0.90000000E+02 0.96000000E+02 0.20000000E+02 - 0.10000000E+03 0.96000000E+02 0.00000000E+00 0.10000000E+03 - 0.96000000E+02 0.20000000E+02 0.00000000E+00 0.10800000E+03 - 0.00000000E+00 0.00000000E+00 0.10800000E+03 0.20000000E+02 - 0.10000000E+02 0.10800000E+03 0.00000000E+00 0.10000000E+02 - 0.10800000E+03 0.20000000E+02 0.20000000E+02 0.10800000E+03 - 0.00000000E+00 0.20000000E+02 0.10800000E+03 0.20000000E+02 - 0.30000000E+02 0.10800000E+03 0.00000000E+00 0.30000000E+02 - 0.10800000E+03 0.20000000E+02 0.40000000E+02 0.10800000E+03 - 0.00000000E+00 0.40000000E+02 0.10800000E+03 0.20000000E+02 - 0.50000000E+02 0.10800000E+03 0.00000000E+00 0.50000000E+02 - 0.10800000E+03 0.20000000E+02 0.60000000E+02 0.10800000E+03 - 0.00000000E+00 0.60000000E+02 0.10800000E+03 0.20000000E+02 - 0.70000000E+02 0.10800000E+03 0.00000000E+00 0.70000000E+02 - 0.10800000E+03 0.20000000E+02 0.80000000E+02 0.10800000E+03 - 0.00000000E+00 0.80000000E+02 0.10800000E+03 0.20000000E+02 - 0.90000000E+02 0.10800000E+03 0.00000000E+00 0.90000000E+02 - 0.10800000E+03 0.20000000E+02 0.10000000E+03 0.10800000E+03 - 0.00000000E+00 0.10000000E+03 0.10800000E+03 0.20000000E+02 - 0.00000000E+00 0.12000000E+03 0.00000000E+00 0.00000000E+00 - 0.12000000E+03 0.20000000E+02 0.10000000E+02 0.12000000E+03 - 0.00000000E+00 0.10000000E+02 0.12000000E+03 0.20000000E+02 - 0.20000000E+02 0.12000000E+03 0.00000000E+00 0.20000000E+02 - 0.12000000E+03 0.20000000E+02 0.30000000E+02 0.12000000E+03 - 0.00000000E+00 0.30000000E+02 0.12000000E+03 0.20000000E+02 - 0.40000000E+02 0.12000000E+03 0.00000000E+00 0.40000000E+02 - 0.12000000E+03 0.20000000E+02 0.50000000E+02 0.12000000E+03 - 0.00000000E+00 0.50000000E+02 0.12000000E+03 0.20000000E+02 - 0.60000000E+02 0.12000000E+03 0.00000000E+00 0.60000000E+02 - 0.12000000E+03 0.20000000E+02 0.70000000E+02 0.12000000E+03 - 0.00000000E+00 0.70000000E+02 0.12000000E+03 0.20000000E+02 - 0.80000000E+02 0.12000000E+03 0.00000000E+00 0.80000000E+02 - 0.12000000E+03 0.20000000E+02 0.90000000E+02 0.12000000E+03 - 0.00000000E+00 0.90000000E+02 0.12000000E+03 0.20000000E+02 - 0.10000000E+03 0.12000000E+03 0.00000000E+00 0.10000000E+03 - 0.12000000E+03 0.20000000E+02 -/ - -ZCORN - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 -/ - - -EDIT \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/GRID/CORNERPOINT_ACTNUM.DATA b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/GRID/CORNERPOINT_ACTNUM.DATA deleted file mode 100644 index 0621ce5dfc..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/GRID/CORNERPOINT_ACTNUM.DATA +++ /dev/null @@ -1,1200 +0,0 @@ -RUNSPEC - -DIMENS - 10 10 5 / - -GRID - -COORD - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.20000000E+02 0.10000000E+02 0.00000000E+00 - 0.00000000E+00 0.10000000E+02 0.00000000E+00 0.20000000E+02 - 0.20000000E+02 0.00000000E+00 0.00000000E+00 0.20000000E+02 - 0.00000000E+00 0.20000000E+02 0.30000000E+02 0.00000000E+00 - 0.00000000E+00 0.30000000E+02 0.00000000E+00 0.20000000E+02 - 0.40000000E+02 0.00000000E+00 0.00000000E+00 0.40000000E+02 - 0.00000000E+00 0.20000000E+02 0.50000000E+02 0.00000000E+00 - 0.00000000E+00 0.50000000E+02 0.00000000E+00 0.20000000E+02 - 0.60000000E+02 0.00000000E+00 0.00000000E+00 0.60000000E+02 - 0.00000000E+00 0.20000000E+02 0.70000000E+02 0.00000000E+00 - 0.00000000E+00 0.70000000E+02 0.00000000E+00 0.20000000E+02 - 0.80000000E+02 0.00000000E+00 0.00000000E+00 0.80000000E+02 - 0.00000000E+00 0.20000000E+02 0.90000000E+02 0.00000000E+00 - 0.00000000E+00 0.90000000E+02 0.00000000E+00 0.20000000E+02 - 0.10000000E+03 0.00000000E+00 0.00000000E+00 0.10000000E+03 - 0.00000000E+00 0.20000000E+02 0.00000000E+00 0.12000000E+02 - 0.00000000E+00 0.00000000E+00 0.12000000E+02 0.20000000E+02 - 0.10000000E+02 0.12000000E+02 0.00000000E+00 0.10000000E+02 - 0.12000000E+02 0.20000000E+02 0.20000000E+02 0.12000000E+02 - 0.00000000E+00 0.20000000E+02 0.12000000E+02 0.20000000E+02 - 0.30000000E+02 0.12000000E+02 0.00000000E+00 0.30000000E+02 - 0.12000000E+02 0.20000000E+02 0.40000000E+02 0.12000000E+02 - 0.00000000E+00 0.40000000E+02 0.12000000E+02 0.20000000E+02 - 0.50000000E+02 0.12000000E+02 0.00000000E+00 0.50000000E+02 - 0.12000000E+02 0.20000000E+02 0.60000000E+02 0.12000000E+02 - 0.00000000E+00 0.60000000E+02 0.12000000E+02 0.20000000E+02 - 0.70000000E+02 0.12000000E+02 0.00000000E+00 0.70000000E+02 - 0.12000000E+02 0.20000000E+02 0.80000000E+02 0.12000000E+02 - 0.00000000E+00 0.80000000E+02 0.12000000E+02 0.20000000E+02 - 0.90000000E+02 0.12000000E+02 0.00000000E+00 0.90000000E+02 - 0.12000000E+02 0.20000000E+02 0.10000000E+03 0.12000000E+02 - 0.00000000E+00 0.10000000E+03 0.12000000E+02 0.20000000E+02 - 0.00000000E+00 0.24000000E+02 0.00000000E+00 0.00000000E+00 - 0.24000000E+02 0.20000000E+02 0.10000000E+02 0.24000000E+02 - 0.00000000E+00 0.10000000E+02 0.24000000E+02 0.20000000E+02 - 0.20000000E+02 0.24000000E+02 0.00000000E+00 0.20000000E+02 - 0.24000000E+02 0.20000000E+02 0.30000000E+02 0.24000000E+02 - 0.00000000E+00 0.30000000E+02 0.24000000E+02 0.20000000E+02 - 0.40000000E+02 0.24000000E+02 0.00000000E+00 0.40000000E+02 - 0.24000000E+02 0.20000000E+02 0.50000000E+02 0.24000000E+02 - 0.00000000E+00 0.50000000E+02 0.24000000E+02 0.20000000E+02 - 0.60000000E+02 0.24000000E+02 0.00000000E+00 0.60000000E+02 - 0.24000000E+02 0.20000000E+02 0.70000000E+02 0.24000000E+02 - 0.00000000E+00 0.70000000E+02 0.24000000E+02 0.20000000E+02 - 0.80000000E+02 0.24000000E+02 0.00000000E+00 0.80000000E+02 - 0.24000000E+02 0.20000000E+02 0.90000000E+02 0.24000000E+02 - 0.00000000E+00 0.90000000E+02 0.24000000E+02 0.20000000E+02 - 0.10000000E+03 0.24000000E+02 0.00000000E+00 0.10000000E+03 - 0.24000000E+02 0.20000000E+02 0.00000000E+00 0.36000000E+02 - 0.00000000E+00 0.00000000E+00 0.36000000E+02 0.20000000E+02 - 0.10000000E+02 0.36000000E+02 0.00000000E+00 0.10000000E+02 - 0.36000000E+02 0.20000000E+02 0.20000000E+02 0.36000000E+02 - 0.00000000E+00 0.20000000E+02 0.36000000E+02 0.20000000E+02 - 0.30000000E+02 0.36000000E+02 0.00000000E+00 0.30000000E+02 - 0.36000000E+02 0.20000000E+02 0.40000000E+02 0.36000000E+02 - 0.00000000E+00 0.40000000E+02 0.36000000E+02 0.20000000E+02 - 0.50000000E+02 0.36000000E+02 0.00000000E+00 0.50000000E+02 - 0.36000000E+02 0.20000000E+02 0.60000000E+02 0.36000000E+02 - 0.00000000E+00 0.60000000E+02 0.36000000E+02 0.20000000E+02 - 0.70000000E+02 0.36000000E+02 0.00000000E+00 0.70000000E+02 - 0.36000000E+02 0.20000000E+02 0.80000000E+02 0.36000000E+02 - 0.00000000E+00 0.80000000E+02 0.36000000E+02 0.20000000E+02 - 0.90000000E+02 0.36000000E+02 0.00000000E+00 0.90000000E+02 - 0.36000000E+02 0.20000000E+02 0.10000000E+03 0.36000000E+02 - 0.00000000E+00 0.10000000E+03 0.36000000E+02 0.20000000E+02 - 0.00000000E+00 0.48000000E+02 0.00000000E+00 0.00000000E+00 - 0.48000000E+02 0.20000000E+02 0.10000000E+02 0.48000000E+02 - 0.00000000E+00 0.10000000E+02 0.48000000E+02 0.20000000E+02 - 0.20000000E+02 0.48000000E+02 0.00000000E+00 0.20000000E+02 - 0.48000000E+02 0.20000000E+02 0.30000000E+02 0.48000000E+02 - 0.00000000E+00 0.30000000E+02 0.48000000E+02 0.20000000E+02 - 0.40000000E+02 0.48000000E+02 0.00000000E+00 0.40000000E+02 - 0.48000000E+02 0.20000000E+02 0.50000000E+02 0.48000000E+02 - 0.00000000E+00 0.50000000E+02 0.48000000E+02 0.20000000E+02 - 0.60000000E+02 0.48000000E+02 0.00000000E+00 0.60000000E+02 - 0.48000000E+02 0.20000000E+02 0.70000000E+02 0.48000000E+02 - 0.00000000E+00 0.70000000E+02 0.48000000E+02 0.20000000E+02 - 0.80000000E+02 0.48000000E+02 0.00000000E+00 0.80000000E+02 - 0.48000000E+02 0.20000000E+02 0.90000000E+02 0.48000000E+02 - 0.00000000E+00 0.90000000E+02 0.48000000E+02 0.20000000E+02 - 0.10000000E+03 0.48000000E+02 0.00000000E+00 0.10000000E+03 - 0.48000000E+02 0.20000000E+02 0.00000000E+00 0.60000000E+02 - 0.00000000E+00 0.00000000E+00 0.60000000E+02 0.20000000E+02 - 0.10000000E+02 0.60000000E+02 0.00000000E+00 0.10000000E+02 - 0.60000000E+02 0.20000000E+02 0.20000000E+02 0.60000000E+02 - 0.00000000E+00 0.20000000E+02 0.60000000E+02 0.20000000E+02 - 0.30000000E+02 0.60000000E+02 0.00000000E+00 0.30000000E+02 - 0.60000000E+02 0.20000000E+02 0.40000000E+02 0.60000000E+02 - 0.00000000E+00 0.40000000E+02 0.60000000E+02 0.20000000E+02 - 0.50000000E+02 0.60000000E+02 0.00000000E+00 0.50000000E+02 - 0.60000000E+02 0.20000000E+02 0.60000000E+02 0.60000000E+02 - 0.00000000E+00 0.60000000E+02 0.60000000E+02 0.20000000E+02 - 0.70000000E+02 0.60000000E+02 0.00000000E+00 0.70000000E+02 - 0.60000000E+02 0.20000000E+02 0.80000000E+02 0.60000000E+02 - 0.00000000E+00 0.80000000E+02 0.60000000E+02 0.20000000E+02 - 0.90000000E+02 0.60000000E+02 0.00000000E+00 0.90000000E+02 - 0.60000000E+02 0.20000000E+02 0.10000000E+03 0.60000000E+02 - 0.00000000E+00 0.10000000E+03 0.60000000E+02 0.20000000E+02 - 0.00000000E+00 0.72000000E+02 0.00000000E+00 0.00000000E+00 - 0.72000000E+02 0.20000000E+02 0.10000000E+02 0.72000000E+02 - 0.00000000E+00 0.10000000E+02 0.72000000E+02 0.20000000E+02 - 0.20000000E+02 0.72000000E+02 0.00000000E+00 0.20000000E+02 - 0.72000000E+02 0.20000000E+02 0.30000000E+02 0.72000000E+02 - 0.00000000E+00 0.30000000E+02 0.72000000E+02 0.20000000E+02 - 0.40000000E+02 0.72000000E+02 0.00000000E+00 0.40000000E+02 - 0.72000000E+02 0.20000000E+02 0.50000000E+02 0.72000000E+02 - 0.00000000E+00 0.50000000E+02 0.72000000E+02 0.20000000E+02 - 0.60000000E+02 0.72000000E+02 0.00000000E+00 0.60000000E+02 - 0.72000000E+02 0.20000000E+02 0.70000000E+02 0.72000000E+02 - 0.00000000E+00 0.70000000E+02 0.72000000E+02 0.20000000E+02 - 0.80000000E+02 0.72000000E+02 0.00000000E+00 0.80000000E+02 - 0.72000000E+02 0.20000000E+02 0.90000000E+02 0.72000000E+02 - 0.00000000E+00 0.90000000E+02 0.72000000E+02 0.20000000E+02 - 0.10000000E+03 0.72000000E+02 0.00000000E+00 0.10000000E+03 - 0.72000000E+02 0.20000000E+02 0.00000000E+00 0.84000000E+02 - 0.00000000E+00 0.00000000E+00 0.84000000E+02 0.20000000E+02 - 0.10000000E+02 0.84000000E+02 0.00000000E+00 0.10000000E+02 - 0.84000000E+02 0.20000000E+02 0.20000000E+02 0.84000000E+02 - 0.00000000E+00 0.20000000E+02 0.84000000E+02 0.20000000E+02 - 0.30000000E+02 0.84000000E+02 0.00000000E+00 0.30000000E+02 - 0.84000000E+02 0.20000000E+02 0.40000000E+02 0.84000000E+02 - 0.00000000E+00 0.40000000E+02 0.84000000E+02 0.20000000E+02 - 0.50000000E+02 0.84000000E+02 0.00000000E+00 0.50000000E+02 - 0.84000000E+02 0.20000000E+02 0.60000000E+02 0.84000000E+02 - 0.00000000E+00 0.60000000E+02 0.84000000E+02 0.20000000E+02 - 0.70000000E+02 0.84000000E+02 0.00000000E+00 0.70000000E+02 - 0.84000000E+02 0.20000000E+02 0.80000000E+02 0.84000000E+02 - 0.00000000E+00 0.80000000E+02 0.84000000E+02 0.20000000E+02 - 0.90000000E+02 0.84000000E+02 0.00000000E+00 0.90000000E+02 - 0.84000000E+02 0.20000000E+02 0.10000000E+03 0.84000000E+02 - 0.00000000E+00 0.10000000E+03 0.84000000E+02 0.20000000E+02 - 0.00000000E+00 0.96000000E+02 0.00000000E+00 0.00000000E+00 - 0.96000000E+02 0.20000000E+02 0.10000000E+02 0.96000000E+02 - 0.00000000E+00 0.10000000E+02 0.96000000E+02 0.20000000E+02 - 0.20000000E+02 0.96000000E+02 0.00000000E+00 0.20000000E+02 - 0.96000000E+02 0.20000000E+02 0.30000000E+02 0.96000000E+02 - 0.00000000E+00 0.30000000E+02 0.96000000E+02 0.20000000E+02 - 0.40000000E+02 0.96000000E+02 0.00000000E+00 0.40000000E+02 - 0.96000000E+02 0.20000000E+02 0.50000000E+02 0.96000000E+02 - 0.00000000E+00 0.50000000E+02 0.96000000E+02 0.20000000E+02 - 0.60000000E+02 0.96000000E+02 0.00000000E+00 0.60000000E+02 - 0.96000000E+02 0.20000000E+02 0.70000000E+02 0.96000000E+02 - 0.00000000E+00 0.70000000E+02 0.96000000E+02 0.20000000E+02 - 0.80000000E+02 0.96000000E+02 0.00000000E+00 0.80000000E+02 - 0.96000000E+02 0.20000000E+02 0.90000000E+02 0.96000000E+02 - 0.00000000E+00 0.90000000E+02 0.96000000E+02 0.20000000E+02 - 0.10000000E+03 0.96000000E+02 0.00000000E+00 0.10000000E+03 - 0.96000000E+02 0.20000000E+02 0.00000000E+00 0.10800000E+03 - 0.00000000E+00 0.00000000E+00 0.10800000E+03 0.20000000E+02 - 0.10000000E+02 0.10800000E+03 0.00000000E+00 0.10000000E+02 - 0.10800000E+03 0.20000000E+02 0.20000000E+02 0.10800000E+03 - 0.00000000E+00 0.20000000E+02 0.10800000E+03 0.20000000E+02 - 0.30000000E+02 0.10800000E+03 0.00000000E+00 0.30000000E+02 - 0.10800000E+03 0.20000000E+02 0.40000000E+02 0.10800000E+03 - 0.00000000E+00 0.40000000E+02 0.10800000E+03 0.20000000E+02 - 0.50000000E+02 0.10800000E+03 0.00000000E+00 0.50000000E+02 - 0.10800000E+03 0.20000000E+02 0.60000000E+02 0.10800000E+03 - 0.00000000E+00 0.60000000E+02 0.10800000E+03 0.20000000E+02 - 0.70000000E+02 0.10800000E+03 0.00000000E+00 0.70000000E+02 - 0.10800000E+03 0.20000000E+02 0.80000000E+02 0.10800000E+03 - 0.00000000E+00 0.80000000E+02 0.10800000E+03 0.20000000E+02 - 0.90000000E+02 0.10800000E+03 0.00000000E+00 0.90000000E+02 - 0.10800000E+03 0.20000000E+02 0.10000000E+03 0.10800000E+03 - 0.00000000E+00 0.10000000E+03 0.10800000E+03 0.20000000E+02 - 0.00000000E+00 0.12000000E+03 0.00000000E+00 0.00000000E+00 - 0.12000000E+03 0.20000000E+02 0.10000000E+02 0.12000000E+03 - 0.00000000E+00 0.10000000E+02 0.12000000E+03 0.20000000E+02 - 0.20000000E+02 0.12000000E+03 0.00000000E+00 0.20000000E+02 - 0.12000000E+03 0.20000000E+02 0.30000000E+02 0.12000000E+03 - 0.00000000E+00 0.30000000E+02 0.12000000E+03 0.20000000E+02 - 0.40000000E+02 0.12000000E+03 0.00000000E+00 0.40000000E+02 - 0.12000000E+03 0.20000000E+02 0.50000000E+02 0.12000000E+03 - 0.00000000E+00 0.50000000E+02 0.12000000E+03 0.20000000E+02 - 0.60000000E+02 0.12000000E+03 0.00000000E+00 0.60000000E+02 - 0.12000000E+03 0.20000000E+02 0.70000000E+02 0.12000000E+03 - 0.00000000E+00 0.70000000E+02 0.12000000E+03 0.20000000E+02 - 0.80000000E+02 0.12000000E+03 0.00000000E+00 0.80000000E+02 - 0.12000000E+03 0.20000000E+02 0.90000000E+02 0.12000000E+03 - 0.00000000E+00 0.90000000E+02 0.12000000E+03 0.20000000E+02 - 0.10000000E+03 0.12000000E+03 0.00000000E+00 0.10000000E+03 - 0.12000000E+03 0.20000000E+02 -/ - -ZCORN - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.40000000E+01 0.40000000E+01 0.40000000E+01 0.40000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.80000000E+01 0.80000000E+01 0.80000000E+01 0.80000000E+01 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.12000000E+02 0.12000000E+02 0.12000000E+02 0.12000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.16000000E+02 0.16000000E+02 0.16000000E+02 0.16000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 - 0.20000000E+02 0.20000000E+02 0.20000000E+02 0.20000000E+02 -/ - -ACTNUM - 200*0 100*1 200*0 / - - -EDIT \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/GRID/TOPS.DATA b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/GRID/TOPS.DATA deleted file mode 100644 index fddc5e89d2..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/GRID/TOPS.DATA +++ /dev/null @@ -1,434 +0,0 @@ -RUNSPEC -TITLE - SIMPLE TEST - -DIMENS - 9 9 2 / - -NONNC - -OIL - -WATER - -GAS - -DISGAS - -VAPOIL - -METRIC - -EQLDIMS - 1 100 2 1 1 / -TABDIMS - 1 1 33 60 16 60 / - -WELLDIMS - 18 2 2 10 / - -NUPCOL - 4 / - -VFPPDIMS - 7 3 4 2 0 1 / - -VFPIDIMS - 6 3 1 / - -START - 1 'JAN' 1983 / - -NSTACK - 4 / - -GRID ================================================ -DXV - 9*400 / -DYV - 9*300 / -DZV - 2*10 / -TOPS - 81*2202 / - -PERMX - 162*400 / - -PERMY - 162*300 / - -PERMZ - 162*30 / - -PORO - 162*0.3 / - - - -PROPS =============================================================== -PVTO - --- RSO PRESSURE B-OIL VISCOSITY --- (BAR) (CP) - - 20.59 50.00 1.10615 1.180 - 75.00 1.10164 1.247 - 100.00 1.09744 1.315 - 125.00 1.09351 1.384 - 150.00 1.08984 1.453 / - - 28.19 70.00 1.12522 1.066 - 95.00 1.12047 1.124 - 120.00 1.11604 1.182 - 145.00 1.11191 1.241 - 170.00 1.10804 1.300 / - - 36.01 90.00 1.14458 0.964 - 115.00 1.13959 1.014 - 140.00 1.13494 1.064 - 165.00 1.13060 1.115 - 190.00 1.12653 1.166 / - - 44.09 110.00 1.16437 0.880 - 135.00 1.15915 0.924 - 160.00 1.15428 0.968 - 185.00 1.14973 1.012 - 210.00 1.14547 1.056 / - - 52.46 130.00 1.18467 0.805 - 155.00 1.17921 0.843 - 180.00 1.17413 0.882 - 205.00 1.16937 0.920 - 230.00 1.16491 0.959 / - - 61.13 150.00 1.20555 0.746 - 175.00 1.19985 0.780 - 200.00 1.19454 0.814 - 225.00 1.18958 0.849 - 250.00 1.18492 0.883 / - - 70.14 170.00 1.22704 0.698 - 195.00 1.22111 0.729 - 220.00 1.21558 0.759 - 245.00 1.21040 0.790 - 270.00 1.20555 0.821 / - - 79.50 190.00 1.24922 0.658 - 215.00 1.24305 0.686 - 240.00 1.23729 0.714 - 265.00 1.23190 0.742 - 290.00 1.22685 0.770 / - - 89.24 210.00 1.27214 0.637 - 235.00 1.26573 0.664 - 260.00 1.25974 0.693 - 285.00 1.25414 0.725 - 310.00 1.24888 0.760 / - - 99.39 230.00 1.29586 0.622 - 255.00 1.28921 0.641 - 280.00 1.28300 0.661 - 305.00 1.27718 0.680 - 330.00 1.27171 0.699 / - - 110.41 250.80 1.32148 0.610 - 275.80 1.31457 0.628 - 300.80 1.30812 0.647 - 325.80 1.30207 0.665 - 350.80 1.29638 0.682 / - - 120.32 268.42 1.34449 0.576 - 293.42 1.33735 0.593 - 318.42 1.33068 0.609 - 343.42 1.32442 0.626 - 368.42 1.31853 0.642 / - - 130.23 285.33 1.36737 0.5335 - 310.33 1.36001 0.5487 - 335.33 1.35313 0.5638 - 360.33 1.34667 0.5787 - 385.33 1.34059 0.5934 / - - 140.12 301.59 1.39015 0.4956 - 326.59 1.38257 0.5094 - 351.59 1.37548 0.5230 - 376.59 1.36882 0.5365 - 401.59 1.36255 0.5498 / - - 150.01 317.23 1.41282 0.4614 - 342.23 1.40503 0.4739 - 367.23 1.39773 0.4863 - 392.23 1.39088 0.4986 - 417.23 1.38443 0.5107 / - - 159.89 332.29 1.43539 0.43042 - 357.29 1.42739 0.44183 - 382.29 1.41990 0.45312 - 407.29 1.41286 0.46430 - 432.29 1.40622 0.47537 / - - 169.76 346.80 1.45788 0.41191 - 371.80 1.44967 0.42260 - 396.80 1.44198 0.43318 - 421.80 1.43475 0.44365 - 446.80 1.42794 0.45402 / - - 179.63 360.80 1.48028 0.39503 - 385.80 1.47187 0.40508 - 410.80 1.46398 0.41502 - 435.80 1.45657 0.42487 - 460.80 1.44958 0.43461 / - - 189.48 374.31 1.50260 0.37959 - 399.31 1.49399 0.38907 - 424.31 1.48591 0.39845 - 449.31 1.47832 0.40773 - 474.31 1.47116 0.41692 / - - 199.34 387.36 1.52484 0.36543 - 412.36 1.51603 0.37439 - 437.36 1.50777 0.38326 - 462.36 1.50000 0.39203 - 487.36 1.49267 0.40072 / - - 209.18 399.99 1.54700 0.35239 - 424.99 1.53800 0.36089 - 449.99 1.52956 0.36929 - 474.99 1.52161 0.37762 - 499.99 1.51411 0.38585 / - - 219.02 412.21 1.56910 0.34035 - 437.21 1.55991 0.34843 - 462.21 1.55128 0.35642 - 487.21 1.54316 0.36433 - 512.21 1.53549 0.37216 / - - 228.85 424.05 1.59112 0.32921 - 449.05 1.58174 0.33691 - 474.05 1.57294 0.34453 - 499.05 1.56464 0.35206 - 524.05 1.55681 0.35952 / - - 238.67 435.53 1.61307 0.31888 - 460.53 1.60351 0.32623 - 485.53 1.59453 0.33350 - 510.53 1.58606 0.34070 - 535.53 1.57807 0.34782 / - - 248.48 446.68 1.63496 0.30927 - 471.68 1.62522 0.31630 - 496.68 1.61606 0.32326 - 521.68 1.60743 0.33014 - 546.68 1.59927 0.33695 / - - 258.29 457.51 1.65678 0.30032 - 482.51 1.64686 0.30706 - 507.51 1.63753 0.31373 - 532.51 1.62873 0.32032 - 557.51 1.62042 0.32685 / - - 268.09 468.04 1.67853 0.29196 - 493.04 1.66843 0.29843 - 518.04 1.65893 0.30483 - 543.04 1.64997 0.31117 - 568.04 1.64150 0.31743 / - - 277.89 478.30 1.70022 0.28414 - 503.30 1.68994 0.29037 - 528.30 1.68028 0.29652 - 553.30 1.67116 0.30261 - 578.30 1.66253 0.30864 / - - 287.68 488.30 1.72184 0.27681 - 513.30 1.71139 0.28281 - 538.30 1.70156 0.28874 - 563.30 1.69228 0.29460 - 588.30 1.68350 0.30040 / - - 297.46 498.06 1.74339 0.26994 - 523.06 1.73277 0.27572 - 548.06 1.72278 0.28144 - 573.06 1.71334 0.28709 - 598.06 1.70442 0.29269 / - - 307.23 507.59 1.76487 0.26347 - 532.59 1.75409 0.26906 - 557.59 1.74393 0.27458 - 582.59 1.73434 0.28004 - 607.59 1.72527 0.28544 / - - 317.00 516.92 1.78628 0.25738 - 541.92 1.77533 0.26279 - 566.92 1.76502 0.26812 - 591.92 1.75528 0.27340 - 616.92 1.74606 0.27863 / - - 326.76 526.06 1.80761 0.25165 - 551.06 1.79651 0.25688 - 576.06 1.78604 0.26204 - 601.06 1.77615 0.26716 - 626.06 1.76679 0.27221 / - - 336.51 535.02 1.82887 0.24623 - 560.02 1.81761 0.25130 - 585.02 1.80699 0.25631 - 610.02 1.79696 0.26126 - 635.02 1.78746 0.26616 / - - 346.26 543.83 1.85005 0.24112 - 568.83 1.83864 0.24603 - 593.83 1.82787 0.25089 - 618.83 1.81770 0.25570 - 643.83 1.80806 0.26045 / - - 356.00 552.49 1.87115 0.23628 - 577.49 1.85959 0.24105 - 602.49 1.84868 0.24577 - 627.49 1.83836 0.25043 - 652.49 1.82858 0.25505 / - - 365.73 561.04 1.89217 0.23170 - 586.04 1.88046 0.23634 - 611.04 1.86940 0.24092 - 636.04 1.85895 0.24546 - 661.04 1.84904 0.24994 / - - 375.46 569.48 1.91309 0.22736 - 594.48 1.90124 0.23187 - 619.48 1.89004 0.23633 - 644.48 1.87946 0.24074 - 669.48 1.86942 0.24510 / - - 385.18 577.82 1.93391 0.22325 - 602.82 1.92192 0.22764 - 627.82 1.91060 0.23198 - 652.82 1.89988 0.23627 - 677.82 1.88971 0.24052 / - - 394.89 586.09 1.95464 0.21934 - 611.09 1.94252 0.22362 - 636.09 1.93106 0.22785 - 661.09 1.92021 0.23204 - 686.09 1.90993 0.23617 / - - 404.60 594.29 1.97527 0.21564 - 619.29 1.96301 0.21981 - 644.29 1.95143 0.22393 - 669.29 1.94046 0.22801 - 694.29 1.93005 0.23204 / -/ - - - ---------------------------------------------------------------------- --- ROCK COMPRESSIBILITY --- REF.PRES. COMPR. -ROCK - 277.0 4.84E-5 / - --- ================================================================== --- PVT PROPERTIES OF WATER --- --- REF.PRES. REF.FVF. COMPR. REF.VISC. VISCOSIBILITY --- ========================================================== -PVTW - 277.0 1.038 4.67E-5 0.318 0.0 / - ---------------------------------------------------------------------- --- SURFACE DENSITIE OF RESERVOIR FLUIDS --- OIL WATER GAS -DENSITY - 859.5 1033.0 0.854 / Justert 22/7 - -SWOF --- Sw Krw Kro Pc - 0.000000 0.000000 1.00000 3.75633 - 0.0500000 0.000860000 0.847820 1.86981 - 0.100000 0.00263000 0.697460 1.23731 - 0.150000 0.00524000 0.557170 0.91821 - 0.200000 0.00877000 0.432860 0.72451 - 0.250000 0.0133800 0.327570 0.59341 - 0.300000 0.0192700 0.241770 0.49811 - 0.350000 0.0267200 0.174150 0.42511 - 0.400000 0.0360800 0.122370 0.36691 - 0.450000 0.0478100 0.0837400 0.31911 - 0.500000 0.0625000 0.0556500 0.27881 - 0.550000 0.0809000 0.0357200 0.24401 - 0.600000 0.103940 0.0219900 0.21351 - 0.650000 0.132770 0.0128400 0.18631 - 0.700000 0.168690 0.00699000 0.16161 - 0.750000 0.213020 0.00346000 0.13901 - 0.800000 0.266670 0.00149000 0.11801 - 0.850000 0.329180 0.000510000 0.09831 - 0.900000 0.397060 0.000120000 0.07961 - 0.950000 0.461030 0.00001 0.06161 - 1.00000 0.500000 0.000000 0.04408 -/ - -SOLUTION ============================================================= - --- ---EQUIL 1 TABLES 2 NODES IN EACH METRIC 11:29 14 OCT 83 --- 2210.00 310.000 2210.00 .00000 2210.00 .00000 1 1 0 / - -PRESSURE - 162*310 / - -SWAT - 162*0.2 / - -SGAS - 162*0.1 / - -RS - 162*18.5717334747/ - --- OIL INITIALLY SET SATURATED, ALTHOUGH NO LIQUID OIL IN INITIAL STATE - -RSVD 1 TABLES 2 NODES IN EACH METRIC 11:31 14 OCT 83 - 2000.0 100 - 2500.0 100 -/ - --- VAPOUR INITIALLY UNDER-SATURATED WITH RV = 0.00035 - -RVVD 1 TABLES 2 NODES IN EACH METRIC 11:31 14 OCT 83 - 2000.0 .00035 - 2500.0 .00035 -/ - -SUMMARY - ---ALL ---SEPARATE - -SCHEDULE ========================================================== - --- REPORT SWITCHES --- ---RPTSCHED --- 'PRES' 'SOIL' 'SWAT' 'RV' 'RESTART=2' 'FIP=1' 'WELLS=2' 'VFPPROD=1' 'SUMMARY=2' ---'CPU=2' 'WELSPECS' 'NEWTON=2' / --- -WELSPECS - 'PRODUCER' 'G' 5 5 2000 'GAS' / -/ - -COMPDAT - 'PRODUCER' 5 5 1 1 'OPEN' 1* -1 0.5 / - / - --- PRODUCTION WELL CONTROLS --- --- WELL OPEN/ CNTL OIL WATER GAS LIQU RES BHP --- NAME SHUT MODE RATE RATE RATE RATE RATE - -WCONPROD - 'PRODUCER' 'OPEN' 'GRAT' 2* 5.0E5 / - / - -TSTEP - 4*500.0 / --- -END diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/IOConfig/RPTRST_DECK.DATA b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/IOConfig/RPTRST_DECK.DATA deleted file mode 100644 index b3bcfe75a9..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/IOConfig/RPTRST_DECK.DATA +++ /dev/null @@ -1,1052 +0,0 @@ -RUNSPEC -DIMENS -46 112 22 / -START - 06 'NOV' 1997 / -GRID -DX -113344*1 / -DY -113344*1 / -DZ -113344*1 / -TOPS -5152*1 / -SPECGRID - 46 112 22 1 F / -SOLUTION -RPTRST -BASIC=2 KRO KRW KRG / -RPTSOL -FIP=3 SWAT / -SCHEDULE -DATES - 14 'NOV' 1997 00:00:00.001 / -/ -DATES - 1 'DEC' 1997 / -/ -DATES - 17 'DEC' 1997 / -/ -DATES - 1 'JAN' 1998 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 1 'FEB' 1998 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 1 'MAR' 1998 / -/ -DATES - 29 'MAR' 1998 / -/ -DATES - 30 'MAR' 1998 / -/ -DATES - 1 'APR' 1998 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 23 'APR' 1998 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 1 'MAY' 1998 / -/ -DATES - 26 'MAY' 1998 / -/ -DATES - 27 'MAY' 1998 / -/ -DATES - 1 'JUN' 1998 / -/ -DATES - 14 'JUN' 1998 / -/ -DATES - 23 'JUN' 1998 / -/ -DATES - 24 'JUN' 1998 / -/ -DATES - 1 'JUL' 1998 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 16 'JUL' 1998 / -/ -WTRACER - 'C-1H' 'SEA' 1.000 1* / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 1 'AUG' 1998 / -/ -DATES - 30 'AUG' 1998 / -/ -DATES - 31 'AUG' 1998 / -/ -DATES - 1 'SEP' 1998 / -/ -DATES - 18 'SEP' 1998 / -/ -DATES - 28 'SEP' 1998 / -/ -DATES - 1 'OCT' 1998 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 13 'OCT' 1998 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 17 'OCT' 1998 / -/ -DATES - 1 'NOV' 1998 / -/ -DATES - 1 'DEC' 1998 / -/ -DATES - 25 'DEC' 1998 / -/ -DATES - 1 'JAN' 1999 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 4 'JAN' 1999 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 19 'JAN' 1999 / -/ -DATES - 21 'JAN' 1999 / -/ -WTRACER - 'C-2H' 'SEA' 1.000 1* / -/ -DATES - 1 'FEB' 1999 / -/ -DATES - 24 'FEB' 1999 / -/ -WTRACER - 'C-4H' 'SEA' 1.000 1* / -/ -DATES - 1 'MAR' 1999 / -/ -DATES - 5 'MAR' 1999 / -/ -DATES - 23 'MAR' 1999 / -/ -DATES - 26 'MAR' 1999 / -/ -DATES - 28 'MAR' 1999 / -/ -DATES - 1 'APR' 1999 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 1 'MAY' 1999 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 4 'MAY' 1999 / -/ -DATES - 5 'MAY' 1999 / -/ -DATES - 17 'MAY' 1999 / -/ -DATES - 20 'MAY' 1999 / -/ -WTRACER - 'C-3H' 'SEA' 1.000 1* / -/ -DATES - 21 'MAY' 1999 / -/ -DATES - 1 'JUN' 1999 / -/ -DATES - 22 'JUN' 1999 / -/ -DATES - 1 'JUL' 1999 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 15 'JUL' 1999 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 1 'AUG' 1999 / -/ -DATES - 5 'AUG' 1999 / -/ -DATES - 30 'AUG' 1999 / -/ -DATES - 1 'SEP' 1999 / -/ -WTRACER - 'F-1H' 'SEA' 1.000 1* / -/ -DATES - 3 'SEP' 1999 / -/ -DATES - 21 'SEP' 1999 / -/ -WTRACER - 'C-1H' 'HTO' 1000.000 1* / - 'C-3H' '4FB' 1000.000 1* / - 'F-1H' 'S36' 98.000 1* / -/ -DATES - 22 'SEP' 1999 / -/ -WTRACER - 'C-1H' 'HTO' 0.000 1* / - 'C-3H' '4FB' 0.000 1* / - 'F-1H' 'S36' 0.000 1* / -/ -DATES - 1 'OCT' 1999 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 3 'OCT' 1999 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 4 'OCT' 1999 / -/ -DATES - 13 'OCT' 1999 / -/ -WTRACER - 'F-2H' 'SEA' 1.000 1* / -/ -DATES - 16 'OCT' 1999 / -/ -DATES - 1 'NOV' 1999 / -/ -DATES - 9 'NOV' 1999 / -/ -DATES - 10 'NOV' 1999 / -/ -DATES - 13 'NOV' 1999 / -/ -DATES - 1 'DEC' 1999 / -/ -DATES - 1 'JAN' 2000 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 1 'FEB' 2000 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 1 'MAR' 2000 / -/ -DATES - 2 'MAR' 2000 / -/ -DATES - 3 'MAR' 2000 / -/ -DATES - 1 'APR' 2000 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 1 'MAY' 2000 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 26 'MAY' 2000 / -/ -DATES - 1 'JUN' 2000 / -/ -DATES - 9 'JUN' 2000 / -/ -DATES - 30 'JUN' 2000 / -/ -DATES - 1 'JUL' 2000 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 1 'AUG' 2000 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 2 'AUG' 2000 / -/ -DATES - 3 'AUG' 2000 / -/ -DATES - 20 'AUG' 2000 / -/ -DATES - 26 'AUG' 2000 / -/ -WTRACER - 'C-2H' 'S36' 78.000 1* / - 'C-4H' '2FB' 1000.000 1* / - 'F-2H' 'DFB' 1000.000 1* / -/ -DATES - 27 'AUG' 2000 / -/ -WTRACER - 'C-2H' 'S36' 0.000 1* / - 'C-4H' '2FB' 0.000 1* / - 'F-2H' 'DFB' 0.000 1* / -/ -DATES - 1 'SEP' 2000 / -/ -DATES - 9 'SEP' 2000 / -/ -DATES - 10 'SEP' 2000 / -/ -DATES - 21 'SEP' 2000 / -/ -DATES - 22 'SEP' 2000 / -/ -WTRACER - 'F-3H' 'SEA' 1.000 1* / -/ -DATES - 1 'OCT' 2000 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 1 'NOV' 2000 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 1 'DEC' 2000 / -/ -DATES - 1 'JAN' 2001 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 1 'FEB' 2001 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 1 'MAR' 2001 / -/ -DATES - 1 'APR' 2001 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 1 'MAY' 2001 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 31 'MAY' 2001 / -/ -DATES - 1 'JUN' 2001 / -/ -DATES - 6 'JUN' 2001 / -/ -DATES - 7 'JUN' 2001 / -/ -DATES - 18 'JUN' 2001 / -/ -DATES - 19 'JUN' 2001 / -/ -DATES - 1 'JUL' 2001 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 2 'JUL' 2001 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 3 'JUL' 2001 / -/ -DATES - 15 'JUL' 2001 / -/ -RPTRST - 2 / -DATES - 16 'JUL' 2001 / -/ -RPTRST - 0 / -DATES - 30 'JUL' 2001 / -/ -DATES - 1 'AUG' 2001 / -/ -DATES - 10 'AUG' 2001 / -/ -DATES - 16 'AUG' 2001 / -/ -DATES - 1 'SEP' 2001 / -/ -DATES - 10 'SEP' 2001 / -/ -WTRACER - 'F-4H' 'SEA' 1.000 1* / -/ -DATES - 1 'OCT' 2001 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 1 'NOV' 2001 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 1 'DEC' 2001 / -/ -DATES - 29 'DEC' 2001 / -/ -DATES - 1 'JAN' 2002 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 1 'FEB' 2002 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 12 'FEB' 2002 / -/ -WTRACER - 'F-3H' 'TFB' 1000.000 1* / -/ -DATES - 13 'FEB' 2002 / -/ -WTRACER - 'F-3H' 'TFB' 0.000 1* / -/ -DATES - 1 'MAR' 2002 / -/ -DATES - 1 'APR' 2002 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 1 'MAY' 2002 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 1 'JUN' 2002 / -/ -DATES - 1 'JUL' 2002 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 8 'JUL' 2002 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 11 'JUL' 2002 / -/ -DATES - 15 'JUL' 2002 / -/ -DATES - 1 'AUG' 2002 / -/ -DATES - 14 'AUG' 2002 / -/ -DATES - 1 'SEP' 2002 / -/ -DATES - 2 'SEP' 2002 / -/ -DATES - 15 'SEP' 2002 / -/ -DATES - 1 'OCT' 2002 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 7 'OCT' 2002 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 14 'OCT' 2002 / -/ -DATES - 1 'NOV' 2002 / -/ -DATES - 16 'NOV' 2002 / -/ -DATES - 1 'DEC' 2002 / -/ -DATES - 24 'DEC' 2002 / -/ -DATES - 1 'JAN' 2003 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 2 'JAN' 2003 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 12 'JAN' 2003 / -/ -DATES - 20 'JAN' 2003 / -/ -DATES - 1 'FEB' 2003 / -/ -DATES - 14 'FEB' 2003 / -/ -DATES - 1 'MAR' 2003 / -/ -DATES - 6 'MAR' 2003 / -/ -DATES - 7 'MAR' 2003 / -/ -DATES - 1 'APR' 2003 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 1 'MAY' 2003 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 1 'JUN' 2003 / -/ -DATES - 3 'JUN' 2003 / -/ -DATES - 1 'JUL' 2003 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 10 'JUL' 2003 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 1 'AUG' 2003 / -/ -DATES - 10 'AUG' 2003 / -/ -RPTRST - 2 / -DATES - 12 'AUG' 2003 / -/ -RPTRST - 0 / -DATES - 1 'SEP' 2003 / -/ -DATES - 2 'SEP' 2003 / -/ -DATES - 10 'SEP' 2003 / -/ -DATES - 12 'SEP' 2003 / -/ -DATES - 13 'SEP' 2003 / -/ -DATES - 16 'SEP' 2003 / -/ -DATES - 1 'OCT' 2003 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 23 'OCT' 2003 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 1 'NOV' 2003 / -/ -DATES - 18 'NOV' 2003 / -/ -DATES - 1 'DEC' 2003 / -/ -DATES - 8 'DEC' 2003 / -/ -DATES - 9 'DEC' 2003 / -/ -DATES - 18 'DEC' 2003 / -/ -DATES - 1 'JAN' 2004 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 19 'JAN' 2004 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 20 'JAN' 2004 / -/ -WTRACER - 'C-4AH' 'SEA' 1.000 1* / -/ -DATES - 1 'FEB' 2004 / -/ -DATES - 1 'MAR' 2004 / -/ -DATES - 1 'APR' 2004 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 1 'MAY' 2004 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 1 'JUN' 2004 / -/ -DATES - 1 'JUL' 2004 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 3 'JUL' 2004 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 25 'JUL' 2004 / -/ -DATES - 1 'AUG' 2004 / -/ -DATES - 15 'AUG' 2004 / -/ -RPTRST - 2 / -DATES - 16 'AUG' 2004 / -/ -RPTRST - 0 / -DATES - 1 'SEP' 2004 / -/ -DATES - 20 'SEP' 2004 / -/ -DATES - 1 'OCT' 2004 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 1 'NOV' 2004 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 1 'DEC' 2004 / -/ -DATES - 1 'JAN' 2005 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 12 'JAN' 2005 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 26 'JAN' 2005 / -/ -DATES - 1 'FEB' 2005 / -/ -DATES - 1 'MAR' 2005 / -/ -DATES - 23 'MAR' 2005 / -/ -DATES - 24 'MAR' 2005 / -/ -DATES - 1 'APR' 2005 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 24 'APR' 2005 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 1 'MAY' 2005 / -/ -DATES - 1 'JUN' 2005 / -/ -DATES - 2 'JUN' 2005 / -/ -DATES - 26 'JUN' 2005 / -/ -DATES - 1 'JUL' 2005 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 10 'JUL' 2005 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 16 'JUL' 2005 / -/ -DATES - 29 'JUL' 2005 / -/ -DATES - 1 'AUG' 2005 / -/ -DATES - 3 'AUG' 2005 / -/ -DATES - 4 'AUG' 2005 / -/ -DATES - 1 'SEP' 2005 / -/ -DATES - 14 'SEP' 2005 / -/ -DATES - 1 'OCT' 2005 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 1 'NOV' 2005 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -GCONINJE - 'FIELD' 'WATER' 'RATE' 42000.000 9* / -/ -DATES - 1 'DEC' 2005 / -/ -DATES - 2 'DEC' 2005 / -/ -DATES - 30 'DEC' 2005 / -/ -DATES - 1 'JAN' 2006 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 18 'JAN' 2006 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 1 'FEB' 2006 / -/ -DATES - 24 'FEB' 2006 / -/ -DATES - 1 'MAR' 2006 / -/ -DATES - 1 'APR' 2006 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 25 'APR' 2006 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 1 'MAY' 2006 / -/ -DATES - 1 'JUN' 2006 / -/ -DATES - 1 'JUL' 2006 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 1 'AUG' 2006 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 15 'AUG' 2006 / -/ -RPTRST - 2 / -DATES - 16 'AUG' 2006 / -/ -RPTRST - 0 / -DATES - 1 'SEP' 2006 / -/ -DATES - 14 'SEP' 2006 / -/ -DATES - 1 'OCT' 2006 / -/ -RPTSCHED - 0 0 0 0 0 0 2 2 2 0 1 1 0 1 1 0 0 / -DATES - 10 'OCT' 2006 / -/ -RPTSCHED - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / -DATES - 15 'OCT' 2006 / -/ -DATES - 1 'NOV' 2006 / -/ -DATES - 9 'NOV' 2006 / -/ -DATES - 11 'NOV' 2006 / -/ -DATES - 17 'NOV' 2006 / -/ -DATES - 1 'DEC' 2006 / -/ -END diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/IOConfig/RPT_TEST2.DATA b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/IOConfig/RPT_TEST2.DATA deleted file mode 100644 index 1ca81c6682..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/IOConfig/RPT_TEST2.DATA +++ /dev/null @@ -1,808 +0,0 @@ -RUNSPEC - -DIMENS - 137 236 28 / - - -START -1 'JAN' 2000 / - -GRID -DX -905296*1 / -DY -905296*1 / -DZ -905296*1 / -TOPS -32332*1 / - -SOLUTION - -RPTSOL - 'THPRES' 'FIP=2' / - -RPTRST - ALLPROPS RVSAT RSSAT PBPD NORST=1 / ---ALLPROPS --> fluid densities, viscosities , reciprocal formation volume factors and phase relative permeabilities ---NORST=1 --> output for visualization only - -SCHEDULE - - -RPTSCHED - 'RESTART=1' 'FIP=3' 'WELSPECS' 'WELLS=0' 'NEWTON=1' 'SUMMARY=1' 'CPU=1' / - - -RPTRST - BASIC=5 FREQ=6 ALLPROPS CONV=10 RVSAT RSSAT PBPD NORST=1 / ---ALLPROPS --> fluid densities, viscosities , reciprocal formation volume factors and phase relative permeabilities ---NORST=1 --> output for visualization only - - -DATES - 3 'JAN' 2000 / -/ -DATES - 4 'JAN' 2000 / -/ -DATES - 5 'FEB' 2000 / -/ -DATES - 1 'MAR' 2000 / -/ -DATES - 1 'APR' 2000 / -/ -DATES - 1 'MAY' 2000 / -/ -DATES - 1 'JUN' 2000 / -/ -DATES - 1 'JUL' 2000 / -/ -DATES - 1 'AUG' 2000 / -/ -DATES - 11 'AUG' 2000 / -/ -DATES - 12 'AUG' 2000 / -/ -DATES - 1 'SEP' 2000 / -/ -DATES - 22 'SEP' 2000 / -/ - -DATES - 23 'SEP' 2000 / -/ -DATES - 24 'SEP' 2000 / -/ -DATES - 1 'OCT' 2000 / -/ -DATES - 7 'OCT' 2000 / -/ -DATES - 30 'OCT' 2000 / -/ -DATES - 1 'NOV' 2000 / -/ -DATES - 30 'NOV' 2000 / -/ -DATES - 1 'DEC' 2000 / -/ -DATES - 2 'DEC' 2000 / -/ -DATES - 8 'DEC' 2000 / -/ -DATES - 9 'DEC' 2000 / -/ -DATES - 10 'DEC' 2000 / -/ -DATES - 12 'DEC' 2000 / -/ -DATES - 1 'JAN' 2001 / -/ -RPTRST - 'FREQ=6' / -DATES - 15 'JAN' 2001 / -/ -DATES - 16 'JAN' 2001 / -/ -DATES - 1 'FEB' 2001 / -/ -DATES - 6 'FEB' 2001 / -/ -DATES - 1 'MAR' 2001 / -/ -DATES - 7 'MAR' 2001 / -/ -DATES - 1 'APR' 2001 / -/ -DATES - 13 'APR' 2001 / -/ -WTEST - 'F-14A' 7.000 'P' 2* / -/ -DATES - 15 'APR' 2001 / -/ -DATES - 1 'MAY' 2001 / -/ -DATES - 1 'JUN' 2001 / -/ -DATES - 2 'JUN' 2001 / -/ -DATES - 11 'JUN' 2001 / -/ -DATES - 12 'JUN' 2001 / -/ -DATES - 18 'JUN' 2001 / -/ -DATES - 19 'JUN' 2001 / -/ -DATES - 26 'JUN' 2001 / -/ -DATES - 1 'JUL' 2001 / -/ -DATES - 5 'JUL' 2001 / -/ -DATES - 1 'AUG' 2001 / -/ -DATES - 18 'AUG' 2001 / -/ -DATES - 21 'AUG' 2001 / -/ -DATES - 24 'AUG' 2001 / -/ -DATES - 1 'SEP' 2001 / -/ -DATES - 18 'SEP' 2001 / -/ -DATES - 27 'SEP' 2001 / -/ -DATES - 1 'OCT' 2001 / -/ -DATES - 2 'OCT' 2001 / -/ -DATES - 15 'OCT' 2001 / -/ -DATES - 1 'NOV' 2001 / -/ -DATES - 1 'DEC' 2001 / -/ -DATES - 2 'DEC' 2001 / -/ -DATES - 5 'DEC' 2001 / -/ -DATES - 1 'JAN' 2002 / -/ -DATES - 19 'JAN' 2002 / -/ -DATES - 1 'FEB' 2002 / -/ -DATES - 1 'MAR' 2002 / -/ -DATES - 6 'MAR' 2002 / -/ -DATES - 7 'MAR' 2002 / -/ -DATES - 28 'MAR' 2002 / -/ -DATES - 1 'APR' 2002 / -/ -DATES - 22 'APR' 2002 / -/ -DATES - 1 'MAY' 2002 / -/ -DATES - 4 'MAY' 2002 / -/ -DATES - 5 'MAY' 2002 / -/ -DATES - 26 'MAY' 2002 / -/ -DATES - 1 'JUN' 2002 / -/ -DATES - 2 'JUN' 2002 / -/ -DATES - 18 'JUN' 2002 / -/ -DATES - 19 'JUN' 2002 / -/ -DATES - 28 'JUN' 2002 / -/ -DATES - 1 'JUL' 2002 / -/ -DATES - 3 'JUL' 2002 / -/ -DATES - 19 'JUL' 2002 / -/ -DATES - 20 'JUL' 2002 / -/ -DATES - 1 'AUG' 2002 / -/ -DATES - 1 'SEP' 2002 / -/ -DATES - 1 'OCT' 2002 / -/ -DATES - 1 'NOV' 2002 / -/ -DATES - 1 'DEC' 2002 / -/ -DATES - 6 'DEC' 2002 / -/ -DATES - 1 'JAN' 2003 / -/ -DATES - 22 'JAN' 2003 / -/ -DATES - 23 'JAN' 2003 / -/ -DATES - 1 'FEB' 2003 / -/ -DATES - 1 'MAR' 2003 / -/ -DATES - 1 'APR' 2003 / -/ -DATES - 30 'APR' 2003 / -/ -DATES - 1 'MAY' 2003 / -/ -DATES - 1 'JUN' 2003 / -/ -DATES - 26 'JUN' 2003 / -/ -DATES - 1 'JUL' 2003 / -/ -DATES - 4 'JUL' 2003 / -/ -DATES - 1 'AUG' 2003 / -/ -DATES - 27 'AUG' 2003 / -/ -DATES - 28 'AUG' 2003 / -/ -DATES - 1 'SEP' 2003 / -/ -DATES - 1 'OCT' 2003 / -/ -DATES - 1 'NOV' 2003 / -/ -DATES - 3 'NOV' 2003 / -/ -DATES - 1 'DEC' 2003 / -/ -DATES - 1 'JAN' 2004 / -/ -DATES - 26 'JAN' 2004 / -/ -DATES - 1 'FEB' 2004 / -/ -DATES - 13 'FEB' 2004 / -/ -DATES - 1 'MAR' 2004 / -/ -DATES - 11 'MAR' 2004 / -/ -DATES - 18 'MAR' 2004 / -/ -DATES - 1 'APR' 2004 / -/ -DATES - 19 'APR' 2004 / -/ -DATES - 28 'APR' 2004 / -/ -DATES - 29 'APR' 2004 / -/ -DATES - 1 'MAY' 2004 / -/ -DATES - 2 'MAY' 2004 / -/ -DATES - 21 'MAY' 2004 / -/ -DATES - 22 'MAY' 2004 / -/ -DATES - 24 'MAY' 2004 / -/ -DATES - 25 'MAY' 2004 / -/ -DATES - 1 'JUN' 2004 / -/ -DATES - 30 'JUN' 2004 / -/ -DATES - 1 'JUL' 2004 / -/ -DATES - 1 'AUG' 2004 / -/ -DATES - 1 'SEP' 2004 / -/ -DATES - 1 'OCT' 2004 / -/ -DATES - 11 'OCT' 2004 / -/ -DATES - 12 'OCT' 2004 / -/ -DATES - 1 'NOV' 2004 / -/ -DATES - 1 'DEC' 2004 / -/ -DATES - 1 'JAN' 2005 / -/ -DATES - 1 'FEB' 2005 / -/ -DATES - 21 'FEB' 2005 / -/ -DATES - 27 'FEB' 2005 / -/ -DATES - 1 'MAR' 2005 / -/ -DATES - 1 'APR' 2005 / -/ -DATES - 1 'MAY' 2005 / -/ -DATES - 31 'MAY' 2005 / -/ -DATES - 1 'JUN' 2005 / -/ -DATES - 13 'JUN' 2005 / -/ -DATES - 1 'JUL' 2005 / -/ -DATES - 5 'JUL' 2005 / -/ -DATES - 8 'JUL' 2005 / -/ -DATES - 1 'AUG' 2005 / -/ -DATES - 1 'SEP' 2005 / -/ -DATES - 5 'SEP' 2005 / -/ -DATES - 20 'SEP' 2005 / -/ -DATES - 21 'SEP' 2005 / -/ -DATES - 1 'OCT' 2005 / -/ -DATES - 1 'NOV' 2005 / -/ -DATES - 1 'DEC' 2005 / -/ -DATES - 27 'DEC' 2005 / -/ -DATES - 1 'JAN' 2006 / -/ -DATES - 1 'FEB' 2006 / -/ -DATES - 1 'MAR' 2006 / -/ -DATES - 1 'APR' 2006 / -/ -DATES - 1 'MAY' 2006 / -/ -DATES - 1 'JUN' 2006 / -/ -DATES - 1 'JUL' 2006 / -/ -DATES - 1 'AUG' 2006 / -/ -DATES - 1 'SEP' 2006 / -/ -DATES - 1 'OCT' 2006 / -/ -DATES - 1 'NOV' 2006 / -/ -DATES - 1 'DEC' 2006 / -/ -DATES - 1 'JAN' 2007 / -/ -DATES - 8 'JAN' 2007 / -/ -DATES - 9 'JAN' 2007 / -/ -DATES - 1 'FEB' 2007 / -/ -DATES - 1 'MAR' 2007 / -/ -DATES - 1 'APR' 2007 / -/ -DATES - 1 'MAY' 2007 / -/ -DATES - 1 'JUN' 2007 / -/ -DATES - 1 'JUL' 2007 / -/ -DATES - 1 'AUG' 2007 / -/ -DATES - 1 'SEP' 2007 / -/ -DATES - 1 'OCT' 2007 / -/ -DATES - 1 'NOV' 2007 / -/ -DATES - 1 'DEC' 2007 / -/ -DATES - 1 'JAN' 2008 / -/ -DATES - 1 'FEB' 2008 / -/ -DATES - 1 'MAR' 2008 / -/ -DATES - 1 'APR' 2008 / -/ -DATES - 1 'MAY' 2008 / -/ -DATES - 21 'MAY' 2008 / -/ -DATES - 29 'MAY' 2008 / -/ -DATES - 1 'JUN' 2008 / -/ -DATES - 1 'JUL' 2008 / -/ -DATES - 1 'AUG' 2008 / -/ -DATES - 1 'SEP' 2008 / -/ -DATES - 1 'OCT' 2008 / -/ -DATES - 1 'NOV' 2008 / -/ -DATES - 1 'DEC' 2008 / -/ -DATES - 1 'JAN' 2009 / -/ -DATES - 1 'FEB' 2009 / -/ -DATES - 1 'MAR' 2009 / -/ -DATES - 1 'APR' 2009 / -/ -DATES - 1 'MAY' 2009 / -/ -DATES - 1 'JUN' 2009 / -/ -DATES - 1 'JUL' 2009 / -/ -DATES - 1 'AUG' 2009 / -/ -DATES - 1 'SEP' 2009 / -/ -DATES - 1 'OCT' 2009 / -/ -DATES - 1 'NOV' 2009 / -/ -DATES - 1 'DEC' 2009 / -/ -DATES - 1 'JAN' 2010 / -/ -DATES - 1 'FEB' 2010 / -/ -DATES - 1 'MAR' 2010 / -/ -DATES - 1 'APR' 2010 / -/ -DATES - 1 'MAY' 2010 / -/ -DATES - 1 'JUN' 2010 / -/ -DATES - 1 'JUL' 2010 / -/ -DATES - 1 'AUG' 2010 / -/ -DATES - 1 'SEP' 2010 / -/ -DATES - 1 'OCT' 2010 / -/ -DATES - 1 'NOV' 2010 / -/ -DATES - 1 'DEC' 2010 / -/ -DATES - 1 'JAN' 2011 / -/ -DATES - 1 'FEB' 2011 / -/ -DATES - 1 'MAR' 2011 / -/ -DATES - 1 'APR' 2011 / -/ -DATES - 1 'MAY' 2011 / -/ -DATES - 1 'JUN' 2011 / -/ -DATES - 1 'JUL' 2011 / -/ -DATES - 1 'AUG' 2011 / -/ -DATES - 1 'SEP' 2011 / -/ -DATES - 1 'OCT' 2011 / -/ -DATES - 1 'NOV' 2011 / -/ -DATES - 1 'DEC' 2011 / -/ -DATES - 1 'JAN' 2012 / -/ -DATES - 1 'FEB' 2012 / -/ -DATES - 1 'MAR' 2012 / -/ -DATES - 1 'APR' 2012 / -/ -DATES - 1 'MAY' 2012 / -/ -DATES - 1 'JUN' 2012 / -/ -DATES - 1 'JUL' 2012 / -/ -DATES - 1 'AUG' 2012 / -/ -DATES - 1 'SEP' 2012 / -/ -DATES - 1 'OCT' 2012 / -/ -DATES - 1 'NOV' 2012 / -/ -DATES - 1 'DEC' 2012 / -/ -DATES - 1 'JAN' 2013 / -/ -DATES - 1 'FEB' 2013 / -/ -DATES - 1 'MAR' 2013 / -/ -DATES - 1 'APR' 2013 / -/ -DATES - 1 'MAY' 2013 / -/ - ---Write save file at end of history -SAVE - ---there must be a TSTEP or DATES between SAVE and END (otherwise no SAVE is created) -TSTEP - 1 / - -END - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/IOConfig/SPE1CASE2.DATA b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/IOConfig/SPE1CASE2.DATA deleted file mode 100644 index 984c732fbb..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/IOConfig/SPE1CASE2.DATA +++ /dev/null @@ -1,156 +0,0 @@ --- This reservoir simulation deck is a simplified version of SPE1CASE2.DATA --- found in opm-data: https://github.com/OPM/opm-data/blob/master/spe1/SPE1CASE2.DATA - - --- This reservoir simulation deck is made available under the Open Database --- License: http://opendatacommons.org/licenses/odbl/1.0/. Any rights in --- individual contents of the database are licensed under the Database Contents --- License: http://opendatacommons.org/licenses/dbcl/1.0/ - --- Copyright (C) 2015 Statoil - --- This simulation is based on the data given in --- 'Comparison of Solutions to a Three-Dimensional --- Black-Oil Reservoir Simulation Problem' by Aziz S. Odeh, --- Journal of Petroleum Technology, January 1981 - ---------------------------------------------------------------------------- ------------------------- SPE1 - CASE 2 ------------------------------------ ---------------------------------------------------------------------------- - -RUNSPEC --- ------------------------------------------------------------------------- - -TITLE - SPE1 - CASE 2 - -DIMENS - 10 10 3 / - --- The number of equilibration regions is inferred from the EQLDIMS --- keyword. -EQLDIMS -/ - --- The number of PVTW tables is inferred from the TABDIMS keyword; --- when no data is included in the keyword the default values are used. -TABDIMS -/ - - -OIL -GAS -WATER -DISGAS --- As seen from figure 4 in Odeh, GOR is increasing with time, --- which means that dissolved gas is present - - -FIELD - -START - 1 'JAN' 2015 / - -GRID --- ------------------------------------------------------------------------- - - -DX --- There are in total 300 cells with length 1000ft in x-direction - 300*1000 / -DY --- There are in total 300 cells with length 1000ft in y-direction - 300*1000 / -DZ --- The layers are 20, 30 and 50 ft thick, in each layer there are 100 cells - 100*20 100*30 100*50 / - -TOPS --- The depth of the top of each grid block - 100*8325 / - -PORO --- Constant porosity of 0.3 throughout all 300 grid cells - 300*0.3 / - -PERMX --- The layers have perm. 500mD, 50mD and 200mD, respectively. - 100*500 100*50 100*200 / - -PERMY --- Equal to PERMX - 100*500 100*50 100*200 / - -PERMZ --- Cannot find perm. in z-direction in Odeh's paper --- For the time being, we will assume PERMZ equal to PERMX and PERMY: - 100*500 100*50 100*200 / - - - -SCHEDULE --- ------------------------------------------------------------------------- -RPTSCHED - 'PRES' 'SGAS' 'RS' 'WELLS' / - - --- If no resolution (i.e. case 1), the two following lines must be added: ---DRSDT --- 0 / --- Since this is Case 2, the two lines above have been commented out. --- if DRSDT is set to 0, GOR cannot rise and free gas does not --- dissolve in undersaturated oil -> constant bubble point pressure - -WELSPECS --- Item #: 1 2 3 4 5 6 - 'PROD' 'G1' 10 10 8400 'OIL' / - 'INJ' 'G1' 1 1 8335 'GAS' / -/ --- Coordinates in item 3-4 are retrieved from Odeh's figure 1 and 2 --- Note that the depth at the midpoint of the well grid blocks --- has been used as reference depth for bottom hole pressure in item 5 - -COMPDAT --- Item #: 1 2 3 4 5 6 7 8 9 - 'PROD' 10 10 3 3 'OPEN' 1* 1* 0.5 / - 'INJ' 1 1 1 1 'OPEN' 1* 1* 0.5 / -/ --- Coordinates in item 2-5 are retreived from Odeh's figure 1 and 2 --- Item 9 is the well bore internal diameter, --- the radius is given to be 0.25ft in Odeh's paper - - -WCONPROD --- Item #:1 2 3 4 5 9 - 'PROD' 'OPEN' 'ORAT' 20000 4* 1000 / -/ --- It is stated in Odeh's paper that the maximum oil prod. rate --- is 20 000stb per day which explains the choice of value in item 4. --- The items > 4 are defaulted with the exception of item 9, --- the BHP lower limit, which is given to be 1000psia in Odeh's paper - -WCONINJE --- Item #:1 2 3 4 5 6 7 - 'INJ' 'GAS' 'OPEN' 'RATE' 100000 1* 9014 / -/ --- Stated in Odeh that gas inj. rate (item 5) is 100MMscf per day --- BHP upper limit (item 7) should not be exceeding the highest --- pressure in the PVT table=9014.7psia (default is 100 000psia) - -TSTEP ---Advance the simulater once a month for TEN years: -31 28 31 30 31 30 31 31 30 31 30 31 -31 28 31 30 31 30 31 31 30 31 30 31 -31 28 31 30 31 30 31 31 30 31 30 31 -31 28 31 30 31 30 31 31 30 31 30 31 -31 28 31 30 31 30 31 31 30 31 30 31 -31 28 31 30 31 30 31 31 30 31 30 31 -31 28 31 30 31 30 31 31 30 31 30 31 -31 28 31 30 31 30 31 31 30 31 30 31 -31 28 31 30 31 30 31 31 30 31 30 31 -31 28 31 30 31 30 31 31 30 31 30 31 / - ---Advance the simulator once a year for TEN years: ---10*365 / - -END diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/IOConfig/SPE9_END.DATA b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/IOConfig/SPE9_END.DATA deleted file mode 100644 index 3534ea0e7a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/IOConfig/SPE9_END.DATA +++ /dev/null @@ -1,174 +0,0 @@ --- This reservoir simulation deck is a simplified version of SPE1CASE2.DATA --- found in opm-data: https://github.com/OPM/opm-data/blob/master/spe1/SPE1CASE2.DATA - - --- This reservoir simulation deck is made available under the Open Database --- License: http://opendatacommons.org/licenses/odbl/1.0/. Any rights in --- individual contents of the database are licensed under the Database Contents --- License: http://opendatacommons.org/licenses/dbcl/1.0/ - --- Copyright (C) 2015 Statoil - --- This simulation is based on the data given in --- 'Comparison of Solutions to a Three-Dimensional --- Black-Oil Reservoir Simulation Problem' by Aziz S. Odeh, --- Journal of Petroleum Technology, January 1981 - ---------------------------------------------------------------------------- ------------------------- SPE1 - CASE 2 ------------------------------------ ---------------------------------------------------------------------------- - -RUNSPEC --- ------------------------------------------------------------------------- - -TITLE - SPE1 - CASE 2 - -DIMENS - 10 10 3 / - --- The number of equilibration regions is inferred from the EQLDIMS --- keyword. -EQLDIMS -/ - --- The number of PVTW tables is inferred from the TABDIMS keyword; --- when no data is included in the keyword the default values are used. -TABDIMS -/ - - -OIL -GAS -WATER -DISGAS --- As seen from figure 4 in Odeh, GOR is increasing with time, --- which means that dissolved gas is present - - -FIELD - -START - 1 'JAN' 2015 / - -GRID --- ------------------------------------------------------------------------- - - -DX --- There are in total 300 cells with length 1000ft in x-direction - 300*1000 / -DY --- There are in total 300 cells with length 1000ft in y-direction - 300*1000 / -DZ --- The layers are 20, 30 and 50 ft thick, in each layer there are 100 cells - 100*20 100*30 100*50 / - -TOPS --- The depth of the top of each grid block - 100*8325 / - -PORO --- Constant porosity of 0.3 throughout all 300 grid cells - 300*0.3 / - -PERMX --- The layers have perm. 500mD, 50mD and 200mD, respectively. - 100*500 100*50 100*200 / - -PERMY --- Equal to PERMX - 100*500 100*50 100*200 / - -PERMZ --- Cannot find perm. in z-direction in Odeh's paper --- For the time being, we will assume PERMZ equal to PERMX and PERMY: - 100*500 100*50 100*200 / - - - -SCHEDULE - -RPTRST - 'BASIC=4' / -WELSPECS --- Column 3: I-value of well head or heel --- Column 4: J-value of well head or heel --- - these coordinates are listed in Killough's dataset --- Column 5: ref. depth of BHP (ft) --- - stated to be 9110ft in Killough --- Column 6: preferred phase for well --- - should be water for injector and oil for producers --- Column 7: drainage radius for calc. of productivity or --- injectivity indices (ft) --- - stated to be 60ft in Killough - --- #: 1 2 3 4 5 6 7 - 'INJE1' 'G' 1 1 9110 'WATER' 60 / - 'PRODU2' 'G' 2 2 9110 'OIL' 60 / - / - -COMPDAT --- Column 2: I-value of connecting grid block --- Column 3: J-value of connecting grid block --- Column 4: K-value of upper connecting grid block --- Column 5: K-value of lower connecting grid block --- - these coordinates are listed in Killough's dataset --- Column 9: well bore diameter --- - Killough says radius is 0.5ft - --- #: 1 2 3 4 5 6 7 8 9 - 'INJE1' 1 1 1 1 'OPEN' 1* 1* 1 / - 'PRODU2' 2 2 2 2 'OPEN' 1* 1* 1 / -/ - -WCONINJE --- Killough says the water injector is set to a max rate of --- 5000 STBW per D with a max BHP of 4000psia at a reference --- depth of 9110ft subsea: --- #: 1 2 3 4 5 7 - 'INJE1' 'WATER' 'OPEN' 'RATE' 5000 1* 4000 / -/ - -WCONPROD --- Killough says the max oil rate for all producers is set to --- 1500 STBO per D at time zero and that the min flowing BHP --- is set to 1000psia (with a ref. depth of 9110ft --- for this pressure in all wells): --- #: 1 2 3 4 9 - 'PRODU*' 'OPEN' 'ORAT' 1500 4* 1000 / --- Here, the wildcard '*' has been used to indicate that this applies --- to all producers; PRODU1-PRODU25. -/ - -TSTEP -30*10 / - -END - --- At 300 days, the max oil rate for all producers is lowered --- to 100 STBO per D: -WCONPROD --- #: 1 2 3 4 9 - 'PRODU*' 'OPEN' 'ORAT' 100 4* 1000 / -/ - -TSTEP -6*10 / - --- At 360 days, the max oil rate for all producers is changed --- back to 1500 STBO per D: -WCONPROD --- #: 1 2 3 4 9 - 'PRODU*' 'OPEN' 'ORAT' 1500 4* 1000 / -/ - -TSTEP -54*10 / --- End of simulation at 900 days - -END - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/MULTREGT/MULTREGT b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/MULTREGT/MULTREGT deleted file mode 100644 index 45cb89ee0f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/MULTREGT/MULTREGT +++ /dev/null @@ -1,192 +0,0 @@ -MULTREGT - 2 1 1.0000000000 / - 3 1 1.0000000000 / - 3 2 1.0000000000 / - 4 1 0.0050000000 / - 4 2 1.0000000000 / - 4 3 1.0000000000 / - 5 1 0.0000000000 / - 5 2 0.0000000000 / - 5 3 0.0000000000 / - 5 4 0.0000000000 / - 6 1 0.0000000000 / - 6 2 0.0000000000 / - 6 3 0.0000000000 / - 6 4 0.0000000000 / - 6 5 1.0000000000 / - 7 1 0.0000000000 / - 7 2 0.0000000000 / - 7 3 0.0000000000 / - 7 4 0.0000000000 / - 7 5 1.0000000000 / - 7 6 0.0500000000 / - 8 1 0.0000000000 / - 8 2 0.0000000000 / - 8 3 0.0000000000 / - 8 4 0.0000000000 / - 8 5 0.0100000000 / - 8 6 1.0000000000 / - 8 7 1.0000000000 / - 9 1 0.0000000000 / - 9 2 0.0000000000 / - 9 3 0.0000000000 / - 9 4 0.0000000000 / - 9 5 1.0000000000 / - 9 6 1.0000000000 / - 9 7 1.0000000000 / - 9 8 1.0000000000 / - 10 1 0.0000000000 / - 10 2 0.0000000000 / - 10 3 0.0000000000 / - 10 4 0.0000000000 / - 10 5 1.0000000000 / - 10 6 1.0000000000 / - 10 7 1.0000000000 / - 10 8 1.0000000000 / - 10 9 1.0000000000 / - 11 1 0.0000000000 / - 11 2 0.0000000000 / - 11 3 0.0000000000 / - 11 4 0.0000000000 / - 11 5 1.0000000000 / - 11 6 1.0000000000 / - 11 7 1.0000000000 / - 11 8 1.0000000000 / - 11 9 1.0000000000 / - 11 10 1.0000000000 / - 12 1 0.0000000000 / - 12 2 0.0000000000 / - 12 3 0.0000000000 / - 12 4 0.0000000000 / - 12 5 1.0000000000 / - 12 6 1.0000000000 / - 12 7 1.0000000000 / - 12 8 1.0000000000 / - 12 9 0.0100000000 / - 12 10 1.0000000000 / - 12 11 1.0000000000 / - 13 1 0.0000000000 / - 13 2 0.0000000000 / - 13 3 0.0000000000 / - 13 4 0.0000000000 / - 13 5 0.1000000000 / - 13 6 0.1000000000 / - 13 7 0.1000000000 / - 13 8 0.1000000000 / - 13 9 1.0000000000 / - 13 10 1.0000000000 / - 13 11 1.0000000000 / - 13 12 1.0000000000 / - 14 1 0.0000000000 / - 14 2 0.0000000000 / - 14 3 0.0000000000 / - 14 4 0.0000000000 / - 14 5 0.1000000000 / - 14 6 1.0000000000 / - 14 7 0.1000000000 / - 14 8 0.1000000000 / - 14 9 1.0000000000 / - 14 10 100.0000000000 / - 14 11 1.0000000000 / - 14 12 1.0000000000 / - 14 13 1.0000000000 / - 15 1 0.0000000000 / - 15 2 0.0000000000 / - 15 3 0.0000000000 / - 15 4 0.0000000000 / - 15 5 0.1000000000 / - 15 6 0.1000000000 / - 15 7 0.1000000000 / - 15 8 0.1000000000 / - 15 9 1.0000000000 / - 15 10 1.0000000000 / - 15 11 1.0000000000 / - 15 12 1.0000000000 / - 15 13 1.0000000000 / - 15 14 1.0000000000 / - 16 1 0.0000000000 / - 16 2 0.0000000000 / - 16 3 0.0000000000 / - 16 4 0.0000000000 / - 16 5 0.0100000000 / - 16 6 0.1000000000 / - 16 7 0.1000000000 / - 16 8 0.1000000000 / - 16 9 1.0000000000 / - 16 10 1.0000000000 / - 16 11 1.0000000000 / - 16 12 1.0000000000 / - 16 13 0.0100000000 / - 16 14 1.0000000000 / - 16 15 1.0000000000 / - 17 1 0.0000000000 / - 17 2 0.0000000000 / - 17 3 0.0000000000 / - 17 4 0.0000000000 / - 17 5 0.0000000000 / - 17 6 0.0000000000 / - 17 7 0.0000000000 / - 17 8 0.0000000000 / - 17 9 0.0010000000 / - 17 10 0.0000000000 / - 17 11 0.0000000000 / - 17 12 0.0000000000 / - 17 13 0.0008000000 / - 17 14 0.0000000000 / - 17 15 0.0000000000 / - 17 16 0.0000000000 / - 18 1 0.0000000000 / - 18 2 0.0000000000 / - 18 3 0.0000000000 / - 18 4 0.0000000000 / - 18 5 0.0000000000 / - 18 6 0.0000000000 / - 18 7 0.0000000000 / - 18 8 0.0000000000 / - 18 9 0.0000000000 / - 18 10 1.0000000000 / - 18 11 0.0000000000 / - 18 12 0.0000000000 / - 18 13 0.0000000000 / - 18 14 0.1000000000 / - 18 15 0.0000000000 / - 18 16 0.0000000000 / - 18 17 1.0000000000 / - 19 1 0.0000000000 / - 19 2 0.0000000000 / - 19 3 0.0000000000 / - 19 4 0.0000000000 / - 19 5 0.0000000000 / - 19 6 0.0000000000 / - 19 7 0.0000000000 / - 19 8 0.0000000000 / - 19 9 0.0000000000 / - 19 10 0.0000000000 / - 19 11 0.0010000000 / - 19 12 0.0000000000 / - 19 13 0.0000000000 / - 19 14 0.0000001 / - 19 15 0.0500000000 / - 19 16 0.0000000000 / - 19 17 1.0000000000 / - 19 18 1.0000000000 / - 20 1 0.0000000000 / - 20 2 0.0000000000 / - 20 3 0.0000000000 / - 20 4 0.0000000000 / - 20 5 0.0000000000 / - 20 6 0.0000000000 / - 20 7 0.0000000000 / - 20 8 0.0000000000 / - 20 9 0.0000000000 / - 20 10 0.0000000000 / - 20 11 0.0000000000 / - 20 12 1.0000000000 / - 20 13 0.0000000000 / - 20 14 0.0000000000 / - 20 15 0.0000000000 / - 20 16 0.0010000000 / - 20 17 0.1000000000 / - 20 18 1.0000000000 / - 20 19 1.0000000000 / -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/MULTREGT/MULTREGT.DATA b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/MULTREGT/MULTREGT.DATA deleted file mode 100644 index 7ccb6e78e5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/MULTREGT/MULTREGT.DATA +++ /dev/null @@ -1,55 +0,0 @@ -RUNSPEC - -DIMENS -2 2 2 / - -GRID -DX -8*0.25 / - -DYV -2*0.25 / - -DZ -8*0.25 / - -TOPS -4*0.25 / - -FLUXNUM -1 2 -1 2 -3 4 -3 4 -/ - -MULTNUM -1 2 -1 2 -3 4 -3 4 -/ - -MULTREGT -1 2 0.10 X NONNC M / -3 4 0.50 X NNC M / -/ - -MULTREGT -2 1 0.20 X ALL M / -/ - -MULTREGT -1 3 1.50 XYZ ALL F / -/ - - -MULTREGT -2 4 0.75 Z ALL M / -- This record should be completely overwritten by the next. -2 4 2.50 XY ALL F / -4 2 0.6 XYZ ALL F / -/ - - -EDIT - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/NNC/NNC.DATA b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/NNC/NNC.DATA deleted file mode 100644 index d404314569..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/NNC/NNC.DATA +++ /dev/null @@ -1,37 +0,0 @@ -RUNSPEC - -OIL -GAS -WATER - - -DIMENS - 10 10 1 / - -GRID - -DXV -10*1000.0 -/ - -DYV -10*1000.0 -/ - -DZ -100*20.0 -/ - -TOPS -100*10 -/ - -NNC -1 1 1 2 1 1 0.5 / -1 1 1 1 2 1 1.0 / -/ - -NNC -1 1 1 2 1 1 0.5 / -1 2 1 1 2 1 1.0 / -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/NNC/noNNC.DATA b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/NNC/noNNC.DATA deleted file mode 100644 index 720dca5fe7..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/NNC/noNNC.DATA +++ /dev/null @@ -1,28 +0,0 @@ -RUNSPEC - -OIL -GAS -WATER - - -DIMENS - 10 10 1 / - -GRID - -DXV -10*1000.0 -/ - -DYV -10*1000.0 -/ - -DZ -100*20.0 -/ - -TOPS -100*10 -/ - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/POLYMER/POLY.inc b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/POLYMER/POLY.inc deleted file mode 100644 index a421206e98..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/POLYMER/POLY.inc +++ /dev/null @@ -1,55 +0,0 @@ --- This reservoir simulation deck is made available under the Open Database --- License: http://opendatacommons.org/licenses/odbl/1.0/. Any rights in --- individual contents of the database are licensed under the Database Contents --- License: http://opendatacommons.org/licenses/dbcl/1.0/ - --- Copyright (C) 2015 Statoil --- Copyright (C) 2015 SINTEF ICT, Applied Mathematics -RUNSPEC - -TABDIMS - 1 1 / - -EQLDIMS - / - - -REGDIMS - 9* 1 / - - -PROPS -NOECHO -PLYVISC -0 1.0 -0.5 3.0 -1.0 6.0 -1.5 12.0 -2.0 24.0 -3.0 48.0 / - - -PLYROCK ---IPV RRF dens AI max ads - 0.05 1.2 2500 2 0.000025 / - - -PLYADS --- conc adsorb-conc - 0.000 0.000000 - 0.250 0.000012 - 0.500 0.000016 - 0.750 0.000019 - 1.000 0.000020 - 1.250 0.000021 - 1.500 0.000023 - 1.750 0.000025 - 3.000 0.000025 / - -PLMIXPAR - 1.0 / - -PLYMAX - 3.00 0 / - -ECHO diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/POLYMER/plyads.data b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/POLYMER/plyads.data deleted file mode 100644 index 28cea6fa10..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/POLYMER/plyads.data +++ /dev/null @@ -1,16 +0,0 @@ -TABDIMS --- NTSFUN NTPVT NSSFUN NPPVT NTFIP NRPVT - 1 1 100 50 1 / - -PLYADS -0.00 0.0 -0.25 0.000010 -0.50 0.000018 -0.75 0.000023 -1.00 0.000027 -1.25 0.000030 -1.50 0.000030 -1.75 0.000030 -2.00 0.000030 -3.00 0.000030 / - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/POLYMER/plyadss.data b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/POLYMER/plyadss.data deleted file mode 100644 index bc10ca05f1..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/POLYMER/plyadss.data +++ /dev/null @@ -1,18 +0,0 @@ -TABDIMS --- NTSFUN NTPVT NSSFUN NPPVT NTFIP NRPVT - 3 1 100 50 1 / - -PLYADSS -0.00 0.0 0 1 2 3 / -1.00 1.0 0 10 20 30 / -2.00 2.0 0 100 200 300 / -/ -6.00 6.0 0 1 2 3 / -7.00 7.0 0 10 20 30 / -8.00 8.0 0 100 200 300 / -/ -3.00 4.0 0 1 2 3 / -4.00 4.0 0 10 20 30 / -5.00 5.0 0 100 200 300 / -/ - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/POLYMER/plydhflf.data b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/POLYMER/plydhflf.data deleted file mode 100644 index 5b11325c8f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/POLYMER/plydhflf.data +++ /dev/null @@ -1,10 +0,0 @@ -TABDIMS --- NTSFUN NTPVT NSSFUN NPPVT NTFIP NRPVT - 1 1 100 50 1 / - - -PLYDHFLF - 0.0 365.0 - 50.0 240.0 - 150.0 200.0 / - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/POLYMER/plyshlog.data b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/POLYMER/plyshlog.data deleted file mode 100644 index 87d27979a8..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/POLYMER/plyshlog.data +++ /dev/null @@ -1,14 +0,0 @@ --- THE TABDIMS IS NOT SUPPORTED FOR PLYSHLOG YET. --- TABDIMS --- NTSFUN NTPVT NSSFUN NPPVT NTFIP NRPVT --- 1 1 100 50 1 / - -PLYSHLOG - 1.0 3.0 -/ - -0.0000001 1.0 -1.0 1.2 -1000.0 2.4 -/ - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/POLYMER/plyvisc.data b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/POLYMER/plyvisc.data deleted file mode 100644 index 13a03e655d..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/POLYMER/plyvisc.data +++ /dev/null @@ -1,8 +0,0 @@ -TABDIMS --- NTSFUN NTPVT NSSFUN NPPVT NTFIP NRPVT - 1 1 100 50 1 / - - -PLYVISC - 0.0 1.0 - 1.25 30.0 / diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/PORO/PORO1 b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/PORO/PORO1 deleted file mode 100644 index 4382e08a69..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/PORO/PORO1 +++ /dev/null @@ -1,95 +0,0 @@ -PERMX - 1 2 3 997*10 -/ - - -PORO - 0.233782813 0.251224369 0.29638353 0.29790169 0.169350415 - 0.0517521128 0.00144939369 0.0151031613 0.05431756 0.0407604612 - 0.0103957523 0.0100668613 0.0490571633 0.104077779 0.10558667 - 0.201115698 0.17863065 0.0653175786 0.0190387126 0.00337611581 - 0.0063609276 0.0114936661 0.0172659531 0.0805263668 0.134678334 - 0.176294863 0.192887321 0.140515864 0.101473689 0.0844900534 - 0.17002067 0.143918887 0.228476837 0.276182383 0.256196886 - 0.184133664 0.136353821 0.144517705 0.144700915 0.202955201 - 0.240127429 0.317178339 0.319688618 0.251767546 0.160828486 - 0.0956103355 0.037380781 0.0165337157 0.0783403516 0.0808456764 - 0.0912637711 0.0973924324 0.103984341 0.156838894 0.210713655 - 0.253899187 0.242051423 0.185285807 0.0716104209 0.00610434311 - 0.000411647314 0.00933679566 0.0886785686 0.185810968 0.239035457 - 0.257317334 0.257221431 0.184892476 0.12399739 0.0531515479 - 0.121335335 0.103025019 0.187892184 0.229996994 0.24713178 - 0.275338888 0.253360033 0.259308547 0.304893434 0.303201646 - 0.221585765 0.305705786 0.284208864 0.238151267 0.175238907 - 0.233501226 0.170360968 0.0841259062 0.132959858 0.196834058 - 0.201730013 0.180607021 0.24763459 0.280171901 0.246962205 - 0.255853683 0.205411643 0.119471915 0.115516089 0.0203874856 - 0.00532156881 0.0640730336 0.140209481 0.245134518 0.245983586 - 0.247837856 0.236739933 0.145315439 0.0748118684 0.0426140353 - 0.0649707466 0.0420954116 0.146764234 0.20062232 0.224874943 - 0.254481554 0.282053798 0.324059844 0.310452819 0.315820634 - 0.210584491 0.291307151 0.302948236 0.341297835 0.330804944 - 0.309543997 0.281588584 0.20416452 0.220917195 0.273620009 - 0.259581447 0.274220228 0.311186552 0.312752187 0.302147001 - 0.241427705 0.160514459 0.0834907666 0.0833296999 0.0262788143 - 0.00459888205 0.0151637336 0.0557102337 0.130881637 0.13288027 - 0.137242123 0.127250269 0.0870473608 0.0580857433 0.0789224729 - 0.046535816 0.0501726568 0.100927673 0.110647544 0.113335721 - 0.111934848 0.209281906 0.268807977 0.279664367 0.326134771 - 0.25852263 0.33894369 0.374676973 0.400080621 0.352914482 - 0.295502722 0.265623331 0.28812775 0.292017907 0.282535464 - 0.272598714 0.303617328 0.322461724 0.285990119 0.264858067 - 0.181161433 0.159774289 0.113000199 0.105926409 0.0276138727 - 0.0174431559 0.0233534891 0.0517952517 0.0618142448 0.102154315 - 0.171060652 0.0868899971 0.0661903769 0.167647243 0.261588633 - 0.262981534 0.223184273 0.217965215 0.164199457 0.124516942 - 0.125011116 0.096620135 0.145295113 0.244747683 0.29181239 - 0.301577836 0.331127107 0.373395115 0.376733631 0.340226501 - 0.30070883 0.254401416 0.247659594 0.229020178 0.292790681 - 0.23537007 0.240339398 0.25671038 0.219709814 0.240190461 - 0.209971368 0.190836728 0.134359151 0.0891066641 0.0651798025 - 0.0242433585 0.0912179351 0.0951088741 0.0929598138 0.130016878 - 0.203905582 0.111525647 0.0677958876 0.223600835 0.300738782 - 0.29966563 0.302599162 0.299488574 0.247764915 0.183198586 - 0.18049866 0.129561752 0.162591472 0.126442447 0.21619229 - 0.253406048 0.267661303 0.293123543 0.333721131 0.322719991 - 0.283254892 0.217606515 0.145154193 0.173741192 0.213052347 - 0.144042343 0.140837952 0.135061488 0.0657997876 0.130718812 - 0.194786787 0.212136343 0.185938969 0.144389957 0.124783367 - 0.111610219 0.178781137 0.168019235 0.140167356 0.113255277 - 0.179829761 0.159346208 0.120837137 0.264370561 0.346027911 - 0.360584617 0.346581995 0.360609382 0.312403083 0.197688505 - 0.16994445 0.0923819318 0.095169723 0.124563113 0.217348784 - 0.192714646 0.24257867 0.272538751 0.319470525 0.298998207 - 0.236576214 0.168799043 0.129245088 0.157657668 0.166072458 - 0.141835466 0.139559776 0.119177379 0.106017821 0.0754110888 - 0.128155574 0.211125463 0.262580574 0.289803475 0.270597786 - 0.241089642 0.234884322 0.180869028 0.152909532 0.156731009 - 0.231723666 0.210876286 0.247531995 0.300129414 0.351914495 - 0.398535788 0.391000509 0.393742025 0.355129749 0.219685987 - 0.149023101 0.0543690287 0.0521515869 0.0798298419 0.139071539 - 0.186062217 0.252783477 0.26910916 0.238308445 0.172099084 - 0.104361057 0.1015369 0.133604452 0.186505258 0.274802804 - 0.209818006 0.221989691 0.155507818 0.06543044 0.074158527 - 0.119107477 0.242341548 0.27776283 0.330580175 0.339612365 - 0.300224602 0.271729171 0.228520602 0.237141714 0.238545373 - 0.284317732 0.262481213 0.332825124 0.374134123 0.385446161 - 0.386527568 0.383434862 0.367631167 0.321502298 0.168704897 - 0.0890276358 0.0568729155 0.0705353022 0.0873527825 0.189328223 - 0.215201631 0.223124504 0.107606158 0.0522262342 0.0352564603 - 0.0373919159 0.0453047529 0.135370642 0.179698929 0.243843704 - 0.185293019 0.200200781 0.15213269 0.0348231308 0.0162751637 - 0.14487268 0.28416881 0.349487185 0.32969138 0.321630985 - 0.304139674 0.282437801 0.246355176 0.265226454 0.281115353 - 0.287141502 0.28028214 0.321915478 0.407020509 0.395867944 - 0.379479468 0.325734377 0.314330935 0.248417795 0.134201676 - 0.086449869 0.0337512977 0.035505522 0.0627954379 0.207819939 - 0.14222075 0.125409961 0.0882729515 0.0591031797 0.0310302842 - 0.0894995481 0.130140245 0.231017068 0.28279382 0.232155755 - 0.235844567 0.143465191 0.120464049 0.0306820124 0.020004116 - 0.123772971 0.261369765 0.33973974 0.318764687 0.283671945 - 0.26565209 0.220003307 0.233180866 0.234529868 0.214984283 - 0.246029317 0.220358551 0.30363825 0.348013073 0.32261622 - 0.26128 0.1956698 0.232015416 0.187356427 0.141131446 - 0.0409243591 0.0101284841 0.0271459073 0.0713910535 0.155628711 -/ \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/RSVD/RSVD.txt b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/RSVD/RSVD.txt deleted file mode 100644 index 54305f8afe..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/RSVD/RSVD.txt +++ /dev/null @@ -1,28 +0,0 @@ -EQLDIMS - 6 100 20 / - - - -RSVD -2382.0 120.25 -2597.0 110.00 -2640.7 106.77 -2697.0 106.77 / -2550 94.5000 -2510.0 94.3 -2550.0 94.1 / -2582.0 120.25 -2597.0 110.00 -2620.7 106.77 -1697.0 106.77 / -2500 94.5000 -2210.0 94.3 -2390.0 94.1 / -2535.9 120.29 -2599.9 110.00 -2463.6 106.77 -2699.9 106.77 / -2525.9 120.29 -2549.9 110.00 -2631.6 106.77 -2612.9 106.77 / diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/Resinsight/DECK1.DATA b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/Resinsight/DECK1.DATA deleted file mode 100644 index 2a5dbb19d3..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/Resinsight/DECK1.DATA +++ /dev/null @@ -1,23 +0,0 @@ -SPECGRID - 20 20 10 / - -IGNORED -Have no clue / -how to / -parse This keyword/ -/ - -GRID - -FAULTS - 'F1' 1 1 1 4 1 4 'X' / - 'F2' 5 5 1 4 1 4 'X-' / -/ - -And then comes more crap??! - --- And a valid keyword: -TABDIMS - 1 2 3 / - -And it ends with crap?! diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE1 b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE1 deleted file mode 100644 index aeaacb2fb9..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE1 +++ /dev/null @@ -1,32 +0,0 @@ -START -10 MAI 2007 / - - -SCHEDULE - -NETBALAN - 0.000 0.200 6* / - - -DATES -- Bananskrell - 10 'JUN' 2007 / -/ - - -DATES - 10 JLY 2007 / - 10 AUG 2007 / -/ - - - -TSTEP - 10 2*10 / - - -DATES - 10 JLY 2008 / - 10 AUG 2008 / -/ - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_CMODE_MISSING_DATA b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_CMODE_MISSING_DATA deleted file mode 100644 index 4f7120bfff..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_CMODE_MISSING_DATA +++ /dev/null @@ -1,27 +0,0 @@ -START - 10 MAI 2007 / - -SCHEDULE - -WELSPECS - 'W1' 'OP' 30 37 3.33 'OIL' 7* / - 'W2' 'OP' 30 37 3.33 'OIL' 7* / - 'W3' 'OP' 30 37 3.33 'OIL' 7* / - 'W4' 'OP' 30 37 3.33 'OIL' 7* / -/ - - -WCONPROD - 'W2' 'OPEN' 'RESV' 2079.506 0.000 230825.037 5* / -/ - - --- The RESV control mode is currently not supported for historical mode. -WCONHIST - 'W2' 'OPEN' 'RESV' 2079.506 0.000 230825.037 5* / -/ - - -WCONINJE - 'W_1' 'WATER' 1* 'BHP' 20000.000 200000.000 * 678 4* / -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_COMMENTS_AFTER_KEYWORDS b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_COMMENTS_AFTER_KEYWORDS deleted file mode 100644 index 9051e5ca35..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_COMMENTS_AFTER_KEYWORDS +++ /dev/null @@ -1,26 +0,0 @@ -START -10 MAI 2007 / - - -SCHEDULE - -DATES -- Bananskrell - 10 'JUN' 2007 / -/ - - -DATES - 10 JLY 2007 / - 10 AUG 2007 / -/ - - - -TSTEP -- Fiskepudding - 10 2*10 / - - -DATES - 10 JLY 2008 / - 10 AUG 2008 / -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_COMPDAT1 b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_COMPDAT1 deleted file mode 100644 index 814da630f4..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_COMPDAT1 +++ /dev/null @@ -1,88 +0,0 @@ -DIMENS - 10 10 10 / - -GRID - -DX - 1000*1 / -DY - 1000*1 / -DZ - 1000*1 / - -TOPS - 1000*1 / - -SCHEDULE - -WELSPECS - 'W_1' 'OP' 3 7 3.33 'OIL' 7* / - 'W_2' 'OP' 3 7 3.33 'OIL' 7* / - 'W_3' 'OP' 3 7 3.33 'OIL' 7* / -/ - - -COMPDAT --- WELL I J K1 K2 Sat. CF DIAM KH SKIN ND DIR Ro - 'W_1' 3 3 1 3 'OPEN' 1* 32.948 0.311 3047.839 2* 'X' 22.100 / - 'W_1' 3 3 2 2 'OPEN' 1* * 0.311 4332.346 2* 'X' 22.123 / - 'W_1' 3 3 3 3 'OPEN' 1* 51.867 0.311 4799.764 2* 'X' 22.143 / - 'W_1' 3 3 4 4 'OPEN' 1* 34.243 0.311 3169.482 2* 'X' 22.166 / - 'W_1' 3 3 4 4 'OPEN' 1* 8.988 0.311 832.457 2* 'X' 22.236 / - 'W_1' 3 3 5 5 'OPEN' 1* 36.435 0.311 3375.309 2* 'X' 22.262 / - 'W_1' 3 3 6 6 'OPEN' 1* 39.630 0.311 3672.067 2* 'X' 22.283 / - 'W_1' 3 3 7 7 'OPEN' 1* 33.975 0.311 3148.671 2* 'X' 22.307 / - 'W_1' 3 3 8 8 'OPEN' 1* 24.869 0.311 2305.242 2* 'X' 22.329 / - 'W_1' 3 3 9 9 'OPEN' 1* 38.301 0.311 3551.043 2* 'X' 22.351 / - 'W_1' 3 3 1 1 'OPEN' 1* 6.642 0.311 615.914 2* 'X' 22.372 / - 'W_1' 3 3 1 1 'OPEN' 1* 1.322 0.311 122.614 2* 'X' 22.396 / - 'W_1' 3 3 1 1 'OPEN' 1* 3.797 0.311 352.293 2* 'X' 22.418 / - 'W_1' 3 3 1 1 'OPEN' 1* 14.742 0.311 1367.872 2* 'X' 22.439 / - 'W_1' 3 3 1 1 'OPEN' 1* 19.731 0.311 1831.202 2* 'X' 22.463 / - 'W_2' 2 5 1 1 'SHUT' 1* 1.168 0.311 107.872 2* 'Y' 21.925 / - 'W_2' 2 5 2 2 'SHUT' 1* 15.071 0.311 1391.859 2* 'Y' 21.920 / - 'W_2' 2 5 3 3 'SHUT' 1* 6.242 0.311 576.458 2* 'Y' 21.915 / - 'W_2' 2 5 4 4 'SHUT' 1* 16.493 0.311 1522.982 2* 'Y' 21.908 / - 'W_2' 2 5 5 5 'SHUT' 1* 7.359 0.311 679.489 2* 'Y' 21.903 / - 'W_3' 3 1 1 1 'OPEN' 1* 27.412 0.311 2445.337 2* 'Y' 18.521 / - 'W_3' 3 1 2 2 'OPEN' 1* 55.195 0.311 4923.842 2* 'Y' 18.524 / - 'W_3' 3 1 3 3 'OPEN' 1* 18.032 0.311 1608.615 2* 'Y' 18.526 / - 'W_3' 3 1 3 3 'OPEN' 1* 56.817 0.311 5047.177 2* 'Y' 18.155 / - 'W_3' 3 1 4 4 'OPEN' 1* 4.728 0.311 420.067 2* 'Y' 18.162 / -/ - - -COMPDAT --- WELL I J K1 K2 Sat. CF DIAM KH SKIN ND DIR Ro - 'W_1' 3 7 1 3 'OPEN' 1* 32.948 0.311 3047.839 2* 'X' 22.100 / - 'W_1' 3 7 2 2 'OPEN' 1* 23487.0 0.311 4332.346 2* 'X' 22.123 / - 'W_1' 3 7 3 3 'OPEN' 1* 51.867 0.311 4799.764 2* 'X' 22.143 / - 'W_1' 3 7 4 4 'OPEN' 1* 34.243 0.311 3169.482 2* 'X' 22.166 / - 'W_1' 3 7 4 4 'OPEN' 1* 8.988 0.311 832.457 2* 'X' 22.236 / - 'W_1' 3 7 5 5 'OPEN' 1* 36.435 0.311 3375.309 2* 'X' 22.262 / - 'W_1' 3 7 6 6 'OPEN' 1* 39.630 0.311 3672.067 2* 'X' 22.283 / - 'W_1' 3 7 7 7 'OPEN' 1* 33.975 0.311 3148.671 2* 'X' 22.307 / - 'W_1' 3 7 8 8 'OPEN' 1* 24.869 0.311 2305.242 2* 'X' 22.329 / - 'W_1' 3 7 9 9 'OPEN' 1* 38.301 0.311 3551.043 2* 'X' 22.351 / - 'W_1' 3 7 1 1 'OPEN' 1* 6.642 0.311 615.914 2* 'X' 22.372 / - 'W_1' 3 7 1 1 'OPEN' 1* 1.322 0.311 122.614 2* 'X' 22.396 / - 'W_1' 3 7 1 1 'OPEN' 1* 3.797 0.311 352.293 2* 'X' 22.418 / - 'W_1' 3 7 1 1 'OPEN' 1* 14.742 0.311 1367.872 2* 'X' 22.439 / - 'W_1' 3 7 1 1 'OPEN' 1* 19.731 0.311 1831.202 2* 'X' 22.463 / - 'W_2' 2 1 1 1 'SHUT' 1* 1.168 0.311 107.872 2* 'Y' 21.925 / - 'W_2' 2 1 2 2 'SHUT' 1* 15.071 0.311 1391.859 2* 'Y' 21.920 / - 'W_2' 2 1 3 3 'SHUT' 1* 6.242 0.311 576.458 2* 'Y' 21.915 / - 'W_2' 2 1 4 4 'SHUT' 1* 16.493 0.311 1522.982 2* 'Y' 21.908 / - 'W_2' 2 1 5 5 'SHUT' 1* 7.359 0.311 679.489 2* 'Y' 21.903 / - 'W_3' 3 8 1 1 'OPEN' 1* 27.412 0.311 2445.337 2* 'Y' 18.521 / - 'W_3' 3 8 2 2 'OPEN' 1* 55.195 0.311 4923.842 2* 'Y' 18.524 / - 'W_3' 3 8 3 3 'OPEN' 1* 18.032 0.311 1608.615 2* 'Y' 18.526 / - 'W_3' 3 7 3 3 'OPEN' 1* 56.817 0.311 5047.177 2* 'Y' 18.155 / - 'W_3' 3 7 4 4 'OPEN' 1* 4.728 1* 420.067 2* 'Y' 18.162 / -/ - -WCONPROD - 'W_1' 'OPEN' 'ORAT' 20000 4* 1000 / - 'W_2' 'OPEN' 'ORAT' 20000 4* 1000 / - 'W_3' 'OPEN' 'ORAT' 20000 4* 1000 / -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_EVENTS b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_EVENTS deleted file mode 100644 index b849229c79..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_EVENTS +++ /dev/null @@ -1,78 +0,0 @@ -START -10 MAI 2007 / - - -SCHEDULE - -WELSPECS - 'W_1' 'GROUP1' 30 37 1* 'OIL' 7* / -/ - -COMPDAT --- WELL I J K1 K2 Sat. CF DIAM KH SKIN ND DIR Ro --- the spaces around the name and the open/shut flag are intentional! - ' W_1 ' 10 32 1 1 ' OPEN ' 1* 118.457 0.216 12025.229 2* 'Z' 24.860 / -/ - -WELOPEN - 'W_1' 'OPEN' 5* / -/ - - -TSTEP --1 - 10 / - -WELOPEN - 'W_1' 'SHUT' 5* / -/ - -TSTEP --2 - 10 / - -WELSPECS - 'W_2' 'GROUP1' 20 37 1* 'OIL' 7* / -/ - -WELOPEN - 'W_1' 'SHUT' 5* / -/ - - -TSTEP --3 - 10 / - -WELSPECS - 'W_2' 'GROUP2' 20 37 1* 'OIL' 7* / -/ - -WELOPEN - 'W_1' 'OPEN' 5* / -/ - - -TSTEP --4 - 10 / - -WELOPEN - 'W_1' 'AUTO' 5* / -/ - - -TSTEP --5 - 10 / - -WELOPEN - 'W_1' 'STOP' 0 0 0 2* / -/ - -COMPDAT --- WELL I J K1 K2 Sat. CF DIAM KH SKIN ND DIR Ro --- the spaces around the name and the open/shut flag are intentional! - ' W_1 ' 10 32 1 1 ' OPEN ' 1* 120.457 0.216 12025.229 2* 'Z' 24.860 / -/ - - -TSTEP --6 - 10 / - -END diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_GROUPS b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_GROUPS deleted file mode 100644 index fed4d8fecd..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_GROUPS +++ /dev/null @@ -1,72 +0,0 @@ -START -- 0 -10 MAI 2007 / - - -SCHEDULE - -DATES -- 1 - 10 'JUN' 2007 / -/ - - -DATES -- 2,3 - 10 JLY 2007 / - 10 AUG 2007 / -/ - -WELSPECS - 'W_1' 'OP' 30 37 1* 'OIL' 7* / Crap1 - 'W_2' 'INJ' 20 51 1* 'OIL' 7* / Crap2 Crap3 -/ - - -GCONINJE --- the spaces around the strings are intentional! - ' INJ ' ' WATER ' ' VREP ' 10 20 0.75 0.95 6* / -/ - - - -GCONPROD --- the spaces around the strings are intentional! - ' OP ' ' ORAT ' 10 20 30 40 +CON / -/ - - - - -TSTEP -- 4,5,6 - 10 2*10 / - - -GCONINJE - 'INJ' 'OIL' 'RATE' 1000 2* 0.95 6* / -/ - - - -TSTEP - 7 - 3 / - - -TSTEP -- 8 - 4 / - - -DATES -- 9 - 10 JLY 2008 / -/ - -GCONINJE - 'INJ' 'GAS' 'NONE' 1000 2* 0.95 6* / -/ - - -DATES -- 10 - 10 AUG 2008 / -/ - - -DATES -- 11 - 10 SEP 2008 / -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_GROUPS_REPARENT b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_GROUPS_REPARENT deleted file mode 100644 index 013bfaa0bd..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_GROUPS_REPARENT +++ /dev/null @@ -1,20 +0,0 @@ -START -- Time 0 -10 MAI 2007 / - -SCHEDULE - -GRUPTREE - 'GROUP_BIRGER' 'GROUP_BJARNE' / -- BJARNE under FIELD, BIRGER under BJARNE - 'GROUP_NILS' 'GROUP_NEW' / -- NILS under NEW, NEW should be under FIELD -/ - -TSTEP -- Time 1 - 10 / - -GRUPTREE - 'GROUP_BIRGER' 'GROUP_NEW' / -- Move BIRGER to NEW, i.e. NEW should now have NILS AND BIRGER, and BJARNE is childless -/ - - - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_GRUPTREE_EXPLICIT_PARENTING b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_GRUPTREE_EXPLICIT_PARENTING deleted file mode 100644 index f278c5f8d0..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_GRUPTREE_EXPLICIT_PARENTING +++ /dev/null @@ -1,14 +0,0 @@ -START -10 MAI 2007 / - - -SCHEDULE - -GRUPTREE - 'FIRST_LEVEL1' 'FIELD' / - 'FIRST_LEVEL2' 'FIELD' / - 'SECOND_LEVEL1' 'FIRST_LEVEL1' / - 'SECOND_LEVEL2' 'FIRST_LEVEL2' / - 'THIRD_LEVEL1' 'SECOND_LEVEL1' / -/ - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_MISSING_CMODE b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_MISSING_CMODE deleted file mode 100644 index 9adc68f80f..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_MISSING_CMODE +++ /dev/null @@ -1,15 +0,0 @@ -START - 10 MAI 2007 / - -SCHEDULE - -WELSPECS - 'D-4H' 'OP' 30 37 3.33 'OIL' 7* / -/ - - -WCONPROD - 'D-4H' 'SHUT' 15* / -/ - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_MULTISEGMENT_WELL b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_MULTISEGMENT_WELL deleted file mode 100644 index 654b4e6f42..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_MULTISEGMENT_WELL +++ /dev/null @@ -1,44 +0,0 @@ --- This reservoir simulation deck is made available under the Open Database --- License: http://opendatacommons.org/licenses/odbl/1.0/. Any rights in --- individual contents of the database are licensed under the Database Contents --- License: http://opendatacommons.org/licenses/dbcl/1.0/ - --- Copyright (C) 2015 SINTEF ICT, Applied Mathematics -START - 06 'NOV' 2011 / - -SCHEDULE - -WELSPECS - 'PROD01' 'P' 20 1 1* 'OIL' 7* / -/ - - - -COMPDAT - 'PROD01' 20 1 1 1 'OPEN' 1* 200. 0.5 / - 'PROD01' 20 1 2 2 'OPEN' 1* 200. 0.5 / - 'PROD01' 20 1 3 3 'OPEN' 1* 200. 0.4 / - 'PROD01' 19 1 2 2 'OPEN' 1* 200. 0.4 / - 'PROD01' 18 1 2 2 'OPEN' 1* 200. 0.4 / - 'PROD01' 17 1 2 2 'OPEN' 1* 200. 0.4 / -/ - -WELSEGS - 'PROD01' 2512.5 2512.5 1.0e-5 'ABS' 'H--' 'HO' / - 2 2 1 1 2537.5 2537.5 0.3 0.00010 / - 3 3 1 2 2562.5 2562.5 0.2 0.00010 / - 4 4 2 2 2737.5 2537.5 0.2 0.00010 / - 5 5 2 4 2937.5 2537.5 0.2 0.00010 / - 6 6 2 5 3137.5 2537.5 0.2 0.00010 / -/ - -COMPSEGS - 'PROD01'/ - 20 1 1 1 2512.5 2525.0 / - 20 1 2 1 2525.0 2550.0 / - 20 1 3 1 2550.0 2575.0 / - 19 1 2 2 2637.5 2837.5 / - 18 1 2 2 2837.5 3037.5 / - 17 1 2 2 3037.5 3237.5 / -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_POLYMER b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_POLYMER deleted file mode 100644 index 86d47aa6db..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_POLYMER +++ /dev/null @@ -1,56 +0,0 @@ -START - 10 MAI 2007 / - - -SCHEDULE - - -WELSPECS - 'INJE01' 'I' 1 1 1* 'WATER' / - 'INJE02' 'I' 5 1 1* 'WATER' / - 'INJE03' 'I' 10 1 1* 'WATER' / - 'PROD01' 'P' 20 1 1* 'OIL' 7* / -/ - -COMPDAT - 'INJE01' 1 1 2 2 'OPEN' 1* 200. 0.5 / - 'INJE02' 5 1 2 2 'OPEN' 1* 200. 0.5 / - 'INJE03' 10 1 2 2 'OPEN' 1* 200. 0.5 / - 'PROD01' 20 1 1 1 'OPEN' 1* 200. 0.5 / -/ - -WCONINJE - 'INJE01' 'WATER' 'OPEN' 'RATE' 800.00 1* 1000 / - 'INJE02' 'WATER' 'OPEN' 'RATE' 800.00 1* 1000 / - 'INJE03' 'WATER' 'OPEN' 'RATE' 800.00 1* 1000 / -/ -WCONPROD - 'PROD01' 'OPEN' 'BHP' 5* 200 / -/ - -WPOLYMER - 'INJE01' 1.5 0.0 / - 'INJE02' 2.0 0.0 / - 'INJE03' 2.5 0.0 / -/ -TSTEP -10 -/ -WPOLYMER - 'INJE01' 1.0 0.0 / - 'INJE02' 1.5 0.0 / - 'INJE03' 2.0 0.0 / -/ -TSTEP -10 -/ - -WPOLYMER - 'INJE01' 0.1 0.0 / - 'INJE02' 0.2 0.0 / - 'INJE03' 0.3 0.0 / -/ - -TSTEP -10 -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_SHUT_WELL b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_SHUT_WELL deleted file mode 100644 index d0cdc9ae23..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_SHUT_WELL +++ /dev/null @@ -1,77 +0,0 @@ -START -10 MAI 2007 / - - -SCHEDULE - -WELSPECS - 'W1' 'GROUP1' 30 37 1* 'OIL' 7* / - 'W2' 'GROUP1' 30 37 1* 'OIL' 7* / - 'W3' 'GROUP1' 30 37 1* 'OIL' 7* / -/ - -COMPDAT - 'W1' 10 32 1 1 'OPEN' 1* 118.457 0.216 12025.229 2* 'Z' 24.860 / - 'W2' 10 32 1 1 'OPEN' 1* 118.457 0.216 12025.229 2* 'Z' 24.860 / - 'W3' 10 32 1 1 'OPEN' 1* 118.457 0.216 12025.229 2* 'Z' 24.860 / -/ - -TSTEP -- Step 1 - 10 / - -WCONPROD - 'W1' 'OPEN' 'ORAT' 20000 4* 1000 / - 'W2' 'OPEN' 'ORAT' 20000 4* 1000 / - 'W3' 'OPEN' 'ORAT' 20000 4* 1000 / -/ - - -TSTEP -- Step 2 - 10 / - ---!----------------------------------------------------------------- - -WCONHIST - 'W1' 'OPEN' 'ORAT' 0.000 0.000 0.000 5* / -/ - -WCONPROD - 'W1' 'OPEN' 'RESV' 999 3* 123 100 / -/ - - -WELOPEN - 'W1' 'SHUT' / -/ ---!----------------------------------------------------------------- - -WCONHIST - 'W2' 'OPEN' 'ORAT' 0.000 0.000 0.000 5* / -/ - -WELOPEN - 'W2' 'OPEN' / -/ - - -WCONPROD - 'W2' 'SHUT' / -/ - ---!----------------------------------------------------------------- - -WCONPROD - 'W3' 'OPEN' 'RESV' 999 3* 123 100 / -/ - - -WELOPEN - 'W3' 'OPEN' / -/ - -WCONHIST - 'W3' 'SHUT' / -/ - - -END diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_WECON b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_WECON deleted file mode 100644 index 93c19d9db1..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_WECON +++ /dev/null @@ -1,44 +0,0 @@ -START - 10 MAY 2007 / - - -SCHEDULE - - -WELSPECS - 'INJE01' 'I' 1 1 1* 'WATER' / - 'PROD01' 'P' 10 1 1* 'OIL' 7* / - 'PROD02' 'P' 20 1 1* 'OIL' 7* / -/ - -COMPDAT - 'INJE01' 1 1 2 2 'OPEN' 1* 200. 0.5 / - 'PROD01' 10 1 1 1 'OPEN' 1* 200. 0.5 / - 'PROD02' 20 1 1 1 'OPEN' 1* 200. 0.5 / -/ - -WCONINJE - 'INJE01' 'WATER' 'OPEN' 'RATE' 800.00 1* 1000 / -/ - -WCONPROD - 'PROD01' 'OPEN' 'BHP' 5* 200 / - 'PROD02' 'OPEN' 'BHP' 5* 200 / -/ - -WECON - 'PROD01' 50 1* 0.95 2* CON NO / -/ - -TSTEP -10 -/ - -WECON - 'PROD01' 1* 1000 0.95 2* CON NO / - 'PROD02' 1* 1000 0.95 2* CON NO / -/ - -TSTEP -10 -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2 b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2 deleted file mode 100644 index 3e05fe6215..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2 +++ /dev/null @@ -1,124 +0,0 @@ -SCHEDULE - -DATES -- 1 - 10 'JUN' 2007 / -/ - - -DATES -- 2,3 - 10 JLY 2007 / - 10 AUG 2007 / -/ - -WELSPECS - 'W_1' 'OP' 30 37 1* 'OIL' 7* / Crap1 --- the spaces around the phase name are intentional! - 'W_2' 'OP' 20 51 100 ' OIL ' 7* / Crap2 Crap3 --- Note defaulted reference depth for W_3 - 'W_3' 'OP' 31 18 1* 'OIL' 7* / - 'W_4' 'OP' 32 19 1* 'OIL' 7* / -/ - -COMPDAT --- WELL I J K1 K2 Sat. CF DIAM KH SKIN ND DIR Ro - 'W_1' 30 37 1 3 'OPEN' 1* 32.948 0.311 3047.839 2* 'X' 22.100 / --- the spaces around the direction indicator are intentional! - 'W_1' 31 37 14 14 'OPEN' 1* 19.731 0.311 1831.202 3.3 1* ' X ' 22.463 / --- - 'W_2' 20 51 1 1 'OPEN' 1* 1.168 0.311 107.872 2* 'Y' 21.925 / - 'W_2' 20 51 5 5 'OPEN' 1* 7.359 0.311 679.489 2* 'Y' 21.903 / --- - 'W_3' 31 18 1 1 'OPEN' 1* 27.412 0.311 2445.337 2* 'Y' 18.521 / - 'W_3' 31 18 2 2 'OPEN' 1* 55.195 0.311 4923.842 2* 'Y' 18.524 / -/ - - - - -WCONHIST --- the spaces around the names indicator are intentional! --- they test that even padded quoted literals as arguments to WCONHIST and --- friends are stripped correctly - ' W_1 ' ' OPEN ' ' ORAT ' 4000.000 4.000 12345 5* / - 'W_2' 'SHUT' 'ORAT' 7998.000 2.000 1461075.000 5* / - 'W_3' 'AUTO' 'ORAT' 7999.000 1.000 1471824.000 5* / -/ - - -TSTEP -- 4 - 10 / - -TSTEP -- 5 - 10 / - -TSTEP -- 6 - 10 / - - - - - -WCONHIST - 'W_1' 'OPEN' 'ORAT' 14000.000 4.000 1.46402E+006 5* / - 'W_2' 'OPEN' 'ORAT' 17998.000 2.000 1461075.000 5* / - 'W_3' 'OPEN' 'ORAT' 17999.000 1.000 1471824.000 5* / -/ - - -TSTEP - 7 - 3 / - - -COMPDAT - 'W_1' 31 37 14 14 'SHUT' 1* 19.731 0.311 1831.202 2* 'X' 22.463 / -/ - - -WCONPROD - 'W_1' 'OPEN' 'ORAT' 11000.000 44.000 188 5* / - 'W_2' 'OPEN' 'RESV' 17998.000 2.000 1461075.000 * 777 3* / - 'W_3' 'OPEN' 'RESV' 17999.000 1.000 1471824.000 999 999 4* / -/ - -TSTEP -- 8 - 4 / - -WCONHIST - 'W_1' 'OPEN' 'ORAT' 13000.000 4.000 1.46402E+006 5* / - 'W_2' 'OPEN' 'ORAT' 17998.000 2.000 6* / - 'W_3' 'OPEN' 'ORAT' 17999.000 1.000 1471824.000 5* / -/ - -DATES -- 9 - 10 JLY 2008 / -/ - -WCONINJE - 'W_1' 'WATER' 1* 'RESV' 20000.000 200000.000 5* / -/ - -DATES -- 10 - 10 AUG 2008 / -/ - -WCONINJE - 'W_1' 'WATER' 1* 'RATE' 20000.000 200000.000 123 678 4* / -/ - -DATES -- 11 - 15 AUG 2008 / -/ - - -WCONINJH - 'W_1' 'WATER' 1* 5000.000 50000.000 / -/ - - -DATES -- 12 - 10 SEP 2008 / -/ - -WCONINJE - 'W_1' 'WATER' 'SHUT' 'RATE' 20000.000 * 123 678 4* / -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS_AND_GROUPS b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS_AND_GROUPS deleted file mode 100644 index 4043e405ce..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS_AND_GROUPS +++ /dev/null @@ -1,20 +0,0 @@ -START -10 MAI 2007 / - - -SCHEDULE - -WELSPECS - 'W_1' 'GROUP1' 30 37 1* 'OIL' 7* / --- the spaces around the names are intentional! - ' W_2 ' ' GROUP1 ' 20 51 1* 'OIL' 7* / -/ - -TSTEP - 10 / - - - -WELSPECS - 'W_2' 'GROUP2' 20 51 1* 'OIL' 7* / -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_WELL_INVALID_WELSPECS b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_WELL_INVALID_WELSPECS deleted file mode 100644 index 1ea1ac7925..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_WELL_INVALID_WELSPECS +++ /dev/null @@ -1,27 +0,0 @@ -START -- 0 -10 MAI 2007 / - - -SCHEDULE - -DATES -- 1 - 10 'JUN' 2007 / -/ - - -WELSPECS - 'W_1' 'OP' 30 37 3.33 'OIL' 7* / Crap1 - 'W_2' 'OP' 20 51 3.92 'OIL' 7* / Crap2 Crap3 - 'W_3' 'OP' 31 18 2.33 'OIL' 7* / -/ - - -TSTEP -- 4,5,6 - 10 2*10 / - - - - -WELSPECS - 'W_1' 'OP' 32 34 3.43 'OIL' 7* / Crap1 -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_WELOPEN b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_WELOPEN deleted file mode 100644 index 0f24a67b2b..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_WELOPEN +++ /dev/null @@ -1,60 +0,0 @@ -START -10 MAI 2007 / - - -SCHEDULE - -WELSPECS - 'W_1' 'GROUP1' 30 37 1* 'OIL' 7* / -/ - -COMPDAT --- WELL I J K1 K2 Sat. CF DIAM KH SKIN ND DIR Ro --- the spaces around the name and the open/shut flag are intentional! - ' W_1 ' 10 32 1 1 ' OPEN ' 1* 118.457 0.216 12025.229 2* 'Z' 24.860 / -/ - -TSTEP - 10 / - -WELOPEN --- the spaces around the name and the open/shut flag are intentional! - ' W_1 ' ' SHUT ' 5* / -/ - -TSTEP - 10 / - -WELOPEN - 'W_1' 'OPEN' 5* / -/ - - -TSTEP - 10 / - -WELOPEN - 'W_1' 'STOP' 5* / -/ - - -TSTEP - 10 / - -WELOPEN - 'W_1' 'AUTO' 5* / -/ - - -TSTEP - 10 / - -WELOPEN - 'W_1' 'STOP' 0 0 0 2* / -/ - - -TSTEP - 10 / - -END diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_WELOPEN_INVALID b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_WELOPEN_INVALID deleted file mode 100644 index 48a70ee155..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_WELOPEN_INVALID +++ /dev/null @@ -1,27 +0,0 @@ -START -10 MAI 2007 / - - -SCHEDULE - -WELSPECS - 'W_1' 'GROUP1' 30 37 1* 'OIL' 7* / - 'W_2' 'GROUP1' 20 51 1* 'OIL' 7* / -/ - -COMPDAT --- WELL I J K1 K2 Sat. CF DIAM KH SKIN ND DIR Ro - 'W_1' 10 32 1 1 'OPEN' 1* 118.457 0.216 12025.229 2* 'Z' 24.860 / -/ - -TSTEP - 10 / - -WELOPEN - 'W_1' 'SHUT' 1 0 0 2* / -/ - -TSTEP - 10 / - -END diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GROUPS b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GROUPS deleted file mode 100644 index ee17510aa6..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GROUPS +++ /dev/null @@ -1,24 +0,0 @@ -START -10 MAI 2007 / - - -SCHEDULE - -WELSPECS - 'W_1' 'GROUP_BJARNE' 30 37 1* 'OIL' 7* / - 'W_3' 'GROUP_ODD' 31 18 1* 'OIL' 7* / - 'W_2' 'GROUP_BJARNE' 20 51 1* 'OIL' 7* / - -/ - -TSTEP - 10 / - - -GRUPTREE - 'GROUP_BIRGER' 'GROUP_BJARNE' / --- the spaces around the name are intentional! - ' GROUP_NILS ' ' GROUP_NEW ' / -- NILS UNDER NEW, NEW should be under FIELD -/ - -END diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GRUPTREE b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GRUPTREE deleted file mode 100644 index 4c5dac73c6..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GRUPTREE +++ /dev/null @@ -1,16 +0,0 @@ -START -10 MAI 2007 / - - -SCHEDULE - - -GRUPTREE - 'INJE' 'FIELD' / --- the spaces around the names are intentional! - ' PROD ' ' FIELD ' / - 'MANI-PROD' 'PROD' / - 'MANI-INJ' 'INJE' / - 'DUMMY-PROD' 'MANI-PROD' / - 'DUMMY-INJ' 'MANI-INJ' / -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_WGRUPCON b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_WGRUPCON deleted file mode 100644 index 6f2835f103..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/SCHEDULE_WGRUPCON +++ /dev/null @@ -1,24 +0,0 @@ -START -10 MAI 2007 / - - -SCHEDULE - -WELSPECS - 'W_1' 'GROUP_BJARNE' 30 37 1* 'OIL' 7* / - 'W_2' 'GROUP_ODD' 31 18 1* 'GAS' 7* / - 'W_3' 'GROUP_BJARNE' 20 51 1* 'WATER' 7* / - -/ - -WGRUPCON - 'W_1' 2* OIL / --- the spaces around the name are intentional! - ' W_2 ' NO / - 'W_3' YES 100 RAT 0.5 / -/ - -TSTEP - 10 / - -END diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/wells_group.data b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/wells_group.data deleted file mode 100644 index 5fa7fb8cc4..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/SCHEDULE/wells_group.data +++ /dev/null @@ -1,69 +0,0 @@ -RUNSPEC - -OIL -GAS -WATER - -DIMENS - 10 10 5 / - -GRID - -DXV -10*1000.0 / - -DYV -10*1000.0 / - -DZV -10.0 20.0 30.0 10.0 5.0 / - -TOPS - 100*10 / - -SCHEDULE - -GRUPTREE - 'G1' 'FIELD' / - 'G2' 'FIELD' / -/ - - -WELSPECS - 'INJ1' 'G1' 1 1 8335 'GAS' / - 'PROD1' 'G2' 10 10 8400 'OIL' / -/ - -TSTEP - 14.0 / - - -WELSPECS - 'INJ2' 'G1' 1 1 8335 'GAS' / - 'PROD2' 'G2' 10 10 8400 'OIL' / -/ - -GCONINJE -'G1' GAS RATE 30000 / -/ - -GCONPROD -'G2' ORAT 10000 / -/ - -WCONINJE - 'INJ1' 'WATER' 'OPEN' 'RESV' 10 20 40 / - 'INJ2' 'WATER' 'OPEN' 'RESV' 10 20 40 / -/ - -WCONPROD - 'PROD1' 'OPEN' 'RESV' 999 3* 123 100 / - 'PROD2' 'OPEN' 'RESV' 999 3* 123 100 / -/ - -TSTEP - 3 / - - - -END diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/TABLES/PVTO2.DATA b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/TABLES/PVTO2.DATA deleted file mode 100644 index 9e94920bf7..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/TABLES/PVTO2.DATA +++ /dev/null @@ -1,296 +0,0 @@ -RUNSPEC - -TITLE - SIMPLE TEST - -DIMENS - 9 9 2 / - -OIL - -WATER - -GAS - -DISGAS - -VAPOIL - -METRIC - -EQLDIMS - 1 100 2 1 1 / -TABDIMS - 1 3 33 60 16 60 / - -PROPS =============================================================== -PVTO - --- RSO PRESSURE B-OIL VISCOSITY --- (BAR) (CP) - - 20.59 50.00 1.10615 1.180 - 75.00 1.10164 1.247 - 100.00 1.09744 1.315 - 125.00 1.09351 1.384 - 150.00 1.08984 1.453 / - - 28.19 70.00 1.12522 1.066 - 95.00 1.12047 1.124 - 120.00 1.11604 1.182 - 145.00 1.11191 1.241 - 170.00 1.10804 1.300 / - - 36.01 90.00 1.14458 0.964 - 115.00 1.13959 1.014 - 140.00 1.13494 1.064 - 165.00 1.13060 1.115 - 190.00 1.12653 1.166 / - - 44.09 110.00 1.16437 0.880 - 135.00 1.15915 0.924 - 160.00 1.15428 0.968 - 185.00 1.14973 1.012 - 210.00 1.14547 1.056 / - - 52.46 130.00 1.18467 0.805 - 155.00 1.17921 0.843 - 180.00 1.17413 0.882 - 205.00 1.16937 0.920 - 230.00 1.16491 0.959 / - - 61.13 150.00 1.20555 0.746 - 175.00 1.19985 0.780 - 200.00 1.19454 0.814 - 225.00 1.18958 0.849 - 250.00 1.18492 0.883 / - - 70.14 170.00 1.22704 0.698 - 195.00 1.22111 0.729 - 220.00 1.21558 0.759 - 245.00 1.21040 0.790 - 270.00 1.20555 0.821 / - - 79.50 190.00 1.24922 0.658 - 215.00 1.24305 0.686 - 240.00 1.23729 0.714 - 265.00 1.23190 0.742 - 290.00 1.22685 0.770 / - - 89.24 210.00 1.27214 0.637 - 235.00 1.26573 0.664 - 260.00 1.25974 0.693 - 285.00 1.25414 0.725 - 310.00 1.24888 0.760 / - - 99.39 230.00 1.29586 0.622 - 255.00 1.28921 0.641 - 280.00 1.28300 0.661 - 305.00 1.27718 0.680 - 330.00 1.27171 0.699 / - - 110.41 250.80 1.32148 0.610 - 275.80 1.31457 0.628 - 300.80 1.30812 0.647 - 325.80 1.30207 0.665 - 350.80 1.29638 0.682 / - - 120.32 268.42 1.34449 0.576 - 293.42 1.33735 0.593 - 318.42 1.33068 0.609 - 343.42 1.32442 0.626 - 368.42 1.31853 0.642 / - - 130.23 285.33 1.36737 0.5335 - 310.33 1.36001 0.5487 - 335.33 1.35313 0.5638 - 360.33 1.34667 0.5787 - 385.33 1.34059 0.5934 / - - 140.12 301.59 1.39015 0.4956 - 326.59 1.38257 0.5094 - 351.59 1.37548 0.5230 - 376.59 1.36882 0.5365 - 401.59 1.36255 0.5498 / - - 150.01 317.23 1.41282 0.4614 - 342.23 1.40503 0.4739 - 367.23 1.39773 0.4863 - 392.23 1.39088 0.4986 - 417.23 1.38443 0.5107 / - - 159.89 332.29 1.43539 0.43042 - 357.29 1.42739 0.44183 - 382.29 1.41990 0.45312 - 407.29 1.41286 0.46430 - 432.29 1.40622 0.47537 / - - 169.76 346.80 1.45788 0.41191 - 371.80 1.44967 0.42260 - 396.80 1.44198 0.43318 - 421.80 1.43475 0.44365 - 446.80 1.42794 0.45402 / - - 179.63 360.80 1.48028 0.39503 - 385.80 1.47187 0.40508 - 410.80 1.46398 0.41502 - 435.80 1.45657 0.42487 - 460.80 1.44958 0.43461 / - - 189.48 374.31 1.50260 0.37959 - 399.31 1.49399 0.38907 - 424.31 1.48591 0.39845 - 449.31 1.47832 0.40773 - 474.31 1.47116 0.41692 / - - 199.34 387.36 1.52484 0.36543 - 412.36 1.51603 0.37439 - 437.36 1.50777 0.38326 - 462.36 1.50000 0.39203 - 487.36 1.49267 0.40072 / - - 209.18 399.99 1.54700 0.35239 - 424.99 1.53800 0.36089 - 449.99 1.52956 0.36929 - 474.99 1.52161 0.37762 - 499.99 1.51411 0.38585 / - - 219.02 412.21 1.56910 0.34035 - 437.21 1.55991 0.34843 - 462.21 1.55128 0.35642 - 487.21 1.54316 0.36433 - 512.21 1.53549 0.37216 / - - 228.85 424.05 1.59112 0.32921 - 449.05 1.58174 0.33691 - 474.05 1.57294 0.34453 - 499.05 1.56464 0.35206 - 524.05 1.55681 0.35952 / - - 238.67 435.53 1.61307 0.31888 - 460.53 1.60351 0.32623 - 485.53 1.59453 0.33350 - 510.53 1.58606 0.34070 - 535.53 1.57807 0.34782 / - - 248.48 446.68 1.63496 0.30927 - 471.68 1.62522 0.31630 - 496.68 1.61606 0.32326 - 521.68 1.60743 0.33014 - 546.68 1.59927 0.33695 / - - 258.29 457.51 1.65678 0.30032 - 482.51 1.64686 0.30706 - 507.51 1.63753 0.31373 - 532.51 1.62873 0.32032 - 557.51 1.62042 0.32685 / - - 268.09 468.04 1.67853 0.29196 - 493.04 1.66843 0.29843 - 518.04 1.65893 0.30483 - 543.04 1.64997 0.31117 - 568.04 1.64150 0.31743 / - - 277.89 478.30 1.70022 0.28414 - 503.30 1.68994 0.29037 - 528.30 1.68028 0.29652 - 553.30 1.67116 0.30261 - 578.30 1.66253 0.30864 / - - 287.68 488.30 1.72184 0.27681 - 513.30 1.71139 0.28281 - 538.30 1.70156 0.28874 - 563.30 1.69228 0.29460 - 588.30 1.68350 0.30040 / - - 297.46 498.06 1.74339 0.26994 - 523.06 1.73277 0.27572 - 548.06 1.72278 0.28144 - 573.06 1.71334 0.28709 - 598.06 1.70442 0.29269 / - - 307.23 507.59 1.76487 0.26347 - 532.59 1.75409 0.26906 - 557.59 1.74393 0.27458 - 582.59 1.73434 0.28004 - 607.59 1.72527 0.28544 / - - 317.00 516.92 1.78628 0.25738 - 541.92 1.77533 0.26279 - 566.92 1.76502 0.26812 - 591.92 1.75528 0.27340 - 616.92 1.74606 0.27863 / - - 326.76 526.06 1.80761 0.25165 - 551.06 1.79651 0.25688 - 576.06 1.78604 0.26204 - 601.06 1.77615 0.26716 - 626.06 1.76679 0.27221 / - - 336.51 535.02 1.82887 0.24623 - 560.02 1.81761 0.25130 - 585.02 1.80699 0.25631 - 610.02 1.79696 0.26126 - 635.02 1.78746 0.26616 / - - 346.26 543.83 1.85005 0.24112 - 568.83 1.83864 0.24603 - 593.83 1.82787 0.25089 - 618.83 1.81770 0.25570 - 643.83 1.80806 0.26045 / - - 356.00 552.49 1.87115 0.23628 - 577.49 1.85959 0.24105 - 602.49 1.84868 0.24577 - 627.49 1.83836 0.25043 - 652.49 1.82858 0.25505 / - - 365.73 561.04 1.89217 0.23170 - 586.04 1.88046 0.23634 - 611.04 1.86940 0.24092 - 636.04 1.85895 0.24546 - 661.04 1.84904 0.24994 / - - 375.46 569.48 1.91309 0.22736 - 594.48 1.90124 0.23187 - 619.48 1.89004 0.23633 - 644.48 1.87946 0.24074 - 669.48 1.86942 0.24510 / - - 385.18 577.82 1.93391 0.22325 - 602.82 1.92192 0.22764 - 627.82 1.91060 0.23198 - 652.82 1.89988 0.23627 - 677.82 1.88971 0.24052 / - - 394.89 586.09 1.95464 0.21934 - 611.09 1.94252 0.22362 - 636.09 1.93106 0.22785 - 661.09 1.92021 0.23204 - 686.09 1.90993 0.23617 / - - 404.60 594.29 1.97527 0.21564 - 619.29 1.96301 0.21981 - 644.29 1.95143 0.22393 - 669.29 1.94046 0.22801 - 694.29 1.93005 0.23204 / --40 -/ --41 - 404.60 594.29 1.97527 0.21564 - 619.29 1.96301 0.21981 - 644.29 1.95143 0.22393 - 669.29 1.94046 0.22801 - 694.29 1.93005 0.23204 / --42 -/ --43 - 404.60 594.29 1.97527 0.21564 - 619.29 1.96301 0.21981 - 644.29 1.95143 0.22393 - 669.29 1.94046 0.22801 - 694.29 1.93005 0.23204 / --44 - - 404.60 594.29 1.97527 0.21564 - 619.29 1.96301 0.21981 - 644.29 1.95143 0.22393 - 669.29 1.94046 0.22801 - 694.29 1.93005 0.23204 / --45 -/ --46 - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/TABLES/PVTX1.DATA b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/TABLES/PVTX1.DATA deleted file mode 100644 index afed2008fc..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/TABLES/PVTX1.DATA +++ /dev/null @@ -1,55 +0,0 @@ -RUNSPEC - -TITLE - SIMPLE TEST - -DIMENS - 9 9 2 / - -OIL - -WATER - -GAS - -DISGAS - -VAPOIL - -METRIC - -EQLDIMS - 1 100 2 1 1 / -TABDIMS - 1 1 33 60 16 60 / - -PROPS =============================================================== -PVTO - --- RSO PRESSURE B-OIL VISCOSITY --- (BAR) (CP) - - 20.59 50.00 1.10615 1.180 - 75.00 1.10164 1.247 - 100.00 1.09744 1.315 - 125.00 1.09351 1.384 - 150.00 1.08984 1.453 / - - 28.19 70.00 1.12522 1.066 - 95.00 1.12047 1.124 - 120.00 1.11604 1.182 - 145.00 1.11191 1.241 - 170.00 1.10804 1.300 / -/ - - - -PVTG --- - 20.00 0.00002448 0.061895 0.01299 - 0.00001224 0.061810 0.01300 - 0.00000000 0.061725 0.01300 / - 40.00 0.00000628 0.030252 0.01383 - 0.00000314 0.030249 0.01383 - 0.00000000 0.030245 0.01383 / -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/TITLE/TITLE1.txt b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/TITLE/TITLE1.txt deleted file mode 100644 index c16369ff0a..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/TITLE/TITLE1.txt +++ /dev/null @@ -1,5 +0,0 @@ -TITLE -This is the title of the model. - -START - 10 'FEB' 2012 / diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/TRANS/Deck1 b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/TRANS/Deck1 deleted file mode 100644 index f9e779d0b4..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/TRANS/Deck1 +++ /dev/null @@ -1,63 +0,0 @@ -START -10 MAI 2007 / - -RUNSPEC - -GRIDOPTS - 'YES' 2 / - -DIMENS - 5 5 1 / - -GRID -DX -25*1 / -DY -25*1 / -DZ -25*1 / -TOPS -25*1 / - -FAULTS - 'F1' 3 3 1 5 1 1 'X' / - 'F2' 4 4 1 5 1 1 'X' / -/ - -MULTFLT - 'F1' 0.10 / - 'F2' 0.10 / -/ - - - -SCHEDULE - - - -DATES - 10 'JUN' 2007 / -/ - - -DATES - 10 JLY 2007 / - 10 AUG 2007 / -/ - - -MULTFLT - 'F1' 20.0 / -/ - - -TSTEP - 10 2*10 / - - -DATES - 10 JLY 2008 / - 10 AUG 2008 / -/ - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/TVDP/TVDP1 b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/TVDP/TVDP1 deleted file mode 100644 index 29ec9686b0..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/TVDP/TVDP1 +++ /dev/null @@ -1,22 +0,0 @@ -EQLDIMS - 3 100 20 1 1 / - -TVDPA - 100 10 - 200 20 / - - -TVDPXX - 100 10 - 200 20 / - - -TVDP1 - 100 10 - 200 20 / - - -TVDPYY - 100 10 - 200 20 / - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/VFPPROD/VFPPROD1 b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/VFPPROD/VFPPROD1 deleted file mode 100644 index bee1b1df70..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/VFPPROD/VFPPROD1 +++ /dev/null @@ -1,2306 +0,0 @@ -VFPPROD - --- Table Datum Depth Rate Type WFR Type GFR Type TAB Type --- ----- ----------- --------- -------- -------- -------- - 32 394 'LIQ' 'WCT' 'GOR' / - - --- 'LIQ' units - SM3/DAY - 100.0 500.0 1000.0 1500.0 2500.0 - 4000.0 6000.0 8000.0 9000.0 12000.0 -15000.0 20000.0 / - --- 'THP' units - BARSA - 16.01 21.01 26.01 31.01 41.01 - 51.01 61.01 / - --- 'WCT' units - FRACTION - 0 0.1 0.2 0.3 0.5 - 0.7 0.75 0.9 1 / - --- 'GOR' units - SM3 - 90 100 150 200 500 - 700 1000 5000 10000 / - --- 'ALQ' units - - 0 / - - 1 1 1 1 44.85 37.83 32.56 30.13 29.38 - 32.73 41.14 50.28 54.96 70.65 - 86.79 115.14 -/ - 1 1 2 1 44.55 36.91 31.55 29.29 28.93 - 32.97 41.83 51.27 56.67 72.83 - 87.66 117.32 -/ - 1 1 3 1 43.06 33.11 28.00 26.72 28.29 - 34.86 45.74 57.61 61.07 64.40 - 73.48 102.86 -/ - 1 1 4 1 41.67 30.36 26.04 25.67 28.88 - 36.96 47.90 51.87 56.16 68.61 - 81.11 103.27 -/ - 1 1 5 1 35.14 23.93 24.20 26.11 34.10 - 46.38 62.77 79.73 88.44 115.35 - 143.51 194.19 -/ - 1 1 6 1 32.10 22.99 24.45 28.76 39.54 - 55.75 78.41 101.95 113.96 151.07 - 190.19 261.47 -/ - 1 1 7 1 28.88 22.94 26.52 33.71 48.27 - 71.46 103.68 136.75 153.65 206.31 - 262.75 368.93 -/ - 1 1 8 1 21.81 42.21 78.41 115.05 188.76 - 306.15 486.18 703.92 829.68 1274.03 - 1824.52 2170.54 -/ - 1 1 9 1 22.65 77.16 149.18 222.18 381.35 - 672.35 1180.65 1830.41 2164.11 2190.56 - 2209.35 2267.10 -/ - 1 2 1 1 45.61 38.96 33.67 31.09 30.04 - 32.89 40.91 49.85 54.69 69.65 - 85.35 113.10 -/ - 1 2 2 1 45.34 38.08 32.64 30.19 29.50 - 32.99 41.59 50.90 55.65 71.64 - 88.18 117.29 -/ - 1 2 3 1 43.98 34.32 28.92 27.35 28.47 - 34.65 44.84 56.55 62.46 70.19 - 77.50 108.80 -/ - 1 2 4 1 42.69 31.52 26.76 26.04 28.68 - 36.28 48.37 55.37 55.78 66.71 - 78.50 99.23 -/ - 1 2 5 1 36.43 24.47 24.06 25.87 32.85 - 44.35 59.42 74.87 82.80 107.32 - 133.01 179.23 -/ - 1 2 6 1 33.40 23.26 24.74 27.79 37.75 - 52.55 73.07 94.45 105.39 139.19 - 174.71 239.12 -/ - 1 2 7 1 30.07 22.83 25.68 32.07 45.40 - 66.28 95.50 125.57 140.92 188.61 - 239.44 333.83 -/ - 1 2 8 1 21.76 38.98 71.42 104.55 171.02 - 275.39 432.13 617.81 723.77 1098.80 - 1557.46 2465.02 -/ - 1 2 9 1 21.95 70.10 135.14 200.55 340.69 - 590.52 1020.46 1564.51 1881.58 2444.60 - 2489.84 2462.70 -/ - 1 3 1 1 46.37 40.17 34.93 32.22 30.86 - 33.18 40.58 49.71 54.16 68.60 - 83.83 110.97 -/ - 1 3 2 1 46.13 39.32 33.89 31.27 30.24 - 33.14 41.26 50.32 55.22 70.42 - 86.43 114.80 -/ - 1 3 3 1 44.92 35.67 30.01 28.15 28.75 - 34.24 43.95 55.28 61.14 74.88 - 83.73 113.72 -/ - 1 3 4 1 43.73 32.84 27.66 26.59 28.66 - 35.79 47.38 57.89 60.45 64.90 - 76.07 95.41 -/ - 1 3 5 1 37.83 25.18 24.06 26.02 31.61 - 42.38 56.19 70.17 77.32 99.44 - 122.62 164.40 -/ - 1 3 6 1 34.84 23.65 24.71 26.93 35.97 - 49.45 67.86 87.06 96.90 127.35 - 159.27 216.99 -/ - 1 3 7 1 31.44 22.93 24.98 30.50 42.60 - 61.21 87.37 114.40 128.20 170.99 - 216.35 299.71 -/ - 1 3 8 1 21.93 35.84 64.46 94.04 153.37 - 245.33 380.70 537.43 625.52 936.13 - 1313.06 2106.22 -/ - 1 3 9 1 21.53 63.05 121.09 179.16 301.34 - 513.55 870.51 1319.32 1579.23 2501.66 - 2841.44 2842.98 -/ - 1 4 1 1 47.15 41.45 36.36 33.56 31.90 - 33.66 40.35 49.47 53.98 68.64 - 82.77 110.65 -/ - 1 4 2 1 46.94 40.66 35.32 32.57 31.18 - 33.45 40.86 50.04 54.78 69.56 - 84.58 112.20 -/ - 1 4 3 1 45.87 37.16 31.34 29.17 29.18 - 33.94 43.38 53.81 59.59 76.91 - 88.69 118.87 -/ - 1 4 4 1 44.81 34.36 28.79 27.34 28.77 - 35.33 46.14 58.33 63.73 68.63 - 73.83 103.62 -/ - 1 4 5 1 39.32 26.11 24.24 25.90 31.05 - 40.45 53.09 65.67 72.05 91.75 - 112.44 149.72 -/ - 1 4 6 1 36.44 24.23 24.43 26.26 34.12 - 46.44 62.83 79.83 88.56 115.57 - 143.93 195.07 -/ - 1 4 7 1 33.03 23.18 24.69 28.96 39.87 - 56.31 79.35 103.30 115.54 153.41 - 193.42 266.35 -/ - 1 4 8 1 22.24 32.83 57.57 83.53 135.78 - 215.88 331.45 462.01 534.55 785.63 - 1091.75 1723.49 -/ - 1 4 9 1 21.54 56.04 107.03 157.94 263.21 - 441.13 732.08 1095.53 1303.03 2039.68 - 2942.17 3469.33 -/ - 1 5 1 1 48.74 44.26 39.77 36.98 34.83 - 35.60 40.43 48.28 52.84 68.05 - 82.66 109.59 -/ - 1 5 2 1 48.59 43.61 38.83 35.99 33.95 - 35.05 40.53 48.90 53.72 68.75 - 83.40 111.44 -/ - 1 5 3 1 47.81 40.65 34.90 32.17 31.06 - 33.92 42.17 51.65 56.73 72.35 - 89.13 119.12 -/ - 1 5 4 1 47.04 38.10 32.04 29.76 29.67 - 34.34 43.91 54.30 60.22 77.91 - 90.74 122.23 -/ - 1 5 5 1 42.67 29.01 25.32 25.85 30.64 - 39.59 47.25 57.50 62.51 77.61 - 93.31 121.63 -/ - 1 5 6 1 40.17 26.31 24.39 26.14 31.37 - 40.74 53.56 66.34 72.83 92.90 - 113.98 152.05 -/ - 1 5 7 1 37.00 24.31 24.70 26.50 34.58 - 47.18 64.09 81.66 90.69 118.65 - 148.08 201.19 -/ - 1 5 8 1 23.48 27.18 44.16 62.65 100.61 - 158.26 238.30 324.86 371.25 525.58 - 707.02 1078.96 -/ - 1 5 9 1 22.14 42.38 78.81 115.67 189.89 - 308.37 489.75 705.32 827.98 1254.60 - 1770.25 2832.24 -/ - 1 6 1 1 50.46 47.44 44.08 41.72 39.50 - 39.39 42.60 48.51 52.24 65.65 - 80.71 108.26 -/ - 1 6 2 1 50.31 46.99 43.36 40.86 38.59 - 38.62 42.08 48.45 52.38 66.40 - 81.96 110.28 -/ - 1 6 3 1 49.80 44.89 40.12 37.26 35.12 - 36.05 41.26 49.58 54.42 70.12 - 85.46 113.75 -/ - 1 6 4 1 49.33 42.96 37.44 34.53 32.86 - 34.79 41.93 51.72 56.55 72.45 - 87.88 117.66 -/ - 1 6 5 1 46.49 34.46 28.70 27.46 29.51 - 36.85 48.87 62.11 65.68 66.43 - 78.03 97.90 -/ - 1 6 6 1 44.71 30.98 26.36 26.33 30.45 - 39.36 50.42 55.00 59.70 73.53 - 87.55 112.69 -/ - 1 6 7 1 42.27 27.72 24.89 25.89 31.84 - 38.89 50.90 62.54 68.38 86.25 - 104.97 138.82 -/ - 1 6 8 1 26.90 23.69 32.14 42.76 65.63 - 101.30 149.93 200.46 226.71 310.60 - 403.49 582.32 -/ - 1 6 9 1 23.00 29.95 50.95 73.37 118.78 - 187.97 286.08 394.76 453.88 652.79 - 888.47 1362.02 -/ - 1 7 1 1 51.01 48.30 45.32 43.17 41.07 - 40.85 43.84 49.24 52.65 65.34 - 79.85 106.67 -/ - 1 7 2 1 50.83 47.91 44.68 42.39 40.20 - 40.05 43.17 48.90 52.56 65.82 - 80.81 108.34 -/ - 1 7 3 1 50.31 46.08 41.76 38.98 36.74 - 37.23 41.54 49.14 53.61 69.35 - 85.38 114.08 -/ - 1 7 4 1 49.91 44.39 39.27 36.34 34.34 - 35.65 41.63 50.58 55.76 72.04 - 87.72 116.93 -/ - 1 7 5 1 47.53 36.48 30.29 28.56 29.65 - 36.11 46.77 59.60 66.05 79.00 - 81.31 113.43 -/ - 1 7 6 1 45.98 32.94 27.61 26.87 29.81 - 37.91 51.16 60.28 61.55 69.72 - 82.31 104.44 -/ - 1 7 7 1 43.83 29.39 25.57 26.16 31.12 - 40.82 47.96 58.53 63.72 79.32 - 95.45 124.55 -/ - 1 7 8 1 28.57 24.01 29.42 38.30 57.18 - 87.15 128.19 170.56 192.41 261.58 - 337.24 480.46 -/ - 1 7 9 1 23.76 27.23 44.27 62.90 101.07 - 159.08 239.81 327.37 374.35 530.21 - 710.82 1073.88 -/ - 1 8 1 1 53.43 51.26 49.55 48.43 47.46 - 48.13 50.86 54.93 57.40 67.07 - 79.09 102.89 -/ - 1 8 2 1 53.24 51.00 49.18 47.93 46.78 - 47.36 50.12 54.31 56.85 66.85 - 79.18 103.39 -/ - 1 8 3 1 52.47 50.04 47.69 45.95 44.19 - 44.17 47.06 51.88 54.77 66.40 - 80.20 106.28 -/ - 1 8 4 1 51.97 49.23 46.30 44.21 42.15 - 41.94 44.99 50.41 53.82 66.83 - 81.84 109.55 -/ - 1 8 5 1 50.73 44.88 39.58 36.61 34.64 - 36.08 42.41 51.80 57.23 74.50 - 90.92 121.71 -/ - 1 8 6 1 50.09 42.38 36.29 33.43 32.23 - 35.15 43.81 54.41 59.95 76.96 - 94.68 127.64 -/ - 1 8 7 1 49.13 39.14 32.67 30.38 30.45 - 35.66 46.22 57.51 64.10 83.46 - 101.30 137.01 -/ - 1 8 8 1 38.57 24.73 25.16 26.96 35.25 - 48.34 65.96 84.10 93.37 122.12 - 152.43 207.38 -/ - 1 8 9 1 31.17 23.74 27.14 34.33 49.50 - 73.67 107.16 141.62 159.32 214.89 - 275.06 387.80 -/ - 1 9 1 1 55.72 55.67 55.50 55.47 55.74 - 56.76 59.08 62.41 64.44 72.00 - 81.74 102.80 -/ - 1 9 2 1 55.72 55.67 55.50 55.47 55.74 - 56.76 59.08 62.41 64.44 72.00 - 81.74 102.80 -/ - 1 9 3 1 55.72 55.67 55.50 55.47 55.74 - 56.76 59.08 62.41 64.44 72.00 - 81.74 102.80 -/ - 1 9 4 1 55.72 55.67 55.50 55.47 55.74 - 56.76 59.08 62.41 64.44 72.00 - 81.74 102.80 -/ - 1 9 5 1 55.72 55.67 55.50 55.47 55.74 - 56.76 59.08 62.41 64.44 72.00 - 81.74 102.80 -/ - 1 9 6 1 55.72 55.67 55.50 55.47 55.74 - 56.76 59.08 62.41 64.44 72.00 - 81.74 102.80 -/ - 1 9 7 1 55.72 55.67 55.50 55.47 55.74 - 56.76 59.08 62.41 64.44 72.00 - 81.74 102.80 -/ - 1 9 8 1 55.72 55.67 55.50 55.47 55.74 - 56.76 59.08 62.41 64.44 72.00 - 81.74 102.80 -/ - 1 9 9 1 55.72 55.67 55.50 55.47 55.74 - 56.76 59.08 62.41 64.44 72.00 - 81.74 102.80 -/ - 2 1 1 1 50.19 44.42 39.70 37.12 35.76 - 38.00 45.59 54.58 59.17 73.89 - 89.59 117.43 -/ - 2 1 2 1 49.95 43.62 38.71 36.21 35.15 - 37.98 46.37 55.40 60.13 75.90 - 92.49 121.79 -/ - 2 1 3 1 48.70 40.17 35.03 33.20 33.72 - 39.37 49.37 60.95 66.83 70.28 - 76.13 106.62 -/ - 2 1 4 1 47.53 37.53 32.79 31.66 33.63 - 40.92 52.83 56.66 59.15 71.09 - 83.18 104.85 -/ - 2 1 5 1 41.88 30.39 29.36 31.03 37.59 - 49.04 64.64 81.11 89.64 116.18 - 144.13 194.63 -/ - 2 1 6 1 39.10 28.97 29.91 32.65 42.42 - 57.70 79.69 102.85 114.76 151.64 - 190.55 261.72 -/ - 2 1 7 1 35.98 28.24 30.59 36.81 50.38 - 72.79 104.53 137.35 154.15 206.63 - 262.99 369.05 -/ - 2 1 8 1 27.22 44.38 79.53 115.73 189.07 - 306.28 486.19 704.17 829.85 1274.17 - 1825.59 2170.64 -/ - 2 1 9 1 26.99 78.27 149.63 222.42 381.41 - 672.49 1180.78 1831.55 2164.20 2190.64 - 2209.43 2160.05 -/ - 2 2 1 1 50.91 45.46 40.78 38.11 36.54 - 38.35 45.39 54.63 59.09 73.06 - 88.30 115.57 -/ - 2 2 2 1 50.69 44.69 39.79 37.18 35.87 - 38.23 46.03 55.22 59.90 74.88 - 90.98 119.59 -/ - 2 2 3 1 49.55 41.33 36.02 33.96 34.06 - 39.08 48.77 59.93 65.70 76.36 - 83.33 114.14 -/ - 2 2 4 1 48.47 38.69 33.63 32.24 33.74 - 40.63 52.03 60.75 61.34 69.40 - 80.80 101.00 -/ - 2 2 5 1 43.09 31.09 29.56 31.18 36.53 - 47.25 61.51 76.45 84.18 108.29 - 133.73 179.72 -/ - 2 2 6 1 40.35 29.40 29.75 31.94 40.85 - 54.71 74.52 95.48 106.29 139.83 - 175.17 239.43 -/ - 2 2 7 1 37.19 28.46 30.04 35.43 47.72 - 67.78 96.46 126.25 141.51 188.98 - 239.72 333.99 -/ - 2 2 8 1 27.47 41.33 72.67 105.33 171.40 - 275.56 432.17 618.00 724.06 1098.95 - 1558.35 2465.13 -/ - 2 2 9 1 26.64 71.35 135.66 200.83 340.79 - 590.60 1020.60 1565.48 1882.73 2444.69 - 2442.89 2462.77 -/ - 2 3 1 1 51.64 46.56 41.98 39.26 37.49 - 38.91 45.25 54.28 58.82 73.36 - 87.51 114.59 -/ - 2 3 2 1 51.44 45.83 41.00 38.31 36.75 - 38.61 45.75 55.14 59.67 73.85 - 89.41 117.30 -/ - 2 3 3 1 50.42 42.60 37.17 34.90 34.56 - 38.87 48.41 58.73 64.49 80.15 - 89.24 120.33 -/ - 2 3 4 1 49.43 39.99 34.64 32.97 33.95 - 40.31 51.02 63.14 66.15 67.80 - 78.60 97.42 -/ - 2 3 5 1 44.38 31.96 29.79 30.99 35.50 - 45.51 58.54 71.97 78.91 100.57 - 123.48 164.97 -/ - 2 3 6 1 41.73 29.98 29.58 31.40 39.25 - 51.86 69.53 88.26 97.94 128.06 - 159.83 217.32 -/ - 2 3 7 1 38.57 28.76 29.86 34.09 45.18 - 62.92 88.46 115.20 128.89 171.42 - 216.64 299.92 -/ - 2 3 8 1 27.82 38.40 65.87 94.95 153.83 - 245.55 380.77 537.42 625.73 936.30 - 1313.80 2106.33 -/ - 2 3 9 1 26.63 64.47 121.71 179.51 301.48 - 513.55 870.66 1320.14 1580.19 2501.75 - 2843.76 2840.23 -/ - 2 4 1 1 52.38 47.72 43.31 40.58 38.62 - 39.68 45.25 53.77 58.66 73.59 - 87.19 114.45 -/ - 2 4 2 1 52.21 47.04 42.36 39.62 37.82 - 39.23 45.57 54.67 59.54 73.99 - 88.33 116.90 -/ - 2 4 3 1 51.30 43.99 38.53 36.04 35.29 - 38.80 48.01 57.57 63.03 79.91 - 94.81 125.17 -/ - 2 4 4 1 50.41 41.44 35.87 33.90 34.29 - 39.83 49.80 61.71 67.71 74.51 - 78.97 109.43 -/ - 2 4 5 1 45.76 33.06 30.18 30.82 36.40 - 43.77 55.75 67.76 73.92 93.12 - 113.49 150.44 -/ - 2 4 6 1 43.23 30.76 29.61 31.36 37.68 - 49.16 64.77 81.26 89.81 116.44 - 144.58 195.51 -/ - 2 4 7 1 40.12 29.18 30.22 32.88 42.76 - 58.28 80.64 104.21 116.34 153.98 - 193.78 266.61 -/ - 2 4 8 1 28.30 35.66 59.17 84.59 136.34 - 216.15 331.56 462.04 534.54 786.05 - 1091.91 1724.39 -/ - 2 4 9 1 27.12 57.67 107.77 158.36 263.38 - 441.17 732.30 1095.67 1303.81 2039.78 - 2942.25 3469.41 -/ - 2 5 1 1 53.89 50.23 46.42 43.84 41.65 - 41.96 45.93 53.16 57.45 72.52 - 87.65 115.02 -/ - 2 5 2 1 53.76 49.68 45.59 42.90 40.76 - 41.32 45.82 53.58 58.14 73.55 - 88.19 115.59 -/ - 2 5 3 1 53.11 47.14 42.01 39.22 37.61 - 39.46 46.73 56.71 61.38 76.36 - 92.23 121.75 -/ - 2 5 4 1 52.46 44.91 39.25 36.68 35.85 - 39.28 48.68 58.34 63.71 80.99 - 97.02 128.73 -/ - 2 5 5 1 48.78 36.25 31.78 31.45 35.29 - 44.26 50.50 60.31 65.12 79.66 - 94.95 122.82 -/ - 2 5 6 1 46.64 33.30 30.34 31.04 36.72 - 44.07 56.23 68.46 74.73 94.28 - 115.03 152.78 -/ - 2 5 7 1 43.86 30.84 29.76 31.53 38.11 - 49.87 66.00 83.08 91.92 119.50 - 148.70 201.61 -/ - 2 5 8 1 30.00 30.82 46.29 64.14 101.48 - 158.72 238.54 324.99 371.33 525.58 - 707.44 1079.14 -/ - 2 5 9 1 27.58 44.58 79.94 116.35 190.21 - 308.50 489.76 705.57 828.14 1255.31 - 1771.21 2832.33 -/ - 2 6 1 1 55.67 53.04 50.25 48.17 46.12 - 45.90 48.91 54.27 57.74 70.55 - 85.03 111.98 -/ - 2 6 2 1 55.49 52.67 49.62 47.41 45.27 - 45.12 48.25 53.99 57.69 71.10 - 86.10 113.83 -/ - 2 6 3 1 54.96 50.89 46.80 44.11 41.92 - 42.37 46.67 54.41 58.99 75.15 - 90.48 119.24 -/ - 2 6 4 1 54.56 49.25 44.39 41.55 39.58 - 40.80 46.84 56.05 61.37 77.70 - 92.57 122.81 -/ - 2 6 5 1 52.18 41.67 35.74 33.93 34.87 - 41.43 52.49 65.44 71.58 71.26 - 80.73 100.08 -/ - 2 6 6 1 50.68 38.30 33.09 32.18 34.94 - 43.28 55.96 58.11 62.66 76.00 - 89.60 114.23 -/ - 2 6 7 1 48.61 34.88 31.09 31.29 36.19 - 44.13 53.90 65.04 70.65 87.97 - 106.30 139.75 -/ - 2 6 8 1 34.07 29.03 35.33 45.14 67.10 - 102.20 150.48 200.79 227.00 310.76 - 403.57 582.30 -/ - 2 6 9 1 29.32 33.19 52.81 74.64 119.48 - 188.32 286.24 394.83 453.92 653.10 - 888.64 1362.67 -/ - 2 7 1 1 56.27 53.80 51.33 49.46 47.56 - 47.37 50.30 55.31 58.38 70.51 - 84.44 110.67 -/ - 2 7 2 1 56.06 53.47 50.78 48.77 46.76 - 46.54 49.53 54.79 58.15 70.81 - 85.24 112.17 -/ - 2 7 3 1 55.44 51.93 48.25 45.73 43.50 - 43.64 47.35 54.25 58.47 73.58 - 89.95 118.66 -/ - 2 7 4 1 55.10 50.49 46.05 43.25 41.13 - 41.86 46.84 55.22 60.15 76.93 - 92.66 122.32 -/ - 2 7 5 1 53.09 43.56 37.48 35.26 35.32 - 40.61 51.13 63.02 69.37 84.77 - 87.66 119.45 -/ - 2 7 6 1 51.80 40.25 34.52 33.11 34.86 - 42.36 54.77 65.99 67.39 72.54 - 84.75 106.34 -/ - 2 7 7 1 49.98 36.67 32.05 31.75 35.79 - 45.11 52.46 61.40 66.39 81.44 - 97.14 125.77 -/ - 2 7 8 1 35.88 29.06 33.04 41.07 58.97 - 88.25 128.89 171.01 192.79 261.82 - 337.38 480.50 -/ - 2 7 9 1 30.34 30.92 46.44 64.41 101.95 - 159.54 240.05 327.50 374.44 530.20 - 711.26 1074.05 -/ - 2 8 1 1 58.76 56.63 55.13 54.21 53.53 - 54.10 57.08 60.99 63.37 72.72 - 84.38 107.79 -/ - 2 8 2 1 58.57 56.35 54.76 53.72 52.89 - 53.69 56.41 60.42 62.86 72.50 - 84.44 108.22 -/ - 2 8 3 1 57.76 55.36 53.41 51.90 50.29 - 50.64 53.56 58.09 60.82 71.91 - 85.19 110.73 -/ - 2 8 4 1 57.22 54.69 52.23 50.39 48.52 - 48.39 51.40 56.46 59.56 72.04 - 86.51 113.64 -/ - 2 8 5 1 55.93 51.01 46.38 43.52 41.40 - 42.26 47.57 56.38 61.57 79.43 - 95.91 127.14 -/ - 2 8 6 1 55.39 48.86 43.39 40.48 38.81 - 40.75 48.41 59.08 64.85 81.60 - 97.84 130.35 -/ - 2 8 7 1 54.57 46.02 39.92 37.30 36.60 - 40.53 50.85 61.80 67.52 86.49 - 106.81 142.35 -/ - 2 8 8 1 45.53 31.31 30.19 32.10 38.81 - 51.19 68.04 85.63 94.71 123.04 - 153.10 207.79 -/ - 2 8 9 1 38.59 28.93 31.29 37.62 51.82 - 75.11 108.06 142.28 159.88 215.22 - 275.30 387.91 -/ - 2 9 1 1 60.73 60.68 60.50 60.47 60.74 - 61.77 64.08 67.41 69.44 77.00 - 86.74 107.80 -/ - 2 9 2 1 60.73 60.68 60.50 60.47 60.74 - 61.77 64.08 67.41 69.44 77.00 - 86.74 107.80 -/ - 2 9 3 1 60.73 60.68 60.50 60.47 60.74 - 61.77 64.08 67.41 69.44 77.00 - 86.74 107.80 -/ - 2 9 4 1 60.73 60.68 60.50 60.47 60.74 - 61.77 64.08 67.41 69.44 77.00 - 86.74 107.80 -/ - 2 9 5 1 60.73 60.68 60.50 60.47 60.74 - 61.77 64.08 67.41 69.44 77.00 - 86.74 107.80 -/ - 2 9 6 1 60.73 60.68 60.50 60.47 60.74 - 61.77 64.08 67.41 69.44 77.00 - 86.74 107.80 -/ - 2 9 7 1 60.73 60.68 60.50 60.47 60.74 - 61.77 64.08 67.41 69.44 77.00 - 86.74 107.80 -/ - 2 9 8 1 60.73 60.68 60.50 60.47 60.74 - 61.77 64.08 67.41 69.44 77.00 - 86.74 107.80 -/ - 2 9 9 1 60.73 60.68 60.50 60.47 60.74 - 61.77 64.08 67.41 69.44 77.00 - 86.74 107.80 -/ - 3 1 1 1 55.36 50.53 46.35 43.75 42.05 - 43.49 50.21 59.54 64.02 77.51 - 92.74 120.09 -/ - 3 1 2 1 55.15 49.81 45.41 42.83 41.35 - 43.31 50.83 60.14 64.60 79.36 - 95.50 124.28 -/ - 3 1 3 1 54.11 46.68 41.75 39.58 39.31 - 43.99 53.51 64.60 70.28 76.97 - 83.61 114.22 -/ - 3 1 4 1 53.09 44.19 39.37 37.72 38.85 - 45.54 56.74 63.21 62.51 74.03 - 85.74 106.91 -/ - 3 1 5 1 48.13 36.75 34.97 36.31 41.51 - 52.20 67.01 82.95 91.27 117.37 - 145.05 195.29 -/ - 3 1 6 1 45.59 34.96 34.83 37.01 45.80 - 60.16 81.39 104.11 115.86 152.45 - 191.21 262.14 -/ - 3 1 7 1 42.63 33.87 35.15 40.45 53.04 - 74.55 105.71 138.21 154.92 207.17 - 263.36 369.30 -/ - 3 1 8 1 32.89 47.08 80.98 116.65 189.56 - 306.52 486.29 704.16 830.02 1274.37 - 1825.77 2172.38 -/ - 3 1 9 1 31.78 79.69 150.27 222.78 381.57 - 672.49 1180.95 1831.70 2165.59 2190.75 - 2209.53 2160.15 -/ - 3 2 1 1 56.06 51.50 47.38 44.74 42.91 - 44.07 50.15 59.08 63.91 77.59 - 91.59 119.36 -/ - 3 2 2 1 55.87 50.81 46.45 43.81 42.15 - 43.70 50.64 60.21 64.52 78.51 - 94.14 122.25 -/ - 3 2 3 1 54.91 47.79 42.77 40.43 39.85 - 43.84 53.31 63.62 69.28 82.62 - 90.31 119.73 -/ - 3 2 4 1 53.97 45.33 40.27 38.44 39.08 - 45.31 55.91 66.98 67.95 72.52 - 83.56 103.26 -/ - 3 2 5 1 49.27 37.55 35.23 36.10 40.62 - 50.60 64.11 78.49 86.01 109.64 - 134.78 180.50 -/ - 3 2 6 1 46.80 35.52 34.77 36.56 44.40 - 57.39 76.43 96.90 107.54 140.73 - 175.88 239.91 -/ - 3 2 7 1 43.84 34.20 35.00 39.27 50.59 - 69.74 97.76 127.23 142.36 189.60 - 240.16 334.29 -/ - 3 2 8 1 33.25 44.23 74.30 106.38 171.96 - 275.84 432.30 618.03 724.05 1099.40 - 1558.55 2457.93 -/ - 3 2 9 1 31.72 72.94 136.39 201.26 340.98 - 590.64 1020.83 1565.64 1882.89 2466.76 - 2441.74 2462.87 -/ - 3 3 1 1 56.77 52.51 48.51 45.88 43.91 - 44.79 50.21 58.68 63.58 78.03 - 92.08 119.51 -/ - 3 3 2 1 56.60 51.87 47.61 44.93 43.11 - 44.33 50.52 59.61 64.53 78.44 - 92.72 121.14 -/ - 3 3 3 1 55.73 48.99 43.93 41.44 40.54 - 43.80 53.19 62.48 68.15 85.05 - 95.84 125.67 -/ - 3 3 4 1 54.87 46.58 41.35 39.29 39.43 - 44.87 54.89 66.75 72.40 71.09 - 81.58 103.97 -/ - 3 3 5 1 50.49 38.53 35.62 36.05 40.31 - 49.04 61.40 74.27 80.98 102.13 - 124.71 165.87 -/ - 3 3 6 1 48.10 36.24 34.94 36.47 42.98 - 54.79 71.68 89.89 99.38 129.11 - 160.64 217.94 -/ - 3 3 7 1 45.19 34.61 35.38 38.17 48.29 - 65.12 89.95 116.29 129.86 172.14 - 217.20 300.29 -/ - 3 3 8 1 33.72 41.55 67.71 96.15 154.49 - 245.88 380.94 537.49 625.76 936.63 - 1314.00 2107.53 -/ - 3 3 9 1 32.04 66.27 122.55 180.01 301.71 - 513.63 870.80 1320.31 1580.35 2503.24 - 2843.87 2910.90 -/ - 3 4 1 1 57.49 53.57 49.75 47.16 45.09 - 45.68 50.41 58.37 63.02 78.37 - 91.92 119.56 -/ - 3 4 2 1 57.34 52.98 48.89 46.22 44.25 - 45.13 50.55 59.10 64.05 79.16 - 92.97 120.90 -/ - 3 4 3 1 56.56 50.28 45.28 42.65 41.41 - 43.98 52.51 62.30 67.06 83.29 - 101.06 131.63 -/ - 3 4 4 1 55.79 47.97 42.63 40.33 39.97 - 44.52 54.31 65.39 71.24 81.21 - 85.48 115.53 -/ - 3 4 5 1 51.77 39.73 36.18 36.25 40.57 - 47.46 58.86 70.35 76.28 94.94 - 114.93 151.51 -/ - 3 4 6 1 49.51 37.17 35.23 36.60 41.63 - 52.36 67.20 83.16 91.48 117.67 - 145.53 196.20 -/ - 3 4 7 1 46.68 35.20 35.14 37.24 46.14 - 60.76 82.36 105.48 117.46 154.79 - 194.45 267.02 -/ - 3 4 8 1 34.35 39.10 61.23 85.99 137.12 - 216.56 331.78 462.15 534.61 786.02 - 1092.44 1724.59 -/ - 3 4 9 1 32.66 59.73 108.76 158.96 263.68 - 441.28 732.29 1095.85 1303.99 2041.01 - 2942.37 3469.51 -/ - 3 5 1 1 58.96 55.87 52.62 50.26 48.08 - 48.13 51.66 58.26 62.31 76.79 - 92.20 119.59 -/ - 3 5 2 1 58.84 55.39 51.87 49.39 47.22 - 47.45 51.31 58.51 62.83 78.12 - 93.31 121.18 -/ - 3 5 3 1 58.27 53.17 48.61 45.84 43.99 - 45.25 51.56 60.99 66.44 81.13 - 95.66 125.80 -/ - 3 5 4 1 57.70 51.19 46.00 43.30 42.00 - 44.52 53.07 63.21 68.09 84.44 - 102.61 135.40 -/ - 3 5 5 1 54.54 43.05 38.18 37.17 39.89 - 48.42 56.09 63.55 68.18 82.20 - 97.08 124.46 -/ - 3 5 6 1 52.68 40.00 36.35 36.44 40.98 - 47.78 59.37 71.08 77.11 96.12 - 116.49 153.87 -/ - 3 5 7 1 50.20 37.25 35.36 36.91 42.05 - 53.06 68.43 84.95 93.57 120.72 - 149.64 202.28 -/ - 3 5 8 1 36.43 35.00 48.98 66.06 102.65 - 159.39 238.91 325.23 371.53 525.66 - 707.45 1079.81 -/ - 3 5 9 1 33.31 47.31 81.39 117.27 190.69 - 308.74 489.85 705.57 828.32 1255.50 - 1771.38 2833.83 -/ - 3 6 1 1 60.89 58.43 56.07 54.23 52.34 - 52.16 55.15 60.17 63.33 75.63 - 89.59 116.00 -/ - 3 6 2 1 60.67 58.10 55.52 53.55 51.55 - 51.34 54.39 59.68 63.15 76.03 - 90.50 117.70 -/ - 3 6 3 1 60.03 56.56 53.01 50.54 48.34 - 48.51 52.30 59.44 63.79 79.35 - 95.82 125.11 -/ - 3 6 4 1 59.68 55.12 50.85 48.11 46.02 - 46.78 51.98 60.66 65.75 82.70 - 97.56 128.29 -/ - 3 6 5 1 57.63 48.33 42.52 40.32 40.41 - 45.97 56.52 69.11 75.46 78.01 - 83.86 102.76 -/ - 3 6 6 1 56.34 45.12 39.67 38.15 39.97 - 47.70 60.55 63.06 66.01 78.93 - 92.13 116.25 -/ - 3 6 7 1 54.54 41.69 37.30 36.88 41.06 - 50.24 57.30 68.02 73.42 90.16 - 108.08 141.10 -/ - 3 6 8 1 40.92 34.33 39.08 48.09 69.02 - 103.43 151.26 201.33 227.44 311.05 - 403.76 582.37 -/ - 3 6 9 1 35.60 37.01 55.16 76.28 120.42 - 188.84 286.53 395.00 454.04 653.13 - 889.03 1362.87 -/ - 3 7 1 1 61.51 59.11 57.04 55.39 53.58 - 53.67 56.63 61.33 64.17 75.80 - 89.22 114.92 -/ - 3 7 2 1 61.28 58.83 56.56 54.78 52.93 - 52.80 55.80 60.74 63.80 75.98 - 89.88 116.29 -/ - 3 7 3 1 60.52 57.49 54.33 52.03 49.86 - 49.81 53.20 59.54 63.55 78.11 - 93.98 123.49 -/ - 3 7 4 1 60.18 56.24 52.36 49.75 47.57 - 47.95 52.21 60.08 64.79 81.50 - 97.88 126.84 -/ - 3 7 5 1 58.45 50.08 44.30 41.78 41.20 - 45.40 55.93 66.75 73.04 91.39 - 95.26 125.74 -/ - 3 7 6 1 57.34 47.00 41.23 39.34 40.20 - 47.07 58.61 71.88 73.88 75.76 - 87.64 108.73 -/ - 3 7 7 1 55.77 43.52 38.47 37.46 40.35 - 49.22 58.74 64.67 69.51 84.04 - 99.33 127.45 -/ - 3 7 8 1 42.78 34.09 37.16 44.40 61.26 - 89.71 129.85 171.70 193.38 262.19 - 337.66 480.64 -/ - 3 7 9 1 36.83 35.15 49.17 66.35 103.12 - 160.21 240.42 327.74 374.63 530.29 - 711.26 1074.73 -/ - 3 8 1 1 64.00 61.97 60.63 59.86 59.42 - 60.12 62.18 66.05 68.02 78.24 - 89.62 112.73 -/ - 3 8 2 1 63.84 61.67 60.25 59.37 58.79 - 59.44 62.39 66.27 68.43 78.03 - 89.67 113.12 -/ - 3 8 3 1 63.06 60.60 58.90 57.57 56.25 - 56.84 59.75 64.08 66.70 77.38 - 90.25 115.35 -/ - 3 8 4 1 62.47 59.97 57.89 56.26 54.46 - 54.61 57.66 62.44 65.32 77.35 - 91.32 117.95 -/ - 3 8 5 1 61.03 56.78 52.71 50.02 47.83 - 48.32 52.89 61.19 66.17 83.99 - 101.17 131.65 -/ - 3 8 6 1 60.55 54.90 49.99 47.09 45.19 - 46.55 53.25 63.40 69.32 86.57 - 102.77 134.57 -/ - 3 8 7 1 59.85 52.38 46.72 43.93 42.73 - 45.69 55.18 66.45 71.91 89.88 - 109.84 146.42 -/ - 3 8 8 1 51.95 37.77 35.76 37.46 42.77 - 54.50 70.64 87.65 96.49 124.34 - 154.09 208.50 -/ - 3 8 9 1 45.49 34.62 35.96 41.40 54.67 - 77.01 109.30 143.18 160.67 215.77 - 275.66 388.16 -/ - 3 9 1 1 65.73 65.68 65.51 65.47 65.75 - 66.77 69.09 72.41 74.44 82.00 - 91.74 112.80 -/ - 3 9 2 1 65.73 65.68 65.51 65.47 65.75 - 66.77 69.09 72.41 74.44 82.00 - 91.74 112.80 -/ - 3 9 3 1 65.73 65.68 65.51 65.47 65.75 - 66.77 69.09 72.41 74.44 82.00 - 91.74 112.80 -/ - 3 9 4 1 65.73 65.68 65.51 65.47 65.75 - 66.77 69.09 72.41 74.44 82.00 - 91.74 112.80 -/ - 3 9 5 1 65.73 65.68 65.51 65.47 65.75 - 66.77 69.09 72.41 74.44 82.00 - 91.74 112.80 -/ - 3 9 6 1 65.73 65.68 65.51 65.47 65.75 - 66.77 69.09 72.41 74.44 82.00 - 91.74 112.80 -/ - 3 9 7 1 65.73 65.68 65.51 65.47 65.75 - 66.77 69.09 72.41 74.44 82.00 - 91.74 112.80 -/ - 3 9 8 1 65.73 65.68 65.51 65.47 65.75 - 66.77 69.09 72.41 74.44 82.00 - 91.74 112.80 -/ - 3 9 9 1 65.73 65.68 65.51 65.47 65.75 - 66.77 69.09 72.41 74.44 82.00 - 91.74 112.80 -/ - 4 1 1 1 60.44 56.33 52.64 50.13 48.22 - 49.19 55.05 63.85 68.96 82.18 - 96.15 123.99 -/ - 4 1 2 1 60.26 55.69 51.75 49.20 47.46 - 48.78 55.52 64.99 69.60 83.12 - 98.79 127.07 -/ - 4 1 3 1 59.36 52.85 48.21 45.83 45.07 - 48.81 58.20 68.48 74.02 84.29 - 91.06 120.23 -/ - 4 1 4 1 58.48 50.52 45.76 43.83 44.20 - 50.27 60.80 70.11 68.11 77.31 - 88.68 109.36 -/ - 4 1 5 1 54.07 42.98 40.59 41.24 45.75 - 55.72 69.81 85.18 93.27 118.88 - 146.26 196.21 -/ - 4 1 6 1 51.74 40.93 39.99 41.72 49.53 - 63.07 83.49 105.70 117.28 153.51 - 192.08 262.79 -/ - 4 1 7 1 48.96 39.53 40.13 44.47 56.15 - 76.72 107.18 139.35 155.92 207.90 - 263.93 369.69 -/ - 4 1 8 1 38.57 50.22 82.74 117.80 190.20 - 306.86 486.46 704.24 830.05 1274.68 - 1826.00 2172.59 -/ - 4 1 9 1 36.82 81.43 151.09 223.28 381.81 - 672.57 1181.06 1831.89 2165.78 2185.95 - 2209.67 2267.40 -/ - 4 2 1 1 61.12 57.24 53.61 51.11 49.11 - 49.85 55.13 63.55 68.44 82.76 - 96.84 124.38 -/ - 4 2 2 1 60.95 56.64 52.75 50.19 48.31 - 49.38 55.46 64.50 69.75 83.22 - 97.56 126.21 -/ - 4 2 3 1 60.13 53.91 49.22 46.73 45.71 - 48.78 58.17 67.53 73.15 89.53 - 97.31 126.98 -/ - 4 2 4 1 59.31 51.62 46.71 44.58 44.54 - 49.89 59.94 71.71 74.57 75.95 - 86.68 105.91 -/ - 4 2 5 1 55.15 43.86 40.96 41.26 45.07 - 54.28 67.14 80.95 88.23 111.34 - 136.15 181.55 -/ - 4 2 6 1 52.90 41.60 40.20 41.60 48.27 - 60.52 78.75 98.69 109.12 141.92 - 176.83 240.67 -/ - 4 2 7 1 50.15 39.94 40.49 43.47 53.91 - 72.13 99.40 128.47 143.48 190.43 - 240.80 334.71 -/ - 4 2 8 1 39.03 47.59 76.25 107.68 172.69 - 276.24 432.51 618.14 724.12 1099.35 - 1558.79 2458.16 -/ - 4 2 9 1 37.01 74.87 137.31 201.84 341.27 - 590.76 1020.80 1565.85 1883.08 2468.62 - 2441.48 2463.00 -/ - 4 3 1 1 61.81 58.19 54.68 52.21 50.14 - 50.65 55.35 63.32 67.99 83.33 - 96.89 124.70 -/ - 4 3 2 1 61.66 57.62 53.85 51.30 49.31 - 50.11 55.50 64.09 69.07 83.68 - 97.45 126.26 -/ - 4 3 3 1 60.91 55.03 50.37 47.78 46.50 - 48.97 57.59 67.09 72.07 88.53 - 103.36 132.56 -/ - 4 3 4 1 60.16 52.83 47.82 45.49 45.04 - 49.60 59.24 70.63 76.45 77.77 - 84.91 110.69 -/ - 4 3 5 1 56.30 44.91 41.48 41.49 44.59 - 52.87 64.65 76.99 83.46 104.05 - 126.27 167.07 -/ - 4 3 6 1 54.15 42.42 40.49 41.83 47.06 - 58.14 74.25 91.90 101.17 130.46 - 161.71 218.78 -/ - 4 3 7 1 51.46 40.47 40.36 42.60 51.82 - 67.76 91.80 117.69 131.11 173.09 - 217.95 300.78 -/ - 4 3 8 1 39.61 45.17 69.88 97.63 155.33 - 246.35 381.20 537.64 625.87 936.63 - 1314.44 2107.76 -/ - 4 3 9 1 37.60 68.42 123.61 180.67 302.05 - 513.78 870.81 1320.56 1580.56 2503.42 - 2845.95 2911.03 -/ - 4 4 1 1 62.51 59.19 55.85 53.44 51.32 - 51.61 55.71 63.18 67.61 83.31 - 97.52 125.00 -/ - 4 4 2 1 62.37 58.66 55.05 52.55 50.47 - 51.00 55.71 63.76 68.48 84.08 - 97.84 126.19 -/ - 4 4 3 1 61.70 56.24 51.68 49.02 47.47 - 49.34 57.10 67.12 71.83 86.97 - 104.32 135.67 -/ - 4 4 4 1 61.04 54.14 49.11 46.61 45.79 - 49.38 59.16 69.30 75.07 88.58 - 93.12 123.52 -/ - 4 4 5 1 57.50 46.16 42.18 41.79 45.15 - 51.60 62.33 73.35 79.05 97.14 - 116.74 152.92 -/ - 4 4 6 1 55.48 43.46 40.87 41.54 45.92 - 55.93 70.07 85.45 93.55 119.24 - 146.79 197.16 -/ - 4 4 7 1 52.90 41.19 40.25 41.97 49.88 - 63.69 84.48 107.09 118.89 155.87 - 195.33 267.68 -/ - 4 4 8 1 40.36 42.97 63.66 87.69 138.10 - 217.13 332.11 462.35 534.77 786.07 - 1092.40 1724.84 -/ - 4 4 9 1 38.05 62.15 109.99 159.74 264.09 - 441.48 732.35 1095.96 1304.26 2041.20 - 2944.08 3469.65 -/ - 4 5 1 1 64.04 61.33 58.51 56.37 54.26 - 54.16 57.45 63.52 67.37 81.31 - 96.25 124.36 -/ - 4 5 2 1 63.86 60.90 57.83 55.56 53.41 - 53.43 56.98 63.60 67.71 82.45 - 97.93 127.07 -/ - 4 5 3 1 63.33 58.93 54.85 52.20 50.19 - 51.03 56.59 65.52 70.73 86.59 - 101.24 131.20 -/ - 4 5 4 1 62.84 57.15 52.41 49.68 48.08 - 49.90 57.71 68.14 72.94 88.19 - 105.95 138.23 -/ - 4 5 5 1 60.08 49.54 44.48 43.08 44.88 - 52.67 62.63 67.10 71.58 85.12 - 99.61 126.50 -/ - 4 5 6 1 58.43 46.46 42.36 41.99 45.51 - 51.93 62.86 74.10 79.91 98.34 - 118.32 155.29 -/ - 4 5 7 1 56.21 43.54 40.99 41.83 46.31 - 56.62 71.28 87.22 95.62 122.27 - 150.89 203.25 -/ - 4 5 8 1 42.75 39.56 52.14 68.36 104.08 - 160.25 239.44 325.58 371.82 525.84 - 707.54 1079.78 -/ - 4 5 9 1 39.05 50.44 83.15 118.43 191.33 - 309.08 490.02 705.64 828.35 1255.83 - 1771.59 2834.02 -/ - 4 6 1 1 66.11 63.68 61.68 60.05 58.23 - 58.30 61.31 66.06 68.96 80.83 - 94.31 120.23 -/ - 4 6 2 1 65.86 63.40 61.19 59.43 57.49 - 57.43 60.49 65.48 68.67 81.10 - 95.09 121.79 -/ - 4 6 3 1 65.06 62.03 58.93 56.66 54.49 - 54.48 58.01 64.61 68.76 83.80 - 99.82 129.93 -/ - 4 6 4 1 64.71 60.76 56.96 54.39 52.24 - 52.68 57.25 65.46 70.34 87.85 - 102.76 132.83 -/ - 4 6 5 1 62.93 54.61 49.04 46.57 46.09 - 50.75 61.32 73.01 79.19 85.58 - 87.33 110.11 -/ - 4 6 6 1 61.80 51.58 46.09 44.23 45.24 - 52.55 64.61 70.49 69.65 82.19 - 95.04 118.66 -/ - 4 6 7 1 60.21 48.21 43.47 42.60 45.76 - 54.96 61.01 71.35 76.56 92.76 - 110.26 142.80 -/ - 4 6 8 1 47.49 39.35 43.23 51.49 71.37 - 104.93 152.25 202.05 228.07 311.45 - 404.07 582.55 -/ - 4 6 9 1 41.83 41.21 57.92 78.24 121.60 - 189.53 286.93 395.27 454.26 653.23 - 889.04 1363.53 -/ - 4 7 1 1 66.76 64.31 62.55 61.10 59.48 - 59.82 62.78 67.26 69.97 81.14 - 94.12 119.36 -/ - 4 7 2 1 66.51 64.07 62.13 60.55 58.78 - 58.93 61.95 66.63 69.47 81.23 - 94.67 120.59 -/ - 4 7 3 1 65.63 62.89 60.13 58.05 55.96 - 55.82 59.08 64.94 68.77 82.83 - 98.24 127.25 -/ - 4 7 4 1 65.20 61.78 58.36 55.93 53.74 - 53.90 57.77 65.09 69.59 85.74 - 102.52 132.84 -/ - 4 7 5 1 63.68 56.25 50.81 48.13 47.11 - 50.41 60.61 70.97 76.96 95.47 - 102.88 133.97 -/ - 4 7 6 1 62.71 53.39 47.73 45.48 45.65 - 51.63 62.61 75.64 80.43 79.29 - 90.86 111.49 -/ - 4 7 7 1 61.34 50.04 44.79 43.38 45.29 - 53.43 65.13 68.26 72.94 87.03 - 101.90 129.53 -/ - 4 7 8 1 49.36 39.59 41.63 48.15 64.01 - 91.52 131.06 172.59 194.17 262.75 - 338.07 480.90 -/ - 4 7 9 1 43.21 39.74 52.37 68.65 104.55 - 161.07 240.95 328.09 374.93 530.46 - 711.35 1074.70 -/ - 4 8 1 1 69.17 67.29 66.07 65.43 65.19 - 65.92 67.94 70.95 72.80 83.66 - 94.82 117.69 -/ - 4 8 2 1 69.03 66.98 65.68 64.94 64.59 - 65.30 67.35 70.50 72.48 83.46 - 94.86 118.05 -/ - 4 8 3 1 68.34 65.82 64.27 63.11 62.08 - 62.87 65.71 69.89 72.43 82.81 - 95.34 120.07 -/ - 4 8 4 1 67.72 65.16 63.36 61.91 60.28 - 60.67 63.72 68.30 71.06 82.67 - 96.23 122.43 -/ - 4 8 5 1 66.05 62.34 58.72 56.21 54.00 - 54.25 58.34 66.15 70.93 88.18 - 105.81 137.69 -/ - 4 8 6 1 65.63 60.67 56.23 53.45 51.39 - 52.34 58.28 67.95 73.64 92.32 - 107.94 140.24 -/ - 4 8 7 1 65.01 58.40 53.17 50.31 48.79 - 51.01 59.75 71.43 76.84 93.57 - 113.17 149.26 -/ - 4 8 8 1 58.03 44.12 41.42 42.39 47.14 - 58.15 73.64 90.07 98.68 125.99 - 155.42 209.47 -/ - 4 8 9 1 52.04 40.32 41.10 45.51 57.95 - 79.34 110.84 144.31 161.66 216.51 - 276.23 388.54 -/ - 4 9 1 1 70.74 70.69 70.51 70.48 70.75 - 71.77 74.09 77.42 79.45 87.01 - 96.74 117.80 -/ - 4 9 2 1 70.74 70.69 70.51 70.48 70.75 - 71.77 74.09 77.42 79.45 87.01 - 96.74 117.80 -/ - 4 9 3 1 70.74 70.69 70.51 70.48 70.75 - 71.77 74.09 77.42 79.45 87.01 - 96.74 117.80 -/ - 4 9 4 1 70.74 70.69 70.51 70.48 70.75 - 71.77 74.09 77.42 79.45 87.01 - 96.74 117.80 -/ - 4 9 5 1 70.74 70.69 70.51 70.48 70.75 - 71.77 74.09 77.42 79.45 87.01 - 96.74 117.80 -/ - 4 9 6 1 70.74 70.69 70.51 70.48 70.75 - 71.77 74.09 77.42 79.45 87.01 - 96.74 117.80 -/ - 4 9 7 1 70.74 70.69 70.51 70.48 70.75 - 71.77 74.09 77.42 79.45 87.01 - 96.74 117.80 -/ - 4 9 8 1 70.74 70.69 70.51 70.48 70.75 - 71.77 74.09 77.42 79.45 87.01 - 96.74 117.80 -/ - 4 9 9 1 70.74 70.69 70.51 70.48 70.75 - 71.77 74.09 77.42 79.45 87.01 - 96.74 117.80 -/ - 5 1 1 1 70.41 67.41 64.46 62.27 60.18 - 60.56 65.17 73.09 77.75 92.79 - 106.41 134.42 -/ - 5 1 2 1 70.27 66.88 63.69 61.40 59.38 - 60.02 65.37 73.92 78.95 92.86 - 107.18 135.33 -/ - 5 1 3 1 69.59 64.50 60.45 58.05 56.61 - 58.90 67.63 76.92 82.20 98.73 - 106.74 135.52 -/ - 5 1 4 1 68.90 62.48 58.04 55.84 55.04 - 59.73 69.20 80.70 83.42 84.65 - 95.42 115.18 -/ - 5 1 5 1 65.33 55.13 51.91 51.83 55.05 - 63.60 76.43 90.66 98.28 122.82 - 149.53 198.84 -/ - 5 1 6 1 63.38 52.75 50.85 52.06 57.84 - 69.92 88.72 109.83 121.00 156.38 - 194.40 264.63 -/ - 5 1 7 1 60.94 50.85 50.84 53.33 63.42 - 82.12 111.00 142.25 158.52 209.89 - 265.53 370.87 -/ - 5 1 8 1 49.95 57.43 87.10 120.76 191.93 - 307.89 487.08 704.62 830.33 1274.71 - 1826.42 2173.16 -/ - 5 1 9 1 47.34 85.73 153.24 224.67 382.57 - 672.94 1181.11 1832.11 2166.20 2162.74 - 2212.84 2160.75 -/ - 5 2 1 1 71.07 68.24 65.35 63.19 61.08 - 61.32 65.49 73.03 77.50 93.09 - 106.71 135.15 -/ - 5 2 2 1 70.94 67.73 64.60 62.34 60.27 - 60.73 65.54 73.70 78.51 93.51 - 107.34 135.73 -/ - 5 2 3 1 70.31 65.47 61.43 58.98 57.36 - 59.19 67.26 77.16 81.69 97.46 - 113.03 141.49 -/ - 5 2 4 1 69.67 63.51 59.01 56.68 55.73 - 59.54 69.18 79.87 85.53 83.60 - 93.77 116.14 -/ - 5 2 5 1 66.33 56.09 52.46 52.12 54.81 - 62.41 74.14 86.87 93.68 115.68 - 139.77 184.46 -/ - 5 2 6 1 64.45 53.55 51.20 52.05 56.86 - 67.76 84.43 103.22 113.22 145.10 - 179.44 242.69 -/ - 5 2 7 1 62.07 51.42 50.61 52.67 61.55 - 77.97 103.62 131.71 146.38 192.65 - 242.61 336.09 -/ - 5 2 8 1 50.56 55.26 81.03 110.98 174.63 - 277.40 433.21 618.61 724.49 1099.48 - 1559.08 2458.75 -/ - 5 2 9 1 47.90 79.60 139.73 203.40 342.14 - 591.21 1020.93 1565.95 1883.36 2469.09 - 2441.47 2463.36 -/ - 5 3 1 1 71.74 69.09 66.32 64.22 62.08 - 62.19 65.97 73.04 77.30 92.46 - 107.03 135.89 -/ - 5 3 2 1 71.61 68.63 65.60 63.39 61.28 - 61.56 65.85 73.56 78.13 94.11 - 108.05 137.20 -/ - 5 3 3 1 71.03 66.49 62.52 60.04 58.26 - 59.63 66.96 77.23 82.00 96.21 - 113.52 145.15 -/ - 5 3 4 1 70.46 64.61 60.12 57.68 56.47 - 59.44 69.18 78.87 84.44 94.51 - 99.02 127.99 -/ - 5 3 5 1 67.36 57.21 53.16 52.49 54.97 - 61.29 72.02 83.39 89.41 108.87 - 130.32 170.34 -/ - 5 3 6 1 65.59 54.52 51.64 51.89 55.98 - 65.75 80.43 96.92 105.74 134.02 - 164.66 221.09 -/ - 5 3 7 1 63.30 52.14 50.76 52.25 59.82 - 74.10 96.50 121.34 134.39 175.59 - 219.99 302.37 -/ - 5 3 8 1 51.31 53.28 75.11 101.34 157.55 - 247.69 382.02 538.20 626.34 936.85 - 1314.46 2108.53 -/ - 5 3 9 1 48.61 73.65 126.35 182.46 303.06 - 514.33 871.03 1320.55 1580.71 2503.91 - 2877.48 2841.96 -/ - 5 4 1 1 72.49 69.99 67.38 65.36 63.20 - 63.21 66.74 73.20 77.24 91.85 - 106.70 135.43 -/ - 5 4 2 1 72.31 69.56 66.69 64.55 62.42 - 62.53 66.36 73.52 77.84 93.28 - 108.81 137.56 -/ - 5 4 3 1 71.78 67.57 63.74 61.27 59.33 - 60.36 66.75 76.34 82.00 95.49 - 111.47 141.82 -/ - 5 4 4 1 71.26 65.81 61.38 58.86 57.38 - 59.62 68.44 78.28 83.36 100.25 - 110.17 139.39 -/ - 5 4 5 1 68.45 58.51 54.06 52.99 54.95 - 63.98 70.07 80.25 85.54 102.51 - 121.34 156.64 -/ - 5 4 6 1 66.80 55.68 52.23 52.15 55.32 - 63.89 76.79 91.03 98.67 123.28 - 150.14 199.85 -/ - 5 4 7 1 64.62 53.06 51.11 52.37 58.22 - 70.57 89.74 111.24 122.62 158.75 - 197.66 269.51 -/ - 5 4 8 1 52.26 51.55 69.45 91.88 140.67 - 218.69 333.08 463.04 535.35 786.41 - 1092.54 1725.40 -/ - 5 4 9 1 49.04 67.95 113.13 161.81 265.27 - 442.15 732.68 1096.06 1304.26 2041.66 - 2944.55 3472.38 -/ - 5 5 1 1 74.27 71.90 69.74 68.01 66.01 - 65.91 69.12 74.33 77.85 90.88 - 104.92 132.08 -/ - 5 5 2 1 73.99 71.56 69.17 67.30 65.19 - 65.10 68.42 74.14 77.90 91.68 - 106.29 134.48 -/ - 5 5 3 1 73.30 69.94 66.61 64.29 62.15 - 62.49 66.97 75.05 79.88 96.87 - 111.62 141.44 -/ - 5 5 4 1 72.91 68.48 64.48 61.94 59.97 - 60.99 67.41 77.20 82.98 96.85 - 113.23 144.52 -/ - 5 5 5 1 70.75 61.83 56.74 54.84 55.31 - 62.39 74.04 74.97 79.15 91.83 - 105.60 131.55 -/ - 5 5 6 1 69.42 58.86 54.27 53.20 55.23 - 64.54 70.64 81.04 86.44 103.75 - 122.95 159.04 -/ - 5 5 7 1 67.61 55.80 52.33 52.33 55.67 - 64.58 77.96 92.76 100.69 126.28 - 154.20 205.88 -/ - 5 5 8 1 55.06 49.59 59.44 73.89 107.67 - 162.52 240.92 326.64 372.73 526.47 - 707.97 1079.95 -/ - 5 5 9 1 50.54 57.65 87.52 121.39 193.07 - 310.11 490.63 706.01 828.62 1255.86 - 1772.03 2834.53 -/ - 5 6 1 1 76.58 74.02 72.47 71.20 69.75 - 69.93 73.24 77.60 80.08 91.35 - 104.04 129.13 -/ - 5 6 2 1 76.28 73.75 72.07 70.69 69.04 - 69.36 72.42 76.98 79.75 91.46 - 104.62 130.44 -/ - 5 6 3 1 75.20 72.65 70.20 68.32 66.20 - 66.12 69.48 75.23 79.05 93.20 - 108.36 137.55 -/ - 5 6 4 1 74.66 71.62 68.53 66.31 64.12 - 64.21 68.09 75.39 79.91 96.34 - 112.88 145.00 -/ - 5 6 5 1 73.25 66.48 61.43 58.82 57.57 - 60.63 71.00 81.28 87.30 101.98 - 98.67 126.98 -/ - 5 6 6 1 72.36 63.80 58.47 56.23 55.98 - 61.96 73.04 85.57 80.45 89.50 - 101.70 124.41 -/ - 5 6 7 1 71.09 60.65 55.59 54.09 55.62 - 63.75 69.19 78.81 83.67 98.86 - 115.57 147.19 -/ - 5 6 8 1 60.01 50.14 52.24 59.24 77.04 - 108.69 154.83 203.99 229.79 312.73 - 405.00 583.20 -/ - 5 6 9 1 54.05 50.35 64.43 83.00 124.62 - 191.40 288.13 396.09 454.98 653.69 - 889.31 1363.53 -/ - 5 7 1 1 77.29 74.72 73.23 72.11 71.01 - 71.46 74.51 78.27 80.19 91.81 - 104.07 128.57 -/ - 5 7 2 1 77.00 74.40 72.86 71.64 70.27 - 70.53 73.82 78.15 80.62 91.79 - 104.48 129.60 -/ - 5 7 3 1 75.90 73.39 71.24 69.55 67.58 - 67.52 70.79 75.94 79.44 92.68 - 107.22 135.31 -/ - 5 7 4 1 75.23 72.49 69.74 67.70 65.52 - 65.47 69.01 75.42 79.56 94.78 - 110.75 141.48 -/ - 5 7 5 1 73.90 67.91 63.11 60.43 58.79 - 60.86 69.74 80.95 85.97 102.97 - 119.06 150.35 -/ - 5 7 6 1 73.14 65.44 60.15 57.66 56.82 - 61.24 71.99 83.81 90.05 87.08 - 98.11 117.89 -/ - 5 7 7 1 72.05 62.41 57.09 55.16 55.71 - 63.18 75.43 76.17 80.57 93.81 - 107.96 134.67 -/ - 5 7 8 1 61.82 50.68 51.35 56.47 70.52 - 96.01 134.14 174.94 196.26 264.33 - 339.28 481.77 -/ - 5 7 9 1 55.62 49.84 59.69 74.19 108.13 - 163.35 242.44 329.15 375.84 531.09 - 711.77 1074.85 -/ - 5 8 1 1 79.41 77.95 76.90 76.44 76.31 - 77.07 79.12 82.11 83.95 94.29 - 105.11 127.63 -/ - 5 8 2 1 79.31 77.63 76.49 75.97 75.81 - 76.56 78.59 81.58 83.42 94.12 - 105.14 127.94 -/ - 5 8 3 1 78.77 76.31 74.93 74.05 73.48 - 74.19 76.30 79.94 82.00 93.51 - 105.50 129.67 -/ - 5 8 4 1 78.22 75.47 73.98 72.83 71.66 - 72.11 75.38 79.67 82.29 93.27 - 106.17 131.67 -/ - 5 8 5 1 76.08 73.09 70.13 67.99 65.78 - 65.77 69.47 76.34 80.77 97.09 - 113.95 146.30 -/ - 5 8 6 1 75.63 71.72 68.02 65.54 63.32 - 63.75 68.61 77.46 82.79 101.78 - 118.79 150.92 -/ - 5 8 7 1 75.15 69.84 65.33 62.61 60.65 - 61.94 69.32 80.37 86.94 102.18 - 120.46 155.59 -/ - 5 8 8 1 69.53 56.47 52.80 52.82 56.44 - 66.10 80.51 95.90 104.04 130.21 - 158.85 212.12 -/ - 5 8 9 1 64.37 51.74 51.79 54.42 65.42 - 84.95 114.75 147.27 164.30 218.51 - 277.87 389.69 -/ - 5 9 1 1 80.76 80.70 80.52 80.49 80.76 - 81.78 84.10 87.42 89.45 97.01 - 106.75 127.80 -/ - 5 9 2 1 80.76 80.70 80.52 80.49 80.76 - 81.78 84.10 87.42 89.45 97.01 - 106.75 127.80 -/ - 5 9 3 1 80.76 80.70 80.52 80.49 80.76 - 81.78 84.10 87.42 89.45 97.01 - 106.75 127.80 -/ - 5 9 4 1 80.76 80.70 80.52 80.49 80.76 - 81.78 84.10 87.42 89.45 97.01 - 106.75 127.80 -/ - 5 9 5 1 80.76 80.70 80.52 80.49 80.76 - 81.78 84.10 87.42 89.45 97.01 - 106.75 127.80 -/ - 5 9 6 1 80.76 80.70 80.52 80.49 80.76 - 81.78 84.10 87.42 89.45 97.01 - 106.75 127.80 -/ - 5 9 7 1 80.76 80.70 80.52 80.49 80.76 - 81.78 84.10 87.42 89.45 97.01 - 106.75 127.80 -/ - 5 9 8 1 80.76 80.70 80.52 80.49 80.76 - 81.78 84.10 87.42 89.45 97.01 - 106.75 127.80 -/ - 5 9 9 1 80.76 80.70 80.52 80.49 80.76 - 81.78 84.10 87.42 89.45 97.01 - 106.75 127.80 -/ - 6 1 1 1 80.30 78.05 75.67 73.82 71.68 - 71.77 75.63 82.80 87.09 101.98 - 117.30 145.68 -/ - 6 1 2 1 80.14 77.60 74.97 73.02 70.88 - 71.16 75.61 83.42 88.06 103.36 - 117.95 146.35 -/ - 6 1 3 1 79.59 75.58 72.05 69.82 67.95 - 69.36 77.07 87.17 91.48 106.58 - 123.68 151.98 -/ - 6 1 4 1 79.04 73.82 69.77 67.56 66.27 - 69.57 79.15 89.30 94.83 92.86 - 103.08 125.97 -/ - 6 1 5 1 76.10 66.89 63.19 62.64 65.10 - 72.29 84.01 97.21 104.38 127.80 - 153.74 202.31 -/ - 6 1 6 1 74.44 64.37 61.76 62.31 66.90 - 77.75 95.06 114.97 125.67 160.07 - 197.49 267.14 -/ - 6 1 7 1 72.31 62.15 60.99 62.88 71.63 - 88.59 115.76 146.00 161.90 212.54 - 267.75 372.67 -/ - 6 1 8 1 61.27 65.56 92.42 124.54 194.25 - 309.36 488.03 705.32 830.92 1275.03 - 1826.50 2173.60 -/ - 6 1 9 1 58.12 91.03 156.07 226.58 383.71 - 673.61 1181.41 1832.14 2166.12 2192.42 - 2213.47 2268.25 -/ - 6 2 1 1 81.02 78.82 76.50 74.70 72.58 - 72.57 76.25 82.93 87.05 101.58 - 116.53 145.58 -/ - 6 2 2 1 80.80 78.40 75.83 73.91 71.76 - 71.92 75.96 83.39 87.82 103.19 - 118.29 147.06 -/ - 6 2 3 1 80.27 76.47 72.98 70.74 68.76 - 69.89 76.88 86.90 91.97 105.55 - 122.78 154.60 -/ - 6 2 4 1 79.77 74.78 70.73 68.44 66.93 - 69.53 78.98 88.57 93.94 99.16 - 105.14 134.35 -/ - 6 2 5 1 77.02 67.89 63.86 63.04 65.31 - 71.34 82.03 93.82 100.19 121.09 - 144.40 188.28 -/ - 6 2 6 1 75.44 65.26 62.22 62.31 66.18 - 75.88 91.19 108.84 118.35 149.17 - 182.85 245.48 -/ - 6 2 7 1 73.38 62.84 61.18 62.57 70.03 - 84.89 108.84 135.83 150.11 195.58 - 245.05 338.08 -/ - 6 2 8 1 62.00 63.74 86.77 115.15 177.22 - 279.04 434.30 619.41 725.18 1099.89 - 1559.28 2459.04 -/ - 6 2 9 1 58.95 85.34 142.87 205.52 343.41 - 591.97 1021.33 1566.09 1883.38 2469.31 - 2442.09 2467.25 -/ - 6 3 1 1 81.81 79.62 77.40 75.67 73.58 - 73.49 77.02 83.19 87.13 101.25 - 115.80 144.27 -/ - 6 3 2 1 81.54 79.22 76.76 74.90 72.76 - 72.80 76.56 83.45 87.67 102.61 - 117.94 147.77 -/ - 6 3 3 1 80.97 77.41 74.01 71.78 69.70 - 70.58 76.77 86.21 91.85 105.06 - 121.02 151.64 -/ - 6 3 4 1 80.51 75.81 71.80 69.47 67.74 - 69.72 78.41 88.22 93.11 109.95 - 117.01 144.93 -/ - 6 3 5 1 77.98 69.02 64.68 63.54 65.01 - 71.54 80.22 90.75 96.36 114.75 - 135.45 174.59 -/ - 6 3 6 1 76.49 66.29 62.79 62.56 65.65 - 74.17 87.63 103.03 111.38 138.54 - 168.46 224.22 -/ - 6 3 7 1 74.53 63.69 61.53 62.67 68.58 - 81.48 102.25 125.91 138.54 178.87 - 222.72 304.60 -/ - 6 3 8 1 62.88 62.13 81.36 105.94 160.46 - 249.54 383.26 539.09 627.14 937.39 - 1314.77 2108.53 -/ - 6 3 9 1 59.49 79.90 129.87 184.84 304.51 - 515.19 871.54 1320.79 1580.84 2503.96 - 2878.10 2842.60 -/ - 6 4 1 1 82.67 80.44 78.36 76.73 74.72 - 74.60 77.99 83.63 87.38 101.01 - 115.12 142.95 -/ - 6 4 2 1 82.36 80.08 77.76 75.99 73.89 - 73.82 77.40 83.67 87.68 102.11 - 116.94 146.01 -/ - 6 4 3 1 81.68 78.40 75.15 72.96 70.80 - 71.42 76.79 85.64 90.90 106.34 - 121.23 152.10 -/ - 6 4 4 1 81.27 76.90 73.01 70.65 68.73 - 70.15 77.94 88.79 93.26 108.22 - 126.66 156.47 -/ - 6 4 5 1 78.97 70.31 65.69 64.23 65.01 - 71.66 78.59 88.02 92.94 108.90 - 127.00 161.42 -/ - 6 4 6 1 77.60 67.51 63.55 62.99 65.47 - 72.62 84.44 97.67 104.86 128.35 - 154.43 203.39 -/ - 6 4 7 1 75.75 64.73 62.02 62.66 67.29 - 78.41 96.08 116.39 127.30 162.46 - 200.77 272.03 -/ - 6 4 8 1 63.96 60.79 76.27 96.99 143.99 - 220.81 334.51 464.08 536.25 787.08 - 1092.98 1725.54 -/ - 6 4 9 1 60.07 74.74 117.13 164.53 266.93 - 443.16 733.31 1096.42 1304.51 2041.64 - 2944.85 3473.00 -/ - 6 5 1 1 84.65 82.19 80.49 79.15 77.40 - 77.22 80.73 85.16 88.58 100.87 - 114.10 140.40 -/ - 6 5 2 1 84.30 81.91 80.01 78.53 76.65 - 76.63 79.92 84.94 88.43 101.42 - 115.22 142.53 -/ - 6 5 3 1 83.20 80.56 77.78 75.79 73.59 - 73.70 77.64 84.95 89.44 105.43 - 121.76 153.64 -/ - 6 5 4 1 82.83 79.32 75.89 73.63 71.42 - 72.06 77.48 86.55 91.94 107.90 - 123.20 155.10 -/ - 6 5 5 1 81.08 73.50 68.55 66.44 65.97 - 71.98 82.91 83.61 87.50 99.39 - 112.54 137.64 -/ - 6 5 6 1 79.99 70.71 65.92 64.44 65.29 - 72.61 79.17 88.83 93.86 110.17 - 128.64 163.83 -/ - 6 5 7 1 78.47 67.67 63.64 63.15 65.75 - 73.27 85.57 99.35 106.83 131.28 - 158.42 209.36 -/ - 6 5 8 1 66.98 59.89 67.61 80.47 112.12 - 165.48 242.95 328.18 374.11 527.45 - 708.76 1080.44 -/ - 6 5 9 1 61.98 65.78 92.84 125.18 195.40 - 311.59 491.57 706.69 829.19 1256.15 - 1772.10 2835.01 -/ - 6 6 1 1 87.07 84.46 82.99 82.03 81.08 - 81.67 83.86 87.14 89.13 101.88 - 113.95 138.39 -/ - 6 6 2 1 86.78 84.07 82.59 81.53 80.30 - 80.75 83.03 86.42 88.47 101.91 - 114.40 139.52 -/ - 6 6 3 1 85.51 83.00 81.01 79.50 77.59 - 77.57 80.94 86.05 89.61 103.03 - 117.41 145.76 -/ - 6 6 4 1 84.71 82.14 79.56 77.70 75.52 - 75.46 79.14 85.63 89.87 105.40 - 121.24 152.50 -/ - 6 6 5 1 83.34 77.75 73.17 70.66 68.84 - 70.97 80.26 91.30 96.08 113.95 - 118.01 145.55 -/ - 6 6 6 1 82.62 75.39 70.33 67.97 66.95 - 71.66 82.16 94.39 97.52 97.56 - 109.20 131.10 -/ - 6 6 7 1 81.58 72.49 67.36 65.53 65.82 - 73.36 83.60 87.01 91.57 105.89 - 121.92 152.64 -/ - 6 6 8 1 71.91 61.05 61.92 67.76 83.72 - 113.38 158.13 206.58 232.13 314.54 - 406.48 584.21 -/ - 6 6 9 1 65.98 60.27 71.93 88.77 128.43 - 193.89 289.83 397.37 456.08 654.49 - 889.89 1363.82 -/ - 6 7 1 1 87.69 85.25 83.83 82.98 82.35 - 83.04 85.17 88.34 90.28 102.40 - 114.11 138.04 -/ - 6 7 2 1 87.46 84.83 83.38 82.44 81.57 - 82.21 84.39 87.65 89.63 102.33 - 114.43 138.94 -/ - 6 7 3 1 86.30 83.66 81.92 80.58 78.84 - 78.71 82.32 87.09 90.20 102.81 - 116.61 143.91 -/ - 6 7 4 1 85.44 82.91 80.64 78.97 76.91 - 76.79 80.30 86.00 89.88 104.33 - 119.53 149.41 -/ - 6 7 5 1 83.93 79.03 74.76 72.25 70.25 - 71.55 79.35 90.61 96.62 111.19 - 130.41 166.52 -/ - 6 7 6 1 83.31 76.88 71.98 69.48 67.98 - 71.14 81.91 92.54 98.46 102.12 - 106.17 125.22 -/ - 6 7 7 1 82.42 74.15 68.94 66.78 66.35 - 72.74 84.28 86.18 88.91 101.41 - 114.96 140.84 -/ - 6 7 8 1 73.61 61.81 61.95 65.46 77.97 - 101.50 138.06 178.00 199.03 266.51 - 341.08 483.08 -/ - 6 7 9 1 67.64 60.18 67.87 80.79 112.59 - 166.31 244.49 330.71 377.23 532.06 - 712.54 1075.32 -/ - 6 8 1 1 89.57 88.42 87.54 87.15 87.08 - 87.86 89.96 93.06 94.95 104.75 - 115.32 137.57 -/ - 6 8 2 1 89.48 88.17 87.19 86.76 86.66 - 87.43 89.52 92.56 94.43 104.61 - 115.34 137.85 -/ - 6 8 3 1 89.05 86.89 85.57 84.91 84.66 - 85.39 87.46 90.53 92.41 104.06 - 115.64 139.39 -/ - 6 8 4 1 88.61 85.89 84.45 83.56 82.85 - 83.56 85.73 88.98 90.95 103.80 - 116.18 141.14 -/ - 6 8 5 1 86.28 83.55 81.06 79.27 77.12 - 77.01 80.64 86.79 90.95 106.51 - 122.62 154.14 -/ - 6 8 6 1 85.56 82.39 79.20 77.05 74.72 - 74.93 79.17 87.32 92.33 110.39 - 128.39 162.19 -/ - 6 8 7 1 85.13 80.80 76.83 74.37 72.17 - 72.96 79.25 89.56 95.72 113.57 - 128.35 163.90 -/ - 6 8 8 1 80.50 68.43 64.15 63.67 66.60 - 74.75 88.18 102.64 110.34 135.38 - 163.18 215.60 -/ - 6 8 9 1 76.03 63.14 61.87 63.99 73.61 - 91.53 119.61 151.06 167.73 221.19 - 280.09 391.46 -/ - 6 9 1 1 90.78 90.71 90.53 90.50 90.77 - 91.79 94.11 97.43 99.46 107.02 - 116.75 137.79 -/ - 6 9 2 1 90.78 90.71 90.53 90.50 90.77 - 91.79 94.11 97.43 99.46 107.02 - 116.75 137.79 -/ - 6 9 3 1 90.78 90.71 90.53 90.50 90.77 - 91.79 94.11 97.43 99.46 107.02 - 116.75 137.79 -/ - 6 9 4 1 90.78 90.71 90.53 90.50 90.77 - 91.79 94.11 97.43 99.46 107.02 - 116.75 137.79 -/ - 6 9 5 1 90.78 90.71 90.53 90.50 90.77 - 91.79 94.11 97.43 99.46 107.02 - 116.75 137.79 -/ - 6 9 6 1 90.78 90.71 90.53 90.50 90.77 - 91.79 94.11 97.43 99.46 107.02 - 116.75 137.79 -/ - 6 9 7 1 90.78 90.71 90.53 90.50 90.77 - 91.79 94.11 97.43 99.46 107.02 - 116.75 137.79 -/ - 6 9 8 1 90.78 90.71 90.53 90.50 90.77 - 91.79 94.11 97.43 99.46 107.02 - 116.75 137.79 -/ - 6 9 9 1 90.78 90.71 90.53 90.50 90.77 - 91.79 94.11 97.43 99.46 107.02 - 116.75 137.79 -/ - 7 1 1 1 90.39 88.43 86.52 85.00 83.00 - 82.58 86.17 92.86 96.85 110.76 - 125.39 154.08 -/ - 7 1 2 1 90.07 88.05 85.90 84.25 82.18 - 81.84 86.08 93.23 97.54 112.32 - 127.85 158.08 -/ - 7 1 3 1 89.45 86.30 83.25 81.23 79.25 - 79.71 86.83 96.65 102.32 114.97 - 132.08 164.05 -/ - 7 1 4 1 89.01 84.77 81.13 79.01 77.41 - 79.65 88.86 98.33 103.53 104.53 - 112.57 144.60 -/ - 7 1 5 1 86.55 78.35 74.40 73.49 75.58 - 81.50 92.25 104.53 111.26 133.56 - 158.73 206.53 -/ - 7 1 6 1 85.13 75.79 72.68 72.70 76.45 - 86.20 102.16 120.92 131.13 164.51 - 201.28 270.33 -/ - 7 1 7 1 83.27 73.37 71.57 72.91 80.39 - 95.82 121.33 150.48 166.00 215.83 - 270.54 375.02 -/ - 7 1 8 1 72.51 74.29 98.55 129.07 197.14 - 311.26 489.37 706.28 831.84 1275.63 - 1826.86 2173.63 -/ - 7 1 9 1 69.00 97.16 159.54 228.98 385.23 - 674.53 1181.97 1832.41 2166.27 2192.43 - 2213.29 2172.16 -/ - 7 2 1 1 91.21 89.15 87.30 85.83 83.88 - 83.47 86.69 93.19 97.03 110.60 - 124.88 153.05 -/ - 7 2 2 1 90.84 88.80 86.71 85.10 83.06 - 82.65 86.74 93.39 97.52 111.93 - 127.05 156.67 -/ - 7 2 3 1 90.12 87.13 84.13 82.12 80.08 - 80.33 86.80 96.10 101.73 115.10 - 131.25 162.59 -/ - 7 2 4 1 89.71 85.67 82.05 79.90 78.14 - 79.26 88.40 98.19 102.85 117.86 - 123.84 153.71 -/ - 7 2 5 1 87.42 79.34 75.14 73.97 75.36 - 80.77 90.54 101.51 107.47 127.29 - 149.84 192.87 -/ - 7 2 6 1 86.07 76.72 73.22 72.93 75.99 - 84.59 98.69 115.22 124.28 153.99 - 186.99 248.97 -/ - 7 2 7 1 84.28 74.15 71.87 72.97 79.03 - 92.53 114.88 140.72 154.58 199.19 - 248.11 340.65 -/ - 7 2 8 1 73.33 72.77 93.34 120.08 180.41 - 281.15 435.78 620.51 726.13 1100.61 - 1559.76 2459.19 -/ - 7 2 9 1 69.84 91.92 146.70 208.17 345.09 - 593.02 1022.00 1566.47 1883.64 2469.27 - 2442.51 2468.08 -/ - 7 3 1 1 92.09 89.91 88.14 86.74 84.86 - 84.52 87.23 93.65 97.34 110.53 - 124.41 152.02 -/ - 7 3 2 1 91.69 89.58 87.58 86.04 84.05 - 83.62 87.44 93.67 97.62 111.61 - 126.28 155.24 -/ - 7 3 3 1 90.80 88.01 85.10 83.13 81.03 - 81.43 86.86 95.65 100.93 116.07 - 131.73 163.44 -/ - 7 3 4 1 90.42 86.63 83.08 80.92 79.01 - 79.79 88.03 98.92 103.42 118.17 - 135.09 162.89 -/ - 7 3 5 1 88.31 80.46 76.03 74.60 75.34 - 80.22 89.00 98.79 104.04 121.42 - 141.38 179.63 -/ - 7 3 6 1 87.06 77.79 73.91 73.31 75.80 - 83.14 95.54 109.90 117.79 143.83 - 173.01 228.06 -/ - 7 3 7 1 85.36 75.08 72.33 73.09 77.83 - 89.53 108.79 131.27 143.45 182.85 - 226.12 307.42 -/ - 7 3 8 1 74.30 71.47 88.41 111.33 164.02 - 251.89 384.91 540.37 628.25 938.24 - 1315.37 2108.81 -/ - 7 3 9 1 70.39 86.94 134.12 187.80 306.38 - 516.41 872.34 1321.29 1581.21 2504.03 - 2877.89 2843.40 -/ - 7 4 1 1 93.04 90.69 89.03 87.73 85.94 - 85.74 88.36 93.26 97.81 110.57 - 124.02 151.01 -/ - 7 4 2 1 92.62 90.38 88.51 87.07 85.16 - 84.78 87.89 94.12 97.88 111.40 - 125.58 153.80 -/ - 7 4 3 1 91.49 88.94 86.16 84.25 82.12 - 82.36 87.05 95.30 100.23 116.87 - 132.76 164.12 -/ - 7 4 4 1 91.15 87.64 84.22 82.08 80.05 - 80.49 87.75 97.84 103.96 116.74 - 134.40 167.57 -/ - 7 4 5 1 89.24 81.71 77.11 75.41 75.65 - 79.93 87.66 96.42 101.02 116.09 - 133.49 167.01 -/ - 7 4 6 1 88.09 79.03 74.78 73.85 75.97 - 81.87 92.74 105.06 111.81 134.20 - 159.50 207.68 -/ - 7 4 7 1 86.50 76.20 72.94 72.98 76.84 - 86.85 103.16 122.34 132.77 166.90 - 204.58 275.20 -/ - 7 4 8 1 75.46 70.52 83.88 102.93 147.99 - 223.48 336.38 465.54 537.57 788.08 - 1093.73 1725.98 -/ - 7 4 9 1 71.11 82.29 121.89 167.88 269.05 - 444.55 734.24 1097.05 1305.03 2041.85 - 2944.84 3473.79 -/ - 7 5 1 1 95.15 92.47 90.99 89.93 88.51 - 88.87 91.23 94.75 96.87 111.04 - 123.60 149.17 -/ - 7 5 2 1 94.76 92.11 90.57 89.39 87.74 - 87.85 90.35 94.04 98.97 111.41 - 124.53 151.06 -/ - 7 5 3 1 93.28 90.95 88.62 86.94 84.85 - 84.41 88.55 95.12 99.35 114.45 - 130.15 161.19 -/ - 7 5 4 1 92.65 89.88 86.91 84.93 82.75 - 83.01 87.77 96.24 101.32 118.59 - 134.99 167.44 -/ - 7 5 5 1 91.20 84.74 80.04 77.87 76.92 - 81.73 91.91 98.82 96.40 107.60 - 120.19 144.49 -/ - 7 5 6 1 90.29 82.17 77.36 75.65 75.93 - 80.31 88.24 97.23 101.95 117.36 - 135.12 169.42 -/ - 7 5 7 1 89.01 79.23 74.88 74.00 76.39 - 82.48 93.81 106.67 113.70 137.05 - 163.41 213.58 -/ - 7 5 8 1 78.58 70.43 76.35 87.85 117.38 - 169.09 245.52 330.19 375.92 528.87 - 709.83 1081.26 -/ - 7 5 9 1 73.34 74.52 98.97 129.72 198.30 - 313.51 492.90 707.62 830.07 1256.72 - 1772.43 2835.03 -/ - 7 6 1 1 97.38 95.04 93.60 92.83 92.32 - 93.03 95.16 98.34 100.29 112.37 - 123.93 147.86 -/ - 7 6 2 1 97.15 94.55 93.09 92.24 91.49 - 92.18 94.37 97.63 99.61 112.35 - 124.30 148.86 -/ - 7 6 3 1 95.96 93.19 91.55 90.33 88.63 - 88.67 91.24 95.00 100.23 113.09 - 126.79 154.40 -/ - 7 6 4 1 94.95 92.45 90.29 88.74 86.73 - 86.24 90.24 96.09 100.10 114.83 - 130.05 160.51 -/ - 7 6 5 1 93.29 88.65 84.52 82.17 80.15 - 81.43 89.89 101.68 106.88 122.28 - 136.43 165.40 -/ - 7 6 6 1 92.69 86.56 81.82 79.48 78.07 - 81.55 92.63 103.32 109.39 106.22 - 117.39 138.56 -/ - 7 6 7 1 91.83 83.91 78.88 76.87 76.58 - 83.43 95.11 95.78 100.07 113.60 - 129.01 158.88 -/ - 7 6 8 1 83.37 71.99 72.13 76.76 91.16 - 118.87 162.15 209.77 235.05 316.87 - 408.43 585.75 -/ - 7 6 9 1 77.64 70.51 80.11 95.36 132.97 - 196.96 292.00 399.06 457.61 655.59 - 890.80 1364.39 -/ - 7 7 1 1 97.95 95.90 94.51 93.84 93.54 - 94.25 96.35 99.48 101.41 112.90 - 124.18 147.66 -/ - 7 7 2 1 97.76 95.41 93.97 93.23 92.78 - 93.50 95.63 98.80 100.74 112.82 - 124.44 148.46 -/ - 7 7 3 1 96.78 93.83 92.37 91.30 89.83 - 90.23 92.64 96.20 98.71 113.05 - 126.23 152.86 -/ - 7 7 4 1 95.81 93.16 91.27 89.89 88.03 - 87.74 91.54 96.16 100.36 114.18 - 128.68 157.79 -/ - 7 7 5 1 93.84 89.80 85.99 83.71 81.52 - 82.36 89.23 99.79 106.18 119.91 - 138.43 173.60 -/ - 7 7 6 1 93.33 87.91 83.41 81.01 79.22 - 81.32 91.24 102.09 107.38 120.44 - 114.83 141.66 -/ - 7 7 7 1 92.59 85.46 80.47 78.23 77.31 - 82.46 93.24 103.68 97.81 109.64 - 122.64 147.72 -/ - 7 7 8 1 84.96 72.92 72.45 74.89 86.07 - 107.81 142.74 181.73 202.44 269.25 - 343.39 484.93 -/ - 7 7 9 1 79.33 70.77 76.61 88.18 117.85 - 169.92 247.06 332.73 379.06 533.48 - 713.59 1076.12 -/ - 7 8 1 1 99.67 98.76 98.00 97.66 97.64 - 98.44 100.56 103.67 105.59 115.10 - 125.46 147.52 -/ - 7 8 2 1 99.60 98.54 97.70 97.33 97.27 - 98.07 100.18 103.30 105.22 114.98 - 125.49 147.77 -/ - 7 8 3 1 99.24 97.47 96.25 95.72 95.54 - 96.30 98.37 101.42 103.29 114.50 - 125.75 149.17 -/ - 7 8 4 1 98.87 96.42 94.99 94.28 93.93 - 94.67 96.79 99.94 101.87 114.24 - 126.21 150.75 -/ - 7 8 5 1 96.65 93.83 91.72 90.22 88.25 - 88.15 91.79 97.35 101.32 116.24 - 131.66 162.42 -/ - 7 8 6 1 95.66 92.84 90.07 88.20 85.95 - 85.90 89.95 97.36 102.12 119.36 - 136.75 171.16 -/ - 7 8 7 1 95.01 91.45 87.94 85.74 83.43 - 83.87 89.40 99.10 104.94 124.65 - 139.74 175.34 -/ - 7 8 8 1 91.13 80.07 75.43 74.54 77.17 - 84.62 96.37 110.02 117.32 141.29 - 168.27 219.82 -/ - 7 8 9 1 87.24 74.48 72.46 74.08 82.30 - 98.83 125.29 155.60 171.88 224.53 - 282.92 393.76 -/ - 7 9 1 1 100.80 100.72 100.54 100.50 100.77 - 101.80 104.11 107.44 109.47 117.02 - 126.75 147.79 -/ - 7 9 2 1 100.80 100.72 100.54 100.50 100.77 - 101.80 104.11 107.44 109.47 117.02 - 126.75 147.79 -/ - 7 9 3 1 100.80 100.72 100.54 100.50 100.77 - 101.80 104.11 107.44 109.47 117.02 - 126.75 147.79 -/ - 7 9 4 1 100.80 100.72 100.54 100.50 100.77 - 101.80 104.11 107.44 109.47 117.02 - 126.75 147.79 -/ - 7 9 5 1 100.80 100.72 100.54 100.50 100.77 - 101.80 104.11 107.44 109.47 117.02 - 126.75 147.79 -/ - 7 9 6 1 100.80 100.72 100.54 100.50 100.77 - 101.80 104.11 107.44 109.47 117.02 - 126.75 147.79 -/ - 7 9 7 1 100.80 100.72 100.54 100.50 100.77 - 101.80 104.11 107.44 109.47 117.02 - 126.75 147.79 -/ - 7 9 8 1 100.80 100.72 100.54 100.50 100.77 - 101.80 104.11 107.44 109.47 117.02 - 126.75 147.79 -/ - 7 9 9 1 100.80 100.72 100.54 100.50 100.77 - 101.80 104.11 107.44 109.47 117.02 - 126.75 147.79 -/ - - -INCLUDE - 'VFPPROD2' / - - -BPR - 1 2 3 / -/ - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/VFPPROD/VFPPROD2 b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/VFPPROD/VFPPROD2 deleted file mode 100644 index 0fd7c975a9..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/VFPPROD/VFPPROD2 +++ /dev/null @@ -1,2295 +0,0 @@ -VFPPROD - --- Table Datum Depth Rate Type WFR Type GFR Type TAB Type --- ----- ----------- --------- -------- -------- -------- - 32 394 'LIQ' 'WCT' 'GOR' / - - --- 'LIQ' units - SM3/DAY - 100.0 500.0 1000.0 1500.0 2500.0 - 4000.0 6000.0 8000.0 9000.0 12000.0 -15000.0 20000.0 / - --- 'THP' units - BARSA - 16.01 21.01 26.01 31.01 41.01 - 51.01 61.01 / - --- 'WCT' units - FRACTION - 0 0.1 0.2 0.3 0.5 - 0.7 0.75 0.9 1 / - --- 'GOR' units - SM3 - 90 100 150 200 500 - 700 1000 5000 10000 / - --- 'ALQ' units - - 0 / - - 1 1 1 1 44.85 37.83 32.56 30.13 29.38 - 32.73 41.14 50.28 54.96 70.65 - 86.79 115.14 -/ - 1 1 2 1 44.55 36.91 31.55 29.29 28.93 - 32.97 41.83 51.27 56.67 72.83 - 87.66 117.32 -/ - 1 1 3 1 43.06 33.11 28.00 26.72 28.29 - 34.86 45.74 57.61 61.07 64.40 - 73.48 102.86 -/ - 1 1 4 1 41.67 30.36 26.04 25.67 28.88 - 36.96 47.90 51.87 56.16 68.61 - 81.11 103.27 -/ - 1 1 5 1 35.14 23.93 24.20 26.11 34.10 - 46.38 62.77 79.73 88.44 115.35 - 143.51 194.19 -/ - 1 1 6 1 32.10 22.99 24.45 28.76 39.54 - 55.75 78.41 101.95 113.96 151.07 - 190.19 261.47 -/ - 1 1 7 1 28.88 22.94 26.52 33.71 48.27 - 71.46 103.68 136.75 153.65 206.31 - 262.75 368.93 -/ - 1 1 8 1 21.81 42.21 78.41 115.05 188.76 - 306.15 486.18 703.92 829.68 1274.03 - 1824.52 2170.54 -/ - 1 1 9 1 22.65 77.16 149.18 222.18 381.35 - 672.35 1180.65 1830.41 2164.11 2190.56 - 2209.35 2267.10 -/ - 1 2 1 1 45.61 38.96 33.67 31.09 30.04 - 32.89 40.91 49.85 54.69 69.65 - 85.35 113.10 -/ - 1 2 2 1 45.34 38.08 32.64 30.19 29.50 - 32.99 41.59 50.90 55.65 71.64 - 88.18 117.29 -/ - 1 2 3 1 43.98 34.32 28.92 27.35 28.47 - 34.65 44.84 56.55 62.46 70.19 - 77.50 108.80 -/ - 1 2 4 1 42.69 31.52 26.76 26.04 28.68 - 36.28 48.37 55.37 55.78 66.71 - 78.50 99.23 -/ - 1 2 5 1 36.43 24.47 24.06 25.87 32.85 - 44.35 59.42 74.87 82.80 107.32 - 133.01 179.23 -/ - 1 2 6 1 33.40 23.26 24.74 27.79 37.75 - 52.55 73.07 94.45 105.39 139.19 - 174.71 239.12 -/ - 1 2 7 1 30.07 22.83 25.68 32.07 45.40 - 66.28 95.50 125.57 140.92 188.61 - 239.44 333.83 -/ - 1 2 8 1 21.76 38.98 71.42 104.55 171.02 - 275.39 432.13 617.81 723.77 1098.80 - 1557.46 2465.02 -/ - 1 2 9 1 21.95 70.10 135.14 200.55 340.69 - 590.52 1020.46 1564.51 1881.58 2444.60 - 2489.84 2462.70 -/ - 1 3 1 1 46.37 40.17 34.93 32.22 30.86 - 33.18 40.58 49.71 54.16 68.60 - 83.83 110.97 -/ - 1 3 2 1 46.13 39.32 33.89 31.27 30.24 - 33.14 41.26 50.32 55.22 70.42 - 86.43 114.80 -/ - 1 3 3 1 44.92 35.67 30.01 28.15 28.75 - 34.24 43.95 55.28 61.14 74.88 - 83.73 113.72 -/ - 1 3 4 1 43.73 32.84 27.66 26.59 28.66 - 35.79 47.38 57.89 60.45 64.90 - 76.07 95.41 -/ - 1 3 5 1 37.83 25.18 24.06 26.02 31.61 - 42.38 56.19 70.17 77.32 99.44 - 122.62 164.40 -/ - 1 3 6 1 34.84 23.65 24.71 26.93 35.97 - 49.45 67.86 87.06 96.90 127.35 - 159.27 216.99 -/ - 1 3 7 1 31.44 22.93 24.98 30.50 42.60 - 61.21 87.37 114.40 128.20 170.99 - 216.35 299.71 -/ - 1 3 8 1 21.93 35.84 64.46 94.04 153.37 - 245.33 380.70 537.43 625.52 936.13 - 1313.06 2106.22 -/ - 1 3 9 1 21.53 63.05 121.09 179.16 301.34 - 513.55 870.51 1319.32 1579.23 2501.66 - 2841.44 2842.98 -/ - 1 4 1 1 47.15 41.45 36.36 33.56 31.90 - 33.66 40.35 49.47 53.98 68.64 - 82.77 110.65 -/ - 1 4 2 1 46.94 40.66 35.32 32.57 31.18 - 33.45 40.86 50.04 54.78 69.56 - 84.58 112.20 -/ - 1 4 3 1 45.87 37.16 31.34 29.17 29.18 - 33.94 43.38 53.81 59.59 76.91 - 88.69 118.87 -/ - 1 4 4 1 44.81 34.36 28.79 27.34 28.77 - 35.33 46.14 58.33 63.73 68.63 - 73.83 103.62 -/ - 1 4 5 1 39.32 26.11 24.24 25.90 31.05 - 40.45 53.09 65.67 72.05 91.75 - 112.44 149.72 -/ - 1 4 6 1 36.44 24.23 24.43 26.26 34.12 - 46.44 62.83 79.83 88.56 115.57 - 143.93 195.07 -/ - 1 4 7 1 33.03 23.18 24.69 28.96 39.87 - 56.31 79.35 103.30 115.54 153.41 - 193.42 266.35 -/ - 1 4 8 1 22.24 32.83 57.57 83.53 135.78 - 215.88 331.45 462.01 534.55 785.63 - 1091.75 1723.49 -/ - 1 4 9 1 21.54 56.04 107.03 157.94 263.21 - 441.13 732.08 1095.53 1303.03 2039.68 - 2942.17 3469.33 -/ - 1 5 1 1 48.74 44.26 39.77 36.98 34.83 - 35.60 40.43 48.28 52.84 68.05 - 82.66 109.59 -/ - 1 5 2 1 48.59 43.61 38.83 35.99 33.95 - 35.05 40.53 48.90 53.72 68.75 - 83.40 111.44 -/ - 1 5 3 1 47.81 40.65 34.90 32.17 31.06 - 33.92 42.17 51.65 56.73 72.35 - 89.13 119.12 -/ - 1 5 4 1 47.04 38.10 32.04 29.76 29.67 - 34.34 43.91 54.30 60.22 77.91 - 90.74 122.23 -/ - 1 5 5 1 42.67 29.01 25.32 25.85 30.64 - 39.59 47.25 57.50 62.51 77.61 - 93.31 121.63 -/ - 1 5 6 1 40.17 26.31 24.39 26.14 31.37 - 40.74 53.56 66.34 72.83 92.90 - 113.98 152.05 -/ - 1 5 7 1 37.00 24.31 24.70 26.50 34.58 - 47.18 64.09 81.66 90.69 118.65 - 148.08 201.19 -/ - 1 5 8 1 23.48 27.18 44.16 62.65 100.61 - 158.26 238.30 324.86 371.25 525.58 - 707.02 1078.96 -/ - 1 5 9 1 22.14 42.38 78.81 115.67 189.89 - 308.37 489.75 705.32 827.98 1254.60 - 1770.25 2832.24 -/ - 1 6 1 1 50.46 47.44 44.08 41.72 39.50 - 39.39 42.60 48.51 52.24 65.65 - 80.71 108.26 -/ - 1 6 2 1 50.31 46.99 43.36 40.86 38.59 - 38.62 42.08 48.45 52.38 66.40 - 81.96 110.28 -/ - 1 6 3 1 49.80 44.89 40.12 37.26 35.12 - 36.05 41.26 49.58 54.42 70.12 - 85.46 113.75 -/ - 1 6 4 1 49.33 42.96 37.44 34.53 32.86 - 34.79 41.93 51.72 56.55 72.45 - 87.88 117.66 -/ - 1 6 5 1 46.49 34.46 28.70 27.46 29.51 - 36.85 48.87 62.11 65.68 66.43 - 78.03 97.90 -/ - 1 6 6 1 44.71 30.98 26.36 26.33 30.45 - 39.36 50.42 55.00 59.70 73.53 - 87.55 112.69 -/ - 1 6 7 1 42.27 27.72 24.89 25.89 31.84 - 38.89 50.90 62.54 68.38 86.25 - 104.97 138.82 -/ - 1 6 8 1 26.90 23.69 32.14 42.76 65.63 - 101.30 149.93 200.46 226.71 310.60 - 403.49 582.32 -/ - 1 6 9 1 23.00 29.95 50.95 73.37 118.78 - 187.97 286.08 394.76 453.88 652.79 - 888.47 1362.02 -/ - 1 7 1 1 51.01 48.30 45.32 43.17 41.07 - 40.85 43.84 49.24 52.65 65.34 - 79.85 106.67 -/ - 1 7 2 1 50.83 47.91 44.68 42.39 40.20 - 40.05 43.17 48.90 52.56 65.82 - 80.81 108.34 -/ - 1 7 3 1 50.31 46.08 41.76 38.98 36.74 - 37.23 41.54 49.14 53.61 69.35 - 85.38 114.08 -/ - 1 7 4 1 49.91 44.39 39.27 36.34 34.34 - 35.65 41.63 50.58 55.76 72.04 - 87.72 116.93 -/ - 1 7 5 1 47.53 36.48 30.29 28.56 29.65 - 36.11 46.77 59.60 66.05 79.00 - 81.31 113.43 -/ - 1 7 6 1 45.98 32.94 27.61 26.87 29.81 - 37.91 51.16 60.28 61.55 69.72 - 82.31 104.44 -/ - 1 7 7 1 43.83 29.39 25.57 26.16 31.12 - 40.82 47.96 58.53 63.72 79.32 - 95.45 124.55 -/ - 1 7 8 1 28.57 24.01 29.42 38.30 57.18 - 87.15 128.19 170.56 192.41 261.58 - 337.24 480.46 -/ - 1 7 9 1 23.76 27.23 44.27 62.90 101.07 - 159.08 239.81 327.37 374.35 530.21 - 710.82 1073.88 -/ - 1 8 1 1 53.43 51.26 49.55 48.43 47.46 - 48.13 50.86 54.93 57.40 67.07 - 79.09 102.89 -/ - 1 8 2 1 53.24 51.00 49.18 47.93 46.78 - 47.36 50.12 54.31 56.85 66.85 - 79.18 103.39 -/ - 1 8 3 1 52.47 50.04 47.69 45.95 44.19 - 44.17 47.06 51.88 54.77 66.40 - 80.20 106.28 -/ - 1 8 4 1 51.97 49.23 46.30 44.21 42.15 - 41.94 44.99 50.41 53.82 66.83 - 81.84 109.55 -/ - 1 8 5 1 50.73 44.88 39.58 36.61 34.64 - 36.08 42.41 51.80 57.23 74.50 - 90.92 121.71 -/ - 1 8 6 1 50.09 42.38 36.29 33.43 32.23 - 35.15 43.81 54.41 59.95 76.96 - 94.68 127.64 -/ - 1 8 7 1 49.13 39.14 32.67 30.38 30.45 - 35.66 46.22 57.51 64.10 83.46 - 101.30 137.01 -/ - 1 8 8 1 38.57 24.73 25.16 26.96 35.25 - 48.34 65.96 84.10 93.37 122.12 - 152.43 207.38 -/ - 1 8 9 1 31.17 23.74 27.14 34.33 49.50 - 73.67 107.16 141.62 159.32 214.89 - 275.06 387.80 -/ - 1 9 1 1 55.72 55.67 55.50 55.47 55.74 - 56.76 59.08 62.41 64.44 72.00 - 81.74 102.80 -/ - 1 9 2 1 55.72 55.67 55.50 55.47 55.74 - 56.76 59.08 62.41 64.44 72.00 - 81.74 102.80 -/ - 1 9 3 1 55.72 55.67 55.50 55.47 55.74 - 56.76 59.08 62.41 64.44 72.00 - 81.74 102.80 -/ - 1 9 4 1 55.72 55.67 55.50 55.47 55.74 - 56.76 59.08 62.41 64.44 72.00 - 81.74 102.80 -/ - 1 9 5 1 55.72 55.67 55.50 55.47 55.74 - 56.76 59.08 62.41 64.44 72.00 - 81.74 102.80 -/ - 1 9 6 1 55.72 55.67 55.50 55.47 55.74 - 56.76 59.08 62.41 64.44 72.00 - 81.74 102.80 -/ - 1 9 7 1 55.72 55.67 55.50 55.47 55.74 - 56.76 59.08 62.41 64.44 72.00 - 81.74 102.80 -/ - 1 9 8 1 55.72 55.67 55.50 55.47 55.74 - 56.76 59.08 62.41 64.44 72.00 - 81.74 102.80 -/ - 1 9 9 1 55.72 55.67 55.50 55.47 55.74 - 56.76 59.08 62.41 64.44 72.00 - 81.74 102.80 -/ - 2 1 1 1 50.19 44.42 39.70 37.12 35.76 - 38.00 45.59 54.58 59.17 73.89 - 89.59 117.43 -/ - 2 1 2 1 49.95 43.62 38.71 36.21 35.15 - 37.98 46.37 55.40 60.13 75.90 - 92.49 121.79 -/ - 2 1 3 1 48.70 40.17 35.03 33.20 33.72 - 39.37 49.37 60.95 66.83 70.28 - 76.13 106.62 -/ - 2 1 4 1 47.53 37.53 32.79 31.66 33.63 - 40.92 52.83 56.66 59.15 71.09 - 83.18 104.85 -/ - 2 1 5 1 41.88 30.39 29.36 31.03 37.59 - 49.04 64.64 81.11 89.64 116.18 - 144.13 194.63 -/ - 2 1 6 1 39.10 28.97 29.91 32.65 42.42 - 57.70 79.69 102.85 114.76 151.64 - 190.55 261.72 -/ - 2 1 7 1 35.98 28.24 30.59 36.81 50.38 - 72.79 104.53 137.35 154.15 206.63 - 262.99 369.05 -/ - 2 1 8 1 27.22 44.38 79.53 115.73 189.07 - 306.28 486.19 704.17 829.85 1274.17 - 1825.59 2170.64 -/ - 2 1 9 1 26.99 78.27 149.63 222.42 381.41 - 672.49 1180.78 1831.55 2164.20 2190.64 - 2209.43 2160.05 -/ - 2 2 1 1 50.91 45.46 40.78 38.11 36.54 - 38.35 45.39 54.63 59.09 73.06 - 88.30 115.57 -/ - 2 2 2 1 50.69 44.69 39.79 37.18 35.87 - 38.23 46.03 55.22 59.90 74.88 - 90.98 119.59 -/ - 2 2 3 1 49.55 41.33 36.02 33.96 34.06 - 39.08 48.77 59.93 65.70 76.36 - 83.33 114.14 -/ - 2 2 4 1 48.47 38.69 33.63 32.24 33.74 - 40.63 52.03 60.75 61.34 69.40 - 80.80 101.00 -/ - 2 2 5 1 43.09 31.09 29.56 31.18 36.53 - 47.25 61.51 76.45 84.18 108.29 - 133.73 179.72 -/ - 2 2 6 1 40.35 29.40 29.75 31.94 40.85 - 54.71 74.52 95.48 106.29 139.83 - 175.17 239.43 -/ - 2 2 7 1 37.19 28.46 30.04 35.43 47.72 - 67.78 96.46 126.25 141.51 188.98 - 239.72 333.99 -/ - 2 2 8 1 27.47 41.33 72.67 105.33 171.40 - 275.56 432.17 618.00 724.06 1098.95 - 1558.35 2465.13 -/ - 2 2 9 1 26.64 71.35 135.66 200.83 340.79 - 590.60 1020.60 1565.48 1882.73 2444.69 - 2442.89 2462.77 -/ - 2 3 1 1 51.64 46.56 41.98 39.26 37.49 - 38.91 45.25 54.28 58.82 73.36 - 87.51 114.59 -/ - 2 3 2 1 51.44 45.83 41.00 38.31 36.75 - 38.61 45.75 55.14 59.67 73.85 - 89.41 117.30 -/ - 2 3 3 1 50.42 42.60 37.17 34.90 34.56 - 38.87 48.41 58.73 64.49 80.15 - 89.24 120.33 -/ - 2 3 4 1 49.43 39.99 34.64 32.97 33.95 - 40.31 51.02 63.14 66.15 67.80 - 78.60 97.42 -/ - 2 3 5 1 44.38 31.96 29.79 30.99 35.50 - 45.51 58.54 71.97 78.91 100.57 - 123.48 164.97 -/ - 2 3 6 1 41.73 29.98 29.58 31.40 39.25 - 51.86 69.53 88.26 97.94 128.06 - 159.83 217.32 -/ - 2 3 7 1 38.57 28.76 29.86 34.09 45.18 - 62.92 88.46 115.20 128.89 171.42 - 216.64 299.92 -/ - 2 3 8 1 27.82 38.40 65.87 94.95 153.83 - 245.55 380.77 537.42 625.73 936.30 - 1313.80 2106.33 -/ - 2 3 9 1 26.63 64.47 121.71 179.51 301.48 - 513.55 870.66 1320.14 1580.19 2501.75 - 2843.76 2840.23 -/ - 2 4 1 1 52.38 47.72 43.31 40.58 38.62 - 39.68 45.25 53.77 58.66 73.59 - 87.19 114.45 -/ - 2 4 2 1 52.21 47.04 42.36 39.62 37.82 - 39.23 45.57 54.67 59.54 73.99 - 88.33 116.90 -/ - 2 4 3 1 51.30 43.99 38.53 36.04 35.29 - 38.80 48.01 57.57 63.03 79.91 - 94.81 125.17 -/ - 2 4 4 1 50.41 41.44 35.87 33.90 34.29 - 39.83 49.80 61.71 67.71 74.51 - 78.97 109.43 -/ - 2 4 5 1 45.76 33.06 30.18 30.82 36.40 - 43.77 55.75 67.76 73.92 93.12 - 113.49 150.44 -/ - 2 4 6 1 43.23 30.76 29.61 31.36 37.68 - 49.16 64.77 81.26 89.81 116.44 - 144.58 195.51 -/ - 2 4 7 1 40.12 29.18 30.22 32.88 42.76 - 58.28 80.64 104.21 116.34 153.98 - 193.78 266.61 -/ - 2 4 8 1 28.30 35.66 59.17 84.59 136.34 - 216.15 331.56 462.04 534.54 786.05 - 1091.91 1724.39 -/ - 2 4 9 1 27.12 57.67 107.77 158.36 263.38 - 441.17 732.30 1095.67 1303.81 2039.78 - 2942.25 3469.41 -/ - 2 5 1 1 53.89 50.23 46.42 43.84 41.65 - 41.96 45.93 53.16 57.45 72.52 - 87.65 115.02 -/ - 2 5 2 1 53.76 49.68 45.59 42.90 40.76 - 41.32 45.82 53.58 58.14 73.55 - 88.19 115.59 -/ - 2 5 3 1 53.11 47.14 42.01 39.22 37.61 - 39.46 46.73 56.71 61.38 76.36 - 92.23 121.75 -/ - 2 5 4 1 52.46 44.91 39.25 36.68 35.85 - 39.28 48.68 58.34 63.71 80.99 - 97.02 128.73 -/ - 2 5 5 1 48.78 36.25 31.78 31.45 35.29 - 44.26 50.50 60.31 65.12 79.66 - 94.95 122.82 -/ - 2 5 6 1 46.64 33.30 30.34 31.04 36.72 - 44.07 56.23 68.46 74.73 94.28 - 115.03 152.78 -/ - 2 5 7 1 43.86 30.84 29.76 31.53 38.11 - 49.87 66.00 83.08 91.92 119.50 - 148.70 201.61 -/ - 2 5 8 1 30.00 30.82 46.29 64.14 101.48 - 158.72 238.54 324.99 371.33 525.58 - 707.44 1079.14 -/ - 2 5 9 1 27.58 44.58 79.94 116.35 190.21 - 308.50 489.76 705.57 828.14 1255.31 - 1771.21 2832.33 -/ - 2 6 1 1 55.67 53.04 50.25 48.17 46.12 - 45.90 48.91 54.27 57.74 70.55 - 85.03 111.98 -/ - 2 6 2 1 55.49 52.67 49.62 47.41 45.27 - 45.12 48.25 53.99 57.69 71.10 - 86.10 113.83 -/ - 2 6 3 1 54.96 50.89 46.80 44.11 41.92 - 42.37 46.67 54.41 58.99 75.15 - 90.48 119.24 -/ - 2 6 4 1 54.56 49.25 44.39 41.55 39.58 - 40.80 46.84 56.05 61.37 77.70 - 92.57 122.81 -/ - 2 6 5 1 52.18 41.67 35.74 33.93 34.87 - 41.43 52.49 65.44 71.58 71.26 - 80.73 100.08 -/ - 2 6 6 1 50.68 38.30 33.09 32.18 34.94 - 43.28 55.96 58.11 62.66 76.00 - 89.60 114.23 -/ - 2 6 7 1 48.61 34.88 31.09 31.29 36.19 - 44.13 53.90 65.04 70.65 87.97 - 106.30 139.75 -/ - 2 6 8 1 34.07 29.03 35.33 45.14 67.10 - 102.20 150.48 200.79 227.00 310.76 - 403.57 582.30 -/ - 2 6 9 1 29.32 33.19 52.81 74.64 119.48 - 188.32 286.24 394.83 453.92 653.10 - 888.64 1362.67 -/ - 2 7 1 1 56.27 53.80 51.33 49.46 47.56 - 47.37 50.30 55.31 58.38 70.51 - 84.44 110.67 -/ - 2 7 2 1 56.06 53.47 50.78 48.77 46.76 - 46.54 49.53 54.79 58.15 70.81 - 85.24 112.17 -/ - 2 7 3 1 55.44 51.93 48.25 45.73 43.50 - 43.64 47.35 54.25 58.47 73.58 - 89.95 118.66 -/ - 2 7 4 1 55.10 50.49 46.05 43.25 41.13 - 41.86 46.84 55.22 60.15 76.93 - 92.66 122.32 -/ - 2 7 5 1 53.09 43.56 37.48 35.26 35.32 - 40.61 51.13 63.02 69.37 84.77 - 87.66 119.45 -/ - 2 7 6 1 51.80 40.25 34.52 33.11 34.86 - 42.36 54.77 65.99 67.39 72.54 - 84.75 106.34 -/ - 2 7 7 1 49.98 36.67 32.05 31.75 35.79 - 45.11 52.46 61.40 66.39 81.44 - 97.14 125.77 -/ - 2 7 8 1 35.88 29.06 33.04 41.07 58.97 - 88.25 128.89 171.01 192.79 261.82 - 337.38 480.50 -/ - 2 7 9 1 30.34 30.92 46.44 64.41 101.95 - 159.54 240.05 327.50 374.44 530.20 - 711.26 1074.05 -/ - 2 8 1 1 58.76 56.63 55.13 54.21 53.53 - 54.10 57.08 60.99 63.37 72.72 - 84.38 107.79 -/ - 2 8 2 1 58.57 56.35 54.76 53.72 52.89 - 53.69 56.41 60.42 62.86 72.50 - 84.44 108.22 -/ - 2 8 3 1 57.76 55.36 53.41 51.90 50.29 - 50.64 53.56 58.09 60.82 71.91 - 85.19 110.73 -/ - 2 8 4 1 57.22 54.69 52.23 50.39 48.52 - 48.39 51.40 56.46 59.56 72.04 - 86.51 113.64 -/ - 2 8 5 1 55.93 51.01 46.38 43.52 41.40 - 42.26 47.57 56.38 61.57 79.43 - 95.91 127.14 -/ - 2 8 6 1 55.39 48.86 43.39 40.48 38.81 - 40.75 48.41 59.08 64.85 81.60 - 97.84 130.35 -/ - 2 8 7 1 54.57 46.02 39.92 37.30 36.60 - 40.53 50.85 61.80 67.52 86.49 - 106.81 142.35 -/ - 2 8 8 1 45.53 31.31 30.19 32.10 38.81 - 51.19 68.04 85.63 94.71 123.04 - 153.10 207.79 -/ - 2 8 9 1 38.59 28.93 31.29 37.62 51.82 - 75.11 108.06 142.28 159.88 215.22 - 275.30 387.91 -/ - 2 9 1 1 60.73 60.68 60.50 60.47 60.74 - 61.77 64.08 67.41 69.44 77.00 - 86.74 107.80 -/ - 2 9 2 1 60.73 60.68 60.50 60.47 60.74 - 61.77 64.08 67.41 69.44 77.00 - 86.74 107.80 -/ - 2 9 3 1 60.73 60.68 60.50 60.47 60.74 - 61.77 64.08 67.41 69.44 77.00 - 86.74 107.80 -/ - 2 9 4 1 60.73 60.68 60.50 60.47 60.74 - 61.77 64.08 67.41 69.44 77.00 - 86.74 107.80 -/ - 2 9 5 1 60.73 60.68 60.50 60.47 60.74 - 61.77 64.08 67.41 69.44 77.00 - 86.74 107.80 -/ - 2 9 6 1 60.73 60.68 60.50 60.47 60.74 - 61.77 64.08 67.41 69.44 77.00 - 86.74 107.80 -/ - 2 9 7 1 60.73 60.68 60.50 60.47 60.74 - 61.77 64.08 67.41 69.44 77.00 - 86.74 107.80 -/ - 2 9 8 1 60.73 60.68 60.50 60.47 60.74 - 61.77 64.08 67.41 69.44 77.00 - 86.74 107.80 -/ - 2 9 9 1 60.73 60.68 60.50 60.47 60.74 - 61.77 64.08 67.41 69.44 77.00 - 86.74 107.80 -/ - 3 1 1 1 55.36 50.53 46.35 43.75 42.05 - 43.49 50.21 59.54 64.02 77.51 - 92.74 120.09 -/ - 3 1 2 1 55.15 49.81 45.41 42.83 41.35 - 43.31 50.83 60.14 64.60 79.36 - 95.50 124.28 -/ - 3 1 3 1 54.11 46.68 41.75 39.58 39.31 - 43.99 53.51 64.60 70.28 76.97 - 83.61 114.22 -/ - 3 1 4 1 53.09 44.19 39.37 37.72 38.85 - 45.54 56.74 63.21 62.51 74.03 - 85.74 106.91 -/ - 3 1 5 1 48.13 36.75 34.97 36.31 41.51 - 52.20 67.01 82.95 91.27 117.37 - 145.05 195.29 -/ - 3 1 6 1 45.59 34.96 34.83 37.01 45.80 - 60.16 81.39 104.11 115.86 152.45 - 191.21 262.14 -/ - 3 1 7 1 42.63 33.87 35.15 40.45 53.04 - 74.55 105.71 138.21 154.92 207.17 - 263.36 369.30 -/ - 3 1 8 1 32.89 47.08 80.98 116.65 189.56 - 306.52 486.29 704.16 830.02 1274.37 - 1825.77 2172.38 -/ - 3 1 9 1 31.78 79.69 150.27 222.78 381.57 - 672.49 1180.95 1831.70 2165.59 2190.75 - 2209.53 2160.15 -/ - 3 2 1 1 56.06 51.50 47.38 44.74 42.91 - 44.07 50.15 59.08 63.91 77.59 - 91.59 119.36 -/ - 3 2 2 1 55.87 50.81 46.45 43.81 42.15 - 43.70 50.64 60.21 64.52 78.51 - 94.14 122.25 -/ - 3 2 3 1 54.91 47.79 42.77 40.43 39.85 - 43.84 53.31 63.62 69.28 82.62 - 90.31 119.73 -/ - 3 2 4 1 53.97 45.33 40.27 38.44 39.08 - 45.31 55.91 66.98 67.95 72.52 - 83.56 103.26 -/ - 3 2 5 1 49.27 37.55 35.23 36.10 40.62 - 50.60 64.11 78.49 86.01 109.64 - 134.78 180.50 -/ - 3 2 6 1 46.80 35.52 34.77 36.56 44.40 - 57.39 76.43 96.90 107.54 140.73 - 175.88 239.91 -/ - 3 2 7 1 43.84 34.20 35.00 39.27 50.59 - 69.74 97.76 127.23 142.36 189.60 - 240.16 334.29 -/ - 3 2 8 1 33.25 44.23 74.30 106.38 171.96 - 275.84 432.30 618.03 724.05 1099.40 - 1558.55 2457.93 -/ - 3 2 9 1 31.72 72.94 136.39 201.26 340.98 - 590.64 1020.83 1565.64 1882.89 2466.76 - 2441.74 2462.87 -/ - 3 3 1 1 56.77 52.51 48.51 45.88 43.91 - 44.79 50.21 58.68 63.58 78.03 - 92.08 119.51 -/ - 3 3 2 1 56.60 51.87 47.61 44.93 43.11 - 44.33 50.52 59.61 64.53 78.44 - 92.72 121.14 -/ - 3 3 3 1 55.73 48.99 43.93 41.44 40.54 - 43.80 53.19 62.48 68.15 85.05 - 95.84 125.67 -/ - 3 3 4 1 54.87 46.58 41.35 39.29 39.43 - 44.87 54.89 66.75 72.40 71.09 - 81.58 103.97 -/ - 3 3 5 1 50.49 38.53 35.62 36.05 40.31 - 49.04 61.40 74.27 80.98 102.13 - 124.71 165.87 -/ - 3 3 6 1 48.10 36.24 34.94 36.47 42.98 - 54.79 71.68 89.89 99.38 129.11 - 160.64 217.94 -/ - 3 3 7 1 45.19 34.61 35.38 38.17 48.29 - 65.12 89.95 116.29 129.86 172.14 - 217.20 300.29 -/ - 3 3 8 1 33.72 41.55 67.71 96.15 154.49 - 245.88 380.94 537.49 625.76 936.63 - 1314.00 2107.53 -/ - 3 3 9 1 32.04 66.27 122.55 180.01 301.71 - 513.63 870.80 1320.31 1580.35 2503.24 - 2843.87 2910.90 -/ - 3 4 1 1 57.49 53.57 49.75 47.16 45.09 - 45.68 50.41 58.37 63.02 78.37 - 91.92 119.56 -/ - 3 4 2 1 57.34 52.98 48.89 46.22 44.25 - 45.13 50.55 59.10 64.05 79.16 - 92.97 120.90 -/ - 3 4 3 1 56.56 50.28 45.28 42.65 41.41 - 43.98 52.51 62.30 67.06 83.29 - 101.06 131.63 -/ - 3 4 4 1 55.79 47.97 42.63 40.33 39.97 - 44.52 54.31 65.39 71.24 81.21 - 85.48 115.53 -/ - 3 4 5 1 51.77 39.73 36.18 36.25 40.57 - 47.46 58.86 70.35 76.28 94.94 - 114.93 151.51 -/ - 3 4 6 1 49.51 37.17 35.23 36.60 41.63 - 52.36 67.20 83.16 91.48 117.67 - 145.53 196.20 -/ - 3 4 7 1 46.68 35.20 35.14 37.24 46.14 - 60.76 82.36 105.48 117.46 154.79 - 194.45 267.02 -/ - 3 4 8 1 34.35 39.10 61.23 85.99 137.12 - 216.56 331.78 462.15 534.61 786.02 - 1092.44 1724.59 -/ - 3 4 9 1 32.66 59.73 108.76 158.96 263.68 - 441.28 732.29 1095.85 1303.99 2041.01 - 2942.37 3469.51 -/ - 3 5 1 1 58.96 55.87 52.62 50.26 48.08 - 48.13 51.66 58.26 62.31 76.79 - 92.20 119.59 -/ - 3 5 2 1 58.84 55.39 51.87 49.39 47.22 - 47.45 51.31 58.51 62.83 78.12 - 93.31 121.18 -/ - 3 5 3 1 58.27 53.17 48.61 45.84 43.99 - 45.25 51.56 60.99 66.44 81.13 - 95.66 125.80 -/ - 3 5 4 1 57.70 51.19 46.00 43.30 42.00 - 44.52 53.07 63.21 68.09 84.44 - 102.61 135.40 -/ - 3 5 5 1 54.54 43.05 38.18 37.17 39.89 - 48.42 56.09 63.55 68.18 82.20 - 97.08 124.46 -/ - 3 5 6 1 52.68 40.00 36.35 36.44 40.98 - 47.78 59.37 71.08 77.11 96.12 - 116.49 153.87 -/ - 3 5 7 1 50.20 37.25 35.36 36.91 42.05 - 53.06 68.43 84.95 93.57 120.72 - 149.64 202.28 -/ - 3 5 8 1 36.43 35.00 48.98 66.06 102.65 - 159.39 238.91 325.23 371.53 525.66 - 707.45 1079.81 -/ - 3 5 9 1 33.31 47.31 81.39 117.27 190.69 - 308.74 489.85 705.57 828.32 1255.50 - 1771.38 2833.83 -/ - 3 6 1 1 60.89 58.43 56.07 54.23 52.34 - 52.16 55.15 60.17 63.33 75.63 - 89.59 116.00 -/ - 3 6 2 1 60.67 58.10 55.52 53.55 51.55 - 51.34 54.39 59.68 63.15 76.03 - 90.50 117.70 -/ - 3 6 3 1 60.03 56.56 53.01 50.54 48.34 - 48.51 52.30 59.44 63.79 79.35 - 95.82 125.11 -/ - 3 6 4 1 59.68 55.12 50.85 48.11 46.02 - 46.78 51.98 60.66 65.75 82.70 - 97.56 128.29 -/ - 3 6 5 1 57.63 48.33 42.52 40.32 40.41 - 45.97 56.52 69.11 75.46 78.01 - 83.86 102.76 -/ - 3 6 6 1 56.34 45.12 39.67 38.15 39.97 - 47.70 60.55 63.06 66.01 78.93 - 92.13 116.25 -/ - 3 6 7 1 54.54 41.69 37.30 36.88 41.06 - 50.24 57.30 68.02 73.42 90.16 - 108.08 141.10 -/ - 3 6 8 1 40.92 34.33 39.08 48.09 69.02 - 103.43 151.26 201.33 227.44 311.05 - 403.76 582.37 -/ - 3 6 9 1 35.60 37.01 55.16 76.28 120.42 - 188.84 286.53 395.00 454.04 653.13 - 889.03 1362.87 -/ - 3 7 1 1 61.51 59.11 57.04 55.39 53.58 - 53.67 56.63 61.33 64.17 75.80 - 89.22 114.92 -/ - 3 7 2 1 61.28 58.83 56.56 54.78 52.93 - 52.80 55.80 60.74 63.80 75.98 - 89.88 116.29 -/ - 3 7 3 1 60.52 57.49 54.33 52.03 49.86 - 49.81 53.20 59.54 63.55 78.11 - 93.98 123.49 -/ - 3 7 4 1 60.18 56.24 52.36 49.75 47.57 - 47.95 52.21 60.08 64.79 81.50 - 97.88 126.84 -/ - 3 7 5 1 58.45 50.08 44.30 41.78 41.20 - 45.40 55.93 66.75 73.04 91.39 - 95.26 125.74 -/ - 3 7 6 1 57.34 47.00 41.23 39.34 40.20 - 47.07 58.61 71.88 73.88 75.76 - 87.64 108.73 -/ - 3 7 7 1 55.77 43.52 38.47 37.46 40.35 - 49.22 58.74 64.67 69.51 84.04 - 99.33 127.45 -/ - 3 7 8 1 42.78 34.09 37.16 44.40 61.26 - 89.71 129.85 171.70 193.38 262.19 - 337.66 480.64 -/ - 3 7 9 1 36.83 35.15 49.17 66.35 103.12 - 160.21 240.42 327.74 374.63 530.29 - 711.26 1074.73 -/ - 3 8 1 1 64.00 61.97 60.63 59.86 59.42 - 60.12 62.18 66.05 68.02 78.24 - 89.62 112.73 -/ - 3 8 2 1 63.84 61.67 60.25 59.37 58.79 - 59.44 62.39 66.27 68.43 78.03 - 89.67 113.12 -/ - 3 8 3 1 63.06 60.60 58.90 57.57 56.25 - 56.84 59.75 64.08 66.70 77.38 - 90.25 115.35 -/ - 3 8 4 1 62.47 59.97 57.89 56.26 54.46 - 54.61 57.66 62.44 65.32 77.35 - 91.32 117.95 -/ - 3 8 5 1 61.03 56.78 52.71 50.02 47.83 - 48.32 52.89 61.19 66.17 83.99 - 101.17 131.65 -/ - 3 8 6 1 60.55 54.90 49.99 47.09 45.19 - 46.55 53.25 63.40 69.32 86.57 - 102.77 134.57 -/ - 3 8 7 1 59.85 52.38 46.72 43.93 42.73 - 45.69 55.18 66.45 71.91 89.88 - 109.84 146.42 -/ - 3 8 8 1 51.95 37.77 35.76 37.46 42.77 - 54.50 70.64 87.65 96.49 124.34 - 154.09 208.50 -/ - 3 8 9 1 45.49 34.62 35.96 41.40 54.67 - 77.01 109.30 143.18 160.67 215.77 - 275.66 388.16 -/ - 3 9 1 1 65.73 65.68 65.51 65.47 65.75 - 66.77 69.09 72.41 74.44 82.00 - 91.74 112.80 -/ - 3 9 2 1 65.73 65.68 65.51 65.47 65.75 - 66.77 69.09 72.41 74.44 82.00 - 91.74 112.80 -/ - 3 9 3 1 65.73 65.68 65.51 65.47 65.75 - 66.77 69.09 72.41 74.44 82.00 - 91.74 112.80 -/ - 3 9 4 1 65.73 65.68 65.51 65.47 65.75 - 66.77 69.09 72.41 74.44 82.00 - 91.74 112.80 -/ - 3 9 5 1 65.73 65.68 65.51 65.47 65.75 - 66.77 69.09 72.41 74.44 82.00 - 91.74 112.80 -/ - 3 9 6 1 65.73 65.68 65.51 65.47 65.75 - 66.77 69.09 72.41 74.44 82.00 - 91.74 112.80 -/ - 3 9 7 1 65.73 65.68 65.51 65.47 65.75 - 66.77 69.09 72.41 74.44 82.00 - 91.74 112.80 -/ - 3 9 8 1 65.73 65.68 65.51 65.47 65.75 - 66.77 69.09 72.41 74.44 82.00 - 91.74 112.80 -/ - 3 9 9 1 65.73 65.68 65.51 65.47 65.75 - 66.77 69.09 72.41 74.44 82.00 - 91.74 112.80 -/ - 4 1 1 1 60.44 56.33 52.64 50.13 48.22 - 49.19 55.05 63.85 68.96 82.18 - 96.15 123.99 -/ - 4 1 2 1 60.26 55.69 51.75 49.20 47.46 - 48.78 55.52 64.99 69.60 83.12 - 98.79 127.07 -/ - 4 1 3 1 59.36 52.85 48.21 45.83 45.07 - 48.81 58.20 68.48 74.02 84.29 - 91.06 120.23 -/ - 4 1 4 1 58.48 50.52 45.76 43.83 44.20 - 50.27 60.80 70.11 68.11 77.31 - 88.68 109.36 -/ - 4 1 5 1 54.07 42.98 40.59 41.24 45.75 - 55.72 69.81 85.18 93.27 118.88 - 146.26 196.21 -/ - 4 1 6 1 51.74 40.93 39.99 41.72 49.53 - 63.07 83.49 105.70 117.28 153.51 - 192.08 262.79 -/ - 4 1 7 1 48.96 39.53 40.13 44.47 56.15 - 76.72 107.18 139.35 155.92 207.90 - 263.93 369.69 -/ - 4 1 8 1 38.57 50.22 82.74 117.80 190.20 - 306.86 486.46 704.24 830.05 1274.68 - 1826.00 2172.59 -/ - 4 1 9 1 36.82 81.43 151.09 223.28 381.81 - 672.57 1181.06 1831.89 2165.78 2185.95 - 2209.67 2267.40 -/ - 4 2 1 1 61.12 57.24 53.61 51.11 49.11 - 49.85 55.13 63.55 68.44 82.76 - 96.84 124.38 -/ - 4 2 2 1 60.95 56.64 52.75 50.19 48.31 - 49.38 55.46 64.50 69.75 83.22 - 97.56 126.21 -/ - 4 2 3 1 60.13 53.91 49.22 46.73 45.71 - 48.78 58.17 67.53 73.15 89.53 - 97.31 126.98 -/ - 4 2 4 1 59.31 51.62 46.71 44.58 44.54 - 49.89 59.94 71.71 74.57 75.95 - 86.68 105.91 -/ - 4 2 5 1 55.15 43.86 40.96 41.26 45.07 - 54.28 67.14 80.95 88.23 111.34 - 136.15 181.55 -/ - 4 2 6 1 52.90 41.60 40.20 41.60 48.27 - 60.52 78.75 98.69 109.12 141.92 - 176.83 240.67 -/ - 4 2 7 1 50.15 39.94 40.49 43.47 53.91 - 72.13 99.40 128.47 143.48 190.43 - 240.80 334.71 -/ - 4 2 8 1 39.03 47.59 76.25 107.68 172.69 - 276.24 432.51 618.14 724.12 1099.35 - 1558.79 2458.16 -/ - 4 2 9 1 37.01 74.87 137.31 201.84 341.27 - 590.76 1020.80 1565.85 1883.08 2468.62 - 2441.48 2463.00 -/ - 4 3 1 1 61.81 58.19 54.68 52.21 50.14 - 50.65 55.35 63.32 67.99 83.33 - 96.89 124.70 -/ - 4 3 2 1 61.66 57.62 53.85 51.30 49.31 - 50.11 55.50 64.09 69.07 83.68 - 97.45 126.26 -/ - 4 3 3 1 60.91 55.03 50.37 47.78 46.50 - 48.97 57.59 67.09 72.07 88.53 - 103.36 132.56 -/ - 4 3 4 1 60.16 52.83 47.82 45.49 45.04 - 49.60 59.24 70.63 76.45 77.77 - 84.91 110.69 -/ - 4 3 5 1 56.30 44.91 41.48 41.49 44.59 - 52.87 64.65 76.99 83.46 104.05 - 126.27 167.07 -/ - 4 3 6 1 54.15 42.42 40.49 41.83 47.06 - 58.14 74.25 91.90 101.17 130.46 - 161.71 218.78 -/ - 4 3 7 1 51.46 40.47 40.36 42.60 51.82 - 67.76 91.80 117.69 131.11 173.09 - 217.95 300.78 -/ - 4 3 8 1 39.61 45.17 69.88 97.63 155.33 - 246.35 381.20 537.64 625.87 936.63 - 1314.44 2107.76 -/ - 4 3 9 1 37.60 68.42 123.61 180.67 302.05 - 513.78 870.81 1320.56 1580.56 2503.42 - 2845.95 2911.03 -/ - 4 4 1 1 62.51 59.19 55.85 53.44 51.32 - 51.61 55.71 63.18 67.61 83.31 - 97.52 125.00 -/ - 4 4 2 1 62.37 58.66 55.05 52.55 50.47 - 51.00 55.71 63.76 68.48 84.08 - 97.84 126.19 -/ - 4 4 3 1 61.70 56.24 51.68 49.02 47.47 - 49.34 57.10 67.12 71.83 86.97 - 104.32 135.67 -/ - 4 4 4 1 61.04 54.14 49.11 46.61 45.79 - 49.38 59.16 69.30 75.07 88.58 - 93.12 123.52 -/ - 4 4 5 1 57.50 46.16 42.18 41.79 45.15 - 51.60 62.33 73.35 79.05 97.14 - 116.74 152.92 -/ - 4 4 6 1 55.48 43.46 40.87 41.54 45.92 - 55.93 70.07 85.45 93.55 119.24 - 146.79 197.16 -/ - 4 4 7 1 52.90 41.19 40.25 41.97 49.88 - 63.69 84.48 107.09 118.89 155.87 - 195.33 267.68 -/ - 4 4 8 1 40.36 42.97 63.66 87.69 138.10 - 217.13 332.11 462.35 534.77 786.07 - 1092.40 1724.84 -/ - 4 4 9 1 38.05 62.15 109.99 159.74 264.09 - 441.48 732.35 1095.96 1304.26 2041.20 - 2944.08 3469.65 -/ - 4 5 1 1 64.04 61.33 58.51 56.37 54.26 - 54.16 57.45 63.52 67.37 81.31 - 96.25 124.36 -/ - 4 5 2 1 63.86 60.90 57.83 55.56 53.41 - 53.43 56.98 63.60 67.71 82.45 - 97.93 127.07 -/ - 4 5 3 1 63.33 58.93 54.85 52.20 50.19 - 51.03 56.59 65.52 70.73 86.59 - 101.24 131.20 -/ - 4 5 4 1 62.84 57.15 52.41 49.68 48.08 - 49.90 57.71 68.14 72.94 88.19 - 105.95 138.23 -/ - 4 5 5 1 60.08 49.54 44.48 43.08 44.88 - 52.67 62.63 67.10 71.58 85.12 - 99.61 126.50 -/ - 4 5 6 1 58.43 46.46 42.36 41.99 45.51 - 51.93 62.86 74.10 79.91 98.34 - 118.32 155.29 -/ - 4 5 7 1 56.21 43.54 40.99 41.83 46.31 - 56.62 71.28 87.22 95.62 122.27 - 150.89 203.25 -/ - 4 5 8 1 42.75 39.56 52.14 68.36 104.08 - 160.25 239.44 325.58 371.82 525.84 - 707.54 1079.78 -/ - 4 5 9 1 39.05 50.44 83.15 118.43 191.33 - 309.08 490.02 705.64 828.35 1255.83 - 1771.59 2834.02 -/ - 4 6 1 1 66.11 63.68 61.68 60.05 58.23 - 58.30 61.31 66.06 68.96 80.83 - 94.31 120.23 -/ - 4 6 2 1 65.86 63.40 61.19 59.43 57.49 - 57.43 60.49 65.48 68.67 81.10 - 95.09 121.79 -/ - 4 6 3 1 65.06 62.03 58.93 56.66 54.49 - 54.48 58.01 64.61 68.76 83.80 - 99.82 129.93 -/ - 4 6 4 1 64.71 60.76 56.96 54.39 52.24 - 52.68 57.25 65.46 70.34 87.85 - 102.76 132.83 -/ - 4 6 5 1 62.93 54.61 49.04 46.57 46.09 - 50.75 61.32 73.01 79.19 85.58 - 87.33 110.11 -/ - 4 6 6 1 61.80 51.58 46.09 44.23 45.24 - 52.55 64.61 70.49 69.65 82.19 - 95.04 118.66 -/ - 4 6 7 1 60.21 48.21 43.47 42.60 45.76 - 54.96 61.01 71.35 76.56 92.76 - 110.26 142.80 -/ - 4 6 8 1 47.49 39.35 43.23 51.49 71.37 - 104.93 152.25 202.05 228.07 311.45 - 404.07 582.55 -/ - 4 6 9 1 41.83 41.21 57.92 78.24 121.60 - 189.53 286.93 395.27 454.26 653.23 - 889.04 1363.53 -/ - 4 7 1 1 66.76 64.31 62.55 61.10 59.48 - 59.82 62.78 67.26 69.97 81.14 - 94.12 119.36 -/ - 4 7 2 1 66.51 64.07 62.13 60.55 58.78 - 58.93 61.95 66.63 69.47 81.23 - 94.67 120.59 -/ - 4 7 3 1 65.63 62.89 60.13 58.05 55.96 - 55.82 59.08 64.94 68.77 82.83 - 98.24 127.25 -/ - 4 7 4 1 65.20 61.78 58.36 55.93 53.74 - 53.90 57.77 65.09 69.59 85.74 - 102.52 132.84 -/ - 4 7 5 1 63.68 56.25 50.81 48.13 47.11 - 50.41 60.61 70.97 76.96 95.47 - 102.88 133.97 -/ - 4 7 6 1 62.71 53.39 47.73 45.48 45.65 - 51.63 62.61 75.64 80.43 79.29 - 90.86 111.49 -/ - 4 7 7 1 61.34 50.04 44.79 43.38 45.29 - 53.43 65.13 68.26 72.94 87.03 - 101.90 129.53 -/ - 4 7 8 1 49.36 39.59 41.63 48.15 64.01 - 91.52 131.06 172.59 194.17 262.75 - 338.07 480.90 -/ - 4 7 9 1 43.21 39.74 52.37 68.65 104.55 - 161.07 240.95 328.09 374.93 530.46 - 711.35 1074.70 -/ - 4 8 1 1 69.17 67.29 66.07 65.43 65.19 - 65.92 67.94 70.95 72.80 83.66 - 94.82 117.69 -/ - 4 8 2 1 69.03 66.98 65.68 64.94 64.59 - 65.30 67.35 70.50 72.48 83.46 - 94.86 118.05 -/ - 4 8 3 1 68.34 65.82 64.27 63.11 62.08 - 62.87 65.71 69.89 72.43 82.81 - 95.34 120.07 -/ - 4 8 4 1 67.72 65.16 63.36 61.91 60.28 - 60.67 63.72 68.30 71.06 82.67 - 96.23 122.43 -/ - 4 8 5 1 66.05 62.34 58.72 56.21 54.00 - 54.25 58.34 66.15 70.93 88.18 - 105.81 137.69 -/ - 4 8 6 1 65.63 60.67 56.23 53.45 51.39 - 52.34 58.28 67.95 73.64 92.32 - 107.94 140.24 -/ - 4 8 7 1 65.01 58.40 53.17 50.31 48.79 - 51.01 59.75 71.43 76.84 93.57 - 113.17 149.26 -/ - 4 8 8 1 58.03 44.12 41.42 42.39 47.14 - 58.15 73.64 90.07 98.68 125.99 - 155.42 209.47 -/ - 4 8 9 1 52.04 40.32 41.10 45.51 57.95 - 79.34 110.84 144.31 161.66 216.51 - 276.23 388.54 -/ - 4 9 1 1 70.74 70.69 70.51 70.48 70.75 - 71.77 74.09 77.42 79.45 87.01 - 96.74 117.80 -/ - 4 9 2 1 70.74 70.69 70.51 70.48 70.75 - 71.77 74.09 77.42 79.45 87.01 - 96.74 117.80 -/ - 4 9 3 1 70.74 70.69 70.51 70.48 70.75 - 71.77 74.09 77.42 79.45 87.01 - 96.74 117.80 -/ - 4 9 4 1 70.74 70.69 70.51 70.48 70.75 - 71.77 74.09 77.42 79.45 87.01 - 96.74 117.80 -/ - 4 9 5 1 70.74 70.69 70.51 70.48 70.75 - 71.77 74.09 77.42 79.45 87.01 - 96.74 117.80 -/ - 4 9 6 1 70.74 70.69 70.51 70.48 70.75 - 71.77 74.09 77.42 79.45 87.01 - 96.74 117.80 -/ - 4 9 7 1 70.74 70.69 70.51 70.48 70.75 - 71.77 74.09 77.42 79.45 87.01 - 96.74 117.80 -/ - 4 9 8 1 70.74 70.69 70.51 70.48 70.75 - 71.77 74.09 77.42 79.45 87.01 - 96.74 117.80 -/ - 4 9 9 1 70.74 70.69 70.51 70.48 70.75 - 71.77 74.09 77.42 79.45 87.01 - 96.74 117.80 -/ - 5 1 1 1 70.41 67.41 64.46 62.27 60.18 - 60.56 65.17 73.09 77.75 92.79 - 106.41 134.42 -/ - 5 1 2 1 70.27 66.88 63.69 61.40 59.38 - 60.02 65.37 73.92 78.95 92.86 - 107.18 135.33 -/ - 5 1 3 1 69.59 64.50 60.45 58.05 56.61 - 58.90 67.63 76.92 82.20 98.73 - 106.74 135.52 -/ - 5 1 4 1 68.90 62.48 58.04 55.84 55.04 - 59.73 69.20 80.70 83.42 84.65 - 95.42 115.18 -/ - 5 1 5 1 65.33 55.13 51.91 51.83 55.05 - 63.60 76.43 90.66 98.28 122.82 - 149.53 198.84 -/ - 5 1 6 1 63.38 52.75 50.85 52.06 57.84 - 69.92 88.72 109.83 121.00 156.38 - 194.40 264.63 -/ - 5 1 7 1 60.94 50.85 50.84 53.33 63.42 - 82.12 111.00 142.25 158.52 209.89 - 265.53 370.87 -/ - 5 1 8 1 49.95 57.43 87.10 120.76 191.93 - 307.89 487.08 704.62 830.33 1274.71 - 1826.42 2173.16 -/ - 5 1 9 1 47.34 85.73 153.24 224.67 382.57 - 672.94 1181.11 1832.11 2166.20 2162.74 - 2212.84 2160.75 -/ - 5 2 1 1 71.07 68.24 65.35 63.19 61.08 - 61.32 65.49 73.03 77.50 93.09 - 106.71 135.15 -/ - 5 2 2 1 70.94 67.73 64.60 62.34 60.27 - 60.73 65.54 73.70 78.51 93.51 - 107.34 135.73 -/ - 5 2 3 1 70.31 65.47 61.43 58.98 57.36 - 59.19 67.26 77.16 81.69 97.46 - 113.03 141.49 -/ - 5 2 4 1 69.67 63.51 59.01 56.68 55.73 - 59.54 69.18 79.87 85.53 83.60 - 93.77 116.14 -/ - 5 2 5 1 66.33 56.09 52.46 52.12 54.81 - 62.41 74.14 86.87 93.68 115.68 - 139.77 184.46 -/ - 5 2 6 1 64.45 53.55 51.20 52.05 56.86 - 67.76 84.43 103.22 113.22 145.10 - 179.44 242.69 -/ - 5 2 7 1 62.07 51.42 50.61 52.67 61.55 - 77.97 103.62 131.71 146.38 192.65 - 242.61 336.09 -/ - 5 2 8 1 50.56 55.26 81.03 110.98 174.63 - 277.40 433.21 618.61 724.49 1099.48 - 1559.08 2458.75 -/ - 5 2 9 1 47.90 79.60 139.73 203.40 342.14 - 591.21 1020.93 1565.95 1883.36 2469.09 - 2441.47 2463.36 -/ - 5 3 1 1 71.74 69.09 66.32 64.22 62.08 - 62.19 65.97 73.04 77.30 92.46 - 107.03 135.89 -/ - 5 3 2 1 71.61 68.63 65.60 63.39 61.28 - 61.56 65.85 73.56 78.13 94.11 - 108.05 137.20 -/ - 5 3 3 1 71.03 66.49 62.52 60.04 58.26 - 59.63 66.96 77.23 82.00 96.21 - 113.52 145.15 -/ - 5 3 4 1 70.46 64.61 60.12 57.68 56.47 - 59.44 69.18 78.87 84.44 94.51 - 99.02 127.99 -/ - 5 3 5 1 67.36 57.21 53.16 52.49 54.97 - 61.29 72.02 83.39 89.41 108.87 - 130.32 170.34 -/ - 5 3 6 1 65.59 54.52 51.64 51.89 55.98 - 65.75 80.43 96.92 105.74 134.02 - 164.66 221.09 -/ - 5 3 7 1 63.30 52.14 50.76 52.25 59.82 - 74.10 96.50 121.34 134.39 175.59 - 219.99 302.37 -/ - 5 3 8 1 51.31 53.28 75.11 101.34 157.55 - 247.69 382.02 538.20 626.34 936.85 - 1314.46 2108.53 -/ - 5 3 9 1 48.61 73.65 126.35 182.46 303.06 - 514.33 871.03 1320.55 1580.71 2503.91 - 2877.48 2841.96 -/ - 5 4 1 1 72.49 69.99 67.38 65.36 63.20 - 63.21 66.74 73.20 77.24 91.85 - 106.70 135.43 -/ - 5 4 2 1 72.31 69.56 66.69 64.55 62.42 - 62.53 66.36 73.52 77.84 93.28 - 108.81 137.56 -/ - 5 4 3 1 71.78 67.57 63.74 61.27 59.33 - 60.36 66.75 76.34 82.00 95.49 - 111.47 141.82 -/ - 5 4 4 1 71.26 65.81 61.38 58.86 57.38 - 59.62 68.44 78.28 83.36 100.25 - 110.17 139.39 -/ - 5 4 5 1 68.45 58.51 54.06 52.99 54.95 - 63.98 70.07 80.25 85.54 102.51 - 121.34 156.64 -/ - 5 4 6 1 66.80 55.68 52.23 52.15 55.32 - 63.89 76.79 91.03 98.67 123.28 - 150.14 199.85 -/ - 5 4 7 1 64.62 53.06 51.11 52.37 58.22 - 70.57 89.74 111.24 122.62 158.75 - 197.66 269.51 -/ - 5 4 8 1 52.26 51.55 69.45 91.88 140.67 - 218.69 333.08 463.04 535.35 786.41 - 1092.54 1725.40 -/ - 5 4 9 1 49.04 67.95 113.13 161.81 265.27 - 442.15 732.68 1096.06 1304.26 2041.66 - 2944.55 3472.38 -/ - 5 5 1 1 74.27 71.90 69.74 68.01 66.01 - 65.91 69.12 74.33 77.85 90.88 - 104.92 132.08 -/ - 5 5 2 1 73.99 71.56 69.17 67.30 65.19 - 65.10 68.42 74.14 77.90 91.68 - 106.29 134.48 -/ - 5 5 3 1 73.30 69.94 66.61 64.29 62.15 - 62.49 66.97 75.05 79.88 96.87 - 111.62 141.44 -/ - 5 5 4 1 72.91 68.48 64.48 61.94 59.97 - 60.99 67.41 77.20 82.98 96.85 - 113.23 144.52 -/ - 5 5 5 1 70.75 61.83 56.74 54.84 55.31 - 62.39 74.04 74.97 79.15 91.83 - 105.60 131.55 -/ - 5 5 6 1 69.42 58.86 54.27 53.20 55.23 - 64.54 70.64 81.04 86.44 103.75 - 122.95 159.04 -/ - 5 5 7 1 67.61 55.80 52.33 52.33 55.67 - 64.58 77.96 92.76 100.69 126.28 - 154.20 205.88 -/ - 5 5 8 1 55.06 49.59 59.44 73.89 107.67 - 162.52 240.92 326.64 372.73 526.47 - 707.97 1079.95 -/ - 5 5 9 1 50.54 57.65 87.52 121.39 193.07 - 310.11 490.63 706.01 828.62 1255.86 - 1772.03 2834.53 -/ - 5 6 1 1 76.58 74.02 72.47 71.20 69.75 - 69.93 73.24 77.60 80.08 91.35 - 104.04 129.13 -/ - 5 6 2 1 76.28 73.75 72.07 70.69 69.04 - 69.36 72.42 76.98 79.75 91.46 - 104.62 130.44 -/ - 5 6 3 1 75.20 72.65 70.20 68.32 66.20 - 66.12 69.48 75.23 79.05 93.20 - 108.36 137.55 -/ - 5 6 4 1 74.66 71.62 68.53 66.31 64.12 - 64.21 68.09 75.39 79.91 96.34 - 112.88 145.00 -/ - 5 6 5 1 73.25 66.48 61.43 58.82 57.57 - 60.63 71.00 81.28 87.30 101.98 - 98.67 126.98 -/ - 5 6 6 1 72.36 63.80 58.47 56.23 55.98 - 61.96 73.04 85.57 80.45 89.50 - 101.70 124.41 -/ - 5 6 7 1 71.09 60.65 55.59 54.09 55.62 - 63.75 69.19 78.81 83.67 98.86 - 115.57 147.19 -/ - 5 6 8 1 60.01 50.14 52.24 59.24 77.04 - 108.69 154.83 203.99 229.79 312.73 - 405.00 583.20 -/ - 5 6 9 1 54.05 50.35 64.43 83.00 124.62 - 191.40 288.13 396.09 454.98 653.69 - 889.31 1363.53 -/ - 5 7 1 1 77.29 74.72 73.23 72.11 71.01 - 71.46 74.51 78.27 80.19 91.81 - 104.07 128.57 -/ - 5 7 2 1 77.00 74.40 72.86 71.64 70.27 - 70.53 73.82 78.15 80.62 91.79 - 104.48 129.60 -/ - 5 7 3 1 75.90 73.39 71.24 69.55 67.58 - 67.52 70.79 75.94 79.44 92.68 - 107.22 135.31 -/ - 5 7 4 1 75.23 72.49 69.74 67.70 65.52 - 65.47 69.01 75.42 79.56 94.78 - 110.75 141.48 -/ - 5 7 5 1 73.90 67.91 63.11 60.43 58.79 - 60.86 69.74 80.95 85.97 102.97 - 119.06 150.35 -/ - 5 7 6 1 73.14 65.44 60.15 57.66 56.82 - 61.24 71.99 83.81 90.05 87.08 - 98.11 117.89 -/ - 5 7 7 1 72.05 62.41 57.09 55.16 55.71 - 63.18 75.43 76.17 80.57 93.81 - 107.96 134.67 -/ - 5 7 8 1 61.82 50.68 51.35 56.47 70.52 - 96.01 134.14 174.94 196.26 264.33 - 339.28 481.77 -/ - 5 7 9 1 55.62 49.84 59.69 74.19 108.13 - 163.35 242.44 329.15 375.84 531.09 - 711.77 1074.85 -/ - 5 8 1 1 79.41 77.95 76.90 76.44 76.31 - 77.07 79.12 82.11 83.95 94.29 - 105.11 127.63 -/ - 5 8 2 1 79.31 77.63 76.49 75.97 75.81 - 76.56 78.59 81.58 83.42 94.12 - 105.14 127.94 -/ - 5 8 3 1 78.77 76.31 74.93 74.05 73.48 - 74.19 76.30 79.94 82.00 93.51 - 105.50 129.67 -/ - 5 8 4 1 78.22 75.47 73.98 72.83 71.66 - 72.11 75.38 79.67 82.29 93.27 - 106.17 131.67 -/ - 5 8 5 1 76.08 73.09 70.13 67.99 65.78 - 65.77 69.47 76.34 80.77 97.09 - 113.95 146.30 -/ - 5 8 6 1 75.63 71.72 68.02 65.54 63.32 - 63.75 68.61 77.46 82.79 101.78 - 118.79 150.92 -/ - 5 8 7 1 75.15 69.84 65.33 62.61 60.65 - 61.94 69.32 80.37 86.94 102.18 - 120.46 155.59 -/ - 5 8 8 1 69.53 56.47 52.80 52.82 56.44 - 66.10 80.51 95.90 104.04 130.21 - 158.85 212.12 -/ - 5 8 9 1 64.37 51.74 51.79 54.42 65.42 - 84.95 114.75 147.27 164.30 218.51 - 277.87 389.69 -/ - 5 9 1 1 80.76 80.70 80.52 80.49 80.76 - 81.78 84.10 87.42 89.45 97.01 - 106.75 127.80 -/ - 5 9 2 1 80.76 80.70 80.52 80.49 80.76 - 81.78 84.10 87.42 89.45 97.01 - 106.75 127.80 -/ - 5 9 3 1 80.76 80.70 80.52 80.49 80.76 - 81.78 84.10 87.42 89.45 97.01 - 106.75 127.80 -/ - 5 9 4 1 80.76 80.70 80.52 80.49 80.76 - 81.78 84.10 87.42 89.45 97.01 - 106.75 127.80 -/ - 5 9 5 1 80.76 80.70 80.52 80.49 80.76 - 81.78 84.10 87.42 89.45 97.01 - 106.75 127.80 -/ - 5 9 6 1 80.76 80.70 80.52 80.49 80.76 - 81.78 84.10 87.42 89.45 97.01 - 106.75 127.80 -/ - 5 9 7 1 80.76 80.70 80.52 80.49 80.76 - 81.78 84.10 87.42 89.45 97.01 - 106.75 127.80 -/ - 5 9 8 1 80.76 80.70 80.52 80.49 80.76 - 81.78 84.10 87.42 89.45 97.01 - 106.75 127.80 -/ - 5 9 9 1 80.76 80.70 80.52 80.49 80.76 - 81.78 84.10 87.42 89.45 97.01 - 106.75 127.80 -/ - 6 1 1 1 80.30 78.05 75.67 73.82 71.68 - 71.77 75.63 82.80 87.09 101.98 - 117.30 145.68 -/ - 6 1 2 1 80.14 77.60 74.97 73.02 70.88 - 71.16 75.61 83.42 88.06 103.36 - 117.95 146.35 -/ - 6 1 3 1 79.59 75.58 72.05 69.82 67.95 - 69.36 77.07 87.17 91.48 106.58 - 123.68 151.98 -/ - 6 1 4 1 79.04 73.82 69.77 67.56 66.27 - 69.57 79.15 89.30 94.83 92.86 - 103.08 125.97 -/ - 6 1 5 1 76.10 66.89 63.19 62.64 65.10 - 72.29 84.01 97.21 104.38 127.80 - 153.74 202.31 -/ - 6 1 6 1 74.44 64.37 61.76 62.31 66.90 - 77.75 95.06 114.97 125.67 160.07 - 197.49 267.14 -/ - 6 1 7 1 72.31 62.15 60.99 62.88 71.63 - 88.59 115.76 146.00 161.90 212.54 - 267.75 372.67 -/ - 6 1 8 1 61.27 65.56 92.42 124.54 194.25 - 309.36 488.03 705.32 830.92 1275.03 - 1826.50 2173.60 -/ - 6 1 9 1 58.12 91.03 156.07 226.58 383.71 - 673.61 1181.41 1832.14 2166.12 2192.42 - 2213.47 2268.25 -/ - 6 2 1 1 81.02 78.82 76.50 74.70 72.58 - 72.57 76.25 82.93 87.05 101.58 - 116.53 145.58 -/ - 6 2 2 1 80.80 78.40 75.83 73.91 71.76 - 71.92 75.96 83.39 87.82 103.19 - 118.29 147.06 -/ - 6 2 3 1 80.27 76.47 72.98 70.74 68.76 - 69.89 76.88 86.90 91.97 105.55 - 122.78 154.60 -/ - 6 2 4 1 79.77 74.78 70.73 68.44 66.93 - 69.53 78.98 88.57 93.94 99.16 - 105.14 134.35 -/ - 6 2 5 1 77.02 67.89 63.86 63.04 65.31 - 71.34 82.03 93.82 100.19 121.09 - 144.40 188.28 -/ - 6 2 6 1 75.44 65.26 62.22 62.31 66.18 - 75.88 91.19 108.84 118.35 149.17 - 182.85 245.48 -/ - 6 2 7 1 73.38 62.84 61.18 62.57 70.03 - 84.89 108.84 135.83 150.11 195.58 - 245.05 338.08 -/ - 6 2 8 1 62.00 63.74 86.77 115.15 177.22 - 279.04 434.30 619.41 725.18 1099.89 - 1559.28 2459.04 -/ - 6 2 9 1 58.95 85.34 142.87 205.52 343.41 - 591.97 1021.33 1566.09 1883.38 2469.31 - 2442.09 2467.25 -/ - 6 3 1 1 81.81 79.62 77.40 75.67 73.58 - 73.49 77.02 83.19 87.13 101.25 - 115.80 144.27 -/ - 6 3 2 1 81.54 79.22 76.76 74.90 72.76 - 72.80 76.56 83.45 87.67 102.61 - 117.94 147.77 -/ - 6 3 3 1 80.97 77.41 74.01 71.78 69.70 - 70.58 76.77 86.21 91.85 105.06 - 121.02 151.64 -/ - 6 3 4 1 80.51 75.81 71.80 69.47 67.74 - 69.72 78.41 88.22 93.11 109.95 - 117.01 144.93 -/ - 6 3 5 1 77.98 69.02 64.68 63.54 65.01 - 71.54 80.22 90.75 96.36 114.75 - 135.45 174.59 -/ - 6 3 6 1 76.49 66.29 62.79 62.56 65.65 - 74.17 87.63 103.03 111.38 138.54 - 168.46 224.22 -/ - 6 3 7 1 74.53 63.69 61.53 62.67 68.58 - 81.48 102.25 125.91 138.54 178.87 - 222.72 304.60 -/ - 6 3 8 1 62.88 62.13 81.36 105.94 160.46 - 249.54 383.26 539.09 627.14 937.39 - 1314.77 2108.53 -/ - 6 3 9 1 59.49 79.90 129.87 184.84 304.51 - 515.19 871.54 1320.79 1580.84 2503.96 - 2878.10 2842.60 -/ - 6 4 1 1 82.67 80.44 78.36 76.73 74.72 - 74.60 77.99 83.63 87.38 101.01 - 115.12 142.95 -/ - 6 4 2 1 82.36 80.08 77.76 75.99 73.89 - 73.82 77.40 83.67 87.68 102.11 - 116.94 146.01 -/ - 6 4 3 1 81.68 78.40 75.15 72.96 70.80 - 71.42 76.79 85.64 90.90 106.34 - 121.23 152.10 -/ - 6 4 4 1 81.27 76.90 73.01 70.65 68.73 - 70.15 77.94 88.79 93.26 108.22 - 126.66 156.47 -/ - 6 4 5 1 78.97 70.31 65.69 64.23 65.01 - 71.66 78.59 88.02 92.94 108.90 - 127.00 161.42 -/ - 6 4 6 1 77.60 67.51 63.55 62.99 65.47 - 72.62 84.44 97.67 104.86 128.35 - 154.43 203.39 -/ - 6 4 7 1 75.75 64.73 62.02 62.66 67.29 - 78.41 96.08 116.39 127.30 162.46 - 200.77 272.03 -/ - 6 4 8 1 63.96 60.79 76.27 96.99 143.99 - 220.81 334.51 464.08 536.25 787.08 - 1092.98 1725.54 -/ - 6 4 9 1 60.07 74.74 117.13 164.53 266.93 - 443.16 733.31 1096.42 1304.51 2041.64 - 2944.85 3473.00 -/ - 6 5 1 1 84.65 82.19 80.49 79.15 77.40 - 77.22 80.73 85.16 88.58 100.87 - 114.10 140.40 -/ - 6 5 2 1 84.30 81.91 80.01 78.53 76.65 - 76.63 79.92 84.94 88.43 101.42 - 115.22 142.53 -/ - 6 5 3 1 83.20 80.56 77.78 75.79 73.59 - 73.70 77.64 84.95 89.44 105.43 - 121.76 153.64 -/ - 6 5 4 1 82.83 79.32 75.89 73.63 71.42 - 72.06 77.48 86.55 91.94 107.90 - 123.20 155.10 -/ - 6 5 5 1 81.08 73.50 68.55 66.44 65.97 - 71.98 82.91 83.61 87.50 99.39 - 112.54 137.64 -/ - 6 5 6 1 79.99 70.71 65.92 64.44 65.29 - 72.61 79.17 88.83 93.86 110.17 - 128.64 163.83 -/ - 6 5 7 1 78.47 67.67 63.64 63.15 65.75 - 73.27 85.57 99.35 106.83 131.28 - 158.42 209.36 -/ - 6 5 8 1 66.98 59.89 67.61 80.47 112.12 - 165.48 242.95 328.18 374.11 527.45 - 708.76 1080.44 -/ - 6 5 9 1 61.98 65.78 92.84 125.18 195.40 - 311.59 491.57 706.69 829.19 1256.15 - 1772.10 2835.01 -/ - 6 6 1 1 87.07 84.46 82.99 82.03 81.08 - 81.67 83.86 87.14 89.13 101.88 - 113.95 138.39 -/ - 6 6 2 1 86.78 84.07 82.59 81.53 80.30 - 80.75 83.03 86.42 88.47 101.91 - 114.40 139.52 -/ - 6 6 3 1 85.51 83.00 81.01 79.50 77.59 - 77.57 80.94 86.05 89.61 103.03 - 117.41 145.76 -/ - 6 6 4 1 84.71 82.14 79.56 77.70 75.52 - 75.46 79.14 85.63 89.87 105.40 - 121.24 152.50 -/ - 6 6 5 1 83.34 77.75 73.17 70.66 68.84 - 70.97 80.26 91.30 96.08 113.95 - 118.01 145.55 -/ - 6 6 6 1 82.62 75.39 70.33 67.97 66.95 - 71.66 82.16 94.39 97.52 97.56 - 109.20 131.10 -/ - 6 6 7 1 81.58 72.49 67.36 65.53 65.82 - 73.36 83.60 87.01 91.57 105.89 - 121.92 152.64 -/ - 6 6 8 1 71.91 61.05 61.92 67.76 83.72 - 113.38 158.13 206.58 232.13 314.54 - 406.48 584.21 -/ - 6 6 9 1 65.98 60.27 71.93 88.77 128.43 - 193.89 289.83 397.37 456.08 654.49 - 889.89 1363.82 -/ - 6 7 1 1 87.69 85.25 83.83 82.98 82.35 - 83.04 85.17 88.34 90.28 102.40 - 114.11 138.04 -/ - 6 7 2 1 87.46 84.83 83.38 82.44 81.57 - 82.21 84.39 87.65 89.63 102.33 - 114.43 138.94 -/ - 6 7 3 1 86.30 83.66 81.92 80.58 78.84 - 78.71 82.32 87.09 90.20 102.81 - 116.61 143.91 -/ - 6 7 4 1 85.44 82.91 80.64 78.97 76.91 - 76.79 80.30 86.00 89.88 104.33 - 119.53 149.41 -/ - 6 7 5 1 83.93 79.03 74.76 72.25 70.25 - 71.55 79.35 90.61 96.62 111.19 - 130.41 166.52 -/ - 6 7 6 1 83.31 76.88 71.98 69.48 67.98 - 71.14 81.91 92.54 98.46 102.12 - 106.17 125.22 -/ - 6 7 7 1 82.42 74.15 68.94 66.78 66.35 - 72.74 84.28 86.18 88.91 101.41 - 114.96 140.84 -/ - 6 7 8 1 73.61 61.81 61.95 65.46 77.97 - 101.50 138.06 178.00 199.03 266.51 - 341.08 483.08 -/ - 6 7 9 1 67.64 60.18 67.87 80.79 112.59 - 166.31 244.49 330.71 377.23 532.06 - 712.54 1075.32 -/ - 6 8 1 1 89.57 88.42 87.54 87.15 87.08 - 87.86 89.96 93.06 94.95 104.75 - 115.32 137.57 -/ - 6 8 2 1 89.48 88.17 87.19 86.76 86.66 - 87.43 89.52 92.56 94.43 104.61 - 115.34 137.85 -/ - 6 8 3 1 89.05 86.89 85.57 84.91 84.66 - 85.39 87.46 90.53 92.41 104.06 - 115.64 139.39 -/ - 6 8 4 1 88.61 85.89 84.45 83.56 82.85 - 83.56 85.73 88.98 90.95 103.80 - 116.18 141.14 -/ - 6 8 5 1 86.28 83.55 81.06 79.27 77.12 - 77.01 80.64 86.79 90.95 106.51 - 122.62 154.14 -/ - 6 8 6 1 85.56 82.39 79.20 77.05 74.72 - 74.93 79.17 87.32 92.33 110.39 - 128.39 162.19 -/ - 6 8 7 1 85.13 80.80 76.83 74.37 72.17 - 72.96 79.25 89.56 95.72 113.57 - 128.35 163.90 -/ - 6 8 8 1 80.50 68.43 64.15 63.67 66.60 - 74.75 88.18 102.64 110.34 135.38 - 163.18 215.60 -/ - 6 8 9 1 76.03 63.14 61.87 63.99 73.61 - 91.53 119.61 151.06 167.73 221.19 - 280.09 391.46 -/ - 6 9 1 1 90.78 90.71 90.53 90.50 90.77 - 91.79 94.11 97.43 99.46 107.02 - 116.75 137.79 -/ - 6 9 2 1 90.78 90.71 90.53 90.50 90.77 - 91.79 94.11 97.43 99.46 107.02 - 116.75 137.79 -/ - 6 9 3 1 90.78 90.71 90.53 90.50 90.77 - 91.79 94.11 97.43 99.46 107.02 - 116.75 137.79 -/ - 6 9 4 1 90.78 90.71 90.53 90.50 90.77 - 91.79 94.11 97.43 99.46 107.02 - 116.75 137.79 -/ - 6 9 5 1 90.78 90.71 90.53 90.50 90.77 - 91.79 94.11 97.43 99.46 107.02 - 116.75 137.79 -/ - 6 9 6 1 90.78 90.71 90.53 90.50 90.77 - 91.79 94.11 97.43 99.46 107.02 - 116.75 137.79 -/ - 6 9 7 1 90.78 90.71 90.53 90.50 90.77 - 91.79 94.11 97.43 99.46 107.02 - 116.75 137.79 -/ - 6 9 8 1 90.78 90.71 90.53 90.50 90.77 - 91.79 94.11 97.43 99.46 107.02 - 116.75 137.79 -/ - 6 9 9 1 90.78 90.71 90.53 90.50 90.77 - 91.79 94.11 97.43 99.46 107.02 - 116.75 137.79 -/ - 7 1 1 1 90.39 88.43 86.52 85.00 83.00 - 82.58 86.17 92.86 96.85 110.76 - 125.39 154.08 -/ - 7 1 2 1 90.07 88.05 85.90 84.25 82.18 - 81.84 86.08 93.23 97.54 112.32 - 127.85 158.08 -/ - 7 1 3 1 89.45 86.30 83.25 81.23 79.25 - 79.71 86.83 96.65 102.32 114.97 - 132.08 164.05 -/ - 7 1 4 1 89.01 84.77 81.13 79.01 77.41 - 79.65 88.86 98.33 103.53 104.53 - 112.57 144.60 -/ - 7 1 5 1 86.55 78.35 74.40 73.49 75.58 - 81.50 92.25 104.53 111.26 133.56 - 158.73 206.53 -/ - 7 1 6 1 85.13 75.79 72.68 72.70 76.45 - 86.20 102.16 120.92 131.13 164.51 - 201.28 270.33 -/ - 7 1 7 1 83.27 73.37 71.57 72.91 80.39 - 95.82 121.33 150.48 166.00 215.83 - 270.54 375.02 -/ - 7 1 8 1 72.51 74.29 98.55 129.07 197.14 - 311.26 489.37 706.28 831.84 1275.63 - 1826.86 2173.63 -/ - 7 1 9 1 69.00 97.16 159.54 228.98 385.23 - 674.53 1181.97 1832.41 2166.27 2192.43 - 2213.29 2172.16 -/ - 7 2 1 1 91.21 89.15 87.30 85.83 83.88 - 83.47 86.69 93.19 97.03 110.60 - 124.88 153.05 -/ - 7 2 2 1 90.84 88.80 86.71 85.10 83.06 - 82.65 86.74 93.39 97.52 111.93 - 127.05 156.67 -/ - 7 2 3 1 90.12 87.13 84.13 82.12 80.08 - 80.33 86.80 96.10 101.73 115.10 - 131.25 162.59 -/ - 7 2 4 1 89.71 85.67 82.05 79.90 78.14 - 79.26 88.40 98.19 102.85 117.86 - 123.84 153.71 -/ - 7 2 5 1 87.42 79.34 75.14 73.97 75.36 - 80.77 90.54 101.51 107.47 127.29 - 149.84 192.87 -/ - 7 2 6 1 86.07 76.72 73.22 72.93 75.99 - 84.59 98.69 115.22 124.28 153.99 - 186.99 248.97 -/ - 7 2 7 1 84.28 74.15 71.87 72.97 79.03 - 92.53 114.88 140.72 154.58 199.19 - 248.11 340.65 -/ - 7 2 8 1 73.33 72.77 93.34 120.08 180.41 - 281.15 435.78 620.51 726.13 1100.61 - 1559.76 2459.19 -/ - 7 2 9 1 69.84 91.92 146.70 208.17 345.09 - 593.02 1022.00 1566.47 1883.64 2469.27 - 2442.51 2468.08 -/ - 7 3 1 1 92.09 89.91 88.14 86.74 84.86 - 84.52 87.23 93.65 97.34 110.53 - 124.41 152.02 -/ - 7 3 2 1 91.69 89.58 87.58 86.04 84.05 - 83.62 87.44 93.67 97.62 111.61 - 126.28 155.24 -/ - 7 3 3 1 90.80 88.01 85.10 83.13 81.03 - 81.43 86.86 95.65 100.93 116.07 - 131.73 163.44 -/ - 7 3 4 1 90.42 86.63 83.08 80.92 79.01 - 79.79 88.03 98.92 103.42 118.17 - 135.09 162.89 -/ - 7 3 5 1 88.31 80.46 76.03 74.60 75.34 - 80.22 89.00 98.79 104.04 121.42 - 141.38 179.63 -/ - 7 3 6 1 87.06 77.79 73.91 73.31 75.80 - 83.14 95.54 109.90 117.79 143.83 - 173.01 228.06 -/ - 7 3 7 1 85.36 75.08 72.33 73.09 77.83 - 89.53 108.79 131.27 143.45 182.85 - 226.12 307.42 -/ - 7 3 8 1 74.30 71.47 88.41 111.33 164.02 - 251.89 384.91 540.37 628.25 938.24 - 1315.37 2108.81 -/ - 7 3 9 1 70.39 86.94 134.12 187.80 306.38 - 516.41 872.34 1321.29 1581.21 2504.03 - 2877.89 2843.40 -/ - 7 4 1 1 93.04 90.69 89.03 87.73 85.94 - 85.74 88.36 93.26 97.81 110.57 - 124.02 151.01 -/ - 7 4 2 1 92.62 90.38 88.51 87.07 85.16 - 84.78 87.89 94.12 97.88 111.40 - 125.58 153.80 -/ - 7 4 3 1 91.49 88.94 86.16 84.25 82.12 - 82.36 87.05 95.30 100.23 116.87 - 132.76 164.12 -/ - 7 4 4 1 91.15 87.64 84.22 82.08 80.05 - 80.49 87.75 97.84 103.96 116.74 - 134.40 167.57 -/ - 7 4 5 1 89.24 81.71 77.11 75.41 75.65 - 79.93 87.66 96.42 101.02 116.09 - 133.49 167.01 -/ - 7 4 6 1 88.09 79.03 74.78 73.85 75.97 - 81.87 92.74 105.06 111.81 134.20 - 159.50 207.68 -/ - 7 4 7 1 86.50 76.20 72.94 72.98 76.84 - 86.85 103.16 122.34 132.77 166.90 - 204.58 275.20 -/ - 7 4 8 1 75.46 70.52 83.88 102.93 147.99 - 223.48 336.38 465.54 537.57 788.08 - 1093.73 1725.98 -/ - 7 4 9 1 71.11 82.29 121.89 167.88 269.05 - 444.55 734.24 1097.05 1305.03 2041.85 - 2944.84 3473.79 -/ - 7 5 1 1 95.15 92.47 90.99 89.93 88.51 - 88.87 91.23 94.75 96.87 111.04 - 123.60 149.17 -/ - 7 5 2 1 94.76 92.11 90.57 89.39 87.74 - 87.85 90.35 94.04 98.97 111.41 - 124.53 151.06 -/ - 7 5 3 1 93.28 90.95 88.62 86.94 84.85 - 84.41 88.55 95.12 99.35 114.45 - 130.15 161.19 -/ - 7 5 4 1 92.65 89.88 86.91 84.93 82.75 - 83.01 87.77 96.24 101.32 118.59 - 134.99 167.44 -/ - 7 5 5 1 91.20 84.74 80.04 77.87 76.92 - 81.73 91.91 98.82 96.40 107.60 - 120.19 144.49 -/ - 7 5 6 1 90.29 82.17 77.36 75.65 75.93 - 80.31 88.24 97.23 101.95 117.36 - 135.12 169.42 -/ - 7 5 7 1 89.01 79.23 74.88 74.00 76.39 - 82.48 93.81 106.67 113.70 137.05 - 163.41 213.58 -/ - 7 5 8 1 78.58 70.43 76.35 87.85 117.38 - 169.09 245.52 330.19 375.92 528.87 - 709.83 1081.26 -/ - 7 5 9 1 73.34 74.52 98.97 129.72 198.30 - 313.51 492.90 707.62 830.07 1256.72 - 1772.43 2835.03 -/ - 7 6 1 1 97.38 95.04 93.60 92.83 92.32 - 93.03 95.16 98.34 100.29 112.37 - 123.93 147.86 -/ - 7 6 2 1 97.15 94.55 93.09 92.24 91.49 - 92.18 94.37 97.63 99.61 112.35 - 124.30 148.86 -/ - 7 6 3 1 95.96 93.19 91.55 90.33 88.63 - 88.67 91.24 95.00 100.23 113.09 - 126.79 154.40 -/ - 7 6 4 1 94.95 92.45 90.29 88.74 86.73 - 86.24 90.24 96.09 100.10 114.83 - 130.05 160.51 -/ - 7 6 5 1 93.29 88.65 84.52 82.17 80.15 - 81.43 89.89 101.68 106.88 122.28 - 136.43 165.40 -/ - 7 6 6 1 92.69 86.56 81.82 79.48 78.07 - 81.55 92.63 103.32 109.39 106.22 - 117.39 138.56 -/ - 7 6 7 1 91.83 83.91 78.88 76.87 76.58 - 83.43 95.11 95.78 100.07 113.60 - 129.01 158.88 -/ - 7 6 8 1 83.37 71.99 72.13 76.76 91.16 - 118.87 162.15 209.77 235.05 316.87 - 408.43 585.75 -/ - 7 6 9 1 77.64 70.51 80.11 95.36 132.97 - 196.96 292.00 399.06 457.61 655.59 - 890.80 1364.39 -/ - 7 7 1 1 97.95 95.90 94.51 93.84 93.54 - 94.25 96.35 99.48 101.41 112.90 - 124.18 147.66 -/ - 7 7 2 1 97.76 95.41 93.97 93.23 92.78 - 93.50 95.63 98.80 100.74 112.82 - 124.44 148.46 -/ - 7 7 3 1 96.78 93.83 92.37 91.30 89.83 - 90.23 92.64 96.20 98.71 113.05 - 126.23 152.86 -/ - 7 7 4 1 95.81 93.16 91.27 89.89 88.03 - 87.74 91.54 96.16 100.36 114.18 - 128.68 157.79 -/ - 7 7 5 1 93.84 89.80 85.99 83.71 81.52 - 82.36 89.23 99.79 106.18 119.91 - 138.43 173.60 -/ - 7 7 6 1 93.33 87.91 83.41 81.01 79.22 - 81.32 91.24 102.09 107.38 120.44 - 114.83 141.66 -/ - 7 7 7 1 92.59 85.46 80.47 78.23 77.31 - 82.46 93.24 103.68 97.81 109.64 - 122.64 147.72 -/ - 7 7 8 1 84.96 72.92 72.45 74.89 86.07 - 107.81 142.74 181.73 202.44 269.25 - 343.39 484.93 -/ - 7 7 9 1 79.33 70.77 76.61 88.18 117.85 - 169.92 247.06 332.73 379.06 533.48 - 713.59 1076.12 -/ - 7 8 1 1 99.67 98.76 98.00 97.66 97.64 - 98.44 100.56 103.67 105.59 115.10 - 125.46 147.52 -/ - 7 8 2 1 99.60 98.54 97.70 97.33 97.27 - 98.07 100.18 103.30 105.22 114.98 - 125.49 147.77 -/ - 7 8 3 1 99.24 97.47 96.25 95.72 95.54 - 96.30 98.37 101.42 103.29 114.50 - 125.75 149.17 -/ - 7 8 4 1 98.87 96.42 94.99 94.28 93.93 - 94.67 96.79 99.94 101.87 114.24 - 126.21 150.75 -/ - 7 8 5 1 96.65 93.83 91.72 90.22 88.25 - 88.15 91.79 97.35 101.32 116.24 - 131.66 162.42 -/ - 7 8 6 1 95.66 92.84 90.07 88.20 85.95 - 85.90 89.95 97.36 102.12 119.36 - 136.75 171.16 -/ - 7 8 7 1 95.01 91.45 87.94 85.74 83.43 - 83.87 89.40 99.10 104.94 124.65 - 139.74 175.34 -/ - 7 8 8 1 91.13 80.07 75.43 74.54 77.17 - 84.62 96.37 110.02 117.32 141.29 - 168.27 219.82 -/ - 7 8 9 1 87.24 74.48 72.46 74.08 82.30 - 98.83 125.29 155.60 171.88 224.53 - 282.92 393.76 -/ - 7 9 1 1 100.80 100.72 100.54 100.50 100.77 - 101.80 104.11 107.44 109.47 117.02 - 126.75 147.79 -/ - 7 9 2 1 100.80 100.72 100.54 100.50 100.77 - 101.80 104.11 107.44 109.47 117.02 - 126.75 147.79 -/ - 7 9 3 1 100.80 100.72 100.54 100.50 100.77 - 101.80 104.11 107.44 109.47 117.02 - 126.75 147.79 -/ - 7 9 4 1 100.80 100.72 100.54 100.50 100.77 - 101.80 104.11 107.44 109.47 117.02 - 126.75 147.79 -/ - 7 9 5 1 100.80 100.72 100.54 100.50 100.77 - 101.80 104.11 107.44 109.47 117.02 - 126.75 147.79 -/ - 7 9 6 1 100.80 100.72 100.54 100.50 100.77 - 101.80 104.11 107.44 109.47 117.02 - 126.75 147.79 -/ - 7 9 7 1 100.80 100.72 100.54 100.50 100.77 - 101.80 104.11 107.44 109.47 117.02 - 126.75 147.79 -/ - 7 9 8 1 100.80 100.72 100.54 100.50 100.77 - 101.80 104.11 107.44 109.47 117.02 - 126.75 147.79 -/ - 7 9 9 1 100.80 100.72 100.54 100.50 100.77 - 101.80 104.11 107.44 109.47 117.02 - 126.75 147.79 -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/WCONHIST/WCONHIST1 b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/WCONHIST/WCONHIST1 deleted file mode 100644 index 39f515ddd9..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/WCONHIST/WCONHIST1 +++ /dev/null @@ -1,14 +0,0 @@ -WCONHIST - 'OP_1' 'OPEN' 'ORAT' 4000.000 4.000 1.46402E+006 5* / - 'OP_2' 'OPEN' 'ORAT' 7998.000 2.000 1461075.000 5* / - 'OP_3' 'OPEN' 'ORAT' 7999.000 1.000 1471824.000 1 0.25 0.25 0.25 1* / -/ - - - - -WCONHIST - 'OP_1_B' 'OPEN' 'ORAT' 2000.000 2.000 1.46402E+006 5* / - 'OP_2_B' 'SHUT' 'ORAT' 2998.000 2.000 1461075.000 5* / - 'OP_3_B' 'OPEN' 'GRAT' 2999.000 1.000 1471824.000 1 0.25 0.25 0.25 1* / -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/WellWithWildcards/WCONINJE1 b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/WellWithWildcards/WCONINJE1 deleted file mode 100644 index c3fe462acd..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/WellWithWildcards/WCONINJE1 +++ /dev/null @@ -1,26 +0,0 @@ -START -10 MAI 2007 / - - -SCHEDULE - -WELSPECS --- Well specification data -'PROD1' 'P' 11 3 9110 'OIL' / -'INJE2' 'I' 24 25 9110 'WATER' / -'INJE3' 'I' 24 25 9110 'WATER' / -'PROD4' 'P' 11 3 9110 'OIL' / -'INJX5' 'I' 10 4 9110 'WATER' / -/ - -WCONINJE -'INJE2' 'WATER' 'OPEN' 'RATE' 1000 4* 1000 / -'INJX5' 'WATER' 'OPEN' 'RATE' 2000 4* 1000 / -/ - -TSTEP - 10 / - -WCONINJE -'INJE*' 'WATER' 'OPEN' 'RATE' 1500 4* 1000 / -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/WellWithWildcards/WCONPROD1 b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/WellWithWildcards/WCONPROD1 deleted file mode 100644 index 32262c7959..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/WellWithWildcards/WCONPROD1 +++ /dev/null @@ -1,26 +0,0 @@ -START -10 MAI 2007 / - - -SCHEDULE - -WELSPECS --- Well specification data -'INJE1' 'I' 24 25 9110 'WATER' / -'PROD2' 'P' 5 1 9110 'OIL' / -'PROD3' 'P' 8 2 9110 'OIL' / -'PROD4' 'P' 11 3 9110 'OIL' / -'PROX5' 'P' 10 4 9110 'OIL' / -/ - -WCONPROD -'PROD2' 'OPEN' 'ORAT' 1000 4* 1000 / -'PROX5' 'OPEN' 'ORAT' 2000 4* 1000 / -/ - -TSTEP - 10 / - -WCONPROD -'PROD*' 'OPEN' 'ORAT' 1500 4* 1000 / -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/bpr.data b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/bpr.data deleted file mode 100644 index 10d8bb7e25..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/bpr.data +++ /dev/null @@ -1,8 +0,0 @@ -SUMMARY - --- Kommentar -BPR -1 2 3 / --Snasent -4 5 6 / -/ - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/include path/readthis.sch b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/include path/readthis.sch deleted file mode 100644 index c8e25f1ec3..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/include path/readthis.sch +++ /dev/null @@ -1,9 +0,0 @@ -GRUPTREE - 'WI' 'FIELD' / - 'OP' 'FIELD' / -/ - -WHISTCTL - 'RESV' 1* / - -METRIC diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/mini.data b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/mini.data deleted file mode 100644 index 425f7dd025..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/mini.data +++ /dev/null @@ -1,3 +0,0 @@ ---Use saturation table end-point scaling -ENDSCALE - 'NODIR' 'REVERS' 1 20 / diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/small.data b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/small.data deleted file mode 100644 index d824750cfc..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/small.data +++ /dev/null @@ -1,17 +0,0 @@ --- Dette er en supertest - OK -OIL - --- Saa bare en - OK ---INCLUDE --- 'include path/readthis.sch' / ----- Saa kommer en for lang en, skal bli "trunkert", slik at keywordet blir ABCXYZFF - OK - -GRIDUNIT Tull kommer her --- Saa kommer det data -METRES / - --- Og en med tall - OK - - -RADFIN4 - 'NAME' 213 123 123 123 7 7 18 18 18 18 / \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/someobscureelements.data b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/someobscureelements.data deleted file mode 100644 index 1af06826d5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/someobscureelements.data +++ /dev/null @@ -1,15 +0,0 @@ --- Comment -OIL - -GRIDUNIT -METRES / - -GRUDINT -- A wrong, or unknown keyword - "text" 3 5 / - 3 3 3 3 3 3 / -/ - - - -RADFIN4 - 'NAME' 213 123 123 123 7 7 18 18 18 18 / diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/truncated_records.data b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/truncated_records.data deleted file mode 100644 index 781d86d631..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/truncated_records.data +++ /dev/null @@ -1,10 +0,0 @@ --- Comment -OIL - -RADFIN4 - 'NAME' 213 123 123 123 7 7 18 18 18 18 / - -RADFIN4 - 'NAME' 213 123 123 123 7 7 18 18 18 / - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/wwct.data b/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/wwct.data deleted file mode 100644 index fac1763227..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/integration_tests/wwct.data +++ /dev/null @@ -1,7 +0,0 @@ -SUMMARY - --- Kommentar -WWCT - 'WELL-1' 'WELL-2' / --Snasent -/ - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/json/BPR b/ThirdParty/custom-opm-parser/opm-parser/testdata/json/BPR deleted file mode 100644 index fac1bf4ad0..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/json/BPR +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name" : "BPR", - "sections":["SUMMARY"], - "items" : - [{"name": "I" , "size_type" : "SINGLE" , "value_type" : "INT"}, - {"name": "J" , "size_type" : "SINGLE" , "value_type" : "INT"}, - {"name": "K" , "size_type" : "SINGLE" , "value_type" : "INT"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/json/example1.json b/ThirdParty/custom-opm-parser/opm-parser/testdata/json/example1.json deleted file mode 100644 index 6bdf0fbcf7..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/json/example1.json +++ /dev/null @@ -1,6 +0,0 @@ -{"keywords": - [ - {"name" : "BPR", "items" : - [{"name":"ItemX" , "size_type":"SINGLE" , "value_type" : "FLOAT"}]} , - {"name" : "WWCT" , "size" : 0}]} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/json/example_invalid_json b/ThirdParty/custom-opm-parser/opm-parser/testdata/json/example_invalid_json deleted file mode 100644 index a5edda0798..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/json/example_invalid_json +++ /dev/null @@ -1,2 +0,0 @@ -{"keywords" : [{"name" : "BPR"} , {"name" : "WWCT"} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/json/example_missing_keyword.json b/ThirdParty/custom-opm-parser/opm-parser/testdata/json/example_missing_keyword.json deleted file mode 100644 index 83506a5863..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/json/example_missing_keyword.json +++ /dev/null @@ -1,2 +0,0 @@ -{"keywordsXX" : [{"name" : "BPR"} , {"name" : "WWCT"}]} - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/json/example_missing_name.json b/ThirdParty/custom-opm-parser/opm-parser/testdata/json/example_missing_name.json deleted file mode 100644 index 2e208f9e22..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/json/example_missing_name.json +++ /dev/null @@ -1,4 +0,0 @@ -{"items" : - [{"name": "I" , "size_type" : "SINGLE" , "value_type" : "INT"}, - {"name": "J" , "size_type" : "SINGLE" , "value_type" : "INT"}, - {"name": "K" , "size_type" : "SINGLE" , "value_type" : "INT"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/EQLDIMS2 b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/EQLDIMS2 deleted file mode 100644 index b68a3141b8..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/EQLDIMS2 +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name" : "EQLDIMS", - "size" : 1, - "sections": ["RUNSPEC"], - "items": - [{"name" : "NEW" , "value_type" : "INT" , "default" : 1}] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/PATHSInInclude.data b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/PATHSInInclude.data deleted file mode 100644 index 013a00d4e5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/PATHSInInclude.data +++ /dev/null @@ -1,7 +0,0 @@ -INCLUDE - 'include/foo.inc' -/ - -INCLUDE - '$FOOPATH/foo_target.inc' -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/PATHSInIncludeInvalid.data b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/PATHSInIncludeInvalid.data deleted file mode 100644 index 7d2817b9ca..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/PATHSInIncludeInvalid.data +++ /dev/null @@ -1,7 +0,0 @@ -INCLUDE - 'include/foo_invalid.inc' -/ - -INCLUDE - '$FOOPATH/foo_target.inc' -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/include/foo.inc b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/include/foo.inc deleted file mode 100644 index 057c9a77f9..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/include/foo.inc +++ /dev/null @@ -1,3 +0,0 @@ -PATHS - 'FOOPATH' 'include/foopath' / -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/include/foo_invalid.inc b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/include/foo_invalid.inc deleted file mode 100644 index c010f0c2e0..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/include/foo_invalid.inc +++ /dev/null @@ -1,3 +0,0 @@ -PATHS - 'FOOPATH' 'include/invalid' / -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/include/foopath/foo_target.inc b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/include/foopath/foo_target.inc deleted file mode 100644 index c3e31e44a4..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/include/foopath/foo_target.inc +++ /dev/null @@ -1 +0,0 @@ -OIL diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/include/some_flags.inc b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/include/some_flags.inc deleted file mode 100644 index c3e31e44a4..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/include/some_flags.inc +++ /dev/null @@ -1 +0,0 @@ -OIL diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeInvalid.data b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeInvalid.data deleted file mode 100644 index 7e8a1f56a6..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeInvalid.data +++ /dev/null @@ -1,3 +0,0 @@ -INCLUDE - 'some_nonexisting_file.inc' -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink1/actual_file_dir/case.data b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink1/actual_file_dir/case.data deleted file mode 100644 index a83017d266..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink1/actual_file_dir/case.data +++ /dev/null @@ -1,3 +0,0 @@ -INCLUDE - 'include/include.inc' -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink1/actual_file_dir/include/include.inc b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink1/actual_file_dir/include/include.inc deleted file mode 100644 index c3e31e44a4..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink1/actual_file_dir/include/include.inc +++ /dev/null @@ -1 +0,0 @@ -OIL diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink1/case_symlink.data b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink1/case_symlink.data deleted file mode 100644 index 4db9fd79ef..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink1/case_symlink.data +++ /dev/null @@ -1 +0,0 @@ -actual_file_dir/case.data \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink2/actual_inlude_file/include.inc b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink2/actual_inlude_file/include.inc deleted file mode 100644 index c3e31e44a4..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink2/actual_inlude_file/include.inc +++ /dev/null @@ -1 +0,0 @@ -OIL diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink2/caseWithIncludedSymlink.data b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink2/caseWithIncludedSymlink.data deleted file mode 100644 index fc9cc228f8..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink2/caseWithIncludedSymlink.data +++ /dev/null @@ -1,3 +0,0 @@ -INCLUDE - 'include/symlink_include.inc' -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink2/include/symlink_include.inc b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink2/include/symlink_include.inc deleted file mode 100644 index ced6ed6b44..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink2/include/symlink_include.inc +++ /dev/null @@ -1 +0,0 @@ -../actual_inlude_file/include.inc \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink3/actual_include_file/include_oil.inc b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink3/actual_include_file/include_oil.inc deleted file mode 100644 index c3e31e44a4..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink3/actual_include_file/include_oil.inc +++ /dev/null @@ -1 +0,0 @@ -OIL diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink3/case.data b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink3/case.data deleted file mode 100644 index 90027e2251..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink3/case.data +++ /dev/null @@ -1,3 +0,0 @@ -INCLUDE -'include.inc' -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink3/include.inc b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink3/include.inc deleted file mode 100644 index a3f4901186..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink3/include.inc +++ /dev/null @@ -1,4 +0,0 @@ -INCLUDE -'include/incl_symlink.inc' -/ - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink3/include/incl_symlink.inc b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink3/include/incl_symlink.inc deleted file mode 100644 index e58537135e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeSymlinkTestdata/symlink3/include/incl_symlink.inc +++ /dev/null @@ -1 +0,0 @@ -../actual_include_file/include_oil.inc \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeValid.data b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeValid.data deleted file mode 100644 index ac7c5c1227..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeValid.data +++ /dev/null @@ -1,3 +0,0 @@ -INCLUDE - 'include/some_flags.inc' -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeWrongCase1.data b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeWrongCase1.data deleted file mode 100644 index 8e31f17b19..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeWrongCase1.data +++ /dev/null @@ -1,3 +0,0 @@ -INCLUDE - 'include/SOME_flags.inc' -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeWrongCase2.data b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeWrongCase2.data deleted file mode 100644 index 5e977d778c..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeWrongCase2.data +++ /dev/null @@ -1,3 +0,0 @@ -INCLUDE - 'Include/some_flags.inc' -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeWrongCase3.data b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeWrongCase3.data deleted file mode 100644 index 40b17f1c74..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/includeWrongCase3.data +++ /dev/null @@ -1,3 +0,0 @@ -INCLUDE - 'Include/SOME_flags.inc' -/ diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/PORO-invalid b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/PORO-invalid deleted file mode 100644 index 43a104a8b4..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/PORO-invalid +++ /dev/null @@ -1,3 +0,0 @@ -{"name" : "PORO" , "sections" : ["GRID"], "data" : {"value_type" : "DOUBLE" , "default" : "XX" , "dimension":"1"}} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/PORO.json b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/PORO.json deleted file mode 100644 index 04ce37c261..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/PORO.json +++ /dev/null @@ -1,3 +0,0 @@ -{"name" : "PORO" , "sections" : ["GRID"], "data" : {"value_type" : "DOUBLE" , "default" : 0 , "dimension":"1"}} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/invalid.json b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/invalid.json deleted file mode 100644 index d534dd9ad9..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/invalid.json +++ /dev/null @@ -1,3 +0,0 @@ -{"name" : "PORO" , "sections" : ["GRID"], "data" : {"value_type" : "DOUBLE" , "default" : 0 , "dimension":"1"} - - diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/loader/001_ECLIPSE100/A/2ADDREG b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/loader/001_ECLIPSE100/A/2ADDREG deleted file mode 100644 index 1554bd3696..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/loader/001_ECLIPSE100/A/2ADDREG +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "ADDREG" , "sections" : ["GRID","EDIT","PROPS","REGIONS","SOLUTION"], - "items" : - [{"name" : "ARRAY" , "value_type" : "STRING" , "description" : "The 3D array we will update"}, - {"name" : "SHIFT" , "value_type" : "DOUBLE" , "description" : "The value we will multiply with" , "default" : 0} , - {"name" : "REGION_NAME" , "value_type" : "STRING" , "description" : "The name of the region we are interested in" , "default" : "M"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/loader/001_ECLIPSE100/A/ACTNUM b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/loader/001_ECLIPSE100/A/ACTNUM deleted file mode 100644 index 26e9589211..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/loader/001_ECLIPSE100/A/ACTNUM +++ /dev/null @@ -1 +0,0 @@ -{"name" : "ACTNUM", "sections" : ["GRID"], "data" : {"value_type" : "INT" }} diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/loader/001_ECLIPSE100/A/ADDREG b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/loader/001_ECLIPSE100/A/ADDREG deleted file mode 100644 index 1554bd3696..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/loader/001_ECLIPSE100/A/ADDREG +++ /dev/null @@ -1,5 +0,0 @@ -{"name" : "ADDREG" , "sections" : ["GRID","EDIT","PROPS","REGIONS","SOLUTION"], - "items" : - [{"name" : "ARRAY" , "value_type" : "STRING" , "description" : "The 3D array we will update"}, - {"name" : "SHIFT" , "value_type" : "DOUBLE" , "description" : "The value we will multiply with" , "default" : 0} , - {"name" : "REGION_NAME" , "value_type" : "STRING" , "description" : "The name of the region we are interested in" , "default" : "M"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/loader/001_ECLIPSE100/B/BLOCK_PROBE b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/loader/001_ECLIPSE100/B/BLOCK_PROBE deleted file mode 100644 index ba00cb3ff6..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/loader/001_ECLIPSE100/B/BLOCK_PROBE +++ /dev/null @@ -1,145 +0,0 @@ -{ - "name" : "BLOCK_PROBE" , - "sections" : ["SUMMARY"], - - "comment": "E100 only", - "deck_names" : [ - "BOSAT", - "BSOIL", - "BOIP", - "BOIPL", - "BOIPG", - "BPPO", - "BVOIL", - "BOVIS", - "BDENO", - "BODEN", - "BFLOOI", - "BFLOOJ", - "BFLOOK", - "BVELOI", - "BVELOJ", - "BVELOK", - "BWSAT", - "BSWAT", - "BWIP", - "BPPW", - "BVWAT", - "BWVIS", - "BDENW", - "BWDEN", - "BFLOWI", - "BVELWJ", - "BVELWK", - "BVELWI", - "BVELWJ", - "BVELWK", - "BGSAT", - "BSGAS", - "BGIP", - "BGIPL", - "BGIPG", - "BPPG", - "BVGAS", - "BGVIS", - "BDENG", - "BGDEN", - "BFLOGI", - "BFLOGJ", - "BFLOGK", - "BVELGI", - "BVELGJ", - "BVELGK", - "BPR", - "BWPR", - "BGPR", - "BRS", - "BRV", - "BPBUB", - "BPDEW", - "BRSSAT", - "BRVSAT", - "BSTATE", - "BPPC", - "BOKR", - "BWKR", - "BGKR", - "BKRO", - "BKRG", - "BKRW", - "BWPC", - "BGPC", - "BGTRP", - "BGTPD", - "BGSHY", - "BGSTRP", - "BWSHY", - "BWSMA", - "BHD", - "BHDF", - "BPR_X", - "BHD_X", - "BHDF_X", - "BSCN_X", - "BCTRA_X", - "LBPR_X", - "LBHD_X", - "LBHDF_X", - "LBSCN_X", - "LBCTRA_X", - "BRPV", - "BOPV", - "BWPV", - "BGPV", - "BHPV", - "BRTM", - "BPORVMOD", - "BPERMMOD", - "BAPI", - "BSCN", - "BSIP", - "BEWV_SAL", - "BTCNFANI", - "BTCNFCAT", - "BTRADCAT", - "BTSADCAT", - "BESALSUR", - "BESALPLY", - "BTCNFHEA", - "BTIPTHEA", - "BCGC", - "BCSC", - "BTCNFFOA", - "BTCNMFOA", - "BTIPTFOA", - "BTADSFOA", - "BTDCYFOA", - "BTMOBFOA", - "BTHLFFOA", - "BGI", - "BSIP", - "BNSAT", - "BNIP", - "BNKR", - "BTCNFSUR", - "BTIPTSUR", - "BTADSUR", - "BTCASUR", - "BTSTSUR", - "BEWV_SUR", - "BTCNFALK", - "BTADSALK", - "BTSTMALK", - "BTSADALK", - "BTPADALK" - ], - - "comment":"Some keywords need to be suffixed by a tracer name...", - "deck_name_regex":"BU.+|BTIPF.+|BTIPS.+|BTCNF.+|BTCNS.+|BTCN[1-9][0-9]*.+|BTIPT.+|BTIPF.+|BTIPS.+|BTIP[1-9][0-9]*.+|BTADS.+|BTDCY", - - "items" : [ - {"name": "I" , "value_type" : "INT"}, - {"name": "J" , "value_type" : "INT"}, - {"name": "K" , "value_type" : "INT"} - ] -} diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/loader/001_ECLIPSE100/B/BOX b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/loader/001_ECLIPSE100/B/BOX deleted file mode 100644 index 13b0a2f5a0..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/loader/001_ECLIPSE100/B/BOX +++ /dev/null @@ -1,7 +0,0 @@ -{"name" : "BOX" , "sections" : ["GRID", "EDIT", "PROPS", "REGIONS", "SOLUTION", "SCHEDULE"], "size" : 1 , "items" : [ - {"name" : "I1" , "value_type" : "INT"}, - {"name" : "I2" , "value_type" : "INT"}, - {"name" : "J1" , "value_type" : "INT"}, - {"name" : "J2" , "value_type" : "INT"}, - {"name" : "K1" , "value_type" : "INT"}, - {"name" : "K2" , "value_type" : "INT"}]} \ No newline at end of file diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/loader/002_ECLIPSE300/ADDREG b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/loader/002_ECLIPSE300/ADDREG deleted file mode 100644 index 4cd4ad38f2..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/loader/002_ECLIPSE300/ADDREG +++ /dev/null @@ -1,6 +0,0 @@ -{"name" : "ADDREG" , "sections" : ["GRID","EDIT","PROPS","REGIONS","SOLUTION"], - "items" : - [{"name" : "ARRAY" , "value_type" : "STRING" , "description" : "The 3D array we will update"}, - {"name" : "SHIFT" , "value_type" : "DOUBLE" , "description" : "The value we will multiply with" , "default" : 0} , - {"name" : "REGION_NUMBER" , "value_type" : "INT" , "description" : "The region number we are interested in"} , - {"name" : "REGION_NAME" , "value_type" : "STRING" , "description" : "The name of the region we are interested in" , "default" : "M"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/loader/002_ECLIPSE300/EQUIL b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/loader/002_ECLIPSE300/EQUIL deleted file mode 100644 index 9f3ee5e3b5..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/loader/002_ECLIPSE300/EQUIL +++ /dev/null @@ -1,13 +0,0 @@ -{"name" : "EQUIL" , "sections" : ["SOLUTION"], "size" : {"keyword":"EQLDIMS" , "item":"NTEQUL"}, - "description": "The EQUIL item is used when equilibrationg the model. The item should consist of one record for each PVT region", - "items" : - [{"name" : "DATUM_DEPTH" , "value_type" : "DOUBLE" , "default" : 0.0 , "dimension" : "Length"}, - {"name" : "DATUM_PRESSURE" , "value_type" : "DOUBLE" , "dimension" : "Pressure"} , - {"name" : "OWC" , "value_type" : "DOUBLE" , "default" : 0.0 , "dimension" : "Length", - "description" : "The OWC item is depth of the OIL Water contact. This should ..."} , - {"name" : "PC_OWC" , "value_type" : "DOUBLE" , "default" : 0.0 , "dimension" : "Pressure"} , - {"name" : "GOC" , "value_type" : "DOUBLE" , "default" : 0.0 , "dimension" : "Length"} , - {"name" : "PC_GOC" , "value_type" : "DOUBLE" , "default" : 0.0 , "dimension" : "Pressure"} , - {"name" : "BLACK_OIL_INIT" , "value_type" : "INT" , "default" : 0} , - {"name" : "BLACK_OIL_INIT_WG" , "value_type" : "INT" , "default" : 0} , - {"name" : "OIP_INIT" , "value_type" : "INT" , "default" : -5 , "comment":"The default is a state variable"}]} diff --git a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/loader/ZCORN b/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/loader/ZCORN deleted file mode 100644 index 523ae7792e..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/testdata/parser/keyword-generator/loader/ZCORN +++ /dev/null @@ -1 +0,0 @@ -{"name" : "ZCORN", "sections" : ["GRID"], "data" : {"value_type" : "DOUBLE", "dimension" : "Length" }} diff --git a/ThirdParty/custom-opm-parser/opm-parser/travis/build-and-test-opm-parser.sh b/ThirdParty/custom-opm-parser/opm-parser/travis/build-and-test-opm-parser.sh deleted file mode 100644 index 216794d861..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/travis/build-and-test-opm-parser.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash -set -e - -pushd . > /dev/null -cd opm-parser -mkdir build -cd build -cmake -DENABLE_PYTHON=ON -DBUILD_TESTING=ON ../ -make -ctest --output-on-failure -popd > /dev/null diff --git a/ThirdParty/custom-opm-parser/opm-parser/travis/build-opm-parser.sh b/ThirdParty/custom-opm-parser/opm-parser/travis/build-opm-parser.sh deleted file mode 100644 index 8a8252f268..0000000000 --- a/ThirdParty/custom-opm-parser/opm-parser/travis/build-opm-parser.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -set -e - -pushd . > /dev/null -cd opm-parser -mkdir build -cd build -cmake -DBUILD_TESTING=OFF ../ -make -popd > /dev/null diff --git a/ThirdParty/nightcharts/CMakeLists.txt b/ThirdParty/nightcharts/CMakeLists.txt new file mode 100644 index 0000000000..287617a83d --- /dev/null +++ b/ThirdParty/nightcharts/CMakeLists.txt @@ -0,0 +1,16 @@ +cmake_minimum_required (VERSION 2.8) + +project (nightcharts) + +list (APPEND MAIN_SOURCE_FILES + nightcharts.h + nightcharts.cpp + nightchartswidget.h + nightchartswidget.cpp +) + +add_library( ${PROJECT_NAME} + STATIC + ${MAIN_SOURCE_FILES} +) + diff --git a/ThirdParty/nightcharts/README.md b/ThirdParty/nightcharts/README.md new file mode 100644 index 0000000000..9640923ce5 --- /dev/null +++ b/ThirdParty/nightcharts/README.md @@ -0,0 +1,41 @@ +# Nightcharts + +This class includes a drawing histogram, pies and pseudo 3D pies. +It has very simple API and high level usability. +http://qt-apps.org/content/show.php?action=content&content=132560 + +Licensed under LGPL 2.1 + +Example : + + + void MainWindow::paintEvent(QPaintEvent e*) + { + QWidget::paintEvent(e); + QPainter painter; + QFont font; + painter.begin(this); + Nightcharts PieChart; + PieChart.setType(Nightcharts::DPie);//{Histogramm,Pie,DPie}; + PieChart.setLegendType(Nightcharts::Round);//{Round,Vertical} + PieChart.setCords(100,100,this->width()/1.5,this->height()/1.5); + PieChart.addPiece("Item1",QColor(200,10,50),34); + PieChart.addPiece("Item2",Qt::green,27); + PieChart.addPiece("Item3",Qt::cyan,14); + PieChart.addPiece("Item4",Qt::yellow,7); + PieChart.addPiece("Item5",Qt::blue,4); + PieChart.draw(&painter); + PieChart.drawLegend(&painter); + } + +![3DPie example](http://qt-apps.org/CONTENT/content-pre1/132560-1.PNG) + +### How to use + + - Check out in any location (or add as a submodule) + - Write into Your main .pro file: + + ``` + include("path/to/nightcharts/nightcharts.pri") + + ``` diff --git a/ThirdParty/nightcharts/nightcharts.cpp b/ThirdParty/nightcharts/nightcharts.cpp new file mode 100644 index 0000000000..a53053766b --- /dev/null +++ b/ThirdParty/nightcharts/nightcharts.cpp @@ -0,0 +1,482 @@ +/* + * NightCharts + * Copyright (C) 2010 by Alexander A. Avdonin, Artem N. Ivanov / ITGears Co. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Please contact gordos.kund@gmail.com with any questions on this license. + */ + +#define _USE_MATH_DEFINES +#include "nightcharts.h" + +Nightcharts::Nightcharts()//QPainter *painter) + +{ + font.setFamily("verdana"); + font.setPixelSize(15); + //painter = painter; + //painter->setFont(font); + ctype = Nightcharts::Dpie; + cltype = Nightcharts::Vertical; + cX = 0; + cY = 0; + cW = 100; + cH = 100; + lX = cX+cW+20; + lY = cY; + shadows = true; + + // NOTE: This value is accumulated, and might end up with overflow + // Was originally uninitialized, and caused overflow issues and invalid drawing when running debug + // Suggest rewrite and use locally defined aggregatedAngle (see below for usage) + palpha = 0.0; +} + +Nightcharts::~Nightcharts() +{ + pieces.clear(); +} + +int Nightcharts::addPiece(QString name,Qt::GlobalColor color,float Percentage) +{ + this->nPiece++; + + pieceNC piece; + piece.addName(name); + piece.setColor(color); + piece.setPerc(Percentage); + pieces.append(piece); + + return 0; +} +int Nightcharts::addPiece(QString name, QColor color, float Percentage) +{ + this->nPiece++; + pieceNC piece; + piece.addName(name); + piece.setColor(color); + piece.setPerc(Percentage); + pieces.append(piece); + + return 0; +} +int Nightcharts::setCords(double x, double y, double w, double h) +{ + this->cX = x; + this->cY = y; + this->cW = w; + this->cH = h; + this->lX = cX+cW+20; + this->lY = cY; + + return 0; +} +int Nightcharts::setLegendCords(double x, double y) +{ + this->lX = x; + this->lY = y; + + return 0; +} + +int Nightcharts::setType(Nightcharts::type t) +{ + this->ctype = t; + + return 0; +} + +int Nightcharts::setLegendType(Nightcharts::legend_type t) +{ + this->cltype = t; + + return 0; +} +int Nightcharts::setFont(QFont f) +{ + this->font = f; + + return 0; +} + +int Nightcharts::setShadows(bool ok) +{ + this->shadows = ok; + + return 0; +} + +int Nightcharts::draw(QPainter *painter) +{ + painter->setRenderHint(QPainter::Antialiasing); + painter->setPen(Qt::NoPen); + if (this->ctype==Nightcharts::Pie) + { + pW = 0; + double pdegree = 0; + + //Options + //QLinearGradient gradient(cX + 0.5*cW, cY, cX + 0.5*cW, cY + cH*2.5); + QRadialGradient gradient(cX + 0.5*cW, cY+0.5*cH, 0.5*cW); + gradient.setColorAt(1,Qt::black); + + + //Draw + //pdegree = (360/100)*pieces[i].pPerc; + if (shadows) + { + double sumangle = 0; + for (int i=0;isetBrush(Qt::darkGray); + painter->drawPie(cX,cY+pW+5,cW,cH,palpha*16,sumangle*16); + } + + QPen pen; + pen.setWidth(2); + + double aggregatedAngle = 0.0; + for (int i=0;isetBrush(gradient); + pen.setColor(pieces[i].rgbColor); + painter->setPen(pen); + pdegree = 3.6*pieces[i].pPerc; + painter->drawPie(cX,cY,cW,cH,aggregatedAngle*16,pdegree*16); + aggregatedAngle += pdegree; + } + } + else if (this->ctype==Nightcharts::Dpie) + { + pW = 50; + double pdegree = 0; + QPointF p; + + QLinearGradient gradient(cX-0.5*cW,cY+cH/2,cX+1.5*cW,cY+cH/2); + gradient.setColorAt(0,Qt::black); + gradient.setColorAt(1,Qt::white); + QLinearGradient gradient_side(cX,cY+cH,cX+cW,cY+cH); + gradient_side.setColorAt(0,Qt::black); + + double sumangle = 0; + for (int i=0;isetBrush(Qt::darkGray); + painter->drawPie(cX,cY+pW+5,cW,cH,palpha*16,sumangle*16); + } + int q = GetQuater(palpha+sumangle); + + if (q ==2 || q==3) + { + QPointF p = GetPoint(palpha+sumangle); + QPointF points[4] = + { + QPointF(p.x(),p.y()), + QPointF(p.x(),p.y()+pW), + QPointF(cX+cW/2,cY+cH/2+pW), + QPointF(cX+cW/2,cY+cH/2) + }; + gradient_side.setColorAt(1,pieces[pieces.size()-1].rgbColor); + painter->setBrush(gradient_side); + painter->drawPolygon(points,4); + } + p = GetPoint(palpha); + q = GetQuater(palpha); + if (q ==1 || q==4) + { + QPointF points[4] = + { + QPointF(p.x(),p.y()), + QPointF(p.x(),p.y()+pW), + QPointF(cX+cW/2,cY+cH/2+pW), + QPointF(cX+cW/2,cY+cH/2) + }; + gradient_side.setColorAt(1,pieces[0].rgbColor); + painter->setBrush(gradient_side); + painter->drawPolygon(points,4); + } + + for (int i=0;isetBrush(gradient); + pdegree = 3.6*pieces[i].pPerc; + painter->drawPie(cX,cY,cW,cH,palpha*16,pdegree*16); + + double a_ = Angle360(palpha); + int q_ = GetQuater(palpha); + + palpha += pdegree; + + double a = Angle360(palpha); + int q = GetQuater(palpha); + + QPainterPath path; + p = GetPoint(palpha); + + if((q == 3 || q == 4) && (q_ == 3 || q_ == 4)) + { + // 1) + if (a>a_) + { + QPointF p_old = GetPoint(palpha-pdegree); + path.moveTo(p_old.x()-1,p_old.y()); + path.arcTo(cX,cY,cW,cH,palpha-pdegree,pdegree); + path.lineTo(p.x(),p.y()+pW); + path.arcTo(cX,cY+pW,cW,cH,palpha,-pdegree); + } + // 2) + else + { + path.moveTo(cX,cY+cH/2); + path.arcTo(cX,cY,cW,cH,180,Angle360(palpha)-180); + path.lineTo(p.x(),p.y()+pW); + path.arcTo(cX,cY+pW,cW,cH,Angle360(palpha),-Angle360(palpha)+180); + path.lineTo(cX,cY+cH/2); + + path.moveTo(p.x(),p.y()); + path.arcTo(cX,cY,cW,cH,palpha-pdegree,360-Angle360(palpha-pdegree)); + path.lineTo(cX+cW,cY+cH/2+pW); + path.arcTo(cX,cY+pW,cW,cH,0,-360+Angle360(palpha-pdegree)); + } + + } + // 3) + else if((q == 3 || q == 4) && (q_ == 1 || q_ == 2) && a>a_ ) + { + path.moveTo(cX,cY+cH/2); + path.arcTo(cX,cY,cW,cH,180,Angle360(palpha)-180); + path.lineTo(p.x(),p.y()+pW); + path.arcTo(cX,cY+pW,cW,cH,Angle360(palpha),-Angle360(palpha)+180); + path.lineTo(cX,cY+cH/2); + } + // 4) + else if((q == 1 || q == 2) && (q_ == 3 || q_ == 4) && asetBrush(gradient_side); + painter->drawPath(path); + } + } + } + else if (this->ctype==Nightcharts::Histogramm) + { + double pDist = 15; + double pW = (cW-(pieces.size())*pDist)/pieces.size(); + + QLinearGradient gradient(cX+cW/2,cY,cX+cW/2,cY+cH); + gradient.setColorAt(0,Qt::black); + QPen pen; + pen.setWidth(3); + + for (int i=0;isetPen(Qt::NoPen); + painter->setBrush(Qt::darkGray); + painter->drawRect(cX+pDist+i*(pW + pDist)-pDist/2,cY+cH-1,pW,-cH/100*pieces[i].pPerc+pDist/2-5); + } + gradient.setColorAt(1,pieces[i].rgbColor); + painter->setBrush(gradient); + pen.setColor(pieces[i].rgbColor); + painter->setPen(pen); + painter->drawRect(cX+pDist+i*(pW + pDist),cY+cH,pW,-cH/100*pieces[i].pPerc-5); + QString label = QString::number(pieces[i].pPerc)+"%"; + painter->setPen(Qt::SolidLine); + painter->drawText(cX+pDist+i*(pW + pDist)+pW/2-painter->fontMetrics().width(label)/2,cY+cH-cH/100*pieces[i].pPerc-painter->fontMetrics().height()/2,label); + } + painter->setPen(Qt::SolidLine); + for (int i=1;i<10;i++) + { + painter->drawLine(cX-3,cY+cH/10*i,cX+3,cY+cH/10*i); //äåëåíèÿ ïî îñè Y + //painter->drawText(cX-20,cY+cH/10*i,QString::number((10-i)*10)+"%"); + } + painter->drawLine(cX,cY+cH,cX,cY); //îñü Y + painter->drawLine(cX,cY,cX+4,cY+10); //ñòðåëêè + painter->drawLine(cX,cY,cX-4,cY+10); + painter->drawLine(cX,cY+cH,cX+cW,cY+cH); //îñü Õ + + } + return 0; +} + +void Nightcharts::drawLegend(QPainter *painter) +{ + //double ptext = 25; + double angle = palpha; + painter->setPen(Qt::SolidLine); + + switch(cltype) + { + /*case Nightcharts::Horizontal: + { + int dist = 5; + painter->setBrush(Qt::white); + float x = cX; + float y = cY+cH+20+dist; + //painter->drawRoundRect(cX+cW+20,cY,dist*2+200,pieces.size()*(fontmetr.height()+2*dist)+dist,15,15); + for (int i=0;isetBrush(pieces[i].rgbColor); + x += fontmetr.height()+2*dist; + if (i%3 == 0) + { + x = cX; + y += dist+fontmetr.height(); + } + painter->drawRect(x,y,fontmetr.height(),fontmetr.height()); + QString label = pieces[i].pname + " - " + QString::number(pieces[i].pPerc)+"%"; + painter->drawText(x+fontmetr.height()+dist,y+fontmetr.height()/2+dist,label); + x += fontmetr.width(label); + } + break; + }*/ + case Nightcharts::Vertical: + { + int dist = 5; + painter->setBrush(Qt::white); + //painter->drawRoundRect(cX+cW+20,cY,dist*2+200,pieces.size()*(painter->fontMetrics().height()+2*dist)+dist,15,15); + for (int i=pieces.size()-1;i>=0;i--) + { + painter->setBrush(pieces[i].rgbColor); + float x = lX+dist; + float y = lY+dist+i*(painter->fontMetrics().height()+2*dist); + painter->drawRect(x,y,painter->fontMetrics().height(),painter->fontMetrics().height()); + painter->drawText(x+painter->fontMetrics().height()+dist,y+painter->fontMetrics().height()/2+dist,pieces[i].pname + " (" + QString::number(pieces[i].pPerc, 'd', 1)+"%)"); + } + break; + } + case Nightcharts::Round: + for (int i=pieces.size()-1;i>=0;i--) + { + float len = 100; + double pdegree = 3.6*pieces[i].pPerc; + angle -= pdegree/2; + QPointF p = GetPoint(angle); + QPointF p_ = GetPoint(angle, cW+len,cH+len); + int q = GetQuater(angle); + if (q == 3 || q == 4) + { + p.setY(p.y()+pW/2); + p_.setY(p_.y()+pW/2); + } + painter->drawLine(p.x(),p.y(),p_.x(),p_.y()); + QString label = pieces[i].pname + " - " + QString::number(pieces[i].pPerc)+"%"; + float recW = painter->fontMetrics().width(label)+10; + float recH = painter->fontMetrics().height()+10; + p_.setX(p_.x()-recW/2 + recW/2*cos(angle*M_PI/180)); + p_.setY(p_.y()+recH/2 + recH/2*sin(angle*M_PI/180)); + painter->setBrush(Qt::white); + painter->drawRoundRect(p_.x() ,p_.y(), recW, -recH); + painter->drawText(p_.x()+5, p_.y()-recH/2+5, label); + angle -= pdegree/2; + } + break; + } +} + +QPointF Nightcharts::GetPoint(double angle, double R1, double R2) +{ + if (R1 == 0 && R2 == 0) + { + R1 = cW; + R2 = cH; + } + QPointF point; + double x = R1/2*cos(angle*M_PI/180); + x+=cW/2+cX; + double y = -R2/2*sin(angle*M_PI/180); + y+=cH/2+cY; + point.setX(x); + point.setY(y); + return point; +} + +int Nightcharts::GetQuater(double angle) +{ + angle = Angle360(angle); + + if(angle>=0 && angle<90) + return 1; + if(angle>=90 && angle<180) + return 2; + if(angle>=180 && angle<270) + return 3; + if(angle>=270 && angle<360) + return 4; +} + +double Nightcharts::Angle360(double angle) +{ + int i = (int)angle; + double delta = angle - i; + return (i%360 + delta); +} + +pieceNC::pieceNC() +{ +} +void pieceNC::addName(QString name) +{ + pname = name; +} +void pieceNC::setColor(Qt::GlobalColor color) +{ + rgbColor = color; +} +void pieceNC::setColor(QColor color) +{ + rgbColor = color; +} + +void pieceNC::setPerc(float Percentage) +{ + pPerc = Percentage; +} + +int Nightcharts::pieceCount() const +{ + return pieces.count(); +} diff --git a/ThirdParty/nightcharts/nightcharts.h b/ThirdParty/nightcharts/nightcharts.h new file mode 100644 index 0000000000..56cc0334c1 --- /dev/null +++ b/ThirdParty/nightcharts/nightcharts.h @@ -0,0 +1,88 @@ +/* + * NightCharts + * Copyright (C) 2010 by Alexander A. Avdonin, Artem N. Ivanov / ITGears Co. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Please contact gordos.kund@gmail.com with any questions on this license. + */ +#ifndef NIGHTCHARTS_H +#define NIGHTCHARTS_H +#define PerConst = 3.6; +#include +#include +#include +#include +#include +#include + +class pieceNC +{ +public: + explicit pieceNC(); + void addName(QString name); + void setColor(Qt::GlobalColor); + void setColor(QColor color); + void setPerc(float Percentage); + + QString pname; + QColor rgbColor; + float pPerc; + +private: + +}; + +class Nightcharts +{ +public: + + explicit Nightcharts(); + ~Nightcharts(); + enum type { Histogramm , Pie, Dpie }; + enum legend_type{ /*Horizontal,*/ Vertical, Round }; + int addPiece(QString name,Qt::GlobalColor,float Percentage); + int addPiece(QString name,QColor, float Percentage); + int setCords(double x, double y, double w, double h); + int setLegendCords(double x, double y); + int setType(Nightcharts::type t); + int setLegendType(Nightcharts::legend_type t); + int setShadows(bool ok = true); + int setFont(QFont f); + int draw(QPainter *painter); + void drawLegend(QPainter *painter); + int pieceCount() const; + double palpha; + +private: + double cX,cY,cW,cH,pW,lX,lY; + int nPiece; + bool shadows; + QVector pieces; + int ctype, cltype; + QFont font; + //QPainter *cpainter; + QPointF GetPoint(double angle, double R1 = 0, double R2 = 0); + int GetQuater(double angle); + double Angle360(double angle); + + +signals: + +public slots: + +}; + + +#endif // NIGHTCHARTS_H diff --git a/ThirdParty/nightcharts/nightcharts.pri b/ThirdParty/nightcharts/nightcharts.pri new file mode 100644 index 0000000000..0978360033 --- /dev/null +++ b/ThirdParty/nightcharts/nightcharts.pri @@ -0,0 +1,3 @@ +INCLUDEPATH+=$$PWD +SOURCES+=$$PWD/nightcharts.cpp +HEADERS+=$$PWD/nightcharts.h diff --git a/ThirdParty/nightcharts/nightchartswidget.cpp b/ThirdParty/nightcharts/nightchartswidget.cpp new file mode 100644 index 0000000000..d476c5e155 --- /dev/null +++ b/ThirdParty/nightcharts/nightchartswidget.cpp @@ -0,0 +1,44 @@ +#include "nightchartswidget.h" +#include "nightcharts.h" +NightchartsWidget::NightchartsWidget(QWidget *parent) : + QWidget(parent) +{ + clear(); +} +void NightchartsWidget::setType(Nightcharts::type t) +{ + _chart.setType(t); +} +void NightchartsWidget::clear() +{ + _chart = Nightcharts(); + _chart.setType(Nightcharts::Histogramm); + _chart.setLegendType(Nightcharts::Vertical); + + _margin_left = 16; + _margin_top = 16; + +} + +void NightchartsWidget::paintEvent(QPaintEvent * e) +{ + QWidget::paintEvent(e); + if(!_chart.pieceCount()) return ; + QPainter painter; + QFont font; + painter.begin(this); + int w = (this->width() - _margin_left - 150); + int h = (this->height() - _margin_top - 100); + int size = (w +#include +#include "nightcharts.h" +class NightchartsWidget : public QWidget +{ + Q_OBJECT +public: + explicit NightchartsWidget(QWidget *parent = 0); + void addItem(QString name, QColor color, float value); + void setType(Nightcharts::type type); + void clear(); +protected: + virtual void paintEvent(QPaintEvent * e); +private: + Nightcharts _chart; + int _margin_left; + int _margin_top; + +}; + +#endif // NIGHTCHARTSWIDGET_H diff --git a/doc/rim_rig_relationships.plantuml b/doc/rim_rig_relationships.plantuml new file mode 100644 index 0000000000..29fa56470d --- /dev/null +++ b/doc/rim_rig_relationships.plantuml @@ -0,0 +1,71 @@ +@startuml +left to right direction +RimCase <|-- RimEclipseCase +RimCase <|-- RimGeoMechCase + +RimEclipseCase <|--- RimEclipseInputCase +RimEclipseCase <|--- RimEclipseInputCaseOpm +RimEclipseCase <|--- RimEclipseResultCase +RimEclipseCase <|--- RimEclipseStatisticsCase + +class RimEclipseInputCase { + Based on ASCII input files +} + +class RimEclipseInputCaseOpm { + Based on ASCII input files using OPM parser +} + +class RimEclipseResultCase { + Based on binary files (EGRID, UNSMRY, ..) +} + +class RimEclipseStatisticsCase { + Case derived from statistics computations of multiple cases +} + +RimCase *-- "N" RimView + + +class RimEclipseCase { +RigEclipseCaseData* reservoirData() +RimReservoirCellResultsStorage* results() +-- private -- +matrixResults RimReservoirCellResultsStorage +fractureResults RimReservoirCellResultsStorage +} + +RimEclipseCase *-- RigEclipseCaseData +RimEclipseCase *-- RimReservoirCellResultsStorage + +class RigEclipseCaseData { +RigMainGrid* mainGrid() +RigCaseCellResultsData* results() +RigActiveCellInfo* activeCellInfo() +RigFormationNames* activeFormationNames() +RigSingleWellResultsData* findWellResult() +RigCell& cellFromWellResultCell() +} + +RigEclipseCaseData *-- RigCaseCellResultsData + + +RimReservoirCellResultsStorage *-- RigCaseCellResultsData + +class RimReservoirCellResultsStorage { +RigCaseCellResultsData* cellResults() +} + + +RimSummaryCase <|-- RimFileSummaryCase +RimSummaryCase <|-- RimGridSummaryCase + +class RimGridSummaryCase { +RimEclipseCase* associatedEclipseCase( +} + + + +RimGridSummaryCase *-- RimEclipseCase + +@enduml diff --git a/doc/view_classes.plantuml b/doc/view_classes.plantuml index 42487afa19..7494fc2ac9 100644 --- a/doc/view_classes.plantuml +++ b/doc/view_classes.plantuml @@ -1,35 +1,28 @@ @startuml -class RimView { - RimViewGeometry* viewGeometry() +class RimViewWindow { + RimMdiWindowController mdiWindowGeometry() } -class Rim3dView { -} +note top of RimViewWindow : Updated 2017-02-24 -class RimPlotView { +class RimView { } +RimViewWindow <|-- RimView -RimView <|-- RimPlotView -RimView <|-- Rim3dView - - -RimView *-- RimViewGeometry - -RimPlotView <|-- RimWellLogPlot -RimPlotView <|-- RimSummaryPlot +package plots { +RimViewWindow <|-- RimSummaryPlot +RimViewWindow <|-- RimTotalWellAllocationPlot +RimViewWindow <|-- RimWellAllocationPlot +RimViewWindow <|-- RimWellLogPlot +} -Rim3dView <|-- RimEclipseView -Rim3dView <|-- RimGeoMechView +RimViewWindow *-- RimMdiWindowController -class RimWindow { -} +RimView <|-- RimEclipseView +RimView <|-- RimGeoMechView -RimViewGeometry --> RimWindow -class RimViewGeometry { - PtrField window -} @enduml diff --git a/patches/fix-synthetic-odb-cases.patch b/patches/fix-synthetic-odb-cases.patch new file mode 100644 index 0000000000..6b3247c686 --- /dev/null +++ b/patches/fix-synthetic-odb-cases.patch @@ -0,0 +1,43 @@ +From 8d2557fe8dd00ac30f524197c8a50db2e89bf720 Mon Sep 17 00:00:00 2001 +From: Magne Sjaastad +Date: Tue, 25 Apr 2017 13:11:00 +0200 +Subject: [PATCH] #1396 Reapply fix for synthetic odb files + +--- + ThirdParty/Ert/libecl/src/ecl_rsthead.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/ThirdParty/Ert/libecl/src/ecl_rsthead.c b/ThirdParty/Ert/libecl/src/ecl_rsthead.c +index 52ad954..e382cc1 100644 +--- a/ThirdParty/Ert/libecl/src/ecl_rsthead.c ++++ b/ThirdParty/Ert/libecl/src/ecl_rsthead.c +@@ -88,7 +88,8 @@ ecl_rsthead_type * ecl_rsthead_alloc_from_kw( int report_step , const ecl_kw_typ + // The only derived quantity + rsthead->sim_time = rsthead_date( rsthead->day , rsthead->month , rsthead->year ); + } +- rsthead->sim_days = ecl_kw_iget_double( doubhead_kw , DOUBHEAD_DAYS_INDEX ); ++ if (doubhead_kw) ++ rsthead->sim_days = ecl_kw_iget_double( doubhead_kw , DOUBHEAD_DAYS_INDEX ); + if (logihead_kw) + rsthead->dualp = ecl_kw_iget_bool( logihead_kw , LOGIHEAD_DUALP_INDEX); + +@@ -109,12 +110,15 @@ ecl_rsthead_type * ecl_rsthead_alloc_from_kw( int report_step , const ecl_kw_typ + + ecl_rsthead_type * ecl_rsthead_alloc( const ecl_file_view_type * rst_view, int report_step) { + const ecl_kw_type * intehead_kw = ecl_file_view_iget_named_kw( rst_view , INTEHEAD_KW , 0); +- const ecl_kw_type * doubhead_kw = ecl_file_view_iget_named_kw( rst_view , DOUBHEAD_KW , 0); ++ const ecl_kw_type * doubhead_kw = NULL; + const ecl_kw_type * logihead_kw = NULL; + + if (ecl_file_view_has_kw(rst_view, LOGIHEAD_KW)) + logihead_kw = ecl_file_view_iget_named_kw( rst_view , LOGIHEAD_KW , 0); + ++ if (ecl_file_view_has_kw(rst_view, DOUBHEAD_KW)) ++ doubhead_kw = ecl_file_view_iget_named_kw(rst_view, DOUBHEAD_KW, 0); ++ + if (ecl_file_view_has_kw( rst_view , SEQNUM_KW)) { + const ecl_kw_type * seqnum_kw = ecl_file_view_iget_named_kw( rst_view , SEQNUM_KW , 0); + report_step = ecl_kw_iget_int( seqnum_kw , 0); +-- +2.10.2.windows.1 + diff --git a/patches/readme.txt b/patches/readme.txt new file mode 100644 index 0000000000..23d442149b --- /dev/null +++ b/patches/readme.txt @@ -0,0 +1,6 @@ + +Command line: +git apply --reject --whitespace=fix patches/fix-synthetic-odb-cases.patch + +Description: +Will fix reading of special Eclipse cases related to synthetic ODB test cases. Required for regression testing.